UNPKG

prisma-zod-generator

Version:

Prisma 2+ generator to emit Zod schemas from your Prisma schema

1 lines 59.7 kB
'use strict';(function(_0x3c2317,_0xe92d71){const _0xd03f5d=_0x3c2317();function _0x20f915(_0x248711,_0x54acdd,_0x3e678d,_0x504a3a){return pzg_0x3d61(_0x3e678d- -0x3c9,_0x504a3a);}function _0x2293d8(_0x1fbaab,_0x9ac4a7,_0x4e44db,_0xc45307){return pzg_0x3d61(_0xc45307-0x3d9,_0x4e44db);}while(!![]){try{const _0x451d30=parseInt(_0x20f915(-0x3bd,-0x35c,-0x272,-0x231))/(0xee7+-0x13*-0x1b1+-0x1*0x2f09)*(parseInt(_0x20f915(-0x198,-0x238,-0x25d,-0x300))/(0x1462+-0x188e+0x42e))+-parseInt(_0x2293d8(0x6ea,0x6d4,0x4bc,0x5b0))/(-0x1ba6*-0x1+-0x2039+0x496)*(-parseInt(_0x20f915(-0x35b,-0x2b1,-0x2c5,-0x29b))/(-0x5f5+-0x6*0x40f+-0x1*-0x1e53))+parseInt(_0x20f915(-0x76,0x26,-0xad,0x34))/(-0xdff*-0x2+0x17bb+-0x33b4)*(-parseInt(_0x20f915(-0x97,-0x40,-0xc8,-0x147))/(0x1033+0x1188+-0x21b5))+parseInt(_0x2293d8(0x580,0x614,0x6db,0x5ea))/(0x6d3+0x1d2c+0x8fe*-0x4)*(-parseInt(_0x20f915(0x68,0x42,-0x93,-0xd4))/(-0x6e8+0x1*-0x28c+0x97c))+parseInt(_0x2293d8(0x573,0x5a8,0x52c,0x4e6))/(0x286+-0x229d+-0x202*-0x10)*(parseInt(_0x20f915(-0x5d,-0x144,-0x112,-0x1c7))/(0x1bfd+-0x1*0x1dfd+-0x12*-0x1d))+-parseInt(_0x20f915(-0x119,-0x28,-0x109,-0x51))/(0x1495+0x5d4+-0x1a5e)*(-parseInt(_0x2293d8(0x45b,0x48a,0x44e,0x552))/(0x1985+-0xb*-0x131+-0x134a*0x2))+parseInt(_0x2293d8(0x63d,0x7e9,0x699,0x6d2))/(0x1*-0x1a14+-0x7*-0x301+-0x28d*-0x2);if(_0x451d30===_0xe92d71)break;else _0xd03f5d['push'](_0xd03f5d['shift']());}catch(_0x10ecde){_0xd03f5d['push'](_0xd03f5d['shift']());}}}(pzg_0x5d96,-0x1d574+0x23981*-0x1+-0x189fa*-0x4));function pzg_0x129c88(_0x27161a,_0x4c9505,_0x4708bb,_0x1e8ade){return pzg_0x3d61(_0x4c9505- -0x1aa,_0x27161a);}const pzg_0x553924={};function pzg_0x3d61(_0x4a2a04,_0x5b166d){const _0x8040de=pzg_0x5d96();return pzg_0x3d61=function(_0x30defa,_0x28751d){_0x30defa=_0x30defa-(0x13*0x5e+0x3*0xcdd+-0x2c8d);let _0x3dee1f=_0x8040de[_0x30defa];if(pzg_0x3d61['jjzuVK']===undefined){var _0xaa49fc=function(_0x399220){const _0x439f08='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x10c0ef='',_0x150481='';for(let _0x12607b=-0x4*0x435+-0x1b1c+0x2bf0,_0x596788,_0x138657,_0x2e6222=0xc6e*-0x3+0x2d*-0x79+-0x13*-0x315;_0x138657=_0x399220['charAt'](_0x2e6222++);~_0x138657&&(_0x596788=_0x12607b%(-0x2*-0x655+0x46*0xb+0x29c*-0x6)?_0x596788*(-0x1d57+-0x203*-0x9+0xa*0x126)+_0x138657:_0x138657,_0x12607b++%(-0xb0e+0x1160+-0x64e))?_0x10c0ef+=String['fromCharCode'](0x1*-0x2ad+0x47c+-0x10*0xd&_0x596788>>(-(-0x33+0x624+-0x5ef)*_0x12607b&0x8ef+0x1455+0x26*-0xc5)):-0x3*-0x2d0+0x10b1*0x1+-0x7*0x397){_0x138657=_0x439f08['indexOf'](_0x138657);}for(let _0x692d16=0x121d+-0x18c2+0x6a5,_0x1c24f0=_0x10c0ef['length'];_0x692d16<_0x1c24f0;_0x692d16++){_0x150481+='%'+('00'+_0x10c0ef['charCodeAt'](_0x692d16)['toString'](-0x6e0+0xfa7+0x1*-0x8b7))['slice'](-(0x1*-0x9a5+-0x1*0x26bd+0x3064));}return decodeURIComponent(_0x150481);};pzg_0x3d61['QyVPNn']=_0xaa49fc,_0x4a2a04=arguments,pzg_0x3d61['jjzuVK']=!![];}const _0x5db5b7=_0x8040de[0x9f*0x1f+-0x15+-0x132c],_0x17c6e0=_0x30defa+_0x5db5b7,_0x475ec2=_0x4a2a04[_0x17c6e0];return!_0x475ec2?(_0x3dee1f=pzg_0x3d61['QyVPNn'](_0x3dee1f),_0x4a2a04[_0x17c6e0]=_0x3dee1f):_0x3dee1f=_0x475ec2,_0x3dee1f;},pzg_0x3d61(_0x4a2a04,_0x5b166d);}pzg_0x553924[pzg_0x57d874(-0x116,0x4,-0x136,-0x10f)]=!![],Object[pzg_0x57d874(-0x224,-0x161,-0xac,-0x7f)+'erty'](exports,pzg_0x57d874(-0x2c2,-0x19b,-0x22c,-0x2c5),pzg_0x553924),exports[pzg_0x129c88(0xd6,0x119,-0x7,-0x37)+pzg_0x129c88(-0x2b,-0x75,0x3c,-0x117)]=void(0x18a+0x2b*-0x8b+0x745*0x3);function pzg_0x57d874(_0x31317a,_0x115d22,_0x1e435e,_0x2a085a){return pzg_0x3d61(_0x115d22- -0x30a,_0x31317a);}const ProFeatureBase_1=require('../../core/ProFeatureBase'),path_1=require('path'),prismaImport_1=require('../../../utils/prismaImport');class PostgresRLSGenerator extends ProFeatureBase_1['ProFeature'+pzg_0x57d874(0x1c,-0x110,-0xb3,-0x136)]{constructor(_0x77c60d,_0x579a51={}){const _0x1bf69e={};function _0x519f50(_0xb6fe2d,_0x338f5d,_0x40ccc0,_0x40e98b){return pzg_0x57d874(_0xb6fe2d,_0x40ccc0-0x6aa,_0x40ccc0-0x1f1,_0x40e98b-0x15f);}_0x1bf69e[_0x5925ca(-0xb5,-0x1b3,-0x13e,-0x10e)]=_0x5925ca(0x24,0x1a,0x145,0x1e0);const _0x36459d=_0x1bf69e;super(_0x77c60d);function _0x5925ca(_0x5ae752,_0x2a12dd,_0x3f468f,_0xd9c01f){return pzg_0x129c88(_0xd9c01f,_0x3f468f- -0xb6,_0x3f468f-0x3,_0xd9c01f-0x1a6);}const _0xf3c9e9={'outputPath':'./postgres'+_0x5925ca(-0x85,0x170,0x9b,-0xa0),'generateMigrations':!![],'migrationFormat':_0x36459d[_0x5925ca(-0x27c,-0x124,-0x13e,-0x183)],..._0x579a51};this[_0x5925ca(-0x26,-0x165,-0x8e,-0x9f)]=_0xf3c9e9;}[pzg_0x57d874(-0x1c4,-0x17e,-0x219,-0x2c1)+pzg_0x129c88(0x190,0xb6,0x12a,-0x10)](){return'postgres-r'+'ls';}async['generateFe'+pzg_0x57d874(-0xae,-0x4f,-0xe3,-0x14c)](){const _0x509170={};_0x509170[_0x3a0c6d(0x88,0x10e,-0x3a,-0x9)]=function(_0xcd2493,_0x994b92){return _0xcd2493===_0x994b92;},_0x509170[_0x3a0c6d(-0xbb,0x35,0x49,-0x55)]=_0x3a0c6d(-0xd3,-0x13a,-0x127,-0x56)+_0x6e0a25(0x25c,0x22d,0x71,0x153),_0x509170['DIuqM']=_0x3a0c6d(-0x1a0,-0x1fe,-0x1b5,-0x163)+'.ts';const _0x5b12b2=_0x509170;this['logInfo']('Generating'+_0x3a0c6d(0x7f,0x1ad,0x5,-0x22)+_0x3a0c6d(-0xde,-0xb1,0x6b,-0x127)+_0x6e0a25(0x18,-0x28,0x3d,0x103)+_0x6e0a25(0x220,0x152,0x16b,0x10d));const _0x57cbe5=this['getEnabled'+'Models']();if(_0x5b12b2[_0x6e0a25(0x51,-0x1b,0x109,0xfb)](_0x57cbe5[_0x3a0c6d(-0x149,-0x95,-0x21a,-0x15f)],0x49d+0x2*-0x315+-0x1*-0x18d)){this[_0x3a0c6d(-0x1be,-0x2f2,-0x86,-0x76)](_0x3a0c6d(0x19,-0x4d,-0x12e,-0x13f)+_0x6e0a25(0x12c,-0x13e,-0xa7,-0x2)+_0x6e0a25(0x1e0,-0x97,-0x15,0x91)+'tion');return;}function _0x3a0c6d(_0x4dff11,_0x24d730,_0x458da5,_0x5c9a88){return pzg_0x129c88(_0x5c9a88,_0x4dff11- -0x11b,_0x458da5-0x193,_0x5c9a88-0x167);}const _0x312146=this[_0x6e0a25(-0x127,0x102,-0x34,0x2d)+_0x6e0a25(-0x6,-0xc5,-0x152,-0xa7)](_0x57cbe5);let _0x782bd8=[];for(const _0x5845d1 of _0x312146){const _0x52098c=this[_0x6e0a25(-0x145,-0x112,-0x9,-0xb5)+'SPolicies'](_0x5845d1);_0x782bd8=_0x782bd8['concat'](_0x52098c);}function _0x6e0a25(_0xb1e54e,_0x1ed3d1,_0x56d30b,_0x135a7b){return pzg_0x129c88(_0x1ed3d1,_0x135a7b- -0xa8,_0x56d30b-0x57,_0x135a7b-0xad);}const _0x173924=this['generateRL'+_0x3a0c6d(0x4f,-0xcd,0xdb,-0x88)](_0x782bd8),_0x3ee625=(0x1d56+0x233e+0x2*-0x204a,path_1[_0x3a0c6d(0xea,0x1e2,0x1a8,0x211)])(this['config'][_0x3a0c6d(-0x4f,0x9,0x18,0x104)],_0x3a0c6d(-0x155,-0x6b,-0x1c7,-0x78)+'ql');await this[_0x3a0c6d(-0xec,-0x175,-0x1e9,-0x1e5)](_0x3ee625,_0x173924);if(this[_0x6e0a25(-0x1ca,0x21,-0x109,-0x80)]['generateMi'+_0x6e0a25(-0x9d,-0x2c,-0x221,-0x11f)]){const _0x3aa54c=this['generatePr'+_0x3a0c6d(0x18,-0xe5,0xde,-0x49)+_0x6e0a25(0x1d2,0x214,0x176,0xdd)](_0x782bd8),_0x350beb=(-0x89f+0x3*0x1c1+0x35c,path_1[_0x3a0c6d(0xea,0x148,-0xd,0x110)])(this[_0x6e0a25(-0x2d,-0x14,0x64,-0x80)][_0x3a0c6d(-0x4f,-0xd0,-0x14b,0x7b)],_0x5b12b2[_0x6e0a25(-0x70,-0x19e,0x2f,-0x48)]);await this[_0x6e0a25(-0x40,0x88,-0xa0,-0x79)](_0x350beb,_0x3aa54c);}const _0x406b21=(-0x1c8d+-0x1def+0x3a7c,path_1[_0x6e0a25(0x254,0x29c,0x5d,0x15d)])(this[_0x3a0c6d(-0xf3,-0xaa,-0x8e,0x54)]['outputPath'],_0x5b12b2[_0x3a0c6d(0xb0,0x127,0x1c9,-0x82)]),_0x160865=this['generateRL'+'SHelper']((0xcec+-0x16*0xda+0x5d0,path_1[_0x6e0a25(-0xc4,-0xfe,-0xfa,-0x142)])(_0x406b21));await this[_0x6e0a25(-0x77,0x56,0x6a,-0x79)](_0x406b21,_0x160865);const _0x42cd05=(-0x1468+0xee1+0x587,path_1[_0x6e0a25(0x92,0x1f1,0xb8,0x15d)])(this['config'][_0x3a0c6d(-0x4f,-0x1b,-0x108,-0x126)],_0x6e0a25(0x1db,0x217,0x153,0xe8)),_0xe3ae21=this[_0x3a0c6d(-0x128,-0x177,-0x281,-0xe6)+'SDocumenta'+_0x6e0a25(-0x134,-0xac,-0x88,-0x11)]((0x1*0x2349+-0x3be*0x1+-0x64f*0x5,path_1[_0x3a0c6d(-0x1b5,-0x227,-0xf3,-0x2e9)])(_0x42cd05));await this[_0x6e0a25(-0x183,0x2c,-0x141,-0x79)](_0x42cd05,_0xe3ae21),this[_0x3a0c6d(0x9,-0xc9,0xb1,-0x99)](_0x3a0c6d(-0x170,-0x78,-0x2b0,-0x157)+'RLS\x20polici'+'es\x20for\x20'+_0x57cbe5[_0x3a0c6d(-0x149,-0x22d,-0x237,-0x266)]+_0x6e0a25(-0xf3,0xd8,-0x1ca,-0x7a));}[pzg_0x57d874(0x56,-0x8b,-0x7b,-0x42)+pzg_0x129c88(0x23,0x1,-0x98,-0x109)](_0x29be4f){function _0x42dc44(_0x102fac,_0x4098b5,_0x46e87b,_0x68eb33){return pzg_0x57d874(_0x46e87b,_0x102fac- -0xc1,_0x46e87b-0x188,_0x68eb33-0xee);}const _0x4f5d5b={};_0x4f5d5b['bWETE']=_0x42dc44(-0x170,-0x2a8,-0x1ff,-0x13f),_0x4f5d5b['duxza']=function(_0x2641a0,_0x4ca2e9){return _0x2641a0>_0x4ca2e9;};function _0x4fb48e(_0x46a385,_0x3d70aa,_0x13586e,_0x598948){return pzg_0x57d874(_0x46a385,_0x13586e-0x1b2,_0x13586e-0x8e,_0x598948-0x4d);}const _0x5e9b52=_0x4f5d5b,_0x1e47b3=[];for(const _0x43578a of _0x29be4f){const _0xd82b0=[],_0x10a776=_0x43578a[_0x42dc44(-0x52,-0x17e,-0x185,-0x22)+_0x42dc44(-0x9c,0xad,-0x82,0x93)];if(_0x10a776){const _0x28d2a5=this['parseField'+_0x42dc44(-0x17,-0xd5,-0x101,0xad)+'s'](_0x43578a,'',_0x5e9b52[_0x42dc44(-0xab,0xa6,0x58,-0x164)]);for(const _0xeeab23 of _0x28d2a5){const _0x11b5a0=this[_0x42dc44(-0xd5,-0x165,0x49,-0xd8)+_0x42dc44(-0x190,-0x1a8,-0x18f,-0x96)+'n'](_0xeeab23,_0x43578a['name']);_0x11b5a0&&_0xd82b0['push'](_0x11b5a0);}}for(const _0x5c0d03 of _0x43578a[_0x42dc44(-0x197,-0x207,-0x1dc,-0xb7)]){const _0x27ed07=this['getFieldDo'+_0x4fb48e(0x15,0x193,0x8c,-0x6c)+'n'](_0x43578a,_0x5c0d03['name']);if(_0x27ed07){const _0x4f5bbc=this[_0x42dc44(-0x1c6,-0x2b0,-0x1c0,-0x160)+'Annotation'+'s'](_0x43578a,_0x5c0d03[_0x42dc44(-0x166,-0x193,-0x20d,-0x271)],_0x5e9b52[_0x4fb48e(0x218,0x8a,0x1c8,0xa2)]);for(const _0x308b04 of _0x4f5bbc){const _0x2e10e4=this[_0x4fb48e(0x144,0xe2,0x19e,0x29f)+_0x4fb48e(0x1af,0x18d,0xe3,-0x35)+'n'](_0x308b04,_0x43578a[_0x42dc44(-0x166,-0x264,-0x63,-0x271)],_0x5c0d03[_0x42dc44(-0x166,-0x36,-0x107,-0x1a6)]);_0x2e10e4&&_0xd82b0[_0x42dc44(-0x28d,-0x32d,-0x363,-0x246)](_0x2e10e4);}}}if(_0x5e9b52[_0x42dc44(-0x147,-0x233,-0x1a2,-0x29c)](_0xd82b0['length'],-0xfcd+0x1*0x21b5+0x8*-0x23d)){const _0x296a76={};_0x296a76['modelName']=_0x43578a[_0x4fb48e(0x254,0x1c3,0x10d,0x15e)],_0x296a76[_0x42dc44(-0x88,-0x1ba,0x4d,-0xf9)]=_0xd82b0,_0x1e47b3['push'](_0x296a76);}}return _0x1e47b3;}[pzg_0x129c88(0xc2,0x14c,0x172,0x237)+'yAnnotatio'+'n'](_0x192fe4,_0x6761e1,_0x486de9){const _0x13c239={};_0x13c239[_0x3ca468(0x53f,0x479,0x458,0x38a)]=_0x156be3(0x48,-0x52,0xcb,-0x48),_0x13c239['aaCHh']='create',_0x13c239[_0x3ca468(0x492,0x499,0x513,0x5cb)]='where',_0x13c239[_0x3ca468(0x5dd,0x53b,0x5a5,0x608)]=_0x156be3(0x6a,0x99,0x51,0x28),_0x13c239['rVfjn']=function(_0x30c922,_0x53189b){return _0x30c922===_0x53189b;},_0x13c239[_0x156be3(-0x11c,-0xba,-0x197,-0xc8)]='check';const _0x4bcd49=_0x13c239,_0x3f612c=_0x192fe4[_0x3ca468(0x42e,0x370,0x446,0x34d)](/^(\w+)(?:\((.*)\))?$/);function _0x3ca468(_0xa8d4cb,_0x4d3bfc,_0x11da62,_0x2c6141){return pzg_0x129c88(_0x4d3bfc,_0x11da62-0x475,_0x11da62-0x14,_0x2c6141-0x1e7);}if(!_0x3f612c)return null;const [,_0x1ca74b,_0x36863d]=_0x3f612c,_0x1b26e3=[_0x4bcd49['piALF'],_0x3ca468(0x56f,0x386,0x421,0x2e7),_0x4bcd49['aaCHh'],_0x3ca468(0x542,0x331,0x454,0x56b),_0x156be3(-0xc4,-0x120,-0x34,-0xef)];if(!_0x1b26e3['includes'](_0x1ca74b))return null;let _0x57faaa='',_0xc16e24,_0x545b47,_0x2fc63f;function _0x156be3(_0x52fb2b,_0x562bf5,_0x5a6ee7,_0x4b6fb3){return pzg_0x129c88(_0x5a6ee7,_0x4b6fb3- -0x1d0,_0x5a6ee7-0x14,_0x4b6fb3-0xc3);}if(_0x36863d){const _0x4591e1=_0x36863d['match'](/(\w+):\s*"([^"]+)"/);if(_0x4591e1){const [,_0x2a9ccf,_0x3da845]=_0x4591e1;if(_0x2a9ccf===_0x156be3(-0x158,0x3b,0x50,-0x100)){_0xc16e24=_0x4bcd49[_0x3ca468(0x3e6,0x5f0,0x513,0x420)],_0x57faaa=_0x3da845;const _0x3e7f32=_0x3da845[_0x3ca468(0x4f4,0x58d,0x446,0x522)](/(\w+)\s*=\s*ctx\.(\w+)/);_0x3e7f32&&(_0x545b47=_0x3e7f32[-0x287*-0x1+-0x8ae+0x4*0x18a],_0x2fc63f=_0x3e7f32[-0x7f6*-0x3+0x53f*-0x7+0xd*0xfd]);}else{if(_0x2a9ccf===_0x4bcd49[_0x156be3(0x8f,0x1a,0x45,-0xa0)])_0x57faaa=_0x3ca468(0x568,0x68b,0x53b,0x3e2)+_0x3da845+']';else _0x4bcd49[_0x156be3(-0x2b3,-0x2a4,-0x1d4,-0x1e1)](_0x2a9ccf,_0x4bcd49[_0x156be3(-0x12f,-0xd8,-0xcc,-0xc8)])&&(_0x57faaa=_0x3da845);}}}_0x486de9&&!_0x545b47&&(_0x545b47=_0x486de9);const _0xf80747={};return _0xf80747[_0x156be3(-0x2a7,-0x2ac,-0x200,-0x24d)]=_0x1ca74b,_0xf80747[_0x156be3(-0x247,-0x95,-0x171,-0x15f)]=_0xc16e24,_0xf80747[_0x156be3(-0x59,0x102,-0x72,-0x15)]=_0x57faaa||'default\x20'+_0x1ca74b+_0x156be3(-0x118,0x7b,0x13b,0x4),_0xf80747[_0x156be3(-0x1aa,0x27,-0x162,-0x92)]=_0x545b47,_0xf80747[_0x3ca468(0x61d,0x697,0x5d7,0x516)+'iable']=_0x2fc63f,_0xf80747;}[pzg_0x57d874(-0x1b8,-0x16d,-0x203,-0x1a)+pzg_0x57d874(0x3,-0x43,0xf0,-0x143)](_0x3cbf04){const _0x7154f0={};_0x7154f0[_0x91f192(0x43,-0x5,0x58,0x4)]=_0x91f192(0x2a9,0x1c3,0x1ee,0x37f)+'ted',_0x7154f0[_0x202184(-0x127,-0x24,-0x51,0x2c)]=_0x91f192(0x2b5,0x346,0x291,0x251)+'lation\x20-\x20u'+_0x91f192(0x23c,0x1ff,0x283,0x162)+_0x91f192(0x106,0x1af,0x140,-0x13)+'\x20data\x20from'+'\x20their\x20ten'+_0x202184(-0x209,-0x32b,-0x31e,-0x204);const _0x438641=_0x7154f0,_0x1d8a64=[],_0x5265fe=_0x3cbf04[_0x91f192(0x47,-0x34,0x96,-0x108)][_0x91f192(0x1a6,0x16a,0xc9,0x29b)+'e']();function _0x202184(_0x58b0ba,_0x4eef49,_0x281c55,_0x4669fd){return pzg_0x129c88(_0x281c55,_0x58b0ba- -0x1ff,_0x281c55-0x144,_0x4669fd-0x1e5);}function _0x91f192(_0x3105ee,_0x3d44f9,_0x31bc04,_0x547ebd){return pzg_0x129c88(_0x547ebd,_0x3105ee-0xc1,_0x31bc04-0x93,_0x547ebd-0xaa);}for(const _0x2231a2 of _0x3cbf04[_0x91f192(0x25a,0x1a6,0x1e1,0x21f)]){const _0x51e862=this[_0x91f192(0x30,0xd6,0x25,-0xa)+_0x202184(-0x281,-0x276,-0x1f3,-0x19e)](_0x2231a2,_0x5265fe);_0x51e862&&_0x1d8a64[_0x202184(-0x26b,-0x2ec,-0x2ba,-0x1de)](_0x51e862);}if(this[_0x91f192(0xe9,0x2c,0x15b,0x130)][_0x202184(-0x33,0x30,0xe1,0x18)+'d']){const _0x5a9f18={};_0x5a9f18[_0x91f192(0x17c,0xff,0xa0,0x178)]=_0x5265fe+('_tenant_is'+'olation'),_0x5a9f18[_0x202184(-0xb9,-0x1f6,-0x11a,-0x1a6)]=_0x5265fe,_0x5a9f18[_0x91f192(0xbe,-0x5d,0xab,0x177)]=_0x202184(-0x195,-0x25a,-0x20f,-0x1fd),_0x5a9f18[_0x202184(-0x7,-0xb0,-0x7c,-0xa9)]=_0x438641['BaokV'],_0x5a9f18[_0x91f192(0x200,0x177,0x26c,0x2b8)]=this[_0x202184(-0x1d7,-0xda,-0xf1,-0x95)][_0x91f192(0x28d,0x1b9,0x28a,0x287)+'d']+('\x20=\x20current'+_0x202184(-0x28e,-0x3ab,-0x1e0,-0x3a5)+_0x91f192(0x20a,0x1e7,0x251,0x2be)+_0x91f192(0x1ad,0x6c,0x9d,0xd1)+'d\x27)::uuid'),_0x5a9f18[_0x91f192(0x17e,0x77,0x293,0xa5)+'n']=_0x438641[_0x91f192(0x199,0x253,0x2c9,0x140)],_0x1d8a64[_0x91f192(0x55,0x91,0x131,0xb2)](_0x5a9f18);}if(this[_0x91f192(0xe9,0xc4,0x1f9,-0x55)]['enableRowO'+_0x91f192(0x173,0x19d,0xa6,0x97)]&&this['config'][_0x91f192(0x26d,0x165,0x374,0x37c)+'ield']){const _0x143385={};_0x143385[_0x91f192(0x17c,0x166,0x9d,0x25c)]=_0x5265fe+(_0x202184(-0x1f,-0x40,-0x62,-0x113)+'ess'),_0x143385[_0x202184(-0xb9,-0xe9,-0x193,0x8d)]=_0x5265fe,_0x143385['operation']=_0x202184(-0x195,-0x126,-0x1cd,-0x55),_0x143385[_0x202184(-0x7,0xb3,0x13d,0x101)]='authentica'+_0x91f192(0x1ae,0xf6,0x7f,0x2fd),_0x143385[_0x202184(-0xc0,-0x18,-0x1a7,-0xa3)]=this[_0x202184(-0x1d7,-0x269,-0x288,-0x148)][_0x202184(-0x53,-0xaf,-0xf0,-0x8a)+_0x202184(-0x247,-0x162,-0x2d6,-0x33a)]+(_0x202184(-0xa0,-0x1e7,-0x17b,-0x183)+'_setting(\x27'+'app.curren'+_0x91f192(0x25,0x70,-0x11c,-0xd3)+_0x91f192(0xe5,0x1ae,0x1e1,-0xf)),_0x143385[_0x202184(-0x142,-0x1f4,-0x115,-0x25d)+'n']='Row\x20owners'+_0x202184(-0x118,-0x21f,-0x17f,-0x230)+_0x202184(-0x3d,0xc5,0x10,-0x11c)+_0x91f192(0x16d,0x14b,0x82,0xe0)+_0x202184(-0x1f4,-0x165,-0xf1,-0x29a)+'ta',_0x1d8a64[_0x202184(-0x26b,-0x1ee,-0x19f,-0x2a3)](_0x143385);}return _0x1d8a64;}[pzg_0x57d874(-0x140,-0x1f1,-0xf4,-0x2f1)+pzg_0x129c88(-0x14b,-0x82,-0xf6,0x45)](_0x19b554,_0x5e24a0){const _0x228071={};function _0x95a840(_0x36be0f,_0x4ac0cd,_0x317a09,_0x1f319f){return pzg_0x129c88(_0x36be0f,_0x1f319f-0xcd,_0x317a09-0x192,_0x1f319f-0x7e);}_0x228071[_0x85ce6a(0x519,0x459,0x4ff,0x524)]=_0x85ce6a(0x61a,0x701,0x4f2,0x653),_0x228071[_0x85ce6a(0x657,0x50d,0x599,0x572)]=_0x95a840(-0x83,-0x68,0x132,0x3f),_0x228071[_0x85ce6a(0x511,0x433,0x5d5,0x4cd)]='write',_0x228071[_0x85ce6a(0x637,0x617,0x5a3,0x545)]='update',_0x228071['XvEUG']=_0x95a840(0x364,0x3c4,0x1d5,0x2c4),_0x228071[_0x85ce6a(0x451,0x4fb,0x3a5,0x5a1)]=_0x85ce6a(0x5a2,0x49b,0x5ad,0x49f),_0x228071[_0x95a840(0x107,0x82,0x51,0x10d)]=_0x85ce6a(0x578,0x42d,0x563,0x511),_0x228071[_0x85ce6a(0x45c,0x529,0x420,0x369)]=_0x85ce6a(0x573,0x63d,0x455,0x67f),_0x228071[_0x95a840(0x196,0x191,0x2bc,0x2a6)]=_0x85ce6a(0x484,0x4b8,0x40c,0x58a);const _0x901fb9=_0x228071,_0x77845c=_0x5e24a0+'_'+_0x19b554[_0x95a840(0x105,-0x19,0x20,0x50)]+_0x85ce6a(0x673,0x7a7,0x660,0x6c6);function _0x85ce6a(_0x17c13d,_0x33232d,_0x440a6b,_0x4fee29){return pzg_0x57d874(_0x440a6b,_0x17c13d-0x5f2,_0x440a6b-0x1b7,_0x4fee29-0x132);}switch(_0x19b554[_0x85ce6a(0x415,0x527,0x3ef,0x56e)]){case _0x901fb9[_0x95a840(0xb3,0x65,0x198,0x154)]:return{'name':_0x77845c,'table':_0x5e24a0,'operation':_0x901fb9['BUjfZ'],'expression':this[_0x85ce6a(0x683,0x606,0x579,0x663)+_0x85ce6a(0x549,0x42e,0x5e5,0x58c)+'L'](_0x19b554),'description':'Read\x20acces'+'s\x20policy:\x20'+_0x19b554[_0x95a840(0x282,0x21e,0x332,0x288)]};case _0x901fb9[_0x95a840(0x13,0xae,0x8e,0x14c)]:case _0x901fb9[_0x85ce6a(0x637,0x56d,0x705,0x5a9)]:return{'name':_0x77845c,'table':_0x5e24a0,'operation':_0x901fb9['XvEUG'],'expression':this['convertCon'+'ditionToSQ'+'L'](_0x19b554),'check':this[_0x95a840(0x404,0x3a2,0x2c3,0x2be)+'ditionToSQ'+'L'](_0x19b554),'description':'Update\x20acc'+_0x85ce6a(0x53a,0x57d,0x67f,0x52b)+':\x20'+_0x19b554[_0x95a840(0x2e3,0x2c2,0x37d,0x288)]};case _0x901fb9['hHdeJ']:return{'name':_0x77845c,'table':_0x5e24a0,'operation':_0x901fb9[_0x85ce6a(0x4d2,0x3e5,0x432,0x533)],'check':this[_0x85ce6a(0x683,0x598,0x77f,0x7b0)+_0x85ce6a(0x549,0x622,0x592,0x5b3)+'L'](_0x19b554),'description':'Insert\x20acc'+_0x95a840(0x201,0x67,0xc7,0x175)+':\x20'+_0x19b554[_0x95a840(0x14f,0x22e,0x2fb,0x288)]};case _0x901fb9[_0x85ce6a(0x45c,0x341,0x46d,0x5b4)]:return{'name':_0x77845c,'table':_0x5e24a0,'operation':_0x901fb9[_0x85ce6a(0x66b,0x5eb,0x7b2,0x738)],'expression':this[_0x95a840(0x1b6,0x316,0x3b2,0x2be)+_0x85ce6a(0x549,0x5a4,0x638,0x5d3)+'L'](_0x19b554),'description':_0x85ce6a(0x467,0x3fe,0x37f,0x3a5)+'ess\x20policy'+':\x20'+_0x19b554[_0x95a840(0x26a,0x30a,0x17f,0x288)]};default:return null;}}[pzg_0x57d874(0x1b9,0x91,-0x1b,0xcb)+'ditionToSQ'+'L'](_0x3b8b3b){const _0x470a20={};_0x470a20[_0x28bb43(0xf0,0x192,0x230,0x2a6)]=function(_0x1f6df0,_0x336450){return _0x1f6df0===_0x336450;};function _0x28bb43(_0x50b42a,_0x3854a3,_0x406b0d,_0x1ea516){return pzg_0x57d874(_0x1ea516,_0x406b0d-0x286,_0x406b0d-0x64,_0x1ea516-0x1ca);}_0x470a20[_0x28bb43(0x9,0x1a5,0x91,0x114)]=_0x28bb43(0x26f,0x3a0,0x27c,0x2c2),_0x470a20['jnUwU']=_0x28bb43(0x129,0x4b,0xee,0x204)+'\x20in';const _0x16287e=_0x470a20;if(_0x16287e[_0x3e6e1b(0x14a,0x146,0xbb,0x32)](_0x3b8b3b[_0x3e6e1b(0x206,0xad,-0x73,0xcc)],_0x3e6e1b(0x15c,0x10c,0x1ce,0x12e))&&_0x3b8b3b[_0x28bb43(0x24d,0x1a5,0x264,0x3bb)]&&_0x3b8b3b['contextVar'+_0x28bb43(0x1b8,0x1ba,0x246,0x39e)]){if(_0x3b8b3b['contextVar'+_0x3e6e1b(0xba,0x15c,0x26f,0x239)]===_0x3e6e1b(0x260,0x189,0x16b,0x255))return _0x3b8b3b[_0x3e6e1b(0x136,0x17a,0x2c1,0x166)]+(_0x3e6e1b(0x12f,0x19b,0x207,0x1d2)+'_setting(\x27'+'app.curren'+_0x28bb43(0x2e3,0x33f,0x212,0x13b)+'d\x27)::uuid');if(_0x3b8b3b['contextVar'+_0x3e6e1b(0x159,0x15c,0x229,0x96)]===_0x28bb43(0xd2,0x116,0x173,0xc8))return _0x3b8b3b[_0x3e6e1b(0x21f,0x17a,0x162,0x1b8)]+(_0x28bb43(0x2b4,0x20f,0x285,0x170)+_0x28bb43(-0x60,0x3c,0x97,-0x27)+_0x28bb43(0x1e8,0x140,0x26f,0x24a)+'t_user_id\x27'+_0x28bb43(0x263,0x178,0x14a,0xe5));if(_0x16287e[_0x28bb43(0xe5,0x316,0x230,0x213)](_0x3b8b3b['contextVar'+_0x28bb43(0x12d,0x2f4,0x246,0x171)],_0x16287e[_0x3e6e1b(-0x57,-0x59,-0xfa,-0x177)]))return _0x3e6e1b(0x1f1,0xc1,0x185,-0x84)+'tting(\x27app'+_0x3e6e1b(0x15b,0xa2,0x133,-0x68)+'ser_roles\x27'+_0x3e6e1b(0x28f,0x1bc,0x2de,0x9e)+_0x28bb43(0x26b,0x2cf,0x320,0x27e)+_0x3b8b3b[_0x28bb43(0x2e6,0x287,0x2e1,0x436)]+'\x27]';return _0x3b8b3b['field']+(_0x3e6e1b(0x170,0x19b,0x1df,0xdd)+'_setting(\x27'+_0x3e6e1b(0xee,0x68,0x106,0x9f))+_0x3b8b3b[_0x3e6e1b(0x29c,0x19e,0x156,0xa6)+_0x28bb43(0x271,0x371,0x246,0x231)]+'\x27)';}if(_0x3b8b3b[_0x3e6e1b(0x130,0x1f7,0x1d5,0x1cd)][_0x28bb43(0x1d9,0x25f,0x29b,0x1f2)](_0x28bb43(0x33f,0x194,0x28b,0x224))){const _0x3abe11=_0x3b8b3b[_0x3e6e1b(0x32c,0x1f7,0x12a,0x1b5)][_0x3e6e1b(0x13,0xd,-0x28,-0xcc)](/role\s+in\s+\[([^\]]+)\]/);if(_0x3abe11){const _0x568262=_0x3abe11[-0x7c*-0x49+-0x553+0x7c*-0x3e][_0x3e6e1b(0xf6,0xea,0x1ad,0x137)](',')['map'](_0x349f60=>_0x349f60['trim']()[_0x28bb43(0x2e2,0x3a6,0x287,0x1d4)](/['"]/g,''));return'current_se'+'tting(\x27app'+_0x28bb43(0xe3,0x1f2,0x18c,0x93)+_0x3e6e1b(0xe2,0x223,0x263,0x1ee)+_0x28bb43(0x2aa,0x1ad,0x2a6,0x212)+_0x3e6e1b(0x192,0xd2,0x79,-0x2)+_0x568262[_0x28bb43(0x22b,0x23,0x143,0x1c4)](_0x17e3bd=>'\x27'+_0x17e3bd+'\x27')[_0x3e6e1b(0x27c,0x241,0xf5,0x296)](',\x20')+']';}}function _0x3e6e1b(_0x585dbf,_0x4e943a,_0x43b1b4,_0x5eae03){return pzg_0x129c88(_0x43b1b4,_0x4e943a-0x3c,_0x43b1b4-0x154,_0x5eae03-0x18a);}if(_0x3b8b3b[_0x28bb43(0x29b,0x3c6,0x2e1,0x28d)][_0x28bb43(0x276,0x2bb,0x29b,0x3b6)](_0x16287e[_0x28bb43(0x36b,0x3f7,0x328,0x2d7)])){const _0x44ee36=_0x3b8b3b['condition'][_0x28bb43(0x23b,0x143,0xf7,0xff)](/permission\s+in\s+\[([^\]]+)\]/);if(_0x44ee36){const _0x4b6f58=_0x44ee36[0x1*0x9e8+-0x2104+0x171d][_0x3e6e1b(-0x4f,0xea,0x149,0xe0)](',')[_0x3e6e1b(0x81,0x59,0x63,0xc4)](_0x44114e=>_0x44114e[_0x28bb43(0x187,0x241,0x162,0x208)]()[_0x3e6e1b(0x198,0x19d,0xeb,0x21b)](/['"]/g,''));return _0x3e6e1b(0xe5,0xc1,0x1e9,0x1f0)+_0x3e6e1b(0x208,0x1bb,0x205,0xec)+'.current_u'+_0x3e6e1b(0x2d0,0x1b0,0x10b,0x2cd)+_0x28bb43(0x299,0x139,0x16d,0x1c3)+'ext[]\x20&&\x20A'+'RRAY['+_0x4b6f58[_0x28bb43(0x292,0x40,0x143,0x219)](_0xc15bbf=>'\x27'+_0xc15bbf+'\x27')[_0x28bb43(0x321,0x33f,0x32b,0x2a7)](',\x20')+']';}}return _0x3b8b3b[_0x3e6e1b(0x2ae,0x1f7,0xc1,0x189)]['replace'](/ctx\.(\w+)/g,_0x28bb43(0x1fc,0x272,0x1ab,0x1a2)+_0x28bb43(0x2fd,0x182,0x2a5,0x222)+_0x3e6e1b(0x196,0xe7,0x144,0x1));}['generateRL'+pzg_0x57d874(0xe7,0xa,-0x83,-0x6c)](_0x537570){const _0xd5f29f={};_0xd5f29f[_0x75fa13(0x8,-0x1c0,-0xdc,-0x17c)]=_0x3bd047(-0xf4,-0x1d,-0x2a1,-0x14c)+_0x75fa13(-0x31,-0x123,-0x114,-0xd2)+_0x3bd047(0xea,-0x38,-0xb9,-0x35)+_0x3bd047(-0x13c,-0x105,-0x1f3,-0xc8),_0xd5f29f[_0x75fa13(0x45,-0x223,-0xd7,-0x1f4)]='Policy:\x20';const _0x26d8da=_0xd5f29f;function _0x3bd047(_0x279381,_0x5d928a,_0x282d87,_0x51c034){return pzg_0x57d874(_0x282d87,_0x51c034-0x24,_0x282d87-0x1bc,_0x51c034-0x17c);}const _0xd93c2e=[_0x26d8da[_0x3bd047(-0x23e,-0xe0,-0x1b1,-0x156)]],_0x274a15=_0x537570[_0x75fa13(0x1cc,0x244,0x104,-0x3d)]((_0x1113ea,_0x3eae17)=>{!_0x1113ea[_0x3eae17[_0x44ae3d(0x38b,0x34a,0x3b2,0x478)]]&&(_0x1113ea[_0x3eae17[_0x4bb0c8(0x565,0x6a8,0x7f4,0x60d)]]=[]);function _0x4bb0c8(_0x39ee9c,_0x26ac17,_0x11c897,_0x177e8d){return _0x75fa13(_0x39ee9c-0x1b6,_0x26ac17-0xda,_0x26ac17-0x624,_0x39ee9c);}function _0x44ae3d(_0x5e7838,_0x1ba405,_0x3b1a6f,_0x1e785f){return _0x3bd047(_0x5e7838-0x1d3,_0x1ba405-0x9b,_0x3b1a6f,_0x5e7838-0x381);}return _0x1113ea[_0x3eae17[_0x4bb0c8(0x72c,0x6a8,0x619,0x7d2)]][_0x4bb0c8(0x3d7,0x4f6,0x633,0x446)](_0x3eae17),_0x1113ea;},{});for(const [_0x448812,_0x233696]of Object['entries'](_0x274a15)){_0xd93c2e[_0x75fa13(-0x185,-0x246,-0x12e,-0x282)](_0x3bd047(-0xd3,-0x2b6,-0x85,-0x166)+_0x3bd047(-0x27f,-0x21f,-0x1ec,-0x185)+_0x448812+_0x75fa13(0x108,-0x9d,0x14,0xb7)),_0xd93c2e[_0x3bd047(-0x162,-0x267,-0xbb,-0x1a8)](_0x75fa13(-0x144,-0xa4,-0xab,-0x1ef)+'E\x20\x22'+_0x448812+(_0x3bd047(-0x2d4,-0x233,-0x332,-0x1dc)+'OW\x20LEVEL\x20S'+_0x75fa13(-0xe9,-0xf3,-0x41,-0xe8)));for(const _0x384ff0 of _0x233696){_0xd93c2e[_0x75fa13(-0xae,-0x39,-0x12e,-0x1ac)](_0x75fa13(-0xa4,0x69,0x6b,0x37)+(_0x384ff0[_0x75fa13(-0x112,0xf8,-0x5,0x14)+'n']||_0x26d8da[_0x3bd047(-0x119,-0x185,-0x4,-0x151)]+_0x384ff0[_0x3bd047(0xd0,-0x169,-0xc,-0x81)]));let _0x22f465=_0x75fa13(-0x35,-0x1d,-0x127,-0x229)+_0x3bd047(-0x15b,-0x250,-0xdf,-0x1c7)+_0x384ff0[_0x75fa13(0x60,-0x49,-0x7,-0x138)]+'\x22';_0x22f465+='\x0a\x20\x20ON\x20\x22'+_0x384ff0[_0x3bd047(-0x4e,-0xee,0x13a,0xa)]+'\x22',_0x384ff0[_0x75fa13(-0x1,0x17e,0x136,0x114)]?(_0x22f465+=_0x75fa13(-0x8e,-0xa0,-0x164,-0x17f)+_0x384ff0['operation'],_0x22f465+='\x0a\x20\x20TO\x20'+_0x384ff0[_0x75fa13(0x1e0,0x18a,0x136,0x69)]):_0x22f465+='\x0a\x20\x20FOR\x20'+_0x384ff0[_0x75fa13(0x20,-0x20b,-0xc5,0x8a)],_0x384ff0[_0x75fa13(0x35,0xaa,0x7d,0xc1)]&&(_0x22f465+=_0x3bd047(-0x85,-0x10e,-0x2d4,-0x1d7)+_0x384ff0['expression']+')'),_0x384ff0[_0x3bd047(-0x7,-0x6b,0x1d,-0xac)]&&(_0x22f465+=_0x3bd047(-0x151,-0x202,-0x200,-0x1d0)+'ECK\x20('+_0x384ff0[_0x3bd047(-0x1bf,-0x1fa,0x59,-0xac)]+')'),_0x22f465+=';\x0a',_0xd93c2e[_0x75fa13(-0x117,-0xd4,-0x12e,-0x27e)](_0x22f465);}_0xd93c2e[_0x75fa13(-0x273,-0x196,-0x12e,-0x254)]('');}function _0x75fa13(_0x4c9e93,_0x45fd31,_0x136ee1,_0x5e0e87){return pzg_0x129c88(_0x5e0e87,_0x136ee1- -0xc2,_0x136ee1-0x12d,_0x5e0e87-0x1d4);}return _0xd93c2e[_0x3bd047(-0x2ca,-0x9f,-0x129,-0x1a8)](this[_0x75fa13(0x156,0xe3,0xa1,0xc4)+_0x3bd047(0x160,0x1b9,-0x59,0x6c)+'ons']()),_0xd93c2e['join']('\x0a');}[pzg_0x57d874(-0xec,0x3,0xda,-0x113)+pzg_0x129c88(0x5b,0x1a8,0xcf,0xa1)+pzg_0x57d874(0x12b,0x26,-0x5a,-0x68)](){function _0x5b1879(_0x3218b6,_0x256954,_0x354449,_0x5400d1){return pzg_0x129c88(_0x3218b6,_0x354449-0x115,_0x354449-0xbf,_0x5400d1-0x66);}function _0x13e611(_0x5d211b,_0x25bed7,_0x29f57c,_0x196b82){return pzg_0x57d874(_0x29f57c,_0x25bed7-0x6b7,_0x29f57c-0x127,_0x196b82-0x1f3);}return _0x5b1879(0x319,0x3d6,0x31b,0x32f)+_0x5b1879(0x2a5,0x1a4,0x2e8,0x34c)+_0x5b1879(0xfd,0x1b4,0x168,0x182)+'ntext\x0a\x0a--\x20'+_0x13e611(0x58b,0x651,0x77b,0x66c)+_0x5b1879(0x48,0x56,0x8f,0x6a)+'ent\x20user\x20c'+_0x5b1879(0x1b4,0x191,0x117,0x3)+_0x5b1879(0x121,0xe,0x140,0x105)+_0x13e611(0x5fb,0x6aa,0x6de,0x778)+_0x5b1879(0x232,0x3c1,0x2df,0x298)+_0x5b1879(0xcf,0x2d,0x145,0x101)+_0x5b1879(0x2b2,0x1b7,0x1e4,0x226)+'\x20\x20user_id\x20'+_0x13e611(0x6e4,0x637,0x51c,0x667)+_0x5b1879(-0x4b,0x182,0xa1,-0x8d)+'id\x20DEFAULT'+_0x5b1879(0x30f,0x3b2,0x319,0x2b8)+_0x13e611(0x7bb,0x67d,0x569,0x54e)+_0x5b1879(0x82,0x1c8,0x1aa,0xe9)+_0x5b1879(0x349,0x36f,0x2fb,0x3ba)+_0x5b1879(0x18a,0xa7,0x181,0x23f)+_0x5b1879(0x58,0x243,0x118,0x20e)+_0x5b1879(0x114,0x17c,0x1ae,0x156)+_0x13e611(0x721,0x75f,0x682,0x73d)+_0x5b1879(0x242,0x26f,0x28d,0x3dd)+_0x5b1879(0x6b,0x106,0x13a,0x27b)+'ERFORM\x20set'+_0x5b1879(0x1bb,0x2b,0x134,0x202)+'pp.current'+'_user_id\x27,'+'\x20user_id::'+_0x5b1879(0x2b3,0x1d5,0x2e2,0x2f3)+_0x13e611(0x7b6,0x689,0x563,0x6cd)+_0x5b1879(0x168,0x40,0xc6,0x5)+_0x13e611(0x507,0x4ca,0x4a3,0x4eb)+_0x13e611(0x3b8,0x50a,0x5e7,0x445)+_0x5b1879(0x354,0x255,0x259,0x16e)+'t_config(\x27'+'app.curren'+_0x13e611(0x52a,0x643,0x5bc,0x546)+_0x13e611(0x609,0x6b2,0x62e,0x560)+_0x13e611(0x6cf,0x5b3,0x6b3,0x663)+_0x5b1879(0x259,0x295,0x1b9,0x2fa)+_0x5b1879(0x330,0x1a6,0x2f2,0x278)+_0x13e611(0x773,0x6f2,0x6ee,0x6e2)+'IS\x20NOT\x20NUL'+_0x13e611(0x429,0x581,0x586,0x4a5)+_0x13e611(0x608,0x52b,0x587,0x672)+_0x5b1879(0x343,0x2f0,0x223,0xe7)+'\x27app.curre'+'nt_user_ro'+_0x5b1879(0x295,0x1df,0x236,0x25a)+_0x13e611(0x6e0,0x6f4,0x690,0x798)+'g(roles,\x20\x27'+',\x27),\x20true)'+_0x13e611(0x3f3,0x54b,0x42c,0x60f)+_0x5b1879(0x22,0x130,0x94,0x1d7)+_0x5b1879(0xd4,0x38,0x181,0x1a1)+_0x5b1879(0x4e,0x21d,0x126,0x247)+_0x13e611(0x61d,0x581,0x4da,0x6aa)+_0x5b1879(-0x60,0x1d5,0xe9,0x56)+_0x5b1879(0x2d3,0x33b,0x223,0x31c)+_0x5b1879(0x2f4,0x1a0,0x1d6,0xcf)+'nt_user_pe'+_0x5b1879(0x27f,0x168,0x2ab,0x275)+_0x5b1879(0x1c9,0x1be,0x92,0xaf)+'_string(pe'+_0x5b1879(0x137,0x242,0x1f7,0x327)+'\x20\x27,\x27),\x20tru'+_0x13e611(0x4b6,0x596,0x603,0x538)+'IF;\x0aEND;\x0a$'+_0x5b1879(0x148,0x75,0x9c,0x18b)+_0x5b1879(0x20e,0x274,0x13e,0x18e)+_0x5b1879(0x14d,0x187,0x110,0x20b)+_0x5b1879(0x6e,0x279,0x18f,0x96)+_0x5b1879(0x1ba,0x172,0x1bf,0x171)+_0x13e611(0x5cd,0x51b,0x3f7,0x57c)+'ser\x20contex'+_0x13e611(0x567,0x64e,0x504,0x5eb)+_0x13e611(0x877,0x756,0x825,0x7d9)+'FUNCTION\x20c'+_0x13e611(0x537,0x524,0x452,0x505)+_0x5b1879(0x101,0x121,0x21a,0x2d0)+_0x13e611(0x6c4,0x5a9,0x5f3,0x5fb)+_0x5b1879(-0x38,0xed,0x95,0x166)+_0x5b1879(0x218,0x360,0x258,0x340)+_0x5b1879(0xbf,0x2b6,0x191,0x281)+_0x13e611(0x544,0x663,0x664,0x58a)+'.current_u'+_0x5b1879(0xd3,0x1eb,0x179,0x98)+_0x13e611(0x75d,0x753,0x722,0x70d)+_0x13e611(0x661,0x575,0x62d,0x46b)+'set_config'+_0x13e611(0x53a,0x5e6,0x712,0x6e8)+'ent_tenant'+'_id\x27,\x20\x27\x27,\x20'+'true);\x0a\x20\x20P'+'ERFORM\x20set'+_0x5b1879(0x273,0x236,0x134,0x1d0)+('pp.current'+_0x13e611(0x42d,0x577,0x5ea,0x628)+_0x13e611(0x6e7,0x66c,0x533,0x54f)+'ue);\x0a\x20\x20PER'+'FORM\x20set_c'+_0x13e611(0x510,0x663,0x688,0x5ac)+_0x5b1879(0x1d2,0x23f,0x17b,0x6e)+'ser_permis'+_0x13e611(0x593,0x5af,0x5be,0x607)+',\x20true);\x0aE'+_0x13e611(0x755,0x6b4,0x68b,0x7fb)+_0x13e611(0x471,0x57d,0x43f,0x5f1)+_0x5b1879(0xb8,0x2da,0x1e2,0x14c)+_0x5b1879(0x1fd,0xcc,0x150,0x237)+';\x0a\x0a--\x20Func'+_0x5b1879(0x1ac,0xad,0x99,-0xbe)+'t\x20current\x20'+_0x13e611(0x547,0x544,0x59e,0x634)+_0x5b1879(0x1f7,0x11d,0x1af,0x255)+_0x13e611(0x627,0x70d,0x83a,0x7e2)+'\x20FUNCTION\x20'+_0x13e611(0x507,0x5a1,0x6fb,0x651)+_0x5b1879(0x10e,0x1ef,0xed,0x1f5)+_0x5b1879(0x75,0x24d,0x180,0xcf)+_0x5b1879(0x1c2,0x181,0x148,0x43)+_0x13e611(0x831,0x6e2,0x729,0x67a)+_0x5b1879(-0x9,0xfd,0x96,0x95)+_0x13e611(0x6ec,0x5cd,0x532,0x55d)+'d_object(\x0a'+'\x20\x20\x20\x20\x27user_'+_0x13e611(0x6bd,0x5e2,0x4c7,0x6d6)+_0x13e611(0x686,0x62a,0x71f,0x67b)+_0x5b1879(0x1ae,0x1c7,0x1a4,0x1c4)+_0x13e611(0x5f1,0x578,0x4e3,0x477)+_0x13e611(0x7e0,0x6f3,0x6cc,0x5ac)+'\x0a\x20\x20\x20\x20\x27tena'+'nt_id\x27,\x20cu'+_0x5b1879(0x205,0x2e6,0x255,0x19f)+'ing(\x27app.c'+_0x5b1879(0x2ed,0x1c9,0x2c6,0x1b7)+_0x5b1879(0x226,0x22e,0x28c,0x1d4)+'rue),\x0a\x20\x20\x20\x20'+_0x13e611(0x57c,0x58c,0x609,0x46e)+_0x13e611(0x768,0x632,0x710,0x65b)+_0x13e611(0x5b1,0x6fb,0x803,0x67e)+_0x13e611(0x5cb,0x62a,0x5a6,0x55b)+'(\x27app.curr'+_0x13e611(0x7fb,0x6d0,0x6b8,0x5be)+_0x5b1879(0x22e,0x1ad,0x1f8,0x173)+'e),\x20\x27,\x27),\x0a'+_0x5b1879(0xee,0x1fd,0x1ad,0xdb)+'ssions\x27,\x20s'+_0x13e611(0x6c1,0x632,0x564,0x6be)+'rray(curre'+'nt_setting'+_0x13e611(0x6c3,0x5e6,0x73c,0x633)+_0x5b1879(0x1a7,-0xb0,0xa7,0x1c3)+_0x13e611(0x682,0x569,0x53a,0x636)+_0x13e611(0x54b,0x4e4,0x5de,0x398)+_0x13e611(0x6f0,0x704,0x5d0,0x68f)+_0x5b1879(0x1c9,0x115,0x184,0x2bf)+_0x13e611(0x606,0x500,0x3bc,0x3ce)+_0x5b1879(0x6f,0x1cb,0x1c2,0x16d)+_0x5b1879(0x2a4,0x16b,0x1ff,0x2f6)+_0x13e611(0x459,0x56a,0x527,0x4de));}['generatePr'+'ismaMigrat'+pzg_0x129c88(0x168,0x185,0xb6,0x2d7)](_0x25192e){function _0x28730a(_0x2b8e4d,_0x59deed,_0x3b4f26,_0x29eb33){return pzg_0x57d874(_0x3b4f26,_0x29eb33-0x2c9,_0x3b4f26-0x1a8,_0x29eb33-0x1b5);}const _0x50942e=this['generateRL'+_0x408307(0x4d3,0x414,0x403,0x313)](_0x25192e);function _0x408307(_0x35131b,_0x437730,_0x13d52f,_0x3b98a1){return pzg_0x57d874(_0x13d52f,_0x437730-0x40a,_0x13d52f-0xf3,_0x3b98a1-0x1bd);}return'--\x20CreateR'+'owLevelSec'+'urity\x0a--\x20G'+'enerated\x20b'+_0x28730a(0x340,0x1d1,0x1d7,0x264)+'\x0aBEGIN;\x0a\x0a'+_0x50942e+_0x28730a(0x1ed,0x26f,0x248,0x144);}['generateRL'+pzg_0x129c88(0x185,0xdd,0x1c4,0x1aa)](_0x27cfe0){function _0x22ed95(_0x2be717,_0x578ae0,_0x7bf5d9,_0x10a947){return pzg_0x57d874(_0x7bf5d9,_0x2be717-0x393,_0x7bf5d9-0x132,_0x10a947-0x1d7);}function _0x15c022(_0x11f648,_0x5ef44c,_0x384f69,_0x115520){return pzg_0x57d874(_0x5ef44c,_0x11f648-0x2c7,_0x384f69-0xa4,_0x115520-0x1ed);}const _0x592df2=(-0xb75*0x1+-0x1*-0x367+0x80e,prismaImport_1[_0x22ed95(0x23f,0x1f6,0x1d6,0x18a)+_0x15c022(0x1ef,0x213,0x15d,0xee)+_0x15c022(0x174,0x12a,0x1ad,0x1a3)])(_0x27cfe0);return _0x22ed95(0x420,0x2e7,0x2c7,0x4fa)+_0x22ed95(0x264,0x11d,0x2ed,0x3bc)+_0x22ed95(0x2c6,0x38f,0x332,0x20f)+_0x15c022(0x20e,0x338,0x105,0x1ae)+_0x22ed95(0x1de,0x292,0xe1,0x26e)+'by\x20PZG\x20Pro'+_0x15c022(0x307,0x286,0x23e,0x378)+_0x15c022(0x221,0x30e,0x311,0x131)+_0x22ed95(0x361,0x358,0x42a,0x431)+_0x15c022(0x1b0,0x2e0,0x1b5,0xc0)+_0x592df2+(_0x15c022(0x2bb,0x32a,0x31e,0x375)+_0x15c022(0x12a,0x226,0x7c,0x1d2)+'\x20RLSContex'+_0x15c022(0xc2,0x159,-0x94,-0x21)+_0x15c022(0x141,0x18e,0x180,0x244)+_0x22ed95(0x1dd,0x20d,0x94,0x216)+_0x22ed95(0x38d,0x2e1,0x399,0x428)+_0x15c022(0x133,0xb,0x12d,0xfb)+'s?:\x20string'+_0x22ed95(0x43f,0x4bb,0x497,0x409)+_0x15c022(0xf8,0x14b,0x1d8,-0x40)+_0x15c022(0x308,0x218,0x45d,0x41f)+_0x15c022(0x310,0x1b9,0x39a,0x232)+'class\x20Post'+'gresRLSHel'+'per\x20{\x0a\x20\x20co'+_0x15c022(0x2c7,0x29c,0x325,0x189)+_0x22ed95(0x28c,0x173,0x1d4,0x250)+_0x15c022(0x1d0,0x241,0x22a,0x269)+_0x15c022(0x2b1,0x267,0x251,0x33e)+'{}\x0a\x0a\x20\x20/**\x0a'+'\x20\x20\x20*\x20Set\x20R'+'LS\x20context'+_0x15c022(0x345,0x38c,0x3f0,0x3a4)+'urrent\x20ses'+_0x15c022(0x25a,0x222,0x263,0x2fb)+_0x22ed95(0x352,0x382,0x30c,0x2b1)+'etContext('+_0x22ed95(0x2fc,0x1db,0x304,0x41a)+'LSContext)'+_0x22ed95(0x2d4,0x1d3,0x35b,0x36e)+_0x15c022(0x124,0xc7,0x6b,0x14a)+_0x22ed95(0x24e,0x1f1,0x1b6,0x1f3)+_0x15c022(0x1a9,0xdd,0xc0,0x109)+_0x22ed95(0x21d,0x2a5,0x21f,0x36a)+_0x22ed95(0x35d,0x234,0x30c,0x287)+'permission'+_0x15c022(0x144,0xb4,0x75,0xe8)+_0x15c022(0x372,0x479,0x27a,0x273)+_0x15c022(0x21c,0x267,0x24f,0x254)+_0x15c022(0x325,0x362,0x354,0x469)+_0x15c022(0x11c,0x127,0x97,0x1b1)+'w\x20new\x20Erro'+_0x22ed95(0x3a4,0x43d,0x2a8,0x407)+_0x22ed95(0x213,0x12d,0x2cc,0x1d4)+'d\x20for\x20RLS\x20'+_0x15c022(0x2fb,0x35c,0x2e5,0x2c3)+_0x15c022(0x1c1,0x2cd,0x21f,0x2fb)+'\x20\x20await\x20th'+_0x22ed95(0x383,0x2ec,0x2f9,0x305)+_0x15c022(0x12e,0x1d9,0x210,0x199)+_0x15c022(0x106,-0x53,0xe2,0x21a)+_0x15c022(0xf1,0xa1,0x240,0x1a3)+'current_us'+_0x15c022(0x14b,0xcf,0x19f,0x42)+_0x22ed95(0x3c0,0x45d,0x32f,0x4e9)+_0x22ed95(0x364,0x419,0x239,0x475)+':uuid,\x0a\x20\x20\x20'+'\x20\x20\x20\x20\x20${ten'+_0x15c022(0x29f,0x1aa,0x150,0x210)+_0x15c022(0x270,0x269,0x2a5,0x320)+_0x15c022(0x1c6,0x19b,0xb2,0x266)+_0x22ed95(0x2f7,0x3f0,0x363,0x200)+'text[],\x0a\x20\x20'+_0x22ed95(0x3a0,0x4ba,0x4b9,0x445)+_0x22ed95(0x2fe,0x2e1,0x28b,0x1d9)+_0x22ed95(0x321,0x3e9,0x310,0x346)+_0x22ed95(0x279,0x13a,0x1d7,0x281)+_0x15c022(0x263,0x16f,0x330,0x33f)+_0x15c022(0x2e9,0x336,0x2e2,0x2b2)+_0x22ed95(0x3fa,0x4bd,0x400,0x40b)+'context\x0a\x20\x20'+'\x20*/\x0a\x20\x20asyn'+'c\x20clearCon'+_0x22ed95(0x1ac,0x280,0x13f,0x270)+_0x15c022(0x24f,0x354,0x132,0x259)+_0x15c022(0x260,0x182,0x197,0x2f9)+_0x15c022(0x321,0x3a2,0x275,0x3e9)+_0x22ed95(0x1cf,0x122,0x178,0x12c)+_0x22ed95(0x24c,0x2c2,0x116,0x15e)+_0x22ed95(0x301,0x268,0x3c1,0x408)+_0x22ed95(0x3bc,0x33c,0x4ad,0x4d4)+'ext()`;\x0a\x20\x20'+_0x15c022(0x10a,0x80,0x1c,0xd6)+_0x22ed95(0x405,0x39f,0x356,0x3e3)+_0x15c022(0x357,0x303,0x422,0x433)+'context\x0a\x20\x20'+_0x22ed95(0x3c8,0x2d1,0x3a6,0x4cd)+_0x15c022(0x25f,0x2b4,0x26a,0x29b)+'xt():\x20Prom'+_0x15c022(0x365,0x345,0x40a,0x222)+_0x15c022(0x327,0x3b8,0x272,0x370)+_0x15c022(0x32a,0x2aa,0x3be,0x267)+_0x22ed95(0x429,0x4f6,0x3f8,0x3bc)+_0x22ed95(0x3ba,0x2ca,0x2e4,0x4f3)+_0x15c022(0x245,0x14f,0x2af,0x1b8)+_0x15c022(0x346,0x369,0x421,0x27d)+_0x22ed95(0x26c,0x2bf,0x2f0,0x3a7)+'user_conte'+_0x22ed95(0x295,0x353,0x36c,0x32d)+(_0x22ed95(0x22d,0x1af,0x1c0,0x26d)+_0x15c022(0x20a,0x1d2,0x2a8,0xf9)+_0x15c022(0x2d2,0x3cb,0x3fd,0x2f7)+_0x15c022(0x14b,0x1ee,0x277,0x266)+_0x15c022(0x100,-0x30,0x109,0x164)+_0x15c022(0x259,0x21c,0x29f,0x375)+'\x20context\x20='+'\x20result[0]'+_0x15c022(0x265,0x37f,0x395,0x221)+_0x15c022(0x27f,0x2ce,0x131,0x133)+_0x22ed95(0x37a,0x3c4,0x440,0x38a)+'\x20\x20return\x20{'+_0x15c022(0x16c,0x16d,0x21,0xf1)+_0x22ed95(0x35e,0x245,0x35d,0x350)+_0x15c022(0x21b,0xea,0x33a,0xf6)+'d\x20||\x20undef'+_0x15c022(0xfe,-0x35,0x200,0x119)+_0x22ed95(0x241,0x20b,0x1b0,0x156)+_0x15c022(0x14f,0x236,0xb2,0x1ac)+'.tenant_id'+_0x15c022(0x31b,0x2c3,0x294,0x44d)+'ned,\x0a\x20\x20\x20\x20\x20'+_0x22ed95(0x2bc,0x3ca,0x3e4,0x175)+_0x15c022(0x316,0x300,0x441,0x31e)+_0x22ed95(0x307,0x3a8,0x29b,0x282)+'(Boolean)\x20'+_0x22ed95(0x421,0x334,0x552,0x330)+_0x15c022(0x22c,0x1c2,0xec,0x271)+_0x22ed95(0x433,0x34d,0x4fb,0x3cb)+_0x15c022(0x250,0x29c,0x1c2,0x125)+'ssions?.fi'+_0x22ed95(0x401,0x2e5,0x3bf,0x4ee)+_0x22ed95(0x35c,0x21a,0x3f2,0x3d9)+'\x20\x20\x20\x20};\x0a\x20\x20}'+'\x0a\x0a\x20\x20/**\x0a\x20\x20'+_0x15c022(0x15f,0x215,0x10d,0x18b)+'\x20a\x20functio'+_0x22ed95(0x34d,0x419,0x322,0x3a9)+_0x15c022(0x17f,0x128,0x25b,0xe2)+'\x20\x20*/\x0a\x20\x20asy'+'nc\x20withCon'+_0x22ed95(0x39b,0x4d0,0x449,0x2fe)+'ntext:\x20RLS'+'Context,\x20f'+_0x22ed95(0x385,0x46e,0x3ce,0x3f5)+_0x15c022(0x1cf,0x30e,0x15f,0x1fa)+':\x20Promise<'+_0x22ed95(0x291,0x282,0x16c,0x36f)+_0x22ed95(0x2b0,0x175,0x375,0x40a)+_0x15c022(0x130,0xf2,0x6d,0xf9)+_0x15c022(0x120,0x15c,0x103,0x66)+_0x22ed95(0x2c7,0x28b,0x270,0x2f9)+'\x0a\x20\x20\x20\x20\x20\x20ret'+_0x22ed95(0x417,0x49f,0x2d8,0x368)+'fn();\x0a\x20\x20\x20\x20'+'}\x20finally\x20'+_0x15c022(0x268,0x191,0x1ed,0x340)+_0x15c022(0x257,0x37a,0x36f,0x23b)+'learContex'+_0x15c022(0x238,0x2a4,0x23e,0x109)+_0x22ed95(0x296,0x2a5,0x176,0x20c)+_0x15c022(0x2e8,0x436,0x209,0x38c)+_0x22ed95(0x408,0x45c,0x4e2,0x38c)+_0x22ed95(0x3fc,0x38e,0x460,0x505)+'\x20automatic'+_0x15c022(0x229,0x34f,0x124,0x1fd)+_0x22ed95(0x2d2,0x2ba,0x1ff,0x3af)+'*/\x0a\x20\x20creat'+'eMiddlewar'+_0x22ed95(0x41e,0x514,0x3ed,0x56b)+'return\x20asy'+_0x15c022(0x28e,0x1f4,0x3aa,0x3d5)+_0x22ed95(0x2f2,0x1a3,0x19b,0x37d)+_0x22ed95(0x22c,0x26b,0x27f,0x332)+_0x15c022(0x16b,0x3d,0xda,0x265)+'/\x20Extract\x20'+_0x22ed95(0x1aa,0xa0,0x23c,0x26d)+_0x22ed95(0x1a1,0x79,0x2bf,0x1f6)+'or\x20request'+_0x22ed95(0x290,0x2f0,0x317,0x33a)+_0x22ed95(0x409,0x3cc,0x4f3,0x350)+_0x15c022(0x1e2,0xac,0x111,0x116)+'tractConte'+_0x15c022(0x35c,0x3e6,0x4b1,0x3ae)+_0x22ed95(0x339,0x3a4,0x256,0x269)+');\x0a\x0a\x20\x20\x20\x20\x20\x20'+'if\x20(contex'+_0x15c022(0x1f4,0x2aa,0xdc,0xf1)+_0x15c022(0xc9,0x161,-0x8f,0x11e)+_0x22ed95(0x368,0x2c8,0x355,0x23d)+'.setContex'+'t(context)'+_0x15c022(0x360,0x444,0x322,0x391)+_0x15c022(0x28a,0x1cb,0x2ab,0x285)+_0x22ed95(0x3f7,0x2f5,0x4b7,0x40c)+'\x20return\x20aw'+_0x15c022(0x27b,0x183,0x29d,0x226)+_0x22ed95(0x23b,0x148,0x2b3,0x13f)+_0x15c022(0x207,0x186,0x191,0xf3)+_0x22ed95(0x370,0x225,0x386,0x2f0))+('\x20\x20\x20\x20if\x20(co'+'ntext.user'+'Id)\x20{\x0a\x20\x20\x20\x20'+_0x22ed95(0x317,0x2c0,0x229,0x455)+_0x22ed95(0x2a6,0x399,0x3c7,0x31e)+_0x15c022(0x2e1,0x237,0x3cc,0x385)+_0x22ed95(0x2ce,0x30c,0x34c,0x256)+_0x15c022(0xfc,0x141,0xd6,0x18b)+_0x15c022(0x2c3,0x391,0x20f,0x1da)+_0x15c022(0x10a,0x139,0xb1,0x13b)+_0x15c022(0x311,0x3c4,0x354,0x3f6)+'t\x20RLS\x20cont'+_0x22ed95(0x1b8,0x18c,0x22f,0x291)+_0x22ed95(0x281,0x240,0x3bd,0x2d3)+_0x22ed95(0x3ec,0x3c8,0x41c,0x42c)+_0x22ed95(0x43a,0x540,0x54e,0x3fe)+_0x22ed95(0x34e,0x21c,0x47f,0x42b)+'hod\x20to\x20cus'+'tomize\x20con'+_0x22ed95(0x36e,0x233,0x3a0,0x34e)+_0x22ed95(0x1d7,0x2b6,0x279,0x1f9)+_0x15c022(0x1f3,0x1a2,0x2a1,0x185)+'ted\x20extrac'+'tContextFr'+'omRequest('+_0x22ed95(0x3b1,0x4cd,0x261,0x30a)+'y):\x20RLSCon'+_0x15c022(0x319,0x398,0x39c,0x44d)+_0x15c022(0x36a,0x2c6,0x456,0x2af)+_0x15c022(0x35a,0x235,0x2e2,0x3a8)+_0x15c022(0x1e7,0x161,0x262,0x31e)+'ms.args.co'+_0x22ed95(0x30f,0x217,0x360,0x261)+'equest\x20hea'+'ders\x0a\x20\x20\x20\x20r'+'eturn\x20{\x0a\x20\x20'+'\x20\x20\x20\x20userId'+_0x22ed95(0x34f,0x201,0x379,0x3cd)+_0x15c022(0xfd,0x1ba,0x66,0x197)+_0x22ed95(0x1fe,0x2b5,0x19d,0x184)+_0x15c022(0x1dc,0x10d,0xcb,0x24c)+_0x22ed95(0x1d3,0x29c,0x23e,0x182)+_0x15c022(0x10f,0x1d5,0xd3,0x238)+_0x22ed95(0x24f,0x341,0x3a4,0x17f)+_0x22ed95(0x30a,0x23f,0x388,0x435)+'\x20\x20\x20\x20\x20\x20role'+'s:\x20params.'+_0x15c022(0x2d6,0x23a,0x33d,0x424)+'ext?.roles'+_0x15c022(0x359,0x249,0x48e,0x479)+_0x15c022(0x231,0x27a,0x2fc,0x212)+'\x20params.ar'+_0x15c022(0x15c,0x259,0x16a,0x131)+_0x22ed95(0x418,0x3a3,0x45e,0x341)+'ions\x0a\x20\x20\x20\x20}'+_0x22ed95(0x336,0x310,0x20f,0x313)+_0x22ed95(0x2ab,0x2c4,0x356,0x1cb)+_0x22ed95(0x351,0x3be,0x30b,0x393)+_0x22ed95(0x40b,0x4c3,0x39e,0x451)+_0x22ed95(0x1c1,0x1b8,0x21c,0x20a)+'\x20helper\x0a\x20*'+'/\x0aexport\x20f'+_0x22ed95(0x2d5,0x408,0x2a7,0x32a)+_0x22ed95(0x324,0x1e4,0x43f,0x450)+_0x22ed95(0x20f,0x264,0x34c,0xce)+':\x20PrismaCl'+_0x22ed95(0x332,0x3df,0x32b,0x476)+_0x15c022(0x315,0x3a8,0x318,0x3fb)+'lper\x20{\x0a\x20\x20r'+_0x15c022(0x2ce,0x3b1,0x407,0x1fd)+_0x15c022(0x280,0x149,0x19e,0x26c)+_0x22ed95(0x1ed,0x252,0x1d9,0x31a)+_0x15c022(0x28c,0x378,0x2a5,0x3e2)+_0x22ed95(0x288,0x1e4,0x2ba,0x3d4)+_0x22ed95(0x287,0x187,0x1f4,0x203)+_0x15c022(0x2c5,0x1dc,0x2e9,0x3c0)+'uilder\x0a\x20*/'+'\x0aexport\x20cl'+_0x22ed95(0x247,0x1cd,0x325,0x111)+_0x15c022(0x1f9,0x336,0x203,0x287)+_0x22ed95(0x30c,0x407,0x232,0x3cd)+_0x22ed95(0x375,0x2c3,0x27e,0x458)+_0x22ed95(0x404,0x35a,0x316,0x34e)+_0x22ed95(0x2fa,0x262,0x225,0x36f)+_0x15c022(0x167,0x1f8,0x137,0x1c)+_0x22ed95(0x18f,0x1de,0xce,0x2b5)+'ring):\x20thi'+_0x22ed95(0x3b6,0x46f,0x3b4,0x4ac)+_0x15c022(0x276,0x21c,0x3a2,0x3bd)+_0x22ed95(0x33e,0x46d,0x283,0x3d1)+_0x22ed95(0x289,0x1e1,0x3ca,0x16f)+_0x22ed95(0x274,0x213,0x2e6,0x344)+_0x22ed95(0x1a3,0x1fe,0x1f6,0x295)+_0x22ed95(0x241,0x1ec,0x224,0x36e)+_0x15c022(0x279,0x27f,0x158,0x1d7)+_0x15c022(0x109,0x194,0x14d,0x82)+_0x15c022(0x364,0x22a,0x3e7,0x469)+_0x15c022(0x119,0x14,0x256,-0x13)+_0x15c022(0x21a,0x2df,0x1ee,0xdd)+_0x22ed95(0x3a6,0x398,0x4fe,0x328))+(_0x22ed95(0x327,0x3d7,0x286,0x333)+'eturn\x20this'+_0x15c022(0x1ea,0x291,0x1a9,0x140)+_0x15c022(0x216,0x292,0x12b,0x2a6)+'les:\x20strin'+_0x22ed95(0x2ac,0x194,0x26b,0x3dc)+_0x15c022(0x210,0x1f1,0x2e7,0x1d7)+_0x15c022(0x1cc,0x1a7,0x1e4,0x262)+_0x22ed95(0x39c,0x2d1,0x2c1,0x3f0)+_0x22ed95(0x34a,0x441,0x480,0x3c8)+_0x22ed95(0x214,0x1e6,0x20b,0x22e)+_0x22ed95(0x2cf,0x323,0x2fd,0x25c)+_0x15c022(0x179,0x19e,0x191,0xa1)+'(...permis'+'sions:\x20str'+'ing[]):\x20th'+'is\x20{\x0a\x20\x20\x20\x20t'+_0x15c022(0x16e,0x27,0x10e,0x295)+_0x15c022(0x1be,0x16a,0xf4,0x15f)+_0x22ed95(0x3a3,0x24e,0x3c2,0x33e)+'issions;\x0a\x20'+_0x22ed95(0x1e9,0x301,0xcc,0x29f)+_0x22ed95(0x43c,0x2ef,0x439,0x3a4)+_0x22ed95(0x19c,0x222,0x216,0x7e)+':\x20RLSConte'+_0x15c022(0x108,0x25e,0xda,0x24a)+_0x22ed95(0x388,0x420,0x3fb,0x3be)+'.this.cont'+_0x15c022(0x305,0x24c,0x1ed,0x298)+'\x0a}\x0a\x0a/**\x0a\x20*'+_0x22ed95(0x37b,0x3b5,0x2a0,0x395)+_0x22ed95(0x38b,0x3a8,0x33c,0x2f9)+_0x15c022(0x2b2,0x239,0x287,0x16c)+_0x22ed95(0x1f4,0x224,0x1e1,0x2cf)+_0x22ed95(0x203,0x327,0x296,0x2f4)+'ion\x20rlsCon'+_0x15c022(0xff,0x1d5,0x126,0x51)+_0x15c022(0x10e,0x25f,0x17b,0x29)+_0x15c022(0x15e,0x76,0x19,0x126)+_0x15c022(0x21f,0xc5,0x2d9,0x1cf)+_0x22ed95(0x282,0x2a7,0x250,0x296)+'tBuilder()'+_0x15c022(0x1a5,0x2c3,0x19e,0x267)));}[pzg_0x129c88(0xab,-0xd,-0xeb,-0x6a)+pzg_0x129c88(0x72,0x7e,0x1ce,-0x8e)+pzg_0x129c88(0xdc,0x97,-0x65,0x1ba)](_0x25cb46){function _0x3e7af9(_0x511609,_0x14008f,_0x118ad3,_0x5150ba){return pzg_0x129c88(_0x118ad3,_0x5150ba-0x99,_0x118ad3-0x1ed,_0x5150ba-0x1c2);}const _0x15a48f=(-0x1*-0x1ce1+0x71+-0x1d52,prismaImport_1['getPrismaI'+_0x3e7af9(0x26d,0xcf,-0x38,0x121)+'fier'])(_0x25cb46);function _0x760249(_0x6f7e7c,_0x5d842c,_0x2b258c,_0x590bef){return pzg_0x57d874(_0x2b258c,_0x5d842c-0x5fd,_0x2b258c-0x135,_0x590bef-0x198);}return _0x3e7af9(0x77,0x124,-0x81,0x0)+_0x760249(0x3a0,0x43b,0x39f,0x4b6)+_0x3e7af9(0x3a,0x29d,0x184,0x18e)+_0x760249(0x4aa,0x4a3,0x3cb,0x563)+_0x3e7af9(0x24,0x197,-0xb5,0x7e)+_0x3e7af9(-0x2f,-0x96,-0x35,0xa8)+_0x3e7af9(0x1c7,0x2c9,0x2da,0x18f)+_0x3e7af9(0xae,-0x46,0xa,0xd1)+_0x760249(0x510,0x4e1,0x562,0x501)+_0x3e7af9(0x29c,0x18e,0x9c,0x1da)+'\x20generated'+_0x3e7af9(0x2e5,0x1ee,0x8a,0x1bb)+_0x3e7af9(-0x8a,-0xd,0xa9,0x6)+_0x760249(0x4c0,0x5cc,0x5c7,0x679)+_0x760249(0x3e2,0x499,0x347,0x4d5)+_0x760249(0x4b8,0x56f,0x571,0x4cc)+_0x3e7af9(-0xa7,-0x67,-0x9a,0x15)+_0x3e7af9(0x181,-0xc8,-0x9,0x6c)+'level\x20acce'+_0x760249(0x43e,0x451,0x35a,0x40b)+'\x20by\x20restri'+_0x760249(0x2e3,0x3fe,0x388,0x3a7)+_0x3e7af9(0x148,0x2e2,0x193,0x223)+'rs\x20can\x20acc'+'ess\x20based\x20'+_0x760249(0x3ef,0x46b,0x51b,0x479)+_0x3e7af9(0x111,-0x5c,0x1f,0x97)+_0x3e7af9(0x6c,-0xe4,0x175,0x28)+_0x760249(0x4c0,0x4fe,0x41e,0x50b)+_0x760249(0x77f,0x665,0x6f5,0x667)+_0x760249(0x684,0x655,0x515,0x55e)+'ipt\x20contai'+_0x3e7af9(0xbe,0x152,0x95,0x196)+'LS\x20policie'+_0x760249(0x6b3,0x5d4,0x67a,0x4c2)+_0x3e7af9(-0x70,0xca,0x115,0xa2)+_0x760249(0x6c3,0x5e2,0x4cb,0x55e)+_0x760249(0x5e4,0x4e5,0x3fc,0x411)+_0x3e7af9(0x190,-0x46,0xdd,0xe4)+'a-compatib'+_0x760249(0x65b,0x680,0x616,0x54b)+_0x760249(0x497,0x5c5,0x5f3,0x498)+'r\x20RLS\x20setu'+'p.\x0a\x0a###\x20`r'+'ls-helper.'+_0x3e7af9(0x157,0x1b7,0x1a6,0x238)+_0x3e7af9(-0x93,-0xb2,0x20,0xa3)+'r\x20for\x20mana'+'ging\x20RLS\x20c'+_0x3e7af9(0x13d,0x13d,0x24d,0x10b)+'#\x20Setup\x0a\x0a#'+_0x760249(0x688,0x634,0x6b8,0x5ce)+'y\x20RLS\x20Poli'+'cies\x0a```ba'+_0x3e7af9(-0x39,0x184,0x33,0x33)+'\x20psql\x0apsql'+_0x760249(0x439,0x4ad,0x477,0x600)+_0x760249(0x3cc,0x45d,0x319,0x444)+'\x20policies.'+_0x3e7af9(0x82,-0xa0,0x1ea,0xae)+_0x3e7af9(0x134,0x119,0x208,0x23f)+_0x3e7af9(0x154,0x98,0x48,0x11d)+_0x760249(0x75a,0x603,0x4df,0x6b9)+'grate\x20reso'+'lve\x20--appl'+_0x760249(0x62f,0x61a,0x4ec,0x66e)+'olicies\x22\x0a`'+'``\x0a\x0a###\x202.'+_0x760249(0x4fd,0x442,0x4da,0x576)+'\x20Prisma\x20Cl'+_0x3e7af9(0x18d,0x34,-0x6c,0x77)+_0x760249(0x301,0x405,0x36c,0x52e)+'mport\x20{\x20Pr'+_0x760249(0x4bc,0x4d3,0x569,0x4bd)+'\x20}\x20from\x20\x27'+_0x15a48f+(_0x760249(0x50e,0x523,0x599,0x3d1)+_0x760249(0x719,0x66d,0x711,0x790)+'SHelper,\x20r'+'lsContext\x20'+_0x760249(0x4aa,0x425,0x438,0x4e4)+_0x3e7af9(-0x10,0x95,-0xa1,0x14)+'\x27;\x0a\x0aconst\x20'+_0x760249(0x5d5,0x687,0x552,0x5a4)+_0x3e7af9(0xb4,0x19b,0x17e,0x1ac)+_0x760249(0x57a,0x5c9,0x584,0x62e)+_0x3e7af9(0x181,0x1fb,0x2a8,0x184)+_0x3e7af9(0x221,0x43,0x109,0x188)+_0x3e7af9(0x27,0x83,0x141,0xb3)+_0x3e7af9(-0x66,0x34,-0x5a,0x36)+_0x3e7af9(0x2d2,0x241,0x34b,0x258)+_0x760249(0x4f9,0x42d,0x510,0x427)+_0x3e7af9(0x2f,0x1b5,0x25e,0x136)+_0x760249(0x5ea,0x62e,0x53b,0x5d0)+_0x3e7af9(-0xbc,-0x104,-0x88,0x55)+'etContext('+_0x760249(0x2f5,0x3fc,0x2b5,0x38f)+_0x3e7af9(0x1e6,0xe7,0x18b,0xcd)+'.userId(\x27u'+_0x3e7af9(0x4,-0xb2,-0x2c,0xf)+'\x20\x20\x20\x20.tenan'+_0x3e7af9(0x30d,0x34e,0x14c,0x274)+_0x760249(0x547,0x62f,0x54d,0x5d0)+'\x20\x20.roles(\x27'+_0x760249(0x54d,0x44c,0x42c,0x46c)+_0x760249(0x661,0x559,0x43a,0x52e)+_0x3e7af9(-0x56,0x19d,0x129,0xbb)+_0x760249(0x73a,0x621,0x6b4,0x5a2)+_0x760249(0x36a,0x474,0x470,0x45d)+_0x760249(0x3c8,0x407,0x3db,0x54b)+_0x760249(0x4a7,0x50d,0x645,0x5ac)+_0x3e7af9(0x13c,0x138,0x38c,0x240)+_0x3e7af9(-0xaf,0x8a,0x9e,0x72)+_0x760249(0x51b,0x4e9,0x438,0x63b)+_0x760249(0x594,0x63f,0x724,0x718)+_0x760249(0x6d9,0x5d9,0x5d4,0x527)+';\x20//\x20Only\x20'+_0x3e7af9(-0x20,0x15e,0x80,0x54)+_0x3e7af9(0x314,0x21a,0x183,0x255)+_0x3e7af9(0x227,0x30a,0x1c9,0x228)+_0x760249(0x712,0x650,0x5e5,0x5e6)+'Annotation'+_0x760249(0x71f,0x5eb,0x64d,0x5eb)+_0x3e7af9(0x10b,0x55,0x212,0x152)+_0x3e7af9(0x2a4,0x38a,0x313,0x250)+'ns\x20in\x20your'+_0x3e7af9(0x148,0xd2,0x2c1,0x19d)+_0x760249(0x494,0x4c4,0x4f5,0x533)+_0x3e7af9(0x279,0x2b0,0x28e,0x227)+'el\x20Post\x20{\x0a'+_0x3e7af9(0x1fd,0x28c,0xfe,0x159)+_0x3e7af9(0x304,0x270,0x162,0x256)+_0x3e7af9(0xa8,0xea,0x15b,0x178)+_0x760249(0x3f0,0x443,0x54e,0x52a)+_0x760249(0x7b4,0x674,0x6f4,0x650)+_0x3e7af9(0x26f,0x31a,0x141,0x207)+_0x760249(0x633,0x65e,0x5bc,0x609)+_0x760249(0x490,0x50b,0x4d6,0x5b7)+_0x760249(0x3ef,0x514,0x4e8,0x5ff)+'ng\x0a\x20\x20tenan'+_0x3e7af9(0x197,0x121,-0x57,0x57)+_0x3e7af9(0x330,0x22d,0x17f,0x22c)+_0x3e7af9(0x28,-0x3f,0x19f,0xea)+_0x3e7af9(-0x12,0xbf,0x11f,0x8a)+_0x760249(0x526,0x5d3,0x725,0x5e0)+_0x760249(0x645,0x542,0x4c9,0x53f)+_0x3e7af9(0x1b3,0x111,0xd,0xd3)+_0x3e7af9(0xe5,0x1cc,0x282,0x15c)+_0x760249(0x351,0x48b,0x53c,0x48d)+'(where:\x20\x22u'+_0x760249(0x539,0x5f6,0x740,0x57a)+_0x3e7af9(0x3c2,0x3d0,0x394,0x282)+_0x760249(0x55f,0x69e,0x60c,0x5b9)+_0x3e7af9(0x47,0x156,0xd8,0xcb)+_0x3e7af9(0x6a,0xd3,0x275,0x149)+_0x760249(0x697,0x5f6,0x4d0,0x49d)+_0x760249(0x756,0x686,0x6d2,0x719)+'\x0a\x20\x20///\x20@po'+'licy.creat'+'e(check:\x20\x22'+'tenantId\x20='+_0x760249(0x42b,0x4c0,0x505,0x3c3)+_0x3e7af9(0x126,-0x37,0x5f,0xd)+_0x3e7af9(0x6f,0xeb,0x140,0x19b)+_0x760249(0x6ac,0x59d,0x44a,0x6c0)+_0x760249(0x420,0x4d4,0x5ed,0x3e9)+_0x3e7af9(0x135,0x120,0x31b,0x215)+_0x3e7af9(0xd9,0x1a3,0x10b,0x80)+_0x760249(0x386,0x486,0x49e,0x349)+_0x3e7af9(0x17d,0x14d,0x261,0x1d3)+_0x3e7af9(0x83,-0x2,0x10b,0xaf)+_0x3e7af9(0x2ca,0x132,0x32a,0x27b)+_0x760249(0x57c,0x430,0x52a,0x578)+'stgreSQL\x20R'+_0x3e7af9(0x21b,0x1cc,0x236,0x249)+_0x760249(0x3bc,0x44d,0x314,0x4f1)+(_0x760249(0x61f,0x635,0x77f,0x588)+'postgresql'+'.org/docs/'+_0x3e7af9(0x1b4,0x31d,0x159,0x275)+_0x760249(0x469,0x489,0x557,0x36e)+'ity.html)\x0a'+_0x3e7af9(0x17e,0x90,0x8d,0x11b)+_0x760249(0x58e,0x565,0x51d,0x6b7)+_0x760249(0x5b4,0x609,0x72b,0x6a8)+_0x760249(0x4ab,0x52b,0x554,0x406)+_0x3e7af9(0x1b0,0x29f,0x3ca,0x285)+_0x3e7af9(0x7,0x162,0x139,0xdc)+_0x760249(0x445,0x50a,0x516,0x57d)+_0x3e7af9(0x372,0x336,0x1a7,0x273)+_0x3e7af9(0x2eb,0x152,0x2a5,0x288)+_0x760249(0x5ae,0x55b,0x543,0x4e8)+')\x0a'));}}exports[pzg_0x129c88(0x252,0x119,0x118,0x19c)+pzg_0x57d874(-0x1e2,-0x1d5,-0x1b4,-0xb3)]=PostgresRLSGenerator;function pzg_0x5d96(){const _0x235d72=['D25LCNnOAxa','zxH0lNrLBMfUDa','Ehq/lNvZzxjFAq','cIaGicbPzIaOiq','tMfTzq','zgL0Aw9Uvg9tuq','CMv0DxjUig5LDW','igzVBgXVD2LUzW','CNqGEYbqCMLZBq','BMfTzq','C2vYjYKkicaGia','zgvZy3jPChrPBW','Bc1Zzwn1CML0Eq','oIbHBNKSig5LEa','icbPzcaGicaGia','j2fWCc5JDxjYzq','ignVBNrLEhqGCW','BGOGic8VlYbaCa','jhTYB2XLC306oG','icaGCgvYBwLZCW','CM9SzsbPBIbB','zxH0id0GE307cG','uKXtieD1AwrLxq','y29UDgv4DdOGuG','CM1PC3nPB25ZoG','CM1PC3nPB25ZFq','B3v0Chv0ugf0Aa','C3fSifnfq1vssq','tevdvcbJBgvHCG','x2nVBNrLEhqOcG','D2HLCMu','DcGPoWOGicaGFq','DxjPDhKGkfjmuW','BNrFC2v0DgLUzW','zxm/lMzPBhrLCG','zxH0CMfJDe1Vza','ihrHyMXL','DgvUyw50swqScG','u21wvvm','CIb7cIaGChjPDG','zhv4EMe','DhjPBMDFDg9Fyq','BNrLEhqGB3iGCG','u0HLBhbLCG','AxnTys4KCxvLCG','zcbazgvMyxvSDa','DxvPzcWkicb0zq','zgvSzxrL','CM1PC3nPB25Zla','B2XLCYCSihrYDq','icaGicaGyxDHAq','Dg9mB3DLCKnHCW','su5trvju','AgLWic0GDxnLCG','B21PC2u8DM9Pza','zxH0pY5WzxjTAq','svrzierfrKLorq','B25ZDcbYBhmGpq','Df90zw5HBNrFAq','DgvK','oJP0zxH0w10kia','ignYzwf0zvjmuW','ywL0ihrOAxmUyW','zwf0zvjmu0HLBa','cIaGicbJB25ZDa','C2LVBGOGicaQlW','DeLKoWOGicaGCG','zwWGu2vJDxjPDa','zwn0B3j5ignVBG','DaPduKvbveuGtW','yYbNzxrdB250zq','pIb7cIaGicbHDW','rNvUy3rPB24GDa','EsbqwKCGuhjVcG','iga7cIaGFqOkia','BMLUzYbHBgWGuG','pY5NzxrFy3vYCG','AwvUDcK6ifbVCW','CMvSyxrPB24OzG','EWOGicaGicbHDW','C2vYifvZzxiGqa','oWOGih0kFqOklW','ifbYAxnTysbZyW','y29UDgv4DcGPia','zxn0khbHCMfTCW','AwnPzxmGyNKGua','zhLzs2S','DwXSFtO6DxvPza','t3rrBvC','lNvZzxjjzca9ia','B25MAwCOj2fWCa','mJaZodb1Afr5DKG',