"use strict";exports.id=1251,exports.ids=[1251],exports.modules={96762:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){returnfunctione(t,n){returnnint?t[n]:"then"int&&"function"==typeoft.then?t.then(t=>e(t,n)):"function"==typeoft&&"default"===n?t:void0}}})},98e3:(e,t,n)=>{n.d(t,{A:()=>d});varr=n(72583),a=n.n(r),o=n(92652),s=n(30802),c=n(48786),i=n(37275),l=n(68829),u=n(7971);asyncfunctiond({dbContext:e,paradigm:t,dbFullName:n,tableName:r,data:d,tableSchema:p,duplicateColumnName:_,duplicateColumnValue:f,update:g,encryptionKey:h,encryptionSalt:y,useLocal:S}){letE=!!S||!e?.match(/dsql.user/i)&&(!n||!!n.match(/^datasquirel$/)),m=S?u.A:E?c.A:i.A;if(d?.date_created_timestamp&&deleted.date_created_timestamp,d?.date_updated_timestamp&&deleted.date_updated_timestamp,d?.date_updated&&deleted.date_updated,d?.date_updated_code&&deleted.date_updated_code,d?.date_created&&deleted.date_created,d?.date_created_code&&deleted.date_created_code,_&&"string"==typeof_){leta=E?awaitm(`SELECT * FROM \`${r}\` WHERE \`${_}\`=?`,[f]):awaitm({paradigm:"Read Only",queryString:`SELECT * FROM \`${n}\`.\`${r}\` WHERE \`${_}\`=?`,queryValues:[f]});if(a?.[0]&&!g)returnnull;if(a&&a[0]&&g)returnawait(0,s.A)({dbContext:e,paradigm:t,dbFullName:n,tableName:r,data:d,tableSchema:p,encryptionKey:h,encryptionSalt:y,identifierColumnName:_,identifierValue:f||""})}letA=Object.keys(d),D=[],N=[];for(lete=0;e<A.length;e++)try{lett=A[e],n=d?.[t],r=p?p?.fields?.filter(e=>e.fieldName==t):null,s=r&&r[0]?r[0]:null;if(null==n||void0==n||s?.dataType?.match(/int$/i)&&"string"==typeofn&&!n?.match(/./))continue;s?.encrypted&&(n=(0,l.A)({data:n,encryptionKey:h,encryptionSalt:y}),console.log("DSQL: Encrypted value =>",n));letc=/<[^>]+>/g;(s?.richText||String(n).match(c))&&(n=a()(n,o.A)),s?.pattern&&!newRegExp(s.pattern,s.patternFlags||"").test(n)&&(console.log("DSQL: Pattern not matched =>",n),n=""),D.push("`"+t+"`"),"object"==typeofn&&(n=JSON.stringify(n)),"number"==typeofn?N.push(String(n)):N.push(n)}catch(e){console.log("DSQL: Error in parsing data keys =>",e.message);continue}d?.date_created||(D.push("`date_created`"),N.push(Date())),d?.date_created_code||(D.push("`date_created_code`"),N.push(Date.now())),d?.date_updated||(D.push("`date_updated`"),N.push(Date())),d?.date_updated_code||(D.push("`date_updated_code`"),N.push(Date.now()));letL=`INSERT INTO \`${n}\`.\`${r}\` (${D.join(",")}) VALUES (${N.map(()=>"?").join(",")})`;returnE?awaitm(L,N):awaitm({paradigm:t,queryString:L,queryValues:N})}},30802:(e,t,n)=>{n.d(t,{A:()=>u});varr=n(72583),a=n.n(r),o=n(92652),s=n(48786),c=n(37275),i=n(68829),l=n(7971);asyncfunctionu({dbContext:e,paradigm:t,dbFullName:n,tableName:r,data:u,tableSchema:d,identifierColumnName:p,identifierValue:_,encryptionKey:f,encryptionSalt:g,useLocal:h}){if(!u||!Object.keys(u).length)returnnull;lety=!!h||!e?.match(/dsql.user/i)&&(!n||!!n.match(/^datasquirel$/)),S=h?l.A:y?s.A:c.A,E=Object.keys(u),m=[],A=[];for(lete=0;e<E.length;e++)try{lett=E[e],n=u[t],r=d?d?.fields?.filter(e=>e.fieldName===t):null,s=r&&r[0]?r[0]:null;if(null==n||void0==n)continue;letc=/<[^>]+>/g;(s?.richText||String(n).match(c))&&(n=a()(n,o.A)),s?.encrypted&&(n=(0,i.A)({data:n,encryptionKey:f,encryptionSalt:g})),"object"==typeofn&&(n=JSON.stringify(n)),s?.pattern&&!newRegExp(s.pattern,s.patternFlags||"").test(n)&&(console.log("DSQL: Pattern not matched =>",n),n=""),"string"==typeofn&&n.match(/^null$/i)&&(n={toSqlString:function(){return"NULL"}}),"string"!=typeofn||n.match(/./i)||(n={toSqlString:function(){return"NULL"}}),m.push(`\`${t}\`=?`),"number"==typeofn?A.push(String(n)):A.push(n)}catch(e){console.log("DSQL: Error in parsing data keys in update function =>",e.message);continue}m.push(`date_updated='${Date()}'`),m.push(`date_updated_code='${Date.now()}'`);letD=`UPDATE \`${n}\`.\`${r}\` SET ${m.join(",")} WHERE \`${p}\`=?`;returnA.push(_),y?awaitS(D,A):awaitS({paradigm:t,queryString:D,queryValues:A})}},92652:(e,t,n)=>{n.d(t,{A:()=>r});letr={allowedTags:["b","i","em","strong","a","p","span","ul","ol","li","h1","h2",