mftsccs-browser 2.1.223-beta → 2.1.224-beta

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.
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see main.bundle.js.LICENSE.txt */
2
- var e={2:(e,t,n)=>{n.d(t,{s:()=>d});var o=n(8286),i=n(9581),r=n(1412),a=n(3518),s=n(1863),c=n(8957),l=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function d(e){var t=arguments;return l(this,void 0,void 0,function*(){const n=c.Logger.logfunction("GetAllConnectionsOfComposition",t);var i=[];if(0==(i=yield o.d.GetConnectionsOfConcept(e)).length){i=yield u(e)}else{var a=yield u(e);(0,r.e)(a,i),i=a}return c.Logger.logUpdate(n),i})}function u(e){var t=arguments;return l(this,void 0,void 0,function*(){const n=c.Logger.logfunction("GetAllConnectionsOfCompositionOnline",t);var r=[];try{(0,a.Xr)("application/json");const t=new Headers,d=new FormData;d.append("composition_id",e.toString());const u=yield fetch(i.B.GetAllConnectionsOfCompositionUrl(),{method:"POST",headers:t,body:d});if(!u.ok)throw(0,s.ry)(u),new Error(`Error! status: ${u.status}`);const h=yield u.json();for(var l=0;l<h.length;l++)o.d.AddConnection(h[l]),r.push(h[l]);return c.Logger.logUpdate(n),r}catch(e){Error,(0,s.Mb)(e,i.B.GetAllConnectionsOfCompositionUrl()),(0,s.ey)(n,"GetAllConnectionsOfCompositionOnline",e)}})}},38:e=>{class t{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}e.exports=t,t.default=t},71:(e,t)=>{t.__esModule=!0,t.word=t.tilde=t.tab=t.str=t.space=t.slash=t.singleQuote=t.semicolon=t.plus=t.pipe=t.openSquare=t.openParenthesis=t.newline=t.greaterThan=t.feed=t.equals=t.doubleQuote=t.dollar=t.cr=t.comment=t.comma=t.combinator=t.colon=t.closeSquare=t.closeParenthesis=t.caret=t.bang=t.backslash=t.at=t.asterisk=t.ampersand=void 0;t.ampersand=38;t.asterisk=42;t.at=64;t.comma=44;t.colon=58;t.semicolon=59;t.openParenthesis=40;t.closeParenthesis=41;t.openSquare=91;t.closeSquare=93;t.dollar=36;t.tilde=126;t.caret=94;t.plus=43;t.equals=61;t.pipe=124;t.greaterThan=62;t.space=32;t.singleQuote=39;t.doubleQuote=34;t.slash=47;t.bang=33;t.backslash=92;t.cr=13;t.feed=12;t.newline=10;t.tab=9;t.str=39;t.comment=-1;t.word=-2;t.combinator=-3},145:(e,t,n)=>{let o,i,r=n(7793);class a extends r{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new o(new i,this,e).stringify()}}a.registerLazyResult=e=>{o=e},a.registerProcessor=e=>{i=e},e.exports=a,a.default=a},176:(e,t,n)=>{n.d(t,{F4:()=>a,P6:()=>c,dp:()=>s});var o=n(2155),i=n(7282),r=n(6416);function a(e){var t,n;const o=(0,r.u)();return o.id=e.id,o.ghostId=e.ghostId,o.userId=e.userId,o.accessId=e.accessId,o.categoryId=e.categoryId,o.characterValue=e.characterValue,o.entryTimeStamp=e.entryTimeStamp,o.typeId=e.typeId,o.type=e.type,o.isTemp=!1,o.typeCharacter=null!==(n=null===(t=null==e?void 0:e.type)||void 0===t?void 0:t.characterValue)&&void 0!==n?n:"",o}function s(e){const t=(0,i.o)();return t.id=e.id,t.ghostId=e.ghostId,t.userId=e.userId,t.accessId=e.accessId,t.entryTimeStamp=e.entryTimeStamp,t.typeId=e.typeId,t.categoryId=e.categoryId,t}function c(e){const t=new o.N(0,0,0,0,0,0,0);return t.id=e.id,t.ghostId=e.ghostId,t.accessId=e.accessId,t.ofTheConceptId=e.ofTheConceptId,t.toTheConceptId=e.toTheConceptId,t.entryTimeStamp=e.entryTimeStamp,t.typeId=e.typeId,t.isTemp=!1,t}},197:()=>{},205:(e,t,n)=>{n.d(t,{B:()=>o});class o{}o.isTypeLoaded=!1,o.isCharacterLoaded=!1,o.isDataLoaded=!1,o.isLocalDataLoaded=!1,o.isLocalCharacterLoaded=!1,o.isLocalTypeLoaded=!1,o.isConnectionLoaded=!1,o.isConnectionTypeLoaded=!1,o.isLocalConnectionLoaded=!1},263:(e,t)=>{t.__esModule=!0,t.default=function(e){return e.sort(function(e,t){return e-t})},e.exports=t.default},276:(e,t,n)=>{n.d(t,{y:()=>o});class o{constructor(){this.conceptId=0,this.connectionTypeId=0,this.connectionType="",this.count=0}}},339:(e,t,n)=>{t.__esModule=!0,t.default=void 0;var o,i=(o=n(3631))&&o.__esModule?o:{default:o},r=n(1581);function a(e,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},a(e,t)}var s=function(e){var t,n;function o(t){var n;return(n=e.call(this,t)||this).type=r.SELECTOR,n}return n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,a(t,n),o}(i.default);t.default=s,e.exports=t.default},396:(e,t,n)=>{let o=n(7793);class i extends o{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}}e.exports=i,i.default=i,o.registerAtRule(i)},425:(e,t,n)=>{t.__esModule=!0,t.default=void 0;var o,i=(o=n(4646))&&o.__esModule?o:{default:o},r=n(1581);function a(e,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},a(e,t)}var s=function(e){var t,n;function o(t){var n;return(n=e.call(this,t)||this).type=r.COMMENT,n}return n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,a(t,n),o}(i.default);t.default=s,e.exports=t.default},442:(e,t,n)=>{n.d(t,{Y:()=>f});var o=n(1167),i=n(2155),r=n(9581),a=n(3518),s=n(1863),c=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};var l=n(3026),d=n(8286),u=n(8957),h=n(8176),p=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class f{static CheckContains(e){for(var t=!1,n=0;n<this.conceptsSyncArray.length;n++)this.conceptsSyncArray[n].id==e.id&&(t=!0);return t}static SyncDataDelete(e){for(var t=0;t<this.conceptsSyncArray.length;t++)e==this.conceptsSyncArray[t].id&&this.conceptsSyncArray.splice(t,1);for(t=0;t<this.connectionSyncArray.length;t++)this.connectionSyncArray[t].ofTheConceptId!=e&&this.connectionSyncArray[t].toTheConceptId!=e&&this.connectionSyncArray[t].typeId!=e||this.connectionSyncArray.splice(t,1)}static CheckContainsConnection(e){for(var t=!1,n=0;n<this.connectionSyncArray.length;n++)this.connectionSyncArray[n].id==e.id&&(t=!0);return t}static AddConcept(e){this.conceptsSyncArray.push(e)}static RemoveConcept(e){for(var t=0;t<this.conceptsSyncArray.length;t++)this.conceptsSyncArray[t].id==e.id&&this.conceptsSyncArray.splice(t,1)}static AddConnection(e){this.connectionSyncArray.push(e)}static RemoveConnection(e){for(var t=0;t<this.connectionSyncArray.length;t++)this.connectionSyncArray[t].id==e.id&&this.connectionSyncArray.splice(t,1)}static SyncDataOnline(){return p(this,void 0,void 0,function*(){if(u.serviceWorker)try{return(yield(0,u.sendMessage)("SyncData__SyncDataOnline",{})).data}catch(e){(0,u.handleServiceWorkerException)(e)}for(let e=0;e<this.conceptsSyncArray.length;e++)l.I.AddConcept(this.conceptsSyncArray[e]);for(let e=0;e<this.connectionSyncArray.length;e++)d.d.AddConnection(this.connectionSyncArray[e]);if(this.conceptsSyncArray.length>0){let e=this.conceptsSyncArray.slice();this.conceptsSyncArray=[],(0,o.Y)(e)}if(this.connectionSyncArray.length>0){let e=this.connectionSyncArray.slice();this.connectionSyncArray=[],yield function(e){return c(this,void 0,void 0,function*(){let t=new i.N(0,0,0,0,0,0,0);try{var n=(0,a.Xr)(),o=JSON.stringify(e);const i=yield fetch(r.B.CreateTheConnectionUrl(),{method:"POST",headers:n,body:o});return i.ok?yield i.json():(0,s.ry)(i),t}catch(e){throw Error,e}})}(e)}return h.a.clearAll(),"done"})}}f.conceptsSyncArray=[],f.connectionSyncArray=[]},490:(e,t,n)=>{n.d(t,{s:()=>i});var o=n(4024);function i(){var e,t,n,i,r,a,s,c,l,d,u,h;let p={entity:0,userConcept:0,userId:0,token:o.b.BearerAccessToken,email:"",amcode:"",roles:[]};const f=o.b.profileCache;if(f)return p.entity=null!==(e=f.entityId)&&void 0!==e?e:0,p.userConcept=null!==(t=f.userConcept)&&void 0!==t?t:0,p.userId=null!==(n=f.userId)&&void 0!==n?n:0,p.email=null!==(i=f.email)&&void 0!==i?i:"",p.amcode=null!==(r=f.amcode)&&void 0!==r?r:"",p.roles=null!==(a=f.roles)&&void 0!==a?a:[],p;try{const e=(null===localStorage||void 0===localStorage?void 0:localStorage.getItem("profile"))||"";if(e){const t=JSON.parse(e);p.entity=null!==(s=null==t?void 0:t.entityId)&&void 0!==s?s:0,p.userConcept=null!==(c=null==t?void 0:t.userConcept)&&void 0!==c?c:0,p.userId=null!==(l=null==t?void 0:t.userId)&&void 0!==l?l:0,p.email=null!==(d=null==t?void 0:t.email)&&void 0!==d?d:"",p.amcode=null!==(u=null==t?void 0:t.amcode)&&void 0!==u?u:"",p.token||(p.token=null!==(h=null==t?void 0:t.token)&&void 0!==h?h:"")}}catch(e){}return p}},518:(e,t,n)=>{t.__esModule=!0,t.default=void 0;var o,i=(o=n(3631))&&o.__esModule?o:{default:o},r=n(1581);function a(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}var c=function(e){var t,n;function o(t){var n;return(n=e.call(this,t)||this).type=r.ROOT,n}n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n);var i,c,l,d=o.prototype;return d.toString=function(){var e=this.reduce(function(e,t){return e.push(String(t)),e},[]).join(",");return this.trailingComma?e+",":e},d.error=function(e,t){return this._error?this._error(e,t):new Error(e)},i=o,(c=[{key:"errorGenerator",set:function(e){this._error=e}}])&&a(i.prototype,c),l&&a(i,l),Object.defineProperty(i,"prototype",{writable:!1}),o}(i.default);t.default=c,e.exports=t.default},628:(e,t,n)=>{n.d(t,{H:()=>y});var o=n(9581),i=n(4024),r=n(8957),a=n(1863),s=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};const c=(e,t,...n)=>s(void 0,[e,t,...n],void 0,function*(e,t,n=!0){let r={concepts:[],connections:[]};try{const s=new Headers;let c={concepts:e,connections:t};s.set("Content-Type","application/json"),s.set("Authorization","Bearer "+i.b.BearerAccessToken),s.set("Accept","application/json"),s.set("X-Session-Id",i.b.sessionId.toString()),s.set("Randomizer",o.B.getRandomizer().toString());const l=yield fetch(o.B.CreateGhostConceptApiUrl(n),{method:"POST",headers:s,body:JSON.stringify(c)});if(!l.ok)throw(0,a.ry)(l),new Error(`Error! status: ${l.status}`);const d=yield l.json();return r.concepts=d.concepts,r.connections=d.connections,r}catch(e){throw Error,e}});function l(e,t){const n=[];for(let o=0;o<e.length;o+=t){const i=e.slice(o,o+t);n.push(i)}return n}const d=(...e)=>s(void 0,[...e],void 0,function*(e=[]){return yield Promise.all(e.map(e=>{let t=JSON.parse(JSON.stringify(e));return delete t.type,delete t.ofConcept,delete t.toConcept,t}))});var u=n(9003),h=n(9736),p=n(4864),f=n(8176),m=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class y{static CheckContains(e){for(var t=!1,n=0;n<this.conceptsSyncArray.length;n++)this.conceptsSyncArray[n].id==e.id&&(t=!0);return t}static SyncDataDelete(e){for(var t=0;t<this.conceptsSyncArray.length;t++)e==this.conceptsSyncArray[t].id&&this.conceptsSyncArray.splice(t,1);for(t=0;t<this.connectionSyncArray.length;t++)this.connectionSyncArray[t].ofTheConceptId!=e&&this.connectionSyncArray[t].toTheConceptId!=e&&this.connectionSyncArray[t].typeId!=e||this.connectionSyncArray.splice(t,1)}static CheckContainsConnection(e){for(var t=!1,n=0;n<this.connectionSyncArray.length;n++)this.connectionSyncArray[n].id==e.id&&(t=!0);return t}static AddConcept(e){try{let t=!1;0!=y.CheckIfTheConceptIdExists(e.id,this.conceptsSyncArray).id&&(t=!0),t||this.conceptsSyncArray.push(e)}catch(e){throw e}}static RemoveConcept(e){for(var t=0;t<this.conceptsSyncArray.length;t++)this.conceptsSyncArray[t].id==e.id&&this.conceptsSyncArray.splice(t,1)}static SyncDataOnlineWithoutAuth(e,t){return m(this,arguments,void 0,function*(e,t,n=!1){return y.SyncDataOnline(e,t,n)})}static SyncDataOnline(e,t){return m(this,arguments,void 0,function*(e,t,n=!0){let o=performance.now();setTimeout(()=>{},5e3);try{if(r.serviceWorker)try{return(yield(0,r.sendMessage)("LocalSyncData__SyncDataOnline",{transactionId:e,withAuth:n})).data}catch(e){(0,r.handleServiceWorkerException)(e)}let o=[],i=[];if(e&&this.transactionCollections.some(t=>t.id==e)){const t=this.transactionCollections.find(t=>t.id==e);if(this.transactionCollections=this.transactionCollections.filter(t=>t.id!=e),this.transactionCollections=this.transactionCollections.filter(e=>new Date(e.createdDate).getTime()>(new Date).getTime()-6048e5),!t)return;o=t.data.concepts.slice(),i=t.data.connections.slice()}else Array.isArray(null==t?void 0:t.concepts)&&Array.isArray(null==t?void 0:t.connections)?(o=t.concepts.slice(),i=t.connections.slice(),this.conceptsSyncArray=this.conceptsSyncArray.filter(e=>{const n=t.concepts.some(t=>e.id==t.id||e.ghostId==t.ghostId);return n}),this.connectionSyncArray=this.connectionSyncArray.filter(e=>{const n=t.connections.some(t=>e.id==t.id||e.ghostId==t.ghostId);return n})):(o=this.conceptsSyncArray.slice()||[],i=this.connectionSyncArray.slice()||[],this.connectionSyncArray=[],this.conceptsSyncArray=[]);let u=[];for(let e=0;e<o.length;e++)u.push(o[e]),yield h.v.UpdateConceptSyncStatus(o[e].id);yield this.UpdateConceptListToIncludeRelatedConcepts(i,u);let m=yield function(e,t){return s(this,arguments,void 0,function*(e,t,n=!0){const o=r.Logger.logfunction("CreateTheGhostConceptApi",[e.length,t.length]);try{const i=1e3;let a={concepts:[],connections:[]};const s=yield d(e),u=yield d(t);if(e.length+t.length<=2*i){const e=yield c(s,u,n);return Array.isArray(null==e?void 0:e.concepts)&&(a.concepts=[...a.concepts,...e.concepts]),Array.isArray(null==e?void 0:e.connections)&&(a.connections=[...a.connections,...e.connections]),r.Logger.logUpdate(o),a}const h=l(s,i),p=l(u,i),f=[],m=[];for(let e=0;e<h.length;e++){const t=h[e];f.push(c(t,[],n))}const y=yield Promise.all(f);for(let e=0;e<y.length;e++){const t=y[e];Array.isArray(null==t?void 0:t.concepts)&&(a.concepts=[...a.concepts,...t.concepts]),Array.isArray(null==t?void 0:t.connections)&&(a.connections=[...a.connections,...t.connections])}for(let e=0;e<p.length;e++){const t=p[e];m.push(c([],t,n))}const v=yield Promise.all(m);for(let e=0;e<v.length;e++){const t=v[e];Array.isArray(null==t?void 0:t.concepts)&&(a.concepts=[...a.concepts,...t.concepts]),Array.isArray(null==t?void 0:t.connections)&&(a.connections=[...a.connections,...t.connections])}return r.Logger.logUpdate(o),a}catch(e){throw(0,a.ey)(o,"CreateTheGhostConceptApi",e),e}})}(u,i,n),y=m.concepts,v=m.connections;for(let e=0;e<y.length;e++)h.v.AddPermanentConcept(y[e]);for(let e=0;e<v.length;e++)p.G.AddPermanentConnection(v[e]);return f.a.clearAll(),o}catch(e){throw r.Logger.logError(o,"unknown",void 0,"unknown",void 0,500,e,"SyncDataOnline",[],"unknown",void 0),e}})}static ConvertGhostIdsInConnections(e){var t,n,o;for(let i=0;i<e.length;i++){let r=e[i].ofTheConceptId,a=e[i].toTheConceptId,s=e[i].typeId,c=null!==(t=y.ghostIdMap.get(r))&&void 0!==t?t:r,l=null!==(n=y.ghostIdMap.get(a))&&void 0!==n?n:a,d=null!==(o=y.ghostIdMap.get(s))&&void 0!==o?o:s;e[i].ofTheConceptId=c,e[i].toTheConceptId=l,e[i].typeId=d}}static UpdateConceptListToIncludeRelatedConcepts(e,t){return m(this,void 0,void 0,function*(){for(let n=0;n<e.length;n++){let o=e[n].ofTheConceptId,i=e[n].toTheConceptId,r=e[n].typeId;if(o<0){let i=this.CheckIfTheConceptIdExists(o,t);0==i.id&&(i=yield h.v.GetConceptByGhostId(o),0!=i.id?i.id!=i.ghostId&&(e[n].ofTheConceptId=i.id):(i=yield h.v.GetConcept(o),this.AddConceptIfDoesNotExist(i,t)))}if(i<0){let o=this.CheckIfTheConceptIdExists(i,t);0==o.id&&(o=yield h.v.GetConceptByGhostId(i),0!=o.id?o.id!=o.ghostId&&(e[n].toTheConceptId=o.id):(o=yield h.v.GetConcept(i),this.AddConceptIfDoesNotExist(o,t)))}if(r<0){let o=this.CheckIfTheConceptIdExists(r,t);0==o.id&&(o=yield h.v.GetConceptByGhostId(r),0!=o.id?o.id!=o.ghostId&&(e[n].typeId=o.id):(o=yield h.v.GetConcept(r),this.AddConceptIfDoesNotExist(o,t)))}}})}static AddConceptIfDoesNotExist(e,t=[]){let n=!1;for(let o=0;o<t.length;o++)e.ghostId==t[o].ghostId&&(n=!0);n||t.push(e)}static CheckIfTheConceptIdExists(e,t=[]){let n=(0,r.CreateDefaultLConcept)();for(let o=0;o<t.length;o++)e!=t[o].ghostId&&e!=t[o].id||(n=t[o]);return n}static AddConnection(e){this.connectionSyncArray.push(e)}static RemoveConnection(e){for(var t=0;t<this.connectionSyncArray.length;t++)this.connectionSyncArray[t].id==e.id&&this.connectionSyncArray.splice(t,1)}static RemoveConnectionById(e){for(var t=0;t<this.connectionSyncArray.length;t++)this.connectionSyncArray[t].id==e&&this.connectionSyncArray.splice(t,1)}static syncDataLocalDb(){return m(this,void 0,void 0,function*(){if(this.conceptsSyncArray.length>0){for(let e=0;e<this.conceptsSyncArray.length;e++)(0,u.kH)("localconcept",this.conceptsSyncArray[e]);this.conceptsSyncArray=[]}if(this.connectionSyncArray.length>0){for(let e=0;e<this.connectionSyncArray.length;e++)(0,u.kH)("localconnection",this.connectionSyncArray[e]);this.connectionSyncArray=[]}return"done"})}static initializeTransaction(e){return m(this,void 0,void 0,function*(){try{if(r.serviceWorker)try{return(yield(0,r.sendMessage)("LocalSyncData__initializeTransaction",{transactionId:e})).data}catch(e){(0,r.handleServiceWorkerException)(e)}if(this.transactionCollections.some(t=>t.id==e))return;this.transactionCollections.push({id:e,data:{concepts:[],connections:[]},createdDate:(new Date).toISOString()})}catch(e){}})}static markTransactionActions(e,t){return m(this,void 0,void 0,function*(){try{if(r.serviceWorker)try{return(yield(0,r.sendMessage)("LocalSyncData__markTransactionActions",{transactionId:e,actions:t})).data}catch(e){(0,r.handleServiceWorkerException)(e)}this.transactionCollections=this.transactionCollections.map(n=>n.id==e?Object.assign(Object.assign({},n),{data:JSON.parse(JSON.stringify(t))}):n),this.conceptsSyncArray=this.conceptsSyncArray.filter(e=>!t.concepts.some(t=>t.id==e.id||t.ghostId==e.id)),this.connectionSyncArray=this.connectionSyncArray.filter(e=>!t.connections.some(t=>t.id==e.id||t.ghostId==e.id))}catch(e){}})}static rollbackTransaction(e,t){return m(this,void 0,void 0,function*(){try{if(r.serviceWorker)try{return(yield(0,r.sendMessage)("LocalSyncData__rollbackTransaction",{transactionId:e,actions:t})).data}catch(e){(0,r.handleServiceWorkerException)(e)}if(this.transactionCollections.some(t=>t.id==e))return;this.transactionCollections=this.transactionCollections.filter(t=>t.id!=e)}catch(e){}})}}y.conceptsSyncArray=[],y.connectionSyncArray=[],y.ghostIdMap=new Map,y.transactionCollections=[]},680:(e,t,n)=>{t.__esModule=!0;var o=n(1581);Object.keys(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===o[e]||(t[e]=o[e]))});var i=n(4451);Object.keys(i).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===i[e]||(t[e]=i[e]))});var r=n(8500);Object.keys(r).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===r[e]||(t[e]=r[e]))})},785:(e,t,n)=>{n.d(t,{i:()=>s});var o=n(6191),i=n(2170),r=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})},a=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]])}return n};class s{static init(){return r(this,void 0,void 0,function*(){if(i.B.getValue("enableCache",!0))try{const[e,t,n]=yield Promise.all([(0,o.ou)(o.L2),(0,o.ou)(o.Ou),(0,o.ou)(o.cL)]);for(const t of e)if(t&&null!=t.id){const{id:e}=t,n=a(t,["id"]);this.widgetMap.set(e,n)}for(const e of t)if(e&&null!=e.id){const{id:t}=e,n=a(e,["id"]);this.latestMap.set(t,n)}for(const e of n)if(e&&null!=e.id){const{id:t}=e,n=a(e,["id"]);this.recentMap.set(t,n)}}catch(e){}})}static getWidget(e){var t;return i.B.getValue("enableCache",!0)&&null!==(t=this.widgetMap.get(e))&&void 0!==t?t:null}static setWidget(e,t){i.B.getValue("enableCache",!0)&&(this._isDuplicate(this.widgetMap,e,t)||(this.widgetMap.set(e,t),(0,o.eH)(o.L2,Object.assign({id:e},t)).catch(()=>{})))}static removeWidget(e){this.widgetMap.delete(e),(0,o.kM)(o.L2,e).catch(()=>{})}static getLatest(e){var t;return i.B.getValue("enableCache",!0)&&null!==(t=this.latestMap.get(e))&&void 0!==t?t:null}static setLatest(e,t){i.B.getValue("enableCache",!0)&&(this._isDuplicate(this.latestMap,e,t)||(this.latestMap.set(e,t),(0,o.eH)(o.Ou,Object.assign({id:e},t)).catch(()=>{})))}static removeLatest(e){this.latestMap.delete(e),(0,o.kM)(o.Ou,e).catch(()=>{})}static getRecent(e){var t;return i.B.getValue("enableCache",!0)&&null!==(t=this.recentMap.get(e))&&void 0!==t?t:null}static setRecent(e,t){i.B.getValue("enableCache",!0)&&(this._isDuplicate(this.recentMap,e,t)||(this.recentMap.set(e,t),(0,o.eH)(o.cL,Object.assign({id:e},t)).catch(()=>{})))}static removeRecent(e){this.recentMap.delete(e),(0,o.kM)(o.cL,e).catch(()=>{})}static clearAll(){this.widgetMap.clear(),this.latestMap.clear(),this.recentMap.clear(),Promise.all([(0,o.sg)(o.L2),(0,o.sg)(o.Ou),(0,o.sg)(o.cL)]).catch(()=>{})}static _isDuplicate(e,t,n){const o=e.get(t);return!!o&&JSON.stringify(o)===JSON.stringify(n)}}s.widgetMap=new Map,s.latestMap=new Map,s.recentMap=new Map},843:(e,t,n)=>{n.d(t,{Az:()=>f,Hi:()=>m});var o=n(8146),i=n(3026),r=n(9581),a=n(3518),s=n(8957),c=n(1863),l=n(7876),d=n(3655),u=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};var h=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};var p=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function f(e){return p(this,void 0,void 0,function*(){const t=s.Logger.logfunction("GetConceptByCharacterAndCategory",e);let n=(0,s.CreateDefaultConcept)();if("the"==e)return n.id=1,n.typeId=5,n.characterValue="the",n;let h=(0,s.SplitStrings)(e);if(h.length>1){let t=1,o=yield f(h[0]);0!=o.id&&(t=o.id),n=yield function(e,t){var n=arguments;return p(this,void 0,void 0,function*(){const o=s.Logger.logfunction("GetConceptByCharacterAndCategoryFromMemory",n);let h=yield s.ConceptsData.GetConceptByCharacterAndCategoryLocal(e,t);return 0==h.id&&(h=yield function(e,t){var n=arguments;return u(this,void 0,void 0,function*(){const o=s.Logger.logfunction("GetConceptByCharacterAndCategoryDirectApi",n);let u=(0,s.CreateDefaultConcept)();try{var h=(0,a.Xr)("application/x-www-form-urlencoded");const n=yield fetch(r.B.GetConceptByCharacterAndCategoryDirectUrl(),{method:"POST",headers:h,body:`character_value=${e}&category_id=${t}`});if(n.ok){let e=yield n.json();u=e,(0,l.K)(u).then(()=>{i.I.AddConcept(u),(0,d.kH)("concept",u).catch(()=>{})})}else(0,c.ry)(n);s.Logger.logUpdate(o)}catch(e){Error,(0,c.Mb)(e,r.B.GetConceptByCharacterAndCategoryDirectUrl()),(0,c.ey)(o,"GetConceptByCharacterAndCategoryDirectApi",e)}return u})}(e,t)),s.Logger.logUpdate(o),h})}(e,t)}else h[0]==e&&(n=yield function(e){var t=arguments;return p(this,void 0,void 0,function*(){const n=s.Logger.logfunction("GetConceptByCharacter",t);let i=yield s.ConceptsData.GetConceptByCharacterAndTypeLocal(e,51);return 0==i.id&&(i=yield(0,o.Y)(e)),s.Logger.logUpdate(n),i})}(e));return s.Logger.logUpdate(t),n})}function m(e){return p(this,void 0,void 0,function*(){let t=[];try{t=yield function(e){return h(this,void 0,void 0,function*(){let t=[];try{let n=JSON.stringify(e),o=(0,a.Xr)();const i=yield fetch(s.BaseUrl.GetTypeConceptBulk(),{method:"POST",headers:o,body:n});if(i.ok){let e=yield i.json();t=yield(0,s.GetConceptBulk)(e)}else(0,c.ry)(i)}catch(e){Error,(0,c.Mb)(e,s.BaseUrl.GetConceptByCharacterAndCategoryDirectUrl())}return t})}(e)}catch(e){}return t})}},991:(e,t,n)=>{n.d(t,{H:()=>s});var o=n(8957),i=n(3996);class r extends i.i{constructor(e,t,n,o){super(e,t,n,o),this.key="",this.value=[],this.height=1,this.key=e,this.value=t,this.leftNode=n,this.rightNode=o}addNode(e,t,n){if(null==t)return e;let o=t.leftNode,i=t.rightNode;if(t.key>e.key)t.leftNode=this.addNode(e,o,n);else{if(!(t.key<e.key))return t;t.rightNode=this.addNode(e,i,n)}t.height=1+Math.max(this.getHeight(t.leftNode),this.getHeight(t.rightNode));let r=this.getBalanceFactor(t);if(r>1&&t.leftNode){if(this.getBalanceFactor(t.leftNode)>=0){return this.rightRotate(t)}if(this.getBalanceFactor(t.leftNode)<0){return t.leftNode=this.leftRotate(t.leftNode),this.rightRotate(t)}}if(r<-1&&t.rightNode){if(this.getBalanceFactor(t.rightNode)<=0){return this.leftRotate(t)}if(this.getBalanceFactor(t.rightNode)>0){return t.rightNode=this.rightRotate(t.rightNode),this.leftRotate(t)}}return t}}var a=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class s{static CreateCompositionKey(e,t){return e}static GetConnectionByOfTheConceptAndTypeId(e,t){let n=this.CreateCompositionKey(e,t);if(this.node){let e=this.node.getFromNode(n,this.node);if(e)return e.value}return null}static addConnection(e){if(e.id>0){let t=this.CreateCompositionKey(e.ofTheConceptId,e.typeId);if(this.node){let n=this.node.getFromNode(t,this.node);if(n){let t=null==n?void 0:n.value;0==t.length&&(n.value=[]),t.includes(e.id)||t.push(e.id)}else{let n=[];n.push(e.id);let o=new r(t,n,null,null);this.addNodeToTree(o)}}else{let n=[];n.push(e.id);let o=new r(t,n,null,null);this.addNodeToTree(o)}new Event(`${t}`)}}static addNodeToTree(e){return a(this,void 0,void 0,function*(){return null==this.node?(this.node=e,(0,o.dispatchIdEvent)(e.key),this.node):(this.node=this.node.addNode(e,this.node,this.node.height),this.node)})}static removeNodeFromTree(e){return a(this,void 0,void 0,function*(){this.node&&(this.node=this.node.removeNode(this.node,e))})}}s.node=null},999:(e,t,n)=>{n.d(t,{R:()=>l});var o=n(8957),i=n(1863),r=n(6416),a=n(4711),s=n(5868),c=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function l(e){return c(this,arguments,void 0,function*(e,t=null,n=null,c=null,d=null,u=null,h=null,p=!1,f={concepts:[],connections:[]}){var m,y,v,g;const C=o.Logger.logfunction("CreateTheCompositionLocal")||{};if(o.serviceWorker){C.serviceWorker=!0;try{const i=yield(0,o.sendMessage)("CreateTheCompositionLocal",{json:e,ofTheConceptId:t,ofTheConceptUserId:n,mainKey:c,userId:d,accessId:u,sessionInformationId:h,actions:f});return(null===(y=null===(m=null==i?void 0:i.actions)||void 0===m?void 0:m.concepts)||void 0===y?void 0:y.length)&&(f.concepts=JSON.parse(JSON.stringify(i.actions.concepts))),(null===(g=null===(v=null==i?void 0:i.actions)||void 0===v?void 0:v.connections)||void 0===g?void 0:g.length)&&(f.connections=JSON.parse(JSON.stringify(i.actions.connections))),o.Logger.logUpdate(C),i.data}catch(e){(0,i.ey)(C,"CreateTheCompositionLocal",e),(0,o.handleServiceWorkerException)(e)}}let w=null!=d?d:999,T=null!=u?u:999,I=null!=h?h:999,k=null!=c?c:0,b=(0,r.u)();for(const o in e)if("string"!=typeof e[o]&&"number"!=typeof e[o])if(null==t&&null==n){let t=k,n=yield(0,s.k)(o,"",!0,w,T,I,void 0,f);b=n,t=n.id,k=n.id,yield l(e[o],n.id,n.userId,t,d,u,h,void 0,f)}else{let n=null!=t?t:999,i=k,r=yield(0,s.k)(o,"",!0,w,T,I,void 0,f);yield(0,a.F)(n,r.id,i,void 0,void 0,void 0,f),yield l(e[o],r.id,r.userId,i,d,u,h,void 0,f)}else{let n=null!=t?t:999,i=k,r=yield(0,s.k)(o,e[o].toString(),!1,w,T,I,void 0,f);yield(0,a.F)(n,r.id,i,void 0,void 0,void 0,f)}return o.Logger.logUpdate(C),b})}},1106:(e,t,n)=>{let{nanoid:o}=n(5042),{isAbsolute:i,resolve:r}=n(197),{SourceMapConsumer:a,SourceMapGenerator:s}=n(1866),{fileURLToPath:c,pathToFileURL:l}=n(2739),d=n(3614),u=n(3878),h=n(9746),p=Symbol("lineToIndexCache"),f=Boolean(a&&s),m=Boolean(r&&i);function y(e){if(e[p])return e[p];let t=e.css.split("\n"),n=new Array(t.length),o=0;for(let e=0,i=t.length;e<i;e++)n[e]=o,o+=t[e].length+1;return e[p]=n,n}class v{get from(){return this.file||this.id}constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,t.document&&(this.document=t.document.toString()),t.from&&(!m||/^\w+:\/\//.test(t.from)||i(t.from)?this.file=t.from:this.file=r(t.from)),m&&f){let e=new u(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+o(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,n,o={}){let i,r,a,s,c;if(t&&"object"==typeof t){let e=t,o=n;if("number"==typeof e.offset){s=e.offset;let o=this.fromOffset(s);t=o.line,n=o.col}else t=e.line,n=e.column,s=this.fromLineAndColumn(t,n);if("number"==typeof o.offset){a=o.offset;let e=this.fromOffset(a);r=e.line,i=e.col}else r=o.line,i=o.column,a=this.fromLineAndColumn(o.line,o.column)}else if(n)s=this.fromLineAndColumn(t,n);else{s=t;let e=this.fromOffset(s);t=e.line,n=e.col}let u=this.origin(t,n,r,i);return c=u?new d(e,void 0===u.endLine?u.line:{column:u.column,line:u.line},void 0===u.endLine?u.column:{column:u.endColumn,line:u.endLine},u.source,u.file,o.plugin):new d(e,void 0===r?t:{column:n,line:t},void 0===r?n:{column:i,line:r},this.css,this.file,o.plugin),c.input={column:n,endColumn:i,endLine:r,endOffset:a,line:t,offset:s,source:this.css},this.file&&(l&&(c.input.url=l(this.file).toString()),c.input.file=this.file),c}fromLineAndColumn(e,t){return y(this)[e-1]+t-1}fromOffset(e){let t=y(this),n=0;if(e>=t[t.length-1])n=t.length-1;else{let o,i=t.length-2;for(;n<i;)if(o=n+(i-n>>1),e<t[o])i=o-1;else{if(!(e>=t[o+1])){n=o;break}n=o+1}}return{col:e-t[n]+1,line:n+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:r(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,n,o){if(!this.map)return!1;let r,a,s=this.map.consumer(),d=s.originalPositionFor({column:t,line:e});if(!d.source)return!1;"number"==typeof n&&(r=s.originalPositionFor({column:o,line:n})),a=i(d.source)?l(d.source):new URL(d.source,this.map.consumer().sourceRoot||l(this.map.mapFile));let u={column:d.column,endColumn:r&&r.column,endLine:r&&r.line,line:d.line,url:a.toString()};if("file:"===a.protocol){if(!c)throw new Error("file: protocol is not available in this PostCSS build");u.file=c(a)}let h=s.sourceContentFor(d.source);return h&&(u.source=h),u}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}}e.exports=v,v.default=v,h&&h.registerInput&&h.registerInput(v)},1167:(e,t,n)=>{n.d(t,{Y:()=>c});var o=n(9581),i=n(3518),r=n(8957),a=n(1863),s=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function c(e){return s(this,void 0,void 0,function*(){const t=r.Logger.logfunction("CreateTheConceptApi",e);let n=(0,r.CreateDefaultConcept)();try{var s=(0,i.Xr)();const c=yield fetch(o.B.CreateTheConceptUrl(),{method:"POST",headers:s,body:JSON.stringify(e)});if(!c.ok)throw(0,a.ry)(c),new Error(`Error! status: ${c.status}`);return n=yield c.json(),r.Logger.logUpdate(t),n}catch(e){Error,(0,a.Mb)(e,o.B.CreateTheConceptUrl()),(0,a.ey)(t,"CreateTheConceptApi",e)}})}},1213:(e,t,n)=>{n.d(t,{f:()=>c});var o=n(9736),i=n(7820),r=n(8957),a=n(176),s=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function c(e){return s(this,void 0,void 0,function*(){let t=performance.now();try{if(r.serviceWorker)try{return(yield(0,r.sendMessage)("GetTheConceptLocal",{id:e})).data}catch(e){(0,r.handleServiceWorkerException)(e)}let t=(0,r.CreateDefaultLConcept)();if(e<0){if(t=yield o.v.GetConcept(e),0==t.id){let n=yield i.G.getNodeFromTree(e);if(null==n?void 0:n.value){let e=n.value;e&&(t=e)}}}else{let n=yield(0,r.GetTheConcept)(e);t=(0,a.F4)(n)}return t}catch(n){throw r.Logger.logError(t,"unknown","read","unknown",void 0,200,void 0,"GetTheConceptLocal",[e],"unknown",void 0),n}})}},1218:(e,t,n)=>{n.d(t,{A:()=>c});var o=n(8957),i=n(7282),r=n(1666),a=n(8407),s=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function c(e){return s(this,arguments,void 0,function*(e,t=null,n=null,s=null,l=null,d=null,u=null){if(o.serviceWorker)try{return(yield(0,o.sendMessage)("CreateTheComposition",{json:e,ofTheConceptId:t,ofTheConceptUserId:n,mainKey:s,userId:l,accessId:d,sessionInformationId:u})).data}catch(e){(0,o.handleServiceWorkerException)(e)}let h=null!=l?l:999,p=null!=d?d:4,f=null!=u?u:999,m=null!=s?s:0,y=(0,i.o)();for(const o in e)if("string"!=typeof e[o]&&"number"!=typeof e[o])if(null==t&&null==n){let t=m,n=yield(0,a.A)(o,"",!0,h,p,f);y=n,t=n.id,m=n.id,yield c(e[o],n.id,n.userId,t,l,d,u)}else{let i=null!=t?t:999,s=null!=n?n:999,v=m,g=yield(0,a.A)(o,"",!0,h,p,f);y=g,yield(0,r.q)(i,s,g.id,v),yield c(e[o],g.id,g.userId,v,l,d,u)}else{let i=null!=t?t:999,s=null!=n?n:10267,c=m,l=yield(0,a.A)(o,e[o].toString(),!1,h,p,f);yield(0,r.q)(i,s,l.id,c)}return y})}},1239:(e,t,n)=>{n.d(t,{I:()=>u,r:()=>d});var o=n(3026),i=n(9581),r=n(3518),a=n(1863),s=n(8957),c=n(1596),l=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function d(e){return l(this,void 0,void 0,function*(){const t=s.Logger.logfunction("GetConceptBulk",[e.length])||{};let n=[],d=((new Date).getTime(),performance.now()),u=Array.from(new Set(e));try{if(s.serviceWorker){t.serviceWorker=!0;try{const n=yield(0,s.sendMessage)("GetConceptBulk",{passedConcepts:e});if(n.data&&n.data.length>0)for(const e of n.data)o.I.AddConceptToMemory(e);return s.Logger.logUpdate(t),n.data}catch(e){(0,a.ey)(t,"GetConceptBulk",e),(0,s.handleServiceWorkerException)(e)}}if(u.length>0){let h=[];for(let e=0;e<u.length;e++)if(!o.I.GetNpc(u[e])){let t=yield o.I.GetConcept(u[e]);0==t.id?h.push(u[e]):n.push(t)}if(0==h.length)return s.Logger.logfunction(t),n;{let u;const p={method:"POST",headers:(0,r.Xr)(),body:JSON.stringify(h)};try{u=yield fetch(i.B.GetConceptBulkUrl(),p)}catch(e){u=yield(0,c.g)(p,"/api/get_concept_bulk")}yield function(e,t,n,i,r){return l(this,void 0,void 0,function*(){if(e.ok){let t=yield e.json();if(t.length>0)for(let e=0;e<t.length;e++){let i=t[e];o.I.AddConcept(i),n.push(i)}s.Logger.logUpdate(i)}else s.Logger.logError(r,"unknown","read","unknown",void 0,e.status,e,"GetConceptBulk",[t],"unknown",void 0),(0,a.ry)(e)})}(u,e,n,t,d)}}}catch(n){Error,s.Logger.logError(d,"unknown","read","unknown",void 0,500,n,"GetConceptBulk",[e],"unknown",void 0),(0,a.Mb)(n,i.B.GetConceptBulkUrl()),(0,a.ey)(t,"GetConceptBulk",n)}return n})}function u(e){return l(this,void 0,void 0,function*(){const t=[];if(e.length>0){const n={"Content-Type":"application/json"};try{const r=yield fetch(i.B.GetConceptBulkUrl(),{method:"POST",headers:n,body:JSON.stringify(e)});if(r.ok){const e=yield r.json();if(e.length>0)for(let n=0;n<e.length;n++){const i=e[n];t.push(i),o.I.AddConcept(i)}}else(0,a.ry)(r)}catch(e){Error,(0,a.Mb)(e,i.B.GetConceptBulkUrl())}}return t})}},1320:(e,t,n)=>{n.d(t,{zl:()=>v,b6:()=>w,e$:()=>I,y6:()=>T,rq:()=>k,yV:()=>g,_W:()=>C});var o=n(8957),i=n(6687);function r(e){return e.startsWith("the_")?e.slice(4):e}var a=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function s(e,t,n){return a(this,void 0,void 0,function*(){var i,r,a,s,c,l,d,u;let h=[];for(let t=0;t<e.length;t++)h.push(e[t].toTheConceptId),h.push(e[t].ofTheConceptId),h.push(e[t].typeId);for(let h=0;h<e.length;h++){let p=!1;n.includes(e[h].id)&&(p=!0);let f=yield(0,o.GetTheConcept)(e[h].ofTheConceptId),m=yield(0,o.GetTheConcept)(e[h].toTheConceptId);if(1==p&&0!=f.id&&0!=m.id){let n,c=null!==(r=null===(i=m.type)||void 0===i?void 0:i.characterValue)&&void 0!==r?r:"self";e[h].toTheConceptId in t?n=t[e[h].toTheConceptId]:(n={},n[c]={},t[e[h].toTheConceptId]=n);let l=yield(0,o.GetTheConcept)(e[h].typeId);try{let e=null!==(s=null===(a=null==f?void 0:f.type)||void 0===a?void 0:a.characterValue)&&void 0!==s?s:"none",n=f.characterValue;l.characterValue;l.characterValue.includes("_s_")&&(f.id in t||(t[f.id]={}),t[f.id][e]=n),t[m.id]={}}catch(e){}}if(0!=f.id&&0!=m.id){let n,i=null!==(l=null===(c=f.type)||void 0===c?void 0:c.characterValue)&&void 0!==l?l:"self";e[h].ofTheConceptId in t?n=t[e[h].ofTheConceptId]:(n={},n[i]={},t[e[h].ofTheConceptId]=n);let r=yield(0,o.GetTheConcept)(e[h].typeId);try{let e=null!==(u=null===(d=null==m?void 0:m.type)||void 0===d?void 0:d.characterValue)&&void 0!==u?u:"none",n=m.characterValue;r.characterValue.includes("_s_")&&(m.id in t||(t[m.id]={}),t[m.id][e]=n),t[f.id]={}}catch(e){}}}return t})}var c=n(5312),l=n(7876),d=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function u(e,t,n){if(e in t){let o=t[e];if(o){n[o.connectionType+"_count"]=o.count}}}var h=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};var p=n(4698),f=n(6915),m=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};var y=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function v(e,t){return y(this,arguments,void 0,function*(e,t,n=""){let r=yield(0,o.SearchWithTypeAndLinkerApi)(e,t,n),a=r.compositionIds,s=r.internalConnections,l=r.linkers,d=r.reverse,u=r.mainCompositionIds,h=yield(0,i.QL)(l),p=yield(0,i.MT)(a,s);return yield(0,c.NK)(h,p,u,d)})}function g(e,t,n,o,r){return y(this,void 0,void 0,function*(){let a=yield(0,i.QL)(e),s=yield(0,i.rv)(t,n);return yield(0,c.Ve)(a,s,t,o,r)})}function C(e,t,n,o,r){return y(this,void 0,void 0,function*(){let a=yield(0,i.QL)(e),s=yield(0,i.D)(t,n);return yield(0,c.NK)(a,s,o,r)})}function w(e,t,n,c,l){return y(this,void 0,void 0,function*(){if(o.serviceWorker)try{return(yield(0,o.sendMessage)("formatConnections",{linkers:e,conceptIds:t,mainCompositionIds:n,reverse:c,countInfos:l})).data}catch(e){(0,o.handleServiceWorkerException)(e)}let d=yield(0,i.QL)(e);d=(0,f.X)(d);let u=[];u=yield s(d,u,c),u=yield function(e,t,n){return a(this,void 0,void 0,function*(){var i,a,s,c,l,d,u,h;let p=[];for(let t=0;t<e.length;t++)p.push(e[t].toTheConceptId),p.push(e[t].ofTheConceptId),p.push(e[t].typeId);e.sort(function(e,t){return t.id-e.id});for(let p=0;p<e.length;p++){let f=!1;n.includes(e[p].id)&&(f=!0);let m=yield(0,o.GetTheConcept)(e[p].ofTheConceptId),y=yield(0,o.GetTheConcept)(e[p].toTheConceptId);if(1==f&&0!=m.id&&0!=y.id){let n,l=null!==(a=null===(i=y.type)||void 0===i?void 0:i.characterValue)&&void 0!==a?a:"self";e[p].toTheConceptId in t?(n=t[e[p].toTheConceptId],l in n||(n[l]={})):(n={},n[l]={},t[e[p].toTheConceptId]=n);let d=yield(0,o.GetTheConcept)(e[p].typeId);try{let e=null!==(c=null===(s=null==m?void 0:m.type)||void 0===s?void 0:s.characterValue)&&void 0!==c?c:"none",t=m.characterValue,o=d.characterValue;""==o&&(o=e,o=r(o));let i={[e]:t},a=o+"_reverse";d.characterValue.includes("_s_")||("string"==typeof n[l]&&(n[l]={}),n[l][a]=i)}catch(e){}}if(0!=m.id&&0!=y.id){let n,i=null!==(d=null===(l=m.type)||void 0===l?void 0:l.characterValue)&&void 0!==d?d:"self";e[p].ofTheConceptId in t?(n=t[e[p].ofTheConceptId],i in n||(n[i]={})):(n={},n[i]={},t[e[p].ofTheConceptId]=n);let a=yield(0,o.GetTheConcept)(e[p].typeId);try{let e=null!==(h=null===(u=null==y?void 0:y.type)||void 0===u?void 0:u.characterValue)&&void 0!==h?h:"none",t=y.characterValue,o=a.characterValue,s=(a.characterValue,!1);""==o&&(o=e,o=r(o),s=!0);let c={[e]:t};isNaN(Number(o))?a.characterValue.includes("_s_")||("string"==typeof n[i]&&(n[i]={}),n[i][o]=s?t:c):(Array.isArray(n[i])||(n[i]=[]),n[i].push(t))}catch(e){}}}return t})}(d,u,c);let h=yield function(e,t,n,i){return a(this,arguments,void 0,function*(e,t,n,i,r=[]){var a,s,c,l,d,u;let h=[],p=[];for(let t=0;t<e.length;t++)p.push(e[t].toTheConceptId),p.push(e[t].ofTheConceptId),p.push(e[t].typeId);e.sort(function(e,t){return t.id-e.id});for(let n=0;n<e.length;n++){let i=!1;r.includes(e[n].id)&&(i=!0);let h=yield(0,o.GetTheConcept)(e[n].ofTheConceptId),p=yield(0,o.GetTheConcept)(e[n].toTheConceptId);if(1==i&&0!=h.id&&0!=p.id&&p.id in t){let i,r=null!==(s=null===(a=p.type)||void 0===a?void 0:a.characterValue)&&void 0!==s?s:"self";e[n].toTheConceptId in t?i=t[e[n].toTheConceptId]:(i={},i[r]={},t[e[n].toTheConceptId]=i);let c=yield(0,o.GetTheConcept)(e[n].typeId);try{let o=c.characterValue+"_reverse",a=t[e[n].ofTheConceptId];a&&(Array.isArray(i[r][o])?i[r][o].push(a):c.characterValue.includes("_s_")?(i[r][o]=[],i[r][o].push(a)):i[r][o]=a)}catch(e){}}if(0!=h.id&&0!=p.id&&h.id in t){let i,r=null!==(l=null===(c=h.type)||void 0===c?void 0:c.characterValue)&&void 0!==l?l:"self";e[n].ofTheConceptId in t?(i=t[e[n].ofTheConceptId],"string"==typeof i[r]&&(i[r]={})):(i={},i[r]={},t[e[n].ofTheConceptId]=i);let a=!1,s=(yield(0,o.GetTheConcept)(e[n].typeId)).characterValue;""==s&&(s=p.characterValue,a=!0),""==s&&(s=null!==(u=null===(d=null==p?void 0:p.type)||void 0===d?void 0:d.characterValue)&&void 0!==u?u:"");try{let o=t[e[n].toTheConceptId];o&&(Array.isArray(i[r])?a?i[r].push(o[s]):i[r].push(o):Array.isArray(i[r][s])?i[r][s].push(o):s.includes("_s_")?(i[r][s]=[],a?i[r][s].push(o[s]):i[r][s].push(o)):i[r][s]=a?o[s]:o)}catch(e){}}}for(let e=0;e<n.length;e++){let i=t[n[e]];i?(i.id=n[e],h.push(i)):0!=(yield o.ConceptsData.GetConcept(n[e])).id&&(i={},i.id=n[e],h.push(i))}return h})}(d,u,n,[],c);return h})}function T(e,t,n,a,c){return y(this,arguments,void 0,function*(e,t,n,a,c,h="DESC"){if(o.serviceWorker)try{return(yield(0,o.sendMessage)("formatConnectionsJustId",{linkers:e,conceptIds:t,mainCompositionIds:n,reverse:a,countInfos:c,order:h})).data}catch(e){(0,o.handleServiceWorkerException)(e)}let m=yield(0,i.QL)(e),y=yield(0,p.V)(c);m=(0,f.X)(m,h);let v=[];v=yield s(m,v,a),v=yield function(e,t){return d(this,arguments,void 0,function*(e,t,n=[]){var o,i,a,s,c,d,u,h;let p=[];for(let t=0;t<e.length;t++)p.push(e[t].toTheConceptId),p.push(e[t].ofTheConceptId),p.push(e[t].typeId);for(let p=0;p<e.length;p++){let f=!1,m=yield(0,l.A)(e[p].ofTheConceptId),y=yield(0,l.A)(e[p].toTheConceptId);if(n.includes(e[p].id)&&(f=!0),1==f&&0!=m.id&&0!=y.id){let n,c=yield(0,l.A)(e[p].typeId),d=null!==(i=null===(o=y.type)||void 0===o?void 0:o.characterValue)&&void 0!==i?i:"self";e[p].toTheConceptId in t?(n=t[e[p].toTheConceptId],d in n||(n[d]={})):(n={},n[d]={},t[e[p].toTheConceptId]=n);try{let t=null!==(s=null===(a=null==m?void 0:m.type)||void 0===a?void 0:a.characterValue)&&void 0!==s?s:"none",o=m.characterValue,i=c.characterValue;""==i&&(i=t,i=r(i));let l={id:m.id,[t]:o,created_on:e[p].entryTimeStamp},u=i+"_reverse";u.includes("_s_")||("string"==typeof n[d]&&(n[d]={}),n[d][u]=l)}catch(e){}}if(0!=m.id&&0!=y.id){let n,o=yield(0,l.A)(e[p].typeId),i=null!==(d=null===(c=m.type)||void 0===c?void 0:c.characterValue)&&void 0!==d?d:"self";e[p].ofTheConceptId in t?(n=t[e[p].ofTheConceptId],i in n||(n[i]={})):(n={},n[i]={},t[e[p].ofTheConceptId]=n);try{let t=null!==(h=null===(u=null==y?void 0:y.type)||void 0===u?void 0:u.characterValue)&&void 0!==h?h:"none",a=y.characterValue,s=o.characterValue,c=!1;""==s&&(s=t,s=r(s),c=!0);let l={};l[t]={id:y.id,data:a,created_on:e[p].entryTimeStamp},isNaN(Number(s))?s.includes("_s_")||("string"==typeof n[i]&&(n[i]={}),n[i][s]=c?l[t]:l):(Array.isArray(n[i])||(n[i]=[]),n[i].push(l[t]))}catch(e){}}}return t})}(m,v,a);let g=yield function(e,t,n){return d(this,arguments,void 0,function*(e,t,n,i=[],r){var a,s,c,d,h,p,f;(new Date).getTime();let m=[],y=[];for(let t=0;t<e.length;t++)y.push(e[t].toTheConceptId),y.push(e[t].ofTheConceptId),y.push(e[t].typeId);for(let n=0;n<e.length;n++){let o=!1,m=yield(0,l.A)(e[n].ofTheConceptId),y=yield(0,l.A)(e[n].toTheConceptId);if(i.includes(e[n].id)&&(o=!0),1==o&&0!=m.id&&0!=y.id&&y.id in t){let o,i=yield(0,l.A)(e[n].typeId),r=null!==(s=null===(a=y.type)||void 0===a?void 0:a.characterValue)&&void 0!==s?s:"self",c=!1;e[n].toTheConceptId in t&&(c=!0),e[n].toTheConceptId in t?(o=t[e[n].toTheConceptId],"string"==typeof o[r]&&(o[r]={})):(o={},o[r]={},t[e[n].toTheConceptId]=o);try{if(t[e[n].ofTheConceptId]){let a=t[e[n].ofTheConceptId];a&&(a.id=m.id,a.created_on=m.entryTimeStamp);let s=i.characterValue+"_reverse";Array.isArray(o[r][s])?o[r][s].push(a):s.includes("_s_")?(o[r][s]=[],o[r][s].push(a)):o[r][s]=a}}catch(e){}}if(0!=m.id&&0!=y.id&&m.id in t){let o,i=yield(0,l.A)(e[n].typeId),a=null!==(d=null===(c=m.type)||void 0===c?void 0:c.characterValue)&&void 0!==d?d:"self",s=!1;e[n].toTheConceptId in t&&(s=!0),e[n].ofTheConceptId in t?(o=t[e[n].ofTheConceptId],"string"==typeof o[a]&&(o[a]={})):(o={},o[a]={},t[e[n].ofTheConceptId]=o),u(m.id,r,o);let v=!1,g=i.characterValue;""==g&&(g=y.characterValue,v=!0),""==g&&(g=(null===(h=null==y?void 0:y.type)||void 0===h?void 0:h.characterValue)||"");try{let i=null!==(f=null===(p=null==y?void 0:y.type)||void 0===p?void 0:p.characterValue)&&void 0!==f?f:"none",s=t[e[n].toTheConceptId];if(s){let t={};t[i]={data:s[i],id:y.id,created_on:e[n].entryTimeStamp},Array.isArray(o[a])?v?o[a].push(s[g]):o[a].push(s):Array.isArray(o[a][g])?o[a][g].push(t):g.includes("_s_")?(o[a][g]=[],v?o[a][g].push(t[i]):o[a][g].push(t)):o[a][g]=v?t[i]:t,u(y.id,r,t)}}catch(e){}}}for(let e=0;e<n.length;e++){let i={};i=t[n[e]],i?i.id=n[e]:0!=(yield o.ConceptsData.GetConcept(n[e])).id&&(i={},i.id=n[e]),m.push(i)}return m})}(m,v,n,a,y);return g})}function I(e,t,n,a,s){return y(this,arguments,void 0,function*(e,t,n,a,s,c="DESC"){try{if(o.serviceWorker)try{return(yield(0,o.sendMessage)("formatConnectionsDataId",{linkers:e,conceptIds:t,mainCompositionIds:n,reverse:a,countInfos:s,order:c})).data}catch(e){(0,o.handleServiceWorkerException)(e)}let l,d;try{l=yield(0,i.QL)(e)}catch(e){throw new Error(`Failed to prefetch connections: ${e instanceof Error?e.message:String(e)}`)}try{d=yield(0,p.V)(s)}catch(e){throw new Error(`Failed to get connection type for count: ${e instanceof Error?e.message:String(e)}`)}try{l=(0,f.X)(l,c)}catch(e){throw new Error(`Failed to order connections: ${e instanceof Error?e.message:String(e)}`)}let m,y=[],v=[];try{y=yield function(e,t){var n=arguments;return h(this,arguments,void 0,function*(e,t,i=[]){var r,a,s,c,l,d,u,h;try{const p=o.Logger.logfunction("FormatFunctionData",n);let f=[];for(let t=0;t<e.length;t++)f.push(e[t].toTheConceptId),f.push(e[t].ofTheConceptId),f.push(e[t].typeId);for(let n=0;n<e.length;n++)try{let p=!1,f=yield(0,o.GetTheConcept)(e[n].ofTheConceptId),m=yield(0,o.GetTheConcept)(e[n].toTheConceptId);if(i.includes(e[n].id)&&(p=!0),1==p&&0!=f.id&&0!=m.id){let i,l=yield(0,o.GetTheConcept)(e[n].typeId),d=null!==(a=null===(r=m.type)||void 0===r?void 0:r.characterValue)&&void 0!==a?a:"self";e[n].toTheConceptId in t?i=t[e[n].toTheConceptId]:(i={},i[d]={},t[e[n].toTheConceptId]=i);try{let e=null!==(c=null===(s=null==f?void 0:f.type)||void 0===s?void 0:s.characterValue)&&void 0!==c?c:"none",n=f.characterValue;(l.characterValue+"_reverse").includes("_s_")&&(f.id in t||(t[f.id]={}),t[f.id][e]=n),t[m.id]={}}catch(e){}}if(0!=f.id&&0!=m.id){let i,r=yield(0,o.GetTheConcept)(e[n].typeId),a=null!==(d=null===(l=f.type)||void 0===l?void 0:l.characterValue)&&void 0!==d?d:"self";e[n].ofTheConceptId in t?i=t[e[n].ofTheConceptId]:(i={},i[a]={},t[e[n].ofTheConceptId]=i);try{let e=null!==(h=null===(u=null==m?void 0:m.type)||void 0===u?void 0:u.characterValue)&&void 0!==h?h:"none",n=m.characterValue;r.characterValue.includes("_s_")&&(m.id in t||(t[m.id]={}),t[m.id][e]=n),t[f.id]={}}catch(e){}}}catch(e){}return o.Logger.logUpdate(p),t}catch(e){throw e}})}(l,y,a)}catch(e){throw new Error(`Failed to format function data: ${e instanceof Error?e.message:String(e)}`)}try{y=yield function(e,t){var n=arguments;return h(this,arguments,void 0,function*(e,t,i=[]){var a,s,c,l,d,u,h,p;try{const f=o.Logger.logfunction("FormatFunctionDataForData",n);let m=[];for(let t=0;t<e.length;t++)m.push(e[t].toTheConceptId),m.push(e[t].ofTheConceptId),m.push(e[t].typeId);for(let n=0;n<e.length;n++)try{let f=!1,m=yield(0,o.GetTheConcept)(e[n].ofTheConceptId),y=yield(0,o.GetTheConcept)(e[n].toTheConceptId);if(i.includes(e[n].id)&&(f=!0),1==f&&0!=m.id&&0!=y.id){let i,d=yield(0,o.GetTheConcept)(e[n].typeId),u=null!==(s=null===(a=y.type)||void 0===a?void 0:a.characterValue)&&void 0!==s?s:"self";e[n].toTheConceptId in t?(i=t[e[n].toTheConceptId],u in i||(i[u]={})):(i={},i[u]={},t[e[n].toTheConceptId]=i);try{let e=null!==(l=null===(c=null==m?void 0:m.type)||void 0===c?void 0:c.characterValue)&&void 0!==l?l:"none",t=m.characterValue,n=d.characterValue;""==n&&(n=e,n=r(n));let o={id:m.id,data:{[e]:t}},a=n+"_reverse";a.includes("_s_")||("string"==typeof i[u]&&(i[u]={}),i[u][a]=o)}catch(e){}}if(0!=m.id&&0!=y.id){let i,a=yield(0,o.GetTheConcept)(e[n].typeId),s=null!==(u=null===(d=m.type)||void 0===d?void 0:d.characterValue)&&void 0!==u?u:"self";e[n].ofTheConceptId in t?(i=t[e[n].ofTheConceptId],s in i||(i[s]={})):(i={},i[s]={},t[e[n].ofTheConceptId]=i);try{let e=null!==(p=null===(h=null==y?void 0:y.type)||void 0===h?void 0:h.characterValue)&&void 0!==p?p:"none",t=y.characterValue,n=a.characterValue,o=!1;""==n&&(n=e,n=r(n),o=!0);let c={id:y.id,data:{[e]:t}};isNaN(Number(n))?n.includes("_s_")||("string"==typeof i[s]&&(i[s]={}),i[s][n]=c):(Array.isArray(i[s])||(i[s]=[]),i[s].push(c))}catch(e){}}}catch(e){}return o.Logger.logUpdate(f),t}catch(e){throw e}})}(l,y,a)}catch(e){throw new Error(`Failed to format function data for data: ${e instanceof Error?e.message:String(e)}`)}try{m=yield function(e,t,n,i){var r=arguments;return h(this,arguments,void 0,function*(e,t,n,i,a=[],s){var c,l,d,h,p,f;try{const n=o.Logger.logfunction("FormatFromConnectionsAlteredArrayExternal",r);let m=[],y=[];for(let t=0;t<e.length;t++)y.push(e[t].toTheConceptId),y.push(e[t].ofTheConceptId),y.push(e[t].typeId);for(let n=0;n<e.length;n++)try{let i=!1,r=yield(0,o.GetTheConcept)(e[n].ofTheConceptId),m=yield(0,o.GetTheConcept)(e[n].toTheConceptId);if(a.includes(e[n].id)&&(i=!0),1==i&&0!=r.id&&0!=m.id&&m.id in t){let i,a=yield(0,o.GetTheConcept)(e[n].typeId),d=null!==(l=null===(c=m.type)||void 0===c?void 0:c.characterValue)&&void 0!==l?l:"self",h=!1;e[n].toTheConceptId in t&&(h=!0),e[n].toTheConceptId in t?(i=t[e[n].toTheConceptId],"string"==typeof i[d]&&(i[d]={})):(i={},i[d]={},t[e[n].toTheConceptId]=i),u(m.id,s,i);try{if(t[e[n].ofTheConceptId]){let o={id:r.id,data:t[e[n].ofTheConceptId],created_on:e[n].entryTimeStamp},s=a.characterValue+"_reverse";Array.isArray(i[d][s])?i[d][s].push(o):s.includes("_s_")?(i[d][s]=[],i[d][s].push(o)):i[d][s]=o}}catch(e){}}if(0!=r.id&&0!=m.id&&r.id in t){let i,a=yield(0,o.GetTheConcept)(e[n].typeId),c=null!==(h=null===(d=r.type)||void 0===d?void 0:d.characterValue)&&void 0!==h?h:"self",l=!1;e[n].toTheConceptId in t&&(l=!0),e[n].ofTheConceptId in t?(i=t[e[n].ofTheConceptId],"string"==typeof i[c]&&(i[c]={})):(i={},i[c]={},t[e[n].ofTheConceptId]=i),u(r.id,s,i);let y=!0,v=a.characterValue;""==v&&(v=m.characterValue,y=!0),""==v&&(v=(null===(p=null==m?void 0:m.type)||void 0===p?void 0:p.characterValue)||"");try{null===(f=null==m?void 0:m.type)||void 0===f?void 0:f.characterValue;let o=t[e[n].toTheConceptId];if(o){let r={id:m.id,data:t[e[n].toTheConceptId],created_on:e[n].entryTimeStamp};Array.isArray(i[c])?i[c].push(o):Array.isArray(i[c][v])?i[c][a.characterValue].push(r):v.includes("_s_")?(i[c][v]=[],i[c][v].push(r)):i[c][v]=r,u(m.id,s,r)}}catch(e){}}}catch(e){}for(let e=0;e<i.length;e++)try{let n={};n.id=i[e];let r=yield(0,o.GetTheConcept)(n.id);n.data=t[i[e]],n.created_on=r.entryTimeStamp,m.push(n)}catch(e){}return o.Logger.logUpdate(n),m}catch(e){throw e}})}(l,y,v,n,a,d)}catch(e){throw new Error(`Failed to format from connections altered array external: ${e instanceof Error?e.message:String(e)}`)}return m}catch(e){throw e}})}function k(e,t,n,a,s){return y(this,arguments,void 0,function*(e,t,n,a,s,c="DESC"){if(o.serviceWorker)try{return(yield(0,o.sendMessage)("formatConnectionsV2",{linkers:e,conceptIds:t,mainCompositionIds:n,reverse:a,countInfos:s,order:c})).data}catch(e){(0,o.handleServiceWorkerException)(e)}let l=yield(0,i.QL)(e),d=yield(0,p.V)(s);l=(0,f.X)(l,c);let h={};h=yield function(e){var t=arguments;return m(this,arguments,void 0,function*(e,n={},i=[]){var r,a,s,c,l;const d=o.Logger.logfunction("FormatFunctionDataV2",t);for(const t of e){const e=i.includes(t.id),d=yield(0,o.GetTheConcept)(t.ofTheConceptId),u=yield(0,o.GetTheConcept)(t.toTheConceptId),h=yield(0,o.GetTheConcept)(t.typeId);if(0===d.id||0===u.id)continue;const p=e?u:d,f=e?d:u,m=null!==(a=null===(r=p.type)||void 0===r?void 0:r.characterValue)&&void 0!==a?a:"self",y=null!==(c=null===(s=f.type)||void 0===s?void 0:s.characterValue)&&void 0!==c?c:"none",v=f.characterValue;null===(l=h.characterValue)||void 0===l||l.includes("_s_"),n[p.id]||(n[p.id]={}),n[p.id][m]||(n[p.id][m]={}),n[f.id]||(n[f.id]={}),n[f.id][y]=v}return o.Logger.logUpdate(d),n})}(l,h,a),h=yield function(e){var t=arguments;return m(this,arguments,void 0,function*(e,n={},i=[]){var a,s,c,l,d;const u=o.Logger.logfunction("FormatFunctionDataForDataV2",t);for(const t of e){const e=i.includes(t.id),u=yield(0,o.GetTheConcept)(t.ofTheConceptId),h=yield(0,o.GetTheConcept)(t.toTheConceptId),p=yield(0,o.GetTheConcept)(t.typeId);if(0===u.id||0===h.id)continue;const f=e?h:u,m=e?u:h,y=null!==(s=null===(a=f.type)||void 0===a?void 0:a.characterValue)&&void 0!==s?s:"self",v=null!==(l=null===(c=m.type)||void 0===c?void 0:c.characterValue)&&void 0!==l?l:"none",g=m.characterValue,C=null!==(d=p.characterValue)&&void 0!==d?d:"";let w=""===C?r(v):C;const T=w.includes("_s_"),I=!isNaN(Number(w)),k={id:m.id,data:{[v]:g}};n[f.id]||(n[f.id]={}),y in n[f.id]&&"string"!=typeof n[f.id][y]||(n[f.id][y]=I?[]:{});try{if(T)continue;I?n[f.id][y].push(k):n[f.id][y][e?`${w}_reverse`:w]=k}catch(e){}}return o.Logger.logUpdate(u),n})}(l,h,a);let y=yield function(e,t,n){var i=arguments;return m(this,arguments,void 0,function*(e,t,n,r=[],a){var s,c,l;const d=o.Logger.logfunction("FormatFromConnectionsAlteredArrayExternal",i),h=[];for(const n of e){const e=r.includes(n.id),i=yield(0,o.GetTheConcept)(n.ofTheConceptId),d=yield(0,o.GetTheConcept)(n.toTheConceptId),h=yield(0,o.GetTheConcept)(n.typeId);if(0===i.id||0===d.id)continue;const p=e?d:i,f=e?i:d,m=p.id,y=f.id,v=null!==(c=null===(s=p.type)||void 0===s?void 0:s.characterValue)&&void 0!==c?c:"self",g=h.characterValue+"_reverse",C=h.characterValue||f.characterValue||(null===(l=f.type)||void 0===l?void 0:l.characterValue)||"";if(t[m]){const o=t[m][v],i=t[y],r={id:f.id,data:i,created_on:n.entryTimeStamp};u(m,a,t[m]);try{e?Array.isArray(o[g])?o[g].push(r):o[g]=[r]:Array.isArray(o)?o.push(i):Array.isArray(o[C])?o[C].push(r):C.includes("_s_")?(o[C]=[],o[C].push(r)):o[C]=[r],u(y,a,r)}catch(e){}}}for(const e of n){const n=yield(0,o.GetTheConcept)(e);h.push({id:e,data:t[e],created_on:n.entryTimeStamp})}return o.Logger.logUpdate(d),h})}(l,h,n,a,d);return y})}},1412:(e,t,n)=>{function o(e=[],t=[]){}n.d(t,{e:()=>o})},1534:(e,t,n)=>{let o=n(7793),i=n(1752);class r extends o{get selectors(){return i.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n)}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}}e.exports=r,r.default=r,o.registerRule(r)},1557:(e,t)=>{t.__esModule=!0,t.default=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];for(;n.length>0;){var i=n.shift();e[i]||(e[i]={}),e=e[i]}},e.exports=t.default},1581:(e,t)=>{t.__esModule=!0,t.UNIVERSAL=t.TAG=t.STRING=t.SELECTOR=t.ROOT=t.PSEUDO=t.NESTING=t.ID=t.COMMENT=t.COMBINATOR=t.CLASS=t.ATTRIBUTE=void 0;t.TAG="tag";t.STRING="string";t.SELECTOR="selector";t.ROOT="root";t.PSEUDO="pseudo";t.NESTING="nesting";t.ID="id";t.COMMENT="comment";t.COMBINATOR="combinator";t.CLASS="class";t.ATTRIBUTE="attribute";t.UNIVERSAL="universal"},1596:(e,t,n)=>{n.d(t,{g:()=>a});var o=n(8957),i=n(4024),r=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function a(e,t){return r(this,void 0,void 0,function*(){if("undefined"!=typeof self&&"undefined"!=typeof ServiceWorkerGlobalScope&&self instanceof ServiceWorkerGlobalScope)throw new Error("Cannot switch server from service worker");try{!function(){const e=o.BaseUrl.NODE_CACHE_URL;let t=o.BaseUrl.BASE_APPLICATION+"_cacheServers";if(e===o.BaseUrl.BASE_URL)throw new Error("Base Server Down");let n=sessionStorage.getItem(t);n=JSON.parse(n);const r=n.indexOf(e);if(o.BaseUrl.isNearestCache=!1,n.includes(e)&&-1!==r&&n.splice(r,1),sessionStorage.setItem(t,JSON.stringify(n)),n.length){const e=n[0];o.BaseUrl.NODE_CACHE_URL=e}else o.BaseUrl.NODE_CACHE_URL=o.BaseUrl.BASE_URL;navigator.serviceWorker&&navigator.serviceWorker.controller&&(0,o.sendMessage)("SESSION_DATA",{type:"SESSION_DATA",data:o.BaseUrl.NODE_CACHE_URL,session:i.b.sessionId})}();try{return yield fetch(`${o.BaseUrl.NODE_CACHE_URL}${t}`,e)}catch(n){return yield a(e,t)}}catch(e){throw e}})}},1666:(e,t,n)=>{n.d(t,{q:()=>a});var o=n(2155),i=n(442),r=n(1863);function a(e,t,n,a){var s=t,c=new o.N(0,e,n,s,a,1,4);if(e==n)return c.ofTheConceptId=0,c.toTheConceptId=1,c;try{c.isTemp=!0,c.id=Math.floor(1e8*Math.random()),i.Y.AddConnection(c)}catch(e){(0,r.Mb)(e)}return c}},1669:(e,t,n)=>{t.__esModule=!0,t.default=void 0;var o,i=(o=n(3295))&&o.__esModule?o:{default:o},r=n(1581);function a(e,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},a(e,t)}var s=function(e){var t,n;function o(t){var n;return(n=e.call(this,t)||this).type=r.UNIVERSAL,n.value="*",n}return n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,a(t,n),o}(i.default);t.default=s,e.exports=t.default},1704:(e,t,n)=>{t.__esModule=!0,t.default=void 0;var o,i=(o=n(4646))&&o.__esModule?o:{default:o},r=n(1581);function a(e,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},a(e,t)}var s=function(e){var t,n;function o(t){var n;return(n=e.call(this,t)||this).type=r.COMBINATOR,n}return n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,a(t,n),o}(i.default);t.default=s,e.exports=t.default},1735:(e,t,n)=>{n.d(t,{J:()=>s});var o,i=n(8957),r=n(4024),a=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class s{static incrementConcept(e){try{e&&(this.conceptsData[e]=(this.conceptsData[e]||0)+1)}catch(e){}}static incrementConnection(e){try{e&&(this.connectionsData[e]=(this.connectionsData[e]||0)+1)}catch(e){}}static getTopConcepts(e){return Object.entries(this.conceptsData).map(([e,t])=>[parseInt(e),t]).sort((e,t)=>t[1]-e[1]).slice(0,e)}static getTopConnections(e){return Object.entries(this.connectionsData).map(([e,t])=>[parseInt(e),t]).sort((e,t)=>t[1]-e[1]).slice(0,e)}static saveDataToLocalStorage(){const e={concepts:this.conceptsData,connections:this.connectionsData};null===localStorage||void 0===localStorage||localStorage.setItem(this.accessData,JSON.stringify(e))}static loadDataFromLocalStorage(){const e=null===localStorage||void 0===localStorage?void 0:localStorage.getItem(this.accessData);if(e){const t=JSON.parse(e);this.conceptsData=t.concepts||{},this.connectionsData=t.connections||{}}}static sendToServer(){return a(this,void 0,void 0,function*(){try{yield this.syncToServer()}catch(e){}})}static syncToServer(){return a(this,void 0,void 0,function*(){try{if(!Object.keys(this.conceptsData).length&&!Object.keys(this.connectionsData).length)return;const e=r.b.BearerAccessToken;if(!e)return;const t=this.conceptsData&&Object.keys(this.conceptsData).length>0?this.conceptsData:{},n=this.connectionsData&&Object.keys(this.connectionsData).length>0?this.connectionsData:{},o=yield fetch(i.BaseUrl.PostPrefetchConceptConnections(),{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify({concepts:t,connections:n})});if(!o.ok)throw new Error("Failed to sync data to the server.");yield o.json(),this.conceptsData={},this.connectionsData={},this.setNextSyncTime()}catch(e){}})}static setNextSyncTime(){this.nextSyncTime=Date.now()+this.SYNC_INTERVAL_MS}static startAutoSync(){setInterval(()=>{const e=Date.now();this.nextSyncTime&&e>=this.nextSyncTime&&this.syncNow().catch(console.error)},6e4)}static syncNow(){return a(this,void 0,void 0,function*(){try{this.activateStatus&&(yield this.syncToServer())}catch(e){}})}static GetSuggestedConcepts(e){return a(this,void 0,void 0,function*(){try{const t=r.b.BearerAccessToken,n=new URL(i.BaseUrl.GetSuggestedConcepts());void 0!==e&&n.searchParams.append("top",e.toString());const o=yield fetch(n.toString(),{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}});if(!o.ok){const e=yield o.text();throw new Error(`Failed to load concepts: ${o.status} ${o.statusText}. Details: ${e}`)}const a=(yield o.json())||[];return yield this.addConceptToBinaryTree(a.data),a}catch(e){throw e instanceof Error?new Error("Unable to fetch suggested concepts. Please try again later."):new Error("An unexpected error occurred while fetching suggested concepts.")}})}static GetSuggestedConnections(e){return a(this,void 0,void 0,function*(){try{const t=r.b.BearerAccessToken,n=new URL(i.BaseUrl.GetSuggestedConnections());void 0!==e&&n.searchParams.append("top",e.toString());const o=yield fetch(n.toString(),{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}});if(!o.ok){const e=yield o.text();throw new Error(`Failed to load connections: ${o.status} ${o.statusText}. Details: ${e}`)}const a=(yield o.json())||[];return yield this.addConnectionToBinaryTree(a.data),a}catch(e){throw e instanceof Error?new Error("Unable to fetch suggested connections. Please try again later."):new Error("An unexpected error occurred while fetching suggested Connections.")}})}static addConceptToBinaryTree(e){return a(this,void 0,void 0,function*(){try{e.forEach(e=>{i.ConceptsData.AddConcept(e)})}catch(e){}})}static addConnectionToBinaryTree(e){return a(this,void 0,void 0,function*(){try{e.forEach(e=>{i.ConnectionData.AddConnection(e)})}catch(e){}})}}o=s,s.conceptsData={},s.connectionsData={},s.SYNC_INTERVAL_MS=12e4,s.nextSyncTime=Date.now(),s.activateStatus=!1,s.accessData="Access Data",o.startAutoSync()},1752:e=>{let t={comma:e=>t.split(e,[","],!0),space:e=>t.split(e,[" ","\n","\t"]),split(e,t,n){let o=[],i="",r=!1,a=0,s=!1,c="",l=!1;for(let n of e)l?l=!1:"\\"===n?l=!0:s?n===c&&(s=!1):'"'===n||"'"===n?(s=!0,c=n):"("===n?a+=1:")"===n?a>0&&(a-=1):0===a&&t.includes(n)&&(r=!0),r?(""!==i&&o.push(i.trim()),i="",r=!1):i+=n;return(n||""!==i)&&o.push(i.trim()),o}};e.exports=t,t.default=t},1863:(e,t,n)=>{n.d(t,{ER:()=>a,Mb:()=>s,ey:()=>c,ry:()=>r});var o=n(8957),i=n(7273);function r(e){if(o.Logger.log("ERROR",e.statusText,{code:e.status,data:e.statusText}),401==e.status||406==e.status){let t=new i.z(e.statusText,!1,e.status,"");throw t.setUrl(e.url),t}if(500==e.status){let t=new i.z(e.statusText,!1,e.status,"");throw t.setUrl(e.url),t}}function a(e,t={}){if(o.Logger.log("ERROR",t.statusText,{code:e.status,data:e.status}),401==e.status||406==e.status){let n=new i.z(t.statusText,!1,e.status,"");throw n.setUrl(e.url),n}if(500==e.status){let n=new i.z(t.statusText,!1,e.status,"");throw n.setUrl(e.url),n}}function s(e,t=""){if(o.Logger.log("ERROR",e.message,{code:e.status,data:e.stack}),e.status){let n=new i.z(e.message,!1,e.status,e.stack);throw n.setUrl(t),n}{let n=new i.z(e.message,!1,500,e.stack);throw n.setUrl(t),n}}function c(e,t,n){var o;try{if(!e)return;const t=Date.now();e.startTime=null!==(o=e.startTime)&&void 0!==o?o:t,e.responseTime=t-e.startTime+" ms",e.level="ERROR",e.errorMessage=(null==n?void 0:n.message)||"Unknown error occurred"}catch(e){}}},1866:()=>{},2013:(e,t,n)=>{n.d(t,{A:()=>c,w:()=>l});var o=n(8146),i=n(8957),r=n(3026),a=n(1863),s=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function c(e){var t=arguments;return s(this,void 0,void 0,function*(){const n=i.Logger.logfunction("GetConceptByCharacter",t)||{};if(i.serviceWorker){n.serviceWorker=!0;try{const t=yield(0,i.sendMessage)("GetConceptByCharacter",{characterValue:e});return i.Logger.logUpdate(n),t.data}catch(e){(0,a.ey)(n,"GetConceptByCharacter",e),(0,i.handleServiceWorkerException)(e)}}let s=yield r.I.GetConceptByCharacter(e),c=`${e}`;return null!=s&&0!=(null==s?void 0:s.id)||!c||(yield(0,o.Y)(e),s=yield r.I.GetConceptByCharacterAndTypeLocal(e,51),0==s.id&&(s=yield r.I.GetConceptByCharacter(e))),i.Logger.logUpdate(n),s})}function l(e){var t=arguments;return s(this,void 0,void 0,function*(){const n=i.Logger.logfunction("GetConceptByCharacterUpdated",t)||{};if(i.serviceWorker){n.serviceWorker=!0;try{const t=yield(0,i.sendMessage)("GetConceptByCharacterUpdated",{characterValue:e});return i.Logger.logUpdate(n),t.data}catch(e){(0,a.ey)(n,"GetConceptByCharacterUpdated",e),(0,i.handleServiceWorkerException)(e)}}let s=yield r.I.GetConceptByCharacter(e),c=`${e}`;return null!=s&&0!=(null==s?void 0:s.id)||!c||(yield(0,o.Y)(e),s=yield r.I.GetConceptByCharacter(e)),i.Logger.logUpdate(n),s})}},2110:(e,t,n)=>{const{AtRule:o,Rule:i}=n(2895);let r=n(7149);function a(e,t){let n;try{r(e=>{n=e}).processSync(e)}catch(n){throw e.includes(":")?t?t.error("Missed semicolon"):n:t?t.error(n.message):n}return n.at(0)}function s(e,t){let n=!1;return e.each(e=>{if("nesting"===e.type){let o=t.clone({});"&"!==e.value?e.replaceWith(a(e.value.replace("&",o.toString()))):e.replaceWith(o),n=!0}else"nodes"in e&&e.nodes&&s(e,t)&&(n=!0)}),n}function c(e,t){let n=[];for(let o of e.selectors){let i=a(o,e);for(let e of t.selectors){if(!e)continue;let o=a(e,t);s(o,i)||(o.prepend(r.combinator({value:" "})),o.prepend(i.clone({}))),n.push(o.toString())}}return n}function l(e,t){if("comment"!==e.prev()?.type)return t.after(e),e;let n=e.prev();return e.parent.toString().match(/[*]\/ *\n.*{/)?t.after(e).after(n):t.after(e),e}function d(e,t,n,o=!0){return t.length?(n=function(e,t,n){let o=new i({nodes:[],selector:e});return o.append(t),n.after(o),o}(e,t,n),o&&(t=[]),[n,t]):[n,t]}function u(e,t=""){let n=e.concat(t),o={};for(let e of n)o[e.replace(/^@/,"")]=!0;return o}function h(e){let t=e[f];if(t){let n,i,r,a,s=e.nodes,c=-1,l=function(e){let t=[],n=e.parent;for(;n&&n instanceof o;)t.push(n),n=n.parent;return t}(e);if(l.forEach((e,o)=>{if(t(e.name))n=e,c=o,r=a;else{let t=a;a=e.clone({nodes:[]}),t&&a.append(t),i=i||a}}),n)if(r){i.append(s),n.after(r)}else n.after(s);else e.after(s);if(e.next()&&n){let t;l.slice(0,c+1).forEach((n,o,i)=>{let r=t;t=n.clone({nodes:[]}),r&&t.append(r);let a=[],s=(i[o-1]||e).next();for(;s;)a.push(s),s=s.next();t.append(a)}),t&&(r||s[s.length-1]).after(t)}}else e.after(e.nodes);e.remove()}const p=Symbol("rootRuleMergeSel"),f=Symbol("rootRuleEscapes");function m(e){let{params:t}=e,{escapes:n,selector:o,type:r}=function(e){let t=(e=e.trim()).match(/^\((.*)\)$/);if(!t)return{selector:e,type:"basic"};let n=t[1].match(/^(with(?:out)?):(.+)$/);if(n){let e="with"===n[1],t=Object.fromEntries(n[2].trim().split(/\s+/).map(e=>[e,!0]));if(e&&t.all)return{type:"noop"};let o=e=>!!t[e];return t.all?o=()=>!0:e&&(o=e=>"all"!==e&&!t[e]),{escapes:o,type:"withrules"}}return{type:"unknown"}}(t);if("unknown"===r)throw e.error(`Unknown @${e.name} parameter ${JSON.stringify(t)}`);if("basic"===r&&o){let t=new i({nodes:e.nodes,selector:o});e.removeAll(),e.append(t)}e[f]=n,e[p]=n?!n("all"):"noop"===r}const y=Symbol("hasRootRule");e.exports=(e={})=>{let t=u(["media","supports","layer","container","starting-style"],e.bubble),n=function(e){return function t(n,o,i,r=i){let a=[];if(o.each(s=>{"rule"===s.type&&i?r&&(s.selectors=c(n,s)):"atrule"===s.type&&s.nodes?e[s.name]?t(n,s,r):!1!==o[p]&&a.push(s):a.push(s)}),i&&a.length){let e=n.clone({nodes:[]});for(let t of a)e.append(t);o.prepend(e)}}}(t),o=u(["document","font-face","keyframes","-webkit-keyframes","-moz-keyframes"],e.unwrap),i=(e.rootRuleName||"at-root").replace(/^@/,""),r=e.preserveEmpty;return{Once(e){e.walkAtRules(i,t=>{m(t),e[y]=!0})},postcssPlugin:"postcss-nested",RootExit(e){e[y]&&(e.walkAtRules(i,h),e[y]=!1)},Rule(e){let a=!1,s=e,u=!1,h=[];e.each(r=>{switch(r.type){case"atrule":[s,h]=d(e.selector,h,s),r.name===i?(a=!0,n(e,r,!0,r[p]),s=l(r,s)):t[r.name]?(u=!0,a=!0,n(e,r,!0),s=l(r,s)):o[r.name]?(u=!0,a=!0,n(e,r,!1),s=l(r,s)):u&&h.push(r);break;case"decl":u&&h.push(r);break;case"rule":[s,h]=d(e.selector,h,s),u=!0,a=!0,r.selectors=c(e,r),s=l(r,s)}}),d(e.selector,h,s,!1),a&&!0!==r&&(e.raws.semicolon=!0,0===e.nodes.length&&e.remove())}}},e.exports.postcss=!0},2155:(e,t,n)=>{n.d(t,{N:()=>r});var o=n(7282),i=n(9581);class r{constructor(e=0,t,n,r,a,s,c){this.count=0,this.isTemp=!1,this.toUpdate=!1,this.applicationId=i.B.getRandomizer(),this.type=(0,o.o)(),this.ofConcept=(0,o.o)(),this.toConcept=(0,o.o)(),this.id=e,this.ofTheConceptId=t,this.toTheConceptId=n,this.userId=r,this.typeId=a,this.ghostId=e,this.orderId=s,this.accessId=c,this.entryTimeStamp=(0,o.Y)(new Date),this.terminationDateTime=new Date,this.localSyncTime=new Date,this.typeCharacter=""}}},2170:(e,t,n)=>{n.d(t,{B:()=>o});class o{static getValue(e,t=null){if(e in this.environments){return this.environments[e]}return t}static setValue(e,t){return this.environments[e]=t,this}}o.environments={}},2202:(e,t,n)=>{n.d(t,{W:()=>c});var o=n(6963),i=n(6731),r=n(205),a=n(8957),s=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class c{static addNodeToTree(e){this.conceptMap.set(e.key,e.value),null===this.root&&(this.root=e)}static waitForDataToLoad(){return s(this,void 0,void 0,function*(){return new Promise((e,t)=>{this.checkFlag(e),setTimeout(()=>{t("not")},25e3)})})}static checkFlag(e){if(r.B.isDataLoaded)return e("done");setTimeout(c.checkFlag,1e3,e)}static addConceptToTree(e){let t=new i.b(e.characterValue,e,null,null);o.f.addNodeToTree(t),this.conceptMap.set(e.id,e),null===this.root&&(this.root=new i.b(e.id,e,null,null))}static getNodeFromTree(e){return s(this,void 0,void 0,function*(){const t=this.conceptMap.get(e);return t?{key:e,value:t}:null})}static removeNodeFromTree(e){return s(this,void 0,void 0,function*(){this.conceptMap.has(e)&&((0,a.dispatchIdEvent)(e),this.conceptMap.delete(e),0===this.conceptMap.size&&(this.root=null))})}static getConceptListFromIds(e,t,n){return s(this,void 0,void 0,function*(){for(let n=e.length-1;n>=0;n--){const o=this.conceptMap.get(e[n]);o&&(t.push(o),e.splice(n,1))}})}static countNumberOfNodes(){return this.conceptMap.size}}c.root=null,c.conceptMap=new Map},2212:(e,t,n)=>{n.d(t,{Ay:()=>l,N:()=>d});var o=n(1167),i=n(2615),r=n(5976),a=n(442),s=n(8957),c=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function l(e,t,n,o,s,l,d){return c(this,void 0,void 0,function*(){let c=yield r.B.getId(),u=new Date,h=new Date,p=new i.j(c,t,o,n,s,e,l,!0,u,h,d);return p.isTemp=!1,a.Y.AddConcept(p),p})}function d(e,t,n,a,l,d,u){return c(this,void 0,void 0,function*(){let c=yield r.B.getId(),h=new Date,p=new Date,f=new i.j(c,t,a,n,l,e,d,!1,h,p,u);return s.ConceptsData.AddConcept(f),(0,o.Y)([f]),f})}},2289:(e,t,n)=>{n.d(t,{$S:()=>d,L0:()=>u,WC:()=>h});var o=n(8675),i=n(6058),r=n(8957),a=n(1863);n(3518);var s=n(843),c=n(4818),l=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function d(e,t){var n=arguments;return l(this,void 0,void 0,function*(){const i=r.Logger.logfunction("DeleteConnectionByType",n)||{};if(r.serviceWorker){i.serviceWorker=!0;try{const n=yield(0,r.sendMessage)("DeleteConnectionByType",{id:e,linker:t});return r.Logger.logUpdate(i),n.data}catch(e){(0,a.ey)(i,"DeleteConnectionByType",e),(0,r.handleServiceWorkerException)(e)}}let s=yield(0,o.l)(e);for(let e=0;e<s.length;e++)r.ConnectionData.AddConnection(s[e]);let c=yield r.ConnectionData.GetConnectionsOfConcept(e),l=yield(0,r.GetConceptByCharacter)(t),d=[];for(let e=0;e<c.length;e++)c[e].typeId==l.id&&d.push(c[e]);let u=!1;for(let e=0;e<d.length;e++)u=yield(0,r.DeleteConnectionById)(d[e].id);return r.Logger.logUpdate(i),u})}function u(e,t){var n=arguments;return l(this,void 0,void 0,function*(){const i=r.Logger.logfunction("DeleteConnectionByTypeBulk",n)||{};if(r.serviceWorker){i.serviceWorker=!0;try{const n=yield(0,r.sendMessage)("DeleteConnectionByTypeBulk",{id:e,linkers:t});return r.Logger.logUpdate(i),n.data}catch(e){(0,a.ey)(i,"DeleteConnectionByTypeBulk",e),(0,r.handleServiceWorkerException)(e)}}let l=yield(0,o.l)(e);for(let e=0;e<l.length;e++)r.ConnectionData.AddConnection(l[e]);let d=yield r.ConnectionData.GetConnectionsOfConcept(e),u=[];u=yield(0,s.Hi)(t);let h=[];for(let e=0;e<d.length;e++)for(let t=0;t<u.length;t++)d[e].typeId==u[t].id&&h.push(d[e].id);return r.Logger.logUpdate(i),yield(0,c.E)(h)})}function h(e,t){return l(this,arguments,void 0,function*(e,t,n=!1){if(r.serviceWorker)try{return(yield(0,r.sendMessage)("GetAllTheConnectionsByTypeAndOfTheConcept",{id:e,linker:t,reverse:n})).data}catch(e){(0,r.handleServiceWorkerException)(e)}let a=[];if(n){let n=yield(0,i.W)(e),o=yield(0,r.MakeTheTypeConceptApi)(t,999);for(let e=0;e<n.length;e++)n[e].typeId==o.id&&a.push(n[e])}else{let n=yield(0,o.l)(e);for(let e=0;e<n.length;e++)r.ConnectionData.AddConnection(n[e]);let i=yield r.ConnectionData.GetConnectionsOfConcept(e),s=yield(0,r.GetConceptByCharacter)(t);for(let e=0;e<i.length;e++)i[e].typeId==s.id&&a.push(i[e])}return a})}},2299:(e,t,n)=>{n.d(t,{B:()=>o});class o{constructor(e){this.id=1,this.isOnlineSync=!1,this.isOnlineSync=e}}},2515:(e,t,n)=>{n.d(t,{x:()=>o});class o{constructor(e,t,n,o){this.variants=[],this.height=1,this.key=e,this.value=t,this.leftNode=n,this.rightNode=o,this.currentNode=null}addCurrentNode(e,t){return null==t?t=e:(e.value.typeId!=t.value.typeId&&(t.currentNode=this.addCurrentNode(e,t.currentNode)),t)}addCurrentNodeType(e,t){if(null==t)return t=e;var n=!1;for(let o=0;o<t.variants.length;o++)t.variants[o].value.id==e.value.id&&(n=!0);return n||t.variants.push(e),t}addNode(e,t,n){if(null==t)return t=e;var o=t.leftNode,i=t.rightNode;if(t.key>e.key)t.leftNode=this.addNode(e,o,n);else{if(!(t.key<e.key))return t;t.rightNode=this.addNode(e,i,n)}t.height=1+Math.max(this.getHeight(t.leftNode),this.getHeight(t.rightNode));let r=this.getBalanceFactor(t);if(r>1&&t.leftNode){if(e.key<t.leftNode.key)return this.rightRotate(t);if(e.key>t.leftNode.key)return t.leftNode=this.leftRotate(t.leftNode),this.rightRotate(t)}if(r<-1&&t.rightNode){if(e.key>t.rightNode.key)return this.leftRotate(t);if(e.key<t.rightNode.key)return t.rightNode=this.rightRotate(t.rightNode),this.leftRotate(t)}return t}addCharacterNode(e,t,n){var o=!1;if(""!=e.value.characterValue){if(null==t)return t=e;var i=t.leftNode,r=t.rightNode;if(t.key>e.key)t.leftNode=this.addCharacterNode(e,i,n);else{if(!(t.key<e.key))return t.key==e.key&&""!=t.key&&t.value.id!=e.value.id&&t.addCurrentNodeType(e,t),t;t.rightNode=this.addCharacterNode(e,r,n)}t.height=1+Math.max(this.getHeight(t.leftNode),this.getHeight(t.rightNode));let o=this.getBalanceFactor(t);if(o>1&&t.leftNode){if(e.key<t.leftNode.key)return this.rightRotate(t);if(e.key>t.leftNode.key)return t.leftNode=this.leftRotate(t.leftNode),this.rightRotate(t)}if(o<-1&&t.rightNode){if(e.key>t.rightNode.key)return this.leftRotate(t);if(e.key<t.rightNode.key)return t.rightNode=this.rightRotate(t.rightNode),this.leftRotate(t)}}else o;return t}addTypeNode(e,t,n){var o=!1;if(0!=e.value.typeId){if(null==t)return t=e;var i=t.leftNode,r=t.rightNode;if(t.key>e.key)t.leftNode=this.addTypeNode(e,i,n);else{if(!(t.key<e.key))return t.key==e.key&&0!=t.key&&t.value.id!=e.value.id&&t.addCurrentNodeType(e,t),t;t.rightNode=this.addTypeNode(e,r,n)}t.height=1+Math.max(this.getHeight(t.leftNode),this.getHeight(t.rightNode));let o=this.getBalanceFactor(t);if(o>1&&t.leftNode){if(e.key<t.leftNode.key)return this.rightRotate(t);if(e.key>t.leftNode.key)return t.leftNode=this.leftRotate(t.leftNode),this.rightRotate(t)}if(o<-1&&t.rightNode){if(e.key>t.rightNode.key)return this.leftRotate(t);if(e.key<t.rightNode.key)return t.rightNode=this.rightRotate(t.rightNode),this.leftRotate(t)}}else o;return t}rightRotate(e){if(e){let t=e.leftNode;if(t){let n=t.rightNode;return e.leftNode=n,t.rightNode=e,e.height=Math.max(this.getHeight(e.leftNode),this.getHeight(e.rightNode))+1,t.height=Math.max(this.getHeight(t.leftNode),this.getHeight(t.rightNode))+1,t}}return e}leftRotate(e){if(e){let t=e.rightNode;if(t){let n=t.leftNode;return t.leftNode=e,e.rightNode=n,e.height=Math.max(this.getHeight(e.leftNode),this.getHeight(e.rightNode))+1,t.height=Math.max(this.getHeight(t.leftNode),this.getHeight(e.rightNode))+1,t}}return e}getHeight(e){return e?e.height:0}getBalanceFactor(e){return null==e?0:this.getHeight(e.leftNode)-this.getHeight(e.rightNode)}getFromNode(e,t){return t?e==t.key?t:e<t.key?this.getFromNode(e,t.leftNode):e>t.key?this.getFromNode(e,t.rightNode):t:t}updateNodeSyncStatus(e,t,n){if(n){if(e==n.key){let e=n.value;return e.isSynced=t,n.value=e,n}return e<n.key?this.updateNodeSyncStatus(e,t,n.leftNode):e>n.key?this.updateNodeSyncStatus(e,t,n.rightNode):n}return n}getCharacterFromNode(e,t){return t?e==t.key?t:e<t.key?this.getCharacterFromNode(e,t.leftNode):e>t.key?this.getCharacterFromNode(e,t.rightNode):t:t}getFromNodeWithCharacterAndType(e,t,n){if(e=`${e}`,n){if(e==n.key){if(e==n.value.characterValue&&t==n.value.typeId)return n;for(let e=0;e<n.variants.length;e++)if(n.variants[e].value.typeId==t)return n.variants[e]}else{if(e<n.key)return this.getFromNodeWithCharacterAndType(e,t,n.leftNode);if(e>n.key)return this.getFromNodeWithCharacterAndType(e,t,n.rightNode)}return null}return n}getFromNodeWithCharacterAndCategory(e,t,n){if(e=`${e}`,n){if(e==n.key){if(e==n.value.characterValue&&t==n.value.categoryId)return n;for(let e=0;e<n.variants.length;e++)if(n.variants[e].value.categoryId==t)return n.variants[e]}else{if(e<n.key)return this.getFromNodeWithCharacterAndCategory(e,t,n.leftNode);if(e>n.key)return this.getFromNodeWithCharacterAndCategory(e,t,n.rightNode)}return null}return n}removeNode(e,t){if(null==e)return e;if(e.key>t)return e.leftNode=this.removeNode(e.leftNode,t),e;if(e.key<t)return e.rightNode=this.removeNode(e.rightNode,t),e;if(null==e.leftNode){let t=e.rightNode;return e=null,t}if(null==e.rightNode){let t=e.leftNode;return e=null,t}var n=this.inOrderSuccessor(e.rightNode);return e.value=n.value,e.key=n.key,e.variants=n.variants,e.currentNode=n.currentNode,e.rightNode=this.removeNode(e.rightNode,n.key),e}removeNodeWithVariants(e,t,n){if(null==e)return e;if(e.key>t)return e.leftNode=this.removeNodeWithVariants(e.leftNode,t,n),e;if(e.key<t)return e.rightNode=this.removeNodeWithVariants(e.rightNode,t,n),e;if(e.variants.length>0)if(e.value.id==n){var o=e.variants[0];if(o)return e.value=o.value,e.key=o.key,e.currentNode=o.currentNode,e.variants.splice(0,1),e}else for(let t=0;t<e.variants.length;t++)if(n==e.variants[t].value.id)return e.variants.splice(t,1),e;if(null==e.leftNode){let t=e.rightNode;return e=null,t}if(null==e.rightNode){let t=e.leftNode;return e=null,t}var i=this.inOrderSuccessor(e.rightNode);return e.value=i.value,e.key=i.key,e.variants=i.variants,e.currentNode=i.currentNode,e.rightNode=this.removeNodeWithVariants(e.rightNode,i.key,n),e}countNodeBelow(e){return null==e?0:1+this.countNodeBelow(e.leftNode)+this.countNodeBelow(e.rightNode)}inOrderSuccessor(e){for(;null!=e.leftNode;)e=e.leftNode;return e}}},2615:(e,t,n)=>{n.d(t,{j:()=>i});var o=n(8957);class i{constructor(e,t,n,i,r,a,s,c=!1,l,d,u){this.count=0,this.typeCharacter="",this.referent=null,this.isComposition=!1,this.isTemp=!1,this.isSynced=!1,this.applicationId=o.BaseUrl.getRandomizer(),this.x=0,this.y=0,this.id=e,this.userId=t,this.typeId=n,this.ghostId=e,this.categoryId=i,this.referentId=r,this.characterValue=`${a}`,this.accessId=s,this.typeCharacter=u,this.type=null,this.isNew=c,this.entryTimeStamp=l,this.updatedTimeStamp=d}getType(){}}},2648:(e,t,n)=>{t.__esModule=!0,t.FIELDS=void 0,t.default=function(e){var t,n,o,i,a,s,c,l,d,u,p,f,m=[],y=e.css.valueOf(),v=y.length,g=-1,C=1,w=0,T=0;function I(t,n){if(!e.safe)throw e.error("Unclosed "+t,C,w-g,w);l=(y+=n).length-1}for(;w<v;){switch((t=y.charCodeAt(w))===r.newline&&(g=w,C+=1),t){case r.space:case r.tab:case r.newline:case r.cr:case r.feed:l=w;do{l+=1,(t=y.charCodeAt(l))===r.newline&&(g=l,C+=1)}while(t===r.space||t===r.newline||t===r.tab||t===r.cr||t===r.feed);f=r.space,o=C,n=l-g-1,T=l;break;case r.plus:case r.greaterThan:case r.tilde:case r.pipe:l=w;do{l+=1,t=y.charCodeAt(l)}while(t===r.plus||t===r.greaterThan||t===r.tilde||t===r.pipe);f=r.combinator,o=C,n=w-g,T=l;break;case r.asterisk:case r.ampersand:case r.bang:case r.comma:case r.equals:case r.dollar:case r.caret:case r.openSquare:case r.closeSquare:case r.colon:case r.semicolon:case r.openParenthesis:case r.closeParenthesis:f=t,o=C,n=w-g,T=(l=w)+1;break;case r.singleQuote:case r.doubleQuote:p=t===r.singleQuote?"'":'"',l=w;do{for(i=!1,-1===(l=y.indexOf(p,l+1))&&I("quote",p),a=l;y.charCodeAt(a-1)===r.backslash;)a-=1,i=!i}while(i);f=r.str,o=C,n=w-g,T=l+1;break;default:t===r.slash&&y.charCodeAt(w+1)===r.asterisk?(0===(l=y.indexOf("*/",w+2)+1)&&I("comment","*/"),(s=(c=y.slice(w,l+1).split("\n")).length-1)>0?(d=C+s,u=l-c[s].length):(d=C,u=g),f=r.comment,C=d,o=d,n=l-u):t===r.slash?(f=t,o=C,n=w-g,T=(l=w)+1):(l=h(y,w),f=r.word,o=C,n=l-g),T=l+1}m.push([f,C,w-g,o,n,w,T]),u&&(g=u,u=null),w=T}return m};var o,i,r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=a(t);if(n&&n.has(e))return n.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var s=i?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(o,r,s):o[r]=e[r]}o.default=e,n&&n.set(e,o);return o}(n(71));function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(a=function(e){return e?n:t})(e)}for(var s=((o={})[r.tab]=!0,o[r.newline]=!0,o[r.cr]=!0,o[r.feed]=!0,o),c=((i={})[r.space]=!0,i[r.tab]=!0,i[r.newline]=!0,i[r.cr]=!0,i[r.feed]=!0,i[r.ampersand]=!0,i[r.asterisk]=!0,i[r.bang]=!0,i[r.comma]=!0,i[r.colon]=!0,i[r.semicolon]=!0,i[r.openParenthesis]=!0,i[r.closeParenthesis]=!0,i[r.openSquare]=!0,i[r.closeSquare]=!0,i[r.singleQuote]=!0,i[r.doubleQuote]=!0,i[r.plus]=!0,i[r.pipe]=!0,i[r.tilde]=!0,i[r.greaterThan]=!0,i[r.equals]=!0,i[r.dollar]=!0,i[r.caret]=!0,i[r.slash]=!0,i),l={},d="0123456789abcdefABCDEF",u=0;u<22;u++)l[d.charCodeAt(u)]=!0;function h(e,t){var n,o=t;do{if(n=e.charCodeAt(o),c[n])return o-1;n===r.backslash?o=p(e,o)+1:o++}while(o<e.length);return o-1}function p(e,t){var n=t,o=e.charCodeAt(n+1);if(s[o]);else if(l[o]){var i=0;do{n++,i++,o=e.charCodeAt(n+1)}while(l[o]&&i<6);i<6&&o===r.space&&n++}else n++;return n}t.FIELDS={TYPE:0,START_LINE:1,START_COL:2,END_LINE:3,END_COL:4,START_POS:5,END_POS:6}},2739:()=>{},2803:(e,t,n)=>{n.d(t,{x:()=>c});var o=n(8286),i=n(9581),r=n(1863),a=n(8957),s=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function c(e,t,n){var c=arguments;return s(this,void 0,void 0,function*(){const s=a.Logger.logfunction("GetCompositionConnectionsBetweenTwoConcepts",c)||{};var l=[];try{if(a.serviceWorker){s.serviceWorker=!0;try{const o=yield(0,a.sendMessage)("GetCompositionConnectionsBetweenTwoConcepts",{ofConceptId:e,toConcept:t,mainKey:n});return a.Logger.logUpdate(s),o.data}catch(e){(0,r.ey)(s,"GetCompositionConnectionsBetweenTwoConcepts",e),(0,a.handleServiceWorkerException)(e)}}var d=new FormData;d.append("ofConceptId",e.toString()),d.append("mainKey",n.toString()),d.append("toConceptId",t.toString());const c=yield fetch(i.B.GetCompositionConnectionBetweenTwoConceptsUrl(),{method:"POST",body:d,redirect:"follow"});if(c.ok){const e=yield c.json();for(var u=0;u<e.length;u++)o.d.AddConnection(e[u]),l.push(e[u]);a.Logger.logUpdate(s)}else(0,r.ry)(c)}catch(e){Error,(0,r.Mb)(e,i.B.GetCompositionConnectionBetweenTwoConceptsUrl()),(0,r.ey)(s,"GetCompositionConnectionsBetweenTwoConcepts",e)}return l})}},2832:(e,t,n)=>{n.d(t,{j:()=>c});var o=n(8957),i=n(9581),r=n(1863),a=n(3518),s=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function c(e){var t=arguments;return s(this,arguments,void 0,function*(e,n=""){const s=o.Logger.logfunction("SearchLinkMultipleApi",t);let c=performance.now();var l=(0,a.ab)("application/json",n);const d=i.B.SearchLinkMultipleAllApiUrl(),u=JSON.stringify(e);try{const t=yield fetch(d,{method:"POST",headers:l,body:u});if(t.ok){let e=yield t.json();return o.Logger.logUpdate(s),e}return(0,r.ry)(t),o.Logger.logError(c,"unknown","search","unknown",void 0,t.status,t,"SearchLinkMultipleApi",[e,n],"unknown",void 0),[]}catch(t){o.Logger.logError(c,"unknown","search","unknown",void 0,500,t,"SearchLinkMultipleApi",[e,n],"unknown",void 0),(0,r.Mb)(t,d),(0,r.ey)(s,"SearchLinkMultipleApi",t)}})}},2895:(e,t,n)=>{let o=n(396),i=n(9371),r=n(7793),a=n(3614),s=n(5238),c=n(145),l=n(3438),d=n(1106),u=n(6966),h=n(1752),p=n(3152),f=n(9577),m=n(6846),y=n(3717),v=n(5644),g=n(1534),C=n(3303),w=n(38);function T(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new m(e)}T.plugin=function(e,t){let n,o=!1;function i(...n){console&&console.warn&&!o&&(o=!0,process.env.LANG&&process.env.LANG.startsWith("cn"));let i=t(...n);return i.postcssPlugin=e,i.postcssVersion=(new m).version,i}return Object.defineProperty(i,"postcss",{get:()=>(n||(n=i()),n)}),i.process=function(e,t,n){return T([i(n)]).process(e,t)},i},T.stringify=C,T.parse=f,T.fromJSON=l,T.list=h,T.comment=e=>new i(e),T.atRule=e=>new o(e),T.decl=e=>new s(e),T.rule=e=>new g(e),T.root=e=>new v(e),T.document=e=>new c(e),T.CssSyntaxError=a,T.Declaration=s,T.Container=r,T.Processor=m,T.Document=c,T.Comment=i,T.Warning=w,T.AtRule=o,T.Result=y,T.Input=d,T.Rule=g,T.Root=v,T.Node=p,u.registerPostcss(T),e.exports=T,T.default=T},2918:(e,t,n)=>{t.__esModule=!0,t.default=void 0;var o,i=(o=n(4646))&&o.__esModule?o:{default:o},r=n(1581);function a(e,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},a(e,t)}var s=function(e){var t,n;function o(t){var n;return(n=e.call(this,t)||this).type=r.NESTING,n.value="&",n}return n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,a(t,n),o}(i.default);t.default=s,e.exports=t.default},3026:(e,t,n)=>{n.d(t,{I:()=>f});var o=n(3655),i=n(2202),r=n(6963),a=n(5457),s=n(7282),c=n(8957);class l{constructor(e,t,n,o){this.height=1,this.key=e,this.value=t,this.leftNode=n,this.rightNode=o}addNode(e,t,n){if(null==t)return t=e;let o=t.leftNode,i=t.rightNode;if(t.key>e.key)t.leftNode=this.addNode(e,o,n);else{if(!(t.key<e.key))return t;t.rightNode=this.addNode(e,i,n)}t.height=1+Math.max(this.getHeight(t.leftNode),this.getHeight(t.rightNode));let r=this.getBalanceFactor(t);if(r>1&&t.leftNode){if(e.key<t.leftNode.key)return this.rightRotate(t);if(e.key>t.leftNode.key)return t.leftNode=this.leftRotate(t.leftNode),this.rightRotate(t)}if(r<-1&&t.rightNode){if(e.key>t.rightNode.key)return this.leftRotate(t);if(e.key<t.rightNode.key)return t.rightNode=this.rightRotate(t.rightNode),this.leftRotate(t)}return t}rightRotate(e){if(e){let t=e.leftNode;if(t){let n=t.rightNode;return e.leftNode=n,t.rightNode=e,e.height=Math.max(this.getHeight(e.leftNode),this.getHeight(e.rightNode))+1,t.height=Math.max(this.getHeight(t.leftNode),this.getHeight(t.rightNode))+1,t}}return e}leftRotate(e){if(e){let t=e.rightNode;if(t){let n=t.leftNode;return t.leftNode=e,e.rightNode=n,e.height=Math.max(this.getHeight(e.leftNode),this.getHeight(e.rightNode))+1,t.height=Math.max(this.getHeight(t.leftNode),this.getHeight(e.rightNode))+1,t}}return e}getHeight(e){return e?e.height:0}getBalanceFactor(e){return null==e?0:this.getHeight(e.leftNode)-this.getHeight(e.rightNode)}getFromNode(e,t){return t?e==t.key?t:e<t.key?this.getFromNode(e,t.leftNode):e>t.key?this.getFromNode(e,t.rightNode):t:t}removeNode(e,t){if(null==e)return e;if(e.key>t)return e.leftNode=this.removeNode(e.leftNode,t),e;if(e.key<t)return e.rightNode=this.removeNode(e.rightNode,t),e;if(null==e.leftNode){let t=e.rightNode;return e=null,t}if(null==e.rightNode){let t=e.leftNode;return e=null,t}{let t=this.inOrderSuccessor(e.rightNode);return e.value=t.value,e.key=t.key,e.rightNode=this.removeNode(e.rightNode,t.key),e}}countNodeBelow(e){return null==e?0:1+this.countNodeBelow(e.leftNode)+this.countNodeBelow(e.rightNode)}inOrderSuccessor(e){for(;null!=e.leftNode;)e=e.leftNode;return e}}var d=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class u{static addNodeToTree(e){if(null==this.root)return this.root=e,this.root;this.root=this.root.addNode(e,this.root,this.root.height)}static addWidgetToTree(e){let t=new l(e.widgetId,e,null,null);this.addNodeToTree(t)}static getNodeFromTree(e){return d(this,void 0,void 0,function*(){if(this.root){return this.root.getFromNode(e,this.root)}return null})}static removeNodeFromTree(e){return d(this,void 0,void 0,function*(){this.root&&(this.root=this.root.removeNode(this.root,e))})}static countNumberOfNodes(){return this.root?this.root.countNodeBelow(this.root):0}}u.root=null;class h{constructor(){this.widgetId=0,this.mainId=0,this.conceptIds=[],this.linkers=[],this.reverse=[],this.mainCompositionIds=[],this.countinfo=[]}}var p=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class f{constructor(){this.name="conceptsArray"}static CheckContains(e){for(var t=!1,n=0;n<this.conceptsArray.length;n++)this.conceptsArray[n].id==e.id&&(t=!0);return t}static AddNpc(e){this.NPC.includes(e)||(this.NPC.length>10&&(this.NPC=[]),this.NPC.push(e))}static GetNpc(e){return!!this.NPC.includes(e)}static AddConceptToStorage(e){e.id>0&&(0,o.kH)("concept",e)}static GetConceptBulkData(e,t,n){return p(this,void 0,void 0,function*(){yield i.W.getConceptListFromIds(e,t,n)})}static AddWidget(e){if(c.serviceWorker)try{(0,c.sendMessage)("ConceptsData__AddWidget",{widgetDetails:e})}catch(e){(0,c.handleServiceWorkerException)(e)}e.widgetId>0&&u.addWidgetToTree(e)}static AddConcept(e){if(c.serviceWorker)try{(0,c.sendMessage)("ConceptsData__AddConcept",{concept:e})}catch(e){(0,c.handleServiceWorkerException)(e)}e.id>0&&(i.W.addConceptToTree(e),a.c.addConceptToTree(e))}static AddConceptToMemory(e){e.id>0&&(i.W.addConceptToTree(e),a.c.addConceptToTree(e))}static AddConceptTemporary(e){var t=this.CheckContains(e);this.conceptDictionary[e.id]=e,t&&this.RemoveConcept(e),this.conceptsArray.push(e)}static RemoveConcept(e){for(var t=0;t<this.conceptsArray.length;t++)this.conceptsArray[t].id==e.id&&this.conceptsArray.splice(t,1);(0,o.wh)("concept",e.id)}static GetWidget(e){return p(this,void 0,void 0,function*(){let t=new h;if(c.serviceWorker)try{return(yield(0,c.sendMessage)("ConceptsData__GetWidget",{id:e})).data}catch(e){(0,c.handleServiceWorkerException)(e)}let n=yield u.getNodeFromTree(e);return null!=n&&(t=n.value),t})}static RemoveWidget(e){return p(this,void 0,void 0,function*(){if(c.serviceWorker)try{return(yield(0,c.sendMessage)("ConceptsData__RemoveWidget",{id:e})).data}catch(e){(0,c.handleServiceWorkerException)(e)}yield u.removeNodeFromTree(e)})}static GetConcept(e){return p(this,void 0,void 0,function*(){if(c.serviceWorker)try{return(yield(0,c.sendMessage)("ConceptsData__GetConcept",{id:e})).data}catch(e){(0,c.handleServiceWorkerException)(e)}if(0==e||null==e||null==e)return(0,s.o)();var t=(0,s.o)(),n=yield i.W.getNodeFromTree(e);if(null==n?void 0:n.value){var o=n.value;o&&(t=o)}return t})}static GetConceptByCharacter(e){return p(this,void 0,void 0,function*(){var t=(0,s.o)(),n=r.f.getNodeFromTree(e);return n&&(t=n.value),t})}static GetConceptByCharacterUpdated(e){return p(this,void 0,void 0,function*(){var t=(0,s.o)(),n=r.f.getNodeFromTree(e);return n&&(t=n.value),t})}static GetConceptByCharacterAndTypeLocal(e,t){return p(this,void 0,void 0,function*(){(0,s.o)();return yield a.c.getTypeVariantsWithCharacterValueNew(e,t)})}static GetConceptByCharacterAndCategoryLocal(e,t){return p(this,void 0,void 0,function*(){var n=(0,s.o)(),o=yield r.f.getCharacterAndCategoryFromTree(e,t);return o&&(n=o.value),n})}static GetConceptsByTypeId(e){let t=[];for(var n=0;n<this.conceptsArray.length;n++)this.conceptsArray[n].typeId==e&&t.push(this.conceptsArray[n]);return t}static GetConceptsByTypeIdAndUser(e,t){var n=arguments;return p(this,void 0,void 0,function*(){if(c.Logger.logfunction("ConceptsData.GetConceptsByTypeIdAndUser",n),c.serviceWorker)try{return(yield(0,c.sendMessage)("ConceptsData__GetConceptsByTypeIdAndUser",{typeId:e,userId:t})).data}catch(e){(0,c.handleServiceWorkerException)(e)}let o=[];return o=yield a.c.getTypeVariantsFromTreeWithUserIdNew(e,t),o})}static GetBinaryCharacterTree(){return r.f.characterRoot}getName(){return this.name}}f.conceptsArray=[],f.NPC=[],f.conceptDictionary=[]},3075:(e,t,n)=>{n.d(t,{Ay:()=>d,EO:()=>u,xd:()=>h});var o=n(205),i=n(9736),r=n(5257),a=n(9003),s=n(8957),c=n(1863),l=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function d(){return l(this,void 0,void 0,function*(){const e=s.Logger.logfunction("CreateLocalBinaryTreeFromIndexDb");try{let t=[];if(Array.isArray(t))for(let e=0;e<t.length;e++){let n=t[e];i.v.AddConceptToMemory(n)}o.B.isLocalDataLoaded=!0,o.B.isLocalTypeLoaded=!0,o.B.isLocalCharacterLoaded=!0,s.Logger.logUpdate(e)}catch(t){yield(0,s.DelayFunctionExecution)(2e3,d());let n={message:"Cannot create local binary tree from index db",data:t,ok:!1,status:400};throw(0,c.ey)(e,"CreateLocalBinaryTreeFromIndexDb",t),n}})}function u(){return l(this,void 0,void 0,function*(){var e;const t=s.Logger.logfunction("PopulateTheLocalConceptsToMemory");try{yield null===(e=navigator.locks)||void 0===e?void 0:e.request("dblock",e=>l(this,void 0,void 0,function*(){let e=yield(0,a.S5)("localid");if(Array.isArray(e)){if(e[0]){let t=e[0].value;if(t)r.R.AddConceptId(e[0]),yield(0,a.kH)("localid",{id:0,value:t-10});else{t=-Math.floor(1e8*Math.random());let e={id:0,value:t},n={id:0,value:t-10};r.R.AddConceptId(e),yield(0,a.kH)("localid",n)}}e[2]}})),s.Logger.logUpdate(t)}catch(e){let n={message:"Cannot populate Local Ids from the Index Db",data:e,ok:!1,status:400};throw(0,c.ey)(t,"PopulateTheLocalConceptsToMemory",e),n}})}function h(){return l(this,void 0,void 0,function*(){var e;const t=s.Logger.logfunction("PopulateTheLocalConnectionToMemory");try{yield null===(e=navigator.locks)||void 0===e?void 0:e.request("dblock",e=>l(this,void 0,void 0,function*(){let e=yield(0,a.S5)("localid");if(Array.isArray(e)){if(e[1]){let t=e[1].value;if(t)r.R.AddConnectionId(e[1]),yield(0,a.kH)("localid",{id:1,value:t-10});else{t=-Math.floor(1e8*Math.random());let e={id:0,value:t},n={id:0,value:t-10};r.R.AddConnectionId(e),yield(0,a.kH)("localid",n)}}e[2]}})),s.Logger.logUpdate(t)}catch(e){let n={message:"Cannot populate Local Ids from the Index Db",data:e,ok:!1,status:400};throw(0,c.ey)(t,"PopulateTheLocalConnectionToMemory",e),n}})}},3077:(e,t,n)=>{n.d(t,{A:()=>l});var o=n(8957),i=n(2615),r=n(9736),a=n(5257),s=n(9700),c=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function l(e,t,n,l,d,u){return c(this,arguments,void 0,function*(e,t,n,c,l,d,u=!1,h=0,p={concepts:[],connections:[]}){var f,m,y,v;let g=performance.now();try{if(o.serviceWorker)try{const i=yield(0,o.sendMessage)("CreateTheConceptLocal",{referent:e,typecharacter:t,userId:n,categoryId:c,typeId:l,accessId:d,isComposition:u,referentId:h});return(null===(m=null===(f=null==i?void 0:i.actions)||void 0===f?void 0:f.concepts)||void 0===m?void 0:m.length)&&(p.concepts=JSON.parse(JSON.stringify(i.actions.concepts))),(null===(v=null===(y=null==i?void 0:i.actions)||void 0===y?void 0:y.connections)||void 0===v?void 0:v.length)&&(p.connections=JSON.parse(JSON.stringify(i.actions.connections))),i.data}catch(e){(0,o.handleServiceWorkerException)(e)}let s=yield a.R.getConceptId(),g=!0,C=new Date,w=new Date;if("the"==e){return new i.j(1,999,5,5,h,e,d,g,C,w,t)}let T=new i.j(s,n,l,c,h,e,d,g,C,w,t);return T.isTemp=!0,T.isComposition=u,r.v.AddConcept(T),p.concepts.push(T),T}catch(o){throw s.V.logError(g,n,"create","unknown","unknown",500,void 0,"createTheConceptLocal",[e,t,n,c,l,d,u],void 0),o}})}},3130:(e,t,n)=>{n.d(t,{BG:()=>c,SL:()=>l,XZ:()=>s,ZJ:()=>r,iw:()=>a,pU:()=>d,y0:()=>i,yv:()=>o});const o=1,i=2,r=3,a=4,s=5,c=6,l=7,d=8},3152:(e,t,n)=>{let o=n(3614),i=n(7668),r=n(3303),{isClean:a,my:s}=n(4151);function c(e,t){let n=new e.constructor;for(let o in e){if(!Object.prototype.hasOwnProperty.call(e,o))continue;if("proxyCache"===o)continue;let i=e[o],r=typeof i;"parent"===o&&"object"===r?t&&(n[o]=t):"source"===o?n[o]=i:Array.isArray(i)?n[o]=i.map(e=>c(e,n)):("object"===r&&null!==i&&(i=c(i)),n[o]=i)}return n}function l(e,t){if(t&&void 0!==t.offset)return t.offset;let n=1,o=1,i=0;for(let r=0;r<e.length;r++){if(o===t.line&&n===t.column){i=r;break}"\n"===e[r]?(n=1,o+=1):n+=1}return i}class d{get proxyOf(){return this}constructor(e={}){this.raws={},this[a]=!1,this[s]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let n of e[t])"function"==typeof n.clone?this.append(n.clone()):this.append(n)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=c(this);for(let n in e)t[n]=e[n];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:n,start:o}=this.rangeBy(t);return this.source.input.error(e,{column:o.column,line:o.line},{column:n.column,line:n.line},t)}return new o(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,n)=>(e[t]===n||(e[t]=n,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markClean(){this[a]=!0}markDirty(){if(this[a]){this[a]=!1;let e=this;for(;e=e.parent;)e[a]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e={}){let t=this.source.start;if(e.index)t=this.positionInside(e.index);else if(e.word){let n="document"in this.source.input?this.source.input.document:this.source.input.css,o=n.slice(l(n,this.source.start),l(n,this.source.end)).indexOf(e.word);-1!==o&&(t=this.positionInside(o))}return t}positionInside(e){let t=this.source.start.column,n=this.source.start.line,o="document"in this.source.input?this.source.input.document:this.source.input.css,i=l(o,this.source.start),r=i+e;for(let e=i;e<r;e++)"\n"===o[e]?(t=1,n+=1):t+=1;return{column:t,line:n,offset:r}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e={}){let t="document"in this.source.input?this.source.input.document:this.source.input.css,n={column:this.source.start.column,line:this.source.start.line,offset:l(t,this.source.start)},o=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:"number"==typeof this.source.end.offset?this.source.end.offset:l(t,this.source.end)+1}:{column:n.column+1,line:n.line,offset:n.offset+1};if(e.word){let i=t.slice(l(t,this.source.start),l(t,this.source.end)).indexOf(e.word);-1!==i&&(n=this.positionInside(i),o=this.positionInside(i+e.word.length))}else e.start?n={column:e.start.column,line:e.start.line,offset:l(t,e.start)}:e.index&&(n=this.positionInside(e.index)),e.end?o={column:e.end.column,line:e.end.line,offset:l(t,e.end)}:"number"==typeof e.endIndex?o=this.positionInside(e.endIndex):e.index&&(o=this.positionInside(e.index+1));return(o.line<n.line||o.line===n.line&&o.column<=n.column)&&(o={column:n.column+1,line:n.line,offset:n.offset+1}),{end:o,start:n}}raw(e,t){return(new i).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,n=!1;for(let o of e)o===this?n=!0:n?(this.parent.insertAfter(t,o),t=o):this.parent.insertBefore(t,o);n||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let n={},o=null==t;t=t||new Map;let i=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e))continue;if("parent"===e||"proxyCache"===e)continue;let o=this[e];if(Array.isArray(o))n[e]=o.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof o&&o.toJSON)n[e]=o.toJSON(null,t);else if("source"===e){if(null==o)continue;let r=t.get(o.input);null==r&&(r=i,t.set(o.input,i),i++),n[e]={end:o.end,inputId:r,start:o.start}}else n[e]=o}return o&&(n.inputs=[...t.keys()].map(e=>e.toJSON())),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=r){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,n={}){let o={node:this};for(let e in n)o[e]=n[e];return e.warn(t,o)}}e.exports=d,d.default=d},3295:(e,t,n)=>{t.__esModule=!0,t.default=void 0;var o=r(n(8937)),i=n(9606);function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}var c=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n);var c,l,d,u=r.prototype;return u.qualifiedName=function(e){return this.namespace?this.namespaceString+"|"+e:e},u.valueToString=function(){return this.qualifiedName(e.prototype.valueToString.call(this))},c=r,(l=[{key:"namespace",get:function(){return this._namespace},set:function(e){if(!0===e||"*"===e||"&"===e)return this._namespace=e,void(this.raws&&delete this.raws.namespace);var t=(0,o.default)(e,{isIdentifier:!0});this._namespace=e,t!==e?((0,i.ensureObject)(this,"raws"),this.raws.namespace=t):this.raws&&delete this.raws.namespace}},{key:"ns",get:function(){return this._namespace},set:function(e){this.namespace=e}},{key:"namespaceString",get:function(){if(this.namespace){var e=this.stringifyProperty("namespace");return!0===e?"":e}return""}}])&&a(c.prototype,l),d&&a(c,d),Object.defineProperty(c,"prototype",{writable:!1}),r}(r(n(4646)).default);t.default=c,e.exports=t.default},3303:(e,t,n)=>{let o=n(7668);function i(e,t){new o(t).stringify(e)}e.exports=i,i.default=i},3438:(e,t,n)=>{let o=n(396),i=n(9371),r=n(5238),a=n(1106),s=n(3878),c=n(5644),l=n(1534);function d(e,t){if(Array.isArray(e))return e.map(e=>d(e));let{inputs:n,...u}=e;if(n){t=[];for(let e of n){let n={...e,__proto__:a.prototype};n.map&&(n.map={...n.map,__proto__:s.prototype}),t.push(n)}}if(u.nodes&&(u.nodes=e.nodes.map(e=>d(e,t))),u.source){let{inputId:e,...n}=u.source;u.source=n,null!=e&&(u.source.input=t[e])}if("root"===u.type)return new c(u);if("decl"===u.type)return new r(u);if("rule"===u.type)return new l(u);if("comment"===u.type)return new i(u);if("atrule"===u.type)return new o(u);throw new Error("Unknown node type: "+e.type)}e.exports=d,d.default=d},3518:(e,t,n)=>{n.d(t,{BZ:()=>s,Xr:()=>r,ab:()=>a});var o=n(4024),i=n(490);function r(e="application/json",t="application/json"){var n;let i={},r=null===(n=o.b.sessionId)||void 0===n?void 0:n.toString();return i=""!=o.b.BearerAccessToken?{"Content-Type":e,Authorization:"Bearer "+o.b.BearerAccessToken,Accept:t,"X-Session-id":r}:{"Content-Type":e,Accept:t,"X-Session-id":r},i}function a(e="application/json",t="",n="application/json"){var i;""==t&&(t=o.b.BearerAccessToken);let r={},a=null===(i=o.b.sessionId)||void 0===i?void 0:i.toString();return r=""!=t?{"Content-Type":e,Authorization:"Bearer "+t,Accept:n,"X-Session-id":a}:{"Content-Type":e,Accept:n,"X-Session-id":a},r}function s(){var e;let t=o.b.BearerAccessToken,n=null===(e=o.b.sessionId)||void 0===e?void 0:e.toString();if(""==t){let e=(0,i.s)();""!=e.token&&(o.b.BearerAccessToken=e.token,t=e.token)}let r=new Headers;return r.append("Authorization","Bearer "+t),r.append("X-Session-Id",n),r}},3604:(e,t,n)=>{let{dirname:o,relative:i,resolve:r,sep:a}=n(197),{SourceMapConsumer:s,SourceMapGenerator:c}=n(1866),{pathToFileURL:l}=n(2739),d=n(1106),u=Boolean(s&&c),h=Boolean(o&&r&&i&&a);e.exports=class{constructor(e,t,n,o){this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=o,this.originalCSS=o,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,n=this.toUrl(this.path(e.file)),i=e.root||o(e.file);!1===this.mapOpts.sourcesContent?(t=new s(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,n,this.toUrl(this.path(i)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&e.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),h&&u&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=c.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new c({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new c({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,n=1,o=1,i="<no source>",r={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(a,s,c)=>{if(this.css+=a,s&&"end"!==c&&(r.generated.line=n,r.generated.column=o-1,s.source&&s.source.start?(r.source=this.sourcePath(s),r.original.line=s.source.start.line,r.original.column=s.source.start.column-1,this.map.addMapping(r)):(r.source=i,r.original.line=1,r.original.column=0,this.map.addMapping(r))),t=a.match(/\n/g),t?(n+=t.length,e=a.lastIndexOf("\n"),o=a.length-e):o+=a.length,s&&"start"!==c){let e=s.parent||{raws:{}};("decl"===s.type||"atrule"===s.type&&!s.nodes)&&s===e.last&&!e.raws.semicolon||(s.source&&s.source.end?(r.source=this.sourcePath(s),r.original.line=s.source.end.line,r.original.column=s.source.end.column-1,r.generated.line=n,r.generated.column=o-2,this.map.addMapping(r)):(r.source=i,r.original.line=1,r.original.column=0,r.generated.line=n,r.generated.column=o-1,this.map.addMapping(r)))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(e=>e.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(e=>e.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(e=>e.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let n=this.opts.to?o(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(n=o(r(n,this.mapOpts.annotation)));let a=i(n,e);return this.memoizedPaths.set(e,a),a}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new d(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let n=t.source.input.from;if(n&&!e[n]){e[n]=!0;let o=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(o,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(l){let t=l(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===a&&(e=e.replace(/\\/g,"/"));let n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}}},3614:(e,t,n)=>{let o=n(8633),i=n(9746);class r extends Error{constructor(e,t,n,o,i,a){super(e),this.name="CssSyntaxError",this.reason=e,i&&(this.file=i),o&&(this.source=o),a&&(this.plugin=a),void 0!==t&&void 0!==n&&("number"==typeof t?(this.line=t,this.column=n):(this.line=t.line,this.column=t.column,this.endLine=n.line,this.endColumn=n.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=o.isColorSupported);let n=e=>e,r=e=>e,a=e=>e;if(e){let{bold:e,gray:t,red:s}=o.createColors(!0);r=t=>e(s(t)),n=e=>t(e),i&&(a=e=>i(e))}let s=t.split(/\r?\n/),c=Math.max(this.line-3,0),l=Math.min(this.line+2,s.length),d=String(l).length;return s.slice(c,l).map((e,t)=>{let o=c+1+t,i=" "+(" "+o).slice(-d)+" | ";if(o===this.line){if(e.length>160){let t=20,o=Math.max(0,this.column-t),s=Math.max(this.column+t,this.endColumn+t),c=e.slice(o,s),l=n(i.replace(/\d/g," "))+e.slice(0,Math.min(this.column-1,t-1)).replace(/[^\t]/g," ");return r(">")+n(i)+a(c)+"\n "+l+r("^")}let t=n(i.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+n(i)+a(e)+"\n "+t+r("^")}return" "+n(i)+a(e)}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}}e.exports=r,r.default=r},3631:(e,t,n)=>{t.__esModule=!0,t.default=void 0;var o,i=(o=n(4646))&&o.__esModule?o:{default:o},r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=a(t);if(n&&n.has(e))return n.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var s=i?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(o,r,s):o[r]=e[r]}o.default=e,n&&n.set(e,o);return o}(n(1581));function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(a=function(e){return e?n:t})(e)}function s(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function l(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}var u=function(e){var t,n;function o(t){var n;return(n=e.call(this,t)||this).nodes||(n.nodes=[]),n}n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,d(t,n);var i,a,c,u=o.prototype;return u.append=function(e){return e.parent=this,this.nodes.push(e),this},u.prepend=function(e){for(var t in e.parent=this,this.nodes.unshift(e),this.indexes)this.indexes[t]++;return this},u.at=function(e){return this.nodes[e]},u.index=function(e){return"number"==typeof e?e:this.nodes.indexOf(e)},u.removeChild=function(e){var t;for(var n in e=this.index(e),this.at(e).parent=void 0,this.nodes.splice(e,1),this.indexes)(t=this.indexes[n])>=e&&(this.indexes[n]=t-1);return this},u.removeAll=function(){for(var e,t=s(this.nodes);!(e=t()).done;){e.value.parent=void 0}return this.nodes=[],this},u.empty=function(){return this.removeAll()},u.insertAfter=function(e,t){var n;t.parent=this;for(var o,i=this.index(e),r=[],a=2;a<arguments.length;a++)r.push(arguments[a]);for(var s in(n=this.nodes).splice.apply(n,[i+1,0,t].concat(r)),t.parent=this,this.indexes)i<(o=this.indexes[s])&&(this.indexes[s]=o+arguments.length-1);return this},u.insertBefore=function(e,t){var n;t.parent=this;for(var o,i=this.index(e),r=[],a=2;a<arguments.length;a++)r.push(arguments[a]);for(var s in(n=this.nodes).splice.apply(n,[i,0,t].concat(r)),t.parent=this,this.indexes)(o=this.indexes[s])>=i&&(this.indexes[s]=o+arguments.length-1);return this},u._findChildAtPosition=function(e,t){var n=void 0;return this.each(function(o){if(o.atPosition){var i=o.atPosition(e,t);if(i)return n=i,!1}else if(o.isAtPosition(e,t))return n=o,!1}),n},u.atPosition=function(e,t){return this.isAtPosition(e,t)?this._findChildAtPosition(e,t)||this:void 0},u._inferEndPosition=function(){this.last&&this.last.source&&this.last.source.end&&(this.source=this.source||{},this.source.end=this.source.end||{},Object.assign(this.source.end,this.last.source.end))},u.each=function(e){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach++;var t=this.lastEach;if(this.indexes[t]=0,this.length){for(var n,o;this.indexes[t]<this.length&&(n=this.indexes[t],!1!==(o=e(this.at(n),n)));)this.indexes[t]+=1;return delete this.indexes[t],!1!==o&&void 0}},u.walk=function(e){return this.each(function(t,n){var o=e(t,n);if(!1!==o&&t.length&&(o=t.walk(e)),!1===o)return!1})},u.walkAttributes=function(e){var t=this;return this.walk(function(n){if(n.type===r.ATTRIBUTE)return e.call(t,n)})},u.walkClasses=function(e){var t=this;return this.walk(function(n){if(n.type===r.CLASS)return e.call(t,n)})},u.walkCombinators=function(e){var t=this;return this.walk(function(n){if(n.type===r.COMBINATOR)return e.call(t,n)})},u.walkComments=function(e){var t=this;return this.walk(function(n){if(n.type===r.COMMENT)return e.call(t,n)})},u.walkIds=function(e){var t=this;return this.walk(function(n){if(n.type===r.ID)return e.call(t,n)})},u.walkNesting=function(e){var t=this;return this.walk(function(n){if(n.type===r.NESTING)return e.call(t,n)})},u.walkPseudos=function(e){var t=this;return this.walk(function(n){if(n.type===r.PSEUDO)return e.call(t,n)})},u.walkTags=function(e){var t=this;return this.walk(function(n){if(n.type===r.TAG)return e.call(t,n)})},u.walkUniversals=function(e){var t=this;return this.walk(function(n){if(n.type===r.UNIVERSAL)return e.call(t,n)})},u.split=function(e){var t=this,n=[];return this.reduce(function(o,i,r){var a=e.call(t,i);return n.push(i),a?(o.push(n),n=[]):r===t.length-1&&o.push(n),o},[])},u.map=function(e){return this.nodes.map(e)},u.reduce=function(e,t){return this.nodes.reduce(e,t)},u.every=function(e){return this.nodes.every(e)},u.some=function(e){return this.nodes.some(e)},u.filter=function(e){return this.nodes.filter(e)},u.sort=function(e){return this.nodes.sort(e)},u.toString=function(){return this.map(String).join("")},i=o,(a=[{key:"first",get:function(){return this.at(0)}},{key:"last",get:function(){return this.at(this.length-1)}},{key:"length",get:function(){return this.nodes.length}}])&&l(i.prototype,a),c&&l(i,c),Object.defineProperty(i,"prototype",{writable:!1}),o}(i.default);t.default=u,e.exports=t.default},3655:(e,t,n)=>{n.d(t,{D3:()=>m,El:()=>f,b8:()=>p,kH:()=>h,qI:()=>u,wh:()=>y});var o=n(2299),i=n(9581),r=n(8957),a=n(1863),s=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};let c=10;class l{}let d=null;function u(e){const t=r.Logger.logfunction("openDatabase",[e,"indexdb"]);return l.db?(r.Logger.logUpdate(t),Promise.resolve(l.db)):d||(d=new Promise(function(e,n){let o=i.B.BASE_URL+"_FreeSchema"+i.B.BASE_APPLICATION;const s=indexedDB.open(o,c);s.onupgradeneeded=e=>{let t=e.target.result,n="concept",o="connection",i="settings";t.objectStoreNames.contains(n)&&t.deleteObjectStore(n),t.objectStoreNames.contains(o)&&t.deleteObjectStore(o),t.objectStoreNames.contains(i)&&t.deleteObjectStore(i),t.createObjectStore(n,{keyPath:"id"}),t.createObjectStore(o,{keyPath:"id"}),t.createObjectStore(i,{keyPath:"id"})},s.onsuccess=function(n){let o=n.target;l.db=o.result,r.Logger.logUpdate(t),e(l.db)},s.onerror=e=>{d=null,(0,a.ey)(t,"openDatabase",e),n(e)}}),d)}function h(e,t){const n=r.Logger.logfunction("UpdateToDatabase",[e,"indexdb"]);return new Promise(function(o,i){u(e).then(s=>{const c=s.transaction(e,"readwrite").objectStore(e).put(t);c.onsuccess=e=>{r.Logger.logUpdate(n),o(t)},c.onerror=o=>{let r={status:400,ok:!1,message:"Cannot Update to the database"+e,data:o,body:t};(0,a.ey)(n,"UpdateToDatabase",r),i(r)}}).catch(e=>{let t={status:400,ok:!1,message:"Cannot update to database because you cannot open the database",data:e};(0,a.ey)(n,"UpdateToDatabase",t),i(t)})})}function p(){const e=r.Logger.logfunction("GetLastSettingsFromDatabase",["indexdb"]);return new Promise(function(t,n){let i="settings";u(i).then(s=>{let c=s.transaction(i,"readwrite").objectStore(i).getAll();c.onsuccess=()=>{let n=new o.B(!1),i=c.result;for(let e=0;e<i.length;e++)n=i[e];r.Logger.logUpdate(e),t(n)},c.onerror=t=>{(0,a.ey)(e,"GetLastSettingsFromDatabase",t),n(t)}}).catch(t=>{let o={status:400,ok:!1,message:"Cannot get last object from database because you cannot open the database",data:t};(0,a.ey)(e,"GetLastSettingsFromDatabase",o),n(o)})})}function f(e){const t=r.Logger.logfunction("AiUpdateFlag",["indexdb"]);return new Promise(function(n,o){let i="settings";u(i).then(s=>{const c=s.transaction(i,"readwrite").objectStore(i).put(e);c.onsuccess=o=>{r.Logger.logUpdate(t),n(e)},c.onerror=n=>{let i={status:400,ok:!1,message:"Cannot update AI flag",data:n,body:e};(0,a.ey)(t,"AiUpdateFlag",i),o(i)}}).catch(e=>{let n={status:400,ok:!1,message:"Cannot update AI flag because you cannot open the database",data:e};(0,a.ey)(t,"AiUpdateFlag",n),o(n)})})}function m(e){return s(this,void 0,void 0,function*(){const t=r.Logger.logfunction("getObjectsFromIndexDb",[e,"indexdb"]);return new Promise(function(n,o){u(e).then(o=>{let i=[],a=o.transaction(e,"readwrite").objectStore(e).getAll();a.onsuccess=()=>{const e=a.result;for(let t=0;t<e.length;t++)i.push(e[t]);r.Logger.logUpdate(t),n(i)}}).catch(e=>{let n={status:400,ok:!1,message:"Cannot get objects from the database because you cannot open the database",data:e};(0,a.ey)(t,"getObjectsFromIndexDb",n),o(n)})})})}function y(e,t){const n=r.Logger.logfunction("removeFromDatabase",[e,"indexdb"]);return new Promise(function(o,i){u(e).then(s=>{const c=s.transaction(e,"readwrite").objectStore(e).delete(Number(t));c.onsuccess=function(e){r.Logger.logUpdate(n),o(t)},c.onerror=t=>{let o={status:400,ok:!1,message:"Cannot remove from the database"+e,data:t};(0,a.ey)(n,"removeFromDatabase",o),i(o)}}).catch(e=>{let o={status:400,ok:!1,message:"Cannot remove from the database because you cannot open the database",data:e,body:t};(0,a.ey)(n,"removeFromDatabase",o),i(o)})})}},3717:(e,t,n)=>{let o=n(38);class i{get content(){return this.css}constructor(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css="",this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let n=new o(e,t);return this.messages.push(n),n}warnings(){return this.messages.filter(e=>"warning"===e.type)}}e.exports=i,i.default=i},3729:(e,t,n)=>{n.d(t,{D:()=>p});var o=n(9934),i=n(4485),r=n(2),a=n(7876),s=n(4818),c=n(999),l=n(5868),d=n(8957),u=n(176),h=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function p(e){return h(this,arguments,void 0,function*(e,t={concepts:[],connections:[]}){var n,h,p,f;performance.now();if(d.serviceWorker)try{const o=yield(0,d.sendMessage)("UpdateCompositionLocal",{patcherStructure:e,actions:t});return(null===(h=null===(n=null==o?void 0:o.actions)||void 0===n?void 0:n.concepts)||void 0===h?void 0:h.length)&&(t.concepts=JSON.parse(JSON.stringify(o.actions.concepts))),(null===(f=null===(p=null==o?void 0:o.actions)||void 0===p?void 0:p.connections)||void 0===f?void 0:f.length)&&(t.connections=JSON.parse(JSON.stringify(o.actions.connections))),o.data}catch(e){(0,d.handleServiceWorkerException)(e)}const m=e.userId,y=e.sessionId,v=e.accessId;let g=[];const C=[];let w=(0,d.CreateDefaultLConcept)(),T=(0,d.CreateDefaultLConcept)();const I=[],k=e.compositionId,b=e.ofTheCompositionId;let A=[];let S=yield(0,r.s)(k);for(let e=0;e<S.length;e++)g.push((0,u.P6)(S[e]));const L=[],N=[];let _=[];for(let e=0;e<g.length;e++)(0,o.A)(N,g[e].ofTheConceptId),(0,o.A)(L,g[e].ofTheConceptId),(0,o.A)(L,g[e].toTheConceptId),_.push(g[e].ofTheConceptId);for(let e=0;e<L.length;e++){const t=yield(0,a.A)(L[e]);k==L[e]&&(w=(0,u.F4)(t)),b==L[e]&&(T=(0,u.F4)(t)),C.push((0,u.F4)(t))}const x=e.patchObject;for(const e in x){let n=(0,d.CreateDefaultLConcept)();const o=x[e];let r=w;T.id>0&&(r=T),Array.isArray(o)||"object"==typeof o?(n=yield(0,l.k)(e,"",!0,w.userId,4,999,void 0,t),yield(0,c.R)(x[e],n.id,n.userId,w.id,w.userId,4,999,void 0,t)):n=yield(0,l.k)(e,o,!1,m,v,y,void 0,t);const a=(0,i.nm)(C,n);for(let e=0;e<a.length;e++)if(a[e].id>0){const t=(0,i.gt)(g,a[e].id);A=A.concat(t),I.push(a[e])}yield(0,d.CreateTheConnectionLocal)(r.id,n.id,w.id,2,void 0,void 0,t);C.push(n)}for(let e=0;e<A.length;e++)yield(0,s.m)(A[e].id);yield d.LocalSyncData.SyncDataOnline(void 0,t)})}},3878:(e,t,n)=>{let{existsSync:o,readFileSync:i}=n(9977),{dirname:r,join:a}=n(197),{SourceMapConsumer:s,SourceMapGenerator:c}=n(1866);class l{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let n=t.map?t.map.prev:void 0,o=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=r(this.mapFile)),o&&(this.text=o)}consumer(){return this.consumerCache||(this.consumerCache=new s(this.text)),this.consumerCache}decodeInline(e){let t=e.match(/^data:application\/json;charset=utf-?8,/)||e.match(/^data:application\/json,/);if(t)return decodeURIComponent(e.substr(t[0].length));let n=e.match(/^data:application\/json;charset=utf-?8;base64,/)||e.match(/^data:application\/json;base64,/);if(n)return o=e.substr(n[0].length),Buffer?Buffer.from(o,"base64").toString():window.atob(o);var o;let i=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+i)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/g);if(!t)return;let n=e.lastIndexOf(t.pop()),o=e.indexOf("*/",n);n>-1&&o>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,o)))}loadFile(e){if(this.root=r(e),o(e))return this.mapFile=e,i(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof s)return c.fromSourceMap(t).toString();if(t instanceof c)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let n=t(e);if(n){let e=this.loadFile(n);if(!e)throw new Error("Unable to load previous source map: "+n.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=a(r(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}e.exports=l,l.default=l},3996:(e,t,n)=>{n.d(t,{i:()=>o});class o{constructor(e,t,n,o){this.key="",this.value=[],this.height=1,this.key=e,this.value=t,this.leftNode=n,this.rightNode=o}getFromNode(e,t){return t?e==t.key?t:e<t.key?this.getFromNode(e,t.leftNode):e>t.key?this.getFromNode(e,t.rightNode):t:t}rightRotate(e){if(e){let t=e.leftNode;if(t){let n=t.rightNode;return e.leftNode=n,t.rightNode=e,e.height=Math.max(this.getHeight(e.leftNode),this.getHeight(e.rightNode))+1,t.height=Math.max(this.getHeight(t.leftNode),this.getHeight(t.rightNode))+1,t}}return e}leftRotate(e){if(e){let t=e.rightNode;if(t){let n=t.leftNode;return t.leftNode=e,e.rightNode=n,e.height=Math.max(this.getHeight(e.leftNode),this.getHeight(e.rightNode))+1,t.height=Math.max(this.getHeight(t.leftNode),this.getHeight(e.rightNode))+1,t}}return e}getHeight(e){return e?e.height:0}getBalanceFactor(e){return null==e?0:this.getHeight(e.leftNode)-this.getHeight(e.rightNode)}removeNode(e,t){if(null==e)return e;if(e.key>t)return e.leftNode=this.removeNode(e.leftNode,t),e;if(e.key<t)return e.rightNode=this.removeNode(e.rightNode,t),e;if(null==e.leftNode){let t=e.rightNode;return e=null,t}if(null==e.rightNode){let t=e.leftNode;return e=null,t}{let t=this.inOrderSuccessor(e.rightNode);return e.value=t.value,e.key=t.key,e.variants=t.variants,e.currentNode=t.currentNode,e.rightNode=this.removeNode(e.rightNode,t.key),e}}inOrderSuccessor(e){for(;null!=e.leftNode;)e=e.leftNode;return e}}},4024:(e,t,n)=>{n.d(t,{b:()=>u});var o=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};const i="ccs_profile",r="AES-GCM";function a(e){return o(this,void 0,void 0,function*(){const t=(new TextEncoder).encode("mftsccs-browser-v1"),n=yield crypto.subtle.importKey("raw",t.buffer,"PBKDF2",!1,["deriveKey"]);return crypto.subtle.deriveKey({name:"PBKDF2",salt:e.buffer,iterations:1e5,hash:"SHA-256"},n,{name:r,length:256},!1,["encrypt","decrypt"])})}function s(e){return o(this,void 0,void 0,function*(){const t=new TextEncoder,n=crypto.getRandomValues(new Uint8Array(16)),o=crypto.getRandomValues(new Uint8Array(12)),s=yield a(n),c=t.encode(JSON.stringify(e)),l=yield crypto.subtle.encrypt({name:r,iv:o.buffer},s,c.buffer),d=new Uint8Array(n.length+o.length+new Uint8Array(l).length);d.set(n,0),d.set(o,n.length),d.set(new Uint8Array(l),n.length+o.length);try{localStorage.setItem(i,function(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}(d))}catch(e){}})}function c(){return o(this,void 0,void 0,function*(){const e=localStorage.getItem(i);if(!e)return null;let t;try{if(t=function(e){const t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}(e),t.length<29)throw new Error("too short")}catch(e){return l(),null}try{const e=t.slice(0,16),n=t.slice(16,28),o=t.slice(28),i=yield a(e),s=yield crypto.subtle.decrypt({name:r,iv:n.buffer},i,o.buffer);return JSON.parse((new TextDecoder).decode(s))}catch(e){return l(),null}})}function l(){localStorage.removeItem(i)}var d=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class u{static setSession(e){e&&(u.sessionId=e)}static saveUserProfile(e){return d(this,void 0,void 0,function*(){var t,n,o,i,r,a,c,l,d,h,p,f,m,y,v,g,C;try{const w=null!==(t=null==e?void 0:e.data)&&void 0!==t?t:e,T=null!==(n=null==w?void 0:w.token)&&void 0!==n?n:"",I=null!==(i=null!==(o=null==w?void 0:w.refreshtoken)&&void 0!==o?o:null==w?void 0:w.refreshToken)&&void 0!==i?i:"";u.BearerAccessToken=T,u.refreshToken=I;const k={token:T,refreshToken:I,email:null!==(r=null==w?void 0:w.email)&&void 0!==r?r:"",userId:null!==(h=null!==(d=null!==(l=null===(c=null===(a=null==w?void 0:w.entity)||void 0===a?void 0:a[0])||void 0===c?void 0:c.userId)&&void 0!==l?l:null==w?void 0:w.userId)&&void 0!==d?d:null==w?void 0:w.theUserId)&&void 0!==h?h:0,userConcept:null!==(p=null==w?void 0:w.userConcept)&&void 0!==p?p:0,entityId:null!==(y=null!==(m=null===(f=null==w?void 0:w.entityDetails)||void 0===f?void 0:f.id)&&void 0!==m?m:null==w?void 0:w.entityId)&&void 0!==y?y:0,roles:null!==(v=null==w?void 0:w.roles)&&void 0!==v?v:[],amcode:null!==(g=null==w?void 0:w.amcode)&&void 0!==g?g:btoa(JSON.stringify(null!==(C=null==w?void 0:w.roles)&&void 0!==C?C:[]))};return u.profileCache=k,yield s(k),!0}catch(e){return!1}})}static hydrateProfile(){return d(this,void 0,void 0,function*(){var e,t;if(!u.profileCache){const n=yield c();n&&(u.profileCache=n,u.BearerAccessToken=null!==(e=n.token)&&void 0!==e?e:"",u.refreshToken=null!==(t=n.refreshToken)&&void 0!==t?t:"")}})}static logout(){u.BearerAccessToken="",u.refreshToken="",u.profileCache=null,l()}}u.BearerAccessToken="",u.refreshToken="",u.sessionId=998,u.profileCache=null},4151:e=>{e.exports.isClean=Symbol("isClean"),e.exports.my=Symbol("my")},4195:(e,t,n)=>{t.__esModule=!0,t.default=void 0;var o=s(n(8937)),i=n(9606),r=s(n(4646)),a=n(1581);function s(e){return e&&e.__esModule?e:{default:e}}function c(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}var d=function(e){var t,n,r,s,d;function u(t){var n;return(n=e.call(this,t)||this).type=a.CLASS,n._constructed=!0,n}return n=e,(t=u).prototype=Object.create(n.prototype),t.prototype.constructor=t,l(t,n),u.prototype.valueToString=function(){return"."+e.prototype.valueToString.call(this)},r=u,(s=[{key:"value",get:function(){return this._value},set:function(e){if(this._constructed){var t=(0,o.default)(e,{isIdentifier:!0});t!==e?((0,i.ensureObject)(this,"raws"),this.raws.value=t):this.raws&&delete this.raws.value}this._value=e}}])&&c(r.prototype,s),d&&c(r,d),Object.defineProperty(r,"prototype",{writable:!1}),u}(r.default);t.default=d,e.exports=t.default},4211:(e,t,n)=>{let o=n(3604),i=n(9577);const r=n(3717);let a=n(3303);n(6156);class s{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=i;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,t,n){let i;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=n,this._map=void 0;let s=a;this.result=new r(this._processor,i,this._opts),this.result.css=t;let c=this;Object.defineProperty(this.result,"root",{get:()=>c.root});let l=new o(s,i,this._opts,t);if(l.isMap()){let[e,t]=l.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else l.clearAnnotation(),this.result.css=l.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}}e.exports=s,s.default=s},4287:(e,t,n)=>{n.d(t,{w:()=>a});var o=n(8957),i=n(3130),r=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class a{constructor(){this.subscribers=[],this.mainConcept=0,this.compositionIds=[],this.conceptIds=[],this.internalConnections=[],this.reverse=[],this.linkers=[],this.newIds=[],this.dependency=[],this.isDataLoaded=!1,this.isUpdating=!1,this.fetched=!1,this.format=i.yv,this.eventHandlers={}}listenToEventType(e){if(this.eventHandlers[e])return;const t=e=>r(this,void 0,void 0,function*(){if(!this.isUpdating){this.isUpdating=!0;let t=this;setTimeout(function(){return r(this,void 0,void 0,function*(){try{let n=e;if(!t.compositionIds.includes(null==n?void 0:n.detail)){t.compositionIds.unshift(null==n?void 0:n.detail),t.listenToEvent(null==n?void 0:n.detail);let e=null==n?void 0:n.detail,i=yield o.ConnectionData.GetConnectionByOfTheConceptAndType(e,e);for(let e=0;e<i.length;e++)yield o.ConnectionData.GetConnection(i[e]).then(e=>{e.typeId==t.mainConcept?t.internalConnections.includes(e.id)||t.internalConnections.push(e.id):t.linkers.includes(e.id)||t.linkers.push(e.id),t.conceptIds.includes(e.toTheConceptId)||t.conceptIds.push(e.toTheConceptId),t.compositionIds.includes(e.ofTheConceptId)||t.compositionIds.push(e.ofTheConceptId)})}t.isUpdating=!1,yield t.bind(),t.notify()}catch(e){throw t.isUpdating=!1,e}})},200)}});this.eventHandlers[e]=t,window.addEventListener(`${e}`,t)}listenToEvent(e){if(this.eventHandlers[e])return;const t=t=>r(this,void 0,void 0,function*(){if(!this.isUpdating){this.isUpdating=!0;let t=this;setTimeout(function(){return r(this,void 0,void 0,function*(){try{let n=yield o.ConnectionData.GetConnectionByOfTheConceptAndType(e,e);for(let e=0;e<n.length;e++)yield o.ConnectionData.GetConnection(n[e]).then(e=>{e.typeId==t.mainConcept?t.internalConnections.includes(e.id)||t.internalConnections.push(e.id):t.linkers.includes(e.id)||t.linkers.push(e.id),t.conceptIds.includes(e.toTheConceptId)||t.conceptIds.push(e.toTheConceptId),t.compositionIds.includes(e.ofTheConceptId)||(t.compositionIds.push(e.ofTheConceptId),t.newIds.includes(e.ofTheConceptId)||t.newIds.push(e.ofTheConceptId))});t.isUpdating=!1,yield t.bind(),t.notify()}catch(e){throw t.isUpdating=!1,e}})},200)}});this.eventHandlers[e]=t,window.addEventListener(`${e}`,t)}removeListenToEvent(e){const t=this.eventHandlers[e];t&&(window.removeEventListener(`${e}`,t),delete this.eventHandlers[e])}listenToEventConnectionType(e,t){const n=`${e}_type_${t}`;if(this.eventHandlers[n])return;const i=n=>r(this,void 0,void 0,function*(){if(!this.isUpdating){this.isUpdating=!0;let n=this;setTimeout(function(){return r(this,void 0,void 0,function*(){try{let i=yield o.ConnectionData.GetConnectionByOfTheConceptAndType(e,e);for(let e=0;e<i.length;e++)i[e].typeId==t&&(yield o.ConnectionData.GetConnection(i[e]).then(e=>{e.typeId==n.mainConcept?n.internalConnections.includes(e.id)||n.internalConnections.push(e.id):n.linkers.includes(e.id)||n.linkers.push(e.id),n.conceptIds.includes(e.toTheConceptId)||n.conceptIds.push(e.toTheConceptId),n.compositionIds.includes(e.ofTheConceptId)||n.compositionIds.push(e.ofTheConceptId)}));n.isUpdating=!1,yield n.bind(),n.notify()}catch(e){throw n.isUpdating=!1,e}})},200)}});this.eventHandlers[n]=i,window.addEventListener(`${e}`,i)}bind(){return r(this,void 0,void 0,function*(){})}run(){return r(this,void 0,void 0,function*(){})}update(){return r(this,void 0,void 0,function*(){this.isDataLoaded=!1,yield this.bind(),this.notify()})}subscribe(e,t){this.subscribers.push(e);const n=()=>this.unsubscribe(e),o=this.bind().then(()=>r(this,void 0,void 0,function*(){return yield e(this.data,this),{unsubscribe:n}})).catch(e=>{throw t&&t(e),e});return o.unsubscribe=n,o}execute(){return r(this,void 0,void 0,function*(){return yield this.run()})}unsubscribe(e){return this.subscribers=this.subscribers.filter(t=>t!=e),this.subscribers.length}notify(){this.subscribers.map(e=>{e(this.data,this)})}}},4310:(e,t,n)=>{n.d(t,{Cp:()=>y,ix:()=>C,ml:()=>g,qj:()=>v});var o=n(8957),i=n(3655),r=n(1596),a=n(4698),s=n(1863),c=n(1320),l=n(3518),d=n(785),u=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};const h=new Map,p=new Map,f=new Map;function m(e,t){o.BaseUrl.isPwa&&(()=>u(this,void 0,void 0,function*(){const n=new Set(t);for(const t of e){const e=yield o.ConnectionData.GetConnection(t);e&&(null==e?void 0:e.id)>0&&(n.add(e.ofTheConceptId),n.add(e.toTheConceptId),n.add(e.typeId),(0,i.kH)("connection",e))}for(const e of n)if(e>0){const t=yield o.ConceptsData.GetConcept(e);t&&t.id>0&&(0,i.kH)("concept",t)}}))().catch(()=>{})}function y(e){var t=arguments;return u(this,void 0,void 0,function*(){o.Logger.logfunction("BuildWidgetFromId",t);try{if(o.serviceWorker){return(yield(0,o.sendMessage)("BuildWidgetFromId",{id:e})).data}}catch(e){(0,o.handleServiceWorkerException)(e)}let n={};if(h.has(e))return h.get(e)||n;let i=(0,l.Xr)("application/json"),r=o.BaseUrl.getWidgetData()+"?id="+e;const p=d.i.getWidget(e);if(p){fetch(r,{method:"GET",headers:i}).then(t=>u(this,void 0,void 0,function*(){if(t.ok){const n=yield t.json();d.i.setWidget(e,n)}else(0,s.ry)(t)})).catch(()=>{});let t=(0,a.w)(p.countinfo),n=yield(0,c.e$)(p.linkers,p.conceptIds,p.mainCompositionIds,p.reverse,t,"DESC");return m(p.linkers,p.conceptIds),n}const f=(()=>u(this,void 0,void 0,function*(){try{const t=yield fetch(r,{method:"GET",headers:i});if(t.ok){let o=yield t.json();d.i.setWidget(e,o);let i=(0,a.w)(o.countinfo);return n=yield(0,c.e$)(o.linkers,o.conceptIds,o.mainCompositionIds,o.reverse,i,"DESC"),m(o.linkers,o.conceptIds),n}return(0,s.ry)(t),[]}catch(e){throw e}finally{h.delete(e)}}))();return h.set(e,f),f})}function v(e){var t=arguments;return u(this,void 0,void 0,function*(){o.Logger.logfunction("BuildWidgetFromIdForLatest",t);try{if(o.serviceWorker){return(yield(0,o.sendMessage)("BuildWidgetFromIdForLatest",{id:e})).data}}catch(e){(0,o.handleServiceWorkerException)(e)}let n={};if(p.has(e))return p.get(e)||n;let i=(0,l.Xr)("application/json");const h=d.i.getLatest(e);if(h){(()=>u(this,void 0,void 0,function*(){let t;try{let n=o.BaseUrl.getLatestWidgetData()+"?id="+e;t=yield fetch(n,{method:"GET",headers:i})}catch(n){t=yield(0,r.g)({method:"GET",headers:i},"?id="+e)}if(t.ok){const n=yield t.json();d.i.setLatest(e,n)}else(0,s.ry)(t)}))().catch(()=>{});let t=(0,a.w)(h.countinfo),n=yield(0,c.e$)(h.linkers,h.conceptIds,h.mainCompositionIds,h.reverse,t,"DESC");return m(h.linkers,h.conceptIds),{data:n,mainId:h.mainId}}const f=(()=>u(this,void 0,void 0,function*(){try{let t;try{let n=o.BaseUrl.getLatestWidgetData()+"?id="+e;t=yield fetch(n,{method:"GET",headers:i})}catch(n){t=yield(0,r.g)({method:"GET",headers:i},"?id="+e)}if(t.ok){let o=yield t.json();d.i.setLatest(e,o);let i=(0,a.w)(o.countinfo);return n=yield(0,c.e$)(o.linkers,o.conceptIds,o.mainCompositionIds,o.reverse,i,"DESC"),m(o.linkers,o.conceptIds),{data:n,mainId:o.mainId}}return(0,s.ry)(t),[]}catch(e){throw e}finally{p.delete(e)}}))();return p.set(e,f),f})}function g(e){var t=arguments;return u(this,void 0,void 0,function*(){o.Logger.logfunction("BuildWidgetFromIdForRecent",t);try{if(o.serviceWorker){return(yield(0,o.sendMessage)("BuildWidgetFromIdForRecent",{id:e})).data}}catch(e){(0,o.handleServiceWorkerException)(e)}let n={};if(f.has(e))return f.get(e)||n;let i=(0,l.Xr)("application/json");const h=d.i.getRecent(e);if(h){(()=>u(this,void 0,void 0,function*(){let t;try{let n=o.BaseUrl.getRecentWidgetData()+"?id="+e;t=yield fetch(n,{method:"GET",headers:i})}catch(n){t=yield(0,r.g)({method:"GET",headers:i},"?id="+e)}if(t.ok){const n=yield t.json();d.i.setRecent(e,n)}else(0,s.ry)(t)}))().catch(()=>{});let t=(0,a.w)(h.countinfo),n=yield(0,c.e$)(h.linkers,h.conceptIds,h.mainCompositionIds,h.reverse,t,"DESC");return m(h.linkers,h.conceptIds),{data:n,mainId:h.mainId}}const p=(()=>u(this,void 0,void 0,function*(){try{let t;try{let n=o.BaseUrl.getRecentWidgetData()+"?id="+e;t=yield fetch(n,{method:"GET",headers:i})}catch(n){t=yield(0,r.g)({method:"GET",headers:i},"?id="+e)}if(t.ok){let o=yield t.json();d.i.setRecent(e,o);let i=(0,a.w)(o.countinfo);return n=yield(0,c.e$)(o.linkers,o.conceptIds,o.mainCompositionIds,o.reverse,i,"DESC"),m(o.linkers,o.conceptIds),{data:n,mainId:o.mainId}}return(0,s.ry)(t),[]}catch(e){throw e}finally{f.delete(e)}}))();return f.set(e,p),p})}function C(e,t){for(let n=0;n<e.length;n++)if(e[n].id==t)return e[n]}},4364:(e,t,n)=>{n.d(t,{s:()=>a});var o=n(1239),i=n(8957),r=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function a(){return r(this,arguments,void 0,function*(e=[]){const t=i.Logger.logfunction("FindConceptsFromConnections",[e.length]);let n=[];if(e.length>0){for(let t=0;t<e.length;t++)n.includes(e[t].ofTheConceptId)||n.push(e[t].ofTheConceptId),n.includes(e[t].toTheConceptId)||n.push(e[t].toTheConceptId),n.includes(e[t].typeId)||n.push(e[t].typeId);yield(0,o.r)(n)}i.Logger.logUpdate(t)})}},4402:(e,t,n)=>{n.d(t,{A:()=>d});var o=n(3026),i=n(9581),r=n(3518),a=n(1863),s=n(8957),c=n(7876),l=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function d(e,t){var n=arguments;return l(this,void 0,void 0,function*(){const l=s.Logger.logfunction("GetConceptByCharacterAndType",n);try{if(s.serviceWorker)try{return(yield(0,s.sendMessage)("GetConceptByCharacterAndType",{characterValue:e,typeId:t})).data}catch(e){(0,s.handleServiceWorkerException)(e)}let n=yield o.I.GetConceptByCharacterAndTypeLocal(e,t);if(null==n||0==n.id){var d={character_value:`${e}`,type_id:t},u=JSON.stringify(d),h=(0,r.Xr)();const s=yield fetch(i.B.GetConceptByCharacterAndTypeUrl(),{method:"POST",headers:h,body:u});if(s.ok){let e=yield s.json();n=e,(0,c.K)(n).then(e=>{o.I.AddConcept(n)})}else(0,a.ry)(s)}return s.Logger.logUpdate(l),n}catch(e){Error,(0,a.Mb)(e,i.B.GetConceptByCharacterAndTypeUrl()),(0,a.ey)(l,"GetConceptByCharacterAndType",e)}})}},4451:(e,t,n)=>{t.__esModule=!0,t.universal=t.tag=t.string=t.selector=t.root=t.pseudo=t.nesting=t.id=t.comment=t.combinator=t.className=t.attribute=void 0;var o=m(n(5588)),i=m(n(4195)),r=m(n(1704)),a=m(n(425)),s=m(n(7071)),c=m(n(2918)),l=m(n(7324)),d=m(n(518)),u=m(n(339)),h=m(n(5799)),p=m(n(9720)),f=m(n(1669));function m(e){return e&&e.__esModule?e:{default:e}}t.attribute=function(e){return new o.default(e)};t.className=function(e){return new i.default(e)};t.combinator=function(e){return new r.default(e)};t.comment=function(e){return new a.default(e)};t.id=function(e){return new s.default(e)};t.nesting=function(e){return new c.default(e)};t.pseudo=function(e){return new l.default(e)};t.root=function(e){return new d.default(e)};t.selector=function(e){return new u.default(e)};t.string=function(e){return new h.default(e)};t.tag=function(e){return new p.default(e)};t.universal=function(e){return new f.default(e)}},4485:(e,t,n)=>{n.d(t,{gt:()=>a,nm:()=>i,vo:()=>o,wS:()=>r});n(2155),n(7282);function o(e=[],t){var n,o;let i=[],r=null===(n=t.type)||void 0===n?void 0:n.characterValue;if((null==r?void 0:r.startsWith("the_"))||(r="the_"+r),Array.isArray(e))for(let n=0;n<e.length;n++){let a=null===(o=e[n].type)||void 0===o?void 0:o.characterValue;(null==a?void 0:a.startsWith("the_"))||(a="the_"+a),t.typeId!=e[n].typeId&&r!=a||i.push(e[n])}return i}function i(e=[],t){let n=[],o=t.typeCharacter;if((null==o?void 0:o.startsWith("the_"))||(o="the_"+o),Array.isArray(e))for(let i=0;i<e.length;i++){let r=e[i].typeCharacter;(null==r?void 0:r.startsWith("the_"))||(r="the_"+r),t.typeId!=e[i].typeId&&o!=r||n.push(e[i])}return n}function r(e=[],t){let n=[];if(Array.isArray(e)){const o=e.find(e=>e.toTheConceptId==t);o&&n.push(o);const i=e.find(e=>e.ofTheConceptId==t);i&&n.push(i)}return n}function a(e=[],t){let n=[];if(Array.isArray(e)){const o=e.find(e=>e.toTheConceptId==t);o&&n.push(o);const i=e.find(e=>e.ofTheConceptId==t);i&&n.push(i)}return n}},4643:(e,t,n)=>{function o(e){try{if(!n.g.localStorage)return!1}catch(e){return!1}var t=n.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}e.exports=function(e,t){if(o("noDeprecation"))return e;var n=!1;return function(){if(!n){if(o("throwDeprecation"))throw new Error(t);o("traceDeprecation"),n=!0}return e.apply(this,arguments)}}},4646:(e,t,n)=>{t.__esModule=!0,t.default=void 0;var o=n(9606);function i(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var r=function e(t,n){if("object"!=typeof t||null===t)return t;var o=new t.constructor;for(var i in t)if(t.hasOwnProperty(i)){var r=t[i];"parent"===i&&"object"===typeof r?n&&(o[i]=n):o[i]=r instanceof Array?r.map(function(t){return e(t,o)}):e(r,o)}return o},a=function(){function e(e){void 0===e&&(e={}),Object.assign(this,e),this.spaces=this.spaces||{},this.spaces.before=this.spaces.before||"",this.spaces.after=this.spaces.after||""}var t,n,a,s=e.prototype;return s.remove=function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this},s.replaceWith=function(){if(this.parent){for(var e in arguments)this.parent.insertBefore(this,arguments[e]);this.remove()}return this},s.next=function(){return this.parent.at(this.parent.index(this)+1)},s.prev=function(){return this.parent.at(this.parent.index(this)-1)},s.clone=function(e){void 0===e&&(e={});var t=r(this);for(var n in e)t[n]=e[n];return t},s.appendToPropertyAndEscape=function(e,t,n){this.raws||(this.raws={});var o=this[e],i=this.raws[e];this[e]=o+t,i||n!==t?this.raws[e]=(i||o)+n:delete this.raws[e]},s.setPropertyAndEscape=function(e,t,n){this.raws||(this.raws={}),this[e]=t,this.raws[e]=n},s.setPropertyWithoutEscape=function(e,t){this[e]=t,this.raws&&delete this.raws[e]},s.isAtPosition=function(e,t){if(this.source&&this.source.start&&this.source.end)return!(this.source.start.line>e)&&(!(this.source.end.line<e)&&(!(this.source.start.line===e&&this.source.start.column>t)&&!(this.source.end.line===e&&this.source.end.column<t)))},s.stringifyProperty=function(e){return this.raws&&this.raws[e]||this[e]},s.valueToString=function(){return String(this.stringifyProperty("value"))},s.toString=function(){return[this.rawSpaceBefore,this.valueToString(),this.rawSpaceAfter].join("")},t=e,(n=[{key:"rawSpaceBefore",get:function(){var e=this.raws&&this.raws.spaces&&this.raws.spaces.before;return void 0===e&&(e=this.spaces&&this.spaces.before),e||""},set:function(e){(0,o.ensureObject)(this,"raws","spaces"),this.raws.spaces.before=e}},{key:"rawSpaceAfter",get:function(){var e=this.raws&&this.raws.spaces&&this.raws.spaces.after;return void 0===e&&(e=this.spaces.after),e||""},set:function(e){(0,o.ensureObject)(this,"raws","spaces"),this.raws.spaces.after=e}}])&&i(t.prototype,n),a&&i(t,a),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=a,e.exports=t.default},4698:(e,t,n)=>{n.d(t,{V:()=>c,w:()=>s});var o=n(7139),i=n(8957),r=n(276),a=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function s(e=[]){let t=[];if(e.length>0)for(let n=0;n<e.length;n++){let o=l(e[n]);t.push(o)}return t}function c(e){var t=arguments;return a(this,void 0,void 0,function*(){const n=i.Logger.logfunction("GetConnectionTypeForCount",t);let r={};for(let t=0;t<e.length;t++){let n=yield(0,o.r)(e[t].connectionTypeId);e[t].connectionType=n.characterValue,r[e[t].conceptId]=e[t]}return i.Logger.logUpdate(n),r})}function l(e){const t=e.split("_");if(3===t.length){let e=new r.y;return e.conceptId=Number(t[0]),e.connectionTypeId=Number(t[1]),e.count=Number(t[2]),e}throw new Error("Input string must contain exactly three parts separated by underscores.")}},4711:(e,t,n)=>{n.d(t,{F:()=>l,d:()=>d});var o=n(2155),i=n(4864),r=n(5257),a=n(9700),s=n(8957),c=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function l(e,t,n){return c(this,arguments,void 0,function*(e,t,n,c=1,l="",d=999,u={concepts:[],connections:[]}){var h,p,f,m;let y=performance.now();if(s.serviceWorker)try{const o=yield(0,s.sendMessage)("CreateTheConnectionLocal",{ofTheConceptId:e,toTheConceptId:t,typeId:n,orderId:c,typeString:l,userId:d,actions:u});return(null===(p=null===(h=null==o?void 0:o.actions)||void 0===h?void 0:h.concepts)||void 0===p?void 0:p.length)&&(u.concepts=JSON.parse(JSON.stringify(o.actions.concepts))),(null===(m=null===(f=null==o?void 0:o.actions)||void 0===f?void 0:f.connections)||void 0===m?void 0:m.length)&&(u.connections=JSON.parse(JSON.stringify(o.actions.connections))),o.data}catch(e){(0,s.handleServiceWorkerException)(e)}try{let a=4,h=yield r.R.getConnectionId(),p=0,f=0,m=0;p=e,f=t,m=n;let y=new o.N(0,0,0,0,0,0,0);return e!=t&&(y=new o.N(h,p,f,d,n,c,a),y.isTemp=!0,y.typeCharacter=l,s.LocalSyncData.AddConnection(y),i.G.AddConnection(y),u.connections.push(y)),y}catch(o){throw a.V.logError(y,d,"create","Unknown","Unknown",500,void 0,"CreateTheConnectionLocal",[e,t,n,c,l,d],"UnknownUserAgent",[]),o}})}function d(e,t,n){return c(this,arguments,void 0,function*(e,t,n,o={concepts:[],connections:[]}){var i,r,a,c;if(s.serviceWorker)try{const l=yield(0,s.sendMessage)("CreateConnection",{ofTheConcept:e,toTheConcept:t,connectionTypeString:n,actions:o});return(null===(r=null===(i=null==l?void 0:l.actions)||void 0===i?void 0:i.concepts)||void 0===r?void 0:r.length)&&(o.concepts=JSON.parse(JSON.stringify(l.actions.concepts))),(null===(c=null===(a=null==l?void 0:l.actions)||void 0===a?void 0:a.connections)||void 0===c?void 0:c.length)&&(o.connections=JSON.parse(JSON.stringify(l.actions.connections))),l.data}catch(e){(0,s.handleServiceWorkerException)(e)}let d=yield(0,s.MakeTheTypeConceptLocal)(n,999,999,999),u=e.userId;return yield l(e.id,t.id,d.id,1e3,n,u,o)})}},4818:(e,t,n)=>{n.d(t,{m:()=>h,E:()=>p});var o=n(8957),i=n(1863),r=n(3518),a=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};var s=n(9581),c=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};var l=n(5239),d=n(4864),u=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function h(e){var t=arguments;return u(this,void 0,void 0,function*(){const n=o.Logger.logfunction("DeleteConnectionById",t);if(o.serviceWorker)try{return(yield(0,o.sendMessage)("DeleteConnectionById",{id:e})).data}catch(e){(0,o.handleServiceWorkerException)(e)}let a=!0;return e>0?(a=yield function(e){var t=arguments;return c(this,void 0,void 0,function*(){const n=o.Logger.logfunction("DeleteTheConnection",t);let a=!1;try{const t=new FormData;t.append("id",e.toString());let c=(0,r.BZ)();const l=yield fetch(s.B.DeleteTheConnectionUrl(),{method:"POST",headers:c,body:t,redirect:"follow"});o.Logger.logUpdate(n),l.ok?a=(yield l.json()).success:(0,i.ry)(l),a&&o.ConnectionData.AddNpConn(e)}catch(e){Error,(0,i.Mb)(e,s.B.DeleteTheConnectionUrl()),(0,i.ey)(n,"DeleteTheConnection",e)}return a})}(e),l.O.removeNodeFromTree(e)):d.G.RemoveConnectionById(e),o.Logger.logUpdate(n),a})}function p(e){var t=arguments;return u(this,void 0,void 0,function*(){const n=o.Logger.logfunction("DeleteConnectionByIdBulk",t);if(o.serviceWorker)try{return(yield(0,o.sendMessage)("DeleteConnectionByIdBulk",{ids:e})).data}catch(e){(0,o.handleServiceWorkerException)(e)}let s=yield function(e){var t=arguments;return a(this,void 0,void 0,function*(){const n=o.Logger.logfunction("DeleteTheConnectionBulkApi",t);let a=!1;try{let t=(0,r.BZ)();t.append("Content-Type","application/json");const s=yield fetch(o.BaseUrl.DeleteTheConnectionBulkUrl(),{method:"POST",headers:t,body:JSON.stringify(e)});if(o.Logger.logUpdate(n),s.ok?a=(yield s.json()).success:(0,i.ry)(s),a)for(let t=0;t<e.length;t++){let n=e[t];o.ConnectionData.AddNpConn(n)}}catch(e){Error,(0,i.Mb)(e,o.BaseUrl.DeleteTheConnectionUrl()),(0,i.ey)(n,"DeleteTheConnectionBulkApi",e)}return a})}(e);if(s)for(let t=0;t<e.length;t++){let n=e[t];n>0?l.O.removeNodeFromTree(n):d.G.RemoveConnectionById(n)}return o.Logger.logUpdate(n),s})}},4864:(e,t,n)=>{n.d(t,{G:()=>c});var o=n(2155);var i=n(8286),r=n(205),a=n(628),s=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class c{constructor(){this.name="Connection Array"}static CheckContains(e){for(var t=!1,n=0;n<this.connectionArray.length;n++)this.connectionArray[n].id==e.id&&(t=!0);return t}static AddConnection(e){this.CheckContains(e)&&this.RemoveConnection(e),e.id,this.connectionArray.push(e)}static AddConnectionToMemory(e){this.CheckContains(e)&&this.RemoveConnection(e),this.connectionArray.push(e)}static AddToDictionary(e){this.connectionDictionary[e.id]=e}static RemoveConnection(e){for(var t=0;t<this.connectionArray.length;t++)this.connectionArray[t].id==e.id&&this.connectionArray.splice(t,1);e.id}static RemoveConnectionById(e){for(var t=0;t<this.connectionArray.length;t++)this.connectionArray[t].id==e&&this.connectionArray.splice(t,1);a.H.RemoveConnectionById(e)}static AddPermanentConnection(e){e.id>0&&i.d.AddConnection(function(e){let t=new o.N(0,0,0,0,0,0,0);return t.ofTheConceptId=e.ofTheConceptId,t.toTheConceptId=e.toTheConceptId,t.typeId=e.typeId,t.orderId=e.orderId,t.id=e.id,t}(e))}static GetConnection(e){var t;t=null;for(var n=0;n<this.connectionArray.length;n++)this.connectionArray[n].id==e&&(t=this.connectionArray[n]);return t}static waitForDataToLoad(){return s(this,void 0,void 0,function*(){return new Promise((e,t)=>{this.checkFlag(e),setTimeout(()=>{t("not")},25e3)})})}static checkFlag(e){if(r.B.isLocalConnectionLoaded)return e("done");setTimeout(c.checkFlag,1e3,e)}static GetConnectionsOfCompositionLocal(e){return s(this,void 0,void 0,function*(){var t=[];try{for(var n=0;n<this.connectionArray.length;n++)this.connectionArray[n].typeId==e&&t.push(this.connectionArray[n]);return t}catch(e){return t}})}static GetConnectionOfCompositionAndTypeLocal(e,t){return s(this,void 0,void 0,function*(){var n=[];try{for(var o=0;o<this.connectionArray.length;o++)this.connectionArray[o].typeId==e&&this.connectionArray[o].ofTheConceptId==t&&n.push(this.connectionArray[o]);return n}catch(e){return n}})}getName(){return this.name}}c.connectionArray=[],c.connectionDictionary=[]},5020:(e,t,n)=>{n.d(t,{A:()=>u});var o=n(8957),i=n(3655),r=n(9581),a=n(3026),s=n(205),c=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};const l=500;function d(){return new Promise(e=>setTimeout(e,0))}function u(){return c(this,void 0,void 0,function*(){try{let e=[];if(r.B.isPwa&&(e=yield(0,i.D3)("concept")),Array.isArray(e))for(let t=0;t<e.length;t++)a.I.AddConceptToMemory(e[t]),t>0&&t%l===0&&(yield d());s.B.isDataLoaded=!0,s.B.isCharacterLoaded=!0,s.B.isTypeLoaded=!0}catch(e){throw yield(0,o.DelayFunctionExecution)(2e3,u()),{message:"Cannot create Binary Tree Concept",ok:!1,status:400,data:e}}})}},5042:e=>{e.exports={nanoid:(e=21)=>{let t="",n=0|e;for(;n--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(n=t)=>{let o="",i=0|n;for(;i--;)o+=e[Math.random()*e.length|0];return o}}},5170:(e,t,n)=>{t.__esModule=!0,t.default=void 0;var o,i,r=b(n(518)),a=b(n(339)),s=b(n(4195)),c=b(n(425)),l=b(n(7071)),d=b(n(9720)),u=b(n(5799)),h=b(n(7324)),p=k(n(5588)),f=b(n(1669)),m=b(n(1704)),y=b(n(2918)),v=b(n(263)),g=k(n(2648)),C=k(n(71)),w=k(n(1581)),T=n(9606);function I(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(I=function(e){return e?n:t})(e)}function k(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=I(t);if(n&&n.has(e))return n.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var a=i?Object.getOwnPropertyDescriptor(e,r):null;a&&(a.get||a.set)?Object.defineProperty(o,r,a):o[r]=e[r]}return o.default=e,n&&n.set(e,o),o}function b(e){return e&&e.__esModule?e:{default:e}}function A(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var S=((o={})[C.space]=!0,o[C.cr]=!0,o[C.feed]=!0,o[C.newline]=!0,o[C.tab]=!0,o),L=Object.assign({},S,((i={})[C.comment]=!0,i));function N(e){return{line:e[g.FIELDS.START_LINE],column:e[g.FIELDS.START_COL]}}function _(e){return{line:e[g.FIELDS.END_LINE],column:e[g.FIELDS.END_COL]}}function x(e,t,n,o){return{start:{line:e,column:t},end:{line:n,column:o}}}function D(e){return x(e[g.FIELDS.START_LINE],e[g.FIELDS.START_COL],e[g.FIELDS.END_LINE],e[g.FIELDS.END_COL])}function P(e,t){if(e)return x(e[g.FIELDS.START_LINE],e[g.FIELDS.START_COL],t[g.FIELDS.END_LINE],t[g.FIELDS.END_COL])}function E(e,t){var n=e[t];if("string"==typeof n)return-1!==n.indexOf("\\")&&((0,T.ensureObject)(e,"raws"),e[t]=(0,T.unesc)(n),void 0===e.raws[t]&&(e.raws[t]=n)),e}function R(e,t){for(var n=-1,o=[];-1!==(n=e.indexOf(t,n+1));)o.push(n);return o}var O=function(){function e(e,t){void 0===t&&(t={}),this.rule=e,this.options=Object.assign({lossy:!1,safe:!1},t),this.position=0,this.css="string"==typeof this.rule?this.rule:this.rule.selector,this.tokens=(0,g.default)({css:this.css,error:this._errorGenerator(),safe:this.options.safe});var n=P(this.tokens[0],this.tokens[this.tokens.length-1]);this.root=new r.default({source:n}),this.root.errorGenerator=this._errorGenerator();var o=new a.default({source:{start:{line:1,column:1}},sourceIndex:0});this.root.append(o),this.current=o,this.loop()}var t,n,o,i=e.prototype;return i._errorGenerator=function(){var e=this;return function(t,n){return"string"==typeof e.rule?new Error(t):e.rule.error(t,n)}},i.attribute=function(){var e=[],t=this.currToken;for(this.position++;this.position<this.tokens.length&&this.currToken[g.FIELDS.TYPE]!==C.closeSquare;)e.push(this.currToken),this.position++;if(this.currToken[g.FIELDS.TYPE]!==C.closeSquare)return this.expected("closing square bracket",this.currToken[g.FIELDS.START_POS]);var n=e.length,o={source:x(t[1],t[2],this.currToken[3],this.currToken[4]),sourceIndex:t[g.FIELDS.START_POS]};if(1===n&&!~[C.word].indexOf(e[0][g.FIELDS.TYPE]))return this.expected("attribute",e[0][g.FIELDS.START_POS]);for(var i=0,r="",a="",s=null,c=!1;i<n;){var l=e[i],d=this.content(l),u=e[i+1];switch(l[g.FIELDS.TYPE]){case C.space:if(c=!0,this.options.lossy)break;if(s){(0,T.ensureObject)(o,"spaces",s);var h=o.spaces[s].after||"";o.spaces[s].after=h+d;var f=(0,T.getProp)(o,"raws","spaces",s,"after")||null;f&&(o.raws.spaces[s].after=f+d)}else r+=d,a+=d;break;case C.asterisk:if(u[g.FIELDS.TYPE]===C.equals)o.operator=d,s="operator";else if((!o.namespace||"namespace"===s&&!c)&&u){r&&((0,T.ensureObject)(o,"spaces","attribute"),o.spaces.attribute.before=r,r=""),a&&((0,T.ensureObject)(o,"raws","spaces","attribute"),o.raws.spaces.attribute.before=r,a=""),o.namespace=(o.namespace||"")+d,((0,T.getProp)(o,"raws","namespace")||null)&&(o.raws.namespace+=d),s="namespace"}c=!1;break;case C.dollar:if("value"===s){var m=(0,T.getProp)(o,"raws","value");o.value+="$",m&&(o.raws.value=m+"$");break}case C.caret:u[g.FIELDS.TYPE]===C.equals&&(o.operator=d,s="operator"),c=!1;break;case C.combinator:if("~"===d&&u[g.FIELDS.TYPE]===C.equals&&(o.operator=d,s="operator"),"|"!==d){c=!1;break}u[g.FIELDS.TYPE]===C.equals?(o.operator=d,s="operator"):o.namespace||o.attribute||(o.namespace=!0),c=!1;break;case C.word:if(u&&"|"===this.content(u)&&e[i+2]&&e[i+2][g.FIELDS.TYPE]!==C.equals&&!o.operator&&!o.namespace)o.namespace=d,s="namespace";else if(!o.attribute||"attribute"===s&&!c){r&&((0,T.ensureObject)(o,"spaces","attribute"),o.spaces.attribute.before=r,r=""),a&&((0,T.ensureObject)(o,"raws","spaces","attribute"),o.raws.spaces.attribute.before=a,a=""),o.attribute=(o.attribute||"")+d,((0,T.getProp)(o,"raws","attribute")||null)&&(o.raws.attribute+=d),s="attribute"}else if(!o.value&&""!==o.value||"value"===s&&!c&&!o.quoteMark){var y=(0,T.unesc)(d),v=(0,T.getProp)(o,"raws","value")||"",w=o.value||"";o.value=w+y,o.quoteMark=null,(y!==d||v)&&((0,T.ensureObject)(o,"raws"),o.raws.value=(v||w)+d),s="value"}else{var I="i"===d||"I"===d;!o.value&&""!==o.value||!o.quoteMark&&!c?(o.value||""===o.value)&&(s="value",o.value+=d,o.raws.value&&(o.raws.value+=d)):(o.insensitive=I,I&&"I"!==d||((0,T.ensureObject)(o,"raws"),o.raws.insensitiveFlag=d),s="insensitive",r&&((0,T.ensureObject)(o,"spaces","insensitive"),o.spaces.insensitive.before=r,r=""),a&&((0,T.ensureObject)(o,"raws","spaces","insensitive"),o.raws.spaces.insensitive.before=a,a=""))}c=!1;break;case C.str:if(!o.attribute||!o.operator)return this.error("Expected an attribute followed by an operator preceding the string.",{index:l[g.FIELDS.START_POS]});var k=(0,p.unescapeValue)(d),b=k.unescaped,A=k.quoteMark;o.value=b,o.quoteMark=A,s="value",(0,T.ensureObject)(o,"raws"),o.raws.value=d,c=!1;break;case C.equals:if(!o.attribute)return this.expected("attribute",l[g.FIELDS.START_POS],d);if(o.value)return this.error('Unexpected "=" found; an operator was already defined.',{index:l[g.FIELDS.START_POS]});o.operator=o.operator?o.operator+d:d,s="operator",c=!1;break;case C.comment:if(s)if(c||u&&u[g.FIELDS.TYPE]===C.space||"insensitive"===s){var S=(0,T.getProp)(o,"spaces",s,"after")||"",L=(0,T.getProp)(o,"raws","spaces",s,"after")||S;(0,T.ensureObject)(o,"raws","spaces",s),o.raws.spaces[s].after=L+d}else{var N=o[s]||"",_=(0,T.getProp)(o,"raws",s)||N;(0,T.ensureObject)(o,"raws"),o.raws[s]=_+d}else a+=d;break;default:return this.error('Unexpected "'+d+'" found.',{index:l[g.FIELDS.START_POS]})}i++}E(o,"attribute"),E(o,"namespace"),this.newNode(new p.default(o)),this.position++},i.parseWhitespaceEquivalentTokens=function(e){e<0&&(e=this.tokens.length);var t=this.position,n=[],o="",i=void 0;do{if(S[this.currToken[g.FIELDS.TYPE]])this.options.lossy||(o+=this.content());else if(this.currToken[g.FIELDS.TYPE]===C.comment){var r={};o&&(r.before=o,o=""),i=new c.default({value:this.content(),source:D(this.currToken),sourceIndex:this.currToken[g.FIELDS.START_POS],spaces:r}),n.push(i)}}while(++this.position<e);if(o)if(i)i.spaces.after=o;else if(!this.options.lossy){var a=this.tokens[t],s=this.tokens[this.position-1];n.push(new u.default({value:"",source:x(a[g.FIELDS.START_LINE],a[g.FIELDS.START_COL],s[g.FIELDS.END_LINE],s[g.FIELDS.END_COL]),sourceIndex:a[g.FIELDS.START_POS],spaces:{before:o,after:""}}))}return n},i.convertWhitespaceNodesToSpace=function(e,t){var n=this;void 0===t&&(t=!1);var o="",i="";return e.forEach(function(e){var r=n.lossySpace(e.spaces.before,t),a=n.lossySpace(e.rawSpaceBefore,t);o+=r+n.lossySpace(e.spaces.after,t&&0===r.length),i+=r+e.value+n.lossySpace(e.rawSpaceAfter,t&&0===a.length)}),i===o&&(i=void 0),{space:o,rawSpace:i}},i.isNamedCombinator=function(e){return void 0===e&&(e=this.position),this.tokens[e+0]&&this.tokens[e+0][g.FIELDS.TYPE]===C.slash&&this.tokens[e+1]&&this.tokens[e+1][g.FIELDS.TYPE]===C.word&&this.tokens[e+2]&&this.tokens[e+2][g.FIELDS.TYPE]===C.slash},i.namedCombinator=function(){if(this.isNamedCombinator()){var e=this.content(this.tokens[this.position+1]),t=(0,T.unesc)(e).toLowerCase(),n={};t!==e&&(n.value="/"+e+"/");var o=new m.default({value:"/"+t+"/",source:x(this.currToken[g.FIELDS.START_LINE],this.currToken[g.FIELDS.START_COL],this.tokens[this.position+2][g.FIELDS.END_LINE],this.tokens[this.position+2][g.FIELDS.END_COL]),sourceIndex:this.currToken[g.FIELDS.START_POS],raws:n});return this.position=this.position+3,o}this.unexpected()},i.combinator=function(){var e=this;if("|"===this.content())return this.namespace();var t=this.locateNextMeaningfulToken(this.position);if(!(t<0||this.tokens[t][g.FIELDS.TYPE]===C.comma||this.tokens[t][g.FIELDS.TYPE]===C.closeParenthesis)){var n,o=this.currToken,i=void 0;if(t>this.position&&(i=this.parseWhitespaceEquivalentTokens(t)),this.isNamedCombinator()?n=this.namedCombinator():this.currToken[g.FIELDS.TYPE]===C.combinator?(n=new m.default({value:this.content(),source:D(this.currToken),sourceIndex:this.currToken[g.FIELDS.START_POS]}),this.position++):S[this.currToken[g.FIELDS.TYPE]]||i||this.unexpected(),n){if(i){var r=this.convertWhitespaceNodesToSpace(i),a=r.space,s=r.rawSpace;n.spaces.before=a,n.rawSpaceBefore=s}}else{var c=this.convertWhitespaceNodesToSpace(i,!0),l=c.space,d=c.rawSpace;d||(d=l);var u={},h={spaces:{}};l.endsWith(" ")&&d.endsWith(" ")?(u.before=l.slice(0,l.length-1),h.spaces.before=d.slice(0,d.length-1)):l.startsWith(" ")&&d.startsWith(" ")?(u.after=l.slice(1),h.spaces.after=d.slice(1)):h.value=d,n=new m.default({value:" ",source:P(o,this.tokens[this.position-1]),sourceIndex:o[g.FIELDS.START_POS],spaces:u,raws:h})}return this.currToken&&this.currToken[g.FIELDS.TYPE]===C.space&&(n.spaces.after=this.optionalSpace(this.content()),this.position++),this.newNode(n)}var p=this.parseWhitespaceEquivalentTokens(t);if(p.length>0){var f=this.current.last;if(f){var y=this.convertWhitespaceNodesToSpace(p),v=y.space,w=y.rawSpace;void 0!==w&&(f.rawSpaceAfter+=w),f.spaces.after+=v}else p.forEach(function(t){return e.newNode(t)})}},i.comma=function(){if(this.position===this.tokens.length-1)return this.root.trailingComma=!0,void this.position++;this.current._inferEndPosition();var e=new a.default({source:{start:N(this.tokens[this.position+1])},sourceIndex:this.tokens[this.position+1][g.FIELDS.START_POS]});this.current.parent.append(e),this.current=e,this.position++},i.comment=function(){var e=this.currToken;this.newNode(new c.default({value:this.content(),source:D(e),sourceIndex:e[g.FIELDS.START_POS]})),this.position++},i.error=function(e,t){throw this.root.error(e,t)},i.missingBackslash=function(){return this.error("Expected a backslash preceding the semicolon.",{index:this.currToken[g.FIELDS.START_POS]})},i.missingParenthesis=function(){return this.expected("opening parenthesis",this.currToken[g.FIELDS.START_POS])},i.missingSquareBracket=function(){return this.expected("opening square bracket",this.currToken[g.FIELDS.START_POS])},i.unexpected=function(){return this.error("Unexpected '"+this.content()+"'. Escaping special characters with \\ may help.",this.currToken[g.FIELDS.START_POS])},i.unexpectedPipe=function(){return this.error("Unexpected '|'.",this.currToken[g.FIELDS.START_POS])},i.namespace=function(){var e=this.prevToken&&this.content(this.prevToken)||!0;return this.nextToken[g.FIELDS.TYPE]===C.word?(this.position++,this.word(e)):this.nextToken[g.FIELDS.TYPE]===C.asterisk?(this.position++,this.universal(e)):void this.unexpectedPipe()},i.nesting=function(){if(this.nextToken&&"|"===this.content(this.nextToken))return void this.position++;var e=this.currToken;this.newNode(new y.default({value:this.content(),source:D(e),sourceIndex:e[g.FIELDS.START_POS]})),this.position++},i.parentheses=function(){var e=this.current.last,t=1;if(this.position++,e&&e.type===w.PSEUDO){var n=new a.default({source:{start:N(this.tokens[this.position])},sourceIndex:this.tokens[this.position][g.FIELDS.START_POS]}),o=this.current;for(e.append(n),this.current=n;this.position<this.tokens.length&&t;)this.currToken[g.FIELDS.TYPE]===C.openParenthesis&&t++,this.currToken[g.FIELDS.TYPE]===C.closeParenthesis&&t--,t?this.parse():(this.current.source.end=_(this.currToken),this.current.parent.source.end=_(this.currToken),this.position++);this.current=o}else{for(var i,r=this.currToken,s="(";this.position<this.tokens.length&&t;)this.currToken[g.FIELDS.TYPE]===C.openParenthesis&&t++,this.currToken[g.FIELDS.TYPE]===C.closeParenthesis&&t--,i=this.currToken,s+=this.parseParenthesisToken(this.currToken),this.position++;e?e.appendToPropertyAndEscape("value",s,s):this.newNode(new u.default({value:s,source:x(r[g.FIELDS.START_LINE],r[g.FIELDS.START_COL],i[g.FIELDS.END_LINE],i[g.FIELDS.END_COL]),sourceIndex:r[g.FIELDS.START_POS]}))}if(t)return this.expected("closing parenthesis",this.currToken[g.FIELDS.START_POS])},i.pseudo=function(){for(var e=this,t="",n=this.currToken;this.currToken&&this.currToken[g.FIELDS.TYPE]===C.colon;)t+=this.content(),this.position++;return this.currToken?this.currToken[g.FIELDS.TYPE]!==C.word?this.expected(["pseudo-class","pseudo-element"],this.currToken[g.FIELDS.START_POS]):void this.splitWord(!1,function(o,i){t+=o,e.newNode(new h.default({value:t,source:P(n,e.currToken),sourceIndex:n[g.FIELDS.START_POS]})),i>1&&e.nextToken&&e.nextToken[g.FIELDS.TYPE]===C.openParenthesis&&e.error("Misplaced parenthesis.",{index:e.nextToken[g.FIELDS.START_POS]})}):this.expected(["pseudo-class","pseudo-element"],this.position-1)},i.space=function(){var e=this.content();0===this.position||this.prevToken[g.FIELDS.TYPE]===C.comma||this.prevToken[g.FIELDS.TYPE]===C.openParenthesis||this.current.nodes.every(function(e){return"comment"===e.type})?(this.spaces=this.optionalSpace(e),this.position++):this.position===this.tokens.length-1||this.nextToken[g.FIELDS.TYPE]===C.comma||this.nextToken[g.FIELDS.TYPE]===C.closeParenthesis?(this.current.last.spaces.after=this.optionalSpace(e),this.position++):this.combinator()},i.string=function(){var e=this.currToken;this.newNode(new u.default({value:this.content(),source:D(e),sourceIndex:e[g.FIELDS.START_POS]})),this.position++},i.universal=function(e){var t=this.nextToken;if(t&&"|"===this.content(t))return this.position++,this.namespace();var n=this.currToken;this.newNode(new f.default({value:this.content(),source:D(n),sourceIndex:n[g.FIELDS.START_POS]}),e),this.position++},i.splitWord=function(e,t){for(var n=this,o=this.nextToken,i=this.content();o&&~[C.dollar,C.caret,C.equals,C.word].indexOf(o[g.FIELDS.TYPE]);){this.position++;var r=this.content();if(i+=r,r.lastIndexOf("\\")===r.length-1){var a=this.nextToken;a&&a[g.FIELDS.TYPE]===C.space&&(i+=this.requiredSpace(this.content(a)),this.position++)}o=this.nextToken}var c=R(i,".").filter(function(e){var t="\\"===i[e-1],n=/^\d+\.\d+%$/.test(i);return!t&&!n}),u=R(i,"#").filter(function(e){return"\\"!==i[e-1]}),h=R(i,"#{");h.length&&(u=u.filter(function(e){return!~h.indexOf(e)}));var p=(0,v.default)(function(){var e=Array.prototype.concat.apply([],arguments);return e.filter(function(t,n){return n===e.indexOf(t)})}([0].concat(c,u)));p.forEach(function(o,r){var a,h=p[r+1]||i.length,f=i.slice(o,h);if(0===r&&t)return t.call(n,f,p.length);var m=n.currToken,y=m[g.FIELDS.START_POS]+p[r],v=x(m[1],m[2]+o,m[3],m[2]+(h-1));if(~c.indexOf(o)){var C={value:f.slice(1),source:v,sourceIndex:y};a=new s.default(E(C,"value"))}else if(~u.indexOf(o)){var w={value:f.slice(1),source:v,sourceIndex:y};a=new l.default(E(w,"value"))}else{var T={value:f,source:v,sourceIndex:y};E(T,"value"),a=new d.default(T)}n.newNode(a,e),e=null}),this.position++},i.word=function(e){var t=this.nextToken;return t&&"|"===this.content(t)?(this.position++,this.namespace()):this.splitWord(e)},i.loop=function(){for(;this.position<this.tokens.length;)this.parse(!0);return this.current._inferEndPosition(),this.root},i.parse=function(e){switch(this.currToken[g.FIELDS.TYPE]){case C.space:this.space();break;case C.comment:this.comment();break;case C.openParenthesis:this.parentheses();break;case C.closeParenthesis:e&&this.missingParenthesis();break;case C.openSquare:this.attribute();break;case C.dollar:case C.caret:case C.equals:case C.word:this.word();break;case C.colon:this.pseudo();break;case C.comma:this.comma();break;case C.asterisk:this.universal();break;case C.ampersand:this.nesting();break;case C.slash:case C.combinator:this.combinator();break;case C.str:this.string();break;case C.closeSquare:this.missingSquareBracket();case C.semicolon:this.missingBackslash();default:this.unexpected()}},i.expected=function(e,t,n){if(Array.isArray(e)){var o=e.pop();e=e.join(", ")+" or "+o}var i=/^[aeiou]/.test(e[0])?"an":"a";return n?this.error("Expected "+i+" "+e+', found "'+n+'" instead.',{index:t}):this.error("Expected "+i+" "+e+".",{index:t})},i.requiredSpace=function(e){return this.options.lossy?" ":e},i.optionalSpace=function(e){return this.options.lossy?"":e},i.lossySpace=function(e,t){return this.options.lossy?t?" ":"":e},i.parseParenthesisToken=function(e){var t=this.content(e);return e[g.FIELDS.TYPE]===C.space?this.requiredSpace(t):t},i.newNode=function(e,t){return t&&(/^ +$/.test(t)&&(this.options.lossy||(this.spaces=(this.spaces||"")+t),t=!0),e.namespace=t,E(e,"namespace")),this.spaces&&(e.spaces.before=this.spaces,this.spaces=""),this.current.append(e)},i.content=function(e){return void 0===e&&(e=this.currToken),this.css.slice(e[g.FIELDS.START_POS],e[g.FIELDS.END_POS])},i.locateNextMeaningfulToken=function(e){void 0===e&&(e=this.position+1);for(var t=e;t<this.tokens.length;){if(!L[this.tokens[t][g.FIELDS.TYPE]])return t;t++}return-1},t=e,(n=[{key:"currToken",get:function(){return this.tokens[this.position]}},{key:"nextToken",get:function(){return this.tokens[this.position+1]}},{key:"prevToken",get:function(){return this.tokens[this.position-1]}}])&&A(t.prototype,n),o&&A(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=O,e.exports=t.default},5238:(e,t,n)=>{let o=n(3152);class i extends o{get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}}e.exports=i,i.default=i},5239:(e,t,n)=>{n.d(t,{O:()=>s});var o=n(205),i=n(8957);class r{constructor(e,t,n,o){this.leftNode=null,this.rightNode=null,this.variants=[],this.height=1,this.key=e,this.value=t,this.leftNode=n,this.rightNode=o,this.currentNode=null}addCurrentNode(e,t){return null==t?t=e:(e.value.typeId!=t.value.typeId&&(t.currentNode=this.addCurrentNode(e,t.currentNode)),t)}addCurrentNodeType(e,t){if(null==t)return t=e;let n=!1;e.value.id==t.value.id&&(n=!0);for(let o=0;o<t.variants.length;o++)t.variants[o].value.id==e.value.id&&(n=!0);return n||t.variants.push(e),t}getMax(e,t){return e>t?e:t}addNode(e,t,n){if(null==t)return(0,i.dispatchIdEvent)(e.value.ofTheConceptId),e;let o=t.leftNode,r=t.rightNode;if(e.key<t.key)t.leftNode=this.addNode(e,o,n);else{if(!(e.key>t.key))return t;t.rightNode=this.addNode(e,r,n)}t.height=1+this.getMax(this.getHeight(t.leftNode),this.getHeight(t.rightNode));let a=this.getBalanceFactor(t);if(a>1&&t.leftNode){if(this.getBalanceFactor(t.leftNode)>=0)return this.rightRotate(t);if(this.getBalanceFactor(t.leftNode)<0)return t.leftNode=this.leftRotate(t.leftNode),this.rightRotate(t)}if(a<-1&&t.rightNode){if(this.getBalanceFactor(t.rightNode)<=0)return this.leftRotate(t);if(this.getBalanceFactor(t.rightNode)>0)return t.rightNode=this.rightRotate(t.rightNode),this.leftRotate(t)}return t}addTypeNode(e,t,n){let o=!1;if(0!=e.value.typeId){if(null==t)return t=e;let o=t.leftNode,i=t.rightNode;if(t.key>e.key)t.leftNode=this.addTypeNode(e,o,n);else{if(!(t.key<e.key))return t.key==e.key&&0!=t.key&&t.addCurrentNodeType(e,t),t;t.rightNode=this.addTypeNode(e,i,n)}t.height=1+this.getMax(this.getHeight(t.leftNode),this.getHeight(t.rightNode));let r=this.getBalanceFactor(t);if(r>1&&t.leftNode){if(e.key<t.leftNode.key){return this.rightRotate(t)}if(e.key>t.leftNode.key){return t.leftNode=this.leftRotate(t.leftNode),this.rightRotate(t)}}if(r<-1&&t.rightNode){if(e.key>t.rightNode.key){return this.leftRotate(t)}if(e.key<t.rightNode.key){return t.rightNode=this.rightRotate(t.rightNode),this.leftRotate(t)}}}else o;return t}rightRotate(e){if(e){let t=e.leftNode;if(t){let n=t.rightNode;return e.leftNode=n,t.rightNode=e,e.height=this.getMax(this.getHeight(e.leftNode),this.getHeight(e.rightNode))+1,t.height=this.getMax(this.getHeight(t.leftNode),this.getHeight(t.rightNode))+1,t}throw new Error("Cannot perform right rotation: left node is null.")}return e}leftRotate(e){if(e){let t=e.rightNode;if(t){let n=t.leftNode;return t.leftNode=e,e.rightNode=n,e.height=this.getMax(this.getHeight(e.leftNode),this.getHeight(e.rightNode))+1,t.height=this.getMax(this.getHeight(t.leftNode),this.getHeight(e.rightNode))+1,t}throw new Error("Cannot perform left rotation: right node is null.")}return e}getHeight(e){return e?e.height:0}getBalanceFactor(e){return null==e?0:this.getHeight(e.leftNode)-this.getHeight(e.rightNode)}getFromNode(e,t){try{if(t)return e==t.key?(t.value.count?t.value.count++:t.value.count=1,t):e<t.key?this.getFromNode(e,t.leftNode):e>t.key?this.getFromNode(e,t.rightNode):t}catch(e){}return t}getCharacterFromNode(e,t){return t?e==t.key?t:e<t.key?this.getCharacterFromNode(e,t.leftNode):e>t.key?this.getCharacterFromNode(e,t.rightNode):t:t}checkIfIdsInNode(e,t,n,o){if(e){if(t.includes(e.key)){n.push(e.value);let o=t.indexOf(e.key);t.splice(o,1)}e.leftNode&&this.checkIfIdsInNode(e.leftNode,t,n,o),e.rightNode&&this.checkIfIdsInNode(e.rightNode,t,n,o)}}traverse(e){let t=0;return e&&(t+=1,(null==e?void 0:e.leftNode)&&(t+=this.traverse(e.leftNode)),e.rightNode&&(t+=this.traverse(e.rightNode))),t}removeNode(e,t){if(null==e)return e;if(e.key>t)return e.leftNode=this.removeNode(e.leftNode,t),e;if(e.key<t)return e.rightNode=this.removeNode(e.rightNode,t),e;new Event(`${e.value.ofTheConceptId}`);if((0,i.dispatchIdEvent)(e.value.ofTheConceptId),null==e.leftNode){let t=e.rightNode;return e=null,t}if(null==e.rightNode){let t=e.leftNode;return e=null,t}{let t=this.inOrderSuccessor(e.rightNode);return e.value=t.value,e.key=t.key,e.variants=t.variants,e.currentNode=t.currentNode,e.rightNode=this.removeNode(e.rightNode,t.key),e}}removeNodeWithVariants(e,t,n){if(null==e)return e;if(e.key>t)return e.leftNode=this.removeNodeWithVariants(e.leftNode,t,n),e;if(e.key<t)return e.rightNode=this.removeNodeWithVariants(e.rightNode,t,n),e;if(e.variants.length>0)if(e.value.id==n){let t=e.variants[0];if(t)return e.value=t.value,e.key=t.key,e.currentNode=t.currentNode,e.variants.splice(0,1),e}else for(let t=0;t<e.variants.length;t++)if(n==e.variants[t].value.id)return e.variants.splice(t,1),e;if(null==e.leftNode){let t=e.rightNode;return e=null,t}if(null==e.rightNode){let t=e.leftNode;return e=null,t}{let t=this.inOrderSuccessor(e.rightNode);return e.value=t.value,e.key=t.key,e.variants=t.variants,e.currentNode=t.currentNode,e.rightNode=this.removeNodeWithVariants(e.rightNode,t.key,n),e}}inOrderSuccessor(e){for(;null!=e.leftNode;)e=e.leftNode;return e}}var a=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class s{static addNodeToTree(e){try{this.connectionMap.set(e.key,e.value),null===this.connectionroot&&(this.connectionroot=e)}catch(e){throw e}}static addConnectionToTree(e){this.connectionMap.has(e.id)||(0,i.dispatchIdEvent)(e.ofTheConceptId),this.connectionMap.set(e.id,e),null===this.connectionroot&&(this.connectionroot=new r(e.id,e,null,null))}static traverse(){return this.connectionMap.size}static waitForDataToLoad(){return a(this,void 0,void 0,function*(){return new Promise((e,t)=>{this.checkFlag(e),setTimeout(()=>{t("not")},25e3)})})}static checkFlag(e){if(o.B.isConnectionLoaded)return e("done");setTimeout(s.checkFlag,1e3,e)}static removeNodeFromTree(e){return a(this,void 0,void 0,function*(){const t=this.connectionMap.get(e);t&&((0,i.dispatchIdEvent)(t.ofTheConceptId),this.connectionMap.delete(e),0===this.connectionMap.size&&(this.connectionroot=null))})}static getNodeFromTree(e){return a(this,void 0,void 0,function*(){try{const t=this.connectionMap.get(e);return t?(t.count?t.count++:t.count=1,{key:e,value:t}):null}catch(e){return}})}static getConnectionListFromIds(e,t,n){return a(this,void 0,void 0,function*(){for(let n=e.length-1;n>=0;n--){const o=this.connectionMap.get(e[n]);o&&(t.push(o),e.splice(n,1))}})}}s.connectionroot=null,s.connectionMap=new Map},5257:(e,t,n)=>{n.d(t,{R:()=>a});var o=n(9003),i=n(3075),r=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class a{static AddConceptId(e){this.localId=e.value,(0,o.kH)("localid",e)}static getConceptId(){return r(this,void 0,void 0,function*(){try{if(this.localId){if(this.ReservedLocalId.length<5){yield(0,i.EO)().then(()=>{let e=this.localId;for(let t=1;t<10;t++){let n=this.localId-t;this.ReservedLocalId.push(n),e=n}this.AddConceptId({id:0,value:e})}).catch(e=>-Math.floor(1e8*Math.random()));let e=this.ReservedLocalId[0];return this.ReservedLocalId.shift(),e}{let e=this.ReservedLocalId[0];return this.ReservedLocalId.shift(),e}}return yield(0,i.EO)().then(()=>{let e=this.localId;for(let t=1;t<10;t++){let n=this.localId-t;this.ReservedLocalId.push(n),e=n}this.AddConceptId({id:0,value:e})}),this.getConceptId()}catch(e){return-Math.floor(1e8*Math.random())}})}static AddConnectionId(e){this.localConnectionId=e.value}static getConnectionId(){return r(this,void 0,void 0,function*(){try{if(this.localConnectionId){if(this.ReservedConnectionId.length<5){yield(0,i.xd)().then(()=>{let e=this.localConnectionId;for(let t=1;t<10;t++){let n=this.localConnectionId-t;this.ReservedConnectionId.push(n),e=n}}).catch(e=>-Math.floor(1e8*Math.random()));let e=this.ReservedConnectionId[0];return this.ReservedConnectionId.shift(),e}{let e=this.ReservedConnectionId[0];return this.ReservedConnectionId.shift(),e}}return yield(0,i.xd)().then(()=>{let e=this.localConnectionId;for(let t=1;t<10;t++){let n=this.localConnectionId-t;this.ReservedConnectionId.push(n),e=n}this.AddConnectionId({id:1,value:e})}),this.getConnectionId()}catch(e){return-Math.floor(1e8*Math.random())}})}}a.ReservedLocalId=[],a.ReservedConnectionId=[]},5284:(e,t,n)=>{n.d(t,{B:()=>s});var o=n(8957),i=n(8286),r=n(1863),a=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function s(){return a(this,arguments,void 0,function*(e=[]){const t=o.Logger.logfunction("FindConnectionsOfCompositionsBulkInMemory",[e.length])||{};let n=[];try{if(o.serviceWorker){t.serviceWorker=!0;try{const n=yield(0,o.sendMessage)("FindConnectionsOfCompositionsBulkInMemory",{composition_ids:e});return o.Logger.logUpdate(t),n.data}catch(e){(0,r.ey)(t,"FindConnectionsOfCompositionsBulkInMemory",e),(0,o.handleServiceWorkerException)(e)}}for(let t=0;t<e.length;t++){let o=yield i.d.GetConnectionsOfConcept(e[t]);n.push(...o)}return o.Logger.logUpdate(t),n}catch(e){return(0,r.ey)(t,"FindConnectionsOfCompositionsBulkInMemory",e),n}})}},5286:(e,t)=>{function n(e){for(var t=e.toLowerCase(),n="",o=!1,i=0;i<6&&void 0!==t[i];i++){var r=t.charCodeAt(i);if(o=32===r,!(r>=97&&r<=102||r>=48&&r<=57))break;n+=t[i]}if(0!==n.length){var a=parseInt(n,16);return a>=55296&&a<=57343||0===a||a>1114111?["�",n.length+(o?1:0)]:[String.fromCodePoint(a),n.length+(o?1:0)]}}t.__esModule=!0,t.default=function(e){if(!o.test(e))return e;for(var t="",i=0;i<e.length;i++)if("\\"!==e[i])t+=e[i];else{var r=n(e.slice(i+1,i+7));if(void 0!==r){t+=r[0],i+=r[1];continue}if("\\"===e[i+1]){t+="\\",i++;continue}e.length===i+1&&(t+=e[i])}return t};var o=/\\/;e.exports=t.default},5312:(e,t,n)=>{n.d(t,{NK:()=>h,Ve:()=>p,cf:()=>d,vw:()=>f,y8:()=>u});var o=n(2832),i=n(3130),r=n(8957),a=n(1863),s=n(6687),c=n(1320),l=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function d(e){var t=arguments;return l(this,arguments,void 0,function*(e,n="",d=null,h=i.y0){var p,m,y,v,g,C,w,T;const I=r.Logger.logfunction("SearchLinkMultipleAll",t)||{};try{try{if(r.serviceWorker){I.serviceWorker=!0;const t=yield(0,r.sendMessage)("SearchLinkMultipleAll",{searchQuery:e,token:n,caller:d,format:h});return r.Logger.logUpdate(I),t.data}}catch(e){(0,a.ey)(I,"SearchLinkMultipleAll",e),(0,r.handleServiceWorkerException)(e)}let t=[],k=[],b=[],A=[],S=e[0].composition,L={},N={};(null==d?void 0:d.isDataLoaded)?(L.compositionIds=null===(p=d.conceptIds)||void 0===p?void 0:p.slice(),L.internalConnections=null===(m=d.internalConnections)||void 0===m?void 0:m.slice(),L.linkers=null===(y=d.linkers)||void 0===y?void 0:y.slice(),L.reverse=null===(v=d.reverse)||void 0===v?void 0:v.slice(),N=L,t=N.compositionIds,b=N.internalConnections,k=N.linkers,A=N.reverse):(L=yield(0,o.j)(e,n),d&&(d.conceptIds=null===(g=L.compositionIds)||void 0===g?void 0:g.slice(),d.internalConnections=null===(C=L.internalConnections)||void 0===C?void 0:C.slice(),d.linkers=null===(w=L.linkers)||void 0===w?void 0:w.slice(),d.reverse=null===(T=L.reverse)||void 0===T?void 0:T.slice(),d.isDataLoaded=!0),N=L,t=N.compositionIds,b=N.internalConnections,k=N.linkers,A=N.reverse);let _=yield function(e,t,n,o,r,a){return l(this,arguments,void 0,function*(e,t,n,o,r,a,l=i.y0){try{let d,h,p=yield(0,s.QL)(e);return l==i.ZJ?(d=yield(0,s.MT)(t,n),h=yield f(e,d,r,o)):l==i.yv?(d=yield(0,s.D)(t,n),h=yield f(e,d,r,o)):100==l?(d=yield(0,s.nr)(t,n),h=yield u(p,d,r,o)):l==i.SL?h=yield(0,c._W)(e,t,n,a.ofCompositions,o):(d=yield(0,s.rv)(t,n),h=yield u(p,d,r,o)),h}catch(e){return}})}(k,t,b,A,S,e[0],h);return r.Logger.logUpdate(I),_}catch(e){throw(0,a.ey)(I,"SearchLinkMultipleAll",e),e}})}function u(e,t,n){return l(this,arguments,void 0,function*(e,t,n,o=[]){(new Date).getTime();let i={},a=[];for(let t=0;t<e.length;t++)a.push(e[t].toTheConceptId),a.push(e[t].ofTheConceptId),a.push(e[t].typeId);e.sort(function(e,t){return t.id-e.id});for(let n=0;n<e.length;n++){let i=!1;if(o.includes(e[n].id)&&(i=!0),1==i){if(t[e[n].ofTheConceptId]&&t[e[n].toTheConceptId]){let o=t[e[n].toTheConceptId],i=yield(0,r.GetTheConcept)(e[n].typeId),a=null==o?void 0:o.data,s=Object.keys(a)[0];try{let o=i.characterValue+"_reverse";"string"==typeof a&&(a={}),Array.isArray(a[s][o])||("string"==typeof a[s]&&(a[s]={}),a[s][o]=[]),a[s][o].push(t[e[n].ofTheConceptId])}catch(e){}}}else if(t[e[n].ofTheConceptId]&&t[e[n].toTheConceptId]){let o=t[e[n].ofTheConceptId],i=yield(0,r.GetTheConcept)(e[n].typeId),a=null==o?void 0:o.data,s=Object.keys(a)[0];try{"string"==typeof a&&(a={}),Array.isArray(a[s][i.characterValue])||("string"==typeof a[s]&&(a[s]={}),a[s][i.characterValue]=[]),a[s][i.characterValue].push(t[e[n].toTheConceptId])}catch(e){}}}return i=t[n],i})}function h(e,t,n){return l(this,arguments,void 0,function*(e,t,n,o=[]){let i=[],a=[];for(let t=0;t<e.length;t++)a.push(e[t].toTheConceptId),a.push(e[t].ofTheConceptId),a.push(e[t].typeId);e.sort(function(e,t){return t.id-e.id});for(let n=0;n<e.length;n++){let i=!1;if(o.includes(e[n].id)&&(i=!0),1==i){if(t[e[n].ofTheConceptId]&&t[e[n].toTheConceptId]){let o=t[e[n].toTheConceptId],i=yield(0,r.GetTheConcept)(e[n].typeId),a=Object.keys(o)[0];try{let r=i.characterValue+"_reverse";"string"==typeof o&&(o={}),Array.isArray(o[a][r])||("string"==typeof o[a]&&(o[a]={}),o[a][r]=[]),o[a][r].push(t[e[n].ofTheConceptId])}catch(e){}}}else if(t[e[n].ofTheConceptId]&&t[e[n].toTheConceptId]){let o=t[e[n].ofTheConceptId],i=yield(0,r.GetTheConcept)(e[n].typeId),a=Object.keys(o)[0];try{"string"==typeof o&&(o={}),Array.isArray(o[a][i.characterValue])||("string"==typeof o[a]&&(o[a]={}),o[a][i.characterValue]=[]),o[a][i.characterValue].push(t[e[n].toTheConceptId])}catch(e){}}}for(let e=0;e<n.length;e++){let o=t[n[e]];o&&i.push(o)}return i})}function p(e,t,n,o){return l(this,arguments,void 0,function*(e,t,n,o,i=[]){(new Date).getTime();let a=[],s=[];for(let t=0;t<e.length;t++)s.push(e[t].toTheConceptId),s.push(e[t].ofTheConceptId),s.push(e[t].typeId);e.sort(function(e,t){return t.id-e.id});for(let n=0;n<e.length;n++){let o=!1;if(i.includes(e[n].id)&&(o=!0),1==o){if(t[e[n].ofTheConceptId]&&t[e[n].toTheConceptId]){let o=t[e[n].toTheConceptId],i=yield(0,r.GetTheConcept)(e[n].typeId),a=null==o?void 0:o.data,s=Object.keys(a)[0];try{let o=i.characterValue+"_reverse";"string"==typeof a&&(a={}),Array.isArray(a[s][o])||("string"==typeof a[s]&&(a[s]={}),a[s][o]=[]),a[s][o].push(t[e[n].ofTheConceptId])}catch(e){}}}else if(t[e[n].ofTheConceptId]&&t[e[n].toTheConceptId]){let o=t[e[n].ofTheConceptId],i=yield(0,r.GetTheConcept)(e[n].typeId),a=null==o?void 0:o.data,s=Object.keys(a)[0];try{"string"==typeof a&&(a={}),Array.isArray(a[s][i.characterValue])||("string"==typeof a[s]&&(a[s]={}),a[s][i.characterValue]=[]),a[s][i.characterValue].push(t[e[n].toTheConceptId])}catch(e){}}}for(let e=0;e<o.length;e++){let n=t[o[e]];n&&a.push(n)}return a})}function f(e,t,n){return l(this,arguments,void 0,function*(e,t,n,o=[]){let i={},a=yield(0,r.GetConnectionBulk)(e),s=[];for(let e=0;e<a.length;e++)s.push(a[e].toTheConceptId),s.push(a[e].ofTheConceptId),s.push(a[e].typeId);yield(0,r.GetConceptBulk)(s),a.sort(function(e,t){return t.id-e.id});for(let e=0;e<a.length;e++){let n=!1;if(o.includes(a[e].id)&&(n=!0),1==n){if(t[a[e].ofTheConceptId]&&t[a[e].toTheConceptId]){let n=t[a[e].toTheConceptId],o=yield(0,r.GetTheConcept)(a[e].typeId),i=n,s=Object.keys(i)[0];try{let n=o.characterValue+"_reverse";"string"==typeof i&&(i={}),Array.isArray(i[s][n])||("string"==typeof i[s]&&(i[s]={}),i[s][n]=[]),i[s][n].push(t[a[e].ofTheConceptId])}catch(e){}}}else if(t[a[e].ofTheConceptId]&&t[a[e].toTheConceptId]){let n=t[a[e].ofTheConceptId],o=yield(0,r.GetTheConcept)(a[e].typeId),i=n,s=Object.keys(i)[0];try{"string"==typeof i&&(i={}),Array.isArray(i[s][o.characterValue])||("string"==typeof i[s]&&(i[s]={}),i[s][o.characterValue]=[]),i[s][o.characterValue].push(t[a[e].toTheConceptId])}catch(e){}}}return i=t[n],i})}},5328:(e,t,n)=>{n.d(t,{d:()=>l});var o=n(8957),i=n(3130),r=n(8939),a=n(4287),s=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class c extends a.w{constructor(e,t,n,o,i){super(),this.connections=[],this.data=[],this.mainConcept=e,this.linker=t,this.inpage=n,this.page=o,this.format=i}bind(){return s(this,void 0,void 0,function*(){var e;if(!this.isDataLoaded){let i=yield(0,o.GetTheConcept)(this.mainConcept),r=(null===(e=i.type)||void 0===e?void 0:e.characterValue)+"_s_"+this.linker,a=yield(0,o.GetConceptByCharacterAndType)(r,16);if(a.id>0){let e=yield(0,o.GetConnectionOfTheConcept)(a.id,i.id,i.userId,this.inpage,this.page);this.connections=e;for(var t=[],n=0;n<this.connections.length;n++)t.push(this.connections[n].toTheConceptId),this.linkers.push(this.connections[n].id),this.listenToEvent(this.connections[n].toTheConceptId);yield(0,o.GetAllConnectionsOfCompositionBulk)(t)}this.isDataLoaded=!0,this.listenToEvent(this.mainConcept)}return yield this.build()})}build(){return s(this,void 0,void 0,function*(){this.data=[],this.connections=yield(0,o.GetConnectionBulk)(this.linkers);for(var e=0;e<this.connections.length;e++){let t=this.connections[e].toTheConceptId,n=yield(0,o.GetTheConcept)(t);if(this.format==i.yv){let e=yield(0,r.RW)(n.id);this.data.push(e)}else if(this.format==i.ZJ){let e=yield(0,r.kx)(n.id);this.data.push(e)}else if(this.format==i.iw){let e=yield(0,o.GetCompositionWithIdAndDateFromMemory)(n.id);this.data.push(e)}else{let e=yield(0,o.GetCompositionWithIdAndDateFromMemory)(n.id);this.data.push(e)}}return this.data})}}function l(e,t,n,o,r=i.yv){return new c(e,t,n,o,r)}},5457:(e,t,n)=>{n.d(t,{c:()=>c});var o=n(8957),i=n(7282),r=n(205);class a{constructor(e,t){this.value=[],this.height=1,this.key=e,this.value.push(t),this.leftNode=null,this.rightNode=null,this.currentNode=null}addType(e,t,n){var i,r,s,c;if(null==e)return(0,o.dispatchIdEvent)(t,{detail:n}),new a(t,n);if(t<e.key)e.leftNode=this.addType(e.leftNode,t,n);else{if(!(t>e.key))return e.value.includes(n)||((0,o.dispatchIdEvent)(t,{detail:n}),e.value.push(n)),e;e.rightNode=this.addType(e.rightNode,t,n)}e.height=Math.max(this.getHeight(e.leftNode),this.getHeight(e.rightNode))+1;const l=this.getBalanceFactor(e);return l>1&&t<(null===(i=e.leftNode)||void 0===i?void 0:i.key)?this.rightRotate(e):l<-1&&t>(null===(r=e.rightNode)||void 0===r?void 0:r.key)?this.leftRotate(e):l>1&&t>(null===(s=e.leftNode)||void 0===s?void 0:s.key)?(e.leftNode=this.leftRotate(e.leftNode),this.rightRotate(e)):l<-1&&t<(null===(c=e.rightNode)||void 0===c?void 0:c.key)?(e.rightNode=this.rightRotate(e.rightNode),this.leftRotate(e)):e}rightRotate(e){if(e){let t=e.leftNode;if(t){let n=t.rightNode;return e.leftNode=n,t.rightNode=e,e.height=Math.max(this.getHeight(e.leftNode),this.getHeight(e.rightNode))+1,t.height=Math.max(this.getHeight(t.leftNode),this.getHeight(t.rightNode))+1,t}}return e}leftRotate(e){if(e){let t=e.rightNode;if(t){let n=t.leftNode;return t.leftNode=e,e.rightNode=n,e.height=Math.max(this.getHeight(e.leftNode),this.getHeight(e.rightNode))+1,t.height=Math.max(this.getHeight(t.leftNode),this.getHeight(e.rightNode))+1,t}}return e}getHeight(e){return e?e.height:0}getBalanceFactor(e){return null==e?0:this.getHeight(e.leftNode)-this.getHeight(e.rightNode)}getFromNode(e,t){return t?e==t.key?t:e<t.key?this.getFromNode(e,t.leftNode):e>t.key?this.getFromNode(e,t.rightNode):t:t}removeNodeWithVariants(e,t,n){if(null==e)return e;if(e.key>t)return e.leftNode=this.removeNodeWithVariants(e.leftNode,t,n),e;if(e.key<t)return e.rightNode=this.removeNodeWithVariants(e.rightNode,t,n),e;if(e.value.length>0)for(let t=0;t<e.value.length;t++)if(n==e.value[t])return e.value.splice(t,1),e;if(null==e.leftNode){let t=e.rightNode;return e=null,t}if(null==e.rightNode){let t=e.leftNode;return e=null,t}{let t=this.inOrderSuccessor(e.rightNode);return e.value=t.value,e.key=t.key,e.currentNode=t.currentNode,e.rightNode=this.removeNodeWithVariants(e.rightNode,t.key,n),e}}countNodeBelow(e){return null==e?0:1+this.countNodeBelow(e.leftNode)+this.countNodeBelow(e.rightNode)}inOrderSuccessor(e){for(;null!=e.leftNode;)e=e.leftNode;return e}}var s=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class c{static addType(e){return s(this,void 0,void 0,function*(){if(null==this.root){this.root=e;new CustomEvent(`${e.key}`,{detail:e.value[0]});return(0,o.dispatchIdEvent)(e.key,{detail:e.value[0]}),this.root}return this.root=this.root.addType(this.root,e.key,e.value[0]),this.root})}static addConceptToTree(e){if(0!=e.typeId){let t=new a(e.typeId,e.id);this.addType(t)}}static removeTypeConcept(e,t){this.root&&(this.root=this.root.removeNodeWithVariants(this.root,e,t))}static getNodeFromTreeNew(e){if(this.root){return this.root.getFromNode(e,this.root)}return this.root}static getTypeVariantsFromTreeNew(e){return s(this,void 0,void 0,function*(){let t=this.getNodeFromTreeNew(e),n=[],i=[];if(t){n=t.value;for(let e=0;e<n.length;e++){let t=!1;for(let o=0;o<i.length;o++)i[o].id==n[e]&&(t=!0);t||i.push(yield(0,o.GetTheConcept)(n[e]))}}return i})}static waitForDataToLoad(){return s(this,void 0,void 0,function*(){return new Promise((e,t)=>{this.checkFlag(e),setTimeout(()=>{t("not")},25e3)})})}static checkFlag(e){if(r.B.isTypeLoaded)return e("done");setTimeout(c.checkFlag,1e3,e)}static getTypeVariantsFromTreeWithUserIdNew(e,t){return s(this,void 0,void 0,function*(){let n=[],o=yield this.getTypeVariantsFromTreeNew(e);for(let e=0;e<o.length;e++)o[e].userId==t&&n.push(o[e]);return n})}static getTypeVariantsWithCharacterValueNew(e,t){return s(this,void 0,void 0,function*(){let n=yield this.getTypeVariantsFromTreeNew(t),o=(0,i.o)();for(let t=0;t<n.length;t++)n[t].characterValue==e&&(o=n[t]);return o})}static countNumberOfNodes(){return this.typeRoot?this.typeRoot.countNodeBelow(this.typeRoot):0}}c.typeRoot=null,c.root=null},5588:(e,t,n)=>{t.__esModule=!0,t.default=void 0,t.unescapeValue=y;var o,i=c(n(8937)),r=c(n(5286)),a=c(n(3295)),s=n(1581);function c(e){return e&&e.__esModule?e:{default:e}}function l(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}var u=n(4643),h=/^('|")([^]*)\1$/,p=u(function(){},"Assigning an attribute a value containing characters that might need to be escaped is deprecated. Call attribute.setValue() instead."),f=u(function(){},"Assigning attr.quoted is deprecated and has no effect. Assign to attr.quoteMark instead."),m=u(function(){},"Constructing an Attribute selector with a value without specifying quoteMark is deprecated. Note: The value should be unescaped now.");function y(e){var t=!1,n=null,o=e,i=o.match(h);return i&&(n=i[1],o=i[2]),(o=(0,r.default)(o))!==e&&(t=!0),{deprecatedUsage:t,unescaped:o,quoteMark:n}}var v=function(e){var t,n;function o(t){var n;return void 0===t&&(t={}),n=e.call(this,function(e){if(void 0!==e.quoteMark)return e;if(void 0===e.value)return e;m();var t=y(e.value),n=t.quoteMark,o=t.unescaped;return e.raws||(e.raws={}),void 0===e.raws.value&&(e.raws.value=e.value),e.value=o,e.quoteMark=n,e}(t))||this,n.type=s.ATTRIBUTE,n.raws=n.raws||{},Object.defineProperty(n.raws,"unquoted",{get:u(function(){return n.value},"attr.raws.unquoted is deprecated. Call attr.value instead."),set:u(function(){return n.value},"Setting attr.raws.unquoted is deprecated and has no effect. attr.value is unescaped by default now.")}),n._constructed=!0,n}n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,d(t,n);var r,a,c,h=o.prototype;return h.getQuotedValue=function(e){void 0===e&&(e={});var t=this._determineQuoteMark(e),n=g[t];return(0,i.default)(this._value,n)},h._determineQuoteMark=function(e){return e.smart?this.smartQuoteMark(e):this.preferredQuoteMark(e)},h.setValue=function(e,t){void 0===t&&(t={}),this._value=e,this._quoteMark=this._determineQuoteMark(t),this._syncRawValue()},h.smartQuoteMark=function(e){var t=this.value,n=t.replace(/[^']/g,"").length,r=t.replace(/[^"]/g,"").length;if(n+r===0){var a=(0,i.default)(t,{isIdentifier:!0});if(a===t)return o.NO_QUOTE;var s=this.preferredQuoteMark(e);if(s===o.NO_QUOTE){var c=this.quoteMark||e.quoteMark||o.DOUBLE_QUOTE,l=g[c];if((0,i.default)(t,l).length<a.length)return c}return s}return r===n?this.preferredQuoteMark(e):r<n?o.DOUBLE_QUOTE:o.SINGLE_QUOTE},h.preferredQuoteMark=function(e){var t=e.preferCurrentQuoteMark?this.quoteMark:e.quoteMark;return void 0===t&&(t=e.preferCurrentQuoteMark?e.quoteMark:this.quoteMark),void 0===t&&(t=o.DOUBLE_QUOTE),t},h._syncRawValue=function(){var e=(0,i.default)(this._value,g[this.quoteMark]);e===this._value?this.raws&&delete this.raws.value:this.raws.value=e},h._handleEscapes=function(e,t){if(this._constructed){var n=(0,i.default)(t,{isIdentifier:!0});n!==t?this.raws[e]=n:delete this.raws[e]}},h._spacesFor=function(e){var t=this.spaces[e]||{},n=this.raws.spaces&&this.raws.spaces[e]||{};return Object.assign({before:"",after:""},t,n)},h._stringFor=function(e,t,n){void 0===t&&(t=e),void 0===n&&(n=C);var o=this._spacesFor(t);return n(this.stringifyProperty(e),o)},h.offsetOf=function(e){var t=1,n=this._spacesFor("attribute");if(t+=n.before.length,"namespace"===e||"ns"===e)return this.namespace?t:-1;if("attributeNS"===e)return t;if(t+=this.namespaceString.length,this.namespace&&(t+=1),"attribute"===e)return t;t+=this.stringifyProperty("attribute").length,t+=n.after.length;var o=this._spacesFor("operator");t+=o.before.length;var i=this.stringifyProperty("operator");if("operator"===e)return i?t:-1;t+=i.length,t+=o.after.length;var r=this._spacesFor("value");t+=r.before.length;var a=this.stringifyProperty("value");return"value"===e?a?t:-1:(t+=a.length,t+=r.after.length,t+=this._spacesFor("insensitive").before.length,"insensitive"===e&&this.insensitive?t:-1)},h.toString=function(){var e=this,t=[this.rawSpaceBefore,"["];return t.push(this._stringFor("qualifiedAttribute","attribute")),this.operator&&(this.value||""===this.value)&&(t.push(this._stringFor("operator")),t.push(this._stringFor("value")),t.push(this._stringFor("insensitiveFlag","insensitive",function(t,n){return!(t.length>0)||e.quoted||0!==n.before.length||e.spaces.value&&e.spaces.value.after||(n.before=" "),C(t,n)}))),t.push("]"),t.push(this.rawSpaceAfter),t.join("")},r=o,(a=[{key:"quoted",get:function(){var e=this.quoteMark;return"'"===e||'"'===e},set:function(e){f()}},{key:"quoteMark",get:function(){return this._quoteMark},set:function(e){this._constructed?this._quoteMark!==e&&(this._quoteMark=e,this._syncRawValue()):this._quoteMark=e}},{key:"qualifiedAttribute",get:function(){return this.qualifiedName(this.raws.attribute||this.attribute)}},{key:"insensitiveFlag",get:function(){return this.insensitive?"i":""}},{key:"value",get:function(){return this._value},set:function(e){if(this._constructed){var t=y(e),n=t.deprecatedUsage,o=t.unescaped,i=t.quoteMark;if(n&&p(),o===this._value&&i===this._quoteMark)return;this._value=o,this._quoteMark=i,this._syncRawValue()}else this._value=e}},{key:"insensitive",get:function(){return this._insensitive},set:function(e){e||(this._insensitive=!1,!this.raws||"I"!==this.raws.insensitiveFlag&&"i"!==this.raws.insensitiveFlag||(this.raws.insensitiveFlag=void 0)),this._insensitive=e}},{key:"attribute",get:function(){return this._attribute},set:function(e){this._handleEscapes("attribute",e),this._attribute=e}}])&&l(r.prototype,a),c&&l(r,c),Object.defineProperty(r,"prototype",{writable:!1}),o}(a.default);t.default=v,v.NO_QUOTE=null,v.SINGLE_QUOTE="'",v.DOUBLE_QUOTE='"';var g=((o={"'":{quotes:"single",wrap:!0},'"':{quotes:"double",wrap:!0}}).null={isIdentifier:!0},o);function C(e,t){return""+t.before+e+t.after}},5644:(e,t,n)=>{let o,i,r=n(7793);class a extends r{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,n){let o=super.normalize(e);if(t)if("prepend"===n)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of o)e.raws.before=t.raws.before;return o}removeChild(e,t){let n=this.index(e);return!t&&0===n&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}toResult(e={}){return new o(new i,this,e).stringify()}}a.registerLazyResult=e=>{o=e},a.registerProcessor=e=>{i=e},e.exports=a,a.default=a,r.registerRoot(a)},5781:e=>{const t="'".charCodeAt(0),n='"'.charCodeAt(0),o="\\".charCodeAt(0),i="/".charCodeAt(0),r="\n".charCodeAt(0),a=" ".charCodeAt(0),s="\f".charCodeAt(0),c="\t".charCodeAt(0),l="\r".charCodeAt(0),d="[".charCodeAt(0),u="]".charCodeAt(0),h="(".charCodeAt(0),p=")".charCodeAt(0),f="{".charCodeAt(0),m="}".charCodeAt(0),y=";".charCodeAt(0),v="*".charCodeAt(0),g=":".charCodeAt(0),C="@".charCodeAt(0),w=/[\t\n\f\r "#'()/;[\\\]{}]/g,T=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,I=/.[\r\n"'(/\\]/,k=/[\da-f]/i;e.exports=function(e,b={}){let A,S,L,N,_,x,D,P,E,R,O=e.css.valueOf(),B=b.ignoreErrors,F=O.length,U=0,G=[],M=[];function W(t){throw e.error("Unclosed "+t,U)}return{back:function(e){M.push(e)},endOfFile:function(){return 0===M.length&&U>=F},nextToken:function(e){if(M.length)return M.pop();if(U>=F)return;let b=!!e&&e.ignoreUnclosed;switch(A=O.charCodeAt(U),A){case r:case a:case c:case l:case s:N=U;do{N+=1,A=O.charCodeAt(N)}while(A===a||A===r||A===c||A===l||A===s);x=["space",O.slice(U,N)],U=N-1;break;case d:case u:case f:case m:case g:case y:case p:{let e=String.fromCharCode(A);x=[e,e,U];break}case h:if(R=G.length?G.pop()[1]:"",E=O.charCodeAt(U+1),"url"===R&&E!==t&&E!==n&&E!==a&&E!==r&&E!==c&&E!==s&&E!==l){N=U;do{if(D=!1,N=O.indexOf(")",N+1),-1===N){if(B||b){N=U;break}W("bracket")}for(P=N;O.charCodeAt(P-1)===o;)P-=1,D=!D}while(D);x=["brackets",O.slice(U,N+1),U,N],U=N}else N=O.indexOf(")",U+1),S=O.slice(U,N+1),-1===N||I.test(S)?x=["(","(",U]:(x=["brackets",S,U,N],U=N);break;case t:case n:_=A===t?"'":'"',N=U;do{if(D=!1,N=O.indexOf(_,N+1),-1===N){if(B||b){N=U+1;break}W("string")}for(P=N;O.charCodeAt(P-1)===o;)P-=1,D=!D}while(D);x=["string",O.slice(U,N+1),U,N],U=N;break;case C:w.lastIndex=U+1,w.test(O),N=0===w.lastIndex?O.length-1:w.lastIndex-2,x=["at-word",O.slice(U,N+1),U,N],U=N;break;case o:for(N=U,L=!0;O.charCodeAt(N+1)===o;)N+=1,L=!L;if(A=O.charCodeAt(N+1),L&&A!==i&&A!==a&&A!==r&&A!==c&&A!==l&&A!==s&&(N+=1,k.test(O.charAt(N)))){for(;k.test(O.charAt(N+1));)N+=1;O.charCodeAt(N+1)===a&&(N+=1)}x=["word",O.slice(U,N+1),U,N],U=N;break;default:A===i&&O.charCodeAt(U+1)===v?(N=O.indexOf("*/",U+2)+1,0===N&&(B||b?N=O.length:W("comment")),x=["comment",O.slice(U,N+1),U,N],U=N):(T.lastIndex=U+1,T.test(O),N=0===T.lastIndex?O.length-1:T.lastIndex-2,x=["word",O.slice(U,N+1),U,N],G.push(x),U=N)}return U++,x},position:function(){return U}}}},5799:(e,t,n)=>{t.__esModule=!0,t.default=void 0;var o,i=(o=n(4646))&&o.__esModule?o:{default:o},r=n(1581);function a(e,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},a(e,t)}var s=function(e){var t,n;function o(t){var n;return(n=e.call(this,t)||this).type=r.STRING,n}return n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,a(t,n),o}(i.default);t.default=s,e.exports=t.default},5868:(e,t,n)=>{n.d(t,{k:()=>l});var o=n(3077),i=n(8357),r=n(9736),a=n(8957),s=n(1863),c=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function l(e,t){var n=arguments;return c(this,arguments,void 0,function*(e,t,c=!1,l,d,u=999,h=0,p={concepts:[],connections:[]}){var f,m,y,v;const g=a.Logger.logfunction("MakeTheInstanceConceptLocal",n)||{};if(a.serviceWorker){g.serviceWorker=!0;try{const n=yield(0,a.sendMessage)("MakeTheInstanceConceptLocal",{type:e,referent:t,composition:c,userId:l,accessId:d,sessionInformationId:u,referentId:h,actions:p});return(null===(m=null===(f=null==n?void 0:n.actions)||void 0===f?void 0:f.concepts)||void 0===m?void 0:m.length)&&(p.concepts=JSON.parse(JSON.stringify(n.actions.concepts))),(null===(v=null===(y=null==n?void 0:n.actions)||void 0===y?void 0:y.connections)||void 0===v?void 0:v.length)&&(p.connections=JSON.parse(JSON.stringify(n.actions.connections))),a.Logger.logUpdate(g),n.data}catch(e){(0,s.ey)(g,"MakeTheInstanceConceptLocal",e),(0,a.handleServiceWorkerException)(e)}}try{let n,s,d=999,u=4,f=l,m=4,y="",v=t.length;if(y=e.startsWith("the_")?e:"the_"+e,c){n=yield(0,i.$)(e,d,l,l,p),s=yield(0,o.A)(t,e,l,u,n.id,m,!0,h,p)}else if(v>255){n=yield(0,i.$)(y,d,f,l,p),s=yield(0,o.A)(t,y,l,u,n.id,m,void 0,void 0,p)}else{n=yield(0,i.$)(y,d,f,l,p);let e=yield r.v.GetConceptByCharacterAndTypeLocal(t,n.id);if(s=e,0==e.id&&0==e.userId){s=yield(0,o.A)(t,y,l,u,n.id,m,void 0,void 0,p)}}return s.type=n,a.LocalSyncData.AddConcept(s),p.concepts.push(s),a.Logger.logUpdate(g),s}catch(e){throw(0,s.ey)(g,"MakeTheInstanceConceptLocal",e),e}})}},5976:(e,t,n)=>{n.d(t,{p:()=>u,B:()=>d});var o=n(9581),i=n(3518),r=n(1863),a=n(8957),s=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};var c=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};var l=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class d{static getId(){return l(this,void 0,void 0,function*(){if(this.ids.length<5)yield function(){var e=arguments;return c(this,void 0,void 0,function*(){const t=a.Logger.logfunction("GetReservedIds",e);try{let e=(0,i.Xr)("application/x-www-form-urlencoded");const n=yield fetch(o.B.GetReservedIdUrl(),{method:"GET",headers:e});if(!n.ok)throw(0,r.ry)(n),new Error(`Error! status: ${n.status}`);const s=yield n.json();for(let e=0;e<s.length;e++)d.AddId(s[e]);a.Logger.logUpdate(t)}catch(e){Error,(0,r.Mb)(e,o.B.GetReservedIdUrl()),(0,r.ey)(t,"GetReservedIds",e)}})}();var e=this.ids[0];return this.ids.shift(),e})}static AddId(e){this.ids.includes(e)||this.ids.push(e)}}d.ids=[];class u{static getId(){return l(this,void 0,void 0,function*(){if(this.connectionIds.length<5)yield function(){var e=arguments;return s(this,void 0,void 0,function*(){const t=a.Logger.logfunction("GetReservedConnectionIds",e);try{let e=(0,i.Xr)("application/x-www-form-urlencoded");const n=yield fetch(o.B.GetReservedConnectionIdUrl(),{method:"GET",headers:e});if(!n.ok)throw(0,r.ry)(n),new Error(`Error! status: ${n.status}`);const s=yield n.json();for(let e=0;e<s.length;e++)u.AddId(s[e]);a.Logger.logUpdate(t)}catch(e){Error,(0,r.Mb)(e,o.B.GetReservedConnectionIdUrl()),(0,r.ey)(t,"GetReservedConnectionIds",e)}})}();var e=this.connectionIds[0];return this.connectionIds.shift(),e})}static AddId(e){this.connectionIds.includes(e)||this.connectionIds.push(e)}}u.connectionIds=[]},6058:(e,t,n)=>{n.d(t,{W:()=>s});var o=n(1863),i=n(3518),r=n(8957),a=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function s(e){var t=arguments;return a(this,void 0,void 0,function*(){const n=r.Logger.logfunction("GetAllLinkerConnectionsToTheConcept",t);var a=[];try{(new Date).getTime();var s=(0,i.Xr)("application/x-www-form-urlencoded");const t=yield fetch(r.BaseUrl.GetAllLinkerConnectionToConceptUrl()+`?conceptId=${e}`,{method:"GET",headers:s});if(t.ok){const e=yield t.json();for(var c=0;c<e.length;c++){var l=e[c];a.push(l)}r.Logger.logUpdate(n)}else(0,o.ry)(t)}catch(e){Error,(0,o.Mb)(e,r.BaseUrl.GetAllLinkerConnectionToConceptUrl()),(0,o.ey)(n,"GetAllLinkerConnectionsToTheConcept",e)}return a})}},6156:e=>{let t={};e.exports=function(e){t[e]||(t[e]=!0,"undefined"!=typeof console&&console.warn)}},6191:(e,t,n)=>{n.d(t,{Al:()=>u,L2:()=>a,Ou:()=>s,cL:()=>c,eH:()=>h,kM:()=>p,l8:()=>l,ou:()=>m,sg:()=>f});var o=n(9581),i=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};const r=1,a="widgetCache",s="latestWidgetCache",c="recentWidgetCache",l="queryCache";let d=null;function u(){return new Promise((e,t)=>{if(d)return void e(d);const n=o.B.BASE_URL+"_CacheStore"+o.B.BASE_APPLICATION,i=indexedDB.open(n,r);i.onupgradeneeded=e=>{const t=e.target.result;t.objectStoreNames.contains(a)||t.createObjectStore(a,{keyPath:"id"}),t.objectStoreNames.contains(s)||t.createObjectStore(s,{keyPath:"id"}),t.objectStoreNames.contains(c)||t.createObjectStore(c,{keyPath:"id"}),t.objectStoreNames.contains(l)||t.createObjectStore(l)},i.onsuccess=t=>{d=t.target.result,e(d)},i.onerror=e=>{t(e)}})}function h(e,t,n){return i(this,void 0,void 0,function*(){const o=yield u();return new Promise((i,r)=>{const a=o.transaction(e,"readwrite").objectStore(e),s=void 0!==n?a.put(t,n):a.put(t);s.onsuccess=()=>i(),s.onerror=e=>{r(e)}})})}function p(e,t){return i(this,void 0,void 0,function*(){const n=yield u();return new Promise((o,i)=>{const r=n.transaction(e,"readwrite").objectStore(e).delete(t);r.onsuccess=()=>o(),r.onerror=e=>{i(e)}})})}function f(e){return i(this,void 0,void 0,function*(){const t=yield u();return new Promise((n,o)=>{const i=t.transaction(e,"readwrite").objectStore(e).clear();i.onsuccess=()=>n(),i.onerror=e=>{o(e)}})})}function m(e){return i(this,void 0,void 0,function*(){const t=yield u();return new Promise((n,o)=>{const i=t.transaction(e,"readonly").objectStore(e).getAll();i.onsuccess=()=>{var e;n(null!==(e=i.result)&&void 0!==e?e:[])},i.onerror=e=>{o(e)}})})}},6291:(e,t)=>{t.__esModule=!0,t.default=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];for(;n.length>0;){var i=n.shift();if(!e[i])return;e=e[i]}return e},e.exports=t.default},6416:(e,t,n)=>{n.d(t,{u:()=>i});var o=n(2615);function i(){let e=new Date,t=new Date;return new o.j(0,0,0,0,0,"0",0,!1,e,t,"0")}},6467:(e,t,n)=>{function o(e){const t=e.lastIndexOf("_");let n=[];if(t>0){n=[e.substring(0,t),e.substring(t+1,e.length)]}else n=[e];return n}n.d(t,{f:()=>o})},6687:(e,t,n)=>{n.d(t,{D:()=>T,MT:()=>w,Nt:()=>f,QL:()=>v,as:()=>m,cw:()=>u,dF:()=>d,hG:()=>y,km:()=>p,nr:()=>C,p8:()=>h,rv:()=>g});var o=n(8642),i=n(7467),r=n(8957),a=n(1863),s=n(5284),c=n(8939),l=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function d(){return l(this,arguments,void 0,function*(e=[]){yield(0,o.Y)(e);let t=[];for(let n=0;n<e.length;n++){let o=yield(0,c.kx)(e[n]);t.push(o)}return t})}function u(){return l(this,arguments,void 0,function*(e=[]){yield(0,o.Y)(e);let t=[];for(let n=0;n<e.length;n++){let o=yield(0,c.RW)(e[n]);t.push(o)}return t})}function h(){return l(this,arguments,void 0,function*(e=[],t=[]){const n=r.Logger.logfunction("GetCompositionFromConnectionsWithDataId",[e])||{};if(r.serviceWorker){n.serviceWorker=!0;try{const o=yield(0,r.sendMessage)("GetCompositionFromConnectionsWithDataId",{conceptIds:e,connectionIds:t});return r.Logger.logUpdate(n),o.data}catch(e){(0,a.ey)(n,"GetCompositionFromConnectionsWithDataId",e),(0,r.handleServiceWorkerException)(e)}}let o=[];for(let t=0;t<e.length;t++){let n=yield(0,c.RW)(e[t]);o.push(n)}return r.Logger.logUpdate(n),o})}function p(){var e=arguments;return l(this,arguments,void 0,function*(t=[],n=[]){const o=r.Logger.logfunction("GetCompositionFromConnectionsWithDataIdFromConnections",e)||{};if(r.serviceWorker){o.serviceWorker=!0;try{const e=yield(0,r.sendMessage)("GetCompositionFromConnectionsWithDataIdFromConnections",{conceptIds:t,connectionIds:n});return r.Logger.logUpdate(o),e.data}catch(e){(0,a.ey)(o,"GetCompositionFromConnectionsWithDataIdFromConnections",e),(0,r.handleServiceWorkerException)(e)}}let s=yield(0,i.j)(n),l=[];for(let e=0;e<t.length;e++){let n=yield(0,c.PT)(t[e],s);l.push(n)}return r.Logger.logUpdate(o),l})}function f(){var e=arguments;return l(this,arguments,void 0,function*(t=[],n=[]){const o=r.Logger.logfunction("GetCompositionFromConnectionsWithDataIdIndex",e)||{};if(r.serviceWorker){o.serviceWorker=!0;try{const e=yield(0,r.sendMessage)("GetCompositionFromConnectionsWithDataIdIndex",{conceptIds:t,connectionIds:n});return r.Logger.logUpdate(o),e.data}catch(e){(0,a.ey)(o,"GetCompositionFromConnectionsWithDataIdIndex",e),(0,r.handleServiceWorkerException)(e)}}yield(0,i.j)(n),yield(0,s.B)(t);let l={};for(let e=0;e<t.length;e++){let n=yield(0,c.RW)(t[e]);l[t[e]]=n}return r.Logger.logUpdate(o),l})}function m(){return l(this,arguments,void 0,function*(e=[],t=[]){yield(0,i.j)(t),yield(0,s.B)(e);let n={};for(let t=0;t<e.length;t++){let o=yield(0,c.kx)(e[t]);n[e[t]]=o}return n})}function y(){return l(this,arguments,void 0,function*(e=[],t=[]){if(r.serviceWorker)try{return(yield(0,r.sendMessage)("GetCompositionFromConnectionsWithIndexFromConnections",{conceptIds:e,connectionIds:t})).data}catch(e){(0,r.handleServiceWorkerException)(e)}let n=yield(0,i.j)(t),o=[];for(let t=0;t<e.length;t++){let i=yield(0,c.JA)(e[t],n);o[e[t]]=i}return o})}function v(e){var t=arguments;return l(this,void 0,void 0,function*(){const n=r.Logger.logfunction("GetConnectionDataPrefetch",t)||{};if(r.serviceWorker){n.serviceWorker=!0;try{const t=yield(0,r.sendMessage)("GetConnectionDataPrefetch",{connectionIds:e});return r.Logger.logUpdate(n),t.data}catch(e){(0,a.ey)(n,"GetConnectionDataPrefetch",e),(0,r.handleServiceWorkerException)(e)}}let o=[],s=[],c={};for(let t=0;t<e.length;t++){let n=yield r.ConnectionData.GetConnection(e[t]);0==n.id?o.push(e[t]):s.push(n)}for(let t=0;t<o.length;t++)c[e[t]]=!1;let l=[],d=yield(0,i.j)(o);s=[...s,...d];for(let e=0;e<s.length;e++)l.push(s[e].ofTheConceptId),l.push(s[e].toTheConceptId),l.push(s[e].typeId);return yield(0,r.GetConceptBulk)(l),r.Logger.logUpdate(n),s})}function g(){var e=arguments;return l(this,arguments,void 0,function*(t=[],n=[]){const o=r.Logger.logfunction("GetCompositionFromConnectionsWithDataIdInObject",e);yield(0,i.j)(n);let a={};for(let e=0;e<t.length;e++){let n=yield(0,c.RW)(t[e]);a[t[e]]=n}return r.Logger.logUpdate(o),a})}function C(){return l(this,arguments,void 0,function*(e=[],t=[]){yield(0,i.j)(t);let n={};for(let t=0;t<e.length;t++){let o=yield(0,c.$N)(e[t]);n[e[t]]=o}return n})}function w(){return l(this,arguments,void 0,function*(e=[],t=[]){yield(0,i.j)(t);let n={};for(let t=0;t<e.length;t++){let o=yield(0,c.kx)(e[t]);n[e[t]]=o}return n})}function T(){return l(this,arguments,void 0,function*(e=[],t=[]){yield(0,i.j)(t);let n={};for(let t=0;t<e.length;t++){let o=yield(0,c.XI)(e[t]);n[e[t]]=o}return n})}},6731:(e,t,n)=>{n.d(t,{b:()=>o});class o{constructor(e,t,n,o){this.variants=[],this.height=1,this.key=e,this.value=t,this.leftNode=n,this.rightNode=o,this.currentNode=null}addCurrentNode(e,t){return null==t?t=e:(e.value.typeId!=t.value.typeId&&(t.currentNode=this.addCurrentNode(e,t.currentNode)),t)}addCurrentNodeType(e,t){if(null==t)return t=e;let n=!1;for(let o=0;o<t.variants.length;o++)t.variants[o].value.id==e.value.id&&(n=!0);return n||t.variants.push(e),t}addNode(e,t,n){if(null==t)return t=e;let o=t.leftNode,i=t.rightNode;if(t.key>e.key)t.leftNode=this.addNode(e,o,n);else{if(!(t.key<e.key))return t;t.rightNode=this.addNode(e,i,n)}t.height=1+Math.max(this.getHeight(t.leftNode),this.getHeight(t.rightNode));let r=this.getBalanceFactor(t);if(r>1&&t.leftNode){if(e.key<t.leftNode.key)return this.rightRotate(t);if(e.key>t.leftNode.key)return t.leftNode=this.leftRotate(t.leftNode),this.rightRotate(t)}if(r<-1&&t.rightNode){if(e.key>t.rightNode.key)return this.leftRotate(t);if(e.key<t.rightNode.key)return t.rightNode=this.rightRotate(t.rightNode),this.leftRotate(t)}return t}checkIfIdsInNode(e,t,n,o){if(e){if(t.includes(e.key)){n.push(e.value);let o=t.indexOf(e.key);t.splice(o,1)}e.leftNode&&this.checkIfIdsInNode(e.leftNode,t,n,o),e.rightNode&&this.checkIfIdsInNode(e.rightNode,t,n,o)}}addCharacterNode(e,t,n){let o=!1;if(""!=e.value.characterValue){if(null==t)return t=e;let o=t.leftNode,i=t.rightNode;if(t.key>e.key)t.leftNode=this.addCharacterNode(e,o,n);else{if(!(t.key<e.key))return t.key==e.key&&""!=t.key&&t.value.id!=e.value.id&&t.addCurrentNodeType(e,t),t;t.rightNode=this.addCharacterNode(e,i,n)}t.height=1+Math.max(this.getHeight(t.leftNode),this.getHeight(t.rightNode));let r=this.getBalanceFactor(t);if(r>1&&t.leftNode){if(e.key<t.leftNode.key){return this.rightRotate(t)}if(e.key>t.leftNode.key){return t.leftNode=this.leftRotate(t.leftNode),this.rightRotate(t)}}if(r<-1&&t.rightNode){if(e.key>t.rightNode.key){return this.leftRotate(t)}if(e.key<t.rightNode.key){return t.rightNode=this.rightRotate(t.rightNode),this.leftRotate(t)}}}else o;return t}addTypeNode(e,t,n){let o=!1;if(0!=e.value.typeId){if(null==t)return t=e;let o=t.leftNode,i=t.rightNode;if(t.key>e.key)t.leftNode=this.addTypeNode(e,o,n);else{if(!(t.key<e.key))return t.key==e.key&&0!=t.key&&t.value.id!=e.value.id&&t.addCurrentNodeType(e,t),t;t.rightNode=this.addTypeNode(e,i,n)}t.height=1+Math.max(this.getHeight(t.leftNode),this.getHeight(t.rightNode));let r=this.getBalanceFactor(t);if(r>1&&t.leftNode){if(e.key<t.leftNode.key){return this.rightRotate(t)}if(e.key>t.leftNode.key){return t.leftNode=this.leftRotate(t.leftNode),this.rightRotate(t)}}if(r<-1&&t.rightNode){if(e.key>t.rightNode.key){return this.leftRotate(t)}if(e.key<t.rightNode.key){return t.rightNode=this.rightRotate(t.rightNode),this.leftRotate(t)}}}else o;return t}rightRotate(e){if(e){let t=e.leftNode;if(t){let n=t.rightNode;return e.leftNode=n,t.rightNode=e,e.height=Math.max(this.getHeight(e.leftNode),this.getHeight(e.rightNode))+1,t.height=Math.max(this.getHeight(t.leftNode),this.getHeight(t.rightNode))+1,t}}return e}leftRotate(e){if(e){let t=e.rightNode;if(t){let n=t.leftNode;return t.leftNode=e,e.rightNode=n,e.height=Math.max(this.getHeight(e.leftNode),this.getHeight(e.rightNode))+1,t.height=Math.max(this.getHeight(t.leftNode),this.getHeight(e.rightNode))+1,t}}return e}getHeight(e){return e?e.height:0}getBalanceFactor(e){return null==e?0:this.getHeight(e.leftNode)-this.getHeight(e.rightNode)}getFromNode(e,t){return t?e==t.key?t:e<t.key?this.getFromNode(e,t.leftNode):e>t.key?this.getFromNode(e,t.rightNode):t:t}getCharacterFromNode(e,t){return t?e==t.key?t:e<t.key?this.getCharacterFromNode(e,t.leftNode):e>t.key?this.getCharacterFromNode(e,t.rightNode):t:t}getCharacterFromNodeUpdated(e,t){var n;return t?e==t.key||51==(null===(n=t.value)||void 0===n?void 0:n.typeId)?t:e<t.key?this.getCharacterFromNode(e,t.leftNode):e>t.key?this.getCharacterFromNode(e,t.rightNode):t:t}getFromNodeWithCharacterAndType(e,t,n){if(e=`${e}`,n){if(e==n.key){if(e==n.value.characterValue&&t==n.value.typeId)return n;for(let e=0;e<n.variants.length;e++)if(n.variants[e].value.typeId==t)return n.variants[e]}else{if(e<n.key)return this.getFromNodeWithCharacterAndType(e,t,n.leftNode);if(e>n.key)return this.getFromNodeWithCharacterAndType(e,t,n.rightNode)}return null}return n}getFromNodeWithCharacterAndCategory(e,t,n){if(e=`${e}`,n){if(e==n.key){if(e==n.value.characterValue&&t==n.value.categoryId)return n;for(let e=0;e<n.variants.length;e++)if(n.variants[e].value.categoryId==t)return n.variants[e]}else{if(e<n.key)return this.getFromNodeWithCharacterAndCategory(e,t,n.leftNode);if(e>n.key)return this.getFromNodeWithCharacterAndCategory(e,t,n.rightNode)}return null}return n}removeNode(e,t){if(null==e)return e;if(e.key>t)return e.leftNode=this.removeNode(e.leftNode,t),e;if(e.key<t)return e.rightNode=this.removeNode(e.rightNode,t),e;if(null==e.leftNode){let t=e.rightNode;return e=null,t}if(null==e.rightNode){let t=e.leftNode;return e=null,t}{let t=this.inOrderSuccessor(e.rightNode);return e.value=t.value,e.key=t.key,e.variants=t.variants,e.currentNode=t.currentNode,e.rightNode=this.removeNode(e.rightNode,t.key),e}}removeNodeWithVariants(e,t,n){if(null==e)return e;if(e.key>t)return e.leftNode=this.removeNodeWithVariants(e.leftNode,t,n),e;if(e.key<t)return e.rightNode=this.removeNodeWithVariants(e.rightNode,t,n),e;if(e.variants.length>0)if(e.value.id==n){let t=e.variants[0];if(t)return e.value=t.value,e.key=t.key,e.currentNode=t.currentNode,e.variants.splice(0,1),e}else for(let t=0;t<e.variants.length;t++)if(n==e.variants[t].value.id)return e.variants.splice(t,1),e;if(null==e.leftNode){let t=e.rightNode;return e=null,t}if(null==e.rightNode){let t=e.leftNode;return e=null,t}{let t=this.inOrderSuccessor(e.rightNode);return e.value=t.value,e.key=t.key,e.variants=t.variants,e.currentNode=t.currentNode,e.rightNode=this.removeNodeWithVariants(e.rightNode,t.key,n),e}}countNodeBelow(e){return null==e?0:1+this.countNodeBelow(e.leftNode)+this.countNodeBelow(e.rightNode)}inOrderSuccessor(e){for(;null!=e.leftNode;)e=e.leftNode;return e}}},6846:(e,t,n)=>{let o=n(145),i=n(6966),r=n(4211),a=n(5644);class s{constructor(e=[]){this.version="8.5.6",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let n of e)if(!0===n.postcss?n=n():n.postcss&&(n=n.postcss),"object"==typeof n&&Array.isArray(n.plugins))t=t.concat(n.plugins);else if("object"==typeof n&&n.postcssPlugin)t.push(n);else if("function"==typeof n)t.push(n);else{if("object"!=typeof n||!n.parse&&!n.stringify)throw new Error(n+" is not a PostCSS plugin")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new i(this,e,t):new r(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}e.exports=s,s.default=s,a.registerProcessor(s),o.registerProcessor(s)},6915:(e,t,n)=>{function o(e,t="DESC"){return"ASC"==t?e.sort(function(e,t){return e.id-t.id}):e.sort(function(e,t){return t.id-e.id}),e}n.d(t,{X:()=>o})},6963:(e,t,n)=>{n.d(t,{f:()=>a});var o=n(205),i=n(6731),r=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class a{static waitForDataToLoad(){return r(this,void 0,void 0,function*(){return new Promise((e,t)=>{this.checkFlag(e),setTimeout(()=>{t("not")},25e3)})})}static checkFlag(e){if(o.B.isCharacterLoaded)return e("done");setTimeout(a.checkFlag,1e3,e)}static addNodeToTree(e){return r(this,void 0,void 0,function*(){return null==this.characterRoot?(this.characterRoot=e,this.characterRoot):(this.characterRoot=this.characterRoot.addCharacterNode(e,this.characterRoot,this.characterRoot.height),this.characterRoot)})}static removeNodeByCharacter(e,t){return r(this,void 0,void 0,function*(){this.characterRoot&&this.characterRoot.removeNodeWithVariants(this.characterRoot,e,t)})}static countNumberOfNodes(){return this.characterRoot?this.characterRoot.countNodeBelow(this.characterRoot):0}static addConceptToTree(e){if(""!=e.characterValue){var t=new i.b(e.characterValue,e,null,null);this.addNodeToTree(t)}}static getNodeFromTree(e){return this.characterRoot?this.characterRoot.getCharacterFromNode(e,this.characterRoot):this.characterRoot}static getNodeFromTreeUpdated(e){return this.characterRoot?this.characterRoot.getCharacterFromNode(e,this.characterRoot):this.characterRoot}static getCharacterAndTypeFromTree(e,t){return r(this,void 0,void 0,function*(){return this.characterRoot?this.characterRoot.getFromNodeWithCharacterAndType(e,t,this.characterRoot):this.characterRoot})}static getCharacterAndCategoryFromTree(e,t){return r(this,void 0,void 0,function*(){return this.characterRoot?this.characterRoot.getFromNodeWithCharacterAndCategory(e,t,this.characterRoot):this.characterRoot})}static removeConceptCharacter(e){this.characterRoot&&(this.characterRoot=this.characterRoot.removeNode(this.characterRoot,e))}}a.characterRoot=null},6966:(e,t,n)=>{let o=n(7793),i=n(145),r=n(3604),a=n(9577),s=n(3717),c=n(5644),l=n(3303),{isClean:d,my:u}=n(4151);n(6156);const h={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},p={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},f={Once:!0,postcssPlugin:!0,prepare:!0};function m(e){return"object"==typeof e&&"function"==typeof e.then}function y(e){let t=!1,n=h[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,0,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,0,n+"Exit"]:[n,n+"Exit"]}function v(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:y(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function g(e){return e[d]=!1,e.nodes&&e.nodes.forEach(e=>g(e)),e}let C={};class w{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(e,t,n){let i;if(this.stringified=!1,this.processed=!1,"object"!=typeof t||null===t||"root"!==t.type&&"document"!==t.type)if(t instanceof w||t instanceof s)i=g(t.root),t.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=t.map);else{let e=a;n.syntax&&(e=n.syntax.parse),n.parser&&(e=n.parser),e.parse&&(e=e.parse);try{i=e(t,n)}catch(e){this.processed=!0,this.error=e}i&&!i[u]&&o.rebuild(i)}else i=g(t);this.result=new s(e,i,n),this.helpers={...C,postcss:C,result:this.result},this.plugins=this.processor.plugins.map(e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let n=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin?n.postcssVersion:(e.plugin=n.postcssPlugin,e.setMessage())}catch(e){console&&console.error}return e}prepareVisitors(){this.listeners={};let e=(e,t,n)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,n])};for(let t of this.plugins)if("object"==typeof t)for(let n in t){if(!p[n]&&/^[A-Z]/.test(n))throw new Error(`Unknown event ${n} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!f[n])if("object"==typeof t[n])for(let o in t[n])e(t,"*"===o?n:n+"-"+o.toLowerCase(),t[n][o]);else"function"==typeof t[n]&&e(t,n,t[n])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],n=this.runOnRoot(t);if(m(n))try{await n}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[d];){e[d]=!0;let t=[v(e)];for(;t.length>0;){let e=this.visitTick(t);if(m(e))try{await e}catch(e){let n=t[t.length-1].node;throw this.handleError(e,n)}}}if(this.listeners.OnceExit)for(let[t,n]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map(e=>n(e,this.helpers));await Promise.all(t)}else await n(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));return m(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=l;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let n=new r(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){if(m(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[d];)e[d]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[n,o]of e){let e;this.result.lastPlugin=n;try{e=o(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(m(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:n,visitors:o}=t;if("root"!==n.type&&"document"!==n.type&&!n.parent)return void e.pop();if(o.length>0&&t.visitorIndex<o.length){let[e,i]=o[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===o.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return i(n.toProxy(),this.helpers)}catch(e){throw this.handleError(e,n)}}if(0!==t.iterator){let o,i=t.iterator;for(;o=n.nodes[n.indexes[i]];)if(n.indexes[i]+=1,!o[d])return o[d]=!0,void e.push(v(o));t.iterator=0,delete n.indexes[i]}let i=t.events;for(;t.eventIndex<i.length;){let e=i[t.eventIndex];if(t.eventIndex+=1,0===e)return void(n.nodes&&n.nodes.length&&(n[d]=!0,t.iterator=n.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[d]=!0;let t=y(e);for(let n of t)if(0===n)e.nodes&&e.each(e=>{e[d]||this.walkSync(e)});else{let t=this.listeners[n];if(t&&this.visitSync(t,e.toProxy()))return}}warnings(){return this.sync().warnings()}}w.registerPostcss=e=>{C=e},e.exports=w,w.default=w,c.registerLazyResult(w),i.registerLazyResult(w)},7071:(e,t,n)=>{t.__esModule=!0,t.default=void 0;var o,i=(o=n(4646))&&o.__esModule?o:{default:o},r=n(1581);function a(e,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},a(e,t)}var s=function(e){var t,n;function o(t){var n;return(n=e.call(this,t)||this).type=r.ID,n}return n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,a(t,n),o.prototype.valueToString=function(){return"#"+e.prototype.valueToString.call(this)},o}(i.default);t.default=s,e.exports=t.default},7139:(e,t,n)=>{n.d(t,{r:()=>d});var o=n(3026),i=n(9581),r=n(8957),a=n(1863),s=n(1596),c=n(4024),l=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function d(e){var t=arguments;return l(this,void 0,void 0,function*(){const n=r.Logger.logfunction("GetConcept",t)||{};let d=(0,r.CreateDefaultConcept)();const u=new FormData;u.append("id",e.toString());try{if(r.serviceWorker){n.serviceWorker=!0;try{const t=yield(0,r.sendMessage)("GetConcept",{id:e});return r.Logger.logUpdate(n),t.data}catch(e){(0,a.ey)(n,"GetConcept",e),(0,r.handleServiceWorkerException)(e)}}if(0==e||null==e||null==e)return d;var h=yield o.I.GetConcept(e);let t=o.I.GetNpc(e);if(0!=h.id||t)return r.Logger.logUpdate(n),h;{let t;const h={method:"POST",body:u,headers:{Authorization:"Bearer "+c.b.BearerAccessToken}};try{t=yield fetch(i.B.GetConceptUrl(),h)}catch(e){t=yield(0,s.g)(h,"/api/getConcept")}return yield function(e,t,n,i){return l(this,void 0,void 0,function*(){return e.ok?(t=yield e.json()).id>0?o.I.AddConcept(t):o.I.AddNpc(i):(0,a.ry)(e),r.Logger.logUpdate(n),t})}(t,d,n,e)}}catch(e){Error,(0,a.Mb)(e,i.B.GetConceptUrl()),(0,a.ey)(n,"GetConcept",e)}})}},7149:(e,t,n)=>{t.__esModule=!0,t.default=void 0;var o,i=(o=n(8349))&&o.__esModule?o:{default:o},r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=a(t);if(n&&n.has(e))return n.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var s=i?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(o,r,s):o[r]=e[r]}o.default=e,n&&n.set(e,o);return o}(n(680));function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(a=function(e){return e?n:t})(e)}var s=function(e){return new i.default(e)};Object.assign(s,r),delete s.__esModule;var c=s;t.default=c,e.exports=t.default},7273:(e,t,n)=>{n.d(t,{z:()=>i});var o=n(9581);class i{constructor(e,t,n,i){this.url=o.B.BASE_URL,this.message=e,this.ok=t,this.status=n,this.data=i}getMessage(){return this.message}setMessage(e){return this.message=e,this}getStatus(){return this.status}setStatus(e){return this.status=e,this}getData(){return this.data}setData(e){return this.data=e,this}getOk(){return this.ok}setOk(e){return this.ok=e,this}getUrl(){return this.url}setUrl(e){return this.url=e,this}}},7282:(e,t,n)=>{n.d(t,{Y:()=>r,o:()=>i});var o=n(2615);function i(){let e=r(new Date),t=r(new Date);return new o.j(0,0,0,0,0,"0",0,!1,e,t,"0")}function r(e){const t=e.getMonth()+1,n=e.getDate(),o=e.getFullYear();let i=e.getHours();const r=e.getMinutes(),a=e.getSeconds(),s=i>=12?"PM":"AM";i%=12,i=i||12;const c=e=>e.toString().padStart(2,"0");return`${t}/${n}/${o} ${i}:${c(r)}:${c(a)} ${s}`}},7324:(e,t,n)=>{t.__esModule=!0,t.default=void 0;var o,i=(o=n(3631))&&o.__esModule?o:{default:o},r=n(1581);function a(e,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},a(e,t)}var s=function(e){var t,n;function o(t){var n;return(n=e.call(this,t)||this).type=r.PSEUDO,n}return n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,a(t,n),o.prototype.toString=function(){var e=this.length?"("+this.map(String).join(",")+")":"";return[this.rawSpaceBefore,this.stringifyProperty("value"),e,this.rawSpaceAfter].join("")},o}(i.default);t.default=s,e.exports=t.default},7467:(e,t,n)=>{n.d(t,{j:()=>u});var o=n(8286),i=n(9581),r=n(4364),a=n(3518),s=n(1863),c=n(8957),l=n(1596),d=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function u(){return d(this,arguments,void 0,function*(e=[]){const t=c.Logger.logfunction("GetConnectionBulk",e.length)||{};let n=[];try{if(c.serviceWorker){t.serviceWorker=!0;try{const n=yield(0,c.sendMessage)("GetConnectionBulk",{connectionIds:e});return c.Logger.logUpdate(t),n.data}catch(e){(0,s.ey)(t,"GetConnectionBulk",e),(0,c.handleServiceWorkerException)(e)}}if(e.length>0){let r=[];for(let t=0;t<e.length;t++)if(!o.d.GetNpConn(e[t])){let i=yield o.d.GetConnection(e[t]);0==i.id?r.push(e[t]):n.push(i)}if(0==r.length)return c.Logger.logUpdate(t),n;{let e;const u={method:"POST",headers:(0,a.Xr)(),body:JSON.stringify(r)};try{e=yield fetch(i.B.GetConnectionBulkUrl(),u)}catch(t){e=yield(0,l.g)(u,"/api/get_connection_bulk")}yield function(e,t,n){return d(this,void 0,void 0,function*(){if(e.ok){const n=yield e.json();if(n.length>0)for(let e=0;e<n.length;e++){let i=n[e];t.push(i),o.d.AddConnection(i)}}else(0,s.ey)(n,"GetConnectionBulk",e.status),(0,s.ry)(e)})}(e,n,t),c.Logger.logUpdate(t)}}}catch(e){Error,(0,s.ey)(t,"GetConnectionBulk",e),(0,s.Mb)(e,i.B.GetConnectionBulkUrl())}return yield(0,r.s)(n),n})}},7668:e=>{const t={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};class n{constructor(e){this.builder=e}atrule(e,t){let n="@"+e.name,o=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?n+=e.raws.afterName:o&&(n+=" "),e.nodes)this.block(e,n+o);else{let i=(e.raws.between||"")+(t?";":"");this.builder(n+o+i,e)}}beforeAfter(e,t){let n;n="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let o=e.parent,i=0;for(;o&&"root"!==o.type;)i+=1,o=o.parent;if(n.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<i;e++)n+=t}return n}block(e,t){let n,o=this.raw(e,"between","beforeOpen");this.builder(t+o+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),n=this.raw(e,"after")):n=this.raw(e,"after","emptyBody"),n&&this.builder(n),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let n=this.raw(e,"semicolon");for(let o=0;o<e.nodes.length;o++){let i=e.nodes[o],r=this.raw(i,"before");r&&this.builder(r),this.stringify(i,t!==o||n)}}comment(e){let t=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+n+"*/",e)}decl(e,t){let n=this.raw(e,"between","colon"),o=e.prop+n+this.rawValue(e,"value");e.important&&(o+=e.raws.important||" !important"),t&&(o+=";"),this.builder(o,e)}document(e){this.body(e)}raw(e,n,o){let i;if(o||(o=n),n&&(i=e.raws[n],void 0!==i))return i;let r=e.parent;if("before"===o){if(!r||"root"===r.type&&r.first===e)return"";if(r&&"document"===r.type)return""}if(!r)return t[o];let a=e.root();if(a.rawCache||(a.rawCache={}),void 0!==a.rawCache[o])return a.rawCache[o];if("before"===o||"after"===o)return this.beforeAfter(e,o);{let t="raw"+((s=o)[0].toUpperCase()+s.slice(1));this[t]?i=this[t](a,e):a.walk(e=>{if(i=e.raws[n],void 0!==i)return!1})}var s;return void 0===i&&(i=t[o]),a.rawCache[o]=i,i}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let n;return e.walkComments(e=>{if(void 0!==e.raws.before)return n=e.raws.before,n.includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),void 0===n?n=this.raw(t,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeDecl(e,t){let n;return e.walkDecls(e=>{if(void 0!==e.raws.before)return n=e.raws.before,n.includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),void 0===n?n=this.raw(t,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1}),t}rawBeforeRule(e){let t;return e.walk(n=>{if(n.nodes&&(n.parent!==e||e.first!==n)&&void 0!==n.raws.before)return t=n.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(n=>{let o=n.parent;if(o&&o!==e&&o.parent&&o.parent===e&&void 0!==n.raws.before){let e=n.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1}),t}rawValue(e,t){let n=e[t],o=e.raws[t];return o&&o.value===n?o.raw:n}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}}e.exports=n,n.default=n},7793:(e,t,n)=>{let o,i,r,a,s=n(9371),c=n(5238),l=n(3152),{isClean:d,my:u}=n(4151);function h(e){return e.map(e=>(e.nodes&&(e.nodes=h(e.nodes)),delete e.source,e))}function p(e){if(e[d]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)p(t)}class f extends l{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,n,o=this.getIterator();for(;this.indexes[o]<this.proxyOf.nodes.length&&(t=this.indexes[o],n=e(this.proxyOf.nodes[t],t),!1!==n);)this.indexes[o]+=1;return delete this.indexes[o],n}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...n)=>e[t](...n.map(e=>"function"==typeof e?(t,n)=>e(t.toProxy(),n):e)):"every"===t||"some"===t?n=>e[t]((e,...t)=>n(e.toProxy(),...t)):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map(e=>e.toProxy()):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,n)=>(e[t]===n||(e[t]=n,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let n,o=this.index(e),i=this.normalize(t,this.proxyOf.nodes[o]).reverse();o=this.index(e);for(let e of i)this.proxyOf.nodes.splice(o+1,0,e);for(let e in this.indexes)n=this.indexes[e],o<n&&(this.indexes[e]=n+i.length);return this.markDirty(),this}insertBefore(e,t){let n,o=this.index(e),i=0===o&&"prepend",r=this.normalize(t,this.proxyOf.nodes[o],i).reverse();o=this.index(e);for(let e of r)this.proxyOf.nodes.splice(o,0,e);for(let e in this.indexes)n=this.indexes[e],o<=n&&(this.indexes[e]=n+r.length);return this.markDirty(),this}normalize(e,t){if("string"==typeof e)e=h(i(e).nodes);else if(void 0===e)e=[];else if(Array.isArray(e)){e=e.slice(0);for(let t of e)t.parent&&t.parent.removeChild(t,"ignore")}else if("root"===e.type&&"document"!==this.type){e=e.nodes.slice(0);for(let t of e)t.parent&&t.parent.removeChild(t,"ignore")}else if(e.type)e=[e];else if(e.prop){if(void 0===e.value)throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new c(e)]}else if(e.selector||e.selectors)e=[new a(e)];else if(e.name)e=[new o(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new s(e)]}return e.map(e=>(e[u]||f.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[d]&&p(e),e.raws||(e.raws={}),void 0===e.raws.before&&t&&void 0!==t.raws.before&&(e.raws.before=t.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let n in this.indexes)t=this.indexes[n],t>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}replaceValues(e,t,n){return n||(n=t,t={}),this.walkDecls(o=>{t.props&&!t.props.includes(o.prop)||t.fast&&!o.value.includes(t.fast)||(o.value=o.value.replace(e,n))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,n)=>{let o;try{o=e(t,n)}catch(e){throw t.addToError(e)}return!1!==o&&t.walk&&(o=t.walk(e)),o})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((n,o)=>{if("atrule"===n.type&&e.test(n.name))return t(n,o)}):this.walk((n,o)=>{if("atrule"===n.type&&n.name===e)return t(n,o)}):(t=e,this.walk((e,n)=>{if("atrule"===e.type)return t(e,n)}))}walkComments(e){return this.walk((t,n)=>{if("comment"===t.type)return e(t,n)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((n,o)=>{if("decl"===n.type&&e.test(n.prop))return t(n,o)}):this.walk((n,o)=>{if("decl"===n.type&&n.prop===e)return t(n,o)}):(t=e,this.walk((e,n)=>{if("decl"===e.type)return t(e,n)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((n,o)=>{if("rule"===n.type&&e.test(n.selector))return t(n,o)}):this.walk((n,o)=>{if("rule"===n.type&&n.selector===e)return t(n,o)}):(t=e,this.walk((e,n)=>{if("rule"===e.type)return t(e,n)}))}}f.registerParse=e=>{i=e},f.registerRule=e=>{a=e},f.registerAtRule=e=>{o=e},f.registerRoot=e=>{r=e},e.exports=f,f.default=f,f.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,o.prototype):"rule"===e.type?Object.setPrototypeOf(e,a.prototype):"decl"===e.type?Object.setPrototypeOf(e,c.prototype):"comment"===e.type?Object.setPrototypeOf(e,s.prototype):"root"===e.type&&Object.setPrototypeOf(e,r.prototype),e[u]=!0,e.nodes&&e.nodes.forEach(e=>{f.rebuild(e)})}},7820:(e,t,n)=>{n.d(t,{G:()=>a});var o=n(205),i=n(2515),r=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class a{static addNodeToTree(e){if(null==this.root)return this.root=e,this.root;this.root=this.root.addNode(e,this.root,this.root.height)}static addConceptToTree(e){var t=new i.x(e.ghostId,e,null,null);this.addNodeToTree(t)}static waitForDataToLoad(){return r(this,void 0,void 0,function*(){return new Promise((e,t)=>{this.checkFlag(e),setTimeout(()=>{t("not")},25e3)})})}static checkFlag(e){if(o.B.isLocalDataLoaded)return e("done");setTimeout(a.checkFlag,1e3,e)}static getNodeFromTree(e){return r(this,void 0,void 0,function*(){return this.root?this.root.getFromNode(e,this.root):null})}static removeNodeFromTree(e){return r(this,void 0,void 0,function*(){this.root&&(this.root=this.root.removeNode(this.root,e))})}}a.root=null},7869:(e,t,n)=>{n.d(t,{_:()=>m,A:()=>f});var o=n(9581),i=n(3026),r=n(1863),a=n(3518),s=n(8957),c=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};var l=n(2299);class d{}d.isUpdated=!1,d.isOnlineSync=!1;var u=n(3655),h=n(9003),p=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function f(){return p(this,arguments,void 0,function*(e=!0){try{if(yield(0,u.qI)("concepts"),yield(0,h.qI)("concepts"),e){if((yield(0,u.b8)()).isOnlineSync)return!0;yield function(){return c(this,void 0,void 0,function*(){const e=s.Logger.logfunction("GetAiData");try{(new Date).getTime();var t=(0,a.ab)("application/x-www-form-urlencoded");const c=yield fetch(o.B.GetAllAiData(),{method:"GET",headers:t});c.ok||(0,r.ry)(c);const l=yield c.json();for(var n=0;n<l.length;n++)i.I.AddConcept(l[n]);m(),(new Date).getTime(),s.Logger.logUpdate(e)}catch(e){Error,(0,r.Mb)(e,o.B.GetAllAiData())}})}()}return!0}catch(e){return!0}})}function m(){return p(this,void 0,void 0,function*(){d.isOnlineSync=!0;var e=new l.B(d.isOnlineSync);(0,u.El)(e)})}},7876:(e,t,n)=>{n.d(t,{A:()=>d,K:()=>u});var o=n(1735),i=n(7139),r=n(8957),a=n(3026),s=n(7282),c=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};const l=new Map;function d(e){return c(this,arguments,void 0,function*(e,t=999){e=Number(e);let n=performance.now();if(o.J.activateStatus)try{o.J.incrementConcept(e)}catch(e){r.Logger.log("ERROR","Error Adding Connection")}if(e>0){const t=yield r.BinaryTree.getNodeFromTree(e);if((null==t?void 0:t.value)&&t.value.id>0)return t.value}if(r.serviceWorker)try{const n=(yield(0,r.sendMessage)("GetTheConcept",{id:e,userId:t})).data;return n&&n.id>0&&a.I.AddConceptToMemory(n),n}catch(e){(0,r.handleServiceWorkerException)(e)}let d=(0,s.o)();if(l.has(e))return l.get(e)||d;const u=(()=>c(this,void 0,void 0,function*(){try{if(e<0){return yield r.LocalConceptsData.GetConceptByGhostId(e)}if(d=yield a.I.GetConcept(e),(null==d||0==d.id)&&null!=e&&null!=e){let t=yield(0,i.r)(e);d=t}if(0!=d.id&&null==d.type){if(null==(yield a.I.GetConcept(d.typeId))&&null!=d.typeId&&null!=d.typeId){let e=yield(0,i.r)(d.typeId);d.type=e}}return d}catch(o){throw r.Logger.logError(n,t,"read","unknown",void 0,500,o,"GetTheConcept",[e,t],"unknown",void 0),o}finally{l.delete(e)}}))();return l.set(e,u),u})}function u(e){return c(this,void 0,void 0,function*(){if(r.serviceWorker)try{return(yield(0,r.sendMessage)("AddTypeConcept",{concept:e})).data}catch(e){(0,r.handleServiceWorkerException)(e)}if(null==e.type){let t=yield a.I.GetConcept(e.typeId);if(0==t.id&&0!=e.typeId&&999!=e.typeId){let t=yield(0,i.r)(e.typeId);e.type=t}else e.type=t}})}},7887:(e,t,n)=>{n.d(t,{a:()=>d,p:()=>u});var o=n(8286),i=n(4864),r=n(3655),a=n(9581),s=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};const c=500;function l(){return new Promise(e=>setTimeout(e,0))}function d(){return s(this,void 0,void 0,function*(){try{let e=[];if(a.B.isPwa&&(e=yield(0,r.D3)("connection")),Array.isArray(e))for(let t=0;t<e.length;t++)o.d.AddConnectionToMemory(e[t]),t>0&&t%c===0&&(yield l())}catch(e){throw{message:"Cannot create Connection Binary Tree Concept",ok:!1,status:400,data:e}}})}function u(){return s(this,void 0,void 0,function*(){try{let e=[];if(Array.isArray(e))for(let t=0;t<e.length;t++)i.G.AddConnectionToMemory(e[t])}catch(e){throw{message:"Cannot create Local Connection Binary Tree Concept",ok:!1,status:400,data:e}}})}},8064:(e,t,n)=>{n.d(t,{$I:()=>s,Ay:()=>a});var o=n(9736),i=(n(9581),n(3518),n(8957));n(1863);var r=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function a(e){return r(this,void 0,void 0,function*(){return yield o.v.GetConceptByCharacterAndTypeLocal(e,51)})}function s(e){return r(this,void 0,void 0,function*(){if(i.serviceWorker)try{return(yield(0,i.sendMessage)("GetConceptByCharacterAndCategoryLocal",{character:e})).data}catch(e){(0,i.handleServiceWorkerException)(e)}let t=(0,i.CreateDefaultLConcept)();if("the"==e)return t.id=1,t.typeId=5,t.characterValue="the",t;let n=(0,i.SplitStrings)(e);if(n.length>1){let i=1,a=yield s(n[0]);0!=a.id&&(i=a.id),t=yield function(e,t){return r(this,void 0,void 0,function*(){return o.v.GetConceptByCharacterAndCategoryLocal(e,t)})}(e,i)}else n[0]==e&&(t=yield a(e));return t})}},8095:(e,t,n)=>{n.d(t,{h:()=>s});var o=n(8957),i=n(9700),r=n(1863),a=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function s(e,t,n){var s=arguments;return a(this,arguments,void 0,function*(e,t,n,a=!1,c={concepts:[],connections:[]}){var l,d,u,h,p,f;const m=i.V.logfunction("CreateConnectionBetweenTwoConceptsLocal",s)||{};let y=performance.now();try{if(o.serviceWorker){m.serviceWorker=!0;try{const r=yield(0,o.sendMessage)("CreateConnectionBetweenTwoConceptsLocal",{ofTheConcept:e,toTheConcept:t,linker:n,both:a,actions:c});return(null===(d=null===(l=null==r?void 0:r.actions)||void 0===l?void 0:l.concepts)||void 0===d?void 0:d.length)&&(c.concepts=JSON.parse(JSON.stringify(r.actions.concepts))),(null===(h=null===(u=null==r?void 0:r.actions)||void 0===u?void 0:u.connections)||void 0===h?void 0:h.length)&&(c.connections=JSON.parse(JSON.stringify(r.actions.connections))),i.V.logUpdate(m),r.data}catch(e){(0,r.ey)(m,"CreateConnectionBetweenTwoConceptsLocal",e),(0,o.handleServiceWorkerException)(e)}}e.userId;if(a){let i=(null===(p=t.type)||void 0===p?void 0:p.characterValue)+"_s"+"_"+(n+"_by");var v=yield(0,o.MakeTheInstanceConceptLocal)("connection",i,!1,999,999,999,0,c);yield(0,o.CreateTheConnectionLocal)(t.id,e.id,v.id,1e3,void 0,void 0,c)}let s=(null===(f=e.type)||void 0===f?void 0:f.characterValue)+"_s"+"_"+(n+"_s");var g=yield(0,o.MakeTheInstanceConceptLocal)("connection",s,!1,999,999,999,void 0,c);let y=yield(0,o.CreateTheConnectionLocal)(e.id,t.id,g.id,1e3,void 0,void 0,c);return i.V.logUpdate(m),y}catch(o){throw i.V.logError(y,e.userId,"create",void 0,void 0,500,o,"CreateConnectionBetweenTwoConceptsLocal",[e,t,n,a],void 0,void 0),(0,r.ey)(m,"CreateConnectionBetweenTwoConceptsLocal",o),o}})}},8146:(e,t,n)=>{n.d(t,{Y:()=>l});var o=n(3026),i=n(9581),r=n(8957),a=n(1863),s=n(7876),c=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function l(e){var t=arguments;return c(this,void 0,void 0,function*(){const n=r.Logger.logfunction("GetConceptByCharacterValue",t);let c=(0,r.CreateDefaultConcept)();try{const t=new FormData;t.append("character_value",e);const l=yield fetch(i.B.GetConceptByCharacterValueUrl(),{method:"POST",body:t});l.ok?(c=yield l.json(),c.id>0&&(0,s.K)(c).then(e=>{o.I.AddConcept(c)}),r.Logger.logUpdate(n)):(0,a.ry)(l)}catch(e){Error,(0,a.Mb)(e,i.B.GetConceptByCharacterValueUrl()),(0,a.ey)(n,"GetConceptByCharacterValue",e)}return c})}},8176:(e,t,n)=>{n.d(t,{a:()=>a});var o=n(6191),i=n(2170),r=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class a{static init(){return r(this,void 0,void 0,function*(){if(i.B.getValue("enableCache",!0))try{const e=yield function(e){return r(this,void 0,void 0,function*(){const t=yield(0,o.Al)();return new Promise((n,o)=>{const i=t.transaction(e,"readonly").objectStore(e),r=[],a=i.openCursor();a.onsuccess=()=>{const e=a.result;e?(r.push({key:e.key,value:e.value}),e.continue()):n(r)},a.onerror=e=>{o(e)}})})}(o.l8);for(const{key:t,value:n}of e)this.cacheMap.set(t,n)}catch(e){}})}static getHash(e){return r(this,void 0,void 0,function*(){return yield function(e){return r(this,void 0,void 0,function*(){const t=JSON.stringify(e,(e,t)=>t&&"object"==typeof t&&!Array.isArray(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t),n=(new TextEncoder).encode(t),o=yield crypto.subtle.digest("SHA-256",n);return Array.from(new Uint8Array(o)).map(e=>e.toString(16).padStart(2,"0")).join("")})}(e)})}static get(e){var t;return i.B.getValue("enableCache",!0)&&null!==(t=this.cacheMap.get(e))&&void 0!==t?t:null}static set(e,t){if(!i.B.getValue("enableCache",!0))return;const n=this.cacheMap.get(e),r=JSON.stringify(t);n&&JSON.stringify(n)===r||(this.cacheMap.set(e,t),(0,o.eH)(o.l8,t,e).catch(()=>{}),window.dispatchEvent(new CustomEvent(this.prefix+e,{detail:t})))}static subscribe(e,t){const n=e=>{t(e.detail)};return window.addEventListener(this.prefix+e,n),()=>{window.removeEventListener(this.prefix+e,n)}}static remove(e){this.cacheMap.delete(e),(0,o.kM)(o.l8,e).catch(()=>{})}static clearAll(){this.cacheMap.clear(),(0,o.sg)(o.l8).catch(()=>{})}}a.prefix="FREESCHEMA_CACHE_",a.cacheMap=new Map},8286:(e,t,n)=>{n.d(t,{d:()=>m});var o=n(1735),i=n(8957),r=n(3655),a=n(1863),s=n(2155),c=n(5239),l=n(991),d=n(3996);class u extends d.i{constructor(e,t,n,o){super(e,t,n,o),this.key="",this.value=[],this.height=1,this.key=e,this.value=t,this.leftNode=n,this.rightNode=o}addNode(e,t,n){if(null==t)return t=e;let o=t.leftNode,i=t.rightNode;if(t.key>e.key)t.leftNode=this.addNode(e,o,n);else{if(!(t.key<e.key))return t;t.rightNode=this.addNode(e,i,n)}t.height=1+Math.max(this.getHeight(t.leftNode),this.getHeight(t.rightNode));let r=this.getBalanceFactor(t);if(r>1&&t.leftNode){if(e.key<t.leftNode.key){return this.rightRotate(t)}if(e.key>t.leftNode.key){return t.leftNode=this.leftRotate(t.leftNode),this.rightRotate(t)}}if(r<-1&&t.rightNode){if(e.key>t.rightNode.key){return this.leftRotate(t)}if(e.key<t.rightNode.key){return t.rightNode=this.rightRotate(t.rightNode),this.leftRotate(t)}}return t}}var h=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class p{static CreateCompositionKey(e){return e}static addNodeToTree(e){return h(this,void 0,void 0,function*(){return null==this.connectionTypeRoot?(this.connectionTypeRoot=e,this.connectionTypeRoot):(this.connectionTypeRoot=this.connectionTypeRoot.addNode(e,this.connectionTypeRoot,this.connectionTypeRoot.height),this.connectionTypeRoot)})}static addConnectionToTree(e){if(e.id>0){let t=this.CreateCompositionKey(e.typeId);if(this.connectionTypeRoot){let n=this.connectionTypeRoot.getFromNode(t,this.connectionTypeRoot);if(n){let t=null==n?void 0:n.value;0==t.length&&(n.value=[]),t.includes(e.id)||t.push(e.id)}else{let n=[];n.push(e.id);let o=new u(t,n,null,null);this.addNodeToTree(o)}}else{let n=[];n.push(e.id);let o=new u(t,n,null,null);this.addNodeToTree(o)}}}static GetConnectionByOfTheConceptAndTypeId(e,t){let n=this.CreateCompositionKey(t);if(this.connectionTypeRoot){let e=this.connectionTypeRoot.getFromNode(n,this.connectionTypeRoot);if(e)return e.value}return null}}p.connectionTypeRoot=null;var f=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class m{constructor(){this.name="Connection Array"}static CheckContains(e){let t=!1;for(let n=0;n<this.connectionArray.length;n++)this.connectionArray[n].id==e.id&&(t=!0);return t}static AddConnectionToStorage(e){(0,r.kH)("connection",e)}static AddNpConn(e){this.deletedConnections.includes(e)||this.deletedConnections.push(e)}static GetNpConn(e){return!!this.deletedConnections.includes(e)}static AddConnection(e){try{c.O.addConnectionToTree(e),p.addConnectionToTree(e),l.H.addConnection(e)}catch(e){throw e}}static AddConnectionToMemory(e){e.isTemp||(c.O.addConnectionToTree(e),p.addConnectionToTree(e),l.H.addConnection(e))}static AddToDictionary(e){this.connectionDictionary[e.id]=e}static RemoveConnection(e){0!=e.id&&((0,r.wh)("connection",e.id),c.O.removeNodeFromTree(e.id),l.H.removeNodeFromTree(e.id))}static GetConnectionTypeOfTree(){l.H.node}static GetConnectionByOfTheConceptAndType(e,t){return f(this,void 0,void 0,function*(){try{if(i.serviceWorker)try{return(yield(0,i.sendMessage)("ConnectionData__GetConnectionByOfTheConceptAndType",{ofTheConceptId:e,typeId:t})).data}catch(e){(0,i.handleServiceWorkerException)(e)}let n=l.H.GetConnectionByOfTheConceptAndTypeId(e,t);return n||[]}catch(e){return[]}})}static GetConnectionByOfType(e,t){const n=i.Logger.logfunction("ConnectionData.GetConnectionByOfType",arguments);let o=p.GetConnectionByOfTheConceptAndTypeId(e,t);return o?(i.Logger.logUpdate(n),o):(i.Logger.logUpdate(n),[])}static GetConnectionTree(){return c.O.connectionroot}static GetConnectionTypeTree(){return p.connectionTypeRoot}static GetConnectionBulkData(e,t,n){return f(this,void 0,void 0,function*(){yield c.O.getConnectionListFromIds(e,t,n)})}static GetConnection(e){return f(this,void 0,void 0,function*(){o.J.incrementConnection(e);let t=new s.N(0,0,0,0,0,0,0);try{if(i.serviceWorker)try{return(yield(0,i.sendMessage)("ConnectionData__GetConnection",{id:e})).data}catch(e){(0,i.handleServiceWorkerException)(e)}let n=yield c.O.getNodeFromTree(e);if(null==n?void 0:n.value){let e=n.value;e&&(t=e)}return t}catch(e){return t}})}static GetConnectionsOfCompositionLocal(e){var t=arguments;return f(this,void 0,void 0,function*(){const n=i.Logger.logfunction("ConnectionData.GetConnectionsOfCompositionLocal",t)||{};let o=[];try{if(i.serviceWorker){n.serviceWorker=!0;try{const t=yield(0,i.sendMessage)("ConnectionData__GetConnectionsOfCompositionLocal",{id:e});return i.Logger.logUpdate(n),t.data}catch(e){(0,a.ey)(n,"GetConnectionsOfCompositionLocal",e),(0,i.handleServiceWorkerException)(e)}}let t=[];t=m.GetConnectionByOfType(e,e);for(let e=0;e<t.length;e++){let r=yield c.O.getNodeFromTree(t[e]);r&&o.push(r.value),i.Logger.logUpdate(n)}}catch(e){(0,a.ey)(n,"ConnectionData.GetConnectionsOfCompositionLocal",e)}return o})}static GetConnectionsOfConcept(e){return f(this,void 0,void 0,function*(){let t=[],n=[];try{if(i.serviceWorker)try{return(yield(0,i.sendMessage)("ConnectionData__GetConnectionsOfConcept",{id:e})).data}catch(e){(0,i.handleServiceWorkerException)(e)}t=yield m.GetConnectionByOfTheConceptAndType(e,e);for(let e=0;e<t.length;e++){let o=yield c.O.getNodeFromTree(t[e]);o&&n.push(o.value)}return n}catch(e){return n}})}getName(){return this.name}}m.deletedConnections=[],m.connectionArray=[],m.connectionDictionary=[]},8339:(e,t,n)=>{let o=n(396),i=n(9371),r=n(5238),a=n(5644),s=n(1534),c=n(5781);const l={empty:!0,space:!0};e.exports=class{constructor(e){this.input=e,this.root=new a,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,n,i,r=new o;r.name=e[1].slice(1),""===r.name&&this.unnamedAtrule(r,e),this.init(r,e[2]);let a=!1,s=!1,c=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){r.source.end=this.getPosition(e[2]),r.source.end.offset++,this.semicolon=!0;break}if("{"===t){s=!0;break}if("}"===t){if(c.length>0){for(i=c.length-1,n=c[i];n&&"space"===n[0];)n=c[--i];n&&(r.source.end=this.getPosition(n[3]||n[2]),r.source.end.offset++)}this.end(e);break}c.push(e)}else c.push(e);if(this.tokenizer.endOfFile()){a=!0;break}}r.raws.between=this.spacesAndCommentsFromEnd(c),c.length?(r.raws.afterName=this.spacesAndCommentsFromStart(c),this.raw(r,"params",c),a&&(e=c[c.length-1],r.source.end=this.getPosition(e[3]||e[2]),r.source.end.offset++,this.spaces=r.raws.between,r.raws.between="")):(r.raws.afterName="",r.params=""),s&&(r.nodes=[],this.current=r)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let n,o=0;for(let i=t-1;i>=0&&(n=e[i],"space"===n[0]||(o+=1,2!==o));i--);throw this.input.error("Missed semicolon","word"===n[0]?n[3]+1:n[2])}colon(e){let t,n,o,i=0;for(let[r,a]of e.entries()){if(n=a,o=n[0],"("===o&&(i+=1),")"===o&&(i-=1),0===i&&":"===o){if(t){if("word"===t[0]&&"progid"===t[1])continue;return r}this.doubleColon(n)}t=n}return!1}comment(e){let t=new i;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let n=e[1].slice(2,-2);if(/^\s*$/.test(n))t.text="",t.raws.left=n,t.raws.right="";else{let e=n.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=c(this.input)}decl(e,t){let n=new r;this.init(n,e[0][2]);let o,i=e[e.length-1];for(";"===i[0]&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(i[3]||i[2]||function(e){for(let t=e.length-1;t>=0;t--){let n=e[t],o=n[3]||n[2];if(o)return o}}(e)),n.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;n.prop+=e.shift()[1]}for(n.raws.between="";e.length;){if(o=e.shift(),":"===o[0]){n.raws.between+=o[1];break}"word"===o[0]&&/\w/.test(o[1])&&this.unknownWord([o]),n.raws.between+=o[1]}"_"!==n.prop[0]&&"*"!==n.prop[0]||(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let a,s=[];for(;e.length&&(a=e[0][0],"space"===a||"comment"===a);)s.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(o=e[t],"!important"===o[1].toLowerCase()){n.important=!0;let o=this.stringFrom(e,t);o=this.spacesFromEnd(e)+o," !important"!==o&&(n.raws.important=o);break}if("important"===o[1].toLowerCase()){let o=e.slice(0),i="";for(let e=t;e>0;e--){let t=o[e][0];if(i.trim().startsWith("!")&&"space"!==t)break;i=o.pop()[1]+i}i.trim().startsWith("!")&&(n.important=!0,n.raws.important=i,e=o)}if("space"!==o[0]&&"comment"!==o[0])break}e.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(n.raws.between+=s.map(e=>e[1]).join(""),s=[]),this.raw(n,"value",s.concat(e),t),n.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new s;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&"rule"===t.type&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="",t.source.end=this.getPosition(e[2]),t.source.end.offset+=t.raws.ownSemicolon.length)}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,n=null,o=!1,i=null,r=[],a=e[1].startsWith("--"),s=[],c=e;for(;c;){if(n=c[0],s.push(c),"("===n||"["===n)i||(i=c),r.push("("===n?")":"]");else if(a&&o&&"{"===n)i||(i=c),r.push("}");else if(0===r.length){if(";"===n){if(o)return void this.decl(s,a);break}if("{"===n)return void this.rule(s);if("}"===n){this.tokenizer.back(s.pop()),t=!0;break}":"===n&&(o=!0)}else n===r[r.length-1]&&(r.pop(),0===r.length&&(i=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),r.length>0&&this.unclosedBracket(i),t&&o){if(!a)for(;s.length&&(c=s[s.length-1][0],"space"===c||"comment"===c);)this.tokenizer.back(s.pop());this.decl(s,a)}else this.unknownWord(s)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,n,o){let i,r,a,s,c=n.length,d="",u=!0;for(let e=0;e<c;e+=1)i=n[e],r=i[0],"space"!==r||e!==c-1||o?"comment"===r?(s=n[e-1]?n[e-1][0]:"empty",a=n[e+1]?n[e+1][0]:"empty",l[s]||l[a]||","===d.slice(-1)?u=!1:d+=i[1]):d+=i[1]:u=!1;if(!u){let o=n.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:o,value:d}}e[t]=d}rule(e){e.pop();let t=new s;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)n=e.pop()[1]+n;return n}spacesAndCommentsFromStart(e){let t,n="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)n+=e.shift()[1];return n}spacesFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)n=e.pop()[1]+n;return n}stringFrom(e,t){let n="";for(let o=t;o<e.length;o++)n+=e[o][1];return e.splice(t,e.length-t),n}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word "+e[0][1],{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}}},8349:(e,t,n)=>{t.__esModule=!0,t.default=void 0;var o,i=(o=n(5170))&&o.__esModule?o:{default:o};var r=function(){function e(e,t){this.func=e||function(){},this.funcRes=null,this.options=t}var t=e.prototype;return t._shouldUpdateSelector=function(e,t){return void 0===t&&(t={}),!1!==Object.assign({},this.options,t).updateSelector&&"string"!=typeof e},t._isLossy=function(e){return void 0===e&&(e={}),!1===Object.assign({},this.options,e).lossless},t._root=function(e,t){return void 0===t&&(t={}),new i.default(e,this._parseOptions(t)).root},t._parseOptions=function(e){return{lossy:this._isLossy(e)}},t._run=function(e,t){var n=this;return void 0===t&&(t={}),new Promise(function(o,i){try{var r=n._root(e,t);Promise.resolve(n.func(r)).then(function(o){var i=void 0;return n._shouldUpdateSelector(e,t)&&(i=r.toString(),e.selector=i),{transform:o,root:r,string:i}}).then(o,i)}catch(e){return void i(e)}})},t._runSync=function(e,t){void 0===t&&(t={});var n=this._root(e,t),o=this.func(n);if(o&&"function"==typeof o.then)throw new Error("Selector processor returned a promise to a synchronous call.");var i=void 0;return t.updateSelector&&"string"!=typeof e&&(i=n.toString(),e.selector=i),{transform:o,root:n,string:i}},t.ast=function(e,t){return this._run(e,t).then(function(e){return e.root})},t.astSync=function(e,t){return this._runSync(e,t).root},t.transform=function(e,t){return this._run(e,t).then(function(e){return e.transform})},t.transformSync=function(e,t){return this._runSync(e,t).transform},t.process=function(e,t){return this._run(e,t).then(function(e){return e.string||e.root.toString()})},t.processSync=function(e,t){var n=this._runSync(e,t);return n.string||n.root.toString()},e}();t.default=r,e.exports=t.default},8354:(e,t)=>{t.__esModule=!0,t.default=function(e){var t="",n=e.indexOf("/*"),o=0;for(;n>=0;){t+=e.slice(o,n);var i=e.indexOf("*/",n+2);if(i<0)return t;o=i+2,n=e.indexOf("/*",o)}return t+=e.slice(o)},e.exports=t.default},8357:(e,t,n)=>{n.d(t,{$:()=>d});var o=n(3077),i=n(8064),r=n(6467),a=n(9975),s=n(8957),c=n(1863),l=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function d(e,t,n,u){var h=arguments;return l(this,arguments,void 0,function*(e,t,n,l,u={concepts:[],connections:[]}){var p,f,m,y;const v=s.Logger.logfunction("MakeTheTypeConceptLocal",h)||{};if(s.serviceWorker){v.serviceWorker=!0;try{const o=yield(0,s.sendMessage)("MakeTheTypeConceptLocal",{typeString:e,sessionId:t,sessionUserId:n,userId:l,actions:u});return(null===(f=null===(p=null==o?void 0:o.actions)||void 0===p?void 0:p.concepts)||void 0===f?void 0:f.length)&&(u.concepts=JSON.parse(JSON.stringify(o.actions.concepts))),(null===(y=null===(m=null==o?void 0:o.actions)||void 0===m?void 0:m.connections)||void 0===y?void 0:y.length)&&(u.connections=JSON.parse(JSON.stringify(o.actions.connections))),s.Logger.logUpdate(v),o.data}catch(e){(0,c.ey)(v,"MakeTheTypeConceptLocal",e),(0,s.handleServiceWorkerException)(e)}}let g=yield(0,i.$I)(e);if(g&&(0==g.id||0==g.userId)){let i=(0,r.f)(e);if(i[0]==e){g=yield(0,a.A)(e,"the",l,1,51,u)}else{let r=yield d(i[0],t,n,l,u),a=yield d(i[1],t,n,l,u);g=yield(0,o.A)(e,i[1],l,r.id,a.id,4,void 0,null,u)}}return s.Logger.logUpdate(v),g})}},8407:(e,t,n)=>{n.d(t,{A:()=>f});var o=n(9581),i=n(3518),r=n(1863),a=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};var s=n(4402),c=n(8957),l=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class d{constructor(e,t,n,o,i,r,a,s,c,l){this.id=0,this.userId=e,this.data=t,this.securityId=n,this.securityUserId=o,this.accessId=i,this.accessUserId=r,this.sessionId=a,this.sessionUserId=s,this.entryTimestamp=c,this.isNew=l}}var u=n(7282),h=n(2212),p=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function f(e,t){var n=arguments;return p(this,arguments,void 0,function*(e,t,p=!1,f,m=4,y=999,v=0){const g=c.Logger.logfunction("MakeTheInstanceConcept",n)||{};if(c.serviceWorker){g.serviceWorker=!0;try{const n=yield(0,c.sendMessage)("MakeTheInstanceConcept",{type:e,referent:t,composition:p,userId:f,passedAccessId:m,passedSessionId:y,referentId:v});return c.Logger.logUpdate(g),n.data}catch(e){(0,r.ey)(g,"MakeTheInstanceConcept",e),(0,c.handleServiceWorkerException)(e)}}let C,w=y,T=f,I=f,k=m,b=f,A="",S=t.length,L=(0,u.o)();if(A=e.startsWith("the_")?e:"the_"+e,p){L=yield(0,c.MakeTheTypeConceptApi)(e,f),C=yield(0,h.Ay)(t,f,4,L.id,v,k,e)}else if(S>255){L=yield(0,c.MakeTheTypeConceptApi)(A,f),C=yield(0,h.Ay)(t,f,4,L.id,v,k,A),function(e){a(this,void 0,void 0,function*(){try{var t=(0,i.Xr)();const n=yield fetch(o.B.CreateTheTextDataUrl(),{method:"POST",headers:t,body:JSON.stringify(e)});if(!n.ok)throw(0,r.ry)(n),new Error(`Error! status: ${n.status}`);return yield n.json()}catch(e){throw Error,e}})}(new d(f,t,999,T,k,b,w,I,Date.now().toString(),!0))}else{L=yield(0,c.MakeTheTypeConceptApi)(A,f);let e=yield(0,s.A)(t,L.id);if(C=e,0==e.id&&0==e.userId){C=yield(0,h.N)(t,f,4,L.id,12,k,A),function(e,t,n,a){var s=arguments;l(this,void 0,void 0,function*(){const l=c.Logger.logfunction("MakeTheNameInBackend",s);try{let s={newConceptId:e,referent:t,typeId:n,typeUserId:a},d=(0,i.Xr)(),u=JSON.stringify(s);const h=yield fetch(o.B.MakeTheNameInBackendUrl(),{method:"POST",headers:d,body:u});c.Logger.logUpdate(l),h.ok||(0,r.ry)(h)}catch(e){Error,(0,r.Mb)(e,o.B.MakeTheNameInBackendUrl()),(0,r.ey)(l,"MakeTheNameInBackend",e)}})}(C.id,`${t}`,L.id,f)}}return C.type=L,c.Logger.logUpdate(g),C})}},8500:(e,t,n)=>{t.__esModule=!0,t.isComment=t.isCombinator=t.isClassName=t.isAttribute=void 0,t.isContainer=function(e){return!(!a(e)||!e.walk)},t.isIdentifier=void 0,t.isNamespace=function(e){return c(e)||g(e)},t.isNesting=void 0,t.isNode=a,t.isPseudo=void 0,t.isPseudoClass=function(e){return f(e)&&!w(e)},t.isPseudoElement=w,t.isUniversal=t.isTag=t.isString=t.isSelector=t.isRoot=void 0;var o,i=n(1581),r=((o={})[i.ATTRIBUTE]=!0,o[i.CLASS]=!0,o[i.COMBINATOR]=!0,o[i.COMMENT]=!0,o[i.ID]=!0,o[i.NESTING]=!0,o[i.PSEUDO]=!0,o[i.ROOT]=!0,o[i.SELECTOR]=!0,o[i.STRING]=!0,o[i.TAG]=!0,o[i.UNIVERSAL]=!0,o);function a(e){return"object"==typeof e&&r[e.type]}function s(e,t){return a(t)&&t.type===e}var c=s.bind(null,i.ATTRIBUTE);t.isAttribute=c;var l=s.bind(null,i.CLASS);t.isClassName=l;var d=s.bind(null,i.COMBINATOR);t.isCombinator=d;var u=s.bind(null,i.COMMENT);t.isComment=u;var h=s.bind(null,i.ID);t.isIdentifier=h;var p=s.bind(null,i.NESTING);t.isNesting=p;var f=s.bind(null,i.PSEUDO);t.isPseudo=f;var m=s.bind(null,i.ROOT);t.isRoot=m;var y=s.bind(null,i.SELECTOR);t.isSelector=y;var v=s.bind(null,i.STRING);t.isString=v;var g=s.bind(null,i.TAG);t.isTag=g;var C=s.bind(null,i.UNIVERSAL);function w(e){return f(e)&&e.value&&(e.value.startsWith("::")||":before"===e.value.toLowerCase()||":after"===e.value.toLowerCase()||":first-letter"===e.value.toLowerCase()||":first-line"===e.value.toLowerCase())}t.isUniversal=C},8633:e=>{var t=String,n=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t,blackBright:t,redBright:t,greenBright:t,yellowBright:t,blueBright:t,magentaBright:t,cyanBright:t,whiteBright:t,bgBlackBright:t,bgRedBright:t,bgGreenBright:t,bgYellowBright:t,bgBlueBright:t,bgMagentaBright:t,bgCyanBright:t,bgWhiteBright:t}};e.exports=n(),e.exports.createColors=n},8642:(e,t,n)=>{n.d(t,{Y:()=>h});var o=n(8286),i=n(9581),r=n(4364),a=n(5284),s=n(1412),c=n(3518),l=n(1863),d=n(8957),u=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function h(){var e=arguments;return u(this,arguments,void 0,function*(t=[]){const n=d.Logger.logfunction("GetAllConnectionsOfCompositionBulk",e)||{};if(d.serviceWorker){n.serviceWorker=!0;try{const e=yield(0,d.sendMessage)("GetAllConnectionsOfCompositionBulk",{composition_ids:t});return d.Logger.logUpdate(n),e.data}catch(e){(0,l.ey)(n,"GetAllConnectionsOfCompositionBulk",e),(0,d.handleServiceWorkerException)(e)}}var h=[];if(t.length<=0)return h;var p=yield(0,a.B)(t),f=yield function(){var e=arguments;return u(this,arguments,void 0,function*(t=[]){const n=d.Logger.logfunction("GetAllConnectionsOfCompositionOnline",e);var r=[];try{var a=(0,c.Xr)();const e=yield fetch(i.B.GetAllConnectionsOfCompositionBulkUrl(),{method:"POST",headers:a,body:JSON.stringify(t)});if(e.ok){const t=yield e.json();for(var s=0;s<t.length;s++)o.d.AddConnection(t[s]),r.push(t[s])}else(0,l.ry)(e);return d.Logger.logUpdate(n),r}catch(e){Error,(0,l.Mb)(e,i.B.GetAllConnectionsOfCompositionBulkUrl()),(0,l.ey)(n,"GetAllConnectionsOfCompositionOnline",e)}})}(t);return h=f,(0,s.e)(h,p),yield(0,r.s)(h),d.Logger.logUpdate(n),h})}},8675:(e,t,n)=>{n.d(t,{l:()=>s});var o=n(1863),i=n(3518),r=n(8957),a=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function s(e){var t=arguments;return a(this,void 0,void 0,function*(){r.Logger.logfunction("GetAllLinkerConnectionsFromTheConcept",t);var n=[];try{(new Date).getTime();var a=(0,i.Xr)("application/x-www-form-urlencoded");const t=yield fetch(r.BaseUrl.GetAllLinkerConnectionOfConceptUrl()+`?conceptId=${e}`,{method:"GET",headers:a});if(t.ok){const e=yield t.json();for(var s=0;s<e.length;s++){var c=e[s];n.push(c)}}else(0,o.ry)(t)}catch(e){Error,(0,o.Mb)(e,r.BaseUrl.GetAllLinkerConnectionOfConceptUrl())}return n})}},8937:e=>{var t={}.hasOwnProperty,n=/[ -,\.\/:-@\[-\^`\{-~]/,o=/[ -,\.\/:-@\[\]\^`\{-~]/,i=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g,r=function e(r,a){"single"!=(a=function(e,n){if(!e)return n;var o={};for(var i in n)o[i]=t.call(e,i)?e[i]:n[i];return o}(a,e.options)).quotes&&"double"!=a.quotes&&(a.quotes="single");for(var s="double"==a.quotes?'"':"'",c=a.isIdentifier,l=r.charAt(0),d="",u=0,h=r.length;u<h;){var p=r.charAt(u++),f=p.charCodeAt(),m=void 0;if(f<32||f>126){if(f>=55296&&f<=56319&&u<h){var y=r.charCodeAt(u++);56320==(64512&y)?f=((1023&f)<<10)+(1023&y)+65536:u--}m="\\"+f.toString(16).toUpperCase()+" "}else m=a.escapeEverything?n.test(p)?"\\"+p:"\\"+f.toString(16).toUpperCase()+" ":/[\t\n\f\r\x0B]/.test(p)?"\\"+f.toString(16).toUpperCase()+" ":"\\"==p||!c&&('"'==p&&s==p||"'"==p&&s==p)||c&&o.test(p)?"\\"+p:p;d+=m}return c&&(/^-[-\d]/.test(d)?d="\\-"+d.slice(1):/\d/.test(l)&&(d="\\3"+l+" "+d.slice(1))),d=d.replace(i,function(e,t,n){return t&&t.length%2?e:(t||"")+n}),!c&&a.wrap?s+d+s:d};r.options={escapeEverything:!1,isIdentifier:!1,quotes:"single",wrap:!1},r.version="3.0.0",e.exports=r},8939:(e,t,n)=>{n.d(t,{$N:()=>T,$V:()=>h,Ez:()=>I,JA:()=>C,Mb:()=>m,Nj:()=>f,PT:()=>w,RW:()=>g,XI:()=>v,ay:()=>u,hL:()=>d,kx:()=>y,re:()=>p,yz:()=>k,zN:()=>S});var o=n(7139),i=n(2),r=n(3026),a=n(8286),s=n(8957),c=n(1863),l=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function d(e){return l(this,void 0,void 0,function*(){let t={connectionList:[],compositionList:[]};try{if(s.serviceWorker)try{return(yield(0,s.sendMessage)("GetCompositionById",{id:e})).data}catch(e){(0,s.handleServiceWorkerException)(e)}let n=yield(0,i.s)(e);t.connectionList=n;for(let e=0;e<t.connectionList.length;e++)t.compositionList.includes(t.connectionList[e].ofTheConceptId)||t.compositionList.push(t.connectionList[e].ofTheConceptId);return t}catch(e){return t}})}function u(e,t,n){return l(this,void 0,void 0,function*(){var i,a;let s={},c=yield r.I.GetConcept(e);if(0==c.id&&null!=e&&null!=e){c=yield(0,o.r)(e)}let l=yield S(e,t,n);return s[null!==(a=null===(i=null==c?void 0:c.type)||void 0===i?void 0:i.characterValue)&&void 0!==a?a:""]=l,s})}function h(e,t,n){return l(this,void 0,void 0,function*(){var i,a;let s={},c=yield r.I.GetConcept(e);if(0==c.id&&null!=e&&null!=e){c=yield(0,o.r)(e)}let l=yield S(e,t,n);s[null!==(a=null===(i=null==c?void 0:c.type)||void 0===i?void 0:i.characterValue)&&void 0!==a?a:""]=l;let d={};return d.created_at=c.entryTimeStamp,d.data=s,d.id=e,d})}function p(e,t,n){return l(this,void 0,void 0,function*(){var i,a;let s={},c=yield r.I.GetConcept(e);if(0==c.id&&null!=e&&null!=e){c=yield(0,o.r)(e)}let l=yield A(c,t,n);return s[null!==(a=null===(i=null==c?void 0:c.type)||void 0===i?void 0:i.characterValue)&&void 0!==a?a:""]=l,s})}function f(e){return l(this,void 0,void 0,function*(){var t,n;if(s.serviceWorker)try{return(yield(0,s.sendMessage)("GetComposition",{id:e})).data}catch(e){(0,s.handleServiceWorkerException)(e)}let a=[],c={};a=yield(0,i.s)(e);let l=[];for(let e=0;e<a.length;e++)l.includes(a[e].ofTheConceptId)||l.push(a[e].ofTheConceptId);let d=yield r.I.GetConcept(e);if(0==d.id&&null!=e&&null!=e){d=yield(0,o.r)(e)}let u=yield S(e,a,l);return c[null!==(n=null===(t=null==d?void 0:d.type)||void 0===t?void 0:t.characterValue)&&void 0!==n?n:""]=u,c})}function m(e){return l(this,void 0,void 0,function*(){var t,n;let a=[],s={};a=yield(0,i.s)(e);let c=[];for(let e=0;e<a.length;e++)c.includes(a[e].ofTheConceptId)||c.push(a[e].ofTheConceptId);let l=yield r.I.GetConcept(e);if(0==l.id&&null!=e&&null!=e){l=yield(0,o.r)(e)}let d=yield L(e,a,c);return s[null!==(n=null===(t=null==l?void 0:l.type)||void 0===t?void 0:t.characterValue)&&void 0!==n?n:""]=d,s})}function y(e){return l(this,void 0,void 0,function*(){var t,n;if(s.serviceWorker)try{return(yield(0,s.sendMessage)("GetCompositionFromMemory",{id:e})).data}catch(e){(0,s.handleServiceWorkerException)(e)}let i=[],c={};i=yield a.d.GetConnectionsOfCompositionLocal(e);let l=[];for(let e=0;e<i.length;e++)l.includes(i[e].ofTheConceptId)||l.push(i[e].ofTheConceptId);let d=yield r.I.GetConcept(e);if(0==d.id&&null!=e&&null!=e){d=yield(0,o.r)(e)}let u=yield b(d,i,l);return c[null!==(n=null===(t=null==d?void 0:d.type)||void 0===t?void 0:t.characterValue)&&void 0!==n?n:""]=u,c})}function v(e){return l(this,void 0,void 0,function*(){var t,n;if(s.serviceWorker)try{return(yield(0,s.sendMessage)("GetCompositionFromMemoryNormal",{id:e})).data}catch(e){(0,s.handleServiceWorkerException)(e)}let i=[],c={};i=yield a.d.GetConnectionsOfCompositionLocal(e);let l=[];for(let e=0;e<i.length;e++)l.includes(i[e].ofTheConceptId)||l.push(i[e].ofTheConceptId);let d=yield r.I.GetConcept(e);if(0==d.id&&null!=e&&null!=e){d=yield(0,o.r)(e)}let u=yield A(d,i,l);return c[null!==(n=null===(t=null==d?void 0:d.type)||void 0===t?void 0:t.characterValue)&&void 0!==n?n:""]=u,c})}function g(e){var t=arguments;return l(this,void 0,void 0,function*(){var n,i;const l=s.Logger.logfunction("GetCompositionWithIdFromMemory",t)||{};if(s.serviceWorker){l.serviceWorker=!0;try{const t=yield(0,s.sendMessage)("GetCompositionWithIdFromMemory",{id:e});return s.Logger.logUpdate(l),t.data}catch(e){(0,c.ey)(l,"GetCompositionWithIdFromMemory",e),(0,s.handleServiceWorkerException)(e)}}let d={},u=[],h={};try{u=yield a.d.GetConnectionsOfCompositionLocal(e);let t=[];for(let e=0;e<u.length;e++)t.includes(u[e].ofTheConceptId)||t.push(u[e].ofTheConceptId);let s=yield r.I.GetConcept(e);if(0==s.id&&null!=e&&null!=e){s=yield(0,o.r)(e)}let c=yield b(s,u,t);h[null!==(i=null===(n=null==s?void 0:s.type)||void 0===n?void 0:n.characterValue)&&void 0!==i?i:""]=c,d.created_at=s.entryTimeStamp,d.data=h,d.id=e}catch(e){(0,c.ey)(l,"GetCompositionWithIdFromMemory",e)}return s.Logger.logUpdate(l),d})}function C(e,t){var n=arguments;return l(this,void 0,void 0,function*(){var i,a;const l=s.Logger.logfunction("GetCompositionFromMemoryWithConnections",n)||{};if(s.serviceWorker){l.serviceWorker=!0;try{const n=yield(0,s.sendMessage)("GetCompositionFromMemoryWithConnections",{id:e,connectionList:t});return s.Logger.logUpdate(l),n.data}catch(e){(0,c.ey)(l,"GetCompositionFromMemoryWithConnections",e),(0,s.handleServiceWorkerException)(e)}}let d={},u=[];for(let e=0;e<t.length;e++)u.includes(t[e].ofTheConceptId)||u.push(t[e].ofTheConceptId);let h=yield r.I.GetConcept(e);if(0==h.id&&null!=e&&null!=e){h=yield(0,o.r)(e)}let p=yield b(h,t,u);d[null!==(a=null===(i=null==h?void 0:h.type)||void 0===i?void 0:i.characterValue)&&void 0!==a?a:""]=p;let f={};return f.created_at=h.entryTimeStamp,f.data=d,f.id=e,s.Logger.logUpdate(l),f})}function w(e,t){return l(this,void 0,void 0,function*(){var n,i;const a=s.Logger.logfunction("GetCompositionWithIdFromMemoryFromConnection",[e])||{};if(s.serviceWorker){a.serviceWorker=!0;try{const t=yield(0,s.sendMessage)("GetCompositionWithIdFromMemory",{id:e});return s.Logger.logUpdate(a),t.data}catch(e){(0,c.ey)(a,"GetCompositionWithIdFromMemoryFromConnection",e),(0,s.handleServiceWorkerException)(e)}}let l={},d=[];for(let e=0;e<t.length;e++)d.includes(t[e].ofTheConceptId)||d.push(t[e].ofTheConceptId);let u=yield r.I.GetConcept(e);if(0==u.id&&null!=e&&null!=e){u=yield(0,o.r)(e)}let h=yield b(u,t,d);l[null!==(i=null===(n=null==u?void 0:u.type)||void 0===n?void 0:n.characterValue)&&void 0!==i?i:""]=h;let p={};return p.created_at=u.entryTimeStamp,p.data=l,p.id=e,s.Logger.logUpdate(a),p})}function T(e){return l(this,void 0,void 0,function*(){var t,n;if(s.serviceWorker)try{return(yield(0,s.sendMessage)("GetCompositionWithIdFromMemoryNew",{id:e})).data}catch(e){(0,s.handleServiceWorkerException)(e)}let i=[],c={};i=yield a.d.GetConnectionsOfCompositionLocal(e);let d=[];for(let e=0;e<i.length;e++)d.includes(i[e].ofTheConceptId)||d.push(i[e].ofTheConceptId);let u=yield r.I.GetConcept(e);if(0==u.id&&null!=e&&null!=e){u=yield(0,o.r)(e)}(new Date).getTime();let h=yield function(e,t,n){return l(this,arguments,void 0,function*(e,t,n,o=[]){var i,r,a,c,l,d,u,h;let p={},f=e.id,m=((new Date).getTime(),null!==(r=null===(i=null==e?void 0:e.type)||void 0===i?void 0:i.characterValue)&&void 0!==r?r:"");if(!n.includes(f)){let t=m;return{[t]:null==e?void 0:e.characterValue}}if(o.includes(f))return"";o.push(f);for(let e=0;e<t.length;e++){let n=yield(0,s.GetTheConcept)(t[e].ofTheConceptId),o=yield(0,s.GetTheConcept)(t[e].toTheConceptId);t[e].ofConcept=n,t[e].toConcept=o;let i=n.id,r="the_",l=(null!==(c=null===(a=null==o?void 0:o.type)||void 0===a?void 0:a.characterValue)&&void 0!==c?c:"").replace(r,"");null!=p[i]&&null!=p[i]||(p[i]={}),p[i][l]=o.characterValue}let y={};for(let e=0;e<t.length;e++){let n=t[e].ofConcept,o=t[e].toConcept,i=null!==(d=null===(l=null==n?void 0:n.type)||void 0===l?void 0:l.characterValue)&&void 0!==d?d:"",r="the_",a=(null!==(h=null===(u=null==o?void 0:o.type)||void 0===u?void 0:u.characterValue)&&void 0!==h?h:"").replace(r,"");null!=y[n.id]&&null!=y[n.id]||(y[n.id]={});let s=y[n.id];null!=s[i]&&null!=s[i]||(s[i]={}),null!=p[t[e].ofTheConceptId]&&null!=p[t[e].toTheConceptId]?s[i][a]=p[o.id]:s[i][a]=o.characterValue}return y[e.id]})}(u,i,d);n=null===(t=null==u?void 0:u.type)||void 0===t?void 0:t.characterValue;c=h;let p={};return p.created_at=u.entryTimeStamp,p.data=c,p.id=e,p})}function I(e){return l(this,void 0,void 0,function*(){var t,n;if(s.serviceWorker)try{return(yield(0,s.sendMessage)("GetCompositionWithIdAndDateFromMemory",{id:e})).data}catch(e){(0,s.handleServiceWorkerException)(e)}let i=[],c={};i=yield a.d.GetConnectionsOfCompositionLocal(e);let l=[];for(let e=0;e<i.length;e++)l.includes(i[e].ofTheConceptId)||l.push(i[e].ofTheConceptId);let d=yield r.I.GetConcept(e);if(0==d.id&&null!=e&&null!=e){d=yield(0,o.r)(e)}let u=yield S(e,i,l);c[null!==(n=null===(t=null==d?void 0:d.type)||void 0===t?void 0:t.characterValue)&&void 0!==n?n:""]=u;let h={};return h.data=c,h.id=e,h.created_at=d.entryTimeStamp,h})}function k(e){var t=arguments;return l(this,void 0,void 0,function*(){var n,a;const l=s.Logger.logfunction("GetCompositionWithId",t)||{};if(s.serviceWorker){l.serviceWorker=!0;try{const t=yield(0,s.sendMessage)("GetCompositionWithId",{id:e});return s.Logger.logUpdate(l),t.data}catch(e){(0,c.ey)(l,"GetCompositionWithId",e),(0,s.handleServiceWorkerException)(e)}}let d=[],u={};d=yield(0,i.s)(e);let h=[];for(let e=0;e<d.length;e++)h.includes(d[e].ofTheConceptId)||h.push(d[e].ofTheConceptId);let p=yield r.I.GetConcept(e);if(0==p.id&&null!=e&&null!=e){p=yield(0,o.r)(e)}let f=yield S(e,d,h);u[null!==(a=null===(n=null==p?void 0:p.type)||void 0===n?void 0:n.characterValue)&&void 0!==a?a:""]=f;let m={};return m.data=u,m.id=e,s.Logger.logUpdate(l),m})}function b(e,t,n){return l(this,arguments,void 0,function*(e,t,n,i=[]){var a,s,c,l;let d={},u=[],h=e.id;s=null===(a=null==e?void 0:e.type)||void 0===a?void 0:a.characterValue;if(!n.includes(h))return null==e?void 0:e.characterValue;if(i.includes(h))return"";i.push(h);for(let e=0;e<t.length;e++)if(t[e].ofTheConceptId==h&&h!=t[e].toTheConceptId){let a=t[e].toTheConceptId,s=yield r.I.GetConcept(a);if((null==s||0==s.id)&&null!=a&&null!=a){s=yield(0,o.r)(a)}if(0!=s.id&&null==(null==s?void 0:s.type)){let e=s.typeId,t=yield r.I.GetConcept(e);if(s.type=t,null==t&&null!=e&&null!=e){t=yield(0,o.r)(e),s.type=t}}let h="the_",p=(null!==(l=null===(c=null==s?void 0:s.type)||void 0===c?void 0:c.characterValue)&&void 0!==l?l:"").replace(h,"");if(isNaN(Number(p))){if(p){const e=yield b(s,t,n,i);d[p]=e}}else{const e=yield b(s,t,n,i);u[p]=e,d=u}}return d})}function A(e,t,n){return l(this,arguments,void 0,function*(e,t,n,i=[]){var a,c,l,d;const u=s.Logger.logfunction("recursiveFetchConceptNormal",[e]);(new Date).getTime();let h={},p=[],f=e.id;h.id=f;c=null===(a=null==e?void 0:e.type)||void 0===a?void 0:a.characterValue;if(!n.includes(f))return null==e?void 0:e.characterValue;if(i.includes(f))return"";i.push(f);for(let e=0;e<t.length;e++)if(t[e].ofTheConceptId==f&&f!=t[e].toTheConceptId){let a=t[e].toTheConceptId,s=yield r.I.GetConcept(a);if((null==s||0==s.id)&&null!=a&&null!=a){s=yield(0,o.r)(a)}if(0!=s.id&&null==(null==s?void 0:s.type)){let e=s.typeId,t=yield r.I.GetConcept(e);if(s.type=t,null==t&&null!=e&&null!=e){t=yield(0,o.r)(e),s.type=t}}let c="the_",u=(null!==(d=null===(l=null==s?void 0:s.type)||void 0===l?void 0:l.characterValue)&&void 0!==d?d:"").replace(c,"");if(isNaN(Number(u))){if(u){const e=yield b(s,t,n,i);h[u]=e}}else{const e=yield b(s,t,n,i);p[u]=e,h=p}}return s.Logger.logUpdate(u),h})}function S(e,t,n){return l(this,arguments,void 0,function*(e,t,n,i=[]){var a,s,c,l;let d={},u=[];if(0==e)return null;let h=yield r.I.GetConcept(e);if((null==h||0==h.id)&&null!=e&&null!=e){h=yield(0,o.r)(e)}if(0!=h.id&&null==h.type){let e=h.typeId,t=yield r.I.GetConcept(e);if(h.type=t,null==t&&null!=e&&null!=e){t=yield(0,o.r)(e),h.type=t}}s=null===(a=null==h?void 0:h.type)||void 0===a?void 0:a.characterValue;if(!n.includes(e))return null==h?void 0:h.characterValue;if(i.includes(e))return"";i.push(e);for(let a=0;a<t.length;a++){(new Date).getTime();if(t[a].ofTheConceptId==e&&e!=t[a].toTheConceptId){let e=t[a].toTheConceptId,s=yield r.I.GetConcept(e);if((null==s||0==s.id)&&null!=e&&null!=e){s=yield(0,o.r)(e)}if(0!=s.id&&null==(null==s?void 0:s.type)){let e=s.typeId,t=yield r.I.GetConcept(e);if(s.type=t,null==t&&null!=e&&null!=e){t=yield(0,o.r)(e),s.type=t}}let h="the_",p=(null!==(l=null===(c=null==s?void 0:s.type)||void 0===c?void 0:c.characterValue)&&void 0!==l?l:"").replace(h,"");if(isNaN(Number(p))){if(p){const o=yield S(e,t,n,i);d[p]=o}}else{const o=yield S(e,t,n,i);u[p]=o,d=u}}}return d})}function L(e,t,n){return l(this,arguments,void 0,function*(e,t,n,i=[]){var a,s,c,l;let d={},u=[];if(0==e)return null;let h=yield r.I.GetConcept(e);if((null==h||0==h.id)&&null!=e&&null!=e){h=yield(0,o.r)(e)}if(0!=h.id&&null==h.type){let e=h.typeId,t=yield r.I.GetConcept(e);if(h.type=t,null==t&&null!=e&&null!=e){t=yield(0,o.r)(e),h.type=t}}s=null===(a=null==h?void 0:h.type)||void 0===a?void 0:a.characterValue;if(!n.includes(e))return null==h?void 0:h.characterValue;if(i.includes(e))return"";i.push(e),d.id=e;for(let i=0;i<t.length;i++)if(t[i].ofTheConceptId==e){let e=t[i].toTheConceptId,a=yield r.I.GetConcept(e);if((null==a||0==a.id)&&null!=e&&null!=e){a=yield(0,o.r)(e)}if(a&&null==(null==a?void 0:a.type)){let e=a.typeId,t=yield r.I.GetConcept(e);if(a.type=t,null==t&&null!=e&&null!=e){t=yield(0,o.r)(e),a.type=t}}let s="the_",h=(null!==(l=null===(c=null==a?void 0:a.type)||void 0===c?void 0:c.characterValue)&&void 0!==l?l:"").replace(s,"");if(isNaN(Number(h))){if(h){const o=yield L(e,t,n);d[h]=o}}else{const o=yield L(e,t,n);u[h]=o,d=u}}return d})}},8957:(e,t,n)=>{n.d(t,{ADMIN:()=>xn,ALLID:()=>_n.BG,AccessTracker:()=>Pe.J,AddGhostConcept:()=>an,Anomaly:()=>Uo,BaseUrl:()=>u.B,BinaryTree:()=>be.W,BuildWidgetFromId:()=>Zo.Cp,BuilderStatefulWidget:()=>Lo,Composition:()=>St,CompositionBinaryTree:()=>Tt,CompositionNode:()=>Ct,Concept:()=>to.j,ConceptsData:()=>d.I,Connection:()=>W.N,ConnectionData:()=>Ee.d,CountInfo:()=>ni.y,CreateComposition:()=>F.A,CreateConnection:()=>Zt.d,CreateConnectionBetweenEntityLocal:()=>Ko,CreateConnectionBetweenTwoConcepts:()=>K,CreateConnectionBetweenTwoConceptsGeneral:()=>ee,CreateConnectionBetweenTwoConceptsLocal:()=>In.h,CreateData:()=>ji,CreateDefaultConcept:()=>V.o,CreateDefaultLConcept:()=>Kt.u,CreateSession:()=>Vt,CreateSessionVisit:()=>Ht,CreateTheCompositionLocal:()=>U.R,CreateTheCompositionWithCache:()=>Nt,CreateTheConnection:()=>ae.q,CreateTheConnectionGeneral:()=>z,CreateTheConnectionLocal:()=>Zt.F,DATAID:()=>_n.y0,DATAIDDATE:()=>_n.iw,DATAV2:()=>_n.pU,DelayFunctionExecution:()=>Nn,DeleteConceptById:()=>Ne,DeleteConceptLocal:()=>bn,DeleteConnectionById:()=>J.m,DeleteConnectionByIdBulk:()=>J.E,DeleteConnectionByType:()=>jo.$S,DeleteConnectionByTypeBulk:()=>jo.L0,DeleteUser:()=>_e,DependencyObserver:()=>On.w,Environments:()=>po.B,FilterSearch:()=>so,FormatFromConnections:()=>sn.vw,FormatFromConnectionsAltered:()=>sn.y8,FreeschemaQuery:()=>Vo,FreeschemaQueryApi:()=>Ho,GetAllConnectionsOfComposition:()=>B.s,GetAllConnectionsOfCompositionBulk:()=>y.Y,GetAllTheConnectionsByTypeAndOfTheConcept:()=>jo.WC,GetComposition:()=>g.Nj,GetCompositionBulk:()=>He.dF,GetCompositionBulkWithDataId:()=>He.cw,GetCompositionFromConnectionsWithDataId:()=>He.p8,GetCompositionFromConnectionsWithDataIdFromConnections:()=>He.km,GetCompositionFromConnectionsWithDataIdInObject:()=>He.rv,GetCompositionFromConnectionsWithDataIdIndex:()=>He.Nt,GetCompositionFromConnectionsWithIndex:()=>He.as,GetCompositionFromConnectionsWithIndexFromConnections:()=>He.hG,GetCompositionFromMemoryWithConnections:()=>g.JA,GetCompositionList:()=>I,GetCompositionListAll:()=>k,GetCompositionListAllWithId:()=>b,GetCompositionListListener:()=>qn,GetCompositionListLocal:()=>R,GetCompositionListLocalWithId:()=>O,GetCompositionListWithId:()=>A,GetCompositionListWithIdUpdated:()=>S,GetCompositionListener:()=>Wn,GetCompositionLocal:()=>x,GetCompositionLocalWithId:()=>D,GetCompositionWithAllIds:()=>g.Mb,GetCompositionWithCache:()=>Ft,GetCompositionWithDataIdBulk:()=>Mt,GetCompositionWithDataIdWithCache:()=>Gt,GetCompositionWithId:()=>g.yz,GetCompositionWithIdAndDateFromMemory:()=>g.Ez,GetConceptBulk:()=>at.r,GetConceptByCharacter:()=>C.A,GetConceptByCharacterAndCategoryLocal:()=>w.$I,GetConceptByCharacterAndType:()=>se.A,GetConnectionBetweenTwoConceptsLinker:()=>Ln,GetConnectionBulk:()=>st.j,GetConnectionById:()=>Ge,GetConnectionDataPrefetch:()=>He.QL,GetConnectionOfTheConcept:()=>M,GetConnectionTypeForCount:()=>Zn.V,GetConnectionsBetweenApi:()=>xo,GetFreeschemaImage:()=>or,GetFreeschemaImageUrl:()=>ir,GetImageApi:()=>tr,GetLink:()=>le,GetLinkListListener:()=>Kn,GetLinkListener:()=>$n.d,GetLinkRaw:()=>de,GetLinkerConnectionFromConcepts:()=>Ce,GetLinkerConnectionToConcepts:()=>we,GetRelation:()=>Qt,GetRelationLocal:()=>hn,GetRelationNew:()=>Yt,GetRelationRaw:()=>Xt,GetTheConcept:()=>Q.A,GetTheConceptLocal:()=>cn.f,GetUserGhostId:()=>rn,JUSTDATA:()=>_n.ZJ,LConcept:()=>no,LConnection:()=>oo,LISTNORMAL:()=>_n.SL,LocalConceptsData:()=>v.v,LocalSyncData:()=>ao.H,LocalTransaction:()=>Eo,LogEvent:()=>oi,Logger:()=>mo.V,LoginToBackend:()=>lt,MakeTheInstanceConcept:()=>Y.A,MakeTheInstanceConceptLocal:()=>te.k,MakeTheTimestamp:()=>Ve,MakeTheTypeConceptApi:()=>me,MakeTheTypeConceptLocal:()=>ue.$,NORMAL:()=>_n.yv,PRIVATE:()=>Dn,PUBLIC:()=>Pn,PatcherStructure:()=>io,Prototype:()=>Ji,RAW:()=>_n.XZ,RecursiveSearchApi:()=>ze,RecursiveSearchApiNewRawFullLinker:()=>Xe,RecursiveSearchApiRaw:()=>Qe,RecursiveSearchApiRawFullLinker:()=>Ye,RecursiveSearchApiWithInternalConnections:()=>Je,RecursiveSearchListener:()=>Qn,SchemaQuery:()=>Qo,SchemaQueryListener:()=>Jo,SearchAllConcepts:()=>Pt,SearchLinkInternal:()=>wn,SearchLinkInternalAll:()=>Tn,SearchLinkMultipleAll:()=>sn.cf,SearchLinkMultipleAllObservable:()=>Fn,SearchLinkMultipleApi:()=>c.j,SearchQuery:()=>qe,SearchStructure:()=>co,SearchWithLinker:()=>Rt,SearchWithTypeAndLinker:()=>Hn.zl,SearchWithTypeAndLinkerApi:()=>Rn,Selector:()=>ii,SessionData:()=>ro,Signin:()=>ft,Signup:()=>ut,SignupEntity:()=>ht,SplitStrings:()=>l.f,StatefulWidget:()=>bo,SyncData:()=>j.Y,TokenStorage:()=>Oe.b,TrashTheConcept:()=>De,UpdateComposition:()=>xt,UpdateCompositionLocal:()=>ln.D,UserBinaryTree:()=>nn,Validator:()=>Mo,ViewInternalData:()=>yn,ViewInternalDataApi:()=>fn,WidgetTree:()=>Yo,buildFetchConnection:()=>Do,clearAllCaches:()=>ei,convertFromConceptToLConcept:()=>vn.F4,convertFromLConceptToConcept:()=>vn.dp,convertWidgetTreeToWidget:()=>Ei,convertWidgetTreeToWidgetWithWrapper:()=>Oi,createFormFieldData:()=>Wo,createPrototypeLocal:()=>Xi,dispatchIdEvent:()=>vr,getFromDatabaseWithType:()=>ie,getObjectsFromIndexDb:()=>re,getTsccsAutocompleteMetadata:()=>Oo,getUploadFileLimit:()=>rt,getUserDetails:()=>Ao.s,getWidgetBulkFromId:()=>Pi,getWidgetFromId:()=>Di,handleServiceWorkerException:()=>Cr,hasActivatedSW:()=>dr,importLatestWidget:()=>ki,importRecentWidget:()=>bi,init:()=>pr,orderTheConnections:()=>eo.X,recursiveFetch:()=>g.zN,recursiveFetchNew:()=>kt,removeAllChildren:()=>ti,renderImportedWidget:()=>Ai,renderLatestWidget:()=>Si,renderPage:()=>Ii,renderWidget:()=>Li,searchLinkMultipleListener:()=>Un,sendEmail:()=>wo,sendMessage:()=>fr,serviceWorker:()=>rr,setHasActivatedSW:()=>ur,storeToDatabase:()=>oe,subscribedListeners:()=>cr,tsccsAutocompleteMetadata:()=>Ro,unwrapContainers:()=>Ui,updateAccessToken:()=>hr,uploadAttachment:()=>tt,uploadFile:()=>it,uploadImage:()=>nt,uploadImageV2:()=>ot,validDocumentFormats:()=>et,validImageFormats:()=>Ze}),n.r(t);var o={};n.r(o),n.d(o,{ADMIN:()=>xn,ALLID:()=>_n.BG,AccessTracker:()=>Pe.J,AddGhostConcept:()=>an,Anomaly:()=>Uo,BaseUrl:()=>u.B,BinaryTree:()=>be.W,BuildWidgetFromId:()=>Zo.Cp,BuilderStatefulWidget:()=>Lo,Composition:()=>St,CompositionBinaryTree:()=>Tt,CompositionNode:()=>Ct,Concept:()=>to.j,ConceptsData:()=>d.I,Connection:()=>W.N,ConnectionData:()=>Ee.d,CountInfo:()=>ni.y,CreateComposition:()=>F.A,CreateConnection:()=>Zt.d,CreateConnectionBetweenEntityLocal:()=>Ko,CreateConnectionBetweenTwoConcepts:()=>K,CreateConnectionBetweenTwoConceptsGeneral:()=>ee,CreateConnectionBetweenTwoConceptsLocal:()=>In.h,CreateData:()=>ji,CreateDefaultConcept:()=>V.o,CreateDefaultLConcept:()=>Kt.u,CreateSession:()=>Vt,CreateSessionVisit:()=>Ht,CreateTheCompositionLocal:()=>U.R,CreateTheCompositionWithCache:()=>Nt,CreateTheConnection:()=>ae.q,CreateTheConnectionGeneral:()=>z,CreateTheConnectionLocal:()=>Zt.F,DATAID:()=>_n.y0,DATAIDDATE:()=>_n.iw,DATAV2:()=>_n.pU,DelayFunctionExecution:()=>Nn,DeleteConceptById:()=>Ne,DeleteConceptLocal:()=>bn,DeleteConnectionById:()=>J.m,DeleteConnectionByIdBulk:()=>J.E,DeleteConnectionByType:()=>jo.$S,DeleteConnectionByTypeBulk:()=>jo.L0,DeleteUser:()=>_e,DependencyObserver:()=>On.w,Environments:()=>po.B,FilterSearch:()=>so,FormatFromConnections:()=>sn.vw,FormatFromConnectionsAltered:()=>sn.y8,FreeschemaQuery:()=>Vo,FreeschemaQueryApi:()=>Ho,GetAllConnectionsOfComposition:()=>B.s,GetAllConnectionsOfCompositionBulk:()=>y.Y,GetAllTheConnectionsByTypeAndOfTheConcept:()=>jo.WC,GetComposition:()=>g.Nj,GetCompositionBulk:()=>He.dF,GetCompositionBulkWithDataId:()=>He.cw,GetCompositionFromConnectionsWithDataId:()=>He.p8,GetCompositionFromConnectionsWithDataIdFromConnections:()=>He.km,GetCompositionFromConnectionsWithDataIdInObject:()=>He.rv,GetCompositionFromConnectionsWithDataIdIndex:()=>He.Nt,GetCompositionFromConnectionsWithIndex:()=>He.as,GetCompositionFromConnectionsWithIndexFromConnections:()=>He.hG,GetCompositionFromMemoryWithConnections:()=>g.JA,GetCompositionList:()=>I,GetCompositionListAll:()=>k,GetCompositionListAllWithId:()=>b,GetCompositionListListener:()=>qn,GetCompositionListLocal:()=>R,GetCompositionListLocalWithId:()=>O,GetCompositionListWithId:()=>A,GetCompositionListWithIdUpdated:()=>S,GetCompositionListener:()=>Wn,GetCompositionLocal:()=>x,GetCompositionLocalWithId:()=>D,GetCompositionWithAllIds:()=>g.Mb,GetCompositionWithCache:()=>Ft,GetCompositionWithDataIdBulk:()=>Mt,GetCompositionWithDataIdWithCache:()=>Gt,GetCompositionWithId:()=>g.yz,GetCompositionWithIdAndDateFromMemory:()=>g.Ez,GetConceptBulk:()=>at.r,GetConceptByCharacter:()=>C.A,GetConceptByCharacterAndCategoryLocal:()=>w.$I,GetConceptByCharacterAndType:()=>se.A,GetConnectionBetweenTwoConceptsLinker:()=>Ln,GetConnectionBulk:()=>st.j,GetConnectionById:()=>Ge,GetConnectionDataPrefetch:()=>He.QL,GetConnectionOfTheConcept:()=>M,GetConnectionTypeForCount:()=>Zn.V,GetConnectionsBetweenApi:()=>xo,GetFreeschemaImage:()=>or,GetFreeschemaImageUrl:()=>ir,GetImageApi:()=>tr,GetLink:()=>le,GetLinkListListener:()=>Kn,GetLinkListener:()=>$n.d,GetLinkRaw:()=>de,GetLinkerConnectionFromConcepts:()=>Ce,GetLinkerConnectionToConcepts:()=>we,GetRelation:()=>Qt,GetRelationLocal:()=>hn,GetRelationNew:()=>Yt,GetRelationRaw:()=>Xt,GetTheConcept:()=>Q.A,GetTheConceptLocal:()=>cn.f,GetUserGhostId:()=>rn,JUSTDATA:()=>_n.ZJ,LConcept:()=>no,LConnection:()=>oo,LISTNORMAL:()=>_n.SL,LocalConceptsData:()=>v.v,LocalSyncData:()=>ao.H,LocalTransaction:()=>Eo,LogEvent:()=>oi,Logger:()=>mo.V,LoginToBackend:()=>lt,MakeTheInstanceConcept:()=>Y.A,MakeTheInstanceConceptLocal:()=>te.k,MakeTheTimestamp:()=>Ve,MakeTheTypeConceptApi:()=>me,MakeTheTypeConceptLocal:()=>ue.$,NORMAL:()=>_n.yv,PRIVATE:()=>Dn,PUBLIC:()=>Pn,PatcherStructure:()=>io,Prototype:()=>Ji,RAW:()=>_n.XZ,RecursiveSearchApi:()=>ze,RecursiveSearchApiNewRawFullLinker:()=>Xe,RecursiveSearchApiRaw:()=>Qe,RecursiveSearchApiRawFullLinker:()=>Ye,RecursiveSearchApiWithInternalConnections:()=>Je,RecursiveSearchListener:()=>Qn,SchemaQuery:()=>Qo,SchemaQueryListener:()=>Jo,SearchAllConcepts:()=>Pt,SearchLinkInternal:()=>wn,SearchLinkInternalAll:()=>Tn,SearchLinkMultipleAll:()=>sn.cf,SearchLinkMultipleAllObservable:()=>Fn,SearchLinkMultipleApi:()=>c.j,SearchQuery:()=>qe,SearchStructure:()=>co,SearchWithLinker:()=>Rt,SearchWithTypeAndLinker:()=>Hn.zl,SearchWithTypeAndLinkerApi:()=>Rn,Selector:()=>ii,SessionData:()=>ro,Signin:()=>ft,Signup:()=>ut,SignupEntity:()=>ht,SplitStrings:()=>l.f,StatefulWidget:()=>bo,SyncData:()=>j.Y,TokenStorage:()=>Oe.b,TrashTheConcept:()=>De,UpdateComposition:()=>xt,UpdateCompositionLocal:()=>ln.D,UserBinaryTree:()=>nn,Validator:()=>Mo,ViewInternalData:()=>yn,ViewInternalDataApi:()=>fn,WidgetTree:()=>Yo,buildFetchConnection:()=>Do,clearAllCaches:()=>ei,convertFromConceptToLConcept:()=>vn.F4,convertFromLConceptToConcept:()=>vn.dp,convertWidgetTreeToWidget:()=>Ei,convertWidgetTreeToWidgetWithWrapper:()=>Oi,createFormFieldData:()=>Wo,createPrototypeLocal:()=>Xi,dispatchIdEvent:()=>vr,getFromDatabaseWithType:()=>ie,getObjectsFromIndexDb:()=>re,getTsccsAutocompleteMetadata:()=>Oo,getUploadFileLimit:()=>rt,getUserDetails:()=>Ao.s,getWidgetBulkFromId:()=>Pi,getWidgetFromId:()=>Di,handleServiceWorkerException:()=>Cr,hasActivatedSW:()=>dr,importLatestWidget:()=>ki,importRecentWidget:()=>bi,init:()=>pr,orderTheConnections:()=>eo.X,recursiveFetch:()=>g.zN,recursiveFetchNew:()=>kt,removeAllChildren:()=>ti,renderImportedWidget:()=>Ai,renderLatestWidget:()=>Si,renderPage:()=>Ii,renderWidget:()=>Li,searchLinkMultipleListener:()=>Un,sendEmail:()=>wo,sendMessage:()=>fr,serviceWorker:()=>rr,setHasActivatedSW:()=>ur,storeToDatabase:()=>oe,subscribedListeners:()=>cr,tsccsAutocompleteMetadata:()=>Ro,unwrapContainers:()=>Ui,updateAccessToken:()=>hr,uploadAttachment:()=>tt,uploadFile:()=>it,uploadImage:()=>nt,uploadImageV2:()=>ot,validDocumentFormats:()=>et,validImageFormats:()=>Ze});var i=n(5020),r=n(785),a=n(8176),s=n(205),c=n(2832),l=n(6467),d=n(3026),u=n(9581),h=n(3518),p=n(1863),f=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function m(e,t){var n=arguments;return f(this,void 0,void 0,function*(){const o=mo.V.logfunction("GetAllConceptsByType",n);try{var i=new URLSearchParams;i.append("type",e),i.append("user_id",t.toString());var r=(0,h.Xr)("application/x-www-form-urlencoded");const n=yield fetch(u.B.GetAllConceptsByTypeUrl(),{method:"POST",headers:r,body:i});if(n.ok){const e=yield n.json();for(var a=0;a<e.length;a++)d.I.AddConcept(e[a])}else(0,p.ry)(n)}catch(e){Error,(0,p.Mb)(e,u.B.GetAllConceptsByTypeUrl()),(0,p.ey)(o,"GetAllConceptsByType",e)}})}var y=n(8642),v=n(9736),g=n(8939),C=n(2013),w=n(8064),T=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function I(e,t){var n=arguments;return T(this,arguments,void 0,function*(e,t,o=10,i=1){const r=mo.V.logfunction("GetCompositionList",n)||{};if(rr){r.serviceWorker=!0;try{const n=yield fr("GetCompositionList",{compositionName:e,userId:t,inpage:o,page:i});return mo.V.logUpdate(r),n.data}catch(e){(0,p.ey)(r,"GetCompositionList",e),Cr(e)}}let a=yield(0,C.A)(e),s=[];if(a){yield m(e,t);let n=yield d.I.GetConceptsByTypeIdAndUser(a.id,t),r=o*(i-1),c=[];for(let e=r;e<r+o;e++)n[e]&&c.push(n[e].id);yield(0,y.Y)(c);for(let e=r;e<r+o;e++)if(n[e]){let t=yield(0,g.kx)(n[e].id);s.push(t)}}return mo.V.logUpdate(r),s})}function k(e,t){return T(this,arguments,void 0,function*(e,t,n=10,o=1){let i=R(e,t),r=I(e,t),a=[];return Promise.race([i,r]).then(e=>{a.push(...e)}).catch(e=>{}),r.then(e=>{a.push(...e)}),a})}function b(e,t){return T(this,arguments,void 0,function*(e,t,n=10,o=1){if(rr)try{return(yield fr("GetCompositionListAllWithId",{compositionName:e,userId:t,inpage:n,page:o})).data}catch(e){Cr(e)}let i=yield(0,w.Ay)(e),r=yield(0,C.A)(e),a=[],s=[],c=[],l=[];0!=i.id&&(s=yield v.v.GetConceptsByTypeIdAndUser(i.id,t)),0!=r.id&&(yield m(e,t),l=yield d.I.GetConceptsByTypeIdAndUser(r.id,t),a=l);for(let e=0;e<s.length;e++){let t=!1;for(let n=0;n<l.length;n++)s[e].ghostId==l[n].ghostId&&(t=!0);t||c.push(s[e])}let u=[];return u=yield function(e,t){return T(this,arguments,void 0,function*(e,t,n=10,o=1){let i=[],r=n*(o-1),a=[],s=t.length;for(let t=r;t<r+n-s;t++)e[t]&&a.push(e[t].id);for(let e=0;e<t.length;e++){let n=yield D(t[e].id);i.push(n)}yield(0,y.Y)(a);for(let t=r;t<r+n-s;t++)if(e[t]){let n=yield(0,g.RW)(e[t].id);i.push(n)}return i})}(a,c,n,o),u})}function A(e,t){return T(this,arguments,void 0,function*(e,t,n=10,o=1){if(rr)try{return(yield fr("GetCompositionListWithId",{compositionName:e,userId:t,inpage:n,page:o})).data}catch(e){Cr(e)}let i=yield(0,C.A)(e),r=[];if(i){yield m(e,t);let a=yield d.I.GetConceptsByTypeIdAndUser(i.id,t),s=n*(o-1),c=[];for(let e=s;e<s+n;e++)a[e]&&c.push(a[e].id);yield(0,y.Y)(c);for(let e=s;e<s+n;e++)if(a[e]){let t=yield(0,g.RW)(a[e].id);r.push(t)}}return r})}function S(e,t){return T(this,arguments,void 0,function*(e,t,n=10,o=1){let i=yield(0,C.w)(e),r=[];if(i){yield m(e,t);let a=yield d.I.GetConceptsByTypeIdAndUser(i.id,t),s=n*(o-1),c=[];for(let e=s;e<s+n;e++)a[e]&&c.push(a[e].id);yield(0,y.Y)(c);for(let e=s;e<s+n;e++)if(a[e]){let t=yield(0,g.RW)(a[e].id);r.push(t)}}return r})}var L=n(4864),N=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};var _=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function x(e){return _(this,void 0,void 0,function*(){var t,n;try{if(rr)try{return(yield fr("GetCompositionLocal",{id:e})).data}catch(e){Cr(e)}let o=[],i={};o=yield L.G.GetConnectionsOfCompositionLocal(e);let r=[];for(let e=0;e<o.length;e++)r.includes(o[e].ofTheConceptId)||r.push(o[e].ofTheConceptId);let a=yield v.v.GetConcept(e);if(0==a.id){let t=yield function(e){var t=arguments;return N(this,void 0,void 0,function*(){const n=mo.V.logfunction("TranslateLocalToReal",t);let o=(0,V.o)();try{var i=(0,h.ab)("application/x-www-form-urlencoded");const t=yield fetch(u.B.GetRealConceptById(),{method:"POST",headers:i,body:`id=${e}`});if(t.ok)return o=yield t.json(),o.id>0&&d.I.AddConcept(o),o;(0,p.ry)(t),mo.V.logUpdate(n)}catch(e){Error,(0,p.Mb)(e,u.B.GetRealConceptById()),(0,p.ey)(n,"TranslateLocalToReal",e)}return o})}(e);if(t.id>0)return yield(0,g.Nj)(t.id)}let s=yield P(e,o,r);return i[null!==(n=null===(t=null==a?void 0:a.type)||void 0===t?void 0:t.characterValue)&&void 0!==n?n:"top"]=s,i}catch(e){throw e}})}function D(e){return _(this,void 0,void 0,function*(){var t,n;try{if(rr)try{return(yield fr("GetCompositionLocalWithId",{id:e})).data}catch(e){Cr(e)}let o=[],i={},r={};o=yield L.G.GetConnectionsOfCompositionLocal(e);let a=[];for(let e=0;e<o.length;e++)a.includes(o[e].ofTheConceptId)||a.push(o[e].ofTheConceptId);let s=yield v.v.GetConcept(e);if(0!=s.id){let r=yield P(e,o,a);i[null!==(n=null===(t=null==s?void 0:s.type)||void 0===t?void 0:t.characterValue)&&void 0!==n?n:"top"]=r}return r.data=i,r.id=e,r}catch(e){throw e}})}function P(e,t,n){return _(this,arguments,void 0,function*(e,t,n,o=[]){var i,r,a,s;let c={},l=[],d=yield v.v.GetConcept(e);if(0!=d.id&&null==d.type){let e=d.typeId,t=yield v.v.GetConcept(e);d.type=t}r=null===(i=null==d?void 0:d.type)||void 0===i?void 0:i.characterValue;if(!n.includes(e))return null==d?void 0:d.characterValue;if(o.includes(e))return"";o.push(e);for(let o=0;o<t.length;o++)if(t[o].ofTheConceptId==e){let e=t[o].toTheConceptId,i=yield v.v.GetConcept(e);if(0!=i.id&&null==(null==i?void 0:i.type)){let e=i.typeId,t=yield v.v.GetConcept(e);i.type=t}let r="the_",d=(null!==(s=null===(a=null==i?void 0:i.type)||void 0===a?void 0:a.characterValue)&&void 0!==s?s:"top").replace(r,"");if(isNaN(Number(d))){if(d){const o=yield P(e,t,n);c[d]=o}}else{const o=yield P(e,t,n);l[d]=o,c=l}}return c})}var E=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function R(e,t){return E(this,void 0,void 0,function*(){if(rr)try{return(yield fr("GetCompositionListLocal",{compositionName:e,userId:t})).data}catch(e){Cr(e)}try{let n=yield(0,w.Ay)(e),o=[];if(0!=n.id){let e=yield v.v.GetConceptsByTypeIdAndUser(n.id,t);for(let t=0;t<e.length;t++){let n=yield x(e[t].id);o.push(n)}}return o}catch(e){throw e}})}function O(e,t){return E(this,void 0,void 0,function*(){if(rr)try{return(yield fr("GetCompositionListLocalWithId",{compositionName:e,userId:t})).data}catch(e){Cr(e)}try{let n=yield(0,w.Ay)(e),o=[];if(0!=n.id){let e=yield v.v.GetConceptsByTypeIdAndUser(n.id,t);for(let t=0;t<e.length;t++){let n=yield D(e[t].id);o.push(n)}}return o}catch(e){throw e}})}var B=n(2),F=n(1218),U=n(999),G=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function M(e,t,n){var o=arguments;return G(this,arguments,void 0,function*(e,t,n,i=10,r=1){const a=mo.V.logfunction("GetConnectionOfTheConcept",o)||{};let s=[];try{if(rr){a.serviceWorker=!0;try{const o=yield fr("GetConnectionOfTheConcept",{typeId:e,ofTheConceptId:t,userId:n,inpage:i,page:r});return mo.V.logUpdate(a),o.data}catch(e){(0,p.ey)(a,"GetConnectionOfTheConcept",e),Cr(e)}}let o=new URLSearchParams;o.append("typeId",`${e}`),o.append("ofTheConceptId",`${t}`),o.append("userId",`${n}`),o.append("inpage",`${i}`),o.append("page",`${r}`);let c=(0,h.Xr)("application/x-www-form-urlencoded");const l=yield fetch(u.B.GetAllConnectionsOfConceptUrl(),{method:"POST",headers:c,body:o});return l.ok?s=yield l.json():((0,p.ey)(a,"GetConnectionOfTheConcept",l.status),(0,p.ry)(l)),mo.V.logUpdate(a),s}catch(e){Error,(0,p.Mb)(e,u.B.GetAllConnectionsOfConceptUrl()),(0,p.ey)(a,"GetConnectionOfTheConcept",e)}})}var W=n(2155),j=n(442),V=n(7282),q=n(5976),H=n(7273),$=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function z(e,t,n,o){return $(this,arguments,void 0,function*(e,t,n,o,i=1,r=4){if(e>0&&n>0){var a=t,s=yield q.p.getId(),c=new W.N(s,e,n,a,o,i,r);return e==n?(c.ofTheConceptId=0,c.toTheConceptId=1,c):(c.toUpdate=!0,c.isTemp=!1,j.Y.AddConnection(c),c)}throw new H.z("cannot create connection because id are negative ",!1,400,"")})}var J=n(4818),Q=n(7876),Y=n(8407),X=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function K(e,t,n){return X(this,arguments,void 0,function*(e,t,n,o=!1,i=!1){var r,a;if(rr)try{return(yield fr("CreateConnectionBetweenTwoConcepts",{ofTheConcept:e,toTheConcept:t,linker:n,both:o,count:i})).data}catch(e){Cr(e)}let s=e.userId;if(o){let o=n+"_by",a=(null===(r=t.type)||void 0===r?void 0:r.characterValue)+"_s"+"_"+o;i&&(yield Z(o,t,s));let c=yield(0,Y.A)("connection",a,!1,999,999,999),l=new W.N(0,t.id,e.id,s,c.id,1e3,4);j.Y.AddConnection(l)}let c=n+"_s",l=(null===(a=e.type)||void 0===a?void 0:a.characterValue)+"_s"+"_"+c;i&&(yield Z(c,e,s));let d=yield(0,Y.A)("connection",l,!1,999,999,999),u=new W.N(0,e.id,t.id,s,d.id,1e3,4);return j.Y.AddConnection(u),u})}function Z(e,t){return X(this,arguments,void 0,function*(e,t,n=null){var o;let i=t,r=null!=n?n:t.userId,a=e+"_count",s=(null===(o=t.type)||void 0===o?void 0:o.characterValue)+"_s_"+a,c=yield(0,Y.A)("connection",s,!1,r,4,999),l=yield M(c.id,t.id,r,10,1),d=[],u=(0,V.o)();for(let e=0;e<l.length;e++){let t=yield(0,Q.A)(l[e].toTheConceptId);d.push(t)}if(d.length<1)u=yield(0,Y.A)("count","1",!1,r,4,999);else{let e=d[0],t=0;try{t=Number(e.characterValue)}catch(e){t=0}t+=1,u=yield(0,Y.A)("count",t.toString(),!1,r,4,999);for(let e=0;e<l.length;e++)(0,J.m)(l[e].id)}let h=new W.N(0,i.id,u.id,i.userId,c.id,1e3,4);yield j.Y.AddConnection(h)})}function ee(e,t,n){return X(this,arguments,void 0,function*(e,t,n,o=!1,i=!1){var r,a;let s=e.userId;if(o){let o=n+"_by",a=(null===(r=t.type)||void 0===r?void 0:r.characterValue)+"_s"+"_"+o;i&&(yield Z(o,t,s));let c=yield(0,Y.A)("connection",a,!1,999,999,999),l=new W.N(0,t.id,e.id,s,c.id,1e3,4);j.Y.AddConnection(l)}let c=n+"_s",l=(null===(a=e.type)||void 0===a?void 0:a.characterValue)+"_s"+"_"+c;i&&(yield Z(c,e,s));let d=yield(0,Y.A)("connection",l,!1,999,999,999);return yield z(e.id,e.userId,t.id,d.id,1e3,4)})}var te=n(5868),ne=(n(3655),function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})});function oe(e,t){const n=mo.V.logfunction("storeToDatabase",[e,"noindexdb"]);mo.V.logUpdate(n)}function ie(e,t,n){return ne(this,void 0,void 0,function*(){const t=mo.V.logfunction("getFromDatabaseWithType",[e,"noindexdb"]);mo.V.logUpdate(t)})}function re(e){return ne(this,void 0,void 0,function*(){const t=mo.V.logfunction("getObjectsFromIndexDb",[e,"noindexdb"]);mo.V.logUpdate(t)})}var ae=n(1666),se=n(4402),ce=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function le(e,t){var n=arguments;return ce(this,arguments,void 0,function*(e,t,o=10,i=1){var r;const a=mo.V.logfunction("GetLink",n)||{};if(rr){a.serviceWorker=!0;try{const n=yield fr("GetLink",{id:e,linker:t,inpage:o,page:i});return mo.V.logUpdate(a),n.data}catch(e){(0,p.ey)(a,"GetLink",e),Cr(e)}}let s=[],c=yield(0,Q.A)(e),l=(null===(r=c.type)||void 0===r?void 0:r.characterValue)+"_s_"+t,d=yield(0,se.A)(l,16);if(d.id>0){let e=yield M(d.id,c.id,c.userId,o,i),t=[];for(let n=0;n<e.length;n++)t.push(e[n].toTheConceptId);yield(0,y.Y)(t);for(let t=0;t<e.length;t++){let n=e[t].toTheConceptId,o=yield(0,Q.A)(n),i=yield(0,g.Ez)(o.id);s.push(i)}}return mo.V.logUpdate(a),s})}function de(e,t){var n=arguments;return ce(this,arguments,void 0,function*(e,t,o=10,i=1){var r;const a=mo.V.logfunction("GetLinkRaw",n);let s=[],c=yield(0,Q.A)(e),l=(null===(r=c.type)||void 0===r?void 0:r.characterValue)+"_s_"+t,d=yield(0,se.A)(l,16);if(d.id>0){let e=yield M(d.id,c.id,c.userId,o,i),t=[];for(let n=0;n<e.length;n++)t.push(e[n].toTheConceptId);for(let t=0;t<e.length;t++){let n=e[t].toTheConceptId,o=yield(0,Q.A)(n);s.push(o)}}return mo.V.logUpdate(a),s})}var ue=n(8357),he=n(843),pe=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};const fe=new Map;function me(e,t){var n=arguments;return pe(this,void 0,void 0,function*(){const t=mo.V.logfunction("MakeTheTypeConceptApi",n);let o=(0,V.o)();if(fe.has(e))return fe.get(e)||o;const i=(()=>pe(this,void 0,void 0,function*(){try{if(o=yield(0,he.Az)(e),0==o.id||4==o.typeId){let n=(0,h.Xr)("application/x-www-form-urlencoded");const i=yield fetch(u.B.MakeTheTypeConceptUrl(),{method:"POST",headers:n,body:`type=${e}`});if(!i.ok)throw(0,p.ry)(i),new Error(`Error! status: ${i.status}`);let r=yield i.json();o=r,mo.V.logUpdate(t)}}catch(e){Error,(0,p.Mb)(e,u.B.MakeTheTypeConceptUrl()),(0,p.ey)(t,"MakeTheTypeConceptApi",e)}finally{fe.delete(e)}return o}))();return fe.set(e,i),i})}var ye=n(8675),ve=n(6058),ge=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function Ce(e){var t=arguments;return ge(this,void 0,void 0,function*(){const n=mo.V.logfunction("GetLinkerConnectionFromConcepts",t);let o=yield(0,ye.l)(e);for(let e=0;e<o.length;e++){let t=o[e],n=t.typeId,i=yield(0,Q.A)(n);t.type=i}return mo.V.logUpdate(n),o})}function we(e){var t=arguments;return ge(this,void 0,void 0,function*(){const n=mo.V.logfunction("GetLinkerConnectionToConcepts",t);let o=yield(0,ve.W)(e);for(let e=0;e<o.length;e++){let t=o[e],n=t.typeId,i=yield(0,Q.A)(n);t.type=i}return mo.V.logUpdate(n),o})}var Te=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};var Ie=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};var ke=n(6963),be=n(2202),Ae=n(5457),Se=n(991),Le=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function Ne(e){var t=arguments;return Le(this,void 0,void 0,function*(){const n=mo.V.logfunction("DeleteConceptById",t);if(rr)try{return(yield fr("DeleteConceptById",{id:e})).data}catch(e){Cr(e)}if(e>0){var o=yield d.I.GetConcept(e);if(o.id>0){var i=o.typeId,r=o.characterValue;yield Ae.c.removeTypeConcept(i,e),yield ke.f.removeNodeByCharacter(r,e),yield function(e){var t=arguments;return Ie(this,void 0,void 0,function*(){let n=!1;const o=mo.V.logfunction("DeleteTheConcept",t);try{const t=new FormData;t.append("id",e.toString());let i=(0,h.BZ)();const r=yield fetch(u.B.DeleteConceptUrl(),{method:"POST",headers:i,body:t});r.ok?n=(yield r.json()).success:(0,p.ry)(r),n&&d.I.AddNpc(e),mo.V.logUpdate(o)}catch(e){Error,(0,p.Mb)(e,u.B.DeleteConceptUrl()),(0,p.ey)(o,"DeleteTheConcept",e)}return n})}(e),yield be.W.removeNodeFromTree(e),yield Se.H.removeNodeFromTree(e)}}else v.v.RemoveConceptById(e);mo.V.logUpdate(n)})}function _e(e){return Le(this,void 0,void 0,function*(){if(rr)try{return(yield fr("DeleteUser",{id:e})).data}catch(e){Cr(e)}e>0?function(e){var t=arguments;Te(this,void 0,void 0,function*(){const n=mo.V.logfunction("DeleteUserInBackend",t);try{var o=(0,h.ab)("application/json","");let t=u.B.DeleteUserUrl();t=t+"?conceptId="+e+"&apiKey=freeschema";const i=yield fetch(t,{method:"POST",headers:o});if(i.ok){let e=yield i.json(),t=Number(e.data);return Ne(t),mo.V.logUpdate(n),t}throw(0,p.ry)(i),new Error(`Delete composition Error! status: ${i.status}`)}catch(e){Error,(0,p.Mb)(e,u.B.DeleteConceptUrl()),(0,p.ey)(n,"DeleteUserInBackend",e)}})}(e):v.v.RemoveConceptById(e)})}var xe=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function De(e,t){return xe(this,void 0,void 0,function*(){try{const n=new Headers;n.append("Authorization","Bearer "+t);const o=new FormData;o.append("id",e.toString());const i=yield fetch(u.B.DeleteConceptUrl(),{method:"POST",body:o,headers:n});if(!i.ok)throw(0,p.ry)(i),new Error(`Delete composition Error! status: ${i.status}`)}catch(e){Error,(0,p.Mb)(e,u.B.DeleteConceptUrl())}})}var Pe=n(1735),Ee=n(8286),Re=n(1596),Oe=n(4024),Be=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function Fe(e){var t=arguments;return Be(this,void 0,void 0,function*(){const n=mo.V.logfunction("GetConnection",t);let o=yield Ee.d.GetConnection(e);try{if(0!=o.id)return o;{const t=new FormData;t.append("id",e.toString());const i={method:"POST",headers:{Authorization:"Bearer "+Oe.b.BearerAccessToken},body:t};let r;try{r=yield fetch(u.B.GetConnectionUrl(),i)}catch(e){r=yield(0,Re.g)(i,"/api/get-connection-by-id")}return yield function(e,t){return Be(this,void 0,void 0,function*(){e.ok?(t=yield e.json(),Ee.d.AddConnection(t)):(0,p.ry)(e)})}(r,o),mo.V.logUpdate(n),o}}catch(e){Error,(0,p.Mb)(e,u.B.GetConnectionUrl()),(0,p.ey)(n,"GetConnection",e)}})}var Ue=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function Ge(e){var t=arguments;return Ue(this,void 0,void 0,function*(){const n=mo.V.logfunction("GetConnectionById",t);if(!0===Pe.J.activateStatus)try{Pe.J.incrementConnection(e)}catch(e){mo.V.log("ERROR","Error Adding Connection")}if(rr)try{return(yield fr("GetConnectionById",{id:e})).data}catch(e){Cr(e)}let o=yield Ee.d.GetConnection(e);if((null==o||0==o.id)&&null!=e&&null!=e){o=yield Fe(e)}return mo.V.logUpdate(n),o})}var Me=n(2212),We=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};var je=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function Ve(e,t,n){return je(this,arguments,void 0,function*(e,t,n,o=4,i=999){const r=mo.V.logfunction("MakeTheTimestamp")||{};if(rr){r.serviceWorker=!0;try{const a=yield fr("MakeTheTimestamp",{type:e,referent:t,userId:n,accessId:o,sessionInformationId:i});return mo.V.logUpdate(r),a.data}catch(e){(0,p.ey)(r,"MakeTheTimestamp",e),Cr(e)}}let a,s="",c=e.startsWith("the_"),l=(0,V.o)();s=c?e:"the_"+e,l=yield me(s,n);let d=yield function(e,t,n,o,i,r,a){return We(this,void 0,void 0,function*(){let s=yield(0,se.A)(e,o),c=s;return 0==c.id&&(s=yield(0,Me.Ay)(e,t,n,o,i,r,a),c=s),c})}(t,n,4,l.id,0,o,s);return a=d,mo.V.logUpdate(r),a})}class qe{constructor(){this.composition=0,this.type="",this.linker="",this.inpage=10,this.page=1,this.listLinkers=[],this.fullLinkers=[],this.textSearch="",this.logic="or",this.reverse=!1,this.doFilter=!1,this.filterSearches=[],this.selectors=[],this.ofCompositions=[]}}var He=n(6687),$e=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function ze(){var e=arguments;return $e(this,arguments,void 0,function*(t=0,n=[],o="",i=[]){const r=mo.V.logfunction("RecursiveSearchApi",e)||{};let a=[];try{if(rr){r.serviceWorker=!0;try{const e=yield fr("RecursiveSearchApi",{composition:t,listLinkers:n,textSearch:o,fullLinkers:i});return mo.V.logUpdate(r),e.data}catch(e){(0,p.ey)(r,"RecursiveSearchApi",e),Cr(e)}}let e=new qe;e.composition=t,e.listLinkers=n,e.fullLinkers=i,e.textSearch=o;let s=JSON.stringify(e),c=(0,h.Xr)();const l=yield fetch(u.B.RecursiveSearchUrl(),{method:"POST",headers:c,body:s});if(l.ok){const e=yield l.json();let t=e.compositionIds,n=e.internalConnections;e.externalConnections;a=yield(0,He.p8)(t,n)}else(0,p.ey)(r,"RecursiveSearchApi",l.status),(0,p.ry)(l);mo.V.logUpdate(r)}catch(e){Error,(0,p.ey)(r,"RecursiveSearchApi",e),(0,p.Mb)(e,u.B.RecursiveSearchUrl())}return a})}function Je(){var e=arguments;return $e(this,arguments,void 0,function*(t=0,n=[],o=""){const i=mo.V.logfunction("RecursiveSearchApiWithInternalConnections",e)||{};let r=[];try{if(rr){i.serviceWorker=!0;try{const e=yield fr("RecursiveSearchApiWithInternalConnections",{composition:t,listLinkers:n,textSearch:o});return mo.V.logUpdate(i),e.data}catch(e){(0,p.ey)(i,"RecursiveSearchApiWithInternalConnections",e),Cr(e)}}let e=new qe;e.composition=t,e.listLinkers=n,e.textSearch=o;let a=JSON.stringify(e),s=(0,h.Xr)();const c=yield fetch(u.B.RecursiveSearchUrl(),{method:"POST",headers:s,body:a});if(c.ok){const e=yield c.json();let t=e.compositionIds,n=e.internalConnections;e.externalConnections;r=yield(0,He.km)(t,n),mo.V.logUpdate(i)}else(0,p.ey)(i,"GetCompositionConnectionsBetweenTwoConcepts",c.status),(0,p.ry)(c)}catch(e){Error,(0,p.ey)(i,"GetCompositionConnectionsBetweenTwoConcepts",e),(0,p.Mb)(e,u.B.RecursiveSearchUrl())}return r})}function Qe(){var e=arguments;return $e(this,arguments,void 0,function*(t=0,n=[],o="",i=[]){const r=mo.V.logfunction("RecursiveSearchApiRaw",e)||{};try{if(rr){r.serviceWorker=!0;try{const e=yield fr("RecursiveSearchApiRaw",{composition:t,listLinkers:n,textSearch:o,fullLinkers:i});return mo.V.logUpdate(r),e.data}catch(e){(0,p.ey)(r,"RecursiveSearchApiRaw",e),Cr(e)}}let e=new qe;e.composition=t,e.listLinkers=n,e.textSearch=o,e.fullLinkers=i;let a=JSON.stringify(e),s=(0,h.Xr)();const c=yield fetch(u.B.RecursiveSearchUrl(),{method:"POST",headers:s,body:a});if(c.ok){const e=yield c.json();e.compositionIds,e.internalConnections,e.externalConnections;return mo.V.logUpdate(r),e}return(0,p.ey)(r,"RecursiveSearchApiRaw",c.status),(0,p.ry)(c),mo.V.logUpdate(r),[]}catch(e){Error,(0,p.ey)(r,"RecursiveSearchApiRaw",e),(0,p.Mb)(e,u.B.RecursiveSearchUrl())}})}function Ye(){var e=arguments;return $e(this,arguments,void 0,function*(t=0,n=[],o=""){const i=mo.V.logfunction("RecursiveSearchApiRawFullLinker",e)||{};try{if(rr){i.serviceWorker=!0;try{const e=yield fr("RecursiveSearchApiRawFullLinker",{composition:t,fullLinkers:n,textSearch:o});return mo.V.logUpdate(i),e.data}catch(e){(0,p.ey)(i,"RecursiveSearchApiRawFullLinker",e),Cr(e)}}let e=new qe;e.composition=t,e.fullLinkers=n,e.textSearch=o;let r=JSON.stringify(e),a=(0,h.Xr)();const s=yield fetch(u.B.RecursiveSearchUrl(),{method:"POST",headers:a,body:r});if(s.ok){const e=yield s.json();e.compositionIds,e.internalConnections,e.externalConnections;return mo.V.logUpdate(i),e}return(0,p.ey)(i,"RecursiveSearchApiRawFullLinker",s.status),(0,p.ry)(s),mo.V.logUpdate(i),[]}catch(e){Error,(0,p.Mb)(e,u.B.RecursiveSearchUrl()),(0,p.ey)(i,"RecursiveSearchApiRawFullLinker",e)}})}function Xe(){var e=arguments;return $e(this,arguments,void 0,function*(t=0,n=[],o=""){const i=mo.V.logfunction("RecursiveSearchApiRawFullLinker",e)||{};try{if(rr)try{i.serviceWorker=!0;const e=yield fr("RecursiveSearchApiNewRawFullLinker",{composition:t,fullLinkers:n,textSearch:o});return mo.V.logUpdate(i),e.data}catch(e){(0,p.ey)(i,"RecursiveSearchApiNewRawFullLinker",e),Cr(e)}let e=new qe;e.composition=t,e.fullLinkers=n,e.textSearch=o;let r=JSON.stringify(e),a=(0,h.Xr)();const s=yield fetch(u.B.RecursiveSearchUrl(),{method:"POST",headers:a,body:r});if(s.ok){const e=yield s.json();e.compositionIds,e.internalConnections,e.externalConnections;return mo.V.logUpdate(i),e}return(0,p.ey)(i,"RecursiveSearchApiNewRawFullLinker",s.status),(0,p.ry)(s),mo.V.logUpdate(i),[]}catch(e){Error,(0,p.Mb)(e,u.B.RecursiveSearchUrl()),(0,p.ey)(i,"RecursiveSearchApiNewRawFullLinker",e)}})}var Ke=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};const Ze=["image/jpeg","image/jpg","image/png","image/webp"],et=["application/msword","application/vnd.ms-excel","application/vnd.ms-powerpoint","text/plain","application/pdf"];function tt(e,t){return Ke(this,void 0,void 0,function*(){const n=mo.V.logfunction("uploadAttachment");try{const o=new FormData;let i;if(et.includes(e.type)||e.name.toLowerCase().endsWith(".md"))o.append("file",e,e.name),i=yield it(o,t);else{if(!Ze.includes(e.type))return{message:"Invalid File Format",success:!1};o.append("image",e,e.name),i=yield nt(o,t)}return(null==i?void 0:i.data)?(mo.V.logUpdate(n),{message:"Upload Success",success:!0,url:i.data}):{message:"File Upload Failed",success:!1}}catch(e){throw(0,p.ey)(n,"uploadAttachment",e),e}})}function nt(e){return Ke(this,arguments,void 0,function*(e,t=""){const n=mo.V.logfunction("uploadImage");try{const o=yield fetch(u.B.uploadImageUrl(),{method:"POST",body:e,headers:{Authorization:`Bearer ${t}`}});if(!o.ok){const e=o.headers.get("content-type");e&&e.includes("text/plain");yield null==o?void 0:o.text();return mo.V.logUpdate(n),null}return yield o.json()}catch(e){return(0,p.ey)(n,"uploadImage",e),null}})}function ot(e){return Ke(this,arguments,void 0,function*(e,t=""){const n=mo.V.logfunction("uploadImageV2");try{const o=yield fetch(u.B.uploadImageUrlWithSmall(),{method:"POST",body:e,headers:{Authorization:`Bearer ${t}`}});if(!o.ok){const e=o.headers.get("content-type");e&&e.includes("text/plain");yield null==o?void 0:o.text();return mo.V.logUpdate(n),null}return yield o.json()}catch(e){return(0,p.ey)(n,"uploadImageV2",e),null}})}function it(e){return Ke(this,arguments,void 0,function*(e,t=""){const n=mo.V.logfunction("uploadFile");try{const o=yield fetch(u.B.uploadFileUrl(),{method:"POST",body:e,headers:{Authorization:`Bearer ${t}`}});if(!o.ok){const e=o.headers.get("content-type");e&&e.includes("text/plain");yield o.text();return null}return mo.V.logUpdate(n),yield o.json()}catch(e){return(0,p.ey)(n,"uploadFile",e),null}})}function rt(){return Ke(this,void 0,void 0,function*(){let e=yield(0,h.Xr)(),t={};try{const n=yield fetch(u.B.UploadFileLimitUrl(),{method:"GET",headers:e});n.ok&&(t=n.json())}catch(e){throw e}return t})}var at=n(1239),st=n(7467),ct=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function lt(e,t){var n=arguments;return ct(this,arguments,void 0,function*(e,t,o="boomconsole.com"){const i=mo.V.logfunction("LoginToBackend",n);try{let n={email:e,password:t,application:o},r=new Headers;r.append("Content-Type","application/json");let a=JSON.stringify(n);const s=yield fetch(u.B.LoginUrl(),{method:"POST",headers:r,body:a}),c=yield s.json();if(s.ok)return yield Oe.b.saveUserProfile(c),mo.V.logUpdate(i),c;(0,p.ER)(s,c)}catch(e){Error,(0,p.Mb)(e,u.B.LoginUrl()),(0,p.ey)(i,"LoginToBackend",e)}})}var dt=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function ut(e){return dt(this,void 0,void 0,function*(){const t=yield function(){return dt(this,arguments,void 0,function*(e="",t={}){let n={message:"success",status:!1,statusCode:200,data:"cannot signup"};try{const o=yield fetch(e,{method:"POST",mode:"cors",cache:"no-cache",credentials:"same-origin",headers:{"Content-Type":"application/json"},redirect:"follow",referrerPolicy:"no-referrer",body:JSON.stringify(t)}),i=yield o.json();return o.ok?n={message:"success",status:!0,statusCode:200,data:i}:(0,p.ER)(o,i),n}catch(t){(0,p.Mb)(t,e)}})}(u.B.SignupUrl(),e);return t})}function ht(e){return dt(this,void 0,void 0,function*(){const t=u.B.NODE_URL,n=yield fetch(`${t}/api/v1/entity/signup`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(n.ok)return n.json();{if(404===n.status)throw new Error("404, Not found");if(500===n.status)throw new Error("500, internal server error");let e=yield n.json();throw new Error(e.message)}})}var pt=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function ft(e){return pt(this,void 0,void 0,function*(){const t=JSON.stringify({email:e.email,password:e.password});let n={message:"success",status:!1,statusCode:200,data:""};const o=new Headers;o.append("Content-Type","application/json");const i=u.B.LoginUrl();try{const e=yield fetch(i,{method:"POST",headers:o,body:t,redirect:"follow"}),r=yield e.json();if(e.ok){n={message:"success",status:!0,statusCode:200,data:null==r?void 0:r.data}}else(0,p.ER)(e,r);return n}catch(e){(0,p.Mb)(e,i)}})}var mt=n(9934),yt=n(4485);function vt(e=[],t){Array.isArray(e)&&e.splice(e.findIndex(function(e){return e.id===t.id}),1)}function gt(e=[],t){Array.isArray(e)&&e.splice(e.findIndex(function(e){return e.id===t.id}),1)}class Ct{constructor(e,t,n,o){this.expiryTime=new Date(Date.now()+6e5),this.height=1,this.key=e,this.value=t,this.leftNode=n,this.rightNode=o}isValid(){const e=new Date(Date.now());return!(this.expiryTime<e)||(Tt.removeNodeFromTree(this.key),!1)}saveToCache(e){this.value.cached=e}addNode(e,t,n){if(null==t)return t=e;const o=t.leftNode,i=t.rightNode;if(t.key>e.key)t.leftNode=this.addNode(e,o,n);else{if(!(t.key<e.key))return this.isValid(),t=e;t.rightNode=this.addNode(e,i,n)}t.height=1+Math.max(this.getHeight(t.leftNode),this.getHeight(t.rightNode));const r=this.getBalanceFactor(t);if(r>1&&t.leftNode){if(e.key<t.leftNode.key)return this.rightRotate(t);if(e.key>t.leftNode.key)return t.leftNode=this.leftRotate(t.leftNode),this.rightRotate(t)}if(r<-1&&t.rightNode){if(e.key>t.rightNode.key)return this.leftRotate(t);if(e.key<t.rightNode.key)return t.rightNode=this.rightRotate(t.rightNode),this.leftRotate(t)}return this.isValid(),t}rightRotate(e){if(e){const t=e.leftNode;if(t){const n=t.rightNode;return e.leftNode=n,t.rightNode=e,e.height=Math.max(this.getHeight(e.leftNode),this.getHeight(e.rightNode))+1,t.height=Math.max(this.getHeight(t.leftNode),this.getHeight(t.rightNode))+1,t}}return e}leftRotate(e){if(e){const t=e.rightNode;if(t){const n=t.leftNode;return t.leftNode=e,e.rightNode=n,e.height=Math.max(this.getHeight(e.leftNode),this.getHeight(e.rightNode))+1,t.height=Math.max(this.getHeight(t.leftNode),this.getHeight(e.rightNode))+1,t}}return e}getHeight(e){return e?e.height:0}getBalanceFactor(e){return null==e?0:this.getHeight(e.leftNode)-this.getHeight(e.rightNode)}getFromNode(e,t){return t?e==t.key&&t.isValid()?t:e<t.key?this.getFromNode(e,t.leftNode):e>t.key?this.getFromNode(e,t.rightNode):t:t}removeNode(e,t){if(null==e)return e;if(e.key>t)return e.leftNode=this.removeNode(e.leftNode,t),e;if(e.key<t)return e.rightNode=this.removeNode(e.rightNode,t),e;if(null==e.leftNode){const t=e.rightNode;return e=null,t}if(null==e.rightNode){const t=e.leftNode;return e=null,t}{const t=this.inOrderSuccessor(e.rightNode);return e.value=t.value,e.key=t.key,e.rightNode=this.removeNode(e.rightNode,t.key),e}}countNodeBelow(e){return null==e?0:1+this.countNodeBelow(e.leftNode)+this.countNodeBelow(e.rightNode)}inOrderSuccessor(e){for(;null!=e.leftNode;)e=e.leftNode;return e}}var wt=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class Tt{static addNodeToTree(e){if(null==this.root)return this.root=e,this.root;this.root=this.root.addNode(e,this.root,this.root.height)}static addCompositionToTree(e){const t=new Ct(e.id,e,null,null);this.addNodeToTree(t)}static getNodeFromTree(e){return wt(this,void 0,void 0,function*(){if(this.root){return this.root.getFromNode(e,this.root)}return null})}static removeNodeFromTree(e){return wt(this,void 0,void 0,function*(){this.root&&(this.root=this.root.removeNode(this.root,e))})}static countNumberOfNodes(){return this.root?this.root.countNodeBelow(this.root):0}}Tt.root=null;var It=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function kt(e,t,n,o){return It(this,arguments,void 0,function*(e,t,n,o,i=[]){var r,a;let s={};const c=[];if(0==e)return"";let l=bt(n,e);if((null==l||0==l.id)&&null!=e&&null!=e){l=yield(0,Q.A)(e)}if(0!=l.id&&null==l.type){const e=l.typeId;let t=bt(n,e);if(l.type=t,null==t&&null!=e&&null!=e){t=yield(0,Q.A)(e),l.type=t}}if(!o.includes(e))return null==l?void 0:l.characterValue;if(i.includes(e))return"";i.push(e);for(let l=0;l<t.length;l++)if(t[l].ofTheConceptId==e){const u=t[l].toTheConceptId;if(o.includes(e)){let e=bt(n,u);if((null==e||0==e.id)&&null!=u&&null!=u){e=yield(0,Q.A)(u)}if(0!=e.id&&null==(null==e?void 0:e.type)){const t=e.typeId;let n=yield d.I.GetConcept(t);if(e.type=n,null==n&&null!=t&&null!=t){n=yield(0,Q.A)(t),e.type=n}}const l="the_",h=(null!==(a=null===(r=null==e?void 0:e.type)||void 0===r?void 0:r.characterValue)&&void 0!==a?a:"").replace(l,"");if(isNaN(Number(h))){if(h){const e=yield kt(u,t,n,o,i);s[h]=e}}else{const e=yield kt(u,t,n,o,i);c[h]=e,s=c}}}return s})}function bt(e,t){let n=(0,V.o)();for(let o=0;o<e.length;o++)if(t==e[o].id)return n=e[o],n;return n}var At=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class St{constructor(){this.id=0,this.mainConcept=(0,V.o)(),this.connections=[],this.concepts=[],this.subcompositions=[],this.cached={}}updateCache(){return At(this,void 0,void 0,function*(){if(0==this.mainConcept.id)for(let e=0;e<this.concepts.length;e++)this.concepts[e].id==this.id&&(this.mainConcept=this.concepts[e]);this.cached=yield kt(this.id,this.connections,this.concepts,this.subcompositions,[])})}UpdateAcrossDistributedSystem(){var e,t,n;try{0!=this.id&&(t="compositionUpdate",n=null===(e=this.id)||void 0===e?void 0:e.toString(),u.B.MQTT_CONNECTION&&u.B.MQTT_CONNECTION.publish(t,n))}catch(e){}}isUpdating(){this.UpdateAcrossDistributedSystem()}GetDataCache(){var e,t,n;const o={};o[null!==(n=null===(t=null===(e=this.mainConcept)||void 0===e?void 0:e.type)||void 0===t?void 0:t.characterValue)&&void 0!==n?n:""]=this.cached;const i={};return i.data=o,i.id=this.id,i}}var Lt=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function Nt(e){return Lt(this,arguments,void 0,function*(e,t=null,n=null,o=null,i=null,r=null,a=null,s=null){const c=null!=i?i:999,l=null!=r?r:4,d=null!=a?a:999;let u=null!=o?o:0,h=(0,V.o)();null==s&&(s=new St);for(const o in e)if("object"==typeof e[o]||Array.isArray(e[o])){const p=yield(0,Y.A)(o,"",!0,c,l,d);if(null==t&&null==n){let t=u;h=p,t=p.id,u=p.id,s.concepts.push(p),s.id=p.id,yield Nt(e[o],p.id,p.userId,t,i,r,a,s)}else{const c=null!=t?t:999,l=null!=n?n:999,d=u;h=p,s.concepts.push(p);const f=yield(0,ae.q)(c,l,p.id,d);s.connections.push(f),yield Nt(e[o],p.id,p.userId,d,i,r,a,s)}null!=e[o]&&null!=e[o]&&s.subcompositions.push(p.id)}else{const i=null!=t?t:999,r=null!=n?n:999,a=u,h=yield(0,Y.A)(o,e[o],!1,c,l,d);s.concepts.push(h);const p=yield(0,ae.q)(i,r,h.id,a);s.connections.push(p)}return h})}var _t=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function xt(e){return _t(this,void 0,void 0,function*(){const t=mo.V.logfunction("UpdateComposition")||{};if(rr){t.serviceWorker=!0;try{const n=yield fr("UpdateComposition",{patcherStructure:e});return mo.V.logUpdate(t),n.data}catch(e){(0,p.ey)(t,"UpdateComposition",e),Cr(e)}}const n=e.userId,o=e.sessionId,i=e.accessId;let r=[];const a=[];let s=(0,V.o)(),c=(0,V.o)();const l=[];let d=e.compositionId;const u=e.ofTheCompositionId;let h=[];if(d<0){let e=yield(0,Q.A)(d,n);if(!(e.id>0))return null;d=e.id}r=yield(0,B.s)(d);const f=[],m=new St,y=[];m.id=d,m.isUpdating();let v=[];for(let e=0;e<r.length;e++)(0,mt.A)(y,r[e].ofTheConceptId),(0,mt.A)(f,r[e].ofTheConceptId),(0,mt.A)(f,r[e].toTheConceptId),v.push(r[e].ofTheConceptId);m.subcompositions=y,m.connections=r;for(let e=0;e<f.length;e++){const t=yield(0,Q.A)(f[e]);d==f[e]&&(s=t),u==f[e]&&(c=t),a.push(t)}const g=e.patchObject;for(const e in g){let t=(0,V.o)();const r=g[e];let d=s;if(c.id>0&&(d=c),Array.isArray(r)||"object"==typeof r){t=yield(0,Y.A)(e,"",!0,s.userId,4,999),m.subcompositions.push(t.id);const n=(0,yt.vo)(a,t);for(let e=0;e<n.length;e++)if(n[e].id>0){const t=(0,yt.wS)(m.connections,n[e].id);h=h.concat(t),l.push(n[e])}yield Nt(g[e],t.id,t.userId,s.id,s.userId,4,999,m)}else{t=yield(0,Y.A)(e,r,!1,n,i,o);const s=(0,yt.vo)(a,t);for(let e=0;e<s.length;e++)if(s[e].id>0){const t=(0,yt.wS)(m.connections,s[e].id);h=h.concat(t),l.push(s[e])}}const u=(0,ae.q)(d.id,d.userId,t.id,s.id);a.push(t),m.connections.push(u)}for(let e=0;e<h.length;e++)gt(m.connections,h[e]),(0,J.m)(h[e].id);for(let e=0;e<l.length;e++)vt(a,l[e]);m.concepts=m.concepts.concat(a),m.mainConcept=s,m.id=s.id,yield m.updateCache(),Tt.addCompositionToTree(m),j.Y.SyncDataOnline();let C=m.GetDataCache();return mo.V.logUpdate(t),C})}var Dt=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function Pt(e,t,n,o){return Dt(this,arguments,void 0,function*(e,t,n,o,i=10,r=1){var a=(0,h.ab)("application/x-www-form-urlencoded",o),s=new URLSearchParams;s.append("type",e),s.append("search",t),s.append("composition",n),s.append("inpage",i.toString()),s.append("page",r.toString());const c=u.B.SearchCompositionsUrl()+"?"+s.toString();try{const e=yield fetch(c,{method:"GET",headers:a});if(e.ok){return yield e.json()}return(0,p.ry)(e),[]}catch(e){(0,p.Mb)(e,c)}})}var Et=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function Rt(e){return Et(this,arguments,void 0,function*(e,t=""){var n=(0,h.ab)("application/json",t);const o=u.B.SearchLinkMultipleAll(),i=JSON.stringify(e);try{const e=yield fetch(o,{method:"POST",headers:n,body:i});if(e.ok){return yield e.json()}return(0,p.ry)(e),[]}catch(e){(0,p.Mb)(e,o)}})}var Ot=n(7139),Bt=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function Ft(e){return Bt(this,arguments,void 0,function*(e,t=[]){var n,o;let i=[];const r=[];let a={},s={};const c=yield Tt.getNodeFromTree(e),l=[];let u=yield d.I.GetConcept(e);if(0==u.id&&null!=e&&null!=e){u=yield(0,Ot.r)(e)}if(null==c){let c=[];c=t.length>0?Ut(e,t):yield(0,B.s)(e),i=c;for(let e=0;e<i.length;e++)l.includes(i[e].ofTheConceptId)||(l.push(i[e].ofTheConceptId),r.push(i[e].ofTheConceptId)),r.includes(i[e].toTheConceptId)||r.push(i[e].toTheConceptId);Wt(u,i,r,l);let d=[];s=yield(0,g.zN)(e,i,l,d);a[null!==(o=null===(n=null==u?void 0:u.type)||void 0===n?void 0:n.characterValue)&&void 0!==o?o:""]=s}else s=c.value.GetDataCache(),a=s;return 0==u.id?"":a})}function Ut(e,t){const n=[];for(let o=0;o<t.length;o++)t[o].typeId==e&&n.push(t[o]);return n}function Gt(e){return Bt(this,arguments,void 0,function*(e,t=[]){var n,o;let i={},r=[];const a=[];let s;const c={},l=yield Tt.getNodeFromTree(e),u=[];let h=yield d.I.GetConcept(e);if(0==h.id&&null!=e&&null!=e){h=yield(0,Ot.r)(e)}if(null==l){let l=[];l=t.length>0?Ut(e,t):yield(0,B.s)(e),r=l;for(let e=0;e<r.length;e++)u.includes(r[e].ofTheConceptId)||(u.push(r[e].ofTheConceptId),a.push(r[e].ofTheConceptId)),a.includes(r[e].toTheConceptId)||a.push(r[e].toTheConceptId);Wt(h,r,a,u),s=yield(0,g.zN)(e,r,u);c[null!==(o=null===(n=null==h?void 0:h.type)||void 0===n?void 0:n.characterValue)&&void 0!==o?o:""]=s,i.created_at=h.entryTimeStamp,i.data=c,i.id=e}else s=l.value.GetDataCache(),i=s;return 0==h.id?"":i})}function Mt(e,t){return Bt(this,void 0,void 0,function*(){let n=[];const o=[];n=yield(0,st.j)(t);for(let t=0;t<e.length;t++){const i=yield Gt(e[t],n);i&&o.push(i)}return o})}function Wt(e,t,n,o){return Bt(this,void 0,void 0,function*(){const i=new St,r=yield function(e){return Bt(this,void 0,void 0,function*(){let t=[];const n=[];for(let o=0;o<(null==e?void 0:e.length);o++){const i=yield d.I.GetConcept(e[o]);0==i.id?n.push(e[o]):t.push(i)}return 0==(null==n?void 0:n.length)||(t=yield(0,at.I)(n)),t})}(n);i.connections=t,i.concepts=r,i.id=e.id,i.subcompositions=o,i.mainConcept=e;const a=yield kt(e.id,t,r,o,[]);i.cached=a,Tt.addCompositionToTree(i)})}var jt=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function Vt(e){return jt(this,void 0,void 0,function*(){try{var t=(0,h.Xr)();const n=JSON.stringify(e),o=yield fetch(u.B.CreateSessionId(),{method:"POST",headers:t,body:n});return o.ok?o.json():((0,p.ry)(o),null)}catch(e){(0,p.Mb)(e,u.B.CreateSessionId())}})}var qt=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function Ht(e,t){return qt(this,void 0,void 0,function*(){try{var n=(0,h.Xr)("application/x-www-form-urlencoded");const o=new URLSearchParams;o.append("sessionId",e.toString()),o.append("url",t);const i=yield fetch(u.B.CreateSessionVisitUrl(),{method:"POST",headers:n,body:o});return i.ok?i.json():((0,p.ry)(i),null)}catch(e){(0,p.Mb)(e,u.B.CreateSessionVisitUrl())}})}var $t=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function zt(e,t,n){return $t(this,arguments,void 0,function*(e,t,n,o=10,i=1){let r=[];try{var a=new URLSearchParams;a.append("typeId",`${e}`),a.append("toTheConceptId",`${t}`),a.append("userId",`${n}`),a.append("inpage",`${o}`),a.append("page",`${i}`);var s=(0,h.Xr)("application/x-www-form-urlencoded");const c=yield fetch(u.B.GetAllConnectionsToConceptUrl(),{method:"POST",headers:s,body:a});return c.ok?r=yield c.json():(0,p.ry)(c),r}catch(e){throw Error,e}})}var Jt=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function Qt(e,t){var n=arguments;return Jt(this,arguments,void 0,function*(e,t,o=10,i=1,r=!1){const a=mo.V.logfunction("GetRelation",n)||{};if(rr){a.serviceWorker=!0;try{const n=yield fr("GetRelation",{id:e,relation:t,inpage:o,page:i,reverse:r});return mo.V.logUpdate(a),n.data}catch(e){(0,p.ey)(a,"GetRelation",e),Cr(e)}}let s=[],c=yield(0,Q.A)(e),l=yield(0,he.Az)(t),d=[];if(l.id>0)if(r){d=yield zt(l.id,c.id,c.userId,o,i);let e=[];for(var u=0;u<d.length;u++)e.push(d[u].ofTheConceptId);yield(0,y.Y)(e);for(let e=0;e<d.length;e++){let t=d[e].ofTheConceptId,n=yield(0,Q.A)(t),o=yield(0,g.Ez)(n.id);s.push(o)}}else{d=yield M(l.id,c.id,c.userId,o,i);let e=[];for(let t=0;t<d.length;t++)e.push(d[t].toTheConceptId);yield(0,y.Y)(e);for(let e=0;e<d.length;e++){let t=d[e].toTheConceptId,n=yield(0,Q.A)(t),o=yield(0,g.Ez)(n.id);s.push(o)}}return mo.V.logUpdate(a),s})}function Yt(e,t){return Jt(this,arguments,void 0,function*(e,t,n=10,o=1,i=!1){let r=new Vo;return r.conceptIds=[e],r.selectors=[t],r.outputFormat=_n.y0,r.inpage=n,r.page=o,r.limit=!0,yield Qo(r,"")})}function Xt(e,t){var n=arguments;return Jt(this,arguments,void 0,function*(e,t,o=10,i=1,r=!1){const a=mo.V.logfunction("GetRelationRaw",n)||{};if(rr){a.serviceWorker=!0;try{const n=yield fr("GetRelationRaw",{id:e,relation:t,inpage:o,page:i,reverse:r});return mo.V.logUpdate(a),n.data}catch(e){(0,p.ey)(a,"GetRelationRaw",e),Cr(e)}}let s=[],c=yield(0,Q.A)(e),l=yield(0,he.Az)(t),d=[],u=[];if(l.id>0){if(r){d=yield zt(l.id,c.id,c.userId,o,i);for(var h=0;h<d.length;h++)u.push(d[h].ofTheConceptId)}else{d=yield M(l.id,c.id,c.userId,o,i);for(let e=0;e<d.length;e++)u.push(d[e].toTheConceptId)}s=yield(0,at.r)(u)}return mo.V.logUpdate(a),s})}var Kt=n(6416),Zt=n(4711);class en{constructor(e,t,n,o){this.value=[],this.height=1,this.key=e,this.value.push(t),this.leftNode=n,this.rightNode=o}addNode(e,t,n){if(null==t)return t=e;var o=t.leftNode,i=t.rightNode;if(t.key>e.key)t.leftNode=this.addNode(e,o,n);else{if(!(t.key<e.key))return t.value.push(...e.value),t;t.rightNode=this.addNode(e,i,n)}t.height=1+Math.max(this.getHeight(t.leftNode),this.getHeight(t.rightNode));let r=this.getBalanceFactor(t);if(r>1&&t.leftNode){if(e.key<t.leftNode.key)return this.rightRotate(t);if(e.key>t.leftNode.key)return t.leftNode=this.leftRotate(t.leftNode),this.rightRotate(t)}if(r<-1&&t.rightNode){if(e.key>t.rightNode.key)return this.leftRotate(t);if(e.key<t.rightNode.key)return t.rightNode=this.rightRotate(t.rightNode),this.leftRotate(t)}return t}rightRotate(e){if(e){let t=e.leftNode;if(t){let n=t.rightNode;return e.leftNode=n,t.rightNode=e,e.height=Math.max(this.getHeight(e.leftNode),this.getHeight(e.rightNode))+1,t.height=Math.max(this.getHeight(t.leftNode),this.getHeight(t.rightNode))+1,t}}return e}leftRotate(e){if(e){let t=e.rightNode;if(t){let n=t.leftNode;return t.leftNode=e,e.rightNode=n,e.height=Math.max(this.getHeight(e.leftNode),this.getHeight(e.rightNode))+1,t.height=Math.max(this.getHeight(t.leftNode),this.getHeight(e.rightNode))+1,t}}return e}getHeight(e){return e?e.height:0}getBalanceFactor(e){return null==e?0:this.getHeight(e.leftNode)-this.getHeight(e.rightNode)}getFromNode(e,t){return t?e==t.key?t:e<t.key?this.getFromNode(e,t.leftNode):e>t.key?this.getFromNode(e,t.rightNode):t:t}removeNode(e,t){if(null==e)return e;if(e.key>t)return e.leftNode=this.removeNode(e.leftNode,t),e;if(e.key<t)return e.rightNode=this.removeNode(e.rightNode,t),e;if(null==e.leftNode){let t=e.rightNode;return e=null,t}if(null==e.rightNode){let t=e.leftNode;return e=null,t}var n=this.inOrderSuccessor(e.rightNode);return e.value=n.value,e.key=n.key,e.rightNode=this.removeNode(e.rightNode,n.key),e}countNodeBelow(e){return null==e?0:1+this.countNodeBelow(e.leftNode)+this.countNodeBelow(e.rightNode)}inOrderSuccessor(e){for(;null!=e.leftNode;)e=e.leftNode;return e}}var tn=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class nn{static compositeKey(e,t){return("0000"+e.toString(16).toUpperCase()).slice(-4)+("0000"+t.toString(16).toUpperCase()).slice(-4)}static addNodeToTree(e){if(null==this.root)return this.root=e,this.root;this.root=this.root.addNode(e,this.root,this.root.height)}static waitForDataToLoad(){return tn(this,void 0,void 0,function*(){return new Promise((e,t)=>{this.checkFlag(e),setTimeout(()=>{t("not")},25e3)})})}static checkFlag(e){if(s.B.isDataLoaded)return e("done");setTimeout(nn.checkFlag,1e3,e)}static addConceptToTree(e,t,n=999){let o=this.compositeKey(t,n);var i=new en(o,e,null,null);this.addNodeToTree(i)}static getNodeFromTree(e,t){return tn(this,void 0,void 0,function*(){let n=this.compositeKey(e,t);return this.root?this.root.getFromNode(n,this.root):null})}static removeNodeFromTree(e){return tn(this,arguments,void 0,function*(e,t=999){if(this.root){let n=this.compositeKey(e,t);this.root=this.root.removeNode(this.root,n)}})}static countNumberOfNodes(){return this.root?this.root.countNodeBelow(this.root):0}}nn.root=null;var on=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function rn(e,t){return on(this,arguments,void 0,function*(e,t,n=999){let o=yield nn.getNodeFromTree(e,n),i=(0,Kt.u)();if(o)for(let e=0;e<o.value.length;e++){let n=o.value[e];n.ghostId==t&&(i=n)}return i})}function an(e,t){return on(this,arguments,void 0,function*(e,t,n=999){nn.addConceptToTree(e,t,n)})}var sn=n(5312),cn=n(1213),ln=n(3729),dn=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};var un=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function hn(e,t,n){return un(this,void 0,void 0,function*(){try{if(rr)try{return(yield fr("GetRelationLocal",{id:e,relation:t,userId:n})).data}catch(e){Cr(e)}let o=yield(0,w.$I)(t),i=[];0!=o.id&&(i=yield function(e,t){return dn(this,void 0,void 0,function*(){try{return yield L.G.GetConnectionOfCompositionAndTypeLocal(t,e)}catch(e){throw e}})}(e,o.id));let r=[];for(let e=0;e<i.length;e++){let t=yield x(i[e].toTheConceptId);r.push(t)}return r}catch(e){throw e}})}var pn=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function fn(e){return pn(this,void 0,void 0,function*(){let t=[];try{var n=(0,h.Xr)();const o=yield fetch(u.B.ViewInternalDataUrl(),{method:"POST",headers:n,body:JSON.stringify(e)});if(o.ok){let e=yield o.json(),n={};for(let o=0;o<e.length;o++){let i=e[o].concepts;t=e[o].connections;let r=e[o].id;(0,at.r)(i),n[r]=t}return n}return(0,p.ry)(o),t}catch(e){throw Error,e}})}var mn=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function yn(e){return mn(this,void 0,void 0,function*(){var t;try{let n=yield fn(e),o=[];for(let i=0;i<e.length;i++){let r=e[i],a=n[r];if(r&&a){let e=[],t={};for(let t=0;t<a.length;t++)e.includes(a[t].ofTheConceptId)||e.push(a[t].ofTheConceptId);let n=yield(0,g.zN)(r,a,e);t.data=n,t.id=r,o.push(t)}else{let e={};e.id=r;let n=yield(0,Q.A)(r),i={};n.type&&(i[null===(t=null==n?void 0:n.type)||void 0===t?void 0:t.characterValue]=n.characterValue,e.data=i,o.push(e))}}return o}catch(e){throw e}})}var vn=n(176),gn=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};var Cn=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function wn(e){return Cn(this,arguments,void 0,function*(e,t=""){try{let n=yield function(e){return gn(this,arguments,void 0,function*(e,t=""){var n=(0,h.ab)("application/json",t);let o=u.B.SearchInternalWithAuthenticatedCcsUrl();o=o+"?composition="+e.composition+"&search="+e.search+"&internalComposition="+e.internalComposition+"&type="+e.type+"&inpage="+e.inpage+"&page="+e.page;try{const e=yield fetch(o,{method:"GET",headers:n});return e.ok?yield e.json():((0,p.ry)(e),[])}catch(e){(0,p.Mb)(e,o)}})}(e,t);return yield yn(n)}catch(e){throw e}})}function Tn(e){return Cn(this,arguments,void 0,function*(e,t=""){try{return yield function(e){return gn(this,void 0,void 0,function*(){var t=(0,h.ab)("application/json","");let n=u.B.SearchInternalWithCcsUrl();n=n+"?composition="+e.composition+"&search="+e.search+"&internalComposition="+e.internalComposition+"&type="+e.type+"&inpage="+e.inpage+"&page="+e.page;try{const e=yield fetch(n,{method:"GET",headers:t});return e.ok?yield e.json():((0,p.ry)(e),[])}catch(e){(0,p.Mb)(e,n)}})}(e)}catch(e){throw e}})}var In=n(8095),kn=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function bn(e){return kn(this,void 0,void 0,function*(){if(rr)try{return(yield fr("DeleteConceptLocal",{id:e})).data}catch(e){Cr(e)}let t=yield(0,cn.f)(e);v.v.RemoveConcept(t)})}var An=n(2803),Sn=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function Ln(e,t,n,o){return Sn(this,arguments,void 0,function*(e,t,n,o,i=!0){var r,a;const s=mo.V.logfunction("GetConnectionBetweenTwoConceptsLinker")||{};if(rr){s.serviceWorker=!0;try{const r=yield fr("GetConnectionBetweenTwoConceptsLinker",{ofTheConcept:e,toTheConcept:t,linker:n,fullLinker:o,forward:i});return mo.V.logUpdate(s),r.data}catch(e){(0,p.ey)(s,"GetConnectionBetweenTwoConceptsLinker",e),Cr(e)}}let c=(0,V.o)();if(""!=n){let o="";if(i){o=(null===(r=e.type)||void 0===r?void 0:r.characterValue)+"_s"+"_"+(n+"_s")}else{o=(null===(a=t.type)||void 0===a?void 0:a.characterValue)+"_s"+"_"+(n+"_by")}c=yield(0,Y.A)("connection",o,!1,999)}""!=o&&(c=yield me(o,999));let l=[];return l=i?yield(0,An.x)(e.id,t.id,c.id):yield(0,An.x)(t.id,e.id,c.id),mo.V.logUpdate(s),l})}function Nn(e,t){return new Promise((n,o)=>{setTimeout(()=>{n(t)},e)})}var _n=n(3130);const xn=3,Dn=4,Pn=5;var En=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function Rn(e,t){return En(this,arguments,void 0,function*(e,t,n=""){let o=u.B.SearchAllTypeWithLinker(e.auth);var i=(0,h.ab)("application/json",n);o=o+"?search="+e.search+"&type="+e.type+"&inpage="+e.inpage+"&page="+e.page;const r=JSON.stringify(t);try{const e=yield fetch(o,{method:"POST",headers:i,body:r});if(e.ok){return yield e.json()}return(0,p.ry)(e),[]}catch(e){(0,p.Mb)(e,o)}})}var On=n(4287),Bn=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class Fn extends On.w{constructor(e,t,n=_n.y0){super(),this.searchQuery=[],this.format=_n.y0,this.searchQuery=e,this.format=n}bind(){return Bn(this,void 0,void 0,function*(){return this.data=yield(0,sn.cf)(this.searchQuery,"",this,this.format),this.mainConcept=this.searchQuery[0].composition,this.listenToEvent(this.mainConcept),this.data})}}function Un(e,t,n=_n.y0){return new Fn(e,null!=t?t:"",n)}var Gn=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class Mn extends On.w{constructor(e,t=_n.ZJ){super(),this.id=e,this.format=t}bind(){return Gn(this,void 0,void 0,function*(){if(!this.isDataLoaded){let e=yield(0,g.hL)(this.id);this.mainConcept=this.id,this.compositionIds=e.compositionList;let t=e.connectionList;for(let e=0;e<t.length;e++)this.internalConnections.push(t[e].id);this.isDataLoaded=!0,this.listenToEvent(this.mainConcept)}return yield this.build()})}build(){return Gn(this,void 0,void 0,function*(){let e=[],t=this.internalConnections;for(let n=0;n<t.length;n++)e.push(yield Ee.d.GetConnection(t[n]));return this.format==_n.ZJ?this.data=yield(0,g.ay)(this.mainConcept,e,this.compositionIds):this.format==_n.y0?this.data=yield(0,g.$V)(this.mainConcept,e,this.compositionIds):this.format==_n.yv?this.data=yield(0,g.re)(this.mainConcept,e,this.compositionIds):this.data=yield(0,g.ay)(this.mainConcept,e,this.compositionIds),this.data})}}function Wn(e,t=_n.ZJ){return new Mn(e,t)}var jn=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class Vn extends On.w{constructor(e,t,n,o,i){super(),this.data=[],this.startPage=0,this.compositionName=e,this.userId=t,this.inpage=n,this.page=o,this.format=i}bind(){return jn(this,void 0,void 0,function*(){if(!this.isDataLoaded){var e=yield(0,C.A)(this.compositionName);if(e){yield m(this.compositionName,this.userId);let o=yield d.I.GetConceptsByTypeIdAndUser(e.id,this.userId);for(var t=this.inpage*(this.page-1),n=t;n<t+this.inpage;n++)o[n]&&this.compositionIds.push(o[n].id)}yield(0,y.Y)(this.compositionIds),this.isDataLoaded=!0,this.listenToEventType(e.id);for(let e=0;e<this.compositionIds.length;e++)this.listenToEvent(this.compositionIds[e])}return yield this.build()})}build(){return jn(this,void 0,void 0,function*(){if(this.data=[],this.format==_n.ZJ){for(let e=this.startPage;e<this.startPage+this.inpage;e++)if(this.compositionIds[e]){let t=yield(0,g.kx)(this.compositionIds[e]);this.data.push(t)}}else if(this.format==_n.y0){for(let e=this.startPage;e<this.startPage+this.inpage;e++)if(this.compositionIds[e]){let t=yield(0,g.RW)(this.compositionIds[e]);this.data.push(t)}}else if(this.format==_n.yv){for(let e=this.startPage;e<this.startPage+this.inpage;e++)if(this.compositionIds[e]){let t=yield(0,g.XI)(this.compositionIds[e]);this.data.push(t)}}else for(let e=this.startPage;e<this.startPage+this.inpage;e++)if(this.compositionIds[e]){let t=yield(0,g.kx)(this.compositionIds[e]);this.data.push(t)}return this.data})}}function qn(e,t,n,o,i=_n.ZJ){return new Vn(e,t,n,o,i)}var Hn=n(1320),$n=n(5328),zn=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class Jn extends On.w{constructor(e,t,n="",o){super(),this.searchText="",this.connections=[],this.externalConnectionIds=[],this.data=[],this.mainConcept=e,this.searchLinkers=t,this.textSearch=n,o&&(this.format=o)}listenToEvent(e){if(this.eventHandlers[e])return;const t=t=>zn(this,void 0,void 0,function*(){if(!this.isUpdating){this.isUpdating=!0;let t=this;setTimeout(function(){return zn(this,void 0,void 0,function*(){try{let n=yield Ee.d.GetConnectionByOfTheConceptAndType(e,e);for(let e=0;e<n.length;e++)yield Ee.d.GetConnection(n[e]).then(e=>{e.typeId==t.mainConcept?t.internalConnections.includes(e.id)||t.internalConnections.push(e.id):t.linkers.includes(e.id)||t.linkers.push(e.id),t.conceptIds.includes(e.toTheConceptId)||t.conceptIds.push(e.toTheConceptId),t.compositionIds.includes(e.ofTheConceptId)||t.compositionIds.push(e.ofTheConceptId),t.compositionIds.includes(e.toTheConceptId)||t.compositionIds.push(e.toTheConceptId)});t.isUpdating=!1,yield t.bind(),t.notify()}catch(e){throw t.isUpdating=!1,e}})},200)}});this.eventHandlers[e]=t,window.addEventListener(`${e}`,t)}bind(){return zn(this,void 0,void 0,function*(){if(!this.isDataLoaded){this.isDataLoaded=!0;const e=yield Qe(this.mainConcept,this.searchLinkers,this.textSearch);this.compositionIds=e.compositionIds||[],this.internalConnections=e.internalConnections||[],this.externalConnectionIds=e.externalConnections||[],this.linkers=this.externalConnectionIds,this.connections=yield(0,st.j)(this.externalConnectionIds);for(let e=0;e<this.compositionIds.length;e++)this.listenToEvent(this.compositionIds[e]);this.listenToEvent(this.mainConcept)}return yield this.build()})}build(){return zn(this,void 0,void 0,function*(){return this.externalConnectionIds=this.linkers,this.format&&this.format==_n.XZ?this.data={compositionIds:this.compositionIds,internalConnections:this.internalConnections,externalConnections:this.externalConnectionIds}:this.data=yield(0,He.p8)(this.compositionIds,this.internalConnections),this.data})}}function Qn(e,t,n="",o){return new Jn(e,t,n,o)}var Yn=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class Xn extends On.w{constructor(e,t,n,o=_n.y0){super(),this.searchQuery=[],this.format=_n.y0,this.mainCompositionIds=[],this.searchCharacter="",this.token="",this.searchStructure=e,this.searchQuery=t,this.searchQuery[0].type=e.composition,this.searchCharacter=e.composition,this.format=o,this.token=Oe.b.BearerAccessToken}listenToEventType(e){if(this.eventHandlers[e])return;const t=e=>Yn(this,void 0,void 0,function*(){if(!this.isUpdating){this.isUpdating=!0;let t=this;setTimeout(function(){return Yn(this,void 0,void 0,function*(){try{let n=e;t.mainCompositionIds.includes(null==n?void 0:n.detail)||(t.mainCompositionIds.unshift(null==n?void 0:n.detail),t.conceptIds.push(null==n?void 0:n.detail),t.listenToEvent(null==n?void 0:n.detail),Ee.d.GetConnectionsOfConcept(null==n?void 0:n.detail).then(e=>{for(let n=0;n<e.length;n++)t.linkers.push(e[n].id)})),t.isUpdating=!1,yield t.bind(),t.notify()}catch(e){throw t.isUpdating=!1,e}})},200)}});this.eventHandlers[e]=t,window.addEventListener(`${e}`,t)}bind(){return Yn(this,void 0,void 0,function*(){if(!this.isDataLoaded){this.isDataLoaded=!0;var e=yield(0,C.A)(this.searchCharacter);let t=yield Rn(this.searchStructure,this.searchQuery,this.token);this.conceptIds=t.compositionIds,this.internalConnections=t.internalConnections,this.linkers=t.linkers,this.reverse=t.reverse,this.mainCompositionIds=t.mainCompositionIds,this.listenToEventType(e.id);for(let e=0;e<this.mainCompositionIds.length;e++)this.listenToEvent(this.mainCompositionIds[e])}return yield this.build()})}build(){return Yn(this,void 0,void 0,function*(){return yield(0,at.r)(this.conceptIds),this.format==_n.y0?this.data=yield(0,Hn.yV)(this.linkers,this.conceptIds,this.internalConnections,this.mainCompositionIds,this.reverse):this.data=yield(0,Hn._W)(this.linkers,this.conceptIds,this.internalConnections,this.mainCompositionIds,this.reverse),this.data})}}function Kn(e,t,n,o=_n.y0){return new Xn(e,t,n,o)}var Zn=n(4698),eo=n(6915),to=n(2615);class no{constructor(e,t,n,o,i,r,a,s=!1,c,l,d){this.structureType="lconcept",this.isComposition=!1,this.isTemp=!1,this.isSynced=!1,this.applicationId=u.B.getRandomizer(),this.id=e,this.userId=t,this.typeId=n,this.ghostId=e,this.categoryId=o,this.characterValue=r,this.accessId=i,this.type=null,this.isNew=s,this.typeCharacter=a,this.entryTimeStamp=c,this.updatedTimeStamp=l,this.isSynced=!1,this.referentId=d}getType(){}}class oo{constructor(e,t,n,o,i,r){this.isTemp=!1,this.applicationId=u.B.getRandomizer(),this.type=(0,V.o)(),this.id=e,this.ofTheConceptId=t,this.toTheConceptId=n,this.typeId=o,this.ghostId=e,this.orderId=i,this.typeCharacter="",this.accessId=r,this.typeCharacter="",this.entryTimeStamp=(0,V.Y)(new Date),this.terminationDateTime=new Date,this.localSyncTime=new Date}}class io{constructor(){this.compositionId=0,this.userId=999,this.sessionId=999,this.accessId=4,this.ofTheCompositionId=0,this.patchObject={}}}class ro{constructor(){this.id="0",this.remote_address="",this.server_port="",this.server_address="",this.server_name="",this.server_software="",this.http_user_agent="",this.self="",this.port="",this.userId="",this.email=""}}var ao=n(628);class so{constructor(){this.type="",this.search="",this.logicoperator="=",this.index=0,this.composition=!0,this.name="",this.operateon=""}}class co{constructor(){this.type="",this.search="",this.composition="",this.internalComposition="",this.userId=999,this.inpage=10,this.page=1,this.auth=!0}}var lo=n(7887),uo=n(3075),ho=n(7869),po=n(2170),fo=n(9635),mo=n(9700),yo=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class vo{static initialize(){try{this.initGlobalErrorHandlers(),this.logCatchError(),this.logErrorEvent(),this.logUnhandledError(),this.logUserInteractions(),this.logNetworkRequests(),this.logRouteChanges()}catch(e){}}static initGlobalErrorHandlers(){try{if(void 0===typeof window)return;window.onerror=(e,t,n,o,i)=>{const r=Oe.b.sessionId||"unknown",a={message:e,source:t,lineno:n,colno:o,stack:(null==i?void 0:i.stack)||"undefined",requestFrom:u.B.BASE_APPLICATION,sessionId:r};mo.V.logApplication("ERROR","Runtime Error",a),mo.V.log("ERROR","Runtime Error",a)},window.onunhandledrejection=e=>{const t=Oe.b.sessionId||"unknown";mo.V.logApplication("ERROR","Unhandled Promise Rejection",{message:e.reason?e.reason.message:e.reason,stack:e.reason?e.reason.stack:null,requestFrom:u.B.BASE_APPLICATION,sessionId:t}),mo.V.log("ERROR","Unhandled Promise Rejection",{message:e.reason?e.reason.message:e.reason,stack:e.reason?e.reason.stack:null,requestFrom:u.B.BASE_APPLICATION,sessionId:t})}}catch(e){}}static logCatchError(){try{const e=console.error;console.error=function(...t){if("Intercepted Fetch Error:"==(null==t?void 0:t[0]))return;const n="Console Error",o=Oe.b.sessionId||"unknown",i={arguments:t.map(e=>go(e)),requestFrom:u.B.BASE_APPLICATION,sessionId:o};mo.V.logApplication("ERROR",n,i),mo.V.log("ERROR",n,i),e.apply(console,t)}}catch(e){}}static logErrorEvent(){try{window.addEventListener("error",e=>{var t;const n=Oe.b.sessionId||"unknown",o={error:(null===(t=e.error)||void 0===t?void 0:t.message)||e.message,source:e.filename,line:e.lineno,column:e.colno,stack:e.error?go(e.error.stack):void 0,requestFrom:u.B.BASE_APPLICATION,sessionId:n},i="Unhandled Error";mo.V.logApplication("ERROR",i,o),mo.V.log("ERROR",i,o)})}catch(e){}}static logUnhandledError(){try{window.addEventListener("unhandledrejection",e=>{var t,n;const o=Oe.b.sessionId||"unknown",i={reason:(null===(t=e.reason)||void 0===t?void 0:t.message)||String(e.reason),stack:(null===(n=e.reason)||void 0===n?void 0:n.stack)||"No stack trace available",requestFrom:u.B.BASE_APPLICATION,sessionId:o};mo.V.logApplication("ERROR","Unhandled Promise Rejection",i),mo.V.log("ERROR","Unhandled Promise Rejection",i)})}catch(e){}}static logUserInteractions(){document.addEventListener("click",e=>{var t;const n=Oe.b.sessionId||"unknown",o=e.target,i={element:o.tagName,id:o.id,classes:o.className,text:null===(t=o.innerText)||void 0===t?void 0:t.slice(0,50),requestFrom:u.B.BASE_APPLICATION,sessionId:n};mo.V.logApplication("INFO","User Click",i)}),document.addEventListener("input",e=>{const t=e.target;Oe.b.sessionId,t.tagName,t.id,t.value,u.B.BASE_APPLICATION}),document.addEventListener("scroll",()=>{Oe.b.sessionId,window.scrollY,u.B.BASE_APPLICATION})}static logNetworkRequests(){try{if(void 0===typeof window)return;Oe.b.sessionId;const e=null===window||void 0===window?void 0:window.fetch;if(!e)throw new Error("Original fetch is not available.");const t=[u.B.PostLogger(),u.B.PostPrefetchConceptConnections()];window.fetch=(...n)=>yo(this,void 0,void 0,function*(){const o=Oe.b.sessionId||"unknown",[i,r]=n,a=i instanceof Request?i.url:i instanceof URL?i.toString():i;if(t.includes(a)){return e(...n)}let s={request:{type:"REQUEST",message:"Network Request",method:(null==r?void 0:r.method)||"GET",url:a,body:null==r?void 0:r.body,requestFrom:u.B.BASE_APPLICATION,sessionId:o}};try{const t=yield e(...n);return s.response={type:"RESPONSE",message:"Network Response",url:a,status:t.status,requestFrom:u.B.BASE_APPLICATION,sessionId:o},t}catch(e){throw s.response={type:"ERROR",message:"Network Request Failed",url:a,error:e instanceof Error?e.message:String(e),requestFrom:u.B.BASE_APPLICATION,sessionId:o},mo.V.logApplication("ERROR","Failed Network Request",s),new Error(`Network request failed for ${a}: ${e.message}`)}})}catch(e){}}static logPerformanceMetrics(){void 0!==typeof window&&(null===window||void 0===window||window.addEventListener("load",()=>{const e=performance.timing;Oe.b.sessionId,e.loadEventEnd,e.navigationStart,e.domContentLoadedEventEnd,e.navigationStart,u.B.BASE_APPLICATION}))}static logRouteChanges(){const e=history.pushState;setTimeout(()=>{vo.logOnWindowLoad()},3e3),history.pushState=function(...t){const n=Oe.b.sessionId||"unknown",o={url:t[2]?new URL(t[2],location.origin).href:location.href,requestFrom:u.B.BASE_APPLICATION,sessionId:n};return mo.V.logApplication("ROUTE","Route Change",o),e.apply(this,t)},null===window||void 0===window||window.addEventListener("beforeunload",()=>{const e=Oe.b.sessionId||"unknown",t={url:location.href,requestFrom:u.B.BASE_APPLICATION,sessionId:e};mo.V.logApplication("ROUTE","Unload",t)}),null===window||void 0===window||window.addEventListener("popstate",()=>{const e=Oe.b.sessionId||"unknown",t={url:location.href,requestFrom:u.B.BASE_APPLICATION,sessionId:e};mo.V.logApplication("ROUTE","Route Changed (Back/Forward)",t)})}static logOnWindowLoad(){const e=Oe.b.sessionId||"unknown",t={url:location.href,requestFrom:u.B.BASE_APPLICATION,sessionId:e};mo.V.logApplication("ROUTE","Initial Load",t)}static logSample(){const e=Oe.b.sessionId||"unknown",t={url:location.href,requestFrom:u.B.BASE_APPLICATION,sessionId:e};mo.V.logApplication("ROUTE","Sample",t)}static logWebSocketEvents(){if(void 0===typeof window)return;const e=Oe.b.sessionId||"unknown",t=WebSocket;window.WebSocket=class extends t{constructor(t,n){super(t,n);const o={url:t.toString(),requestFrom:u.B.BASE_APPLICATION,sessionId:e};mo.V.logApplication("INFO","WebSocket Open",o),this.addEventListener("message",e=>{const n=Oe.b.sessionId||"unknown",o={url:t,data:e.data,requestFrom:u.B.BASE_APPLICATION,sessionId:n};mo.V.logApplication("INFO","WebSocket Message",o)}),this.addEventListener("error",e=>{const n=Oe.b.sessionId||"unknown",o={url:t,error:e instanceof Error?e.message:String(e),requestFrom:u.B.BASE_APPLICATION,sessionId:n};mo.V.logApplication("ERROR","WebSocket Error",o)}),this.addEventListener("close",()=>{const e=Oe.b.sessionId||"unknown",n={url:t,requestFrom:u.B.BASE_APPLICATION,sessionId:e};mo.V.logApplication("INFO","WebSocket Closed",n)})}}}}function go(e){try{return JSON.stringify(e,(e,t)=>t&&"object"==typeof t&&t instanceof Error?{message:t.message,stack:t.stack}:t)}catch(e){return"Error while serializing value"}}var Co=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};const wo=(e,t,...n)=>Co(void 0,[e,t,...n],void 0,function*(e,t,n=!1){try{let o=u.B.sendMail();n&&(o=u.B.sendBulkMail());const i=yield fetch(o,{method:"POST",body:e instanceof FormData?e:JSON.stringify(e),headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}}),r=i.headers.get("content-type");if(!i.ok){yield i.json();return null}const a=yield i.json();return r&&r.includes("text/plain")?yield i.text():a}catch(e){return null}});class To{constructor(){this.inDevelopment=!1,this.subscribers=[]}notify(e=null){this.subscribers.map(t=>{t(e||this.data)})}dataChange(e){this.subscribers.push(e)}}class Io extends To{constructor(){super(...arguments),this.element=null,this.elementIdentifier=0,this.widgetMounted=!1}getComponent(){return this.element}getElementById(e){let t=this.getComponent(),n=document.body;if(t){let o=t.querySelector("#"+e);if(o)return n=o,n}return null}createWidgetWrapperIdentifier(){return this.elementIdentifier=1e4*Math.random(),this.elementIdentifier.toString()}}var ko=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class bo extends Io{constructor(){super(...arguments),this.html="",this.css="",this.js="",this.state={},this.previousState={},this.childWidgets=[],this.childWidgetElement=[],this.widgetState={},this.parentElement=""}querySelector(e){return this.element?this.element.querySelector(e):null}querySelectorAll(e){return this.element?this.element.querySelectorAll(e):null}getElement(){return this.element}setTitle(e){document.title=e}getHtml(){return this.html}UpdateChildData(e,t){let n=t;n.data=e,n.render(),n.update()}update(){}setState(e){this.previousState=Object.assign({},this),this.data=e,this.state=Object.assign({},this),this.hasStateChanged()&&(this.notify(),this.render())}setStateProperty(e){this.previousState=Object.assign({},this),Object.assign(this,e),this.state=Object.assign({},this),this.hasStateChanged()&&(this.notify(),this.render())}hasStateChanged(){return!this.isPropertyEqual(this.state,this.previousState)}isPropertyEqual(e,t){if(e===t)return!0;if("object"!=typeof e||"object"!=typeof t||null===e||null===t)return!1;const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(let i of n){if(!o.includes(i))return!1;for(let n of o)if(i==n&&"state"!=i&&"previousState"!=i){if(e[i]!=t[i])return!1}}return!0}loadChildWidgets(){this.childWidgets.map(e=>{let t=this.getElementById(e.parentElement);t&&(t.innerHTML=""),e.mount(t)})}render(){this.element&&(this.element.innerHTML=this.getHtml()),this.loadChildWidgets(),this.after_render()}getElementByClassName(e){let t=this.getComponent();if(t){return null==t?void 0:t.querySelectorAll("."+e)}return[]}mount_child(){}mount(e){return ko(this,void 0,void 0,function*(){e&&(this.element=document.createElement("div"),this.element.id=this.createWidgetWrapperIdentifier(),this.element.innerHTML=this.getHtml(),this.element.classList.add("mftsccs-marking-rendered"),e.appendChild(this.element),this.parentElement=e.id,this.before_render(),this.mount_child(),this.widgetMounted=!0)})}before_render(){this.render()}after_render(){}renderChildWidgets(){function e(t){var n;t&&(null===(n=t.childWidgets)||void 0===n||n.forEach(t=>{e(t)}),t.render())}this.childWidgets.forEach(t=>{e(t)})}setWidgetState(e,t){this.widgetState[e]=t,function e(t){t&&Array.isArray(t.childWidgets)&&t.childWidgets.forEach(n=>{n.widgetState=Object.assign(Object.assign({},n.widgetState),t.widgetState),e(n)})}(this),this.renderChildWidgets()}getWidgetState(e,t){return Object.keys.length&&this.widgetState[e]?this.widgetState[e]:t}}var Ao=n(490),So=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class Lo extends bo{constructor(){super(...arguments),this.childComponents=[],this.componentMounted=!1,this.oldHtml=null,this.phonebooks=[],this.childrenData={},this.childWidgets=[],this.typeValueList=[],this.widgetType="the_element_name",this.parentConceptList=[],this.customFunctions=[],this.widgetDependenciesData=""}getUserId(){return(0,Ao.s)().userId}getTypeValueList(){return So(this,arguments,void 0,function*(e=""){return new Promise(t=>So(this,void 0,void 0,function*(){const n=null==(e=this.widgetType)?void 0:e.match(/^[a-z0-9]+_[a-z0-9]+/i),o=n?n[0]:"",i=null==e?void 0:e.match(/^([a-z0-9]+).*_([a-z0-9]+)$/i),r=i?`${i[1]}_${i[2]}`:"";let a=[],s=new so;s.type=r,s.search="1",s.logicoperator=">",s.name="emailfilter",s.operateon="entityEmail",s.composition=!1,a.push(s);let c=new Vo;c.typeConnection=e,c.name="entityEmail";let l=new Vo;l.type=o,l.filterLogic="( emailfilter )",l.filters=a,l.name="top",l.inpage=100,l.freeschemaQueries=[c],l.outputFormat=_n.y0,Jo(l,"").subscribe(n=>{if(null==n?void 0:n.length){const i=null==n?void 0:n.map(t=>{var n,i,a,s,c,l,d;const u=null===(s=null===(a=null===(i=null===(n=t.data)||void 0===n?void 0:n[o])||void 0===i?void 0:i[e])||void 0===a?void 0:a.data)||void 0===s?void 0:s[r];return{id:null===(d=null===(l=null===(c=t.data)||void 0===c?void 0:c[o])||void 0===l?void 0:l[e])||void 0===d?void 0:d.id,name:u,text:u}});return this.typeValueList=i,t(i),i}})}))})}setTitle(e){document.title=e}getHtml(){return this.html}createRandomNumber(){return this.elementIdentifier=1e4*Math.random(),this.elementIdentifier}mount_child(){return So(this,void 0,void 0,function*(){try{new Function("tsccs",`\n return (async function() {\n ${this.mountChildWidgetsFunction}\n }).call(this);\n `).bind(this)(o)}catch(e){throw e}})}setProperty(e){return So(this,void 0,void 0,function*(){return this.widgetType=e,this.getTypeValueList(this.widgetType).then(()=>{var e,t,n;null===(e=this.element)||void 0===e||e.setAttribute("data-type-value",this.widgetType),null===(n=null===(t=this.element)||void 0===t?void 0:t.parentElement)||void 0===n||n.setAttribute("data-type-value",this.widgetType),this.render()}),this})}createTypeEditor(e){!function(e,t){if(e){const n=document.querySelector("#widget-properties #widget-type"),o=null==n?void 0:n.querySelectorAll("input");null==o||o.forEach(e=>{null==e||e.remove()});const i=e.target.closest(".added-widget-container"),r=e.target.closest("div");let a="";i?a=null==i?void 0:i.getAttribute("data-type-value"):r&&(a=null==r?void 0:r.getAttribute("data-type-value"));const s=document.createElement("input");s.setAttribute("type","text"),s.setAttribute("name","input-widgetTypeValue"),s.setAttribute("of",t.elementIdentifier.toString()),s.setAttribute("class","form-control"),s.setAttribute("id","widgetType"),s.setAttribute("onchange","updateWidgetTypeValue(event)"),t.widgetType?s.value=t.widgetType:s.setAttribute("placeholder","e.g. the_entity");let c=t;s.addEventListener("change",function(e){var t,n,o;const i=null===(t=null==e?void 0:e.target)||void 0===t?void 0:t.value;c.widgetType=i,c.before_render(),c.loadChildWidgets(),null===(o=null===(n=c.element)||void 0===n?void 0:n.parentElement)||void 0===o||o.setAttribute("data-type-value",c.widgetType)}),null==n||n.appendChild(s)}}(e,this)}mount(e){return So(this,void 0,void 0,function*(){if(e){this.element=document.createElement("div"),this.element.id=this.createWidgetWrapperIdentifier();let t=this;this.inDevelopment?(this.element.onclick=function(e){e.preventDefault(),t.createTypeEditor(e)},this.element.className="mftsccs-marking-element"):this.element.classList.add("mftsccs-marking-rendered"),this.element.innerHTML=this.getHtml(),null==e||e.setAttribute("data-type-value",t.widgetType),e.appendChild(this.element),this.parentElement=e.id,0==this.componentMounted||0==this.widgetMounted?(this.render_custom_functions(),this.render_widgetDependencies(),this.before_render(),this.mount_child(),this.widgetMounted=!0,this.componentMounted=!0):this.render(),this.childWidgetElement=this.getElementByClassName("added-widget-container")}})}render_widgetDependencies(){try{new Function("tsccs",`\n return (async function() {\n ${this.widgetDependenciesData}\n }).call(this);\n `).bind(this)(o)}catch(e){throw e}}render_custom_functions(){var e;const t=null===(e=this.customFunctions)||void 0===e?void 0:e.map(e=>null==e?void 0:e.code).join("");try{new Function("tsccs",`\n return (async function() {\n ${t}\n }).call(this);\n `).bind(this)(o)}catch(e){throw e}}before_render(){try{new Function("tsccs",`\n return (async function() {\n ${this.componentDidMountFunction}\n }).call(this);\n `).bind(this)(o)}catch(e){throw e}}after_render(){try{new Function("tsccs",`\n return (async function() {\n ${this.addEventFunction}\n }).call(this);\n `).bind(this)(o)}catch(e){throw e}}CreateConnectionBetweenEntityLocal(e,t,n){return So(this,void 0,void 0,function*(){var o;const i=e.userId,r=(null===(o=e.type)||void 0===o?void 0:o.characterValue)+"_"+n,a=yield(0,ue.$)(r,999,999,i);return yield(0,Zt.F)(e.id,t.id,a.id,1e3),"connection created"})}}var No=n(3077),_o=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function xo(e){var t=arguments;return _o(this,void 0,void 0,function*(){const n=mo.V.logfunction("GetConnectionsBetweenApi",t);let o=[];try{const t=(0,h.Xr)(),i=yield fetch(u.B.GetConnectionsBetweenUrl(),{method:"POST",headers:t,body:JSON.stringify(e)});if(!i.ok)throw(0,p.ry)(i),new Error(`GetConnectionsBetweenApi error: ${i.status}`);return o=yield i.json(),mo.V.logUpdate(n),o}catch(e){return Error,(0,p.Mb)(e,u.B.GetConnectionsBetweenUrl()),(0,p.ey)(n,"GetConnectionsBetweenApi",e),o}})}function Do(e){var t,n,o,i,r,a,s;return{ofTheConceptId:null!==(t=e.ofTheConceptId)&&void 0!==t?t:0,toTheConceptId:null!==(n=e.toTheConceptId)&&void 0!==n?n:0,typeId:null!==(o=e.typeId)&&void 0!==o?o:0,type:null!==(i=e.type)&&void 0!==i?i:"",oldType:null!==(r=e.oldType)&&void 0!==r?r:"",reverse:null!==(a=e.reverse)&&void 0!==a&&a,isComposition:null!==(s=e.isComposition)&&void 0!==s&&s,connectionIds:[]}}var Po=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class Eo{constructor(){this.actions={concepts:[],connections:[]},this.success=!0,this.pendingConnectionDeletions=[],this.transactionId=Math.random().toString().substring(5)}initialize(){return Po(this,void 0,void 0,function*(){yield ao.H.initializeTransaction(this.transactionId)})}commitTransaction(){return Po(this,void 0,void 0,function*(){if(!this.success)throw Error("Query Transaction Expired");yield ao.H.SyncDataOnline(this.transactionId),this.pendingConnectionDeletions.length>0&&(yield(0,J.E)(this.pendingConnectionDeletions)),this.actions={concepts:[],connections:[]},this.pendingConnectionDeletions=[],this.success=!1})}commitTransactionWithoutAuth(){return Po(this,void 0,void 0,function*(){if(!this.success)throw Error("Query Transaction Expired");yield ao.H.SyncDataOnlineWithoutAuth(this.transactionId),this.pendingConnectionDeletions.length>0&&(yield(0,J.E)(this.pendingConnectionDeletions)),this.actions={concepts:[],connections:[]},this.pendingConnectionDeletions=[],this.success=!1})}rollbackTransaction(){return Po(this,void 0,void 0,function*(){this.success=!1,this.actions={concepts:[],connections:[]},this.pendingConnectionDeletions=[],yield ao.H.rollbackTransaction(this.transactionId,this.actions)})}markAction(){return Po(this,void 0,void 0,function*(){yield ao.H.markTransactionActions(this.transactionId,this.actions)})}DeleteConnectionsBetween(e){return Po(this,void 0,void 0,function*(){return this.DeleteConnectionsBetweenBulk([e])})}DeleteConnectionsBetweenBulk(e){return Po(this,void 0,void 0,function*(){try{if(!this.success)throw Error("Query Transaction Expired");const t=e.map(Do),n=yield xo(t),o=[];for(const e of n)o.push(...e.connectionIds);return this.pendingConnectionDeletions.push(...o),o}catch(e){throw this.success=!1,e}})}MakeTheInstanceConceptLocal(e,t){return Po(this,arguments,void 0,function*(e,t,n=!1,o,i,r=999,a=0){try{if(!this.success)throw Error("Query Transaction Expired");const s=yield(0,te.k)(e,t,n,o,i,r,a,this.actions);return yield this.markAction(),s}catch(e){throw this.success=!1,e}})}MakeTheTypeConceptLocal(e,t,n,o){return Po(this,void 0,void 0,function*(){try{if(!this.success)throw Error("Query Transaction Expired");const i=yield(0,ue.$)(e,t,n,o,this.actions);return yield this.markAction(),i}catch(e){throw this.success=!1,e}})}CreateTheConceptLocal(e,t,n,o,i,r){return Po(this,arguments,void 0,function*(e,t,n,o,i,r,a=!1,s=0,c={concepts:[],connections:[]}){try{if(!this.success)throw Error("Query Transaction Expired");const c=yield(0,No.A)(e,t,n,o,i,r,a,s,this.actions);return yield this.markAction(),c}catch(e){throw this.success=!1,e}})}CreateConnectionBetweenTwoConceptsLocal(e,t,n){return Po(this,arguments,void 0,function*(e,t,n,o=!1){try{if(!this.success)throw Error("Query Transaction Expired");const i=yield(0,In.h)(e,t,n,o,this.actions);return yield this.markAction(),i}catch(e){throw this.success=!1,e}})}CreateTheConnectionLocal(e,t,n){return Po(this,arguments,void 0,function*(e,t,n,o=1,i="",r=999){try{if(!this.success)throw Error("Query Transaction Expired");const a=yield(0,Zt.F)(e,t,n,o,i,r,this.actions);return yield this.markAction(),a}catch(e){throw this.success=!1,e}})}CreateConnection(e,t,n){return Po(this,void 0,void 0,function*(){try{if(!this.success)throw Error("Query Transaction Expired");const o=yield(0,Zt.d)(e,t,n,this.actions);return yield this.markAction(),o}catch(e){throw this.success=!1,e}})}CreateConnectionBetweenEntityLocal(e,t,n){return Po(this,void 0,void 0,function*(){try{if(!this.success)throw Error("Query Transaction Expired");const o=yield Ko(e,t,n,this.actions);return yield this.markAction(),o}catch(e){throw this.success=!1,e}})}CreateTheCompositionLocal(e){return Po(this,arguments,void 0,function*(e,t=null,n=null,o=null,i=null,r=null,a=null,s=!1){try{if(!this.success)throw Error("Query Transaction Expired");const c=yield(0,U.R)(e,t,n,o,i,r,a,s,this.actions);return yield this.markAction(),c}catch(e){throw this.success=!1,e}})}}const Ro={AccessTracker:{GetSuggestedConcepts:{parameters:["top"],documentation:"Fetch suggested concepts from the server with proper error handling."},GetSuggestedConnections:{parameters:["top"],documentation:"Fetch suggested connections from the server with proper error handling.\nParam: top number of connections to get load"},addConceptToBinaryTree:{parameters:["conceptsDataArray"],documentation:"Add Concepts to Binary Tree"},addConnectionToBinaryTree:{parameters:["connectionsDataArray"],documentation:"Add Concepts to Binary Tree"},getTopConcepts:{parameters:["n"],documentation:"Retrieves the top N concepts by their counts."},getTopConnections:{parameters:["n"],documentation:"Retrieves the top N connections by their counts."},incrementConcept:{parameters:["conceptId"],documentation:"Increments the count for a specific conceptId."},incrementConnection:{parameters:["connectionId"],documentation:"Increments the count for a specific connectionId."},loadDataFromLocalStorage:{parameters:[],documentation:"Loads the concept and connection data from localStorage."},saveDataToLocalStorage:{parameters:[],documentation:"Saves the concept and connection data to localStorage."},sendToServer:{parameters:[]},setNextSyncTime:{parameters:[],documentation:"Sets the next sync time based on the current time and sync interval."},startAutoSync:{parameters:[],documentation:"Starts auto-syncing to the server every specified time interval.\nThis will automatically call `syncToServer` every 5 minutes"},syncNow:{parameters:[],documentation:"Sync immediately called by setInterval when time to sync has arrived."},syncToServer:{parameters:[],documentation:"Syncs the concept and connection data with the server."}},Anomaly:{checkAnomalyInBulk:{parameters:["formData"],documentation:"Checks anomalies for multiple concepts in bulk.\nIterates over a record of concept-value pairs and detects anomalies.\n\nParam: {Record<string, string>} instanceData - An object where each key is a concept type and each value is the corresponding data value.\nReturns: {Promise<Record<string, { valid: boolean, warnings: string[] }>>} - A promise that resolves to an object where each key is a concept type\nand the value is an object containing `valid` (boolean) and `warnings` (array of warning messages)."},checkConceptAnomaly:{parameters:["typeConcept","value"],documentation:"Checks whether a given concept and value pair contains an anomaly.\nAn anomaly is detected based on the concept's length and type rules.\n\nParam: {string} typeConcept - The concept type (e.g., `the_name`).\nParam: {string} value - The value to check for anomalies.\nReturns: {Promise<{ valid: boolean, warnings: string[] }>} - A promise that resolves to an object containing:\n- `valid`: A boolean indicating whether the value is valid according to the anomaly rules.\n- `warnings`: An array of warning messages related to the value's anomalies."},detectDataType:{parameters:["value"],documentation:"Detects the data type of a given value based on predefined rules.\nIt checks the value against the `DATA_TYPES_RULES` to find the matching data type.\n\nParam: {string} value - The value to check.\nReturns: {string | null} - The detected data type, or `null` if no match is found."},fetchAnomalyParameters:{parameters:[],documentation:"Fetches anomaly parameters directly from the backend API.\nThis method is used internally by `getAnomalyParameters` to retrieve fresh data.\n\nReturns: {Promise<any>} - A promise that resolves to the fetched anomaly parameters."},getAnomalyParameters:{parameters:[],documentation:"Fetches the anomaly parameters.\nIt first checks if the parameters are cached and whether the cache is still valid (not expired).\nIf the cache is valid, it returns the cached data. If not, it fetches the data from the API.\n\nReturns: {Promise<any>} - A promise that resolves to the anomaly parameters."},getExportedFunction:{parameters:[],documentation:"List all the exported functions of the package\nReturns: Keys of the Object which has exported functions"},getFunctionaAnomalyParameters:{parameters:[]},initializeAnomalyParameters:{parameters:[],documentation:"Initializes the anomaly parameters by fetching them from the API.\nThis method is only run once on startup to ensure the cache is ready for use.\nIt will fetch the parameters from the API and store them in a static cache.\n\nReturns: {Promise<void>} - A promise that resolves once the parameters have been initialized."},refreshCache:{parameters:[],documentation:"Refreshes the anomaly parameters cache if the cache has expired.\nIf the cache expiry threshold has been surpassed, the method re-fetches the data from the API.\n\nReturns: {Promise<void>} - A promise that resolves when the cache has been refreshed."}},BaseUrl:{CreateGhostConceptApiUrl:{parameters:["withAuth"]},CreateGhostConnectionApiUrl:{parameters:[]},CreatePrototypeUrl:{parameters:[]},CreateSessionId:{parameters:[]},CreateSessionVisitUrl:{parameters:[]},CreateTheCharacterDataUrl:{parameters:[]},CreateTheConceptUrl:{parameters:[]},CreateTheConnectionNewUrl:{parameters:[]},CreateTheConnectionUrl:{parameters:[]},CreateTheTextDataUrl:{parameters:[]},DeleteConceptUrl:{parameters:[]},DeleteTheConnectionBulkUrl:{parameters:[]},DeleteTheConnectionUrl:{parameters:[]},DeleteUserUrl:{parameters:[]},FreeschemaQueryUrl:{parameters:[]},GetAllAiData:{parameters:[]},GetAllConceptsByTypeUrl:{parameters:[]},GetAllConceptsOfUserUrl:{parameters:[]},GetAllConnectionsOfCompositionBulkUrl:{parameters:[]},GetAllConnectionsOfCompositionUrl:{parameters:[]},GetAllConnectionsOfConceptUrl:{parameters:[]},GetAllConnectionsOfUserUrl:{parameters:[]},GetAllConnectionsToConceptUrl:{parameters:[]},GetAllLinkerConnectionOfConceptUrl:{parameters:[]},GetAllLinkerConnectionToConceptUrl:{parameters:[]},GetAllPrefetchConnectionsUrl:{parameters:[]},GetCachedImage:{parameters:["ImageName"]},GetCharacterByCharacterUrl:{parameters:[]},GetCompositionConnectionBetweenTwoConceptsUrl:{parameters:[]},GetConceptBulkUrl:{parameters:[]},GetConceptByCharacterAndCategoryDirectUrl:{parameters:[]},GetConceptByCharacterAndCategoryUrl:{parameters:[]},GetConceptByCharacterAndTypeUrl:{parameters:[]},GetConceptByCharacterValueUrl:{parameters:[]},GetConceptUrl:{parameters:[]},GetConnectionBulkUrl:{parameters:[]},GetConnectionUrl:{parameters:[]},GetConnectionsBetweenUrl:{parameters:[]},GetRealConceptById:{parameters:[]},GetReservedConnectionIdUrl:{parameters:[]},GetReservedIdUrl:{parameters:[]},GetSuggestedConcepts:{parameters:[]},GetSuggestedConnections:{parameters:[]},GetTypeConceptBulk:{parameters:[]},LogHealth:{parameters:[]},LoginUrl:{parameters:[]},MakeTheNameInBackendUrl:{parameters:[]},MakeTheTypeConceptUrl:{parameters:[]},PostLogger:{parameters:[]},PostPrefetchConceptConnections:{parameters:[]},RecursiveSearchUrl:{parameters:[]},SearchAllTypeWithLinker:{parameters:["auth"]},SearchCompositionsUrl:{parameters:[]},SearchInternalWithAuthenticatedCcsUrl:{parameters:[]},SearchInternalWithCcsUrl:{parameters:[]},SearchLinkMultipleAll:{parameters:[]},SearchLinkMultipleAllApiUrl:{parameters:[]},SignupUrl:{parameters:[]},UploadFileLimitUrl:{parameters:[]},ViewInternalDataUrl:{parameters:[]},getAppConfig:{parameters:[]},getConnectionsByTypes:{parameters:[]},getLatestWidgetData:{parameters:[]},getRandomizer:{parameters:[]},getRecentWidgetData:{parameters:[]},getWidgetData:{parameters:[]},sendBulkMail:{parameters:[]},sendMail:{parameters:[]},setRandomizer:{parameters:["id"]},uploadFileUrl:{parameters:[]},uploadImageUrl:{parameters:[]},uploadImageUrlWithSmall:{parameters:[]}},BinaryTree:{addConceptToTree:{parameters:["concept"],documentation:"Adds a concept to both the ID map and the character tree.\n\nThe character tree (BinaryCharacterTree) is still an AVL tree because\nit supports character-based search which is out of scope for this refactor.\n\nParam: concept - The Concept to store"},addNodeToTree:{parameters:["node"],documentation:"Low-level add — stores the node's key/value in the Map.\nKept for API compatibility (called internally by addConceptToTree).\nParam: node - Node with numeric key and Concept value"},checkFlag:{parameters:["resolve"],documentation:"Recursive polling helper for waitForDataToLoad"},countNumberOfNodes:{parameters:[],documentation:"Returns the total number of concepts stored.\nReturns: Number of concepts in the Map"},getConceptListFromIds:{parameters:["ids","conceptArray","remainingIds"],documentation:'Bulk concept retrieval by ID list.\n\nFor each ID found in the Map, pushes the Concept into conceptArray\nand removes the ID from the ids array. IDs remaining in the array\nafter this call are "not found" and will be fetched from the backend.\n\nPerformance: O(k) where k = ids.length (was O(N) full tree traversal).\n\nParam: ids - Array of concept IDs to look up (mutated: found IDs are spliced out)\nParam: conceptArray - Output array (mutated: found Concepts are pushed)\nParam: remainingIds - Not used directly but kept for API compatibility'},getNodeFromTree:{parameters:["id"],documentation:"Retrieves a concept by ID from the Map.\n\nReturns a { key, value } wrapper matching the Node shape that callers expect.\nCallers access the returned object's .value property to get the Concept.\n\nParam: id - The concept ID to look up\nReturns: Node-like wrapper with .value = Concept, or null if not found"},removeNodeFromTree:{parameters:["id"],documentation:"Removes a concept by ID. Dispatches an event before deletion\nso listeners (e.g. UI components) can react to the removal.\n\nParam: id - The concept ID to remove"},waitForDataToLoad:{parameters:[],documentation:"Polls until IdentifierFlags.isDataLoaded is true (max 25 seconds).\nUsed by callers that need to wait for the initial IndexedDB load to finish."}},BuilderStatefulWidget:{CreateConnectionBetweenEntityLocal:{parameters:["concept1Data","concept2Data","linker"],documentation:'Creates a local connection between two concepts with a specified linker type.\n\nThis helper method creates a connection relationship between two entity concepts\nusing local storage (not immediately synced to backend). The linker name is\nautomatically prefixed with the first concept\'s type to create a typed connection.\n\n**Process:**\n1. Extracts userId from first concept\n2. Creates linker name: "{concept1Type}_{linkerName}"\n3. Creates or gets the connection type concept locally\n4. Creates the connection between the two concepts\n\n**Use Cases:**\n- Creating relationships in offline mode\n- Building entity associations within widgets\n- Temporary connections before sync\n- Development/testing without backend\n\nParam: concept1Data - The source concept (FROM)\nParam: concept2Data - The target concept (TO)\nParam: linker - The relationship name (e.g., "email", "phone", "address")\nThis will be prefixed with concept1\'s type\n\nReturns: Promise resolving to "connection created" string'},after_render:{parameters:[],documentation:"Executes event binding code after the widget renders.\n\nThis lifecycle method runs after the DOM is updated to attach event listeners\nand perform post-render operations. It executes user-defined code stored in\naddEventFunction.\n\n**Lifecycle Position:**\nRuns after render() completes and DOM is updated.\n\n**Common Uses:**\n- Attach click, input, or other event listeners\n- Set up keyboard shortcuts\n- Initialize interactive features\n- Bind form validation\n- Set up drag-and-drop handlers\n\n@throws Will log and re-throw errors if event binding code fails"},before_render:{parameters:[],documentation:"Executes the componentDidMount lifecycle hook.\n\nThis function is called after the component mounts to the DOM, similar to\nReact's componentDidMount. It executes user-defined initialization code\nstored in componentDidMountFunction.\n\n**Lifecycle Position:**\nRuns after render_custom_functions() and render_widgetDependencies(),\nbut before mount_child().\n\n**Common Uses:**\n- Fetch initial data from API\n- Set up subscriptions or listeners\n- Initialize third-party libraries\n- Perform DOM manipulations\n- Set initial state based on props\n\n@throws Will log and re-throw errors if componentDidMount code fails"},createRandomNumber:{parameters:[],documentation:"Generates a random identifier for this widget element.\n\nReturns: A random number used as the element identifier"},createTypeEditor:{parameters:["event"],documentation:"Opens the type editor interface for this widget.\n\nThis method is called in development mode when the widget is clicked.\nIt opens a visual editor for modifying the widget's type and properties.\n\nParam: event - The click event that triggered the editor"},getHtml:{parameters:[],documentation:"Returns the HTML content of this widget.\n\nReturns: The HTML string for this widget"},getTypeValueList:{parameters:["typeName"],documentation:'Fetches a list of type values from the backend based on the widget\'s type.\n\nThis method performs a filtered search using FreeschemaQuery to retrieve all entities\nof a specific type. The results are formatted as options for dropdowns or selection lists.\n\n**Process:**\n1. Parses widgetType to extract main composition and type-value key\n2. Creates filter for entities (e.g., filter by ID > 1)\n3. Executes FreeschemaQuery with filters\n4. Formats results into { id, name, text } objects\n5. Stores in this.typeValueList\n\n**Type Name Format:**\n- widgetType: "the_element_name"\n- mainComposition: "the_element"\n- typevalueKey: "the_name"\n\nParam: typeName - Optional type name (defaults to this.widgetType)\n\nReturns: Promise resolving to array of formatted type values:\n[{ id: number, name: string, text: string }, ...]'},getUserId:{parameters:[],documentation:"Retrieves the current user's ID from local storage.\n\nThis method fetches the user profile from localStorage and extracts the userId.\nUsed for user-specific operations and data access within widgets.\n\nReturns: Promise resolving to the user ID (number) or undefined if not found"},mount:{parameters:["parent"],documentation:"Mounts the widget to a parent DOM element and initializes the lifecycle.\n\nThis is the primary method for rendering a widget to the DOM. It:\n1. Creates a wrapper div element\n2. Attaches click handlers (if in development mode)\n3. Inserts HTML content\n4. Executes lifecycle hooks in order\n5. Mounts child widgets\n\n**Lifecycle Execution Order:**\n1. render_custom_functions() - Execute custom functions\n2. render_widgetDependencies() - Load dependencies\n3. before_render() - componentDidMount equivalent\n4. mount_child() - Mount child widgets\n5. render() - Update DOM\n\n**Development Mode:**\nWhen `inDevelopment` is true, the widget becomes clickable and opens\nthe type editor for visual configuration.\n\nParam: parent - The parent HTMLElement to mount this widget to"},mount_child:{parameters:[],documentation:"Mounts child widgets by executing the mountChildWidgetsFunction.\n\nThis method dynamically executes user-defined JavaScript code for mounting\nchild widgets. The code is executed within the widget's context with access\nto the tsccs package.\n\n**Execution Context:**\n- Code is bound to `this` (the widget instance)\n- Has access to `tsccs` module for TSCCS operations\n- Runs asynchronously\n\n@throws Will log and re-throw errors if mount_child code fails"},render_custom_functions:{parameters:[],documentation:"Executes all custom functions defined for this widget.\n\nThis method runs during the mount phase to execute user-defined custom\nfunctions. All functions in the customFunctions array are concatenated\nand executed together in the widget's context.\n\n**Custom Functions:**\n- Defined in widget.customFunctions array\n- Each function is a TCustomFunction object with a code property\n- All functions execute with access to `this` (widget) and `tsccs` module\n- Functions can define methods, initialize state, or set up utilities\n\n@throws Will log and re-throw errors if custom function code fails"},render_widgetDependencies:{parameters:[],documentation:"Executes widget dependencies initialization code.\n\nThis lifecycle method runs during the mount phase to load and initialize\nany dependencies required by the widget. Dependencies code is executed\nwith access to the tsccs module.\n\n**Execution:**\n- Runs before before_render()\n- Code in widgetDependenciesData is executed\n- Bound to widget context (this)\n- Has access to tsccs package\n\n@throws Will log and re-throw errors if dependency code fails"},setProperty:{parameters:["widgetTypeName"],documentation:'Sets the widget type and fetches associated type values.\n\nThis method updates the widget\'s type, fetches the corresponding type values\nfrom the backend, updates DOM attributes, and triggers a re-render.\n\nParam: widgetTypeName - The new widget type name (e.g., "the_person_name")\n\nReturns: Promise resolving to this widget instance (for method chaining)'},setTitle:{parameters:["title"],documentation:"Sets the browser document title.\n\nParam: title - The title string to set as the document title"}},Composition:{GetDataCache:{parameters:[]},UpdateAcrossDistributedSystem:{parameters:[]},isUpdating:{parameters:[]},updateCache:{parameters:[]}},CompositionBinaryTree:{addCompositionToTree:{parameters:["composition"]},addNodeToTree:{parameters:["node"]},countNumberOfNodes:{parameters:[]},getNodeFromTree:{parameters:["id"]},removeNodeFromTree:{parameters:["id"]}},CompositionNode:{addNode:{parameters:["passedNode","node","height"]},countNodeBelow:{parameters:["root"]},getBalanceFactor:{parameters:["N"]},getFromNode:{parameters:["id","node"]},getHeight:{parameters:["node"]},inOrderSuccessor:{parameters:["root"]},isValid:{parameters:[]},leftRotate:{parameters:["x"]},removeNode:{parameters:["passedNode","id"]},rightRotate:{parameters:["y"]},saveToCache:{parameters:["data"]}},Concept:{getType:{parameters:[]}},ConceptsData:{AddConcept:{parameters:["concept"]},AddConceptTemporary:{parameters:["concept"]},AddConceptToMemory:{parameters:["concept"]},AddConceptToStorage:{parameters:["concept"]},AddNpc:{parameters:["id"]},AddWidget:{parameters:["widgetDetails"]},CheckContains:{parameters:["concept"]},GetBinaryCharacterTree:{parameters:[]},GetConcept:{parameters:["id"]},GetConceptBulkData:{parameters:["ids","connectionArray","remainingIds"]},GetConceptByCharacter:{parameters:["characterValue"]},GetConceptByCharacterAndCategoryLocal:{parameters:["character_value","categoryId"]},GetConceptByCharacterAndTypeLocal:{parameters:["character_value","typeId"]},GetConceptByCharacterUpdated:{parameters:["characterValue"]},GetConceptsByTypeId:{parameters:["typeId"]},GetConceptsByTypeIdAndUser:{parameters:["typeId","userId"]},GetNpc:{parameters:["id"]},GetWidget:{parameters:["id"]},RemoveConcept:{parameters:["concept"]},RemoveWidget:{parameters:["id"]},getName:{parameters:[]}},Connection:{},ConnectionData:{AddConnection:{parameters:["connection"]},AddConnectionToMemory:{parameters:["connection"]},AddConnectionToStorage:{parameters:["connection"]},AddNpConn:{parameters:["id"]},AddToDictionary:{parameters:["connection"]},CheckContains:{parameters:["connection"]},GetConnection:{parameters:["id"]},GetConnectionBulkData:{parameters:["ids","connectionArray","remainingIds"]},GetConnectionByOfTheConceptAndType:{parameters:["ofTheConceptId","typeId"]},GetConnectionByOfType:{parameters:["ofTheConceptId","typeId"]},GetConnectionTree:{parameters:[]},GetConnectionTypeOfTree:{parameters:[]},GetConnectionTypeTree:{parameters:[]},GetConnectionsOfCompositionLocal:{parameters:["id"]},GetConnectionsOfConcept:{parameters:["id"]},GetNpConn:{parameters:["id"]},RemoveConnection:{parameters:["connection"]},getName:{parameters:[]}},CountInfo:{},DependencyObserver:{bind:{parameters:[],documentation:"Binds and refreshes the observable data. Override in subclasses to implement specific data fetching logic.\nReturns: The bound data"},execute:{parameters:[],documentation:"Executes the observable once without subscribing to updates.\nReturns: The executed data"},listenToEvent:{parameters:["id"],documentation:"Listens to connection changes for a specific concept and updates subscribers when connections are modified.\nParam: id - The concept ID to track"},listenToEventConnectionType:{parameters:["id","connectionType"],documentation:"Listens to connection changes filtered by connection type for a specific concept.\nParam: id - The concept ID to track\nParam: connectionType - The connection type ID to filter by"},listenToEventType:{parameters:["id"],documentation:"Listens to changes for a specific concept type and updates subscribers when new concepts of that type are created.\nParam: id - The type concept ID to track"},notify:{parameters:[],documentation:"Notifies all subscribers with the current data."},removeListenToEvent:{parameters:["id"],documentation:"Removes an event listener for a specific concept ID.\nParam: id - The concept ID to stop tracking"},run:{parameters:[],documentation:"Executes the observable without subscribing. Override in subclasses for non-reactive data fetching.\nReturns: The executed data"},subscribe:{parameters:["callback","errorCallback"],documentation:"Subscribes a callback to receive data updates whenever tracked concepts/connections change.\nParam: callback - Function to call with (data, observer) when updates occur\nParam: errorCallback - Optional function to call when errors occur\nReturns: Result of calling the callback with current data"},unsubscribe:{parameters:["callback"],documentation:"Removes a callback from the subscriber list.\nParam: callback - The callback function to remove\nReturns: Number of remaining subscribers"},update:{parameters:[],documentation:"Forces a data refresh and notifies all subscribers."}},Environments:{getValue:{parameters:["key","defaultValue"],documentation:"Retrieves a stored value by key.\n\nParam: key - The key to look up.\nParam: defaultValue - Value returned when the key has never been set. Defaults to `null`.\nReturns: The stored value, or `defaultValue` if the key is absent."},setValue:{parameters:["key","value"],documentation:"Stores a value under the given key. Overwrites any existing value.\nTakes effect immediately — the next call to `getValue` with the same key\nreturns the new value.\n\nParam: key - The key to store under.\nParam: value - The value to store.\nReturns: The `Environments` class itself for chaining."}},FilterSearch:{},FreeschemaQuery:{},LConcept:{getType:{parameters:[]}},LConnection:{},LocalConceptsData:{AddConcept:{parameters:["concept"]},AddConceptToMemory:{parameters:["concept"]},AddPermanentConcept:{parameters:["concept"]},ClearData:{parameters:[]},GetConcept:{parameters:["id"]},GetConceptByCharacter:{parameters:["characterValue"]},GetConceptByCharacterAndCategoryLocal:{parameters:["character_value","categoryId"]},GetConceptByCharacterAndTypeLocal:{parameters:["character_value","typeId"]},GetConceptByGhostId:{parameters:["id"]},GetConceptsByTypeId:{parameters:["typeId"]},GetConceptsByTypeIdAndUser:{parameters:["typeId","userId"]},RemoveConcept:{parameters:["concept"]},RemoveConceptById:{parameters:["conceptId"]},UpdateConceptSyncStatus:{parameters:["id"]},getName:{parameters:[]}},LocalSyncData:{AddConcept:{parameters:["concept"]},AddConceptIfDoesNotExist:{parameters:["concept","conceptList"]},AddConnection:{parameters:["connection"]},CheckContains:{parameters:["concept"]},CheckContainsConnection:{parameters:["connection"]},CheckIfTheConceptIdExists:{parameters:["id","conceptList"]},ConvertGhostIdsInConnections:{parameters:["connectionArray"]},RemoveConcept:{parameters:["concept"]},RemoveConnection:{parameters:["connection"]},RemoveConnectionById:{parameters:["connectionId"]},SyncDataDelete:{parameters:["id"]},SyncDataOnline:{parameters:["transactionId","actions","withAuth"]},SyncDataOnlineWithoutAuth:{parameters:["transactionId","actions","withAuth"]},UpdateConceptListToIncludeRelatedConcepts:{parameters:["connectionArray","conceptsArray"]},initializeTransaction:{parameters:["transactionId"]},markTransactionActions:{parameters:["transactionId","actions"]},rollbackTransaction:{parameters:["transactionId","actions"]},syncDataLocalDb:{parameters:[]}},LocalTransaction:{CreateConnection:{parameters:["ofTheConcept","toTheConcept","connectionTypeString"]},CreateConnectionBetweenEntityLocal:{parameters:["concept1Data","concept2Data","linker"]},CreateConnectionBetweenTwoConceptsLocal:{parameters:["ofTheConcept","toTheConcept","linker","both"]},CreateTheCompositionLocal:{parameters:["json","ofTheConceptId","ofTheConceptUserId","mainKey","userId","accessId","sessionInformationId","automaticSync"]},CreateTheConceptLocal:{parameters:["referent","typecharacter","userId","categoryId","typeId","accessId","isComposition","referentId","actions"]},CreateTheConnectionLocal:{parameters:["ofTheConceptId","toTheConceptId","typeId","orderId","typeString","userId"]},DeleteConnectionsBetween:{parameters:["query"],documentation:"Queries the backend for connections matching the given criteria and queues all\nreturned connection IDs for bulk deletion when commitTransaction() is called.\n\n**Nothing is deleted until commitTransaction() is called.**\nCalling rollbackTransaction() discards the queue without touching the backend.\n\nSupported query permutations:\n1. `ofTheConceptId` + `toTheConceptId` + `type` — connections between two specific concepts\n2. `ofTheConceptId` + `type` — all connections FROM a concept of that type\n3. `toTheConceptId` + `type` — all connections TO a concept of that type\n4. `typeId` + `isComposition: true` — all internal connections of a composition\n\nFor multiple queries in one go use {@link DeleteConnectionsBetweenBulk} — it sends\nall queries in a single HTTP request.\n\nParam: query - Partial FetchConnectionQuery with only the fields relevant to your permutation.\nReturns: The connection IDs queued for deletion by this call."},DeleteConnectionsBetweenBulk:{parameters:["queries"],documentation:"Same as {@link DeleteConnectionsBetween} but resolves multiple queries in a single\nHTTP request to POST /api/get-connection-between.\n\nPrefer this over looping DeleteConnectionsBetween — all queries go to the backend\nin one round trip, and all returned IDs are merged into the same pending-deletion queue.\nThe actual deletion still fires as a single bulk call inside commitTransaction().\n\nParam: queries - Array of partial FetchConnectionQuery objects, one per query permutation.\nReturns: All connection IDs queued for deletion across every query in this call."},MakeTheInstanceConceptLocal:{parameters:["type","referent","composition","userId","accessId","sessionInformationId","referentId"]},MakeTheTypeConceptLocal:{parameters:["typeString","sessionId","sessionUserId","userId"]},commitTransaction:{parameters:[],documentation:"Method to commi the created Transactions"},commitTransactionWithoutAuth:{parameters:[]},initialize:{parameters:[],documentation:"Method to initialize the transactions for specified transaction"},markAction:{parameters:[],documentation:"Method to move concepts and connection to transaction collection\nParam: concept Concept"},rollbackTransaction:{parameters:[],documentation:"Method to rollback all the tranctions occured"}},Logger:{checkLoggerServerStatus:{parameters:[]},clearLogsFromLocalStorage:{parameters:["logType"]},formatLogData:{parameters:["level","message","data"],documentation:"Logs a message with optional additional structured data."},log:{parameters:["level","message","data"]},logApplication:{parameters:["level","message","data"]},logError:{parameters:["startTime","userId","operationType","requestFrom","requestIP","responseStatus","responseData","functionName","functionParameters","userAgent","conceptsUsed"]},logUpdate:{parameters:["logData"],documentation:"Updates log data with execution details.\nParam: logData The log data object to be updated."},logfunction:{parameters:["myFunction","args"]},saveLogToLocalStorage:{parameters:["logType","logMessage"],documentation:"Helper method to save logs to localStorage."},sendApplicationLogsToServer:{parameters:[],documentation:"Helper method to send logs to the server."},sendPackageLogsToServer:{parameters:[]},setLogLevel:{parameters:["level"],documentation:'Set the log level (e.g., "DEBUG", "INFO", "WARNING", "ERROR").'},shouldLog:{parameters:["level"],documentation:"Determines whether the current log level permits the given level to be logged."},startAutoSync:{parameters:[],documentation:"Automatically starts the auto-sync mechanism.\nThis is private and does not need external interaction."},stopAutoSync:{parameters:[],documentation:"Automatically stops the auto-sync mechanism when required."}},PatcherStructure:{},Prototype:{},SearchLinkMultipleAllObservable:{bind:{parameters:[],documentation:"Executes the search queries and sets up change listeners.\nReturns: Formatted search results"}},SearchQuery:{},SearchStructure:{},Selector:{addFilter:{parameters:["value"]},after_render:{parameters:[]},before_render:{parameters:[]},getHtml:{parameters:[]}},SessionData:{},StatefulWidget:{UpdateChildData:{parameters:["value","widget"],documentation:"Updates a child widget's data and triggers re-render.\n\nParam: value - New data to pass to the child widget\nParam: widget - The child widget instance to update"},after_render:{parameters:[],documentation:"Lifecycle hook called after rendering.\nOverride to add event listeners or post-render logic."},before_render:{parameters:[],documentation:"Lifecycle hook called before rendering.\nOverride for initialization logic. Default implementation calls render()."},getElement:{parameters:[],documentation:"Gets the root DOM element of this widget.\n\nReturns: The widget's root HTML element"},getElementByClassName:{parameters:["identifier"],documentation:"Finds all elements with a specific class name within this widget.\n\nParam: identifier - Class name to search for (without '.' prefix)\nReturns: NodeList of matching elements"},getHtml:{parameters:[],documentation:"Gets the HTML template for this widget.\n\nReturns: HTML string to be rendered"},getWidgetState:{parameters:["key","defaultValue"],documentation:"Retrieves shared state data by key.\n\nParam: key - State property key to retrieve\nParam: defaultValue - Default value if key doesn't exist\nReturns: The state value or default value"},hasStateChanged:{parameters:[],documentation:"Checks if the widget state has changed since last update.\n\nReturns: True if state changed, false otherwise"},isPropertyEqual:{parameters:["obj1","obj2"],documentation:"Compares two state objects for shallow equality.\n\nParam: obj1 - First state object\nParam: obj2 - Second state object\nReturns: True if objects are equal, false otherwise"},loadChildWidgets:{parameters:[],documentation:"Mounts all registered child widgets to their designated parent elements."},mount:{parameters:["parent"],documentation:"Mounts the widget to a parent DOM element and initializes lifecycle.\n\nCreates a wrapper div, assigns unique ID, renders HTML, and executes\nlifecycle hooks in sequence.\n\nParam: parent - The parent HTML element to mount this widget into"},mount_child:{parameters:[],documentation:"Lifecycle hook for mounting child widgets.\nOverride this method to define custom child mounting logic."},querySelector:{parameters:["selector"],documentation:"Finds the first element matching a CSS selector within this widget.\n\nParam: selector - CSS selector string\nReturns: The first matching element or null"},querySelectorAll:{parameters:["selector"],documentation:"Finds all elements matching a CSS selector within this widget.\n\nParam: selector - CSS selector string\nReturns: NodeList of matching elements or null"},render:{parameters:[],documentation:"Re-renders the widget by updating the DOM with current HTML template.\nAlso triggers child widget loading and after_render hook."},renderChildWidgets:{parameters:[],documentation:"Recursively renders all child widgets in the hierarchy."},setState:{parameters:["newState"],documentation:"Updates the entire widget state and triggers re-render if changed.\n\nParam: newState - New state data to replace current state"},setStateProperty:{parameters:["newProperty"],documentation:"Updates specific state properties and triggers re-render if changed.\n\nParam: newProperty - Object containing properties to update"},setTitle:{parameters:["title"],documentation:"Sets the browser document title.\n\nParam: title - The new document title"},setWidgetState:{parameters:["key","value"],documentation:"Sets shared state data and propagates to all child widgets recursively.\n\nParam: key - State property key\nParam: value - State value to set"},update:{parameters:[],documentation:"Lifecycle hook called after widget data is updated.\nOverride this method to handle post-update logic."}},SyncData:{AddConcept:{parameters:["concept"]},AddConnection:{parameters:["connection"]},CheckContains:{parameters:["concept"]},CheckContainsConnection:{parameters:["connection"]},RemoveConcept:{parameters:["concept"]},RemoveConnection:{parameters:["connection"]},SyncDataDelete:{parameters:["id"]},SyncDataOnline:{parameters:[]}},TokenStorage:{hydrateProfile:{parameters:[],documentation:"Call once at app startup (e.g. in init()) to decrypt the stored profile\ninto memory so that getUserDetails() can read it synchronously."},logout:{parameters:[],documentation:"Clears all stored credentials and profile data."},saveUserProfile:{parameters:["signinResponse"],documentation:"Stores user profile securely (encrypted in sessionStorage)\nand keeps the token in memory for API calls.\nAlso populates profileCache so getUserDetails() works synchronously."},setSession:{parameters:["sessionId"]}},UserBinaryTree:{addConceptToTree:{parameters:["concept","userId","sessionId"]},addNodeToTree:{parameters:["node"]},checkFlag:{parameters:["resolve"]},compositeKey:{parameters:["userId","sessionId"]},countNumberOfNodes:{parameters:[]},getNodeFromTree:{parameters:["userId","sessionId"]},removeNodeFromTree:{parameters:["userId","sessionId"]},waitForDataToLoad:{parameters:[]}},Validator:{checkUniqueness:{parameters:["type","value"],documentation:"Checks if a concept with the given type and value is unique.\nParam: type concept type where to check\nParam: value value to check\nReturns: boolean indicating uniqueness"},validate:{parameters:["options"],documentation:"Take field element attributes\nParam: options Object conist of attributes\nReturns: Object with status and details"},validateField:{parameters:["options"],documentation:"Validates a single form field based on its constraints and uniqueness.\nParam: options - An object containing field properties including name, value, type, and validation constraints.\nReturns: An object containing validation errors if validation fails."},validateForm:{parameters:["formData"],documentation:"Validates all form fields by iterating over the provided form data.\nIt checks each field's value, data type, and constraints, collecting errors where necessary.\n\nParam: formData - An object representing the form data, where each key is a field name\nand each value is an object containing the `value`, `dataType`, and constraints (e.g., `maxLength`, `minLength`).\n\nReturns: An object containing validation errors for fields that failed validation.\nIf no errors exist, the object will be empty."}},WidgetTree:{},tsccs:{AccessTracker:{parameters:[]},AddGhostConcept:{parameters:["concept","userId","sessionId"]},Anomaly:{parameters:[],documentation:"Constructor that initializes anomaly parameters if the cache is not yet initialized.\nIt ensures that the anomaly parameters are loaded and cached for use."},BaseUrl:{parameters:[]},BinaryTree:{parameters:[],documentation:"BinaryTree — In-memory concept store keyed by numeric concept ID.\n\nBacked by a Map<number, Concept> for O(1) lookups, inserts, and deletes.\nAlso maintains the BinaryCharacterTree (character-indexed) on every insert\nso character-based search continues to work.\n\nAll public method signatures are preserved for backward compatibility.\ngetNodeFromTree returns a { key, value } wrapper so callers that access\nnode.value continue to work without changes."},BuildWidgetFromId:{parameters:["id"],documentation:"Fetches and builds widget data from the backend by widget ID.\n\nRetrieves complete widget structure including concepts, connections, and metadata.\nUses caching to prevent duplicate requests for the same widget.\n\nParam: id - The widget ID to fetch\nReturns: Promise resolving to formatted widget data"},BuilderStatefulWidget:{parameters:[],documentation:"BuilderStatefulWidget - A dynamic, stateful widget component for building interactive UI elements.\n\nThis class extends StatefulWidget to provide a powerful widget system that supports:\n- Dynamic HTML rendering with lifecycle hooks\n- Child widget composition and mounting\n- Custom function execution and event handling\n- Type-based data binding and queries\n- Development mode with visual editing capabilities\n- Widget dependencies and custom functions\n\n**Key Features:**\n- **Lifecycle Management**: before_render, render, after_render hooks\n- **Dynamic Code Execution**: Safely executes user-defined JavaScript functions\n- **Child Widgets**: Supports hierarchical widget composition\n- **Type Integration**: Connects to TSCCS type system for data binding\n- **Development Mode**: Visual editing and type editor integration\n- **Custom Functions**: Execute user-defined functions within widget context\n- **Local Connections**: Create relationships between entities at the widget level\n\n**Lifecycle Flow:**\n1. Constructor creates widget instance\n2. mount() attaches to parent DOM element\n3. render_custom_functions() executes custom code\n4. render_widgetDependencies() loads dependencies\n5. before_render() (componentDidMount equivalent) executes\n6. mount_child() mounts child widgets\n7. render() updates the DOM\n8. after_render() (addEvent) attaches event listeners\n\n**Use Cases:**\n- Building dynamic forms with type-based data\n- Creating reusable UI components\n- Widget-based page builders\n- Interactive dashboards\n- Data-driven UI components\n\n@extends StatefulWidget"},Composition:{parameters:[]},CompositionBinaryTree:{parameters:[]},CompositionNode:{parameters:["key","value","leftNode","rightNode"]},Concept:{parameters:["id","userId","typeId","categoryId","referentId","characterValue","accessId","isNew","entryTimeStamp","updatedTimeStamp","typeCharacter"]},ConceptsData:{parameters:[]},Connection:{parameters:["id","ofTheConceptId","toTheConceptId","userId","typeId","orderId","accessId"]},ConnectionData:{parameters:[]},CountInfo:{parameters:[]},CreateComposition:{parameters:["json","ofTheConceptId","ofTheConceptUserId","mainKey","userId","accessId","sessionInformationId"]},CreateConnection:{parameters:["ofTheConcept","toTheConcept","connectionTypeString","actions"],documentation:"Simplified connection creator that accepts concepts and a type string.\n\nThis is a convenience wrapper around CreateTheConnectionLocal that:\n1. Accepts Concept objects instead of IDs\n2. Creates the connection type concept if it doesn't exist\n3. Extracts necessary IDs automatically\n4. Sets appropriate defaults for local connections\n\n**Advantages:**\n- More intuitive API (pass concepts, not IDs)\n- Automatic type concept creation/retrieval\n- Less boilerplate code\n- Type-safe with TypeScript\n\n**Process:**\n1. Creates/retrieves type concept from connectionTypeString\n2. Extracts userId from source concept\n3. Calls CreateTheConnectionLocal with extracted IDs\n4. Returns the created connection\n\nParam: ofTheConcept - The source Concept object (FROM)\nParam: toTheConcept - The target Concept object (TO)\nParam: connectionTypeString - Type name as string (e.g., \"the_person_email\").\nA type concept will be created if it doesn't exist.\nParam: actions - Action tracking object for batch operations. Defaults to empty arrays.\n\nReturns: Promise resolving to the created Connection object"},CreateConnectionBetweenEntityLocal:{parameters:["concept1Data","concept2Data","linker","actions"]},CreateConnectionBetweenTwoConcepts:{parameters:["ofTheConcept","toTheConcept","linker","both","count"]},CreateConnectionBetweenTwoConceptsGeneral:{parameters:["ofTheConcept","toTheConcept","linker","both","count"]},CreateConnectionBetweenTwoConceptsLocal:{parameters:["ofTheConcept","toTheConcept","linker","both","actions"],documentation:'Creates a named connection between two concepts with optional bidirectional linking.\n\n**Complex Naming Logic**:\n- Forward connection type: "{ofType}_s_{linker}_s" (e.g., "person_s_knows_s")\n- Backward connection type: "{toType}_s_{linker}_by" (e.g., "person_s_knows_by")\n- Uses type.characterValue from concepts to build meaningful connection names\n\n**Bidirectional Mode (both=true)**:\n- Creates two connections: A→B and B→A\n- Forward: ofTheConcept → toTheConcept with "{ofType}_s_{linker}_s"\n- Backward: toTheConcept → ofTheConcept with "{toType}_s_{linker}_by"\n\nParam: ofTheConcept - Source concept (connection starts here)\nParam: toTheConcept - Target concept (connection points here)\nParam: linker - Relationship name (e.g., "knows", "works_at", "has")\nParam: both - If true, creates bidirectional connection (both A→B and B→A)\nParam: actions - Action tracking for batch operations\nReturns: The forward connection object\n@throws Error if connection creation fails'},CreateData:{parameters:["json","ofConcept","typeConcept","actions"]},CreateDefaultConcept:{parameters:[]},CreateDefaultLConcept:{parameters:[],documentation:'Creates a default empty local concept with all properties set to zero/default values.\n\nThis utility function generates a blank Concept object that can be used as a placeholder\nor default return value when a concept is not found. All IDs and values are set to 0\nor empty defaults.\n\n**Default Values:**\n- id: 0 (indicates empty/not found)\n- userId: 0\n- typeId: 0\n- categoryId: 0\n- referentId: 0\n- characterValue: "0"\n- accessId: 0\n- isNew: false\n- entryTimeStamp: current date\n- updatedTimeStamp: current date\n- typeCharacter: "0"\n\n**Use Cases:**\n- Default return value when concept not found\n- Placeholder for conditional logic\n- Initial state before loading data\n- Template for creating new concepts\n\nReturns: A Concept object with all properties set to default/zero values'},CreateSession:{parameters:["sessionData"],documentation:"Creates a new session for tracking user activity.\nRecords session metadata including user agent, IP, and timestamp.\n\nParam: sessionData - SessionData object containing session information\nReturns: Session object with generated ID, or null on error"},CreateSessionVisit:{parameters:["sessionId","url"],documentation:"Records a URL visit within an existing session.\nTracks page navigation and user journey through the application.\n\nParam: sessionId - ID of the session to associate the visit with\nParam: url - URL being visited\nReturns: Session visit object or null on error"},CreateTheCompositionLocal:{parameters:["json","ofTheConceptId","ofTheConceptUserId","mainKey","userId","accessId","sessionInformationId","automaticSync","actions"],documentation:'Converts a JSON object into a local composition structure with concepts and connections.\n\nThis powerful function recursively transforms any JSON object into the concept-connection\nsystem, creating local concepts for each key-value pair and establishing connections\nbetween them to preserve the hierarchical structure.\n\n**JSON to Composition Conversion:**\n- JSON keys become type concepts (e.g., "name", "email")\n- JSON string/number values become instance concepts\n- Nested objects/arrays create sub-compositions\n- Connections preserve parent-child relationships\n- All data stored locally (IndexedDB) for offline use\n\n**Recursive Process:**\n1. Iterates through each key in JSON object\n2. For nested objects/arrays: Creates composition concept + recurse\n3. For primitive values: Creates instance concept\n4. Creates connections from parent to child concepts\n5. Returns the main/root concept\n\n**Example Transformation:**\n```javascript\nInput JSON:\n{\nname: "Alice",\nemail: "alice@example.com",\naddress: {\ncity: "NYC",\nzip: "10001"\n}\n}\n\nCreates:\n- Concept: "name" (type) → "Alice" (instance)\n- Concept: "email" (type) → "alice@example.com" (instance)\n- Concept: "address" (composition concept)\n- Concept: "city" → "NYC"\n- Concept: "zip" → "10001"\n- Connections linking all concepts in hierarchy\n```\n\nParam: json - The JSON object/array to convert to composition structure.\nCan be any depth of nesting.\nParam: ofTheConceptId - Parent concept ID if this is a sub-composition.\nNull for root composition. Used for connecting to parent.\nParam: ofTheConceptUserId - User ID of the parent concept.\nUsed for ownership tracking in nested structures.\nParam: mainKey - The main composition ID (root concept ID).\nUsed as typeId for internal connections. Null for root.\nParam: userId - User ID of the creator. Defaults to 999 (system).\nParam: accessId - Access control level. Defaults to 999 (system).\nParam: sessionInformationId - Session ID. Defaults to 999 (system).\nParam: automaticSync - Reserved for future automatic sync feature.\nCurrently not fully implemented.\nParam: actions - Action tracking object that accumulates all created concepts\nand connections for batch operations. Defaults to empty arrays.\n\nReturns: Promise resolving to the main/root Concept of the composition'},CreateTheCompositionWithCache:{parameters:["json","ofTheConceptId","ofTheConceptUserId","mainKey","userId","accessId","sessionInformationId","composition"]},CreateTheConnection:{parameters:["ofTheConceptId","userId","toTheConceptId","typeId"],documentation:'Creates a connection (relationship) between two concepts and adds it to the sync queue.\n\nThis is the primary function for establishing relationships in the knowledge graph.\nConnections are directed edges that link two concepts together, representing relationships\nlike "works at", "belongs to", "authored by", etc.\n\n**Connection Structure:**\n- FROM concept (ofTheConceptId) → TO concept (toTheConceptId)\n- The relationship is directional\n- Type ID classifies what kind of relationship it is\n- Order ID allows sorting when multiple connections of the same type exist\n\n**Important Behaviors:**\n- Connections are marked as temporary (isTemp = true) for internal compositions\n- Added to SyncData queue for backend synchronization\n- Assigned a random temporary ID until persisted\n- Self-connections (same from/to) are prevented (returns invalid connection)\n- Default access level is 4 (typically means "admin" or "restricted")\n\nParam: ofTheConceptId - The source concept ID (start of the relationship).\nThis is where the connection originates FROM.\nParam: userId - The ID of the user creating this connection. Used for ownership and permissions.\nParam: toTheConceptId - The target concept ID (end of the relationship).\nThis is where the connection points TO.\nParam: typeId - The type classification for this connection. Defines the nature of the relationship.\n(e.g., 5="works_at", 6="manages", 7="member_of")\n\nReturns: The created Connection object with all properties set, including a temporary ID'},CreateTheConnectionGeneral:{parameters:["ofTheConceptId","ofTheConceptUserId","toTheConceptId","typeId","orderId","accessId"]},CreateTheConnectionLocal:{parameters:["ofTheConceptId","toTheConceptId","typeId","orderId","typeString","userId","actions"],documentation:'Creates a connection in local storage (IndexedDB) without syncing to the backend.\n\nThis is the primary function for creating offline-first connections. The connection is stored\nlocally in IndexedDB and memory, but NOT immediately sent to the backend. Sync happens\nlater via LocalSyncData.SyncDataOnline().\n\n**Virtual ID System:**\n- Generates a negative ID (e.g., -67890) to indicate local/virtual status\n- id and ghostId are initially equal and both negative\n- After backend sync: id becomes positive (real backend ID)\n- ghostId remains negative (preserves original local ID)\n- Mapping is stored in backend and LocalGhostIdTree\n\n**Connection Types:**\n- **Internal Connections**: orderId < 3 (within a composition)\n- typeId is typically the composition ID\n- **External Connections**: orderId >= 999 (between different entities)\n- typeId is a type concept ID\n- typeString provides human-readable type name\n\n**Self-Connection Prevention:**\nIf ofTheConceptId equals toTheConceptId, returns an empty connection (prevents loops).\n\nParam: ofTheConceptId - Source concept ID (FROM). The connection originates here.\nCan be negative (local) or positive (server) ID.\nParam: toTheConceptId - Target concept ID (TO). The connection points here.\nCan be negative (local) or positive (server) ID.\nParam: typeId - The type classification for this connection.\n- For internal connections: composition ID\n- For external connections: type concept ID\nParam: orderId - Order identifier for sorting multiple connections.\n- < 3: Internal connection\n- >= 999: External connection\n- Defaults to 1\nParam: typeString - Human-readable type name (e.g., "the_person_email").\nUsed primarily for external connections. Defaults to empty string.\nParam: userId - The ID of the user creating this connection. Defaults to 999 (system).\nParam: actions - Action tracking object that accumulates created concepts and connections.\nUsed for batch operations and rollback. Defaults to empty arrays.\n\nReturns: Promise resolving to the created Connection object with negative ID.\nReturns empty connection (all IDs = 0) if self-connection attempted.'},DelayFunctionExecution:{parameters:["ms","callback"],documentation:"Param: ms The time required to wait before executing this function\nParam: callback This is the function that needs to be executed\nReturns: returns a promise for the resolve"},DeleteConceptById:{parameters:["id"]},DeleteConceptLocal:{parameters:["id"],documentation:"Deletes a concept from local storage (IndexedDB).\n\nThis function removes a concept from LocalConceptsData, effectively deleting it\nfrom the local IndexedDB cache. This is a local-only delete - it does NOT sync\nthe deletion to the backend.\n\n**Important Notes:**\n- Only deletes from local storage (IndexedDB)\n- Does NOT delete from backend server\n- Does NOT automatically delete related connections\n- For full deletion including backend, use DeleteConceptById\n- Works with both negative (local) and positive (synced) IDs\n\n**Use Cases:**\n- Cleaning up local draft concepts\n- Removing concepts before they're synced\n- Local cache management\n- Testing and development\n\n**Process:**\n1. Fetches the concept via GetTheConceptLocal\n2. Removes it from LocalConceptsData\n3. Updates IndexedDB\n\nParam: id - The concept ID to delete (negative for local, positive for synced)\n\nReturns: Promise that resolves when deletion is complete"},DeleteConnectionById:{parameters:["id"]},DeleteConnectionByIdBulk:{parameters:["ids"]},DeleteConnectionByType:{parameters:["id","linker"],documentation:"Param: id\nParam: linker\n@returns"},DeleteConnectionByTypeBulk:{parameters:["id","linkers"]},DeleteUser:{parameters:["id"]},DependencyObserver:{parameters:[],documentation:"Base observable class that tracks concepts and connections for reactive state management.\nImplements the observer pattern to notify subscribers when tracked data changes."},Environments:{parameters:[],documentation:"Static key-value store for runtime configuration values.\n\nUsed throughout the package for feature flags and settings that need to be\nreadable anywhere without passing parameters down the call stack.\n\n**Built-in keys:**\n- `'enableCache'` — controls widget and query caching (default `true`).\nSet via `init()` parameters or toggled at runtime. Checked on every\ncache read/write in `QueryCacheManager` and `WidgetCacheManager`."},FilterSearch:{parameters:[]},FormatFromConnections:{parameters:["linkers","compositionData","mainComposition","reverse"],documentation:"########## Format works with JUSTDATA / NORMAL ########### used for single origin concept\nParam: linkers this is the list of linkers that\nParam: compositionData\nParam: mainComposition\nParam: reverse list of connection ids that need to show reverse conneciton.\n@returns"},FormatFromConnectionsAltered:{parameters:["connections","compositionData","mainComposition","reverse"],documentation:"## Format is DATAID ##\nThis is altered format and is different from others because it passes all the connections prebuilt/prefetched\nThis will not let the connections to be again fetched from the memory.\nParam: connections the type connections that need (external connections) to be passed\nParam: compositionData this is a dictionary type of format that has all the build compositions {id: { actual data}}\nParam: mainComposition this is the id of the main composition that builds the tree\nParam: reverse this is the list of connections ids that needs to go to the reverse direction (to----\x3efrom)\n@returns"},FreeschemaQuery:{parameters:[]},FreeschemaQueryApi:{parameters:["query","token"],documentation:"Executes a freeschema query for flexible, schema-free data retrieval.\nSupports custom query structures with filters, pagination, and nested queries.\n\nParam: query - FreeschemaQuery object containing query parameters, filters, and nested queries\nParam: token - Authentication token (optional, defaults to empty string)\nReturns: Query results array or empty array on error"},GetAllConnectionsOfComposition:{parameters:["composition_id"],documentation:"Retrieves all connections belonging to a specific composition.\nChecks local cache first, then fetches from backend if needed.\n\n**Complex Logic**: First checks ConnectionData cache, then fetches from API,\ncompares with cached data to detect deletions, and updates cache.\n\nParam: composition_id - ID of the composition whose connections to retrieve\nReturns: Array of Connection objects for the composition"},GetAllConnectionsOfCompositionBulk:{parameters:["composition_ids"],documentation:"Retrieves connections for multiple compositions in bulk.\nOptimizes fetching by batching multiple composition IDs in one request.\n\n**Complex Logic**: Checks in-memory cache, fetches from API, detects deletions\nby comparing old and new data, and bulk-fetches related concepts.\n\nParam: composition_ids - Array of composition IDs to fetch connections for\nReturns: Array of Connection objects for all compositions"},GetAllTheConnectionsByTypeAndOfTheConcept:{parameters:["id","linker","reverse"],documentation:"This function returns all the connections from the ofTheConceptId and connection type\nParam: id ofTheConceptId\nParam: linker the connection type\nReturns: Array of connections"},GetComposition:{parameters:["id"],documentation:'Retrieves a complete composition structure for a given concept ID in JUSTDATA format.\n\nThis is a primary composition retrieval function that builds a hierarchical structure\ncontaining the main concept, all its connections, and recursively fetched related concepts.\nThe result is formatted as a nested object organized by concept types.\n\n**What is a Composition?**\nA composition represents a concept along with its connected relationships and sub-structures.\nThink of it as getting a "full profile" of a concept including everything connected to it.\n\n**Process:**\n1. Fetches all connections associated with the concept\n2. Identifies all related concept IDs from those connections\n3. Recursively builds the composition tree\n4. Fetches the main concept details\n5. Organizes output by concept type (e.g., result["Person"] = {...})\n6. Routes through service worker if enabled for better performance\n\n**Output Format (JUSTDATA):**\nReturns an object keyed by the main concept\'s type character value:\n```\n{\n"Person": {\nid: 123,\ncharacterValue: "Alice",\nconnections: [...],\nrelatedConcepts: {...}\n}\n}\n```\n\nParam: id - The unique identifier of the concept for which to build the composition.\nThis becomes the root of the composition tree.\n\nReturns: Promise resolving to an object containing the composition data organized by\nthe main concept\'s type. Returns empty object if concept not found or on error.'},GetCompositionBulk:{parameters:["conceptIds"],documentation:"## Format JUSTDATA ##\nFunction converts the conceptIds to json (compositions)\nThis function takes in the conceptIds and returns a list of compositions related to those concepts.\nParam: conceptIds list of concept ids that are compositions.\nReturns: compositions"},GetCompositionBulkWithDataId:{parameters:["conceptIds"],documentation:"## FORMAT DATAIDDATE ##\nFunction converts the conceptIds to json (compositions)\nParam: conceptIds this is the list of concept ids that should be converted to compostions in data - id format.\nReturns: list of compositions in the data - id format."},GetCompositionFromConnectionsWithDataId:{parameters:["conceptIds","connectionIds"],documentation:"## FORMAT DATAIDDATE ##\nThis function converts the conceptIds and internal connectionIds to compositions in data-Id format.\nParam: conceptIds This is the list of concept ids that need to be converted to compositions.\nParam: connectionIds These are the internal connectionIds that need to be passed to create the compositions.\nReturns: list of compositions created from the passed conceptIds and connectionIds."},GetCompositionFromConnectionsWithDataIdFromConnections:{parameters:["conceptIds","connectionIds"],documentation:"## FORMAT DATAIDDATE ##\nThis is just a different version of GetCompositionFromConnectionsWithDataId, This has the added functionality that\nit also prints out internal connections.\nThis function converts the conceptIds and internal connectionIds to compositions in data-Id format.\nParam: conceptIds This is the list of concept ids that need to be converted to compositions.\nParam: connectionIds These are the internal connectionIds that need to be passed to create the compositions.\nReturns: list of compositions created from the passed conceptIds and connectionIds."},GetCompositionFromConnectionsWithDataIdInObject:{parameters:["conceptIds","connections"],documentation:"## Format DATAIDDATE ##\nThis function converts the conceptIds and internal connections to create compositions.\nFormat is of a dictionary with ids as the key and value is the composition data.\nParam: conceptIds these are the concept ids that need to be fetched to create their compositions\nParam: connections these are the connections that are used to create the structure.\nReturns: a dictionary / object that has key as their conceptId and the value as their composition object."},GetCompositionFromConnectionsWithDataIdIndex:{parameters:["conceptIds","connectionIds"],documentation:"## Format DATAIDDATE ##\nThis function converts the conceptIds and internal connectionIds to compositions in data-Id format with index(conceptId).\nParam: conceptIds This is the list of concept ids that need to be converted to compositions.\nParam: connectionIds These are the internal connectionIds that need to be passed to create the compositions.\nReturns: dictionary of compositions created from the passed conceptIds and connectionIds with conceptId as its index ."},GetCompositionFromConnectionsWithIndex:{parameters:["conceptIds","connectionIds"],documentation:"## Format is dictionary with key as concept id and value as data (json) ##\nThis function converts the conceptIds and internal connectionIds to compositions format with index(conceptId).\nParam: conceptIds This is the list of concept ids that need to be converted to compositions.\nParam: connectionIds These are the internal connectionIds that need to be passed to create the compositions.\nReturns: dictionary of compositions created from the passed conceptIds and connectionIds with conceptId as its index ."},GetCompositionFromConnectionsWithIndexFromConnections:{parameters:["conceptIds","connectionIds"],documentation:"## FORMAT DATAIDDATE ##\nThis is just a different version of GetCompositionFromConnectionsWithDataId, This has the added functionality that\nit also prints out internal connections.\nThis function converts the conceptIds and internal connectionIds to compositions in data-Id format.\nParam: conceptIds This is the list of concept ids that need to be converted to compositions.\nParam: connectionIds These are the internal connectionIds that need to be passed to create the compositions.\nReturns: list of compositions created from the passed conceptIds and connectionIds."},GetCompositionFromMemoryWithConnections:{parameters:["id","connectionList"],documentation:"### Format Normal ####\nGets data just from memory\nParam: id\n@returns"},GetCompositionList:{parameters:["compositionName","userId","inpage","page"]},GetCompositionListAll:{parameters:["compositionName","userId","inpage","page"]},GetCompositionListAllWithId:{parameters:["compositionName","userId","inpage","page"]},GetCompositionListListener:{parameters:["compositionName","userId","inpage","page","format"],documentation:"Creates an observable that tracks a paginated list of compositions and updates subscribers when they change.\nParam: compositionName - The composition type name\nParam: userId - The user ID who owns the compositions\nParam: inpage - Number of items per page\nParam: page - Page number (1-indexed)\nParam: format - Output format (JUSTDATA, DATAID, NORMAL)\nReturns: Observable instance for the composition list"},GetCompositionListLocal:{parameters:["compositionName","userId"],documentation:'Retrieves all compositions of a specific type from local storage.\n\n**Process Flow**:\n1. Finds the type concept by compositionName (e.g., "the_project")\n2. Queries all concepts with that typeId belonging to the user\n3. Fetches full composition for each concept\n4. Returns array of complete compositions\n\nParam: compositionName - The type name of compositions to retrieve (e.g., "the_project", "the_person")\nParam: userId - User ID to filter compositions by ownership\nReturns: Array of composition objects (empty array if type not found)\n@throws Error if lookup or composition fetching fails'},GetCompositionListLocalWithId:{parameters:["compositionName","userId"],documentation:"Retrieves all compositions of a specific type with DATAID format (includes concept ID).\n\nSame as GetCompositionListLocal but returns compositions in data-id wrapper format,\nwhich includes both the composition data and its concept ID for easier reference.\n\nParam: compositionName - The type name of compositions to retrieve\nParam: userId - User ID to filter compositions by ownership\nReturns: Array of composition objects in {id, data} format\n@throws Error if lookup or composition fetching fails"},GetCompositionListWithId:{parameters:["compositionName","userId","inpage","page"]},GetCompositionListWithIdUpdated:{parameters:["compositionName","userId","inpage","page"]},GetCompositionListener:{parameters:["id","format"],documentation:"Creates an observable that tracks a composition and updates subscribers when it changes.\nParam: id - The composition concept ID to observe\nParam: format - Output format (JUSTDATA, DATAID, NORMAL)\nReturns: Observable instance for the composition"},GetCompositionLocal:{parameters:["id"],documentation:'Retrieves a complete composition structure from local storage (IndexedDB).\n\nThis function fetches a composition using local-only data, building a hierarchical\nstructure from local connections and concepts. If the concept has been synced to the\nbackend, it can automatically fall back to fetching from the server.\n\n**Process:**\n1. Fetches all local connections for the composition\n2. Identifies all connected concept IDs\n3. Retrieves the main concept from LocalConceptsData\n4. If concept not found locally, checks if it\'s been synced (TranslateLocalToReal)\n5. Falls back to server GetComposition if concept is synced\n6. Recursively builds composition tree from local data\n7. Organizes output by concept type\n\n**Local vs Server:**\n- Prioritizes local data (IndexedDB)\n- Automatic fallback to server if concept synced\n- Uses LocalConnectionData for connections\n- Uses LocalConceptsData for concepts\n\n**Output Format (JUSTDATA):**\nReturns an object keyed by the main concept\'s type:\n```\n{\n"Person": {\nname: "Alice",\nemail: {...},\nprojects: {...}\n}\n}\n```\n\nParam: id - The concept ID (can be negative for local or positive for synced)\n\nReturns: Promise resolving to composition data organized by concept type'},GetCompositionLocalWithId:{parameters:["id"],documentation:'Retrieves a local composition with ID and data wrapper (DATAID format).\n\nThis is a variant of GetCompositionLocal that returns the composition data\nwrapped in an object that includes both the data and the concept ID. This format\nis useful for tracking which concept the data belongs to.\n\n**Output Format (DATAID):**\n```\n{\ndata: {\n"Person": {\nname: "Alice",\nemail: {...}\n}\n},\nid: 12345\n}\n```\n\n**Differences from GetCompositionLocal:**\n- Returns { data, id } wrapper object\n- Same local data retrieval process\n- Same recursive building logic\n- No automatic server fallback\n\nParam: id - The concept ID (negative for local, positive for synced)\n\nReturns: Promise resolving to object with { data, id } structure'},GetCompositionWithAllIds:{parameters:["id"]},GetCompositionWithCache:{parameters:["id","connectionListPassed"]},GetCompositionWithDataIdBulk:{parameters:["ids","connections"]},GetCompositionWithDataIdWithCache:{parameters:["id","connectionListPassed"]},GetCompositionWithId:{parameters:["id"],documentation:"#### Format DATAID ####\n## This will return the composition even if it is not in the local memory ##\nParam: id\n@returns"},GetCompositionWithIdAndDateFromMemory:{parameters:["id"],documentation:"### Format DATAIDDATE #####\n### This just returns composition from memory and not from anywhere else.\nParam: id\n@returns"},GetConceptBulk:{parameters:["passedConcepts"],documentation:"This function takes in a list of ids and returns a list of concepts . This uses local memory to find concepts\nnamely in the concept binary tree. If it could not find the concepts in local memory then it fetches those from\nthe api. The fetched concepts from api are then stored in the memory for further use in future.\nParam: conceptIds list of concept ids that need to be fetched\nReturns: list of concepts"},GetConceptByCharacter:{parameters:["characterValue"]},GetConceptByCharacterAndCategoryLocal:{parameters:["character"],documentation:'Retrieves a local concept by character value, handling hierarchical type names.\n\n**Complex Logic**: For compound names (e.g., "the_person_email"):\n1. Splits string by underscore\n2. Recursively processes first part to get category ID\n3. Searches using character value and derived category\n4. Falls back to simple character search for single words\n\n**Special Case**: Returns concept with id=1 for character value "the".\n\nParam: character - The character value to find (e.g., "the_status", "the_person_email")\nReturns: Concept associated with the character value'},GetConceptByCharacterAndType:{parameters:["characterValue","typeId"],documentation:"Retrieves a concept by character value and type ID.\nChecks local cache first, then fetches from backend if not found.\n\n**Complex Logic**: Checks local ConceptsData cache, falls back to API,\nsupports service worker for offline capability.\n\nParam: characterValue - Character value string to search for\nParam: typeId - Type ID to filter by\nReturns: Concept object or null if not found"},GetConnectionBetweenTwoConceptsLinker:{parameters:["ofTheConcept","toTheConcept","linker","fullLinker","forward"],documentation:"This function will give you all the connections between two concepts by their linker or fullLinker\nParam: ofTheConcept start of the connecction\nParam: toTheConcept end of the connection\nParam: linker the primitive linkers with type connection (16) these are the old type of linkers (if you want full linker then put this as empty string)\nParam: fullLinker fullLinker is the modern linker (if you want linker then put this as empty string)\nParam: forward if you want to get the forward relation in the primitive linker put true else for backward linker false.\nReturns: list of connections"},GetConnectionBulk:{parameters:["connectionIds"],documentation:"After fetching these connections it is saved in the local static ConnectionBinaryTree so it can be reused without being fetched\nParam: connectionIds array of connection ids that need to fetched by the local system\nReturns: the list of connections that have been fetched"},GetConnectionById:{parameters:["id"]},GetConnectionDataPrefetch:{parameters:["connectionIds"],documentation:"Used to prefetch all the connections and their related concepts.\nParam: connectionIds these are the connection ids that are used to fetch all the connections and also their related concepts.\nReturns: all the connections that are passed as ids."},GetConnectionOfTheConcept:{parameters:["typeId","ofTheConceptId","userId","inpage","page"],documentation:"Retrieves connections originating from a specific concept.\nFetches connections filtered by type, concept, user, and pagination.\n\nParam: typeId - Type ID to filter connections by\nParam: ofTheConceptId - Concept ID that is the source of connections\nParam: userId - User ID to filter by\nParam: inpage - Number of results per page (default: 10)\nParam: page - Page number (default: 1)\nReturns: Array of Connection objects"},GetConnectionTypeForCount:{parameters:["countInfos"]},GetConnectionsBetweenApi:{parameters:["fetchConnections"],documentation:"Fetches connections matching the given criteria from POST /api/get-connection-between.\n\nAccepts an array so multiple independent queries can be resolved in one HTTP request.\nEach item in the array is resolved independently by the backend; results are returned\nin the same order with `connectionIds` and the resolved `typeId` populated.\n\n**Supported query permutations (per item):**\n1. `ofTheConceptId` + `toTheConceptId` + `type` — connections between two specific concepts of that type\n2. `ofTheConceptId` + `type` — all connections FROM a concept of that type\n3. `toTheConceptId` + `type` — all connections TO a concept of that type\n4. `typeId` + `isComposition: true` — all internal connections of a composition\n\nFields not relevant to the chosen permutation should be left at their zero/empty defaults.\nUse {@link buildFetchConnection} to build items without specifying every field manually.\n\nParam: fetchConnections - Array of query objects; each item is resolved independently.\nReturns: The same array with `connectionIds` and resolved `typeId` populated by the backend.\nReturns an empty array on error (error is logged internally)."},GetFreeschemaImage:{parameters:["url","format"],documentation:"Param: url this is the url of the image that you have. This image will be cached in the cache server\nParam: format this is the format it can be either normal , small, by default it is normal\n@returns"},GetFreeschemaImageUrl:{parameters:["url","format"],documentation:"Param: url this is the url of the image that you have. This image will be cached in the cache server\nParam: format this is the format it can be either normal , small, by default it is normal\n@returns"},GetImageApi:{parameters:["imageName"],documentation:"Retrieves an image by name from the cached images endpoint.\nReturns a readable stream for the image data.\n\nParam: imageName - Name/identifier of the image to retrieve\nReturns: Promise resolving to ReadableStream of image data, or null/undefined on error\n@throws Image stream on error (legacy behavior)"},GetLink:{parameters:["id","linker","inpage","page"]},GetLinkListListener:{parameters:["searchStructure","searchQuery","token","format"],documentation:"Creates an observable that tracks search results with complex query conditions and updates subscribers when results change.\nParam: searchStructure - Defines composition and linker types for the search\nParam: searchQuery - Array of query conditions to filter results\nParam: token - Authentication token\nParam: format - Output format (DATAID, NORMAL)\nReturns: Observable instance for the search results"},GetLinkListener:{parameters:["id","linker","inpage","page","format"],documentation:"Creates an observable that tracks linked concepts and updates subscribers when links change.\nParam: id - The source concept ID whose links to retrieve\nParam: linker - The linker type name defining the relationship\nParam: inpage - Number of items per page\nParam: page - Page number (1-indexed)\nParam: format - Output format (NORMAL, DATAID, JUSTDATA, DATAIDDATE)\nReturns: Observable instance for the linked concepts"},GetLinkRaw:{parameters:["id","linker","inpage","page"]},GetLinkerConnectionFromConcepts:{parameters:["id"]},GetLinkerConnectionToConcepts:{parameters:["id"]},GetRelation:{parameters:["id","relation","inpage","page","reverse"]},GetRelationLocal:{parameters:["id","relation","userId"],documentation:'Retrieves all related compositions from local storage by relation name.\n\n**Process Flow (Complex Logic)**:\n1. Converts relation string to type concept (e.g., "the_email" → type concept)\n2. Finds all connections from source concept with that relation type\n3. For each connection, retrieves the target composition\n4. Returns array of all related compositions\n\nParam: id - The source concept ID to get relations from\nParam: relation - The relation name (e.g., "the_email", "the_address")\nParam: userId - User ID for permissions\nReturns: Array of composition objects representing related entities\n@throws Error if relation lookup or composition retrieval fails'},GetRelationNew:{parameters:["id","relation","inpage","page","reverse"]},GetRelationRaw:{parameters:["id","relation","inpage","page","reverse"]},GetTheConcept:{parameters:["id","userId"],documentation:"Retrieves a concept by its ID with intelligent caching and multi-source lookup.\n\nThis is the primary function for fetching concepts in the system. It implements a sophisticated\nmulti-level retrieval strategy:\n\n**Retrieval Strategy:**\n1. Checks in-memory promise cache to prevent duplicate requests\n2. For negative IDs: Fetches from local IndexedDB (LocalConceptsData)\n3. For positive IDs: Checks local ConceptsData cache first\n4. If not in cache: Fetches from backend API\n5. Automatically resolves and attaches the concept's type information\n6. Routes through service worker if enabled for better performance\n\n**Features:**\n- Promise caching prevents duplicate concurrent requests for the same concept\n- Automatic type resolution (fetches and attaches type concept)\n- Access tracking integration (increments access counter if enabled)\n- Service worker support for background processing\n- Error logging and performance monitoring\n- Supports both server concepts (positive IDs) and local concepts (negative IDs)\n\nParam: id - The unique identifier of the concept to retrieve.\nPositive IDs = server concepts, Negative IDs = local-only concepts\nParam: userId - The ID of the user requesting the concept. Used for access tracking\nand audit logging. Defaults to 999 (system/anonymous user)\n\nReturns: Promise resolving to the Concept object if found, or a default empty Concept if not found"},GetTheConceptLocal:{parameters:["id"],documentation:"Retrieves a concept by ID with support for both local (virtual) and server concepts.\n\nThis is the primary function for fetching concepts in offline/local mode. It intelligently\nhandles three types of concept IDs and retrieves from appropriate sources:\n\n**ID Types Handled:**\n1. **Negative IDs (Virtual/Local)**: Concepts created locally not yet synced\n- Stored in LocalConceptsData (IndexedDB)\n- Return negative IDs\n\n2. **Synced Virtual IDs**: Originally local concepts now synced to backend\n- Looked up via LocalGhostIdTree (maps negative to positive IDs)\n- Returns positive (real) ID with ghostId reference\n\n3. **Positive IDs (Server)**: Real backend concepts\n- Fetched via GetTheConcept from backend\n- Converted to LConcept format\n- May have undefined ghostId\n\n**Retrieval Strategy:**\n- If id < 0: Check LocalConceptsData → Check LocalGhostIdTree\n- If id >= 0: Fetch from backend → Convert to LConcept\n- Routes through service worker if enabled\n- Returns default empty concept if not found\n\n**Ghost ID System:**\n- ghostId: Original negative ID (preserved after sync)\n- id: Current ID (negative if local, positive if synced)\n- LocalGhostIdTree maintains the mapping\n\nParam: id - The concept ID to retrieve. Can be:\n- Negative (e.g., -12345) for local-only concepts\n- Positive (e.g., 789) for server concepts\n\nReturns: Promise resolving to a Concept object in LConcept format.\nReturns default concept (id=0) if not found."},GetUserGhostId:{parameters:["userId","ghostId","sessionId"]},LConcept:{parameters:["id","userId","typeId","categoryId","accessId","characterValue","typeCharacter","isNew","entryTimeStamp","updatedTimeStamp","referentId"]},LConnection:{parameters:["id","ofTheConceptId","toTheConceptId","typeId","orderId","accessId"]},LocalConceptsData:{parameters:[]},LocalSyncData:{parameters:[]},LocalTransaction:{parameters:[]},LogEvent:{parameters:["EventName","EventDescription","event"]},Logger:{parameters:[]},LoginToBackend:{parameters:["email","password","application"],documentation:"Authenticates a user with the backend API and obtains an access token.\n\nThis is the primary authentication function that validates user credentials against the backend\nserver and retrieves a JWT bearer token for subsequent API requests.\n\n**Authentication Flow:**\n1. Sends email and password to backend login endpoint\n2. Receives JWT token in response\n3. Automatically stores token in TokenStorage.BearerAccessToken\n4. Token is used for all subsequent authenticated API calls\n5. Logs the authentication attempt for audit purposes\n\n**Features:**\n- Automatic token storage (no manual handling required)\n- Error handling and logging\n- Application-specific authentication\n- Performance and audit logging\n\n**Security Notes:**\n- Credentials are sent over HTTPS (ensure BaseUrl uses HTTPS)\n- Token is stored in memory (TokenStorage)\n- Token should be refreshed before expiration\n- Never log or expose the token in client-side code\n\nParam: email - The user's email address. Must be a valid registered email.\nUsed as the primary login identifier.\nParam: password - The user's password. Sent to backend for verification.\nShould meet password complexity requirements.\nParam: application - The application identifier for multi-tenant authentication.\nDefaults to \"boomconsole.com\". Used to scope authentication\nto specific applications in the system.\n\nReturns: Promise resolving to the authentication result object containing:\n- data.token: The JWT bearer token\n- user information\n- session details\nReturns undefined on error"},MakeTheInstanceConcept:{parameters:["type","referent","composition","userId","passedAccessId","passedSessionId","referentId"],documentation:"This is the basic function of the concept connection system. This function let's you create a concept within the constraints of the\nconcept connection system. This function is the building block of the concept connection system.\nParam: type this is the type of the concept. You can also think of this as the key of concept. first_name, last_name etc.\nParam: referent the actual value of the concept. The actual name of value of the concept.\nParam: composition this is a boolean that defines if the concept is a composition or not. If this is a composition then other things are also\nconnected internally with this concept. If composition is true then always a new concept is created otherwise it checks if the concept already exists\nand creates only in the case that the concept does not already exists with its type and value as its unique identifier.\nParam: userId the userId of the creator.\nParam: passedAccessId this is the accessId of the creator. By default should be 4.\nParam: passedSessionId this is the session that is created by the system.\nParam: referentId In case we need this concept to refer to any other concept.\nReturns: a concept which is either newly created or an older concept that already exists."},MakeTheInstanceConceptLocal:{parameters:["type","referent","composition","userId","accessId","sessionInformationId","referentId","actions"],documentation:'Creates or retrieves an instance concept locally - the core building block of the concept-connection system.\n\nThis is THE fundamental function for creating concepts in local storage. It implements an intelligent\nget-or-create pattern that checks for existing concepts before creating new ones, preventing duplicates\nwhile supporting both unique instances and composition concepts.\n\n**Core Behaviors:**\n1. **Composition Mode (composition=true)**: Always creates a new concept\n- Used for containers/objects that need unique instances\n- Marks concept with isComposition flag\n- Example: Each "Project" is unique, even with same name\n\n2. **Instance Mode (composition=false)**: Get-or-create pattern\n- Checks if concept with same type and value exists\n- Returns existing if found (deduplication)\n- Creates new only if not found\n- Example: "Published" status concept reused across items\n\n3. **Long Text Handling**: Values >255 characters always create new\n- Prevents expensive lookups on large text\n- Each long text gets unique concept\n\n**Type String Processing:**\n- **Best Practice**: Always pass type with "the_" prefix (e.g., "the_name", "the_email")\n- Auto-correction: If missing, "the_" is automatically added internally\n- "name" → "the_name" (auto-corrected)\n- "email" → "the_email" (auto-corrected)\n- "the_status" → "the_status" (already correct)\n- Creates type concept if it doesn\'t exist\n- **Recommendation**: Use explicit "the_" prefix for code clarity and consistency\n\n**Sync and Storage:**\n- Adds concept to LocalSyncData queue for backend sync\n- Stores in LocalConceptsData (IndexedDB)\n- Tracks in actions parameter for batch operations\n- Assigns negative ID (virtual/local)\n\n**Process Flow:**\n1. Normalizes type string (adds "the_" prefix)\n2. Creates/retrieves type concept via MakeTheTypeConceptLocal\n3. If composition=true: Creates new concept immediately\n4. If referent length >255: Creates new concept\n5. If regular instance: Checks for existing by type+value\n6. Returns existing or creates new\n7. Attaches type information\n8. Adds to sync queue\n\nParam: type - The type/key of the concept. **Should follow the format "the_xyz"**.\nRepresents what kind of data this is.\nExamples: "the_name", "the_email", "the_status", "the_first_name"\n\n**Note**: If you pass without "the_" prefix (e.g., "name"), the code will\nautomatically add it internally (becomes "the_name"). However, best practice\nis to always include the "the_" prefix for clarity and consistency.\n\nParam: referent - The actual value/content of the concept.\nThe human-readable data (e.g., "Alice", "alice@example.com", "Active").\nCan be empty string for composition concepts.\n\nParam: composition - Boolean flag determining creation behavior.\n- true: Always creates new concept (unique instances)\n- false: Get-or-create pattern (reuses existing)\nDefaults to false.\n\nParam: userId - The ID of the user creating this concept. Used for ownership and permissions.\n\nParam: accessId - Access control level. Typically 4 (default internal access).\nControls who can view/modify this concept.\n\nParam: sessionInformationId - Session identifier for tracking. Defaults to 999 (system).\nUsed for audit logging and session management.\n\nParam: referentId - Optional reference to another concept ID.\nUsed when this concept is an instance of or refers to another concept.\nDefaults to 0 (no reference).\n\nParam: actions - Action tracking object that accumulates all created concepts and connections.\nUsed for batch operations, rollback, and sync management.\nStructure: { concepts: Concept[], connections: Connection[] }\n\nReturns: Promise resolving to the created or retrieved Concept object with:\n- Negative ID if newly created locally\n- Attached type information (concept.type)\n- All standard concept properties'},MakeTheTimestamp:{parameters:["type","referent","userId","accessId","sessionInformationId"]},MakeTheTypeConceptApi:{parameters:["type","userId"],documentation:'This function is used to check the type concpet of a passed string\nif the text is "the_person" then the function finds the related concept\nParam: type This is the type of the concept that needs to be created.\nParam: userId This is the userId of the creator.\nReturns: the concept created.'},MakeTheTypeConceptLocal:{parameters:["typeString","sessionId","sessionUserId","userId","actions"],documentation:'Creates or retrieves a type concept locally - handles hierarchical type system.\n\nType concepts are placeholders/templates (e.g., "the_first_name", "the_email") that define\nwhat kind of data a concept represents. They have no actual value themselves.\n\n**Hierarchical Processing (Complex Logic)**:\n- Single word (e.g., "status"): Creates simple type concept with typeId=51\n- Compound words (e.g., "the_person_email"): Splits into parts and creates hierarchy:\n1. Creates category concept from first part ("the_person")\n2. Creates type concept from second part ("email")\n3. Creates final concept with category and type linked\n**Uses recursion** to build multi-level type hierarchies\n\nAlways checks for existing type concept before creating to prevent duplicates.\n\nParam: typeString - The type name to create (e.g., "the_status", "the_person_email")\nParam: sessionId - Session identifier (typically 999)\nParam: sessionUserId - Session user ID (typically 999, not used)\nParam: userId - User creating the type concept\nParam: actions - Action tracking for batch operations\nReturns: Type Concept (existing or newly created)'},PatcherStructure:{parameters:[]},Prototype:{parameters:[]},RecursiveSearchApi:{parameters:["composition","listLinkers","textSearch","fullLinkers"],documentation:'Performs recursive search through composition hierarchy.\nSearches through nested compositions using linker relationships.\n\n**Complex Logic**: Constructs SearchQuery, fetches composition IDs and connections,\nprocesses internal/external connections, and builds composition objects from results.\n\nParam: composition - Root composition ID to start search from (default: 0)\nParam: listLinkers - Array of linker strings to traverse (default: [])\nParam: textSearch - Text search filter (default: "")\nParam: fullLinkers - Array of full linker paths (default: [])\nReturns: Array of composition objects with connections'},RecursiveSearchApiNewRawFullLinker:{parameters:["composition","fullLinkers","textSearch"],documentation:'New version of recursive search with full linker paths.\nAlternative implementation of RecursiveSearchApiRawFullLinker.\n\nParam: composition - Root composition ID (default: 0)\nParam: fullLinkers - Array of complete linker path strings (default: [])\nParam: textSearch - Text search filter (default: "")\nReturns: Raw API response object with compositionIds and connections'},RecursiveSearchApiRaw:{parameters:["composition","listLinkers","textSearch","fullLinkers"],documentation:'Performs recursive search returning raw API response.\nReturns unprocessed result with composition IDs and connection arrays.\n\nParam: composition - Root composition ID (default: 0)\nParam: listLinkers - Array of linker strings (default: [])\nParam: textSearch - Text search filter (default: "")\nParam: fullLinkers - Array of full linker paths (default: [])\nReturns: Raw API response object with compositionIds, internalConnections, externalConnections'},RecursiveSearchApiRawFullLinker:{parameters:["composition","fullLinkers","textSearch"],documentation:'Performs recursive search using full linker paths, returning raw response.\nUses complete linker path specifications instead of partial linkers.\n\nParam: composition - Root composition ID (default: 0)\nParam: fullLinkers - Array of complete linker path strings (default: [])\nParam: textSearch - Text search filter (default: "")\nReturns: Raw API response object with compositionIds and connections'},RecursiveSearchApiWithInternalConnections:{parameters:["composition","listLinkers","textSearch"],documentation:'Performs recursive search returning results with internal connections.\nSimilar to RecursiveSearchApi but uses different connection formatting.\n\nParam: composition - Root composition ID to start search from (default: 0)\nParam: listLinkers - Array of linker strings to traverse (default: [])\nParam: textSearch - Text search filter (default: "")\nReturns: Array of composition objects with internal connections'},RecursiveSearchListener:{parameters:["id","linkers","searchText","format"],documentation:"Creates an observable that performs recursive multi-level searches and updates subscribers when results change.\nParam: id - The starting concept ID for the recursive search\nParam: linkers - Array of linker type names defining the traversal path\nParam: searchText - Optional text to search for in linked concepts\nParam: format - Output format (RAW for raw IDs, undefined for formatted compositions)\nReturns: Observable instance for the recursive search"},SchemaQuery:{parameters:["query","token"],documentation:"Executes a free-schema query once without creating a subscription.\nParam: query - FreeschemaQuery object with search parameters\nParam: token - Authentication token\nReturns: Promise resolving to formatted query results"},SchemaQueryListener:{parameters:["query","token"],documentation:"Creates an observable that executes a free-schema query and updates subscribers when results change.\nParam: query - FreeschemaQuery object with search, filter, sort, and pagination parameters\nParam: token - Authentication token\nReturns: Observable instance for the query results"},SearchAllConcepts:{parameters:["type","search","composition","token","inpage","page"],documentation:'Searches for concepts matching specified criteria with pagination support.\n\nThis is the primary search function for querying concepts in the system. It performs a\nbackend API search with multiple filter parameters and returns paginated results.\n\n**Search Capabilities:**\n- Text-based search on concept character values\n- Type filtering (search within specific concept types)\n- Composition filtering (search within specific compositions)\n- Pagination support (page size and page number)\n- Authenticated requests (requires valid access token)\n\n**Use Cases:**\n- Finding concepts by name or partial text match\n- Filtering results by concept type (e.g., only "Person" concepts)\n- Searching within a specific composition context\n- Building paginated search UIs\n\nParam: type - The type filter for the search. Can be a type name (e.g., "Person", "Document")\nor empty string to search all types. Used to narrow results to specific concept types.\nParam: search - The search query string. Searches against concept character values (names/titles).\nCan be partial matches depending on backend implementation.\nParam: composition - Composition context filter. Can be a composition ID or identifier to limit\nsearch scope to concepts within a specific composition. Use empty string for global search.\nParam: token - The JWT authentication token. Required for authorized access to backend search API.\nShould be the BearerAccessToken from TokenStorage.\nParam: inpage - Number of results per page. Controls page size for pagination. Defaults to 10.\nMust be a positive integer.\nParam: page - The page number to retrieve (1-indexed). Defaults to 1 (first page).\nUse for pagination: page 1, page 2, etc.\n\nReturns: Promise resolving to an array of matching Concept objects, or empty array on error/no results'},SearchLinkInternal:{parameters:["searchQuery","token"]},SearchLinkInternalAll:{parameters:["searchQuery","token"]},SearchLinkMultipleAll:{parameters:["searchQuery","token","caller","format"]},SearchLinkMultipleAllObservable:{parameters:["searchQuery","token","format"],documentation:"Creates a new multi-search observable.\nParam: searchQuery - Array of SearchQuery objects defining search conditions\nParam: token - Authentication token\nParam: format - Output format (DATAID by default)"},SearchLinkMultipleApi:{parameters:["searchQuery","token"],documentation:"Searches for concepts using multiple linked queries with performance tracking.\nExecutes complex multi-criteria searches across concept relationships.\n\nParam: searchQuery - Array of SearchQuery objects defining linked search criteria\nParam: token - Authentication token (optional, defaults to empty string)\nReturns: Array of search results or empty array on error"},SearchQuery:{parameters:[]},SearchStructure:{parameters:[]},SearchWithLinker:{parameters:["searchQuery","token"],documentation:"Searches concepts using multiple linker queries with authentication.\nAllows complex searches by combining multiple search query conditions.\n\nParam: searchQuery - Array of search query objects defining search criteria\nParam: token - Authentication token (optional, defaults to empty string)\nReturns: Array of matching search results or empty array on error"},SearchWithTypeAndLinker:{parameters:["searchStructure","searchQuery","token"],documentation:"This function will help you search a concept by their type and also to query inside of it.\nPut the number of compositions you want to get in the searchStructure which can be set by inpage and page\nThen the type should be set in searchQuery for the compositionName.\nInside the searchQuery array this you can set the full linker / listLinker in the searchQuery.\nThis will not give the id of the structures."},SearchWithTypeAndLinkerApi:{parameters:["searchStructure","searchQuery","token"],documentation:"Searches concepts by type with additional linker query filters.\nCombines type-based search with linker queries for refined results.\n\n**Complex Logic**: Constructs URL with search structure parameters, then applies\nlinker queries as POST body for multi-dimensional filtering.\n\nParam: searchStructure - Structure containing search text, type, pagination, and auth flag\nParam: searchQuery - Array of linker query objects for additional filtering\nParam: token - Authentication token (optional, defaults to empty string)\nReturns: Array of concepts matching both type and linker criteria, or empty array on error"},Selector:{parameters:["mainType","selector","parentElement","filterType","inpage"]},SessionData:{parameters:[]},Signin:{parameters:["signinInfo"],documentation:"Alternative sign-in function using SigninModel structure.\n\nSimilar to LoginToBackend but returns FreeschemaResponse format and\ndoes NOT automatically store the token. You must manually handle the token.\n\nParam: signinInfo - SigninModel object containing email and password\nReturns: FreeschemaResponse with {status, statusCode, message, data} structure\ndata contains user information and token (not auto-stored)"},Signup:{parameters:["signupModel"],documentation:"Registers a new user account on the backend server.\n\nCreates a new user with provided signup information including email, password,\nusername, and profile details.\n\nParam: signupModel - SignupModel object containing:\n- email: User's email address\n- password: User's password\n- username: Unique username\n- fname: First name\n- lname: Last name\n- title: Title/gender\n- type: User type\nReturns: FreeschemaResponse with signup result (status, message, data)"},SignupEntity:{parameters:["signupData"],documentation:"Registers a new entity (organization/company account) on the backend.\n\nCreates entity-type accounts (different from regular user accounts).\nIncludes timestamp for registration tracking.\n\nParam: signupData - Signup data object containing:\n- type: Entity type\n- username: Unique username\n- title: Title/designation\n- email: Entity email\n- password: Account password\n- timestamp: Registration timestamp (ISO string)\n- fname: First name / Entity name\n- lname: Last name / Additional info\nReturns: Response JSON with entity creation result\n@throws Error if signup fails (404, 500, or other HTTP errors)"},SplitStrings:{parameters:["typeString"]},StatefulWidget:{parameters:[],documentation:"Stateful widget with lifecycle management and hierarchical composition.\n\nProvides a React-like component system with state management, lifecycle hooks,\nand parent-child widget relationships. Extend this class to create custom widgets\ncompatible with the concept connection system."},SyncData:{parameters:[]},TokenStorage:{parameters:[]},TrashTheConcept:{parameters:["id","token"],documentation:"Deletes (trashes) a concept from the backend with explicit token auth.\n\nAlternative delete function that requires manual token passing.\nSimilar to DeleteTheConcept but with explicit authentication parameter.\n\nParam: id - The concept ID to delete\nParam: token - Bearer authentication token\n@throws Error if deletion fails"},UpdateComposition:{parameters:["patcherStructure"]},UpdateCompositionLocal:{parameters:["patcherStructure","actions"],documentation:"Updates/patches a composition in local storage with new or modified properties.\n\n**Complex Patching Logic** (197 lines):\n1. Fetches latest composition data from backend (all connections and concepts)\n2. Iterates through patchObject properties to add/update\n3. For each property:\n- If value is object/array: Creates composition concept and nested composition\n- If value is primitive: Creates instance concept with value\n- Checks if concept type already exists in composition\n- If exists: Marks old connections for deletion (replaces old value)\n- If new: Simply adds new connection\n4. Creates connections between parent composition and new/updated concepts\n5. Deletes old connections (cleanup)\n6. Syncs changes to backend\n\n**Use Case**: Updating fields in an existing composition without recreating it entirely.\n\nParam: patcherStructure - Object containing:\n- compositionId: The composition to update\n- ofTheCompositionId: Optional parent composition for nested updates\n- patchObject: Object with key-value pairs to add/update\n- userId, sessionId, accessId: User context\nParam: actions - Action tracking for batch operations and rollback"},UserBinaryTree:{parameters:[]},Validator:{parameters:[]},ViewInternalData:{parameters:["ids"]},ViewInternalDataApi:{parameters:["ids"],documentation:"Retrieves internal data (connections and concepts) for multiple compositions.\nReturns a dictionary mapping composition IDs to their internal connection arrays.\n\n**Complex Logic**: For each composition ID, fetches connections and related concepts,\nbuilds a dictionary structure, and bulk-loads concepts for efficiency.\n\nParam: ids - Array of composition IDs to fetch internal data for\nReturns: Dictionary mapping composition ID to Connection arrays, or empty array on error"},WidgetTree:{parameters:[],documentation:"Hierarchical widget tree structure for nested widget composition.\n\nRepresents a widget and its complete metadata including HTML, styles, scripts,\nlifecycle hooks, and child widgets. Used for building complex widget hierarchies."},buildFetchConnection:{parameters:["query"],documentation:"Builds a complete FetchConnection request object from a partial query,\nfilling unspecified fields with their zero/empty defaults.\n\nUse this instead of constructing FetchConnection manually so you only\nneed to specify the fields relevant to your query permutation.\n\nParam: query - Partial query with only the fields you need.\nReturns: A fully initialised FetchConnection ready to send to the API."},clearAllCaches:{parameters:[],documentation:"Clears all application caches (both in-memory and IndexedDB).\n\nCall this on user logout or when you need to force-refresh all cached data.\nClears widget caches (standard, latest, recent) and query caches."},convertFromConceptToLConcept:{parameters:["concept"]},convertFromLConceptToConcept:{parameters:["lconcept"]},convertWidgetTreeToWidget:{parameters:["tree","parentElement","isMain","props","state","parentWidget"],documentation:"Converts a widget tree structure into live widget instances and mounts to DOM.\n\nRecursively instantiates widgets from tree data, sets up parent-child relationships,\napplies styles, and mounts to the specified parent element.\n\nParam: tree - The widget tree to convert\nParam: parentElement - DOM element to mount the widget to\nParam: isMain - Whether this is the main/root widget\nParam: props - Optional properties to pass to the widget\nParam: state - Optional state data to pass to the widget\nParam: parentWidget - Parent widget instance for context\nReturns: Promise resolving to the instantiated widget"},convertWidgetTreeToWidgetWithWrapper:{parameters:["tree","parentElement","isMain","state","isInDevelopment","parentWidget"],documentation:"Converts widget tree to widget instances with development mode wrapper support.\n\nSimilar to convertWidgetTreeToWidget but includes development mode features\nlike visual editing and type selection.\n\nParam: tree - The widget tree to convert\nParam: parentElement - DOM element to mount the widget to\nParam: isMain - Whether this is the main/root widget\nParam: state - Optional state data to pass to the widget\nParam: isInDevelopment - Enable development mode features\nParam: parentWidget - Parent widget instance for context\nReturns: Promise resolving to the instantiated widget"},createFormFieldData:{parameters:["fieldName"]},createPrototypeLocal:{parameters:["prototype","passedTransaction"]},dispatchIdEvent:{parameters:["id","data"],documentation:"Method to dispatch Event received from SW\nParam: id number|string\nParam: data any"},getFromDatabaseWithType:{parameters:["databaseName","type","id"]},getObjectsFromIndexDb:{parameters:["databaseName"]},getTsccsAutocompleteMetadata:{parameters:[]},getUploadFileLimit:{parameters:[]},getUserDetails:{parameters:[],documentation:'Returns user details synchronously.\nPriority: in-memory profileCache (encrypted) → legacy localStorage("profile") fallback.'},getWidgetBulkFromId:{parameters:["widgetId","visitedWidgets","bulkWidget","token"],documentation:"Builds a complete widget tree from bulk widget data.\n\nRecursively processes widget hierarchy including children, custom functions,\nlibraries, and lifecycle hooks to create a full WidgetTree structure.\n\nParam: widgetId - The widget ID to build tree for\nParam: visitedWidgets - Array tracking visited widgets to prevent cycles\nParam: bulkWidget - Bulk widget data from backend\nParam: token - Optional authentication token\nReturns: Promise resolving to the complete widget tree"},getWidgetFromId:{parameters:["widgetId","visitedWidgets","token"],documentation:"Fetches and builds a complete widget tree from a widget ID.\n\nParam: widgetId - The widget ID to fetch\nParam: visitedWidgets - Array to track visited widgets (prevents cycles)\nParam: token - Optional authentication token\nReturns: Promise resolving to the widget tree"},importLatestWidget:{parameters:["widgetId","attachNode","props","showDocumentation"],documentation:"Imports the latest version of a widget into cache for later rendering.\n\nFetches widget data, builds widget tree, and stores in DataCache.\nUsed for pre-loading widgets before rendering.\n\nParam: widgetId - The widget origin ID to import\nParam: attachNode - Optional DOM element (for future use)\nParam: props - Optional properties to pass to the widget\nParam: showDocumentation - Whether to show documentation button\nReturns: Promise resolving to the widget tree"},importRecentWidget:{parameters:["widgetId","attachNode","props","showDocumentation"],documentation:"Imports the latest version of a widget into cache for later rendering.\n\nFetches widget data, builds widget tree, and stores in DataCache.\nUsed for pre-loading widgets before rendering.\n\nParam: widgetId - The widget origin ID to import\nParam: attachNode - Optional DOM element (for future use)\nParam: props - Optional properties to pass to the widget\nParam: showDocumentation - Whether to show documentation button\nReturns: Promise resolving to the widget tree"},init:{parameters:["url","aiurl","accessToken","nodeUrl","enableAi","applicationName","enableSW","flags","parameters"],documentation:'Initializes the mftsccs-browser package and sets up all required subsystems.\n\nThis is the FIRST function you must call before using any other functionality in the package.\nIt configures the backend connections, initializes local databases, sets up service workers,\nand prepares the system for concept and connection operations.\n\n**Initialization Process:**\n1. Configures Base URLs for backend, AI, and node servers\n2. Sets up access token for authenticated requests\n3. Generates unique application randomizer for IndexedDB identification\n4. Initializes feature flags (logging, access tracking, etc.)\n5. Checks for service worker support\n6. Initializes local IndexedDB databases for caching\n7. Sets up message listeners for service worker communication\n8. Optionally registers and activates service worker\n9. Falls back to main thread if service worker unavailable\n\n**Subsystems Initialized:**\n- IndexedDB databases (concepts, connections, settings)\n- Service worker (if enabled and supported)\n- Message passing between main thread and service worker\n- Broadcast channel for cross-tab communication\n- Access token storage\n- Logging and monitoring systems\n- Access tracking (if enabled)\n\nParam: url - The backend API base URL (C# data fabric server).\nThis is the primary server for concept and connection data.\nExample: "https://api.example.com" or "https://backend.yourdomain.com"\n**Required** for most operations.\n\nParam: aiurl - The AI service URL for AI-powered features and data preloading.\nIf not using AI features, pass empty string and set enableAi to false.\nExample: "https://ai.example.com"\n\nParam: accessToken - JWT bearer token for authenticated API requests.\nCan be empty string on initialization - set later with updateAccessToken().\nToken is obtained through LoginToBackend() or Signin().\nExample: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."\n\nParam: nodeUrl - The Node.js server URL for business logic and security features.\nUsed for additional server-side operations.\nExample: "https://node.example.com"\n\nParam: enableAi - Flag to enable/disable AI features and AI data preloading to IndexedDB.\nSet to false if not using AI features or if aiurl is not provided.\nDefault: true\n\nParam: applicationName - Unique identifier for your application.\nUsed to create separate IndexedDB instances for different apps.\nExample: "my-app-v1", "project-manager", "knowledge-base"\nUseful when multiple applications share the same domain.\n\nParam: enableSW - Service worker configuration object. Service worker enables background\nprocessing for better performance and offline capabilities.\n- activate: boolean - Enable/disable service worker\n- scope: string (optional) - Service worker scope path (default: "/")\n- pathToSW: string (optional) - Path to service worker file (default: "/service-worker.js")\n- manual: boolean (optional) - If true, assumes SW already registered manually\nExample: {activate: true, scope: "/", pathToSW: "/sw.js"}\n\nParam: flags - Feature flags object for enabling/disabling various features:\n- logApplication: boolean - Enable application-level logging\n- logPackage: boolean - Enable package-level logging\n- accessTracker: boolean - Enable access tracking/analytics\n- isTest: boolean - Mark as test environment\nAll default to false if not specified.\n\nParam: parameters - Additional configuration parameters:\n- logserver: string - Custom log server URL (default: "https://logdev.freeschema.com")\n- isPwa: boolean - Enable PWA offline persistence to IndexedDB (default: false)\n- enableCache: boolean - Enable/disable widget and FreeschemaQuery caching.\nWhen false, QueryCacheManager and WidgetCacheManager skip all reads and writes\n(memory and IndexedDB). Stored in Environments under key \'enableCache\' so it\ncan be read or changed at runtime via Environments.getValue/setValue.\nDefault: true.\n\nReturns: Promise<boolean> - Returns true if initialization succeeds, undefined if it fails.\nOn failure, falls back to main thread operation and logs warnings.'},orderTheConnections:{parameters:["connections","order"]},recursiveFetch:{parameters:["id","connectionList","compositionList","visitedConcepts"],documentation:"## Format justdata ##\nParam: id\nParam: connectionList\nParam: compositionList\nParam: visitedConcepts\n@returns"},recursiveFetchNew:{parameters:["id","connectionList","conceptList","compositionList","visitedConcepts"]},removeAllChildren:{parameters:["parent"]},renderImportedWidget:{parameters:["widgetId","attachNode","props","showDocumentation"],documentation:"Renders a previously imported widget from cache.\n\nRetrieves widget tree from DataCache and renders it to the DOM.\nMust call importLatestWidget() first to populate cache.\n\nParam: widgetId - The widget origin ID to render\nParam: attachNode - DOM element to attach the widget to\nParam: props - Optional properties to pass to the widget\nParam: showDocumentation - Whether to show documentation button\nReturns: Promise resolving to the rendered widget instance"},renderLatestWidget:{parameters:["widgetId","attachNode","props","showDocumentation"],documentation:'Renders the latest published version of a widget.\n\nFetches and renders the most recent version of a widget by origin ID.\nAutomatically handles "use latest" flag for child widgets.\n\nParam: widgetId - The widget origin ID to render\nParam: attachNode - DOM element to attach the widget to\nParam: props - Optional properties to pass to the widget\nParam: showDocumentation - Whether to show documentation button'},renderPage:{parameters:["pageId","attachNode","props","showDocumentation"],documentation:"Renders a complete page with its widgets and properties.\n\nFetches page data, applies page-level properties (meta tags, styles), and renders\nthe page body widget. Adds fspage class for styling.\n\nParam: pageId - The page concept ID to render\nParam: attachNode - DOM element to attach the page to\nParam: props - Optional properties to pass to the page widget\nParam: showDocumentation - Whether to show documentation button"},renderWidget:{parameters:["widgetId","attachNode","props","showDocumentation"],documentation:"Renders a specific widget by ID.\n\nFetches widget data and renders the exact version specified (not latest).\n\nParam: widgetId - The specific widget ID to render\nParam: attachNode - DOM element to attach the widget to\nParam: props - Optional properties to pass to the widget\nParam: showDocumentation - Whether to show documentation button\nReturns: Promise resolving to the rendered widget instance"},searchLinkMultipleListener:{parameters:["searchQueries","token","format"],documentation:"Creates an observable that executes multiple search queries and updates subscribers when results change.\nParam: searchQueries - Array of SearchQuery objects defining search conditions\nParam: token - Authentication token\nParam: format - Output format (DATAID by default)\nReturns: Observable instance for the search results"},sendEmail:{parameters:["body","token","bulk"]},sendMessage:{parameters:["type","payload","retryCount"],documentation:"Method to send message to the service worker from main thread\nParam: type string\nParam: payload any\nReturns: Promise<any>"},setHasActivatedSW:{parameters:["value"]},storeToDatabase:{parameters:["databaseName","object"]},unwrapContainers:{parameters:["parentElement","selector"],documentation:"Recursively unwraps all matching container elements within a parent.\n\nParam: parentElement - Parent element to search within\nParam: selector - CSS selector for containers to unwrap"},updateAccessToken:{parameters:["accessToken","session"],documentation:'Updates the JWT access token used for authenticated API requests.\n\nThis function should be called after user authentication to set or update the bearer token\nthat will be used for all subsequent authenticated operations. The token is stored in\nTokenStorage and automatically included in API request headers.\n\n**When to Use:**\n- After successful login (LoginToBackend or Signin)\n- When refreshing an expired token\n- When switching between user sessions\n- When restoring a saved session on app reload\n\n**Token Flow:**\n1. User logs in via LoginToBackend() or Signin()\n2. Backend returns JWT token\n3. Call updateAccessToken() with the token\n4. Token is stored in memory (TokenStorage.BearerAccessToken)\n5. All API calls automatically use this token\n6. If service worker enabled, token is synced to service worker\n\n**Security Notes:**\n- Token is stored in memory only (not persisted to disk)\n- Token is cleared on page refresh (unless you save/restore it)\n- Never expose token in logs or client-side code\n- Token should be refreshed before expiration\n\nParam: accessToken - The JWT bearer token obtained from authentication.\nFormat: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."\nPass empty string to clear the token (logout).\n\nParam: session - Optional session information to sync with token.\nReserved for future use. Currently not fully implemented.\n\nReturns: void'},uploadAttachment:{parameters:["file","token"],documentation:"Generic method to upload file or image\nParam: file File\nReturns: Promise<{message: string, success: boolean, url?: string}>"},uploadFile:{parameters:["body","token"],documentation:"Method to upload file to server\nParam: body FormData\nParam: token string?\nReturns: JSON | string | null"},uploadImage:{parameters:["body","token"],documentation:"Method to upload image to server\nParam: body FormData\nParam: token string?\nReturns: JSON | string | null"},uploadImageV2:{parameters:["body","token"],documentation:"Method to upload image to server\nParam: body FormData\nParam: token string?\nReturns: JSON | string | null"}}};function Oo(){return Ro}const Bo={number:/^\d+(\.\d+)?$/,text:/^[\s\S]*$/,textOnly:/^[A-Za-z\s]+$/,email:/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/,document:/\.(pdf|docx?|pptx?|xlsx?)$/i,sound:/\.(mp3|wav|ogg|flac)$/i,image:/\.(jpg|jpeg|png|gif|bmp|svg|webp)$/i,video:/\.(mp4|avi|mov|mkv|flv|webm)$/i,url:/^(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([/\w .-]*)*\/?$/,date:/^\d{4}-\d{2}-\d{2}$/,time:/^(?:[01]\d|2[0-3]):[0-5]\d$/,password:/^.{6,}$/,ipaddress:/^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$|^([0-9a-fA-F]{1,4}:){7}([0-9a-fA-F]{1,4})$/,uuid:/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/};var Fo=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class Uo{constructor(){Uo.cacheInitialized||Uo.initializeAnomalyParameters()}static initializeAnomalyParameters(){return Fo(this,void 0,void 0,function*(){try{yield Uo.getAnomalyParameters();Uo.refreshCache(),Uo.cacheInitialized=!0}catch(e){}})}static getAnomalyParameters(){return Fo(this,void 0,void 0,function*(){const e=Date.now();if(Uo.anomalyParamsCache&&e-Uo.lastFetchedTime<Uo.cacheExpiryThreshold)return Uo.anomalyParamsCache;try{return yield Uo.fetchAnomalyParameters()}catch(e){throw e}})}static fetchAnomalyParameters(){return Fo(this,void 0,void 0,function*(){try{const e=yield fetch("https://devai.freeschema.com/v1/get-frontend-anomaly-parameters",{method:"GET",headers:{"Content-Type":"application/json"}});if(!e.ok)throw new Error("Failed to fetch anomaly parameters");const t=yield e.json();return Uo.anomalyParamsCache=t.data,Uo.lastFetchedTime=Date.now(),t.data}catch(e){throw e}})}static refreshCache(){return Fo(this,void 0,void 0,function*(){try{Date.now()-Uo.lastFetchedTime>Uo.cacheExpiryThreshold&&(yield Uo.getAnomalyParameters())}catch(e){}})}detectDataType(e){for(const[t,n]of Object.entries(Bo))if(n.test(e))return t;return null}checkConceptAnomaly(e,t){return Fo(this,void 0,void 0,function*(){const n=[];try{if(!t)return n.push("Null value"),{valid:!1,warnings:n};const o=Uo.anomalyParamsCache;e.startsWith("the_")||(e=`the_${e}`);const i=o[e];if(!i)return n.push(`No concept details found for type: ${e}`),{valid:!1,warnings:n};const r=t.length,{min_length:a,max_length:s,data_types:c}=i,l=r>=a&&r<=s,d=this.detectDataType(t),u=c.includes(d);return l||n.push(`Length of '${t}' is outside the allowed range (min: ${a}, max: ${s}). Current length: ${r}.`),u||n.push(`Type mismatch for '${t}'. Expected types: ${c.join(", ")}, detected type: ${d}.`),l&&u&&n.push(`Concept ${e} is valid. Length: ${r}, Type: ${d}`),{valid:l&&u,warnings:n}}catch(e){return{valid:!1,warnings:n}}})}static checkAnomalyInBulk(e){return Fo(this,void 0,void 0,function*(){Uo.cacheInitialized||(yield Uo.initializeAnomalyParameters());try{const t={};for(const[n,o]of Object.entries(e)){const e=o.value,{valid:i,warnings:r}=yield(new Uo).checkConceptAnomaly(n,e);t[n]={valid:i,warnings:r}}return t}catch(e){throw e}})}static getExportedFunction(){return Object.keys(o)}static getFunctionaAnomalyParameters(){}}Uo.anomalyParamsCache=null,Uo.cacheInitialized=!1,Uo.lastFetchedTime=0,Uo.cacheExpiryThreshold=6e5;var Go=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class Mo{checkUniqueness(e,t){return Go(this,void 0,void 0,function*(){const n=mo.V.logfunction("checkUniqueness");e.startsWith("the_")||(e="the_"+e);let o=(yield me(e,999)).id;return!((yield(0,se.A)(t,o)).id>0)&&(mo.V.logUpdate(n),!0)})}validateField(e){return Go(this,void 0,void 0,function*(){var t;const n=mo.V.logfunction("validateField");try{performance.now();const o={},{name:i,value:r,type:a,dataType:s,pattern:c,conceptType:l,maxLength:d,minLength:u,minValue:h,maxValue:p,accept:f,file:m,required:y,isUnique:v}=e;if(!y||null!==r&&""!==r||(o.required=`The field ${i} is required.`),s&&r){let e=Bo[s];e&&""!==r&&!e.test(r)&&(o.dataType=`Invalid value for ${s}`)}if(c&&r){const e="string"==typeof c?new RegExp(c):c;""===r||e.test(r)||(o.pattern="Pattern doesn't match with value")}if(r&&null!=d&&r.length>d&&(o.maxLength=`Length exceeds the maximum length of ${d}`),r&&null!=u&&r.length<u&&(o.minLength=`Length must be at least ${u} characters long`),null!=h&&r&&!isNaN(Number(r))&&Number(r)<h&&(o.minValue=`Value must be greater than or equal to ${h}`),null!=p&&r&&!isNaN(Number(r))&&Number(r)>p&&(o.maxValue=`Value must be less than or equal to ${p}`),m&&a&&f){const e=f.split(",").map(e=>e.trim().toLowerCase()),n=null===(t=m.name.split(".").pop())||void 0===t?void 0:t.toLowerCase();n&&!e.includes(n)&&(o.accept=`File must be a valid file type: ${e.join(", ")}`)}if(l&&v&&r){(yield this.checkUniqueness(l,r))||(o.unique="Value is not unique")}return mo.V.logUpdate(n),o}catch(e){throw(0,p.ey)(n,"Validator.validateField",e),e}})}validateForm(e){return Go(this,void 0,void 0,function*(){const t=mo.V.logfunction("validateForm");try{performance.now();const n={};for(const t in e){const o=yield this.validateField(e[t]);Object.keys(o).length>0&&(n[t]=o)}return mo.V.logUpdate(t),n}catch(e){throw(0,p.ey)(t,"Validator.validateForm",e),e}})}validate(e){const t=mo.V.logfunction("validate");try{let n={};return this.validateField(e).then(e=>{Object.keys(e).length>0?(n.status=!1,n.details=e):n.status=!0}),mo.V.logUpdate(t),n}catch(e){(0,p.ey)(t,"Validator.validate",e)}}}const Wo=e=>{var t;const n=document.getElementsByName(e)[0];if(!n)return{name:null,value:null,type:null,dataType:null,pattern:null,conceptType:null,maxLength:null,minLength:null,minValue:null,maxValue:null,accept:null,file:null,required:!1,isUnique:!0};const o=n.hasAttribute("required")||"true"===n.getAttribute("data-required"),i=n.hasAttribute("isUnique")&&"true"===n.getAttribute("isUnique");return{name:n.name,value:n.value,type:n.type,dataType:n.getAttribute("data-type"),pattern:n.getAttribute("data-pattern"),conceptType:n.getAttribute("concept-type"),maxLength:n.getAttribute("maxlength")?parseInt(n.getAttribute("maxlength")):null,minLength:n.getAttribute("minlength")?parseInt(n.getAttribute("minlength")):null,minValue:n.getAttribute("min")?parseInt(n.getAttribute("min")):null,maxValue:n.getAttribute("max")?parseInt(n.getAttribute("max")):null,accept:n.getAttribute("accept")||null,file:"file"===n.type&&(null===(t=n.files)||void 0===t?void 0:t[0])||null,required:o,isUnique:i}};var jo=n(2289);class Vo{constructor(){this.type="",this.inpage=10,this.page=1,this.concepts=[],this.conceptIds=[],this.selectors=[],this.freeschemaQueries=[],this.filters=[],this.filterLogic="",this.typeConnection="",this.order="DESC",this.outputFormat=_n.yv,this.name="",this.filterAncestor="",this.reverse=!1,this.limit=!1,this.isSecure=!1,this.includeInFilter=!1,this.isOldConnectionType=!1,this.cache=!0}}var qo=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function Ho(e){var t=arguments;return qo(this,arguments,void 0,function*(e,n=""){const o=mo.V.logfunction("FreeschemaQueryApi",t);var i=(0,h.ab)("application/json",n);const r=u.B.FreeschemaQueryUrl(),s=JSON.stringify(e),c=yield a.a.getHash(e),l=!1!==e.cache?a.a.get(c):null;if(l)return fetch(r,{method:"POST",headers:i,body:s}).then(e=>qo(this,void 0,void 0,function*(){if(e.ok){const t=yield e.json();a.a.set(c,t)}else(0,p.ry)(e)})).catch(e=>{(0,p.Mb)(e,r),(0,p.ey)(o,"FreeschemaQueryApi",e)}),l;try{const e=yield fetch(r,{method:"POST",headers:i,body:s});if(e.ok){let t=yield e.json();return a.a.set(c,t),mo.V.logUpdate(o),t}return(0,p.ry)(e),[]}catch(e){(0,p.Mb)(e,r),(0,p.ey)(o,"FreeschemaQueryApi",e)}})}var $o=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class zo extends On.w{constructor(e,t){super(),this.query=new Vo,this.countInfoStrings=[],this.order="DESC",this.totalCount=0,this.unsubscribeCache=null,this.query=e,this.format=e.outputFormat,this.order=e.order,a.a.getHash(e).then(e=>{this.unsubscribeCache=a.a.subscribe(e,e=>$o(this,void 0,void 0,function*(){this.isDataLoaded=!1,yield this.bind(),this.notify()}))})}run(){return $o(this,void 0,void 0,function*(){var e,t;try{this.query.outputFormat=_n.BG,this.compositionIds=[];let n=yield Ho(this.query,"");return this.conceptIds=n.conceptIds,this.internalConnections=null!==(e=n.internalConnections)&&void 0!==e?e:[],this.linkers=null!==(t=n.linkers)&&void 0!==t?t:[],this.reverse=n.reverse,this.compositionIds=n.mainCompositionIds,this.totalCount=n.mainCount,this.countInfoStrings=n.countinfo,yield this.build()}catch(e){throw e}})}bind(){return $o(this,void 0,void 0,function*(){var e,t;try{if(this.compositionIds.length>0)for(let e=0;e<this.compositionIds.length;e++)this.removeListenToEvent(this.compositionIds[e]);if(this.isDataLoaded)for(let e=0;e<this.compositionIds.length;e++)this.listenToEvent(this.compositionIds[e]);else{this.query.outputFormat=_n.BG,this.compositionIds=[];let n=yield Ho(this.query,"");this.conceptIds=n.conceptIds,this.internalConnections=null!==(e=n.internalConnections)&&void 0!==e?e:[],this.linkers=null!==(t=n.linkers)&&void 0!==t?t:[],this.reverse=n.reverse,this.compositionIds=n.mainCompositionIds,this.totalCount=n.mainCount,this.countInfoStrings=n.countinfo}let n=yield this.build();if(!this.isDataLoaded){this.isDataLoaded=!0;for(let e=0;e<this.compositionIds.length;e++)this.listenToEvent(this.compositionIds[e]);if(""!=this.query.type){let e=yield me(this.query.type,999);e.id>0&&this.listenToEventType(e.id)}}for(let e=0;e<this.newIds.length;e++)this.listenToEvent(this.newIds[e]);return this.newIds=[],n}catch(e){throw e}})}build(){return $o(this,void 0,void 0,function*(){try{mo.V.logfunction("build",["schemaquery",this.compositionIds]);let e=(0,Zn.w)(this.countInfoStrings);return this.format==_n.y0?this.data=yield(0,Hn.e$)(this.linkers,this.conceptIds,this.compositionIds,this.reverse,e,this.order):this.format==_n.ZJ?this.data=yield(0,Hn.y6)(this.linkers,this.conceptIds,this.compositionIds,this.reverse,e,this.order):this.format==_n.pU?this.data=yield(0,Hn.rq)(this.linkers,this.conceptIds,this.compositionIds,this.reverse,e,this.order):this.format==_n.XZ?(this.data={},this.data.linkers=this.linkers,this.data.conceptIds=this.conceptIds,this.data.compositionIds=this.compositionIds,this.data.reverse=this.reverse,this.data.countInfos=e,this.data.order=this.order):this.data=yield(0,Hn.b6)(this.linkers,this.conceptIds,this.compositionIds,this.reverse,e),this.data}catch(e){throw e}})}}function Jo(e,t){return new zo(e,t)}function Qo(e,t){return new zo(e,t).execute()}class Yo{constructor(){this.id=0,this.name="",this.html="",this.css="",this.js="",this.library={css:[],js:[]},this.assistant={id:"",input:"",type:""},this.timestamp="",this.widgetId=0,this.type="",this.clean="",this.after_render="",this.before_render="",this.custom_functions=[],this.update="",this.origin=0,this.version=0,this.mount_child="",this.children=[],this.wrapper="0",this.widget=new Lo,this.dependency="",this.root=0}}var Xo=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function Ko(e,t,n){return Xo(this,arguments,void 0,function*(e,t,n,o={concepts:[],connections:[]}){var i,r,a,s,c;const l=mo.V.logfunction("CreateConnectionBetweenEntityLocal",[e.id,t.id,n]);if(rr)try{const c=yield fr("CreateConnectionBetweenEntityLocal",{concept1Data:e,concept2Data:t,linker:n,actions:o});return(null===(r=null===(i=null==c?void 0:c.actions)||void 0===i?void 0:i.concepts)||void 0===r?void 0:r.length)&&(o.concepts=JSON.parse(JSON.stringify(c.actions.concepts))),(null===(s=null===(a=null==c?void 0:c.actions)||void 0===a?void 0:a.connections)||void 0===s?void 0:s.length)&&(o.connections=JSON.parse(JSON.stringify(c.actions.connections))),c.data}catch(e){Cr(e)}const d=e.userId,u=(null===(c=e.type)||void 0===c?void 0:c.characterValue)+"_"+n,h=yield(0,ue.$)(u,999,999,d,o);if(!h)return;const p=yield(0,Zt.F)(e.id,t.id,h.id,1e3,void 0,void 0,o);return mo.V.logUpdate(l),p})}var Zo=n(4310);function ei(){r.i.clearAll(),a.a.clearAll()}function ti(e){for(;e.firstChild;)e.removeChild(e.firstChild)}var ni=n(276);function oi(e,t,n){const o=Oe.b.sessionId||"unknown",i={url:location.href,requestFrom:u.B.BASE_APPLICATION,sessionId:o,description:t};mo.V.logApplication("USER_EVENT",e,i)}class ii extends bo{constructor(e,t,n,o="",i=10){super(),this.inpage=10,this.selector=t,this.mainType=e,this.filterType=o,this.inpage=i,this.parentDomElement=n,this.mount(this.parentDomElement)}before_render(){this.render()}addFilter(e){if(""!=e){let t=new so;t.search=e,t.type=this.filterType,t.logicoperator="like",t.operateon="selector",t.name="selector_filter";let n="( selector_filter )";this.query.filters=[t],this.query.filterLogic=n}else this.query.filters=[],this.query.filterLogic=""}after_render(){let e=this.getElementById("selector"),t=this.getElementById("search-bar"),n=this;t.onchange=()=>{n.addFilter(t.value),n.mainDetails.update()};let o=new Vo;o.type=this.mainType,o.inpage=this.inpage;let i=new Vo;i.typeConnection=this.selector,i.name="selector",o.freeschemaQueries=[i],this.query=o,Jo(this.query,"").subscribe((t,n)=>{let o={};this.mainDetails=n;for(let e=0;e<t.length;e++){let n=t[e],i=n.id,r=n[this.mainType];if(r){let e=r[this.selector];if(e){const t=Object.values(e)[0];o[i]=t}}}ti(e);for(const[t,n]of Object.entries(o)){const o=document.createElement("option");o.value=t,o.textContent=n,e.appendChild(o)}})}getHtml(){const e=document.createElement("style");return e.textContent="\n.search-select-wrapper {\n width: 300px;\n display: flex;\n flex-direction: column;\n gap: 6px;\n font-family: Arial, sans-serif;\n}\n\n#search-bar {\n padding: 8px;\n font-size: 14px;\n border: 1px solid #ccc;\n border-radius: 6px;\n}\n\n#selector {\n padding: 6px;\n font-size: 14px;\n border: 1px solid #ccc;\n border-radius: 6px;\n}\n",document.head.prepend(e),this.html='\n <div class="search-select-wrapper">\n <input type="text" placeholder="Select or type..." id=\'search-bar\'>\n <select id=\'selector\'>\n </div>',this.html}}const ri='\n/* CKEditor content styles */\n.ck-content {\n /* Container styles */\n max-width: 100%;\n margin: 0 auto;\n font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;\n line-height: 1.5;\n padding: 0.75rem;\n background: #fff;\n color: #333;\n border: 1px solid #ccced1;\n}\n\n/* Headings */\n.ck-content h1, .ck-content h2, .ck-content h3, \n.ck-content h4, .ck-content h5, .ck-content h6 {\n font-weight: 700;\n line-height: 1.2;\n margin: 1em 0 0.5em;\n}\n\n.ck-content h1 { font-size: 2.5em; }\n.ck-content h2 { font-size: 2em; }\n.ck-content h3 { font-size: 1.75em; }\n.ck-content h4 { font-size: 1.5em; }\n.ck-content h5 { font-size: 1.25em; }\n.ck-content h6 { font-size: 1em; }\n\n/* Paragraphs and spacing */\n.ck-content p {\n margin: 1em 0;\n line-height: 1.6;\n}\n\n/* Links */\n.ck-content a {\n color: #1a73e8;\n text-decoration: none;\n}\n\n.ck-content a:hover {\n text-decoration: underline;\n}\n\n/* Lists */\n.ck-content ul,\n.ck-content ol {\n padding-left: 2em;\n margin: 1em 0;\n}\n\n.ck-content ul {\n list-style: disc;\n}\n\n.ck-content ol {\n list-style: decimal;\n}\n\n.ck-content li {\n margin: 0.5em 0;\n}\n\n/* Blockquotes */\n.ck-content blockquote {\n margin: 1em 0;\n padding-left: 1em;\n border-left: 5px solid #ccc;\n font-style: italic;\n color: #666;\n}\n\n/* Code blocks */\n.ck-content pre {\n background: #f5f5f5;\n border: 1px solid #ddd;\n border-radius: 4px;\n padding: 1em;\n margin: 1em 0;\n overflow-x: auto;\n font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;\n}\n\n.ck-content code {\n background: #f5f5f5;\n padding: 0.2em 0.4em;\n border-radius: 3px;\n font-size: 0.9em;\n font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;\n}\n\n/* Tables */\n.ck-content table {\n border-collapse: collapse;\n width: 100%;\n margin: 1em 0;\n}\n\n.ck-content table th,\n.ck-content table td {\n border: 1px solid #ddd;\n padding: 0.75em;\n text-align: left;\n}\n\n.ck-content table th {\n background: #f5f5f5;\n font-weight: bold;\n}\n\n/* Images */\n.ck-content img {\n max-width: 100%;\n height: auto;\n margin: 1em 0;\n}\n\n.ck-content figure {\n margin: 1em 0;\n text-align: center;\n}\n\n.ck-content figure img {\n margin: 0;\n}\n\n.ck-content figcaption {\n color: #666;\n font-size: 0.9em;\n margin-top: 0.5em;\n}\n\n/* Dark mode */\n/*\n@media (prefers-color-scheme: dark) {\n .ck-content {\n background: #1a1a1a;\n color: #e0e0e0;\n }\n\n .ck-content a {\n color: #64b5f6;\n }\n\n .ck-content blockquote {\n border-left-color: #404040;\n color: #b0b0b0;\n }\n\n .ck-content pre,\n .ck-content code {\n background: #2d2d2d;\n border-color: #404040;\n }\n\n .ck-content table th,\n .ck-content table td {\n border-color: #404040;\n }\n\n .ck-content table th {\n background: #2d2d2d;\n }\n\n .ck-content figcaption {\n color: #b0b0b0;\n }\n}\n*/\n\n/* CUSTOM DOCUMENTATION CSS */\n\n#documentation-preview {\n border: 1px solid #ccc;\n padding: 1rem;\n}\n\n#documentation-preview h3 {\n font-size: 1.5rem;\n margin-bottom: 1rem;\n}\n\n.pre-wrapper {\n background: #f2f5f9;\n border: 1px solid #cecece;\n display: block;\n padding: 1rem;\n border-radius: 0.25rem;\n margin-top: 1rem;\n margin-bottom: 1rem;\n}\n\n.pre-wrapper pre {\n margin: 0;\n color: #e87aa2;\n}\n\n.widget-doc-section pre {\n background-color: transparent;\n}\n\n.widget-doc-section p {\n margin: 0;\n}\n\n.widget-doc-section code {\n color: #e87aa2;\n font-size: 0.875rem;\n}\n\n.mv-3 {\n margin-top: 1rem;\n margin-bottom: 1rem;\n}\n\n.pv-3 {\n padding-top: 1rem;\n padding-bottom: 1rem;\n}\n\n .widget-documentation-heading {\n background-color: #6e757d;\n color: #eee;\n font-size: 1.5rem;\n padding: 0.5rem 1rem;\n display: flex;\n align-items: center;\n justify-content: space-between;\n }\n\n .widget-documentation-heading h4 {\n margin-bottom: 0;\n }\n\n .close-documentation-button {\n border: none;\n outline: none;\n background-color: transparent;\n line-height: 0;\n margin: 0;\n padding: 0;\n cursor: pointer;\n }\n\n .close-documentation-button:hover,\n .close-documentation-button:focus {\n background-color: transparent;\n }\n\n .documentation-creator {\n text-align: right;\n color: #666;\n margin: 0;\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n }\n\n .documentation-creator span {\n font-style: italic;\n }\n\n .documentation-attachments {\n display: flex;\n flex-wrap: wrap;\n }\n\n .documentation-attachments img {\n width: 25%;\n height: auto;\n border: 1px solid #ccc;\n padding: 0.25rem;\n margin-top: 0.5rem;\n margin-bottom: 0.5rem;\n }\n\n .documentation-attachments iframe {\n width: 50%;\n border: 1px solid #ccc;\n padding: 0.25rem;\n margin-top: 0.5rem;\n margin-bottom: 0.5rem;\n }\n\n .widget-documentation-footer {\n text-align: right;\n margin-top: 1rem;\n }\n\n .widget-documentation-footer button {\n border-radius: 0;\n border: none;\n padding: 0.5rem 1.5rem;\n text-align: center;\n background: #6e757d;\n color: #eee;\n }\n\n #widget-details {\n position: absolute;\n right: 0px;\n top: 0px;\n z-index: 9999;\n }\n\n #widget-details button {\n background: #fff;\n border: 1px solid #ccc;\n border-radius: 0 0 0 0.25rem;\n height: auto;\n width: auto;\n cursor: pointer;\n display: flex;\n align-items: center;\n gap: 0.25rem;\n }\n\n #widget-details button:hover, \n #widget-details button:focus {\n opacity: 0.75;\n }\n\n #widget-details button span {\n pointer-events: none;\n font-size: 1rem;\n }\n\n #widget-details button svg {\n pointer-events: none;\n width: 16px;\n height: 16px;\n fill: #999;\n }\n\n #widget-documentation-preview-modal {\n border: none;\n }\n\n @media (min-width: 768px) {\n #widget-documentation-preview-modal {\n flex: 0 0 auto;\n width: 66.66666667%;\n }\n }\n\n',ai={PAGE_COMP_NAME:"page",WIDGET_COMP_NAME:"widget",PROJECT_COMP_NAME:"project"};var si=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class ci{static get(e,t){return si(this,void 0,void 0,function*(){if(ci.cache.has(e))return ci.cache.get(e);if(ci.promises.has(e))return ci.promises.get(e);const n=t().then(t=>(ci.cache.set(e,t),ci.promises.delete(e),t)).catch(t=>{throw ci.promises.delete(e),t});return ci.promises.set(e,n),n})}static has(e){return ci.cache.has(e)}static peek(e){return ci.cache.get(e)}static invalidate(e){ci.cache.delete(e),ci.promises.delete(e)}static clear(){ci.cache.clear(),ci.promises.clear()}static set(e,t){return si(this,void 0,void 0,function*(){return ci.promises.delete(e),ci.cache.set(e,t),t})}static stats(){return{cacheSize:ci.cache.size,pendingRequests:ci.promises.size,keys:Array.from(ci.cache.keys())}}}ci.cache=new Map,ci.promises=new Map;var li=n(2895);const di=li;li.stringify,li.fromJSON,li.plugin,li.parse,li.list,li.document,li.comment,li.atRule,li.rule,li.decl,li.root,li.CssSyntaxError,li.Declaration,li.Container,li.Processor,li.Document,li.Comment,li.Warning,li.AtRule,li.Result,li.Input,li.Rule,li.Root,li.Node;var ui=n(2110),hi=n.n(ui),pi=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function fi(e){return pi(this,void 0,void 0,function*(){try{return(yield di([hi()()]).process(e,{from:void 0})).css}catch(e){return null}})}var mi=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function yi(e){return mi(this,void 0,void 0,function*(){var t,n,o,i,r,a,s,c,l,d,u,h,p,f;[{key:"meta_title",value:null===(n=null===(t=null==e?void 0:e[`the_${ai.PAGE_COMP_NAME}_meta_title`])||void 0===t?void 0:t.data)||void 0===n?void 0:n.the_meta_title},{key:"meta_description",value:null===(i=null===(o=null==e?void 0:e[`the_${ai.PAGE_COMP_NAME}_meta_description`])||void 0===o?void 0:o.data)||void 0===i?void 0:i.the_meta_description},{key:"meta_keywords",value:null===(a=null===(r=null==e?void 0:e[`the_${ai.PAGE_COMP_NAME}_meta_keywords`])||void 0===r?void 0:r.data)||void 0===a?void 0:a.the_meta_keywords},{key:"width",value:null===(c=null===(s=null==e?void 0:e[`the_${ai.PAGE_COMP_NAME}_width`])||void 0===s?void 0:s.data)||void 0===c?void 0:c.the_width},{key:"font_size",value:null===(d=null===(l=null==e?void 0:e[`the_${ai.PAGE_COMP_NAME}_font_size`])||void 0===l?void 0:l.data)||void 0===d?void 0:d.the_font_size},{key:"font_family",value:null===(h=null===(u=null==e?void 0:e[`the_${ai.PAGE_COMP_NAME}_font_family`])||void 0===u?void 0:u.data)||void 0===h?void 0:h.the_font_family},{key:"type",value:null===(f=null===(p=null==e?void 0:e[`the_${ai.PAGE_COMP_NAME}_type`])||void 0===p?void 0:p.data)||void 0===f?void 0:f.the_type}].forEach(e=>{e.value&&function(e,t){mi(this,void 0,void 0,function*(){const n=document.getElementById("fspage-properties")||function(){const e=document.createElement("style");return e.id="fspage-properties",document.head.appendChild(e),e}();let o="";switch(e){case"width":vi(".fspage { width: [^;]+ !important; }"),o=t?`.fspage { width: ${t} !important; }`:"";break;case"font_size":vi(".fspage { font-size: [^;]+; }"),o=t?`.fspage { font-size: ${t}px; }`:"";break;case"font_family":vi(".fspage { font-family: [^;]+; }"),o=t?`.fspage { font-family: ${t}; }`:"";break;case"type":vi(".fspage { width: 1200px; margin: 0 auto; }"),vi(".fspage { width: 100%; padding: 0; }"),o="fixed"===t?".fspage { width: 1200px; margin: 0 auto; }":"fluid"===t?".fspage { width: 100%; padding: 0; }":"";break;case"meta_title":document.title=t;break;case"meta_keywords":gi(e.replace("meta_",""),t);break;case"meta_description":return void gi(e.replace("meta_",""),t)}n.textContent+=o})}(e.key,e.value)})})}function vi(e){const t=document.getElementById("fspage-properties");if(!t)return;let n=null==t?void 0:t.textContent;n=n?n.replace(new RegExp(e,"g"),""):"",t.textContent=n}function gi(e,t){let n=document.querySelector(`meta[name="${e}"]`);n||(n=document.createElement("meta"),n.setAttribute("name",e),document.head.appendChild(n)),n.setAttribute("content",t)}var Ci=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function wi(e){return Ci(this,void 0,void 0,function*(){var t,n,o,i;(null===(n=null===(t=null==e?void 0:e.library)||void 0===t?void 0:t.css)||void 0===n?void 0:n.length)&&function(e){var t;const n=null===(t=null==e?void 0:e.library)||void 0===t?void 0:t.css,o=`vde-css-${(null==e?void 0:e.origin)?null==e?void 0:e.origin:null==e?void 0:e.widgetId}`;(function(e){const t=`link.${e}`,n=document.querySelectorAll(t);(null==n?void 0:n.length)&&(null==n||n.forEach(e=>{e.remove()}))})(o),(null==n?void 0:n.length)&&(null==n||n.sort((e,t)=>Number(null==e?void 0:e.order)-Number(null==t?void 0:t.order)));null==n||n.forEach(e=>{const t=document.createElement("link");t.classList.add(o),t.setAttribute("rel","stylesheet"),t.setAttribute("href",e.url),document.head.appendChild(t)})}(e),(null===(i=null===(o=null==e?void 0:e.library)||void 0===o?void 0:o.js)||void 0===i?void 0:i.length)&&(yield function(e){return Ci(this,void 0,void 0,function*(){var t;const n=null===(t=null==e?void 0:e.library)||void 0===t?void 0:t.js,o=`vde-js-${(null==e?void 0:e.origin)?null==e?void 0:e.origin:null==e?void 0:e.widgetId}`;if(function(e){const t=`script.${e}`,n=document.querySelectorAll(t);(null==n?void 0:n.length)&&(null==n||n.forEach(e=>{e.remove()}))}(o),null==n?void 0:n.length){n.sort((e,t)=>Number(null==e?void 0:e.order)-Number(null==t?void 0:t.order));for(const e of n){if(!(null==e?void 0:e.url))continue;document.querySelector(`script[src="${e.url}"]`)||(yield new Promise((t,n)=>{const i=document.createElement("script");i.classList.add(o),i.setAttribute("type","text/javascript"),i.setAttribute("src",e.url),i.setAttribute("crossorigin","anonymous"),i.onload=()=>{t()},i.onerror=t=>{n(new Error(`Failed to load script: ${e.url}`))},document.head.appendChild(i)}))}}})}(e))})}var Ti=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function Ii(e,t,n,o){return Ti(this,void 0,void 0,function*(){var i,r,a,s,c,l,d,u,h,p;const f=new Vo;f.conceptIds=[e],f.inpage=100,f.outputFormat=_n.y0,f.selectors=["the_page_body","the_page_title","the_page_slug","the_page_font_family","the_page_font_size","the_page_width","the_page_type","the_page_meta_title","the_page_meta_description","the_page_meta_keywords"];let m=yield Qo(f,"");yi(null===(r=null===(i=null==m?void 0:m[0])||void 0===i?void 0:i.data)||void 0===r?void 0:r[`the_${ai.PAGE_COMP_NAME}`]);document.getElementById("app").classList.add("fspage");const y=document.head.querySelectorAll("style#mystyleid");Array.from(y).forEach(e=>e.remove()),(null===(l=null===(c=null===(s=null===(a=null==m?void 0:m[0])||void 0===a?void 0:a.data)||void 0===s?void 0:s.the_page)||void 0===c?void 0:c.the_page_body)||void 0===l?void 0:l.id)?yield Si(null===(p=null===(h=null===(u=null===(d=null==m?void 0:m[0])||void 0===d?void 0:d.data)||void 0===u?void 0:u.the_page)||void 0===h?void 0:h.the_page_body)||void 0===p?void 0:p.id,t,n,o):t.innerHTML="<h4>Invalid or Page doesn't exist</h4>"})}function ki(e,t,n,o){return Ti(this,void 0,void 0,function*(){try{let t=yield(0,Zo.qj)(e),n=t.mainId,o=t.data;const i=yield xi(o,n),r=yield Pi(n,[],i);return ci.cache.set(`wdgt_${n}`,r),r}catch(e){}})}function bi(e,t,n,o){return Ti(this,void 0,void 0,function*(){try{let t=yield(0,Zo.ml)(e),n=t.mainId,o=t.data;const i=yield xi(o,n);return yield Pi(n,[],i)}catch(e){}})}function Ai(e,t,n,o){return Ti(this,void 0,void 0,function*(){let i=(yield(0,Zo.qj)(e)).mainId;const r=ci.cache.get(`wdgt_${i}`);if(!r.name)return void(t.innerHTML="<h4>Invalid or Widget doesn't exist</h4>");const a=t;yield wi(r);const s=yield Ei(r,a,void 0,n),c=Array.from({length:32},()=>"abcdef"[Math.floor(6*Math.random())]).join("");t.classList.add(`${c}`),t.style.position="relative";const l=document.createElement("style");l.id="mystyleid",l.classList.add("mftsccs-css");const d=`\n .${c} {\n ${r.css+s.css+ri} \n }\n `,u=(yield fi(d))||"";if(l.innerHTML=u,document.head.appendChild(l),r.children.length&&(null==r||r.children.forEach(e=>{var t;const n=null==e?void 0:e.library;((null===(t=null==n?void 0:n.css)||void 0===t?void 0:t.length)||(null==n?void 0:n.js.length))&&wi(e)})),o){const e=document.createElement("div");e.id="widget-details",e.innerHTML="",e.innerHTML=`\n <button class="widget-documentation-btn" widget-id="${(null==r?void 0:r.origin)||(null==r?void 0:r.widgetId)}" class="d-flex align-items-center gap-1" title="Documentation">\n <svg xmlns="http://www.w3.org/2000/svg" shape-rendering="geometricPrecision" text-rendering="geometricPrecision" image-rendering="optimizeQuality" fill-rule="evenodd" clip-rule="evenodd" viewBox="0 0 441 512.02"><path d="M324.87 279.77c32.01 0 61.01 13.01 82.03 34.02 21.09 21 34.1 50.05 34.1 82.1 0 32.06-13.01 61.11-34.02 82.11l-1.32 1.22c-20.92 20.29-49.41 32.8-80.79 32.8-32.06 0-61.1-13.01-82.1-34.02-21.01-21-34.02-50.05-34.02-82.11s13.01-61.1 34.02-82.1c21-21.01 50.04-34.02 82.1-34.02zM243.11 38.08v54.18c.99 12.93 5.5 23.09 13.42 29.85 8.2 7.01 20.46 10.94 36.69 11.23l37.92-.04-88.03-95.22zm91.21 120.49-41.3-.04c-22.49-.35-40.21-6.4-52.9-17.24-13.23-11.31-20.68-27.35-22.19-47.23l-.11-1.74V25.29H62.87c-10.34 0-19.75 4.23-26.55 11.03-6.8 6.8-11.03 16.21-11.03 26.55v336.49c0 10.3 4.25 19.71 11.06 26.52 6.8 6.8 16.22 11.05 26.52 11.05h119.41c2.54 8.79 5.87 17.25 9.92 25.29H62.87c-17.28 0-33.02-7.08-44.41-18.46C7.08 432.37 0 416.64 0 399.36V62.87c0-17.26 7.08-32.98 18.45-44.36C29.89 7.08 45.61 0 62.87 0h173.88c4.11 0 7.76 1.96 10.07 5l109.39 118.34c2.24 2.43 3.34 5.49 3.34 8.55l.03 119.72c-8.18-1.97-16.62-3.25-25.26-3.79v-89.25zm-229.76 54.49c-6.98 0-12.64-5.66-12.64-12.64 0-6.99 5.66-12.65 12.64-12.65h150.49c6.98 0 12.65 5.66 12.65 12.65 0 6.98-5.67 12.64-12.65 12.64H104.56zm0 72.3c-6.98 0-12.64-5.66-12.64-12.65 0-6.98 5.66-12.64 12.64-12.64h142.52c3.71 0 7.05 1.6 9.37 4.15a149.03 149.03 0 0 0-30.54 21.14H104.56zm0 72.3c-6.98 0-12.64-5.66-12.64-12.65 0-6.98 5.66-12.64 12.64-12.64h86.2c-3.82 8.05-6.95 16.51-9.29 25.29h-76.91zm239.61-18.85c7.41 7.43 4.68 18.9-3.05 25.23-7.46 6.01-20.97 8.92-28.68 1.83-7.77-7.23-4.68-18.87 2.76-25.24 7.18-6.05 21.39-9.37 28.97-1.82zm-43.88 95h6.34v-41.33H294.6c0-16.37 30.05-5.74 52.18-11.32v52.65h8.37v17.58h-54.86v-17.58z"/></svg>\n </button>\n `,a.appendChild(e);const t=document.createElement("dialog");t.id="widget-documentation-preview-modal",t.className="col-md-8",t.innerHTML="",t.innerHTML='\n <div class="widget-documentation-heading">\n <h4>Documentation</h4>\n <button class="close-documentation-button document-preview-close-button" title="Close">\n <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#e8eaed"><path d="m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z"/></svg>\n </button>\n </div>\n\n <div id="documentation-view" class="ck-content"></div>\n\n <div class="widget-documentation-footer">\n <button class="document-preview-close-button">Close</button>\n </div>\n ',a.appendChild(t);const n=a.querySelectorAll(".widget-documentation-btn");null==n||n.forEach(e=>{e.addEventListener("click",e=>{const t=null==e?void 0:e.target;Gi(null==t?void 0:t.getAttribute("widget-id"))})});const o=a.querySelectorAll(".document-preview-close-button");null==o||o.forEach(e=>{e.addEventListener("click",()=>{Mi("widget-documentation-preview-modal")})})}return a.querySelectorAll(".wb-initial-empty").forEach(e=>{e.classList.remove("wb-initial-empty")}),document.querySelectorAll('[onclick="widgetSelected(event)"]').forEach(e=>{e.removeAttribute("onclick")}),s})}function Si(e,t,n,o){return Ti(this,void 0,void 0,function*(){try{let i=yield(0,Zo.qj)(e),r=i.mainId,a=i.data;const s=yield xi(a,r);return yield Ni(r,s,t,n,o)}catch(e){t.textContent=`Error: ${e.message}`}})}function Li(e,t,n,o){return Ti(this,void 0,void 0,function*(){try{const i=yield(0,Zo.Cp)(e);return yield Ni(e,i,t,n,o)}catch(e){}})}function Ni(e,t,n,o){return Ti(this,arguments,void 0,function*(e,t,n,o,i=!0){const r=yield Pi(e,[],t);if(!r.name)return void(n.innerHTML="<h4>Invalid or Widget doesn't exist</h4>");const a=n;yield wi(r);const s=yield Ei(r,a,void 0,o),c=Array.from({length:32},()=>"abcdef"[Math.floor(6*Math.random())]).join("");n.classList.add(`${c}`),n.style.position="relative";const l=document.createElement("style");l.id="mystyleid",l.classList.add("mftsccs-css");const d=`\n .${c} {\n ${r.css+s.css+ri} \n }\n `,u=(yield fi(d))||"";l.innerHTML=u,r.children.length&&(null==r||r.children.forEach(e=>{var t;const n=null==e?void 0:e.library;((null===(t=null==n?void 0:n.css)||void 0===t?void 0:t.length)||(null==n?void 0:n.js.length))&&wi(e)})),document.head.appendChild(l);const h=document.createElement("script");if(h.innerHTML=r.js,a.appendChild(h),i){const e=document.createElement("div");e.id="widget-details",e.innerHTML="",e.innerHTML=`\n <button class="widget-documentation-btn" widget-id="${(null==r?void 0:r.origin)||(null==r?void 0:r.widgetId)}" class="d-flex align-items-center gap-1" title="Documentation">\n <svg xmlns="http://www.w3.org/2000/svg" shape-rendering="geometricPrecision" text-rendering="geometricPrecision" image-rendering="optimizeQuality" fill-rule="evenodd" clip-rule="evenodd" viewBox="0 0 441 512.02"><path d="M324.87 279.77c32.01 0 61.01 13.01 82.03 34.02 21.09 21 34.1 50.05 34.1 82.1 0 32.06-13.01 61.11-34.02 82.11l-1.32 1.22c-20.92 20.29-49.41 32.8-80.79 32.8-32.06 0-61.1-13.01-82.1-34.02-21.01-21-34.02-50.05-34.02-82.11s13.01-61.1 34.02-82.1c21-21.01 50.04-34.02 82.1-34.02zM243.11 38.08v54.18c.99 12.93 5.5 23.09 13.42 29.85 8.2 7.01 20.46 10.94 36.69 11.23l37.92-.04-88.03-95.22zm91.21 120.49-41.3-.04c-22.49-.35-40.21-6.4-52.9-17.24-13.23-11.31-20.68-27.35-22.19-47.23l-.11-1.74V25.29H62.87c-10.34 0-19.75 4.23-26.55 11.03-6.8 6.8-11.03 16.21-11.03 26.55v336.49c0 10.3 4.25 19.71 11.06 26.52 6.8 6.8 16.22 11.05 26.52 11.05h119.41c2.54 8.79 5.87 17.25 9.92 25.29H62.87c-17.28 0-33.02-7.08-44.41-18.46C7.08 432.37 0 416.64 0 399.36V62.87c0-17.26 7.08-32.98 18.45-44.36C29.89 7.08 45.61 0 62.87 0h173.88c4.11 0 7.76 1.96 10.07 5l109.39 118.34c2.24 2.43 3.34 5.49 3.34 8.55l.03 119.72c-8.18-1.97-16.62-3.25-25.26-3.79v-89.25zm-229.76 54.49c-6.98 0-12.64-5.66-12.64-12.64 0-6.99 5.66-12.65 12.64-12.65h150.49c6.98 0 12.65 5.66 12.65 12.65 0 6.98-5.67 12.64-12.65 12.64H104.56zm0 72.3c-6.98 0-12.64-5.66-12.64-12.65 0-6.98 5.66-12.64 12.64-12.64h142.52c3.71 0 7.05 1.6 9.37 4.15a149.03 149.03 0 0 0-30.54 21.14H104.56zm0 72.3c-6.98 0-12.64-5.66-12.64-12.65 0-6.98 5.66-12.64 12.64-12.64h86.2c-3.82 8.05-6.95 16.51-9.29 25.29h-76.91zm239.61-18.85c7.41 7.43 4.68 18.9-3.05 25.23-7.46 6.01-20.97 8.92-28.68 1.83-7.77-7.23-4.68-18.87 2.76-25.24 7.18-6.05 21.39-9.37 28.97-1.82zm-43.88 95h6.34v-41.33H294.6c0-16.37 30.05-5.74 52.18-11.32v52.65h8.37v17.58h-54.86v-17.58z"/></svg>\n </button>\n `,a.appendChild(e);const t=document.createElement("dialog");t.id="widget-documentation-preview-modal",t.className="col-md-8",t.innerHTML="",t.innerHTML='\n <div class="widget-documentation-heading">\n <h4>Documentation</h4>\n <button class="close-documentation-button document-preview-close-button" title="Close">\n <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#e8eaed"><path d="m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z"/></svg>\n </button>\n </div>\n\n \x3c!-- <div id="documentation-preview" class="ck-content"></div> --\x3e\n <div id="documentation-view" class="ck-content"></div>\n\n <div class="widget-documentation-footer">\n <button class="document-preview-close-button">Close</button>\n </div>\n ',a.appendChild(t);const n=a.querySelectorAll(".widget-documentation-btn");null==n||n.forEach(e=>{e.addEventListener("click",e=>{const t=null==e?void 0:e.target;Gi(null==t?void 0:t.getAttribute("widget-id"))})});const o=a.querySelectorAll(".document-preview-close-button");null==o||o.forEach(e=>{e.addEventListener("click",()=>{Mi("widget-documentation-preview-modal")})})}return a.querySelectorAll(".wb-initial-empty").forEach(e=>{e.classList.remove("wb-initial-empty")}),document.querySelectorAll('[onclick="widgetSelected(event)"]').forEach(e=>{e.removeAttribute("onclick")}),s})}function _i(e,t){return Ti(this,void 0,void 0,function*(){var n,o,i,r,a,s,c,l,d,u,h;const p=null===(o=null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.the_widget)||void 0===o?void 0:o.the_widget_s_child;if(t.push(e),p&&p.length)for(let e=0;e<p.length;e++){const n=p[e];let o=null===(c=null===(s=null===(a=null===(r=null===(i=null==n?void 0:n.data.the_child_widget)||void 0===i?void 0:i.the_child_widget_info)||void 0===r?void 0:r.data)||void 0===a?void 0:a.the_widget)||void 0===s?void 0:s.the_widget_root)||void 0===c?void 0:c.id;const f=!!(null===(u=null===(d=null===(l=null==n?void 0:n.data)||void 0===l?void 0:l.the_child_widget)||void 0===d?void 0:d.the_child_widget_use_latest)||void 0===u?void 0:u.data);o=Number(o)||!1;let m=null;if(f&&o){const e=yield(0,Zo.qj)(o);m=(null===(h=null==e?void 0:e.data)||void 0===h?void 0:h[0])||[],m.useLatest=!0,n.data.the_child_widget.the_child_widget_info=m}n.data.the_child_widget.the_child_widget_info.sChildId=n.id,yield _i(n.data.the_child_widget.the_child_widget_info,t)}})}function xi(e,t){return Ti(this,void 0,void 0,function*(){const n=[],o=[...e];try{const e=o.find(e=>e.id===t);yield _i(e,n)}catch(e){}return n})}function Di(e){return Ti(this,arguments,void 0,function*(e,t=[],n=""){let o=yield(0,Zo.Cp)(e);const i=yield xi(o,e);return yield Pi(e,[],i)})}function Pi(e){return Ti(this,arguments,void 0,function*(e,t=[],n,o=""){var i,r,a,s,c,l,d,u,h,p,f,m,y,v,g,C,w,T,I,k,b,A,S,L,N,_,x,D,P,E,R,O,B,F,U,G,M,W,j,V,q,H,$,z,J,Q,Y,X,K,Z,ee,te,ne,oe,ie,re,ae,se,ce,le,de;try{const ue=new Yo,he=(0,Zo.ix)(n,e);t.push(e);const pe=null===(i=null==he?void 0:he.data)||void 0===i?void 0:i.the_widget;ue.name=null===(a=null===(r=null==pe?void 0:pe.the_widget_name)||void 0===r?void 0:r.data)||void 0===a?void 0:a.the_name,ue.html=null===(c=null===(s=null==pe?void 0:pe.the_widget_html)||void 0===s?void 0:s.data)||void 0===c?void 0:c.the_html,ue.css=null===(d=null===(l=null==pe?void 0:pe.the_widget_css)||void 0===l?void 0:l.data)||void 0===d?void 0:d.the_css,ue.js=null===(h=null===(u=null==pe?void 0:pe.the_widget_js)||void 0===u?void 0:u.data)||void 0===h?void 0:h.the_js,ue.root=Number(null!==(f=null===(p=null==pe?void 0:pe.the_widget_root)||void 0===p?void 0:p.id)&&void 0!==f?f:0);let fe=0!=ue.root;ue.origin=fe?ue.root:Number((null===(y=null===(m=null==pe?void 0:pe.the_widget_origin)||void 0===m?void 0:m.data)||void 0===y?void 0:y.the_origin)||(null===(g=null===(v=null==pe?void 0:pe.the_widget_origin)||void 0===v?void 0:v.data)||void 0===g?void 0:g.the_originid)),ue.version=null===(w=null===(C=null==pe?void 0:pe.the_widget_version)||void 0===C?void 0:C.data)||void 0===w?void 0:w.the_version,ue.clean=null===(I=null===(T=null==pe?void 0:pe.the_widget_clean)||void 0===T?void 0:T.data)||void 0===I?void 0:I.the_clean,ue.timestamp=null===(b=null===(k=null==pe?void 0:pe.the_widget_timestamp)||void 0===k?void 0:k.data)||void 0===b?void 0:b.the_timestamp,ue.id=null==he?void 0:he.id;const me=null===(S=null===(A=null==pe?void 0:pe.the_widget_type)||void 0===A?void 0:A.data)||void 0===S?void 0:S.the_type;ue.type="null"==me||null==me?"the_element_name":me,ue.after_render=null===(N=null===(L=null==pe?void 0:pe.the_widget_after_render)||void 0===L?void 0:L.data)||void 0===N?void 0:N.the_after_render,ue.before_render=null===(x=null===(_=null==pe?void 0:pe.the_widget_before_render)||void 0===_?void 0:_.data)||void 0===x?void 0:x.the_before_render,ue.dependency=null===(P=null===(D=null==pe?void 0:pe.the_widget_dependency)||void 0===D?void 0:D.data)||void 0===P?void 0:P.the_dependency,ue.update=null===(R=null===(E=null==pe?void 0:pe.the_widget_update)||void 0===E?void 0:E.data)||void 0===R?void 0:R.the_update,ue.widgetId=e,ue.mount_child=null===(B=null===(O=null==pe?void 0:pe.the_widget_mount_child)||void 0===O?void 0:O.data)||void 0===B?void 0:B.the_mount_child;const ye=null==pe?void 0:pe.the_widget_s_child;(null==he?void 0:he.useLatest)&&(ue.useLatest=!0),(null==he?void 0:he.sChildId)&&(ue.sChildId=he.sChildId);const ve=null===(F=null==pe?void 0:pe.the_widget_s_css_library)||void 0===F?void 0:F.map(e=>{var t,n,o,i,r,a,s,c;return{order:null===(i=null===(o=null===(n=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.the_css_library)||void 0===n?void 0:n.the_css_library_order)||void 0===o?void 0:o.data)||void 0===i?void 0:i.the_order,url:null===(c=null===(s=null===(a=null===(r=null==e?void 0:e.data)||void 0===r?void 0:r.the_css_library)||void 0===a?void 0:a.the_css_library_url)||void 0===s?void 0:s.data)||void 0===c?void 0:c.the_url}}),ge=null===(U=null==pe?void 0:pe.the_widget_s_js_library)||void 0===U?void 0:U.map(e=>{var t,n,o,i,r,a,s,c;return{order:null===(i=null===(o=null===(n=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.the_js_library)||void 0===n?void 0:n.the_js_library_order)||void 0===o?void 0:o.data)||void 0===i?void 0:i.the_order,url:null===(c=null===(s=null===(a=null===(r=null==e?void 0:e.data)||void 0===r?void 0:r.the_js_library)||void 0===a?void 0:a.the_js_library_url)||void 0===s?void 0:s.data)||void 0===c?void 0:c.the_url}});ue.library={css:ve||[],js:ge||[]};const Ce=null===(M=null===(G=null==pe?void 0:pe.the_widget_assistant)||void 0===G?void 0:G.data)||void 0===M?void 0:M.the_assistant;ue.assistant={id:null===(j=null===(W=null==Ce?void 0:Ce.the_assistant_id)||void 0===W?void 0:W.data)||void 0===j?void 0:j.the_id,input:null===(q=null===(V=null==Ce?void 0:Ce.the_assistant_input)||void 0===V?void 0:V.data)||void 0===q?void 0:q.the_input,type:null===($=null===(H=null==Ce?void 0:Ce.the_assistant_type)||void 0===H?void 0:H.data)||void 0===$?void 0:$.the_type};const we=null===(z=null==pe?void 0:pe.the_widget_s_custom_function)||void 0===z?void 0:z.map(e=>{var t,n,o,i,r,a,s;const c=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.the_custom_function;return{id:null==e?void 0:e.id,name:null===(o=null===(n=null==c?void 0:c.the_custom_function_name)||void 0===n?void 0:n.data)||void 0===o?void 0:o.the_name,slug:null===(r=null===(i=null==c?void 0:c.the_custom_function_slug)||void 0===i?void 0:i.data)||void 0===r?void 0:r.the_slug,code:null===(s=null===(a=null==c?void 0:c.the_custom_function_code)||void 0===a?void 0:a.data)||void 0===s?void 0:s.the_code}});if(ue.custom_functions=we,null==ye?void 0:ye.length)for(let e=0;e<ye.length;e++){const i=(null===(Y=null===(Q=null===(J=ye[e])||void 0===J?void 0:J.data.the_child_widget)||void 0===Q?void 0:Q.the_child_widget_info)||void 0===Y?void 0:Y.id)||(null===(ee=null===(Z=null===(K=null===(X=ye[e])||void 0===X?void 0:X.data.the_child_widget)||void 0===K?void 0:K.the_child_widget_parent)||void 0===Z?void 0:Z.data)||void 0===ee?void 0:ee.the_parent),r=yield Pi(i,t,n,o),a=null===(re=null===(ie=null===(oe=null===(ne=null===(te=ye[e])||void 0===te?void 0:te.data)||void 0===ne?void 0:ne.the_child_widget)||void 0===oe?void 0:oe.the_child_widget_type)||void 0===ie?void 0:ie.data)||void 0===re?void 0:re.the_type,s=null===(de=null===(le=null===(ce=null===(se=null===(ae=ye[e])||void 0===ae?void 0:ae.data)||void 0===se?void 0:se.the_child_widget)||void 0===ce?void 0:ce.the_child_widget_wrapper)||void 0===le?void 0:le.data)||void 0===de?void 0:de.the_wrapper;r.type="null"==a||null==a?"the_element_name":a,r.wrapper=s,ue.children.push(r)}return ue}catch(e){throw Error,e}})}function Ei(e,t){return Ti(this,arguments,void 0,function*(e,t,n=!0,o,i,r=null){var a,s;const c=new Lo;c.html=e.html,r&&(c.parentWidget=Ri(r)),c.widgetType=e.type,c.componentDidMountFunction=e.before_render,c.addEventFunction=e.after_render,c.mountChildWidgetsFunction=e.mount_child,c.widgetState=Object.assign({},i),c.customFunctions=e.custom_functions,c.widgetDependenciesData=e.dependency,o&&(c.data=o),t.innerHTML="";const l=t;if(l&&(yield c.mount(l),e.widget=c,e.children.length>0&&(null===(a=c.childWidgetElement)||void 0===a?void 0:a.length)>0))for(let t=0;t<(null===(s=e.children)||void 0===s?void 0:s.length);t++){const n=e.children[t];for(let e=0;e<c.childWidgetElement.length;e++){const t=c.childWidgetElement[e];if(n.wrapper===t.id){const e=Bi(n);n.html=`<div id="${n.wrapper}">${n.html}</div>`;const o=yield Ei(e,t,false,c.data,c.widgetState,c);c.childWidgets.push(o),c.css=c.css+o.css+`#${t.id} { ${n.css} }`,o.dataChange(e=>{var t;const n=null===(t=null==e?void 0:e.type)||void 0===t?void 0:t.characterValue;n&&(c.childrenData[n]=e)})}}}return yield Ui(t,".widget_container"),c})}function Ri(e){const t={};for(const[n,o]of Object.entries(e))"object"==typeof o&&null!==o&&Array.isArray(o)||(t[n]=o);return t}function Oi(e,t){return Ti(this,arguments,void 0,function*(e,t,n=!0,o,i,r=null){var a,s;let c=new Lo;c.html=e.html,r&&(c.parentWidget=Ri(r)),c.widgetState=Object.assign({},o),c.widgetType=e.type,c.componentDidMountFunction=e.before_render,c.addEventFunction=e.after_render,c.mountChildWidgetsFunction=e.mount_child,c.customFunctions=e.custom_functions,c.widgetDependenciesData=e.dependency,c.inDevelopment=!1!==i,t.innerHTML="";let l=t;if(l&&(yield c.mount(l),e.widget=c,e.children.length>0&&(null===(a=c.childWidgetElement)||void 0===a?void 0:a.length)>0))for(let t=0;t<(null===(s=e.children)||void 0===s?void 0:s.length);t++){let n=e.children[t];for(let e=0;e<c.childWidgetElement.length;e++){let t=c.childWidgetElement[e];if(n.wrapper===t.id){const e=Bi(n),o=yield Oi(e,t,false,c.widgetState,i,c);c.childWidgets.push(o),c.css=c.css+o.css+`#${t.id} { ${n.css} }`,o.dataChange(e=>{var t;let n=null===(t=null==e?void 0:e.type)||void 0===t?void 0:t.characterValue;n&&(c.childrenData[n]=e)})}}}return c})}function Bi(e){return e.html=e.html.replace(/<[^>]*\bclass=["'][^"']*\bwidget_container\b[^"']*["'][^>]*>/g,e=>e.replace(/\bwidget_container\b/g,"").trim()),e.html=e.html.replace(/<[^>]*\bdraggable=["'][^"']*\btrue\b[^"']*["'][^>]*>/g,e=>e.replace(/\btrue\b/g,"false").trim()),e.html=e.html.replace(/<[^>]*\bclass=["'][^"']*\bhover-element\b[^"']*["'][^>]*>/g,e=>e.replace(/\bhover-element\b/g,"").trim()),e.html=e.html.replace(/<[^>]*\bclass=["'][^"']*\bwb-block\b[^"']*["'][^>]*>/g,e=>e.replace(/\bwb-block\b/g,"").trim()),e.html=e.html.replace(/<[^>]*onclick="widgetSelected\(event\)"\s*,?\s*ondragover="_dragService\.dragOverWidgetElement\(event\)"\s*,?\s*ondrop="_dragService\.dropWidgetElement\(event\)"\s*,?\s*ondragstart="_dragService\.dragStartWidgetElement\(event\)"\s*,?\s*ondragend="_dragService\.dragEndWidgetElement\(event\)"[^>]*>/g,e=>e.replace(/onclick="widgetSelected\(event\)"/g,'onclick=""').replace(/ondragover="_dragService\.dragOverWidgetElement\(event\)"/g,'ondragover=""').replace(/ondrop="_dragService\.dropWidgetElement\(event\)"/g,'ondrop=""').replace(/ondragstart="_dragService\.dragStartWidgetElement\(event\)"/g,'ondragstart=""').replace(/ondragend="_dragService\.dragEndWidgetElement\(event\)"/g,'ondragend=""').trim()),e.html=e.html.replace(/<[^>]*\bondragstart=["'][^"']*\b_dragService\.onWidgetDragStart\(event\)\b[^"']*["'][^>]*>/g,e=>e.replace(/\b_dragService\.onWidgetDragStart\(event\)\b/g,"").trim()),e}function Fi(e,t){return Ti(this,void 0,void 0,function*(){if(e&&1===e.nodeType){e.querySelectorAll(t).forEach(e=>{for(;e.firstChild;)e.parentNode.insertBefore(e.firstChild,e);e.remove()})}return e})}function Ui(e,t){return Ti(this,void 0,void 0,function*(){const n=e.querySelectorAll(t);for(const e of n){const n=e.parentElement;if(n){for(;e.firstChild;){const o=yield Fi(e.firstChild,t);n.insertBefore(o,e)}n.removeChild(e)}}})}function Gi(e){return Ti(this,void 0,void 0,function*(){const t=new Vo;t.typeConnection="the_widget_documentation",t.name="documentationText",t.selectors=["the_documentation_text"];const n=new Vo;n.typeConnection="the_widget_s_documentation",n.name="documentationBlank",n.selectors=["the_documentation_text","the_documentation_content","the_documentation_language","the_documentation_doc_title","the_documentation_folder","the_documentation_creator_email","the_documentation_created_by","the_documentation_content","the_documentation_type","the_documentation_s_doc_url","the_documentation_s_image_url","the_documentation_s_video_link","the_documentation_auth_type","the_documentation_bearer_token","the_documentation_method","the_documentation_method_url","the_documentation_username","the_documentation_password","the_documentation_s_json_list","the_documentation_api_script","the_documentation_api_body","the_documentation_code_editor","the_documentation_return"];const o=new Vo;o.typeConnection="the_documentation_s_json_list",o.name="documentationJSON",o.selectors=["the_json_list_key","the_json_list_value"],n.freeschemaQueries=[o];const i=new Vo;i.conceptIds=[e],i.freeschemaQueries=[t,n],i.inpage=100,i.outputFormat=_n.y0,yield Jo(i,"").subscribe(t=>Ti(this,void 0,void 0,function*(){var n,o,i,r,a,s,c,l,d,h,p;let f;const m=(null===(l=null===(c=null===(s=null===(a=null===(r=null===(i=null===(o=null===(n=null==t?void 0:t[0])||void 0===n?void 0:n.data)||void 0===o?void 0:o.the_widget)||void 0===i?void 0:i.the_widget_documentation)||void 0===r?void 0:r.data)||void 0===a?void 0:a.the_documentation)||void 0===s?void 0:s.the_documentation_text)||void 0===c?void 0:c.data)||void 0===l?void 0:l.the_text)||"";m&&(f=m);const y=null===(p=null===(h=null===(d=null==t?void 0:t[0])||void 0===d?void 0:d.data)||void 0===h?void 0:h.the_widget)||void 0===p?void 0:p.the_widget_s_documentation;if(null==y?void 0:y.length){const e=null==y?void 0:y.map(e=>{var t,n,o,i,r,a,s,c,l,d,u,h,p,f,m,y,v,g,C,w,T,I,k,b,A,S,L,N,_,x,D;const P=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.the_documentation,E=null===(o=null===(n=null==P?void 0:P.the_documentation_type)||void 0===n?void 0:n.data)||void 0===o?void 0:o.the_type,R=null===(r=null===(i=null==P?void 0:P.the_documentation_content)||void 0===i?void 0:i.data)||void 0===r?void 0:r.the_content,O=null===(s=null===(a=null==P?void 0:P.the_documentation_creator_email)||void 0===a?void 0:a.data)||void 0===s?void 0:s.the_creator_email,B=null===(l=null===(c=null==P?void 0:P.the_documentation_doc_title)||void 0===c?void 0:c.data)||void 0===l?void 0:l.the_doc_title,F=null===(u=null===(d=null==P?void 0:P.the_documentation_method)||void 0===d?void 0:d.data)||void 0===u?void 0:u.the_method,U=null===(p=null===(h=null==P?void 0:P.the_documentation_method_url)||void 0===h?void 0:h.data)||void 0===p?void 0:p.the_method_url,G=null===(m=null===(f=null==P?void 0:P.the_documentation_bearer_token)||void 0===f?void 0:f.data)||void 0===m?void 0:m.the_bearer_token,M=null===(v=null===(y=null==P?void 0:P.the_documentation_username)||void 0===y?void 0:y.data)||void 0===v?void 0:v.the_username,W=null===(C=null===(g=null==P?void 0:P.the_documentation_password)||void 0===g?void 0:g.data)||void 0===C?void 0:C.the_password,j=null===(T=null===(w=null==P?void 0:P.the_documentation_auth_type)||void 0===w?void 0:w.data)||void 0===T?void 0:T.the_auth_type,V=null==P?void 0:P.the_documentation_s_json_list,q=null===(k=null===(I=null==P?void 0:P.the_documentation_api_script)||void 0===I?void 0:I.data)||void 0===k?void 0:k.the_api_script,H=null===(A=null===(b=null==P?void 0:P.the_documentation_api_body)||void 0===b?void 0:b.data)||void 0===A?void 0:A.the_api_body,$=null===(L=null===(S=null==P?void 0:P.the_documentation_language)||void 0===S?void 0:S.data)||void 0===L?void 0:L.the_language,z=null===(_=null===(N=null==P?void 0:P.the_documentation_return)||void 0===N?void 0:N.data)||void 0===_?void 0:_.the_return,J=null===(D=null===(x=null==P?void 0:P.the_documentation_code_editor)||void 0===x?void 0:x.data)||void 0===D?void 0:D.the_code_editor,Q=null==P?void 0:P.the_documentation_s_doc_url,Y=null==P?void 0:P.the_documentation_s_image_url,X=null==P?void 0:P.the_documentation_s_video_link;let K={type:E,content:R,creatorEmail:O,title:B};if("blank"===E)K=Object.assign({},K);else if("api"===E){const e=[];(null==V?void 0:V.length)&&(null==V||V.forEach(t=>{var n,o,i,r,a,s,c,l;e.push({key:null===(r=null===(i=null===(o=null===(n=null==t?void 0:t.data)||void 0===n?void 0:n.the_json_list)||void 0===o?void 0:o.the_json_list_key)||void 0===i?void 0:i.data)||void 0===r?void 0:r.the_key,value:null===(l=null===(c=null===(s=null===(a=null==t?void 0:t.data)||void 0===a?void 0:a.the_json_list)||void 0===s?void 0:s.the_json_list_value)||void 0===c?void 0:c.data)||void 0===l?void 0:l.the_value})})),K=Object.assign(Object.assign({},K),{method:F,methodURL:U,authType:j,username:M,password:W,bearerToken:G,json:e,script:q,body:H})}else"function"===E&&(K=Object.assign(Object.assign({},K),{language:$,return:z,codeEditor:J}));const Z=[],ee=[],te=[];return(null==Y?void 0:Y.length)&&(null==Y||Y.forEach(e=>{var t;Z.push(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.the_image_url)})),(null==X?void 0:X.length)&&(null==X||X.forEach(e=>{var t;ee.push(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.the_video_link)})),(null==Q?void 0:Q.length)&&(null==Q||Q.forEach(e=>{var t;te.push(null===(t=e.data)||void 0===t?void 0:t.the_doc_url)})),K=Object.assign(Object.assign({},K),{imageList:Z,linkList:te,videoList:ee}),K});f=e}yield function(e){return Ti(this,void 0,void 0,function*(){document.getElementById(e).showModal()})}("widget-documentation-preview-modal"),function(e,t){Ti(this,void 0,void 0,function*(){const n=document.getElementById("documentation-view");if(0!=u.B.DOCUMENTATION_WIDGET)return void(yield Si(u.B.DOCUMENTATION_WIDGET,n,{currentWidgetId:t}));const o=document.getElementById("documentation-preview");o.innerHTML="",e&&(null==e?void 0:e.length)&&"string"!=typeof e?null==e||e.forEach(e=>{var t,n,i,r;const a=document.createElement("h3");let s="";switch(null==e?void 0:e.type){case"api":s="API";break;case"function":s="Functions and Classes";break;case"imgAndLink":s="Images and Links";break;default:s=""}a.innerHTML=`\n ${null==e?void 0:e.title} ${s?"("+s+")":""}\n `,null==o||o.appendChild(a);const c=document.createElement("div");c.classList.add("widget-doc-content"),(null==e?void 0:e.content)&&(c.innerHTML=e.content,null==o||o.appendChild(c));const l=document.createElement("div");if(l.classList.add("widget-doc-section"),"api"===e.type){let n="";n="basicAuth"===e.authType?`\n <p>username: <code>${null==e?void 0:e.username}</code></p>\n <p>password: <code>${null==e?void 0:e.password}</code></p>\n `:"bearerToken"===e.authType?`\n <h6>Token: <code>${null==e?void 0:e.bearerToken}</code></h6>\n `:"None";const o=e.json.map(e=>`${null==e?void 0:e.key}: ${null==e?void 0:e.value}`).join(", "),i=document.createElement("pre");i.textContent=o,l.innerHTML=`\n <div class="pv-3">\n <h6>Method Type: <code>${null==e?void 0:e.method.toUpperCase()}</code></h6>\n <h6>Endpoint: <code>${null==e?void 0:e.methodURL}</code></h6>\n </div>\n <div class="pv-3">\n <h6>Auth Type: <code>${(null===(t=null==e?void 0:e.authType)||void 0===t?void 0:t.toUpperCase())||""}</code></h6>\n ${n}\n </div>\n <div class="pv-3">\n <h6>JSON</h6>\n <code class="pre-wrapper" id="json-list-pre"></code>\n </div>\n <div class="pv-3">\n <h6>Body</h6>\n ${e.body}\n </div>\n <div class="pv-3">\n <h6>Scripts</h6>\n ${e.script}\n </div>\n `;const r=l.querySelector("#json-list-pre");r&&(r.appendChild(i),r.removeAttribute("id"))}else if("function"===e.type){const t=document.createElement("pre");t.textContent=null==e?void 0:e.codeEditor;const n=document.createElement("pre");n.textContent=null==e?void 0:e.return,l.innerHTML=`\n <div class="mv-3">\n <h6>Parameter</h6>\n <p>Language: ${null==e?void 0:e.language}</p>\n <code class="pre-wrapper" id="editor-pre"></pre></code>\n <h6>Returns</h6>\n <code class="pre-wrapper" id="return-pre"></code>\n </div>\n `;const o=l.querySelector("#editor-pre");o&&(o.appendChild(t),o.removeAttribute("id"));const i=l.querySelector("#return-pre");i&&(i.appendChild(n),i.removeAttribute("id"))}const d=document.createElement("div");d.classList.add("mv-3");const u=null===(n=null==e?void 0:e.linkList)||void 0===n?void 0:n.map(e=>`\n <p>${e}</p>\n `).join(""),h=null===(i=null==e?void 0:e.imageList)||void 0===i?void 0:i.map(e=>`\n <img src="${e}">\n `).join(""),p=null===(r=null==e?void 0:e.videoList)||void 0===r?void 0:r.map(e=>`\n <iframe width="560" height="315" src="${e}" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>\n `).join(""),f=(null==u?void 0:u.length)?`\n <div class="mv-3">\n <h6>Web links</h6>\n ${u}\n </div>\n `:"",m=(null==h?void 0:h.length)?`\n <h6>Attachments</h6>\n <div class="documentation-attachments">\n ${h}\n </div>\n `:"",y=(null==p?void 0:p.length)?`\n <h6>Videos</h6>\n <div class="documentation-attachments">\n ${p}\n </div>\n `:"";d.innerHTML=`\n <div class="mv-3">\n ${f}\n ${m}\n ${y}\n </div>\n <p class="documentation-creator">- added by: <span>${null==e?void 0:e.creatorEmail}</span></p>\n `,null==l||l.appendChild(d),null==o||o.appendChild(l)}):void 0!==e&&(o.innerHTML=e)})}(f,e)}))})}function Mi(e){return Ti(this,void 0,void 0,function*(){const t=document.getElementById(e),n=null==t?void 0:t.querySelector("form");null==n||n.reset(),null==t||t.close()})}var Wi=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function ji(e){return Wi(this,arguments,void 0,function*(e,t=null,n="",o={concepts:[],connections:[]}){var i,r,a,s;if(rr)try{const c=yield fr("CreateData",{json:e,ofConcept:t,typeConcept:n,actions:o});return(null===(r=null===(i=null==c?void 0:c.actions)||void 0===i?void 0:i.concepts)||void 0===r?void 0:r.length)&&(o.concepts=JSON.parse(JSON.stringify(c.actions.concepts))),(null===(s=null===(a=null==c?void 0:c.actions)||void 0===a?void 0:a.connections)||void 0===s?void 0:s.length)&&(o.connections=JSON.parse(JSON.stringify(c.actions.connections))),c.data}catch(e){Cr(e)}let c=999,l=999,d=(0,V.o)();for(const i in e){let r=Vi(i);if("string"!=typeof e[i]&&"number"!=typeof e[i])if(null==t||0==t.id){d=yield(0,te.k)(r,"",!0,c,4,l,void 0,o),Array.isArray(e[i])&&(r=qi(r)),yield ji(e[i],d,r,o)}else{Array.isArray(e[i])&&(r=Hi(r));let a=Hi(i),s=yield(0,te.k)(r,"",!0,c,4,l,void 0,o);d=s;let u=zi(n,a),h=yield(0,ue.$)(u,l,c,c,o);yield(0,Zt.F)(t.id,s.id,h.id,1e3,h.characterValue,c,o),Array.isArray(e[i])&&(r=qi(r)),yield ji(e[i],s,r,o)}else{let r=zi(n,i),a=yield(0,ue.$)(r,l,c,c,o),s=yield(0,te.k)(i,e[i].toString(),!1,c,4,l,void 0,o);null!=t&&(yield(0,Zt.F)(t.id,s.id,a.id,1e3,r,c,o))}}return d})}function Vi(e){return e.startsWith("the_")?e:"the_"+e}function qi(e){return e.endsWith("_s")?e:e+"_s"}function Hi(e){return e.replace(/_s$/,"")}const $i=e=>/^[+-]?\d+(\.\d+)?$/.test(e);function zi(e,t){return $i(t)?e+"_":e+"_"+function(e){return e.startsWith("the_")?e.slice(4):e}(t)}class Ji{constructor(){this.prototype="",this.required=[],this.optional=[],this.field="string",this.childPrototypes=[],this.isCompositional=!1,this.options=[],this.isQueryType=!1,this.querySelector=null,this.concepts=[],this.connections=[],this.addedConcepts=[],this.addedConnections=[]}}function Qi(e,t){if(Array.isArray(e)&&Array.isArray(t))for(let n=0;n<t.length;n++)e.push(t[n]);return e}var Yi=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function Xi(e){return Yi(this,arguments,void 0,function*(e,t=null){let n=[],o=[],i=[],r=(0,V.o)();try{null==t&&(t=new Eo,yield t.initialize());let a=[];if(e.isCompositional){if(r=yield function(e,t,n,o){return Yi(this,void 0,void 0,function*(){let i=(0,V.o)(),r=yield o.MakeTheInstanceConceptLocal("the_composition","",!0,999,999,999),a=yield o.MakeTheTypeConceptLocal("the_composition_type",999,999,999),s=yield o.MakeTheTypeConceptLocal(e,999,999,999),c=yield o.CreateTheConnectionLocal(r.id,s.id,a.id,1e3,"the_composition_type");return i=r,t.push(a),t.push(s),n.push(c),i})}(e.prototype,n,o,t),e.isQueryType){let o=yield function(e,t,n){return Yi(this,void 0,void 0,function*(){let o=[],i=[],r=function(){let e="the_composition_filter_type";return e}(0,!0),a=function(){let e="the_composition_selector";return e}(0,!0),s=yield n.MakeTheTypeConceptLocal(r,999,999,999),c=yield n.MakeTheTypeConceptLocal(a,999,999,999);if(null!=e){let l=yield n.MakeTheTypeConceptLocal(e.selector,999,999,999);o.push(l);let d=yield n.MakeTheTypeConceptLocal(e.filterType,999,999,999);o.push(l),o.push(d);let u=yield n.CreateTheConnectionLocal(t.id,l.id,c.id,1e3,a,999);i.push(u);let h=yield n.CreateTheConnectionLocal(t.id,d.id,s.id,1e3,r,999);i.push(h)}return{concepts:o,connections:i}})}(e.querySelector,r,t),a=o.concepts;Qi(i,o.connections),Qi(n,a)}if(e.options.length>0){let o=yield function(e,t,n){return Yi(this,void 0,void 0,function*(){let o=[],i=[],r=function(){let e="the_composition_s_option";return e}(0,!0),a=yield n.MakeTheTypeConceptLocal(r,999,999,999);for(let s=0;s<e.length;s++){let c=e[s].type,l=e[s].value,d=yield n.MakeTheInstanceConceptLocal(c,l,!1,999,999,999);o.push(d);let u=yield n.CreateTheConnectionLocal(t.id,d.id,a.id,1e3,r,999);i.push(u)}return{concepts:o,connections:i}})}(e.options,r,t),a=o.concepts;Qi(i,o.connections),Qi(n,a)}}else r=yield function(e,t){return Yi(this,void 0,void 0,function*(){let n=yield(0,Q.A)(5124),o=yield t.MakeTheTypeConceptLocal(e,999,999,999),i=yield function(e,t,n,o){return Yi(this,void 0,void 0,function*(){let n=yield o.CreateTheConceptLocal("",t.characterValue,999,e.id,t.id,4,!1);return n.characterValue=t.characterValue,n.typeCharacter=t.characterValue,n.isComposition=!0,n.type=t,n})}(n,o,0,t);return i})}(e.prototype,t),i=yield Zi(e.required,r,n,t,!0),a=yield Zi(e.optional,r,n,t),n.push(r);let s=Ki(r,!0,!0),c=yield t.MakeTheTypeConceptLocal(s,999,999,999);if(n.push(c),e.childPrototypes.length>0)for(let o=0;o<e.childPrototypes.length;o++){let a=yield Xi(e.childPrototypes[o]),l=a.mainConcept,d=a.connections,u=a.concepts,h=yield t.CreateTheConnectionLocal(r.id,l.id,c.id,1e3,s,999);i.push(h),Qi(i,d),Qi(n,u),n.push(l)}Qi(i,a),Qi(i,o),Qi(n,e.addedConcepts),Qi(i,e.addedConnections),e.concepts=n,e.connections=i}catch(e){null==t||t.rollbackTransaction()}return{concepts:n,connections:i,mainConcept:r}})}function Ki(e,t=!0,n=!1){var o;let i="the_prototype_of_"+(null===(o=e.type)||void 0===o?void 0:o.characterValue);return i+=t?"_requires":"_optional",n&&(i+="_the_composition"),i}function Zi(e,t,n,o){return Yi(this,arguments,void 0,function*(e,t,n,o,i=!1,r=!1){let a=[],s=[],c=Ki(t,i,r),l=yield o.MakeTheTypeConceptLocal(c,999,999,999);n.push(l);for(let t=0;t<e.length;t++){let n=yield o.MakeTheTypeConceptLocal(e[t],999,999,999);a.push(n)}for(let e=0;e<a.length;e++){let n=yield o.CreateTheConnectionLocal(t.id,a[e].id,l.id,1e3,c,999);s.push(n)}for(let e=0;e<a.length;e++)n.push(a[e]);return s})}var er=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function tr(e){return er(this,void 0,void 0,function*(){let t;try{const n=yield fetch(u.B.GetCachedImage(e),{method:"GET"});return n.ok?t=n.body:(0,p.ry)(n),t}catch(e){throw Error,t}})}var nr=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function or(e){return nr(this,arguments,void 0,function*(e,t="normal"){let n;let o=e.split("/").pop();if("small"==t){let e=null==o?void 0:o.split(".");if(e){o=e[0]+"_small."+e[1]}}return o&&(n=yield tr(o)),n})}function ir(e,t="normal"){let n=e;try{if(e){let o=e.split("/").pop();if("small"==t){let e=null==o?void 0:o.split(".");if(e){o=e[0]+"_small."+e[1]}}o&&(n=u.B.GetCachedImage(o))}}catch(e){}return n}var rr,ar=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};const sr=Date.now().toString(36)+Math.random().toString(36).substring(2);let cr=[],lr=[],dr=!1;function ur(e){dr=e}function hr(e="",t){Oe.b.BearerAccessToken=e,rr&&fr("updateAccessToken",{accessToken:e,session:Oe.b.sessionId})}function pr(){return ar(this,arguments,void 0,function*(e="",t="",n="",o="",i=!0,r="",a=void 0,c={},l={}){var d,h,f;try{u.B.BASE_URL=e,u.B.AI_URL=t,u.B.NODE_URL=o,u.B.BASE_APPLICATION=r,u.B.LOG_SERVER=null!==(d=l.logserver)&&void 0!==d?d:"https://logdev.freeschema.com",hr(n),yield Oe.b.hydrateProfile();let i=Math.floor(1e8*Math.random());u.B.setRandomizer(i),u.B.isPwa=null!==(h=l.isPwa)&&void 0!==h&&h,po.B.setValue("enableCache",null===(f=l.enableCache)||void 0===f||f);const m={logApplication:!1,logPackage:!1,accessTracker:!1,isTest:!1};if(u.B.FLAGS=m,u.B.FLAGS=Object.assign(Object.assign({},m),c),function(e){const t=mo.V.logfunction("initializeFlags",arguments);try{return e.logApplication&&(vo.initialize(),mo.V.logApplicationActivationStatus=!0),e.logPackage&&(mo.V.logPackageActivationStatus=!0),e.accessTracker&&(Pe.J.activateStatus=!0),e.isTest&&(s.B.isDataLoaded=!0,s.B.isCharacterLoaded=!0,s.B.isTypeLoaded=!0,s.B.isLocalDataLoaded=!0,s.B.isLocalTypeLoaded=!0,s.B.isLocalCharacterLoaded=!0,s.B.isConnectionLoaded=!0,s.B.isConnectionTypeLoaded=!0,s.B.isLocalConnectionLoaded=!0),mo.V.logUpdate(t),e}catch(e){throw(0,p.ey)(t,"initializeFlags",e),e}}(u.B.FLAGS),!("serviceWorker"in navigator))return void(yield yr());if(yield function(){return ar(this,void 0,void 0,function*(){var e;let t=u.B.BASE_APPLICATION+"_cacheServers",n=u.B.BASE_APPLICATION+"_config",o=u.B.BASE_APPLICATION+"_session",i=sessionStorage.getItem(t),r=sessionStorage.getItem(n),a=null!==(e=sessionStorage.getItem(o))&&void 0!==e?e:"999",s=parseInt(a);void 0!==i&&"undefined"!==i||(u.B.NODE_CACHE_URL=u.B.BASE_URL),i=JSON.parse(i);const c=JSON.parse(r);function l(){return ar(this,arguments,void 0,function*(e=!0){var i;let r;try{let a=null!==(i=u.B.BASE_APPLICATION)&&void 0!==i?i:"boomconsole";if(r=yield fetch(u.B.getAppConfig()+"?application="+a,{method:"POST"}),!r.ok)throw new Error("Failed to sync data to the server.");const s=yield r.json();s.success&&(sessionStorage.setItem(t,JSON.stringify(s.servers)),sessionStorage.setItem(n,JSON.stringify(s.config)),e&&(sessionStorage.setItem(o,s.session),Oe.b.setSession(s.session)),s.servers?u.B.NODE_CACHE_URL=s.servers[0]:u.B.NODE_CACHE_URL=u.B.BASE_URL,s.config&&(u.B.DOCUMENTATION_WIDGET=s.config.documentationWidget))}catch(e){}})}i&&c&&c.documentationWidget&&999!=s?(Array.isArray(i)&&i.length?u.B.NODE_CACHE_URL=i[0]:u.B.NODE_CACHE_URL=u.B.BASE_URL,Oe.b.setSession(s),u.B.DOCUMENTATION_WIDGET=c.documentationWidget,l(!1)):yield l(),navigator.serviceWorker&&navigator.serviceWorker.controller&&fr("SESSION_DATA",{type:"SESSION_DATA",data:u.B.NODE_CACHE_URL,session:Oe.b.sessionId})})}(),function(){navigator.serviceWorker.addEventListener("message",e=>ar(this,void 0,void 0,function*(){var t,n,o,i;try{if(e.data&&"API_401"===e.data.type){const{requestDetails:o}=e.data,i={method:o.method,headers:new Headers(o.headers),body:o.body},r=yield fetch(o.url,i),a=yield null==r?void 0:r.json();null===(n=null===(t=null===navigator||void 0===navigator?void 0:navigator.serviceWorker)||void 0===t?void 0:t.controller)||void 0===n||n.postMessage({type:"API_RESPONSE",messageId:e.data.messageId,response:new Response(a,{status:r.status,statusText:r.statusText,headers:r.headers})})}}catch(t){null===(i=null===(o=null===navigator||void 0===navigator?void 0:navigator.serviceWorker)||void 0===o?void 0:o.controller)||void 0===i||i.postMessage({type:"API_RESPONSE",messageId:e.data.messageId})}}))}(),function(){fo.x.addEventListener("message",e=>ar(this,void 0,void 0,function*(){const{type:t,payload:n}=e.data;if(!t)return;let o={success:!1,data:void 0};mr[t]&&(o=yield mr[t](n))}))}(),a&&a.activate&&a.manual)yield new Promise((e,t)=>{navigator.serviceWorker.ready.then(t=>ar(this,void 0,void 0,function*(){rr=t.active,yield wr(),e("done")})).catch(e=>{t(e)}).finally(()=>{}),setTimeout(()=>t("Timeout ready"),3e4)});else if(a&&(null==a?void 0:a.activate))try{yield function(e){var t=arguments;return ar(this,void 0,void 0,function*(){const n=mo.V.logfunction("handleRegisterServiceWorker",t);yield new Promise((t,o)=>{var i,r;let a=!1;navigator.serviceWorker.register(null!==(i=e.pathToSW)&&void 0!==i?i:"./serviceWorker.bundle.js",{scope:null!==(r=e.scope)&&void 0!==r?r:"/"}).then(e=>ar(this,void 0,void 0,function*(){setInterval(()=>{lr.length&&gr()},2e3),e.onupdatefound=()=>{const n=e.installing;n&&(n.onstatechange=()=>ar(this,void 0,void 0,function*(){"installing"===n.state&&(rr=void 0),"activated"!==n.state&&"redundant"!==n.state||!navigator.serviceWorker.controller||(rr=n,setTimeout(()=>{gr()},5e3),yield wr(),a=!0,gr(),t())}))},e.addEventListener("controllerchange",()=>ar(this,void 0,void 0,function*(){navigator.serviceWorker.controller&&(rr=navigator.serviceWorker.controller,yield wr())})),(e.installing||e.waiting||e.active)&&e.addEventListener("statechange",e=>ar(this,void 0,void 0,function*(){var t;"activating"===(null===(t=null==e?void 0:e.target)||void 0===t?void 0:t.state)&&(rr=navigator.serviceWorker.controller,yield wr())})),e.active?(rr=e.active,yield wr(),gr(),t()):setTimeout(()=>{a||o("Not Completed Initialization")},1e4)})).catch(e=>ar(this,void 0,void 0,function*(){yield yr(),o(e),(0,p.ey)(n,"handleRegisterServiceWorker",e)}))})})}(a)}catch(e){yield yr()}else yield yr();return!0}catch(e){yield yr()}})}function fr(e,t){return ar(this,arguments,void 0,function*(e,t,n=0){let o=!1;const i=Math.random().toString(36).substring(2);t.messageId=i,t.TABID=sr;const r=JSON.parse(JSON.stringify(t));let a;return"checkProcess"!=e&&0==n&&(a=setInterval(()=>ar(this,void 0,void 0,function*(){if(!o&&!(yield function(e){return ar(this,void 0,void 0,function*(){var t;try{const n=yield fr("checkProcess",{checkMessageId:e});if(null===(t=null==n?void 0:n.data)||void 0===t?void 0:t.processing)return!0}catch(e){return!1}})}(i))&&(clearInterval(a),!o&&0==n&&"checkProcess"!=e)){return yield fr(e,t,n+1)}}),2e3)),new Promise((n,s)=>{if(navigator.serviceWorker.controller,navigator.serviceWorker.controller||rr){const c=r=>{var l,d,u,h,f,m;(null===(l=null==r?void 0:r.data)||void 0===l?void 0:l.messageId)==i&&(o=!0,clearInterval(a),r.data.success||(401==(null===(d=null==r?void 0:r.data)||void 0===d?void 0:d.status)?s((0,p.ry)(new Response("Unauthorized",{status:401,statusText:null===(u=null==r?void 0:r.data)||void 0===u?void 0:u.statusText}))):500==(null===(h=null==r?void 0:r.data)||void 0===h?void 0:h.status)?s((0,p.Mb)(new Response("Internal Server Error",{status:500,statusText:null===(f=null==r?void 0:r.data)||void 0===f?void 0:f.statusText}))):s(`Failed to handle action ${e} ${JSON.stringify(t)}, Response: ${JSON.stringify(r.data)}`)),(null===(m=r.data)||void 0===m?void 0:m.actions)&&(t.actions=JSON.parse(JSON.stringify(r.data.actions))),n(r.data),navigator.serviceWorker.removeEventListener("message",c))};if(navigator.serviceWorker.addEventListener("message",c),navigator.serviceWorker.controller)navigator.serviceWorker.controller.postMessage({type:e,payload:r});else if(rr)try{rr.postMessage({type:e,payload:r})}catch(t){rr.postMessage({type:e,payload:r})}else setTimeout(()=>{rr?null==rr||rr.postMessage({type:e,payload:t}):(clearInterval(a),s("Service worker not ready"))},3e4);setTimeout(()=>{clearInterval(a),s(`No response from service worker after timeout: ${e}`),navigator.serviceWorker.removeEventListener("message",c)},21e4)}else lr.push({message:{type:e,payload:r}}),"init"==e&&(clearInterval(a),n(null))})})}const mr={GetLinkListener:e=>ar(void 0,void 0,void 0,function*(){const t=cr.find(t=>t.listenerId==e.listenerId);return null==t||t.callback(e.data),{success:!0}}),dispatchEvent:e=>ar(void 0,void 0,void 0,function*(){if(rr){let t=new CustomEvent(e.id||"",e.data);dispatchEvent(t)}return{success:!0}}),checkInit:e=>ar(void 0,void 0,void 0,function*(){return navigator.serviceWorker.controller&&(rr=navigator.serviceWorker.controller),yield wr(),{success:!0}})};function yr(){return ar(this,void 0,void 0,function*(){yield(0,ho.A)();(new Date).getTime();yield Promise.all([(0,i.A)().then(()=>{}),(0,uo.Ay)().then(()=>{}),(0,lo.a)().then(()=>{s.B.isConnectionLoaded=!0,s.B.isConnectionTypeLoaded=!0}),(0,lo.p)().then(()=>{s.B.isLocalConnectionLoaded=!0}),(0,uo.xd)().catch(e=>{throw e}),r.i.init(),a.a.init()]).catch(e=>{})})}function vr(e,t={}){if(rr||"undefined"!=typeof window){let n=new CustomEvent(`${e}`,t);dispatchEvent(n)}else fo.x.postMessage({type:"dispatchEvent",payload:{id:e,data:t}})}function gr(){return ar(this,void 0,void 0,function*(){const e=lr.find(e=>{var t;return"init"==(null===(t=null==e?void 0:e.message)||void 0===t?void 0:t.type)});if(e){const t=lr.indexOf(e);t>-1&&lr.splice(t,1),yield fr(null==e?void 0:e.type,null==e?void 0:e.payload)}for(;lr.length>0;){const{message:e,resolve:t,reject:n}=lr.shift();yield fr(e.type,e.payload)}})}const Cr=e=>{if(e instanceof H.z)throw e};function wr(){return ar(this,void 0,void 0,function*(){yield fr("init",{url:u.B.BASE_URL,aiurl:u.B.AI_URL,accessToken:Oe.b.BearerAccessToken,nodeUrl:u.B.NODE_URL,enableAi:!1,applicationName:u.B.BASE_APPLICATION,flags:u.B.FLAGS})})}},9003:(e,t,n)=>{n.d(t,{S5:()=>l,kH:()=>u,qI:()=>c});var o=n(1863),i=n(8957),r=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};let a=10;class s{}function c(e){const t=i.Logger.logfunction("openDatabase",arguments);return new Promise(function(n,r){s.db&&(i.Logger.logUpdate(t),n(s.db));let l=i.BaseUrl.BASE_URL+"_FreeSchemaLocal"+i.BaseUrl.BASE_APPLICATION;const u=indexedDB.open(l,a);u.onupgradeneeded=e=>{var t=e.target.result,o="localconcept",r="localconnection",a="localid";if(t.objectStoreNames.contains(o)&&t.deleteObjectStore(o),t.objectStoreNames.contains(r)&&t.deleteObjectStore(r),t.objectStoreNames.contains(a)&&t.deleteObjectStore(a),!t.objectStoreNames.contains(o)){t.createObjectStore(o,{keyPath:"id"}).transaction.oncomplete=e=>{}}if(!t.objectStoreNames.contains(r)){t.createObjectStore(r,{keyPath:"id"}).transaction.oncomplete=e=>{}}if(!t.objectStoreNames.contains(a)){t.createObjectStore(a,{keyPath:"id"}).transaction.oncomplete=e=>{d(a,{id:0,value:-100}),d(a,{id:1,value:-200}),d(a,{id:3,value:i.BaseUrl.getRandomizer()})}}n(t)},u.onerror=n=>{indexedDB.deleteDatabase(l),c(e),(0,o.ey)(t,"openDatabase",n),r(n)},u.onsuccess=function(e){var o=e.target;s.db=o.result,i.Logger.logUpdate(t),n(s.db)}})}function l(e){var t=arguments;return r(this,void 0,void 0,function*(){const n=i.Logger.logfunction("getObjectsFromLocalIndexDb",t);return new Promise(function(t,r){c(e).then(o=>{var r=[];var a=o.transaction(e,"readwrite").objectStore(e).getAll();a.onsuccess=()=>{const e=a.result;for(var o=0;o<e.length;o++)r.push(e[o]);i.Logger.logUpdate(n),t(r)}}).catch(e=>{let t={status:400,ok:!1,message:"Cannot get objects from database because you cannot open the Local database",data:e};(0,o.ey)(n,"getObjectsFromLocalIndexDb",t),r(t)})})})}function d(e,t){const n=i.Logger.logfunction("storeToDatabase",[e,"localindexdb"]);return new Promise(function(r,a){c(e).then(s=>{const c=s.transaction(e,"readwrite").objectStore(e).add(t);c.onsuccess=e=>{i.Logger.logUpdate(n),r(t)},c.onerror=i=>{let r={status:400,ok:!1,message:"Cannot store to the Local database "+e,data:i,body:t};(0,o.ey)(n,"storeToDatabase",r),a(r)}}).catch(e=>{let t={status:400,ok:!1,message:"Cannot store to database because you cannot open the Local database",data:e};(0,o.ey)(n,"storeToDatabase",t),a(t)})})}function u(e,t){const n=i.Logger.logfunction("UpdateToDatabase",arguments);return new Promise(function(r,a){c(e).then(s=>{const c=s.transaction(e,"readwrite").objectStore(e).put(t);c.onsuccess=e=>{i.Logger.logUpdate(n),r(t)},c.onerror=i=>{let r={status:400,ok:!1,message:"Cannot Update to the Local database"+e,data:i,body:t};(0,o.ey)(n,"UpdateToDatabase",r),a(r)}}).catch(e=>{let t={status:400,ok:!1,message:"Cannot update to database because you cannot open the Local database",data:e};(0,o.ey)(n,"UpdateToDatabase",t),a(t)})})}},9371:(e,t,n)=>{let o=n(3152);class i extends o{constructor(e){super(e),this.type="comment"}}e.exports=i,i.default=i},9577:(e,t,n)=>{let o=n(7793),i=n(1106),r=n(8339);function a(e,t){let n=new i(e,t),o=new r(n);try{o.parse()}catch(e){throw e}return o.root}e.exports=a,a.default=a,o.registerParse(a)},9581:(e,t,n)=>{n.d(t,{B:()=>o});class o{static setRandomizer(e){this.BASE_RANDOMIZER=e}static getRandomizer(){return this.BASE_RANDOMIZER}static GetConceptUrl(){return!this.NODE_CACHE_URL||this.NODE_CACHE_URL&&"string"==typeof this.NODE_CACHE_URL&&""===this.NODE_CACHE_URL.trim()?this.BASE_URL+"/api/getConcept":this.NODE_CACHE_URL+"/api/getConcept"}static GetConnectionUrl(){return!this.NODE_CACHE_URL||this.NODE_CACHE_URL&&"string"==typeof this.NODE_CACHE_URL&&""===this.NODE_CACHE_URL.trim()?this.BASE_URL+"/api/get-connection-by-id":this.NODE_CACHE_URL+"/api/get-connection-by-id"}static GetConceptBulkUrl(){return!this.NODE_CACHE_URL||this.NODE_CACHE_URL&&"string"==typeof this.NODE_CACHE_URL&&""===this.NODE_CACHE_URL.trim()?this.BASE_URL+"/api/get_concept_bulk":this.NODE_CACHE_URL+"/api/get_concept_bulk"}static GetConnectionBulkUrl(){return!this.NODE_CACHE_URL||this.NODE_CACHE_URL&&"string"==typeof this.NODE_CACHE_URL&&""===this.NODE_CACHE_URL.trim()?this.BASE_URL+"/api/get_connection_bulk":this.NODE_CACHE_URL+"/api/get_connection_bulk"}static GetAllConceptsOfUserUrl(){return this.BASE_URL+"/api/get_all_concepts_of_user"}static GetAllConnectionsOfUserUrl(){return this.BASE_URL+"/api/get_all_connections_of_user"}static GetAllConnectionsOfCompositionUrl(){return this.BASE_URL+"/api/get_all_connections_of_composition"}static GetAllConnectionsOfCompositionBulkUrl(){return this.BASE_URL+"/api/get_all_connections_of_composition_bulk"}static GetConceptByCharacterValueUrl(){return this.BASE_URL+"/api/get_concept_by_character_value"}static GetConceptByCharacterAndTypeUrl(){return this.BASE_URL+"/api/get_concept_by_character_and_type"}static GetConceptByCharacterAndCategoryUrl(){return this.BASE_URL+"/api/get_concept_by_character_and_category"}static GetConceptByCharacterAndCategoryDirectUrl(){return this.BASE_URL+"/api/get_concept_by_character_and_category_direct"}static GetCharacterByCharacterUrl(){return this.BASE_URL+"/api/get_character_by_character"}static GetAllConceptsByTypeUrl(){return this.BASE_URL+"/api/get_all_concepts_by_type"}static GetAllConnectionsOfConceptUrl(){return this.BASE_URL+"/api/get-link-connections"}static GetAllConnectionsToConceptUrl(){return this.BASE_URL+"/api/get-link-reverse-connections"}static GetAllAiData(){return this.BASE_URL+"/api/get-preloaded-concepts"}static getAppConfig(){return this.NODE_URL+"/api/v1/config"}static PostPrefetchConceptConnections(){return this.NODE_URL+"/api/v1/access-tracker/sync-access-tracker"}static GetSuggestedConcepts(){return this.NODE_URL+"/api/v1/access-tracker/list-concepts-file"}static GetSuggestedConnections(){return this.NODE_URL+"/api/v1/access-tracker/list-connections-file"}static PostLogger(){return this.LOG_SERVER+"/api/logger"}static LogHealth(){return this.LOG_SERVER+"/api/check"}static GetAllPrefetchConnectionsUrl(){return this.BASE_URL+"/api/get_all_connections_of_user?inpage=500"}static GetAllLinkerConnectionOfConceptUrl(){return this.BASE_URL+"/api/get-all-linkers-from-concept"}static GetAllLinkerConnectionToConceptUrl(){return this.BASE_URL+"/api/get-all-linkers-to-concept"}static DeleteConceptUrl(){return this.BASE_URL+"/api/delete_concept"}static DeleteUserUrl(){return this.BASE_URL+"/api/deleteuser"}static RecursiveSearchUrl(){return this.BASE_URL+"/api/recursivesearch-concept-connection"}static SearchLinkMultipleAllApiUrl(){return this.BASE_URL+"/api/Connection/search-link-multiple-all-ccs"}static MakeTheNameInBackendUrl(){return this.BASE_URL+"/api/make-name-from-frontend"}static SearchAllTypeWithLinker(e=!0){return e?this.BASE_URL+"/api/search-all-with-linker-ccs":this.BASE_URL+"/api-search-compositions-internal-clean-ccs"}static LoginUrl(){return this.BASE_URL+"/api/auth/login"}static SignupUrl(){return this.BASE_URL+"/api/auth/signup"}static GetCompositionConnectionBetweenTwoConceptsUrl(){return this.BASE_URL+"/api/get-composition-connection-between-two-concepts"}static SearchCompositionsUrl(){return this.BASE_URL+"/api/search-compositions"}static SearchLinkMultipleAll(){return this.BASE_URL+"/api/Connection/search-link-multiple-all"}static CreateSessionId(){return this.BASE_URL+"/api/create-session-id-remote"}static CreateSessionVisitUrl(){return this.BASE_URL+"/api/create-remote-session-visit"}static ViewInternalDataUrl(){return this.BASE_URL+"/api/view-api-internal-data-ccs-id-bulk"}static SearchInternalWithAuthenticatedCcsUrl(){return this.BASE_URL+"/api/search-composition-internal-authenticated-ccs"}static SearchInternalWithCcsUrl(){return this.BASE_URL+"/api-search-compositions-internal-clean-ccs"}static CreateGhostConceptApiUrl(e=!0){return e?o.NODE_URL+"/api/v1/local-concepts":o.NODE_URL+"/api/v1/local-concepts-without-auth"}static CreateGhostConnectionApiUrl(){return o.NODE_URL+"/api/v1/local-connections"}static GetRealConceptById(){return o.NODE_URL+"/api/v1/local-concepts-translate"}static GetReservedIdUrl(){return this.BASE_URL+"/api/get_reserved_ids"}static GetReservedConnectionIdUrl(){return this.BASE_URL+"/api/get_reserved_connection_ids"}static CreateTheTextDataUrl(){return this.BASE_URL+"/api/create_text_data"}static CreateTheCharacterDataUrl(){return this.BASE_URL+"/api/create_character_data"}static CreateTheConceptUrl(){return this.BASE_URL+"/api/create_the_concept"}static CreateTheConnectionUrl(){return this.BASE_URL+"/api/create_the_connection"}static CreateTheConnectionNewUrl(){return this.BASE_URL+"/api/create_the_connection_new"}static MakeTheTypeConceptUrl(){return this.BASE_URL+"/api/make_the_type_concept"}static DeleteTheConnectionUrl(){return this.BASE_URL+"/api/delete_connection"}static DeleteTheConnectionBulkUrl(){return this.BASE_URL+"/api/delete_connection_bulk"}static GetTypeConceptBulk(){return this.BASE_URL+"/api/get_type_concept_by_character_bulk"}static UploadFileLimitUrl(){return this.BASE_URL+"/api/upload/limit"}static FreeschemaQueryUrl(){return this.BASE_URL+"/api/freeschema-query"}static uploadImageUrl(){return this.BASE_URL+"/api/Image/UploadImage"}static uploadImageUrlWithSmall(){return this.BASE_URL+"/api/Image/UploadImageV2"}static uploadFileUrl(){return this.BASE_URL+"/api/Image/UploadFile"}static sendMail(){return this.BASE_URL+"/api/sendmail"}static sendBulkMail(){return this.BASE_URL+"/api/sendmail/bulk"}static getWidgetData(){return this.BASE_URL+"/api/get-widget"}static getLatestWidgetData(){return!this.NODE_CACHE_URL||this.NODE_CACHE_URL&&"string"==typeof this.NODE_CACHE_URL&&""===this.NODE_CACHE_URL.trim()?this.BASE_URL+"/api/get-latest-widget":this.NODE_CACHE_URL+"/api/get-latest-widget"}static getRecentWidgetData(){return this.BASE_URL+"/api/get-recent-widget"}static getConnectionsByTypes(){return this.BASE_URL+"/api/get-connection-by-types"}static GetConnectionsBetweenUrl(){return this.BASE_URL+"/api/get-connection-between"}static CreatePrototypeUrl(){return this.BASE_URL+"/api/create-prototype"}static GetCachedImage(e){return"https://cdn.boomconcole.com/freeschema/"+e}}o.BASE_URL="https://localhost:7053/",o.NODE_CACHE_URL="",o.AI_URL="https://ai.freeschema.com",o.MQTT_URL="192.168.1.249",o.NODE_URL="http://localhost:5001",o.LOG_SERVER="https://logdev.freeschema.com",o.BASE_APPLICATION="",o.DOCUMENTATION_WIDGET=0,o.isNearestCache=!0,o.isPwa=!1,o.FLAGS={logApplication:!1,logPackage:!1,accessTracker:!1,isTest:!1},o.BASE_RANDOMIZER=999},9606:(e,t,n)=>{t.__esModule=!0,t.unesc=t.stripComments=t.getProp=t.ensureObject=void 0;var o=s(n(5286));t.unesc=o.default;var i=s(n(6291));t.getProp=i.default;var r=s(n(1557));t.ensureObject=r.default;var a=s(n(8354));function s(e){return e&&e.__esModule?e:{default:e}}t.stripComments=a.default},9635:(e,t,n)=>{n.d(t,{x:()=>o});const o=new BroadcastChannel("Freeschema_mftsccs_browser_channel")},9700:(e,t,n)=>{n.d(t,{V:()=>l});var o,i=n(8957),r=n(4024),a=n(1863),s=n(3518),c=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class l{static startAutoSync(){this.autoSyncInterval||(this.nextSyncTime=Date.now()+this.SYNC_INTERVAL_MS,setInterval(()=>{const e=Date.now();this.nextSyncTime&&e>=this.nextSyncTime&&(this.nextSyncTime=e+this.SYNC_INTERVAL_MS,this.sendPackageLogsToServer(),this.sendApplicationLogsToServer())},3e4))}static stopAutoSync(){null!==this.autoSyncInterval&&(clearInterval(this.autoSyncInterval),this.autoSyncInterval=null,this.nextSyncTime=null)}static setLogLevel(e){this.logLevel=e}static shouldLog(e){return this.LOG_LEVELS.indexOf(e)>=this.LOG_LEVELS.indexOf(this.logLevel)}static formatLogData(e,t,n){const o=Object.assign({timestamp:(new Date).toISOString(),level:e,message:t},n);return this.packageLogsData.push(o),"ERROR"==e&&(this.sendPackageLogsToServer(),this.sendApplicationLogsToServer()),o}static log(e,t,n){if(this.logPackageActivationStatus)try{this.formatLogData(e,t,n||null)}catch(e){}}static logUpdate(e){var t;try{if(!this.logPackageActivationStatus)return{};if(!e)return{};const n=Date.now();e.startTime=null!==(t=e.startTime)&&void 0!==t?t:n;const o=n-e.startTime;e.responseTime=`${o} ms`,!0==!e.serviceWorker&&(e.serviceWorker=!1)}catch(t){(0,a.ey)(e,"Logger.logUpdate",t)}}static logfunction(e,...t){if(!this.logPackageActivationStatus)return{};const n=Date.now();let o=t;const a=i.BaseUrl.getRandomizer(),s=r.b.sessionId;let c={startTime:n,functionName:e,functionParameters:o,requestFrom:i.BaseUrl.BASE_APPLICATION,sessionId:s,applicationId:a};return this.formatLogData("INFO","function called",c)}static logError(e,t,n,o,i,a,s,c,l,d,u){try{const h=r.b.sessionId,p=`${(performance.now()-e).toFixed(3)}ms`,f={startTime:e,userId:t,operationType:n,requestFrom:o,requestIP:i,responseStatus:a,responseTime:p,responseSize:s?`${JSON.stringify(s).length}`:"0",sessionId:null==h?void 0:h.toString(),functionName:c,functionParameters:l,userAgent:d,conceptsUsed:u};this.formatLogData("ERROR",`Information logged for ${c}`,f)}catch(e){}}static logApplication(e,t,n){if(this.logApplicationActivationStatus)try{const o={timestamp:(new Date).toISOString(),level:e,message:t,data:n||null};this.applicationLogsData.push(o),"ROUTE"!=e&&"USER_EVENT"!=e||(this.sendPackageLogsToServer(),this.sendApplicationLogsToServer())}catch(e){}}static checkLoggerServerStatus(){return c(this,void 0,void 0,function*(){let e=1e4+o.checkInterval;const t=new Date;if(!(o.lastCheck&&t.getTime()-o.lastCheck.getTime()<e)){try{let e=i.BaseUrl.LogHealth();o.lastCheck=new Date;(yield fetch(e,{method:"GET"})).ok&&(o.isLoggerActive=!0,o.checkInterval=0)}catch(e){}o.checkInterval=o.checkInterval+500}})}static sendApplicationLogsToServer(){return c(this,void 0,void 0,function*(){const e=this.applicationLogsData;try{if(!o.isLoggerActive)return void o.checkLoggerServerStatus();if(0===e.length)return;this.applicationLogsData=[];r.b.BearerAccessToken;const t=50;let n=(0,s.Xr)(),a=0;for(;0!=e.length;){const r=e.slice(0,t),s=yield fetch(i.BaseUrl.PostLogger(),{method:"POST",headers:n,body:JSON.stringify({logType:this.appLogs,logData:r})});s.ok||404===s.status&&(o.isLoggerActive=!1),e.splice(0,t),a+=t,a++}}catch(e){o.isLoggerActive=!1}})}static sendPackageLogsToServer(){return c(this,void 0,void 0,function*(){const e=this.packageLogsData;try{if(!o.isLoggerActive)return void o.checkLoggerServerStatus();if(0===e.length)return;this.packageLogsData=[];const t=300;let n=0;for(;0!=e.length;){const r=e.slice(0,t);let a=(0,s.Xr)();const c=yield fetch(i.BaseUrl.PostLogger(),{method:"POST",headers:a,body:JSON.stringify({logType:this.mftsccsBrowser,logData:r})});if(!c.ok)return void(404===c.status&&(o.isLoggerActive=!1));e.splice(0,t),n++}}catch(e){o.isLoggerActive=!1}})}static saveLogToLocalStorage(e,t){try{if(void 0===typeof localStorage)return;{const n=JSON.parse((null===localStorage||void 0===localStorage?void 0:localStorage.getItem(e))||"[]");n.push(t),null===localStorage||void 0===localStorage||localStorage.setItem(e,JSON.stringify(n))}}catch(e){this.log("ERROR","Error while saving log in local storage")}}static clearLogsFromLocalStorage(e){void 0!==typeof localStorage&&(null===localStorage||void 0===localStorage||localStorage.removeItem(e))}}o=l,l.isLoggerActive=!0,l.lastCheck=new Date,l.checkInterval=0,l.logLevel="INFO",l.packageLogsData=[],l.applicationLogsData=[],l.LOG_LEVELS=["DEBUG","INFO","WARNING","ERROR","ROUTE"],l.SYNC_INTERVAL_MS=6e4,l.nextSyncTime=null,l.appLogs="app",l.mftsccsBrowser="mftsccs",l.logApplicationActivationStatus=!1,l.logPackageActivationStatus=!1,l.autoSyncInterval=null,o.startAutoSync()},9720:(e,t,n)=>{t.__esModule=!0,t.default=void 0;var o,i=(o=n(3295))&&o.__esModule?o:{default:o},r=n(1581);function a(e,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},a(e,t)}var s=function(e){var t,n;function o(t){var n;return(n=e.call(this,t)||this).type=r.TAG,n}return n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,a(t,n),o}(i.default);t.default=s,e.exports=t.default},9736:(e,t,n)=>{n.d(t,{v:()=>C});var o=n(205),i=n(2515),r=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class a{static addNodeToTree(e){if(null==this.root)return this.root=e,this.root;this.root=this.root.addNode(e,this.root,this.root.height)}static addConceptToTree(e){var t=new i.x(e.id,e,null,null);new i.x(e.characterValue,e,null,null);this.addNodeToTree(t)}static waitForDataToLoad(){return r(this,void 0,void 0,function*(){return new Promise((e,t)=>{this.checkFlag(e),setTimeout(()=>{t("not")},25e3)})})}static checkFlag(e){if(o.B.isLocalDataLoaded)return e("done");setTimeout(a.checkFlag,1e3,e)}static getNodeFromTree(e){return r(this,void 0,void 0,function*(){return this.root?this.root.getFromNode(e,this.root):null})}static getCharacterAndTypeFromTree(e,t){return this.root?this.root.getFromNodeWithCharacterAndType(e,t,this.root):this.root}static updateSyncStatus(e){return this.root?this.root.updateNodeSyncStatus(e,!0,this.root):this.root}static removeNodeFromTree(e){return r(this,void 0,void 0,function*(){this.root&&(this.root=this.root.removeNode(this.root,e))})}}a.root=null;var s=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class c{static waitForDataToLoad(){return s(this,void 0,void 0,function*(){return new Promise((e,t)=>{this.checkFlag(e),setTimeout(()=>{t("not")},25e3)})})}static checkFlag(e){if(o.B.isLocalCharacterLoaded)return e("done");setTimeout(c.checkFlag,1e3,e)}static addNodeToTree(e){return s(this,void 0,void 0,function*(){return null==this.LocalCharacterRoot?(this.LocalCharacterRoot=e,this.LocalCharacterRoot):(this.LocalCharacterRoot=this.LocalCharacterRoot.addCharacterNode(e,this.LocalCharacterRoot,this.LocalCharacterRoot.height),this.LocalCharacterRoot)})}static addConceptToTree(e){if(""!=e.characterValue){var t=new i.x(e.characterValue,e,null,null);this.addNodeToTree(t)}}static getNodeFromTree(e){return this.LocalCharacterRoot?this.LocalCharacterRoot.getCharacterFromNode(e,this.LocalCharacterRoot):this.LocalCharacterRoot}static getCharacterAndTypeFromTree(e,t){return s(this,void 0,void 0,function*(){return this.LocalCharacterRoot?this.LocalCharacterRoot.getFromNodeWithCharacterAndType(e,t,this.LocalCharacterRoot):this.LocalCharacterRoot})}static getCharacterAndCategoryFromTree(e,t){return s(this,void 0,void 0,function*(){return this.LocalCharacterRoot?this.LocalCharacterRoot.getFromNodeWithCharacterAndCategory(e,t,this.LocalCharacterRoot):this.LocalCharacterRoot})}static removeConceptType(e,t){this.LocalCharacterRoot&&(this.LocalCharacterRoot=this.LocalCharacterRoot.removeNodeWithVariants(this.LocalCharacterRoot,e,t))}}c.LocalCharacterRoot=null;var l=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class d{static addNodeToTree(e){return l(this,void 0,void 0,function*(){return null==this.LocalTypeRoot?(this.LocalTypeRoot=e,this.LocalTypeRoot):(this.LocalTypeRoot=this.LocalTypeRoot.addTypeNode(e,this.LocalTypeRoot,this.LocalTypeRoot.height),this.LocalTypeRoot)})}static addConceptToTree(e){if(0!=e.typeId){var t=new i.x(e.typeId,e,null,null);this.addNodeToTree(t)}}static removeConceptType(e,t){this.LocalTypeRoot&&(this.LocalTypeRoot=this.LocalTypeRoot.removeNodeWithVariants(this.LocalTypeRoot,e,t))}static getNodeFromTree(e){return this.LocalTypeRoot?this.LocalTypeRoot.getFromNode(e,this.LocalTypeRoot):this.LocalTypeRoot}static getTypeVariantsFromTree(e){var t=this.getNodeFromTree(e),n=[];if(t){n.push(null==t?void 0:t.value);for(let e=0;e<t.variants.length;e++)n.push(t.variants[e].value);return n}}static waitForDataToLoad(){return l(this,void 0,void 0,function*(){return new Promise((e,t)=>{this.checkFlag(e),setTimeout(()=>{t("not")},25e3)})})}static checkFlag(e){if(o.B.isLocalTypeLoaded)return e("done");setTimeout(d.checkFlag,1e3,e)}static getTypeVariantsFromTreeWithUserId(e,t){return l(this,void 0,void 0,function*(){var n=[],o=this.getNodeFromTree(e);if(o){o.value.userId!=t&&999!=o.value.userId||n.push(null==o?void 0:o.value);for(let e=0;e<o.variants.length;e++)o.variants[e].value.userId!=t&&999!=o.value.userId||n.push(o.variants[e].value)}return n})}}d.LocalTypeRoot=null;var u=n(6416),h=n(3026),p=n(7820),f=n(4864),m=n(628),y=n(8957),v=n(4024),g=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class C{constructor(){this.name="conceptsArray"}static AddConcept(e){0!=e.id&&(a.addConceptToTree(e),c.addConceptToTree(e),d.addConceptToTree(e),this.localconceptsArray.push(e))}static AddPermanentConcept(e){0!=e.id&&(a.removeNodeFromTree(e.ghostId),c.removeConceptType(e.characterValue,e.ghostId),d.removeConceptType(e.typeId,e.ghostId),p.G.addConceptToTree(e),h.I.AddConcept(e),(0,y.AddGhostConcept)(e,e.userId,v.b.sessionId))}static RemoveConcept(e){return g(this,void 0,void 0,function*(){try{0!=e.id&&(a.removeNodeFromTree(e.ghostId),c.removeConceptType(e.characterValue,e.ghostId),d.removeConceptType(e.typeId,e.ghostId))}catch(e){throw e}})}static RemoveConceptById(e){return g(this,void 0,void 0,function*(){try{let t=yield C.GetConcept(e);0!=t.id&&(a.removeNodeFromTree(e),c.removeConceptType(t.characterValue,t.ghostId),d.removeConceptType(t.typeId,t.ghostId),m.H.RemoveConcept(t))}catch(e){throw e}})}static AddConceptToMemory(e){0!=e.id&&(a.addConceptToTree(e),c.addConceptToTree(e),d.addConceptToTree(e))}static GetConcept(e){return g(this,void 0,void 0,function*(){var t=(0,u.u)(),n=yield a.getNodeFromTree(e);if(null==n?void 0:n.value){var o=n.value;o&&(t=o)}return t})}static UpdateConceptSyncStatus(e){return g(this,void 0,void 0,function*(){a.updateSyncStatus(e)})}static GetConceptByGhostId(e){return g(this,void 0,void 0,function*(){var t=(0,u.u)(),n=yield p.G.getNodeFromTree(e);if(null==n?void 0:n.value){var o=n.value;o&&(t=o)}return t})}static GetConceptByCharacter(e){return g(this,void 0,void 0,function*(){var t=(0,u.u)(),n=c.getNodeFromTree(e);return n&&(t=n.value),t})}static GetConceptByCharacterAndTypeLocal(e,t){return g(this,void 0,void 0,function*(){var n=(0,u.u)(),o=yield c.getCharacterAndTypeFromTree(e,t);return o&&(n=o.value),n})}static GetConceptByCharacterAndCategoryLocal(e,t){return g(this,void 0,void 0,function*(){var n=(0,u.u)(),o=yield c.getCharacterAndCategoryFromTree(e,t);return o&&(n=o.value),n})}static GetConceptsByTypeId(e){let t=[];for(var n=0;n<this.localconceptsArray.length;n++)this.localconceptsArray[n].typeId==e&&t.push(this.localconceptsArray[n]);return t}static GetConceptsByTypeIdAndUser(e,t){return g(this,void 0,void 0,function*(){let n=[];return n=yield d.getTypeVariantsFromTreeWithUserId(e,t),n})}static ClearData(){return g(this,void 0,void 0,function*(){this.localconceptsArray=[],f.G.connectionArray=[]})}getName(){return this.name}}C.localconceptsArray=[]},9746:()=>{},9934:(e,t,n)=>{function o(e,t){return-1===e.indexOf(t)&&e.push(t),e}n.d(t,{A:()=>o})},9975:(e,t,n)=>{n.d(t,{A:()=>s});var o=n(8957),i=n(9736),r=n(3077),a=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function s(e,t,n,s,c){return a(this,arguments,void 0,function*(e,t,n,a,s,c={concepts:[],connections:[]}){var l,d,u,h;if(o.serviceWorker)try{const i=yield(0,o.sendMessage)("MakeTheConceptLocal",{referent:e,typeCharacter:t,userId:n,categoryId:a,typeId:s,actions:c});return(null===(d=null===(l=null==i?void 0:i.actions)||void 0===l?void 0:l.concepts)||void 0===d?void 0:d.length)&&(c.concepts=JSON.parse(JSON.stringify(i.actions.concepts))),(null===(h=null===(u=null==i?void 0:i.actions)||void 0===u?void 0:u.connections)||void 0===h?void 0:h.length)&&(c.connections=JSON.parse(JSON.stringify(i.actions.connections))),i.data}catch(e){(0,o.handleServiceWorkerException)(e)}let p=yield i.v.GetConceptByCharacterAndTypeLocal(e,s),f=p;return"the"==t&&(a=1),0==f.id&&(p=yield(0,r.A)(e,t,n,a,s,4,void 0,null,c),f=p),f})}},9977:()=>{}},t={};function n(o){var i=t[o];if(void 0!==i)return i.exports;var r=t[o]={exports:{}};return e[o](r,r.exports,n),r.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o=n(8957);const i=o.ADMIN,r=o.ALLID,a=o.AccessTracker,s=o.AddGhostConcept,c=o.Anomaly,l=o.BaseUrl,d=o.BinaryTree,u=o.BuildWidgetFromId,h=o.BuilderStatefulWidget,p=o.Composition,f=o.CompositionBinaryTree,m=o.CompositionNode,y=o.Concept,v=o.ConceptsData,g=o.Connection,C=o.ConnectionData,w=o.CountInfo,T=o.CreateComposition,I=o.CreateConnection,k=o.CreateConnectionBetweenEntityLocal,b=o.CreateConnectionBetweenTwoConcepts,A=o.CreateConnectionBetweenTwoConceptsGeneral,S=o.CreateConnectionBetweenTwoConceptsLocal,L=o.CreateData,N=o.CreateDefaultConcept,_=o.CreateDefaultLConcept,x=o.CreateSession,D=o.CreateSessionVisit,P=o.CreateTheCompositionLocal,E=o.CreateTheCompositionWithCache,R=o.CreateTheConnection,O=o.CreateTheConnectionGeneral,B=o.CreateTheConnectionLocal,F=o.DATAID,U=o.DATAIDDATE,G=o.DATAV2,M=o.DelayFunctionExecution,W=o.DeleteConceptById,j=o.DeleteConceptLocal,V=o.DeleteConnectionById,q=o.DeleteConnectionByIdBulk,H=o.DeleteConnectionByType,$=o.DeleteConnectionByTypeBulk,z=o.DeleteUser,J=o.DependencyObserver,Q=o.Environments,Y=o.FilterSearch,X=o.FormatFromConnections,K=o.FormatFromConnectionsAltered,Z=o.FreeschemaQuery,ee=o.FreeschemaQueryApi,te=o.GetAllConnectionsOfComposition,ne=o.GetAllConnectionsOfCompositionBulk,oe=o.GetAllTheConnectionsByTypeAndOfTheConcept,ie=o.GetComposition,re=o.GetCompositionBulk,ae=o.GetCompositionBulkWithDataId,se=o.GetCompositionFromConnectionsWithDataId,ce=o.GetCompositionFromConnectionsWithDataIdFromConnections,le=o.GetCompositionFromConnectionsWithDataIdInObject,de=o.GetCompositionFromConnectionsWithDataIdIndex,ue=o.GetCompositionFromConnectionsWithIndex,he=o.GetCompositionFromConnectionsWithIndexFromConnections,pe=o.GetCompositionFromMemoryWithConnections,fe=o.GetCompositionList,me=o.GetCompositionListAll,ye=o.GetCompositionListAllWithId,ve=o.GetCompositionListListener,ge=o.GetCompositionListLocal,Ce=o.GetCompositionListLocalWithId,we=o.GetCompositionListWithId,Te=o.GetCompositionListWithIdUpdated,Ie=o.GetCompositionListener,ke=o.GetCompositionLocal,be=o.GetCompositionLocalWithId,Ae=o.GetCompositionWithAllIds,Se=o.GetCompositionWithCache,Le=o.GetCompositionWithDataIdBulk,Ne=o.GetCompositionWithDataIdWithCache,_e=o.GetCompositionWithId,xe=o.GetCompositionWithIdAndDateFromMemory,De=o.GetConceptBulk,Pe=o.GetConceptByCharacter,Ee=o.GetConceptByCharacterAndCategoryLocal,Re=o.GetConceptByCharacterAndType,Oe=o.GetConnectionBetweenTwoConceptsLinker,Be=o.GetConnectionBulk,Fe=o.GetConnectionById,Ue=o.GetConnectionDataPrefetch,Ge=o.GetConnectionOfTheConcept,Me=o.GetConnectionTypeForCount,We=o.GetConnectionsBetweenApi,je=o.GetFreeschemaImage,Ve=o.GetFreeschemaImageUrl,qe=o.GetImageApi,He=o.GetLink,$e=o.GetLinkListListener,ze=o.GetLinkListener,Je=o.GetLinkRaw,Qe=o.GetLinkerConnectionFromConcepts,Ye=o.GetLinkerConnectionToConcepts,Xe=o.GetRelation,Ke=o.GetRelationLocal,Ze=o.GetRelationNew,et=o.GetRelationRaw,tt=o.GetTheConcept,nt=o.GetTheConceptLocal,ot=o.GetUserGhostId,it=o.JUSTDATA,rt=o.LConcept,at=o.LConnection,st=o.LISTNORMAL,ct=o.LocalConceptsData,lt=o.LocalSyncData,dt=o.LocalTransaction,ut=o.LogEvent,ht=o.Logger,pt=o.LoginToBackend,ft=o.MakeTheInstanceConcept,mt=o.MakeTheInstanceConceptLocal,yt=o.MakeTheTimestamp,vt=o.MakeTheTypeConceptApi,gt=o.MakeTheTypeConceptLocal,Ct=o.NORMAL,wt=o.PRIVATE,Tt=o.PUBLIC,It=o.PatcherStructure,kt=o.Prototype,bt=o.RAW,At=o.RecursiveSearchApi,St=o.RecursiveSearchApiNewRawFullLinker,Lt=o.RecursiveSearchApiRaw,Nt=o.RecursiveSearchApiRawFullLinker,_t=o.RecursiveSearchApiWithInternalConnections,xt=o.RecursiveSearchListener,Dt=o.SchemaQuery,Pt=o.SchemaQueryListener,Et=o.SearchAllConcepts,Rt=o.SearchLinkInternal,Ot=o.SearchLinkInternalAll,Bt=o.SearchLinkMultipleAll,Ft=o.SearchLinkMultipleAllObservable,Ut=o.SearchLinkMultipleApi,Gt=o.SearchQuery,Mt=o.SearchStructure,Wt=o.SearchWithLinker,jt=o.SearchWithTypeAndLinker,Vt=o.SearchWithTypeAndLinkerApi,qt=o.Selector,Ht=o.SessionData,$t=o.Signin,zt=o.Signup,Jt=o.SignupEntity,Qt=o.SplitStrings,Yt=o.StatefulWidget,Xt=o.SyncData,Kt=o.TokenStorage,Zt=o.TrashTheConcept,en=o.UpdateComposition,tn=o.UpdateCompositionLocal,nn=o.UserBinaryTree,on=o.Validator,rn=o.ViewInternalData,an=o.ViewInternalDataApi,sn=o.WidgetTree,cn=o.buildFetchConnection,ln=o.clearAllCaches,dn=o.convertFromConceptToLConcept,un=o.convertFromLConceptToConcept,hn=o.convertWidgetTreeToWidget,pn=o.convertWidgetTreeToWidgetWithWrapper,fn=o.createFormFieldData,mn=o.createPrototypeLocal,yn=o.dispatchIdEvent,vn=o.getFromDatabaseWithType,gn=o.getObjectsFromIndexDb,Cn=o.getTsccsAutocompleteMetadata,wn=o.getUploadFileLimit,Tn=o.getUserDetails,In=o.getWidgetBulkFromId,kn=o.getWidgetFromId,bn=o.handleServiceWorkerException,An=o.hasActivatedSW,Sn=o.importLatestWidget,Ln=o.importRecentWidget,Nn=o.init,_n=o.orderTheConnections,xn=o.recursiveFetch,Dn=o.recursiveFetchNew,Pn=o.removeAllChildren,En=o.renderImportedWidget,Rn=o.renderLatestWidget,On=o.renderPage,Bn=o.renderWidget,Fn=o.searchLinkMultipleListener,Un=o.sendEmail,Gn=o.sendMessage,Mn=o.serviceWorker,Wn=o.setHasActivatedSW,jn=o.storeToDatabase,Vn=o.subscribedListeners,qn=o.tsccsAutocompleteMetadata,Hn=o.unwrapContainers,$n=o.updateAccessToken,zn=o.uploadAttachment,Jn=o.uploadFile,Qn=o.uploadImage,Yn=o.uploadImageV2,Xn=o.validDocumentFormats,Kn=o.validImageFormats;export{i as ADMIN,r as ALLID,a as AccessTracker,s as AddGhostConcept,c as Anomaly,l as BaseUrl,d as BinaryTree,u as BuildWidgetFromId,h as BuilderStatefulWidget,p as Composition,f as CompositionBinaryTree,m as CompositionNode,y as Concept,v as ConceptsData,g as Connection,C as ConnectionData,w as CountInfo,T as CreateComposition,I as CreateConnection,k as CreateConnectionBetweenEntityLocal,b as CreateConnectionBetweenTwoConcepts,A as CreateConnectionBetweenTwoConceptsGeneral,S as CreateConnectionBetweenTwoConceptsLocal,L as CreateData,N as CreateDefaultConcept,_ as CreateDefaultLConcept,x as CreateSession,D as CreateSessionVisit,P as CreateTheCompositionLocal,E as CreateTheCompositionWithCache,R as CreateTheConnection,O as CreateTheConnectionGeneral,B as CreateTheConnectionLocal,F as DATAID,U as DATAIDDATE,G as DATAV2,M as DelayFunctionExecution,W as DeleteConceptById,j as DeleteConceptLocal,V as DeleteConnectionById,q as DeleteConnectionByIdBulk,H as DeleteConnectionByType,$ as DeleteConnectionByTypeBulk,z as DeleteUser,J as DependencyObserver,Q as Environments,Y as FilterSearch,X as FormatFromConnections,K as FormatFromConnectionsAltered,Z as FreeschemaQuery,ee as FreeschemaQueryApi,te as GetAllConnectionsOfComposition,ne as GetAllConnectionsOfCompositionBulk,oe as GetAllTheConnectionsByTypeAndOfTheConcept,ie as GetComposition,re as GetCompositionBulk,ae as GetCompositionBulkWithDataId,se as GetCompositionFromConnectionsWithDataId,ce as GetCompositionFromConnectionsWithDataIdFromConnections,le as GetCompositionFromConnectionsWithDataIdInObject,de as GetCompositionFromConnectionsWithDataIdIndex,ue as GetCompositionFromConnectionsWithIndex,he as GetCompositionFromConnectionsWithIndexFromConnections,pe as GetCompositionFromMemoryWithConnections,fe as GetCompositionList,me as GetCompositionListAll,ye as GetCompositionListAllWithId,ve as GetCompositionListListener,ge as GetCompositionListLocal,Ce as GetCompositionListLocalWithId,we as GetCompositionListWithId,Te as GetCompositionListWithIdUpdated,Ie as GetCompositionListener,ke as GetCompositionLocal,be as GetCompositionLocalWithId,Ae as GetCompositionWithAllIds,Se as GetCompositionWithCache,Le as GetCompositionWithDataIdBulk,Ne as GetCompositionWithDataIdWithCache,_e as GetCompositionWithId,xe as GetCompositionWithIdAndDateFromMemory,De as GetConceptBulk,Pe as GetConceptByCharacter,Ee as GetConceptByCharacterAndCategoryLocal,Re as GetConceptByCharacterAndType,Oe as GetConnectionBetweenTwoConceptsLinker,Be as GetConnectionBulk,Fe as GetConnectionById,Ue as GetConnectionDataPrefetch,Ge as GetConnectionOfTheConcept,Me as GetConnectionTypeForCount,We as GetConnectionsBetweenApi,je as GetFreeschemaImage,Ve as GetFreeschemaImageUrl,qe as GetImageApi,He as GetLink,$e as GetLinkListListener,ze as GetLinkListener,Je as GetLinkRaw,Qe as GetLinkerConnectionFromConcepts,Ye as GetLinkerConnectionToConcepts,Xe as GetRelation,Ke as GetRelationLocal,Ze as GetRelationNew,et as GetRelationRaw,tt as GetTheConcept,nt as GetTheConceptLocal,ot as GetUserGhostId,it as JUSTDATA,rt as LConcept,at as LConnection,st as LISTNORMAL,ct as LocalConceptsData,lt as LocalSyncData,dt as LocalTransaction,ut as LogEvent,ht as Logger,pt as LoginToBackend,ft as MakeTheInstanceConcept,mt as MakeTheInstanceConceptLocal,yt as MakeTheTimestamp,vt as MakeTheTypeConceptApi,gt as MakeTheTypeConceptLocal,Ct as NORMAL,wt as PRIVATE,Tt as PUBLIC,It as PatcherStructure,kt as Prototype,bt as RAW,At as RecursiveSearchApi,St as RecursiveSearchApiNewRawFullLinker,Lt as RecursiveSearchApiRaw,Nt as RecursiveSearchApiRawFullLinker,_t as RecursiveSearchApiWithInternalConnections,xt as RecursiveSearchListener,Dt as SchemaQuery,Pt as SchemaQueryListener,Et as SearchAllConcepts,Rt as SearchLinkInternal,Ot as SearchLinkInternalAll,Bt as SearchLinkMultipleAll,Ft as SearchLinkMultipleAllObservable,Ut as SearchLinkMultipleApi,Gt as SearchQuery,Mt as SearchStructure,Wt as SearchWithLinker,jt as SearchWithTypeAndLinker,Vt as SearchWithTypeAndLinkerApi,qt as Selector,Ht as SessionData,$t as Signin,zt as Signup,Jt as SignupEntity,Qt as SplitStrings,Yt as StatefulWidget,Xt as SyncData,Kt as TokenStorage,Zt as TrashTheConcept,en as UpdateComposition,tn as UpdateCompositionLocal,nn as UserBinaryTree,on as Validator,rn as ViewInternalData,an as ViewInternalDataApi,sn as WidgetTree,cn as buildFetchConnection,ln as clearAllCaches,dn as convertFromConceptToLConcept,un as convertFromLConceptToConcept,hn as convertWidgetTreeToWidget,pn as convertWidgetTreeToWidgetWithWrapper,fn as createFormFieldData,mn as createPrototypeLocal,yn as dispatchIdEvent,vn as getFromDatabaseWithType,gn as getObjectsFromIndexDb,Cn as getTsccsAutocompleteMetadata,wn as getUploadFileLimit,Tn as getUserDetails,In as getWidgetBulkFromId,kn as getWidgetFromId,bn as handleServiceWorkerException,An as hasActivatedSW,Sn as importLatestWidget,Ln as importRecentWidget,Nn as init,_n as orderTheConnections,xn as recursiveFetch,Dn as recursiveFetchNew,Pn as removeAllChildren,En as renderImportedWidget,Rn as renderLatestWidget,On as renderPage,Bn as renderWidget,Fn as searchLinkMultipleListener,Un as sendEmail,Gn as sendMessage,Mn as serviceWorker,Wn as setHasActivatedSW,jn as storeToDatabase,Vn as subscribedListeners,qn as tsccsAutocompleteMetadata,Hn as unwrapContainers,$n as updateAccessToken,zn as uploadAttachment,Jn as uploadFile,Qn as uploadImage,Yn as uploadImageV2,Xn as validDocumentFormats,Kn as validImageFormats};
2
+ var e={2:(e,t,n)=>{n.d(t,{s:()=>d});var o=n(8286),i=n(9581),r=n(1412),a=n(3518),s=n(1863),c=n(8957),l=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function d(e){var t=arguments;return l(this,void 0,void 0,function*(){const n=c.Logger.logfunction("GetAllConnectionsOfComposition",t);var i=[];if(0==(i=yield o.d.GetConnectionsOfConcept(e)).length){i=yield u(e)}else{var a=yield u(e);(0,r.e)(a,i),i=a}return c.Logger.logUpdate(n),i})}function u(e){var t=arguments;return l(this,void 0,void 0,function*(){const n=c.Logger.logfunction("GetAllConnectionsOfCompositionOnline",t);var r=[];try{(0,a.Xr)("application/json");const t=new Headers,d=new FormData;d.append("composition_id",e.toString());const u=yield fetch(i.B.GetAllConnectionsOfCompositionUrl(),{method:"POST",headers:t,body:d});if(!u.ok)throw(0,s.ry)(u),new Error(`Error! status: ${u.status}`);const h=yield u.json();for(var l=0;l<h.length;l++)o.d.AddConnection(h[l]),r.push(h[l]);return c.Logger.logUpdate(n),r}catch(e){Error,(0,s.Mb)(e,i.B.GetAllConnectionsOfCompositionUrl()),(0,s.ey)(n,"GetAllConnectionsOfCompositionOnline",e)}})}},38:e=>{class t{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}e.exports=t,t.default=t},71:(e,t)=>{t.__esModule=!0,t.word=t.tilde=t.tab=t.str=t.space=t.slash=t.singleQuote=t.semicolon=t.plus=t.pipe=t.openSquare=t.openParenthesis=t.newline=t.greaterThan=t.feed=t.equals=t.doubleQuote=t.dollar=t.cr=t.comment=t.comma=t.combinator=t.colon=t.closeSquare=t.closeParenthesis=t.caret=t.bang=t.backslash=t.at=t.asterisk=t.ampersand=void 0;t.ampersand=38;t.asterisk=42;t.at=64;t.comma=44;t.colon=58;t.semicolon=59;t.openParenthesis=40;t.closeParenthesis=41;t.openSquare=91;t.closeSquare=93;t.dollar=36;t.tilde=126;t.caret=94;t.plus=43;t.equals=61;t.pipe=124;t.greaterThan=62;t.space=32;t.singleQuote=39;t.doubleQuote=34;t.slash=47;t.bang=33;t.backslash=92;t.cr=13;t.feed=12;t.newline=10;t.tab=9;t.str=39;t.comment=-1;t.word=-2;t.combinator=-3},145:(e,t,n)=>{let o,i,r=n(7793);class a extends r{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new o(new i,this,e).stringify()}}a.registerLazyResult=e=>{o=e},a.registerProcessor=e=>{i=e},e.exports=a,a.default=a},176:(e,t,n)=>{n.d(t,{F4:()=>a,P6:()=>c,dp:()=>s});var o=n(2155),i=n(7282),r=n(6416);function a(e){var t,n;const o=(0,r.u)();return o.id=e.id,o.ghostId=e.ghostId,o.userId=e.userId,o.accessId=e.accessId,o.categoryId=e.categoryId,o.characterValue=e.characterValue,o.entryTimeStamp=e.entryTimeStamp,o.typeId=e.typeId,o.type=e.type,o.isTemp=!1,o.typeCharacter=null!==(n=null===(t=null==e?void 0:e.type)||void 0===t?void 0:t.characterValue)&&void 0!==n?n:"",o}function s(e){const t=(0,i.o)();return t.id=e.id,t.ghostId=e.ghostId,t.userId=e.userId,t.accessId=e.accessId,t.entryTimeStamp=e.entryTimeStamp,t.typeId=e.typeId,t.categoryId=e.categoryId,t}function c(e){const t=new o.N(0,0,0,0,0,0,0);return t.id=e.id,t.ghostId=e.ghostId,t.accessId=e.accessId,t.ofTheConceptId=e.ofTheConceptId,t.toTheConceptId=e.toTheConceptId,t.entryTimeStamp=e.entryTimeStamp,t.typeId=e.typeId,t.isTemp=!1,t}},197:()=>{},205:(e,t,n)=>{n.d(t,{B:()=>o});class o{}o.isTypeLoaded=!1,o.isCharacterLoaded=!1,o.isDataLoaded=!1,o.isLocalDataLoaded=!1,o.isLocalCharacterLoaded=!1,o.isLocalTypeLoaded=!1,o.isConnectionLoaded=!1,o.isConnectionTypeLoaded=!1,o.isLocalConnectionLoaded=!1},263:(e,t)=>{t.__esModule=!0,t.default=function(e){return e.sort(function(e,t){return e-t})},e.exports=t.default},276:(e,t,n)=>{n.d(t,{y:()=>o});class o{constructor(){this.conceptId=0,this.connectionTypeId=0,this.connectionType="",this.count=0}}},339:(e,t,n)=>{t.__esModule=!0,t.default=void 0;var o,i=(o=n(3631))&&o.__esModule?o:{default:o},r=n(1581);function a(e,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},a(e,t)}var s=function(e){var t,n;function o(t){var n;return(n=e.call(this,t)||this).type=r.SELECTOR,n}return n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,a(t,n),o}(i.default);t.default=s,e.exports=t.default},396:(e,t,n)=>{let o=n(7793);class i extends o{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}}e.exports=i,i.default=i,o.registerAtRule(i)},425:(e,t,n)=>{t.__esModule=!0,t.default=void 0;var o,i=(o=n(4646))&&o.__esModule?o:{default:o},r=n(1581);function a(e,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},a(e,t)}var s=function(e){var t,n;function o(t){var n;return(n=e.call(this,t)||this).type=r.COMMENT,n}return n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,a(t,n),o}(i.default);t.default=s,e.exports=t.default},442:(e,t,n)=>{n.d(t,{Y:()=>f});var o=n(1167),i=n(2155),r=n(9581),a=n(3518),s=n(1863),c=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};var l=n(3026),d=n(8286),u=n(8957),h=n(8176),p=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class f{static CheckContains(e){for(var t=!1,n=0;n<this.conceptsSyncArray.length;n++)this.conceptsSyncArray[n].id==e.id&&(t=!0);return t}static SyncDataDelete(e){for(var t=0;t<this.conceptsSyncArray.length;t++)e==this.conceptsSyncArray[t].id&&this.conceptsSyncArray.splice(t,1);for(t=0;t<this.connectionSyncArray.length;t++)this.connectionSyncArray[t].ofTheConceptId!=e&&this.connectionSyncArray[t].toTheConceptId!=e&&this.connectionSyncArray[t].typeId!=e||this.connectionSyncArray.splice(t,1)}static CheckContainsConnection(e){for(var t=!1,n=0;n<this.connectionSyncArray.length;n++)this.connectionSyncArray[n].id==e.id&&(t=!0);return t}static AddConcept(e){this.conceptsSyncArray.push(e)}static RemoveConcept(e){for(var t=0;t<this.conceptsSyncArray.length;t++)this.conceptsSyncArray[t].id==e.id&&this.conceptsSyncArray.splice(t,1)}static AddConnection(e){this.connectionSyncArray.push(e)}static RemoveConnection(e){for(var t=0;t<this.connectionSyncArray.length;t++)this.connectionSyncArray[t].id==e.id&&this.connectionSyncArray.splice(t,1)}static SyncDataOnline(){return p(this,void 0,void 0,function*(){if(u.serviceWorker)try{return(yield(0,u.sendMessage)("SyncData__SyncDataOnline",{})).data}catch(e){(0,u.handleServiceWorkerException)(e)}for(let e=0;e<this.conceptsSyncArray.length;e++)l.I.AddConcept(this.conceptsSyncArray[e]);for(let e=0;e<this.connectionSyncArray.length;e++)d.d.AddConnection(this.connectionSyncArray[e]);if(this.conceptsSyncArray.length>0){let e=this.conceptsSyncArray.slice();this.conceptsSyncArray=[],(0,o.Y)(e)}if(this.connectionSyncArray.length>0){let e=this.connectionSyncArray.slice();this.connectionSyncArray=[],yield function(e){return c(this,void 0,void 0,function*(){let t=new i.N(0,0,0,0,0,0,0);try{var n=(0,a.Xr)(),o=JSON.stringify(e);const i=yield fetch(r.B.CreateTheConnectionUrl(),{method:"POST",headers:n,body:o});return i.ok?yield i.json():(0,s.ry)(i),t}catch(e){throw Error,e}})}(e)}return h.a.clearAll(),"done"})}}f.conceptsSyncArray=[],f.connectionSyncArray=[]},490:(e,t,n)=>{n.d(t,{s:()=>i});var o=n(4024);function i(){var e,t,n,i,r,a,s,c,l,d,u,h;let p={entity:0,userConcept:0,userId:0,token:o.b.BearerAccessToken,email:"",amcode:"",roles:[]};const f=o.b.profileCache;if(f)return p.entity=null!==(e=f.entityId)&&void 0!==e?e:0,p.userConcept=null!==(t=f.userConcept)&&void 0!==t?t:0,p.userId=null!==(n=f.userId)&&void 0!==n?n:0,p.email=null!==(i=f.email)&&void 0!==i?i:"",p.amcode=null!==(r=f.amcode)&&void 0!==r?r:"",p.roles=null!==(a=f.roles)&&void 0!==a?a:[],p;try{const e=(null===localStorage||void 0===localStorage?void 0:localStorage.getItem("profile"))||"";if(e){const t=JSON.parse(e);p.entity=null!==(s=null==t?void 0:t.entityId)&&void 0!==s?s:0,p.userConcept=null!==(c=null==t?void 0:t.userConcept)&&void 0!==c?c:0,p.userId=null!==(l=null==t?void 0:t.userId)&&void 0!==l?l:0,p.email=null!==(d=null==t?void 0:t.email)&&void 0!==d?d:"",p.amcode=null!==(u=null==t?void 0:t.amcode)&&void 0!==u?u:"",p.token||(p.token=null!==(h=null==t?void 0:t.token)&&void 0!==h?h:"")}}catch(e){}return p}},518:(e,t,n)=>{t.__esModule=!0,t.default=void 0;var o,i=(o=n(3631))&&o.__esModule?o:{default:o},r=n(1581);function a(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}var c=function(e){var t,n;function o(t){var n;return(n=e.call(this,t)||this).type=r.ROOT,n}n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n);var i,c,l,d=o.prototype;return d.toString=function(){var e=this.reduce(function(e,t){return e.push(String(t)),e},[]).join(",");return this.trailingComma?e+",":e},d.error=function(e,t){return this._error?this._error(e,t):new Error(e)},i=o,(c=[{key:"errorGenerator",set:function(e){this._error=e}}])&&a(i.prototype,c),l&&a(i,l),Object.defineProperty(i,"prototype",{writable:!1}),o}(i.default);t.default=c,e.exports=t.default},628:(e,t,n)=>{n.d(t,{H:()=>y});var o=n(9581),i=n(4024),r=n(8957),a=n(1863),s=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};const c=(e,t,...n)=>s(void 0,[e,t,...n],void 0,function*(e,t,n=!0){let r={concepts:[],connections:[]};try{const s=new Headers;let c={concepts:e,connections:t};s.set("Content-Type","application/json"),s.set("Authorization","Bearer "+i.b.BearerAccessToken),s.set("Accept","application/json"),s.set("X-Session-Id",i.b.sessionId.toString()),s.set("Randomizer",o.B.getRandomizer().toString());const l=yield fetch(o.B.CreateGhostConceptApiUrl(n),{method:"POST",headers:s,body:JSON.stringify(c)});if(!l.ok)throw(0,a.ry)(l),new Error(`Error! status: ${l.status}`);const d=yield l.json();return r.concepts=d.concepts,r.connections=d.connections,r}catch(e){throw Error,e}});function l(e,t){const n=[];for(let o=0;o<e.length;o+=t){const i=e.slice(o,o+t);n.push(i)}return n}const d=(...e)=>s(void 0,[...e],void 0,function*(e=[]){return yield Promise.all(e.map(e=>{let t=JSON.parse(JSON.stringify(e));return delete t.type,delete t.ofConcept,delete t.toConcept,t}))});var u=n(9003),h=n(9736),p=n(4864),f=n(8176),m=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class y{static CheckContains(e){for(var t=!1,n=0;n<this.conceptsSyncArray.length;n++)this.conceptsSyncArray[n].id==e.id&&(t=!0);return t}static SyncDataDelete(e){for(var t=0;t<this.conceptsSyncArray.length;t++)e==this.conceptsSyncArray[t].id&&this.conceptsSyncArray.splice(t,1);for(t=0;t<this.connectionSyncArray.length;t++)this.connectionSyncArray[t].ofTheConceptId!=e&&this.connectionSyncArray[t].toTheConceptId!=e&&this.connectionSyncArray[t].typeId!=e||this.connectionSyncArray.splice(t,1)}static CheckContainsConnection(e){for(var t=!1,n=0;n<this.connectionSyncArray.length;n++)this.connectionSyncArray[n].id==e.id&&(t=!0);return t}static AddConcept(e){try{let t=!1;0!=y.CheckIfTheConceptIdExists(e.id,this.conceptsSyncArray).id&&(t=!0),t||this.conceptsSyncArray.push(e)}catch(e){throw e}}static RemoveConcept(e){for(var t=0;t<this.conceptsSyncArray.length;t++)this.conceptsSyncArray[t].id==e.id&&this.conceptsSyncArray.splice(t,1)}static SyncDataOnlineWithoutAuth(e,t){return m(this,arguments,void 0,function*(e,t,n=!1){return y.SyncDataOnline(e,t,n)})}static SyncDataOnline(e,t){return m(this,arguments,void 0,function*(e,t,n=!0){let o=performance.now();setTimeout(()=>{},5e3);try{if(r.serviceWorker)try{return(yield(0,r.sendMessage)("LocalSyncData__SyncDataOnline",{transactionId:e,withAuth:n})).data}catch(e){(0,r.handleServiceWorkerException)(e)}let o=[],i=[];if(e&&this.transactionCollections.some(t=>t.id==e)){const t=this.transactionCollections.find(t=>t.id==e);if(this.transactionCollections=this.transactionCollections.filter(t=>t.id!=e),this.transactionCollections=this.transactionCollections.filter(e=>new Date(e.createdDate).getTime()>(new Date).getTime()-6048e5),!t)return;o=t.data.concepts.slice(),i=t.data.connections.slice()}else Array.isArray(null==t?void 0:t.concepts)&&Array.isArray(null==t?void 0:t.connections)?(o=t.concepts.slice(),i=t.connections.slice(),this.conceptsSyncArray=this.conceptsSyncArray.filter(e=>{const n=t.concepts.some(t=>e.id==t.id||e.ghostId==t.ghostId);return n}),this.connectionSyncArray=this.connectionSyncArray.filter(e=>{const n=t.connections.some(t=>e.id==t.id||e.ghostId==t.ghostId);return n})):(o=this.conceptsSyncArray.slice()||[],i=this.connectionSyncArray.slice()||[],this.connectionSyncArray=[],this.conceptsSyncArray=[]);let u=[];for(let e=0;e<o.length;e++)u.push(o[e]),yield h.v.UpdateConceptSyncStatus(o[e].id);if(0===u.length&&0===i.length)return o;yield this.UpdateConceptListToIncludeRelatedConcepts(i,u);let m=yield function(e,t){return s(this,arguments,void 0,function*(e,t,n=!0){const o=r.Logger.logfunction("CreateTheGhostConceptApi",[e.length,t.length]);try{const i=1e3;let a={concepts:[],connections:[]};if(0===e.length&&0===t.length)return r.Logger.logUpdate(o),a;const s=yield d(e),u=yield d(t);if(e.length+t.length<=2*i){const e=yield c(s,u,n);return Array.isArray(null==e?void 0:e.concepts)&&(a.concepts=[...a.concepts,...e.concepts]),Array.isArray(null==e?void 0:e.connections)&&(a.connections=[...a.connections,...e.connections]),r.Logger.logUpdate(o),a}const h=l(s,i),p=l(u,i),f=[],m=[];for(let e=0;e<h.length;e++){const t=h[e];f.push(c(t,[],n))}const y=yield Promise.all(f);for(let e=0;e<y.length;e++){const t=y[e];Array.isArray(null==t?void 0:t.concepts)&&(a.concepts=[...a.concepts,...t.concepts]),Array.isArray(null==t?void 0:t.connections)&&(a.connections=[...a.connections,...t.connections])}for(let e=0;e<p.length;e++){const t=p[e];m.push(c([],t,n))}const v=yield Promise.all(m);for(let e=0;e<v.length;e++){const t=v[e];Array.isArray(null==t?void 0:t.concepts)&&(a.concepts=[...a.concepts,...t.concepts]),Array.isArray(null==t?void 0:t.connections)&&(a.connections=[...a.connections,...t.connections])}return r.Logger.logUpdate(o),a}catch(e){throw(0,a.ey)(o,"CreateTheGhostConceptApi",e),e}})}(u,i,n),y=m.concepts,v=m.connections;for(let e=0;e<y.length;e++)h.v.AddPermanentConcept(y[e]);for(let e=0;e<v.length;e++)p.G.AddPermanentConnection(v[e]);return f.a.clearAll(),o}catch(e){throw r.Logger.logError(o,"unknown",void 0,"unknown",void 0,500,e,"SyncDataOnline",[],"unknown",void 0),e}})}static ConvertGhostIdsInConnections(e){var t,n,o;for(let i=0;i<e.length;i++){let r=e[i].ofTheConceptId,a=e[i].toTheConceptId,s=e[i].typeId,c=null!==(t=y.ghostIdMap.get(r))&&void 0!==t?t:r,l=null!==(n=y.ghostIdMap.get(a))&&void 0!==n?n:a,d=null!==(o=y.ghostIdMap.get(s))&&void 0!==o?o:s;e[i].ofTheConceptId=c,e[i].toTheConceptId=l,e[i].typeId=d}}static UpdateConceptListToIncludeRelatedConcepts(e,t){return m(this,void 0,void 0,function*(){for(let n=0;n<e.length;n++){let o=e[n].ofTheConceptId,i=e[n].toTheConceptId,r=e[n].typeId;if(o<0){let i=this.CheckIfTheConceptIdExists(o,t);0==i.id&&(i=yield h.v.GetConceptByGhostId(o),0!=i.id?i.id!=i.ghostId&&(e[n].ofTheConceptId=i.id):(i=yield h.v.GetConcept(o),this.AddConceptIfDoesNotExist(i,t)))}if(i<0){let o=this.CheckIfTheConceptIdExists(i,t);0==o.id&&(o=yield h.v.GetConceptByGhostId(i),0!=o.id?o.id!=o.ghostId&&(e[n].toTheConceptId=o.id):(o=yield h.v.GetConcept(i),this.AddConceptIfDoesNotExist(o,t)))}if(r<0){let o=this.CheckIfTheConceptIdExists(r,t);0==o.id&&(o=yield h.v.GetConceptByGhostId(r),0!=o.id?o.id!=o.ghostId&&(e[n].typeId=o.id):(o=yield h.v.GetConcept(r),this.AddConceptIfDoesNotExist(o,t)))}}})}static AddConceptIfDoesNotExist(e,t=[]){let n=!1;for(let o=0;o<t.length;o++)e.ghostId==t[o].ghostId&&(n=!0);n||t.push(e)}static CheckIfTheConceptIdExists(e,t=[]){let n=(0,r.CreateDefaultLConcept)();for(let o=0;o<t.length;o++)e!=t[o].ghostId&&e!=t[o].id||(n=t[o]);return n}static AddConnection(e){this.connectionSyncArray.push(e)}static RemoveConnection(e){for(var t=0;t<this.connectionSyncArray.length;t++)this.connectionSyncArray[t].id==e.id&&this.connectionSyncArray.splice(t,1)}static RemoveConnectionById(e){for(var t=0;t<this.connectionSyncArray.length;t++)this.connectionSyncArray[t].id==e&&this.connectionSyncArray.splice(t,1)}static syncDataLocalDb(){return m(this,void 0,void 0,function*(){if(this.conceptsSyncArray.length>0){for(let e=0;e<this.conceptsSyncArray.length;e++)(0,u.kH)("localconcept",this.conceptsSyncArray[e]);this.conceptsSyncArray=[]}if(this.connectionSyncArray.length>0){for(let e=0;e<this.connectionSyncArray.length;e++)(0,u.kH)("localconnection",this.connectionSyncArray[e]);this.connectionSyncArray=[]}return"done"})}static initializeTransaction(e){return m(this,void 0,void 0,function*(){try{if(r.serviceWorker)try{return(yield(0,r.sendMessage)("LocalSyncData__initializeTransaction",{transactionId:e})).data}catch(e){(0,r.handleServiceWorkerException)(e)}if(this.transactionCollections.some(t=>t.id==e))return;this.transactionCollections.push({id:e,data:{concepts:[],connections:[]},createdDate:(new Date).toISOString()})}catch(e){}})}static markTransactionActions(e,t){return m(this,void 0,void 0,function*(){try{if(r.serviceWorker)try{return(yield(0,r.sendMessage)("LocalSyncData__markTransactionActions",{transactionId:e,actions:t})).data}catch(e){(0,r.handleServiceWorkerException)(e)}this.transactionCollections=this.transactionCollections.map(n=>n.id==e?Object.assign(Object.assign({},n),{data:JSON.parse(JSON.stringify(t))}):n),this.conceptsSyncArray=this.conceptsSyncArray.filter(e=>!t.concepts.some(t=>t.id==e.id||t.ghostId==e.id)),this.connectionSyncArray=this.connectionSyncArray.filter(e=>!t.connections.some(t=>t.id==e.id||t.ghostId==e.id))}catch(e){}})}static rollbackTransaction(e,t){return m(this,void 0,void 0,function*(){try{if(r.serviceWorker)try{return(yield(0,r.sendMessage)("LocalSyncData__rollbackTransaction",{transactionId:e,actions:t})).data}catch(e){(0,r.handleServiceWorkerException)(e)}if(this.transactionCollections.some(t=>t.id==e))return;this.transactionCollections=this.transactionCollections.filter(t=>t.id!=e)}catch(e){}})}}y.conceptsSyncArray=[],y.connectionSyncArray=[],y.ghostIdMap=new Map,y.transactionCollections=[]},680:(e,t,n)=>{t.__esModule=!0;var o=n(1581);Object.keys(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===o[e]||(t[e]=o[e]))});var i=n(4451);Object.keys(i).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===i[e]||(t[e]=i[e]))});var r=n(8500);Object.keys(r).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===r[e]||(t[e]=r[e]))})},785:(e,t,n)=>{n.d(t,{i:()=>s});var o=n(6191),i=n(2170),r=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})},a=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]])}return n};class s{static init(){return r(this,void 0,void 0,function*(){if(i.B.getValue("enableCache",!0))try{const[e,t,n]=yield Promise.all([(0,o.ou)(o.L2),(0,o.ou)(o.Ou),(0,o.ou)(o.cL)]);for(const t of e)if(t&&null!=t.id){const{id:e}=t,n=a(t,["id"]);this.widgetMap.set(e,n)}for(const e of t)if(e&&null!=e.id){const{id:t}=e,n=a(e,["id"]);this.latestMap.set(t,n)}for(const e of n)if(e&&null!=e.id){const{id:t}=e,n=a(e,["id"]);this.recentMap.set(t,n)}}catch(e){}})}static getWidget(e){var t;return i.B.getValue("enableCache",!0)&&null!==(t=this.widgetMap.get(e))&&void 0!==t?t:null}static setWidget(e,t){i.B.getValue("enableCache",!0)&&(this._isDuplicate(this.widgetMap,e,t)||(this.widgetMap.set(e,t),(0,o.eH)(o.L2,Object.assign({id:e},t)).catch(()=>{})))}static removeWidget(e){this.widgetMap.delete(e),(0,o.kM)(o.L2,e).catch(()=>{})}static getLatest(e){var t;return i.B.getValue("enableCache",!0)&&null!==(t=this.latestMap.get(e))&&void 0!==t?t:null}static setLatest(e,t){i.B.getValue("enableCache",!0)&&(this._isDuplicate(this.latestMap,e,t)||(this.latestMap.set(e,t),(0,o.eH)(o.Ou,Object.assign({id:e},t)).catch(()=>{})))}static removeLatest(e){this.latestMap.delete(e),(0,o.kM)(o.Ou,e).catch(()=>{})}static getRecent(e){var t;return i.B.getValue("enableCache",!0)&&null!==(t=this.recentMap.get(e))&&void 0!==t?t:null}static setRecent(e,t){i.B.getValue("enableCache",!0)&&(this._isDuplicate(this.recentMap,e,t)||(this.recentMap.set(e,t),(0,o.eH)(o.cL,Object.assign({id:e},t)).catch(()=>{})))}static removeRecent(e){this.recentMap.delete(e),(0,o.kM)(o.cL,e).catch(()=>{})}static clearAll(){this.widgetMap.clear(),this.latestMap.clear(),this.recentMap.clear(),Promise.all([(0,o.sg)(o.L2),(0,o.sg)(o.Ou),(0,o.sg)(o.cL)]).catch(()=>{})}static _isDuplicate(e,t,n){const o=e.get(t);return!!o&&JSON.stringify(o)===JSON.stringify(n)}}s.widgetMap=new Map,s.latestMap=new Map,s.recentMap=new Map},843:(e,t,n)=>{n.d(t,{Az:()=>f,Hi:()=>m});var o=n(8146),i=n(3026),r=n(9581),a=n(3518),s=n(8957),c=n(1863),l=n(7876),d=n(3655),u=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};var h=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};var p=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function f(e){return p(this,void 0,void 0,function*(){const t=s.Logger.logfunction("GetConceptByCharacterAndCategory",e);let n=(0,s.CreateDefaultConcept)();if("the"==e)return n.id=1,n.typeId=5,n.characterValue="the",n;let h=(0,s.SplitStrings)(e);if(h.length>1){let t=1,o=yield f(h[0]);0!=o.id&&(t=o.id),n=yield function(e,t){var n=arguments;return p(this,void 0,void 0,function*(){const o=s.Logger.logfunction("GetConceptByCharacterAndCategoryFromMemory",n);let h=yield s.ConceptsData.GetConceptByCharacterAndCategoryLocal(e,t);return 0==h.id&&(h=yield function(e,t){var n=arguments;return u(this,void 0,void 0,function*(){const o=s.Logger.logfunction("GetConceptByCharacterAndCategoryDirectApi",n);let u=(0,s.CreateDefaultConcept)();try{var h=(0,a.Xr)("application/x-www-form-urlencoded");const n=yield fetch(r.B.GetConceptByCharacterAndCategoryDirectUrl(),{method:"POST",headers:h,body:`character_value=${e}&category_id=${t}`});if(n.ok){let e=yield n.json();u=e,(0,l.K)(u).then(()=>{i.I.AddConcept(u),(0,d.kH)("concept",u).catch(()=>{})})}else(0,c.ry)(n);s.Logger.logUpdate(o)}catch(e){Error,(0,c.Mb)(e,r.B.GetConceptByCharacterAndCategoryDirectUrl()),(0,c.ey)(o,"GetConceptByCharacterAndCategoryDirectApi",e)}return u})}(e,t)),s.Logger.logUpdate(o),h})}(e,t)}else h[0]==e&&(n=yield function(e){var t=arguments;return p(this,void 0,void 0,function*(){const n=s.Logger.logfunction("GetConceptByCharacter",t);let i=yield s.ConceptsData.GetConceptByCharacterAndTypeLocal(e,51);return 0==i.id&&(i=yield(0,o.Y)(e)),s.Logger.logUpdate(n),i})}(e));return s.Logger.logUpdate(t),n})}function m(e){return p(this,void 0,void 0,function*(){let t=[];try{t=yield function(e){return h(this,void 0,void 0,function*(){let t=[];try{let n=JSON.stringify(e),o=(0,a.Xr)();const i=yield fetch(s.BaseUrl.GetTypeConceptBulk(),{method:"POST",headers:o,body:n});if(i.ok){let e=yield i.json();t=yield(0,s.GetConceptBulk)(e)}else(0,c.ry)(i)}catch(e){Error,(0,c.Mb)(e,s.BaseUrl.GetConceptByCharacterAndCategoryDirectUrl())}return t})}(e)}catch(e){}return t})}},991:(e,t,n)=>{n.d(t,{H:()=>s});var o=n(8957),i=n(3996);class r extends i.i{constructor(e,t,n,o){super(e,t,n,o),this.key="",this.value=[],this.height=1,this.key=e,this.value=t,this.leftNode=n,this.rightNode=o}addNode(e,t,n){if(null==t)return e;let o=t.leftNode,i=t.rightNode;if(t.key>e.key)t.leftNode=this.addNode(e,o,n);else{if(!(t.key<e.key))return t;t.rightNode=this.addNode(e,i,n)}t.height=1+Math.max(this.getHeight(t.leftNode),this.getHeight(t.rightNode));let r=this.getBalanceFactor(t);if(r>1&&t.leftNode){if(this.getBalanceFactor(t.leftNode)>=0){return this.rightRotate(t)}if(this.getBalanceFactor(t.leftNode)<0){return t.leftNode=this.leftRotate(t.leftNode),this.rightRotate(t)}}if(r<-1&&t.rightNode){if(this.getBalanceFactor(t.rightNode)<=0){return this.leftRotate(t)}if(this.getBalanceFactor(t.rightNode)>0){return t.rightNode=this.rightRotate(t.rightNode),this.leftRotate(t)}}return t}}var a=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class s{static CreateCompositionKey(e,t){return e}static GetConnectionByOfTheConceptAndTypeId(e,t){let n=this.CreateCompositionKey(e,t);if(this.node){let e=this.node.getFromNode(n,this.node);if(e)return e.value}return null}static addConnection(e){if(e.id>0){let t=this.CreateCompositionKey(e.ofTheConceptId,e.typeId);if(this.node){let n=this.node.getFromNode(t,this.node);if(n){let t=null==n?void 0:n.value;0==t.length&&(n.value=[]),t.includes(e.id)||t.push(e.id)}else{let n=[];n.push(e.id);let o=new r(t,n,null,null);this.addNodeToTree(o)}}else{let n=[];n.push(e.id);let o=new r(t,n,null,null);this.addNodeToTree(o)}new Event(`${t}`)}}static addNodeToTree(e){return a(this,void 0,void 0,function*(){return null==this.node?(this.node=e,(0,o.dispatchIdEvent)(e.key),this.node):(this.node=this.node.addNode(e,this.node,this.node.height),this.node)})}static removeNodeFromTree(e){return a(this,void 0,void 0,function*(){this.node&&(this.node=this.node.removeNode(this.node,e))})}}s.node=null},999:(e,t,n)=>{n.d(t,{R:()=>l});var o=n(8957),i=n(1863),r=n(6416),a=n(4711),s=n(5868),c=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function l(e){return c(this,arguments,void 0,function*(e,t=null,n=null,c=null,d=null,u=null,h=null,p=!1,f={concepts:[],connections:[]}){var m,y,v,g;const C=o.Logger.logfunction("CreateTheCompositionLocal")||{};if(o.serviceWorker){C.serviceWorker=!0;try{const i=yield(0,o.sendMessage)("CreateTheCompositionLocal",{json:e,ofTheConceptId:t,ofTheConceptUserId:n,mainKey:c,userId:d,accessId:u,sessionInformationId:h,actions:f});return(null===(y=null===(m=null==i?void 0:i.actions)||void 0===m?void 0:m.concepts)||void 0===y?void 0:y.length)&&(f.concepts=JSON.parse(JSON.stringify(i.actions.concepts))),(null===(g=null===(v=null==i?void 0:i.actions)||void 0===v?void 0:v.connections)||void 0===g?void 0:g.length)&&(f.connections=JSON.parse(JSON.stringify(i.actions.connections))),o.Logger.logUpdate(C),i.data}catch(e){(0,i.ey)(C,"CreateTheCompositionLocal",e),(0,o.handleServiceWorkerException)(e)}}let w=null!=d?d:999,T=null!=u?u:999,I=null!=h?h:999,k=null!=c?c:0,b=(0,r.u)();for(const o in e)if("string"!=typeof e[o]&&"number"!=typeof e[o])if(null==t&&null==n){let t=k,n=yield(0,s.k)(o,"",!0,w,T,I,void 0,f);b=n,t=n.id,k=n.id,yield l(e[o],n.id,n.userId,t,d,u,h,void 0,f)}else{let n=null!=t?t:999,i=k,r=yield(0,s.k)(o,"",!0,w,T,I,void 0,f);yield(0,a.F)(n,r.id,i,void 0,void 0,void 0,f),yield l(e[o],r.id,r.userId,i,d,u,h,void 0,f)}else{let n=null!=t?t:999,i=k,r=yield(0,s.k)(o,e[o].toString(),!1,w,T,I,void 0,f);yield(0,a.F)(n,r.id,i,void 0,void 0,void 0,f)}return o.Logger.logUpdate(C),b})}},1106:(e,t,n)=>{let{nanoid:o}=n(5042),{isAbsolute:i,resolve:r}=n(197),{SourceMapConsumer:a,SourceMapGenerator:s}=n(1866),{fileURLToPath:c,pathToFileURL:l}=n(2739),d=n(3614),u=n(3878),h=n(9746),p=Symbol("lineToIndexCache"),f=Boolean(a&&s),m=Boolean(r&&i);function y(e){if(e[p])return e[p];let t=e.css.split("\n"),n=new Array(t.length),o=0;for(let e=0,i=t.length;e<i;e++)n[e]=o,o+=t[e].length+1;return e[p]=n,n}class v{get from(){return this.file||this.id}constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,t.document&&(this.document=t.document.toString()),t.from&&(!m||/^\w+:\/\//.test(t.from)||i(t.from)?this.file=t.from:this.file=r(t.from)),m&&f){let e=new u(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+o(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,n,o={}){let i,r,a,s,c;if(t&&"object"==typeof t){let e=t,o=n;if("number"==typeof e.offset){s=e.offset;let o=this.fromOffset(s);t=o.line,n=o.col}else t=e.line,n=e.column,s=this.fromLineAndColumn(t,n);if("number"==typeof o.offset){a=o.offset;let e=this.fromOffset(a);r=e.line,i=e.col}else r=o.line,i=o.column,a=this.fromLineAndColumn(o.line,o.column)}else if(n)s=this.fromLineAndColumn(t,n);else{s=t;let e=this.fromOffset(s);t=e.line,n=e.col}let u=this.origin(t,n,r,i);return c=u?new d(e,void 0===u.endLine?u.line:{column:u.column,line:u.line},void 0===u.endLine?u.column:{column:u.endColumn,line:u.endLine},u.source,u.file,o.plugin):new d(e,void 0===r?t:{column:n,line:t},void 0===r?n:{column:i,line:r},this.css,this.file,o.plugin),c.input={column:n,endColumn:i,endLine:r,endOffset:a,line:t,offset:s,source:this.css},this.file&&(l&&(c.input.url=l(this.file).toString()),c.input.file=this.file),c}fromLineAndColumn(e,t){return y(this)[e-1]+t-1}fromOffset(e){let t=y(this),n=0;if(e>=t[t.length-1])n=t.length-1;else{let o,i=t.length-2;for(;n<i;)if(o=n+(i-n>>1),e<t[o])i=o-1;else{if(!(e>=t[o+1])){n=o;break}n=o+1}}return{col:e-t[n]+1,line:n+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:r(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,n,o){if(!this.map)return!1;let r,a,s=this.map.consumer(),d=s.originalPositionFor({column:t,line:e});if(!d.source)return!1;"number"==typeof n&&(r=s.originalPositionFor({column:o,line:n})),a=i(d.source)?l(d.source):new URL(d.source,this.map.consumer().sourceRoot||l(this.map.mapFile));let u={column:d.column,endColumn:r&&r.column,endLine:r&&r.line,line:d.line,url:a.toString()};if("file:"===a.protocol){if(!c)throw new Error("file: protocol is not available in this PostCSS build");u.file=c(a)}let h=s.sourceContentFor(d.source);return h&&(u.source=h),u}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}}e.exports=v,v.default=v,h&&h.registerInput&&h.registerInput(v)},1167:(e,t,n)=>{n.d(t,{Y:()=>c});var o=n(9581),i=n(3518),r=n(8957),a=n(1863),s=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function c(e){return s(this,void 0,void 0,function*(){const t=r.Logger.logfunction("CreateTheConceptApi",e);let n=(0,r.CreateDefaultConcept)();try{var s=(0,i.Xr)();const c=yield fetch(o.B.CreateTheConceptUrl(),{method:"POST",headers:s,body:JSON.stringify(e)});if(!c.ok)throw(0,a.ry)(c),new Error(`Error! status: ${c.status}`);return n=yield c.json(),r.Logger.logUpdate(t),n}catch(e){Error,(0,a.Mb)(e,o.B.CreateTheConceptUrl()),(0,a.ey)(t,"CreateTheConceptApi",e)}})}},1213:(e,t,n)=>{n.d(t,{f:()=>c});var o=n(9736),i=n(7820),r=n(8957),a=n(176),s=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function c(e){return s(this,void 0,void 0,function*(){let t=performance.now();try{if(r.serviceWorker)try{return(yield(0,r.sendMessage)("GetTheConceptLocal",{id:e})).data}catch(e){(0,r.handleServiceWorkerException)(e)}let t=(0,r.CreateDefaultLConcept)();if(e<0){if(t=yield o.v.GetConcept(e),0==t.id){let n=yield i.G.getNodeFromTree(e);if(null==n?void 0:n.value){let e=n.value;e&&(t=e)}}}else{let n=yield(0,r.GetTheConcept)(e);t=(0,a.F4)(n)}return t}catch(n){throw r.Logger.logError(t,"unknown","read","unknown",void 0,200,void 0,"GetTheConceptLocal",[e],"unknown",void 0),n}})}},1218:(e,t,n)=>{n.d(t,{A:()=>c});var o=n(8957),i=n(7282),r=n(1666),a=n(8407),s=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function c(e){return s(this,arguments,void 0,function*(e,t=null,n=null,s=null,l=null,d=null,u=null){if(o.serviceWorker)try{return(yield(0,o.sendMessage)("CreateTheComposition",{json:e,ofTheConceptId:t,ofTheConceptUserId:n,mainKey:s,userId:l,accessId:d,sessionInformationId:u})).data}catch(e){(0,o.handleServiceWorkerException)(e)}let h=null!=l?l:999,p=null!=d?d:4,f=null!=u?u:999,m=null!=s?s:0,y=(0,i.o)();for(const o in e)if("string"!=typeof e[o]&&"number"!=typeof e[o])if(null==t&&null==n){let t=m,n=yield(0,a.A)(o,"",!0,h,p,f);y=n,t=n.id,m=n.id,yield c(e[o],n.id,n.userId,t,l,d,u)}else{let i=null!=t?t:999,s=null!=n?n:999,v=m,g=yield(0,a.A)(o,"",!0,h,p,f);y=g,yield(0,r.q)(i,s,g.id,v),yield c(e[o],g.id,g.userId,v,l,d,u)}else{let i=null!=t?t:999,s=null!=n?n:10267,c=m,l=yield(0,a.A)(o,e[o].toString(),!1,h,p,f);yield(0,r.q)(i,s,l.id,c)}return y})}},1239:(e,t,n)=>{n.d(t,{I:()=>u,r:()=>d});var o=n(3026),i=n(9581),r=n(3518),a=n(1863),s=n(8957),c=n(1596),l=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function d(e){return l(this,void 0,void 0,function*(){const t=s.Logger.logfunction("GetConceptBulk",[e.length])||{};let n=[],d=((new Date).getTime(),performance.now()),u=Array.from(new Set(e));try{if(s.serviceWorker){t.serviceWorker=!0;try{const n=yield(0,s.sendMessage)("GetConceptBulk",{passedConcepts:e});if(n.data&&n.data.length>0)for(const e of n.data)o.I.AddConceptToMemory(e);return s.Logger.logUpdate(t),n.data}catch(e){(0,a.ey)(t,"GetConceptBulk",e),(0,s.handleServiceWorkerException)(e)}}if(u.length>0){let h=[];for(let e=0;e<u.length;e++)if(!o.I.GetNpc(u[e])){let t=yield o.I.GetConcept(u[e]);0==t.id?h.push(u[e]):n.push(t)}if(0==h.length)return s.Logger.logfunction(t),n;{let u;const p={method:"POST",headers:(0,r.Xr)(),body:JSON.stringify(h)};try{u=yield fetch(i.B.GetConceptBulkUrl(),p)}catch(e){u=yield(0,c.g)(p,"/api/get_concept_bulk")}yield function(e,t,n,i,r){return l(this,void 0,void 0,function*(){if(e.ok){let t=yield e.json();if(t.length>0)for(let e=0;e<t.length;e++){let i=t[e];o.I.AddConcept(i),n.push(i)}s.Logger.logUpdate(i)}else s.Logger.logError(r,"unknown","read","unknown",void 0,e.status,e,"GetConceptBulk",[t],"unknown",void 0),(0,a.ry)(e)})}(u,e,n,t,d)}}}catch(n){Error,s.Logger.logError(d,"unknown","read","unknown",void 0,500,n,"GetConceptBulk",[e],"unknown",void 0),(0,a.Mb)(n,i.B.GetConceptBulkUrl()),(0,a.ey)(t,"GetConceptBulk",n)}return n})}function u(e){return l(this,void 0,void 0,function*(){const t=[];if(e.length>0){const n={"Content-Type":"application/json"};try{const r=yield fetch(i.B.GetConceptBulkUrl(),{method:"POST",headers:n,body:JSON.stringify(e)});if(r.ok){const e=yield r.json();if(e.length>0)for(let n=0;n<e.length;n++){const i=e[n];t.push(i),o.I.AddConcept(i)}}else(0,a.ry)(r)}catch(e){Error,(0,a.Mb)(e,i.B.GetConceptBulkUrl())}}return t})}},1320:(e,t,n)=>{n.d(t,{zl:()=>v,b6:()=>w,e$:()=>I,y6:()=>T,rq:()=>k,yV:()=>g,_W:()=>C});var o=n(8957),i=n(6687);function r(e){return e.startsWith("the_")?e.slice(4):e}var a=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function s(e,t,n){return a(this,void 0,void 0,function*(){var i,r,a,s,c,l,d,u;let h=[];for(let t=0;t<e.length;t++)h.push(e[t].toTheConceptId),h.push(e[t].ofTheConceptId),h.push(e[t].typeId);for(let h=0;h<e.length;h++){let p=!1;n.includes(e[h].id)&&(p=!0);let f=yield(0,o.GetTheConcept)(e[h].ofTheConceptId),m=yield(0,o.GetTheConcept)(e[h].toTheConceptId);if(1==p&&0!=f.id&&0!=m.id){let n,c=null!==(r=null===(i=m.type)||void 0===i?void 0:i.characterValue)&&void 0!==r?r:"self";e[h].toTheConceptId in t?n=t[e[h].toTheConceptId]:(n={},n[c]={},t[e[h].toTheConceptId]=n);let l=yield(0,o.GetTheConcept)(e[h].typeId);try{let e=null!==(s=null===(a=null==f?void 0:f.type)||void 0===a?void 0:a.characterValue)&&void 0!==s?s:"none",n=f.characterValue;l.characterValue;l.characterValue.includes("_s_")&&(f.id in t||(t[f.id]={}),t[f.id][e]=n),t[m.id]={}}catch(e){}}if(0!=f.id&&0!=m.id){let n,i=null!==(l=null===(c=f.type)||void 0===c?void 0:c.characterValue)&&void 0!==l?l:"self";e[h].ofTheConceptId in t?n=t[e[h].ofTheConceptId]:(n={},n[i]={},t[e[h].ofTheConceptId]=n);let r=yield(0,o.GetTheConcept)(e[h].typeId);try{let e=null!==(u=null===(d=null==m?void 0:m.type)||void 0===d?void 0:d.characterValue)&&void 0!==u?u:"none",n=m.characterValue;r.characterValue.includes("_s_")&&(m.id in t||(t[m.id]={}),t[m.id][e]=n),t[f.id]={}}catch(e){}}}return t})}var c=n(5312),l=n(7876),d=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function u(e,t,n){if(e in t){let o=t[e];if(o){n[o.connectionType+"_count"]=o.count}}}var h=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};var p=n(4698),f=n(6915),m=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};var y=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function v(e,t){return y(this,arguments,void 0,function*(e,t,n=""){let r=yield(0,o.SearchWithTypeAndLinkerApi)(e,t,n),a=r.compositionIds,s=r.internalConnections,l=r.linkers,d=r.reverse,u=r.mainCompositionIds,h=yield(0,i.QL)(l),p=yield(0,i.MT)(a,s);return yield(0,c.NK)(h,p,u,d)})}function g(e,t,n,o,r){return y(this,void 0,void 0,function*(){let a=yield(0,i.QL)(e),s=yield(0,i.rv)(t,n);return yield(0,c.Ve)(a,s,t,o,r)})}function C(e,t,n,o,r){return y(this,void 0,void 0,function*(){let a=yield(0,i.QL)(e),s=yield(0,i.D)(t,n);return yield(0,c.NK)(a,s,o,r)})}function w(e,t,n,c,l){return y(this,void 0,void 0,function*(){if(o.serviceWorker)try{return(yield(0,o.sendMessage)("formatConnections",{linkers:e,conceptIds:t,mainCompositionIds:n,reverse:c,countInfos:l})).data}catch(e){(0,o.handleServiceWorkerException)(e)}let d=yield(0,i.QL)(e);d=(0,f.X)(d);let u=[];u=yield s(d,u,c),u=yield function(e,t,n){return a(this,void 0,void 0,function*(){var i,a,s,c,l,d,u,h;let p=[];for(let t=0;t<e.length;t++)p.push(e[t].toTheConceptId),p.push(e[t].ofTheConceptId),p.push(e[t].typeId);e.sort(function(e,t){return t.id-e.id});for(let p=0;p<e.length;p++){let f=!1;n.includes(e[p].id)&&(f=!0);let m=yield(0,o.GetTheConcept)(e[p].ofTheConceptId),y=yield(0,o.GetTheConcept)(e[p].toTheConceptId);if(1==f&&0!=m.id&&0!=y.id){let n,l=null!==(a=null===(i=y.type)||void 0===i?void 0:i.characterValue)&&void 0!==a?a:"self";e[p].toTheConceptId in t?(n=t[e[p].toTheConceptId],l in n||(n[l]={})):(n={},n[l]={},t[e[p].toTheConceptId]=n);let d=yield(0,o.GetTheConcept)(e[p].typeId);try{let e=null!==(c=null===(s=null==m?void 0:m.type)||void 0===s?void 0:s.characterValue)&&void 0!==c?c:"none",t=m.characterValue,o=d.characterValue;""==o&&(o=e,o=r(o));let i={[e]:t},a=o+"_reverse";d.characterValue.includes("_s_")||("string"==typeof n[l]&&(n[l]={}),n[l][a]=i)}catch(e){}}if(0!=m.id&&0!=y.id){let n,i=null!==(d=null===(l=m.type)||void 0===l?void 0:l.characterValue)&&void 0!==d?d:"self";e[p].ofTheConceptId in t?(n=t[e[p].ofTheConceptId],i in n||(n[i]={})):(n={},n[i]={},t[e[p].ofTheConceptId]=n);let a=yield(0,o.GetTheConcept)(e[p].typeId);try{let e=null!==(h=null===(u=null==y?void 0:y.type)||void 0===u?void 0:u.characterValue)&&void 0!==h?h:"none",t=y.characterValue,o=a.characterValue,s=(a.characterValue,!1);""==o&&(o=e,o=r(o),s=!0);let c={[e]:t};isNaN(Number(o))?a.characterValue.includes("_s_")||("string"==typeof n[i]&&(n[i]={}),n[i][o]=s?t:c):(Array.isArray(n[i])||(n[i]=[]),n[i].push(t))}catch(e){}}}return t})}(d,u,c);let h=yield function(e,t,n,i){return a(this,arguments,void 0,function*(e,t,n,i,r=[]){var a,s,c,l,d,u;let h=[],p=[];for(let t=0;t<e.length;t++)p.push(e[t].toTheConceptId),p.push(e[t].ofTheConceptId),p.push(e[t].typeId);e.sort(function(e,t){return t.id-e.id});for(let n=0;n<e.length;n++){let i=!1;r.includes(e[n].id)&&(i=!0);let h=yield(0,o.GetTheConcept)(e[n].ofTheConceptId),p=yield(0,o.GetTheConcept)(e[n].toTheConceptId);if(1==i&&0!=h.id&&0!=p.id&&p.id in t){let i,r=null!==(s=null===(a=p.type)||void 0===a?void 0:a.characterValue)&&void 0!==s?s:"self";e[n].toTheConceptId in t?i=t[e[n].toTheConceptId]:(i={},i[r]={},t[e[n].toTheConceptId]=i);let c=yield(0,o.GetTheConcept)(e[n].typeId);try{let o=c.characterValue+"_reverse",a=t[e[n].ofTheConceptId];a&&(Array.isArray(i[r][o])?i[r][o].push(a):c.characterValue.includes("_s_")?(i[r][o]=[],i[r][o].push(a)):i[r][o]=a)}catch(e){}}if(0!=h.id&&0!=p.id&&h.id in t){let i,r=null!==(l=null===(c=h.type)||void 0===c?void 0:c.characterValue)&&void 0!==l?l:"self";e[n].ofTheConceptId in t?(i=t[e[n].ofTheConceptId],"string"==typeof i[r]&&(i[r]={})):(i={},i[r]={},t[e[n].ofTheConceptId]=i);let a=!1,s=(yield(0,o.GetTheConcept)(e[n].typeId)).characterValue;""==s&&(s=p.characterValue,a=!0),""==s&&(s=null!==(u=null===(d=null==p?void 0:p.type)||void 0===d?void 0:d.characterValue)&&void 0!==u?u:"");try{let o=t[e[n].toTheConceptId];o&&(Array.isArray(i[r])?a?i[r].push(o[s]):i[r].push(o):Array.isArray(i[r][s])?i[r][s].push(o):s.includes("_s_")?(i[r][s]=[],a?i[r][s].push(o[s]):i[r][s].push(o)):i[r][s]=a?o[s]:o)}catch(e){}}}for(let e=0;e<n.length;e++){let i=t[n[e]];i?(i.id=n[e],h.push(i)):0!=(yield o.ConceptsData.GetConcept(n[e])).id&&(i={},i.id=n[e],h.push(i))}return h})}(d,u,n,[],c);return h})}function T(e,t,n,a,c){return y(this,arguments,void 0,function*(e,t,n,a,c,h="DESC"){if(o.serviceWorker)try{return(yield(0,o.sendMessage)("formatConnectionsJustId",{linkers:e,conceptIds:t,mainCompositionIds:n,reverse:a,countInfos:c,order:h})).data}catch(e){(0,o.handleServiceWorkerException)(e)}let m=yield(0,i.QL)(e),y=yield(0,p.V)(c);m=(0,f.X)(m,h);let v=[];v=yield s(m,v,a),v=yield function(e,t){return d(this,arguments,void 0,function*(e,t,n=[]){var o,i,a,s,c,d,u,h;let p=[];for(let t=0;t<e.length;t++)p.push(e[t].toTheConceptId),p.push(e[t].ofTheConceptId),p.push(e[t].typeId);for(let p=0;p<e.length;p++){let f=!1,m=yield(0,l.A)(e[p].ofTheConceptId),y=yield(0,l.A)(e[p].toTheConceptId);if(n.includes(e[p].id)&&(f=!0),1==f&&0!=m.id&&0!=y.id){let n,c=yield(0,l.A)(e[p].typeId),d=null!==(i=null===(o=y.type)||void 0===o?void 0:o.characterValue)&&void 0!==i?i:"self";e[p].toTheConceptId in t?(n=t[e[p].toTheConceptId],d in n||(n[d]={})):(n={},n[d]={},t[e[p].toTheConceptId]=n);try{let t=null!==(s=null===(a=null==m?void 0:m.type)||void 0===a?void 0:a.characterValue)&&void 0!==s?s:"none",o=m.characterValue,i=c.characterValue;""==i&&(i=t,i=r(i));let l={id:m.id,[t]:o,created_on:e[p].entryTimeStamp},u=i+"_reverse";u.includes("_s_")||("string"==typeof n[d]&&(n[d]={}),n[d][u]=l)}catch(e){}}if(0!=m.id&&0!=y.id){let n,o=yield(0,l.A)(e[p].typeId),i=null!==(d=null===(c=m.type)||void 0===c?void 0:c.characterValue)&&void 0!==d?d:"self";e[p].ofTheConceptId in t?(n=t[e[p].ofTheConceptId],i in n||(n[i]={})):(n={},n[i]={},t[e[p].ofTheConceptId]=n);try{let t=null!==(h=null===(u=null==y?void 0:y.type)||void 0===u?void 0:u.characterValue)&&void 0!==h?h:"none",a=y.characterValue,s=o.characterValue,c=!1;""==s&&(s=t,s=r(s),c=!0);let l={};l[t]={id:y.id,data:a,created_on:e[p].entryTimeStamp},isNaN(Number(s))?s.includes("_s_")||("string"==typeof n[i]&&(n[i]={}),n[i][s]=c?l[t]:l):(Array.isArray(n[i])||(n[i]=[]),n[i].push(l[t]))}catch(e){}}}return t})}(m,v,a);let g=yield function(e,t,n){return d(this,arguments,void 0,function*(e,t,n,i=[],r){var a,s,c,d,h,p,f;(new Date).getTime();let m=[],y=[];for(let t=0;t<e.length;t++)y.push(e[t].toTheConceptId),y.push(e[t].ofTheConceptId),y.push(e[t].typeId);for(let n=0;n<e.length;n++){let o=!1,m=yield(0,l.A)(e[n].ofTheConceptId),y=yield(0,l.A)(e[n].toTheConceptId);if(i.includes(e[n].id)&&(o=!0),1==o&&0!=m.id&&0!=y.id&&y.id in t){let o,i=yield(0,l.A)(e[n].typeId),r=null!==(s=null===(a=y.type)||void 0===a?void 0:a.characterValue)&&void 0!==s?s:"self",c=!1;e[n].toTheConceptId in t&&(c=!0),e[n].toTheConceptId in t?(o=t[e[n].toTheConceptId],"string"==typeof o[r]&&(o[r]={})):(o={},o[r]={},t[e[n].toTheConceptId]=o);try{if(t[e[n].ofTheConceptId]){let a=t[e[n].ofTheConceptId];a&&(a.id=m.id,a.created_on=m.entryTimeStamp);let s=i.characterValue+"_reverse";Array.isArray(o[r][s])?o[r][s].push(a):s.includes("_s_")?(o[r][s]=[],o[r][s].push(a)):o[r][s]=a}}catch(e){}}if(0!=m.id&&0!=y.id&&m.id in t){let o,i=yield(0,l.A)(e[n].typeId),a=null!==(d=null===(c=m.type)||void 0===c?void 0:c.characterValue)&&void 0!==d?d:"self",s=!1;e[n].toTheConceptId in t&&(s=!0),e[n].ofTheConceptId in t?(o=t[e[n].ofTheConceptId],"string"==typeof o[a]&&(o[a]={})):(o={},o[a]={},t[e[n].ofTheConceptId]=o),u(m.id,r,o);let v=!1,g=i.characterValue;""==g&&(g=y.characterValue,v=!0),""==g&&(g=(null===(h=null==y?void 0:y.type)||void 0===h?void 0:h.characterValue)||"");try{let i=null!==(f=null===(p=null==y?void 0:y.type)||void 0===p?void 0:p.characterValue)&&void 0!==f?f:"none",s=t[e[n].toTheConceptId];if(s){let t={};t[i]={data:s[i],id:y.id,created_on:e[n].entryTimeStamp},Array.isArray(o[a])?v?o[a].push(s[g]):o[a].push(s):Array.isArray(o[a][g])?o[a][g].push(t):g.includes("_s_")?(o[a][g]=[],v?o[a][g].push(t[i]):o[a][g].push(t)):o[a][g]=v?t[i]:t,u(y.id,r,t)}}catch(e){}}}for(let e=0;e<n.length;e++){let i={};i=t[n[e]],i?i.id=n[e]:0!=(yield o.ConceptsData.GetConcept(n[e])).id&&(i={},i.id=n[e]),m.push(i)}return m})}(m,v,n,a,y);return g})}function I(e,t,n,a,s){return y(this,arguments,void 0,function*(e,t,n,a,s,c="DESC"){try{if(o.serviceWorker)try{return(yield(0,o.sendMessage)("formatConnectionsDataId",{linkers:e,conceptIds:t,mainCompositionIds:n,reverse:a,countInfos:s,order:c})).data}catch(e){(0,o.handleServiceWorkerException)(e)}let l,d;try{l=yield(0,i.QL)(e)}catch(e){throw new Error(`Failed to prefetch connections: ${e instanceof Error?e.message:String(e)}`)}try{d=yield(0,p.V)(s)}catch(e){throw new Error(`Failed to get connection type for count: ${e instanceof Error?e.message:String(e)}`)}try{l=(0,f.X)(l,c)}catch(e){throw new Error(`Failed to order connections: ${e instanceof Error?e.message:String(e)}`)}let m,y=[],v=[];try{y=yield function(e,t){var n=arguments;return h(this,arguments,void 0,function*(e,t,i=[]){var r,a,s,c,l,d,u,h;try{const p=o.Logger.logfunction("FormatFunctionData",n);let f=[];for(let t=0;t<e.length;t++)f.push(e[t].toTheConceptId),f.push(e[t].ofTheConceptId),f.push(e[t].typeId);for(let n=0;n<e.length;n++)try{let p=!1,f=yield(0,o.GetTheConcept)(e[n].ofTheConceptId),m=yield(0,o.GetTheConcept)(e[n].toTheConceptId);if(i.includes(e[n].id)&&(p=!0),1==p&&0!=f.id&&0!=m.id){let i,l=yield(0,o.GetTheConcept)(e[n].typeId),d=null!==(a=null===(r=m.type)||void 0===r?void 0:r.characterValue)&&void 0!==a?a:"self";e[n].toTheConceptId in t?i=t[e[n].toTheConceptId]:(i={},i[d]={},t[e[n].toTheConceptId]=i);try{let e=null!==(c=null===(s=null==f?void 0:f.type)||void 0===s?void 0:s.characterValue)&&void 0!==c?c:"none",n=f.characterValue;(l.characterValue+"_reverse").includes("_s_")&&(f.id in t||(t[f.id]={}),t[f.id][e]=n),t[m.id]={}}catch(e){}}if(0!=f.id&&0!=m.id){let i,r=yield(0,o.GetTheConcept)(e[n].typeId),a=null!==(d=null===(l=f.type)||void 0===l?void 0:l.characterValue)&&void 0!==d?d:"self";e[n].ofTheConceptId in t?i=t[e[n].ofTheConceptId]:(i={},i[a]={},t[e[n].ofTheConceptId]=i);try{let e=null!==(h=null===(u=null==m?void 0:m.type)||void 0===u?void 0:u.characterValue)&&void 0!==h?h:"none",n=m.characterValue;r.characterValue.includes("_s_")&&(m.id in t||(t[m.id]={}),t[m.id][e]=n),t[f.id]={}}catch(e){}}}catch(e){}return o.Logger.logUpdate(p),t}catch(e){throw e}})}(l,y,a)}catch(e){throw new Error(`Failed to format function data: ${e instanceof Error?e.message:String(e)}`)}try{y=yield function(e,t){var n=arguments;return h(this,arguments,void 0,function*(e,t,i=[]){var a,s,c,l,d,u,h,p;try{const f=o.Logger.logfunction("FormatFunctionDataForData",n);let m=[];for(let t=0;t<e.length;t++)m.push(e[t].toTheConceptId),m.push(e[t].ofTheConceptId),m.push(e[t].typeId);for(let n=0;n<e.length;n++)try{let f=!1,m=yield(0,o.GetTheConcept)(e[n].ofTheConceptId),y=yield(0,o.GetTheConcept)(e[n].toTheConceptId);if(i.includes(e[n].id)&&(f=!0),1==f&&0!=m.id&&0!=y.id){let i,d=yield(0,o.GetTheConcept)(e[n].typeId),u=null!==(s=null===(a=y.type)||void 0===a?void 0:a.characterValue)&&void 0!==s?s:"self";e[n].toTheConceptId in t?(i=t[e[n].toTheConceptId],u in i||(i[u]={})):(i={},i[u]={},t[e[n].toTheConceptId]=i);try{let e=null!==(l=null===(c=null==m?void 0:m.type)||void 0===c?void 0:c.characterValue)&&void 0!==l?l:"none",t=m.characterValue,n=d.characterValue;""==n&&(n=e,n=r(n));let o={id:m.id,data:{[e]:t}},a=n+"_reverse";a.includes("_s_")||("string"==typeof i[u]&&(i[u]={}),i[u][a]=o)}catch(e){}}if(0!=m.id&&0!=y.id){let i,a=yield(0,o.GetTheConcept)(e[n].typeId),s=null!==(u=null===(d=m.type)||void 0===d?void 0:d.characterValue)&&void 0!==u?u:"self";e[n].ofTheConceptId in t?(i=t[e[n].ofTheConceptId],s in i||(i[s]={})):(i={},i[s]={},t[e[n].ofTheConceptId]=i);try{let e=null!==(p=null===(h=null==y?void 0:y.type)||void 0===h?void 0:h.characterValue)&&void 0!==p?p:"none",t=y.characterValue,n=a.characterValue,o=!1;""==n&&(n=e,n=r(n),o=!0);let c={id:y.id,data:{[e]:t}};isNaN(Number(n))?n.includes("_s_")||("string"==typeof i[s]&&(i[s]={}),i[s][n]=c):(Array.isArray(i[s])||(i[s]=[]),i[s].push(c))}catch(e){}}}catch(e){}return o.Logger.logUpdate(f),t}catch(e){throw e}})}(l,y,a)}catch(e){throw new Error(`Failed to format function data for data: ${e instanceof Error?e.message:String(e)}`)}try{m=yield function(e,t,n,i){var r=arguments;return h(this,arguments,void 0,function*(e,t,n,i,a=[],s){var c,l,d,h,p,f;try{const n=o.Logger.logfunction("FormatFromConnectionsAlteredArrayExternal",r);let m=[],y=[];for(let t=0;t<e.length;t++)y.push(e[t].toTheConceptId),y.push(e[t].ofTheConceptId),y.push(e[t].typeId);for(let n=0;n<e.length;n++)try{let i=!1,r=yield(0,o.GetTheConcept)(e[n].ofTheConceptId),m=yield(0,o.GetTheConcept)(e[n].toTheConceptId);if(a.includes(e[n].id)&&(i=!0),1==i&&0!=r.id&&0!=m.id&&m.id in t){let i,a=yield(0,o.GetTheConcept)(e[n].typeId),d=null!==(l=null===(c=m.type)||void 0===c?void 0:c.characterValue)&&void 0!==l?l:"self",h=!1;e[n].toTheConceptId in t&&(h=!0),e[n].toTheConceptId in t?(i=t[e[n].toTheConceptId],"string"==typeof i[d]&&(i[d]={})):(i={},i[d]={},t[e[n].toTheConceptId]=i),u(m.id,s,i);try{if(t[e[n].ofTheConceptId]){let o={id:r.id,data:t[e[n].ofTheConceptId],created_on:e[n].entryTimeStamp},s=a.characterValue+"_reverse";Array.isArray(i[d][s])?i[d][s].push(o):s.includes("_s_")?(i[d][s]=[],i[d][s].push(o)):i[d][s]=o}}catch(e){}}if(0!=r.id&&0!=m.id&&r.id in t){let i,a=yield(0,o.GetTheConcept)(e[n].typeId),c=null!==(h=null===(d=r.type)||void 0===d?void 0:d.characterValue)&&void 0!==h?h:"self",l=!1;e[n].toTheConceptId in t&&(l=!0),e[n].ofTheConceptId in t?(i=t[e[n].ofTheConceptId],"string"==typeof i[c]&&(i[c]={})):(i={},i[c]={},t[e[n].ofTheConceptId]=i),u(r.id,s,i);let y=!0,v=a.characterValue;""==v&&(v=m.characterValue,y=!0),""==v&&(v=(null===(p=null==m?void 0:m.type)||void 0===p?void 0:p.characterValue)||"");try{null===(f=null==m?void 0:m.type)||void 0===f?void 0:f.characterValue;let o=t[e[n].toTheConceptId];if(o){let r={id:m.id,data:t[e[n].toTheConceptId],created_on:e[n].entryTimeStamp};Array.isArray(i[c])?i[c].push(o):Array.isArray(i[c][v])?i[c][a.characterValue].push(r):v.includes("_s_")?(i[c][v]=[],i[c][v].push(r)):i[c][v]=r,u(m.id,s,r)}}catch(e){}}}catch(e){}for(let e=0;e<i.length;e++)try{let n={};n.id=i[e];let r=yield(0,o.GetTheConcept)(n.id);n.data=t[i[e]],n.created_on=r.entryTimeStamp,m.push(n)}catch(e){}return o.Logger.logUpdate(n),m}catch(e){throw e}})}(l,y,v,n,a,d)}catch(e){throw new Error(`Failed to format from connections altered array external: ${e instanceof Error?e.message:String(e)}`)}return m}catch(e){throw e}})}function k(e,t,n,a,s){return y(this,arguments,void 0,function*(e,t,n,a,s,c="DESC"){if(o.serviceWorker)try{return(yield(0,o.sendMessage)("formatConnectionsV2",{linkers:e,conceptIds:t,mainCompositionIds:n,reverse:a,countInfos:s,order:c})).data}catch(e){(0,o.handleServiceWorkerException)(e)}let l=yield(0,i.QL)(e),d=yield(0,p.V)(s);l=(0,f.X)(l,c);let h={};h=yield function(e){var t=arguments;return m(this,arguments,void 0,function*(e,n={},i=[]){var r,a,s,c,l;const d=o.Logger.logfunction("FormatFunctionDataV2",t);for(const t of e){const e=i.includes(t.id),d=yield(0,o.GetTheConcept)(t.ofTheConceptId),u=yield(0,o.GetTheConcept)(t.toTheConceptId),h=yield(0,o.GetTheConcept)(t.typeId);if(0===d.id||0===u.id)continue;const p=e?u:d,f=e?d:u,m=null!==(a=null===(r=p.type)||void 0===r?void 0:r.characterValue)&&void 0!==a?a:"self",y=null!==(c=null===(s=f.type)||void 0===s?void 0:s.characterValue)&&void 0!==c?c:"none",v=f.characterValue;null===(l=h.characterValue)||void 0===l||l.includes("_s_"),n[p.id]||(n[p.id]={}),n[p.id][m]||(n[p.id][m]={}),n[f.id]||(n[f.id]={}),n[f.id][y]=v}return o.Logger.logUpdate(d),n})}(l,h,a),h=yield function(e){var t=arguments;return m(this,arguments,void 0,function*(e,n={},i=[]){var a,s,c,l,d;const u=o.Logger.logfunction("FormatFunctionDataForDataV2",t);for(const t of e){const e=i.includes(t.id),u=yield(0,o.GetTheConcept)(t.ofTheConceptId),h=yield(0,o.GetTheConcept)(t.toTheConceptId),p=yield(0,o.GetTheConcept)(t.typeId);if(0===u.id||0===h.id)continue;const f=e?h:u,m=e?u:h,y=null!==(s=null===(a=f.type)||void 0===a?void 0:a.characterValue)&&void 0!==s?s:"self",v=null!==(l=null===(c=m.type)||void 0===c?void 0:c.characterValue)&&void 0!==l?l:"none",g=m.characterValue,C=null!==(d=p.characterValue)&&void 0!==d?d:"";let w=""===C?r(v):C;const T=w.includes("_s_"),I=!isNaN(Number(w)),k={id:m.id,data:{[v]:g}};n[f.id]||(n[f.id]={}),y in n[f.id]&&"string"!=typeof n[f.id][y]||(n[f.id][y]=I?[]:{});try{if(T)continue;I?n[f.id][y].push(k):n[f.id][y][e?`${w}_reverse`:w]=k}catch(e){}}return o.Logger.logUpdate(u),n})}(l,h,a);let y=yield function(e,t,n){var i=arguments;return m(this,arguments,void 0,function*(e,t,n,r=[],a){var s,c,l;const d=o.Logger.logfunction("FormatFromConnectionsAlteredArrayExternal",i),h=[];for(const n of e){const e=r.includes(n.id),i=yield(0,o.GetTheConcept)(n.ofTheConceptId),d=yield(0,o.GetTheConcept)(n.toTheConceptId),h=yield(0,o.GetTheConcept)(n.typeId);if(0===i.id||0===d.id)continue;const p=e?d:i,f=e?i:d,m=p.id,y=f.id,v=null!==(c=null===(s=p.type)||void 0===s?void 0:s.characterValue)&&void 0!==c?c:"self",g=h.characterValue+"_reverse",C=h.characterValue||f.characterValue||(null===(l=f.type)||void 0===l?void 0:l.characterValue)||"";if(t[m]){const o=t[m][v],i=t[y],r={id:f.id,data:i,created_on:n.entryTimeStamp};u(m,a,t[m]);try{e?Array.isArray(o[g])?o[g].push(r):o[g]=[r]:Array.isArray(o)?o.push(i):Array.isArray(o[C])?o[C].push(r):C.includes("_s_")?(o[C]=[],o[C].push(r)):o[C]=[r],u(y,a,r)}catch(e){}}}for(const e of n){const n=yield(0,o.GetTheConcept)(e);h.push({id:e,data:t[e],created_on:n.entryTimeStamp})}return o.Logger.logUpdate(d),h})}(l,h,n,a,d);return y})}},1412:(e,t,n)=>{function o(e=[],t=[]){}n.d(t,{e:()=>o})},1534:(e,t,n)=>{let o=n(7793),i=n(1752);class r extends o{get selectors(){return i.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n)}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}}e.exports=r,r.default=r,o.registerRule(r)},1557:(e,t)=>{t.__esModule=!0,t.default=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];for(;n.length>0;){var i=n.shift();e[i]||(e[i]={}),e=e[i]}},e.exports=t.default},1581:(e,t)=>{t.__esModule=!0,t.UNIVERSAL=t.TAG=t.STRING=t.SELECTOR=t.ROOT=t.PSEUDO=t.NESTING=t.ID=t.COMMENT=t.COMBINATOR=t.CLASS=t.ATTRIBUTE=void 0;t.TAG="tag";t.STRING="string";t.SELECTOR="selector";t.ROOT="root";t.PSEUDO="pseudo";t.NESTING="nesting";t.ID="id";t.COMMENT="comment";t.COMBINATOR="combinator";t.CLASS="class";t.ATTRIBUTE="attribute";t.UNIVERSAL="universal"},1596:(e,t,n)=>{n.d(t,{g:()=>a});var o=n(8957),i=n(4024),r=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function a(e,t){return r(this,void 0,void 0,function*(){if("undefined"!=typeof self&&"undefined"!=typeof ServiceWorkerGlobalScope&&self instanceof ServiceWorkerGlobalScope)throw new Error("Cannot switch server from service worker");try{!function(){const e=o.BaseUrl.NODE_CACHE_URL;let t=o.BaseUrl.BASE_APPLICATION+"_cacheServers";if(e===o.BaseUrl.BASE_URL)throw new Error("Base Server Down");let n=sessionStorage.getItem(t);n=JSON.parse(n);const r=n.indexOf(e);if(o.BaseUrl.isNearestCache=!1,n.includes(e)&&-1!==r&&n.splice(r,1),sessionStorage.setItem(t,JSON.stringify(n)),n.length){const e=n[0];o.BaseUrl.NODE_CACHE_URL=e}else o.BaseUrl.NODE_CACHE_URL=o.BaseUrl.BASE_URL;navigator.serviceWorker&&navigator.serviceWorker.controller&&(0,o.sendMessage)("SESSION_DATA",{type:"SESSION_DATA",data:o.BaseUrl.NODE_CACHE_URL,session:i.b.sessionId})}();try{return yield fetch(`${o.BaseUrl.NODE_CACHE_URL}${t}`,e)}catch(n){return yield a(e,t)}}catch(e){throw e}})}},1666:(e,t,n)=>{n.d(t,{q:()=>a});var o=n(2155),i=n(442),r=n(1863);function a(e,t,n,a){var s=t,c=new o.N(0,e,n,s,a,1,4);if(e==n)return c.ofTheConceptId=0,c.toTheConceptId=1,c;try{c.isTemp=!0,c.id=Math.floor(1e8*Math.random()),i.Y.AddConnection(c)}catch(e){(0,r.Mb)(e)}return c}},1669:(e,t,n)=>{t.__esModule=!0,t.default=void 0;var o,i=(o=n(3295))&&o.__esModule?o:{default:o},r=n(1581);function a(e,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},a(e,t)}var s=function(e){var t,n;function o(t){var n;return(n=e.call(this,t)||this).type=r.UNIVERSAL,n.value="*",n}return n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,a(t,n),o}(i.default);t.default=s,e.exports=t.default},1704:(e,t,n)=>{t.__esModule=!0,t.default=void 0;var o,i=(o=n(4646))&&o.__esModule?o:{default:o},r=n(1581);function a(e,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},a(e,t)}var s=function(e){var t,n;function o(t){var n;return(n=e.call(this,t)||this).type=r.COMBINATOR,n}return n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,a(t,n),o}(i.default);t.default=s,e.exports=t.default},1735:(e,t,n)=>{n.d(t,{J:()=>s});var o,i=n(8957),r=n(4024),a=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class s{static incrementConcept(e){try{e&&(this.conceptsData[e]=(this.conceptsData[e]||0)+1)}catch(e){}}static incrementConnection(e){try{e&&(this.connectionsData[e]=(this.connectionsData[e]||0)+1)}catch(e){}}static getTopConcepts(e){return Object.entries(this.conceptsData).map(([e,t])=>[parseInt(e),t]).sort((e,t)=>t[1]-e[1]).slice(0,e)}static getTopConnections(e){return Object.entries(this.connectionsData).map(([e,t])=>[parseInt(e),t]).sort((e,t)=>t[1]-e[1]).slice(0,e)}static saveDataToLocalStorage(){const e={concepts:this.conceptsData,connections:this.connectionsData};null===localStorage||void 0===localStorage||localStorage.setItem(this.accessData,JSON.stringify(e))}static loadDataFromLocalStorage(){const e=null===localStorage||void 0===localStorage?void 0:localStorage.getItem(this.accessData);if(e){const t=JSON.parse(e);this.conceptsData=t.concepts||{},this.connectionsData=t.connections||{}}}static sendToServer(){return a(this,void 0,void 0,function*(){try{yield this.syncToServer()}catch(e){}})}static syncToServer(){return a(this,void 0,void 0,function*(){try{if(!Object.keys(this.conceptsData).length&&!Object.keys(this.connectionsData).length)return;const e=r.b.BearerAccessToken;if(!e)return;const t=this.conceptsData&&Object.keys(this.conceptsData).length>0?this.conceptsData:{},n=this.connectionsData&&Object.keys(this.connectionsData).length>0?this.connectionsData:{},o=yield fetch(i.BaseUrl.PostPrefetchConceptConnections(),{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify({concepts:t,connections:n})});if(!o.ok)throw new Error("Failed to sync data to the server.");yield o.json(),this.conceptsData={},this.connectionsData={},this.setNextSyncTime()}catch(e){}})}static setNextSyncTime(){this.nextSyncTime=Date.now()+this.SYNC_INTERVAL_MS}static startAutoSync(){setInterval(()=>{const e=Date.now();this.nextSyncTime&&e>=this.nextSyncTime&&this.syncNow().catch(console.error)},6e4)}static syncNow(){return a(this,void 0,void 0,function*(){try{this.activateStatus&&(yield this.syncToServer())}catch(e){}})}static GetSuggestedConcepts(e){return a(this,void 0,void 0,function*(){try{const t=r.b.BearerAccessToken,n=new URL(i.BaseUrl.GetSuggestedConcepts());void 0!==e&&n.searchParams.append("top",e.toString());const o=yield fetch(n.toString(),{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}});if(!o.ok){const e=yield o.text();throw new Error(`Failed to load concepts: ${o.status} ${o.statusText}. Details: ${e}`)}const a=(yield o.json())||[];return yield this.addConceptToBinaryTree(a.data),a}catch(e){throw e instanceof Error?new Error("Unable to fetch suggested concepts. Please try again later."):new Error("An unexpected error occurred while fetching suggested concepts.")}})}static GetSuggestedConnections(e){return a(this,void 0,void 0,function*(){try{const t=r.b.BearerAccessToken,n=new URL(i.BaseUrl.GetSuggestedConnections());void 0!==e&&n.searchParams.append("top",e.toString());const o=yield fetch(n.toString(),{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}});if(!o.ok){const e=yield o.text();throw new Error(`Failed to load connections: ${o.status} ${o.statusText}. Details: ${e}`)}const a=(yield o.json())||[];return yield this.addConnectionToBinaryTree(a.data),a}catch(e){throw e instanceof Error?new Error("Unable to fetch suggested connections. Please try again later."):new Error("An unexpected error occurred while fetching suggested Connections.")}})}static addConceptToBinaryTree(e){return a(this,void 0,void 0,function*(){try{e.forEach(e=>{i.ConceptsData.AddConcept(e)})}catch(e){}})}static addConnectionToBinaryTree(e){return a(this,void 0,void 0,function*(){try{e.forEach(e=>{i.ConnectionData.AddConnection(e)})}catch(e){}})}}o=s,s.conceptsData={},s.connectionsData={},s.SYNC_INTERVAL_MS=12e4,s.nextSyncTime=Date.now(),s.activateStatus=!1,s.accessData="Access Data",o.startAutoSync()},1752:e=>{let t={comma:e=>t.split(e,[","],!0),space:e=>t.split(e,[" ","\n","\t"]),split(e,t,n){let o=[],i="",r=!1,a=0,s=!1,c="",l=!1;for(let n of e)l?l=!1:"\\"===n?l=!0:s?n===c&&(s=!1):'"'===n||"'"===n?(s=!0,c=n):"("===n?a+=1:")"===n?a>0&&(a-=1):0===a&&t.includes(n)&&(r=!0),r?(""!==i&&o.push(i.trim()),i="",r=!1):i+=n;return(n||""!==i)&&o.push(i.trim()),o}};e.exports=t,t.default=t},1863:(e,t,n)=>{n.d(t,{ER:()=>a,Mb:()=>s,ey:()=>c,ry:()=>r});var o=n(8957),i=n(7273);function r(e){if(o.Logger.log("ERROR",e.statusText,{code:e.status,data:e.statusText}),401==e.status||406==e.status){let t=new i.z(e.statusText,!1,e.status,"");throw t.setUrl(e.url),t}if(500==e.status){let t=new i.z(e.statusText,!1,e.status,"");throw t.setUrl(e.url),t}}function a(e,t={}){if(o.Logger.log("ERROR",t.statusText,{code:e.status,data:e.status}),401==e.status||406==e.status){let n=new i.z(t.statusText,!1,e.status,"");throw n.setUrl(e.url),n}if(500==e.status){let n=new i.z(t.statusText,!1,e.status,"");throw n.setUrl(e.url),n}}function s(e,t=""){if(o.Logger.log("ERROR",e.message,{code:e.status,data:e.stack}),e.status){let n=new i.z(e.message,!1,e.status,e.stack);throw n.setUrl(t),n}{let n=new i.z(e.message,!1,500,e.stack);throw n.setUrl(t),n}}function c(e,t,n){var o;try{if(!e)return;const t=Date.now();e.startTime=null!==(o=e.startTime)&&void 0!==o?o:t,e.responseTime=t-e.startTime+" ms",e.level="ERROR",e.errorMessage=(null==n?void 0:n.message)||"Unknown error occurred"}catch(e){}}},1866:()=>{},2013:(e,t,n)=>{n.d(t,{A:()=>c,w:()=>l});var o=n(8146),i=n(8957),r=n(3026),a=n(1863),s=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function c(e){var t=arguments;return s(this,void 0,void 0,function*(){const n=i.Logger.logfunction("GetConceptByCharacter",t)||{};if(i.serviceWorker){n.serviceWorker=!0;try{const t=yield(0,i.sendMessage)("GetConceptByCharacter",{characterValue:e});return i.Logger.logUpdate(n),t.data}catch(e){(0,a.ey)(n,"GetConceptByCharacter",e),(0,i.handleServiceWorkerException)(e)}}let s=yield r.I.GetConceptByCharacter(e),c=`${e}`;return null!=s&&0!=(null==s?void 0:s.id)||!c||(yield(0,o.Y)(e),s=yield r.I.GetConceptByCharacterAndTypeLocal(e,51),0==s.id&&(s=yield r.I.GetConceptByCharacter(e))),i.Logger.logUpdate(n),s})}function l(e){var t=arguments;return s(this,void 0,void 0,function*(){const n=i.Logger.logfunction("GetConceptByCharacterUpdated",t)||{};if(i.serviceWorker){n.serviceWorker=!0;try{const t=yield(0,i.sendMessage)("GetConceptByCharacterUpdated",{characterValue:e});return i.Logger.logUpdate(n),t.data}catch(e){(0,a.ey)(n,"GetConceptByCharacterUpdated",e),(0,i.handleServiceWorkerException)(e)}}let s=yield r.I.GetConceptByCharacter(e),c=`${e}`;return null!=s&&0!=(null==s?void 0:s.id)||!c||(yield(0,o.Y)(e),s=yield r.I.GetConceptByCharacter(e)),i.Logger.logUpdate(n),s})}},2110:(e,t,n)=>{const{AtRule:o,Rule:i}=n(2895);let r=n(7149);function a(e,t){let n;try{r(e=>{n=e}).processSync(e)}catch(n){throw e.includes(":")?t?t.error("Missed semicolon"):n:t?t.error(n.message):n}return n.at(0)}function s(e,t){let n=!1;return e.each(e=>{if("nesting"===e.type){let o=t.clone({});"&"!==e.value?e.replaceWith(a(e.value.replace("&",o.toString()))):e.replaceWith(o),n=!0}else"nodes"in e&&e.nodes&&s(e,t)&&(n=!0)}),n}function c(e,t){let n=[];for(let o of e.selectors){let i=a(o,e);for(let e of t.selectors){if(!e)continue;let o=a(e,t);s(o,i)||(o.prepend(r.combinator({value:" "})),o.prepend(i.clone({}))),n.push(o.toString())}}return n}function l(e,t){if("comment"!==e.prev()?.type)return t.after(e),e;let n=e.prev();return e.parent.toString().match(/[*]\/ *\n.*{/)?t.after(e).after(n):t.after(e),e}function d(e,t,n,o=!0){return t.length?(n=function(e,t,n){let o=new i({nodes:[],selector:e});return o.append(t),n.after(o),o}(e,t,n),o&&(t=[]),[n,t]):[n,t]}function u(e,t=""){let n=e.concat(t),o={};for(let e of n)o[e.replace(/^@/,"")]=!0;return o}function h(e){let t=e[f];if(t){let n,i,r,a,s=e.nodes,c=-1,l=function(e){let t=[],n=e.parent;for(;n&&n instanceof o;)t.push(n),n=n.parent;return t}(e);if(l.forEach((e,o)=>{if(t(e.name))n=e,c=o,r=a;else{let t=a;a=e.clone({nodes:[]}),t&&a.append(t),i=i||a}}),n)if(r){i.append(s),n.after(r)}else n.after(s);else e.after(s);if(e.next()&&n){let t;l.slice(0,c+1).forEach((n,o,i)=>{let r=t;t=n.clone({nodes:[]}),r&&t.append(r);let a=[],s=(i[o-1]||e).next();for(;s;)a.push(s),s=s.next();t.append(a)}),t&&(r||s[s.length-1]).after(t)}}else e.after(e.nodes);e.remove()}const p=Symbol("rootRuleMergeSel"),f=Symbol("rootRuleEscapes");function m(e){let{params:t}=e,{escapes:n,selector:o,type:r}=function(e){let t=(e=e.trim()).match(/^\((.*)\)$/);if(!t)return{selector:e,type:"basic"};let n=t[1].match(/^(with(?:out)?):(.+)$/);if(n){let e="with"===n[1],t=Object.fromEntries(n[2].trim().split(/\s+/).map(e=>[e,!0]));if(e&&t.all)return{type:"noop"};let o=e=>!!t[e];return t.all?o=()=>!0:e&&(o=e=>"all"!==e&&!t[e]),{escapes:o,type:"withrules"}}return{type:"unknown"}}(t);if("unknown"===r)throw e.error(`Unknown @${e.name} parameter ${JSON.stringify(t)}`);if("basic"===r&&o){let t=new i({nodes:e.nodes,selector:o});e.removeAll(),e.append(t)}e[f]=n,e[p]=n?!n("all"):"noop"===r}const y=Symbol("hasRootRule");e.exports=(e={})=>{let t=u(["media","supports","layer","container","starting-style"],e.bubble),n=function(e){return function t(n,o,i,r=i){let a=[];if(o.each(s=>{"rule"===s.type&&i?r&&(s.selectors=c(n,s)):"atrule"===s.type&&s.nodes?e[s.name]?t(n,s,r):!1!==o[p]&&a.push(s):a.push(s)}),i&&a.length){let e=n.clone({nodes:[]});for(let t of a)e.append(t);o.prepend(e)}}}(t),o=u(["document","font-face","keyframes","-webkit-keyframes","-moz-keyframes"],e.unwrap),i=(e.rootRuleName||"at-root").replace(/^@/,""),r=e.preserveEmpty;return{Once(e){e.walkAtRules(i,t=>{m(t),e[y]=!0})},postcssPlugin:"postcss-nested",RootExit(e){e[y]&&(e.walkAtRules(i,h),e[y]=!1)},Rule(e){let a=!1,s=e,u=!1,h=[];e.each(r=>{switch(r.type){case"atrule":[s,h]=d(e.selector,h,s),r.name===i?(a=!0,n(e,r,!0,r[p]),s=l(r,s)):t[r.name]?(u=!0,a=!0,n(e,r,!0),s=l(r,s)):o[r.name]?(u=!0,a=!0,n(e,r,!1),s=l(r,s)):u&&h.push(r);break;case"decl":u&&h.push(r);break;case"rule":[s,h]=d(e.selector,h,s),u=!0,a=!0,r.selectors=c(e,r),s=l(r,s)}}),d(e.selector,h,s,!1),a&&!0!==r&&(e.raws.semicolon=!0,0===e.nodes.length&&e.remove())}}},e.exports.postcss=!0},2155:(e,t,n)=>{n.d(t,{N:()=>r});var o=n(7282),i=n(9581);class r{constructor(e=0,t,n,r,a,s,c){this.count=0,this.isTemp=!1,this.toUpdate=!1,this.applicationId=i.B.getRandomizer(),this.type=(0,o.o)(),this.ofConcept=(0,o.o)(),this.toConcept=(0,o.o)(),this.id=e,this.ofTheConceptId=t,this.toTheConceptId=n,this.userId=r,this.typeId=a,this.ghostId=e,this.orderId=s,this.accessId=c,this.entryTimeStamp=(0,o.Y)(new Date),this.terminationDateTime=new Date,this.localSyncTime=new Date,this.typeCharacter=""}}},2170:(e,t,n)=>{n.d(t,{B:()=>o});class o{static getValue(e,t=null){if(e in this.environments){return this.environments[e]}return t}static setValue(e,t){return this.environments[e]=t,this}}o.environments={}},2202:(e,t,n)=>{n.d(t,{W:()=>c});var o=n(6963),i=n(6731),r=n(205),a=n(8957),s=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class c{static addNodeToTree(e){this.conceptMap.set(e.key,e.value),null===this.root&&(this.root=e)}static waitForDataToLoad(){return s(this,void 0,void 0,function*(){return new Promise((e,t)=>{this.checkFlag(e),setTimeout(()=>{t("not")},25e3)})})}static checkFlag(e){if(r.B.isDataLoaded)return e("done");setTimeout(c.checkFlag,1e3,e)}static addConceptToTree(e){let t=new i.b(e.characterValue,e,null,null);o.f.addNodeToTree(t),this.conceptMap.set(e.id,e),null===this.root&&(this.root=new i.b(e.id,e,null,null))}static getNodeFromTree(e){return s(this,void 0,void 0,function*(){const t=this.conceptMap.get(e);return t?{key:e,value:t}:null})}static removeNodeFromTree(e){return s(this,void 0,void 0,function*(){this.conceptMap.has(e)&&((0,a.dispatchIdEvent)(e),this.conceptMap.delete(e),0===this.conceptMap.size&&(this.root=null))})}static getConceptListFromIds(e,t,n){return s(this,void 0,void 0,function*(){for(let n=e.length-1;n>=0;n--){const o=this.conceptMap.get(e[n]);o&&(t.push(o),e.splice(n,1))}})}static countNumberOfNodes(){return this.conceptMap.size}}c.root=null,c.conceptMap=new Map},2212:(e,t,n)=>{n.d(t,{Ay:()=>l,N:()=>d});var o=n(1167),i=n(2615),r=n(5976),a=n(442),s=n(8957),c=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function l(e,t,n,o,s,l,d){return c(this,void 0,void 0,function*(){let c=yield r.B.getId(),u=new Date,h=new Date,p=new i.j(c,t,o,n,s,e,l,!0,u,h,d);return p.isTemp=!1,a.Y.AddConcept(p),p})}function d(e,t,n,a,l,d,u){return c(this,void 0,void 0,function*(){let c=yield r.B.getId(),h=new Date,p=new Date,f=new i.j(c,t,a,n,l,e,d,!1,h,p,u);return s.ConceptsData.AddConcept(f),(0,o.Y)([f]),f})}},2289:(e,t,n)=>{n.d(t,{$S:()=>d,L0:()=>u,WC:()=>h});var o=n(8675),i=n(6058),r=n(8957),a=n(1863);n(3518);var s=n(843),c=n(4818),l=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function d(e,t){var n=arguments;return l(this,void 0,void 0,function*(){const i=r.Logger.logfunction("DeleteConnectionByType",n)||{};if(r.serviceWorker){i.serviceWorker=!0;try{const n=yield(0,r.sendMessage)("DeleteConnectionByType",{id:e,linker:t});return r.Logger.logUpdate(i),n.data}catch(e){(0,a.ey)(i,"DeleteConnectionByType",e),(0,r.handleServiceWorkerException)(e)}}let s=yield(0,o.l)(e);for(let e=0;e<s.length;e++)r.ConnectionData.AddConnection(s[e]);let c=yield r.ConnectionData.GetConnectionsOfConcept(e),l=yield(0,r.GetConceptByCharacter)(t),d=[];for(let e=0;e<c.length;e++)c[e].typeId==l.id&&d.push(c[e]);let u=!1;for(let e=0;e<d.length;e++)u=yield(0,r.DeleteConnectionById)(d[e].id);return r.Logger.logUpdate(i),u})}function u(e,t){var n=arguments;return l(this,void 0,void 0,function*(){const i=r.Logger.logfunction("DeleteConnectionByTypeBulk",n)||{};if(r.serviceWorker){i.serviceWorker=!0;try{const n=yield(0,r.sendMessage)("DeleteConnectionByTypeBulk",{id:e,linkers:t});return r.Logger.logUpdate(i),n.data}catch(e){(0,a.ey)(i,"DeleteConnectionByTypeBulk",e),(0,r.handleServiceWorkerException)(e)}}let l=yield(0,o.l)(e);for(let e=0;e<l.length;e++)r.ConnectionData.AddConnection(l[e]);let d=yield r.ConnectionData.GetConnectionsOfConcept(e),u=[];u=yield(0,s.Hi)(t);let h=[];for(let e=0;e<d.length;e++)for(let t=0;t<u.length;t++)d[e].typeId==u[t].id&&h.push(d[e].id);return r.Logger.logUpdate(i),yield(0,c.E)(h)})}function h(e,t){return l(this,arguments,void 0,function*(e,t,n=!1){if(r.serviceWorker)try{return(yield(0,r.sendMessage)("GetAllTheConnectionsByTypeAndOfTheConcept",{id:e,linker:t,reverse:n})).data}catch(e){(0,r.handleServiceWorkerException)(e)}let a=[];if(n){let n=yield(0,i.W)(e),o=yield(0,r.MakeTheTypeConceptApi)(t,999);for(let e=0;e<n.length;e++)n[e].typeId==o.id&&a.push(n[e])}else{let n=yield(0,o.l)(e);for(let e=0;e<n.length;e++)r.ConnectionData.AddConnection(n[e]);let i=yield r.ConnectionData.GetConnectionsOfConcept(e),s=yield(0,r.GetConceptByCharacter)(t);for(let e=0;e<i.length;e++)i[e].typeId==s.id&&a.push(i[e])}return a})}},2299:(e,t,n)=>{n.d(t,{B:()=>o});class o{constructor(e){this.id=1,this.isOnlineSync=!1,this.isOnlineSync=e}}},2515:(e,t,n)=>{n.d(t,{x:()=>o});class o{constructor(e,t,n,o){this.variants=[],this.height=1,this.key=e,this.value=t,this.leftNode=n,this.rightNode=o,this.currentNode=null}addCurrentNode(e,t){return null==t?t=e:(e.value.typeId!=t.value.typeId&&(t.currentNode=this.addCurrentNode(e,t.currentNode)),t)}addCurrentNodeType(e,t){if(null==t)return t=e;var n=!1;for(let o=0;o<t.variants.length;o++)t.variants[o].value.id==e.value.id&&(n=!0);return n||t.variants.push(e),t}addNode(e,t,n){if(null==t)return t=e;var o=t.leftNode,i=t.rightNode;if(t.key>e.key)t.leftNode=this.addNode(e,o,n);else{if(!(t.key<e.key))return t;t.rightNode=this.addNode(e,i,n)}t.height=1+Math.max(this.getHeight(t.leftNode),this.getHeight(t.rightNode));let r=this.getBalanceFactor(t);if(r>1&&t.leftNode){if(e.key<t.leftNode.key)return this.rightRotate(t);if(e.key>t.leftNode.key)return t.leftNode=this.leftRotate(t.leftNode),this.rightRotate(t)}if(r<-1&&t.rightNode){if(e.key>t.rightNode.key)return this.leftRotate(t);if(e.key<t.rightNode.key)return t.rightNode=this.rightRotate(t.rightNode),this.leftRotate(t)}return t}addCharacterNode(e,t,n){var o=!1;if(""!=e.value.characterValue){if(null==t)return t=e;var i=t.leftNode,r=t.rightNode;if(t.key>e.key)t.leftNode=this.addCharacterNode(e,i,n);else{if(!(t.key<e.key))return t.key==e.key&&""!=t.key&&t.value.id!=e.value.id&&t.addCurrentNodeType(e,t),t;t.rightNode=this.addCharacterNode(e,r,n)}t.height=1+Math.max(this.getHeight(t.leftNode),this.getHeight(t.rightNode));let o=this.getBalanceFactor(t);if(o>1&&t.leftNode){if(e.key<t.leftNode.key)return this.rightRotate(t);if(e.key>t.leftNode.key)return t.leftNode=this.leftRotate(t.leftNode),this.rightRotate(t)}if(o<-1&&t.rightNode){if(e.key>t.rightNode.key)return this.leftRotate(t);if(e.key<t.rightNode.key)return t.rightNode=this.rightRotate(t.rightNode),this.leftRotate(t)}}else o;return t}addTypeNode(e,t,n){var o=!1;if(0!=e.value.typeId){if(null==t)return t=e;var i=t.leftNode,r=t.rightNode;if(t.key>e.key)t.leftNode=this.addTypeNode(e,i,n);else{if(!(t.key<e.key))return t.key==e.key&&0!=t.key&&t.value.id!=e.value.id&&t.addCurrentNodeType(e,t),t;t.rightNode=this.addTypeNode(e,r,n)}t.height=1+Math.max(this.getHeight(t.leftNode),this.getHeight(t.rightNode));let o=this.getBalanceFactor(t);if(o>1&&t.leftNode){if(e.key<t.leftNode.key)return this.rightRotate(t);if(e.key>t.leftNode.key)return t.leftNode=this.leftRotate(t.leftNode),this.rightRotate(t)}if(o<-1&&t.rightNode){if(e.key>t.rightNode.key)return this.leftRotate(t);if(e.key<t.rightNode.key)return t.rightNode=this.rightRotate(t.rightNode),this.leftRotate(t)}}else o;return t}rightRotate(e){if(e){let t=e.leftNode;if(t){let n=t.rightNode;return e.leftNode=n,t.rightNode=e,e.height=Math.max(this.getHeight(e.leftNode),this.getHeight(e.rightNode))+1,t.height=Math.max(this.getHeight(t.leftNode),this.getHeight(t.rightNode))+1,t}}return e}leftRotate(e){if(e){let t=e.rightNode;if(t){let n=t.leftNode;return t.leftNode=e,e.rightNode=n,e.height=Math.max(this.getHeight(e.leftNode),this.getHeight(e.rightNode))+1,t.height=Math.max(this.getHeight(t.leftNode),this.getHeight(e.rightNode))+1,t}}return e}getHeight(e){return e?e.height:0}getBalanceFactor(e){return null==e?0:this.getHeight(e.leftNode)-this.getHeight(e.rightNode)}getFromNode(e,t){return t?e==t.key?t:e<t.key?this.getFromNode(e,t.leftNode):e>t.key?this.getFromNode(e,t.rightNode):t:t}updateNodeSyncStatus(e,t,n){if(n){if(e==n.key){let e=n.value;return e.isSynced=t,n.value=e,n}return e<n.key?this.updateNodeSyncStatus(e,t,n.leftNode):e>n.key?this.updateNodeSyncStatus(e,t,n.rightNode):n}return n}getCharacterFromNode(e,t){return t?e==t.key?t:e<t.key?this.getCharacterFromNode(e,t.leftNode):e>t.key?this.getCharacterFromNode(e,t.rightNode):t:t}getFromNodeWithCharacterAndType(e,t,n){if(e=`${e}`,n){if(e==n.key){if(e==n.value.characterValue&&t==n.value.typeId)return n;for(let e=0;e<n.variants.length;e++)if(n.variants[e].value.typeId==t)return n.variants[e]}else{if(e<n.key)return this.getFromNodeWithCharacterAndType(e,t,n.leftNode);if(e>n.key)return this.getFromNodeWithCharacterAndType(e,t,n.rightNode)}return null}return n}getFromNodeWithCharacterAndCategory(e,t,n){if(e=`${e}`,n){if(e==n.key){if(e==n.value.characterValue&&t==n.value.categoryId)return n;for(let e=0;e<n.variants.length;e++)if(n.variants[e].value.categoryId==t)return n.variants[e]}else{if(e<n.key)return this.getFromNodeWithCharacterAndCategory(e,t,n.leftNode);if(e>n.key)return this.getFromNodeWithCharacterAndCategory(e,t,n.rightNode)}return null}return n}removeNode(e,t){if(null==e)return e;if(e.key>t)return e.leftNode=this.removeNode(e.leftNode,t),e;if(e.key<t)return e.rightNode=this.removeNode(e.rightNode,t),e;if(null==e.leftNode){let t=e.rightNode;return e=null,t}if(null==e.rightNode){let t=e.leftNode;return e=null,t}var n=this.inOrderSuccessor(e.rightNode);return e.value=n.value,e.key=n.key,e.variants=n.variants,e.currentNode=n.currentNode,e.rightNode=this.removeNode(e.rightNode,n.key),e}removeNodeWithVariants(e,t,n){if(null==e)return e;if(e.key>t)return e.leftNode=this.removeNodeWithVariants(e.leftNode,t,n),e;if(e.key<t)return e.rightNode=this.removeNodeWithVariants(e.rightNode,t,n),e;if(e.variants.length>0)if(e.value.id==n){var o=e.variants[0];if(o)return e.value=o.value,e.key=o.key,e.currentNode=o.currentNode,e.variants.splice(0,1),e}else for(let t=0;t<e.variants.length;t++)if(n==e.variants[t].value.id)return e.variants.splice(t,1),e;if(null==e.leftNode){let t=e.rightNode;return e=null,t}if(null==e.rightNode){let t=e.leftNode;return e=null,t}var i=this.inOrderSuccessor(e.rightNode);return e.value=i.value,e.key=i.key,e.variants=i.variants,e.currentNode=i.currentNode,e.rightNode=this.removeNodeWithVariants(e.rightNode,i.key,n),e}countNodeBelow(e){return null==e?0:1+this.countNodeBelow(e.leftNode)+this.countNodeBelow(e.rightNode)}inOrderSuccessor(e){for(;null!=e.leftNode;)e=e.leftNode;return e}}},2615:(e,t,n)=>{n.d(t,{j:()=>i});var o=n(8957);class i{constructor(e,t,n,i,r,a,s,c=!1,l,d,u){this.count=0,this.typeCharacter="",this.referent=null,this.isComposition=!1,this.isTemp=!1,this.isSynced=!1,this.applicationId=o.BaseUrl.getRandomizer(),this.x=0,this.y=0,this.id=e,this.userId=t,this.typeId=n,this.ghostId=e,this.categoryId=i,this.referentId=r,this.characterValue=`${a}`,this.accessId=s,this.typeCharacter=u,this.type=null,this.isNew=c,this.entryTimeStamp=l,this.updatedTimeStamp=d}getType(){}}},2648:(e,t,n)=>{t.__esModule=!0,t.FIELDS=void 0,t.default=function(e){var t,n,o,i,a,s,c,l,d,u,p,f,m=[],y=e.css.valueOf(),v=y.length,g=-1,C=1,w=0,T=0;function I(t,n){if(!e.safe)throw e.error("Unclosed "+t,C,w-g,w);l=(y+=n).length-1}for(;w<v;){switch((t=y.charCodeAt(w))===r.newline&&(g=w,C+=1),t){case r.space:case r.tab:case r.newline:case r.cr:case r.feed:l=w;do{l+=1,(t=y.charCodeAt(l))===r.newline&&(g=l,C+=1)}while(t===r.space||t===r.newline||t===r.tab||t===r.cr||t===r.feed);f=r.space,o=C,n=l-g-1,T=l;break;case r.plus:case r.greaterThan:case r.tilde:case r.pipe:l=w;do{l+=1,t=y.charCodeAt(l)}while(t===r.plus||t===r.greaterThan||t===r.tilde||t===r.pipe);f=r.combinator,o=C,n=w-g,T=l;break;case r.asterisk:case r.ampersand:case r.bang:case r.comma:case r.equals:case r.dollar:case r.caret:case r.openSquare:case r.closeSquare:case r.colon:case r.semicolon:case r.openParenthesis:case r.closeParenthesis:f=t,o=C,n=w-g,T=(l=w)+1;break;case r.singleQuote:case r.doubleQuote:p=t===r.singleQuote?"'":'"',l=w;do{for(i=!1,-1===(l=y.indexOf(p,l+1))&&I("quote",p),a=l;y.charCodeAt(a-1)===r.backslash;)a-=1,i=!i}while(i);f=r.str,o=C,n=w-g,T=l+1;break;default:t===r.slash&&y.charCodeAt(w+1)===r.asterisk?(0===(l=y.indexOf("*/",w+2)+1)&&I("comment","*/"),(s=(c=y.slice(w,l+1).split("\n")).length-1)>0?(d=C+s,u=l-c[s].length):(d=C,u=g),f=r.comment,C=d,o=d,n=l-u):t===r.slash?(f=t,o=C,n=w-g,T=(l=w)+1):(l=h(y,w),f=r.word,o=C,n=l-g),T=l+1}m.push([f,C,w-g,o,n,w,T]),u&&(g=u,u=null),w=T}return m};var o,i,r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=a(t);if(n&&n.has(e))return n.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var s=i?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(o,r,s):o[r]=e[r]}o.default=e,n&&n.set(e,o);return o}(n(71));function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(a=function(e){return e?n:t})(e)}for(var s=((o={})[r.tab]=!0,o[r.newline]=!0,o[r.cr]=!0,o[r.feed]=!0,o),c=((i={})[r.space]=!0,i[r.tab]=!0,i[r.newline]=!0,i[r.cr]=!0,i[r.feed]=!0,i[r.ampersand]=!0,i[r.asterisk]=!0,i[r.bang]=!0,i[r.comma]=!0,i[r.colon]=!0,i[r.semicolon]=!0,i[r.openParenthesis]=!0,i[r.closeParenthesis]=!0,i[r.openSquare]=!0,i[r.closeSquare]=!0,i[r.singleQuote]=!0,i[r.doubleQuote]=!0,i[r.plus]=!0,i[r.pipe]=!0,i[r.tilde]=!0,i[r.greaterThan]=!0,i[r.equals]=!0,i[r.dollar]=!0,i[r.caret]=!0,i[r.slash]=!0,i),l={},d="0123456789abcdefABCDEF",u=0;u<22;u++)l[d.charCodeAt(u)]=!0;function h(e,t){var n,o=t;do{if(n=e.charCodeAt(o),c[n])return o-1;n===r.backslash?o=p(e,o)+1:o++}while(o<e.length);return o-1}function p(e,t){var n=t,o=e.charCodeAt(n+1);if(s[o]);else if(l[o]){var i=0;do{n++,i++,o=e.charCodeAt(n+1)}while(l[o]&&i<6);i<6&&o===r.space&&n++}else n++;return n}t.FIELDS={TYPE:0,START_LINE:1,START_COL:2,END_LINE:3,END_COL:4,START_POS:5,END_POS:6}},2739:()=>{},2803:(e,t,n)=>{n.d(t,{x:()=>c});var o=n(8286),i=n(9581),r=n(1863),a=n(8957),s=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function c(e,t,n){var c=arguments;return s(this,void 0,void 0,function*(){const s=a.Logger.logfunction("GetCompositionConnectionsBetweenTwoConcepts",c)||{};var l=[];try{if(a.serviceWorker){s.serviceWorker=!0;try{const o=yield(0,a.sendMessage)("GetCompositionConnectionsBetweenTwoConcepts",{ofConceptId:e,toConcept:t,mainKey:n});return a.Logger.logUpdate(s),o.data}catch(e){(0,r.ey)(s,"GetCompositionConnectionsBetweenTwoConcepts",e),(0,a.handleServiceWorkerException)(e)}}var d=new FormData;d.append("ofConceptId",e.toString()),d.append("mainKey",n.toString()),d.append("toConceptId",t.toString());const c=yield fetch(i.B.GetCompositionConnectionBetweenTwoConceptsUrl(),{method:"POST",body:d,redirect:"follow"});if(c.ok){const e=yield c.json();for(var u=0;u<e.length;u++)o.d.AddConnection(e[u]),l.push(e[u]);a.Logger.logUpdate(s)}else(0,r.ry)(c)}catch(e){Error,(0,r.Mb)(e,i.B.GetCompositionConnectionBetweenTwoConceptsUrl()),(0,r.ey)(s,"GetCompositionConnectionsBetweenTwoConcepts",e)}return l})}},2832:(e,t,n)=>{n.d(t,{j:()=>c});var o=n(8957),i=n(9581),r=n(1863),a=n(3518),s=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function c(e){var t=arguments;return s(this,arguments,void 0,function*(e,n=""){const s=o.Logger.logfunction("SearchLinkMultipleApi",t);let c=performance.now();var l=(0,a.ab)("application/json",n);const d=i.B.SearchLinkMultipleAllApiUrl(),u=JSON.stringify(e);try{const t=yield fetch(d,{method:"POST",headers:l,body:u});if(t.ok){let e=yield t.json();return o.Logger.logUpdate(s),e}return(0,r.ry)(t),o.Logger.logError(c,"unknown","search","unknown",void 0,t.status,t,"SearchLinkMultipleApi",[e,n],"unknown",void 0),[]}catch(t){o.Logger.logError(c,"unknown","search","unknown",void 0,500,t,"SearchLinkMultipleApi",[e,n],"unknown",void 0),(0,r.Mb)(t,d),(0,r.ey)(s,"SearchLinkMultipleApi",t)}})}},2895:(e,t,n)=>{let o=n(396),i=n(9371),r=n(7793),a=n(3614),s=n(5238),c=n(145),l=n(3438),d=n(1106),u=n(6966),h=n(1752),p=n(3152),f=n(9577),m=n(6846),y=n(3717),v=n(5644),g=n(1534),C=n(3303),w=n(38);function T(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new m(e)}T.plugin=function(e,t){let n,o=!1;function i(...n){console&&console.warn&&!o&&(o=!0,process.env.LANG&&process.env.LANG.startsWith("cn"));let i=t(...n);return i.postcssPlugin=e,i.postcssVersion=(new m).version,i}return Object.defineProperty(i,"postcss",{get:()=>(n||(n=i()),n)}),i.process=function(e,t,n){return T([i(n)]).process(e,t)},i},T.stringify=C,T.parse=f,T.fromJSON=l,T.list=h,T.comment=e=>new i(e),T.atRule=e=>new o(e),T.decl=e=>new s(e),T.rule=e=>new g(e),T.root=e=>new v(e),T.document=e=>new c(e),T.CssSyntaxError=a,T.Declaration=s,T.Container=r,T.Processor=m,T.Document=c,T.Comment=i,T.Warning=w,T.AtRule=o,T.Result=y,T.Input=d,T.Rule=g,T.Root=v,T.Node=p,u.registerPostcss(T),e.exports=T,T.default=T},2918:(e,t,n)=>{t.__esModule=!0,t.default=void 0;var o,i=(o=n(4646))&&o.__esModule?o:{default:o},r=n(1581);function a(e,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},a(e,t)}var s=function(e){var t,n;function o(t){var n;return(n=e.call(this,t)||this).type=r.NESTING,n.value="&",n}return n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,a(t,n),o}(i.default);t.default=s,e.exports=t.default},3026:(e,t,n)=>{n.d(t,{I:()=>f});var o=n(3655),i=n(2202),r=n(6963),a=n(5457),s=n(7282),c=n(8957);class l{constructor(e,t,n,o){this.height=1,this.key=e,this.value=t,this.leftNode=n,this.rightNode=o}addNode(e,t,n){if(null==t)return t=e;let o=t.leftNode,i=t.rightNode;if(t.key>e.key)t.leftNode=this.addNode(e,o,n);else{if(!(t.key<e.key))return t;t.rightNode=this.addNode(e,i,n)}t.height=1+Math.max(this.getHeight(t.leftNode),this.getHeight(t.rightNode));let r=this.getBalanceFactor(t);if(r>1&&t.leftNode){if(e.key<t.leftNode.key)return this.rightRotate(t);if(e.key>t.leftNode.key)return t.leftNode=this.leftRotate(t.leftNode),this.rightRotate(t)}if(r<-1&&t.rightNode){if(e.key>t.rightNode.key)return this.leftRotate(t);if(e.key<t.rightNode.key)return t.rightNode=this.rightRotate(t.rightNode),this.leftRotate(t)}return t}rightRotate(e){if(e){let t=e.leftNode;if(t){let n=t.rightNode;return e.leftNode=n,t.rightNode=e,e.height=Math.max(this.getHeight(e.leftNode),this.getHeight(e.rightNode))+1,t.height=Math.max(this.getHeight(t.leftNode),this.getHeight(t.rightNode))+1,t}}return e}leftRotate(e){if(e){let t=e.rightNode;if(t){let n=t.leftNode;return t.leftNode=e,e.rightNode=n,e.height=Math.max(this.getHeight(e.leftNode),this.getHeight(e.rightNode))+1,t.height=Math.max(this.getHeight(t.leftNode),this.getHeight(e.rightNode))+1,t}}return e}getHeight(e){return e?e.height:0}getBalanceFactor(e){return null==e?0:this.getHeight(e.leftNode)-this.getHeight(e.rightNode)}getFromNode(e,t){return t?e==t.key?t:e<t.key?this.getFromNode(e,t.leftNode):e>t.key?this.getFromNode(e,t.rightNode):t:t}removeNode(e,t){if(null==e)return e;if(e.key>t)return e.leftNode=this.removeNode(e.leftNode,t),e;if(e.key<t)return e.rightNode=this.removeNode(e.rightNode,t),e;if(null==e.leftNode){let t=e.rightNode;return e=null,t}if(null==e.rightNode){let t=e.leftNode;return e=null,t}{let t=this.inOrderSuccessor(e.rightNode);return e.value=t.value,e.key=t.key,e.rightNode=this.removeNode(e.rightNode,t.key),e}}countNodeBelow(e){return null==e?0:1+this.countNodeBelow(e.leftNode)+this.countNodeBelow(e.rightNode)}inOrderSuccessor(e){for(;null!=e.leftNode;)e=e.leftNode;return e}}var d=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class u{static addNodeToTree(e){if(null==this.root)return this.root=e,this.root;this.root=this.root.addNode(e,this.root,this.root.height)}static addWidgetToTree(e){let t=new l(e.widgetId,e,null,null);this.addNodeToTree(t)}static getNodeFromTree(e){return d(this,void 0,void 0,function*(){if(this.root){return this.root.getFromNode(e,this.root)}return null})}static removeNodeFromTree(e){return d(this,void 0,void 0,function*(){this.root&&(this.root=this.root.removeNode(this.root,e))})}static countNumberOfNodes(){return this.root?this.root.countNodeBelow(this.root):0}}u.root=null;class h{constructor(){this.widgetId=0,this.mainId=0,this.conceptIds=[],this.linkers=[],this.reverse=[],this.mainCompositionIds=[],this.countinfo=[]}}var p=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class f{constructor(){this.name="conceptsArray"}static CheckContains(e){for(var t=!1,n=0;n<this.conceptsArray.length;n++)this.conceptsArray[n].id==e.id&&(t=!0);return t}static AddNpc(e){this.NPC.includes(e)||(this.NPC.length>10&&(this.NPC=[]),this.NPC.push(e))}static GetNpc(e){return!!this.NPC.includes(e)}static AddConceptToStorage(e){e.id>0&&(0,o.kH)("concept",e)}static GetConceptBulkData(e,t,n){return p(this,void 0,void 0,function*(){yield i.W.getConceptListFromIds(e,t,n)})}static AddWidget(e){if(c.serviceWorker)try{(0,c.sendMessage)("ConceptsData__AddWidget",{widgetDetails:e})}catch(e){(0,c.handleServiceWorkerException)(e)}e.widgetId>0&&u.addWidgetToTree(e)}static AddConcept(e){if(c.serviceWorker)try{(0,c.sendMessage)("ConceptsData__AddConcept",{concept:e})}catch(e){(0,c.handleServiceWorkerException)(e)}e.id>0&&(i.W.addConceptToTree(e),a.c.addConceptToTree(e))}static AddConceptToMemory(e){e.id>0&&(i.W.addConceptToTree(e),a.c.addConceptToTree(e))}static AddConceptTemporary(e){var t=this.CheckContains(e);this.conceptDictionary[e.id]=e,t&&this.RemoveConcept(e),this.conceptsArray.push(e)}static RemoveConcept(e){for(var t=0;t<this.conceptsArray.length;t++)this.conceptsArray[t].id==e.id&&this.conceptsArray.splice(t,1);(0,o.wh)("concept",e.id)}static GetWidget(e){return p(this,void 0,void 0,function*(){let t=new h;if(c.serviceWorker)try{return(yield(0,c.sendMessage)("ConceptsData__GetWidget",{id:e})).data}catch(e){(0,c.handleServiceWorkerException)(e)}let n=yield u.getNodeFromTree(e);return null!=n&&(t=n.value),t})}static RemoveWidget(e){return p(this,void 0,void 0,function*(){if(c.serviceWorker)try{return(yield(0,c.sendMessage)("ConceptsData__RemoveWidget",{id:e})).data}catch(e){(0,c.handleServiceWorkerException)(e)}yield u.removeNodeFromTree(e)})}static GetConcept(e){return p(this,void 0,void 0,function*(){if(c.serviceWorker)try{return(yield(0,c.sendMessage)("ConceptsData__GetConcept",{id:e})).data}catch(e){(0,c.handleServiceWorkerException)(e)}if(0==e||null==e||null==e)return(0,s.o)();var t=(0,s.o)(),n=yield i.W.getNodeFromTree(e);if(null==n?void 0:n.value){var o=n.value;o&&(t=o)}return t})}static GetConceptByCharacter(e){return p(this,void 0,void 0,function*(){var t=(0,s.o)(),n=r.f.getNodeFromTree(e);return n&&(t=n.value),t})}static GetConceptByCharacterUpdated(e){return p(this,void 0,void 0,function*(){var t=(0,s.o)(),n=r.f.getNodeFromTree(e);return n&&(t=n.value),t})}static GetConceptByCharacterAndTypeLocal(e,t){return p(this,void 0,void 0,function*(){(0,s.o)();return yield a.c.getTypeVariantsWithCharacterValueNew(e,t)})}static GetConceptByCharacterAndCategoryLocal(e,t){return p(this,void 0,void 0,function*(){var n=(0,s.o)(),o=yield r.f.getCharacterAndCategoryFromTree(e,t);return o&&(n=o.value),n})}static GetConceptsByTypeId(e){let t=[];for(var n=0;n<this.conceptsArray.length;n++)this.conceptsArray[n].typeId==e&&t.push(this.conceptsArray[n]);return t}static GetConceptsByTypeIdAndUser(e,t){var n=arguments;return p(this,void 0,void 0,function*(){if(c.Logger.logfunction("ConceptsData.GetConceptsByTypeIdAndUser",n),c.serviceWorker)try{return(yield(0,c.sendMessage)("ConceptsData__GetConceptsByTypeIdAndUser",{typeId:e,userId:t})).data}catch(e){(0,c.handleServiceWorkerException)(e)}let o=[];return o=yield a.c.getTypeVariantsFromTreeWithUserIdNew(e,t),o})}static GetBinaryCharacterTree(){return r.f.characterRoot}getName(){return this.name}}f.conceptsArray=[],f.NPC=[],f.conceptDictionary=[]},3075:(e,t,n)=>{n.d(t,{Ay:()=>d,EO:()=>u,xd:()=>h});var o=n(205),i=n(9736),r=n(5257),a=n(9003),s=n(8957),c=n(1863),l=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function d(){return l(this,void 0,void 0,function*(){const e=s.Logger.logfunction("CreateLocalBinaryTreeFromIndexDb");try{let t=[];if(Array.isArray(t))for(let e=0;e<t.length;e++){let n=t[e];i.v.AddConceptToMemory(n)}o.B.isLocalDataLoaded=!0,o.B.isLocalTypeLoaded=!0,o.B.isLocalCharacterLoaded=!0,s.Logger.logUpdate(e)}catch(t){yield(0,s.DelayFunctionExecution)(2e3,d());let n={message:"Cannot create local binary tree from index db",data:t,ok:!1,status:400};throw(0,c.ey)(e,"CreateLocalBinaryTreeFromIndexDb",t),n}})}function u(){return l(this,void 0,void 0,function*(){var e;const t=s.Logger.logfunction("PopulateTheLocalConceptsToMemory");try{yield null===(e=navigator.locks)||void 0===e?void 0:e.request("dblock",e=>l(this,void 0,void 0,function*(){let e=yield(0,a.S5)("localid");if(Array.isArray(e)){if(e[0]){let t=e[0].value;if(t)r.R.AddConceptId(e[0]),yield(0,a.kH)("localid",{id:0,value:t-10});else{t=-Math.floor(1e8*Math.random());let e={id:0,value:t},n={id:0,value:t-10};r.R.AddConceptId(e),yield(0,a.kH)("localid",n)}}e[2]}})),s.Logger.logUpdate(t)}catch(e){let n={message:"Cannot populate Local Ids from the Index Db",data:e,ok:!1,status:400};throw(0,c.ey)(t,"PopulateTheLocalConceptsToMemory",e),n}})}function h(){return l(this,void 0,void 0,function*(){var e;const t=s.Logger.logfunction("PopulateTheLocalConnectionToMemory");try{yield null===(e=navigator.locks)||void 0===e?void 0:e.request("dblock",e=>l(this,void 0,void 0,function*(){let e=yield(0,a.S5)("localid");if(Array.isArray(e)){if(e[1]){let t=e[1].value;if(t)r.R.AddConnectionId(e[1]),yield(0,a.kH)("localid",{id:1,value:t-10});else{t=-Math.floor(1e8*Math.random());let e={id:0,value:t},n={id:0,value:t-10};r.R.AddConnectionId(e),yield(0,a.kH)("localid",n)}}e[2]}})),s.Logger.logUpdate(t)}catch(e){let n={message:"Cannot populate Local Ids from the Index Db",data:e,ok:!1,status:400};throw(0,c.ey)(t,"PopulateTheLocalConnectionToMemory",e),n}})}},3077:(e,t,n)=>{n.d(t,{A:()=>l});var o=n(8957),i=n(2615),r=n(9736),a=n(5257),s=n(9700),c=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function l(e,t,n,l,d,u){return c(this,arguments,void 0,function*(e,t,n,c,l,d,u=!1,h=0,p={concepts:[],connections:[]}){var f,m,y,v;let g=performance.now();try{if(o.serviceWorker)try{const i=yield(0,o.sendMessage)("CreateTheConceptLocal",{referent:e,typecharacter:t,userId:n,categoryId:c,typeId:l,accessId:d,isComposition:u,referentId:h});return(null===(m=null===(f=null==i?void 0:i.actions)||void 0===f?void 0:f.concepts)||void 0===m?void 0:m.length)&&(p.concepts=JSON.parse(JSON.stringify(i.actions.concepts))),(null===(v=null===(y=null==i?void 0:i.actions)||void 0===y?void 0:y.connections)||void 0===v?void 0:v.length)&&(p.connections=JSON.parse(JSON.stringify(i.actions.connections))),i.data}catch(e){(0,o.handleServiceWorkerException)(e)}let s=yield a.R.getConceptId(),g=!0,C=new Date,w=new Date;if("the"==e){return new i.j(1,999,5,5,h,e,d,g,C,w,t)}let T=new i.j(s,n,l,c,h,e,d,g,C,w,t);return T.isTemp=!0,T.isComposition=u,r.v.AddConcept(T),p.concepts.push(T),T}catch(o){throw s.V.logError(g,n,"create","unknown","unknown",500,void 0,"createTheConceptLocal",[e,t,n,c,l,d,u],void 0),o}})}},3130:(e,t,n)=>{n.d(t,{BG:()=>c,SL:()=>l,XZ:()=>s,ZJ:()=>r,iw:()=>a,pU:()=>d,y0:()=>i,yv:()=>o});const o=1,i=2,r=3,a=4,s=5,c=6,l=7,d=8},3152:(e,t,n)=>{let o=n(3614),i=n(7668),r=n(3303),{isClean:a,my:s}=n(4151);function c(e,t){let n=new e.constructor;for(let o in e){if(!Object.prototype.hasOwnProperty.call(e,o))continue;if("proxyCache"===o)continue;let i=e[o],r=typeof i;"parent"===o&&"object"===r?t&&(n[o]=t):"source"===o?n[o]=i:Array.isArray(i)?n[o]=i.map(e=>c(e,n)):("object"===r&&null!==i&&(i=c(i)),n[o]=i)}return n}function l(e,t){if(t&&void 0!==t.offset)return t.offset;let n=1,o=1,i=0;for(let r=0;r<e.length;r++){if(o===t.line&&n===t.column){i=r;break}"\n"===e[r]?(n=1,o+=1):n+=1}return i}class d{get proxyOf(){return this}constructor(e={}){this.raws={},this[a]=!1,this[s]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let n of e[t])"function"==typeof n.clone?this.append(n.clone()):this.append(n)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=c(this);for(let n in e)t[n]=e[n];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:n,start:o}=this.rangeBy(t);return this.source.input.error(e,{column:o.column,line:o.line},{column:n.column,line:n.line},t)}return new o(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,n)=>(e[t]===n||(e[t]=n,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markClean(){this[a]=!0}markDirty(){if(this[a]){this[a]=!1;let e=this;for(;e=e.parent;)e[a]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e={}){let t=this.source.start;if(e.index)t=this.positionInside(e.index);else if(e.word){let n="document"in this.source.input?this.source.input.document:this.source.input.css,o=n.slice(l(n,this.source.start),l(n,this.source.end)).indexOf(e.word);-1!==o&&(t=this.positionInside(o))}return t}positionInside(e){let t=this.source.start.column,n=this.source.start.line,o="document"in this.source.input?this.source.input.document:this.source.input.css,i=l(o,this.source.start),r=i+e;for(let e=i;e<r;e++)"\n"===o[e]?(t=1,n+=1):t+=1;return{column:t,line:n,offset:r}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e={}){let t="document"in this.source.input?this.source.input.document:this.source.input.css,n={column:this.source.start.column,line:this.source.start.line,offset:l(t,this.source.start)},o=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:"number"==typeof this.source.end.offset?this.source.end.offset:l(t,this.source.end)+1}:{column:n.column+1,line:n.line,offset:n.offset+1};if(e.word){let i=t.slice(l(t,this.source.start),l(t,this.source.end)).indexOf(e.word);-1!==i&&(n=this.positionInside(i),o=this.positionInside(i+e.word.length))}else e.start?n={column:e.start.column,line:e.start.line,offset:l(t,e.start)}:e.index&&(n=this.positionInside(e.index)),e.end?o={column:e.end.column,line:e.end.line,offset:l(t,e.end)}:"number"==typeof e.endIndex?o=this.positionInside(e.endIndex):e.index&&(o=this.positionInside(e.index+1));return(o.line<n.line||o.line===n.line&&o.column<=n.column)&&(o={column:n.column+1,line:n.line,offset:n.offset+1}),{end:o,start:n}}raw(e,t){return(new i).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,n=!1;for(let o of e)o===this?n=!0:n?(this.parent.insertAfter(t,o),t=o):this.parent.insertBefore(t,o);n||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let n={},o=null==t;t=t||new Map;let i=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e))continue;if("parent"===e||"proxyCache"===e)continue;let o=this[e];if(Array.isArray(o))n[e]=o.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof o&&o.toJSON)n[e]=o.toJSON(null,t);else if("source"===e){if(null==o)continue;let r=t.get(o.input);null==r&&(r=i,t.set(o.input,i),i++),n[e]={end:o.end,inputId:r,start:o.start}}else n[e]=o}return o&&(n.inputs=[...t.keys()].map(e=>e.toJSON())),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=r){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,n={}){let o={node:this};for(let e in n)o[e]=n[e];return e.warn(t,o)}}e.exports=d,d.default=d},3295:(e,t,n)=>{t.__esModule=!0,t.default=void 0;var o=r(n(8937)),i=n(9606);function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}var c=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n);var c,l,d,u=r.prototype;return u.qualifiedName=function(e){return this.namespace?this.namespaceString+"|"+e:e},u.valueToString=function(){return this.qualifiedName(e.prototype.valueToString.call(this))},c=r,(l=[{key:"namespace",get:function(){return this._namespace},set:function(e){if(!0===e||"*"===e||"&"===e)return this._namespace=e,void(this.raws&&delete this.raws.namespace);var t=(0,o.default)(e,{isIdentifier:!0});this._namespace=e,t!==e?((0,i.ensureObject)(this,"raws"),this.raws.namespace=t):this.raws&&delete this.raws.namespace}},{key:"ns",get:function(){return this._namespace},set:function(e){this.namespace=e}},{key:"namespaceString",get:function(){if(this.namespace){var e=this.stringifyProperty("namespace");return!0===e?"":e}return""}}])&&a(c.prototype,l),d&&a(c,d),Object.defineProperty(c,"prototype",{writable:!1}),r}(r(n(4646)).default);t.default=c,e.exports=t.default},3303:(e,t,n)=>{let o=n(7668);function i(e,t){new o(t).stringify(e)}e.exports=i,i.default=i},3438:(e,t,n)=>{let o=n(396),i=n(9371),r=n(5238),a=n(1106),s=n(3878),c=n(5644),l=n(1534);function d(e,t){if(Array.isArray(e))return e.map(e=>d(e));let{inputs:n,...u}=e;if(n){t=[];for(let e of n){let n={...e,__proto__:a.prototype};n.map&&(n.map={...n.map,__proto__:s.prototype}),t.push(n)}}if(u.nodes&&(u.nodes=e.nodes.map(e=>d(e,t))),u.source){let{inputId:e,...n}=u.source;u.source=n,null!=e&&(u.source.input=t[e])}if("root"===u.type)return new c(u);if("decl"===u.type)return new r(u);if("rule"===u.type)return new l(u);if("comment"===u.type)return new i(u);if("atrule"===u.type)return new o(u);throw new Error("Unknown node type: "+e.type)}e.exports=d,d.default=d},3518:(e,t,n)=>{n.d(t,{BZ:()=>s,Xr:()=>r,ab:()=>a});var o=n(4024),i=n(490);function r(e="application/json",t="application/json"){var n;let i={},r=null===(n=o.b.sessionId)||void 0===n?void 0:n.toString();return i=""!=o.b.BearerAccessToken?{"Content-Type":e,Authorization:"Bearer "+o.b.BearerAccessToken,Accept:t,"X-Session-id":r}:{"Content-Type":e,Accept:t,"X-Session-id":r},i}function a(e="application/json",t="",n="application/json"){var i;""==t&&(t=o.b.BearerAccessToken);let r={},a=null===(i=o.b.sessionId)||void 0===i?void 0:i.toString();return r=""!=t?{"Content-Type":e,Authorization:"Bearer "+t,Accept:n,"X-Session-id":a}:{"Content-Type":e,Accept:n,"X-Session-id":a},r}function s(){var e;let t=o.b.BearerAccessToken,n=null===(e=o.b.sessionId)||void 0===e?void 0:e.toString();if(""==t){let e=(0,i.s)();""!=e.token&&(o.b.BearerAccessToken=e.token,t=e.token)}let r=new Headers;return r.append("Authorization","Bearer "+t),r.append("X-Session-Id",n),r}},3604:(e,t,n)=>{let{dirname:o,relative:i,resolve:r,sep:a}=n(197),{SourceMapConsumer:s,SourceMapGenerator:c}=n(1866),{pathToFileURL:l}=n(2739),d=n(1106),u=Boolean(s&&c),h=Boolean(o&&r&&i&&a);e.exports=class{constructor(e,t,n,o){this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=o,this.originalCSS=o,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,n=this.toUrl(this.path(e.file)),i=e.root||o(e.file);!1===this.mapOpts.sourcesContent?(t=new s(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,n,this.toUrl(this.path(i)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&e.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),h&&u&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=c.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new c({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new c({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,n=1,o=1,i="<no source>",r={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(a,s,c)=>{if(this.css+=a,s&&"end"!==c&&(r.generated.line=n,r.generated.column=o-1,s.source&&s.source.start?(r.source=this.sourcePath(s),r.original.line=s.source.start.line,r.original.column=s.source.start.column-1,this.map.addMapping(r)):(r.source=i,r.original.line=1,r.original.column=0,this.map.addMapping(r))),t=a.match(/\n/g),t?(n+=t.length,e=a.lastIndexOf("\n"),o=a.length-e):o+=a.length,s&&"start"!==c){let e=s.parent||{raws:{}};("decl"===s.type||"atrule"===s.type&&!s.nodes)&&s===e.last&&!e.raws.semicolon||(s.source&&s.source.end?(r.source=this.sourcePath(s),r.original.line=s.source.end.line,r.original.column=s.source.end.column-1,r.generated.line=n,r.generated.column=o-2,this.map.addMapping(r)):(r.source=i,r.original.line=1,r.original.column=0,r.generated.line=n,r.generated.column=o-1,this.map.addMapping(r)))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(e=>e.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(e=>e.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(e=>e.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let n=this.opts.to?o(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(n=o(r(n,this.mapOpts.annotation)));let a=i(n,e);return this.memoizedPaths.set(e,a),a}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new d(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let n=t.source.input.from;if(n&&!e[n]){e[n]=!0;let o=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(o,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(l){let t=l(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===a&&(e=e.replace(/\\/g,"/"));let n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}}},3614:(e,t,n)=>{let o=n(8633),i=n(9746);class r extends Error{constructor(e,t,n,o,i,a){super(e),this.name="CssSyntaxError",this.reason=e,i&&(this.file=i),o&&(this.source=o),a&&(this.plugin=a),void 0!==t&&void 0!==n&&("number"==typeof t?(this.line=t,this.column=n):(this.line=t.line,this.column=t.column,this.endLine=n.line,this.endColumn=n.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=o.isColorSupported);let n=e=>e,r=e=>e,a=e=>e;if(e){let{bold:e,gray:t,red:s}=o.createColors(!0);r=t=>e(s(t)),n=e=>t(e),i&&(a=e=>i(e))}let s=t.split(/\r?\n/),c=Math.max(this.line-3,0),l=Math.min(this.line+2,s.length),d=String(l).length;return s.slice(c,l).map((e,t)=>{let o=c+1+t,i=" "+(" "+o).slice(-d)+" | ";if(o===this.line){if(e.length>160){let t=20,o=Math.max(0,this.column-t),s=Math.max(this.column+t,this.endColumn+t),c=e.slice(o,s),l=n(i.replace(/\d/g," "))+e.slice(0,Math.min(this.column-1,t-1)).replace(/[^\t]/g," ");return r(">")+n(i)+a(c)+"\n "+l+r("^")}let t=n(i.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+n(i)+a(e)+"\n "+t+r("^")}return" "+n(i)+a(e)}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}}e.exports=r,r.default=r},3631:(e,t,n)=>{t.__esModule=!0,t.default=void 0;var o,i=(o=n(4646))&&o.__esModule?o:{default:o},r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=a(t);if(n&&n.has(e))return n.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var s=i?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(o,r,s):o[r]=e[r]}o.default=e,n&&n.set(e,o);return o}(n(1581));function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(a=function(e){return e?n:t})(e)}function s(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function l(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}var u=function(e){var t,n;function o(t){var n;return(n=e.call(this,t)||this).nodes||(n.nodes=[]),n}n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,d(t,n);var i,a,c,u=o.prototype;return u.append=function(e){return e.parent=this,this.nodes.push(e),this},u.prepend=function(e){for(var t in e.parent=this,this.nodes.unshift(e),this.indexes)this.indexes[t]++;return this},u.at=function(e){return this.nodes[e]},u.index=function(e){return"number"==typeof e?e:this.nodes.indexOf(e)},u.removeChild=function(e){var t;for(var n in e=this.index(e),this.at(e).parent=void 0,this.nodes.splice(e,1),this.indexes)(t=this.indexes[n])>=e&&(this.indexes[n]=t-1);return this},u.removeAll=function(){for(var e,t=s(this.nodes);!(e=t()).done;){e.value.parent=void 0}return this.nodes=[],this},u.empty=function(){return this.removeAll()},u.insertAfter=function(e,t){var n;t.parent=this;for(var o,i=this.index(e),r=[],a=2;a<arguments.length;a++)r.push(arguments[a]);for(var s in(n=this.nodes).splice.apply(n,[i+1,0,t].concat(r)),t.parent=this,this.indexes)i<(o=this.indexes[s])&&(this.indexes[s]=o+arguments.length-1);return this},u.insertBefore=function(e,t){var n;t.parent=this;for(var o,i=this.index(e),r=[],a=2;a<arguments.length;a++)r.push(arguments[a]);for(var s in(n=this.nodes).splice.apply(n,[i,0,t].concat(r)),t.parent=this,this.indexes)(o=this.indexes[s])>=i&&(this.indexes[s]=o+arguments.length-1);return this},u._findChildAtPosition=function(e,t){var n=void 0;return this.each(function(o){if(o.atPosition){var i=o.atPosition(e,t);if(i)return n=i,!1}else if(o.isAtPosition(e,t))return n=o,!1}),n},u.atPosition=function(e,t){return this.isAtPosition(e,t)?this._findChildAtPosition(e,t)||this:void 0},u._inferEndPosition=function(){this.last&&this.last.source&&this.last.source.end&&(this.source=this.source||{},this.source.end=this.source.end||{},Object.assign(this.source.end,this.last.source.end))},u.each=function(e){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach++;var t=this.lastEach;if(this.indexes[t]=0,this.length){for(var n,o;this.indexes[t]<this.length&&(n=this.indexes[t],!1!==(o=e(this.at(n),n)));)this.indexes[t]+=1;return delete this.indexes[t],!1!==o&&void 0}},u.walk=function(e){return this.each(function(t,n){var o=e(t,n);if(!1!==o&&t.length&&(o=t.walk(e)),!1===o)return!1})},u.walkAttributes=function(e){var t=this;return this.walk(function(n){if(n.type===r.ATTRIBUTE)return e.call(t,n)})},u.walkClasses=function(e){var t=this;return this.walk(function(n){if(n.type===r.CLASS)return e.call(t,n)})},u.walkCombinators=function(e){var t=this;return this.walk(function(n){if(n.type===r.COMBINATOR)return e.call(t,n)})},u.walkComments=function(e){var t=this;return this.walk(function(n){if(n.type===r.COMMENT)return e.call(t,n)})},u.walkIds=function(e){var t=this;return this.walk(function(n){if(n.type===r.ID)return e.call(t,n)})},u.walkNesting=function(e){var t=this;return this.walk(function(n){if(n.type===r.NESTING)return e.call(t,n)})},u.walkPseudos=function(e){var t=this;return this.walk(function(n){if(n.type===r.PSEUDO)return e.call(t,n)})},u.walkTags=function(e){var t=this;return this.walk(function(n){if(n.type===r.TAG)return e.call(t,n)})},u.walkUniversals=function(e){var t=this;return this.walk(function(n){if(n.type===r.UNIVERSAL)return e.call(t,n)})},u.split=function(e){var t=this,n=[];return this.reduce(function(o,i,r){var a=e.call(t,i);return n.push(i),a?(o.push(n),n=[]):r===t.length-1&&o.push(n),o},[])},u.map=function(e){return this.nodes.map(e)},u.reduce=function(e,t){return this.nodes.reduce(e,t)},u.every=function(e){return this.nodes.every(e)},u.some=function(e){return this.nodes.some(e)},u.filter=function(e){return this.nodes.filter(e)},u.sort=function(e){return this.nodes.sort(e)},u.toString=function(){return this.map(String).join("")},i=o,(a=[{key:"first",get:function(){return this.at(0)}},{key:"last",get:function(){return this.at(this.length-1)}},{key:"length",get:function(){return this.nodes.length}}])&&l(i.prototype,a),c&&l(i,c),Object.defineProperty(i,"prototype",{writable:!1}),o}(i.default);t.default=u,e.exports=t.default},3655:(e,t,n)=>{n.d(t,{D3:()=>m,El:()=>f,b8:()=>p,kH:()=>h,qI:()=>u,wh:()=>y});var o=n(2299),i=n(9581),r=n(8957),a=n(1863),s=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};let c=10;class l{}let d=null;function u(e){const t=r.Logger.logfunction("openDatabase",[e,"indexdb"]);return l.db?(r.Logger.logUpdate(t),Promise.resolve(l.db)):d||(d=new Promise(function(e,n){let o=i.B.BASE_URL+"_FreeSchema"+i.B.BASE_APPLICATION;const s=indexedDB.open(o,c);s.onupgradeneeded=e=>{let t=e.target.result,n="concept",o="connection",i="settings";t.objectStoreNames.contains(n)&&t.deleteObjectStore(n),t.objectStoreNames.contains(o)&&t.deleteObjectStore(o),t.objectStoreNames.contains(i)&&t.deleteObjectStore(i),t.createObjectStore(n,{keyPath:"id"}),t.createObjectStore(o,{keyPath:"id"}),t.createObjectStore(i,{keyPath:"id"})},s.onsuccess=function(n){let o=n.target;l.db=o.result,r.Logger.logUpdate(t),e(l.db)},s.onerror=e=>{d=null,(0,a.ey)(t,"openDatabase",e),n(e)}}),d)}function h(e,t){const n=r.Logger.logfunction("UpdateToDatabase",[e,"indexdb"]);return new Promise(function(o,i){u(e).then(s=>{const c=s.transaction(e,"readwrite").objectStore(e).put(t);c.onsuccess=e=>{r.Logger.logUpdate(n),o(t)},c.onerror=o=>{let r={status:400,ok:!1,message:"Cannot Update to the database"+e,data:o,body:t};(0,a.ey)(n,"UpdateToDatabase",r),i(r)}}).catch(e=>{let t={status:400,ok:!1,message:"Cannot update to database because you cannot open the database",data:e};(0,a.ey)(n,"UpdateToDatabase",t),i(t)})})}function p(){const e=r.Logger.logfunction("GetLastSettingsFromDatabase",["indexdb"]);return new Promise(function(t,n){let i="settings";u(i).then(s=>{let c=s.transaction(i,"readwrite").objectStore(i).getAll();c.onsuccess=()=>{let n=new o.B(!1),i=c.result;for(let e=0;e<i.length;e++)n=i[e];r.Logger.logUpdate(e),t(n)},c.onerror=t=>{(0,a.ey)(e,"GetLastSettingsFromDatabase",t),n(t)}}).catch(t=>{let o={status:400,ok:!1,message:"Cannot get last object from database because you cannot open the database",data:t};(0,a.ey)(e,"GetLastSettingsFromDatabase",o),n(o)})})}function f(e){const t=r.Logger.logfunction("AiUpdateFlag",["indexdb"]);return new Promise(function(n,o){let i="settings";u(i).then(s=>{const c=s.transaction(i,"readwrite").objectStore(i).put(e);c.onsuccess=o=>{r.Logger.logUpdate(t),n(e)},c.onerror=n=>{let i={status:400,ok:!1,message:"Cannot update AI flag",data:n,body:e};(0,a.ey)(t,"AiUpdateFlag",i),o(i)}}).catch(e=>{let n={status:400,ok:!1,message:"Cannot update AI flag because you cannot open the database",data:e};(0,a.ey)(t,"AiUpdateFlag",n),o(n)})})}function m(e){return s(this,void 0,void 0,function*(){const t=r.Logger.logfunction("getObjectsFromIndexDb",[e,"indexdb"]);return new Promise(function(n,o){u(e).then(o=>{let i=[],a=o.transaction(e,"readwrite").objectStore(e).getAll();a.onsuccess=()=>{const e=a.result;for(let t=0;t<e.length;t++)i.push(e[t]);r.Logger.logUpdate(t),n(i)}}).catch(e=>{let n={status:400,ok:!1,message:"Cannot get objects from the database because you cannot open the database",data:e};(0,a.ey)(t,"getObjectsFromIndexDb",n),o(n)})})})}function y(e,t){const n=r.Logger.logfunction("removeFromDatabase",[e,"indexdb"]);return new Promise(function(o,i){u(e).then(s=>{const c=s.transaction(e,"readwrite").objectStore(e).delete(Number(t));c.onsuccess=function(e){r.Logger.logUpdate(n),o(t)},c.onerror=t=>{let o={status:400,ok:!1,message:"Cannot remove from the database"+e,data:t};(0,a.ey)(n,"removeFromDatabase",o),i(o)}}).catch(e=>{let o={status:400,ok:!1,message:"Cannot remove from the database because you cannot open the database",data:e,body:t};(0,a.ey)(n,"removeFromDatabase",o),i(o)})})}},3717:(e,t,n)=>{let o=n(38);class i{get content(){return this.css}constructor(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css="",this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let n=new o(e,t);return this.messages.push(n),n}warnings(){return this.messages.filter(e=>"warning"===e.type)}}e.exports=i,i.default=i},3729:(e,t,n)=>{n.d(t,{D:()=>p});var o=n(9934),i=n(4485),r=n(2),a=n(7876),s=n(4818),c=n(999),l=n(5868),d=n(8957),u=n(176),h=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function p(e){return h(this,arguments,void 0,function*(e,t={concepts:[],connections:[]}){var n,h,p,f;performance.now();if(d.serviceWorker)try{const o=yield(0,d.sendMessage)("UpdateCompositionLocal",{patcherStructure:e,actions:t});return(null===(h=null===(n=null==o?void 0:o.actions)||void 0===n?void 0:n.concepts)||void 0===h?void 0:h.length)&&(t.concepts=JSON.parse(JSON.stringify(o.actions.concepts))),(null===(f=null===(p=null==o?void 0:o.actions)||void 0===p?void 0:p.connections)||void 0===f?void 0:f.length)&&(t.connections=JSON.parse(JSON.stringify(o.actions.connections))),o.data}catch(e){(0,d.handleServiceWorkerException)(e)}const m=e.userId,y=e.sessionId,v=e.accessId;let g=[];const C=[];let w=(0,d.CreateDefaultLConcept)(),T=(0,d.CreateDefaultLConcept)();const I=[],k=e.compositionId,b=e.ofTheCompositionId;let A=[];let S=yield(0,r.s)(k);for(let e=0;e<S.length;e++)g.push((0,u.P6)(S[e]));const L=[],N=[];let _=[];for(let e=0;e<g.length;e++)(0,o.A)(N,g[e].ofTheConceptId),(0,o.A)(L,g[e].ofTheConceptId),(0,o.A)(L,g[e].toTheConceptId),_.push(g[e].ofTheConceptId);for(let e=0;e<L.length;e++){const t=yield(0,a.A)(L[e]);k==L[e]&&(w=(0,u.F4)(t)),b==L[e]&&(T=(0,u.F4)(t)),C.push((0,u.F4)(t))}const x=e.patchObject;for(const e in x){let n=(0,d.CreateDefaultLConcept)();const o=x[e];let r=w;T.id>0&&(r=T),Array.isArray(o)||"object"==typeof o?(n=yield(0,l.k)(e,"",!0,w.userId,4,999,void 0,t),yield(0,c.R)(x[e],n.id,n.userId,w.id,w.userId,4,999,void 0,t)):n=yield(0,l.k)(e,o,!1,m,v,y,void 0,t);const a=(0,i.nm)(C,n);for(let e=0;e<a.length;e++)if(a[e].id>0){const t=(0,i.gt)(g,a[e].id);A=A.concat(t),I.push(a[e])}yield(0,d.CreateTheConnectionLocal)(r.id,n.id,w.id,2,void 0,void 0,t);C.push(n)}for(let e=0;e<A.length;e++)yield(0,s.m)(A[e].id);yield d.LocalSyncData.SyncDataOnline(void 0,t)})}},3878:(e,t,n)=>{let{existsSync:o,readFileSync:i}=n(9977),{dirname:r,join:a}=n(197),{SourceMapConsumer:s,SourceMapGenerator:c}=n(1866);class l{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let n=t.map?t.map.prev:void 0,o=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=r(this.mapFile)),o&&(this.text=o)}consumer(){return this.consumerCache||(this.consumerCache=new s(this.text)),this.consumerCache}decodeInline(e){let t=e.match(/^data:application\/json;charset=utf-?8,/)||e.match(/^data:application\/json,/);if(t)return decodeURIComponent(e.substr(t[0].length));let n=e.match(/^data:application\/json;charset=utf-?8;base64,/)||e.match(/^data:application\/json;base64,/);if(n)return o=e.substr(n[0].length),Buffer?Buffer.from(o,"base64").toString():window.atob(o);var o;let i=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+i)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/g);if(!t)return;let n=e.lastIndexOf(t.pop()),o=e.indexOf("*/",n);n>-1&&o>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,o)))}loadFile(e){if(this.root=r(e),o(e))return this.mapFile=e,i(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof s)return c.fromSourceMap(t).toString();if(t instanceof c)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let n=t(e);if(n){let e=this.loadFile(n);if(!e)throw new Error("Unable to load previous source map: "+n.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=a(r(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}e.exports=l,l.default=l},3996:(e,t,n)=>{n.d(t,{i:()=>o});class o{constructor(e,t,n,o){this.key="",this.value=[],this.height=1,this.key=e,this.value=t,this.leftNode=n,this.rightNode=o}getFromNode(e,t){return t?e==t.key?t:e<t.key?this.getFromNode(e,t.leftNode):e>t.key?this.getFromNode(e,t.rightNode):t:t}rightRotate(e){if(e){let t=e.leftNode;if(t){let n=t.rightNode;return e.leftNode=n,t.rightNode=e,e.height=Math.max(this.getHeight(e.leftNode),this.getHeight(e.rightNode))+1,t.height=Math.max(this.getHeight(t.leftNode),this.getHeight(t.rightNode))+1,t}}return e}leftRotate(e){if(e){let t=e.rightNode;if(t){let n=t.leftNode;return t.leftNode=e,e.rightNode=n,e.height=Math.max(this.getHeight(e.leftNode),this.getHeight(e.rightNode))+1,t.height=Math.max(this.getHeight(t.leftNode),this.getHeight(e.rightNode))+1,t}}return e}getHeight(e){return e?e.height:0}getBalanceFactor(e){return null==e?0:this.getHeight(e.leftNode)-this.getHeight(e.rightNode)}removeNode(e,t){if(null==e)return e;if(e.key>t)return e.leftNode=this.removeNode(e.leftNode,t),e;if(e.key<t)return e.rightNode=this.removeNode(e.rightNode,t),e;if(null==e.leftNode){let t=e.rightNode;return e=null,t}if(null==e.rightNode){let t=e.leftNode;return e=null,t}{let t=this.inOrderSuccessor(e.rightNode);return e.value=t.value,e.key=t.key,e.variants=t.variants,e.currentNode=t.currentNode,e.rightNode=this.removeNode(e.rightNode,t.key),e}}inOrderSuccessor(e){for(;null!=e.leftNode;)e=e.leftNode;return e}}},4024:(e,t,n)=>{n.d(t,{b:()=>u});var o=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};const i="ccs_profile",r="AES-GCM";function a(e){return o(this,void 0,void 0,function*(){const t=(new TextEncoder).encode("mftsccs-browser-v1"),n=yield crypto.subtle.importKey("raw",t.buffer,"PBKDF2",!1,["deriveKey"]);return crypto.subtle.deriveKey({name:"PBKDF2",salt:e.buffer,iterations:1e5,hash:"SHA-256"},n,{name:r,length:256},!1,["encrypt","decrypt"])})}function s(e){return o(this,void 0,void 0,function*(){const t=new TextEncoder,n=crypto.getRandomValues(new Uint8Array(16)),o=crypto.getRandomValues(new Uint8Array(12)),s=yield a(n),c=t.encode(JSON.stringify(e)),l=yield crypto.subtle.encrypt({name:r,iv:o.buffer},s,c.buffer),d=new Uint8Array(n.length+o.length+new Uint8Array(l).length);d.set(n,0),d.set(o,n.length),d.set(new Uint8Array(l),n.length+o.length);try{localStorage.setItem(i,function(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}(d))}catch(e){}})}function c(){return o(this,void 0,void 0,function*(){const e=localStorage.getItem(i);if(!e)return null;let t;try{if(t=function(e){const t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}(e),t.length<29)throw new Error("too short")}catch(e){return l(),null}try{const e=t.slice(0,16),n=t.slice(16,28),o=t.slice(28),i=yield a(e),s=yield crypto.subtle.decrypt({name:r,iv:n.buffer},i,o.buffer);return JSON.parse((new TextDecoder).decode(s))}catch(e){return l(),null}})}function l(){localStorage.removeItem(i)}var d=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class u{static setSession(e){e&&(u.sessionId=e)}static saveUserProfile(e){return d(this,void 0,void 0,function*(){var t,n,o,i,r,a,c,l,d,h,p,f,m,y,v,g,C;try{const w=null!==(t=null==e?void 0:e.data)&&void 0!==t?t:e,T=null!==(n=null==w?void 0:w.token)&&void 0!==n?n:"",I=null!==(i=null!==(o=null==w?void 0:w.refreshtoken)&&void 0!==o?o:null==w?void 0:w.refreshToken)&&void 0!==i?i:"";u.BearerAccessToken=T,u.refreshToken=I;const k={token:T,refreshToken:I,email:null!==(r=null==w?void 0:w.email)&&void 0!==r?r:"",userId:null!==(h=null!==(d=null!==(l=null===(c=null===(a=null==w?void 0:w.entity)||void 0===a?void 0:a[0])||void 0===c?void 0:c.userId)&&void 0!==l?l:null==w?void 0:w.userId)&&void 0!==d?d:null==w?void 0:w.theUserId)&&void 0!==h?h:0,userConcept:null!==(p=null==w?void 0:w.userConcept)&&void 0!==p?p:0,entityId:null!==(y=null!==(m=null===(f=null==w?void 0:w.entityDetails)||void 0===f?void 0:f.id)&&void 0!==m?m:null==w?void 0:w.entityId)&&void 0!==y?y:0,roles:null!==(v=null==w?void 0:w.roles)&&void 0!==v?v:[],amcode:null!==(g=null==w?void 0:w.amcode)&&void 0!==g?g:btoa(JSON.stringify(null!==(C=null==w?void 0:w.roles)&&void 0!==C?C:[]))};return u.profileCache=k,yield s(k),!0}catch(e){return!1}})}static hydrateProfile(){return d(this,void 0,void 0,function*(){var e,t;if(!u.profileCache){const n=yield c();n&&(u.profileCache=n,u.BearerAccessToken=null!==(e=n.token)&&void 0!==e?e:"",u.refreshToken=null!==(t=n.refreshToken)&&void 0!==t?t:"")}})}static logout(){u.BearerAccessToken="",u.refreshToken="",u.profileCache=null,l()}}u.BearerAccessToken="",u.refreshToken="",u.sessionId=998,u.profileCache=null},4151:e=>{e.exports.isClean=Symbol("isClean"),e.exports.my=Symbol("my")},4195:(e,t,n)=>{t.__esModule=!0,t.default=void 0;var o=s(n(8937)),i=n(9606),r=s(n(4646)),a=n(1581);function s(e){return e&&e.__esModule?e:{default:e}}function c(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}var d=function(e){var t,n,r,s,d;function u(t){var n;return(n=e.call(this,t)||this).type=a.CLASS,n._constructed=!0,n}return n=e,(t=u).prototype=Object.create(n.prototype),t.prototype.constructor=t,l(t,n),u.prototype.valueToString=function(){return"."+e.prototype.valueToString.call(this)},r=u,(s=[{key:"value",get:function(){return this._value},set:function(e){if(this._constructed){var t=(0,o.default)(e,{isIdentifier:!0});t!==e?((0,i.ensureObject)(this,"raws"),this.raws.value=t):this.raws&&delete this.raws.value}this._value=e}}])&&c(r.prototype,s),d&&c(r,d),Object.defineProperty(r,"prototype",{writable:!1}),u}(r.default);t.default=d,e.exports=t.default},4211:(e,t,n)=>{let o=n(3604),i=n(9577);const r=n(3717);let a=n(3303);n(6156);class s{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=i;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,t,n){let i;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=n,this._map=void 0;let s=a;this.result=new r(this._processor,i,this._opts),this.result.css=t;let c=this;Object.defineProperty(this.result,"root",{get:()=>c.root});let l=new o(s,i,this._opts,t);if(l.isMap()){let[e,t]=l.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else l.clearAnnotation(),this.result.css=l.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}}e.exports=s,s.default=s},4287:(e,t,n)=>{n.d(t,{w:()=>a});var o=n(8957),i=n(3130),r=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class a{constructor(){this.subscribers=[],this.mainConcept=0,this.compositionIds=[],this.conceptIds=[],this.internalConnections=[],this.reverse=[],this.linkers=[],this.newIds=[],this.dependency=[],this.isDataLoaded=!1,this.isUpdating=!1,this.fetched=!1,this.format=i.yv,this.eventHandlers={}}listenToEventType(e){if(this.eventHandlers[e])return;const t=e=>r(this,void 0,void 0,function*(){if(!this.isUpdating){this.isUpdating=!0;let t=this;setTimeout(function(){return r(this,void 0,void 0,function*(){try{let n=e;if(!t.compositionIds.includes(null==n?void 0:n.detail)){t.compositionIds.unshift(null==n?void 0:n.detail),t.listenToEvent(null==n?void 0:n.detail);let e=null==n?void 0:n.detail,i=yield o.ConnectionData.GetConnectionByOfTheConceptAndType(e,e);for(let e=0;e<i.length;e++)yield o.ConnectionData.GetConnection(i[e]).then(e=>{e.typeId==t.mainConcept?t.internalConnections.includes(e.id)||t.internalConnections.push(e.id):t.linkers.includes(e.id)||t.linkers.push(e.id),t.conceptIds.includes(e.toTheConceptId)||t.conceptIds.push(e.toTheConceptId),t.compositionIds.includes(e.ofTheConceptId)||t.compositionIds.push(e.ofTheConceptId)})}t.isUpdating=!1,yield t.bind(),t.notify()}catch(e){throw t.isUpdating=!1,e}})},200)}});this.eventHandlers[e]=t,window.addEventListener(`${e}`,t)}listenToEvent(e){if(this.eventHandlers[e])return;const t=t=>r(this,void 0,void 0,function*(){if(!this.isUpdating){this.isUpdating=!0;let t=this;setTimeout(function(){return r(this,void 0,void 0,function*(){try{let n=yield o.ConnectionData.GetConnectionByOfTheConceptAndType(e,e);for(let e=0;e<n.length;e++)yield o.ConnectionData.GetConnection(n[e]).then(e=>{e.typeId==t.mainConcept?t.internalConnections.includes(e.id)||t.internalConnections.push(e.id):t.linkers.includes(e.id)||t.linkers.push(e.id),t.conceptIds.includes(e.toTheConceptId)||t.conceptIds.push(e.toTheConceptId),t.compositionIds.includes(e.ofTheConceptId)||(t.compositionIds.push(e.ofTheConceptId),t.newIds.includes(e.ofTheConceptId)||t.newIds.push(e.ofTheConceptId))});t.isUpdating=!1,yield t.bind(),t.notify()}catch(e){throw t.isUpdating=!1,e}})},200)}});this.eventHandlers[e]=t,window.addEventListener(`${e}`,t)}removeListenToEvent(e){const t=this.eventHandlers[e];t&&(window.removeEventListener(`${e}`,t),delete this.eventHandlers[e])}listenToEventConnectionType(e,t){const n=`${e}_type_${t}`;if(this.eventHandlers[n])return;const i=n=>r(this,void 0,void 0,function*(){if(!this.isUpdating){this.isUpdating=!0;let n=this;setTimeout(function(){return r(this,void 0,void 0,function*(){try{let i=yield o.ConnectionData.GetConnectionByOfTheConceptAndType(e,e);for(let e=0;e<i.length;e++)i[e].typeId==t&&(yield o.ConnectionData.GetConnection(i[e]).then(e=>{e.typeId==n.mainConcept?n.internalConnections.includes(e.id)||n.internalConnections.push(e.id):n.linkers.includes(e.id)||n.linkers.push(e.id),n.conceptIds.includes(e.toTheConceptId)||n.conceptIds.push(e.toTheConceptId),n.compositionIds.includes(e.ofTheConceptId)||n.compositionIds.push(e.ofTheConceptId)}));n.isUpdating=!1,yield n.bind(),n.notify()}catch(e){throw n.isUpdating=!1,e}})},200)}});this.eventHandlers[n]=i,window.addEventListener(`${e}`,i)}bind(){return r(this,void 0,void 0,function*(){})}run(){return r(this,void 0,void 0,function*(){})}update(){return r(this,void 0,void 0,function*(){this.isDataLoaded=!1,yield this.bind(),this.notify()})}subscribe(e,t){this.subscribers.push(e);const n=()=>this.unsubscribe(e),o=this.bind().then(()=>r(this,void 0,void 0,function*(){return yield e(this.data,this),{unsubscribe:n}})).catch(e=>{throw t&&t(e),e});return o.unsubscribe=n,o}execute(){return r(this,void 0,void 0,function*(){return yield this.run()})}unsubscribe(e){return this.subscribers=this.subscribers.filter(t=>t!=e),this.subscribers.length}notify(){this.subscribers.map(e=>{e(this.data,this)})}}},4310:(e,t,n)=>{n.d(t,{Cp:()=>y,ix:()=>C,ml:()=>g,qj:()=>v});var o=n(8957),i=n(3655),r=n(1596),a=n(4698),s=n(1863),c=n(1320),l=n(3518),d=n(785),u=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};const h=new Map,p=new Map,f=new Map;function m(e,t){o.BaseUrl.isPwa&&(()=>u(this,void 0,void 0,function*(){const n=new Set(t);for(const t of e){const e=yield o.ConnectionData.GetConnection(t);e&&(null==e?void 0:e.id)>0&&(n.add(e.ofTheConceptId),n.add(e.toTheConceptId),n.add(e.typeId),(0,i.kH)("connection",e))}for(const e of n)if(e>0){const t=yield o.ConceptsData.GetConcept(e);t&&t.id>0&&(0,i.kH)("concept",t)}}))().catch(()=>{})}function y(e){var t=arguments;return u(this,void 0,void 0,function*(){o.Logger.logfunction("BuildWidgetFromId",t);try{if(o.serviceWorker){return(yield(0,o.sendMessage)("BuildWidgetFromId",{id:e})).data}}catch(e){(0,o.handleServiceWorkerException)(e)}let n={};if(h.has(e))return h.get(e)||n;let i=(0,l.Xr)("application/json"),r=o.BaseUrl.getWidgetData()+"?id="+e;const p=d.i.getWidget(e);if(p){fetch(r,{method:"GET",headers:i}).then(t=>u(this,void 0,void 0,function*(){if(t.ok){const n=yield t.json();d.i.setWidget(e,n)}else(0,s.ry)(t)})).catch(()=>{});let t=(0,a.w)(p.countinfo),n=yield(0,c.e$)(p.linkers,p.conceptIds,p.mainCompositionIds,p.reverse,t,"DESC");return m(p.linkers,p.conceptIds),n}const f=(()=>u(this,void 0,void 0,function*(){try{const t=yield fetch(r,{method:"GET",headers:i});if(t.ok){let o=yield t.json();d.i.setWidget(e,o);let i=(0,a.w)(o.countinfo);return n=yield(0,c.e$)(o.linkers,o.conceptIds,o.mainCompositionIds,o.reverse,i,"DESC"),m(o.linkers,o.conceptIds),n}return(0,s.ry)(t),[]}catch(e){throw e}finally{h.delete(e)}}))();return h.set(e,f),f})}function v(e){var t=arguments;return u(this,void 0,void 0,function*(){o.Logger.logfunction("BuildWidgetFromIdForLatest",t);try{if(o.serviceWorker){return(yield(0,o.sendMessage)("BuildWidgetFromIdForLatest",{id:e})).data}}catch(e){(0,o.handleServiceWorkerException)(e)}let n={};if(p.has(e))return p.get(e)||n;let i=(0,l.Xr)("application/json");const h=d.i.getLatest(e);if(h){(()=>u(this,void 0,void 0,function*(){let t;try{let n=o.BaseUrl.getLatestWidgetData()+"?id="+e;t=yield fetch(n,{method:"GET",headers:i})}catch(n){t=yield(0,r.g)({method:"GET",headers:i},"?id="+e)}if(t.ok){const n=yield t.json();d.i.setLatest(e,n)}else(0,s.ry)(t)}))().catch(()=>{});let t=(0,a.w)(h.countinfo),n=yield(0,c.e$)(h.linkers,h.conceptIds,h.mainCompositionIds,h.reverse,t,"DESC");return m(h.linkers,h.conceptIds),{data:n,mainId:h.mainId}}const f=(()=>u(this,void 0,void 0,function*(){try{let t;try{let n=o.BaseUrl.getLatestWidgetData()+"?id="+e;t=yield fetch(n,{method:"GET",headers:i})}catch(n){t=yield(0,r.g)({method:"GET",headers:i},"?id="+e)}if(t.ok){let o=yield t.json();d.i.setLatest(e,o);let i=(0,a.w)(o.countinfo);return n=yield(0,c.e$)(o.linkers,o.conceptIds,o.mainCompositionIds,o.reverse,i,"DESC"),m(o.linkers,o.conceptIds),{data:n,mainId:o.mainId}}return(0,s.ry)(t),[]}catch(e){throw e}finally{p.delete(e)}}))();return p.set(e,f),f})}function g(e){var t=arguments;return u(this,void 0,void 0,function*(){o.Logger.logfunction("BuildWidgetFromIdForRecent",t);try{if(o.serviceWorker){return(yield(0,o.sendMessage)("BuildWidgetFromIdForRecent",{id:e})).data}}catch(e){(0,o.handleServiceWorkerException)(e)}let n={};if(f.has(e))return f.get(e)||n;let i=(0,l.Xr)("application/json");const h=d.i.getRecent(e);if(h){(()=>u(this,void 0,void 0,function*(){let t;try{let n=o.BaseUrl.getRecentWidgetData()+"?id="+e;t=yield fetch(n,{method:"GET",headers:i})}catch(n){t=yield(0,r.g)({method:"GET",headers:i},"?id="+e)}if(t.ok){const n=yield t.json();d.i.setRecent(e,n)}else(0,s.ry)(t)}))().catch(()=>{});let t=(0,a.w)(h.countinfo),n=yield(0,c.e$)(h.linkers,h.conceptIds,h.mainCompositionIds,h.reverse,t,"DESC");return m(h.linkers,h.conceptIds),{data:n,mainId:h.mainId}}const p=(()=>u(this,void 0,void 0,function*(){try{let t;try{let n=o.BaseUrl.getRecentWidgetData()+"?id="+e;t=yield fetch(n,{method:"GET",headers:i})}catch(n){t=yield(0,r.g)({method:"GET",headers:i},"?id="+e)}if(t.ok){let o=yield t.json();d.i.setRecent(e,o);let i=(0,a.w)(o.countinfo);return n=yield(0,c.e$)(o.linkers,o.conceptIds,o.mainCompositionIds,o.reverse,i,"DESC"),m(o.linkers,o.conceptIds),{data:n,mainId:o.mainId}}return(0,s.ry)(t),[]}catch(e){throw e}finally{f.delete(e)}}))();return f.set(e,p),p})}function C(e,t){for(let n=0;n<e.length;n++)if(e[n].id==t)return e[n]}},4364:(e,t,n)=>{n.d(t,{s:()=>a});var o=n(1239),i=n(8957),r=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function a(){return r(this,arguments,void 0,function*(e=[]){const t=i.Logger.logfunction("FindConceptsFromConnections",[e.length]);let n=[];if(e.length>0){for(let t=0;t<e.length;t++)n.includes(e[t].ofTheConceptId)||n.push(e[t].ofTheConceptId),n.includes(e[t].toTheConceptId)||n.push(e[t].toTheConceptId),n.includes(e[t].typeId)||n.push(e[t].typeId);yield(0,o.r)(n)}i.Logger.logUpdate(t)})}},4402:(e,t,n)=>{n.d(t,{A:()=>d});var o=n(3026),i=n(9581),r=n(3518),a=n(1863),s=n(8957),c=n(7876),l=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function d(e,t){var n=arguments;return l(this,void 0,void 0,function*(){const l=s.Logger.logfunction("GetConceptByCharacterAndType",n);try{if(s.serviceWorker)try{return(yield(0,s.sendMessage)("GetConceptByCharacterAndType",{characterValue:e,typeId:t})).data}catch(e){(0,s.handleServiceWorkerException)(e)}let n=yield o.I.GetConceptByCharacterAndTypeLocal(e,t);if(null==n||0==n.id){var d={character_value:`${e}`,type_id:t},u=JSON.stringify(d),h=(0,r.Xr)();const s=yield fetch(i.B.GetConceptByCharacterAndTypeUrl(),{method:"POST",headers:h,body:u});if(s.ok){let e=yield s.json();n=e,(0,c.K)(n).then(e=>{o.I.AddConcept(n)})}else(0,a.ry)(s)}return s.Logger.logUpdate(l),n}catch(e){Error,(0,a.Mb)(e,i.B.GetConceptByCharacterAndTypeUrl()),(0,a.ey)(l,"GetConceptByCharacterAndType",e)}})}},4451:(e,t,n)=>{t.__esModule=!0,t.universal=t.tag=t.string=t.selector=t.root=t.pseudo=t.nesting=t.id=t.comment=t.combinator=t.className=t.attribute=void 0;var o=m(n(5588)),i=m(n(4195)),r=m(n(1704)),a=m(n(425)),s=m(n(7071)),c=m(n(2918)),l=m(n(7324)),d=m(n(518)),u=m(n(339)),h=m(n(5799)),p=m(n(9720)),f=m(n(1669));function m(e){return e&&e.__esModule?e:{default:e}}t.attribute=function(e){return new o.default(e)};t.className=function(e){return new i.default(e)};t.combinator=function(e){return new r.default(e)};t.comment=function(e){return new a.default(e)};t.id=function(e){return new s.default(e)};t.nesting=function(e){return new c.default(e)};t.pseudo=function(e){return new l.default(e)};t.root=function(e){return new d.default(e)};t.selector=function(e){return new u.default(e)};t.string=function(e){return new h.default(e)};t.tag=function(e){return new p.default(e)};t.universal=function(e){return new f.default(e)}},4485:(e,t,n)=>{n.d(t,{gt:()=>a,nm:()=>i,vo:()=>o,wS:()=>r});n(2155),n(7282);function o(e=[],t){var n,o;let i=[],r=null===(n=t.type)||void 0===n?void 0:n.characterValue;if((null==r?void 0:r.startsWith("the_"))||(r="the_"+r),Array.isArray(e))for(let n=0;n<e.length;n++){let a=null===(o=e[n].type)||void 0===o?void 0:o.characterValue;(null==a?void 0:a.startsWith("the_"))||(a="the_"+a),t.typeId!=e[n].typeId&&r!=a||i.push(e[n])}return i}function i(e=[],t){let n=[],o=t.typeCharacter;if((null==o?void 0:o.startsWith("the_"))||(o="the_"+o),Array.isArray(e))for(let i=0;i<e.length;i++){let r=e[i].typeCharacter;(null==r?void 0:r.startsWith("the_"))||(r="the_"+r),t.typeId!=e[i].typeId&&o!=r||n.push(e[i])}return n}function r(e=[],t){let n=[];if(Array.isArray(e)){const o=e.find(e=>e.toTheConceptId==t);o&&n.push(o);const i=e.find(e=>e.ofTheConceptId==t);i&&n.push(i)}return n}function a(e=[],t){let n=[];if(Array.isArray(e)){const o=e.find(e=>e.toTheConceptId==t);o&&n.push(o);const i=e.find(e=>e.ofTheConceptId==t);i&&n.push(i)}return n}},4643:(e,t,n)=>{function o(e){try{if(!n.g.localStorage)return!1}catch(e){return!1}var t=n.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}e.exports=function(e,t){if(o("noDeprecation"))return e;var n=!1;return function(){if(!n){if(o("throwDeprecation"))throw new Error(t);o("traceDeprecation"),n=!0}return e.apply(this,arguments)}}},4646:(e,t,n)=>{t.__esModule=!0,t.default=void 0;var o=n(9606);function i(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var r=function e(t,n){if("object"!=typeof t||null===t)return t;var o=new t.constructor;for(var i in t)if(t.hasOwnProperty(i)){var r=t[i];"parent"===i&&"object"===typeof r?n&&(o[i]=n):o[i]=r instanceof Array?r.map(function(t){return e(t,o)}):e(r,o)}return o},a=function(){function e(e){void 0===e&&(e={}),Object.assign(this,e),this.spaces=this.spaces||{},this.spaces.before=this.spaces.before||"",this.spaces.after=this.spaces.after||""}var t,n,a,s=e.prototype;return s.remove=function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this},s.replaceWith=function(){if(this.parent){for(var e in arguments)this.parent.insertBefore(this,arguments[e]);this.remove()}return this},s.next=function(){return this.parent.at(this.parent.index(this)+1)},s.prev=function(){return this.parent.at(this.parent.index(this)-1)},s.clone=function(e){void 0===e&&(e={});var t=r(this);for(var n in e)t[n]=e[n];return t},s.appendToPropertyAndEscape=function(e,t,n){this.raws||(this.raws={});var o=this[e],i=this.raws[e];this[e]=o+t,i||n!==t?this.raws[e]=(i||o)+n:delete this.raws[e]},s.setPropertyAndEscape=function(e,t,n){this.raws||(this.raws={}),this[e]=t,this.raws[e]=n},s.setPropertyWithoutEscape=function(e,t){this[e]=t,this.raws&&delete this.raws[e]},s.isAtPosition=function(e,t){if(this.source&&this.source.start&&this.source.end)return!(this.source.start.line>e)&&(!(this.source.end.line<e)&&(!(this.source.start.line===e&&this.source.start.column>t)&&!(this.source.end.line===e&&this.source.end.column<t)))},s.stringifyProperty=function(e){return this.raws&&this.raws[e]||this[e]},s.valueToString=function(){return String(this.stringifyProperty("value"))},s.toString=function(){return[this.rawSpaceBefore,this.valueToString(),this.rawSpaceAfter].join("")},t=e,(n=[{key:"rawSpaceBefore",get:function(){var e=this.raws&&this.raws.spaces&&this.raws.spaces.before;return void 0===e&&(e=this.spaces&&this.spaces.before),e||""},set:function(e){(0,o.ensureObject)(this,"raws","spaces"),this.raws.spaces.before=e}},{key:"rawSpaceAfter",get:function(){var e=this.raws&&this.raws.spaces&&this.raws.spaces.after;return void 0===e&&(e=this.spaces.after),e||""},set:function(e){(0,o.ensureObject)(this,"raws","spaces"),this.raws.spaces.after=e}}])&&i(t.prototype,n),a&&i(t,a),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=a,e.exports=t.default},4698:(e,t,n)=>{n.d(t,{V:()=>c,w:()=>s});var o=n(7139),i=n(8957),r=n(276),a=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function s(e=[]){let t=[];if(e.length>0)for(let n=0;n<e.length;n++){let o=l(e[n]);t.push(o)}return t}function c(e){var t=arguments;return a(this,void 0,void 0,function*(){const n=i.Logger.logfunction("GetConnectionTypeForCount",t);let r={};for(let t=0;t<e.length;t++){let n=yield(0,o.r)(e[t].connectionTypeId);e[t].connectionType=n.characterValue,r[e[t].conceptId]=e[t]}return i.Logger.logUpdate(n),r})}function l(e){const t=e.split("_");if(3===t.length){let e=new r.y;return e.conceptId=Number(t[0]),e.connectionTypeId=Number(t[1]),e.count=Number(t[2]),e}throw new Error("Input string must contain exactly three parts separated by underscores.")}},4711:(e,t,n)=>{n.d(t,{F:()=>l,d:()=>d});var o=n(2155),i=n(4864),r=n(5257),a=n(9700),s=n(8957),c=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function l(e,t,n){return c(this,arguments,void 0,function*(e,t,n,c=1,l="",d=999,u={concepts:[],connections:[]}){var h,p,f,m;let y=performance.now();if(s.serviceWorker)try{const o=yield(0,s.sendMessage)("CreateTheConnectionLocal",{ofTheConceptId:e,toTheConceptId:t,typeId:n,orderId:c,typeString:l,userId:d,actions:u});return(null===(p=null===(h=null==o?void 0:o.actions)||void 0===h?void 0:h.concepts)||void 0===p?void 0:p.length)&&(u.concepts=JSON.parse(JSON.stringify(o.actions.concepts))),(null===(m=null===(f=null==o?void 0:o.actions)||void 0===f?void 0:f.connections)||void 0===m?void 0:m.length)&&(u.connections=JSON.parse(JSON.stringify(o.actions.connections))),o.data}catch(e){(0,s.handleServiceWorkerException)(e)}try{let a=4,h=yield r.R.getConnectionId(),p=0,f=0,m=0;p=e,f=t,m=n;let y=new o.N(0,0,0,0,0,0,0);return e!=t&&(y=new o.N(h,p,f,d,n,c,a),y.isTemp=!0,y.typeCharacter=l,s.LocalSyncData.AddConnection(y),i.G.AddConnection(y),u.connections.push(y)),y}catch(o){throw a.V.logError(y,d,"create","Unknown","Unknown",500,void 0,"CreateTheConnectionLocal",[e,t,n,c,l,d],"UnknownUserAgent",[]),o}})}function d(e,t,n){return c(this,arguments,void 0,function*(e,t,n,o={concepts:[],connections:[]}){var i,r,a,c;if(s.serviceWorker)try{const l=yield(0,s.sendMessage)("CreateConnection",{ofTheConcept:e,toTheConcept:t,connectionTypeString:n,actions:o});return(null===(r=null===(i=null==l?void 0:l.actions)||void 0===i?void 0:i.concepts)||void 0===r?void 0:r.length)&&(o.concepts=JSON.parse(JSON.stringify(l.actions.concepts))),(null===(c=null===(a=null==l?void 0:l.actions)||void 0===a?void 0:a.connections)||void 0===c?void 0:c.length)&&(o.connections=JSON.parse(JSON.stringify(l.actions.connections))),l.data}catch(e){(0,s.handleServiceWorkerException)(e)}let d=yield(0,s.MakeTheTypeConceptLocal)(n,999,999,999),u=e.userId;return yield l(e.id,t.id,d.id,1e3,n,u,o)})}},4818:(e,t,n)=>{n.d(t,{m:()=>h,E:()=>p});var o=n(8957),i=n(1863),r=n(3518),a=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};var s=n(9581),c=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};var l=n(5239),d=n(4864),u=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function h(e){var t=arguments;return u(this,void 0,void 0,function*(){const n=o.Logger.logfunction("DeleteConnectionById",t);if(o.serviceWorker)try{return(yield(0,o.sendMessage)("DeleteConnectionById",{id:e})).data}catch(e){(0,o.handleServiceWorkerException)(e)}let a=!0;return e>0?(a=yield function(e){var t=arguments;return c(this,void 0,void 0,function*(){const n=o.Logger.logfunction("DeleteTheConnection",t);let a=!1;try{const t=new FormData;t.append("id",e.toString());let c=(0,r.BZ)();const l=yield fetch(s.B.DeleteTheConnectionUrl(),{method:"POST",headers:c,body:t,redirect:"follow"});o.Logger.logUpdate(n),l.ok?a=(yield l.json()).success:(0,i.ry)(l),a&&o.ConnectionData.AddNpConn(e)}catch(e){Error,(0,i.Mb)(e,s.B.DeleteTheConnectionUrl()),(0,i.ey)(n,"DeleteTheConnection",e)}return a})}(e),l.O.removeNodeFromTree(e)):d.G.RemoveConnectionById(e),o.Logger.logUpdate(n),a})}function p(e){var t=arguments;return u(this,void 0,void 0,function*(){const n=o.Logger.logfunction("DeleteConnectionByIdBulk",t);if(o.serviceWorker)try{return(yield(0,o.sendMessage)("DeleteConnectionByIdBulk",{ids:e})).data}catch(e){(0,o.handleServiceWorkerException)(e)}let s=yield function(e){var t=arguments;return a(this,void 0,void 0,function*(){const n=o.Logger.logfunction("DeleteTheConnectionBulkApi",t);let a=!1;try{let t=(0,r.BZ)();t.append("Content-Type","application/json");const s=yield fetch(o.BaseUrl.DeleteTheConnectionBulkUrl(),{method:"POST",headers:t,body:JSON.stringify(e)});if(o.Logger.logUpdate(n),s.ok?a=(yield s.json()).success:(0,i.ry)(s),a)for(let t=0;t<e.length;t++){let n=e[t];o.ConnectionData.AddNpConn(n)}}catch(e){Error,(0,i.Mb)(e,o.BaseUrl.DeleteTheConnectionUrl()),(0,i.ey)(n,"DeleteTheConnectionBulkApi",e)}return a})}(e);if(s)for(let t=0;t<e.length;t++){let n=e[t];n>0?l.O.removeNodeFromTree(n):d.G.RemoveConnectionById(n)}return o.Logger.logUpdate(n),s})}},4864:(e,t,n)=>{n.d(t,{G:()=>c});var o=n(2155);var i=n(8286),r=n(205),a=n(628),s=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class c{constructor(){this.name="Connection Array"}static CheckContains(e){for(var t=!1,n=0;n<this.connectionArray.length;n++)this.connectionArray[n].id==e.id&&(t=!0);return t}static AddConnection(e){this.CheckContains(e)&&this.RemoveConnection(e),e.id,this.connectionArray.push(e)}static AddConnectionToMemory(e){this.CheckContains(e)&&this.RemoveConnection(e),this.connectionArray.push(e)}static AddToDictionary(e){this.connectionDictionary[e.id]=e}static RemoveConnection(e){for(var t=0;t<this.connectionArray.length;t++)this.connectionArray[t].id==e.id&&this.connectionArray.splice(t,1);e.id}static RemoveConnectionById(e){for(var t=0;t<this.connectionArray.length;t++)this.connectionArray[t].id==e&&this.connectionArray.splice(t,1);a.H.RemoveConnectionById(e)}static AddPermanentConnection(e){e.id>0&&i.d.AddConnection(function(e){let t=new o.N(0,0,0,0,0,0,0);return t.ofTheConceptId=e.ofTheConceptId,t.toTheConceptId=e.toTheConceptId,t.typeId=e.typeId,t.orderId=e.orderId,t.id=e.id,t}(e))}static GetConnection(e){var t;t=null;for(var n=0;n<this.connectionArray.length;n++)this.connectionArray[n].id==e&&(t=this.connectionArray[n]);return t}static waitForDataToLoad(){return s(this,void 0,void 0,function*(){return new Promise((e,t)=>{this.checkFlag(e),setTimeout(()=>{t("not")},25e3)})})}static checkFlag(e){if(r.B.isLocalConnectionLoaded)return e("done");setTimeout(c.checkFlag,1e3,e)}static GetConnectionsOfCompositionLocal(e){return s(this,void 0,void 0,function*(){var t=[];try{for(var n=0;n<this.connectionArray.length;n++)this.connectionArray[n].typeId==e&&t.push(this.connectionArray[n]);return t}catch(e){return t}})}static GetConnectionOfCompositionAndTypeLocal(e,t){return s(this,void 0,void 0,function*(){var n=[];try{for(var o=0;o<this.connectionArray.length;o++)this.connectionArray[o].typeId==e&&this.connectionArray[o].ofTheConceptId==t&&n.push(this.connectionArray[o]);return n}catch(e){return n}})}getName(){return this.name}}c.connectionArray=[],c.connectionDictionary=[]},5020:(e,t,n)=>{n.d(t,{A:()=>u});var o=n(8957),i=n(3655),r=n(9581),a=n(3026),s=n(205),c=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};const l=500;function d(){return new Promise(e=>setTimeout(e,0))}function u(){return c(this,void 0,void 0,function*(){try{let e=[];if(r.B.isPwa&&(e=yield(0,i.D3)("concept")),Array.isArray(e))for(let t=0;t<e.length;t++)a.I.AddConceptToMemory(e[t]),t>0&&t%l===0&&(yield d());s.B.isDataLoaded=!0,s.B.isCharacterLoaded=!0,s.B.isTypeLoaded=!0}catch(e){throw yield(0,o.DelayFunctionExecution)(2e3,u()),{message:"Cannot create Binary Tree Concept",ok:!1,status:400,data:e}}})}},5042:e=>{e.exports={nanoid:(e=21)=>{let t="",n=0|e;for(;n--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(n=t)=>{let o="",i=0|n;for(;i--;)o+=e[Math.random()*e.length|0];return o}}},5170:(e,t,n)=>{t.__esModule=!0,t.default=void 0;var o,i,r=b(n(518)),a=b(n(339)),s=b(n(4195)),c=b(n(425)),l=b(n(7071)),d=b(n(9720)),u=b(n(5799)),h=b(n(7324)),p=k(n(5588)),f=b(n(1669)),m=b(n(1704)),y=b(n(2918)),v=b(n(263)),g=k(n(2648)),C=k(n(71)),w=k(n(1581)),T=n(9606);function I(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(I=function(e){return e?n:t})(e)}function k(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=I(t);if(n&&n.has(e))return n.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var a=i?Object.getOwnPropertyDescriptor(e,r):null;a&&(a.get||a.set)?Object.defineProperty(o,r,a):o[r]=e[r]}return o.default=e,n&&n.set(e,o),o}function b(e){return e&&e.__esModule?e:{default:e}}function A(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var S=((o={})[C.space]=!0,o[C.cr]=!0,o[C.feed]=!0,o[C.newline]=!0,o[C.tab]=!0,o),L=Object.assign({},S,((i={})[C.comment]=!0,i));function N(e){return{line:e[g.FIELDS.START_LINE],column:e[g.FIELDS.START_COL]}}function _(e){return{line:e[g.FIELDS.END_LINE],column:e[g.FIELDS.END_COL]}}function x(e,t,n,o){return{start:{line:e,column:t},end:{line:n,column:o}}}function D(e){return x(e[g.FIELDS.START_LINE],e[g.FIELDS.START_COL],e[g.FIELDS.END_LINE],e[g.FIELDS.END_COL])}function P(e,t){if(e)return x(e[g.FIELDS.START_LINE],e[g.FIELDS.START_COL],t[g.FIELDS.END_LINE],t[g.FIELDS.END_COL])}function E(e,t){var n=e[t];if("string"==typeof n)return-1!==n.indexOf("\\")&&((0,T.ensureObject)(e,"raws"),e[t]=(0,T.unesc)(n),void 0===e.raws[t]&&(e.raws[t]=n)),e}function R(e,t){for(var n=-1,o=[];-1!==(n=e.indexOf(t,n+1));)o.push(n);return o}var O=function(){function e(e,t){void 0===t&&(t={}),this.rule=e,this.options=Object.assign({lossy:!1,safe:!1},t),this.position=0,this.css="string"==typeof this.rule?this.rule:this.rule.selector,this.tokens=(0,g.default)({css:this.css,error:this._errorGenerator(),safe:this.options.safe});var n=P(this.tokens[0],this.tokens[this.tokens.length-1]);this.root=new r.default({source:n}),this.root.errorGenerator=this._errorGenerator();var o=new a.default({source:{start:{line:1,column:1}},sourceIndex:0});this.root.append(o),this.current=o,this.loop()}var t,n,o,i=e.prototype;return i._errorGenerator=function(){var e=this;return function(t,n){return"string"==typeof e.rule?new Error(t):e.rule.error(t,n)}},i.attribute=function(){var e=[],t=this.currToken;for(this.position++;this.position<this.tokens.length&&this.currToken[g.FIELDS.TYPE]!==C.closeSquare;)e.push(this.currToken),this.position++;if(this.currToken[g.FIELDS.TYPE]!==C.closeSquare)return this.expected("closing square bracket",this.currToken[g.FIELDS.START_POS]);var n=e.length,o={source:x(t[1],t[2],this.currToken[3],this.currToken[4]),sourceIndex:t[g.FIELDS.START_POS]};if(1===n&&!~[C.word].indexOf(e[0][g.FIELDS.TYPE]))return this.expected("attribute",e[0][g.FIELDS.START_POS]);for(var i=0,r="",a="",s=null,c=!1;i<n;){var l=e[i],d=this.content(l),u=e[i+1];switch(l[g.FIELDS.TYPE]){case C.space:if(c=!0,this.options.lossy)break;if(s){(0,T.ensureObject)(o,"spaces",s);var h=o.spaces[s].after||"";o.spaces[s].after=h+d;var f=(0,T.getProp)(o,"raws","spaces",s,"after")||null;f&&(o.raws.spaces[s].after=f+d)}else r+=d,a+=d;break;case C.asterisk:if(u[g.FIELDS.TYPE]===C.equals)o.operator=d,s="operator";else if((!o.namespace||"namespace"===s&&!c)&&u){r&&((0,T.ensureObject)(o,"spaces","attribute"),o.spaces.attribute.before=r,r=""),a&&((0,T.ensureObject)(o,"raws","spaces","attribute"),o.raws.spaces.attribute.before=r,a=""),o.namespace=(o.namespace||"")+d,((0,T.getProp)(o,"raws","namespace")||null)&&(o.raws.namespace+=d),s="namespace"}c=!1;break;case C.dollar:if("value"===s){var m=(0,T.getProp)(o,"raws","value");o.value+="$",m&&(o.raws.value=m+"$");break}case C.caret:u[g.FIELDS.TYPE]===C.equals&&(o.operator=d,s="operator"),c=!1;break;case C.combinator:if("~"===d&&u[g.FIELDS.TYPE]===C.equals&&(o.operator=d,s="operator"),"|"!==d){c=!1;break}u[g.FIELDS.TYPE]===C.equals?(o.operator=d,s="operator"):o.namespace||o.attribute||(o.namespace=!0),c=!1;break;case C.word:if(u&&"|"===this.content(u)&&e[i+2]&&e[i+2][g.FIELDS.TYPE]!==C.equals&&!o.operator&&!o.namespace)o.namespace=d,s="namespace";else if(!o.attribute||"attribute"===s&&!c){r&&((0,T.ensureObject)(o,"spaces","attribute"),o.spaces.attribute.before=r,r=""),a&&((0,T.ensureObject)(o,"raws","spaces","attribute"),o.raws.spaces.attribute.before=a,a=""),o.attribute=(o.attribute||"")+d,((0,T.getProp)(o,"raws","attribute")||null)&&(o.raws.attribute+=d),s="attribute"}else if(!o.value&&""!==o.value||"value"===s&&!c&&!o.quoteMark){var y=(0,T.unesc)(d),v=(0,T.getProp)(o,"raws","value")||"",w=o.value||"";o.value=w+y,o.quoteMark=null,(y!==d||v)&&((0,T.ensureObject)(o,"raws"),o.raws.value=(v||w)+d),s="value"}else{var I="i"===d||"I"===d;!o.value&&""!==o.value||!o.quoteMark&&!c?(o.value||""===o.value)&&(s="value",o.value+=d,o.raws.value&&(o.raws.value+=d)):(o.insensitive=I,I&&"I"!==d||((0,T.ensureObject)(o,"raws"),o.raws.insensitiveFlag=d),s="insensitive",r&&((0,T.ensureObject)(o,"spaces","insensitive"),o.spaces.insensitive.before=r,r=""),a&&((0,T.ensureObject)(o,"raws","spaces","insensitive"),o.raws.spaces.insensitive.before=a,a=""))}c=!1;break;case C.str:if(!o.attribute||!o.operator)return this.error("Expected an attribute followed by an operator preceding the string.",{index:l[g.FIELDS.START_POS]});var k=(0,p.unescapeValue)(d),b=k.unescaped,A=k.quoteMark;o.value=b,o.quoteMark=A,s="value",(0,T.ensureObject)(o,"raws"),o.raws.value=d,c=!1;break;case C.equals:if(!o.attribute)return this.expected("attribute",l[g.FIELDS.START_POS],d);if(o.value)return this.error('Unexpected "=" found; an operator was already defined.',{index:l[g.FIELDS.START_POS]});o.operator=o.operator?o.operator+d:d,s="operator",c=!1;break;case C.comment:if(s)if(c||u&&u[g.FIELDS.TYPE]===C.space||"insensitive"===s){var S=(0,T.getProp)(o,"spaces",s,"after")||"",L=(0,T.getProp)(o,"raws","spaces",s,"after")||S;(0,T.ensureObject)(o,"raws","spaces",s),o.raws.spaces[s].after=L+d}else{var N=o[s]||"",_=(0,T.getProp)(o,"raws",s)||N;(0,T.ensureObject)(o,"raws"),o.raws[s]=_+d}else a+=d;break;default:return this.error('Unexpected "'+d+'" found.',{index:l[g.FIELDS.START_POS]})}i++}E(o,"attribute"),E(o,"namespace"),this.newNode(new p.default(o)),this.position++},i.parseWhitespaceEquivalentTokens=function(e){e<0&&(e=this.tokens.length);var t=this.position,n=[],o="",i=void 0;do{if(S[this.currToken[g.FIELDS.TYPE]])this.options.lossy||(o+=this.content());else if(this.currToken[g.FIELDS.TYPE]===C.comment){var r={};o&&(r.before=o,o=""),i=new c.default({value:this.content(),source:D(this.currToken),sourceIndex:this.currToken[g.FIELDS.START_POS],spaces:r}),n.push(i)}}while(++this.position<e);if(o)if(i)i.spaces.after=o;else if(!this.options.lossy){var a=this.tokens[t],s=this.tokens[this.position-1];n.push(new u.default({value:"",source:x(a[g.FIELDS.START_LINE],a[g.FIELDS.START_COL],s[g.FIELDS.END_LINE],s[g.FIELDS.END_COL]),sourceIndex:a[g.FIELDS.START_POS],spaces:{before:o,after:""}}))}return n},i.convertWhitespaceNodesToSpace=function(e,t){var n=this;void 0===t&&(t=!1);var o="",i="";return e.forEach(function(e){var r=n.lossySpace(e.spaces.before,t),a=n.lossySpace(e.rawSpaceBefore,t);o+=r+n.lossySpace(e.spaces.after,t&&0===r.length),i+=r+e.value+n.lossySpace(e.rawSpaceAfter,t&&0===a.length)}),i===o&&(i=void 0),{space:o,rawSpace:i}},i.isNamedCombinator=function(e){return void 0===e&&(e=this.position),this.tokens[e+0]&&this.tokens[e+0][g.FIELDS.TYPE]===C.slash&&this.tokens[e+1]&&this.tokens[e+1][g.FIELDS.TYPE]===C.word&&this.tokens[e+2]&&this.tokens[e+2][g.FIELDS.TYPE]===C.slash},i.namedCombinator=function(){if(this.isNamedCombinator()){var e=this.content(this.tokens[this.position+1]),t=(0,T.unesc)(e).toLowerCase(),n={};t!==e&&(n.value="/"+e+"/");var o=new m.default({value:"/"+t+"/",source:x(this.currToken[g.FIELDS.START_LINE],this.currToken[g.FIELDS.START_COL],this.tokens[this.position+2][g.FIELDS.END_LINE],this.tokens[this.position+2][g.FIELDS.END_COL]),sourceIndex:this.currToken[g.FIELDS.START_POS],raws:n});return this.position=this.position+3,o}this.unexpected()},i.combinator=function(){var e=this;if("|"===this.content())return this.namespace();var t=this.locateNextMeaningfulToken(this.position);if(!(t<0||this.tokens[t][g.FIELDS.TYPE]===C.comma||this.tokens[t][g.FIELDS.TYPE]===C.closeParenthesis)){var n,o=this.currToken,i=void 0;if(t>this.position&&(i=this.parseWhitespaceEquivalentTokens(t)),this.isNamedCombinator()?n=this.namedCombinator():this.currToken[g.FIELDS.TYPE]===C.combinator?(n=new m.default({value:this.content(),source:D(this.currToken),sourceIndex:this.currToken[g.FIELDS.START_POS]}),this.position++):S[this.currToken[g.FIELDS.TYPE]]||i||this.unexpected(),n){if(i){var r=this.convertWhitespaceNodesToSpace(i),a=r.space,s=r.rawSpace;n.spaces.before=a,n.rawSpaceBefore=s}}else{var c=this.convertWhitespaceNodesToSpace(i,!0),l=c.space,d=c.rawSpace;d||(d=l);var u={},h={spaces:{}};l.endsWith(" ")&&d.endsWith(" ")?(u.before=l.slice(0,l.length-1),h.spaces.before=d.slice(0,d.length-1)):l.startsWith(" ")&&d.startsWith(" ")?(u.after=l.slice(1),h.spaces.after=d.slice(1)):h.value=d,n=new m.default({value:" ",source:P(o,this.tokens[this.position-1]),sourceIndex:o[g.FIELDS.START_POS],spaces:u,raws:h})}return this.currToken&&this.currToken[g.FIELDS.TYPE]===C.space&&(n.spaces.after=this.optionalSpace(this.content()),this.position++),this.newNode(n)}var p=this.parseWhitespaceEquivalentTokens(t);if(p.length>0){var f=this.current.last;if(f){var y=this.convertWhitespaceNodesToSpace(p),v=y.space,w=y.rawSpace;void 0!==w&&(f.rawSpaceAfter+=w),f.spaces.after+=v}else p.forEach(function(t){return e.newNode(t)})}},i.comma=function(){if(this.position===this.tokens.length-1)return this.root.trailingComma=!0,void this.position++;this.current._inferEndPosition();var e=new a.default({source:{start:N(this.tokens[this.position+1])},sourceIndex:this.tokens[this.position+1][g.FIELDS.START_POS]});this.current.parent.append(e),this.current=e,this.position++},i.comment=function(){var e=this.currToken;this.newNode(new c.default({value:this.content(),source:D(e),sourceIndex:e[g.FIELDS.START_POS]})),this.position++},i.error=function(e,t){throw this.root.error(e,t)},i.missingBackslash=function(){return this.error("Expected a backslash preceding the semicolon.",{index:this.currToken[g.FIELDS.START_POS]})},i.missingParenthesis=function(){return this.expected("opening parenthesis",this.currToken[g.FIELDS.START_POS])},i.missingSquareBracket=function(){return this.expected("opening square bracket",this.currToken[g.FIELDS.START_POS])},i.unexpected=function(){return this.error("Unexpected '"+this.content()+"'. Escaping special characters with \\ may help.",this.currToken[g.FIELDS.START_POS])},i.unexpectedPipe=function(){return this.error("Unexpected '|'.",this.currToken[g.FIELDS.START_POS])},i.namespace=function(){var e=this.prevToken&&this.content(this.prevToken)||!0;return this.nextToken[g.FIELDS.TYPE]===C.word?(this.position++,this.word(e)):this.nextToken[g.FIELDS.TYPE]===C.asterisk?(this.position++,this.universal(e)):void this.unexpectedPipe()},i.nesting=function(){if(this.nextToken&&"|"===this.content(this.nextToken))return void this.position++;var e=this.currToken;this.newNode(new y.default({value:this.content(),source:D(e),sourceIndex:e[g.FIELDS.START_POS]})),this.position++},i.parentheses=function(){var e=this.current.last,t=1;if(this.position++,e&&e.type===w.PSEUDO){var n=new a.default({source:{start:N(this.tokens[this.position])},sourceIndex:this.tokens[this.position][g.FIELDS.START_POS]}),o=this.current;for(e.append(n),this.current=n;this.position<this.tokens.length&&t;)this.currToken[g.FIELDS.TYPE]===C.openParenthesis&&t++,this.currToken[g.FIELDS.TYPE]===C.closeParenthesis&&t--,t?this.parse():(this.current.source.end=_(this.currToken),this.current.parent.source.end=_(this.currToken),this.position++);this.current=o}else{for(var i,r=this.currToken,s="(";this.position<this.tokens.length&&t;)this.currToken[g.FIELDS.TYPE]===C.openParenthesis&&t++,this.currToken[g.FIELDS.TYPE]===C.closeParenthesis&&t--,i=this.currToken,s+=this.parseParenthesisToken(this.currToken),this.position++;e?e.appendToPropertyAndEscape("value",s,s):this.newNode(new u.default({value:s,source:x(r[g.FIELDS.START_LINE],r[g.FIELDS.START_COL],i[g.FIELDS.END_LINE],i[g.FIELDS.END_COL]),sourceIndex:r[g.FIELDS.START_POS]}))}if(t)return this.expected("closing parenthesis",this.currToken[g.FIELDS.START_POS])},i.pseudo=function(){for(var e=this,t="",n=this.currToken;this.currToken&&this.currToken[g.FIELDS.TYPE]===C.colon;)t+=this.content(),this.position++;return this.currToken?this.currToken[g.FIELDS.TYPE]!==C.word?this.expected(["pseudo-class","pseudo-element"],this.currToken[g.FIELDS.START_POS]):void this.splitWord(!1,function(o,i){t+=o,e.newNode(new h.default({value:t,source:P(n,e.currToken),sourceIndex:n[g.FIELDS.START_POS]})),i>1&&e.nextToken&&e.nextToken[g.FIELDS.TYPE]===C.openParenthesis&&e.error("Misplaced parenthesis.",{index:e.nextToken[g.FIELDS.START_POS]})}):this.expected(["pseudo-class","pseudo-element"],this.position-1)},i.space=function(){var e=this.content();0===this.position||this.prevToken[g.FIELDS.TYPE]===C.comma||this.prevToken[g.FIELDS.TYPE]===C.openParenthesis||this.current.nodes.every(function(e){return"comment"===e.type})?(this.spaces=this.optionalSpace(e),this.position++):this.position===this.tokens.length-1||this.nextToken[g.FIELDS.TYPE]===C.comma||this.nextToken[g.FIELDS.TYPE]===C.closeParenthesis?(this.current.last.spaces.after=this.optionalSpace(e),this.position++):this.combinator()},i.string=function(){var e=this.currToken;this.newNode(new u.default({value:this.content(),source:D(e),sourceIndex:e[g.FIELDS.START_POS]})),this.position++},i.universal=function(e){var t=this.nextToken;if(t&&"|"===this.content(t))return this.position++,this.namespace();var n=this.currToken;this.newNode(new f.default({value:this.content(),source:D(n),sourceIndex:n[g.FIELDS.START_POS]}),e),this.position++},i.splitWord=function(e,t){for(var n=this,o=this.nextToken,i=this.content();o&&~[C.dollar,C.caret,C.equals,C.word].indexOf(o[g.FIELDS.TYPE]);){this.position++;var r=this.content();if(i+=r,r.lastIndexOf("\\")===r.length-1){var a=this.nextToken;a&&a[g.FIELDS.TYPE]===C.space&&(i+=this.requiredSpace(this.content(a)),this.position++)}o=this.nextToken}var c=R(i,".").filter(function(e){var t="\\"===i[e-1],n=/^\d+\.\d+%$/.test(i);return!t&&!n}),u=R(i,"#").filter(function(e){return"\\"!==i[e-1]}),h=R(i,"#{");h.length&&(u=u.filter(function(e){return!~h.indexOf(e)}));var p=(0,v.default)(function(){var e=Array.prototype.concat.apply([],arguments);return e.filter(function(t,n){return n===e.indexOf(t)})}([0].concat(c,u)));p.forEach(function(o,r){var a,h=p[r+1]||i.length,f=i.slice(o,h);if(0===r&&t)return t.call(n,f,p.length);var m=n.currToken,y=m[g.FIELDS.START_POS]+p[r],v=x(m[1],m[2]+o,m[3],m[2]+(h-1));if(~c.indexOf(o)){var C={value:f.slice(1),source:v,sourceIndex:y};a=new s.default(E(C,"value"))}else if(~u.indexOf(o)){var w={value:f.slice(1),source:v,sourceIndex:y};a=new l.default(E(w,"value"))}else{var T={value:f,source:v,sourceIndex:y};E(T,"value"),a=new d.default(T)}n.newNode(a,e),e=null}),this.position++},i.word=function(e){var t=this.nextToken;return t&&"|"===this.content(t)?(this.position++,this.namespace()):this.splitWord(e)},i.loop=function(){for(;this.position<this.tokens.length;)this.parse(!0);return this.current._inferEndPosition(),this.root},i.parse=function(e){switch(this.currToken[g.FIELDS.TYPE]){case C.space:this.space();break;case C.comment:this.comment();break;case C.openParenthesis:this.parentheses();break;case C.closeParenthesis:e&&this.missingParenthesis();break;case C.openSquare:this.attribute();break;case C.dollar:case C.caret:case C.equals:case C.word:this.word();break;case C.colon:this.pseudo();break;case C.comma:this.comma();break;case C.asterisk:this.universal();break;case C.ampersand:this.nesting();break;case C.slash:case C.combinator:this.combinator();break;case C.str:this.string();break;case C.closeSquare:this.missingSquareBracket();case C.semicolon:this.missingBackslash();default:this.unexpected()}},i.expected=function(e,t,n){if(Array.isArray(e)){var o=e.pop();e=e.join(", ")+" or "+o}var i=/^[aeiou]/.test(e[0])?"an":"a";return n?this.error("Expected "+i+" "+e+', found "'+n+'" instead.',{index:t}):this.error("Expected "+i+" "+e+".",{index:t})},i.requiredSpace=function(e){return this.options.lossy?" ":e},i.optionalSpace=function(e){return this.options.lossy?"":e},i.lossySpace=function(e,t){return this.options.lossy?t?" ":"":e},i.parseParenthesisToken=function(e){var t=this.content(e);return e[g.FIELDS.TYPE]===C.space?this.requiredSpace(t):t},i.newNode=function(e,t){return t&&(/^ +$/.test(t)&&(this.options.lossy||(this.spaces=(this.spaces||"")+t),t=!0),e.namespace=t,E(e,"namespace")),this.spaces&&(e.spaces.before=this.spaces,this.spaces=""),this.current.append(e)},i.content=function(e){return void 0===e&&(e=this.currToken),this.css.slice(e[g.FIELDS.START_POS],e[g.FIELDS.END_POS])},i.locateNextMeaningfulToken=function(e){void 0===e&&(e=this.position+1);for(var t=e;t<this.tokens.length;){if(!L[this.tokens[t][g.FIELDS.TYPE]])return t;t++}return-1},t=e,(n=[{key:"currToken",get:function(){return this.tokens[this.position]}},{key:"nextToken",get:function(){return this.tokens[this.position+1]}},{key:"prevToken",get:function(){return this.tokens[this.position-1]}}])&&A(t.prototype,n),o&&A(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=O,e.exports=t.default},5238:(e,t,n)=>{let o=n(3152);class i extends o{get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}}e.exports=i,i.default=i},5239:(e,t,n)=>{n.d(t,{O:()=>s});var o=n(205),i=n(8957);class r{constructor(e,t,n,o){this.leftNode=null,this.rightNode=null,this.variants=[],this.height=1,this.key=e,this.value=t,this.leftNode=n,this.rightNode=o,this.currentNode=null}addCurrentNode(e,t){return null==t?t=e:(e.value.typeId!=t.value.typeId&&(t.currentNode=this.addCurrentNode(e,t.currentNode)),t)}addCurrentNodeType(e,t){if(null==t)return t=e;let n=!1;e.value.id==t.value.id&&(n=!0);for(let o=0;o<t.variants.length;o++)t.variants[o].value.id==e.value.id&&(n=!0);return n||t.variants.push(e),t}getMax(e,t){return e>t?e:t}addNode(e,t,n){if(null==t)return(0,i.dispatchIdEvent)(e.value.ofTheConceptId),e;let o=t.leftNode,r=t.rightNode;if(e.key<t.key)t.leftNode=this.addNode(e,o,n);else{if(!(e.key>t.key))return t;t.rightNode=this.addNode(e,r,n)}t.height=1+this.getMax(this.getHeight(t.leftNode),this.getHeight(t.rightNode));let a=this.getBalanceFactor(t);if(a>1&&t.leftNode){if(this.getBalanceFactor(t.leftNode)>=0)return this.rightRotate(t);if(this.getBalanceFactor(t.leftNode)<0)return t.leftNode=this.leftRotate(t.leftNode),this.rightRotate(t)}if(a<-1&&t.rightNode){if(this.getBalanceFactor(t.rightNode)<=0)return this.leftRotate(t);if(this.getBalanceFactor(t.rightNode)>0)return t.rightNode=this.rightRotate(t.rightNode),this.leftRotate(t)}return t}addTypeNode(e,t,n){let o=!1;if(0!=e.value.typeId){if(null==t)return t=e;let o=t.leftNode,i=t.rightNode;if(t.key>e.key)t.leftNode=this.addTypeNode(e,o,n);else{if(!(t.key<e.key))return t.key==e.key&&0!=t.key&&t.addCurrentNodeType(e,t),t;t.rightNode=this.addTypeNode(e,i,n)}t.height=1+this.getMax(this.getHeight(t.leftNode),this.getHeight(t.rightNode));let r=this.getBalanceFactor(t);if(r>1&&t.leftNode){if(e.key<t.leftNode.key){return this.rightRotate(t)}if(e.key>t.leftNode.key){return t.leftNode=this.leftRotate(t.leftNode),this.rightRotate(t)}}if(r<-1&&t.rightNode){if(e.key>t.rightNode.key){return this.leftRotate(t)}if(e.key<t.rightNode.key){return t.rightNode=this.rightRotate(t.rightNode),this.leftRotate(t)}}}else o;return t}rightRotate(e){if(e){let t=e.leftNode;if(t){let n=t.rightNode;return e.leftNode=n,t.rightNode=e,e.height=this.getMax(this.getHeight(e.leftNode),this.getHeight(e.rightNode))+1,t.height=this.getMax(this.getHeight(t.leftNode),this.getHeight(t.rightNode))+1,t}throw new Error("Cannot perform right rotation: left node is null.")}return e}leftRotate(e){if(e){let t=e.rightNode;if(t){let n=t.leftNode;return t.leftNode=e,e.rightNode=n,e.height=this.getMax(this.getHeight(e.leftNode),this.getHeight(e.rightNode))+1,t.height=this.getMax(this.getHeight(t.leftNode),this.getHeight(e.rightNode))+1,t}throw new Error("Cannot perform left rotation: right node is null.")}return e}getHeight(e){return e?e.height:0}getBalanceFactor(e){return null==e?0:this.getHeight(e.leftNode)-this.getHeight(e.rightNode)}getFromNode(e,t){try{if(t)return e==t.key?(t.value.count?t.value.count++:t.value.count=1,t):e<t.key?this.getFromNode(e,t.leftNode):e>t.key?this.getFromNode(e,t.rightNode):t}catch(e){}return t}getCharacterFromNode(e,t){return t?e==t.key?t:e<t.key?this.getCharacterFromNode(e,t.leftNode):e>t.key?this.getCharacterFromNode(e,t.rightNode):t:t}checkIfIdsInNode(e,t,n,o){if(e){if(t.includes(e.key)){n.push(e.value);let o=t.indexOf(e.key);t.splice(o,1)}e.leftNode&&this.checkIfIdsInNode(e.leftNode,t,n,o),e.rightNode&&this.checkIfIdsInNode(e.rightNode,t,n,o)}}traverse(e){let t=0;return e&&(t+=1,(null==e?void 0:e.leftNode)&&(t+=this.traverse(e.leftNode)),e.rightNode&&(t+=this.traverse(e.rightNode))),t}removeNode(e,t){if(null==e)return e;if(e.key>t)return e.leftNode=this.removeNode(e.leftNode,t),e;if(e.key<t)return e.rightNode=this.removeNode(e.rightNode,t),e;new Event(`${e.value.ofTheConceptId}`);if((0,i.dispatchIdEvent)(e.value.ofTheConceptId),null==e.leftNode){let t=e.rightNode;return e=null,t}if(null==e.rightNode){let t=e.leftNode;return e=null,t}{let t=this.inOrderSuccessor(e.rightNode);return e.value=t.value,e.key=t.key,e.variants=t.variants,e.currentNode=t.currentNode,e.rightNode=this.removeNode(e.rightNode,t.key),e}}removeNodeWithVariants(e,t,n){if(null==e)return e;if(e.key>t)return e.leftNode=this.removeNodeWithVariants(e.leftNode,t,n),e;if(e.key<t)return e.rightNode=this.removeNodeWithVariants(e.rightNode,t,n),e;if(e.variants.length>0)if(e.value.id==n){let t=e.variants[0];if(t)return e.value=t.value,e.key=t.key,e.currentNode=t.currentNode,e.variants.splice(0,1),e}else for(let t=0;t<e.variants.length;t++)if(n==e.variants[t].value.id)return e.variants.splice(t,1),e;if(null==e.leftNode){let t=e.rightNode;return e=null,t}if(null==e.rightNode){let t=e.leftNode;return e=null,t}{let t=this.inOrderSuccessor(e.rightNode);return e.value=t.value,e.key=t.key,e.variants=t.variants,e.currentNode=t.currentNode,e.rightNode=this.removeNodeWithVariants(e.rightNode,t.key,n),e}}inOrderSuccessor(e){for(;null!=e.leftNode;)e=e.leftNode;return e}}var a=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class s{static addNodeToTree(e){try{this.connectionMap.set(e.key,e.value),null===this.connectionroot&&(this.connectionroot=e)}catch(e){throw e}}static addConnectionToTree(e){this.connectionMap.has(e.id)||(0,i.dispatchIdEvent)(e.ofTheConceptId),this.connectionMap.set(e.id,e),null===this.connectionroot&&(this.connectionroot=new r(e.id,e,null,null))}static traverse(){return this.connectionMap.size}static waitForDataToLoad(){return a(this,void 0,void 0,function*(){return new Promise((e,t)=>{this.checkFlag(e),setTimeout(()=>{t("not")},25e3)})})}static checkFlag(e){if(o.B.isConnectionLoaded)return e("done");setTimeout(s.checkFlag,1e3,e)}static removeNodeFromTree(e){return a(this,void 0,void 0,function*(){const t=this.connectionMap.get(e);t&&((0,i.dispatchIdEvent)(t.ofTheConceptId),this.connectionMap.delete(e),0===this.connectionMap.size&&(this.connectionroot=null))})}static getNodeFromTree(e){return a(this,void 0,void 0,function*(){try{const t=this.connectionMap.get(e);return t?(t.count?t.count++:t.count=1,{key:e,value:t}):null}catch(e){return}})}static getConnectionListFromIds(e,t,n){return a(this,void 0,void 0,function*(){for(let n=e.length-1;n>=0;n--){const o=this.connectionMap.get(e[n]);o&&(t.push(o),e.splice(n,1))}})}}s.connectionroot=null,s.connectionMap=new Map},5257:(e,t,n)=>{n.d(t,{R:()=>a});var o=n(9003),i=n(3075),r=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class a{static AddConceptId(e){this.localId=e.value,(0,o.kH)("localid",e)}static getConceptId(){return r(this,void 0,void 0,function*(){try{if(this.localId){if(this.ReservedLocalId.length<5){yield(0,i.EO)().then(()=>{let e=this.localId;for(let t=1;t<10;t++){let n=this.localId-t;this.ReservedLocalId.push(n),e=n}this.AddConceptId({id:0,value:e})}).catch(e=>-Math.floor(1e8*Math.random()));let e=this.ReservedLocalId[0];return this.ReservedLocalId.shift(),e}{let e=this.ReservedLocalId[0];return this.ReservedLocalId.shift(),e}}return yield(0,i.EO)().then(()=>{let e=this.localId;for(let t=1;t<10;t++){let n=this.localId-t;this.ReservedLocalId.push(n),e=n}this.AddConceptId({id:0,value:e})}),this.getConceptId()}catch(e){return-Math.floor(1e8*Math.random())}})}static AddConnectionId(e){this.localConnectionId=e.value}static getConnectionId(){return r(this,void 0,void 0,function*(){try{if(this.localConnectionId){if(this.ReservedConnectionId.length<5){yield(0,i.xd)().then(()=>{let e=this.localConnectionId;for(let t=1;t<10;t++){let n=this.localConnectionId-t;this.ReservedConnectionId.push(n),e=n}}).catch(e=>-Math.floor(1e8*Math.random()));let e=this.ReservedConnectionId[0];return this.ReservedConnectionId.shift(),e}{let e=this.ReservedConnectionId[0];return this.ReservedConnectionId.shift(),e}}return yield(0,i.xd)().then(()=>{let e=this.localConnectionId;for(let t=1;t<10;t++){let n=this.localConnectionId-t;this.ReservedConnectionId.push(n),e=n}this.AddConnectionId({id:1,value:e})}),this.getConnectionId()}catch(e){return-Math.floor(1e8*Math.random())}})}}a.ReservedLocalId=[],a.ReservedConnectionId=[]},5284:(e,t,n)=>{n.d(t,{B:()=>s});var o=n(8957),i=n(8286),r=n(1863),a=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function s(){return a(this,arguments,void 0,function*(e=[]){const t=o.Logger.logfunction("FindConnectionsOfCompositionsBulkInMemory",[e.length])||{};let n=[];try{if(o.serviceWorker){t.serviceWorker=!0;try{const n=yield(0,o.sendMessage)("FindConnectionsOfCompositionsBulkInMemory",{composition_ids:e});return o.Logger.logUpdate(t),n.data}catch(e){(0,r.ey)(t,"FindConnectionsOfCompositionsBulkInMemory",e),(0,o.handleServiceWorkerException)(e)}}for(let t=0;t<e.length;t++){let o=yield i.d.GetConnectionsOfConcept(e[t]);n.push(...o)}return o.Logger.logUpdate(t),n}catch(e){return(0,r.ey)(t,"FindConnectionsOfCompositionsBulkInMemory",e),n}})}},5286:(e,t)=>{function n(e){for(var t=e.toLowerCase(),n="",o=!1,i=0;i<6&&void 0!==t[i];i++){var r=t.charCodeAt(i);if(o=32===r,!(r>=97&&r<=102||r>=48&&r<=57))break;n+=t[i]}if(0!==n.length){var a=parseInt(n,16);return a>=55296&&a<=57343||0===a||a>1114111?["�",n.length+(o?1:0)]:[String.fromCodePoint(a),n.length+(o?1:0)]}}t.__esModule=!0,t.default=function(e){if(!o.test(e))return e;for(var t="",i=0;i<e.length;i++)if("\\"!==e[i])t+=e[i];else{var r=n(e.slice(i+1,i+7));if(void 0!==r){t+=r[0],i+=r[1];continue}if("\\"===e[i+1]){t+="\\",i++;continue}e.length===i+1&&(t+=e[i])}return t};var o=/\\/;e.exports=t.default},5312:(e,t,n)=>{n.d(t,{NK:()=>h,Ve:()=>p,cf:()=>d,vw:()=>f,y8:()=>u});var o=n(2832),i=n(3130),r=n(8957),a=n(1863),s=n(6687),c=n(1320),l=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function d(e){var t=arguments;return l(this,arguments,void 0,function*(e,n="",d=null,h=i.y0){var p,m,y,v,g,C,w,T;const I=r.Logger.logfunction("SearchLinkMultipleAll",t)||{};try{try{if(r.serviceWorker){I.serviceWorker=!0;const t=yield(0,r.sendMessage)("SearchLinkMultipleAll",{searchQuery:e,token:n,caller:d,format:h});return r.Logger.logUpdate(I),t.data}}catch(e){(0,a.ey)(I,"SearchLinkMultipleAll",e),(0,r.handleServiceWorkerException)(e)}let t=[],k=[],b=[],A=[],S=e[0].composition,L={},N={};(null==d?void 0:d.isDataLoaded)?(L.compositionIds=null===(p=d.conceptIds)||void 0===p?void 0:p.slice(),L.internalConnections=null===(m=d.internalConnections)||void 0===m?void 0:m.slice(),L.linkers=null===(y=d.linkers)||void 0===y?void 0:y.slice(),L.reverse=null===(v=d.reverse)||void 0===v?void 0:v.slice(),N=L,t=N.compositionIds,b=N.internalConnections,k=N.linkers,A=N.reverse):(L=yield(0,o.j)(e,n),d&&(d.conceptIds=null===(g=L.compositionIds)||void 0===g?void 0:g.slice(),d.internalConnections=null===(C=L.internalConnections)||void 0===C?void 0:C.slice(),d.linkers=null===(w=L.linkers)||void 0===w?void 0:w.slice(),d.reverse=null===(T=L.reverse)||void 0===T?void 0:T.slice(),d.isDataLoaded=!0),N=L,t=N.compositionIds,b=N.internalConnections,k=N.linkers,A=N.reverse);let _=yield function(e,t,n,o,r,a){return l(this,arguments,void 0,function*(e,t,n,o,r,a,l=i.y0){try{let d,h,p=yield(0,s.QL)(e);return l==i.ZJ?(d=yield(0,s.MT)(t,n),h=yield f(e,d,r,o)):l==i.yv?(d=yield(0,s.D)(t,n),h=yield f(e,d,r,o)):100==l?(d=yield(0,s.nr)(t,n),h=yield u(p,d,r,o)):l==i.SL?h=yield(0,c._W)(e,t,n,a.ofCompositions,o):(d=yield(0,s.rv)(t,n),h=yield u(p,d,r,o)),h}catch(e){return}})}(k,t,b,A,S,e[0],h);return r.Logger.logUpdate(I),_}catch(e){throw(0,a.ey)(I,"SearchLinkMultipleAll",e),e}})}function u(e,t,n){return l(this,arguments,void 0,function*(e,t,n,o=[]){(new Date).getTime();let i={},a=[];for(let t=0;t<e.length;t++)a.push(e[t].toTheConceptId),a.push(e[t].ofTheConceptId),a.push(e[t].typeId);e.sort(function(e,t){return t.id-e.id});for(let n=0;n<e.length;n++){let i=!1;if(o.includes(e[n].id)&&(i=!0),1==i){if(t[e[n].ofTheConceptId]&&t[e[n].toTheConceptId]){let o=t[e[n].toTheConceptId],i=yield(0,r.GetTheConcept)(e[n].typeId),a=null==o?void 0:o.data,s=Object.keys(a)[0];try{let o=i.characterValue+"_reverse";"string"==typeof a&&(a={}),Array.isArray(a[s][o])||("string"==typeof a[s]&&(a[s]={}),a[s][o]=[]),a[s][o].push(t[e[n].ofTheConceptId])}catch(e){}}}else if(t[e[n].ofTheConceptId]&&t[e[n].toTheConceptId]){let o=t[e[n].ofTheConceptId],i=yield(0,r.GetTheConcept)(e[n].typeId),a=null==o?void 0:o.data,s=Object.keys(a)[0];try{"string"==typeof a&&(a={}),Array.isArray(a[s][i.characterValue])||("string"==typeof a[s]&&(a[s]={}),a[s][i.characterValue]=[]),a[s][i.characterValue].push(t[e[n].toTheConceptId])}catch(e){}}}return i=t[n],i})}function h(e,t,n){return l(this,arguments,void 0,function*(e,t,n,o=[]){let i=[],a=[];for(let t=0;t<e.length;t++)a.push(e[t].toTheConceptId),a.push(e[t].ofTheConceptId),a.push(e[t].typeId);e.sort(function(e,t){return t.id-e.id});for(let n=0;n<e.length;n++){let i=!1;if(o.includes(e[n].id)&&(i=!0),1==i){if(t[e[n].ofTheConceptId]&&t[e[n].toTheConceptId]){let o=t[e[n].toTheConceptId],i=yield(0,r.GetTheConcept)(e[n].typeId),a=Object.keys(o)[0];try{let r=i.characterValue+"_reverse";"string"==typeof o&&(o={}),Array.isArray(o[a][r])||("string"==typeof o[a]&&(o[a]={}),o[a][r]=[]),o[a][r].push(t[e[n].ofTheConceptId])}catch(e){}}}else if(t[e[n].ofTheConceptId]&&t[e[n].toTheConceptId]){let o=t[e[n].ofTheConceptId],i=yield(0,r.GetTheConcept)(e[n].typeId),a=Object.keys(o)[0];try{"string"==typeof o&&(o={}),Array.isArray(o[a][i.characterValue])||("string"==typeof o[a]&&(o[a]={}),o[a][i.characterValue]=[]),o[a][i.characterValue].push(t[e[n].toTheConceptId])}catch(e){}}}for(let e=0;e<n.length;e++){let o=t[n[e]];o&&i.push(o)}return i})}function p(e,t,n,o){return l(this,arguments,void 0,function*(e,t,n,o,i=[]){(new Date).getTime();let a=[],s=[];for(let t=0;t<e.length;t++)s.push(e[t].toTheConceptId),s.push(e[t].ofTheConceptId),s.push(e[t].typeId);e.sort(function(e,t){return t.id-e.id});for(let n=0;n<e.length;n++){let o=!1;if(i.includes(e[n].id)&&(o=!0),1==o){if(t[e[n].ofTheConceptId]&&t[e[n].toTheConceptId]){let o=t[e[n].toTheConceptId],i=yield(0,r.GetTheConcept)(e[n].typeId),a=null==o?void 0:o.data,s=Object.keys(a)[0];try{let o=i.characterValue+"_reverse";"string"==typeof a&&(a={}),Array.isArray(a[s][o])||("string"==typeof a[s]&&(a[s]={}),a[s][o]=[]),a[s][o].push(t[e[n].ofTheConceptId])}catch(e){}}}else if(t[e[n].ofTheConceptId]&&t[e[n].toTheConceptId]){let o=t[e[n].ofTheConceptId],i=yield(0,r.GetTheConcept)(e[n].typeId),a=null==o?void 0:o.data,s=Object.keys(a)[0];try{"string"==typeof a&&(a={}),Array.isArray(a[s][i.characterValue])||("string"==typeof a[s]&&(a[s]={}),a[s][i.characterValue]=[]),a[s][i.characterValue].push(t[e[n].toTheConceptId])}catch(e){}}}for(let e=0;e<o.length;e++){let n=t[o[e]];n&&a.push(n)}return a})}function f(e,t,n){return l(this,arguments,void 0,function*(e,t,n,o=[]){let i={},a=yield(0,r.GetConnectionBulk)(e),s=[];for(let e=0;e<a.length;e++)s.push(a[e].toTheConceptId),s.push(a[e].ofTheConceptId),s.push(a[e].typeId);yield(0,r.GetConceptBulk)(s),a.sort(function(e,t){return t.id-e.id});for(let e=0;e<a.length;e++){let n=!1;if(o.includes(a[e].id)&&(n=!0),1==n){if(t[a[e].ofTheConceptId]&&t[a[e].toTheConceptId]){let n=t[a[e].toTheConceptId],o=yield(0,r.GetTheConcept)(a[e].typeId),i=n,s=Object.keys(i)[0];try{let n=o.characterValue+"_reverse";"string"==typeof i&&(i={}),Array.isArray(i[s][n])||("string"==typeof i[s]&&(i[s]={}),i[s][n]=[]),i[s][n].push(t[a[e].ofTheConceptId])}catch(e){}}}else if(t[a[e].ofTheConceptId]&&t[a[e].toTheConceptId]){let n=t[a[e].ofTheConceptId],o=yield(0,r.GetTheConcept)(a[e].typeId),i=n,s=Object.keys(i)[0];try{"string"==typeof i&&(i={}),Array.isArray(i[s][o.characterValue])||("string"==typeof i[s]&&(i[s]={}),i[s][o.characterValue]=[]),i[s][o.characterValue].push(t[a[e].toTheConceptId])}catch(e){}}}return i=t[n],i})}},5328:(e,t,n)=>{n.d(t,{d:()=>l});var o=n(8957),i=n(3130),r=n(8939),a=n(4287),s=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class c extends a.w{constructor(e,t,n,o,i){super(),this.connections=[],this.data=[],this.mainConcept=e,this.linker=t,this.inpage=n,this.page=o,this.format=i}bind(){return s(this,void 0,void 0,function*(){var e;if(!this.isDataLoaded){let i=yield(0,o.GetTheConcept)(this.mainConcept),r=(null===(e=i.type)||void 0===e?void 0:e.characterValue)+"_s_"+this.linker,a=yield(0,o.GetConceptByCharacterAndType)(r,16);if(a.id>0){let e=yield(0,o.GetConnectionOfTheConcept)(a.id,i.id,i.userId,this.inpage,this.page);this.connections=e;for(var t=[],n=0;n<this.connections.length;n++)t.push(this.connections[n].toTheConceptId),this.linkers.push(this.connections[n].id),this.listenToEvent(this.connections[n].toTheConceptId);yield(0,o.GetAllConnectionsOfCompositionBulk)(t)}this.isDataLoaded=!0,this.listenToEvent(this.mainConcept)}return yield this.build()})}build(){return s(this,void 0,void 0,function*(){this.data=[],this.connections=yield(0,o.GetConnectionBulk)(this.linkers);for(var e=0;e<this.connections.length;e++){let t=this.connections[e].toTheConceptId,n=yield(0,o.GetTheConcept)(t);if(this.format==i.yv){let e=yield(0,r.RW)(n.id);this.data.push(e)}else if(this.format==i.ZJ){let e=yield(0,r.kx)(n.id);this.data.push(e)}else if(this.format==i.iw){let e=yield(0,o.GetCompositionWithIdAndDateFromMemory)(n.id);this.data.push(e)}else{let e=yield(0,o.GetCompositionWithIdAndDateFromMemory)(n.id);this.data.push(e)}}return this.data})}}function l(e,t,n,o,r=i.yv){return new c(e,t,n,o,r)}},5457:(e,t,n)=>{n.d(t,{c:()=>c});var o=n(8957),i=n(7282),r=n(205);class a{constructor(e,t){this.value=[],this.height=1,this.key=e,this.value.push(t),this.leftNode=null,this.rightNode=null,this.currentNode=null}addType(e,t,n){var i,r,s,c;if(null==e)return(0,o.dispatchIdEvent)(t,{detail:n}),new a(t,n);if(t<e.key)e.leftNode=this.addType(e.leftNode,t,n);else{if(!(t>e.key))return e.value.includes(n)||((0,o.dispatchIdEvent)(t,{detail:n}),e.value.push(n)),e;e.rightNode=this.addType(e.rightNode,t,n)}e.height=Math.max(this.getHeight(e.leftNode),this.getHeight(e.rightNode))+1;const l=this.getBalanceFactor(e);return l>1&&t<(null===(i=e.leftNode)||void 0===i?void 0:i.key)?this.rightRotate(e):l<-1&&t>(null===(r=e.rightNode)||void 0===r?void 0:r.key)?this.leftRotate(e):l>1&&t>(null===(s=e.leftNode)||void 0===s?void 0:s.key)?(e.leftNode=this.leftRotate(e.leftNode),this.rightRotate(e)):l<-1&&t<(null===(c=e.rightNode)||void 0===c?void 0:c.key)?(e.rightNode=this.rightRotate(e.rightNode),this.leftRotate(e)):e}rightRotate(e){if(e){let t=e.leftNode;if(t){let n=t.rightNode;return e.leftNode=n,t.rightNode=e,e.height=Math.max(this.getHeight(e.leftNode),this.getHeight(e.rightNode))+1,t.height=Math.max(this.getHeight(t.leftNode),this.getHeight(t.rightNode))+1,t}}return e}leftRotate(e){if(e){let t=e.rightNode;if(t){let n=t.leftNode;return t.leftNode=e,e.rightNode=n,e.height=Math.max(this.getHeight(e.leftNode),this.getHeight(e.rightNode))+1,t.height=Math.max(this.getHeight(t.leftNode),this.getHeight(e.rightNode))+1,t}}return e}getHeight(e){return e?e.height:0}getBalanceFactor(e){return null==e?0:this.getHeight(e.leftNode)-this.getHeight(e.rightNode)}getFromNode(e,t){return t?e==t.key?t:e<t.key?this.getFromNode(e,t.leftNode):e>t.key?this.getFromNode(e,t.rightNode):t:t}removeNodeWithVariants(e,t,n){if(null==e)return e;if(e.key>t)return e.leftNode=this.removeNodeWithVariants(e.leftNode,t,n),e;if(e.key<t)return e.rightNode=this.removeNodeWithVariants(e.rightNode,t,n),e;if(e.value.length>0)for(let t=0;t<e.value.length;t++)if(n==e.value[t])return e.value.splice(t,1),e;if(null==e.leftNode){let t=e.rightNode;return e=null,t}if(null==e.rightNode){let t=e.leftNode;return e=null,t}{let t=this.inOrderSuccessor(e.rightNode);return e.value=t.value,e.key=t.key,e.currentNode=t.currentNode,e.rightNode=this.removeNodeWithVariants(e.rightNode,t.key,n),e}}countNodeBelow(e){return null==e?0:1+this.countNodeBelow(e.leftNode)+this.countNodeBelow(e.rightNode)}inOrderSuccessor(e){for(;null!=e.leftNode;)e=e.leftNode;return e}}var s=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class c{static addType(e){return s(this,void 0,void 0,function*(){if(null==this.root){this.root=e;new CustomEvent(`${e.key}`,{detail:e.value[0]});return(0,o.dispatchIdEvent)(e.key,{detail:e.value[0]}),this.root}return this.root=this.root.addType(this.root,e.key,e.value[0]),this.root})}static addConceptToTree(e){if(0!=e.typeId){let t=new a(e.typeId,e.id);this.addType(t)}}static removeTypeConcept(e,t){this.root&&(this.root=this.root.removeNodeWithVariants(this.root,e,t))}static getNodeFromTreeNew(e){if(this.root){return this.root.getFromNode(e,this.root)}return this.root}static getTypeVariantsFromTreeNew(e){return s(this,void 0,void 0,function*(){let t=this.getNodeFromTreeNew(e),n=[],i=[];if(t){n=t.value;for(let e=0;e<n.length;e++){let t=!1;for(let o=0;o<i.length;o++)i[o].id==n[e]&&(t=!0);t||i.push(yield(0,o.GetTheConcept)(n[e]))}}return i})}static waitForDataToLoad(){return s(this,void 0,void 0,function*(){return new Promise((e,t)=>{this.checkFlag(e),setTimeout(()=>{t("not")},25e3)})})}static checkFlag(e){if(r.B.isTypeLoaded)return e("done");setTimeout(c.checkFlag,1e3,e)}static getTypeVariantsFromTreeWithUserIdNew(e,t){return s(this,void 0,void 0,function*(){let n=[],o=yield this.getTypeVariantsFromTreeNew(e);for(let e=0;e<o.length;e++)o[e].userId==t&&n.push(o[e]);return n})}static getTypeVariantsWithCharacterValueNew(e,t){return s(this,void 0,void 0,function*(){let n=yield this.getTypeVariantsFromTreeNew(t),o=(0,i.o)();for(let t=0;t<n.length;t++)n[t].characterValue==e&&(o=n[t]);return o})}static countNumberOfNodes(){return this.typeRoot?this.typeRoot.countNodeBelow(this.typeRoot):0}}c.typeRoot=null,c.root=null},5588:(e,t,n)=>{t.__esModule=!0,t.default=void 0,t.unescapeValue=y;var o,i=c(n(8937)),r=c(n(5286)),a=c(n(3295)),s=n(1581);function c(e){return e&&e.__esModule?e:{default:e}}function l(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}var u=n(4643),h=/^('|")([^]*)\1$/,p=u(function(){},"Assigning an attribute a value containing characters that might need to be escaped is deprecated. Call attribute.setValue() instead."),f=u(function(){},"Assigning attr.quoted is deprecated and has no effect. Assign to attr.quoteMark instead."),m=u(function(){},"Constructing an Attribute selector with a value without specifying quoteMark is deprecated. Note: The value should be unescaped now.");function y(e){var t=!1,n=null,o=e,i=o.match(h);return i&&(n=i[1],o=i[2]),(o=(0,r.default)(o))!==e&&(t=!0),{deprecatedUsage:t,unescaped:o,quoteMark:n}}var v=function(e){var t,n;function o(t){var n;return void 0===t&&(t={}),n=e.call(this,function(e){if(void 0!==e.quoteMark)return e;if(void 0===e.value)return e;m();var t=y(e.value),n=t.quoteMark,o=t.unescaped;return e.raws||(e.raws={}),void 0===e.raws.value&&(e.raws.value=e.value),e.value=o,e.quoteMark=n,e}(t))||this,n.type=s.ATTRIBUTE,n.raws=n.raws||{},Object.defineProperty(n.raws,"unquoted",{get:u(function(){return n.value},"attr.raws.unquoted is deprecated. Call attr.value instead."),set:u(function(){return n.value},"Setting attr.raws.unquoted is deprecated and has no effect. attr.value is unescaped by default now.")}),n._constructed=!0,n}n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,d(t,n);var r,a,c,h=o.prototype;return h.getQuotedValue=function(e){void 0===e&&(e={});var t=this._determineQuoteMark(e),n=g[t];return(0,i.default)(this._value,n)},h._determineQuoteMark=function(e){return e.smart?this.smartQuoteMark(e):this.preferredQuoteMark(e)},h.setValue=function(e,t){void 0===t&&(t={}),this._value=e,this._quoteMark=this._determineQuoteMark(t),this._syncRawValue()},h.smartQuoteMark=function(e){var t=this.value,n=t.replace(/[^']/g,"").length,r=t.replace(/[^"]/g,"").length;if(n+r===0){var a=(0,i.default)(t,{isIdentifier:!0});if(a===t)return o.NO_QUOTE;var s=this.preferredQuoteMark(e);if(s===o.NO_QUOTE){var c=this.quoteMark||e.quoteMark||o.DOUBLE_QUOTE,l=g[c];if((0,i.default)(t,l).length<a.length)return c}return s}return r===n?this.preferredQuoteMark(e):r<n?o.DOUBLE_QUOTE:o.SINGLE_QUOTE},h.preferredQuoteMark=function(e){var t=e.preferCurrentQuoteMark?this.quoteMark:e.quoteMark;return void 0===t&&(t=e.preferCurrentQuoteMark?e.quoteMark:this.quoteMark),void 0===t&&(t=o.DOUBLE_QUOTE),t},h._syncRawValue=function(){var e=(0,i.default)(this._value,g[this.quoteMark]);e===this._value?this.raws&&delete this.raws.value:this.raws.value=e},h._handleEscapes=function(e,t){if(this._constructed){var n=(0,i.default)(t,{isIdentifier:!0});n!==t?this.raws[e]=n:delete this.raws[e]}},h._spacesFor=function(e){var t=this.spaces[e]||{},n=this.raws.spaces&&this.raws.spaces[e]||{};return Object.assign({before:"",after:""},t,n)},h._stringFor=function(e,t,n){void 0===t&&(t=e),void 0===n&&(n=C);var o=this._spacesFor(t);return n(this.stringifyProperty(e),o)},h.offsetOf=function(e){var t=1,n=this._spacesFor("attribute");if(t+=n.before.length,"namespace"===e||"ns"===e)return this.namespace?t:-1;if("attributeNS"===e)return t;if(t+=this.namespaceString.length,this.namespace&&(t+=1),"attribute"===e)return t;t+=this.stringifyProperty("attribute").length,t+=n.after.length;var o=this._spacesFor("operator");t+=o.before.length;var i=this.stringifyProperty("operator");if("operator"===e)return i?t:-1;t+=i.length,t+=o.after.length;var r=this._spacesFor("value");t+=r.before.length;var a=this.stringifyProperty("value");return"value"===e?a?t:-1:(t+=a.length,t+=r.after.length,t+=this._spacesFor("insensitive").before.length,"insensitive"===e&&this.insensitive?t:-1)},h.toString=function(){var e=this,t=[this.rawSpaceBefore,"["];return t.push(this._stringFor("qualifiedAttribute","attribute")),this.operator&&(this.value||""===this.value)&&(t.push(this._stringFor("operator")),t.push(this._stringFor("value")),t.push(this._stringFor("insensitiveFlag","insensitive",function(t,n){return!(t.length>0)||e.quoted||0!==n.before.length||e.spaces.value&&e.spaces.value.after||(n.before=" "),C(t,n)}))),t.push("]"),t.push(this.rawSpaceAfter),t.join("")},r=o,(a=[{key:"quoted",get:function(){var e=this.quoteMark;return"'"===e||'"'===e},set:function(e){f()}},{key:"quoteMark",get:function(){return this._quoteMark},set:function(e){this._constructed?this._quoteMark!==e&&(this._quoteMark=e,this._syncRawValue()):this._quoteMark=e}},{key:"qualifiedAttribute",get:function(){return this.qualifiedName(this.raws.attribute||this.attribute)}},{key:"insensitiveFlag",get:function(){return this.insensitive?"i":""}},{key:"value",get:function(){return this._value},set:function(e){if(this._constructed){var t=y(e),n=t.deprecatedUsage,o=t.unescaped,i=t.quoteMark;if(n&&p(),o===this._value&&i===this._quoteMark)return;this._value=o,this._quoteMark=i,this._syncRawValue()}else this._value=e}},{key:"insensitive",get:function(){return this._insensitive},set:function(e){e||(this._insensitive=!1,!this.raws||"I"!==this.raws.insensitiveFlag&&"i"!==this.raws.insensitiveFlag||(this.raws.insensitiveFlag=void 0)),this._insensitive=e}},{key:"attribute",get:function(){return this._attribute},set:function(e){this._handleEscapes("attribute",e),this._attribute=e}}])&&l(r.prototype,a),c&&l(r,c),Object.defineProperty(r,"prototype",{writable:!1}),o}(a.default);t.default=v,v.NO_QUOTE=null,v.SINGLE_QUOTE="'",v.DOUBLE_QUOTE='"';var g=((o={"'":{quotes:"single",wrap:!0},'"':{quotes:"double",wrap:!0}}).null={isIdentifier:!0},o);function C(e,t){return""+t.before+e+t.after}},5644:(e,t,n)=>{let o,i,r=n(7793);class a extends r{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,n){let o=super.normalize(e);if(t)if("prepend"===n)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of o)e.raws.before=t.raws.before;return o}removeChild(e,t){let n=this.index(e);return!t&&0===n&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}toResult(e={}){return new o(new i,this,e).stringify()}}a.registerLazyResult=e=>{o=e},a.registerProcessor=e=>{i=e},e.exports=a,a.default=a,r.registerRoot(a)},5781:e=>{const t="'".charCodeAt(0),n='"'.charCodeAt(0),o="\\".charCodeAt(0),i="/".charCodeAt(0),r="\n".charCodeAt(0),a=" ".charCodeAt(0),s="\f".charCodeAt(0),c="\t".charCodeAt(0),l="\r".charCodeAt(0),d="[".charCodeAt(0),u="]".charCodeAt(0),h="(".charCodeAt(0),p=")".charCodeAt(0),f="{".charCodeAt(0),m="}".charCodeAt(0),y=";".charCodeAt(0),v="*".charCodeAt(0),g=":".charCodeAt(0),C="@".charCodeAt(0),w=/[\t\n\f\r "#'()/;[\\\]{}]/g,T=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,I=/.[\r\n"'(/\\]/,k=/[\da-f]/i;e.exports=function(e,b={}){let A,S,L,N,_,x,D,P,E,R,O=e.css.valueOf(),B=b.ignoreErrors,F=O.length,U=0,G=[],M=[];function W(t){throw e.error("Unclosed "+t,U)}return{back:function(e){M.push(e)},endOfFile:function(){return 0===M.length&&U>=F},nextToken:function(e){if(M.length)return M.pop();if(U>=F)return;let b=!!e&&e.ignoreUnclosed;switch(A=O.charCodeAt(U),A){case r:case a:case c:case l:case s:N=U;do{N+=1,A=O.charCodeAt(N)}while(A===a||A===r||A===c||A===l||A===s);x=["space",O.slice(U,N)],U=N-1;break;case d:case u:case f:case m:case g:case y:case p:{let e=String.fromCharCode(A);x=[e,e,U];break}case h:if(R=G.length?G.pop()[1]:"",E=O.charCodeAt(U+1),"url"===R&&E!==t&&E!==n&&E!==a&&E!==r&&E!==c&&E!==s&&E!==l){N=U;do{if(D=!1,N=O.indexOf(")",N+1),-1===N){if(B||b){N=U;break}W("bracket")}for(P=N;O.charCodeAt(P-1)===o;)P-=1,D=!D}while(D);x=["brackets",O.slice(U,N+1),U,N],U=N}else N=O.indexOf(")",U+1),S=O.slice(U,N+1),-1===N||I.test(S)?x=["(","(",U]:(x=["brackets",S,U,N],U=N);break;case t:case n:_=A===t?"'":'"',N=U;do{if(D=!1,N=O.indexOf(_,N+1),-1===N){if(B||b){N=U+1;break}W("string")}for(P=N;O.charCodeAt(P-1)===o;)P-=1,D=!D}while(D);x=["string",O.slice(U,N+1),U,N],U=N;break;case C:w.lastIndex=U+1,w.test(O),N=0===w.lastIndex?O.length-1:w.lastIndex-2,x=["at-word",O.slice(U,N+1),U,N],U=N;break;case o:for(N=U,L=!0;O.charCodeAt(N+1)===o;)N+=1,L=!L;if(A=O.charCodeAt(N+1),L&&A!==i&&A!==a&&A!==r&&A!==c&&A!==l&&A!==s&&(N+=1,k.test(O.charAt(N)))){for(;k.test(O.charAt(N+1));)N+=1;O.charCodeAt(N+1)===a&&(N+=1)}x=["word",O.slice(U,N+1),U,N],U=N;break;default:A===i&&O.charCodeAt(U+1)===v?(N=O.indexOf("*/",U+2)+1,0===N&&(B||b?N=O.length:W("comment")),x=["comment",O.slice(U,N+1),U,N],U=N):(T.lastIndex=U+1,T.test(O),N=0===T.lastIndex?O.length-1:T.lastIndex-2,x=["word",O.slice(U,N+1),U,N],G.push(x),U=N)}return U++,x},position:function(){return U}}}},5799:(e,t,n)=>{t.__esModule=!0,t.default=void 0;var o,i=(o=n(4646))&&o.__esModule?o:{default:o},r=n(1581);function a(e,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},a(e,t)}var s=function(e){var t,n;function o(t){var n;return(n=e.call(this,t)||this).type=r.STRING,n}return n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,a(t,n),o}(i.default);t.default=s,e.exports=t.default},5868:(e,t,n)=>{n.d(t,{k:()=>l});var o=n(3077),i=n(8357),r=n(9736),a=n(8957),s=n(1863),c=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function l(e,t){var n=arguments;return c(this,arguments,void 0,function*(e,t,c=!1,l,d,u=999,h=0,p={concepts:[],connections:[]}){var f,m,y,v;const g=a.Logger.logfunction("MakeTheInstanceConceptLocal",n)||{};if(a.serviceWorker){g.serviceWorker=!0;try{const n=yield(0,a.sendMessage)("MakeTheInstanceConceptLocal",{type:e,referent:t,composition:c,userId:l,accessId:d,sessionInformationId:u,referentId:h,actions:p});return(null===(m=null===(f=null==n?void 0:n.actions)||void 0===f?void 0:f.concepts)||void 0===m?void 0:m.length)&&(p.concepts=JSON.parse(JSON.stringify(n.actions.concepts))),(null===(v=null===(y=null==n?void 0:n.actions)||void 0===y?void 0:y.connections)||void 0===v?void 0:v.length)&&(p.connections=JSON.parse(JSON.stringify(n.actions.connections))),a.Logger.logUpdate(g),n.data}catch(e){(0,s.ey)(g,"MakeTheInstanceConceptLocal",e),(0,a.handleServiceWorkerException)(e)}}try{let n,s,d=999,u=4,f=l,m=4,y="",v=t.length;if(y=e.startsWith("the_")?e:"the_"+e,c){n=yield(0,i.$)(e,d,l,l,p),s=yield(0,o.A)(t,e,l,u,n.id,m,!0,h,p)}else if(v>255){n=yield(0,i.$)(y,d,f,l,p),s=yield(0,o.A)(t,y,l,u,n.id,m,void 0,void 0,p)}else{n=yield(0,i.$)(y,d,f,l,p);let e=yield r.v.GetConceptByCharacterAndTypeLocal(t,n.id);if(s=e,0==e.id&&0==e.userId){s=yield(0,o.A)(t,y,l,u,n.id,m,void 0,void 0,p)}}return s.type=n,a.LocalSyncData.AddConcept(s),p.concepts.push(s),a.Logger.logUpdate(g),s}catch(e){throw(0,s.ey)(g,"MakeTheInstanceConceptLocal",e),e}})}},5976:(e,t,n)=>{n.d(t,{p:()=>u,B:()=>d});var o=n(9581),i=n(3518),r=n(1863),a=n(8957),s=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};var c=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};var l=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class d{static getId(){return l(this,void 0,void 0,function*(){if(this.ids.length<5)yield function(){var e=arguments;return c(this,void 0,void 0,function*(){const t=a.Logger.logfunction("GetReservedIds",e);try{let e=(0,i.Xr)("application/x-www-form-urlencoded");const n=yield fetch(o.B.GetReservedIdUrl(),{method:"GET",headers:e});if(!n.ok)throw(0,r.ry)(n),new Error(`Error! status: ${n.status}`);const s=yield n.json();for(let e=0;e<s.length;e++)d.AddId(s[e]);a.Logger.logUpdate(t)}catch(e){Error,(0,r.Mb)(e,o.B.GetReservedIdUrl()),(0,r.ey)(t,"GetReservedIds",e)}})}();var e=this.ids[0];return this.ids.shift(),e})}static AddId(e){this.ids.includes(e)||this.ids.push(e)}}d.ids=[];class u{static getId(){return l(this,void 0,void 0,function*(){if(this.connectionIds.length<5)yield function(){var e=arguments;return s(this,void 0,void 0,function*(){const t=a.Logger.logfunction("GetReservedConnectionIds",e);try{let e=(0,i.Xr)("application/x-www-form-urlencoded");const n=yield fetch(o.B.GetReservedConnectionIdUrl(),{method:"GET",headers:e});if(!n.ok)throw(0,r.ry)(n),new Error(`Error! status: ${n.status}`);const s=yield n.json();for(let e=0;e<s.length;e++)u.AddId(s[e]);a.Logger.logUpdate(t)}catch(e){Error,(0,r.Mb)(e,o.B.GetReservedConnectionIdUrl()),(0,r.ey)(t,"GetReservedConnectionIds",e)}})}();var e=this.connectionIds[0];return this.connectionIds.shift(),e})}static AddId(e){this.connectionIds.includes(e)||this.connectionIds.push(e)}}u.connectionIds=[]},6058:(e,t,n)=>{n.d(t,{W:()=>s});var o=n(1863),i=n(3518),r=n(8957),a=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function s(e){var t=arguments;return a(this,void 0,void 0,function*(){const n=r.Logger.logfunction("GetAllLinkerConnectionsToTheConcept",t);var a=[];try{(new Date).getTime();var s=(0,i.Xr)("application/x-www-form-urlencoded");const t=yield fetch(r.BaseUrl.GetAllLinkerConnectionToConceptUrl()+`?conceptId=${e}`,{method:"GET",headers:s});if(t.ok){const e=yield t.json();for(var c=0;c<e.length;c++){var l=e[c];a.push(l)}r.Logger.logUpdate(n)}else(0,o.ry)(t)}catch(e){Error,(0,o.Mb)(e,r.BaseUrl.GetAllLinkerConnectionToConceptUrl()),(0,o.ey)(n,"GetAllLinkerConnectionsToTheConcept",e)}return a})}},6156:e=>{let t={};e.exports=function(e){t[e]||(t[e]=!0,"undefined"!=typeof console&&console.warn)}},6191:(e,t,n)=>{n.d(t,{Al:()=>u,L2:()=>a,Ou:()=>s,cL:()=>c,eH:()=>h,kM:()=>p,l8:()=>l,ou:()=>m,sg:()=>f});var o=n(9581),i=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};const r=1,a="widgetCache",s="latestWidgetCache",c="recentWidgetCache",l="queryCache";let d=null;function u(){return new Promise((e,t)=>{if(d)return void e(d);const n=o.B.BASE_URL+"_CacheStore"+o.B.BASE_APPLICATION,i=indexedDB.open(n,r);i.onupgradeneeded=e=>{const t=e.target.result;t.objectStoreNames.contains(a)||t.createObjectStore(a,{keyPath:"id"}),t.objectStoreNames.contains(s)||t.createObjectStore(s,{keyPath:"id"}),t.objectStoreNames.contains(c)||t.createObjectStore(c,{keyPath:"id"}),t.objectStoreNames.contains(l)||t.createObjectStore(l)},i.onsuccess=t=>{d=t.target.result,e(d)},i.onerror=e=>{t(e)}})}function h(e,t,n){return i(this,void 0,void 0,function*(){const o=yield u();return new Promise((i,r)=>{const a=o.transaction(e,"readwrite").objectStore(e),s=void 0!==n?a.put(t,n):a.put(t);s.onsuccess=()=>i(),s.onerror=e=>{r(e)}})})}function p(e,t){return i(this,void 0,void 0,function*(){const n=yield u();return new Promise((o,i)=>{const r=n.transaction(e,"readwrite").objectStore(e).delete(t);r.onsuccess=()=>o(),r.onerror=e=>{i(e)}})})}function f(e){return i(this,void 0,void 0,function*(){const t=yield u();return new Promise((n,o)=>{const i=t.transaction(e,"readwrite").objectStore(e).clear();i.onsuccess=()=>n(),i.onerror=e=>{o(e)}})})}function m(e){return i(this,void 0,void 0,function*(){const t=yield u();return new Promise((n,o)=>{const i=t.transaction(e,"readonly").objectStore(e).getAll();i.onsuccess=()=>{var e;n(null!==(e=i.result)&&void 0!==e?e:[])},i.onerror=e=>{o(e)}})})}},6291:(e,t)=>{t.__esModule=!0,t.default=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];for(;n.length>0;){var i=n.shift();if(!e[i])return;e=e[i]}return e},e.exports=t.default},6416:(e,t,n)=>{n.d(t,{u:()=>i});var o=n(2615);function i(){let e=new Date,t=new Date;return new o.j(0,0,0,0,0,"0",0,!1,e,t,"0")}},6467:(e,t,n)=>{function o(e){const t=e.lastIndexOf("_");let n=[];if(t>0){n=[e.substring(0,t),e.substring(t+1,e.length)]}else n=[e];return n}n.d(t,{f:()=>o})},6687:(e,t,n)=>{n.d(t,{D:()=>T,MT:()=>w,Nt:()=>f,QL:()=>v,as:()=>m,cw:()=>u,dF:()=>d,hG:()=>y,km:()=>p,nr:()=>C,p8:()=>h,rv:()=>g});var o=n(8642),i=n(7467),r=n(8957),a=n(1863),s=n(5284),c=n(8939),l=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function d(){return l(this,arguments,void 0,function*(e=[]){yield(0,o.Y)(e);let t=[];for(let n=0;n<e.length;n++){let o=yield(0,c.kx)(e[n]);t.push(o)}return t})}function u(){return l(this,arguments,void 0,function*(e=[]){yield(0,o.Y)(e);let t=[];for(let n=0;n<e.length;n++){let o=yield(0,c.RW)(e[n]);t.push(o)}return t})}function h(){return l(this,arguments,void 0,function*(e=[],t=[]){const n=r.Logger.logfunction("GetCompositionFromConnectionsWithDataId",[e])||{};if(r.serviceWorker){n.serviceWorker=!0;try{const o=yield(0,r.sendMessage)("GetCompositionFromConnectionsWithDataId",{conceptIds:e,connectionIds:t});return r.Logger.logUpdate(n),o.data}catch(e){(0,a.ey)(n,"GetCompositionFromConnectionsWithDataId",e),(0,r.handleServiceWorkerException)(e)}}let o=[];for(let t=0;t<e.length;t++){let n=yield(0,c.RW)(e[t]);o.push(n)}return r.Logger.logUpdate(n),o})}function p(){var e=arguments;return l(this,arguments,void 0,function*(t=[],n=[]){const o=r.Logger.logfunction("GetCompositionFromConnectionsWithDataIdFromConnections",e)||{};if(r.serviceWorker){o.serviceWorker=!0;try{const e=yield(0,r.sendMessage)("GetCompositionFromConnectionsWithDataIdFromConnections",{conceptIds:t,connectionIds:n});return r.Logger.logUpdate(o),e.data}catch(e){(0,a.ey)(o,"GetCompositionFromConnectionsWithDataIdFromConnections",e),(0,r.handleServiceWorkerException)(e)}}let s=yield(0,i.j)(n),l=[];for(let e=0;e<t.length;e++){let n=yield(0,c.PT)(t[e],s);l.push(n)}return r.Logger.logUpdate(o),l})}function f(){var e=arguments;return l(this,arguments,void 0,function*(t=[],n=[]){const o=r.Logger.logfunction("GetCompositionFromConnectionsWithDataIdIndex",e)||{};if(r.serviceWorker){o.serviceWorker=!0;try{const e=yield(0,r.sendMessage)("GetCompositionFromConnectionsWithDataIdIndex",{conceptIds:t,connectionIds:n});return r.Logger.logUpdate(o),e.data}catch(e){(0,a.ey)(o,"GetCompositionFromConnectionsWithDataIdIndex",e),(0,r.handleServiceWorkerException)(e)}}yield(0,i.j)(n),yield(0,s.B)(t);let l={};for(let e=0;e<t.length;e++){let n=yield(0,c.RW)(t[e]);l[t[e]]=n}return r.Logger.logUpdate(o),l})}function m(){return l(this,arguments,void 0,function*(e=[],t=[]){yield(0,i.j)(t),yield(0,s.B)(e);let n={};for(let t=0;t<e.length;t++){let o=yield(0,c.kx)(e[t]);n[e[t]]=o}return n})}function y(){return l(this,arguments,void 0,function*(e=[],t=[]){if(r.serviceWorker)try{return(yield(0,r.sendMessage)("GetCompositionFromConnectionsWithIndexFromConnections",{conceptIds:e,connectionIds:t})).data}catch(e){(0,r.handleServiceWorkerException)(e)}let n=yield(0,i.j)(t),o=[];for(let t=0;t<e.length;t++){let i=yield(0,c.JA)(e[t],n);o[e[t]]=i}return o})}function v(e){var t=arguments;return l(this,void 0,void 0,function*(){const n=r.Logger.logfunction("GetConnectionDataPrefetch",t)||{};if(r.serviceWorker){n.serviceWorker=!0;try{const t=yield(0,r.sendMessage)("GetConnectionDataPrefetch",{connectionIds:e});return r.Logger.logUpdate(n),t.data}catch(e){(0,a.ey)(n,"GetConnectionDataPrefetch",e),(0,r.handleServiceWorkerException)(e)}}let o=[],s=[],c={};for(let t=0;t<e.length;t++){let n=yield r.ConnectionData.GetConnection(e[t]);0==n.id?o.push(e[t]):s.push(n)}for(let t=0;t<o.length;t++)c[e[t]]=!1;let l=[],d=yield(0,i.j)(o);s=[...s,...d];for(let e=0;e<s.length;e++)l.push(s[e].ofTheConceptId),l.push(s[e].toTheConceptId),l.push(s[e].typeId);return yield(0,r.GetConceptBulk)(l),r.Logger.logUpdate(n),s})}function g(){var e=arguments;return l(this,arguments,void 0,function*(t=[],n=[]){const o=r.Logger.logfunction("GetCompositionFromConnectionsWithDataIdInObject",e);yield(0,i.j)(n);let a={};for(let e=0;e<t.length;e++){let n=yield(0,c.RW)(t[e]);a[t[e]]=n}return r.Logger.logUpdate(o),a})}function C(){return l(this,arguments,void 0,function*(e=[],t=[]){yield(0,i.j)(t);let n={};for(let t=0;t<e.length;t++){let o=yield(0,c.$N)(e[t]);n[e[t]]=o}return n})}function w(){return l(this,arguments,void 0,function*(e=[],t=[]){yield(0,i.j)(t);let n={};for(let t=0;t<e.length;t++){let o=yield(0,c.kx)(e[t]);n[e[t]]=o}return n})}function T(){return l(this,arguments,void 0,function*(e=[],t=[]){yield(0,i.j)(t);let n={};for(let t=0;t<e.length;t++){let o=yield(0,c.XI)(e[t]);n[e[t]]=o}return n})}},6731:(e,t,n)=>{n.d(t,{b:()=>o});class o{constructor(e,t,n,o){this.variants=[],this.height=1,this.key=e,this.value=t,this.leftNode=n,this.rightNode=o,this.currentNode=null}addCurrentNode(e,t){return null==t?t=e:(e.value.typeId!=t.value.typeId&&(t.currentNode=this.addCurrentNode(e,t.currentNode)),t)}addCurrentNodeType(e,t){if(null==t)return t=e;let n=!1;for(let o=0;o<t.variants.length;o++)t.variants[o].value.id==e.value.id&&(n=!0);return n||t.variants.push(e),t}addNode(e,t,n){if(null==t)return t=e;let o=t.leftNode,i=t.rightNode;if(t.key>e.key)t.leftNode=this.addNode(e,o,n);else{if(!(t.key<e.key))return t;t.rightNode=this.addNode(e,i,n)}t.height=1+Math.max(this.getHeight(t.leftNode),this.getHeight(t.rightNode));let r=this.getBalanceFactor(t);if(r>1&&t.leftNode){if(e.key<t.leftNode.key)return this.rightRotate(t);if(e.key>t.leftNode.key)return t.leftNode=this.leftRotate(t.leftNode),this.rightRotate(t)}if(r<-1&&t.rightNode){if(e.key>t.rightNode.key)return this.leftRotate(t);if(e.key<t.rightNode.key)return t.rightNode=this.rightRotate(t.rightNode),this.leftRotate(t)}return t}checkIfIdsInNode(e,t,n,o){if(e){if(t.includes(e.key)){n.push(e.value);let o=t.indexOf(e.key);t.splice(o,1)}e.leftNode&&this.checkIfIdsInNode(e.leftNode,t,n,o),e.rightNode&&this.checkIfIdsInNode(e.rightNode,t,n,o)}}addCharacterNode(e,t,n){let o=!1;if(""!=e.value.characterValue){if(null==t)return t=e;let o=t.leftNode,i=t.rightNode;if(t.key>e.key)t.leftNode=this.addCharacterNode(e,o,n);else{if(!(t.key<e.key))return t.key==e.key&&""!=t.key&&t.value.id!=e.value.id&&t.addCurrentNodeType(e,t),t;t.rightNode=this.addCharacterNode(e,i,n)}t.height=1+Math.max(this.getHeight(t.leftNode),this.getHeight(t.rightNode));let r=this.getBalanceFactor(t);if(r>1&&t.leftNode){if(e.key<t.leftNode.key){return this.rightRotate(t)}if(e.key>t.leftNode.key){return t.leftNode=this.leftRotate(t.leftNode),this.rightRotate(t)}}if(r<-1&&t.rightNode){if(e.key>t.rightNode.key){return this.leftRotate(t)}if(e.key<t.rightNode.key){return t.rightNode=this.rightRotate(t.rightNode),this.leftRotate(t)}}}else o;return t}addTypeNode(e,t,n){let o=!1;if(0!=e.value.typeId){if(null==t)return t=e;let o=t.leftNode,i=t.rightNode;if(t.key>e.key)t.leftNode=this.addTypeNode(e,o,n);else{if(!(t.key<e.key))return t.key==e.key&&0!=t.key&&t.value.id!=e.value.id&&t.addCurrentNodeType(e,t),t;t.rightNode=this.addTypeNode(e,i,n)}t.height=1+Math.max(this.getHeight(t.leftNode),this.getHeight(t.rightNode));let r=this.getBalanceFactor(t);if(r>1&&t.leftNode){if(e.key<t.leftNode.key){return this.rightRotate(t)}if(e.key>t.leftNode.key){return t.leftNode=this.leftRotate(t.leftNode),this.rightRotate(t)}}if(r<-1&&t.rightNode){if(e.key>t.rightNode.key){return this.leftRotate(t)}if(e.key<t.rightNode.key){return t.rightNode=this.rightRotate(t.rightNode),this.leftRotate(t)}}}else o;return t}rightRotate(e){if(e){let t=e.leftNode;if(t){let n=t.rightNode;return e.leftNode=n,t.rightNode=e,e.height=Math.max(this.getHeight(e.leftNode),this.getHeight(e.rightNode))+1,t.height=Math.max(this.getHeight(t.leftNode),this.getHeight(t.rightNode))+1,t}}return e}leftRotate(e){if(e){let t=e.rightNode;if(t){let n=t.leftNode;return t.leftNode=e,e.rightNode=n,e.height=Math.max(this.getHeight(e.leftNode),this.getHeight(e.rightNode))+1,t.height=Math.max(this.getHeight(t.leftNode),this.getHeight(e.rightNode))+1,t}}return e}getHeight(e){return e?e.height:0}getBalanceFactor(e){return null==e?0:this.getHeight(e.leftNode)-this.getHeight(e.rightNode)}getFromNode(e,t){return t?e==t.key?t:e<t.key?this.getFromNode(e,t.leftNode):e>t.key?this.getFromNode(e,t.rightNode):t:t}getCharacterFromNode(e,t){return t?e==t.key?t:e<t.key?this.getCharacterFromNode(e,t.leftNode):e>t.key?this.getCharacterFromNode(e,t.rightNode):t:t}getCharacterFromNodeUpdated(e,t){var n;return t?e==t.key||51==(null===(n=t.value)||void 0===n?void 0:n.typeId)?t:e<t.key?this.getCharacterFromNode(e,t.leftNode):e>t.key?this.getCharacterFromNode(e,t.rightNode):t:t}getFromNodeWithCharacterAndType(e,t,n){if(e=`${e}`,n){if(e==n.key){if(e==n.value.characterValue&&t==n.value.typeId)return n;for(let e=0;e<n.variants.length;e++)if(n.variants[e].value.typeId==t)return n.variants[e]}else{if(e<n.key)return this.getFromNodeWithCharacterAndType(e,t,n.leftNode);if(e>n.key)return this.getFromNodeWithCharacterAndType(e,t,n.rightNode)}return null}return n}getFromNodeWithCharacterAndCategory(e,t,n){if(e=`${e}`,n){if(e==n.key){if(e==n.value.characterValue&&t==n.value.categoryId)return n;for(let e=0;e<n.variants.length;e++)if(n.variants[e].value.categoryId==t)return n.variants[e]}else{if(e<n.key)return this.getFromNodeWithCharacterAndCategory(e,t,n.leftNode);if(e>n.key)return this.getFromNodeWithCharacterAndCategory(e,t,n.rightNode)}return null}return n}removeNode(e,t){if(null==e)return e;if(e.key>t)return e.leftNode=this.removeNode(e.leftNode,t),e;if(e.key<t)return e.rightNode=this.removeNode(e.rightNode,t),e;if(null==e.leftNode){let t=e.rightNode;return e=null,t}if(null==e.rightNode){let t=e.leftNode;return e=null,t}{let t=this.inOrderSuccessor(e.rightNode);return e.value=t.value,e.key=t.key,e.variants=t.variants,e.currentNode=t.currentNode,e.rightNode=this.removeNode(e.rightNode,t.key),e}}removeNodeWithVariants(e,t,n){if(null==e)return e;if(e.key>t)return e.leftNode=this.removeNodeWithVariants(e.leftNode,t,n),e;if(e.key<t)return e.rightNode=this.removeNodeWithVariants(e.rightNode,t,n),e;if(e.variants.length>0)if(e.value.id==n){let t=e.variants[0];if(t)return e.value=t.value,e.key=t.key,e.currentNode=t.currentNode,e.variants.splice(0,1),e}else for(let t=0;t<e.variants.length;t++)if(n==e.variants[t].value.id)return e.variants.splice(t,1),e;if(null==e.leftNode){let t=e.rightNode;return e=null,t}if(null==e.rightNode){let t=e.leftNode;return e=null,t}{let t=this.inOrderSuccessor(e.rightNode);return e.value=t.value,e.key=t.key,e.variants=t.variants,e.currentNode=t.currentNode,e.rightNode=this.removeNodeWithVariants(e.rightNode,t.key,n),e}}countNodeBelow(e){return null==e?0:1+this.countNodeBelow(e.leftNode)+this.countNodeBelow(e.rightNode)}inOrderSuccessor(e){for(;null!=e.leftNode;)e=e.leftNode;return e}}},6846:(e,t,n)=>{let o=n(145),i=n(6966),r=n(4211),a=n(5644);class s{constructor(e=[]){this.version="8.5.6",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let n of e)if(!0===n.postcss?n=n():n.postcss&&(n=n.postcss),"object"==typeof n&&Array.isArray(n.plugins))t=t.concat(n.plugins);else if("object"==typeof n&&n.postcssPlugin)t.push(n);else if("function"==typeof n)t.push(n);else{if("object"!=typeof n||!n.parse&&!n.stringify)throw new Error(n+" is not a PostCSS plugin")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new i(this,e,t):new r(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}e.exports=s,s.default=s,a.registerProcessor(s),o.registerProcessor(s)},6915:(e,t,n)=>{function o(e,t="DESC"){return"ASC"==t?e.sort(function(e,t){return e.id-t.id}):e.sort(function(e,t){return t.id-e.id}),e}n.d(t,{X:()=>o})},6963:(e,t,n)=>{n.d(t,{f:()=>a});var o=n(205),i=n(6731),r=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class a{static waitForDataToLoad(){return r(this,void 0,void 0,function*(){return new Promise((e,t)=>{this.checkFlag(e),setTimeout(()=>{t("not")},25e3)})})}static checkFlag(e){if(o.B.isCharacterLoaded)return e("done");setTimeout(a.checkFlag,1e3,e)}static addNodeToTree(e){return r(this,void 0,void 0,function*(){return null==this.characterRoot?(this.characterRoot=e,this.characterRoot):(this.characterRoot=this.characterRoot.addCharacterNode(e,this.characterRoot,this.characterRoot.height),this.characterRoot)})}static removeNodeByCharacter(e,t){return r(this,void 0,void 0,function*(){this.characterRoot&&this.characterRoot.removeNodeWithVariants(this.characterRoot,e,t)})}static countNumberOfNodes(){return this.characterRoot?this.characterRoot.countNodeBelow(this.characterRoot):0}static addConceptToTree(e){if(""!=e.characterValue){var t=new i.b(e.characterValue,e,null,null);this.addNodeToTree(t)}}static getNodeFromTree(e){return this.characterRoot?this.characterRoot.getCharacterFromNode(e,this.characterRoot):this.characterRoot}static getNodeFromTreeUpdated(e){return this.characterRoot?this.characterRoot.getCharacterFromNode(e,this.characterRoot):this.characterRoot}static getCharacterAndTypeFromTree(e,t){return r(this,void 0,void 0,function*(){return this.characterRoot?this.characterRoot.getFromNodeWithCharacterAndType(e,t,this.characterRoot):this.characterRoot})}static getCharacterAndCategoryFromTree(e,t){return r(this,void 0,void 0,function*(){return this.characterRoot?this.characterRoot.getFromNodeWithCharacterAndCategory(e,t,this.characterRoot):this.characterRoot})}static removeConceptCharacter(e){this.characterRoot&&(this.characterRoot=this.characterRoot.removeNode(this.characterRoot,e))}}a.characterRoot=null},6966:(e,t,n)=>{let o=n(7793),i=n(145),r=n(3604),a=n(9577),s=n(3717),c=n(5644),l=n(3303),{isClean:d,my:u}=n(4151);n(6156);const h={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},p={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},f={Once:!0,postcssPlugin:!0,prepare:!0};function m(e){return"object"==typeof e&&"function"==typeof e.then}function y(e){let t=!1,n=h[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,0,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,0,n+"Exit"]:[n,n+"Exit"]}function v(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:y(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function g(e){return e[d]=!1,e.nodes&&e.nodes.forEach(e=>g(e)),e}let C={};class w{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(e,t,n){let i;if(this.stringified=!1,this.processed=!1,"object"!=typeof t||null===t||"root"!==t.type&&"document"!==t.type)if(t instanceof w||t instanceof s)i=g(t.root),t.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=t.map);else{let e=a;n.syntax&&(e=n.syntax.parse),n.parser&&(e=n.parser),e.parse&&(e=e.parse);try{i=e(t,n)}catch(e){this.processed=!0,this.error=e}i&&!i[u]&&o.rebuild(i)}else i=g(t);this.result=new s(e,i,n),this.helpers={...C,postcss:C,result:this.result},this.plugins=this.processor.plugins.map(e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let n=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin?n.postcssVersion:(e.plugin=n.postcssPlugin,e.setMessage())}catch(e){console&&console.error}return e}prepareVisitors(){this.listeners={};let e=(e,t,n)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,n])};for(let t of this.plugins)if("object"==typeof t)for(let n in t){if(!p[n]&&/^[A-Z]/.test(n))throw new Error(`Unknown event ${n} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!f[n])if("object"==typeof t[n])for(let o in t[n])e(t,"*"===o?n:n+"-"+o.toLowerCase(),t[n][o]);else"function"==typeof t[n]&&e(t,n,t[n])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],n=this.runOnRoot(t);if(m(n))try{await n}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[d];){e[d]=!0;let t=[v(e)];for(;t.length>0;){let e=this.visitTick(t);if(m(e))try{await e}catch(e){let n=t[t.length-1].node;throw this.handleError(e,n)}}}if(this.listeners.OnceExit)for(let[t,n]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map(e=>n(e,this.helpers));await Promise.all(t)}else await n(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));return m(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=l;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let n=new r(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){if(m(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[d];)e[d]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[n,o]of e){let e;this.result.lastPlugin=n;try{e=o(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(m(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:n,visitors:o}=t;if("root"!==n.type&&"document"!==n.type&&!n.parent)return void e.pop();if(o.length>0&&t.visitorIndex<o.length){let[e,i]=o[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===o.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return i(n.toProxy(),this.helpers)}catch(e){throw this.handleError(e,n)}}if(0!==t.iterator){let o,i=t.iterator;for(;o=n.nodes[n.indexes[i]];)if(n.indexes[i]+=1,!o[d])return o[d]=!0,void e.push(v(o));t.iterator=0,delete n.indexes[i]}let i=t.events;for(;t.eventIndex<i.length;){let e=i[t.eventIndex];if(t.eventIndex+=1,0===e)return void(n.nodes&&n.nodes.length&&(n[d]=!0,t.iterator=n.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[d]=!0;let t=y(e);for(let n of t)if(0===n)e.nodes&&e.each(e=>{e[d]||this.walkSync(e)});else{let t=this.listeners[n];if(t&&this.visitSync(t,e.toProxy()))return}}warnings(){return this.sync().warnings()}}w.registerPostcss=e=>{C=e},e.exports=w,w.default=w,c.registerLazyResult(w),i.registerLazyResult(w)},7071:(e,t,n)=>{t.__esModule=!0,t.default=void 0;var o,i=(o=n(4646))&&o.__esModule?o:{default:o},r=n(1581);function a(e,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},a(e,t)}var s=function(e){var t,n;function o(t){var n;return(n=e.call(this,t)||this).type=r.ID,n}return n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,a(t,n),o.prototype.valueToString=function(){return"#"+e.prototype.valueToString.call(this)},o}(i.default);t.default=s,e.exports=t.default},7139:(e,t,n)=>{n.d(t,{r:()=>d});var o=n(3026),i=n(9581),r=n(8957),a=n(1863),s=n(1596),c=n(4024),l=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function d(e){var t=arguments;return l(this,void 0,void 0,function*(){const n=r.Logger.logfunction("GetConcept",t)||{};let d=(0,r.CreateDefaultConcept)();const u=new FormData;u.append("id",e.toString());try{if(r.serviceWorker){n.serviceWorker=!0;try{const t=yield(0,r.sendMessage)("GetConcept",{id:e});return r.Logger.logUpdate(n),t.data}catch(e){(0,a.ey)(n,"GetConcept",e),(0,r.handleServiceWorkerException)(e)}}if(0==e||null==e||null==e)return d;var h=yield o.I.GetConcept(e);let t=o.I.GetNpc(e);if(0!=h.id||t)return r.Logger.logUpdate(n),h;{let t;const h={method:"POST",body:u,headers:{Authorization:"Bearer "+c.b.BearerAccessToken}};try{t=yield fetch(i.B.GetConceptUrl(),h)}catch(e){t=yield(0,s.g)(h,"/api/getConcept")}return yield function(e,t,n,i){return l(this,void 0,void 0,function*(){return e.ok?(t=yield e.json()).id>0?o.I.AddConcept(t):o.I.AddNpc(i):(0,a.ry)(e),r.Logger.logUpdate(n),t})}(t,d,n,e)}}catch(e){Error,(0,a.Mb)(e,i.B.GetConceptUrl()),(0,a.ey)(n,"GetConcept",e)}})}},7149:(e,t,n)=>{t.__esModule=!0,t.default=void 0;var o,i=(o=n(8349))&&o.__esModule?o:{default:o},r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=a(t);if(n&&n.has(e))return n.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var s=i?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(o,r,s):o[r]=e[r]}o.default=e,n&&n.set(e,o);return o}(n(680));function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(a=function(e){return e?n:t})(e)}var s=function(e){return new i.default(e)};Object.assign(s,r),delete s.__esModule;var c=s;t.default=c,e.exports=t.default},7273:(e,t,n)=>{n.d(t,{z:()=>i});var o=n(9581);class i{constructor(e,t,n,i){this.url=o.B.BASE_URL,this.message=e,this.ok=t,this.status=n,this.data=i}getMessage(){return this.message}setMessage(e){return this.message=e,this}getStatus(){return this.status}setStatus(e){return this.status=e,this}getData(){return this.data}setData(e){return this.data=e,this}getOk(){return this.ok}setOk(e){return this.ok=e,this}getUrl(){return this.url}setUrl(e){return this.url=e,this}}},7282:(e,t,n)=>{n.d(t,{Y:()=>r,o:()=>i});var o=n(2615);function i(){let e=r(new Date),t=r(new Date);return new o.j(0,0,0,0,0,"0",0,!1,e,t,"0")}function r(e){const t=e.getMonth()+1,n=e.getDate(),o=e.getFullYear();let i=e.getHours();const r=e.getMinutes(),a=e.getSeconds(),s=i>=12?"PM":"AM";i%=12,i=i||12;const c=e=>e.toString().padStart(2,"0");return`${t}/${n}/${o} ${i}:${c(r)}:${c(a)} ${s}`}},7324:(e,t,n)=>{t.__esModule=!0,t.default=void 0;var o,i=(o=n(3631))&&o.__esModule?o:{default:o},r=n(1581);function a(e,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},a(e,t)}var s=function(e){var t,n;function o(t){var n;return(n=e.call(this,t)||this).type=r.PSEUDO,n}return n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,a(t,n),o.prototype.toString=function(){var e=this.length?"("+this.map(String).join(",")+")":"";return[this.rawSpaceBefore,this.stringifyProperty("value"),e,this.rawSpaceAfter].join("")},o}(i.default);t.default=s,e.exports=t.default},7467:(e,t,n)=>{n.d(t,{j:()=>u});var o=n(8286),i=n(9581),r=n(4364),a=n(3518),s=n(1863),c=n(8957),l=n(1596),d=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function u(){return d(this,arguments,void 0,function*(e=[]){const t=c.Logger.logfunction("GetConnectionBulk",e.length)||{};let n=[];try{if(c.serviceWorker){t.serviceWorker=!0;try{const n=yield(0,c.sendMessage)("GetConnectionBulk",{connectionIds:e});return c.Logger.logUpdate(t),n.data}catch(e){(0,s.ey)(t,"GetConnectionBulk",e),(0,c.handleServiceWorkerException)(e)}}if(e.length>0){let r=[];for(let t=0;t<e.length;t++)if(!o.d.GetNpConn(e[t])){let i=yield o.d.GetConnection(e[t]);0==i.id?r.push(e[t]):n.push(i)}if(0==r.length)return c.Logger.logUpdate(t),n;{let e;const u={method:"POST",headers:(0,a.Xr)(),body:JSON.stringify(r)};try{e=yield fetch(i.B.GetConnectionBulkUrl(),u)}catch(t){e=yield(0,l.g)(u,"/api/get_connection_bulk")}yield function(e,t,n){return d(this,void 0,void 0,function*(){if(e.ok){const n=yield e.json();if(n.length>0)for(let e=0;e<n.length;e++){let i=n[e];t.push(i),o.d.AddConnection(i)}}else(0,s.ey)(n,"GetConnectionBulk",e.status),(0,s.ry)(e)})}(e,n,t),c.Logger.logUpdate(t)}}}catch(e){Error,(0,s.ey)(t,"GetConnectionBulk",e),(0,s.Mb)(e,i.B.GetConnectionBulkUrl())}return yield(0,r.s)(n),n})}},7668:e=>{const t={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};class n{constructor(e){this.builder=e}atrule(e,t){let n="@"+e.name,o=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?n+=e.raws.afterName:o&&(n+=" "),e.nodes)this.block(e,n+o);else{let i=(e.raws.between||"")+(t?";":"");this.builder(n+o+i,e)}}beforeAfter(e,t){let n;n="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let o=e.parent,i=0;for(;o&&"root"!==o.type;)i+=1,o=o.parent;if(n.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<i;e++)n+=t}return n}block(e,t){let n,o=this.raw(e,"between","beforeOpen");this.builder(t+o+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),n=this.raw(e,"after")):n=this.raw(e,"after","emptyBody"),n&&this.builder(n),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let n=this.raw(e,"semicolon");for(let o=0;o<e.nodes.length;o++){let i=e.nodes[o],r=this.raw(i,"before");r&&this.builder(r),this.stringify(i,t!==o||n)}}comment(e){let t=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+n+"*/",e)}decl(e,t){let n=this.raw(e,"between","colon"),o=e.prop+n+this.rawValue(e,"value");e.important&&(o+=e.raws.important||" !important"),t&&(o+=";"),this.builder(o,e)}document(e){this.body(e)}raw(e,n,o){let i;if(o||(o=n),n&&(i=e.raws[n],void 0!==i))return i;let r=e.parent;if("before"===o){if(!r||"root"===r.type&&r.first===e)return"";if(r&&"document"===r.type)return""}if(!r)return t[o];let a=e.root();if(a.rawCache||(a.rawCache={}),void 0!==a.rawCache[o])return a.rawCache[o];if("before"===o||"after"===o)return this.beforeAfter(e,o);{let t="raw"+((s=o)[0].toUpperCase()+s.slice(1));this[t]?i=this[t](a,e):a.walk(e=>{if(i=e.raws[n],void 0!==i)return!1})}var s;return void 0===i&&(i=t[o]),a.rawCache[o]=i,i}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let n;return e.walkComments(e=>{if(void 0!==e.raws.before)return n=e.raws.before,n.includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),void 0===n?n=this.raw(t,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeDecl(e,t){let n;return e.walkDecls(e=>{if(void 0!==e.raws.before)return n=e.raws.before,n.includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),void 0===n?n=this.raw(t,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1}),t}rawBeforeRule(e){let t;return e.walk(n=>{if(n.nodes&&(n.parent!==e||e.first!==n)&&void 0!==n.raws.before)return t=n.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(n=>{let o=n.parent;if(o&&o!==e&&o.parent&&o.parent===e&&void 0!==n.raws.before){let e=n.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1}),t}rawValue(e,t){let n=e[t],o=e.raws[t];return o&&o.value===n?o.raw:n}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}}e.exports=n,n.default=n},7793:(e,t,n)=>{let o,i,r,a,s=n(9371),c=n(5238),l=n(3152),{isClean:d,my:u}=n(4151);function h(e){return e.map(e=>(e.nodes&&(e.nodes=h(e.nodes)),delete e.source,e))}function p(e){if(e[d]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)p(t)}class f extends l{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,n,o=this.getIterator();for(;this.indexes[o]<this.proxyOf.nodes.length&&(t=this.indexes[o],n=e(this.proxyOf.nodes[t],t),!1!==n);)this.indexes[o]+=1;return delete this.indexes[o],n}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...n)=>e[t](...n.map(e=>"function"==typeof e?(t,n)=>e(t.toProxy(),n):e)):"every"===t||"some"===t?n=>e[t]((e,...t)=>n(e.toProxy(),...t)):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map(e=>e.toProxy()):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,n)=>(e[t]===n||(e[t]=n,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let n,o=this.index(e),i=this.normalize(t,this.proxyOf.nodes[o]).reverse();o=this.index(e);for(let e of i)this.proxyOf.nodes.splice(o+1,0,e);for(let e in this.indexes)n=this.indexes[e],o<n&&(this.indexes[e]=n+i.length);return this.markDirty(),this}insertBefore(e,t){let n,o=this.index(e),i=0===o&&"prepend",r=this.normalize(t,this.proxyOf.nodes[o],i).reverse();o=this.index(e);for(let e of r)this.proxyOf.nodes.splice(o,0,e);for(let e in this.indexes)n=this.indexes[e],o<=n&&(this.indexes[e]=n+r.length);return this.markDirty(),this}normalize(e,t){if("string"==typeof e)e=h(i(e).nodes);else if(void 0===e)e=[];else if(Array.isArray(e)){e=e.slice(0);for(let t of e)t.parent&&t.parent.removeChild(t,"ignore")}else if("root"===e.type&&"document"!==this.type){e=e.nodes.slice(0);for(let t of e)t.parent&&t.parent.removeChild(t,"ignore")}else if(e.type)e=[e];else if(e.prop){if(void 0===e.value)throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new c(e)]}else if(e.selector||e.selectors)e=[new a(e)];else if(e.name)e=[new o(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new s(e)]}return e.map(e=>(e[u]||f.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[d]&&p(e),e.raws||(e.raws={}),void 0===e.raws.before&&t&&void 0!==t.raws.before&&(e.raws.before=t.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let n in this.indexes)t=this.indexes[n],t>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}replaceValues(e,t,n){return n||(n=t,t={}),this.walkDecls(o=>{t.props&&!t.props.includes(o.prop)||t.fast&&!o.value.includes(t.fast)||(o.value=o.value.replace(e,n))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,n)=>{let o;try{o=e(t,n)}catch(e){throw t.addToError(e)}return!1!==o&&t.walk&&(o=t.walk(e)),o})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((n,o)=>{if("atrule"===n.type&&e.test(n.name))return t(n,o)}):this.walk((n,o)=>{if("atrule"===n.type&&n.name===e)return t(n,o)}):(t=e,this.walk((e,n)=>{if("atrule"===e.type)return t(e,n)}))}walkComments(e){return this.walk((t,n)=>{if("comment"===t.type)return e(t,n)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((n,o)=>{if("decl"===n.type&&e.test(n.prop))return t(n,o)}):this.walk((n,o)=>{if("decl"===n.type&&n.prop===e)return t(n,o)}):(t=e,this.walk((e,n)=>{if("decl"===e.type)return t(e,n)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((n,o)=>{if("rule"===n.type&&e.test(n.selector))return t(n,o)}):this.walk((n,o)=>{if("rule"===n.type&&n.selector===e)return t(n,o)}):(t=e,this.walk((e,n)=>{if("rule"===e.type)return t(e,n)}))}}f.registerParse=e=>{i=e},f.registerRule=e=>{a=e},f.registerAtRule=e=>{o=e},f.registerRoot=e=>{r=e},e.exports=f,f.default=f,f.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,o.prototype):"rule"===e.type?Object.setPrototypeOf(e,a.prototype):"decl"===e.type?Object.setPrototypeOf(e,c.prototype):"comment"===e.type?Object.setPrototypeOf(e,s.prototype):"root"===e.type&&Object.setPrototypeOf(e,r.prototype),e[u]=!0,e.nodes&&e.nodes.forEach(e=>{f.rebuild(e)})}},7820:(e,t,n)=>{n.d(t,{G:()=>a});var o=n(205),i=n(2515),r=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class a{static addNodeToTree(e){if(null==this.root)return this.root=e,this.root;this.root=this.root.addNode(e,this.root,this.root.height)}static addConceptToTree(e){var t=new i.x(e.ghostId,e,null,null);this.addNodeToTree(t)}static waitForDataToLoad(){return r(this,void 0,void 0,function*(){return new Promise((e,t)=>{this.checkFlag(e),setTimeout(()=>{t("not")},25e3)})})}static checkFlag(e){if(o.B.isLocalDataLoaded)return e("done");setTimeout(a.checkFlag,1e3,e)}static getNodeFromTree(e){return r(this,void 0,void 0,function*(){return this.root?this.root.getFromNode(e,this.root):null})}static removeNodeFromTree(e){return r(this,void 0,void 0,function*(){this.root&&(this.root=this.root.removeNode(this.root,e))})}}a.root=null},7869:(e,t,n)=>{n.d(t,{_:()=>m,A:()=>f});var o=n(9581),i=n(3026),r=n(1863),a=n(3518),s=n(8957),c=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};var l=n(2299);class d{}d.isUpdated=!1,d.isOnlineSync=!1;var u=n(3655),h=n(9003),p=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function f(){return p(this,arguments,void 0,function*(e=!0){try{if(yield(0,u.qI)("concepts"),yield(0,h.qI)("concepts"),e){if((yield(0,u.b8)()).isOnlineSync)return!0;yield function(){return c(this,void 0,void 0,function*(){const e=s.Logger.logfunction("GetAiData");try{(new Date).getTime();var t=(0,a.ab)("application/x-www-form-urlencoded");const c=yield fetch(o.B.GetAllAiData(),{method:"GET",headers:t});c.ok||(0,r.ry)(c);const l=yield c.json();for(var n=0;n<l.length;n++)i.I.AddConcept(l[n]);m(),(new Date).getTime(),s.Logger.logUpdate(e)}catch(e){Error,(0,r.Mb)(e,o.B.GetAllAiData())}})}()}return!0}catch(e){return!0}})}function m(){return p(this,void 0,void 0,function*(){d.isOnlineSync=!0;var e=new l.B(d.isOnlineSync);(0,u.El)(e)})}},7876:(e,t,n)=>{n.d(t,{A:()=>d,K:()=>u});var o=n(1735),i=n(7139),r=n(8957),a=n(3026),s=n(7282),c=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};const l=new Map;function d(e){return c(this,arguments,void 0,function*(e,t=999){e=Number(e);let n=performance.now();if(o.J.activateStatus)try{o.J.incrementConcept(e)}catch(e){r.Logger.log("ERROR","Error Adding Connection")}if(e>0){const t=yield r.BinaryTree.getNodeFromTree(e);if((null==t?void 0:t.value)&&t.value.id>0)return t.value}if(r.serviceWorker)try{const n=(yield(0,r.sendMessage)("GetTheConcept",{id:e,userId:t})).data;return n&&n.id>0&&a.I.AddConceptToMemory(n),n}catch(e){(0,r.handleServiceWorkerException)(e)}let d=(0,s.o)();if(l.has(e))return l.get(e)||d;const u=(()=>c(this,void 0,void 0,function*(){try{if(e<0){return yield r.LocalConceptsData.GetConceptByGhostId(e)}if(d=yield a.I.GetConcept(e),(null==d||0==d.id)&&null!=e&&null!=e){let t=yield(0,i.r)(e);d=t}if(0!=d.id&&null==d.type){if(null==(yield a.I.GetConcept(d.typeId))&&null!=d.typeId&&null!=d.typeId){let e=yield(0,i.r)(d.typeId);d.type=e}}return d}catch(o){throw r.Logger.logError(n,t,"read","unknown",void 0,500,o,"GetTheConcept",[e,t],"unknown",void 0),o}finally{l.delete(e)}}))();return l.set(e,u),u})}function u(e){return c(this,void 0,void 0,function*(){if(r.serviceWorker)try{return(yield(0,r.sendMessage)("AddTypeConcept",{concept:e})).data}catch(e){(0,r.handleServiceWorkerException)(e)}if(null==e.type){let t=yield a.I.GetConcept(e.typeId);if(0==t.id&&0!=e.typeId&&999!=e.typeId){let t=yield(0,i.r)(e.typeId);e.type=t}else e.type=t}})}},7887:(e,t,n)=>{n.d(t,{a:()=>d,p:()=>u});var o=n(8286),i=n(4864),r=n(3655),a=n(9581),s=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};const c=500;function l(){return new Promise(e=>setTimeout(e,0))}function d(){return s(this,void 0,void 0,function*(){try{let e=[];if(a.B.isPwa&&(e=yield(0,r.D3)("connection")),Array.isArray(e))for(let t=0;t<e.length;t++)o.d.AddConnectionToMemory(e[t]),t>0&&t%c===0&&(yield l())}catch(e){throw{message:"Cannot create Connection Binary Tree Concept",ok:!1,status:400,data:e}}})}function u(){return s(this,void 0,void 0,function*(){try{let e=[];if(Array.isArray(e))for(let t=0;t<e.length;t++)i.G.AddConnectionToMemory(e[t])}catch(e){throw{message:"Cannot create Local Connection Binary Tree Concept",ok:!1,status:400,data:e}}})}},8064:(e,t,n)=>{n.d(t,{$I:()=>s,Ay:()=>a});var o=n(9736),i=(n(9581),n(3518),n(8957));n(1863);var r=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function a(e){return r(this,void 0,void 0,function*(){return yield o.v.GetConceptByCharacterAndTypeLocal(e,51)})}function s(e){return r(this,void 0,void 0,function*(){if(i.serviceWorker)try{return(yield(0,i.sendMessage)("GetConceptByCharacterAndCategoryLocal",{character:e})).data}catch(e){(0,i.handleServiceWorkerException)(e)}let t=(0,i.CreateDefaultLConcept)();if("the"==e)return t.id=1,t.typeId=5,t.characterValue="the",t;let n=(0,i.SplitStrings)(e);if(n.length>1){let i=1,a=yield s(n[0]);0!=a.id&&(i=a.id),t=yield function(e,t){return r(this,void 0,void 0,function*(){return o.v.GetConceptByCharacterAndCategoryLocal(e,t)})}(e,i)}else n[0]==e&&(t=yield a(e));return t})}},8095:(e,t,n)=>{n.d(t,{h:()=>s});var o=n(8957),i=n(9700),r=n(1863),a=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function s(e,t,n){var s=arguments;return a(this,arguments,void 0,function*(e,t,n,a=!1,c={concepts:[],connections:[]}){var l,d,u,h,p,f;const m=i.V.logfunction("CreateConnectionBetweenTwoConceptsLocal",s)||{};let y=performance.now();try{if(o.serviceWorker){m.serviceWorker=!0;try{const r=yield(0,o.sendMessage)("CreateConnectionBetweenTwoConceptsLocal",{ofTheConcept:e,toTheConcept:t,linker:n,both:a,actions:c});return(null===(d=null===(l=null==r?void 0:r.actions)||void 0===l?void 0:l.concepts)||void 0===d?void 0:d.length)&&(c.concepts=JSON.parse(JSON.stringify(r.actions.concepts))),(null===(h=null===(u=null==r?void 0:r.actions)||void 0===u?void 0:u.connections)||void 0===h?void 0:h.length)&&(c.connections=JSON.parse(JSON.stringify(r.actions.connections))),i.V.logUpdate(m),r.data}catch(e){(0,r.ey)(m,"CreateConnectionBetweenTwoConceptsLocal",e),(0,o.handleServiceWorkerException)(e)}}e.userId;if(a){let i=(null===(p=t.type)||void 0===p?void 0:p.characterValue)+"_s"+"_"+(n+"_by");var v=yield(0,o.MakeTheInstanceConceptLocal)("connection",i,!1,999,999,999,0,c);yield(0,o.CreateTheConnectionLocal)(t.id,e.id,v.id,1e3,void 0,void 0,c)}let s=(null===(f=e.type)||void 0===f?void 0:f.characterValue)+"_s"+"_"+(n+"_s");var g=yield(0,o.MakeTheInstanceConceptLocal)("connection",s,!1,999,999,999,void 0,c);let y=yield(0,o.CreateTheConnectionLocal)(e.id,t.id,g.id,1e3,void 0,void 0,c);return i.V.logUpdate(m),y}catch(o){throw i.V.logError(y,e.userId,"create",void 0,void 0,500,o,"CreateConnectionBetweenTwoConceptsLocal",[e,t,n,a],void 0,void 0),(0,r.ey)(m,"CreateConnectionBetweenTwoConceptsLocal",o),o}})}},8146:(e,t,n)=>{n.d(t,{Y:()=>l});var o=n(3026),i=n(9581),r=n(8957),a=n(1863),s=n(7876),c=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function l(e){var t=arguments;return c(this,void 0,void 0,function*(){const n=r.Logger.logfunction("GetConceptByCharacterValue",t);let c=(0,r.CreateDefaultConcept)();try{const t=new FormData;t.append("character_value",e);const l=yield fetch(i.B.GetConceptByCharacterValueUrl(),{method:"POST",body:t});l.ok?(c=yield l.json(),c.id>0&&(0,s.K)(c).then(e=>{o.I.AddConcept(c)}),r.Logger.logUpdate(n)):(0,a.ry)(l)}catch(e){Error,(0,a.Mb)(e,i.B.GetConceptByCharacterValueUrl()),(0,a.ey)(n,"GetConceptByCharacterValue",e)}return c})}},8176:(e,t,n)=>{n.d(t,{a:()=>a});var o=n(6191),i=n(2170),r=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class a{static init(){return r(this,void 0,void 0,function*(){if(i.B.getValue("enableCache",!0))try{const e=yield function(e){return r(this,void 0,void 0,function*(){const t=yield(0,o.Al)();return new Promise((n,o)=>{const i=t.transaction(e,"readonly").objectStore(e),r=[],a=i.openCursor();a.onsuccess=()=>{const e=a.result;e?(r.push({key:e.key,value:e.value}),e.continue()):n(r)},a.onerror=e=>{o(e)}})})}(o.l8);for(const{key:t,value:n}of e)this.cacheMap.set(t,n)}catch(e){}})}static getHash(e){return r(this,void 0,void 0,function*(){return yield function(e){return r(this,void 0,void 0,function*(){const t=JSON.stringify(e,(e,t)=>t&&"object"==typeof t&&!Array.isArray(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t),n=(new TextEncoder).encode(t),o=yield crypto.subtle.digest("SHA-256",n);return Array.from(new Uint8Array(o)).map(e=>e.toString(16).padStart(2,"0")).join("")})}(e)})}static get(e){var t;return i.B.getValue("enableCache",!0)&&null!==(t=this.cacheMap.get(e))&&void 0!==t?t:null}static set(e,t){if(!i.B.getValue("enableCache",!0))return;const n=this.cacheMap.get(e),r=JSON.stringify(t);n&&JSON.stringify(n)===r||(this.cacheMap.set(e,t),(0,o.eH)(o.l8,t,e).catch(()=>{}),window.dispatchEvent(new CustomEvent(this.prefix+e,{detail:t})))}static subscribe(e,t){const n=e=>{t(e.detail)};return window.addEventListener(this.prefix+e,n),()=>{window.removeEventListener(this.prefix+e,n)}}static remove(e){this.cacheMap.delete(e),(0,o.kM)(o.l8,e).catch(()=>{})}static clearAll(){this.cacheMap.clear(),(0,o.sg)(o.l8).catch(()=>{})}}a.prefix="FREESCHEMA_CACHE_",a.cacheMap=new Map},8286:(e,t,n)=>{n.d(t,{d:()=>m});var o=n(1735),i=n(8957),r=n(3655),a=n(1863),s=n(2155),c=n(5239),l=n(991),d=n(3996);class u extends d.i{constructor(e,t,n,o){super(e,t,n,o),this.key="",this.value=[],this.height=1,this.key=e,this.value=t,this.leftNode=n,this.rightNode=o}addNode(e,t,n){if(null==t)return t=e;let o=t.leftNode,i=t.rightNode;if(t.key>e.key)t.leftNode=this.addNode(e,o,n);else{if(!(t.key<e.key))return t;t.rightNode=this.addNode(e,i,n)}t.height=1+Math.max(this.getHeight(t.leftNode),this.getHeight(t.rightNode));let r=this.getBalanceFactor(t);if(r>1&&t.leftNode){if(e.key<t.leftNode.key){return this.rightRotate(t)}if(e.key>t.leftNode.key){return t.leftNode=this.leftRotate(t.leftNode),this.rightRotate(t)}}if(r<-1&&t.rightNode){if(e.key>t.rightNode.key){return this.leftRotate(t)}if(e.key<t.rightNode.key){return t.rightNode=this.rightRotate(t.rightNode),this.leftRotate(t)}}return t}}var h=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class p{static CreateCompositionKey(e){return e}static addNodeToTree(e){return h(this,void 0,void 0,function*(){return null==this.connectionTypeRoot?(this.connectionTypeRoot=e,this.connectionTypeRoot):(this.connectionTypeRoot=this.connectionTypeRoot.addNode(e,this.connectionTypeRoot,this.connectionTypeRoot.height),this.connectionTypeRoot)})}static addConnectionToTree(e){if(e.id>0){let t=this.CreateCompositionKey(e.typeId);if(this.connectionTypeRoot){let n=this.connectionTypeRoot.getFromNode(t,this.connectionTypeRoot);if(n){let t=null==n?void 0:n.value;0==t.length&&(n.value=[]),t.includes(e.id)||t.push(e.id)}else{let n=[];n.push(e.id);let o=new u(t,n,null,null);this.addNodeToTree(o)}}else{let n=[];n.push(e.id);let o=new u(t,n,null,null);this.addNodeToTree(o)}}}static GetConnectionByOfTheConceptAndTypeId(e,t){let n=this.CreateCompositionKey(t);if(this.connectionTypeRoot){let e=this.connectionTypeRoot.getFromNode(n,this.connectionTypeRoot);if(e)return e.value}return null}}p.connectionTypeRoot=null;var f=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class m{constructor(){this.name="Connection Array"}static CheckContains(e){let t=!1;for(let n=0;n<this.connectionArray.length;n++)this.connectionArray[n].id==e.id&&(t=!0);return t}static AddConnectionToStorage(e){(0,r.kH)("connection",e)}static AddNpConn(e){this.deletedConnections.includes(e)||this.deletedConnections.push(e)}static GetNpConn(e){return!!this.deletedConnections.includes(e)}static AddConnection(e){try{c.O.addConnectionToTree(e),p.addConnectionToTree(e),l.H.addConnection(e)}catch(e){throw e}}static AddConnectionToMemory(e){e.isTemp||(c.O.addConnectionToTree(e),p.addConnectionToTree(e),l.H.addConnection(e))}static AddToDictionary(e){this.connectionDictionary[e.id]=e}static RemoveConnection(e){0!=e.id&&((0,r.wh)("connection",e.id),c.O.removeNodeFromTree(e.id),l.H.removeNodeFromTree(e.id))}static GetConnectionTypeOfTree(){l.H.node}static GetConnectionByOfTheConceptAndType(e,t){return f(this,void 0,void 0,function*(){try{if(i.serviceWorker)try{return(yield(0,i.sendMessage)("ConnectionData__GetConnectionByOfTheConceptAndType",{ofTheConceptId:e,typeId:t})).data}catch(e){(0,i.handleServiceWorkerException)(e)}let n=l.H.GetConnectionByOfTheConceptAndTypeId(e,t);return n||[]}catch(e){return[]}})}static GetConnectionByOfType(e,t){const n=i.Logger.logfunction("ConnectionData.GetConnectionByOfType",arguments);let o=p.GetConnectionByOfTheConceptAndTypeId(e,t);return o?(i.Logger.logUpdate(n),o):(i.Logger.logUpdate(n),[])}static GetConnectionTree(){return c.O.connectionroot}static GetConnectionTypeTree(){return p.connectionTypeRoot}static GetConnectionBulkData(e,t,n){return f(this,void 0,void 0,function*(){yield c.O.getConnectionListFromIds(e,t,n)})}static GetConnection(e){return f(this,void 0,void 0,function*(){o.J.incrementConnection(e);let t=new s.N(0,0,0,0,0,0,0);try{if(i.serviceWorker)try{return(yield(0,i.sendMessage)("ConnectionData__GetConnection",{id:e})).data}catch(e){(0,i.handleServiceWorkerException)(e)}let n=yield c.O.getNodeFromTree(e);if(null==n?void 0:n.value){let e=n.value;e&&(t=e)}return t}catch(e){return t}})}static GetConnectionsOfCompositionLocal(e){var t=arguments;return f(this,void 0,void 0,function*(){const n=i.Logger.logfunction("ConnectionData.GetConnectionsOfCompositionLocal",t)||{};let o=[];try{if(i.serviceWorker){n.serviceWorker=!0;try{const t=yield(0,i.sendMessage)("ConnectionData__GetConnectionsOfCompositionLocal",{id:e});return i.Logger.logUpdate(n),t.data}catch(e){(0,a.ey)(n,"GetConnectionsOfCompositionLocal",e),(0,i.handleServiceWorkerException)(e)}}let t=[];t=m.GetConnectionByOfType(e,e);for(let e=0;e<t.length;e++){let r=yield c.O.getNodeFromTree(t[e]);r&&o.push(r.value),i.Logger.logUpdate(n)}}catch(e){(0,a.ey)(n,"ConnectionData.GetConnectionsOfCompositionLocal",e)}return o})}static GetConnectionsOfConcept(e){return f(this,void 0,void 0,function*(){let t=[],n=[];try{if(i.serviceWorker)try{return(yield(0,i.sendMessage)("ConnectionData__GetConnectionsOfConcept",{id:e})).data}catch(e){(0,i.handleServiceWorkerException)(e)}t=yield m.GetConnectionByOfTheConceptAndType(e,e);for(let e=0;e<t.length;e++){let o=yield c.O.getNodeFromTree(t[e]);o&&n.push(o.value)}return n}catch(e){return n}})}getName(){return this.name}}m.deletedConnections=[],m.connectionArray=[],m.connectionDictionary=[]},8339:(e,t,n)=>{let o=n(396),i=n(9371),r=n(5238),a=n(5644),s=n(1534),c=n(5781);const l={empty:!0,space:!0};e.exports=class{constructor(e){this.input=e,this.root=new a,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,n,i,r=new o;r.name=e[1].slice(1),""===r.name&&this.unnamedAtrule(r,e),this.init(r,e[2]);let a=!1,s=!1,c=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){r.source.end=this.getPosition(e[2]),r.source.end.offset++,this.semicolon=!0;break}if("{"===t){s=!0;break}if("}"===t){if(c.length>0){for(i=c.length-1,n=c[i];n&&"space"===n[0];)n=c[--i];n&&(r.source.end=this.getPosition(n[3]||n[2]),r.source.end.offset++)}this.end(e);break}c.push(e)}else c.push(e);if(this.tokenizer.endOfFile()){a=!0;break}}r.raws.between=this.spacesAndCommentsFromEnd(c),c.length?(r.raws.afterName=this.spacesAndCommentsFromStart(c),this.raw(r,"params",c),a&&(e=c[c.length-1],r.source.end=this.getPosition(e[3]||e[2]),r.source.end.offset++,this.spaces=r.raws.between,r.raws.between="")):(r.raws.afterName="",r.params=""),s&&(r.nodes=[],this.current=r)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let n,o=0;for(let i=t-1;i>=0&&(n=e[i],"space"===n[0]||(o+=1,2!==o));i--);throw this.input.error("Missed semicolon","word"===n[0]?n[3]+1:n[2])}colon(e){let t,n,o,i=0;for(let[r,a]of e.entries()){if(n=a,o=n[0],"("===o&&(i+=1),")"===o&&(i-=1),0===i&&":"===o){if(t){if("word"===t[0]&&"progid"===t[1])continue;return r}this.doubleColon(n)}t=n}return!1}comment(e){let t=new i;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let n=e[1].slice(2,-2);if(/^\s*$/.test(n))t.text="",t.raws.left=n,t.raws.right="";else{let e=n.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=c(this.input)}decl(e,t){let n=new r;this.init(n,e[0][2]);let o,i=e[e.length-1];for(";"===i[0]&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(i[3]||i[2]||function(e){for(let t=e.length-1;t>=0;t--){let n=e[t],o=n[3]||n[2];if(o)return o}}(e)),n.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;n.prop+=e.shift()[1]}for(n.raws.between="";e.length;){if(o=e.shift(),":"===o[0]){n.raws.between+=o[1];break}"word"===o[0]&&/\w/.test(o[1])&&this.unknownWord([o]),n.raws.between+=o[1]}"_"!==n.prop[0]&&"*"!==n.prop[0]||(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let a,s=[];for(;e.length&&(a=e[0][0],"space"===a||"comment"===a);)s.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(o=e[t],"!important"===o[1].toLowerCase()){n.important=!0;let o=this.stringFrom(e,t);o=this.spacesFromEnd(e)+o," !important"!==o&&(n.raws.important=o);break}if("important"===o[1].toLowerCase()){let o=e.slice(0),i="";for(let e=t;e>0;e--){let t=o[e][0];if(i.trim().startsWith("!")&&"space"!==t)break;i=o.pop()[1]+i}i.trim().startsWith("!")&&(n.important=!0,n.raws.important=i,e=o)}if("space"!==o[0]&&"comment"!==o[0])break}e.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(n.raws.between+=s.map(e=>e[1]).join(""),s=[]),this.raw(n,"value",s.concat(e),t),n.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new s;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&"rule"===t.type&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="",t.source.end=this.getPosition(e[2]),t.source.end.offset+=t.raws.ownSemicolon.length)}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,n=null,o=!1,i=null,r=[],a=e[1].startsWith("--"),s=[],c=e;for(;c;){if(n=c[0],s.push(c),"("===n||"["===n)i||(i=c),r.push("("===n?")":"]");else if(a&&o&&"{"===n)i||(i=c),r.push("}");else if(0===r.length){if(";"===n){if(o)return void this.decl(s,a);break}if("{"===n)return void this.rule(s);if("}"===n){this.tokenizer.back(s.pop()),t=!0;break}":"===n&&(o=!0)}else n===r[r.length-1]&&(r.pop(),0===r.length&&(i=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),r.length>0&&this.unclosedBracket(i),t&&o){if(!a)for(;s.length&&(c=s[s.length-1][0],"space"===c||"comment"===c);)this.tokenizer.back(s.pop());this.decl(s,a)}else this.unknownWord(s)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,n,o){let i,r,a,s,c=n.length,d="",u=!0;for(let e=0;e<c;e+=1)i=n[e],r=i[0],"space"!==r||e!==c-1||o?"comment"===r?(s=n[e-1]?n[e-1][0]:"empty",a=n[e+1]?n[e+1][0]:"empty",l[s]||l[a]||","===d.slice(-1)?u=!1:d+=i[1]):d+=i[1]:u=!1;if(!u){let o=n.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:o,value:d}}e[t]=d}rule(e){e.pop();let t=new s;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)n=e.pop()[1]+n;return n}spacesAndCommentsFromStart(e){let t,n="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)n+=e.shift()[1];return n}spacesFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)n=e.pop()[1]+n;return n}stringFrom(e,t){let n="";for(let o=t;o<e.length;o++)n+=e[o][1];return e.splice(t,e.length-t),n}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word "+e[0][1],{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}}},8349:(e,t,n)=>{t.__esModule=!0,t.default=void 0;var o,i=(o=n(5170))&&o.__esModule?o:{default:o};var r=function(){function e(e,t){this.func=e||function(){},this.funcRes=null,this.options=t}var t=e.prototype;return t._shouldUpdateSelector=function(e,t){return void 0===t&&(t={}),!1!==Object.assign({},this.options,t).updateSelector&&"string"!=typeof e},t._isLossy=function(e){return void 0===e&&(e={}),!1===Object.assign({},this.options,e).lossless},t._root=function(e,t){return void 0===t&&(t={}),new i.default(e,this._parseOptions(t)).root},t._parseOptions=function(e){return{lossy:this._isLossy(e)}},t._run=function(e,t){var n=this;return void 0===t&&(t={}),new Promise(function(o,i){try{var r=n._root(e,t);Promise.resolve(n.func(r)).then(function(o){var i=void 0;return n._shouldUpdateSelector(e,t)&&(i=r.toString(),e.selector=i),{transform:o,root:r,string:i}}).then(o,i)}catch(e){return void i(e)}})},t._runSync=function(e,t){void 0===t&&(t={});var n=this._root(e,t),o=this.func(n);if(o&&"function"==typeof o.then)throw new Error("Selector processor returned a promise to a synchronous call.");var i=void 0;return t.updateSelector&&"string"!=typeof e&&(i=n.toString(),e.selector=i),{transform:o,root:n,string:i}},t.ast=function(e,t){return this._run(e,t).then(function(e){return e.root})},t.astSync=function(e,t){return this._runSync(e,t).root},t.transform=function(e,t){return this._run(e,t).then(function(e){return e.transform})},t.transformSync=function(e,t){return this._runSync(e,t).transform},t.process=function(e,t){return this._run(e,t).then(function(e){return e.string||e.root.toString()})},t.processSync=function(e,t){var n=this._runSync(e,t);return n.string||n.root.toString()},e}();t.default=r,e.exports=t.default},8354:(e,t)=>{t.__esModule=!0,t.default=function(e){var t="",n=e.indexOf("/*"),o=0;for(;n>=0;){t+=e.slice(o,n);var i=e.indexOf("*/",n+2);if(i<0)return t;o=i+2,n=e.indexOf("/*",o)}return t+=e.slice(o)},e.exports=t.default},8357:(e,t,n)=>{n.d(t,{$:()=>d});var o=n(3077),i=n(8064),r=n(6467),a=n(9975),s=n(8957),c=n(1863),l=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function d(e,t,n,u){var h=arguments;return l(this,arguments,void 0,function*(e,t,n,l,u={concepts:[],connections:[]}){var p,f,m,y;const v=s.Logger.logfunction("MakeTheTypeConceptLocal",h)||{};if(s.serviceWorker){v.serviceWorker=!0;try{const o=yield(0,s.sendMessage)("MakeTheTypeConceptLocal",{typeString:e,sessionId:t,sessionUserId:n,userId:l,actions:u});return(null===(f=null===(p=null==o?void 0:o.actions)||void 0===p?void 0:p.concepts)||void 0===f?void 0:f.length)&&(u.concepts=JSON.parse(JSON.stringify(o.actions.concepts))),(null===(y=null===(m=null==o?void 0:o.actions)||void 0===m?void 0:m.connections)||void 0===y?void 0:y.length)&&(u.connections=JSON.parse(JSON.stringify(o.actions.connections))),s.Logger.logUpdate(v),o.data}catch(e){(0,c.ey)(v,"MakeTheTypeConceptLocal",e),(0,s.handleServiceWorkerException)(e)}}let g=yield(0,i.$I)(e);if(g&&(0==g.id||0==g.userId)){let i=(0,r.f)(e);if(i[0]==e){g=yield(0,a.A)(e,"the",l,1,51,u)}else{let r=yield d(i[0],t,n,l,u),a=yield d(i[1],t,n,l,u);g=yield(0,o.A)(e,i[1],l,r.id,a.id,4,void 0,null,u)}}return s.Logger.logUpdate(v),g})}},8407:(e,t,n)=>{n.d(t,{A:()=>f});var o=n(9581),i=n(3518),r=n(1863),a=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};var s=n(4402),c=n(8957),l=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class d{constructor(e,t,n,o,i,r,a,s,c,l){this.id=0,this.userId=e,this.data=t,this.securityId=n,this.securityUserId=o,this.accessId=i,this.accessUserId=r,this.sessionId=a,this.sessionUserId=s,this.entryTimestamp=c,this.isNew=l}}var u=n(7282),h=n(2212),p=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function f(e,t){var n=arguments;return p(this,arguments,void 0,function*(e,t,p=!1,f,m=4,y=999,v=0){const g=c.Logger.logfunction("MakeTheInstanceConcept",n)||{};if(c.serviceWorker){g.serviceWorker=!0;try{const n=yield(0,c.sendMessage)("MakeTheInstanceConcept",{type:e,referent:t,composition:p,userId:f,passedAccessId:m,passedSessionId:y,referentId:v});return c.Logger.logUpdate(g),n.data}catch(e){(0,r.ey)(g,"MakeTheInstanceConcept",e),(0,c.handleServiceWorkerException)(e)}}let C,w=y,T=f,I=f,k=m,b=f,A="",S=t.length,L=(0,u.o)();if(A=e.startsWith("the_")?e:"the_"+e,p){L=yield(0,c.MakeTheTypeConceptApi)(e,f),C=yield(0,h.Ay)(t,f,4,L.id,v,k,e)}else if(S>255){L=yield(0,c.MakeTheTypeConceptApi)(A,f),C=yield(0,h.Ay)(t,f,4,L.id,v,k,A),function(e){a(this,void 0,void 0,function*(){try{var t=(0,i.Xr)();const n=yield fetch(o.B.CreateTheTextDataUrl(),{method:"POST",headers:t,body:JSON.stringify(e)});if(!n.ok)throw(0,r.ry)(n),new Error(`Error! status: ${n.status}`);return yield n.json()}catch(e){throw Error,e}})}(new d(f,t,999,T,k,b,w,I,Date.now().toString(),!0))}else{L=yield(0,c.MakeTheTypeConceptApi)(A,f);let e=yield(0,s.A)(t,L.id);if(C=e,0==e.id&&0==e.userId){C=yield(0,h.N)(t,f,4,L.id,12,k,A),function(e,t,n,a){var s=arguments;l(this,void 0,void 0,function*(){const l=c.Logger.logfunction("MakeTheNameInBackend",s);try{let s={newConceptId:e,referent:t,typeId:n,typeUserId:a},d=(0,i.Xr)(),u=JSON.stringify(s);const h=yield fetch(o.B.MakeTheNameInBackendUrl(),{method:"POST",headers:d,body:u});c.Logger.logUpdate(l),h.ok||(0,r.ry)(h)}catch(e){Error,(0,r.Mb)(e,o.B.MakeTheNameInBackendUrl()),(0,r.ey)(l,"MakeTheNameInBackend",e)}})}(C.id,`${t}`,L.id,f)}}return C.type=L,c.Logger.logUpdate(g),C})}},8500:(e,t,n)=>{t.__esModule=!0,t.isComment=t.isCombinator=t.isClassName=t.isAttribute=void 0,t.isContainer=function(e){return!(!a(e)||!e.walk)},t.isIdentifier=void 0,t.isNamespace=function(e){return c(e)||g(e)},t.isNesting=void 0,t.isNode=a,t.isPseudo=void 0,t.isPseudoClass=function(e){return f(e)&&!w(e)},t.isPseudoElement=w,t.isUniversal=t.isTag=t.isString=t.isSelector=t.isRoot=void 0;var o,i=n(1581),r=((o={})[i.ATTRIBUTE]=!0,o[i.CLASS]=!0,o[i.COMBINATOR]=!0,o[i.COMMENT]=!0,o[i.ID]=!0,o[i.NESTING]=!0,o[i.PSEUDO]=!0,o[i.ROOT]=!0,o[i.SELECTOR]=!0,o[i.STRING]=!0,o[i.TAG]=!0,o[i.UNIVERSAL]=!0,o);function a(e){return"object"==typeof e&&r[e.type]}function s(e,t){return a(t)&&t.type===e}var c=s.bind(null,i.ATTRIBUTE);t.isAttribute=c;var l=s.bind(null,i.CLASS);t.isClassName=l;var d=s.bind(null,i.COMBINATOR);t.isCombinator=d;var u=s.bind(null,i.COMMENT);t.isComment=u;var h=s.bind(null,i.ID);t.isIdentifier=h;var p=s.bind(null,i.NESTING);t.isNesting=p;var f=s.bind(null,i.PSEUDO);t.isPseudo=f;var m=s.bind(null,i.ROOT);t.isRoot=m;var y=s.bind(null,i.SELECTOR);t.isSelector=y;var v=s.bind(null,i.STRING);t.isString=v;var g=s.bind(null,i.TAG);t.isTag=g;var C=s.bind(null,i.UNIVERSAL);function w(e){return f(e)&&e.value&&(e.value.startsWith("::")||":before"===e.value.toLowerCase()||":after"===e.value.toLowerCase()||":first-letter"===e.value.toLowerCase()||":first-line"===e.value.toLowerCase())}t.isUniversal=C},8633:e=>{var t=String,n=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t,blackBright:t,redBright:t,greenBright:t,yellowBright:t,blueBright:t,magentaBright:t,cyanBright:t,whiteBright:t,bgBlackBright:t,bgRedBright:t,bgGreenBright:t,bgYellowBright:t,bgBlueBright:t,bgMagentaBright:t,bgCyanBright:t,bgWhiteBright:t}};e.exports=n(),e.exports.createColors=n},8642:(e,t,n)=>{n.d(t,{Y:()=>h});var o=n(8286),i=n(9581),r=n(4364),a=n(5284),s=n(1412),c=n(3518),l=n(1863),d=n(8957),u=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function h(){var e=arguments;return u(this,arguments,void 0,function*(t=[]){const n=d.Logger.logfunction("GetAllConnectionsOfCompositionBulk",e)||{};if(d.serviceWorker){n.serviceWorker=!0;try{const e=yield(0,d.sendMessage)("GetAllConnectionsOfCompositionBulk",{composition_ids:t});return d.Logger.logUpdate(n),e.data}catch(e){(0,l.ey)(n,"GetAllConnectionsOfCompositionBulk",e),(0,d.handleServiceWorkerException)(e)}}var h=[];if(t.length<=0)return h;var p=yield(0,a.B)(t),f=yield function(){var e=arguments;return u(this,arguments,void 0,function*(t=[]){const n=d.Logger.logfunction("GetAllConnectionsOfCompositionOnline",e);var r=[];try{var a=(0,c.Xr)();const e=yield fetch(i.B.GetAllConnectionsOfCompositionBulkUrl(),{method:"POST",headers:a,body:JSON.stringify(t)});if(e.ok){const t=yield e.json();for(var s=0;s<t.length;s++)o.d.AddConnection(t[s]),r.push(t[s])}else(0,l.ry)(e);return d.Logger.logUpdate(n),r}catch(e){Error,(0,l.Mb)(e,i.B.GetAllConnectionsOfCompositionBulkUrl()),(0,l.ey)(n,"GetAllConnectionsOfCompositionOnline",e)}})}(t);return h=f,(0,s.e)(h,p),yield(0,r.s)(h),d.Logger.logUpdate(n),h})}},8675:(e,t,n)=>{n.d(t,{l:()=>s});var o=n(1863),i=n(3518),r=n(8957),a=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function s(e){var t=arguments;return a(this,void 0,void 0,function*(){r.Logger.logfunction("GetAllLinkerConnectionsFromTheConcept",t);var n=[];try{(new Date).getTime();var a=(0,i.Xr)("application/x-www-form-urlencoded");const t=yield fetch(r.BaseUrl.GetAllLinkerConnectionOfConceptUrl()+`?conceptId=${e}`,{method:"GET",headers:a});if(t.ok){const e=yield t.json();for(var s=0;s<e.length;s++){var c=e[s];n.push(c)}}else(0,o.ry)(t)}catch(e){Error,(0,o.Mb)(e,r.BaseUrl.GetAllLinkerConnectionOfConceptUrl())}return n})}},8937:e=>{var t={}.hasOwnProperty,n=/[ -,\.\/:-@\[-\^`\{-~]/,o=/[ -,\.\/:-@\[\]\^`\{-~]/,i=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g,r=function e(r,a){"single"!=(a=function(e,n){if(!e)return n;var o={};for(var i in n)o[i]=t.call(e,i)?e[i]:n[i];return o}(a,e.options)).quotes&&"double"!=a.quotes&&(a.quotes="single");for(var s="double"==a.quotes?'"':"'",c=a.isIdentifier,l=r.charAt(0),d="",u=0,h=r.length;u<h;){var p=r.charAt(u++),f=p.charCodeAt(),m=void 0;if(f<32||f>126){if(f>=55296&&f<=56319&&u<h){var y=r.charCodeAt(u++);56320==(64512&y)?f=((1023&f)<<10)+(1023&y)+65536:u--}m="\\"+f.toString(16).toUpperCase()+" "}else m=a.escapeEverything?n.test(p)?"\\"+p:"\\"+f.toString(16).toUpperCase()+" ":/[\t\n\f\r\x0B]/.test(p)?"\\"+f.toString(16).toUpperCase()+" ":"\\"==p||!c&&('"'==p&&s==p||"'"==p&&s==p)||c&&o.test(p)?"\\"+p:p;d+=m}return c&&(/^-[-\d]/.test(d)?d="\\-"+d.slice(1):/\d/.test(l)&&(d="\\3"+l+" "+d.slice(1))),d=d.replace(i,function(e,t,n){return t&&t.length%2?e:(t||"")+n}),!c&&a.wrap?s+d+s:d};r.options={escapeEverything:!1,isIdentifier:!1,quotes:"single",wrap:!1},r.version="3.0.0",e.exports=r},8939:(e,t,n)=>{n.d(t,{$N:()=>T,$V:()=>h,Ez:()=>I,JA:()=>C,Mb:()=>m,Nj:()=>f,PT:()=>w,RW:()=>g,XI:()=>v,ay:()=>u,hL:()=>d,kx:()=>y,re:()=>p,yz:()=>k,zN:()=>S});var o=n(7139),i=n(2),r=n(3026),a=n(8286),s=n(8957),c=n(1863),l=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function d(e){return l(this,void 0,void 0,function*(){let t={connectionList:[],compositionList:[]};try{if(s.serviceWorker)try{return(yield(0,s.sendMessage)("GetCompositionById",{id:e})).data}catch(e){(0,s.handleServiceWorkerException)(e)}let n=yield(0,i.s)(e);t.connectionList=n;for(let e=0;e<t.connectionList.length;e++)t.compositionList.includes(t.connectionList[e].ofTheConceptId)||t.compositionList.push(t.connectionList[e].ofTheConceptId);return t}catch(e){return t}})}function u(e,t,n){return l(this,void 0,void 0,function*(){var i,a;let s={},c=yield r.I.GetConcept(e);if(0==c.id&&null!=e&&null!=e){c=yield(0,o.r)(e)}let l=yield S(e,t,n);return s[null!==(a=null===(i=null==c?void 0:c.type)||void 0===i?void 0:i.characterValue)&&void 0!==a?a:""]=l,s})}function h(e,t,n){return l(this,void 0,void 0,function*(){var i,a;let s={},c=yield r.I.GetConcept(e);if(0==c.id&&null!=e&&null!=e){c=yield(0,o.r)(e)}let l=yield S(e,t,n);s[null!==(a=null===(i=null==c?void 0:c.type)||void 0===i?void 0:i.characterValue)&&void 0!==a?a:""]=l;let d={};return d.created_at=c.entryTimeStamp,d.data=s,d.id=e,d})}function p(e,t,n){return l(this,void 0,void 0,function*(){var i,a;let s={},c=yield r.I.GetConcept(e);if(0==c.id&&null!=e&&null!=e){c=yield(0,o.r)(e)}let l=yield A(c,t,n);return s[null!==(a=null===(i=null==c?void 0:c.type)||void 0===i?void 0:i.characterValue)&&void 0!==a?a:""]=l,s})}function f(e){return l(this,void 0,void 0,function*(){var t,n;if(s.serviceWorker)try{return(yield(0,s.sendMessage)("GetComposition",{id:e})).data}catch(e){(0,s.handleServiceWorkerException)(e)}let a=[],c={};a=yield(0,i.s)(e);let l=[];for(let e=0;e<a.length;e++)l.includes(a[e].ofTheConceptId)||l.push(a[e].ofTheConceptId);let d=yield r.I.GetConcept(e);if(0==d.id&&null!=e&&null!=e){d=yield(0,o.r)(e)}let u=yield S(e,a,l);return c[null!==(n=null===(t=null==d?void 0:d.type)||void 0===t?void 0:t.characterValue)&&void 0!==n?n:""]=u,c})}function m(e){return l(this,void 0,void 0,function*(){var t,n;let a=[],s={};a=yield(0,i.s)(e);let c=[];for(let e=0;e<a.length;e++)c.includes(a[e].ofTheConceptId)||c.push(a[e].ofTheConceptId);let l=yield r.I.GetConcept(e);if(0==l.id&&null!=e&&null!=e){l=yield(0,o.r)(e)}let d=yield L(e,a,c);return s[null!==(n=null===(t=null==l?void 0:l.type)||void 0===t?void 0:t.characterValue)&&void 0!==n?n:""]=d,s})}function y(e){return l(this,void 0,void 0,function*(){var t,n;if(s.serviceWorker)try{return(yield(0,s.sendMessage)("GetCompositionFromMemory",{id:e})).data}catch(e){(0,s.handleServiceWorkerException)(e)}let i=[],c={};i=yield a.d.GetConnectionsOfCompositionLocal(e);let l=[];for(let e=0;e<i.length;e++)l.includes(i[e].ofTheConceptId)||l.push(i[e].ofTheConceptId);let d=yield r.I.GetConcept(e);if(0==d.id&&null!=e&&null!=e){d=yield(0,o.r)(e)}let u=yield b(d,i,l);return c[null!==(n=null===(t=null==d?void 0:d.type)||void 0===t?void 0:t.characterValue)&&void 0!==n?n:""]=u,c})}function v(e){return l(this,void 0,void 0,function*(){var t,n;if(s.serviceWorker)try{return(yield(0,s.sendMessage)("GetCompositionFromMemoryNormal",{id:e})).data}catch(e){(0,s.handleServiceWorkerException)(e)}let i=[],c={};i=yield a.d.GetConnectionsOfCompositionLocal(e);let l=[];for(let e=0;e<i.length;e++)l.includes(i[e].ofTheConceptId)||l.push(i[e].ofTheConceptId);let d=yield r.I.GetConcept(e);if(0==d.id&&null!=e&&null!=e){d=yield(0,o.r)(e)}let u=yield A(d,i,l);return c[null!==(n=null===(t=null==d?void 0:d.type)||void 0===t?void 0:t.characterValue)&&void 0!==n?n:""]=u,c})}function g(e){var t=arguments;return l(this,void 0,void 0,function*(){var n,i;const l=s.Logger.logfunction("GetCompositionWithIdFromMemory",t)||{};if(s.serviceWorker){l.serviceWorker=!0;try{const t=yield(0,s.sendMessage)("GetCompositionWithIdFromMemory",{id:e});return s.Logger.logUpdate(l),t.data}catch(e){(0,c.ey)(l,"GetCompositionWithIdFromMemory",e),(0,s.handleServiceWorkerException)(e)}}let d={},u=[],h={};try{u=yield a.d.GetConnectionsOfCompositionLocal(e);let t=[];for(let e=0;e<u.length;e++)t.includes(u[e].ofTheConceptId)||t.push(u[e].ofTheConceptId);let s=yield r.I.GetConcept(e);if(0==s.id&&null!=e&&null!=e){s=yield(0,o.r)(e)}let c=yield b(s,u,t);h[null!==(i=null===(n=null==s?void 0:s.type)||void 0===n?void 0:n.characterValue)&&void 0!==i?i:""]=c,d.created_at=s.entryTimeStamp,d.data=h,d.id=e}catch(e){(0,c.ey)(l,"GetCompositionWithIdFromMemory",e)}return s.Logger.logUpdate(l),d})}function C(e,t){var n=arguments;return l(this,void 0,void 0,function*(){var i,a;const l=s.Logger.logfunction("GetCompositionFromMemoryWithConnections",n)||{};if(s.serviceWorker){l.serviceWorker=!0;try{const n=yield(0,s.sendMessage)("GetCompositionFromMemoryWithConnections",{id:e,connectionList:t});return s.Logger.logUpdate(l),n.data}catch(e){(0,c.ey)(l,"GetCompositionFromMemoryWithConnections",e),(0,s.handleServiceWorkerException)(e)}}let d={},u=[];for(let e=0;e<t.length;e++)u.includes(t[e].ofTheConceptId)||u.push(t[e].ofTheConceptId);let h=yield r.I.GetConcept(e);if(0==h.id&&null!=e&&null!=e){h=yield(0,o.r)(e)}let p=yield b(h,t,u);d[null!==(a=null===(i=null==h?void 0:h.type)||void 0===i?void 0:i.characterValue)&&void 0!==a?a:""]=p;let f={};return f.created_at=h.entryTimeStamp,f.data=d,f.id=e,s.Logger.logUpdate(l),f})}function w(e,t){return l(this,void 0,void 0,function*(){var n,i;const a=s.Logger.logfunction("GetCompositionWithIdFromMemoryFromConnection",[e])||{};if(s.serviceWorker){a.serviceWorker=!0;try{const t=yield(0,s.sendMessage)("GetCompositionWithIdFromMemory",{id:e});return s.Logger.logUpdate(a),t.data}catch(e){(0,c.ey)(a,"GetCompositionWithIdFromMemoryFromConnection",e),(0,s.handleServiceWorkerException)(e)}}let l={},d=[];for(let e=0;e<t.length;e++)d.includes(t[e].ofTheConceptId)||d.push(t[e].ofTheConceptId);let u=yield r.I.GetConcept(e);if(0==u.id&&null!=e&&null!=e){u=yield(0,o.r)(e)}let h=yield b(u,t,d);l[null!==(i=null===(n=null==u?void 0:u.type)||void 0===n?void 0:n.characterValue)&&void 0!==i?i:""]=h;let p={};return p.created_at=u.entryTimeStamp,p.data=l,p.id=e,s.Logger.logUpdate(a),p})}function T(e){return l(this,void 0,void 0,function*(){var t,n;if(s.serviceWorker)try{return(yield(0,s.sendMessage)("GetCompositionWithIdFromMemoryNew",{id:e})).data}catch(e){(0,s.handleServiceWorkerException)(e)}let i=[],c={};i=yield a.d.GetConnectionsOfCompositionLocal(e);let d=[];for(let e=0;e<i.length;e++)d.includes(i[e].ofTheConceptId)||d.push(i[e].ofTheConceptId);let u=yield r.I.GetConcept(e);if(0==u.id&&null!=e&&null!=e){u=yield(0,o.r)(e)}(new Date).getTime();let h=yield function(e,t,n){return l(this,arguments,void 0,function*(e,t,n,o=[]){var i,r,a,c,l,d,u,h;let p={},f=e.id,m=((new Date).getTime(),null!==(r=null===(i=null==e?void 0:e.type)||void 0===i?void 0:i.characterValue)&&void 0!==r?r:"");if(!n.includes(f)){let t=m;return{[t]:null==e?void 0:e.characterValue}}if(o.includes(f))return"";o.push(f);for(let e=0;e<t.length;e++){let n=yield(0,s.GetTheConcept)(t[e].ofTheConceptId),o=yield(0,s.GetTheConcept)(t[e].toTheConceptId);t[e].ofConcept=n,t[e].toConcept=o;let i=n.id,r="the_",l=(null!==(c=null===(a=null==o?void 0:o.type)||void 0===a?void 0:a.characterValue)&&void 0!==c?c:"").replace(r,"");null!=p[i]&&null!=p[i]||(p[i]={}),p[i][l]=o.characterValue}let y={};for(let e=0;e<t.length;e++){let n=t[e].ofConcept,o=t[e].toConcept,i=null!==(d=null===(l=null==n?void 0:n.type)||void 0===l?void 0:l.characterValue)&&void 0!==d?d:"",r="the_",a=(null!==(h=null===(u=null==o?void 0:o.type)||void 0===u?void 0:u.characterValue)&&void 0!==h?h:"").replace(r,"");null!=y[n.id]&&null!=y[n.id]||(y[n.id]={});let s=y[n.id];null!=s[i]&&null!=s[i]||(s[i]={}),null!=p[t[e].ofTheConceptId]&&null!=p[t[e].toTheConceptId]?s[i][a]=p[o.id]:s[i][a]=o.characterValue}return y[e.id]})}(u,i,d);n=null===(t=null==u?void 0:u.type)||void 0===t?void 0:t.characterValue;c=h;let p={};return p.created_at=u.entryTimeStamp,p.data=c,p.id=e,p})}function I(e){return l(this,void 0,void 0,function*(){var t,n;if(s.serviceWorker)try{return(yield(0,s.sendMessage)("GetCompositionWithIdAndDateFromMemory",{id:e})).data}catch(e){(0,s.handleServiceWorkerException)(e)}let i=[],c={};i=yield a.d.GetConnectionsOfCompositionLocal(e);let l=[];for(let e=0;e<i.length;e++)l.includes(i[e].ofTheConceptId)||l.push(i[e].ofTheConceptId);let d=yield r.I.GetConcept(e);if(0==d.id&&null!=e&&null!=e){d=yield(0,o.r)(e)}let u=yield S(e,i,l);c[null!==(n=null===(t=null==d?void 0:d.type)||void 0===t?void 0:t.characterValue)&&void 0!==n?n:""]=u;let h={};return h.data=c,h.id=e,h.created_at=d.entryTimeStamp,h})}function k(e){var t=arguments;return l(this,void 0,void 0,function*(){var n,a;const l=s.Logger.logfunction("GetCompositionWithId",t)||{};if(s.serviceWorker){l.serviceWorker=!0;try{const t=yield(0,s.sendMessage)("GetCompositionWithId",{id:e});return s.Logger.logUpdate(l),t.data}catch(e){(0,c.ey)(l,"GetCompositionWithId",e),(0,s.handleServiceWorkerException)(e)}}let d=[],u={};d=yield(0,i.s)(e);let h=[];for(let e=0;e<d.length;e++)h.includes(d[e].ofTheConceptId)||h.push(d[e].ofTheConceptId);let p=yield r.I.GetConcept(e);if(0==p.id&&null!=e&&null!=e){p=yield(0,o.r)(e)}let f=yield S(e,d,h);u[null!==(a=null===(n=null==p?void 0:p.type)||void 0===n?void 0:n.characterValue)&&void 0!==a?a:""]=f;let m={};return m.data=u,m.id=e,s.Logger.logUpdate(l),m})}function b(e,t,n){return l(this,arguments,void 0,function*(e,t,n,i=[]){var a,s,c,l;let d={},u=[],h=e.id;s=null===(a=null==e?void 0:e.type)||void 0===a?void 0:a.characterValue;if(!n.includes(h))return null==e?void 0:e.characterValue;if(i.includes(h))return"";i.push(h);for(let e=0;e<t.length;e++)if(t[e].ofTheConceptId==h&&h!=t[e].toTheConceptId){let a=t[e].toTheConceptId,s=yield r.I.GetConcept(a);if((null==s||0==s.id)&&null!=a&&null!=a){s=yield(0,o.r)(a)}if(0!=s.id&&null==(null==s?void 0:s.type)){let e=s.typeId,t=yield r.I.GetConcept(e);if(s.type=t,null==t&&null!=e&&null!=e){t=yield(0,o.r)(e),s.type=t}}let h="the_",p=(null!==(l=null===(c=null==s?void 0:s.type)||void 0===c?void 0:c.characterValue)&&void 0!==l?l:"").replace(h,"");if(isNaN(Number(p))){if(p){const e=yield b(s,t,n,i);d[p]=e}}else{const e=yield b(s,t,n,i);u[p]=e,d=u}}return d})}function A(e,t,n){return l(this,arguments,void 0,function*(e,t,n,i=[]){var a,c,l,d;const u=s.Logger.logfunction("recursiveFetchConceptNormal",[e]);(new Date).getTime();let h={},p=[],f=e.id;h.id=f;c=null===(a=null==e?void 0:e.type)||void 0===a?void 0:a.characterValue;if(!n.includes(f))return null==e?void 0:e.characterValue;if(i.includes(f))return"";i.push(f);for(let e=0;e<t.length;e++)if(t[e].ofTheConceptId==f&&f!=t[e].toTheConceptId){let a=t[e].toTheConceptId,s=yield r.I.GetConcept(a);if((null==s||0==s.id)&&null!=a&&null!=a){s=yield(0,o.r)(a)}if(0!=s.id&&null==(null==s?void 0:s.type)){let e=s.typeId,t=yield r.I.GetConcept(e);if(s.type=t,null==t&&null!=e&&null!=e){t=yield(0,o.r)(e),s.type=t}}let c="the_",u=(null!==(d=null===(l=null==s?void 0:s.type)||void 0===l?void 0:l.characterValue)&&void 0!==d?d:"").replace(c,"");if(isNaN(Number(u))){if(u){const e=yield b(s,t,n,i);h[u]=e}}else{const e=yield b(s,t,n,i);p[u]=e,h=p}}return s.Logger.logUpdate(u),h})}function S(e,t,n){return l(this,arguments,void 0,function*(e,t,n,i=[]){var a,s,c,l;let d={},u=[];if(0==e)return null;let h=yield r.I.GetConcept(e);if((null==h||0==h.id)&&null!=e&&null!=e){h=yield(0,o.r)(e)}if(0!=h.id&&null==h.type){let e=h.typeId,t=yield r.I.GetConcept(e);if(h.type=t,null==t&&null!=e&&null!=e){t=yield(0,o.r)(e),h.type=t}}s=null===(a=null==h?void 0:h.type)||void 0===a?void 0:a.characterValue;if(!n.includes(e))return null==h?void 0:h.characterValue;if(i.includes(e))return"";i.push(e);for(let a=0;a<t.length;a++){(new Date).getTime();if(t[a].ofTheConceptId==e&&e!=t[a].toTheConceptId){let e=t[a].toTheConceptId,s=yield r.I.GetConcept(e);if((null==s||0==s.id)&&null!=e&&null!=e){s=yield(0,o.r)(e)}if(0!=s.id&&null==(null==s?void 0:s.type)){let e=s.typeId,t=yield r.I.GetConcept(e);if(s.type=t,null==t&&null!=e&&null!=e){t=yield(0,o.r)(e),s.type=t}}let h="the_",p=(null!==(l=null===(c=null==s?void 0:s.type)||void 0===c?void 0:c.characterValue)&&void 0!==l?l:"").replace(h,"");if(isNaN(Number(p))){if(p){const o=yield S(e,t,n,i);d[p]=o}}else{const o=yield S(e,t,n,i);u[p]=o,d=u}}}return d})}function L(e,t,n){return l(this,arguments,void 0,function*(e,t,n,i=[]){var a,s,c,l;let d={},u=[];if(0==e)return null;let h=yield r.I.GetConcept(e);if((null==h||0==h.id)&&null!=e&&null!=e){h=yield(0,o.r)(e)}if(0!=h.id&&null==h.type){let e=h.typeId,t=yield r.I.GetConcept(e);if(h.type=t,null==t&&null!=e&&null!=e){t=yield(0,o.r)(e),h.type=t}}s=null===(a=null==h?void 0:h.type)||void 0===a?void 0:a.characterValue;if(!n.includes(e))return null==h?void 0:h.characterValue;if(i.includes(e))return"";i.push(e),d.id=e;for(let i=0;i<t.length;i++)if(t[i].ofTheConceptId==e){let e=t[i].toTheConceptId,a=yield r.I.GetConcept(e);if((null==a||0==a.id)&&null!=e&&null!=e){a=yield(0,o.r)(e)}if(a&&null==(null==a?void 0:a.type)){let e=a.typeId,t=yield r.I.GetConcept(e);if(a.type=t,null==t&&null!=e&&null!=e){t=yield(0,o.r)(e),a.type=t}}let s="the_",h=(null!==(l=null===(c=null==a?void 0:a.type)||void 0===c?void 0:c.characterValue)&&void 0!==l?l:"").replace(s,"");if(isNaN(Number(h))){if(h){const o=yield L(e,t,n);d[h]=o}}else{const o=yield L(e,t,n);u[h]=o,d=u}}return d})}},8957:(e,t,n)=>{n.d(t,{ADMIN:()=>xn,ALLID:()=>_n.BG,AccessTracker:()=>Pe.J,AddGhostConcept:()=>an,Anomaly:()=>Uo,BaseUrl:()=>u.B,BinaryTree:()=>be.W,BuildWidgetFromId:()=>Zo.Cp,BuilderStatefulWidget:()=>Lo,Composition:()=>St,CompositionBinaryTree:()=>Tt,CompositionNode:()=>Ct,Concept:()=>to.j,ConceptsData:()=>d.I,Connection:()=>W.N,ConnectionData:()=>Ee.d,CountInfo:()=>ni.y,CreateComposition:()=>F.A,CreateConnection:()=>Zt.d,CreateConnectionBetweenEntityLocal:()=>Ko,CreateConnectionBetweenTwoConcepts:()=>K,CreateConnectionBetweenTwoConceptsGeneral:()=>ee,CreateConnectionBetweenTwoConceptsLocal:()=>In.h,CreateData:()=>ji,CreateDefaultConcept:()=>V.o,CreateDefaultLConcept:()=>Kt.u,CreateSession:()=>Vt,CreateSessionVisit:()=>Ht,CreateTheCompositionLocal:()=>U.R,CreateTheCompositionWithCache:()=>Nt,CreateTheConnection:()=>ae.q,CreateTheConnectionGeneral:()=>z,CreateTheConnectionLocal:()=>Zt.F,DATAID:()=>_n.y0,DATAIDDATE:()=>_n.iw,DATAV2:()=>_n.pU,DelayFunctionExecution:()=>Nn,DeleteConceptById:()=>Ne,DeleteConceptLocal:()=>bn,DeleteConnectionById:()=>J.m,DeleteConnectionByIdBulk:()=>J.E,DeleteConnectionByType:()=>jo.$S,DeleteConnectionByTypeBulk:()=>jo.L0,DeleteUser:()=>_e,DependencyObserver:()=>On.w,Environments:()=>po.B,FilterSearch:()=>so,FormatFromConnections:()=>sn.vw,FormatFromConnectionsAltered:()=>sn.y8,FreeschemaQuery:()=>Vo,FreeschemaQueryApi:()=>Ho,GetAllConnectionsOfComposition:()=>B.s,GetAllConnectionsOfCompositionBulk:()=>y.Y,GetAllTheConnectionsByTypeAndOfTheConcept:()=>jo.WC,GetComposition:()=>g.Nj,GetCompositionBulk:()=>He.dF,GetCompositionBulkWithDataId:()=>He.cw,GetCompositionFromConnectionsWithDataId:()=>He.p8,GetCompositionFromConnectionsWithDataIdFromConnections:()=>He.km,GetCompositionFromConnectionsWithDataIdInObject:()=>He.rv,GetCompositionFromConnectionsWithDataIdIndex:()=>He.Nt,GetCompositionFromConnectionsWithIndex:()=>He.as,GetCompositionFromConnectionsWithIndexFromConnections:()=>He.hG,GetCompositionFromMemoryWithConnections:()=>g.JA,GetCompositionList:()=>I,GetCompositionListAll:()=>k,GetCompositionListAllWithId:()=>b,GetCompositionListListener:()=>qn,GetCompositionListLocal:()=>R,GetCompositionListLocalWithId:()=>O,GetCompositionListWithId:()=>A,GetCompositionListWithIdUpdated:()=>S,GetCompositionListener:()=>Wn,GetCompositionLocal:()=>x,GetCompositionLocalWithId:()=>D,GetCompositionWithAllIds:()=>g.Mb,GetCompositionWithCache:()=>Ft,GetCompositionWithDataIdBulk:()=>Mt,GetCompositionWithDataIdWithCache:()=>Gt,GetCompositionWithId:()=>g.yz,GetCompositionWithIdAndDateFromMemory:()=>g.Ez,GetConceptBulk:()=>at.r,GetConceptByCharacter:()=>C.A,GetConceptByCharacterAndCategoryLocal:()=>w.$I,GetConceptByCharacterAndType:()=>se.A,GetConnectionBetweenTwoConceptsLinker:()=>Ln,GetConnectionBulk:()=>st.j,GetConnectionById:()=>Ge,GetConnectionDataPrefetch:()=>He.QL,GetConnectionOfTheConcept:()=>M,GetConnectionTypeForCount:()=>Zn.V,GetConnectionsBetweenApi:()=>xo,GetFreeschemaImage:()=>or,GetFreeschemaImageUrl:()=>ir,GetImageApi:()=>tr,GetLink:()=>le,GetLinkListListener:()=>Kn,GetLinkListener:()=>$n.d,GetLinkRaw:()=>de,GetLinkerConnectionFromConcepts:()=>Ce,GetLinkerConnectionToConcepts:()=>we,GetRelation:()=>Qt,GetRelationLocal:()=>hn,GetRelationNew:()=>Yt,GetRelationRaw:()=>Xt,GetTheConcept:()=>Q.A,GetTheConceptLocal:()=>cn.f,GetUserGhostId:()=>rn,JUSTDATA:()=>_n.ZJ,LConcept:()=>no,LConnection:()=>oo,LISTNORMAL:()=>_n.SL,LocalConceptsData:()=>v.v,LocalSyncData:()=>ao.H,LocalTransaction:()=>Eo,LogEvent:()=>oi,Logger:()=>mo.V,LoginToBackend:()=>lt,MakeTheInstanceConcept:()=>Y.A,MakeTheInstanceConceptLocal:()=>te.k,MakeTheTimestamp:()=>Ve,MakeTheTypeConceptApi:()=>me,MakeTheTypeConceptLocal:()=>ue.$,NORMAL:()=>_n.yv,PRIVATE:()=>Dn,PUBLIC:()=>Pn,PatcherStructure:()=>io,Prototype:()=>Ji,RAW:()=>_n.XZ,RecursiveSearchApi:()=>ze,RecursiveSearchApiNewRawFullLinker:()=>Xe,RecursiveSearchApiRaw:()=>Qe,RecursiveSearchApiRawFullLinker:()=>Ye,RecursiveSearchApiWithInternalConnections:()=>Je,RecursiveSearchListener:()=>Qn,SchemaQuery:()=>Qo,SchemaQueryListener:()=>Jo,SearchAllConcepts:()=>Pt,SearchLinkInternal:()=>wn,SearchLinkInternalAll:()=>Tn,SearchLinkMultipleAll:()=>sn.cf,SearchLinkMultipleAllObservable:()=>Fn,SearchLinkMultipleApi:()=>c.j,SearchQuery:()=>qe,SearchStructure:()=>co,SearchWithLinker:()=>Rt,SearchWithTypeAndLinker:()=>Hn.zl,SearchWithTypeAndLinkerApi:()=>Rn,Selector:()=>ii,SessionData:()=>ro,Signin:()=>ft,Signup:()=>ut,SignupEntity:()=>ht,SplitStrings:()=>l.f,StatefulWidget:()=>bo,SyncData:()=>j.Y,TokenStorage:()=>Oe.b,TrashTheConcept:()=>De,UpdateComposition:()=>xt,UpdateCompositionLocal:()=>ln.D,UserBinaryTree:()=>nn,Validator:()=>Mo,ViewInternalData:()=>yn,ViewInternalDataApi:()=>fn,WidgetTree:()=>Yo,buildFetchConnection:()=>Do,clearAllCaches:()=>ei,convertFromConceptToLConcept:()=>vn.F4,convertFromLConceptToConcept:()=>vn.dp,convertWidgetTreeToWidget:()=>Ei,convertWidgetTreeToWidgetWithWrapper:()=>Oi,createFormFieldData:()=>Wo,createPrototypeLocal:()=>Xi,dispatchIdEvent:()=>vr,getFromDatabaseWithType:()=>ie,getObjectsFromIndexDb:()=>re,getTsccsAutocompleteMetadata:()=>Oo,getUploadFileLimit:()=>rt,getUserDetails:()=>Ao.s,getWidgetBulkFromId:()=>Pi,getWidgetFromId:()=>Di,handleServiceWorkerException:()=>Cr,hasActivatedSW:()=>dr,importLatestWidget:()=>ki,importRecentWidget:()=>bi,init:()=>pr,orderTheConnections:()=>eo.X,recursiveFetch:()=>g.zN,recursiveFetchNew:()=>kt,removeAllChildren:()=>ti,renderImportedWidget:()=>Ai,renderLatestWidget:()=>Si,renderPage:()=>Ii,renderWidget:()=>Li,searchLinkMultipleListener:()=>Un,sendEmail:()=>wo,sendMessage:()=>fr,serviceWorker:()=>rr,setHasActivatedSW:()=>ur,storeToDatabase:()=>oe,subscribedListeners:()=>cr,tsccsAutocompleteMetadata:()=>Ro,unwrapContainers:()=>Ui,updateAccessToken:()=>hr,uploadAttachment:()=>tt,uploadFile:()=>it,uploadImage:()=>nt,uploadImageV2:()=>ot,validDocumentFormats:()=>et,validImageFormats:()=>Ze}),n.r(t);var o={};n.r(o),n.d(o,{ADMIN:()=>xn,ALLID:()=>_n.BG,AccessTracker:()=>Pe.J,AddGhostConcept:()=>an,Anomaly:()=>Uo,BaseUrl:()=>u.B,BinaryTree:()=>be.W,BuildWidgetFromId:()=>Zo.Cp,BuilderStatefulWidget:()=>Lo,Composition:()=>St,CompositionBinaryTree:()=>Tt,CompositionNode:()=>Ct,Concept:()=>to.j,ConceptsData:()=>d.I,Connection:()=>W.N,ConnectionData:()=>Ee.d,CountInfo:()=>ni.y,CreateComposition:()=>F.A,CreateConnection:()=>Zt.d,CreateConnectionBetweenEntityLocal:()=>Ko,CreateConnectionBetweenTwoConcepts:()=>K,CreateConnectionBetweenTwoConceptsGeneral:()=>ee,CreateConnectionBetweenTwoConceptsLocal:()=>In.h,CreateData:()=>ji,CreateDefaultConcept:()=>V.o,CreateDefaultLConcept:()=>Kt.u,CreateSession:()=>Vt,CreateSessionVisit:()=>Ht,CreateTheCompositionLocal:()=>U.R,CreateTheCompositionWithCache:()=>Nt,CreateTheConnection:()=>ae.q,CreateTheConnectionGeneral:()=>z,CreateTheConnectionLocal:()=>Zt.F,DATAID:()=>_n.y0,DATAIDDATE:()=>_n.iw,DATAV2:()=>_n.pU,DelayFunctionExecution:()=>Nn,DeleteConceptById:()=>Ne,DeleteConceptLocal:()=>bn,DeleteConnectionById:()=>J.m,DeleteConnectionByIdBulk:()=>J.E,DeleteConnectionByType:()=>jo.$S,DeleteConnectionByTypeBulk:()=>jo.L0,DeleteUser:()=>_e,DependencyObserver:()=>On.w,Environments:()=>po.B,FilterSearch:()=>so,FormatFromConnections:()=>sn.vw,FormatFromConnectionsAltered:()=>sn.y8,FreeschemaQuery:()=>Vo,FreeschemaQueryApi:()=>Ho,GetAllConnectionsOfComposition:()=>B.s,GetAllConnectionsOfCompositionBulk:()=>y.Y,GetAllTheConnectionsByTypeAndOfTheConcept:()=>jo.WC,GetComposition:()=>g.Nj,GetCompositionBulk:()=>He.dF,GetCompositionBulkWithDataId:()=>He.cw,GetCompositionFromConnectionsWithDataId:()=>He.p8,GetCompositionFromConnectionsWithDataIdFromConnections:()=>He.km,GetCompositionFromConnectionsWithDataIdInObject:()=>He.rv,GetCompositionFromConnectionsWithDataIdIndex:()=>He.Nt,GetCompositionFromConnectionsWithIndex:()=>He.as,GetCompositionFromConnectionsWithIndexFromConnections:()=>He.hG,GetCompositionFromMemoryWithConnections:()=>g.JA,GetCompositionList:()=>I,GetCompositionListAll:()=>k,GetCompositionListAllWithId:()=>b,GetCompositionListListener:()=>qn,GetCompositionListLocal:()=>R,GetCompositionListLocalWithId:()=>O,GetCompositionListWithId:()=>A,GetCompositionListWithIdUpdated:()=>S,GetCompositionListener:()=>Wn,GetCompositionLocal:()=>x,GetCompositionLocalWithId:()=>D,GetCompositionWithAllIds:()=>g.Mb,GetCompositionWithCache:()=>Ft,GetCompositionWithDataIdBulk:()=>Mt,GetCompositionWithDataIdWithCache:()=>Gt,GetCompositionWithId:()=>g.yz,GetCompositionWithIdAndDateFromMemory:()=>g.Ez,GetConceptBulk:()=>at.r,GetConceptByCharacter:()=>C.A,GetConceptByCharacterAndCategoryLocal:()=>w.$I,GetConceptByCharacterAndType:()=>se.A,GetConnectionBetweenTwoConceptsLinker:()=>Ln,GetConnectionBulk:()=>st.j,GetConnectionById:()=>Ge,GetConnectionDataPrefetch:()=>He.QL,GetConnectionOfTheConcept:()=>M,GetConnectionTypeForCount:()=>Zn.V,GetConnectionsBetweenApi:()=>xo,GetFreeschemaImage:()=>or,GetFreeschemaImageUrl:()=>ir,GetImageApi:()=>tr,GetLink:()=>le,GetLinkListListener:()=>Kn,GetLinkListener:()=>$n.d,GetLinkRaw:()=>de,GetLinkerConnectionFromConcepts:()=>Ce,GetLinkerConnectionToConcepts:()=>we,GetRelation:()=>Qt,GetRelationLocal:()=>hn,GetRelationNew:()=>Yt,GetRelationRaw:()=>Xt,GetTheConcept:()=>Q.A,GetTheConceptLocal:()=>cn.f,GetUserGhostId:()=>rn,JUSTDATA:()=>_n.ZJ,LConcept:()=>no,LConnection:()=>oo,LISTNORMAL:()=>_n.SL,LocalConceptsData:()=>v.v,LocalSyncData:()=>ao.H,LocalTransaction:()=>Eo,LogEvent:()=>oi,Logger:()=>mo.V,LoginToBackend:()=>lt,MakeTheInstanceConcept:()=>Y.A,MakeTheInstanceConceptLocal:()=>te.k,MakeTheTimestamp:()=>Ve,MakeTheTypeConceptApi:()=>me,MakeTheTypeConceptLocal:()=>ue.$,NORMAL:()=>_n.yv,PRIVATE:()=>Dn,PUBLIC:()=>Pn,PatcherStructure:()=>io,Prototype:()=>Ji,RAW:()=>_n.XZ,RecursiveSearchApi:()=>ze,RecursiveSearchApiNewRawFullLinker:()=>Xe,RecursiveSearchApiRaw:()=>Qe,RecursiveSearchApiRawFullLinker:()=>Ye,RecursiveSearchApiWithInternalConnections:()=>Je,RecursiveSearchListener:()=>Qn,SchemaQuery:()=>Qo,SchemaQueryListener:()=>Jo,SearchAllConcepts:()=>Pt,SearchLinkInternal:()=>wn,SearchLinkInternalAll:()=>Tn,SearchLinkMultipleAll:()=>sn.cf,SearchLinkMultipleAllObservable:()=>Fn,SearchLinkMultipleApi:()=>c.j,SearchQuery:()=>qe,SearchStructure:()=>co,SearchWithLinker:()=>Rt,SearchWithTypeAndLinker:()=>Hn.zl,SearchWithTypeAndLinkerApi:()=>Rn,Selector:()=>ii,SessionData:()=>ro,Signin:()=>ft,Signup:()=>ut,SignupEntity:()=>ht,SplitStrings:()=>l.f,StatefulWidget:()=>bo,SyncData:()=>j.Y,TokenStorage:()=>Oe.b,TrashTheConcept:()=>De,UpdateComposition:()=>xt,UpdateCompositionLocal:()=>ln.D,UserBinaryTree:()=>nn,Validator:()=>Mo,ViewInternalData:()=>yn,ViewInternalDataApi:()=>fn,WidgetTree:()=>Yo,buildFetchConnection:()=>Do,clearAllCaches:()=>ei,convertFromConceptToLConcept:()=>vn.F4,convertFromLConceptToConcept:()=>vn.dp,convertWidgetTreeToWidget:()=>Ei,convertWidgetTreeToWidgetWithWrapper:()=>Oi,createFormFieldData:()=>Wo,createPrototypeLocal:()=>Xi,dispatchIdEvent:()=>vr,getFromDatabaseWithType:()=>ie,getObjectsFromIndexDb:()=>re,getTsccsAutocompleteMetadata:()=>Oo,getUploadFileLimit:()=>rt,getUserDetails:()=>Ao.s,getWidgetBulkFromId:()=>Pi,getWidgetFromId:()=>Di,handleServiceWorkerException:()=>Cr,hasActivatedSW:()=>dr,importLatestWidget:()=>ki,importRecentWidget:()=>bi,init:()=>pr,orderTheConnections:()=>eo.X,recursiveFetch:()=>g.zN,recursiveFetchNew:()=>kt,removeAllChildren:()=>ti,renderImportedWidget:()=>Ai,renderLatestWidget:()=>Si,renderPage:()=>Ii,renderWidget:()=>Li,searchLinkMultipleListener:()=>Un,sendEmail:()=>wo,sendMessage:()=>fr,serviceWorker:()=>rr,setHasActivatedSW:()=>ur,storeToDatabase:()=>oe,subscribedListeners:()=>cr,tsccsAutocompleteMetadata:()=>Ro,unwrapContainers:()=>Ui,updateAccessToken:()=>hr,uploadAttachment:()=>tt,uploadFile:()=>it,uploadImage:()=>nt,uploadImageV2:()=>ot,validDocumentFormats:()=>et,validImageFormats:()=>Ze});var i=n(5020),r=n(785),a=n(8176),s=n(205),c=n(2832),l=n(6467),d=n(3026),u=n(9581),h=n(3518),p=n(1863),f=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function m(e,t){var n=arguments;return f(this,void 0,void 0,function*(){const o=mo.V.logfunction("GetAllConceptsByType",n);try{var i=new URLSearchParams;i.append("type",e),i.append("user_id",t.toString());var r=(0,h.Xr)("application/x-www-form-urlencoded");const n=yield fetch(u.B.GetAllConceptsByTypeUrl(),{method:"POST",headers:r,body:i});if(n.ok){const e=yield n.json();for(var a=0;a<e.length;a++)d.I.AddConcept(e[a])}else(0,p.ry)(n)}catch(e){Error,(0,p.Mb)(e,u.B.GetAllConceptsByTypeUrl()),(0,p.ey)(o,"GetAllConceptsByType",e)}})}var y=n(8642),v=n(9736),g=n(8939),C=n(2013),w=n(8064),T=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function I(e,t){var n=arguments;return T(this,arguments,void 0,function*(e,t,o=10,i=1){const r=mo.V.logfunction("GetCompositionList",n)||{};if(rr){r.serviceWorker=!0;try{const n=yield fr("GetCompositionList",{compositionName:e,userId:t,inpage:o,page:i});return mo.V.logUpdate(r),n.data}catch(e){(0,p.ey)(r,"GetCompositionList",e),Cr(e)}}let a=yield(0,C.A)(e),s=[];if(a){yield m(e,t);let n=yield d.I.GetConceptsByTypeIdAndUser(a.id,t),r=o*(i-1),c=[];for(let e=r;e<r+o;e++)n[e]&&c.push(n[e].id);yield(0,y.Y)(c);for(let e=r;e<r+o;e++)if(n[e]){let t=yield(0,g.kx)(n[e].id);s.push(t)}}return mo.V.logUpdate(r),s})}function k(e,t){return T(this,arguments,void 0,function*(e,t,n=10,o=1){let i=R(e,t),r=I(e,t),a=[];return Promise.race([i,r]).then(e=>{a.push(...e)}).catch(e=>{}),r.then(e=>{a.push(...e)}),a})}function b(e,t){return T(this,arguments,void 0,function*(e,t,n=10,o=1){if(rr)try{return(yield fr("GetCompositionListAllWithId",{compositionName:e,userId:t,inpage:n,page:o})).data}catch(e){Cr(e)}let i=yield(0,w.Ay)(e),r=yield(0,C.A)(e),a=[],s=[],c=[],l=[];0!=i.id&&(s=yield v.v.GetConceptsByTypeIdAndUser(i.id,t)),0!=r.id&&(yield m(e,t),l=yield d.I.GetConceptsByTypeIdAndUser(r.id,t),a=l);for(let e=0;e<s.length;e++){let t=!1;for(let n=0;n<l.length;n++)s[e].ghostId==l[n].ghostId&&(t=!0);t||c.push(s[e])}let u=[];return u=yield function(e,t){return T(this,arguments,void 0,function*(e,t,n=10,o=1){let i=[],r=n*(o-1),a=[],s=t.length;for(let t=r;t<r+n-s;t++)e[t]&&a.push(e[t].id);for(let e=0;e<t.length;e++){let n=yield D(t[e].id);i.push(n)}yield(0,y.Y)(a);for(let t=r;t<r+n-s;t++)if(e[t]){let n=yield(0,g.RW)(e[t].id);i.push(n)}return i})}(a,c,n,o),u})}function A(e,t){return T(this,arguments,void 0,function*(e,t,n=10,o=1){if(rr)try{return(yield fr("GetCompositionListWithId",{compositionName:e,userId:t,inpage:n,page:o})).data}catch(e){Cr(e)}let i=yield(0,C.A)(e),r=[];if(i){yield m(e,t);let a=yield d.I.GetConceptsByTypeIdAndUser(i.id,t),s=n*(o-1),c=[];for(let e=s;e<s+n;e++)a[e]&&c.push(a[e].id);yield(0,y.Y)(c);for(let e=s;e<s+n;e++)if(a[e]){let t=yield(0,g.RW)(a[e].id);r.push(t)}}return r})}function S(e,t){return T(this,arguments,void 0,function*(e,t,n=10,o=1){let i=yield(0,C.w)(e),r=[];if(i){yield m(e,t);let a=yield d.I.GetConceptsByTypeIdAndUser(i.id,t),s=n*(o-1),c=[];for(let e=s;e<s+n;e++)a[e]&&c.push(a[e].id);yield(0,y.Y)(c);for(let e=s;e<s+n;e++)if(a[e]){let t=yield(0,g.RW)(a[e].id);r.push(t)}}return r})}var L=n(4864),N=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};var _=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function x(e){return _(this,void 0,void 0,function*(){var t,n;try{if(rr)try{return(yield fr("GetCompositionLocal",{id:e})).data}catch(e){Cr(e)}let o=[],i={};o=yield L.G.GetConnectionsOfCompositionLocal(e);let r=[];for(let e=0;e<o.length;e++)r.includes(o[e].ofTheConceptId)||r.push(o[e].ofTheConceptId);let a=yield v.v.GetConcept(e);if(0==a.id){let t=yield function(e){var t=arguments;return N(this,void 0,void 0,function*(){const n=mo.V.logfunction("TranslateLocalToReal",t);let o=(0,V.o)();try{var i=(0,h.ab)("application/x-www-form-urlencoded");const t=yield fetch(u.B.GetRealConceptById(),{method:"POST",headers:i,body:`id=${e}`});if(t.ok)return o=yield t.json(),o.id>0&&d.I.AddConcept(o),o;(0,p.ry)(t),mo.V.logUpdate(n)}catch(e){Error,(0,p.Mb)(e,u.B.GetRealConceptById()),(0,p.ey)(n,"TranslateLocalToReal",e)}return o})}(e);if(t.id>0)return yield(0,g.Nj)(t.id)}let s=yield P(e,o,r);return i[null!==(n=null===(t=null==a?void 0:a.type)||void 0===t?void 0:t.characterValue)&&void 0!==n?n:"top"]=s,i}catch(e){throw e}})}function D(e){return _(this,void 0,void 0,function*(){var t,n;try{if(rr)try{return(yield fr("GetCompositionLocalWithId",{id:e})).data}catch(e){Cr(e)}let o=[],i={},r={};o=yield L.G.GetConnectionsOfCompositionLocal(e);let a=[];for(let e=0;e<o.length;e++)a.includes(o[e].ofTheConceptId)||a.push(o[e].ofTheConceptId);let s=yield v.v.GetConcept(e);if(0!=s.id){let r=yield P(e,o,a);i[null!==(n=null===(t=null==s?void 0:s.type)||void 0===t?void 0:t.characterValue)&&void 0!==n?n:"top"]=r}return r.data=i,r.id=e,r}catch(e){throw e}})}function P(e,t,n){return _(this,arguments,void 0,function*(e,t,n,o=[]){var i,r,a,s;let c={},l=[],d=yield v.v.GetConcept(e);if(0!=d.id&&null==d.type){let e=d.typeId,t=yield v.v.GetConcept(e);d.type=t}r=null===(i=null==d?void 0:d.type)||void 0===i?void 0:i.characterValue;if(!n.includes(e))return null==d?void 0:d.characterValue;if(o.includes(e))return"";o.push(e);for(let o=0;o<t.length;o++)if(t[o].ofTheConceptId==e){let e=t[o].toTheConceptId,i=yield v.v.GetConcept(e);if(0!=i.id&&null==(null==i?void 0:i.type)){let e=i.typeId,t=yield v.v.GetConcept(e);i.type=t}let r="the_",d=(null!==(s=null===(a=null==i?void 0:i.type)||void 0===a?void 0:a.characterValue)&&void 0!==s?s:"top").replace(r,"");if(isNaN(Number(d))){if(d){const o=yield P(e,t,n);c[d]=o}}else{const o=yield P(e,t,n);l[d]=o,c=l}}return c})}var E=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function R(e,t){return E(this,void 0,void 0,function*(){if(rr)try{return(yield fr("GetCompositionListLocal",{compositionName:e,userId:t})).data}catch(e){Cr(e)}try{let n=yield(0,w.Ay)(e),o=[];if(0!=n.id){let e=yield v.v.GetConceptsByTypeIdAndUser(n.id,t);for(let t=0;t<e.length;t++){let n=yield x(e[t].id);o.push(n)}}return o}catch(e){throw e}})}function O(e,t){return E(this,void 0,void 0,function*(){if(rr)try{return(yield fr("GetCompositionListLocalWithId",{compositionName:e,userId:t})).data}catch(e){Cr(e)}try{let n=yield(0,w.Ay)(e),o=[];if(0!=n.id){let e=yield v.v.GetConceptsByTypeIdAndUser(n.id,t);for(let t=0;t<e.length;t++){let n=yield D(e[t].id);o.push(n)}}return o}catch(e){throw e}})}var B=n(2),F=n(1218),U=n(999),G=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function M(e,t,n){var o=arguments;return G(this,arguments,void 0,function*(e,t,n,i=10,r=1){const a=mo.V.logfunction("GetConnectionOfTheConcept",o)||{};let s=[];try{if(rr){a.serviceWorker=!0;try{const o=yield fr("GetConnectionOfTheConcept",{typeId:e,ofTheConceptId:t,userId:n,inpage:i,page:r});return mo.V.logUpdate(a),o.data}catch(e){(0,p.ey)(a,"GetConnectionOfTheConcept",e),Cr(e)}}let o=new URLSearchParams;o.append("typeId",`${e}`),o.append("ofTheConceptId",`${t}`),o.append("userId",`${n}`),o.append("inpage",`${i}`),o.append("page",`${r}`);let c=(0,h.Xr)("application/x-www-form-urlencoded");const l=yield fetch(u.B.GetAllConnectionsOfConceptUrl(),{method:"POST",headers:c,body:o});return l.ok?s=yield l.json():((0,p.ey)(a,"GetConnectionOfTheConcept",l.status),(0,p.ry)(l)),mo.V.logUpdate(a),s}catch(e){Error,(0,p.Mb)(e,u.B.GetAllConnectionsOfConceptUrl()),(0,p.ey)(a,"GetConnectionOfTheConcept",e)}})}var W=n(2155),j=n(442),V=n(7282),q=n(5976),H=n(7273),$=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function z(e,t,n,o){return $(this,arguments,void 0,function*(e,t,n,o,i=1,r=4){if(e>0&&n>0){var a=t,s=yield q.p.getId(),c=new W.N(s,e,n,a,o,i,r);return e==n?(c.ofTheConceptId=0,c.toTheConceptId=1,c):(c.toUpdate=!0,c.isTemp=!1,j.Y.AddConnection(c),c)}throw new H.z("cannot create connection because id are negative ",!1,400,"")})}var J=n(4818),Q=n(7876),Y=n(8407),X=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function K(e,t,n){return X(this,arguments,void 0,function*(e,t,n,o=!1,i=!1){var r,a;if(rr)try{return(yield fr("CreateConnectionBetweenTwoConcepts",{ofTheConcept:e,toTheConcept:t,linker:n,both:o,count:i})).data}catch(e){Cr(e)}let s=e.userId;if(o){let o=n+"_by",a=(null===(r=t.type)||void 0===r?void 0:r.characterValue)+"_s"+"_"+o;i&&(yield Z(o,t,s));let c=yield(0,Y.A)("connection",a,!1,999,999,999),l=new W.N(0,t.id,e.id,s,c.id,1e3,4);j.Y.AddConnection(l)}let c=n+"_s",l=(null===(a=e.type)||void 0===a?void 0:a.characterValue)+"_s"+"_"+c;i&&(yield Z(c,e,s));let d=yield(0,Y.A)("connection",l,!1,999,999,999),u=new W.N(0,e.id,t.id,s,d.id,1e3,4);return j.Y.AddConnection(u),u})}function Z(e,t){return X(this,arguments,void 0,function*(e,t,n=null){var o;let i=t,r=null!=n?n:t.userId,a=e+"_count",s=(null===(o=t.type)||void 0===o?void 0:o.characterValue)+"_s_"+a,c=yield(0,Y.A)("connection",s,!1,r,4,999),l=yield M(c.id,t.id,r,10,1),d=[],u=(0,V.o)();for(let e=0;e<l.length;e++){let t=yield(0,Q.A)(l[e].toTheConceptId);d.push(t)}if(d.length<1)u=yield(0,Y.A)("count","1",!1,r,4,999);else{let e=d[0],t=0;try{t=Number(e.characterValue)}catch(e){t=0}t+=1,u=yield(0,Y.A)("count",t.toString(),!1,r,4,999);for(let e=0;e<l.length;e++)(0,J.m)(l[e].id)}let h=new W.N(0,i.id,u.id,i.userId,c.id,1e3,4);yield j.Y.AddConnection(h)})}function ee(e,t,n){return X(this,arguments,void 0,function*(e,t,n,o=!1,i=!1){var r,a;let s=e.userId;if(o){let o=n+"_by",a=(null===(r=t.type)||void 0===r?void 0:r.characterValue)+"_s"+"_"+o;i&&(yield Z(o,t,s));let c=yield(0,Y.A)("connection",a,!1,999,999,999),l=new W.N(0,t.id,e.id,s,c.id,1e3,4);j.Y.AddConnection(l)}let c=n+"_s",l=(null===(a=e.type)||void 0===a?void 0:a.characterValue)+"_s"+"_"+c;i&&(yield Z(c,e,s));let d=yield(0,Y.A)("connection",l,!1,999,999,999);return yield z(e.id,e.userId,t.id,d.id,1e3,4)})}var te=n(5868),ne=(n(3655),function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})});function oe(e,t){const n=mo.V.logfunction("storeToDatabase",[e,"noindexdb"]);mo.V.logUpdate(n)}function ie(e,t,n){return ne(this,void 0,void 0,function*(){const t=mo.V.logfunction("getFromDatabaseWithType",[e,"noindexdb"]);mo.V.logUpdate(t)})}function re(e){return ne(this,void 0,void 0,function*(){const t=mo.V.logfunction("getObjectsFromIndexDb",[e,"noindexdb"]);mo.V.logUpdate(t)})}var ae=n(1666),se=n(4402),ce=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function le(e,t){var n=arguments;return ce(this,arguments,void 0,function*(e,t,o=10,i=1){var r;const a=mo.V.logfunction("GetLink",n)||{};if(rr){a.serviceWorker=!0;try{const n=yield fr("GetLink",{id:e,linker:t,inpage:o,page:i});return mo.V.logUpdate(a),n.data}catch(e){(0,p.ey)(a,"GetLink",e),Cr(e)}}let s=[],c=yield(0,Q.A)(e),l=(null===(r=c.type)||void 0===r?void 0:r.characterValue)+"_s_"+t,d=yield(0,se.A)(l,16);if(d.id>0){let e=yield M(d.id,c.id,c.userId,o,i),t=[];for(let n=0;n<e.length;n++)t.push(e[n].toTheConceptId);yield(0,y.Y)(t);for(let t=0;t<e.length;t++){let n=e[t].toTheConceptId,o=yield(0,Q.A)(n),i=yield(0,g.Ez)(o.id);s.push(i)}}return mo.V.logUpdate(a),s})}function de(e,t){var n=arguments;return ce(this,arguments,void 0,function*(e,t,o=10,i=1){var r;const a=mo.V.logfunction("GetLinkRaw",n);let s=[],c=yield(0,Q.A)(e),l=(null===(r=c.type)||void 0===r?void 0:r.characterValue)+"_s_"+t,d=yield(0,se.A)(l,16);if(d.id>0){let e=yield M(d.id,c.id,c.userId,o,i),t=[];for(let n=0;n<e.length;n++)t.push(e[n].toTheConceptId);for(let t=0;t<e.length;t++){let n=e[t].toTheConceptId,o=yield(0,Q.A)(n);s.push(o)}}return mo.V.logUpdate(a),s})}var ue=n(8357),he=n(843),pe=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};const fe=new Map;function me(e,t){var n=arguments;return pe(this,void 0,void 0,function*(){const t=mo.V.logfunction("MakeTheTypeConceptApi",n);let o=(0,V.o)();if(fe.has(e))return fe.get(e)||o;const i=(()=>pe(this,void 0,void 0,function*(){try{if(o=yield(0,he.Az)(e),0==o.id||4==o.typeId){let n=(0,h.Xr)("application/x-www-form-urlencoded");const i=yield fetch(u.B.MakeTheTypeConceptUrl(),{method:"POST",headers:n,body:`type=${e}`});if(!i.ok)throw(0,p.ry)(i),new Error(`Error! status: ${i.status}`);let r=yield i.json();o=r,mo.V.logUpdate(t)}}catch(e){Error,(0,p.Mb)(e,u.B.MakeTheTypeConceptUrl()),(0,p.ey)(t,"MakeTheTypeConceptApi",e)}finally{fe.delete(e)}return o}))();return fe.set(e,i),i})}var ye=n(8675),ve=n(6058),ge=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function Ce(e){var t=arguments;return ge(this,void 0,void 0,function*(){const n=mo.V.logfunction("GetLinkerConnectionFromConcepts",t);let o=yield(0,ye.l)(e);for(let e=0;e<o.length;e++){let t=o[e],n=t.typeId,i=yield(0,Q.A)(n);t.type=i}return mo.V.logUpdate(n),o})}function we(e){var t=arguments;return ge(this,void 0,void 0,function*(){const n=mo.V.logfunction("GetLinkerConnectionToConcepts",t);let o=yield(0,ve.W)(e);for(let e=0;e<o.length;e++){let t=o[e],n=t.typeId,i=yield(0,Q.A)(n);t.type=i}return mo.V.logUpdate(n),o})}var Te=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};var Ie=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};var ke=n(6963),be=n(2202),Ae=n(5457),Se=n(991),Le=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function Ne(e){var t=arguments;return Le(this,void 0,void 0,function*(){const n=mo.V.logfunction("DeleteConceptById",t);if(rr)try{return(yield fr("DeleteConceptById",{id:e})).data}catch(e){Cr(e)}if(e>0){var o=yield d.I.GetConcept(e);if(o.id>0){var i=o.typeId,r=o.characterValue;yield Ae.c.removeTypeConcept(i,e),yield ke.f.removeNodeByCharacter(r,e),yield function(e){var t=arguments;return Ie(this,void 0,void 0,function*(){let n=!1;const o=mo.V.logfunction("DeleteTheConcept",t);try{const t=new FormData;t.append("id",e.toString());let i=(0,h.BZ)();const r=yield fetch(u.B.DeleteConceptUrl(),{method:"POST",headers:i,body:t});r.ok?n=(yield r.json()).success:(0,p.ry)(r),n&&d.I.AddNpc(e),mo.V.logUpdate(o)}catch(e){Error,(0,p.Mb)(e,u.B.DeleteConceptUrl()),(0,p.ey)(o,"DeleteTheConcept",e)}return n})}(e),yield be.W.removeNodeFromTree(e),yield Se.H.removeNodeFromTree(e)}}else v.v.RemoveConceptById(e);mo.V.logUpdate(n)})}function _e(e){return Le(this,void 0,void 0,function*(){if(rr)try{return(yield fr("DeleteUser",{id:e})).data}catch(e){Cr(e)}e>0?function(e){var t=arguments;Te(this,void 0,void 0,function*(){const n=mo.V.logfunction("DeleteUserInBackend",t);try{var o=(0,h.ab)("application/json","");let t=u.B.DeleteUserUrl();t=t+"?conceptId="+e+"&apiKey=freeschema";const i=yield fetch(t,{method:"POST",headers:o});if(i.ok){let e=yield i.json(),t=Number(e.data);return Ne(t),mo.V.logUpdate(n),t}throw(0,p.ry)(i),new Error(`Delete composition Error! status: ${i.status}`)}catch(e){Error,(0,p.Mb)(e,u.B.DeleteConceptUrl()),(0,p.ey)(n,"DeleteUserInBackend",e)}})}(e):v.v.RemoveConceptById(e)})}var xe=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function De(e,t){return xe(this,void 0,void 0,function*(){try{const n=new Headers;n.append("Authorization","Bearer "+t);const o=new FormData;o.append("id",e.toString());const i=yield fetch(u.B.DeleteConceptUrl(),{method:"POST",body:o,headers:n});if(!i.ok)throw(0,p.ry)(i),new Error(`Delete composition Error! status: ${i.status}`)}catch(e){Error,(0,p.Mb)(e,u.B.DeleteConceptUrl())}})}var Pe=n(1735),Ee=n(8286),Re=n(1596),Oe=n(4024),Be=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function Fe(e){var t=arguments;return Be(this,void 0,void 0,function*(){const n=mo.V.logfunction("GetConnection",t);let o=yield Ee.d.GetConnection(e);try{if(0!=o.id)return o;{const t=new FormData;t.append("id",e.toString());const i={method:"POST",headers:{Authorization:"Bearer "+Oe.b.BearerAccessToken},body:t};let r;try{r=yield fetch(u.B.GetConnectionUrl(),i)}catch(e){r=yield(0,Re.g)(i,"/api/get-connection-by-id")}return yield function(e,t){return Be(this,void 0,void 0,function*(){e.ok?(t=yield e.json(),Ee.d.AddConnection(t)):(0,p.ry)(e)})}(r,o),mo.V.logUpdate(n),o}}catch(e){Error,(0,p.Mb)(e,u.B.GetConnectionUrl()),(0,p.ey)(n,"GetConnection",e)}})}var Ue=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function Ge(e){var t=arguments;return Ue(this,void 0,void 0,function*(){const n=mo.V.logfunction("GetConnectionById",t);if(!0===Pe.J.activateStatus)try{Pe.J.incrementConnection(e)}catch(e){mo.V.log("ERROR","Error Adding Connection")}if(rr)try{return(yield fr("GetConnectionById",{id:e})).data}catch(e){Cr(e)}let o=yield Ee.d.GetConnection(e);if((null==o||0==o.id)&&null!=e&&null!=e){o=yield Fe(e)}return mo.V.logUpdate(n),o})}var Me=n(2212),We=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};var je=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function Ve(e,t,n){return je(this,arguments,void 0,function*(e,t,n,o=4,i=999){const r=mo.V.logfunction("MakeTheTimestamp")||{};if(rr){r.serviceWorker=!0;try{const a=yield fr("MakeTheTimestamp",{type:e,referent:t,userId:n,accessId:o,sessionInformationId:i});return mo.V.logUpdate(r),a.data}catch(e){(0,p.ey)(r,"MakeTheTimestamp",e),Cr(e)}}let a,s="",c=e.startsWith("the_"),l=(0,V.o)();s=c?e:"the_"+e,l=yield me(s,n);let d=yield function(e,t,n,o,i,r,a){return We(this,void 0,void 0,function*(){let s=yield(0,se.A)(e,o),c=s;return 0==c.id&&(s=yield(0,Me.Ay)(e,t,n,o,i,r,a),c=s),c})}(t,n,4,l.id,0,o,s);return a=d,mo.V.logUpdate(r),a})}class qe{constructor(){this.composition=0,this.type="",this.linker="",this.inpage=10,this.page=1,this.listLinkers=[],this.fullLinkers=[],this.textSearch="",this.logic="or",this.reverse=!1,this.doFilter=!1,this.filterSearches=[],this.selectors=[],this.ofCompositions=[]}}var He=n(6687),$e=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function ze(){var e=arguments;return $e(this,arguments,void 0,function*(t=0,n=[],o="",i=[]){const r=mo.V.logfunction("RecursiveSearchApi",e)||{};let a=[];try{if(rr){r.serviceWorker=!0;try{const e=yield fr("RecursiveSearchApi",{composition:t,listLinkers:n,textSearch:o,fullLinkers:i});return mo.V.logUpdate(r),e.data}catch(e){(0,p.ey)(r,"RecursiveSearchApi",e),Cr(e)}}let e=new qe;e.composition=t,e.listLinkers=n,e.fullLinkers=i,e.textSearch=o;let s=JSON.stringify(e),c=(0,h.Xr)();const l=yield fetch(u.B.RecursiveSearchUrl(),{method:"POST",headers:c,body:s});if(l.ok){const e=yield l.json();let t=e.compositionIds,n=e.internalConnections;e.externalConnections;a=yield(0,He.p8)(t,n)}else(0,p.ey)(r,"RecursiveSearchApi",l.status),(0,p.ry)(l);mo.V.logUpdate(r)}catch(e){Error,(0,p.ey)(r,"RecursiveSearchApi",e),(0,p.Mb)(e,u.B.RecursiveSearchUrl())}return a})}function Je(){var e=arguments;return $e(this,arguments,void 0,function*(t=0,n=[],o=""){const i=mo.V.logfunction("RecursiveSearchApiWithInternalConnections",e)||{};let r=[];try{if(rr){i.serviceWorker=!0;try{const e=yield fr("RecursiveSearchApiWithInternalConnections",{composition:t,listLinkers:n,textSearch:o});return mo.V.logUpdate(i),e.data}catch(e){(0,p.ey)(i,"RecursiveSearchApiWithInternalConnections",e),Cr(e)}}let e=new qe;e.composition=t,e.listLinkers=n,e.textSearch=o;let a=JSON.stringify(e),s=(0,h.Xr)();const c=yield fetch(u.B.RecursiveSearchUrl(),{method:"POST",headers:s,body:a});if(c.ok){const e=yield c.json();let t=e.compositionIds,n=e.internalConnections;e.externalConnections;r=yield(0,He.km)(t,n),mo.V.logUpdate(i)}else(0,p.ey)(i,"GetCompositionConnectionsBetweenTwoConcepts",c.status),(0,p.ry)(c)}catch(e){Error,(0,p.ey)(i,"GetCompositionConnectionsBetweenTwoConcepts",e),(0,p.Mb)(e,u.B.RecursiveSearchUrl())}return r})}function Qe(){var e=arguments;return $e(this,arguments,void 0,function*(t=0,n=[],o="",i=[]){const r=mo.V.logfunction("RecursiveSearchApiRaw",e)||{};try{if(rr){r.serviceWorker=!0;try{const e=yield fr("RecursiveSearchApiRaw",{composition:t,listLinkers:n,textSearch:o,fullLinkers:i});return mo.V.logUpdate(r),e.data}catch(e){(0,p.ey)(r,"RecursiveSearchApiRaw",e),Cr(e)}}let e=new qe;e.composition=t,e.listLinkers=n,e.textSearch=o,e.fullLinkers=i;let a=JSON.stringify(e),s=(0,h.Xr)();const c=yield fetch(u.B.RecursiveSearchUrl(),{method:"POST",headers:s,body:a});if(c.ok){const e=yield c.json();e.compositionIds,e.internalConnections,e.externalConnections;return mo.V.logUpdate(r),e}return(0,p.ey)(r,"RecursiveSearchApiRaw",c.status),(0,p.ry)(c),mo.V.logUpdate(r),[]}catch(e){Error,(0,p.ey)(r,"RecursiveSearchApiRaw",e),(0,p.Mb)(e,u.B.RecursiveSearchUrl())}})}function Ye(){var e=arguments;return $e(this,arguments,void 0,function*(t=0,n=[],o=""){const i=mo.V.logfunction("RecursiveSearchApiRawFullLinker",e)||{};try{if(rr){i.serviceWorker=!0;try{const e=yield fr("RecursiveSearchApiRawFullLinker",{composition:t,fullLinkers:n,textSearch:o});return mo.V.logUpdate(i),e.data}catch(e){(0,p.ey)(i,"RecursiveSearchApiRawFullLinker",e),Cr(e)}}let e=new qe;e.composition=t,e.fullLinkers=n,e.textSearch=o;let r=JSON.stringify(e),a=(0,h.Xr)();const s=yield fetch(u.B.RecursiveSearchUrl(),{method:"POST",headers:a,body:r});if(s.ok){const e=yield s.json();e.compositionIds,e.internalConnections,e.externalConnections;return mo.V.logUpdate(i),e}return(0,p.ey)(i,"RecursiveSearchApiRawFullLinker",s.status),(0,p.ry)(s),mo.V.logUpdate(i),[]}catch(e){Error,(0,p.Mb)(e,u.B.RecursiveSearchUrl()),(0,p.ey)(i,"RecursiveSearchApiRawFullLinker",e)}})}function Xe(){var e=arguments;return $e(this,arguments,void 0,function*(t=0,n=[],o=""){const i=mo.V.logfunction("RecursiveSearchApiRawFullLinker",e)||{};try{if(rr)try{i.serviceWorker=!0;const e=yield fr("RecursiveSearchApiNewRawFullLinker",{composition:t,fullLinkers:n,textSearch:o});return mo.V.logUpdate(i),e.data}catch(e){(0,p.ey)(i,"RecursiveSearchApiNewRawFullLinker",e),Cr(e)}let e=new qe;e.composition=t,e.fullLinkers=n,e.textSearch=o;let r=JSON.stringify(e),a=(0,h.Xr)();const s=yield fetch(u.B.RecursiveSearchUrl(),{method:"POST",headers:a,body:r});if(s.ok){const e=yield s.json();e.compositionIds,e.internalConnections,e.externalConnections;return mo.V.logUpdate(i),e}return(0,p.ey)(i,"RecursiveSearchApiNewRawFullLinker",s.status),(0,p.ry)(s),mo.V.logUpdate(i),[]}catch(e){Error,(0,p.Mb)(e,u.B.RecursiveSearchUrl()),(0,p.ey)(i,"RecursiveSearchApiNewRawFullLinker",e)}})}var Ke=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};const Ze=["image/jpeg","image/jpg","image/png","image/webp"],et=["application/msword","application/vnd.ms-excel","application/vnd.ms-powerpoint","text/plain","application/pdf"];function tt(e,t){return Ke(this,void 0,void 0,function*(){const n=mo.V.logfunction("uploadAttachment");try{const o=new FormData;let i;if(et.includes(e.type)||e.name.toLowerCase().endsWith(".md"))o.append("file",e,e.name),i=yield it(o,t);else{if(!Ze.includes(e.type))return{message:"Invalid File Format",success:!1};o.append("image",e,e.name),i=yield nt(o,t)}return(null==i?void 0:i.data)?(mo.V.logUpdate(n),{message:"Upload Success",success:!0,url:i.data}):{message:"File Upload Failed",success:!1}}catch(e){throw(0,p.ey)(n,"uploadAttachment",e),e}})}function nt(e){return Ke(this,arguments,void 0,function*(e,t=""){const n=mo.V.logfunction("uploadImage");try{const o=yield fetch(u.B.uploadImageUrl(),{method:"POST",body:e,headers:{Authorization:`Bearer ${t}`}});if(!o.ok){const e=o.headers.get("content-type");e&&e.includes("text/plain");yield null==o?void 0:o.text();return mo.V.logUpdate(n),null}return yield o.json()}catch(e){return(0,p.ey)(n,"uploadImage",e),null}})}function ot(e){return Ke(this,arguments,void 0,function*(e,t=""){const n=mo.V.logfunction("uploadImageV2");try{const o=yield fetch(u.B.uploadImageUrlWithSmall(),{method:"POST",body:e,headers:{Authorization:`Bearer ${t}`}});if(!o.ok){const e=o.headers.get("content-type");e&&e.includes("text/plain");yield null==o?void 0:o.text();return mo.V.logUpdate(n),null}return yield o.json()}catch(e){return(0,p.ey)(n,"uploadImageV2",e),null}})}function it(e){return Ke(this,arguments,void 0,function*(e,t=""){const n=mo.V.logfunction("uploadFile");try{const o=yield fetch(u.B.uploadFileUrl(),{method:"POST",body:e,headers:{Authorization:`Bearer ${t}`}});if(!o.ok){const e=o.headers.get("content-type");e&&e.includes("text/plain");yield o.text();return null}return mo.V.logUpdate(n),yield o.json()}catch(e){return(0,p.ey)(n,"uploadFile",e),null}})}function rt(){return Ke(this,void 0,void 0,function*(){let e=yield(0,h.Xr)(),t={};try{const n=yield fetch(u.B.UploadFileLimitUrl(),{method:"GET",headers:e});n.ok&&(t=n.json())}catch(e){throw e}return t})}var at=n(1239),st=n(7467),ct=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function lt(e,t){var n=arguments;return ct(this,arguments,void 0,function*(e,t,o="boomconsole.com"){const i=mo.V.logfunction("LoginToBackend",n);try{let n={email:e,password:t,application:o},r=new Headers;r.append("Content-Type","application/json");let a=JSON.stringify(n);const s=yield fetch(u.B.LoginUrl(),{method:"POST",headers:r,body:a}),c=yield s.json();if(s.ok)return yield Oe.b.saveUserProfile(c),mo.V.logUpdate(i),c;(0,p.ER)(s,c)}catch(e){Error,(0,p.Mb)(e,u.B.LoginUrl()),(0,p.ey)(i,"LoginToBackend",e)}})}var dt=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function ut(e){return dt(this,void 0,void 0,function*(){const t=yield function(){return dt(this,arguments,void 0,function*(e="",t={}){let n={message:"success",status:!1,statusCode:200,data:"cannot signup"};try{const o=yield fetch(e,{method:"POST",mode:"cors",cache:"no-cache",credentials:"same-origin",headers:{"Content-Type":"application/json"},redirect:"follow",referrerPolicy:"no-referrer",body:JSON.stringify(t)}),i=yield o.json();return o.ok?n={message:"success",status:!0,statusCode:200,data:i}:(0,p.ER)(o,i),n}catch(t){(0,p.Mb)(t,e)}})}(u.B.SignupUrl(),e);return t})}function ht(e){return dt(this,void 0,void 0,function*(){const t=u.B.NODE_URL,n=yield fetch(`${t}/api/v1/entity/signup`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(n.ok)return n.json();{if(404===n.status)throw new Error("404, Not found");if(500===n.status)throw new Error("500, internal server error");let e=yield n.json();throw new Error(e.message)}})}var pt=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function ft(e){return pt(this,void 0,void 0,function*(){const t=JSON.stringify({email:e.email,password:e.password});let n={message:"success",status:!1,statusCode:200,data:""};const o=new Headers;o.append("Content-Type","application/json");const i=u.B.LoginUrl();try{const e=yield fetch(i,{method:"POST",headers:o,body:t,redirect:"follow"}),r=yield e.json();if(e.ok){n={message:"success",status:!0,statusCode:200,data:null==r?void 0:r.data}}else(0,p.ER)(e,r);return n}catch(e){(0,p.Mb)(e,i)}})}var mt=n(9934),yt=n(4485);function vt(e=[],t){Array.isArray(e)&&e.splice(e.findIndex(function(e){return e.id===t.id}),1)}function gt(e=[],t){Array.isArray(e)&&e.splice(e.findIndex(function(e){return e.id===t.id}),1)}class Ct{constructor(e,t,n,o){this.expiryTime=new Date(Date.now()+6e5),this.height=1,this.key=e,this.value=t,this.leftNode=n,this.rightNode=o}isValid(){const e=new Date(Date.now());return!(this.expiryTime<e)||(Tt.removeNodeFromTree(this.key),!1)}saveToCache(e){this.value.cached=e}addNode(e,t,n){if(null==t)return t=e;const o=t.leftNode,i=t.rightNode;if(t.key>e.key)t.leftNode=this.addNode(e,o,n);else{if(!(t.key<e.key))return this.isValid(),t=e;t.rightNode=this.addNode(e,i,n)}t.height=1+Math.max(this.getHeight(t.leftNode),this.getHeight(t.rightNode));const r=this.getBalanceFactor(t);if(r>1&&t.leftNode){if(e.key<t.leftNode.key)return this.rightRotate(t);if(e.key>t.leftNode.key)return t.leftNode=this.leftRotate(t.leftNode),this.rightRotate(t)}if(r<-1&&t.rightNode){if(e.key>t.rightNode.key)return this.leftRotate(t);if(e.key<t.rightNode.key)return t.rightNode=this.rightRotate(t.rightNode),this.leftRotate(t)}return this.isValid(),t}rightRotate(e){if(e){const t=e.leftNode;if(t){const n=t.rightNode;return e.leftNode=n,t.rightNode=e,e.height=Math.max(this.getHeight(e.leftNode),this.getHeight(e.rightNode))+1,t.height=Math.max(this.getHeight(t.leftNode),this.getHeight(t.rightNode))+1,t}}return e}leftRotate(e){if(e){const t=e.rightNode;if(t){const n=t.leftNode;return t.leftNode=e,e.rightNode=n,e.height=Math.max(this.getHeight(e.leftNode),this.getHeight(e.rightNode))+1,t.height=Math.max(this.getHeight(t.leftNode),this.getHeight(e.rightNode))+1,t}}return e}getHeight(e){return e?e.height:0}getBalanceFactor(e){return null==e?0:this.getHeight(e.leftNode)-this.getHeight(e.rightNode)}getFromNode(e,t){return t?e==t.key&&t.isValid()?t:e<t.key?this.getFromNode(e,t.leftNode):e>t.key?this.getFromNode(e,t.rightNode):t:t}removeNode(e,t){if(null==e)return e;if(e.key>t)return e.leftNode=this.removeNode(e.leftNode,t),e;if(e.key<t)return e.rightNode=this.removeNode(e.rightNode,t),e;if(null==e.leftNode){const t=e.rightNode;return e=null,t}if(null==e.rightNode){const t=e.leftNode;return e=null,t}{const t=this.inOrderSuccessor(e.rightNode);return e.value=t.value,e.key=t.key,e.rightNode=this.removeNode(e.rightNode,t.key),e}}countNodeBelow(e){return null==e?0:1+this.countNodeBelow(e.leftNode)+this.countNodeBelow(e.rightNode)}inOrderSuccessor(e){for(;null!=e.leftNode;)e=e.leftNode;return e}}var wt=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class Tt{static addNodeToTree(e){if(null==this.root)return this.root=e,this.root;this.root=this.root.addNode(e,this.root,this.root.height)}static addCompositionToTree(e){const t=new Ct(e.id,e,null,null);this.addNodeToTree(t)}static getNodeFromTree(e){return wt(this,void 0,void 0,function*(){if(this.root){return this.root.getFromNode(e,this.root)}return null})}static removeNodeFromTree(e){return wt(this,void 0,void 0,function*(){this.root&&(this.root=this.root.removeNode(this.root,e))})}static countNumberOfNodes(){return this.root?this.root.countNodeBelow(this.root):0}}Tt.root=null;var It=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function kt(e,t,n,o){return It(this,arguments,void 0,function*(e,t,n,o,i=[]){var r,a;let s={};const c=[];if(0==e)return"";let l=bt(n,e);if((null==l||0==l.id)&&null!=e&&null!=e){l=yield(0,Q.A)(e)}if(0!=l.id&&null==l.type){const e=l.typeId;let t=bt(n,e);if(l.type=t,null==t&&null!=e&&null!=e){t=yield(0,Q.A)(e),l.type=t}}if(!o.includes(e))return null==l?void 0:l.characterValue;if(i.includes(e))return"";i.push(e);for(let l=0;l<t.length;l++)if(t[l].ofTheConceptId==e){const u=t[l].toTheConceptId;if(o.includes(e)){let e=bt(n,u);if((null==e||0==e.id)&&null!=u&&null!=u){e=yield(0,Q.A)(u)}if(0!=e.id&&null==(null==e?void 0:e.type)){const t=e.typeId;let n=yield d.I.GetConcept(t);if(e.type=n,null==n&&null!=t&&null!=t){n=yield(0,Q.A)(t),e.type=n}}const l="the_",h=(null!==(a=null===(r=null==e?void 0:e.type)||void 0===r?void 0:r.characterValue)&&void 0!==a?a:"").replace(l,"");if(isNaN(Number(h))){if(h){const e=yield kt(u,t,n,o,i);s[h]=e}}else{const e=yield kt(u,t,n,o,i);c[h]=e,s=c}}}return s})}function bt(e,t){let n=(0,V.o)();for(let o=0;o<e.length;o++)if(t==e[o].id)return n=e[o],n;return n}var At=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class St{constructor(){this.id=0,this.mainConcept=(0,V.o)(),this.connections=[],this.concepts=[],this.subcompositions=[],this.cached={}}updateCache(){return At(this,void 0,void 0,function*(){if(0==this.mainConcept.id)for(let e=0;e<this.concepts.length;e++)this.concepts[e].id==this.id&&(this.mainConcept=this.concepts[e]);this.cached=yield kt(this.id,this.connections,this.concepts,this.subcompositions,[])})}UpdateAcrossDistributedSystem(){var e,t,n;try{0!=this.id&&(t="compositionUpdate",n=null===(e=this.id)||void 0===e?void 0:e.toString(),u.B.MQTT_CONNECTION&&u.B.MQTT_CONNECTION.publish(t,n))}catch(e){}}isUpdating(){this.UpdateAcrossDistributedSystem()}GetDataCache(){var e,t,n;const o={};o[null!==(n=null===(t=null===(e=this.mainConcept)||void 0===e?void 0:e.type)||void 0===t?void 0:t.characterValue)&&void 0!==n?n:""]=this.cached;const i={};return i.data=o,i.id=this.id,i}}var Lt=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function Nt(e){return Lt(this,arguments,void 0,function*(e,t=null,n=null,o=null,i=null,r=null,a=null,s=null){const c=null!=i?i:999,l=null!=r?r:4,d=null!=a?a:999;let u=null!=o?o:0,h=(0,V.o)();null==s&&(s=new St);for(const o in e)if("object"==typeof e[o]||Array.isArray(e[o])){const p=yield(0,Y.A)(o,"",!0,c,l,d);if(null==t&&null==n){let t=u;h=p,t=p.id,u=p.id,s.concepts.push(p),s.id=p.id,yield Nt(e[o],p.id,p.userId,t,i,r,a,s)}else{const c=null!=t?t:999,l=null!=n?n:999,d=u;h=p,s.concepts.push(p);const f=yield(0,ae.q)(c,l,p.id,d);s.connections.push(f),yield Nt(e[o],p.id,p.userId,d,i,r,a,s)}null!=e[o]&&null!=e[o]&&s.subcompositions.push(p.id)}else{const i=null!=t?t:999,r=null!=n?n:999,a=u,h=yield(0,Y.A)(o,e[o],!1,c,l,d);s.concepts.push(h);const p=yield(0,ae.q)(i,r,h.id,a);s.connections.push(p)}return h})}var _t=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function xt(e){return _t(this,void 0,void 0,function*(){const t=mo.V.logfunction("UpdateComposition")||{};if(rr){t.serviceWorker=!0;try{const n=yield fr("UpdateComposition",{patcherStructure:e});return mo.V.logUpdate(t),n.data}catch(e){(0,p.ey)(t,"UpdateComposition",e),Cr(e)}}const n=e.userId,o=e.sessionId,i=e.accessId;let r=[];const a=[];let s=(0,V.o)(),c=(0,V.o)();const l=[];let d=e.compositionId;const u=e.ofTheCompositionId;let h=[];if(d<0){let e=yield(0,Q.A)(d,n);if(!(e.id>0))return null;d=e.id}r=yield(0,B.s)(d);const f=[],m=new St,y=[];m.id=d,m.isUpdating();let v=[];for(let e=0;e<r.length;e++)(0,mt.A)(y,r[e].ofTheConceptId),(0,mt.A)(f,r[e].ofTheConceptId),(0,mt.A)(f,r[e].toTheConceptId),v.push(r[e].ofTheConceptId);m.subcompositions=y,m.connections=r;for(let e=0;e<f.length;e++){const t=yield(0,Q.A)(f[e]);d==f[e]&&(s=t),u==f[e]&&(c=t),a.push(t)}const g=e.patchObject;for(const e in g){let t=(0,V.o)();const r=g[e];let d=s;if(c.id>0&&(d=c),Array.isArray(r)||"object"==typeof r){t=yield(0,Y.A)(e,"",!0,s.userId,4,999),m.subcompositions.push(t.id);const n=(0,yt.vo)(a,t);for(let e=0;e<n.length;e++)if(n[e].id>0){const t=(0,yt.wS)(m.connections,n[e].id);h=h.concat(t),l.push(n[e])}yield Nt(g[e],t.id,t.userId,s.id,s.userId,4,999,m)}else{t=yield(0,Y.A)(e,r,!1,n,i,o);const s=(0,yt.vo)(a,t);for(let e=0;e<s.length;e++)if(s[e].id>0){const t=(0,yt.wS)(m.connections,s[e].id);h=h.concat(t),l.push(s[e])}}const u=(0,ae.q)(d.id,d.userId,t.id,s.id);a.push(t),m.connections.push(u)}for(let e=0;e<h.length;e++)gt(m.connections,h[e]),(0,J.m)(h[e].id);for(let e=0;e<l.length;e++)vt(a,l[e]);m.concepts=m.concepts.concat(a),m.mainConcept=s,m.id=s.id,yield m.updateCache(),Tt.addCompositionToTree(m),j.Y.SyncDataOnline();let C=m.GetDataCache();return mo.V.logUpdate(t),C})}var Dt=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function Pt(e,t,n,o){return Dt(this,arguments,void 0,function*(e,t,n,o,i=10,r=1){var a=(0,h.ab)("application/x-www-form-urlencoded",o),s=new URLSearchParams;s.append("type",e),s.append("search",t),s.append("composition",n),s.append("inpage",i.toString()),s.append("page",r.toString());const c=u.B.SearchCompositionsUrl()+"?"+s.toString();try{const e=yield fetch(c,{method:"GET",headers:a});if(e.ok){return yield e.json()}return(0,p.ry)(e),[]}catch(e){(0,p.Mb)(e,c)}})}var Et=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function Rt(e){return Et(this,arguments,void 0,function*(e,t=""){var n=(0,h.ab)("application/json",t);const o=u.B.SearchLinkMultipleAll(),i=JSON.stringify(e);try{const e=yield fetch(o,{method:"POST",headers:n,body:i});if(e.ok){return yield e.json()}return(0,p.ry)(e),[]}catch(e){(0,p.Mb)(e,o)}})}var Ot=n(7139),Bt=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function Ft(e){return Bt(this,arguments,void 0,function*(e,t=[]){var n,o;let i=[];const r=[];let a={},s={};const c=yield Tt.getNodeFromTree(e),l=[];let u=yield d.I.GetConcept(e);if(0==u.id&&null!=e&&null!=e){u=yield(0,Ot.r)(e)}if(null==c){let c=[];c=t.length>0?Ut(e,t):yield(0,B.s)(e),i=c;for(let e=0;e<i.length;e++)l.includes(i[e].ofTheConceptId)||(l.push(i[e].ofTheConceptId),r.push(i[e].ofTheConceptId)),r.includes(i[e].toTheConceptId)||r.push(i[e].toTheConceptId);Wt(u,i,r,l);let d=[];s=yield(0,g.zN)(e,i,l,d);a[null!==(o=null===(n=null==u?void 0:u.type)||void 0===n?void 0:n.characterValue)&&void 0!==o?o:""]=s}else s=c.value.GetDataCache(),a=s;return 0==u.id?"":a})}function Ut(e,t){const n=[];for(let o=0;o<t.length;o++)t[o].typeId==e&&n.push(t[o]);return n}function Gt(e){return Bt(this,arguments,void 0,function*(e,t=[]){var n,o;let i={},r=[];const a=[];let s;const c={},l=yield Tt.getNodeFromTree(e),u=[];let h=yield d.I.GetConcept(e);if(0==h.id&&null!=e&&null!=e){h=yield(0,Ot.r)(e)}if(null==l){let l=[];l=t.length>0?Ut(e,t):yield(0,B.s)(e),r=l;for(let e=0;e<r.length;e++)u.includes(r[e].ofTheConceptId)||(u.push(r[e].ofTheConceptId),a.push(r[e].ofTheConceptId)),a.includes(r[e].toTheConceptId)||a.push(r[e].toTheConceptId);Wt(h,r,a,u),s=yield(0,g.zN)(e,r,u);c[null!==(o=null===(n=null==h?void 0:h.type)||void 0===n?void 0:n.characterValue)&&void 0!==o?o:""]=s,i.created_at=h.entryTimeStamp,i.data=c,i.id=e}else s=l.value.GetDataCache(),i=s;return 0==h.id?"":i})}function Mt(e,t){return Bt(this,void 0,void 0,function*(){let n=[];const o=[];n=yield(0,st.j)(t);for(let t=0;t<e.length;t++){const i=yield Gt(e[t],n);i&&o.push(i)}return o})}function Wt(e,t,n,o){return Bt(this,void 0,void 0,function*(){const i=new St,r=yield function(e){return Bt(this,void 0,void 0,function*(){let t=[];const n=[];for(let o=0;o<(null==e?void 0:e.length);o++){const i=yield d.I.GetConcept(e[o]);0==i.id?n.push(e[o]):t.push(i)}return 0==(null==n?void 0:n.length)||(t=yield(0,at.I)(n)),t})}(n);i.connections=t,i.concepts=r,i.id=e.id,i.subcompositions=o,i.mainConcept=e;const a=yield kt(e.id,t,r,o,[]);i.cached=a,Tt.addCompositionToTree(i)})}var jt=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function Vt(e){return jt(this,void 0,void 0,function*(){try{var t=(0,h.Xr)();const n=JSON.stringify(e),o=yield fetch(u.B.CreateSessionId(),{method:"POST",headers:t,body:n});return o.ok?o.json():((0,p.ry)(o),null)}catch(e){(0,p.Mb)(e,u.B.CreateSessionId())}})}var qt=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function Ht(e,t){return qt(this,void 0,void 0,function*(){try{var n=(0,h.Xr)("application/x-www-form-urlencoded");const o=new URLSearchParams;o.append("sessionId",e.toString()),o.append("url",t);const i=yield fetch(u.B.CreateSessionVisitUrl(),{method:"POST",headers:n,body:o});return i.ok?i.json():((0,p.ry)(i),null)}catch(e){(0,p.Mb)(e,u.B.CreateSessionVisitUrl())}})}var $t=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function zt(e,t,n){return $t(this,arguments,void 0,function*(e,t,n,o=10,i=1){let r=[];try{var a=new URLSearchParams;a.append("typeId",`${e}`),a.append("toTheConceptId",`${t}`),a.append("userId",`${n}`),a.append("inpage",`${o}`),a.append("page",`${i}`);var s=(0,h.Xr)("application/x-www-form-urlencoded");const c=yield fetch(u.B.GetAllConnectionsToConceptUrl(),{method:"POST",headers:s,body:a});return c.ok?r=yield c.json():(0,p.ry)(c),r}catch(e){throw Error,e}})}var Jt=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function Qt(e,t){var n=arguments;return Jt(this,arguments,void 0,function*(e,t,o=10,i=1,r=!1){const a=mo.V.logfunction("GetRelation",n)||{};if(rr){a.serviceWorker=!0;try{const n=yield fr("GetRelation",{id:e,relation:t,inpage:o,page:i,reverse:r});return mo.V.logUpdate(a),n.data}catch(e){(0,p.ey)(a,"GetRelation",e),Cr(e)}}let s=[],c=yield(0,Q.A)(e),l=yield(0,he.Az)(t),d=[];if(l.id>0)if(r){d=yield zt(l.id,c.id,c.userId,o,i);let e=[];for(var u=0;u<d.length;u++)e.push(d[u].ofTheConceptId);yield(0,y.Y)(e);for(let e=0;e<d.length;e++){let t=d[e].ofTheConceptId,n=yield(0,Q.A)(t),o=yield(0,g.Ez)(n.id);s.push(o)}}else{d=yield M(l.id,c.id,c.userId,o,i);let e=[];for(let t=0;t<d.length;t++)e.push(d[t].toTheConceptId);yield(0,y.Y)(e);for(let e=0;e<d.length;e++){let t=d[e].toTheConceptId,n=yield(0,Q.A)(t),o=yield(0,g.Ez)(n.id);s.push(o)}}return mo.V.logUpdate(a),s})}function Yt(e,t){return Jt(this,arguments,void 0,function*(e,t,n=10,o=1,i=!1){let r=new Vo;return r.conceptIds=[e],r.selectors=[t],r.outputFormat=_n.y0,r.inpage=n,r.page=o,r.limit=!0,yield Qo(r,"")})}function Xt(e,t){var n=arguments;return Jt(this,arguments,void 0,function*(e,t,o=10,i=1,r=!1){const a=mo.V.logfunction("GetRelationRaw",n)||{};if(rr){a.serviceWorker=!0;try{const n=yield fr("GetRelationRaw",{id:e,relation:t,inpage:o,page:i,reverse:r});return mo.V.logUpdate(a),n.data}catch(e){(0,p.ey)(a,"GetRelationRaw",e),Cr(e)}}let s=[],c=yield(0,Q.A)(e),l=yield(0,he.Az)(t),d=[],u=[];if(l.id>0){if(r){d=yield zt(l.id,c.id,c.userId,o,i);for(var h=0;h<d.length;h++)u.push(d[h].ofTheConceptId)}else{d=yield M(l.id,c.id,c.userId,o,i);for(let e=0;e<d.length;e++)u.push(d[e].toTheConceptId)}s=yield(0,at.r)(u)}return mo.V.logUpdate(a),s})}var Kt=n(6416),Zt=n(4711);class en{constructor(e,t,n,o){this.value=[],this.height=1,this.key=e,this.value.push(t),this.leftNode=n,this.rightNode=o}addNode(e,t,n){if(null==t)return t=e;var o=t.leftNode,i=t.rightNode;if(t.key>e.key)t.leftNode=this.addNode(e,o,n);else{if(!(t.key<e.key))return t.value.push(...e.value),t;t.rightNode=this.addNode(e,i,n)}t.height=1+Math.max(this.getHeight(t.leftNode),this.getHeight(t.rightNode));let r=this.getBalanceFactor(t);if(r>1&&t.leftNode){if(e.key<t.leftNode.key)return this.rightRotate(t);if(e.key>t.leftNode.key)return t.leftNode=this.leftRotate(t.leftNode),this.rightRotate(t)}if(r<-1&&t.rightNode){if(e.key>t.rightNode.key)return this.leftRotate(t);if(e.key<t.rightNode.key)return t.rightNode=this.rightRotate(t.rightNode),this.leftRotate(t)}return t}rightRotate(e){if(e){let t=e.leftNode;if(t){let n=t.rightNode;return e.leftNode=n,t.rightNode=e,e.height=Math.max(this.getHeight(e.leftNode),this.getHeight(e.rightNode))+1,t.height=Math.max(this.getHeight(t.leftNode),this.getHeight(t.rightNode))+1,t}}return e}leftRotate(e){if(e){let t=e.rightNode;if(t){let n=t.leftNode;return t.leftNode=e,e.rightNode=n,e.height=Math.max(this.getHeight(e.leftNode),this.getHeight(e.rightNode))+1,t.height=Math.max(this.getHeight(t.leftNode),this.getHeight(e.rightNode))+1,t}}return e}getHeight(e){return e?e.height:0}getBalanceFactor(e){return null==e?0:this.getHeight(e.leftNode)-this.getHeight(e.rightNode)}getFromNode(e,t){return t?e==t.key?t:e<t.key?this.getFromNode(e,t.leftNode):e>t.key?this.getFromNode(e,t.rightNode):t:t}removeNode(e,t){if(null==e)return e;if(e.key>t)return e.leftNode=this.removeNode(e.leftNode,t),e;if(e.key<t)return e.rightNode=this.removeNode(e.rightNode,t),e;if(null==e.leftNode){let t=e.rightNode;return e=null,t}if(null==e.rightNode){let t=e.leftNode;return e=null,t}var n=this.inOrderSuccessor(e.rightNode);return e.value=n.value,e.key=n.key,e.rightNode=this.removeNode(e.rightNode,n.key),e}countNodeBelow(e){return null==e?0:1+this.countNodeBelow(e.leftNode)+this.countNodeBelow(e.rightNode)}inOrderSuccessor(e){for(;null!=e.leftNode;)e=e.leftNode;return e}}var tn=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class nn{static compositeKey(e,t){return("0000"+e.toString(16).toUpperCase()).slice(-4)+("0000"+t.toString(16).toUpperCase()).slice(-4)}static addNodeToTree(e){if(null==this.root)return this.root=e,this.root;this.root=this.root.addNode(e,this.root,this.root.height)}static waitForDataToLoad(){return tn(this,void 0,void 0,function*(){return new Promise((e,t)=>{this.checkFlag(e),setTimeout(()=>{t("not")},25e3)})})}static checkFlag(e){if(s.B.isDataLoaded)return e("done");setTimeout(nn.checkFlag,1e3,e)}static addConceptToTree(e,t,n=999){let o=this.compositeKey(t,n);var i=new en(o,e,null,null);this.addNodeToTree(i)}static getNodeFromTree(e,t){return tn(this,void 0,void 0,function*(){let n=this.compositeKey(e,t);return this.root?this.root.getFromNode(n,this.root):null})}static removeNodeFromTree(e){return tn(this,arguments,void 0,function*(e,t=999){if(this.root){let n=this.compositeKey(e,t);this.root=this.root.removeNode(this.root,n)}})}static countNumberOfNodes(){return this.root?this.root.countNodeBelow(this.root):0}}nn.root=null;var on=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function rn(e,t){return on(this,arguments,void 0,function*(e,t,n=999){let o=yield nn.getNodeFromTree(e,n),i=(0,Kt.u)();if(o)for(let e=0;e<o.value.length;e++){let n=o.value[e];n.ghostId==t&&(i=n)}return i})}function an(e,t){return on(this,arguments,void 0,function*(e,t,n=999){nn.addConceptToTree(e,t,n)})}var sn=n(5312),cn=n(1213),ln=n(3729),dn=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};var un=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function hn(e,t,n){return un(this,void 0,void 0,function*(){try{if(rr)try{return(yield fr("GetRelationLocal",{id:e,relation:t,userId:n})).data}catch(e){Cr(e)}let o=yield(0,w.$I)(t),i=[];0!=o.id&&(i=yield function(e,t){return dn(this,void 0,void 0,function*(){try{return yield L.G.GetConnectionOfCompositionAndTypeLocal(t,e)}catch(e){throw e}})}(e,o.id));let r=[];for(let e=0;e<i.length;e++){let t=yield x(i[e].toTheConceptId);r.push(t)}return r}catch(e){throw e}})}var pn=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function fn(e){return pn(this,void 0,void 0,function*(){let t=[];try{var n=(0,h.Xr)();const o=yield fetch(u.B.ViewInternalDataUrl(),{method:"POST",headers:n,body:JSON.stringify(e)});if(o.ok){let e=yield o.json(),n={};for(let o=0;o<e.length;o++){let i=e[o].concepts;t=e[o].connections;let r=e[o].id;(0,at.r)(i),n[r]=t}return n}return(0,p.ry)(o),t}catch(e){throw Error,e}})}var mn=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function yn(e){return mn(this,void 0,void 0,function*(){var t;try{let n=yield fn(e),o=[];for(let i=0;i<e.length;i++){let r=e[i],a=n[r];if(r&&a){let e=[],t={};for(let t=0;t<a.length;t++)e.includes(a[t].ofTheConceptId)||e.push(a[t].ofTheConceptId);let n=yield(0,g.zN)(r,a,e);t.data=n,t.id=r,o.push(t)}else{let e={};e.id=r;let n=yield(0,Q.A)(r),i={};n.type&&(i[null===(t=null==n?void 0:n.type)||void 0===t?void 0:t.characterValue]=n.characterValue,e.data=i,o.push(e))}}return o}catch(e){throw e}})}var vn=n(176),gn=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};var Cn=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function wn(e){return Cn(this,arguments,void 0,function*(e,t=""){try{let n=yield function(e){return gn(this,arguments,void 0,function*(e,t=""){var n=(0,h.ab)("application/json",t);let o=u.B.SearchInternalWithAuthenticatedCcsUrl();o=o+"?composition="+e.composition+"&search="+e.search+"&internalComposition="+e.internalComposition+"&type="+e.type+"&inpage="+e.inpage+"&page="+e.page;try{const e=yield fetch(o,{method:"GET",headers:n});return e.ok?yield e.json():((0,p.ry)(e),[])}catch(e){(0,p.Mb)(e,o)}})}(e,t);return yield yn(n)}catch(e){throw e}})}function Tn(e){return Cn(this,arguments,void 0,function*(e,t=""){try{return yield function(e){return gn(this,void 0,void 0,function*(){var t=(0,h.ab)("application/json","");let n=u.B.SearchInternalWithCcsUrl();n=n+"?composition="+e.composition+"&search="+e.search+"&internalComposition="+e.internalComposition+"&type="+e.type+"&inpage="+e.inpage+"&page="+e.page;try{const e=yield fetch(n,{method:"GET",headers:t});return e.ok?yield e.json():((0,p.ry)(e),[])}catch(e){(0,p.Mb)(e,n)}})}(e)}catch(e){throw e}})}var In=n(8095),kn=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function bn(e){return kn(this,void 0,void 0,function*(){if(rr)try{return(yield fr("DeleteConceptLocal",{id:e})).data}catch(e){Cr(e)}let t=yield(0,cn.f)(e);v.v.RemoveConcept(t)})}var An=n(2803),Sn=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function Ln(e,t,n,o){return Sn(this,arguments,void 0,function*(e,t,n,o,i=!0){var r,a;const s=mo.V.logfunction("GetConnectionBetweenTwoConceptsLinker")||{};if(rr){s.serviceWorker=!0;try{const r=yield fr("GetConnectionBetweenTwoConceptsLinker",{ofTheConcept:e,toTheConcept:t,linker:n,fullLinker:o,forward:i});return mo.V.logUpdate(s),r.data}catch(e){(0,p.ey)(s,"GetConnectionBetweenTwoConceptsLinker",e),Cr(e)}}let c=(0,V.o)();if(""!=n){let o="";if(i){o=(null===(r=e.type)||void 0===r?void 0:r.characterValue)+"_s"+"_"+(n+"_s")}else{o=(null===(a=t.type)||void 0===a?void 0:a.characterValue)+"_s"+"_"+(n+"_by")}c=yield(0,Y.A)("connection",o,!1,999)}""!=o&&(c=yield me(o,999));let l=[];return l=i?yield(0,An.x)(e.id,t.id,c.id):yield(0,An.x)(t.id,e.id,c.id),mo.V.logUpdate(s),l})}function Nn(e,t){return new Promise((n,o)=>{setTimeout(()=>{n(t)},e)})}var _n=n(3130);const xn=3,Dn=4,Pn=5;var En=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function Rn(e,t){return En(this,arguments,void 0,function*(e,t,n=""){let o=u.B.SearchAllTypeWithLinker(e.auth);var i=(0,h.ab)("application/json",n);o=o+"?search="+e.search+"&type="+e.type+"&inpage="+e.inpage+"&page="+e.page;const r=JSON.stringify(t);try{const e=yield fetch(o,{method:"POST",headers:i,body:r});if(e.ok){return yield e.json()}return(0,p.ry)(e),[]}catch(e){(0,p.Mb)(e,o)}})}var On=n(4287),Bn=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class Fn extends On.w{constructor(e,t,n=_n.y0){super(),this.searchQuery=[],this.format=_n.y0,this.searchQuery=e,this.format=n}bind(){return Bn(this,void 0,void 0,function*(){return this.data=yield(0,sn.cf)(this.searchQuery,"",this,this.format),this.mainConcept=this.searchQuery[0].composition,this.listenToEvent(this.mainConcept),this.data})}}function Un(e,t,n=_n.y0){return new Fn(e,null!=t?t:"",n)}var Gn=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class Mn extends On.w{constructor(e,t=_n.ZJ){super(),this.id=e,this.format=t}bind(){return Gn(this,void 0,void 0,function*(){if(!this.isDataLoaded){let e=yield(0,g.hL)(this.id);this.mainConcept=this.id,this.compositionIds=e.compositionList;let t=e.connectionList;for(let e=0;e<t.length;e++)this.internalConnections.push(t[e].id);this.isDataLoaded=!0,this.listenToEvent(this.mainConcept)}return yield this.build()})}build(){return Gn(this,void 0,void 0,function*(){let e=[],t=this.internalConnections;for(let n=0;n<t.length;n++)e.push(yield Ee.d.GetConnection(t[n]));return this.format==_n.ZJ?this.data=yield(0,g.ay)(this.mainConcept,e,this.compositionIds):this.format==_n.y0?this.data=yield(0,g.$V)(this.mainConcept,e,this.compositionIds):this.format==_n.yv?this.data=yield(0,g.re)(this.mainConcept,e,this.compositionIds):this.data=yield(0,g.ay)(this.mainConcept,e,this.compositionIds),this.data})}}function Wn(e,t=_n.ZJ){return new Mn(e,t)}var jn=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class Vn extends On.w{constructor(e,t,n,o,i){super(),this.data=[],this.startPage=0,this.compositionName=e,this.userId=t,this.inpage=n,this.page=o,this.format=i}bind(){return jn(this,void 0,void 0,function*(){if(!this.isDataLoaded){var e=yield(0,C.A)(this.compositionName);if(e){yield m(this.compositionName,this.userId);let o=yield d.I.GetConceptsByTypeIdAndUser(e.id,this.userId);for(var t=this.inpage*(this.page-1),n=t;n<t+this.inpage;n++)o[n]&&this.compositionIds.push(o[n].id)}yield(0,y.Y)(this.compositionIds),this.isDataLoaded=!0,this.listenToEventType(e.id);for(let e=0;e<this.compositionIds.length;e++)this.listenToEvent(this.compositionIds[e])}return yield this.build()})}build(){return jn(this,void 0,void 0,function*(){if(this.data=[],this.format==_n.ZJ){for(let e=this.startPage;e<this.startPage+this.inpage;e++)if(this.compositionIds[e]){let t=yield(0,g.kx)(this.compositionIds[e]);this.data.push(t)}}else if(this.format==_n.y0){for(let e=this.startPage;e<this.startPage+this.inpage;e++)if(this.compositionIds[e]){let t=yield(0,g.RW)(this.compositionIds[e]);this.data.push(t)}}else if(this.format==_n.yv){for(let e=this.startPage;e<this.startPage+this.inpage;e++)if(this.compositionIds[e]){let t=yield(0,g.XI)(this.compositionIds[e]);this.data.push(t)}}else for(let e=this.startPage;e<this.startPage+this.inpage;e++)if(this.compositionIds[e]){let t=yield(0,g.kx)(this.compositionIds[e]);this.data.push(t)}return this.data})}}function qn(e,t,n,o,i=_n.ZJ){return new Vn(e,t,n,o,i)}var Hn=n(1320),$n=n(5328),zn=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class Jn extends On.w{constructor(e,t,n="",o){super(),this.searchText="",this.connections=[],this.externalConnectionIds=[],this.data=[],this.mainConcept=e,this.searchLinkers=t,this.textSearch=n,o&&(this.format=o)}listenToEvent(e){if(this.eventHandlers[e])return;const t=t=>zn(this,void 0,void 0,function*(){if(!this.isUpdating){this.isUpdating=!0;let t=this;setTimeout(function(){return zn(this,void 0,void 0,function*(){try{let n=yield Ee.d.GetConnectionByOfTheConceptAndType(e,e);for(let e=0;e<n.length;e++)yield Ee.d.GetConnection(n[e]).then(e=>{e.typeId==t.mainConcept?t.internalConnections.includes(e.id)||t.internalConnections.push(e.id):t.linkers.includes(e.id)||t.linkers.push(e.id),t.conceptIds.includes(e.toTheConceptId)||t.conceptIds.push(e.toTheConceptId),t.compositionIds.includes(e.ofTheConceptId)||t.compositionIds.push(e.ofTheConceptId),t.compositionIds.includes(e.toTheConceptId)||t.compositionIds.push(e.toTheConceptId)});t.isUpdating=!1,yield t.bind(),t.notify()}catch(e){throw t.isUpdating=!1,e}})},200)}});this.eventHandlers[e]=t,window.addEventListener(`${e}`,t)}bind(){return zn(this,void 0,void 0,function*(){if(!this.isDataLoaded){this.isDataLoaded=!0;const e=yield Qe(this.mainConcept,this.searchLinkers,this.textSearch);this.compositionIds=e.compositionIds||[],this.internalConnections=e.internalConnections||[],this.externalConnectionIds=e.externalConnections||[],this.linkers=this.externalConnectionIds,this.connections=yield(0,st.j)(this.externalConnectionIds);for(let e=0;e<this.compositionIds.length;e++)this.listenToEvent(this.compositionIds[e]);this.listenToEvent(this.mainConcept)}return yield this.build()})}build(){return zn(this,void 0,void 0,function*(){return this.externalConnectionIds=this.linkers,this.format&&this.format==_n.XZ?this.data={compositionIds:this.compositionIds,internalConnections:this.internalConnections,externalConnections:this.externalConnectionIds}:this.data=yield(0,He.p8)(this.compositionIds,this.internalConnections),this.data})}}function Qn(e,t,n="",o){return new Jn(e,t,n,o)}var Yn=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class Xn extends On.w{constructor(e,t,n,o=_n.y0){super(),this.searchQuery=[],this.format=_n.y0,this.mainCompositionIds=[],this.searchCharacter="",this.token="",this.searchStructure=e,this.searchQuery=t,this.searchQuery[0].type=e.composition,this.searchCharacter=e.composition,this.format=o,this.token=Oe.b.BearerAccessToken}listenToEventType(e){if(this.eventHandlers[e])return;const t=e=>Yn(this,void 0,void 0,function*(){if(!this.isUpdating){this.isUpdating=!0;let t=this;setTimeout(function(){return Yn(this,void 0,void 0,function*(){try{let n=e;t.mainCompositionIds.includes(null==n?void 0:n.detail)||(t.mainCompositionIds.unshift(null==n?void 0:n.detail),t.conceptIds.push(null==n?void 0:n.detail),t.listenToEvent(null==n?void 0:n.detail),Ee.d.GetConnectionsOfConcept(null==n?void 0:n.detail).then(e=>{for(let n=0;n<e.length;n++)t.linkers.push(e[n].id)})),t.isUpdating=!1,yield t.bind(),t.notify()}catch(e){throw t.isUpdating=!1,e}})},200)}});this.eventHandlers[e]=t,window.addEventListener(`${e}`,t)}bind(){return Yn(this,void 0,void 0,function*(){if(!this.isDataLoaded){this.isDataLoaded=!0;var e=yield(0,C.A)(this.searchCharacter);let t=yield Rn(this.searchStructure,this.searchQuery,this.token);this.conceptIds=t.compositionIds,this.internalConnections=t.internalConnections,this.linkers=t.linkers,this.reverse=t.reverse,this.mainCompositionIds=t.mainCompositionIds,this.listenToEventType(e.id);for(let e=0;e<this.mainCompositionIds.length;e++)this.listenToEvent(this.mainCompositionIds[e])}return yield this.build()})}build(){return Yn(this,void 0,void 0,function*(){return yield(0,at.r)(this.conceptIds),this.format==_n.y0?this.data=yield(0,Hn.yV)(this.linkers,this.conceptIds,this.internalConnections,this.mainCompositionIds,this.reverse):this.data=yield(0,Hn._W)(this.linkers,this.conceptIds,this.internalConnections,this.mainCompositionIds,this.reverse),this.data})}}function Kn(e,t,n,o=_n.y0){return new Xn(e,t,n,o)}var Zn=n(4698),eo=n(6915),to=n(2615);class no{constructor(e,t,n,o,i,r,a,s=!1,c,l,d){this.structureType="lconcept",this.isComposition=!1,this.isTemp=!1,this.isSynced=!1,this.applicationId=u.B.getRandomizer(),this.id=e,this.userId=t,this.typeId=n,this.ghostId=e,this.categoryId=o,this.characterValue=r,this.accessId=i,this.type=null,this.isNew=s,this.typeCharacter=a,this.entryTimeStamp=c,this.updatedTimeStamp=l,this.isSynced=!1,this.referentId=d}getType(){}}class oo{constructor(e,t,n,o,i,r){this.isTemp=!1,this.applicationId=u.B.getRandomizer(),this.type=(0,V.o)(),this.id=e,this.ofTheConceptId=t,this.toTheConceptId=n,this.typeId=o,this.ghostId=e,this.orderId=i,this.typeCharacter="",this.accessId=r,this.typeCharacter="",this.entryTimeStamp=(0,V.Y)(new Date),this.terminationDateTime=new Date,this.localSyncTime=new Date}}class io{constructor(){this.compositionId=0,this.userId=999,this.sessionId=999,this.accessId=4,this.ofTheCompositionId=0,this.patchObject={}}}class ro{constructor(){this.id="0",this.remote_address="",this.server_port="",this.server_address="",this.server_name="",this.server_software="",this.http_user_agent="",this.self="",this.port="",this.userId="",this.email=""}}var ao=n(628);class so{constructor(){this.type="",this.search="",this.logicoperator="=",this.index=0,this.composition=!0,this.name="",this.operateon=""}}class co{constructor(){this.type="",this.search="",this.composition="",this.internalComposition="",this.userId=999,this.inpage=10,this.page=1,this.auth=!0}}var lo=n(7887),uo=n(3075),ho=n(7869),po=n(2170),fo=n(9635),mo=n(9700),yo=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class vo{static initialize(){try{this.initGlobalErrorHandlers(),this.logCatchError(),this.logErrorEvent(),this.logUnhandledError(),this.logUserInteractions(),this.logNetworkRequests(),this.logRouteChanges()}catch(e){}}static initGlobalErrorHandlers(){try{if(void 0===typeof window)return;window.onerror=(e,t,n,o,i)=>{const r=Oe.b.sessionId||"unknown",a={message:e,source:t,lineno:n,colno:o,stack:(null==i?void 0:i.stack)||"undefined",requestFrom:u.B.BASE_APPLICATION,sessionId:r};mo.V.logApplication("ERROR","Runtime Error",a),mo.V.log("ERROR","Runtime Error",a)},window.onunhandledrejection=e=>{const t=Oe.b.sessionId||"unknown";mo.V.logApplication("ERROR","Unhandled Promise Rejection",{message:e.reason?e.reason.message:e.reason,stack:e.reason?e.reason.stack:null,requestFrom:u.B.BASE_APPLICATION,sessionId:t}),mo.V.log("ERROR","Unhandled Promise Rejection",{message:e.reason?e.reason.message:e.reason,stack:e.reason?e.reason.stack:null,requestFrom:u.B.BASE_APPLICATION,sessionId:t})}}catch(e){}}static logCatchError(){try{const e=console.error;console.error=function(...t){if("Intercepted Fetch Error:"==(null==t?void 0:t[0]))return;const n="Console Error",o=Oe.b.sessionId||"unknown",i={arguments:t.map(e=>go(e)),requestFrom:u.B.BASE_APPLICATION,sessionId:o};mo.V.logApplication("ERROR",n,i),mo.V.log("ERROR",n,i),e.apply(console,t)}}catch(e){}}static logErrorEvent(){try{window.addEventListener("error",e=>{var t;const n=Oe.b.sessionId||"unknown",o={error:(null===(t=e.error)||void 0===t?void 0:t.message)||e.message,source:e.filename,line:e.lineno,column:e.colno,stack:e.error?go(e.error.stack):void 0,requestFrom:u.B.BASE_APPLICATION,sessionId:n},i="Unhandled Error";mo.V.logApplication("ERROR",i,o),mo.V.log("ERROR",i,o)})}catch(e){}}static logUnhandledError(){try{window.addEventListener("unhandledrejection",e=>{var t,n;const o=Oe.b.sessionId||"unknown",i={reason:(null===(t=e.reason)||void 0===t?void 0:t.message)||String(e.reason),stack:(null===(n=e.reason)||void 0===n?void 0:n.stack)||"No stack trace available",requestFrom:u.B.BASE_APPLICATION,sessionId:o};mo.V.logApplication("ERROR","Unhandled Promise Rejection",i),mo.V.log("ERROR","Unhandled Promise Rejection",i)})}catch(e){}}static logUserInteractions(){document.addEventListener("click",e=>{var t;const n=Oe.b.sessionId||"unknown",o=e.target,i={element:o.tagName,id:o.id,classes:o.className,text:null===(t=o.innerText)||void 0===t?void 0:t.slice(0,50),requestFrom:u.B.BASE_APPLICATION,sessionId:n};mo.V.logApplication("INFO","User Click",i)}),document.addEventListener("input",e=>{const t=e.target;Oe.b.sessionId,t.tagName,t.id,t.value,u.B.BASE_APPLICATION}),document.addEventListener("scroll",()=>{Oe.b.sessionId,window.scrollY,u.B.BASE_APPLICATION})}static logNetworkRequests(){try{if(void 0===typeof window)return;Oe.b.sessionId;const e=null===window||void 0===window?void 0:window.fetch;if(!e)throw new Error("Original fetch is not available.");const t=[u.B.PostLogger(),u.B.PostPrefetchConceptConnections()];window.fetch=(...n)=>yo(this,void 0,void 0,function*(){const o=Oe.b.sessionId||"unknown",[i,r]=n,a=i instanceof Request?i.url:i instanceof URL?i.toString():i;if(t.includes(a)){return e(...n)}let s={request:{type:"REQUEST",message:"Network Request",method:(null==r?void 0:r.method)||"GET",url:a,body:null==r?void 0:r.body,requestFrom:u.B.BASE_APPLICATION,sessionId:o}};try{const t=yield e(...n);return s.response={type:"RESPONSE",message:"Network Response",url:a,status:t.status,requestFrom:u.B.BASE_APPLICATION,sessionId:o},t}catch(e){throw s.response={type:"ERROR",message:"Network Request Failed",url:a,error:e instanceof Error?e.message:String(e),requestFrom:u.B.BASE_APPLICATION,sessionId:o},mo.V.logApplication("ERROR","Failed Network Request",s),new Error(`Network request failed for ${a}: ${e.message}`)}})}catch(e){}}static logPerformanceMetrics(){void 0!==typeof window&&(null===window||void 0===window||window.addEventListener("load",()=>{const e=performance.timing;Oe.b.sessionId,e.loadEventEnd,e.navigationStart,e.domContentLoadedEventEnd,e.navigationStart,u.B.BASE_APPLICATION}))}static logRouteChanges(){const e=history.pushState;setTimeout(()=>{vo.logOnWindowLoad()},3e3),history.pushState=function(...t){const n=Oe.b.sessionId||"unknown",o={url:t[2]?new URL(t[2],location.origin).href:location.href,requestFrom:u.B.BASE_APPLICATION,sessionId:n};return mo.V.logApplication("ROUTE","Route Change",o),e.apply(this,t)},null===window||void 0===window||window.addEventListener("beforeunload",()=>{const e=Oe.b.sessionId||"unknown",t={url:location.href,requestFrom:u.B.BASE_APPLICATION,sessionId:e};mo.V.logApplication("ROUTE","Unload",t)}),null===window||void 0===window||window.addEventListener("popstate",()=>{const e=Oe.b.sessionId||"unknown",t={url:location.href,requestFrom:u.B.BASE_APPLICATION,sessionId:e};mo.V.logApplication("ROUTE","Route Changed (Back/Forward)",t)})}static logOnWindowLoad(){const e=Oe.b.sessionId||"unknown",t={url:location.href,requestFrom:u.B.BASE_APPLICATION,sessionId:e};mo.V.logApplication("ROUTE","Initial Load",t)}static logSample(){const e=Oe.b.sessionId||"unknown",t={url:location.href,requestFrom:u.B.BASE_APPLICATION,sessionId:e};mo.V.logApplication("ROUTE","Sample",t)}static logWebSocketEvents(){if(void 0===typeof window)return;const e=Oe.b.sessionId||"unknown",t=WebSocket;window.WebSocket=class extends t{constructor(t,n){super(t,n);const o={url:t.toString(),requestFrom:u.B.BASE_APPLICATION,sessionId:e};mo.V.logApplication("INFO","WebSocket Open",o),this.addEventListener("message",e=>{const n=Oe.b.sessionId||"unknown",o={url:t,data:e.data,requestFrom:u.B.BASE_APPLICATION,sessionId:n};mo.V.logApplication("INFO","WebSocket Message",o)}),this.addEventListener("error",e=>{const n=Oe.b.sessionId||"unknown",o={url:t,error:e instanceof Error?e.message:String(e),requestFrom:u.B.BASE_APPLICATION,sessionId:n};mo.V.logApplication("ERROR","WebSocket Error",o)}),this.addEventListener("close",()=>{const e=Oe.b.sessionId||"unknown",n={url:t,requestFrom:u.B.BASE_APPLICATION,sessionId:e};mo.V.logApplication("INFO","WebSocket Closed",n)})}}}}function go(e){try{return JSON.stringify(e,(e,t)=>t&&"object"==typeof t&&t instanceof Error?{message:t.message,stack:t.stack}:t)}catch(e){return"Error while serializing value"}}var Co=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};const wo=(e,t,...n)=>Co(void 0,[e,t,...n],void 0,function*(e,t,n=!1){try{let o=u.B.sendMail();n&&(o=u.B.sendBulkMail());const i=yield fetch(o,{method:"POST",body:e instanceof FormData?e:JSON.stringify(e),headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}}),r=i.headers.get("content-type");if(!i.ok){yield i.json();return null}const a=yield i.json();return r&&r.includes("text/plain")?yield i.text():a}catch(e){return null}});class To{constructor(){this.inDevelopment=!1,this.subscribers=[]}notify(e=null){this.subscribers.map(t=>{t(e||this.data)})}dataChange(e){this.subscribers.push(e)}}class Io extends To{constructor(){super(...arguments),this.element=null,this.elementIdentifier=0,this.widgetMounted=!1}getComponent(){return this.element}getElementById(e){let t=this.getComponent(),n=document.body;if(t){let o=t.querySelector("#"+e);if(o)return n=o,n}return null}createWidgetWrapperIdentifier(){return this.elementIdentifier=1e4*Math.random(),this.elementIdentifier.toString()}}var ko=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class bo extends Io{constructor(){super(...arguments),this.html="",this.css="",this.js="",this.state={},this.previousState={},this.childWidgets=[],this.childWidgetElement=[],this.widgetState={},this.parentElement=""}querySelector(e){return this.element?this.element.querySelector(e):null}querySelectorAll(e){return this.element?this.element.querySelectorAll(e):null}getElement(){return this.element}setTitle(e){document.title=e}getHtml(){return this.html}UpdateChildData(e,t){let n=t;n.data=e,n.render(),n.update()}update(){}setState(e){this.previousState=Object.assign({},this),this.data=e,this.state=Object.assign({},this),this.hasStateChanged()&&(this.notify(),this.render())}setStateProperty(e){this.previousState=Object.assign({},this),Object.assign(this,e),this.state=Object.assign({},this),this.hasStateChanged()&&(this.notify(),this.render())}hasStateChanged(){return!this.isPropertyEqual(this.state,this.previousState)}isPropertyEqual(e,t){if(e===t)return!0;if("object"!=typeof e||"object"!=typeof t||null===e||null===t)return!1;const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(let i of n){if(!o.includes(i))return!1;for(let n of o)if(i==n&&"state"!=i&&"previousState"!=i){if(e[i]!=t[i])return!1}}return!0}loadChildWidgets(){this.childWidgets.map(e=>{let t=this.getElementById(e.parentElement);t&&(t.innerHTML=""),e.mount(t)})}render(){this.element&&(this.element.innerHTML=this.getHtml()),this.loadChildWidgets(),this.after_render()}getElementByClassName(e){let t=this.getComponent();if(t){return null==t?void 0:t.querySelectorAll("."+e)}return[]}mount_child(){}mount(e){return ko(this,void 0,void 0,function*(){e&&(this.element=document.createElement("div"),this.element.id=this.createWidgetWrapperIdentifier(),this.element.innerHTML=this.getHtml(),this.element.classList.add("mftsccs-marking-rendered"),e.appendChild(this.element),this.parentElement=e.id,this.before_render(),this.mount_child(),this.widgetMounted=!0)})}before_render(){this.render()}after_render(){}renderChildWidgets(){function e(t){var n;t&&(null===(n=t.childWidgets)||void 0===n||n.forEach(t=>{e(t)}),t.render())}this.childWidgets.forEach(t=>{e(t)})}setWidgetState(e,t){this.widgetState[e]=t,function e(t){t&&Array.isArray(t.childWidgets)&&t.childWidgets.forEach(n=>{n.widgetState=Object.assign(Object.assign({},n.widgetState),t.widgetState),e(n)})}(this),this.renderChildWidgets()}getWidgetState(e,t){return Object.keys.length&&this.widgetState[e]?this.widgetState[e]:t}}var Ao=n(490),So=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class Lo extends bo{constructor(){super(...arguments),this.childComponents=[],this.componentMounted=!1,this.oldHtml=null,this.phonebooks=[],this.childrenData={},this.childWidgets=[],this.typeValueList=[],this.widgetType="the_element_name",this.parentConceptList=[],this.customFunctions=[],this.widgetDependenciesData=""}getUserId(){return(0,Ao.s)().userId}getTypeValueList(){return So(this,arguments,void 0,function*(e=""){return new Promise(t=>So(this,void 0,void 0,function*(){const n=null==(e=this.widgetType)?void 0:e.match(/^[a-z0-9]+_[a-z0-9]+/i),o=n?n[0]:"",i=null==e?void 0:e.match(/^([a-z0-9]+).*_([a-z0-9]+)$/i),r=i?`${i[1]}_${i[2]}`:"";let a=[],s=new so;s.type=r,s.search="1",s.logicoperator=">",s.name="emailfilter",s.operateon="entityEmail",s.composition=!1,a.push(s);let c=new Vo;c.typeConnection=e,c.name="entityEmail";let l=new Vo;l.type=o,l.filterLogic="( emailfilter )",l.filters=a,l.name="top",l.inpage=100,l.freeschemaQueries=[c],l.outputFormat=_n.y0,Jo(l,"").subscribe(n=>{if(null==n?void 0:n.length){const i=null==n?void 0:n.map(t=>{var n,i,a,s,c,l,d;const u=null===(s=null===(a=null===(i=null===(n=t.data)||void 0===n?void 0:n[o])||void 0===i?void 0:i[e])||void 0===a?void 0:a.data)||void 0===s?void 0:s[r];return{id:null===(d=null===(l=null===(c=t.data)||void 0===c?void 0:c[o])||void 0===l?void 0:l[e])||void 0===d?void 0:d.id,name:u,text:u}});return this.typeValueList=i,t(i),i}})}))})}setTitle(e){document.title=e}getHtml(){return this.html}createRandomNumber(){return this.elementIdentifier=1e4*Math.random(),this.elementIdentifier}mount_child(){return So(this,void 0,void 0,function*(){try{new Function("tsccs",`\n return (async function() {\n ${this.mountChildWidgetsFunction}\n }).call(this);\n `).bind(this)(o)}catch(e){throw e}})}setProperty(e){return So(this,void 0,void 0,function*(){return this.widgetType=e,this.getTypeValueList(this.widgetType).then(()=>{var e,t,n;null===(e=this.element)||void 0===e||e.setAttribute("data-type-value",this.widgetType),null===(n=null===(t=this.element)||void 0===t?void 0:t.parentElement)||void 0===n||n.setAttribute("data-type-value",this.widgetType),this.render()}),this})}createTypeEditor(e){!function(e,t){if(e){const n=document.querySelector("#widget-properties #widget-type"),o=null==n?void 0:n.querySelectorAll("input");null==o||o.forEach(e=>{null==e||e.remove()});const i=e.target.closest(".added-widget-container"),r=e.target.closest("div");let a="";i?a=null==i?void 0:i.getAttribute("data-type-value"):r&&(a=null==r?void 0:r.getAttribute("data-type-value"));const s=document.createElement("input");s.setAttribute("type","text"),s.setAttribute("name","input-widgetTypeValue"),s.setAttribute("of",t.elementIdentifier.toString()),s.setAttribute("class","form-control"),s.setAttribute("id","widgetType"),s.setAttribute("onchange","updateWidgetTypeValue(event)"),t.widgetType?s.value=t.widgetType:s.setAttribute("placeholder","e.g. the_entity");let c=t;s.addEventListener("change",function(e){var t,n,o;const i=null===(t=null==e?void 0:e.target)||void 0===t?void 0:t.value;c.widgetType=i,c.before_render(),c.loadChildWidgets(),null===(o=null===(n=c.element)||void 0===n?void 0:n.parentElement)||void 0===o||o.setAttribute("data-type-value",c.widgetType)}),null==n||n.appendChild(s)}}(e,this)}mount(e){return So(this,void 0,void 0,function*(){if(e){this.element=document.createElement("div"),this.element.id=this.createWidgetWrapperIdentifier();let t=this;this.inDevelopment?(this.element.onclick=function(e){e.preventDefault(),t.createTypeEditor(e)},this.element.className="mftsccs-marking-element"):this.element.classList.add("mftsccs-marking-rendered"),this.element.innerHTML=this.getHtml(),null==e||e.setAttribute("data-type-value",t.widgetType),e.appendChild(this.element),this.parentElement=e.id,0==this.componentMounted||0==this.widgetMounted?(this.render_custom_functions(),this.render_widgetDependencies(),this.before_render(),this.mount_child(),this.widgetMounted=!0,this.componentMounted=!0):this.render(),this.childWidgetElement=this.getElementByClassName("added-widget-container")}})}render_widgetDependencies(){try{new Function("tsccs",`\n return (async function() {\n ${this.widgetDependenciesData}\n }).call(this);\n `).bind(this)(o)}catch(e){throw e}}render_custom_functions(){var e;const t=null===(e=this.customFunctions)||void 0===e?void 0:e.map(e=>null==e?void 0:e.code).join("");try{new Function("tsccs",`\n return (async function() {\n ${t}\n }).call(this);\n `).bind(this)(o)}catch(e){throw e}}before_render(){try{new Function("tsccs",`\n return (async function() {\n ${this.componentDidMountFunction}\n }).call(this);\n `).bind(this)(o)}catch(e){throw e}}after_render(){try{new Function("tsccs",`\n return (async function() {\n ${this.addEventFunction}\n }).call(this);\n `).bind(this)(o)}catch(e){throw e}}CreateConnectionBetweenEntityLocal(e,t,n){return So(this,void 0,void 0,function*(){var o;const i=e.userId,r=(null===(o=e.type)||void 0===o?void 0:o.characterValue)+"_"+n,a=yield(0,ue.$)(r,999,999,i);return yield(0,Zt.F)(e.id,t.id,a.id,1e3),"connection created"})}}var No=n(3077),_o=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function xo(e){var t=arguments;return _o(this,void 0,void 0,function*(){const n=mo.V.logfunction("GetConnectionsBetweenApi",t);let o=[];try{const t=(0,h.Xr)(),i=yield fetch(u.B.GetConnectionsBetweenUrl(),{method:"POST",headers:t,body:JSON.stringify(e)});if(!i.ok)throw(0,p.ry)(i),new Error(`GetConnectionsBetweenApi error: ${i.status}`);return o=yield i.json(),mo.V.logUpdate(n),o}catch(e){return Error,(0,p.Mb)(e,u.B.GetConnectionsBetweenUrl()),(0,p.ey)(n,"GetConnectionsBetweenApi",e),o}})}function Do(e){var t,n,o,i,r,a,s;return{ofTheConceptId:null!==(t=e.ofTheConceptId)&&void 0!==t?t:0,toTheConceptId:null!==(n=e.toTheConceptId)&&void 0!==n?n:0,typeId:null!==(o=e.typeId)&&void 0!==o?o:0,type:null!==(i=e.type)&&void 0!==i?i:"",oldType:null!==(r=e.oldType)&&void 0!==r?r:"",reverse:null!==(a=e.reverse)&&void 0!==a&&a,isComposition:null!==(s=e.isComposition)&&void 0!==s&&s,connectionIds:[]}}var Po=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class Eo{constructor(){this.actions={concepts:[],connections:[]},this.success=!0,this.pendingConnectionDeletions=[],this.transactionId=Math.random().toString().substring(5)}initialize(){return Po(this,void 0,void 0,function*(){yield ao.H.initializeTransaction(this.transactionId)})}commitTransaction(){return Po(this,void 0,void 0,function*(){if(!this.success)throw Error("Query Transaction Expired");yield ao.H.SyncDataOnline(this.transactionId),this.pendingConnectionDeletions.length>0&&(yield(0,J.E)(this.pendingConnectionDeletions)),this.actions={concepts:[],connections:[]},this.pendingConnectionDeletions=[],this.success=!1})}commitTransactionWithoutAuth(){return Po(this,void 0,void 0,function*(){if(!this.success)throw Error("Query Transaction Expired");yield ao.H.SyncDataOnlineWithoutAuth(this.transactionId),this.pendingConnectionDeletions.length>0&&(yield(0,J.E)(this.pendingConnectionDeletions)),this.actions={concepts:[],connections:[]},this.pendingConnectionDeletions=[],this.success=!1})}rollbackTransaction(){return Po(this,void 0,void 0,function*(){this.success=!1,this.actions={concepts:[],connections:[]},this.pendingConnectionDeletions=[],yield ao.H.rollbackTransaction(this.transactionId,this.actions)})}markAction(){return Po(this,void 0,void 0,function*(){yield ao.H.markTransactionActions(this.transactionId,this.actions)})}DeleteConnectionsBetween(e){return Po(this,void 0,void 0,function*(){return this.DeleteConnectionsBetweenBulk([e])})}DeleteConnectionsBetweenBulk(e){return Po(this,void 0,void 0,function*(){try{if(!this.success)throw Error("Query Transaction Expired");const t=e.map(Do),n=yield xo(t),o=[];for(const e of n)o.push(...e.connectionIds);return this.pendingConnectionDeletions.push(...o),o}catch(e){throw this.success=!1,e}})}MakeTheInstanceConceptLocal(e,t){return Po(this,arguments,void 0,function*(e,t,n=!1,o,i,r=999,a=0){try{if(!this.success)throw Error("Query Transaction Expired");const s=yield(0,te.k)(e,t,n,o,i,r,a,this.actions);return yield this.markAction(),s}catch(e){throw this.success=!1,e}})}MakeTheTypeConceptLocal(e,t,n,o){return Po(this,void 0,void 0,function*(){try{if(!this.success)throw Error("Query Transaction Expired");const i=yield(0,ue.$)(e,t,n,o,this.actions);return yield this.markAction(),i}catch(e){throw this.success=!1,e}})}CreateTheConceptLocal(e,t,n,o,i,r){return Po(this,arguments,void 0,function*(e,t,n,o,i,r,a=!1,s=0,c={concepts:[],connections:[]}){try{if(!this.success)throw Error("Query Transaction Expired");const c=yield(0,No.A)(e,t,n,o,i,r,a,s,this.actions);return yield this.markAction(),c}catch(e){throw this.success=!1,e}})}CreateConnectionBetweenTwoConceptsLocal(e,t,n){return Po(this,arguments,void 0,function*(e,t,n,o=!1){try{if(!this.success)throw Error("Query Transaction Expired");const i=yield(0,In.h)(e,t,n,o,this.actions);return yield this.markAction(),i}catch(e){throw this.success=!1,e}})}CreateTheConnectionLocal(e,t,n){return Po(this,arguments,void 0,function*(e,t,n,o=1,i="",r=999){try{if(!this.success)throw Error("Query Transaction Expired");const a=yield(0,Zt.F)(e,t,n,o,i,r,this.actions);return yield this.markAction(),a}catch(e){throw this.success=!1,e}})}CreateConnection(e,t,n){return Po(this,void 0,void 0,function*(){try{if(!this.success)throw Error("Query Transaction Expired");const o=yield(0,Zt.d)(e,t,n,this.actions);return yield this.markAction(),o}catch(e){throw this.success=!1,e}})}CreateConnectionBetweenEntityLocal(e,t,n){return Po(this,void 0,void 0,function*(){try{if(!this.success)throw Error("Query Transaction Expired");const o=yield Ko(e,t,n,this.actions);return yield this.markAction(),o}catch(e){throw this.success=!1,e}})}CreateTheCompositionLocal(e){return Po(this,arguments,void 0,function*(e,t=null,n=null,o=null,i=null,r=null,a=null,s=!1){try{if(!this.success)throw Error("Query Transaction Expired");const c=yield(0,U.R)(e,t,n,o,i,r,a,s,this.actions);return yield this.markAction(),c}catch(e){throw this.success=!1,e}})}}const Ro={AccessTracker:{GetSuggestedConcepts:{parameters:["top"],documentation:"Fetch suggested concepts from the server with proper error handling."},GetSuggestedConnections:{parameters:["top"],documentation:"Fetch suggested connections from the server with proper error handling.\nParam: top number of connections to get load"},addConceptToBinaryTree:{parameters:["conceptsDataArray"],documentation:"Add Concepts to Binary Tree"},addConnectionToBinaryTree:{parameters:["connectionsDataArray"],documentation:"Add Concepts to Binary Tree"},getTopConcepts:{parameters:["n"],documentation:"Retrieves the top N concepts by their counts."},getTopConnections:{parameters:["n"],documentation:"Retrieves the top N connections by their counts."},incrementConcept:{parameters:["conceptId"],documentation:"Increments the count for a specific conceptId."},incrementConnection:{parameters:["connectionId"],documentation:"Increments the count for a specific connectionId."},loadDataFromLocalStorage:{parameters:[],documentation:"Loads the concept and connection data from localStorage."},saveDataToLocalStorage:{parameters:[],documentation:"Saves the concept and connection data to localStorage."},sendToServer:{parameters:[]},setNextSyncTime:{parameters:[],documentation:"Sets the next sync time based on the current time and sync interval."},startAutoSync:{parameters:[],documentation:"Starts auto-syncing to the server every specified time interval.\nThis will automatically call `syncToServer` every 5 minutes"},syncNow:{parameters:[],documentation:"Sync immediately called by setInterval when time to sync has arrived."},syncToServer:{parameters:[],documentation:"Syncs the concept and connection data with the server."}},Anomaly:{checkAnomalyInBulk:{parameters:["formData"],documentation:"Checks anomalies for multiple concepts in bulk.\nIterates over a record of concept-value pairs and detects anomalies.\n\nParam: {Record<string, string>} instanceData - An object where each key is a concept type and each value is the corresponding data value.\nReturns: {Promise<Record<string, { valid: boolean, warnings: string[] }>>} - A promise that resolves to an object where each key is a concept type\nand the value is an object containing `valid` (boolean) and `warnings` (array of warning messages)."},checkConceptAnomaly:{parameters:["typeConcept","value"],documentation:"Checks whether a given concept and value pair contains an anomaly.\nAn anomaly is detected based on the concept's length and type rules.\n\nParam: {string} typeConcept - The concept type (e.g., `the_name`).\nParam: {string} value - The value to check for anomalies.\nReturns: {Promise<{ valid: boolean, warnings: string[] }>} - A promise that resolves to an object containing:\n- `valid`: A boolean indicating whether the value is valid according to the anomaly rules.\n- `warnings`: An array of warning messages related to the value's anomalies."},detectDataType:{parameters:["value"],documentation:"Detects the data type of a given value based on predefined rules.\nIt checks the value against the `DATA_TYPES_RULES` to find the matching data type.\n\nParam: {string} value - The value to check.\nReturns: {string | null} - The detected data type, or `null` if no match is found."},fetchAnomalyParameters:{parameters:[],documentation:"Fetches anomaly parameters directly from the backend API.\nThis method is used internally by `getAnomalyParameters` to retrieve fresh data.\n\nReturns: {Promise<any>} - A promise that resolves to the fetched anomaly parameters."},getAnomalyParameters:{parameters:[],documentation:"Fetches the anomaly parameters.\nIt first checks if the parameters are cached and whether the cache is still valid (not expired).\nIf the cache is valid, it returns the cached data. If not, it fetches the data from the API.\n\nReturns: {Promise<any>} - A promise that resolves to the anomaly parameters."},getExportedFunction:{parameters:[],documentation:"List all the exported functions of the package\nReturns: Keys of the Object which has exported functions"},getFunctionaAnomalyParameters:{parameters:[]},initializeAnomalyParameters:{parameters:[],documentation:"Initializes the anomaly parameters by fetching them from the API.\nThis method is only run once on startup to ensure the cache is ready for use.\nIt will fetch the parameters from the API and store them in a static cache.\n\nReturns: {Promise<void>} - A promise that resolves once the parameters have been initialized."},refreshCache:{parameters:[],documentation:"Refreshes the anomaly parameters cache if the cache has expired.\nIf the cache expiry threshold has been surpassed, the method re-fetches the data from the API.\n\nReturns: {Promise<void>} - A promise that resolves when the cache has been refreshed."}},BaseUrl:{CreateGhostConceptApiUrl:{parameters:["withAuth"]},CreateGhostConnectionApiUrl:{parameters:[]},CreatePrototypeUrl:{parameters:[]},CreateSessionId:{parameters:[]},CreateSessionVisitUrl:{parameters:[]},CreateTheCharacterDataUrl:{parameters:[]},CreateTheConceptUrl:{parameters:[]},CreateTheConnectionNewUrl:{parameters:[]},CreateTheConnectionUrl:{parameters:[]},CreateTheTextDataUrl:{parameters:[]},DeleteConceptUrl:{parameters:[]},DeleteTheConnectionBulkUrl:{parameters:[]},DeleteTheConnectionUrl:{parameters:[]},DeleteUserUrl:{parameters:[]},FreeschemaQueryUrl:{parameters:[]},GetAllAiData:{parameters:[]},GetAllConceptsByTypeUrl:{parameters:[]},GetAllConceptsOfUserUrl:{parameters:[]},GetAllConnectionsOfCompositionBulkUrl:{parameters:[]},GetAllConnectionsOfCompositionUrl:{parameters:[]},GetAllConnectionsOfConceptUrl:{parameters:[]},GetAllConnectionsOfUserUrl:{parameters:[]},GetAllConnectionsToConceptUrl:{parameters:[]},GetAllLinkerConnectionOfConceptUrl:{parameters:[]},GetAllLinkerConnectionToConceptUrl:{parameters:[]},GetAllPrefetchConnectionsUrl:{parameters:[]},GetCachedImage:{parameters:["ImageName"]},GetCharacterByCharacterUrl:{parameters:[]},GetCompositionConnectionBetweenTwoConceptsUrl:{parameters:[]},GetConceptBulkUrl:{parameters:[]},GetConceptByCharacterAndCategoryDirectUrl:{parameters:[]},GetConceptByCharacterAndCategoryUrl:{parameters:[]},GetConceptByCharacterAndTypeUrl:{parameters:[]},GetConceptByCharacterValueUrl:{parameters:[]},GetConceptUrl:{parameters:[]},GetConnectionBulkUrl:{parameters:[]},GetConnectionUrl:{parameters:[]},GetConnectionsBetweenUrl:{parameters:[]},GetRealConceptById:{parameters:[]},GetReservedConnectionIdUrl:{parameters:[]},GetReservedIdUrl:{parameters:[]},GetSuggestedConcepts:{parameters:[]},GetSuggestedConnections:{parameters:[]},GetTypeConceptBulk:{parameters:[]},LogHealth:{parameters:[]},LoginUrl:{parameters:[]},MakeTheNameInBackendUrl:{parameters:[]},MakeTheTypeConceptUrl:{parameters:[]},PostLogger:{parameters:[]},PostPrefetchConceptConnections:{parameters:[]},RecursiveSearchUrl:{parameters:[]},SearchAllTypeWithLinker:{parameters:["auth"]},SearchCompositionsUrl:{parameters:[]},SearchInternalWithAuthenticatedCcsUrl:{parameters:[]},SearchInternalWithCcsUrl:{parameters:[]},SearchLinkMultipleAll:{parameters:[]},SearchLinkMultipleAllApiUrl:{parameters:[]},SignupUrl:{parameters:[]},UploadFileLimitUrl:{parameters:[]},ViewInternalDataUrl:{parameters:[]},getAppConfig:{parameters:[]},getConnectionsByTypes:{parameters:[]},getLatestWidgetData:{parameters:[]},getRandomizer:{parameters:[]},getRecentWidgetData:{parameters:[]},getWidgetData:{parameters:[]},sendBulkMail:{parameters:[]},sendMail:{parameters:[]},setRandomizer:{parameters:["id"]},uploadFileUrl:{parameters:[]},uploadImageUrl:{parameters:[]},uploadImageUrlWithSmall:{parameters:[]}},BinaryTree:{addConceptToTree:{parameters:["concept"],documentation:"Adds a concept to both the ID map and the character tree.\n\nThe character tree (BinaryCharacterTree) is still an AVL tree because\nit supports character-based search which is out of scope for this refactor.\n\nParam: concept - The Concept to store"},addNodeToTree:{parameters:["node"],documentation:"Low-level add — stores the node's key/value in the Map.\nKept for API compatibility (called internally by addConceptToTree).\nParam: node - Node with numeric key and Concept value"},checkFlag:{parameters:["resolve"],documentation:"Recursive polling helper for waitForDataToLoad"},countNumberOfNodes:{parameters:[],documentation:"Returns the total number of concepts stored.\nReturns: Number of concepts in the Map"},getConceptListFromIds:{parameters:["ids","conceptArray","remainingIds"],documentation:'Bulk concept retrieval by ID list.\n\nFor each ID found in the Map, pushes the Concept into conceptArray\nand removes the ID from the ids array. IDs remaining in the array\nafter this call are "not found" and will be fetched from the backend.\n\nPerformance: O(k) where k = ids.length (was O(N) full tree traversal).\n\nParam: ids - Array of concept IDs to look up (mutated: found IDs are spliced out)\nParam: conceptArray - Output array (mutated: found Concepts are pushed)\nParam: remainingIds - Not used directly but kept for API compatibility'},getNodeFromTree:{parameters:["id"],documentation:"Retrieves a concept by ID from the Map.\n\nReturns a { key, value } wrapper matching the Node shape that callers expect.\nCallers access the returned object's .value property to get the Concept.\n\nParam: id - The concept ID to look up\nReturns: Node-like wrapper with .value = Concept, or null if not found"},removeNodeFromTree:{parameters:["id"],documentation:"Removes a concept by ID. Dispatches an event before deletion\nso listeners (e.g. UI components) can react to the removal.\n\nParam: id - The concept ID to remove"},waitForDataToLoad:{parameters:[],documentation:"Polls until IdentifierFlags.isDataLoaded is true (max 25 seconds).\nUsed by callers that need to wait for the initial IndexedDB load to finish."}},BuilderStatefulWidget:{CreateConnectionBetweenEntityLocal:{parameters:["concept1Data","concept2Data","linker"],documentation:'Creates a local connection between two concepts with a specified linker type.\n\nThis helper method creates a connection relationship between two entity concepts\nusing local storage (not immediately synced to backend). The linker name is\nautomatically prefixed with the first concept\'s type to create a typed connection.\n\n**Process:**\n1. Extracts userId from first concept\n2. Creates linker name: "{concept1Type}_{linkerName}"\n3. Creates or gets the connection type concept locally\n4. Creates the connection between the two concepts\n\n**Use Cases:**\n- Creating relationships in offline mode\n- Building entity associations within widgets\n- Temporary connections before sync\n- Development/testing without backend\n\nParam: concept1Data - The source concept (FROM)\nParam: concept2Data - The target concept (TO)\nParam: linker - The relationship name (e.g., "email", "phone", "address")\nThis will be prefixed with concept1\'s type\n\nReturns: Promise resolving to "connection created" string'},after_render:{parameters:[],documentation:"Executes event binding code after the widget renders.\n\nThis lifecycle method runs after the DOM is updated to attach event listeners\nand perform post-render operations. It executes user-defined code stored in\naddEventFunction.\n\n**Lifecycle Position:**\nRuns after render() completes and DOM is updated.\n\n**Common Uses:**\n- Attach click, input, or other event listeners\n- Set up keyboard shortcuts\n- Initialize interactive features\n- Bind form validation\n- Set up drag-and-drop handlers\n\n@throws Will log and re-throw errors if event binding code fails"},before_render:{parameters:[],documentation:"Executes the componentDidMount lifecycle hook.\n\nThis function is called after the component mounts to the DOM, similar to\nReact's componentDidMount. It executes user-defined initialization code\nstored in componentDidMountFunction.\n\n**Lifecycle Position:**\nRuns after render_custom_functions() and render_widgetDependencies(),\nbut before mount_child().\n\n**Common Uses:**\n- Fetch initial data from API\n- Set up subscriptions or listeners\n- Initialize third-party libraries\n- Perform DOM manipulations\n- Set initial state based on props\n\n@throws Will log and re-throw errors if componentDidMount code fails"},createRandomNumber:{parameters:[],documentation:"Generates a random identifier for this widget element.\n\nReturns: A random number used as the element identifier"},createTypeEditor:{parameters:["event"],documentation:"Opens the type editor interface for this widget.\n\nThis method is called in development mode when the widget is clicked.\nIt opens a visual editor for modifying the widget's type and properties.\n\nParam: event - The click event that triggered the editor"},getHtml:{parameters:[],documentation:"Returns the HTML content of this widget.\n\nReturns: The HTML string for this widget"},getTypeValueList:{parameters:["typeName"],documentation:'Fetches a list of type values from the backend based on the widget\'s type.\n\nThis method performs a filtered search using FreeschemaQuery to retrieve all entities\nof a specific type. The results are formatted as options for dropdowns or selection lists.\n\n**Process:**\n1. Parses widgetType to extract main composition and type-value key\n2. Creates filter for entities (e.g., filter by ID > 1)\n3. Executes FreeschemaQuery with filters\n4. Formats results into { id, name, text } objects\n5. Stores in this.typeValueList\n\n**Type Name Format:**\n- widgetType: "the_element_name"\n- mainComposition: "the_element"\n- typevalueKey: "the_name"\n\nParam: typeName - Optional type name (defaults to this.widgetType)\n\nReturns: Promise resolving to array of formatted type values:\n[{ id: number, name: string, text: string }, ...]'},getUserId:{parameters:[],documentation:"Retrieves the current user's ID from local storage.\n\nThis method fetches the user profile from localStorage and extracts the userId.\nUsed for user-specific operations and data access within widgets.\n\nReturns: Promise resolving to the user ID (number) or undefined if not found"},mount:{parameters:["parent"],documentation:"Mounts the widget to a parent DOM element and initializes the lifecycle.\n\nThis is the primary method for rendering a widget to the DOM. It:\n1. Creates a wrapper div element\n2. Attaches click handlers (if in development mode)\n3. Inserts HTML content\n4. Executes lifecycle hooks in order\n5. Mounts child widgets\n\n**Lifecycle Execution Order:**\n1. render_custom_functions() - Execute custom functions\n2. render_widgetDependencies() - Load dependencies\n3. before_render() - componentDidMount equivalent\n4. mount_child() - Mount child widgets\n5. render() - Update DOM\n\n**Development Mode:**\nWhen `inDevelopment` is true, the widget becomes clickable and opens\nthe type editor for visual configuration.\n\nParam: parent - The parent HTMLElement to mount this widget to"},mount_child:{parameters:[],documentation:"Mounts child widgets by executing the mountChildWidgetsFunction.\n\nThis method dynamically executes user-defined JavaScript code for mounting\nchild widgets. The code is executed within the widget's context with access\nto the tsccs package.\n\n**Execution Context:**\n- Code is bound to `this` (the widget instance)\n- Has access to `tsccs` module for TSCCS operations\n- Runs asynchronously\n\n@throws Will log and re-throw errors if mount_child code fails"},render_custom_functions:{parameters:[],documentation:"Executes all custom functions defined for this widget.\n\nThis method runs during the mount phase to execute user-defined custom\nfunctions. All functions in the customFunctions array are concatenated\nand executed together in the widget's context.\n\n**Custom Functions:**\n- Defined in widget.customFunctions array\n- Each function is a TCustomFunction object with a code property\n- All functions execute with access to `this` (widget) and `tsccs` module\n- Functions can define methods, initialize state, or set up utilities\n\n@throws Will log and re-throw errors if custom function code fails"},render_widgetDependencies:{parameters:[],documentation:"Executes widget dependencies initialization code.\n\nThis lifecycle method runs during the mount phase to load and initialize\nany dependencies required by the widget. Dependencies code is executed\nwith access to the tsccs module.\n\n**Execution:**\n- Runs before before_render()\n- Code in widgetDependenciesData is executed\n- Bound to widget context (this)\n- Has access to tsccs package\n\n@throws Will log and re-throw errors if dependency code fails"},setProperty:{parameters:["widgetTypeName"],documentation:'Sets the widget type and fetches associated type values.\n\nThis method updates the widget\'s type, fetches the corresponding type values\nfrom the backend, updates DOM attributes, and triggers a re-render.\n\nParam: widgetTypeName - The new widget type name (e.g., "the_person_name")\n\nReturns: Promise resolving to this widget instance (for method chaining)'},setTitle:{parameters:["title"],documentation:"Sets the browser document title.\n\nParam: title - The title string to set as the document title"}},Composition:{GetDataCache:{parameters:[]},UpdateAcrossDistributedSystem:{parameters:[]},isUpdating:{parameters:[]},updateCache:{parameters:[]}},CompositionBinaryTree:{addCompositionToTree:{parameters:["composition"]},addNodeToTree:{parameters:["node"]},countNumberOfNodes:{parameters:[]},getNodeFromTree:{parameters:["id"]},removeNodeFromTree:{parameters:["id"]}},CompositionNode:{addNode:{parameters:["passedNode","node","height"]},countNodeBelow:{parameters:["root"]},getBalanceFactor:{parameters:["N"]},getFromNode:{parameters:["id","node"]},getHeight:{parameters:["node"]},inOrderSuccessor:{parameters:["root"]},isValid:{parameters:[]},leftRotate:{parameters:["x"]},removeNode:{parameters:["passedNode","id"]},rightRotate:{parameters:["y"]},saveToCache:{parameters:["data"]}},Concept:{getType:{parameters:[]}},ConceptsData:{AddConcept:{parameters:["concept"]},AddConceptTemporary:{parameters:["concept"]},AddConceptToMemory:{parameters:["concept"]},AddConceptToStorage:{parameters:["concept"]},AddNpc:{parameters:["id"]},AddWidget:{parameters:["widgetDetails"]},CheckContains:{parameters:["concept"]},GetBinaryCharacterTree:{parameters:[]},GetConcept:{parameters:["id"]},GetConceptBulkData:{parameters:["ids","connectionArray","remainingIds"]},GetConceptByCharacter:{parameters:["characterValue"]},GetConceptByCharacterAndCategoryLocal:{parameters:["character_value","categoryId"]},GetConceptByCharacterAndTypeLocal:{parameters:["character_value","typeId"]},GetConceptByCharacterUpdated:{parameters:["characterValue"]},GetConceptsByTypeId:{parameters:["typeId"]},GetConceptsByTypeIdAndUser:{parameters:["typeId","userId"]},GetNpc:{parameters:["id"]},GetWidget:{parameters:["id"]},RemoveConcept:{parameters:["concept"]},RemoveWidget:{parameters:["id"]},getName:{parameters:[]}},Connection:{},ConnectionData:{AddConnection:{parameters:["connection"]},AddConnectionToMemory:{parameters:["connection"]},AddConnectionToStorage:{parameters:["connection"]},AddNpConn:{parameters:["id"]},AddToDictionary:{parameters:["connection"]},CheckContains:{parameters:["connection"]},GetConnection:{parameters:["id"]},GetConnectionBulkData:{parameters:["ids","connectionArray","remainingIds"]},GetConnectionByOfTheConceptAndType:{parameters:["ofTheConceptId","typeId"]},GetConnectionByOfType:{parameters:["ofTheConceptId","typeId"]},GetConnectionTree:{parameters:[]},GetConnectionTypeOfTree:{parameters:[]},GetConnectionTypeTree:{parameters:[]},GetConnectionsOfCompositionLocal:{parameters:["id"]},GetConnectionsOfConcept:{parameters:["id"]},GetNpConn:{parameters:["id"]},RemoveConnection:{parameters:["connection"]},getName:{parameters:[]}},CountInfo:{},DependencyObserver:{bind:{parameters:[],documentation:"Binds and refreshes the observable data. Override in subclasses to implement specific data fetching logic.\nReturns: The bound data"},execute:{parameters:[],documentation:"Executes the observable once without subscribing to updates.\nReturns: The executed data"},listenToEvent:{parameters:["id"],documentation:"Listens to connection changes for a specific concept and updates subscribers when connections are modified.\nParam: id - The concept ID to track"},listenToEventConnectionType:{parameters:["id","connectionType"],documentation:"Listens to connection changes filtered by connection type for a specific concept.\nParam: id - The concept ID to track\nParam: connectionType - The connection type ID to filter by"},listenToEventType:{parameters:["id"],documentation:"Listens to changes for a specific concept type and updates subscribers when new concepts of that type are created.\nParam: id - The type concept ID to track"},notify:{parameters:[],documentation:"Notifies all subscribers with the current data."},removeListenToEvent:{parameters:["id"],documentation:"Removes an event listener for a specific concept ID.\nParam: id - The concept ID to stop tracking"},run:{parameters:[],documentation:"Executes the observable without subscribing. Override in subclasses for non-reactive data fetching.\nReturns: The executed data"},subscribe:{parameters:["callback","errorCallback"],documentation:"Subscribes a callback to receive data updates whenever tracked concepts/connections change.\nParam: callback - Function to call with (data, observer) when updates occur\nParam: errorCallback - Optional function to call when errors occur\nReturns: Result of calling the callback with current data"},unsubscribe:{parameters:["callback"],documentation:"Removes a callback from the subscriber list.\nParam: callback - The callback function to remove\nReturns: Number of remaining subscribers"},update:{parameters:[],documentation:"Forces a data refresh and notifies all subscribers."}},Environments:{getValue:{parameters:["key","defaultValue"],documentation:"Retrieves a stored value by key.\n\nParam: key - The key to look up.\nParam: defaultValue - Value returned when the key has never been set. Defaults to `null`.\nReturns: The stored value, or `defaultValue` if the key is absent."},setValue:{parameters:["key","value"],documentation:"Stores a value under the given key. Overwrites any existing value.\nTakes effect immediately — the next call to `getValue` with the same key\nreturns the new value.\n\nParam: key - The key to store under.\nParam: value - The value to store.\nReturns: The `Environments` class itself for chaining."}},FilterSearch:{},FreeschemaQuery:{},LConcept:{getType:{parameters:[]}},LConnection:{},LocalConceptsData:{AddConcept:{parameters:["concept"]},AddConceptToMemory:{parameters:["concept"]},AddPermanentConcept:{parameters:["concept"]},ClearData:{parameters:[]},GetConcept:{parameters:["id"]},GetConceptByCharacter:{parameters:["characterValue"]},GetConceptByCharacterAndCategoryLocal:{parameters:["character_value","categoryId"]},GetConceptByCharacterAndTypeLocal:{parameters:["character_value","typeId"]},GetConceptByGhostId:{parameters:["id"]},GetConceptsByTypeId:{parameters:["typeId"]},GetConceptsByTypeIdAndUser:{parameters:["typeId","userId"]},RemoveConcept:{parameters:["concept"]},RemoveConceptById:{parameters:["conceptId"]},UpdateConceptSyncStatus:{parameters:["id"]},getName:{parameters:[]}},LocalSyncData:{AddConcept:{parameters:["concept"]},AddConceptIfDoesNotExist:{parameters:["concept","conceptList"]},AddConnection:{parameters:["connection"]},CheckContains:{parameters:["concept"]},CheckContainsConnection:{parameters:["connection"]},CheckIfTheConceptIdExists:{parameters:["id","conceptList"]},ConvertGhostIdsInConnections:{parameters:["connectionArray"]},RemoveConcept:{parameters:["concept"]},RemoveConnection:{parameters:["connection"]},RemoveConnectionById:{parameters:["connectionId"]},SyncDataDelete:{parameters:["id"]},SyncDataOnline:{parameters:["transactionId","actions","withAuth"]},SyncDataOnlineWithoutAuth:{parameters:["transactionId","actions","withAuth"]},UpdateConceptListToIncludeRelatedConcepts:{parameters:["connectionArray","conceptsArray"]},initializeTransaction:{parameters:["transactionId"]},markTransactionActions:{parameters:["transactionId","actions"]},rollbackTransaction:{parameters:["transactionId","actions"]},syncDataLocalDb:{parameters:[]}},LocalTransaction:{CreateConnection:{parameters:["ofTheConcept","toTheConcept","connectionTypeString"]},CreateConnectionBetweenEntityLocal:{parameters:["concept1Data","concept2Data","linker"]},CreateConnectionBetweenTwoConceptsLocal:{parameters:["ofTheConcept","toTheConcept","linker","both"]},CreateTheCompositionLocal:{parameters:["json","ofTheConceptId","ofTheConceptUserId","mainKey","userId","accessId","sessionInformationId","automaticSync"]},CreateTheConceptLocal:{parameters:["referent","typecharacter","userId","categoryId","typeId","accessId","isComposition","referentId","actions"]},CreateTheConnectionLocal:{parameters:["ofTheConceptId","toTheConceptId","typeId","orderId","typeString","userId"]},DeleteConnectionsBetween:{parameters:["query"],documentation:"Queries the backend for connections matching the given criteria and queues all\nreturned connection IDs for bulk deletion when commitTransaction() is called.\n\n**Nothing is deleted until commitTransaction() is called.**\nCalling rollbackTransaction() discards the queue without touching the backend.\n\nSupported query permutations:\n1. `ofTheConceptId` + `toTheConceptId` + `type` — connections between two specific concepts\n2. `ofTheConceptId` + `type` — all connections FROM a concept of that type\n3. `toTheConceptId` + `type` — all connections TO a concept of that type\n4. `typeId` + `isComposition: true` — all internal connections of a composition\n\nFor multiple queries in one go use {@link DeleteConnectionsBetweenBulk} — it sends\nall queries in a single HTTP request.\n\nParam: query - Partial FetchConnectionQuery with only the fields relevant to your permutation.\nReturns: The connection IDs queued for deletion by this call."},DeleteConnectionsBetweenBulk:{parameters:["queries"],documentation:"Same as {@link DeleteConnectionsBetween} but resolves multiple queries in a single\nHTTP request to POST /api/get-connection-between.\n\nPrefer this over looping DeleteConnectionsBetween — all queries go to the backend\nin one round trip, and all returned IDs are merged into the same pending-deletion queue.\nThe actual deletion still fires as a single bulk call inside commitTransaction().\n\nParam: queries - Array of partial FetchConnectionQuery objects, one per query permutation.\nReturns: All connection IDs queued for deletion across every query in this call."},MakeTheInstanceConceptLocal:{parameters:["type","referent","composition","userId","accessId","sessionInformationId","referentId"]},MakeTheTypeConceptLocal:{parameters:["typeString","sessionId","sessionUserId","userId"]},commitTransaction:{parameters:[],documentation:"Method to commi the created Transactions"},commitTransactionWithoutAuth:{parameters:[]},initialize:{parameters:[],documentation:"Method to initialize the transactions for specified transaction"},markAction:{parameters:[],documentation:"Method to move concepts and connection to transaction collection\nParam: concept Concept"},rollbackTransaction:{parameters:[],documentation:"Method to rollback all the tranctions occured"}},Logger:{checkLoggerServerStatus:{parameters:[]},clearLogsFromLocalStorage:{parameters:["logType"]},formatLogData:{parameters:["level","message","data"],documentation:"Logs a message with optional additional structured data."},log:{parameters:["level","message","data"]},logApplication:{parameters:["level","message","data"]},logError:{parameters:["startTime","userId","operationType","requestFrom","requestIP","responseStatus","responseData","functionName","functionParameters","userAgent","conceptsUsed"]},logUpdate:{parameters:["logData"],documentation:"Updates log data with execution details.\nParam: logData The log data object to be updated."},logfunction:{parameters:["myFunction","args"]},saveLogToLocalStorage:{parameters:["logType","logMessage"],documentation:"Helper method to save logs to localStorage."},sendApplicationLogsToServer:{parameters:[],documentation:"Helper method to send logs to the server."},sendPackageLogsToServer:{parameters:[]},setLogLevel:{parameters:["level"],documentation:'Set the log level (e.g., "DEBUG", "INFO", "WARNING", "ERROR").'},shouldLog:{parameters:["level"],documentation:"Determines whether the current log level permits the given level to be logged."},startAutoSync:{parameters:[],documentation:"Automatically starts the auto-sync mechanism.\nThis is private and does not need external interaction."},stopAutoSync:{parameters:[],documentation:"Automatically stops the auto-sync mechanism when required."}},PatcherStructure:{},Prototype:{},SearchLinkMultipleAllObservable:{bind:{parameters:[],documentation:"Executes the search queries and sets up change listeners.\nReturns: Formatted search results"}},SearchQuery:{},SearchStructure:{},Selector:{addFilter:{parameters:["value"]},after_render:{parameters:[]},before_render:{parameters:[]},getHtml:{parameters:[]}},SessionData:{},StatefulWidget:{UpdateChildData:{parameters:["value","widget"],documentation:"Updates a child widget's data and triggers re-render.\n\nParam: value - New data to pass to the child widget\nParam: widget - The child widget instance to update"},after_render:{parameters:[],documentation:"Lifecycle hook called after rendering.\nOverride to add event listeners or post-render logic."},before_render:{parameters:[],documentation:"Lifecycle hook called before rendering.\nOverride for initialization logic. Default implementation calls render()."},getElement:{parameters:[],documentation:"Gets the root DOM element of this widget.\n\nReturns: The widget's root HTML element"},getElementByClassName:{parameters:["identifier"],documentation:"Finds all elements with a specific class name within this widget.\n\nParam: identifier - Class name to search for (without '.' prefix)\nReturns: NodeList of matching elements"},getHtml:{parameters:[],documentation:"Gets the HTML template for this widget.\n\nReturns: HTML string to be rendered"},getWidgetState:{parameters:["key","defaultValue"],documentation:"Retrieves shared state data by key.\n\nParam: key - State property key to retrieve\nParam: defaultValue - Default value if key doesn't exist\nReturns: The state value or default value"},hasStateChanged:{parameters:[],documentation:"Checks if the widget state has changed since last update.\n\nReturns: True if state changed, false otherwise"},isPropertyEqual:{parameters:["obj1","obj2"],documentation:"Compares two state objects for shallow equality.\n\nParam: obj1 - First state object\nParam: obj2 - Second state object\nReturns: True if objects are equal, false otherwise"},loadChildWidgets:{parameters:[],documentation:"Mounts all registered child widgets to their designated parent elements."},mount:{parameters:["parent"],documentation:"Mounts the widget to a parent DOM element and initializes lifecycle.\n\nCreates a wrapper div, assigns unique ID, renders HTML, and executes\nlifecycle hooks in sequence.\n\nParam: parent - The parent HTML element to mount this widget into"},mount_child:{parameters:[],documentation:"Lifecycle hook for mounting child widgets.\nOverride this method to define custom child mounting logic."},querySelector:{parameters:["selector"],documentation:"Finds the first element matching a CSS selector within this widget.\n\nParam: selector - CSS selector string\nReturns: The first matching element or null"},querySelectorAll:{parameters:["selector"],documentation:"Finds all elements matching a CSS selector within this widget.\n\nParam: selector - CSS selector string\nReturns: NodeList of matching elements or null"},render:{parameters:[],documentation:"Re-renders the widget by updating the DOM with current HTML template.\nAlso triggers child widget loading and after_render hook."},renderChildWidgets:{parameters:[],documentation:"Recursively renders all child widgets in the hierarchy."},setState:{parameters:["newState"],documentation:"Updates the entire widget state and triggers re-render if changed.\n\nParam: newState - New state data to replace current state"},setStateProperty:{parameters:["newProperty"],documentation:"Updates specific state properties and triggers re-render if changed.\n\nParam: newProperty - Object containing properties to update"},setTitle:{parameters:["title"],documentation:"Sets the browser document title.\n\nParam: title - The new document title"},setWidgetState:{parameters:["key","value"],documentation:"Sets shared state data and propagates to all child widgets recursively.\n\nParam: key - State property key\nParam: value - State value to set"},update:{parameters:[],documentation:"Lifecycle hook called after widget data is updated.\nOverride this method to handle post-update logic."}},SyncData:{AddConcept:{parameters:["concept"]},AddConnection:{parameters:["connection"]},CheckContains:{parameters:["concept"]},CheckContainsConnection:{parameters:["connection"]},RemoveConcept:{parameters:["concept"]},RemoveConnection:{parameters:["connection"]},SyncDataDelete:{parameters:["id"]},SyncDataOnline:{parameters:[]}},TokenStorage:{hydrateProfile:{parameters:[],documentation:"Call once at app startup (e.g. in init()) to decrypt the stored profile\ninto memory so that getUserDetails() can read it synchronously."},logout:{parameters:[],documentation:"Clears all stored credentials and profile data."},saveUserProfile:{parameters:["signinResponse"],documentation:"Stores user profile securely (encrypted in sessionStorage)\nand keeps the token in memory for API calls.\nAlso populates profileCache so getUserDetails() works synchronously."},setSession:{parameters:["sessionId"]}},UserBinaryTree:{addConceptToTree:{parameters:["concept","userId","sessionId"]},addNodeToTree:{parameters:["node"]},checkFlag:{parameters:["resolve"]},compositeKey:{parameters:["userId","sessionId"]},countNumberOfNodes:{parameters:[]},getNodeFromTree:{parameters:["userId","sessionId"]},removeNodeFromTree:{parameters:["userId","sessionId"]},waitForDataToLoad:{parameters:[]}},Validator:{checkUniqueness:{parameters:["type","value"],documentation:"Checks if a concept with the given type and value is unique.\nParam: type concept type where to check\nParam: value value to check\nReturns: boolean indicating uniqueness"},validate:{parameters:["options"],documentation:"Take field element attributes\nParam: options Object conist of attributes\nReturns: Object with status and details"},validateField:{parameters:["options"],documentation:"Validates a single form field based on its constraints and uniqueness.\nParam: options - An object containing field properties including name, value, type, and validation constraints.\nReturns: An object containing validation errors if validation fails."},validateForm:{parameters:["formData"],documentation:"Validates all form fields by iterating over the provided form data.\nIt checks each field's value, data type, and constraints, collecting errors where necessary.\n\nParam: formData - An object representing the form data, where each key is a field name\nand each value is an object containing the `value`, `dataType`, and constraints (e.g., `maxLength`, `minLength`).\n\nReturns: An object containing validation errors for fields that failed validation.\nIf no errors exist, the object will be empty."}},WidgetTree:{},tsccs:{AccessTracker:{parameters:[]},AddGhostConcept:{parameters:["concept","userId","sessionId"]},Anomaly:{parameters:[],documentation:"Constructor that initializes anomaly parameters if the cache is not yet initialized.\nIt ensures that the anomaly parameters are loaded and cached for use."},BaseUrl:{parameters:[]},BinaryTree:{parameters:[],documentation:"BinaryTree — In-memory concept store keyed by numeric concept ID.\n\nBacked by a Map<number, Concept> for O(1) lookups, inserts, and deletes.\nAlso maintains the BinaryCharacterTree (character-indexed) on every insert\nso character-based search continues to work.\n\nAll public method signatures are preserved for backward compatibility.\ngetNodeFromTree returns a { key, value } wrapper so callers that access\nnode.value continue to work without changes."},BuildWidgetFromId:{parameters:["id"],documentation:"Fetches and builds widget data from the backend by widget ID.\n\nRetrieves complete widget structure including concepts, connections, and metadata.\nUses caching to prevent duplicate requests for the same widget.\n\nParam: id - The widget ID to fetch\nReturns: Promise resolving to formatted widget data"},BuilderStatefulWidget:{parameters:[],documentation:"BuilderStatefulWidget - A dynamic, stateful widget component for building interactive UI elements.\n\nThis class extends StatefulWidget to provide a powerful widget system that supports:\n- Dynamic HTML rendering with lifecycle hooks\n- Child widget composition and mounting\n- Custom function execution and event handling\n- Type-based data binding and queries\n- Development mode with visual editing capabilities\n- Widget dependencies and custom functions\n\n**Key Features:**\n- **Lifecycle Management**: before_render, render, after_render hooks\n- **Dynamic Code Execution**: Safely executes user-defined JavaScript functions\n- **Child Widgets**: Supports hierarchical widget composition\n- **Type Integration**: Connects to TSCCS type system for data binding\n- **Development Mode**: Visual editing and type editor integration\n- **Custom Functions**: Execute user-defined functions within widget context\n- **Local Connections**: Create relationships between entities at the widget level\n\n**Lifecycle Flow:**\n1. Constructor creates widget instance\n2. mount() attaches to parent DOM element\n3. render_custom_functions() executes custom code\n4. render_widgetDependencies() loads dependencies\n5. before_render() (componentDidMount equivalent) executes\n6. mount_child() mounts child widgets\n7. render() updates the DOM\n8. after_render() (addEvent) attaches event listeners\n\n**Use Cases:**\n- Building dynamic forms with type-based data\n- Creating reusable UI components\n- Widget-based page builders\n- Interactive dashboards\n- Data-driven UI components\n\n@extends StatefulWidget"},Composition:{parameters:[]},CompositionBinaryTree:{parameters:[]},CompositionNode:{parameters:["key","value","leftNode","rightNode"]},Concept:{parameters:["id","userId","typeId","categoryId","referentId","characterValue","accessId","isNew","entryTimeStamp","updatedTimeStamp","typeCharacter"]},ConceptsData:{parameters:[]},Connection:{parameters:["id","ofTheConceptId","toTheConceptId","userId","typeId","orderId","accessId"]},ConnectionData:{parameters:[]},CountInfo:{parameters:[]},CreateComposition:{parameters:["json","ofTheConceptId","ofTheConceptUserId","mainKey","userId","accessId","sessionInformationId"]},CreateConnection:{parameters:["ofTheConcept","toTheConcept","connectionTypeString","actions"],documentation:"Simplified connection creator that accepts concepts and a type string.\n\nThis is a convenience wrapper around CreateTheConnectionLocal that:\n1. Accepts Concept objects instead of IDs\n2. Creates the connection type concept if it doesn't exist\n3. Extracts necessary IDs automatically\n4. Sets appropriate defaults for local connections\n\n**Advantages:**\n- More intuitive API (pass concepts, not IDs)\n- Automatic type concept creation/retrieval\n- Less boilerplate code\n- Type-safe with TypeScript\n\n**Process:**\n1. Creates/retrieves type concept from connectionTypeString\n2. Extracts userId from source concept\n3. Calls CreateTheConnectionLocal with extracted IDs\n4. Returns the created connection\n\nParam: ofTheConcept - The source Concept object (FROM)\nParam: toTheConcept - The target Concept object (TO)\nParam: connectionTypeString - Type name as string (e.g., \"the_person_email\").\nA type concept will be created if it doesn't exist.\nParam: actions - Action tracking object for batch operations. Defaults to empty arrays.\n\nReturns: Promise resolving to the created Connection object"},CreateConnectionBetweenEntityLocal:{parameters:["concept1Data","concept2Data","linker","actions"]},CreateConnectionBetweenTwoConcepts:{parameters:["ofTheConcept","toTheConcept","linker","both","count"]},CreateConnectionBetweenTwoConceptsGeneral:{parameters:["ofTheConcept","toTheConcept","linker","both","count"]},CreateConnectionBetweenTwoConceptsLocal:{parameters:["ofTheConcept","toTheConcept","linker","both","actions"],documentation:'Creates a named connection between two concepts with optional bidirectional linking.\n\n**Complex Naming Logic**:\n- Forward connection type: "{ofType}_s_{linker}_s" (e.g., "person_s_knows_s")\n- Backward connection type: "{toType}_s_{linker}_by" (e.g., "person_s_knows_by")\n- Uses type.characterValue from concepts to build meaningful connection names\n\n**Bidirectional Mode (both=true)**:\n- Creates two connections: A→B and B→A\n- Forward: ofTheConcept → toTheConcept with "{ofType}_s_{linker}_s"\n- Backward: toTheConcept → ofTheConcept with "{toType}_s_{linker}_by"\n\nParam: ofTheConcept - Source concept (connection starts here)\nParam: toTheConcept - Target concept (connection points here)\nParam: linker - Relationship name (e.g., "knows", "works_at", "has")\nParam: both - If true, creates bidirectional connection (both A→B and B→A)\nParam: actions - Action tracking for batch operations\nReturns: The forward connection object\n@throws Error if connection creation fails'},CreateData:{parameters:["json","ofConcept","typeConcept","actions"]},CreateDefaultConcept:{parameters:[]},CreateDefaultLConcept:{parameters:[],documentation:'Creates a default empty local concept with all properties set to zero/default values.\n\nThis utility function generates a blank Concept object that can be used as a placeholder\nor default return value when a concept is not found. All IDs and values are set to 0\nor empty defaults.\n\n**Default Values:**\n- id: 0 (indicates empty/not found)\n- userId: 0\n- typeId: 0\n- categoryId: 0\n- referentId: 0\n- characterValue: "0"\n- accessId: 0\n- isNew: false\n- entryTimeStamp: current date\n- updatedTimeStamp: current date\n- typeCharacter: "0"\n\n**Use Cases:**\n- Default return value when concept not found\n- Placeholder for conditional logic\n- Initial state before loading data\n- Template for creating new concepts\n\nReturns: A Concept object with all properties set to default/zero values'},CreateSession:{parameters:["sessionData"],documentation:"Creates a new session for tracking user activity.\nRecords session metadata including user agent, IP, and timestamp.\n\nParam: sessionData - SessionData object containing session information\nReturns: Session object with generated ID, or null on error"},CreateSessionVisit:{parameters:["sessionId","url"],documentation:"Records a URL visit within an existing session.\nTracks page navigation and user journey through the application.\n\nParam: sessionId - ID of the session to associate the visit with\nParam: url - URL being visited\nReturns: Session visit object or null on error"},CreateTheCompositionLocal:{parameters:["json","ofTheConceptId","ofTheConceptUserId","mainKey","userId","accessId","sessionInformationId","automaticSync","actions"],documentation:'Converts a JSON object into a local composition structure with concepts and connections.\n\nThis powerful function recursively transforms any JSON object into the concept-connection\nsystem, creating local concepts for each key-value pair and establishing connections\nbetween them to preserve the hierarchical structure.\n\n**JSON to Composition Conversion:**\n- JSON keys become type concepts (e.g., "name", "email")\n- JSON string/number values become instance concepts\n- Nested objects/arrays create sub-compositions\n- Connections preserve parent-child relationships\n- All data stored locally (IndexedDB) for offline use\n\n**Recursive Process:**\n1. Iterates through each key in JSON object\n2. For nested objects/arrays: Creates composition concept + recurse\n3. For primitive values: Creates instance concept\n4. Creates connections from parent to child concepts\n5. Returns the main/root concept\n\n**Example Transformation:**\n```javascript\nInput JSON:\n{\nname: "Alice",\nemail: "alice@example.com",\naddress: {\ncity: "NYC",\nzip: "10001"\n}\n}\n\nCreates:\n- Concept: "name" (type) → "Alice" (instance)\n- Concept: "email" (type) → "alice@example.com" (instance)\n- Concept: "address" (composition concept)\n- Concept: "city" → "NYC"\n- Concept: "zip" → "10001"\n- Connections linking all concepts in hierarchy\n```\n\nParam: json - The JSON object/array to convert to composition structure.\nCan be any depth of nesting.\nParam: ofTheConceptId - Parent concept ID if this is a sub-composition.\nNull for root composition. Used for connecting to parent.\nParam: ofTheConceptUserId - User ID of the parent concept.\nUsed for ownership tracking in nested structures.\nParam: mainKey - The main composition ID (root concept ID).\nUsed as typeId for internal connections. Null for root.\nParam: userId - User ID of the creator. Defaults to 999 (system).\nParam: accessId - Access control level. Defaults to 999 (system).\nParam: sessionInformationId - Session ID. Defaults to 999 (system).\nParam: automaticSync - Reserved for future automatic sync feature.\nCurrently not fully implemented.\nParam: actions - Action tracking object that accumulates all created concepts\nand connections for batch operations. Defaults to empty arrays.\n\nReturns: Promise resolving to the main/root Concept of the composition'},CreateTheCompositionWithCache:{parameters:["json","ofTheConceptId","ofTheConceptUserId","mainKey","userId","accessId","sessionInformationId","composition"]},CreateTheConnection:{parameters:["ofTheConceptId","userId","toTheConceptId","typeId"],documentation:'Creates a connection (relationship) between two concepts and adds it to the sync queue.\n\nThis is the primary function for establishing relationships in the knowledge graph.\nConnections are directed edges that link two concepts together, representing relationships\nlike "works at", "belongs to", "authored by", etc.\n\n**Connection Structure:**\n- FROM concept (ofTheConceptId) → TO concept (toTheConceptId)\n- The relationship is directional\n- Type ID classifies what kind of relationship it is\n- Order ID allows sorting when multiple connections of the same type exist\n\n**Important Behaviors:**\n- Connections are marked as temporary (isTemp = true) for internal compositions\n- Added to SyncData queue for backend synchronization\n- Assigned a random temporary ID until persisted\n- Self-connections (same from/to) are prevented (returns invalid connection)\n- Default access level is 4 (typically means "admin" or "restricted")\n\nParam: ofTheConceptId - The source concept ID (start of the relationship).\nThis is where the connection originates FROM.\nParam: userId - The ID of the user creating this connection. Used for ownership and permissions.\nParam: toTheConceptId - The target concept ID (end of the relationship).\nThis is where the connection points TO.\nParam: typeId - The type classification for this connection. Defines the nature of the relationship.\n(e.g., 5="works_at", 6="manages", 7="member_of")\n\nReturns: The created Connection object with all properties set, including a temporary ID'},CreateTheConnectionGeneral:{parameters:["ofTheConceptId","ofTheConceptUserId","toTheConceptId","typeId","orderId","accessId"]},CreateTheConnectionLocal:{parameters:["ofTheConceptId","toTheConceptId","typeId","orderId","typeString","userId","actions"],documentation:'Creates a connection in local storage (IndexedDB) without syncing to the backend.\n\nThis is the primary function for creating offline-first connections. The connection is stored\nlocally in IndexedDB and memory, but NOT immediately sent to the backend. Sync happens\nlater via LocalSyncData.SyncDataOnline().\n\n**Virtual ID System:**\n- Generates a negative ID (e.g., -67890) to indicate local/virtual status\n- id and ghostId are initially equal and both negative\n- After backend sync: id becomes positive (real backend ID)\n- ghostId remains negative (preserves original local ID)\n- Mapping is stored in backend and LocalGhostIdTree\n\n**Connection Types:**\n- **Internal Connections**: orderId < 3 (within a composition)\n- typeId is typically the composition ID\n- **External Connections**: orderId >= 999 (between different entities)\n- typeId is a type concept ID\n- typeString provides human-readable type name\n\n**Self-Connection Prevention:**\nIf ofTheConceptId equals toTheConceptId, returns an empty connection (prevents loops).\n\nParam: ofTheConceptId - Source concept ID (FROM). The connection originates here.\nCan be negative (local) or positive (server) ID.\nParam: toTheConceptId - Target concept ID (TO). The connection points here.\nCan be negative (local) or positive (server) ID.\nParam: typeId - The type classification for this connection.\n- For internal connections: composition ID\n- For external connections: type concept ID\nParam: orderId - Order identifier for sorting multiple connections.\n- < 3: Internal connection\n- >= 999: External connection\n- Defaults to 1\nParam: typeString - Human-readable type name (e.g., "the_person_email").\nUsed primarily for external connections. Defaults to empty string.\nParam: userId - The ID of the user creating this connection. Defaults to 999 (system).\nParam: actions - Action tracking object that accumulates created concepts and connections.\nUsed for batch operations and rollback. Defaults to empty arrays.\n\nReturns: Promise resolving to the created Connection object with negative ID.\nReturns empty connection (all IDs = 0) if self-connection attempted.'},DelayFunctionExecution:{parameters:["ms","callback"],documentation:"Param: ms The time required to wait before executing this function\nParam: callback This is the function that needs to be executed\nReturns: returns a promise for the resolve"},DeleteConceptById:{parameters:["id"]},DeleteConceptLocal:{parameters:["id"],documentation:"Deletes a concept from local storage (IndexedDB).\n\nThis function removes a concept from LocalConceptsData, effectively deleting it\nfrom the local IndexedDB cache. This is a local-only delete - it does NOT sync\nthe deletion to the backend.\n\n**Important Notes:**\n- Only deletes from local storage (IndexedDB)\n- Does NOT delete from backend server\n- Does NOT automatically delete related connections\n- For full deletion including backend, use DeleteConceptById\n- Works with both negative (local) and positive (synced) IDs\n\n**Use Cases:**\n- Cleaning up local draft concepts\n- Removing concepts before they're synced\n- Local cache management\n- Testing and development\n\n**Process:**\n1. Fetches the concept via GetTheConceptLocal\n2. Removes it from LocalConceptsData\n3. Updates IndexedDB\n\nParam: id - The concept ID to delete (negative for local, positive for synced)\n\nReturns: Promise that resolves when deletion is complete"},DeleteConnectionById:{parameters:["id"]},DeleteConnectionByIdBulk:{parameters:["ids"]},DeleteConnectionByType:{parameters:["id","linker"],documentation:"Param: id\nParam: linker\n@returns"},DeleteConnectionByTypeBulk:{parameters:["id","linkers"]},DeleteUser:{parameters:["id"]},DependencyObserver:{parameters:[],documentation:"Base observable class that tracks concepts and connections for reactive state management.\nImplements the observer pattern to notify subscribers when tracked data changes."},Environments:{parameters:[],documentation:"Static key-value store for runtime configuration values.\n\nUsed throughout the package for feature flags and settings that need to be\nreadable anywhere without passing parameters down the call stack.\n\n**Built-in keys:**\n- `'enableCache'` — controls widget and query caching (default `true`).\nSet via `init()` parameters or toggled at runtime. Checked on every\ncache read/write in `QueryCacheManager` and `WidgetCacheManager`."},FilterSearch:{parameters:[]},FormatFromConnections:{parameters:["linkers","compositionData","mainComposition","reverse"],documentation:"########## Format works with JUSTDATA / NORMAL ########### used for single origin concept\nParam: linkers this is the list of linkers that\nParam: compositionData\nParam: mainComposition\nParam: reverse list of connection ids that need to show reverse conneciton.\n@returns"},FormatFromConnectionsAltered:{parameters:["connections","compositionData","mainComposition","reverse"],documentation:"## Format is DATAID ##\nThis is altered format and is different from others because it passes all the connections prebuilt/prefetched\nThis will not let the connections to be again fetched from the memory.\nParam: connections the type connections that need (external connections) to be passed\nParam: compositionData this is a dictionary type of format that has all the build compositions {id: { actual data}}\nParam: mainComposition this is the id of the main composition that builds the tree\nParam: reverse this is the list of connections ids that needs to go to the reverse direction (to----\x3efrom)\n@returns"},FreeschemaQuery:{parameters:[]},FreeschemaQueryApi:{parameters:["query","token"],documentation:"Executes a freeschema query for flexible, schema-free data retrieval.\nSupports custom query structures with filters, pagination, and nested queries.\n\nParam: query - FreeschemaQuery object containing query parameters, filters, and nested queries\nParam: token - Authentication token (optional, defaults to empty string)\nReturns: Query results array or empty array on error"},GetAllConnectionsOfComposition:{parameters:["composition_id"],documentation:"Retrieves all connections belonging to a specific composition.\nChecks local cache first, then fetches from backend if needed.\n\n**Complex Logic**: First checks ConnectionData cache, then fetches from API,\ncompares with cached data to detect deletions, and updates cache.\n\nParam: composition_id - ID of the composition whose connections to retrieve\nReturns: Array of Connection objects for the composition"},GetAllConnectionsOfCompositionBulk:{parameters:["composition_ids"],documentation:"Retrieves connections for multiple compositions in bulk.\nOptimizes fetching by batching multiple composition IDs in one request.\n\n**Complex Logic**: Checks in-memory cache, fetches from API, detects deletions\nby comparing old and new data, and bulk-fetches related concepts.\n\nParam: composition_ids - Array of composition IDs to fetch connections for\nReturns: Array of Connection objects for all compositions"},GetAllTheConnectionsByTypeAndOfTheConcept:{parameters:["id","linker","reverse"],documentation:"This function returns all the connections from the ofTheConceptId and connection type\nParam: id ofTheConceptId\nParam: linker the connection type\nReturns: Array of connections"},GetComposition:{parameters:["id"],documentation:'Retrieves a complete composition structure for a given concept ID in JUSTDATA format.\n\nThis is a primary composition retrieval function that builds a hierarchical structure\ncontaining the main concept, all its connections, and recursively fetched related concepts.\nThe result is formatted as a nested object organized by concept types.\n\n**What is a Composition?**\nA composition represents a concept along with its connected relationships and sub-structures.\nThink of it as getting a "full profile" of a concept including everything connected to it.\n\n**Process:**\n1. Fetches all connections associated with the concept\n2. Identifies all related concept IDs from those connections\n3. Recursively builds the composition tree\n4. Fetches the main concept details\n5. Organizes output by concept type (e.g., result["Person"] = {...})\n6. Routes through service worker if enabled for better performance\n\n**Output Format (JUSTDATA):**\nReturns an object keyed by the main concept\'s type character value:\n```\n{\n"Person": {\nid: 123,\ncharacterValue: "Alice",\nconnections: [...],\nrelatedConcepts: {...}\n}\n}\n```\n\nParam: id - The unique identifier of the concept for which to build the composition.\nThis becomes the root of the composition tree.\n\nReturns: Promise resolving to an object containing the composition data organized by\nthe main concept\'s type. Returns empty object if concept not found or on error.'},GetCompositionBulk:{parameters:["conceptIds"],documentation:"## Format JUSTDATA ##\nFunction converts the conceptIds to json (compositions)\nThis function takes in the conceptIds and returns a list of compositions related to those concepts.\nParam: conceptIds list of concept ids that are compositions.\nReturns: compositions"},GetCompositionBulkWithDataId:{parameters:["conceptIds"],documentation:"## FORMAT DATAIDDATE ##\nFunction converts the conceptIds to json (compositions)\nParam: conceptIds this is the list of concept ids that should be converted to compostions in data - id format.\nReturns: list of compositions in the data - id format."},GetCompositionFromConnectionsWithDataId:{parameters:["conceptIds","connectionIds"],documentation:"## FORMAT DATAIDDATE ##\nThis function converts the conceptIds and internal connectionIds to compositions in data-Id format.\nParam: conceptIds This is the list of concept ids that need to be converted to compositions.\nParam: connectionIds These are the internal connectionIds that need to be passed to create the compositions.\nReturns: list of compositions created from the passed conceptIds and connectionIds."},GetCompositionFromConnectionsWithDataIdFromConnections:{parameters:["conceptIds","connectionIds"],documentation:"## FORMAT DATAIDDATE ##\nThis is just a different version of GetCompositionFromConnectionsWithDataId, This has the added functionality that\nit also prints out internal connections.\nThis function converts the conceptIds and internal connectionIds to compositions in data-Id format.\nParam: conceptIds This is the list of concept ids that need to be converted to compositions.\nParam: connectionIds These are the internal connectionIds that need to be passed to create the compositions.\nReturns: list of compositions created from the passed conceptIds and connectionIds."},GetCompositionFromConnectionsWithDataIdInObject:{parameters:["conceptIds","connections"],documentation:"## Format DATAIDDATE ##\nThis function converts the conceptIds and internal connections to create compositions.\nFormat is of a dictionary with ids as the key and value is the composition data.\nParam: conceptIds these are the concept ids that need to be fetched to create their compositions\nParam: connections these are the connections that are used to create the structure.\nReturns: a dictionary / object that has key as their conceptId and the value as their composition object."},GetCompositionFromConnectionsWithDataIdIndex:{parameters:["conceptIds","connectionIds"],documentation:"## Format DATAIDDATE ##\nThis function converts the conceptIds and internal connectionIds to compositions in data-Id format with index(conceptId).\nParam: conceptIds This is the list of concept ids that need to be converted to compositions.\nParam: connectionIds These are the internal connectionIds that need to be passed to create the compositions.\nReturns: dictionary of compositions created from the passed conceptIds and connectionIds with conceptId as its index ."},GetCompositionFromConnectionsWithIndex:{parameters:["conceptIds","connectionIds"],documentation:"## Format is dictionary with key as concept id and value as data (json) ##\nThis function converts the conceptIds and internal connectionIds to compositions format with index(conceptId).\nParam: conceptIds This is the list of concept ids that need to be converted to compositions.\nParam: connectionIds These are the internal connectionIds that need to be passed to create the compositions.\nReturns: dictionary of compositions created from the passed conceptIds and connectionIds with conceptId as its index ."},GetCompositionFromConnectionsWithIndexFromConnections:{parameters:["conceptIds","connectionIds"],documentation:"## FORMAT DATAIDDATE ##\nThis is just a different version of GetCompositionFromConnectionsWithDataId, This has the added functionality that\nit also prints out internal connections.\nThis function converts the conceptIds and internal connectionIds to compositions in data-Id format.\nParam: conceptIds This is the list of concept ids that need to be converted to compositions.\nParam: connectionIds These are the internal connectionIds that need to be passed to create the compositions.\nReturns: list of compositions created from the passed conceptIds and connectionIds."},GetCompositionFromMemoryWithConnections:{parameters:["id","connectionList"],documentation:"### Format Normal ####\nGets data just from memory\nParam: id\n@returns"},GetCompositionList:{parameters:["compositionName","userId","inpage","page"]},GetCompositionListAll:{parameters:["compositionName","userId","inpage","page"]},GetCompositionListAllWithId:{parameters:["compositionName","userId","inpage","page"]},GetCompositionListListener:{parameters:["compositionName","userId","inpage","page","format"],documentation:"Creates an observable that tracks a paginated list of compositions and updates subscribers when they change.\nParam: compositionName - The composition type name\nParam: userId - The user ID who owns the compositions\nParam: inpage - Number of items per page\nParam: page - Page number (1-indexed)\nParam: format - Output format (JUSTDATA, DATAID, NORMAL)\nReturns: Observable instance for the composition list"},GetCompositionListLocal:{parameters:["compositionName","userId"],documentation:'Retrieves all compositions of a specific type from local storage.\n\n**Process Flow**:\n1. Finds the type concept by compositionName (e.g., "the_project")\n2. Queries all concepts with that typeId belonging to the user\n3. Fetches full composition for each concept\n4. Returns array of complete compositions\n\nParam: compositionName - The type name of compositions to retrieve (e.g., "the_project", "the_person")\nParam: userId - User ID to filter compositions by ownership\nReturns: Array of composition objects (empty array if type not found)\n@throws Error if lookup or composition fetching fails'},GetCompositionListLocalWithId:{parameters:["compositionName","userId"],documentation:"Retrieves all compositions of a specific type with DATAID format (includes concept ID).\n\nSame as GetCompositionListLocal but returns compositions in data-id wrapper format,\nwhich includes both the composition data and its concept ID for easier reference.\n\nParam: compositionName - The type name of compositions to retrieve\nParam: userId - User ID to filter compositions by ownership\nReturns: Array of composition objects in {id, data} format\n@throws Error if lookup or composition fetching fails"},GetCompositionListWithId:{parameters:["compositionName","userId","inpage","page"]},GetCompositionListWithIdUpdated:{parameters:["compositionName","userId","inpage","page"]},GetCompositionListener:{parameters:["id","format"],documentation:"Creates an observable that tracks a composition and updates subscribers when it changes.\nParam: id - The composition concept ID to observe\nParam: format - Output format (JUSTDATA, DATAID, NORMAL)\nReturns: Observable instance for the composition"},GetCompositionLocal:{parameters:["id"],documentation:'Retrieves a complete composition structure from local storage (IndexedDB).\n\nThis function fetches a composition using local-only data, building a hierarchical\nstructure from local connections and concepts. If the concept has been synced to the\nbackend, it can automatically fall back to fetching from the server.\n\n**Process:**\n1. Fetches all local connections for the composition\n2. Identifies all connected concept IDs\n3. Retrieves the main concept from LocalConceptsData\n4. If concept not found locally, checks if it\'s been synced (TranslateLocalToReal)\n5. Falls back to server GetComposition if concept is synced\n6. Recursively builds composition tree from local data\n7. Organizes output by concept type\n\n**Local vs Server:**\n- Prioritizes local data (IndexedDB)\n- Automatic fallback to server if concept synced\n- Uses LocalConnectionData for connections\n- Uses LocalConceptsData for concepts\n\n**Output Format (JUSTDATA):**\nReturns an object keyed by the main concept\'s type:\n```\n{\n"Person": {\nname: "Alice",\nemail: {...},\nprojects: {...}\n}\n}\n```\n\nParam: id - The concept ID (can be negative for local or positive for synced)\n\nReturns: Promise resolving to composition data organized by concept type'},GetCompositionLocalWithId:{parameters:["id"],documentation:'Retrieves a local composition with ID and data wrapper (DATAID format).\n\nThis is a variant of GetCompositionLocal that returns the composition data\nwrapped in an object that includes both the data and the concept ID. This format\nis useful for tracking which concept the data belongs to.\n\n**Output Format (DATAID):**\n```\n{\ndata: {\n"Person": {\nname: "Alice",\nemail: {...}\n}\n},\nid: 12345\n}\n```\n\n**Differences from GetCompositionLocal:**\n- Returns { data, id } wrapper object\n- Same local data retrieval process\n- Same recursive building logic\n- No automatic server fallback\n\nParam: id - The concept ID (negative for local, positive for synced)\n\nReturns: Promise resolving to object with { data, id } structure'},GetCompositionWithAllIds:{parameters:["id"]},GetCompositionWithCache:{parameters:["id","connectionListPassed"]},GetCompositionWithDataIdBulk:{parameters:["ids","connections"]},GetCompositionWithDataIdWithCache:{parameters:["id","connectionListPassed"]},GetCompositionWithId:{parameters:["id"],documentation:"#### Format DATAID ####\n## This will return the composition even if it is not in the local memory ##\nParam: id\n@returns"},GetCompositionWithIdAndDateFromMemory:{parameters:["id"],documentation:"### Format DATAIDDATE #####\n### This just returns composition from memory and not from anywhere else.\nParam: id\n@returns"},GetConceptBulk:{parameters:["passedConcepts"],documentation:"This function takes in a list of ids and returns a list of concepts . This uses local memory to find concepts\nnamely in the concept binary tree. If it could not find the concepts in local memory then it fetches those from\nthe api. The fetched concepts from api are then stored in the memory for further use in future.\nParam: conceptIds list of concept ids that need to be fetched\nReturns: list of concepts"},GetConceptByCharacter:{parameters:["characterValue"]},GetConceptByCharacterAndCategoryLocal:{parameters:["character"],documentation:'Retrieves a local concept by character value, handling hierarchical type names.\n\n**Complex Logic**: For compound names (e.g., "the_person_email"):\n1. Splits string by underscore\n2. Recursively processes first part to get category ID\n3. Searches using character value and derived category\n4. Falls back to simple character search for single words\n\n**Special Case**: Returns concept with id=1 for character value "the".\n\nParam: character - The character value to find (e.g., "the_status", "the_person_email")\nReturns: Concept associated with the character value'},GetConceptByCharacterAndType:{parameters:["characterValue","typeId"],documentation:"Retrieves a concept by character value and type ID.\nChecks local cache first, then fetches from backend if not found.\n\n**Complex Logic**: Checks local ConceptsData cache, falls back to API,\nsupports service worker for offline capability.\n\nParam: characterValue - Character value string to search for\nParam: typeId - Type ID to filter by\nReturns: Concept object or null if not found"},GetConnectionBetweenTwoConceptsLinker:{parameters:["ofTheConcept","toTheConcept","linker","fullLinker","forward"],documentation:"This function will give you all the connections between two concepts by their linker or fullLinker\nParam: ofTheConcept start of the connecction\nParam: toTheConcept end of the connection\nParam: linker the primitive linkers with type connection (16) these are the old type of linkers (if you want full linker then put this as empty string)\nParam: fullLinker fullLinker is the modern linker (if you want linker then put this as empty string)\nParam: forward if you want to get the forward relation in the primitive linker put true else for backward linker false.\nReturns: list of connections"},GetConnectionBulk:{parameters:["connectionIds"],documentation:"After fetching these connections it is saved in the local static ConnectionBinaryTree so it can be reused without being fetched\nParam: connectionIds array of connection ids that need to fetched by the local system\nReturns: the list of connections that have been fetched"},GetConnectionById:{parameters:["id"]},GetConnectionDataPrefetch:{parameters:["connectionIds"],documentation:"Used to prefetch all the connections and their related concepts.\nParam: connectionIds these are the connection ids that are used to fetch all the connections and also their related concepts.\nReturns: all the connections that are passed as ids."},GetConnectionOfTheConcept:{parameters:["typeId","ofTheConceptId","userId","inpage","page"],documentation:"Retrieves connections originating from a specific concept.\nFetches connections filtered by type, concept, user, and pagination.\n\nParam: typeId - Type ID to filter connections by\nParam: ofTheConceptId - Concept ID that is the source of connections\nParam: userId - User ID to filter by\nParam: inpage - Number of results per page (default: 10)\nParam: page - Page number (default: 1)\nReturns: Array of Connection objects"},GetConnectionTypeForCount:{parameters:["countInfos"]},GetConnectionsBetweenApi:{parameters:["fetchConnections"],documentation:"Fetches connections matching the given criteria from POST /api/get-connection-between.\n\nAccepts an array so multiple independent queries can be resolved in one HTTP request.\nEach item in the array is resolved independently by the backend; results are returned\nin the same order with `connectionIds` and the resolved `typeId` populated.\n\n**Supported query permutations (per item):**\n1. `ofTheConceptId` + `toTheConceptId` + `type` — connections between two specific concepts of that type\n2. `ofTheConceptId` + `type` — all connections FROM a concept of that type\n3. `toTheConceptId` + `type` — all connections TO a concept of that type\n4. `typeId` + `isComposition: true` — all internal connections of a composition\n\nFields not relevant to the chosen permutation should be left at their zero/empty defaults.\nUse {@link buildFetchConnection} to build items without specifying every field manually.\n\nParam: fetchConnections - Array of query objects; each item is resolved independently.\nReturns: The same array with `connectionIds` and resolved `typeId` populated by the backend.\nReturns an empty array on error (error is logged internally)."},GetFreeschemaImage:{parameters:["url","format"],documentation:"Param: url this is the url of the image that you have. This image will be cached in the cache server\nParam: format this is the format it can be either normal , small, by default it is normal\n@returns"},GetFreeschemaImageUrl:{parameters:["url","format"],documentation:"Param: url this is the url of the image that you have. This image will be cached in the cache server\nParam: format this is the format it can be either normal , small, by default it is normal\n@returns"},GetImageApi:{parameters:["imageName"],documentation:"Retrieves an image by name from the cached images endpoint.\nReturns a readable stream for the image data.\n\nParam: imageName - Name/identifier of the image to retrieve\nReturns: Promise resolving to ReadableStream of image data, or null/undefined on error\n@throws Image stream on error (legacy behavior)"},GetLink:{parameters:["id","linker","inpage","page"]},GetLinkListListener:{parameters:["searchStructure","searchQuery","token","format"],documentation:"Creates an observable that tracks search results with complex query conditions and updates subscribers when results change.\nParam: searchStructure - Defines composition and linker types for the search\nParam: searchQuery - Array of query conditions to filter results\nParam: token - Authentication token\nParam: format - Output format (DATAID, NORMAL)\nReturns: Observable instance for the search results"},GetLinkListener:{parameters:["id","linker","inpage","page","format"],documentation:"Creates an observable that tracks linked concepts and updates subscribers when links change.\nParam: id - The source concept ID whose links to retrieve\nParam: linker - The linker type name defining the relationship\nParam: inpage - Number of items per page\nParam: page - Page number (1-indexed)\nParam: format - Output format (NORMAL, DATAID, JUSTDATA, DATAIDDATE)\nReturns: Observable instance for the linked concepts"},GetLinkRaw:{parameters:["id","linker","inpage","page"]},GetLinkerConnectionFromConcepts:{parameters:["id"]},GetLinkerConnectionToConcepts:{parameters:["id"]},GetRelation:{parameters:["id","relation","inpage","page","reverse"]},GetRelationLocal:{parameters:["id","relation","userId"],documentation:'Retrieves all related compositions from local storage by relation name.\n\n**Process Flow (Complex Logic)**:\n1. Converts relation string to type concept (e.g., "the_email" → type concept)\n2. Finds all connections from source concept with that relation type\n3. For each connection, retrieves the target composition\n4. Returns array of all related compositions\n\nParam: id - The source concept ID to get relations from\nParam: relation - The relation name (e.g., "the_email", "the_address")\nParam: userId - User ID for permissions\nReturns: Array of composition objects representing related entities\n@throws Error if relation lookup or composition retrieval fails'},GetRelationNew:{parameters:["id","relation","inpage","page","reverse"]},GetRelationRaw:{parameters:["id","relation","inpage","page","reverse"]},GetTheConcept:{parameters:["id","userId"],documentation:"Retrieves a concept by its ID with intelligent caching and multi-source lookup.\n\nThis is the primary function for fetching concepts in the system. It implements a sophisticated\nmulti-level retrieval strategy:\n\n**Retrieval Strategy:**\n1. Checks in-memory promise cache to prevent duplicate requests\n2. For negative IDs: Fetches from local IndexedDB (LocalConceptsData)\n3. For positive IDs: Checks local ConceptsData cache first\n4. If not in cache: Fetches from backend API\n5. Automatically resolves and attaches the concept's type information\n6. Routes through service worker if enabled for better performance\n\n**Features:**\n- Promise caching prevents duplicate concurrent requests for the same concept\n- Automatic type resolution (fetches and attaches type concept)\n- Access tracking integration (increments access counter if enabled)\n- Service worker support for background processing\n- Error logging and performance monitoring\n- Supports both server concepts (positive IDs) and local concepts (negative IDs)\n\nParam: id - The unique identifier of the concept to retrieve.\nPositive IDs = server concepts, Negative IDs = local-only concepts\nParam: userId - The ID of the user requesting the concept. Used for access tracking\nand audit logging. Defaults to 999 (system/anonymous user)\n\nReturns: Promise resolving to the Concept object if found, or a default empty Concept if not found"},GetTheConceptLocal:{parameters:["id"],documentation:"Retrieves a concept by ID with support for both local (virtual) and server concepts.\n\nThis is the primary function for fetching concepts in offline/local mode. It intelligently\nhandles three types of concept IDs and retrieves from appropriate sources:\n\n**ID Types Handled:**\n1. **Negative IDs (Virtual/Local)**: Concepts created locally not yet synced\n- Stored in LocalConceptsData (IndexedDB)\n- Return negative IDs\n\n2. **Synced Virtual IDs**: Originally local concepts now synced to backend\n- Looked up via LocalGhostIdTree (maps negative to positive IDs)\n- Returns positive (real) ID with ghostId reference\n\n3. **Positive IDs (Server)**: Real backend concepts\n- Fetched via GetTheConcept from backend\n- Converted to LConcept format\n- May have undefined ghostId\n\n**Retrieval Strategy:**\n- If id < 0: Check LocalConceptsData → Check LocalGhostIdTree\n- If id >= 0: Fetch from backend → Convert to LConcept\n- Routes through service worker if enabled\n- Returns default empty concept if not found\n\n**Ghost ID System:**\n- ghostId: Original negative ID (preserved after sync)\n- id: Current ID (negative if local, positive if synced)\n- LocalGhostIdTree maintains the mapping\n\nParam: id - The concept ID to retrieve. Can be:\n- Negative (e.g., -12345) for local-only concepts\n- Positive (e.g., 789) for server concepts\n\nReturns: Promise resolving to a Concept object in LConcept format.\nReturns default concept (id=0) if not found."},GetUserGhostId:{parameters:["userId","ghostId","sessionId"]},LConcept:{parameters:["id","userId","typeId","categoryId","accessId","characterValue","typeCharacter","isNew","entryTimeStamp","updatedTimeStamp","referentId"]},LConnection:{parameters:["id","ofTheConceptId","toTheConceptId","typeId","orderId","accessId"]},LocalConceptsData:{parameters:[]},LocalSyncData:{parameters:[]},LocalTransaction:{parameters:[]},LogEvent:{parameters:["EventName","EventDescription","event"]},Logger:{parameters:[]},LoginToBackend:{parameters:["email","password","application"],documentation:"Authenticates a user with the backend API and obtains an access token.\n\nThis is the primary authentication function that validates user credentials against the backend\nserver and retrieves a JWT bearer token for subsequent API requests.\n\n**Authentication Flow:**\n1. Sends email and password to backend login endpoint\n2. Receives JWT token in response\n3. Automatically stores token in TokenStorage.BearerAccessToken\n4. Token is used for all subsequent authenticated API calls\n5. Logs the authentication attempt for audit purposes\n\n**Features:**\n- Automatic token storage (no manual handling required)\n- Error handling and logging\n- Application-specific authentication\n- Performance and audit logging\n\n**Security Notes:**\n- Credentials are sent over HTTPS (ensure BaseUrl uses HTTPS)\n- Token is stored in memory (TokenStorage)\n- Token should be refreshed before expiration\n- Never log or expose the token in client-side code\n\nParam: email - The user's email address. Must be a valid registered email.\nUsed as the primary login identifier.\nParam: password - The user's password. Sent to backend for verification.\nShould meet password complexity requirements.\nParam: application - The application identifier for multi-tenant authentication.\nDefaults to \"boomconsole.com\". Used to scope authentication\nto specific applications in the system.\n\nReturns: Promise resolving to the authentication result object containing:\n- data.token: The JWT bearer token\n- user information\n- session details\nReturns undefined on error"},MakeTheInstanceConcept:{parameters:["type","referent","composition","userId","passedAccessId","passedSessionId","referentId"],documentation:"This is the basic function of the concept connection system. This function let's you create a concept within the constraints of the\nconcept connection system. This function is the building block of the concept connection system.\nParam: type this is the type of the concept. You can also think of this as the key of concept. first_name, last_name etc.\nParam: referent the actual value of the concept. The actual name of value of the concept.\nParam: composition this is a boolean that defines if the concept is a composition or not. If this is a composition then other things are also\nconnected internally with this concept. If composition is true then always a new concept is created otherwise it checks if the concept already exists\nand creates only in the case that the concept does not already exists with its type and value as its unique identifier.\nParam: userId the userId of the creator.\nParam: passedAccessId this is the accessId of the creator. By default should be 4.\nParam: passedSessionId this is the session that is created by the system.\nParam: referentId In case we need this concept to refer to any other concept.\nReturns: a concept which is either newly created or an older concept that already exists."},MakeTheInstanceConceptLocal:{parameters:["type","referent","composition","userId","accessId","sessionInformationId","referentId","actions"],documentation:'Creates or retrieves an instance concept locally - the core building block of the concept-connection system.\n\nThis is THE fundamental function for creating concepts in local storage. It implements an intelligent\nget-or-create pattern that checks for existing concepts before creating new ones, preventing duplicates\nwhile supporting both unique instances and composition concepts.\n\n**Core Behaviors:**\n1. **Composition Mode (composition=true)**: Always creates a new concept\n- Used for containers/objects that need unique instances\n- Marks concept with isComposition flag\n- Example: Each "Project" is unique, even with same name\n\n2. **Instance Mode (composition=false)**: Get-or-create pattern\n- Checks if concept with same type and value exists\n- Returns existing if found (deduplication)\n- Creates new only if not found\n- Example: "Published" status concept reused across items\n\n3. **Long Text Handling**: Values >255 characters always create new\n- Prevents expensive lookups on large text\n- Each long text gets unique concept\n\n**Type String Processing:**\n- **Best Practice**: Always pass type with "the_" prefix (e.g., "the_name", "the_email")\n- Auto-correction: If missing, "the_" is automatically added internally\n- "name" → "the_name" (auto-corrected)\n- "email" → "the_email" (auto-corrected)\n- "the_status" → "the_status" (already correct)\n- Creates type concept if it doesn\'t exist\n- **Recommendation**: Use explicit "the_" prefix for code clarity and consistency\n\n**Sync and Storage:**\n- Adds concept to LocalSyncData queue for backend sync\n- Stores in LocalConceptsData (IndexedDB)\n- Tracks in actions parameter for batch operations\n- Assigns negative ID (virtual/local)\n\n**Process Flow:**\n1. Normalizes type string (adds "the_" prefix)\n2. Creates/retrieves type concept via MakeTheTypeConceptLocal\n3. If composition=true: Creates new concept immediately\n4. If referent length >255: Creates new concept\n5. If regular instance: Checks for existing by type+value\n6. Returns existing or creates new\n7. Attaches type information\n8. Adds to sync queue\n\nParam: type - The type/key of the concept. **Should follow the format "the_xyz"**.\nRepresents what kind of data this is.\nExamples: "the_name", "the_email", "the_status", "the_first_name"\n\n**Note**: If you pass without "the_" prefix (e.g., "name"), the code will\nautomatically add it internally (becomes "the_name"). However, best practice\nis to always include the "the_" prefix for clarity and consistency.\n\nParam: referent - The actual value/content of the concept.\nThe human-readable data (e.g., "Alice", "alice@example.com", "Active").\nCan be empty string for composition concepts.\n\nParam: composition - Boolean flag determining creation behavior.\n- true: Always creates new concept (unique instances)\n- false: Get-or-create pattern (reuses existing)\nDefaults to false.\n\nParam: userId - The ID of the user creating this concept. Used for ownership and permissions.\n\nParam: accessId - Access control level. Typically 4 (default internal access).\nControls who can view/modify this concept.\n\nParam: sessionInformationId - Session identifier for tracking. Defaults to 999 (system).\nUsed for audit logging and session management.\n\nParam: referentId - Optional reference to another concept ID.\nUsed when this concept is an instance of or refers to another concept.\nDefaults to 0 (no reference).\n\nParam: actions - Action tracking object that accumulates all created concepts and connections.\nUsed for batch operations, rollback, and sync management.\nStructure: { concepts: Concept[], connections: Connection[] }\n\nReturns: Promise resolving to the created or retrieved Concept object with:\n- Negative ID if newly created locally\n- Attached type information (concept.type)\n- All standard concept properties'},MakeTheTimestamp:{parameters:["type","referent","userId","accessId","sessionInformationId"]},MakeTheTypeConceptApi:{parameters:["type","userId"],documentation:'This function is used to check the type concpet of a passed string\nif the text is "the_person" then the function finds the related concept\nParam: type This is the type of the concept that needs to be created.\nParam: userId This is the userId of the creator.\nReturns: the concept created.'},MakeTheTypeConceptLocal:{parameters:["typeString","sessionId","sessionUserId","userId","actions"],documentation:'Creates or retrieves a type concept locally - handles hierarchical type system.\n\nType concepts are placeholders/templates (e.g., "the_first_name", "the_email") that define\nwhat kind of data a concept represents. They have no actual value themselves.\n\n**Hierarchical Processing (Complex Logic)**:\n- Single word (e.g., "status"): Creates simple type concept with typeId=51\n- Compound words (e.g., "the_person_email"): Splits into parts and creates hierarchy:\n1. Creates category concept from first part ("the_person")\n2. Creates type concept from second part ("email")\n3. Creates final concept with category and type linked\n**Uses recursion** to build multi-level type hierarchies\n\nAlways checks for existing type concept before creating to prevent duplicates.\n\nParam: typeString - The type name to create (e.g., "the_status", "the_person_email")\nParam: sessionId - Session identifier (typically 999)\nParam: sessionUserId - Session user ID (typically 999, not used)\nParam: userId - User creating the type concept\nParam: actions - Action tracking for batch operations\nReturns: Type Concept (existing or newly created)'},PatcherStructure:{parameters:[]},Prototype:{parameters:[]},RecursiveSearchApi:{parameters:["composition","listLinkers","textSearch","fullLinkers"],documentation:'Performs recursive search through composition hierarchy.\nSearches through nested compositions using linker relationships.\n\n**Complex Logic**: Constructs SearchQuery, fetches composition IDs and connections,\nprocesses internal/external connections, and builds composition objects from results.\n\nParam: composition - Root composition ID to start search from (default: 0)\nParam: listLinkers - Array of linker strings to traverse (default: [])\nParam: textSearch - Text search filter (default: "")\nParam: fullLinkers - Array of full linker paths (default: [])\nReturns: Array of composition objects with connections'},RecursiveSearchApiNewRawFullLinker:{parameters:["composition","fullLinkers","textSearch"],documentation:'New version of recursive search with full linker paths.\nAlternative implementation of RecursiveSearchApiRawFullLinker.\n\nParam: composition - Root composition ID (default: 0)\nParam: fullLinkers - Array of complete linker path strings (default: [])\nParam: textSearch - Text search filter (default: "")\nReturns: Raw API response object with compositionIds and connections'},RecursiveSearchApiRaw:{parameters:["composition","listLinkers","textSearch","fullLinkers"],documentation:'Performs recursive search returning raw API response.\nReturns unprocessed result with composition IDs and connection arrays.\n\nParam: composition - Root composition ID (default: 0)\nParam: listLinkers - Array of linker strings (default: [])\nParam: textSearch - Text search filter (default: "")\nParam: fullLinkers - Array of full linker paths (default: [])\nReturns: Raw API response object with compositionIds, internalConnections, externalConnections'},RecursiveSearchApiRawFullLinker:{parameters:["composition","fullLinkers","textSearch"],documentation:'Performs recursive search using full linker paths, returning raw response.\nUses complete linker path specifications instead of partial linkers.\n\nParam: composition - Root composition ID (default: 0)\nParam: fullLinkers - Array of complete linker path strings (default: [])\nParam: textSearch - Text search filter (default: "")\nReturns: Raw API response object with compositionIds and connections'},RecursiveSearchApiWithInternalConnections:{parameters:["composition","listLinkers","textSearch"],documentation:'Performs recursive search returning results with internal connections.\nSimilar to RecursiveSearchApi but uses different connection formatting.\n\nParam: composition - Root composition ID to start search from (default: 0)\nParam: listLinkers - Array of linker strings to traverse (default: [])\nParam: textSearch - Text search filter (default: "")\nReturns: Array of composition objects with internal connections'},RecursiveSearchListener:{parameters:["id","linkers","searchText","format"],documentation:"Creates an observable that performs recursive multi-level searches and updates subscribers when results change.\nParam: id - The starting concept ID for the recursive search\nParam: linkers - Array of linker type names defining the traversal path\nParam: searchText - Optional text to search for in linked concepts\nParam: format - Output format (RAW for raw IDs, undefined for formatted compositions)\nReturns: Observable instance for the recursive search"},SchemaQuery:{parameters:["query","token"],documentation:"Executes a free-schema query once without creating a subscription.\nParam: query - FreeschemaQuery object with search parameters\nParam: token - Authentication token\nReturns: Promise resolving to formatted query results"},SchemaQueryListener:{parameters:["query","token"],documentation:"Creates an observable that executes a free-schema query and updates subscribers when results change.\nParam: query - FreeschemaQuery object with search, filter, sort, and pagination parameters\nParam: token - Authentication token\nReturns: Observable instance for the query results"},SearchAllConcepts:{parameters:["type","search","composition","token","inpage","page"],documentation:'Searches for concepts matching specified criteria with pagination support.\n\nThis is the primary search function for querying concepts in the system. It performs a\nbackend API search with multiple filter parameters and returns paginated results.\n\n**Search Capabilities:**\n- Text-based search on concept character values\n- Type filtering (search within specific concept types)\n- Composition filtering (search within specific compositions)\n- Pagination support (page size and page number)\n- Authenticated requests (requires valid access token)\n\n**Use Cases:**\n- Finding concepts by name or partial text match\n- Filtering results by concept type (e.g., only "Person" concepts)\n- Searching within a specific composition context\n- Building paginated search UIs\n\nParam: type - The type filter for the search. Can be a type name (e.g., "Person", "Document")\nor empty string to search all types. Used to narrow results to specific concept types.\nParam: search - The search query string. Searches against concept character values (names/titles).\nCan be partial matches depending on backend implementation.\nParam: composition - Composition context filter. Can be a composition ID or identifier to limit\nsearch scope to concepts within a specific composition. Use empty string for global search.\nParam: token - The JWT authentication token. Required for authorized access to backend search API.\nShould be the BearerAccessToken from TokenStorage.\nParam: inpage - Number of results per page. Controls page size for pagination. Defaults to 10.\nMust be a positive integer.\nParam: page - The page number to retrieve (1-indexed). Defaults to 1 (first page).\nUse for pagination: page 1, page 2, etc.\n\nReturns: Promise resolving to an array of matching Concept objects, or empty array on error/no results'},SearchLinkInternal:{parameters:["searchQuery","token"]},SearchLinkInternalAll:{parameters:["searchQuery","token"]},SearchLinkMultipleAll:{parameters:["searchQuery","token","caller","format"]},SearchLinkMultipleAllObservable:{parameters:["searchQuery","token","format"],documentation:"Creates a new multi-search observable.\nParam: searchQuery - Array of SearchQuery objects defining search conditions\nParam: token - Authentication token\nParam: format - Output format (DATAID by default)"},SearchLinkMultipleApi:{parameters:["searchQuery","token"],documentation:"Searches for concepts using multiple linked queries with performance tracking.\nExecutes complex multi-criteria searches across concept relationships.\n\nParam: searchQuery - Array of SearchQuery objects defining linked search criteria\nParam: token - Authentication token (optional, defaults to empty string)\nReturns: Array of search results or empty array on error"},SearchQuery:{parameters:[]},SearchStructure:{parameters:[]},SearchWithLinker:{parameters:["searchQuery","token"],documentation:"Searches concepts using multiple linker queries with authentication.\nAllows complex searches by combining multiple search query conditions.\n\nParam: searchQuery - Array of search query objects defining search criteria\nParam: token - Authentication token (optional, defaults to empty string)\nReturns: Array of matching search results or empty array on error"},SearchWithTypeAndLinker:{parameters:["searchStructure","searchQuery","token"],documentation:"This function will help you search a concept by their type and also to query inside of it.\nPut the number of compositions you want to get in the searchStructure which can be set by inpage and page\nThen the type should be set in searchQuery for the compositionName.\nInside the searchQuery array this you can set the full linker / listLinker in the searchQuery.\nThis will not give the id of the structures."},SearchWithTypeAndLinkerApi:{parameters:["searchStructure","searchQuery","token"],documentation:"Searches concepts by type with additional linker query filters.\nCombines type-based search with linker queries for refined results.\n\n**Complex Logic**: Constructs URL with search structure parameters, then applies\nlinker queries as POST body for multi-dimensional filtering.\n\nParam: searchStructure - Structure containing search text, type, pagination, and auth flag\nParam: searchQuery - Array of linker query objects for additional filtering\nParam: token - Authentication token (optional, defaults to empty string)\nReturns: Array of concepts matching both type and linker criteria, or empty array on error"},Selector:{parameters:["mainType","selector","parentElement","filterType","inpage"]},SessionData:{parameters:[]},Signin:{parameters:["signinInfo"],documentation:"Alternative sign-in function using SigninModel structure.\n\nSimilar to LoginToBackend but returns FreeschemaResponse format and\ndoes NOT automatically store the token. You must manually handle the token.\n\nParam: signinInfo - SigninModel object containing email and password\nReturns: FreeschemaResponse with {status, statusCode, message, data} structure\ndata contains user information and token (not auto-stored)"},Signup:{parameters:["signupModel"],documentation:"Registers a new user account on the backend server.\n\nCreates a new user with provided signup information including email, password,\nusername, and profile details.\n\nParam: signupModel - SignupModel object containing:\n- email: User's email address\n- password: User's password\n- username: Unique username\n- fname: First name\n- lname: Last name\n- title: Title/gender\n- type: User type\nReturns: FreeschemaResponse with signup result (status, message, data)"},SignupEntity:{parameters:["signupData"],documentation:"Registers a new entity (organization/company account) on the backend.\n\nCreates entity-type accounts (different from regular user accounts).\nIncludes timestamp for registration tracking.\n\nParam: signupData - Signup data object containing:\n- type: Entity type\n- username: Unique username\n- title: Title/designation\n- email: Entity email\n- password: Account password\n- timestamp: Registration timestamp (ISO string)\n- fname: First name / Entity name\n- lname: Last name / Additional info\nReturns: Response JSON with entity creation result\n@throws Error if signup fails (404, 500, or other HTTP errors)"},SplitStrings:{parameters:["typeString"]},StatefulWidget:{parameters:[],documentation:"Stateful widget with lifecycle management and hierarchical composition.\n\nProvides a React-like component system with state management, lifecycle hooks,\nand parent-child widget relationships. Extend this class to create custom widgets\ncompatible with the concept connection system."},SyncData:{parameters:[]},TokenStorage:{parameters:[]},TrashTheConcept:{parameters:["id","token"],documentation:"Deletes (trashes) a concept from the backend with explicit token auth.\n\nAlternative delete function that requires manual token passing.\nSimilar to DeleteTheConcept but with explicit authentication parameter.\n\nParam: id - The concept ID to delete\nParam: token - Bearer authentication token\n@throws Error if deletion fails"},UpdateComposition:{parameters:["patcherStructure"]},UpdateCompositionLocal:{parameters:["patcherStructure","actions"],documentation:"Updates/patches a composition in local storage with new or modified properties.\n\n**Complex Patching Logic** (197 lines):\n1. Fetches latest composition data from backend (all connections and concepts)\n2. Iterates through patchObject properties to add/update\n3. For each property:\n- If value is object/array: Creates composition concept and nested composition\n- If value is primitive: Creates instance concept with value\n- Checks if concept type already exists in composition\n- If exists: Marks old connections for deletion (replaces old value)\n- If new: Simply adds new connection\n4. Creates connections between parent composition and new/updated concepts\n5. Deletes old connections (cleanup)\n6. Syncs changes to backend\n\n**Use Case**: Updating fields in an existing composition without recreating it entirely.\n\nParam: patcherStructure - Object containing:\n- compositionId: The composition to update\n- ofTheCompositionId: Optional parent composition for nested updates\n- patchObject: Object with key-value pairs to add/update\n- userId, sessionId, accessId: User context\nParam: actions - Action tracking for batch operations and rollback"},UserBinaryTree:{parameters:[]},Validator:{parameters:[]},ViewInternalData:{parameters:["ids"]},ViewInternalDataApi:{parameters:["ids"],documentation:"Retrieves internal data (connections and concepts) for multiple compositions.\nReturns a dictionary mapping composition IDs to their internal connection arrays.\n\n**Complex Logic**: For each composition ID, fetches connections and related concepts,\nbuilds a dictionary structure, and bulk-loads concepts for efficiency.\n\nParam: ids - Array of composition IDs to fetch internal data for\nReturns: Dictionary mapping composition ID to Connection arrays, or empty array on error"},WidgetTree:{parameters:[],documentation:"Hierarchical widget tree structure for nested widget composition.\n\nRepresents a widget and its complete metadata including HTML, styles, scripts,\nlifecycle hooks, and child widgets. Used for building complex widget hierarchies."},buildFetchConnection:{parameters:["query"],documentation:"Builds a complete FetchConnection request object from a partial query,\nfilling unspecified fields with their zero/empty defaults.\n\nUse this instead of constructing FetchConnection manually so you only\nneed to specify the fields relevant to your query permutation.\n\nParam: query - Partial query with only the fields you need.\nReturns: A fully initialised FetchConnection ready to send to the API."},clearAllCaches:{parameters:[],documentation:"Clears all application caches (both in-memory and IndexedDB).\n\nCall this on user logout or when you need to force-refresh all cached data.\nClears widget caches (standard, latest, recent) and query caches."},convertFromConceptToLConcept:{parameters:["concept"]},convertFromLConceptToConcept:{parameters:["lconcept"]},convertWidgetTreeToWidget:{parameters:["tree","parentElement","isMain","props","state","parentWidget"],documentation:"Converts a widget tree structure into live widget instances and mounts to DOM.\n\nRecursively instantiates widgets from tree data, sets up parent-child relationships,\napplies styles, and mounts to the specified parent element.\n\nParam: tree - The widget tree to convert\nParam: parentElement - DOM element to mount the widget to\nParam: isMain - Whether this is the main/root widget\nParam: props - Optional properties to pass to the widget\nParam: state - Optional state data to pass to the widget\nParam: parentWidget - Parent widget instance for context\nReturns: Promise resolving to the instantiated widget"},convertWidgetTreeToWidgetWithWrapper:{parameters:["tree","parentElement","isMain","state","isInDevelopment","parentWidget"],documentation:"Converts widget tree to widget instances with development mode wrapper support.\n\nSimilar to convertWidgetTreeToWidget but includes development mode features\nlike visual editing and type selection.\n\nParam: tree - The widget tree to convert\nParam: parentElement - DOM element to mount the widget to\nParam: isMain - Whether this is the main/root widget\nParam: state - Optional state data to pass to the widget\nParam: isInDevelopment - Enable development mode features\nParam: parentWidget - Parent widget instance for context\nReturns: Promise resolving to the instantiated widget"},createFormFieldData:{parameters:["fieldName"]},createPrototypeLocal:{parameters:["prototype","passedTransaction"]},dispatchIdEvent:{parameters:["id","data"],documentation:"Method to dispatch Event received from SW\nParam: id number|string\nParam: data any"},getFromDatabaseWithType:{parameters:["databaseName","type","id"]},getObjectsFromIndexDb:{parameters:["databaseName"]},getTsccsAutocompleteMetadata:{parameters:[]},getUploadFileLimit:{parameters:[]},getUserDetails:{parameters:[],documentation:'Returns user details synchronously.\nPriority: in-memory profileCache (encrypted) → legacy localStorage("profile") fallback.'},getWidgetBulkFromId:{parameters:["widgetId","visitedWidgets","bulkWidget","token"],documentation:"Builds a complete widget tree from bulk widget data.\n\nRecursively processes widget hierarchy including children, custom functions,\nlibraries, and lifecycle hooks to create a full WidgetTree structure.\n\nParam: widgetId - The widget ID to build tree for\nParam: visitedWidgets - Array tracking visited widgets to prevent cycles\nParam: bulkWidget - Bulk widget data from backend\nParam: token - Optional authentication token\nReturns: Promise resolving to the complete widget tree"},getWidgetFromId:{parameters:["widgetId","visitedWidgets","token"],documentation:"Fetches and builds a complete widget tree from a widget ID.\n\nParam: widgetId - The widget ID to fetch\nParam: visitedWidgets - Array to track visited widgets (prevents cycles)\nParam: token - Optional authentication token\nReturns: Promise resolving to the widget tree"},importLatestWidget:{parameters:["widgetId","attachNode","props","showDocumentation"],documentation:"Imports the latest version of a widget into cache for later rendering.\n\nFetches widget data, builds widget tree, and stores in DataCache.\nUsed for pre-loading widgets before rendering.\n\nParam: widgetId - The widget origin ID to import\nParam: attachNode - Optional DOM element (for future use)\nParam: props - Optional properties to pass to the widget\nParam: showDocumentation - Whether to show documentation button\nReturns: Promise resolving to the widget tree"},importRecentWidget:{parameters:["widgetId","attachNode","props","showDocumentation"],documentation:"Imports the latest version of a widget into cache for later rendering.\n\nFetches widget data, builds widget tree, and stores in DataCache.\nUsed for pre-loading widgets before rendering.\n\nParam: widgetId - The widget origin ID to import\nParam: attachNode - Optional DOM element (for future use)\nParam: props - Optional properties to pass to the widget\nParam: showDocumentation - Whether to show documentation button\nReturns: Promise resolving to the widget tree"},init:{parameters:["url","aiurl","accessToken","nodeUrl","enableAi","applicationName","enableSW","flags","parameters"],documentation:'Initializes the mftsccs-browser package and sets up all required subsystems.\n\nThis is the FIRST function you must call before using any other functionality in the package.\nIt configures the backend connections, initializes local databases, sets up service workers,\nand prepares the system for concept and connection operations.\n\n**Initialization Process:**\n1. Configures Base URLs for backend, AI, and node servers\n2. Sets up access token for authenticated requests\n3. Generates unique application randomizer for IndexedDB identification\n4. Initializes feature flags (logging, access tracking, etc.)\n5. Checks for service worker support\n6. Initializes local IndexedDB databases for caching\n7. Sets up message listeners for service worker communication\n8. Optionally registers and activates service worker\n9. Falls back to main thread if service worker unavailable\n\n**Subsystems Initialized:**\n- IndexedDB databases (concepts, connections, settings)\n- Service worker (if enabled and supported)\n- Message passing between main thread and service worker\n- Broadcast channel for cross-tab communication\n- Access token storage\n- Logging and monitoring systems\n- Access tracking (if enabled)\n\nParam: url - The backend API base URL (C# data fabric server).\nThis is the primary server for concept and connection data.\nExample: "https://api.example.com" or "https://backend.yourdomain.com"\n**Required** for most operations.\n\nParam: aiurl - The AI service URL for AI-powered features and data preloading.\nIf not using AI features, pass empty string and set enableAi to false.\nExample: "https://ai.example.com"\n\nParam: accessToken - JWT bearer token for authenticated API requests.\nCan be empty string on initialization - set later with updateAccessToken().\nToken is obtained through LoginToBackend() or Signin().\nExample: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."\n\nParam: nodeUrl - The Node.js server URL for business logic and security features.\nUsed for additional server-side operations.\nExample: "https://node.example.com"\n\nParam: enableAi - Flag to enable/disable AI features and AI data preloading to IndexedDB.\nSet to false if not using AI features or if aiurl is not provided.\nDefault: true\n\nParam: applicationName - Unique identifier for your application.\nUsed to create separate IndexedDB instances for different apps.\nExample: "my-app-v1", "project-manager", "knowledge-base"\nUseful when multiple applications share the same domain.\n\nParam: enableSW - Service worker configuration object. Service worker enables background\nprocessing for better performance and offline capabilities.\n- activate: boolean - Enable/disable service worker\n- scope: string (optional) - Service worker scope path (default: "/")\n- pathToSW: string (optional) - Path to service worker file (default: "/service-worker.js")\n- manual: boolean (optional) - If true, assumes SW already registered manually\nExample: {activate: true, scope: "/", pathToSW: "/sw.js"}\n\nParam: flags - Feature flags object for enabling/disabling various features:\n- logApplication: boolean - Enable application-level logging\n- logPackage: boolean - Enable package-level logging\n- accessTracker: boolean - Enable access tracking/analytics\n- isTest: boolean - Mark as test environment\nAll default to false if not specified.\n\nParam: parameters - Additional configuration parameters:\n- logserver: string - Custom log server URL (default: "https://logdev.freeschema.com")\n- isPwa: boolean - Enable PWA offline persistence to IndexedDB (default: false)\n- enableCache: boolean - Enable/disable widget and FreeschemaQuery caching.\nWhen false, QueryCacheManager and WidgetCacheManager skip all reads and writes\n(memory and IndexedDB). Stored in Environments under key \'enableCache\' so it\ncan be read or changed at runtime via Environments.getValue/setValue.\nDefault: true.\n\nReturns: Promise<boolean> - Returns true if initialization succeeds, undefined if it fails.\nOn failure, falls back to main thread operation and logs warnings.'},orderTheConnections:{parameters:["connections","order"]},recursiveFetch:{parameters:["id","connectionList","compositionList","visitedConcepts"],documentation:"## Format justdata ##\nParam: id\nParam: connectionList\nParam: compositionList\nParam: visitedConcepts\n@returns"},recursiveFetchNew:{parameters:["id","connectionList","conceptList","compositionList","visitedConcepts"]},removeAllChildren:{parameters:["parent"]},renderImportedWidget:{parameters:["widgetId","attachNode","props","showDocumentation"],documentation:"Renders a previously imported widget from cache.\n\nRetrieves widget tree from DataCache and renders it to the DOM.\nMust call importLatestWidget() first to populate cache.\n\nParam: widgetId - The widget origin ID to render\nParam: attachNode - DOM element to attach the widget to\nParam: props - Optional properties to pass to the widget\nParam: showDocumentation - Whether to show documentation button\nReturns: Promise resolving to the rendered widget instance"},renderLatestWidget:{parameters:["widgetId","attachNode","props","showDocumentation"],documentation:'Renders the latest published version of a widget.\n\nFetches and renders the most recent version of a widget by origin ID.\nAutomatically handles "use latest" flag for child widgets.\n\nParam: widgetId - The widget origin ID to render\nParam: attachNode - DOM element to attach the widget to\nParam: props - Optional properties to pass to the widget\nParam: showDocumentation - Whether to show documentation button'},renderPage:{parameters:["pageId","attachNode","props","showDocumentation"],documentation:"Renders a complete page with its widgets and properties.\n\nFetches page data, applies page-level properties (meta tags, styles), and renders\nthe page body widget. Adds fspage class for styling.\n\nParam: pageId - The page concept ID to render\nParam: attachNode - DOM element to attach the page to\nParam: props - Optional properties to pass to the page widget\nParam: showDocumentation - Whether to show documentation button"},renderWidget:{parameters:["widgetId","attachNode","props","showDocumentation"],documentation:"Renders a specific widget by ID.\n\nFetches widget data and renders the exact version specified (not latest).\n\nParam: widgetId - The specific widget ID to render\nParam: attachNode - DOM element to attach the widget to\nParam: props - Optional properties to pass to the widget\nParam: showDocumentation - Whether to show documentation button\nReturns: Promise resolving to the rendered widget instance"},searchLinkMultipleListener:{parameters:["searchQueries","token","format"],documentation:"Creates an observable that executes multiple search queries and updates subscribers when results change.\nParam: searchQueries - Array of SearchQuery objects defining search conditions\nParam: token - Authentication token\nParam: format - Output format (DATAID by default)\nReturns: Observable instance for the search results"},sendEmail:{parameters:["body","token","bulk"]},sendMessage:{parameters:["type","payload","retryCount"],documentation:"Method to send message to the service worker from main thread\nParam: type string\nParam: payload any\nReturns: Promise<any>"},setHasActivatedSW:{parameters:["value"]},storeToDatabase:{parameters:["databaseName","object"]},unwrapContainers:{parameters:["parentElement","selector"],documentation:"Recursively unwraps all matching container elements within a parent.\n\nParam: parentElement - Parent element to search within\nParam: selector - CSS selector for containers to unwrap"},updateAccessToken:{parameters:["accessToken","session"],documentation:'Updates the JWT access token used for authenticated API requests.\n\nThis function should be called after user authentication to set or update the bearer token\nthat will be used for all subsequent authenticated operations. The token is stored in\nTokenStorage and automatically included in API request headers.\n\n**When to Use:**\n- After successful login (LoginToBackend or Signin)\n- When refreshing an expired token\n- When switching between user sessions\n- When restoring a saved session on app reload\n\n**Token Flow:**\n1. User logs in via LoginToBackend() or Signin()\n2. Backend returns JWT token\n3. Call updateAccessToken() with the token\n4. Token is stored in memory (TokenStorage.BearerAccessToken)\n5. All API calls automatically use this token\n6. If service worker enabled, token is synced to service worker\n\n**Security Notes:**\n- Token is stored in memory only (not persisted to disk)\n- Token is cleared on page refresh (unless you save/restore it)\n- Never expose token in logs or client-side code\n- Token should be refreshed before expiration\n\nParam: accessToken - The JWT bearer token obtained from authentication.\nFormat: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."\nPass empty string to clear the token (logout).\n\nParam: session - Optional session information to sync with token.\nReserved for future use. Currently not fully implemented.\n\nReturns: void'},uploadAttachment:{parameters:["file","token"],documentation:"Generic method to upload file or image\nParam: file File\nReturns: Promise<{message: string, success: boolean, url?: string}>"},uploadFile:{parameters:["body","token"],documentation:"Method to upload file to server\nParam: body FormData\nParam: token string?\nReturns: JSON | string | null"},uploadImage:{parameters:["body","token"],documentation:"Method to upload image to server\nParam: body FormData\nParam: token string?\nReturns: JSON | string | null"},uploadImageV2:{parameters:["body","token"],documentation:"Method to upload image to server\nParam: body FormData\nParam: token string?\nReturns: JSON | string | null"}}};function Oo(){return Ro}const Bo={number:/^\d+(\.\d+)?$/,text:/^[\s\S]*$/,textOnly:/^[A-Za-z\s]+$/,email:/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/,document:/\.(pdf|docx?|pptx?|xlsx?)$/i,sound:/\.(mp3|wav|ogg|flac)$/i,image:/\.(jpg|jpeg|png|gif|bmp|svg|webp)$/i,video:/\.(mp4|avi|mov|mkv|flv|webm)$/i,url:/^(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([/\w .-]*)*\/?$/,date:/^\d{4}-\d{2}-\d{2}$/,time:/^(?:[01]\d|2[0-3]):[0-5]\d$/,password:/^.{6,}$/,ipaddress:/^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$|^([0-9a-fA-F]{1,4}:){7}([0-9a-fA-F]{1,4})$/,uuid:/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/};var Fo=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class Uo{constructor(){Uo.cacheInitialized||Uo.initializeAnomalyParameters()}static initializeAnomalyParameters(){return Fo(this,void 0,void 0,function*(){try{yield Uo.getAnomalyParameters();Uo.refreshCache(),Uo.cacheInitialized=!0}catch(e){}})}static getAnomalyParameters(){return Fo(this,void 0,void 0,function*(){const e=Date.now();if(Uo.anomalyParamsCache&&e-Uo.lastFetchedTime<Uo.cacheExpiryThreshold)return Uo.anomalyParamsCache;try{return yield Uo.fetchAnomalyParameters()}catch(e){throw e}})}static fetchAnomalyParameters(){return Fo(this,void 0,void 0,function*(){try{const e=yield fetch("https://devai.freeschema.com/v1/get-frontend-anomaly-parameters",{method:"GET",headers:{"Content-Type":"application/json"}});if(!e.ok)throw new Error("Failed to fetch anomaly parameters");const t=yield e.json();return Uo.anomalyParamsCache=t.data,Uo.lastFetchedTime=Date.now(),t.data}catch(e){throw e}})}static refreshCache(){return Fo(this,void 0,void 0,function*(){try{Date.now()-Uo.lastFetchedTime>Uo.cacheExpiryThreshold&&(yield Uo.getAnomalyParameters())}catch(e){}})}detectDataType(e){for(const[t,n]of Object.entries(Bo))if(n.test(e))return t;return null}checkConceptAnomaly(e,t){return Fo(this,void 0,void 0,function*(){const n=[];try{if(!t)return n.push("Null value"),{valid:!1,warnings:n};const o=Uo.anomalyParamsCache;e.startsWith("the_")||(e=`the_${e}`);const i=o[e];if(!i)return n.push(`No concept details found for type: ${e}`),{valid:!1,warnings:n};const r=t.length,{min_length:a,max_length:s,data_types:c}=i,l=r>=a&&r<=s,d=this.detectDataType(t),u=c.includes(d);return l||n.push(`Length of '${t}' is outside the allowed range (min: ${a}, max: ${s}). Current length: ${r}.`),u||n.push(`Type mismatch for '${t}'. Expected types: ${c.join(", ")}, detected type: ${d}.`),l&&u&&n.push(`Concept ${e} is valid. Length: ${r}, Type: ${d}`),{valid:l&&u,warnings:n}}catch(e){return{valid:!1,warnings:n}}})}static checkAnomalyInBulk(e){return Fo(this,void 0,void 0,function*(){Uo.cacheInitialized||(yield Uo.initializeAnomalyParameters());try{const t={};for(const[n,o]of Object.entries(e)){const e=o.value,{valid:i,warnings:r}=yield(new Uo).checkConceptAnomaly(n,e);t[n]={valid:i,warnings:r}}return t}catch(e){throw e}})}static getExportedFunction(){return Object.keys(o)}static getFunctionaAnomalyParameters(){}}Uo.anomalyParamsCache=null,Uo.cacheInitialized=!1,Uo.lastFetchedTime=0,Uo.cacheExpiryThreshold=6e5;var Go=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class Mo{checkUniqueness(e,t){return Go(this,void 0,void 0,function*(){const n=mo.V.logfunction("checkUniqueness");e.startsWith("the_")||(e="the_"+e);let o=(yield me(e,999)).id;return!((yield(0,se.A)(t,o)).id>0)&&(mo.V.logUpdate(n),!0)})}validateField(e){return Go(this,void 0,void 0,function*(){var t;const n=mo.V.logfunction("validateField");try{performance.now();const o={},{name:i,value:r,type:a,dataType:s,pattern:c,conceptType:l,maxLength:d,minLength:u,minValue:h,maxValue:p,accept:f,file:m,required:y,isUnique:v}=e;if(!y||null!==r&&""!==r||(o.required=`The field ${i} is required.`),s&&r){let e=Bo[s];e&&""!==r&&!e.test(r)&&(o.dataType=`Invalid value for ${s}`)}if(c&&r){const e="string"==typeof c?new RegExp(c):c;""===r||e.test(r)||(o.pattern="Pattern doesn't match with value")}if(r&&null!=d&&r.length>d&&(o.maxLength=`Length exceeds the maximum length of ${d}`),r&&null!=u&&r.length<u&&(o.minLength=`Length must be at least ${u} characters long`),null!=h&&r&&!isNaN(Number(r))&&Number(r)<h&&(o.minValue=`Value must be greater than or equal to ${h}`),null!=p&&r&&!isNaN(Number(r))&&Number(r)>p&&(o.maxValue=`Value must be less than or equal to ${p}`),m&&a&&f){const e=f.split(",").map(e=>e.trim().toLowerCase()),n=null===(t=m.name.split(".").pop())||void 0===t?void 0:t.toLowerCase();n&&!e.includes(n)&&(o.accept=`File must be a valid file type: ${e.join(", ")}`)}if(l&&v&&r){(yield this.checkUniqueness(l,r))||(o.unique="Value is not unique")}return mo.V.logUpdate(n),o}catch(e){throw(0,p.ey)(n,"Validator.validateField",e),e}})}validateForm(e){return Go(this,void 0,void 0,function*(){const t=mo.V.logfunction("validateForm");try{performance.now();const n={};for(const t in e){const o=yield this.validateField(e[t]);Object.keys(o).length>0&&(n[t]=o)}return mo.V.logUpdate(t),n}catch(e){throw(0,p.ey)(t,"Validator.validateForm",e),e}})}validate(e){const t=mo.V.logfunction("validate");try{let n={};return this.validateField(e).then(e=>{Object.keys(e).length>0?(n.status=!1,n.details=e):n.status=!0}),mo.V.logUpdate(t),n}catch(e){(0,p.ey)(t,"Validator.validate",e)}}}const Wo=e=>{var t;const n=document.getElementsByName(e)[0];if(!n)return{name:null,value:null,type:null,dataType:null,pattern:null,conceptType:null,maxLength:null,minLength:null,minValue:null,maxValue:null,accept:null,file:null,required:!1,isUnique:!0};const o=n.hasAttribute("required")||"true"===n.getAttribute("data-required"),i=n.hasAttribute("isUnique")&&"true"===n.getAttribute("isUnique");return{name:n.name,value:n.value,type:n.type,dataType:n.getAttribute("data-type"),pattern:n.getAttribute("data-pattern"),conceptType:n.getAttribute("concept-type"),maxLength:n.getAttribute("maxlength")?parseInt(n.getAttribute("maxlength")):null,minLength:n.getAttribute("minlength")?parseInt(n.getAttribute("minlength")):null,minValue:n.getAttribute("min")?parseInt(n.getAttribute("min")):null,maxValue:n.getAttribute("max")?parseInt(n.getAttribute("max")):null,accept:n.getAttribute("accept")||null,file:"file"===n.type&&(null===(t=n.files)||void 0===t?void 0:t[0])||null,required:o,isUnique:i}};var jo=n(2289);class Vo{constructor(){this.type="",this.inpage=10,this.page=1,this.concepts=[],this.conceptIds=[],this.selectors=[],this.freeschemaQueries=[],this.filters=[],this.filterLogic="",this.typeConnection="",this.order="DESC",this.outputFormat=_n.yv,this.name="",this.filterAncestor="",this.reverse=!1,this.limit=!1,this.isSecure=!1,this.includeInFilter=!1,this.isOldConnectionType=!1,this.cache=!0}}var qo=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function Ho(e){var t=arguments;return qo(this,arguments,void 0,function*(e,n=""){const o=mo.V.logfunction("FreeschemaQueryApi",t);var i=(0,h.ab)("application/json",n);const r=u.B.FreeschemaQueryUrl(),s=JSON.stringify(e),c=yield a.a.getHash(e),l=!1!==e.cache?a.a.get(c):null;if(l)return fetch(r,{method:"POST",headers:i,body:s}).then(e=>qo(this,void 0,void 0,function*(){if(e.ok){const t=yield e.json();a.a.set(c,t)}else(0,p.ry)(e)})).catch(e=>{(0,p.Mb)(e,r),(0,p.ey)(o,"FreeschemaQueryApi",e)}),l;try{const e=yield fetch(r,{method:"POST",headers:i,body:s});if(e.ok){let t=yield e.json();return a.a.set(c,t),mo.V.logUpdate(o),t}return(0,p.ry)(e),[]}catch(e){(0,p.Mb)(e,r),(0,p.ey)(o,"FreeschemaQueryApi",e)}})}var $o=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class zo extends On.w{constructor(e,t){super(),this.query=new Vo,this.countInfoStrings=[],this.order="DESC",this.totalCount=0,this.unsubscribeCache=null,this.query=e,this.format=e.outputFormat,this.order=e.order,a.a.getHash(e).then(e=>{this.unsubscribeCache=a.a.subscribe(e,e=>$o(this,void 0,void 0,function*(){this.isDataLoaded=!1,yield this.bind(),this.notify()}))})}run(){return $o(this,void 0,void 0,function*(){var e,t;try{this.query.outputFormat=_n.BG,this.compositionIds=[];let n=yield Ho(this.query,"");return this.conceptIds=n.conceptIds,this.internalConnections=null!==(e=n.internalConnections)&&void 0!==e?e:[],this.linkers=null!==(t=n.linkers)&&void 0!==t?t:[],this.reverse=n.reverse,this.compositionIds=n.mainCompositionIds,this.totalCount=n.mainCount,this.countInfoStrings=n.countinfo,yield this.build()}catch(e){throw e}})}bind(){return $o(this,void 0,void 0,function*(){var e,t;try{if(this.compositionIds.length>0)for(let e=0;e<this.compositionIds.length;e++)this.removeListenToEvent(this.compositionIds[e]);if(this.isDataLoaded)for(let e=0;e<this.compositionIds.length;e++)this.listenToEvent(this.compositionIds[e]);else{this.query.outputFormat=_n.BG,this.compositionIds=[];let n=yield Ho(this.query,"");this.conceptIds=n.conceptIds,this.internalConnections=null!==(e=n.internalConnections)&&void 0!==e?e:[],this.linkers=null!==(t=n.linkers)&&void 0!==t?t:[],this.reverse=n.reverse,this.compositionIds=n.mainCompositionIds,this.totalCount=n.mainCount,this.countInfoStrings=n.countinfo}let n=yield this.build();if(!this.isDataLoaded){this.isDataLoaded=!0;for(let e=0;e<this.compositionIds.length;e++)this.listenToEvent(this.compositionIds[e]);if(""!=this.query.type){let e=yield me(this.query.type,999);e.id>0&&this.listenToEventType(e.id)}}for(let e=0;e<this.newIds.length;e++)this.listenToEvent(this.newIds[e]);return this.newIds=[],n}catch(e){throw e}})}build(){return $o(this,void 0,void 0,function*(){try{mo.V.logfunction("build",["schemaquery",this.compositionIds]);let e=(0,Zn.w)(this.countInfoStrings);return this.format==_n.y0?this.data=yield(0,Hn.e$)(this.linkers,this.conceptIds,this.compositionIds,this.reverse,e,this.order):this.format==_n.ZJ?this.data=yield(0,Hn.y6)(this.linkers,this.conceptIds,this.compositionIds,this.reverse,e,this.order):this.format==_n.pU?this.data=yield(0,Hn.rq)(this.linkers,this.conceptIds,this.compositionIds,this.reverse,e,this.order):this.format==_n.XZ?(this.data={},this.data.linkers=this.linkers,this.data.conceptIds=this.conceptIds,this.data.compositionIds=this.compositionIds,this.data.reverse=this.reverse,this.data.countInfos=e,this.data.order=this.order):this.data=yield(0,Hn.b6)(this.linkers,this.conceptIds,this.compositionIds,this.reverse,e),this.data}catch(e){throw e}})}}function Jo(e,t){return new zo(e,t)}function Qo(e,t){return new zo(e,t).execute()}class Yo{constructor(){this.id=0,this.name="",this.html="",this.css="",this.js="",this.library={css:[],js:[]},this.assistant={id:"",input:"",type:""},this.timestamp="",this.widgetId=0,this.type="",this.clean="",this.after_render="",this.before_render="",this.custom_functions=[],this.update="",this.origin=0,this.version=0,this.mount_child="",this.children=[],this.wrapper="0",this.widget=new Lo,this.dependency="",this.root=0}}var Xo=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function Ko(e,t,n){return Xo(this,arguments,void 0,function*(e,t,n,o={concepts:[],connections:[]}){var i,r,a,s,c;const l=mo.V.logfunction("CreateConnectionBetweenEntityLocal",[e.id,t.id,n]);if(rr)try{const c=yield fr("CreateConnectionBetweenEntityLocal",{concept1Data:e,concept2Data:t,linker:n,actions:o});return(null===(r=null===(i=null==c?void 0:c.actions)||void 0===i?void 0:i.concepts)||void 0===r?void 0:r.length)&&(o.concepts=JSON.parse(JSON.stringify(c.actions.concepts))),(null===(s=null===(a=null==c?void 0:c.actions)||void 0===a?void 0:a.connections)||void 0===s?void 0:s.length)&&(o.connections=JSON.parse(JSON.stringify(c.actions.connections))),c.data}catch(e){Cr(e)}const d=e.userId,u=(null===(c=e.type)||void 0===c?void 0:c.characterValue)+"_"+n,h=yield(0,ue.$)(u,999,999,d,o);if(!h)return;const p=yield(0,Zt.F)(e.id,t.id,h.id,1e3,void 0,void 0,o);return mo.V.logUpdate(l),p})}var Zo=n(4310);function ei(){r.i.clearAll(),a.a.clearAll()}function ti(e){for(;e.firstChild;)e.removeChild(e.firstChild)}var ni=n(276);function oi(e,t,n){const o=Oe.b.sessionId||"unknown",i={url:location.href,requestFrom:u.B.BASE_APPLICATION,sessionId:o,description:t};mo.V.logApplication("USER_EVENT",e,i)}class ii extends bo{constructor(e,t,n,o="",i=10){super(),this.inpage=10,this.selector=t,this.mainType=e,this.filterType=o,this.inpage=i,this.parentDomElement=n,this.mount(this.parentDomElement)}before_render(){this.render()}addFilter(e){if(""!=e){let t=new so;t.search=e,t.type=this.filterType,t.logicoperator="like",t.operateon="selector",t.name="selector_filter";let n="( selector_filter )";this.query.filters=[t],this.query.filterLogic=n}else this.query.filters=[],this.query.filterLogic=""}after_render(){let e=this.getElementById("selector"),t=this.getElementById("search-bar"),n=this;t.onchange=()=>{n.addFilter(t.value),n.mainDetails.update()};let o=new Vo;o.type=this.mainType,o.inpage=this.inpage;let i=new Vo;i.typeConnection=this.selector,i.name="selector",o.freeschemaQueries=[i],this.query=o,Jo(this.query,"").subscribe((t,n)=>{let o={};this.mainDetails=n;for(let e=0;e<t.length;e++){let n=t[e],i=n.id,r=n[this.mainType];if(r){let e=r[this.selector];if(e){const t=Object.values(e)[0];o[i]=t}}}ti(e);for(const[t,n]of Object.entries(o)){const o=document.createElement("option");o.value=t,o.textContent=n,e.appendChild(o)}})}getHtml(){const e=document.createElement("style");return e.textContent="\n.search-select-wrapper {\n width: 300px;\n display: flex;\n flex-direction: column;\n gap: 6px;\n font-family: Arial, sans-serif;\n}\n\n#search-bar {\n padding: 8px;\n font-size: 14px;\n border: 1px solid #ccc;\n border-radius: 6px;\n}\n\n#selector {\n padding: 6px;\n font-size: 14px;\n border: 1px solid #ccc;\n border-radius: 6px;\n}\n",document.head.prepend(e),this.html='\n <div class="search-select-wrapper">\n <input type="text" placeholder="Select or type..." id=\'search-bar\'>\n <select id=\'selector\'>\n </div>',this.html}}const ri='\n/* CKEditor content styles */\n.ck-content {\n /* Container styles */\n max-width: 100%;\n margin: 0 auto;\n font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;\n line-height: 1.5;\n padding: 0.75rem;\n background: #fff;\n color: #333;\n border: 1px solid #ccced1;\n}\n\n/* Headings */\n.ck-content h1, .ck-content h2, .ck-content h3, \n.ck-content h4, .ck-content h5, .ck-content h6 {\n font-weight: 700;\n line-height: 1.2;\n margin: 1em 0 0.5em;\n}\n\n.ck-content h1 { font-size: 2.5em; }\n.ck-content h2 { font-size: 2em; }\n.ck-content h3 { font-size: 1.75em; }\n.ck-content h4 { font-size: 1.5em; }\n.ck-content h5 { font-size: 1.25em; }\n.ck-content h6 { font-size: 1em; }\n\n/* Paragraphs and spacing */\n.ck-content p {\n margin: 1em 0;\n line-height: 1.6;\n}\n\n/* Links */\n.ck-content a {\n color: #1a73e8;\n text-decoration: none;\n}\n\n.ck-content a:hover {\n text-decoration: underline;\n}\n\n/* Lists */\n.ck-content ul,\n.ck-content ol {\n padding-left: 2em;\n margin: 1em 0;\n}\n\n.ck-content ul {\n list-style: disc;\n}\n\n.ck-content ol {\n list-style: decimal;\n}\n\n.ck-content li {\n margin: 0.5em 0;\n}\n\n/* Blockquotes */\n.ck-content blockquote {\n margin: 1em 0;\n padding-left: 1em;\n border-left: 5px solid #ccc;\n font-style: italic;\n color: #666;\n}\n\n/* Code blocks */\n.ck-content pre {\n background: #f5f5f5;\n border: 1px solid #ddd;\n border-radius: 4px;\n padding: 1em;\n margin: 1em 0;\n overflow-x: auto;\n font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;\n}\n\n.ck-content code {\n background: #f5f5f5;\n padding: 0.2em 0.4em;\n border-radius: 3px;\n font-size: 0.9em;\n font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;\n}\n\n/* Tables */\n.ck-content table {\n border-collapse: collapse;\n width: 100%;\n margin: 1em 0;\n}\n\n.ck-content table th,\n.ck-content table td {\n border: 1px solid #ddd;\n padding: 0.75em;\n text-align: left;\n}\n\n.ck-content table th {\n background: #f5f5f5;\n font-weight: bold;\n}\n\n/* Images */\n.ck-content img {\n max-width: 100%;\n height: auto;\n margin: 1em 0;\n}\n\n.ck-content figure {\n margin: 1em 0;\n text-align: center;\n}\n\n.ck-content figure img {\n margin: 0;\n}\n\n.ck-content figcaption {\n color: #666;\n font-size: 0.9em;\n margin-top: 0.5em;\n}\n\n/* Dark mode */\n/*\n@media (prefers-color-scheme: dark) {\n .ck-content {\n background: #1a1a1a;\n color: #e0e0e0;\n }\n\n .ck-content a {\n color: #64b5f6;\n }\n\n .ck-content blockquote {\n border-left-color: #404040;\n color: #b0b0b0;\n }\n\n .ck-content pre,\n .ck-content code {\n background: #2d2d2d;\n border-color: #404040;\n }\n\n .ck-content table th,\n .ck-content table td {\n border-color: #404040;\n }\n\n .ck-content table th {\n background: #2d2d2d;\n }\n\n .ck-content figcaption {\n color: #b0b0b0;\n }\n}\n*/\n\n/* CUSTOM DOCUMENTATION CSS */\n\n#documentation-preview {\n border: 1px solid #ccc;\n padding: 1rem;\n}\n\n#documentation-preview h3 {\n font-size: 1.5rem;\n margin-bottom: 1rem;\n}\n\n.pre-wrapper {\n background: #f2f5f9;\n border: 1px solid #cecece;\n display: block;\n padding: 1rem;\n border-radius: 0.25rem;\n margin-top: 1rem;\n margin-bottom: 1rem;\n}\n\n.pre-wrapper pre {\n margin: 0;\n color: #e87aa2;\n}\n\n.widget-doc-section pre {\n background-color: transparent;\n}\n\n.widget-doc-section p {\n margin: 0;\n}\n\n.widget-doc-section code {\n color: #e87aa2;\n font-size: 0.875rem;\n}\n\n.mv-3 {\n margin-top: 1rem;\n margin-bottom: 1rem;\n}\n\n.pv-3 {\n padding-top: 1rem;\n padding-bottom: 1rem;\n}\n\n .widget-documentation-heading {\n background-color: #6e757d;\n color: #eee;\n font-size: 1.5rem;\n padding: 0.5rem 1rem;\n display: flex;\n align-items: center;\n justify-content: space-between;\n }\n\n .widget-documentation-heading h4 {\n margin-bottom: 0;\n }\n\n .close-documentation-button {\n border: none;\n outline: none;\n background-color: transparent;\n line-height: 0;\n margin: 0;\n padding: 0;\n cursor: pointer;\n }\n\n .close-documentation-button:hover,\n .close-documentation-button:focus {\n background-color: transparent;\n }\n\n .documentation-creator {\n text-align: right;\n color: #666;\n margin: 0;\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n }\n\n .documentation-creator span {\n font-style: italic;\n }\n\n .documentation-attachments {\n display: flex;\n flex-wrap: wrap;\n }\n\n .documentation-attachments img {\n width: 25%;\n height: auto;\n border: 1px solid #ccc;\n padding: 0.25rem;\n margin-top: 0.5rem;\n margin-bottom: 0.5rem;\n }\n\n .documentation-attachments iframe {\n width: 50%;\n border: 1px solid #ccc;\n padding: 0.25rem;\n margin-top: 0.5rem;\n margin-bottom: 0.5rem;\n }\n\n .widget-documentation-footer {\n text-align: right;\n margin-top: 1rem;\n }\n\n .widget-documentation-footer button {\n border-radius: 0;\n border: none;\n padding: 0.5rem 1.5rem;\n text-align: center;\n background: #6e757d;\n color: #eee;\n }\n\n #widget-details {\n position: absolute;\n right: 0px;\n top: 0px;\n z-index: 9999;\n }\n\n #widget-details button {\n background: #fff;\n border: 1px solid #ccc;\n border-radius: 0 0 0 0.25rem;\n height: auto;\n width: auto;\n cursor: pointer;\n display: flex;\n align-items: center;\n gap: 0.25rem;\n }\n\n #widget-details button:hover, \n #widget-details button:focus {\n opacity: 0.75;\n }\n\n #widget-details button span {\n pointer-events: none;\n font-size: 1rem;\n }\n\n #widget-details button svg {\n pointer-events: none;\n width: 16px;\n height: 16px;\n fill: #999;\n }\n\n #widget-documentation-preview-modal {\n border: none;\n }\n\n @media (min-width: 768px) {\n #widget-documentation-preview-modal {\n flex: 0 0 auto;\n width: 66.66666667%;\n }\n }\n\n',ai={PAGE_COMP_NAME:"page",WIDGET_COMP_NAME:"widget",PROJECT_COMP_NAME:"project"};var si=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class ci{static get(e,t){return si(this,void 0,void 0,function*(){if(ci.cache.has(e))return ci.cache.get(e);if(ci.promises.has(e))return ci.promises.get(e);const n=t().then(t=>(ci.cache.set(e,t),ci.promises.delete(e),t)).catch(t=>{throw ci.promises.delete(e),t});return ci.promises.set(e,n),n})}static has(e){return ci.cache.has(e)}static peek(e){return ci.cache.get(e)}static invalidate(e){ci.cache.delete(e),ci.promises.delete(e)}static clear(){ci.cache.clear(),ci.promises.clear()}static set(e,t){return si(this,void 0,void 0,function*(){return ci.promises.delete(e),ci.cache.set(e,t),t})}static stats(){return{cacheSize:ci.cache.size,pendingRequests:ci.promises.size,keys:Array.from(ci.cache.keys())}}}ci.cache=new Map,ci.promises=new Map;var li=n(2895);const di=li;li.stringify,li.fromJSON,li.plugin,li.parse,li.list,li.document,li.comment,li.atRule,li.rule,li.decl,li.root,li.CssSyntaxError,li.Declaration,li.Container,li.Processor,li.Document,li.Comment,li.Warning,li.AtRule,li.Result,li.Input,li.Rule,li.Root,li.Node;var ui=n(2110),hi=n.n(ui),pi=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function fi(e){return pi(this,void 0,void 0,function*(){try{return(yield di([hi()()]).process(e,{from:void 0})).css}catch(e){return null}})}var mi=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function yi(e){return mi(this,void 0,void 0,function*(){var t,n,o,i,r,a,s,c,l,d,u,h,p,f;[{key:"meta_title",value:null===(n=null===(t=null==e?void 0:e[`the_${ai.PAGE_COMP_NAME}_meta_title`])||void 0===t?void 0:t.data)||void 0===n?void 0:n.the_meta_title},{key:"meta_description",value:null===(i=null===(o=null==e?void 0:e[`the_${ai.PAGE_COMP_NAME}_meta_description`])||void 0===o?void 0:o.data)||void 0===i?void 0:i.the_meta_description},{key:"meta_keywords",value:null===(a=null===(r=null==e?void 0:e[`the_${ai.PAGE_COMP_NAME}_meta_keywords`])||void 0===r?void 0:r.data)||void 0===a?void 0:a.the_meta_keywords},{key:"width",value:null===(c=null===(s=null==e?void 0:e[`the_${ai.PAGE_COMP_NAME}_width`])||void 0===s?void 0:s.data)||void 0===c?void 0:c.the_width},{key:"font_size",value:null===(d=null===(l=null==e?void 0:e[`the_${ai.PAGE_COMP_NAME}_font_size`])||void 0===l?void 0:l.data)||void 0===d?void 0:d.the_font_size},{key:"font_family",value:null===(h=null===(u=null==e?void 0:e[`the_${ai.PAGE_COMP_NAME}_font_family`])||void 0===u?void 0:u.data)||void 0===h?void 0:h.the_font_family},{key:"type",value:null===(f=null===(p=null==e?void 0:e[`the_${ai.PAGE_COMP_NAME}_type`])||void 0===p?void 0:p.data)||void 0===f?void 0:f.the_type}].forEach(e=>{e.value&&function(e,t){mi(this,void 0,void 0,function*(){const n=document.getElementById("fspage-properties")||function(){const e=document.createElement("style");return e.id="fspage-properties",document.head.appendChild(e),e}();let o="";switch(e){case"width":vi(".fspage { width: [^;]+ !important; }"),o=t?`.fspage { width: ${t} !important; }`:"";break;case"font_size":vi(".fspage { font-size: [^;]+; }"),o=t?`.fspage { font-size: ${t}px; }`:"";break;case"font_family":vi(".fspage { font-family: [^;]+; }"),o=t?`.fspage { font-family: ${t}; }`:"";break;case"type":vi(".fspage { width: 1200px; margin: 0 auto; }"),vi(".fspage { width: 100%; padding: 0; }"),o="fixed"===t?".fspage { width: 1200px; margin: 0 auto; }":"fluid"===t?".fspage { width: 100%; padding: 0; }":"";break;case"meta_title":document.title=t;break;case"meta_keywords":gi(e.replace("meta_",""),t);break;case"meta_description":return void gi(e.replace("meta_",""),t)}n.textContent+=o})}(e.key,e.value)})})}function vi(e){const t=document.getElementById("fspage-properties");if(!t)return;let n=null==t?void 0:t.textContent;n=n?n.replace(new RegExp(e,"g"),""):"",t.textContent=n}function gi(e,t){let n=document.querySelector(`meta[name="${e}"]`);n||(n=document.createElement("meta"),n.setAttribute("name",e),document.head.appendChild(n)),n.setAttribute("content",t)}var Ci=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function wi(e){return Ci(this,void 0,void 0,function*(){var t,n,o,i;(null===(n=null===(t=null==e?void 0:e.library)||void 0===t?void 0:t.css)||void 0===n?void 0:n.length)&&function(e){var t;const n=null===(t=null==e?void 0:e.library)||void 0===t?void 0:t.css,o=`vde-css-${(null==e?void 0:e.origin)?null==e?void 0:e.origin:null==e?void 0:e.widgetId}`;(function(e){const t=`link.${e}`,n=document.querySelectorAll(t);(null==n?void 0:n.length)&&(null==n||n.forEach(e=>{e.remove()}))})(o),(null==n?void 0:n.length)&&(null==n||n.sort((e,t)=>Number(null==e?void 0:e.order)-Number(null==t?void 0:t.order)));null==n||n.forEach(e=>{const t=document.createElement("link");t.classList.add(o),t.setAttribute("rel","stylesheet"),t.setAttribute("href",e.url),document.head.appendChild(t)})}(e),(null===(i=null===(o=null==e?void 0:e.library)||void 0===o?void 0:o.js)||void 0===i?void 0:i.length)&&(yield function(e){return Ci(this,void 0,void 0,function*(){var t;const n=null===(t=null==e?void 0:e.library)||void 0===t?void 0:t.js,o=`vde-js-${(null==e?void 0:e.origin)?null==e?void 0:e.origin:null==e?void 0:e.widgetId}`;if(function(e){const t=`script.${e}`,n=document.querySelectorAll(t);(null==n?void 0:n.length)&&(null==n||n.forEach(e=>{e.remove()}))}(o),null==n?void 0:n.length){n.sort((e,t)=>Number(null==e?void 0:e.order)-Number(null==t?void 0:t.order));for(const e of n){if(!(null==e?void 0:e.url))continue;document.querySelector(`script[src="${e.url}"]`)||(yield new Promise((t,n)=>{const i=document.createElement("script");i.classList.add(o),i.setAttribute("type","text/javascript"),i.setAttribute("src",e.url),i.setAttribute("crossorigin","anonymous"),i.onload=()=>{t()},i.onerror=t=>{n(new Error(`Failed to load script: ${e.url}`))},document.head.appendChild(i)}))}}})}(e))})}var Ti=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function Ii(e,t,n,o){return Ti(this,void 0,void 0,function*(){var i,r,a,s,c,l,d,u,h,p;const f=new Vo;f.conceptIds=[e],f.inpage=100,f.outputFormat=_n.y0,f.selectors=["the_page_body","the_page_title","the_page_slug","the_page_font_family","the_page_font_size","the_page_width","the_page_type","the_page_meta_title","the_page_meta_description","the_page_meta_keywords"];let m=yield Qo(f,"");yi(null===(r=null===(i=null==m?void 0:m[0])||void 0===i?void 0:i.data)||void 0===r?void 0:r[`the_${ai.PAGE_COMP_NAME}`]);document.getElementById("app").classList.add("fspage");const y=document.head.querySelectorAll("style#mystyleid");Array.from(y).forEach(e=>e.remove()),(null===(l=null===(c=null===(s=null===(a=null==m?void 0:m[0])||void 0===a?void 0:a.data)||void 0===s?void 0:s.the_page)||void 0===c?void 0:c.the_page_body)||void 0===l?void 0:l.id)?yield Si(null===(p=null===(h=null===(u=null===(d=null==m?void 0:m[0])||void 0===d?void 0:d.data)||void 0===u?void 0:u.the_page)||void 0===h?void 0:h.the_page_body)||void 0===p?void 0:p.id,t,n,o):t.innerHTML="<h4>Invalid or Page doesn't exist</h4>"})}function ki(e,t,n,o){return Ti(this,void 0,void 0,function*(){try{let t=yield(0,Zo.qj)(e),n=t.mainId,o=t.data;const i=yield xi(o,n),r=yield Pi(n,[],i);return ci.cache.set(`wdgt_${n}`,r),r}catch(e){}})}function bi(e,t,n,o){return Ti(this,void 0,void 0,function*(){try{let t=yield(0,Zo.ml)(e),n=t.mainId,o=t.data;const i=yield xi(o,n);return yield Pi(n,[],i)}catch(e){}})}function Ai(e,t,n,o){return Ti(this,void 0,void 0,function*(){let i=(yield(0,Zo.qj)(e)).mainId;const r=ci.cache.get(`wdgt_${i}`);if(!r.name)return void(t.innerHTML="<h4>Invalid or Widget doesn't exist</h4>");const a=t;yield wi(r);const s=yield Ei(r,a,void 0,n),c=Array.from({length:32},()=>"abcdef"[Math.floor(6*Math.random())]).join("");t.classList.add(`${c}`),t.style.position="relative";const l=document.createElement("style");l.id="mystyleid",l.classList.add("mftsccs-css");const d=`\n .${c} {\n ${r.css+s.css+ri} \n }\n `,u=(yield fi(d))||"";if(l.innerHTML=u,document.head.appendChild(l),r.children.length&&(null==r||r.children.forEach(e=>{var t;const n=null==e?void 0:e.library;((null===(t=null==n?void 0:n.css)||void 0===t?void 0:t.length)||(null==n?void 0:n.js.length))&&wi(e)})),o){const e=document.createElement("div");e.id="widget-details",e.innerHTML="",e.innerHTML=`\n <button class="widget-documentation-btn" widget-id="${(null==r?void 0:r.origin)||(null==r?void 0:r.widgetId)}" class="d-flex align-items-center gap-1" title="Documentation">\n <svg xmlns="http://www.w3.org/2000/svg" shape-rendering="geometricPrecision" text-rendering="geometricPrecision" image-rendering="optimizeQuality" fill-rule="evenodd" clip-rule="evenodd" viewBox="0 0 441 512.02"><path d="M324.87 279.77c32.01 0 61.01 13.01 82.03 34.02 21.09 21 34.1 50.05 34.1 82.1 0 32.06-13.01 61.11-34.02 82.11l-1.32 1.22c-20.92 20.29-49.41 32.8-80.79 32.8-32.06 0-61.1-13.01-82.1-34.02-21.01-21-34.02-50.05-34.02-82.11s13.01-61.1 34.02-82.1c21-21.01 50.04-34.02 82.1-34.02zM243.11 38.08v54.18c.99 12.93 5.5 23.09 13.42 29.85 8.2 7.01 20.46 10.94 36.69 11.23l37.92-.04-88.03-95.22zm91.21 120.49-41.3-.04c-22.49-.35-40.21-6.4-52.9-17.24-13.23-11.31-20.68-27.35-22.19-47.23l-.11-1.74V25.29H62.87c-10.34 0-19.75 4.23-26.55 11.03-6.8 6.8-11.03 16.21-11.03 26.55v336.49c0 10.3 4.25 19.71 11.06 26.52 6.8 6.8 16.22 11.05 26.52 11.05h119.41c2.54 8.79 5.87 17.25 9.92 25.29H62.87c-17.28 0-33.02-7.08-44.41-18.46C7.08 432.37 0 416.64 0 399.36V62.87c0-17.26 7.08-32.98 18.45-44.36C29.89 7.08 45.61 0 62.87 0h173.88c4.11 0 7.76 1.96 10.07 5l109.39 118.34c2.24 2.43 3.34 5.49 3.34 8.55l.03 119.72c-8.18-1.97-16.62-3.25-25.26-3.79v-89.25zm-229.76 54.49c-6.98 0-12.64-5.66-12.64-12.64 0-6.99 5.66-12.65 12.64-12.65h150.49c6.98 0 12.65 5.66 12.65 12.65 0 6.98-5.67 12.64-12.65 12.64H104.56zm0 72.3c-6.98 0-12.64-5.66-12.64-12.65 0-6.98 5.66-12.64 12.64-12.64h142.52c3.71 0 7.05 1.6 9.37 4.15a149.03 149.03 0 0 0-30.54 21.14H104.56zm0 72.3c-6.98 0-12.64-5.66-12.64-12.65 0-6.98 5.66-12.64 12.64-12.64h86.2c-3.82 8.05-6.95 16.51-9.29 25.29h-76.91zm239.61-18.85c7.41 7.43 4.68 18.9-3.05 25.23-7.46 6.01-20.97 8.92-28.68 1.83-7.77-7.23-4.68-18.87 2.76-25.24 7.18-6.05 21.39-9.37 28.97-1.82zm-43.88 95h6.34v-41.33H294.6c0-16.37 30.05-5.74 52.18-11.32v52.65h8.37v17.58h-54.86v-17.58z"/></svg>\n </button>\n `,a.appendChild(e);const t=document.createElement("dialog");t.id="widget-documentation-preview-modal",t.className="col-md-8",t.innerHTML="",t.innerHTML='\n <div class="widget-documentation-heading">\n <h4>Documentation</h4>\n <button class="close-documentation-button document-preview-close-button" title="Close">\n <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#e8eaed"><path d="m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z"/></svg>\n </button>\n </div>\n\n <div id="documentation-view" class="ck-content"></div>\n\n <div class="widget-documentation-footer">\n <button class="document-preview-close-button">Close</button>\n </div>\n ',a.appendChild(t);const n=a.querySelectorAll(".widget-documentation-btn");null==n||n.forEach(e=>{e.addEventListener("click",e=>{const t=null==e?void 0:e.target;Gi(null==t?void 0:t.getAttribute("widget-id"))})});const o=a.querySelectorAll(".document-preview-close-button");null==o||o.forEach(e=>{e.addEventListener("click",()=>{Mi("widget-documentation-preview-modal")})})}return a.querySelectorAll(".wb-initial-empty").forEach(e=>{e.classList.remove("wb-initial-empty")}),document.querySelectorAll('[onclick="widgetSelected(event)"]').forEach(e=>{e.removeAttribute("onclick")}),s})}function Si(e,t,n,o){return Ti(this,void 0,void 0,function*(){try{let i=yield(0,Zo.qj)(e),r=i.mainId,a=i.data;const s=yield xi(a,r);return yield Ni(r,s,t,n,o)}catch(e){t.textContent=`Error: ${e.message}`}})}function Li(e,t,n,o){return Ti(this,void 0,void 0,function*(){try{const i=yield(0,Zo.Cp)(e);return yield Ni(e,i,t,n,o)}catch(e){}})}function Ni(e,t,n,o){return Ti(this,arguments,void 0,function*(e,t,n,o,i=!0){const r=yield Pi(e,[],t);if(!r.name)return void(n.innerHTML="<h4>Invalid or Widget doesn't exist</h4>");const a=n;yield wi(r);const s=yield Ei(r,a,void 0,o),c=Array.from({length:32},()=>"abcdef"[Math.floor(6*Math.random())]).join("");n.classList.add(`${c}`),n.style.position="relative";const l=document.createElement("style");l.id="mystyleid",l.classList.add("mftsccs-css");const d=`\n .${c} {\n ${r.css+s.css+ri} \n }\n `,u=(yield fi(d))||"";l.innerHTML=u,r.children.length&&(null==r||r.children.forEach(e=>{var t;const n=null==e?void 0:e.library;((null===(t=null==n?void 0:n.css)||void 0===t?void 0:t.length)||(null==n?void 0:n.js.length))&&wi(e)})),document.head.appendChild(l);const h=document.createElement("script");if(h.innerHTML=r.js,a.appendChild(h),i){const e=document.createElement("div");e.id="widget-details",e.innerHTML="",e.innerHTML=`\n <button class="widget-documentation-btn" widget-id="${(null==r?void 0:r.origin)||(null==r?void 0:r.widgetId)}" class="d-flex align-items-center gap-1" title="Documentation">\n <svg xmlns="http://www.w3.org/2000/svg" shape-rendering="geometricPrecision" text-rendering="geometricPrecision" image-rendering="optimizeQuality" fill-rule="evenodd" clip-rule="evenodd" viewBox="0 0 441 512.02"><path d="M324.87 279.77c32.01 0 61.01 13.01 82.03 34.02 21.09 21 34.1 50.05 34.1 82.1 0 32.06-13.01 61.11-34.02 82.11l-1.32 1.22c-20.92 20.29-49.41 32.8-80.79 32.8-32.06 0-61.1-13.01-82.1-34.02-21.01-21-34.02-50.05-34.02-82.11s13.01-61.1 34.02-82.1c21-21.01 50.04-34.02 82.1-34.02zM243.11 38.08v54.18c.99 12.93 5.5 23.09 13.42 29.85 8.2 7.01 20.46 10.94 36.69 11.23l37.92-.04-88.03-95.22zm91.21 120.49-41.3-.04c-22.49-.35-40.21-6.4-52.9-17.24-13.23-11.31-20.68-27.35-22.19-47.23l-.11-1.74V25.29H62.87c-10.34 0-19.75 4.23-26.55 11.03-6.8 6.8-11.03 16.21-11.03 26.55v336.49c0 10.3 4.25 19.71 11.06 26.52 6.8 6.8 16.22 11.05 26.52 11.05h119.41c2.54 8.79 5.87 17.25 9.92 25.29H62.87c-17.28 0-33.02-7.08-44.41-18.46C7.08 432.37 0 416.64 0 399.36V62.87c0-17.26 7.08-32.98 18.45-44.36C29.89 7.08 45.61 0 62.87 0h173.88c4.11 0 7.76 1.96 10.07 5l109.39 118.34c2.24 2.43 3.34 5.49 3.34 8.55l.03 119.72c-8.18-1.97-16.62-3.25-25.26-3.79v-89.25zm-229.76 54.49c-6.98 0-12.64-5.66-12.64-12.64 0-6.99 5.66-12.65 12.64-12.65h150.49c6.98 0 12.65 5.66 12.65 12.65 0 6.98-5.67 12.64-12.65 12.64H104.56zm0 72.3c-6.98 0-12.64-5.66-12.64-12.65 0-6.98 5.66-12.64 12.64-12.64h142.52c3.71 0 7.05 1.6 9.37 4.15a149.03 149.03 0 0 0-30.54 21.14H104.56zm0 72.3c-6.98 0-12.64-5.66-12.64-12.65 0-6.98 5.66-12.64 12.64-12.64h86.2c-3.82 8.05-6.95 16.51-9.29 25.29h-76.91zm239.61-18.85c7.41 7.43 4.68 18.9-3.05 25.23-7.46 6.01-20.97 8.92-28.68 1.83-7.77-7.23-4.68-18.87 2.76-25.24 7.18-6.05 21.39-9.37 28.97-1.82zm-43.88 95h6.34v-41.33H294.6c0-16.37 30.05-5.74 52.18-11.32v52.65h8.37v17.58h-54.86v-17.58z"/></svg>\n </button>\n `,a.appendChild(e);const t=document.createElement("dialog");t.id="widget-documentation-preview-modal",t.className="col-md-8",t.innerHTML="",t.innerHTML='\n <div class="widget-documentation-heading">\n <h4>Documentation</h4>\n <button class="close-documentation-button document-preview-close-button" title="Close">\n <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#e8eaed"><path d="m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z"/></svg>\n </button>\n </div>\n\n \x3c!-- <div id="documentation-preview" class="ck-content"></div> --\x3e\n <div id="documentation-view" class="ck-content"></div>\n\n <div class="widget-documentation-footer">\n <button class="document-preview-close-button">Close</button>\n </div>\n ',a.appendChild(t);const n=a.querySelectorAll(".widget-documentation-btn");null==n||n.forEach(e=>{e.addEventListener("click",e=>{const t=null==e?void 0:e.target;Gi(null==t?void 0:t.getAttribute("widget-id"))})});const o=a.querySelectorAll(".document-preview-close-button");null==o||o.forEach(e=>{e.addEventListener("click",()=>{Mi("widget-documentation-preview-modal")})})}return a.querySelectorAll(".wb-initial-empty").forEach(e=>{e.classList.remove("wb-initial-empty")}),document.querySelectorAll('[onclick="widgetSelected(event)"]').forEach(e=>{e.removeAttribute("onclick")}),s})}function _i(e,t){return Ti(this,void 0,void 0,function*(){var n,o,i,r,a,s,c,l,d,u,h;const p=null===(o=null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.the_widget)||void 0===o?void 0:o.the_widget_s_child;if(t.push(e),p&&p.length)for(let e=0;e<p.length;e++){const n=p[e];let o=null===(c=null===(s=null===(a=null===(r=null===(i=null==n?void 0:n.data.the_child_widget)||void 0===i?void 0:i.the_child_widget_info)||void 0===r?void 0:r.data)||void 0===a?void 0:a.the_widget)||void 0===s?void 0:s.the_widget_root)||void 0===c?void 0:c.id;const f=!!(null===(u=null===(d=null===(l=null==n?void 0:n.data)||void 0===l?void 0:l.the_child_widget)||void 0===d?void 0:d.the_child_widget_use_latest)||void 0===u?void 0:u.data);o=Number(o)||!1;let m=null;if(f&&o){const e=yield(0,Zo.qj)(o);m=(null===(h=null==e?void 0:e.data)||void 0===h?void 0:h[0])||[],m.useLatest=!0,n.data.the_child_widget.the_child_widget_info=m}n.data.the_child_widget.the_child_widget_info.sChildId=n.id,yield _i(n.data.the_child_widget.the_child_widget_info,t)}})}function xi(e,t){return Ti(this,void 0,void 0,function*(){const n=[],o=[...e];try{const e=o.find(e=>e.id===t);yield _i(e,n)}catch(e){}return n})}function Di(e){return Ti(this,arguments,void 0,function*(e,t=[],n=""){let o=yield(0,Zo.Cp)(e);const i=yield xi(o,e);return yield Pi(e,[],i)})}function Pi(e){return Ti(this,arguments,void 0,function*(e,t=[],n,o=""){var i,r,a,s,c,l,d,u,h,p,f,m,y,v,g,C,w,T,I,k,b,A,S,L,N,_,x,D,P,E,R,O,B,F,U,G,M,W,j,V,q,H,$,z,J,Q,Y,X,K,Z,ee,te,ne,oe,ie,re,ae,se,ce,le,de;try{const ue=new Yo,he=(0,Zo.ix)(n,e);t.push(e);const pe=null===(i=null==he?void 0:he.data)||void 0===i?void 0:i.the_widget;ue.name=null===(a=null===(r=null==pe?void 0:pe.the_widget_name)||void 0===r?void 0:r.data)||void 0===a?void 0:a.the_name,ue.html=null===(c=null===(s=null==pe?void 0:pe.the_widget_html)||void 0===s?void 0:s.data)||void 0===c?void 0:c.the_html,ue.css=null===(d=null===(l=null==pe?void 0:pe.the_widget_css)||void 0===l?void 0:l.data)||void 0===d?void 0:d.the_css,ue.js=null===(h=null===(u=null==pe?void 0:pe.the_widget_js)||void 0===u?void 0:u.data)||void 0===h?void 0:h.the_js,ue.root=Number(null!==(f=null===(p=null==pe?void 0:pe.the_widget_root)||void 0===p?void 0:p.id)&&void 0!==f?f:0);let fe=0!=ue.root;ue.origin=fe?ue.root:Number((null===(y=null===(m=null==pe?void 0:pe.the_widget_origin)||void 0===m?void 0:m.data)||void 0===y?void 0:y.the_origin)||(null===(g=null===(v=null==pe?void 0:pe.the_widget_origin)||void 0===v?void 0:v.data)||void 0===g?void 0:g.the_originid)),ue.version=null===(w=null===(C=null==pe?void 0:pe.the_widget_version)||void 0===C?void 0:C.data)||void 0===w?void 0:w.the_version,ue.clean=null===(I=null===(T=null==pe?void 0:pe.the_widget_clean)||void 0===T?void 0:T.data)||void 0===I?void 0:I.the_clean,ue.timestamp=null===(b=null===(k=null==pe?void 0:pe.the_widget_timestamp)||void 0===k?void 0:k.data)||void 0===b?void 0:b.the_timestamp,ue.id=null==he?void 0:he.id;const me=null===(S=null===(A=null==pe?void 0:pe.the_widget_type)||void 0===A?void 0:A.data)||void 0===S?void 0:S.the_type;ue.type="null"==me||null==me?"the_element_name":me,ue.after_render=null===(N=null===(L=null==pe?void 0:pe.the_widget_after_render)||void 0===L?void 0:L.data)||void 0===N?void 0:N.the_after_render,ue.before_render=null===(x=null===(_=null==pe?void 0:pe.the_widget_before_render)||void 0===_?void 0:_.data)||void 0===x?void 0:x.the_before_render,ue.dependency=null===(P=null===(D=null==pe?void 0:pe.the_widget_dependency)||void 0===D?void 0:D.data)||void 0===P?void 0:P.the_dependency,ue.update=null===(R=null===(E=null==pe?void 0:pe.the_widget_update)||void 0===E?void 0:E.data)||void 0===R?void 0:R.the_update,ue.widgetId=e,ue.mount_child=null===(B=null===(O=null==pe?void 0:pe.the_widget_mount_child)||void 0===O?void 0:O.data)||void 0===B?void 0:B.the_mount_child;const ye=null==pe?void 0:pe.the_widget_s_child;(null==he?void 0:he.useLatest)&&(ue.useLatest=!0),(null==he?void 0:he.sChildId)&&(ue.sChildId=he.sChildId);const ve=null===(F=null==pe?void 0:pe.the_widget_s_css_library)||void 0===F?void 0:F.map(e=>{var t,n,o,i,r,a,s,c;return{order:null===(i=null===(o=null===(n=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.the_css_library)||void 0===n?void 0:n.the_css_library_order)||void 0===o?void 0:o.data)||void 0===i?void 0:i.the_order,url:null===(c=null===(s=null===(a=null===(r=null==e?void 0:e.data)||void 0===r?void 0:r.the_css_library)||void 0===a?void 0:a.the_css_library_url)||void 0===s?void 0:s.data)||void 0===c?void 0:c.the_url}}),ge=null===(U=null==pe?void 0:pe.the_widget_s_js_library)||void 0===U?void 0:U.map(e=>{var t,n,o,i,r,a,s,c;return{order:null===(i=null===(o=null===(n=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.the_js_library)||void 0===n?void 0:n.the_js_library_order)||void 0===o?void 0:o.data)||void 0===i?void 0:i.the_order,url:null===(c=null===(s=null===(a=null===(r=null==e?void 0:e.data)||void 0===r?void 0:r.the_js_library)||void 0===a?void 0:a.the_js_library_url)||void 0===s?void 0:s.data)||void 0===c?void 0:c.the_url}});ue.library={css:ve||[],js:ge||[]};const Ce=null===(M=null===(G=null==pe?void 0:pe.the_widget_assistant)||void 0===G?void 0:G.data)||void 0===M?void 0:M.the_assistant;ue.assistant={id:null===(j=null===(W=null==Ce?void 0:Ce.the_assistant_id)||void 0===W?void 0:W.data)||void 0===j?void 0:j.the_id,input:null===(q=null===(V=null==Ce?void 0:Ce.the_assistant_input)||void 0===V?void 0:V.data)||void 0===q?void 0:q.the_input,type:null===($=null===(H=null==Ce?void 0:Ce.the_assistant_type)||void 0===H?void 0:H.data)||void 0===$?void 0:$.the_type};const we=null===(z=null==pe?void 0:pe.the_widget_s_custom_function)||void 0===z?void 0:z.map(e=>{var t,n,o,i,r,a,s;const c=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.the_custom_function;return{id:null==e?void 0:e.id,name:null===(o=null===(n=null==c?void 0:c.the_custom_function_name)||void 0===n?void 0:n.data)||void 0===o?void 0:o.the_name,slug:null===(r=null===(i=null==c?void 0:c.the_custom_function_slug)||void 0===i?void 0:i.data)||void 0===r?void 0:r.the_slug,code:null===(s=null===(a=null==c?void 0:c.the_custom_function_code)||void 0===a?void 0:a.data)||void 0===s?void 0:s.the_code}});if(ue.custom_functions=we,null==ye?void 0:ye.length)for(let e=0;e<ye.length;e++){const i=(null===(Y=null===(Q=null===(J=ye[e])||void 0===J?void 0:J.data.the_child_widget)||void 0===Q?void 0:Q.the_child_widget_info)||void 0===Y?void 0:Y.id)||(null===(ee=null===(Z=null===(K=null===(X=ye[e])||void 0===X?void 0:X.data.the_child_widget)||void 0===K?void 0:K.the_child_widget_parent)||void 0===Z?void 0:Z.data)||void 0===ee?void 0:ee.the_parent),r=yield Pi(i,t,n,o),a=null===(re=null===(ie=null===(oe=null===(ne=null===(te=ye[e])||void 0===te?void 0:te.data)||void 0===ne?void 0:ne.the_child_widget)||void 0===oe?void 0:oe.the_child_widget_type)||void 0===ie?void 0:ie.data)||void 0===re?void 0:re.the_type,s=null===(de=null===(le=null===(ce=null===(se=null===(ae=ye[e])||void 0===ae?void 0:ae.data)||void 0===se?void 0:se.the_child_widget)||void 0===ce?void 0:ce.the_child_widget_wrapper)||void 0===le?void 0:le.data)||void 0===de?void 0:de.the_wrapper;r.type="null"==a||null==a?"the_element_name":a,r.wrapper=s,ue.children.push(r)}return ue}catch(e){throw Error,e}})}function Ei(e,t){return Ti(this,arguments,void 0,function*(e,t,n=!0,o,i,r=null){var a,s;const c=new Lo;c.html=e.html,r&&(c.parentWidget=Ri(r)),c.widgetType=e.type,c.componentDidMountFunction=e.before_render,c.addEventFunction=e.after_render,c.mountChildWidgetsFunction=e.mount_child,c.widgetState=Object.assign({},i),c.customFunctions=e.custom_functions,c.widgetDependenciesData=e.dependency,o&&(c.data=o),t.innerHTML="";const l=t;if(l&&(yield c.mount(l),e.widget=c,e.children.length>0&&(null===(a=c.childWidgetElement)||void 0===a?void 0:a.length)>0))for(let t=0;t<(null===(s=e.children)||void 0===s?void 0:s.length);t++){const n=e.children[t];for(let e=0;e<c.childWidgetElement.length;e++){const t=c.childWidgetElement[e];if(n.wrapper===t.id){const e=Bi(n);n.html=`<div id="${n.wrapper}">${n.html}</div>`;const o=yield Ei(e,t,false,c.data,c.widgetState,c);c.childWidgets.push(o),c.css=c.css+o.css+`#${t.id} { ${n.css} }`,o.dataChange(e=>{var t;const n=null===(t=null==e?void 0:e.type)||void 0===t?void 0:t.characterValue;n&&(c.childrenData[n]=e)})}}}return yield Ui(t,".widget_container"),c})}function Ri(e){const t={};for(const[n,o]of Object.entries(e))"object"==typeof o&&null!==o&&Array.isArray(o)||(t[n]=o);return t}function Oi(e,t){return Ti(this,arguments,void 0,function*(e,t,n=!0,o,i,r=null){var a,s;let c=new Lo;c.html=e.html,r&&(c.parentWidget=Ri(r)),c.widgetState=Object.assign({},o),c.widgetType=e.type,c.componentDidMountFunction=e.before_render,c.addEventFunction=e.after_render,c.mountChildWidgetsFunction=e.mount_child,c.customFunctions=e.custom_functions,c.widgetDependenciesData=e.dependency,c.inDevelopment=!1!==i,t.innerHTML="";let l=t;if(l&&(yield c.mount(l),e.widget=c,e.children.length>0&&(null===(a=c.childWidgetElement)||void 0===a?void 0:a.length)>0))for(let t=0;t<(null===(s=e.children)||void 0===s?void 0:s.length);t++){let n=e.children[t];for(let e=0;e<c.childWidgetElement.length;e++){let t=c.childWidgetElement[e];if(n.wrapper===t.id){const e=Bi(n),o=yield Oi(e,t,false,c.widgetState,i,c);c.childWidgets.push(o),c.css=c.css+o.css+`#${t.id} { ${n.css} }`,o.dataChange(e=>{var t;let n=null===(t=null==e?void 0:e.type)||void 0===t?void 0:t.characterValue;n&&(c.childrenData[n]=e)})}}}return c})}function Bi(e){return e.html=e.html.replace(/<[^>]*\bclass=["'][^"']*\bwidget_container\b[^"']*["'][^>]*>/g,e=>e.replace(/\bwidget_container\b/g,"").trim()),e.html=e.html.replace(/<[^>]*\bdraggable=["'][^"']*\btrue\b[^"']*["'][^>]*>/g,e=>e.replace(/\btrue\b/g,"false").trim()),e.html=e.html.replace(/<[^>]*\bclass=["'][^"']*\bhover-element\b[^"']*["'][^>]*>/g,e=>e.replace(/\bhover-element\b/g,"").trim()),e.html=e.html.replace(/<[^>]*\bclass=["'][^"']*\bwb-block\b[^"']*["'][^>]*>/g,e=>e.replace(/\bwb-block\b/g,"").trim()),e.html=e.html.replace(/<[^>]*onclick="widgetSelected\(event\)"\s*,?\s*ondragover="_dragService\.dragOverWidgetElement\(event\)"\s*,?\s*ondrop="_dragService\.dropWidgetElement\(event\)"\s*,?\s*ondragstart="_dragService\.dragStartWidgetElement\(event\)"\s*,?\s*ondragend="_dragService\.dragEndWidgetElement\(event\)"[^>]*>/g,e=>e.replace(/onclick="widgetSelected\(event\)"/g,'onclick=""').replace(/ondragover="_dragService\.dragOverWidgetElement\(event\)"/g,'ondragover=""').replace(/ondrop="_dragService\.dropWidgetElement\(event\)"/g,'ondrop=""').replace(/ondragstart="_dragService\.dragStartWidgetElement\(event\)"/g,'ondragstart=""').replace(/ondragend="_dragService\.dragEndWidgetElement\(event\)"/g,'ondragend=""').trim()),e.html=e.html.replace(/<[^>]*\bondragstart=["'][^"']*\b_dragService\.onWidgetDragStart\(event\)\b[^"']*["'][^>]*>/g,e=>e.replace(/\b_dragService\.onWidgetDragStart\(event\)\b/g,"").trim()),e}function Fi(e,t){return Ti(this,void 0,void 0,function*(){if(e&&1===e.nodeType){e.querySelectorAll(t).forEach(e=>{for(;e.firstChild;)e.parentNode.insertBefore(e.firstChild,e);e.remove()})}return e})}function Ui(e,t){return Ti(this,void 0,void 0,function*(){const n=e.querySelectorAll(t);for(const e of n){const n=e.parentElement;if(n){for(;e.firstChild;){const o=yield Fi(e.firstChild,t);n.insertBefore(o,e)}n.removeChild(e)}}})}function Gi(e){return Ti(this,void 0,void 0,function*(){const t=new Vo;t.typeConnection="the_widget_documentation",t.name="documentationText",t.selectors=["the_documentation_text"];const n=new Vo;n.typeConnection="the_widget_s_documentation",n.name="documentationBlank",n.selectors=["the_documentation_text","the_documentation_content","the_documentation_language","the_documentation_doc_title","the_documentation_folder","the_documentation_creator_email","the_documentation_created_by","the_documentation_content","the_documentation_type","the_documentation_s_doc_url","the_documentation_s_image_url","the_documentation_s_video_link","the_documentation_auth_type","the_documentation_bearer_token","the_documentation_method","the_documentation_method_url","the_documentation_username","the_documentation_password","the_documentation_s_json_list","the_documentation_api_script","the_documentation_api_body","the_documentation_code_editor","the_documentation_return"];const o=new Vo;o.typeConnection="the_documentation_s_json_list",o.name="documentationJSON",o.selectors=["the_json_list_key","the_json_list_value"],n.freeschemaQueries=[o];const i=new Vo;i.conceptIds=[e],i.freeschemaQueries=[t,n],i.inpage=100,i.outputFormat=_n.y0,yield Jo(i,"").subscribe(t=>Ti(this,void 0,void 0,function*(){var n,o,i,r,a,s,c,l,d,h,p;let f;const m=(null===(l=null===(c=null===(s=null===(a=null===(r=null===(i=null===(o=null===(n=null==t?void 0:t[0])||void 0===n?void 0:n.data)||void 0===o?void 0:o.the_widget)||void 0===i?void 0:i.the_widget_documentation)||void 0===r?void 0:r.data)||void 0===a?void 0:a.the_documentation)||void 0===s?void 0:s.the_documentation_text)||void 0===c?void 0:c.data)||void 0===l?void 0:l.the_text)||"";m&&(f=m);const y=null===(p=null===(h=null===(d=null==t?void 0:t[0])||void 0===d?void 0:d.data)||void 0===h?void 0:h.the_widget)||void 0===p?void 0:p.the_widget_s_documentation;if(null==y?void 0:y.length){const e=null==y?void 0:y.map(e=>{var t,n,o,i,r,a,s,c,l,d,u,h,p,f,m,y,v,g,C,w,T,I,k,b,A,S,L,N,_,x,D;const P=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.the_documentation,E=null===(o=null===(n=null==P?void 0:P.the_documentation_type)||void 0===n?void 0:n.data)||void 0===o?void 0:o.the_type,R=null===(r=null===(i=null==P?void 0:P.the_documentation_content)||void 0===i?void 0:i.data)||void 0===r?void 0:r.the_content,O=null===(s=null===(a=null==P?void 0:P.the_documentation_creator_email)||void 0===a?void 0:a.data)||void 0===s?void 0:s.the_creator_email,B=null===(l=null===(c=null==P?void 0:P.the_documentation_doc_title)||void 0===c?void 0:c.data)||void 0===l?void 0:l.the_doc_title,F=null===(u=null===(d=null==P?void 0:P.the_documentation_method)||void 0===d?void 0:d.data)||void 0===u?void 0:u.the_method,U=null===(p=null===(h=null==P?void 0:P.the_documentation_method_url)||void 0===h?void 0:h.data)||void 0===p?void 0:p.the_method_url,G=null===(m=null===(f=null==P?void 0:P.the_documentation_bearer_token)||void 0===f?void 0:f.data)||void 0===m?void 0:m.the_bearer_token,M=null===(v=null===(y=null==P?void 0:P.the_documentation_username)||void 0===y?void 0:y.data)||void 0===v?void 0:v.the_username,W=null===(C=null===(g=null==P?void 0:P.the_documentation_password)||void 0===g?void 0:g.data)||void 0===C?void 0:C.the_password,j=null===(T=null===(w=null==P?void 0:P.the_documentation_auth_type)||void 0===w?void 0:w.data)||void 0===T?void 0:T.the_auth_type,V=null==P?void 0:P.the_documentation_s_json_list,q=null===(k=null===(I=null==P?void 0:P.the_documentation_api_script)||void 0===I?void 0:I.data)||void 0===k?void 0:k.the_api_script,H=null===(A=null===(b=null==P?void 0:P.the_documentation_api_body)||void 0===b?void 0:b.data)||void 0===A?void 0:A.the_api_body,$=null===(L=null===(S=null==P?void 0:P.the_documentation_language)||void 0===S?void 0:S.data)||void 0===L?void 0:L.the_language,z=null===(_=null===(N=null==P?void 0:P.the_documentation_return)||void 0===N?void 0:N.data)||void 0===_?void 0:_.the_return,J=null===(D=null===(x=null==P?void 0:P.the_documentation_code_editor)||void 0===x?void 0:x.data)||void 0===D?void 0:D.the_code_editor,Q=null==P?void 0:P.the_documentation_s_doc_url,Y=null==P?void 0:P.the_documentation_s_image_url,X=null==P?void 0:P.the_documentation_s_video_link;let K={type:E,content:R,creatorEmail:O,title:B};if("blank"===E)K=Object.assign({},K);else if("api"===E){const e=[];(null==V?void 0:V.length)&&(null==V||V.forEach(t=>{var n,o,i,r,a,s,c,l;e.push({key:null===(r=null===(i=null===(o=null===(n=null==t?void 0:t.data)||void 0===n?void 0:n.the_json_list)||void 0===o?void 0:o.the_json_list_key)||void 0===i?void 0:i.data)||void 0===r?void 0:r.the_key,value:null===(l=null===(c=null===(s=null===(a=null==t?void 0:t.data)||void 0===a?void 0:a.the_json_list)||void 0===s?void 0:s.the_json_list_value)||void 0===c?void 0:c.data)||void 0===l?void 0:l.the_value})})),K=Object.assign(Object.assign({},K),{method:F,methodURL:U,authType:j,username:M,password:W,bearerToken:G,json:e,script:q,body:H})}else"function"===E&&(K=Object.assign(Object.assign({},K),{language:$,return:z,codeEditor:J}));const Z=[],ee=[],te=[];return(null==Y?void 0:Y.length)&&(null==Y||Y.forEach(e=>{var t;Z.push(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.the_image_url)})),(null==X?void 0:X.length)&&(null==X||X.forEach(e=>{var t;ee.push(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.the_video_link)})),(null==Q?void 0:Q.length)&&(null==Q||Q.forEach(e=>{var t;te.push(null===(t=e.data)||void 0===t?void 0:t.the_doc_url)})),K=Object.assign(Object.assign({},K),{imageList:Z,linkList:te,videoList:ee}),K});f=e}yield function(e){return Ti(this,void 0,void 0,function*(){document.getElementById(e).showModal()})}("widget-documentation-preview-modal"),function(e,t){Ti(this,void 0,void 0,function*(){const n=document.getElementById("documentation-view");if(0!=u.B.DOCUMENTATION_WIDGET)return void(yield Si(u.B.DOCUMENTATION_WIDGET,n,{currentWidgetId:t}));const o=document.getElementById("documentation-preview");o.innerHTML="",e&&(null==e?void 0:e.length)&&"string"!=typeof e?null==e||e.forEach(e=>{var t,n,i,r;const a=document.createElement("h3");let s="";switch(null==e?void 0:e.type){case"api":s="API";break;case"function":s="Functions and Classes";break;case"imgAndLink":s="Images and Links";break;default:s=""}a.innerHTML=`\n ${null==e?void 0:e.title} ${s?"("+s+")":""}\n `,null==o||o.appendChild(a);const c=document.createElement("div");c.classList.add("widget-doc-content"),(null==e?void 0:e.content)&&(c.innerHTML=e.content,null==o||o.appendChild(c));const l=document.createElement("div");if(l.classList.add("widget-doc-section"),"api"===e.type){let n="";n="basicAuth"===e.authType?`\n <p>username: <code>${null==e?void 0:e.username}</code></p>\n <p>password: <code>${null==e?void 0:e.password}</code></p>\n `:"bearerToken"===e.authType?`\n <h6>Token: <code>${null==e?void 0:e.bearerToken}</code></h6>\n `:"None";const o=e.json.map(e=>`${null==e?void 0:e.key}: ${null==e?void 0:e.value}`).join(", "),i=document.createElement("pre");i.textContent=o,l.innerHTML=`\n <div class="pv-3">\n <h6>Method Type: <code>${null==e?void 0:e.method.toUpperCase()}</code></h6>\n <h6>Endpoint: <code>${null==e?void 0:e.methodURL}</code></h6>\n </div>\n <div class="pv-3">\n <h6>Auth Type: <code>${(null===(t=null==e?void 0:e.authType)||void 0===t?void 0:t.toUpperCase())||""}</code></h6>\n ${n}\n </div>\n <div class="pv-3">\n <h6>JSON</h6>\n <code class="pre-wrapper" id="json-list-pre"></code>\n </div>\n <div class="pv-3">\n <h6>Body</h6>\n ${e.body}\n </div>\n <div class="pv-3">\n <h6>Scripts</h6>\n ${e.script}\n </div>\n `;const r=l.querySelector("#json-list-pre");r&&(r.appendChild(i),r.removeAttribute("id"))}else if("function"===e.type){const t=document.createElement("pre");t.textContent=null==e?void 0:e.codeEditor;const n=document.createElement("pre");n.textContent=null==e?void 0:e.return,l.innerHTML=`\n <div class="mv-3">\n <h6>Parameter</h6>\n <p>Language: ${null==e?void 0:e.language}</p>\n <code class="pre-wrapper" id="editor-pre"></pre></code>\n <h6>Returns</h6>\n <code class="pre-wrapper" id="return-pre"></code>\n </div>\n `;const o=l.querySelector("#editor-pre");o&&(o.appendChild(t),o.removeAttribute("id"));const i=l.querySelector("#return-pre");i&&(i.appendChild(n),i.removeAttribute("id"))}const d=document.createElement("div");d.classList.add("mv-3");const u=null===(n=null==e?void 0:e.linkList)||void 0===n?void 0:n.map(e=>`\n <p>${e}</p>\n `).join(""),h=null===(i=null==e?void 0:e.imageList)||void 0===i?void 0:i.map(e=>`\n <img src="${e}">\n `).join(""),p=null===(r=null==e?void 0:e.videoList)||void 0===r?void 0:r.map(e=>`\n <iframe width="560" height="315" src="${e}" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>\n `).join(""),f=(null==u?void 0:u.length)?`\n <div class="mv-3">\n <h6>Web links</h6>\n ${u}\n </div>\n `:"",m=(null==h?void 0:h.length)?`\n <h6>Attachments</h6>\n <div class="documentation-attachments">\n ${h}\n </div>\n `:"",y=(null==p?void 0:p.length)?`\n <h6>Videos</h6>\n <div class="documentation-attachments">\n ${p}\n </div>\n `:"";d.innerHTML=`\n <div class="mv-3">\n ${f}\n ${m}\n ${y}\n </div>\n <p class="documentation-creator">- added by: <span>${null==e?void 0:e.creatorEmail}</span></p>\n `,null==l||l.appendChild(d),null==o||o.appendChild(l)}):void 0!==e&&(o.innerHTML=e)})}(f,e)}))})}function Mi(e){return Ti(this,void 0,void 0,function*(){const t=document.getElementById(e),n=null==t?void 0:t.querySelector("form");null==n||n.reset(),null==t||t.close()})}var Wi=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function ji(e){return Wi(this,arguments,void 0,function*(e,t=null,n="",o={concepts:[],connections:[]}){var i,r,a,s;if(rr)try{const c=yield fr("CreateData",{json:e,ofConcept:t,typeConcept:n,actions:o});return(null===(r=null===(i=null==c?void 0:c.actions)||void 0===i?void 0:i.concepts)||void 0===r?void 0:r.length)&&(o.concepts=JSON.parse(JSON.stringify(c.actions.concepts))),(null===(s=null===(a=null==c?void 0:c.actions)||void 0===a?void 0:a.connections)||void 0===s?void 0:s.length)&&(o.connections=JSON.parse(JSON.stringify(c.actions.connections))),c.data}catch(e){Cr(e)}let c=999,l=999,d=(0,V.o)();for(const i in e){let r=Vi(i);if("string"!=typeof e[i]&&"number"!=typeof e[i])if(null==t||0==t.id){d=yield(0,te.k)(r,"",!0,c,4,l,void 0,o),Array.isArray(e[i])&&(r=qi(r)),yield ji(e[i],d,r,o)}else{Array.isArray(e[i])&&(r=Hi(r));let a=Hi(i),s=yield(0,te.k)(r,"",!0,c,4,l,void 0,o);d=s;let u=zi(n,a),h=yield(0,ue.$)(u,l,c,c,o);yield(0,Zt.F)(t.id,s.id,h.id,1e3,h.characterValue,c,o),Array.isArray(e[i])&&(r=qi(r)),yield ji(e[i],s,r,o)}else{let r=zi(n,i),a=yield(0,ue.$)(r,l,c,c,o),s=yield(0,te.k)(i,e[i].toString(),!1,c,4,l,void 0,o);null!=t&&(yield(0,Zt.F)(t.id,s.id,a.id,1e3,r,c,o))}}return d})}function Vi(e){return e.startsWith("the_")?e:"the_"+e}function qi(e){return e.endsWith("_s")?e:e+"_s"}function Hi(e){return e.replace(/_s$/,"")}const $i=e=>/^[+-]?\d+(\.\d+)?$/.test(e);function zi(e,t){return $i(t)?e+"_":e+"_"+function(e){return e.startsWith("the_")?e.slice(4):e}(t)}class Ji{constructor(){this.prototype="",this.required=[],this.optional=[],this.field="string",this.childPrototypes=[],this.isCompositional=!1,this.options=[],this.isQueryType=!1,this.querySelector=null,this.concepts=[],this.connections=[],this.addedConcepts=[],this.addedConnections=[]}}function Qi(e,t){if(Array.isArray(e)&&Array.isArray(t))for(let n=0;n<t.length;n++)e.push(t[n]);return e}var Yi=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function Xi(e){return Yi(this,arguments,void 0,function*(e,t=null){let n=[],o=[],i=[],r=(0,V.o)();try{null==t&&(t=new Eo,yield t.initialize());let a=[];if(e.isCompositional){if(r=yield function(e,t,n,o){return Yi(this,void 0,void 0,function*(){let i=(0,V.o)(),r=yield o.MakeTheInstanceConceptLocal("the_composition","",!0,999,999,999),a=yield o.MakeTheTypeConceptLocal("the_composition_type",999,999,999),s=yield o.MakeTheTypeConceptLocal(e,999,999,999),c=yield o.CreateTheConnectionLocal(r.id,s.id,a.id,1e3,"the_composition_type");return i=r,t.push(a),t.push(s),n.push(c),i})}(e.prototype,n,o,t),e.isQueryType){let o=yield function(e,t,n){return Yi(this,void 0,void 0,function*(){let o=[],i=[],r=function(){let e="the_composition_filter_type";return e}(0,!0),a=function(){let e="the_composition_selector";return e}(0,!0),s=yield n.MakeTheTypeConceptLocal(r,999,999,999),c=yield n.MakeTheTypeConceptLocal(a,999,999,999);if(null!=e){let l=yield n.MakeTheTypeConceptLocal(e.selector,999,999,999);o.push(l);let d=yield n.MakeTheTypeConceptLocal(e.filterType,999,999,999);o.push(l),o.push(d);let u=yield n.CreateTheConnectionLocal(t.id,l.id,c.id,1e3,a,999);i.push(u);let h=yield n.CreateTheConnectionLocal(t.id,d.id,s.id,1e3,r,999);i.push(h)}return{concepts:o,connections:i}})}(e.querySelector,r,t),a=o.concepts;Qi(i,o.connections),Qi(n,a)}if(e.options.length>0){let o=yield function(e,t,n){return Yi(this,void 0,void 0,function*(){let o=[],i=[],r=function(){let e="the_composition_s_option";return e}(0,!0),a=yield n.MakeTheTypeConceptLocal(r,999,999,999);for(let s=0;s<e.length;s++){let c=e[s].type,l=e[s].value,d=yield n.MakeTheInstanceConceptLocal(c,l,!1,999,999,999);o.push(d);let u=yield n.CreateTheConnectionLocal(t.id,d.id,a.id,1e3,r,999);i.push(u)}return{concepts:o,connections:i}})}(e.options,r,t),a=o.concepts;Qi(i,o.connections),Qi(n,a)}}else r=yield function(e,t){return Yi(this,void 0,void 0,function*(){let n=yield(0,Q.A)(5124),o=yield t.MakeTheTypeConceptLocal(e,999,999,999),i=yield function(e,t,n,o){return Yi(this,void 0,void 0,function*(){let n=yield o.CreateTheConceptLocal("",t.characterValue,999,e.id,t.id,4,!1);return n.characterValue=t.characterValue,n.typeCharacter=t.characterValue,n.isComposition=!0,n.type=t,n})}(n,o,0,t);return i})}(e.prototype,t),i=yield Zi(e.required,r,n,t,!0),a=yield Zi(e.optional,r,n,t),n.push(r);let s=Ki(r,!0,!0),c=yield t.MakeTheTypeConceptLocal(s,999,999,999);if(n.push(c),e.childPrototypes.length>0)for(let o=0;o<e.childPrototypes.length;o++){let a=yield Xi(e.childPrototypes[o]),l=a.mainConcept,d=a.connections,u=a.concepts,h=yield t.CreateTheConnectionLocal(r.id,l.id,c.id,1e3,s,999);i.push(h),Qi(i,d),Qi(n,u),n.push(l)}Qi(i,a),Qi(i,o),Qi(n,e.addedConcepts),Qi(i,e.addedConnections),e.concepts=n,e.connections=i}catch(e){null==t||t.rollbackTransaction()}return{concepts:n,connections:i,mainConcept:r}})}function Ki(e,t=!0,n=!1){var o;let i="the_prototype_of_"+(null===(o=e.type)||void 0===o?void 0:o.characterValue);return i+=t?"_requires":"_optional",n&&(i+="_the_composition"),i}function Zi(e,t,n,o){return Yi(this,arguments,void 0,function*(e,t,n,o,i=!1,r=!1){let a=[],s=[],c=Ki(t,i,r),l=yield o.MakeTheTypeConceptLocal(c,999,999,999);n.push(l);for(let t=0;t<e.length;t++){let n=yield o.MakeTheTypeConceptLocal(e[t],999,999,999);a.push(n)}for(let e=0;e<a.length;e++){let n=yield o.CreateTheConnectionLocal(t.id,a[e].id,l.id,1e3,c,999);s.push(n)}for(let e=0;e<a.length;e++)n.push(a[e]);return s})}var er=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function tr(e){return er(this,void 0,void 0,function*(){let t;try{const n=yield fetch(u.B.GetCachedImage(e),{method:"GET"});return n.ok?t=n.body:(0,p.ry)(n),t}catch(e){throw Error,t}})}var nr=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function or(e){return nr(this,arguments,void 0,function*(e,t="normal"){let n;let o=e.split("/").pop();if("small"==t){let e=null==o?void 0:o.split(".");if(e){o=e[0]+"_small."+e[1]}}return o&&(n=yield tr(o)),n})}function ir(e,t="normal"){let n=e;try{if(e){let o=e.split("/").pop();if("small"==t){let e=null==o?void 0:o.split(".");if(e){o=e[0]+"_small."+e[1]}}o&&(n=u.B.GetCachedImage(o))}}catch(e){}return n}var rr,ar=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};const sr=Date.now().toString(36)+Math.random().toString(36).substring(2);let cr=[],lr=[],dr=!1;function ur(e){dr=e}function hr(e="",t){Oe.b.BearerAccessToken=e,rr&&fr("updateAccessToken",{accessToken:e,session:Oe.b.sessionId})}function pr(){return ar(this,arguments,void 0,function*(e="",t="",n="",o="",i=!0,r="",a=void 0,c={},l={}){var d,h,f;try{u.B.BASE_URL=e,u.B.AI_URL=t,u.B.NODE_URL=o,u.B.BASE_APPLICATION=r,u.B.LOG_SERVER=null!==(d=l.logserver)&&void 0!==d?d:"https://logdev.freeschema.com",hr(n),yield Oe.b.hydrateProfile();let i=Math.floor(1e8*Math.random());u.B.setRandomizer(i),u.B.isPwa=null!==(h=l.isPwa)&&void 0!==h&&h,po.B.setValue("enableCache",null===(f=l.enableCache)||void 0===f||f);const m={logApplication:!1,logPackage:!1,accessTracker:!1,isTest:!1};if(u.B.FLAGS=m,u.B.FLAGS=Object.assign(Object.assign({},m),c),function(e){const t=mo.V.logfunction("initializeFlags",arguments);try{return e.logApplication&&(vo.initialize(),mo.V.logApplicationActivationStatus=!0),e.logPackage&&(mo.V.logPackageActivationStatus=!0),e.accessTracker&&(Pe.J.activateStatus=!0),e.isTest&&(s.B.isDataLoaded=!0,s.B.isCharacterLoaded=!0,s.B.isTypeLoaded=!0,s.B.isLocalDataLoaded=!0,s.B.isLocalTypeLoaded=!0,s.B.isLocalCharacterLoaded=!0,s.B.isConnectionLoaded=!0,s.B.isConnectionTypeLoaded=!0,s.B.isLocalConnectionLoaded=!0),mo.V.logUpdate(t),e}catch(e){throw(0,p.ey)(t,"initializeFlags",e),e}}(u.B.FLAGS),!("serviceWorker"in navigator))return void(yield yr());if(yield function(){return ar(this,void 0,void 0,function*(){var e;let t=u.B.BASE_APPLICATION+"_cacheServers",n=u.B.BASE_APPLICATION+"_config",o=u.B.BASE_APPLICATION+"_session",i=sessionStorage.getItem(t),r=sessionStorage.getItem(n),a=null!==(e=sessionStorage.getItem(o))&&void 0!==e?e:"999",s=parseInt(a);void 0!==i&&"undefined"!==i||(u.B.NODE_CACHE_URL=u.B.BASE_URL),i=JSON.parse(i);const c=JSON.parse(r);function l(){return ar(this,arguments,void 0,function*(e=!0){var i;let r;try{let a=null!==(i=u.B.BASE_APPLICATION)&&void 0!==i?i:"boomconsole";if(r=yield fetch(u.B.getAppConfig()+"?application="+a,{method:"POST"}),!r.ok)throw new Error("Failed to sync data to the server.");const s=yield r.json();s.success&&(sessionStorage.setItem(t,JSON.stringify(s.servers)),sessionStorage.setItem(n,JSON.stringify(s.config)),e&&(sessionStorage.setItem(o,s.session),Oe.b.setSession(s.session)),s.servers?u.B.NODE_CACHE_URL=s.servers[0]:u.B.NODE_CACHE_URL=u.B.BASE_URL,s.config&&(u.B.DOCUMENTATION_WIDGET=s.config.documentationWidget))}catch(e){}})}i&&c&&c.documentationWidget&&999!=s?(Array.isArray(i)&&i.length?u.B.NODE_CACHE_URL=i[0]:u.B.NODE_CACHE_URL=u.B.BASE_URL,Oe.b.setSession(s),u.B.DOCUMENTATION_WIDGET=c.documentationWidget,l(!1)):yield l(),navigator.serviceWorker&&navigator.serviceWorker.controller&&fr("SESSION_DATA",{type:"SESSION_DATA",data:u.B.NODE_CACHE_URL,session:Oe.b.sessionId})})}(),function(){navigator.serviceWorker.addEventListener("message",e=>ar(this,void 0,void 0,function*(){var t,n,o,i;try{if(e.data&&"API_401"===e.data.type){const{requestDetails:o}=e.data,i={method:o.method,headers:new Headers(o.headers),body:o.body},r=yield fetch(o.url,i),a=yield null==r?void 0:r.json();null===(n=null===(t=null===navigator||void 0===navigator?void 0:navigator.serviceWorker)||void 0===t?void 0:t.controller)||void 0===n||n.postMessage({type:"API_RESPONSE",messageId:e.data.messageId,response:new Response(a,{status:r.status,statusText:r.statusText,headers:r.headers})})}}catch(t){null===(i=null===(o=null===navigator||void 0===navigator?void 0:navigator.serviceWorker)||void 0===o?void 0:o.controller)||void 0===i||i.postMessage({type:"API_RESPONSE",messageId:e.data.messageId})}}))}(),function(){fo.x.addEventListener("message",e=>ar(this,void 0,void 0,function*(){const{type:t,payload:n}=e.data;if(!t)return;let o={success:!1,data:void 0};mr[t]&&(o=yield mr[t](n))}))}(),a&&a.activate&&a.manual)yield new Promise((e,t)=>{navigator.serviceWorker.ready.then(t=>ar(this,void 0,void 0,function*(){rr=t.active,yield wr(),e("done")})).catch(e=>{t(e)}).finally(()=>{}),setTimeout(()=>t("Timeout ready"),3e4)});else if(a&&(null==a?void 0:a.activate))try{yield function(e){var t=arguments;return ar(this,void 0,void 0,function*(){const n=mo.V.logfunction("handleRegisterServiceWorker",t);yield new Promise((t,o)=>{var i,r;let a=!1;navigator.serviceWorker.register(null!==(i=e.pathToSW)&&void 0!==i?i:"./serviceWorker.bundle.js",{scope:null!==(r=e.scope)&&void 0!==r?r:"/"}).then(e=>ar(this,void 0,void 0,function*(){setInterval(()=>{lr.length&&gr()},2e3),e.onupdatefound=()=>{const n=e.installing;n&&(n.onstatechange=()=>ar(this,void 0,void 0,function*(){"installing"===n.state&&(rr=void 0),"activated"!==n.state&&"redundant"!==n.state||!navigator.serviceWorker.controller||(rr=n,setTimeout(()=>{gr()},5e3),yield wr(),a=!0,gr(),t())}))},e.addEventListener("controllerchange",()=>ar(this,void 0,void 0,function*(){navigator.serviceWorker.controller&&(rr=navigator.serviceWorker.controller,yield wr())})),(e.installing||e.waiting||e.active)&&e.addEventListener("statechange",e=>ar(this,void 0,void 0,function*(){var t;"activating"===(null===(t=null==e?void 0:e.target)||void 0===t?void 0:t.state)&&(rr=navigator.serviceWorker.controller,yield wr())})),e.active?(rr=e.active,yield wr(),gr(),t()):setTimeout(()=>{a||o("Not Completed Initialization")},1e4)})).catch(e=>ar(this,void 0,void 0,function*(){yield yr(),o(e),(0,p.ey)(n,"handleRegisterServiceWorker",e)}))})})}(a)}catch(e){yield yr()}else yield yr();return!0}catch(e){yield yr()}})}function fr(e,t){return ar(this,arguments,void 0,function*(e,t,n=0){let o=!1;const i=Math.random().toString(36).substring(2);t.messageId=i,t.TABID=sr;const r=JSON.parse(JSON.stringify(t));let a;return"checkProcess"!=e&&0==n&&(a=setInterval(()=>ar(this,void 0,void 0,function*(){if(!o&&!(yield function(e){return ar(this,void 0,void 0,function*(){var t;try{const n=yield fr("checkProcess",{checkMessageId:e});if(null===(t=null==n?void 0:n.data)||void 0===t?void 0:t.processing)return!0}catch(e){return!1}})}(i))&&(clearInterval(a),!o&&0==n&&"checkProcess"!=e)){return yield fr(e,t,n+1)}}),2e3)),new Promise((n,s)=>{if(navigator.serviceWorker.controller,navigator.serviceWorker.controller||rr){const c=r=>{var l,d,u,h,f,m;(null===(l=null==r?void 0:r.data)||void 0===l?void 0:l.messageId)==i&&(o=!0,clearInterval(a),r.data.success||(401==(null===(d=null==r?void 0:r.data)||void 0===d?void 0:d.status)?s((0,p.ry)(new Response("Unauthorized",{status:401,statusText:null===(u=null==r?void 0:r.data)||void 0===u?void 0:u.statusText}))):500==(null===(h=null==r?void 0:r.data)||void 0===h?void 0:h.status)?s((0,p.Mb)(new Response("Internal Server Error",{status:500,statusText:null===(f=null==r?void 0:r.data)||void 0===f?void 0:f.statusText}))):s(`Failed to handle action ${e} ${JSON.stringify(t)}, Response: ${JSON.stringify(r.data)}`)),(null===(m=r.data)||void 0===m?void 0:m.actions)&&(t.actions=JSON.parse(JSON.stringify(r.data.actions))),n(r.data),navigator.serviceWorker.removeEventListener("message",c))};if(navigator.serviceWorker.addEventListener("message",c),navigator.serviceWorker.controller)navigator.serviceWorker.controller.postMessage({type:e,payload:r});else if(rr)try{rr.postMessage({type:e,payload:r})}catch(t){rr.postMessage({type:e,payload:r})}else setTimeout(()=>{rr?null==rr||rr.postMessage({type:e,payload:t}):(clearInterval(a),s("Service worker not ready"))},3e4);setTimeout(()=>{clearInterval(a),s(`No response from service worker after timeout: ${e}`),navigator.serviceWorker.removeEventListener("message",c)},21e4)}else lr.push({message:{type:e,payload:r}}),"init"==e&&(clearInterval(a),n(null))})})}const mr={GetLinkListener:e=>ar(void 0,void 0,void 0,function*(){const t=cr.find(t=>t.listenerId==e.listenerId);return null==t||t.callback(e.data),{success:!0}}),dispatchEvent:e=>ar(void 0,void 0,void 0,function*(){if(rr){let t=new CustomEvent(e.id||"",e.data);dispatchEvent(t)}return{success:!0}}),checkInit:e=>ar(void 0,void 0,void 0,function*(){return navigator.serviceWorker.controller&&(rr=navigator.serviceWorker.controller),yield wr(),{success:!0}})};function yr(){return ar(this,void 0,void 0,function*(){yield(0,ho.A)();(new Date).getTime();yield Promise.all([(0,i.A)().then(()=>{}),(0,uo.Ay)().then(()=>{}),(0,lo.a)().then(()=>{s.B.isConnectionLoaded=!0,s.B.isConnectionTypeLoaded=!0}),(0,lo.p)().then(()=>{s.B.isLocalConnectionLoaded=!0}),(0,uo.xd)().catch(e=>{throw e}),r.i.init(),a.a.init()]).catch(e=>{})})}function vr(e,t={}){if(rr||"undefined"!=typeof window){let n=new CustomEvent(`${e}`,t);dispatchEvent(n)}else fo.x.postMessage({type:"dispatchEvent",payload:{id:e,data:t}})}function gr(){return ar(this,void 0,void 0,function*(){const e=lr.find(e=>{var t;return"init"==(null===(t=null==e?void 0:e.message)||void 0===t?void 0:t.type)});if(e){const t=lr.indexOf(e);t>-1&&lr.splice(t,1),yield fr(null==e?void 0:e.type,null==e?void 0:e.payload)}for(;lr.length>0;){const{message:e,resolve:t,reject:n}=lr.shift();yield fr(e.type,e.payload)}})}const Cr=e=>{if(e instanceof H.z)throw e};function wr(){return ar(this,void 0,void 0,function*(){yield fr("init",{url:u.B.BASE_URL,aiurl:u.B.AI_URL,accessToken:Oe.b.BearerAccessToken,nodeUrl:u.B.NODE_URL,enableAi:!1,applicationName:u.B.BASE_APPLICATION,flags:u.B.FLAGS})})}},9003:(e,t,n)=>{n.d(t,{S5:()=>l,kH:()=>u,qI:()=>c});var o=n(1863),i=n(8957),r=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};let a=10;class s{}function c(e){const t=i.Logger.logfunction("openDatabase",arguments);return new Promise(function(n,r){s.db&&(i.Logger.logUpdate(t),n(s.db));let l=i.BaseUrl.BASE_URL+"_FreeSchemaLocal"+i.BaseUrl.BASE_APPLICATION;const u=indexedDB.open(l,a);u.onupgradeneeded=e=>{var t=e.target.result,o="localconcept",r="localconnection",a="localid";if(t.objectStoreNames.contains(o)&&t.deleteObjectStore(o),t.objectStoreNames.contains(r)&&t.deleteObjectStore(r),t.objectStoreNames.contains(a)&&t.deleteObjectStore(a),!t.objectStoreNames.contains(o)){t.createObjectStore(o,{keyPath:"id"}).transaction.oncomplete=e=>{}}if(!t.objectStoreNames.contains(r)){t.createObjectStore(r,{keyPath:"id"}).transaction.oncomplete=e=>{}}if(!t.objectStoreNames.contains(a)){t.createObjectStore(a,{keyPath:"id"}).transaction.oncomplete=e=>{d(a,{id:0,value:-100}),d(a,{id:1,value:-200}),d(a,{id:3,value:i.BaseUrl.getRandomizer()})}}n(t)},u.onerror=n=>{indexedDB.deleteDatabase(l),c(e),(0,o.ey)(t,"openDatabase",n),r(n)},u.onsuccess=function(e){var o=e.target;s.db=o.result,i.Logger.logUpdate(t),n(s.db)}})}function l(e){var t=arguments;return r(this,void 0,void 0,function*(){const n=i.Logger.logfunction("getObjectsFromLocalIndexDb",t);return new Promise(function(t,r){c(e).then(o=>{var r=[];var a=o.transaction(e,"readwrite").objectStore(e).getAll();a.onsuccess=()=>{const e=a.result;for(var o=0;o<e.length;o++)r.push(e[o]);i.Logger.logUpdate(n),t(r)}}).catch(e=>{let t={status:400,ok:!1,message:"Cannot get objects from database because you cannot open the Local database",data:e};(0,o.ey)(n,"getObjectsFromLocalIndexDb",t),r(t)})})})}function d(e,t){const n=i.Logger.logfunction("storeToDatabase",[e,"localindexdb"]);return new Promise(function(r,a){c(e).then(s=>{const c=s.transaction(e,"readwrite").objectStore(e).add(t);c.onsuccess=e=>{i.Logger.logUpdate(n),r(t)},c.onerror=i=>{let r={status:400,ok:!1,message:"Cannot store to the Local database "+e,data:i,body:t};(0,o.ey)(n,"storeToDatabase",r),a(r)}}).catch(e=>{let t={status:400,ok:!1,message:"Cannot store to database because you cannot open the Local database",data:e};(0,o.ey)(n,"storeToDatabase",t),a(t)})})}function u(e,t){const n=i.Logger.logfunction("UpdateToDatabase",arguments);return new Promise(function(r,a){c(e).then(s=>{const c=s.transaction(e,"readwrite").objectStore(e).put(t);c.onsuccess=e=>{i.Logger.logUpdate(n),r(t)},c.onerror=i=>{let r={status:400,ok:!1,message:"Cannot Update to the Local database"+e,data:i,body:t};(0,o.ey)(n,"UpdateToDatabase",r),a(r)}}).catch(e=>{let t={status:400,ok:!1,message:"Cannot update to database because you cannot open the Local database",data:e};(0,o.ey)(n,"UpdateToDatabase",t),a(t)})})}},9371:(e,t,n)=>{let o=n(3152);class i extends o{constructor(e){super(e),this.type="comment"}}e.exports=i,i.default=i},9577:(e,t,n)=>{let o=n(7793),i=n(1106),r=n(8339);function a(e,t){let n=new i(e,t),o=new r(n);try{o.parse()}catch(e){throw e}return o.root}e.exports=a,a.default=a,o.registerParse(a)},9581:(e,t,n)=>{n.d(t,{B:()=>o});class o{static setRandomizer(e){this.BASE_RANDOMIZER=e}static getRandomizer(){return this.BASE_RANDOMIZER}static GetConceptUrl(){return!this.NODE_CACHE_URL||this.NODE_CACHE_URL&&"string"==typeof this.NODE_CACHE_URL&&""===this.NODE_CACHE_URL.trim()?this.BASE_URL+"/api/getConcept":this.NODE_CACHE_URL+"/api/getConcept"}static GetConnectionUrl(){return!this.NODE_CACHE_URL||this.NODE_CACHE_URL&&"string"==typeof this.NODE_CACHE_URL&&""===this.NODE_CACHE_URL.trim()?this.BASE_URL+"/api/get-connection-by-id":this.NODE_CACHE_URL+"/api/get-connection-by-id"}static GetConceptBulkUrl(){return!this.NODE_CACHE_URL||this.NODE_CACHE_URL&&"string"==typeof this.NODE_CACHE_URL&&""===this.NODE_CACHE_URL.trim()?this.BASE_URL+"/api/get_concept_bulk":this.NODE_CACHE_URL+"/api/get_concept_bulk"}static GetConnectionBulkUrl(){return!this.NODE_CACHE_URL||this.NODE_CACHE_URL&&"string"==typeof this.NODE_CACHE_URL&&""===this.NODE_CACHE_URL.trim()?this.BASE_URL+"/api/get_connection_bulk":this.NODE_CACHE_URL+"/api/get_connection_bulk"}static GetAllConceptsOfUserUrl(){return this.BASE_URL+"/api/get_all_concepts_of_user"}static GetAllConnectionsOfUserUrl(){return this.BASE_URL+"/api/get_all_connections_of_user"}static GetAllConnectionsOfCompositionUrl(){return this.BASE_URL+"/api/get_all_connections_of_composition"}static GetAllConnectionsOfCompositionBulkUrl(){return this.BASE_URL+"/api/get_all_connections_of_composition_bulk"}static GetConceptByCharacterValueUrl(){return this.BASE_URL+"/api/get_concept_by_character_value"}static GetConceptByCharacterAndTypeUrl(){return this.BASE_URL+"/api/get_concept_by_character_and_type"}static GetConceptByCharacterAndCategoryUrl(){return this.BASE_URL+"/api/get_concept_by_character_and_category"}static GetConceptByCharacterAndCategoryDirectUrl(){return this.BASE_URL+"/api/get_concept_by_character_and_category_direct"}static GetCharacterByCharacterUrl(){return this.BASE_URL+"/api/get_character_by_character"}static GetAllConceptsByTypeUrl(){return this.BASE_URL+"/api/get_all_concepts_by_type"}static GetAllConnectionsOfConceptUrl(){return this.BASE_URL+"/api/get-link-connections"}static GetAllConnectionsToConceptUrl(){return this.BASE_URL+"/api/get-link-reverse-connections"}static GetAllAiData(){return this.BASE_URL+"/api/get-preloaded-concepts"}static getAppConfig(){return this.NODE_URL+"/api/v1/config"}static PostPrefetchConceptConnections(){return this.NODE_URL+"/api/v1/access-tracker/sync-access-tracker"}static GetSuggestedConcepts(){return this.NODE_URL+"/api/v1/access-tracker/list-concepts-file"}static GetSuggestedConnections(){return this.NODE_URL+"/api/v1/access-tracker/list-connections-file"}static PostLogger(){return this.LOG_SERVER+"/api/logger"}static LogHealth(){return this.LOG_SERVER+"/api/check"}static GetAllPrefetchConnectionsUrl(){return this.BASE_URL+"/api/get_all_connections_of_user?inpage=500"}static GetAllLinkerConnectionOfConceptUrl(){return this.BASE_URL+"/api/get-all-linkers-from-concept"}static GetAllLinkerConnectionToConceptUrl(){return this.BASE_URL+"/api/get-all-linkers-to-concept"}static DeleteConceptUrl(){return this.BASE_URL+"/api/delete_concept"}static DeleteUserUrl(){return this.BASE_URL+"/api/deleteuser"}static RecursiveSearchUrl(){return this.BASE_URL+"/api/recursivesearch-concept-connection"}static SearchLinkMultipleAllApiUrl(){return this.BASE_URL+"/api/Connection/search-link-multiple-all-ccs"}static MakeTheNameInBackendUrl(){return this.BASE_URL+"/api/make-name-from-frontend"}static SearchAllTypeWithLinker(e=!0){return e?this.BASE_URL+"/api/search-all-with-linker-ccs":this.BASE_URL+"/api-search-compositions-internal-clean-ccs"}static LoginUrl(){return this.BASE_URL+"/api/auth/login"}static SignupUrl(){return this.BASE_URL+"/api/auth/signup"}static GetCompositionConnectionBetweenTwoConceptsUrl(){return this.BASE_URL+"/api/get-composition-connection-between-two-concepts"}static SearchCompositionsUrl(){return this.BASE_URL+"/api/search-compositions"}static SearchLinkMultipleAll(){return this.BASE_URL+"/api/Connection/search-link-multiple-all"}static CreateSessionId(){return this.BASE_URL+"/api/create-session-id-remote"}static CreateSessionVisitUrl(){return this.BASE_URL+"/api/create-remote-session-visit"}static ViewInternalDataUrl(){return this.BASE_URL+"/api/view-api-internal-data-ccs-id-bulk"}static SearchInternalWithAuthenticatedCcsUrl(){return this.BASE_URL+"/api/search-composition-internal-authenticated-ccs"}static SearchInternalWithCcsUrl(){return this.BASE_URL+"/api-search-compositions-internal-clean-ccs"}static CreateGhostConceptApiUrl(e=!0){return e?o.NODE_URL+"/api/v1/local-concepts":o.NODE_URL+"/api/v1/local-concepts-without-auth"}static CreateGhostConnectionApiUrl(){return o.NODE_URL+"/api/v1/local-connections"}static GetRealConceptById(){return o.NODE_URL+"/api/v1/local-concepts-translate"}static GetReservedIdUrl(){return this.BASE_URL+"/api/get_reserved_ids"}static GetReservedConnectionIdUrl(){return this.BASE_URL+"/api/get_reserved_connection_ids"}static CreateTheTextDataUrl(){return this.BASE_URL+"/api/create_text_data"}static CreateTheCharacterDataUrl(){return this.BASE_URL+"/api/create_character_data"}static CreateTheConceptUrl(){return this.BASE_URL+"/api/create_the_concept"}static CreateTheConnectionUrl(){return this.BASE_URL+"/api/create_the_connection"}static CreateTheConnectionNewUrl(){return this.BASE_URL+"/api/create_the_connection_new"}static MakeTheTypeConceptUrl(){return this.BASE_URL+"/api/make_the_type_concept"}static DeleteTheConnectionUrl(){return this.BASE_URL+"/api/delete_connection"}static DeleteTheConnectionBulkUrl(){return this.BASE_URL+"/api/delete_connection_bulk"}static GetTypeConceptBulk(){return this.BASE_URL+"/api/get_type_concept_by_character_bulk"}static UploadFileLimitUrl(){return this.BASE_URL+"/api/upload/limit"}static FreeschemaQueryUrl(){return this.BASE_URL+"/api/freeschema-query"}static uploadImageUrl(){return this.BASE_URL+"/api/Image/UploadImage"}static uploadImageUrlWithSmall(){return this.BASE_URL+"/api/Image/UploadImageV2"}static uploadFileUrl(){return this.BASE_URL+"/api/Image/UploadFile"}static sendMail(){return this.BASE_URL+"/api/sendmail"}static sendBulkMail(){return this.BASE_URL+"/api/sendmail/bulk"}static getWidgetData(){return this.BASE_URL+"/api/get-widget"}static getLatestWidgetData(){return!this.NODE_CACHE_URL||this.NODE_CACHE_URL&&"string"==typeof this.NODE_CACHE_URL&&""===this.NODE_CACHE_URL.trim()?this.BASE_URL+"/api/get-latest-widget":this.NODE_CACHE_URL+"/api/get-latest-widget"}static getRecentWidgetData(){return this.BASE_URL+"/api/get-recent-widget"}static getConnectionsByTypes(){return this.BASE_URL+"/api/get-connection-by-types"}static GetConnectionsBetweenUrl(){return this.BASE_URL+"/api/get-connection-between"}static CreatePrototypeUrl(){return this.BASE_URL+"/api/create-prototype"}static GetCachedImage(e){return"https://cdn.boomconcole.com/freeschema/"+e}}o.BASE_URL="https://localhost:7053/",o.NODE_CACHE_URL="",o.AI_URL="https://ai.freeschema.com",o.MQTT_URL="192.168.1.249",o.NODE_URL="http://localhost:5001",o.LOG_SERVER="https://logdev.freeschema.com",o.BASE_APPLICATION="",o.DOCUMENTATION_WIDGET=0,o.isNearestCache=!0,o.isPwa=!1,o.FLAGS={logApplication:!1,logPackage:!1,accessTracker:!1,isTest:!1},o.BASE_RANDOMIZER=999},9606:(e,t,n)=>{t.__esModule=!0,t.unesc=t.stripComments=t.getProp=t.ensureObject=void 0;var o=s(n(5286));t.unesc=o.default;var i=s(n(6291));t.getProp=i.default;var r=s(n(1557));t.ensureObject=r.default;var a=s(n(8354));function s(e){return e&&e.__esModule?e:{default:e}}t.stripComments=a.default},9635:(e,t,n)=>{n.d(t,{x:()=>o});const o=new BroadcastChannel("Freeschema_mftsccs_browser_channel")},9700:(e,t,n)=>{n.d(t,{V:()=>l});var o,i=n(8957),r=n(4024),a=n(1863),s=n(3518),c=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class l{static startAutoSync(){this.autoSyncInterval||(this.nextSyncTime=Date.now()+this.SYNC_INTERVAL_MS,setInterval(()=>{const e=Date.now();this.nextSyncTime&&e>=this.nextSyncTime&&(this.nextSyncTime=e+this.SYNC_INTERVAL_MS,this.sendPackageLogsToServer(),this.sendApplicationLogsToServer())},3e4))}static stopAutoSync(){null!==this.autoSyncInterval&&(clearInterval(this.autoSyncInterval),this.autoSyncInterval=null,this.nextSyncTime=null)}static setLogLevel(e){this.logLevel=e}static shouldLog(e){return this.LOG_LEVELS.indexOf(e)>=this.LOG_LEVELS.indexOf(this.logLevel)}static formatLogData(e,t,n){const o=Object.assign({timestamp:(new Date).toISOString(),level:e,message:t},n);return this.packageLogsData.push(o),"ERROR"==e&&(this.sendPackageLogsToServer(),this.sendApplicationLogsToServer()),o}static log(e,t,n){if(this.logPackageActivationStatus)try{this.formatLogData(e,t,n||null)}catch(e){}}static logUpdate(e){var t;try{if(!this.logPackageActivationStatus)return{};if(!e)return{};const n=Date.now();e.startTime=null!==(t=e.startTime)&&void 0!==t?t:n;const o=n-e.startTime;e.responseTime=`${o} ms`,!0==!e.serviceWorker&&(e.serviceWorker=!1)}catch(t){(0,a.ey)(e,"Logger.logUpdate",t)}}static logfunction(e,...t){if(!this.logPackageActivationStatus)return{};const n=Date.now();let o=t;const a=i.BaseUrl.getRandomizer(),s=r.b.sessionId;let c={startTime:n,functionName:e,functionParameters:o,requestFrom:i.BaseUrl.BASE_APPLICATION,sessionId:s,applicationId:a};return this.formatLogData("INFO","function called",c)}static logError(e,t,n,o,i,a,s,c,l,d,u){try{const h=r.b.sessionId,p=`${(performance.now()-e).toFixed(3)}ms`,f={startTime:e,userId:t,operationType:n,requestFrom:o,requestIP:i,responseStatus:a,responseTime:p,responseSize:s?`${JSON.stringify(s).length}`:"0",sessionId:null==h?void 0:h.toString(),functionName:c,functionParameters:l,userAgent:d,conceptsUsed:u};this.formatLogData("ERROR",`Information logged for ${c}`,f)}catch(e){}}static logApplication(e,t,n){if(this.logApplicationActivationStatus)try{const o={timestamp:(new Date).toISOString(),level:e,message:t,data:n||null};this.applicationLogsData.push(o),"ROUTE"!=e&&"USER_EVENT"!=e||(this.sendPackageLogsToServer(),this.sendApplicationLogsToServer())}catch(e){}}static checkLoggerServerStatus(){return c(this,void 0,void 0,function*(){let e=1e4+o.checkInterval;const t=new Date;if(!(o.lastCheck&&t.getTime()-o.lastCheck.getTime()<e)){try{let e=i.BaseUrl.LogHealth();o.lastCheck=new Date;(yield fetch(e,{method:"GET"})).ok&&(o.isLoggerActive=!0,o.checkInterval=0)}catch(e){}o.checkInterval=o.checkInterval+500}})}static sendApplicationLogsToServer(){return c(this,void 0,void 0,function*(){const e=this.applicationLogsData;try{if(!o.isLoggerActive)return void o.checkLoggerServerStatus();if(0===e.length)return;this.applicationLogsData=[];r.b.BearerAccessToken;const t=50;let n=(0,s.Xr)(),a=0;for(;0!=e.length;){const r=e.slice(0,t),s=yield fetch(i.BaseUrl.PostLogger(),{method:"POST",headers:n,body:JSON.stringify({logType:this.appLogs,logData:r})});s.ok||404===s.status&&(o.isLoggerActive=!1),e.splice(0,t),a+=t,a++}}catch(e){o.isLoggerActive=!1}})}static sendPackageLogsToServer(){return c(this,void 0,void 0,function*(){const e=this.packageLogsData;try{if(!o.isLoggerActive)return void o.checkLoggerServerStatus();if(0===e.length)return;this.packageLogsData=[];const t=300;let n=0;for(;0!=e.length;){const r=e.slice(0,t);let a=(0,s.Xr)();const c=yield fetch(i.BaseUrl.PostLogger(),{method:"POST",headers:a,body:JSON.stringify({logType:this.mftsccsBrowser,logData:r})});if(!c.ok)return void(404===c.status&&(o.isLoggerActive=!1));e.splice(0,t),n++}}catch(e){o.isLoggerActive=!1}})}static saveLogToLocalStorage(e,t){try{if(void 0===typeof localStorage)return;{const n=JSON.parse((null===localStorage||void 0===localStorage?void 0:localStorage.getItem(e))||"[]");n.push(t),null===localStorage||void 0===localStorage||localStorage.setItem(e,JSON.stringify(n))}}catch(e){this.log("ERROR","Error while saving log in local storage")}}static clearLogsFromLocalStorage(e){void 0!==typeof localStorage&&(null===localStorage||void 0===localStorage||localStorage.removeItem(e))}}o=l,l.isLoggerActive=!0,l.lastCheck=new Date,l.checkInterval=0,l.logLevel="INFO",l.packageLogsData=[],l.applicationLogsData=[],l.LOG_LEVELS=["DEBUG","INFO","WARNING","ERROR","ROUTE"],l.SYNC_INTERVAL_MS=6e4,l.nextSyncTime=null,l.appLogs="app",l.mftsccsBrowser="mftsccs",l.logApplicationActivationStatus=!1,l.logPackageActivationStatus=!1,l.autoSyncInterval=null,o.startAutoSync()},9720:(e,t,n)=>{t.__esModule=!0,t.default=void 0;var o,i=(o=n(3295))&&o.__esModule?o:{default:o},r=n(1581);function a(e,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},a(e,t)}var s=function(e){var t,n;function o(t){var n;return(n=e.call(this,t)||this).type=r.TAG,n}return n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,a(t,n),o}(i.default);t.default=s,e.exports=t.default},9736:(e,t,n)=>{n.d(t,{v:()=>C});var o=n(205),i=n(2515),r=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class a{static addNodeToTree(e){if(null==this.root)return this.root=e,this.root;this.root=this.root.addNode(e,this.root,this.root.height)}static addConceptToTree(e){var t=new i.x(e.id,e,null,null);new i.x(e.characterValue,e,null,null);this.addNodeToTree(t)}static waitForDataToLoad(){return r(this,void 0,void 0,function*(){return new Promise((e,t)=>{this.checkFlag(e),setTimeout(()=>{t("not")},25e3)})})}static checkFlag(e){if(o.B.isLocalDataLoaded)return e("done");setTimeout(a.checkFlag,1e3,e)}static getNodeFromTree(e){return r(this,void 0,void 0,function*(){return this.root?this.root.getFromNode(e,this.root):null})}static getCharacterAndTypeFromTree(e,t){return this.root?this.root.getFromNodeWithCharacterAndType(e,t,this.root):this.root}static updateSyncStatus(e){return this.root?this.root.updateNodeSyncStatus(e,!0,this.root):this.root}static removeNodeFromTree(e){return r(this,void 0,void 0,function*(){this.root&&(this.root=this.root.removeNode(this.root,e))})}}a.root=null;var s=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class c{static waitForDataToLoad(){return s(this,void 0,void 0,function*(){return new Promise((e,t)=>{this.checkFlag(e),setTimeout(()=>{t("not")},25e3)})})}static checkFlag(e){if(o.B.isLocalCharacterLoaded)return e("done");setTimeout(c.checkFlag,1e3,e)}static addNodeToTree(e){return s(this,void 0,void 0,function*(){return null==this.LocalCharacterRoot?(this.LocalCharacterRoot=e,this.LocalCharacterRoot):(this.LocalCharacterRoot=this.LocalCharacterRoot.addCharacterNode(e,this.LocalCharacterRoot,this.LocalCharacterRoot.height),this.LocalCharacterRoot)})}static addConceptToTree(e){if(""!=e.characterValue){var t=new i.x(e.characterValue,e,null,null);this.addNodeToTree(t)}}static getNodeFromTree(e){return this.LocalCharacterRoot?this.LocalCharacterRoot.getCharacterFromNode(e,this.LocalCharacterRoot):this.LocalCharacterRoot}static getCharacterAndTypeFromTree(e,t){return s(this,void 0,void 0,function*(){return this.LocalCharacterRoot?this.LocalCharacterRoot.getFromNodeWithCharacterAndType(e,t,this.LocalCharacterRoot):this.LocalCharacterRoot})}static getCharacterAndCategoryFromTree(e,t){return s(this,void 0,void 0,function*(){return this.LocalCharacterRoot?this.LocalCharacterRoot.getFromNodeWithCharacterAndCategory(e,t,this.LocalCharacterRoot):this.LocalCharacterRoot})}static removeConceptType(e,t){this.LocalCharacterRoot&&(this.LocalCharacterRoot=this.LocalCharacterRoot.removeNodeWithVariants(this.LocalCharacterRoot,e,t))}}c.LocalCharacterRoot=null;var l=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class d{static addNodeToTree(e){return l(this,void 0,void 0,function*(){return null==this.LocalTypeRoot?(this.LocalTypeRoot=e,this.LocalTypeRoot):(this.LocalTypeRoot=this.LocalTypeRoot.addTypeNode(e,this.LocalTypeRoot,this.LocalTypeRoot.height),this.LocalTypeRoot)})}static addConceptToTree(e){if(0!=e.typeId){var t=new i.x(e.typeId,e,null,null);this.addNodeToTree(t)}}static removeConceptType(e,t){this.LocalTypeRoot&&(this.LocalTypeRoot=this.LocalTypeRoot.removeNodeWithVariants(this.LocalTypeRoot,e,t))}static getNodeFromTree(e){return this.LocalTypeRoot?this.LocalTypeRoot.getFromNode(e,this.LocalTypeRoot):this.LocalTypeRoot}static getTypeVariantsFromTree(e){var t=this.getNodeFromTree(e),n=[];if(t){n.push(null==t?void 0:t.value);for(let e=0;e<t.variants.length;e++)n.push(t.variants[e].value);return n}}static waitForDataToLoad(){return l(this,void 0,void 0,function*(){return new Promise((e,t)=>{this.checkFlag(e),setTimeout(()=>{t("not")},25e3)})})}static checkFlag(e){if(o.B.isLocalTypeLoaded)return e("done");setTimeout(d.checkFlag,1e3,e)}static getTypeVariantsFromTreeWithUserId(e,t){return l(this,void 0,void 0,function*(){var n=[],o=this.getNodeFromTree(e);if(o){o.value.userId!=t&&999!=o.value.userId||n.push(null==o?void 0:o.value);for(let e=0;e<o.variants.length;e++)o.variants[e].value.userId!=t&&999!=o.value.userId||n.push(o.variants[e].value)}return n})}}d.LocalTypeRoot=null;var u=n(6416),h=n(3026),p=n(7820),f=n(4864),m=n(628),y=n(8957),v=n(4024),g=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};class C{constructor(){this.name="conceptsArray"}static AddConcept(e){0!=e.id&&(a.addConceptToTree(e),c.addConceptToTree(e),d.addConceptToTree(e),this.localconceptsArray.push(e))}static AddPermanentConcept(e){0!=e.id&&(a.removeNodeFromTree(e.ghostId),c.removeConceptType(e.characterValue,e.ghostId),d.removeConceptType(e.typeId,e.ghostId),p.G.addConceptToTree(e),h.I.AddConcept(e),(0,y.AddGhostConcept)(e,e.userId,v.b.sessionId))}static RemoveConcept(e){return g(this,void 0,void 0,function*(){try{0!=e.id&&(a.removeNodeFromTree(e.ghostId),c.removeConceptType(e.characterValue,e.ghostId),d.removeConceptType(e.typeId,e.ghostId))}catch(e){throw e}})}static RemoveConceptById(e){return g(this,void 0,void 0,function*(){try{let t=yield C.GetConcept(e);0!=t.id&&(a.removeNodeFromTree(e),c.removeConceptType(t.characterValue,t.ghostId),d.removeConceptType(t.typeId,t.ghostId),m.H.RemoveConcept(t))}catch(e){throw e}})}static AddConceptToMemory(e){0!=e.id&&(a.addConceptToTree(e),c.addConceptToTree(e),d.addConceptToTree(e))}static GetConcept(e){return g(this,void 0,void 0,function*(){var t=(0,u.u)(),n=yield a.getNodeFromTree(e);if(null==n?void 0:n.value){var o=n.value;o&&(t=o)}return t})}static UpdateConceptSyncStatus(e){return g(this,void 0,void 0,function*(){a.updateSyncStatus(e)})}static GetConceptByGhostId(e){return g(this,void 0,void 0,function*(){var t=(0,u.u)(),n=yield p.G.getNodeFromTree(e);if(null==n?void 0:n.value){var o=n.value;o&&(t=o)}return t})}static GetConceptByCharacter(e){return g(this,void 0,void 0,function*(){var t=(0,u.u)(),n=c.getNodeFromTree(e);return n&&(t=n.value),t})}static GetConceptByCharacterAndTypeLocal(e,t){return g(this,void 0,void 0,function*(){var n=(0,u.u)(),o=yield c.getCharacterAndTypeFromTree(e,t);return o&&(n=o.value),n})}static GetConceptByCharacterAndCategoryLocal(e,t){return g(this,void 0,void 0,function*(){var n=(0,u.u)(),o=yield c.getCharacterAndCategoryFromTree(e,t);return o&&(n=o.value),n})}static GetConceptsByTypeId(e){let t=[];for(var n=0;n<this.localconceptsArray.length;n++)this.localconceptsArray[n].typeId==e&&t.push(this.localconceptsArray[n]);return t}static GetConceptsByTypeIdAndUser(e,t){return g(this,void 0,void 0,function*(){let n=[];return n=yield d.getTypeVariantsFromTreeWithUserId(e,t),n})}static ClearData(){return g(this,void 0,void 0,function*(){this.localconceptsArray=[],f.G.connectionArray=[]})}getName(){return this.name}}C.localconceptsArray=[]},9746:()=>{},9934:(e,t,n)=>{function o(e,t){return-1===e.indexOf(t)&&e.push(t),e}n.d(t,{A:()=>o})},9975:(e,t,n)=>{n.d(t,{A:()=>s});var o=n(8957),i=n(9736),r=n(3077),a=function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};function s(e,t,n,s,c){return a(this,arguments,void 0,function*(e,t,n,a,s,c={concepts:[],connections:[]}){var l,d,u,h;if(o.serviceWorker)try{const i=yield(0,o.sendMessage)("MakeTheConceptLocal",{referent:e,typeCharacter:t,userId:n,categoryId:a,typeId:s,actions:c});return(null===(d=null===(l=null==i?void 0:i.actions)||void 0===l?void 0:l.concepts)||void 0===d?void 0:d.length)&&(c.concepts=JSON.parse(JSON.stringify(i.actions.concepts))),(null===(h=null===(u=null==i?void 0:i.actions)||void 0===u?void 0:u.connections)||void 0===h?void 0:h.length)&&(c.connections=JSON.parse(JSON.stringify(i.actions.connections))),i.data}catch(e){(0,o.handleServiceWorkerException)(e)}let p=yield i.v.GetConceptByCharacterAndTypeLocal(e,s),f=p;return"the"==t&&(a=1),0==f.id&&(p=yield(0,r.A)(e,t,n,a,s,4,void 0,null,c),f=p),f})}},9977:()=>{}},t={};function n(o){var i=t[o];if(void 0!==i)return i.exports;var r=t[o]={exports:{}};return e[o](r,r.exports,n),r.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o=n(8957);const i=o.ADMIN,r=o.ALLID,a=o.AccessTracker,s=o.AddGhostConcept,c=o.Anomaly,l=o.BaseUrl,d=o.BinaryTree,u=o.BuildWidgetFromId,h=o.BuilderStatefulWidget,p=o.Composition,f=o.CompositionBinaryTree,m=o.CompositionNode,y=o.Concept,v=o.ConceptsData,g=o.Connection,C=o.ConnectionData,w=o.CountInfo,T=o.CreateComposition,I=o.CreateConnection,k=o.CreateConnectionBetweenEntityLocal,b=o.CreateConnectionBetweenTwoConcepts,A=o.CreateConnectionBetweenTwoConceptsGeneral,S=o.CreateConnectionBetweenTwoConceptsLocal,L=o.CreateData,N=o.CreateDefaultConcept,_=o.CreateDefaultLConcept,x=o.CreateSession,D=o.CreateSessionVisit,P=o.CreateTheCompositionLocal,E=o.CreateTheCompositionWithCache,R=o.CreateTheConnection,O=o.CreateTheConnectionGeneral,B=o.CreateTheConnectionLocal,F=o.DATAID,U=o.DATAIDDATE,G=o.DATAV2,M=o.DelayFunctionExecution,W=o.DeleteConceptById,j=o.DeleteConceptLocal,V=o.DeleteConnectionById,q=o.DeleteConnectionByIdBulk,H=o.DeleteConnectionByType,$=o.DeleteConnectionByTypeBulk,z=o.DeleteUser,J=o.DependencyObserver,Q=o.Environments,Y=o.FilterSearch,X=o.FormatFromConnections,K=o.FormatFromConnectionsAltered,Z=o.FreeschemaQuery,ee=o.FreeschemaQueryApi,te=o.GetAllConnectionsOfComposition,ne=o.GetAllConnectionsOfCompositionBulk,oe=o.GetAllTheConnectionsByTypeAndOfTheConcept,ie=o.GetComposition,re=o.GetCompositionBulk,ae=o.GetCompositionBulkWithDataId,se=o.GetCompositionFromConnectionsWithDataId,ce=o.GetCompositionFromConnectionsWithDataIdFromConnections,le=o.GetCompositionFromConnectionsWithDataIdInObject,de=o.GetCompositionFromConnectionsWithDataIdIndex,ue=o.GetCompositionFromConnectionsWithIndex,he=o.GetCompositionFromConnectionsWithIndexFromConnections,pe=o.GetCompositionFromMemoryWithConnections,fe=o.GetCompositionList,me=o.GetCompositionListAll,ye=o.GetCompositionListAllWithId,ve=o.GetCompositionListListener,ge=o.GetCompositionListLocal,Ce=o.GetCompositionListLocalWithId,we=o.GetCompositionListWithId,Te=o.GetCompositionListWithIdUpdated,Ie=o.GetCompositionListener,ke=o.GetCompositionLocal,be=o.GetCompositionLocalWithId,Ae=o.GetCompositionWithAllIds,Se=o.GetCompositionWithCache,Le=o.GetCompositionWithDataIdBulk,Ne=o.GetCompositionWithDataIdWithCache,_e=o.GetCompositionWithId,xe=o.GetCompositionWithIdAndDateFromMemory,De=o.GetConceptBulk,Pe=o.GetConceptByCharacter,Ee=o.GetConceptByCharacterAndCategoryLocal,Re=o.GetConceptByCharacterAndType,Oe=o.GetConnectionBetweenTwoConceptsLinker,Be=o.GetConnectionBulk,Fe=o.GetConnectionById,Ue=o.GetConnectionDataPrefetch,Ge=o.GetConnectionOfTheConcept,Me=o.GetConnectionTypeForCount,We=o.GetConnectionsBetweenApi,je=o.GetFreeschemaImage,Ve=o.GetFreeschemaImageUrl,qe=o.GetImageApi,He=o.GetLink,$e=o.GetLinkListListener,ze=o.GetLinkListener,Je=o.GetLinkRaw,Qe=o.GetLinkerConnectionFromConcepts,Ye=o.GetLinkerConnectionToConcepts,Xe=o.GetRelation,Ke=o.GetRelationLocal,Ze=o.GetRelationNew,et=o.GetRelationRaw,tt=o.GetTheConcept,nt=o.GetTheConceptLocal,ot=o.GetUserGhostId,it=o.JUSTDATA,rt=o.LConcept,at=o.LConnection,st=o.LISTNORMAL,ct=o.LocalConceptsData,lt=o.LocalSyncData,dt=o.LocalTransaction,ut=o.LogEvent,ht=o.Logger,pt=o.LoginToBackend,ft=o.MakeTheInstanceConcept,mt=o.MakeTheInstanceConceptLocal,yt=o.MakeTheTimestamp,vt=o.MakeTheTypeConceptApi,gt=o.MakeTheTypeConceptLocal,Ct=o.NORMAL,wt=o.PRIVATE,Tt=o.PUBLIC,It=o.PatcherStructure,kt=o.Prototype,bt=o.RAW,At=o.RecursiveSearchApi,St=o.RecursiveSearchApiNewRawFullLinker,Lt=o.RecursiveSearchApiRaw,Nt=o.RecursiveSearchApiRawFullLinker,_t=o.RecursiveSearchApiWithInternalConnections,xt=o.RecursiveSearchListener,Dt=o.SchemaQuery,Pt=o.SchemaQueryListener,Et=o.SearchAllConcepts,Rt=o.SearchLinkInternal,Ot=o.SearchLinkInternalAll,Bt=o.SearchLinkMultipleAll,Ft=o.SearchLinkMultipleAllObservable,Ut=o.SearchLinkMultipleApi,Gt=o.SearchQuery,Mt=o.SearchStructure,Wt=o.SearchWithLinker,jt=o.SearchWithTypeAndLinker,Vt=o.SearchWithTypeAndLinkerApi,qt=o.Selector,Ht=o.SessionData,$t=o.Signin,zt=o.Signup,Jt=o.SignupEntity,Qt=o.SplitStrings,Yt=o.StatefulWidget,Xt=o.SyncData,Kt=o.TokenStorage,Zt=o.TrashTheConcept,en=o.UpdateComposition,tn=o.UpdateCompositionLocal,nn=o.UserBinaryTree,on=o.Validator,rn=o.ViewInternalData,an=o.ViewInternalDataApi,sn=o.WidgetTree,cn=o.buildFetchConnection,ln=o.clearAllCaches,dn=o.convertFromConceptToLConcept,un=o.convertFromLConceptToConcept,hn=o.convertWidgetTreeToWidget,pn=o.convertWidgetTreeToWidgetWithWrapper,fn=o.createFormFieldData,mn=o.createPrototypeLocal,yn=o.dispatchIdEvent,vn=o.getFromDatabaseWithType,gn=o.getObjectsFromIndexDb,Cn=o.getTsccsAutocompleteMetadata,wn=o.getUploadFileLimit,Tn=o.getUserDetails,In=o.getWidgetBulkFromId,kn=o.getWidgetFromId,bn=o.handleServiceWorkerException,An=o.hasActivatedSW,Sn=o.importLatestWidget,Ln=o.importRecentWidget,Nn=o.init,_n=o.orderTheConnections,xn=o.recursiveFetch,Dn=o.recursiveFetchNew,Pn=o.removeAllChildren,En=o.renderImportedWidget,Rn=o.renderLatestWidget,On=o.renderPage,Bn=o.renderWidget,Fn=o.searchLinkMultipleListener,Un=o.sendEmail,Gn=o.sendMessage,Mn=o.serviceWorker,Wn=o.setHasActivatedSW,jn=o.storeToDatabase,Vn=o.subscribedListeners,qn=o.tsccsAutocompleteMetadata,Hn=o.unwrapContainers,$n=o.updateAccessToken,zn=o.uploadAttachment,Jn=o.uploadFile,Qn=o.uploadImage,Yn=o.uploadImageV2,Xn=o.validDocumentFormats,Kn=o.validImageFormats;export{i as ADMIN,r as ALLID,a as AccessTracker,s as AddGhostConcept,c as Anomaly,l as BaseUrl,d as BinaryTree,u as BuildWidgetFromId,h as BuilderStatefulWidget,p as Composition,f as CompositionBinaryTree,m as CompositionNode,y as Concept,v as ConceptsData,g as Connection,C as ConnectionData,w as CountInfo,T as CreateComposition,I as CreateConnection,k as CreateConnectionBetweenEntityLocal,b as CreateConnectionBetweenTwoConcepts,A as CreateConnectionBetweenTwoConceptsGeneral,S as CreateConnectionBetweenTwoConceptsLocal,L as CreateData,N as CreateDefaultConcept,_ as CreateDefaultLConcept,x as CreateSession,D as CreateSessionVisit,P as CreateTheCompositionLocal,E as CreateTheCompositionWithCache,R as CreateTheConnection,O as CreateTheConnectionGeneral,B as CreateTheConnectionLocal,F as DATAID,U as DATAIDDATE,G as DATAV2,M as DelayFunctionExecution,W as DeleteConceptById,j as DeleteConceptLocal,V as DeleteConnectionById,q as DeleteConnectionByIdBulk,H as DeleteConnectionByType,$ as DeleteConnectionByTypeBulk,z as DeleteUser,J as DependencyObserver,Q as Environments,Y as FilterSearch,X as FormatFromConnections,K as FormatFromConnectionsAltered,Z as FreeschemaQuery,ee as FreeschemaQueryApi,te as GetAllConnectionsOfComposition,ne as GetAllConnectionsOfCompositionBulk,oe as GetAllTheConnectionsByTypeAndOfTheConcept,ie as GetComposition,re as GetCompositionBulk,ae as GetCompositionBulkWithDataId,se as GetCompositionFromConnectionsWithDataId,ce as GetCompositionFromConnectionsWithDataIdFromConnections,le as GetCompositionFromConnectionsWithDataIdInObject,de as GetCompositionFromConnectionsWithDataIdIndex,ue as GetCompositionFromConnectionsWithIndex,he as GetCompositionFromConnectionsWithIndexFromConnections,pe as GetCompositionFromMemoryWithConnections,fe as GetCompositionList,me as GetCompositionListAll,ye as GetCompositionListAllWithId,ve as GetCompositionListListener,ge as GetCompositionListLocal,Ce as GetCompositionListLocalWithId,we as GetCompositionListWithId,Te as GetCompositionListWithIdUpdated,Ie as GetCompositionListener,ke as GetCompositionLocal,be as GetCompositionLocalWithId,Ae as GetCompositionWithAllIds,Se as GetCompositionWithCache,Le as GetCompositionWithDataIdBulk,Ne as GetCompositionWithDataIdWithCache,_e as GetCompositionWithId,xe as GetCompositionWithIdAndDateFromMemory,De as GetConceptBulk,Pe as GetConceptByCharacter,Ee as GetConceptByCharacterAndCategoryLocal,Re as GetConceptByCharacterAndType,Oe as GetConnectionBetweenTwoConceptsLinker,Be as GetConnectionBulk,Fe as GetConnectionById,Ue as GetConnectionDataPrefetch,Ge as GetConnectionOfTheConcept,Me as GetConnectionTypeForCount,We as GetConnectionsBetweenApi,je as GetFreeschemaImage,Ve as GetFreeschemaImageUrl,qe as GetImageApi,He as GetLink,$e as GetLinkListListener,ze as GetLinkListener,Je as GetLinkRaw,Qe as GetLinkerConnectionFromConcepts,Ye as GetLinkerConnectionToConcepts,Xe as GetRelation,Ke as GetRelationLocal,Ze as GetRelationNew,et as GetRelationRaw,tt as GetTheConcept,nt as GetTheConceptLocal,ot as GetUserGhostId,it as JUSTDATA,rt as LConcept,at as LConnection,st as LISTNORMAL,ct as LocalConceptsData,lt as LocalSyncData,dt as LocalTransaction,ut as LogEvent,ht as Logger,pt as LoginToBackend,ft as MakeTheInstanceConcept,mt as MakeTheInstanceConceptLocal,yt as MakeTheTimestamp,vt as MakeTheTypeConceptApi,gt as MakeTheTypeConceptLocal,Ct as NORMAL,wt as PRIVATE,Tt as PUBLIC,It as PatcherStructure,kt as Prototype,bt as RAW,At as RecursiveSearchApi,St as RecursiveSearchApiNewRawFullLinker,Lt as RecursiveSearchApiRaw,Nt as RecursiveSearchApiRawFullLinker,_t as RecursiveSearchApiWithInternalConnections,xt as RecursiveSearchListener,Dt as SchemaQuery,Pt as SchemaQueryListener,Et as SearchAllConcepts,Rt as SearchLinkInternal,Ot as SearchLinkInternalAll,Bt as SearchLinkMultipleAll,Ft as SearchLinkMultipleAllObservable,Ut as SearchLinkMultipleApi,Gt as SearchQuery,Mt as SearchStructure,Wt as SearchWithLinker,jt as SearchWithTypeAndLinker,Vt as SearchWithTypeAndLinkerApi,qt as Selector,Ht as SessionData,$t as Signin,zt as Signup,Jt as SignupEntity,Qt as SplitStrings,Yt as StatefulWidget,Xt as SyncData,Kt as TokenStorage,Zt as TrashTheConcept,en as UpdateComposition,tn as UpdateCompositionLocal,nn as UserBinaryTree,on as Validator,rn as ViewInternalData,an as ViewInternalDataApi,sn as WidgetTree,cn as buildFetchConnection,ln as clearAllCaches,dn as convertFromConceptToLConcept,un as convertFromLConceptToConcept,hn as convertWidgetTreeToWidget,pn as convertWidgetTreeToWidgetWithWrapper,fn as createFormFieldData,mn as createPrototypeLocal,yn as dispatchIdEvent,vn as getFromDatabaseWithType,gn as getObjectsFromIndexDb,Cn as getTsccsAutocompleteMetadata,wn as getUploadFileLimit,Tn as getUserDetails,In as getWidgetBulkFromId,kn as getWidgetFromId,bn as handleServiceWorkerException,An as hasActivatedSW,Sn as importLatestWidget,Ln as importRecentWidget,Nn as init,_n as orderTheConnections,xn as recursiveFetch,Dn as recursiveFetchNew,Pn as removeAllChildren,En as renderImportedWidget,Rn as renderLatestWidget,On as renderPage,Bn as renderWidget,Fn as searchLinkMultipleListener,Un as sendEmail,Gn as sendMessage,Mn as serviceWorker,Wn as setHasActivatedSW,jn as storeToDatabase,Vn as subscribedListeners,qn as tsccsAutocompleteMetadata,Hn as unwrapContainers,$n as updateAccessToken,zn as uploadAttachment,Jn as uploadFile,Qn as uploadImage,Yn as uploadImageV2,Xn as validDocumentFormats,Kn as validImageFormats};