wowok_agent 0.1.20 → 0.1.22

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.
Files changed (225) hide show
  1. package/dist/112.21379614d91268ce330f.js +1 -0
  2. package/dist/153.0e09a3e7bd0bed0427de.js +2 -0
  3. package/dist/153.0e09a3e7bd0bed0427de.js.LICENSE.txt +1 -0
  4. package/dist/253.3798aaaaba9a178ce008.js +1 -0
  5. package/dist/30.cf406c8f0deaabc3315a.js +1 -0
  6. package/dist/412.fb7e9a9f8a8037989f5d.js +1 -0
  7. package/dist/485.ce7b86546902fc8dde5a.js +1 -0
  8. package/dist/495.ac467075e20a04043d35.js +1 -0
  9. package/dist/620.735b809cf2cbc76e516f.js +1 -0
  10. package/dist/634.4b6f29aede6b0a58d6b2.js +1 -0
  11. package/dist/652.c5f07841ad67512e57b7.js +1 -0
  12. package/dist/658.0b445c65e3af4e2a7e7e.js +1 -0
  13. package/dist/701.bdc9c87df0901c7d7c8a.js +1 -0
  14. package/dist/706.698d6901ae23aa310bdb.js +1 -0
  15. package/dist/734.6489b6fe957095e872d4.js +1 -0
  16. package/dist/867.97e11ee1679454f4cc8c.js +1 -0
  17. package/dist/873.dbe4cf7f0c11f2831a06.js +1 -0
  18. package/dist/875.c6fe5a1ae1ff8d1079b5.js +1 -0
  19. package/dist/876.833155deecd4b6e49ce2.js +1 -0
  20. package/dist/947.cd4e802ab4a7bac067db.js +1 -0
  21. package/dist/main-255474c8.32dadc23a1ff22a202b6.js +1 -0
  22. package/dist/main-31743c5a.c9d42c3f3b9b258ea77d.js +1 -0
  23. package/dist/main-43dd7041.679c8832d5383c688e20.js +1 -0
  24. package/dist/main-84781932.89c7bfccd94d9ff8e89d.js +1 -0
  25. package/dist/node_modules/wowok/src/arbitration.d.ts.map +1 -0
  26. package/dist/node_modules/wowok/src/demand.d.ts.map +1 -0
  27. package/dist/node_modules/wowok/src/entity.d.ts.map +1 -0
  28. package/dist/node_modules/wowok/src/exception.d.ts.map +1 -0
  29. package/dist/node_modules/wowok/src/guard.d.ts.map +1 -0
  30. package/dist/node_modules/wowok/src/index.d.ts.map +1 -0
  31. package/dist/node_modules/wowok/src/machine.d.ts.map +1 -0
  32. package/dist/node_modules/wowok/src/passport.d.ts.map +1 -0
  33. package/dist/node_modules/wowok/src/payment.d.ts.map +1 -0
  34. package/dist/{wowok → node_modules/wowok}/src/permission.d.ts +1 -1
  35. package/dist/node_modules/wowok/src/permission.d.ts.map +1 -0
  36. package/dist/node_modules/wowok/src/progress.d.ts.map +1 -0
  37. package/dist/node_modules/wowok/src/protocol.d.ts.map +1 -0
  38. package/dist/node_modules/wowok/src/repository.d.ts.map +1 -0
  39. package/dist/node_modules/wowok/src/resource.d.ts.map +1 -0
  40. package/dist/node_modules/wowok/src/service.d.ts.map +1 -0
  41. package/dist/node_modules/wowok/src/treasury.d.ts.map +1 -0
  42. package/dist/node_modules/wowok/src/utils.d.ts.map +1 -0
  43. package/dist/node_modules/wowok/src/wowok.d.ts.map +1 -0
  44. package/dist/src/call/base.js +2 -2
  45. package/dist/src/call/machine.js +1 -1
  46. package/package.json +3 -2
  47. package/src/call/base.ts +2 -2
  48. package/src/call/machine.ts +1 -1
  49. package/webpack.config.cjs +23 -6
  50. package/dist/124.index.js +0 -1
  51. package/dist/account.d.ts +0 -38
  52. package/dist/account.d.ts.map +0 -1
  53. package/dist/account.js +0 -273
  54. package/dist/agent/empty.d.ts +0 -1
  55. package/dist/agent/empty.d.ts.map +0 -1
  56. package/dist/agent/src/account.d.ts +0 -38
  57. package/dist/agent/src/account.d.ts.map +0 -1
  58. package/dist/agent/src/cache.d.ts +0 -46
  59. package/dist/agent/src/cache.d.ts.map +0 -1
  60. package/dist/agent/src/call/arbitration.d.ts +0 -63
  61. package/dist/agent/src/call/arbitration.d.ts.map +0 -1
  62. package/dist/agent/src/call/base.d.ts +0 -34
  63. package/dist/agent/src/call/base.d.ts.map +0 -1
  64. package/dist/agent/src/call/demand.d.ts +0 -55
  65. package/dist/agent/src/call/demand.d.ts.map +0 -1
  66. package/dist/agent/src/call/guard.d.ts +0 -44
  67. package/dist/agent/src/call/guard.d.ts.map +0 -1
  68. package/dist/agent/src/call/machine.d.ts +0 -109
  69. package/dist/agent/src/call/machine.d.ts.map +0 -1
  70. package/dist/agent/src/call/object_permission.d.ts +0 -13
  71. package/dist/agent/src/call/object_permission.d.ts.map +0 -1
  72. package/dist/agent/src/call/permission.d.ts +0 -47
  73. package/dist/agent/src/call/permission.d.ts.map +0 -1
  74. package/dist/agent/src/call/personal.d.ts +0 -43
  75. package/dist/agent/src/call/personal.d.ts.map +0 -1
  76. package/dist/agent/src/call/repository.d.ts +0 -53
  77. package/dist/agent/src/call/repository.d.ts.map +0 -1
  78. package/dist/agent/src/call/service.d.ts +0 -134
  79. package/dist/agent/src/call/service.d.ts.map +0 -1
  80. package/dist/agent/src/call/treasury.d.ts +0 -53
  81. package/dist/agent/src/call/treasury.d.ts.map +0 -1
  82. package/dist/agent/src/call.d.ts +0 -24
  83. package/dist/agent/src/call.d.ts.map +0 -1
  84. package/dist/agent/src/events.d.ts +0 -65
  85. package/dist/agent/src/events.d.ts.map +0 -1
  86. package/dist/agent/src/index.d.ts +0 -19
  87. package/dist/agent/src/index.d.ts.map +0 -1
  88. package/dist/agent/src/objects.d.ts +0 -308
  89. package/dist/agent/src/objects.d.ts.map +0 -1
  90. package/dist/agent/src/permission.d.ts +0 -12
  91. package/dist/agent/src/permission.d.ts.map +0 -1
  92. package/dist/agent/src/private_info.d.ts +0 -26
  93. package/dist/agent/src/private_info.d.ts.map +0 -1
  94. package/dist/cache.d.ts +0 -46
  95. package/dist/cache.d.ts.map +0 -1
  96. package/dist/cache.js +0 -59
  97. package/dist/call/arbitration.d.ts +0 -63
  98. package/dist/call/arbitration.d.ts.map +0 -1
  99. package/dist/call/arbitration.js +0 -182
  100. package/dist/call/base.d.ts +0 -34
  101. package/dist/call/base.d.ts.map +0 -1
  102. package/dist/call/base.js +0 -131
  103. package/dist/call/demand.d.ts +0 -55
  104. package/dist/call/demand.d.ts.map +0 -1
  105. package/dist/call/demand.js +0 -135
  106. package/dist/call/guard.d.ts +0 -44
  107. package/dist/call/guard.d.ts.map +0 -1
  108. package/dist/call/guard.js +0 -244
  109. package/dist/call/machine.d.ts +0 -109
  110. package/dist/call/machine.d.ts.map +0 -1
  111. package/dist/call/machine.js +0 -210
  112. package/dist/call/object_permission.d.ts +0 -13
  113. package/dist/call/object_permission.d.ts.map +0 -1
  114. package/dist/call/object_permission.js +0 -49
  115. package/dist/call/permission.d.ts +0 -47
  116. package/dist/call/permission.d.ts.map +0 -1
  117. package/dist/call/permission.js +0 -95
  118. package/dist/call/personal.d.ts +0 -43
  119. package/dist/call/personal.d.ts.map +0 -1
  120. package/dist/call/personal.js +0 -60
  121. package/dist/call/repository.d.ts +0 -53
  122. package/dist/call/repository.d.ts.map +0 -1
  123. package/dist/call/repository.js +0 -125
  124. package/dist/call/service.d.ts +0 -134
  125. package/dist/call/service.d.ts.map +0 -1
  126. package/dist/call/service.js +0 -340
  127. package/dist/call/treasury.d.ts +0 -53
  128. package/dist/call/treasury.d.ts.map +0 -1
  129. package/dist/call/treasury.js +0 -161
  130. package/dist/call.d.ts +0 -24
  131. package/dist/call.d.ts.map +0 -1
  132. package/dist/call.js +0 -58
  133. package/dist/events.d.ts +0 -65
  134. package/dist/events.d.ts.map +0 -1
  135. package/dist/events.js +0 -59
  136. package/dist/index.d.ts +0 -19
  137. package/dist/index.d.ts.map +0 -1
  138. package/dist/index.js +0 -1
  139. package/dist/objects.d.ts +0 -308
  140. package/dist/objects.d.ts.map +0 -1
  141. package/dist/objects.js +0 -448
  142. package/dist/permission.d.ts +0 -12
  143. package/dist/permission.d.ts.map +0 -1
  144. package/dist/permission.js +0 -40
  145. package/dist/private_info.d.ts +0 -26
  146. package/dist/private_info.d.ts.map +0 -1
  147. package/dist/private_info.js +0 -243
  148. package/dist/webpack.config.d.ts +0 -2
  149. package/dist/webpack.config.d.ts.map +0 -1
  150. package/dist/webpack.config.js +0 -17
  151. package/dist/wowok/src/arbitration.d.ts.map +0 -1
  152. package/dist/wowok/src/demand.d.ts.map +0 -1
  153. package/dist/wowok/src/entity.d.ts.map +0 -1
  154. package/dist/wowok/src/exception.d.ts.map +0 -1
  155. package/dist/wowok/src/guard.d.ts.map +0 -1
  156. package/dist/wowok/src/index.d.ts.map +0 -1
  157. package/dist/wowok/src/machine.d.ts.map +0 -1
  158. package/dist/wowok/src/passport.d.ts.map +0 -1
  159. package/dist/wowok/src/payment.d.ts.map +0 -1
  160. package/dist/wowok/src/permission.d.ts.map +0 -1
  161. package/dist/wowok/src/progress.d.ts.map +0 -1
  162. package/dist/wowok/src/protocol.d.ts.map +0 -1
  163. package/dist/wowok/src/repository.d.ts.map +0 -1
  164. package/dist/wowok/src/resource.d.ts.map +0 -1
  165. package/dist/wowok/src/service.d.ts.map +0 -1
  166. package/dist/wowok/src/treasury.d.ts.map +0 -1
  167. package/dist/wowok/src/utils.d.ts.map +0 -1
  168. package/dist/wowok/src/wowok.d.ts.map +0 -1
  169. package/dist/wowok_agent/empty.d.ts +0 -1
  170. package/dist/wowok_agent/empty.d.ts.map +0 -1
  171. package/dist/wowok_agent/src/account.d.ts +0 -38
  172. package/dist/wowok_agent/src/account.d.ts.map +0 -1
  173. package/dist/wowok_agent/src/cache.d.ts +0 -46
  174. package/dist/wowok_agent/src/cache.d.ts.map +0 -1
  175. package/dist/wowok_agent/src/call/arbitration.d.ts +0 -70
  176. package/dist/wowok_agent/src/call/arbitration.d.ts.map +0 -1
  177. package/dist/wowok_agent/src/call/base.d.ts +0 -34
  178. package/dist/wowok_agent/src/call/base.d.ts.map +0 -1
  179. package/dist/wowok_agent/src/call/demand.d.ts +0 -55
  180. package/dist/wowok_agent/src/call/demand.d.ts.map +0 -1
  181. package/dist/wowok_agent/src/call/guard.d.ts +0 -42
  182. package/dist/wowok_agent/src/call/guard.d.ts.map +0 -1
  183. package/dist/wowok_agent/src/call/machine.d.ts +0 -109
  184. package/dist/wowok_agent/src/call/machine.d.ts.map +0 -1
  185. package/dist/wowok_agent/src/call/object_permission.d.ts +0 -13
  186. package/dist/wowok_agent/src/call/object_permission.d.ts.map +0 -1
  187. package/dist/wowok_agent/src/call/permission.d.ts +0 -49
  188. package/dist/wowok_agent/src/call/permission.d.ts.map +0 -1
  189. package/dist/wowok_agent/src/call/personal.d.ts +0 -43
  190. package/dist/wowok_agent/src/call/personal.d.ts.map +0 -1
  191. package/dist/wowok_agent/src/call/repository.d.ts +0 -53
  192. package/dist/wowok_agent/src/call/repository.d.ts.map +0 -1
  193. package/dist/wowok_agent/src/call/service.d.ts +0 -134
  194. package/dist/wowok_agent/src/call/service.d.ts.map +0 -1
  195. package/dist/wowok_agent/src/call/treasury.d.ts +0 -53
  196. package/dist/wowok_agent/src/call/treasury.d.ts.map +0 -1
  197. package/dist/wowok_agent/src/call.d.ts +0 -86
  198. package/dist/wowok_agent/src/call.d.ts.map +0 -1
  199. package/dist/wowok_agent/src/events.d.ts +0 -65
  200. package/dist/wowok_agent/src/events.d.ts.map +0 -1
  201. package/dist/wowok_agent/src/index.d.ts +0 -19
  202. package/dist/wowok_agent/src/index.d.ts.map +0 -1
  203. package/dist/wowok_agent/src/objects.d.ts +0 -308
  204. package/dist/wowok_agent/src/objects.d.ts.map +0 -1
  205. package/dist/wowok_agent/src/permission.d.ts +0 -12
  206. package/dist/wowok_agent/src/permission.d.ts.map +0 -1
  207. package/dist/wowok_agent/src/private_info.d.ts +0 -26
  208. package/dist/wowok_agent/src/private_info.d.ts.map +0 -1
  209. /package/dist/{wowok → node_modules/wowok}/src/arbitration.d.ts +0 -0
  210. /package/dist/{wowok → node_modules/wowok}/src/demand.d.ts +0 -0
  211. /package/dist/{wowok → node_modules/wowok}/src/entity.d.ts +0 -0
  212. /package/dist/{wowok → node_modules/wowok}/src/exception.d.ts +0 -0
  213. /package/dist/{wowok → node_modules/wowok}/src/guard.d.ts +0 -0
  214. /package/dist/{wowok → node_modules/wowok}/src/index.d.ts +0 -0
  215. /package/dist/{wowok → node_modules/wowok}/src/machine.d.ts +0 -0
  216. /package/dist/{wowok → node_modules/wowok}/src/passport.d.ts +0 -0
  217. /package/dist/{wowok → node_modules/wowok}/src/payment.d.ts +0 -0
  218. /package/dist/{wowok → node_modules/wowok}/src/progress.d.ts +0 -0
  219. /package/dist/{wowok → node_modules/wowok}/src/protocol.d.ts +0 -0
  220. /package/dist/{wowok → node_modules/wowok}/src/repository.d.ts +0 -0
  221. /package/dist/{wowok → node_modules/wowok}/src/resource.d.ts +0 -0
  222. /package/dist/{wowok → node_modules/wowok}/src/service.d.ts +0 -0
  223. /package/dist/{wowok → node_modules/wowok}/src/treasury.d.ts +0 -0
  224. /package/dist/{wowok → node_modules/wowok}/src/utils.d.ts +0 -0
  225. /package/dist/{wowok → node_modules/wowok}/src/wowok.d.ts +0 -0
@@ -0,0 +1 @@
1
+ "use strict";(this.webpackChunkwowok_agent=this.webpackChunkwowok_agent||[]).push([[112],{2343:(e,r)=>{r.I=void 0;const t="qpzry9x8gf2tvdw0s3jn54khce6mua7l",n={};for(let e=0;e<32;e++){const r=t.charAt(e);n[r]=e}function o(e){const r=e>>25;return(33554431&e)<<5^996825010&-(1&r)^642813549&-(r>>1&1)^513874426&-(r>>2&1)^1027748829&-(r>>3&1)^705979059&-(r>>4&1)}function i(e){let r=1;for(let t=0;t<e.length;++t){const n=e.charCodeAt(t);if(n<33||n>126)return"Invalid prefix ("+e+")";r=o(r)^n>>5}r=o(r);for(let t=0;t<e.length;++t){const n=e.charCodeAt(t);r=o(r)^31&n}return r}function a(e,r,t,n){let o=0,i=0;const a=(1<<t)-1,c=[];for(let n=0;n<e.length;++n)for(o=o<<r|e[n],i+=r;i>=t;)i-=t,c.push(o>>i&a);if(n)i>0&&c.push(o<<t-i&a);else{if(i>=r)return"Excess padding";if(o<<t-i&a)return"Non-zero padding"}return c}function c(e){return a(e,8,5,!0)}function s(e){const r=a(e,5,8,!1);if(Array.isArray(r))return r}function d(e){const r=a(e,5,8,!1);if(Array.isArray(r))return r;throw new Error(r)}function u(e){let r;function a(e,t){if(t=t||90,e.length<8)return e+" too short";if(e.length>t)return"Exceeds length limit";const a=e.toLowerCase(),c=e.toUpperCase();if(e!==a&&e!==c)return"Mixed-case string "+e;const s=(e=a).lastIndexOf("1");if(-1===s)return"No separator character for "+e;if(0===s)return"Missing prefix for "+e;const d=e.slice(0,s),u=e.slice(s+1);if(u.length<6)return"Data too short";let h=i(d);if("string"==typeof h)return h;const l=[];for(let e=0;e<u.length;++e){const r=u.charAt(e),t=n[r];if(void 0===t)return"Unknown character "+r;h=o(h)^t,e+6>=u.length||l.push(t)}return h!==r?"Invalid checksum for "+e:{prefix:d,words:l}}return r="bech32"===e?1:734539939,{decodeUnsafe:function(e,r){const t=a(e,r);if("object"==typeof t)return t},decode:function(e,r){const t=a(e,r);if("object"==typeof t)return t;throw new Error(t)},encode:function(e,n,a){if(a=a||90,e.length+7+n.length>a)throw new TypeError("Exceeds length limit");let c=i(e=e.toLowerCase());if("string"==typeof c)throw new Error(c);let s=e+"1";for(let e=0;e<n.length;++e){const r=n[e];if(r>>5)throw new Error("Non 5-bit word");c=o(c)^r,s+=t.charAt(r)}for(let e=0;e<6;++e)c=o(c);c^=r;for(let e=0;e<6;++e)s+=t.charAt(c>>5*(5-e)&31);return s},toWords:c,fromWordsUnsafe:s,fromWords:d}}r.I=u("bech32"),u("bech32m")},5281:(e,r,t)=>{t.d(r,{b8:()=>i,qg:()=>N});var n,o,i={NAME:"Name",DOCUMENT:"Document",OPERATION_DEFINITION:"OperationDefinition",VARIABLE_DEFINITION:"VariableDefinition",SELECTION_SET:"SelectionSet",FIELD:"Field",ARGUMENT:"Argument",FRAGMENT_SPREAD:"FragmentSpread",INLINE_FRAGMENT:"InlineFragment",FRAGMENT_DEFINITION:"FragmentDefinition",VARIABLE:"Variable",INT:"IntValue",FLOAT:"FloatValue",STRING:"StringValue",BOOLEAN:"BooleanValue",NULL:"NullValue",ENUM:"EnumValue",LIST:"ListValue",OBJECT:"ObjectValue",OBJECT_FIELD:"ObjectField",DIRECTIVE:"Directive",NAMED_TYPE:"NamedType",LIST_TYPE:"ListType",NON_NULL_TYPE:"NonNullType"};class a extends Error{constructor(e,r,t,n,o,i,a){super(e),this.name="GraphQLError",this.message=e,o&&(this.path=o),r&&(this.nodes=Array.isArray(r)?r:[r]),t&&(this.source=t),n&&(this.positions=n),i&&(this.originalError=i);var c=a;if(!c&&i){var s=i.extensions;s&&"object"==typeof s&&(c=s)}this.extensions=c||{}}toJSON(){return{...this,message:this.message}}toString(){return this.message}get[Symbol.toStringTag](){return"GraphQLError"}}function c(e){return new a(`Syntax Error: Unexpected token at ${o} in ${e}`)}function s(e){if(e.lastIndex=o,e.test(n))return n.slice(o,o=e.lastIndex)}var d=/ +(?=[^\s])/y;function u(e){for(var r=e.split("\n"),t="",n=0,o=0,i=r.length-1,a=0;a<r.length;a++)d.lastIndex=0,d.test(r[a])&&(a&&(!n||d.lastIndex<n)&&(n=d.lastIndex),o=o||a,i=a);for(var c=o;c<=i;c++)c!==o&&(t+="\n"),t+=r[c].slice(n).replace(/\\"""/g,'"""');return t}function h(){for(var e=0|n.charCodeAt(o++);9===e||10===e||13===e||32===e||35===e||44===e||65279===e;e=0|n.charCodeAt(o++))if(35===e)for(;10!==(e=n.charCodeAt(o++))&&13!==e;);o--}function l(){for(var e=o,r=0|n.charCodeAt(o++);r>=48&&r<=57||r>=65&&r<=90||95===r||r>=97&&r<=122;r=0|n.charCodeAt(o++));if(e===o-1)throw c("Name");var t=n.slice(e,--o);return h(),t}function f(){return{kind:"Name",value:l()}}var A=/(?:"""|(?:[\s\S]*?[^\\])""")/y,v=/(?:(?:\.\d+)?[eE][+-]?\d+|\.\d+)/y;function p(e){var r;switch(n.charCodeAt(o)){case 91:o++,h();for(var t=[];93!==n.charCodeAt(o);)t.push(p(e));return o++,h(),{kind:"ListValue",values:t};case 123:o++,h();for(var i=[];125!==n.charCodeAt(o);){var a=f();if(58!==n.charCodeAt(o++))throw c("ObjectField");h(),i.push({kind:"ObjectField",name:a,value:p(e)})}return o++,h(),{kind:"ObjectValue",fields:i};case 36:if(e)throw c("Variable");return o++,{kind:"Variable",name:f()};case 34:if(34===n.charCodeAt(o+1)&&34===n.charCodeAt(o+2)){if(o+=3,null==(r=s(A)))throw c("StringValue");return h(),{kind:"StringValue",value:u(r.slice(0,-3)),block:!0}}var d,g=o;o++;var C=!1;for(d=0|n.charCodeAt(o++);92===d&&(o++,C=!0)||10!==d&&13!==d&&34!==d&&d;d=0|n.charCodeAt(o++));if(34!==d)throw c("StringValue");return r=n.slice(g,o),h(),{kind:"StringValue",value:C?JSON.parse(r):r.slice(1,-1),block:!1};case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:for(var w,m=o++;(w=0|n.charCodeAt(o++))>=48&&w<=57;);var y=n.slice(m,--o);if(46===(w=n.charCodeAt(o))||69===w||101===w){if(null==(r=s(v)))throw c("FloatValue");return h(),{kind:"FloatValue",value:y+r}}return h(),{kind:"IntValue",value:y};case 110:if(117===n.charCodeAt(o+1)&&108===n.charCodeAt(o+2)&&108===n.charCodeAt(o+3))return o+=4,h(),{kind:"NullValue"};break;case 116:if(114===n.charCodeAt(o+1)&&117===n.charCodeAt(o+2)&&101===n.charCodeAt(o+3))return o+=4,h(),{kind:"BooleanValue",value:!0};break;case 102:if(97===n.charCodeAt(o+1)&&108===n.charCodeAt(o+2)&&115===n.charCodeAt(o+3)&&101===n.charCodeAt(o+4))return o+=5,h(),{kind:"BooleanValue",value:!1}}return{kind:"EnumValue",value:l()}}function g(e){if(40===n.charCodeAt(o)){var r=[];o++,h();do{var t=f();if(58!==n.charCodeAt(o++))throw c("Argument");h(),r.push({kind:"Argument",name:t,value:p(e)})}while(41!==n.charCodeAt(o));return o++,h(),r}}function C(e){if(64===n.charCodeAt(o)){var r=[];do{o++,r.push({kind:"Directive",name:f(),arguments:g(e)})}while(64===n.charCodeAt(o));return r}}function w(){for(var e=0;91===n.charCodeAt(o);)e++,o++,h();var r={kind:"NamedType",name:f()};do{if(33===n.charCodeAt(o)&&(o++,h(),r={kind:"NonNullType",type:r}),e){if(93!==n.charCodeAt(o++))throw c("NamedType");h(),r={kind:"ListType",type:r}}}while(e--);return r}function m(){if(123!==n.charCodeAt(o++))throw c("SelectionSet");return h(),y()}function y(){var e=[];do{if(46===n.charCodeAt(o)){if(46!==n.charCodeAt(++o)||46!==n.charCodeAt(++o))throw c("SelectionSet");switch(o++,h(),n.charCodeAt(o)){case 64:e.push({kind:"InlineFragment",typeCondition:void 0,directives:C(!1),selectionSet:m()});break;case 111:110===n.charCodeAt(o+1)?(o+=2,h(),e.push({kind:"InlineFragment",typeCondition:{kind:"NamedType",name:f()},directives:C(!1),selectionSet:m()})):e.push({kind:"FragmentSpread",name:f(),directives:C(!1)});break;case 123:o++,h(),e.push({kind:"InlineFragment",typeCondition:void 0,directives:void 0,selectionSet:y()});break;default:e.push({kind:"FragmentSpread",name:f(),directives:C(!1)})}}else{var r=f(),t=void 0;58===n.charCodeAt(o)&&(o++,h(),t=r,r=f());var i=g(!1),a=C(!1),s=void 0;123===n.charCodeAt(o)&&(o++,h(),s=y()),e.push({kind:"Field",alias:t,name:r,arguments:i,directives:a,selectionSet:s})}}while(125!==n.charCodeAt(o));return o++,h(),{kind:"SelectionSet",selections:e}}function k(){if(h(),40===n.charCodeAt(o)){var e=[];o++,h();do{if(36!==n.charCodeAt(o++))throw c("Variable");var r=f();if(58!==n.charCodeAt(o++))throw c("VariableDefinition");h();var t=w(),i=void 0;61===n.charCodeAt(o)&&(o++,h(),i=p(!0)),h(),e.push({kind:"VariableDefinition",variable:{kind:"Variable",name:r},type:t,defaultValue:i,directives:C(!0)})}while(41!==n.charCodeAt(o));return o++,h(),e}}function E(){var e=f();if(111!==n.charCodeAt(o++)||110!==n.charCodeAt(o++))throw c("FragmentDefinition");return h(),{kind:"FragmentDefinition",name:e,typeCondition:{kind:"NamedType",name:f()},directives:C(!1),selectionSet:m()}}function b(){var e=[];do{if(123===n.charCodeAt(o))o++,h(),e.push({kind:"OperationDefinition",operation:"query",name:void 0,variableDefinitions:void 0,directives:void 0,selectionSet:y()});else{var r=l();switch(r){case"fragment":e.push(E());break;case"query":case"mutation":case"subscription":var t,i=void 0;40!==(t=n.charCodeAt(o))&&64!==t&&123!==t&&(i=f()),e.push({kind:"OperationDefinition",operation:r,name:i,variableDefinitions:k(),directives:C(!1),selectionSet:m()});break;default:throw c("Document")}}}while(o<n.length);return e}function N(e,r){return n=e.body?e.body:e,o=0,h(),r&&r.noLocation?{kind:"Document",definitions:b()}:{kind:"Document",definitions:b(),loc:{start:0,end:n.length,startToken:void 0,endToken:void 0,source:{body:n,name:"graphql.web",locationOffset:{line:1,column:1}}}}}},5364:e=>{e.exports=function(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),t=0;t<r.length;t++)r[t]=255;for(var n=0;n<e.length;n++){var o=e.charAt(n),i=o.charCodeAt(0);if(255!==r[i])throw new TypeError(o+" is ambiguous");r[i]=n}var a=e.length,c=e.charAt(0),s=Math.log(a)/Math.log(256),d=Math.log(256)/Math.log(a);function u(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;for(var t=0,n=0,o=0;e[t]===c;)n++,t++;for(var i=(e.length-t)*s+1>>>0,d=new Uint8Array(i);e[t];){var u=e.charCodeAt(t);if(u>255)return;var h=r[u];if(255===h)return;for(var l=0,f=i-1;(0!==h||l<o)&&-1!==f;f--,l++)h+=a*d[f]>>>0,d[f]=h%256>>>0,h=h/256>>>0;if(0!==h)throw new Error("Non-zero carry");o=l,t++}for(var A=i-o;A!==i&&0===d[A];)A++;for(var v=new Uint8Array(n+(i-A)),p=n;A!==i;)v[p++]=d[A++];return v}return{encode:function(r){if(r instanceof Uint8Array||(ArrayBuffer.isView(r)?r=new Uint8Array(r.buffer,r.byteOffset,r.byteLength):Array.isArray(r)&&(r=Uint8Array.from(r))),!(r instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===r.length)return"";for(var t=0,n=0,o=0,i=r.length;o!==i&&0===r[o];)o++,t++;for(var s=(i-o)*d+1>>>0,u=new Uint8Array(s);o!==i;){for(var h=r[o],l=0,f=s-1;(0!==h||l<n)&&-1!==f;f--,l++)h+=256*u[f]>>>0,u[f]=h%a>>>0,h=h/a>>>0;if(0!==h)throw new Error("Non-zero carry");n=l,o++}for(var A=s-n;A!==s&&0===u[A];)A++;for(var v=c.repeat(t);A<s;++A)v+=e.charAt(u[A]);return v},decodeUnsafe:u,decode:function(e){var r=u(e);if(r)return r;throw new Error("Non-base"+a+" character")}}}}}]);
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 153.0e09a3e7bd0bed0427de.js.LICENSE.txt */
2
+ "use strict";(this.webpackChunkwowok_agent=this.webpackChunkwowok_agent||[]).push([[153],{1454:(t,e,s)=>{s.d(e,{w:()=>r});var n=s(9190),i=s(4976);class h extends i.Vw{constructor(t,e){super(),this.finished=!1,this.destroyed=!1,(0,n.sd)(t);const s=(0,i.ZJ)(e);if(this.iHash=t.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const h=this.blockLen,r=new Uint8Array(h);r.set(s.length>h?t.create().update(s).digest():s);for(let t=0;t<r.length;t++)r[t]^=54;this.iHash.update(r),this.oHash=t.create();for(let t=0;t<r.length;t++)r[t]^=106;this.oHash.update(r),r.fill(0)}update(t){return(0,n.CC)(this),this.iHash.update(t),this}digestInto(t){(0,n.CC)(this),(0,n.DO)(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:e,iHash:s,finished:n,destroyed:i,blockLen:h,outputLen:r}=this;return t.finished=n,t.destroyed=i,t.blockLen=h,t.outputLen=r,t.oHash=e._cloneInto(t.oHash),t.iHash=s._cloneInto(t.iHash),t}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const r=(t,e,s)=>new h(t,e).update(s).digest();r.create=(t,e)=>new h(t,e)},2341:(t,e,s)=>{s.d(e,{Zf:()=>f});var n=s(9190),i=s(4976);class h extends i.Vw{constructor(t,e,s,n){super(),this.blockLen=t,this.outputLen=e,this.padOffset=s,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=(0,i.O8)(this.buffer)}update(t){(0,n.CC)(this);const{view:e,buffer:s,blockLen:h}=this,r=(t=(0,i.ZJ)(t)).length;for(let n=0;n<r;){const o=Math.min(h-this.pos,r-n);if(o!==h)s.set(t.subarray(n,n+o),this.pos),this.pos+=o,n+=o,this.pos===h&&(this.process(e,0),this.pos=0);else{const e=(0,i.O8)(t);for(;h<=r-n;n+=h)this.process(e,n)}}return this.length+=t.length,this.roundClean(),this}digestInto(t){(0,n.CC)(this),(0,n.Ht)(t,this),this.finished=!0;const{buffer:e,view:s,blockLen:h,isLE:r}=this;let{pos:o}=this;e[o++]=128,this.buffer.subarray(o).fill(0),this.padOffset>h-o&&(this.process(s,0),o=0);for(let t=o;t<h;t++)e[t]=0;!function(t,e,s,n){if("function"==typeof t.setBigUint64)return t.setBigUint64(e,s,n);const i=BigInt(32),h=BigInt(4294967295),r=Number(s>>i&h),o=Number(s&h),c=n?4:0,a=n?0:4;t.setUint32(e+c,r,n),t.setUint32(e+a,o,n)}(s,h-8,BigInt(8*this.length),r),this.process(s,0);const c=(0,i.O8)(t),a=this.outputLen;if(a%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const d=a/4,l=this.get();if(d>l.length)throw new Error("_sha2: outputLen bigger than state");for(let t=0;t<d;t++)c.setUint32(4*t,l[t],r)}digest(){const{buffer:t,outputLen:e}=this;this.digestInto(t);const s=t.slice(0,e);return this.destroy(),s}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:e,buffer:s,length:n,finished:i,destroyed:h,pos:r}=this;return t.length=n,t.pos=r,t.finished=i,t.destroyed=h,n%e&&t.buffer.set(s),t}}var r=s(9271);const[o,c]=(()=>r.Ay.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map((t=>BigInt(t)))))(),a=new Uint32Array(80),d=new Uint32Array(80);class l extends h{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:t,Al:e,Bh:s,Bl:n,Ch:i,Cl:h,Dh:r,Dl:o,Eh:c,El:a,Fh:d,Fl:l,Gh:f,Gl:u,Hh:b,Hl:y}=this;return[t,e,s,n,i,h,r,o,c,a,d,l,f,u,b,y]}set(t,e,s,n,i,h,r,o,c,a,d,l,f,u,b,y){this.Ah=0|t,this.Al=0|e,this.Bh=0|s,this.Bl=0|n,this.Ch=0|i,this.Cl=0|h,this.Dh=0|r,this.Dl=0|o,this.Eh=0|c,this.El=0|a,this.Fh=0|d,this.Fl=0|l,this.Gh=0|f,this.Gl=0|u,this.Hh=0|b,this.Hl=0|y}process(t,e){for(let s=0;s<16;s++,e+=4)a[s]=t.getUint32(e),d[s]=t.getUint32(e+=4);for(let t=16;t<80;t++){const e=0|a[t-15],s=0|d[t-15],n=r.Ay.rotrSH(e,s,1)^r.Ay.rotrSH(e,s,8)^r.Ay.shrSH(e,s,7),i=r.Ay.rotrSL(e,s,1)^r.Ay.rotrSL(e,s,8)^r.Ay.shrSL(e,s,7),h=0|a[t-2],o=0|d[t-2],c=r.Ay.rotrSH(h,o,19)^r.Ay.rotrBH(h,o,61)^r.Ay.shrSH(h,o,6),l=r.Ay.rotrSL(h,o,19)^r.Ay.rotrBL(h,o,61)^r.Ay.shrSL(h,o,6),f=r.Ay.add4L(i,l,d[t-7],d[t-16]),u=r.Ay.add4H(f,n,c,a[t-7],a[t-16]);a[t]=0|u,d[t]=0|f}let{Ah:s,Al:n,Bh:i,Bl:h,Ch:l,Cl:f,Dh:u,Dl:b,Eh:y,El:p,Fh:g,Fl:v,Gh:x,Gl:A,Hh:w,Hl:L}=this;for(let t=0;t<80;t++){const e=r.Ay.rotrSH(y,p,14)^r.Ay.rotrSH(y,p,18)^r.Ay.rotrBH(y,p,41),H=r.Ay.rotrSL(y,p,14)^r.Ay.rotrSL(y,p,18)^r.Ay.rotrBL(y,p,41),B=y&g^~y&x,k=p&v^~p&A,D=r.Ay.add5L(L,H,k,c[t],d[t]),E=r.Ay.add5H(D,w,e,B,o[t],a[t]),S=0|D,F=r.Ay.rotrSH(s,n,28)^r.Ay.rotrBH(s,n,34)^r.Ay.rotrBH(s,n,39),I=r.Ay.rotrSL(s,n,28)^r.Ay.rotrBL(s,n,34)^r.Ay.rotrBL(s,n,39),U=s&i^s&l^i&l,C=n&h^n&f^h&f;w=0|x,L=0|A,x=0|g,A=0|v,g=0|y,v=0|p,({h:y,l:p}=r.Ay.add(0|u,0|b,0|E,0|S)),u=0|l,b=0|f,l=0|i,f=0|h,i=0|s,h=0|n;const m=r.Ay.add3L(S,I,C);s=r.Ay.add3H(m,E,F,U),n=0|m}({h:s,l:n}=r.Ay.add(0|this.Ah,0|this.Al,0|s,0|n)),({h:i,l:h}=r.Ay.add(0|this.Bh,0|this.Bl,0|i,0|h)),({h:l,l:f}=r.Ay.add(0|this.Ch,0|this.Cl,0|l,0|f)),({h:u,l:b}=r.Ay.add(0|this.Dh,0|this.Dl,0|u,0|b)),({h:y,l:p}=r.Ay.add(0|this.Eh,0|this.El,0|y,0|p)),({h:g,l:v}=r.Ay.add(0|this.Fh,0|this.Fl,0|g,0|v)),({h:x,l:A}=r.Ay.add(0|this.Gh,0|this.Gl,0|x,0|A)),({h:w,l:L}=r.Ay.add(0|this.Hh,0|this.Hl,0|w,0|L)),this.set(s,n,i,h,l,f,u,b,y,p,g,v,x,A,w,L)}roundClean(){a.fill(0),d.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const f=(0,i.ld)((()=>new l))},4976:(t,e,s)=>{s.d(e,{DH:()=>i,Fc:()=>a,My:()=>l,O8:()=>h,Vw:()=>p,ZJ:()=>y,aT:()=>b,c:()=>c,ld:()=>v,qv:()=>r,t6:()=>x,tY:()=>g});var n=s(9190);function i(t){return new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4))}function h(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}const r=(()=>68===new Uint8Array(new Uint32Array([287454020]).buffer)[0])();function o(t){return t<<24&4278190080|t<<8&16711680|t>>>8&65280|t>>>24&255}const c=r?t=>t:t=>o(t);function a(t){for(let e=0;e<t.length;e++)t[e]=o(t[e])}const d=Array.from({length:256},((t,e)=>e.toString(16).padStart(2,"0")));function l(t){(0,n.DO)(t);let e="";for(let s=0;s<t.length;s++)e+=d[t[s]];return e}const f={_0:48,_9:57,A:65,F:70,a:97,f:102};function u(t){return t>=f._0&&t<=f._9?t-f._0:t>=f.A&&t<=f.F?t-(f.A-10):t>=f.a&&t<=f.f?t-(f.a-10):void 0}function b(t){if("string"!=typeof t)throw new Error("hex string expected, got "+typeof t);const e=t.length,s=e/2;if(e%2)throw new Error("hex string expected, got unpadded hex of length "+e);const n=new Uint8Array(s);for(let e=0,i=0;e<s;e++,i+=2){const s=u(t.charCodeAt(i)),h=u(t.charCodeAt(i+1));if(void 0===s||void 0===h){const e=t[i]+t[i+1];throw new Error('hex string expected, got non-hex character "'+e+'" at index '+i)}n[e]=16*s+h}return n}function y(t){return"string"==typeof t&&(t=function(t){if("string"!=typeof t)throw new Error("utf8ToBytes expected string, got "+typeof t);return new Uint8Array((new TextEncoder).encode(t))}(t)),(0,n.DO)(t),t}class p{clone(){return this._cloneInto()}}function g(t,e){if(void 0!==e&&"[object Object]"!=={}.toString.call(e))throw new Error("Options should be object or undefined");return Object.assign(t,e)}function v(t){const e=e=>t().update(y(e)).digest(),s=t();return e.outputLen=s.outputLen,e.blockLen=s.blockLen,e.create=()=>t(),e}function x(t){const e=(e,s)=>t(s).update(y(e)).digest(),s=t({});return e.outputLen=s.outputLen,e.blockLen=s.blockLen,e.create=e=>t(e),e}},5398:(t,e,s)=>{s.d(e,{S:()=>u});var n=s(9190),i=s(4976);const h=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9]);class r extends i.Vw{constructor(t,e,s={},h,r,o){if(super(),this.blockLen=t,this.outputLen=e,this.length=0,this.pos=0,this.finished=!1,this.destroyed=!1,(0,n.Fe)(t),(0,n.Fe)(e),(0,n.Fe)(h),e<0||e>h)throw new Error("outputLen bigger than keyLen");if(void 0!==s.key&&(s.key.length<1||s.key.length>h))throw new Error("key length must be undefined or 1.."+h);if(void 0!==s.salt&&s.salt.length!==r)throw new Error("salt must be undefined or "+r);if(void 0!==s.personalization&&s.personalization.length!==o)throw new Error("personalization must be undefined or "+o);this.buffer=new Uint8Array(t),this.buffer32=(0,i.DH)(this.buffer)}update(t){(0,n.CC)(this);const{blockLen:e,buffer:s,buffer32:h}=this,r=(t=(0,i.ZJ)(t)).length,o=t.byteOffset,c=t.buffer;for(let n=0;n<r;){this.pos===e&&(i.qv||(0,i.Fc)(h),this.compress(h,0,!1),i.qv||(0,i.Fc)(h),this.pos=0);const a=Math.min(e-this.pos,r-n),d=o+n;if(a!==e||d%4||!(n+a<r))s.set(t.subarray(n,n+a),this.pos),this.pos+=a,this.length+=a,n+=a;else{const t=new Uint32Array(c,d,Math.floor((r-n)/4));i.qv||(0,i.Fc)(t);for(let s=0;n+e<r;s+=h.length,n+=e)this.length+=e,this.compress(t,s,!1);i.qv||(0,i.Fc)(t)}}return this}digestInto(t){(0,n.CC)(this),(0,n.Ht)(t,this);const{pos:e,buffer32:s}=this;this.finished=!0,this.buffer.subarray(e).fill(0),i.qv||(0,i.Fc)(s),this.compress(s,0,!0),i.qv||(0,i.Fc)(s);const h=(0,i.DH)(t);this.get().forEach(((t,e)=>h[e]=(0,i.c)(t)))}digest(){const{buffer:t,outputLen:e}=this;this.digestInto(t);const s=t.slice(0,e);return this.destroy(),s}_cloneInto(t){const{buffer:e,length:s,finished:n,destroyed:i,outputLen:h,pos:r}=this;return t||(t=new this.constructor({dkLen:h})),t.set(...this.get()),t.length=s,t.finished=n,t.destroyed=i,t.outputLen=h,t.buffer.set(e),t.pos=r,t}}var o=s(9271);const c=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),a=new Uint32Array(32);function d(t,e,s,n,i,h){const r=i[h],c=i[h+1];let d=a[2*t],l=a[2*t+1],f=a[2*e],u=a[2*e+1],b=a[2*s],y=a[2*s+1],p=a[2*n],g=a[2*n+1],v=o.Ay.add3L(d,f,r);l=o.Ay.add3H(v,l,u,c),d=0|v,({Dh:g,Dl:p}={Dh:g^l,Dl:p^d}),({Dh:g,Dl:p}={Dh:o.Ay.rotr32H(g,p),Dl:o.Ay.rotr32L(g,p)}),({h:y,l:b}=o.Ay.add(y,b,g,p)),({Bh:u,Bl:f}={Bh:u^y,Bl:f^b}),({Bh:u,Bl:f}={Bh:o.Ay.rotrSH(u,f,24),Bl:o.Ay.rotrSL(u,f,24)}),a[2*t]=d,a[2*t+1]=l,a[2*e]=f,a[2*e+1]=u,a[2*s]=b,a[2*s+1]=y,a[2*n]=p,a[2*n+1]=g}function l(t,e,s,n,i,h){const r=i[h],c=i[h+1];let d=a[2*t],l=a[2*t+1],f=a[2*e],u=a[2*e+1],b=a[2*s],y=a[2*s+1],p=a[2*n],g=a[2*n+1],v=o.Ay.add3L(d,f,r);l=o.Ay.add3H(v,l,u,c),d=0|v,({Dh:g,Dl:p}={Dh:g^l,Dl:p^d}),({Dh:g,Dl:p}={Dh:o.Ay.rotrSH(g,p,16),Dl:o.Ay.rotrSL(g,p,16)}),({h:y,l:b}=o.Ay.add(y,b,g,p)),({Bh:u,Bl:f}={Bh:u^y,Bl:f^b}),({Bh:u,Bl:f}={Bh:o.Ay.rotrBH(u,f,63),Bl:o.Ay.rotrBL(u,f,63)}),a[2*t]=d,a[2*t+1]=l,a[2*e]=f,a[2*e+1]=u,a[2*s]=b,a[2*s+1]=y,a[2*n]=p,a[2*n+1]=g}class f extends r{constructor(t={}){super(128,void 0===t.dkLen?64:t.dkLen,t,64,16,16),this.v0l=0|c[0],this.v0h=0|c[1],this.v1l=0|c[2],this.v1h=0|c[3],this.v2l=0|c[4],this.v2h=0|c[5],this.v3l=0|c[6],this.v3h=0|c[7],this.v4l=0|c[8],this.v4h=0|c[9],this.v5l=0|c[10],this.v5h=0|c[11],this.v6l=0|c[12],this.v6h=0|c[13],this.v7l=0|c[14],this.v7h=0|c[15];const e=t.key?t.key.length:0;if(this.v0l^=this.outputLen|e<<8|65536|1<<24,t.salt){const e=(0,i.DH)((0,i.ZJ)(t.salt));this.v4l^=(0,i.c)(e[0]),this.v4h^=(0,i.c)(e[1]),this.v5l^=(0,i.c)(e[2]),this.v5h^=(0,i.c)(e[3])}if(t.personalization){const e=(0,i.DH)((0,i.ZJ)(t.personalization));this.v6l^=(0,i.c)(e[0]),this.v6h^=(0,i.c)(e[1]),this.v7l^=(0,i.c)(e[2]),this.v7h^=(0,i.c)(e[3])}if(t.key){const e=new Uint8Array(this.blockLen);e.set((0,i.ZJ)(t.key)),this.update(e)}}get(){let{v0l:t,v0h:e,v1l:s,v1h:n,v2l:i,v2h:h,v3l:r,v3h:o,v4l:c,v4h:a,v5l:d,v5h:l,v6l:f,v6h:u,v7l:b,v7h:y}=this;return[t,e,s,n,i,h,r,o,c,a,d,l,f,u,b,y]}set(t,e,s,n,i,h,r,o,c,a,d,l,f,u,b,y){this.v0l=0|t,this.v0h=0|e,this.v1l=0|s,this.v1h=0|n,this.v2l=0|i,this.v2h=0|h,this.v3l=0|r,this.v3h=0|o,this.v4l=0|c,this.v4h=0|a,this.v5l=0|d,this.v5h=0|l,this.v6l=0|f,this.v6h=0|u,this.v7l=0|b,this.v7h=0|y}compress(t,e,s){this.get().forEach(((t,e)=>a[e]=t)),a.set(c,16);let{h:n,l:i}=o.Ay.fromBig(BigInt(this.length));a[24]=c[8]^i,a[25]=c[9]^n,s&&(a[28]=~a[28],a[29]=~a[29]);let r=0;const f=h;for(let s=0;s<12;s++)d(0,4,8,12,t,e+2*f[r++]),l(0,4,8,12,t,e+2*f[r++]),d(1,5,9,13,t,e+2*f[r++]),l(1,5,9,13,t,e+2*f[r++]),d(2,6,10,14,t,e+2*f[r++]),l(2,6,10,14,t,e+2*f[r++]),d(3,7,11,15,t,e+2*f[r++]),l(3,7,11,15,t,e+2*f[r++]),d(0,5,10,15,t,e+2*f[r++]),l(0,5,10,15,t,e+2*f[r++]),d(1,6,11,12,t,e+2*f[r++]),l(1,6,11,12,t,e+2*f[r++]),d(2,7,8,13,t,e+2*f[r++]),l(2,7,8,13,t,e+2*f[r++]),d(3,4,9,14,t,e+2*f[r++]),l(3,4,9,14,t,e+2*f[r++]);this.v0l^=a[0]^a[16],this.v0h^=a[1]^a[17],this.v1l^=a[2]^a[18],this.v1h^=a[3]^a[19],this.v2l^=a[4]^a[20],this.v2h^=a[5]^a[21],this.v3l^=a[6]^a[22],this.v3h^=a[7]^a[23],this.v4l^=a[8]^a[24],this.v4h^=a[9]^a[25],this.v5l^=a[10]^a[26],this.v5h^=a[11]^a[27],this.v6l^=a[12]^a[28],this.v6h^=a[13]^a[29],this.v7l^=a[14]^a[30],this.v7h^=a[15]^a[31],a.fill(0)}destroy(){this.destroyed=!0,this.buffer32.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const u=(0,i.t6)((t=>new f(t)))},7059:(t,e,s)=>{s.d(e,{kw:()=>a});var n=s(9190),i=s(1454),h=s(4976);var r=s(2341);function o(t){if("string"!=typeof t)throw new TypeError("invalid mnemonic type: "+typeof t);return t.normalize("NFKD")}const c=t=>o("mnemonic"+t);function a(t,e=""){return function(t,e,s){const{c:r,dkLen:o,DK:c,PRF:a,PRFSalt:d}=function(t,e,s,r){(0,n.sd)(t);const o=(0,h.tY)({dkLen:32,asyncTick:10},r),{c,dkLen:a,asyncTick:d}=o;if((0,n.Fe)(c),(0,n.Fe)(a),(0,n.Fe)(d),c<1)throw new Error("PBKDF2: iterations (c) should be >= 1");const l=(0,h.ZJ)(e),f=(0,h.ZJ)(s),u=new Uint8Array(a),b=i.w.create(t,l),y=b._cloneInto().update(f);return{c,dkLen:a,asyncTick:d,DK:u,PRF:b,PRFSalt:y}}(t,e,s,{c:2048,dkLen:64});let l;const f=new Uint8Array(4),u=(0,h.O8)(f),b=new Uint8Array(a.outputLen);for(let t=1,e=0;e<o;t++,e+=a.outputLen){const s=c.subarray(e,e+a.outputLen);u.setInt32(0,t,!1),(l=d._cloneInto(l)).update(f).digestInto(b),s.set(b.subarray(0,s.length));for(let t=1;t<r;t++){a._cloneInto(l).update(b).digestInto(b);for(let t=0;t<s.length;t++)s[t]^=b[t]}}return function(t,e,s,n,i){return t.destroy(),e.destroy(),n&&n.destroy(),i.fill(0),s}(a,d,c,l,b)}(r.Zf,function(t){const e=o(t),s=e.split(" ");if(![12,15,18,21,24].includes(s.length))throw new Error("Invalid mnemonic");return{nfkd:e,words:s}}(t).nfkd,c(e))}},9190:(t,e,s)=>{function n(t){if(!Number.isSafeInteger(t)||t<0)throw new Error("positive integer expected, got "+t)}function i(t,...e){if(!((s=t)instanceof Uint8Array||ArrayBuffer.isView(s)&&"Uint8Array"===s.constructor.name))throw new Error("Uint8Array expected");var s;if(e.length>0&&!e.includes(t.length))throw new Error("Uint8Array expected of length "+e+", got length="+t.length)}function h(t){if("function"!=typeof t||"function"!=typeof t.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");n(t.outputLen),n(t.blockLen)}function r(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function o(t,e){i(t);const s=e.outputLen;if(t.length<s)throw new Error("digestInto() expects output buffer of length at least "+s)}s.d(e,{CC:()=>r,DO:()=>i,Fe:()=>n,Ht:()=>o,sd:()=>h})},9271:(t,e,s)=>{s.d(e,{Ay:()=>r});const n=BigInt(2**32-1),i=BigInt(32);function h(t,e=!1){return e?{h:Number(t&n),l:Number(t>>i&n)}:{h:0|Number(t>>i&n),l:0|Number(t&n)}}const r={fromBig:h,split:function(t,e=!1){let s=new Uint32Array(t.length),n=new Uint32Array(t.length);for(let i=0;i<t.length;i++){const{h:r,l:o}=h(t[i],e);[s[i],n[i]]=[r,o]}return[s,n]},toBig:(t,e)=>BigInt(t>>>0)<<i|BigInt(e>>>0),shrSH:(t,e,s)=>t>>>s,shrSL:(t,e,s)=>t<<32-s|e>>>s,rotrSH:(t,e,s)=>t>>>s|e<<32-s,rotrSL:(t,e,s)=>t<<32-s|e>>>s,rotrBH:(t,e,s)=>t<<64-s|e>>>s-32,rotrBL:(t,e,s)=>t>>>s-32|e<<64-s,rotr32H:(t,e)=>e,rotr32L:(t,e)=>t,rotlSH:(t,e,s)=>t<<s|e>>>32-s,rotlSL:(t,e,s)=>e<<s|t>>>32-s,rotlBH:(t,e,s)=>e<<s-32|t>>>64-s,rotlBL:(t,e,s)=>t<<s-32|e>>>64-s,add:function(t,e,s,n){const i=(e>>>0)+(n>>>0);return{h:t+s+(i/2**32|0)|0,l:0|i}},add3L:(t,e,s)=>(t>>>0)+(e>>>0)+(s>>>0),add3H:(t,e,s,n)=>e+s+n+(t/2**32|0)|0,add4L:(t,e,s,n)=>(t>>>0)+(e>>>0)+(s>>>0)+(n>>>0),add4H:(t,e,s,n,i)=>e+s+n+i+(t/2**32|0)|0,add5H:(t,e,s,n,i,h)=>e+s+n+i+h+(t/2**32|0)|0,add5L:(t,e,s,n,i)=>(t>>>0)+(e>>>0)+(s>>>0)+(n>>>0)+(i>>>0)}}}]);
@@ -0,0 +1 @@
1
+ /*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
@@ -0,0 +1 @@
1
+ "use strict";(this.webpackChunkwowok_agent=this.webpackChunkwowok_agent||[]).push([[253],{3499:(t,s,e)=>{e.d(s,{P_:()=>i,bU:()=>r,kl:()=>h});var i,r,a=e(1609),n=e(9554),o=e(5337);!function(t){t[t.ratio=0]="ratio",t[t.minus=1]="minus"}(i||(i={})),function(t){t.address="address",t.phone="phone",t.name="name",t.postcode="postcode"}(r||(r={}));class h{pay_token_type;permission;object;txb;get_pay_type(){return this.pay_token_type}get_object(){return this.object}constructor(t,s,e){this.pay_token_type=s,this.txb=t,this.permission=e,this.object=""}static From(t,s,e,i){let r=new h(t,s,e);return r.object=n.Zs.TXB_OBJECT(t,i),r}static New(t,s,e,i,r,_){n.Zs.IsValidObjects([e,r])||(0,o.f)(o.I.IsValidObjects),(0,a.MA)(s)||(0,o.f)(o.I.IsValidTokenType,"New: pay_token_type"),(0,a.yW)(i)||(0,o.f)(o.I.IsValidDesription);let p=s,b=new h(t,p,e);return b.object=_?t.moveCall({target:n.Zs.Instance().serviceFn("new_with_passport"),arguments:[_,t.pure.string(i),t.object(r),n.Zs.TXB_OBJECT(t,e)],typeArguments:[p]}):t.moveCall({target:n.Zs.Instance().serviceFn("new"),arguments:[t.pure.string(i),t.object(r),n.Zs.TXB_OBJECT(t,e)],typeArguments:[p]}),b}launch(){return this.txb.moveCall({target:n.Zs.Instance().serviceFn("create"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object)],typeArguments:[this.pay_token_type]})}set_description(t,s){(0,a.yW)(t)||(0,o.f)(o.I.IsValidDesription),s?this.txb.moveCall({target:n.Zs.Instance().serviceFn("description_set_with_passport"),arguments:[s,n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.string(t),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:n.Zs.Instance().serviceFn("description_set"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.string(t),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]})}set_price(t,s,e=!0,i){(0,a.Ec)(s)||(0,o.f)(o.I.IsValidU64,"set_price price"),h.IsValidItemName(t)||(0,o.f)(o.I.IsValidServiceItemName,"set_price item"),i?this.txb.moveCall({target:n.Zs.Instance().serviceFn("price_set_with_passport"),arguments:[i,n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.string(t),this.txb.pure.u64(s),this.txb.pure.bool(e),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:n.Zs.Instance().serviceFn("price_set"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.string(t),this.txb.pure.u64(s),this.txb.pure.bool(e),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]})}set_stock(t,s,e=!0,i){h.IsValidItemName(t)||(0,o.f)(o.I.IsValidServiceItemName,"item"),(0,a.Ec)(s)||(0,o.f)(o.I.IsValidU64,"stock"),i?this.txb.moveCall({target:n.Zs.Instance().serviceFn("stock_set_with_passport"),arguments:[i,n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.string(t),this.txb.pure.u64(s),this.txb.pure.bool(e),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:n.Zs.Instance().serviceFn("stock_set"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.string(t),this.txb.pure.u64(s),this.txb.pure.bool(e),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]})}add_stock(t,s,e=!0,i){h.IsValidItemName(t)||(0,o.f)(o.I.IsValidServiceItemName,"add_stock item"),(0,a.Ec)(s)||(0,o.f)(o.I.IsValidUint,"add_stock stock_add"),i?this.txb.moveCall({target:n.Zs.Instance().serviceFn("stock_add_with_passport"),arguments:[i,n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.string(t),this.txb.pure.u64(s),this.txb.pure.bool(e),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:n.Zs.Instance().serviceFn("stock_add"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.string(t),this.txb.pure.u64(s),this.txb.pure.bool(e),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]})}reduce_stock(t,s,e=!0,i){h.IsValidItemName(t)||(0,o.f)(o.I.IsValidServiceItemName,"reduce_stock item"),(0,a.Ec)(s)||(0,o.f)(o.I.IsValidUint,"reduce_stock stock_reduce"),i?this.txb.moveCall({target:n.Zs.Instance().serviceFn("stock_reduce_with_passport"),arguments:[i,n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.string(t),this.txb.pure.u64(s),this.txb.pure.bool(e),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:n.Zs.Instance().serviceFn("stock_reduce"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.string(t),this.txb.pure.u64(s),this.txb.pure.bool(e),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]})}set_sale_endpoint(t,s,e=!0,i){h.IsValidItemName(t)||(0,o.f)(o.I.IsValidServiceItemName,"set_sale_endpoint item"),s&&!(0,a.Eh)(s)&&(0,o.f)(o.I.IsValidEndpoint,"set_sale_endpoint endpoint");let r=this.txb.pure.option("string",s||void 0);i?this.txb.moveCall({target:n.Zs.Instance().serviceFn("sale_endpoint_set_with_passport"),arguments:[i,n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.string(t),r,this.txb.pure.bool(e),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:n.Zs.Instance().serviceFn("sale_endpoint_set"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.string(t),r,this.txb.pure.bool(e),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]})}set_payee(t,s){n.Zs.IsValidObjects([t])||(0,o.f)(o.I.IsValidObjects,"set_payee"),s?this.txb.moveCall({target:n.Zs.Instance().serviceFn("payee_set_with_passport"),arguments:[s,n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.object(t),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:n.Zs.Instance().serviceFn("payee_set"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.object(t),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]})}add_repository(t,s){n.Zs.IsValidObjects([t])||(0,o.f)(o.I.IsValidObjects,"repository_add"),s?this.txb.moveCall({target:n.Zs.Instance().serviceFn("repository_add_with_passport"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),n.Zs.TXB_OBJECT(this.txb,t),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:n.Zs.Instance().serviceFn("repository_add"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),n.Zs.TXB_OBJECT(this.txb,t),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]})}remove_repository(t,s,e){(s||0!==t.length)&&((0,a.ij)(t,a.jE)||(0,o.f)(o.I.IsValidArray,"repository_address"),e?s?this.txb.moveCall({target:n.Zs.Instance().serviceFn("repository_remove_all_with_passport"),arguments:[e,n.Zs.TXB_OBJECT(this.txb,this.object),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:n.Zs.Instance().serviceFn("repository_remove_with_passport"),arguments:[e,n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.vector("address",(0,a.SI)(t)),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):s?this.txb.moveCall({target:n.Zs.Instance().serviceFn("repository_remove_all"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:n.Zs.Instance().serviceFn("repository_remove"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.vector("address",(0,a.SI)(t)),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}))}add_arbitration(t,s,e){n.Zs.IsValidObjects([t])||(0,o.f)(o.I.IsValidObjects,"add_arbitration.arbitraion"),(0,a.MA)(s)||(0,o.f)(o.I.IsValidTokenType,"add_arbitration.arbitraion_token_type"),e?this.txb.moveCall({target:n.Zs.Instance().serviceFn("arbitration_add_with_passport"),arguments:[e,n.Zs.TXB_OBJECT(this.txb,this.object),n.Zs.TXB_OBJECT(this.txb,t),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type,s]}):this.txb.moveCall({target:n.Zs.Instance().serviceFn("arbitration_add"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),n.Zs.TXB_OBJECT(this.txb,t),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type,s]})}remove_arbitration(t,s,e){(s||0!==t.length)&&((0,a.ij)(t,a.jE)||(0,o.f)(o.I.IsValidArray,"remove_arbitration.address"),e?s?this.txb.moveCall({target:n.Zs.Instance().serviceFn("arbitration_remove_all_with_passport"),arguments:[e,n.Zs.TXB_OBJECT(this.txb,this.object),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:n.Zs.Instance().serviceFn("arbitration_remove_with_passport"),arguments:[e,n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.vector("address",(0,a.SI)(t)),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):s?this.txb.moveCall({target:n.Zs.Instance().serviceFn("arbitration_remove_all"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:n.Zs.Instance().serviceFn("arbitration_remove"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.vector("address",(0,a.SI)(t)),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}))}add_withdraw_guards(t,s){if(0===t.length)return;let e=!0;t.forEach((t=>{n.Zs.IsValidObjects([t.guard])||(e=!1),(0,a.qF)(t.percent)||(e=!1)})),e||(0,o.f)(o.I.InvalidParam,"guards"),t.forEach((t=>{s?this.txb.moveCall({target:n.Zs.Instance().serviceFn("withdraw_guard_add_with_passport"),arguments:[s,n.Zs.TXB_OBJECT(this.txb,this.object),n.Zs.TXB_OBJECT(this.txb,t.guard),this.txb.pure.u8(t.percent),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:n.Zs.Instance().serviceFn("withdraw_guard_add"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),n.Zs.TXB_OBJECT(this.txb,t.guard),this.txb.pure.u8(t.percent),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]})}))}remove_withdraw_guards(t,s,e){(s||0!==t.length)&&((0,a.ij)(t,a.jE)||(0,o.f)(o.I.IsValidArray,"guard_address"),e?s?this.txb.moveCall({target:n.Zs.Instance().serviceFn("withdraw_guard_remove_all_with_passport"),arguments:[e,n.Zs.TXB_OBJECT(this.txb,this.object),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:n.Zs.Instance().serviceFn("withdraw_guard_remove_with_passport"),arguments:[e,n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.vector("address",(0,a.SI)(t)),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):s?this.txb.moveCall({target:n.Zs.Instance().serviceFn("withdraw_guard_remove_all"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:n.Zs.Instance().serviceFn("withdraw_guard_remove"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.vector("address",(0,a.SI)(t)),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}))}add_refund_guards(t,s){if(0===t.length)return;let e=!0;t.forEach((t=>{n.Zs.IsValidObjects([t.guard])||(e=!1),(0,a.qF)(t.percent)||(e=!1)})),e||(0,o.f)(o.I.InvalidParam,"guards"),t.forEach((t=>{s?this.txb.moveCall({target:n.Zs.Instance().serviceFn("refund_guard_add_with_passport"),arguments:[s,n.Zs.TXB_OBJECT(this.txb,this.object),n.Zs.TXB_OBJECT(this.txb,t.guard),this.txb.pure.u8(t.percent),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:n.Zs.Instance().serviceFn("refund_guard_add"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),n.Zs.TXB_OBJECT(this.txb,t.guard),this.txb.pure.u8(t.percent),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]})}))}remove_refund_guards(t,s,e){(0!==t.length||s)&&((0,a.ij)(t,a.jE)||(0,o.f)(o.I.InvalidParam,"guard_address"),e?s?this.txb.moveCall({target:n.Zs.Instance().serviceFn("refund_guard_remove_all_with_passport"),arguments:[e,n.Zs.TXB_OBJECT(this.txb,this.object),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:n.Zs.Instance().serviceFn("refund_guard_remove_with_passport"),arguments:[e,n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.vector("address",(0,a.SI)(t)),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):s?this.txb.moveCall({target:n.Zs.Instance().serviceFn("refund_guard_remove_all"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:n.Zs.Instance().serviceFn("refund_guard_remove"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.vector("address",(0,a.SI)(t)),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}))}is_valid_sale(t){let s=!0,e=[];return t.forEach((t=>{h.IsValidItemName(t.item)||(s=!1),(0,a.Ec)(t.price)||(s=!1),(0,a.Ec)(t.stock)||(s=!1),e.includes(t.item)&&(s=!1),e.push(t.item)})),s}add_sales(t,s=!1,e){if(0===t.length)return;this.is_valid_sale(t)||(0,o.f)(o.I.InvalidParam,"add_sales");let i=[],r=[],h=[],_=[];t.forEach((t=>{t.endpoint&&!(0,a.Eh)(t.endpoint)&&(0,o.f)(o.I.IsValidEndpoint,"add_sales"),i.push(t.item),r.push(t.price),h.push(t.stock),_.push(t.endpoint??"")})),e?this.txb.moveCall({target:n.Zs.Instance().serviceFn("sales_add_with_passport"),arguments:[e,n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.vector("string",i),this.txb.pure.vector("string",_),this.txb.pure.vector("u64",r),this.txb.pure.vector("u64",h),this.txb.pure.bool(s),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:n.Zs.Instance().serviceFn("sales_add"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.vector("string",i),this.txb.pure.vector("string",_),this.txb.pure.vector("u64",r),this.txb.pure.vector("u64",h),this.txb.pure.bool(s),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]})}remove_sales(t,s){0!==t.length&&((0,a.ij)(t,h.IsValidItemName)||(0,o.f)(o.I.IsValidArray,"remove_sales"),s?this.txb.moveCall({target:n.Zs.Instance().serviceFn("sales_remove_with_passport"),arguments:[s,n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.vector("string",(0,a.SI)(t)),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:n.Zs.Instance().serviceFn("sales_remove"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.vector("string",(0,a.SI)(t)),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}))}discount_transfer(t,s){(!t||t.length>h.MAX_DISCOUNT_RECEIVER_COUNT)&&(0,o.f)(o.I.InvalidParam,"discount_dispatch");let e=!0;t.forEach((t=>{(0,a.jE)(t.receiver)||(e=!1),(!(0,a.Ec)(t.count)||t.count>h.MAX_DISCOUNT_COUNT_ONCE)&&(e=!1),(0,a.Xx)(t.discount.name)||(e=!1),t.discount.type!=i.ratio||(0,a.qF)(t.discount.off)||(e=!1),(0,a.Ec)(t.discount.duration_minutes)||(e=!1),t.discount?.time_start&&!(0,a.Ec)(t.discount.time_start)&&(e=!1),t.discount?.price_greater&&!(0,a.Ec)(t.discount.price_greater)&&(e=!1)})),e||(0,o.f)(o.I.InvalidParam,"discount_dispatch");const r=this.txb.sharedObjectRef(n.Zs.CLOCK_OBJECT);t.forEach((t=>{let e=this.txb.pure.option("u64",t.discount?.price_greater?t.discount?.price_greater:void 0),i=this.txb.pure.option("u64",t.discount?.time_start?t.discount?.time_start:void 0);s?this.txb.moveCall({target:n.Zs.Instance().serviceFn("dicscount_create_with_passport"),arguments:[s,n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.string(t.discount.name),this.txb.pure.u8(t.discount.type),this.txb.pure.u64(t.discount.off),e,i,this.txb.pure.u64(t.discount.duration_minutes),this.txb.pure.u64(t.count),n.Zs.TXB_OBJECT(this.txb,this.permission),this.txb.pure.address(t.receiver),this.txb.object(r)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:n.Zs.Instance().serviceFn("dicscount_create"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.string(t.discount.name),this.txb.pure.u8(t.discount.type),this.txb.pure.u64(t.discount.off),e,i,this.txb.pure.u64(t.discount.duration_minutes),this.txb.pure.u64(t.count),n.Zs.TXB_OBJECT(this.txb,this.permission),this.txb.pure.address(t.receiver),this.txb.object(r)],typeArguments:[this.pay_token_type]})}))}withdraw(t,s,e){n.Zs.IsValidObjects([t,s.treasury,s.withdraw_guard,e])||(0,o.f)(o.I.IsValidObjects),s?.for_guard&&!n.Zs.IsValidObjects([s.for_guard])&&(0,o.f)(o.I.IsValidObjects,"withdraw.param.for_guard"),s?.for_object&&!(0,a.jE)(s.for_object)&&(0,o.f)(o.I.IsValidAddress,"withdraw.param.for_object"),(0,a.Ec)(s.index)||(0,o.f)(o.I.IsValidU64,"withdraw.param.index"),(0,a.yW)(s.remark)||(0,o.f)(o.I.IsValidDesription,"withdraw.param.remark");const i=this.txb.pure.option("address",s.for_object?s.for_object:void 0),r=this.txb.sharedObjectRef(n.Zs.CLOCK_OBJECT);return s.for_guard?this.txb.moveCall({target:n.Zs.Instance().serviceFn("withdraw_forGuard_with_passport"),arguments:[e,n.Zs.TXB_OBJECT(this.txb,this.object),n.Zs.TXB_OBJECT(this.txb,t),this.txb.object(s.withdraw_guard),this.txb.object(s.treasury),i,this.txb.object(s.for_guard),this.txb.pure.u64(s.index),this.txb.pure.string(s.remark),this.txb.object(r),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:n.Zs.Instance().serviceFn("withdraw_with_passport"),arguments:[e,n.Zs.TXB_OBJECT(this.txb,this.object),n.Zs.TXB_OBJECT(this.txb,t),this.txb.object(s.withdraw_guard),this.txb.object(s.treasury),i,this.txb.pure.u64(s.index),this.txb.pure.string(s.remark),this.txb.object(r),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]})}set_buy_guard(t,s){s?t?this.txb.moveCall({target:n.Zs.Instance().serviceFn("buy_guard_set_with_passport"),arguments:[s,n.Zs.TXB_OBJECT(this.txb,this.object),n.Zs.TXB_OBJECT(this.txb,t),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:n.Zs.Instance().serviceFn("buy_guard_none_with_passport"),arguments:[s,n.Zs.TXB_OBJECT(this.txb,this.object),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):t?this.txb.moveCall({target:n.Zs.Instance().serviceFn("buy_guard_set"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),n.Zs.TXB_OBJECT(this.txb,t),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:n.Zs.Instance().serviceFn("buy_guard_none"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]})}set_machine(t,s){s?t?this.txb.moveCall({target:n.Zs.Instance().serviceFn("machine_set_with_passport"),arguments:[s,n.Zs.TXB_OBJECT(this.txb,this.object),n.Zs.TXB_OBJECT(this.txb,t),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:n.Zs.Instance().serviceFn("machine_none_with_passport"),arguments:[s,n.Zs.TXB_OBJECT(this.txb,this.object),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):t?this.txb.moveCall({target:n.Zs.Instance().serviceFn("machine_set"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),n.Zs.TXB_OBJECT(this.txb,t),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:n.Zs.Instance().serviceFn("machine_none"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]})}set_endpoint(t,s){t&&!(0,a.Eh)(t)&&(0,o.f)(o.I.IsValidEndpoint);let e=this.txb.pure.option("string",t||void 0);s?this.txb.moveCall({target:n.Zs.Instance().serviceFn("endpoint_set_with_passport"),arguments:[s,n.Zs.TXB_OBJECT(this.txb,this.object),e,n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:n.Zs.Instance().serviceFn("endpoint_set"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),e,n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]})}publish(t){t?this.txb.moveCall({target:n.Zs.Instance().serviceFn("publish_with_passport"),arguments:[t,n.Zs.TXB_OBJECT(this.txb,this.object),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:n.Zs.Instance().serviceFn("publish"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]})}clone(t,s,e){let i;return i=e?this.txb.moveCall({target:n.Zs.Instance().serviceFn("clone_withpassport"),arguments:[e,n.Zs.TXB_OBJECT(this.txb,this.object),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type,t||this.pay_token_type]}):this.txb.moveCall({target:n.Zs.Instance().serviceFn("clone"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type,t||this.pay_token_type]}),s?this.txb.moveCall({target:n.Zs.Instance().serviceFn("create"),arguments:[n.Zs.TXB_OBJECT(this.txb,i)],typeArguments:[t||this.pay_token_type]}):i}set_customer_required(t,s,e){s.length>0&&!t&&(0,o.f)(o.I.InvalidParam,"set_customer_required"),t.length>h.MAX_PUBKEY_SIZE&&(0,o.f)(o.I.InvalidParam,"set_customer_required.pubkey"),s.length>h.MAX_REQUIRES_COUNT&&(0,o.f)(o.I.InvalidParam,"set_customer_required.customer_required"),(0,a.ij)(s,a.S7)||(0,o.f)(o.I.IsValidArray,"set_customer_required.customer_required");let i=(0,a.SI)(s);e?this.txb.moveCall({target:n.Zs.Instance().serviceFn("required_set_with_passport"),arguments:[e,n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.vector("string",i),this.txb.pure.string(t),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:n.Zs.Instance().serviceFn("required_set"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.vector("string",i),this.txb.pure.string(t),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]})}remove_customer_required(t){t?this.txb.moveCall({target:n.Zs.Instance().serviceFn("required_none_with_passport"),arguments:[t,n.Zs.TXB_OBJECT(this.txb,this.object),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:n.Zs.Instance().serviceFn("required_none"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]})}change_required_pubkey(t,s){t||(0,o.f)(o.I.InvalidParam,"pubkey"),s?this.txb.moveCall({target:n.Zs.Instance().serviceFn("required_pubkey_set_with_passport"),arguments:[s,n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.string(t),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:n.Zs.Instance().serviceFn("required_pubkey_set"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.string(t),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]})}pause(t,s){s?this.txb.moveCall({target:n.Zs.Instance().serviceFn("pause_with_passport"),arguments:[s,n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.bool(t),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:n.Zs.Instance().serviceFn("pause"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.bool(t),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]})}refund_withArb(t,s,e){n.Zs.IsValidObjects([t,s])||(0,o.f)(o.I.IsValidObjects,"refund_withArb.order or arb"),(0,a.MA)(e)||(0,o.f)(o.I.IsValidTokenType,"refund_withArb.arb_type");const i=this.txb.sharedObjectRef(n.Zs.CLOCK_OBJECT);this.txb.moveCall({target:n.Zs.Instance().serviceFn("refund_with_arb"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),n.Zs.TXB_OBJECT(this.txb,t),this.txb.object(s),this.txb.object(i)],typeArguments:[this.pay_token_type,e]})}refund(t,s,e){n.Zs.IsValidObjects([t])||(0,o.f)(o.I.IsValidObjects,"refund.order"),s&&!n.Zs.IsValidObjects([s])&&(0,o.f)(o.I.IsValidObjects,"refund.refund_guard"),e&&!s&&(0,o.f)(o.I.InvalidParam,"refund.passport need refund_guard");const i=this.txb.sharedObjectRef(n.Zs.CLOCK_OBJECT);e&&s?this.txb.moveCall({target:n.Zs.Instance().serviceFn("refund_with_passport"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),n.Zs.TXB_OBJECT(this.txb,t),this.txb.object(s),e,this.txb.object(i)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:n.Zs.Instance().serviceFn("refund"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),n.Zs.TXB_OBJECT(this.txb,t)],typeArguments:[this.pay_token_type]})}update_order_required_info(t,s){s.customer_pubkey&&0!==s.customer_info_crypt.length&&(n.Zs.IsValidObjects([t])||(0,o.f)(o.I.IsValidObjects,"update_order_required_info.order"),this.txb.moveCall({target:n.Zs.Instance().serviceFn("order_required_info_update"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),n.Zs.TXB_OBJECT(this.txb,t),this.txb.pure.string(s.customer_pubkey),this.txb.pure.string(s.customer_info_crypt)],typeArguments:[this.pay_token_type]}))}order(t,s,e,i,r,_){0===t.length&&(0,o.f)(o.I.InvalidParam,"order.buy_items empty");let p=!0,b=[];t.forEach((t=>{h.IsValidItemName(t.item)||(p=!1),(0,a.Ec)(t.max_price)||(p=!1),(0,a.Ec)(t.count)||(p=!1),b.includes(t.item)&&(p=!1),b.push(t.item)})),p||(0,o.f)(o.I.InvalidParam,"buy_items invalid");let c,u=[],m=[],d=[];t.forEach((t=>{u.push(t.item),m.push(BigInt(t.max_price)),d.push(BigInt(t.count))}));const T=this.txb.sharedObjectRef(n.Zs.CLOCK_OBJECT);c=_?e?this.txb.moveCall({target:n.Zs.Instance().serviceFn("dicount_buy_with_passport"),arguments:[_,n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.vector("string",u),this.txb.pure.vector("u64",m),this.txb.pure.vector("u64",d),n.Zs.TXB_OBJECT(this.txb,s),n.Zs.TXB_OBJECT(this.txb,e),this.txb.object(T)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:n.Zs.Instance().serviceFn("buy_with_passport"),arguments:[_,n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.vector("string",u),this.txb.pure.vector("u64",m),this.txb.pure.vector("u64",d),n.Zs.TXB_OBJECT(this.txb,s)],typeArguments:[this.pay_token_type]}):e?this.txb.moveCall({target:n.Zs.Instance().serviceFn("disoucnt_buy"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.vector("string",u),this.txb.pure.vector("u64",m),this.txb.pure.vector("u64",d),n.Zs.TXB_OBJECT(this.txb,s),n.Zs.TXB_OBJECT(this.txb,e),this.txb.object(T)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:n.Zs.Instance().serviceFn("buy"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.vector("string",u),this.txb.pure.vector("u64",m),this.txb.pure.vector("u64",d),n.Zs.TXB_OBJECT(this.txb,s)],typeArguments:[this.pay_token_type]}),r&&this.update_order_required_info(c,r);var g=void 0;return i&&(g=this.order_bind_machine(c,i)),{order:c,progress:g}}order_launch(t){var s;return t.progress&&(s=this.txb.moveCall({target:n.Zs.Instance().progressFn("create"),arguments:[n.Zs.TXB_OBJECT(this.txb,t.progress)]})),{order:this.txb.moveCall({target:n.Zs.Instance().serviceFn("order_create"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),n.Zs.TXB_OBJECT(this.txb,t.order)],typeArguments:[this.pay_token_type]}),progress:s}}buy(t,s,e,i,r,a){const n=this.order(t,s,e,i,r,a);return this.order_launch(n)}order_bind_machine(t,s){return n.Zs.IsValidObjects([t,s])||(0,o.f)(o.I.IsValidObjects,"order & machine"),this.txb.moveCall({target:n.Zs.Instance().serviceFn("order_bind_machine"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),n.Zs.TXB_OBJECT(this.txb,t),n.Zs.TXB_OBJECT(this.txb,s)],typeArguments:[this.pay_token_type]})}add_treasury(t,s,e){n.Zs.IsValidObjects([s])||(0,o.f)(o.I.IsValidObjects,"add_treasury.treasury"),(0,a.MA)(t)||(0,o.f)(o.I.IsValidTokenType,"add_treasury.treasury_token_type"),e?this.txb.moveCall({target:n.Zs.Instance().serviceFn("treasury_add_with_passport"),arguments:[e,n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.object(s),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type,t]}):this.txb.moveCall({target:n.Zs.Instance().serviceFn("treasury_add"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.object(s),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type,t]})}remove_treasury(t,s,e){(s||0!==t.length)&&(e?s?this.txb.moveCall({target:n.Zs.Instance().serviceFn("treasury_remove_all_with_passport"),arguments:[e,n.Zs.TXB_OBJECT(this.txb,this.object),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:n.Zs.Instance().serviceFn("treasury_remove_with_passport"),arguments:[e,n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.vector("address",t),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):s?this.txb.moveCall({target:n.Zs.Instance().serviceFn("treasury_remove_all"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:n.Zs.Instance().serviceFn("treasury_remove"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.vector("address",t),n.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}))}change_permission(t){n.Zs.IsValidObjects([t])||(0,o.f)(o.I.IsValidObjects),this.txb.moveCall({target:n.Zs.Instance().serviceFn("permission_set"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),n.Zs.TXB_OBJECT(this.txb,this.permission),n.Zs.TXB_OBJECT(this.txb,t)],typeArguments:[this.pay_token_type]}),this.permission=t}set_order_agent(t,s,e){h.SetOrderAgent(this.txb,this.pay_token_type,t,s,e)}change_order_payer(t,s,e){h.ChangeOrderPayer(this.txb,this.pay_token_type,t,s,e)}static MAX_DISCOUNT_COUNT_ONCE=200;static MAX_DISCOUNT_RECEIVER_COUNT=20;static MAX_GUARD_COUNT=16;static MAX_REPOSITORY_COUNT=32;static MAX_ITEM_NAME_LENGTH=256;static MAX_TREASURY_COUNT=8;static MAX_ORDER_AGENT_COUNT=8;static MAX_ORDER_ARBS_COUNT=8;static MAX_ARBITRATION_COUNT=8;static MAX_REQUIRES_COUNT=16;static MAX_PUBKEY_SIZE=3e3;static IsValidItemName(t){return!!t&&(new TextEncoder).encode(t).length<=h.MAX_ITEM_NAME_LENGTH}static parseObjectType=t=>(0,a.q5)(t,"service::Service<");static parseOrderObjectType=t=>(0,a.q5)(t,"order::Order<");static endpoint=(t,s,e)=>s||(t?t+"/sales/"+encodeURI(e):void 0);static DiscountObjects=(t,s)=>{n.Zs.Client().getOwnedObjects({owner:t,filter:{MoveModule:{module:"order",package:n.Zs.Instance().package("wowok")}},options:{showContent:!0,showType:!0}}).then((e=>{s(t,e.data.map((t=>t.data)))})).catch((t=>{console.log(t)}))};static SetOrderAgent=(t,s,e,i,r)=>{(0,a.MA)(s)||(0,o.f)(o.I.IsValidTokenType,"SetOrderAgent.order_token_type"),n.Zs.IsValidObjects([e])||(0,o.f)(o.I.IsValidObjects,"SetOrderAgent.order"),(0,a.ij)(i,a.jE)||(0,o.f)(o.I.IsValidArray,"SetOrderAgent.agent"),(0,a.SI)(i).length>h.MAX_ORDER_AGENT_COUNT&&(0,o.f)(o.I.Fail,"SetOrderAgent.agent count"),t.moveCall({target:n.Zs.Instance().orderFn("agent_set"),arguments:[t.object(e),t.pure.vector("address",(0,a.SI)(i))],typeArguments:[s]}),r&&t.moveCall({target:n.Zs.Instance().orderFn("order_ops_to_progress"),arguments:[t.object(e),t.object(r)],typeArguments:[s]})};static ChangeOrderPayer=(t,s,e,i,r)=>{(0,a.MA)(s)||(0,o.f)(o.I.IsValidTokenType,"ChangeOrderPayer.order_token_type"),n.Zs.IsValidObjects([e])||(0,o.f)(o.I.IsValidObjects,"ChangeOrderPayer.order"),(0,a.jE)(i)||(0,o.f)(o.I.IsValidAddress,"ChangeOrderPayer.new_addr"),t.moveCall({target:n.Zs.Instance().orderFn("payer_change"),arguments:[t.object(e),t.pure.address(i)],typeArguments:[s]}),r&&t.moveCall({target:n.Zs.Instance().orderFn("order_ops_to_progress"),arguments:[t.object(e),t.object(r)],typeArguments:[s]})}}},3810:(t,s,e)=>{e.d(s,{F:()=>h,K:()=>i});var i,r=e(9554),a=e(1609),n=e(5337),o=e(6601);!function(t){t.Like="like",t.Dislike="dislike",t.Launch="launch",t.Order="order",t.Payment="payment"}(i||(i={}));class h{static MAX_ADDRESS_COUNT_FOR_TAG=1e3;static MAX_TAG_COUNT_FOR_ADDRESS=64;object;txb;get_object(){return this.object}constructor(t){this.txb=t,this.object=""}static From(t,s){let e=new h(t);return e.object=r.Zs.TXB_OBJECT(t,s),e}launch(){return this.object||(0,n.f)(n.I.Fail,"launch object Invalid"),this.txb.moveCall({target:r.Zs.Instance().resourceFn("create"),arguments:[r.Zs.TXB_OBJECT(this.txb,this.object)]})}resolve_add(t,s){return s.find((t=>t===i.Like))&&o.w.From(this.txb).mark(this,t,i.Like),s.find((t=>t===i.Dislike))&&o.w.From(this.txb).mark(this,t,i.Dislike),s.filter((t=>t!==i.Like&&t!==i.Dislike&&(0,a.S7)(t)))}add(t,s,e){"string"!=typeof t||(0,a.jE)(t)||(0,n.f)(n.I.IsValidAddress,"Resource: add.address");var i=this.resolve_add(t,s);(e||0!==i.length)&&(e&&!(0,a.S7)(e)&&(0,n.f)(n.I.IsValidName,"Resource: add.name"),i.length>h.MAX_TAG_COUNT_FOR_ADDRESS&&(i=i.slice(0,h.MAX_TAG_COUNT_FOR_ADDRESS)),this.txb.moveCall({target:r.Zs.Instance().resourceFn("add"),arguments:[r.Zs.TXB_OBJECT(this.txb,this.object),"string"==typeof t?this.txb.pure.address(t):t,this.txb.pure.option("string",e),this.txb.pure.vector("string",i)]}))}remove(t,s){"string"!=typeof t||(0,a.jE)(t)||(0,n.f)(n.I.IsValidAddress,"Resource: remove.address"),this.txb.moveCall({target:r.Zs.Instance().resourceFn("remove"),arguments:[r.Zs.TXB_OBJECT(this.txb,this.object),"string"==typeof t?this.txb.pure.address(t):t,this.txb.pure.vector("string",s)]})}removeall(t){"string"!=typeof t||(0,a.jE)(t)||(0,n.f)(n.I.IsValidAddress,"Resource: removeall.address"),this.txb.moveCall({target:r.Zs.Instance().resourceFn("removeall"),arguments:[r.Zs.TXB_OBJECT(this.txb,this.object),"string"==typeof t?this.txb.pure.address(t):t]})}static TagData(t,s=!0){const e=[];return t.forEach((t=>{t.tags.forEach((s=>{const i=e.find((t=>t.tag===s));i?i.address.find((s=>s===t.address))||i.address.push(t.address):e.push({tag:s,address:[t.address]})}))})),s&&Object.keys(i).forEach((t=>{e.find((s=>s.tag===i[t]))||e.push({tag:i[t],address:[]})})),e}static Tags(t){const s=[];return t.address.forEach((e=>{const i=s.find((t=>t.address===e));i?i.tags.find((s=>s===t.tag))||i.tags.push(t.tag):s.push({address:e,tags:[t.tag]})})),s}}}}]);
@@ -0,0 +1 @@
1
+ (this.webpackChunkwowok_agent=this.webpackChunkwowok_agent||[]).push([[30],{2439:(e,n,i)=>{"use strict";i.d(n,{Se:()=>o});var t=i(5281),a=0,r=new Set;function o(){function e(e,n){var i,o,l=(0,t.qg)(e).definitions,u=new Set;for(var s of n||[])for(var c of s.definitions)c.kind!==t.b8.FRAGMENT_DEFINITION||u.has(c)||(l.push(c),u.add(c));return(i=l[0].kind===t.b8.FRAGMENT_DEFINITION)&&l[0].directives&&(l[0].directives=l[0].directives.filter((e=>"_unmask"!==e.name.value))),{kind:t.b8.DOCUMENT,definitions:l,get loc(){if(!o&&i){var t=e+function(e){try{a++;var n="";for(var i of e)if(!r.has(i)){r.add(i);var{loc:t}=i;t&&(n+=t.source.body)}return n}finally{0==--a&&r.clear()}}(n||[]);return{start:0,end:t.length,source:{body:t,name:"GraphQLTada",locationOffset:{line:1,column:1}}}}return o},set loc(e){o=e}}}return e.scalar=function(e,n){return n},e.persisted=function(e,n){return{kind:t.b8.DOCUMENT,definitions:n?n.definitions:[],documentId:e}},e}o()},6763:(e,n,i)=>{const t=i(5364);e.exports=t("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},9770:(e,n,i)=>{"use strict";function t(e){return 9===e||32===e}i.d(n,{y:()=>I});const a=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function r(e){return o[e.charCodeAt(0)]}const o=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"];function l(e,n){if(!Boolean(e))throw new Error(n)}const u=10,s=2;function c(e,n){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return function(e,n){if(null===e)return"null";if(n.includes(e))return"[Circular]";const i=[...n,e];if(function(e){return"function"==typeof e.toJSON}(e)){const n=e.toJSON();if(n!==e)return"string"==typeof n?n:c(n,i)}else if(Array.isArray(e))return function(e,n){if(0===e.length)return"[]";if(n.length>s)return"[Array]";const i=Math.min(u,e.length),t=e.length-i,a=[];for(let t=0;t<i;++t)a.push(c(e[t],n));return 1===t?a.push("... 1 more item"):t>1&&a.push(`... ${t} more items`),"["+a.join(", ")+"]"}(e,i);return function(e,n){const i=Object.entries(e);if(0===i.length)return"{}";if(n.length>s)return"["+function(e){const n=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===n&&"function"==typeof e.constructor){const n=e.constructor.name;if("string"==typeof n&&""!==n)return n}return n}(e)+"]";const t=i.map((([e,i])=>e+": "+c(i,n)));return"{ "+t.join(", ")+" }"}(e,i)}(e,n);default:return String(e)}}Symbol.toStringTag,Symbol.toStringTag;const f={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},d=new Set(Object.keys(f));function p(e){const n=null==e?void 0:e.kind;return"string"==typeof n&&d.has(n)}var v,E,T;!function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"}(v||(v={})),(T=E||(E={})).NAME="Name",T.DOCUMENT="Document",T.OPERATION_DEFINITION="OperationDefinition",T.VARIABLE_DEFINITION="VariableDefinition",T.SELECTION_SET="SelectionSet",T.FIELD="Field",T.ARGUMENT="Argument",T.FRAGMENT_SPREAD="FragmentSpread",T.INLINE_FRAGMENT="InlineFragment",T.FRAGMENT_DEFINITION="FragmentDefinition",T.VARIABLE="Variable",T.INT="IntValue",T.FLOAT="FloatValue",T.STRING="StringValue",T.BOOLEAN="BooleanValue",T.NULL="NullValue",T.ENUM="EnumValue",T.LIST="ListValue",T.OBJECT="ObjectValue",T.OBJECT_FIELD="ObjectField",T.DIRECTIVE="Directive",T.NAMED_TYPE="NamedType",T.LIST_TYPE="ListType",T.NON_NULL_TYPE="NonNullType",T.SCHEMA_DEFINITION="SchemaDefinition",T.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",T.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",T.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",T.FIELD_DEFINITION="FieldDefinition",T.INPUT_VALUE_DEFINITION="InputValueDefinition",T.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",T.UNION_TYPE_DEFINITION="UnionTypeDefinition",T.ENUM_TYPE_DEFINITION="EnumTypeDefinition",T.ENUM_VALUE_DEFINITION="EnumValueDefinition",T.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",T.DIRECTIVE_DEFINITION="DirectiveDefinition",T.SCHEMA_EXTENSION="SchemaExtension",T.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",T.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",T.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",T.UNION_TYPE_EXTENSION="UnionTypeExtension",T.ENUM_TYPE_EXTENSION="EnumTypeExtension",T.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension";const m=Object.freeze({});function y(e,n){const i=e[n];return"object"==typeof i?i:"function"==typeof i?{enter:i,leave:void 0}:{enter:e.enter,leave:e.leave}}function I(e){return function(e,n,i=f){const t=new Map;for(const e of Object.values(E))t.set(e,y(n,e));let a,r,o,u=Array.isArray(e),s=[e],d=-1,v=[],T=e;const I=[],N=[];do{d++;const e=d===s.length,f=e&&0!==v.length;if(e){if(r=0===N.length?void 0:I[I.length-1],T=o,o=N.pop(),f)if(u){T=T.slice();let e=0;for(const[n,i]of v){const t=n-e;null===i?(T.splice(t,1),e++):T[t]=i}}else{T=Object.defineProperties({},Object.getOwnPropertyDescriptors(T));for(const[e,n]of v)T[e]=n}d=a.index,s=a.keys,v=a.edits,u=a.inArray,a=a.prev}else if(o){if(r=u?d:s[d],T=o[r],null==T)continue;I.push(r)}let E;if(!Array.isArray(T)){var D,O;p(T)||l(!1,`Invalid AST Node: ${g=T,c(g,[])}.`);const i=e?null===(D=t.get(T.kind))||void 0===D?void 0:D.leave:null===(O=t.get(T.kind))||void 0===O?void 0:O.enter;if(E=null==i?void 0:i.call(n,T,r,o,I,N),E===m)break;if(!1===E){if(!e){I.pop();continue}}else if(void 0!==E&&(v.push([r,E]),!e)){if(!p(E)){I.pop();continue}T=E}}var S;void 0===E&&f&&v.push([r,T]),e?I.pop():(a={inArray:u,index:d,keys:s,edits:v,prev:a},u=Array.isArray(T),s=u?T:null!==(S=i[T.kind])&&void 0!==S?S:[],d=-1,v=[],o&&N.push(o),o=T)}while(void 0!==a);var g;return 0!==v.length?v[v.length-1][1]:e}(e,N)}const N={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>D(e.definitions,"\n\n")},OperationDefinition:{leave(e){const n=S("(",D(e.variableDefinitions,", "),")"),i=D([e.operation,D([e.name,n]),D(e.directives," ")]," ");return("query"===i?"":i+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:n,defaultValue:i,directives:t})=>e+": "+n+S(" = ",i)+S(" ",D(t," "))},SelectionSet:{leave:({selections:e})=>O(e)},Field:{leave({alias:e,name:n,arguments:i,directives:t,selectionSet:a}){const r=S("",e,": ")+n;let o=r+S("(",D(i,", "),")");return o.length>80&&(o=r+S("(\n",g(D(i,"\n")),"\n)")),D([o,D(t," "),a]," ")}},Argument:{leave:({name:e,value:n})=>e+": "+n},FragmentSpread:{leave:({name:e,directives:n})=>"..."+e+S(" ",D(n," "))},InlineFragment:{leave:({typeCondition:e,directives:n,selectionSet:i})=>D(["...",S("on ",e),D(n," "),i]," ")},FragmentDefinition:{leave:({name:e,typeCondition:n,variableDefinitions:i,directives:t,selectionSet:a})=>`fragment ${e}${S("(",D(i,", "),")")} on ${n} ${S("",D(t," ")," ")}`+a},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:n})=>n?function(e){const n=e.replace(/"""/g,'\\"""'),i=n.split(/\r\n|[\n\r]/g),a=1===i.length,r=i.length>1&&i.slice(1).every((e=>0===e.length||t(e.charCodeAt(0)))),o=n.endsWith('\\"""'),l=e.endsWith('"')&&!o,u=e.endsWith("\\"),s=l||u,c=!a||e.length>70||s||r||o;let f="";const d=a&&t(e.charCodeAt(0));return(c&&!d||r)&&(f+="\n"),f+=n,(c||s)&&(f+="\n"),'"""'+f+'"""'}(e):`"${e.replace(a,r)}"`},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+D(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+D(e,", ")+"}"},ObjectField:{leave:({name:e,value:n})=>e+": "+n},Directive:{leave:({name:e,arguments:n})=>"@"+e+S("(",D(n,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:n,operationTypes:i})=>S("",e,"\n")+D(["schema",D(n," "),O(i)]," ")},OperationTypeDefinition:{leave:({operation:e,type:n})=>e+": "+n},ScalarTypeDefinition:{leave:({description:e,name:n,directives:i})=>S("",e,"\n")+D(["scalar",n,D(i," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:n,interfaces:i,directives:t,fields:a})=>S("",e,"\n")+D(["type",n,S("implements ",D(i," & ")),D(t," "),O(a)]," ")},FieldDefinition:{leave:({description:e,name:n,arguments:i,type:t,directives:a})=>S("",e,"\n")+n+(b(i)?S("(\n",g(D(i,"\n")),"\n)"):S("(",D(i,", "),")"))+": "+t+S(" ",D(a," "))},InputValueDefinition:{leave:({description:e,name:n,type:i,defaultValue:t,directives:a})=>S("",e,"\n")+D([n+": "+i,S("= ",t),D(a," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:n,interfaces:i,directives:t,fields:a})=>S("",e,"\n")+D(["interface",n,S("implements ",D(i," & ")),D(t," "),O(a)]," ")},UnionTypeDefinition:{leave:({description:e,name:n,directives:i,types:t})=>S("",e,"\n")+D(["union",n,D(i," "),S("= ",D(t," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:n,directives:i,values:t})=>S("",e,"\n")+D(["enum",n,D(i," "),O(t)]," ")},EnumValueDefinition:{leave:({description:e,name:n,directives:i})=>S("",e,"\n")+D([n,D(i," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:n,directives:i,fields:t})=>S("",e,"\n")+D(["input",n,D(i," "),O(t)]," ")},DirectiveDefinition:{leave:({description:e,name:n,arguments:i,repeatable:t,locations:a})=>S("",e,"\n")+"directive @"+n+(b(i)?S("(\n",g(D(i,"\n")),"\n)"):S("(",D(i,", "),")"))+(t?" repeatable":"")+" on "+D(a," | ")},SchemaExtension:{leave:({directives:e,operationTypes:n})=>D(["extend schema",D(e," "),O(n)]," ")},ScalarTypeExtension:{leave:({name:e,directives:n})=>D(["extend scalar",e,D(n," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:n,directives:i,fields:t})=>D(["extend type",e,S("implements ",D(n," & ")),D(i," "),O(t)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:n,directives:i,fields:t})=>D(["extend interface",e,S("implements ",D(n," & ")),D(i," "),O(t)]," ")},UnionTypeExtension:{leave:({name:e,directives:n,types:i})=>D(["extend union",e,D(n," "),S("= ",D(i," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:n,values:i})=>D(["extend enum",e,D(n," "),O(i)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:n,fields:i})=>D(["extend input",e,D(n," "),O(i)]," ")}};function D(e,n=""){var i;return null!==(i=null==e?void 0:e.filter((e=>e)).join(n))&&void 0!==i?i:""}function O(e){return S("{\n",g(D(e,"\n")),"\n}")}function S(e,n,i=""){return null!=n&&""!==n?e+n+i:""}function g(e){return S(" ",e.replace(/\n/g,"\n "))}function b(e){var n;return null!==(n=null==e?void 0:e.some((e=>e.includes("\n"))))&&void 0!==n&&n}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(this.webpackChunkwowok_agent=this.webpackChunkwowok_agent||[]).push([[412],{621:(e,t,r)=>{r.d(t,{ju:()=>z,L2:()=>U,Jk:()=>A,u0:()=>B,d_:()=>v,HD:()=>V,$b:()=>$,jo:()=>x});var i=r(9835),n=r(9440),a=r(4329),o=r(8964);class s{constructor(e){this.bytePosition=0,this.dataView=new DataView(e.buffer)}shift(e){return this.bytePosition+=e,this}read8(){let e=this.dataView.getUint8(this.bytePosition);return this.shift(1),e}read16(){let e=this.dataView.getUint16(this.bytePosition,!0);return this.shift(2),e}read32(){let e=this.dataView.getUint32(this.bytePosition,!0);return this.shift(4),e}read64(){let e=this.read32(),t=this.read32().toString(16)+e.toString(16).padStart(8,"0");return BigInt("0x"+t).toString(10)}read128(){let e=BigInt(this.read64()),t=BigInt(this.read64()).toString(16)+e.toString(16).padStart(16,"0");return BigInt("0x"+t).toString(10)}read256(){let e=BigInt(this.read128()),t=BigInt(this.read128()).toString(16)+e.toString(16).padStart(32,"0");return BigInt("0x"+t).toString(10)}readBytes(e){let t=this.bytePosition+this.dataView.byteOffset,r=new Uint8Array(this.dataView.buffer,t,e);return this.shift(e),r}readULEB(){let e=this.bytePosition+this.dataView.byteOffset,t=new Uint8Array(this.dataView.buffer,e),{value:r,length:i}=(0,o.j)(t);return this.shift(i),r}readVec(e){let t=this.readULEB(),r=[];for(let i=0;i<t;i++)r.push(e(this,i,t));return r}}var h=r(7573);class l{constructor({initialSize:e=1024,maxSize:t=1/0,allocateSize:r=1024}={}){this.bytePosition=0,this.size=e,this.maxSize=t,this.allocateSize=r,this.dataView=new DataView(new ArrayBuffer(e))}ensureSizeOrGrow(e){const t=this.bytePosition+e;if(t>this.size){const e=Math.min(this.maxSize,this.size+this.allocateSize);if(t>e)throw new Error(`Attempting to serialize to BCS, but buffer does not have enough size. Allocated size: ${this.size}, Max size: ${this.maxSize}, Required size: ${t}`);this.size=e;const r=new ArrayBuffer(this.size);new Uint8Array(r).set(new Uint8Array(this.dataView.buffer)),this.dataView=new DataView(r)}}shift(e){return this.bytePosition+=e,this}write8(e){return this.ensureSizeOrGrow(1),this.dataView.setUint8(this.bytePosition,Number(e)),this.shift(1)}write16(e){return this.ensureSizeOrGrow(2),this.dataView.setUint16(this.bytePosition,Number(e),!0),this.shift(2)}write32(e){return this.ensureSizeOrGrow(4),this.dataView.setUint32(this.bytePosition,Number(e),!0),this.shift(4)}write64(e){return u(BigInt(e),8).forEach((e=>this.write8(e))),this}write128(e){return u(BigInt(e),16).forEach((e=>this.write8(e))),this}write256(e){return u(BigInt(e),32).forEach((e=>this.write8(e))),this}writeULEB(e){return(0,o.h)(e).forEach((e=>this.write8(e))),this}writeVec(e,t){return this.writeULEB(e.length),Array.from(e).forEach(((r,i)=>t(this,r,i,e.length))),this}*[Symbol.iterator](){for(let e=0;e<this.bytePosition;e++)yield this.dataView.getUint8(e);return this.toBytes()}toBytes(){return new Uint8Array(this.dataView.buffer.slice(0,this.bytePosition))}toString(e){return(0,h.U6)(this.toBytes(),e)}}function u(e,t){let r=new Uint8Array(t),i=0;for(;e>0;)r[i]=Number(e%BigInt(256)),e/=BigInt(256),i+=1;return r}var d,f,w,c,y=e=>{throw TypeError(e)},p=(e,t,r)=>t.has(e)||y("Cannot "+r),g=(e,t,r)=>(p(e,t,"read from private field"),r?r.call(e):t.get(e)),m=(e,t,r)=>t.has(e)?y("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),b=(e,t,r,i)=>(p(e,t,"write to private field"),i?i.call(e,r):t.set(e,r),r);d=new WeakMap,f=new WeakMap;let z=class e{constructor(e){m(this,d),m(this,f),this.name=e.name,this.read=e.read,this.serializedSize=e.serializedSize??(()=>null),b(this,d,e.write),b(this,f,e.serialize??((e,t)=>{const r=new l({initialSize:this.serializedSize(e)??void 0,...t});return g(this,d).call(this,e,r),r.toBytes()})),this.validate=e.validate??(()=>{})}write(e,t){this.validate(e),g(this,d).call(this,e,t)}serialize(e,t){return this.validate(e),new S(this,g(this,f).call(this,e,t))}parse(e){const t=new s(e);return this.read(t)}fromHex(e){return this.parse((0,a.i)(e))}fromBase58(e){return this.parse((0,i.Q)(e))}fromBase64(e){return this.parse((0,n.Z)(e))}transform({name:t,input:r,output:i,validate:n}){return new e({name:t??this.name,read:e=>i(this.read(e)),write:(e,t)=>g(this,d).call(this,r(e),t),serializedSize:e=>this.serializedSize(r(e)),serialize:(e,t)=>g(this,f).call(this,r(e),t),validate:e=>{n?.(e),this.validate(r(e))}})}};const E=Symbol.for("@mysten/serialized-bcs");function v(e){return!!e&&"object"==typeof e&&!0===e[E]}class S{constructor(e,t){m(this,w),m(this,c),b(this,w,e),b(this,c,t)}get[E](){return!0}toBytes(){return g(this,c)}toHex(){return(0,a.J)(g(this,c))}toBase64(){return(0,n.o)(g(this,c))}toBase58(){return(0,i.x)(g(this,c))}parse(){return g(this,w).parse(g(this,c))}}function B({size:e,...t}){return new z({...t,serializedSize:()=>e})}function x({readMethod:e,writeMethod:t,...r}){return B({...r,read:t=>t[e](),write:(e,r)=>r[t](e),validate:e=>{if(e<0||e>r.maxValue)throw new TypeError(`Invalid ${r.name} value: ${e}. Expected value in range 0-${r.maxValue}`);r.validate?.(e)}})}function U({readMethod:e,writeMethod:t,...r}){return B({...r,read:t=>t[e](),write:(e,r)=>r[t](BigInt(e)),validate:e=>{const t=BigInt(e);if(t<0||t>r.maxValue)throw new TypeError(`Invalid ${r.name} value: ${t}. Expected value in range 0-${r.maxValue}`);r.validate?.(t)}})}function A({serialize:e,...t}){const r=new z({...t,serialize:e,write:(e,t)=>{for(const i of r.serialize(e).toBytes())t.write8(i)}});return r}function $({toBytes:e,fromBytes:t,...r}){return new z({...r,read:e=>{const r=e.readULEB(),i=e.readBytes(r);return t(i)},write:(t,r)=>{const i=e(t);r.writeULEB(i.length);for(let e=0;e<i.length;e++)r.write8(i[e])},serialize:t=>{const r=e(t),i=(0,o.h)(r.length),n=new Uint8Array(i.length+r.length);return n.set(i,0),n.set(r,i.length),n},validate:e=>{if("string"!=typeof e)throw new TypeError(`Invalid ${r.name} value: ${e}. Expected string`);r.validate?.(e)}})}function V(e){let t=null;function r(){return t||(t=e()),t}return new z({name:"lazy",read:e=>r().read(e),serializedSize:e=>r().serializedSize(e),write:(e,t)=>r().write(e,t),serialize:(e,t)=>r().serialize(e,t).toBytes()})}w=new WeakMap,c=new WeakMap},4329:(e,t,r)=>{function i(e){const t=e.startsWith("0x")?e.slice(2):e,r=t.length%2==0?t:`0${t}}`,i=r.match(/.{2}/g)?.map((e=>parseInt(e,16)))??[];return Uint8Array.from(i)}function n(e){return e.reduce(((e,t)=>e+t.toString(16).padStart(2,"0")),"")}r.d(t,{J:()=>n,i:()=>i})},5412:(e,t,r)=>{r.d(t,{j:()=>a});var i=r(621),n=r(8964);const a={u8:e=>(0,i.jo)({name:"u8",readMethod:"read8",writeMethod:"write8",size:1,maxValue:255,...e}),u16:e=>(0,i.jo)({name:"u16",readMethod:"read16",writeMethod:"write16",size:2,maxValue:65535,...e}),u32:e=>(0,i.jo)({name:"u32",readMethod:"read32",writeMethod:"write32",size:4,maxValue:2**32-1,...e}),u64:e=>(0,i.L2)({name:"u64",readMethod:"read64",writeMethod:"write64",size:8,maxValue:2n**64n-1n,...e}),u128:e=>(0,i.L2)({name:"u128",readMethod:"read128",writeMethod:"write128",size:16,maxValue:2n**128n-1n,...e}),u256:e=>(0,i.L2)({name:"u256",readMethod:"read256",writeMethod:"write256",size:32,maxValue:2n**256n-1n,...e}),bool:e=>(0,i.u0)({name:"bool",size:1,read:e=>1===e.read8(),write:(e,t)=>t.write8(e?1:0),...e,validate:t=>{if(e?.validate?.(t),"boolean"!=typeof t)throw new TypeError("Expected boolean, found "+typeof t)}}),uleb128:e=>(0,i.Jk)({name:"uleb128",read:e=>e.readULEB(),serialize:e=>Uint8Array.from((0,n.h)(e)),...e}),bytes:(e,t)=>(0,i.u0)({name:`bytes[${e}]`,size:e,read:t=>t.readBytes(e),write:(t,r)=>{for(let i=0;i<e;i++)r.write8(t[i]??0)},...t,validate:r=>{if(t?.validate?.(r),!r||"object"!=typeof r||!("length"in r))throw new TypeError("Expected array, found "+typeof r);if(r.length!==e)throw new TypeError(`Expected array of length ${e}, found ${r.length}`)}}),string:e=>(0,i.$b)({name:"string",toBytes:e=>(new TextEncoder).encode(e),fromBytes:e=>(new TextDecoder).decode(e),...e}),fixedArray:(e,t,r)=>new i.ju({name:`${t.name}[${e}]`,read:r=>{const i=new Array(e);for(let n=0;n<e;n++)i[n]=t.read(r);return i},write:(e,r)=>{for(const i of e)t.write(i,r)},...r,validate:t=>{if(r?.validate?.(t),!t||"object"!=typeof t||!("length"in t))throw new TypeError("Expected array, found "+typeof t);if(t.length!==e)throw new TypeError(`Expected array of length ${e}, found ${t.length}`)}}),option:e=>a.enum(`Option<${e.name}>`,{None:null,Some:e}).transform({input:e=>null==e?{None:!0}:{Some:e},output:e=>"Some"===e.$kind?e.Some:null}),vector:(e,t)=>new i.ju({name:`vector<${e.name}>`,read:t=>{const r=t.readULEB(),i=new Array(r);for(let n=0;n<r;n++)i[n]=e.read(t);return i},write:(t,r)=>{r.writeULEB(t.length);for(const i of t)e.write(i,r)},...t,validate:e=>{if(t?.validate?.(e),!e||"object"!=typeof e||!("length"in e))throw new TypeError("Expected array, found "+typeof e)}}),tuple:(e,t)=>new i.ju({name:`(${e.map((e=>e.name)).join(", ")})`,serializedSize:t=>{let r=0;for(let i=0;i<e.length;i++){const n=e[i].serializedSize(t[i]);if(null==n)return null;r+=n}return r},read:t=>{const r=[];for(const i of e)r.push(i.read(t));return r},write:(t,r)=>{for(let i=0;i<e.length;i++)e[i].write(t[i],r)},...t,validate:r=>{if(t?.validate?.(r),!Array.isArray(r))throw new TypeError("Expected array, found "+typeof r);if(r.length!==e.length)throw new TypeError(`Expected array of length ${e.length}, found ${r.length}`)}}),struct(e,t,r){const n=Object.entries(t);return new i.ju({name:e,serializedSize:e=>{let t=0;for(const[r,i]of n){const n=i.serializedSize(e[r]);if(null==n)return null;t+=n}return t},read:e=>{const t={};for(const[r,i]of n)t[r]=i.read(e);return t},write:(e,t)=>{for(const[r,i]of n)i.write(e[r],t)},...r,validate:e=>{if(r?.validate?.(e),"object"!=typeof e||null==e)throw new TypeError("Expected object, found "+typeof e)}})},enum(e,t,r){const n=Object.entries(t);return new i.ju({name:e,read:t=>{const r=t.readULEB(),i=n[r];if(!i)throw new TypeError(`Unknown value ${r} for enum ${e}`);const[a,o]=i;return{[a]:o?.read(t)??!0,$kind:a}},write:(e,r)=>{const[i,a]=Object.entries(e).filter((([e])=>Object.hasOwn(t,e)))[0];for(let e=0;e<n.length;e++){const[t,o]=n[e];if(t===i)return r.writeULEB(e),void o?.write(a,r)}},...r,validate:i=>{if(r?.validate?.(i),"object"!=typeof i||null==i)throw new TypeError("Expected object, found "+typeof i);const n=Object.keys(i).filter((e=>void 0!==i[e]&&Object.hasOwn(t,e)));if(1!==n.length)throw new TypeError(`Expected object with one key, but found ${n.length} for type ${e}}`);const[a]=n;if(!Object.hasOwn(t,a))throw new TypeError(`Invalid enum variant ${a}`)}})},map:(e,t)=>a.vector(a.tuple([e,t])).transform({name:`Map<${e.name}, ${t.name}>`,input:e=>[...e.entries()],output:e=>{const t=new Map;for(const[r,i]of e)t.set(r,i);return t}}),lazy:e=>(0,i.HD)(e)}},7573:(e,t,r)=>{r.d(t,{U6:()=>o,sT:()=>s});var i=r(9835),n=r(9440),a=r(4329);function o(e,t){switch(t){case"base58":return(0,i.x)(e);case"base64":return(0,n.o)(e);case"hex":return(0,a.J)(e);default:throw new Error("Unsupported encoding, supported values are: base64, hex")}}function s(e,t=["<",">"]){const[r,i]=t,n=[];let a="",o=0;for(let t=0;t<e.length;t++){const s=e[t];s===r&&o++,s===i&&o--,0!==o||","!==s?a+=s:(n.push(a.trim()),a="")}return n.push(a.trim()),n}},8964:(e,t,r)=>{function i(e){let t=[],r=0;if(0===e)return[0];for(;e>0;)t[r]=127&e,(e>>=7)&&(t[r]|=128),r+=1;return t}function n(e){let t=0,r=0,i=0;for(;;){let n=e[i];if(i+=1,t|=(127&n)<<r,!(128&n))break;r+=7}return{value:t,length:i}}r.d(t,{h:()=>i,j:()=>n})},9440:(e,t,r)=>{function i(e){return Uint8Array.from(atob(e),(e=>e.charCodeAt(0)))}r.d(t,{Z:()=>i,o:()=>a});const n=8192;function a(e){if(e.length<n)return btoa(String.fromCharCode(...e));let t="";for(var r=0;r<e.length;r+=n){const i=e.slice(r,r+n);t+=String.fromCharCode(...i)}return btoa(t)}},9835:(e,t,r)=>{r.d(t,{Q:()=>a,x:()=>n});const i=function(e){if(e.length>=255)throw new TypeError("Alphabet too long");const t=new Uint8Array(256);for(let e=0;e<t.length;e++)t[e]=255;for(let r=0;r<e.length;r++){const i=e.charAt(r),n=i.charCodeAt(0);if(255!==t[n])throw new TypeError(i+" is ambiguous");t[n]=r}const r=e.length,i=e.charAt(0),n=Math.log(r)/Math.log(256),a=Math.log(256)/Math.log(r);function o(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;let a=0,o=0,s=0;for(;e[a]===i;)o++,a++;const h=(e.length-a)*n+1>>>0,l=new Uint8Array(h);for(;a<e.length;){const i=e.charCodeAt(a);if(i>255)return;let n=t[i];if(255===n)return;let o=0;for(let e=h-1;(0!==n||o<s)&&-1!==e;e--,o++)n+=r*l[e]>>>0,l[e]=n%256>>>0,n=n/256>>>0;if(0!==n)throw new Error("Non-zero carry");s=o,a++}let u=h-s;for(;u!==h&&0===l[u];)u++;const d=new Uint8Array(o+(h-u));let f=o;for(;u!==h;)d[f++]=l[u++];return d}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";let n=0,o=0,s=0;const h=t.length;for(;s!==h&&0===t[s];)s++,n++;const l=(h-s)*a+1>>>0,u=new Uint8Array(l);for(;s!==h;){let e=t[s],i=0;for(let t=l-1;(0!==e||i<o)&&-1!==t;t--,i++)e+=256*u[t]>>>0,u[t]=e%r>>>0,e=e/r>>>0;if(0!==e)throw new Error("Non-zero carry");o=i,s++}let d=l-o;for(;d!==l&&0===u[d];)d++;let f=i.repeat(n);for(;d<l;++d)f+=e.charAt(u[d]);return f},decodeUnsafe:o,decode:function(e){const t=o(e);if(t)return t;throw new Error("Non-base"+r+" character")}}}("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),n=e=>i.encode(e),a=e=>i.decode(e)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(this.webpackChunkwowok_agent=this.webpackChunkwowok_agent||[]).push([[485],{4313:(t,s,e)=>{e.d(s,{w:()=>n});var i=e(1609),r=e(9554),a=e(5337);class n{pay_token_type;permission;object;txb;get_pay_type(){return this.pay_token_type}get_object(){return this.object}constructor(t,s,e){this.pay_token_type=s,this.txb=t,this.permission=e,this.object=""}static From(t,s,e,i){let a=new n(t,s,e);return a.object=r.Zs.TXB_OBJECT(t,i),a}static New(t,s,e,o,b,h,p){r.Zs.IsValidObjects([e,h])||(0,a.f)(a.I.IsValidObjects),(0,i.MA)(s)||(0,a.f)(a.I.IsValidTokenType,"New.token_type"),(0,i.yW)(o)||(0,a.f)(a.I.IsValidDesription),(0,i.Ec)(b)||(0,a.f)(a.I.IsValidU64,"New.fee");let _=s,d=new n(t,_,e);return d.object=p?t.moveCall({target:r.Zs.Instance().arbitrationFn("new_with_passport"),arguments:[p,t.pure.string(o),t.pure.u64(b),t.object(h),r.Zs.TXB_OBJECT(t,e)],typeArguments:[_]}):t.moveCall({target:r.Zs.Instance().arbitrationFn("new"),arguments:[t.pure.string(o),t.pure.u64(b),t.object(h),r.Zs.TXB_OBJECT(t,e)],typeArguments:[_]}),d}launch(){return this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("create"),arguments:[r.Zs.TXB_OBJECT(this.txb,this.object)],typeArguments:[this.pay_token_type]})}set_description(t,s){(0,i.yW)(t)||(0,a.f)(a.I.IsValidDesription,"set_description.description"),s?this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("description_set_with_passport"),arguments:[s,r.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.string(t),r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("description_set"),arguments:[r.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.string(t),r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]})}set_fee(t,s){(0,i.Ec)(t)||(0,a.f)(a.I.IsValidU64,"set_fee.fee"),s?this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("fee_set_with_passport"),arguments:[s,r.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.u64(t),r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("fee_set"),arguments:[r.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.u64(t),r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]})}set_endpoint(t,s){t&&!(0,i.Eh)(t)&&(0,a.f)(a.I.IsValidEndpoint,"set_endpoint.endpoint"),s?t?this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("endpoint_set_with_passport"),arguments:[s,r.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.string(t),r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("endpoint_none_with_passport"),arguments:[s,r.Zs.TXB_OBJECT(this.txb,this.object),r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):t?this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("endpoint_set"),arguments:[r.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.string(t),r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("endpoint_none"),arguments:[r.Zs.TXB_OBJECT(this.txb,this.object),r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]})}add_voting_guard(t,s){0!==t.length&&((0,i.ij)(t,(t=>r.Zs.IsValidObjects([t.guard])&&(0,i.Ec)(t.voting_weight)))||(0,a.f)(a.I.IsValidArray,"add_voting_guard.guard"),s?t.forEach((t=>{this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("voting_guard_add_with_passport"),arguments:[s,r.Zs.TXB_OBJECT(this.txb,this.object),this.txb.object(t.guard),this.txb.pure.u64(t.voting_weight),r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]})})):t.forEach((t=>{this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("voting_guard_add"),arguments:[r.Zs.TXB_OBJECT(this.txb,this.object),this.txb.object(t.guard),this.txb.pure.u64(t.voting_weight),r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]})})))}remove_voting_guard(t,s,e){(s||0!==t.length)&&((0,i.ij)(t,i.jE)||(0,a.f)(a.I.IsValidArray,"remove_voting_guard.guard"),e?s?this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("voting_guard_removeall_with_passport"),arguments:[e,r.Zs.TXB_OBJECT(this.txb,this.object),r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("voting_guard_remove_with_passport"),arguments:[e,r.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.vector("address",t),r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):s?this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("voting_guard_removeall"),arguments:[r.Zs.TXB_OBJECT(this.txb,this.object),r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("voting_guard_remove"),arguments:[r.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.vector("address",t),r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}))}set_guard(t,s){t&&!(0,i.jE)(t)&&(0,a.f)(a.I.IsValidAddress,"set_guard.apply_guard"),s?t?this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("usage_guard_set_with_passport"),arguments:[s,r.Zs.TXB_OBJECT(this.txb,this.object),this.txb.object(t),r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("usage_guard_none_with_passport"),arguments:[s,r.Zs.TXB_OBJECT(this.txb,this.object),r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):t?this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("usage_guard_set"),arguments:[r.Zs.TXB_OBJECT(this.txb,this.object),this.txb.object(t),r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("usage_guard_none"),arguments:[r.Zs.TXB_OBJECT(this.txb,this.object),r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]})}pause(t,s){s?this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("pause_with_passport"),arguments:[s,r.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.bool(t),r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("pause"),arguments:[r.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.bool(t),r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]})}vote(t,s){t.voting_guard&&!r.Zs.IsValidObjects([t.voting_guard])&&(0,a.f)(a.I.IsValidObjects,"vote.param.voting_guard"),(0,i.ij)(t.agrees,(t=>(0,i.Ec)(t)&&t<n.MAX_PROPOSITION_COUNT))||(0,a.f)(a.I.IsValidArray,"vote.param.agrees"),r.Zs.IsValidObjects([t.arb])||(0,a.f)(a.I.IsValidObjects,"vote.param.arb");const e=this.txb.sharedObjectRef(r.Zs.CLOCK_OBJECT);s?t.voting_guard?this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("vote_with_passport"),arguments:[s,this.txb.object(t.voting_guard),r.Zs.TXB_OBJECT(this.txb,this.object),this.txb.object(t.arb),this.txb.pure.vector("u8",t.agrees),this.txb.object(e),r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("vote2_with_passport"),arguments:[s,r.Zs.TXB_OBJECT(this.txb,this.object),this.txb.object(t.arb),this.txb.pure.vector("u8",t.agrees),this.txb.object(e),r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("vote"),arguments:[r.Zs.TXB_OBJECT(this.txb,this.object),this.txb.object(t.arb),this.txb.pure.vector("u8",t.agrees),this.txb.object(e),r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]})}arbitration(t,s){(0,i.yW)(t.feedback)||(0,a.f)(a.I.IsValidDesription,"arbitration.param.feedback"),r.Zs.IsValidObjects([t.arb])||(0,a.f)(a.I.IsValidObjects,"arbitration.param.arb"),t.indemnity&&!(0,i.Ec)(t.indemnity)&&(0,a.f)(a.I.IsValidU64,"arbitration.param.indemnity");let e=this.txb.pure.option("u64",t.indemnity?t.indemnity:void 0);s?this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("arbitration_with_passport"),arguments:[s,r.Zs.TXB_OBJECT(this.txb,this.object),this.txb.object(t.arb),this.txb.pure.string(t.feedback),e,r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("arbitration"),arguments:[r.Zs.TXB_OBJECT(this.txb,this.object),this.txb.object(t.arb),this.txb.pure.string(t.feedback),e,r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]})}withdraw_fee(t,s,e){r.Zs.IsValidObjects([t,s.treasury])||(0,a.f)(a.I.IsValidObjects,"withdraw_fee.arb or treasury"),s?.for_guard&&!r.Zs.IsValidObjects([s.for_guard])&&(0,a.f)(a.I.IsValidObjects,"withdraw_fee.param.for_guard"),s?.for_object&&!(0,i.jE)(s.for_object)&&(0,a.f)(a.I.IsValidAddress,"withdraw_fee.param.for_object"),(0,i.yW)(s.remark)||(0,a.f)(a.I.IsValidDesription,"withdraw_fee.param.remark"),(0,i.Ec)(s.index)||(0,a.f)(a.I.IsValidU64,"withdraw_fee.param.index");const n=this.txb.pure.option("address",s.for_object?s.for_object:void 0),o=this.txb.sharedObjectRef(r.Zs.CLOCK_OBJECT);return e?s.for_guard?this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("withdraw_forGuard_with_passport"),arguments:[e,r.Zs.TXB_OBJECT(this.txb,this.object),this.txb.object(t),this.txb.object(s.treasury),n,this.txb.object(s.for_guard),this.txb.pure.u64(s.index),this.txb.pure.string(s.remark),this.txb.object(o),r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("withdraw_with_passport"),arguments:[e,r.Zs.TXB_OBJECT(this.txb,this.object),this.txb.object(t),this.txb.object(s.treasury),n,this.txb.pure.u64(s.index),this.txb.pure.string(s.remark),this.txb.object(o),r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):s.for_guard?this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("withdraw_forGuard"),arguments:[r.Zs.TXB_OBJECT(this.txb,this.object),this.txb.object(t),this.txb.object(s.treasury),n,this.txb.object(s.for_guard),this.txb.pure.u64(s.index),this.txb.pure.string(s.remark),this.txb.object(o),r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("withdraw"),arguments:[r.Zs.TXB_OBJECT(this.txb,this.object),this.txb.object(t),this.txb.object(s.treasury),n,this.txb.pure.u64(s.index),this.txb.pure.string(s.remark),this.txb.object(o),r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]})}set_withdrawTreasury(t,s){r.Zs.IsValidObjects([t])||(0,a.f)(a.I.IsValidObjects,"set_withdrawTreasury.treasury"),s?this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("withdraw_treasury_set_with_passport"),arguments:[s,r.Zs.TXB_OBJECT(this.txb,this.object),this.txb.object(t),r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("withdraw_treasury_set"),arguments:[r.Zs.TXB_OBJECT(this.txb,this.object),this.txb.object(t),r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]})}arb(t,s){return r.Zs.IsValidObjects([t.order])||(0,a.f)(a.I.IsValidObjects,"arb.param.order"),(0,i.MA)(t.order_token_type)||(0,a.f)(a.I.IsValidTokenType,"arb.param.order_token_type"),(0,i.yW)(t.description)||(0,a.f)(a.I.IsValidDesription,"arb.param.description"),(0,i.ij)(t.votable_proposition,i.S7)||(0,a.f)(a.I.IsValidArray,"arb.param.votable_proposition"),s?t.fee?this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("dispute_with_passport"),arguments:[s,r.Zs.TXB_OBJECT(this.txb,this.object),this.txb.object(t.order),this.txb.pure.string(t.description),this.txb.pure.vector("string",(0,i.SI)(t.votable_proposition)),this.txb.object(t.fee)],typeArguments:[this.pay_token_type,t.order_token_type]}):this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("free_dispute_with_passport"),arguments:[s,r.Zs.TXB_OBJECT(this.txb,this.object),this.txb.object(t.order),this.txb.pure.string(t.description),this.txb.pure.vector("string",(0,i.SI)(t.votable_proposition))],typeArguments:[this.pay_token_type,t.order_token_type]}):t.fee?this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("dispute"),arguments:[r.Zs.TXB_OBJECT(this.txb,this.object),this.txb.object(t.order),this.txb.pure.string(t.description),this.txb.pure.vector("string",(0,i.SI)(t.votable_proposition)),this.txb.object(t.fee)],typeArguments:[this.pay_token_type,t.order_token_type]}):this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("free_dispute"),arguments:[r.Zs.TXB_OBJECT(this.txb,this.object),this.txb.object(t.order),this.txb.pure.string(t.description),this.txb.pure.vector("string",(0,i.SI)(t.votable_proposition))],typeArguments:[this.pay_token_type,t.order_token_type]})}arb_launch(t){return this.txb.moveCall({target:r.Zs.Instance().arbFn("create"),arguments:[r.Zs.TXB_OBJECT(this.txb,t)],typeArguments:[this.pay_token_type]})}dispute(t,s){const e=this.arb(t,s);return this.arb_launch(e)}change_permission(t){r.Zs.IsValidObjects([t])||(0,a.f)(a.I.IsValidObjects),this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("permission_set"),arguments:[r.Zs.TXB_OBJECT(this.txb,this.object),r.Zs.TXB_OBJECT(this.txb,this.permission),r.Zs.TXB_OBJECT(this.txb,t)],typeArguments:[this.pay_token_type]}),this.permission=t}static parseObjectType=t=>(0,i.q5)(t,"arbitration::Arbitration<");static parseArbObjectType=t=>(0,i.q5)(t,"arb::Arb<");static queryArbVoted=()=>{};static MAX_PROPOSITION_COUNT=16;static MAX_VOTING_GUARD_COUNT=16}},5337:(t,s,e)=>{var i;e.d(s,{I:()=>i,f:()=>r}),function(t){t.IsValidDesription="invalid description",t.IsValidName="invalid name",t.IsValidName_AllowEmpty="invalid name",t.IsValidEndpoint="invalid endpoint",t.IsValidAddress="invalid address",t.IsValidArgType="invalid argument type",t.IsValidTokenType="invalid token type",t.IsValidUint="invalid uint",t.IsValidInt="invalid int",t.IsValidU64="invalid u64",t.IsValidU8="invalid u8",t.IsValidPercent="invalid percent",t.IsValidArray="invalid array",t.IsValidObjects="invalid objects",t.AllInvalid="one valid at least",t.InvalidParam="invalid parameter",t.IsValidPermissionIndex="invalid permission index",t.IsValidKey="invalid key",t.Fail="fail",t.IsValidIndentifier="indentifier invalid",t.isValidHttpUrl="invalid url",t.IsValidBizPermissionIndex="invalid biz-permission index",t.bcsTypeInvalid="invalid bcs type",t.IsValidServiceItemName="invalid service item name",t.IsValidCoinType="not the coin type",t.IsValidGuardIdentifier="guard identifier invalid",t.noPermission="no permission"}(i||(i={}));const r=(t,s)=>{throw t.toString()+(s?" "+s:"")}},6601:(t,s,e)=>{e.d(s,{w:()=>n});var i=e(9554),r=e(1609),a=e(5337);class n{object;txb;get_object(){return this.object}constructor(t){this.txb=t,this.object=""}static From(t){let s=new n(t);return s.object=i.Zs.TXB_OBJECT(t,i.Zs.Instance().objectEntity()),s}mark(t,s,e){"string"!=typeof s||(0,r.jE)(s)||(0,a.f)(a.I.IsValidAddress,e),this.txb.moveCall({target:i.Zs.Instance().entityFn(e),arguments:[i.Zs.TXB_OBJECT(this.txb,this.object),i.Zs.TXB_OBJECT(this.txb,t.get_object()),"string"==typeof s?this.txb.pure.address(s):s]})}update(t){t?.name&&!(0,r.S7)(t.name)&&(0,a.f)(a.I.IsValidName,"update"),t?.description&&!(0,r.yW)(t.description)&&(0,a.f)(a.I.IsValidDesription,"update"),t?.avatar&&!(0,r.U8)(t.avatar)&&(0,a.f)(a.I.isValidHttpUrl,"update:avatar"),t?.twitter&&!(0,r.S7)(t.twitter)&&(0,a.f)(a.I.IsValidName,"update:twitter"),t?.homepage&&!(0,r.U8)(t.homepage)&&(0,a.f)(a.I.isValidHttpUrl,"update:homepage"),t?.discord&&!(0,r.S7)(t.discord)&&(0,a.f)(a.I.IsValidName,"update:discord");const s=r.ji.getInstance().bcs.ser("PersonalInfo",{name:t.name?(new TextEncoder).encode(t.name):"",description:t?.description?(new TextEncoder).encode(t.description):"",avatar:t?.avatar??"",twitter:t?.twitter??"",discord:t?.discord??"",homepage:t?.homepage??""}).toBytes();this.txb.moveCall({target:i.Zs.Instance().entityFn("avatar_update"),arguments:[i.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.vector("u8",[].slice.call(s))]})}create_resource(){return this.txb.moveCall({target:i.Zs.Instance().entityFn("resource_create"),arguments:[i.Zs.TXB_OBJECT(this.txb,this.object)]})}create_resource2(){return this.txb.moveCall({target:i.Zs.Instance().entityFn("resource_create2"),arguments:[i.Zs.TXB_OBJECT(this.txb,this.object)]})}destroy_resource(t){return this.txb.moveCall({target:i.Zs.Instance().entityFn("resource_destroy"),arguments:[i.Zs.TXB_OBJECT(this.txb,this.object),i.Zs.TXB_OBJECT(this.txb,t.get_object())]})}use_resource(t){return this.txb.moveCall({target:i.Zs.Instance().entityFn("resource_use"),arguments:[i.Zs.TXB_OBJECT(this.txb,this.object),i.Zs.TXB_OBJECT(this.txb,t.get_object())]})}transfer_resource(t,s){return(0,r.jE)(s)||(0,a.f)(a.I.IsValidAddress,"transfer_resource"),this.txb.moveCall({target:i.Zs.Instance().entityFn("resource_transfer"),arguments:[i.Zs.TXB_OBJECT(this.txb,this.object),i.Zs.TXB_OBJECT(this.txb,t.get_object()),this.txb.pure.address(s)]})}query_ent(t){(0,r.jE)(t)||(0,a.f)(a.I.InvalidParam,"query_ent"),this.txb.moveCall({target:i.Zs.Instance().entityFn("QueryEnt"),arguments:[i.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.address(t)]})}}},8021:(t,s,e)=>{e.d(s,{Y:()=>n});var i=e(9554),r=e(1609),a=e(5337);class n{bounty_type;permission;object;txb;get_bounty_type(){return this.bounty_type}get_object(){return this.object}static From(t,s,e,r){let a=new n(t,s,e);return a.object=i.Zs.TXB_OBJECT(t,r),a}constructor(t,s,e){this.bounty_type=s,this.permission=e,this.txb=t,this.object=""}static New(t,s,e,o,b,h,p){(0,r.yW)(h)||(0,a.f)(a.I.IsValidDesription),(0,r.Tg)(s)||(0,a.f)(a.I.IsValidArgType,s),(0,r.Ec)(o)||(0,a.f)(a.I.IsValidUint,"time");let _=new n(t,s,b);const d=t.sharedObjectRef(i.Zs.CLOCK_OBJECT);return _.object=p?t.moveCall({target:i.Zs.Instance().demandFn("new_with_passport"),arguments:[p,t.pure.string(h),t.pure.bool(e),t.pure.u64(o),t.object(d),i.Zs.TXB_OBJECT(t,b)],typeArguments:[s]}):t.moveCall({target:i.Zs.Instance().demandFn("new"),arguments:[t.pure.string(h),t.pure.bool(e),t.pure.u64(o),t.object(d),i.Zs.TXB_OBJECT(t,b)],typeArguments:[s]}),_}launch(){return this.txb.moveCall({target:i.Zs.Instance().demandFn("create"),arguments:[i.Zs.TXB_OBJECT(this.txb,this.object)],typeArguments:[this.bounty_type]})}refund(t){const s=this.txb.sharedObjectRef(i.Zs.CLOCK_OBJECT);t?this.txb.moveCall({target:i.Zs.Instance().demandFn("refund_with_passport"),arguments:[t,i.Zs.TXB_OBJECT(this.txb,this.object),this.txb.object(s),i.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.bounty_type]}):this.txb.moveCall({target:i.Zs.Instance().demandFn("refund"),arguments:[i.Zs.TXB_OBJECT(this.txb,this.object),this.txb.object(s),i.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.bounty_type]})}expand_time(t,s,e){(0,r.Ec)(s)||(0,a.f)(a.I.IsValidUint,"time"),e?this.txb.moveCall({target:i.Zs.Instance().demandFn("time_expand_with_passport"),arguments:[e,i.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.bool(t),this.txb.pure.u64(s),i.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.bounty_type]}):this.txb.moveCall({target:i.Zs.Instance().demandFn("time_expand"),arguments:[i.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.bool(t),this.txb.pure.u64(s),i.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.bounty_type]})}set_guard(t,s,e){t&&!i.Zs.IsValidObjects([t])&&(0,a.f)(a.I.IsValidObjects,"guard"),void 0===s||(0,r.U5)(s)||(0,a.f)(a.I.InvalidParam,"set_guard.service_identifier");let n=this.txb.pure.option("u8",void 0!==s?s:void 0);e?t?this.txb.moveCall({target:i.Zs.Instance().demandFn("guard_set_with_passport"),arguments:[e,i.Zs.TXB_OBJECT(this.txb,this.object),i.Zs.TXB_OBJECT(this.txb,t),n,i.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.bounty_type]}):this.txb.moveCall({target:i.Zs.Instance().demandFn("guard_none_with_passport"),arguments:[e,i.Zs.TXB_OBJECT(this.txb,this.object),i.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.bounty_type]}):t?this.txb.moveCall({target:i.Zs.Instance().demandFn("guard_set"),arguments:[i.Zs.TXB_OBJECT(this.txb,this.object),i.Zs.TXB_OBJECT(this.txb,t),n,i.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.bounty_type]}):this.txb.moveCall({target:i.Zs.Instance().demandFn("guard_none"),arguments:[i.Zs.TXB_OBJECT(this.txb,this.object),i.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.bounty_type]})}set_description(t,s){(0,r.yW)(t)||(0,a.f)(a.I.IsValidDesription),s?this.txb.moveCall({target:i.Zs.Instance().demandFn("description_set_with_passport"),arguments:[s,i.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.string(t),i.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.bounty_type]}):this.txb.moveCall({target:i.Zs.Instance().demandFn("description_set"),arguments:[i.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.string(t),i.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.bounty_type]})}yes(t,s){(0,r.jE)(t)||(0,a.f)(a.I.IsValidAddress),s?this.txb.moveCall({target:i.Zs.Instance().demandFn("yes_with_passport"),arguments:[s,i.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.address(t),i.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.bounty_type]}):this.txb.moveCall({target:i.Zs.Instance().demandFn("yes"),arguments:[i.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.address(t),i.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.bounty_type]})}deposit(t){i.Zs.IsValidObjects([t])||(0,a.f)(a.I.IsValidObjects),this.txb.moveCall({target:i.Zs.Instance().demandFn("deposit"),arguments:[i.Zs.TXB_OBJECT(this.txb,this.object),i.Zs.TXB_OBJECT(this.txb,t)],typeArguments:[this.bounty_type]})}present(t,s,e,n){(0,r.yW)(e)||(0,a.f)(a.I.IsValidDesription,"present.tips"),s&&!(0,r.Tg)(s)&&(0,a.f)(a.I.IsValidArgType,"service_pay_type"),"number"==typeof t?(0,r.U5)(t)&&n||(0,a.f)(a.I.IsValidU8,"present.service or present.passport"):i.Zs.IsValidObjects([t])||(0,a.f)(a.I.IsValidObjects,"present.service"),n?"number"==typeof t?this.txb.moveCall({target:i.Zs.Instance().demandFn("present_with_passport2"),arguments:[n,i.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.string(e)],typeArguments:[this.bounty_type]}):this.txb.moveCall({target:i.Zs.Instance().demandFn("present_with_passport"),arguments:[n,i.Zs.TXB_OBJECT(this.txb,this.object),i.Zs.TXB_OBJECT(this.txb,t),this.txb.pure.string(e)],typeArguments:[this.bounty_type,s]}):"number"!=typeof t&&this.txb.moveCall({target:i.Zs.Instance().demandFn("present"),arguments:[i.Zs.TXB_OBJECT(this.txb,this.object),i.Zs.TXB_OBJECT(this.txb,t),this.txb.pure.string(e)],typeArguments:[this.bounty_type,s]})}change_permission(t){i.Zs.IsValidObjects([t])||(0,a.f)(a.I.IsValidObjects),this.txb.moveCall({target:i.Zs.Instance().demandFn("permission_set"),arguments:[i.Zs.TXB_OBJECT(this.txb,this.object),i.Zs.TXB_OBJECT(this.txb,this.permission),i.Zs.TXB_OBJECT(this.txb,t)],typeArguments:[this.bounty_type]}),this.permission=t}static parseObjectType=t=>(0,r.q5)(t,"demand::Demand<");static MAX_BOUNTY_COUNT=300;static MAX_PRESENTERS_COUNT=200}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(this.webpackChunkwowok_agent=this.webpackChunkwowok_agent||[]).push([[495],{4285:(e,t,s)=>{s.d(t,{u:()=>o});var a=s(9554),r=s(1609),i=s(5873),n=s(5337);class o{txb;object;permission;get_object(){return this.object}static From(e,t,s){let r=new o(e,t);return r.object=a.Zs.TXB_OBJECT(e,s),r}constructor(e,t){this.txb=e,this.permission=t,this.object=""}static New(e,t,s,i,c){a.Zs.IsValidObjects([t])||(0,n.f)(n.I.IsValidObjects,"permission"),(0,r.yW)(s)||(0,n.f)(n.I.IsValidDesription),i&&!(0,r.Eh)(i)&&(0,n.f)(n.I.IsValidEndpoint);let _=new o(e,t),l=e.pure.option("string",i||void 0);return _.object=c?e.moveCall({target:a.Zs.Instance().machineFn("new_with_passport"),arguments:[c,e.pure.string(s),l,a.Zs.TXB_OBJECT(e,t)]}):e.moveCall({target:a.Zs.Instance().machineFn("new"),arguments:[e.pure.string(s),l,a.Zs.TXB_OBJECT(e,t)]}),_}add_node(e,t){if(0===e.length)return;let s=!0;e.forEach((e=>{(0,r.S7)(e.name)||(s=!1),e.pairs.forEach((e=>{(0,r.Xx)(e.prior_node)||(s=!1),e?.threshold&&!(0,r.aH)(e.threshold)&&(s=!1),e.forwards.forEach((e=>{""!==o.checkValidForward(e)&&(s=!1)}))}))})),s||(0,n.f)(n.I.InvalidParam,"add_node");let i=[];e.forEach((e=>{let t=this.txb.moveCall({target:a.Zs.Instance().machineFn("node_new"),arguments:[this.txb.pure.string(e.name)]});e.pairs.forEach((e=>{let s=this.txb.pure.option("u32",e?.threshold);e.forwards.forEach((r=>{this.txb.moveCall({target:a.Zs.Instance().machineFn("forward_add"),arguments:[t,this.txb.pure.string(e.prior_node),this.txb.pure.string(r.name),s,this.forward(r)]})})),0===e.forwards.length&&this.txb.moveCall({target:a.Zs.Instance().machineFn("forward_add_none"),arguments:[t,this.txb.pure.string(e.prior_node),s]})})),i.push(t)})),this.add_node2(i,t)}forward(e){let t,s=e?.weight?e.weight:1;return e?.namedOperator&&(0,r.S7)(e.namedOperator)?t=e?.guard?this.txb.moveCall({target:a.Zs.Instance().machineFn("forward"),arguments:[this.txb.pure.string(e.namedOperator),this.txb.pure.u16(s),this.txb.object(a.Zs.TXB_OBJECT(this.txb,e.guard))]}):this.txb.moveCall({target:a.Zs.Instance().machineFn("forward2"),arguments:[this.txb.pure.string(e.namedOperator),this.txb.pure.u16(s)]}):void 0!==e?.permission&&(0,r.Ec)(e.permission)?t=e?.guard?this.txb.moveCall({target:a.Zs.Instance().machineFn("forward3"),arguments:[this.txb.pure.u64(e.permission),this.txb.pure.u16(s),this.txb.object(a.Zs.TXB_OBJECT(this.txb,e.guard))]}):this.txb.moveCall({target:a.Zs.Instance().machineFn("forward4"),arguments:[this.txb.pure.u64(e.permission),this.txb.pure.u16(s)]}):(0,n.f)(n.I.InvalidParam,"forward"),e?.suppliers?.forEach((e=>{(0,r.MA)(e.pay_token_type)||(0,n.f)(n.I.IsValidTokenType,"forward.suppliers:"+e.object),this.txb.moveCall({target:a.Zs.Instance().serviceFn("add_to"),arguments:[this.txb.object(e.object),this.txb.pure.bool(e.bRequired??!1),t],typeArguments:[e.pay_token_type]})})),t}add_node2(e,t){if(0===e.length)return;let s=e.map((e=>a.Zs.TXB_OBJECT(this.txb,e)));t?this.txb.moveCall({target:a.Zs.Instance().machineFn("node_add_with_passport"),arguments:[t,a.Zs.TXB_OBJECT(this.txb,this.object),this.txb.makeMoveVec({elements:s}),a.Zs.TXB_OBJECT(this.txb,this.permission)]}):this.txb.moveCall({target:a.Zs.Instance().machineFn("node_add"),arguments:[a.Zs.TXB_OBJECT(this.txb,this.object),this.txb.makeMoveVec({elements:s}),a.Zs.TXB_OBJECT(this.txb,this.permission)]})}fetch_node(e,t){return(0,r.S7)(e)||(0,n.f)(n.I.IsValidName,"fetch_node"),t?this.txb.moveCall({target:a.Zs.Instance().machineFn("node_fetch_with_passport"),arguments:[t,a.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.string(e),a.Zs.TXB_OBJECT(this.txb,this.permission)]}):this.txb.moveCall({target:a.Zs.Instance().machineFn("node_fetch"),arguments:[a.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.string(e),a.Zs.TXB_OBJECT(this.txb,this.permission)]})}rename_node(e,t,s){e!==t&&((0,r.S7)(e)||(0,n.f)(n.I.IsValidName,"rename_node"),(0,r.S7)(t)||(0,n.f)(n.I.IsValidName,"rename_node"),s?this.txb.moveCall({target:a.Zs.Instance().machineFn("node_rename_with_passport"),arguments:[s,a.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.string(e),this.txb.pure.string(t),a.Zs.TXB_OBJECT(this.txb,this.permission)]}):this.txb.moveCall({target:a.Zs.Instance().machineFn("node_rename"),arguments:[a.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.string(e),this.txb.pure.string(t),a.Zs.TXB_OBJECT(this.txb,this.permission)]}))}remove_node(e,t=!1,s){0!==e.length&&((0,r.ij)(e,r.S7)||(0,n.f)(n.I.IsValidArray,"nodes_name"),s?this.txb.moveCall({target:a.Zs.Instance().machineFn("node_remove_with_passport"),arguments:[s,a.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.vector("string",e),this.txb.pure.bool(t),a.Zs.TXB_OBJECT(this.txb,this.permission)]}):this.txb.moveCall({target:a.Zs.Instance().machineFn("node_remove"),arguments:[a.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.vector("string",e),this.txb.pure.bool(t),a.Zs.TXB_OBJECT(this.txb,this.permission)]}))}launch(){return this.txb.moveCall({target:a.Zs.Instance().machineFn("create"),arguments:[a.Zs.TXB_OBJECT(this.txb,this.object)]})}set_description(e,t){(0,r.yW)(e)||(0,n.f)(n.I.IsValidDesription),t?this.txb.moveCall({target:a.Zs.Instance().machineFn("description_set_with_passport"),arguments:[t,a.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.string(e),a.Zs.TXB_OBJECT(this.txb,this.permission)]}):this.txb.moveCall({target:a.Zs.Instance().machineFn("description_set"),arguments:[a.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.string(e),a.Zs.TXB_OBJECT(this.txb,this.permission)]})}add_repository(e,t){t?this.txb.moveCall({target:a.Zs.Instance().machineFn("repository_add_with_passport"),arguments:[t,a.Zs.TXB_OBJECT(this.txb,this.object),a.Zs.TXB_OBJECT(this.txb,e),a.Zs.TXB_OBJECT(this.txb,this.permission)]}):this.txb.moveCall({target:a.Zs.Instance().machineFn("repository_add"),arguments:[a.Zs.TXB_OBJECT(this.txb,this.object),a.Zs.TXB_OBJECT(this.txb,e),a.Zs.TXB_OBJECT(this.txb,this.permission)]})}remove_repository(e,t,s){(t||0!==e.length)&&((0,r.ij)(e,r.jE)||(0,n.f)(n.I.IsValidArray,"remove_repository"),s?t?this.txb.moveCall({target:a.Zs.Instance().machineFn("repository_remove_all_with_passport"),arguments:[s,a.Zs.TXB_OBJECT(this.txb,this.object),a.Zs.TXB_OBJECT(this.txb,this.object)]}):this.txb.moveCall({target:a.Zs.Instance().machineFn("repository_remove_with_passport"),arguments:[s,a.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.vector("address",(0,r.SI)(e)),a.Zs.TXB_OBJECT(this.txb,this.permission)]}):t?this.txb.moveCall({target:a.Zs.Instance().machineFn("repository_remove_all"),arguments:[a.Zs.TXB_OBJECT(this.txb,this.object),a.Zs.TXB_OBJECT(this.txb,this.permission)]}):this.txb.moveCall({target:a.Zs.Instance().machineFn("repository_remove"),arguments:[a.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.vector("address",(0,r.SI)(e)),a.Zs.TXB_OBJECT(this.txb,this.permission)]}))}clone(e,t){let s;return s=t?this.txb.moveCall({target:a.Zs.Instance().machineFn("clone_with_passport"),arguments:[t,a.Zs.TXB_OBJECT(this.txb,this.object),a.Zs.TXB_OBJECT(this.txb,this.permission)]}):this.txb.moveCall({target:a.Zs.Instance().machineFn("clone"),arguments:[a.Zs.TXB_OBJECT(this.txb,this.object),a.Zs.TXB_OBJECT(this.txb,this.permission)]}),e?this.txb.moveCall({target:a.Zs.Instance().machineFn("create"),arguments:[a.Zs.TXB_OBJECT(this.txb,s)]}):s}set_endpoint(e,t){e&&!(0,r.Eh)(e)&&(0,n.f)(n.I.IsValidEndpoint);let s=this.txb.pure.option("string",e||void 0);t?this.txb.moveCall({target:a.Zs.Instance().machineFn("endpoint_set_with_passport"),arguments:[t,a.Zs.TXB_OBJECT(this.txb,this.object),s,a.Zs.TXB_OBJECT(this.txb,this.permission)]}):this.txb.moveCall({target:a.Zs.Instance().machineFn("endpoint_set"),arguments:[a.Zs.TXB_OBJECT(this.txb,this.object),s,a.Zs.TXB_OBJECT(this.txb,this.permission)]})}pause(e,t){t?this.txb.moveCall({target:a.Zs.Instance().machineFn("pause_with_passport"),arguments:[t,a.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.bool(e),a.Zs.TXB_OBJECT(this.txb,this.permission)]}):this.txb.moveCall({target:a.Zs.Instance().machineFn("pause"),arguments:[a.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.bool(e),a.Zs.TXB_OBJECT(this.txb,this.permission)]})}publish(e){e?this.txb.moveCall({target:a.Zs.Instance().machineFn("publish_with_passport"),arguments:[e,a.Zs.TXB_OBJECT(this.txb,this.object),a.Zs.TXB_OBJECT(this.txb,this.permission)]}):this.txb.moveCall({target:a.Zs.Instance().machineFn("publish"),arguments:[a.Zs.TXB_OBJECT(this.txb,this.object),a.Zs.TXB_OBJECT(this.txb,this.permission)]})}change_permission(e){a.Zs.IsValidObjects([e])||(0,n.f)(n.I.IsValidObjects,"new_permission"),this.txb.moveCall({target:a.Zs.Instance().machineFn("permission_set"),arguments:[a.Zs.TXB_OBJECT(this.txb,this.object),a.Zs.TXB_OBJECT(this.txb,this.permission),a.Zs.TXB_OBJECT(this.txb,e)],typeArguments:[]}),this.permission=e}add_forward(e,t,s,i,c,_){(0,r.Xx)(e)||(0,n.f)(n.I.IsValidName_AllowEmpty,"add_forward"),(0,r.S7)(t)||(0,n.f)(n.I.IsValidName,"add_forward");const l=o.checkValidForward(s);let h;l&&(0,n.f)(n.I.InvalidParam,l),h=_?this.txb.moveCall({target:a.Zs.Instance().machineFn("node_fetch_with_passport"),arguments:[_,a.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.string(t),a.Zs.TXB_OBJECT(this.txb,this.permission)]}):this.txb.moveCall({target:a.Zs.Instance().machineFn("node_fetch"),arguments:[a.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.string(t),a.Zs.TXB_OBJECT(this.txb,this.permission)]});const p=this.forward(s),d=this.txb.pure.option("u32",i??void 0);this.txb.moveCall({target:a.Zs.Instance().machineFn("forward_add"),arguments:[h,this.txb.pure.string(e),this.txb.pure.string(s.name),d,p]}),c&&c!==s.name&&this.txb.moveCall({target:a.Zs.Instance().machineFn("forward_remove"),arguments:[h,this.txb.pure.string(e),this.txb.pure.string(c)]}),this.add_node2([h],_)}remove_pair(e,t,s){let i;(0,r.Xx)(e)||(0,n.f)(n.I.IsValidName_AllowEmpty,"remove_pair"),(0,r.S7)(t)||(0,n.f)(n.I.IsValidName,"remove_pair"),i=s?this.txb.moveCall({target:a.Zs.Instance().machineFn("node_fetch_with_passport"),arguments:[s,a.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.string(t),a.Zs.TXB_OBJECT(this.txb,this.permission)]}):this.txb.moveCall({target:a.Zs.Instance().machineFn("node_fetch"),arguments:[a.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.string(t),a.Zs.TXB_OBJECT(this.txb,this.permission)]}),this.txb.moveCall({target:a.Zs.Instance().machineFn("pair_remove"),arguments:[i,this.txb.pure.string(e)]}),this.add_node2([i],s)}remove_forward(e,t,s,i){let o;(0,r.Xx)(e)||(0,n.f)(n.I.IsValidName_AllowEmpty,"remove_forward"),(0,r.S7)(t)||(0,n.f)(n.I.IsValidName,"remove_forward"),o=i?this.txb.moveCall({target:a.Zs.Instance().machineFn("node_fetch_with_passport"),arguments:[i,a.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.string(t),a.Zs.TXB_OBJECT(this.txb,this.permission)]}):this.txb.moveCall({target:a.Zs.Instance().machineFn("node_fetch"),arguments:[a.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.string(t),a.Zs.TXB_OBJECT(this.txb,this.permission)]}),this.txb.moveCall({target:a.Zs.Instance().machineFn("forward_remove"),arguments:[o,this.txb.pure.string(e),this.txb.pure.string(s)]}),this.add_node2([o],i)}static rpc_de_nodes(e){const t=[];return e.forEach((e=>{t.push({name:e.data.content.fields.name,pairs:o.rpc_de_pair(e?.data.content.fields.value)})})),t}static rpc_de_pair(e){let t=[];return e.fields.value.fields.contents.forEach((e=>{let s=[];e.fields.value.fields.forwards.fields.contents.forEach((e=>{let t=e.fields.key,a=e.fields.value.fields.weight,r=e.fields.value.fields.guard,i=e.fields.value.fields.namedOperator,n=e.fields.value.fields.permission_index;s.push({name:t,namedOperator:i,permission:n,weight:a,guard:r||"",suppliers:e.fields.value.fields.suppliers.fields.contents.map((e=>({object:e.fields.key,bRequired:e.fields.value,pay_token_type:""})))})})),t.push({prior_node:e.fields.key,threshold:e.fields.value.fields.threshold,forwards:s})})),t}static namedOperators(e){let t=[];return e.forEach((e=>{e.pairs.forEach((e=>{e.forwards.forEach((e=>{e?.namedOperator&&!t.find((t=>t===e.namedOperator))&&t.push(e.namedOperator)}))}))})),t}static checkValidForward(e){return(0,r.S7)(e.name)?e?.namedOperator&&!(0,r.Xx)(e?.namedOperator)?"Progress Operator invalid":e?.permission&&!i.aX.IsValidPermissionIndex(e?.permission)?"Permission index invalid":e?.permission||e?.namedOperator?e?.weight&&!(0,r.Ec)(e.weight)?"Weight invalid":"":"Business-Permissions invalid":"Forward name invalid"}static INITIAL_NODE_NAME="";static OPERATOR_ORDER_PAYER="OrderPayer"}},7495:(e,t,s)=>{s.r(t),s.d(t,{Arbitration:()=>O.w,BCS:()=>v.r8,Bcs:()=>i.ji,BuyRequiredEnum:()=>E.bU,ContextType:()=>_.EL,Demand:()=>a.Y,ENTRYPOINT:()=>_.$Q,ERROR:()=>h.f,Ed25519Keypair:()=>P.h,Entity:()=>T.w,Errors:()=>h.I,FirstLetterUppercase:()=>i.Li,FunctionGroup:()=>o.g$,GUARD_QUERIES:()=>o.J2,Guard:()=>o.wM,GuardFunctions:()=>o.hJ,GuardMaker:()=>o.uR,GuardParser:()=>p,IsNumberType:()=>_.KE,IsValidAddress:()=>i.jE,IsValidArgType:()=>i.Tg,IsValidArray:()=>i.ij,IsValidBigint:()=>i.CT,IsValidCoinType:()=>i.UR,IsValidDesription:()=>i.yW,IsValidEndpoint:()=>i.Eh,IsValidGuardIdentifier:()=>o.te,IsValidInt:()=>i.aH,IsValidName:()=>i.S7,IsValidName_AllowEmpty:()=>i.Xx,IsValidOperatorType:()=>_.p_,IsValidPercent:()=>i.qF,IsValidTokenType:()=>i.MA,IsValidU128:()=>i.ds,IsValidU256:()=>i.R0,IsValidU64:()=>i.Ec,IsValidU8:()=>i.U5,IsValidValueType:()=>_.E6,LogicsInfo:()=>_.Kf,MAX_DESCRIPTION_LENGTH:()=>i.Lj,MAX_ENDPOINT_LENGTH:()=>i.Mb,MAX_NAME_LENGTH:()=>i.EM,MAX_U128:()=>i.Mc,MAX_U256:()=>i._J,MAX_U64:()=>i.VP,MAX_U8:()=>i.b_,MODULES:()=>_.e$,Machine:()=>u.u,OPTION_NONE:()=>i.xT,OperatorType:()=>_.hu,OperatorTypeArray:()=>_.A0,PAYMENT_MAX_RECEIVER_COUNT:()=>f,ParseType:()=>i.O_,Passport:()=>d,Permission:()=>n.aX,PermissionIndex:()=>n.w6,PermissionInfo:()=>n._$,Progress:()=>r.k,Protocol:()=>_.Zs,Repository:()=>c.LN,RepositoryValueType:()=>_.ml,RepositoryValueTypeInfo:()=>_.o8,Repository_Policy_Mode:()=>c.OX,Repository_Type:()=>c.aF,ResolveBalance:()=>i.xI,ResolveU64:()=>i.oV,Resource:()=>b.F,RpcResultParser:()=>_.GX,SER_VALUE:()=>_.Bd,Service:()=>E.kl,Service_Discount_Type:()=>E.P_,SuiClient:()=>C.x,TagName:()=>b.K,TransactionBlock:()=>y.Z,Treasury:()=>I.mE,Treasury_Operation:()=>I._5,Treasury_WithdrawMode:()=>I.uE,ValueType:()=>_.eV,ValueTypeArray:()=>_.pl,ValueTypeConvert:()=>i.XF,Wowok:()=>m.S,array_equal:()=>i.p_,array_unique:()=>i.SI,capitalize:()=>i.ZH,cb_U128:()=>i.x_,cb_U256:()=>i.pq,cb_U64:()=>i.Ys,cb_U8:()=>i.gV,concatenate:()=>i.u1,create_payment:()=>g,decodeSuiPrivateKey:()=>B.At,deepClone:()=>i.Go,encodeSuiPrivateKey:()=>B.yk,fromHEX:()=>x.i,getFaucetHost:()=>V.lG,getSuiMoveConfig:()=>v.PN,getUTCDayStartByDivision:()=>i.DQ,hasDuplicates:()=>i.bT,insertAtHead:()=>i.$Q,isArr:()=>i.Ep,isValidHttpUrl:()=>i.U8,normalizeSuiAddress:()=>U.t4,numToUint8Array:()=>i.$q,parseObjectType:()=>i.q5,parse_object_type:()=>i.Lw,query_object:()=>i.tH,readOption:()=>i.gz,readOptionString:()=>i.Hn,readVec:()=>i.IN,requestSuiFromFaucetV0:()=>V.RJ,requestSuiFromFaucetV1:()=>V.Yl,stringToUint8Array:()=>i.Al,toFixed:()=>i.Mg,toHEX:()=>x.J,ulebDecode:()=>i.jz});var a=s(8021),r=s(4289),i=s(1609),n=s(5873),o=s(701),c=s(1210),_=s(9554),l=s(2748),h=s(5337);class p{guard_list=[];guards;constructor(e){this.guards=e}guardlist=()=>this.guard_list;static DeGuardObject_FromData=(e,t)=>{let s=p.parse_constant(e),a=p.parse_bcs(s,t);a&&0!=a.length||(0,h.f)(h.I.Fail,"GuardObject: data parsed error");let r=[];return a.forEach((e=>{p.ResolveData(s,r,{...e,child:[]})})),1!=r.length&&(0,h.f)(h.I.Fail,"GuardObject: parse error"),{object:r.pop(),constant:s}};static DeGuardObject=async(e,t)=>{(0,i.jE)(t)||(0,h.f)(h.I.IsValidAddress,"GuardObject guard");let s=await e.query_raw([t]);0!=s.length&&s[0].data&&s[0].data?.objectId==t||(0,h.f)(h.I.Fail,"GuardObject query error");let a=s[0].data.content;return a?.type!=e.package("base")+"::guard::Guard"&&(0,h.f)(h.I.Fail,"GuardObject object invalid"),p.DeGuardObject_FromData(a.fields.constants,a.fields.input.fields.bytes)};static ResolveData=(e,t,s)=>{switch(s.type){case _.hu.TYPE_LOGIC_NOT:return s.ret_type=_.eV.TYPE_BOOL,t.length<1&&(0,h.f)(h.I.Fail,"ResolveData: TYPE_LOGIC_NOT"),(a=t.pop()).ret_type&&a.ret_type==_.eV.TYPE_BOOL||(0,h.f)(h.I.Fail,"ResolveData: TYPE_LOGIC_NOT type invalid"),s.child.push(a),void t.push(s);case _.hu.TYPE_NUMBER_ADDRESS:var a;return s.ret_type=_.eV.TYPE_ADDRESS,t.length<1&&(0,h.f)(h.I.Fail,"ResolveData: TYPE_NUMBER_ADDRESS"),(a=t.pop()).ret_type&&o.uR.match_u256(a.ret_type)||(0,h.f)(h.I.Fail,"ResolveData: TYPE_NUMBER_ADDRESS type invalid"),s.child.push(a),void t.push(s);case _.hu.TYPE_LOGIC_AS_U256_GREATER:case _.hu.TYPE_LOGIC_AS_U256_GREATER_EQUAL:case _.hu.TYPE_LOGIC_AS_U256_LESSER:case _.hu.TYPE_LOGIC_AS_U256_LESSER_EQUAL:case _.hu.TYPE_LOGIC_AS_U256_EQUAL:case _.hu.TYPE_NUMBER_ADD:case _.hu.TYPE_NUMBER_DEVIDE:case _.hu.TYPE_NUMBER_MOD:case _.hu.TYPE_NUMBER_MULTIPLY:case _.hu.TYPE_NUMBER_SUBTRACT:s.type===_.hu.TYPE_LOGIC_AS_U256_GREATER||s.type===_.hu.TYPE_LOGIC_AS_U256_GREATER_EQUAL||s.type===_.hu.TYPE_LOGIC_AS_U256_LESSER||s.type===_.hu.TYPE_LOGIC_AS_U256_LESSER_EQUAL||s.type===_.hu.TYPE_LOGIC_AS_U256_EQUAL?s.ret_type=_.eV.TYPE_BOOL:s.ret_type=_.eV.TYPE_U256,(t.length<s.value||s.value<2)&&(0,h.f)(h.I.Fail,"ResolveData: "+s.type);for(let e=0;e<s.value;++e)(i=t.pop()).ret_type&&o.uR.match_u256(i.ret_type)||(0,h.f)(h.I.Fail,"ResolveData: "+s.type+" INVALID param type"),s.child.push(i);return void t.push(s);case _.hu.TYPE_LOGIC_EQUAL:s.ret_type=_.eV.TYPE_BOOL,(t.length<s.value||s.value<2)&&(0,h.f)(h.I.Fail,"ResolveData: "+s.type);var r=t.pop();s.child.push(r);for(let e=1;e<s.value;++e)(i=t.pop()).ret_type&&i.ret_type==r.ret_type||(0,h.f)(h.I.Fail,"ResolveData: "+s.type+" INVALID param type"),s.child.push(i);return void t.push(s);case _.hu.TYPE_LOGIC_HAS_SUBSTRING:s.ret_type=_.eV.TYPE_BOOL,(t.length<s.value||s.value<2)&&(0,h.f)(h.I.Fail,"ResolveData: "+s.type);for(let e=0;e<s.value;++e)(i=t.pop()).ret_type&&i.ret_type==_.eV.TYPE_STRING||(0,h.f)(h.I.Fail,"ResolveData: "+s.type+" INVALID param type"),s.child.push(i);return void t.push(s);case _.hu.TYPE_LOGIC_AND:case _.hu.TYPE_LOGIC_OR:s.ret_type=_.eV.TYPE_BOOL,(t.length<s.value||s.value<2)&&(0,h.f)(h.I.Fail,"ResolveData: "+s.type);for(let e=0;e<s.value;++e){var i;(i=t.pop()).ret_type&&i.ret_type==_.eV.TYPE_BOOL||(0,h.f)(h.I.Fail,"ResolveData: "+s.type+" INVALID param type"),s.child.push(i)}return void t.push(s);case _.hu.TYPE_QUERY:s?.cmd||(0,h.f)(h.I.Fail,"OperateParamCount: cmd invalid "+s.type);let n=o.wM.GetCmd(s.cmd);return n||(0,h.f)(h.I.Fail,"OperateParamCount: cmd not supported "+s.type),s.ret_type=n?.return,t.length<n.parameters.length&&(0,h.f)(h.I.Fail,"OperateParamCount: cmd param lost "+s.type),n.parameters.forEach((e=>{let a=t.pop();a?.ret_type&&a.ret_type==e||(0,h.f)(h.I.Fail,"OperateParamCount: cmd param not match "+s.type),s.child.push(a)})),void t.push(s);case _.eV.TYPE_ADDRESS:case _.eV.TYPE_BOOL:case _.eV.TYPE_U128:case _.eV.TYPE_U256:case _.eV.TYPE_U64:case _.eV.TYPE_U8:case _.eV.TYPE_VEC_ADDRESS:case _.eV.TYPE_VEC_BOOL:case _.eV.TYPE_VEC_U128:case _.eV.TYPE_VEC_U256:case _.eV.TYPE_VEC_U64:case _.eV.TYPE_VEC_U8:case _.eV.TYPE_VEC_VEC_U8:case _.eV.TYPE_OPTION_ADDRESS:case _.eV.TYPE_OPTION_BOOL:case _.eV.TYPE_OPTION_U128:case _.eV.TYPE_OPTION_U256:case _.eV.TYPE_OPTION_U64:case _.eV.TYPE_OPTION_U8:case _.eV.TYPE_STRING:return s.ret_type=s.type,void t.push(s);case _.EL.TYPE_CLOCK:return s.ret_type=_.eV.TYPE_U64,void t.push(s);case _.EL.TYPE_SIGNER:case _.EL.TYPE_GUARD:return s.ret_type=_.eV.TYPE_ADDRESS,void t.push(s);case _.EL.TYPE_CONSTANT:let c=e.find((e=>e.identifier==s?.identifier));return c||(0,h.f)(h.I.Fail,"OperateParamCount: identifier invalid "+s.type),s.ret_type=c?.type,void t.push(s)}(0,h.f)(h.I.Fail,"OperateParamCount: type invalid "+s.type)};static Parse_Guard_Helper(e,t){const s=_.Zs.Instance(),a=new p(e);return t.forEach((e=>{const t=e.data?.content;if(t||(0,h.f)(h.I.Fail,"Parse_Guard_Helper invalid content"),-1===s.WOWOK_OBJECTS_TYPE().findIndex((e=>e.includes("guard::Guard")&&e==t.type))&&(0,h.f)(h.I.Fail,"Parse_Guard_Helper invalid type: "+t.type),t.fields.input.type===s.package("base")+"::bcs::BCS"){const s=p.parse_constant(t.fields.constants),r=p.parse_bcs(s,Uint8Array.from(t.fields.input.fields.bytes));a.guard_list.push({id:t.fields.id.id,input:[...r],constant:[...s],digest:e.data?.digest??"",version:e.data?.version??""})}else(0,h.f)(h.I.Fail,"Parse_Guard_Helper invalid package: "+t.fields.input.type)})),a}static Create=async(e,t)=>{if(!(0,i.ij)(e,i.jE))return void(t&&t(void 0));let s=(0,i.SI)(e);if(!t){const t=await _.Zs.Instance().query_raw(s);return p.Parse_Guard_Helper(e,t)}_.Zs.Instance().query_raw(s).then((s=>{t(p.Parse_Guard_Helper(e,s))})).catch((e=>{console.log(e),t(void 0)}))};future_fills=()=>{const e=[];return this.guard_list.forEach((t=>{t.constant.filter((e=>e.bWitness)).forEach((s=>{const a=t.input.filter((e=>e.identifier===s.identifier&&void 0!==e.cmd)).map((e=>e.cmd));let r=0;t.input.forEach((e=>{e.identifier===s.identifier&&r++})),e.push({guard:t.id,witness:void 0,identifier:s.identifier,type:s.type,cmd:a??[],cited:r})}))})),e};static parse_constant=e=>{let t=[];return e.forEach((e=>{let s=e?.fields??e;const a=Uint8Array.from(s.value),r=a.slice(0,1)[0];if(s.bWitness)t.push({identifier:s.identifier,type:r,bWitness:s.bWitness,value:void 0});else{var n=a.slice(1);switch(r){case _.eV.TYPE_ADDRESS:n="0x"+i.ji.getInstance().de(_.eV.TYPE_ADDRESS,Uint8Array.from(n)).toString();break;case _.eV.TYPE_BOOL:case _.eV.TYPE_U8:case _.eV.TYPE_U64:case _.eV.TYPE_U128:case _.eV.TYPE_U256:case _.eV.TYPE_VEC_U8:case _.eV.TYPE_VEC_U64:case _.eV.TYPE_VEC_U128:case _.eV.TYPE_VEC_ADDRESS:case _.eV.TYPE_VEC_BOOL:case _.eV.TYPE_VEC_VEC_U8:case _.eV.TYPE_OPTION_ADDRESS:case _.eV.TYPE_OPTION_BOOL:case _.eV.TYPE_OPTION_U128:case _.eV.TYPE_OPTION_U8:case _.eV.TYPE_OPTION_U64:case _.eV.TYPE_OPTION_U256:case _.eV.TYPE_VEC_U256:case _.eV.TYPE_STRING:case _.eV.TYPE_OPTION_STRING:case _.eV.TYPE_OPTION_VEC_U8:case _.eV.TYPE_VEC_STRING:_.Bd.find((e=>e.type==r))||(0,h.f)(h.I.Fail,"GuardObject de error"),n=i.ji.getInstance().de(r,Uint8Array.from(n));break;default:(0,h.f)(h.I.Fail,"GuardObject constant type invalid:"+r)}t.push({identifier:s.identifier,type:r,bWitness:s.bWitness,value:n})}})),t};static parse_bcs=(e,t)=>{let s=Uint8Array.from(t),a=[].slice.call(s.reverse()),r=[];for(;a.length>0;){let t,s,n,o=a.shift();switch(o){case _.EL.TYPE_SIGNER:case _.EL.TYPE_CLOCK:case _.EL.TYPE_GUARD:case _.hu.TYPE_LOGIC_NOT:case _.hu.TYPE_NUMBER_ADDRESS:break;case _.hu.TYPE_LOGIC_AS_U256_GREATER:case _.hu.TYPE_LOGIC_AS_U256_GREATER_EQUAL:case _.hu.TYPE_LOGIC_AS_U256_LESSER:case _.hu.TYPE_LOGIC_AS_U256_LESSER_EQUAL:case _.hu.TYPE_LOGIC_AS_U256_EQUAL:case _.hu.TYPE_LOGIC_EQUAL:case _.hu.TYPE_LOGIC_HAS_SUBSTRING:case _.hu.TYPE_NUMBER_ADD:case _.hu.TYPE_NUMBER_DEVIDE:case _.hu.TYPE_NUMBER_MOD:case _.hu.TYPE_NUMBER_MULTIPLY:case _.hu.TYPE_NUMBER_SUBTRACT:case _.hu.TYPE_LOGIC_AND:case _.hu.TYPE_LOGIC_OR:t=a.shift();break;case _.EL.TYPE_CONSTANT:n=a.shift();break;case _.eV.TYPE_ADDRESS:t="0x"+i.ji.getInstance().de(_.eV.TYPE_ADDRESS,Uint8Array.from(a)).toString(),a.splice(0,32);break;case _.eV.TYPE_BOOL:case _.eV.TYPE_U8:t=i.ji.getInstance().de(o,Uint8Array.from(a)),a.shift();break;case _.eV.TYPE_U64:t=i.ji.getInstance().de(o,Uint8Array.from(a)),a.splice(0,8);break;case _.eV.TYPE_U128:t=i.ji.getInstance().de(o,Uint8Array.from(a)),a.splice(0,16);break;case _.eV.TYPE_U256:t=i.ji.getInstance().de(o,Uint8Array.from(a)),a.splice(0,32);break;case _.eV.TYPE_VEC_U8:case _.eV.TYPE_VEC_BOOL:case _.eV.TYPE_STRING:let r=(0,i.jz)(Uint8Array.from(a));t=i.ji.getInstance().de(o,Uint8Array.from(a)),a.splice(0,r.value+r.length);break;case _.eV.TYPE_VEC_ADDRESS:r=(0,i.jz)(Uint8Array.from(a)),t=i.ji.getInstance().de(o,Uint8Array.from(a)),a.splice(0,32*r.value+r.length);break;case _.eV.TYPE_VEC_U128:r=(0,i.jz)(Uint8Array.from(a)),t=i.ji.getInstance().de(o,Uint8Array.from(a)),a.splice(0,16*r.value+r.length);break;case _.eV.TYPE_VEC_U256:r=(0,i.jz)(Uint8Array.from(a)),t=i.ji.getInstance().de(o,Uint8Array.from(a)),a.splice(0,32*r.value+r.length);break;case _.eV.TYPE_VEC_U64:r=(0,i.jz)(Uint8Array.from(a)),t=i.ji.getInstance().de(o,Uint8Array.from(a)),a.splice(0,8*r.value+r.length);break;case _.eV.TYPE_VEC_VEC_U8:case _.eV.TYPE_VEC_STRING:r=(0,i.jz)(Uint8Array.from(a)),a.splice(0,r.length);let c=[];for(let e=0;e<r.value;e++){let e=(0,i.jz)(Uint8Array.from(a));c.push(i.ji.getInstance().de(_.eV.TYPE_VEC_U8,Uint8Array.from(a))),a.splice(0,e.length+e.value)}t=c;break;case _.hu.TYPE_QUERY:let l=a.splice(0,1);if(l[0]==_.eV.TYPE_ADDRESS){let e="0x"+i.ji.getInstance().de(_.eV.TYPE_ADDRESS,Uint8Array.from(a)).toString();a.splice(0,32),t=e,s=i.ji.getInstance().de("u16",Uint8Array.from(a.splice(0,2)))}else if(l[0]==_.EL.TYPE_CONSTANT){let t=a.splice(0,1);e.find((e=>e.identifier==t[0]&&e.type==_.eV.TYPE_ADDRESS))||(0,h.f)(h.I.Fail,"GuardObject: indentifier not in constant"),n=t[0],s=i.ji.getInstance().de("u16",Uint8Array.from(a.splice(0,2)))}else(0,h.f)(h.I.Fail,"GuardObject: constant type invalid");break;case _.eV.TYPE_OPTION_ADDRESS:let p=(0,i.gz)(a,_.eV.TYPE_ADDRESS);t=p.value,p.bNone||a.splice(0,32);break;case _.eV.TYPE_OPTION_BOOL:p=(0,i.gz)(a,_.eV.TYPE_BOOL),t=p.value,p.bNone||a.splice(0,1);break;case _.eV.TYPE_OPTION_U8:p=(0,i.gz)(a,_.eV.TYPE_U8),t=p.value,p.bNone||a.splice(0,1);break;case _.eV.TYPE_OPTION_U128:p=(0,i.gz)(a,_.eV.TYPE_U128),t=p.value,p.bNone||a.splice(0,16);break;case _.eV.TYPE_OPTION_U256:p=(0,i.gz)(a,_.eV.TYPE_U256),t=p.value,p.bNone||a.splice(0,32);break;case _.eV.TYPE_OPTION_U64:p=(0,i.gz)(a,_.eV.TYPE_U64),t=p.value,p.bNone||a.splice(0,8);break;case _.eV.TYPE_OPTION_STRING:p=(0,i.Hn)(a),t=p.value;break;default:(0,h.f)(h.I.Fail,"GuardObject: parse_bcs types "+o)}r.push({type:o,value:t,cmd:s,identifier:n})}return r};done=async(e,t)=>{let s=[];if(this.guard_list.forEach((t=>{t.constant.forEach((t=>{if(t.bWitness){const s=e?.find((e=>e.identifier===t.identifier));s?t.value=s.witness:(0,h.f)(h.I.Fail,"done: invalid witness "+t.identifier)}})),t.input.filter((e=>void 0!==e.cmd)).forEach((e=>{if(void 0!==e.identifier){const a=t.constant.find((t=>t.identifier===e.identifier&&t.type===_.eV.TYPE_ADDRESS));a&&(0,i.jE)(a.value)||(0,h.f)(h.I.Fail,"done: invalid identifier "+e.identifier),s.push(a.value)}else s.push(e.value)}))})),t)return 0===s.length?void t(this.done_helper([])):void _.Zs.Instance().query_raw((0,i.SI)(s),{showType:!0}).then((e=>{t(this.done_helper(e))})).catch((e=>{console.log(e),t(void 0)}));{let e=[];return s.length>0&&(e=await _.Zs.Instance().query_raw((0,i.SI)(s),{showType:!0})),this.done_helper(e)}};done_helper(e){let t=[],s=[];return this.guard_list.forEach((a=>{s.push(a.id),a.input.filter((e=>void 0!==e.cmd)).forEach((s=>{let r=s.value;r||void 0===s.identifier||(r=a.constant.find((e=>e.identifier==s.identifier))?.value);let i=e.find((e=>e.data?.objectId==r));i||(0,h.f)(h.I.Fail,"query object not match");let n=this.object_query(i.data);n||(0,h.f)(h.I.Fail,"query object fail"),t.push(n)}))})),{query:t,info:this.guard_list}}object_query=(e,t="guard_query")=>{for(let s=0;s<_.Zs.Instance().WOWOK_OBJECTS_TYPE().length;s++)if(e.type.includes(_.Zs.Instance().WOWOK_OBJECTS_TYPE()[s]))return{target:_.Zs.Instance().WOWOK_OBJECTS_PREFIX_TYPE()[s]+t,object:l.G.SharedObjectRef({objectId:e.objectId,mutable:!1,initialSharedVersion:e.version}),types:(0,i.Lw)(e.type),id:e.objectId}}}class d{static MAX_GUARD_COUNT=8;passport;txb;get_object(){return this.passport}constructor(e,t,s=!1){(0===t.info.length||t.info.length>d.MAX_GUARD_COUNT)&&(0,h.f)(h.I.InvalidParam,"guards"),this.txb=e,this.passport=this.txb.moveCall({target:_.Zs.Instance().passportFn("new"),arguments:[]}),t.info.forEach((t=>{const s=t.constant.filter((e=>e.bWitness)).map((e=>e.identifier)),a=t.constant.filter((e=>e.bWitness)).map((e=>{const t=i.ji.getInstance().ser(e.type,e.value);let s=new Uint8Array(t.length+1);return s.set([e.type],0),s.set(t,1),[].slice.call(s)})),r=void 0!==t.version&&void 0!==t.digest?e.objectRef({objectId:t.id,version:t.version,digest:t.digest}):e.object(t.id);this.txb.moveCall({target:_.Zs.Instance().passportFn("guard_add"),arguments:[this.passport,r,this.txb.pure.vector("u8",[].slice.call(s)),this.txb.pure(i.ji.getInstance().ser("vector<vector<u8>>",[...a]))]})}));const a=this.txb.sharedObjectRef(_.Zs.CLOCK_OBJECT);t?.query.forEach((e=>{this.txb.moveCall({target:_.Zs.Instance().passportFn("passport_verify"),arguments:[this.passport,this.txb.object(a)]}),this.txb.moveCall({target:e.target,arguments:[s?this.txb.object(e.object):this.txb.object(e.id),this.passport],typeArguments:e.types})})),this.txb.moveCall({target:_.Zs.Instance().passportFn("passport_verify"),arguments:[this.passport,this.txb.object(a)]})}destroy(){this.txb.moveCall({target:_.Zs.Instance().passportFn("destroy"),arguments:[this.passport]})}freeze(){this.txb.moveCall({target:_.Zs.Instance().passportFn("freezen"),arguments:[this.passport]})}query_result(e,t){this.txb.moveCall({target:_.Zs.Instance().passportFn("query_result"),arguments:[this.passport]}),_.Zs.Client().devInspectTransactionBlock({sender:e,transactionBlock:this.txb}).then((e=>{const s=d.ResolveQueryRes(this.txb,e);s&&t(s)})).catch((e=>{console.log(e)}))}query_result_async=async e=>{this.txb.moveCall({target:_.Zs.Instance().passportFn("query_result"),arguments:[this.passport]});const t=await _.Zs.Client().devInspectTransactionBlock({sender:e,transactionBlock:this.txb});return d.ResolveQueryRes(this.txb,t)};static ResolveQueryRes(e,t){for(let s=0;s<t.results?.length;++s){const a=t.results[s];if(a?.returnValues&&2===a.returnValues.length&&"bool"===a.returnValues[0][1]&&"vector<address>"===a.returnValues[1][1])return{txb:e,result:i.ji.getInstance().de("bool",Uint8Array.from(a.returnValues[0][0])),guards:i.ji.getInstance().de("vector<address>",Uint8Array.from(a.returnValues[1][0])).map((e=>"0x"+e))}}}}var u=s(4285),E=s(3499),T=s(6601),m=s(3857),b=s(3810),I=s(2871);const f=200;function g(e,t,s){t||(0,h.f)(h.I.InvalidParam,"Payment.New.pay_token_type"),s.receiver.length>f&&(0,h.f)(h.I.InvalidParam,"Payment.New.param.receiver"),(0,i.ij)(s.receiver,(e=>(0,i.jE)(e.address)&&_.Zs.IsValidObjects([e.coin])))||(0,h.f)(h.I.IsValidArray,"Payment.New.param.receiver"),s?.for_object&&!(0,i.jE)(s.for_object)&&(0,h.f)(h.I.IsValidAddress,"Payment.New.param.for_object"),s?.for_guard&&!(0,i.jE)(s.for_guard)&&(0,h.f)(h.I.IsValidAddress,"Payment.New.param.for_guard"),s?.business_remark&&!(0,i.yW)(s?.business_remark)&&(0,h.f)(h.I.IsValidDesription,"Payment.New.param.business_remark");let a=e.pure.option("address",s.for_object?s.for_object:void 0);const r=e.sharedObjectRef(_.Zs.CLOCK_OBJECT);return s.for_guard?e.moveCall({target:_.Zs.Instance().paymentFn("create_withGuard"),arguments:[e.pure.vector("address",s.receiver.map((e=>e.address))),e.makeMoveVec({elements:s.receiver.map((e=>e.coin))}),a,e.object(s.for_guard),e.pure.u64(s.business_index),e.pure.string(s.business_remark),e.object(r)],typeArguments:[t]}):e.moveCall({target:_.Zs.Instance().paymentFn("create"),arguments:[e.pure.vector("address",s.receiver.map((e=>e.address))),e.makeMoveVec({elements:s.receiver.map((e=>e.coin))}),a,e.pure.u64(s.business_index),e.pure.string(s.business_remark),e.object(r)],typeArguments:[t]})}var O=s(4313),v=s(9876),y=s(8278),C=s(9635),P=s(8091),x=s(9627),B=s(1789),V=s(8338),U=s(9298)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(this.webpackChunkwowok_agent=this.webpackChunkwowok_agent||[]).push([[620],{8620:(e,t,n)=>{var s,r,u,i;function a(e){const t=typeof e;return"string"===t?`"${e}"`:"number"===t||"bigint"===t||"boolean"===t?`${e}`:"object"===t||"function"===t?(e&&Object.getPrototypeOf(e)?.constructor?.name)??"null":t}function p(e,t,n,s,p){const o=p&&"input"in p?p.input:n.value,c=p?.expected??e.expects??null,l=p?.received??a(o),y={kind:e.kind,type:e.type,input:o,expected:c,received:l,message:`Invalid ${t}: ${c?`Expected ${c} but r`:"R"}eceived ${l}`,requirement:e.requirement,path:p?.path,issues:p?.issues,lang:s.lang,abortEarly:s.abortEarly,abortPipeEarly:s.abortPipeEarly},f="schema"===e.kind,d=p?.message??e.message??(h=e.reference,v=y.lang,i?.get(h)?.get(v))??(f?function(e){return u?.get(e)}(y.lang):null)??s.message??function(e){return r?.get(e)}(y.lang);var h,v;d&&(y.message="function"==typeof d?d(y):d),f&&(n.typed=!1),n.issues?n.issues.push(y):n.issues=[y]}function o(e,t){return Object.hasOwn(e,t)&&"__proto__"!==t&&"prototype"!==t&&"constructor"!==t}n.d(t,{FsL:()=>C,Ikc:()=>w,KCZ:()=>O,L5J:()=>z,PVZ:()=>q,RZV:()=>b,YOg:()=>v,YjP:()=>$,aig:()=>E,cl6:()=>x,euz:()=>k,g1P:()=>P,is:()=>h,lqM:()=>j,mee:()=>_,ndf:()=>y,oad:()=>g,pdi:()=>f,qgA:()=>Y,z6Y:()=>l,zMY:()=>m});var c=class extends Error{issues;constructor(e){super(e[0].message),this.name="ValiError",this.issues=e}};function l(e,t){return{kind:"validation",type:"check",reference:l,async:!1,expects:null,requirement:e,message:t,_run(e,t){return e.typed&&!this.requirement(e.value)&&p(this,"input",e,t),e}}}function y(e){return{kind:"validation",type:"integer",reference:y,async:!1,expects:null,requirement:Number.isInteger,message:e,_run(e,t){return e.typed&&!this.requirement(e.value)&&p(this,"integer",e,t),e}}}function f(e){return{kind:"transformation",type:"transform",reference:f,async:!1,operation:e,_run(e){return e.value=this.operation(e.value),e}}}function d(e,t,n){return"function"==typeof e.default?e.default(t,n):e.default}function h(e,t){return!e._run({typed:!1,value:t},{abortEarly:!0}).issues}function v(e,t){return{kind:"schema",type:"array",reference:v,expects:"Array",async:!1,item:e,message:t,_run(e,t){const n=e.value;if(Array.isArray(n)){e.typed=!0,e.value=[];for(let s=0;s<n.length;s++){const r=n[s],u=this.item._run({typed:!1,value:r},t);if(u.issues){const i={type:"array",origin:"value",input:n,key:s,value:r};for(const t of u.issues)t.path?t.path.unshift(i):t.path=[i],e.issues?.push(t);if(e.issues||(e.issues=u.issues),t.abortEarly){e.typed=!1;break}}u.typed||(e.typed=!1),e.value.push(u.value)}}else p(this,"type",e,t);return e}}}function g(e){return{kind:"schema",type:"bigint",reference:g,expects:"bigint",async:!1,message:e,_run(e,t){return"bigint"==typeof e.value?e.typed=!0:p(this,"type",e,t),e}}}function m(e){return{kind:"schema",type:"boolean",reference:m,expects:"boolean",async:!1,message:e,_run(e,t){return"boolean"==typeof e.value?e.typed=!0:p(this,"type",e,t),e}}}function b(e){return{kind:"schema",type:"lazy",reference:b,expects:"unknown",async:!1,getter:e,_run(e,t){return this.getter(e.value)._run(e,t)}}}function k(e,t){return{kind:"schema",type:"literal",reference:k,expects:a(e),async:!1,literal:e,message:t,_run(e,t){return e.value===this.literal?e.typed=!0:p(this,"type",e,t),e}}}function _(e,...t){const n={kind:"schema",type:"nullable",reference:_,expects:`${e.expects} | null`,async:!1,wrapped:e,_run(e,t){return null===e.value&&("default"in this&&(e.value=d(this,e,t)),null===e.value)?(e.typed=!0,e):this.wrapped._run(e,t)}};return 0 in t&&(n.default=t[0]),n}function x(e,...t){const n={kind:"schema",type:"nullish",reference:x,expects:`${e.expects} | null | undefined`,async:!1,wrapped:e,_run(e,t){return null!==e.value&&void 0!==e.value||("default"in this&&(e.value=d(this,e,t)),null!==e.value&&void 0!==e.value)?this.wrapped._run(e,t):(e.typed=!0,e)}};return 0 in t&&(n.default=t[0]),n}function E(e){return{kind:"schema",type:"number",reference:E,expects:"number",async:!1,message:e,_run(e,t){return"number"!=typeof e.value||isNaN(e.value)?p(this,"type",e,t):e.typed=!0,e}}}function w(e,t){return{kind:"schema",type:"object",reference:w,expects:"Object",async:!1,entries:e,message:t,_run(e,t){const n=e.value;if(n&&"object"==typeof n){e.typed=!0,e.value={};for(const s in this.entries){const r=n[s],u=this.entries[s]._run({typed:!1,value:r},t);if(u.issues){const i={type:"object",origin:"value",input:n,key:s,value:r};for(const t of u.issues)t.path?t.path.unshift(i):t.path=[i],e.issues?.push(t);if(e.issues||(e.issues=u.issues),t.abortEarly){e.typed=!1;break}}u.typed||(e.typed=!1),(void 0!==u.value||s in n)&&(e.value[s]=u.value)}}else p(this,"type",e,t);return e}}}function j(e,...t){const n={kind:"schema",type:"optional",reference:j,expects:`${e.expects} | undefined`,async:!1,wrapped:e,_run(e,t){return void 0===e.value&&("default"in this&&(e.value=d(this,e,t)),void 0===e.value)?(e.typed=!0,e):this.wrapped._run(e,t)}};return 0 in t&&(n.default=t[0]),n}function P(e,t,n){return{kind:"schema",type:"record",reference:P,expects:"Object",async:!1,key:e,value:t,message:n,_run(e,t){const n=e.value;if(n&&"object"==typeof n){e.typed=!0,e.value={};for(const s in n)if(o(n,s)){const r=n[s],u=this.key._run({typed:!1,value:s},t);if(u.issues){const i={type:"object",origin:"key",input:n,key:s,value:r};for(const t of u.issues)t.path=[i],e.issues?.push(t);if(e.issues||(e.issues=u.issues),t.abortEarly){e.typed=!1;break}}const i=this.value._run({typed:!1,value:r},t);if(i.issues){const u={type:"object",origin:"value",input:n,key:s,value:r};for(const t of i.issues)t.path?t.path.unshift(u):t.path=[u],e.issues?.push(t);if(e.issues||(e.issues=i.issues),t.abortEarly){e.typed=!1;break}}u.typed&&i.typed||(e.typed=!1),u.typed&&(e.value[u.value]=i.value)}}else p(this,"type",e,t);return e}}}function $(e){return{kind:"schema",type:"string",reference:$,expects:"string",async:!1,message:e,_run(e,t){return"string"==typeof e.value?e.typed=!0:p(this,"type",e,t),e}}}function q(e,t){return{kind:"schema",type:"tuple",reference:q,expects:"Array",async:!1,items:e,message:t,_run(e,t){const n=e.value;if(Array.isArray(n)){e.typed=!0,e.value=[];for(let s=0;s<this.items.length;s++){const r=n[s],u=this.items[s]._run({typed:!1,value:r},t);if(u.issues){const i={type:"array",origin:"value",input:n,key:s,value:r};for(const t of u.issues)t.path?t.path.unshift(i):t.path=[i],e.issues?.push(t);if(e.issues||(e.issues=u.issues),t.abortEarly){e.typed=!1;break}}u.typed||(e.typed=!1),e.value.push(u.value)}}else p(this,"type",e,t);return e}}}function A(e){let t;if(e)for(const n of e)t?t.push(...n.issues):t=n.issues;return t}function O(e,t){return{kind:"schema",type:"union",reference:O,expects:[...new Set(e.map((e=>e.expects)))].join(" | ")||"never",async:!1,options:e,message:t,_run(e,t){let n,s,r;for(const u of this.options){const i=u._run({typed:!1,value:e.value},t);if(i.typed){if(!i.issues){n=i;break}s?s.push(i):s=[i]}else r?r.push(i):r=[i]}if(n)return n;if(s){if(1===s.length)return s[0];p(this,"type",e,t,{issues:A(s)}),e.typed=!0}else{if(1===r?.length)return r[0];p(this,"type",e,t,{issues:A(r)})}return e}}}function z(){return{kind:"schema",type:"unknown",reference:z,expects:"unknown",async:!1,_run:e=>(e.typed=!0,e)}}function Y(e,t,n){const r=e._run({typed:!1,value:t},function(e){return{lang:e?.lang??s?.lang,message:e?.message,abortEarly:e?.abortEarly??s?.abortEarly,abortPipeEarly:e?.abortPipeEarly??s?.abortPipeEarly}}(n));if(r.issues)throw new c(r.issues);return r.value}function C(...e){return{...e[0],pipe:e,_run(t,n){for(let s=0;s<e.length;s++){if(t.issues&&("schema"===e[s].kind||"transformation"===e[s].kind)){t.typed=!1;break}t.issues&&(n.abortEarly||n.abortPipeEarly)||(t=e[s]._run(t,n))}return t}}}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(this.webpackChunkwowok_agent=this.webpackChunkwowok_agent||[]).push([[634],{1210:(t,e,s)=>{s.d(e,{LN:()=>c,OX:()=>i,aF:()=>r});var i,r,n=s(9554),a=s(5873),o=s(1609),_=s(5337);!function(t){t[t.POLICY_MODE_FREE=0]="POLICY_MODE_FREE",t[t.POLICY_MODE_STRICT=1]="POLICY_MODE_STRICT"}(i||(i={})),function(t){t[t.NORMAL=0]="NORMAL",t[t.WOWOK_GRANTEE=1]="WOWOK_GRANTEE",t[t.WOWOK_ORACLE=2]="WOWOK_ORACLE"}(r||(r={}));class c{permission;object;txb;get_object(){return this.object}constructor(t,e){this.txb=t,this.permission=e,this.object=""}static From(t,e,s){let i=new c(t,e);return i.object=n.Zs.TXB_OBJECT(t,s),i}static New(t,e,s,r=i.POLICY_MODE_FREE,a){n.Zs.IsValidObjects([e])||(0,_.f)(_.I.IsValidObjects,"permission"),(0,o.yW)(s)||(0,_.f)(_.I.IsValidDesription);let h=new c(t,e);return h.object=a?t.moveCall({target:n.Zs.Instance().repositoryFn("new_with_passport"),arguments:[a,t.pure.string(s),t.pure.u8(r),n.Zs.TXB_OBJECT(t,e)]}):t.moveCall({target:n.Zs.Instance().repositoryFn("new"),arguments:[t.pure.string(s),t.pure.u8(r),n.Zs.TXB_OBJECT(t,e)]}),h}launch(){return this.txb.moveCall({target:n.Zs.Instance().repositoryFn("create"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object)]})}add_data(t){c.IsValidName(t.key)||(0,_.f)(_.I.IsValidName,"add_data");let e=!0;t.data.forEach((t=>{(0,o.jE)(t.address)||(e=!1),c.IsValidValue(t.bcsBytes)||(e=!1)})),e||(0,_.f)(_.I.InvalidParam,"add_data"),void 0!==t?.value_type?t.data.forEach((e=>this.txb.moveCall({target:n.Zs.Instance().repositoryFn("add"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.address(e.address),this.txb.pure.string(t.key),this.txb.pure.u8(t.value_type),this.txb.pure.vector("u8",[...e.bcsBytes]),n.Zs.TXB_OBJECT(this.txb,this.permission)]}))):t.data.forEach((e=>this.txb.moveCall({target:n.Zs.Instance().repositoryFn("add_typed_data"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.address(e.address),this.txb.pure.string(t.key),this.txb.pure.vector("u8",[...e.bcsBytes]),n.Zs.TXB_OBJECT(this.txb,this.permission)]})))}add_data2(t){(0,o.jE)(t.address)||(0,_.f)(_.I.IsValidAddress,"add_data2");let e=!0;t.data.forEach((t=>{c.IsValidName(t.key)||(e=!1),c.IsValidValue(t.bcsBytes)||(e=!1)})),e||(0,_.f)(_.I.InvalidParam,"add_data2"),void 0!==t?.value_type?t.data.forEach((e=>this.txb.moveCall({target:n.Zs.Instance().repositoryFn("add"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.address(t.address),this.txb.pure.string(e.key),this.txb.pure.u8(t.value_type),this.txb.pure.vector("u8",[...e.bcsBytes]),n.Zs.TXB_OBJECT(this.txb,this.permission)]}))):t.data.forEach((e=>this.txb.moveCall({target:n.Zs.Instance().repositoryFn("add_typed_data"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.address(t.address),this.txb.pure.string(e.key),this.txb.pure.vector("u8",[...e.bcsBytes]),n.Zs.TXB_OBJECT(this.txb,this.permission)]})))}remove(t,e){c.IsValidName(e)||(0,_.f)(_.I.IsValidName),(0,o.jE)(t)||(0,_.f)(_.I.IsValidAddress),this.txb.moveCall({target:n.Zs.Instance().repositoryFn("remove"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.address(t),this.txb.pure.string(e),n.Zs.TXB_OBJECT(this.txb,this.permission)]})}add_reference(t,e){0!==t.length&&((0,o.ij)(t,o.jE)||(0,_.f)(_.I.IsValidArray,"add_reference"),e?this.txb.moveCall({target:n.Zs.Instance().repositoryFn("reference_add_with_passport"),arguments:[e,n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.vector("address",(0,o.SI)(t)),n.Zs.TXB_OBJECT(this.txb,this.permission)]}):this.txb.moveCall({target:n.Zs.Instance().repositoryFn("reference_add"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.vector("address",(0,o.SI)(t)),n.Zs.TXB_OBJECT(this.txb,this.permission)]}))}remove_reference(t,e,s){(0!==t.length||e)&&((0,o.ij)(t,o.jE)||(0,_.f)(_.I.IsValidArray,"remove_reference"),e?s?this.txb.moveCall({target:n.Zs.Instance().repositoryFn("reference_removeall_with_passport"),arguments:[s,n.Zs.TXB_OBJECT(this.txb,this.object),n.Zs.TXB_OBJECT(this.txb,this.permission)]}):this.txb.moveCall({target:n.Zs.Instance().repositoryFn("reference_removeall"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),n.Zs.TXB_OBJECT(this.txb,this.permission)]}):s?this.txb.moveCall({target:n.Zs.Instance().repositoryFn("reference_remove_with_passport"),arguments:[s,n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.vector("address",(0,o.SI)(t)),n.Zs.TXB_OBJECT(this.txb,this.permission)]}):this.txb.moveCall({target:n.Zs.Instance().repositoryFn("reference_remove"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.vector("address",(0,o.SI)(t)),n.Zs.TXB_OBJECT(this.txb,this.permission)]}))}add_policies(t,e){if(0===t.length)return;let s=!0;t.forEach((t=>{(0,o.yW)(t.description)&&c.IsValidName(t.key)||(s=!1)})),s||(0,_.f)(_.I.InvalidParam,"policies"),t.forEach((t=>{let s=this.txb.pure.option("u64",t?.permissionIndex?t?.permissionIndex:void 0);e?this.txb.moveCall({target:n.Zs.Instance().repositoryFn("policy_add_with_passport"),arguments:[e,n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.string(t.key),this.txb.pure.string(t.description),s,this.txb.pure.u8(t.dataType),n.Zs.TXB_OBJECT(this.txb,this.permission)]}):this.txb.moveCall({target:n.Zs.Instance().repositoryFn("policy_add"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.string(t.key),this.txb.pure.string(t.description),s,this.txb.pure.u8(t.dataType),n.Zs.TXB_OBJECT(this.txb,this.permission)]})}))}remove_policies(t,e,s){0!==t.length&&((0,o.ij)(t,c.IsValidName)||(0,_.f)(_.I.InvalidParam,"policy_keys"),s?e?this.txb.moveCall({target:n.Zs.Instance().repositoryFn("policy_removeall_with_passport"),arguments:[s,n.Zs.TXB_OBJECT(this.txb,this.object),n.Zs.TXB_OBJECT(this.txb,this.permission)]}):this.txb.moveCall({target:n.Zs.Instance().repositoryFn("policy_remove_with_passport"),arguments:[s,n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.vector("string",(0,o.SI)(t)),n.Zs.TXB_OBJECT(this.txb,this.permission)]}):e?this.txb.moveCall({target:n.Zs.Instance().repositoryFn("policy_removeall"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),n.Zs.TXB_OBJECT(this.txb,this.permission)]}):this.txb.moveCall({target:n.Zs.Instance().repositoryFn("policy_remove"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.vector("string",(0,o.SI)(t)),n.Zs.TXB_OBJECT(this.txb,this.permission)]}))}rename_policy(t,e,s){(0,o.S7)(t)&&(0,o.S7)(e)||(0,_.f)(_.I.IsValidName,"change_policy"),s?this.txb.moveCall({target:n.Zs.Instance().repositoryFn("policy_rename_with_passport"),arguments:[s,n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.string(t),this.txb.pure.string(e),n.Zs.TXB_OBJECT(this.txb,this.permission)]}):this.txb.moveCall({target:n.Zs.Instance().repositoryFn("policy_rename"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.string(t),this.txb.pure.string(e),n.Zs.TXB_OBJECT(this.txb,this.permission)]})}set_description(t,e){(0,o.yW)(t)||(0,_.f)(_.I.IsValidDesription),e?this.txb.moveCall({target:n.Zs.Instance().repositoryFn("description_set_with_passport"),arguments:[e,n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.string(t),n.Zs.TXB_OBJECT(this.txb,this.permission)]}):this.txb.moveCall({target:n.Zs.Instance().repositoryFn("description_set"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.string(t),n.Zs.TXB_OBJECT(this.txb,this.permission)]})}set_policy_mode(t,e){e?this.txb.moveCall({target:n.Zs.Instance().repositoryFn("mode_set_with_passport"),arguments:[e,n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.u8(t),n.Zs.TXB_OBJECT(this.txb,this.permission)]}):this.txb.moveCall({target:n.Zs.Instance().repositoryFn("mode_set"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.u8(t),n.Zs.TXB_OBJECT(this.txb,this.permission)]})}set_policy_description(t,e,s){c.IsValidName(t)||(0,_.f)(_.I.IsValidName,"policy"),(0,o.yW)(e)||(0,_.f)(_.I.IsValidDesription),s?this.txb.moveCall({target:n.Zs.Instance().repositoryFn("policy_description_set_with_passport"),arguments:[s,n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.string(t),this.txb.pure.string(e),n.Zs.TXB_OBJECT(this.txb,this.permission)]}):this.txb.moveCall({target:n.Zs.Instance().repositoryFn("policy_description_set"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.string(t),this.txb.pure.string(e),n.Zs.TXB_OBJECT(this.txb,this.permission)]})}set_policy_permission(t,e,s){c.IsValidName(t)||(0,_.f)(_.I.IsValidName,"policy");let i=this.txb.pure.option("u64",void 0);void 0!==e&&(a.aX.IsValidPermissionIndex(e)||(0,_.f)(_.I.IsValidPermissionIndex),i=this.txb.pure.option("u64",e)),s?this.txb.moveCall({target:n.Zs.Instance().repositoryFn("policy_permission_set_with_passport"),arguments:[s,n.Zs.TXB_OBJECT(this.txb,this.object),i,n.Zs.TXB_OBJECT(this.txb,this.permission)]}):this.txb.moveCall({target:n.Zs.Instance().repositoryFn("policy_permission_set"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),i,n.Zs.TXB_OBJECT(this.txb,this.permission)]})}change_permission(t){n.Zs.IsValidObjects([t])||(0,_.f)(_.I.IsValidObjects),this.txb.moveCall({target:n.Zs.Instance().repositoryFn("permission_set"),arguments:[n.Zs.TXB_OBJECT(this.txb,this.object),n.Zs.TXB_OBJECT(this.txb,this.permission),n.Zs.TXB_OBJECT(this.txb,t)],typeArguments:[]}),this.permission=t}static MAX_POLICY_COUNT=120;static MAX_KEY_LENGTH=128;static MAX_VALUE_LENGTH=204800;static MAX_REFERENCE_COUNT=100;static IsValidName=t=>t.length<=c.MAX_KEY_LENGTH&&0!=t.length;static IsValidValue=t=>t.length<c.MAX_VALUE_LENGTH;static rpc_de_data(t){const e=t?.map((t=>{const e=new Uint8Array(t?.data?.content?.fields?.value),s=e?.length>0?e[0]:null;var i=e.length>0?e.slice(1):Uint8Array.from([]);return s===n.eV.TYPE_STRING?(i=o.ji.getInstance().de(n.eV.TYPE_VEC_U8,i),i=(new TextDecoder).decode(Uint8Array.from(i))):s===n.eV.TYPE_VEC_STRING?i=(i=o.ji.getInstance().de(n.eV.TYPE_VEC_VEC_U8,i)).map((t=>(new TextDecoder).decode(Uint8Array.from(t)))):(i=o.ji.getInstance().de(e[0],i),s===n.eV.TYPE_ADDRESS?i="0x"+i:s===n.eV.TYPE_VEC_ADDRESS?i=i.map((t=>"0x"+t)):s===n.eV.TYPE_BOOL&&(i=i?"True":"False")),{object:t?.data?.content?.fields?.id?.id,id:t?.data?.content?.fields?.name?.fields?.id,name:t?.data?.content?.fields?.name?.fields?.key,data:i,dataType:(0,o.XF)(s)}}));return e}static DataType2ValueType(t){try{const e=BigInt(t);if(n.eV.TYPE_U8,e<=o.b_);else if(e<=o.VP)n.eV.TYPE_U64;else if(e<=o.Mc)n.eV.TYPE_U128;else{if(!(e<=o._J))return;n.eV.TYPE_U256}}catch(t){console.log(t)}}static ResolveRepositoryData=(t,e)=>{if(t===n.ml.String)return{type:n.eV.TYPE_STRING,data:o.ji.getInstance().ser(n.eV.TYPE_VEC_U8,(new TextEncoder).encode(e.toString()))};if(t===n.ml.PositiveNumber){const t=c.DataType2ValueType(e);if(!t)return;return{type:t,data:o.ji.getInstance().ser(t,e)}}if(t===n.ml.Address){if(!(0,o.jE)(e))return;return{type:n.eV.TYPE_ADDRESS,data:o.ji.getInstance().ser(n.eV.TYPE_ADDRESS,e)}}if(t===n.ml.Address_Vec){for(let t=0;t<e.length;++t)if(!(0,o.jE)(e[t]))return;return{type:n.eV.TYPE_VEC_ADDRESS,data:o.ji.getInstance().ser(n.eV.TYPE_VEC_ADDRESS,e)}}if(t===n.ml.PositiveNumber_Vec){let t=n.eV.TYPE_U8;for(let s=0;s<e.length;++s){const s=c.DataType2ValueType(e);if(!s)return;s>t&&(t=s)}return t=t===n.eV.TYPE_U8?n.eV.TYPE_VEC_U8:t===n.eV.TYPE_U64?n.eV.TYPE_VEC_U64:t===n.eV.TYPE_U128?n.eV.TYPE_VEC_U128:n.eV.TYPE_VEC_U256,{type:t,data:o.ji.getInstance().ser(t,e)}}if(t===n.ml.String_Vec){const t=e.map((t=>(new TextEncoder).encode(t)));return{type:n.eV.TYPE_VEC_STRING,data:o.ji.getInstance().ser(n.eV.TYPE_VEC_VEC_U8,t)}}if(t===n.ml.Bool){if("boolean"!=typeof e)return;return{type:n.eV.TYPE_BOOL,data:o.ji.getInstance().ser(n.eV.TYPE_BOOL,e)}}}}},4289:(t,e,s)=>{s.d(e,{k:()=>_});var i=s(9554),r=s(4285),n=s(1609),a=s(5337),o=s(8278);class _{permission;machine;object;txb;get_object(){return this.object}constructor(t,e,s){this.permission=s,this.txb=t,this.machine=e,this.object=""}static From(t,e,s,r){let n=new _(t,e,s);return n.object=i.Zs.TXB_OBJECT(t,r),n}static New(t,e,s,r,n){i.Zs.IsValidObjects([e,s])||(0,a.f)(a.I.IsValidObjects,"machine & permission");let o=new _(t,e,s),c=t.pure.option("address",r||void 0);return o.object=n?t.moveCall({target:i.Zs.Instance().progressFn("new_with_passport"),arguments:[n,c,i.Zs.TXB_OBJECT(t,e),i.Zs.TXB_OBJECT(t,s)]}):t.moveCall({target:i.Zs.Instance().progressFn("new"),arguments:[c,i.Zs.TXB_OBJECT(t,e),i.Zs.TXB_OBJECT(t,s)]}),o}launch(){return this.txb.moveCall({target:i.Zs.Instance().progressFn("create"),arguments:[i.Zs.TXB_OBJECT(this.txb,this.object)]})}set_namedOperator(t,e,s){(0,n.S7)(t)||(0,a.f)(a.I.IsValidName,"name"),t===r.u.OPERATOR_ORDER_PAYER&&(0,a.f)(a.I.InvalidParam,"name cannot be "+r.u.OPERATOR_ORDER_PAYER),(e.length>_.MAX_NAMED_OPERATOR_COUNT||!(0,n.ij)(e,n.jE))&&(0,a.f)(a.I.InvalidParam,"addresses"),s?this.txb.moveCall({target:i.Zs.Instance().progressFn("namedOperator_set_with_passport"),arguments:[s,i.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.string(t),this.txb.pure.vector("address",(0,n.SI)(e)),i.Zs.TXB_OBJECT(this.txb,this.machine),i.Zs.TXB_OBJECT(this.txb,this.permission)]}):this.txb.moveCall({target:i.Zs.Instance().progressFn("namedOperator_set"),arguments:[i.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.string(t),this.txb.pure.vector("address",(0,n.SI)(e)),i.Zs.TXB_OBJECT(this.txb,this.machine),i.Zs.TXB_OBJECT(this.txb,this.permission)]})}bind_task(t,e){(0,n.jE)(t)||(0,a.f)(a.I.IsValidAddress),e?this.txb.moveCall({target:i.Zs.Instance().progressFn("task_set_with_passport"),arguments:[e,i.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.address(t),i.Zs.TXB_OBJECT(this.txb,this.machine),i.Zs.TXB_OBJECT(this.txb,this.permission)]}):this.txb.moveCall({target:i.Zs.Instance().progressFn("task_set"),arguments:[i.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.address(t),i.Zs.TXB_OBJECT(this.txb,this.machine),i.Zs.TXB_OBJECT(this.txb,this.permission)]})}set_context_repository(t,e){t&&!i.Zs.IsValidObjects([t])&&(0,a.f)(a.I.IsValidObjects,"repository"),e?t?this.txb.moveCall({target:i.Zs.Instance().progressFn("context_repository_set_with_passport"),arguments:[e,i.Zs.TXB_OBJECT(this.txb,this.object),i.Zs.TXB_OBJECT(this.txb,t),i.Zs.TXB_OBJECT(this.txb,this.machine),i.Zs.TXB_OBJECT(this.txb,this.permission)]}):this.txb.moveCall({target:i.Zs.Instance().progressFn("context_repository_none_with_passport"),arguments:[e,i.Zs.TXB_OBJECT(this.txb,this.object),i.Zs.TXB_OBJECT(this.txb,this.machine),i.Zs.TXB_OBJECT(this.txb,this.permission)]}):t?this.txb.moveCall({target:i.Zs.Instance().progressFn("context_repository_set"),arguments:[i.Zs.TXB_OBJECT(this.txb,this.object),i.Zs.TXB_OBJECT(this.txb,t),i.Zs.TXB_OBJECT(this.txb,this.machine),i.Zs.TXB_OBJECT(this.txb,this.permission)]}):this.txb.moveCall({target:i.Zs.Instance().progressFn("context_repository_none"),arguments:[i.Zs.TXB_OBJECT(this.txb,this.object),i.Zs.TXB_OBJECT(this.txb,this.machine),i.Zs.TXB_OBJECT(this.txb,this.permission)]})}unhold(t,e){_.IsValidProgressNext(t)||(0,a.f)(a.I.InvalidParam,"unhold");const s=this.txb.sharedObjectRef(i.Zs.CLOCK_OBJECT);e?this.txb.moveCall({target:i.Zs.Instance().progressFn("unhold_with_passport"),arguments:[e,i.Zs.TXB_OBJECT(this.txb,this.object),i.Zs.TXB_OBJECT(this.txb,this.machine),this.txb.pure.string(t.next_node_name),this.txb.pure.string(t.forward),i.Zs.TXB_OBJECT(this.txb,this.permission),this.txb.object(s)]}):this.txb.moveCall({target:i.Zs.Instance().progressFn("unhold"),arguments:[i.Zs.TXB_OBJECT(this.txb,this.object),i.Zs.TXB_OBJECT(this.txb,this.machine),this.txb.pure.string(t.next_node_name),this.txb.pure.string(t.forward),i.Zs.TXB_OBJECT(this.txb,this.permission),this.txb.object(s)]})}parent_none(t){t?this.txb.moveCall({target:i.Zs.Instance().progressFn("parent_none_with_passport"),arguments:[t,i.Zs.TXB_OBJECT(this.txb,this.object),i.Zs.TXB_OBJECT(this.txb,this.machine),i.Zs.TXB_OBJECT(this.txb,this.permission)]}):this.txb.moveCall({target:i.Zs.Instance().progressFn("parent_none"),arguments:[i.Zs.TXB_OBJECT(this.txb,this.object),i.Zs.TXB_OBJECT(this.txb,this.machine),i.Zs.TXB_OBJECT(this.txb,this.permission)]})}parent(t,e){(0,n.jE)(t.parent_id)&&(0,n.aH)(t.parent_session_id)||(0,a.f)(a.I.InvalidParam,"parent"),t.next_node&&t.forward||(0,a.f)(a.I.InvalidParam,"parent"),e?this.txb.moveCall({target:i.Zs.Instance().progressFn("parent_set_with_passport"),arguments:[e,i.Zs.TXB_OBJECT(this.txb,this.object),i.Zs.TXB_OBJECT(this.txb,this.machine),this.txb.object(t.parent_id),this.txb.pure.u64(t.parent_session_id),this.txb.pure.string(t.next_node),this.txb.pure.string(t.forward),i.Zs.TXB_OBJECT(this.txb,this.permission)]}):this.txb.moveCall({target:i.Zs.Instance().progressFn("parent_set"),arguments:[i.Zs.TXB_OBJECT(this.txb,this.object),i.Zs.TXB_OBJECT(this.txb,this.machine),this.txb.object(t.parent_id),this.txb.pure.u64(t.parent_session_id),this.txb.pure.string(t.next_node),this.txb.pure.string(t.forward),i.Zs.TXB_OBJECT(this.txb,this.permission)]})}deliverable(t){(0,n.yW)(t.msg)||(0,a.f)(a.I.IsValidDesription,"deliverable.msg"),t.orders.length>0&&!i.Zs.IsValidObjects(t.orders.map((t=>t.object)))&&(0,a.f)(a.I.IsValidObjects,"deliverable.orders");const e=this.txb.moveCall({target:i.Zs.Instance().progressFn("deliverable_new"),arguments:[this.txb.pure.string(t.msg)]});return t.orders.forEach((t=>{(0,n.MA)(t.pay_token_type)||(0,a.f)(a.I.IsValidTokenType,"deliverable.orders:"+t.object),this.txb.moveCall({target:i.Zs.Instance().orderFn("as_deliverable"),arguments:[this.txb.object(t.object),e],typeArguments:[t.pay_token_type]})})),e}next(t,e,s){_.IsValidProgressNext(t)||(0,a.f)(a.I.InvalidParam,"next");const r=this.deliverable(e),n=this.txb.sharedObjectRef(i.Zs.CLOCK_OBJECT);return s?this.txb.moveCall({target:i.Zs.Instance().progressFn("next_with_passport"),arguments:[s,i.Zs.TXB_OBJECT(this.txb,this.object),i.Zs.TXB_OBJECT(this.txb,this.machine),this.txb.pure.string(t.next_node_name),this.txb.pure.string(t.forward),r,i.Zs.TXB_OBJECT(this.txb,this.permission),this.txb.object(n)]}):this.txb.moveCall({target:i.Zs.Instance().progressFn("next"),arguments:[i.Zs.TXB_OBJECT(this.txb,this.object),i.Zs.TXB_OBJECT(this.txb,this.machine),this.txb.pure.string(t.next_node_name),this.txb.pure.string(t.forward),r,i.Zs.TXB_OBJECT(this.txb,this.permission),this.txb.object(n)]})}hold(t,e){_.IsValidProgressNext(t)||(0,a.f)(a.I.InvalidParam,"hold");const s=this.txb.sharedObjectRef(i.Zs.CLOCK_OBJECT);return this.txb.moveCall({target:i.Zs.Instance().progressFn("hold"),arguments:[i.Zs.TXB_OBJECT(this.txb,this.object),i.Zs.TXB_OBJECT(this.txb,this.machine),this.txb.pure.string(t.next_node_name),this.txb.pure.string(t.forward),this.txb.pure.bool(e),i.Zs.TXB_OBJECT(this.txb,this.permission),this.txb.object(s)]})}static QueryForwardGuard=async(t,e,s,r,_)=>{if(!(t&&e&&r&&_))return void(0,a.f)(a.I.InvalidParam,"QueryForwardGuard");const c=new o.Z;c.moveCall({target:i.Zs.Instance().progressFn("query_guard"),arguments:[i.Zs.TXB_OBJECT(c,t),i.Zs.TXB_OBJECT(c,e),c.pure.string(r),c.pure.string(_)]});const h=await i.Zs.Client().devInspectTransactionBlock({sender:s,transactionBlock:c});if(1===h.results?.length&&1===h.results[0].returnValues?.length){const t=n.ji.getInstance().de("Option<address>",Uint8Array.from(h.results[0].returnValues[0][0]));return t?.some?"0x"+t?.some:void 0}};static DeSessions=t=>{let e=[];return t?.fields?.contents?.forEach((t=>{var s={next_node:t.fields.key,holders:[],weights:t.fields.value.fields.weights,threshold:t.fields.value.fields.threshold};t.fields.value.fields.forwards.fields.contents.forEach((t=>{s.holders.push({forward:t.fields.key,accomplished:t.fields.value.fields.accomplished,time:t.fields.value.fields.time,who:t.fields.value.fields.who,deliverable:{msg:t.fields.value.fields.msg,orders:t.fields.value.fields.orders??[]}})})),e.push(s)})),e};static DeHistories=t=>t?.map((t=>_.DeHistory(t?.data?.content?.fields)));static DeHistory=t=>({id:parseInt(t?.name),node:t?.value?.fields?.node,next_node:t?.value?.fields?.next_node,sessions:_.DeSessions(t?.value.fields?.session),time:t?.value?.fields?.time});static MAX_NAMED_OPERATOR_COUNT=20;static MAX_DELEVERABLE_ORDER_COUNT=20;static IsValidProgressNext=t=>(0,n.S7)(t.forward)&&(0,n.S7)(t.next_node_name)}},9554:(t,e,s)=>{s.d(e,{$Q:()=>C,A0:()=>l,Bd:()=>x,E6:()=>u,EL:()=>O,GX:()=>y,KE:()=>g,Kf:()=>d,Zs:()=>I,e$:()=>i,eV:()=>p,hu:()=>r,ml:()=>T,o8:()=>b,p_:()=>m,pl:()=>E});var i,r,n=s(9635),a=s(8091),o=s(9627),_=s(8278),c=s(1609),h=s(9298);!function(t){t.machine="machine",t.progress="progress",t.repository="repository",t.permission="permission",t.passport="passport",t.guard="guard",t.demand="demand",t.order="order",t.service="service",t.resource="resource",t.entity="entity",t.wowok="wowok",t.treasury="treasury",t.payment="payment",t.arbitration="arbitration",t.arb="arb"}(i||(i={})),function(t){t[t.TYPE_QUERY=1]="TYPE_QUERY",t[t.TYPE_NUMBER_ADD=2]="TYPE_NUMBER_ADD",t[t.TYPE_NUMBER_SUBTRACT=3]="TYPE_NUMBER_SUBTRACT",t[t.TYPE_NUMBER_MULTIPLY=4]="TYPE_NUMBER_MULTIPLY",t[t.TYPE_NUMBER_DEVIDE=5]="TYPE_NUMBER_DEVIDE",t[t.TYPE_NUMBER_MOD=6]="TYPE_NUMBER_MOD",t[t.TYPE_NUMBER_ADDRESS=7]="TYPE_NUMBER_ADDRESS",t[t.TYPE_LOGIC_AS_U256_GREATER=11]="TYPE_LOGIC_AS_U256_GREATER",t[t.TYPE_LOGIC_AS_U256_GREATER_EQUAL=12]="TYPE_LOGIC_AS_U256_GREATER_EQUAL",t[t.TYPE_LOGIC_AS_U256_LESSER=13]="TYPE_LOGIC_AS_U256_LESSER",t[t.TYPE_LOGIC_AS_U256_LESSER_EQUAL=14]="TYPE_LOGIC_AS_U256_LESSER_EQUAL",t[t.TYPE_LOGIC_AS_U256_EQUAL=15]="TYPE_LOGIC_AS_U256_EQUAL",t[t.TYPE_LOGIC_EQUAL=16]="TYPE_LOGIC_EQUAL",t[t.TYPE_LOGIC_HAS_SUBSTRING=17]="TYPE_LOGIC_HAS_SUBSTRING",t[t.TYPE_LOGIC_NOT=18]="TYPE_LOGIC_NOT",t[t.TYPE_LOGIC_AND=19]="TYPE_LOGIC_AND",t[t.TYPE_LOGIC_OR=20]="TYPE_LOGIC_OR"}(r||(r={}));const d=[[r.TYPE_LOGIC_AS_U256_GREATER,"Unsigned Integer >","The first item > anything that follows"],[r.TYPE_LOGIC_AS_U256_GREATER_EQUAL,"Unsigned Integer >=","The first item >= anything that follows"],[r.TYPE_LOGIC_AS_U256_LESSER,"Unsigned Integer <","The first item < anything that follows"],[r.TYPE_LOGIC_AS_U256_LESSER_EQUAL,"Unsigned Integer <=","The first item <= anything that follows"],[r.TYPE_LOGIC_AS_U256_EQUAL,"Unsigned Integer =","The first item = anything that follows"],[r.TYPE_LOGIC_EQUAL,"Equal","Data and type are exactly equal for all items"],[r.TYPE_LOGIC_HAS_SUBSTRING,"Has Sub String","The first string contains anything that follows"],[r.TYPE_LOGIC_NOT,"Not","Not operation"],[r.TYPE_LOGIC_AND,"And","All Items And operations"],[r.TYPE_LOGIC_OR,"Or","All Items Or operations"]];var p,T;!function(t){t[t.TYPE_BOOL=100]="TYPE_BOOL",t[t.TYPE_ADDRESS=101]="TYPE_ADDRESS",t[t.TYPE_U8=102]="TYPE_U8",t[t.TYPE_U64=103]="TYPE_U64",t[t.TYPE_VEC_U8=104]="TYPE_VEC_U8",t[t.TYPE_U128=105]="TYPE_U128",t[t.TYPE_VEC_ADDRESS=106]="TYPE_VEC_ADDRESS",t[t.TYPE_VEC_BOOL=107]="TYPE_VEC_BOOL",t[t.TYPE_VEC_VEC_U8=108]="TYPE_VEC_VEC_U8",t[t.TYPE_VEC_U64=109]="TYPE_VEC_U64",t[t.TYPE_VEC_U128=110]="TYPE_VEC_U128",t[t.TYPE_OPTION_ADDRESS=111]="TYPE_OPTION_ADDRESS",t[t.TYPE_OPTION_BOOL=112]="TYPE_OPTION_BOOL",t[t.TYPE_OPTION_U8=113]="TYPE_OPTION_U8",t[t.TYPE_OPTION_U64=114]="TYPE_OPTION_U64",t[t.TYPE_OPTION_U128=115]="TYPE_OPTION_U128",t[t.TYPE_OPTION_U256=116]="TYPE_OPTION_U256",t[t.TYPE_OPTION_STRING=117]="TYPE_OPTION_STRING",t[t.TYPE_OPTION_VEC_U8=118]="TYPE_OPTION_VEC_U8",t[t.TYPE_VEC_U256=119]="TYPE_VEC_U256",t[t.TYPE_STRING=120]="TYPE_STRING",t[t.TYPE_VEC_STRING=121]="TYPE_VEC_STRING",t[t.TYPE_U256=122]="TYPE_U256"}(p||(p={})),function(t){t[t.Address=200]="Address",t[t.Address_Vec=201]="Address_Vec",t[t.PositiveNumber=202]="PositiveNumber",t[t.PositiveNumber_Vec=203]="PositiveNumber_Vec",t[t.String=204]="String",t[t.String_Vec=205]="String_Vec",t[t.Bool=206]="Bool"}(T||(T={}));const b=[{type:T.String,name:"string",description:"String."},{type:T.Address,name:"address",description:"Object id or Personal address."},{type:T.PositiveNumber,name:"unsigned integer",description:"Including u8, u16 ,..., u256"},{type:T.String_Vec,name:"string vector",description:"Vector of string."},{type:T.Address_Vec,name:"address vector",description:"Vector of address."},{type:T.PositiveNumber_Vec,name:"unsigned integer vector",description:"Vector of unsigned integer"},{type:T.Bool,name:"bool",description:"True or False."}],l=Object.values(r).filter((t=>"number"==typeof t)),E=Object.values(p).filter((t=>"number"==typeof t)),m=t=>l.includes(t),u=t=>E.includes(t),g=t=>t===p.TYPE_U128||t===p.TYPE_U256||t===p.TYPE_U64||t===p.TYPE_U8;var O;!function(t){t[t.TYPE_SIGNER=60]="TYPE_SIGNER",t[t.TYPE_CLOCK=61]="TYPE_CLOCK",t[t.TYPE_GUARD=62]="TYPE_GUARD",t[t.TYPE_CONSTANT=80]="TYPE_CONSTANT"}(O||(O={}));const x=[{type:p.TYPE_BOOL,name:"bool",description:"boolean. eg:true or false",validator:t=>!0===t||!1===t},{type:p.TYPE_ADDRESS,name:"address",description:"address or object-id. eg:0x6789af",validator:c.jE},{type:O.TYPE_SIGNER,name:"txn signer",description:"signer address of the transaction"},{type:O.TYPE_GUARD,name:"guard address",description:"current guard address"},{type:O.TYPE_CLOCK,name:"txn time",description:"unsigned-64 number for the transaction time"},{type:p.TYPE_U64,name:"number",description:"unsigned-64 number. eg:23870233",validator:c.Ec},{type:p.TYPE_U8,name:"number",description:"unsigned-8 number. eg:255",validator:c.U5},{type:p.TYPE_VEC_U8,name:"string",description:'string or unsigned-8 number array. eg:"[1,2,3]"'},{type:p.TYPE_U128,name:"number",description:"unsigned-8 number. eg:12348900999",validator:c.ds},{type:p.TYPE_VEC_ADDRESS,name:"[address]",description:"address array. eg:[0x2277f2, 0x3344af]"},{type:p.TYPE_VEC_BOOL,name:"[bool]",description:"boolean array. eg:[true, false, true]"},{type:p.TYPE_VEC_VEC_U8,name:"[[number]]",description:'array of unsigned-8 number array. eg:["i", "like", "wowok"]'},{type:p.TYPE_VEC_U64,name:"[number]",description:"unsigned-64 number array. eg:[123, 778888, 42312]"},{type:p.TYPE_VEC_U128,name:"[number]",description:"unsigned-128 number array. eg:[123, 778888, 42312]"},{type:p.TYPE_OPTION_ADDRESS,name:"option",description:"option of address. eg:none or address"},{type:p.TYPE_OPTION_BOOL,name:"option",description:"option of bool. eg:none or boolean value"},{type:p.TYPE_OPTION_U8,name:"option",description:"option of u8. eg:none or u8 value"},{type:p.TYPE_OPTION_U64,name:"option",description:"option of u64. eg:none or u64 value"},{type:p.TYPE_OPTION_U128,name:"option",description:"option of u128. eg:none or u128 value"},{type:p.TYPE_OPTION_U256,name:"option",description:"option of u256. eg:none or u256 value"},{type:p.TYPE_VEC_U256,name:"[number]",description:"unsigned-256 number array. eg:[123, 778888, 42312]"},{type:p.TYPE_VEC_STRING,name:"[string]",description:'ascii string array. eg:["abc", "hi"]'},{type:p.TYPE_STRING,name:"string",description:'eg:"wowok"'},{type:p.TYPE_OPTION_STRING,name:"option",description:"option of string. eg:none or string value"},{type:p.TYPE_U256,name:"number",description:"unsigned-256 number. eg:12345678901233",validator:c.R0}];var C;!function(t){t.mainnet="mainnet",t.testnet="testnet",t.devnet="devnet",t.localnet="localnet"}(C||(C={}));const B="0xd9705a4f0b7ae3400d3af4ba781b2d2f6b4dc5dd81e2e1ce2bc949c16583df7f";class I{network="";packages=new Map;signer="";wowok_object="";entity_object="";treasury_cap="";oracle_object="";txb;static _instance;constructor(t=C.testnet){this.use_network(t),this.new_session()}static Instance(){return I._instance||(I._instance=new I),I._instance}static Client(){return new n.x({url:I.Instance().networkUrl()})}client(){return new n.x({url:this.networkUrl()})}use_network(t=C.testnet){switch(this.network=t,t){case C.localnet:case C.devnet:break;case C.testnet:this.packages.set("wowok","0xd1ed1921f385bb6c016070325950e87f1d0e3b6a5dcc67c7a9a7b66618f29239"),this.packages.set("base",B),this.packages.set("wowok_origin","0xd1ed1921f385bb6c016070325950e87f1d0e3b6a5dcc67c7a9a7b66618f29239"),this.packages.set("base_origin","0xd9705a4f0b7ae3400d3af4ba781b2d2f6b4dc5dd81e2e1ce2bc949c16583df7f"),this.wowok_object="0x04bc9f2680baa9e1cc1e52b329f7d7790afeb95f097b704c10116c257c5d07c4",this.entity_object="0x70623568c63000b21b7b5e180c7e5415970763335c3e3b90b1795b0fc164c60d",this.treasury_cap="0xfe7b18c27914fef876dfefd018350cfe33c45b6c5fbe5931f9449048e834da5b",this.oracle_object="0x70b4a282626aef7d31822079a1727a6576c718e9640cb30ad4c385d632138689";break;case C.mainnet:this.packages.set("wowok",""),this.packages.set("base",""),this.packages.set("wowok_origin",""),this.packages.set("base_origin",""),this.wowok_object="",this.entity_object="",this.treasury_cap="",this.oracle_object=""}}package(t){return this.packages.get(t)??""}objectWowok(){return this.wowok_object}objectEntity(){return this.entity_object}objectOracle(){return this.oracle_object}objectTreasuryCap(){return this.treasury_cap}networkUrl(){switch(this.network){case C.localnet:return"http://127.0.0.1:9000";case C.devnet:return"https://fullnode.devnet.sui.io:443";case C.testnet:return"https://fullnode.testnet.sui.io:443";case C.mainnet:return"https://fullnode.mainnet.sui.io:443"}return""}machineFn=t=>`${this.packages.get("wowok")}::${i.machine}::${t}`;progressFn=t=>`${this.packages.get("wowok")}::${i.progress}::${t}`;repositoryFn=t=>`${this.packages.get("wowok")}::${i.repository}::${t}`;permissionFn=t=>`${this.packages.get("wowok")}::${i.permission}::${t}`;passportFn=t=>`${this.packages.get("wowok")}::${i.passport}::${t}`;demandFn=t=>`${this.packages.get("wowok")}::${i.demand}::${t}`;orderFn=t=>`${this.packages.get("wowok")}::${i.order}::${t}`;serviceFn=t=>`${this.packages.get("wowok")}::${i.service}::${t}`;resourceFn=t=>`${this.packages.get("wowok")}::${i.resource}::${t}`;entityFn=t=>`${this.packages.get("wowok")}::${i.entity}::${t}`;wowokFn=t=>`${this.packages.get("wowok")}::${i.wowok}::${t}`;treasuryFn=t=>`${this.packages.get("wowok")}::${i.treasury}::${t}`;paymentFn=t=>`${this.packages.get("wowok")}::${i.payment}::${t}`;guardFn=t=>`${this.packages.get("base")}::${i.guard}::${t}`;baseWowokFn=t=>`${this.packages.get("base")}::${i.wowok}::${t}`;arbitrationFn=t=>`${this.packages.get("wowok")}::${i.arbitration}::${t}`;arbFn=t=>`${this.packages.get("wowok")}::${i.arb}::${t}`;query=async(t,e={showContent:!0})=>{const s=new n.x({url:this.networkUrl()}),i=t.map((t=>t.objectid)),r=await s.call("sui_multiGetObjects",[i,e]);for(let s=0;s<r.length;s++)t.forEach((t=>{t.callback(this,r[s],t,e)}));return r};query_raw=async(t,e={showContent:!0})=>{const s=new n.x({url:this.networkUrl()});return await s.call("sui_multiGetObjects",[t,e])};new_session=()=>(this.txb=new _.Z,this.txb);sessionCurrent=()=>this.txb?this.txb:this.new_session();sign_excute=async(t,e,s,i={showObjectChanges:!0})=>{const r=new n.x({url:this.networkUrl()});t.forEach((t=>{t(this,s)}));const _=(0,o.i)(e),c=a.h.fromSecretKey(_),h=await r.signAndExecuteTransaction({transaction:this.sessionCurrent(),signer:c,options:i});return this.txb=void 0,h};static SUI_TOKEN_TYPE="0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI";static SUI_COIN_TYPE="0x0000000000000000000000000000000000000000000000000000000000000002::coin::Coin<0x2::sui::SUI>";WOWOK_TOKEN_TYPE=()=>this.packages.get("base")+"::wowok::WOWOK";WOWOK_COIN_TYPE=()=>"0x2::coin::Coin<"+this.packages.get("base")+"::wowok::WOWOK>";COINS_TYPE=()=>{switch(this.network){case C.testnet:return this.CoinTypes_Testnet.filter((t=>!0!==t.alias));case C.mainnet:return this.CoinTypes_Mainnet.filter((t=>!0!==t.alias))}return[]};update_coinType=(t,e,s)=>{if(s&&t)switch(this.network){case C.testnet:(i=this.CoinTypes_Testnet.filter((e=>e?.type!==t))).push({symbol:s,type:t,decimals:e}),this.CoinTypes_Testnet=i;break;case C.mainnet:var i;(i=this.CoinTypes_Mainnet.filter((e=>e?.type!==t))).push({symbol:s,type:t,decimals:e}),this.CoinTypes_Mainnet=i}};explorerUrl=(t,e="object")=>this.network===C.testnet?"https://testnet.suivision.xyz/"+e+"/"+t:this.network===C.mainnet?"https://suivision.xyz/"+e+"/"+t:"";CoinTypes_Testnet=[{symbol:"SUI",type:"0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI",decimals:9,alias:!0},{symbol:"SUI",type:"0x2::sui::SUI",decimals:9},{symbol:"WOW",type:B+"::wowok::WOWOK",decimals:9}];CoinTypes_Mainnet=[{symbol:"SUI",type:"0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI",decimals:9,alias:!0},{symbol:"SUI",type:"0x2::sui::SUI",decimals:9},{symbol:"WOW",type:B+"::wowok::WOWOK",decimals:9},{symbol:"USDT",type:"0xc060006111016b8a020ad5b33834984a437aaa7d3c74c18e09a95d48aceab08c::coin::COIN",decimals:6},{symbol:"USDC",type:"0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf::coin::COIN",decimals:6},{symbol:"WETH",type:"0xaf8cd5edc19c4512f4259f0bee101a40d41ebed738ade5874359610ef8eeced5::coin::COIN",decimals:8},{symbol:"WBNB",type:"0xb848cce11ef3a8f62eccea6eb5b35a12c4c2b1ee1af7755d02d7bd6218e8226f::coin::COIN",decimals:8}];coinTypeInfo=(t,e)=>{if(!t)return"loading";return this.COINS_TYPE().find((e=>e?.type===t))||(I.Client().getCoinMetadata({coinType:t}).then((s=>{s?.decimals&&s?.symbol&&(this.update_coinType(t,s?.decimals,s?.symbol),e({symbol:s.symbol,decimals:s.decimals,type:t}))})).catch((t=>{console.log(t)})),"loading")};static CLOCK_OBJECT={objectId:"0x6",mutable:!1,initialSharedVersion:1};static TXB_OBJECT(t,e){return"string"==typeof e?t.object(e):e}static IsValidObjects=t=>(0,c.ij)(t,(t=>!(!t||"string"==typeof t&&!(0,h.qD)(t))));WOWOK_OBJECTS_TYPE=()=>Object.keys(i).map((t=>(t===i.guard?this.packages.get("base"):this.packages.get("wowok"))+"::"+t+"::"+(0,c.ZH)(t)));WOWOK_OBJECTS_PREFIX_TYPE=()=>Object.keys(i).map((t=>(t===i.guard?this.packages.get("base"):this.packages.get("wowok"))+"::"+t+"::"));hasPackage(t){for(let e of this.packages.values())if(t.includes(e))return!0;return!1}object_name_from_type_repr=t=>{if(!t)return"";let e=t.indexOf("::");if(e>0&&this.hasPackage(t.slice(0,e))){e=t.indexOf("<"),e>0&&(t=t.slice(0,e));let s=t.lastIndexOf("::");if(s>0)return t.slice(s+2)}return""};module_object_name_from_type_repr=t=>{if(!t)return"";let e=t.indexOf("::");if(e>0&&this.hasPackage(t.slice(0,e))){e=t.indexOf("<"),e>0&&(t=t.slice(0,e));let s=t.indexOf("::");if(s>0)return t.slice(s+2)}return""}}class y{static Object_Type_Extra=()=>{let t=Object.keys(i).map((t=>t+"::"+(0,c.ZH)(t)));return t.push("order::Discount"),t};static objectids_from_response=(t,e,s)=>{let i=new Map;return e?.objectChanges&&e.objectChanges.forEach((e=>{y.Object_Type_Extra().forEach((s=>{"created"==e.type&&t.module_object_name_from_type_repr(e.objectType)===s&&(i.has(s)?i.get(s)?.push(e.objectId):i.set(s,[e.objectId]))}))})),s&&i.forEach(((t,e)=>{s.has(e)?s.set(e,s.get(e).concat(t)):s.set(e,t)})),i}}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(this.webpackChunkwowok_agent=this.webpackChunkwowok_agent||[]).push([[652],{99:(e,t,r)=>{r.d(t,{c:()=>i,i:()=>n});const n="1.7.0",i="1.32.0"},747:(e,t,r)=>{r.d(t,{N:()=>s});var n=r(621),i=r(4364);function s(e){function t(t,r){if("string"==typeof t)return e(o(t).serialize(r));if(t instanceof Uint8Array||(0,n.d_)(t))return e(t);throw new Error("tx.pure must be called either a bcs type name, or a serialized bcs value")}return t.u8=t=>e(i.jy.U8.serialize(t)),t.u16=t=>e(i.jy.U16.serialize(t)),t.u32=t=>e(i.jy.U32.serialize(t)),t.u64=t=>e(i.jy.U64.serialize(t)),t.u128=t=>e(i.jy.U128.serialize(t)),t.u256=t=>e(i.jy.U256.serialize(t)),t.bool=t=>e(i.jy.Bool.serialize(t)),t.string=t=>e(i.jy.String.serialize(t)),t.address=t=>e(i.jy.Address.serialize(t)),t.id=t.address,t.vector=(t,r)=>e(i.jy.vector(o(t)).serialize(r)),t.option=(t,r)=>e(i.jy.option(o(t)).serialize(r)),t}function o(e){switch(e){case"u8":return i.jy.u8();case"u16":return i.jy.u16();case"u32":return i.jy.u32();case"u64":return i.jy.u64();case"u128":return i.jy.u128();case"u256":return i.jy.u256();case"bool":return i.jy.bool();case"string":return i.jy.string();case"id":case"address":return i.jy.Address}const t=e.match(/^(vector|option)<(.+)>$/);if(t){const[e,r]=t.slice(1);return"vector"===e?i.jy.vector(o(r)):i.jy.option(o(r))}throw new Error(`Invalid Pure type name: ${e}`)}},801:(e,t,r)=>{r.d(t,{n:()=>s});const n=/^(?!.*(^(?!@)|[-.@])($|[-.@]))(?:[a-z0-9-]{0,63}(?:\.[a-z0-9-]{0,63})*)?@[a-z0-9-]{0,63}$/i,i=/^(?!.*(^|[-.])($|[-.]))(?:[a-z0-9-]{0,63}\.)+sui$/i;function s(e,t="at"){const r=e.toLowerCase();let s;if(r.includes("@")){if(!n.test(r))throw new Error(`Invalid SuiNS name ${e}`);const[t,i]=r.split("@");s=[...t?t.split("."):[],i]}else{if(!i.test(r))throw new Error(`Invalid SuiNS name ${e}`);s=r.split(".").slice(0,-1)}return"dot"===t?`${s.join(".")}.sui`:`${s.slice(0,-1).join(".")}@${s[s.length-1]}`}},833:(e,t,r)=>{r.d(t,{g3:()=>g,oO:()=>h,yq:()=>p});var n=r(4364),i=r(7388),s=r(9298);const o="object",a="ID",u="ascii",c="String",l="string",d="String",y="option",f="Option";function p(e){const t="object"==typeof e.body&&"datatype"in e.body?e.body.datatype:null;return!!t&&(0,s.t4)(t.package)===(0,s.t4)("0x2")&&"tx_context"===t.module&&"TxContext"===t.type}function g(e){if("string"==typeof e)switch(e){case"address":return n.jy.Address;case"bool":return n.jy.Bool;case"u8":return n.jy.U8;case"u16":return n.jy.U16;case"u32":return n.jy.U32;case"u64":return n.jy.U64;case"u128":return n.jy.U128;case"u256":return n.jy.U256;default:throw new Error(`Unknown type signature ${e}`)}if("vector"in e){if("u8"===e.vector)return n.jy.vector(n.jy.U8).transform({input:e=>"string"==typeof e?(new TextEncoder).encode(e):e,output:e=>e});const t=g(e.vector);return t?n.jy.vector(t):null}if("datatype"in e){const t=(0,s.t4)(e.datatype.package);if(t===(0,s.t4)(i.Yy)){if(e.datatype.module===u&&e.datatype.type===c)return n.jy.String;if(e.datatype.module===l&&e.datatype.type===d)return n.jy.String;if(e.datatype.module===y&&e.datatype.type===f){const t=g(e.datatype.typeParameters[0]);return t?n.jy.vector(t):null}}if(t===(0,s.t4)(i.C6)&&e.datatype.module===o&&e.datatype.type===a)return n.jy.Address}return null}function h(e){return"object"==typeof e&&"Reference"in e?{ref:"&",body:j(e.Reference)}:"object"==typeof e&&"MutableReference"in e?{ref:"&mut",body:j(e.MutableReference)}:{ref:null,body:j(e)}}function j(e){if("string"==typeof e)switch(e){case"Address":return"address";case"Bool":return"bool";case"U8":return"u8";case"U16":return"u16";case"U32":return"u32";case"U64":return"u64";case"U128":return"u128";case"U256":return"u256";default:throw new Error(`Unexpected type ${e}`)}if("Vector"in e)return{vector:j(e.Vector)};if("Struct"in e)return{datatype:{package:e.Struct.address,module:e.Struct.module,type:e.Struct.name,typeParameters:e.Struct.typeArguments.map(j)}};if("TypeParameter"in e)return{typeParameter:e.TypeParameter};throw new Error(`Unexpected type ${JSON.stringify(e)}`)}},6092:(e,t,r)=>{r.d(t,{eu:()=>k});var n=r(9440),i=r(4278),s=r(1646),o=r(3274),a=r(7745);function u(e){if(1!==e.length)throw new Error("Invalid base64Url character: "+e);const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".indexOf(e);if(-1===t)throw new Error("Invalid base64Url character: "+e);const r=t.toString(2).padStart(6,"0");return Array.from(r).map(Number)}function c(e,t){const r=function(e,t){if(e.length<2)throw new Error(`Input (s = ${e}) is not tightly packed because s.length < 2`);let r=function(e){let t=[];for(let r=0;r<e.length;r++){const n=u(e.charAt(r));t=t.concat(n)}return t}(e);const n=t%4;if(0===n);else if(1===n)r=r.slice(2);else{if(2!==n)throw new Error(`Input (s = ${e}) is not tightly packed because i%4 = 3 (i = ${t}))`);r=r.slice(4)}const i=(t+e.length-1)%4;if(3===i);else if(2===i)r=r.slice(0,r.length-2);else{if(1!==i)throw new Error(`Input (s = ${e}) is not tightly packed because (i + s.length - 1)%4 = 0 (i = ${t}))`);r=r.slice(0,r.length-4)}if(r.length%8!=0)throw new Error("We should never reach here...");const s=new Uint8Array(Math.floor(r.length/8));let o=0;for(let e=0;e<r.length;e+=8){const t=r.slice(e,e+8),n=parseInt(t.join(""),2);s[o++]=n}return(new TextDecoder).decode(s)}(e.value,e.indexMod4),[n,i]=function(e){if("}"!==e.slice(-1)&&","!==e.slice(-1))throw new Error("Invalid claim");const t=JSON.parse("{"+e.slice(0,-1)+"}");if(1!==Object.keys(t).length)throw new Error("Invalid claim");const r=Object.keys(t)[0];return[r,t[r]]}(r);if(n!==t)throw new Error(`Invalid field name: found ${n} expected ${t}`);return i}var l=r(5412);const d=l.j.struct("ZkLoginSignature",{inputs:l.j.struct("ZkLoginSignatureInputs",{proofPoints:l.j.struct("ZkLoginSignatureInputsProofPoints",{a:l.j.vector(l.j.string()),b:l.j.vector(l.j.vector(l.j.string())),c:l.j.vector(l.j.string())}),issBase64Details:l.j.struct("ZkLoginSignatureInputsClaim",{value:l.j.string(),indexMod4:l.j.u8()}),headerBase64:l.j.string(),addressSeed:l.j.string()}),maxEpoch:l.j.u64(),userSignature:l.j.vector(l.j.u8())});var y=r(4976);var f,p,g=e=>{throw TypeError(e)},h=(e,t,r)=>t.has(e)||g("Cannot "+r),j=(e,t,r)=>(h(e,t,"read from private field"),r?r.call(e):t.get(e)),w=(e,t,r)=>t.has(e)?g("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),b=(e,t,r,n)=>(h(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);const S=class e extends i.J{constructor(e,{client:t}={}){super(),w(this,f),w(this,p),b(this,p,t),"string"==typeof e?b(this,f,(0,n.Z)(e)):e instanceof Uint8Array?b(this,f,e):b(this,f,Uint8Array.from(e))}equals(e){return super.equals(e)}toRawBytes(){return j(this,f)}flag(){return s.uD.ZkLogin}async verify(e,t){throw Error("does not support")}verifyPersonalMessage(t,r){const i=k(r);return U({address:new e(i.publicKey).toSuiAddress(),bytes:(0,n.o)(t),signature:i.serializedSignature,intentScope:"PERSONAL_MESSAGE",client:j(this,p)})}verifyTransaction(t,r){const i=k(r);return U({address:new e(i.publicKey).toSuiAddress(),bytes:(0,n.o)(t),signature:i.serializedSignature,intentScope:"TRANSACTION_DATA",client:j(this,p)})}};f=new WeakMap,p=new WeakMap;let v=S;const m=(0,a.UG)("\n\tquery Zklogin(\n\t\t$bytes: Base64!\n\t\t$signature: Base64!\n\t\t$intentScope: ZkLoginIntentScope!\n\t\t$author: SuiAddress!\n\t) {\n\t\tverifyZkloginSignature(\n\t\t\tbytes: $bytes\n\t\t\tsignature: $signature\n\t\t\tintentScope: $intentScope\n\t\t\tauthor: $author\n\t\t) {\n\t\t\tsuccess\n\t\t\terrors\n\t\t}\n\t}\n");async function U({address:e,bytes:t,signature:r,intentScope:n,client:i=new o.A({url:"https://sui-mainnet.mystenlabs.com/graphql"})}){const s=await i.query({query:m,variables:{bytes:t,signature:r,intentScope:n,author:e}});return!0===s.data?.verifyZkloginSignature.success&&0===s.data?.verifyZkloginSignature.errors.length}function k(e){const t="string"==typeof e?(0,n.Z)(e):e;if(t[0]!==s.uD.ZkLogin)throw new Error("Invalid signature scheme");const r=t.slice(1),{inputs:i,maxEpoch:o,userSignature:a}=function(e){return d.parse("string"==typeof e?(0,n.Z)(e):e)}(r),{issBase64Details:u,addressSeed:l}=i,f=c(u,"iss"),p=function(e,t){const r=function(e,t){const r=e.toString(16);return(0,y.aT)(r.padStart(2*t,"0").slice(2*-t))}(e,32),n=(new TextEncoder).encode(t),i=new Uint8Array(1+n.length+r.length);return i.set([n.length],0),i.set(n,1),i.set(r,1+n.length),new v(i,void 0)}(BigInt(l),f);return{serializedSignature:(0,n.o)(t),signatureScheme:"ZkLogin",zkLogin:{inputs:i,maxEpoch:o,userSignature:a,iss:f,addressSeed:BigInt(l)},signature:t,publicKey:p.toRawBytes()}}},7388:(e,t,r)=>{r.d(t,{Ac:()=>o,C6:()=>s,Yy:()=>i});var n=r(9298);BigInt(1e9);const i="0x1",s="0x2",o=((0,n.fN)("0x6"),`${s}::sui::SUI`);(0,n.fN)("0x5")},7668:(e,t,r)=>{r.d(t,{_t:()=>i});var n=r(9298);function i(e){return"string"==typeof e?(0,n.t4)(e):e.Object?e.Object.ImmOrOwnedObject?(0,n.t4)(e.Object.ImmOrOwnedObject.objectId):e.Object.Receiving?(0,n.t4)(e.Object.Receiving.objectId):(0,n.t4)(e.Object.SharedObject.objectId):e.UnresolvedObject?(0,n.t4)(e.UnresolvedObject.objectId):void 0}},8978:(e,t,r)=>{function n(e){function t(t){return e(t)}return t.system=()=>t("0x5"),t.clock=()=>t("0x6"),t.random=()=>t("0x8"),t.denyList=()=>t("0x403"),t}r.d(t,{O:()=>n})},9298:(e,t,r)=>{r.d(t,{AP:()=>a,fN:()=>l,n4:()=>s,qD:()=>u,t4:()=>c,wn:()=>o});var n=r(9835);const i=32;function s(e){try{return(0,n.Q)(e).length===i}catch(e){return!1}}const o=32;function a(e){return function(e){return/^(0x|0X)?[a-fA-F0-9]+$/.test(e)&&e.length%2==0}(e)&&function(e){return/^(0x|0X)/.test(e)?(e.length-2)/2:e.length/2}(e)===o}function u(e){return a(e)}function c(e,t=!1){let r=e.toLowerCase();return!t&&r.startsWith("0x")&&(r=r.slice(2)),`0x${r.padStart(2*o,"0")}`}function l(e,t=!1){return c(e,t)}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(this.webpackChunkwowok_agent=this.webpackChunkwowok_agent||[]).push([[658],{2748:(e,t,n)=>{n.d(t,{G:()=>i});var s=n(9440),r=n(9298);const i={Pure:function(e){return{$kind:"Pure",Pure:{bytes:e instanceof Uint8Array?(0,s.o)(e):e.toBase64()}}},ObjectRef:({objectId:e,digest:t,version:n})=>({$kind:"Object",Object:{$kind:"ImmOrOwnedObject",ImmOrOwnedObject:{digest:t,version:n,objectId:(0,r.t4)(e)}}}),SharedObjectRef:({objectId:e,mutable:t,initialSharedVersion:n})=>({$kind:"Object",Object:{$kind:"SharedObject",SharedObject:{mutable:t,initialSharedVersion:n,objectId:(0,r.t4)(e)}}}),ReceivingRef:({objectId:e,digest:t,version:n})=>({$kind:"Object",Object:{$kind:"Receiving",Receiving:{digest:t,version:n,objectId:(0,r.t4)(e)}}})}},3274:(e,t,n)=>{n.d(t,{A:()=>g});var s,r,i,a,o=n(9770),c=e=>{throw TypeError(e)},d=(e,t,n)=>t.has(e)||c("Cannot "+n),u=(e,t,n)=>(d(e,t,"read from private field"),n?n.call(e):t.get(e)),h=(e,t,n)=>t.has(e)?c("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),l=(e,t,n,s)=>(d(e,t,"write to private field"),s?s.call(e,n):t.set(e,n),n);class p extends Error{}class g{constructor({url:e,fetch:t=fetch,headers:n={},queries:o={}}){h(this,s),h(this,r),h(this,i),h(this,a),l(this,s,e),l(this,r,o),l(this,i,n),l(this,a,((...e)=>t(...e)))}async query(e){const t=await u(this,a).call(this,u(this,s),{method:"POST",headers:{"Content-Type":"application/json",...u(this,i)},body:JSON.stringify({query:"string"==typeof e.query?String(e.query):(0,o.y)(e.query),variables:e.variables,extensions:e.extensions,operationName:e.operationName})});if(!t.ok)throw new p(`GraphQL request failed: ${t.statusText} (${t.status})`);return await t.json()}async execute(e,t){return this.query({...t,query:u(this,r)[e]})}}s=new WeakMap,r=new WeakMap,i=new WeakMap,a=new WeakMap},7745:(e,t,n)=>{n.d(t,{UG:()=>s});const s=(0,n(2439).Se)()},8091:(e,t,n)=>{n.d(t,{h:()=>b});var s=n(8947),r=n(1789),i=n(1075),a=n(4329),o=n(1454),c=n(2341);const d=new RegExp("^m(\\/[0-9]+')+$"),u=e=>e.replace("'",""),h=(e,t,n=2147483648)=>{if(!(e=>!!d.test(e)&&!e.split("/").slice(1).map(u).some(isNaN))(e))throw new Error("Invalid derivation path");const{key:s,chainCode:r}=(e=>{const t=o.w.create(c.Zf,"ed25519 seed").update((0,a.i)(e)).digest();return{key:t.slice(0,32),chainCode:t.slice(32)}})(t);return e.split("/").slice(1).map(u).map((e=>parseInt(e,10))).reduce(((e,t)=>(({key:e,chainCode:t},n)=>{const s=new ArrayBuffer(4);new DataView(s).setUint32(0,n);const r=new Uint8Array(1+e.length+s.byteLength);r.set(new Uint8Array(1).fill(0)),r.set(e,1),r.set(new Uint8Array(s,0,s.byteLength),e.length+1);const i=o.w.create(c.Zf,t).update(r).digest();return{key:i.slice(0,32),chainCode:i.slice(32)}})(e,t+n)),{key:s,chainCode:r})};var l=n(9440),p=n(4278),g=n(1646),f=n(6132);class m extends p.J{constructor(e){if(super(),"string"==typeof e?this.data=(0,l.Z)(e):e instanceof Uint8Array?this.data=e:this.data=Uint8Array.from(e),32!==this.data.length)throw new Error(`Invalid public key input. Expected 32 bytes, got ${this.data.length}`)}equals(e){return super.equals(e)}toRawBytes(){return this.data}flag(){return g.uD.ED25519}async verify(e,t){let n;if("string"==typeof t){const e=(0,f.Y)(t);if("ED25519"!==e.signatureScheme)throw new Error("Invalid signature scheme");if(!(0,p.O)(this.toRawBytes(),e.publicKey))throw new Error("Signature does not match public key");n=e.signature}else n=t;return s.sign.detached.verify(e,n,this.toRawBytes())}}m.SIZE=32;const y="m/44'/784'/0'/0'/0'";class b extends r.AX{constructor(e){super(),this.keypair=e||s.sign.keyPair()}getKeyScheme(){return"ED25519"}static generate(){return new b(s.sign.keyPair())}static fromSecretKey(e,t){const n=e.length;if(n!==r.uS)throw new Error(`Wrong secretKey size. Expected ${r.uS} bytes, got ${n}.`);const i=s.sign.keyPair.fromSeed(e);if(!t||!t.skipValidation){const e=(new TextEncoder).encode("sui validation"),t=s.sign.detached(e,i.secretKey);if(!s.sign.detached.verify(e,t,i.publicKey))throw new Error("provided secretKey is invalid")}return new b(i)}getPublicKey(){return new m(this.keypair.publicKey)}getSecretKey(){return(0,r.yk)(this.keypair.secretKey.slice(0,r.uS),this.getKeyScheme())}async sign(e){return s.sign.detached(e,this.keypair.secretKey)}static deriveKeypair(e,t){if(null==t&&(t=y),!(0,i.jh)(t))throw new Error("Invalid derivation path");const{key:n}=h(t,(0,i.SB)(e));return b.fromSecretKey(n)}static deriveKeypairFromSeed(e,t){if(null==t&&(t=y),!(0,i.jh)(t))throw new Error("Invalid derivation path");const{key:n}=h(t,e);return b.fromSecretKey(n)}}},8278:(e,t,n)=>{n.d(t,{Z:()=>z,b:()=>U});var s=n(9440),r=n(621),i=n(8620),a=n(9298),o=n(1801);const c={MoveCall(e){const[t,n="",s=""]="target"in e?e.target.split("::"):[e.package,e.module,e.function];return{$kind:"MoveCall",MoveCall:{package:t,module:n,function:s,typeArguments:e.typeArguments??[],arguments:e.arguments??[]}}},TransferObjects:(e,t)=>({$kind:"TransferObjects",TransferObjects:{objects:e.map((e=>(0,i.qgA)(o.ef,e))),address:(0,i.qgA)(o.ef,t)}}),SplitCoins:(e,t)=>({$kind:"SplitCoins",SplitCoins:{coin:(0,i.qgA)(o.ef,e),amounts:t.map((e=>(0,i.qgA)(o.ef,e)))}}),MergeCoins:(e,t)=>({$kind:"MergeCoins",MergeCoins:{destination:(0,i.qgA)(o.ef,e),sources:t.map((e=>(0,i.qgA)(o.ef,e)))}}),Publish:({modules:e,dependencies:t})=>({$kind:"Publish",Publish:{modules:e.map((e=>"string"==typeof e?e:(0,s.o)(new Uint8Array(e)))),dependencies:t.map((e=>(0,a.fN)(e)))}}),Upgrade:({modules:e,dependencies:t,package:n,ticket:r})=>({$kind:"Upgrade",Upgrade:{modules:e.map((e=>"string"==typeof e?e:(0,s.o)(new Uint8Array(e)))),dependencies:t.map((e=>(0,a.fN)(e))),package:n,ticket:(0,i.qgA)(o.ef,r)}}),MakeMoveVec:({type:e,elements:t})=>({$kind:"MakeMoveVec",MakeMoveVec:{type:e??null,elements:t.map((e=>(0,i.qgA)(o.ef,e)))}}),Intent:({name:e,inputs:t={},data:n={}})=>({$kind:"$Intent",$Intent:{name:e,inputs:Object.fromEntries(Object.entries(t).map((([e,t])=>[e,Array.isArray(t)?t.map((e=>(0,i.qgA)(o.ef,e))):(0,i.qgA)(o.ef,t)]))),data:n}})};var d=n(9793),u=n(9800),h=n(2748),l=n(8116),p=n(8978),g=n(747),f=n(9835),m=n(4364),y=n(8377);function b(e){return(0,a.t4)(e).replace("0x","")}class w{constructor(e){this.version=2,this.sender=e?.sender??null,this.expiration=e?.expiration??null,this.inputs=e?.inputs??[],this.commands=e?.commands??[],this.gasData=e?.gasData??{budget:null,price:null,owner:null,payment:null}}static fromKindBytes(e){const t=m.jy.TransactionKind.parse(e).ProgrammableTransaction;if(!t)throw new Error("Unable to deserialize from bytes.");return w.restore({version:2,sender:null,expiration:null,gasData:{budget:null,owner:null,payment:null,price:null},inputs:t.inputs,commands:t.commands})}static fromBytes(e){const t=m.jy.TransactionData.parse(e),n=t?.V1,s=n.kind.ProgrammableTransaction;if(!n||!s)throw new Error("Unable to deserialize from bytes.");return w.restore({version:2,sender:n.sender,expiration:n.expiration,gasData:n.gasData,inputs:s.inputs,commands:s.commands})}static restore(e){return 2===e.version?new w((0,i.qgA)(o.pl,e)):new w((0,i.qgA)(o.pl,(0,d.ef)(e)))}static getDigestFromBytes(e){const t=(0,y.Z)("TransactionData",e);return(0,f.x)(t)}get gasConfig(){return this.gasData}set gasConfig(e){this.gasData=e}build({maxSizeBytes:e=1/0,overrides:t,onlyTransactionKind:n}={}){const s=this.inputs,r=this.commands,i={ProgrammableTransaction:{inputs:s,commands:r}};if(n)return m.jy.TransactionKind.serialize(i,{maxSize:e}).toBytes();const a=t?.expiration??this.expiration,o=t?.sender??this.sender,c={...this.gasData,...t?.gasConfig,...t?.gasData};if(!o)throw new Error("Missing transaction sender");if(!c.budget)throw new Error("Missing gas budget");if(!c.payment)throw new Error("Missing gas payment");if(!c.price)throw new Error("Missing gas price");const d={sender:b(o),expiration:a||{None:!0},gasData:{payment:c.payment,owner:b(this.gasData.owner??o),price:BigInt(c.price),budget:BigInt(c.budget)},kind:{ProgrammableTransaction:{inputs:s,commands:r}}};return m.jy.TransactionData.serialize({V1:d},{maxSize:e}).toBytes()}addInput(e,t){const n=this.inputs.length;return this.inputs.push(t),{Input:n,type:e,$kind:"Input"}}getInputUses(e,t){this.mapArguments(((n,s)=>("Input"===n.$kind&&n.Input===e&&t(n,s),n)))}mapArguments(e){for(const t of this.commands)switch(t.$kind){case"MoveCall":t.MoveCall.arguments=t.MoveCall.arguments.map((n=>e(n,t)));break;case"TransferObjects":t.TransferObjects.objects=t.TransferObjects.objects.map((n=>e(n,t))),t.TransferObjects.address=e(t.TransferObjects.address,t);break;case"SplitCoins":t.SplitCoins.coin=e(t.SplitCoins.coin,t),t.SplitCoins.amounts=t.SplitCoins.amounts.map((n=>e(n,t)));break;case"MergeCoins":t.MergeCoins.destination=e(t.MergeCoins.destination,t),t.MergeCoins.sources=t.MergeCoins.sources.map((n=>e(n,t)));break;case"MakeMoveVec":t.MakeMoveVec.elements=t.MakeMoveVec.elements.map((n=>e(n,t)));break;case"Upgrade":t.Upgrade.ticket=e(t.Upgrade.ticket,t);break;case"$Intent":const n=t.$Intent.inputs;t.$Intent.inputs={};for(const[s,r]of Object.entries(n))t.$Intent.inputs[s]=Array.isArray(r)?r.map((n=>e(n,t))):e(r,t);break;case"Publish":break;default:throw new Error(`Unexpected transaction kind: ${t.$kind}`)}}replaceCommand(e,t){if(!Array.isArray(t))return void(this.commands[e]=t);const n=t.length-1;this.commands.splice(e,1,...t),0!==n&&this.mapArguments((t=>{switch(t.$kind){case"Result":t.Result>e&&(t.Result+=n);break;case"NestedResult":t.NestedResult[0]>e&&(t.NestedResult[0]+=n)}return t}))}getDigest(){const e=this.build({onlyTransactionKind:!1});return w.getDigestFromBytes(e)}snapshot(){return(0,i.qgA)(o.pl,this)}}var k,j,v,S,O,C,$,M,A,I=n(7668),P=e=>{throw TypeError(e)},E=(e,t,n)=>t.has(e)||P("Cannot "+n),T=(e,t,n)=>(E(e,t,"read from private field"),n?n.call(e):t.get(e)),x=(e,t,n)=>t.has(e)?P("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),R=(e,t,n,s)=>(E(e,t,"write to private field"),s?s.call(e,n):t.set(e,n),n),q=(e,t,n)=>(E(e,t,"access private method"),n);const D=Symbol.for("@mysten/transaction");function U(e){return!!e&&"object"==typeof e&&!0===e[D]}const K={buildPlugins:[],serializationPlugins:[]},N=Symbol.for("@mysten/transaction/registry");function B(){try{const e=globalThis;return e[N]||(e[N]=K),e[N]}catch(e){return K}}k=new WeakMap,j=new WeakMap,v=new WeakMap,S=new WeakMap,O=new WeakSet,C=function(e){return(0,r.d_)(e)?this.pure(e):q(this,O,$).call(this,e)},$=function(e){return"function"==typeof e?(0,i.qgA)(o.ef,e(this)):(0,i.qgA)(o.ef,e)},M=async function(e){if(!e.onlyTransactionKind&&!T(this,S).sender)throw new Error("Missing transaction sender");await q(this,O,A).call(this,[...T(this,j),l.J],e)},A=async function(e,t){const n=s=>{if(s>=e.length)return()=>{};const r=e[s];return async()=>{const e=n(s+1);let i=!1,a=!1;if(await r(T(this,S),t,(async()=>{if(i)throw new Error(`next() was call multiple times in TransactionPlugin ${s}`);i=!0,await e(),a=!0})),!i)throw new Error(`next() was not called in TransactionPlugin ${s}`);if(!a)throw new Error(`next() was not awaited in TransactionPlugin ${s}`)}};await n(0)()};let z=class e{constructor(){x(this,O),x(this,k),x(this,j),x(this,v,new Map),x(this,S),this.object=(0,p.O)((e=>{if("function"==typeof e)return this.object(e(this));if("object"==typeof e&&(0,i.is)(o.ef,e))return e;const t=(0,I._t)(e),n=T(this,S).inputs.find((e=>t===(0,I._t)(e)));return n?.Object?.SharedObject&&"object"==typeof e&&e.Object?.SharedObject&&(n.Object.SharedObject.mutable=n.Object.SharedObject.mutable||e.Object.SharedObject.mutable),n?{$kind:"Input",Input:T(this,S).inputs.indexOf(n),type:"object"}:T(this,S).addInput("object","string"==typeof e?{$kind:"UnresolvedObject",UnresolvedObject:{objectId:(0,a.t4)(e)}}:e)}));const e=B();R(this,S,new w),R(this,j,[...e.buildPlugins]),R(this,k,[...e.serializationPlugins])}static fromKind(t){const n=new e;return R(n,S,w.fromKindBytes("string"==typeof t?(0,s.Z)(t):t)),n}static from(t){const n=new e;return U(t)?R(n,S,new w(t.getData())):"string"==typeof t&&t.startsWith("{")?R(n,S,w.restore(JSON.parse(t))):R(n,S,w.fromBytes("string"==typeof t?(0,s.Z)(t):t)),n}static registerGlobalSerializationPlugin(e){B().serializationPlugins.push(e)}static registerGlobalBuildPlugin(e){B().buildPlugins.push(e)}addSerializationPlugin(e){T(this,k).push(e)}addBuildPlugin(e){T(this,j).push(e)}addIntentResolver(e,t){if(T(this,v).has(e)&&T(this,v).get(e)!==t)throw new Error(`Intent resolver for ${e} already exists`);T(this,v).set(e,t)}setSender(e){T(this,S).sender=e}setSenderIfNotSet(e){T(this,S).sender||(T(this,S).sender=e)}setExpiration(e){T(this,S).expiration=e?(0,i.qgA)(o.ko,e):null}setGasPrice(e){T(this,S).gasConfig.price=String(e)}setGasBudget(e){T(this,S).gasConfig.budget=String(e)}setGasBudgetIfNotSet(e){null==T(this,S).gasData.budget&&(T(this,S).gasConfig.budget=String(e))}setGasOwner(e){T(this,S).gasConfig.owner=e}setGasPayment(e){T(this,S).gasConfig.payment=e.map((e=>(0,i.qgA)(o.xJ,e)))}get blockData(){return(0,d.Sm)(T(this,S).snapshot())}getData(){return T(this,S).snapshot()}get[D](){return!0}get pure(){return Object.defineProperty(this,"pure",{enumerable:!1,value:(0,g.N)((e=>(0,r.d_)(e)?T(this,S).addInput("pure",{$kind:"Pure",Pure:{bytes:e.toBase64()}}):T(this,S).addInput("pure",(0,i.is)(o.QR,e)?(0,i.qgA)(o.QR,e):e instanceof Uint8Array?h.G.Pure(e):{$kind:"UnresolvedPure",UnresolvedPure:{value:e}})))}),this.pure}get gas(){return{$kind:"GasCoin",GasCoin:!0}}objectRef(...e){return this.object(h.G.ObjectRef(...e))}receivingRef(...e){return this.object(h.G.ReceivingRef(...e))}sharedObjectRef(...e){return this.object(h.G.SharedObjectRef(...e))}add(e){return"function"==typeof e?e(this):function(e){const t=[],n=n=>t[n]??(t[n]={$kind:"NestedResult",NestedResult:[e,n]});return new Proxy({$kind:"Result",Result:e},{set(){throw new Error("The transaction result is a proxy, and does not support setting properties directly")},get(e,t){if(t in e)return Reflect.get(e,t);if(t===Symbol.iterator)return function*(){let e=0;for(;;)yield n(e),e++};if("symbol"==typeof t)return;const s=parseInt(t,10);return Number.isNaN(s)||s<0?void 0:n(s)}})}(T(this,S).commands.push(e)-1)}splitCoins(e,t){return this.add(c.SplitCoins("string"==typeof e?this.object(e):q(this,O,$).call(this,e),t.map((e=>"number"==typeof e||"bigint"==typeof e||"string"==typeof e?this.pure.u64(e):q(this,O,C).call(this,e)))))}mergeCoins(e,t){return this.add(c.MergeCoins(this.object(e),t.map((e=>this.object(e)))))}publish({modules:e,dependencies:t}){return this.add(c.Publish({modules:e,dependencies:t}))}upgrade({modules:e,dependencies:t,package:n,ticket:s}){return this.add(c.Upgrade({modules:e,dependencies:t,package:n,ticket:this.object(s)}))}moveCall({arguments:e,...t}){return this.add(c.MoveCall({...t,arguments:e?.map((e=>q(this,O,C).call(this,e)))}))}transferObjects(e,t){return this.add(c.TransferObjects(e.map((e=>this.object(e))),"string"==typeof t?this.pure.address(t):q(this,O,C).call(this,t)))}makeMoveVec({type:e,elements:t}){return this.add(c.MakeMoveVec({type:e,elements:t.map((e=>this.object(e)))}))}serialize(){return JSON.stringify((0,d.Sm)(T(this,S).snapshot()))}async toJSON(e={}){return await this.prepareForSerialization(e),JSON.stringify((0,i.qgA)(u.f,T(this,S).snapshot()),((e,t)=>"bigint"==typeof t?t.toString():t),2)}async sign(e){const{signer:t,...n}=e,s=await this.build(n);return t.signTransaction(s)}async build(e={}){return await this.prepareForSerialization(e),await q(this,O,M).call(this,e),T(this,S).build({onlyTransactionKind:e.onlyTransactionKind})}async getDigest(e={}){return await q(this,O,M).call(this,e),T(this,S).getDigest()}async prepareForSerialization(e){const t=new Set;for(const e of T(this,S).commands)e.$Intent&&t.add(e.$Intent.name);const n=[...T(this,k)];for(const s of t)if(!e.supportedIntents?.includes(s)){if(!T(this,v).has(s))throw new Error(`Missing intent resolver for ${s}`);n.push(T(this,v).get(s))}await q(this,O,A).call(this,n,e)}}},8338:(e,t,n)=>{n.d(t,{RJ:()=>i,Yl:()=>a,lG:()=>o});class s extends Error{}async function r({host:e,path:t,body:n,headers:r,method:i}){const a=new URL(t,e).toString(),o=await fetch(a,{method:i,body:n?JSON.stringify(n):void 0,headers:{"Content-Type":"application/json",...r||{}}});if(429===o.status)throw new s("Too many requests from this client have been sent to the faucet. Please retry later");try{const e=await o.json();if(e.error)throw new Error(`Faucet returns error: ${e.error}`);return e}catch(e){throw new Error(`Encountered error when parsing response from faucet, error: ${e}, status ${o.status}, response ${o}`)}}async function i(e){return r({host:e.host,path:"/gas",body:{FixedAmountRequest:{recipient:e.recipient}},headers:e.headers,method:"POST"})}async function a(e){return r({host:e.host,path:"/v1/gas",body:{FixedAmountRequest:{recipient:e.recipient}},headers:e.headers,method:"POST"})}function o(e){switch(e){case"testnet":return"https://faucet.testnet.sui.io";case"devnet":return"https://faucet.devnet.sui.io";case"localnet":return"http://127.0.0.1:9123";default:throw new Error(`Unknown network: ${e}`)}}}}]);