@budibase/server 0.9.169-alpha.0 → 0.9.169-alpha.4

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 (173) hide show
  1. package/builder/assets/{index.bcacf476.css → index.0ea76a5c.css} +2 -2
  2. package/builder/assets/{index.cb5f4e3c.js → index.45b6b02b.js} +34 -34
  3. package/builder/assets/{vendor.bca5cd21.js → vendor.2053eff2.js} +1 -1
  4. package/builder/index.html +3 -3
  5. package/coverage/clover.xml +12 -12
  6. package/coverage/coverage-final.json +2 -2
  7. package/coverage/lcov-report/api/controllers/analytics.js.html +1 -1
  8. package/coverage/lcov-report/api/controllers/apikeys.js.html +1 -1
  9. package/coverage/lcov-report/api/controllers/application.js.html +1 -1
  10. package/coverage/lcov-report/api/controllers/auth.js.html +1 -1
  11. package/coverage/lcov-report/api/controllers/automation.js.html +1 -1
  12. package/coverage/lcov-report/api/controllers/backup.js.html +6 -9
  13. package/coverage/lcov-report/api/controllers/cloud.js.html +1 -1
  14. package/coverage/lcov-report/api/controllers/component.js.html +1 -1
  15. package/coverage/lcov-report/api/controllers/datasource.js.html +1 -1
  16. package/coverage/lcov-report/api/controllers/dev.js.html +1 -1
  17. package/coverage/lcov-report/api/controllers/hosting.js.html +1 -1
  18. package/coverage/lcov-report/api/controllers/index.html +5 -5
  19. package/coverage/lcov-report/api/controllers/integration.js.html +1 -1
  20. package/coverage/lcov-report/api/controllers/layout.js.html +1 -1
  21. package/coverage/lcov-report/api/controllers/metadata.js.html +1 -1
  22. package/coverage/lcov-report/api/controllers/permission.js.html +7 -4
  23. package/coverage/lcov-report/api/controllers/query.js.html +1 -1
  24. package/coverage/lcov-report/api/controllers/role.js.html +1 -1
  25. package/coverage/lcov-report/api/controllers/routing.js.html +1 -1
  26. package/coverage/lcov-report/api/controllers/row/external.js.html +1 -1
  27. package/coverage/lcov-report/api/controllers/row/index.html +1 -1
  28. package/coverage/lcov-report/api/controllers/row/index.js.html +1 -1
  29. package/coverage/lcov-report/api/controllers/row/internal.js.html +1 -1
  30. package/coverage/lcov-report/api/controllers/row/internalSearch.js.html +1 -1
  31. package/coverage/lcov-report/api/controllers/row/utils.js.html +1 -1
  32. package/coverage/lcov-report/api/controllers/screen.js.html +1 -1
  33. package/coverage/lcov-report/api/controllers/script.js.html +1 -1
  34. package/coverage/lcov-report/api/controllers/table/index.html +1 -1
  35. package/coverage/lcov-report/api/controllers/table/index.js.html +1 -1
  36. package/coverage/lcov-report/api/controllers/table/utils.js.html +1 -1
  37. package/coverage/lcov-report/api/controllers/templates.js.html +1 -1
  38. package/coverage/lcov-report/api/controllers/user.js.html +1 -1
  39. package/coverage/lcov-report/api/controllers/view/exporters.js.html +1 -1
  40. package/coverage/lcov-report/api/controllers/view/index.html +1 -1
  41. package/coverage/lcov-report/api/controllers/view/index.js.html +1 -1
  42. package/coverage/lcov-report/api/controllers/view/utils.js.html +1 -1
  43. package/coverage/lcov-report/api/controllers/view/viewBuilder.js.html +1 -1
  44. package/coverage/lcov-report/api/controllers/webhook.js.html +1 -1
  45. package/coverage/lcov-report/api/index.html +1 -1
  46. package/coverage/lcov-report/api/index.js.html +1 -1
  47. package/coverage/lcov-report/api/routes/analytics.js.html +1 -1
  48. package/coverage/lcov-report/api/routes/apikeys.js.html +1 -1
  49. package/coverage/lcov-report/api/routes/application.js.html +1 -1
  50. package/coverage/lcov-report/api/routes/auth.js.html +1 -1
  51. package/coverage/lcov-report/api/routes/automation.js.html +1 -1
  52. package/coverage/lcov-report/api/routes/backup.js.html +1 -1
  53. package/coverage/lcov-report/api/routes/cloud.js.html +1 -1
  54. package/coverage/lcov-report/api/routes/component.js.html +1 -1
  55. package/coverage/lcov-report/api/routes/datasource.js.html +1 -1
  56. package/coverage/lcov-report/api/routes/deploy.js.html +1 -1
  57. package/coverage/lcov-report/api/routes/dev.js.html +1 -1
  58. package/coverage/lcov-report/api/routes/hosting.js.html +1 -1
  59. package/coverage/lcov-report/api/routes/index.html +1 -1
  60. package/coverage/lcov-report/api/routes/index.js.html +1 -1
  61. package/coverage/lcov-report/api/routes/integration.js.html +1 -1
  62. package/coverage/lcov-report/api/routes/layout.js.html +1 -1
  63. package/coverage/lcov-report/api/routes/metadata.js.html +1 -1
  64. package/coverage/lcov-report/api/routes/permission.js.html +1 -1
  65. package/coverage/lcov-report/api/routes/query.js.html +1 -1
  66. package/coverage/lcov-report/api/routes/role.js.html +1 -1
  67. package/coverage/lcov-report/api/routes/routing.js.html +1 -1
  68. package/coverage/lcov-report/api/routes/row.js.html +1 -1
  69. package/coverage/lcov-report/api/routes/screen.js.html +1 -1
  70. package/coverage/lcov-report/api/routes/script.js.html +1 -1
  71. package/coverage/lcov-report/api/routes/static.js.html +1 -1
  72. package/coverage/lcov-report/api/routes/table.js.html +1 -1
  73. package/coverage/lcov-report/api/routes/templates.js.html +1 -1
  74. package/coverage/lcov-report/api/routes/user.js.html +1 -1
  75. package/coverage/lcov-report/api/routes/view.js.html +1 -1
  76. package/coverage/lcov-report/api/routes/webhook.js.html +1 -1
  77. package/coverage/lcov-report/automations/actions.js.html +1 -1
  78. package/coverage/lcov-report/automations/automationUtils.js.html +1 -1
  79. package/coverage/lcov-report/automations/bullboard.js.html +1 -1
  80. package/coverage/lcov-report/automations/index.html +1 -1
  81. package/coverage/lcov-report/automations/index.js.html +1 -1
  82. package/coverage/lcov-report/automations/steps/bash.js.html +1 -1
  83. package/coverage/lcov-report/automations/steps/createRow.js.html +1 -1
  84. package/coverage/lcov-report/automations/steps/delay.js.html +1 -1
  85. package/coverage/lcov-report/automations/steps/deleteRow.js.html +1 -1
  86. package/coverage/lcov-report/automations/steps/discord.js.html +1 -1
  87. package/coverage/lcov-report/automations/steps/executeQuery.js.html +1 -1
  88. package/coverage/lcov-report/automations/steps/executeScript.js.html +1 -1
  89. package/coverage/lcov-report/automations/steps/filter.js.html +1 -1
  90. package/coverage/lcov-report/automations/steps/index.html +1 -1
  91. package/coverage/lcov-report/automations/steps/integromat.js.html +1 -1
  92. package/coverage/lcov-report/automations/steps/outgoingWebhook.js.html +1 -1
  93. package/coverage/lcov-report/automations/steps/queryRows.js.html +1 -1
  94. package/coverage/lcov-report/automations/steps/sendSmtpEmail.js.html +1 -1
  95. package/coverage/lcov-report/automations/steps/serverLog.js.html +1 -1
  96. package/coverage/lcov-report/automations/steps/slack.js.html +1 -1
  97. package/coverage/lcov-report/automations/steps/updateRow.js.html +1 -1
  98. package/coverage/lcov-report/automations/steps/utils.js.html +1 -1
  99. package/coverage/lcov-report/automations/steps/zapier.js.html +1 -1
  100. package/coverage/lcov-report/automations/thread.js.html +1 -1
  101. package/coverage/lcov-report/automations/triggerInfo/app.js.html +1 -1
  102. package/coverage/lcov-report/automations/triggerInfo/cron.js.html +1 -1
  103. package/coverage/lcov-report/automations/triggerInfo/index.html +1 -1
  104. package/coverage/lcov-report/automations/triggerInfo/index.js.html +1 -1
  105. package/coverage/lcov-report/automations/triggerInfo/rowDeleted.js.html +1 -1
  106. package/coverage/lcov-report/automations/triggerInfo/rowSaved.js.html +1 -1
  107. package/coverage/lcov-report/automations/triggerInfo/rowUpdated.js.html +1 -1
  108. package/coverage/lcov-report/automations/triggerInfo/webhook.js.html +1 -1
  109. package/coverage/lcov-report/automations/triggers.js.html +1 -1
  110. package/coverage/lcov-report/automations/utils.js.html +1 -1
  111. package/coverage/lcov-report/constants/index.html +1 -1
  112. package/coverage/lcov-report/constants/index.js.html +1 -1
  113. package/coverage/lcov-report/constants/layouts.js.html +1 -1
  114. package/coverage/lcov-report/constants/screens.js.html +1 -1
  115. package/coverage/lcov-report/db/client.js.html +1 -1
  116. package/coverage/lcov-report/db/inMemoryView.js.html +1 -1
  117. package/coverage/lcov-report/db/index.html +1 -1
  118. package/coverage/lcov-report/db/index.js.html +1 -1
  119. package/coverage/lcov-report/db/linkedRows/LinkController.js.html +1 -1
  120. package/coverage/lcov-report/db/linkedRows/index.html +1 -1
  121. package/coverage/lcov-report/db/linkedRows/index.js.html +1 -1
  122. package/coverage/lcov-report/db/linkedRows/linkUtils.js.html +1 -1
  123. package/coverage/lcov-report/db/newid.js.html +1 -1
  124. package/coverage/lcov-report/db/utils.js.html +1 -1
  125. package/coverage/lcov-report/events/AutomationEmitter.js.html +1 -1
  126. package/coverage/lcov-report/events/index.html +1 -1
  127. package/coverage/lcov-report/events/index.js.html +1 -1
  128. package/coverage/lcov-report/events/utils.js.html +1 -1
  129. package/coverage/lcov-report/index.html +5 -5
  130. package/coverage/lcov-report/integrations/tests/TestConfiguration.js.html +1 -1
  131. package/coverage/lcov-report/integrations/tests/index.html +1 -1
  132. package/coverage/lcov-report/middleware/appInfo.js.html +1 -1
  133. package/coverage/lcov-report/middleware/authorized.js.html +1 -1
  134. package/coverage/lcov-report/middleware/builder.js.html +1 -1
  135. package/coverage/lcov-report/middleware/currentapp.js.html +1 -1
  136. package/coverage/lcov-report/middleware/index.html +1 -1
  137. package/coverage/lcov-report/middleware/joi-validator.js.html +1 -1
  138. package/coverage/lcov-report/middleware/resourceId.js.html +1 -1
  139. package/coverage/lcov-report/middleware/selfhost.js.html +1 -1
  140. package/coverage/lcov-report/middleware/usageQuota.js.html +1 -1
  141. package/coverage/lcov-report/utilities/bcrypt.js.html +1 -1
  142. package/coverage/lcov-report/utilities/budibaseDir.js.html +1 -1
  143. package/coverage/lcov-report/utilities/centralPath.js.html +1 -1
  144. package/coverage/lcov-report/utilities/csvParser.js.html +1 -1
  145. package/coverage/lcov-report/utilities/global.js.html +1 -1
  146. package/coverage/lcov-report/utilities/index.html +1 -1
  147. package/coverage/lcov-report/utilities/index.js.html +1 -1
  148. package/coverage/lcov-report/utilities/queue/inMemoryQueue.js.html +1 -1
  149. package/coverage/lcov-report/utilities/queue/index.html +1 -1
  150. package/coverage/lcov-report/utilities/routing/index.html +1 -1
  151. package/coverage/lcov-report/utilities/routing/index.js.html +1 -1
  152. package/coverage/lcov-report/utilities/rowProcessor/index.html +1 -1
  153. package/coverage/lcov-report/utilities/rowProcessor/index.js.html +1 -1
  154. package/coverage/lcov-report/utilities/rowProcessor/utils.js.html +1 -1
  155. package/coverage/lcov-report/utilities/scriptRunner.js.html +1 -1
  156. package/coverage/lcov-report/utilities/security.js.html +1 -1
  157. package/coverage/lcov-report/utilities/statusCodes.js.html +1 -1
  158. package/coverage/lcov-report/utilities/users.js.html +1 -1
  159. package/coverage/lcov-report/utilities/workerRequests.js.html +1 -1
  160. package/coverage/lcov.info +12 -11
  161. package/dist/api/controllers/backup.js +4 -4
  162. package/dist/api/controllers/permission.js +1 -0
  163. package/dist/api/controllers/row/ExternalRequest.js +46 -5
  164. package/dist/integrations/utils.js +16 -1
  165. package/dist/package.json +4 -4
  166. package/dist/tsconfig.tsbuildinfo +1 -1
  167. package/dist/utilities/fileSystem/index.js +49 -33
  168. package/package.json +5 -5
  169. package/src/api/controllers/backup.js +4 -5
  170. package/src/api/controllers/permission.js +1 -0
  171. package/src/api/controllers/row/ExternalRequest.ts +49 -4
  172. package/src/integrations/utils.ts +15 -0
  173. package/src/utilities/fileSystem/index.js +65 -43
@@ -6,4 +6,4 @@ var t=Object.defineProperty,e=Object.prototype.hasOwnProperty,a=Object.getOwnPro
6
6
  * Released under MIT license <https://lodash.com/license>
7
7
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
8
8
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
9
- */function jr(t,e){return 2==e?function(e,a){return t(e,a)}:function(e){return t(e)}}function Fr(t){for(var e=t?t.length:0,a=Array(e);e--;)a[e]=t[e];return a}function Ir(t,e){return function(){var a=arguments.length;if(a){for(var r=Array(a);a--;)r[a]=arguments[a];var n=r[0]=e.apply(void 0,r);return t.apply(void 0,r),n}}}var Pr=function t(e,a,r,n){var i="function"==typeof a,o=a===Object(a);if(o&&(n=r,r=a,a=void 0),null==r)throw new TypeError;n||(n={});var l=!("cap"in n)||n.cap,s=!("curry"in n)||n.curry,c=!("fixed"in n)||n.fixed,h=!("immutable"in n)||n.immutable,u=!("rearg"in n)||n.rearg,d=i?r:Tr,p="curry"in n&&n.curry,m="fixed"in n&&n.fixed,v="rearg"in n&&n.rearg,f=i?r.runInContext():void 0,y=i?r:{ary:e.ary,assign:e.assign,clone:e.clone,curry:e.curry,forEach:e.forEach,isArray:e.isArray,isError:e.isError,isFunction:e.isFunction,isWeakMap:e.isWeakMap,iteratee:e.iteratee,keys:e.keys,rearg:e.rearg,toInteger:e.toInteger,toPath:e.toPath},g=y.ary,b=y.assign,z=y.clone,x=y.curry,w=y.forEach,M=y.isArray,_=y.isError,A=y.isFunction,H=y.isWeakMap,V=y.keys,L=y.rearg,B=y.toInteger,k=y.toPath,C=V(Or.aryMethod),S={castArray:function(t){return function(){var e=arguments[0];return M(e)?t(Fr(e)):t.apply(void 0,arguments)}},iteratee:function(t){return function(){var e=arguments[0],a=arguments[1],r=t(e,a),n=r.length;return l&&"number"==typeof a?(a=a>2?a-2:1,n&&n<=a?r:jr(r,a)):r}},mixin:function(t){return function(e){var a=this;if(!A(a))return t(a,Object(e));var r=[];return w(V(e),(function(t){A(e[t])&&r.push([t,a.prototype[t]])})),t(a,Object(e)),w(r,(function(t){var e=t[1];A(e)?a.prototype[t[0]]=e:delete a.prototype[t[0]]})),a}},nthArg:function(t){return function(e){var a=e<0?1:B(e)+1;return x(t(e),a)}},rearg:function(t){return function(e,a){var r=a?a.length:0;return x(t(e,a),r)}},runInContext:function(a){return function(r){return t(e,a(r),n)}}};function E(t,e){if(l){var a=Or.iterateeRearg[t];if(a)return function(t,e){return F(t,(function(t){var a=e.length;return function(t,e){return 2==e?function(e,a){return t.apply(void 0,arguments)}:function(e){return t.apply(void 0,arguments)}}(L(jr(t,a),e),a)}))}(e,a);var r=!i&&Or.iterateeAry[t];if(r)return function(t,e){return F(t,(function(t){return"function"==typeof t?jr(t,e):t}))}(e,r)}return e}function O(t,e,a){if(c&&(m||!Or.skipFixed[t])){var r=Or.methodSpread[t],n=r&&r.start;return void 0===n?g(e,a):function(t,e){return function(){for(var a=arguments.length,r=a-1,n=Array(a);a--;)n[a]=arguments[a];var i=n[e],o=n.slice(0,e);return i&&Dr.apply(o,i),e!=r&&Dr.apply(o,n.slice(e+1)),t.apply(this,o)}}(e,n)}return e}function T(t,e,a){return u&&a>1&&(v||!Or.skipRearg[t])?L(e,Or.methodRearg[t]||Or.aryRearg[a]):e}function D(t,e){for(var a=-1,r=(e=k(e)).length,n=r-1,i=z(Object(t)),o=i;null!=o&&++a<r;){var l=e[a],s=o[l];null==s||A(s)||_(s)||H(s)||(o[l]=z(a==n?s:Object(s))),o=o[l]}return i}function j(e,a){var r=Or.aliasToReal[e]||e,o=Or.remap[r]||r,l=n;return function(e){var n=i?f:y,s=i?f[o]:a,c=b(b({},l),e);return t(n,r,s,c)}}function F(t,e){return function(){var a=arguments.length;if(!a)return t();for(var r=Array(a);a--;)r[a]=arguments[a];var n=u?0:a-1;return r[n]=e(r[n]),t.apply(void 0,r)}}function I(t,e,a){var r,n=Or.aliasToReal[t]||t,i=e,o=S[n];return o?i=o(e):h&&(Or.mutate.array[n]?i=Ir(e,Fr):Or.mutate.object[n]?i=Ir(e,function(t){return function(e){return t({},e)}}(e)):Or.mutate.set[n]&&(i=Ir(e,D))),w(C,(function(t){return w(Or.aryMethod[t],(function(e){if(n==e){var a=Or.methodSpread[n],o=a&&a.afterRearg;return r=o?O(n,T(n,i,t),t):T(n,O(n,i,t),t),r=function(t,e,a){return p||s&&a>1?x(e,a):e}(0,r=E(n,r),t),!1}})),!r})),r||(r=i),r==e&&(r=p?x(r,1):function(){return e.apply(this,arguments)}),r.convert=j(n,e),r.placeholder=e.placeholder=a,r}if(!o)return I(a,r,d);var P=r,R=[];return w(C,(function(t){w(Or.aryMethod[t],(function(t){var e=P[Or.remap[t]||t];e&&R.push([t,I(t,e,P)])}))})),w(V(P),(function(t){var e=P[t];if("function"==typeof e){for(var a=R.length;a--;)if(R[a][0]==t)return;e.convert=j(t,e),R.push([t,e])}})),w(R,(function(t){P[t[0]]=t[1]})),P.convert=function(t){return P.runInContext.convert(t)(void 0)},P.placeholder=P,w(V(P),(function(t){w(Or.realToAlias[t]||[],(function(e){P[e]=P[t]}))})),P},Rr=Er.runInContext(),Nr=Pr(Rr,Rr),$r=String.fromCharCode,Ur="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Wr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",qr={};function Gr(t,e){if(!qr[t]){qr[t]={};for(var a=0;a<t.length;a++)qr[t][t.charAt(a)]=a}return qr[t][e]}var Yr,Kr={compressToBase64:function(t){if(null==t)return"";var e=Kr._compress(t,6,(function(t){return Ur.charAt(t)}));switch(e.length%4){default:case 0:return e;case 1:return e+"===";case 2:return e+"==";case 3:return e+"="}},decompressFromBase64:function(t){return null==t?"":""==t?null:Kr._decompress(t.length,32,(function(e){return Gr(Ur,t.charAt(e))}))},compressToUTF16:function(t){return null==t?"":Kr._compress(t,15,(function(t){return $r(t+32)}))+" "},decompressFromUTF16:function(t){return null==t?"":""==t?null:Kr._decompress(t.length,16384,(function(e){return t.charCodeAt(e)-32}))},compressToUint8Array:function(t){for(var e=Kr.compress(t),a=new Uint8Array(2*e.length),r=0,n=e.length;r<n;r++){var i=e.charCodeAt(r);a[2*r]=i>>>8,a[2*r+1]=i%256}return a},decompressFromUint8Array:function(t){if(null==t)return Kr.decompress(t);for(var e=new Array(t.length/2),a=0,r=e.length;a<r;a++)e[a]=256*t[2*a]+t[2*a+1];var n=[];return e.forEach((function(t){n.push($r(t))})),Kr.decompress(n.join(""))},compressToEncodedURIComponent:function(t){return null==t?"":Kr._compress(t,6,(function(t){return Wr.charAt(t)}))},decompressFromEncodedURIComponent:function(t){return null==t?"":""==t?null:(t=t.replace(/ /g,"+"),Kr._decompress(t.length,32,(function(e){return Gr(Wr,t.charAt(e))})))},compress:function(t){return Kr._compress(t,16,(function(t){return $r(t)}))},_compress:function(t,e,a){if(null==t)return"";var r,n,i,o={},l={},s="",c="",h="",u=2,d=3,p=2,m=[],v=0,f=0;for(i=0;i<t.length;i+=1)if(s=t.charAt(i),Object.prototype.hasOwnProperty.call(o,s)||(o[s]=d++,l[s]=!0),c=h+s,Object.prototype.hasOwnProperty.call(o,c))h=c;else{if(Object.prototype.hasOwnProperty.call(l,h)){if(h.charCodeAt(0)<256){for(r=0;r<p;r++)v<<=1,f==e-1?(f=0,m.push(a(v)),v=0):f++;for(n=h.charCodeAt(0),r=0;r<8;r++)v=v<<1|1&n,f==e-1?(f=0,m.push(a(v)),v=0):f++,n>>=1}else{for(n=1,r=0;r<p;r++)v=v<<1|n,f==e-1?(f=0,m.push(a(v)),v=0):f++,n=0;for(n=h.charCodeAt(0),r=0;r<16;r++)v=v<<1|1&n,f==e-1?(f=0,m.push(a(v)),v=0):f++,n>>=1}0==--u&&(u=Math.pow(2,p),p++),delete l[h]}else for(n=o[h],r=0;r<p;r++)v=v<<1|1&n,f==e-1?(f=0,m.push(a(v)),v=0):f++,n>>=1;0==--u&&(u=Math.pow(2,p),p++),o[c]=d++,h=String(s)}if(""!==h){if(Object.prototype.hasOwnProperty.call(l,h)){if(h.charCodeAt(0)<256){for(r=0;r<p;r++)v<<=1,f==e-1?(f=0,m.push(a(v)),v=0):f++;for(n=h.charCodeAt(0),r=0;r<8;r++)v=v<<1|1&n,f==e-1?(f=0,m.push(a(v)),v=0):f++,n>>=1}else{for(n=1,r=0;r<p;r++)v=v<<1|n,f==e-1?(f=0,m.push(a(v)),v=0):f++,n=0;for(n=h.charCodeAt(0),r=0;r<16;r++)v=v<<1|1&n,f==e-1?(f=0,m.push(a(v)),v=0):f++,n>>=1}0==--u&&(u=Math.pow(2,p),p++),delete l[h]}else for(n=o[h],r=0;r<p;r++)v=v<<1|1&n,f==e-1?(f=0,m.push(a(v)),v=0):f++,n>>=1;0==--u&&(u=Math.pow(2,p),p++)}for(n=2,r=0;r<p;r++)v=v<<1|1&n,f==e-1?(f=0,m.push(a(v)),v=0):f++,n>>=1;for(;;){if(v<<=1,f==e-1){m.push(a(v));break}f++}return m.join("")},decompress:function(t){return null==t?"":""==t?null:Kr._decompress(t.length,32768,(function(e){return t.charCodeAt(e)}))},_decompress:function(t,e,a){var r,n,i,o,l,s,c,h=[],u=4,d=4,p=3,m="",v=[],f={val:a(0),position:e,index:1};for(r=0;r<3;r+=1)h[r]=r;for(i=0,l=Math.pow(2,2),s=1;s!=l;)o=f.val&f.position,f.position>>=1,0==f.position&&(f.position=e,f.val=a(f.index++)),i|=(o>0?1:0)*s,s<<=1;switch(i){case 0:for(i=0,l=Math.pow(2,8),s=1;s!=l;)o=f.val&f.position,f.position>>=1,0==f.position&&(f.position=e,f.val=a(f.index++)),i|=(o>0?1:0)*s,s<<=1;c=$r(i);break;case 1:for(i=0,l=Math.pow(2,16),s=1;s!=l;)o=f.val&f.position,f.position>>=1,0==f.position&&(f.position=e,f.val=a(f.index++)),i|=(o>0?1:0)*s,s<<=1;c=$r(i);break;case 2:return""}for(h[3]=c,n=c,v.push(c);;){if(f.index>t)return"";for(i=0,l=Math.pow(2,p),s=1;s!=l;)o=f.val&f.position,f.position>>=1,0==f.position&&(f.position=e,f.val=a(f.index++)),i|=(o>0?1:0)*s,s<<=1;switch(c=i){case 0:for(i=0,l=Math.pow(2,8),s=1;s!=l;)o=f.val&f.position,f.position>>=1,0==f.position&&(f.position=e,f.val=a(f.index++)),i|=(o>0?1:0)*s,s<<=1;h[d++]=$r(i),c=d-1,u--;break;case 1:for(i=0,l=Math.pow(2,16),s=1;s!=l;)o=f.val&f.position,f.position>>=1,0==f.position&&(f.position=e,f.val=a(f.index++)),i|=(o>0?1:0)*s,s<<=1;h[d++]=$r(i),c=d-1,u--;break;case 2:return v.join("")}if(0==u&&(u=Math.pow(2,p),p++),h[c])m=h[c];else{if(c!==d)return null;m=n+n.charAt(0)}v.push(m),h[d++]=n+m.charAt(0),n=m,0==--u&&(u=Math.pow(2,p),p++)}}},Jr={DEBUG:!1,LIB_VERSION:"1.0.0"};if("undefined"==typeof window){var Zr={hostname:""};Yr={navigator:{userAgent:""},document:{location:Zr,referrer:""},screen:{width:0,height:0},location:Zr}}else Yr=window;var Xr,Qr,tn,en,an,rn,nn,on,ln,sn,cn,hn=Array.prototype,un=Function.prototype,dn=Object.prototype,pn=hn.slice,mn=dn.toString,vn=dn.hasOwnProperty,fn=Yr.console,yn=Yr.navigator,gn=Yr.document,bn=Yr.opera,zn=Yr.screen,xn=yn.userAgent,wn=un.bind,Mn=hn.forEach,_n=hn.indexOf,An=Array.isArray,Hn={},Vn=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,Ln={trim:function(t){return t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},Bn=function(){if(Jr.DEBUG&&!Ln.isUndefined(fn)&&fn)try{fn.log.apply(fn,arguments)}catch(t){Ln.each(arguments,(function(t){fn.log(t)}))}},kn=function(){if(Jr.DEBUG&&!Ln.isUndefined(fn)&&fn){var t=["PostHog error:"].concat(Ln.toArray(arguments));try{fn.error.apply(fn,t)}catch(e){Ln.each(t,(function(t){fn.error(t)}))}}},Cn=function(){if(!Ln.isUndefined(fn)&&fn){var t=["PostHog error:"].concat(Ln.toArray(arguments));try{fn.error.apply(fn,t)}catch(e){Ln.each(t,(function(t){fn.error(t)}))}}};Ln.bind=function(t,e){var a,r;if(wn&&t.bind===wn)return wn.apply(t,pn.call(arguments,1));if(!Ln.isFunction(t))throw new TypeError;return a=pn.call(arguments,2),r=function(){if(!(this instanceof r))return t.apply(e,a.concat(pn.call(arguments)));var n={};n.prototype=t.prototype;var i=new n;n.prototype=null;var o=t.apply(i,a.concat(pn.call(arguments)));return Object(o)===o?o:i}},Ln.bind_instance_methods=function(t){for(var e in t)"function"==typeof t[e]&&(t[e]=Ln.bind(t[e],t))},Ln.each=function(t,e,a){if(null!=t)if(Mn&&t.forEach===Mn)t.forEach(e,a);else if(t.length===+t.length){for(var r=0,n=t.length;r<n;r++)if(r in t&&e.call(a,t[r],r,t)===Hn)return}else for(var i in t)if(vn.call(t,i)&&e.call(a,t[i],i,t)===Hn)return},Ln.escapeHTML=function(t){var e=t;return e&&Ln.isString(e)&&(e=e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")),e},Ln.extend=function(t){return Ln.each(pn.call(arguments,1),(function(e){for(var a in e)void 0!==e[a]&&(t[a]=e[a])})),t},Ln.isArray=An||function(t){return"[object Array]"===mn.call(t)},Ln.isFunction=function(t){try{return/^\s*\bfunction\b/.test(t)}catch(e){return!1}},Ln.isArguments=function(t){return!(!t||!vn.call(t,"callee"))},Ln.toArray=function(t){return t?t.toArray?t.toArray():Ln.isArray(t)||Ln.isArguments(t)?pn.call(t):Ln.values(t):[]},Ln.keys=function(t){var e=[];return null===t||Ln.each(t,(function(t,a){e[e.length]=a})),e},Ln.values=function(t){var e=[];return null===t||Ln.each(t,(function(t){e[e.length]=t})),e},Ln.identity=function(t){return t},Ln.include=function(t,e){var a=!1;return null===t?a:_n&&t.indexOf===_n?-1!=t.indexOf(e):(Ln.each(t,(function(t){if(a||(a=t===e))return Hn})),a)},Ln.includes=function(t,e){return-1!==t.indexOf(e)},Ln.inherit=function(t,e){return t.prototype=new e,t.prototype.constructor=t,t.superclass=e.prototype,t},Ln.isObject=function(t){return t===Object(t)&&!Ln.isArray(t)},Ln.isEmptyObject=function(t){if(Ln.isObject(t)){for(var e in t)if(vn.call(t,e))return!1;return!0}return!1},Ln.isUndefined=function(t){return void 0===t},Ln.isString=function(t){return"[object String]"==mn.call(t)},Ln.isDate=function(t){return"[object Date]"==mn.call(t)},Ln.isNumber=function(t){return"[object Number]"==mn.call(t)},Ln.isElement=function(t){return!(!t||1!==t.nodeType)},Ln.encodeDates=function(t){return Ln.each(t,(function(e,a){Ln.isDate(e)?t[a]=Ln.formatDate(e):Ln.isObject(e)&&(t[a]=Ln.encodeDates(e))})),t},Ln.timestamp=function(){return Date.now=Date.now||function(){return+new Date},Date.now()},Ln.formatDate=function(t){function e(t){return t<10?"0"+t:t}return t.getUTCFullYear()+"-"+e(t.getUTCMonth()+1)+"-"+e(t.getUTCDate())+"T"+e(t.getUTCHours())+":"+e(t.getUTCMinutes())+":"+e(t.getUTCSeconds())},Ln.safewrap=function(t){return function(){try{return t.apply(this,arguments)}catch(e){Cn("Implementation error. Please turn on debug and contact support@posthog.com."),Jr.DEBUG&&Cn(e)}}},Ln.safewrap_class=function(t,e){for(var a=0;a<e.length;a++)t.prototype[e[a]]=Ln.safewrap(t.prototype[e[a]])},Ln.safewrap_instance_methods=function(t){for(var e in t)"function"==typeof t[e]&&(t[e]=Ln.safewrap(t[e]))},Ln.strip_empty_properties=function(t){var e={};return Ln.each(t,(function(t,a){Ln.isString(t)&&t.length>0&&(e[a]=t)})),e},Ln.truncate=function(t,e){var a;return"string"==typeof t?a=t.slice(0,e):Ln.isArray(t)?(a=[],Ln.each(t,(function(t){a.push(Ln.truncate(t,e))}))):Ln.isObject(t)?(a={},Ln.each(t,(function(t,r){a[r]=Ln.truncate(t,e)}))):a=t,a},Ln.JSONEncode=function(t){var e=function(t){var e=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,a={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return e.lastIndex=0,e.test(t)?'"'+t.replace(e,(function(t){var e=a[t];return"string"==typeof e?e:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+t+'"'},a=function(t,r){var n="",i=0,o="",l="",s=0,c=n,h=[],u=r[t];switch(u&&"object"==typeof u&&"function"==typeof u.toJSON&&(u=u.toJSON(t)),typeof u){case"string":return e(u);case"number":return isFinite(u)?String(u):"null";case"boolean":case"null":return String(u);case"object":if(!u)return"null";if(n+=" ",h=[],"[object Array]"===mn.apply(u)){for(s=u.length,i=0;i<s;i+=1)h[i]=a(i,u)||"null";return l=0===h.length?"[]":n?"[\n"+n+h.join(",\n"+n)+"\n"+c+"]":"["+h.join(",")+"]",n=c,l}for(o in u)vn.call(u,o)&&(l=a(o,u))&&h.push(e(o)+(n?": ":":")+l);return l=0===h.length?"{}":n?"{"+h.join(",")+c+"}":"{"+h.join(",")+"}",n=c,l}};return a("",{"":t})},Ln.JSONDecode=(an={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},rn=function(t){var e=new SyntaxError(t);throw e.at=Xr,e.text=tn,e},nn=function(t){return t&&t!==Qr&&rn("Expected '"+t+"' instead of '"+Qr+"'"),Qr=tn.charAt(Xr),Xr+=1,Qr},on=function(){var t,e="";for("-"===Qr&&(e="-",nn("-"));Qr>="0"&&Qr<="9";)e+=Qr,nn();if("."===Qr)for(e+=".";nn()&&Qr>="0"&&Qr<="9";)e+=Qr;if("e"===Qr||"E"===Qr)for(e+=Qr,nn(),"-"!==Qr&&"+"!==Qr||(e+=Qr,nn());Qr>="0"&&Qr<="9";)e+=Qr,nn();if(t=+e,isFinite(t))return t;rn("Bad number")},ln=function(){var t,e,a,r="";if('"'===Qr)for(;nn();){if('"'===Qr)return nn(),r;if("\\"===Qr)if(nn(),"u"===Qr){for(a=0,e=0;e<4&&(t=parseInt(nn(),16),isFinite(t));e+=1)a=16*a+t;r+=String.fromCharCode(a)}else{if("string"!=typeof an[Qr])break;r+=an[Qr]}else r+=Qr}rn("Bad string")},sn=function(){for(;Qr&&Qr<=" ";)nn()},en=function(){switch(sn(),Qr){case"{":return function(){var t,e={};if("{"===Qr){if(nn("{"),sn(),"}"===Qr)return nn("}"),e;for(;Qr;){if(t=ln(),sn(),nn(":"),Object.hasOwnProperty.call(e,t)&&rn('Duplicate key "'+t+'"'),e[t]=en(),sn(),"}"===Qr)return nn("}"),e;nn(","),sn()}}rn("Bad object")}();case"[":return function(){var t=[];if("["===Qr){if(nn("["),sn(),"]"===Qr)return nn("]"),t;for(;Qr;){if(t.push(en()),sn(),"]"===Qr)return nn("]"),t;nn(","),sn()}}rn("Bad array")}();case'"':return ln();case"-":return on();default:return Qr>="0"&&Qr<="9"?on():function(){switch(Qr){case"t":return nn("t"),nn("r"),nn("u"),nn("e"),!0;case"f":return nn("f"),nn("a"),nn("l"),nn("s"),nn("e"),!1;case"n":return nn("n"),nn("u"),nn("l"),nn("l"),null}rn('Unexpected "'+Qr+'"')}()}},function(t){var e;return tn=t,Xr=0,Qr=" ",e=en(),sn(),Qr&&rn("Syntax error"),e}),Ln.base64Encode=function(t){var e,a,r,n,i,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",l=0,s=0,c="",h=[];if(!t)return t;t=Ln.utf8Encode(t);do{e=(i=t.charCodeAt(l++)<<16|t.charCodeAt(l++)<<8|t.charCodeAt(l++))>>18&63,a=i>>12&63,r=i>>6&63,n=63&i,h[s++]=o.charAt(e)+o.charAt(a)+o.charAt(r)+o.charAt(n)}while(l<t.length);switch(c=h.join(""),t.length%3){case 1:c=c.slice(0,-2)+"==";break;case 2:c=c.slice(0,-1)+"="}return c},Ln.utf8Encode=function(t){var e,a,r,n,i="";for(e=a=0,r=(t=(t+"").replace(/\r\n/g,"\n").replace(/\r/g,"\n")).length,n=0;n<r;n++){var o=t.charCodeAt(n),l=null;o<128?a++:l=o>127&&o<2048?String.fromCharCode(o>>6|192,63&o|128):String.fromCharCode(o>>12|224,o>>6&63|128,63&o|128),null!==l&&(a>e&&(i+=t.substring(e,a)),i+=l,e=a=n+1)}return a>e&&(i+=t.substring(e,t.length)),i},Ln.UUID=(cn=function(){for(var t=1*new Date,e=0;t==1*new Date;)e++;return t.toString(16)+e.toString(16)},function(){var t=(zn.height*zn.width).toString(16);return cn()+"-"+Math.random().toString(16).replace(".","")+"-"+function(){var t,e,a=xn,r=[],n=0;function i(t,e){var a,n=0;for(a=0;a<e.length;a++)n|=r[a]<<8*a;return t^n}for(t=0;t<a.length;t++)e=a.charCodeAt(t),r.unshift(255&e),r.length>=4&&(n=i(n,r),r=[]);return r.length>0&&(n=i(n,r)),n.toString(16)}()+"-"+t+"-"+cn()}),Ln.isBlockedUA=function(t){return!!/(google web preview|baiduspider|yandexbot|bingbot|googlebot|yahoo! slurp)/i.test(t)},Ln.HTTPBuildQuery=function(t,e){var a,r,n=[];return Ln.isUndefined(e)&&(e="&"),Ln.each(t,(function(t,e){a=encodeURIComponent(t.toString()),r=encodeURIComponent(e),n[n.length]=r+"="+a})),n.join(e)},Ln.getQueryParam=function(t,e){e=e.replace(/[[]/,"\\[").replace(/[\]]/,"\\]");var a=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(t);if(null===a||a&&"string"!=typeof a[1]&&a[1].length)return"";var r=a[1];try{r=decodeURIComponent(r)}catch(n){kn("Skipping decoding for malformed query param: "+r)}return r.replace(/\+/g," ")},Ln.getHashParam=function(t,e){var a=t.match(new RegExp(e+"=([^&]*)"));return a?a[1]:null},Ln.cookie={get:function(t){try{for(var e=t+"=",a=gn.cookie.split(";"),r=0;r<a.length;r++){for(var n=a[r];" "==n.charAt(0);)n=n.substring(1,n.length);if(0===n.indexOf(e))return decodeURIComponent(n.substring(e.length,n.length))}}catch(i){}return null},parse:function(t){var e;try{e=Ln.JSONDecode(Ln.cookie.get(t))||{}}catch(a){}return e},set_seconds:function(t,e,a,r,n){try{var i="",o="",l="";if(r){var s=gn.location.hostname.match(Vn),c=s?s[0]:"";i=c?"; domain=."+c:""}if(a){var h=new Date;h.setTime(h.getTime()+1e3*a),o="; expires="+h.toGMTString()}n&&(l="; secure"),gn.cookie=t+"="+encodeURIComponent(e)+o+"; path=/"+i+l}catch(u){return}},set:function(t,e,a,r,n){try{var i="",o="",l="";if(r){var s=gn.location.hostname.match(Vn),c=s?s[0]:"";i=c?"; domain=."+c:""}if(a){var h=new Date;h.setTime(h.getTime()+24*a*60*60*1e3),o="; expires="+h.toGMTString()}n&&(l="; secure");var u=t+"="+encodeURIComponent(e)+o+"; path=/"+i+l;return gn.cookie=u,u}catch(d){return}},remove:function(t,e){try{Ln.cookie.set(t,"",-1,e)}catch(a){return}}};var Sn=null;Ln.localStorage={is_supported:function(){if(null!==Sn)return Sn;var t=!0;try{var e="__mplssupport__";Ln.localStorage.set(e,"xyz"),"xyz"!==Ln.localStorage.get(e)&&(t=!1),Ln.localStorage.remove(e)}catch(a){t=!1}return t||kn("localStorage unsupported; falling back to cookie store"),Sn=t,t},error:function(t){kn("localStorage error: "+t)},get:function(t){try{return window.localStorage.getItem(t)}catch(e){Ln.localStorage.error(e)}return null},parse:function(t){try{return Ln.JSONDecode(Ln.localStorage.get(t))||{}}catch(e){}return null},set:function(t,e){try{window.localStorage.setItem(t,e)}catch(a){Ln.localStorage.error(a)}},remove:function(t){try{window.localStorage.removeItem(t)}catch(e){Ln.localStorage.error(e)}}},Ln.register_event=function(){function t(e){return e&&(e.preventDefault=t.preventDefault,e.stopPropagation=t.stopPropagation),e}return t.preventDefault=function(){this.returnValue=!1},t.stopPropagation=function(){this.cancelBubble=!0},function(e,a,r,n,i){if(e)if(e.addEventListener&&!n)e.addEventListener(a,r,!!i);else{var o="on"+a,l=e[o];e[o]=function(e,a,r){return function(n){if(n=n||t(window.event)){var i,o,l=!0;return Ln.isFunction(r)&&(i=r(n)),o=a.call(e,n),!1!==i&&!1!==o||(l=!1),l}}}(e,r,l)}else kn("No valid element provided to register_event")}}();var En=new RegExp('^(\\w*)\\[(\\w+)([=~\\|\\^\\$\\*]?)=?"?([^\\]"]*)"?\\]$');function On(t){switch(typeof t.className){case"string":return t.className;case"object":return t.className.baseVal||t.getAttribute("class")||"";default:return""}}function Tn(t){var e="";return Pn(t)&&!Rn(t)&&t.childNodes&&t.childNodes.length&&Ln.each(t.childNodes,(function(t){Fn(t)&&t.textContent&&(e+=Ln.trim(t.textContent).split(/(\s+)/).filter(Nn).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255))})),Ln.trim(e)}function Dn(t){return t&&1===t.nodeType}function jn(t,e){return t&&t.tagName&&t.tagName.toLowerCase()===e.toLowerCase()}function Fn(t){return t&&3===t.nodeType}Ln.dom_query=function(){function t(t){return t.all?t.all:t.getElementsByTagName("*")}var e=/[\t\r\n]/g;function a(t,a){var r=" "+a+" ";return(" "+t.className+" ").replace(e," ").indexOf(r)>=0}function r(e){if(!gn.getElementsByTagName)return[];var r,n,i,o,l,s,c,h,u,d,p=e.split(" "),m=[gn];for(s=0;s<p.length;s++)if((r=p[s].replace(/^\s+/,"").replace(/\s+$/,"")).indexOf("#")>-1){i=(n=r.split("#"))[0];var v=n[1],f=gn.getElementById(v);if(!f||i&&f.nodeName.toLowerCase()!=i)return[];m=[f]}else if(r.indexOf(".")>-1){i=(n=r.split("."))[0];var y=n[1];for(i||(i="*"),o=[],l=0,c=0;c<m.length;c++)for(u="*"==i?t(m[c]):m[c].getElementsByTagName(i),h=0;h<u.length;h++)o[l++]=u[h];for(m=[],d=0,c=0;c<o.length;c++)o[c].className&&Ln.isString(o[c].className)&&a(o[c],y)&&(m[d++]=o[c])}else{var g=r.match(En);if(g){i=g[1];var b,z=g[2],x=g[3],w=g[4];for(i||(i="*"),o=[],l=0,c=0;c<m.length;c++)for(u="*"==i?t(m[c]):m[c].getElementsByTagName(i),h=0;h<u.length;h++)o[l++]=u[h];switch(m=[],d=0,x){case"=":b=function(t){return t.getAttribute(z)==w};break;case"~":b=function(t){return t.getAttribute(z).match(new RegExp("\\b"+w+"\\b"))};break;case"|":b=function(t){return t.getAttribute(z).match(new RegExp("^"+w+"-?"))};break;case"^":b=function(t){return 0===t.getAttribute(z).indexOf(w)};break;case"$":b=function(t){return t.getAttribute(z).lastIndexOf(w)==t.getAttribute(z).length-w.length};break;case"*":b=function(t){return t.getAttribute(z).indexOf(w)>-1};break;default:b=function(t){return t.getAttribute(z)}}for(m=[],d=0,c=0;c<o.length;c++)b(o[c])&&(m[d++]=o[c])}else{for(i=r,o=[],l=0,c=0;c<m.length;c++)for(u=m[c].getElementsByTagName(i),h=0;h<u.length;h++)o[l++]=u[h];m=o}}return m}return function(t){return Ln.isElement(t)?[t]:Ln.isObject(t)&&!Ln.isUndefined(t.length)?t:r.call(this,t)}}(),Ln.info={campaignParams:function(){var t="utm_source utm_medium utm_campaign utm_content utm_term".split(" "),e="",a={};return Ln.each(t,(function(t){(e=Ln.getQueryParam(gn.URL,t)).length&&(a[t]=e)})),a},searchEngine:function(t){return 0===t.search("https?://(.*)google.([^/?]*)")?"google":0===t.search("https?://(.*)bing.com")?"bing":0===t.search("https?://(.*)yahoo.com")?"yahoo":0===t.search("https?://(.*)duckduckgo.com")?"duckduckgo":null},searchInfo:function(t){var e=Ln.info.searchEngine(t),a="yahoo"!=e?"q":"p",r={};if(null!==e){r.$search_engine=e;var n=Ln.getQueryParam(t,a);n.length&&(r.ph_keyword=n)}return r},browser:function(t,e,a){return e=e||"",a||Ln.includes(t," OPR/")?Ln.includes(t,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(t)?"BlackBerry":Ln.includes(t,"IEMobile")||Ln.includes(t,"WPDesktop")?"Internet Explorer Mobile":Ln.includes(t,"SamsungBrowser/")?"Samsung Internet":Ln.includes(t,"Edge")||Ln.includes(t,"Edg/")?"Microsoft Edge":Ln.includes(t,"FBIOS")?"Facebook Mobile":Ln.includes(t,"Chrome")?"Chrome":Ln.includes(t,"CriOS")?"Chrome iOS":Ln.includes(t,"UCWEB")||Ln.includes(t,"UCBrowser")?"UC Browser":Ln.includes(t,"FxiOS")?"Firefox iOS":Ln.includes(e,"Apple")?Ln.includes(t,"Mobile")?"Mobile Safari":"Safari":Ln.includes(t,"Android")?"Android Mobile":Ln.includes(t,"Konqueror")?"Konqueror":Ln.includes(t,"Firefox")?"Firefox":Ln.includes(t,"MSIE")||Ln.includes(t,"Trident/")?"Internet Explorer":Ln.includes(t,"Gecko")?"Mozilla":""},browserVersion:function(t,e,a){var r={"Internet Explorer Mobile":/rv:(\d+(\.\d+)?)/,"Microsoft Edge":/Edge?\/(\d+(\.\d+)?)/,Chrome:/Chrome\/(\d+(\.\d+)?)/,"Chrome iOS":/CriOS\/(\d+(\.\d+)?)/,"UC Browser":/(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/,Safari:/Version\/(\d+(\.\d+)?)/,"Mobile Safari":/Version\/(\d+(\.\d+)?)/,Opera:/(Opera|OPR)\/(\d+(\.\d+)?)/,Firefox:/Firefox\/(\d+(\.\d+)?)/,"Firefox iOS":/FxiOS\/(\d+(\.\d+)?)/,Konqueror:/Konqueror:(\d+(\.\d+)?)/,BlackBerry:/BlackBerry (\d+(\.\d+)?)/,"Android Mobile":/android\s(\d+(\.\d+)?)/,"Samsung Internet":/SamsungBrowser\/(\d+(\.\d+)?)/,"Internet Explorer":/(rv:|MSIE )(\d+(\.\d+)?)/,Mozilla:/rv:(\d+(\.\d+)?)/}[Ln.info.browser(t,e,a)];if(void 0===r)return null;var n=t.match(r);return n?parseFloat(n[n.length-2]):null},os:function(){var t=xn;return/Windows/i.test(t)?/Phone/.test(t)||/WPDesktop/.test(t)?"Windows Phone":"Windows":/(iPhone|iPad|iPod)/.test(t)?"iOS":/Android/.test(t)?"Android":/(BlackBerry|PlayBook|BB10)/i.test(t)?"BlackBerry":/Mac/i.test(t)?"Mac OS X":/Linux/.test(t)?"Linux":/CrOS/.test(t)?"Chrome OS":""},device:function(t){return/Windows Phone/i.test(t)||/WPDesktop/.test(t)?"Windows Phone":/iPad/.test(t)?"iPad":/iPod/.test(t)?"iPod Touch":/iPhone/.test(t)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(t)?"BlackBerry":/Android/.test(t)?"Android":""},referringDomain:function(t){var e=t.split("/");return e.length>=3?e[2]:""},properties:function(){return Ln.extend(Ln.strip_empty_properties({$os:Ln.info.os(),$browser:Ln.info.browser(xn,yn.vendor,bn),$referrer:gn.referrer,$referring_domain:Ln.info.referringDomain(gn.referrer),$device:Ln.info.device(xn)}),{$current_url:Yr.location.href,$host:Yr.location.host,$pathname:Yr.location.pathname,$browser_version:Ln.info.browserVersion(xn,yn.vendor,bn),$screen_height:zn.height,$screen_width:zn.width,$lib:"web",$lib_version:Jr.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Ln.timestamp()/1e3})},people_properties:function(){return Ln.extend(Ln.strip_empty_properties({$os:Ln.info.os(),$browser:Ln.info.browser(xn,yn.vendor,bn)}),{$browser_version:Ln.info.browserVersion(xn,yn.vendor,bn)})}},Ln.toArray=Ln.toArray,Ln.isObject=Ln.isObject,Ln.JSONEncode=Ln.JSONEncode,Ln.JSONDecode=Ln.JSONDecode,Ln.isBlockedUA=Ln.isBlockedUA,Ln.isEmptyObject=Ln.isEmptyObject,Ln.info=Ln.info,Ln.info.device=Ln.info.device,Ln.info.browser=Ln.info.browser,Ln.info.browserVersion=Ln.info.browserVersion,Ln.info.properties=Ln.info.properties;var In=["a","button","form","input","select","textarea","label"];function Pn(t){for(var e=t;e.parentNode&&!jn(e,"body");e=e.parentNode){var a=On(e).split(" ");if(Ln.includes(a,"ph-sensitive")||Ln.includes(a,"ph-no-capture"))return!1}if(Ln.includes(On(t).split(" "),"ph-include"))return!0;var r=t.type||"";if("string"==typeof r)switch(r.toLowerCase()){case"hidden":case"password":return!1}var n=t.name||t.id||"";if("string"==typeof n){if(/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(n.replace(/[^a-zA-Z0-9]/g,"")))return!1}return!0}function Rn(t){return!!(jn(t,"input")&&"button"!=t.type||jn(t,"select")||jn(t,"textarea")||"true"===t.getAttribute("contenteditable"))}function Nn(t){if(null===t||Ln.isUndefined(t))return!1;if("string"==typeof t){t=Ln.trim(t);if(/^(?:(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11}))$/.test((t||"").replace(/[- ]/g,"")))return!1;if(/(^\d{3}-?\d{2}-?\d{4}$)/.test(t))return!1}return!0}var $n={_initializedTokens:[],_previousElementSibling:function(t){if(t.previousElementSibling)return t.previousElementSibling;do{t=t.previousSibling}while(t&&!Dn(t));return t},_loadScript:function(t,e){var a=document.createElement("script");a.type="text/javascript",a.src=t,a.onload=e;var r=document.getElementsByTagName("script");r.length>0?r[0].parentNode.insertBefore(a,r[0]):document.body.appendChild(a)},_getPropertiesFromElement:function(t){var e=t.tagName.toLowerCase(),a={tag_name:e};In.indexOf(e)>-1&&(a.$el_text=Tn(t));var r=On(t);r.length>0&&(a.classes=r.split(" ")),Ln.each(t.attributes,(function(e){Rn(t)&&-1===["name","id","class"].indexOf(e.name)||Nn(e.value)&&(a["attr__"+e.name]=e.value)}));for(var n=1,i=1,o=t;o=this._previousElementSibling(o);)n++,o.tagName===t.tagName&&i++;return a.nth_child=n,a.nth_of_type=i,a},_getDefaultProperties:function(t){return{$event_type:t,$ce_version:1}},_extractCustomPropertyValue:function(t){var e=[];return Ln.each(document.querySelectorAll(t.css_selector),(function(t){var a;["input","select"].indexOf(t.tagName.toLowerCase())>-1?a=t.value:t.textContent&&(a=t.textContent),Nn(a)&&e.push(a)})),e.join(", ")},_getCustomProperties:function(t){var e={};return Ln.each(this._customProperties,(function(a){Ln.each(a.event_selectors,(function(r){var n=document.querySelectorAll(r);Ln.each(n,(function(r){Ln.includes(t,r)&&Pn(r)&&(e[a.name]=this._extractCustomPropertyValue(a))}),this)}),this)}),this),e},_getEventTarget:function(t){return void 0===t.target?t.srcElement:t.target.shadowRoot?t.composedPath()[0]:t.target},_captureEvent:function(t,e){var a=this._getEventTarget(t);if(Fn(a)&&(a=a.parentNode),function(t,e){if(!t||jn(t,"html")||!Dn(t))return!1;for(var a=!1,r=[t],n=!0,i=t;i.parentNode&&!jn(i,"body");)if(11!==i.parentNode.nodeType){if(!(n=i.parentNode))break;if(In.indexOf(n.tagName.toLowerCase())>-1)a=!0;else{let t=window.getComputedStyle(n);t&&"pointer"===t.getPropertyValue("cursor")&&(a=!0)}r.push(n),i=n}else r.push(i.parentNode.host),i=i.parentNode.host;let o=window.getComputedStyle(t);if(o&&"pointer"===o.getPropertyValue("cursor")&&"click"===e.type)return!0;var l=t.tagName.toLowerCase();switch(l){case"html":return!1;case"form":return"submit"===e.type;case"input":return"change"===e.type||"click"===e.type;case"select":case"textarea":return"change"===e.type||"click"===e.type;default:return a?"click"===e.type:"click"===e.type&&(In.indexOf(l)>-1||"true"===t.getAttribute("contenteditable"))}}(a,t)){for(var r=[a],n=a;n.parentNode&&!jn(n,"body");)11!==n.parentNode.nodeType?(r.push(n.parentNode),n=n.parentNode):(r.push(n.parentNode.host),n=n.parentNode.host);var i,o=[],l=!1;if(Ln.each(r,(function(t){var e=Pn(t);"a"===t.tagName.toLowerCase()&&(i=t.getAttribute("href"),i=e&&Nn(i)&&i);var a=On(t).split(" ");Ln.includes(a,"ph-no-capture")&&(l=!0),o.push(this._getPropertiesFromElement(t))}),this),o[0].$el_text=Tn(a),i&&(o[0].attr__href=i),l)return!1;var s=Tn(a);s&&s.length;var c=Ln.extend(this._getDefaultProperties(t.type),{$elements:o},this._getCustomProperties(r));return e.capture("$autocapture",c),!0}},_navigate:function(t){window.location.href=t},_addDomEventHandlers:function(t){var e=Ln.bind((function(e){e=e||window.event,this._captureEvent(e,t)}),this);Ln.register_event(document,"submit",e,!1,!0),Ln.register_event(document,"change",e,!1,!0),Ln.register_event(document,"click",e,!1,!0)},_customProperties:{},init:function(t){this._maybeLoadEditor(t);var e=t.get_config("token");if(this._initializedTokens.indexOf(e)>-1)console.log('autocapture already initialized for token "'+e+'"');else{this._initializedTokens.push(e);var a=Ln.bind((function(e){if(!document||!document.body)return console.log("document not ready yet, trying again in 500 milliseconds..."),void setTimeout((function(){a(e)}),500);var r=e.editorParams||(e.toolbarVersion?{toolbarVersion:e.toolbarVersion}:{});if(e.isAuthenticated&&r.toolbarVersion&&0===r.toolbarVersion.indexOf("toolbar")&&(this._loadEditor(t,Object.assign({},r,{apiURL:t.get_config("api_host")})),t.set_config({debug:!0})),e&&e.config&&!0===e.config.enable_collect_everything?(e.custom_properties&&(this._customProperties=e.custom_properties),this._addDomEventHandlers(t)):t.__autocapture_enabled=!1,e.featureFlags?t.persistence&&t.persistence.register({$active_feature_flags:e.featureFlags}):t.persistence&&t.persistence.unregister("$active_feature_flags"),e.supportedCompression){let a={};for(const t of e.supportedCompression)a[t]=!0;t.compression=a}else t.compression={}}),this),r=Ln.JSONEncode({token:e,distinct_id:t.get_distinct_id()}),n=Ln.base64Encode(r);t._send_request(t.get_config("api_host")+"/decide/",{data:n},{method:"POST"},t._prepare_callback(a))}},_maybeLoadEditor:function(t){try{var e,a=Ln.getHashParam(window.location.hash,"__posthog")||Ln.getHashParam(window.location.hash,"state"),r=a?JSON.parse(decodeURIComponent(a)):null;return r&&("mpeditor"===r.action||"ph_authorize"===r.action)?(e=r)&&Object.keys(e).length>0&&(window.localStorage.setItem("_postHogEditorParams",JSON.stringify(e)),r.desiredHash?window.location.hash=r.desiredHash:window.history?history.replaceState("",document.title,window.location.pathname+window.location.search):window.location.hash=""):delete(e=JSON.parse(window.localStorage.getItem("_postHogEditorParams")||"{}")).userIntent,e.apiURL=t.get_config("api_host"),!(!e.token||t.get_config("token")!==e.token)&&(this._loadEditor(t,e),!0)}catch(n){return!1}},_loadEditor:function(t,e){var a=this;if(!window._postHogToolbarLoaded){window._postHogToolbarLoaded=!0;var r=e.jsURL||e.apiURL||t.get_config("api_host"),n=e.toolbarVersion&&0===e.toolbarVersion.indexOf("toolbar")?"toolbar.js":"editor.js",i=r+(r.endsWith("/")?"":"/")+"static/"+n+"?_ts="+(new Date).getTime();return this._loadScript(i,(function(){window.ph_load_editor(e)})),Ln.register_event(window,"turbolinks:load",(function(){window._postHogToolbarLoaded=!1,a._loadEditor(t,e)})),!0}return!1},enabledForProject:function(t,e,a){e=Ln.isUndefined(e)?10:e,a=Ln.isUndefined(a)?10:a;for(var r=0,n=0;n<t.length;n++)r+=t.charCodeAt(n);return r%e<a},isBrowserSupported:function(){return Ln.isFunction(document.querySelectorAll)}};Ln.bind_instance_methods($n),Ln.safewrap_instance_methods($n);var Un=function(){};Un.prototype.create_properties=function(){},Un.prototype.event_handler=function(){},Un.prototype.after_capture_handler=function(){},Un.prototype.init=function(t){return this.mp=t,this},Un.prototype.capture=function(t,e,a,r){var n=this,i=Ln.dom_query(t);if(0!==i.length)return Ln.each(i,(function(t){Ln.register_event(t,this.override_event,(function(t){var i={},o=n.create_properties(a,this),l=n.mp.get_config("capture_links_timeout");n.event_handler(t,this,i),window.setTimeout(n.capture_callback(r,o,i,!0),l),n.mp.capture(e,o,n.capture_callback(r,o,i))}))}),this),!0;kn("The DOM query ("+t+") returned 0 elements")},Un.prototype.capture_callback=function(t,e,a,r){r=r||!1;var n=this;return function(){a.callback_fired||(a.callback_fired=!0,t&&!1===t(r,e)||n.after_capture_handler(e,a,r))}},Un.prototype.create_properties=function(t,e){return"function"==typeof t?t(e):Ln.extend({},t)};var Wn=function(){this.override_event="click"};Ln.inherit(Wn,Un),Wn.prototype.create_properties=function(t,e){var a=Wn.superclass.create_properties.apply(this,arguments);return e.href&&(a.url=e.href),a},Wn.prototype.event_handler=function(t,e,a){a.new_tab=2===t.which||t.metaKey||t.ctrlKey||"_blank"===e.target,a.href=e.href,a.new_tab||t.preventDefault()},Wn.prototype.after_capture_handler=function(t,e){e.new_tab||setTimeout((function(){window.location=e.href}),0)};var qn=function(){this.override_event="submit"};Ln.inherit(qn,Un),qn.prototype.event_handler=function(t,e,a){a.element=e,t.preventDefault()},qn.prototype.after_capture_handler=function(t,e){setTimeout((function(){e.element.submit()}),0)};function Gn(t,e){ai(!0,t,e)}function Yn(t,e){ai(!1,t,e)}function Kn(t,e){return"1"===ei(t,e)}function Jn(t,e){return!!function(t){if(t&&t.respectDnt){var e=t&&t.window||Yr,a=e.navigator||{},r=!1;return Ln.each([a.doNotTrack,a.msDoNotTrack,e.doNotTrack],(function(t){Ln.includes([!0,1,"1","yes"],t)&&(r=!0)})),r}return!1}(e)||"0"===ei(t,e)}function Zn(t,e){return ri(t,(function(t){return this._get_config(t)}),e)}function Xn(t,e){Qn(e=e||{}).remove(ti(t,e),!!e.crossSubdomainCookie,e.cookieDomain)}function Qn(t){return"localStorage"===(t=t||{}).persistenceType?Ln.localStorage:Ln.cookie}function ti(t,e){return((e=e||{}).persistencePrefix||"__ph_opt_in_out_")+t}function ei(t,e){return Qn(e).get(ti(t,e))}function ai(t,e,a){Ln.isString(e)&&e.length?(Qn(a=a||{}).set(ti(e,a),t?1:0,Ln.isNumber(a.cookieExpiration)?a.cookieExpiration:null,!!a.crossSubdomainCookie,!!a.secureCookie,!!a.crossSiteCookie,a.cookieDomain),a.capture&&t&&a.capture(a.captureEventName||"$opt_in",a.captureProperties,{send_immediately:!0})):console.error("gdpr."+(t?"optIn":"optOut")+" called with an invalid token")}function ri(t,e,a){return function(){var r=!1;try{var n=e.call(this,"token"),i=e.call(this,"respect_dnt"),o=e.call(this,"opt_out_capturing_persistence_type"),l=e.call(this,"opt_out_capturing_cookie_prefix"),s=e.call(this,"window");n&&(r=Jn(n,{respectDnt:i,persistenceType:o,persistencePrefix:l,window:s}))}catch(h){a||console.error("Unexpected error when checking capturing opt-out status: "+h)}if(!r)return t.apply(this,arguments);var c=arguments[arguments.length-1];"function"==typeof c&&c(0)}}var ni={set_action:function(t,e){var a={},r={};return Ln.isObject(t)?Ln.each(t,(function(t,e){this._is_reserved_property(e)||(r[e]=t)}),this):r[t]=e,a.$set=r,a},set_once_action:function(t,e){var a={},r={};return Ln.isObject(t)?Ln.each(t,(function(t,e){this._is_reserved_property(e)||(r[e]=t)}),this):r[t]=e,a.$set_once=r,a}},ii=function(){};Ln.extend(ii.prototype,ni),ii.prototype._init=function(t){this._posthog=t},ii.prototype.set=Zn((function(t,e,a){var r=this.set_action(t,e);return Ln.isObject(t)&&(a=e),this._get_config("save_referrer")&&this._posthog.persistence.update_referrer_info(document.referrer),r.$set=Ln.extend({},Ln.info.people_properties(),this._posthog.persistence.get_referrer_info(),r.$set),this._send_request(r,a)})),ii.prototype.set_once=Zn((function(t,e,a){var r=this.set_once_action(t,e);return Ln.isObject(t)&&(a=e),this._send_request(r,a)})),ii.prototype.toString=function(){return this._posthog.toString()+".people"},ii.prototype._send_request=function(t,e){t.$token=this._get_config("token"),t.$distinct_id=this._posthog.get_distinct_id();var a=this._posthog.get_property("$device_id"),r=this._posthog.get_property("$user_id"),n=this._posthog.get_property("$had_persisted_distinct_id");a&&(t.$device_id=a),r&&(t.$user_id=r),n&&(t.$had_persisted_distinct_id=n);var i=Ln.encodeDates(t),o=Ln.truncate(i,255),l=Ln.JSONEncode(i),s=Ln.base64Encode(l);return this._posthog._send_request(this._get_config("api_host")+"/engage/",{data:s},this._posthog._prepare_callback(e,o)),o},ii.prototype._get_config=function(t){return this._posthog.get_config(t)},ii.prototype._identify_called=function(){return!0===this._posthog._flags.identify_called},ii.prototype._enqueue=function(t){"$set"in t?this._posthog.persistence._add_to_people_queue("$set",t):"$set_once"in t?this._posthog.persistence._add_to_people_queue("$set_once",t):kn("Invalid call to _enqueue():",t)},ii.prototype._flush_one_queue=function(t,e,a,r){var n=this,i=Ln.extend({},this._posthog.persistence._get_queue(t)),o=i;Ln.isUndefined(i)||!Ln.isObject(i)||Ln.isEmptyObject(i)||(n._posthog.persistence._pop_from_people_queue(t,i),r&&(o=r(i)),e.call(n,o,(function(e,r){0===e&&n._posthog.persistence._add_to_people_queue(t,i),Ln.isUndefined(a)||a(e,r)})))},ii.prototype._flush=function(t,e){this._flush_one_queue("$set",this.set,t),this._flush_one_queue("$set_once",this.set_once,e)},ii.prototype._is_reserved_property=function(t){return"$distinct_id"===t||"$token"===t||"$device_id"===t||"$user_id"===t||"$had_persisted_distinct_id"===t},ii.prototype.set=ii.prototype.set,ii.prototype.set_once=ii.prototype.set_once,ii.prototype.toString=ii.prototype.toString;var oi=function(){};oi.prototype._init=function(t){this._posthog=t},oi.prototype.getFlags=function(){return this._posthog.persistence.props.$override_feature_flags?(this._override_warning||console.warn("[PostHog] Overriding feature flags! Feature flags from server were: "+JSON.stringify(this._posthog.persistence.props.$active_feature_flags)),this._override_warning=!0,this._posthog.persistence.props.$override_feature_flags):this._posthog.persistence.props.$active_feature_flags},oi.prototype.reloadFeatureFlags=function(){var t=this._posthog,e=Ln.bind((function(e){e.featureFlags?t.persistence&&t.persistence.register({$active_feature_flags:e.featureFlags}):t.persistence&&t.persistence.unregister("$active_feature_flags")})),a=t.config.token,r=Ln.JSONEncode({token:a,distinct_id:t.get_distinct_id()}),n=Ln.base64Encode(r);t._send_request(t.get_config("api_host")+"/decide/",{data:n},{method:"POST"},t._prepare_callback(e))},oi.prototype.isFeatureEnabled=function(t){return this.getFlags()?this.getFlags().indexOf(t)>-1:(console.warn('isFeatureEnabled for key "'+t+"\" failed. Feature flags didn't load in time."),!1)},oi.prototype.override=function(t){if(!1===t)return this._posthog.persistence.unregister("$override_feature_flags");this._posthog.persistence.register("$override_feature_flags",t)};var li,si,ci=["__mps","__mpso","__mpus","__mpa","__mpap","__mpr","__mpu","$people_distinct_id","__alias","__cmpns","__timers"],hi=function(t){this.props={},this.campaign_params_saved=!1,this.featureFlagEventHandlers=[],t.persistence_name?this.name="ph_"+t.persistence_name:this.name="ph_"+t.token+"_posthog";var e=t.persistence;"cookie"!==e&&"localStorage"!==e&&(Cn("Unknown persistence type "+e+"; falling back to cookie"),e=t.persistence="cookie"),"localStorage"===e&&Ln.localStorage.is_supported()?this.storage=Ln.localStorage:this.storage=Ln.cookie,this.load(),this.update_config(t),this.upgrade(t),this.save()};hi.prototype.addFeatureFlagsHandler=function(t){return this.featureFlagEventHandlers.push(t),!0},hi.prototype.receivedFeatureFlags=function(t){this.featureFlagEventHandlers.forEach((e=>e(t)))},hi.prototype.properties=function(){var t={};return Ln.each(this.props,(function(e,a){Ln.include(ci,a)||(t[a]=e)})),t},hi.prototype.load=function(){if(!this.disabled){var t=this.storage.parse(this.name);t&&(this.props=Ln.extend({},t))}},hi.prototype.upgrade=function(t){var e,a,r=t.upgrade;r&&(e="ph_super_properties","string"==typeof r&&(e=r),a=this.storage.parse(e),this.storage.remove(e),this.storage.remove(e,!0),a&&(this.props=Ln.extend(this.props,a.all,a.events))),t.cookie_name||"posthog"===t.name||(e="ph_"+t.token+"_"+t.name,(a=this.storage.parse(e))&&(this.storage.remove(e),this.storage.remove(e,!0),this.register_once(a))),this.storage===Ln.localStorage&&(a=Ln.cookie.parse(this.name),Ln.cookie.remove(this.name),Ln.cookie.remove(this.name,!0),a&&this.register_once(a))},hi.prototype.save=function(){this.disabled||(this._expire_notification_campaigns(),this.storage.set(this.name,Ln.JSONEncode(this.props),this.expire_days,this.cross_subdomain,this.secure))},hi.prototype.remove=function(){this.storage.remove(this.name,!1),this.storage.remove(this.name,!0)},hi.prototype.clear=function(){this.remove(),this.props={}},hi.prototype.register_once=function(t,e,a){return!!Ln.isObject(t)&&(void 0===e&&(e="None"),this.expire_days=void 0===a?this.default_expiry:a,t&&t.$active_feature_flags&&this.receivedFeatureFlags(t.$active_feature_flags),Ln.each(t,(function(t,a){this.props.hasOwnProperty(a)&&this.props[a]!==e||(this.props[a]=t)}),this),this.save(),!0)},hi.prototype.register=function(t,e){return!!Ln.isObject(t)&&(this.expire_days=void 0===e?this.default_expiry:e,t&&t.$active_feature_flags&&this.receivedFeatureFlags(t.$active_feature_flags),Ln.extend(this.props,t),this.save(),!0)},hi.prototype.unregister=function(t){t in this.props&&(delete this.props[t],this.save(),"$active_feature_flags"===t&&this.receivedFeatureFlags([]))},hi.prototype._expire_notification_campaigns=Ln.safewrap((function(){var t=this.props.__cmpns,e=Jr.DEBUG?6e4:36e5;if(t){for(var a in t)1*new Date-t[a]>e&&delete t[a];Ln.isEmptyObject(t)&&delete this.props.__cmpns}})),hi.prototype.update_campaign_params=function(){this.campaign_params_saved||(this.register_once(Ln.info.campaignParams()),this.campaign_params_saved=!0)},hi.prototype.update_search_keyword=function(t){this.register(Ln.info.searchInfo(t))},hi.prototype.update_referrer_info=function(t){this.register_once({$initial_referrer:t||"$direct",$initial_referring_domain:Ln.info.referringDomain(t)||"$direct"},"")},hi.prototype.get_referrer_info=function(){return Ln.strip_empty_properties({$initial_referrer:this.props.$initial_referrer,$initial_referring_domain:this.props.$initial_referring_domain})},hi.prototype.safe_merge=function(t){return Ln.each(this.props,(function(e,a){a in t||(t[a]=e)})),t},hi.prototype.update_config=function(t){this.default_expiry=this.expire_days=t.cookie_expiration,this.set_disabled(t.disable_persistence),this.set_cross_subdomain(t.cross_subdomain_cookie),this.set_secure(t.secure_cookie)},hi.prototype.set_disabled=function(t){this.disabled=t,this.disabled?this.remove():this.save()},hi.prototype.set_cross_subdomain=function(t){t!==this.cross_subdomain&&(this.cross_subdomain=t,this.remove(),this.save())},hi.prototype.get_cross_subdomain=function(){return this.cross_subdomain},hi.prototype.set_secure=function(t){t!==this.secure&&(this.secure=!!t,this.remove(),this.save())},hi.prototype._add_to_people_queue=function(t,e){var a=this._get_queue_key(t),r=e[t],n=this._get_or_create_queue("$set"),i=this._get_or_create_queue("$set_once");"__mps"===a?Ln.extend(n,r):"__mpso"===a&&Ln.each(r,(function(t,e){e in i||(i[e]=t)})),this.save()},hi.prototype._pop_from_people_queue=function(t,e){var a=this._get_queue(t);Ln.isUndefined(a)||(Ln.each(e,(function(t,e){delete a[e]}),this),this.save())},hi.prototype._get_queue_key=function(t){return"$set"===t?"__mps":"$set_once"===t?"__mpso":void kn("Invalid queue:",t)},hi.prototype._get_queue=function(t){return this.props[this._get_queue_key(t)]},hi.prototype._get_or_create_queue=function(t,e){var a=this._get_queue_key(t);return e=Ln.isUndefined(e)?{}:e,this.props[a]||(this.props[a]=e)},hi.prototype.set_event_timer=function(t,e){var a=this.props.__timers||{};a[t]=e,this.props.__timers=a,this.save()},hi.prototype.remove_event_timer=function(t){var e=(this.props.__timers||{})[t];return Ln.isUndefined(e)||(delete this.props.__timers[t],this.save()),e};var ui=function(){},di={},pi=Yr.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,mi=!pi&&-1===xn.indexOf("MSIE")&&-1===xn.indexOf("Mozilla"),vi=Yr.navigator.sendBeacon;vi&&(vi=Ln.bind(vi,yn));var fi,yi={api_host:"https://app.posthog.com",api_method:"POST",api_transport:"XHR",autocapture:!0,cross_subdomain_cookie:-1===gn.location.hostname.indexOf("herokuapp.com"),persistence:"cookie",persistence_name:"",cookie_name:"",loaded:function(){},store_google:!0,save_referrer:!0,test:!1,verbose:!1,img:!1,capture_pageview:!0,debug:!1,capture_links_timeout:300,cookie_expiration:365,upgrade:!1,disable_persistence:!1,disable_cookie:!1,secure_cookie:"https:"===Yr.location.protocol,ip:!0,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_capturing_persistence_type:"localStorage",opt_out_capturing_cookie_prefix:null,property_blacklist:[],sanitize_properties:null,xhr_headers:{},inapp_protocol:"//",inapp_link_new_window:!1,request_batching:!0},gi=!1,bi=function(){},zi=function(t,e,a){var r,n="posthog"===a?si:si[a];if(n&&0===li)r=n;else{if(n&&!Ln.isArray(n))return void kn("You have already initialized "+a);r=new bi}if(r._cached_groups={},r._user_decide_check_complete=!1,r._events_captureed_before_user_decide_check_complete=[],r._init(t,e,a),r.people=new ii,r.people._init(r),r.feature_flags=new oi,r.feature_flags._init(r),Jr.DEBUG=Jr.DEBUG||r.get_config("debug"),r.__autocapture_enabled=r.get_config("autocapture"),r.get_config("autocapture")){$n.enabledForProject(r.get_config("token"),100,100)?$n.isBrowserSupported()?$n.init(r):(r.__autocapture_enabled=!1,Bn("Disabling Automatic Event Collection because this browser is not supported")):(r.__autocapture_enabled=!1,Bn("Not in active bucket: disabling Automatic Event Collection."))}return!Ln.isUndefined(n)&&Ln.isArray(n)&&(r._execute_array.call(r.people,n.people),r._execute_array(n)),r};function xi(t){Yr.console.warn("WARNING! posthog."+t+" is deprecated and will be removed soon! Please use posthog."+t.split("captureing").join("capturing")+' instead (without the "e")!')}bi.prototype.init=function(t,e,a){if(Ln.isUndefined(a))kn("You must name your new library: init(token, config, name)");else{if("posthog"!==a){var r=zi(t,e,a);return si[a]=r,r._loaded(),r}kn("You must initialize the main posthog object right after you include the PostHog js snippet")}},bi.prototype._init=function(t,e,a){this.__loaded=!0,this.config={},this._triggered_notifs=[],this.compression={},this.set_config(Ln.extend({},yi,e,{name:a,token:t,callback_fn:("posthog"===a?a:"posthog."+a)+"._jsc"})),this._jsc=function(){},this._event_queue=[],this._empty_queue_count=0,this._should_poll=!0,this._poller=function(){},this.__dom_loaded_queue=[],this.__request_queue=[],this.__disabled_events=[],this._flags={disable_all_events:!1,identify_called:!1},this.persistence=this.cookie=new hi(this.config),this._gdpr_init();var r=Ln.UUID();this.get_distinct_id()||this.register_once({distinct_id:r,$device_id:r},""),Yr.addEventListener&&Yr.addEventListener("unload",this._handle_unload.bind(this))},bi.prototype._loaded=function(){this.get_config("loaded")(this),this._start_queue_if_opted_in(),this.get_config("capture_pageview")&&this.capture_pageview()},bi.prototype._start_queue_if_opted_in=function(){this.has_opted_out_capturing()||this.get_config("request_batching")&&this._event_queue_poll()},bi.prototype._dom_loaded=function(){Ln.each(this.__dom_loaded_queue,(function(t){this._capture_dom.apply(this,t)}),this),this.has_opted_out_capturing()||Ln.each(this.__request_queue,(function(t){this._send_request.apply(this,t)}),this),delete this.__dom_loaded_queue,delete this.__request_queue,this._start_queue_if_opted_in()},bi.prototype._capture_dom=function(t,e){if(this.get_config("img"))return kn("You can't use DOM capturing functions with img = true."),!1;if(!gi)return this.__dom_loaded_queue.push([t,e]),!1;var a=(new t).init(this);return a.capture.apply(a,e)},bi.prototype._prepare_callback=function(t,e){if(Ln.isUndefined(t))return null;if(pi){return function(a){t(a,e)}}var a=this._jsc,r=""+Math.floor(1e8*Math.random()),n=this.get_config("callback_fn")+"["+r+"]";return a[r]=function(n){delete a[r],t(n,e)},n},bi.prototype._event_enqueue=function(t,e,a,r){this._event_queue.push({url:t,data:e,options:a,callback:r}),this._should_poll||(this._should_poll=!0,this._event_queue_poll())},bi.prototype._format_event_queue_data=function(){const t={};return Ln.each(this._event_queue,(e=>{const{url:a,data:r}=e;void 0===t[a]&&(t[a]=[]),t[a].push(r)})),t},bi.prototype._event_queue_poll=function(){clearInterval(this._poller),this._poller=setTimeout((()=>{if(this._event_queue.length>0){const a=this._format_event_queue_data();for(let r in a){let n=a[r];Ln.each(n,(function(t,e){n[e].offset=Math.abs(n[e].timestamp-new Date),delete n[e].timestamp}));var t=Ln.JSONEncode(n);if(this.compression.lz64){var e=Kr.compressToBase64(t);this._send_request(r,{data:e,compression:"lz64"},di,ui)}else{e=Ln.base64Encode(t);this._send_request(r,{data:e},di,ui)}}this._event_queue.length=0}else this._empty_queue_count++;this._empty_queue_count>4&&(this._should_poll=!1,this._empty_queue_count=0),this._should_poll&&this._event_queue_poll()}),3e3)},bi.prototype._handle_unload=function(){if(!this.get_config("request_batching"))return void this.capture("$pageleave",null,{transport:"sendbeacon"});clearInterval(this._poller),this.capture("$pageleave");let t={};this._event_queue.length>0&&(t=this._format_event_queue_data()),this._event_queue.length=0;for(let e in t)if(this.compression.lz64){const a=Kr.compressToBase64(Ln.JSONEncode(t[e]));this._send_request(e,{data:a,compression:"lz64"},{transport:"sendbeacon"},ui)}else{const a=Ln.base64Encode(Ln.JSONEncode(t[e]));this._send_request(e,{data:a},{transport:"sendbeacon"},ui)}},bi.prototype._send_request=function(t,e,a,r){if(mi)this.__request_queue.push(arguments);else{var n={method:this.get_config("api_method"),transport:this.get_config("api_transport")},i=null;r||!Ln.isFunction(a)&&"string"!=typeof a||(r=a,a=null),a=Ln.extend(n,a||{}),pi||(a.method="GET");var o=vi&&"sendbeacon"===a.transport.toLowerCase(),l=o||"POST"===a.method,s=this.get_config("verbose");e.verbose&&(s=!0),this.get_config("test")&&(e.test=1),s&&(e.verbose=1),this.get_config("img")&&(e.img=1),pi||(r?e.callback=r:(s||this.get_config("test"))&&(e.callback="(function(){})"));var c={};if(c.ip=this.get_config("ip")?1:0,c._=(new Date).getTime().toString(),l&&(i=Array.isArray(e)?"data="+encodeURIComponent(e):"data="+encodeURIComponent(e.data),delete e.data,e.compression&&(i+="&compression="+e.compression,delete e.compression)),t+="?"+Ln.HTTPBuildQuery(c),"img"in e){var h=gn.createElement("img");h.src=t,gn.body.appendChild(h)}else if(o){const e=new Blob([i],{type:"application/x-www-form-urlencoded"});vi(t,e)}else if(pi)try{var u=new XMLHttpRequest;u.open(a.method,t,!0);var d=this.get_config("xhr_headers");l&&(d["Content-Type"]="application/x-www-form-urlencoded"),Ln.each(d,(function(t,e){u.setRequestHeader(e,t)})),u.withCredentials=!0,u.onreadystatechange=function(){if(4===u.readyState)if(200===u.status){if(r){var t;try{t=Ln.JSONDecode(u.responseText)}catch(a){return void kn(a)}r(t)}}else{var e="Bad HTTP status: "+u.status+" "+u.statusText;kn(e),r&&r(s?{status:0,error:e}:0)}},u.send(i)}catch(v){kn(v)}else{var p=gn.createElement("script");p.type="text/javascript",p.async=!0,p.defer=!0,p.src=t;var m=gn.getElementsByTagName("script")[0];m.parentNode.insertBefore(p,m)}}},bi.prototype._execute_array=function(t){var e,a=[],r=[],n=[];Ln.each(t,(function(t){t&&(e=t[0],Ln.isArray(e)?n.push(t):"function"==typeof t?t.call(this):Ln.isArray(t)&&"alias"===e?a.push(t):Ln.isArray(t)&&-1!==e.indexOf("capture")&&"function"==typeof this[e]?n.push(t):r.push(t))}),this);var i=function(t,e){Ln.each(t,(function(t){if(Ln.isArray(t[0])){var a=e;Ln.each(t,(function(t){a=a[t[0]].apply(a,t.slice(1))}))}else this[t[0]].apply(this,t.slice(1))}),e)};i(a,this),i(r,this),i(n,this)},bi.prototype.push=function(t){this._execute_array([t])},bi.prototype.capture=ri((function(t,e,a,r){r||"function"!=typeof a||(r=a,a=null);var n=(a=a||di).transport;if(n&&(a.transport=n),"function"!=typeof r&&(r=ui),Ln.isUndefined(t))return void kn("No event name provided to posthog.capture");if(this._event_is_disabled(t))return void r(0);(e=e||{}).token=this.get_config("token");var i=this.persistence.remove_event_timer(t);if(!Ln.isUndefined(i)){var o=(new Date).getTime()-i;e.$duration=parseFloat((o/1e3).toFixed(3))}this.persistence.update_search_keyword(gn.referrer),this.get_config("store_google")&&this.persistence.update_campaign_params(),this.get_config("save_referrer")&&this.persistence.update_referrer_info(gn.referrer),e=Ln.extend({},Ln.info.properties(),this.persistence.properties(),e);var l=this.get_config("property_blacklist");Ln.isArray(l)?Ln.each(l,(function(t){delete e[t]})):kn("Invalid value for property_blacklist config: "+l);var s=this.get_config("sanitize_properties");s&&(e=s(e,t));var c={event:t,properties:e},h=Ln.truncate(c,255),u=Ln.JSONEncode(h);const d=this.get_config("api_host")+"/e/",p=this._prepare_callback(r,h),m=r!==ui||a!==di;return!this.get_config("request_batching")||m?this.compression.lz64?this._send_request(d,{data:Kr.compressToBase64(u),compression:"lz64"},a,p):this._send_request(d,{data:Ln.base64Encode(u)},a,p):(c.timestamp=new Date,this._event_enqueue(d,c,a,p)),h}),(function(t){return this.get_config(t)}),fi),bi.prototype._create_map_key=function(t,e){return t+"_"+JSON.stringify(e)},bi.prototype._remove_group_from_cache=function(t,e){delete this._cached_groups[this._create_map_key(t,e)]},bi.prototype.capture_pageview=function(t){Ln.isUndefined(t)&&(t=gn.location.href),this.capture("$pageview")},bi.prototype.capture_links=function(){return this._capture_dom.call(this,Wn,arguments)},bi.prototype.capture_forms=function(){return this._capture_dom.call(this,FormCaptureer,arguments)},bi.prototype.register=function(t,e){this.persistence.register(t,e)},bi.prototype.register_once=function(t,e,a){this.persistence.register_once(t,e,a)},bi.prototype.unregister=function(t){this.persistence.unregister(t)},bi.prototype._register_single=function(t,e){var a={};a[t]=e,this.register(a)},bi.prototype.isFeatureEnabled=function(t){return this.feature_flags.isFeatureEnabled(t)},bi.prototype.reloadFeatureFlags=function(){return this.feature_flags.reloadFeatureFlags()},bi.prototype.onFeatureFlags=function(t){this.persistence.addFeatureFlagsHandler(t);const e=this.feature_flags.getFlags();e&&t(e)},bi.prototype.identify=function(t,e,a){if(t){var r=this.get_distinct_id();if(this.register({$user_id:t}),!this.get_property("$device_id")){var n=r;this.register_once({$had_persisted_distinct_id:!0,$device_id:n},"")}t!==r&&t!==this.get_property("__alias")&&(this.unregister("__alias"),this.register({distinct_id:t})),this._flags.identify_called=!0,this.people._flush(e,a),t!==r&&this.capture("$identify",{distinct_id:t,$anon_distinct_id:r}),this.reloadFeatureFlags()}else kn("Unique user id has not been set in posthog.identify")},bi.prototype.reset=function(t){let e=this.get_property("$device_id");this.persistence.clear(),this._flags.identify_called=!1;var a=Ln.UUID();this.register_once({distinct_id:a,$device_id:t?a:e},"")},bi.prototype.get_distinct_id=function(){return this.get_property("distinct_id")},bi.prototype.alias=function(t,e){if(t===this.get_property("$people_distinct_id"))return Cn("Attempting to create alias for existing People user - aborting."),-2;var a=this;return Ln.isUndefined(e)&&(e=this.get_distinct_id()),t!==e?(this._register_single("__alias",t),this.capture("$create_alias",{alias:t,distinct_id:e},(function(){a.identify(t)}))):(kn("alias matches current distinct_id - skipping api call."),this.identify(t),-1)},bi.prototype.set_config=function(t){Ln.isObject(t)&&(Ln.extend(this.config,t),this.get_config("persistence_name")||(this.config.persistence_name=this.config.cookie_name),this.get_config("disable_persistence")||(this.config.disable_persistence=this.config.disable_cookie),this.persistence&&this.persistence.update_config(this.config),Jr.DEBUG=Jr.DEBUG||this.get_config("debug"))},bi.prototype.get_config=function(t){return this.config[t]},bi.prototype.get_property=function(t){return this.persistence.props[t]},bi.prototype.toString=function(){var t=this.get_config("name");return"posthog"!==t&&(t="posthog."+t),t},bi.prototype._event_is_disabled=function(t){return Ln.isBlockedUA(xn)||this._flags.disable_all_events||Ln.include(this.__disabled_events,t)},bi.prototype._gdpr_init=function(){"localStorage"===this.get_config("opt_out_capturing_persistence_type")&&Ln.localStorage.is_supported()&&(!this.has_opted_in_capturing()&&this.has_opted_in_capturing({persistence_type:"cookie"})&&this.opt_in_capturing({enable_persistence:!1}),!this.has_opted_out_capturing()&&this.has_opted_out_capturing({persistence_type:"cookie"})&&this.opt_out_capturing({clear_persistence:!1}),this.clear_opt_in_out_capturing({persistence_type:"cookie",enable_persistence:!1})),this.has_opted_out_capturing()?this._gdpr_update_persistence({clear_persistence:!0}):this.has_opted_in_capturing()||!this.get_config("opt_out_capturing_by_default")&&!Ln.cookie.get("ph_optout")||(Ln.cookie.remove("ph_optout"),this.opt_out_capturing({clear_persistence:this.get_config("opt_out_persistence_by_default")}))},bi.prototype._gdpr_update_persistence=function(t){var e;if(t&&t.clear_persistence)e=!0;else{if(!t||!t.enable_persistence)return;e=!1}this.get_config("disable_persistence")||this.persistence.disabled===e||this.persistence.set_disabled(e)},bi.prototype._gdpr_call_func=function(t,e){return e=Ln.extend({capture:Ln.bind(this.capture,this),persistence_type:this.get_config("opt_out_capturing_persistence_type"),cookie_prefix:this.get_config("opt_out_capturing_cookie_prefix"),cookie_expiration:this.get_config("cookie_expiration"),cross_subdomain_cookie:this.get_config("cross_subdomain_cookie"),secure_cookie:this.get_config("secure_cookie")},e),Ln.localStorage.is_supported()||(e.persistence_type="cookie"),t(this.get_config("token"),{capture:e.capture,captureEventName:e.capture_event_name,captureProperties:e.capture_properties,persistenceType:e.persistence_type,persistencePrefix:e.cookie_prefix,cookieExpiration:e.cookie_expiration,crossSubdomainCookie:e.cross_subdomain_cookie,secureCookie:e.secure_cookie})},bi.prototype.opt_in_capturing=function(t){t=Ln.extend({enable_persistence:!0},t),this._gdpr_call_func(Gn,t),this._gdpr_update_persistence(t)},bi.prototype.opt_in_captureing=function(t){xi("opt_in_captureing"),this.opt_in_capturing(t)},bi.prototype.opt_out_capturing=function(t){(t=Ln.extend({clear_persistence:!0,delete_user:!0},t)).delete_user&&this.people&&this.people._identify_called()&&(this.people.delete_user(),this.people.clear_charges()),this._gdpr_call_func(Yn,t),this._gdpr_update_persistence(t)},bi.prototype.opt_out_captureing=function(t){xi("opt_out_captureing"),this.opt_out_capturing(t)},bi.prototype.has_opted_in_capturing=function(t){return this._gdpr_call_func(Kn,t)},bi.prototype.has_opted_in_captureing=function(t){return xi("has_opted_in_captureing"),this.has_opted_in_capturing(t)},bi.prototype.has_opted_out_capturing=function(t){return this._gdpr_call_func(Jn,t)},bi.prototype.has_opted_out_captureing=function(t){return xi("has_opted_out_captureing"),this.has_opted_out_capturing(t)},bi.prototype.clear_opt_in_out_capturing=function(t){t=Ln.extend({enable_persistence:!0},t),this._gdpr_call_func(Xn,t),this._gdpr_update_persistence(t)},bi.prototype.clear_opt_in_out_captureing=function(t){xi("clear_opt_in_out_captureing"),this.clear_opt_in_out_capturing(t)},bi.prototype.decodeLZ64=Kr.decompressFromBase64,bi.prototype.init=bi.prototype.init,bi.prototype.reset=bi.prototype.reset,bi.prototype.capture=bi.prototype.capture,bi.prototype.capture_links=bi.prototype.capture_links,bi.prototype.capture_forms=bi.prototype.capture_forms,bi.prototype.capture_pageview=bi.prototype.capture_pageview,bi.prototype.register=bi.prototype.register,bi.prototype.register_once=bi.prototype.register_once,bi.prototype.unregister=bi.prototype.unregister,bi.prototype.identify=bi.prototype.identify,bi.prototype.alias=bi.prototype.alias,bi.prototype.set_config=bi.prototype.set_config,bi.prototype.get_config=bi.prototype.get_config,bi.prototype.get_property=bi.prototype.get_property,bi.prototype.get_distinct_id=bi.prototype.get_distinct_id,bi.prototype.toString=bi.prototype.toString,bi.prototype.opt_out_captureing=bi.prototype.opt_out_captureing,bi.prototype.opt_in_captureing=bi.prototype.opt_in_captureing,bi.prototype.has_opted_out_captureing=bi.prototype.has_opted_out_captureing,bi.prototype.has_opted_in_captureing=bi.prototype.has_opted_in_captureing,bi.prototype.clear_opt_in_out_captureing=bi.prototype.clear_opt_in_out_captureing,bi.prototype.opt_out_capturing=bi.prototype.opt_out_capturing,bi.prototype.opt_in_capturing=bi.prototype.opt_in_capturing,bi.prototype.has_opted_out_capturing=bi.prototype.has_opted_out_capturing,bi.prototype.has_opted_in_capturing=bi.prototype.has_opted_in_capturing,bi.prototype.clear_opt_in_out_capturing=bi.prototype.clear_opt_in_out_capturing,bi.prototype.isFeatureEnabled=bi.prototype.isFeatureEnabled,bi.prototype.reloadFeatureFlags=bi.prototype.reloadFeatureFlags,bi.prototype.onFeatureFlags=bi.prototype.onFeatureFlags,bi.prototype.decodeLZ64=bi.prototype.decodeLZ64,hi.prototype.properties=hi.prototype.properties,hi.prototype.update_search_keyword=hi.prototype.update_search_keyword,hi.prototype.update_referrer_info=hi.prototype.update_referrer_info,hi.prototype.get_cross_subdomain=hi.prototype.get_cross_subdomain,hi.prototype.clear=hi.prototype.clear,Ln.safewrap_class(bi,["identify"]);var wi={},Mi=function(){si.init=function(t,e,a){if(a)return si[a]||(si[a]=wi[a]=zi(t,e,a),si[a]._loaded()),si[a];var r=si;wi.posthog?r=wi.posthog:t&&((r=zi(t,e,"posthog"))._loaded(),wi.posthog=r),si=r,1===li&&(Yr.posthog=si),Ln.each(wi,(function(t,e){"posthog"!==e&&(si[e]=t)})),si._=Ln}};var _i=(li=0,si=new bi,Mi(),si.init(),function(){function t(){t.done||(t.done=!0,gi=!0,mi=!1,Ln.each(wi,(function(t){t._dom_loaded()})))}if(gn.addEventListener)"complete"===gn.readyState?t():gn.addEventListener("DOMContentLoaded",t,!1);else if(gn.attachEvent){gn.attachEvent("onreadystatechange",t);var e=!1;try{e=null===Yr.frameElement}catch(a){}gn.documentElement.doScroll&&e&&function e(){try{gn.documentElement.doScroll("left")}catch(a){return void setTimeout(e,1)}t()}()}Ln.register_event(Yr,"load",t,!0)}(),si),Ai=function(t,e){return(Ai=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var a in e)e.hasOwnProperty(a)&&(t[a]=e[a])})(t,e)};function Hi(t,e){function a(){this.constructor=t}Ai(t,e),t.prototype=null===e?Object.create(e):(a.prototype=e.prototype,new a)}var Vi,Li,Bi,ki,Ci,Si,Ei=function(){return(Ei=Object.assign||function(t){for(var e,a=1,r=arguments.length;a<r;a++)for(var n in e=arguments[a])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}).apply(this,arguments)};function Oi(t){var e="function"==typeof Symbol&&Symbol.iterator,a=e&&t[e],r=0;if(a)return a.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ti(t,e){var a="function"==typeof Symbol&&t[Symbol.iterator];if(!a)return t;var r,n,i=a.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)o.push(r.value)}catch(rn){n={error:rn}}finally{try{r&&!r.done&&(a=i.return)&&a.call(i)}finally{if(n)throw n.error}}return o}function Di(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(Ti(arguments[e]));return t}function ji(t){switch(Object.prototype.toString.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return qi(t,Error)}}function Fi(t){return"[object ErrorEvent]"===Object.prototype.toString.call(t)}function Ii(t){return"[object DOMError]"===Object.prototype.toString.call(t)}function Pi(t){return"[object String]"===Object.prototype.toString.call(t)}function Ri(t){return null===t||"object"!=typeof t&&"function"!=typeof t}function Ni(t){return"[object Object]"===Object.prototype.toString.call(t)}function $i(t){return"undefined"!=typeof Event&&qi(t,Event)}function Ui(t){return"undefined"!=typeof Element&&qi(t,Element)}function Wi(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function qi(t,e){try{return t instanceof e}catch(a){return!1}}function Gi(t){try{for(var e=t,a=[],r=0,n=0,i=" > ".length,o=void 0;e&&r++<5&&!("html"===(o=Yi(e))||r>1&&n+a.length*i+o.length>=80);)a.push(o),n+=o.length,e=e.parentNode;return a.reverse().join(" > ")}catch(l){return"<unknown>"}}function Yi(t){var e,a,r,n,i,o=t,l=[];if(!o||!o.tagName)return"";if(l.push(o.tagName.toLowerCase()),o.id&&l.push("#"+o.id),(e=o.className)&&Pi(e))for(a=e.split(/\s+/),i=0;i<a.length;i++)l.push("."+a[i]);var s=["type","name","title","alt"];for(i=0;i<s.length;i++)r=s[i],(n=o.getAttribute(r))&&l.push("["+r+'="'+n+'"]');return l.join("")}(Li=Vi||(Vi={})).Ok="ok",Li.Exited="exited",Li.Crashed="crashed",Li.Abnormal="abnormal",(ki=Bi||(Bi={})).Fatal="fatal",ki.Error="error",ki.Warning="warning",ki.Log="log",ki.Info="info",ki.Debug="debug",ki.Critical="critical",function(t){t.fromString=function(e){switch(e){case"debug":return t.Debug;case"info":return t.Info;case"warn":case"warning":return t.Warning;case"error":return t.Error;case"fatal":return t.Fatal;case"critical":return t.Critical;case"log":default:return t.Log}}}(Bi||(Bi={})),(Si=Ci||(Ci={})).Unknown="unknown",Si.Skipped="skipped",Si.Success="success",Si.RateLimit="rate_limit",Si.Invalid="invalid",Si.Failed="failed",function(t){t.fromHttpCode=function(e){return e>=200&&e<300?t.Success:429===e?t.RateLimit:e>=400&&e<500?t.Invalid:e>=500?t.Failed:t.Unknown}}(Ci||(Ci={}));var Ki=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){return t.__proto__=e,t}:function(t,e){for(var a in e)t.hasOwnProperty(a)||(t[a]=e[a]);return t});var Ji=function(t){function e(e){var a=this.constructor,r=t.call(this,e)||this;return r.message=e,r.name=a.prototype.constructor.name,Ki(r,a.prototype),r}return Hi(e,t),e}(Error),Zi=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/,Xi=function(){function t(t){"string"==typeof t?this._fromString(t):this._fromComponents(t),this._validate()}return t.prototype.toString=function(t){void 0===t&&(t=!1);var e=this,a=e.host,r=e.path,n=e.pass,i=e.port,o=e.projectId;return e.protocol+"://"+e.user+(t&&n?":"+n:"")+"@"+a+(i?":"+i:"")+"/"+(r?r+"/":r)+o},t.prototype._fromString=function(t){var e=Zi.exec(t);if(!e)throw new Ji("Invalid Dsn");var a=Ti(e.slice(1),6),r=a[0],n=a[1],i=a[2],o=void 0===i?"":i,l=a[3],s=a[4],c=void 0===s?"":s,h="",u=a[5],d=u.split("/");if(d.length>1&&(h=d.slice(0,-1).join("/"),u=d.pop()),u){var p=u.match(/^\d+/);p&&(u=p[0])}this._fromComponents({host:l,pass:o,path:h,projectId:u,port:c,protocol:r,user:n})},t.prototype._fromComponents=function(t){this.protocol=t.protocol,this.user=t.user,this.pass=t.pass||"",this.host=t.host,this.port=t.port||"",this.path=t.path||"",this.projectId=t.projectId},t.prototype._validate=function(){var t=this;if(["protocol","user","host","projectId"].forEach((function(e){if(!t[e])throw new Ji("Invalid Dsn: "+e+" missing")})),!this.projectId.match(/^\d+$/))throw new Ji("Invalid Dsn: Invalid projectId "+this.projectId);if("http"!==this.protocol&&"https"!==this.protocol)throw new Ji("Invalid Dsn: Invalid protocol "+this.protocol);if(this.port&&isNaN(parseInt(this.port,10)))throw new Ji("Invalid Dsn: Invalid port "+this.port)},t}(),Qi=function(){function t(){this._hasWeakSet="function"==typeof WeakSet,this._inner=this._hasWeakSet?new WeakSet:[]}return t.prototype.memoize=function(t){if(this._hasWeakSet)return!!this._inner.has(t)||(this._inner.add(t),!1);for(var e=0;e<this._inner.length;e++){if(this._inner[e]===t)return!0}return this._inner.push(t),!1},t.prototype.unmemoize=function(t){if(this._hasWeakSet)this._inner.delete(t);else for(var e=0;e<this._inner.length;e++)if(this._inner[e]===t){this._inner.splice(e,1);break}},t}();function to(t){try{return t&&"function"==typeof t&&t.name||"<anonymous>"}catch(e){return"<anonymous>"}}function eo(t,e){return void 0===e&&(e=0),"string"!=typeof t||0===e||t.length<=e?t:t.substr(0,e)+"..."}function ao(t,e){if(!Array.isArray(t))return"";for(var a=[],r=0;r<t.length;r++){var n=t[r];try{a.push(String(n))}catch(i){a.push("[value cannot be serialized]")}}return a.join(e)}function ro(t,e){return!!Pi(t)&&(a=e,"[object RegExp]"===Object.prototype.toString.call(a)?e.test(t):"string"==typeof e&&-1!==t.indexOf(e));var a}function no(t,e,a){if(e in t){var r=t[e],n=a(r);if("function"==typeof n)try{n.prototype=n.prototype||{},Object.defineProperties(n,{__sentry_original__:{enumerable:!1,value:r}})}catch(i){}t[e]=n}}function io(t){if(ji(t)){var e=t,a={message:e.message,name:e.name,stack:e.stack};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(a[r]=e[r]);return a}if($i(t)){var n=t,i={};i.type=n.type;try{i.target=Ui(n.target)?Gi(n.target):Object.prototype.toString.call(n.target)}catch(o){i.target="<unknown>"}try{i.currentTarget=Ui(n.currentTarget)?Gi(n.currentTarget):Object.prototype.toString.call(n.currentTarget)}catch(o){i.currentTarget="<unknown>"}for(var r in"undefined"!=typeof CustomEvent&&qi(t,CustomEvent)&&(i.detail=n.detail),n)Object.prototype.hasOwnProperty.call(n,r)&&(i[r]=n);return i}return t}function oo(t){return function(t){return~-encodeURI(t).split(/%..|./).length}(JSON.stringify(t))}function lo(t,e,a){void 0===e&&(e=3),void 0===a&&(a=102400);var r=ho(t,e);return oo(r)>a?lo(t,e-1,a):r}function so(t,e){return"domain"===e&&t&&"object"==typeof t&&t._events?"[Domain]":"domainEmitter"===e?"[DomainEmitter]":"undefined"!=typeof global&&t===global?"[Global]":"undefined"!=typeof window&&t===window?"[Window]":"undefined"!=typeof document&&t===document?"[Document]":Ni(a=t)&&"nativeEvent"in a&&"preventDefault"in a&&"stopPropagation"in a?"[SyntheticEvent]":"number"==typeof t&&t!=t?"[NaN]":void 0===t?"[undefined]":"function"==typeof t?"[Function: "+to(t)+"]":"symbol"==typeof t?"["+String(t)+"]":"bigint"==typeof t?"[BigInt: "+String(t)+"]":t;var a}function co(t,e,a,r){if(void 0===a&&(a=1/0),void 0===r&&(r=new Qi),0===a)return function(t){var e=Object.prototype.toString.call(t);if("string"==typeof t)return t;if("[object Object]"===e)return"[Object]";if("[object Array]"===e)return"[Array]";var a=so(t);return Ri(a)?a:e}(e);if(null!=e&&"function"==typeof e.toJSON)return e.toJSON();var n=so(e,t);if(Ri(n))return n;var i=io(e),o=Array.isArray(e)?[]:{};if(r.memoize(e))return"[Circular ~]";for(var l in i)Object.prototype.hasOwnProperty.call(i,l)&&(o[l]=co(l,i[l],a-1,r));return r.unmemoize(e),o}function ho(t,e){try{return JSON.parse(JSON.stringify(t,(function(t,a){return co(t,a,e)})))}catch(a){return"**non-serializable**"}}function uo(t,e){void 0===e&&(e=40);var a=Object.keys(io(t));if(a.sort(),!a.length)return"[object has no keys]";if(a[0].length>=e)return eo(a[0],e);for(var r=a.length;r>0;r--){var n=a.slice(0,r).join(", ");if(!(n.length>e))return r===a.length?n:eo(n,e)}return""}function po(t){var e,a;if(Ni(t)){var r=t,n={};try{for(var i=Oi(Object.keys(r)),o=i.next();!o.done;o=i.next()){var l=o.value;void 0!==r[l]&&(n[l]=po(r[l]))}}catch(s){e={error:s}}finally{try{o&&!o.done&&(a=i.return)&&a.call(i)}finally{if(e)throw e.error}}return n}return Array.isArray(t)?t.map(po):t}function mo(){return"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)}var vo={};function fo(){return mo()?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:vo}function yo(){var t=fo(),e=t.crypto||t.msCrypto;if(void 0!==e&&e.getRandomValues){var a=new Uint16Array(8);e.getRandomValues(a),a[3]=4095&a[3]|16384,a[4]=16383&a[4]|32768;var r=function(t){for(var e=t.toString(16);e.length<4;)e="0"+e;return e};return r(a[0])+r(a[1])+r(a[2])+r(a[3])+r(a[4])+r(a[5])+r(a[6])+r(a[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}))}function go(t){if(!t)return{};var e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};var a=e[6]||"",r=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],relative:e[5]+a+r}}function bo(t){if(t.message)return t.message;if(t.exception&&t.exception.values&&t.exception.values[0]){var e=t.exception.values[0];return e.type&&e.value?e.type+": "+e.value:e.type||e.value||t.event_id||"<unknown>"}return t.event_id||"<unknown>"}function zo(t){var e=fo();if(!("console"in e))return t();var a=e.console,r={};["debug","info","warn","error","log","assert"].forEach((function(t){t in e.console&&a[t].__sentry_original__&&(r[t]=a[t],a[t]=a[t].__sentry_original__)}));var n=t();return Object.keys(r).forEach((function(t){a[t]=r[t]})),n}function xo(t,e,a){t.exception=t.exception||{},t.exception.values=t.exception.values||[],t.exception.values[0]=t.exception.values[0]||{},t.exception.values[0].value=t.exception.values[0].value||e||"",t.exception.values[0].type=t.exception.values[0].type||a||"Error"}function wo(t,e){void 0===e&&(e={});try{t.exception.values[0].mechanism=t.exception.values[0].mechanism||{},Object.keys(e).forEach((function(a){t.exception.values[0].mechanism[a]=e[a]}))}catch(a){}}var Mo=fo(),_o="Sentry Logger ",Ao=function(){function t(){this._enabled=!1}return t.prototype.disable=function(){this._enabled=!1},t.prototype.enable=function(){this._enabled=!0},t.prototype.log=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._enabled&&zo((function(){Mo.console.log(_o+"[Log]: "+t.join(" "))}))},t.prototype.warn=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._enabled&&zo((function(){Mo.console.warn(_o+"[Warn]: "+t.join(" "))}))},t.prototype.error=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._enabled&&zo((function(){Mo.console.error(_o+"[Error]: "+t.join(" "))}))},t}();Mo.__SENTRY__=Mo.__SENTRY__||{};var Ho=Mo.__SENTRY__.logger||(Mo.__SENTRY__.logger=new Ao);function Vo(){if(!("fetch"in fo()))return!1;try{return new Headers,new Request(""),new Response,!0}catch(t){return!1}}function Lo(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function Bo(){if(!Vo())return!1;try{return new Request("_",{referrerPolicy:"origin"}),!0}catch(t){return!1}}var ko,Co=fo(),So={},Eo={};function Oo(t){if(!Eo[t])switch(Eo[t]=!0,t){case"console":!function(){if(!("console"in Co))return;["debug","info","warn","error","log","assert"].forEach((function(t){t in Co.console&&no(Co.console,t,(function(e){return function(){for(var a=[],r=0;r<arguments.length;r++)a[r]=arguments[r];Do("console",{args:a,level:t}),e&&Function.prototype.apply.call(e,Co.console,a)}}))}))}();break;case"dom":!function(){if(!("document"in Co))return;Co.document.addEventListener("click",No("click",Do.bind(null,"dom")),!1),Co.document.addEventListener("keypress",$o(Do.bind(null,"dom")),!1),["EventTarget","Node"].forEach((function(t){var e=Co[t]&&Co[t].prototype;e&&e.hasOwnProperty&&e.hasOwnProperty("addEventListener")&&(no(e,"addEventListener",(function(t){return function(e,a,r){return a&&a.handleEvent?("click"===e&&no(a,"handleEvent",(function(t){return function(e){return No("click",Do.bind(null,"dom"))(e),t.call(this,e)}})),"keypress"===e&&no(a,"handleEvent",(function(t){return function(e){return $o(Do.bind(null,"dom"))(e),t.call(this,e)}}))):("click"===e&&No("click",Do.bind(null,"dom"),!0)(this),"keypress"===e&&$o(Do.bind(null,"dom"))(this)),t.call(this,e,a,r)}})),no(e,"removeEventListener",(function(t){return function(e,a,r){try{t.call(this,e,a.__sentry_wrapped__,r)}catch(n){}return t.call(this,e,a,r)}})))}))}();break;case"xhr":!function(){if(!("XMLHttpRequest"in Co))return;var t=[],e=[],a=XMLHttpRequest.prototype;no(a,"open",(function(a){return function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=this,o=r[1];i.__sentry_xhr__={method:Pi(r[0])?r[0].toUpperCase():r[0],url:r[1]},Pi(o)&&"POST"===i.__sentry_xhr__.method&&o.match(/sentry_key/)&&(i.__sentry_own_request__=!0);var l=function(){if(4===i.readyState){try{i.__sentry_xhr__&&(i.__sentry_xhr__.status_code=i.status)}catch(o){}try{var a=t.indexOf(i);if(-1!==a){t.splice(a);var n=e.splice(a)[0];i.__sentry_xhr__&&void 0!==n[0]&&(i.__sentry_xhr__.body=n[0])}}catch(o){}Do("xhr",{args:r,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:i})}};return"onreadystatechange"in i&&"function"==typeof i.onreadystatechange?no(i,"onreadystatechange",(function(t){return function(){for(var e=[],a=0;a<arguments.length;a++)e[a]=arguments[a];return l(),t.apply(i,e)}})):i.addEventListener("readystatechange",l),a.apply(i,r)}})),no(a,"send",(function(a){return function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return t.push(this),e.push(r),Do("xhr",{args:r,startTimestamp:Date.now(),xhr:this}),a.apply(this,r)}}))}();break;case"fetch":!function(){if(!function(){if(!Vo())return!1;var t=fo();if(Lo(t.fetch))return!0;var e=!1,a=t.document;if(a&&"function"==typeof a.createElement)try{var r=a.createElement("iframe");r.hidden=!0,a.head.appendChild(r),r.contentWindow&&r.contentWindow.fetch&&(e=Lo(r.contentWindow.fetch)),a.head.removeChild(r)}catch(n){Ho.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}())return;no(Co,"fetch",(function(t){return function(){for(var e=[],a=0;a<arguments.length;a++)e[a]=arguments[a];var r={args:e,fetchData:{method:jo(e),url:Fo(e)},startTimestamp:Date.now()};return Do("fetch",Ei({},r)),t.apply(Co,e).then((function(t){return Do("fetch",Ei(Ei({},r),{endTimestamp:Date.now(),response:t})),t}),(function(t){throw Do("fetch",Ei(Ei({},r),{endTimestamp:Date.now(),error:t})),t}))}}))}();break;case"history":!function(){if(t=fo(),e=t.chrome,a=e&&e.app&&e.app.runtime,r="history"in t&&!!t.history.pushState&&!!t.history.replaceState,a||!r)return;var t,e,a,r;var n=Co.onpopstate;function i(t){return function(){for(var e=[],a=0;a<arguments.length;a++)e[a]=arguments[a];var r=e.length>2?e[2]:void 0;if(r){var n=ko,i=String(r);ko=i,Do("history",{from:n,to:i})}return t.apply(this,e)}}Co.onpopstate=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var a=Co.location.href,r=ko;if(ko=a,Do("history",{from:r,to:a}),n)return n.apply(this,t)},no(Co.history,"pushState",i),no(Co.history,"replaceState",i)}();break;case"error":Uo=Co.onerror,Co.onerror=function(t,e,a,r,n){return Do("error",{column:r,error:n,line:a,msg:t,url:e}),!!Uo&&Uo.apply(this,arguments)};break;case"unhandledrejection":Go=Co.onunhandledrejection,Co.onunhandledrejection=function(t){return Do("unhandledrejection",t),!Go||Go.apply(this,arguments)};break;default:Ho.warn("unknown instrumentation type:",t)}}function To(t){t&&"string"==typeof t.type&&"function"==typeof t.callback&&(So[t.type]=So[t.type]||[],So[t.type].push(t.callback),Oo(t.type))}function Do(t,e){var a,r;if(t&&So[t])try{for(var n=Oi(So[t]||[]),i=n.next();!i.done;i=n.next()){var o=i.value;try{o(e)}catch(l){Ho.error("Error while triggering instrumentation handler.\nType: "+t+"\nName: "+to(o)+"\nError: "+l)}}}catch(s){a={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}}function jo(t){return void 0===t&&(t=[]),"Request"in Co&&qi(t[0],Request)&&t[0].method?String(t[0].method).toUpperCase():t[1]&&t[1].method?String(t[1].method).toUpperCase():"GET"}function Fo(t){return void 0===t&&(t=[]),"string"==typeof t[0]?t[0]:"Request"in Co&&qi(t[0],Request)?t[0].url:String(t[0])}var Io,Po,Ro=0;function No(t,e,a){return void 0===a&&(a=!1),function(r){Io=void 0,r&&Po!==r&&(Po=r,Ro&&clearTimeout(Ro),a?Ro=setTimeout((function(){e({event:r,name:t})})):e({event:r,name:t}))}}function $o(t){return function(e){var a;try{a=e.target}catch(n){return}var r=a&&a.tagName;r&&("INPUT"===r||"TEXTAREA"===r||a.isContentEditable)&&(Io||No("input",t)(e),clearTimeout(Io),Io=setTimeout((function(){Io=void 0}),1e3))}}var Uo=null;var Wo,qo,Go=null;(qo=Wo||(Wo={})).PENDING="PENDING",qo.RESOLVED="RESOLVED",qo.REJECTED="REJECTED";var Yo=function(){function t(t){var e=this;this._state=Wo.PENDING,this._handlers=[],this._resolve=function(t){e._setResult(Wo.RESOLVED,t)},this._reject=function(t){e._setResult(Wo.REJECTED,t)},this._setResult=function(t,a){e._state===Wo.PENDING&&(Wi(a)?a.then(e._resolve,e._reject):(e._state=t,e._value=a,e._executeHandlers()))},this._attachHandler=function(t){e._handlers=e._handlers.concat(t),e._executeHandlers()},this._executeHandlers=function(){if(e._state!==Wo.PENDING){var t=e._handlers.slice();e._handlers=[],t.forEach((function(t){t.done||(e._state===Wo.RESOLVED&&t.onfulfilled&&t.onfulfilled(e._value),e._state===Wo.REJECTED&&t.onrejected&&t.onrejected(e._value),t.done=!0)}))}};try{t(this._resolve,this._reject)}catch(a){this._reject(a)}}return t.resolve=function(e){return new t((function(t){t(e)}))},t.reject=function(e){return new t((function(t,a){a(e)}))},t.all=function(e){return new t((function(a,r){if(Array.isArray(e))if(0!==e.length){var n=e.length,i=[];e.forEach((function(e,o){t.resolve(e).then((function(t){i[o]=t,0===(n-=1)&&a(i)})).then(null,r)}))}else a([]);else r(new TypeError("Promise.all requires an array as input."))}))},t.prototype.then=function(e,a){var r=this;return new t((function(t,n){r._attachHandler({done:!1,onfulfilled:function(a){if(e)try{return void t(e(a))}catch(r){return void n(r)}else t(a)},onrejected:function(e){if(a)try{return void t(a(e))}catch(r){return void n(r)}else n(e)}})}))},t.prototype.catch=function(t){return this.then((function(t){return t}),t)},t.prototype.finally=function(e){var a=this;return new t((function(t,r){var n,i;return a.then((function(t){i=!1,n=t,e&&e()}),(function(t){i=!0,n=t,e&&e()})).then((function(){i?r(n):t(n)}))}))},t.prototype.toString=function(){return"[object SyncPromise]"},t}(),Ko=function(){function t(t){this._limit=t,this._buffer=[]}return t.prototype.isReady=function(){return void 0===this._limit||this.length()<this._limit},t.prototype.add=function(t){var e=this;return this.isReady()?(-1===this._buffer.indexOf(t)&&this._buffer.push(t),t.then((function(){return e.remove(t)})).then(null,(function(){return e.remove(t).then(null,(function(){}))})),t):Yo.reject(new Ji("Not adding Promise due to buffer limit reached."))},t.prototype.remove=function(t){return this._buffer.splice(this._buffer.indexOf(t),1)[0]},t.prototype.length=function(){return this._buffer.length},t.prototype.drain=function(t){var e=this;return new Yo((function(a){var r=setTimeout((function(){t&&t>0&&a(!1)}),t);Yo.all(e._buffer).then((function(){clearTimeout(r),a(!0)})).then(null,(function(){a(!0)}))}))},t}(),Jo={nowSeconds:function(){return Date.now()/1e3}};var Zo=mo()?function(){try{return(t=module,e="perf_hooks",t.require(e)).performance}catch(a){return}var t,e}():function(){var t=fo().performance;if(t&&t.now)return{now:function(){return t.now()},timeOrigin:Date.now()-t.now()}}(),Xo=void 0===Zo?Jo:{nowSeconds:function(){return(Zo.timeOrigin+Zo.now())/1e3}},Qo=Jo.nowSeconds.bind(Jo);Xo.nowSeconds.bind(Xo),function(){var t=fo().performance;if(t)t.timeOrigin?t.timeOrigin:t.timing&&t.timing.navigationStart||Date.now()}();var tl=function(){function t(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._user={},this._tags={},this._extra={},this._contexts={}}return t.clone=function(e){var a=new t;return e&&(a._breadcrumbs=Di(e._breadcrumbs),a._tags=Ei({},e._tags),a._extra=Ei({},e._extra),a._contexts=Ei({},e._contexts),a._user=e._user,a._level=e._level,a._span=e._span,a._session=e._session,a._transactionName=e._transactionName,a._fingerprint=e._fingerprint,a._eventProcessors=Di(e._eventProcessors)),a},t.prototype.addScopeListener=function(t){this._scopeListeners.push(t)},t.prototype.addEventProcessor=function(t){return this._eventProcessors.push(t),this},t.prototype.setUser=function(t){return this._user=t||{},this._session&&this._session.update({user:t}),this._notifyScopeListeners(),this},t.prototype.getUser=function(){return this._user},t.prototype.setTags=function(t){return this._tags=Ei(Ei({},this._tags),t),this._notifyScopeListeners(),this},t.prototype.setTag=function(t,e){var a;return this._tags=Ei(Ei({},this._tags),((a={})[t]=e,a)),this._notifyScopeListeners(),this},t.prototype.setExtras=function(t){return this._extra=Ei(Ei({},this._extra),t),this._notifyScopeListeners(),this},t.prototype.setExtra=function(t,e){var a;return this._extra=Ei(Ei({},this._extra),((a={})[t]=e,a)),this._notifyScopeListeners(),this},t.prototype.setFingerprint=function(t){return this._fingerprint=t,this._notifyScopeListeners(),this},t.prototype.setLevel=function(t){return this._level=t,this._notifyScopeListeners(),this},t.prototype.setTransactionName=function(t){return this._transactionName=t,this._notifyScopeListeners(),this},t.prototype.setTransaction=function(t){return this.setTransactionName(t)},t.prototype.setContext=function(t,e){var a;return null===e?delete this._contexts[t]:this._contexts=Ei(Ei({},this._contexts),((a={})[t]=e,a)),this._notifyScopeListeners(),this},t.prototype.setSpan=function(t){return this._span=t,this._notifyScopeListeners(),this},t.prototype.getSpan=function(){return this._span},t.prototype.getTransaction=function(){var t,e,a,r,n=this.getSpan();return(null===(t=n)||void 0===t?void 0:t.transaction)?null===(e=n)||void 0===e?void 0:e.transaction:(null===(r=null===(a=n)||void 0===a?void 0:a.spanRecorder)||void 0===r?void 0:r.spans[0])?n.spanRecorder.spans[0]:void 0},t.prototype.setSession=function(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this},t.prototype.getSession=function(){return this._session},t.prototype.update=function(e){if(!e)return this;if("function"==typeof e){var a=e(this);return a instanceof t?a:this}return e instanceof t?(this._tags=Ei(Ei({},this._tags),e._tags),this._extra=Ei(Ei({},this._extra),e._extra),this._contexts=Ei(Ei({},this._contexts),e._contexts),e._user&&Object.keys(e._user).length&&(this._user=e._user),e._level&&(this._level=e._level),e._fingerprint&&(this._fingerprint=e._fingerprint)):Ni(e)&&(e=e,this._tags=Ei(Ei({},this._tags),e.tags),this._extra=Ei(Ei({},this._extra),e.extra),this._contexts=Ei(Ei({},this._contexts),e.contexts),e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint)),this},t.prototype.clear=function(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this},t.prototype.addBreadcrumb=function(t,e){var a=Ei({timestamp:Qo()},t);return this._breadcrumbs=void 0!==e&&e>=0?Di(this._breadcrumbs,[a]).slice(-e):Di(this._breadcrumbs,[a]),this._notifyScopeListeners(),this},t.prototype.clearBreadcrumbs=function(){return this._breadcrumbs=[],this._notifyScopeListeners(),this},t.prototype.applyToEvent=function(t,e){var a;if(this._extra&&Object.keys(this._extra).length&&(t.extra=Ei(Ei({},this._extra),t.extra)),this._tags&&Object.keys(this._tags).length&&(t.tags=Ei(Ei({},this._tags),t.tags)),this._user&&Object.keys(this._user).length&&(t.user=Ei(Ei({},this._user),t.user)),this._contexts&&Object.keys(this._contexts).length&&(t.contexts=Ei(Ei({},this._contexts),t.contexts)),this._level&&(t.level=this._level),this._transactionName&&(t.transaction=this._transactionName),this._span){t.contexts=Ei({trace:this._span.getTraceContext()},t.contexts);var r=null===(a=this._span.transaction)||void 0===a?void 0:a.name;r&&(t.tags=Ei({transaction:r},t.tags))}return this._applyFingerprint(t),t.breadcrumbs=Di(t.breadcrumbs||[],this._breadcrumbs),t.breadcrumbs=t.breadcrumbs.length>0?t.breadcrumbs:void 0,this._notifyEventProcessors(Di(el(),this._eventProcessors),t,e)},t.prototype._notifyEventProcessors=function(t,e,a,r){var n=this;return void 0===r&&(r=0),new Yo((function(i,o){var l=t[r];if(null===e||"function"!=typeof l)i(e);else{var s=l(Ei({},e),a);Wi(s)?s.then((function(e){return n._notifyEventProcessors(t,e,a,r+1).then(i)})).then(null,o):n._notifyEventProcessors(t,s,a,r+1).then(i).then(null,o)}}))},t.prototype._notifyScopeListeners=function(){var t=this;this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((function(e){e(t)})),this._notifyingListeners=!1)},t.prototype._applyFingerprint=function(t){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],this._fingerprint&&(t.fingerprint=t.fingerprint.concat(this._fingerprint)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint},t}();function el(){var t=fo();return t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.globalEventProcessors=t.__SENTRY__.globalEventProcessors||[],t.__SENTRY__.globalEventProcessors}function al(t){el().push(t)}var rl=function(){function t(t){this.errors=0,this.sid=yo(),this.timestamp=Date.now(),this.started=Date.now(),this.duration=0,this.status=Vi.Ok,t&&this.update(t)}return t.prototype.update=function(t){void 0===t&&(t={}),t.user&&(t.user.ip_address&&(this.ipAddress=t.user.ip_address),t.did||(this.did=t.user.id||t.user.email||t.user.username)),this.timestamp=t.timestamp||Date.now(),t.sid&&(this.sid=32===t.sid.length?t.sid:yo()),t.did&&(this.did=""+t.did),"number"==typeof t.started&&(this.started=t.started),"number"==typeof t.duration?this.duration=t.duration:this.duration=this.timestamp-this.started,t.release&&(this.release=t.release),t.environment&&(this.environment=t.environment),t.ipAddress&&(this.ipAddress=t.ipAddress),t.userAgent&&(this.userAgent=t.userAgent),"number"==typeof t.errors&&(this.errors=t.errors),t.status&&(this.status=t.status)},t.prototype.close=function(t){t?this.update({status:t}):this.status===Vi.Ok?this.update({status:Vi.Exited}):this.update()},t.prototype.toJSON=function(){return po({sid:""+this.sid,init:!0,started:new Date(this.started).toISOString(),timestamp:new Date(this.timestamp).toISOString(),status:this.status,errors:this.errors,did:"number"==typeof this.did||"string"==typeof this.did?""+this.did:void 0,duration:this.duration,attrs:po({release:this.release,environment:this.environment,ip_address:this.ipAddress,user_agent:this.userAgent})})},t}(),nl=function(){function t(t,e,a){void 0===e&&(e=new tl),void 0===a&&(a=3),this._version=a,this._stack=[{}],this.getStackTop().scope=e,this.bindClient(t)}return t.prototype.isOlderThan=function(t){return this._version<t},t.prototype.bindClient=function(t){this.getStackTop().client=t,t&&t.setupIntegrations&&t.setupIntegrations()},t.prototype.pushScope=function(){var t=tl.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:t}),t},t.prototype.popScope=function(){return!(this.getStack().length<=1)&&!!this.getStack().pop()},t.prototype.withScope=function(t){var e=this.pushScope();try{t(e)}finally{this.popScope()}},t.prototype.getClient=function(){return this.getStackTop().client},t.prototype.getScope=function(){return this.getStackTop().scope},t.prototype.getStack=function(){return this._stack},t.prototype.getStackTop=function(){return this._stack[this._stack.length-1]},t.prototype.captureException=function(t,e){var a=this._lastEventId=yo(),r=e;if(!e){var n=void 0;try{throw new Error("Sentry syntheticException")}catch(i){n=i}r={originalException:t,syntheticException:n}}return this._invokeClient("captureException",t,Ei(Ei({},r),{event_id:a})),a},t.prototype.captureMessage=function(t,e,a){var r=this._lastEventId=yo(),n=a;if(!a){var i=void 0;try{throw new Error(t)}catch(o){i=o}n={originalException:t,syntheticException:i}}return this._invokeClient("captureMessage",t,e,Ei(Ei({},n),{event_id:r})),r},t.prototype.captureEvent=function(t,e){var a=this._lastEventId=yo();return this._invokeClient("captureEvent",t,Ei(Ei({},e),{event_id:a})),a},t.prototype.lastEventId=function(){return this._lastEventId},t.prototype.addBreadcrumb=function(t,e){var a=this.getStackTop(),r=a.scope,n=a.client;if(r&&n){var i=n.getOptions&&n.getOptions()||{},o=i.beforeBreadcrumb,l=void 0===o?null:o,s=i.maxBreadcrumbs,c=void 0===s?100:s;if(!(c<=0)){var h=Qo(),u=Ei({timestamp:h},t),d=l?zo((function(){return l(u,e)})):u;null!==d&&r.addBreadcrumb(d,Math.min(c,100))}}},t.prototype.setUser=function(t){var e=this.getScope();e&&e.setUser(t)},t.prototype.setTags=function(t){var e=this.getScope();e&&e.setTags(t)},t.prototype.setExtras=function(t){var e=this.getScope();e&&e.setExtras(t)},t.prototype.setTag=function(t,e){var a=this.getScope();a&&a.setTag(t,e)},t.prototype.setExtra=function(t,e){var a=this.getScope();a&&a.setExtra(t,e)},t.prototype.setContext=function(t,e){var a=this.getScope();a&&a.setContext(t,e)},t.prototype.configureScope=function(t){var e=this.getStackTop(),a=e.scope,r=e.client;a&&r&&t(a)},t.prototype.run=function(t){var e=ol(this);try{t(this)}finally{ol(e)}},t.prototype.getIntegration=function(t){var e=this.getClient();if(!e)return null;try{return e.getIntegration(t)}catch(a){return Ho.warn("Cannot retrieve integration "+t.id+" from the current Hub"),null}},t.prototype.startSpan=function(t){return this._callExtensionMethod("startSpan",t)},t.prototype.startTransaction=function(t,e){return this._callExtensionMethod("startTransaction",t,e)},t.prototype.traceHeaders=function(){return this._callExtensionMethod("traceHeaders")},t.prototype.startSession=function(t){this.endSession();var e=this.getStackTop(),a=e.scope,r=e.client,n=r&&r.getOptions()||{},i=n.release,o=n.environment,l=new rl(Ei(Ei({release:i,environment:o},a&&{user:a.getUser()}),t));return a&&a.setSession(l),l},t.prototype.endSession=function(){var t=this.getStackTop(),e=t.scope,a=t.client;if(e){var r=e.getSession&&e.getSession();r&&(r.close(),a&&a.captureSession&&a.captureSession(r),e.setSession())}},t.prototype._invokeClient=function(t){for(var e,a=[],r=1;r<arguments.length;r++)a[r-1]=arguments[r];var n=this.getStackTop(),i=n.scope,o=n.client;o&&o[t]&&(e=o)[t].apply(e,Di(a,[i]))},t.prototype._callExtensionMethod=function(t){for(var e=[],a=1;a<arguments.length;a++)e[a-1]=arguments[a];var r=il(),n=r.__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[t])return n.extensions[t].apply(this,e);Ho.warn("Extension method "+t+" couldn't be found, doing nothing.")},t}();function il(){var t=fo();return t.__SENTRY__=t.__SENTRY__||{extensions:{},hub:void 0},t}function ol(t){var e=il(),a=cl(e);return hl(e,t),a}function ll(){var t=il();return sl(t)&&!cl(t).isOlderThan(3)||hl(t,new nl),mo()?function(t){try{var e=(r=il().__SENTRY__)&&r.extensions&&r.extensions.domain&&r.extensions.domain.active;if(!e)return cl(t);if(!sl(e)||cl(e).isOlderThan(3)){var a=cl(t).getStackTop();hl(e,new nl(a.client,tl.clone(a.scope)))}return cl(e)}catch(n){return cl(t)}var r}(t):cl(t)}function sl(t){return!!(t&&t.__SENTRY__&&t.__SENTRY__.hub)}function cl(t){return t&&t.__SENTRY__&&t.__SENTRY__.hub||(t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.hub=new nl),t.__SENTRY__.hub}function hl(t,e){return!!t&&(t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.hub=e,!0)}function ul(t){for(var e=[],a=1;a<arguments.length;a++)e[a-1]=arguments[a];var r=ll();if(r&&r[t])return r[t].apply(r,Di(e));throw new Error("No hub defined or "+t+" was not found on the hub, please open a bug report.")}function dl(t,e){var a;try{throw new Error("Sentry syntheticException")}catch(r){a=r}return ul("captureException",t,{captureContext:e,originalException:t,syntheticException:a})}function pl(t){ul("configureScope",t)}function ml(t){ul("withScope",t)}var vl=function(){function t(t,e){void 0===e&&(e={}),this.dsn=t,this.metadata=e,this._dsnObject=new Xi(t)}return t.prototype.getDsn=function(){return this._dsnObject},t.prototype.getBaseApiEndpoint=function(){var t=this._dsnObject,e=t.protocol?t.protocol+":":"",a=t.port?":"+t.port:"";return e+"//"+t.host+a+(t.path?"/"+t.path:"")+"/api/"},t.prototype.getStoreEndpoint=function(){return this._getIngestEndpoint("store")},t.prototype.getStoreEndpointWithUrlEncodedAuth=function(){return this.getStoreEndpoint()+"?"+this._encodedAuth()},t.prototype.getEnvelopeEndpointWithUrlEncodedAuth=function(){return this._getEnvelopeEndpoint()+"?"+this._encodedAuth()},t.prototype.getStoreEndpointPath=function(){var t=this._dsnObject;return(t.path?"/"+t.path:"")+"/api/"+t.projectId+"/store/"},t.prototype.getRequestHeaders=function(t,e){var a=this._dsnObject,r=["Sentry sentry_version=7"];return r.push("sentry_client="+t+"/"+e),r.push("sentry_key="+a.user),a.pass&&r.push("sentry_secret="+a.pass),{"Content-Type":"application/json","X-Sentry-Auth":r.join(", ")}},t.prototype.getReportDialogEndpoint=function(t){void 0===t&&(t={});var e=this._dsnObject,a=this.getBaseApiEndpoint()+"embed/error-page/",r=[];for(var n in r.push("dsn="+e.toString()),t)if("dsn"!==n)if("user"===n){if(!t.user)continue;t.user.name&&r.push("name="+encodeURIComponent(t.user.name)),t.user.email&&r.push("email="+encodeURIComponent(t.user.email))}else r.push(encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return r.length?a+"?"+r.join("&"):a},t.prototype._getEnvelopeEndpoint=function(){return this._getIngestEndpoint("envelope")},t.prototype._getIngestEndpoint=function(t){return""+this.getBaseApiEndpoint()+this._dsnObject.projectId+"/"+t+"/"},t.prototype._encodedAuth=function(){var t,e={sentry_key:this._dsnObject.user,sentry_version:"7"};return t=e,Object.keys(t).map((function(e){return encodeURIComponent(e)+"="+encodeURIComponent(t[e])})).join("&")},t}(),fl=[];function yl(t){var e={};return function(t){var e=t.defaultIntegrations&&Di(t.defaultIntegrations)||[],a=t.integrations,r=[];if(Array.isArray(a)){var n=a.map((function(t){return t.name})),i=[];e.forEach((function(t){-1===n.indexOf(t.name)&&-1===i.indexOf(t.name)&&(r.push(t),i.push(t.name))})),a.forEach((function(t){-1===i.indexOf(t.name)&&(r.push(t),i.push(t.name))}))}else"function"==typeof a?(r=a(e),r=Array.isArray(r)?r:[r]):r=Di(e);var o=r.map((function(t){return t.name})),l="Debug";return-1!==o.indexOf(l)&&r.push.apply(r,Di(r.splice(o.indexOf(l),1))),r}(t).forEach((function(t){e[t.name]=t,function(t){-1===fl.indexOf(t.name)&&(t.setupOnce(al,ll),fl.push(t.name),Ho.log("Integration installed: "+t.name))}(t)})),e}var gl=function(){function t(t,e){this._integrations={},this._processing=0,this._backend=new t(e),this._options=e,e.dsn&&(this._dsn=new Xi(e.dsn))}return t.prototype.captureException=function(t,e,a){var r=this,n=e&&e.event_id;return this._process(this._getBackend().eventFromException(t,e).then((function(t){return r._captureEvent(t,e,a)})).then((function(t){n=t}))),n},t.prototype.captureMessage=function(t,e,a,r){var n=this,i=a&&a.event_id,o=Ri(t)?this._getBackend().eventFromMessage(String(t),e,a):this._getBackend().eventFromException(t,a);return this._process(o.then((function(t){return n._captureEvent(t,a,r)})).then((function(t){i=t}))),i},t.prototype.captureEvent=function(t,e,a){var r=e&&e.event_id;return this._process(this._captureEvent(t,e,a).then((function(t){r=t}))),r},t.prototype.captureSession=function(t){t.release?this._sendSession(t):Ho.warn("Discarded session because of missing release")},t.prototype.getDsn=function(){return this._dsn},t.prototype.getOptions=function(){return this._options},t.prototype.flush=function(t){var e=this;return this._isClientProcessing(t).then((function(a){return e._getBackend().getTransport().close(t).then((function(t){return a&&t}))}))},t.prototype.close=function(t){var e=this;return this.flush(t).then((function(t){return e.getOptions().enabled=!1,t}))},t.prototype.setupIntegrations=function(){this._isEnabled()&&(this._integrations=yl(this._options))},t.prototype.getIntegration=function(t){try{return this._integrations[t.id]||null}catch(e){return Ho.warn("Cannot retrieve integration "+t.id+" from the current Client"),null}},t.prototype._updateSessionFromEvent=function(t,e){var a,r,n,i=!1,o=!1,l=e.exception&&e.exception.values;if(l){o=!0;try{for(var s=Oi(l),c=s.next();!c.done;c=s.next()){var h=c.value.mechanism;if(h&&!1===h.handled){i=!0;break}}}catch(m){a={error:m}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(a)throw a.error}}}var u=e.user;if(!t.userAgent){var d=e.request?e.request.headers:{};for(var p in d)if("user-agent"===p.toLowerCase()){n=d[p];break}}t.update(Ei(Ei({},i&&{status:Vi.Crashed}),{user:u,userAgent:n,errors:t.errors+Number(o||i)}))},t.prototype._sendSession=function(t){this._getBackend().sendSession(t)},t.prototype._isClientProcessing=function(t){var e=this;return new Yo((function(a){var r=0,n=setInterval((function(){0==e._processing?(clearInterval(n),a(!0)):(r+=1,t&&r>=t&&(clearInterval(n),a(!1)))}),1)}))},t.prototype._getBackend=function(){return this._backend},t.prototype._isEnabled=function(){return!1!==this.getOptions().enabled&&void 0!==this._dsn},t.prototype._prepareEvent=function(t,e,a){var r=this,n=this.getOptions().normalizeDepth,i=void 0===n?3:n,o=Ei(Ei({},t),{event_id:t.event_id||(a&&a.event_id?a.event_id:yo()),timestamp:t.timestamp||Qo()});this._applyClientOptions(o),this._applyIntegrationsMetadata(o);var l=e;a&&a.captureContext&&(l=tl.clone(l).update(a.captureContext));var s=Yo.resolve(o);return l&&(s=l.applyToEvent(o,a)),s.then((function(t){return"number"==typeof i&&i>0?r._normalizeEvent(t,i):t}))},t.prototype._normalizeEvent=function(t,e){if(!t)return null;var a=Ei(Ei(Ei(Ei(Ei({},t),t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map((function(t){return Ei(Ei({},t),t.data&&{data:ho(t.data,e)})}))}),t.user&&{user:ho(t.user,e)}),t.contexts&&{contexts:ho(t.contexts,e)}),t.extra&&{extra:ho(t.extra,e)});return t.contexts&&t.contexts.trace&&(a.contexts.trace=t.contexts.trace),a},t.prototype._applyClientOptions=function(t){var e=this.getOptions(),a=e.environment,r=e.release,n=e.dist,i=e.maxValueLength,o=void 0===i?250:i;"environment"in t||(t.environment="environment"in e?a:"production"),void 0===t.release&&void 0!==r&&(t.release=r),void 0===t.dist&&void 0!==n&&(t.dist=n),t.message&&(t.message=eo(t.message,o));var l=t.exception&&t.exception.values&&t.exception.values[0];l&&l.value&&(l.value=eo(l.value,o));var s=t.request;s&&s.url&&(s.url=eo(s.url,o))},t.prototype._applyIntegrationsMetadata=function(t){var e=t.sdk,a=Object.keys(this._integrations);e&&a.length>0&&(e.integrations=a)},t.prototype._sendEvent=function(t){this._getBackend().sendEvent(t)},t.prototype._captureEvent=function(t,e,a){return this._processEvent(t,e,a).then((function(t){return t.event_id}),(function(t){Ho.error(t)}))},t.prototype._processEvent=function(t,e,a){var r=this,n=this.getOptions(),i=n.beforeSend,o=n.sampleRate;if(!this._isEnabled())return Yo.reject(new Ji("SDK not enabled, will not send event."));var l="transaction"===t.type;return!l&&"number"==typeof o&&Math.random()>o?Yo.reject(new Ji("Discarding event because it's not included in the random sample (sampling rate = "+o+")")):this._prepareEvent(t,a,e).then((function(t){if(null===t)throw new Ji("An event processor returned null, will not send event.");if(e&&e.data&&!0===e.data.__sentry__||l||!i)return t;var a=i(t,e);if(void 0===a)throw new Ji("`beforeSend` method has to return `null` or a valid event.");return Wi(a)?a.then((function(t){return t}),(function(t){throw new Ji("beforeSend rejected with "+t)})):a})).then((function(t){if(null===t)throw new Ji("`beforeSend` returned `null`, will not send event.");var e=a&&a.getSession&&a.getSession();return!l&&e&&r._updateSessionFromEvent(e,t),r._sendEvent(t),t})).then(null,(function(t){if(t instanceof Ji)throw t;throw r.captureException(t,{data:{__sentry__:!0},originalException:t}),new Ji("Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: "+t)}))},t.prototype._process=function(t){var e=this;this._processing+=1,t.then((function(t){return e._processing-=1,t}),(function(t){return e._processing-=1,t}))},t}(),bl=function(){function t(){}return t.prototype.sendEvent=function(t){return Yo.resolve({reason:"NoopTransport: Event has been skipped because no Dsn is configured.",status:Ci.Skipped})},t.prototype.close=function(t){return Yo.resolve(!0)},t}(),zl=function(){function t(t){this._options=t,this._options.dsn||Ho.warn("No DSN provided, backend will not do anything."),this._transport=this._setupTransport()}return t.prototype.eventFromException=function(t,e){throw new Ji("Backend has to implement `eventFromException` method")},t.prototype.eventFromMessage=function(t,e,a){throw new Ji("Backend has to implement `eventFromMessage` method")},t.prototype.sendEvent=function(t){this._transport.sendEvent(t).then(null,(function(t){Ho.error("Error while sending event: "+t)}))},t.prototype.sendSession=function(t){this._transport.sendSession?this._transport.sendSession(t).then(null,(function(t){Ho.error("Error while sending session: "+t)})):Ho.warn("Dropping session because custom transport doesn't implement sendSession")},t.prototype.getTransport=function(){return this._transport},t.prototype._setupTransport=function(){return new bl},t}();function xl(t){if(t.metadata&&t.metadata.sdk){var e=t.metadata.sdk;return{name:e.name,version:e.version}}}function wl(t,e){return e?(t.sdk=t.sdk||{name:e.name,version:e.version},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=Di(t.sdk.integrations||[],e.integrations||[]),t.sdk.packages=Di(t.sdk.packages||[],e.packages||[]),t):t}function Ml(t,e){var a=xl(e);return{body:JSON.stringify(Ei({sent_at:(new Date).toISOString()},a&&{sdk:a}))+"\n"+JSON.stringify({type:"session"})+"\n"+JSON.stringify(t),type:"session",url:e.getEnvelopeEndpointWithUrlEncodedAuth()}}function _l(t,e){var a=t.tags||{},r=a.__sentry_samplingMethod,n=a.__sentry_sampleRate,i=function(t,e){var a={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(a[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(t);n<r.length;n++)e.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(t,r[n])&&(a[r[n]]=t[r[n]])}return a}(a,["__sentry_samplingMethod","__sentry_sampleRate"]);t.tags=i;var o=xl(e),l=t.type||"event",s="transaction"===l,c={body:JSON.stringify(o?wl(t,e.metadata.sdk):t),type:l,url:s?e.getEnvelopeEndpointWithUrlEncodedAuth():e.getStoreEndpointWithUrlEncodedAuth()};if(s){var h=JSON.stringify(Ei({event_id:t.event_id,sent_at:(new Date).toISOString()},o&&{sdk:o}))+"\n"+JSON.stringify({type:t.type,sample_rates:[{id:r,rate:n}]})+"\n"+c.body;c.body=h}return c}var Al,Hl=function(){function t(){this.name=t.id}return t.prototype.setupOnce=function(){Al=Function.prototype.toString,Function.prototype.toString=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var a=this.__sentry_original__||this;return Al.apply(a,t)}},t.id="FunctionToString",t}(),Vl=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],Ll=function(){function t(e){void 0===e&&(e={}),this._options=e,this.name=t.id}return t.prototype.setupOnce=function(){al((function(e){var a=ll();if(!a)return e;var r=a.getIntegration(t);if(r){var n=a.getClient(),i=n?n.getOptions():{},o=r._mergeOptions(i);if(r._shouldDropEvent(e,o))return null}return e}))},t.prototype._shouldDropEvent=function(t,e){return this._isSentryError(t,e)?(Ho.warn("Event dropped due to being internal Sentry Error.\nEvent: "+bo(t)),!0):this._isIgnoredError(t,e)?(Ho.warn("Event dropped due to being matched by `ignoreErrors` option.\nEvent: "+bo(t)),!0):this._isDeniedUrl(t,e)?(Ho.warn("Event dropped due to being matched by `denyUrls` option.\nEvent: "+bo(t)+".\nUrl: "+this._getEventFilterUrl(t)),!0):!this._isAllowedUrl(t,e)&&(Ho.warn("Event dropped due to not being matched by `allowUrls` option.\nEvent: "+bo(t)+".\nUrl: "+this._getEventFilterUrl(t)),!0)},t.prototype._isSentryError=function(t,e){if(!e.ignoreInternal)return!1;try{return t&&t.exception&&t.exception.values&&t.exception.values[0]&&"SentryError"===t.exception.values[0].type||!1}catch(a){return!1}},t.prototype._isIgnoredError=function(t,e){return!(!e.ignoreErrors||!e.ignoreErrors.length)&&this._getPossibleEventMessages(t).some((function(t){return e.ignoreErrors.some((function(e){return ro(t,e)}))}))},t.prototype._isDeniedUrl=function(t,e){if(!e.denyUrls||!e.denyUrls.length)return!1;var a=this._getEventFilterUrl(t);return!!a&&e.denyUrls.some((function(t){return ro(a,t)}))},t.prototype._isAllowedUrl=function(t,e){if(!e.allowUrls||!e.allowUrls.length)return!0;var a=this._getEventFilterUrl(t);return!a||e.allowUrls.some((function(t){return ro(a,t)}))},t.prototype._mergeOptions=function(t){return void 0===t&&(t={}),{allowUrls:Di(this._options.whitelistUrls||[],this._options.allowUrls||[],t.whitelistUrls||[],t.allowUrls||[]),denyUrls:Di(this._options.blacklistUrls||[],this._options.denyUrls||[],t.blacklistUrls||[],t.denyUrls||[]),ignoreErrors:Di(this._options.ignoreErrors||[],t.ignoreErrors||[],Vl),ignoreInternal:void 0===this._options.ignoreInternal||this._options.ignoreInternal}},t.prototype._getPossibleEventMessages=function(t){if(t.message)return[t.message];if(t.exception)try{var e=t.exception.values&&t.exception.values[0]||{},a=e.type,r=void 0===a?"":a,n=e.value,i=void 0===n?"":n;return[""+i,r+": "+i]}catch(o){return Ho.error("Cannot extract message for event "+bo(t)),[]}return[]},t.prototype._getEventFilterUrl=function(t){try{if(t.stacktrace){var e=t.stacktrace.frames;return e&&e[e.length-1].filename||null}if(t.exception){var a=t.exception.values&&t.exception.values[0].stacktrace&&t.exception.values[0].stacktrace.frames;return a&&a[a.length-1].filename||null}return null}catch(r){return Ho.error("Cannot extract url for event "+bo(t)),null}},t.id="InboundFilters",t}(),Bl=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,kl=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Cl=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,Sl=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,El=/\((\S*)(?::(\d+))(?::(\d+))\)/,Ol=/Minified React error #\d+;/i;function Tl(t){var e=null,a=0;t&&("number"==typeof t.framesToPop?a=t.framesToPop:Ol.test(t.message)&&(a=1));try{if(e=function(t){if(!t||!t.stacktrace)return null;for(var e,a=t.stacktrace,r=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,n=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\((.*)\))? in (.*):\s*$/i,i=a.split("\n"),o=[],l=0;l<i.length;l+=2){var s=null;(e=r.exec(i[l]))?s={url:e[2],func:e[3],args:[],line:+e[1],column:null}:(e=n.exec(i[l]))&&(s={url:e[6],func:e[3]||e[4],args:e[5]?e[5].split(","):[],line:+e[1],column:+e[2]}),s&&(!s.func&&s.line&&(s.func="?"),o.push(s))}if(!o.length)return null;return{message:jl(t),name:t.name,stack:o}}(t))return Dl(e,a)}catch(r){}try{if(e=function(t){if(!t||!t.stack)return null;for(var e,a,r,n=[],i=t.stack.split("\n"),o=0;o<i.length;++o){if(a=Bl.exec(i[o])){var l=a[2]&&0===a[2].indexOf("native");a[2]&&0===a[2].indexOf("eval")&&(e=El.exec(a[2]))&&(a[2]=e[1],a[3]=e[2],a[4]=e[3]),r={url:a[2]&&0===a[2].indexOf("address at ")?a[2].substr("address at ".length):a[2],func:a[1]||"?",args:l?[a[2]]:[],line:a[3]?+a[3]:null,column:a[4]?+a[4]:null}}else if(a=Cl.exec(i[o]))r={url:a[2],func:a[1]||"?",args:[],line:+a[3],column:a[4]?+a[4]:null};else{if(!(a=kl.exec(i[o])))continue;a[3]&&a[3].indexOf(" > eval")>-1&&(e=Sl.exec(a[3]))?(a[1]=a[1]||"eval",a[3]=e[1],a[4]=e[2],a[5]=""):0!==o||a[5]||void 0===t.columnNumber||(n[0].column=t.columnNumber+1),r={url:a[3],func:a[1]||"?",args:a[2]?a[2].split(","):[],line:a[4]?+a[4]:null,column:a[5]?+a[5]:null}}!r.func&&r.line&&(r.func="?"),n.push(r)}if(!n.length)return null;return{message:jl(t),name:t.name,stack:n}}(t))return Dl(e,a)}catch(r){}return{message:jl(t),name:t&&t.name,stack:[],failed:!0}}function Dl(t,e){try{return Ei(Ei({},t),{stack:t.stack.slice(e)})}catch(a){return t}}function jl(t){var e=t&&t.message;return e?e.error&&"string"==typeof e.error.message?e.error.message:e:"No error message"}function Fl(t){var e=Pl(t.stack),a={type:t.name,value:t.message};return e&&e.length&&(a.stacktrace={frames:e}),void 0===a.type&&""===a.value&&(a.value="Unrecoverable error caught"),a}function Il(t){return{exception:{values:[Fl(t)]}}}function Pl(t){if(!t||!t.length)return[];var e=t,a=e[0].func||"",r=e[e.length-1].func||"";return-1===a.indexOf("captureMessage")&&-1===a.indexOf("captureException")||(e=e.slice(1)),-1!==r.indexOf("sentryWrapped")&&(e=e.slice(0,-1)),e.slice(0,50).map((function(t){return{colno:null===t.column?void 0:t.column,filename:t.url||e[0].url,function:t.func||"?",in_app:!0,lineno:null===t.line?void 0:t.line}})).reverse()}function Rl(t,e,a){var r,n;if(void 0===a&&(a={}),Fi(t)&&t.error)return r=Il(Tl(t=t.error));if(Ii(t)||(n=t,"[object DOMException]"===Object.prototype.toString.call(n))){var i=t,o=i.name||(Ii(i)?"DOMError":"DOMException"),l=i.message?o+": "+i.message:o;return xo(r=Nl(l,e,a),l),"code"in i&&(r.tags=Ei(Ei({},r.tags),{"DOMException.code":""+i.code})),r}return ji(t)?r=Il(Tl(t)):Ni(t)||$i(t)?(wo(r=function(t,e,a){var r={exception:{values:[{type:$i(t)?t.constructor.name:a?"UnhandledRejection":"Error",value:"Non-Error "+(a?"promise rejection":"exception")+" captured with keys: "+uo(t)}]},extra:{__serialized__:lo(t)}};if(e){var n=Pl(Tl(e).stack);r.stacktrace={frames:n}}return r}(t,e,a.rejection),{synthetic:!0}),r):(xo(r=Nl(t,e,a),""+t,void 0),wo(r,{synthetic:!0}),r)}function Nl(t,e,a){void 0===a&&(a={});var r={message:t};if(a.attachStacktrace&&e){var n=Pl(Tl(e).stack);r.stacktrace={frames:n}}return r}var $l=function(){function t(t){this.options=t,this._buffer=new Ko(30),this._rateLimits={},this._api=new vl(t.dsn,t._metadata),this.url=this._api.getStoreEndpointWithUrlEncodedAuth()}return t.prototype.sendEvent=function(t){throw new Ji("Transport Class has to implement `sendEvent` method")},t.prototype.close=function(t){return this._buffer.drain(t)},t.prototype._handleResponse=function(t){var e=t.requestType,a=t.response,r=t.headers,n=t.resolve,i=t.reject,o=Ci.fromHttpCode(a.status);this._handleRateLimit(r)&&Ho.warn("Too many requests, backing off until: "+this._disabledUntil(e)),o!==Ci.Success?i(a):n({status:o})},t.prototype._disabledUntil=function(t){return this._rateLimits[t]||this._rateLimits.all},t.prototype._isRateLimited=function(t){return this._disabledUntil(t)>new Date(Date.now())},t.prototype._handleRateLimit=function(t){var e,a,r,n,i=Date.now(),o=t["x-sentry-rate-limits"],l=t["retry-after"];if(o){try{for(var s=Oi(o.trim().split(",")),c=s.next();!c.done;c=s.next()){var h=c.value.split(":",2),u=parseInt(h[0],10),d=1e3*(isNaN(u)?60:u);try{for(var p=(r=void 0,Oi(h[1].split(";"))),m=p.next();!m.done;m=p.next()){var v=m.value;this._rateLimits[v||"all"]=new Date(i+d)}}catch(f){r={error:f}}finally{try{m&&!m.done&&(n=p.return)&&n.call(p)}finally{if(r)throw r.error}}}}catch(y){e={error:y}}finally{try{c&&!c.done&&(a=s.return)&&a.call(s)}finally{if(e)throw e.error}}return!0}return!!l&&(this._rateLimits.all=new Date(i+function(t,e){if(!e)return 6e4;var a=parseInt(""+e,10);if(!isNaN(a))return 1e3*a;var r=Date.parse(""+e);return isNaN(r)?6e4:r-t}(i,l)),!0)},t}(),Ul=fo(),Wl=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Hi(e,t),e.prototype.sendEvent=function(t){return this._sendRequest(_l(t,this._api),t)},e.prototype.sendSession=function(t){return this._sendRequest(Ml(t,this._api),t)},e.prototype._sendRequest=function(t,e){var a=this;if(this._isRateLimited(t.type))return Promise.reject({event:e,type:t.type,reason:"Transport locked till "+this._disabledUntil(t.type)+" due to too many requests.",status:429});var r={body:t.body,method:"POST",referrerPolicy:Bo()?"origin":""};return void 0!==this.options.fetchParameters&&Object.assign(r,this.options.fetchParameters),void 0!==this.options.headers&&(r.headers=this.options.headers),this._buffer.add(new Yo((function(e,n){Ul.fetch(t.url,r).then((function(r){var i={"x-sentry-rate-limits":r.headers.get("X-Sentry-Rate-Limits"),"retry-after":r.headers.get("Retry-After")};a._handleResponse({requestType:t.type,response:r,headers:i,resolve:e,reject:n})})).catch(n)})))},e}($l),ql=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Hi(e,t),e.prototype.sendEvent=function(t){return this._sendRequest(_l(t,this._api),t)},e.prototype.sendSession=function(t){return this._sendRequest(Ml(t,this._api),t)},e.prototype._sendRequest=function(t,e){var a=this;return this._isRateLimited(t.type)?Promise.reject({event:e,type:t.type,reason:"Transport locked till "+this._disabledUntil(t.type)+" due to too many requests.",status:429}):this._buffer.add(new Yo((function(e,r){var n=new XMLHttpRequest;for(var i in n.onreadystatechange=function(){if(4===n.readyState){var i={"x-sentry-rate-limits":n.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":n.getResponseHeader("Retry-After")};a._handleResponse({requestType:t.type,response:n,headers:i,resolve:e,reject:r})}},n.open("POST",t.url),a.options.headers)a.options.headers.hasOwnProperty(i)&&n.setRequestHeader(i,a.options.headers[i]);n.send(t.body)})))},e}($l),Gl=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Hi(e,t),e.prototype.eventFromException=function(t,e){return function(t,e,a){var r=Rl(e,a&&a.syntheticException||void 0,{attachStacktrace:t.attachStacktrace});return wo(r,{handled:!0,type:"generic"}),r.level=Bi.Error,a&&a.event_id&&(r.event_id=a.event_id),Yo.resolve(r)}(this._options,t,e)},e.prototype.eventFromMessage=function(t,e,a){return void 0===e&&(e=Bi.Info),function(t,e,a,r){void 0===a&&(a=Bi.Info);var n=Nl(e,r&&r.syntheticException||void 0,{attachStacktrace:t.attachStacktrace});return n.level=a,r&&r.event_id&&(n.event_id=r.event_id),Yo.resolve(n)}(this._options,t,e,a)},e.prototype._setupTransport=function(){if(!this._options.dsn)return t.prototype._setupTransport.call(this);var e=Ei(Ei({},this._options.transportOptions),{dsn:this._options.dsn,_metadata:this._options._metadata});return this._options.transport?new this._options.transport(e):Vo()?new Wl(e):new ql(e)},e}(zl),Yl=0;function Kl(){return Yl>0}function Jl(){Yl+=1,setTimeout((function(){Yl-=1}))}function Zl(t,e,a){if(void 0===e&&(e={}),"function"!=typeof t)return t;try{if(t.__sentry__)return t;if(t.__sentry_wrapped__)return t.__sentry_wrapped__}catch(i){return t}var r=function(){var r=Array.prototype.slice.call(arguments);try{a&&"function"==typeof a&&a.apply(this,arguments);var n=r.map((function(t){return Zl(t,e)}));return t.handleEvent?t.handleEvent.apply(this,n):t.apply(this,n)}catch(i){throw Jl(),ml((function(t){t.addEventProcessor((function(t){var a=Ei({},t);return e.mechanism&&(xo(a,void 0,void 0),wo(a,e.mechanism)),a.extra=Ei(Ei({},a.extra),{arguments:r}),a})),dl(i)})),i}};try{for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}catch(o){}t.prototype=t.prototype||{},r.prototype=t.prototype,Object.defineProperty(t,"__sentry_wrapped__",{enumerable:!1,value:r}),Object.defineProperties(r,{__sentry__:{enumerable:!1,value:!0},__sentry_original__:{enumerable:!1,value:t}});try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get:function(){return t.name}})}catch(o){}return r}var Xl=function(){function t(e){this.name=t.id,this._onErrorHandlerInstalled=!1,this._onUnhandledRejectionHandlerInstalled=!1,this._options=Ei({onerror:!0,onunhandledrejection:!0},e)}return t.prototype.setupOnce=function(){Error.stackTraceLimit=50,this._options.onerror&&(Ho.log("Global Handler attached: onerror"),this._installGlobalOnErrorHandler()),this._options.onunhandledrejection&&(Ho.log("Global Handler attached: onunhandledrejection"),this._installGlobalOnUnhandledRejectionHandler())},t.prototype._installGlobalOnErrorHandler=function(){var e=this;this._onErrorHandlerInstalled||(To({callback:function(a){var r=a.error,n=ll(),i=n.getIntegration(t),o=r&&!0===r.__sentry_own_request__;if(i&&!Kl()&&!o){var l=n.getClient(),s=Ri(r)?e._eventFromIncompleteOnError(a.msg,a.url,a.line,a.column):e._enhanceEventWithInitialFrame(Rl(r,void 0,{attachStacktrace:l&&l.getOptions().attachStacktrace,rejection:!1}),a.url,a.line,a.column);wo(s,{handled:!1,type:"onerror"}),n.captureEvent(s,{originalException:r})}},type:"error"}),this._onErrorHandlerInstalled=!0)},t.prototype._installGlobalOnUnhandledRejectionHandler=function(){var e=this;this._onUnhandledRejectionHandlerInstalled||(To({callback:function(a){var r=a;try{"reason"in a?r=a.reason:"detail"in a&&"reason"in a.detail&&(r=a.detail.reason)}catch(c){}var n=ll(),i=n.getIntegration(t),o=r&&!0===r.__sentry_own_request__;if(!i||Kl()||o)return!0;var l=n.getClient(),s=Ri(r)?e._eventFromRejectionWithPrimitive(r):Rl(r,void 0,{attachStacktrace:l&&l.getOptions().attachStacktrace,rejection:!0});s.level=Bi.Error,wo(s,{handled:!1,type:"onunhandledrejection"}),n.captureEvent(s,{originalException:r})},type:"unhandledrejection"}),this._onUnhandledRejectionHandlerInstalled=!0)},t.prototype._eventFromIncompleteOnError=function(t,e,a,r){var n,i=Fi(t)?t.message:t;if(Pi(i)){var o=i.match(/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i);o&&(n=o[1],i=o[2])}var l={exception:{values:[{type:n||"Error",value:i}]}};return this._enhanceEventWithInitialFrame(l,e,a,r)},t.prototype._eventFromRejectionWithPrimitive=function(t){return{exception:{values:[{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(t)}]}}},t.prototype._enhanceEventWithInitialFrame=function(t,e,a,r){t.exception=t.exception||{},t.exception.values=t.exception.values||[],t.exception.values[0]=t.exception.values[0]||{},t.exception.values[0].stacktrace=t.exception.values[0].stacktrace||{},t.exception.values[0].stacktrace.frames=t.exception.values[0].stacktrace.frames||[];var n=isNaN(parseInt(r,10))?void 0:r,i=isNaN(parseInt(a,10))?void 0:a,o=Pi(e)&&e.length>0?e:function(){try{return document.location.href}catch(t){return""}}();return 0===t.exception.values[0].stacktrace.frames.length&&t.exception.values[0].stacktrace.frames.push({colno:n,filename:o,function:"?",in_app:!0,lineno:i}),t},t.id="GlobalHandlers",t}(),Ql=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],ts=function(){function t(e){this.name=t.id,this._options=Ei({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},e)}return t.prototype.setupOnce=function(){var t=fo();(this._options.setTimeout&&no(t,"setTimeout",this._wrapTimeFunction.bind(this)),this._options.setInterval&&no(t,"setInterval",this._wrapTimeFunction.bind(this)),this._options.requestAnimationFrame&&no(t,"requestAnimationFrame",this._wrapRAF.bind(this)),this._options.XMLHttpRequest&&"XMLHttpRequest"in t&&no(XMLHttpRequest.prototype,"send",this._wrapXHR.bind(this)),this._options.eventTarget)&&(Array.isArray(this._options.eventTarget)?this._options.eventTarget:Ql).forEach(this._wrapEventTarget.bind(this))},t.prototype._wrapTimeFunction=function(t){return function(){for(var e=[],a=0;a<arguments.length;a++)e[a]=arguments[a];var r=e[0];return e[0]=Zl(r,{mechanism:{data:{function:to(t)},handled:!0,type:"instrument"}}),t.apply(this,e)}},t.prototype._wrapRAF=function(t){return function(e){return t.call(this,Zl(e,{mechanism:{data:{function:"requestAnimationFrame",handler:to(t)},handled:!0,type:"instrument"}}))}},t.prototype._wrapEventTarget=function(t){var e=fo(),a=e[t]&&e[t].prototype;a&&a.hasOwnProperty&&a.hasOwnProperty("addEventListener")&&(no(a,"addEventListener",(function(e){return function(a,r,n){try{"function"==typeof r.handleEvent&&(r.handleEvent=Zl(r.handleEvent.bind(r),{mechanism:{data:{function:"handleEvent",handler:to(r),target:t},handled:!0,type:"instrument"}}))}catch(i){}return e.call(this,a,Zl(r,{mechanism:{data:{function:"addEventListener",handler:to(r),target:t},handled:!0,type:"instrument"}}),n)}})),no(a,"removeEventListener",(function(t){return function(e,a,r){var n,i=a;try{var o=null===(n=i)||void 0===n?void 0:n.__sentry_wrapped__;o&&t.call(this,e,o,r)}catch(l){}return t.call(this,e,i,r)}})))},t.prototype._wrapXHR=function(t){return function(){for(var e=[],a=0;a<arguments.length;a++)e[a]=arguments[a];var r=this,n=["onload","onerror","onprogress","onreadystatechange"];return n.forEach((function(t){t in r&&"function"==typeof r[t]&&no(r,t,(function(e){var a={mechanism:{data:{function:t,handler:to(e)},handled:!0,type:"instrument"}};return e.__sentry_original__&&(a.mechanism.data.handler=to(e.__sentry_original__)),Zl(e,a)}))})),t.apply(this,e)}},t.id="TryCatch",t}(),es=function(){function t(e){this.name=t.id,this._options=Ei({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},e)}return t.prototype.addSentryBreadcrumb=function(t){this._options.sentry&&ll().addBreadcrumb({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:bo(t)},{event:t})},t.prototype.setupOnce=function(){var t=this;this._options.console&&To({callback:function(){for(var e=[],a=0;a<arguments.length;a++)e[a]=arguments[a];t._consoleBreadcrumb.apply(t,Di(e))},type:"console"}),this._options.dom&&To({callback:function(){for(var e=[],a=0;a<arguments.length;a++)e[a]=arguments[a];t._domBreadcrumb.apply(t,Di(e))},type:"dom"}),this._options.xhr&&To({callback:function(){for(var e=[],a=0;a<arguments.length;a++)e[a]=arguments[a];t._xhrBreadcrumb.apply(t,Di(e))},type:"xhr"}),this._options.fetch&&To({callback:function(){for(var e=[],a=0;a<arguments.length;a++)e[a]=arguments[a];t._fetchBreadcrumb.apply(t,Di(e))},type:"fetch"}),this._options.history&&To({callback:function(){for(var e=[],a=0;a<arguments.length;a++)e[a]=arguments[a];t._historyBreadcrumb.apply(t,Di(e))},type:"history"})},t.prototype._consoleBreadcrumb=function(t){var e={category:"console",data:{arguments:t.args,logger:"console"},level:Bi.fromString(t.level),message:ao(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;e.message="Assertion failed: "+(ao(t.args.slice(1)," ")||"console.assert"),e.data.arguments=t.args.slice(1)}ll().addBreadcrumb(e,{input:t.args,level:t.level})},t.prototype._domBreadcrumb=function(t){var e;try{e=t.event.target?Gi(t.event.target):Gi(t.event)}catch(a){e="<unknown>"}0!==e.length&&ll().addBreadcrumb({category:"ui."+t.name,message:e},{event:t.event,name:t.name})},t.prototype._xhrBreadcrumb=function(t){if(t.endTimestamp){if(t.xhr.__sentry_own_request__)return;var e=t.xhr.__sentry_xhr__||{},a=e.method,r=e.url,n=e.status_code,i=e.body;ll().addBreadcrumb({category:"xhr",data:{method:a,url:r,status_code:n},type:"http"},{xhr:t.xhr,input:i})}else;},t.prototype._fetchBreadcrumb=function(t){t.endTimestamp&&(t.fetchData.url.match(/sentry_key/)&&"POST"===t.fetchData.method||(t.error?ll().addBreadcrumb({category:"fetch",data:t.fetchData,level:Bi.Error,type:"http"},{data:t.error,input:t.args}):ll().addBreadcrumb({category:"fetch",data:Ei(Ei({},t.fetchData),{status_code:t.response.status}),type:"http"},{input:t.args,response:t.response})))},t.prototype._historyBreadcrumb=function(t){var e=fo(),a=t.from,r=t.to,n=go(e.location.href),i=go(a),o=go(r);i.path||(i=n),n.protocol===o.protocol&&n.host===o.host&&(r=o.relative),n.protocol===i.protocol&&n.host===i.host&&(a=i.relative),ll().addBreadcrumb({category:"navigation",data:{from:a,to:r}})},t.id="Breadcrumbs",t}(),as=function(){function t(e){void 0===e&&(e={}),this.name=t.id,this._key=e.key||"cause",this._limit=e.limit||5}return t.prototype.setupOnce=function(){al((function(e,a){var r=ll().getIntegration(t);return r?r._handler(e,a):e}))},t.prototype._handler=function(t,e){if(!(t.exception&&t.exception.values&&e&&qi(e.originalException,Error)))return t;var a=this._walkErrorTree(e.originalException,this._key);return t.exception.values=Di(a,t.exception.values),t},t.prototype._walkErrorTree=function(t,e,a){if(void 0===a&&(a=[]),!qi(t[e],Error)||a.length+1>=this._limit)return a;var r=Fl(Tl(t[e]));return this._walkErrorTree(t[e],e,Di([r],a))},t.id="LinkedErrors",t}(),rs=fo(),ns=function(){function t(){this.name=t.id}return t.prototype.setupOnce=function(){al((function(e){var a,r,n;if(ll().getIntegration(t)){if(!rs.navigator&&!rs.location&&!rs.document)return e;var i=(null===(a=e.request)||void 0===a?void 0:a.url)||(null===(r=rs.location)||void 0===r?void 0:r.href),o=(rs.document||{}).referrer,l=(rs.navigator||{}).userAgent,s=Ei(Ei(Ei({},null===(n=e.request)||void 0===n?void 0:n.headers),o&&{Referer:o}),l&&{"User-Agent":l}),c=Ei(Ei({},i&&{url:i}),{headers:s});return Ei(Ei({},e),{request:c})}return e}))},t.id="UserAgent",t}(),is=function(t){function e(e){return void 0===e&&(e={}),t.call(this,Gl,e)||this}return Hi(e,t),e.prototype.showReportDialog=function(t){void 0===t&&(t={}),fo().document&&(this._isEnabled()?function(t){if(void 0===t&&(t={}),t.eventId)if(t.dsn){var e=document.createElement("script");e.async=!0,e.src=new vl(t.dsn).getReportDialogEndpoint(t),t.onLoad&&(e.onload=t.onLoad),(document.head||document.body).appendChild(e)}else Ho.error("Missing dsn option in showReportDialog call");else Ho.error("Missing eventId option in showReportDialog call")}(Ei(Ei({},t),{dsn:t.dsn||this.getDsn()})):Ho.error("Trying to call showReportDialog with Sentry Client disabled"))},e.prototype._prepareEvent=function(e,a,r){return e.platform=e.platform||"javascript",t.prototype._prepareEvent.call(this,e,a,r)},e.prototype._sendEvent=function(e){var a=this.getIntegration(es);a&&a.addSentryBreadcrumb(e),t.prototype._sendEvent.call(this,e)},e}(gl),os=[new Ll,new Hl,new ts,new es,new Xl,new as,new ns];function ls(t){if(void 0===t&&(t={}),void 0===t.defaultIntegrations&&(t.defaultIntegrations=os),void 0===t.release){var e=fo();e.SENTRY_RELEASE&&e.SENTRY_RELEASE.id&&(t.release=e.SENTRY_RELEASE.id)}void 0===t.autoSessionTracking&&(t.autoSessionTracking=!0),t._metadata=t._metadata||{},t._metadata.sdk={name:"sentry.javascript.browser",packages:[{name:"npm:@sentry/browser",version:"6.0.0"}],version:"6.0.0"},function(t,e){!0===e.debug&&Ho.enable();var a=ll(),r=new t(e);a.bindClient(r)}(is,t),t.autoSessionTracking&&function(){var t=fo(),e=ll(),a="complete"===document.readyState,r=!1,n=function(){r&&a&&e.endSession()},i=function(){a=!0,n(),t.removeEventListener("load",i)};e.startSession(),a||t.addEventListener("load",i);try{var o=new PerformanceObserver((function(t,e){t.getEntries().forEach((function(t){"first-contentful-paint"===t.name&&t.startTime<l&&(e.disconnect(),r=!0,n())}))})),l="hidden"===document.visibilityState?0:1/0;document.addEventListener("visibilitychange",(function(t){l=Math.min(l,t.timeStamp)}),{once:!0}),o.observe({type:"paint",buffered:!0})}catch(s){r=!0,n()}To({callback:function(){var t;(null===(t=ll().getScope())||void 0===t?void 0:t.getSession())||(e.startSession(),e.endSession())},type:"history"})}()}var ss=1;var cs,hs,us,ds={nextValue:function(){return(ss=(9301*ss+49297)%233280)/233280},seed:function(t){ss=t}},ps="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-";function ms(){us=!1}function vs(t){if(t){if(t!==cs){if(t.length!==ps.length)throw new Error("Custom alphabet for shortid must be "+ps.length+" unique characters. You submitted "+t.length+" characters: "+t);var e=t.split("").filter((function(t,e,a){return e!==a.lastIndexOf(t)}));if(e.length)throw new Error("Custom alphabet for shortid must be "+ps.length+" unique characters. These characters were not unique: "+e.join(", "));cs=t,ms()}}else cs!==ps&&(cs=ps,ms())}function fs(){return us||(us=function(){cs||vs(ps);for(var t,e=cs.split(""),a=[],r=ds.nextValue();e.length>0;)r=ds.nextValue(),t=Math.floor(r*e.length),a.push(e.splice(t,1)[0]);return a.join("")}())}var ys={get:function(){return cs||ps},characters:function(t){return vs(t),cs},seed:function(t){ds.seed(t),hs!==t&&(ms(),hs=t)},lookup:function(t){return fs()[t]},shuffled:fs},gs="object"==typeof window&&(window.crypto||window.msCrypto),bs=gs&&gs.getRandomValues?function(t){return gs.getRandomValues(new Uint8Array(t))}:function(t){for(var e=[],a=0;a<t;a++)e.push(Math.floor(256*Math.random()));return e},zs=function(t,e,a){for(var r=(2<<Math.log(e.length-1)/Math.LN2)-1,n=-~(1.6*r*a/e.length),i="";;)for(var o=t(n),l=n;l--;)if((i+=e[o[l]&r]||"").length===+a)return i};var xs,ws,Ms=function(t){for(var e,a=0,r="";!e;)r+=zs(bs,ys.get(),1),e=t<Math.pow(16,a+1),a++;return r};var _s=function(t){var e="",a=Math.floor(.001*(Date.now()-1567752802062));return a===ws?xs++:(xs=0,ws=a),e+=Ms(7),e+=Ms(t),xs>0&&(e+=Ms(xs)),e+=Ms(a)};var As=function(t){return!(!t||"string"!=typeof t||t.length<6)&&!new RegExp("[^"+ys.get().replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&")+"]").test(t)},Hs=kr((function(t){var e=0;function a(){return _s(e)}t.exports=a,t.exports.generate=a,t.exports.seed=function(e){return ys.seed(e),t.exports},t.exports.worker=function(a){return e=a,t.exports},t.exports.characters=function(t){return void 0!==t&&ys.characters(t),ys.shuffled()},t.exports.isValid=As})),Vs=kr((function(t,e){(function(){var a,r="Expected a function",n="__lodash_hash_undefined__",i="__lodash_placeholder__",o=16,l=32,s=64,c=128,h=256,u=1/0,d=9007199254740991,p=NaN,m=4294967295,v=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",o],["flip",512],["partial",l],["partialRight",s],["rearg",h]],f="[object Arguments]",y="[object Array]",g="[object Boolean]",b="[object Date]",z="[object Error]",x="[object Function]",w="[object GeneratorFunction]",M="[object Map]",_="[object Number]",A="[object Object]",H="[object Promise]",V="[object RegExp]",L="[object Set]",B="[object String]",k="[object Symbol]",C="[object WeakMap]",S="[object ArrayBuffer]",E="[object DataView]",O="[object Float32Array]",T="[object Float64Array]",D="[object Int8Array]",j="[object Int16Array]",F="[object Int32Array]",I="[object Uint8Array]",P="[object Uint8ClampedArray]",R="[object Uint16Array]",N="[object Uint32Array]",$=/\b__p \+= '';/g,U=/\b(__p \+=) '' \+/g,W=/(__e\(.*?\)|\b__t\)) \+\n'';/g,q=/&(?:amp|lt|gt|quot|#39);/g,G=/[&<>"']/g,Y=RegExp(q.source),K=RegExp(G.source),J=/<%-([\s\S]+?)%>/g,Z=/<%([\s\S]+?)%>/g,X=/<%=([\s\S]+?)%>/g,Q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,tt=/^\w*$/,et=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,at=/[\\^$.*+?()[\]{}|]/g,rt=RegExp(at.source),nt=/^\s+/,it=/\s/,ot=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,lt=/\{\n\/\* \[wrapped with (.+)\] \*/,st=/,? & /,ct=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ht=/[()=,{}\[\]\/\s]/,ut=/\\(\\)?/g,dt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pt=/\w*$/,mt=/^[-+]0x[0-9a-f]+$/i,vt=/^0b[01]+$/i,ft=/^\[object .+?Constructor\]$/,yt=/^0o[0-7]+$/i,gt=/^(?:0|[1-9]\d*)$/,bt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,zt=/($^)/,xt=/['\n\r\u2028\u2029\\]/g,wt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Mt="\\u2700-\\u27bf",_t="a-z\\xdf-\\xf6\\xf8-\\xff",At="A-Z\\xc0-\\xd6\\xd8-\\xde",Ht="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Vt="['’]",Lt="[\\ud800-\\udfff]",Bt="["+Ht+"]",kt="["+wt+"]",Ct="\\d+",St="[\\u2700-\\u27bf]",Et="["+_t+"]",Ot="[^\\ud800-\\udfff"+Ht+Ct+Mt+_t+At+"]",Tt="\\ud83c[\\udffb-\\udfff]",Dt="[^\\ud800-\\udfff]",jt="(?:\\ud83c[\\udde6-\\uddff]){2}",Ft="[\\ud800-\\udbff][\\udc00-\\udfff]",It="["+At+"]",Pt="(?:"+Et+"|"+Ot+")",Rt="(?:"+It+"|"+Ot+")",Nt="(?:['’](?:d|ll|m|re|s|t|ve))?",$t="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ut="(?:"+kt+"|"+Tt+")"+"?",Wt="[\\ufe0e\\ufe0f]?",qt=Wt+Ut+("(?:\\u200d(?:"+[Dt,jt,Ft].join("|")+")"+Wt+Ut+")*"),Gt="(?:"+[St,jt,Ft].join("|")+")"+qt,Yt="(?:"+[Dt+kt+"?",kt,jt,Ft,Lt].join("|")+")",Kt=RegExp(Vt,"g"),Jt=RegExp(kt,"g"),Zt=RegExp(Tt+"(?="+Tt+")|"+Yt+qt,"g"),Xt=RegExp([It+"?"+Et+"+"+Nt+"(?="+[Bt,It,"$"].join("|")+")",Rt+"+"+$t+"(?="+[Bt,It+Pt,"$"].join("|")+")",It+"?"+Pt+"+"+Nt,It+"+"+$t,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ct,Gt].join("|"),"g"),Qt=RegExp("[\\u200d\\ud800-\\udfff"+wt+"\\ufe0e\\ufe0f]"),te=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ee=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ae=-1,re={};re[O]=re[T]=re[D]=re[j]=re[F]=re[I]=re[P]=re[R]=re[N]=!0,re[f]=re[y]=re[S]=re[g]=re[E]=re[b]=re[z]=re[x]=re[M]=re[_]=re[A]=re[V]=re[L]=re[B]=re[C]=!1;var ne={};ne[f]=ne[y]=ne[S]=ne[E]=ne[g]=ne[b]=ne[O]=ne[T]=ne[D]=ne[j]=ne[F]=ne[M]=ne[_]=ne[A]=ne[V]=ne[L]=ne[B]=ne[k]=ne[I]=ne[P]=ne[R]=ne[N]=!0,ne[z]=ne[x]=ne[C]=!1;var ie={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},oe=parseFloat,le=parseInt,se="object"==typeof Br&&Br&&Br.Object===Object&&Br,ce="object"==typeof self&&self&&self.Object===Object&&self,he=se||ce||Function("return this")(),ue=e&&!e.nodeType&&e,de=ue&&t&&!t.nodeType&&t,pe=de&&de.exports===ue,me=pe&&se.process,ve=function(){try{var t=de&&de.require&&de.require("util").types;return t||me&&me.binding&&me.binding("util")}catch(e){}}(),fe=ve&&ve.isArrayBuffer,ye=ve&&ve.isDate,ge=ve&&ve.isMap,be=ve&&ve.isRegExp,ze=ve&&ve.isSet,xe=ve&&ve.isTypedArray;function we(t,e,a){switch(a.length){case 0:return t.call(e);case 1:return t.call(e,a[0]);case 2:return t.call(e,a[0],a[1]);case 3:return t.call(e,a[0],a[1],a[2])}return t.apply(e,a)}function Me(t,e,a,r){for(var n=-1,i=null==t?0:t.length;++n<i;){var o=t[n];e(r,o,a(o),t)}return r}function _e(t,e){for(var a=-1,r=null==t?0:t.length;++a<r&&!1!==e(t[a],a,t););return t}function Ae(t,e){for(var a=null==t?0:t.length;a--&&!1!==e(t[a],a,t););return t}function He(t,e){for(var a=-1,r=null==t?0:t.length;++a<r;)if(!e(t[a],a,t))return!1;return!0}function Ve(t,e){for(var a=-1,r=null==t?0:t.length,n=0,i=[];++a<r;){var o=t[a];e(o,a,t)&&(i[n++]=o)}return i}function Le(t,e){return!!(null==t?0:t.length)&&Fe(t,e,0)>-1}function Be(t,e,a){for(var r=-1,n=null==t?0:t.length;++r<n;)if(a(e,t[r]))return!0;return!1}function ke(t,e){for(var a=-1,r=null==t?0:t.length,n=Array(r);++a<r;)n[a]=e(t[a],a,t);return n}function Ce(t,e){for(var a=-1,r=e.length,n=t.length;++a<r;)t[n+a]=e[a];return t}function Se(t,e,a,r){var n=-1,i=null==t?0:t.length;for(r&&i&&(a=t[++n]);++n<i;)a=e(a,t[n],n,t);return a}function Ee(t,e,a,r){var n=null==t?0:t.length;for(r&&n&&(a=t[--n]);n--;)a=e(a,t[n],n,t);return a}function Oe(t,e){for(var a=-1,r=null==t?0:t.length;++a<r;)if(e(t[a],a,t))return!0;return!1}var Te=Ne("length");function De(t,e,a){var r;return a(t,(function(t,a,n){if(e(t,a,n))return r=a,!1})),r}function je(t,e,a,r){for(var n=t.length,i=a+(r?1:-1);r?i--:++i<n;)if(e(t[i],i,t))return i;return-1}function Fe(t,e,a){return e==e?function(t,e,a){var r=a-1,n=t.length;for(;++r<n;)if(t[r]===e)return r;return-1}(t,e,a):je(t,Pe,a)}function Ie(t,e,a,r){for(var n=a-1,i=t.length;++n<i;)if(r(t[n],e))return n;return-1}function Pe(t){return t!=t}function Re(t,e){var a=null==t?0:t.length;return a?We(t,e)/a:p}function Ne(t){return function(e){return null==e?a:e[t]}}function $e(t){return function(e){return null==t?a:t[e]}}function Ue(t,e,a,r,n){return n(t,(function(t,n,i){a=r?(r=!1,t):e(a,t,n,i)})),a}function We(t,e){for(var r,n=-1,i=t.length;++n<i;){var o=e(t[n]);o!==a&&(r=r===a?o:r+o)}return r}function qe(t,e){for(var a=-1,r=Array(t);++a<t;)r[a]=e(a);return r}function Ge(t){return t?t.slice(0,ha(t)+1).replace(nt,""):t}function Ye(t){return function(e){return t(e)}}function Ke(t,e){return ke(e,(function(e){return t[e]}))}function Je(t,e){return t.has(e)}function Ze(t,e){for(var a=-1,r=t.length;++a<r&&Fe(e,t[a],0)>-1;);return a}function Xe(t,e){for(var a=t.length;a--&&Fe(e,t[a],0)>-1;);return a}function Qe(t,e){for(var a=t.length,r=0;a--;)t[a]===e&&++r;return r}var ta=$e({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),ea=$e({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function aa(t){return"\\"+ie[t]}function ra(t){return Qt.test(t)}function na(t){var e=-1,a=Array(t.size);return t.forEach((function(t,r){a[++e]=[r,t]})),a}function ia(t,e){return function(a){return t(e(a))}}function oa(t,e){for(var a=-1,r=t.length,n=0,o=[];++a<r;){var l=t[a];l!==e&&l!==i||(t[a]=i,o[n++]=a)}return o}function la(t){var e=-1,a=Array(t.size);return t.forEach((function(t){a[++e]=t})),a}function sa(t){return ra(t)?function(t){var e=Zt.lastIndex=0;for(;Zt.test(t);)++e;return e}(t):Te(t)}function ca(t){return ra(t)?function(t){return t.match(Zt)||[]}(t):function(t){return t.split("")}(t)}function ha(t){for(var e=t.length;e--&&it.test(t.charAt(e)););return e}var ua=$e({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"});var da=function t(e){var it,wt=(e=null==e?he:da.defaults(he.Object(),e,da.pick(he,ee))).Array,Mt=e.Date,_t=e.Error,At=e.Function,Ht=e.Math,Vt=e.Object,Lt=e.RegExp,Bt=e.String,kt=e.TypeError,Ct=wt.prototype,St=At.prototype,Et=Vt.prototype,Ot=e["__core-js_shared__"],Tt=St.toString,Dt=Et.hasOwnProperty,jt=0,Ft=(it=/[^.]+$/.exec(Ot&&Ot.keys&&Ot.keys.IE_PROTO||""))?"Symbol(src)_1."+it:"",It=Et.toString,Pt=Tt.call(Vt),Rt=he._,Nt=Lt("^"+Tt.call(Dt).replace(at,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$t=pe?e.Buffer:a,Ut=e.Symbol,Wt=e.Uint8Array,qt=$t?$t.allocUnsafe:a,Gt=ia(Vt.getPrototypeOf,Vt),Yt=Vt.create,Zt=Et.propertyIsEnumerable,Qt=Ct.splice,ie=Ut?Ut.isConcatSpreadable:a,se=Ut?Ut.iterator:a,ce=Ut?Ut.toStringTag:a,ue=function(){try{var t=di(Vt,"defineProperty");return t({},"",{}),t}catch(e){}}(),de=e.clearTimeout!==he.clearTimeout&&e.clearTimeout,me=Mt&&Mt.now!==he.Date.now&&Mt.now,ve=e.setTimeout!==he.setTimeout&&e.setTimeout,Te=Ht.ceil,$e=Ht.floor,pa=Vt.getOwnPropertySymbols,ma=$t?$t.isBuffer:a,va=e.isFinite,fa=Ct.join,ya=ia(Vt.keys,Vt),ga=Ht.max,ba=Ht.min,za=Mt.now,xa=e.parseInt,wa=Ht.random,Ma=Ct.reverse,_a=di(e,"DataView"),Aa=di(e,"Map"),Ha=di(e,"Promise"),Va=di(e,"Set"),La=di(e,"WeakMap"),Ba=di(Vt,"create"),ka=La&&new La,Ca={},Sa=Ni(_a),Ea=Ni(Aa),Oa=Ni(Ha),Ta=Ni(Va),Da=Ni(La),ja=Ut?Ut.prototype:a,Fa=ja?ja.valueOf:a,Ia=ja?ja.toString:a;function Pa(t){if(ol(t)&&!Ko(t)&&!(t instanceof Ua)){if(t instanceof $a)return t;if(Dt.call(t,"__wrapped__"))return $i(t)}return new $a(t)}var Ra=function(){function t(){}return function(e){if(!il(e))return{};if(Yt)return Yt(e);t.prototype=e;var r=new t;return t.prototype=a,r}}();function Na(){}function $a(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=a}function Ua(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=m,this.__views__=[]}function Wa(t){var e=-1,a=null==t?0:t.length;for(this.clear();++e<a;){var r=t[e];this.set(r[0],r[1])}}function qa(t){var e=-1,a=null==t?0:t.length;for(this.clear();++e<a;){var r=t[e];this.set(r[0],r[1])}}function Ga(t){var e=-1,a=null==t?0:t.length;for(this.clear();++e<a;){var r=t[e];this.set(r[0],r[1])}}function Ya(t){var e=-1,a=null==t?0:t.length;for(this.__data__=new Ga;++e<a;)this.add(t[e])}function Ka(t){var e=this.__data__=new qa(t);this.size=e.size}function Ja(t,e){var a=Ko(t),r=!a&&Yo(t),n=!a&&!r&&Qo(t),i=!a&&!r&&!n&&ml(t),o=a||r||n||i,l=o?qe(t.length,Bt):[],s=l.length;for(var c in t)!e&&!Dt.call(t,c)||o&&("length"==c||n&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||bi(c,s))||l.push(c);return l}function Za(t){var e=t.length;return e?t[Yr(0,e-1)]:a}function Xa(t,e){return Di(kn(t),lr(e,0,t.length))}function Qa(t){return Di(kn(t))}function tr(t,e,r){(r!==a&&!Wo(t[e],r)||r===a&&!(e in t))&&ir(t,e,r)}function er(t,e,r){var n=t[e];Dt.call(t,e)&&Wo(n,r)&&(r!==a||e in t)||ir(t,e,r)}function ar(t,e){for(var a=t.length;a--;)if(Wo(t[a][0],e))return a;return-1}function rr(t,e,a,r){return dr(t,(function(t,n,i){e(r,t,a(t),i)})),r}function nr(t,e){return t&&Cn(e,Dl(e),t)}function ir(t,e,a){"__proto__"==e&&ue?ue(t,e,{configurable:!0,enumerable:!0,value:a,writable:!0}):t[e]=a}function or(t,e){for(var r=-1,n=e.length,i=wt(n),o=null==t;++r<n;)i[r]=o?a:Cl(t,e[r]);return i}function lr(t,e,r){return t==t&&(r!==a&&(t=t<=r?t:r),e!==a&&(t=t>=e?t:e)),t}function sr(t,e,r,n,i,o){var l,s=1&e,c=2&e,h=4&e;if(r&&(l=i?r(t,n,i,o):r(t)),l!==a)return l;if(!il(t))return t;var u=Ko(t);if(u){if(l=function(t){var e=t.length,a=new t.constructor(e);e&&"string"==typeof t[0]&&Dt.call(t,"index")&&(a.index=t.index,a.input=t.input);return a}(t),!s)return kn(t,l)}else{var d=vi(t),p=d==x||d==w;if(Qo(t))return _n(t,s);if(d==A||d==f||p&&!i){if(l=c||p?{}:yi(t),!s)return c?function(t,e){return Cn(t,mi(t),e)}(t,function(t,e){return t&&Cn(e,jl(e),t)}(l,t)):function(t,e){return Cn(t,pi(t),e)}(t,nr(l,t))}else{if(!ne[d])return i?t:{};l=function(t,e,a){var r=t.constructor;switch(e){case S:return An(t);case g:case b:return new r(+t);case E:return function(t,e){var a=e?An(t.buffer):t.buffer;return new t.constructor(a,t.byteOffset,t.byteLength)}(t,a);case O:case T:case D:case j:case F:case I:case P:case R:case N:return Hn(t,a);case M:return new r;case _:case B:return new r(t);case V:return function(t){var e=new t.constructor(t.source,pt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case L:return new r;case k:return n=t,Fa?Vt(Fa.call(n)):{}}var n}(t,d,s)}}o||(o=new Ka);var m=o.get(t);if(m)return m;o.set(t,l),ul(t)?t.forEach((function(a){l.add(sr(a,e,r,a,t,o))})):ll(t)&&t.forEach((function(a,n){l.set(n,sr(a,e,r,n,t,o))}));var v=u?a:(h?c?ii:ni:c?jl:Dl)(t);return _e(v||t,(function(a,n){v&&(a=t[n=a]),er(l,n,sr(a,e,r,n,t,o))})),l}function cr(t,e,r){var n=r.length;if(null==t)return!n;for(t=Vt(t);n--;){var i=r[n],o=e[i],l=t[i];if(l===a&&!(i in t)||!o(l))return!1}return!0}function hr(t,e,n){if("function"!=typeof t)throw new kt(r);return Si((function(){t.apply(a,n)}),e)}function ur(t,e,a,r){var n=-1,i=Le,o=!0,l=t.length,s=[],c=e.length;if(!l)return s;a&&(e=ke(e,Ye(a))),r?(i=Be,o=!1):e.length>=200&&(i=Je,o=!1,e=new Ya(e));t:for(;++n<l;){var h=t[n],u=null==a?h:a(h);if(h=r||0!==h?h:0,o&&u==u){for(var d=c;d--;)if(e[d]===u)continue t;s.push(h)}else i(e,u,r)||s.push(h)}return s}Pa.templateSettings={escape:J,evaluate:Z,interpolate:X,variable:"",imports:{_:Pa}},Pa.prototype=Na.prototype,Pa.prototype.constructor=Pa,$a.prototype=Ra(Na.prototype),$a.prototype.constructor=$a,Ua.prototype=Ra(Na.prototype),Ua.prototype.constructor=Ua,Wa.prototype.clear=function(){this.__data__=Ba?Ba(null):{},this.size=0},Wa.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Wa.prototype.get=function(t){var e=this.__data__;if(Ba){var r=e[t];return r===n?a:r}return Dt.call(e,t)?e[t]:a},Wa.prototype.has=function(t){var e=this.__data__;return Ba?e[t]!==a:Dt.call(e,t)},Wa.prototype.set=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Ba&&e===a?n:e,this},qa.prototype.clear=function(){this.__data__=[],this.size=0},qa.prototype.delete=function(t){var e=this.__data__,a=ar(e,t);return!(a<0)&&(a==e.length-1?e.pop():Qt.call(e,a,1),--this.size,!0)},qa.prototype.get=function(t){var e=this.__data__,r=ar(e,t);return r<0?a:e[r][1]},qa.prototype.has=function(t){return ar(this.__data__,t)>-1},qa.prototype.set=function(t,e){var a=this.__data__,r=ar(a,t);return r<0?(++this.size,a.push([t,e])):a[r][1]=e,this},Ga.prototype.clear=function(){this.size=0,this.__data__={hash:new Wa,map:new(Aa||qa),string:new Wa}},Ga.prototype.delete=function(t){var e=hi(this,t).delete(t);return this.size-=e?1:0,e},Ga.prototype.get=function(t){return hi(this,t).get(t)},Ga.prototype.has=function(t){return hi(this,t).has(t)},Ga.prototype.set=function(t,e){var a=hi(this,t),r=a.size;return a.set(t,e),this.size+=a.size==r?0:1,this},Ya.prototype.add=Ya.prototype.push=function(t){return this.__data__.set(t,n),this},Ya.prototype.has=function(t){return this.__data__.has(t)},Ka.prototype.clear=function(){this.__data__=new qa,this.size=0},Ka.prototype.delete=function(t){var e=this.__data__,a=e.delete(t);return this.size=e.size,a},Ka.prototype.get=function(t){return this.__data__.get(t)},Ka.prototype.has=function(t){return this.__data__.has(t)},Ka.prototype.set=function(t,e){var a=this.__data__;if(a instanceof qa){var r=a.__data__;if(!Aa||r.length<199)return r.push([t,e]),this.size=++a.size,this;a=this.__data__=new Ga(r)}return a.set(t,e),this.size=a.size,this};var dr=On(zr),pr=On(xr,!0);function mr(t,e){var a=!0;return dr(t,(function(t,r,n){return a=!!e(t,r,n)})),a}function vr(t,e,r){for(var n=-1,i=t.length;++n<i;){var o=t[n],l=e(o);if(null!=l&&(s===a?l==l&&!pl(l):r(l,s)))var s=l,c=o}return c}function fr(t,e){var a=[];return dr(t,(function(t,r,n){e(t,r,n)&&a.push(t)})),a}function yr(t,e,a,r,n){var i=-1,o=t.length;for(a||(a=gi),n||(n=[]);++i<o;){var l=t[i];e>0&&a(l)?e>1?yr(l,e-1,a,r,n):Ce(n,l):r||(n[n.length]=l)}return n}var gr=Tn(),br=Tn(!0);function zr(t,e){return t&&gr(t,e,Dl)}function xr(t,e){return t&&br(t,e,Dl)}function wr(t,e){return Ve(e,(function(e){return al(t[e])}))}function Mr(t,e){for(var r=0,n=(e=zn(e,t)).length;null!=t&&r<n;)t=t[Ri(e[r++])];return r&&r==n?t:a}function _r(t,e,a){var r=e(t);return Ko(t)?r:Ce(r,a(t))}function Ar(t){return null==t?t===a?"[object Undefined]":"[object Null]":ce&&ce in Vt(t)?function(t){var e=Dt.call(t,ce),r=t[ce];try{t[ce]=a;var n=!0}catch(o){}var i=It.call(t);n&&(e?t[ce]=r:delete t[ce]);return i}(t):function(t){return It.call(t)}(t)}function Hr(t,e){return t>e}function Vr(t,e){return null!=t&&Dt.call(t,e)}function Lr(t,e){return null!=t&&e in Vt(t)}function Br(t,e,r){for(var n=r?Be:Le,i=t[0].length,o=t.length,l=o,s=wt(o),c=1/0,h=[];l--;){var u=t[l];l&&e&&(u=ke(u,Ye(e))),c=ba(u.length,c),s[l]=!r&&(e||i>=120&&u.length>=120)?new Ya(l&&u):a}u=t[0];var d=-1,p=s[0];t:for(;++d<i&&h.length<c;){var m=u[d],v=e?e(m):m;if(m=r||0!==m?m:0,!(p?Je(p,v):n(h,v,r))){for(l=o;--l;){var f=s[l];if(!(f?Je(f,v):n(t[l],v,r)))continue t}p&&p.push(v),h.push(m)}}return h}function kr(t,e,r){var n=null==(t=Li(t,e=zn(e,t)))?t:t[Ri(to(e))];return null==n?a:we(n,t,r)}function Cr(t){return ol(t)&&Ar(t)==f}function Sr(t,e,r,n,i){return t===e||(null==t||null==e||!ol(t)&&!ol(e)?t!=t&&e!=e:function(t,e,r,n,i,o){var l=Ko(t),s=Ko(e),c=l?y:vi(t),h=s?y:vi(e),u=(c=c==f?A:c)==A,d=(h=h==f?A:h)==A,p=c==h;if(p&&Qo(t)){if(!Qo(e))return!1;l=!0,u=!1}if(p&&!u)return o||(o=new Ka),l||ml(t)?ai(t,e,r,n,i,o):function(t,e,a,r,n,i,o){switch(a){case E:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case S:return!(t.byteLength!=e.byteLength||!i(new Wt(t),new Wt(e)));case g:case b:case _:return Wo(+t,+e);case z:return t.name==e.name&&t.message==e.message;case V:case B:return t==e+"";case M:var l=na;case L:var s=1&r;if(l||(l=la),t.size!=e.size&&!s)return!1;var c=o.get(t);if(c)return c==e;r|=2,o.set(t,e);var h=ai(l(t),l(e),r,n,i,o);return o.delete(t),h;case k:if(Fa)return Fa.call(t)==Fa.call(e)}return!1}(t,e,c,r,n,i,o);if(!(1&r)){var m=u&&Dt.call(t,"__wrapped__"),v=d&&Dt.call(e,"__wrapped__");if(m||v){var x=m?t.value():t,w=v?e.value():e;return o||(o=new Ka),i(x,w,r,n,o)}}if(!p)return!1;return o||(o=new Ka),function(t,e,r,n,i,o){var l=1&r,s=ni(t),c=s.length,h=ni(e).length;if(c!=h&&!l)return!1;var u=c;for(;u--;){var d=s[u];if(!(l?d in e:Dt.call(e,d)))return!1}var p=o.get(t),m=o.get(e);if(p&&m)return p==e&&m==t;var v=!0;o.set(t,e),o.set(e,t);var f=l;for(;++u<c;){var y=t[d=s[u]],g=e[d];if(n)var b=l?n(g,y,d,e,t,o):n(y,g,d,t,e,o);if(!(b===a?y===g||i(y,g,r,n,o):b)){v=!1;break}f||(f="constructor"==d)}if(v&&!f){var z=t.constructor,x=e.constructor;z==x||!("constructor"in t)||!("constructor"in e)||"function"==typeof z&&z instanceof z&&"function"==typeof x&&x instanceof x||(v=!1)}return o.delete(t),o.delete(e),v}(t,e,r,n,i,o)}(t,e,r,n,Sr,i))}function Er(t,e,r,n){var i=r.length,o=i,l=!n;if(null==t)return!o;for(t=Vt(t);i--;){var s=r[i];if(l&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++i<o;){var c=(s=r[i])[0],h=t[c],u=s[1];if(l&&s[2]){if(h===a&&!(c in t))return!1}else{var d=new Ka;if(n)var p=n(h,u,c,t,e,d);if(!(p===a?Sr(u,h,3,n,d):p))return!1}}return!0}function Or(t){return!(!il(t)||(e=t,Ft&&Ft in e))&&(al(t)?Nt:ft).test(Ni(t));var e}function Tr(t){return"function"==typeof t?t:null==t?ss:"object"==typeof t?Ko(t)?Rr(t[0],t[1]):Pr(t):ys(t)}function Dr(t){if(!_i(t))return ya(t);var e=[];for(var a in Vt(t))Dt.call(t,a)&&"constructor"!=a&&e.push(a);return e}function jr(t){if(!il(t))return function(t){var e=[];if(null!=t)for(var a in Vt(t))e.push(a);return e}(t);var e=_i(t),a=[];for(var r in t)("constructor"!=r||!e&&Dt.call(t,r))&&a.push(r);return a}function Fr(t,e){return t<e}function Ir(t,e){var a=-1,r=Zo(t)?wt(t.length):[];return dr(t,(function(t,n,i){r[++a]=e(t,n,i)})),r}function Pr(t){var e=ui(t);return 1==e.length&&e[0][2]?Hi(e[0][0],e[0][1]):function(a){return a===t||Er(a,t,e)}}function Rr(t,e){return xi(t)&&Ai(e)?Hi(Ri(t),e):function(r){var n=Cl(r,t);return n===a&&n===e?Sl(r,t):Sr(e,n,3)}}function Nr(t,e,r,n,i){t!==e&&gr(e,(function(o,l){if(i||(i=new Ka),il(o))!function(t,e,r,n,i,o,l){var s=ki(t,r),c=ki(e,r),h=l.get(c);if(h)return void tr(t,r,h);var u=o?o(s,c,r+"",t,e,l):a,d=u===a;if(d){var p=Ko(c),m=!p&&Qo(c),v=!p&&!m&&ml(c);u=c,p||m||v?Ko(s)?u=s:Xo(s)?u=kn(s):m?(d=!1,u=_n(c,!0)):v?(d=!1,u=Hn(c,!0)):u=[]:cl(c)||Yo(c)?(u=s,Yo(s)?u=wl(s):il(s)&&!al(s)||(u=yi(c))):d=!1}d&&(l.set(c,u),i(u,c,n,o,l),l.delete(c));tr(t,r,u)}(t,e,l,r,Nr,n,i);else{var s=n?n(ki(t,l),o,l+"",t,e,i):a;s===a&&(s=o),tr(t,l,s)}}),jl)}function $r(t,e){var r=t.length;if(r)return bi(e+=e<0?r:0,r)?t[e]:a}function Ur(t,e,a){e=e.length?ke(e,(function(t){return Ko(t)?function(e){return Mr(e,1===t.length?t[0]:t)}:t})):[ss];var r=-1;return e=ke(e,Ye(ci())),function(t,e){var a=t.length;for(t.sort(e);a--;)t[a]=t[a].value;return t}(Ir(t,(function(t,a,n){return{criteria:ke(e,(function(e){return e(t)})),index:++r,value:t}})),(function(t,e){return function(t,e,a){var r=-1,n=t.criteria,i=e.criteria,o=n.length,l=a.length;for(;++r<o;){var s=Vn(n[r],i[r]);if(s)return r>=l?s:s*("desc"==a[r]?-1:1)}return t.index-e.index}(t,e,a)}))}function Wr(t,e,a){for(var r=-1,n=e.length,i={};++r<n;){var o=e[r],l=Mr(t,o);a(l,o)&&Qr(i,zn(o,t),l)}return i}function qr(t,e,a,r){var n=r?Ie:Fe,i=-1,o=e.length,l=t;for(t===e&&(e=kn(e)),a&&(l=ke(t,Ye(a)));++i<o;)for(var s=0,c=e[i],h=a?a(c):c;(s=n(l,h,s,r))>-1;)l!==t&&Qt.call(l,s,1),Qt.call(t,s,1);return t}function Gr(t,e){for(var a=t?e.length:0,r=a-1;a--;){var n=e[a];if(a==r||n!==i){var i=n;bi(n)?Qt.call(t,n,1):dn(t,n)}}return t}function Yr(t,e){return t+$e(wa()*(e-t+1))}function Kr(t,e){var a="";if(!t||e<1||e>d)return a;do{e%2&&(a+=t),(e=$e(e/2))&&(t+=t)}while(e);return a}function Jr(t,e){return Ei(Vi(t,e,ss),t+"")}function Zr(t){return Za(Wl(t))}function Xr(t,e){var a=Wl(t);return Di(a,lr(e,0,a.length))}function Qr(t,e,r,n){if(!il(t))return t;for(var i=-1,o=(e=zn(e,t)).length,l=o-1,s=t;null!=s&&++i<o;){var c=Ri(e[i]),h=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return t;if(i!=l){var u=s[c];(h=n?n(u,c,s):a)===a&&(h=il(u)?u:bi(e[i+1])?[]:{})}er(s,c,h),s=s[c]}return t}var tn=ka?function(t,e){return ka.set(t,e),t}:ss,en=ue?function(t,e){return ue(t,"toString",{configurable:!0,enumerable:!1,value:is(e),writable:!0})}:ss;function an(t){return Di(Wl(t))}function rn(t,e,a){var r=-1,n=t.length;e<0&&(e=-e>n?0:n+e),(a=a>n?n:a)<0&&(a+=n),n=e>a?0:a-e>>>0,e>>>=0;for(var i=wt(n);++r<n;)i[r]=t[r+e];return i}function nn(t,e){var a;return dr(t,(function(t,r,n){return!(a=e(t,r,n))})),!!a}function on(t,e,a){var r=0,n=null==t?r:t.length;if("number"==typeof e&&e==e&&n<=2147483647){for(;r<n;){var i=r+n>>>1,o=t[i];null!==o&&!pl(o)&&(a?o<=e:o<e)?r=i+1:n=i}return n}return ln(t,e,ss,a)}function ln(t,e,r,n){var i=0,o=null==t?0:t.length;if(0===o)return 0;for(var l=(e=r(e))!=e,s=null===e,c=pl(e),h=e===a;i<o;){var u=$e((i+o)/2),d=r(t[u]),p=d!==a,m=null===d,v=d==d,f=pl(d);if(l)var y=n||v;else y=h?v&&(n||p):s?v&&p&&(n||!m):c?v&&p&&!m&&(n||!f):!m&&!f&&(n?d<=e:d<e);y?i=u+1:o=u}return ba(o,4294967294)}function sn(t,e){for(var a=-1,r=t.length,n=0,i=[];++a<r;){var o=t[a],l=e?e(o):o;if(!a||!Wo(l,s)){var s=l;i[n++]=0===o?0:o}}return i}function cn(t){return"number"==typeof t?t:pl(t)?p:+t}function hn(t){if("string"==typeof t)return t;if(Ko(t))return ke(t,hn)+"";if(pl(t))return Ia?Ia.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function un(t,e,a){var r=-1,n=Le,i=t.length,o=!0,l=[],s=l;if(a)o=!1,n=Be;else if(i>=200){var c=e?null:Jn(t);if(c)return la(c);o=!1,n=Je,s=new Ya}else s=e?[]:l;t:for(;++r<i;){var h=t[r],u=e?e(h):h;if(h=a||0!==h?h:0,o&&u==u){for(var d=s.length;d--;)if(s[d]===u)continue t;e&&s.push(u),l.push(h)}else n(s,u,a)||(s!==l&&s.push(u),l.push(h))}return l}function dn(t,e){return null==(t=Li(t,e=zn(e,t)))||delete t[Ri(to(e))]}function pn(t,e,a,r){return Qr(t,e,a(Mr(t,e)),r)}function mn(t,e,a,r){for(var n=t.length,i=r?n:-1;(r?i--:++i<n)&&e(t[i],i,t););return a?rn(t,r?0:i,r?i+1:n):rn(t,r?i+1:0,r?n:i)}function vn(t,e){var a=t;return a instanceof Ua&&(a=a.value()),Se(e,(function(t,e){return e.func.apply(e.thisArg,Ce([t],e.args))}),a)}function fn(t,e,a){var r=t.length;if(r<2)return r?un(t[0]):[];for(var n=-1,i=wt(r);++n<r;)for(var o=t[n],l=-1;++l<r;)l!=n&&(i[n]=ur(i[n]||o,t[l],e,a));return un(yr(i,1),e,a)}function yn(t,e,r){for(var n=-1,i=t.length,o=e.length,l={};++n<i;){var s=n<o?e[n]:a;r(l,t[n],s)}return l}function gn(t){return Xo(t)?t:[]}function bn(t){return"function"==typeof t?t:ss}function zn(t,e){return Ko(t)?t:xi(t,e)?[t]:Pi(Ml(t))}var xn=Jr;function wn(t,e,r){var n=t.length;return r=r===a?n:r,!e&&r>=n?t:rn(t,e,r)}var Mn=de||function(t){return he.clearTimeout(t)};function _n(t,e){if(e)return t.slice();var a=t.length,r=qt?qt(a):new t.constructor(a);return t.copy(r),r}function An(t){var e=new t.constructor(t.byteLength);return new Wt(e).set(new Wt(t)),e}function Hn(t,e){var a=e?An(t.buffer):t.buffer;return new t.constructor(a,t.byteOffset,t.length)}function Vn(t,e){if(t!==e){var r=t!==a,n=null===t,i=t==t,o=pl(t),l=e!==a,s=null===e,c=e==e,h=pl(e);if(!s&&!h&&!o&&t>e||o&&l&&c&&!s&&!h||n&&l&&c||!r&&c||!i)return 1;if(!n&&!o&&!h&&t<e||h&&r&&i&&!n&&!o||s&&r&&i||!l&&i||!c)return-1}return 0}function Ln(t,e,a,r){for(var n=-1,i=t.length,o=a.length,l=-1,s=e.length,c=ga(i-o,0),h=wt(s+c),u=!r;++l<s;)h[l]=e[l];for(;++n<o;)(u||n<i)&&(h[a[n]]=t[n]);for(;c--;)h[l++]=t[n++];return h}function Bn(t,e,a,r){for(var n=-1,i=t.length,o=-1,l=a.length,s=-1,c=e.length,h=ga(i-l,0),u=wt(h+c),d=!r;++n<h;)u[n]=t[n];for(var p=n;++s<c;)u[p+s]=e[s];for(;++o<l;)(d||n<i)&&(u[p+a[o]]=t[n++]);return u}function kn(t,e){var a=-1,r=t.length;for(e||(e=wt(r));++a<r;)e[a]=t[a];return e}function Cn(t,e,r,n){var i=!r;r||(r={});for(var o=-1,l=e.length;++o<l;){var s=e[o],c=n?n(r[s],t[s],s,r,t):a;c===a&&(c=t[s]),i?ir(r,s,c):er(r,s,c)}return r}function Sn(t,e){return function(a,r){var n=Ko(a)?Me:rr,i=e?e():{};return n(a,t,ci(r,2),i)}}function En(t){return Jr((function(e,r){var n=-1,i=r.length,o=i>1?r[i-1]:a,l=i>2?r[2]:a;for(o=t.length>3&&"function"==typeof o?(i--,o):a,l&&zi(r[0],r[1],l)&&(o=i<3?a:o,i=1),e=Vt(e);++n<i;){var s=r[n];s&&t(e,s,n,o)}return e}))}function On(t,e){return function(a,r){if(null==a)return a;if(!Zo(a))return t(a,r);for(var n=a.length,i=e?n:-1,o=Vt(a);(e?i--:++i<n)&&!1!==r(o[i],i,o););return a}}function Tn(t){return function(e,a,r){for(var n=-1,i=Vt(e),o=r(e),l=o.length;l--;){var s=o[t?l:++n];if(!1===a(i[s],s,i))break}return e}}function Dn(t){return function(e){var r=ra(e=Ml(e))?ca(e):a,n=r?r[0]:e.charAt(0),i=r?wn(r,1).join(""):e.slice(1);return n[t]()+i}}function jn(t){return function(e){return Se(as(Yl(e).replace(Kt,"")),t,"")}}function Fn(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var a=Ra(t.prototype),r=t.apply(a,e);return il(r)?r:a}}function In(t){return function(e,r,n){var i=Vt(e);if(!Zo(e)){var o=ci(r,3);e=Dl(e),r=function(t){return o(i[t],t,i)}}var l=t(e,r,n);return l>-1?i[o?e[l]:l]:a}}function Pn(t){return ri((function(e){var n=e.length,i=n,o=$a.prototype.thru;for(t&&e.reverse();i--;){var l=e[i];if("function"!=typeof l)throw new kt(r);if(o&&!s&&"wrapper"==li(l))var s=new $a([],!0)}for(i=s?i:n;++i<n;){var c=li(l=e[i]),h="wrapper"==c?oi(l):a;s=h&&wi(h[0])&&424==h[1]&&!h[4].length&&1==h[9]?s[li(h[0])].apply(s,h[3]):1==l.length&&wi(l)?s[c]():s.thru(l)}return function(){var t=arguments,a=t[0];if(s&&1==t.length&&Ko(a))return s.plant(a).value();for(var r=0,i=n?e[r].apply(this,t):a;++r<n;)i=e[r].call(this,i);return i}}))}function Rn(t,e,r,n,i,o,l,s,h,u){var d=e&c,p=1&e,m=2&e,v=24&e,f=512&e,y=m?a:Fn(t);return function a(){for(var c=arguments.length,g=wt(c),b=c;b--;)g[b]=arguments[b];if(v)var z=si(a),x=Qe(g,z);if(n&&(g=Ln(g,n,i,v)),o&&(g=Bn(g,o,l,v)),c-=x,v&&c<u){var w=oa(g,z);return Yn(t,e,Rn,a.placeholder,r,g,w,s,h,u-c)}var M=p?r:this,_=m?M[t]:t;return c=g.length,s?g=Bi(g,s):f&&c>1&&g.reverse(),d&&h<c&&(g.length=h),this&&this!==he&&this instanceof a&&(_=y||Fn(_)),_.apply(M,g)}}function Nn(t,e){return function(a,r){return function(t,e,a,r){return zr(t,(function(t,n,i){e(r,a(t),n,i)})),r}(a,t,e(r),{})}}function $n(t,e){return function(r,n){var i;if(r===a&&n===a)return e;if(r!==a&&(i=r),n!==a){if(i===a)return n;"string"==typeof r||"string"==typeof n?(r=hn(r),n=hn(n)):(r=cn(r),n=cn(n)),i=t(r,n)}return i}}function Un(t){return ri((function(e){return e=ke(e,Ye(ci())),Jr((function(a){var r=this;return t(e,(function(t){return we(t,r,a)}))}))}))}function Wn(t,e){var r=(e=e===a?" ":hn(e)).length;if(r<2)return r?Kr(e,t):e;var n=Kr(e,Te(t/sa(e)));return ra(e)?wn(ca(n),0,t).join(""):n.slice(0,t)}function qn(t){return function(e,r,n){return n&&"number"!=typeof n&&zi(e,r,n)&&(r=n=a),e=gl(e),r===a?(r=e,e=0):r=gl(r),function(t,e,a,r){for(var n=-1,i=ga(Te((e-t)/(a||1)),0),o=wt(i);i--;)o[r?i:++n]=t,t+=a;return o}(e,r,n=n===a?e<r?1:-1:gl(n),t)}}function Gn(t){return function(e,a){return"string"==typeof e&&"string"==typeof a||(e=xl(e),a=xl(a)),t(e,a)}}function Yn(t,e,r,n,i,o,c,h,u,d){var p=8&e;e|=p?l:s,4&(e&=~(p?s:l))||(e&=-4);var m=[t,e,i,p?o:a,p?c:a,p?a:o,p?a:c,h,u,d],v=r.apply(a,m);return wi(t)&&Ci(v,m),v.placeholder=n,Oi(v,t,e)}function Kn(t){var e=Ht[t];return function(t,a){if(t=xl(t),(a=null==a?0:ba(bl(a),292))&&va(t)){var r=(Ml(t)+"e").split("e");return+((r=(Ml(e(r[0]+"e"+(+r[1]+a)))+"e").split("e"))[0]+"e"+(+r[1]-a))}return e(t)}}var Jn=Va&&1/la(new Va([,-0]))[1]==u?function(t){return new Va(t)}:ps;function Zn(t){return function(e){var a=vi(e);return a==M?na(e):a==L?function(t){var e=-1,a=Array(t.size);return t.forEach((function(t){a[++e]=[t,t]})),a}(e):function(t,e){return ke(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function Xn(t,e,n,u,d,p,m,v){var f=2&e;if(!f&&"function"!=typeof t)throw new kt(r);var y=u?u.length:0;if(y||(e&=-97,u=d=a),m=m===a?m:ga(bl(m),0),v=v===a?v:bl(v),y-=d?d.length:0,e&s){var g=u,b=d;u=d=a}var z=f?a:oi(t),x=[t,e,n,u,d,g,b,p,m,v];if(z&&function(t,e){var a=t[1],r=e[1],n=a|r,o=n<131,l=r==c&&8==a||r==c&&a==h&&t[7].length<=e[8]||384==r&&e[7].length<=e[8]&&8==a;if(!o&&!l)return t;1&r&&(t[2]=e[2],n|=1&a?0:4);var s=e[3];if(s){var u=t[3];t[3]=u?Ln(u,s,e[4]):s,t[4]=u?oa(t[3],i):e[4]}(s=e[5])&&(u=t[5],t[5]=u?Bn(u,s,e[6]):s,t[6]=u?oa(t[5],i):e[6]);(s=e[7])&&(t[7]=s);r&c&&(t[8]=null==t[8]?e[8]:ba(t[8],e[8]));null==t[9]&&(t[9]=e[9]);t[0]=e[0],t[1]=n}(x,z),t=x[0],e=x[1],n=x[2],u=x[3],d=x[4],!(v=x[9]=x[9]===a?f?0:t.length:ga(x[9]-y,0))&&24&e&&(e&=-25),e&&1!=e)w=8==e||e==o?function(t,e,r){var n=Fn(t);return function i(){for(var o=arguments.length,l=wt(o),s=o,c=si(i);s--;)l[s]=arguments[s];var h=o<3&&l[0]!==c&&l[o-1]!==c?[]:oa(l,c);return(o-=h.length)<r?Yn(t,e,Rn,i.placeholder,a,l,h,a,a,r-o):we(this&&this!==he&&this instanceof i?n:t,this,l)}}(t,e,v):e!=l&&33!=e||d.length?Rn.apply(a,x):function(t,e,a,r){var n=1&e,i=Fn(t);return function e(){for(var o=-1,l=arguments.length,s=-1,c=r.length,h=wt(c+l),u=this&&this!==he&&this instanceof e?i:t;++s<c;)h[s]=r[s];for(;l--;)h[s++]=arguments[++o];return we(u,n?a:this,h)}}(t,e,n,u);else var w=function(t,e,a){var r=1&e,n=Fn(t);return function e(){return(this&&this!==he&&this instanceof e?n:t).apply(r?a:this,arguments)}}(t,e,n);return Oi((z?tn:Ci)(w,x),t,e)}function Qn(t,e,r,n){return t===a||Wo(t,Et[r])&&!Dt.call(n,r)?e:t}function ti(t,e,r,n,i,o){return il(t)&&il(e)&&(o.set(e,t),Nr(t,e,a,ti,o),o.delete(e)),t}function ei(t){return cl(t)?a:t}function ai(t,e,r,n,i,o){var l=1&r,s=t.length,c=e.length;if(s!=c&&!(l&&c>s))return!1;var h=o.get(t),u=o.get(e);if(h&&u)return h==e&&u==t;var d=-1,p=!0,m=2&r?new Ya:a;for(o.set(t,e),o.set(e,t);++d<s;){var v=t[d],f=e[d];if(n)var y=l?n(f,v,d,e,t,o):n(v,f,d,t,e,o);if(y!==a){if(y)continue;p=!1;break}if(m){if(!Oe(e,(function(t,e){if(!Je(m,e)&&(v===t||i(v,t,r,n,o)))return m.push(e)}))){p=!1;break}}else if(v!==f&&!i(v,f,r,n,o)){p=!1;break}}return o.delete(t),o.delete(e),p}function ri(t){return Ei(Vi(t,a,Ki),t+"")}function ni(t){return _r(t,Dl,pi)}function ii(t){return _r(t,jl,mi)}var oi=ka?function(t){return ka.get(t)}:ps;function li(t){for(var e=t.name+"",a=Ca[e],r=Dt.call(Ca,e)?a.length:0;r--;){var n=a[r],i=n.func;if(null==i||i==t)return n.name}return e}function si(t){return(Dt.call(Pa,"placeholder")?Pa:t).placeholder}function ci(){var t=Pa.iteratee||cs;return t=t===cs?Tr:t,arguments.length?t(arguments[0],arguments[1]):t}function hi(t,e){var a=t.__data__;return function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}(e)?a["string"==typeof e?"string":"hash"]:a.map}function ui(t){for(var e=Dl(t),a=e.length;a--;){var r=e[a],n=t[r];e[a]=[r,n,Ai(n)]}return e}function di(t,e){var r=function(t,e){return null==t?a:t[e]}(t,e);return Or(r)?r:a}var pi=pa?function(t){return null==t?[]:(t=Vt(t),Ve(pa(t),(function(e){return Zt.call(t,e)})))}:zs,mi=pa?function(t){for(var e=[];t;)Ce(e,pi(t)),t=Gt(t);return e}:zs,vi=Ar;function fi(t,e,a){for(var r=-1,n=(e=zn(e,t)).length,i=!1;++r<n;){var o=Ri(e[r]);if(!(i=null!=t&&a(t,o)))break;t=t[o]}return i||++r!=n?i:!!(n=null==t?0:t.length)&&nl(n)&&bi(o,n)&&(Ko(t)||Yo(t))}function yi(t){return"function"!=typeof t.constructor||_i(t)?{}:Ra(Gt(t))}function gi(t){return Ko(t)||Yo(t)||!!(ie&&t&&t[ie])}function bi(t,e){var a=typeof t;return!!(e=null==e?d:e)&&("number"==a||"symbol"!=a&&gt.test(t))&&t>-1&&t%1==0&&t<e}function zi(t,e,a){if(!il(a))return!1;var r=typeof e;return!!("number"==r?Zo(a)&&bi(e,a.length):"string"==r&&e in a)&&Wo(a[e],t)}function xi(t,e){if(Ko(t))return!1;var a=typeof t;return!("number"!=a&&"symbol"!=a&&"boolean"!=a&&null!=t&&!pl(t))||(tt.test(t)||!Q.test(t)||null!=e&&t in Vt(e))}function wi(t){var e=li(t),a=Pa[e];if("function"!=typeof a||!(e in Ua.prototype))return!1;if(t===a)return!0;var r=oi(a);return!!r&&t===r[0]}(_a&&vi(new _a(new ArrayBuffer(1)))!=E||Aa&&vi(new Aa)!=M||Ha&&vi(Ha.resolve())!=H||Va&&vi(new Va)!=L||La&&vi(new La)!=C)&&(vi=function(t){var e=Ar(t),r=e==A?t.constructor:a,n=r?Ni(r):"";if(n)switch(n){case Sa:return E;case Ea:return M;case Oa:return H;case Ta:return L;case Da:return C}return e});var Mi=Ot?al:xs;function _i(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Et)}function Ai(t){return t==t&&!il(t)}function Hi(t,e){return function(r){return null!=r&&(r[t]===e&&(e!==a||t in Vt(r)))}}function Vi(t,e,r){return e=ga(e===a?t.length-1:e,0),function(){for(var a=arguments,n=-1,i=ga(a.length-e,0),o=wt(i);++n<i;)o[n]=a[e+n];n=-1;for(var l=wt(e+1);++n<e;)l[n]=a[n];return l[e]=r(o),we(t,this,l)}}function Li(t,e){return e.length<2?t:Mr(t,rn(e,0,-1))}function Bi(t,e){for(var r=t.length,n=ba(e.length,r),i=kn(t);n--;){var o=e[n];t[n]=bi(o,r)?i[o]:a}return t}function ki(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var Ci=Ti(tn),Si=ve||function(t,e){return he.setTimeout(t,e)},Ei=Ti(en);function Oi(t,e,a){var r=e+"";return Ei(t,function(t,e){var a=e.length;if(!a)return t;var r=a-1;return e[r]=(a>1?"& ":"")+e[r],e=e.join(a>2?", ":" "),t.replace(ot,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return _e(v,(function(a){var r="_."+a[0];e&a[1]&&!Le(t,r)&&t.push(r)})),t.sort()}(function(t){var e=t.match(lt);return e?e[1].split(st):[]}(r),a)))}function Ti(t){var e=0,r=0;return function(){var n=za(),i=16-(n-r);if(r=n,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(a,arguments)}}function Di(t,e){var r=-1,n=t.length,i=n-1;for(e=e===a?n:e;++r<e;){var o=Yr(r,i),l=t[o];t[o]=t[r],t[r]=l}return t.length=e,t}var ji,Fi,Ii,Pi=(ji=function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(et,(function(t,a,r,n){e.push(r?n.replace(ut,"$1"):a||t)})),e},Fi=Io(ji,(function(t){return 500===Ii.size&&Ii.clear(),t})),Ii=Fi.cache,Fi);function Ri(t){if("string"==typeof t||pl(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Ni(t){if(null!=t){try{return Tt.call(t)}catch(e){}try{return t+""}catch(e){}}return""}function $i(t){if(t instanceof Ua)return t.clone();var e=new $a(t.__wrapped__,t.__chain__);return e.__actions__=kn(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Ui=Jr((function(t,e){return Xo(t)?ur(t,yr(e,1,Xo,!0)):[]})),Wi=Jr((function(t,e){var r=to(e);return Xo(r)&&(r=a),Xo(t)?ur(t,yr(e,1,Xo,!0),ci(r,2)):[]})),qi=Jr((function(t,e){var r=to(e);return Xo(r)&&(r=a),Xo(t)?ur(t,yr(e,1,Xo,!0),a,r):[]}));function Gi(t,e,a){var r=null==t?0:t.length;if(!r)return-1;var n=null==a?0:bl(a);return n<0&&(n=ga(r+n,0)),je(t,ci(e,3),n)}function Yi(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var i=n-1;return r!==a&&(i=bl(r),i=r<0?ga(n+i,0):ba(i,n-1)),je(t,ci(e,3),i,!0)}function Ki(t){return(null==t?0:t.length)?yr(t,1):[]}function Ji(t){return t&&t.length?t[0]:a}var Zi=Jr((function(t){var e=ke(t,gn);return e.length&&e[0]===t[0]?Br(e):[]})),Xi=Jr((function(t){var e=to(t),r=ke(t,gn);return e===to(r)?e=a:r.pop(),r.length&&r[0]===t[0]?Br(r,ci(e,2)):[]})),Qi=Jr((function(t){var e=to(t),r=ke(t,gn);return(e="function"==typeof e?e:a)&&r.pop(),r.length&&r[0]===t[0]?Br(r,a,e):[]}));function to(t){var e=null==t?0:t.length;return e?t[e-1]:a}var eo=Jr(ao);function ao(t,e){return t&&t.length&&e&&e.length?qr(t,e):t}var ro=ri((function(t,e){var a=null==t?0:t.length,r=or(t,e);return Gr(t,ke(e,(function(t){return bi(t,a)?+t:t})).sort(Vn)),r}));function no(t){return null==t?t:Ma.call(t)}var io=Jr((function(t){return un(yr(t,1,Xo,!0))})),oo=Jr((function(t){var e=to(t);return Xo(e)&&(e=a),un(yr(t,1,Xo,!0),ci(e,2))})),lo=Jr((function(t){var e=to(t);return e="function"==typeof e?e:a,un(yr(t,1,Xo,!0),a,e)}));function so(t){if(!t||!t.length)return[];var e=0;return t=Ve(t,(function(t){if(Xo(t))return e=ga(t.length,e),!0})),qe(e,(function(e){return ke(t,Ne(e))}))}function co(t,e){if(!t||!t.length)return[];var r=so(t);return null==e?r:ke(r,(function(t){return we(e,a,t)}))}var ho=Jr((function(t,e){return Xo(t)?ur(t,e):[]})),uo=Jr((function(t){return fn(Ve(t,Xo))})),po=Jr((function(t){var e=to(t);return Xo(e)&&(e=a),fn(Ve(t,Xo),ci(e,2))})),mo=Jr((function(t){var e=to(t);return e="function"==typeof e?e:a,fn(Ve(t,Xo),a,e)})),vo=Jr(so);var fo=Jr((function(t){var e=t.length,r=e>1?t[e-1]:a;return r="function"==typeof r?(t.pop(),r):a,co(t,r)}));function yo(t){var e=Pa(t);return e.__chain__=!0,e}function go(t,e){return e(t)}var bo=ri((function(t){var e=t.length,r=e?t[0]:0,n=this.__wrapped__,i=function(e){return or(e,t)};return!(e>1||this.__actions__.length)&&n instanceof Ua&&bi(r)?((n=n.slice(r,+r+(e?1:0))).__actions__.push({func:go,args:[i],thisArg:a}),new $a(n,this.__chain__).thru((function(t){return e&&!t.length&&t.push(a),t}))):this.thru(i)}));var zo=Sn((function(t,e,a){Dt.call(t,a)?++t[a]:ir(t,a,1)}));var xo=In(Gi),wo=In(Yi);function Mo(t,e){return(Ko(t)?_e:dr)(t,ci(e,3))}function _o(t,e){return(Ko(t)?Ae:pr)(t,ci(e,3))}var Ao=Sn((function(t,e,a){Dt.call(t,a)?t[a].push(e):ir(t,a,[e])}));var Ho=Jr((function(t,e,a){var r=-1,n="function"==typeof e,i=Zo(t)?wt(t.length):[];return dr(t,(function(t){i[++r]=n?we(e,t,a):kr(t,e,a)})),i})),Vo=Sn((function(t,e,a){ir(t,a,e)}));function Lo(t,e){return(Ko(t)?ke:Ir)(t,ci(e,3))}var Bo=Sn((function(t,e,a){t[a?0:1].push(e)}),(function(){return[[],[]]}));var ko=Jr((function(t,e){if(null==t)return[];var a=e.length;return a>1&&zi(t,e[0],e[1])?e=[]:a>2&&zi(e[0],e[1],e[2])&&(e=[e[0]]),Ur(t,yr(e,1),[])})),Co=me||function(){return he.Date.now()};function So(t,e,r){return e=r?a:e,e=t&&null==e?t.length:e,Xn(t,c,a,a,a,a,e)}function Eo(t,e){var n;if("function"!=typeof e)throw new kt(r);return t=bl(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=a),n}}var Oo=Jr((function(t,e,a){var r=1;if(a.length){var n=oa(a,si(Oo));r|=l}return Xn(t,r,e,a,n)})),To=Jr((function(t,e,a){var r=3;if(a.length){var n=oa(a,si(To));r|=l}return Xn(e,r,t,a,n)}));function Do(t,e,n){var i,o,l,s,c,h,u=0,d=!1,p=!1,m=!0;if("function"!=typeof t)throw new kt(r);function v(e){var r=i,n=o;return i=o=a,u=e,s=t.apply(n,r)}function f(t){return u=t,c=Si(g,e),d?v(t):s}function y(t){var r=t-h;return h===a||r>=e||r<0||p&&t-u>=l}function g(){var t=Co();if(y(t))return b(t);c=Si(g,function(t){var a=e-(t-h);return p?ba(a,l-(t-u)):a}(t))}function b(t){return c=a,m&&i?v(t):(i=o=a,s)}function z(){var t=Co(),r=y(t);if(i=arguments,o=this,h=t,r){if(c===a)return f(h);if(p)return Mn(c),c=Si(g,e),v(h)}return c===a&&(c=Si(g,e)),s}return e=xl(e)||0,il(n)&&(d=!!n.leading,l=(p="maxWait"in n)?ga(xl(n.maxWait)||0,e):l,m="trailing"in n?!!n.trailing:m),z.cancel=function(){c!==a&&Mn(c),u=0,i=h=o=c=a},z.flush=function(){return c===a?s:b(Co())},z}var jo=Jr((function(t,e){return hr(t,1,e)})),Fo=Jr((function(t,e,a){return hr(t,xl(e)||0,a)}));function Io(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new kt(r);var a=function(){var r=arguments,n=e?e.apply(this,r):r[0],i=a.cache;if(i.has(n))return i.get(n);var o=t.apply(this,r);return a.cache=i.set(n,o)||i,o};return a.cache=new(Io.Cache||Ga),a}function Po(t){if("function"!=typeof t)throw new kt(r);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Io.Cache=Ga;var Ro=xn((function(t,e){var a=(e=1==e.length&&Ko(e[0])?ke(e[0],Ye(ci())):ke(yr(e,1),Ye(ci()))).length;return Jr((function(r){for(var n=-1,i=ba(r.length,a);++n<i;)r[n]=e[n].call(this,r[n]);return we(t,this,r)}))})),No=Jr((function(t,e){var r=oa(e,si(No));return Xn(t,l,a,e,r)})),$o=Jr((function(t,e){var r=oa(e,si($o));return Xn(t,s,a,e,r)})),Uo=ri((function(t,e){return Xn(t,h,a,a,a,e)}));function Wo(t,e){return t===e||t!=t&&e!=e}var qo=Gn(Hr),Go=Gn((function(t,e){return t>=e})),Yo=Cr(function(){return arguments}())?Cr:function(t){return ol(t)&&Dt.call(t,"callee")&&!Zt.call(t,"callee")},Ko=wt.isArray,Jo=fe?Ye(fe):function(t){return ol(t)&&Ar(t)==S};function Zo(t){return null!=t&&nl(t.length)&&!al(t)}function Xo(t){return ol(t)&&Zo(t)}var Qo=ma||xs,tl=ye?Ye(ye):function(t){return ol(t)&&Ar(t)==b};function el(t){if(!ol(t))return!1;var e=Ar(t);return e==z||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!cl(t)}function al(t){if(!il(t))return!1;var e=Ar(t);return e==x||e==w||"[object AsyncFunction]"==e||"[object Proxy]"==e}function rl(t){return"number"==typeof t&&t==bl(t)}function nl(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=d}function il(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function ol(t){return null!=t&&"object"==typeof t}var ll=ge?Ye(ge):function(t){return ol(t)&&vi(t)==M};function sl(t){return"number"==typeof t||ol(t)&&Ar(t)==_}function cl(t){if(!ol(t)||Ar(t)!=A)return!1;var e=Gt(t);if(null===e)return!0;var a=Dt.call(e,"constructor")&&e.constructor;return"function"==typeof a&&a instanceof a&&Tt.call(a)==Pt}var hl=be?Ye(be):function(t){return ol(t)&&Ar(t)==V};var ul=ze?Ye(ze):function(t){return ol(t)&&vi(t)==L};function dl(t){return"string"==typeof t||!Ko(t)&&ol(t)&&Ar(t)==B}function pl(t){return"symbol"==typeof t||ol(t)&&Ar(t)==k}var ml=xe?Ye(xe):function(t){return ol(t)&&nl(t.length)&&!!re[Ar(t)]};var vl=Gn(Fr),fl=Gn((function(t,e){return t<=e}));function yl(t){if(!t)return[];if(Zo(t))return dl(t)?ca(t):kn(t);if(se&&t[se])return function(t){for(var e,a=[];!(e=t.next()).done;)a.push(e.value);return a}(t[se]());var e=vi(t);return(e==M?na:e==L?la:Wl)(t)}function gl(t){return t?(t=xl(t))===u||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function bl(t){var e=gl(t),a=e%1;return e==e?a?e-a:e:0}function zl(t){return t?lr(bl(t),0,m):0}function xl(t){if("number"==typeof t)return t;if(pl(t))return p;if(il(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=il(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Ge(t);var a=vt.test(t);return a||yt.test(t)?le(t.slice(2),a?2:8):mt.test(t)?p:+t}function wl(t){return Cn(t,jl(t))}function Ml(t){return null==t?"":hn(t)}var _l=En((function(t,e){if(_i(e)||Zo(e))Cn(e,Dl(e),t);else for(var a in e)Dt.call(e,a)&&er(t,a,e[a])})),Al=En((function(t,e){Cn(e,jl(e),t)})),Hl=En((function(t,e,a,r){Cn(e,jl(e),t,r)})),Vl=En((function(t,e,a,r){Cn(e,Dl(e),t,r)})),Ll=ri(or);var Bl=Jr((function(t,e){t=Vt(t);var r=-1,n=e.length,i=n>2?e[2]:a;for(i&&zi(e[0],e[1],i)&&(n=1);++r<n;)for(var o=e[r],l=jl(o),s=-1,c=l.length;++s<c;){var h=l[s],u=t[h];(u===a||Wo(u,Et[h])&&!Dt.call(t,h))&&(t[h]=o[h])}return t})),kl=Jr((function(t){return t.push(a,ti),we(Il,a,t)}));function Cl(t,e,r){var n=null==t?a:Mr(t,e);return n===a?r:n}function Sl(t,e){return null!=t&&fi(t,e,Lr)}var El=Nn((function(t,e,a){null!=e&&"function"!=typeof e.toString&&(e=It.call(e)),t[e]=a}),is(ss)),Ol=Nn((function(t,e,a){null!=e&&"function"!=typeof e.toString&&(e=It.call(e)),Dt.call(t,e)?t[e].push(a):t[e]=[a]}),ci),Tl=Jr(kr);function Dl(t){return Zo(t)?Ja(t):Dr(t)}function jl(t){return Zo(t)?Ja(t,!0):jr(t)}var Fl=En((function(t,e,a){Nr(t,e,a)})),Il=En((function(t,e,a,r){Nr(t,e,a,r)})),Pl=ri((function(t,e){var a={};if(null==t)return a;var r=!1;e=ke(e,(function(e){return e=zn(e,t),r||(r=e.length>1),e})),Cn(t,ii(t),a),r&&(a=sr(a,7,ei));for(var n=e.length;n--;)dn(a,e[n]);return a}));var Rl=ri((function(t,e){return null==t?{}:function(t,e){return Wr(t,e,(function(e,a){return Sl(t,a)}))}(t,e)}));function Nl(t,e){if(null==t)return{};var a=ke(ii(t),(function(t){return[t]}));return e=ci(e),Wr(t,a,(function(t,a){return e(t,a[0])}))}var $l=Zn(Dl),Ul=Zn(jl);function Wl(t){return null==t?[]:Ke(t,Dl(t))}var ql=jn((function(t,e,a){return e=e.toLowerCase(),t+(a?Gl(e):e)}));function Gl(t){return es(Ml(t).toLowerCase())}function Yl(t){return(t=Ml(t))&&t.replace(bt,ta).replace(Jt,"")}var Kl=jn((function(t,e,a){return t+(a?"-":"")+e.toLowerCase()})),Jl=jn((function(t,e,a){return t+(a?" ":"")+e.toLowerCase()})),Zl=Dn("toLowerCase");var Xl=jn((function(t,e,a){return t+(a?"_":"")+e.toLowerCase()}));var Ql=jn((function(t,e,a){return t+(a?" ":"")+es(e)}));var ts=jn((function(t,e,a){return t+(a?" ":"")+e.toUpperCase()})),es=Dn("toUpperCase");function as(t,e,r){return t=Ml(t),(e=r?a:e)===a?function(t){return te.test(t)}(t)?function(t){return t.match(Xt)||[]}(t):function(t){return t.match(ct)||[]}(t):t.match(e)||[]}var rs=Jr((function(t,e){try{return we(t,a,e)}catch(r){return el(r)?r:new _t(r)}})),ns=ri((function(t,e){return _e(e,(function(e){e=Ri(e),ir(t,e,Oo(t[e],t))})),t}));function is(t){return function(){return t}}var os=Pn(),ls=Pn(!0);function ss(t){return t}function cs(t){return Tr("function"==typeof t?t:sr(t,1))}var hs=Jr((function(t,e){return function(a){return kr(a,t,e)}})),us=Jr((function(t,e){return function(a){return kr(t,a,e)}}));function ds(t,e,a){var r=Dl(e),n=wr(e,r);null!=a||il(e)&&(n.length||!r.length)||(a=e,e=t,t=this,n=wr(e,Dl(e)));var i=!(il(a)&&"chain"in a&&!a.chain),o=al(t);return _e(n,(function(a){var r=e[a];t[a]=r,o&&(t.prototype[a]=function(){var e=this.__chain__;if(i||e){var a=t(this.__wrapped__),n=a.__actions__=kn(this.__actions__);return n.push({func:r,args:arguments,thisArg:t}),a.__chain__=e,a}return r.apply(t,Ce([this.value()],arguments))})})),t}function ps(){}var ms=Un(ke),vs=Un(He),fs=Un(Oe);function ys(t){return xi(t)?Ne(Ri(t)):function(t){return function(e){return Mr(e,t)}}(t)}var gs=qn(),bs=qn(!0);function zs(){return[]}function xs(){return!1}var ws=$n((function(t,e){return t+e}),0),Ms=Kn("ceil"),_s=$n((function(t,e){return t/e}),1),As=Kn("floor");var Hs,Vs=$n((function(t,e){return t*e}),1),Ls=Kn("round"),Bs=$n((function(t,e){return t-e}),0);return Pa.after=function(t,e){if("function"!=typeof e)throw new kt(r);return t=bl(t),function(){if(--t<1)return e.apply(this,arguments)}},Pa.ary=So,Pa.assign=_l,Pa.assignIn=Al,Pa.assignInWith=Hl,Pa.assignWith=Vl,Pa.at=Ll,Pa.before=Eo,Pa.bind=Oo,Pa.bindAll=ns,Pa.bindKey=To,Pa.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Ko(t)?t:[t]},Pa.chain=yo,Pa.chunk=function(t,e,r){e=(r?zi(t,e,r):e===a)?1:ga(bl(e),0);var n=null==t?0:t.length;if(!n||e<1)return[];for(var i=0,o=0,l=wt(Te(n/e));i<n;)l[o++]=rn(t,i,i+=e);return l},Pa.compact=function(t){for(var e=-1,a=null==t?0:t.length,r=0,n=[];++e<a;){var i=t[e];i&&(n[r++]=i)}return n},Pa.concat=function(){var t=arguments.length;if(!t)return[];for(var e=wt(t-1),a=arguments[0],r=t;r--;)e[r-1]=arguments[r];return Ce(Ko(a)?kn(a):[a],yr(e,1))},Pa.cond=function(t){var e=null==t?0:t.length,a=ci();return t=e?ke(t,(function(t){if("function"!=typeof t[1])throw new kt(r);return[a(t[0]),t[1]]})):[],Jr((function(a){for(var r=-1;++r<e;){var n=t[r];if(we(n[0],this,a))return we(n[1],this,a)}}))},Pa.conforms=function(t){return function(t){var e=Dl(t);return function(a){return cr(a,t,e)}}(sr(t,1))},Pa.constant=is,Pa.countBy=zo,Pa.create=function(t,e){var a=Ra(t);return null==e?a:nr(a,e)},Pa.curry=function t(e,r,n){var i=Xn(e,8,a,a,a,a,a,r=n?a:r);return i.placeholder=t.placeholder,i},Pa.curryRight=function t(e,r,n){var i=Xn(e,o,a,a,a,a,a,r=n?a:r);return i.placeholder=t.placeholder,i},Pa.debounce=Do,Pa.defaults=Bl,Pa.defaultsDeep=kl,Pa.defer=jo,Pa.delay=Fo,Pa.difference=Ui,Pa.differenceBy=Wi,Pa.differenceWith=qi,Pa.drop=function(t,e,r){var n=null==t?0:t.length;return n?rn(t,(e=r||e===a?1:bl(e))<0?0:e,n):[]},Pa.dropRight=function(t,e,r){var n=null==t?0:t.length;return n?rn(t,0,(e=n-(e=r||e===a?1:bl(e)))<0?0:e):[]},Pa.dropRightWhile=function(t,e){return t&&t.length?mn(t,ci(e,3),!0,!0):[]},Pa.dropWhile=function(t,e){return t&&t.length?mn(t,ci(e,3),!0):[]},Pa.fill=function(t,e,r,n){var i=null==t?0:t.length;return i?(r&&"number"!=typeof r&&zi(t,e,r)&&(r=0,n=i),function(t,e,r,n){var i=t.length;for((r=bl(r))<0&&(r=-r>i?0:i+r),(n=n===a||n>i?i:bl(n))<0&&(n+=i),n=r>n?0:zl(n);r<n;)t[r++]=e;return t}(t,e,r,n)):[]},Pa.filter=function(t,e){return(Ko(t)?Ve:fr)(t,ci(e,3))},Pa.flatMap=function(t,e){return yr(Lo(t,e),1)},Pa.flatMapDeep=function(t,e){return yr(Lo(t,e),u)},Pa.flatMapDepth=function(t,e,r){return r=r===a?1:bl(r),yr(Lo(t,e),r)},Pa.flatten=Ki,Pa.flattenDeep=function(t){return(null==t?0:t.length)?yr(t,u):[]},Pa.flattenDepth=function(t,e){return(null==t?0:t.length)?yr(t,e=e===a?1:bl(e)):[]},Pa.flip=function(t){return Xn(t,512)},Pa.flow=os,Pa.flowRight=ls,Pa.fromPairs=function(t){for(var e=-1,a=null==t?0:t.length,r={};++e<a;){var n=t[e];r[n[0]]=n[1]}return r},Pa.functions=function(t){return null==t?[]:wr(t,Dl(t))},Pa.functionsIn=function(t){return null==t?[]:wr(t,jl(t))},Pa.groupBy=Ao,Pa.initial=function(t){return(null==t?0:t.length)?rn(t,0,-1):[]},Pa.intersection=Zi,Pa.intersectionBy=Xi,Pa.intersectionWith=Qi,Pa.invert=El,Pa.invertBy=Ol,Pa.invokeMap=Ho,Pa.iteratee=cs,Pa.keyBy=Vo,Pa.keys=Dl,Pa.keysIn=jl,Pa.map=Lo,Pa.mapKeys=function(t,e){var a={};return e=ci(e,3),zr(t,(function(t,r,n){ir(a,e(t,r,n),t)})),a},Pa.mapValues=function(t,e){var a={};return e=ci(e,3),zr(t,(function(t,r,n){ir(a,r,e(t,r,n))})),a},Pa.matches=function(t){return Pr(sr(t,1))},Pa.matchesProperty=function(t,e){return Rr(t,sr(e,1))},Pa.memoize=Io,Pa.merge=Fl,Pa.mergeWith=Il,Pa.method=hs,Pa.methodOf=us,Pa.mixin=ds,Pa.negate=Po,Pa.nthArg=function(t){return t=bl(t),Jr((function(e){return $r(e,t)}))},Pa.omit=Pl,Pa.omitBy=function(t,e){return Nl(t,Po(ci(e)))},Pa.once=function(t){return Eo(2,t)},Pa.orderBy=function(t,e,r,n){return null==t?[]:(Ko(e)||(e=null==e?[]:[e]),Ko(r=n?a:r)||(r=null==r?[]:[r]),Ur(t,e,r))},Pa.over=ms,Pa.overArgs=Ro,Pa.overEvery=vs,Pa.overSome=fs,Pa.partial=No,Pa.partialRight=$o,Pa.partition=Bo,Pa.pick=Rl,Pa.pickBy=Nl,Pa.property=ys,Pa.propertyOf=function(t){return function(e){return null==t?a:Mr(t,e)}},Pa.pull=eo,Pa.pullAll=ao,Pa.pullAllBy=function(t,e,a){return t&&t.length&&e&&e.length?qr(t,e,ci(a,2)):t},Pa.pullAllWith=function(t,e,r){return t&&t.length&&e&&e.length?qr(t,e,a,r):t},Pa.pullAt=ro,Pa.range=gs,Pa.rangeRight=bs,Pa.rearg=Uo,Pa.reject=function(t,e){return(Ko(t)?Ve:fr)(t,Po(ci(e,3)))},Pa.remove=function(t,e){var a=[];if(!t||!t.length)return a;var r=-1,n=[],i=t.length;for(e=ci(e,3);++r<i;){var o=t[r];e(o,r,t)&&(a.push(o),n.push(r))}return Gr(t,n),a},Pa.rest=function(t,e){if("function"!=typeof t)throw new kt(r);return Jr(t,e=e===a?e:bl(e))},Pa.reverse=no,Pa.sampleSize=function(t,e,r){return e=(r?zi(t,e,r):e===a)?1:bl(e),(Ko(t)?Xa:Xr)(t,e)},Pa.set=function(t,e,a){return null==t?t:Qr(t,e,a)},Pa.setWith=function(t,e,r,n){return n="function"==typeof n?n:a,null==t?t:Qr(t,e,r,n)},Pa.shuffle=function(t){return(Ko(t)?Qa:an)(t)},Pa.slice=function(t,e,r){var n=null==t?0:t.length;return n?(r&&"number"!=typeof r&&zi(t,e,r)?(e=0,r=n):(e=null==e?0:bl(e),r=r===a?n:bl(r)),rn(t,e,r)):[]},Pa.sortBy=ko,Pa.sortedUniq=function(t){return t&&t.length?sn(t):[]},Pa.sortedUniqBy=function(t,e){return t&&t.length?sn(t,ci(e,2)):[]},Pa.split=function(t,e,r){return r&&"number"!=typeof r&&zi(t,e,r)&&(e=r=a),(r=r===a?m:r>>>0)?(t=Ml(t))&&("string"==typeof e||null!=e&&!hl(e))&&!(e=hn(e))&&ra(t)?wn(ca(t),0,r):t.split(e,r):[]},Pa.spread=function(t,e){if("function"!=typeof t)throw new kt(r);return e=null==e?0:ga(bl(e),0),Jr((function(a){var r=a[e],n=wn(a,0,e);return r&&Ce(n,r),we(t,this,n)}))},Pa.tail=function(t){var e=null==t?0:t.length;return e?rn(t,1,e):[]},Pa.take=function(t,e,r){return t&&t.length?rn(t,0,(e=r||e===a?1:bl(e))<0?0:e):[]},Pa.takeRight=function(t,e,r){var n=null==t?0:t.length;return n?rn(t,(e=n-(e=r||e===a?1:bl(e)))<0?0:e,n):[]},Pa.takeRightWhile=function(t,e){return t&&t.length?mn(t,ci(e,3),!1,!0):[]},Pa.takeWhile=function(t,e){return t&&t.length?mn(t,ci(e,3)):[]},Pa.tap=function(t,e){return e(t),t},Pa.throttle=function(t,e,a){var n=!0,i=!0;if("function"!=typeof t)throw new kt(r);return il(a)&&(n="leading"in a?!!a.leading:n,i="trailing"in a?!!a.trailing:i),Do(t,e,{leading:n,maxWait:e,trailing:i})},Pa.thru=go,Pa.toArray=yl,Pa.toPairs=$l,Pa.toPairsIn=Ul,Pa.toPath=function(t){return Ko(t)?ke(t,Ri):pl(t)?[t]:kn(Pi(Ml(t)))},Pa.toPlainObject=wl,Pa.transform=function(t,e,a){var r=Ko(t),n=r||Qo(t)||ml(t);if(e=ci(e,4),null==a){var i=t&&t.constructor;a=n?r?new i:[]:il(t)&&al(i)?Ra(Gt(t)):{}}return(n?_e:zr)(t,(function(t,r,n){return e(a,t,r,n)})),a},Pa.unary=function(t){return So(t,1)},Pa.union=io,Pa.unionBy=oo,Pa.unionWith=lo,Pa.uniq=function(t){return t&&t.length?un(t):[]},Pa.uniqBy=function(t,e){return t&&t.length?un(t,ci(e,2)):[]},Pa.uniqWith=function(t,e){return e="function"==typeof e?e:a,t&&t.length?un(t,a,e):[]},Pa.unset=function(t,e){return null==t||dn(t,e)},Pa.unzip=so,Pa.unzipWith=co,Pa.update=function(t,e,a){return null==t?t:pn(t,e,bn(a))},Pa.updateWith=function(t,e,r,n){return n="function"==typeof n?n:a,null==t?t:pn(t,e,bn(r),n)},Pa.values=Wl,Pa.valuesIn=function(t){return null==t?[]:Ke(t,jl(t))},Pa.without=ho,Pa.words=as,Pa.wrap=function(t,e){return No(bn(e),t)},Pa.xor=uo,Pa.xorBy=po,Pa.xorWith=mo,Pa.zip=vo,Pa.zipObject=function(t,e){return yn(t||[],e||[],er)},Pa.zipObjectDeep=function(t,e){return yn(t||[],e||[],Qr)},Pa.zipWith=fo,Pa.entries=$l,Pa.entriesIn=Ul,Pa.extend=Al,Pa.extendWith=Hl,ds(Pa,Pa),Pa.add=ws,Pa.attempt=rs,Pa.camelCase=ql,Pa.capitalize=Gl,Pa.ceil=Ms,Pa.clamp=function(t,e,r){return r===a&&(r=e,e=a),r!==a&&(r=(r=xl(r))==r?r:0),e!==a&&(e=(e=xl(e))==e?e:0),lr(xl(t),e,r)},Pa.clone=function(t){return sr(t,4)},Pa.cloneDeep=function(t){return sr(t,5)},Pa.cloneDeepWith=function(t,e){return sr(t,5,e="function"==typeof e?e:a)},Pa.cloneWith=function(t,e){return sr(t,4,e="function"==typeof e?e:a)},Pa.conformsTo=function(t,e){return null==e||cr(t,e,Dl(e))},Pa.deburr=Yl,Pa.defaultTo=function(t,e){return null==t||t!=t?e:t},Pa.divide=_s,Pa.endsWith=function(t,e,r){t=Ml(t),e=hn(e);var n=t.length,i=r=r===a?n:lr(bl(r),0,n);return(r-=e.length)>=0&&t.slice(r,i)==e},Pa.eq=Wo,Pa.escape=function(t){return(t=Ml(t))&&K.test(t)?t.replace(G,ea):t},Pa.escapeRegExp=function(t){return(t=Ml(t))&&rt.test(t)?t.replace(at,"\\$&"):t},Pa.every=function(t,e,r){var n=Ko(t)?He:mr;return r&&zi(t,e,r)&&(e=a),n(t,ci(e,3))},Pa.find=xo,Pa.findIndex=Gi,Pa.findKey=function(t,e){return De(t,ci(e,3),zr)},Pa.findLast=wo,Pa.findLastIndex=Yi,Pa.findLastKey=function(t,e){return De(t,ci(e,3),xr)},Pa.floor=As,Pa.forEach=Mo,Pa.forEachRight=_o,Pa.forIn=function(t,e){return null==t?t:gr(t,ci(e,3),jl)},Pa.forInRight=function(t,e){return null==t?t:br(t,ci(e,3),jl)},Pa.forOwn=function(t,e){return t&&zr(t,ci(e,3))},Pa.forOwnRight=function(t,e){return t&&xr(t,ci(e,3))},Pa.get=Cl,Pa.gt=qo,Pa.gte=Go,Pa.has=function(t,e){return null!=t&&fi(t,e,Vr)},Pa.hasIn=Sl,Pa.head=Ji,Pa.identity=ss,Pa.includes=function(t,e,a,r){t=Zo(t)?t:Wl(t),a=a&&!r?bl(a):0;var n=t.length;return a<0&&(a=ga(n+a,0)),dl(t)?a<=n&&t.indexOf(e,a)>-1:!!n&&Fe(t,e,a)>-1},Pa.indexOf=function(t,e,a){var r=null==t?0:t.length;if(!r)return-1;var n=null==a?0:bl(a);return n<0&&(n=ga(r+n,0)),Fe(t,e,n)},Pa.inRange=function(t,e,r){return e=gl(e),r===a?(r=e,e=0):r=gl(r),function(t,e,a){return t>=ba(e,a)&&t<ga(e,a)}(t=xl(t),e,r)},Pa.invoke=Tl,Pa.isArguments=Yo,Pa.isArray=Ko,Pa.isArrayBuffer=Jo,Pa.isArrayLike=Zo,Pa.isArrayLikeObject=Xo,Pa.isBoolean=function(t){return!0===t||!1===t||ol(t)&&Ar(t)==g},Pa.isBuffer=Qo,Pa.isDate=tl,Pa.isElement=function(t){return ol(t)&&1===t.nodeType&&!cl(t)},Pa.isEmpty=function(t){if(null==t)return!0;if(Zo(t)&&(Ko(t)||"string"==typeof t||"function"==typeof t.splice||Qo(t)||ml(t)||Yo(t)))return!t.length;var e=vi(t);if(e==M||e==L)return!t.size;if(_i(t))return!Dr(t).length;for(var a in t)if(Dt.call(t,a))return!1;return!0},Pa.isEqual=function(t,e){return Sr(t,e)},Pa.isEqualWith=function(t,e,r){var n=(r="function"==typeof r?r:a)?r(t,e):a;return n===a?Sr(t,e,a,r):!!n},Pa.isError=el,Pa.isFinite=function(t){return"number"==typeof t&&va(t)},Pa.isFunction=al,Pa.isInteger=rl,Pa.isLength=nl,Pa.isMap=ll,Pa.isMatch=function(t,e){return t===e||Er(t,e,ui(e))},Pa.isMatchWith=function(t,e,r){return r="function"==typeof r?r:a,Er(t,e,ui(e),r)},Pa.isNaN=function(t){return sl(t)&&t!=+t},Pa.isNative=function(t){if(Mi(t))throw new _t("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Or(t)},Pa.isNil=function(t){return null==t},Pa.isNull=function(t){return null===t},Pa.isNumber=sl,Pa.isObject=il,Pa.isObjectLike=ol,Pa.isPlainObject=cl,Pa.isRegExp=hl,Pa.isSafeInteger=function(t){return rl(t)&&t>=-9007199254740991&&t<=d},Pa.isSet=ul,Pa.isString=dl,Pa.isSymbol=pl,Pa.isTypedArray=ml,Pa.isUndefined=function(t){return t===a},Pa.isWeakMap=function(t){return ol(t)&&vi(t)==C},Pa.isWeakSet=function(t){return ol(t)&&"[object WeakSet]"==Ar(t)},Pa.join=function(t,e){return null==t?"":fa.call(t,e)},Pa.kebabCase=Kl,Pa.last=to,Pa.lastIndexOf=function(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var i=n;return r!==a&&(i=(i=bl(r))<0?ga(n+i,0):ba(i,n-1)),e==e?function(t,e,a){for(var r=a+1;r--;)if(t[r]===e)return r;return r}(t,e,i):je(t,Pe,i,!0)},Pa.lowerCase=Jl,Pa.lowerFirst=Zl,Pa.lt=vl,Pa.lte=fl,Pa.max=function(t){return t&&t.length?vr(t,ss,Hr):a},Pa.maxBy=function(t,e){return t&&t.length?vr(t,ci(e,2),Hr):a},Pa.mean=function(t){return Re(t,ss)},Pa.meanBy=function(t,e){return Re(t,ci(e,2))},Pa.min=function(t){return t&&t.length?vr(t,ss,Fr):a},Pa.minBy=function(t,e){return t&&t.length?vr(t,ci(e,2),Fr):a},Pa.stubArray=zs,Pa.stubFalse=xs,Pa.stubObject=function(){return{}},Pa.stubString=function(){return""},Pa.stubTrue=function(){return!0},Pa.multiply=Vs,Pa.nth=function(t,e){return t&&t.length?$r(t,bl(e)):a},Pa.noConflict=function(){return he._===this&&(he._=Rt),this},Pa.noop=ps,Pa.now=Co,Pa.pad=function(t,e,a){t=Ml(t);var r=(e=bl(e))?sa(t):0;if(!e||r>=e)return t;var n=(e-r)/2;return Wn($e(n),a)+t+Wn(Te(n),a)},Pa.padEnd=function(t,e,a){t=Ml(t);var r=(e=bl(e))?sa(t):0;return e&&r<e?t+Wn(e-r,a):t},Pa.padStart=function(t,e,a){t=Ml(t);var r=(e=bl(e))?sa(t):0;return e&&r<e?Wn(e-r,a)+t:t},Pa.parseInt=function(t,e,a){return a||null==e?e=0:e&&(e=+e),xa(Ml(t).replace(nt,""),e||0)},Pa.random=function(t,e,r){if(r&&"boolean"!=typeof r&&zi(t,e,r)&&(e=r=a),r===a&&("boolean"==typeof e?(r=e,e=a):"boolean"==typeof t&&(r=t,t=a)),t===a&&e===a?(t=0,e=1):(t=gl(t),e===a?(e=t,t=0):e=gl(e)),t>e){var n=t;t=e,e=n}if(r||t%1||e%1){var i=wa();return ba(t+i*(e-t+oe("1e-"+((i+"").length-1))),e)}return Yr(t,e)},Pa.reduce=function(t,e,a){var r=Ko(t)?Se:Ue,n=arguments.length<3;return r(t,ci(e,4),a,n,dr)},Pa.reduceRight=function(t,e,a){var r=Ko(t)?Ee:Ue,n=arguments.length<3;return r(t,ci(e,4),a,n,pr)},Pa.repeat=function(t,e,r){return e=(r?zi(t,e,r):e===a)?1:bl(e),Kr(Ml(t),e)},Pa.replace=function(){var t=arguments,e=Ml(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Pa.result=function(t,e,r){var n=-1,i=(e=zn(e,t)).length;for(i||(i=1,t=a);++n<i;){var o=null==t?a:t[Ri(e[n])];o===a&&(n=i,o=r),t=al(o)?o.call(t):o}return t},Pa.round=Ls,Pa.runInContext=t,Pa.sample=function(t){return(Ko(t)?Za:Zr)(t)},Pa.size=function(t){if(null==t)return 0;if(Zo(t))return dl(t)?sa(t):t.length;var e=vi(t);return e==M||e==L?t.size:Dr(t).length},Pa.snakeCase=Xl,Pa.some=function(t,e,r){var n=Ko(t)?Oe:nn;return r&&zi(t,e,r)&&(e=a),n(t,ci(e,3))},Pa.sortedIndex=function(t,e){return on(t,e)},Pa.sortedIndexBy=function(t,e,a){return ln(t,e,ci(a,2))},Pa.sortedIndexOf=function(t,e){var a=null==t?0:t.length;if(a){var r=on(t,e);if(r<a&&Wo(t[r],e))return r}return-1},Pa.sortedLastIndex=function(t,e){return on(t,e,!0)},Pa.sortedLastIndexBy=function(t,e,a){return ln(t,e,ci(a,2),!0)},Pa.sortedLastIndexOf=function(t,e){if(null==t?0:t.length){var a=on(t,e,!0)-1;if(Wo(t[a],e))return a}return-1},Pa.startCase=Ql,Pa.startsWith=function(t,e,a){return t=Ml(t),a=null==a?0:lr(bl(a),0,t.length),e=hn(e),t.slice(a,a+e.length)==e},Pa.subtract=Bs,Pa.sum=function(t){return t&&t.length?We(t,ss):0},Pa.sumBy=function(t,e){return t&&t.length?We(t,ci(e,2)):0},Pa.template=function(t,e,r){var n=Pa.templateSettings;r&&zi(t,e,r)&&(e=a),t=Ml(t),e=Hl({},e,n,Qn);var i,o,l=Hl({},e.imports,n.imports,Qn),s=Dl(l),c=Ke(l,s),h=0,u=e.interpolate||zt,d="__p += '",p=Lt((e.escape||zt).source+"|"+u.source+"|"+(u===X?dt:zt).source+"|"+(e.evaluate||zt).source+"|$","g"),m="//# sourceURL="+(Dt.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ae+"]")+"\n";t.replace(p,(function(e,a,r,n,l,s){return r||(r=n),d+=t.slice(h,s).replace(xt,aa),a&&(i=!0,d+="' +\n__e("+a+") +\n'"),l&&(o=!0,d+="';\n"+l+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),h=s+e.length,e})),d+="';\n";var v=Dt.call(e,"variable")&&e.variable;if(v){if(ht.test(v))throw new _t("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(o?d.replace($,""):d).replace(U,"$1").replace(W,"$1;"),d="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var f=rs((function(){return At(s,m+"return "+d).apply(a,c)}));if(f.source=d,el(f))throw f;return f},Pa.times=function(t,e){if((t=bl(t))<1||t>d)return[];var a=m,r=ba(t,m);e=ci(e),t-=m;for(var n=qe(r,e);++a<t;)e(a);return n},Pa.toFinite=gl,Pa.toInteger=bl,Pa.toLength=zl,Pa.toLower=function(t){return Ml(t).toLowerCase()},Pa.toNumber=xl,Pa.toSafeInteger=function(t){return t?lr(bl(t),-9007199254740991,d):0===t?t:0},Pa.toString=Ml,Pa.toUpper=function(t){return Ml(t).toUpperCase()},Pa.trim=function(t,e,r){if((t=Ml(t))&&(r||e===a))return Ge(t);if(!t||!(e=hn(e)))return t;var n=ca(t),i=ca(e);return wn(n,Ze(n,i),Xe(n,i)+1).join("")},Pa.trimEnd=function(t,e,r){if((t=Ml(t))&&(r||e===a))return t.slice(0,ha(t)+1);if(!t||!(e=hn(e)))return t;var n=ca(t);return wn(n,0,Xe(n,ca(e))+1).join("")},Pa.trimStart=function(t,e,r){if((t=Ml(t))&&(r||e===a))return t.replace(nt,"");if(!t||!(e=hn(e)))return t;var n=ca(t);return wn(n,Ze(n,ca(e))).join("")},Pa.truncate=function(t,e){var r=30,n="...";if(il(e)){var i="separator"in e?e.separator:i;r="length"in e?bl(e.length):r,n="omission"in e?hn(e.omission):n}var o=(t=Ml(t)).length;if(ra(t)){var l=ca(t);o=l.length}if(r>=o)return t;var s=r-sa(n);if(s<1)return n;var c=l?wn(l,0,s).join(""):t.slice(0,s);if(i===a)return c+n;if(l&&(s+=c.length-s),hl(i)){if(t.slice(s).search(i)){var h,u=c;for(i.global||(i=Lt(i.source,Ml(pt.exec(i))+"g")),i.lastIndex=0;h=i.exec(u);)var d=h.index;c=c.slice(0,d===a?s:d)}}else if(t.indexOf(hn(i),s)!=s){var p=c.lastIndexOf(i);p>-1&&(c=c.slice(0,p))}return c+n},Pa.unescape=function(t){return(t=Ml(t))&&Y.test(t)?t.replace(q,ua):t},Pa.uniqueId=function(t){var e=++jt;return Ml(t)+e},Pa.upperCase=ts,Pa.upperFirst=es,Pa.each=Mo,Pa.eachRight=_o,Pa.first=Ji,ds(Pa,(Hs={},zr(Pa,(function(t,e){Dt.call(Pa.prototype,e)||(Hs[e]=t)})),Hs),{chain:!1}),Pa.VERSION="4.17.21",_e(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Pa[t].placeholder=Pa})),_e(["drop","take"],(function(t,e){Ua.prototype[t]=function(r){r=r===a?1:ga(bl(r),0);var n=this.__filtered__&&!e?new Ua(this):this.clone();return n.__filtered__?n.__takeCount__=ba(r,n.__takeCount__):n.__views__.push({size:ba(r,m),type:t+(n.__dir__<0?"Right":"")}),n},Ua.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),_e(["filter","map","takeWhile"],(function(t,e){var a=e+1,r=1==a||3==a;Ua.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:ci(t,3),type:a}),e.__filtered__=e.__filtered__||r,e}})),_e(["head","last"],(function(t,e){var a="take"+(e?"Right":"");Ua.prototype[t]=function(){return this[a](1).value()[0]}})),_e(["initial","tail"],(function(t,e){var a="drop"+(e?"":"Right");Ua.prototype[t]=function(){return this.__filtered__?new Ua(this):this[a](1)}})),Ua.prototype.compact=function(){return this.filter(ss)},Ua.prototype.find=function(t){return this.filter(t).head()},Ua.prototype.findLast=function(t){return this.reverse().find(t)},Ua.prototype.invokeMap=Jr((function(t,e){return"function"==typeof t?new Ua(this):this.map((function(a){return kr(a,t,e)}))})),Ua.prototype.reject=function(t){return this.filter(Po(ci(t)))},Ua.prototype.slice=function(t,e){t=bl(t);var r=this;return r.__filtered__&&(t>0||e<0)?new Ua(r):(t<0?r=r.takeRight(-t):t&&(r=r.drop(t)),e!==a&&(r=(e=bl(e))<0?r.dropRight(-e):r.take(e-t)),r)},Ua.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Ua.prototype.toArray=function(){return this.take(m)},zr(Ua.prototype,(function(t,e){var r=/^(?:filter|find|map|reject)|While$/.test(e),n=/^(?:head|last)$/.test(e),i=Pa[n?"take"+("last"==e?"Right":""):e],o=n||/^find/.test(e);i&&(Pa.prototype[e]=function(){var e=this.__wrapped__,l=n?[1]:arguments,s=e instanceof Ua,c=l[0],h=s||Ko(e),u=function(t){var e=i.apply(Pa,Ce([t],l));return n&&d?e[0]:e};h&&r&&"function"==typeof c&&1!=c.length&&(s=h=!1);var d=this.__chain__,p=!!this.__actions__.length,m=o&&!d,v=s&&!p;if(!o&&h){e=v?e:new Ua(this);var f=t.apply(e,l);return f.__actions__.push({func:go,args:[u],thisArg:a}),new $a(f,d)}return m&&v?t.apply(this,l):(f=this.thru(u),m?n?f.value()[0]:f.value():f)})})),_e(["pop","push","shift","sort","splice","unshift"],(function(t){var e=Ct[t],a=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);Pa.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var n=this.value();return e.apply(Ko(n)?n:[],t)}return this[a]((function(a){return e.apply(Ko(a)?a:[],t)}))}})),zr(Ua.prototype,(function(t,e){var a=Pa[e];if(a){var r=a.name+"";Dt.call(Ca,r)||(Ca[r]=[]),Ca[r].push({name:e,func:a})}})),Ca[Rn(a,2).name]=[{name:"wrapper",func:a}],Ua.prototype.clone=function(){var t=new Ua(this.__wrapped__);return t.__actions__=kn(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=kn(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=kn(this.__views__),t},Ua.prototype.reverse=function(){if(this.__filtered__){var t=new Ua(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Ua.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,a=Ko(t),r=e<0,n=a?t.length:0,i=function(t,e,a){var r=-1,n=a.length;for(;++r<n;){var i=a[r],o=i.size;switch(i.type){case"drop":t+=o;break;case"dropRight":e-=o;break;case"take":e=ba(e,t+o);break;case"takeRight":t=ga(t,e-o)}}return{start:t,end:e}}(0,n,this.__views__),o=i.start,l=i.end,s=l-o,c=r?l:o-1,h=this.__iteratees__,u=h.length,d=0,p=ba(s,this.__takeCount__);if(!a||!r&&n==s&&p==s)return vn(t,this.__actions__);var m=[];t:for(;s--&&d<p;){for(var v=-1,f=t[c+=e];++v<u;){var y=h[v],g=y.iteratee,b=y.type,z=g(f);if(2==b)f=z;else if(!z){if(1==b)continue t;break t}}m[d++]=f}return m},Pa.prototype.at=bo,Pa.prototype.chain=function(){return yo(this)},Pa.prototype.commit=function(){return new $a(this.value(),this.__chain__)},Pa.prototype.next=function(){this.__values__===a&&(this.__values__=yl(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?a:this.__values__[this.__index__++]}},Pa.prototype.plant=function(t){for(var e,r=this;r instanceof Na;){var n=$i(r);n.__index__=0,n.__values__=a,e?i.__wrapped__=n:e=n;var i=n;r=r.__wrapped__}return i.__wrapped__=t,e},Pa.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Ua){var e=t;return this.__actions__.length&&(e=new Ua(this)),(e=e.reverse()).__actions__.push({func:go,args:[no],thisArg:a}),new $a(e,this.__chain__)}return this.thru(no)},Pa.prototype.toJSON=Pa.prototype.valueOf=Pa.prototype.value=function(){return vn(this.__wrapped__,this.__actions__)},Pa.prototype.first=Pa.prototype.head,se&&(Pa.prototype[se]=function(){return this}),Pa}();de?((de.exports=da)._=da,ue._=da):he._=da}).call(Br)})),Ls=kr((function(t,e){t.exports=function(){var t=navigator.userAgent,e=navigator.platform,a=/gecko\/\d/i.test(t),r=/MSIE \d/.test(t),n=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(t),i=/Edge\/(\d+)/.exec(t),o=r||n||i,l=o&&(r?document.documentMode||6:+(i||n)[1]),s=!i&&/WebKit\//.test(t),c=s&&/Qt\/\d+\.\d+/.test(t),h=!i&&/Chrome\//.test(t),u=/Opera\//.test(t),d=/Apple Computer/.test(navigator.vendor),p=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(t),m=/PhantomJS/.test(t),v=d&&(/Mobile\/\w+/.test(t)||navigator.maxTouchPoints>2),f=/Android/.test(t),y=v||f||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(t),g=v||/Mac/.test(e),b=/\bCrOS\b/.test(t),z=/win/i.test(e),x=u&&t.match(/Version\/(\d*\.\d*)/);x&&(x=Number(x[1])),x&&x>=15&&(u=!1,s=!0);var w=g&&(c||u&&(null==x||x<12.11)),M=a||o&&l>=9;function _(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}var A,H=function(t,e){var a=t.className,r=_(e).exec(a);if(r){var n=a.slice(r.index+r[0].length);t.className=a.slice(0,r.index)+(n?r[1]+n:"")}};function V(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function L(t,e){return V(t).appendChild(e)}function B(t,e,a,r){var n=document.createElement(t);if(a&&(n.className=a),r&&(n.style.cssText=r),"string"==typeof e)n.appendChild(document.createTextNode(e));else if(e)for(var i=0;i<e.length;++i)n.appendChild(e[i]);return n}function k(t,e,a,r){var n=B(t,e,a,r);return n.setAttribute("role","presentation"),n}function C(t,e){if(3==e.nodeType&&(e=e.parentNode),t.contains)return t.contains(e);do{if(11==e.nodeType&&(e=e.host),e==t)return!0}while(e=e.parentNode)}function S(){var t;try{t=document.activeElement}catch(Et){t=document.body||null}for(;t&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function E(t,e){var a=t.className;_(e).test(a)||(t.className+=(a?" ":"")+e)}function O(t,e){for(var a=t.split(" "),r=0;r<a.length;r++)a[r]&&!_(a[r]).test(e)&&(e+=" "+a[r]);return e}A=document.createRange?function(t,e,a,r){var n=document.createRange();return n.setEnd(r||t,a),n.setStart(t,e),n}:function(t,e,a){var r=document.body.createTextRange();try{r.moveToElementText(t.parentNode)}catch(Et){return r}return r.collapse(!0),r.moveEnd("character",a),r.moveStart("character",e),r};var T=function(t){t.select()};function D(t){var e=Array.prototype.slice.call(arguments,1);return function(){return t.apply(null,e)}}function j(t,e,a){for(var r in e||(e={}),t)!t.hasOwnProperty(r)||!1===a&&e.hasOwnProperty(r)||(e[r]=t[r]);return e}function F(t,e,a,r,n){null==e&&-1==(e=t.search(/[^\s\u00a0]/))&&(e=t.length);for(var i=r||0,o=n||0;;){var l=t.indexOf("\t",i);if(l<0||l>=e)return o+(e-i);o+=l-i,o+=a-o%a,i=l+1}}v?T=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:o&&(T=function(t){try{t.select()}catch(e){}});var I=function(){this.id=null,this.f=null,this.time=0,this.handler=D(this.onTimeout,this)};function P(t,e){for(var a=0;a<t.length;++a)if(t[a]==e)return a;return-1}I.prototype.onTimeout=function(t){t.id=0,t.time<=+new Date?t.f():setTimeout(t.handler,t.time-+new Date)},I.prototype.set=function(t,e){this.f=e;var a=+new Date+t;(!this.id||a<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,t),this.time=a)};var R=50,N={toString:function(){return"CodeMirror.Pass"}},$={scroll:!1},U={origin:"*mouse"},W={origin:"+move"};function q(t,e,a){for(var r=0,n=0;;){var i=t.indexOf("\t",r);-1==i&&(i=t.length);var o=i-r;if(i==t.length||n+o>=e)return r+Math.min(o,e-n);if(n+=i-r,r=i+1,(n+=a-n%a)>=e)return r}}var G=[""];function Y(t){for(;G.length<=t;)G.push(K(G)+" ");return G[t]}function K(t){return t[t.length-1]}function J(t,e){for(var a=[],r=0;r<t.length;r++)a[r]=e(t[r],r);return a}function Z(t,e,a){for(var r=0,n=a(e);r<t.length&&a(t[r])<=n;)r++;t.splice(r,0,e)}function X(){}function Q(t,e){var a;return Object.create?a=Object.create(t):(X.prototype=t,a=new X),e&&j(e,a),a}var tt=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function et(t){return/\w/.test(t)||t>"€"&&(t.toUpperCase()!=t.toLowerCase()||tt.test(t))}function at(t,e){return e?!!(e.source.indexOf("\\w")>-1&&et(t))||e.test(t):et(t)}function rt(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}var nt=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function it(t){return t.charCodeAt(0)>=768&&nt.test(t)}function ot(t,e,a){for(;(a<0?e>0:e<t.length)&&it(t.charAt(e));)e+=a;return e}function lt(t,e,a){for(var r=e>a?-1:1;;){if(e==a)return e;var n=(e+a)/2,i=r<0?Math.ceil(n):Math.floor(n);if(i==e)return t(i)?e:a;t(i)?a=i:e=i+r}}function st(t,e,a,r){if(!t)return r(e,a,"ltr",0);for(var n=!1,i=0;i<t.length;++i){var o=t[i];(o.from<a&&o.to>e||e==a&&o.to==e)&&(r(Math.max(o.from,e),Math.min(o.to,a),1==o.level?"rtl":"ltr",i),n=!0)}n||r(e,a,"ltr")}var ct=null;function ht(t,e,a){var r;ct=null;for(var n=0;n<t.length;++n){var i=t[n];if(i.from<e&&i.to>e)return n;i.to==e&&(i.from!=i.to&&"before"==a?r=n:ct=n),i.from==e&&(i.from!=i.to&&"before"!=a?r=n:ct=n)}return null!=r?r:ct}var ut=function(){var t="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",e="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function a(a){return a<=247?t.charAt(a):1424<=a&&a<=1524?"R":1536<=a&&a<=1785?e.charAt(a-1536):1774<=a&&a<=2220?"r":8192<=a&&a<=8203?"w":8204==a?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,n=/[stwN]/,i=/[LRr]/,o=/[Lb1n]/,l=/[1n]/;function s(t,e,a){this.level=t,this.from=e,this.to=a}return function(t,e){var c="ltr"==e?"L":"R";if(0==t.length||"ltr"==e&&!r.test(t))return!1;for(var h=t.length,u=[],d=0;d<h;++d)u.push(a(t.charCodeAt(d)));for(var p=0,m=c;p<h;++p){var v=u[p];"m"==v?u[p]=m:m=v}for(var f=0,y=c;f<h;++f){var g=u[f];"1"==g&&"r"==y?u[f]="n":i.test(g)&&(y=g,"r"==g&&(u[f]="R"))}for(var b=1,z=u[0];b<h-1;++b){var x=u[b];"+"==x&&"1"==z&&"1"==u[b+1]?u[b]="1":","!=x||z!=u[b+1]||"1"!=z&&"n"!=z||(u[b]=z),z=x}for(var w=0;w<h;++w){var M=u[w];if(","==M)u[w]="N";else if("%"==M){var _=void 0;for(_=w+1;_<h&&"%"==u[_];++_);for(var A=w&&"!"==u[w-1]||_<h&&"1"==u[_]?"1":"N",H=w;H<_;++H)u[H]=A;w=_-1}}for(var V=0,L=c;V<h;++V){var B=u[V];"L"==L&&"1"==B?u[V]="L":i.test(B)&&(L=B)}for(var k=0;k<h;++k)if(n.test(u[k])){var C=void 0;for(C=k+1;C<h&&n.test(u[C]);++C);for(var S="L"==(k?u[k-1]:c),E=S==("L"==(C<h?u[C]:c))?S?"L":"R":c,O=k;O<C;++O)u[O]=E;k=C-1}for(var T,D=[],j=0;j<h;)if(o.test(u[j])){var F=j;for(++j;j<h&&o.test(u[j]);++j);D.push(new s(0,F,j))}else{var I=j,P=D.length,R="rtl"==e?1:0;for(++j;j<h&&"L"!=u[j];++j);for(var N=I;N<j;)if(l.test(u[N])){I<N&&(D.splice(P,0,new s(1,I,N)),P+=R);var $=N;for(++N;N<j&&l.test(u[N]);++N);D.splice(P,0,new s(2,$,N)),P+=R,I=N}else++N;I<j&&D.splice(P,0,new s(1,I,j))}return"ltr"==e&&(1==D[0].level&&(T=t.match(/^\s+/))&&(D[0].from=T[0].length,D.unshift(new s(0,0,T[0].length))),1==K(D).level&&(T=t.match(/\s+$/))&&(K(D).to-=T[0].length,D.push(new s(0,h-T[0].length,h)))),"rtl"==e?D.reverse():D}}();function dt(t,e){var a=t.order;return null==a&&(a=t.order=ut(t.text,e)),a}var pt=[],mt=function(t,e,a){if(t.addEventListener)t.addEventListener(e,a,!1);else if(t.attachEvent)t.attachEvent("on"+e,a);else{var r=t._handlers||(t._handlers={});r[e]=(r[e]||pt).concat(a)}};function vt(t,e){return t._handlers&&t._handlers[e]||pt}function ft(t,e,a){if(t.removeEventListener)t.removeEventListener(e,a,!1);else if(t.detachEvent)t.detachEvent("on"+e,a);else{var r=t._handlers,n=r&&r[e];if(n){var i=P(n,a);i>-1&&(r[e]=n.slice(0,i).concat(n.slice(i+1)))}}}function yt(t,e){var a=vt(t,e);if(a.length)for(var r=Array.prototype.slice.call(arguments,2),n=0;n<a.length;++n)a[n].apply(null,r)}function gt(t,e,a){return"string"==typeof e&&(e={type:e,preventDefault:function(){this.defaultPrevented=!0}}),yt(t,a||e.type,t,e),_t(e)||e.codemirrorIgnore}function bt(t){var e=t._handlers&&t._handlers.cursorActivity;if(e)for(var a=t.curOp.cursorActivityHandlers||(t.curOp.cursorActivityHandlers=[]),r=0;r<e.length;++r)-1==P(a,e[r])&&a.push(e[r])}function zt(t,e){return vt(t,e).length>0}function xt(t){t.prototype.on=function(t,e){mt(this,t,e)},t.prototype.off=function(t,e){ft(this,t,e)}}function wt(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function Mt(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function _t(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function At(t){wt(t),Mt(t)}function Ht(t){return t.target||t.srcElement}function Vt(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),g&&t.ctrlKey&&1==e&&(e=3),e}var Lt,Bt,kt=function(){if(o&&l<9)return!1;var t=B("div");return"draggable"in t||"dragDrop"in t}();function Ct(t){if(null==Lt){var e=B("span","​");L(t,B("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(Lt=e.offsetWidth<=1&&e.offsetHeight>2&&!(o&&l<8))}var a=Lt?B("span","​"):B("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return a.setAttribute("cm-text",""),a}function St(t){if(null!=Bt)return Bt;var e=L(t,document.createTextNode("AخA")),a=A(e,0,1).getBoundingClientRect(),r=A(e,1,2).getBoundingClientRect();return V(t),!(!a||a.left==a.right)&&(Bt=r.right-a.right<3)}var Et,Ot=3!="\n\nb".split(/\n/).length?function(t){for(var e=0,a=[],r=t.length;e<=r;){var n=t.indexOf("\n",e);-1==n&&(n=t.length);var i=t.slice(e,"\r"==t.charAt(n-1)?n-1:n),o=i.indexOf("\r");-1!=o?(a.push(i.slice(0,o)),e+=o+1):(a.push(i),e=n+1)}return a}:function(t){return t.split(/\r\n?|\n/)},Tt=window.getSelection?function(t){try{return t.selectionStart!=t.selectionEnd}catch(Et){return!1}}:function(t){var e;try{e=t.ownerDocument.selection.createRange()}catch(Et){}return!(!e||e.parentElement()!=t)&&0!=e.compareEndPoints("StartToEnd",e)},Dt="oncopy"in(Et=B("div"))||(Et.setAttribute("oncopy","return;"),"function"==typeof Et.oncopy),jt=null;function Ft(t){if(null!=jt)return jt;var e=L(t,B("span","x")),a=e.getBoundingClientRect(),r=A(e,0,1).getBoundingClientRect();return jt=Math.abs(a.left-r.left)>1}var It={},Pt={};function Rt(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),It[t]=e}function Nt(t,e){Pt[t]=e}function $t(t){if("string"==typeof t&&Pt.hasOwnProperty(t))t=Pt[t];else if(t&&"string"==typeof t.name&&Pt.hasOwnProperty(t.name)){var e=Pt[t.name];"string"==typeof e&&(e={name:e}),(t=Q(e,t)).name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return $t("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return $t("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function Ut(t,e){e=$t(e);var a=It[e.name];if(!a)return Ut(t,"text/plain");var r=a(t,e);if(Wt.hasOwnProperty(e.name)){var n=Wt[e.name];for(var i in n)n.hasOwnProperty(i)&&(r.hasOwnProperty(i)&&(r["_"+i]=r[i]),r[i]=n[i])}if(r.name=e.name,e.helperType&&(r.helperType=e.helperType),e.modeProps)for(var o in e.modeProps)r[o]=e.modeProps[o];return r}var Wt={};function qt(t,e){j(e,Wt.hasOwnProperty(t)?Wt[t]:Wt[t]={})}function Gt(t,e){if(!0===e)return e;if(t.copyState)return t.copyState(e);var a={};for(var r in e){var n=e[r];n instanceof Array&&(n=n.concat([])),a[r]=n}return a}function Yt(t,e){for(var a;t.innerMode&&(a=t.innerMode(e))&&a.mode!=t;)e=a.state,t=a.mode;return a||{mode:t,state:e}}function Kt(t,e,a){return!t.startState||t.startState(e,a)}var Jt=function(t,e,a){this.pos=this.start=0,this.string=t,this.tabSize=e||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=a};function Zt(t,e){if((e-=t.first)<0||e>=t.size)throw new Error("There is no line "+(e+t.first)+" in the document.");for(var a=t;!a.lines;)for(var r=0;;++r){var n=a.children[r],i=n.chunkSize();if(e<i){a=n;break}e-=i}return a.lines[e]}function Xt(t,e,a){var r=[],n=e.line;return t.iter(e.line,a.line+1,(function(t){var i=t.text;n==a.line&&(i=i.slice(0,a.ch)),n==e.line&&(i=i.slice(e.ch)),r.push(i),++n})),r}function Qt(t,e,a){var r=[];return t.iter(e,a,(function(t){r.push(t.text)})),r}function te(t,e){var a=e-t.height;if(a)for(var r=t;r;r=r.parent)r.height+=a}function ee(t){if(null==t.parent)return null;for(var e=t.parent,a=P(e.lines,t),r=e.parent;r;e=r,r=r.parent)for(var n=0;r.children[n]!=e;++n)a+=r.children[n].chunkSize();return a+e.first}function ae(t,e){var a=t.first;t:do{for(var r=0;r<t.children.length;++r){var n=t.children[r],i=n.height;if(e<i){t=n;continue t}e-=i,a+=n.chunkSize()}return a}while(!t.lines);for(var o=0;o<t.lines.length;++o){var l=t.lines[o].height;if(e<l)break;e-=l}return a+o}function re(t,e){return e>=t.first&&e<t.first+t.size}function ne(t,e){return String(t.lineNumberFormatter(e+t.firstLineNumber))}function ie(t,e,a){if(void 0===a&&(a=null),!(this instanceof ie))return new ie(t,e,a);this.line=t,this.ch=e,this.sticky=a}function oe(t,e){return t.line-e.line||t.ch-e.ch}function le(t,e){return t.sticky==e.sticky&&0==oe(t,e)}function se(t){return ie(t.line,t.ch)}function ce(t,e){return oe(t,e)<0?e:t}function he(t,e){return oe(t,e)<0?t:e}function ue(t,e){return Math.max(t.first,Math.min(e,t.first+t.size-1))}function de(t,e){if(e.line<t.first)return ie(t.first,0);var a=t.first+t.size-1;return e.line>a?ie(a,Zt(t,a).text.length):pe(e,Zt(t,e.line).text.length)}function pe(t,e){var a=t.ch;return null==a||a>e?ie(t.line,e):a<0?ie(t.line,0):t}function me(t,e){for(var a=[],r=0;r<e.length;r++)a[r]=de(t,e[r]);return a}Jt.prototype.eol=function(){return this.pos>=this.string.length},Jt.prototype.sol=function(){return this.pos==this.lineStart},Jt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Jt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Jt.prototype.eat=function(t){var e=this.string.charAt(this.pos);if("string"==typeof t?e==t:e&&(t.test?t.test(e):t(e)))return++this.pos,e},Jt.prototype.eatWhile=function(t){for(var e=this.pos;this.eat(t););return this.pos>e},Jt.prototype.eatSpace=function(){for(var t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t},Jt.prototype.skipToEnd=function(){this.pos=this.string.length},Jt.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},Jt.prototype.backUp=function(t){this.pos-=t},Jt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=F(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?F(this.string,this.lineStart,this.tabSize):0)},Jt.prototype.indentation=function(){return F(this.string,null,this.tabSize)-(this.lineStart?F(this.string,this.lineStart,this.tabSize):0)},Jt.prototype.match=function(t,e,a){if("string"!=typeof t){var r=this.string.slice(this.pos).match(t);return r&&r.index>0?null:(r&&!1!==e&&(this.pos+=r[0].length),r)}var n=function(t){return a?t.toLowerCase():t};if(n(this.string.substr(this.pos,t.length))==n(t))return!1!==e&&(this.pos+=t.length),!0},Jt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Jt.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},Jt.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)},Jt.prototype.baseToken=function(){var t=this.lineOracle;return t&&t.baseToken(this.pos)};var ve=function(t,e){this.state=t,this.lookAhead=e},fe=function(t,e,a,r){this.state=e,this.doc=t,this.line=a,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function ye(t,e,a,r){var n=[t.state.modeGen],i={};He(t,e.text,t.doc.mode,a,(function(t,e){return n.push(t,e)}),i,r);for(var o=a.state,l=function(r){a.baseTokens=n;var l=t.state.overlays[r],s=1,c=0;a.state=!0,He(t,e.text,l.mode,a,(function(t,e){for(var a=s;c<t;){var r=n[s];r>t&&n.splice(s,1,t,n[s+1],r),s+=2,c=Math.min(t,r)}if(e)if(l.opaque)n.splice(a,s-a,t,"overlay "+e),s=a+2;else for(;a<s;a+=2){var i=n[a+1];n[a+1]=(i?i+" ":"")+"overlay "+e}}),i),a.state=o,a.baseTokens=null,a.baseTokenPos=1},s=0;s<t.state.overlays.length;++s)l(s);return{styles:n,classes:i.bgClass||i.textClass?i:null}}function ge(t,e,a){if(!e.styles||e.styles[0]!=t.state.modeGen){var r=be(t,ee(e)),n=e.text.length>t.options.maxHighlightLength&&Gt(t.doc.mode,r.state),i=ye(t,e,r);n&&(r.state=n),e.stateAfter=r.save(!n),e.styles=i.styles,i.classes?e.styleClasses=i.classes:e.styleClasses&&(e.styleClasses=null),a===t.doc.highlightFrontier&&(t.doc.modeFrontier=Math.max(t.doc.modeFrontier,++t.doc.highlightFrontier))}return e.styles}function be(t,e,a){var r=t.doc,n=t.display;if(!r.mode.startState)return new fe(r,!0,e);var i=Ve(t,e,a),o=i>r.first&&Zt(r,i-1).stateAfter,l=o?fe.fromSaved(r,o,i):new fe(r,Kt(r.mode),i);return r.iter(i,e,(function(a){ze(t,a.text,l);var r=l.line;a.stateAfter=r==e-1||r%5==0||r>=n.viewFrom&&r<n.viewTo?l.save():null,l.nextLine()})),a&&(r.modeFrontier=l.line),l}function ze(t,e,a,r){var n=t.doc.mode,i=new Jt(e,t.options.tabSize,a);for(i.start=i.pos=r||0,""==e&&xe(n,a.state);!i.eol();)we(n,i,a.state),i.start=i.pos}function xe(t,e){if(t.blankLine)return t.blankLine(e);if(t.innerMode){var a=Yt(t,e);return a.mode.blankLine?a.mode.blankLine(a.state):void 0}}function we(t,e,a,r){for(var n=0;n<10;n++){r&&(r[0]=Yt(t,a).mode);var i=t.token(e,a);if(e.pos>e.start)return i}throw new Error("Mode "+t.name+" failed to advance stream.")}fe.prototype.lookAhead=function(t){var e=this.doc.getLine(this.line+t);return null!=e&&t>this.maxLookAhead&&(this.maxLookAhead=t),e},fe.prototype.baseToken=function(t){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=t;)this.baseTokenPos+=2;var e=this.baseTokens[this.baseTokenPos+1];return{type:e&&e.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-t}},fe.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},fe.fromSaved=function(t,e,a){return e instanceof ve?new fe(t,Gt(t.mode,e.state),a,e.lookAhead):new fe(t,Gt(t.mode,e),a)},fe.prototype.save=function(t){var e=!1!==t?Gt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ve(e,this.maxLookAhead):e};var Me=function(t,e,a){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=e||null,this.state=a};function _e(t,e,a,r){var n,i,o=t.doc,l=o.mode,s=Zt(o,(e=de(o,e)).line),c=be(t,e.line,a),h=new Jt(s.text,t.options.tabSize,c);for(r&&(i=[]);(r||h.pos<e.ch)&&!h.eol();)h.start=h.pos,n=we(l,h,c.state),r&&i.push(new Me(h,n,Gt(o.mode,c.state)));return r?i:new Me(h,n,c.state)}function Ae(t,e){if(t)for(;;){var a=t.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!a)break;t=t.slice(0,a.index)+t.slice(a.index+a[0].length);var r=a[1]?"bgClass":"textClass";null==e[r]?e[r]=a[2]:new RegExp("(?:^|\\s)"+a[2]+"(?:$|\\s)").test(e[r])||(e[r]+=" "+a[2])}return t}function He(t,e,a,r,n,i,o){var l=a.flattenSpans;null==l&&(l=t.options.flattenSpans);var s,c=0,h=null,u=new Jt(e,t.options.tabSize,r),d=t.options.addModeClass&&[null];for(""==e&&Ae(xe(a,r.state),i);!u.eol();){if(u.pos>t.options.maxHighlightLength?(l=!1,o&&ze(t,e,r,u.pos),u.pos=e.length,s=null):s=Ae(we(a,u,r.state,d),i),d){var p=d[0].name;p&&(s="m-"+(s?p+" "+s:p))}if(!l||h!=s){for(;c<u.start;)n(c=Math.min(u.start,c+5e3),h);h=s}u.start=u.pos}for(;c<u.pos;){var m=Math.min(u.pos,c+5e3);n(m,h),c=m}}function Ve(t,e,a){for(var r,n,i=t.doc,o=a?-1:e-(t.doc.mode.innerMode?1e3:100),l=e;l>o;--l){if(l<=i.first)return i.first;var s=Zt(i,l-1),c=s.stateAfter;if(c&&(!a||l+(c instanceof ve?c.lookAhead:0)<=i.modeFrontier))return l;var h=F(s.text,null,t.options.tabSize);(null==n||r>h)&&(n=l-1,r=h)}return n}function Le(t,e){if(t.modeFrontier=Math.min(t.modeFrontier,e),!(t.highlightFrontier<e-10)){for(var a=t.first,r=e-1;r>a;r--){var n=Zt(t,r).stateAfter;if(n&&(!(n instanceof ve)||r+n.lookAhead<e)){a=r+1;break}}t.highlightFrontier=Math.min(t.highlightFrontier,a)}}var Be=!1,ke=!1;function Ce(){Be=!0}function Se(){ke=!0}function Ee(t,e,a){this.marker=t,this.from=e,this.to=a}function Oe(t,e){if(t)for(var a=0;a<t.length;++a){var r=t[a];if(r.marker==e)return r}}function Te(t,e){for(var a,r=0;r<t.length;++r)t[r]!=e&&(a||(a=[])).push(t[r]);return a}function De(t,e){t.markedSpans=t.markedSpans?t.markedSpans.concat([e]):[e],e.marker.attachLine(t)}function je(t,e,a){var r;if(t)for(var n=0;n<t.length;++n){var i=t[n],o=i.marker;if(null==i.from||(o.inclusiveLeft?i.from<=e:i.from<e)||i.from==e&&"bookmark"==o.type&&(!a||!i.marker.insertLeft)){var l=null==i.to||(o.inclusiveRight?i.to>=e:i.to>e);(r||(r=[])).push(new Ee(o,i.from,l?null:i.to))}}return r}function Fe(t,e,a){var r;if(t)for(var n=0;n<t.length;++n){var i=t[n],o=i.marker;if(null==i.to||(o.inclusiveRight?i.to>=e:i.to>e)||i.from==e&&"bookmark"==o.type&&(!a||i.marker.insertLeft)){var l=null==i.from||(o.inclusiveLeft?i.from<=e:i.from<e);(r||(r=[])).push(new Ee(o,l?null:i.from-e,null==i.to?null:i.to-e))}}return r}function Ie(t,e){if(e.full)return null;var a=re(t,e.from.line)&&Zt(t,e.from.line).markedSpans,r=re(t,e.to.line)&&Zt(t,e.to.line).markedSpans;if(!a&&!r)return null;var n=e.from.ch,i=e.to.ch,o=0==oe(e.from,e.to),l=je(a,n,o),s=Fe(r,i,o),c=1==e.text.length,h=K(e.text).length+(c?n:0);if(l)for(var u=0;u<l.length;++u){var d=l[u];if(null==d.to){var p=Oe(s,d.marker);p?c&&(d.to=null==p.to?null:p.to+h):d.to=n}}if(s)for(var m=0;m<s.length;++m){var v=s[m];null!=v.to&&(v.to+=h),null==v.from?Oe(l,v.marker)||(v.from=h,c&&(l||(l=[])).push(v)):(v.from+=h,c&&(l||(l=[])).push(v))}l&&(l=Pe(l)),s&&s!=l&&(s=Pe(s));var f=[l];if(!c){var y,g=e.text.length-2;if(g>0&&l)for(var b=0;b<l.length;++b)null==l[b].to&&(y||(y=[])).push(new Ee(l[b].marker,null,null));for(var z=0;z<g;++z)f.push(y);f.push(s)}return f}function Pe(t){for(var e=0;e<t.length;++e){var a=t[e];null!=a.from&&a.from==a.to&&!1!==a.marker.clearWhenEmpty&&t.splice(e--,1)}return t.length?t:null}function Re(t,e,a){var r=null;if(t.iter(e.line,a.line+1,(function(t){if(t.markedSpans)for(var e=0;e<t.markedSpans.length;++e){var a=t.markedSpans[e].marker;!a.readOnly||r&&-1!=P(r,a)||(r||(r=[])).push(a)}})),!r)return null;for(var n=[{from:e,to:a}],i=0;i<r.length;++i)for(var o=r[i],l=o.find(0),s=0;s<n.length;++s){var c=n[s];if(!(oe(c.to,l.from)<0||oe(c.from,l.to)>0)){var h=[s,1],u=oe(c.from,l.from),d=oe(c.to,l.to);(u<0||!o.inclusiveLeft&&!u)&&h.push({from:c.from,to:l.from}),(d>0||!o.inclusiveRight&&!d)&&h.push({from:l.to,to:c.to}),n.splice.apply(n,h),s+=h.length-3}}return n}function Ne(t){var e=t.markedSpans;if(e){for(var a=0;a<e.length;++a)e[a].marker.detachLine(t);t.markedSpans=null}}function $e(t,e){if(e){for(var a=0;a<e.length;++a)e[a].marker.attachLine(t);t.markedSpans=e}}function Ue(t){return t.inclusiveLeft?-1:0}function We(t){return t.inclusiveRight?1:0}function qe(t,e){var a=t.lines.length-e.lines.length;if(0!=a)return a;var r=t.find(),n=e.find(),i=oe(r.from,n.from)||Ue(t)-Ue(e);if(i)return-i;var o=oe(r.to,n.to)||We(t)-We(e);return o||e.id-t.id}function Ge(t,e){var a,r=ke&&t.markedSpans;if(r)for(var n=void 0,i=0;i<r.length;++i)(n=r[i]).marker.collapsed&&null==(e?n.from:n.to)&&(!a||qe(a,n.marker)<0)&&(a=n.marker);return a}function Ye(t){return Ge(t,!0)}function Ke(t){return Ge(t,!1)}function Je(t,e){var a,r=ke&&t.markedSpans;if(r)for(var n=0;n<r.length;++n){var i=r[n];i.marker.collapsed&&(null==i.from||i.from<e)&&(null==i.to||i.to>e)&&(!a||qe(a,i.marker)<0)&&(a=i.marker)}return a}function Ze(t,e,a,r,n){var i=Zt(t,e),o=ke&&i.markedSpans;if(o)for(var l=0;l<o.length;++l){var s=o[l];if(s.marker.collapsed){var c=s.marker.find(0),h=oe(c.from,a)||Ue(s.marker)-Ue(n),u=oe(c.to,r)||We(s.marker)-We(n);if(!(h>=0&&u<=0||h<=0&&u>=0)&&(h<=0&&(s.marker.inclusiveRight&&n.inclusiveLeft?oe(c.to,a)>=0:oe(c.to,a)>0)||h>=0&&(s.marker.inclusiveRight&&n.inclusiveLeft?oe(c.from,r)<=0:oe(c.from,r)<0)))return!0}}}function Xe(t){for(var e;e=Ye(t);)t=e.find(-1,!0).line;return t}function Qe(t){for(var e;e=Ke(t);)t=e.find(1,!0).line;return t}function ta(t){for(var e,a;e=Ke(t);)t=e.find(1,!0).line,(a||(a=[])).push(t);return a}function ea(t,e){var a=Zt(t,e),r=Xe(a);return a==r?e:ee(r)}function aa(t,e){if(e>t.lastLine())return e;var a,r=Zt(t,e);if(!ra(t,r))return e;for(;a=Ke(r);)r=a.find(1,!0).line;return ee(r)+1}function ra(t,e){var a=ke&&e.markedSpans;if(a)for(var r=void 0,n=0;n<a.length;++n)if((r=a[n]).marker.collapsed){if(null==r.from)return!0;if(!r.marker.widgetNode&&0==r.from&&r.marker.inclusiveLeft&&na(t,e,r))return!0}}function na(t,e,a){if(null==a.to){var r=a.marker.find(1,!0);return na(t,r.line,Oe(r.line.markedSpans,a.marker))}if(a.marker.inclusiveRight&&a.to==e.text.length)return!0;for(var n=void 0,i=0;i<e.markedSpans.length;++i)if((n=e.markedSpans[i]).marker.collapsed&&!n.marker.widgetNode&&n.from==a.to&&(null==n.to||n.to!=a.from)&&(n.marker.inclusiveLeft||a.marker.inclusiveRight)&&na(t,e,n))return!0}function ia(t){for(var e=0,a=(t=Xe(t)).parent,r=0;r<a.lines.length;++r){var n=a.lines[r];if(n==t)break;e+=n.height}for(var i=a.parent;i;i=(a=i).parent)for(var o=0;o<i.children.length;++o){var l=i.children[o];if(l==a)break;e+=l.height}return e}function oa(t){if(0==t.height)return 0;for(var e,a=t.text.length,r=t;e=Ye(r);){var n=e.find(0,!0);r=n.from.line,a+=n.from.ch-n.to.ch}for(r=t;e=Ke(r);){var i=e.find(0,!0);a-=r.text.length-i.from.ch,a+=(r=i.to.line).text.length-i.to.ch}return a}function la(t){var e=t.display,a=t.doc;e.maxLine=Zt(a,a.first),e.maxLineLength=oa(e.maxLine),e.maxLineChanged=!0,a.iter((function(t){var a=oa(t);a>e.maxLineLength&&(e.maxLineLength=a,e.maxLine=t)}))}var sa=function(t,e,a){this.text=t,$e(this,e),this.height=a?a(this):1};function ca(t,e,a,r){t.text=e,t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null),null!=t.order&&(t.order=null),Ne(t),$e(t,a);var n=r?r(t):1;n!=t.height&&te(t,n)}function ha(t){t.parent=null,Ne(t)}sa.prototype.lineNo=function(){return ee(this)},xt(sa);var ua={},da={};function pa(t,e){if(!t||/^\s*$/.test(t))return null;var a=e.addModeClass?da:ua;return a[t]||(a[t]=t.replace(/\S+/g,"cm-$&"))}function ma(t,e){var a=k("span",null,null,s?"padding-right: .1px":null),r={pre:k("pre",[a],"CodeMirror-line"),content:a,col:0,pos:0,cm:t,trailingSpace:!1,splitSpaces:t.getOption("lineWrapping")};e.measure={};for(var n=0;n<=(e.rest?e.rest.length:0);n++){var i=n?e.rest[n-1]:e.line,o=void 0;r.pos=0,r.addToken=fa,St(t.display.measure)&&(o=dt(i,t.doc.direction))&&(r.addToken=ga(r.addToken,o)),r.map=[],za(i,r,ge(t,i,e!=t.display.externalMeasured&&ee(i))),i.styleClasses&&(i.styleClasses.bgClass&&(r.bgClass=O(i.styleClasses.bgClass,r.bgClass||"")),i.styleClasses.textClass&&(r.textClass=O(i.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Ct(t.display.measure))),0==n?(e.measure.map=r.map,e.measure.cache={}):((e.measure.maps||(e.measure.maps=[])).push(r.map),(e.measure.caches||(e.measure.caches=[])).push({}))}if(s){var l=r.content.lastChild;(/\bcm-tab\b/.test(l.className)||l.querySelector&&l.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return yt(t,"renderLine",t,e.line,r.pre),r.pre.className&&(r.textClass=O(r.pre.className,r.textClass||"")),r}function va(t){var e=B("span","•","cm-invalidchar");return e.title="\\u"+t.charCodeAt(0).toString(16),e.setAttribute("aria-label",e.title),e}function fa(t,e,a,r,n,i,s){if(e){var c,h=t.splitSpaces?ya(e,t.trailingSpace):e,u=t.cm.state.specialChars,d=!1;if(u.test(e)){c=document.createDocumentFragment();for(var p=0;;){u.lastIndex=p;var m=u.exec(e),v=m?m.index-p:e.length-p;if(v){var f=document.createTextNode(h.slice(p,p+v));o&&l<9?c.appendChild(B("span",[f])):c.appendChild(f),t.map.push(t.pos,t.pos+v,f),t.col+=v,t.pos+=v}if(!m)break;p+=v+1;var y=void 0;if("\t"==m[0]){var g=t.cm.options.tabSize,b=g-t.col%g;(y=c.appendChild(B("span",Y(b),"cm-tab"))).setAttribute("role","presentation"),y.setAttribute("cm-text","\t"),t.col+=b}else"\r"==m[0]||"\n"==m[0]?((y=c.appendChild(B("span","\r"==m[0]?"␍":"␤","cm-invalidchar"))).setAttribute("cm-text",m[0]),t.col+=1):((y=t.cm.options.specialCharPlaceholder(m[0])).setAttribute("cm-text",m[0]),o&&l<9?c.appendChild(B("span",[y])):c.appendChild(y),t.col+=1);t.map.push(t.pos,t.pos+1,y),t.pos++}}else t.col+=e.length,c=document.createTextNode(h),t.map.push(t.pos,t.pos+e.length,c),o&&l<9&&(d=!0),t.pos+=e.length;if(t.trailingSpace=32==h.charCodeAt(e.length-1),a||r||n||d||i||s){var z=a||"";r&&(z+=r),n&&(z+=n);var x=B("span",[c],z,i);if(s)for(var w in s)s.hasOwnProperty(w)&&"style"!=w&&"class"!=w&&x.setAttribute(w,s[w]);return t.content.appendChild(x)}t.content.appendChild(c)}}function ya(t,e){if(t.length>1&&!/ /.test(t))return t;for(var a=e,r="",n=0;n<t.length;n++){var i=t.charAt(n);" "!=i||!a||n!=t.length-1&&32!=t.charCodeAt(n+1)||(i=" "),r+=i,a=" "==i}return r}function ga(t,e){return function(a,r,n,i,o,l,s){n=n?n+" cm-force-border":"cm-force-border";for(var c=a.pos,h=c+r.length;;){for(var u=void 0,d=0;d<e.length&&!((u=e[d]).to>c&&u.from<=c);d++);if(u.to>=h)return t(a,r,n,i,o,l,s);t(a,r.slice(0,u.to-c),n,i,null,l,s),i=null,r=r.slice(u.to-c),c=u.to}}}function ba(t,e,a,r){var n=!r&&a.widgetNode;n&&t.map.push(t.pos,t.pos+e,n),!r&&t.cm.display.input.needsContentAttribute&&(n||(n=t.content.appendChild(document.createElement("span"))),n.setAttribute("cm-marker",a.id)),n&&(t.cm.display.input.setUneditable(n),t.content.appendChild(n)),t.pos+=e,t.trailingSpace=!1}function za(t,e,a){var r=t.markedSpans,n=t.text,i=0;if(r)for(var o,l,s,c,h,u,d,p=n.length,m=0,v=1,f="",y=0;;){if(y==m){s=c=h=l="",d=null,u=null,y=1/0;for(var g=[],b=void 0,z=0;z<r.length;++z){var x=r[z],w=x.marker;if("bookmark"==w.type&&x.from==m&&w.widgetNode)g.push(w);else if(x.from<=m&&(null==x.to||x.to>m||w.collapsed&&x.to==m&&x.from==m)){if(null!=x.to&&x.to!=m&&y>x.to&&(y=x.to,c=""),w.className&&(s+=" "+w.className),w.css&&(l=(l?l+";":"")+w.css),w.startStyle&&x.from==m&&(h+=" "+w.startStyle),w.endStyle&&x.to==y&&(b||(b=[])).push(w.endStyle,x.to),w.title&&((d||(d={})).title=w.title),w.attributes)for(var M in w.attributes)(d||(d={}))[M]=w.attributes[M];w.collapsed&&(!u||qe(u.marker,w)<0)&&(u=x)}else x.from>m&&y>x.from&&(y=x.from)}if(b)for(var _=0;_<b.length;_+=2)b[_+1]==y&&(c+=" "+b[_]);if(!u||u.from==m)for(var A=0;A<g.length;++A)ba(e,0,g[A]);if(u&&(u.from||0)==m){if(ba(e,(null==u.to?p+1:u.to)-m,u.marker,null==u.from),null==u.to)return;u.to==m&&(u=!1)}}if(m>=p)break;for(var H=Math.min(p,y);;){if(f){var V=m+f.length;if(!u){var L=V>H?f.slice(0,H-m):f;e.addToken(e,L,o?o+s:s,h,m+L.length==y?c:"",l,d)}if(V>=H){f=f.slice(H-m),m=H;break}m=V,h=""}f=n.slice(i,i=a[v++]),o=pa(a[v++],e.cm.options)}}else for(var B=1;B<a.length;B+=2)e.addToken(e,n.slice(i,i=a[B]),pa(a[B+1],e.cm.options))}function xa(t,e,a){this.line=e,this.rest=ta(e),this.size=this.rest?ee(K(this.rest))-a+1:1,this.node=this.text=null,this.hidden=ra(t,e)}function wa(t,e,a){for(var r,n=[],i=e;i<a;i=r){var o=new xa(t.doc,Zt(t.doc,i),i);r=i+o.size,n.push(o)}return n}var Ma=null;function _a(t){Ma?Ma.ops.push(t):t.ownsGroup=Ma={ops:[t],delayedCallbacks:[]}}function Aa(t){var e=t.delayedCallbacks,a=0;do{for(;a<e.length;a++)e[a].call(null);for(var r=0;r<t.ops.length;r++){var n=t.ops[r];if(n.cursorActivityHandlers)for(;n.cursorActivityCalled<n.cursorActivityHandlers.length;)n.cursorActivityHandlers[n.cursorActivityCalled++].call(null,n.cm)}}while(a<e.length)}function Ha(t,e){var a=t.ownsGroup;if(a)try{Aa(a)}finally{Ma=null,e(a)}}var Va=null;function La(t,e){var a=vt(t,e);if(a.length){var r,n=Array.prototype.slice.call(arguments,2);Ma?r=Ma.delayedCallbacks:Va?r=Va:(r=Va=[],setTimeout(Ba,0));for(var i=function(t){r.push((function(){return a[t].apply(null,n)}))},o=0;o<a.length;++o)i(o)}}function Ba(){var t=Va;Va=null;for(var e=0;e<t.length;++e)t[e]()}function ka(t,e,a,r){for(var n=0;n<e.changes.length;n++){var i=e.changes[n];"text"==i?Oa(t,e):"gutter"==i?Da(t,e,a,r):"class"==i?Ta(t,e):"widget"==i&&ja(t,e,r)}e.changes=null}function Ca(t){return t.node==t.text&&(t.node=B("div",null,null,"position: relative"),t.text.parentNode&&t.text.parentNode.replaceChild(t.node,t.text),t.node.appendChild(t.text),o&&l<8&&(t.node.style.zIndex=2)),t.node}function Sa(t,e){var a=e.bgClass?e.bgClass+" "+(e.line.bgClass||""):e.line.bgClass;if(a&&(a+=" CodeMirror-linebackground"),e.background)a?e.background.className=a:(e.background.parentNode.removeChild(e.background),e.background=null);else if(a){var r=Ca(e);e.background=r.insertBefore(B("div",null,a),r.firstChild),t.display.input.setUneditable(e.background)}}function Ea(t,e){var a=t.display.externalMeasured;return a&&a.line==e.line?(t.display.externalMeasured=null,e.measure=a.measure,a.built):ma(t,e)}function Oa(t,e){var a=e.text.className,r=Ea(t,e);e.text==e.node&&(e.node=r.pre),e.text.parentNode.replaceChild(r.pre,e.text),e.text=r.pre,r.bgClass!=e.bgClass||r.textClass!=e.textClass?(e.bgClass=r.bgClass,e.textClass=r.textClass,Ta(t,e)):a&&(e.text.className=a)}function Ta(t,e){Sa(t,e),e.line.wrapClass?Ca(e).className=e.line.wrapClass:e.node!=e.text&&(e.node.className="");var a=e.textClass?e.textClass+" "+(e.line.textClass||""):e.line.textClass;e.text.className=a||""}function Da(t,e,a,r){if(e.gutter&&(e.node.removeChild(e.gutter),e.gutter=null),e.gutterBackground&&(e.node.removeChild(e.gutterBackground),e.gutterBackground=null),e.line.gutterClass){var n=Ca(e);e.gutterBackground=B("div",null,"CodeMirror-gutter-background "+e.line.gutterClass,"left: "+(t.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),t.display.input.setUneditable(e.gutterBackground),n.insertBefore(e.gutterBackground,e.text)}var i=e.line.gutterMarkers;if(t.options.lineNumbers||i){var o=Ca(e),l=e.gutter=B("div",null,"CodeMirror-gutter-wrapper","left: "+(t.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(t.display.input.setUneditable(l),o.insertBefore(l,e.text),e.line.gutterClass&&(l.className+=" "+e.line.gutterClass),!t.options.lineNumbers||i&&i["CodeMirror-linenumbers"]||(e.lineNumber=l.appendChild(B("div",ne(t.options,a),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+t.display.lineNumInnerWidth+"px"))),i)for(var s=0;s<t.display.gutterSpecs.length;++s){var c=t.display.gutterSpecs[s].className,h=i.hasOwnProperty(c)&&i[c];h&&l.appendChild(B("div",[h],"CodeMirror-gutter-elt","left: "+r.gutterLeft[c]+"px; width: "+r.gutterWidth[c]+"px"))}}}function ja(t,e,a){e.alignable&&(e.alignable=null);for(var r=_("CodeMirror-linewidget"),n=e.node.firstChild,i=void 0;n;n=i)i=n.nextSibling,r.test(n.className)&&e.node.removeChild(n);Ia(t,e,a)}function Fa(t,e,a,r){var n=Ea(t,e);return e.text=e.node=n.pre,n.bgClass&&(e.bgClass=n.bgClass),n.textClass&&(e.textClass=n.textClass),Ta(t,e),Da(t,e,a,r),Ia(t,e,r),e.node}function Ia(t,e,a){if(Pa(t,e.line,e,a,!0),e.rest)for(var r=0;r<e.rest.length;r++)Pa(t,e.rest[r],e,a,!1)}function Pa(t,e,a,r,n){if(e.widgets)for(var i=Ca(a),o=0,l=e.widgets;o<l.length;++o){var s=l[o],c=B("div",[s.node],"CodeMirror-linewidget"+(s.className?" "+s.className:""));s.handleMouseEvents||c.setAttribute("cm-ignore-events","true"),Ra(s,c,a,r),t.display.input.setUneditable(c),n&&s.above?i.insertBefore(c,a.gutter||a.text):i.appendChild(c),La(s,"redraw")}}function Ra(t,e,a,r){if(t.noHScroll){(a.alignable||(a.alignable=[])).push(e);var n=r.wrapperWidth;e.style.left=r.fixedPos+"px",t.coverGutter||(n-=r.gutterTotalWidth,e.style.paddingLeft=r.gutterTotalWidth+"px"),e.style.width=n+"px"}t.coverGutter&&(e.style.zIndex=5,e.style.position="relative",t.noHScroll||(e.style.marginLeft=-r.gutterTotalWidth+"px"))}function Na(t){if(null!=t.height)return t.height;var e=t.doc.cm;if(!e)return 0;if(!C(document.body,t.node)){var a="position: relative;";t.coverGutter&&(a+="margin-left: -"+e.display.gutters.offsetWidth+"px;"),t.noHScroll&&(a+="width: "+e.display.wrapper.clientWidth+"px;"),L(e.display.measure,B("div",[t.node],null,a))}return t.height=t.node.parentNode.offsetHeight}function $a(t,e){for(var a=Ht(e);a!=t.wrapper;a=a.parentNode)if(!a||1==a.nodeType&&"true"==a.getAttribute("cm-ignore-events")||a.parentNode==t.sizer&&a!=t.mover)return!0}function Ua(t){return t.lineSpace.offsetTop}function Wa(t){return t.mover.offsetHeight-t.lineSpace.offsetHeight}function qa(t){if(t.cachedPaddingH)return t.cachedPaddingH;var e=L(t.measure,B("pre","x","CodeMirror-line-like")),a=window.getComputedStyle?window.getComputedStyle(e):e.currentStyle,r={left:parseInt(a.paddingLeft),right:parseInt(a.paddingRight)};return isNaN(r.left)||isNaN(r.right)||(t.cachedPaddingH=r),r}function Ga(t){return R-t.display.nativeBarWidth}function Ya(t){return t.display.scroller.clientWidth-Ga(t)-t.display.barWidth}function Ka(t){return t.display.scroller.clientHeight-Ga(t)-t.display.barHeight}function Ja(t,e,a){var r=t.options.lineWrapping,n=r&&Ya(t);if(!e.measure.heights||r&&e.measure.width!=n){var i=e.measure.heights=[];if(r){e.measure.width=n;for(var o=e.text.firstChild.getClientRects(),l=0;l<o.length-1;l++){var s=o[l],c=o[l+1];Math.abs(s.bottom-c.bottom)>2&&i.push((s.bottom+c.top)/2-a.top)}}i.push(a.bottom-a.top)}}function Za(t,e,a){if(t.line==e)return{map:t.measure.map,cache:t.measure.cache};for(var r=0;r<t.rest.length;r++)if(t.rest[r]==e)return{map:t.measure.maps[r],cache:t.measure.caches[r]};for(var n=0;n<t.rest.length;n++)if(ee(t.rest[n])>a)return{map:t.measure.maps[n],cache:t.measure.caches[n],before:!0}}function Xa(t,e){var a=ee(e=Xe(e)),r=t.display.externalMeasured=new xa(t.doc,e,a);r.lineN=a;var n=r.built=ma(t,r);return r.text=n.pre,L(t.display.lineMeasure,n.pre),r}function Qa(t,e,a,r){return ar(t,er(t,e),a,r)}function tr(t,e){if(e>=t.display.viewFrom&&e<t.display.viewTo)return t.display.view[Tr(t,e)];var a=t.display.externalMeasured;return a&&e>=a.lineN&&e<a.lineN+a.size?a:void 0}function er(t,e){var a=ee(e),r=tr(t,a);r&&!r.text?r=null:r&&r.changes&&(ka(t,r,a,kr(t)),t.curOp.forceUpdate=!0),r||(r=Xa(t,e));var n=Za(r,e,a);return{line:e,view:r,rect:null,map:n.map,cache:n.cache,before:n.before,hasHeights:!1}}function ar(t,e,a,r,n){e.before&&(a=-1);var i,o=a+(r||"");return e.cache.hasOwnProperty(o)?i=e.cache[o]:(e.rect||(e.rect=e.view.text.getBoundingClientRect()),e.hasHeights||(Ja(t,e.view,e.rect),e.hasHeights=!0),(i=lr(t,e,a,r)).bogus||(e.cache[o]=i)),{left:i.left,right:i.right,top:n?i.rtop:i.top,bottom:n?i.rbottom:i.bottom}}var rr,nr={left:0,right:0,top:0,bottom:0};function ir(t,e,a){for(var r,n,i,o,l,s,c=0;c<t.length;c+=3)if(l=t[c],s=t[c+1],e<l?(n=0,i=1,o="left"):e<s?i=1+(n=e-l):(c==t.length-3||e==s&&t[c+3]>e)&&(n=(i=s-l)-1,e>=s&&(o="right")),null!=n){if(r=t[c+2],l==s&&a==(r.insertLeft?"left":"right")&&(o=a),"left"==a&&0==n)for(;c&&t[c-2]==t[c-3]&&t[c-1].insertLeft;)r=t[2+(c-=3)],o="left";if("right"==a&&n==s-l)for(;c<t.length-3&&t[c+3]==t[c+4]&&!t[c+5].insertLeft;)r=t[(c+=3)+2],o="right";break}return{node:r,start:n,end:i,collapse:o,coverStart:l,coverEnd:s}}function or(t,e){var a=nr;if("left"==e)for(var r=0;r<t.length&&(a=t[r]).left==a.right;r++);else for(var n=t.length-1;n>=0&&(a=t[n]).left==a.right;n--);return a}function lr(t,e,a,r){var n,i=ir(e.map,a,r),s=i.node,c=i.start,h=i.end,u=i.collapse;if(3==s.nodeType){for(var d=0;d<4;d++){for(;c&&it(e.line.text.charAt(i.coverStart+c));)--c;for(;i.coverStart+h<i.coverEnd&&it(e.line.text.charAt(i.coverStart+h));)++h;if((n=o&&l<9&&0==c&&h==i.coverEnd-i.coverStart?s.parentNode.getBoundingClientRect():or(A(s,c,h).getClientRects(),r)).left||n.right||0==c)break;h=c,c-=1,u="right"}o&&l<11&&(n=sr(t.display.measure,n))}else{var p;c>0&&(u=r="right"),n=t.options.lineWrapping&&(p=s.getClientRects()).length>1?p["right"==r?p.length-1:0]:s.getBoundingClientRect()}if(o&&l<9&&!c&&(!n||!n.left&&!n.right)){var m=s.parentNode.getClientRects()[0];n=m?{left:m.left,right:m.left+Br(t.display),top:m.top,bottom:m.bottom}:nr}for(var v=n.top-e.rect.top,f=n.bottom-e.rect.top,y=(v+f)/2,g=e.view.measure.heights,b=0;b<g.length-1&&!(y<g[b]);b++);var z=b?g[b-1]:0,x=g[b],w={left:("right"==u?n.right:n.left)-e.rect.left,right:("left"==u?n.left:n.right)-e.rect.left,top:z,bottom:x};return n.left||n.right||(w.bogus=!0),t.options.singleCursorHeightPerLine||(w.rtop=v,w.rbottom=f),w}function sr(t,e){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!Ft(t))return e;var a=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:e.left*a,right:e.right*a,top:e.top*r,bottom:e.bottom*r}}function cr(t){if(t.measure&&(t.measure.cache={},t.measure.heights=null,t.rest))for(var e=0;e<t.rest.length;e++)t.measure.caches[e]={}}function hr(t){t.display.externalMeasure=null,V(t.display.lineMeasure);for(var e=0;e<t.display.view.length;e++)cr(t.display.view[e])}function ur(t){hr(t),t.display.cachedCharWidth=t.display.cachedTextHeight=t.display.cachedPaddingH=null,t.options.lineWrapping||(t.display.maxLineChanged=!0),t.display.lineNumChars=null}function dr(){return h&&f?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function pr(){return h&&f?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function mr(t){var e=0;if(t.widgets)for(var a=0;a<t.widgets.length;++a)t.widgets[a].above&&(e+=Na(t.widgets[a]));return e}function vr(t,e,a,r,n){if(!n){var i=mr(e);a.top+=i,a.bottom+=i}if("line"==r)return a;r||(r="local");var o=ia(e);if("local"==r?o+=Ua(t.display):o-=t.display.viewOffset,"page"==r||"window"==r){var l=t.display.lineSpace.getBoundingClientRect();o+=l.top+("window"==r?0:pr());var s=l.left+("window"==r?0:dr());a.left+=s,a.right+=s}return a.top+=o,a.bottom+=o,a}function fr(t,e,a){if("div"==a)return e;var r=e.left,n=e.top;if("page"==a)r-=dr(),n-=pr();else if("local"==a||!a){var i=t.display.sizer.getBoundingClientRect();r+=i.left,n+=i.top}var o=t.display.lineSpace.getBoundingClientRect();return{left:r-o.left,top:n-o.top}}function yr(t,e,a,r,n){return r||(r=Zt(t.doc,e.line)),vr(t,r,Qa(t,r,e.ch,n),a)}function gr(t,e,a,r,n,i){function o(e,o){var l=ar(t,n,e,o?"right":"left",i);return o?l.left=l.right:l.right=l.left,vr(t,r,l,a)}r=r||Zt(t.doc,e.line),n||(n=er(t,r));var l=dt(r,t.doc.direction),s=e.ch,c=e.sticky;if(s>=r.text.length?(s=r.text.length,c="before"):s<=0&&(s=0,c="after"),!l)return o("before"==c?s-1:s,"before"==c);function h(t,e,a){return o(a?t-1:t,1==l[e].level!=a)}var u=ht(l,s,c),d=ct,p=h(s,u,"before"==c);return null!=d&&(p.other=h(s,d,"before"!=c)),p}function br(t,e){var a=0;e=de(t.doc,e),t.options.lineWrapping||(a=Br(t.display)*e.ch);var r=Zt(t.doc,e.line),n=ia(r)+Ua(t.display);return{left:a,right:a,top:n,bottom:n+r.height}}function zr(t,e,a,r,n){var i=ie(t,e,a);return i.xRel=n,r&&(i.outside=r),i}function xr(t,e,a){var r=t.doc;if((a+=t.display.viewOffset)<0)return zr(r.first,0,null,-1,-1);var n=ae(r,a),i=r.first+r.size-1;if(n>i)return zr(r.first+r.size-1,Zt(r,i).text.length,null,1,1);e<0&&(e=0);for(var o=Zt(r,n);;){var l=Ar(t,o,n,e,a),s=Je(o,l.ch+(l.xRel>0||l.outside>0?1:0));if(!s)return l;var c=s.find(1);if(c.line==n)return c;o=Zt(r,n=c.line)}}function wr(t,e,a,r){r-=mr(e);var n=e.text.length,i=lt((function(e){return ar(t,a,e-1).bottom<=r}),n,0);return{begin:i,end:n=lt((function(e){return ar(t,a,e).top>r}),i,n)}}function Mr(t,e,a,r){return a||(a=er(t,e)),wr(t,e,a,vr(t,e,ar(t,a,r),"line").top)}function _r(t,e,a,r){return!(t.bottom<=a)&&(t.top>a||(r?t.left:t.right)>e)}function Ar(t,e,a,r,n){n-=ia(e);var i=er(t,e),o=mr(e),l=0,s=e.text.length,c=!0,h=dt(e,t.doc.direction);if(h){var u=(t.options.lineWrapping?Vr:Hr)(t,e,a,i,h,r,n);l=(c=1!=u.level)?u.from:u.to-1,s=c?u.to:u.from-1}var d,p,m=null,v=null,f=lt((function(e){var a=ar(t,i,e);return a.top+=o,a.bottom+=o,!!_r(a,r,n,!1)&&(a.top<=n&&a.left<=r&&(m=e,v=a),!0)}),l,s),y=!1;if(v){var g=r-v.left<v.right-r,b=g==c;f=m+(b?0:1),p=b?"after":"before",d=g?v.left:v.right}else{c||f!=s&&f!=l||f++,p=0==f?"after":f==e.text.length?"before":ar(t,i,f-(c?1:0)).bottom+o<=n==c?"after":"before";var z=gr(t,ie(a,f,p),"line",e,i);d=z.left,y=n<z.top?-1:n>=z.bottom?1:0}return zr(a,f=ot(e.text,f,1),p,y,r-d)}function Hr(t,e,a,r,n,i,o){var l=lt((function(l){var s=n[l],c=1!=s.level;return _r(gr(t,ie(a,c?s.to:s.from,c?"before":"after"),"line",e,r),i,o,!0)}),0,n.length-1),s=n[l];if(l>0){var c=1!=s.level,h=gr(t,ie(a,c?s.from:s.to,c?"after":"before"),"line",e,r);_r(h,i,o,!0)&&h.top>o&&(s=n[l-1])}return s}function Vr(t,e,a,r,n,i,o){var l=wr(t,e,r,o),s=l.begin,c=l.end;/\s/.test(e.text.charAt(c-1))&&c--;for(var h=null,u=null,d=0;d<n.length;d++){var p=n[d];if(!(p.from>=c||p.to<=s)){var m=ar(t,r,1!=p.level?Math.min(c,p.to)-1:Math.max(s,p.from)).right,v=m<i?i-m+1e9:m-i;(!h||u>v)&&(h=p,u=v)}}return h||(h=n[n.length-1]),h.from<s&&(h={from:s,to:h.to,level:h.level}),h.to>c&&(h={from:h.from,to:c,level:h.level}),h}function Lr(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==rr){rr=B("pre",null,"CodeMirror-line-like");for(var e=0;e<49;++e)rr.appendChild(document.createTextNode("x")),rr.appendChild(B("br"));rr.appendChild(document.createTextNode("x"))}L(t.measure,rr);var a=rr.offsetHeight/50;return a>3&&(t.cachedTextHeight=a),V(t.measure),a||1}function Br(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=B("span","xxxxxxxxxx"),a=B("pre",[e],"CodeMirror-line-like");L(t.measure,a);var r=e.getBoundingClientRect(),n=(r.right-r.left)/10;return n>2&&(t.cachedCharWidth=n),n||10}function kr(t){for(var e=t.display,a={},r={},n=e.gutters.clientLeft,i=e.gutters.firstChild,o=0;i;i=i.nextSibling,++o){var l=t.display.gutterSpecs[o].className;a[l]=i.offsetLeft+i.clientLeft+n,r[l]=i.clientWidth}return{fixedPos:Cr(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:a,gutterWidth:r,wrapperWidth:e.wrapper.clientWidth}}function Cr(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function Sr(t){var e=Lr(t.display),a=t.options.lineWrapping,r=a&&Math.max(5,t.display.scroller.clientWidth/Br(t.display)-3);return function(n){if(ra(t.doc,n))return 0;var i=0;if(n.widgets)for(var o=0;o<n.widgets.length;o++)n.widgets[o].height&&(i+=n.widgets[o].height);return a?i+(Math.ceil(n.text.length/r)||1)*e:i+e}}function Er(t){var e=t.doc,a=Sr(t);e.iter((function(t){var e=a(t);e!=t.height&&te(t,e)}))}function Or(t,e,a,r){var n=t.display;if(!a&&"true"==Ht(e).getAttribute("cm-not-content"))return null;var i,o,l=n.lineSpace.getBoundingClientRect();try{i=e.clientX-l.left,o=e.clientY-l.top}catch(u){return null}var s,c=xr(t,i,o);if(r&&c.xRel>0&&(s=Zt(t.doc,c.line).text).length==c.ch){var h=F(s,s.length,t.options.tabSize)-s.length;c=ie(c.line,Math.max(0,Math.round((i-qa(t.display).left)/Br(t.display))-h))}return c}function Tr(t,e){if(e>=t.display.viewTo)return null;if((e-=t.display.viewFrom)<0)return null;for(var a=t.display.view,r=0;r<a.length;r++)if((e-=a[r].size)<0)return r}function Dr(t,e,a,r){null==e&&(e=t.doc.first),null==a&&(a=t.doc.first+t.doc.size),r||(r=0);var n=t.display;if(r&&a<n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>e)&&(n.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=n.viewTo)ke&&ea(t.doc,e)<n.viewTo&&Fr(t);else if(a<=n.viewFrom)ke&&aa(t.doc,a+r)>n.viewFrom?Fr(t):(n.viewFrom+=r,n.viewTo+=r);else if(e<=n.viewFrom&&a>=n.viewTo)Fr(t);else if(e<=n.viewFrom){var i=Ir(t,a,a+r,1);i?(n.view=n.view.slice(i.index),n.viewFrom=i.lineN,n.viewTo+=r):Fr(t)}else if(a>=n.viewTo){var o=Ir(t,e,e,-1);o?(n.view=n.view.slice(0,o.index),n.viewTo=o.lineN):Fr(t)}else{var l=Ir(t,e,e,-1),s=Ir(t,a,a+r,1);l&&s?(n.view=n.view.slice(0,l.index).concat(wa(t,l.lineN,s.lineN)).concat(n.view.slice(s.index)),n.viewTo+=r):Fr(t)}var c=n.externalMeasured;c&&(a<c.lineN?c.lineN+=r:e<c.lineN+c.size&&(n.externalMeasured=null))}function jr(t,e,a){t.curOp.viewChanged=!0;var r=t.display,n=t.display.externalMeasured;if(n&&e>=n.lineN&&e<n.lineN+n.size&&(r.externalMeasured=null),!(e<r.viewFrom||e>=r.viewTo)){var i=r.view[Tr(t,e)];if(null!=i.node){var o=i.changes||(i.changes=[]);-1==P(o,a)&&o.push(a)}}}function Fr(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function Ir(t,e,a,r){var n,i=Tr(t,e),o=t.display.view;if(!ke||a==t.doc.first+t.doc.size)return{index:i,lineN:a};for(var l=t.display.viewFrom,s=0;s<i;s++)l+=o[s].size;if(l!=e){if(r>0){if(i==o.length-1)return null;n=l+o[i].size-e,i++}else n=l-e;e+=n,a+=n}for(;ea(t.doc,a)!=a;){if(i==(r<0?0:o.length-1))return null;a+=r*o[i-(r<0?1:0)].size,i+=r}return{index:i,lineN:a}}function Pr(t,e,a){var r=t.display;0==r.view.length||e>=r.viewTo||a<=r.viewFrom?(r.view=wa(t,e,a),r.viewFrom=e):(r.viewFrom>e?r.view=wa(t,e,r.viewFrom).concat(r.view):r.viewFrom<e&&(r.view=r.view.slice(Tr(t,e))),r.viewFrom=e,r.viewTo<a?r.view=r.view.concat(wa(t,r.viewTo,a)):r.viewTo>a&&(r.view=r.view.slice(0,Tr(t,a)))),r.viewTo=a}function Rr(t){for(var e=t.display.view,a=0,r=0;r<e.length;r++){var n=e[r];n.hidden||n.node&&!n.changes||++a}return a}function Nr(t){t.display.input.showSelection(t.display.input.prepareSelection())}function $r(t,e){void 0===e&&(e=!0);for(var a=t.doc,r={},n=r.cursors=document.createDocumentFragment(),i=r.selection=document.createDocumentFragment(),o=0;o<a.sel.ranges.length;o++)if(e||o!=a.sel.primIndex){var l=a.sel.ranges[o];if(!(l.from().line>=t.display.viewTo||l.to().line<t.display.viewFrom)){var s=l.empty();(s||t.options.showCursorWhenSelecting)&&Ur(t,l.head,n),s||qr(t,l,i)}}return r}function Ur(t,e,a){var r=gr(t,e,"div",null,null,!t.options.singleCursorHeightPerLine),n=a.appendChild(B("div"," ","CodeMirror-cursor"));if(n.style.left=r.left+"px",n.style.top=r.top+"px",n.style.height=Math.max(0,r.bottom-r.top)*t.options.cursorHeight+"px",r.other){var i=a.appendChild(B("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));i.style.display="",i.style.left=r.other.left+"px",i.style.top=r.other.top+"px",i.style.height=.85*(r.other.bottom-r.other.top)+"px"}}function Wr(t,e){return t.top-e.top||t.left-e.left}function qr(t,e,a){var r=t.display,n=t.doc,i=document.createDocumentFragment(),o=qa(t.display),l=o.left,s=Math.max(r.sizerWidth,Ya(t)-r.sizer.offsetLeft)-o.right,c="ltr"==n.direction;function h(t,e,a,r){e<0&&(e=0),e=Math.round(e),r=Math.round(r),i.appendChild(B("div",null,"CodeMirror-selected","position: absolute; left: "+t+"px;\n top: "+e+"px; width: "+(null==a?s-t:a)+"px;\n height: "+(r-e)+"px"))}function u(e,a,r){var i,o,u=Zt(n,e),d=u.text.length;function p(a,r){return yr(t,ie(e,a),"div",u,r)}function m(e,a,r){var n=Mr(t,u,null,e),i="ltr"==a==("after"==r)?"left":"right";return p("after"==r?n.begin:n.end-(/\s/.test(u.text.charAt(n.end-1))?2:1),i)[i]}var v=dt(u,n.direction);return st(v,a||0,null==r?d:r,(function(t,e,n,u){var f="ltr"==n,y=p(t,f?"left":"right"),g=p(e-1,f?"right":"left"),b=null==a&&0==t,z=null==r&&e==d,x=0==u,w=!v||u==v.length-1;if(g.top-y.top<=3){var M=(c?z:b)&&w,_=(c?b:z)&&x?l:(f?y:g).left,A=M?s:(f?g:y).right;h(_,y.top,A-_,y.bottom)}else{var H,V,L,B;f?(H=c&&b&&x?l:y.left,V=c?s:m(t,n,"before"),L=c?l:m(e,n,"after"),B=c&&z&&w?s:g.right):(H=c?m(t,n,"before"):l,V=!c&&b&&x?s:y.right,L=!c&&z&&w?l:g.left,B=c?m(e,n,"after"):s),h(H,y.top,V-H,y.bottom),y.bottom<g.top&&h(l,y.bottom,null,g.top),h(L,g.top,B-L,g.bottom)}(!i||Wr(y,i)<0)&&(i=y),Wr(g,i)<0&&(i=g),(!o||Wr(y,o)<0)&&(o=y),Wr(g,o)<0&&(o=g)})),{start:i,end:o}}var d=e.from(),p=e.to();if(d.line==p.line)u(d.line,d.ch,p.ch);else{var m=Zt(n,d.line),v=Zt(n,p.line),f=Xe(m)==Xe(v),y=u(d.line,d.ch,f?m.text.length+1:null).end,g=u(p.line,f?0:null,p.ch).start;f&&(y.top<g.top-2?(h(y.right,y.top,null,y.bottom),h(l,g.top,g.left,g.bottom)):h(y.right,y.top,g.left-y.right,y.bottom)),y.bottom<g.top&&h(l,y.bottom,null,g.top)}a.appendChild(i)}function Gr(t){if(t.state.focused){var e=t.display;clearInterval(e.blinker);var a=!0;e.cursorDiv.style.visibility="",t.options.cursorBlinkRate>0?e.blinker=setInterval((function(){t.hasFocus()||Zr(t),e.cursorDiv.style.visibility=(a=!a)?"":"hidden"}),t.options.cursorBlinkRate):t.options.cursorBlinkRate<0&&(e.cursorDiv.style.visibility="hidden")}}function Yr(t){t.hasFocus()||(t.display.input.focus(),t.state.focused||Jr(t))}function Kr(t){t.state.delayingBlurEvent=!0,setTimeout((function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,t.state.focused&&Zr(t))}),100)}function Jr(t,e){t.state.delayingBlurEvent&&!t.state.draggingText&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(yt(t,"focus",t,e),t.state.focused=!0,E(t.display.wrapper,"CodeMirror-focused"),t.curOp||t.display.selForContextMenu==t.doc.sel||(t.display.input.reset(),s&&setTimeout((function(){return t.display.input.reset(!0)}),20)),t.display.input.receivedFocus()),Gr(t))}function Zr(t,e){t.state.delayingBlurEvent||(t.state.focused&&(yt(t,"blur",t,e),t.state.focused=!1,H(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout((function(){t.state.focused||(t.display.shift=!1)}),150))}function Xr(t){for(var e=t.display,a=e.lineDiv.offsetTop,r=0;r<e.view.length;r++){var n=e.view[r],i=t.options.lineWrapping,s=void 0,c=0;if(!n.hidden){if(o&&l<8){var h=n.node.offsetTop+n.node.offsetHeight;s=h-a,a=h}else{var u=n.node.getBoundingClientRect();s=u.bottom-u.top,!i&&n.text.firstChild&&(c=n.text.firstChild.getBoundingClientRect().right-u.left-1)}var d=n.line.height-s;if((d>.005||d<-.005)&&(te(n.line,s),Qr(n.line),n.rest))for(var p=0;p<n.rest.length;p++)Qr(n.rest[p]);if(c>t.display.sizerWidth){var m=Math.ceil(c/Br(t.display));m>t.display.maxLineLength&&(t.display.maxLineLength=m,t.display.maxLine=n.line,t.display.maxLineChanged=!0)}}}}function Qr(t){if(t.widgets)for(var e=0;e<t.widgets.length;++e){var a=t.widgets[e],r=a.node.parentNode;r&&(a.height=r.offsetHeight)}}function tn(t,e,a){var r=a&&null!=a.top?Math.max(0,a.top):t.scroller.scrollTop;r=Math.floor(r-Ua(t));var n=a&&null!=a.bottom?a.bottom:r+t.wrapper.clientHeight,i=ae(e,r),o=ae(e,n);if(a&&a.ensure){var l=a.ensure.from.line,s=a.ensure.to.line;l<i?(i=l,o=ae(e,ia(Zt(e,l))+t.wrapper.clientHeight)):Math.min(s,e.lastLine())>=o&&(i=ae(e,ia(Zt(e,s))-t.wrapper.clientHeight),o=s)}return{from:i,to:Math.max(o,i+1)}}function en(t,e){if(!gt(t,"scrollCursorIntoView")){var a=t.display,r=a.sizer.getBoundingClientRect(),n=null;if(e.top+r.top<0?n=!0:e.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(n=!1),null!=n&&!m){var i=B("div","​",null,"position: absolute;\n top: "+(e.top-a.viewOffset-Ua(t.display))+"px;\n height: "+(e.bottom-e.top+Ga(t)+a.barHeight)+"px;\n left: "+e.left+"px; width: "+Math.max(2,e.right-e.left)+"px;");t.display.lineSpace.appendChild(i),i.scrollIntoView(n),t.display.lineSpace.removeChild(i)}}}function an(t,e,a,r){var n;null==r&&(r=0),t.options.lineWrapping||e!=a||(a="before"==(e=e.ch?ie(e.line,"before"==e.sticky?e.ch-1:e.ch,"after"):e).sticky?ie(e.line,e.ch+1,"before"):e);for(var i=0;i<5;i++){var o=!1,l=gr(t,e),s=a&&a!=e?gr(t,a):l,c=nn(t,n={left:Math.min(l.left,s.left),top:Math.min(l.top,s.top)-r,right:Math.max(l.left,s.left),bottom:Math.max(l.bottom,s.bottom)+r}),h=t.doc.scrollTop,u=t.doc.scrollLeft;if(null!=c.scrollTop&&(dn(t,c.scrollTop),Math.abs(t.doc.scrollTop-h)>1&&(o=!0)),null!=c.scrollLeft&&(mn(t,c.scrollLeft),Math.abs(t.doc.scrollLeft-u)>1&&(o=!0)),!o)break}return n}function rn(t,e){var a=nn(t,e);null!=a.scrollTop&&dn(t,a.scrollTop),null!=a.scrollLeft&&mn(t,a.scrollLeft)}function nn(t,e){var a=t.display,r=Lr(t.display);e.top<0&&(e.top=0);var n=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:a.scroller.scrollTop,i=Ka(t),o={};e.bottom-e.top>i&&(e.bottom=e.top+i);var l=t.doc.height+Wa(a),s=e.top<r,c=e.bottom>l-r;if(e.top<n)o.scrollTop=s?0:e.top;else if(e.bottom>n+i){var h=Math.min(e.top,(c?l:e.bottom)-i);h!=n&&(o.scrollTop=h)}var u=t.options.fixedGutter?0:a.gutters.offsetWidth,d=t.curOp&&null!=t.curOp.scrollLeft?t.curOp.scrollLeft:a.scroller.scrollLeft-u,p=Ya(t)-a.gutters.offsetWidth,m=e.right-e.left>p;return m&&(e.right=e.left+p),e.left<10?o.scrollLeft=0:e.left<d?o.scrollLeft=Math.max(0,e.left+u-(m?0:10)):e.right>p+d-3&&(o.scrollLeft=e.right+(m?0:10)-p),o}function on(t,e){null!=e&&(hn(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+e)}function ln(t){hn(t);var e=t.getCursor();t.curOp.scrollToPos={from:e,to:e,margin:t.options.cursorScrollMargin}}function sn(t,e,a){null==e&&null==a||hn(t),null!=e&&(t.curOp.scrollLeft=e),null!=a&&(t.curOp.scrollTop=a)}function cn(t,e){hn(t),t.curOp.scrollToPos=e}function hn(t){var e=t.curOp.scrollToPos;e&&(t.curOp.scrollToPos=null,un(t,br(t,e.from),br(t,e.to),e.margin))}function un(t,e,a,r){var n=nn(t,{left:Math.min(e.left,a.left),top:Math.min(e.top,a.top)-r,right:Math.max(e.right,a.right),bottom:Math.max(e.bottom,a.bottom)+r});sn(t,n.scrollLeft,n.scrollTop)}function dn(t,e){Math.abs(t.doc.scrollTop-e)<2||(a||$n(t,{top:e}),pn(t,e,!0),a&&$n(t),Tn(t,100))}function pn(t,e,a){e=Math.max(0,Math.min(t.display.scroller.scrollHeight-t.display.scroller.clientHeight,e)),(t.display.scroller.scrollTop!=e||a)&&(t.doc.scrollTop=e,t.display.scrollbars.setScrollTop(e),t.display.scroller.scrollTop!=e&&(t.display.scroller.scrollTop=e))}function mn(t,e,a,r){e=Math.max(0,Math.min(e,t.display.scroller.scrollWidth-t.display.scroller.clientWidth)),(a?e==t.doc.scrollLeft:Math.abs(t.doc.scrollLeft-e)<2)&&!r||(t.doc.scrollLeft=e,Gn(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function vn(t){var e=t.display,a=e.gutters.offsetWidth,r=Math.round(t.doc.height+Wa(t.display));return{clientHeight:e.scroller.clientHeight,viewHeight:e.wrapper.clientHeight,scrollWidth:e.scroller.scrollWidth,clientWidth:e.scroller.clientWidth,viewWidth:e.wrapper.clientWidth,barLeft:t.options.fixedGutter?a:0,docHeight:r,scrollHeight:r+Ga(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:a}}var fn=function(t,e,a){this.cm=a;var r=this.vert=B("div",[B("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),n=this.horiz=B("div",[B("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=n.tabIndex=-1,t(r),t(n),mt(r,"scroll",(function(){r.clientHeight&&e(r.scrollTop,"vertical")})),mt(n,"scroll",(function(){n.clientWidth&&e(n.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,o&&l<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};fn.prototype.update=function(t){var e=t.scrollWidth>t.clientWidth+1,a=t.scrollHeight>t.clientHeight+1,r=t.nativeBarWidth;if(a){this.vert.style.display="block",this.vert.style.bottom=e?r+"px":"0";var n=t.viewHeight-(e?r:0);this.vert.firstChild.style.height=Math.max(0,t.scrollHeight-t.clientHeight+n)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(e){this.horiz.style.display="block",this.horiz.style.right=a?r+"px":"0",this.horiz.style.left=t.barLeft+"px";var i=t.viewWidth-t.barLeft-(a?r:0);this.horiz.firstChild.style.width=Math.max(0,t.scrollWidth-t.clientWidth+i)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&t.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:a?r:0,bottom:e?r:0}},fn.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},fn.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},fn.prototype.zeroWidthHack=function(){var t=g&&!p?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new I,this.disableVert=new I},fn.prototype.enableZeroWidthBar=function(t,e,a){function r(){var n=t.getBoundingClientRect();("vert"==a?document.elementFromPoint(n.right-1,(n.top+n.bottom)/2):document.elementFromPoint((n.right+n.left)/2,n.bottom-1))!=t?t.style.pointerEvents="none":e.set(1e3,r)}t.style.pointerEvents="auto",e.set(1e3,r)},fn.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var yn=function(){};function gn(t,e){e||(e=vn(t));var a=t.display.barWidth,r=t.display.barHeight;bn(t,e);for(var n=0;n<4&&a!=t.display.barWidth||r!=t.display.barHeight;n++)a!=t.display.barWidth&&t.options.lineWrapping&&Xr(t),bn(t,vn(t)),a=t.display.barWidth,r=t.display.barHeight}function bn(t,e){var a=t.display,r=a.scrollbars.update(e);a.sizer.style.paddingRight=(a.barWidth=r.right)+"px",a.sizer.style.paddingBottom=(a.barHeight=r.bottom)+"px",a.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(a.scrollbarFiller.style.display="block",a.scrollbarFiller.style.height=r.bottom+"px",a.scrollbarFiller.style.width=r.right+"px"):a.scrollbarFiller.style.display="",r.bottom&&t.options.coverGutterNextToScrollbar&&t.options.fixedGutter?(a.gutterFiller.style.display="block",a.gutterFiller.style.height=r.bottom+"px",a.gutterFiller.style.width=e.gutterWidth+"px"):a.gutterFiller.style.display=""}yn.prototype.update=function(){return{bottom:0,right:0}},yn.prototype.setScrollLeft=function(){},yn.prototype.setScrollTop=function(){},yn.prototype.clear=function(){};var zn={native:fn,null:yn};function xn(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&H(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new zn[t.options.scrollbarStyle]((function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),mt(e,"mousedown",(function(){t.state.focused&&setTimeout((function(){return t.display.input.focus()}),0)})),e.setAttribute("cm-not-content","true")}),(function(e,a){"horizontal"==a?mn(t,e):dn(t,e)}),t),t.display.scrollbars.addClass&&E(t.display.wrapper,t.display.scrollbars.addClass)}var wn=0;function Mn(t){t.curOp={cm:t,viewChanged:!1,startHeight:t.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++wn},_a(t.curOp)}function _n(t){var e=t.curOp;e&&Ha(e,(function(t){for(var e=0;e<t.ops.length;e++)t.ops[e].cm.curOp=null;An(t)}))}function An(t){for(var e=t.ops,a=0;a<e.length;a++)Hn(e[a]);for(var r=0;r<e.length;r++)Vn(e[r]);for(var n=0;n<e.length;n++)Ln(e[n]);for(var i=0;i<e.length;i++)Bn(e[i]);for(var o=0;o<e.length;o++)kn(e[o])}function Hn(t){var e=t.cm,a=e.display;Fn(e),t.updateMaxLine&&la(e),t.mustUpdate=t.viewChanged||t.forceUpdate||null!=t.scrollTop||t.scrollToPos&&(t.scrollToPos.from.line<a.viewFrom||t.scrollToPos.to.line>=a.viewTo)||a.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new jn(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function Vn(t){t.updatedDisplay=t.mustUpdate&&Rn(t.cm,t.update)}function Ln(t){var e=t.cm,a=e.display;t.updatedDisplay&&Xr(e),t.barMeasure=vn(e),a.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=Qa(e,a.maxLine,a.maxLine.text.length).left+3,e.display.sizerWidth=t.adjustWidthTo,t.barMeasure.scrollWidth=Math.max(a.scroller.clientWidth,a.sizer.offsetLeft+t.adjustWidthTo+Ga(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,a.sizer.offsetLeft+t.adjustWidthTo-Ya(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=a.input.prepareSelection())}function Bn(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLeft<e.doc.scrollLeft&&mn(e,Math.min(e.display.scroller.scrollLeft,t.maxScrollLeft),!0),e.display.maxLineChanged=!1);var a=t.focus&&t.focus==S();t.preparedSelection&&e.display.input.showSelection(t.preparedSelection,a),(t.updatedDisplay||t.startHeight!=e.doc.height)&&gn(e,t.barMeasure),t.updatedDisplay&&qn(e,t.barMeasure),t.selectionChanged&&Gr(e),e.state.focused&&t.updateInput&&e.display.input.reset(t.typing),a&&Yr(t.cm)}function kn(t){var e=t.cm,a=e.display,r=e.doc;t.updatedDisplay&&Nn(e,t.update),null==a.wheelStartX||null==t.scrollTop&&null==t.scrollLeft&&!t.scrollToPos||(a.wheelStartX=a.wheelStartY=null),null!=t.scrollTop&&pn(e,t.scrollTop,t.forceScroll),null!=t.scrollLeft&&mn(e,t.scrollLeft,!0,!0),t.scrollToPos&&en(e,an(e,de(r,t.scrollToPos.from),de(r,t.scrollToPos.to),t.scrollToPos.margin));var n=t.maybeHiddenMarkers,i=t.maybeUnhiddenMarkers;if(n)for(var o=0;o<n.length;++o)n[o].lines.length||yt(n[o],"hide");if(i)for(var l=0;l<i.length;++l)i[l].lines.length&&yt(i[l],"unhide");a.wrapper.offsetHeight&&(r.scrollTop=e.display.scroller.scrollTop),t.changeObjs&&yt(e,"changes",e,t.changeObjs),t.update&&t.update.finish()}function Cn(t,e){if(t.curOp)return e();Mn(t);try{return e()}finally{_n(t)}}function Sn(t,e){return function(){if(t.curOp)return e.apply(t,arguments);Mn(t);try{return e.apply(t,arguments)}finally{_n(t)}}}function En(t){return function(){if(this.curOp)return t.apply(this,arguments);Mn(this);try{return t.apply(this,arguments)}finally{_n(this)}}}function On(t){return function(){var e=this.cm;if(!e||e.curOp)return t.apply(this,arguments);Mn(e);try{return t.apply(this,arguments)}finally{_n(e)}}}function Tn(t,e){t.doc.highlightFrontier<t.display.viewTo&&t.state.highlight.set(e,D(Dn,t))}function Dn(t){var e=t.doc;if(!(e.highlightFrontier>=t.display.viewTo)){var a=+new Date+t.options.workTime,r=be(t,e.highlightFrontier),n=[];e.iter(r.line,Math.min(e.first+e.size,t.display.viewTo+500),(function(i){if(r.line>=t.display.viewFrom){var o=i.styles,l=i.text.length>t.options.maxHighlightLength?Gt(e.mode,r.state):null,s=ye(t,i,r,!0);l&&(r.state=l),i.styles=s.styles;var c=i.styleClasses,h=s.classes;h?i.styleClasses=h:c&&(i.styleClasses=null);for(var u=!o||o.length!=i.styles.length||c!=h&&(!c||!h||c.bgClass!=h.bgClass||c.textClass!=h.textClass),d=0;!u&&d<o.length;++d)u=o[d]!=i.styles[d];u&&n.push(r.line),i.stateAfter=r.save(),r.nextLine()}else i.text.length<=t.options.maxHighlightLength&&ze(t,i.text,r),i.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>a)return Tn(t,t.options.workDelay),!0})),e.highlightFrontier=r.line,e.modeFrontier=Math.max(e.modeFrontier,r.line),n.length&&Cn(t,(function(){for(var e=0;e<n.length;e++)jr(t,n[e],"text")}))}}var jn=function(t,e,a){var r=t.display;this.viewport=e,this.visible=tn(r,t.doc,e),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=Ya(t),this.force=a,this.dims=kr(t),this.events=[]};function Fn(t){var e=t.display;!e.scrollbarsClipped&&e.scroller.offsetWidth&&(e.nativeBarWidth=e.scroller.offsetWidth-e.scroller.clientWidth,e.heightForcer.style.height=Ga(t)+"px",e.sizer.style.marginBottom=-e.nativeBarWidth+"px",e.sizer.style.borderRightWidth=Ga(t)+"px",e.scrollbarsClipped=!0)}function In(t){if(t.hasFocus())return null;var e=S();if(!e||!C(t.display.lineDiv,e))return null;var a={activeElt:e};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&C(t.display.lineDiv,r.anchorNode)&&(a.anchorNode=r.anchorNode,a.anchorOffset=r.anchorOffset,a.focusNode=r.focusNode,a.focusOffset=r.focusOffset)}return a}function Pn(t){if(t&&t.activeElt&&t.activeElt!=S()&&(t.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(t.activeElt.nodeName)&&t.anchorNode&&C(document.body,t.anchorNode)&&C(document.body,t.focusNode))){var e=window.getSelection(),a=document.createRange();a.setEnd(t.anchorNode,t.anchorOffset),a.collapse(!1),e.removeAllRanges(),e.addRange(a),e.extend(t.focusNode,t.focusOffset)}}function Rn(t,e){var a=t.display,r=t.doc;if(e.editorIsHidden)return Fr(t),!1;if(!e.force&&e.visible.from>=a.viewFrom&&e.visible.to<=a.viewTo&&(null==a.updateLineNumbers||a.updateLineNumbers>=a.viewTo)&&a.renderedView==a.view&&0==Rr(t))return!1;Yn(t)&&(Fr(t),e.dims=kr(t));var n=r.first+r.size,i=Math.max(e.visible.from-t.options.viewportMargin,r.first),o=Math.min(n,e.visible.to+t.options.viewportMargin);a.viewFrom<i&&i-a.viewFrom<20&&(i=Math.max(r.first,a.viewFrom)),a.viewTo>o&&a.viewTo-o<20&&(o=Math.min(n,a.viewTo)),ke&&(i=ea(t.doc,i),o=aa(t.doc,o));var l=i!=a.viewFrom||o!=a.viewTo||a.lastWrapHeight!=e.wrapperHeight||a.lastWrapWidth!=e.wrapperWidth;Pr(t,i,o),a.viewOffset=ia(Zt(t.doc,a.viewFrom)),t.display.mover.style.top=a.viewOffset+"px";var s=Rr(t);if(!l&&0==s&&!e.force&&a.renderedView==a.view&&(null==a.updateLineNumbers||a.updateLineNumbers>=a.viewTo))return!1;var c=In(t);return s>4&&(a.lineDiv.style.display="none"),Un(t,a.updateLineNumbers,e.dims),s>4&&(a.lineDiv.style.display=""),a.renderedView=a.view,Pn(c),V(a.cursorDiv),V(a.selectionDiv),a.gutters.style.height=a.sizer.style.minHeight=0,l&&(a.lastWrapHeight=e.wrapperHeight,a.lastWrapWidth=e.wrapperWidth,Tn(t,400)),a.updateLineNumbers=null,!0}function Nn(t,e){for(var a=e.viewport,r=!0;;r=!1){if(r&&t.options.lineWrapping&&e.oldDisplayWidth!=Ya(t))r&&(e.visible=tn(t.display,t.doc,a));else if(a&&null!=a.top&&(a={top:Math.min(t.doc.height+Wa(t.display)-Ka(t),a.top)}),e.visible=tn(t.display,t.doc,a),e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)break;if(!Rn(t,e))break;Xr(t);var n=vn(t);Nr(t),gn(t,n),qn(t,n),e.force=!1}e.signal(t,"update",t),t.display.viewFrom==t.display.reportedViewFrom&&t.display.viewTo==t.display.reportedViewTo||(e.signal(t,"viewportChange",t,t.display.viewFrom,t.display.viewTo),t.display.reportedViewFrom=t.display.viewFrom,t.display.reportedViewTo=t.display.viewTo)}function $n(t,e){var a=new jn(t,e);if(Rn(t,a)){Xr(t),Nn(t,a);var r=vn(t);Nr(t),gn(t,r),qn(t,r),a.finish()}}function Un(t,e,a){var r=t.display,n=t.options.lineNumbers,i=r.lineDiv,o=i.firstChild;function l(e){var a=e.nextSibling;return s&&g&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),a}for(var c=r.view,h=r.viewFrom,u=0;u<c.length;u++){var d=c[u];if(d.hidden);else if(d.node&&d.node.parentNode==i){for(;o!=d.node;)o=l(o);var p=n&&null!=e&&e<=h&&d.lineNumber;d.changes&&(P(d.changes,"gutter")>-1&&(p=!1),ka(t,d,h,a)),p&&(V(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(ne(t.options,h)))),o=d.node.nextSibling}else{var m=Fa(t,d,h,a);i.insertBefore(m,o)}h+=d.size}for(;o;)o=l(o)}function Wn(t){var e=t.gutters.offsetWidth;t.sizer.style.marginLeft=e+"px"}function qn(t,e){t.display.sizer.style.minHeight=e.docHeight+"px",t.display.heightForcer.style.top=e.docHeight+"px",t.display.gutters.style.height=e.docHeight+t.display.barHeight+Ga(t)+"px"}function Gn(t){var e=t.display,a=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var r=Cr(e)-e.scroller.scrollLeft+t.doc.scrollLeft,n=e.gutters.offsetWidth,i=r+"px",o=0;o<a.length;o++)if(!a[o].hidden){t.options.fixedGutter&&(a[o].gutter&&(a[o].gutter.style.left=i),a[o].gutterBackground&&(a[o].gutterBackground.style.left=i));var l=a[o].alignable;if(l)for(var s=0;s<l.length;s++)l[s].style.left=i}t.options.fixedGutter&&(e.gutters.style.left=r+n+"px")}}function Yn(t){if(!t.options.lineNumbers)return!1;var e=t.doc,a=ne(t.options,e.first+e.size-1),r=t.display;if(a.length!=r.lineNumChars){var n=r.measure.appendChild(B("div",[B("div",a)],"CodeMirror-linenumber CodeMirror-gutter-elt")),i=n.firstChild.offsetWidth,o=n.offsetWidth-i;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(i,r.lineGutter.offsetWidth-o)+1,r.lineNumWidth=r.lineNumInnerWidth+o,r.lineNumChars=r.lineNumInnerWidth?a.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",Wn(t.display),!0}return!1}function Kn(t,e){for(var a=[],r=!1,n=0;n<t.length;n++){var i=t[n],o=null;if("string"!=typeof i&&(o=i.style,i=i.className),"CodeMirror-linenumbers"==i){if(!e)continue;r=!0}a.push({className:i,style:o})}return e&&!r&&a.push({className:"CodeMirror-linenumbers",style:null}),a}function Jn(t){var e=t.gutters,a=t.gutterSpecs;V(e),t.lineGutter=null;for(var r=0;r<a.length;++r){var n=a[r],i=n.className,o=n.style,l=e.appendChild(B("div",null,"CodeMirror-gutter "+i));o&&(l.style.cssText=o),"CodeMirror-linenumbers"==i&&(t.lineGutter=l,l.style.width=(t.lineNumWidth||1)+"px")}e.style.display=a.length?"":"none",Wn(t)}function Zn(t){Jn(t.display),Dr(t),Gn(t)}function Xn(t,e,r,n){var i=this;this.input=r,i.scrollbarFiller=B("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=B("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=k("div",null,"CodeMirror-code"),i.selectionDiv=B("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=B("div",null,"CodeMirror-cursors"),i.measure=B("div",null,"CodeMirror-measure"),i.lineMeasure=B("div",null,"CodeMirror-measure"),i.lineSpace=k("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var c=k("div",[i.lineSpace],"CodeMirror-lines");i.mover=B("div",[c],null,"position: relative"),i.sizer=B("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=B("div",null,null,"position: absolute; height: "+R+"px; width: 1px;"),i.gutters=B("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=B("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=B("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),o&&l<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),s||a&&y||(i.scroller.draggable=!0),t&&(t.appendChild?t.appendChild(i.wrapper):t(i.wrapper)),i.viewFrom=i.viewTo=e.first,i.reportedViewFrom=i.reportedViewTo=e.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,i.gutterSpecs=Kn(n.gutters,n.lineNumbers),Jn(i),r.init(i)}jn.prototype.signal=function(t,e){zt(t,e)&&this.events.push(arguments)},jn.prototype.finish=function(){for(var t=0;t<this.events.length;t++)yt.apply(null,this.events[t])};var Qn=0,ti=null;function ei(t){var e=t.wheelDeltaX,a=t.wheelDeltaY;return null==e&&t.detail&&t.axis==t.HORIZONTAL_AXIS&&(e=t.detail),null==a&&t.detail&&t.axis==t.VERTICAL_AXIS?a=t.detail:null==a&&(a=t.wheelDelta),{x:e,y:a}}function ai(t){var e=ei(t);return e.x*=ti,e.y*=ti,e}function ri(t,e){var r=ei(e),n=r.x,i=r.y,o=t.display,l=o.scroller,c=l.scrollWidth>l.clientWidth,h=l.scrollHeight>l.clientHeight;if(n&&c||i&&h){if(i&&g&&s)t:for(var d=e.target,p=o.view;d!=l;d=d.parentNode)for(var m=0;m<p.length;m++)if(p[m].node==d){t.display.currentWheelTarget=d;break t}if(n&&!a&&!u&&null!=ti)return i&&h&&dn(t,Math.max(0,l.scrollTop+i*ti)),mn(t,Math.max(0,l.scrollLeft+n*ti)),(!i||i&&h)&&wt(e),void(o.wheelStartX=null);if(i&&null!=ti){var v=i*ti,f=t.doc.scrollTop,y=f+o.wrapper.clientHeight;v<0?f=Math.max(0,f+v-50):y=Math.min(t.doc.height,y+v+50),$n(t,{top:f,bottom:y})}Qn<20&&(null==o.wheelStartX?(o.wheelStartX=l.scrollLeft,o.wheelStartY=l.scrollTop,o.wheelDX=n,o.wheelDY=i,setTimeout((function(){if(null!=o.wheelStartX){var t=l.scrollLeft-o.wheelStartX,e=l.scrollTop-o.wheelStartY,a=e&&o.wheelDY&&e/o.wheelDY||t&&o.wheelDX&&t/o.wheelDX;o.wheelStartX=o.wheelStartY=null,a&&(ti=(ti*Qn+a)/(Qn+1),++Qn)}}),200)):(o.wheelDX+=n,o.wheelDY+=i))}}o?ti=-.53:a?ti=15:h?ti=-.7:d&&(ti=-1/3);var ni=function(t,e){this.ranges=t,this.primIndex=e};ni.prototype.primary=function(){return this.ranges[this.primIndex]},ni.prototype.equals=function(t){if(t==this)return!0;if(t.primIndex!=this.primIndex||t.ranges.length!=this.ranges.length)return!1;for(var e=0;e<this.ranges.length;e++){var a=this.ranges[e],r=t.ranges[e];if(!le(a.anchor,r.anchor)||!le(a.head,r.head))return!1}return!0},ni.prototype.deepCopy=function(){for(var t=[],e=0;e<this.ranges.length;e++)t[e]=new ii(se(this.ranges[e].anchor),se(this.ranges[e].head));return new ni(t,this.primIndex)},ni.prototype.somethingSelected=function(){for(var t=0;t<this.ranges.length;t++)if(!this.ranges[t].empty())return!0;return!1},ni.prototype.contains=function(t,e){e||(e=t);for(var a=0;a<this.ranges.length;a++){var r=this.ranges[a];if(oe(e,r.from())>=0&&oe(t,r.to())<=0)return a}return-1};var ii=function(t,e){this.anchor=t,this.head=e};function oi(t,e,a){var r=t&&t.options.selectionsMayTouch,n=e[a];e.sort((function(t,e){return oe(t.from(),e.from())})),a=P(e,n);for(var i=1;i<e.length;i++){var o=e[i],l=e[i-1],s=oe(l.to(),o.from());if(r&&!o.empty()?s>0:s>=0){var c=he(l.from(),o.from()),h=ce(l.to(),o.to()),u=l.empty()?o.from()==o.head:l.from()==l.head;i<=a&&--a,e.splice(--i,2,new ii(u?h:c,u?c:h))}}return new ni(e,a)}function li(t,e){return new ni([new ii(t,e||t)],0)}function si(t){return t.text?ie(t.from.line+t.text.length-1,K(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function ci(t,e){if(oe(t,e.from)<0)return t;if(oe(t,e.to)<=0)return si(e);var a=t.line+e.text.length-(e.to.line-e.from.line)-1,r=t.ch;return t.line==e.to.line&&(r+=si(e).ch-e.to.ch),ie(a,r)}function hi(t,e){for(var a=[],r=0;r<t.sel.ranges.length;r++){var n=t.sel.ranges[r];a.push(new ii(ci(n.anchor,e),ci(n.head,e)))}return oi(t.cm,a,t.sel.primIndex)}function ui(t,e,a){return t.line==e.line?ie(a.line,t.ch-e.ch+a.ch):ie(a.line+(t.line-e.line),t.ch)}function di(t,e,a){for(var r=[],n=ie(t.first,0),i=n,o=0;o<e.length;o++){var l=e[o],s=ui(l.from,n,i),c=ui(si(l),n,i);if(n=l.to,i=c,"around"==a){var h=t.sel.ranges[o],u=oe(h.head,h.anchor)<0;r[o]=new ii(u?c:s,u?s:c)}else r[o]=new ii(s,s)}return new ni(r,t.sel.primIndex)}function pi(t){t.doc.mode=Ut(t.options,t.doc.modeOption),mi(t)}function mi(t){t.doc.iter((function(t){t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null)})),t.doc.modeFrontier=t.doc.highlightFrontier=t.doc.first,Tn(t,100),t.state.modeGen++,t.curOp&&Dr(t)}function vi(t,e){return 0==e.from.ch&&0==e.to.ch&&""==K(e.text)&&(!t.cm||t.cm.options.wholeLineUpdateBefore)}function fi(t,e,a,r){function n(t){return a?a[t]:null}function i(t,a,n){ca(t,a,n,r),La(t,"change",t,e)}function o(t,e){for(var a=[],i=t;i<e;++i)a.push(new sa(c[i],n(i),r));return a}var l=e.from,s=e.to,c=e.text,h=Zt(t,l.line),u=Zt(t,s.line),d=K(c),p=n(c.length-1),m=s.line-l.line;if(e.full)t.insert(0,o(0,c.length)),t.remove(c.length,t.size-c.length);else if(vi(t,e)){var v=o(0,c.length-1);i(u,u.text,p),m&&t.remove(l.line,m),v.length&&t.insert(l.line,v)}else if(h==u)if(1==c.length)i(h,h.text.slice(0,l.ch)+d+h.text.slice(s.ch),p);else{var f=o(1,c.length-1);f.push(new sa(d+h.text.slice(s.ch),p,r)),i(h,h.text.slice(0,l.ch)+c[0],n(0)),t.insert(l.line+1,f)}else if(1==c.length)i(h,h.text.slice(0,l.ch)+c[0]+u.text.slice(s.ch),n(0)),t.remove(l.line+1,m);else{i(h,h.text.slice(0,l.ch)+c[0],n(0)),i(u,d+u.text.slice(s.ch),p);var y=o(1,c.length-1);m>1&&t.remove(l.line+1,m-1),t.insert(l.line+1,y)}La(t,"change",t,e)}function yi(t,e,a){function r(t,n,i){if(t.linked)for(var o=0;o<t.linked.length;++o){var l=t.linked[o];if(l.doc!=n){var s=i&&l.sharedHist;a&&!s||(e(l.doc,s),r(l.doc,t,s))}}}r(t,null,!0)}function gi(t,e){if(e.cm)throw new Error("This document is already in use.");t.doc=e,e.cm=t,Er(t),pi(t),bi(t),t.options.lineWrapping||la(t),t.options.mode=e.modeOption,Dr(t)}function bi(t){("rtl"==t.doc.direction?E:H)(t.display.lineDiv,"CodeMirror-rtl")}function zi(t){Cn(t,(function(){bi(t),Dr(t)}))}function xi(t){this.done=[],this.undone=[],this.undoDepth=t?t.undoDepth:1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=t?t.maxGeneration:1}function wi(t,e){var a={from:se(e.from),to:si(e),text:Xt(t,e.from,e.to)};return Bi(t,a,e.from.line,e.to.line+1),yi(t,(function(t){return Bi(t,a,e.from.line,e.to.line+1)}),!0),a}function Mi(t){for(;t.length&&K(t).ranges;)t.pop()}function _i(t,e){return e?(Mi(t.done),K(t.done)):t.done.length&&!K(t.done).ranges?K(t.done):t.done.length>1&&!t.done[t.done.length-2].ranges?(t.done.pop(),K(t.done)):void 0}function Ai(t,e,a,r){var n=t.history;n.undone.length=0;var i,o,l=+new Date;if((n.lastOp==r||n.lastOrigin==e.origin&&e.origin&&("+"==e.origin.charAt(0)&&n.lastModTime>l-(t.cm?t.cm.options.historyEventDelay:500)||"*"==e.origin.charAt(0)))&&(i=_i(n,n.lastOp==r)))o=K(i.changes),0==oe(e.from,e.to)&&0==oe(e.from,o.to)?o.to=si(e):i.changes.push(wi(t,e));else{var s=K(n.done);for(s&&s.ranges||Li(t.sel,n.done),i={changes:[wi(t,e)],generation:n.generation},n.done.push(i);n.done.length>n.undoDepth;)n.done.shift(),n.done[0].ranges||n.done.shift()}n.done.push(a),n.generation=++n.maxGeneration,n.lastModTime=n.lastSelTime=l,n.lastOp=n.lastSelOp=r,n.lastOrigin=n.lastSelOrigin=e.origin,o||yt(t,"historyAdded")}function Hi(t,e,a,r){var n=e.charAt(0);return"*"==n||"+"==n&&a.ranges.length==r.ranges.length&&a.somethingSelected()==r.somethingSelected()&&new Date-t.history.lastSelTime<=(t.cm?t.cm.options.historyEventDelay:500)}function Vi(t,e,a,r){var n=t.history,i=r&&r.origin;a==n.lastSelOp||i&&n.lastSelOrigin==i&&(n.lastModTime==n.lastSelTime&&n.lastOrigin==i||Hi(t,i,K(n.done),e))?n.done[n.done.length-1]=e:Li(e,n.done),n.lastSelTime=+new Date,n.lastSelOrigin=i,n.lastSelOp=a,r&&!1!==r.clearRedo&&Mi(n.undone)}function Li(t,e){var a=K(e);a&&a.ranges&&a.equals(t)||e.push(t)}function Bi(t,e,a,r){var n=e["spans_"+t.id],i=0;t.iter(Math.max(t.first,a),Math.min(t.first+t.size,r),(function(a){a.markedSpans&&((n||(n=e["spans_"+t.id]={}))[i]=a.markedSpans),++i}))}function ki(t){if(!t)return null;for(var e,a=0;a<t.length;++a)t[a].marker.explicitlyCleared?e||(e=t.slice(0,a)):e&&e.push(t[a]);return e?e.length?e:null:t}function Ci(t,e){var a=e["spans_"+t.id];if(!a)return null;for(var r=[],n=0;n<e.text.length;++n)r.push(ki(a[n]));return r}function Si(t,e){var a=Ci(t,e),r=Ie(t,e);if(!a)return r;if(!r)return a;for(var n=0;n<a.length;++n){var i=a[n],o=r[n];if(i&&o)t:for(var l=0;l<o.length;++l){for(var s=o[l],c=0;c<i.length;++c)if(i[c].marker==s.marker)continue t;i.push(s)}else o&&(a[n]=o)}return a}function Ei(t,e,a){for(var r=[],n=0;n<t.length;++n){var i=t[n];if(i.ranges)r.push(a?ni.prototype.deepCopy.call(i):i);else{var o=i.changes,l=[];r.push({changes:l});for(var s=0;s<o.length;++s){var c=o[s],h=void 0;if(l.push({from:c.from,to:c.to,text:c.text}),e)for(var u in c)(h=u.match(/^spans_(\d+)$/))&&P(e,Number(h[1]))>-1&&(K(l)[u]=c[u],delete c[u])}}}return r}function Oi(t,e,a,r){if(r){var n=t.anchor;if(a){var i=oe(e,n)<0;i!=oe(a,n)<0?(n=e,e=a):i!=oe(e,a)<0&&(e=a)}return new ii(n,e)}return new ii(a||e,e)}function Ti(t,e,a,r,n){null==n&&(n=t.cm&&(t.cm.display.shift||t.extend)),Ri(t,new ni([Oi(t.sel.primary(),e,a,n)],0),r)}function Di(t,e,a){for(var r=[],n=t.cm&&(t.cm.display.shift||t.extend),i=0;i<t.sel.ranges.length;i++)r[i]=Oi(t.sel.ranges[i],e[i],null,n);Ri(t,oi(t.cm,r,t.sel.primIndex),a)}function ji(t,e,a,r){var n=t.sel.ranges.slice(0);n[e]=a,Ri(t,oi(t.cm,n,t.sel.primIndex),r)}function Fi(t,e,a,r){Ri(t,li(e,a),r)}function Ii(t,e,a){var r={ranges:e.ranges,update:function(e){this.ranges=[];for(var a=0;a<e.length;a++)this.ranges[a]=new ii(de(t,e[a].anchor),de(t,e[a].head))},origin:a&&a.origin};return yt(t,"beforeSelectionChange",t,r),t.cm&&yt(t.cm,"beforeSelectionChange",t.cm,r),r.ranges!=e.ranges?oi(t.cm,r.ranges,r.ranges.length-1):e}function Pi(t,e,a){var r=t.history.done,n=K(r);n&&n.ranges?(r[r.length-1]=e,Ni(t,e,a)):Ri(t,e,a)}function Ri(t,e,a){Ni(t,e,a),Vi(t,t.sel,t.cm?t.cm.curOp.id:NaN,a)}function Ni(t,e,a){(zt(t,"beforeSelectionChange")||t.cm&&zt(t.cm,"beforeSelectionChange"))&&(e=Ii(t,e,a));var r=a&&a.bias||(oe(e.primary().head,t.sel.primary().head)<0?-1:1);$i(t,Wi(t,e,r,!0)),a&&!1===a.scroll||!t.cm||"nocursor"==t.cm.getOption("readOnly")||ln(t.cm)}function $i(t,e){e.equals(t.sel)||(t.sel=e,t.cm&&(t.cm.curOp.updateInput=1,t.cm.curOp.selectionChanged=!0,bt(t.cm)),La(t,"cursorActivity",t))}function Ui(t){$i(t,Wi(t,t.sel,null,!1))}function Wi(t,e,a,r){for(var n,i=0;i<e.ranges.length;i++){var o=e.ranges[i],l=e.ranges.length==t.sel.ranges.length&&t.sel.ranges[i],s=Gi(t,o.anchor,l&&l.anchor,a,r),c=Gi(t,o.head,l&&l.head,a,r);(n||s!=o.anchor||c!=o.head)&&(n||(n=e.ranges.slice(0,i)),n[i]=new ii(s,c))}return n?oi(t.cm,n,e.primIndex):e}function qi(t,e,a,r,n){var i=Zt(t,e.line);if(i.markedSpans)for(var o=0;o<i.markedSpans.length;++o){var l=i.markedSpans[o],s=l.marker,c="selectLeft"in s?!s.selectLeft:s.inclusiveLeft,h="selectRight"in s?!s.selectRight:s.inclusiveRight;if((null==l.from||(c?l.from<=e.ch:l.from<e.ch))&&(null==l.to||(h?l.to>=e.ch:l.to>e.ch))){if(n&&(yt(s,"beforeCursorEnter"),s.explicitlyCleared)){if(i.markedSpans){--o;continue}break}if(!s.atomic)continue;if(a){var u=s.find(r<0?1:-1),d=void 0;if((r<0?h:c)&&(u=Yi(t,u,-r,u&&u.line==e.line?i:null)),u&&u.line==e.line&&(d=oe(u,a))&&(r<0?d<0:d>0))return qi(t,u,e,r,n)}var p=s.find(r<0?-1:1);return(r<0?c:h)&&(p=Yi(t,p,r,p.line==e.line?i:null)),p?qi(t,p,e,r,n):null}}return e}function Gi(t,e,a,r,n){var i=r||1,o=qi(t,e,a,i,n)||!n&&qi(t,e,a,i,!0)||qi(t,e,a,-i,n)||!n&&qi(t,e,a,-i,!0);return o||(t.cantEdit=!0,ie(t.first,0))}function Yi(t,e,a,r){return a<0&&0==e.ch?e.line>t.first?de(t,ie(e.line-1)):null:a>0&&e.ch==(r||Zt(t,e.line)).text.length?e.line<t.first+t.size-1?ie(e.line+1,0):null:new ie(e.line,e.ch+a)}function Ki(t){t.setSelection(ie(t.firstLine(),0),ie(t.lastLine()),$)}function Ji(t,e,a){var r={canceled:!1,from:e.from,to:e.to,text:e.text,origin:e.origin,cancel:function(){return r.canceled=!0}};return a&&(r.update=function(e,a,n,i){e&&(r.from=de(t,e)),a&&(r.to=de(t,a)),n&&(r.text=n),void 0!==i&&(r.origin=i)}),yt(t,"beforeChange",t,r),t.cm&&yt(t.cm,"beforeChange",t.cm,r),r.canceled?(t.cm&&(t.cm.curOp.updateInput=2),null):{from:r.from,to:r.to,text:r.text,origin:r.origin}}function Zi(t,e,a){if(t.cm){if(!t.cm.curOp)return Sn(t.cm,Zi)(t,e,a);if(t.cm.state.suppressEdits)return}if(!(zt(t,"beforeChange")||t.cm&&zt(t.cm,"beforeChange"))||(e=Ji(t,e,!0))){var r=Be&&!a&&Re(t,e.from,e.to);if(r)for(var n=r.length-1;n>=0;--n)Xi(t,{from:r[n].from,to:r[n].to,text:n?[""]:e.text,origin:e.origin});else Xi(t,e)}}function Xi(t,e){if(1!=e.text.length||""!=e.text[0]||0!=oe(e.from,e.to)){var a=hi(t,e);Ai(t,e,a,t.cm?t.cm.curOp.id:NaN),eo(t,e,a,Ie(t,e));var r=[];yi(t,(function(t,a){a||-1!=P(r,t.history)||(oo(t.history,e),r.push(t.history)),eo(t,e,null,Ie(t,e))}))}}function Qi(t,e,a){var r=t.cm&&t.cm.state.suppressEdits;if(!r||a){for(var n,i=t.history,o=t.sel,l="undo"==e?i.done:i.undone,s="undo"==e?i.undone:i.done,c=0;c<l.length&&(n=l[c],a?!n.ranges||n.equals(t.sel):n.ranges);c++);if(c!=l.length){for(i.lastOrigin=i.lastSelOrigin=null;;){if(!(n=l.pop()).ranges){if(r)return void l.push(n);break}if(Li(n,s),a&&!n.equals(t.sel))return void Ri(t,n,{clearRedo:!1});o=n}var h=[];Li(o,s),s.push({changes:h,generation:i.generation}),i.generation=n.generation||++i.maxGeneration;for(var u=zt(t,"beforeChange")||t.cm&&zt(t.cm,"beforeChange"),d=function(a){var r=n.changes[a];if(r.origin=e,u&&!Ji(t,r,!1))return l.length=0,{};h.push(wi(t,r));var i=a?hi(t,r):K(l);eo(t,r,i,Si(t,r)),!a&&t.cm&&t.cm.scrollIntoView({from:r.from,to:si(r)});var o=[];yi(t,(function(t,e){e||-1!=P(o,t.history)||(oo(t.history,r),o.push(t.history)),eo(t,r,null,Si(t,r))}))},p=n.changes.length-1;p>=0;--p){var m=d(p);if(m)return m.v}}}}function to(t,e){if(0!=e&&(t.first+=e,t.sel=new ni(J(t.sel.ranges,(function(t){return new ii(ie(t.anchor.line+e,t.anchor.ch),ie(t.head.line+e,t.head.ch))})),t.sel.primIndex),t.cm)){Dr(t.cm,t.first,t.first-e,e);for(var a=t.cm.display,r=a.viewFrom;r<a.viewTo;r++)jr(t.cm,r,"gutter")}}function eo(t,e,a,r){if(t.cm&&!t.cm.curOp)return Sn(t.cm,eo)(t,e,a,r);if(e.to.line<t.first)to(t,e.text.length-1-(e.to.line-e.from.line));else if(!(e.from.line>t.lastLine())){if(e.from.line<t.first){var n=e.text.length-1-(t.first-e.from.line);to(t,n),e={from:ie(t.first,0),to:ie(e.to.line+n,e.to.ch),text:[K(e.text)],origin:e.origin}}var i=t.lastLine();e.to.line>i&&(e={from:e.from,to:ie(i,Zt(t,i).text.length),text:[e.text[0]],origin:e.origin}),e.removed=Xt(t,e.from,e.to),a||(a=hi(t,e)),t.cm?ao(t.cm,e,r):fi(t,e,r),Ni(t,a,$),t.cantEdit&&Gi(t,ie(t.firstLine(),0))&&(t.cantEdit=!1)}}function ao(t,e,a){var r=t.doc,n=t.display,i=e.from,o=e.to,l=!1,s=i.line;t.options.lineWrapping||(s=ee(Xe(Zt(r,i.line))),r.iter(s,o.line+1,(function(t){if(t==n.maxLine)return l=!0,!0}))),r.sel.contains(e.from,e.to)>-1&&bt(t),fi(r,e,a,Sr(t)),t.options.lineWrapping||(r.iter(s,i.line+e.text.length,(function(t){var e=oa(t);e>n.maxLineLength&&(n.maxLine=t,n.maxLineLength=e,n.maxLineChanged=!0,l=!1)})),l&&(t.curOp.updateMaxLine=!0)),Le(r,i.line),Tn(t,400);var c=e.text.length-(o.line-i.line)-1;e.full?Dr(t):i.line!=o.line||1!=e.text.length||vi(t.doc,e)?Dr(t,i.line,o.line+1,c):jr(t,i.line,"text");var h=zt(t,"changes"),u=zt(t,"change");if(u||h){var d={from:i,to:o,text:e.text,removed:e.removed,origin:e.origin};u&&La(t,"change",t,d),h&&(t.curOp.changeObjs||(t.curOp.changeObjs=[])).push(d)}t.display.selForContextMenu=null}function ro(t,e,a,r,n){var i;r||(r=a),oe(r,a)<0&&(a=(i=[r,a])[0],r=i[1]),"string"==typeof e&&(e=t.splitLines(e)),Zi(t,{from:a,to:r,text:e,origin:n})}function no(t,e,a,r){a<t.line?t.line+=r:e<t.line&&(t.line=e,t.ch=0)}function io(t,e,a,r){for(var n=0;n<t.length;++n){var i=t[n],o=!0;if(i.ranges){i.copied||((i=t[n]=i.deepCopy()).copied=!0);for(var l=0;l<i.ranges.length;l++)no(i.ranges[l].anchor,e,a,r),no(i.ranges[l].head,e,a,r)}else{for(var s=0;s<i.changes.length;++s){var c=i.changes[s];if(a<c.from.line)c.from=ie(c.from.line+r,c.from.ch),c.to=ie(c.to.line+r,c.to.ch);else if(e<=c.to.line){o=!1;break}}o||(t.splice(0,n+1),n=0)}}}function oo(t,e){var a=e.from.line,r=e.to.line,n=e.text.length-(r-a)-1;io(t.done,a,r,n),io(t.undone,a,r,n)}function lo(t,e,a,r){var n=e,i=e;return"number"==typeof e?i=Zt(t,ue(t,e)):n=ee(e),null==n?null:(r(i,n)&&t.cm&&jr(t.cm,n,a),i)}function so(t){this.lines=t,this.parent=null;for(var e=0,a=0;a<t.length;++a)t[a].parent=this,e+=t[a].height;this.height=e}function co(t){this.children=t;for(var e=0,a=0,r=0;r<t.length;++r){var n=t[r];e+=n.chunkSize(),a+=n.height,n.parent=this}this.size=e,this.height=a,this.parent=null}ii.prototype.from=function(){return he(this.anchor,this.head)},ii.prototype.to=function(){return ce(this.anchor,this.head)},ii.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},so.prototype={chunkSize:function(){return this.lines.length},removeInner:function(t,e){for(var a=t,r=t+e;a<r;++a){var n=this.lines[a];this.height-=n.height,ha(n),La(n,"delete")}this.lines.splice(t,e)},collapse:function(t){t.push.apply(t,this.lines)},insertInner:function(t,e,a){this.height+=a,this.lines=this.lines.slice(0,t).concat(e).concat(this.lines.slice(t));for(var r=0;r<e.length;++r)e[r].parent=this},iterN:function(t,e,a){for(var r=t+e;t<r;++t)if(a(this.lines[t]))return!0}},co.prototype={chunkSize:function(){return this.size},removeInner:function(t,e){this.size-=e;for(var a=0;a<this.children.length;++a){var r=this.children[a],n=r.chunkSize();if(t<n){var i=Math.min(e,n-t),o=r.height;if(r.removeInner(t,i),this.height-=o-r.height,n==i&&(this.children.splice(a--,1),r.parent=null),0==(e-=i))break;t=0}else t-=n}if(this.size-e<25&&(this.children.length>1||!(this.children[0]instanceof so))){var l=[];this.collapse(l),this.children=[new so(l)],this.children[0].parent=this}},collapse:function(t){for(var e=0;e<this.children.length;++e)this.children[e].collapse(t)},insertInner:function(t,e,a){this.size+=e.length,this.height+=a;for(var r=0;r<this.children.length;++r){var n=this.children[r],i=n.chunkSize();if(t<=i){if(n.insertInner(t,e,a),n.lines&&n.lines.length>50){for(var o=n.lines.length%25+25,l=o;l<n.lines.length;){var s=new so(n.lines.slice(l,l+=25));n.height-=s.height,this.children.splice(++r,0,s),s.parent=this}n.lines=n.lines.slice(0,o),this.maybeSpill()}break}t-=i}},maybeSpill:function(){if(!(this.children.length<=10)){var t=this;do{var e=new co(t.children.splice(t.children.length-5,5));if(t.parent){t.size-=e.size,t.height-=e.height;var a=P(t.parent.children,t);t.parent.children.splice(a+1,0,e)}else{var r=new co(t.children);r.parent=t,t.children=[r,e],t=r}e.parent=t.parent}while(t.children.length>10);t.parent.maybeSpill()}},iterN:function(t,e,a){for(var r=0;r<this.children.length;++r){var n=this.children[r],i=n.chunkSize();if(t<i){var o=Math.min(e,i-t);if(n.iterN(t,o,a))return!0;if(0==(e-=o))break;t=0}else t-=i}}};var ho=function(t,e,a){if(a)for(var r in a)a.hasOwnProperty(r)&&(this[r]=a[r]);this.doc=t,this.node=e};function uo(t,e,a){ia(e)<(t.curOp&&t.curOp.scrollTop||t.doc.scrollTop)&&on(t,a)}function po(t,e,a,r){var n=new ho(t,a,r),i=t.cm;return i&&n.noHScroll&&(i.display.alignWidgets=!0),lo(t,e,"widget",(function(e){var a=e.widgets||(e.widgets=[]);if(null==n.insertAt?a.push(n):a.splice(Math.min(a.length,Math.max(0,n.insertAt)),0,n),n.line=e,i&&!ra(t,e)){var r=ia(e)<t.scrollTop;te(e,e.height+Na(n)),r&&on(i,n.height),i.curOp.forceUpdate=!0}return!0})),i&&La(i,"lineWidgetAdded",i,n,"number"==typeof e?e:ee(e)),n}ho.prototype.clear=function(){var t=this.doc.cm,e=this.line.widgets,a=this.line,r=ee(a);if(null!=r&&e){for(var n=0;n<e.length;++n)e[n]==this&&e.splice(n--,1);e.length||(a.widgets=null);var i=Na(this);te(a,Math.max(0,a.height-i)),t&&(Cn(t,(function(){uo(t,a,-i),jr(t,r,"widget")})),La(t,"lineWidgetCleared",t,this,r))}},ho.prototype.changed=function(){var t=this,e=this.height,a=this.doc.cm,r=this.line;this.height=null;var n=Na(this)-e;n&&(ra(this.doc,r)||te(r,r.height+n),a&&Cn(a,(function(){a.curOp.forceUpdate=!0,uo(a,r,n),La(a,"lineWidgetChanged",a,t,ee(r))})))},xt(ho);var mo=0,vo=function(t,e){this.lines=[],this.type=e,this.doc=t,this.id=++mo};function fo(t,e,a,r,n){if(r&&r.shared)return go(t,e,a,r,n);if(t.cm&&!t.cm.curOp)return Sn(t.cm,fo)(t,e,a,r,n);var i=new vo(t,n),o=oe(e,a);if(r&&j(r,i,!1),o>0||0==o&&!1!==i.clearWhenEmpty)return i;if(i.replacedWith&&(i.collapsed=!0,i.widgetNode=k("span",[i.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||i.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(i.widgetNode.insertLeft=!0)),i.collapsed){if(Ze(t,e.line,e,a,i)||e.line!=a.line&&Ze(t,a.line,e,a,i))throw new Error("Inserting collapsed marker partially overlapping an existing one");Se()}i.addToHistory&&Ai(t,{from:e,to:a,origin:"markText"},t.sel,NaN);var l,s=e.line,c=t.cm;if(t.iter(s,a.line+1,(function(t){c&&i.collapsed&&!c.options.lineWrapping&&Xe(t)==c.display.maxLine&&(l=!0),i.collapsed&&s!=e.line&&te(t,0),De(t,new Ee(i,s==e.line?e.ch:null,s==a.line?a.ch:null)),++s})),i.collapsed&&t.iter(e.line,a.line+1,(function(e){ra(t,e)&&te(e,0)})),i.clearOnEnter&&mt(i,"beforeCursorEnter",(function(){return i.clear()})),i.readOnly&&(Ce(),(t.history.done.length||t.history.undone.length)&&t.clearHistory()),i.collapsed&&(i.id=++mo,i.atomic=!0),c){if(l&&(c.curOp.updateMaxLine=!0),i.collapsed)Dr(c,e.line,a.line+1);else if(i.className||i.startStyle||i.endStyle||i.css||i.attributes||i.title)for(var h=e.line;h<=a.line;h++)jr(c,h,"text");i.atomic&&Ui(c.doc),La(c,"markerAdded",c,i)}return i}vo.prototype.clear=function(){if(!this.explicitlyCleared){var t=this.doc.cm,e=t&&!t.curOp;if(e&&Mn(t),zt(this,"clear")){var a=this.find();a&&La(this,"clear",a.from,a.to)}for(var r=null,n=null,i=0;i<this.lines.length;++i){var o=this.lines[i],l=Oe(o.markedSpans,this);t&&!this.collapsed?jr(t,ee(o),"text"):t&&(null!=l.to&&(n=ee(o)),null!=l.from&&(r=ee(o))),o.markedSpans=Te(o.markedSpans,l),null==l.from&&this.collapsed&&!ra(this.doc,o)&&t&&te(o,Lr(t.display))}if(t&&this.collapsed&&!t.options.lineWrapping)for(var s=0;s<this.lines.length;++s){var c=Xe(this.lines[s]),h=oa(c);h>t.display.maxLineLength&&(t.display.maxLine=c,t.display.maxLineLength=h,t.display.maxLineChanged=!0)}null!=r&&t&&this.collapsed&&Dr(t,r,n+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&Ui(t.doc)),t&&La(t,"markerCleared",t,this,r,n),e&&_n(t),this.parent&&this.parent.clear()}},vo.prototype.find=function(t,e){var a,r;null==t&&"bookmark"==this.type&&(t=1);for(var n=0;n<this.lines.length;++n){var i=this.lines[n],o=Oe(i.markedSpans,this);if(null!=o.from&&(a=ie(e?i:ee(i),o.from),-1==t))return a;if(null!=o.to&&(r=ie(e?i:ee(i),o.to),1==t))return r}return a&&{from:a,to:r}},vo.prototype.changed=function(){var t=this,e=this.find(-1,!0),a=this,r=this.doc.cm;e&&r&&Cn(r,(function(){var n=e.line,i=ee(e.line),o=tr(r,i);if(o&&(cr(o),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!ra(a.doc,n)&&null!=a.height){var l=a.height;a.height=null;var s=Na(a)-l;s&&te(n,n.height+s)}La(r,"markerChanged",r,t)}))},vo.prototype.attachLine=function(t){if(!this.lines.length&&this.doc.cm){var e=this.doc.cm.curOp;e.maybeHiddenMarkers&&-1!=P(e.maybeHiddenMarkers,this)||(e.maybeUnhiddenMarkers||(e.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(t)},vo.prototype.detachLine=function(t){if(this.lines.splice(P(this.lines,t),1),!this.lines.length&&this.doc.cm){var e=this.doc.cm.curOp;(e.maybeHiddenMarkers||(e.maybeHiddenMarkers=[])).push(this)}},xt(vo);var yo=function(t,e){this.markers=t,this.primary=e;for(var a=0;a<t.length;++a)t[a].parent=this};function go(t,e,a,r,n){(r=j(r)).shared=!1;var i=[fo(t,e,a,r,n)],o=i[0],l=r.widgetNode;return yi(t,(function(t){l&&(r.widgetNode=l.cloneNode(!0)),i.push(fo(t,de(t,e),de(t,a),r,n));for(var s=0;s<t.linked.length;++s)if(t.linked[s].isParent)return;o=K(i)})),new yo(i,o)}function bo(t){return t.findMarks(ie(t.first,0),t.clipPos(ie(t.lastLine())),(function(t){return t.parent}))}function zo(t,e){for(var a=0;a<e.length;a++){var r=e[a],n=r.find(),i=t.clipPos(n.from),o=t.clipPos(n.to);if(oe(i,o)){var l=fo(t,i,o,r.primary,r.primary.type);r.markers.push(l),l.parent=r}}}function xo(t){for(var e=function(e){var a=t[e],r=[a.primary.doc];yi(a.primary.doc,(function(t){return r.push(t)}));for(var n=0;n<a.markers.length;n++){var i=a.markers[n];-1==P(r,i.doc)&&(i.parent=null,a.markers.splice(n--,1))}},a=0;a<t.length;a++)e(a)}yo.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var t=0;t<this.markers.length;++t)this.markers[t].clear();La(this,"clear")}},yo.prototype.find=function(t,e){return this.primary.find(t,e)},xt(yo);var wo=0,Mo=function(t,e,a,r,n){if(!(this instanceof Mo))return new Mo(t,e,a,r,n);null==a&&(a=0),co.call(this,[new so([new sa("",null)])]),this.first=a,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=a;var i=ie(a,0);this.sel=li(i),this.history=new xi(null),this.id=++wo,this.modeOption=e,this.lineSep=r,this.direction="rtl"==n?"rtl":"ltr",this.extend=!1,"string"==typeof t&&(t=this.splitLines(t)),fi(this,{from:i,to:i,text:t}),Ri(this,li(i),$)};Mo.prototype=Q(co.prototype,{constructor:Mo,iter:function(t,e,a){a?this.iterN(t-this.first,e-t,a):this.iterN(this.first,this.first+this.size,t)},insert:function(t,e){for(var a=0,r=0;r<e.length;++r)a+=e[r].height;this.insertInner(t-this.first,e,a)},remove:function(t,e){this.removeInner(t-this.first,e)},getValue:function(t){var e=Qt(this,this.first,this.first+this.size);return!1===t?e:e.join(t||this.lineSeparator())},setValue:On((function(t){var e=ie(this.first,0),a=this.first+this.size-1;Zi(this,{from:e,to:ie(a,Zt(this,a).text.length),text:this.splitLines(t),origin:"setValue",full:!0},!0),this.cm&&sn(this.cm,0,0),Ri(this,li(e),$)})),replaceRange:function(t,e,a,r){ro(this,t,e=de(this,e),a=a?de(this,a):e,r)},getRange:function(t,e,a){var r=Xt(this,de(this,t),de(this,e));return!1===a?r:r.join(a||this.lineSeparator())},getLine:function(t){var e=this.getLineHandle(t);return e&&e.text},getLineHandle:function(t){if(re(this,t))return Zt(this,t)},getLineNumber:function(t){return ee(t)},getLineHandleVisualStart:function(t){return"number"==typeof t&&(t=Zt(this,t)),Xe(t)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(t){return de(this,t)},getCursor:function(t){var e=this.sel.primary();return null==t||"head"==t?e.head:"anchor"==t?e.anchor:"end"==t||"to"==t||!1===t?e.to():e.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:On((function(t,e,a){Fi(this,de(this,"number"==typeof t?ie(t,e||0):t),null,a)})),setSelection:On((function(t,e,a){Fi(this,de(this,t),de(this,e||t),a)})),extendSelection:On((function(t,e,a){Ti(this,de(this,t),e&&de(this,e),a)})),extendSelections:On((function(t,e){Di(this,me(this,t),e)})),extendSelectionsBy:On((function(t,e){Di(this,me(this,J(this.sel.ranges,t)),e)})),setSelections:On((function(t,e,a){if(t.length){for(var r=[],n=0;n<t.length;n++)r[n]=new ii(de(this,t[n].anchor),de(this,t[n].head||t[n].anchor));null==e&&(e=Math.min(t.length-1,this.sel.primIndex)),Ri(this,oi(this.cm,r,e),a)}})),addSelection:On((function(t,e,a){var r=this.sel.ranges.slice(0);r.push(new ii(de(this,t),de(this,e||t))),Ri(this,oi(this.cm,r,r.length-1),a)})),getSelection:function(t){for(var e,a=this.sel.ranges,r=0;r<a.length;r++){var n=Xt(this,a[r].from(),a[r].to());e=e?e.concat(n):n}return!1===t?e:e.join(t||this.lineSeparator())},getSelections:function(t){for(var e=[],a=this.sel.ranges,r=0;r<a.length;r++){var n=Xt(this,a[r].from(),a[r].to());!1!==t&&(n=n.join(t||this.lineSeparator())),e[r]=n}return e},replaceSelection:function(t,e,a){for(var r=[],n=0;n<this.sel.ranges.length;n++)r[n]=t;this.replaceSelections(r,e,a||"+input")},replaceSelections:On((function(t,e,a){for(var r=[],n=this.sel,i=0;i<n.ranges.length;i++){var o=n.ranges[i];r[i]={from:o.from(),to:o.to(),text:this.splitLines(t[i]),origin:a}}for(var l=e&&"end"!=e&&di(this,r,e),s=r.length-1;s>=0;s--)Zi(this,r[s]);l?Pi(this,l):this.cm&&ln(this.cm)})),undo:On((function(){Qi(this,"undo")})),redo:On((function(){Qi(this,"redo")})),undoSelection:On((function(){Qi(this,"undo",!0)})),redoSelection:On((function(){Qi(this,"redo",!0)})),setExtending:function(t){this.extend=t},getExtending:function(){return this.extend},historySize:function(){for(var t=this.history,e=0,a=0,r=0;r<t.done.length;r++)t.done[r].ranges||++e;for(var n=0;n<t.undone.length;n++)t.undone[n].ranges||++a;return{undo:e,redo:a}},clearHistory:function(){var t=this;this.history=new xi(this.history),yi(this,(function(e){return e.history=t.history}),!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(t){return t&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(t){return this.history.generation==(t||this.cleanGeneration)},getHistory:function(){return{done:Ei(this.history.done),undone:Ei(this.history.undone)}},setHistory:function(t){var e=this.history=new xi(this.history);e.done=Ei(t.done.slice(0),null,!0),e.undone=Ei(t.undone.slice(0),null,!0)},setGutterMarker:On((function(t,e,a){return lo(this,t,"gutter",(function(t){var r=t.gutterMarkers||(t.gutterMarkers={});return r[e]=a,!a&&rt(r)&&(t.gutterMarkers=null),!0}))})),clearGutter:On((function(t){var e=this;this.iter((function(a){a.gutterMarkers&&a.gutterMarkers[t]&&lo(e,a,"gutter",(function(){return a.gutterMarkers[t]=null,rt(a.gutterMarkers)&&(a.gutterMarkers=null),!0}))}))})),lineInfo:function(t){var e;if("number"==typeof t){if(!re(this,t))return null;if(e=t,!(t=Zt(this,t)))return null}else if(null==(e=ee(t)))return null;return{line:e,handle:t,text:t.text,gutterMarkers:t.gutterMarkers,textClass:t.textClass,bgClass:t.bgClass,wrapClass:t.wrapClass,widgets:t.widgets}},addLineClass:On((function(t,e,a){return lo(this,t,"gutter"==e?"gutter":"class",(function(t){var r="text"==e?"textClass":"background"==e?"bgClass":"gutter"==e?"gutterClass":"wrapClass";if(t[r]){if(_(a).test(t[r]))return!1;t[r]+=" "+a}else t[r]=a;return!0}))})),removeLineClass:On((function(t,e,a){return lo(this,t,"gutter"==e?"gutter":"class",(function(t){var r="text"==e?"textClass":"background"==e?"bgClass":"gutter"==e?"gutterClass":"wrapClass",n=t[r];if(!n)return!1;if(null==a)t[r]=null;else{var i=n.match(_(a));if(!i)return!1;var o=i.index+i[0].length;t[r]=n.slice(0,i.index)+(i.index&&o!=n.length?" ":"")+n.slice(o)||null}return!0}))})),addLineWidget:On((function(t,e,a){return po(this,t,e,a)})),removeLineWidget:function(t){t.clear()},markText:function(t,e,a){return fo(this,de(this,t),de(this,e),a,a&&a.type||"range")},setBookmark:function(t,e){var a={replacedWith:e&&(null==e.nodeType?e.widget:e),insertLeft:e&&e.insertLeft,clearWhenEmpty:!1,shared:e&&e.shared,handleMouseEvents:e&&e.handleMouseEvents};return fo(this,t=de(this,t),t,a,"bookmark")},findMarksAt:function(t){var e=[],a=Zt(this,(t=de(this,t)).line).markedSpans;if(a)for(var r=0;r<a.length;++r){var n=a[r];(null==n.from||n.from<=t.ch)&&(null==n.to||n.to>=t.ch)&&e.push(n.marker.parent||n.marker)}return e},findMarks:function(t,e,a){t=de(this,t),e=de(this,e);var r=[],n=t.line;return this.iter(t.line,e.line+1,(function(i){var o=i.markedSpans;if(o)for(var l=0;l<o.length;l++){var s=o[l];null!=s.to&&n==t.line&&t.ch>=s.to||null==s.from&&n!=t.line||null!=s.from&&n==e.line&&s.from>=e.ch||a&&!a(s.marker)||r.push(s.marker.parent||s.marker)}++n})),r},getAllMarks:function(){var t=[];return this.iter((function(e){var a=e.markedSpans;if(a)for(var r=0;r<a.length;++r)null!=a[r].from&&t.push(a[r].marker)})),t},posFromIndex:function(t){var e,a=this.first,r=this.lineSeparator().length;return this.iter((function(n){var i=n.text.length+r;if(i>t)return e=t,!0;t-=i,++a})),de(this,ie(a,e))},indexFromPos:function(t){var e=(t=de(this,t)).ch;if(t.line<this.first||t.ch<0)return 0;var a=this.lineSeparator().length;return this.iter(this.first,t.line,(function(t){e+=t.text.length+a})),e},copy:function(t){var e=new Mo(Qt(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return e.scrollTop=this.scrollTop,e.scrollLeft=this.scrollLeft,e.sel=this.sel,e.extend=!1,t&&(e.history.undoDepth=this.history.undoDepth,e.setHistory(this.getHistory())),e},linkedDoc:function(t){t||(t={});var e=this.first,a=this.first+this.size;null!=t.from&&t.from>e&&(e=t.from),null!=t.to&&t.to<a&&(a=t.to);var r=new Mo(Qt(this,e,a),t.mode||this.modeOption,e,this.lineSep,this.direction);return t.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:t.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:t.sharedHist}],zo(r,bo(this)),r},unlinkDoc:function(t){if(t instanceof jl&&(t=t.doc),this.linked)for(var e=0;e<this.linked.length;++e)if(this.linked[e].doc==t){this.linked.splice(e,1),t.unlinkDoc(this),xo(bo(this));break}if(t.history==this.history){var a=[t.id];yi(t,(function(t){return a.push(t.id)}),!0),t.history=new xi(null),t.history.done=Ei(this.history.done,a),t.history.undone=Ei(this.history.undone,a)}},iterLinkedDocs:function(t){yi(this,t)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(t){return this.lineSep?t.split(this.lineSep):Ot(t)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:On((function(t){"rtl"!=t&&(t="ltr"),t!=this.direction&&(this.direction=t,this.iter((function(t){return t.order=null})),this.cm&&zi(this.cm))}))}),Mo.prototype.eachLine=Mo.prototype.iter;var _o=0;function Ao(t){var e=this;if(Lo(e),!gt(e,t)&&!$a(e.display,t)){wt(t),o&&(_o=+new Date);var a=Or(e,t,!0),r=t.dataTransfer.files;if(a&&!e.isReadOnly())if(r&&r.length&&window.FileReader&&window.File)for(var n=r.length,i=Array(n),l=0,s=function(){++l==n&&Sn(e,(function(){var t={from:a=de(e.doc,a),to:a,text:e.doc.splitLines(i.filter((function(t){return null!=t})).join(e.doc.lineSeparator())),origin:"paste"};Zi(e.doc,t),Pi(e.doc,li(de(e.doc,a),de(e.doc,si(t))))}))()},c=function(t,a){if(e.options.allowDropFileTypes&&-1==P(e.options.allowDropFileTypes,t.type))s();else{var r=new FileReader;r.onerror=function(){return s()},r.onload=function(){var t=r.result;/[\x00-\x08\x0e-\x1f]{2}/.test(t)||(i[a]=t),s()},r.readAsText(t)}},h=0;h<r.length;h++)c(r[h],h);else{if(e.state.draggingText&&e.doc.sel.contains(a)>-1)return e.state.draggingText(t),void setTimeout((function(){return e.display.input.focus()}),20);try{var u=t.dataTransfer.getData("Text");if(u){var d;if(e.state.draggingText&&!e.state.draggingText.copy&&(d=e.listSelections()),Ni(e.doc,li(a,a)),d)for(var p=0;p<d.length;++p)ro(e.doc,"",d[p].anchor,d[p].head,"drag");e.replaceSelection(u,"around","paste"),e.display.input.focus()}}catch(m){}}}}function Ho(t,e){if(o&&(!t.state.draggingText||+new Date-_o<100))At(e);else if(!gt(t,e)&&!$a(t.display,e)&&(e.dataTransfer.setData("Text",t.getSelection()),e.dataTransfer.effectAllowed="copyMove",e.dataTransfer.setDragImage&&!d)){var a=B("img",null,null,"position: fixed; left: 0; top: 0;");a.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",u&&(a.width=a.height=1,t.display.wrapper.appendChild(a),a._top=a.offsetTop),e.dataTransfer.setDragImage(a,0,0),u&&a.parentNode.removeChild(a)}}function Vo(t,e){var a=Or(t,e);if(a){var r=document.createDocumentFragment();Ur(t,a,r),t.display.dragCursor||(t.display.dragCursor=B("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),t.display.lineSpace.insertBefore(t.display.dragCursor,t.display.cursorDiv)),L(t.display.dragCursor,r)}}function Lo(t){t.display.dragCursor&&(t.display.lineSpace.removeChild(t.display.dragCursor),t.display.dragCursor=null)}function Bo(t){if(document.getElementsByClassName){for(var e=document.getElementsByClassName("CodeMirror"),a=[],r=0;r<e.length;r++){var n=e[r].CodeMirror;n&&a.push(n)}a.length&&a[0].operation((function(){for(var e=0;e<a.length;e++)t(a[e])}))}}var ko=!1;function Co(){ko||(So(),ko=!0)}function So(){var t;mt(window,"resize",(function(){null==t&&(t=setTimeout((function(){t=null,Bo(Eo)}),100))})),mt(window,"blur",(function(){return Bo(Zr)}))}function Eo(t){var e=t.display;e.cachedCharWidth=e.cachedTextHeight=e.cachedPaddingH=null,e.scrollbarsClipped=!1,t.setSize()}for(var Oo={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},To=0;To<10;To++)Oo[To+48]=Oo[To+96]=String(To);for(var Do=65;Do<=90;Do++)Oo[Do]=String.fromCharCode(Do);for(var jo=1;jo<=12;jo++)Oo[jo+111]=Oo[jo+63235]="F"+jo;var Fo={};function Io(t){var e,a,r,n,i=t.split(/-(?!$)/);t=i[i.length-1];for(var o=0;o<i.length-1;o++){var l=i[o];if(/^(cmd|meta|m)$/i.test(l))n=!0;else if(/^a(lt)?$/i.test(l))e=!0;else if(/^(c|ctrl|control)$/i.test(l))a=!0;else{if(!/^s(hift)?$/i.test(l))throw new Error("Unrecognized modifier name: "+l);r=!0}}return e&&(t="Alt-"+t),a&&(t="Ctrl-"+t),n&&(t="Cmd-"+t),r&&(t="Shift-"+t),t}function Po(t){var e={};for(var a in t)if(t.hasOwnProperty(a)){var r=t[a];if(/^(name|fallthrough|(de|at)tach)$/.test(a))continue;if("..."==r){delete t[a];continue}for(var n=J(a.split(" "),Io),i=0;i<n.length;i++){var o=void 0,l=void 0;i==n.length-1?(l=n.join(" "),o=r):(l=n.slice(0,i+1).join(" "),o="...");var s=e[l];if(s){if(s!=o)throw new Error("Inconsistent bindings for "+l)}else e[l]=o}delete t[a]}for(var c in e)t[c]=e[c];return t}function Ro(t,e,a,r){var n=(e=Wo(e)).call?e.call(t,r):e[t];if(!1===n)return"nothing";if("..."===n)return"multi";if(null!=n&&a(n))return"handled";if(e.fallthrough){if("[object Array]"!=Object.prototype.toString.call(e.fallthrough))return Ro(t,e.fallthrough,a,r);for(var i=0;i<e.fallthrough.length;i++){var o=Ro(t,e.fallthrough[i],a,r);if(o)return o}}}function No(t){var e="string"==typeof t?t:Oo[t.keyCode];return"Ctrl"==e||"Alt"==e||"Shift"==e||"Mod"==e}function $o(t,e,a){var r=t;return e.altKey&&"Alt"!=r&&(t="Alt-"+t),(w?e.metaKey:e.ctrlKey)&&"Ctrl"!=r&&(t="Ctrl-"+t),(w?e.ctrlKey:e.metaKey)&&"Mod"!=r&&(t="Cmd-"+t),!a&&e.shiftKey&&"Shift"!=r&&(t="Shift-"+t),t}function Uo(t,e){if(u&&34==t.keyCode&&t.char)return!1;var a=Oo[t.keyCode];return null!=a&&!t.altGraphKey&&(3==t.keyCode&&t.code&&(a=t.code),$o(a,t,e))}function Wo(t){return"string"==typeof t?Fo[t]:t}function qo(t,e){for(var a=t.doc.sel.ranges,r=[],n=0;n<a.length;n++){for(var i=e(a[n]);r.length&&oe(i.from,K(r).to)<=0;){var o=r.pop();if(oe(o.from,i.from)<0){i.from=o.from;break}}r.push(i)}Cn(t,(function(){for(var e=r.length-1;e>=0;e--)ro(t.doc,"",r[e].from,r[e].to,"+delete");ln(t)}))}function Go(t,e,a){var r=ot(t.text,e+a,a);return r<0||r>t.text.length?null:r}function Yo(t,e,a){var r=Go(t,e.ch,a);return null==r?null:new ie(e.line,r,a<0?"after":"before")}function Ko(t,e,a,r,n){if(t){"rtl"==e.doc.direction&&(n=-n);var i=dt(a,e.doc.direction);if(i){var o,l=n<0?K(i):i[0],s=n<0==(1==l.level)?"after":"before";if(l.level>0||"rtl"==e.doc.direction){var c=er(e,a);o=n<0?a.text.length-1:0;var h=ar(e,c,o).top;o=lt((function(t){return ar(e,c,t).top==h}),n<0==(1==l.level)?l.from:l.to-1,o),"before"==s&&(o=Go(a,o,1))}else o=n<0?l.to:l.from;return new ie(r,o,s)}}return new ie(r,n<0?a.text.length:0,n<0?"before":"after")}function Jo(t,e,a,r){var n=dt(e,t.doc.direction);if(!n)return Yo(e,a,r);a.ch>=e.text.length?(a.ch=e.text.length,a.sticky="before"):a.ch<=0&&(a.ch=0,a.sticky="after");var i=ht(n,a.ch,a.sticky),o=n[i];if("ltr"==t.doc.direction&&o.level%2==0&&(r>0?o.to>a.ch:o.from<a.ch))return Yo(e,a,r);var l,s=function(t,a){return Go(e,t instanceof ie?t.ch:t,a)},c=function(a){return t.options.lineWrapping?(l=l||er(t,e),Mr(t,e,l,a)):{begin:0,end:e.text.length}},h=c("before"==a.sticky?s(a,-1):a.ch);if("rtl"==t.doc.direction||1==o.level){var u=1==o.level==r<0,d=s(a,u?1:-1);if(null!=d&&(u?d<=o.to&&d<=h.end:d>=o.from&&d>=h.begin)){var p=u?"before":"after";return new ie(a.line,d,p)}}var m=function(t,e,r){for(var i=function(t,e){return e?new ie(a.line,s(t,1),"before"):new ie(a.line,t,"after")};t>=0&&t<n.length;t+=e){var o=n[t],l=e>0==(1!=o.level),c=l?r.begin:s(r.end,-1);if(o.from<=c&&c<o.to)return i(c,l);if(c=l?o.from:s(o.to,-1),r.begin<=c&&c<r.end)return i(c,l)}},v=m(i+r,r,h);if(v)return v;var f=r>0?h.end:s(h.begin,-1);return null==f||r>0&&f==e.text.length||!(v=m(r>0?0:n.length-1,r,c(f)))?null:v}Fo.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Fo.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Fo.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Fo.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Fo.default=g?Fo.macDefault:Fo.pcDefault;var Zo={selectAll:Ki,singleSelection:function(t){return t.setSelection(t.getCursor("anchor"),t.getCursor("head"),$)},killLine:function(t){return qo(t,(function(e){if(e.empty()){var a=Zt(t.doc,e.head.line).text.length;return e.head.ch==a&&e.head.line<t.lastLine()?{from:e.head,to:ie(e.head.line+1,0)}:{from:e.head,to:ie(e.head.line,a)}}return{from:e.from(),to:e.to()}}))},deleteLine:function(t){return qo(t,(function(e){return{from:ie(e.from().line,0),to:de(t.doc,ie(e.to().line+1,0))}}))},delLineLeft:function(t){return qo(t,(function(t){return{from:ie(t.from().line,0),to:t.from()}}))},delWrappedLineLeft:function(t){return qo(t,(function(e){var a=t.charCoords(e.head,"div").top+5;return{from:t.coordsChar({left:0,top:a},"div"),to:e.from()}}))},delWrappedLineRight:function(t){return qo(t,(function(e){var a=t.charCoords(e.head,"div").top+5,r=t.coordsChar({left:t.display.lineDiv.offsetWidth+100,top:a},"div");return{from:e.from(),to:r}}))},undo:function(t){return t.undo()},redo:function(t){return t.redo()},undoSelection:function(t){return t.undoSelection()},redoSelection:function(t){return t.redoSelection()},goDocStart:function(t){return t.extendSelection(ie(t.firstLine(),0))},goDocEnd:function(t){return t.extendSelection(ie(t.lastLine()))},goLineStart:function(t){return t.extendSelectionsBy((function(e){return Xo(t,e.head.line)}),{origin:"+move",bias:1})},goLineStartSmart:function(t){return t.extendSelectionsBy((function(e){return tl(t,e.head)}),{origin:"+move",bias:1})},goLineEnd:function(t){return t.extendSelectionsBy((function(e){return Qo(t,e.head.line)}),{origin:"+move",bias:-1})},goLineRight:function(t){return t.extendSelectionsBy((function(e){var a=t.cursorCoords(e.head,"div").top+5;return t.coordsChar({left:t.display.lineDiv.offsetWidth+100,top:a},"div")}),W)},goLineLeft:function(t){return t.extendSelectionsBy((function(e){var a=t.cursorCoords(e.head,"div").top+5;return t.coordsChar({left:0,top:a},"div")}),W)},goLineLeftSmart:function(t){return t.extendSelectionsBy((function(e){var a=t.cursorCoords(e.head,"div").top+5,r=t.coordsChar({left:0,top:a},"div");return r.ch<t.getLine(r.line).search(/\S/)?tl(t,e.head):r}),W)},goLineUp:function(t){return t.moveV(-1,"line")},goLineDown:function(t){return t.moveV(1,"line")},goPageUp:function(t){return t.moveV(-1,"page")},goPageDown:function(t){return t.moveV(1,"page")},goCharLeft:function(t){return t.moveH(-1,"char")},goCharRight:function(t){return t.moveH(1,"char")},goColumnLeft:function(t){return t.moveH(-1,"column")},goColumnRight:function(t){return t.moveH(1,"column")},goWordLeft:function(t){return t.moveH(-1,"word")},goGroupRight:function(t){return t.moveH(1,"group")},goGroupLeft:function(t){return t.moveH(-1,"group")},goWordRight:function(t){return t.moveH(1,"word")},delCharBefore:function(t){return t.deleteH(-1,"codepoint")},delCharAfter:function(t){return t.deleteH(1,"char")},delWordBefore:function(t){return t.deleteH(-1,"word")},delWordAfter:function(t){return t.deleteH(1,"word")},delGroupBefore:function(t){return t.deleteH(-1,"group")},delGroupAfter:function(t){return t.deleteH(1,"group")},indentAuto:function(t){return t.indentSelection("smart")},indentMore:function(t){return t.indentSelection("add")},indentLess:function(t){return t.indentSelection("subtract")},insertTab:function(t){return t.replaceSelection("\t")},insertSoftTab:function(t){for(var e=[],a=t.listSelections(),r=t.options.tabSize,n=0;n<a.length;n++){var i=a[n].from(),o=F(t.getLine(i.line),i.ch,r);e.push(Y(r-o%r))}t.replaceSelections(e)},defaultTab:function(t){t.somethingSelected()?t.indentSelection("add"):t.execCommand("insertTab")},transposeChars:function(t){return Cn(t,(function(){for(var e=t.listSelections(),a=[],r=0;r<e.length;r++)if(e[r].empty()){var n=e[r].head,i=Zt(t.doc,n.line).text;if(i)if(n.ch==i.length&&(n=new ie(n.line,n.ch-1)),n.ch>0)n=new ie(n.line,n.ch+1),t.replaceRange(i.charAt(n.ch-1)+i.charAt(n.ch-2),ie(n.line,n.ch-2),n,"+transpose");else if(n.line>t.doc.first){var o=Zt(t.doc,n.line-1).text;o&&(n=new ie(n.line,1),t.replaceRange(i.charAt(0)+t.doc.lineSeparator()+o.charAt(o.length-1),ie(n.line-1,o.length-1),n,"+transpose"))}a.push(new ii(n,n))}t.setSelections(a)}))},newlineAndIndent:function(t){return Cn(t,(function(){for(var e=t.listSelections(),a=e.length-1;a>=0;a--)t.replaceRange(t.doc.lineSeparator(),e[a].anchor,e[a].head,"+input");e=t.listSelections();for(var r=0;r<e.length;r++)t.indentLine(e[r].from().line,null,!0);ln(t)}))},openLine:function(t){return t.replaceSelection("\n","start")},toggleOverwrite:function(t){return t.toggleOverwrite()}};function Xo(t,e){var a=Zt(t.doc,e),r=Xe(a);return r!=a&&(e=ee(r)),Ko(!0,t,r,e,1)}function Qo(t,e){var a=Zt(t.doc,e),r=Qe(a);return r!=a&&(e=ee(r)),Ko(!0,t,a,e,-1)}function tl(t,e){var a=Xo(t,e.line),r=Zt(t.doc,a.line),n=dt(r,t.doc.direction);if(!n||0==n[0].level){var i=Math.max(a.ch,r.text.search(/\S/)),o=e.line==a.line&&e.ch<=i&&e.ch;return ie(a.line,o?0:i,a.sticky)}return a}function el(t,e,a){if("string"==typeof e&&!(e=Zo[e]))return!1;t.display.input.ensurePolled();var r=t.display.shift,n=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),a&&(t.display.shift=!1),n=e(t)!=N}finally{t.display.shift=r,t.state.suppressEdits=!1}return n}function al(t,e,a){for(var r=0;r<t.state.keyMaps.length;r++){var n=Ro(e,t.state.keyMaps[r],a,t);if(n)return n}return t.options.extraKeys&&Ro(e,t.options.extraKeys,a,t)||Ro(e,t.options.keyMap,a,t)}var rl=new I;function nl(t,e,a,r){var n=t.state.keySeq;if(n){if(No(e))return"handled";if(/\'$/.test(e)?t.state.keySeq=null:rl.set(50,(function(){t.state.keySeq==n&&(t.state.keySeq=null,t.display.input.reset())})),il(t,n+" "+e,a,r))return!0}return il(t,e,a,r)}function il(t,e,a,r){var n=al(t,e,r);return"multi"==n&&(t.state.keySeq=e),"handled"==n&&La(t,"keyHandled",t,e,a),"handled"!=n&&"multi"!=n||(wt(a),Gr(t)),!!n}function ol(t,e){var a=Uo(e,!0);return!!a&&(e.shiftKey&&!t.state.keySeq?nl(t,"Shift-"+a,e,(function(e){return el(t,e,!0)}))||nl(t,a,e,(function(e){if("string"==typeof e?/^go[A-Z]/.test(e):e.motion)return el(t,e)})):nl(t,a,e,(function(e){return el(t,e)})))}function ll(t,e,a){return nl(t,"'"+a+"'",e,(function(e){return el(t,e,!0)}))}var sl=null;function cl(t){var e=this;if(!(t.target&&t.target!=e.display.input.getField()||(e.curOp.focus=S(),gt(e,t)))){o&&l<11&&27==t.keyCode&&(t.returnValue=!1);var r=t.keyCode;e.display.shift=16==r||t.shiftKey;var n=ol(e,t);u&&(sl=n?r:null,n||88!=r||Dt||!(g?t.metaKey:t.ctrlKey)||e.replaceSelection("",null,"cut")),a&&!g&&!n&&46==r&&t.shiftKey&&!t.ctrlKey&&document.execCommand&&document.execCommand("cut"),18!=r||/\bCodeMirror-crosshair\b/.test(e.display.lineDiv.className)||hl(e)}}function hl(t){var e=t.display.lineDiv;function a(t){18!=t.keyCode&&t.altKey||(H(e,"CodeMirror-crosshair"),ft(document,"keyup",a),ft(document,"mouseover",a))}E(e,"CodeMirror-crosshair"),mt(document,"keyup",a),mt(document,"mouseover",a)}function ul(t){16==t.keyCode&&(this.doc.sel.shift=!1),gt(this,t)}function dl(t){var e=this;if(!(t.target&&t.target!=e.display.input.getField()||$a(e.display,t)||gt(e,t)||t.ctrlKey&&!t.altKey||g&&t.metaKey)){var a=t.keyCode,r=t.charCode;if(u&&a==sl)return sl=null,void wt(t);if(!u||t.which&&!(t.which<10)||!ol(e,t)){var n=String.fromCharCode(null==r?a:r);"\b"!=n&&(ll(e,t,n)||e.display.input.onKeyPress(t))}}}var pl,ml,vl=400,fl=function(t,e,a){this.time=t,this.pos=e,this.button=a};function yl(t,e){var a=+new Date;return ml&&ml.compare(a,t,e)?(pl=ml=null,"triple"):pl&&pl.compare(a,t,e)?(ml=new fl(a,t,e),pl=null,"double"):(pl=new fl(a,t,e),ml=null,"single")}function gl(t){var e=this,a=e.display;if(!(gt(e,t)||a.activeTouch&&a.input.supportsTouch()))if(a.input.ensurePolled(),a.shift=t.shiftKey,$a(a,t))s||(a.scroller.draggable=!1,setTimeout((function(){return a.scroller.draggable=!0}),100));else if(!Vl(e,t)){var r=Or(e,t),n=Vt(t),i=r?yl(r,n):"single";window.focus(),1==n&&e.state.selectingText&&e.state.selectingText(t),r&&bl(e,n,r,i,t)||(1==n?r?xl(e,r,i,t):Ht(t)==a.scroller&&wt(t):2==n?(r&&Ti(e.doc,r),setTimeout((function(){return a.input.focus()}),20)):3==n&&(M?e.display.input.onContextMenu(t):Kr(e)))}}function bl(t,e,a,r,n){var i="Click";return"double"==r?i="Double"+i:"triple"==r&&(i="Triple"+i),nl(t,$o(i=(1==e?"Left":2==e?"Middle":"Right")+i,n),n,(function(e){if("string"==typeof e&&(e=Zo[e]),!e)return!1;var r=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),r=e(t,a)!=N}finally{t.state.suppressEdits=!1}return r}))}function zl(t,e,a){var r=t.getOption("configureMouse"),n=r?r(t,e,a):{};if(null==n.unit){var i=b?a.shiftKey&&a.metaKey:a.altKey;n.unit=i?"rectangle":"single"==e?"char":"double"==e?"word":"line"}return(null==n.extend||t.doc.extend)&&(n.extend=t.doc.extend||a.shiftKey),null==n.addNew&&(n.addNew=g?a.metaKey:a.ctrlKey),null==n.moveOnDrag&&(n.moveOnDrag=!(g?a.altKey:a.ctrlKey)),n}function xl(t,e,a,r){o?setTimeout(D(Yr,t),0):t.curOp.focus=S();var n,i=zl(t,a,r),l=t.doc.sel;t.options.dragDrop&&kt&&!t.isReadOnly()&&"single"==a&&(n=l.contains(e))>-1&&(oe((n=l.ranges[n]).from(),e)<0||e.xRel>0)&&(oe(n.to(),e)>0||e.xRel<0)?wl(t,r,e,i):_l(t,r,e,i)}function wl(t,e,a,r){var n=t.display,i=!1,c=Sn(t,(function(e){s&&(n.scroller.draggable=!1),t.state.draggingText=!1,t.state.delayingBlurEvent&&(t.hasFocus()?t.state.delayingBlurEvent=!1:Kr(t)),ft(n.wrapper.ownerDocument,"mouseup",c),ft(n.wrapper.ownerDocument,"mousemove",h),ft(n.scroller,"dragstart",u),ft(n.scroller,"drop",c),i||(wt(e),r.addNew||Ti(t.doc,a,null,null,r.extend),s&&!d||o&&9==l?setTimeout((function(){n.wrapper.ownerDocument.body.focus({preventScroll:!0}),n.input.focus()}),20):n.input.focus())})),h=function(t){i=i||Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)>=10},u=function(){return i=!0};s&&(n.scroller.draggable=!0),t.state.draggingText=c,c.copy=!r.moveOnDrag,mt(n.wrapper.ownerDocument,"mouseup",c),mt(n.wrapper.ownerDocument,"mousemove",h),mt(n.scroller,"dragstart",u),mt(n.scroller,"drop",c),t.state.delayingBlurEvent=!0,setTimeout((function(){return n.input.focus()}),20),n.scroller.dragDrop&&n.scroller.dragDrop()}function Ml(t,e,a){if("char"==a)return new ii(e,e);if("word"==a)return t.findWordAt(e);if("line"==a)return new ii(ie(e.line,0),de(t.doc,ie(e.line+1,0)));var r=a(t,e);return new ii(r.from,r.to)}function _l(t,e,a,r){o&&Kr(t);var n=t.display,i=t.doc;wt(e);var l,s,c=i.sel,h=c.ranges;if(r.addNew&&!r.extend?(s=i.sel.contains(a),l=s>-1?h[s]:new ii(a,a)):(l=i.sel.primary(),s=i.sel.primIndex),"rectangle"==r.unit)r.addNew||(l=new ii(a,a)),a=Or(t,e,!0,!0),s=-1;else{var u=Ml(t,a,r.unit);l=r.extend?Oi(l,u.anchor,u.head,r.extend):u}r.addNew?-1==s?(s=h.length,Ri(i,oi(t,h.concat([l]),s),{scroll:!1,origin:"*mouse"})):h.length>1&&h[s].empty()&&"char"==r.unit&&!r.extend?(Ri(i,oi(t,h.slice(0,s).concat(h.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),c=i.sel):ji(i,s,l,U):(s=0,Ri(i,new ni([l],0),U),c=i.sel);var d=a;function p(e){if(0!=oe(d,e))if(d=e,"rectangle"==r.unit){for(var n=[],o=t.options.tabSize,h=F(Zt(i,a.line).text,a.ch,o),u=F(Zt(i,e.line).text,e.ch,o),p=Math.min(h,u),m=Math.max(h,u),v=Math.min(a.line,e.line),f=Math.min(t.lastLine(),Math.max(a.line,e.line));v<=f;v++){var y=Zt(i,v).text,g=q(y,p,o);p==m?n.push(new ii(ie(v,g),ie(v,g))):y.length>g&&n.push(new ii(ie(v,g),ie(v,q(y,m,o))))}n.length||n.push(new ii(a,a)),Ri(i,oi(t,c.ranges.slice(0,s).concat(n),s),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var b,z=l,x=Ml(t,e,r.unit),w=z.anchor;oe(x.anchor,w)>0?(b=x.head,w=he(z.from(),x.anchor)):(b=x.anchor,w=ce(z.to(),x.head));var M=c.ranges.slice(0);M[s]=Al(t,new ii(de(i,w),b)),Ri(i,oi(t,M,s),U)}}var m=n.wrapper.getBoundingClientRect(),v=0;function f(e){var a=++v,o=Or(t,e,!0,"rectangle"==r.unit);if(o)if(0!=oe(o,d)){t.curOp.focus=S(),p(o);var l=tn(n,i);(o.line>=l.to||o.line<l.from)&&setTimeout(Sn(t,(function(){v==a&&f(e)})),150)}else{var s=e.clientY<m.top?-20:e.clientY>m.bottom?20:0;s&&setTimeout(Sn(t,(function(){v==a&&(n.scroller.scrollTop+=s,f(e))})),50)}}function y(e){t.state.selectingText=!1,v=1/0,e&&(wt(e),n.input.focus()),ft(n.wrapper.ownerDocument,"mousemove",g),ft(n.wrapper.ownerDocument,"mouseup",b),i.history.lastSelOrigin=null}var g=Sn(t,(function(t){0!==t.buttons&&Vt(t)?f(t):y(t)})),b=Sn(t,y);t.state.selectingText=b,mt(n.wrapper.ownerDocument,"mousemove",g),mt(n.wrapper.ownerDocument,"mouseup",b)}function Al(t,e){var a=e.anchor,r=e.head,n=Zt(t.doc,a.line);if(0==oe(a,r)&&a.sticky==r.sticky)return e;var i=dt(n);if(!i)return e;var o=ht(i,a.ch,a.sticky),l=i[o];if(l.from!=a.ch&&l.to!=a.ch)return e;var s,c=o+(l.from==a.ch==(1!=l.level)?0:1);if(0==c||c==i.length)return e;if(r.line!=a.line)s=(r.line-a.line)*("ltr"==t.doc.direction?1:-1)>0;else{var h=ht(i,r.ch,r.sticky),u=h-o||(r.ch-a.ch)*(1==l.level?-1:1);s=h==c-1||h==c?u<0:u>0}var d=i[c+(s?-1:0)],p=s==(1==d.level),m=p?d.from:d.to,v=p?"after":"before";return a.ch==m&&a.sticky==v?e:new ii(new ie(a.line,m,v),r)}function Hl(t,e,a,r){var n,i;if(e.touches)n=e.touches[0].clientX,i=e.touches[0].clientY;else try{n=e.clientX,i=e.clientY}catch(h){return!1}if(n>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;r&&wt(e);var o=t.display,l=o.lineDiv.getBoundingClientRect();if(i>l.bottom||!zt(t,a))return _t(e);i-=l.top-o.viewOffset;for(var s=0;s<t.display.gutterSpecs.length;++s){var c=o.gutters.childNodes[s];if(c&&c.getBoundingClientRect().right>=n)return yt(t,a,t,ae(t.doc,i),t.display.gutterSpecs[s].className,e),_t(e)}}function Vl(t,e){return Hl(t,e,"gutterClick",!0)}function Ll(t,e){$a(t.display,e)||Bl(t,e)||gt(t,e,"contextmenu")||M||t.display.input.onContextMenu(e)}function Bl(t,e){return!!zt(t,"gutterContextMenu")&&Hl(t,e,"gutterContextMenu",!1)}function kl(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),ur(t)}fl.prototype.compare=function(t,e,a){return this.time+vl>t&&0==oe(e,this.pos)&&a==this.button};var Cl={toString:function(){return"CodeMirror.Init"}},Sl={},El={};function Ol(t){var e=t.optionHandlers;function a(a,r,n,i){t.defaults[a]=r,n&&(e[a]=i?function(t,e,a){a!=Cl&&n(t,e,a)}:n)}t.defineOption=a,t.Init=Cl,a("value","",(function(t,e){return t.setValue(e)}),!0),a("mode",null,(function(t,e){t.doc.modeOption=e,pi(t)}),!0),a("indentUnit",2,pi,!0),a("indentWithTabs",!1),a("smartIndent",!0),a("tabSize",4,(function(t){mi(t),ur(t),Dr(t)}),!0),a("lineSeparator",null,(function(t,e){if(t.doc.lineSep=e,e){var a=[],r=t.doc.first;t.doc.iter((function(t){for(var n=0;;){var i=t.text.indexOf(e,n);if(-1==i)break;n=i+e.length,a.push(ie(r,i))}r++}));for(var n=a.length-1;n>=0;n--)ro(t.doc,e,a[n],ie(a[n].line,a[n].ch+e.length))}})),a("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(t,e,a){t.state.specialChars=new RegExp(e.source+(e.test("\t")?"":"|\t"),"g"),a!=Cl&&t.refresh()})),a("specialCharPlaceholder",va,(function(t){return t.refresh()}),!0),a("electricChars",!0),a("inputStyle",y?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),a("spellcheck",!1,(function(t,e){return t.getInputField().spellcheck=e}),!0),a("autocorrect",!1,(function(t,e){return t.getInputField().autocorrect=e}),!0),a("autocapitalize",!1,(function(t,e){return t.getInputField().autocapitalize=e}),!0),a("rtlMoveVisually",!z),a("wholeLineUpdateBefore",!0),a("theme","default",(function(t){kl(t),Zn(t)}),!0),a("keyMap","default",(function(t,e,a){var r=Wo(e),n=a!=Cl&&Wo(a);n&&n.detach&&n.detach(t,r),r.attach&&r.attach(t,n||null)})),a("extraKeys",null),a("configureMouse",null),a("lineWrapping",!1,Dl,!0),a("gutters",[],(function(t,e){t.display.gutterSpecs=Kn(e,t.options.lineNumbers),Zn(t)}),!0),a("fixedGutter",!0,(function(t,e){t.display.gutters.style.left=e?Cr(t.display)+"px":"0",t.refresh()}),!0),a("coverGutterNextToScrollbar",!1,(function(t){return gn(t)}),!0),a("scrollbarStyle","native",(function(t){xn(t),gn(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)}),!0),a("lineNumbers",!1,(function(t,e){t.display.gutterSpecs=Kn(t.options.gutters,e),Zn(t)}),!0),a("firstLineNumber",1,Zn,!0),a("lineNumberFormatter",(function(t){return t}),Zn,!0),a("showCursorWhenSelecting",!1,Nr,!0),a("resetSelectionOnContextMenu",!0),a("lineWiseCopyCut",!0),a("pasteLinesPerSelection",!0),a("selectionsMayTouch",!1),a("readOnly",!1,(function(t,e){"nocursor"==e&&(Zr(t),t.display.input.blur()),t.display.input.readOnlyChanged(e)})),a("screenReaderLabel",null,(function(t,e){e=""===e?null:e,t.display.input.screenReaderLabelChanged(e)})),a("disableInput",!1,(function(t,e){e||t.display.input.reset()}),!0),a("dragDrop",!0,Tl),a("allowDropFileTypes",null),a("cursorBlinkRate",530),a("cursorScrollMargin",0),a("cursorHeight",1,Nr,!0),a("singleCursorHeightPerLine",!0,Nr,!0),a("workTime",100),a("workDelay",100),a("flattenSpans",!0,mi,!0),a("addModeClass",!1,mi,!0),a("pollInterval",100),a("undoDepth",200,(function(t,e){return t.doc.history.undoDepth=e})),a("historyEventDelay",1250),a("viewportMargin",10,(function(t){return t.refresh()}),!0),a("maxHighlightLength",1e4,mi,!0),a("moveInputWithCursor",!0,(function(t,e){e||t.display.input.resetPosition()})),a("tabindex",null,(function(t,e){return t.display.input.getField().tabIndex=e||""})),a("autofocus",null),a("direction","ltr",(function(t,e){return t.doc.setDirection(e)}),!0),a("phrases",null)}function Tl(t,e,a){if(!e!=!(a&&a!=Cl)){var r=t.display.dragFunctions,n=e?mt:ft;n(t.display.scroller,"dragstart",r.start),n(t.display.scroller,"dragenter",r.enter),n(t.display.scroller,"dragover",r.over),n(t.display.scroller,"dragleave",r.leave),n(t.display.scroller,"drop",r.drop)}}function Dl(t){t.options.lineWrapping?(E(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(H(t.display.wrapper,"CodeMirror-wrap"),la(t)),Er(t),Dr(t),ur(t),setTimeout((function(){return gn(t)}),100)}function jl(t,e){var a=this;if(!(this instanceof jl))return new jl(t,e);this.options=e=e?j(e):{},j(Sl,e,!1);var r=e.value;"string"==typeof r?r=new Mo(r,e.mode,null,e.lineSeparator,e.direction):e.mode&&(r.modeOption=e.mode),this.doc=r;var n=new jl.inputStyles[e.inputStyle](this),i=this.display=new Xn(t,r,n,e);for(var c in i.wrapper.CodeMirror=this,kl(this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),xn(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new I,keySeq:null,specialChars:null},e.autofocus&&!y&&i.input.focus(),o&&l<11&&setTimeout((function(){return a.display.input.reset(!0)}),20),Fl(this),Co(),Mn(this),this.curOp.forceUpdate=!0,gi(this,r),e.autofocus&&!y||this.hasFocus()?setTimeout((function(){a.hasFocus()&&!a.state.focused&&Jr(a)}),20):Zr(this),El)El.hasOwnProperty(c)&&El[c](this,e[c],Cl);Yn(this),e.finishInit&&e.finishInit(this);for(var h=0;h<Il.length;++h)Il[h](this);_n(this),s&&e.lineWrapping&&"optimizelegibility"==getComputedStyle(i.lineDiv).textRendering&&(i.lineDiv.style.textRendering="auto")}function Fl(t){var e=t.display;mt(e.scroller,"mousedown",Sn(t,gl)),mt(e.scroller,"dblclick",o&&l<11?Sn(t,(function(e){if(!gt(t,e)){var a=Or(t,e);if(a&&!Vl(t,e)&&!$a(t.display,e)){wt(e);var r=t.findWordAt(a);Ti(t.doc,r.anchor,r.head)}}})):function(e){return gt(t,e)||wt(e)}),mt(e.scroller,"contextmenu",(function(e){return Ll(t,e)})),mt(e.input.getField(),"contextmenu",(function(a){e.scroller.contains(a.target)||Ll(t,a)}));var a,r={end:0};function n(){e.activeTouch&&(a=setTimeout((function(){return e.activeTouch=null}),1e3),(r=e.activeTouch).end=+new Date)}function i(t){if(1!=t.touches.length)return!1;var e=t.touches[0];return e.radiusX<=1&&e.radiusY<=1}function s(t,e){if(null==e.left)return!0;var a=e.left-t.left,r=e.top-t.top;return a*a+r*r>400}mt(e.scroller,"touchstart",(function(n){if(!gt(t,n)&&!i(n)&&!Vl(t,n)){e.input.ensurePolled(),clearTimeout(a);var o=+new Date;e.activeTouch={start:o,moved:!1,prev:o-r.end<=300?r:null},1==n.touches.length&&(e.activeTouch.left=n.touches[0].pageX,e.activeTouch.top=n.touches[0].pageY)}})),mt(e.scroller,"touchmove",(function(){e.activeTouch&&(e.activeTouch.moved=!0)})),mt(e.scroller,"touchend",(function(a){var r=e.activeTouch;if(r&&!$a(e,a)&&null!=r.left&&!r.moved&&new Date-r.start<300){var i,o=t.coordsChar(e.activeTouch,"page");i=!r.prev||s(r,r.prev)?new ii(o,o):!r.prev.prev||s(r,r.prev.prev)?t.findWordAt(o):new ii(ie(o.line,0),de(t.doc,ie(o.line+1,0))),t.setSelection(i.anchor,i.head),t.focus(),wt(a)}n()})),mt(e.scroller,"touchcancel",n),mt(e.scroller,"scroll",(function(){e.scroller.clientHeight&&(dn(t,e.scroller.scrollTop),mn(t,e.scroller.scrollLeft,!0),yt(t,"scroll",t))})),mt(e.scroller,"mousewheel",(function(e){return ri(t,e)})),mt(e.scroller,"DOMMouseScroll",(function(e){return ri(t,e)})),mt(e.wrapper,"scroll",(function(){return e.wrapper.scrollTop=e.wrapper.scrollLeft=0})),e.dragFunctions={enter:function(e){gt(t,e)||At(e)},over:function(e){gt(t,e)||(Vo(t,e),At(e))},start:function(e){return Ho(t,e)},drop:Sn(t,Ao),leave:function(e){gt(t,e)||Lo(t)}};var c=e.input.getField();mt(c,"keyup",(function(e){return ul.call(t,e)})),mt(c,"keydown",Sn(t,cl)),mt(c,"keypress",Sn(t,dl)),mt(c,"focus",(function(e){return Jr(t,e)})),mt(c,"blur",(function(e){return Zr(t,e)}))}jl.defaults=Sl,jl.optionHandlers=El;var Il=[];function Pl(t,e,a,r){var n,i=t.doc;null==a&&(a="add"),"smart"==a&&(i.mode.indent?n=be(t,e).state:a="prev");var o=t.options.tabSize,l=Zt(i,e),s=F(l.text,null,o);l.stateAfter&&(l.stateAfter=null);var c,h=l.text.match(/^\s*/)[0];if(r||/\S/.test(l.text)){if("smart"==a&&((c=i.mode.indent(n,l.text.slice(h.length),l.text))==N||c>150)){if(!r)return;a="prev"}}else c=0,a="not";"prev"==a?c=e>i.first?F(Zt(i,e-1).text,null,o):0:"add"==a?c=s+t.options.indentUnit:"subtract"==a?c=s-t.options.indentUnit:"number"==typeof a&&(c=s+a),c=Math.max(0,c);var u="",d=0;if(t.options.indentWithTabs)for(var p=Math.floor(c/o);p;--p)d+=o,u+="\t";if(d<c&&(u+=Y(c-d)),u!=h)return ro(i,u,ie(e,0),ie(e,h.length),"+input"),l.stateAfter=null,!0;for(var m=0;m<i.sel.ranges.length;m++){var v=i.sel.ranges[m];if(v.head.line==e&&v.head.ch<h.length){var f=ie(e,h.length);ji(i,m,new ii(f,f));break}}}jl.defineInitHook=function(t){return Il.push(t)};var Rl=null;function Nl(t){Rl=t}function $l(t,e,a,r,n){var i=t.doc;t.display.shift=!1,r||(r=i.sel);var o=+new Date-200,l="paste"==n||t.state.pasteIncoming>o,s=Ot(e),c=null;if(l&&r.ranges.length>1)if(Rl&&Rl.text.join("\n")==e){if(r.ranges.length%Rl.text.length==0){c=[];for(var h=0;h<Rl.text.length;h++)c.push(i.splitLines(Rl.text[h]))}}else s.length==r.ranges.length&&t.options.pasteLinesPerSelection&&(c=J(s,(function(t){return[t]})));for(var u=t.curOp.updateInput,d=r.ranges.length-1;d>=0;d--){var p=r.ranges[d],m=p.from(),v=p.to();p.empty()&&(a&&a>0?m=ie(m.line,m.ch-a):t.state.overwrite&&!l?v=ie(v.line,Math.min(Zt(i,v.line).text.length,v.ch+K(s).length)):l&&Rl&&Rl.lineWise&&Rl.text.join("\n")==s.join("\n")&&(m=v=ie(m.line,0)));var f={from:m,to:v,text:c?c[d%c.length]:s,origin:n||(l?"paste":t.state.cutIncoming>o?"cut":"+input")};Zi(t.doc,f),La(t,"inputRead",t,f)}e&&!l&&Wl(t,e),ln(t),t.curOp.updateInput<2&&(t.curOp.updateInput=u),t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=-1}function Ul(t,e){var a=t.clipboardData&&t.clipboardData.getData("Text");if(a)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||Cn(e,(function(){return $l(e,a,0,null,"paste")})),!0}function Wl(t,e){if(t.options.electricChars&&t.options.smartIndent)for(var a=t.doc.sel,r=a.ranges.length-1;r>=0;r--){var n=a.ranges[r];if(!(n.head.ch>100||r&&a.ranges[r-1].head.line==n.head.line)){var i=t.getModeAt(n.head),o=!1;if(i.electricChars){for(var l=0;l<i.electricChars.length;l++)if(e.indexOf(i.electricChars.charAt(l))>-1){o=Pl(t,n.head.line,"smart");break}}else i.electricInput&&i.electricInput.test(Zt(t.doc,n.head.line).text.slice(0,n.head.ch))&&(o=Pl(t,n.head.line,"smart"));o&&La(t,"electricInput",t,n.head.line)}}}function ql(t){for(var e=[],a=[],r=0;r<t.doc.sel.ranges.length;r++){var n=t.doc.sel.ranges[r].head.line,i={anchor:ie(n,0),head:ie(n+1,0)};a.push(i),e.push(t.getRange(i.anchor,i.head))}return{text:e,ranges:a}}function Gl(t,e,a,r){t.setAttribute("autocorrect",a?"":"off"),t.setAttribute("autocapitalize",r?"":"off"),t.setAttribute("spellcheck",!!e)}function Yl(){var t=B("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),e=B("div",[t],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return s?t.style.width="1000px":t.setAttribute("wrap","off"),v&&(t.style.border="1px solid black"),Gl(t),e}function Kl(t){var e=t.optionHandlers,a=t.helpers={};t.prototype={constructor:t,focus:function(){window.focus(),this.display.input.focus()},setOption:function(t,a){var r=this.options,n=r[t];r[t]==a&&"mode"!=t||(r[t]=a,e.hasOwnProperty(t)&&Sn(this,e[t])(this,a,n),yt(this,"optionChange",this,t))},getOption:function(t){return this.options[t]},getDoc:function(){return this.doc},addKeyMap:function(t,e){this.state.keyMaps[e?"push":"unshift"](Wo(t))},removeKeyMap:function(t){for(var e=this.state.keyMaps,a=0;a<e.length;++a)if(e[a]==t||e[a].name==t)return e.splice(a,1),!0},addOverlay:En((function(e,a){var r=e.token?e:t.getMode(this.options,e);if(r.startState)throw new Error("Overlays may not be stateful.");Z(this.state.overlays,{mode:r,modeSpec:e,opaque:a&&a.opaque,priority:a&&a.priority||0},(function(t){return t.priority})),this.state.modeGen++,Dr(this)})),removeOverlay:En((function(t){for(var e=this.state.overlays,a=0;a<e.length;++a){var r=e[a].modeSpec;if(r==t||"string"==typeof t&&r.name==t)return e.splice(a,1),this.state.modeGen++,void Dr(this)}})),indentLine:En((function(t,e,a){"string"!=typeof e&&"number"!=typeof e&&(e=null==e?this.options.smartIndent?"smart":"prev":e?"add":"subtract"),re(this.doc,t)&&Pl(this,t,e,a)})),indentSelection:En((function(t){for(var e=this.doc.sel.ranges,a=-1,r=0;r<e.length;r++){var n=e[r];if(n.empty())n.head.line>a&&(Pl(this,n.head.line,t,!0),a=n.head.line,r==this.doc.sel.primIndex&&ln(this));else{var i=n.from(),o=n.to(),l=Math.max(a,i.line);a=Math.min(this.lastLine(),o.line-(o.ch?0:1))+1;for(var s=l;s<a;++s)Pl(this,s,t);var c=this.doc.sel.ranges;0==i.ch&&e.length==c.length&&c[r].from().ch>0&&ji(this.doc,r,new ii(i,c[r].to()),$)}}})),getTokenAt:function(t,e){return _e(this,t,e)},getLineTokens:function(t,e){return _e(this,ie(t),e,!0)},getTokenTypeAt:function(t){t=de(this.doc,t);var e,a=ge(this,Zt(this.doc,t.line)),r=0,n=(a.length-1)/2,i=t.ch;if(0==i)e=a[2];else for(;;){var o=r+n>>1;if((o?a[2*o-1]:0)>=i)n=o;else{if(!(a[2*o+1]<i)){e=a[2*o+2];break}r=o+1}}var l=e?e.indexOf("overlay "):-1;return l<0?e:0==l?null:e.slice(0,l-1)},getModeAt:function(e){var a=this.doc.mode;return a.innerMode?t.innerMode(a,this.getTokenAt(e).state).mode:a},getHelper:function(t,e){return this.getHelpers(t,e)[0]},getHelpers:function(t,e){var r=[];if(!a.hasOwnProperty(e))return r;var n=a[e],i=this.getModeAt(t);if("string"==typeof i[e])n[i[e]]&&r.push(n[i[e]]);else if(i[e])for(var o=0;o<i[e].length;o++){var l=n[i[e][o]];l&&r.push(l)}else i.helperType&&n[i.helperType]?r.push(n[i.helperType]):n[i.name]&&r.push(n[i.name]);for(var s=0;s<n._global.length;s++){var c=n._global[s];c.pred(i,this)&&-1==P(r,c.val)&&r.push(c.val)}return r},getStateAfter:function(t,e){var a=this.doc;return be(this,(t=ue(a,null==t?a.first+a.size-1:t))+1,e).state},cursorCoords:function(t,e){var a=this.doc.sel.primary();return gr(this,null==t?a.head:"object"==typeof t?de(this.doc,t):t?a.from():a.to(),e||"page")},charCoords:function(t,e){return yr(this,de(this.doc,t),e||"page")},coordsChar:function(t,e){return xr(this,(t=fr(this,t,e||"page")).left,t.top)},lineAtHeight:function(t,e){return t=fr(this,{top:t,left:0},e||"page").top,ae(this.doc,t+this.display.viewOffset)},heightAtLine:function(t,e,a){var r,n=!1;if("number"==typeof t){var i=this.doc.first+this.doc.size-1;t<this.doc.first?t=this.doc.first:t>i&&(t=i,n=!0),r=Zt(this.doc,t)}else r=t;return vr(this,r,{top:0,left:0},e||"page",a||n).top+(n?this.doc.height-ia(r):0)},defaultTextHeight:function(){return Lr(this.display)},defaultCharWidth:function(){return Br(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,a,r,n){var i=this.display,o=(t=gr(this,de(this.doc,t))).bottom,l=t.left;if(e.style.position="absolute",e.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(e),i.sizer.appendChild(e),"over"==r)o=t.top;else if("above"==r||"near"==r){var s=Math.max(i.wrapper.clientHeight,this.doc.height),c=Math.max(i.sizer.clientWidth,i.lineSpace.clientWidth);("above"==r||t.bottom+e.offsetHeight>s)&&t.top>e.offsetHeight?o=t.top-e.offsetHeight:t.bottom+e.offsetHeight<=s&&(o=t.bottom),l+e.offsetWidth>c&&(l=c-e.offsetWidth)}e.style.top=o+"px",e.style.left=e.style.right="","right"==n?(l=i.sizer.clientWidth-e.offsetWidth,e.style.right="0px"):("left"==n?l=0:"middle"==n&&(l=(i.sizer.clientWidth-e.offsetWidth)/2),e.style.left=l+"px"),a&&rn(this,{left:l,top:o,right:l+e.offsetWidth,bottom:o+e.offsetHeight})},triggerOnKeyDown:En(cl),triggerOnKeyPress:En(dl),triggerOnKeyUp:ul,triggerOnMouseDown:En(gl),execCommand:function(t){if(Zo.hasOwnProperty(t))return Zo[t].call(null,this)},triggerElectric:En((function(t){Wl(this,t)})),findPosH:function(t,e,a,r){var n=1;e<0&&(n=-1,e=-e);for(var i=de(this.doc,t),o=0;o<e&&!(i=Jl(this.doc,i,n,a,r)).hitSide;++o);return i},moveH:En((function(t,e){var a=this;this.extendSelectionsBy((function(r){return a.display.shift||a.doc.extend||r.empty()?Jl(a.doc,r.head,t,e,a.options.rtlMoveVisually):t<0?r.from():r.to()}),W)})),deleteH:En((function(t,e){var a=this.doc.sel,r=this.doc;a.somethingSelected()?r.replaceSelection("",null,"+delete"):qo(this,(function(a){var n=Jl(r,a.head,t,e,!1);return t<0?{from:n,to:a.head}:{from:a.head,to:n}}))})),findPosV:function(t,e,a,r){var n=1,i=r;e<0&&(n=-1,e=-e);for(var o=de(this.doc,t),l=0;l<e;++l){var s=gr(this,o,"div");if(null==i?i=s.left:s.left=i,(o=Zl(this,s,n,a)).hitSide)break}return o},moveV:En((function(t,e){var a=this,r=this.doc,n=[],i=!this.display.shift&&!r.extend&&r.sel.somethingSelected();if(r.extendSelectionsBy((function(o){if(i)return t<0?o.from():o.to();var l=gr(a,o.head,"div");null!=o.goalColumn&&(l.left=o.goalColumn),n.push(l.left);var s=Zl(a,l,t,e);return"page"==e&&o==r.sel.primary()&&on(a,yr(a,s,"div").top-l.top),s}),W),n.length)for(var o=0;o<r.sel.ranges.length;o++)r.sel.ranges[o].goalColumn=n[o]})),findWordAt:function(t){var e=Zt(this.doc,t.line).text,a=t.ch,r=t.ch;if(e){var n=this.getHelper(t,"wordChars");"before"!=t.sticky&&r!=e.length||!a?++r:--a;for(var i=e.charAt(a),o=at(i,n)?function(t){return at(t,n)}:/\s/.test(i)?function(t){return/\s/.test(t)}:function(t){return!/\s/.test(t)&&!at(t)};a>0&&o(e.charAt(a-1));)--a;for(;r<e.length&&o(e.charAt(r));)++r}return new ii(ie(t.line,a),ie(t.line,r))},toggleOverwrite:function(t){null!=t&&t==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?E(this.display.cursorDiv,"CodeMirror-overwrite"):H(this.display.cursorDiv,"CodeMirror-overwrite"),yt(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==S()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:En((function(t,e){sn(this,t,e)})),getScrollInfo:function(){var t=this.display.scroller;return{left:t.scrollLeft,top:t.scrollTop,height:t.scrollHeight-Ga(this)-this.display.barHeight,width:t.scrollWidth-Ga(this)-this.display.barWidth,clientHeight:Ka(this),clientWidth:Ya(this)}},scrollIntoView:En((function(t,e){null==t?(t={from:this.doc.sel.primary().head,to:null},null==e&&(e=this.options.cursorScrollMargin)):"number"==typeof t?t={from:ie(t,0),to:null}:null==t.from&&(t={from:t,to:null}),t.to||(t.to=t.from),t.margin=e||0,null!=t.from.line?cn(this,t):un(this,t.from,t.to,t.margin)})),setSize:En((function(t,e){var a=this,r=function(t){return"number"==typeof t||/^\d+$/.test(String(t))?t+"px":t};null!=t&&(this.display.wrapper.style.width=r(t)),null!=e&&(this.display.wrapper.style.height=r(e)),this.options.lineWrapping&&hr(this);var n=this.display.viewFrom;this.doc.iter(n,this.display.viewTo,(function(t){if(t.widgets)for(var e=0;e<t.widgets.length;e++)if(t.widgets[e].noHScroll){jr(a,n,"widget");break}++n})),this.curOp.forceUpdate=!0,yt(this,"refresh",this)})),operation:function(t){return Cn(this,t)},startOperation:function(){return Mn(this)},endOperation:function(){return _n(this)},refresh:En((function(){var t=this.display.cachedTextHeight;Dr(this),this.curOp.forceUpdate=!0,ur(this),sn(this,this.doc.scrollLeft,this.doc.scrollTop),Wn(this.display),(null==t||Math.abs(t-Lr(this.display))>.5||this.options.lineWrapping)&&Er(this),yt(this,"refresh",this)})),swapDoc:En((function(t){var e=this.doc;return e.cm=null,this.state.selectingText&&this.state.selectingText(),gi(this,t),ur(this),this.display.input.reset(),sn(this,t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,La(this,"swapDoc",this,e),e})),phrase:function(t){var e=this.options.phrases;return e&&Object.prototype.hasOwnProperty.call(e,t)?e[t]:t},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},xt(t),t.registerHelper=function(e,r,n){a.hasOwnProperty(e)||(a[e]=t[e]={_global:[]}),a[e][r]=n},t.registerGlobalHelper=function(e,r,n,i){t.registerHelper(e,r,i),a[e]._global.push({pred:n,val:i})}}function Jl(t,e,a,r,n){var i=e,o=a,l=Zt(t,e.line),s=n&&"rtl"==t.direction?-a:a;function c(){var a=e.line+s;return!(a<t.first||a>=t.first+t.size)&&(e=new ie(a,e.ch,e.sticky),l=Zt(t,a))}function h(i){var o;if("codepoint"==r){var h=l.text.charCodeAt(e.ch+(a>0?0:-1));if(isNaN(h))o=null;else{var u=a>0?h>=55296&&h<56320:h>=56320&&h<57343;o=new ie(e.line,Math.max(0,Math.min(l.text.length,e.ch+a*(u?2:1))),-a)}}else o=n?Jo(t.cm,l,e,a):Yo(l,e,a);if(null==o){if(i||!c())return!1;e=Ko(n,t.cm,l,e.line,s)}else e=o;return!0}if("char"==r||"codepoint"==r)h();else if("column"==r)h(!0);else if("word"==r||"group"==r)for(var u=null,d="group"==r,p=t.cm&&t.cm.getHelper(e,"wordChars"),m=!0;!(a<0)||h(!m);m=!1){var v=l.text.charAt(e.ch)||"\n",f=at(v,p)?"w":d&&"\n"==v?"n":!d||/\s/.test(v)?null:"p";if(!d||m||f||(f="s"),u&&u!=f){a<0&&(a=1,h(),e.sticky="after");break}if(f&&(u=f),a>0&&!h(!m))break}var y=Gi(t,e,i,o,!0);return le(i,y)&&(y.hitSide=!0),y}function Zl(t,e,a,r){var n,i,o=t.doc,l=e.left;if("page"==r){var s=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(s-.5*Lr(t.display),3);n=(a>0?e.bottom:e.top)+a*c}else"line"==r&&(n=a>0?e.bottom+3:e.top-3);for(;(i=xr(t,l,n)).outside;){if(a<0?n<=0:n>=o.height){i.hitSide=!0;break}n+=5*a}return i}var Xl=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new I,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Ql(t,e){var a=tr(t,e.line);if(!a||a.hidden)return null;var r=Zt(t.doc,e.line),n=Za(a,r,e.line),i=dt(r,t.doc.direction),o="left";i&&(o=ht(i,e.ch)%2?"right":"left");var l=ir(n.map,e.ch,o);return l.offset="right"==l.collapse?l.end:l.start,l}function ts(t){for(var e=t;e;e=e.parentNode)if(/CodeMirror-gutter-wrapper/.test(e.className))return!0;return!1}function es(t,e){return e&&(t.bad=!0),t}function as(t,e,a,r,n){var i="",o=!1,l=t.doc.lineSeparator(),s=!1;function c(t){return function(e){return e.id==t}}function h(){o&&(i+=l,s&&(i+=l),o=s=!1)}function u(t){t&&(h(),i+=t)}function d(e){if(1==e.nodeType){var a=e.getAttribute("cm-text");if(a)return void u(a);var i,p=e.getAttribute("cm-marker");if(p){var m=t.findMarks(ie(r,0),ie(n+1,0),c(+p));return void(m.length&&(i=m[0].find(0))&&u(Xt(t.doc,i.from,i.to).join(l)))}if("false"==e.getAttribute("contenteditable"))return;var v=/^(pre|div|p|li|table|br)$/i.test(e.nodeName);if(!/^br$/i.test(e.nodeName)&&0==e.textContent.length)return;v&&h();for(var f=0;f<e.childNodes.length;f++)d(e.childNodes[f]);/^(pre|p)$/i.test(e.nodeName)&&(s=!0),v&&(o=!0)}else 3==e.nodeType&&u(e.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;d(e),e!=a;)e=e.nextSibling,s=!1;return i}function rs(t,e,a){var r;if(e==t.display.lineDiv){if(!(r=t.display.lineDiv.childNodes[a]))return es(t.clipPos(ie(t.display.viewTo-1)),!0);e=null,a=0}else for(r=e;;r=r.parentNode){if(!r||r==t.display.lineDiv)return null;if(r.parentNode&&r.parentNode==t.display.lineDiv)break}for(var n=0;n<t.display.view.length;n++){var i=t.display.view[n];if(i.node==r)return ns(i,e,a)}}function ns(t,e,a){var r=t.text.firstChild,n=!1;if(!e||!C(r,e))return es(ie(ee(t.line),0),!0);if(e==r&&(n=!0,e=r.childNodes[a],a=0,!e)){var i=t.rest?K(t.rest):t.line;return es(ie(ee(i),i.text.length),n)}var o=3==e.nodeType?e:null,l=e;for(o||1!=e.childNodes.length||3!=e.firstChild.nodeType||(o=e.firstChild,a&&(a=o.nodeValue.length));l.parentNode!=r;)l=l.parentNode;var s=t.measure,c=s.maps;function h(e,a,r){for(var n=-1;n<(c?c.length:0);n++)for(var i=n<0?s.map:c[n],o=0;o<i.length;o+=3){var l=i[o+2];if(l==e||l==a){var h=ee(n<0?t.line:t.rest[n]),u=i[o]+r;return(r<0||l!=e)&&(u=i[o+(r?1:0)]),ie(h,u)}}}var u=h(o,l,a);if(u)return es(u,n);for(var d=l.nextSibling,p=o?o.nodeValue.length-a:0;d;d=d.nextSibling){if(u=h(d,d.firstChild,0))return es(ie(u.line,u.ch-p),n);p+=d.textContent.length}for(var m=l.previousSibling,v=a;m;m=m.previousSibling){if(u=h(m,m.firstChild,-1))return es(ie(u.line,u.ch+v),n);v+=m.textContent.length}}Xl.prototype.init=function(t){var e=this,a=this,r=a.cm,n=a.div=t.lineDiv;function i(t){for(var e=t.target;e;e=e.parentNode){if(e==n)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(e.className))break}return!1}function o(t){if(i(t)&&!gt(r,t)){if(r.somethingSelected())Nl({lineWise:!1,text:r.getSelections()}),"cut"==t.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var e=ql(r);Nl({lineWise:!0,text:e.text}),"cut"==t.type&&r.operation((function(){r.setSelections(e.ranges,0,$),r.replaceSelection("",null,"cut")}))}if(t.clipboardData){t.clipboardData.clearData();var o=Rl.text.join("\n");if(t.clipboardData.setData("Text",o),t.clipboardData.getData("Text")==o)return void t.preventDefault()}var l=Yl(),s=l.firstChild;r.display.lineSpace.insertBefore(l,r.display.lineSpace.firstChild),s.value=Rl.text.join("\n");var c=document.activeElement;T(s),setTimeout((function(){r.display.lineSpace.removeChild(l),c.focus(),c==n&&a.showPrimarySelection()}),50)}}n.contentEditable=!0,Gl(n,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize),mt(n,"paste",(function(t){!i(t)||gt(r,t)||Ul(t,r)||l<=11&&setTimeout(Sn(r,(function(){return e.updateFromDOM()})),20)})),mt(n,"compositionstart",(function(t){e.composing={data:t.data,done:!1}})),mt(n,"compositionupdate",(function(t){e.composing||(e.composing={data:t.data,done:!1})})),mt(n,"compositionend",(function(t){e.composing&&(t.data!=e.composing.data&&e.readFromDOMSoon(),e.composing.done=!0)})),mt(n,"touchstart",(function(){return a.forceCompositionEnd()})),mt(n,"input",(function(){e.composing||e.readFromDOMSoon()})),mt(n,"copy",o),mt(n,"cut",o)},Xl.prototype.screenReaderLabelChanged=function(t){t?this.div.setAttribute("aria-label",t):this.div.removeAttribute("aria-label")},Xl.prototype.prepareSelection=function(){var t=$r(this.cm,!1);return t.focus=document.activeElement==this.div,t},Xl.prototype.showSelection=function(t,e){t&&this.cm.display.view.length&&((t.focus||e)&&this.showPrimarySelection(),this.showMultipleSelections(t))},Xl.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Xl.prototype.showPrimarySelection=function(){var t=this.getSelection(),e=this.cm,r=e.doc.sel.primary(),n=r.from(),i=r.to();if(e.display.viewTo==e.display.viewFrom||n.line>=e.display.viewTo||i.line<e.display.viewFrom)t.removeAllRanges();else{var o=rs(e,t.anchorNode,t.anchorOffset),l=rs(e,t.focusNode,t.focusOffset);if(!o||o.bad||!l||l.bad||0!=oe(he(o,l),n)||0!=oe(ce(o,l),i)){var s=e.display.view,c=n.line>=e.display.viewFrom&&Ql(e,n)||{node:s[0].measure.map[2],offset:0},h=i.line<e.display.viewTo&&Ql(e,i);if(!h){var u=s[s.length-1].measure,d=u.maps?u.maps[u.maps.length-1]:u.map;h={node:d[d.length-1],offset:d[d.length-2]-d[d.length-3]}}if(c&&h){var p,m=t.rangeCount&&t.getRangeAt(0);try{p=A(c.node,c.offset,h.offset,h.node)}catch(Et){}p&&(!a&&e.state.focused?(t.collapse(c.node,c.offset),p.collapsed||(t.removeAllRanges(),t.addRange(p))):(t.removeAllRanges(),t.addRange(p)),m&&null==t.anchorNode?t.addRange(m):a&&this.startGracePeriod()),this.rememberSelection()}else t.removeAllRanges()}}},Xl.prototype.startGracePeriod=function(){var t=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout((function(){t.gracePeriod=!1,t.selectionChanged()&&t.cm.operation((function(){return t.cm.curOp.selectionChanged=!0}))}),20)},Xl.prototype.showMultipleSelections=function(t){L(this.cm.display.cursorDiv,t.cursors),L(this.cm.display.selectionDiv,t.selection)},Xl.prototype.rememberSelection=function(){var t=this.getSelection();this.lastAnchorNode=t.anchorNode,this.lastAnchorOffset=t.anchorOffset,this.lastFocusNode=t.focusNode,this.lastFocusOffset=t.focusOffset},Xl.prototype.selectionInEditor=function(){var t=this.getSelection();if(!t.rangeCount)return!1;var e=t.getRangeAt(0).commonAncestorContainer;return C(this.div,e)},Xl.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()&&document.activeElement==this.div||this.showSelection(this.prepareSelection(),!0),this.div.focus())},Xl.prototype.blur=function(){this.div.blur()},Xl.prototype.getField=function(){return this.div},Xl.prototype.supportsTouch=function(){return!0},Xl.prototype.receivedFocus=function(){var t=this;function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))}this.selectionInEditor()?this.pollSelection():Cn(this.cm,(function(){return t.cm.curOp.selectionChanged=!0})),this.polling.set(this.cm.options.pollInterval,e)},Xl.prototype.selectionChanged=function(){var t=this.getSelection();return t.anchorNode!=this.lastAnchorNode||t.anchorOffset!=this.lastAnchorOffset||t.focusNode!=this.lastFocusNode||t.focusOffset!=this.lastFocusOffset},Xl.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var t=this.getSelection(),e=this.cm;if(f&&h&&this.cm.display.gutterSpecs.length&&ts(t.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var a=rs(e,t.anchorNode,t.anchorOffset),r=rs(e,t.focusNode,t.focusOffset);a&&r&&Cn(e,(function(){Ri(e.doc,li(a,r),$),(a.bad||r.bad)&&(e.curOp.selectionChanged=!0)}))}}},Xl.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var t,e,a,r=this.cm,n=r.display,i=r.doc.sel.primary(),o=i.from(),l=i.to();if(0==o.ch&&o.line>r.firstLine()&&(o=ie(o.line-1,Zt(r.doc,o.line-1).length)),l.ch==Zt(r.doc,l.line).text.length&&l.line<r.lastLine()&&(l=ie(l.line+1,0)),o.line<n.viewFrom||l.line>n.viewTo-1)return!1;o.line==n.viewFrom||0==(t=Tr(r,o.line))?(e=ee(n.view[0].line),a=n.view[0].node):(e=ee(n.view[t].line),a=n.view[t-1].node.nextSibling);var s,c,h=Tr(r,l.line);if(h==n.view.length-1?(s=n.viewTo-1,c=n.lineDiv.lastChild):(s=ee(n.view[h+1].line)-1,c=n.view[h+1].node.previousSibling),!a)return!1;for(var u=r.doc.splitLines(as(r,a,c,e,s)),d=Xt(r.doc,ie(e,0),ie(s,Zt(r.doc,s).text.length));u.length>1&&d.length>1;)if(K(u)==K(d))u.pop(),d.pop(),s--;else{if(u[0]!=d[0])break;u.shift(),d.shift(),e++}for(var p=0,m=0,v=u[0],f=d[0],y=Math.min(v.length,f.length);p<y&&v.charCodeAt(p)==f.charCodeAt(p);)++p;for(var g=K(u),b=K(d),z=Math.min(g.length-(1==u.length?p:0),b.length-(1==d.length?p:0));m<z&&g.charCodeAt(g.length-m-1)==b.charCodeAt(b.length-m-1);)++m;if(1==u.length&&1==d.length&&e==o.line)for(;p&&p>o.ch&&g.charCodeAt(g.length-m-1)==b.charCodeAt(b.length-m-1);)p--,m++;u[u.length-1]=g.slice(0,g.length-m).replace(/^\u200b+/,""),u[0]=u[0].slice(p).replace(/\u200b+$/,"");var x=ie(e,p),w=ie(s,d.length?K(d).length-m:0);return u.length>1||u[0]||oe(x,w)?(ro(r.doc,u,x,w,"+input"),!0):void 0},Xl.prototype.ensurePolled=function(){this.forceCompositionEnd()},Xl.prototype.reset=function(){this.forceCompositionEnd()},Xl.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Xl.prototype.readFromDOMSoon=function(){var t=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(t.readDOMTimeout=null,t.composing){if(!t.composing.done)return;t.composing=null}t.updateFromDOM()}),80))},Xl.prototype.updateFromDOM=function(){var t=this;!this.cm.isReadOnly()&&this.pollContent()||Cn(this.cm,(function(){return Dr(t.cm)}))},Xl.prototype.setUneditable=function(t){t.contentEditable="false"},Xl.prototype.onKeyPress=function(t){0==t.charCode||this.composing||(t.preventDefault(),this.cm.isReadOnly()||Sn(this.cm,$l)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0))},Xl.prototype.readOnlyChanged=function(t){this.div.contentEditable=String("nocursor"!=t)},Xl.prototype.onContextMenu=function(){},Xl.prototype.resetPosition=function(){},Xl.prototype.needsContentAttribute=!0;var is=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new I,this.hasSelection=!1,this.composing=null};function os(t,e){if((e=e?j(e):{}).value=t.value,!e.tabindex&&t.tabIndex&&(e.tabindex=t.tabIndex),!e.placeholder&&t.placeholder&&(e.placeholder=t.placeholder),null==e.autofocus){var a=S();e.autofocus=a==t||null!=t.getAttribute("autofocus")&&a==document.body}function r(){t.value=l.getValue()}var n;if(t.form&&(mt(t.form,"submit",r),!e.leaveSubmitMethodAlone)){var i=t.form;n=i.submit;try{var o=i.submit=function(){r(),i.submit=n,i.submit(),i.submit=o}}catch(Et){}}e.finishInit=function(a){a.save=r,a.getTextArea=function(){return t},a.toTextArea=function(){a.toTextArea=isNaN,r(),t.parentNode.removeChild(a.getWrapperElement()),t.style.display="",t.form&&(ft(t.form,"submit",r),e.leaveSubmitMethodAlone||"function"!=typeof t.form.submit||(t.form.submit=n))}},t.style.display="none";var l=jl((function(e){return t.parentNode.insertBefore(e,t.nextSibling)}),e);return l}function ls(t){t.off=ft,t.on=mt,t.wheelEventPixels=ai,t.Doc=Mo,t.splitLines=Ot,t.countColumn=F,t.findColumn=q,t.isWordChar=et,t.Pass=N,t.signal=yt,t.Line=sa,t.changeEnd=si,t.scrollbarModel=zn,t.Pos=ie,t.cmpPos=oe,t.modes=It,t.mimeModes=Pt,t.resolveMode=$t,t.getMode=Ut,t.modeExtensions=Wt,t.extendMode=qt,t.copyState=Gt,t.startState=Kt,t.innerMode=Yt,t.commands=Zo,t.keyMap=Fo,t.keyName=Uo,t.isModifierKey=No,t.lookupKey=Ro,t.normalizeKeyMap=Po,t.StringStream=Jt,t.SharedTextMarker=yo,t.TextMarker=vo,t.LineWidget=ho,t.e_preventDefault=wt,t.e_stopPropagation=Mt,t.e_stop=At,t.addClass=E,t.contains=C,t.rmClass=H,t.keyNames=Oo}is.prototype.init=function(t){var e=this,a=this,r=this.cm;this.createField(t);var n=this.textarea;function i(t){if(!gt(r,t)){if(r.somethingSelected())Nl({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var e=ql(r);Nl({lineWise:!0,text:e.text}),"cut"==t.type?r.setSelections(e.ranges,null,$):(a.prevInput="",n.value=e.text.join("\n"),T(n))}"cut"==t.type&&(r.state.cutIncoming=+new Date)}}t.wrapper.insertBefore(this.wrapper,t.wrapper.firstChild),v&&(n.style.width="0px"),mt(n,"input",(function(){o&&l>=9&&e.hasSelection&&(e.hasSelection=null),a.poll()})),mt(n,"paste",(function(t){gt(r,t)||Ul(t,r)||(r.state.pasteIncoming=+new Date,a.fastPoll())})),mt(n,"cut",i),mt(n,"copy",i),mt(t.scroller,"paste",(function(e){if(!$a(t,e)&&!gt(r,e)){if(!n.dispatchEvent)return r.state.pasteIncoming=+new Date,void a.focus();var i=new Event("paste");i.clipboardData=e.clipboardData,n.dispatchEvent(i)}})),mt(t.lineSpace,"selectstart",(function(e){$a(t,e)||wt(e)})),mt(n,"compositionstart",(function(){var t=r.getCursor("from");a.composing&&a.composing.range.clear(),a.composing={start:t,range:r.markText(t,r.getCursor("to"),{className:"CodeMirror-composing"})}})),mt(n,"compositionend",(function(){a.composing&&(a.poll(),a.composing.range.clear(),a.composing=null)}))},is.prototype.createField=function(t){this.wrapper=Yl(),this.textarea=this.wrapper.firstChild},is.prototype.screenReaderLabelChanged=function(t){t?this.textarea.setAttribute("aria-label",t):this.textarea.removeAttribute("aria-label")},is.prototype.prepareSelection=function(){var t=this.cm,e=t.display,a=t.doc,r=$r(t);if(t.options.moveInputWithCursor){var n=gr(t,a.sel.primary().head,"div"),i=e.wrapper.getBoundingClientRect(),o=e.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(e.wrapper.clientHeight-10,n.top+o.top-i.top)),r.teLeft=Math.max(0,Math.min(e.wrapper.clientWidth-10,n.left+o.left-i.left))}return r},is.prototype.showSelection=function(t){var e=this.cm.display;L(e.cursorDiv,t.cursors),L(e.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},is.prototype.reset=function(t){if(!this.contextMenuPending&&!this.composing){var e=this.cm;if(e.somethingSelected()){this.prevInput="";var a=e.getSelection();this.textarea.value=a,e.state.focused&&T(this.textarea),o&&l>=9&&(this.hasSelection=a)}else t||(this.prevInput=this.textarea.value="",o&&l>=9&&(this.hasSelection=null))}},is.prototype.getField=function(){return this.textarea},is.prototype.supportsTouch=function(){return!1},is.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!y||S()!=this.textarea))try{this.textarea.focus()}catch(Et){}},is.prototype.blur=function(){this.textarea.blur()},is.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},is.prototype.receivedFocus=function(){this.slowPoll()},is.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){t.poll(),t.cm.state.focused&&t.slowPoll()}))},is.prototype.fastPoll=function(){var t=!1,e=this;function a(){e.poll()||t?(e.pollingFast=!1,e.slowPoll()):(t=!0,e.polling.set(60,a))}e.pollingFast=!0,e.polling.set(20,a)},is.prototype.poll=function(){var t=this,e=this.cm,a=this.textarea,r=this.prevInput;if(this.contextMenuPending||!e.state.focused||Tt(a)&&!r&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var n=a.value;if(n==r&&!e.somethingSelected())return!1;if(o&&l>=9&&this.hasSelection===n||g&&/[\uf700-\uf7ff]/.test(n))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var i=n.charCodeAt(0);if(8203!=i||r||(r="​"),8666==i)return this.reset(),this.cm.execCommand("undo")}for(var s=0,c=Math.min(r.length,n.length);s<c&&r.charCodeAt(s)==n.charCodeAt(s);)++s;return Cn(e,(function(){$l(e,n.slice(s),r.length-s,null,t.composing?"*compose":null),n.length>1e3||n.indexOf("\n")>-1?a.value=t.prevInput="":t.prevInput=n,t.composing&&(t.composing.range.clear(),t.composing.range=e.markText(t.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},is.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},is.prototype.onKeyPress=function(){o&&l>=9&&(this.hasSelection=null),this.fastPoll()},is.prototype.onContextMenu=function(t){var e=this,a=e.cm,r=a.display,n=e.textarea;e.contextMenuPending&&e.contextMenuPending();var i=Or(a,t),c=r.scroller.scrollTop;if(i&&!u){a.options.resetSelectionOnContextMenu&&-1==a.doc.sel.contains(i)&&Sn(a,Ri)(a.doc,li(i),$);var h,d=n.style.cssText,p=e.wrapper.style.cssText,m=e.wrapper.offsetParent.getBoundingClientRect();if(e.wrapper.style.cssText="position: static",n.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-m.top-5)+"px; left: "+(t.clientX-m.left-5)+"px;\n z-index: 1000; background: "+(o?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",s&&(h=window.scrollY),r.input.focus(),s&&window.scrollTo(null,h),r.input.reset(),a.somethingSelected()||(n.value=e.prevInput=" "),e.contextMenuPending=y,r.selForContextMenu=a.doc.sel,clearTimeout(r.detectingSelectAll),o&&l>=9&&f(),M){At(t);var v=function(){ft(window,"mouseup",v),setTimeout(y,20)};mt(window,"mouseup",v)}else setTimeout(y,50)}function f(){if(null!=n.selectionStart){var t=a.somethingSelected(),i="​"+(t?n.value:"");n.value="⇚",n.value=i,e.prevInput=t?"":"​",n.selectionStart=1,n.selectionEnd=i.length,r.selForContextMenu=a.doc.sel}}function y(){if(e.contextMenuPending==y&&(e.contextMenuPending=!1,e.wrapper.style.cssText=p,n.style.cssText=d,o&&l<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=c),null!=n.selectionStart)){(!o||o&&l<9)&&f();var t=0,i=function(){r.selForContextMenu==a.doc.sel&&0==n.selectionStart&&n.selectionEnd>0&&"​"==e.prevInput?Sn(a,Ki)(a):t++<10?r.detectingSelectAll=setTimeout(i,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(i,200)}}},is.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled="nocursor"==t,this.textarea.readOnly=!!t},is.prototype.setUneditable=function(){},is.prototype.needsContentAttribute=!1,Ol(jl),Kl(jl);var ss="iter insert remove copy getEditor constructor".split(" ");for(var cs in Mo.prototype)Mo.prototype.hasOwnProperty(cs)&&P(ss,cs)<0&&(jl.prototype[cs]=function(t){return function(){return t.apply(this.doc,arguments)}}(Mo.prototype[cs]));return xt(Mo),jl.inputStyles={textarea:is,contenteditable:Xl},jl.defineMode=function(t){jl.defaults.mode||"null"==t||(jl.defaults.mode=t),Rt.apply(this,arguments)},jl.defineMIME=Nt,jl.defineMode("null",(function(){return{token:function(t){return t.skipToEnd()}}})),jl.defineMIME("text/plain","null"),jl.defineExtension=function(t,e){jl.prototype[t]=e},jl.defineDocExtension=function(t,e){Mo.prototype[t]=e},jl.fromTextArea=os,ls(jl),jl.version="5.60.0",jl}()}));kr((function(t,e){var a;(a=Ls).defineMode("javascript",(function(t,e){var r,n,i=t.indentUnit,o=e.statementIndent,l=e.jsonld,s=e.json||l,c=e.typescript,h=e.wordCharacters||/[\w$\xa1-\uffff]/,u=function(){function t(t){return{type:t,style:"keyword"}}var e=t("keyword a"),a=t("keyword b"),r=t("keyword c"),n=t("keyword d"),i=t("operator"),o={type:"atom",style:"atom"};return{if:t("if"),while:e,with:e,else:a,do:a,try:a,finally:a,return:n,break:n,continue:n,new:t("new"),delete:r,void:r,throw:r,debugger:t("debugger"),var:t("var"),const:t("var"),let:t("var"),function:t("function"),catch:t("catch"),for:t("for"),switch:t("switch"),case:t("case"),default:t("default"),in:i,typeof:i,instanceof:i,true:o,false:o,null:o,undefined:o,NaN:o,Infinity:o,this:t("this"),class:t("class"),super:t("atom"),yield:r,export:t("export"),import:t("import"),extends:r,await:r}}(),d=/[+\-*&%=<>!?|~^@]/,p=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function m(t){for(var e,a=!1,r=!1;null!=(e=t.next());){if(!a){if("/"==e&&!r)return;"["==e?r=!0:r&&"]"==e&&(r=!1)}a=!a&&"\\"==e}}function v(t,e,a){return r=t,n=a,e}function f(t,e){var a=t.next();if('"'==a||"'"==a)return e.tokenize=y(a),e.tokenize(t,e);if("."==a&&t.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return v("number","number");if("."==a&&t.match(".."))return v("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(a))return v(a);if("="==a&&t.eat(">"))return v("=>","operator");if("0"==a&&t.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return v("number","number");if(/\d/.test(a))return t.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),v("number","number");if("/"==a)return t.eat("*")?(e.tokenize=g,g(t,e)):t.eat("/")?(t.skipToEnd(),v("comment","comment")):ee(t,e,1)?(m(t),t.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),v("regexp","string-2")):(t.eat("="),v("operator","operator",t.current()));if("`"==a)return e.tokenize=b,b(t,e);if("#"==a&&"!"==t.peek())return t.skipToEnd(),v("meta","meta");if("#"==a&&t.eatWhile(h))return v("variable","property");if("<"==a&&t.match("!--")||"-"==a&&t.match("->")&&!/\S/.test(t.string.slice(0,t.start)))return t.skipToEnd(),v("comment","comment");if(d.test(a))return">"==a&&e.lexical&&">"==e.lexical.type||(t.eat("=")?"!"!=a&&"="!=a||t.eat("="):/[<>*+\-|&?]/.test(a)&&(t.eat(a),">"==a&&t.eat(a))),"?"==a&&t.eat(".")?v("."):v("operator","operator",t.current());if(h.test(a)){t.eatWhile(h);var r=t.current();if("."!=e.lastType){if(u.propertyIsEnumerable(r)){var n=u[r];return v(n.type,n.style,r)}if("async"==r&&t.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return v("async","keyword",r)}return v("variable","variable",r)}}function y(t){return function(e,a){var r,n=!1;if(l&&"@"==e.peek()&&e.match(p))return a.tokenize=f,v("jsonld-keyword","meta");for(;null!=(r=e.next())&&(r!=t||n);)n=!n&&"\\"==r;return n||(a.tokenize=f),v("string","string")}}function g(t,e){for(var a,r=!1;a=t.next();){if("/"==a&&r){e.tokenize=f;break}r="*"==a}return v("comment","comment")}function b(t,e){for(var a,r=!1;null!=(a=t.next());){if(!r&&("`"==a||"$"==a&&t.eat("{"))){e.tokenize=f;break}r=!r&&"\\"==a}return v("quasi","string-2",t.current())}var z="([{}])";function x(t,e){e.fatArrowAt&&(e.fatArrowAt=null);var a=t.string.indexOf("=>",t.start);if(!(a<0)){if(c){var r=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(t.string.slice(t.start,a));r&&(a=r.index)}for(var n=0,i=!1,o=a-1;o>=0;--o){var l=t.string.charAt(o),s=z.indexOf(l);if(s>=0&&s<3){if(!n){++o;break}if(0==--n){"("==l&&(i=!0);break}}else if(s>=3&&s<6)++n;else if(h.test(l))i=!0;else if(/["'\/`]/.test(l))for(;;--o){if(0==o)return;if(t.string.charAt(o-1)==l&&"\\"!=t.string.charAt(o-2)){o--;break}}else if(i&&!n){++o;break}}i&&!n&&(e.fatArrowAt=o)}}var w={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function M(t,e,a,r,n,i){this.indented=t,this.column=e,this.type=a,this.prev=n,this.info=i,null!=r&&(this.align=r)}function _(t,e){for(var a=t.localVars;a;a=a.next)if(a.name==e)return!0;for(var r=t.context;r;r=r.prev)for(a=r.vars;a;a=a.next)if(a.name==e)return!0}function A(t,e,a,r,n){var i=t.cc;for(H.state=t,H.stream=n,H.marked=null,H.cc=i,H.style=e,t.lexical.hasOwnProperty("align")||(t.lexical.align=!0);;)if((i.length?i.pop():s?U:N)(a,r)){for(;i.length&&i[i.length-1].lex;)i.pop()();return H.marked?H.marked:"variable"==a&&_(t,r)?"variable-2":e}}var H={state:null,column:null,marked:null,cc:null};function V(){for(var t=arguments.length-1;t>=0;t--)H.cc.push(arguments[t])}function L(){return V.apply(null,arguments),!0}function B(t,e){for(var a=e;a;a=a.next)if(a.name==t)return!0;return!1}function k(t){var a=H.state;if(H.marked="def",a.context)if("var"==a.lexical.info&&a.context&&a.context.block){var r=C(t,a.context);if(null!=r)return void(a.context=r)}else if(!B(t,a.localVars))return void(a.localVars=new O(t,a.localVars));e.globalVars&&!B(t,a.globalVars)&&(a.globalVars=new O(t,a.globalVars))}function C(t,e){if(e){if(e.block){var a=C(t,e.prev);return a?a==e.prev?e:new E(a,e.vars,!0):null}return B(t,e.vars)?e:new E(e.prev,new O(t,e.vars),!1)}return null}function S(t){return"public"==t||"private"==t||"protected"==t||"abstract"==t||"readonly"==t}function E(t,e,a){this.prev=t,this.vars=e,this.block=a}function O(t,e){this.name=t,this.next=e}var T=new O("this",new O("arguments",null));function D(){H.state.context=new E(H.state.context,H.state.localVars,!1),H.state.localVars=T}function j(){H.state.context=new E(H.state.context,H.state.localVars,!0),H.state.localVars=null}function F(){H.state.localVars=H.state.context.vars,H.state.context=H.state.context.prev}function I(t,e){var a=function(){var a=H.state,r=a.indented;if("stat"==a.lexical.type)r=a.lexical.indented;else for(var n=a.lexical;n&&")"==n.type&&n.align;n=n.prev)r=n.indented;a.lexical=new M(r,H.stream.column(),t,null,a.lexical,e)};return a.lex=!0,a}function P(){var t=H.state;t.lexical.prev&&(")"==t.lexical.type&&(t.indented=t.lexical.indented),t.lexical=t.lexical.prev)}function R(t){function e(a){return a==t?L():";"==t||"}"==a||")"==a||"]"==a?V():L(e)}return e}function N(t,e){return"var"==t?L(I("vardef",e),At,R(";"),P):"keyword a"==t?L(I("form"),q,N,P):"keyword b"==t?L(I("form"),N,P):"keyword d"==t?H.stream.match(/^\s*$/,!1)?L():L(I("stat"),Y,R(";"),P):"debugger"==t?L(R(";")):"{"==t?L(I("}"),j,ut,P,F):";"==t?L():"if"==t?("else"==H.state.lexical.info&&H.state.cc[H.state.cc.length-1]==P&&H.state.cc.pop()(),L(I("form"),q,N,P,Ct)):"function"==t?L(Tt):"for"==t?L(I("form"),St,N,P):"class"==t||c&&"interface"==e?(H.marked="keyword",L(I("form","class"==t?t:e),Pt,P)):"variable"==t?c&&"declare"==e?(H.marked="keyword",L(N)):c&&("module"==e||"enum"==e||"type"==e)&&H.stream.match(/^\s*\w/,!1)?(H.marked="keyword","enum"==e?L(Xt):"type"==e?L(jt,R("operator"),ft,R(";")):L(I("form"),Ht,R("{"),I("}"),ut,P,P)):c&&"namespace"==e?(H.marked="keyword",L(I("form"),U,N,P)):c&&"abstract"==e?(H.marked="keyword",L(N)):L(I("stat"),nt):"switch"==t?L(I("form"),q,R("{"),I("}","switch"),j,ut,P,P,F):"case"==t?L(U,R(":")):"default"==t?L(R(":")):"catch"==t?L(I("form"),D,$,N,P,F):"export"==t?L(I("stat"),Ut,P):"import"==t?L(I("stat"),qt,P):"async"==t?L(N):"@"==e?L(U,N):V(I("stat"),U,R(";"),P)}function $(t){if("("==t)return L(Ft,R(")"))}function U(t,e){return G(t,e,!1)}function W(t,e){return G(t,e,!0)}function q(t){return"("!=t?V():L(I(")"),Y,R(")"),P)}function G(t,e,a){if(H.state.fatArrowAt==H.stream.start){var r=a?tt:Q;if("("==t)return L(D,I(")"),ct(Ft,")"),P,R("=>"),r,F);if("variable"==t)return V(D,Ht,R("=>"),r,F)}var n=a?J:K;return w.hasOwnProperty(t)?L(n):"function"==t?L(Tt,n):"class"==t||c&&"interface"==e?(H.marked="keyword",L(I("form"),It,P)):"keyword c"==t||"async"==t?L(a?W:U):"("==t?L(I(")"),Y,R(")"),P,n):"operator"==t||"spread"==t?L(a?W:U):"["==t?L(I("]"),Zt,P,n):"{"==t?ht(ot,"}",null,n):"quasi"==t?V(Z,n):"new"==t?L(et(a)):L()}function Y(t){return t.match(/[;\}\)\],]/)?V():V(U)}function K(t,e){return","==t?L(Y):J(t,e,!1)}function J(t,e,a){var r=0==a?K:J,n=0==a?U:W;return"=>"==t?L(D,a?tt:Q,F):"operator"==t?/\+\+|--/.test(e)||c&&"!"==e?L(r):c&&"<"==e&&H.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?L(I(">"),ct(ft,">"),P,r):"?"==e?L(U,R(":"),n):L(n):"quasi"==t?V(Z,r):";"!=t?"("==t?ht(W,")","call",r):"."==t?L(it,r):"["==t?L(I("]"),Y,R("]"),P,r):c&&"as"==e?(H.marked="keyword",L(ft,r)):"regexp"==t?(H.state.lastType=H.marked="operator",H.stream.backUp(H.stream.pos-H.stream.start-1),L(n)):void 0:void 0}function Z(t,e){return"quasi"!=t?V():"${"!=e.slice(e.length-2)?L(Z):L(U,X)}function X(t){if("}"==t)return H.marked="string-2",H.state.tokenize=b,L(Z)}function Q(t){return x(H.stream,H.state),V("{"==t?N:U)}function tt(t){return x(H.stream,H.state),V("{"==t?N:W)}function et(t){return function(e){return"."==e?L(t?rt:at):"variable"==e&&c?L(wt,t?J:K):V(t?W:U)}}function at(t,e){if("target"==e)return H.marked="keyword",L(K)}function rt(t,e){if("target"==e)return H.marked="keyword",L(J)}function nt(t){return":"==t?L(P,N):V(K,R(";"),P)}function it(t){if("variable"==t)return H.marked="property",L()}function ot(t,e){return"async"==t?(H.marked="property",L(ot)):"variable"==t||"keyword"==H.style?(H.marked="property","get"==e||"set"==e?L(lt):(c&&H.state.fatArrowAt==H.stream.start&&(a=H.stream.match(/^\s*:\s*/,!1))&&(H.state.fatArrowAt=H.stream.pos+a[0].length),L(st))):"number"==t||"string"==t?(H.marked=l?"property":H.style+" property",L(st)):"jsonld-keyword"==t?L(st):c&&S(e)?(H.marked="keyword",L(ot)):"["==t?L(U,dt,R("]"),st):"spread"==t?L(W,st):"*"==e?(H.marked="keyword",L(ot)):":"==t?V(st):void 0;var a}function lt(t){return"variable"!=t?V(st):(H.marked="property",L(Tt))}function st(t){return":"==t?L(W):"("==t?V(Tt):void 0}function ct(t,e,a){function r(n,i){if(a?a.indexOf(n)>-1:","==n){var o=H.state.lexical;return"call"==o.info&&(o.pos=(o.pos||0)+1),L((function(a,r){return a==e||r==e?V():V(t)}),r)}return n==e||i==e?L():a&&a.indexOf(";")>-1?V(t):L(R(e))}return function(a,n){return a==e||n==e?L():V(t,r)}}function ht(t,e,a){for(var r=3;r<arguments.length;r++)H.cc.push(arguments[r]);return L(I(e,a),ct(t,e),P)}function ut(t){return"}"==t?L():V(N,ut)}function dt(t,e){if(c){if(":"==t)return L(ft);if("?"==e)return L(dt)}}function pt(t,e){if(c&&(":"==t||"in"==e))return L(ft)}function mt(t){if(c&&":"==t)return H.stream.match(/^\s*\w+\s+is\b/,!1)?L(U,vt,ft):L(ft)}function vt(t,e){if("is"==e)return H.marked="keyword",L()}function ft(t,e){return"keyof"==e||"typeof"==e||"infer"==e||"readonly"==e?(H.marked="keyword",L("typeof"==e?W:ft)):"variable"==t||"void"==e?(H.marked="type",L(xt)):"|"==e||"&"==e?L(ft):"string"==t||"number"==t||"atom"==t?L(xt):"["==t?L(I("]"),ct(ft,"]",","),P,xt):"{"==t?L(I("}"),gt,P,xt):"("==t?L(ct(zt,")"),yt,xt):"<"==t?L(ct(ft,">"),ft):void 0}function yt(t){if("=>"==t)return L(ft)}function gt(t){return t.match(/[\}\)\]]/)?L():","==t||";"==t?L(gt):V(bt,gt)}function bt(t,e){return"variable"==t||"keyword"==H.style?(H.marked="property",L(bt)):"?"==e||"number"==t||"string"==t?L(bt):":"==t?L(ft):"["==t?L(R("variable"),pt,R("]"),bt):"("==t?V(Dt,bt):t.match(/[;\}\)\],]/)?void 0:L()}function zt(t,e){return"variable"==t&&H.stream.match(/^\s*[?:]/,!1)||"?"==e?L(zt):":"==t?L(ft):"spread"==t?L(zt):V(ft)}function xt(t,e){return"<"==e?L(I(">"),ct(ft,">"),P,xt):"|"==e||"."==t||"&"==e?L(ft):"["==t?L(ft,R("]"),xt):"extends"==e||"implements"==e?(H.marked="keyword",L(ft)):"?"==e?L(ft,R(":"),ft):void 0}function wt(t,e){if("<"==e)return L(I(">"),ct(ft,">"),P,xt)}function Mt(){return V(ft,_t)}function _t(t,e){if("="==e)return L(ft)}function At(t,e){return"enum"==e?(H.marked="keyword",L(Xt)):V(Ht,dt,Bt,kt)}function Ht(t,e){return c&&S(e)?(H.marked="keyword",L(Ht)):"variable"==t?(k(e),L()):"spread"==t?L(Ht):"["==t?ht(Lt,"]"):"{"==t?ht(Vt,"}"):void 0}function Vt(t,e){return"variable"!=t||H.stream.match(/^\s*:/,!1)?("variable"==t&&(H.marked="property"),"spread"==t?L(Ht):"}"==t?V():"["==t?L(U,R("]"),R(":"),Vt):L(R(":"),Ht,Bt)):(k(e),L(Bt))}function Lt(){return V(Ht,Bt)}function Bt(t,e){if("="==e)return L(W)}function kt(t){if(","==t)return L(At)}function Ct(t,e){if("keyword b"==t&&"else"==e)return L(I("form","else"),N,P)}function St(t,e){return"await"==e?L(St):"("==t?L(I(")"),Et,P):void 0}function Et(t){return"var"==t?L(At,Ot):"variable"==t?L(Ot):V(Ot)}function Ot(t,e){return")"==t?L():";"==t?L(Ot):"in"==e||"of"==e?(H.marked="keyword",L(U,Ot)):V(U,Ot)}function Tt(t,e){return"*"==e?(H.marked="keyword",L(Tt)):"variable"==t?(k(e),L(Tt)):"("==t?L(D,I(")"),ct(Ft,")"),P,mt,N,F):c&&"<"==e?L(I(">"),ct(Mt,">"),P,Tt):void 0}function Dt(t,e){return"*"==e?(H.marked="keyword",L(Dt)):"variable"==t?(k(e),L(Dt)):"("==t?L(D,I(")"),ct(Ft,")"),P,mt,F):c&&"<"==e?L(I(">"),ct(Mt,">"),P,Dt):void 0}function jt(t,e){return"keyword"==t||"variable"==t?(H.marked="type",L(jt)):"<"==e?L(I(">"),ct(Mt,">"),P):void 0}function Ft(t,e){return"@"==e&&L(U,Ft),"spread"==t?L(Ft):c&&S(e)?(H.marked="keyword",L(Ft)):c&&"this"==t?L(dt,Bt):V(Ht,dt,Bt)}function It(t,e){return"variable"==t?Pt(t,e):Rt(t,e)}function Pt(t,e){if("variable"==t)return k(e),L(Rt)}function Rt(t,e){return"<"==e?L(I(">"),ct(Mt,">"),P,Rt):"extends"==e||"implements"==e||c&&","==t?("implements"==e&&(H.marked="keyword"),L(c?ft:U,Rt)):"{"==t?L(I("}"),Nt,P):void 0}function Nt(t,e){return"async"==t||"variable"==t&&("static"==e||"get"==e||"set"==e||c&&S(e))&&H.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(H.marked="keyword",L(Nt)):"variable"==t||"keyword"==H.style?(H.marked="property",L($t,Nt)):"number"==t||"string"==t?L($t,Nt):"["==t?L(U,dt,R("]"),$t,Nt):"*"==e?(H.marked="keyword",L(Nt)):c&&"("==t?V(Dt,Nt):";"==t||","==t?L(Nt):"}"==t?L():"@"==e?L(U,Nt):void 0}function $t(t,e){if("?"==e)return L($t);if(":"==t)return L(ft,Bt);if("="==e)return L(W);var a=H.state.lexical.prev;return V(a&&"interface"==a.info?Dt:Tt)}function Ut(t,e){return"*"==e?(H.marked="keyword",L(Jt,R(";"))):"default"==e?(H.marked="keyword",L(U,R(";"))):"{"==t?L(ct(Wt,"}"),Jt,R(";")):V(N)}function Wt(t,e){return"as"==e?(H.marked="keyword",L(R("variable"))):"variable"==t?V(W,Wt):void 0}function qt(t){return"string"==t?L():"("==t?V(U):"."==t?V(K):V(Gt,Yt,Jt)}function Gt(t,e){return"{"==t?ht(Gt,"}"):("variable"==t&&k(e),"*"==e&&(H.marked="keyword"),L(Kt))}function Yt(t){if(","==t)return L(Gt,Yt)}function Kt(t,e){if("as"==e)return H.marked="keyword",L(Gt)}function Jt(t,e){if("from"==e)return H.marked="keyword",L(U)}function Zt(t){return"]"==t?L():V(ct(W,"]"))}function Xt(){return V(I("form"),Ht,R("{"),I("}"),ct(Qt,"}"),P,P)}function Qt(){return V(Ht,Bt)}function te(t,e){return"operator"==t.lastType||","==t.lastType||d.test(e.charAt(0))||/[,.]/.test(e.charAt(0))}function ee(t,e,a){return e.tokenize==f&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(e.lastType)||"quasi"==e.lastType&&/\{\s*$/.test(t.string.slice(0,t.pos-(a||0)))}return F.lex=!0,P.lex=!0,{startState:function(t){var a={tokenize:f,lastType:"sof",cc:[],lexical:new M((t||0)-i,0,"block",!1),localVars:e.localVars,context:e.localVars&&new E(null,null,!1),indented:t||0};return e.globalVars&&"object"==typeof e.globalVars&&(a.globalVars=e.globalVars),a},token:function(t,e){if(t.sol()&&(e.lexical.hasOwnProperty("align")||(e.lexical.align=!1),e.indented=t.indentation(),x(t,e)),e.tokenize!=g&&t.eatSpace())return null;var a=e.tokenize(t,e);return"comment"==r?a:(e.lastType="operator"!=r||"++"!=n&&"--"!=n?r:"incdec",A(e,a,r,n,t))},indent:function(t,r){if(t.tokenize==g||t.tokenize==b)return a.Pass;if(t.tokenize!=f)return 0;var n,l=r&&r.charAt(0),s=t.lexical;if(!/^\s*else\b/.test(r))for(var c=t.cc.length-1;c>=0;--c){var h=t.cc[c];if(h==P)s=s.prev;else if(h!=Ct)break}for(;("stat"==s.type||"form"==s.type)&&("}"==l||(n=t.cc[t.cc.length-1])&&(n==K||n==J)&&!/^[,\.=+\-*:?[\(]/.test(r));)s=s.prev;o&&")"==s.type&&"stat"==s.prev.type&&(s=s.prev);var u=s.type,d=l==u;return"vardef"==u?s.indented+("operator"==t.lastType||","==t.lastType?s.info.length+1:0):"form"==u&&"{"==l?s.indented:"form"==u?s.indented+i:"stat"==u?s.indented+(te(t,r)?o||i:0):"switch"!=s.info||d||0==e.doubleIndentSwitch?s.align?s.column+(d?0:1):s.indented+(d?0:i):s.indented+(/^(?:case|default)\b/.test(r)?i:2*i)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:s?null:"/*",blockCommentEnd:s?null:"*/",blockCommentContinue:s?null:" * ",lineComment:s?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:s?"json":"javascript",jsonldMode:l,jsonMode:s,expressionAllowed:ee,skipExpression:function(t){var e=t.cc[t.cc.length-1];e!=U&&e!=W||t.cc.pop()}}})),a.registerHelper("wordChars","javascript",/[\w$]/),a.defineMIME("text/javascript","javascript"),a.defineMIME("text/ecmascript","javascript"),a.defineMIME("application/javascript","javascript"),a.defineMIME("application/x-javascript","javascript"),a.defineMIME("application/ecmascript","javascript"),a.defineMIME("application/json",{name:"javascript",json:!0}),a.defineMIME("application/x-json",{name:"javascript",json:!0}),a.defineMIME("application/manifest+json",{name:"javascript",json:!0}),a.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),a.defineMIME("text/typescript",{name:"javascript",typescript:!0}),a.defineMIME("application/typescript",{name:"javascript",typescript:!0})})),kr((function(t,e){!function(t){function e(t){for(var e;null!=(e=t.next());)if("`"==e&&!t.eat("`"))return"variable-2";return t.backUp(t.current().length-1),t.eatWhile(/\w/)?"variable-2":null}function a(t){for(var e;null!=(e=t.next());)if('"'==e&&!t.eat('"'))return"variable-2";return t.backUp(t.current().length-1),t.eatWhile(/\w/)?"variable-2":null}function r(t){return t.eat("@")&&(t.match("session."),t.match("local."),t.match("global.")),t.eat("'")?(t.match(/^.*'/),"variable-2"):t.eat('"')?(t.match(/^.*"/),"variable-2"):t.eat("`")?(t.match(/^.*`/),"variable-2"):t.match(/^[0-9a-zA-Z$\.\_]+/)?"variable-2":null}function n(t){return t.eat("N")?"atom":t.match(/^[a-zA-Z.#!?]/)?"variable-2":null}t.defineMode("sql",(function(e,a){var r=a.client||{},n=a.atoms||{false:!0,true:!0,null:!0},s=a.builtin||o(l),c=a.keywords||o(i),h=a.operatorChars||/^[*+\-%<>!=&|~^\/]/,u=a.support||{},d=a.hooks||{},p=a.dateSQL||{date:!0,time:!0,timestamp:!0},m=!1!==a.backslashStringEscapes,v=a.brackets||/^[\{}\(\)\[\]]/,f=a.punctuation||/^[;.,:]/;function y(t,e){var a=t.next();if(d[a]){var i=d[a](t,e);if(!1!==i)return i}if(u.hexNumber&&("0"==a&&t.match(/^[xX][0-9a-fA-F]+/)||("x"==a||"X"==a)&&t.match(/^'[0-9a-fA-F]+'/)))return"number";if(u.binaryNumber&&(("b"==a||"B"==a)&&t.match(/^'[01]+'/)||"0"==a&&t.match(/^b[01]+/)))return"number";if(a.charCodeAt(0)>47&&a.charCodeAt(0)<58)return t.match(/^[0-9]*(\.[0-9]+)?([eE][-+]?[0-9]+)?/),u.decimallessFloat&&t.match(/^\.(?!\.)/),"number";if("?"==a&&(t.eatSpace()||t.eol()||t.eat(";")))return"variable-3";if("'"==a||'"'==a&&u.doubleQuote)return e.tokenize=g(a),e.tokenize(t,e);if((u.nCharCast&&("n"==a||"N"==a)||u.charsetCast&&"_"==a&&t.match(/[a-z][a-z0-9]*/i))&&("'"==t.peek()||'"'==t.peek()))return"keyword";if(u.escapeConstant&&("e"==a||"E"==a)&&("'"==t.peek()||'"'==t.peek()&&u.doubleQuote))return e.tokenize=function(t,e){return(e.tokenize=g(t.next(),!0))(t,e)},"keyword";if(u.commentSlashSlash&&"/"==a&&t.eat("/"))return t.skipToEnd(),"comment";if(u.commentHash&&"#"==a||"-"==a&&t.eat("-")&&(!u.commentSpaceRequired||t.eat(" ")))return t.skipToEnd(),"comment";if("/"==a&&t.eat("*"))return e.tokenize=b(1),e.tokenize(t,e);if("."!=a){if(h.test(a))return t.eatWhile(h),"operator";if(v.test(a))return"bracket";if(f.test(a))return t.eatWhile(f),"punctuation";if("{"==a&&(t.match(/^( )*(d|D|t|T|ts|TS)( )*'[^']*'( )*}/)||t.match(/^( )*(d|D|t|T|ts|TS)( )*"[^"]*"( )*}/)))return"number";t.eatWhile(/^[_\w\d]/);var o=t.current().toLowerCase();return p.hasOwnProperty(o)&&(t.match(/^( )+'[^']*'/)||t.match(/^( )+"[^"]*"/))?"number":n.hasOwnProperty(o)?"atom":s.hasOwnProperty(o)?"builtin":c.hasOwnProperty(o)?"keyword":r.hasOwnProperty(o)?"string-2":null}return u.zerolessFloat&&t.match(/^(?:\d+(?:e[+-]?\d+)?)/i)?"number":t.match(/^\.+/)?null:u.ODBCdotTable&&t.match(/^[\w\d_$#]+/)?"variable-2":void 0}function g(t,e){return function(a,r){for(var n,i=!1;null!=(n=a.next());){if(n==t&&!i){r.tokenize=y;break}i=(m||e)&&!i&&"\\"==n}return"string"}}function b(t){return function(e,a){var r=e.match(/^.*?(\/\*|\*\/)/);return r?"/*"==r[1]?a.tokenize=b(t+1):a.tokenize=t>1?b(t-1):y:e.skipToEnd(),"comment"}}function z(t,e,a){e.context={prev:e.context,indent:t.indentation(),col:t.column(),type:a}}function x(t){t.indent=t.context.indent,t.context=t.context.prev}return{startState:function(){return{tokenize:y,context:null}},token:function(t,e){if(t.sol()&&e.context&&null==e.context.align&&(e.context.align=!1),e.tokenize==y&&t.eatSpace())return null;var a=e.tokenize(t,e);if("comment"==a)return a;e.context&&null==e.context.align&&(e.context.align=!0);var r=t.current();return"("==r?z(t,e,")"):"["==r?z(t,e,"]"):e.context&&e.context.type==r&&x(e),a},indent:function(a,r){var n=a.context;if(!n)return t.Pass;var i=r.charAt(0)==n.type;return n.align?n.col+(i?0:1):n.indent+(i?0:e.indentUnit)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:u.commentSlashSlash?"//":u.commentHash?"#":"--",closeBrackets:"()[]{}''\"\"``"}}));var i="alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit ";function o(t){for(var e={},a=t.split(" "),r=0;r<a.length;++r)e[a[r]]=!0;return e}var l="bool boolean bit blob enum long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision real date datetime year unsigned signed decimal numeric";t.defineMIME("text/x-sql",{name:"sql",keywords:o(i+"begin"),builtin:o(l),atoms:o("false true null unknown"),dateSQL:o("date time timestamp"),support:o("ODBCdotTable doubleQuote binaryNumber hexNumber")}),t.defineMIME("text/x-mssql",{name:"sql",client:o("$partition binary_checksum checksum connectionproperty context_info current_request_id error_line error_message error_number error_procedure error_severity error_state formatmessage get_filestream_transaction_context getansinull host_id host_name isnull isnumeric min_active_rowversion newid newsequentialid rowcount_big xact_state object_id"),keywords:o(i+"begin trigger proc view index for add constraint key primary foreign collate clustered nonclustered declare exec go if use index holdlock nolock nowait paglock readcommitted readcommittedlock readpast readuncommitted repeatableread rowlock serializable snapshot tablock tablockx updlock with"),builtin:o("bigint numeric bit smallint decimal smallmoney int tinyint money float real char varchar text nchar nvarchar ntext binary varbinary image cursor timestamp hierarchyid uniqueidentifier sql_variant xml table "),atoms:o("is not null like and or in left right between inner outer join all any some cross unpivot pivot exists"),operatorChars:/^[*+\-%<>!=^\&|\/]/,brackets:/^[\{}\(\)]/,punctuation:/^[;.,:/]/,backslashStringEscapes:!1,dateSQL:o("date datetimeoffset datetime2 smalldatetime datetime time"),hooks:{"@":r}}),t.defineMIME("text/x-mysql",{name:"sql",client:o("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:o(i+"accessible action add after algorithm all analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general get global grant grants group group_concat handler hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show signal slave slow smallint snapshot soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:o("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:o("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:o("date time timestamp"),support:o("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":r,"`":e,"\\":n}}),t.defineMIME("text/x-mariadb",{name:"sql",client:o("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:o(i+"accessible action add after algorithm all always analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general generated get global grant grants group groupby_concat handler hard hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password persistent phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show shutdown signal slave slow smallint snapshot soft soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views virtual warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:o("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:o("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:o("date time timestamp"),support:o("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":r,"`":e,"\\":n}}),t.defineMIME("text/x-sqlite",{name:"sql",client:o("auth backup bail binary changes check clone databases dbinfo dump echo eqp exit explain fullschema headers help import imposter indexes iotrace limit lint load log mode nullvalue once open output print prompt quit read restore save scanstats schema separator session shell show stats system tables testcase timeout timer trace vfsinfo vfslist vfsname width"),keywords:o(i+"abort action add after all analyze attach autoincrement before begin cascade case cast check collate column commit conflict constraint cross current_date current_time current_timestamp database default deferrable deferred detach each else end escape except exclusive exists explain fail for foreign full glob if ignore immediate index indexed initially inner instead intersect isnull key left limit match natural no notnull null of offset outer plan pragma primary query raise recursive references regexp reindex release rename replace restrict right rollback row savepoint temp temporary then to transaction trigger unique using vacuum view virtual when with without"),builtin:o("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text clob bigint int int2 int8 integer float double char varchar date datetime year unsigned signed numeric real"),atoms:o("null current_date current_time current_timestamp"),operatorChars:/^[*+\-%<>!=&|/~]/,dateSQL:o("date time timestamp datetime"),support:o("decimallessFloat zerolessFloat"),identifierQuote:'"',hooks:{"@":r,":":r,"?":r,$:r,'"':a,"`":e}}),t.defineMIME("text/x-cassandra",{name:"sql",client:{},keywords:o("add all allow alter and any apply as asc authorize batch begin by clustering columnfamily compact consistency count create custom delete desc distinct drop each_quorum exists filtering from grant if in index insert into key keyspace keyspaces level limit local_one local_quorum modify nan norecursive nosuperuser not of on one order password permission permissions primary quorum rename revoke schema select set storage superuser table three to token truncate ttl two type unlogged update use user users using values where with writetime"),builtin:o("ascii bigint blob boolean counter decimal double float frozen inet int list map static text timestamp timeuuid tuple uuid varchar varint"),atoms:o("false true infinity NaN"),operatorChars:/^[<>=]/,dateSQL:{},support:o("commentSlashSlash decimallessFloat"),hooks:{}}),t.defineMIME("text/x-plsql",{name:"sql",client:o("appinfo arraysize autocommit autoprint autorecovery autotrace blockterminator break btitle cmdsep colsep compatibility compute concat copycommit copytypecheck define describe echo editfile embedded escape exec execute feedback flagger flush heading headsep instance linesize lno loboffset logsource long longchunksize markup native newpage numformat numwidth pagesize pause pno recsep recsepchar release repfooter repheader serveroutput shiftinout show showmode size spool sqlblanklines sqlcase sqlcode sqlcontinue sqlnumber sqlpluscompatibility sqlprefix sqlprompt sqlterminator suffix tab term termout time timing trimout trimspool ttitle underline verify version wrap"),keywords:o("abort accept access add all alter and any array arraylen as asc assert assign at attributes audit authorization avg base_table begin between binary_integer body boolean by case cast char char_base check close cluster clusters colauth column comment commit compress connect connected constant constraint crash create current currval cursor data_base database date dba deallocate debugoff debugon decimal declare default definition delay delete desc digits dispose distinct do drop else elseif elsif enable end entry escape exception exception_init exchange exclusive exists exit external fast fetch file for force form from function generic goto grant group having identified if immediate in increment index indexes indicator initial initrans insert interface intersect into is key level library like limited local lock log logging long loop master maxextents maxtrans member minextents minus mislabel mode modify multiset new next no noaudit nocompress nologging noparallel not nowait number_base object of off offline on online only open option or order out package parallel partition pctfree pctincrease pctused pls_integer positive positiven pragma primary prior private privileges procedure public raise range raw read rebuild record ref references refresh release rename replace resource restrict return returning returns reverse revoke rollback row rowid rowlabel rownum rows run savepoint schema segment select separate session set share snapshot some space split sql start statement storage subtype successful synonym tabauth table tables tablespace task terminate then to trigger truncate type union unique unlimited unrecoverable unusable update use using validate value values variable view views when whenever where while with work"),builtin:o("abs acos add_months ascii asin atan atan2 average bfile bfilename bigserial bit blob ceil character chartorowid chr clob concat convert cos cosh count dec decode deref dual dump dup_val_on_index empty error exp false float floor found glb greatest hextoraw initcap instr instrb int integer isopen last_day least length lengthb ln lower lpad ltrim lub make_ref max min mlslabel mod months_between natural naturaln nchar nclob new_time next_day nextval nls_charset_decl_len nls_charset_id nls_charset_name nls_initcap nls_lower nls_sort nls_upper nlssort no_data_found notfound null number numeric nvarchar2 nvl others power rawtohex real reftohex round rowcount rowidtochar rowtype rpad rtrim serial sign signtype sin sinh smallint soundex sqlcode sqlerrm sqrt stddev string substr substrb sum sysdate tan tanh to_char text to_date to_label to_multi_byte to_number to_single_byte translate true trunc uid unlogged upper user userenv varchar varchar2 variance varying vsize xml"),operatorChars:/^[*\/+\-%<>!=~]/,dateSQL:o("date time timestamp"),support:o("doubleQuote nCharCast zerolessFloat binaryNumber hexNumber")}),t.defineMIME("text/x-hive",{name:"sql",keywords:o("select alter $elem$ $key$ $value$ add after all analyze and archive as asc before between binary both bucket buckets by cascade case cast change cluster clustered clusterstatus collection column columns comment compute concatenate continue create cross cursor data database databases dbproperties deferred delete delimited desc describe directory disable distinct distribute drop else enable end escaped exclusive exists explain export extended external fetch fields fileformat first format formatted from full function functions grant group having hold_ddltime idxproperties if import in index indexes inpath inputdriver inputformat insert intersect into is items join keys lateral left like limit lines load local location lock locks mapjoin materialized minus msck no_drop nocompress not of offline on option or order out outer outputdriver outputformat overwrite partition partitioned partitions percent plus preserve procedure purge range rcfile read readonly reads rebuild recordreader recordwriter recover reduce regexp rename repair replace restrict revoke right rlike row schema schemas semi sequencefile serde serdeproperties set shared show show_database sort sorted ssl statistics stored streamtable table tables tablesample tblproperties temporary terminated textfile then tmp to touch transform trigger unarchive undo union uniquejoin unlock update use using utc utc_tmestamp view when where while with admin authorization char compact compactions conf cube current current_date current_timestamp day decimal defined dependency directories elem_type exchange file following for grouping hour ignore inner interval jar less logical macro minute month more none noscan over owner partialscan preceding pretty principals protection reload rewrite role roles rollup rows second server sets skewed transactions truncate unbounded unset uri user values window year"),builtin:o("bool boolean long timestamp tinyint smallint bigint int float double date datetime unsigned string array struct map uniontype key_type utctimestamp value_type varchar"),atoms:o("false true null unknown"),operatorChars:/^[*+\-%<>!=]/,dateSQL:o("date timestamp"),support:o("ODBCdotTable doubleQuote binaryNumber hexNumber")}),t.defineMIME("text/x-pgsql",{name:"sql",client:o("source"),keywords:o(i+"a abort abs absent absolute access according action ada add admin after aggregate alias all allocate also alter always analyse analyze and any are array array_agg array_max_cardinality as asc asensitive assert assertion assignment asymmetric at atomic attach attribute attributes authorization avg backward base64 before begin begin_frame begin_partition bernoulli between bigint binary bit bit_length blob blocked bom boolean both breadth by c cache call called cardinality cascade cascaded case cast catalog catalog_name ceil ceiling chain char char_length character character_length character_set_catalog character_set_name character_set_schema characteristics characters check checkpoint class class_origin clob close cluster coalesce cobol collate collation collation_catalog collation_name collation_schema collect column column_name columns command_function command_function_code comment comments commit committed concurrently condition condition_number configuration conflict connect connection connection_name constant constraint constraint_catalog constraint_name constraint_schema constraints constructor contains content continue control conversion convert copy corr corresponding cost count covar_pop covar_samp create cross csv cube cume_dist current current_catalog current_date current_default_transform_group current_path current_role current_row current_schema current_time current_timestamp current_transform_group_for_type current_user cursor cursor_name cycle data database datalink datatype date datetime_interval_code datetime_interval_precision day db deallocate debug dec decimal declare default defaults deferrable deferred defined definer degree delete delimiter delimiters dense_rank depends depth deref derived desc describe descriptor detach detail deterministic diagnostics dictionary disable discard disconnect dispatch distinct dlnewcopy dlpreviouscopy dlurlcomplete dlurlcompleteonly dlurlcompletewrite dlurlpath dlurlpathonly dlurlpathwrite dlurlscheme dlurlserver dlvalue do document domain double drop dump dynamic dynamic_function dynamic_function_code each element else elseif elsif empty enable encoding encrypted end end_frame end_partition endexec enforced enum equals errcode error escape event every except exception exclude excluding exclusive exec execute exists exit exp explain expression extension external extract false family fetch file filter final first first_value flag float floor following for force foreach foreign fortran forward found frame_row free freeze from fs full function functions fusion g general generated get global go goto grant granted greatest group grouping groups handler having header hex hierarchy hint hold hour id identity if ignore ilike immediate immediately immutable implementation implicit import in include including increment indent index indexes indicator info inherit inherits initially inline inner inout input insensitive insert instance instantiable instead int integer integrity intersect intersection interval into invoker is isnull isolation join k key key_member key_type label lag language large last last_value lateral lead leading leakproof least left length level library like like_regex limit link listen ln load local localtime localtimestamp location locator lock locked log logged loop lower m map mapping match matched materialized max max_cardinality maxvalue member merge message message_length message_octet_length message_text method min minute minvalue mod mode modifies module month more move multiset mumps name names namespace national natural nchar nclob nesting new next nfc nfd nfkc nfkd nil no none normalize normalized not nothing notice notify notnull nowait nth_value ntile null nullable nullif nulls number numeric object occurrences_regex octet_length octets of off offset oids old on only open operator option options or order ordering ordinality others out outer output over overlaps overlay overriding owned owner p pad parallel parameter parameter_mode parameter_name parameter_ordinal_position parameter_specific_catalog parameter_specific_name parameter_specific_schema parser partial partition pascal passing passthrough password path percent percent_rank percentile_cont percentile_disc perform period permission pg_context pg_datatype_name pg_exception_context pg_exception_detail pg_exception_hint placing plans pli policy portion position position_regex power precedes preceding precision prepare prepared preserve primary print_strict_params prior privileges procedural procedure procedures program public publication query quote raise range rank read reads real reassign recheck recovery recursive ref references referencing refresh regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy regr_syy reindex relative release rename repeatable replace replica requiring reset respect restart restore restrict result result_oid return returned_cardinality returned_length returned_octet_length returned_sqlstate returning returns reverse revoke right role rollback rollup routine routine_catalog routine_name routine_schema routines row row_count row_number rows rowtype rule savepoint scale schema schema_name schemas scope scope_catalog scope_name scope_schema scroll search second section security select selective self sensitive sequence sequences serializable server server_name session session_user set setof sets share show similar simple size skip slice smallint snapshot some source space specific specific_name specifictype sql sqlcode sqlerror sqlexception sqlstate sqlwarning sqrt stable stacked standalone start state statement static statistics stddev_pop stddev_samp stdin stdout storage strict strip structure style subclass_origin submultiset subscription substring substring_regex succeeds sum symmetric sysid system system_time system_user t table table_name tables tablesample tablespace temp template temporary text then ties time timestamp timezone_hour timezone_minute to token top_level_count trailing transaction transaction_active transactions_committed transactions_rolled_back transform transforms translate translate_regex translation treat trigger trigger_catalog trigger_name trigger_schema trim trim_array true truncate trusted type types uescape unbounded uncommitted under unencrypted union unique unknown unlink unlisten unlogged unnamed unnest until untyped update upper uri usage use_column use_variable user user_defined_type_catalog user_defined_type_code user_defined_type_name user_defined_type_schema using vacuum valid validate validator value value_of values var_pop var_samp varbinary varchar variable_conflict variadic varying verbose version versioning view views volatile warning when whenever where while whitespace width_bucket window with within without work wrapper write xml xmlagg xmlattributes xmlbinary xmlcast xmlcomment xmlconcat xmldeclaration xmldocument xmlelement xmlexists xmlforest xmliterate xmlnamespaces xmlparse xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltext xmlvalidate year yes zone"),builtin:o("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),atoms:o("false true null unknown"),operatorChars:/^[*\/+\-%<>!=&|^\/#@?~]/,backslashStringEscapes:!1,dateSQL:o("date time timestamp"),support:o("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast escapeConstant")}),t.defineMIME("text/x-gql",{name:"sql",keywords:o("ancestor and asc by contains desc descendant distinct from group has in is limit offset on order select superset where"),atoms:o("false true"),builtin:o("blob datetime first key __key__ string integer double boolean null"),operatorChars:/^[*+\-%<>!=]/}),t.defineMIME("text/x-gpsql",{name:"sql",client:o("source"),keywords:o("abort absolute access action active add admin after aggregate all also alter always analyse analyze and any array as asc assertion assignment asymmetric at authorization backward before begin between bigint binary bit boolean both by cache called cascade cascaded case cast chain char character characteristics check checkpoint class close cluster coalesce codegen collate column comment commit committed concurrency concurrently configuration connection constraint constraints contains content continue conversion copy cost cpu_rate_limit create createdb createexttable createrole createuser cross csv cube current current_catalog current_date current_role current_schema current_time current_timestamp current_user cursor cycle data database day deallocate dec decimal declare decode default defaults deferrable deferred definer delete delimiter delimiters deny desc dictionary disable discard distinct distributed do document domain double drop dxl each else enable encoding encrypted end enum errors escape every except exchange exclude excluding exclusive execute exists explain extension external extract false family fetch fields filespace fill filter first float following for force foreign format forward freeze from full function global grant granted greatest group group_id grouping handler hash having header hold host hour identity if ignore ilike immediate immutable implicit in including inclusive increment index indexes inherit inherits initially inline inner inout input insensitive insert instead int integer intersect interval into invoker is isnull isolation join key language large last leading least left level like limit list listen load local localtime localtimestamp location lock log login mapping master match maxvalue median merge minute minvalue missing mode modifies modify month move name names national natural nchar new newline next no nocreatedb nocreateexttable nocreaterole nocreateuser noinherit nologin none noovercommit nosuperuser not nothing notify notnull nowait null nullif nulls numeric object of off offset oids old on only operator option options or order ordered others out outer over overcommit overlaps overlay owned owner parser partial partition partitions passing password percent percentile_cont percentile_disc placing plans position preceding precision prepare prepared preserve primary prior privileges procedural procedure protocol queue quote randomly range read readable reads real reassign recheck recursive ref references reindex reject relative release rename repeatable replace replica reset resource restart restrict returning returns revoke right role rollback rollup rootpartition row rows rule savepoint scatter schema scroll search second security segment select sequence serializable session session_user set setof sets share show similar simple smallint some split sql stable standalone start statement statistics stdin stdout storage strict strip subpartition subpartitions substring superuser symmetric sysid system table tablespace temp template temporary text then threshold ties time timestamp to trailing transaction treat trigger trim true truncate trusted type unbounded uncommitted unencrypted union unique unknown unlisten until update user using vacuum valid validation validator value values varchar variadic varying verbose version view volatile web when where whitespace window with within without work writable write xml xmlattributes xmlconcat xmlelement xmlexists xmlforest xmlparse xmlpi xmlroot xmlserialize year yes zone"),builtin:o("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),atoms:o("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:o("date time timestamp"),support:o("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast")}),t.defineMIME("text/x-sparksql",{name:"sql",keywords:o("add after all alter analyze and anti archive array as asc at between bucket buckets by cache cascade case cast change clear cluster clustered codegen collection column columns comment commit compact compactions compute concatenate cost create cross cube current current_date current_timestamp database databases data dbproperties defined delete delimited deny desc describe dfs directories distinct distribute drop else end escaped except exchange exists explain export extended external false fields fileformat first following for format formatted from full function functions global grant group grouping having if ignore import in index indexes inner inpath inputformat insert intersect interval into is items join keys last lateral lazy left like limit lines list load local location lock locks logical macro map minus msck natural no not null nulls of on optimize option options or order out outer outputformat over overwrite partition partitioned partitions percent preceding principals purge range recordreader recordwriter recover reduce refresh regexp rename repair replace reset restrict revoke right rlike role roles rollback rollup row rows schema schemas select semi separated serde serdeproperties set sets show skewed sort sorted start statistics stored stratify struct table tables tablesample tblproperties temp temporary terminated then to touch transaction transactions transform true truncate unarchive unbounded uncache union unlock unset use using values view when where window with"),builtin:o("tinyint smallint int bigint boolean float double string binary timestamp decimal array map struct uniontype delimited serde sequencefile textfile rcfile inputformat outputformat"),atoms:o("false true null"),operatorChars:/^[*\/+\-%<>!=~&|^]/,dateSQL:o("date time timestamp"),support:o("ODBCdotTable doubleQuote zerolessFloat")}),t.defineMIME("text/x-esper",{name:"sql",client:o("source"),keywords:o("alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit after all and as at asc avedev avg between by case cast coalesce count create current_timestamp day days delete define desc distinct else end escape events every exists false first from full group having hour hours in inner insert instanceof into irstream is istream join last lastweekday left limit like max match_recognize matches median measures metadatasql min minute minutes msec millisecond milliseconds not null offset on or order outer output partition pattern prev prior regexp retain-union retain-intersection right rstream sec second seconds select set some snapshot sql stddev sum then true unidirectional until update variable weekday when where window"),builtin:{},atoms:o("false true null"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:o("time"),support:o("decimallessFloat zerolessFloat binaryNumber hexNumber")})}(Ls)})),kr((function(t,e){!function(t){function e(t){for(var e={},a=0;a<t.length;++a)e[t[a].toLowerCase()]=!0;return e}t.defineMode("css",(function(e,a){var r=a.inline;a.propertyKeywords||(a=t.resolveMode("text/css"));var n,i,o=e.indentUnit,l=a.tokenHooks,s=a.documentTypes||{},c=a.mediaTypes||{},h=a.mediaFeatures||{},u=a.mediaValueKeywords||{},d=a.propertyKeywords||{},p=a.nonStandardPropertyKeywords||{},m=a.fontProperties||{},v=a.counterDescriptors||{},f=a.colorKeywords||{},y=a.valueKeywords||{},g=a.allowNested,b=a.lineComment,z=!0===a.supportsAtComponent,x=!1!==e.highlightNonStandardPropertyKeywords;function w(t,e){return n=e,t}function M(t,e){var a=t.next();if(l[a]){var r=l[a](t,e);if(!1!==r)return r}return"@"==a?(t.eatWhile(/[\w\\\-]/),w("def",t.current())):"="==a||("~"==a||"|"==a)&&t.eat("=")?w(null,"compare"):'"'==a||"'"==a?(e.tokenize=_(a),e.tokenize(t,e)):"#"==a?(t.eatWhile(/[\w\\\-]/),w("atom","hash")):"!"==a?(t.match(/^\s*\w*/),w("keyword","important")):/\d/.test(a)||"."==a&&t.eat(/\d/)?(t.eatWhile(/[\w.%]/),w("number","unit")):"-"!==a?/[,+>*\/]/.test(a)?w(null,"select-op"):"."==a&&t.match(/^-?[_a-z][_a-z0-9-]*/i)?w("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(a)?w(null,a):t.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(t.current())&&(e.tokenize=A),w("variable callee","variable")):/[\w\\\-]/.test(a)?(t.eatWhile(/[\w\\\-]/),w("property","word")):w(null,null):/[\d.]/.test(t.peek())?(t.eatWhile(/[\w.%]/),w("number","unit")):t.match(/^-[\w\\\-]*/)?(t.eatWhile(/[\w\\\-]/),t.match(/^\s*:/,!1)?w("variable-2","variable-definition"):w("variable-2","variable")):t.match(/^\w+-/)?w("meta","meta"):void 0}function _(t){return function(e,a){for(var r,n=!1;null!=(r=e.next());){if(r==t&&!n){")"==t&&e.backUp(1);break}n=!n&&"\\"==r}return(r==t||!n&&")"!=t)&&(a.tokenize=null),w("string","string")}}function A(t,e){return t.next(),t.match(/^\s*[\"\')]/,!1)?e.tokenize=null:e.tokenize=_(")"),w(null,"(")}function H(t,e,a){this.type=t,this.indent=e,this.prev=a}function V(t,e,a,r){return t.context=new H(a,e.indentation()+(!1===r?0:o),t.context),a}function L(t){return t.context.prev&&(t.context=t.context.prev),t.context.type}function B(t,e,a){return S[a.context.type](t,e,a)}function k(t,e,a,r){for(var n=r||1;n>0;n--)a.context=a.context.prev;return B(t,e,a)}function C(t){var e=t.current().toLowerCase();i=y.hasOwnProperty(e)?"atom":f.hasOwnProperty(e)?"keyword":"variable"}var S={top:function(t,e,a){if("{"==t)return V(a,e,"block");if("}"==t&&a.context.prev)return L(a);if(z&&/@component/i.test(t))return V(a,e,"atComponentBlock");if(/^@(-moz-)?document$/i.test(t))return V(a,e,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(t))return V(a,e,"atBlock");if(/^@(font-face|counter-style)/i.test(t))return a.stateArg=t,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(t))return"keyframes";if(t&&"@"==t.charAt(0))return V(a,e,"at");if("hash"==t)i="builtin";else if("word"==t)i="tag";else{if("variable-definition"==t)return"maybeprop";if("interpolation"==t)return V(a,e,"interpolation");if(":"==t)return"pseudo";if(g&&"("==t)return V(a,e,"parens")}return a.context.type},block:function(t,e,a){if("word"==t){var r=e.current().toLowerCase();return d.hasOwnProperty(r)?(i="property","maybeprop"):p.hasOwnProperty(r)?(i=x?"string-2":"property","maybeprop"):g?(i=e.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(i+=" error","maybeprop")}return"meta"==t?"block":g||"hash"!=t&&"qualifier"!=t?S.top(t,e,a):(i="error","block")},maybeprop:function(t,e,a){return":"==t?V(a,e,"prop"):B(t,e,a)},prop:function(t,e,a){if(";"==t)return L(a);if("{"==t&&g)return V(a,e,"propBlock");if("}"==t||"{"==t)return k(t,e,a);if("("==t)return V(a,e,"parens");if("hash"!=t||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(e.current())){if("word"==t)C(e);else if("interpolation"==t)return V(a,e,"interpolation")}else i+=" error";return"prop"},propBlock:function(t,e,a){return"}"==t?L(a):"word"==t?(i="property","maybeprop"):a.context.type},parens:function(t,e,a){return"{"==t||"}"==t?k(t,e,a):")"==t?L(a):"("==t?V(a,e,"parens"):"interpolation"==t?V(a,e,"interpolation"):("word"==t&&C(e),"parens")},pseudo:function(t,e,a){return"meta"==t?"pseudo":"word"==t?(i="variable-3",a.context.type):B(t,e,a)},documentTypes:function(t,e,a){return"word"==t&&s.hasOwnProperty(e.current())?(i="tag",a.context.type):S.atBlock(t,e,a)},atBlock:function(t,e,a){if("("==t)return V(a,e,"atBlock_parens");if("}"==t||";"==t)return k(t,e,a);if("{"==t)return L(a)&&V(a,e,g?"block":"top");if("interpolation"==t)return V(a,e,"interpolation");if("word"==t){var r=e.current().toLowerCase();i="only"==r||"not"==r||"and"==r||"or"==r?"keyword":c.hasOwnProperty(r)?"attribute":h.hasOwnProperty(r)?"property":u.hasOwnProperty(r)?"keyword":d.hasOwnProperty(r)?"property":p.hasOwnProperty(r)?x?"string-2":"property":y.hasOwnProperty(r)?"atom":f.hasOwnProperty(r)?"keyword":"error"}return a.context.type},atComponentBlock:function(t,e,a){return"}"==t?k(t,e,a):"{"==t?L(a)&&V(a,e,g?"block":"top",!1):("word"==t&&(i="error"),a.context.type)},atBlock_parens:function(t,e,a){return")"==t?L(a):"{"==t||"}"==t?k(t,e,a,2):S.atBlock(t,e,a)},restricted_atBlock_before:function(t,e,a){return"{"==t?V(a,e,"restricted_atBlock"):"word"==t&&"@counter-style"==a.stateArg?(i="variable","restricted_atBlock_before"):B(t,e,a)},restricted_atBlock:function(t,e,a){return"}"==t?(a.stateArg=null,L(a)):"word"==t?(i="@font-face"==a.stateArg&&!m.hasOwnProperty(e.current().toLowerCase())||"@counter-style"==a.stateArg&&!v.hasOwnProperty(e.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},keyframes:function(t,e,a){return"word"==t?(i="variable","keyframes"):"{"==t?V(a,e,"top"):B(t,e,a)},at:function(t,e,a){return";"==t?L(a):"{"==t||"}"==t?k(t,e,a):("word"==t?i="tag":"hash"==t&&(i="builtin"),"at")},interpolation:function(t,e,a){return"}"==t?L(a):"{"==t||";"==t?k(t,e,a):("word"==t?i="variable":"variable"!=t&&"("!=t&&")"!=t&&(i="error"),"interpolation")}};return{startState:function(t){return{tokenize:null,state:r?"block":"top",stateArg:null,context:new H(r?"block":"top",t||0,null)}},token:function(t,e){if(!e.tokenize&&t.eatSpace())return null;var a=(e.tokenize||M)(t,e);return a&&"object"==typeof a&&(n=a[1],a=a[0]),i=a,"comment"!=n&&(e.state=S[e.state](n,t,e)),i},indent:function(t,e){var a=t.context,r=e&&e.charAt(0),n=a.indent;return"prop"!=a.type||"}"!=r&&")"!=r||(a=a.prev),a.prev&&("}"!=r||"block"!=a.type&&"top"!=a.type&&"interpolation"!=a.type&&"restricted_atBlock"!=a.type?(")"!=r||"parens"!=a.type&&"atBlock_parens"!=a.type)&&("{"!=r||"at"!=a.type&&"atBlock"!=a.type)||(n=Math.max(0,a.indent-o)):n=(a=a.prev).indent),n},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:b,fold:"brace"}}));var a=["domain","regexp","url","url-prefix"],r=e(a),n=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],i=e(n),o=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover","prefers-color-scheme"],l=e(o),s=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive","dark","light"],c=e(s),h=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","all","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","binding","bleed","block-size","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","inset","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-height-step","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotate","rotation","rotation-point","row-gap","ruby-align","ruby-overhang","ruby-position","ruby-span","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-type","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-orientation","text-outline","text-overflow","text-rendering","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","touch-action","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","paint-order","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],u=e(h),d=["border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","margin-block","margin-block-end","margin-block-start","margin-inline","margin-inline-end","margin-inline-start","padding-block","padding-block-end","padding-block-start","padding-inline","padding-inline-end","padding-inline-start","scroll-snap-stop","scrollbar-3d-light-color","scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-track-color","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","shape-inside","zoom"],p=e(d),m=e(["font-display","font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"]),v=e(["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"]),f=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],y=e(f),g=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","manipulation","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiple_mask_images","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],b=e(g),z=a.concat(n).concat(o).concat(s).concat(h).concat(d).concat(f).concat(g);function x(t,e){for(var a,r=!1;null!=(a=t.next());){if(r&&"/"==a){e.tokenize=null;break}r="*"==a}return["comment","comment"]}t.registerHelper("hintWords","css",z),t.defineMIME("text/css",{documentTypes:r,mediaTypes:i,mediaFeatures:l,mediaValueKeywords:c,propertyKeywords:u,nonStandardPropertyKeywords:p,fontProperties:m,counterDescriptors:v,colorKeywords:y,valueKeywords:b,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=x,x(t,e))}},name:"css"}),t.defineMIME("text/x-scss",{mediaTypes:i,mediaFeatures:l,mediaValueKeywords:c,propertyKeywords:u,nonStandardPropertyKeywords:p,colorKeywords:y,valueKeywords:b,fontProperties:m,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=x,x(t,e)):["operator","operator"]},":":function(t){return!!t.match(/^\s*\{/,!1)&&[null,null]},$:function(t){return t.match(/^[\w-]+/),t.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(t){return!!t.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),t.defineMIME("text/x-less",{mediaTypes:i,mediaFeatures:l,mediaValueKeywords:c,propertyKeywords:u,nonStandardPropertyKeywords:p,colorKeywords:y,valueKeywords:b,fontProperties:m,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=x,x(t,e)):["operator","operator"]},"@":function(t){return t.eat("{")?[null,"interpolation"]:!t.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)&&(t.eatWhile(/[\w\\\-]/),t.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),t.defineMIME("text/x-gss",{documentTypes:r,mediaTypes:i,mediaFeatures:l,propertyKeywords:u,nonStandardPropertyKeywords:p,fontProperties:m,counterDescriptors:v,colorKeywords:y,valueKeywords:b,supportsAtComponent:!0,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=x,x(t,e))}},name:"css",helperType:"gss"})}(Ls)}));kr((function(t,e){!function(t){function e(t,e){if(!t.hasOwnProperty(e))throw new Error("Undefined state "+e+" in simple mode")}function a(t,e){if(!t)return/(?:)/;var a="";return t instanceof RegExp?(t.ignoreCase&&(a="i"),t=t.source):t=String(t),new RegExp((!1===e?"":"^")+"(?:"+t+")",a)}function r(t){if(!t)return null;if(t.apply)return t;if("string"==typeof t)return t.replace(/\./g," ");for(var e=[],a=0;a<t.length;a++)e.push(t[a]&&t[a].replace(/\./g," "));return e}function n(t,n){(t.next||t.push)&&e(n,t.next||t.push),this.regex=a(t.regex),this.token=r(t.token),this.data=t}function i(t,e){return function(a,r){if(r.pending){var n=r.pending.shift();return 0==r.pending.length&&(r.pending=null),a.pos+=n.text.length,n.token}if(r.local){if(r.local.end&&a.match(r.local.end)){var i=r.local.endToken||null;return r.local=r.localState=null,i}var o;return i=r.local.mode.token(a,r.localState),r.local.endScan&&(o=r.local.endScan.exec(a.current()))&&(a.pos=a.start+o.index),i}for(var s=t[r.state],c=0;c<s.length;c++){var h=s[c],u=(!h.data.sol||a.sol())&&a.match(h.regex);if(u){h.data.next?r.state=h.data.next:h.data.push?((r.stack||(r.stack=[])).push(r.state),r.state=h.data.push):h.data.pop&&r.stack&&r.stack.length&&(r.state=r.stack.pop()),h.data.mode&&l(e,r,h.data.mode,h.token),h.data.indent&&r.indent.push(a.indentation()+e.indentUnit),h.data.dedent&&r.indent.pop();var d=h.token;if(d&&d.apply&&(d=d(u)),u.length>2&&h.token&&"string"!=typeof h.token){for(var p=2;p<u.length;p++)u[p]&&(r.pending||(r.pending=[])).push({text:u[p],token:h.token[p-1]});return a.backUp(u[0].length-(u[1]?u[1].length:0)),d[0]}return d&&d.join?d[0]:d}}return a.next(),null}}function o(t,e){if(t===e)return!0;if(!t||"object"!=typeof t||!e||"object"!=typeof e)return!1;var a=0;for(var r in t)if(t.hasOwnProperty(r)){if(!e.hasOwnProperty(r)||!o(t[r],e[r]))return!1;a++}for(var r in e)e.hasOwnProperty(r)&&a--;return 0==a}function l(e,r,n,i){var l;if(n.persistent)for(var s=r.persistentStates;s&&!l;s=s.next)(n.spec?o(n.spec,s.spec):n.mode==s.mode)&&(l=s);var c=l?l.mode:n.mode||t.getMode(e,n.spec),h=l?l.state:t.startState(c);n.persistent&&!l&&(r.persistentStates={mode:c,spec:n.spec,state:h,next:r.persistentStates}),r.localState=h,r.local={mode:c,end:n.end&&a(n.end),endScan:n.end&&!1!==n.forceEnd&&a(n.end,!1),endToken:i&&i.join?i[i.length-1]:i}}function s(t,e){for(var a=0;a<e.length;a++)if(e[a]===t)return!0}function c(e,a){return function(r,n,i){if(r.local&&r.local.mode.indent)return r.local.mode.indent(r.localState,n,i);if(null==r.indent||r.local||a.dontIndentStates&&s(r.state,a.dontIndentStates)>-1)return t.Pass;var o=r.indent.length-1,l=e[r.state];t:for(;;){for(var c=0;c<l.length;c++){var h=l[c];if(h.data.dedent&&!1!==h.data.dedentIfLineStart){var u=h.regex.exec(n);if(u&&u[0]){o--,(h.next||h.push)&&(l=e[h.next||h.push]),n=n.slice(u[0].length);continue t}}}break}return o<0?0:r.indent[o]}}t.defineSimpleMode=function(e,a){t.defineMode(e,(function(e){return t.simpleMode(e,a)}))},t.simpleMode=function(a,r){e(r,"start");var o={},l=r.meta||{},s=!1;for(var h in r)if(h!=l&&r.hasOwnProperty(h))for(var u=o[h]=[],d=r[h],p=0;p<d.length;p++){var m=d[p];u.push(new n(m,r)),(m.indent||m.dedent)&&(s=!0)}var v={startState:function(){return{state:"start",pending:null,local:null,localState:null,indent:s?[]:null}},copyState:function(e){var a={state:e.state,pending:e.pending,local:e.local,localState:null,indent:e.indent&&e.indent.slice(0)};e.localState&&(a.localState=t.copyState(e.local.mode,e.localState)),e.stack&&(a.stack=e.stack.slice(0));for(var r=e.persistentStates;r;r=r.next)a.persistentStates={mode:r.mode,spec:r.spec,state:r.state==e.localState?a.localState:t.copyState(r.mode,r.state),next:a.persistentStates};return a},token:i(o,a),innerMode:function(t){return t.local&&{mode:t.local.mode,state:t.localState}},indent:c(o,l)};if(l)for(var f in l)l.hasOwnProperty(f)&&(v[f]=l[f]);return v}}(Ls)})),kr((function(t,e){var a;(a=Ls).multiplexingMode=function(t){var e=Array.prototype.slice.call(arguments,1);function r(t,e,a,r){if("string"==typeof e){var n=t.indexOf(e,a);return r&&n>-1?n+e.length:n}var i=e.exec(a?t.slice(a):t);return i?i.index+a+(r?i[0].length:0):-1}return{startState:function(){return{outer:a.startState(t),innerActive:null,inner:null,startingInner:!1}},copyState:function(e){return{outer:a.copyState(t,e.outer),innerActive:e.innerActive,inner:e.innerActive&&a.copyState(e.innerActive.mode,e.inner),startingInner:e.startingInner}},token:function(n,i){if(i.innerActive){var o=i.innerActive;if(c=n.string,!o.close&&n.sol())return i.innerActive=i.inner=null,this.token(n,i);if((u=o.close&&!i.startingInner?r(c,o.close,n.pos,o.parseDelimiters):-1)==n.pos&&!o.parseDelimiters)return n.match(o.close),i.innerActive=i.inner=null,o.delimStyle&&o.delimStyle+" "+o.delimStyle+"-close";u>-1&&(n.string=c.slice(0,u));var l=o.mode.token(n,i.inner);return u>-1?n.string=c:n.pos>n.start&&(i.startingInner=!1),u==n.pos&&o.parseDelimiters&&(i.innerActive=i.inner=null),o.innerStyle&&(l=l?l+" "+o.innerStyle:o.innerStyle),l}for(var s=1/0,c=n.string,h=0;h<e.length;++h){var u,d=e[h];if((u=r(c,d.open,n.pos))==n.pos){d.parseDelimiters||n.match(d.open),i.startingInner=!!d.parseDelimiters,i.innerActive=d;var p=0;if(t.indent){var m=t.indent(i.outer,"","");m!==a.Pass&&(p=m)}return i.inner=a.startState(d.mode,p),d.delimStyle&&d.delimStyle+" "+d.delimStyle+"-open"}-1!=u&&u<s&&(s=u)}s!=1/0&&(n.string=c.slice(0,s));var v=t.token(n,i.outer);return s!=1/0&&(n.string=c),v},indent:function(e,r,n){var i=e.innerActive?e.innerActive.mode:t;return i.indent?i.indent(e.innerActive?e.inner:e.outer,r,n):a.Pass},blankLine:function(r){var n=r.innerActive?r.innerActive.mode:t;if(n.blankLine&&n.blankLine(r.innerActive?r.inner:r.outer),r.innerActive)"\n"===r.innerActive.close&&(r.innerActive=r.inner=null);else for(var i=0;i<e.length;++i){var o=e[i];"\n"===o.open&&(r.innerActive=o,r.inner=a.startState(o.mode,n.indent?n.indent(r.outer,"",""):0))}},electricChars:t.electricChars,innerMode:function(e){return e.inner?{state:e.inner,mode:e.innerActive.mode}:{state:e.outer,mode:t}}}}}));kr((function(t,e){var a;(a=Ls).defineSimpleMode("handlebars-tags",{start:[{regex:/\{\{\{/,push:"handlebars_raw",token:"tag"},{regex:/\{\{!--/,push:"dash_comment",token:"comment"},{regex:/\{\{!/,push:"comment",token:"comment"},{regex:/\{\{/,push:"handlebars",token:"tag"}],handlebars_raw:[{regex:/\}\}\}/,pop:!0,token:"tag"}],handlebars:[{regex:/\}\}/,pop:!0,token:"tag"},{regex:/"(?:[^\\"]|\\.)*"?/,token:"string"},{regex:/'(?:[^\\']|\\.)*'?/,token:"string"},{regex:/>|[#\/]([A-Za-z_]\w*)/,token:"keyword"},{regex:/(?:else|this)\b/,token:"keyword"},{regex:/\d+/i,token:"number"},{regex:/=|~|@|true|false/,token:"atom"},{regex:/(?:\.\.\/)*(?:[A-Za-z_][\w\.]*)+/,token:"variable-2"}],dash_comment:[{regex:/--\}\}/,pop:!0,token:"comment"},{regex:/./,token:"comment"}],comment:[{regex:/\}\}/,pop:!0,token:"comment"},{regex:/./,token:"comment"}],meta:{blockCommentStart:"{{--",blockCommentEnd:"--}}"}}),a.defineMode("handlebars",(function(t,e){var r=a.getMode(t,"handlebars-tags");return e&&e.base?a.multiplexingMode(a.getMode(t,e.base),{open:"{{",close:/\}\}\}?/,mode:r,parseDelimiters:!0}):r})),a.defineMIME("text/x-handlebars-template","handlebars")})),kr((function(t,e){!function(t){var e="CodeMirror-hint",a="CodeMirror-hint-active";function r(t,e){if(this.cm=t,this.options=e,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length,this.options.updateOnCursorActivity){var a=this;t.on("cursorActivity",this.activityFunc=function(){a.cursorActivity()})}}t.showHint=function(t,e,a){if(!e)return t.showHint(a);a&&a.async&&(e.async=!0);var r={hint:e};if(a)for(var n in a)r[n]=a[n];return t.showHint(r)},t.defineExtension("showHint",(function(e){e=o(this,this.getCursor("start"),e);var a=this.listSelections();if(!(a.length>1)){if(this.somethingSelected()){if(!e.hint.supportsSelection)return;for(var n=0;n<a.length;n++)if(a[n].head.line!=a[n].anchor.line)return}this.state.completionActive&&this.state.completionActive.close();var i=this.state.completionActive=new r(this,e);i.options.hint&&(t.signal(this,"startCompletion",this),i.update(!0))}})),t.defineExtension("closeHint",(function(){this.state.completionActive&&this.state.completionActive.close()}));var n=window.requestAnimationFrame||function(t){return setTimeout(t,1e3/60)},i=window.cancelAnimationFrame||clearTimeout;function o(t,e,a){var r=t.options.hintOptions,n={};for(var i in m)n[i]=m[i];if(r)for(var i in r)void 0!==r[i]&&(n[i]=r[i]);if(a)for(var i in a)void 0!==a[i]&&(n[i]=a[i]);return n.hint.resolve&&(n.hint=n.hint.resolve(t,e)),n}function l(t){return"string"==typeof t?t:t.text}function s(t,e){var a={Up:function(){e.moveFocus(-1)},Down:function(){e.moveFocus(1)},PageUp:function(){e.moveFocus(1-e.menuSize(),!0)},PageDown:function(){e.moveFocus(e.menuSize()-1,!0)},Home:function(){e.setFocus(0)},End:function(){e.setFocus(e.length-1)},Enter:e.pick,Tab:e.pick,Esc:e.close};/Mac/.test(navigator.platform)&&(a["Ctrl-P"]=function(){e.moveFocus(-1)},a["Ctrl-N"]=function(){e.moveFocus(1)});var r=t.options.customKeys,n=r?{}:a;function i(t,r){var i;i="string"!=typeof r?function(t){return r(t,e)}:a.hasOwnProperty(r)?a[r]:r,n[t]=i}if(r)for(var o in r)r.hasOwnProperty(o)&&i(o,r[o]);var l=t.options.extraKeys;if(l)for(var o in l)l.hasOwnProperty(o)&&i(o,l[o]);return n}function c(t,e){for(;e&&e!=t;){if("LI"===e.nodeName.toUpperCase()&&e.parentNode==t)return e;e=e.parentNode}}function h(r,n){this.completion=r,this.data=n,this.picked=!1;var i=this,o=r.cm,h=o.getInputField().ownerDocument,u=h.defaultView||h.parentWindow,d=this.hints=h.createElement("ul"),p=r.cm.options.theme;d.className="CodeMirror-hints "+p,this.selectedHint=n.selectedHint||0;for(var m=n.list,v=0;v<m.length;++v){var f=d.appendChild(h.createElement("li")),y=m[v],g=e+(v!=this.selectedHint?"":" "+a);null!=y.className&&(g=y.className+" "+g),f.className=g,y.render?y.render(f,n,y):f.appendChild(h.createTextNode(y.displayText||l(y))),f.hintId=v}var b=r.options.container||h.body,z=o.cursorCoords(r.options.alignWithWord?n.from:null),x=z.left,w=z.bottom,M=!0,_=0,A=0;if(b!==h.body){var H=-1!==["absolute","relative","fixed"].indexOf(u.getComputedStyle(b).position)?b:b.offsetParent,V=H.getBoundingClientRect(),L=h.body.getBoundingClientRect();_=V.left-L.left-H.scrollLeft,A=V.top-L.top-H.scrollTop}d.style.left=x-_+"px",d.style.top=w-A+"px";var B=u.innerWidth||Math.max(h.body.offsetWidth,h.documentElement.offsetWidth),k=u.innerHeight||Math.max(h.body.offsetHeight,h.documentElement.offsetHeight);b.appendChild(d);var C,S=r.options.moveOnOverlap?d.getBoundingClientRect():new DOMRect,E=!!r.options.paddingForScrollbar&&d.scrollHeight>d.clientHeight+1;if(setTimeout((function(){C=o.getScrollInfo()})),S.bottom-k>0){var O=S.bottom-S.top;if(z.top-(z.bottom-S.top)-O>0)d.style.top=(w=z.top-O-A)+"px",M=!1;else if(O>k){d.style.height=k-5+"px",d.style.top=(w=z.bottom-S.top-A)+"px";var T=o.getCursor();n.from.ch!=T.ch&&(z=o.cursorCoords(T),d.style.left=(x=z.left-_)+"px",S=d.getBoundingClientRect())}}var D,j=S.right-B;if(j>0&&(S.right-S.left>B&&(d.style.width=B-5+"px",j-=S.right-S.left-B),d.style.left=(x=z.left-j-_)+"px"),E)for(var F=d.firstChild;F;F=F.nextSibling)F.style.paddingRight=o.display.nativeBarWidth+"px";o.addKeyMap(this.keyMap=s(r,{moveFocus:function(t,e){i.changeActive(i.selectedHint+t,e)},setFocus:function(t){i.changeActive(t)},menuSize:function(){return i.screenAmount()},length:m.length,close:function(){r.close()},pick:function(){i.pick()},data:n})),r.options.closeOnUnfocus&&(o.on("blur",this.onBlur=function(){D=setTimeout((function(){r.close()}),100)}),o.on("focus",this.onFocus=function(){clearTimeout(D)})),o.on("scroll",this.onScroll=function(){var t=o.getScrollInfo(),e=o.getWrapperElement().getBoundingClientRect(),a=w+C.top-t.top,n=a-(u.pageYOffset||(h.documentElement||h.body).scrollTop);if(M||(n+=d.offsetHeight),n<=e.top||n>=e.bottom)return r.close();d.style.top=a+"px",d.style.left=x+C.left-t.left+"px"}),t.on(d,"dblclick",(function(t){var e=c(d,t.target||t.srcElement);e&&null!=e.hintId&&(i.changeActive(e.hintId),i.pick())})),t.on(d,"click",(function(t){var e=c(d,t.target||t.srcElement);e&&null!=e.hintId&&(i.changeActive(e.hintId),r.options.completeOnSingleClick&&i.pick())})),t.on(d,"mousedown",(function(){setTimeout((function(){o.focus()}),20)}));var I=this.getSelectedHintRange();return 0===I.from&&0===I.to||this.scrollToActive(),t.signal(n,"select",m[this.selectedHint],d.childNodes[this.selectedHint]),!0}function u(t,e){if(!t.somethingSelected())return e;for(var a=[],r=0;r<e.length;r++)e[r].supportsSelection&&a.push(e[r]);return a}function d(t,e,a,r){if(t.async)t(e,r,a);else{var n=t(e,a);n&&n.then?n.then(r):r(n)}}function p(e,a){var r,n=e.getHelpers(a,"hint");if(n.length){var i=function(t,e,a){var r=u(t,n);function i(n){if(n==r.length)return e(null);d(r[n],t,a,(function(t){t&&t.list.length>0?e(t):i(n+1)}))}i(0)};return i.async=!0,i.supportsSelection=!0,i}return(r=e.getHelper(e.getCursor(),"hintWords"))?function(e){return t.hint.fromList(e,{words:r})}:t.hint.anyword?function(e,a){return t.hint.anyword(e,a)}:function(){}}r.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.options.updateOnCursorActivity&&this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&t.signal(this.data,"close"),this.widget&&this.widget.close(),t.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(e,a){var r=e.list[a],n=this;this.cm.operation((function(){r.hint?r.hint(n.cm,e,r):n.cm.replaceRange(l(r),r.from||e.from,r.to||e.to,"complete"),t.signal(e,"pick",r),n.cm.scrollIntoView()})),this.options.closeOnPick&&this.close()},cursorActivity:function(){this.debounce&&(i(this.debounce),this.debounce=0);var t=this.startPos;this.data&&(t=this.data.from);var e=this.cm.getCursor(),a=this.cm.getLine(e.line);if(e.line!=this.startPos.line||a.length-e.ch!=this.startLen-this.startPos.ch||e.ch<t.ch||this.cm.somethingSelected()||!e.ch||this.options.closeCharacters.test(a.charAt(e.ch-1)))this.close();else{var r=this;this.debounce=n((function(){r.update()})),this.widget&&this.widget.disable()}},update:function(t){if(null!=this.tick){var e=this,a=++this.tick;d(this.options.hint,this.cm,this.options,(function(r){e.tick==a&&e.finishUpdate(r,t)}))}},finishUpdate:function(e,a){this.data&&t.signal(this.data,"update");var r=this.widget&&this.widget.picked||a&&this.options.completeSingle;this.widget&&this.widget.close(),this.data=e,e&&e.list.length&&(r&&1==e.list.length?this.pick(e,0):(this.widget=new h(this,e),t.signal(e,"shown")))}},h.prototype={close:function(){if(this.completion.widget==this){this.completion.widget=null,this.hints.parentNode&&this.hints.parentNode.removeChild(this.hints),this.completion.cm.removeKeyMap(this.keyMap);var t=this.completion.cm;this.completion.options.closeOnUnfocus&&(t.off("blur",this.onBlur),t.off("focus",this.onFocus)),t.off("scroll",this.onScroll)}},disable:function(){this.completion.cm.removeKeyMap(this.keyMap);var t=this;this.keyMap={Enter:function(){t.picked=!0}},this.completion.cm.addKeyMap(this.keyMap)},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(e,r){if(e>=this.data.list.length?e=r?this.data.list.length-1:0:e<0&&(e=r?0:this.data.list.length-1),this.selectedHint!=e){var n=this.hints.childNodes[this.selectedHint];n&&(n.className=n.className.replace(" "+a,"")),(n=this.hints.childNodes[this.selectedHint=e]).className+=" "+a,this.scrollToActive(),t.signal(this.data,"select",this.data.list[this.selectedHint],n)}},scrollToActive:function(){var t=this.getSelectedHintRange(),e=this.hints.childNodes[t.from],a=this.hints.childNodes[t.to],r=this.hints.firstChild;e.offsetTop<this.hints.scrollTop?this.hints.scrollTop=e.offsetTop-r.offsetTop:a.offsetTop+a.offsetHeight>this.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=a.offsetTop+a.offsetHeight-this.hints.clientHeight+r.offsetTop)},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1},getSelectedHintRange:function(){var t=this.completion.options.scrollMargin||0;return{from:Math.max(0,this.selectedHint-t),to:Math.min(this.data.list.length-1,this.selectedHint+t)}}},t.registerHelper("hint","auto",{resolve:p}),t.registerHelper("hint","fromList",(function(e,a){var r,n=e.getCursor(),i=e.getTokenAt(n),o=t.Pos(n.line,i.start),l=n;i.start<n.ch&&/\w/.test(i.string.charAt(n.ch-i.start-1))?r=i.string.substr(0,n.ch-i.start):(r="",o=n);for(var s=[],c=0;c<a.words.length;c++){var h=a.words[c];h.slice(0,r.length)==r&&s.push(h)}if(s.length)return{list:s,from:o,to:l}})),t.commands.autocomplete=t.showHint;var m={hint:t.hint.auto,completeSingle:!0,alignWithWord:!0,closeCharacters:/[\s()\[\]{};:>,]/,closeOnPick:!0,closeOnUnfocus:!0,updateOnCursorActivity:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null,paddingForScrollbar:!0,moveOnOverlap:!0};t.defineOption("hintOptions",null)}(Ls)})),kr((function(t,e){!function(t){var e="CodeMirror-activeline",a="CodeMirror-activeline-background",r="CodeMirror-activeline-gutter";function n(t){for(var n=0;n<t.state.activeLines.length;n++)t.removeLineClass(t.state.activeLines[n],"wrap",e),t.removeLineClass(t.state.activeLines[n],"background",a),t.removeLineClass(t.state.activeLines[n],"gutter",r)}function i(t,e){if(t.length!=e.length)return!1;for(var a=0;a<t.length;a++)if(t[a]!=e[a])return!1;return!0}function o(t,o){for(var l=[],s=0;s<o.length;s++){var c=o[s],h=t.getOption("styleActiveLine");if("object"==typeof h&&h.nonEmpty?c.anchor.line==c.head.line:c.empty()){var u=t.getLineHandleVisualStart(c.head.line);l[l.length-1]!=u&&l.push(u)}}i(t.state.activeLines,l)||t.operation((function(){n(t);for(var i=0;i<l.length;i++)t.addLineClass(l[i],"wrap",e),t.addLineClass(l[i],"background",a),t.addLineClass(l[i],"gutter",r);t.state.activeLines=l}))}function l(t,e){o(t,e.ranges)}t.defineOption("styleActiveLine",!1,(function(e,a,r){var i=r!=t.Init&&r;a!=i&&(i&&(e.off("beforeSelectionChange",l),n(e),delete e.state.activeLines),a&&(e.state.activeLines=[],o(e,e.listSelections()),e.on("beforeSelectionChange",l)))}))}(Ls)})),kr((function(t,e){!function(t){var e={pairs:"()[]{}''\"\"",closeBefore:")]}'\":;>",triples:"",explode:"[]{}"},a=t.Pos;function r(t,a){return"pairs"==a&&"string"==typeof t?t:"object"==typeof t&&null!=t[a]?t[a]:e[a]}t.defineOption("autoCloseBrackets",!1,(function(e,a,o){o&&o!=t.Init&&(e.removeKeyMap(n),e.state.closeBrackets=null),a&&(i(r(a,"pairs")),e.state.closeBrackets=a,e.addKeyMap(n))}));var n={Backspace:s,Enter:c};function i(t){for(var e=0;e<t.length;e++){var a=t.charAt(e),r="'"+a+"'";n[r]||(n[r]=o(a))}}function o(t){return function(e){return d(e,t)}}function l(t){var e=t.state.closeBrackets;return!e||e.override?e:t.getModeAt(t.getCursor()).closeBrackets||e}function s(e){var n=l(e);if(!n||e.getOption("disableInput"))return t.Pass;for(var i=r(n,"pairs"),o=e.listSelections(),s=0;s<o.length;s++){if(!o[s].empty())return t.Pass;var c=p(e,o[s].head);if(!c||i.indexOf(c)%2!=0)return t.Pass}for(s=o.length-1;s>=0;s--){var h=o[s].head;e.replaceRange("",a(h.line,h.ch-1),a(h.line,h.ch+1),"+delete")}}function c(e){var a=l(e),n=a&&r(a,"explode");if(!n||e.getOption("disableInput"))return t.Pass;for(var i=e.listSelections(),o=0;o<i.length;o++){if(!i[o].empty())return t.Pass;var s=p(e,i[o].head);if(!s||n.indexOf(s)%2!=0)return t.Pass}e.operation((function(){var t=e.lineSeparator()||"\n";e.replaceSelection(t+t,null),h(e,-1),i=e.listSelections();for(var a=0;a<i.length;a++){var r=i[a].head.line;e.indentLine(r,null,!0),e.indentLine(r+1,null,!0)}}))}function h(t,e){for(var a=[],r=t.listSelections(),n=0,i=0;i<r.length;i++){var o=r[i];o.head==t.getCursor()&&(n=i);var l=o.head.ch||e>0?{line:o.head.line,ch:o.head.ch+e}:{line:o.head.line-1};a.push({anchor:l,head:l})}t.setSelections(a,n)}function u(e){var r=t.cmpPos(e.anchor,e.head)>0;return{anchor:new a(e.anchor.line,e.anchor.ch+(r?-1:1)),head:new a(e.head.line,e.head.ch+(r?1:-1))}}function d(e,n){var i=l(e);if(!i||e.getOption("disableInput"))return t.Pass;var o=r(i,"pairs"),s=o.indexOf(n);if(-1==s)return t.Pass;for(var c,d=r(i,"closeBefore"),p=r(i,"triples"),v=o.charAt(s+1)==n,f=e.listSelections(),y=s%2==0,g=0;g<f.length;g++){var b,z=f[g],x=z.head,w=e.getRange(x,a(x.line,x.ch+1));if(y&&!z.empty())b="surround";else if(!v&&y||w!=n)if(v&&x.ch>1&&p.indexOf(n)>=0&&e.getRange(a(x.line,x.ch-2),x)==n+n){if(x.ch>2&&/\bstring/.test(e.getTokenTypeAt(a(x.line,x.ch-2))))return t.Pass;b="addFour"}else if(v){var M=0==x.ch?" ":e.getRange(a(x.line,x.ch-1),x);if(t.isWordChar(w)||M==n||t.isWordChar(M))return t.Pass;b="both"}else{if(!y||!(0===w.length||/\s/.test(w)||d.indexOf(w)>-1))return t.Pass;b="both"}else b=v&&m(e,x)?"both":p.indexOf(n)>=0&&e.getRange(x,a(x.line,x.ch+3))==n+n+n?"skipThree":"skip";if(c){if(c!=b)return t.Pass}else c=b}var _=s%2?o.charAt(s-1):n,A=s%2?n:o.charAt(s+1);e.operation((function(){if("skip"==c)h(e,1);else if("skipThree"==c)h(e,3);else if("surround"==c){for(var t=e.getSelections(),a=0;a<t.length;a++)t[a]=_+t[a]+A;for(e.replaceSelections(t,"around"),t=e.listSelections().slice(),a=0;a<t.length;a++)t[a]=u(t[a]);e.setSelections(t)}else"both"==c?(e.replaceSelection(_+A,null),e.triggerElectric(_+A),h(e,-1)):"addFour"==c&&(e.replaceSelection(_+_+_+_,"before"),h(e,1))}))}function p(t,e){var r=t.getRange(a(e.line,e.ch-1),a(e.line,e.ch+1));return 2==r.length?r:null}function m(t,e){var r=t.getTokenAt(a(e.line,e.ch+1));return/\bstring/.test(r.type)&&r.start==e.ch&&(0==e.ch||!/\bstring/.test(t.getTokenTypeAt(e)))}i(e.pairs+"`")}(Ls)})),kr((function(t,e){!function(t){var e=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),a=t.Pos,r={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function n(t){return t&&t.bracketRegex||/[(){}[\]]/}function i(t,e,i){var l=t.getLineHandle(e.line),s=e.ch-1,c=i&&i.afterCursor;null==c&&(c=/(^| )cm-fat-cursor($| )/.test(t.getWrapperElement().className));var h=n(i),u=!c&&s>=0&&h.test(l.text.charAt(s))&&r[l.text.charAt(s)]||h.test(l.text.charAt(s+1))&&r[l.text.charAt(++s)];if(!u)return null;var d=">"==u.charAt(1)?1:-1;if(i&&i.strict&&d>0!=(s==e.ch))return null;var p=t.getTokenTypeAt(a(e.line,s+1)),m=o(t,a(e.line,s+(d>0?1:0)),d,p,i);return null==m?null:{from:a(e.line,s),to:m&&m.pos,match:m&&m.ch==u.charAt(0),forward:d>0}}function o(t,e,i,o,l){for(var s=l&&l.maxScanLineLength||1e4,c=l&&l.maxScanLines||1e3,h=[],u=n(l),d=i>0?Math.min(e.line+c,t.lastLine()+1):Math.max(t.firstLine()-1,e.line-c),p=e.line;p!=d;p+=i){var m=t.getLine(p);if(m){var v=i>0?0:m.length-1,f=i>0?m.length:-1;if(!(m.length>s))for(p==e.line&&(v=e.ch-(i<0?1:0));v!=f;v+=i){var y=m.charAt(v);if(u.test(y)&&(void 0===o||(t.getTokenTypeAt(a(p,v+1))||"")==(o||""))){var g=r[y];if(g&&">"==g.charAt(1)==i>0)h.push(y);else{if(!h.length)return{pos:a(p,v),ch:y};h.pop()}}}}}return p-i!=(i>0?t.lastLine():t.firstLine())&&null}function l(t,r,n){for(var o=t.state.matchBrackets.maxHighlightLineLength||1e3,l=n&&n.highlightNonMatching,s=[],c=t.listSelections(),h=0;h<c.length;h++){var u=c[h].empty()&&i(t,c[h].head,n);if(u&&(u.match||!1!==l)&&t.getLine(u.from.line).length<=o){var d=u.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";s.push(t.markText(u.from,a(u.from.line,u.from.ch+1),{className:d})),u.to&&t.getLine(u.to.line).length<=o&&s.push(t.markText(u.to,a(u.to.line,u.to.ch+1),{className:d}))}}if(s.length){e&&t.state.focused&&t.focus();var p=function(){t.operation((function(){for(var t=0;t<s.length;t++)s[t].clear()}))};if(!r)return p;setTimeout(p,800)}}function s(t){t.operation((function(){t.state.matchBrackets.currentlyHighlighted&&(t.state.matchBrackets.currentlyHighlighted(),t.state.matchBrackets.currentlyHighlighted=null),t.state.matchBrackets.currentlyHighlighted=l(t,!1,t.state.matchBrackets)}))}function c(t){t.state.matchBrackets&&t.state.matchBrackets.currentlyHighlighted&&(t.state.matchBrackets.currentlyHighlighted(),t.state.matchBrackets.currentlyHighlighted=null)}t.defineOption("matchBrackets",!1,(function(e,a,r){r&&r!=t.Init&&(e.off("cursorActivity",s),e.off("focus",s),e.off("blur",c),c(e)),a&&(e.state.matchBrackets="object"==typeof a?a:{},e.on("cursorActivity",s),e.on("focus",s),e.on("blur",c))})),t.defineExtension("matchBrackets",(function(){l(this,!0)})),t.defineExtension("findMatchingBracket",(function(t,e,a){return(a||"boolean"==typeof e)&&(a?(a.strict=e,e=a):e=e?{strict:!0}:null),i(this,t,e)})),t.defineExtension("scanForBracket",(function(t,e,a,r){return o(this,t,e,a,r)}))}(Ls)}));function Bs(t){let e;return{c(){e=F("div"),this.h()},l(t){e=X(t,"DIV",{class:!0,style:!0}),Z(e).forEach(D),this.h()},h(){G(e,"class","circle svelte-14upwad"),rt(e,"--size",t[0]+t[2]),rt(e,"--color",t[1]),rt(e,"--duration",t[3])},m(t,a){T(t,e,a)},p(t,[a]){5&a&&rt(e,"--size",t[0]+t[2]),2&a&&rt(e,"--color",t[1]),8&a&&rt(e,"--duration",t[3])},i:s,o:s,d(t){t&&D(e)}}}function ks(t,e,a){let{size:r=60}=e,{color:n="#FF3E00"}=e,{unit:i="px"}=e,{duration:o="0.75s"}=e;return t.$$set=t=>{"size"in t&&a(0,r=t.size),"color"in t&&a(1,n=t.color),"unit"in t&&a(2,i=t.unit),"duration"in t&&a(3,o=t.duration)},[r,n,i,o]}class Cs extends pe{constructor(t){super(),de(this,t,ks,Bs,v,{size:0,color:1,unit:2,duration:3})}}var Ss=function(t){return t},Es="object"==typeof Br&&Br&&Br.Object===Object&&Br,Os="object"==typeof self&&self&&self.Object===Object&&self,Ts=Es||Os||Function("return this")(),Ds=Ts.Symbol,js=Object.prototype,Fs=js.hasOwnProperty,Is=js.toString,Ps=Ds?Ds.toStringTag:void 0;var Rs=function(t){var e=Fs.call(t,Ps),a=t[Ps];try{t[Ps]=void 0;var r=!0}catch(i){}var n=Is.call(t);return r&&(e?t[Ps]=a:delete t[Ps]),n},Ns=Object.prototype.toString;var $s=function(t){return Ns.call(t)},Us=Ds?Ds.toStringTag:void 0;var Ws=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Us&&Us in Object(t)?Rs(t):$s(t)};var qs=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};var Gs,Ys=function(t){if(!qs(t))return!1;var e=Ws(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},Ks=Ts["__core-js_shared__"],Js=(Gs=/[^.]+$/.exec(Ks&&Ks.keys&&Ks.keys.IE_PROTO||""))?"Symbol(src)_1."+Gs:"";var Zs=function(t){return!!Js&&Js in t},Xs=Function.prototype.toString;var Qs=function(t){if(null!=t){try{return Xs.call(t)}catch(e){}try{return t+""}catch(e){}}return""},tc=/^\[object .+?Constructor\]$/,ec=Function.prototype,ac=Object.prototype,rc=ec.toString,nc=ac.hasOwnProperty,ic=RegExp("^"+rc.call(nc).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var oc=function(t){return!(!qs(t)||Zs(t))&&(Ys(t)?ic:tc).test(Qs(t))};var lc=function(t,e){return null==t?void 0:t[e]};var sc=function(t,e){var a=lc(t,e);return oc(a)?a:void 0},cc=sc(Ts,"WeakMap"),hc=cc&&new cc,uc=hc?function(t,e){return hc.set(t,e),t}:Ss,dc=Object.create,pc=function(){function t(){}return function(e){if(!qs(e))return{};if(dc)return dc(e);t.prototype=e;var a=new t;return t.prototype=void 0,a}}();var mc=function(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var a=pc(t.prototype),r=t.apply(a,e);return qs(r)?r:a}};var vc=function(t,e,a){var r=1&e,n=mc(t);return function e(){var i=this&&this!==Ts&&this instanceof e?n:t;return i.apply(r?a:this,arguments)}};var fc=function(t,e,a){switch(a.length){case 0:return t.call(e);case 1:return t.call(e,a[0]);case 2:return t.call(e,a[0],a[1]);case 3:return t.call(e,a[0],a[1],a[2])}return t.apply(e,a)},yc=Math.max;var gc=function(t,e,a,r){for(var n=-1,i=t.length,o=a.length,l=-1,s=e.length,c=yc(i-o,0),h=Array(s+c),u=!r;++l<s;)h[l]=e[l];for(;++n<o;)(u||n<i)&&(h[a[n]]=t[n]);for(;c--;)h[l++]=t[n++];return h},bc=Math.max;var zc=function(t,e,a,r){for(var n=-1,i=t.length,o=-1,l=a.length,s=-1,c=e.length,h=bc(i-l,0),u=Array(h+c),d=!r;++n<h;)u[n]=t[n];for(var p=n;++s<c;)u[p+s]=e[s];for(;++o<l;)(d||n<i)&&(u[p+a[o]]=t[n++]);return u};var xc=function(t,e){for(var a=t.length,r=0;a--;)t[a]===e&&++r;return r};var wc=function(){};function Mc(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}Mc.prototype=pc(wc.prototype),Mc.prototype.constructor=Mc;var _c=Mc;var Ac=hc?function(t){return hc.get(t)}:function(){},Hc={},Vc=Object.prototype.hasOwnProperty;var Lc=function(t){for(var e=t.name+"",a=Hc[e],r=Vc.call(Hc,e)?a.length:0;r--;){var n=a[r],i=n.func;if(null==i||i==t)return n.name}return e};function Bc(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=void 0}Bc.prototype=pc(wc.prototype),Bc.prototype.constructor=Bc;var kc=Bc,Cc=Array.isArray;var Sc=function(t){return null!=t&&"object"==typeof t};var Ec=function(t,e){var a=-1,r=t.length;for(e||(e=Array(r));++a<r;)e[a]=t[a];return e};var Oc=function(t){if(t instanceof _c)return t.clone();var e=new kc(t.__wrapped__,t.__chain__);return e.__actions__=Ec(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e},Tc=Object.prototype.hasOwnProperty;function Dc(t){if(Sc(t)&&!Cc(t)&&!(t instanceof _c)){if(t instanceof kc)return t;if(Tc.call(t,"__wrapped__"))return Oc(t)}return new kc(t)}Dc.prototype=wc.prototype,Dc.prototype.constructor=Dc;var jc=Dc;var Fc=function(t){var e=Lc(t),a=jc[e];if("function"!=typeof a||!(e in _c.prototype))return!1;if(t===a)return!0;var r=Ac(a);return!!r&&t===r[0]},Ic=Date.now;var Pc=function(t){var e=0,a=0;return function(){var r=Ic(),n=16-(r-a);if(a=r,n>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}},Rc=Pc(uc),Nc=/\{\n\/\* \[wrapped with (.+)\] \*/,$c=/,? & /;var Uc=function(t){var e=t.match(Nc);return e?e[1].split($c):[]},Wc=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;var qc=function(t,e){var a=e.length;if(!a)return t;var r=a-1;return e[r]=(a>1?"& ":"")+e[r],e=e.join(a>2?", ":" "),t.replace(Wc,"{\n/* [wrapped with "+e+"] */\n")};var Gc=function(t){return function(){return t}},Yc=function(){try{var t=sc(Object,"defineProperty");return t({},"",{}),t}catch(e){}}(),Kc=Pc(Yc?function(t,e){return Yc(t,"toString",{configurable:!0,enumerable:!1,value:Gc(e),writable:!0})}:Ss);var Jc=function(t,e){for(var a=-1,r=null==t?0:t.length;++a<r&&!1!==e(t[a],a,t););return t};var Zc=function(t,e,a,r){for(var n=t.length,i=a+(r?1:-1);r?i--:++i<n;)if(e(t[i],i,t))return i;return-1};var Xc=function(t){return t!=t};var Qc=function(t,e,a){for(var r=a-1,n=t.length;++r<n;)if(t[r]===e)return r;return-1};var th=function(t,e,a){return e==e?Qc(t,e,a):Zc(t,Xc,a)};var eh=function(t,e){return!!(null==t?0:t.length)&&th(t,e,0)>-1},ah=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];var rh=function(t,e){return Jc(ah,(function(a){var r="_."+a[0];e&a[1]&&!eh(t,r)&&t.push(r)})),t.sort()};var nh=function(t,e,a){var r=e+"";return Kc(t,qc(r,rh(Uc(r),a)))};var ih=function(t,e,a,r,n,i,o,l,s,c){var h=8&e;e|=h?32:64,4&(e&=~(h?64:32))||(e&=-4);var u=[t,e,n,h?i:void 0,h?o:void 0,h?void 0:i,h?void 0:o,l,s,c],d=a.apply(void 0,u);return Fc(t)&&Rc(d,u),d.placeholder=r,nh(d,t,e)};var oh=function(t){return t.placeholder},lh=/^(?:0|[1-9]\d*)$/;var sh=function(t,e){var a=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==a||"symbol"!=a&&lh.test(t))&&t>-1&&t%1==0&&t<e},ch=Math.min;var hh=function(t,e){for(var a=t.length,r=ch(e.length,a),n=Ec(t);r--;){var i=e[r];t[r]=sh(i,a)?n[i]:void 0}return t};var uh=function(t,e){for(var a=-1,r=t.length,n=0,i=[];++a<r;){var o=t[a];o!==e&&"__lodash_placeholder__"!==o||(t[a]="__lodash_placeholder__",i[n++]=a)}return i};var dh=function t(e,a,r,n,i,o,l,s,c,h){var u=128&a,d=1&a,p=2&a,m=24&a,v=512&a,f=p?void 0:mc(e);return function y(){for(var g=arguments.length,b=Array(g),z=g;z--;)b[z]=arguments[z];if(m)var x=oh(y),w=xc(b,x);if(n&&(b=gc(b,n,i,m)),o&&(b=zc(b,o,l,m)),g-=w,m&&g<h){var M=uh(b,x);return ih(e,a,t,y.placeholder,r,b,M,s,c,h-g)}var _=d?r:this,A=p?_[e]:e;return g=b.length,s?b=hh(b,s):v&&g>1&&b.reverse(),u&&c<g&&(b.length=c),this&&this!==Ts&&this instanceof y&&(A=f||mc(A)),A.apply(_,b)}};var ph=function(t,e,a){var r=mc(t);return function n(){for(var i=arguments.length,o=Array(i),l=i,s=oh(n);l--;)o[l]=arguments[l];var c=i<3&&o[0]!==s&&o[i-1]!==s?[]:uh(o,s);if((i-=c.length)<a)return ih(t,e,dh,n.placeholder,void 0,o,c,void 0,void 0,a-i);var h=this&&this!==Ts&&this instanceof n?r:t;return fc(h,this,o)}};var mh=function(t,e,a,r){var n=1&e,i=mc(t);return function e(){for(var o=-1,l=arguments.length,s=-1,c=r.length,h=Array(c+l),u=this&&this!==Ts&&this instanceof e?i:t;++s<c;)h[s]=r[s];for(;l--;)h[s++]=arguments[++o];return fc(u,n?a:this,h)}},vh=Math.min;var fh=function(t,e){var a=t[1],r=e[1],n=a|r,i=n<131,o=128==r&&8==a||128==r&&256==a&&t[7].length<=e[8]||384==r&&e[7].length<=e[8]&&8==a;if(!i&&!o)return t;1&r&&(t[2]=e[2],n|=1&a?0:4);var l=e[3];if(l){var s=t[3];t[3]=s?gc(s,l,e[4]):l,t[4]=s?uh(t[3],"__lodash_placeholder__"):e[4]}return(l=e[5])&&(s=t[5],t[5]=s?zc(s,l,e[6]):l,t[6]=s?uh(t[5],"__lodash_placeholder__"):e[6]),(l=e[7])&&(t[7]=l),128&r&&(t[8]=null==t[8]?e[8]:vh(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=n,t},yh=/\s/;var gh=function(t){for(var e=t.length;e--&&yh.test(t.charAt(e)););return e},bh=/^\s+/;var zh=function(t){return t?t.slice(0,gh(t)+1).replace(bh,""):t};var xh=function(t){return"symbol"==typeof t||Sc(t)&&"[object Symbol]"==Ws(t)},wh=/^[-+]0x[0-9a-f]+$/i,Mh=/^0b[01]+$/i,_h=/^0o[0-7]+$/i,Ah=parseInt;var Hh=function(t){if("number"==typeof t)return t;if(xh(t))return NaN;if(qs(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=qs(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=zh(t);var a=Mh.test(t);return a||_h.test(t)?Ah(t.slice(2),a?2:8):wh.test(t)?NaN:+t};var Vh=function(t){return t?Infinity===(t=Hh(t))||-Infinity===t?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0};var Lh=function(t){var e=Vh(t),a=e%1;return e==e?a?e-a:e:0},Bh=Math.max;var kh=function(t,e,a,r,n,i,o,l){var s=2&e;if(!s&&"function"!=typeof t)throw new TypeError("Expected a function");var c=r?r.length:0;if(c||(e&=-97,r=n=void 0),o=void 0===o?o:Bh(Lh(o),0),l=void 0===l?l:Lh(l),c-=n?n.length:0,64&e){var h=r,u=n;r=n=void 0}var d=s?void 0:Ac(t),p=[t,e,a,r,n,h,u,i,o,l];if(d&&fh(p,d),t=p[0],e=p[1],a=p[2],r=p[3],n=p[4],!(l=p[9]=void 0===p[9]?s?0:t.length:Bh(p[9]-c,0))&&24&e&&(e&=-25),e&&1!=e)m=8==e||16==e?ph(t,e,l):32!=e&&33!=e||n.length?dh.apply(void 0,p):mh(t,e,a,r);else var m=vc(t,e,a);return nh((d?uc:Rc)(m,p),t,e)};var Ch=function(t,e,a){return e=a?void 0:e,e=t&&null==e?t.length:e,kh(t,128,void 0,void 0,void 0,void 0,e)};var Sh=function(t,e,a){"__proto__"==e&&Yc?Yc(t,e,{configurable:!0,enumerable:!0,value:a,writable:!0}):t[e]=a};var Eh=function(t,e){return t===e||t!=t&&e!=e},Oh=Object.prototype.hasOwnProperty;var Th=function(t,e,a){var r=t[e];Oh.call(t,e)&&Eh(r,a)&&(void 0!==a||e in t)||Sh(t,e,a)};var Dh=function(t,e,a,r){var n=!a;a||(a={});for(var i=-1,o=e.length;++i<o;){var l=e[i],s=r?r(a[l],t[l],l,a,t):void 0;void 0===s&&(s=t[l]),n?Sh(a,l,s):Th(a,l,s)}return a};var jh=function(t,e){for(var a=-1,r=Array(t);++a<t;)r[a]=e(a);return r};var Fh=function(t){return Sc(t)&&"[object Arguments]"==Ws(t)},Ih=Object.prototype,Ph=Ih.hasOwnProperty,Rh=Ih.propertyIsEnumerable,Nh=Fh(function(){return arguments}())?Fh:function(t){return Sc(t)&&Ph.call(t,"callee")&&!Rh.call(t,"callee")};var $h=function(){return!1},Uh=kr((function(t,e){var a=e&&!e.nodeType&&e,r=a&&t&&!t.nodeType&&t,n=r&&r.exports===a?Ts.Buffer:void 0,i=(n?n.isBuffer:void 0)||$h;t.exports=i}));var Wh=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991},qh={};qh["[object Float32Array]"]=qh["[object Float64Array]"]=qh["[object Int8Array]"]=qh["[object Int16Array]"]=qh["[object Int32Array]"]=qh["[object Uint8Array]"]=qh["[object Uint8ClampedArray]"]=qh["[object Uint16Array]"]=qh["[object Uint32Array]"]=!0,qh["[object Arguments]"]=qh["[object Array]"]=qh["[object ArrayBuffer]"]=qh["[object Boolean]"]=qh["[object DataView]"]=qh["[object Date]"]=qh["[object Error]"]=qh["[object Function]"]=qh["[object Map]"]=qh["[object Number]"]=qh["[object Object]"]=qh["[object RegExp]"]=qh["[object Set]"]=qh["[object String]"]=qh["[object WeakMap]"]=!1;var Gh=function(t){return Sc(t)&&Wh(t.length)&&!!qh[Ws(t)]};var Yh=function(t){return function(e){return t(e)}},Kh=kr((function(t,e){var a=e&&!e.nodeType&&e,r=a&&t&&!t.nodeType&&t,n=r&&r.exports===a&&Es.process,i=function(){try{var t=r&&r.require&&r.require("util").types;return t||n&&n.binding&&n.binding("util")}catch(e){}}();t.exports=i})),Jh=Kh&&Kh.isTypedArray,Zh=Jh?Yh(Jh):Gh,Xh=Object.prototype.hasOwnProperty;var Qh=function(t,e){var a=Cc(t),r=!a&&Nh(t),n=!a&&!r&&Uh(t),i=!a&&!r&&!n&&Zh(t),o=a||r||n||i,l=o?jh(t.length,String):[],s=l.length;for(var c in t)!e&&!Xh.call(t,c)||o&&("length"==c||n&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||sh(c,s))||l.push(c);return l},tu=Object.prototype;var eu=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||tu)};var au=function(t,e){return function(a){return t(e(a))}},ru=au(Object.keys,Object),nu=Object.prototype.hasOwnProperty;var iu=function(t){if(!eu(t))return ru(t);var e=[];for(var a in Object(t))nu.call(t,a)&&"constructor"!=a&&e.push(a);return e};var ou=function(t){return null!=t&&Wh(t.length)&&!Ys(t)};var lu=function(t){return ou(t)?Qh(t):iu(t)};var su=function(t,e){return t&&Dh(e,lu(e),t)};var cu=function(){this.__data__=[],this.size=0};var hu=function(t,e){for(var a=t.length;a--;)if(Eh(t[a][0],e))return a;return-1},uu=Array.prototype.splice;var du=function(t){var e=this.__data__,a=hu(e,t);return!(a<0)&&(a==e.length-1?e.pop():uu.call(e,a,1),--this.size,!0)};var pu=function(t){var e=this.__data__,a=hu(e,t);return a<0?void 0:e[a][1]};var mu=function(t){return hu(this.__data__,t)>-1};var vu=function(t,e){var a=this.__data__,r=hu(a,t);return r<0?(++this.size,a.push([t,e])):a[r][1]=e,this};function fu(t){var e=-1,a=null==t?0:t.length;for(this.clear();++e<a;){var r=t[e];this.set(r[0],r[1])}}fu.prototype.clear=cu,fu.prototype.delete=du,fu.prototype.get=pu,fu.prototype.has=mu,fu.prototype.set=vu;var yu=fu;var gu=function(){this.__data__=new yu,this.size=0};var bu=function(t){var e=this.__data__,a=e.delete(t);return this.size=e.size,a};var zu=function(t){return this.__data__.get(t)};var xu=function(t){return this.__data__.has(t)},wu=sc(Ts,"Map"),Mu=sc(Object,"create");var _u=function(){this.__data__=Mu?Mu(null):{},this.size=0};var Au=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Hu=Object.prototype.hasOwnProperty;var Vu=function(t){var e=this.__data__;if(Mu){var a=e[t];return"__lodash_hash_undefined__"===a?void 0:a}return Hu.call(e,t)?e[t]:void 0},Lu=Object.prototype.hasOwnProperty;var Bu=function(t){var e=this.__data__;return Mu?void 0!==e[t]:Lu.call(e,t)};var ku=function(t,e){var a=this.__data__;return this.size+=this.has(t)?0:1,a[t]=Mu&&void 0===e?"__lodash_hash_undefined__":e,this};function Cu(t){var e=-1,a=null==t?0:t.length;for(this.clear();++e<a;){var r=t[e];this.set(r[0],r[1])}}Cu.prototype.clear=_u,Cu.prototype.delete=Au,Cu.prototype.get=Vu,Cu.prototype.has=Bu,Cu.prototype.set=ku;var Su=Cu;var Eu=function(){this.size=0,this.__data__={hash:new Su,map:new(wu||yu),string:new Su}};var Ou=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var Tu=function(t,e){var a=t.__data__;return Ou(e)?a["string"==typeof e?"string":"hash"]:a.map};var Du=function(t){var e=Tu(this,t).delete(t);return this.size-=e?1:0,e};var ju=function(t){return Tu(this,t).get(t)};var Fu=function(t){return Tu(this,t).has(t)};var Iu=function(t,e){var a=Tu(this,t),r=a.size;return a.set(t,e),this.size+=a.size==r?0:1,this};function Pu(t){var e=-1,a=null==t?0:t.length;for(this.clear();++e<a;){var r=t[e];this.set(r[0],r[1])}}Pu.prototype.clear=Eu,Pu.prototype.delete=Du,Pu.prototype.get=ju,Pu.prototype.has=Fu,Pu.prototype.set=Iu;var Ru=Pu;var Nu=function(t,e){var a=this.__data__;if(a instanceof yu){var r=a.__data__;if(!wu||r.length<199)return r.push([t,e]),this.size=++a.size,this;a=this.__data__=new Ru(r)}return a.set(t,e),this.size=a.size,this};function $u(t){var e=this.__data__=new yu(t);this.size=e.size}$u.prototype.clear=gu,$u.prototype.delete=bu,$u.prototype.get=zu,$u.prototype.has=xu,$u.prototype.set=Nu;var Uu=$u;var Wu=function(t){var e=[];if(null!=t)for(var a in Object(t))e.push(a);return e},qu=Object.prototype.hasOwnProperty;var Gu=function(t){if(!qs(t))return Wu(t);var e=eu(t),a=[];for(var r in t)("constructor"!=r||!e&&qu.call(t,r))&&a.push(r);return a};var Yu=function(t){return ou(t)?Qh(t,!0):Gu(t)};var Ku=function(t,e){return t&&Dh(e,Yu(e),t)},Ju=kr((function(t,e){var a=e&&!e.nodeType&&e,r=a&&t&&!t.nodeType&&t,n=r&&r.exports===a?Ts.Buffer:void 0,i=n?n.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var a=t.length,r=i?i(a):new t.constructor(a);return t.copy(r),r}}));var Zu=function(t,e){for(var a=-1,r=null==t?0:t.length,n=0,i=[];++a<r;){var o=t[a];e(o,a,t)&&(i[n++]=o)}return i};var Xu=function(){return[]},Qu=Object.prototype.propertyIsEnumerable,td=Object.getOwnPropertySymbols,ed=td?function(t){return null==t?[]:(t=Object(t),Zu(td(t),(function(e){return Qu.call(t,e)})))}:Xu;var ad=function(t,e){return Dh(t,ed(t),e)};var rd=function(t,e){for(var a=-1,r=e.length,n=t.length;++a<r;)t[n+a]=e[a];return t},nd=au(Object.getPrototypeOf,Object),id=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)rd(e,ed(t)),t=nd(t);return e}:Xu;var od=function(t,e){return Dh(t,id(t),e)};var ld=function(t,e,a){var r=e(t);return Cc(t)?r:rd(r,a(t))};var sd=function(t){return ld(t,lu,ed)};var cd=function(t){return ld(t,Yu,id)},hd=sc(Ts,"DataView"),ud=sc(Ts,"Promise"),dd=sc(Ts,"Set"),pd=Qs(hd),md=Qs(wu),vd=Qs(ud),fd=Qs(dd),yd=Qs(cc),gd=Ws;(hd&&"[object DataView]"!=gd(new hd(new ArrayBuffer(1)))||wu&&"[object Map]"!=gd(new wu)||ud&&"[object Promise]"!=gd(ud.resolve())||dd&&"[object Set]"!=gd(new dd)||cc&&"[object WeakMap]"!=gd(new cc))&&(gd=function(t){var e=Ws(t),a="[object Object]"==e?t.constructor:void 0,r=a?Qs(a):"";if(r)switch(r){case pd:return"[object DataView]";case md:return"[object Map]";case vd:return"[object Promise]";case fd:return"[object Set]";case yd:return"[object WeakMap]"}return e});var bd=gd,zd=Object.prototype.hasOwnProperty;var xd=function(t){var e=t.length,a=new t.constructor(e);return e&&"string"==typeof t[0]&&zd.call(t,"index")&&(a.index=t.index,a.input=t.input),a},wd=Ts.Uint8Array;var Md=function(t){var e=new t.constructor(t.byteLength);return new wd(e).set(new wd(t)),e};var _d=function(t,e){var a=e?Md(t.buffer):t.buffer;return new t.constructor(a,t.byteOffset,t.byteLength)},Ad=/\w*$/;var Hd=function(t){var e=new t.constructor(t.source,Ad.exec(t));return e.lastIndex=t.lastIndex,e},Vd=Ds?Ds.prototype:void 0,Ld=Vd?Vd.valueOf:void 0;var Bd=function(t){return Ld?Object(Ld.call(t)):{}};var kd=function(t,e){var a=e?Md(t.buffer):t.buffer;return new t.constructor(a,t.byteOffset,t.length)};var Cd=function(t,e,a){var r=t.constructor;switch(e){case"[object ArrayBuffer]":return Md(t);case"[object Boolean]":case"[object Date]":return new r(+t);case"[object DataView]":return _d(t,a);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return kd(t,a);case"[object Map]":return new r;case"[object Number]":case"[object String]":return new r(t);case"[object RegExp]":return Hd(t);case"[object Set]":return new r;case"[object Symbol]":return Bd(t)}};var Sd=function(t){return"function"!=typeof t.constructor||eu(t)?{}:pc(nd(t))};var Ed=function(t){return Sc(t)&&"[object Map]"==bd(t)},Od=Kh&&Kh.isMap,Td=Od?Yh(Od):Ed;var Dd=function(t){return Sc(t)&&"[object Set]"==bd(t)},jd=Kh&&Kh.isSet,Fd=jd?Yh(jd):Dd,Id={};Id["[object Arguments]"]=Id["[object Array]"]=Id["[object ArrayBuffer]"]=Id["[object DataView]"]=Id["[object Boolean]"]=Id["[object Date]"]=Id["[object Float32Array]"]=Id["[object Float64Array]"]=Id["[object Int8Array]"]=Id["[object Int16Array]"]=Id["[object Int32Array]"]=Id["[object Map]"]=Id["[object Number]"]=Id["[object Object]"]=Id["[object RegExp]"]=Id["[object Set]"]=Id["[object String]"]=Id["[object Symbol]"]=Id["[object Uint8Array]"]=Id["[object Uint8ClampedArray]"]=Id["[object Uint16Array]"]=Id["[object Uint32Array]"]=!0,Id["[object Error]"]=Id["[object Function]"]=Id["[object WeakMap]"]=!1;var Pd=function t(e,a,r,n,i,o){var l,s=1&a,c=2&a,h=4&a;if(r&&(l=i?r(e,n,i,o):r(e)),void 0!==l)return l;if(!qs(e))return e;var u=Cc(e);if(u){if(l=xd(e),!s)return Ec(e,l)}else{var d=bd(e),p="[object Function]"==d||"[object GeneratorFunction]"==d;if(Uh(e))return Ju(e,s);if("[object Object]"==d||"[object Arguments]"==d||p&&!i){if(l=c||p?{}:Sd(e),!s)return c?od(e,Ku(l,e)):ad(e,su(l,e))}else{if(!Id[d])return i?e:{};l=Cd(e,d,s)}}o||(o=new Uu);var m=o.get(e);if(m)return m;o.set(e,l),Fd(e)?e.forEach((function(n){l.add(t(n,a,r,n,e,o))})):Td(e)&&e.forEach((function(n,i){l.set(i,t(n,a,r,i,e,o))}));var v=u?void 0:(h?c?cd:sd:c?Yu:lu)(e);return Jc(v||e,(function(n,i){v&&(n=e[i=n]),Th(l,i,t(n,a,r,i,e,o))})),l};var Rd=function(t){return Pd(t,4)};function Nd(t,e,a){var r=kh(t,8,void 0,void 0,void 0,void 0,void 0,e=a?void 0:e);return r.placeholder=Nd.placeholder,r}Nd.placeholder={};var $d=Nd,Ud=Function.prototype,Wd=Object.prototype,qd=Ud.toString,Gd=Wd.hasOwnProperty,Yd=qd.call(Object);var Kd=function(t){if(!Sc(t)||"[object Object]"!=Ws(t))return!1;var e=nd(t);if(null===e)return!0;var a=Gd.call(e,"constructor")&&e.constructor;return"function"==typeof a&&a instanceof a&&qd.call(a)==Yd};var Jd=function(t){if(!Sc(t))return!1;var e=Ws(t);return"[object Error]"==e||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!Kd(t)};var Zd=function(t){return Sc(t)&&"[object WeakMap]"==bd(t)};var Xd=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this};var Qd=function(t){return this.__data__.has(t)};function tp(t){var e=-1,a=null==t?0:t.length;for(this.__data__=new Ru;++e<a;)this.add(t[e])}tp.prototype.add=tp.prototype.push=Xd,tp.prototype.has=Qd;var ep=tp;var ap=function(t,e){for(var a=-1,r=null==t?0:t.length;++a<r;)if(e(t[a],a,t))return!0;return!1};var rp=function(t,e){return t.has(e)};var np=function(t,e,a,r,n,i){var o=1&a,l=t.length,s=e.length;if(l!=s&&!(o&&s>l))return!1;var c=i.get(t),h=i.get(e);if(c&&h)return c==e&&h==t;var u=-1,d=!0,p=2&a?new ep:void 0;for(i.set(t,e),i.set(e,t);++u<l;){var m=t[u],v=e[u];if(r)var f=o?r(v,m,u,e,t,i):r(m,v,u,t,e,i);if(void 0!==f){if(f)continue;d=!1;break}if(p){if(!ap(e,(function(t,e){if(!rp(p,e)&&(m===t||n(m,t,a,r,i)))return p.push(e)}))){d=!1;break}}else if(m!==v&&!n(m,v,a,r,i)){d=!1;break}}return i.delete(t),i.delete(e),d};var ip=function(t){var e=-1,a=Array(t.size);return t.forEach((function(t,r){a[++e]=[r,t]})),a};var op=function(t){var e=-1,a=Array(t.size);return t.forEach((function(t){a[++e]=t})),a},lp=Ds?Ds.prototype:void 0,sp=lp?lp.valueOf:void 0;var cp=function(t,e,a,r,n,i,o){switch(a){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!i(new wd(t),new wd(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Eh(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var l=ip;case"[object Set]":var s=1&r;if(l||(l=op),t.size!=e.size&&!s)return!1;var c=o.get(t);if(c)return c==e;r|=2,o.set(t,e);var h=np(l(t),l(e),r,n,i,o);return o.delete(t),h;case"[object Symbol]":if(sp)return sp.call(t)==sp.call(e)}return!1},hp=Object.prototype.hasOwnProperty;var up=function(t,e,a,r,n,i){var o=1&a,l=sd(t),s=l.length;if(s!=sd(e).length&&!o)return!1;for(var c=s;c--;){var h=l[c];if(!(o?h in e:hp.call(e,h)))return!1}var u=i.get(t),d=i.get(e);if(u&&d)return u==e&&d==t;var p=!0;i.set(t,e),i.set(e,t);for(var m=o;++c<s;){var v=t[h=l[c]],f=e[h];if(r)var y=o?r(f,v,h,e,t,i):r(v,f,h,t,e,i);if(!(void 0===y?v===f||n(v,f,a,r,i):y)){p=!1;break}m||(m="constructor"==h)}if(p&&!m){var g=t.constructor,b=e.constructor;g==b||!("constructor"in t)||!("constructor"in e)||"function"==typeof g&&g instanceof g&&"function"==typeof b&&b instanceof b||(p=!1)}return i.delete(t),i.delete(e),p},dp=Object.prototype.hasOwnProperty;var pp=function(t,e,a,r,n,i){var o=Cc(t),l=Cc(e),s=o?"[object Array]":bd(t),c=l?"[object Array]":bd(e),h="[object Object]"==(s="[object Arguments]"==s?"[object Object]":s),u="[object Object]"==(c="[object Arguments]"==c?"[object Object]":c),d=s==c;if(d&&Uh(t)){if(!Uh(e))return!1;o=!0,h=!1}if(d&&!h)return i||(i=new Uu),o||Zh(t)?np(t,e,a,r,n,i):cp(t,e,s,a,r,n,i);if(!(1&a)){var p=h&&dp.call(t,"__wrapped__"),m=u&&dp.call(e,"__wrapped__");if(p||m){var v=p?t.value():t,f=m?e.value():e;return i||(i=new Uu),n(v,f,a,r,i)}}return!!d&&(i||(i=new Uu),up(t,e,a,r,n,i))};var mp=function t(e,a,r,n,i){return e===a||(null==e||null==a||!Sc(e)&&!Sc(a)?e!=e&&a!=a:pp(e,a,r,n,t,i))};var vp=function(t,e,a,r){var n=a.length,i=n,o=!r;if(null==t)return!i;for(t=Object(t);n--;){var l=a[n];if(o&&l[2]?l[1]!==t[l[0]]:!(l[0]in t))return!1}for(;++n<i;){var s=(l=a[n])[0],c=t[s],h=l[1];if(o&&l[2]){if(void 0===c&&!(s in t))return!1}else{var u=new Uu;if(r)var d=r(c,h,s,t,e,u);if(!(void 0===d?mp(h,c,3,r,u):d))return!1}}return!0};var fp=function(t){return t==t&&!qs(t)};var yp=function(t){for(var e=lu(t),a=e.length;a--;){var r=e[a],n=t[r];e[a]=[r,n,fp(n)]}return e};var gp=function(t,e){return function(a){return null!=a&&(a[t]===e&&(void 0!==e||t in Object(a)))}};var bp=function(t){var e=yp(t);return 1==e.length&&e[0][2]?gp(e[0][0],e[0][1]):function(a){return a===t||vp(a,t,e)}},zp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,xp=/^\w*$/;var wp=function(t,e){if(Cc(t))return!1;var a=typeof t;return!("number"!=a&&"symbol"!=a&&"boolean"!=a&&null!=t&&!xh(t))||(xp.test(t)||!zp.test(t)||null!=e&&t in Object(e))};function Mp(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var a=function(){var r=arguments,n=e?e.apply(this,r):r[0],i=a.cache;if(i.has(n))return i.get(n);var o=t.apply(this,r);return a.cache=i.set(n,o)||i,o};return a.cache=new(Mp.Cache||Ru),a}Mp.Cache=Ru;var _p=Mp;var Ap=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Hp=/\\(\\)?/g,Vp=function(t){var e=_p(t,(function(t){return 500===a.size&&a.clear(),t})),a=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Ap,(function(t,a,r,n){e.push(r?n.replace(Hp,"$1"):a||t)})),e}));var Lp=function(t,e){for(var a=-1,r=null==t?0:t.length,n=Array(r);++a<r;)n[a]=e(t[a],a,t);return n},Bp=Ds?Ds.prototype:void 0,kp=Bp?Bp.toString:void 0;var Cp=function t(e){if("string"==typeof e)return e;if(Cc(e))return Lp(e,t)+"";if(xh(e))return kp?kp.call(e):"";var a=e+"";return"0"==a&&1/e==-Infinity?"-0":a};var Sp=function(t){return null==t?"":Cp(t)};var Ep=function(t,e){return Cc(t)?t:wp(t,e)?[t]:Vp(Sp(t))};var Op=function(t){if("string"==typeof t||xh(t))return t;var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e};var Tp=function(t,e){for(var a=0,r=(e=Ep(e,t)).length;null!=t&&a<r;)t=t[Op(e[a++])];return a&&a==r?t:void 0};var Dp=function(t,e,a){var r=null==t?void 0:Tp(t,e);return void 0===r?a:r};var jp=function(t,e){return null!=t&&e in Object(t)};var Fp=function(t,e,a){for(var r=-1,n=(e=Ep(e,t)).length,i=!1;++r<n;){var o=Op(e[r]);if(!(i=null!=t&&a(t,o)))break;t=t[o]}return i||++r!=n?i:!!(n=null==t?0:t.length)&&Wh(n)&&sh(o,n)&&(Cc(t)||Nh(t))};var Ip=function(t,e){return null!=t&&Fp(t,e,jp)};var Pp=function(t,e){return wp(t)&&fp(e)?gp(Op(t),e):function(a){var r=Dp(a,t);return void 0===r&&r===e?Ip(a,t):mp(e,r,3)}};var Rp=function(t){return function(e){return null==e?void 0:e[t]}};var Np=function(t){return function(e){return Tp(e,t)}};var $p=function(t){return wp(t)?Rp(Op(t)):Np(t)};var Up=function(t){return"function"==typeof t?t:null==t?Ss:"object"==typeof t?Cc(t)?Pp(t[0],t[1]):bp(t):$p(t)};var Wp=function(t){return Up("function"==typeof t?t:Pd(t,1))},qp=Ds?Ds.isConcatSpreadable:void 0;var Gp=function(t){return Cc(t)||Nh(t)||!!(qp&&t&&t[qp])};var Yp=function t(e,a,r,n,i){var o=-1,l=e.length;for(r||(r=Gp),i||(i=[]);++o<l;){var s=e[o];a>0&&r(s)?a>1?t(s,a-1,r,n,i):rd(i,s):n||(i[i.length]=s)}return i};var Kp=function(t){return(null==t?0:t.length)?Yp(t,1):[]},Jp=Math.max;var Zp=function(t,e,a){return e=Jp(void 0===e?t.length-1:e,0),function(){for(var r=arguments,n=-1,i=Jp(r.length-e,0),o=Array(i);++n<i;)o[n]=r[e+n];n=-1;for(var l=Array(e+1);++n<e;)l[n]=r[n];return l[e]=a(o),fc(t,this,l)}};var Xp=function(t){return Kc(Zp(t,void 0,Kp),t+"")}((function(t,e){return kh(t,256,void 0,void 0,void 0,e)}));var Qp=function(t){return Cc(t)?Lp(t,Op):xh(t)?[t]:Ec(Vp(Sp(t)))},tm={ary:Ch,assign:su,clone:Rd,curry:$d,forEach:Jc,isArray:Cc,isError:Jd,isFunction:Ys,isWeakMap:Zd,iteratee:Wp,keys:iu,rearg:Xp,toInteger:Lh,toPath:Qp};var em=function(t,e,a){return Pr(tm,t,e,a)};var am=function(t,e,a,r){for(var n=-1,i=null==t?0:t.length;++n<i;){var o=t[n];e(r,o,a(o),t)}return r};var rm=function(t){return function(e,a,r){for(var n=-1,i=Object(e),o=r(e),l=o.length;l--;){var s=o[t?l:++n];if(!1===a(i[s],s,i))break}return e}}();var nm=function(t,e){return function(a,r){if(null==a)return a;if(!ou(a))return t(a,r);for(var n=a.length,i=e?n:-1,o=Object(a);(e?i--:++i<n)&&!1!==r(o[i],i,o););return a}}((function(t,e){return t&&rm(t,e,lu)}));var im=function(t,e,a,r){return nm(t,(function(t,n,i){e(r,t,a(t),i)})),r};var om=function(t,e){return function(a,r){var n=Cc(a)?am:im,i=e?e():{};return n(a,t,Up(r),i)}},lm=Object.prototype.hasOwnProperty,sm=em("groupBy",om((function(t,e,a){lm.call(t,a)?t[a].push(e):Sh(t,a,[e])})));sm.placeholder=Tr;var cm=sm;var hm=function(t,e){return Pd(t,5,e="function"==typeof e?e:void 0)},um=kr((function(t,e){t.exports=function t(e,a,r){var n,i,o=window,l="application/octet-stream",s=r||l,c=e,h=!a&&!r&&c,u=document.createElement("a"),d=function(t){return String(t)},p=o.Blob||o.MozBlob||o.WebKitBlob||d,m=a||"download";if(p=p.call?p.bind(o):Blob,"true"===String(this)&&(s=(c=[c,s])[0],c=c[1]),h&&h.length<2048&&(m=h.split("/").pop().split("?")[0],u.href=h,-1!==u.href.indexOf(h))){var v=new XMLHttpRequest;return v.open("GET",h,!0),v.responseType="blob",v.onload=function(e){t(e.target.response,m,l)},setTimeout((function(){v.send()}),0),v}if(/^data:([\w+-]+\/[\w+.-]+)?[,;]/.test(c)){if(!(c.length>2096103.424&&p!==d))return navigator.msSaveBlob?navigator.msSaveBlob(b(c),m):z(c);s=(c=b(c)).type||l}else if(/([\x80-\xff])/.test(c)){for(var f=0,y=new Uint8Array(c.length),g=y.length;f<g;++f)y[f]=c.charCodeAt(f);c=new p([y],{type:s})}function b(t){for(var e=t.split(/[:;,]/),a=e[1],r=("base64"==e[2]?atob:decodeURIComponent)(e.pop()),n=r.length,i=0,o=new Uint8Array(n);i<n;++i)o[i]=r.charCodeAt(i);return new p([o],{type:a})}function z(t,e){if("download"in u)return u.href=t,u.setAttribute("download",m),u.className="download-js-link",u.innerHTML="downloading...",u.style.display="none",document.body.appendChild(u),setTimeout((function(){u.click(),document.body.removeChild(u),!0===e&&setTimeout((function(){o.URL.revokeObjectURL(u.href)}),250)}),66),!0;if(/(Version)\/(\d+)\.(\d+)(?:\.(\d+))?.*Safari\//.test(navigator.userAgent))return/^data:/.test(t)&&(t="data:"+t.replace(/^data:([\w\/\-\+]+)/,l)),window.open(t)||confirm("Displaying New Document\n\nUse Save As... to download, then click back to return to this page.")&&(location.href=t),!0;var a=document.createElement("iframe");document.body.appendChild(a),!e&&/^data:/.test(t)&&(t="data:"+t.replace(/^data:([\w\/\-\+]+)/,l)),a.src=t,setTimeout((function(){document.body.removeChild(a)}),333)}if(n=c instanceof p?c:new p([c],{type:s}),navigator.msSaveBlob)return navigator.msSaveBlob(n,m);if(o.URL)z(o.URL.createObjectURL(n),!0);else{if("string"==typeof n||n.constructor===d)try{return z("data:"+s+";base64,"+o.btoa(n))}catch(x){return z("data:"+s+","+encodeURIComponent(n))}(i=new FileReader).onload=function(t){z(this.result)},i.readAsDataURL(n)}return!0}}));function dm(t,e,a){t.dispatchEvent(new CustomEvent("finalize",{detail:{items:e,info:a}}))}function pm(t,e,a){t.dispatchEvent(new CustomEvent("consider",{detail:{items:e,info:a}}))}const mm="leftForAnother",vm="outsideOfAny";function fm(t,e,a){t.dispatchEvent(new CustomEvent("draggedEntered",{detail:{indexObj:e,draggedEl:a}}))}function ym(t,e,a){t.dispatchEvent(new CustomEvent("draggedLeft",{detail:{draggedEl:e,type:mm,theOtherDz:a}}))}function gm(t,e,a){t.dispatchEvent(new CustomEvent("draggedOverIndex",{detail:{indexObj:e,draggedEl:a}}))}const bm="dragStarted",zm="draggedEntered",xm="dragEnteredAnother",wm="draggedOverIndex",Mm="draggedLeft",_m="draggedLeftAll",Am="droppedIntoZone",Hm="droppedIntoAnother",Vm="droppedOutsideOfAny",Lm="dragStopped",Bm="pointer",km="keyboard";let Cm=0;function Sm(){Cm++}function Em(){if(0===Cm)throw new Error("Bug! trying to decrement when there are no dropzones");Cm--}const Om="undefined"==typeof window;function Tm(t){let e;const a=t.getBoundingClientRect(),r=getComputedStyle(t),n=r.transform;if(n){let i,o,l,s;if(n.startsWith("matrix3d("))e=n.slice(9,-1).split(/, /),i=+e[0],o=+e[5],l=+e[12],s=+e[13];else{if(!n.startsWith("matrix("))return a;e=n.slice(7,-1).split(/, /),i=+e[0],o=+e[3],l=+e[4],s=+e[5]}const c=r.transformOrigin,h=a.x-l-(1-i)*parseFloat(c),u=a.y-s-(1-o)*parseFloat(c.slice(c.indexOf(" ")+1)),d=i?a.width/i:t.offsetWidth,p=o?a.height/o:t.offsetHeight;return{x:h,y:u,width:d,height:p,top:u,right:h+d,bottom:u+p,left:h}}return a}function Dm(t){const e=Tm(t);return{top:e.top+window.scrollY,bottom:e.bottom+window.scrollY,left:e.left+window.scrollX,right:e.right+window.scrollX}}function jm(t){const e=t.getBoundingClientRect();return{top:e.top+window.scrollY,bottom:e.bottom+window.scrollY,left:e.left+window.scrollX,right:e.right+window.scrollX}}function Fm(t){return{x:(t.left+t.right)/2,y:(t.top+t.bottom)/2}}function Im(t,e){return t.y<=e.bottom&&t.y>=e.top&&t.x>=e.left&&t.x<=e.right}function Pm(t){return Fm(jm(t))}function Rm(t,e){return Im(Pm(t),Dm(e))}function Nm(t,e){const a=Pm(t),r=Pm(e);return n=a,i=r,Math.sqrt(Math.pow(n.x-i.x,2)+Math.pow(n.y-i.y,2));var n,i}let $m;function Um(){$m=new Map}function Wm(t,e){if(!Rm(t,e))return null;const a=e.children;if(0===a.length)return{index:0,isProximityBased:!0};const r=function(t){const e=Array.from(t.children).findIndex((t=>t.getAttribute("data-is-dnd-shadow-item")));if(e>=0)return $m.has(t)||$m.set(t,new Map),$m.get(t).set(e,Dm(t.children[e])),e}(e);for(let o=0;o<a.length;o++)if(Rm(t,a[o])){const a=$m.has(e)&&$m.get(e).get(o);return a&&!Im(Pm(t),a)?{index:r,isProximityBased:!1}:{index:o,isProximityBased:!1}}let n,i=Number.MAX_VALUE;for(let o=0;o<a.length;o++){const e=Nm(t,a[o]);e<i&&(i=e,n=o)}return{index:n,isProximityBased:!0}}Um();function qm(){let t;function e(){t={directionObj:void 0,stepPx:0}}function a(e){const{directionObj:r,stepPx:n}=t;r&&(e.scrollBy(r.x*n,r.y*n),window.requestAnimationFrame((()=>a(e))))}function r(t){return 25-t}return e(),{scrollIfNeeded:function(n,i){if(!i)return!1;const o=function(t,e){const a=jm(e);return Im(t,a)?{top:t.y-a.top,bottom:a.bottom-t.y,left:t.x-a.left,right:Math.min(a.right,document.documentElement.clientWidth)-t.x}:null}(n,i);if(null===o)return e(),!1;const l=!!t.directionObj;let[s,c]=[!1,!1];return i.scrollHeight>i.clientHeight&&(o.bottom<25?(s=!0,t.directionObj={x:0,y:1},t.stepPx=r(o.bottom)):o.top<25&&(s=!0,t.directionObj={x:0,y:-1},t.stepPx=r(o.top)),!l&&s)||i.scrollWidth>i.clientWidth&&(o.right<25?(c=!0,t.directionObj={x:1,y:0},t.stepPx=r(o.right)):o.left<25&&(c=!0,t.directionObj={x:-1,y:0},t.stepPx=r(o.left)),!l&&c)?(a(i),!0):(e(),!1)},resetScrolling:e}}function Gm(t){return JSON.stringify(t,null,2)}function Ym(t){if(!t)throw new Error("cannot get depth of a falsy node");return Km(t,0)}function Km(t,e=0){return t.parentElement?Km(t.parentElement,e+1):e-1}const{scrollIfNeeded:Jm,resetScrolling:Zm}=qm();let Xm;function Qm(t,e,a=200){let r,n,i,o=!1;const l=Array.from(e).sort(((t,e)=>Ym(e)-Ym(t)));!function e(){const s=Pm(t);if(!Jm(s,r)&&i&&Math.abs(i.x-s.x)<10&&Math.abs(i.y-s.y)<10)return void(Xm=window.setTimeout(e,a));if(function(t){const e=jm(t);return e.right<0||e.left>document.documentElement.scrollWidth||e.bottom<0||e.top>document.documentElement.scrollHeight}(t))return void function(t){window.dispatchEvent(new CustomEvent("draggedLeftDocument",{detail:{draggedEl:t}}))}(t);i=s;let c=!1;for(const a of l){const e=Wm(t,a);if(null===e)continue;const{index:i}=e;c=!0,a!==r?(r&&ym(r,t,a),fm(a,e,t),r=a):i!==n&&(gm(a,e,t),n=i);break}!c&&o&&r?(!function(t,e){t.dispatchEvent(new CustomEvent("draggedLeft",{detail:{draggedEl:e,type:vm}}))}(r,t),r=void 0,n=void 0,o=!1):o=!0,Xm=window.setTimeout(e,a)}()}let tv;function ev(t){const e=t.touches?t.touches[0]:t;tv={x:e.clientX,y:e.clientY}}const{scrollIfNeeded:av,resetScrolling:rv}=qm();let nv;function iv(){tv&&av(tv,document.documentElement),nv=window.setTimeout(iv,300)}function ov(t){return`${t} 0.2s ease`}function lv(t,e,a,r,n){const i=e.getBoundingClientRect(),o=t.getBoundingClientRect(),l=i.width-o.width,s=i.height-o.height;if(l||s){const e={left:(a-o.left)/o.width,top:(r-o.top)/o.height};t.style.height=`${i.height}px`,t.style.width=`${i.width}px`,t.style.left=parseFloat(t.style.left)-e.left*l+"px",t.style.top=parseFloat(t.style.top)-e.top*s+"px"}sv(e,t),n()}function sv(t,e){const a=window.getComputedStyle(t);Array.from(a).filter((t=>t.startsWith("background")||t.startsWith("padding")||t.startsWith("font")||t.startsWith("text")||t.startsWith("align")||t.startsWith("justify")||t.startsWith("display")||t.startsWith("flex")||t.startsWith("border")||"opacity"===t||"color"===t||"list-style-type"===t)).forEach((t=>e.style.setProperty(t,a.getPropertyValue(t),a.getPropertyPriority(t))))}function cv(t,e){t.draggable=!1,t.ondragstart=()=>!1,e?(t.style.userSelect="",t.style.WebkitUserSelect="",t.style.cursor=""):(t.style.userSelect="none",t.style.WebkitUserSelect="none",t.style.cursor="grab")}function hv(t,e=(()=>{}),a=(()=>[])){t.forEach((t=>{const r=e(t);Object.keys(r).forEach((e=>{t.style[e]=r[e]})),a(t).forEach((e=>t.classList.add(e)))}))}function uv(t,e=(()=>{}),a=(()=>[])){t.forEach((t=>{const r=e(t);Object.keys(r).forEach((e=>{t.style[e]=""})),a(t).forEach((e=>t.classList.contains(e)&&t.classList.remove(e)))}))}const dv={outline:"rgba(255, 255, 102, 0.7) solid 2px"};let pv,mv,vv,fv,yv,gv,bv,zv,xv,wv,Mv,_v=!1,Av=!1,Hv=!1;const Vv=new Map,Lv=new Map,Bv=new WeakMap;function kv(t,e){Vv.get(e).delete(t),Em(),0===Vv.get(e).size&&Vv.delete(e)}function Cv(){window.addEventListener("mousemove",ev),window.addEventListener("touchmove",ev),iv();const t=Vv.get(fv);for(const a of t)a.addEventListener("draggedEntered",Ov),a.addEventListener("draggedLeft",Tv),a.addEventListener("draggedOverIndex",Dv);window.addEventListener("draggedLeftDocument",Fv);const e=Math.max(100,...Array.from(t.keys()).map((t=>Lv.get(t).dropAnimationDurationMs)));Qm(mv,t,1.07*e)}function Sv(){window.removeEventListener("mousemove",ev),window.removeEventListener("touchmove",ev),tv=void 0,window.clearTimeout(nv),rv();const t=Vv.get(fv);for(const e of t)e.removeEventListener("draggedEntered",Ov),e.removeEventListener("draggedLeft",Tv),e.removeEventListener("draggedOverIndex",Dv);window.removeEventListener("draggedLeftDocument",Fv),clearTimeout(Xm),Zm(),Um()}function Ev(t){return t.findIndex((t=>!!t.isDndShadowItem&&"id:dnd-shadow-placeholder-0000"!==t.id))}function Ov(t){let{items:e,dropFromOthersDisabled:a}=Lv.get(t.currentTarget);if(a&&t.currentTarget!==yv)return;if(Hv=!1,e=e.filter((t=>t.id!==bv.id)),yv!==t.currentTarget){const t=Lv.get(yv).items.filter((t=>!t.isDndShadowItem));pm(yv,t,{trigger:xm,id:vv.id,source:Bm})}else{const t=function(t){return t.findIndex((t=>"id:dnd-shadow-placeholder-0000"===t.id))}(e);-1!==t&&e.splice(t,1)}const{index:r,isProximityBased:n}=t.detail.indexObj,i=n&&r===t.currentTarget.children.length-1?r+1:r;zv=t.currentTarget,e.splice(i,0,bv),pm(t.currentTarget,e,{trigger:zm,id:vv.id,source:Bm})}function Tv(t){if(!_v)return;const{items:e,dropFromOthersDisabled:a}=Lv.get(t.currentTarget);if(a&&t.currentTarget!==yv&&t.currentTarget!==zv)return;const r=Ev(e),n=e.splice(r,1)[0];zv=void 0;const{type:i,theOtherDz:o}=t.detail;if(i===vm||i===mm&&o!==yv&&Lv.get(o).dropFromOthersDisabled){Hv=!0,zv=yv;const t=Lv.get(yv).items;t.splice(gv,0,n),pm(yv,t,{trigger:_m,id:vv.id,source:Bm})}pm(t.currentTarget,e,{trigger:Mm,id:vv.id,source:Bm})}function Dv(t){const{items:e,dropFromOthersDisabled:a}=Lv.get(t.currentTarget);if(a&&t.currentTarget!==yv)return;Hv=!1;const{index:r}=t.detail.indexObj,n=Ev(e);e.splice(n,1),e.splice(r,0,bv),pm(t.currentTarget,e,{trigger:wm,id:vv.id,source:Bm})}function jv(t){t.preventDefault();const e=t.touches?t.touches[0]:t;wv={x:e.clientX,y:e.clientY},mv.style.transform=`translate3d(${wv.x-xv.x}px, ${wv.y-xv.y}px, 0)`}function Fv(){Av=!0,window.removeEventListener("mousemove",jv),window.removeEventListener("touchmove",jv),window.removeEventListener("mouseup",Fv),window.removeEventListener("touchend",Fv),Sv(),mv.style.cursor="grab",zv||(zv=yv);let{items:t,type:e}=Lv.get(zv);uv(Vv.get(e),(t=>Lv.get(t).dropTargetStyle),(t=>Lv.get(t).dropTargetClasses));let a=Ev(t);-1===a&&(a=gv),t=t.map((t=>t.isDndShadowItem?vv:t)),function(t,e){const a=Tm(zv.children[t]),r={x:a.left-parseFloat(mv.style.left),y:a.top-parseFloat(mv.style.top)},{dropAnimationDurationMs:n}=Lv.get(zv),i=`transform ${n}ms ease`;mv.style.transition=mv.style.transition?mv.style.transition+","+i:i,mv.style.transform=`translate3d(${r.x}px, ${r.y}px, 0)`,window.setTimeout(e,n)}(a,(function(){var e;Mv(),dm(zv,t,{trigger:Hv?Vm:Am,id:vv.id,source:Bm}),zv!==yv&&dm(yv,Lv.get(yv).items,{trigger:Hm,id:vv.id,source:Bm}),(e=zv.children[a]).style.visibility="",e.removeAttribute("data-is-dnd-shadow-item"),mv.remove(),pv.remove(),mv=void 0,pv=void 0,vv=void 0,fv=void 0,yv=void 0,gv=void 0,bv=void 0,zv=void 0,xv=void 0,wv=void 0,_v=!1,Av=!1,Mv=void 0,Hv=!1}))}function Iv(t,e){const a={items:void 0,type:void 0,flipDurationMs:0,dragDisabled:!1,morphDisabled:!1,dropFromOthersDisabled:!1,dropTargetStyle:dv,dropTargetClasses:[],transformDraggedElement:()=>{},centreDraggedOnCursor:!1};let r=new Map;function n(){window.removeEventListener("mousemove",l),window.removeEventListener("touchmove",l),window.removeEventListener("mouseup",o),window.removeEventListener("touchend",o)}function o(){n(),pv=void 0,xv=void 0,wv=void 0}function l(t){t.preventDefault();const e=t.touches?t.touches[0]:t;wv={x:e.clientX,y:e.clientY},(Math.abs(wv.x-xv.x)>=3||Math.abs(wv.y-xv.y)>=3)&&(n(),function(){_v=!0;const t=r.get(pv);gv=t,yv=pv.parentElement;const{items:e,type:n,centreDraggedOnCursor:o}=a;vv=i({},e[t]),fv=n,bv=i(i({},vv),{isDndShadowItem:!0});const l=i(i({},bv),{id:"id:dnd-shadow-placeholder-0000"});function s(){var t;mv.parentElement?window.requestAnimationFrame(s):(document.body.appendChild(mv),mv.focus(),Cv(),(t=pv).style.display="none",t.style.position="fixed",t.style.zIndex="-5",document.body.appendChild(pv))}mv=function(t,e){const a=t.getBoundingClientRect(),r=t.cloneNode(!0);sv(t,r),r.id="dnd-action-dragged-el",r.style.position="fixed";let n=a.top,i=a.left;if(r.style.top=`${n}px`,r.style.left=`${i}px`,e){const t=Fm(a);n-=t.y-e.y,i-=t.x-e.x,window.setTimeout((()=>{r.style.top=`${n}px`,r.style.left=`${i}px`}),0)}return r.style.margin="0",r.style.boxSizing="border-box",r.style.height=`${a.height}px`,r.style.width=`${a.width}px`,r.style.transition=`${ov("top")}, ${ov("left")}, ${ov("background-color")}, ${ov("opacity")}, ${ov("color")} `,window.setTimeout((()=>r.style.transition+=`, ${ov("width")}, ${ov("height")}`),0),r.style.zIndex="9999",r.style.cursor="grabbing",r}(pv,o&&wv),window.requestAnimationFrame(s),hv(Array.from(Vv.get(a.type)).filter((t=>t===yv||!Lv.get(t).dropFromOthersDisabled)),(t=>Lv.get(t).dropTargetStyle),(t=>Lv.get(t).dropTargetClasses)),e.splice(t,1,l),Mv=function(t){const e=t.style.minHeight;t.style.minHeight=window.getComputedStyle(t).getPropertyValue("height");const a=t.style.minWidth;return t.style.minWidth=window.getComputedStyle(t).getPropertyValue("width"),function(){t.style.minHeight=e,t.style.minWidth=a}}(yv),pm(yv,e,{trigger:bm,id:vv.id,source:Bm}),window.addEventListener("mousemove",jv,{passive:!1}),window.addEventListener("touchmove",jv,{passive:!1,capture:!1}),window.addEventListener("mouseup",Fv,{passive:!1}),window.addEventListener("touchend",Fv,{passive:!1})}())}function s(t){if(t.target!==t.currentTarget&&(void 0!==t.target.value||t.target.isContentEditable))return;if(t.button)return;if(_v)return;t.stopPropagation();const e=t.touches?t.touches[0]:t;xv={x:e.clientX,y:e.clientY},wv=i({},xv),pv=t.currentTarget,window.addEventListener("mousemove",l,{passive:!1}),window.addEventListener("touchmove",l,{passive:!1,capture:!1}),window.addEventListener("mouseup",o,{passive:!1}),window.addEventListener("touchend",o,{passive:!1})}function c({items:e,flipDurationMs:n=0,type:i="--any--",dragDisabled:o=!1,morphDisabled:l=!1,dropFromOthersDisabled:c=!1,dropTargetStyle:h=dv,dropTargetClasses:u=[],transformDraggedElement:d=(()=>{}),centreDraggedOnCursor:p=!1}){var m,v;function f(t,e){return Lv.get(t)?Lv.get(t)[e]:a[e]}a.dropAnimationDurationMs=n,a.type&&i!==a.type&&kv(t,a.type),a.type=i,m=t,v=i,Vv.has(v)||Vv.set(v,new Set),Vv.get(v).has(m)||(Vv.get(v).add(m),Sm()),a.items=[...e],a.dragDisabled=o,a.morphDisabled=l,a.transformDraggedElement=d,a.centreDraggedOnCursor=p,!_v||Av||function(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const a in t)if(!{}.hasOwnProperty.call(e,a)||e[a]!==t[a])return!1;return!0}(h,a.dropTargetStyle)&&function(t,e){if(t.length!==e.length)return!1;for(let a=0;a<t.length;a++)if(t[a]!==e[a])return!1;return!0}(u,a.dropTargetClasses)||(uv([t],(()=>a.dropTargetStyle),(()=>u)),hv([t],(()=>h),(()=>u))),a.dropTargetStyle=h,a.dropTargetClasses=[...u],_v&&a.dropFromOthersDisabled!==c&&(c?uv([t],(t=>f(t,"dropTargetStyle")),(t=>f(t,"dropTargetClasses"))):hv([t],(t=>f(t,"dropTargetStyle")),(t=>f(t,"dropTargetClasses")))),a.dropFromOthersDisabled=c,Lv.set(t,a);const y=Ev(a.items);for(let b=0;b<t.children.length;b++){const e=t.children[b];cv(e,o),b!==y?(e.removeEventListener("mousedown",Bv.get(e)),e.removeEventListener("touchstart",Bv.get(e)),o||(e.addEventListener("mousedown",s),e.addEventListener("touchstart",s),Bv.set(e,s)),r.set(e,b)):(l||lv(mv,e,wv.x,wv.y,(()=>a.transformDraggedElement(mv,vv,b))),(g=e).style.visibility="hidden",g.setAttribute("data-is-dnd-shadow-item","true"))}var g}return c(e),{update:t=>{c(t)},destroy:()=>{kv(t,a.type),Lv.delete(t)}}}const Pv={DND_ZONE_ACTIVE:"dnd-zone-active",DND_ZONE_DRAG_DISABLED:"dnd-zone-drag-disabled"},Rv={[Pv.DND_ZONE_ACTIVE]:"Tab to one the items and press space-bar or enter to start dragging it",[Pv.DND_ZONE_DRAG_DISABLED]:"This is a disabled drag and drop list"};let Nv;function $v(){Nv=document.createElement("div"),Nv.id="dnd-action-aria-alert",Nv.style.position="fixed",Nv.style.bottom="0",Nv.style.left="0",Nv.style.zIndex="-5",Nv.style.opacity="0",Nv.style.height="0",Nv.style.width="0",Nv.setAttribute("role","alert"),document.body.prepend(Nv),Object.entries(Rv).forEach((([t,e])=>document.body.prepend(function(t,e){const a=document.createElement("div");return a.id=t,a.innerHTML=`<p>${e}</p>`,a.style.display="none",a.style.position="fixed",a.style.zIndex="-5",a}(t,e))))}function Uv(t){Nv.innerHTML="";const e=document.createTextNode(t);Nv.appendChild(e),Nv.style.display="none",Nv.style.display="inline"}const Wv={outline:"rgba(255, 255, 102, 0.7) solid 2px"};let qv,Gv,Yv,Kv,Jv=!1,Zv="",Xv="";const Qv=new WeakSet,tf=new WeakMap,ef=new WeakMap,af=new Map,rf=new Map,nf=new Map,of=Om?null:("complete"===document.readyState?$v():window.addEventListener("DOMContentLoaded",$v),i({},Pv));function lf(t,e){Gv===t&&df(),nf.get(e).delete(t),Em(),0===nf.get(e).size&&nf.delete(e),0===nf.size&&(window.removeEventListener("keydown",sf),window.removeEventListener("click",cf))}function sf(t){if(Jv)switch(t.key){case"Escape":df()}}function cf(){Jv&&(Qv.has(document.activeElement)||df())}function hf(t){if(!Jv)return;const e=t.currentTarget;if(e===Gv)return;Zv=e.getAttribute("aria-label")||"";const{items:a}=rf.get(Gv),r=a.find((t=>t.id===Kv)),n=a.indexOf(r),i=a.splice(n,1)[0],{items:o,autoAriaDisabled:l}=rf.get(e);e.getBoundingClientRect().top<Gv.getBoundingClientRect().top||e.getBoundingClientRect().left<Gv.getBoundingClientRect().left?(o.push(i),l||Uv(`Moved item ${Xv} to the end of the list ${Zv}`)):(o.unshift(i),l||Uv(`Moved item ${Xv} to the beginning of the list ${Zv}`));dm(Gv,a,{trigger:Hm,id:Kv,source:km}),dm(e,o,{trigger:Am,id:Kv,source:km}),Gv=e}function uf(){af.forEach((({update:t},e)=>t(rf.get(e))))}function df(t=!0){rf.get(Gv).autoAriaDisabled||Uv(`Stopped dragging item ${Xv}`),Qv.has(document.activeElement)&&document.activeElement.blur(),t&&pm(Gv,rf.get(Gv).items,{trigger:Lm,id:Kv,source:km}),uv(nf.get(qv),(t=>rf.get(t).dropTargetStyle),(t=>rf.get(t).dropTargetClasses)),Yv=null,Kv=null,Xv="",qv=null,Gv=null,Zv="",Jv=!1,uf()}function pf(t,e){const a={items:void 0,type:void 0,dragDisabled:!1,dropFromOthersDisabled:!1,dropTargetStyle:Wv,dropTargetClasses:[],autoAriaDisabled:!1};function r(t,e,a){t.length<=1||t.splice(a,1,t.splice(e,1,t[a])[0])}function n(e){switch(e.key){case"Enter":case" ":if((void 0!==e.target.disabled||e.target.href||e.target.isContentEditable)&&!Qv.has(e.target))return;e.preventDefault(),e.stopPropagation(),Jv?df():i(e);break;case"ArrowDown":case"ArrowRight":{if(!Jv)return;e.preventDefault(),e.stopPropagation();const{items:n}=rf.get(t),i=Array.from(t.children),o=i.indexOf(e.currentTarget);o<i.length-1&&(a.autoAriaDisabled||Uv(`Moved item ${Xv} to position ${o+2} in the list ${Zv}`),r(n,o,o+1),dm(t,n,{trigger:Am,id:Kv,source:km}));break}case"ArrowUp":case"ArrowLeft":{if(!Jv)return;e.preventDefault(),e.stopPropagation();const{items:n}=rf.get(t),i=Array.from(t.children).indexOf(e.currentTarget);i>0&&(a.autoAriaDisabled||Uv(`Moved item ${Xv} to position ${i} in the list ${Zv}`),r(n,i,i-1),dm(t,n,{trigger:Am,id:Kv,source:km}));break}}}function i(e){!function(e){const{items:a}=rf.get(t),r=Array.from(t.children),n=r.indexOf(e);Yv=e,Yv.tabIndex=0,Kv=a[n].id,Xv=r[n].getAttribute("aria-label")||""}(e.currentTarget),Gv=t,qv=a.type,Jv=!0;const r=Array.from(nf.get(a.type)).filter((t=>t===Gv||!rf.get(t).dropFromOthersDisabled));if(hv(r,(t=>rf.get(t).dropTargetStyle),(t=>rf.get(t).dropTargetClasses)),!a.autoAriaDisabled){let t=`Started dragging item ${Xv}. Use the arrow keys to move it within its list ${Zv}`;r.length>1&&(t+=", or tab to another list in order to move the item into it"),Uv(t)}pm(t,rf.get(t).items,{trigger:bm,id:Kv,source:km}),uf()}function o(t){Jv&&t.currentTarget!==Yv&&(t.stopPropagation(),df(!1),i(t))}function l({items:e=[],type:r="--any--",dragDisabled:i=!1,dropFromOthersDisabled:l=!1,dropTargetStyle:s=Wv,dropTargetClasses:c=[],autoAriaDisabled:h=!1}){var u,d;a.items=[...e],a.dragDisabled=i,a.dropFromOthersDisabled=l,a.dropTargetStyle=s,a.dropTargetClasses=c,a.autoAriaDisabled=h,h||(t.setAttribute("aria-disabled",i),t.setAttribute("role","list"),t.setAttribute("aria-describedby",i?of.DND_ZONE_DRAG_DISABLED:of.DND_ZONE_ACTIVE)),a.type&&r!==a.type&&lf(t,a.type),a.type=r,u=t,d=r,0===nf.size&&(window.addEventListener("keydown",sf),window.addEventListener("click",cf)),nf.has(d)||nf.set(d,new Set),nf.get(d).has(u)||(nf.get(d).add(u),Sm()),rf.set(t,a),t.tabIndex=Jv&&(t===Gv||Yv.contains(t)||a.dropFromOthersDisabled||Gv&&a.type!==rf.get(Gv).type)?-1:0,t.addEventListener("focus",hf);for(let p=0;p<t.children.length;p++){const e=t.children[p];Qv.add(e),e.tabIndex=Jv?-1:0,h||e.setAttribute("role","listitem"),e.removeEventListener("keydown",tf.get(e)),e.removeEventListener("click",ef.get(e)),i||(e.addEventListener("keydown",n),tf.set(e,n),e.addEventListener("click",o),ef.set(e,o)),Jv&&a.items[p].id===Kv&&(Yv=e,Yv.tabIndex=0,e.focus())}}l(e);const s={update:t=>{l(t)},destroy:()=>{lf(t,a.type),rf.delete(t),af.delete(t)}};return af.set(t,s),s}function mf(t,e){vf(e);const a=Iv(t,e),r=pf(t,e);return{update:t=>{vf(t),a.update(t),r.update(t)},destroy:()=>{a.destroy(),r.destroy()}}}function vf(t){const{items:n,flipDurationMs:i,type:o,dragDisabled:l,morphDisabled:s,dropFromOthersDisabled:c,dropTargetStyle:h,dropTargetClasses:u,transformDraggedElement:d,autoAriaDisabled:p,centreDraggedOnCursor:m}=t,v=((t,n)=>{var i={};for(var o in t)e.call(t,o)&&n.indexOf(o)<0&&(i[o]=t[o]);if(null!=t&&a)for(var o of a(t))n.indexOf(o)<0&&r.call(t,o)&&(i[o]=t[o]);return i})(t,["items","flipDurationMs","type","dragDisabled","morphDisabled","dropFromOthersDisabled","dropTargetStyle","dropTargetClasses","transformDraggedElement","autoAriaDisabled","centreDraggedOnCursor"]);if(Object.keys(v).length>0&&console.warn("dndzone will ignore unknown options",v),!n)throw new Error("no 'items' key provided to dndzone");const f=n.find((t=>!{}.hasOwnProperty.call(t,"id")));if(f)throw new Error(`missing 'id' property for item ${Gm(f)}`);if(u&&!Array.isArray(u))throw new Error(`dropTargetClasses should be an array but instead it is a ${typeof u}, ${Gm(u)}`)}function ff(){return(ff=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(t[r]=a[r])}return t}).apply(this,arguments)}function yf(t,e){for(var a=0;a<e.length;a++){var r=e[a];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var gf=Object.prototype.hasOwnProperty;function bf(t,e){return null!=t&&gf.call(t,e)}var zf=Array.isArray,xf="object"==typeof global&&global&&global.Object===Object&&global,wf="object"==typeof self&&self&&self.Object===Object&&self,Mf=xf||wf||Function("return this")(),_f=Mf.Symbol,Af=Object.prototype,Hf=Af.hasOwnProperty,Vf=Af.toString,Lf=_f?_f.toStringTag:void 0;var Bf=Object.prototype.toString;var kf=_f?_f.toStringTag:void 0;function Cf(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":kf&&kf in Object(t)?function(t){var e=Hf.call(t,Lf),a=t[Lf];try{t[Lf]=void 0;var r=!0}catch(i){}var n=Vf.call(t);return r&&(e?t[Lf]=a:delete t[Lf]),n}(t):function(t){return Bf.call(t)}(t)}function Sf(t){return null!=t&&"object"==typeof t}function Ef(t){return"symbol"==typeof t||Sf(t)&&"[object Symbol]"==Cf(t)}var Of=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Tf=/^\w*$/;function Df(t,e){if(zf(t))return!1;var a=typeof t;return!("number"!=a&&"symbol"!=a&&"boolean"!=a&&null!=t&&!Ef(t))||(Tf.test(t)||!Of.test(t)||null!=e&&t in Object(e))}function jf(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Ff(t){if(!jf(t))return!1;var e=Cf(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}var If=Mf["__core-js_shared__"],Pf=function(){var t=/[^.]+$/.exec(If&&If.keys&&If.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();var Rf=Function.prototype.toString;function Nf(t){if(null!=t){try{return Rf.call(t)}catch(e){}try{return t+""}catch(e){}}return""}var $f=/^\[object .+?Constructor\]$/,Uf=Function.prototype,Wf=Object.prototype,qf=Uf.toString,Gf=Wf.hasOwnProperty,Yf=RegExp("^"+qf.call(Gf).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Kf(t){return!(!jf(t)||(e=t,Pf&&Pf in e))&&(Ff(t)?Yf:$f).test(Nf(t));var e}function Jf(t,e){var a=function(t,e){return null==t?void 0:t[e]}(t,e);return Kf(a)?a:void 0}var Zf=Jf(Object,"create");var Xf=Object.prototype.hasOwnProperty;var Qf=Object.prototype.hasOwnProperty;function ty(t){var e=-1,a=null==t?0:t.length;for(this.clear();++e<a;){var r=t[e];this.set(r[0],r[1])}}function ey(t,e){return t===e||t!=t&&e!=e}function ay(t,e){for(var a=t.length;a--;)if(ey(t[a][0],e))return a;return-1}ty.prototype.clear=function(){this.__data__=Zf?Zf(null):{},this.size=0},ty.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},ty.prototype.get=function(t){var e=this.__data__;if(Zf){var a=e[t];return"__lodash_hash_undefined__"===a?void 0:a}return Xf.call(e,t)?e[t]:void 0},ty.prototype.has=function(t){var e=this.__data__;return Zf?void 0!==e[t]:Qf.call(e,t)},ty.prototype.set=function(t,e){var a=this.__data__;return this.size+=this.has(t)?0:1,a[t]=Zf&&void 0===e?"__lodash_hash_undefined__":e,this};var ry=Array.prototype.splice;function ny(t){var e=-1,a=null==t?0:t.length;for(this.clear();++e<a;){var r=t[e];this.set(r[0],r[1])}}ny.prototype.clear=function(){this.__data__=[],this.size=0},ny.prototype.delete=function(t){var e=this.__data__,a=ay(e,t);return!(a<0)&&(a==e.length-1?e.pop():ry.call(e,a,1),--this.size,!0)},ny.prototype.get=function(t){var e=this.__data__,a=ay(e,t);return a<0?void 0:e[a][1]},ny.prototype.has=function(t){return ay(this.__data__,t)>-1},ny.prototype.set=function(t,e){var a=this.__data__,r=ay(a,t);return r<0?(++this.size,a.push([t,e])):a[r][1]=e,this};var iy=Jf(Mf,"Map");function oy(t,e){var a=t.__data__;return function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}(e)?a["string"==typeof e?"string":"hash"]:a.map}function ly(t){var e=-1,a=null==t?0:t.length;for(this.clear();++e<a;){var r=t[e];this.set(r[0],r[1])}}ly.prototype.clear=function(){this.size=0,this.__data__={hash:new ty,map:new(iy||ny),string:new ty}},ly.prototype.delete=function(t){var e=oy(this,t).delete(t);return this.size-=e?1:0,e},ly.prototype.get=function(t){return oy(this,t).get(t)},ly.prototype.has=function(t){return oy(this,t).has(t)},ly.prototype.set=function(t,e){var a=oy(this,t),r=a.size;return a.set(t,e),this.size+=a.size==r?0:1,this};function sy(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var a=function(){var r=arguments,n=e?e.apply(this,r):r[0],i=a.cache;if(i.has(n))return i.get(n);var o=t.apply(this,r);return a.cache=i.set(n,o)||i,o};return a.cache=new(sy.Cache||ly),a}sy.Cache=ly;var cy,hy,uy,dy=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,py=/\\(\\)?/g,my=(cy=function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(dy,(function(t,a,r,n){e.push(r?n.replace(py,"$1"):a||t)})),e},hy=sy(cy,(function(t){return 500===uy.size&&uy.clear(),t})),uy=hy.cache,hy);function vy(t,e){for(var a=-1,r=null==t?0:t.length,n=Array(r);++a<r;)n[a]=e(t[a],a,t);return n}var fy=_f?_f.prototype:void 0,yy=fy?fy.toString:void 0;function gy(t){if("string"==typeof t)return t;if(zf(t))return vy(t,gy)+"";if(Ef(t))return yy?yy.call(t):"";var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e}function by(t){return null==t?"":gy(t)}function zy(t,e){return zf(t)?t:Df(t,e)?[t]:my(by(t))}function xy(t){return Sf(t)&&"[object Arguments]"==Cf(t)}var wy=Object.prototype,My=wy.hasOwnProperty,_y=wy.propertyIsEnumerable,Ay=xy(function(){return arguments}())?xy:function(t){return Sf(t)&&My.call(t,"callee")&&!_y.call(t,"callee")},Hy=/^(?:0|[1-9]\d*)$/;function Vy(t,e){var a=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==a||"symbol"!=a&&Hy.test(t))&&t>-1&&t%1==0&&t<e}function Ly(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function By(t){if("string"==typeof t||Ef(t))return t;var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e}function ky(t,e,a){for(var r=-1,n=(e=zy(e,t)).length,i=!1;++r<n;){var o=By(e[r]);if(!(i=null!=t&&a(t,o)))break;t=t[o]}return i||++r!=n?i:!!(n=null==t?0:t.length)&&Ly(n)&&Vy(o,n)&&(zf(t)||Ay(t))}function Cy(t,e){return null!=t&&ky(t,e,bf)}function Sy(t){var e=this.__data__=new ny(t);this.size=e.size}Sy.prototype.clear=function(){this.__data__=new ny,this.size=0},Sy.prototype.delete=function(t){var e=this.__data__,a=e.delete(t);return this.size=e.size,a},Sy.prototype.get=function(t){return this.__data__.get(t)},Sy.prototype.has=function(t){return this.__data__.has(t)},Sy.prototype.set=function(t,e){var a=this.__data__;if(a instanceof ny){var r=a.__data__;if(!iy||r.length<199)return r.push([t,e]),this.size=++a.size,this;a=this.__data__=new ly(r)}return a.set(t,e),this.size=a.size,this};var Ey=function(){try{var t=Jf(Object,"defineProperty");return t({},"",{}),t}catch(e){}}();function Oy(t,e,a){"__proto__"==e&&Ey?Ey(t,e,{configurable:!0,enumerable:!0,value:a,writable:!0}):t[e]=a}var Ty=Object.prototype.hasOwnProperty;function Dy(t,e,a){var r=t[e];Ty.call(t,e)&&ey(r,a)&&(void 0!==a||e in t)||Oy(t,e,a)}function jy(t,e,a,r){var n=!a;a||(a={});for(var i=-1,o=e.length;++i<o;){var l=e[i],s=r?r(a[l],t[l],l,a,t):void 0;void 0===s&&(s=t[l]),n?Oy(a,l,s):Dy(a,l,s)}return a}var Fy="object"==typeof exports&&exports&&!exports.nodeType&&exports,Iy=Fy&&"object"==typeof module&&module&&!module.nodeType&&module,Py=Iy&&Iy.exports===Fy?Mf.Buffer:void 0,Ry=(Py?Py.isBuffer:void 0)||function(){return!1},Ny={};function $y(t){return function(e){return t(e)}}Ny["[object Float32Array]"]=Ny["[object Float64Array]"]=Ny["[object Int8Array]"]=Ny["[object Int16Array]"]=Ny["[object Int32Array]"]=Ny["[object Uint8Array]"]=Ny["[object Uint8ClampedArray]"]=Ny["[object Uint16Array]"]=Ny["[object Uint32Array]"]=!0,Ny["[object Arguments]"]=Ny["[object Array]"]=Ny["[object ArrayBuffer]"]=Ny["[object Boolean]"]=Ny["[object DataView]"]=Ny["[object Date]"]=Ny["[object Error]"]=Ny["[object Function]"]=Ny["[object Map]"]=Ny["[object Number]"]=Ny["[object Object]"]=Ny["[object RegExp]"]=Ny["[object Set]"]=Ny["[object String]"]=Ny["[object WeakMap]"]=!1;var Uy="object"==typeof exports&&exports&&!exports.nodeType&&exports,Wy=Uy&&"object"==typeof module&&module&&!module.nodeType&&module,qy=Wy&&Wy.exports===Uy&&xf.process,Gy=function(){try{var t=Wy&&Wy.require&&Wy.require("util").types;return t||qy&&qy.binding&&qy.binding("util")}catch(e){}}(),Yy=Gy&&Gy.isTypedArray,Ky=Yy?$y(Yy):function(t){return Sf(t)&&Ly(t.length)&&!!Ny[Cf(t)]},Jy=Object.prototype.hasOwnProperty;function Zy(t,e){var a=zf(t),r=!a&&Ay(t),n=!a&&!r&&Ry(t),i=!a&&!r&&!n&&Ky(t),o=a||r||n||i,l=o?function(t,e){for(var a=-1,r=Array(t);++a<t;)r[a]=e(a);return r}(t.length,String):[],s=l.length;for(var c in t)!e&&!Jy.call(t,c)||o&&("length"==c||n&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Vy(c,s))||l.push(c);return l}var Xy=Object.prototype;function Qy(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Xy)}function tg(t,e){return function(a){return t(e(a))}}var eg=tg(Object.keys,Object),ag=Object.prototype.hasOwnProperty;function rg(t){return null!=t&&Ly(t.length)&&!Ff(t)}function ng(t){return rg(t)?Zy(t):function(t){if(!Qy(t))return eg(t);var e=[];for(var a in Object(t))ag.call(t,a)&&"constructor"!=a&&e.push(a);return e}(t)}var ig=Object.prototype.hasOwnProperty;function og(t){if(!jf(t))return function(t){var e=[];if(null!=t)for(var a in Object(t))e.push(a);return e}(t);var e=Qy(t),a=[];for(var r in t)("constructor"!=r||!e&&ig.call(t,r))&&a.push(r);return a}function lg(t){return rg(t)?Zy(t,!0):og(t)}var sg="object"==typeof exports&&exports&&!exports.nodeType&&exports,cg=sg&&"object"==typeof module&&module&&!module.nodeType&&module,hg=cg&&cg.exports===sg?Mf.Buffer:void 0,ug=hg?hg.allocUnsafe:void 0;function dg(t,e){var a=-1,r=t.length;for(e||(e=Array(r));++a<r;)e[a]=t[a];return e}function pg(){return[]}var mg=Object.prototype.propertyIsEnumerable,vg=Object.getOwnPropertySymbols,fg=vg?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var a=-1,r=null==t?0:t.length,n=0,i=[];++a<r;){var o=t[a];e(o,a,t)&&(i[n++]=o)}return i}(vg(t),(function(e){return mg.call(t,e)})))}:pg;function yg(t,e){for(var a=-1,r=e.length,n=t.length;++a<r;)t[n+a]=e[a];return t}var gg=tg(Object.getPrototypeOf,Object),bg=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)yg(e,fg(t)),t=gg(t);return e}:pg;function zg(t,e,a){var r=e(t);return zf(t)?r:yg(r,a(t))}function xg(t){return zg(t,ng,fg)}function wg(t){return zg(t,lg,bg)}var Mg=Jf(Mf,"DataView"),_g=Jf(Mf,"Promise"),Ag=Jf(Mf,"Set"),Hg=Jf(Mf,"WeakMap"),Vg=Nf(Mg),Lg=Nf(iy),Bg=Nf(_g),kg=Nf(Ag),Cg=Nf(Hg),Sg=Cf;(Mg&&"[object DataView]"!=Sg(new Mg(new ArrayBuffer(1)))||iy&&"[object Map]"!=Sg(new iy)||_g&&"[object Promise]"!=Sg(_g.resolve())||Ag&&"[object Set]"!=Sg(new Ag)||Hg&&"[object WeakMap]"!=Sg(new Hg))&&(Sg=function(t){var e=Cf(t),a="[object Object]"==e?t.constructor:void 0,r=a?Nf(a):"";if(r)switch(r){case Vg:return"[object DataView]";case Lg:return"[object Map]";case Bg:return"[object Promise]";case kg:return"[object Set]";case Cg:return"[object WeakMap]"}return e});var Eg=Sg,Og=Object.prototype.hasOwnProperty;var Tg=Mf.Uint8Array;function Dg(t){var e=new t.constructor(t.byteLength);return new Tg(e).set(new Tg(t)),e}var jg=/\w*$/;var Fg=_f?_f.prototype:void 0,Ig=Fg?Fg.valueOf:void 0;function Pg(t,e,a){var r,n=t.constructor;switch(e){case"[object ArrayBuffer]":return Dg(t);case"[object Boolean]":case"[object Date]":return new n(+t);case"[object DataView]":return function(t,e){var a=e?Dg(t.buffer):t.buffer;return new t.constructor(a,t.byteOffset,t.byteLength)}(t,a);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function(t,e){var a=e?Dg(t.buffer):t.buffer;return new t.constructor(a,t.byteOffset,t.length)}(t,a);case"[object Map]":return new n;case"[object Number]":case"[object String]":return new n(t);case"[object RegExp]":return function(t){var e=new t.constructor(t.source,jg.exec(t));return e.lastIndex=t.lastIndex,e}(t);case"[object Set]":return new n;case"[object Symbol]":return r=t,Ig?Object(Ig.call(r)):{}}}var Rg=Object.create,Ng=function(){function t(){}return function(e){if(!jf(e))return{};if(Rg)return Rg(e);t.prototype=e;var a=new t;return t.prototype=void 0,a}}();var $g=Gy&&Gy.isMap,Ug=$g?$y($g):function(t){return Sf(t)&&"[object Map]"==Eg(t)};var Wg=Gy&&Gy.isSet,qg=Wg?$y(Wg):function(t){return Sf(t)&&"[object Set]"==Eg(t)},Gg={};function Yg(t,e,a,r,n,i){var o,l=1&e,s=2&e,c=4&e;if(a&&(o=n?a(t,r,n,i):a(t)),void 0!==o)return o;if(!jf(t))return t;var h=zf(t);if(h){if(o=function(t){var e=t.length,a=new t.constructor(e);return e&&"string"==typeof t[0]&&Og.call(t,"index")&&(a.index=t.index,a.input=t.input),a}(t),!l)return dg(t,o)}else{var u=Eg(t),d="[object Function]"==u||"[object GeneratorFunction]"==u;if(Ry(t))return function(t,e){if(e)return t.slice();var a=t.length,r=ug?ug(a):new t.constructor(a);return t.copy(r),r}(t,l);if("[object Object]"==u||"[object Arguments]"==u||d&&!n){if(o=s||d?{}:function(t){return"function"!=typeof t.constructor||Qy(t)?{}:Ng(gg(t))}(t),!l)return s?function(t,e){return jy(t,bg(t),e)}(t,function(t,e){return t&&jy(e,lg(e),t)}(o,t)):function(t,e){return jy(t,fg(t),e)}(t,function(t,e){return t&&jy(e,ng(e),t)}(o,t))}else{if(!Gg[u])return n?t:{};o=Pg(t,u,l)}}i||(i=new Sy);var p=i.get(t);if(p)return p;i.set(t,o),qg(t)?t.forEach((function(r){o.add(Yg(r,e,a,r,t,i))})):Ug(t)&&t.forEach((function(r,n){o.set(n,Yg(r,e,a,n,t,i))}));var m=h?void 0:(c?s?wg:xg:s?lg:ng)(t);return function(t,e){for(var a=-1,r=null==t?0:t.length;++a<r&&!1!==e(t[a],a,t););}(m||t,(function(r,n){m&&(r=t[n=r]),Dy(o,n,Yg(r,e,a,n,t,i))})),o}Gg["[object Arguments]"]=Gg["[object Array]"]=Gg["[object ArrayBuffer]"]=Gg["[object DataView]"]=Gg["[object Boolean]"]=Gg["[object Date]"]=Gg["[object Float32Array]"]=Gg["[object Float64Array]"]=Gg["[object Int8Array]"]=Gg["[object Int16Array]"]=Gg["[object Int32Array]"]=Gg["[object Map]"]=Gg["[object Number]"]=Gg["[object Object]"]=Gg["[object RegExp]"]=Gg["[object Set]"]=Gg["[object String]"]=Gg["[object Symbol]"]=Gg["[object Uint8Array]"]=Gg["[object Uint8ClampedArray]"]=Gg["[object Uint16Array]"]=Gg["[object Uint32Array]"]=!0,Gg["[object Error]"]=Gg["[object Function]"]=Gg["[object WeakMap]"]=!1;function Kg(t,e){return Yg(t,5,e="function"==typeof e?e:void 0)}function Jg(t){var e=-1,a=Array(t.size);return t.forEach((function(t,r){a[++e]=[r,t]})),a}function Zg(t){var e=-1,a=Array(t.size);return t.forEach((function(t){a[++e]=t})),a}var Xg=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function Qg(t){return Xg.test(t)}var tb="[\\ud800-\\udfff]",eb="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",ab="\\ud83c[\\udffb-\\udfff]",rb="[^\\ud800-\\udfff]",nb="(?:\\ud83c[\\udde6-\\uddff]){2}",ib="[\\ud800-\\udbff][\\udc00-\\udfff]",ob="(?:"+eb+"|"+ab+")"+"?",lb="[\\ufe0e\\ufe0f]?"+ob+("(?:\\u200d(?:"+[rb,nb,ib].join("|")+")[\\ufe0e\\ufe0f]?"+ob+")*"),sb="(?:"+[rb+eb+"?",eb,nb,ib,tb].join("|")+")",cb=RegExp(ab+"(?="+ab+")|"+sb+lb,"g");function hb(t){return Qg(t)?function(t){return t.match(cb)||[]}(t):function(t){return t.split("")}(t)}function ub(t){return null==t?[]:function(t,e){return vy(e,(function(e){return t[e]}))}(t,ng(t))}var db=_f?_f.iterator:void 0;function pb(t){if(!t)return[];if(rg(t))return function(t){return"string"==typeof t||!zf(t)&&Sf(t)&&"[object String]"==Cf(t)}(t)?hb(t):dg(t);if(db&&t[db])return function(t){for(var e,a=[];!(e=t.next()).done;)a.push(e.value);return a}(t[db]());var e=Eg(t);return("[object Map]"==e?Jg:"[object Set]"==e?Zg:ub)(t)}var mb=Object.prototype.toString,vb=Error.prototype.toString,fb=RegExp.prototype.toString,yb="undefined"!=typeof Symbol?Symbol.prototype.toString:function(){return""},gb=/^Symbol\((.*)\)(.*)$/;function bb(t,e){if(void 0===e&&(e=!1),null==t||!0===t||!1===t)return""+t;var a=typeof t;if("number"===a)return function(t){return t!=+t?"NaN":0===t&&1/t<0?"-0":""+t}(t);if("string"===a)return e?'"'+t+'"':t;if("function"===a)return"[Function "+(t.name||"anonymous")+"]";if("symbol"===a)return yb.call(t).replace(gb,"Symbol($1)");var r=mb.call(t).slice(8,-1);return"Date"===r?isNaN(t.getTime())?""+t:t.toISOString(t):"Error"===r||t instanceof Error?"["+vb.call(t)+"]":"RegExp"===r?fb.call(t):null}function zb(t,e){var a=bb(t,e);return null!==a?a:JSON.stringify(t,(function(t,a){var r=bb(this[t],e);return null!==r?r:a}),2)}var xb="${path} is invalid",wb="${path} is a required field",Mb="${path} must be one of the following values: ${values}",_b="${path} must not be one of the following values: ${values}",Ab=function(t){var e=t.path,a=t.type,r=t.value,n=t.originalValue,i=null!=n&&n!==r,o=e+" must be a `"+a+"` type, but the final value was: `"+zb(r,!0)+"`"+(i?" (cast from the value `"+zb(n,!0)+"`).":".");return null===r&&(o+='\n If "null" is intended as an empty value be sure to mark the schema as `.nullable()`'),o},Hb="${path} must be defined",Vb="${path} must be exactly ${length} characters",Lb="${path} must be at least ${min} characters",Bb="${path} must be at most ${max} characters",kb='${path} must match the following: "${regex}"',Cb="${path} must be a valid email",Sb="${path} must be a valid URL",Eb="${path} must be a valid UUID",Ob="${path} must be a trimmed string",Tb="${path} must be a lowercase string",Db="${path} must be a upper case string",jb="${path} must be greater than or equal to ${min}",Fb="${path} must be less than or equal to ${max}",Ib="${path} must be less than ${less}",Pb="${path} must be greater than ${more}",Rb="${path} must be a positive number",Nb="${path} must be a negative number",$b="${path} must be an integer",Ub="${path} field must be later than ${min}",Wb="${path} field must be at earlier than ${max}",qb="${path} field has unspecified keys: ${unknown}",Gb="${path} field must have at least ${min} items",Yb="${path} field must have less than or equal to ${max} items",Kb=function(t){return t&&t.__isYupSchema__},Jb=function(){function t(t,e){if(this.refs=t,"function"!=typeof e){if(!Cy(e,"is"))throw new TypeError("`is:` is required for `when()` conditions");if(!e.then&&!e.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");var a=e.is,r=e.then,n=e.otherwise,i="function"==typeof a?a:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.every((function(t){return t===a}))};this.fn=function(){for(var t=arguments.length,e=new Array(t),a=0;a<t;a++)e[a]=arguments[a];var o=e.pop(),l=e.pop(),s=i.apply(void 0,e)?r:n;if(s)return"function"==typeof s?s(l):l.concat(s.resolve(o))}}else this.fn=e}return t.prototype.resolve=function(t,e){var a=this.refs.map((function(t){return t.getValue(e)})),r=this.fn.apply(t,a.concat(t,e));if(void 0===r||r===t)return t;if(!Kb(r))throw new TypeError("conditions must return a schema object");return r.resolve(e)},t}();function Zb(t,e){if(null==t)return{};var a,r,n={},i=Object.keys(t);for(r=0;r<i.length;r++)a=i[r],e.indexOf(a)>=0||(n[a]=t[a]);return n}function Xb(t){return Array.prototype.slice.apply(t)}function Qb(t){this.status="pending",this._continuations=[],this._parent=null,this._paused=!1,t&&t.call(this,this._continueWith.bind(this),this._failWith.bind(this))}function tz(t){return t&&"function"==typeof t.then}function ez(t){return t}function az(t){return"undefined"!=typeof window&&"AggregateError"in window?new window.AggregateError(t):{errors:t}}if(Qb.prototype={then:function(t,e){var a=Qb.unresolved()._setParent(this);if(this._isRejected()){if(this._paused)return this._continuations.push({promise:a,nextFn:t,catchFn:e}),a;if(e)try{var r=e(this._error);return tz(r)?(this._chainPromiseData(r,a),a):Qb.resolve(r)._setParent(this)}catch(n){return Qb.reject(n)._setParent(this)}return Qb.reject(this._error)._setParent(this)}return this._continuations.push({promise:a,nextFn:t,catchFn:e}),this._runResolutions(),a},catch:function(t){if(this._isResolved())return Qb.resolve(this._data)._setParent(this);var e=Qb.unresolved()._setParent(this);return this._continuations.push({promise:e,catchFn:t}),this._runRejections(),e},finally:function(t){var e=!1;function a(a,r){if(!e){e=!0,t||(t=ez);var n=t(a);return tz(n)?n.then((function(){if(r)throw r;return a})):a}}return this.then((function(t){return a(t)})).catch((function(t){return a(null,t)}))},pause:function(){return this._paused=!0,this},resume:function(){var t=this._findFirstPaused();return t&&(t._paused=!1,t._runResolutions(),t._runRejections()),this},_findAncestry:function(){return this._continuations.reduce((function(t,e){if(e.promise){var a={promise:e.promise,children:e.promise._findAncestry()};t.push(a)}return t}),[])},_setParent:function(t){if(this._parent)throw new Error("parent already set");return this._parent=t,this},_continueWith:function(t){var e=this._findFirstPending();e&&(e._data=t,e._setResolved())},_findFirstPending:function(){return this._findFirstAncestor((function(t){return t._isPending&&t._isPending()}))},_findFirstPaused:function(){return this._findFirstAncestor((function(t){return t._paused}))},_findFirstAncestor:function(t){for(var e,a=this;a;)t(a)&&(e=a),a=a._parent;return e},_failWith:function(t){var e=this._findFirstPending();e&&(e._error=t,e._setRejected())},_takeContinuations:function(){return this._continuations.splice(0,this._continuations.length)},_runRejections:function(){if(!this._paused&&this._isRejected()){var t=this._error,e=this._takeContinuations(),a=this;e.forEach((function(e){if(e.catchFn)try{var r=e.catchFn(t);a._handleUserFunctionResult(r,e.promise)}catch(n){e.promise.reject(n)}else e.promise.reject(t)}))}},_runResolutions:function(){if(!this._paused&&this._isResolved()&&!this._isPending()){var t=this._takeContinuations();if(tz(this._data))return this._handleWhenResolvedDataIsPromise(this._data);var e=this._data,a=this;t.forEach((function(t){if(t.nextFn)try{var r=t.nextFn(e);a._handleUserFunctionResult(r,t.promise)}catch(n){a._handleResolutionError(n,t)}else t.promise&&t.promise.resolve(e)}))}},_handleResolutionError:function(t,e){if(this._setRejected(),e.catchFn)try{return void e.catchFn(t)}catch(a){t=a}e.promise&&e.promise.reject(t)},_handleWhenResolvedDataIsPromise:function(t){var e=this;return t.then((function(t){e._data=t,e._runResolutions()})).catch((function(t){e._error=t,e._setRejected(),e._runRejections()}))},_handleUserFunctionResult:function(t,e){tz(t)?this._chainPromiseData(t,e):e.resolve(t)},_chainPromiseData:function(t,e){t.then((function(t){e.resolve(t)})).catch((function(t){e.reject(t)}))},_setResolved:function(){this.status="resolved",this._paused||this._runResolutions()},_setRejected:function(){this.status="rejected",this._paused||this._runRejections()},_isPending:function(){return"pending"===this.status},_isResolved:function(){return"resolved"===this.status},_isRejected:function(){return"rejected"===this.status}},Qb.resolve=function(t){return new Qb((function(e,a){tz(t)?t.then((function(t){e(t)})).catch((function(t){a(t)})):e(t)}))},Qb.reject=function(t){return new Qb((function(e,a){a(t)}))},Qb.unresolved=function(){return new Qb((function(t,e){this.resolve=t,this.reject=e}))},Qb.all=function(){var t=Xb(arguments);return Array.isArray(t[0])&&(t=t[0]),t.length?new Qb((function(e,a){var r=[],n=0,i=!1;t.forEach((function(o,l){Qb.resolve(o).then((function(a){r[l]=a,(n+=1)===t.length&&e(r)})).catch((function(t){!function(t){i||(i=!0,a(t))}(t)}))}))})):Qb.resolve([])},Qb.any=function(){var t=Xb(arguments);return Array.isArray(t[0])&&(t=t[0]),t.length?new Qb((function(e,a){var r=[],n=0,i=!1;t.forEach((function(o,l){Qb.resolve(o).then((function(t){!function(t){i||(i=!0,e(t))}(t)})).catch((function(e){r[l]=e,(n+=1)===t.length&&a(az(r))}))}))})):Qb.reject(az([]))},Qb.allSettled=function(){var t=Xb(arguments);return Array.isArray(t[0])&&(t=t[0]),t.length?new Qb((function(e){var a=[],r=0,n=function(){(r+=1)===t.length&&e(a)};t.forEach((function(t,e){Qb.resolve(t).then((function(t){a[e]={status:"fulfilled",value:t},n()})).catch((function(t){a[e]={status:"rejected",reason:t},n()}))}))})):Qb.resolve([])},Promise===Qb)throw new Error("Please use SynchronousPromise.installGlobally() to install globally");var rz=Promise;Qb.installGlobally=function(t){if(Promise===Qb)return t;var e=function(t){if(void 0===t||t.__patched)return t;var e=t;return(t=function(){e.apply(this,Xb(arguments))}).__patched=!0,t}(t);return Promise=Qb,e},Qb.uninstallGlobally=function(){Promise===Qb&&(Promise=rz)};var nz={SynchronousPromise:Qb},iz=/\$\{\s*(\w+)\s*\}/g,oz=function(t){return function(e){return t.replace(iz,(function(t,a){return zb(e[a])}))}};function lz(t,e,a,r){var n=this;this.name="ValidationError",this.value=e,this.path=a,this.type=r,this.errors=[],this.inner=[],t&&[].concat(t).forEach((function(t){n.errors=n.errors.concat(t.errors||t),t.inner&&(n.inner=n.inner.concat(t.inner.length?t.inner:t))})),this.message=this.errors.length>1?this.errors.length+" errors occurred":this.errors[0],Error.captureStackTrace&&Error.captureStackTrace(this,lz)}lz.prototype=Object.create(Error.prototype),lz.prototype.constructor=lz,lz.isError=function(t){return t&&"ValidationError"===t.name},lz.formatError=function(t,e){"string"==typeof t&&(t=oz(t));var a=function(e){return e.path=e.label||e.path||"this","function"==typeof t?t(e):t};return 1===arguments.length?a:a(e)};var sz=function(t){return t?nz.SynchronousPromise:Promise};function cz(t,e){return t?null:function(t){return e.push(t),t.value}}function hz(t){var e=t.validations,a=t.value,r=t.path,n=t.sync,i=t.errors,o=t.sort;return i=function(t){return void 0===t&&(t=[]),t.inner&&t.inner.length?t.inner:[].concat(t)}(i),function(t,e){var a=sz(e);return a.all(t.map((function(t){return a.resolve(t).then((function(t){return{fulfilled:!0,value:t}}),(function(t){return{fulfilled:!1,value:t}}))})))}(e,n).then((function(t){var e=t.filter((function(t){return!t.fulfilled})).reduce((function(t,e){var a=e.value;if(!lz.isError(a))throw a;return t.concat(a)}),[]);if(o&&e.sort(o),(i=e.concat(i)).length)throw new lz(i,a,r);return a}))}function uz(t){var e=t.endEarly,a=Zb(t,["endEarly"]);return e?function(t,e,a){return sz(a).all(t).catch((function(t){throw"ValidationError"===t.name&&(t.value=e),t})).then((function(){return e}))}(a.validations,a.value,a.sync):hz(a)}var dz=function(t){return"[object Object]"===Object.prototype.toString.call(t)};function pz(t,e){for(var a in e)if(Cy(e,a)){var r=e[a],n=t[a];if(void 0===n)t[a]=r;else{if(n===r)continue;Kb(n)?Kb(r)&&(t[a]=r.concat(n)):dz(n)?dz(r)&&(t[a]=pz(n,r)):Array.isArray(n)&&Array.isArray(r)&&(t[a]=r.concat(n))}}return t}var mz,vz=function(t,e,a){for(var r=-1,n=Object(t),i=a(t),o=i.length;o--;){var l=i[mz?o:++r];if(!1===e(n[l],l,n))break}return t};function fz(t,e){return t&&vz(t,e,ng)}function yz(t){var e=-1,a=null==t?0:t.length;for(this.__data__=new ly;++e<a;)this.add(t[e])}function gz(t,e){for(var a=-1,r=null==t?0:t.length;++a<r;)if(e(t[a],a,t))return!0;return!1}function bz(t,e){return t.has(e)}yz.prototype.add=yz.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},yz.prototype.has=function(t){return this.__data__.has(t)};function zz(t,e,a,r,n,i){var o=1&a,l=t.length,s=e.length;if(l!=s&&!(o&&s>l))return!1;var c=i.get(t),h=i.get(e);if(c&&h)return c==e&&h==t;var u=-1,d=!0,p=2&a?new yz:void 0;for(i.set(t,e),i.set(e,t);++u<l;){var m=t[u],v=e[u];if(r)var f=o?r(v,m,u,e,t,i):r(m,v,u,t,e,i);if(void 0!==f){if(f)continue;d=!1;break}if(p){if(!gz(e,(function(t,e){if(!bz(p,e)&&(m===t||n(m,t,a,r,i)))return p.push(e)}))){d=!1;break}}else if(m!==v&&!n(m,v,a,r,i)){d=!1;break}}return i.delete(t),i.delete(e),d}var xz=_f?_f.prototype:void 0,wz=xz?xz.valueOf:void 0;var Mz=Object.prototype.hasOwnProperty;var _z="[object Object]",Az=Object.prototype.hasOwnProperty;function Hz(t,e,a,r,n,i){var o=zf(t),l=zf(e),s=o?"[object Array]":Eg(t),c=l?"[object Array]":Eg(e),h=(s="[object Arguments]"==s?_z:s)==_z,u=(c="[object Arguments]"==c?_z:c)==_z,d=s==c;if(d&&Ry(t)){if(!Ry(e))return!1;o=!0,h=!1}if(d&&!h)return i||(i=new Sy),o||Ky(t)?zz(t,e,a,r,n,i):function(t,e,a,r,n,i,o){switch(a){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!i(new Tg(t),new Tg(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return ey(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var l=Jg;case"[object Set]":var s=1&r;if(l||(l=Zg),t.size!=e.size&&!s)return!1;var c=o.get(t);if(c)return c==e;r|=2,o.set(t,e);var h=zz(l(t),l(e),r,n,i,o);return o.delete(t),h;case"[object Symbol]":if(wz)return wz.call(t)==wz.call(e)}return!1}(t,e,s,a,r,n,i);if(!(1&a)){var p=h&&Az.call(t,"__wrapped__"),m=u&&Az.call(e,"__wrapped__");if(p||m){var v=p?t.value():t,f=m?e.value():e;return i||(i=new Sy),n(v,f,a,r,i)}}return!!d&&(i||(i=new Sy),function(t,e,a,r,n,i){var o=1&a,l=xg(t),s=l.length;if(s!=xg(e).length&&!o)return!1;for(var c=s;c--;){var h=l[c];if(!(o?h in e:Mz.call(e,h)))return!1}var u=i.get(t),d=i.get(e);if(u&&d)return u==e&&d==t;var p=!0;i.set(t,e),i.set(e,t);for(var m=o;++c<s;){var v=t[h=l[c]],f=e[h];if(r)var y=o?r(f,v,h,e,t,i):r(v,f,h,t,e,i);if(!(void 0===y?v===f||n(v,f,a,r,i):y)){p=!1;break}m||(m="constructor"==h)}if(p&&!m){var g=t.constructor,b=e.constructor;g==b||!("constructor"in t)||!("constructor"in e)||"function"==typeof g&&g instanceof g&&"function"==typeof b&&b instanceof b||(p=!1)}return i.delete(t),i.delete(e),p}(t,e,a,r,n,i))}function Vz(t,e,a,r,n){return t===e||(null==t||null==e||!Sf(t)&&!Sf(e)?t!=t&&e!=e:Hz(t,e,a,r,Vz,n))}function Lz(t){return t==t&&!jf(t)}function Bz(t,e){return function(a){return null!=a&&(a[t]===e&&(void 0!==e||t in Object(a)))}}function kz(t){var e=function(t){for(var e=ng(t),a=e.length;a--;){var r=e[a],n=t[r];e[a]=[r,n,Lz(n)]}return e}(t);return 1==e.length&&e[0][2]?Bz(e[0][0],e[0][1]):function(a){return a===t||function(t,e,a,r){var n=a.length,i=n,o=!r;if(null==t)return!i;for(t=Object(t);n--;){var l=a[n];if(o&&l[2]?l[1]!==t[l[0]]:!(l[0]in t))return!1}for(;++n<i;){var s=(l=a[n])[0],c=t[s],h=l[1];if(o&&l[2]){if(void 0===c&&!(s in t))return!1}else{var u=new Sy;if(r)var d=r(c,h,s,t,e,u);if(!(void 0===d?Vz(h,c,3,r,u):d))return!1}}return!0}(a,t,e)}}function Cz(t,e){for(var a=0,r=(e=zy(e,t)).length;null!=t&&a<r;)t=t[By(e[a++])];return a&&a==r?t:void 0}function Sz(t,e){return null!=t&&e in Object(t)}function Ez(t,e){return Df(t)&&Lz(e)?Bz(By(t),e):function(a){var r=function(t,e,a){var r=null==t?void 0:Cz(t,e);return void 0===r?a:r}(a,t);return void 0===r&&r===e?function(t,e){return null!=t&&ky(t,e,Sz)}(a,t):Vz(e,r,3)}}function Oz(t){return t}function Tz(t){return Df(t)?(e=By(t),function(t){return null==t?void 0:t[e]}):function(t){return function(e){return Cz(e,t)}}(t);var e}function Dz(t){return"function"==typeof t?t:null==t?Oz:"object"==typeof t?zf(t)?Ez(t[0],t[1]):kz(t):Tz(t)}function jz(t,e){var a={};return e=Dz(e),fz(t,(function(t,r,n){Oy(a,r,e(t,r,n))})),a}function Fz(t){this._maxSize=t,this.clear()}Fz.prototype.clear=function(){this._size=0,this._values=Object.create(null)},Fz.prototype.get=function(t){return this._values[t]},Fz.prototype.set=function(t,e){return this._size>=this._maxSize&&this.clear(),t in this._values||this._size++,this._values[t]=e};var Iz=/[^.^\]^[]+|(?=\[\]|\.\.)/g,Pz=/^\d+$/,Rz=/^\d/,Nz=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,$z=/^\s*(['"]?)(.*?)(\1)\s*$/,Uz=new Fz(512),Wz=new Fz(512),qz=new Fz(512),Gz={Cache:Fz,split:Kz,normalizePath:Yz,setter:function(t){var e=Yz(t);return Wz.get(t)||Wz.set(t,(function(t,a){for(var r=0,n=e.length,i=t;r<n-1;){var o=e[r];if("__proto__"===o||"constructor"===o||"prototype"===o)return t;i=i[e[r++]]}i[e[r]]=a}))},getter:function(t,e){var a=Yz(t);return qz.get(t)||qz.set(t,(function(t){for(var r=0,n=a.length;r<n;){if(null==t&&e)return;t=t[a[r++]]}return t}))},join:function(t){return t.reduce((function(t,e){return t+(Jz(e)||Pz.test(e)?"["+e+"]":(t?".":"")+e)}),"")},forEach:function(t,e,a){!function(t,e,a){var r,n,i,o,l=t.length;for(n=0;n<l;n++)(r=t[n])&&(Zz(r)&&(r='"'+r+'"'),i=!(o=Jz(r))&&/^\d+$/.test(r),e.call(a,r,o,i,n,t))}(Array.isArray(t)?t:Kz(t),e,a)}};function Yz(t){return Uz.get(t)||Uz.set(t,Kz(t).map((function(t){return t.replace($z,"$2")})))}function Kz(t){return t.match(Iz)}function Jz(t){return"string"==typeof t&&t&&-1!==["'",'"'].indexOf(t.charAt(0))}function Zz(t){return!Jz(t)&&(function(t){return t.match(Rz)&&!t.match(Pz)}(t)||function(t){return Nz.test(t)}(t))}var Xz="$",Qz=".",tx=function(){function t(t,e){if(void 0===e&&(e={}),"string"!=typeof t)throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),""===t)throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===Xz,this.isValue=this.key[0]===Qz,this.isSibling=!this.isContext&&!this.isValue;var a=this.isContext?Xz:this.isValue?Qz:"";this.path=this.key.slice(a.length),this.getter=this.path&&Gz.getter(this.path,!0),this.map=e.map}var e=t.prototype;return e.getValue=function(t){var e=this.isContext?t.context:this.isValue?t.value:t.parent;return this.getter&&(e=this.getter(e||{})),this.map&&(e=this.map(e)),e},e.cast=function(t,e){return this.getValue(ff({},e,{value:t}))},e.resolve=function(){return this},e.describe=function(){return{type:"ref",key:this.key}},e.toString=function(){return"Ref("+this.key+")"},t.isRef=function(t){return t&&t.__isYupRef},t}();tx.prototype.__isYupRef=!0;var ex=lz.formatError;function ax(t){var e=t.value,a=t.label,r=t.resolve,n=t.originalValue,i=Zb(t,["value","label","resolve","originalValue"]);return function(t){var o=void 0===t?{}:t,l=o.path,s=void 0===l?i.path:l,c=o.message,h=void 0===c?i.message:c,u=o.type,d=void 0===u?i.name:u,p=o.params;return p=ff({path:s,value:e,originalValue:n,label:a},function(t,e,a){return jz(ff({},t,e),a)}(i.params,p,r)),ff(new lz(ex(h,p),e,s,d),{params:p})}}function rx(t){var e=t.name,a=t.message,r=t.test,n=t.params;function i(t){var i=t.value,o=t.path,l=t.label,s=t.options,c=t.originalValue,h=t.sync,u=Zb(t,["value","path","label","options","originalValue","sync"]),d=s.parent,p=function(t){return tx.isRef(t)?t.getValue({value:i,parent:d,context:s.context}):t},m=ax({message:a,path:o,value:i,originalValue:c,params:n,label:l,resolve:p,name:e}),v=ff({path:o,parent:d,type:e,createError:m,resolve:p,options:s},u);return function(t,e,a,r){var n,i=t.call(e,a);if(!r)return Promise.resolve(i);if((n=i)&&"function"==typeof n.then&&"function"==typeof n.catch)throw new Error('Validation test of type: "'+e.type+'" returned a Promise during a synchronous validate. This test will finish after the validate call has returned');return nz.SynchronousPromise.resolve(i)}(r,v,i,h).then((function(t){if(lz.isError(t))throw t;if(!t)throw m()}))}return i.OPTIONS=t,i}function nx(t,e){var a;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(a=function(t,e){if(!t)return;if("string"==typeof t)return ix(t,e);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return ix(t,e)}(t))||e&&t&&"number"==typeof t.length){a&&(t=a);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(a=t[Symbol.iterator]()).next.bind(a)}function ix(t,e){(null==e||e>t.length)&&(e=t.length);for(var a=0,r=new Array(e);a<e;a++)r[a]=t[a];return r}var ox=function(){function t(){this.list=new Set,this.refs=new Map}var e,a,r,n=t.prototype;return n.describe=function(){for(var t,e=[],a=nx(this.list);!(t=a()).done;){var r=t.value;e.push(r)}for(var n,i=nx(this.refs);!(n=i()).done;){var o=n.value[1];e.push(o.describe())}return e},n.toArray=function(){return pb(this.list).concat(pb(this.refs.values()))},n.add=function(t){tx.isRef(t)?this.refs.set(t.key,t):this.list.add(t)},n.delete=function(t){tx.isRef(t)?this.refs.delete(t.key):this.list.delete(t)},n.has=function(t,e){if(this.list.has(t))return!0;for(var a,r=this.refs.values();!(a=r.next()).done;)if(e(a.value)===t)return!0;return!1},n.clone=function(){var e=new t;return e.list=new Set(this.list),e.refs=new Map(this.refs),e},n.merge=function(t,e){var a=this.clone();return t.list.forEach((function(t){return a.add(t)})),t.refs.forEach((function(t){return a.add(t)})),e.list.forEach((function(t){return a.delete(t)})),e.refs.forEach((function(t){return a.delete(t)})),a},e=t,(a=[{key:"size",get:function(){return this.list.size+this.refs.size}}])&&yf(e.prototype,a),r&&yf(e,r),t}();function lx(t){var e=this;if(void 0===t&&(t={}),!(this instanceof lx))return new lx;this._deps=[],this._conditions=[],this._options={abortEarly:!0,recursive:!0},this._exclusive=Object.create(null),this._whitelist=new ox,this._blacklist=new ox,this.tests=[],this.transforms=[],this.withMutation((function(){e.typeError(Ab)})),Cy(t,"default")&&(this._defaultDefault=t.default),this.type=t.type||"mixed",this._type=t.type||"mixed"}for(var sx=lx.prototype={__isYupSchema__:!0,constructor:lx,clone:function(){var t=this;return this._mutate?this:Kg(this,(function(e){if(Kb(e)&&e!==t)return e}))},label:function(t){var e=this.clone();return e._label=t,e},meta:function(t){if(0===arguments.length)return this._meta;var e=this.clone();return e._meta=ff(e._meta||{},t),e},withMutation:function(t){var e=this._mutate;this._mutate=!0;var a=t(this);return this._mutate=e,a},concat:function(t){if(!t||t===this)return this;if(t._type!==this._type&&"mixed"!==this._type)throw new TypeError("You cannot `concat()` schema's of different types: "+this._type+" and "+t._type);var e=pz(t.clone(),this);return Cy(t,"_default")&&(e._default=t._default),e.tests=this.tests,e._exclusive=this._exclusive,e._whitelist=this._whitelist.merge(t._whitelist,t._blacklist),e._blacklist=this._blacklist.merge(t._blacklist,t._whitelist),e.withMutation((function(e){t.tests.forEach((function(t){e.test(t.OPTIONS)}))})),e},isType:function(t){return!(!this._nullable||null!==t)||(!this._typeCheck||this._typeCheck(t))},resolve:function(t){var e=this;if(e._conditions.length){var a=e._conditions;(e=e.clone())._conditions=[],e=(e=a.reduce((function(e,a){return a.resolve(e,t)}),e)).resolve(t)}return e},cast:function(t,e){void 0===e&&(e={});var a=this.resolve(ff({},e,{value:t})),r=a._cast(t,e);if(void 0!==t&&!1!==e.assert&&!0!==a.isType(r)){var n=zb(t),i=zb(r);throw new TypeError("The value of "+(e.path||"field")+' could not be cast to a value that satisfies the schema type: "'+a._type+'". \n\nattempted value: '+n+" \n"+(i!==n?"result of cast: "+i:""))}return r},_cast:function(t){var e=this,a=void 0===t?t:this.transforms.reduce((function(a,r){return r.call(e,a,t)}),t);return void 0===a&&Cy(this,"_default")&&(a=this.default()),a},_validate:function(t,e){var a=this;void 0===e&&(e={});var r=t,n=null!=e.originalValue?e.originalValue:t,i=this._option("strict",e),o=this._option("abortEarly",e),l=e.sync,s=e.path,c=this._label;i||(r=this._cast(r,ff({assert:!1},e)));var h={value:r,path:s,schema:this,options:e,label:c,originalValue:n,sync:l};e.from&&(h.from=e.from);var u=[];return this._typeError&&u.push(this._typeError(h)),this._whitelistError&&u.push(this._whitelistError(h)),this._blacklistError&&u.push(this._blacklistError(h)),uz({validations:u,endEarly:o,value:r,path:s,sync:l}).then((function(t){return uz({path:s,sync:l,value:t,endEarly:o,validations:a.tests.map((function(t){return t(h)}))})}))},validate:function(t,e){return void 0===e&&(e={}),this.resolve(ff({},e,{value:t}))._validate(t,e)},validateSync:function(t,e){var a,r;if(void 0===e&&(e={}),this.resolve(ff({},e,{value:t}))._validate(t,ff({},e,{sync:!0})).then((function(t){return a=t})).catch((function(t){return r=t})),r)throw r;return a},isValid:function(t,e){return this.validate(t,e).then((function(){return!0})).catch((function(t){if("ValidationError"===t.name)return!1;throw t}))},isValidSync:function(t,e){try{return this.validateSync(t,e),!0}catch(a){if("ValidationError"===a.name)return!1;throw a}},getDefault:function(t){return void 0===t&&(t={}),this.resolve(t).default()},default:function(t){if(0===arguments.length){var e=Cy(this,"_default")?this._default:this._defaultDefault;return"function"==typeof e?e.call(this):Kg(e)}var a=this.clone();return a._default=t,a},strict:function(t){void 0===t&&(t=!0);var e=this.clone();return e._options.strict=t,e},_isPresent:function(t){return null!=t},required:function(t){return void 0===t&&(t=wb),this.test({message:t,name:"required",exclusive:!0,test:function(t){return this.schema._isPresent(t)}})},notRequired:function(){var t=this.clone();return t.tests=t.tests.filter((function(t){return"required"!==t.OPTIONS.name})),t},nullable:function(t){void 0===t&&(t=!0);var e=this.clone();return e._nullable=t,e},transform:function(t){var e=this.clone();return e.transforms.push(t),e},test:function(){var t;if(void 0===(t=1===arguments.length?"function"==typeof(arguments.length<=0?void 0:arguments[0])?{test:arguments.length<=0?void 0:arguments[0]}:arguments.length<=0?void 0:arguments[0]:2===arguments.length?{name:arguments.length<=0?void 0:arguments[0],test:arguments.length<=1?void 0:arguments[1]}:{name:arguments.length<=0?void 0:arguments[0],message:arguments.length<=1?void 0:arguments[1],test:arguments.length<=2?void 0:arguments[2]}).message&&(t.message=xb),"function"!=typeof t.test)throw new TypeError("`test` is a required parameters");var e=this.clone(),a=rx(t),r=t.exclusive||t.name&&!0===e._exclusive[t.name];if(t.exclusive&&!t.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return e._exclusive[t.name]=!!t.exclusive,e.tests=e.tests.filter((function(e){if(e.OPTIONS.name===t.name){if(r)return!1;if(e.OPTIONS.test===a.OPTIONS.test)return!1}return!0})),e.tests.push(a),e},when:function(t,e){1===arguments.length&&(e=t,t=".");var a=this.clone(),r=[].concat(t).map((function(t){return new tx(t)}));return r.forEach((function(t){t.isSibling&&a._deps.push(t.key)})),a._conditions.push(new Jb(r,e)),a},typeError:function(t){var e=this.clone();return e._typeError=rx({message:t,name:"typeError",test:function(t){return!(void 0!==t&&!this.schema.isType(t))||this.createError({params:{type:this.schema._type}})}}),e},oneOf:function(t,e){void 0===e&&(e=Mb);var a=this.clone();return t.forEach((function(t){a._whitelist.add(t),a._blacklist.delete(t)})),a._whitelistError=rx({message:e,name:"oneOf",test:function(t){if(void 0===t)return!0;var e=this.schema._whitelist;return!!e.has(t,this.resolve)||this.createError({params:{values:e.toArray().join(", ")}})}}),a},notOneOf:function(t,e){void 0===e&&(e=_b);var a=this.clone();return t.forEach((function(t){a._blacklist.add(t),a._whitelist.delete(t)})),a._blacklistError=rx({message:e,name:"notOneOf",test:function(t){var e=this.schema._blacklist;return!e.has(t,this.resolve)||this.createError({params:{values:e.toArray().join(", ")}})}}),a},strip:function(t){void 0===t&&(t=!0);var e=this.clone();return e._strip=t,e},_option:function(t,e){return Cy(e,t)?e[t]:this._options[t]},describe:function(){var t=this.clone(),e={type:t._type,meta:t._meta,label:t._label,tests:t.tests.map((function(t){return{name:t.OPTIONS.name,params:t.OPTIONS.params}})).filter((function(t,e,a){return a.findIndex((function(e){return e.name===t.name}))===e}))};return t._whitelist.size&&(e.oneOf=t._whitelist.describe()),t._blacklist.size&&(e.notOneOf=t._blacklist.describe()),e},defined:function(t){return void 0===t&&(t=Hb),this.nullable().test({message:t,name:"defined",exclusive:!0,test:function(t){return void 0!==t}})}},cx=function(){var t=ux[hx];sx[t+"At"]=function(e,a,r){void 0===r&&(r={});var n=function(t,e,a,r){var n,i,o;return void 0===r&&(r=a),e?(Gz.forEach(e,(function(l,s,c){var h=s?function(t){return t.substr(0,t.length-1).substr(1)}(l):l;if((t=t.resolve({context:r,parent:n,value:a})).innerType){var u=c?parseInt(h,10):0;if(a&&u>=a.length)throw new Error("Yup.reach cannot resolve an array item at index: "+l+", in the path: "+e+". because there is no value at that index. ");n=a,a=a&&a[u],t=t.innerType}if(!c){if(!t.fields||!t.fields[h])throw new Error("The schema does not contain the path: "+e+". (failed at: "+o+' which is a type: "'+t._type+'")');n=a,a=a&&a[h],t=t.fields[h]}i=h,o=s?"["+l+"]":"."+l})),{schema:t,parent:n,parentPath:i}):{parent:n,parentPath:e,schema:t}}(this,e,a,r.context),i=n.parent,o=n.parentPath;return n.schema[t](i&&i[o],ff({},r,{parent:i,path:e}))}},hx=0,ux=["validate","validateSync"];hx<ux.length;hx++)cx();for(var dx=0,px=["equals","is"];dx<px.length;dx++){sx[px[dx]]=sx.oneOf}for(var mx=0,vx=["not","nope"];mx<vx.length;mx++){sx[vx[mx]]=sx.notOneOf}function fx(t,e,a){t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),ff(t.prototype,a)}sx.optional=sx.notRequired,fx((function t(){var e=this;if(!(this instanceof t))return new t;lx.call(this,{type:"boolean"}),this.withMutation((function(){e.transform((function(t){if(!this.isType(t)){if(/^(true|1)$/i.test(t))return!0;if(/^(false|0)$/i.test(t))return!1}return t}))}))}),lx,{_typeCheck:function(t){return t instanceof Boolean&&(t=t.valueOf()),"boolean"==typeof t}});var yx=function(t){return null==t},gx=/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i,bx=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,zx=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$/i,xx=function(t){return yx(t)||t===t.trim()};function wx(){var t=this;if(!(this instanceof wx))return new wx;lx.call(this,{type:"string"}),this.withMutation((function(){t.transform((function(t){return this.isType(t)?t:null!=t&&t.toString?t.toString():t}))}))}fx(wx,lx,{_typeCheck:function(t){return t instanceof String&&(t=t.valueOf()),"string"==typeof t},_isPresent:function(t){return lx.prototype._isPresent.call(this,t)&&t.length>0},length:function(t,e){return void 0===e&&(e=Vb),this.test({message:e,name:"length",exclusive:!0,params:{length:t},test:function(e){return yx(e)||e.length===this.resolve(t)}})},min:function(t,e){return void 0===e&&(e=Lb),this.test({message:e,name:"min",exclusive:!0,params:{min:t},test:function(e){return yx(e)||e.length>=this.resolve(t)}})},max:function(t,e){return void 0===e&&(e=Bb),this.test({name:"max",exclusive:!0,message:e,params:{max:t},test:function(e){return yx(e)||e.length<=this.resolve(t)}})},matches:function(t,e){var a,r,n=!1;return e&&("object"==typeof e?(n=e.excludeEmptyString,a=e.message,r=e.name):a=e),this.test({name:r||"matches",message:a||kb,params:{regex:t},test:function(e){return yx(e)||""===e&&n||-1!==e.search(t)}})},email:function(t){return void 0===t&&(t=Cb),this.matches(gx,{name:"email",message:t,excludeEmptyString:!0})},url:function(t){return void 0===t&&(t=Sb),this.matches(bx,{name:"url",message:t,excludeEmptyString:!0})},uuid:function(t){return void 0===t&&(t=Eb),this.matches(zx,{name:"uuid",message:t,excludeEmptyString:!1})},ensure:function(){return this.default("").transform((function(t){return null===t?"":t}))},trim:function(t){return void 0===t&&(t=Ob),this.transform((function(t){return null!=t?t.trim():t})).test({message:t,name:"trim",test:xx})},lowercase:function(t){return void 0===t&&(t=Tb),this.transform((function(t){return yx(t)?t:t.toLowerCase()})).test({message:t,name:"string_case",exclusive:!0,test:function(t){return yx(t)||t===t.toLowerCase()}})},uppercase:function(t){return void 0===t&&(t=Db),this.transform((function(t){return yx(t)?t:t.toUpperCase()})).test({message:t,name:"string_case",exclusive:!0,test:function(t){return yx(t)||t===t.toUpperCase()}})}});fx((function t(){var e=this;if(!(this instanceof t))return new t;lx.call(this,{type:"number"}),this.withMutation((function(){e.transform((function(t){var e=t;if("string"==typeof e){if(""===(e=e.replace(/\s/g,"")))return NaN;e=+e}return this.isType(e)?e:parseFloat(e)}))}))}),lx,{_typeCheck:function(t){return t instanceof Number&&(t=t.valueOf()),"number"==typeof t&&!function(t){return t!=+t}(t)},min:function(t,e){return void 0===e&&(e=jb),this.test({message:e,name:"min",exclusive:!0,params:{min:t},test:function(e){return yx(e)||e>=this.resolve(t)}})},max:function(t,e){return void 0===e&&(e=Fb),this.test({message:e,name:"max",exclusive:!0,params:{max:t},test:function(e){return yx(e)||e<=this.resolve(t)}})},lessThan:function(t,e){return void 0===e&&(e=Ib),this.test({message:e,name:"max",exclusive:!0,params:{less:t},test:function(e){return yx(e)||e<this.resolve(t)}})},moreThan:function(t,e){return void 0===e&&(e=Pb),this.test({message:e,name:"min",exclusive:!0,params:{more:t},test:function(e){return yx(e)||e>this.resolve(t)}})},positive:function(t){return void 0===t&&(t=Rb),this.moreThan(0,t)},negative:function(t){return void 0===t&&(t=Nb),this.lessThan(0,t)},integer:function(t){return void 0===t&&(t=$b),this.test({name:"integer",message:t,test:function(t){return yx(t)||Number.isInteger(t)}})},truncate:function(){return this.transform((function(t){return yx(t)?t:0|t}))},round:function(t){var e=["ceil","floor","round","trunc"];if("trunc"===(t=t&&t.toLowerCase()||"round"))return this.truncate();if(-1===e.indexOf(t.toLowerCase()))throw new TypeError("Only valid options for round() are: "+e.join(", "));return this.transform((function(e){return yx(e)?e:Math[t](e)}))}});var Mx=/^(\d{4}|[+\-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;var _x=new Date("");function Ax(t,e){return e||(e=t.slice(0)),t.raw=e,t}fx((function t(){var e=this;if(!(this instanceof t))return new t;lx.call(this,{type:"date"}),this.withMutation((function(){e.transform((function(t){return this.isType(t)?t:(t=function(t){var e,a,r=[1,4,5,6,7,10,11],n=0;if(a=Mx.exec(t)){for(var i,o=0;i=r[o];++o)a[i]=+a[i]||0;a[2]=(+a[2]||1)-1,a[3]=+a[3]||1,a[7]=a[7]?String(a[7]).substr(0,3):0,void 0!==a[8]&&""!==a[8]||void 0!==a[9]&&""!==a[9]?("Z"!==a[8]&&void 0!==a[9]&&(n=60*a[10]+a[11],"+"===a[9]&&(n=0-n)),e=Date.UTC(a[1],a[2],a[3],a[4],a[5]+n,a[6],a[7])):e=+new Date(a[1],a[2],a[3],a[4],a[5],a[6],a[7])}else e=Date.parse?Date.parse(t):NaN;return e}(t),isNaN(t)?_x:new Date(t))}))}))}),lx,{_typeCheck:function(t){return e=t,"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(t.getTime());var e},min:function(t,e){void 0===e&&(e=Ub);var a=t;if(!tx.isRef(a)&&(a=this.cast(t),!this._typeCheck(a)))throw new TypeError("`min` must be a Date or a value that can be `cast()` to a Date");return this.test({message:e,name:"min",exclusive:!0,params:{min:t},test:function(t){return yx(t)||t>=this.resolve(a)}})},max:function(t,e){void 0===e&&(e=Wb);var a=t;if(!tx.isRef(a)&&(a=this.cast(t),!this._typeCheck(a)))throw new TypeError("`max` must be a Date or a value that can be `cast()` to a Date");return this.test({message:e,name:"max",exclusive:!0,params:{max:t},test:function(t){return yx(t)||t<=this.resolve(a)}})}});var Hx,Vx=(Hx={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"},function(t){return null==Hx?void 0:Hx[t]}),Lx=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Bx=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var kx=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var Cx=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var Sx="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ex="["+Sx+"]",Ox="\\d+",Tx="[\\u2700-\\u27bf]",Dx="[a-z\\xdf-\\xf6\\xf8-\\xff]",jx="[^\\ud800-\\udfff"+Sx+Ox+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",Fx="(?:\\ud83c[\\udde6-\\uddff]){2}",Ix="[\\ud800-\\udbff][\\udc00-\\udfff]",Px="[A-Z\\xc0-\\xd6\\xd8-\\xde]",Rx="(?:"+Dx+"|"+jx+")",Nx="(?:"+Px+"|"+jx+")",$x="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",Ux="[\\ufe0e\\ufe0f]?"+$x+("(?:\\u200d(?:"+["[^\\ud800-\\udfff]",Fx,Ix].join("|")+")[\\ufe0e\\ufe0f]?"+$x+")*"),Wx="(?:"+[Tx,Fx,Ix].join("|")+")"+Ux,qx=RegExp([Px+"?"+Dx+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[Ex,Px,"$"].join("|")+")",Nx+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[Ex,Px+Rx,"$"].join("|")+")",Px+"?"+Rx+"+(?:['’](?:d|ll|m|re|s|t|ve))?",Px+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ox,Wx].join("|"),"g");function Gx(t,e,a){return t=by(t),void 0===(e=a?void 0:e)?function(t){return Cx.test(t)}(t)?function(t){return t.match(qx)||[]}(t):function(t){return t.match(kx)||[]}(t):t.match(e)||[]}var Yx=RegExp("['’]","g");function Kx(t){return function(e){return function(t,e,a,r){var n=-1,i=null==t?0:t.length;for(r&&i&&(a=t[++n]);++n<i;)a=e(a,t[n],n,t);return a}(Gx(function(t){return(t=by(t))&&t.replace(Lx,Vx).replace(Bx,"")}(e).replace(Yx,"")),t,"")}}var Jx=Kx((function(t,e,a){return t+(a?"_":"")+e.toLowerCase()}));function Zx(t,e,a){var r=t.length;return a=void 0===a?r:a,!e&&a>=r?t:function(t,e,a){var r=-1,n=t.length;e<0&&(e=-e>n?0:n+e),(a=a>n?n:a)<0&&(a+=n),n=e>a?0:a-e>>>0,e>>>=0;for(var i=Array(n);++r<n;)i[r]=t[r+e];return i}(t,e,a)}var Xx,Qx=(Xx="toUpperCase",function(t){var e=Qg(t=by(t))?hb(t):void 0,a=e?e[0]:t.charAt(0),r=e?Zx(e,1).join(""):t.slice(1);return a[Xx]()+r});var tw=Kx((function(t,e,a){return e=e.toLowerCase(),t+(a?function(t){return Qx(by(t).toLowerCase())}(e):e)}));var ew=function(t){return aw(function(t){for(var e=new Set,a=0,r=t.length;a<r;a++){var n=t[a];e.add(n[0]),e.add(n[1])}return Array.from(e)}(t),t)};function aw(t,e){var a=t.length,r=new Array(a),n={},i=a,o=function(t){for(var e=new Map,a=0,r=t.length;a<r;a++){var n=t[a];e.has(n[0])||e.set(n[0],new Set),e.has(n[1])||e.set(n[1],new Set),e.get(n[0]).add(n[1])}return e}(e),l=function(t){for(var e=new Map,a=0,r=t.length;a<r;a++)e.set(t[a],a);return e}(t);for(e.forEach((function(t){if(!l.has(t[0])||!l.has(t[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")}));i--;)n[i]||s(t[i],i,new Set);return r;function s(t,e,i){if(i.has(t)){var c;try{c=", node was:"+JSON.stringify(t)}catch(d){c=""}throw new Error("Cyclic dependency"+c)}if(!l.has(t))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(t));if(!n[e]){n[e]=!0;var h=o.get(t)||new Set;if(e=(h=Array.from(h)).length){i.add(t);do{var u=h[--e];s(u,l.get(u),i)}while(e);i.delete(t)}r[--a]=t}}}function rw(t,e){void 0===e&&(e=[]);var a=[],r=[];function n(t,n){var i=Gz.split(t)[0];~r.indexOf(i)||r.push(i),~e.indexOf(n+"-"+i)||a.push([n,i])}for(var i in t)if(Cy(t,i)){var o=t[i];~r.indexOf(i)||r.push(i),tx.isRef(o)&&o.isSibling?n(o.path,i):Kb(o)&&o._deps&&o._deps.forEach((function(t){return n(t,i)}))}return ew.array(r,a).reverse()}function nw(t,e){var a=1/0;return t.some((function(t,r){if(-1!==e.path.indexOf(t))return a=r,!0})),a}function iw(t){for(var e=arguments.length,a=new Array(e>1?e-1:0),r=1;r<e;r++)a[r-1]=arguments[r];var n=t.reduce((function(t,e){var r=a.shift();return t+(null==r?"":r)+e}));return n.replace(/^\./,"")}function ow(){var t=Ax(["",'["','"]']);return ow=function(){return t},t}function lw(){var t=Ax(["",".",""]);return lw=function(){return t},t}function sw(){var t=Ax(["",".",""]);return sw=function(){return t},t}ew.array=aw;var cw=function(t){return"[object Object]"===Object.prototype.toString.call(t)};function hw(t){var e=this;if(!(this instanceof hw))return new hw(t);lx.call(this,{type:"object",default:function(){var t=this;if(this._nodes.length){var e={};return this._nodes.forEach((function(a){e[a]=t.fields[a].default?t.fields[a].default():void 0})),e}}}),this.fields=Object.create(null),this._nodes=[],this._excludedEdges=[],this.withMutation((function(){e.transform((function(t){if("string"==typeof t)try{t=JSON.parse(t)}catch(e){t=null}return this.isType(t)?t:null})),t&&e.shape(t)}))}function uw(){var t=Ax(["","[","]"]);return uw=function(){return t},t}function dw(){var t=Ax(["","[","]"]);return dw=function(){return t},t}fx(hw,lx,{_typeCheck:function(t){return cw(t)||"function"==typeof t},_cast:function(t,e){var a=this;void 0===e&&(e={});var r=lx.prototype._cast.call(this,t,e);if(void 0===r)return this.default();if(!this._typeCheck(r))return r;var n=this.fields,i=!0===this._option("stripUnknown",e),o=this._nodes.concat(Object.keys(r).filter((function(t){return-1===a._nodes.indexOf(t)}))),l={},s=ff({},e,{parent:l,__validating:e.__validating||!1}),c=!1;return o.forEach((function(t){var a=n[t],o=Cy(r,t);if(a){var h,u=a._options&&a._options.strict;if(s.path=iw(sw(),e.path,t),s.value=r[t],!0===(a=a.resolve(s))._strip)return void(c=c||t in r);void 0!==(h=e.__validating&&u?r[t]:a.cast(r[t],s))&&(l[t]=h)}else o&&!i&&(l[t]=r[t]);l[t]!==r[t]&&(c=!0)})),c?l:r},_validate:function(t,e){var a,r,n=this;void 0===e&&(e={});var i=e.sync,o=[],l=null!=e.originalValue?e.originalValue:t,s=[{schema:this,value:l}].concat(e.from||[]);return a=this._option("abortEarly",e),r=this._option("recursive",e),e=ff({},e,{__validating:!0,originalValue:l,from:s}),lx.prototype._validate.call(this,t,e).catch(cz(a,o)).then((function(t){if(!r||!cw(t)){if(o.length)throw o[0];return t}s=l?[].concat(s):[{schema:n,value:l||t}].concat(e.from||[]),l=l||t;var c,h,u=n._nodes.map((function(a){var r=-1===a.indexOf(".")?iw(lw(),e.path,a):iw(ow(),e.path,a),o=n.fields[a],c=ff({},e,{path:r,from:s,parent:t,originalValue:l[a]});return o&&o.validate?(c.strict=!0,o.validate(t[a],c)):function(t){return t?nz.SynchronousPromise:Promise}(i).resolve(!0)}));return uz({sync:i,validations:u,value:t,errors:o,endEarly:a,path:e.path,sort:(c=n.fields,h=Object.keys(c),function(t,e){return nw(h,t)-nw(h,e)})})}))},concat:function(t){var e=lx.prototype.concat.call(this,t);return e._nodes=rw(e.fields,e._excludedEdges),e},shape:function(t,e){void 0===e&&(e=[]);var a=this.clone(),r=ff(a.fields,t);if(a.fields=r,e.length){Array.isArray(e[0])||(e=[e]);var n=e.map((function(t){return t[0]+"-"+t[1]}));a._excludedEdges=a._excludedEdges.concat(n)}return a._nodes=rw(r,a._excludedEdges),a},from:function(t,e,a){var r=Gz.getter(t,!0);return this.transform((function(n){if(null==n)return n;var i=n;return Cy(n,t)&&(i=ff({},n),a||delete i[t],i[e]=r(n)),i}))},noUnknown:function(t,e){void 0===t&&(t=!0),void 0===e&&(e=qb),"string"==typeof t&&(e=t,t=!0);var a=this.test({name:"noUnknown",exclusive:!0,message:e,test:function(e){if(null==e)return!0;var a=function(t,e){var a=Object.keys(t.fields);return Object.keys(e).filter((function(t){return-1===a.indexOf(t)}))}(this.schema,e);return!t||0===a.length||this.createError({params:{unknown:a.join(", ")}})}});return a._options.stripUnknown=t,a},unknown:function(t,e){return void 0===t&&(t=!0),void 0===e&&(e=qb),this.noUnknown(!t,e)},transformKeys:function(t){return this.transform((function(e){return e&&function(t,e){var a={};return e=Dz(e),fz(t,(function(t,r,n){Oy(a,e(t,r,n),t)})),a}(e,(function(e,a){return t(a)}))}))},camelCase:function(){return this.transformKeys(tw)},snakeCase:function(){return this.transformKeys(Jx)},constantCase:function(){return this.transformKeys((function(t){return Jx(t).toUpperCase()}))},describe:function(){var t=lx.prototype.describe.call(this);return t.fields=jz(this.fields,(function(t){return t.describe()})),t}}),fx((function t(e){var a=this;if(!(this instanceof t))return new t(e);lx.call(this,{type:"array"}),this._subType=void 0,this.innerType=void 0,this.withMutation((function(){a.transform((function(t){if("string"==typeof t)try{t=JSON.parse(t)}catch(e){t=null}return this.isType(t)?t:null})),e&&a.of(e)}))}),lx,{_typeCheck:function(t){return Array.isArray(t)},_cast:function(t,e){var a=this,r=lx.prototype._cast.call(this,t,e);if(!this._typeCheck(r)||!this.innerType)return r;var n=!1,i=r.map((function(t,r){var i=a.innerType.cast(t,ff({},e,{path:iw(dw(),e.path,r)}));return i!==t&&(n=!0),i}));return n?i:r},_validate:function(t,e){var a=this;void 0===e&&(e={});var r=[],n=e.sync,i=e.path,o=this.innerType,l=this._option("abortEarly",e),s=this._option("recursive",e),c=null!=e.originalValue?e.originalValue:t;return lx.prototype._validate.call(this,t,e).catch(cz(l,r)).then((function(t){if(!s||!o||!a._typeCheck(t)){if(r.length)throw r[0];return t}c=c||t;for(var h=new Array(t.length),u=0;u<t.length;u++){var d=t[u],p=iw(uw(),e.path,u),m=ff({},e,{path:p,strict:!0,parent:t,index:u,originalValue:c[u]});h[u]=!o.validate||o.validate(d,m)}return uz({sync:n,path:i,value:t,errors:r,endEarly:l,validations:h})}))},_isPresent:function(t){return lx.prototype._isPresent.call(this,t)&&t.length>0},of:function(t){var e=this.clone();if(!1!==t&&!Kb(t))throw new TypeError("`array.of()` sub-schema must be a valid yup schema, or `false` to negate a current sub-schema. not: "+zb(t));return e._subType=t,e.innerType=t,e},min:function(t,e){return e=e||Gb,this.test({message:e,name:"min",exclusive:!0,params:{min:t},test:function(e){return yx(e)||e.length>=this.resolve(t)}})},max:function(t,e){return e=e||Yb,this.test({message:e,name:"max",exclusive:!0,params:{max:t},test:function(e){return yx(e)||e.length<=this.resolve(t)}})},ensure:function(){var t=this;return this.default((function(){return[]})).transform((function(e,a){return t._typeCheck(e)?e:null==a?[]:[].concat(a)}))},compact:function(t){var e=t?function(e,a,r){return!t(e,a,r)}:function(t){return!!t};return this.transform((function(t){return null!=t?t.filter(e):t}))},describe:function(){var t=lx.prototype.describe.call(this);return this.innerType&&(t.innerType=this.innerType.describe()),t}});var pw=Object.prototype.hasOwnProperty,mw=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),vw=function(t,e){for(var a=e&&e.plainObjects?Object.create(null):{},r=0;r<t.length;++r)void 0!==t[r]&&(a[r]=t[r]);return a},fw={arrayToObject:vw,assign:function(t,e){return Object.keys(e).reduce((function(t,a){return t[a]=e[a],t}),t)},compact:function(t){for(var e=[{obj:{o:t},prop:"o"}],a=[],r=0;r<e.length;++r)for(var n=e[r],i=n.obj[n.prop],o=Object.keys(i),l=0;l<o.length;++l){var s=o[l],c=i[s];"object"==typeof c&&null!==c&&-1===a.indexOf(c)&&(e.push({obj:i,prop:s}),a.push(c))}return function(t){for(var e;t.length;){var a=t.pop();if(e=a.obj[a.prop],Array.isArray(e)){for(var r=[],n=0;n<e.length;++n)void 0!==e[n]&&r.push(e[n]);a.obj[a.prop]=r}}return e}(e)},decode:function(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(e){return t}},encode:function(t){if(0===t.length)return t;for(var e="string"==typeof t?t:String(t),a="",r=0;r<e.length;++r){var n=e.charCodeAt(r);45===n||46===n||95===n||126===n||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122?a+=e.charAt(r):n<128?a+=mw[n]:n<2048?a+=mw[192|n>>6]+mw[128|63&n]:n<55296||n>=57344?a+=mw[224|n>>12]+mw[128|n>>6&63]+mw[128|63&n]:(r+=1,n=65536+((1023&n)<<10|1023&e.charCodeAt(r)),a+=mw[240|n>>18]+mw[128|n>>12&63]+mw[128|n>>6&63]+mw[128|63&n])}return a},isBuffer:function(t){return null!=t&&!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},merge:function t(e,a,r){if(!a)return e;if("object"!=typeof a){if(Array.isArray(e))e.push(a);else{if("object"!=typeof e)return[e,a];(r.plainObjects||r.allowPrototypes||!pw.call(Object.prototype,a))&&(e[a]=!0)}return e}if("object"!=typeof e)return[e].concat(a);var n=e;return Array.isArray(e)&&!Array.isArray(a)&&(n=vw(e,r)),Array.isArray(e)&&Array.isArray(a)?(a.forEach((function(a,n){pw.call(e,n)?e[n]&&"object"==typeof e[n]?e[n]=t(e[n],a,r):e.push(a):e[n]=a})),e):Object.keys(a).reduce((function(e,n){var i=a[n];return pw.call(e,n)?e[n]=t(e[n],i,r):e[n]=i,e}),n)}},yw=String.prototype.replace,gw=/%20/g,bw={default:"RFC3986",formatters:{RFC1738:function(t){return yw.call(t,gw,"+")},RFC3986:function(t){return t}},RFC1738:"RFC1738",RFC3986:"RFC3986"},zw={brackets:function(t){return t+"[]"},indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},xw=Date.prototype.toISOString,ww={delimiter:"&",encode:!0,encoder:fw.encode,encodeValuesOnly:!1,serializeDate:function(t){return xw.call(t)},skipNulls:!1,strictNullHandling:!1},Mw=function t(e,a,r,n,i,o,l,s,c,h,u,d){var p=e;if("function"==typeof l)p=l(a,p);else if(p instanceof Date)p=h(p);else if(null===p){if(n)return o&&!d?o(a,ww.encoder):a;p=""}if("string"==typeof p||"number"==typeof p||"boolean"==typeof p||fw.isBuffer(p))return o?[u(d?a:o(a,ww.encoder))+"="+u(o(p,ww.encoder))]:[u(a)+"="+u(String(p))];var m,v=[];if(void 0===p)return v;if(Array.isArray(l))m=l;else{var f=Object.keys(p);m=s?f.sort(s):f}for(var y=0;y<m.length;++y){var g=m[y];i&&null===p[g]||(v=Array.isArray(p)?v.concat(t(p[g],r(a,g),r,n,i,o,l,s,c,h,u,d)):v.concat(t(p[g],a+(c?"."+g:"["+g+"]"),r,n,i,o,l,s,c,h,u,d)))}return v},_w=Object.prototype.hasOwnProperty,Aw={allowDots:!1,allowPrototypes:!1,arrayLimit:20,decoder:fw.decode,delimiter:"&",depth:5,parameterLimit:1e3,plainObjects:!1,strictNullHandling:!1},Hw=function(t,e,a){if(t){var r=a.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,n=/(\[[^[\]]*])/g,i=/(\[[^[\]]*])/.exec(r),o=i?r.slice(0,i.index):r,l=[];if(o){if(!a.plainObjects&&_w.call(Object.prototype,o)&&!a.allowPrototypes)return;l.push(o)}for(var s=0;null!==(i=n.exec(r))&&s<a.depth;){if(s+=1,!a.plainObjects&&_w.call(Object.prototype,i[1].slice(1,-1))&&!a.allowPrototypes)return;l.push(i[1])}return i&&l.push("["+r.slice(i.index)+"]"),function(t,e,a){for(var r=e,n=t.length-1;n>=0;--n){var i,o=t[n];if("[]"===o)i=(i=[]).concat(r);else{i=a.plainObjects?Object.create(null):{};var l="["===o.charAt(0)&&"]"===o.charAt(o.length-1)?o.slice(1,-1):o,s=parseInt(l,10);!isNaN(s)&&o!==l&&String(s)===l&&s>=0&&a.parseArrays&&s<=a.arrayLimit?(i=[])[s]=r:i[l]=r}r=i}return r}(l,e,a)}},Vw={formats:bw,parse:function(t,e){var a=e?fw.assign({},e):{};if(null!==a.decoder&&void 0!==a.decoder&&"function"!=typeof a.decoder)throw new TypeError("Decoder has to be a function.");if(a.ignoreQueryPrefix=!0===a.ignoreQueryPrefix,a.delimiter="string"==typeof a.delimiter||fw.isRegExp(a.delimiter)?a.delimiter:Aw.delimiter,a.depth="number"==typeof a.depth?a.depth:Aw.depth,a.arrayLimit="number"==typeof a.arrayLimit?a.arrayLimit:Aw.arrayLimit,a.parseArrays=!1!==a.parseArrays,a.decoder="function"==typeof a.decoder?a.decoder:Aw.decoder,a.allowDots="boolean"==typeof a.allowDots?a.allowDots:Aw.allowDots,a.plainObjects="boolean"==typeof a.plainObjects?a.plainObjects:Aw.plainObjects,a.allowPrototypes="boolean"==typeof a.allowPrototypes?a.allowPrototypes:Aw.allowPrototypes,a.parameterLimit="number"==typeof a.parameterLimit?a.parameterLimit:Aw.parameterLimit,a.strictNullHandling="boolean"==typeof a.strictNullHandling?a.strictNullHandling:Aw.strictNullHandling,""===t||null==t)return a.plainObjects?Object.create(null):{};for(var r="string"==typeof t?function(t,e){for(var a={},r=e.ignoreQueryPrefix?t.replace(/^\?/,""):t,n=e.parameterLimit===1/0?void 0:e.parameterLimit,i=r.split(e.delimiter,n),o=0;o<i.length;++o){var l,s,c=i[o],h=c.indexOf("]="),u=-1===h?c.indexOf("="):h+1;-1===u?(l=e.decoder(c,Aw.decoder),s=e.strictNullHandling?null:""):(l=e.decoder(c.slice(0,u),Aw.decoder),s=e.decoder(c.slice(u+1),Aw.decoder)),_w.call(a,l)?a[l]=[].concat(a[l]).concat(s):a[l]=s}return a}(t,a):t,n=a.plainObjects?Object.create(null):{},i=Object.keys(r),o=0;o<i.length;++o){var l=i[o],s=Hw(l,r[l],a);n=fw.merge(n,s,a)}return fw.compact(n)},stringify:function(t,e){var a=t,r=e?fw.assign({},e):{};if(null!==r.encoder&&void 0!==r.encoder&&"function"!=typeof r.encoder)throw new TypeError("Encoder has to be a function.");var n=void 0===r.delimiter?ww.delimiter:r.delimiter,i="boolean"==typeof r.strictNullHandling?r.strictNullHandling:ww.strictNullHandling,o="boolean"==typeof r.skipNulls?r.skipNulls:ww.skipNulls,l="boolean"==typeof r.encode?r.encode:ww.encode,s="function"==typeof r.encoder?r.encoder:ww.encoder,c="function"==typeof r.sort?r.sort:null,h=void 0!==r.allowDots&&r.allowDots,u="function"==typeof r.serializeDate?r.serializeDate:ww.serializeDate,d="boolean"==typeof r.encodeValuesOnly?r.encodeValuesOnly:ww.encodeValuesOnly;if(void 0===r.format)r.format=bw.default;else if(!Object.prototype.hasOwnProperty.call(bw.formatters,r.format))throw new TypeError("Unknown format option provided.");var p,m,v=bw.formatters[r.format];"function"==typeof r.filter?a=(m=r.filter)("",a):Array.isArray(r.filter)&&(p=m=r.filter);var f,y=[];if("object"!=typeof a||null===a)return"";f=r.arrayFormat in zw?r.arrayFormat:"indices"in r?r.indices?"indices":"repeat":"indices";var g=zw[f];p||(p=Object.keys(a)),c&&p.sort(c);for(var b=0;b<p.length;++b){var z=p[b];o&&null===a[z]||(y=y.concat(Mw(a[z],z,g,i,o,l?s:null,m,c,h,u,v,d)))}var x=y.join(n),w=!0===r.addQueryPrefix?"?":"";return x.length>0?w+x:""}};export{rt as $,Ut as A,Wt as B,x as C,I as D,K as E,$ as F,p as G,xt as H,_t as I,at as J,J as K,Ht as L,le as M,Ot as N,V as O,N as P,j as Q,m as R,o as S,Et as T,Zt as U,Ga as V,q as W,U as X,_ as Y,Za as Z,Ya as _,l as a,wt as a0,Mt as a1,St as a2,Kt as a3,qa as a4,Jt as a5,ie as a6,oe as a7,M as a8,h as a9,Ls as aA,Cs as aB,cm as aC,Je as aD,Xe as aE,hm as aF,um as aG,f as aH,Ze as aI,ae as aJ,zt as aK,st as aL,mf as aM,W as aN,Xt as aO,Qt as aP,qe as aQ,ea as aR,te as aS,wx as aT,lx as aU,hw as aV,We as aW,Ua as aX,za as aY,Vw as aZ,w as aa,Ve as ab,g as ac,vt as ad,ft as ae,mt as af,ne as ag,Xa as ah,re as ai,Lr as aj,Cr as ak,it as al,Sr as am,bt as an,H as ao,Nr as ap,y as aq,_i as ar,ls as as,dl as at,pl as au,Hs as av,Le as aw,Vs as ax,Qe as ay,ta as az,pe as b,X as c,Z as d,F as e,Q as f,D as g,G as h,de as i,T as j,O as k,et as l,s as m,A as n,se as o,ce as p,he as q,qt as r,v as s,P as t,Gt as u,ue as v,b as w,R as x,tt as y,ot as z};
9
+ */function jr(t,e){return 2==e?function(e,a){return t(e,a)}:function(e){return t(e)}}function Fr(t){for(var e=t?t.length:0,a=Array(e);e--;)a[e]=t[e];return a}function Ir(t,e){return function(){var a=arguments.length;if(a){for(var r=Array(a);a--;)r[a]=arguments[a];var n=r[0]=e.apply(void 0,r);return t.apply(void 0,r),n}}}var Pr=function t(e,a,r,n){var i="function"==typeof a,o=a===Object(a);if(o&&(n=r,r=a,a=void 0),null==r)throw new TypeError;n||(n={});var l=!("cap"in n)||n.cap,s=!("curry"in n)||n.curry,c=!("fixed"in n)||n.fixed,h=!("immutable"in n)||n.immutable,u=!("rearg"in n)||n.rearg,d=i?r:Tr,p="curry"in n&&n.curry,m="fixed"in n&&n.fixed,v="rearg"in n&&n.rearg,f=i?r.runInContext():void 0,y=i?r:{ary:e.ary,assign:e.assign,clone:e.clone,curry:e.curry,forEach:e.forEach,isArray:e.isArray,isError:e.isError,isFunction:e.isFunction,isWeakMap:e.isWeakMap,iteratee:e.iteratee,keys:e.keys,rearg:e.rearg,toInteger:e.toInteger,toPath:e.toPath},g=y.ary,b=y.assign,z=y.clone,x=y.curry,w=y.forEach,M=y.isArray,_=y.isError,A=y.isFunction,H=y.isWeakMap,V=y.keys,L=y.rearg,B=y.toInteger,k=y.toPath,C=V(Or.aryMethod),S={castArray:function(t){return function(){var e=arguments[0];return M(e)?t(Fr(e)):t.apply(void 0,arguments)}},iteratee:function(t){return function(){var e=arguments[0],a=arguments[1],r=t(e,a),n=r.length;return l&&"number"==typeof a?(a=a>2?a-2:1,n&&n<=a?r:jr(r,a)):r}},mixin:function(t){return function(e){var a=this;if(!A(a))return t(a,Object(e));var r=[];return w(V(e),(function(t){A(e[t])&&r.push([t,a.prototype[t]])})),t(a,Object(e)),w(r,(function(t){var e=t[1];A(e)?a.prototype[t[0]]=e:delete a.prototype[t[0]]})),a}},nthArg:function(t){return function(e){var a=e<0?1:B(e)+1;return x(t(e),a)}},rearg:function(t){return function(e,a){var r=a?a.length:0;return x(t(e,a),r)}},runInContext:function(a){return function(r){return t(e,a(r),n)}}};function E(t,e){if(l){var a=Or.iterateeRearg[t];if(a)return function(t,e){return F(t,(function(t){var a=e.length;return function(t,e){return 2==e?function(e,a){return t.apply(void 0,arguments)}:function(e){return t.apply(void 0,arguments)}}(L(jr(t,a),e),a)}))}(e,a);var r=!i&&Or.iterateeAry[t];if(r)return function(t,e){return F(t,(function(t){return"function"==typeof t?jr(t,e):t}))}(e,r)}return e}function O(t,e,a){if(c&&(m||!Or.skipFixed[t])){var r=Or.methodSpread[t],n=r&&r.start;return void 0===n?g(e,a):function(t,e){return function(){for(var a=arguments.length,r=a-1,n=Array(a);a--;)n[a]=arguments[a];var i=n[e],o=n.slice(0,e);return i&&Dr.apply(o,i),e!=r&&Dr.apply(o,n.slice(e+1)),t.apply(this,o)}}(e,n)}return e}function T(t,e,a){return u&&a>1&&(v||!Or.skipRearg[t])?L(e,Or.methodRearg[t]||Or.aryRearg[a]):e}function D(t,e){for(var a=-1,r=(e=k(e)).length,n=r-1,i=z(Object(t)),o=i;null!=o&&++a<r;){var l=e[a],s=o[l];null==s||A(s)||_(s)||H(s)||(o[l]=z(a==n?s:Object(s))),o=o[l]}return i}function j(e,a){var r=Or.aliasToReal[e]||e,o=Or.remap[r]||r,l=n;return function(e){var n=i?f:y,s=i?f[o]:a,c=b(b({},l),e);return t(n,r,s,c)}}function F(t,e){return function(){var a=arguments.length;if(!a)return t();for(var r=Array(a);a--;)r[a]=arguments[a];var n=u?0:a-1;return r[n]=e(r[n]),t.apply(void 0,r)}}function I(t,e,a){var r,n=Or.aliasToReal[t]||t,i=e,o=S[n];return o?i=o(e):h&&(Or.mutate.array[n]?i=Ir(e,Fr):Or.mutate.object[n]?i=Ir(e,function(t){return function(e){return t({},e)}}(e)):Or.mutate.set[n]&&(i=Ir(e,D))),w(C,(function(t){return w(Or.aryMethod[t],(function(e){if(n==e){var a=Or.methodSpread[n],o=a&&a.afterRearg;return r=o?O(n,T(n,i,t),t):T(n,O(n,i,t),t),r=function(t,e,a){return p||s&&a>1?x(e,a):e}(0,r=E(n,r),t),!1}})),!r})),r||(r=i),r==e&&(r=p?x(r,1):function(){return e.apply(this,arguments)}),r.convert=j(n,e),r.placeholder=e.placeholder=a,r}if(!o)return I(a,r,d);var P=r,R=[];return w(C,(function(t){w(Or.aryMethod[t],(function(t){var e=P[Or.remap[t]||t];e&&R.push([t,I(t,e,P)])}))})),w(V(P),(function(t){var e=P[t];if("function"==typeof e){for(var a=R.length;a--;)if(R[a][0]==t)return;e.convert=j(t,e),R.push([t,e])}})),w(R,(function(t){P[t[0]]=t[1]})),P.convert=function(t){return P.runInContext.convert(t)(void 0)},P.placeholder=P,w(V(P),(function(t){w(Or.realToAlias[t]||[],(function(e){P[e]=P[t]}))})),P},Rr=Er.runInContext(),Nr=Pr(Rr,Rr),$r=String.fromCharCode,Ur="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Wr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",qr={};function Gr(t,e){if(!qr[t]){qr[t]={};for(var a=0;a<t.length;a++)qr[t][t.charAt(a)]=a}return qr[t][e]}var Yr,Kr={compressToBase64:function(t){if(null==t)return"";var e=Kr._compress(t,6,(function(t){return Ur.charAt(t)}));switch(e.length%4){default:case 0:return e;case 1:return e+"===";case 2:return e+"==";case 3:return e+"="}},decompressFromBase64:function(t){return null==t?"":""==t?null:Kr._decompress(t.length,32,(function(e){return Gr(Ur,t.charAt(e))}))},compressToUTF16:function(t){return null==t?"":Kr._compress(t,15,(function(t){return $r(t+32)}))+" "},decompressFromUTF16:function(t){return null==t?"":""==t?null:Kr._decompress(t.length,16384,(function(e){return t.charCodeAt(e)-32}))},compressToUint8Array:function(t){for(var e=Kr.compress(t),a=new Uint8Array(2*e.length),r=0,n=e.length;r<n;r++){var i=e.charCodeAt(r);a[2*r]=i>>>8,a[2*r+1]=i%256}return a},decompressFromUint8Array:function(t){if(null==t)return Kr.decompress(t);for(var e=new Array(t.length/2),a=0,r=e.length;a<r;a++)e[a]=256*t[2*a]+t[2*a+1];var n=[];return e.forEach((function(t){n.push($r(t))})),Kr.decompress(n.join(""))},compressToEncodedURIComponent:function(t){return null==t?"":Kr._compress(t,6,(function(t){return Wr.charAt(t)}))},decompressFromEncodedURIComponent:function(t){return null==t?"":""==t?null:(t=t.replace(/ /g,"+"),Kr._decompress(t.length,32,(function(e){return Gr(Wr,t.charAt(e))})))},compress:function(t){return Kr._compress(t,16,(function(t){return $r(t)}))},_compress:function(t,e,a){if(null==t)return"";var r,n,i,o={},l={},s="",c="",h="",u=2,d=3,p=2,m=[],v=0,f=0;for(i=0;i<t.length;i+=1)if(s=t.charAt(i),Object.prototype.hasOwnProperty.call(o,s)||(o[s]=d++,l[s]=!0),c=h+s,Object.prototype.hasOwnProperty.call(o,c))h=c;else{if(Object.prototype.hasOwnProperty.call(l,h)){if(h.charCodeAt(0)<256){for(r=0;r<p;r++)v<<=1,f==e-1?(f=0,m.push(a(v)),v=0):f++;for(n=h.charCodeAt(0),r=0;r<8;r++)v=v<<1|1&n,f==e-1?(f=0,m.push(a(v)),v=0):f++,n>>=1}else{for(n=1,r=0;r<p;r++)v=v<<1|n,f==e-1?(f=0,m.push(a(v)),v=0):f++,n=0;for(n=h.charCodeAt(0),r=0;r<16;r++)v=v<<1|1&n,f==e-1?(f=0,m.push(a(v)),v=0):f++,n>>=1}0==--u&&(u=Math.pow(2,p),p++),delete l[h]}else for(n=o[h],r=0;r<p;r++)v=v<<1|1&n,f==e-1?(f=0,m.push(a(v)),v=0):f++,n>>=1;0==--u&&(u=Math.pow(2,p),p++),o[c]=d++,h=String(s)}if(""!==h){if(Object.prototype.hasOwnProperty.call(l,h)){if(h.charCodeAt(0)<256){for(r=0;r<p;r++)v<<=1,f==e-1?(f=0,m.push(a(v)),v=0):f++;for(n=h.charCodeAt(0),r=0;r<8;r++)v=v<<1|1&n,f==e-1?(f=0,m.push(a(v)),v=0):f++,n>>=1}else{for(n=1,r=0;r<p;r++)v=v<<1|n,f==e-1?(f=0,m.push(a(v)),v=0):f++,n=0;for(n=h.charCodeAt(0),r=0;r<16;r++)v=v<<1|1&n,f==e-1?(f=0,m.push(a(v)),v=0):f++,n>>=1}0==--u&&(u=Math.pow(2,p),p++),delete l[h]}else for(n=o[h],r=0;r<p;r++)v=v<<1|1&n,f==e-1?(f=0,m.push(a(v)),v=0):f++,n>>=1;0==--u&&(u=Math.pow(2,p),p++)}for(n=2,r=0;r<p;r++)v=v<<1|1&n,f==e-1?(f=0,m.push(a(v)),v=0):f++,n>>=1;for(;;){if(v<<=1,f==e-1){m.push(a(v));break}f++}return m.join("")},decompress:function(t){return null==t?"":""==t?null:Kr._decompress(t.length,32768,(function(e){return t.charCodeAt(e)}))},_decompress:function(t,e,a){var r,n,i,o,l,s,c,h=[],u=4,d=4,p=3,m="",v=[],f={val:a(0),position:e,index:1};for(r=0;r<3;r+=1)h[r]=r;for(i=0,l=Math.pow(2,2),s=1;s!=l;)o=f.val&f.position,f.position>>=1,0==f.position&&(f.position=e,f.val=a(f.index++)),i|=(o>0?1:0)*s,s<<=1;switch(i){case 0:for(i=0,l=Math.pow(2,8),s=1;s!=l;)o=f.val&f.position,f.position>>=1,0==f.position&&(f.position=e,f.val=a(f.index++)),i|=(o>0?1:0)*s,s<<=1;c=$r(i);break;case 1:for(i=0,l=Math.pow(2,16),s=1;s!=l;)o=f.val&f.position,f.position>>=1,0==f.position&&(f.position=e,f.val=a(f.index++)),i|=(o>0?1:0)*s,s<<=1;c=$r(i);break;case 2:return""}for(h[3]=c,n=c,v.push(c);;){if(f.index>t)return"";for(i=0,l=Math.pow(2,p),s=1;s!=l;)o=f.val&f.position,f.position>>=1,0==f.position&&(f.position=e,f.val=a(f.index++)),i|=(o>0?1:0)*s,s<<=1;switch(c=i){case 0:for(i=0,l=Math.pow(2,8),s=1;s!=l;)o=f.val&f.position,f.position>>=1,0==f.position&&(f.position=e,f.val=a(f.index++)),i|=(o>0?1:0)*s,s<<=1;h[d++]=$r(i),c=d-1,u--;break;case 1:for(i=0,l=Math.pow(2,16),s=1;s!=l;)o=f.val&f.position,f.position>>=1,0==f.position&&(f.position=e,f.val=a(f.index++)),i|=(o>0?1:0)*s,s<<=1;h[d++]=$r(i),c=d-1,u--;break;case 2:return v.join("")}if(0==u&&(u=Math.pow(2,p),p++),h[c])m=h[c];else{if(c!==d)return null;m=n+n.charAt(0)}v.push(m),h[d++]=n+m.charAt(0),n=m,0==--u&&(u=Math.pow(2,p),p++)}}},Jr={DEBUG:!1,LIB_VERSION:"1.0.0"};if("undefined"==typeof window){var Zr={hostname:""};Yr={navigator:{userAgent:""},document:{location:Zr,referrer:""},screen:{width:0,height:0},location:Zr}}else Yr=window;var Xr,Qr,tn,en,an,rn,nn,on,ln,sn,cn,hn=Array.prototype,un=Function.prototype,dn=Object.prototype,pn=hn.slice,mn=dn.toString,vn=dn.hasOwnProperty,fn=Yr.console,yn=Yr.navigator,gn=Yr.document,bn=Yr.opera,zn=Yr.screen,xn=yn.userAgent,wn=un.bind,Mn=hn.forEach,_n=hn.indexOf,An=Array.isArray,Hn={},Vn=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,Ln={trim:function(t){return t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},Bn=function(){if(Jr.DEBUG&&!Ln.isUndefined(fn)&&fn)try{fn.log.apply(fn,arguments)}catch(t){Ln.each(arguments,(function(t){fn.log(t)}))}},kn=function(){if(Jr.DEBUG&&!Ln.isUndefined(fn)&&fn){var t=["PostHog error:"].concat(Ln.toArray(arguments));try{fn.error.apply(fn,t)}catch(e){Ln.each(t,(function(t){fn.error(t)}))}}},Cn=function(){if(!Ln.isUndefined(fn)&&fn){var t=["PostHog error:"].concat(Ln.toArray(arguments));try{fn.error.apply(fn,t)}catch(e){Ln.each(t,(function(t){fn.error(t)}))}}};Ln.bind=function(t,e){var a,r;if(wn&&t.bind===wn)return wn.apply(t,pn.call(arguments,1));if(!Ln.isFunction(t))throw new TypeError;return a=pn.call(arguments,2),r=function(){if(!(this instanceof r))return t.apply(e,a.concat(pn.call(arguments)));var n={};n.prototype=t.prototype;var i=new n;n.prototype=null;var o=t.apply(i,a.concat(pn.call(arguments)));return Object(o)===o?o:i}},Ln.bind_instance_methods=function(t){for(var e in t)"function"==typeof t[e]&&(t[e]=Ln.bind(t[e],t))},Ln.each=function(t,e,a){if(null!=t)if(Mn&&t.forEach===Mn)t.forEach(e,a);else if(t.length===+t.length){for(var r=0,n=t.length;r<n;r++)if(r in t&&e.call(a,t[r],r,t)===Hn)return}else for(var i in t)if(vn.call(t,i)&&e.call(a,t[i],i,t)===Hn)return},Ln.escapeHTML=function(t){var e=t;return e&&Ln.isString(e)&&(e=e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")),e},Ln.extend=function(t){return Ln.each(pn.call(arguments,1),(function(e){for(var a in e)void 0!==e[a]&&(t[a]=e[a])})),t},Ln.isArray=An||function(t){return"[object Array]"===mn.call(t)},Ln.isFunction=function(t){try{return/^\s*\bfunction\b/.test(t)}catch(e){return!1}},Ln.isArguments=function(t){return!(!t||!vn.call(t,"callee"))},Ln.toArray=function(t){return t?t.toArray?t.toArray():Ln.isArray(t)||Ln.isArguments(t)?pn.call(t):Ln.values(t):[]},Ln.keys=function(t){var e=[];return null===t||Ln.each(t,(function(t,a){e[e.length]=a})),e},Ln.values=function(t){var e=[];return null===t||Ln.each(t,(function(t){e[e.length]=t})),e},Ln.identity=function(t){return t},Ln.include=function(t,e){var a=!1;return null===t?a:_n&&t.indexOf===_n?-1!=t.indexOf(e):(Ln.each(t,(function(t){if(a||(a=t===e))return Hn})),a)},Ln.includes=function(t,e){return-1!==t.indexOf(e)},Ln.inherit=function(t,e){return t.prototype=new e,t.prototype.constructor=t,t.superclass=e.prototype,t},Ln.isObject=function(t){return t===Object(t)&&!Ln.isArray(t)},Ln.isEmptyObject=function(t){if(Ln.isObject(t)){for(var e in t)if(vn.call(t,e))return!1;return!0}return!1},Ln.isUndefined=function(t){return void 0===t},Ln.isString=function(t){return"[object String]"==mn.call(t)},Ln.isDate=function(t){return"[object Date]"==mn.call(t)},Ln.isNumber=function(t){return"[object Number]"==mn.call(t)},Ln.isElement=function(t){return!(!t||1!==t.nodeType)},Ln.encodeDates=function(t){return Ln.each(t,(function(e,a){Ln.isDate(e)?t[a]=Ln.formatDate(e):Ln.isObject(e)&&(t[a]=Ln.encodeDates(e))})),t},Ln.timestamp=function(){return Date.now=Date.now||function(){return+new Date},Date.now()},Ln.formatDate=function(t){function e(t){return t<10?"0"+t:t}return t.getUTCFullYear()+"-"+e(t.getUTCMonth()+1)+"-"+e(t.getUTCDate())+"T"+e(t.getUTCHours())+":"+e(t.getUTCMinutes())+":"+e(t.getUTCSeconds())},Ln.safewrap=function(t){return function(){try{return t.apply(this,arguments)}catch(e){Cn("Implementation error. Please turn on debug and contact support@posthog.com."),Jr.DEBUG&&Cn(e)}}},Ln.safewrap_class=function(t,e){for(var a=0;a<e.length;a++)t.prototype[e[a]]=Ln.safewrap(t.prototype[e[a]])},Ln.safewrap_instance_methods=function(t){for(var e in t)"function"==typeof t[e]&&(t[e]=Ln.safewrap(t[e]))},Ln.strip_empty_properties=function(t){var e={};return Ln.each(t,(function(t,a){Ln.isString(t)&&t.length>0&&(e[a]=t)})),e},Ln.truncate=function(t,e){var a;return"string"==typeof t?a=t.slice(0,e):Ln.isArray(t)?(a=[],Ln.each(t,(function(t){a.push(Ln.truncate(t,e))}))):Ln.isObject(t)?(a={},Ln.each(t,(function(t,r){a[r]=Ln.truncate(t,e)}))):a=t,a},Ln.JSONEncode=function(t){var e=function(t){var e=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,a={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return e.lastIndex=0,e.test(t)?'"'+t.replace(e,(function(t){var e=a[t];return"string"==typeof e?e:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+t+'"'},a=function(t,r){var n="",i=0,o="",l="",s=0,c=n,h=[],u=r[t];switch(u&&"object"==typeof u&&"function"==typeof u.toJSON&&(u=u.toJSON(t)),typeof u){case"string":return e(u);case"number":return isFinite(u)?String(u):"null";case"boolean":case"null":return String(u);case"object":if(!u)return"null";if(n+=" ",h=[],"[object Array]"===mn.apply(u)){for(s=u.length,i=0;i<s;i+=1)h[i]=a(i,u)||"null";return l=0===h.length?"[]":n?"[\n"+n+h.join(",\n"+n)+"\n"+c+"]":"["+h.join(",")+"]",n=c,l}for(o in u)vn.call(u,o)&&(l=a(o,u))&&h.push(e(o)+(n?": ":":")+l);return l=0===h.length?"{}":n?"{"+h.join(",")+c+"}":"{"+h.join(",")+"}",n=c,l}};return a("",{"":t})},Ln.JSONDecode=(an={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},rn=function(t){var e=new SyntaxError(t);throw e.at=Xr,e.text=tn,e},nn=function(t){return t&&t!==Qr&&rn("Expected '"+t+"' instead of '"+Qr+"'"),Qr=tn.charAt(Xr),Xr+=1,Qr},on=function(){var t,e="";for("-"===Qr&&(e="-",nn("-"));Qr>="0"&&Qr<="9";)e+=Qr,nn();if("."===Qr)for(e+=".";nn()&&Qr>="0"&&Qr<="9";)e+=Qr;if("e"===Qr||"E"===Qr)for(e+=Qr,nn(),"-"!==Qr&&"+"!==Qr||(e+=Qr,nn());Qr>="0"&&Qr<="9";)e+=Qr,nn();if(t=+e,isFinite(t))return t;rn("Bad number")},ln=function(){var t,e,a,r="";if('"'===Qr)for(;nn();){if('"'===Qr)return nn(),r;if("\\"===Qr)if(nn(),"u"===Qr){for(a=0,e=0;e<4&&(t=parseInt(nn(),16),isFinite(t));e+=1)a=16*a+t;r+=String.fromCharCode(a)}else{if("string"!=typeof an[Qr])break;r+=an[Qr]}else r+=Qr}rn("Bad string")},sn=function(){for(;Qr&&Qr<=" ";)nn()},en=function(){switch(sn(),Qr){case"{":return function(){var t,e={};if("{"===Qr){if(nn("{"),sn(),"}"===Qr)return nn("}"),e;for(;Qr;){if(t=ln(),sn(),nn(":"),Object.hasOwnProperty.call(e,t)&&rn('Duplicate key "'+t+'"'),e[t]=en(),sn(),"}"===Qr)return nn("}"),e;nn(","),sn()}}rn("Bad object")}();case"[":return function(){var t=[];if("["===Qr){if(nn("["),sn(),"]"===Qr)return nn("]"),t;for(;Qr;){if(t.push(en()),sn(),"]"===Qr)return nn("]"),t;nn(","),sn()}}rn("Bad array")}();case'"':return ln();case"-":return on();default:return Qr>="0"&&Qr<="9"?on():function(){switch(Qr){case"t":return nn("t"),nn("r"),nn("u"),nn("e"),!0;case"f":return nn("f"),nn("a"),nn("l"),nn("s"),nn("e"),!1;case"n":return nn("n"),nn("u"),nn("l"),nn("l"),null}rn('Unexpected "'+Qr+'"')}()}},function(t){var e;return tn=t,Xr=0,Qr=" ",e=en(),sn(),Qr&&rn("Syntax error"),e}),Ln.base64Encode=function(t){var e,a,r,n,i,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",l=0,s=0,c="",h=[];if(!t)return t;t=Ln.utf8Encode(t);do{e=(i=t.charCodeAt(l++)<<16|t.charCodeAt(l++)<<8|t.charCodeAt(l++))>>18&63,a=i>>12&63,r=i>>6&63,n=63&i,h[s++]=o.charAt(e)+o.charAt(a)+o.charAt(r)+o.charAt(n)}while(l<t.length);switch(c=h.join(""),t.length%3){case 1:c=c.slice(0,-2)+"==";break;case 2:c=c.slice(0,-1)+"="}return c},Ln.utf8Encode=function(t){var e,a,r,n,i="";for(e=a=0,r=(t=(t+"").replace(/\r\n/g,"\n").replace(/\r/g,"\n")).length,n=0;n<r;n++){var o=t.charCodeAt(n),l=null;o<128?a++:l=o>127&&o<2048?String.fromCharCode(o>>6|192,63&o|128):String.fromCharCode(o>>12|224,o>>6&63|128,63&o|128),null!==l&&(a>e&&(i+=t.substring(e,a)),i+=l,e=a=n+1)}return a>e&&(i+=t.substring(e,t.length)),i},Ln.UUID=(cn=function(){for(var t=1*new Date,e=0;t==1*new Date;)e++;return t.toString(16)+e.toString(16)},function(){var t=(zn.height*zn.width).toString(16);return cn()+"-"+Math.random().toString(16).replace(".","")+"-"+function(){var t,e,a=xn,r=[],n=0;function i(t,e){var a,n=0;for(a=0;a<e.length;a++)n|=r[a]<<8*a;return t^n}for(t=0;t<a.length;t++)e=a.charCodeAt(t),r.unshift(255&e),r.length>=4&&(n=i(n,r),r=[]);return r.length>0&&(n=i(n,r)),n.toString(16)}()+"-"+t+"-"+cn()}),Ln.isBlockedUA=function(t){return!!/(google web preview|baiduspider|yandexbot|bingbot|googlebot|yahoo! slurp)/i.test(t)},Ln.HTTPBuildQuery=function(t,e){var a,r,n=[];return Ln.isUndefined(e)&&(e="&"),Ln.each(t,(function(t,e){a=encodeURIComponent(t.toString()),r=encodeURIComponent(e),n[n.length]=r+"="+a})),n.join(e)},Ln.getQueryParam=function(t,e){e=e.replace(/[[]/,"\\[").replace(/[\]]/,"\\]");var a=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(t);if(null===a||a&&"string"!=typeof a[1]&&a[1].length)return"";var r=a[1];try{r=decodeURIComponent(r)}catch(n){kn("Skipping decoding for malformed query param: "+r)}return r.replace(/\+/g," ")},Ln.getHashParam=function(t,e){var a=t.match(new RegExp(e+"=([^&]*)"));return a?a[1]:null},Ln.cookie={get:function(t){try{for(var e=t+"=",a=gn.cookie.split(";"),r=0;r<a.length;r++){for(var n=a[r];" "==n.charAt(0);)n=n.substring(1,n.length);if(0===n.indexOf(e))return decodeURIComponent(n.substring(e.length,n.length))}}catch(i){}return null},parse:function(t){var e;try{e=Ln.JSONDecode(Ln.cookie.get(t))||{}}catch(a){}return e},set_seconds:function(t,e,a,r,n){try{var i="",o="",l="";if(r){var s=gn.location.hostname.match(Vn),c=s?s[0]:"";i=c?"; domain=."+c:""}if(a){var h=new Date;h.setTime(h.getTime()+1e3*a),o="; expires="+h.toGMTString()}n&&(l="; secure"),gn.cookie=t+"="+encodeURIComponent(e)+o+"; path=/"+i+l}catch(u){return}},set:function(t,e,a,r,n){try{var i="",o="",l="";if(r){var s=gn.location.hostname.match(Vn),c=s?s[0]:"";i=c?"; domain=."+c:""}if(a){var h=new Date;h.setTime(h.getTime()+24*a*60*60*1e3),o="; expires="+h.toGMTString()}n&&(l="; secure");var u=t+"="+encodeURIComponent(e)+o+"; path=/"+i+l;return gn.cookie=u,u}catch(d){return}},remove:function(t,e){try{Ln.cookie.set(t,"",-1,e)}catch(a){return}}};var Sn=null;Ln.localStorage={is_supported:function(){if(null!==Sn)return Sn;var t=!0;try{var e="__mplssupport__";Ln.localStorage.set(e,"xyz"),"xyz"!==Ln.localStorage.get(e)&&(t=!1),Ln.localStorage.remove(e)}catch(a){t=!1}return t||kn("localStorage unsupported; falling back to cookie store"),Sn=t,t},error:function(t){kn("localStorage error: "+t)},get:function(t){try{return window.localStorage.getItem(t)}catch(e){Ln.localStorage.error(e)}return null},parse:function(t){try{return Ln.JSONDecode(Ln.localStorage.get(t))||{}}catch(e){}return null},set:function(t,e){try{window.localStorage.setItem(t,e)}catch(a){Ln.localStorage.error(a)}},remove:function(t){try{window.localStorage.removeItem(t)}catch(e){Ln.localStorage.error(e)}}},Ln.register_event=function(){function t(e){return e&&(e.preventDefault=t.preventDefault,e.stopPropagation=t.stopPropagation),e}return t.preventDefault=function(){this.returnValue=!1},t.stopPropagation=function(){this.cancelBubble=!0},function(e,a,r,n,i){if(e)if(e.addEventListener&&!n)e.addEventListener(a,r,!!i);else{var o="on"+a,l=e[o];e[o]=function(e,a,r){return function(n){if(n=n||t(window.event)){var i,o,l=!0;return Ln.isFunction(r)&&(i=r(n)),o=a.call(e,n),!1!==i&&!1!==o||(l=!1),l}}}(e,r,l)}else kn("No valid element provided to register_event")}}();var En=new RegExp('^(\\w*)\\[(\\w+)([=~\\|\\^\\$\\*]?)=?"?([^\\]"]*)"?\\]$');function On(t){switch(typeof t.className){case"string":return t.className;case"object":return t.className.baseVal||t.getAttribute("class")||"";default:return""}}function Tn(t){var e="";return Pn(t)&&!Rn(t)&&t.childNodes&&t.childNodes.length&&Ln.each(t.childNodes,(function(t){Fn(t)&&t.textContent&&(e+=Ln.trim(t.textContent).split(/(\s+)/).filter(Nn).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255))})),Ln.trim(e)}function Dn(t){return t&&1===t.nodeType}function jn(t,e){return t&&t.tagName&&t.tagName.toLowerCase()===e.toLowerCase()}function Fn(t){return t&&3===t.nodeType}Ln.dom_query=function(){function t(t){return t.all?t.all:t.getElementsByTagName("*")}var e=/[\t\r\n]/g;function a(t,a){var r=" "+a+" ";return(" "+t.className+" ").replace(e," ").indexOf(r)>=0}function r(e){if(!gn.getElementsByTagName)return[];var r,n,i,o,l,s,c,h,u,d,p=e.split(" "),m=[gn];for(s=0;s<p.length;s++)if((r=p[s].replace(/^\s+/,"").replace(/\s+$/,"")).indexOf("#")>-1){i=(n=r.split("#"))[0];var v=n[1],f=gn.getElementById(v);if(!f||i&&f.nodeName.toLowerCase()!=i)return[];m=[f]}else if(r.indexOf(".")>-1){i=(n=r.split("."))[0];var y=n[1];for(i||(i="*"),o=[],l=0,c=0;c<m.length;c++)for(u="*"==i?t(m[c]):m[c].getElementsByTagName(i),h=0;h<u.length;h++)o[l++]=u[h];for(m=[],d=0,c=0;c<o.length;c++)o[c].className&&Ln.isString(o[c].className)&&a(o[c],y)&&(m[d++]=o[c])}else{var g=r.match(En);if(g){i=g[1];var b,z=g[2],x=g[3],w=g[4];for(i||(i="*"),o=[],l=0,c=0;c<m.length;c++)for(u="*"==i?t(m[c]):m[c].getElementsByTagName(i),h=0;h<u.length;h++)o[l++]=u[h];switch(m=[],d=0,x){case"=":b=function(t){return t.getAttribute(z)==w};break;case"~":b=function(t){return t.getAttribute(z).match(new RegExp("\\b"+w+"\\b"))};break;case"|":b=function(t){return t.getAttribute(z).match(new RegExp("^"+w+"-?"))};break;case"^":b=function(t){return 0===t.getAttribute(z).indexOf(w)};break;case"$":b=function(t){return t.getAttribute(z).lastIndexOf(w)==t.getAttribute(z).length-w.length};break;case"*":b=function(t){return t.getAttribute(z).indexOf(w)>-1};break;default:b=function(t){return t.getAttribute(z)}}for(m=[],d=0,c=0;c<o.length;c++)b(o[c])&&(m[d++]=o[c])}else{for(i=r,o=[],l=0,c=0;c<m.length;c++)for(u=m[c].getElementsByTagName(i),h=0;h<u.length;h++)o[l++]=u[h];m=o}}return m}return function(t){return Ln.isElement(t)?[t]:Ln.isObject(t)&&!Ln.isUndefined(t.length)?t:r.call(this,t)}}(),Ln.info={campaignParams:function(){var t="utm_source utm_medium utm_campaign utm_content utm_term".split(" "),e="",a={};return Ln.each(t,(function(t){(e=Ln.getQueryParam(gn.URL,t)).length&&(a[t]=e)})),a},searchEngine:function(t){return 0===t.search("https?://(.*)google.([^/?]*)")?"google":0===t.search("https?://(.*)bing.com")?"bing":0===t.search("https?://(.*)yahoo.com")?"yahoo":0===t.search("https?://(.*)duckduckgo.com")?"duckduckgo":null},searchInfo:function(t){var e=Ln.info.searchEngine(t),a="yahoo"!=e?"q":"p",r={};if(null!==e){r.$search_engine=e;var n=Ln.getQueryParam(t,a);n.length&&(r.ph_keyword=n)}return r},browser:function(t,e,a){return e=e||"",a||Ln.includes(t," OPR/")?Ln.includes(t,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(t)?"BlackBerry":Ln.includes(t,"IEMobile")||Ln.includes(t,"WPDesktop")?"Internet Explorer Mobile":Ln.includes(t,"SamsungBrowser/")?"Samsung Internet":Ln.includes(t,"Edge")||Ln.includes(t,"Edg/")?"Microsoft Edge":Ln.includes(t,"FBIOS")?"Facebook Mobile":Ln.includes(t,"Chrome")?"Chrome":Ln.includes(t,"CriOS")?"Chrome iOS":Ln.includes(t,"UCWEB")||Ln.includes(t,"UCBrowser")?"UC Browser":Ln.includes(t,"FxiOS")?"Firefox iOS":Ln.includes(e,"Apple")?Ln.includes(t,"Mobile")?"Mobile Safari":"Safari":Ln.includes(t,"Android")?"Android Mobile":Ln.includes(t,"Konqueror")?"Konqueror":Ln.includes(t,"Firefox")?"Firefox":Ln.includes(t,"MSIE")||Ln.includes(t,"Trident/")?"Internet Explorer":Ln.includes(t,"Gecko")?"Mozilla":""},browserVersion:function(t,e,a){var r={"Internet Explorer Mobile":/rv:(\d+(\.\d+)?)/,"Microsoft Edge":/Edge?\/(\d+(\.\d+)?)/,Chrome:/Chrome\/(\d+(\.\d+)?)/,"Chrome iOS":/CriOS\/(\d+(\.\d+)?)/,"UC Browser":/(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/,Safari:/Version\/(\d+(\.\d+)?)/,"Mobile Safari":/Version\/(\d+(\.\d+)?)/,Opera:/(Opera|OPR)\/(\d+(\.\d+)?)/,Firefox:/Firefox\/(\d+(\.\d+)?)/,"Firefox iOS":/FxiOS\/(\d+(\.\d+)?)/,Konqueror:/Konqueror:(\d+(\.\d+)?)/,BlackBerry:/BlackBerry (\d+(\.\d+)?)/,"Android Mobile":/android\s(\d+(\.\d+)?)/,"Samsung Internet":/SamsungBrowser\/(\d+(\.\d+)?)/,"Internet Explorer":/(rv:|MSIE )(\d+(\.\d+)?)/,Mozilla:/rv:(\d+(\.\d+)?)/}[Ln.info.browser(t,e,a)];if(void 0===r)return null;var n=t.match(r);return n?parseFloat(n[n.length-2]):null},os:function(){var t=xn;return/Windows/i.test(t)?/Phone/.test(t)||/WPDesktop/.test(t)?"Windows Phone":"Windows":/(iPhone|iPad|iPod)/.test(t)?"iOS":/Android/.test(t)?"Android":/(BlackBerry|PlayBook|BB10)/i.test(t)?"BlackBerry":/Mac/i.test(t)?"Mac OS X":/Linux/.test(t)?"Linux":/CrOS/.test(t)?"Chrome OS":""},device:function(t){return/Windows Phone/i.test(t)||/WPDesktop/.test(t)?"Windows Phone":/iPad/.test(t)?"iPad":/iPod/.test(t)?"iPod Touch":/iPhone/.test(t)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(t)?"BlackBerry":/Android/.test(t)?"Android":""},referringDomain:function(t){var e=t.split("/");return e.length>=3?e[2]:""},properties:function(){return Ln.extend(Ln.strip_empty_properties({$os:Ln.info.os(),$browser:Ln.info.browser(xn,yn.vendor,bn),$referrer:gn.referrer,$referring_domain:Ln.info.referringDomain(gn.referrer),$device:Ln.info.device(xn)}),{$current_url:Yr.location.href,$host:Yr.location.host,$pathname:Yr.location.pathname,$browser_version:Ln.info.browserVersion(xn,yn.vendor,bn),$screen_height:zn.height,$screen_width:zn.width,$lib:"web",$lib_version:Jr.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Ln.timestamp()/1e3})},people_properties:function(){return Ln.extend(Ln.strip_empty_properties({$os:Ln.info.os(),$browser:Ln.info.browser(xn,yn.vendor,bn)}),{$browser_version:Ln.info.browserVersion(xn,yn.vendor,bn)})}},Ln.toArray=Ln.toArray,Ln.isObject=Ln.isObject,Ln.JSONEncode=Ln.JSONEncode,Ln.JSONDecode=Ln.JSONDecode,Ln.isBlockedUA=Ln.isBlockedUA,Ln.isEmptyObject=Ln.isEmptyObject,Ln.info=Ln.info,Ln.info.device=Ln.info.device,Ln.info.browser=Ln.info.browser,Ln.info.browserVersion=Ln.info.browserVersion,Ln.info.properties=Ln.info.properties;var In=["a","button","form","input","select","textarea","label"];function Pn(t){for(var e=t;e.parentNode&&!jn(e,"body");e=e.parentNode){var a=On(e).split(" ");if(Ln.includes(a,"ph-sensitive")||Ln.includes(a,"ph-no-capture"))return!1}if(Ln.includes(On(t).split(" "),"ph-include"))return!0;var r=t.type||"";if("string"==typeof r)switch(r.toLowerCase()){case"hidden":case"password":return!1}var n=t.name||t.id||"";if("string"==typeof n){if(/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(n.replace(/[^a-zA-Z0-9]/g,"")))return!1}return!0}function Rn(t){return!!(jn(t,"input")&&"button"!=t.type||jn(t,"select")||jn(t,"textarea")||"true"===t.getAttribute("contenteditable"))}function Nn(t){if(null===t||Ln.isUndefined(t))return!1;if("string"==typeof t){t=Ln.trim(t);if(/^(?:(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11}))$/.test((t||"").replace(/[- ]/g,"")))return!1;if(/(^\d{3}-?\d{2}-?\d{4}$)/.test(t))return!1}return!0}var $n={_initializedTokens:[],_previousElementSibling:function(t){if(t.previousElementSibling)return t.previousElementSibling;do{t=t.previousSibling}while(t&&!Dn(t));return t},_loadScript:function(t,e){var a=document.createElement("script");a.type="text/javascript",a.src=t,a.onload=e;var r=document.getElementsByTagName("script");r.length>0?r[0].parentNode.insertBefore(a,r[0]):document.body.appendChild(a)},_getPropertiesFromElement:function(t){var e=t.tagName.toLowerCase(),a={tag_name:e};In.indexOf(e)>-1&&(a.$el_text=Tn(t));var r=On(t);r.length>0&&(a.classes=r.split(" ")),Ln.each(t.attributes,(function(e){Rn(t)&&-1===["name","id","class"].indexOf(e.name)||Nn(e.value)&&(a["attr__"+e.name]=e.value)}));for(var n=1,i=1,o=t;o=this._previousElementSibling(o);)n++,o.tagName===t.tagName&&i++;return a.nth_child=n,a.nth_of_type=i,a},_getDefaultProperties:function(t){return{$event_type:t,$ce_version:1}},_extractCustomPropertyValue:function(t){var e=[];return Ln.each(document.querySelectorAll(t.css_selector),(function(t){var a;["input","select"].indexOf(t.tagName.toLowerCase())>-1?a=t.value:t.textContent&&(a=t.textContent),Nn(a)&&e.push(a)})),e.join(", ")},_getCustomProperties:function(t){var e={};return Ln.each(this._customProperties,(function(a){Ln.each(a.event_selectors,(function(r){var n=document.querySelectorAll(r);Ln.each(n,(function(r){Ln.includes(t,r)&&Pn(r)&&(e[a.name]=this._extractCustomPropertyValue(a))}),this)}),this)}),this),e},_getEventTarget:function(t){return void 0===t.target?t.srcElement:t.target.shadowRoot?t.composedPath()[0]:t.target},_captureEvent:function(t,e){var a=this._getEventTarget(t);if(Fn(a)&&(a=a.parentNode),function(t,e){if(!t||jn(t,"html")||!Dn(t))return!1;for(var a=!1,r=[t],n=!0,i=t;i.parentNode&&!jn(i,"body");)if(11!==i.parentNode.nodeType){if(!(n=i.parentNode))break;if(In.indexOf(n.tagName.toLowerCase())>-1)a=!0;else{let t=window.getComputedStyle(n);t&&"pointer"===t.getPropertyValue("cursor")&&(a=!0)}r.push(n),i=n}else r.push(i.parentNode.host),i=i.parentNode.host;let o=window.getComputedStyle(t);if(o&&"pointer"===o.getPropertyValue("cursor")&&"click"===e.type)return!0;var l=t.tagName.toLowerCase();switch(l){case"html":return!1;case"form":return"submit"===e.type;case"input":return"change"===e.type||"click"===e.type;case"select":case"textarea":return"change"===e.type||"click"===e.type;default:return a?"click"===e.type:"click"===e.type&&(In.indexOf(l)>-1||"true"===t.getAttribute("contenteditable"))}}(a,t)){for(var r=[a],n=a;n.parentNode&&!jn(n,"body");)11!==n.parentNode.nodeType?(r.push(n.parentNode),n=n.parentNode):(r.push(n.parentNode.host),n=n.parentNode.host);var i,o=[],l=!1;if(Ln.each(r,(function(t){var e=Pn(t);"a"===t.tagName.toLowerCase()&&(i=t.getAttribute("href"),i=e&&Nn(i)&&i);var a=On(t).split(" ");Ln.includes(a,"ph-no-capture")&&(l=!0),o.push(this._getPropertiesFromElement(t))}),this),o[0].$el_text=Tn(a),i&&(o[0].attr__href=i),l)return!1;var s=Tn(a);s&&s.length;var c=Ln.extend(this._getDefaultProperties(t.type),{$elements:o},this._getCustomProperties(r));return e.capture("$autocapture",c),!0}},_navigate:function(t){window.location.href=t},_addDomEventHandlers:function(t){var e=Ln.bind((function(e){e=e||window.event,this._captureEvent(e,t)}),this);Ln.register_event(document,"submit",e,!1,!0),Ln.register_event(document,"change",e,!1,!0),Ln.register_event(document,"click",e,!1,!0)},_customProperties:{},init:function(t){this._maybeLoadEditor(t);var e=t.get_config("token");if(this._initializedTokens.indexOf(e)>-1)console.log('autocapture already initialized for token "'+e+'"');else{this._initializedTokens.push(e);var a=Ln.bind((function(e){if(!document||!document.body)return console.log("document not ready yet, trying again in 500 milliseconds..."),void setTimeout((function(){a(e)}),500);var r=e.editorParams||(e.toolbarVersion?{toolbarVersion:e.toolbarVersion}:{});if(e.isAuthenticated&&r.toolbarVersion&&0===r.toolbarVersion.indexOf("toolbar")&&(this._loadEditor(t,Object.assign({},r,{apiURL:t.get_config("api_host")})),t.set_config({debug:!0})),e&&e.config&&!0===e.config.enable_collect_everything?(e.custom_properties&&(this._customProperties=e.custom_properties),this._addDomEventHandlers(t)):t.__autocapture_enabled=!1,e.featureFlags?t.persistence&&t.persistence.register({$active_feature_flags:e.featureFlags}):t.persistence&&t.persistence.unregister("$active_feature_flags"),e.supportedCompression){let a={};for(const t of e.supportedCompression)a[t]=!0;t.compression=a}else t.compression={}}),this),r=Ln.JSONEncode({token:e,distinct_id:t.get_distinct_id()}),n=Ln.base64Encode(r);t._send_request(t.get_config("api_host")+"/decide/",{data:n},{method:"POST"},t._prepare_callback(a))}},_maybeLoadEditor:function(t){try{var e,a=Ln.getHashParam(window.location.hash,"__posthog")||Ln.getHashParam(window.location.hash,"state"),r=a?JSON.parse(decodeURIComponent(a)):null;return r&&("mpeditor"===r.action||"ph_authorize"===r.action)?(e=r)&&Object.keys(e).length>0&&(window.localStorage.setItem("_postHogEditorParams",JSON.stringify(e)),r.desiredHash?window.location.hash=r.desiredHash:window.history?history.replaceState("",document.title,window.location.pathname+window.location.search):window.location.hash=""):delete(e=JSON.parse(window.localStorage.getItem("_postHogEditorParams")||"{}")).userIntent,e.apiURL=t.get_config("api_host"),!(!e.token||t.get_config("token")!==e.token)&&(this._loadEditor(t,e),!0)}catch(n){return!1}},_loadEditor:function(t,e){var a=this;if(!window._postHogToolbarLoaded){window._postHogToolbarLoaded=!0;var r=e.jsURL||e.apiURL||t.get_config("api_host"),n=e.toolbarVersion&&0===e.toolbarVersion.indexOf("toolbar")?"toolbar.js":"editor.js",i=r+(r.endsWith("/")?"":"/")+"static/"+n+"?_ts="+(new Date).getTime();return this._loadScript(i,(function(){window.ph_load_editor(e)})),Ln.register_event(window,"turbolinks:load",(function(){window._postHogToolbarLoaded=!1,a._loadEditor(t,e)})),!0}return!1},enabledForProject:function(t,e,a){e=Ln.isUndefined(e)?10:e,a=Ln.isUndefined(a)?10:a;for(var r=0,n=0;n<t.length;n++)r+=t.charCodeAt(n);return r%e<a},isBrowserSupported:function(){return Ln.isFunction(document.querySelectorAll)}};Ln.bind_instance_methods($n),Ln.safewrap_instance_methods($n);var Un=function(){};Un.prototype.create_properties=function(){},Un.prototype.event_handler=function(){},Un.prototype.after_capture_handler=function(){},Un.prototype.init=function(t){return this.mp=t,this},Un.prototype.capture=function(t,e,a,r){var n=this,i=Ln.dom_query(t);if(0!==i.length)return Ln.each(i,(function(t){Ln.register_event(t,this.override_event,(function(t){var i={},o=n.create_properties(a,this),l=n.mp.get_config("capture_links_timeout");n.event_handler(t,this,i),window.setTimeout(n.capture_callback(r,o,i,!0),l),n.mp.capture(e,o,n.capture_callback(r,o,i))}))}),this),!0;kn("The DOM query ("+t+") returned 0 elements")},Un.prototype.capture_callback=function(t,e,a,r){r=r||!1;var n=this;return function(){a.callback_fired||(a.callback_fired=!0,t&&!1===t(r,e)||n.after_capture_handler(e,a,r))}},Un.prototype.create_properties=function(t,e){return"function"==typeof t?t(e):Ln.extend({},t)};var Wn=function(){this.override_event="click"};Ln.inherit(Wn,Un),Wn.prototype.create_properties=function(t,e){var a=Wn.superclass.create_properties.apply(this,arguments);return e.href&&(a.url=e.href),a},Wn.prototype.event_handler=function(t,e,a){a.new_tab=2===t.which||t.metaKey||t.ctrlKey||"_blank"===e.target,a.href=e.href,a.new_tab||t.preventDefault()},Wn.prototype.after_capture_handler=function(t,e){e.new_tab||setTimeout((function(){window.location=e.href}),0)};var qn=function(){this.override_event="submit"};Ln.inherit(qn,Un),qn.prototype.event_handler=function(t,e,a){a.element=e,t.preventDefault()},qn.prototype.after_capture_handler=function(t,e){setTimeout((function(){e.element.submit()}),0)};function Gn(t,e){ai(!0,t,e)}function Yn(t,e){ai(!1,t,e)}function Kn(t,e){return"1"===ei(t,e)}function Jn(t,e){return!!function(t){if(t&&t.respectDnt){var e=t&&t.window||Yr,a=e.navigator||{},r=!1;return Ln.each([a.doNotTrack,a.msDoNotTrack,e.doNotTrack],(function(t){Ln.includes([!0,1,"1","yes"],t)&&(r=!0)})),r}return!1}(e)||"0"===ei(t,e)}function Zn(t,e){return ri(t,(function(t){return this._get_config(t)}),e)}function Xn(t,e){Qn(e=e||{}).remove(ti(t,e),!!e.crossSubdomainCookie,e.cookieDomain)}function Qn(t){return"localStorage"===(t=t||{}).persistenceType?Ln.localStorage:Ln.cookie}function ti(t,e){return((e=e||{}).persistencePrefix||"__ph_opt_in_out_")+t}function ei(t,e){return Qn(e).get(ti(t,e))}function ai(t,e,a){Ln.isString(e)&&e.length?(Qn(a=a||{}).set(ti(e,a),t?1:0,Ln.isNumber(a.cookieExpiration)?a.cookieExpiration:null,!!a.crossSubdomainCookie,!!a.secureCookie,!!a.crossSiteCookie,a.cookieDomain),a.capture&&t&&a.capture(a.captureEventName||"$opt_in",a.captureProperties,{send_immediately:!0})):console.error("gdpr."+(t?"optIn":"optOut")+" called with an invalid token")}function ri(t,e,a){return function(){var r=!1;try{var n=e.call(this,"token"),i=e.call(this,"respect_dnt"),o=e.call(this,"opt_out_capturing_persistence_type"),l=e.call(this,"opt_out_capturing_cookie_prefix"),s=e.call(this,"window");n&&(r=Jn(n,{respectDnt:i,persistenceType:o,persistencePrefix:l,window:s}))}catch(h){a||console.error("Unexpected error when checking capturing opt-out status: "+h)}if(!r)return t.apply(this,arguments);var c=arguments[arguments.length-1];"function"==typeof c&&c(0)}}var ni={set_action:function(t,e){var a={},r={};return Ln.isObject(t)?Ln.each(t,(function(t,e){this._is_reserved_property(e)||(r[e]=t)}),this):r[t]=e,a.$set=r,a},set_once_action:function(t,e){var a={},r={};return Ln.isObject(t)?Ln.each(t,(function(t,e){this._is_reserved_property(e)||(r[e]=t)}),this):r[t]=e,a.$set_once=r,a}},ii=function(){};Ln.extend(ii.prototype,ni),ii.prototype._init=function(t){this._posthog=t},ii.prototype.set=Zn((function(t,e,a){var r=this.set_action(t,e);return Ln.isObject(t)&&(a=e),this._get_config("save_referrer")&&this._posthog.persistence.update_referrer_info(document.referrer),r.$set=Ln.extend({},Ln.info.people_properties(),this._posthog.persistence.get_referrer_info(),r.$set),this._send_request(r,a)})),ii.prototype.set_once=Zn((function(t,e,a){var r=this.set_once_action(t,e);return Ln.isObject(t)&&(a=e),this._send_request(r,a)})),ii.prototype.toString=function(){return this._posthog.toString()+".people"},ii.prototype._send_request=function(t,e){t.$token=this._get_config("token"),t.$distinct_id=this._posthog.get_distinct_id();var a=this._posthog.get_property("$device_id"),r=this._posthog.get_property("$user_id"),n=this._posthog.get_property("$had_persisted_distinct_id");a&&(t.$device_id=a),r&&(t.$user_id=r),n&&(t.$had_persisted_distinct_id=n);var i=Ln.encodeDates(t),o=Ln.truncate(i,255),l=Ln.JSONEncode(i),s=Ln.base64Encode(l);return this._posthog._send_request(this._get_config("api_host")+"/engage/",{data:s},this._posthog._prepare_callback(e,o)),o},ii.prototype._get_config=function(t){return this._posthog.get_config(t)},ii.prototype._identify_called=function(){return!0===this._posthog._flags.identify_called},ii.prototype._enqueue=function(t){"$set"in t?this._posthog.persistence._add_to_people_queue("$set",t):"$set_once"in t?this._posthog.persistence._add_to_people_queue("$set_once",t):kn("Invalid call to _enqueue():",t)},ii.prototype._flush_one_queue=function(t,e,a,r){var n=this,i=Ln.extend({},this._posthog.persistence._get_queue(t)),o=i;Ln.isUndefined(i)||!Ln.isObject(i)||Ln.isEmptyObject(i)||(n._posthog.persistence._pop_from_people_queue(t,i),r&&(o=r(i)),e.call(n,o,(function(e,r){0===e&&n._posthog.persistence._add_to_people_queue(t,i),Ln.isUndefined(a)||a(e,r)})))},ii.prototype._flush=function(t,e){this._flush_one_queue("$set",this.set,t),this._flush_one_queue("$set_once",this.set_once,e)},ii.prototype._is_reserved_property=function(t){return"$distinct_id"===t||"$token"===t||"$device_id"===t||"$user_id"===t||"$had_persisted_distinct_id"===t},ii.prototype.set=ii.prototype.set,ii.prototype.set_once=ii.prototype.set_once,ii.prototype.toString=ii.prototype.toString;var oi=function(){};oi.prototype._init=function(t){this._posthog=t},oi.prototype.getFlags=function(){return this._posthog.persistence.props.$override_feature_flags?(this._override_warning||console.warn("[PostHog] Overriding feature flags! Feature flags from server were: "+JSON.stringify(this._posthog.persistence.props.$active_feature_flags)),this._override_warning=!0,this._posthog.persistence.props.$override_feature_flags):this._posthog.persistence.props.$active_feature_flags},oi.prototype.reloadFeatureFlags=function(){var t=this._posthog,e=Ln.bind((function(e){e.featureFlags?t.persistence&&t.persistence.register({$active_feature_flags:e.featureFlags}):t.persistence&&t.persistence.unregister("$active_feature_flags")})),a=t.config.token,r=Ln.JSONEncode({token:a,distinct_id:t.get_distinct_id()}),n=Ln.base64Encode(r);t._send_request(t.get_config("api_host")+"/decide/",{data:n},{method:"POST"},t._prepare_callback(e))},oi.prototype.isFeatureEnabled=function(t){return this.getFlags()?this.getFlags().indexOf(t)>-1:(console.warn('isFeatureEnabled for key "'+t+"\" failed. Feature flags didn't load in time."),!1)},oi.prototype.override=function(t){if(!1===t)return this._posthog.persistence.unregister("$override_feature_flags");this._posthog.persistence.register("$override_feature_flags",t)};var li,si,ci=["__mps","__mpso","__mpus","__mpa","__mpap","__mpr","__mpu","$people_distinct_id","__alias","__cmpns","__timers"],hi=function(t){this.props={},this.campaign_params_saved=!1,this.featureFlagEventHandlers=[],t.persistence_name?this.name="ph_"+t.persistence_name:this.name="ph_"+t.token+"_posthog";var e=t.persistence;"cookie"!==e&&"localStorage"!==e&&(Cn("Unknown persistence type "+e+"; falling back to cookie"),e=t.persistence="cookie"),"localStorage"===e&&Ln.localStorage.is_supported()?this.storage=Ln.localStorage:this.storage=Ln.cookie,this.load(),this.update_config(t),this.upgrade(t),this.save()};hi.prototype.addFeatureFlagsHandler=function(t){return this.featureFlagEventHandlers.push(t),!0},hi.prototype.receivedFeatureFlags=function(t){this.featureFlagEventHandlers.forEach((e=>e(t)))},hi.prototype.properties=function(){var t={};return Ln.each(this.props,(function(e,a){Ln.include(ci,a)||(t[a]=e)})),t},hi.prototype.load=function(){if(!this.disabled){var t=this.storage.parse(this.name);t&&(this.props=Ln.extend({},t))}},hi.prototype.upgrade=function(t){var e,a,r=t.upgrade;r&&(e="ph_super_properties","string"==typeof r&&(e=r),a=this.storage.parse(e),this.storage.remove(e),this.storage.remove(e,!0),a&&(this.props=Ln.extend(this.props,a.all,a.events))),t.cookie_name||"posthog"===t.name||(e="ph_"+t.token+"_"+t.name,(a=this.storage.parse(e))&&(this.storage.remove(e),this.storage.remove(e,!0),this.register_once(a))),this.storage===Ln.localStorage&&(a=Ln.cookie.parse(this.name),Ln.cookie.remove(this.name),Ln.cookie.remove(this.name,!0),a&&this.register_once(a))},hi.prototype.save=function(){this.disabled||(this._expire_notification_campaigns(),this.storage.set(this.name,Ln.JSONEncode(this.props),this.expire_days,this.cross_subdomain,this.secure))},hi.prototype.remove=function(){this.storage.remove(this.name,!1),this.storage.remove(this.name,!0)},hi.prototype.clear=function(){this.remove(),this.props={}},hi.prototype.register_once=function(t,e,a){return!!Ln.isObject(t)&&(void 0===e&&(e="None"),this.expire_days=void 0===a?this.default_expiry:a,t&&t.$active_feature_flags&&this.receivedFeatureFlags(t.$active_feature_flags),Ln.each(t,(function(t,a){this.props.hasOwnProperty(a)&&this.props[a]!==e||(this.props[a]=t)}),this),this.save(),!0)},hi.prototype.register=function(t,e){return!!Ln.isObject(t)&&(this.expire_days=void 0===e?this.default_expiry:e,t&&t.$active_feature_flags&&this.receivedFeatureFlags(t.$active_feature_flags),Ln.extend(this.props,t),this.save(),!0)},hi.prototype.unregister=function(t){t in this.props&&(delete this.props[t],this.save(),"$active_feature_flags"===t&&this.receivedFeatureFlags([]))},hi.prototype._expire_notification_campaigns=Ln.safewrap((function(){var t=this.props.__cmpns,e=Jr.DEBUG?6e4:36e5;if(t){for(var a in t)1*new Date-t[a]>e&&delete t[a];Ln.isEmptyObject(t)&&delete this.props.__cmpns}})),hi.prototype.update_campaign_params=function(){this.campaign_params_saved||(this.register_once(Ln.info.campaignParams()),this.campaign_params_saved=!0)},hi.prototype.update_search_keyword=function(t){this.register(Ln.info.searchInfo(t))},hi.prototype.update_referrer_info=function(t){this.register_once({$initial_referrer:t||"$direct",$initial_referring_domain:Ln.info.referringDomain(t)||"$direct"},"")},hi.prototype.get_referrer_info=function(){return Ln.strip_empty_properties({$initial_referrer:this.props.$initial_referrer,$initial_referring_domain:this.props.$initial_referring_domain})},hi.prototype.safe_merge=function(t){return Ln.each(this.props,(function(e,a){a in t||(t[a]=e)})),t},hi.prototype.update_config=function(t){this.default_expiry=this.expire_days=t.cookie_expiration,this.set_disabled(t.disable_persistence),this.set_cross_subdomain(t.cross_subdomain_cookie),this.set_secure(t.secure_cookie)},hi.prototype.set_disabled=function(t){this.disabled=t,this.disabled?this.remove():this.save()},hi.prototype.set_cross_subdomain=function(t){t!==this.cross_subdomain&&(this.cross_subdomain=t,this.remove(),this.save())},hi.prototype.get_cross_subdomain=function(){return this.cross_subdomain},hi.prototype.set_secure=function(t){t!==this.secure&&(this.secure=!!t,this.remove(),this.save())},hi.prototype._add_to_people_queue=function(t,e){var a=this._get_queue_key(t),r=e[t],n=this._get_or_create_queue("$set"),i=this._get_or_create_queue("$set_once");"__mps"===a?Ln.extend(n,r):"__mpso"===a&&Ln.each(r,(function(t,e){e in i||(i[e]=t)})),this.save()},hi.prototype._pop_from_people_queue=function(t,e){var a=this._get_queue(t);Ln.isUndefined(a)||(Ln.each(e,(function(t,e){delete a[e]}),this),this.save())},hi.prototype._get_queue_key=function(t){return"$set"===t?"__mps":"$set_once"===t?"__mpso":void kn("Invalid queue:",t)},hi.prototype._get_queue=function(t){return this.props[this._get_queue_key(t)]},hi.prototype._get_or_create_queue=function(t,e){var a=this._get_queue_key(t);return e=Ln.isUndefined(e)?{}:e,this.props[a]||(this.props[a]=e)},hi.prototype.set_event_timer=function(t,e){var a=this.props.__timers||{};a[t]=e,this.props.__timers=a,this.save()},hi.prototype.remove_event_timer=function(t){var e=(this.props.__timers||{})[t];return Ln.isUndefined(e)||(delete this.props.__timers[t],this.save()),e};var ui=function(){},di={},pi=Yr.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,mi=!pi&&-1===xn.indexOf("MSIE")&&-1===xn.indexOf("Mozilla"),vi=Yr.navigator.sendBeacon;vi&&(vi=Ln.bind(vi,yn));var fi,yi={api_host:"https://app.posthog.com",api_method:"POST",api_transport:"XHR",autocapture:!0,cross_subdomain_cookie:-1===gn.location.hostname.indexOf("herokuapp.com"),persistence:"cookie",persistence_name:"",cookie_name:"",loaded:function(){},store_google:!0,save_referrer:!0,test:!1,verbose:!1,img:!1,capture_pageview:!0,debug:!1,capture_links_timeout:300,cookie_expiration:365,upgrade:!1,disable_persistence:!1,disable_cookie:!1,secure_cookie:"https:"===Yr.location.protocol,ip:!0,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_capturing_persistence_type:"localStorage",opt_out_capturing_cookie_prefix:null,property_blacklist:[],sanitize_properties:null,xhr_headers:{},inapp_protocol:"//",inapp_link_new_window:!1,request_batching:!0},gi=!1,bi=function(){},zi=function(t,e,a){var r,n="posthog"===a?si:si[a];if(n&&0===li)r=n;else{if(n&&!Ln.isArray(n))return void kn("You have already initialized "+a);r=new bi}if(r._cached_groups={},r._user_decide_check_complete=!1,r._events_captureed_before_user_decide_check_complete=[],r._init(t,e,a),r.people=new ii,r.people._init(r),r.feature_flags=new oi,r.feature_flags._init(r),Jr.DEBUG=Jr.DEBUG||r.get_config("debug"),r.__autocapture_enabled=r.get_config("autocapture"),r.get_config("autocapture")){$n.enabledForProject(r.get_config("token"),100,100)?$n.isBrowserSupported()?$n.init(r):(r.__autocapture_enabled=!1,Bn("Disabling Automatic Event Collection because this browser is not supported")):(r.__autocapture_enabled=!1,Bn("Not in active bucket: disabling Automatic Event Collection."))}return!Ln.isUndefined(n)&&Ln.isArray(n)&&(r._execute_array.call(r.people,n.people),r._execute_array(n)),r};function xi(t){Yr.console.warn("WARNING! posthog."+t+" is deprecated and will be removed soon! Please use posthog."+t.split("captureing").join("capturing")+' instead (without the "e")!')}bi.prototype.init=function(t,e,a){if(Ln.isUndefined(a))kn("You must name your new library: init(token, config, name)");else{if("posthog"!==a){var r=zi(t,e,a);return si[a]=r,r._loaded(),r}kn("You must initialize the main posthog object right after you include the PostHog js snippet")}},bi.prototype._init=function(t,e,a){this.__loaded=!0,this.config={},this._triggered_notifs=[],this.compression={},this.set_config(Ln.extend({},yi,e,{name:a,token:t,callback_fn:("posthog"===a?a:"posthog."+a)+"._jsc"})),this._jsc=function(){},this._event_queue=[],this._empty_queue_count=0,this._should_poll=!0,this._poller=function(){},this.__dom_loaded_queue=[],this.__request_queue=[],this.__disabled_events=[],this._flags={disable_all_events:!1,identify_called:!1},this.persistence=this.cookie=new hi(this.config),this._gdpr_init();var r=Ln.UUID();this.get_distinct_id()||this.register_once({distinct_id:r,$device_id:r},""),Yr.addEventListener&&Yr.addEventListener("unload",this._handle_unload.bind(this))},bi.prototype._loaded=function(){this.get_config("loaded")(this),this._start_queue_if_opted_in(),this.get_config("capture_pageview")&&this.capture_pageview()},bi.prototype._start_queue_if_opted_in=function(){this.has_opted_out_capturing()||this.get_config("request_batching")&&this._event_queue_poll()},bi.prototype._dom_loaded=function(){Ln.each(this.__dom_loaded_queue,(function(t){this._capture_dom.apply(this,t)}),this),this.has_opted_out_capturing()||Ln.each(this.__request_queue,(function(t){this._send_request.apply(this,t)}),this),delete this.__dom_loaded_queue,delete this.__request_queue,this._start_queue_if_opted_in()},bi.prototype._capture_dom=function(t,e){if(this.get_config("img"))return kn("You can't use DOM capturing functions with img = true."),!1;if(!gi)return this.__dom_loaded_queue.push([t,e]),!1;var a=(new t).init(this);return a.capture.apply(a,e)},bi.prototype._prepare_callback=function(t,e){if(Ln.isUndefined(t))return null;if(pi){return function(a){t(a,e)}}var a=this._jsc,r=""+Math.floor(1e8*Math.random()),n=this.get_config("callback_fn")+"["+r+"]";return a[r]=function(n){delete a[r],t(n,e)},n},bi.prototype._event_enqueue=function(t,e,a,r){this._event_queue.push({url:t,data:e,options:a,callback:r}),this._should_poll||(this._should_poll=!0,this._event_queue_poll())},bi.prototype._format_event_queue_data=function(){const t={};return Ln.each(this._event_queue,(e=>{const{url:a,data:r}=e;void 0===t[a]&&(t[a]=[]),t[a].push(r)})),t},bi.prototype._event_queue_poll=function(){clearInterval(this._poller),this._poller=setTimeout((()=>{if(this._event_queue.length>0){const a=this._format_event_queue_data();for(let r in a){let n=a[r];Ln.each(n,(function(t,e){n[e].offset=Math.abs(n[e].timestamp-new Date),delete n[e].timestamp}));var t=Ln.JSONEncode(n);if(this.compression.lz64){var e=Kr.compressToBase64(t);this._send_request(r,{data:e,compression:"lz64"},di,ui)}else{e=Ln.base64Encode(t);this._send_request(r,{data:e},di,ui)}}this._event_queue.length=0}else this._empty_queue_count++;this._empty_queue_count>4&&(this._should_poll=!1,this._empty_queue_count=0),this._should_poll&&this._event_queue_poll()}),3e3)},bi.prototype._handle_unload=function(){if(!this.get_config("request_batching"))return void this.capture("$pageleave",null,{transport:"sendbeacon"});clearInterval(this._poller),this.capture("$pageleave");let t={};this._event_queue.length>0&&(t=this._format_event_queue_data()),this._event_queue.length=0;for(let e in t)if(this.compression.lz64){const a=Kr.compressToBase64(Ln.JSONEncode(t[e]));this._send_request(e,{data:a,compression:"lz64"},{transport:"sendbeacon"},ui)}else{const a=Ln.base64Encode(Ln.JSONEncode(t[e]));this._send_request(e,{data:a},{transport:"sendbeacon"},ui)}},bi.prototype._send_request=function(t,e,a,r){if(mi)this.__request_queue.push(arguments);else{var n={method:this.get_config("api_method"),transport:this.get_config("api_transport")},i=null;r||!Ln.isFunction(a)&&"string"!=typeof a||(r=a,a=null),a=Ln.extend(n,a||{}),pi||(a.method="GET");var o=vi&&"sendbeacon"===a.transport.toLowerCase(),l=o||"POST"===a.method,s=this.get_config("verbose");e.verbose&&(s=!0),this.get_config("test")&&(e.test=1),s&&(e.verbose=1),this.get_config("img")&&(e.img=1),pi||(r?e.callback=r:(s||this.get_config("test"))&&(e.callback="(function(){})"));var c={};if(c.ip=this.get_config("ip")?1:0,c._=(new Date).getTime().toString(),l&&(i=Array.isArray(e)?"data="+encodeURIComponent(e):"data="+encodeURIComponent(e.data),delete e.data,e.compression&&(i+="&compression="+e.compression,delete e.compression)),t+="?"+Ln.HTTPBuildQuery(c),"img"in e){var h=gn.createElement("img");h.src=t,gn.body.appendChild(h)}else if(o){const e=new Blob([i],{type:"application/x-www-form-urlencoded"});vi(t,e)}else if(pi)try{var u=new XMLHttpRequest;u.open(a.method,t,!0);var d=this.get_config("xhr_headers");l&&(d["Content-Type"]="application/x-www-form-urlencoded"),Ln.each(d,(function(t,e){u.setRequestHeader(e,t)})),u.withCredentials=!0,u.onreadystatechange=function(){if(4===u.readyState)if(200===u.status){if(r){var t;try{t=Ln.JSONDecode(u.responseText)}catch(a){return void kn(a)}r(t)}}else{var e="Bad HTTP status: "+u.status+" "+u.statusText;kn(e),r&&r(s?{status:0,error:e}:0)}},u.send(i)}catch(v){kn(v)}else{var p=gn.createElement("script");p.type="text/javascript",p.async=!0,p.defer=!0,p.src=t;var m=gn.getElementsByTagName("script")[0];m.parentNode.insertBefore(p,m)}}},bi.prototype._execute_array=function(t){var e,a=[],r=[],n=[];Ln.each(t,(function(t){t&&(e=t[0],Ln.isArray(e)?n.push(t):"function"==typeof t?t.call(this):Ln.isArray(t)&&"alias"===e?a.push(t):Ln.isArray(t)&&-1!==e.indexOf("capture")&&"function"==typeof this[e]?n.push(t):r.push(t))}),this);var i=function(t,e){Ln.each(t,(function(t){if(Ln.isArray(t[0])){var a=e;Ln.each(t,(function(t){a=a[t[0]].apply(a,t.slice(1))}))}else this[t[0]].apply(this,t.slice(1))}),e)};i(a,this),i(r,this),i(n,this)},bi.prototype.push=function(t){this._execute_array([t])},bi.prototype.capture=ri((function(t,e,a,r){r||"function"!=typeof a||(r=a,a=null);var n=(a=a||di).transport;if(n&&(a.transport=n),"function"!=typeof r&&(r=ui),Ln.isUndefined(t))return void kn("No event name provided to posthog.capture");if(this._event_is_disabled(t))return void r(0);(e=e||{}).token=this.get_config("token");var i=this.persistence.remove_event_timer(t);if(!Ln.isUndefined(i)){var o=(new Date).getTime()-i;e.$duration=parseFloat((o/1e3).toFixed(3))}this.persistence.update_search_keyword(gn.referrer),this.get_config("store_google")&&this.persistence.update_campaign_params(),this.get_config("save_referrer")&&this.persistence.update_referrer_info(gn.referrer),e=Ln.extend({},Ln.info.properties(),this.persistence.properties(),e);var l=this.get_config("property_blacklist");Ln.isArray(l)?Ln.each(l,(function(t){delete e[t]})):kn("Invalid value for property_blacklist config: "+l);var s=this.get_config("sanitize_properties");s&&(e=s(e,t));var c={event:t,properties:e},h=Ln.truncate(c,255),u=Ln.JSONEncode(h);const d=this.get_config("api_host")+"/e/",p=this._prepare_callback(r,h),m=r!==ui||a!==di;return!this.get_config("request_batching")||m?this.compression.lz64?this._send_request(d,{data:Kr.compressToBase64(u),compression:"lz64"},a,p):this._send_request(d,{data:Ln.base64Encode(u)},a,p):(c.timestamp=new Date,this._event_enqueue(d,c,a,p)),h}),(function(t){return this.get_config(t)}),fi),bi.prototype._create_map_key=function(t,e){return t+"_"+JSON.stringify(e)},bi.prototype._remove_group_from_cache=function(t,e){delete this._cached_groups[this._create_map_key(t,e)]},bi.prototype.capture_pageview=function(t){Ln.isUndefined(t)&&(t=gn.location.href),this.capture("$pageview")},bi.prototype.capture_links=function(){return this._capture_dom.call(this,Wn,arguments)},bi.prototype.capture_forms=function(){return this._capture_dom.call(this,FormCaptureer,arguments)},bi.prototype.register=function(t,e){this.persistence.register(t,e)},bi.prototype.register_once=function(t,e,a){this.persistence.register_once(t,e,a)},bi.prototype.unregister=function(t){this.persistence.unregister(t)},bi.prototype._register_single=function(t,e){var a={};a[t]=e,this.register(a)},bi.prototype.isFeatureEnabled=function(t){return this.feature_flags.isFeatureEnabled(t)},bi.prototype.reloadFeatureFlags=function(){return this.feature_flags.reloadFeatureFlags()},bi.prototype.onFeatureFlags=function(t){this.persistence.addFeatureFlagsHandler(t);const e=this.feature_flags.getFlags();e&&t(e)},bi.prototype.identify=function(t,e,a){if(t){var r=this.get_distinct_id();if(this.register({$user_id:t}),!this.get_property("$device_id")){var n=r;this.register_once({$had_persisted_distinct_id:!0,$device_id:n},"")}t!==r&&t!==this.get_property("__alias")&&(this.unregister("__alias"),this.register({distinct_id:t})),this._flags.identify_called=!0,this.people._flush(e,a),t!==r&&this.capture("$identify",{distinct_id:t,$anon_distinct_id:r}),this.reloadFeatureFlags()}else kn("Unique user id has not been set in posthog.identify")},bi.prototype.reset=function(t){let e=this.get_property("$device_id");this.persistence.clear(),this._flags.identify_called=!1;var a=Ln.UUID();this.register_once({distinct_id:a,$device_id:t?a:e},"")},bi.prototype.get_distinct_id=function(){return this.get_property("distinct_id")},bi.prototype.alias=function(t,e){if(t===this.get_property("$people_distinct_id"))return Cn("Attempting to create alias for existing People user - aborting."),-2;var a=this;return Ln.isUndefined(e)&&(e=this.get_distinct_id()),t!==e?(this._register_single("__alias",t),this.capture("$create_alias",{alias:t,distinct_id:e},(function(){a.identify(t)}))):(kn("alias matches current distinct_id - skipping api call."),this.identify(t),-1)},bi.prototype.set_config=function(t){Ln.isObject(t)&&(Ln.extend(this.config,t),this.get_config("persistence_name")||(this.config.persistence_name=this.config.cookie_name),this.get_config("disable_persistence")||(this.config.disable_persistence=this.config.disable_cookie),this.persistence&&this.persistence.update_config(this.config),Jr.DEBUG=Jr.DEBUG||this.get_config("debug"))},bi.prototype.get_config=function(t){return this.config[t]},bi.prototype.get_property=function(t){return this.persistence.props[t]},bi.prototype.toString=function(){var t=this.get_config("name");return"posthog"!==t&&(t="posthog."+t),t},bi.prototype._event_is_disabled=function(t){return Ln.isBlockedUA(xn)||this._flags.disable_all_events||Ln.include(this.__disabled_events,t)},bi.prototype._gdpr_init=function(){"localStorage"===this.get_config("opt_out_capturing_persistence_type")&&Ln.localStorage.is_supported()&&(!this.has_opted_in_capturing()&&this.has_opted_in_capturing({persistence_type:"cookie"})&&this.opt_in_capturing({enable_persistence:!1}),!this.has_opted_out_capturing()&&this.has_opted_out_capturing({persistence_type:"cookie"})&&this.opt_out_capturing({clear_persistence:!1}),this.clear_opt_in_out_capturing({persistence_type:"cookie",enable_persistence:!1})),this.has_opted_out_capturing()?this._gdpr_update_persistence({clear_persistence:!0}):this.has_opted_in_capturing()||!this.get_config("opt_out_capturing_by_default")&&!Ln.cookie.get("ph_optout")||(Ln.cookie.remove("ph_optout"),this.opt_out_capturing({clear_persistence:this.get_config("opt_out_persistence_by_default")}))},bi.prototype._gdpr_update_persistence=function(t){var e;if(t&&t.clear_persistence)e=!0;else{if(!t||!t.enable_persistence)return;e=!1}this.get_config("disable_persistence")||this.persistence.disabled===e||this.persistence.set_disabled(e)},bi.prototype._gdpr_call_func=function(t,e){return e=Ln.extend({capture:Ln.bind(this.capture,this),persistence_type:this.get_config("opt_out_capturing_persistence_type"),cookie_prefix:this.get_config("opt_out_capturing_cookie_prefix"),cookie_expiration:this.get_config("cookie_expiration"),cross_subdomain_cookie:this.get_config("cross_subdomain_cookie"),secure_cookie:this.get_config("secure_cookie")},e),Ln.localStorage.is_supported()||(e.persistence_type="cookie"),t(this.get_config("token"),{capture:e.capture,captureEventName:e.capture_event_name,captureProperties:e.capture_properties,persistenceType:e.persistence_type,persistencePrefix:e.cookie_prefix,cookieExpiration:e.cookie_expiration,crossSubdomainCookie:e.cross_subdomain_cookie,secureCookie:e.secure_cookie})},bi.prototype.opt_in_capturing=function(t){t=Ln.extend({enable_persistence:!0},t),this._gdpr_call_func(Gn,t),this._gdpr_update_persistence(t)},bi.prototype.opt_in_captureing=function(t){xi("opt_in_captureing"),this.opt_in_capturing(t)},bi.prototype.opt_out_capturing=function(t){(t=Ln.extend({clear_persistence:!0,delete_user:!0},t)).delete_user&&this.people&&this.people._identify_called()&&(this.people.delete_user(),this.people.clear_charges()),this._gdpr_call_func(Yn,t),this._gdpr_update_persistence(t)},bi.prototype.opt_out_captureing=function(t){xi("opt_out_captureing"),this.opt_out_capturing(t)},bi.prototype.has_opted_in_capturing=function(t){return this._gdpr_call_func(Kn,t)},bi.prototype.has_opted_in_captureing=function(t){return xi("has_opted_in_captureing"),this.has_opted_in_capturing(t)},bi.prototype.has_opted_out_capturing=function(t){return this._gdpr_call_func(Jn,t)},bi.prototype.has_opted_out_captureing=function(t){return xi("has_opted_out_captureing"),this.has_opted_out_capturing(t)},bi.prototype.clear_opt_in_out_capturing=function(t){t=Ln.extend({enable_persistence:!0},t),this._gdpr_call_func(Xn,t),this._gdpr_update_persistence(t)},bi.prototype.clear_opt_in_out_captureing=function(t){xi("clear_opt_in_out_captureing"),this.clear_opt_in_out_capturing(t)},bi.prototype.decodeLZ64=Kr.decompressFromBase64,bi.prototype.init=bi.prototype.init,bi.prototype.reset=bi.prototype.reset,bi.prototype.capture=bi.prototype.capture,bi.prototype.capture_links=bi.prototype.capture_links,bi.prototype.capture_forms=bi.prototype.capture_forms,bi.prototype.capture_pageview=bi.prototype.capture_pageview,bi.prototype.register=bi.prototype.register,bi.prototype.register_once=bi.prototype.register_once,bi.prototype.unregister=bi.prototype.unregister,bi.prototype.identify=bi.prototype.identify,bi.prototype.alias=bi.prototype.alias,bi.prototype.set_config=bi.prototype.set_config,bi.prototype.get_config=bi.prototype.get_config,bi.prototype.get_property=bi.prototype.get_property,bi.prototype.get_distinct_id=bi.prototype.get_distinct_id,bi.prototype.toString=bi.prototype.toString,bi.prototype.opt_out_captureing=bi.prototype.opt_out_captureing,bi.prototype.opt_in_captureing=bi.prototype.opt_in_captureing,bi.prototype.has_opted_out_captureing=bi.prototype.has_opted_out_captureing,bi.prototype.has_opted_in_captureing=bi.prototype.has_opted_in_captureing,bi.prototype.clear_opt_in_out_captureing=bi.prototype.clear_opt_in_out_captureing,bi.prototype.opt_out_capturing=bi.prototype.opt_out_capturing,bi.prototype.opt_in_capturing=bi.prototype.opt_in_capturing,bi.prototype.has_opted_out_capturing=bi.prototype.has_opted_out_capturing,bi.prototype.has_opted_in_capturing=bi.prototype.has_opted_in_capturing,bi.prototype.clear_opt_in_out_capturing=bi.prototype.clear_opt_in_out_capturing,bi.prototype.isFeatureEnabled=bi.prototype.isFeatureEnabled,bi.prototype.reloadFeatureFlags=bi.prototype.reloadFeatureFlags,bi.prototype.onFeatureFlags=bi.prototype.onFeatureFlags,bi.prototype.decodeLZ64=bi.prototype.decodeLZ64,hi.prototype.properties=hi.prototype.properties,hi.prototype.update_search_keyword=hi.prototype.update_search_keyword,hi.prototype.update_referrer_info=hi.prototype.update_referrer_info,hi.prototype.get_cross_subdomain=hi.prototype.get_cross_subdomain,hi.prototype.clear=hi.prototype.clear,Ln.safewrap_class(bi,["identify"]);var wi={},Mi=function(){si.init=function(t,e,a){if(a)return si[a]||(si[a]=wi[a]=zi(t,e,a),si[a]._loaded()),si[a];var r=si;wi.posthog?r=wi.posthog:t&&((r=zi(t,e,"posthog"))._loaded(),wi.posthog=r),si=r,1===li&&(Yr.posthog=si),Ln.each(wi,(function(t,e){"posthog"!==e&&(si[e]=t)})),si._=Ln}};var _i=(li=0,si=new bi,Mi(),si.init(),function(){function t(){t.done||(t.done=!0,gi=!0,mi=!1,Ln.each(wi,(function(t){t._dom_loaded()})))}if(gn.addEventListener)"complete"===gn.readyState?t():gn.addEventListener("DOMContentLoaded",t,!1);else if(gn.attachEvent){gn.attachEvent("onreadystatechange",t);var e=!1;try{e=null===Yr.frameElement}catch(a){}gn.documentElement.doScroll&&e&&function e(){try{gn.documentElement.doScroll("left")}catch(a){return void setTimeout(e,1)}t()}()}Ln.register_event(Yr,"load",t,!0)}(),si),Ai=function(t,e){return(Ai=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var a in e)e.hasOwnProperty(a)&&(t[a]=e[a])})(t,e)};function Hi(t,e){function a(){this.constructor=t}Ai(t,e),t.prototype=null===e?Object.create(e):(a.prototype=e.prototype,new a)}var Vi,Li,Bi,ki,Ci,Si,Ei=function(){return(Ei=Object.assign||function(t){for(var e,a=1,r=arguments.length;a<r;a++)for(var n in e=arguments[a])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}).apply(this,arguments)};function Oi(t){var e="function"==typeof Symbol&&Symbol.iterator,a=e&&t[e],r=0;if(a)return a.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ti(t,e){var a="function"==typeof Symbol&&t[Symbol.iterator];if(!a)return t;var r,n,i=a.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)o.push(r.value)}catch(rn){n={error:rn}}finally{try{r&&!r.done&&(a=i.return)&&a.call(i)}finally{if(n)throw n.error}}return o}function Di(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(Ti(arguments[e]));return t}function ji(t){switch(Object.prototype.toString.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return qi(t,Error)}}function Fi(t){return"[object ErrorEvent]"===Object.prototype.toString.call(t)}function Ii(t){return"[object DOMError]"===Object.prototype.toString.call(t)}function Pi(t){return"[object String]"===Object.prototype.toString.call(t)}function Ri(t){return null===t||"object"!=typeof t&&"function"!=typeof t}function Ni(t){return"[object Object]"===Object.prototype.toString.call(t)}function $i(t){return"undefined"!=typeof Event&&qi(t,Event)}function Ui(t){return"undefined"!=typeof Element&&qi(t,Element)}function Wi(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function qi(t,e){try{return t instanceof e}catch(a){return!1}}function Gi(t){try{for(var e=t,a=[],r=0,n=0,i=" > ".length,o=void 0;e&&r++<5&&!("html"===(o=Yi(e))||r>1&&n+a.length*i+o.length>=80);)a.push(o),n+=o.length,e=e.parentNode;return a.reverse().join(" > ")}catch(l){return"<unknown>"}}function Yi(t){var e,a,r,n,i,o=t,l=[];if(!o||!o.tagName)return"";if(l.push(o.tagName.toLowerCase()),o.id&&l.push("#"+o.id),(e=o.className)&&Pi(e))for(a=e.split(/\s+/),i=0;i<a.length;i++)l.push("."+a[i]);var s=["type","name","title","alt"];for(i=0;i<s.length;i++)r=s[i],(n=o.getAttribute(r))&&l.push("["+r+'="'+n+'"]');return l.join("")}(Li=Vi||(Vi={})).Ok="ok",Li.Exited="exited",Li.Crashed="crashed",Li.Abnormal="abnormal",(ki=Bi||(Bi={})).Fatal="fatal",ki.Error="error",ki.Warning="warning",ki.Log="log",ki.Info="info",ki.Debug="debug",ki.Critical="critical",function(t){t.fromString=function(e){switch(e){case"debug":return t.Debug;case"info":return t.Info;case"warn":case"warning":return t.Warning;case"error":return t.Error;case"fatal":return t.Fatal;case"critical":return t.Critical;case"log":default:return t.Log}}}(Bi||(Bi={})),(Si=Ci||(Ci={})).Unknown="unknown",Si.Skipped="skipped",Si.Success="success",Si.RateLimit="rate_limit",Si.Invalid="invalid",Si.Failed="failed",function(t){t.fromHttpCode=function(e){return e>=200&&e<300?t.Success:429===e?t.RateLimit:e>=400&&e<500?t.Invalid:e>=500?t.Failed:t.Unknown}}(Ci||(Ci={}));var Ki=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){return t.__proto__=e,t}:function(t,e){for(var a in e)t.hasOwnProperty(a)||(t[a]=e[a]);return t});var Ji=function(t){function e(e){var a=this.constructor,r=t.call(this,e)||this;return r.message=e,r.name=a.prototype.constructor.name,Ki(r,a.prototype),r}return Hi(e,t),e}(Error),Zi=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/,Xi=function(){function t(t){"string"==typeof t?this._fromString(t):this._fromComponents(t),this._validate()}return t.prototype.toString=function(t){void 0===t&&(t=!1);var e=this,a=e.host,r=e.path,n=e.pass,i=e.port,o=e.projectId;return e.protocol+"://"+e.user+(t&&n?":"+n:"")+"@"+a+(i?":"+i:"")+"/"+(r?r+"/":r)+o},t.prototype._fromString=function(t){var e=Zi.exec(t);if(!e)throw new Ji("Invalid Dsn");var a=Ti(e.slice(1),6),r=a[0],n=a[1],i=a[2],o=void 0===i?"":i,l=a[3],s=a[4],c=void 0===s?"":s,h="",u=a[5],d=u.split("/");if(d.length>1&&(h=d.slice(0,-1).join("/"),u=d.pop()),u){var p=u.match(/^\d+/);p&&(u=p[0])}this._fromComponents({host:l,pass:o,path:h,projectId:u,port:c,protocol:r,user:n})},t.prototype._fromComponents=function(t){this.protocol=t.protocol,this.user=t.user,this.pass=t.pass||"",this.host=t.host,this.port=t.port||"",this.path=t.path||"",this.projectId=t.projectId},t.prototype._validate=function(){var t=this;if(["protocol","user","host","projectId"].forEach((function(e){if(!t[e])throw new Ji("Invalid Dsn: "+e+" missing")})),!this.projectId.match(/^\d+$/))throw new Ji("Invalid Dsn: Invalid projectId "+this.projectId);if("http"!==this.protocol&&"https"!==this.protocol)throw new Ji("Invalid Dsn: Invalid protocol "+this.protocol);if(this.port&&isNaN(parseInt(this.port,10)))throw new Ji("Invalid Dsn: Invalid port "+this.port)},t}(),Qi=function(){function t(){this._hasWeakSet="function"==typeof WeakSet,this._inner=this._hasWeakSet?new WeakSet:[]}return t.prototype.memoize=function(t){if(this._hasWeakSet)return!!this._inner.has(t)||(this._inner.add(t),!1);for(var e=0;e<this._inner.length;e++){if(this._inner[e]===t)return!0}return this._inner.push(t),!1},t.prototype.unmemoize=function(t){if(this._hasWeakSet)this._inner.delete(t);else for(var e=0;e<this._inner.length;e++)if(this._inner[e]===t){this._inner.splice(e,1);break}},t}();function to(t){try{return t&&"function"==typeof t&&t.name||"<anonymous>"}catch(e){return"<anonymous>"}}function eo(t,e){return void 0===e&&(e=0),"string"!=typeof t||0===e||t.length<=e?t:t.substr(0,e)+"..."}function ao(t,e){if(!Array.isArray(t))return"";for(var a=[],r=0;r<t.length;r++){var n=t[r];try{a.push(String(n))}catch(i){a.push("[value cannot be serialized]")}}return a.join(e)}function ro(t,e){return!!Pi(t)&&(a=e,"[object RegExp]"===Object.prototype.toString.call(a)?e.test(t):"string"==typeof e&&-1!==t.indexOf(e));var a}function no(t,e,a){if(e in t){var r=t[e],n=a(r);if("function"==typeof n)try{n.prototype=n.prototype||{},Object.defineProperties(n,{__sentry_original__:{enumerable:!1,value:r}})}catch(i){}t[e]=n}}function io(t){if(ji(t)){var e=t,a={message:e.message,name:e.name,stack:e.stack};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(a[r]=e[r]);return a}if($i(t)){var n=t,i={};i.type=n.type;try{i.target=Ui(n.target)?Gi(n.target):Object.prototype.toString.call(n.target)}catch(o){i.target="<unknown>"}try{i.currentTarget=Ui(n.currentTarget)?Gi(n.currentTarget):Object.prototype.toString.call(n.currentTarget)}catch(o){i.currentTarget="<unknown>"}for(var r in"undefined"!=typeof CustomEvent&&qi(t,CustomEvent)&&(i.detail=n.detail),n)Object.prototype.hasOwnProperty.call(n,r)&&(i[r]=n);return i}return t}function oo(t){return function(t){return~-encodeURI(t).split(/%..|./).length}(JSON.stringify(t))}function lo(t,e,a){void 0===e&&(e=3),void 0===a&&(a=102400);var r=ho(t,e);return oo(r)>a?lo(t,e-1,a):r}function so(t,e){return"domain"===e&&t&&"object"==typeof t&&t._events?"[Domain]":"domainEmitter"===e?"[DomainEmitter]":"undefined"!=typeof global&&t===global?"[Global]":"undefined"!=typeof window&&t===window?"[Window]":"undefined"!=typeof document&&t===document?"[Document]":Ni(a=t)&&"nativeEvent"in a&&"preventDefault"in a&&"stopPropagation"in a?"[SyntheticEvent]":"number"==typeof t&&t!=t?"[NaN]":void 0===t?"[undefined]":"function"==typeof t?"[Function: "+to(t)+"]":"symbol"==typeof t?"["+String(t)+"]":"bigint"==typeof t?"[BigInt: "+String(t)+"]":t;var a}function co(t,e,a,r){if(void 0===a&&(a=1/0),void 0===r&&(r=new Qi),0===a)return function(t){var e=Object.prototype.toString.call(t);if("string"==typeof t)return t;if("[object Object]"===e)return"[Object]";if("[object Array]"===e)return"[Array]";var a=so(t);return Ri(a)?a:e}(e);if(null!=e&&"function"==typeof e.toJSON)return e.toJSON();var n=so(e,t);if(Ri(n))return n;var i=io(e),o=Array.isArray(e)?[]:{};if(r.memoize(e))return"[Circular ~]";for(var l in i)Object.prototype.hasOwnProperty.call(i,l)&&(o[l]=co(l,i[l],a-1,r));return r.unmemoize(e),o}function ho(t,e){try{return JSON.parse(JSON.stringify(t,(function(t,a){return co(t,a,e)})))}catch(a){return"**non-serializable**"}}function uo(t,e){void 0===e&&(e=40);var a=Object.keys(io(t));if(a.sort(),!a.length)return"[object has no keys]";if(a[0].length>=e)return eo(a[0],e);for(var r=a.length;r>0;r--){var n=a.slice(0,r).join(", ");if(!(n.length>e))return r===a.length?n:eo(n,e)}return""}function po(t){var e,a;if(Ni(t)){var r=t,n={};try{for(var i=Oi(Object.keys(r)),o=i.next();!o.done;o=i.next()){var l=o.value;void 0!==r[l]&&(n[l]=po(r[l]))}}catch(s){e={error:s}}finally{try{o&&!o.done&&(a=i.return)&&a.call(i)}finally{if(e)throw e.error}}return n}return Array.isArray(t)?t.map(po):t}function mo(){return"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)}var vo={};function fo(){return mo()?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:vo}function yo(){var t=fo(),e=t.crypto||t.msCrypto;if(void 0!==e&&e.getRandomValues){var a=new Uint16Array(8);e.getRandomValues(a),a[3]=4095&a[3]|16384,a[4]=16383&a[4]|32768;var r=function(t){for(var e=t.toString(16);e.length<4;)e="0"+e;return e};return r(a[0])+r(a[1])+r(a[2])+r(a[3])+r(a[4])+r(a[5])+r(a[6])+r(a[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}))}function go(t){if(!t)return{};var e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};var a=e[6]||"",r=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],relative:e[5]+a+r}}function bo(t){if(t.message)return t.message;if(t.exception&&t.exception.values&&t.exception.values[0]){var e=t.exception.values[0];return e.type&&e.value?e.type+": "+e.value:e.type||e.value||t.event_id||"<unknown>"}return t.event_id||"<unknown>"}function zo(t){var e=fo();if(!("console"in e))return t();var a=e.console,r={};["debug","info","warn","error","log","assert"].forEach((function(t){t in e.console&&a[t].__sentry_original__&&(r[t]=a[t],a[t]=a[t].__sentry_original__)}));var n=t();return Object.keys(r).forEach((function(t){a[t]=r[t]})),n}function xo(t,e,a){t.exception=t.exception||{},t.exception.values=t.exception.values||[],t.exception.values[0]=t.exception.values[0]||{},t.exception.values[0].value=t.exception.values[0].value||e||"",t.exception.values[0].type=t.exception.values[0].type||a||"Error"}function wo(t,e){void 0===e&&(e={});try{t.exception.values[0].mechanism=t.exception.values[0].mechanism||{},Object.keys(e).forEach((function(a){t.exception.values[0].mechanism[a]=e[a]}))}catch(a){}}var Mo=fo(),_o="Sentry Logger ",Ao=function(){function t(){this._enabled=!1}return t.prototype.disable=function(){this._enabled=!1},t.prototype.enable=function(){this._enabled=!0},t.prototype.log=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._enabled&&zo((function(){Mo.console.log(_o+"[Log]: "+t.join(" "))}))},t.prototype.warn=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._enabled&&zo((function(){Mo.console.warn(_o+"[Warn]: "+t.join(" "))}))},t.prototype.error=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._enabled&&zo((function(){Mo.console.error(_o+"[Error]: "+t.join(" "))}))},t}();Mo.__SENTRY__=Mo.__SENTRY__||{};var Ho=Mo.__SENTRY__.logger||(Mo.__SENTRY__.logger=new Ao);function Vo(){if(!("fetch"in fo()))return!1;try{return new Headers,new Request(""),new Response,!0}catch(t){return!1}}function Lo(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function Bo(){if(!Vo())return!1;try{return new Request("_",{referrerPolicy:"origin"}),!0}catch(t){return!1}}var ko,Co=fo(),So={},Eo={};function Oo(t){if(!Eo[t])switch(Eo[t]=!0,t){case"console":!function(){if(!("console"in Co))return;["debug","info","warn","error","log","assert"].forEach((function(t){t in Co.console&&no(Co.console,t,(function(e){return function(){for(var a=[],r=0;r<arguments.length;r++)a[r]=arguments[r];Do("console",{args:a,level:t}),e&&Function.prototype.apply.call(e,Co.console,a)}}))}))}();break;case"dom":!function(){if(!("document"in Co))return;Co.document.addEventListener("click",No("click",Do.bind(null,"dom")),!1),Co.document.addEventListener("keypress",$o(Do.bind(null,"dom")),!1),["EventTarget","Node"].forEach((function(t){var e=Co[t]&&Co[t].prototype;e&&e.hasOwnProperty&&e.hasOwnProperty("addEventListener")&&(no(e,"addEventListener",(function(t){return function(e,a,r){return a&&a.handleEvent?("click"===e&&no(a,"handleEvent",(function(t){return function(e){return No("click",Do.bind(null,"dom"))(e),t.call(this,e)}})),"keypress"===e&&no(a,"handleEvent",(function(t){return function(e){return $o(Do.bind(null,"dom"))(e),t.call(this,e)}}))):("click"===e&&No("click",Do.bind(null,"dom"),!0)(this),"keypress"===e&&$o(Do.bind(null,"dom"))(this)),t.call(this,e,a,r)}})),no(e,"removeEventListener",(function(t){return function(e,a,r){try{t.call(this,e,a.__sentry_wrapped__,r)}catch(n){}return t.call(this,e,a,r)}})))}))}();break;case"xhr":!function(){if(!("XMLHttpRequest"in Co))return;var t=[],e=[],a=XMLHttpRequest.prototype;no(a,"open",(function(a){return function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=this,o=r[1];i.__sentry_xhr__={method:Pi(r[0])?r[0].toUpperCase():r[0],url:r[1]},Pi(o)&&"POST"===i.__sentry_xhr__.method&&o.match(/sentry_key/)&&(i.__sentry_own_request__=!0);var l=function(){if(4===i.readyState){try{i.__sentry_xhr__&&(i.__sentry_xhr__.status_code=i.status)}catch(o){}try{var a=t.indexOf(i);if(-1!==a){t.splice(a);var n=e.splice(a)[0];i.__sentry_xhr__&&void 0!==n[0]&&(i.__sentry_xhr__.body=n[0])}}catch(o){}Do("xhr",{args:r,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:i})}};return"onreadystatechange"in i&&"function"==typeof i.onreadystatechange?no(i,"onreadystatechange",(function(t){return function(){for(var e=[],a=0;a<arguments.length;a++)e[a]=arguments[a];return l(),t.apply(i,e)}})):i.addEventListener("readystatechange",l),a.apply(i,r)}})),no(a,"send",(function(a){return function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return t.push(this),e.push(r),Do("xhr",{args:r,startTimestamp:Date.now(),xhr:this}),a.apply(this,r)}}))}();break;case"fetch":!function(){if(!function(){if(!Vo())return!1;var t=fo();if(Lo(t.fetch))return!0;var e=!1,a=t.document;if(a&&"function"==typeof a.createElement)try{var r=a.createElement("iframe");r.hidden=!0,a.head.appendChild(r),r.contentWindow&&r.contentWindow.fetch&&(e=Lo(r.contentWindow.fetch)),a.head.removeChild(r)}catch(n){Ho.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}())return;no(Co,"fetch",(function(t){return function(){for(var e=[],a=0;a<arguments.length;a++)e[a]=arguments[a];var r={args:e,fetchData:{method:jo(e),url:Fo(e)},startTimestamp:Date.now()};return Do("fetch",Ei({},r)),t.apply(Co,e).then((function(t){return Do("fetch",Ei(Ei({},r),{endTimestamp:Date.now(),response:t})),t}),(function(t){throw Do("fetch",Ei(Ei({},r),{endTimestamp:Date.now(),error:t})),t}))}}))}();break;case"history":!function(){if(t=fo(),e=t.chrome,a=e&&e.app&&e.app.runtime,r="history"in t&&!!t.history.pushState&&!!t.history.replaceState,a||!r)return;var t,e,a,r;var n=Co.onpopstate;function i(t){return function(){for(var e=[],a=0;a<arguments.length;a++)e[a]=arguments[a];var r=e.length>2?e[2]:void 0;if(r){var n=ko,i=String(r);ko=i,Do("history",{from:n,to:i})}return t.apply(this,e)}}Co.onpopstate=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var a=Co.location.href,r=ko;if(ko=a,Do("history",{from:r,to:a}),n)return n.apply(this,t)},no(Co.history,"pushState",i),no(Co.history,"replaceState",i)}();break;case"error":Uo=Co.onerror,Co.onerror=function(t,e,a,r,n){return Do("error",{column:r,error:n,line:a,msg:t,url:e}),!!Uo&&Uo.apply(this,arguments)};break;case"unhandledrejection":Go=Co.onunhandledrejection,Co.onunhandledrejection=function(t){return Do("unhandledrejection",t),!Go||Go.apply(this,arguments)};break;default:Ho.warn("unknown instrumentation type:",t)}}function To(t){t&&"string"==typeof t.type&&"function"==typeof t.callback&&(So[t.type]=So[t.type]||[],So[t.type].push(t.callback),Oo(t.type))}function Do(t,e){var a,r;if(t&&So[t])try{for(var n=Oi(So[t]||[]),i=n.next();!i.done;i=n.next()){var o=i.value;try{o(e)}catch(l){Ho.error("Error while triggering instrumentation handler.\nType: "+t+"\nName: "+to(o)+"\nError: "+l)}}}catch(s){a={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}}function jo(t){return void 0===t&&(t=[]),"Request"in Co&&qi(t[0],Request)&&t[0].method?String(t[0].method).toUpperCase():t[1]&&t[1].method?String(t[1].method).toUpperCase():"GET"}function Fo(t){return void 0===t&&(t=[]),"string"==typeof t[0]?t[0]:"Request"in Co&&qi(t[0],Request)?t[0].url:String(t[0])}var Io,Po,Ro=0;function No(t,e,a){return void 0===a&&(a=!1),function(r){Io=void 0,r&&Po!==r&&(Po=r,Ro&&clearTimeout(Ro),a?Ro=setTimeout((function(){e({event:r,name:t})})):e({event:r,name:t}))}}function $o(t){return function(e){var a;try{a=e.target}catch(n){return}var r=a&&a.tagName;r&&("INPUT"===r||"TEXTAREA"===r||a.isContentEditable)&&(Io||No("input",t)(e),clearTimeout(Io),Io=setTimeout((function(){Io=void 0}),1e3))}}var Uo=null;var Wo,qo,Go=null;(qo=Wo||(Wo={})).PENDING="PENDING",qo.RESOLVED="RESOLVED",qo.REJECTED="REJECTED";var Yo=function(){function t(t){var e=this;this._state=Wo.PENDING,this._handlers=[],this._resolve=function(t){e._setResult(Wo.RESOLVED,t)},this._reject=function(t){e._setResult(Wo.REJECTED,t)},this._setResult=function(t,a){e._state===Wo.PENDING&&(Wi(a)?a.then(e._resolve,e._reject):(e._state=t,e._value=a,e._executeHandlers()))},this._attachHandler=function(t){e._handlers=e._handlers.concat(t),e._executeHandlers()},this._executeHandlers=function(){if(e._state!==Wo.PENDING){var t=e._handlers.slice();e._handlers=[],t.forEach((function(t){t.done||(e._state===Wo.RESOLVED&&t.onfulfilled&&t.onfulfilled(e._value),e._state===Wo.REJECTED&&t.onrejected&&t.onrejected(e._value),t.done=!0)}))}};try{t(this._resolve,this._reject)}catch(a){this._reject(a)}}return t.resolve=function(e){return new t((function(t){t(e)}))},t.reject=function(e){return new t((function(t,a){a(e)}))},t.all=function(e){return new t((function(a,r){if(Array.isArray(e))if(0!==e.length){var n=e.length,i=[];e.forEach((function(e,o){t.resolve(e).then((function(t){i[o]=t,0===(n-=1)&&a(i)})).then(null,r)}))}else a([]);else r(new TypeError("Promise.all requires an array as input."))}))},t.prototype.then=function(e,a){var r=this;return new t((function(t,n){r._attachHandler({done:!1,onfulfilled:function(a){if(e)try{return void t(e(a))}catch(r){return void n(r)}else t(a)},onrejected:function(e){if(a)try{return void t(a(e))}catch(r){return void n(r)}else n(e)}})}))},t.prototype.catch=function(t){return this.then((function(t){return t}),t)},t.prototype.finally=function(e){var a=this;return new t((function(t,r){var n,i;return a.then((function(t){i=!1,n=t,e&&e()}),(function(t){i=!0,n=t,e&&e()})).then((function(){i?r(n):t(n)}))}))},t.prototype.toString=function(){return"[object SyncPromise]"},t}(),Ko=function(){function t(t){this._limit=t,this._buffer=[]}return t.prototype.isReady=function(){return void 0===this._limit||this.length()<this._limit},t.prototype.add=function(t){var e=this;return this.isReady()?(-1===this._buffer.indexOf(t)&&this._buffer.push(t),t.then((function(){return e.remove(t)})).then(null,(function(){return e.remove(t).then(null,(function(){}))})),t):Yo.reject(new Ji("Not adding Promise due to buffer limit reached."))},t.prototype.remove=function(t){return this._buffer.splice(this._buffer.indexOf(t),1)[0]},t.prototype.length=function(){return this._buffer.length},t.prototype.drain=function(t){var e=this;return new Yo((function(a){var r=setTimeout((function(){t&&t>0&&a(!1)}),t);Yo.all(e._buffer).then((function(){clearTimeout(r),a(!0)})).then(null,(function(){a(!0)}))}))},t}(),Jo={nowSeconds:function(){return Date.now()/1e3}};var Zo=mo()?function(){try{return(t=module,e="perf_hooks",t.require(e)).performance}catch(a){return}var t,e}():function(){var t=fo().performance;if(t&&t.now)return{now:function(){return t.now()},timeOrigin:Date.now()-t.now()}}(),Xo=void 0===Zo?Jo:{nowSeconds:function(){return(Zo.timeOrigin+Zo.now())/1e3}},Qo=Jo.nowSeconds.bind(Jo);Xo.nowSeconds.bind(Xo),function(){var t=fo().performance;if(t)t.timeOrigin?t.timeOrigin:t.timing&&t.timing.navigationStart||Date.now()}();var tl=function(){function t(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._user={},this._tags={},this._extra={},this._contexts={}}return t.clone=function(e){var a=new t;return e&&(a._breadcrumbs=Di(e._breadcrumbs),a._tags=Ei({},e._tags),a._extra=Ei({},e._extra),a._contexts=Ei({},e._contexts),a._user=e._user,a._level=e._level,a._span=e._span,a._session=e._session,a._transactionName=e._transactionName,a._fingerprint=e._fingerprint,a._eventProcessors=Di(e._eventProcessors)),a},t.prototype.addScopeListener=function(t){this._scopeListeners.push(t)},t.prototype.addEventProcessor=function(t){return this._eventProcessors.push(t),this},t.prototype.setUser=function(t){return this._user=t||{},this._session&&this._session.update({user:t}),this._notifyScopeListeners(),this},t.prototype.getUser=function(){return this._user},t.prototype.setTags=function(t){return this._tags=Ei(Ei({},this._tags),t),this._notifyScopeListeners(),this},t.prototype.setTag=function(t,e){var a;return this._tags=Ei(Ei({},this._tags),((a={})[t]=e,a)),this._notifyScopeListeners(),this},t.prototype.setExtras=function(t){return this._extra=Ei(Ei({},this._extra),t),this._notifyScopeListeners(),this},t.prototype.setExtra=function(t,e){var a;return this._extra=Ei(Ei({},this._extra),((a={})[t]=e,a)),this._notifyScopeListeners(),this},t.prototype.setFingerprint=function(t){return this._fingerprint=t,this._notifyScopeListeners(),this},t.prototype.setLevel=function(t){return this._level=t,this._notifyScopeListeners(),this},t.prototype.setTransactionName=function(t){return this._transactionName=t,this._notifyScopeListeners(),this},t.prototype.setTransaction=function(t){return this.setTransactionName(t)},t.prototype.setContext=function(t,e){var a;return null===e?delete this._contexts[t]:this._contexts=Ei(Ei({},this._contexts),((a={})[t]=e,a)),this._notifyScopeListeners(),this},t.prototype.setSpan=function(t){return this._span=t,this._notifyScopeListeners(),this},t.prototype.getSpan=function(){return this._span},t.prototype.getTransaction=function(){var t,e,a,r,n=this.getSpan();return(null===(t=n)||void 0===t?void 0:t.transaction)?null===(e=n)||void 0===e?void 0:e.transaction:(null===(r=null===(a=n)||void 0===a?void 0:a.spanRecorder)||void 0===r?void 0:r.spans[0])?n.spanRecorder.spans[0]:void 0},t.prototype.setSession=function(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this},t.prototype.getSession=function(){return this._session},t.prototype.update=function(e){if(!e)return this;if("function"==typeof e){var a=e(this);return a instanceof t?a:this}return e instanceof t?(this._tags=Ei(Ei({},this._tags),e._tags),this._extra=Ei(Ei({},this._extra),e._extra),this._contexts=Ei(Ei({},this._contexts),e._contexts),e._user&&Object.keys(e._user).length&&(this._user=e._user),e._level&&(this._level=e._level),e._fingerprint&&(this._fingerprint=e._fingerprint)):Ni(e)&&(e=e,this._tags=Ei(Ei({},this._tags),e.tags),this._extra=Ei(Ei({},this._extra),e.extra),this._contexts=Ei(Ei({},this._contexts),e.contexts),e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint)),this},t.prototype.clear=function(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this},t.prototype.addBreadcrumb=function(t,e){var a=Ei({timestamp:Qo()},t);return this._breadcrumbs=void 0!==e&&e>=0?Di(this._breadcrumbs,[a]).slice(-e):Di(this._breadcrumbs,[a]),this._notifyScopeListeners(),this},t.prototype.clearBreadcrumbs=function(){return this._breadcrumbs=[],this._notifyScopeListeners(),this},t.prototype.applyToEvent=function(t,e){var a;if(this._extra&&Object.keys(this._extra).length&&(t.extra=Ei(Ei({},this._extra),t.extra)),this._tags&&Object.keys(this._tags).length&&(t.tags=Ei(Ei({},this._tags),t.tags)),this._user&&Object.keys(this._user).length&&(t.user=Ei(Ei({},this._user),t.user)),this._contexts&&Object.keys(this._contexts).length&&(t.contexts=Ei(Ei({},this._contexts),t.contexts)),this._level&&(t.level=this._level),this._transactionName&&(t.transaction=this._transactionName),this._span){t.contexts=Ei({trace:this._span.getTraceContext()},t.contexts);var r=null===(a=this._span.transaction)||void 0===a?void 0:a.name;r&&(t.tags=Ei({transaction:r},t.tags))}return this._applyFingerprint(t),t.breadcrumbs=Di(t.breadcrumbs||[],this._breadcrumbs),t.breadcrumbs=t.breadcrumbs.length>0?t.breadcrumbs:void 0,this._notifyEventProcessors(Di(el(),this._eventProcessors),t,e)},t.prototype._notifyEventProcessors=function(t,e,a,r){var n=this;return void 0===r&&(r=0),new Yo((function(i,o){var l=t[r];if(null===e||"function"!=typeof l)i(e);else{var s=l(Ei({},e),a);Wi(s)?s.then((function(e){return n._notifyEventProcessors(t,e,a,r+1).then(i)})).then(null,o):n._notifyEventProcessors(t,s,a,r+1).then(i).then(null,o)}}))},t.prototype._notifyScopeListeners=function(){var t=this;this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((function(e){e(t)})),this._notifyingListeners=!1)},t.prototype._applyFingerprint=function(t){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],this._fingerprint&&(t.fingerprint=t.fingerprint.concat(this._fingerprint)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint},t}();function el(){var t=fo();return t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.globalEventProcessors=t.__SENTRY__.globalEventProcessors||[],t.__SENTRY__.globalEventProcessors}function al(t){el().push(t)}var rl=function(){function t(t){this.errors=0,this.sid=yo(),this.timestamp=Date.now(),this.started=Date.now(),this.duration=0,this.status=Vi.Ok,t&&this.update(t)}return t.prototype.update=function(t){void 0===t&&(t={}),t.user&&(t.user.ip_address&&(this.ipAddress=t.user.ip_address),t.did||(this.did=t.user.id||t.user.email||t.user.username)),this.timestamp=t.timestamp||Date.now(),t.sid&&(this.sid=32===t.sid.length?t.sid:yo()),t.did&&(this.did=""+t.did),"number"==typeof t.started&&(this.started=t.started),"number"==typeof t.duration?this.duration=t.duration:this.duration=this.timestamp-this.started,t.release&&(this.release=t.release),t.environment&&(this.environment=t.environment),t.ipAddress&&(this.ipAddress=t.ipAddress),t.userAgent&&(this.userAgent=t.userAgent),"number"==typeof t.errors&&(this.errors=t.errors),t.status&&(this.status=t.status)},t.prototype.close=function(t){t?this.update({status:t}):this.status===Vi.Ok?this.update({status:Vi.Exited}):this.update()},t.prototype.toJSON=function(){return po({sid:""+this.sid,init:!0,started:new Date(this.started).toISOString(),timestamp:new Date(this.timestamp).toISOString(),status:this.status,errors:this.errors,did:"number"==typeof this.did||"string"==typeof this.did?""+this.did:void 0,duration:this.duration,attrs:po({release:this.release,environment:this.environment,ip_address:this.ipAddress,user_agent:this.userAgent})})},t}(),nl=function(){function t(t,e,a){void 0===e&&(e=new tl),void 0===a&&(a=3),this._version=a,this._stack=[{}],this.getStackTop().scope=e,this.bindClient(t)}return t.prototype.isOlderThan=function(t){return this._version<t},t.prototype.bindClient=function(t){this.getStackTop().client=t,t&&t.setupIntegrations&&t.setupIntegrations()},t.prototype.pushScope=function(){var t=tl.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:t}),t},t.prototype.popScope=function(){return!(this.getStack().length<=1)&&!!this.getStack().pop()},t.prototype.withScope=function(t){var e=this.pushScope();try{t(e)}finally{this.popScope()}},t.prototype.getClient=function(){return this.getStackTop().client},t.prototype.getScope=function(){return this.getStackTop().scope},t.prototype.getStack=function(){return this._stack},t.prototype.getStackTop=function(){return this._stack[this._stack.length-1]},t.prototype.captureException=function(t,e){var a=this._lastEventId=yo(),r=e;if(!e){var n=void 0;try{throw new Error("Sentry syntheticException")}catch(i){n=i}r={originalException:t,syntheticException:n}}return this._invokeClient("captureException",t,Ei(Ei({},r),{event_id:a})),a},t.prototype.captureMessage=function(t,e,a){var r=this._lastEventId=yo(),n=a;if(!a){var i=void 0;try{throw new Error(t)}catch(o){i=o}n={originalException:t,syntheticException:i}}return this._invokeClient("captureMessage",t,e,Ei(Ei({},n),{event_id:r})),r},t.prototype.captureEvent=function(t,e){var a=this._lastEventId=yo();return this._invokeClient("captureEvent",t,Ei(Ei({},e),{event_id:a})),a},t.prototype.lastEventId=function(){return this._lastEventId},t.prototype.addBreadcrumb=function(t,e){var a=this.getStackTop(),r=a.scope,n=a.client;if(r&&n){var i=n.getOptions&&n.getOptions()||{},o=i.beforeBreadcrumb,l=void 0===o?null:o,s=i.maxBreadcrumbs,c=void 0===s?100:s;if(!(c<=0)){var h=Qo(),u=Ei({timestamp:h},t),d=l?zo((function(){return l(u,e)})):u;null!==d&&r.addBreadcrumb(d,Math.min(c,100))}}},t.prototype.setUser=function(t){var e=this.getScope();e&&e.setUser(t)},t.prototype.setTags=function(t){var e=this.getScope();e&&e.setTags(t)},t.prototype.setExtras=function(t){var e=this.getScope();e&&e.setExtras(t)},t.prototype.setTag=function(t,e){var a=this.getScope();a&&a.setTag(t,e)},t.prototype.setExtra=function(t,e){var a=this.getScope();a&&a.setExtra(t,e)},t.prototype.setContext=function(t,e){var a=this.getScope();a&&a.setContext(t,e)},t.prototype.configureScope=function(t){var e=this.getStackTop(),a=e.scope,r=e.client;a&&r&&t(a)},t.prototype.run=function(t){var e=ol(this);try{t(this)}finally{ol(e)}},t.prototype.getIntegration=function(t){var e=this.getClient();if(!e)return null;try{return e.getIntegration(t)}catch(a){return Ho.warn("Cannot retrieve integration "+t.id+" from the current Hub"),null}},t.prototype.startSpan=function(t){return this._callExtensionMethod("startSpan",t)},t.prototype.startTransaction=function(t,e){return this._callExtensionMethod("startTransaction",t,e)},t.prototype.traceHeaders=function(){return this._callExtensionMethod("traceHeaders")},t.prototype.startSession=function(t){this.endSession();var e=this.getStackTop(),a=e.scope,r=e.client,n=r&&r.getOptions()||{},i=n.release,o=n.environment,l=new rl(Ei(Ei({release:i,environment:o},a&&{user:a.getUser()}),t));return a&&a.setSession(l),l},t.prototype.endSession=function(){var t=this.getStackTop(),e=t.scope,a=t.client;if(e){var r=e.getSession&&e.getSession();r&&(r.close(),a&&a.captureSession&&a.captureSession(r),e.setSession())}},t.prototype._invokeClient=function(t){for(var e,a=[],r=1;r<arguments.length;r++)a[r-1]=arguments[r];var n=this.getStackTop(),i=n.scope,o=n.client;o&&o[t]&&(e=o)[t].apply(e,Di(a,[i]))},t.prototype._callExtensionMethod=function(t){for(var e=[],a=1;a<arguments.length;a++)e[a-1]=arguments[a];var r=il(),n=r.__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[t])return n.extensions[t].apply(this,e);Ho.warn("Extension method "+t+" couldn't be found, doing nothing.")},t}();function il(){var t=fo();return t.__SENTRY__=t.__SENTRY__||{extensions:{},hub:void 0},t}function ol(t){var e=il(),a=cl(e);return hl(e,t),a}function ll(){var t=il();return sl(t)&&!cl(t).isOlderThan(3)||hl(t,new nl),mo()?function(t){try{var e=(r=il().__SENTRY__)&&r.extensions&&r.extensions.domain&&r.extensions.domain.active;if(!e)return cl(t);if(!sl(e)||cl(e).isOlderThan(3)){var a=cl(t).getStackTop();hl(e,new nl(a.client,tl.clone(a.scope)))}return cl(e)}catch(n){return cl(t)}var r}(t):cl(t)}function sl(t){return!!(t&&t.__SENTRY__&&t.__SENTRY__.hub)}function cl(t){return t&&t.__SENTRY__&&t.__SENTRY__.hub||(t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.hub=new nl),t.__SENTRY__.hub}function hl(t,e){return!!t&&(t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.hub=e,!0)}function ul(t){for(var e=[],a=1;a<arguments.length;a++)e[a-1]=arguments[a];var r=ll();if(r&&r[t])return r[t].apply(r,Di(e));throw new Error("No hub defined or "+t+" was not found on the hub, please open a bug report.")}function dl(t,e){var a;try{throw new Error("Sentry syntheticException")}catch(r){a=r}return ul("captureException",t,{captureContext:e,originalException:t,syntheticException:a})}function pl(t){ul("configureScope",t)}function ml(t){ul("withScope",t)}var vl=function(){function t(t,e){void 0===e&&(e={}),this.dsn=t,this.metadata=e,this._dsnObject=new Xi(t)}return t.prototype.getDsn=function(){return this._dsnObject},t.prototype.getBaseApiEndpoint=function(){var t=this._dsnObject,e=t.protocol?t.protocol+":":"",a=t.port?":"+t.port:"";return e+"//"+t.host+a+(t.path?"/"+t.path:"")+"/api/"},t.prototype.getStoreEndpoint=function(){return this._getIngestEndpoint("store")},t.prototype.getStoreEndpointWithUrlEncodedAuth=function(){return this.getStoreEndpoint()+"?"+this._encodedAuth()},t.prototype.getEnvelopeEndpointWithUrlEncodedAuth=function(){return this._getEnvelopeEndpoint()+"?"+this._encodedAuth()},t.prototype.getStoreEndpointPath=function(){var t=this._dsnObject;return(t.path?"/"+t.path:"")+"/api/"+t.projectId+"/store/"},t.prototype.getRequestHeaders=function(t,e){var a=this._dsnObject,r=["Sentry sentry_version=7"];return r.push("sentry_client="+t+"/"+e),r.push("sentry_key="+a.user),a.pass&&r.push("sentry_secret="+a.pass),{"Content-Type":"application/json","X-Sentry-Auth":r.join(", ")}},t.prototype.getReportDialogEndpoint=function(t){void 0===t&&(t={});var e=this._dsnObject,a=this.getBaseApiEndpoint()+"embed/error-page/",r=[];for(var n in r.push("dsn="+e.toString()),t)if("dsn"!==n)if("user"===n){if(!t.user)continue;t.user.name&&r.push("name="+encodeURIComponent(t.user.name)),t.user.email&&r.push("email="+encodeURIComponent(t.user.email))}else r.push(encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return r.length?a+"?"+r.join("&"):a},t.prototype._getEnvelopeEndpoint=function(){return this._getIngestEndpoint("envelope")},t.prototype._getIngestEndpoint=function(t){return""+this.getBaseApiEndpoint()+this._dsnObject.projectId+"/"+t+"/"},t.prototype._encodedAuth=function(){var t,e={sentry_key:this._dsnObject.user,sentry_version:"7"};return t=e,Object.keys(t).map((function(e){return encodeURIComponent(e)+"="+encodeURIComponent(t[e])})).join("&")},t}(),fl=[];function yl(t){var e={};return function(t){var e=t.defaultIntegrations&&Di(t.defaultIntegrations)||[],a=t.integrations,r=[];if(Array.isArray(a)){var n=a.map((function(t){return t.name})),i=[];e.forEach((function(t){-1===n.indexOf(t.name)&&-1===i.indexOf(t.name)&&(r.push(t),i.push(t.name))})),a.forEach((function(t){-1===i.indexOf(t.name)&&(r.push(t),i.push(t.name))}))}else"function"==typeof a?(r=a(e),r=Array.isArray(r)?r:[r]):r=Di(e);var o=r.map((function(t){return t.name})),l="Debug";return-1!==o.indexOf(l)&&r.push.apply(r,Di(r.splice(o.indexOf(l),1))),r}(t).forEach((function(t){e[t.name]=t,function(t){-1===fl.indexOf(t.name)&&(t.setupOnce(al,ll),fl.push(t.name),Ho.log("Integration installed: "+t.name))}(t)})),e}var gl=function(){function t(t,e){this._integrations={},this._processing=0,this._backend=new t(e),this._options=e,e.dsn&&(this._dsn=new Xi(e.dsn))}return t.prototype.captureException=function(t,e,a){var r=this,n=e&&e.event_id;return this._process(this._getBackend().eventFromException(t,e).then((function(t){return r._captureEvent(t,e,a)})).then((function(t){n=t}))),n},t.prototype.captureMessage=function(t,e,a,r){var n=this,i=a&&a.event_id,o=Ri(t)?this._getBackend().eventFromMessage(String(t),e,a):this._getBackend().eventFromException(t,a);return this._process(o.then((function(t){return n._captureEvent(t,a,r)})).then((function(t){i=t}))),i},t.prototype.captureEvent=function(t,e,a){var r=e&&e.event_id;return this._process(this._captureEvent(t,e,a).then((function(t){r=t}))),r},t.prototype.captureSession=function(t){t.release?this._sendSession(t):Ho.warn("Discarded session because of missing release")},t.prototype.getDsn=function(){return this._dsn},t.prototype.getOptions=function(){return this._options},t.prototype.flush=function(t){var e=this;return this._isClientProcessing(t).then((function(a){return e._getBackend().getTransport().close(t).then((function(t){return a&&t}))}))},t.prototype.close=function(t){var e=this;return this.flush(t).then((function(t){return e.getOptions().enabled=!1,t}))},t.prototype.setupIntegrations=function(){this._isEnabled()&&(this._integrations=yl(this._options))},t.prototype.getIntegration=function(t){try{return this._integrations[t.id]||null}catch(e){return Ho.warn("Cannot retrieve integration "+t.id+" from the current Client"),null}},t.prototype._updateSessionFromEvent=function(t,e){var a,r,n,i=!1,o=!1,l=e.exception&&e.exception.values;if(l){o=!0;try{for(var s=Oi(l),c=s.next();!c.done;c=s.next()){var h=c.value.mechanism;if(h&&!1===h.handled){i=!0;break}}}catch(m){a={error:m}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(a)throw a.error}}}var u=e.user;if(!t.userAgent){var d=e.request?e.request.headers:{};for(var p in d)if("user-agent"===p.toLowerCase()){n=d[p];break}}t.update(Ei(Ei({},i&&{status:Vi.Crashed}),{user:u,userAgent:n,errors:t.errors+Number(o||i)}))},t.prototype._sendSession=function(t){this._getBackend().sendSession(t)},t.prototype._isClientProcessing=function(t){var e=this;return new Yo((function(a){var r=0,n=setInterval((function(){0==e._processing?(clearInterval(n),a(!0)):(r+=1,t&&r>=t&&(clearInterval(n),a(!1)))}),1)}))},t.prototype._getBackend=function(){return this._backend},t.prototype._isEnabled=function(){return!1!==this.getOptions().enabled&&void 0!==this._dsn},t.prototype._prepareEvent=function(t,e,a){var r=this,n=this.getOptions().normalizeDepth,i=void 0===n?3:n,o=Ei(Ei({},t),{event_id:t.event_id||(a&&a.event_id?a.event_id:yo()),timestamp:t.timestamp||Qo()});this._applyClientOptions(o),this._applyIntegrationsMetadata(o);var l=e;a&&a.captureContext&&(l=tl.clone(l).update(a.captureContext));var s=Yo.resolve(o);return l&&(s=l.applyToEvent(o,a)),s.then((function(t){return"number"==typeof i&&i>0?r._normalizeEvent(t,i):t}))},t.prototype._normalizeEvent=function(t,e){if(!t)return null;var a=Ei(Ei(Ei(Ei(Ei({},t),t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map((function(t){return Ei(Ei({},t),t.data&&{data:ho(t.data,e)})}))}),t.user&&{user:ho(t.user,e)}),t.contexts&&{contexts:ho(t.contexts,e)}),t.extra&&{extra:ho(t.extra,e)});return t.contexts&&t.contexts.trace&&(a.contexts.trace=t.contexts.trace),a},t.prototype._applyClientOptions=function(t){var e=this.getOptions(),a=e.environment,r=e.release,n=e.dist,i=e.maxValueLength,o=void 0===i?250:i;"environment"in t||(t.environment="environment"in e?a:"production"),void 0===t.release&&void 0!==r&&(t.release=r),void 0===t.dist&&void 0!==n&&(t.dist=n),t.message&&(t.message=eo(t.message,o));var l=t.exception&&t.exception.values&&t.exception.values[0];l&&l.value&&(l.value=eo(l.value,o));var s=t.request;s&&s.url&&(s.url=eo(s.url,o))},t.prototype._applyIntegrationsMetadata=function(t){var e=t.sdk,a=Object.keys(this._integrations);e&&a.length>0&&(e.integrations=a)},t.prototype._sendEvent=function(t){this._getBackend().sendEvent(t)},t.prototype._captureEvent=function(t,e,a){return this._processEvent(t,e,a).then((function(t){return t.event_id}),(function(t){Ho.error(t)}))},t.prototype._processEvent=function(t,e,a){var r=this,n=this.getOptions(),i=n.beforeSend,o=n.sampleRate;if(!this._isEnabled())return Yo.reject(new Ji("SDK not enabled, will not send event."));var l="transaction"===t.type;return!l&&"number"==typeof o&&Math.random()>o?Yo.reject(new Ji("Discarding event because it's not included in the random sample (sampling rate = "+o+")")):this._prepareEvent(t,a,e).then((function(t){if(null===t)throw new Ji("An event processor returned null, will not send event.");if(e&&e.data&&!0===e.data.__sentry__||l||!i)return t;var a=i(t,e);if(void 0===a)throw new Ji("`beforeSend` method has to return `null` or a valid event.");return Wi(a)?a.then((function(t){return t}),(function(t){throw new Ji("beforeSend rejected with "+t)})):a})).then((function(t){if(null===t)throw new Ji("`beforeSend` returned `null`, will not send event.");var e=a&&a.getSession&&a.getSession();return!l&&e&&r._updateSessionFromEvent(e,t),r._sendEvent(t),t})).then(null,(function(t){if(t instanceof Ji)throw t;throw r.captureException(t,{data:{__sentry__:!0},originalException:t}),new Ji("Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: "+t)}))},t.prototype._process=function(t){var e=this;this._processing+=1,t.then((function(t){return e._processing-=1,t}),(function(t){return e._processing-=1,t}))},t}(),bl=function(){function t(){}return t.prototype.sendEvent=function(t){return Yo.resolve({reason:"NoopTransport: Event has been skipped because no Dsn is configured.",status:Ci.Skipped})},t.prototype.close=function(t){return Yo.resolve(!0)},t}(),zl=function(){function t(t){this._options=t,this._options.dsn||Ho.warn("No DSN provided, backend will not do anything."),this._transport=this._setupTransport()}return t.prototype.eventFromException=function(t,e){throw new Ji("Backend has to implement `eventFromException` method")},t.prototype.eventFromMessage=function(t,e,a){throw new Ji("Backend has to implement `eventFromMessage` method")},t.prototype.sendEvent=function(t){this._transport.sendEvent(t).then(null,(function(t){Ho.error("Error while sending event: "+t)}))},t.prototype.sendSession=function(t){this._transport.sendSession?this._transport.sendSession(t).then(null,(function(t){Ho.error("Error while sending session: "+t)})):Ho.warn("Dropping session because custom transport doesn't implement sendSession")},t.prototype.getTransport=function(){return this._transport},t.prototype._setupTransport=function(){return new bl},t}();function xl(t){if(t.metadata&&t.metadata.sdk){var e=t.metadata.sdk;return{name:e.name,version:e.version}}}function wl(t,e){return e?(t.sdk=t.sdk||{name:e.name,version:e.version},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=Di(t.sdk.integrations||[],e.integrations||[]),t.sdk.packages=Di(t.sdk.packages||[],e.packages||[]),t):t}function Ml(t,e){var a=xl(e);return{body:JSON.stringify(Ei({sent_at:(new Date).toISOString()},a&&{sdk:a}))+"\n"+JSON.stringify({type:"session"})+"\n"+JSON.stringify(t),type:"session",url:e.getEnvelopeEndpointWithUrlEncodedAuth()}}function _l(t,e){var a=t.tags||{},r=a.__sentry_samplingMethod,n=a.__sentry_sampleRate,i=function(t,e){var a={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(a[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(t);n<r.length;n++)e.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(t,r[n])&&(a[r[n]]=t[r[n]])}return a}(a,["__sentry_samplingMethod","__sentry_sampleRate"]);t.tags=i;var o=xl(e),l=t.type||"event",s="transaction"===l,c={body:JSON.stringify(o?wl(t,e.metadata.sdk):t),type:l,url:s?e.getEnvelopeEndpointWithUrlEncodedAuth():e.getStoreEndpointWithUrlEncodedAuth()};if(s){var h=JSON.stringify(Ei({event_id:t.event_id,sent_at:(new Date).toISOString()},o&&{sdk:o}))+"\n"+JSON.stringify({type:t.type,sample_rates:[{id:r,rate:n}]})+"\n"+c.body;c.body=h}return c}var Al,Hl=function(){function t(){this.name=t.id}return t.prototype.setupOnce=function(){Al=Function.prototype.toString,Function.prototype.toString=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var a=this.__sentry_original__||this;return Al.apply(a,t)}},t.id="FunctionToString",t}(),Vl=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],Ll=function(){function t(e){void 0===e&&(e={}),this._options=e,this.name=t.id}return t.prototype.setupOnce=function(){al((function(e){var a=ll();if(!a)return e;var r=a.getIntegration(t);if(r){var n=a.getClient(),i=n?n.getOptions():{},o=r._mergeOptions(i);if(r._shouldDropEvent(e,o))return null}return e}))},t.prototype._shouldDropEvent=function(t,e){return this._isSentryError(t,e)?(Ho.warn("Event dropped due to being internal Sentry Error.\nEvent: "+bo(t)),!0):this._isIgnoredError(t,e)?(Ho.warn("Event dropped due to being matched by `ignoreErrors` option.\nEvent: "+bo(t)),!0):this._isDeniedUrl(t,e)?(Ho.warn("Event dropped due to being matched by `denyUrls` option.\nEvent: "+bo(t)+".\nUrl: "+this._getEventFilterUrl(t)),!0):!this._isAllowedUrl(t,e)&&(Ho.warn("Event dropped due to not being matched by `allowUrls` option.\nEvent: "+bo(t)+".\nUrl: "+this._getEventFilterUrl(t)),!0)},t.prototype._isSentryError=function(t,e){if(!e.ignoreInternal)return!1;try{return t&&t.exception&&t.exception.values&&t.exception.values[0]&&"SentryError"===t.exception.values[0].type||!1}catch(a){return!1}},t.prototype._isIgnoredError=function(t,e){return!(!e.ignoreErrors||!e.ignoreErrors.length)&&this._getPossibleEventMessages(t).some((function(t){return e.ignoreErrors.some((function(e){return ro(t,e)}))}))},t.prototype._isDeniedUrl=function(t,e){if(!e.denyUrls||!e.denyUrls.length)return!1;var a=this._getEventFilterUrl(t);return!!a&&e.denyUrls.some((function(t){return ro(a,t)}))},t.prototype._isAllowedUrl=function(t,e){if(!e.allowUrls||!e.allowUrls.length)return!0;var a=this._getEventFilterUrl(t);return!a||e.allowUrls.some((function(t){return ro(a,t)}))},t.prototype._mergeOptions=function(t){return void 0===t&&(t={}),{allowUrls:Di(this._options.whitelistUrls||[],this._options.allowUrls||[],t.whitelistUrls||[],t.allowUrls||[]),denyUrls:Di(this._options.blacklistUrls||[],this._options.denyUrls||[],t.blacklistUrls||[],t.denyUrls||[]),ignoreErrors:Di(this._options.ignoreErrors||[],t.ignoreErrors||[],Vl),ignoreInternal:void 0===this._options.ignoreInternal||this._options.ignoreInternal}},t.prototype._getPossibleEventMessages=function(t){if(t.message)return[t.message];if(t.exception)try{var e=t.exception.values&&t.exception.values[0]||{},a=e.type,r=void 0===a?"":a,n=e.value,i=void 0===n?"":n;return[""+i,r+": "+i]}catch(o){return Ho.error("Cannot extract message for event "+bo(t)),[]}return[]},t.prototype._getEventFilterUrl=function(t){try{if(t.stacktrace){var e=t.stacktrace.frames;return e&&e[e.length-1].filename||null}if(t.exception){var a=t.exception.values&&t.exception.values[0].stacktrace&&t.exception.values[0].stacktrace.frames;return a&&a[a.length-1].filename||null}return null}catch(r){return Ho.error("Cannot extract url for event "+bo(t)),null}},t.id="InboundFilters",t}(),Bl=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,kl=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Cl=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,Sl=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,El=/\((\S*)(?::(\d+))(?::(\d+))\)/,Ol=/Minified React error #\d+;/i;function Tl(t){var e=null,a=0;t&&("number"==typeof t.framesToPop?a=t.framesToPop:Ol.test(t.message)&&(a=1));try{if(e=function(t){if(!t||!t.stacktrace)return null;for(var e,a=t.stacktrace,r=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,n=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\((.*)\))? in (.*):\s*$/i,i=a.split("\n"),o=[],l=0;l<i.length;l+=2){var s=null;(e=r.exec(i[l]))?s={url:e[2],func:e[3],args:[],line:+e[1],column:null}:(e=n.exec(i[l]))&&(s={url:e[6],func:e[3]||e[4],args:e[5]?e[5].split(","):[],line:+e[1],column:+e[2]}),s&&(!s.func&&s.line&&(s.func="?"),o.push(s))}if(!o.length)return null;return{message:jl(t),name:t.name,stack:o}}(t))return Dl(e,a)}catch(r){}try{if(e=function(t){if(!t||!t.stack)return null;for(var e,a,r,n=[],i=t.stack.split("\n"),o=0;o<i.length;++o){if(a=Bl.exec(i[o])){var l=a[2]&&0===a[2].indexOf("native");a[2]&&0===a[2].indexOf("eval")&&(e=El.exec(a[2]))&&(a[2]=e[1],a[3]=e[2],a[4]=e[3]),r={url:a[2]&&0===a[2].indexOf("address at ")?a[2].substr("address at ".length):a[2],func:a[1]||"?",args:l?[a[2]]:[],line:a[3]?+a[3]:null,column:a[4]?+a[4]:null}}else if(a=Cl.exec(i[o]))r={url:a[2],func:a[1]||"?",args:[],line:+a[3],column:a[4]?+a[4]:null};else{if(!(a=kl.exec(i[o])))continue;a[3]&&a[3].indexOf(" > eval")>-1&&(e=Sl.exec(a[3]))?(a[1]=a[1]||"eval",a[3]=e[1],a[4]=e[2],a[5]=""):0!==o||a[5]||void 0===t.columnNumber||(n[0].column=t.columnNumber+1),r={url:a[3],func:a[1]||"?",args:a[2]?a[2].split(","):[],line:a[4]?+a[4]:null,column:a[5]?+a[5]:null}}!r.func&&r.line&&(r.func="?"),n.push(r)}if(!n.length)return null;return{message:jl(t),name:t.name,stack:n}}(t))return Dl(e,a)}catch(r){}return{message:jl(t),name:t&&t.name,stack:[],failed:!0}}function Dl(t,e){try{return Ei(Ei({},t),{stack:t.stack.slice(e)})}catch(a){return t}}function jl(t){var e=t&&t.message;return e?e.error&&"string"==typeof e.error.message?e.error.message:e:"No error message"}function Fl(t){var e=Pl(t.stack),a={type:t.name,value:t.message};return e&&e.length&&(a.stacktrace={frames:e}),void 0===a.type&&""===a.value&&(a.value="Unrecoverable error caught"),a}function Il(t){return{exception:{values:[Fl(t)]}}}function Pl(t){if(!t||!t.length)return[];var e=t,a=e[0].func||"",r=e[e.length-1].func||"";return-1===a.indexOf("captureMessage")&&-1===a.indexOf("captureException")||(e=e.slice(1)),-1!==r.indexOf("sentryWrapped")&&(e=e.slice(0,-1)),e.slice(0,50).map((function(t){return{colno:null===t.column?void 0:t.column,filename:t.url||e[0].url,function:t.func||"?",in_app:!0,lineno:null===t.line?void 0:t.line}})).reverse()}function Rl(t,e,a){var r,n;if(void 0===a&&(a={}),Fi(t)&&t.error)return r=Il(Tl(t=t.error));if(Ii(t)||(n=t,"[object DOMException]"===Object.prototype.toString.call(n))){var i=t,o=i.name||(Ii(i)?"DOMError":"DOMException"),l=i.message?o+": "+i.message:o;return xo(r=Nl(l,e,a),l),"code"in i&&(r.tags=Ei(Ei({},r.tags),{"DOMException.code":""+i.code})),r}return ji(t)?r=Il(Tl(t)):Ni(t)||$i(t)?(wo(r=function(t,e,a){var r={exception:{values:[{type:$i(t)?t.constructor.name:a?"UnhandledRejection":"Error",value:"Non-Error "+(a?"promise rejection":"exception")+" captured with keys: "+uo(t)}]},extra:{__serialized__:lo(t)}};if(e){var n=Pl(Tl(e).stack);r.stacktrace={frames:n}}return r}(t,e,a.rejection),{synthetic:!0}),r):(xo(r=Nl(t,e,a),""+t,void 0),wo(r,{synthetic:!0}),r)}function Nl(t,e,a){void 0===a&&(a={});var r={message:t};if(a.attachStacktrace&&e){var n=Pl(Tl(e).stack);r.stacktrace={frames:n}}return r}var $l=function(){function t(t){this.options=t,this._buffer=new Ko(30),this._rateLimits={},this._api=new vl(t.dsn,t._metadata),this.url=this._api.getStoreEndpointWithUrlEncodedAuth()}return t.prototype.sendEvent=function(t){throw new Ji("Transport Class has to implement `sendEvent` method")},t.prototype.close=function(t){return this._buffer.drain(t)},t.prototype._handleResponse=function(t){var e=t.requestType,a=t.response,r=t.headers,n=t.resolve,i=t.reject,o=Ci.fromHttpCode(a.status);this._handleRateLimit(r)&&Ho.warn("Too many requests, backing off until: "+this._disabledUntil(e)),o!==Ci.Success?i(a):n({status:o})},t.prototype._disabledUntil=function(t){return this._rateLimits[t]||this._rateLimits.all},t.prototype._isRateLimited=function(t){return this._disabledUntil(t)>new Date(Date.now())},t.prototype._handleRateLimit=function(t){var e,a,r,n,i=Date.now(),o=t["x-sentry-rate-limits"],l=t["retry-after"];if(o){try{for(var s=Oi(o.trim().split(",")),c=s.next();!c.done;c=s.next()){var h=c.value.split(":",2),u=parseInt(h[0],10),d=1e3*(isNaN(u)?60:u);try{for(var p=(r=void 0,Oi(h[1].split(";"))),m=p.next();!m.done;m=p.next()){var v=m.value;this._rateLimits[v||"all"]=new Date(i+d)}}catch(f){r={error:f}}finally{try{m&&!m.done&&(n=p.return)&&n.call(p)}finally{if(r)throw r.error}}}}catch(y){e={error:y}}finally{try{c&&!c.done&&(a=s.return)&&a.call(s)}finally{if(e)throw e.error}}return!0}return!!l&&(this._rateLimits.all=new Date(i+function(t,e){if(!e)return 6e4;var a=parseInt(""+e,10);if(!isNaN(a))return 1e3*a;var r=Date.parse(""+e);return isNaN(r)?6e4:r-t}(i,l)),!0)},t}(),Ul=fo(),Wl=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Hi(e,t),e.prototype.sendEvent=function(t){return this._sendRequest(_l(t,this._api),t)},e.prototype.sendSession=function(t){return this._sendRequest(Ml(t,this._api),t)},e.prototype._sendRequest=function(t,e){var a=this;if(this._isRateLimited(t.type))return Promise.reject({event:e,type:t.type,reason:"Transport locked till "+this._disabledUntil(t.type)+" due to too many requests.",status:429});var r={body:t.body,method:"POST",referrerPolicy:Bo()?"origin":""};return void 0!==this.options.fetchParameters&&Object.assign(r,this.options.fetchParameters),void 0!==this.options.headers&&(r.headers=this.options.headers),this._buffer.add(new Yo((function(e,n){Ul.fetch(t.url,r).then((function(r){var i={"x-sentry-rate-limits":r.headers.get("X-Sentry-Rate-Limits"),"retry-after":r.headers.get("Retry-After")};a._handleResponse({requestType:t.type,response:r,headers:i,resolve:e,reject:n})})).catch(n)})))},e}($l),ql=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Hi(e,t),e.prototype.sendEvent=function(t){return this._sendRequest(_l(t,this._api),t)},e.prototype.sendSession=function(t){return this._sendRequest(Ml(t,this._api),t)},e.prototype._sendRequest=function(t,e){var a=this;return this._isRateLimited(t.type)?Promise.reject({event:e,type:t.type,reason:"Transport locked till "+this._disabledUntil(t.type)+" due to too many requests.",status:429}):this._buffer.add(new Yo((function(e,r){var n=new XMLHttpRequest;for(var i in n.onreadystatechange=function(){if(4===n.readyState){var i={"x-sentry-rate-limits":n.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":n.getResponseHeader("Retry-After")};a._handleResponse({requestType:t.type,response:n,headers:i,resolve:e,reject:r})}},n.open("POST",t.url),a.options.headers)a.options.headers.hasOwnProperty(i)&&n.setRequestHeader(i,a.options.headers[i]);n.send(t.body)})))},e}($l),Gl=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Hi(e,t),e.prototype.eventFromException=function(t,e){return function(t,e,a){var r=Rl(e,a&&a.syntheticException||void 0,{attachStacktrace:t.attachStacktrace});return wo(r,{handled:!0,type:"generic"}),r.level=Bi.Error,a&&a.event_id&&(r.event_id=a.event_id),Yo.resolve(r)}(this._options,t,e)},e.prototype.eventFromMessage=function(t,e,a){return void 0===e&&(e=Bi.Info),function(t,e,a,r){void 0===a&&(a=Bi.Info);var n=Nl(e,r&&r.syntheticException||void 0,{attachStacktrace:t.attachStacktrace});return n.level=a,r&&r.event_id&&(n.event_id=r.event_id),Yo.resolve(n)}(this._options,t,e,a)},e.prototype._setupTransport=function(){if(!this._options.dsn)return t.prototype._setupTransport.call(this);var e=Ei(Ei({},this._options.transportOptions),{dsn:this._options.dsn,_metadata:this._options._metadata});return this._options.transport?new this._options.transport(e):Vo()?new Wl(e):new ql(e)},e}(zl),Yl=0;function Kl(){return Yl>0}function Jl(){Yl+=1,setTimeout((function(){Yl-=1}))}function Zl(t,e,a){if(void 0===e&&(e={}),"function"!=typeof t)return t;try{if(t.__sentry__)return t;if(t.__sentry_wrapped__)return t.__sentry_wrapped__}catch(i){return t}var r=function(){var r=Array.prototype.slice.call(arguments);try{a&&"function"==typeof a&&a.apply(this,arguments);var n=r.map((function(t){return Zl(t,e)}));return t.handleEvent?t.handleEvent.apply(this,n):t.apply(this,n)}catch(i){throw Jl(),ml((function(t){t.addEventProcessor((function(t){var a=Ei({},t);return e.mechanism&&(xo(a,void 0,void 0),wo(a,e.mechanism)),a.extra=Ei(Ei({},a.extra),{arguments:r}),a})),dl(i)})),i}};try{for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}catch(o){}t.prototype=t.prototype||{},r.prototype=t.prototype,Object.defineProperty(t,"__sentry_wrapped__",{enumerable:!1,value:r}),Object.defineProperties(r,{__sentry__:{enumerable:!1,value:!0},__sentry_original__:{enumerable:!1,value:t}});try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get:function(){return t.name}})}catch(o){}return r}var Xl=function(){function t(e){this.name=t.id,this._onErrorHandlerInstalled=!1,this._onUnhandledRejectionHandlerInstalled=!1,this._options=Ei({onerror:!0,onunhandledrejection:!0},e)}return t.prototype.setupOnce=function(){Error.stackTraceLimit=50,this._options.onerror&&(Ho.log("Global Handler attached: onerror"),this._installGlobalOnErrorHandler()),this._options.onunhandledrejection&&(Ho.log("Global Handler attached: onunhandledrejection"),this._installGlobalOnUnhandledRejectionHandler())},t.prototype._installGlobalOnErrorHandler=function(){var e=this;this._onErrorHandlerInstalled||(To({callback:function(a){var r=a.error,n=ll(),i=n.getIntegration(t),o=r&&!0===r.__sentry_own_request__;if(i&&!Kl()&&!o){var l=n.getClient(),s=Ri(r)?e._eventFromIncompleteOnError(a.msg,a.url,a.line,a.column):e._enhanceEventWithInitialFrame(Rl(r,void 0,{attachStacktrace:l&&l.getOptions().attachStacktrace,rejection:!1}),a.url,a.line,a.column);wo(s,{handled:!1,type:"onerror"}),n.captureEvent(s,{originalException:r})}},type:"error"}),this._onErrorHandlerInstalled=!0)},t.prototype._installGlobalOnUnhandledRejectionHandler=function(){var e=this;this._onUnhandledRejectionHandlerInstalled||(To({callback:function(a){var r=a;try{"reason"in a?r=a.reason:"detail"in a&&"reason"in a.detail&&(r=a.detail.reason)}catch(c){}var n=ll(),i=n.getIntegration(t),o=r&&!0===r.__sentry_own_request__;if(!i||Kl()||o)return!0;var l=n.getClient(),s=Ri(r)?e._eventFromRejectionWithPrimitive(r):Rl(r,void 0,{attachStacktrace:l&&l.getOptions().attachStacktrace,rejection:!0});s.level=Bi.Error,wo(s,{handled:!1,type:"onunhandledrejection"}),n.captureEvent(s,{originalException:r})},type:"unhandledrejection"}),this._onUnhandledRejectionHandlerInstalled=!0)},t.prototype._eventFromIncompleteOnError=function(t,e,a,r){var n,i=Fi(t)?t.message:t;if(Pi(i)){var o=i.match(/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i);o&&(n=o[1],i=o[2])}var l={exception:{values:[{type:n||"Error",value:i}]}};return this._enhanceEventWithInitialFrame(l,e,a,r)},t.prototype._eventFromRejectionWithPrimitive=function(t){return{exception:{values:[{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(t)}]}}},t.prototype._enhanceEventWithInitialFrame=function(t,e,a,r){t.exception=t.exception||{},t.exception.values=t.exception.values||[],t.exception.values[0]=t.exception.values[0]||{},t.exception.values[0].stacktrace=t.exception.values[0].stacktrace||{},t.exception.values[0].stacktrace.frames=t.exception.values[0].stacktrace.frames||[];var n=isNaN(parseInt(r,10))?void 0:r,i=isNaN(parseInt(a,10))?void 0:a,o=Pi(e)&&e.length>0?e:function(){try{return document.location.href}catch(t){return""}}();return 0===t.exception.values[0].stacktrace.frames.length&&t.exception.values[0].stacktrace.frames.push({colno:n,filename:o,function:"?",in_app:!0,lineno:i}),t},t.id="GlobalHandlers",t}(),Ql=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],ts=function(){function t(e){this.name=t.id,this._options=Ei({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},e)}return t.prototype.setupOnce=function(){var t=fo();(this._options.setTimeout&&no(t,"setTimeout",this._wrapTimeFunction.bind(this)),this._options.setInterval&&no(t,"setInterval",this._wrapTimeFunction.bind(this)),this._options.requestAnimationFrame&&no(t,"requestAnimationFrame",this._wrapRAF.bind(this)),this._options.XMLHttpRequest&&"XMLHttpRequest"in t&&no(XMLHttpRequest.prototype,"send",this._wrapXHR.bind(this)),this._options.eventTarget)&&(Array.isArray(this._options.eventTarget)?this._options.eventTarget:Ql).forEach(this._wrapEventTarget.bind(this))},t.prototype._wrapTimeFunction=function(t){return function(){for(var e=[],a=0;a<arguments.length;a++)e[a]=arguments[a];var r=e[0];return e[0]=Zl(r,{mechanism:{data:{function:to(t)},handled:!0,type:"instrument"}}),t.apply(this,e)}},t.prototype._wrapRAF=function(t){return function(e){return t.call(this,Zl(e,{mechanism:{data:{function:"requestAnimationFrame",handler:to(t)},handled:!0,type:"instrument"}}))}},t.prototype._wrapEventTarget=function(t){var e=fo(),a=e[t]&&e[t].prototype;a&&a.hasOwnProperty&&a.hasOwnProperty("addEventListener")&&(no(a,"addEventListener",(function(e){return function(a,r,n){try{"function"==typeof r.handleEvent&&(r.handleEvent=Zl(r.handleEvent.bind(r),{mechanism:{data:{function:"handleEvent",handler:to(r),target:t},handled:!0,type:"instrument"}}))}catch(i){}return e.call(this,a,Zl(r,{mechanism:{data:{function:"addEventListener",handler:to(r),target:t},handled:!0,type:"instrument"}}),n)}})),no(a,"removeEventListener",(function(t){return function(e,a,r){var n,i=a;try{var o=null===(n=i)||void 0===n?void 0:n.__sentry_wrapped__;o&&t.call(this,e,o,r)}catch(l){}return t.call(this,e,i,r)}})))},t.prototype._wrapXHR=function(t){return function(){for(var e=[],a=0;a<arguments.length;a++)e[a]=arguments[a];var r=this,n=["onload","onerror","onprogress","onreadystatechange"];return n.forEach((function(t){t in r&&"function"==typeof r[t]&&no(r,t,(function(e){var a={mechanism:{data:{function:t,handler:to(e)},handled:!0,type:"instrument"}};return e.__sentry_original__&&(a.mechanism.data.handler=to(e.__sentry_original__)),Zl(e,a)}))})),t.apply(this,e)}},t.id="TryCatch",t}(),es=function(){function t(e){this.name=t.id,this._options=Ei({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},e)}return t.prototype.addSentryBreadcrumb=function(t){this._options.sentry&&ll().addBreadcrumb({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:bo(t)},{event:t})},t.prototype.setupOnce=function(){var t=this;this._options.console&&To({callback:function(){for(var e=[],a=0;a<arguments.length;a++)e[a]=arguments[a];t._consoleBreadcrumb.apply(t,Di(e))},type:"console"}),this._options.dom&&To({callback:function(){for(var e=[],a=0;a<arguments.length;a++)e[a]=arguments[a];t._domBreadcrumb.apply(t,Di(e))},type:"dom"}),this._options.xhr&&To({callback:function(){for(var e=[],a=0;a<arguments.length;a++)e[a]=arguments[a];t._xhrBreadcrumb.apply(t,Di(e))},type:"xhr"}),this._options.fetch&&To({callback:function(){for(var e=[],a=0;a<arguments.length;a++)e[a]=arguments[a];t._fetchBreadcrumb.apply(t,Di(e))},type:"fetch"}),this._options.history&&To({callback:function(){for(var e=[],a=0;a<arguments.length;a++)e[a]=arguments[a];t._historyBreadcrumb.apply(t,Di(e))},type:"history"})},t.prototype._consoleBreadcrumb=function(t){var e={category:"console",data:{arguments:t.args,logger:"console"},level:Bi.fromString(t.level),message:ao(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;e.message="Assertion failed: "+(ao(t.args.slice(1)," ")||"console.assert"),e.data.arguments=t.args.slice(1)}ll().addBreadcrumb(e,{input:t.args,level:t.level})},t.prototype._domBreadcrumb=function(t){var e;try{e=t.event.target?Gi(t.event.target):Gi(t.event)}catch(a){e="<unknown>"}0!==e.length&&ll().addBreadcrumb({category:"ui."+t.name,message:e},{event:t.event,name:t.name})},t.prototype._xhrBreadcrumb=function(t){if(t.endTimestamp){if(t.xhr.__sentry_own_request__)return;var e=t.xhr.__sentry_xhr__||{},a=e.method,r=e.url,n=e.status_code,i=e.body;ll().addBreadcrumb({category:"xhr",data:{method:a,url:r,status_code:n},type:"http"},{xhr:t.xhr,input:i})}else;},t.prototype._fetchBreadcrumb=function(t){t.endTimestamp&&(t.fetchData.url.match(/sentry_key/)&&"POST"===t.fetchData.method||(t.error?ll().addBreadcrumb({category:"fetch",data:t.fetchData,level:Bi.Error,type:"http"},{data:t.error,input:t.args}):ll().addBreadcrumb({category:"fetch",data:Ei(Ei({},t.fetchData),{status_code:t.response.status}),type:"http"},{input:t.args,response:t.response})))},t.prototype._historyBreadcrumb=function(t){var e=fo(),a=t.from,r=t.to,n=go(e.location.href),i=go(a),o=go(r);i.path||(i=n),n.protocol===o.protocol&&n.host===o.host&&(r=o.relative),n.protocol===i.protocol&&n.host===i.host&&(a=i.relative),ll().addBreadcrumb({category:"navigation",data:{from:a,to:r}})},t.id="Breadcrumbs",t}(),as=function(){function t(e){void 0===e&&(e={}),this.name=t.id,this._key=e.key||"cause",this._limit=e.limit||5}return t.prototype.setupOnce=function(){al((function(e,a){var r=ll().getIntegration(t);return r?r._handler(e,a):e}))},t.prototype._handler=function(t,e){if(!(t.exception&&t.exception.values&&e&&qi(e.originalException,Error)))return t;var a=this._walkErrorTree(e.originalException,this._key);return t.exception.values=Di(a,t.exception.values),t},t.prototype._walkErrorTree=function(t,e,a){if(void 0===a&&(a=[]),!qi(t[e],Error)||a.length+1>=this._limit)return a;var r=Fl(Tl(t[e]));return this._walkErrorTree(t[e],e,Di([r],a))},t.id="LinkedErrors",t}(),rs=fo(),ns=function(){function t(){this.name=t.id}return t.prototype.setupOnce=function(){al((function(e){var a,r,n;if(ll().getIntegration(t)){if(!rs.navigator&&!rs.location&&!rs.document)return e;var i=(null===(a=e.request)||void 0===a?void 0:a.url)||(null===(r=rs.location)||void 0===r?void 0:r.href),o=(rs.document||{}).referrer,l=(rs.navigator||{}).userAgent,s=Ei(Ei(Ei({},null===(n=e.request)||void 0===n?void 0:n.headers),o&&{Referer:o}),l&&{"User-Agent":l}),c=Ei(Ei({},i&&{url:i}),{headers:s});return Ei(Ei({},e),{request:c})}return e}))},t.id="UserAgent",t}(),is=function(t){function e(e){return void 0===e&&(e={}),t.call(this,Gl,e)||this}return Hi(e,t),e.prototype.showReportDialog=function(t){void 0===t&&(t={}),fo().document&&(this._isEnabled()?function(t){if(void 0===t&&(t={}),t.eventId)if(t.dsn){var e=document.createElement("script");e.async=!0,e.src=new vl(t.dsn).getReportDialogEndpoint(t),t.onLoad&&(e.onload=t.onLoad),(document.head||document.body).appendChild(e)}else Ho.error("Missing dsn option in showReportDialog call");else Ho.error("Missing eventId option in showReportDialog call")}(Ei(Ei({},t),{dsn:t.dsn||this.getDsn()})):Ho.error("Trying to call showReportDialog with Sentry Client disabled"))},e.prototype._prepareEvent=function(e,a,r){return e.platform=e.platform||"javascript",t.prototype._prepareEvent.call(this,e,a,r)},e.prototype._sendEvent=function(e){var a=this.getIntegration(es);a&&a.addSentryBreadcrumb(e),t.prototype._sendEvent.call(this,e)},e}(gl),os=[new Ll,new Hl,new ts,new es,new Xl,new as,new ns];function ls(t){if(void 0===t&&(t={}),void 0===t.defaultIntegrations&&(t.defaultIntegrations=os),void 0===t.release){var e=fo();e.SENTRY_RELEASE&&e.SENTRY_RELEASE.id&&(t.release=e.SENTRY_RELEASE.id)}void 0===t.autoSessionTracking&&(t.autoSessionTracking=!0),t._metadata=t._metadata||{},t._metadata.sdk={name:"sentry.javascript.browser",packages:[{name:"npm:@sentry/browser",version:"6.0.0"}],version:"6.0.0"},function(t,e){!0===e.debug&&Ho.enable();var a=ll(),r=new t(e);a.bindClient(r)}(is,t),t.autoSessionTracking&&function(){var t=fo(),e=ll(),a="complete"===document.readyState,r=!1,n=function(){r&&a&&e.endSession()},i=function(){a=!0,n(),t.removeEventListener("load",i)};e.startSession(),a||t.addEventListener("load",i);try{var o=new PerformanceObserver((function(t,e){t.getEntries().forEach((function(t){"first-contentful-paint"===t.name&&t.startTime<l&&(e.disconnect(),r=!0,n())}))})),l="hidden"===document.visibilityState?0:1/0;document.addEventListener("visibilitychange",(function(t){l=Math.min(l,t.timeStamp)}),{once:!0}),o.observe({type:"paint",buffered:!0})}catch(s){r=!0,n()}To({callback:function(){var t;(null===(t=ll().getScope())||void 0===t?void 0:t.getSession())||(e.startSession(),e.endSession())},type:"history"})}()}var ss=1;var cs,hs,us,ds={nextValue:function(){return(ss=(9301*ss+49297)%233280)/233280},seed:function(t){ss=t}},ps="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-";function ms(){us=!1}function vs(t){if(t){if(t!==cs){if(t.length!==ps.length)throw new Error("Custom alphabet for shortid must be "+ps.length+" unique characters. You submitted "+t.length+" characters: "+t);var e=t.split("").filter((function(t,e,a){return e!==a.lastIndexOf(t)}));if(e.length)throw new Error("Custom alphabet for shortid must be "+ps.length+" unique characters. These characters were not unique: "+e.join(", "));cs=t,ms()}}else cs!==ps&&(cs=ps,ms())}function fs(){return us||(us=function(){cs||vs(ps);for(var t,e=cs.split(""),a=[],r=ds.nextValue();e.length>0;)r=ds.nextValue(),t=Math.floor(r*e.length),a.push(e.splice(t,1)[0]);return a.join("")}())}var ys={get:function(){return cs||ps},characters:function(t){return vs(t),cs},seed:function(t){ds.seed(t),hs!==t&&(ms(),hs=t)},lookup:function(t){return fs()[t]},shuffled:fs},gs="object"==typeof window&&(window.crypto||window.msCrypto),bs=gs&&gs.getRandomValues?function(t){return gs.getRandomValues(new Uint8Array(t))}:function(t){for(var e=[],a=0;a<t;a++)e.push(Math.floor(256*Math.random()));return e},zs=function(t,e,a){for(var r=(2<<Math.log(e.length-1)/Math.LN2)-1,n=-~(1.6*r*a/e.length),i="";;)for(var o=t(n),l=n;l--;)if((i+=e[o[l]&r]||"").length===+a)return i};var xs,ws,Ms=function(t){for(var e,a=0,r="";!e;)r+=zs(bs,ys.get(),1),e=t<Math.pow(16,a+1),a++;return r};var _s=function(t){var e="",a=Math.floor(.001*(Date.now()-1567752802062));return a===ws?xs++:(xs=0,ws=a),e+=Ms(7),e+=Ms(t),xs>0&&(e+=Ms(xs)),e+=Ms(a)};var As=function(t){return!(!t||"string"!=typeof t||t.length<6)&&!new RegExp("[^"+ys.get().replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&")+"]").test(t)},Hs=kr((function(t){var e=0;function a(){return _s(e)}t.exports=a,t.exports.generate=a,t.exports.seed=function(e){return ys.seed(e),t.exports},t.exports.worker=function(a){return e=a,t.exports},t.exports.characters=function(t){return void 0!==t&&ys.characters(t),ys.shuffled()},t.exports.isValid=As})),Vs=kr((function(t,e){(function(){var a,r="Expected a function",n="__lodash_hash_undefined__",i="__lodash_placeholder__",o=16,l=32,s=64,c=128,h=256,u=1/0,d=9007199254740991,p=NaN,m=4294967295,v=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",o],["flip",512],["partial",l],["partialRight",s],["rearg",h]],f="[object Arguments]",y="[object Array]",g="[object Boolean]",b="[object Date]",z="[object Error]",x="[object Function]",w="[object GeneratorFunction]",M="[object Map]",_="[object Number]",A="[object Object]",H="[object Promise]",V="[object RegExp]",L="[object Set]",B="[object String]",k="[object Symbol]",C="[object WeakMap]",S="[object ArrayBuffer]",E="[object DataView]",O="[object Float32Array]",T="[object Float64Array]",D="[object Int8Array]",j="[object Int16Array]",F="[object Int32Array]",I="[object Uint8Array]",P="[object Uint8ClampedArray]",R="[object Uint16Array]",N="[object Uint32Array]",$=/\b__p \+= '';/g,U=/\b(__p \+=) '' \+/g,W=/(__e\(.*?\)|\b__t\)) \+\n'';/g,q=/&(?:amp|lt|gt|quot|#39);/g,G=/[&<>"']/g,Y=RegExp(q.source),K=RegExp(G.source),J=/<%-([\s\S]+?)%>/g,Z=/<%([\s\S]+?)%>/g,X=/<%=([\s\S]+?)%>/g,Q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,tt=/^\w*$/,et=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,at=/[\\^$.*+?()[\]{}|]/g,rt=RegExp(at.source),nt=/^\s+/,it=/\s/,ot=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,lt=/\{\n\/\* \[wrapped with (.+)\] \*/,st=/,? & /,ct=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ht=/[()=,{}\[\]\/\s]/,ut=/\\(\\)?/g,dt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pt=/\w*$/,mt=/^[-+]0x[0-9a-f]+$/i,vt=/^0b[01]+$/i,ft=/^\[object .+?Constructor\]$/,yt=/^0o[0-7]+$/i,gt=/^(?:0|[1-9]\d*)$/,bt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,zt=/($^)/,xt=/['\n\r\u2028\u2029\\]/g,wt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Mt="\\u2700-\\u27bf",_t="a-z\\xdf-\\xf6\\xf8-\\xff",At="A-Z\\xc0-\\xd6\\xd8-\\xde",Ht="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Vt="['’]",Lt="[\\ud800-\\udfff]",Bt="["+Ht+"]",kt="["+wt+"]",Ct="\\d+",St="[\\u2700-\\u27bf]",Et="["+_t+"]",Ot="[^\\ud800-\\udfff"+Ht+Ct+Mt+_t+At+"]",Tt="\\ud83c[\\udffb-\\udfff]",Dt="[^\\ud800-\\udfff]",jt="(?:\\ud83c[\\udde6-\\uddff]){2}",Ft="[\\ud800-\\udbff][\\udc00-\\udfff]",It="["+At+"]",Pt="(?:"+Et+"|"+Ot+")",Rt="(?:"+It+"|"+Ot+")",Nt="(?:['’](?:d|ll|m|re|s|t|ve))?",$t="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ut="(?:"+kt+"|"+Tt+")"+"?",Wt="[\\ufe0e\\ufe0f]?",qt=Wt+Ut+("(?:\\u200d(?:"+[Dt,jt,Ft].join("|")+")"+Wt+Ut+")*"),Gt="(?:"+[St,jt,Ft].join("|")+")"+qt,Yt="(?:"+[Dt+kt+"?",kt,jt,Ft,Lt].join("|")+")",Kt=RegExp(Vt,"g"),Jt=RegExp(kt,"g"),Zt=RegExp(Tt+"(?="+Tt+")|"+Yt+qt,"g"),Xt=RegExp([It+"?"+Et+"+"+Nt+"(?="+[Bt,It,"$"].join("|")+")",Rt+"+"+$t+"(?="+[Bt,It+Pt,"$"].join("|")+")",It+"?"+Pt+"+"+Nt,It+"+"+$t,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ct,Gt].join("|"),"g"),Qt=RegExp("[\\u200d\\ud800-\\udfff"+wt+"\\ufe0e\\ufe0f]"),te=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ee=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ae=-1,re={};re[O]=re[T]=re[D]=re[j]=re[F]=re[I]=re[P]=re[R]=re[N]=!0,re[f]=re[y]=re[S]=re[g]=re[E]=re[b]=re[z]=re[x]=re[M]=re[_]=re[A]=re[V]=re[L]=re[B]=re[C]=!1;var ne={};ne[f]=ne[y]=ne[S]=ne[E]=ne[g]=ne[b]=ne[O]=ne[T]=ne[D]=ne[j]=ne[F]=ne[M]=ne[_]=ne[A]=ne[V]=ne[L]=ne[B]=ne[k]=ne[I]=ne[P]=ne[R]=ne[N]=!0,ne[z]=ne[x]=ne[C]=!1;var ie={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},oe=parseFloat,le=parseInt,se="object"==typeof Br&&Br&&Br.Object===Object&&Br,ce="object"==typeof self&&self&&self.Object===Object&&self,he=se||ce||Function("return this")(),ue=e&&!e.nodeType&&e,de=ue&&t&&!t.nodeType&&t,pe=de&&de.exports===ue,me=pe&&se.process,ve=function(){try{var t=de&&de.require&&de.require("util").types;return t||me&&me.binding&&me.binding("util")}catch(e){}}(),fe=ve&&ve.isArrayBuffer,ye=ve&&ve.isDate,ge=ve&&ve.isMap,be=ve&&ve.isRegExp,ze=ve&&ve.isSet,xe=ve&&ve.isTypedArray;function we(t,e,a){switch(a.length){case 0:return t.call(e);case 1:return t.call(e,a[0]);case 2:return t.call(e,a[0],a[1]);case 3:return t.call(e,a[0],a[1],a[2])}return t.apply(e,a)}function Me(t,e,a,r){for(var n=-1,i=null==t?0:t.length;++n<i;){var o=t[n];e(r,o,a(o),t)}return r}function _e(t,e){for(var a=-1,r=null==t?0:t.length;++a<r&&!1!==e(t[a],a,t););return t}function Ae(t,e){for(var a=null==t?0:t.length;a--&&!1!==e(t[a],a,t););return t}function He(t,e){for(var a=-1,r=null==t?0:t.length;++a<r;)if(!e(t[a],a,t))return!1;return!0}function Ve(t,e){for(var a=-1,r=null==t?0:t.length,n=0,i=[];++a<r;){var o=t[a];e(o,a,t)&&(i[n++]=o)}return i}function Le(t,e){return!!(null==t?0:t.length)&&Fe(t,e,0)>-1}function Be(t,e,a){for(var r=-1,n=null==t?0:t.length;++r<n;)if(a(e,t[r]))return!0;return!1}function ke(t,e){for(var a=-1,r=null==t?0:t.length,n=Array(r);++a<r;)n[a]=e(t[a],a,t);return n}function Ce(t,e){for(var a=-1,r=e.length,n=t.length;++a<r;)t[n+a]=e[a];return t}function Se(t,e,a,r){var n=-1,i=null==t?0:t.length;for(r&&i&&(a=t[++n]);++n<i;)a=e(a,t[n],n,t);return a}function Ee(t,e,a,r){var n=null==t?0:t.length;for(r&&n&&(a=t[--n]);n--;)a=e(a,t[n],n,t);return a}function Oe(t,e){for(var a=-1,r=null==t?0:t.length;++a<r;)if(e(t[a],a,t))return!0;return!1}var Te=Ne("length");function De(t,e,a){var r;return a(t,(function(t,a,n){if(e(t,a,n))return r=a,!1})),r}function je(t,e,a,r){for(var n=t.length,i=a+(r?1:-1);r?i--:++i<n;)if(e(t[i],i,t))return i;return-1}function Fe(t,e,a){return e==e?function(t,e,a){var r=a-1,n=t.length;for(;++r<n;)if(t[r]===e)return r;return-1}(t,e,a):je(t,Pe,a)}function Ie(t,e,a,r){for(var n=a-1,i=t.length;++n<i;)if(r(t[n],e))return n;return-1}function Pe(t){return t!=t}function Re(t,e){var a=null==t?0:t.length;return a?We(t,e)/a:p}function Ne(t){return function(e){return null==e?a:e[t]}}function $e(t){return function(e){return null==t?a:t[e]}}function Ue(t,e,a,r,n){return n(t,(function(t,n,i){a=r?(r=!1,t):e(a,t,n,i)})),a}function We(t,e){for(var r,n=-1,i=t.length;++n<i;){var o=e(t[n]);o!==a&&(r=r===a?o:r+o)}return r}function qe(t,e){for(var a=-1,r=Array(t);++a<t;)r[a]=e(a);return r}function Ge(t){return t?t.slice(0,ha(t)+1).replace(nt,""):t}function Ye(t){return function(e){return t(e)}}function Ke(t,e){return ke(e,(function(e){return t[e]}))}function Je(t,e){return t.has(e)}function Ze(t,e){for(var a=-1,r=t.length;++a<r&&Fe(e,t[a],0)>-1;);return a}function Xe(t,e){for(var a=t.length;a--&&Fe(e,t[a],0)>-1;);return a}function Qe(t,e){for(var a=t.length,r=0;a--;)t[a]===e&&++r;return r}var ta=$e({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),ea=$e({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function aa(t){return"\\"+ie[t]}function ra(t){return Qt.test(t)}function na(t){var e=-1,a=Array(t.size);return t.forEach((function(t,r){a[++e]=[r,t]})),a}function ia(t,e){return function(a){return t(e(a))}}function oa(t,e){for(var a=-1,r=t.length,n=0,o=[];++a<r;){var l=t[a];l!==e&&l!==i||(t[a]=i,o[n++]=a)}return o}function la(t){var e=-1,a=Array(t.size);return t.forEach((function(t){a[++e]=t})),a}function sa(t){return ra(t)?function(t){var e=Zt.lastIndex=0;for(;Zt.test(t);)++e;return e}(t):Te(t)}function ca(t){return ra(t)?function(t){return t.match(Zt)||[]}(t):function(t){return t.split("")}(t)}function ha(t){for(var e=t.length;e--&&it.test(t.charAt(e)););return e}var ua=$e({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"});var da=function t(e){var it,wt=(e=null==e?he:da.defaults(he.Object(),e,da.pick(he,ee))).Array,Mt=e.Date,_t=e.Error,At=e.Function,Ht=e.Math,Vt=e.Object,Lt=e.RegExp,Bt=e.String,kt=e.TypeError,Ct=wt.prototype,St=At.prototype,Et=Vt.prototype,Ot=e["__core-js_shared__"],Tt=St.toString,Dt=Et.hasOwnProperty,jt=0,Ft=(it=/[^.]+$/.exec(Ot&&Ot.keys&&Ot.keys.IE_PROTO||""))?"Symbol(src)_1."+it:"",It=Et.toString,Pt=Tt.call(Vt),Rt=he._,Nt=Lt("^"+Tt.call(Dt).replace(at,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$t=pe?e.Buffer:a,Ut=e.Symbol,Wt=e.Uint8Array,qt=$t?$t.allocUnsafe:a,Gt=ia(Vt.getPrototypeOf,Vt),Yt=Vt.create,Zt=Et.propertyIsEnumerable,Qt=Ct.splice,ie=Ut?Ut.isConcatSpreadable:a,se=Ut?Ut.iterator:a,ce=Ut?Ut.toStringTag:a,ue=function(){try{var t=di(Vt,"defineProperty");return t({},"",{}),t}catch(e){}}(),de=e.clearTimeout!==he.clearTimeout&&e.clearTimeout,me=Mt&&Mt.now!==he.Date.now&&Mt.now,ve=e.setTimeout!==he.setTimeout&&e.setTimeout,Te=Ht.ceil,$e=Ht.floor,pa=Vt.getOwnPropertySymbols,ma=$t?$t.isBuffer:a,va=e.isFinite,fa=Ct.join,ya=ia(Vt.keys,Vt),ga=Ht.max,ba=Ht.min,za=Mt.now,xa=e.parseInt,wa=Ht.random,Ma=Ct.reverse,_a=di(e,"DataView"),Aa=di(e,"Map"),Ha=di(e,"Promise"),Va=di(e,"Set"),La=di(e,"WeakMap"),Ba=di(Vt,"create"),ka=La&&new La,Ca={},Sa=Ni(_a),Ea=Ni(Aa),Oa=Ni(Ha),Ta=Ni(Va),Da=Ni(La),ja=Ut?Ut.prototype:a,Fa=ja?ja.valueOf:a,Ia=ja?ja.toString:a;function Pa(t){if(ol(t)&&!Ko(t)&&!(t instanceof Ua)){if(t instanceof $a)return t;if(Dt.call(t,"__wrapped__"))return $i(t)}return new $a(t)}var Ra=function(){function t(){}return function(e){if(!il(e))return{};if(Yt)return Yt(e);t.prototype=e;var r=new t;return t.prototype=a,r}}();function Na(){}function $a(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=a}function Ua(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=m,this.__views__=[]}function Wa(t){var e=-1,a=null==t?0:t.length;for(this.clear();++e<a;){var r=t[e];this.set(r[0],r[1])}}function qa(t){var e=-1,a=null==t?0:t.length;for(this.clear();++e<a;){var r=t[e];this.set(r[0],r[1])}}function Ga(t){var e=-1,a=null==t?0:t.length;for(this.clear();++e<a;){var r=t[e];this.set(r[0],r[1])}}function Ya(t){var e=-1,a=null==t?0:t.length;for(this.__data__=new Ga;++e<a;)this.add(t[e])}function Ka(t){var e=this.__data__=new qa(t);this.size=e.size}function Ja(t,e){var a=Ko(t),r=!a&&Yo(t),n=!a&&!r&&Qo(t),i=!a&&!r&&!n&&ml(t),o=a||r||n||i,l=o?qe(t.length,Bt):[],s=l.length;for(var c in t)!e&&!Dt.call(t,c)||o&&("length"==c||n&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||bi(c,s))||l.push(c);return l}function Za(t){var e=t.length;return e?t[Yr(0,e-1)]:a}function Xa(t,e){return Di(kn(t),lr(e,0,t.length))}function Qa(t){return Di(kn(t))}function tr(t,e,r){(r!==a&&!Wo(t[e],r)||r===a&&!(e in t))&&ir(t,e,r)}function er(t,e,r){var n=t[e];Dt.call(t,e)&&Wo(n,r)&&(r!==a||e in t)||ir(t,e,r)}function ar(t,e){for(var a=t.length;a--;)if(Wo(t[a][0],e))return a;return-1}function rr(t,e,a,r){return dr(t,(function(t,n,i){e(r,t,a(t),i)})),r}function nr(t,e){return t&&Cn(e,Dl(e),t)}function ir(t,e,a){"__proto__"==e&&ue?ue(t,e,{configurable:!0,enumerable:!0,value:a,writable:!0}):t[e]=a}function or(t,e){for(var r=-1,n=e.length,i=wt(n),o=null==t;++r<n;)i[r]=o?a:Cl(t,e[r]);return i}function lr(t,e,r){return t==t&&(r!==a&&(t=t<=r?t:r),e!==a&&(t=t>=e?t:e)),t}function sr(t,e,r,n,i,o){var l,s=1&e,c=2&e,h=4&e;if(r&&(l=i?r(t,n,i,o):r(t)),l!==a)return l;if(!il(t))return t;var u=Ko(t);if(u){if(l=function(t){var e=t.length,a=new t.constructor(e);e&&"string"==typeof t[0]&&Dt.call(t,"index")&&(a.index=t.index,a.input=t.input);return a}(t),!s)return kn(t,l)}else{var d=vi(t),p=d==x||d==w;if(Qo(t))return _n(t,s);if(d==A||d==f||p&&!i){if(l=c||p?{}:yi(t),!s)return c?function(t,e){return Cn(t,mi(t),e)}(t,function(t,e){return t&&Cn(e,jl(e),t)}(l,t)):function(t,e){return Cn(t,pi(t),e)}(t,nr(l,t))}else{if(!ne[d])return i?t:{};l=function(t,e,a){var r=t.constructor;switch(e){case S:return An(t);case g:case b:return new r(+t);case E:return function(t,e){var a=e?An(t.buffer):t.buffer;return new t.constructor(a,t.byteOffset,t.byteLength)}(t,a);case O:case T:case D:case j:case F:case I:case P:case R:case N:return Hn(t,a);case M:return new r;case _:case B:return new r(t);case V:return function(t){var e=new t.constructor(t.source,pt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case L:return new r;case k:return n=t,Fa?Vt(Fa.call(n)):{}}var n}(t,d,s)}}o||(o=new Ka);var m=o.get(t);if(m)return m;o.set(t,l),ul(t)?t.forEach((function(a){l.add(sr(a,e,r,a,t,o))})):ll(t)&&t.forEach((function(a,n){l.set(n,sr(a,e,r,n,t,o))}));var v=u?a:(h?c?ii:ni:c?jl:Dl)(t);return _e(v||t,(function(a,n){v&&(a=t[n=a]),er(l,n,sr(a,e,r,n,t,o))})),l}function cr(t,e,r){var n=r.length;if(null==t)return!n;for(t=Vt(t);n--;){var i=r[n],o=e[i],l=t[i];if(l===a&&!(i in t)||!o(l))return!1}return!0}function hr(t,e,n){if("function"!=typeof t)throw new kt(r);return Si((function(){t.apply(a,n)}),e)}function ur(t,e,a,r){var n=-1,i=Le,o=!0,l=t.length,s=[],c=e.length;if(!l)return s;a&&(e=ke(e,Ye(a))),r?(i=Be,o=!1):e.length>=200&&(i=Je,o=!1,e=new Ya(e));t:for(;++n<l;){var h=t[n],u=null==a?h:a(h);if(h=r||0!==h?h:0,o&&u==u){for(var d=c;d--;)if(e[d]===u)continue t;s.push(h)}else i(e,u,r)||s.push(h)}return s}Pa.templateSettings={escape:J,evaluate:Z,interpolate:X,variable:"",imports:{_:Pa}},Pa.prototype=Na.prototype,Pa.prototype.constructor=Pa,$a.prototype=Ra(Na.prototype),$a.prototype.constructor=$a,Ua.prototype=Ra(Na.prototype),Ua.prototype.constructor=Ua,Wa.prototype.clear=function(){this.__data__=Ba?Ba(null):{},this.size=0},Wa.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Wa.prototype.get=function(t){var e=this.__data__;if(Ba){var r=e[t];return r===n?a:r}return Dt.call(e,t)?e[t]:a},Wa.prototype.has=function(t){var e=this.__data__;return Ba?e[t]!==a:Dt.call(e,t)},Wa.prototype.set=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Ba&&e===a?n:e,this},qa.prototype.clear=function(){this.__data__=[],this.size=0},qa.prototype.delete=function(t){var e=this.__data__,a=ar(e,t);return!(a<0)&&(a==e.length-1?e.pop():Qt.call(e,a,1),--this.size,!0)},qa.prototype.get=function(t){var e=this.__data__,r=ar(e,t);return r<0?a:e[r][1]},qa.prototype.has=function(t){return ar(this.__data__,t)>-1},qa.prototype.set=function(t,e){var a=this.__data__,r=ar(a,t);return r<0?(++this.size,a.push([t,e])):a[r][1]=e,this},Ga.prototype.clear=function(){this.size=0,this.__data__={hash:new Wa,map:new(Aa||qa),string:new Wa}},Ga.prototype.delete=function(t){var e=hi(this,t).delete(t);return this.size-=e?1:0,e},Ga.prototype.get=function(t){return hi(this,t).get(t)},Ga.prototype.has=function(t){return hi(this,t).has(t)},Ga.prototype.set=function(t,e){var a=hi(this,t),r=a.size;return a.set(t,e),this.size+=a.size==r?0:1,this},Ya.prototype.add=Ya.prototype.push=function(t){return this.__data__.set(t,n),this},Ya.prototype.has=function(t){return this.__data__.has(t)},Ka.prototype.clear=function(){this.__data__=new qa,this.size=0},Ka.prototype.delete=function(t){var e=this.__data__,a=e.delete(t);return this.size=e.size,a},Ka.prototype.get=function(t){return this.__data__.get(t)},Ka.prototype.has=function(t){return this.__data__.has(t)},Ka.prototype.set=function(t,e){var a=this.__data__;if(a instanceof qa){var r=a.__data__;if(!Aa||r.length<199)return r.push([t,e]),this.size=++a.size,this;a=this.__data__=new Ga(r)}return a.set(t,e),this.size=a.size,this};var dr=On(zr),pr=On(xr,!0);function mr(t,e){var a=!0;return dr(t,(function(t,r,n){return a=!!e(t,r,n)})),a}function vr(t,e,r){for(var n=-1,i=t.length;++n<i;){var o=t[n],l=e(o);if(null!=l&&(s===a?l==l&&!pl(l):r(l,s)))var s=l,c=o}return c}function fr(t,e){var a=[];return dr(t,(function(t,r,n){e(t,r,n)&&a.push(t)})),a}function yr(t,e,a,r,n){var i=-1,o=t.length;for(a||(a=gi),n||(n=[]);++i<o;){var l=t[i];e>0&&a(l)?e>1?yr(l,e-1,a,r,n):Ce(n,l):r||(n[n.length]=l)}return n}var gr=Tn(),br=Tn(!0);function zr(t,e){return t&&gr(t,e,Dl)}function xr(t,e){return t&&br(t,e,Dl)}function wr(t,e){return Ve(e,(function(e){return al(t[e])}))}function Mr(t,e){for(var r=0,n=(e=zn(e,t)).length;null!=t&&r<n;)t=t[Ri(e[r++])];return r&&r==n?t:a}function _r(t,e,a){var r=e(t);return Ko(t)?r:Ce(r,a(t))}function Ar(t){return null==t?t===a?"[object Undefined]":"[object Null]":ce&&ce in Vt(t)?function(t){var e=Dt.call(t,ce),r=t[ce];try{t[ce]=a;var n=!0}catch(o){}var i=It.call(t);n&&(e?t[ce]=r:delete t[ce]);return i}(t):function(t){return It.call(t)}(t)}function Hr(t,e){return t>e}function Vr(t,e){return null!=t&&Dt.call(t,e)}function Lr(t,e){return null!=t&&e in Vt(t)}function Br(t,e,r){for(var n=r?Be:Le,i=t[0].length,o=t.length,l=o,s=wt(o),c=1/0,h=[];l--;){var u=t[l];l&&e&&(u=ke(u,Ye(e))),c=ba(u.length,c),s[l]=!r&&(e||i>=120&&u.length>=120)?new Ya(l&&u):a}u=t[0];var d=-1,p=s[0];t:for(;++d<i&&h.length<c;){var m=u[d],v=e?e(m):m;if(m=r||0!==m?m:0,!(p?Je(p,v):n(h,v,r))){for(l=o;--l;){var f=s[l];if(!(f?Je(f,v):n(t[l],v,r)))continue t}p&&p.push(v),h.push(m)}}return h}function kr(t,e,r){var n=null==(t=Li(t,e=zn(e,t)))?t:t[Ri(to(e))];return null==n?a:we(n,t,r)}function Cr(t){return ol(t)&&Ar(t)==f}function Sr(t,e,r,n,i){return t===e||(null==t||null==e||!ol(t)&&!ol(e)?t!=t&&e!=e:function(t,e,r,n,i,o){var l=Ko(t),s=Ko(e),c=l?y:vi(t),h=s?y:vi(e),u=(c=c==f?A:c)==A,d=(h=h==f?A:h)==A,p=c==h;if(p&&Qo(t)){if(!Qo(e))return!1;l=!0,u=!1}if(p&&!u)return o||(o=new Ka),l||ml(t)?ai(t,e,r,n,i,o):function(t,e,a,r,n,i,o){switch(a){case E:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case S:return!(t.byteLength!=e.byteLength||!i(new Wt(t),new Wt(e)));case g:case b:case _:return Wo(+t,+e);case z:return t.name==e.name&&t.message==e.message;case V:case B:return t==e+"";case M:var l=na;case L:var s=1&r;if(l||(l=la),t.size!=e.size&&!s)return!1;var c=o.get(t);if(c)return c==e;r|=2,o.set(t,e);var h=ai(l(t),l(e),r,n,i,o);return o.delete(t),h;case k:if(Fa)return Fa.call(t)==Fa.call(e)}return!1}(t,e,c,r,n,i,o);if(!(1&r)){var m=u&&Dt.call(t,"__wrapped__"),v=d&&Dt.call(e,"__wrapped__");if(m||v){var x=m?t.value():t,w=v?e.value():e;return o||(o=new Ka),i(x,w,r,n,o)}}if(!p)return!1;return o||(o=new Ka),function(t,e,r,n,i,o){var l=1&r,s=ni(t),c=s.length,h=ni(e).length;if(c!=h&&!l)return!1;var u=c;for(;u--;){var d=s[u];if(!(l?d in e:Dt.call(e,d)))return!1}var p=o.get(t),m=o.get(e);if(p&&m)return p==e&&m==t;var v=!0;o.set(t,e),o.set(e,t);var f=l;for(;++u<c;){var y=t[d=s[u]],g=e[d];if(n)var b=l?n(g,y,d,e,t,o):n(y,g,d,t,e,o);if(!(b===a?y===g||i(y,g,r,n,o):b)){v=!1;break}f||(f="constructor"==d)}if(v&&!f){var z=t.constructor,x=e.constructor;z==x||!("constructor"in t)||!("constructor"in e)||"function"==typeof z&&z instanceof z&&"function"==typeof x&&x instanceof x||(v=!1)}return o.delete(t),o.delete(e),v}(t,e,r,n,i,o)}(t,e,r,n,Sr,i))}function Er(t,e,r,n){var i=r.length,o=i,l=!n;if(null==t)return!o;for(t=Vt(t);i--;){var s=r[i];if(l&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++i<o;){var c=(s=r[i])[0],h=t[c],u=s[1];if(l&&s[2]){if(h===a&&!(c in t))return!1}else{var d=new Ka;if(n)var p=n(h,u,c,t,e,d);if(!(p===a?Sr(u,h,3,n,d):p))return!1}}return!0}function Or(t){return!(!il(t)||(e=t,Ft&&Ft in e))&&(al(t)?Nt:ft).test(Ni(t));var e}function Tr(t){return"function"==typeof t?t:null==t?ss:"object"==typeof t?Ko(t)?Rr(t[0],t[1]):Pr(t):ys(t)}function Dr(t){if(!_i(t))return ya(t);var e=[];for(var a in Vt(t))Dt.call(t,a)&&"constructor"!=a&&e.push(a);return e}function jr(t){if(!il(t))return function(t){var e=[];if(null!=t)for(var a in Vt(t))e.push(a);return e}(t);var e=_i(t),a=[];for(var r in t)("constructor"!=r||!e&&Dt.call(t,r))&&a.push(r);return a}function Fr(t,e){return t<e}function Ir(t,e){var a=-1,r=Zo(t)?wt(t.length):[];return dr(t,(function(t,n,i){r[++a]=e(t,n,i)})),r}function Pr(t){var e=ui(t);return 1==e.length&&e[0][2]?Hi(e[0][0],e[0][1]):function(a){return a===t||Er(a,t,e)}}function Rr(t,e){return xi(t)&&Ai(e)?Hi(Ri(t),e):function(r){var n=Cl(r,t);return n===a&&n===e?Sl(r,t):Sr(e,n,3)}}function Nr(t,e,r,n,i){t!==e&&gr(e,(function(o,l){if(i||(i=new Ka),il(o))!function(t,e,r,n,i,o,l){var s=ki(t,r),c=ki(e,r),h=l.get(c);if(h)return void tr(t,r,h);var u=o?o(s,c,r+"",t,e,l):a,d=u===a;if(d){var p=Ko(c),m=!p&&Qo(c),v=!p&&!m&&ml(c);u=c,p||m||v?Ko(s)?u=s:Xo(s)?u=kn(s):m?(d=!1,u=_n(c,!0)):v?(d=!1,u=Hn(c,!0)):u=[]:cl(c)||Yo(c)?(u=s,Yo(s)?u=wl(s):il(s)&&!al(s)||(u=yi(c))):d=!1}d&&(l.set(c,u),i(u,c,n,o,l),l.delete(c));tr(t,r,u)}(t,e,l,r,Nr,n,i);else{var s=n?n(ki(t,l),o,l+"",t,e,i):a;s===a&&(s=o),tr(t,l,s)}}),jl)}function $r(t,e){var r=t.length;if(r)return bi(e+=e<0?r:0,r)?t[e]:a}function Ur(t,e,a){e=e.length?ke(e,(function(t){return Ko(t)?function(e){return Mr(e,1===t.length?t[0]:t)}:t})):[ss];var r=-1;return e=ke(e,Ye(ci())),function(t,e){var a=t.length;for(t.sort(e);a--;)t[a]=t[a].value;return t}(Ir(t,(function(t,a,n){return{criteria:ke(e,(function(e){return e(t)})),index:++r,value:t}})),(function(t,e){return function(t,e,a){var r=-1,n=t.criteria,i=e.criteria,o=n.length,l=a.length;for(;++r<o;){var s=Vn(n[r],i[r]);if(s)return r>=l?s:s*("desc"==a[r]?-1:1)}return t.index-e.index}(t,e,a)}))}function Wr(t,e,a){for(var r=-1,n=e.length,i={};++r<n;){var o=e[r],l=Mr(t,o);a(l,o)&&Qr(i,zn(o,t),l)}return i}function qr(t,e,a,r){var n=r?Ie:Fe,i=-1,o=e.length,l=t;for(t===e&&(e=kn(e)),a&&(l=ke(t,Ye(a)));++i<o;)for(var s=0,c=e[i],h=a?a(c):c;(s=n(l,h,s,r))>-1;)l!==t&&Qt.call(l,s,1),Qt.call(t,s,1);return t}function Gr(t,e){for(var a=t?e.length:0,r=a-1;a--;){var n=e[a];if(a==r||n!==i){var i=n;bi(n)?Qt.call(t,n,1):dn(t,n)}}return t}function Yr(t,e){return t+$e(wa()*(e-t+1))}function Kr(t,e){var a="";if(!t||e<1||e>d)return a;do{e%2&&(a+=t),(e=$e(e/2))&&(t+=t)}while(e);return a}function Jr(t,e){return Ei(Vi(t,e,ss),t+"")}function Zr(t){return Za(Wl(t))}function Xr(t,e){var a=Wl(t);return Di(a,lr(e,0,a.length))}function Qr(t,e,r,n){if(!il(t))return t;for(var i=-1,o=(e=zn(e,t)).length,l=o-1,s=t;null!=s&&++i<o;){var c=Ri(e[i]),h=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return t;if(i!=l){var u=s[c];(h=n?n(u,c,s):a)===a&&(h=il(u)?u:bi(e[i+1])?[]:{})}er(s,c,h),s=s[c]}return t}var tn=ka?function(t,e){return ka.set(t,e),t}:ss,en=ue?function(t,e){return ue(t,"toString",{configurable:!0,enumerable:!1,value:is(e),writable:!0})}:ss;function an(t){return Di(Wl(t))}function rn(t,e,a){var r=-1,n=t.length;e<0&&(e=-e>n?0:n+e),(a=a>n?n:a)<0&&(a+=n),n=e>a?0:a-e>>>0,e>>>=0;for(var i=wt(n);++r<n;)i[r]=t[r+e];return i}function nn(t,e){var a;return dr(t,(function(t,r,n){return!(a=e(t,r,n))})),!!a}function on(t,e,a){var r=0,n=null==t?r:t.length;if("number"==typeof e&&e==e&&n<=2147483647){for(;r<n;){var i=r+n>>>1,o=t[i];null!==o&&!pl(o)&&(a?o<=e:o<e)?r=i+1:n=i}return n}return ln(t,e,ss,a)}function ln(t,e,r,n){var i=0,o=null==t?0:t.length;if(0===o)return 0;for(var l=(e=r(e))!=e,s=null===e,c=pl(e),h=e===a;i<o;){var u=$e((i+o)/2),d=r(t[u]),p=d!==a,m=null===d,v=d==d,f=pl(d);if(l)var y=n||v;else y=h?v&&(n||p):s?v&&p&&(n||!m):c?v&&p&&!m&&(n||!f):!m&&!f&&(n?d<=e:d<e);y?i=u+1:o=u}return ba(o,4294967294)}function sn(t,e){for(var a=-1,r=t.length,n=0,i=[];++a<r;){var o=t[a],l=e?e(o):o;if(!a||!Wo(l,s)){var s=l;i[n++]=0===o?0:o}}return i}function cn(t){return"number"==typeof t?t:pl(t)?p:+t}function hn(t){if("string"==typeof t)return t;if(Ko(t))return ke(t,hn)+"";if(pl(t))return Ia?Ia.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function un(t,e,a){var r=-1,n=Le,i=t.length,o=!0,l=[],s=l;if(a)o=!1,n=Be;else if(i>=200){var c=e?null:Jn(t);if(c)return la(c);o=!1,n=Je,s=new Ya}else s=e?[]:l;t:for(;++r<i;){var h=t[r],u=e?e(h):h;if(h=a||0!==h?h:0,o&&u==u){for(var d=s.length;d--;)if(s[d]===u)continue t;e&&s.push(u),l.push(h)}else n(s,u,a)||(s!==l&&s.push(u),l.push(h))}return l}function dn(t,e){return null==(t=Li(t,e=zn(e,t)))||delete t[Ri(to(e))]}function pn(t,e,a,r){return Qr(t,e,a(Mr(t,e)),r)}function mn(t,e,a,r){for(var n=t.length,i=r?n:-1;(r?i--:++i<n)&&e(t[i],i,t););return a?rn(t,r?0:i,r?i+1:n):rn(t,r?i+1:0,r?n:i)}function vn(t,e){var a=t;return a instanceof Ua&&(a=a.value()),Se(e,(function(t,e){return e.func.apply(e.thisArg,Ce([t],e.args))}),a)}function fn(t,e,a){var r=t.length;if(r<2)return r?un(t[0]):[];for(var n=-1,i=wt(r);++n<r;)for(var o=t[n],l=-1;++l<r;)l!=n&&(i[n]=ur(i[n]||o,t[l],e,a));return un(yr(i,1),e,a)}function yn(t,e,r){for(var n=-1,i=t.length,o=e.length,l={};++n<i;){var s=n<o?e[n]:a;r(l,t[n],s)}return l}function gn(t){return Xo(t)?t:[]}function bn(t){return"function"==typeof t?t:ss}function zn(t,e){return Ko(t)?t:xi(t,e)?[t]:Pi(Ml(t))}var xn=Jr;function wn(t,e,r){var n=t.length;return r=r===a?n:r,!e&&r>=n?t:rn(t,e,r)}var Mn=de||function(t){return he.clearTimeout(t)};function _n(t,e){if(e)return t.slice();var a=t.length,r=qt?qt(a):new t.constructor(a);return t.copy(r),r}function An(t){var e=new t.constructor(t.byteLength);return new Wt(e).set(new Wt(t)),e}function Hn(t,e){var a=e?An(t.buffer):t.buffer;return new t.constructor(a,t.byteOffset,t.length)}function Vn(t,e){if(t!==e){var r=t!==a,n=null===t,i=t==t,o=pl(t),l=e!==a,s=null===e,c=e==e,h=pl(e);if(!s&&!h&&!o&&t>e||o&&l&&c&&!s&&!h||n&&l&&c||!r&&c||!i)return 1;if(!n&&!o&&!h&&t<e||h&&r&&i&&!n&&!o||s&&r&&i||!l&&i||!c)return-1}return 0}function Ln(t,e,a,r){for(var n=-1,i=t.length,o=a.length,l=-1,s=e.length,c=ga(i-o,0),h=wt(s+c),u=!r;++l<s;)h[l]=e[l];for(;++n<o;)(u||n<i)&&(h[a[n]]=t[n]);for(;c--;)h[l++]=t[n++];return h}function Bn(t,e,a,r){for(var n=-1,i=t.length,o=-1,l=a.length,s=-1,c=e.length,h=ga(i-l,0),u=wt(h+c),d=!r;++n<h;)u[n]=t[n];for(var p=n;++s<c;)u[p+s]=e[s];for(;++o<l;)(d||n<i)&&(u[p+a[o]]=t[n++]);return u}function kn(t,e){var a=-1,r=t.length;for(e||(e=wt(r));++a<r;)e[a]=t[a];return e}function Cn(t,e,r,n){var i=!r;r||(r={});for(var o=-1,l=e.length;++o<l;){var s=e[o],c=n?n(r[s],t[s],s,r,t):a;c===a&&(c=t[s]),i?ir(r,s,c):er(r,s,c)}return r}function Sn(t,e){return function(a,r){var n=Ko(a)?Me:rr,i=e?e():{};return n(a,t,ci(r,2),i)}}function En(t){return Jr((function(e,r){var n=-1,i=r.length,o=i>1?r[i-1]:a,l=i>2?r[2]:a;for(o=t.length>3&&"function"==typeof o?(i--,o):a,l&&zi(r[0],r[1],l)&&(o=i<3?a:o,i=1),e=Vt(e);++n<i;){var s=r[n];s&&t(e,s,n,o)}return e}))}function On(t,e){return function(a,r){if(null==a)return a;if(!Zo(a))return t(a,r);for(var n=a.length,i=e?n:-1,o=Vt(a);(e?i--:++i<n)&&!1!==r(o[i],i,o););return a}}function Tn(t){return function(e,a,r){for(var n=-1,i=Vt(e),o=r(e),l=o.length;l--;){var s=o[t?l:++n];if(!1===a(i[s],s,i))break}return e}}function Dn(t){return function(e){var r=ra(e=Ml(e))?ca(e):a,n=r?r[0]:e.charAt(0),i=r?wn(r,1).join(""):e.slice(1);return n[t]()+i}}function jn(t){return function(e){return Se(as(Yl(e).replace(Kt,"")),t,"")}}function Fn(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var a=Ra(t.prototype),r=t.apply(a,e);return il(r)?r:a}}function In(t){return function(e,r,n){var i=Vt(e);if(!Zo(e)){var o=ci(r,3);e=Dl(e),r=function(t){return o(i[t],t,i)}}var l=t(e,r,n);return l>-1?i[o?e[l]:l]:a}}function Pn(t){return ri((function(e){var n=e.length,i=n,o=$a.prototype.thru;for(t&&e.reverse();i--;){var l=e[i];if("function"!=typeof l)throw new kt(r);if(o&&!s&&"wrapper"==li(l))var s=new $a([],!0)}for(i=s?i:n;++i<n;){var c=li(l=e[i]),h="wrapper"==c?oi(l):a;s=h&&wi(h[0])&&424==h[1]&&!h[4].length&&1==h[9]?s[li(h[0])].apply(s,h[3]):1==l.length&&wi(l)?s[c]():s.thru(l)}return function(){var t=arguments,a=t[0];if(s&&1==t.length&&Ko(a))return s.plant(a).value();for(var r=0,i=n?e[r].apply(this,t):a;++r<n;)i=e[r].call(this,i);return i}}))}function Rn(t,e,r,n,i,o,l,s,h,u){var d=e&c,p=1&e,m=2&e,v=24&e,f=512&e,y=m?a:Fn(t);return function a(){for(var c=arguments.length,g=wt(c),b=c;b--;)g[b]=arguments[b];if(v)var z=si(a),x=Qe(g,z);if(n&&(g=Ln(g,n,i,v)),o&&(g=Bn(g,o,l,v)),c-=x,v&&c<u){var w=oa(g,z);return Yn(t,e,Rn,a.placeholder,r,g,w,s,h,u-c)}var M=p?r:this,_=m?M[t]:t;return c=g.length,s?g=Bi(g,s):f&&c>1&&g.reverse(),d&&h<c&&(g.length=h),this&&this!==he&&this instanceof a&&(_=y||Fn(_)),_.apply(M,g)}}function Nn(t,e){return function(a,r){return function(t,e,a,r){return zr(t,(function(t,n,i){e(r,a(t),n,i)})),r}(a,t,e(r),{})}}function $n(t,e){return function(r,n){var i;if(r===a&&n===a)return e;if(r!==a&&(i=r),n!==a){if(i===a)return n;"string"==typeof r||"string"==typeof n?(r=hn(r),n=hn(n)):(r=cn(r),n=cn(n)),i=t(r,n)}return i}}function Un(t){return ri((function(e){return e=ke(e,Ye(ci())),Jr((function(a){var r=this;return t(e,(function(t){return we(t,r,a)}))}))}))}function Wn(t,e){var r=(e=e===a?" ":hn(e)).length;if(r<2)return r?Kr(e,t):e;var n=Kr(e,Te(t/sa(e)));return ra(e)?wn(ca(n),0,t).join(""):n.slice(0,t)}function qn(t){return function(e,r,n){return n&&"number"!=typeof n&&zi(e,r,n)&&(r=n=a),e=gl(e),r===a?(r=e,e=0):r=gl(r),function(t,e,a,r){for(var n=-1,i=ga(Te((e-t)/(a||1)),0),o=wt(i);i--;)o[r?i:++n]=t,t+=a;return o}(e,r,n=n===a?e<r?1:-1:gl(n),t)}}function Gn(t){return function(e,a){return"string"==typeof e&&"string"==typeof a||(e=xl(e),a=xl(a)),t(e,a)}}function Yn(t,e,r,n,i,o,c,h,u,d){var p=8&e;e|=p?l:s,4&(e&=~(p?s:l))||(e&=-4);var m=[t,e,i,p?o:a,p?c:a,p?a:o,p?a:c,h,u,d],v=r.apply(a,m);return wi(t)&&Ci(v,m),v.placeholder=n,Oi(v,t,e)}function Kn(t){var e=Ht[t];return function(t,a){if(t=xl(t),(a=null==a?0:ba(bl(a),292))&&va(t)){var r=(Ml(t)+"e").split("e");return+((r=(Ml(e(r[0]+"e"+(+r[1]+a)))+"e").split("e"))[0]+"e"+(+r[1]-a))}return e(t)}}var Jn=Va&&1/la(new Va([,-0]))[1]==u?function(t){return new Va(t)}:ps;function Zn(t){return function(e){var a=vi(e);return a==M?na(e):a==L?function(t){var e=-1,a=Array(t.size);return t.forEach((function(t){a[++e]=[t,t]})),a}(e):function(t,e){return ke(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function Xn(t,e,n,u,d,p,m,v){var f=2&e;if(!f&&"function"!=typeof t)throw new kt(r);var y=u?u.length:0;if(y||(e&=-97,u=d=a),m=m===a?m:ga(bl(m),0),v=v===a?v:bl(v),y-=d?d.length:0,e&s){var g=u,b=d;u=d=a}var z=f?a:oi(t),x=[t,e,n,u,d,g,b,p,m,v];if(z&&function(t,e){var a=t[1],r=e[1],n=a|r,o=n<131,l=r==c&&8==a||r==c&&a==h&&t[7].length<=e[8]||384==r&&e[7].length<=e[8]&&8==a;if(!o&&!l)return t;1&r&&(t[2]=e[2],n|=1&a?0:4);var s=e[3];if(s){var u=t[3];t[3]=u?Ln(u,s,e[4]):s,t[4]=u?oa(t[3],i):e[4]}(s=e[5])&&(u=t[5],t[5]=u?Bn(u,s,e[6]):s,t[6]=u?oa(t[5],i):e[6]);(s=e[7])&&(t[7]=s);r&c&&(t[8]=null==t[8]?e[8]:ba(t[8],e[8]));null==t[9]&&(t[9]=e[9]);t[0]=e[0],t[1]=n}(x,z),t=x[0],e=x[1],n=x[2],u=x[3],d=x[4],!(v=x[9]=x[9]===a?f?0:t.length:ga(x[9]-y,0))&&24&e&&(e&=-25),e&&1!=e)w=8==e||e==o?function(t,e,r){var n=Fn(t);return function i(){for(var o=arguments.length,l=wt(o),s=o,c=si(i);s--;)l[s]=arguments[s];var h=o<3&&l[0]!==c&&l[o-1]!==c?[]:oa(l,c);return(o-=h.length)<r?Yn(t,e,Rn,i.placeholder,a,l,h,a,a,r-o):we(this&&this!==he&&this instanceof i?n:t,this,l)}}(t,e,v):e!=l&&33!=e||d.length?Rn.apply(a,x):function(t,e,a,r){var n=1&e,i=Fn(t);return function e(){for(var o=-1,l=arguments.length,s=-1,c=r.length,h=wt(c+l),u=this&&this!==he&&this instanceof e?i:t;++s<c;)h[s]=r[s];for(;l--;)h[s++]=arguments[++o];return we(u,n?a:this,h)}}(t,e,n,u);else var w=function(t,e,a){var r=1&e,n=Fn(t);return function e(){return(this&&this!==he&&this instanceof e?n:t).apply(r?a:this,arguments)}}(t,e,n);return Oi((z?tn:Ci)(w,x),t,e)}function Qn(t,e,r,n){return t===a||Wo(t,Et[r])&&!Dt.call(n,r)?e:t}function ti(t,e,r,n,i,o){return il(t)&&il(e)&&(o.set(e,t),Nr(t,e,a,ti,o),o.delete(e)),t}function ei(t){return cl(t)?a:t}function ai(t,e,r,n,i,o){var l=1&r,s=t.length,c=e.length;if(s!=c&&!(l&&c>s))return!1;var h=o.get(t),u=o.get(e);if(h&&u)return h==e&&u==t;var d=-1,p=!0,m=2&r?new Ya:a;for(o.set(t,e),o.set(e,t);++d<s;){var v=t[d],f=e[d];if(n)var y=l?n(f,v,d,e,t,o):n(v,f,d,t,e,o);if(y!==a){if(y)continue;p=!1;break}if(m){if(!Oe(e,(function(t,e){if(!Je(m,e)&&(v===t||i(v,t,r,n,o)))return m.push(e)}))){p=!1;break}}else if(v!==f&&!i(v,f,r,n,o)){p=!1;break}}return o.delete(t),o.delete(e),p}function ri(t){return Ei(Vi(t,a,Ki),t+"")}function ni(t){return _r(t,Dl,pi)}function ii(t){return _r(t,jl,mi)}var oi=ka?function(t){return ka.get(t)}:ps;function li(t){for(var e=t.name+"",a=Ca[e],r=Dt.call(Ca,e)?a.length:0;r--;){var n=a[r],i=n.func;if(null==i||i==t)return n.name}return e}function si(t){return(Dt.call(Pa,"placeholder")?Pa:t).placeholder}function ci(){var t=Pa.iteratee||cs;return t=t===cs?Tr:t,arguments.length?t(arguments[0],arguments[1]):t}function hi(t,e){var a=t.__data__;return function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}(e)?a["string"==typeof e?"string":"hash"]:a.map}function ui(t){for(var e=Dl(t),a=e.length;a--;){var r=e[a],n=t[r];e[a]=[r,n,Ai(n)]}return e}function di(t,e){var r=function(t,e){return null==t?a:t[e]}(t,e);return Or(r)?r:a}var pi=pa?function(t){return null==t?[]:(t=Vt(t),Ve(pa(t),(function(e){return Zt.call(t,e)})))}:zs,mi=pa?function(t){for(var e=[];t;)Ce(e,pi(t)),t=Gt(t);return e}:zs,vi=Ar;function fi(t,e,a){for(var r=-1,n=(e=zn(e,t)).length,i=!1;++r<n;){var o=Ri(e[r]);if(!(i=null!=t&&a(t,o)))break;t=t[o]}return i||++r!=n?i:!!(n=null==t?0:t.length)&&nl(n)&&bi(o,n)&&(Ko(t)||Yo(t))}function yi(t){return"function"!=typeof t.constructor||_i(t)?{}:Ra(Gt(t))}function gi(t){return Ko(t)||Yo(t)||!!(ie&&t&&t[ie])}function bi(t,e){var a=typeof t;return!!(e=null==e?d:e)&&("number"==a||"symbol"!=a&&gt.test(t))&&t>-1&&t%1==0&&t<e}function zi(t,e,a){if(!il(a))return!1;var r=typeof e;return!!("number"==r?Zo(a)&&bi(e,a.length):"string"==r&&e in a)&&Wo(a[e],t)}function xi(t,e){if(Ko(t))return!1;var a=typeof t;return!("number"!=a&&"symbol"!=a&&"boolean"!=a&&null!=t&&!pl(t))||(tt.test(t)||!Q.test(t)||null!=e&&t in Vt(e))}function wi(t){var e=li(t),a=Pa[e];if("function"!=typeof a||!(e in Ua.prototype))return!1;if(t===a)return!0;var r=oi(a);return!!r&&t===r[0]}(_a&&vi(new _a(new ArrayBuffer(1)))!=E||Aa&&vi(new Aa)!=M||Ha&&vi(Ha.resolve())!=H||Va&&vi(new Va)!=L||La&&vi(new La)!=C)&&(vi=function(t){var e=Ar(t),r=e==A?t.constructor:a,n=r?Ni(r):"";if(n)switch(n){case Sa:return E;case Ea:return M;case Oa:return H;case Ta:return L;case Da:return C}return e});var Mi=Ot?al:xs;function _i(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Et)}function Ai(t){return t==t&&!il(t)}function Hi(t,e){return function(r){return null!=r&&(r[t]===e&&(e!==a||t in Vt(r)))}}function Vi(t,e,r){return e=ga(e===a?t.length-1:e,0),function(){for(var a=arguments,n=-1,i=ga(a.length-e,0),o=wt(i);++n<i;)o[n]=a[e+n];n=-1;for(var l=wt(e+1);++n<e;)l[n]=a[n];return l[e]=r(o),we(t,this,l)}}function Li(t,e){return e.length<2?t:Mr(t,rn(e,0,-1))}function Bi(t,e){for(var r=t.length,n=ba(e.length,r),i=kn(t);n--;){var o=e[n];t[n]=bi(o,r)?i[o]:a}return t}function ki(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var Ci=Ti(tn),Si=ve||function(t,e){return he.setTimeout(t,e)},Ei=Ti(en);function Oi(t,e,a){var r=e+"";return Ei(t,function(t,e){var a=e.length;if(!a)return t;var r=a-1;return e[r]=(a>1?"& ":"")+e[r],e=e.join(a>2?", ":" "),t.replace(ot,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return _e(v,(function(a){var r="_."+a[0];e&a[1]&&!Le(t,r)&&t.push(r)})),t.sort()}(function(t){var e=t.match(lt);return e?e[1].split(st):[]}(r),a)))}function Ti(t){var e=0,r=0;return function(){var n=za(),i=16-(n-r);if(r=n,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(a,arguments)}}function Di(t,e){var r=-1,n=t.length,i=n-1;for(e=e===a?n:e;++r<e;){var o=Yr(r,i),l=t[o];t[o]=t[r],t[r]=l}return t.length=e,t}var ji,Fi,Ii,Pi=(ji=function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(et,(function(t,a,r,n){e.push(r?n.replace(ut,"$1"):a||t)})),e},Fi=Io(ji,(function(t){return 500===Ii.size&&Ii.clear(),t})),Ii=Fi.cache,Fi);function Ri(t){if("string"==typeof t||pl(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Ni(t){if(null!=t){try{return Tt.call(t)}catch(e){}try{return t+""}catch(e){}}return""}function $i(t){if(t instanceof Ua)return t.clone();var e=new $a(t.__wrapped__,t.__chain__);return e.__actions__=kn(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Ui=Jr((function(t,e){return Xo(t)?ur(t,yr(e,1,Xo,!0)):[]})),Wi=Jr((function(t,e){var r=to(e);return Xo(r)&&(r=a),Xo(t)?ur(t,yr(e,1,Xo,!0),ci(r,2)):[]})),qi=Jr((function(t,e){var r=to(e);return Xo(r)&&(r=a),Xo(t)?ur(t,yr(e,1,Xo,!0),a,r):[]}));function Gi(t,e,a){var r=null==t?0:t.length;if(!r)return-1;var n=null==a?0:bl(a);return n<0&&(n=ga(r+n,0)),je(t,ci(e,3),n)}function Yi(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var i=n-1;return r!==a&&(i=bl(r),i=r<0?ga(n+i,0):ba(i,n-1)),je(t,ci(e,3),i,!0)}function Ki(t){return(null==t?0:t.length)?yr(t,1):[]}function Ji(t){return t&&t.length?t[0]:a}var Zi=Jr((function(t){var e=ke(t,gn);return e.length&&e[0]===t[0]?Br(e):[]})),Xi=Jr((function(t){var e=to(t),r=ke(t,gn);return e===to(r)?e=a:r.pop(),r.length&&r[0]===t[0]?Br(r,ci(e,2)):[]})),Qi=Jr((function(t){var e=to(t),r=ke(t,gn);return(e="function"==typeof e?e:a)&&r.pop(),r.length&&r[0]===t[0]?Br(r,a,e):[]}));function to(t){var e=null==t?0:t.length;return e?t[e-1]:a}var eo=Jr(ao);function ao(t,e){return t&&t.length&&e&&e.length?qr(t,e):t}var ro=ri((function(t,e){var a=null==t?0:t.length,r=or(t,e);return Gr(t,ke(e,(function(t){return bi(t,a)?+t:t})).sort(Vn)),r}));function no(t){return null==t?t:Ma.call(t)}var io=Jr((function(t){return un(yr(t,1,Xo,!0))})),oo=Jr((function(t){var e=to(t);return Xo(e)&&(e=a),un(yr(t,1,Xo,!0),ci(e,2))})),lo=Jr((function(t){var e=to(t);return e="function"==typeof e?e:a,un(yr(t,1,Xo,!0),a,e)}));function so(t){if(!t||!t.length)return[];var e=0;return t=Ve(t,(function(t){if(Xo(t))return e=ga(t.length,e),!0})),qe(e,(function(e){return ke(t,Ne(e))}))}function co(t,e){if(!t||!t.length)return[];var r=so(t);return null==e?r:ke(r,(function(t){return we(e,a,t)}))}var ho=Jr((function(t,e){return Xo(t)?ur(t,e):[]})),uo=Jr((function(t){return fn(Ve(t,Xo))})),po=Jr((function(t){var e=to(t);return Xo(e)&&(e=a),fn(Ve(t,Xo),ci(e,2))})),mo=Jr((function(t){var e=to(t);return e="function"==typeof e?e:a,fn(Ve(t,Xo),a,e)})),vo=Jr(so);var fo=Jr((function(t){var e=t.length,r=e>1?t[e-1]:a;return r="function"==typeof r?(t.pop(),r):a,co(t,r)}));function yo(t){var e=Pa(t);return e.__chain__=!0,e}function go(t,e){return e(t)}var bo=ri((function(t){var e=t.length,r=e?t[0]:0,n=this.__wrapped__,i=function(e){return or(e,t)};return!(e>1||this.__actions__.length)&&n instanceof Ua&&bi(r)?((n=n.slice(r,+r+(e?1:0))).__actions__.push({func:go,args:[i],thisArg:a}),new $a(n,this.__chain__).thru((function(t){return e&&!t.length&&t.push(a),t}))):this.thru(i)}));var zo=Sn((function(t,e,a){Dt.call(t,a)?++t[a]:ir(t,a,1)}));var xo=In(Gi),wo=In(Yi);function Mo(t,e){return(Ko(t)?_e:dr)(t,ci(e,3))}function _o(t,e){return(Ko(t)?Ae:pr)(t,ci(e,3))}var Ao=Sn((function(t,e,a){Dt.call(t,a)?t[a].push(e):ir(t,a,[e])}));var Ho=Jr((function(t,e,a){var r=-1,n="function"==typeof e,i=Zo(t)?wt(t.length):[];return dr(t,(function(t){i[++r]=n?we(e,t,a):kr(t,e,a)})),i})),Vo=Sn((function(t,e,a){ir(t,a,e)}));function Lo(t,e){return(Ko(t)?ke:Ir)(t,ci(e,3))}var Bo=Sn((function(t,e,a){t[a?0:1].push(e)}),(function(){return[[],[]]}));var ko=Jr((function(t,e){if(null==t)return[];var a=e.length;return a>1&&zi(t,e[0],e[1])?e=[]:a>2&&zi(e[0],e[1],e[2])&&(e=[e[0]]),Ur(t,yr(e,1),[])})),Co=me||function(){return he.Date.now()};function So(t,e,r){return e=r?a:e,e=t&&null==e?t.length:e,Xn(t,c,a,a,a,a,e)}function Eo(t,e){var n;if("function"!=typeof e)throw new kt(r);return t=bl(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=a),n}}var Oo=Jr((function(t,e,a){var r=1;if(a.length){var n=oa(a,si(Oo));r|=l}return Xn(t,r,e,a,n)})),To=Jr((function(t,e,a){var r=3;if(a.length){var n=oa(a,si(To));r|=l}return Xn(e,r,t,a,n)}));function Do(t,e,n){var i,o,l,s,c,h,u=0,d=!1,p=!1,m=!0;if("function"!=typeof t)throw new kt(r);function v(e){var r=i,n=o;return i=o=a,u=e,s=t.apply(n,r)}function f(t){return u=t,c=Si(g,e),d?v(t):s}function y(t){var r=t-h;return h===a||r>=e||r<0||p&&t-u>=l}function g(){var t=Co();if(y(t))return b(t);c=Si(g,function(t){var a=e-(t-h);return p?ba(a,l-(t-u)):a}(t))}function b(t){return c=a,m&&i?v(t):(i=o=a,s)}function z(){var t=Co(),r=y(t);if(i=arguments,o=this,h=t,r){if(c===a)return f(h);if(p)return Mn(c),c=Si(g,e),v(h)}return c===a&&(c=Si(g,e)),s}return e=xl(e)||0,il(n)&&(d=!!n.leading,l=(p="maxWait"in n)?ga(xl(n.maxWait)||0,e):l,m="trailing"in n?!!n.trailing:m),z.cancel=function(){c!==a&&Mn(c),u=0,i=h=o=c=a},z.flush=function(){return c===a?s:b(Co())},z}var jo=Jr((function(t,e){return hr(t,1,e)})),Fo=Jr((function(t,e,a){return hr(t,xl(e)||0,a)}));function Io(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new kt(r);var a=function(){var r=arguments,n=e?e.apply(this,r):r[0],i=a.cache;if(i.has(n))return i.get(n);var o=t.apply(this,r);return a.cache=i.set(n,o)||i,o};return a.cache=new(Io.Cache||Ga),a}function Po(t){if("function"!=typeof t)throw new kt(r);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Io.Cache=Ga;var Ro=xn((function(t,e){var a=(e=1==e.length&&Ko(e[0])?ke(e[0],Ye(ci())):ke(yr(e,1),Ye(ci()))).length;return Jr((function(r){for(var n=-1,i=ba(r.length,a);++n<i;)r[n]=e[n].call(this,r[n]);return we(t,this,r)}))})),No=Jr((function(t,e){var r=oa(e,si(No));return Xn(t,l,a,e,r)})),$o=Jr((function(t,e){var r=oa(e,si($o));return Xn(t,s,a,e,r)})),Uo=ri((function(t,e){return Xn(t,h,a,a,a,e)}));function Wo(t,e){return t===e||t!=t&&e!=e}var qo=Gn(Hr),Go=Gn((function(t,e){return t>=e})),Yo=Cr(function(){return arguments}())?Cr:function(t){return ol(t)&&Dt.call(t,"callee")&&!Zt.call(t,"callee")},Ko=wt.isArray,Jo=fe?Ye(fe):function(t){return ol(t)&&Ar(t)==S};function Zo(t){return null!=t&&nl(t.length)&&!al(t)}function Xo(t){return ol(t)&&Zo(t)}var Qo=ma||xs,tl=ye?Ye(ye):function(t){return ol(t)&&Ar(t)==b};function el(t){if(!ol(t))return!1;var e=Ar(t);return e==z||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!cl(t)}function al(t){if(!il(t))return!1;var e=Ar(t);return e==x||e==w||"[object AsyncFunction]"==e||"[object Proxy]"==e}function rl(t){return"number"==typeof t&&t==bl(t)}function nl(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=d}function il(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function ol(t){return null!=t&&"object"==typeof t}var ll=ge?Ye(ge):function(t){return ol(t)&&vi(t)==M};function sl(t){return"number"==typeof t||ol(t)&&Ar(t)==_}function cl(t){if(!ol(t)||Ar(t)!=A)return!1;var e=Gt(t);if(null===e)return!0;var a=Dt.call(e,"constructor")&&e.constructor;return"function"==typeof a&&a instanceof a&&Tt.call(a)==Pt}var hl=be?Ye(be):function(t){return ol(t)&&Ar(t)==V};var ul=ze?Ye(ze):function(t){return ol(t)&&vi(t)==L};function dl(t){return"string"==typeof t||!Ko(t)&&ol(t)&&Ar(t)==B}function pl(t){return"symbol"==typeof t||ol(t)&&Ar(t)==k}var ml=xe?Ye(xe):function(t){return ol(t)&&nl(t.length)&&!!re[Ar(t)]};var vl=Gn(Fr),fl=Gn((function(t,e){return t<=e}));function yl(t){if(!t)return[];if(Zo(t))return dl(t)?ca(t):kn(t);if(se&&t[se])return function(t){for(var e,a=[];!(e=t.next()).done;)a.push(e.value);return a}(t[se]());var e=vi(t);return(e==M?na:e==L?la:Wl)(t)}function gl(t){return t?(t=xl(t))===u||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function bl(t){var e=gl(t),a=e%1;return e==e?a?e-a:e:0}function zl(t){return t?lr(bl(t),0,m):0}function xl(t){if("number"==typeof t)return t;if(pl(t))return p;if(il(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=il(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Ge(t);var a=vt.test(t);return a||yt.test(t)?le(t.slice(2),a?2:8):mt.test(t)?p:+t}function wl(t){return Cn(t,jl(t))}function Ml(t){return null==t?"":hn(t)}var _l=En((function(t,e){if(_i(e)||Zo(e))Cn(e,Dl(e),t);else for(var a in e)Dt.call(e,a)&&er(t,a,e[a])})),Al=En((function(t,e){Cn(e,jl(e),t)})),Hl=En((function(t,e,a,r){Cn(e,jl(e),t,r)})),Vl=En((function(t,e,a,r){Cn(e,Dl(e),t,r)})),Ll=ri(or);var Bl=Jr((function(t,e){t=Vt(t);var r=-1,n=e.length,i=n>2?e[2]:a;for(i&&zi(e[0],e[1],i)&&(n=1);++r<n;)for(var o=e[r],l=jl(o),s=-1,c=l.length;++s<c;){var h=l[s],u=t[h];(u===a||Wo(u,Et[h])&&!Dt.call(t,h))&&(t[h]=o[h])}return t})),kl=Jr((function(t){return t.push(a,ti),we(Il,a,t)}));function Cl(t,e,r){var n=null==t?a:Mr(t,e);return n===a?r:n}function Sl(t,e){return null!=t&&fi(t,e,Lr)}var El=Nn((function(t,e,a){null!=e&&"function"!=typeof e.toString&&(e=It.call(e)),t[e]=a}),is(ss)),Ol=Nn((function(t,e,a){null!=e&&"function"!=typeof e.toString&&(e=It.call(e)),Dt.call(t,e)?t[e].push(a):t[e]=[a]}),ci),Tl=Jr(kr);function Dl(t){return Zo(t)?Ja(t):Dr(t)}function jl(t){return Zo(t)?Ja(t,!0):jr(t)}var Fl=En((function(t,e,a){Nr(t,e,a)})),Il=En((function(t,e,a,r){Nr(t,e,a,r)})),Pl=ri((function(t,e){var a={};if(null==t)return a;var r=!1;e=ke(e,(function(e){return e=zn(e,t),r||(r=e.length>1),e})),Cn(t,ii(t),a),r&&(a=sr(a,7,ei));for(var n=e.length;n--;)dn(a,e[n]);return a}));var Rl=ri((function(t,e){return null==t?{}:function(t,e){return Wr(t,e,(function(e,a){return Sl(t,a)}))}(t,e)}));function Nl(t,e){if(null==t)return{};var a=ke(ii(t),(function(t){return[t]}));return e=ci(e),Wr(t,a,(function(t,a){return e(t,a[0])}))}var $l=Zn(Dl),Ul=Zn(jl);function Wl(t){return null==t?[]:Ke(t,Dl(t))}var ql=jn((function(t,e,a){return e=e.toLowerCase(),t+(a?Gl(e):e)}));function Gl(t){return es(Ml(t).toLowerCase())}function Yl(t){return(t=Ml(t))&&t.replace(bt,ta).replace(Jt,"")}var Kl=jn((function(t,e,a){return t+(a?"-":"")+e.toLowerCase()})),Jl=jn((function(t,e,a){return t+(a?" ":"")+e.toLowerCase()})),Zl=Dn("toLowerCase");var Xl=jn((function(t,e,a){return t+(a?"_":"")+e.toLowerCase()}));var Ql=jn((function(t,e,a){return t+(a?" ":"")+es(e)}));var ts=jn((function(t,e,a){return t+(a?" ":"")+e.toUpperCase()})),es=Dn("toUpperCase");function as(t,e,r){return t=Ml(t),(e=r?a:e)===a?function(t){return te.test(t)}(t)?function(t){return t.match(Xt)||[]}(t):function(t){return t.match(ct)||[]}(t):t.match(e)||[]}var rs=Jr((function(t,e){try{return we(t,a,e)}catch(r){return el(r)?r:new _t(r)}})),ns=ri((function(t,e){return _e(e,(function(e){e=Ri(e),ir(t,e,Oo(t[e],t))})),t}));function is(t){return function(){return t}}var os=Pn(),ls=Pn(!0);function ss(t){return t}function cs(t){return Tr("function"==typeof t?t:sr(t,1))}var hs=Jr((function(t,e){return function(a){return kr(a,t,e)}})),us=Jr((function(t,e){return function(a){return kr(t,a,e)}}));function ds(t,e,a){var r=Dl(e),n=wr(e,r);null!=a||il(e)&&(n.length||!r.length)||(a=e,e=t,t=this,n=wr(e,Dl(e)));var i=!(il(a)&&"chain"in a&&!a.chain),o=al(t);return _e(n,(function(a){var r=e[a];t[a]=r,o&&(t.prototype[a]=function(){var e=this.__chain__;if(i||e){var a=t(this.__wrapped__),n=a.__actions__=kn(this.__actions__);return n.push({func:r,args:arguments,thisArg:t}),a.__chain__=e,a}return r.apply(t,Ce([this.value()],arguments))})})),t}function ps(){}var ms=Un(ke),vs=Un(He),fs=Un(Oe);function ys(t){return xi(t)?Ne(Ri(t)):function(t){return function(e){return Mr(e,t)}}(t)}var gs=qn(),bs=qn(!0);function zs(){return[]}function xs(){return!1}var ws=$n((function(t,e){return t+e}),0),Ms=Kn("ceil"),_s=$n((function(t,e){return t/e}),1),As=Kn("floor");var Hs,Vs=$n((function(t,e){return t*e}),1),Ls=Kn("round"),Bs=$n((function(t,e){return t-e}),0);return Pa.after=function(t,e){if("function"!=typeof e)throw new kt(r);return t=bl(t),function(){if(--t<1)return e.apply(this,arguments)}},Pa.ary=So,Pa.assign=_l,Pa.assignIn=Al,Pa.assignInWith=Hl,Pa.assignWith=Vl,Pa.at=Ll,Pa.before=Eo,Pa.bind=Oo,Pa.bindAll=ns,Pa.bindKey=To,Pa.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Ko(t)?t:[t]},Pa.chain=yo,Pa.chunk=function(t,e,r){e=(r?zi(t,e,r):e===a)?1:ga(bl(e),0);var n=null==t?0:t.length;if(!n||e<1)return[];for(var i=0,o=0,l=wt(Te(n/e));i<n;)l[o++]=rn(t,i,i+=e);return l},Pa.compact=function(t){for(var e=-1,a=null==t?0:t.length,r=0,n=[];++e<a;){var i=t[e];i&&(n[r++]=i)}return n},Pa.concat=function(){var t=arguments.length;if(!t)return[];for(var e=wt(t-1),a=arguments[0],r=t;r--;)e[r-1]=arguments[r];return Ce(Ko(a)?kn(a):[a],yr(e,1))},Pa.cond=function(t){var e=null==t?0:t.length,a=ci();return t=e?ke(t,(function(t){if("function"!=typeof t[1])throw new kt(r);return[a(t[0]),t[1]]})):[],Jr((function(a){for(var r=-1;++r<e;){var n=t[r];if(we(n[0],this,a))return we(n[1],this,a)}}))},Pa.conforms=function(t){return function(t){var e=Dl(t);return function(a){return cr(a,t,e)}}(sr(t,1))},Pa.constant=is,Pa.countBy=zo,Pa.create=function(t,e){var a=Ra(t);return null==e?a:nr(a,e)},Pa.curry=function t(e,r,n){var i=Xn(e,8,a,a,a,a,a,r=n?a:r);return i.placeholder=t.placeholder,i},Pa.curryRight=function t(e,r,n){var i=Xn(e,o,a,a,a,a,a,r=n?a:r);return i.placeholder=t.placeholder,i},Pa.debounce=Do,Pa.defaults=Bl,Pa.defaultsDeep=kl,Pa.defer=jo,Pa.delay=Fo,Pa.difference=Ui,Pa.differenceBy=Wi,Pa.differenceWith=qi,Pa.drop=function(t,e,r){var n=null==t?0:t.length;return n?rn(t,(e=r||e===a?1:bl(e))<0?0:e,n):[]},Pa.dropRight=function(t,e,r){var n=null==t?0:t.length;return n?rn(t,0,(e=n-(e=r||e===a?1:bl(e)))<0?0:e):[]},Pa.dropRightWhile=function(t,e){return t&&t.length?mn(t,ci(e,3),!0,!0):[]},Pa.dropWhile=function(t,e){return t&&t.length?mn(t,ci(e,3),!0):[]},Pa.fill=function(t,e,r,n){var i=null==t?0:t.length;return i?(r&&"number"!=typeof r&&zi(t,e,r)&&(r=0,n=i),function(t,e,r,n){var i=t.length;for((r=bl(r))<0&&(r=-r>i?0:i+r),(n=n===a||n>i?i:bl(n))<0&&(n+=i),n=r>n?0:zl(n);r<n;)t[r++]=e;return t}(t,e,r,n)):[]},Pa.filter=function(t,e){return(Ko(t)?Ve:fr)(t,ci(e,3))},Pa.flatMap=function(t,e){return yr(Lo(t,e),1)},Pa.flatMapDeep=function(t,e){return yr(Lo(t,e),u)},Pa.flatMapDepth=function(t,e,r){return r=r===a?1:bl(r),yr(Lo(t,e),r)},Pa.flatten=Ki,Pa.flattenDeep=function(t){return(null==t?0:t.length)?yr(t,u):[]},Pa.flattenDepth=function(t,e){return(null==t?0:t.length)?yr(t,e=e===a?1:bl(e)):[]},Pa.flip=function(t){return Xn(t,512)},Pa.flow=os,Pa.flowRight=ls,Pa.fromPairs=function(t){for(var e=-1,a=null==t?0:t.length,r={};++e<a;){var n=t[e];r[n[0]]=n[1]}return r},Pa.functions=function(t){return null==t?[]:wr(t,Dl(t))},Pa.functionsIn=function(t){return null==t?[]:wr(t,jl(t))},Pa.groupBy=Ao,Pa.initial=function(t){return(null==t?0:t.length)?rn(t,0,-1):[]},Pa.intersection=Zi,Pa.intersectionBy=Xi,Pa.intersectionWith=Qi,Pa.invert=El,Pa.invertBy=Ol,Pa.invokeMap=Ho,Pa.iteratee=cs,Pa.keyBy=Vo,Pa.keys=Dl,Pa.keysIn=jl,Pa.map=Lo,Pa.mapKeys=function(t,e){var a={};return e=ci(e,3),zr(t,(function(t,r,n){ir(a,e(t,r,n),t)})),a},Pa.mapValues=function(t,e){var a={};return e=ci(e,3),zr(t,(function(t,r,n){ir(a,r,e(t,r,n))})),a},Pa.matches=function(t){return Pr(sr(t,1))},Pa.matchesProperty=function(t,e){return Rr(t,sr(e,1))},Pa.memoize=Io,Pa.merge=Fl,Pa.mergeWith=Il,Pa.method=hs,Pa.methodOf=us,Pa.mixin=ds,Pa.negate=Po,Pa.nthArg=function(t){return t=bl(t),Jr((function(e){return $r(e,t)}))},Pa.omit=Pl,Pa.omitBy=function(t,e){return Nl(t,Po(ci(e)))},Pa.once=function(t){return Eo(2,t)},Pa.orderBy=function(t,e,r,n){return null==t?[]:(Ko(e)||(e=null==e?[]:[e]),Ko(r=n?a:r)||(r=null==r?[]:[r]),Ur(t,e,r))},Pa.over=ms,Pa.overArgs=Ro,Pa.overEvery=vs,Pa.overSome=fs,Pa.partial=No,Pa.partialRight=$o,Pa.partition=Bo,Pa.pick=Rl,Pa.pickBy=Nl,Pa.property=ys,Pa.propertyOf=function(t){return function(e){return null==t?a:Mr(t,e)}},Pa.pull=eo,Pa.pullAll=ao,Pa.pullAllBy=function(t,e,a){return t&&t.length&&e&&e.length?qr(t,e,ci(a,2)):t},Pa.pullAllWith=function(t,e,r){return t&&t.length&&e&&e.length?qr(t,e,a,r):t},Pa.pullAt=ro,Pa.range=gs,Pa.rangeRight=bs,Pa.rearg=Uo,Pa.reject=function(t,e){return(Ko(t)?Ve:fr)(t,Po(ci(e,3)))},Pa.remove=function(t,e){var a=[];if(!t||!t.length)return a;var r=-1,n=[],i=t.length;for(e=ci(e,3);++r<i;){var o=t[r];e(o,r,t)&&(a.push(o),n.push(r))}return Gr(t,n),a},Pa.rest=function(t,e){if("function"!=typeof t)throw new kt(r);return Jr(t,e=e===a?e:bl(e))},Pa.reverse=no,Pa.sampleSize=function(t,e,r){return e=(r?zi(t,e,r):e===a)?1:bl(e),(Ko(t)?Xa:Xr)(t,e)},Pa.set=function(t,e,a){return null==t?t:Qr(t,e,a)},Pa.setWith=function(t,e,r,n){return n="function"==typeof n?n:a,null==t?t:Qr(t,e,r,n)},Pa.shuffle=function(t){return(Ko(t)?Qa:an)(t)},Pa.slice=function(t,e,r){var n=null==t?0:t.length;return n?(r&&"number"!=typeof r&&zi(t,e,r)?(e=0,r=n):(e=null==e?0:bl(e),r=r===a?n:bl(r)),rn(t,e,r)):[]},Pa.sortBy=ko,Pa.sortedUniq=function(t){return t&&t.length?sn(t):[]},Pa.sortedUniqBy=function(t,e){return t&&t.length?sn(t,ci(e,2)):[]},Pa.split=function(t,e,r){return r&&"number"!=typeof r&&zi(t,e,r)&&(e=r=a),(r=r===a?m:r>>>0)?(t=Ml(t))&&("string"==typeof e||null!=e&&!hl(e))&&!(e=hn(e))&&ra(t)?wn(ca(t),0,r):t.split(e,r):[]},Pa.spread=function(t,e){if("function"!=typeof t)throw new kt(r);return e=null==e?0:ga(bl(e),0),Jr((function(a){var r=a[e],n=wn(a,0,e);return r&&Ce(n,r),we(t,this,n)}))},Pa.tail=function(t){var e=null==t?0:t.length;return e?rn(t,1,e):[]},Pa.take=function(t,e,r){return t&&t.length?rn(t,0,(e=r||e===a?1:bl(e))<0?0:e):[]},Pa.takeRight=function(t,e,r){var n=null==t?0:t.length;return n?rn(t,(e=n-(e=r||e===a?1:bl(e)))<0?0:e,n):[]},Pa.takeRightWhile=function(t,e){return t&&t.length?mn(t,ci(e,3),!1,!0):[]},Pa.takeWhile=function(t,e){return t&&t.length?mn(t,ci(e,3)):[]},Pa.tap=function(t,e){return e(t),t},Pa.throttle=function(t,e,a){var n=!0,i=!0;if("function"!=typeof t)throw new kt(r);return il(a)&&(n="leading"in a?!!a.leading:n,i="trailing"in a?!!a.trailing:i),Do(t,e,{leading:n,maxWait:e,trailing:i})},Pa.thru=go,Pa.toArray=yl,Pa.toPairs=$l,Pa.toPairsIn=Ul,Pa.toPath=function(t){return Ko(t)?ke(t,Ri):pl(t)?[t]:kn(Pi(Ml(t)))},Pa.toPlainObject=wl,Pa.transform=function(t,e,a){var r=Ko(t),n=r||Qo(t)||ml(t);if(e=ci(e,4),null==a){var i=t&&t.constructor;a=n?r?new i:[]:il(t)&&al(i)?Ra(Gt(t)):{}}return(n?_e:zr)(t,(function(t,r,n){return e(a,t,r,n)})),a},Pa.unary=function(t){return So(t,1)},Pa.union=io,Pa.unionBy=oo,Pa.unionWith=lo,Pa.uniq=function(t){return t&&t.length?un(t):[]},Pa.uniqBy=function(t,e){return t&&t.length?un(t,ci(e,2)):[]},Pa.uniqWith=function(t,e){return e="function"==typeof e?e:a,t&&t.length?un(t,a,e):[]},Pa.unset=function(t,e){return null==t||dn(t,e)},Pa.unzip=so,Pa.unzipWith=co,Pa.update=function(t,e,a){return null==t?t:pn(t,e,bn(a))},Pa.updateWith=function(t,e,r,n){return n="function"==typeof n?n:a,null==t?t:pn(t,e,bn(r),n)},Pa.values=Wl,Pa.valuesIn=function(t){return null==t?[]:Ke(t,jl(t))},Pa.without=ho,Pa.words=as,Pa.wrap=function(t,e){return No(bn(e),t)},Pa.xor=uo,Pa.xorBy=po,Pa.xorWith=mo,Pa.zip=vo,Pa.zipObject=function(t,e){return yn(t||[],e||[],er)},Pa.zipObjectDeep=function(t,e){return yn(t||[],e||[],Qr)},Pa.zipWith=fo,Pa.entries=$l,Pa.entriesIn=Ul,Pa.extend=Al,Pa.extendWith=Hl,ds(Pa,Pa),Pa.add=ws,Pa.attempt=rs,Pa.camelCase=ql,Pa.capitalize=Gl,Pa.ceil=Ms,Pa.clamp=function(t,e,r){return r===a&&(r=e,e=a),r!==a&&(r=(r=xl(r))==r?r:0),e!==a&&(e=(e=xl(e))==e?e:0),lr(xl(t),e,r)},Pa.clone=function(t){return sr(t,4)},Pa.cloneDeep=function(t){return sr(t,5)},Pa.cloneDeepWith=function(t,e){return sr(t,5,e="function"==typeof e?e:a)},Pa.cloneWith=function(t,e){return sr(t,4,e="function"==typeof e?e:a)},Pa.conformsTo=function(t,e){return null==e||cr(t,e,Dl(e))},Pa.deburr=Yl,Pa.defaultTo=function(t,e){return null==t||t!=t?e:t},Pa.divide=_s,Pa.endsWith=function(t,e,r){t=Ml(t),e=hn(e);var n=t.length,i=r=r===a?n:lr(bl(r),0,n);return(r-=e.length)>=0&&t.slice(r,i)==e},Pa.eq=Wo,Pa.escape=function(t){return(t=Ml(t))&&K.test(t)?t.replace(G,ea):t},Pa.escapeRegExp=function(t){return(t=Ml(t))&&rt.test(t)?t.replace(at,"\\$&"):t},Pa.every=function(t,e,r){var n=Ko(t)?He:mr;return r&&zi(t,e,r)&&(e=a),n(t,ci(e,3))},Pa.find=xo,Pa.findIndex=Gi,Pa.findKey=function(t,e){return De(t,ci(e,3),zr)},Pa.findLast=wo,Pa.findLastIndex=Yi,Pa.findLastKey=function(t,e){return De(t,ci(e,3),xr)},Pa.floor=As,Pa.forEach=Mo,Pa.forEachRight=_o,Pa.forIn=function(t,e){return null==t?t:gr(t,ci(e,3),jl)},Pa.forInRight=function(t,e){return null==t?t:br(t,ci(e,3),jl)},Pa.forOwn=function(t,e){return t&&zr(t,ci(e,3))},Pa.forOwnRight=function(t,e){return t&&xr(t,ci(e,3))},Pa.get=Cl,Pa.gt=qo,Pa.gte=Go,Pa.has=function(t,e){return null!=t&&fi(t,e,Vr)},Pa.hasIn=Sl,Pa.head=Ji,Pa.identity=ss,Pa.includes=function(t,e,a,r){t=Zo(t)?t:Wl(t),a=a&&!r?bl(a):0;var n=t.length;return a<0&&(a=ga(n+a,0)),dl(t)?a<=n&&t.indexOf(e,a)>-1:!!n&&Fe(t,e,a)>-1},Pa.indexOf=function(t,e,a){var r=null==t?0:t.length;if(!r)return-1;var n=null==a?0:bl(a);return n<0&&(n=ga(r+n,0)),Fe(t,e,n)},Pa.inRange=function(t,e,r){return e=gl(e),r===a?(r=e,e=0):r=gl(r),function(t,e,a){return t>=ba(e,a)&&t<ga(e,a)}(t=xl(t),e,r)},Pa.invoke=Tl,Pa.isArguments=Yo,Pa.isArray=Ko,Pa.isArrayBuffer=Jo,Pa.isArrayLike=Zo,Pa.isArrayLikeObject=Xo,Pa.isBoolean=function(t){return!0===t||!1===t||ol(t)&&Ar(t)==g},Pa.isBuffer=Qo,Pa.isDate=tl,Pa.isElement=function(t){return ol(t)&&1===t.nodeType&&!cl(t)},Pa.isEmpty=function(t){if(null==t)return!0;if(Zo(t)&&(Ko(t)||"string"==typeof t||"function"==typeof t.splice||Qo(t)||ml(t)||Yo(t)))return!t.length;var e=vi(t);if(e==M||e==L)return!t.size;if(_i(t))return!Dr(t).length;for(var a in t)if(Dt.call(t,a))return!1;return!0},Pa.isEqual=function(t,e){return Sr(t,e)},Pa.isEqualWith=function(t,e,r){var n=(r="function"==typeof r?r:a)?r(t,e):a;return n===a?Sr(t,e,a,r):!!n},Pa.isError=el,Pa.isFinite=function(t){return"number"==typeof t&&va(t)},Pa.isFunction=al,Pa.isInteger=rl,Pa.isLength=nl,Pa.isMap=ll,Pa.isMatch=function(t,e){return t===e||Er(t,e,ui(e))},Pa.isMatchWith=function(t,e,r){return r="function"==typeof r?r:a,Er(t,e,ui(e),r)},Pa.isNaN=function(t){return sl(t)&&t!=+t},Pa.isNative=function(t){if(Mi(t))throw new _t("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Or(t)},Pa.isNil=function(t){return null==t},Pa.isNull=function(t){return null===t},Pa.isNumber=sl,Pa.isObject=il,Pa.isObjectLike=ol,Pa.isPlainObject=cl,Pa.isRegExp=hl,Pa.isSafeInteger=function(t){return rl(t)&&t>=-9007199254740991&&t<=d},Pa.isSet=ul,Pa.isString=dl,Pa.isSymbol=pl,Pa.isTypedArray=ml,Pa.isUndefined=function(t){return t===a},Pa.isWeakMap=function(t){return ol(t)&&vi(t)==C},Pa.isWeakSet=function(t){return ol(t)&&"[object WeakSet]"==Ar(t)},Pa.join=function(t,e){return null==t?"":fa.call(t,e)},Pa.kebabCase=Kl,Pa.last=to,Pa.lastIndexOf=function(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var i=n;return r!==a&&(i=(i=bl(r))<0?ga(n+i,0):ba(i,n-1)),e==e?function(t,e,a){for(var r=a+1;r--;)if(t[r]===e)return r;return r}(t,e,i):je(t,Pe,i,!0)},Pa.lowerCase=Jl,Pa.lowerFirst=Zl,Pa.lt=vl,Pa.lte=fl,Pa.max=function(t){return t&&t.length?vr(t,ss,Hr):a},Pa.maxBy=function(t,e){return t&&t.length?vr(t,ci(e,2),Hr):a},Pa.mean=function(t){return Re(t,ss)},Pa.meanBy=function(t,e){return Re(t,ci(e,2))},Pa.min=function(t){return t&&t.length?vr(t,ss,Fr):a},Pa.minBy=function(t,e){return t&&t.length?vr(t,ci(e,2),Fr):a},Pa.stubArray=zs,Pa.stubFalse=xs,Pa.stubObject=function(){return{}},Pa.stubString=function(){return""},Pa.stubTrue=function(){return!0},Pa.multiply=Vs,Pa.nth=function(t,e){return t&&t.length?$r(t,bl(e)):a},Pa.noConflict=function(){return he._===this&&(he._=Rt),this},Pa.noop=ps,Pa.now=Co,Pa.pad=function(t,e,a){t=Ml(t);var r=(e=bl(e))?sa(t):0;if(!e||r>=e)return t;var n=(e-r)/2;return Wn($e(n),a)+t+Wn(Te(n),a)},Pa.padEnd=function(t,e,a){t=Ml(t);var r=(e=bl(e))?sa(t):0;return e&&r<e?t+Wn(e-r,a):t},Pa.padStart=function(t,e,a){t=Ml(t);var r=(e=bl(e))?sa(t):0;return e&&r<e?Wn(e-r,a)+t:t},Pa.parseInt=function(t,e,a){return a||null==e?e=0:e&&(e=+e),xa(Ml(t).replace(nt,""),e||0)},Pa.random=function(t,e,r){if(r&&"boolean"!=typeof r&&zi(t,e,r)&&(e=r=a),r===a&&("boolean"==typeof e?(r=e,e=a):"boolean"==typeof t&&(r=t,t=a)),t===a&&e===a?(t=0,e=1):(t=gl(t),e===a?(e=t,t=0):e=gl(e)),t>e){var n=t;t=e,e=n}if(r||t%1||e%1){var i=wa();return ba(t+i*(e-t+oe("1e-"+((i+"").length-1))),e)}return Yr(t,e)},Pa.reduce=function(t,e,a){var r=Ko(t)?Se:Ue,n=arguments.length<3;return r(t,ci(e,4),a,n,dr)},Pa.reduceRight=function(t,e,a){var r=Ko(t)?Ee:Ue,n=arguments.length<3;return r(t,ci(e,4),a,n,pr)},Pa.repeat=function(t,e,r){return e=(r?zi(t,e,r):e===a)?1:bl(e),Kr(Ml(t),e)},Pa.replace=function(){var t=arguments,e=Ml(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Pa.result=function(t,e,r){var n=-1,i=(e=zn(e,t)).length;for(i||(i=1,t=a);++n<i;){var o=null==t?a:t[Ri(e[n])];o===a&&(n=i,o=r),t=al(o)?o.call(t):o}return t},Pa.round=Ls,Pa.runInContext=t,Pa.sample=function(t){return(Ko(t)?Za:Zr)(t)},Pa.size=function(t){if(null==t)return 0;if(Zo(t))return dl(t)?sa(t):t.length;var e=vi(t);return e==M||e==L?t.size:Dr(t).length},Pa.snakeCase=Xl,Pa.some=function(t,e,r){var n=Ko(t)?Oe:nn;return r&&zi(t,e,r)&&(e=a),n(t,ci(e,3))},Pa.sortedIndex=function(t,e){return on(t,e)},Pa.sortedIndexBy=function(t,e,a){return ln(t,e,ci(a,2))},Pa.sortedIndexOf=function(t,e){var a=null==t?0:t.length;if(a){var r=on(t,e);if(r<a&&Wo(t[r],e))return r}return-1},Pa.sortedLastIndex=function(t,e){return on(t,e,!0)},Pa.sortedLastIndexBy=function(t,e,a){return ln(t,e,ci(a,2),!0)},Pa.sortedLastIndexOf=function(t,e){if(null==t?0:t.length){var a=on(t,e,!0)-1;if(Wo(t[a],e))return a}return-1},Pa.startCase=Ql,Pa.startsWith=function(t,e,a){return t=Ml(t),a=null==a?0:lr(bl(a),0,t.length),e=hn(e),t.slice(a,a+e.length)==e},Pa.subtract=Bs,Pa.sum=function(t){return t&&t.length?We(t,ss):0},Pa.sumBy=function(t,e){return t&&t.length?We(t,ci(e,2)):0},Pa.template=function(t,e,r){var n=Pa.templateSettings;r&&zi(t,e,r)&&(e=a),t=Ml(t),e=Hl({},e,n,Qn);var i,o,l=Hl({},e.imports,n.imports,Qn),s=Dl(l),c=Ke(l,s),h=0,u=e.interpolate||zt,d="__p += '",p=Lt((e.escape||zt).source+"|"+u.source+"|"+(u===X?dt:zt).source+"|"+(e.evaluate||zt).source+"|$","g"),m="//# sourceURL="+(Dt.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ae+"]")+"\n";t.replace(p,(function(e,a,r,n,l,s){return r||(r=n),d+=t.slice(h,s).replace(xt,aa),a&&(i=!0,d+="' +\n__e("+a+") +\n'"),l&&(o=!0,d+="';\n"+l+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),h=s+e.length,e})),d+="';\n";var v=Dt.call(e,"variable")&&e.variable;if(v){if(ht.test(v))throw new _t("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(o?d.replace($,""):d).replace(U,"$1").replace(W,"$1;"),d="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var f=rs((function(){return At(s,m+"return "+d).apply(a,c)}));if(f.source=d,el(f))throw f;return f},Pa.times=function(t,e){if((t=bl(t))<1||t>d)return[];var a=m,r=ba(t,m);e=ci(e),t-=m;for(var n=qe(r,e);++a<t;)e(a);return n},Pa.toFinite=gl,Pa.toInteger=bl,Pa.toLength=zl,Pa.toLower=function(t){return Ml(t).toLowerCase()},Pa.toNumber=xl,Pa.toSafeInteger=function(t){return t?lr(bl(t),-9007199254740991,d):0===t?t:0},Pa.toString=Ml,Pa.toUpper=function(t){return Ml(t).toUpperCase()},Pa.trim=function(t,e,r){if((t=Ml(t))&&(r||e===a))return Ge(t);if(!t||!(e=hn(e)))return t;var n=ca(t),i=ca(e);return wn(n,Ze(n,i),Xe(n,i)+1).join("")},Pa.trimEnd=function(t,e,r){if((t=Ml(t))&&(r||e===a))return t.slice(0,ha(t)+1);if(!t||!(e=hn(e)))return t;var n=ca(t);return wn(n,0,Xe(n,ca(e))+1).join("")},Pa.trimStart=function(t,e,r){if((t=Ml(t))&&(r||e===a))return t.replace(nt,"");if(!t||!(e=hn(e)))return t;var n=ca(t);return wn(n,Ze(n,ca(e))).join("")},Pa.truncate=function(t,e){var r=30,n="...";if(il(e)){var i="separator"in e?e.separator:i;r="length"in e?bl(e.length):r,n="omission"in e?hn(e.omission):n}var o=(t=Ml(t)).length;if(ra(t)){var l=ca(t);o=l.length}if(r>=o)return t;var s=r-sa(n);if(s<1)return n;var c=l?wn(l,0,s).join(""):t.slice(0,s);if(i===a)return c+n;if(l&&(s+=c.length-s),hl(i)){if(t.slice(s).search(i)){var h,u=c;for(i.global||(i=Lt(i.source,Ml(pt.exec(i))+"g")),i.lastIndex=0;h=i.exec(u);)var d=h.index;c=c.slice(0,d===a?s:d)}}else if(t.indexOf(hn(i),s)!=s){var p=c.lastIndexOf(i);p>-1&&(c=c.slice(0,p))}return c+n},Pa.unescape=function(t){return(t=Ml(t))&&Y.test(t)?t.replace(q,ua):t},Pa.uniqueId=function(t){var e=++jt;return Ml(t)+e},Pa.upperCase=ts,Pa.upperFirst=es,Pa.each=Mo,Pa.eachRight=_o,Pa.first=Ji,ds(Pa,(Hs={},zr(Pa,(function(t,e){Dt.call(Pa.prototype,e)||(Hs[e]=t)})),Hs),{chain:!1}),Pa.VERSION="4.17.21",_e(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Pa[t].placeholder=Pa})),_e(["drop","take"],(function(t,e){Ua.prototype[t]=function(r){r=r===a?1:ga(bl(r),0);var n=this.__filtered__&&!e?new Ua(this):this.clone();return n.__filtered__?n.__takeCount__=ba(r,n.__takeCount__):n.__views__.push({size:ba(r,m),type:t+(n.__dir__<0?"Right":"")}),n},Ua.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),_e(["filter","map","takeWhile"],(function(t,e){var a=e+1,r=1==a||3==a;Ua.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:ci(t,3),type:a}),e.__filtered__=e.__filtered__||r,e}})),_e(["head","last"],(function(t,e){var a="take"+(e?"Right":"");Ua.prototype[t]=function(){return this[a](1).value()[0]}})),_e(["initial","tail"],(function(t,e){var a="drop"+(e?"":"Right");Ua.prototype[t]=function(){return this.__filtered__?new Ua(this):this[a](1)}})),Ua.prototype.compact=function(){return this.filter(ss)},Ua.prototype.find=function(t){return this.filter(t).head()},Ua.prototype.findLast=function(t){return this.reverse().find(t)},Ua.prototype.invokeMap=Jr((function(t,e){return"function"==typeof t?new Ua(this):this.map((function(a){return kr(a,t,e)}))})),Ua.prototype.reject=function(t){return this.filter(Po(ci(t)))},Ua.prototype.slice=function(t,e){t=bl(t);var r=this;return r.__filtered__&&(t>0||e<0)?new Ua(r):(t<0?r=r.takeRight(-t):t&&(r=r.drop(t)),e!==a&&(r=(e=bl(e))<0?r.dropRight(-e):r.take(e-t)),r)},Ua.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Ua.prototype.toArray=function(){return this.take(m)},zr(Ua.prototype,(function(t,e){var r=/^(?:filter|find|map|reject)|While$/.test(e),n=/^(?:head|last)$/.test(e),i=Pa[n?"take"+("last"==e?"Right":""):e],o=n||/^find/.test(e);i&&(Pa.prototype[e]=function(){var e=this.__wrapped__,l=n?[1]:arguments,s=e instanceof Ua,c=l[0],h=s||Ko(e),u=function(t){var e=i.apply(Pa,Ce([t],l));return n&&d?e[0]:e};h&&r&&"function"==typeof c&&1!=c.length&&(s=h=!1);var d=this.__chain__,p=!!this.__actions__.length,m=o&&!d,v=s&&!p;if(!o&&h){e=v?e:new Ua(this);var f=t.apply(e,l);return f.__actions__.push({func:go,args:[u],thisArg:a}),new $a(f,d)}return m&&v?t.apply(this,l):(f=this.thru(u),m?n?f.value()[0]:f.value():f)})})),_e(["pop","push","shift","sort","splice","unshift"],(function(t){var e=Ct[t],a=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);Pa.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var n=this.value();return e.apply(Ko(n)?n:[],t)}return this[a]((function(a){return e.apply(Ko(a)?a:[],t)}))}})),zr(Ua.prototype,(function(t,e){var a=Pa[e];if(a){var r=a.name+"";Dt.call(Ca,r)||(Ca[r]=[]),Ca[r].push({name:e,func:a})}})),Ca[Rn(a,2).name]=[{name:"wrapper",func:a}],Ua.prototype.clone=function(){var t=new Ua(this.__wrapped__);return t.__actions__=kn(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=kn(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=kn(this.__views__),t},Ua.prototype.reverse=function(){if(this.__filtered__){var t=new Ua(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Ua.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,a=Ko(t),r=e<0,n=a?t.length:0,i=function(t,e,a){var r=-1,n=a.length;for(;++r<n;){var i=a[r],o=i.size;switch(i.type){case"drop":t+=o;break;case"dropRight":e-=o;break;case"take":e=ba(e,t+o);break;case"takeRight":t=ga(t,e-o)}}return{start:t,end:e}}(0,n,this.__views__),o=i.start,l=i.end,s=l-o,c=r?l:o-1,h=this.__iteratees__,u=h.length,d=0,p=ba(s,this.__takeCount__);if(!a||!r&&n==s&&p==s)return vn(t,this.__actions__);var m=[];t:for(;s--&&d<p;){for(var v=-1,f=t[c+=e];++v<u;){var y=h[v],g=y.iteratee,b=y.type,z=g(f);if(2==b)f=z;else if(!z){if(1==b)continue t;break t}}m[d++]=f}return m},Pa.prototype.at=bo,Pa.prototype.chain=function(){return yo(this)},Pa.prototype.commit=function(){return new $a(this.value(),this.__chain__)},Pa.prototype.next=function(){this.__values__===a&&(this.__values__=yl(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?a:this.__values__[this.__index__++]}},Pa.prototype.plant=function(t){for(var e,r=this;r instanceof Na;){var n=$i(r);n.__index__=0,n.__values__=a,e?i.__wrapped__=n:e=n;var i=n;r=r.__wrapped__}return i.__wrapped__=t,e},Pa.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Ua){var e=t;return this.__actions__.length&&(e=new Ua(this)),(e=e.reverse()).__actions__.push({func:go,args:[no],thisArg:a}),new $a(e,this.__chain__)}return this.thru(no)},Pa.prototype.toJSON=Pa.prototype.valueOf=Pa.prototype.value=function(){return vn(this.__wrapped__,this.__actions__)},Pa.prototype.first=Pa.prototype.head,se&&(Pa.prototype[se]=function(){return this}),Pa}();de?((de.exports=da)._=da,ue._=da):he._=da}).call(Br)})),Ls=kr((function(t,e){t.exports=function(){var t=navigator.userAgent,e=navigator.platform,a=/gecko\/\d/i.test(t),r=/MSIE \d/.test(t),n=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(t),i=/Edge\/(\d+)/.exec(t),o=r||n||i,l=o&&(r?document.documentMode||6:+(i||n)[1]),s=!i&&/WebKit\//.test(t),c=s&&/Qt\/\d+\.\d+/.test(t),h=!i&&/Chrome\//.test(t),u=/Opera\//.test(t),d=/Apple Computer/.test(navigator.vendor),p=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(t),m=/PhantomJS/.test(t),v=d&&(/Mobile\/\w+/.test(t)||navigator.maxTouchPoints>2),f=/Android/.test(t),y=v||f||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(t),g=v||/Mac/.test(e),b=/\bCrOS\b/.test(t),z=/win/i.test(e),x=u&&t.match(/Version\/(\d*\.\d*)/);x&&(x=Number(x[1])),x&&x>=15&&(u=!1,s=!0);var w=g&&(c||u&&(null==x||x<12.11)),M=a||o&&l>=9;function _(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}var A,H=function(t,e){var a=t.className,r=_(e).exec(a);if(r){var n=a.slice(r.index+r[0].length);t.className=a.slice(0,r.index)+(n?r[1]+n:"")}};function V(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function L(t,e){return V(t).appendChild(e)}function B(t,e,a,r){var n=document.createElement(t);if(a&&(n.className=a),r&&(n.style.cssText=r),"string"==typeof e)n.appendChild(document.createTextNode(e));else if(e)for(var i=0;i<e.length;++i)n.appendChild(e[i]);return n}function k(t,e,a,r){var n=B(t,e,a,r);return n.setAttribute("role","presentation"),n}function C(t,e){if(3==e.nodeType&&(e=e.parentNode),t.contains)return t.contains(e);do{if(11==e.nodeType&&(e=e.host),e==t)return!0}while(e=e.parentNode)}function S(){var t;try{t=document.activeElement}catch(Et){t=document.body||null}for(;t&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function E(t,e){var a=t.className;_(e).test(a)||(t.className+=(a?" ":"")+e)}function O(t,e){for(var a=t.split(" "),r=0;r<a.length;r++)a[r]&&!_(a[r]).test(e)&&(e+=" "+a[r]);return e}A=document.createRange?function(t,e,a,r){var n=document.createRange();return n.setEnd(r||t,a),n.setStart(t,e),n}:function(t,e,a){var r=document.body.createTextRange();try{r.moveToElementText(t.parentNode)}catch(Et){return r}return r.collapse(!0),r.moveEnd("character",a),r.moveStart("character",e),r};var T=function(t){t.select()};function D(t){var e=Array.prototype.slice.call(arguments,1);return function(){return t.apply(null,e)}}function j(t,e,a){for(var r in e||(e={}),t)!t.hasOwnProperty(r)||!1===a&&e.hasOwnProperty(r)||(e[r]=t[r]);return e}function F(t,e,a,r,n){null==e&&-1==(e=t.search(/[^\s\u00a0]/))&&(e=t.length);for(var i=r||0,o=n||0;;){var l=t.indexOf("\t",i);if(l<0||l>=e)return o+(e-i);o+=l-i,o+=a-o%a,i=l+1}}v?T=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:o&&(T=function(t){try{t.select()}catch(e){}});var I=function(){this.id=null,this.f=null,this.time=0,this.handler=D(this.onTimeout,this)};function P(t,e){for(var a=0;a<t.length;++a)if(t[a]==e)return a;return-1}I.prototype.onTimeout=function(t){t.id=0,t.time<=+new Date?t.f():setTimeout(t.handler,t.time-+new Date)},I.prototype.set=function(t,e){this.f=e;var a=+new Date+t;(!this.id||a<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,t),this.time=a)};var R=50,N={toString:function(){return"CodeMirror.Pass"}},$={scroll:!1},U={origin:"*mouse"},W={origin:"+move"};function q(t,e,a){for(var r=0,n=0;;){var i=t.indexOf("\t",r);-1==i&&(i=t.length);var o=i-r;if(i==t.length||n+o>=e)return r+Math.min(o,e-n);if(n+=i-r,r=i+1,(n+=a-n%a)>=e)return r}}var G=[""];function Y(t){for(;G.length<=t;)G.push(K(G)+" ");return G[t]}function K(t){return t[t.length-1]}function J(t,e){for(var a=[],r=0;r<t.length;r++)a[r]=e(t[r],r);return a}function Z(t,e,a){for(var r=0,n=a(e);r<t.length&&a(t[r])<=n;)r++;t.splice(r,0,e)}function X(){}function Q(t,e){var a;return Object.create?a=Object.create(t):(X.prototype=t,a=new X),e&&j(e,a),a}var tt=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function et(t){return/\w/.test(t)||t>"€"&&(t.toUpperCase()!=t.toLowerCase()||tt.test(t))}function at(t,e){return e?!!(e.source.indexOf("\\w")>-1&&et(t))||e.test(t):et(t)}function rt(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}var nt=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function it(t){return t.charCodeAt(0)>=768&&nt.test(t)}function ot(t,e,a){for(;(a<0?e>0:e<t.length)&&it(t.charAt(e));)e+=a;return e}function lt(t,e,a){for(var r=e>a?-1:1;;){if(e==a)return e;var n=(e+a)/2,i=r<0?Math.ceil(n):Math.floor(n);if(i==e)return t(i)?e:a;t(i)?a=i:e=i+r}}function st(t,e,a,r){if(!t)return r(e,a,"ltr",0);for(var n=!1,i=0;i<t.length;++i){var o=t[i];(o.from<a&&o.to>e||e==a&&o.to==e)&&(r(Math.max(o.from,e),Math.min(o.to,a),1==o.level?"rtl":"ltr",i),n=!0)}n||r(e,a,"ltr")}var ct=null;function ht(t,e,a){var r;ct=null;for(var n=0;n<t.length;++n){var i=t[n];if(i.from<e&&i.to>e)return n;i.to==e&&(i.from!=i.to&&"before"==a?r=n:ct=n),i.from==e&&(i.from!=i.to&&"before"!=a?r=n:ct=n)}return null!=r?r:ct}var ut=function(){var t="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",e="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function a(a){return a<=247?t.charAt(a):1424<=a&&a<=1524?"R":1536<=a&&a<=1785?e.charAt(a-1536):1774<=a&&a<=2220?"r":8192<=a&&a<=8203?"w":8204==a?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,n=/[stwN]/,i=/[LRr]/,o=/[Lb1n]/,l=/[1n]/;function s(t,e,a){this.level=t,this.from=e,this.to=a}return function(t,e){var c="ltr"==e?"L":"R";if(0==t.length||"ltr"==e&&!r.test(t))return!1;for(var h=t.length,u=[],d=0;d<h;++d)u.push(a(t.charCodeAt(d)));for(var p=0,m=c;p<h;++p){var v=u[p];"m"==v?u[p]=m:m=v}for(var f=0,y=c;f<h;++f){var g=u[f];"1"==g&&"r"==y?u[f]="n":i.test(g)&&(y=g,"r"==g&&(u[f]="R"))}for(var b=1,z=u[0];b<h-1;++b){var x=u[b];"+"==x&&"1"==z&&"1"==u[b+1]?u[b]="1":","!=x||z!=u[b+1]||"1"!=z&&"n"!=z||(u[b]=z),z=x}for(var w=0;w<h;++w){var M=u[w];if(","==M)u[w]="N";else if("%"==M){var _=void 0;for(_=w+1;_<h&&"%"==u[_];++_);for(var A=w&&"!"==u[w-1]||_<h&&"1"==u[_]?"1":"N",H=w;H<_;++H)u[H]=A;w=_-1}}for(var V=0,L=c;V<h;++V){var B=u[V];"L"==L&&"1"==B?u[V]="L":i.test(B)&&(L=B)}for(var k=0;k<h;++k)if(n.test(u[k])){var C=void 0;for(C=k+1;C<h&&n.test(u[C]);++C);for(var S="L"==(k?u[k-1]:c),E=S==("L"==(C<h?u[C]:c))?S?"L":"R":c,O=k;O<C;++O)u[O]=E;k=C-1}for(var T,D=[],j=0;j<h;)if(o.test(u[j])){var F=j;for(++j;j<h&&o.test(u[j]);++j);D.push(new s(0,F,j))}else{var I=j,P=D.length,R="rtl"==e?1:0;for(++j;j<h&&"L"!=u[j];++j);for(var N=I;N<j;)if(l.test(u[N])){I<N&&(D.splice(P,0,new s(1,I,N)),P+=R);var $=N;for(++N;N<j&&l.test(u[N]);++N);D.splice(P,0,new s(2,$,N)),P+=R,I=N}else++N;I<j&&D.splice(P,0,new s(1,I,j))}return"ltr"==e&&(1==D[0].level&&(T=t.match(/^\s+/))&&(D[0].from=T[0].length,D.unshift(new s(0,0,T[0].length))),1==K(D).level&&(T=t.match(/\s+$/))&&(K(D).to-=T[0].length,D.push(new s(0,h-T[0].length,h)))),"rtl"==e?D.reverse():D}}();function dt(t,e){var a=t.order;return null==a&&(a=t.order=ut(t.text,e)),a}var pt=[],mt=function(t,e,a){if(t.addEventListener)t.addEventListener(e,a,!1);else if(t.attachEvent)t.attachEvent("on"+e,a);else{var r=t._handlers||(t._handlers={});r[e]=(r[e]||pt).concat(a)}};function vt(t,e){return t._handlers&&t._handlers[e]||pt}function ft(t,e,a){if(t.removeEventListener)t.removeEventListener(e,a,!1);else if(t.detachEvent)t.detachEvent("on"+e,a);else{var r=t._handlers,n=r&&r[e];if(n){var i=P(n,a);i>-1&&(r[e]=n.slice(0,i).concat(n.slice(i+1)))}}}function yt(t,e){var a=vt(t,e);if(a.length)for(var r=Array.prototype.slice.call(arguments,2),n=0;n<a.length;++n)a[n].apply(null,r)}function gt(t,e,a){return"string"==typeof e&&(e={type:e,preventDefault:function(){this.defaultPrevented=!0}}),yt(t,a||e.type,t,e),_t(e)||e.codemirrorIgnore}function bt(t){var e=t._handlers&&t._handlers.cursorActivity;if(e)for(var a=t.curOp.cursorActivityHandlers||(t.curOp.cursorActivityHandlers=[]),r=0;r<e.length;++r)-1==P(a,e[r])&&a.push(e[r])}function zt(t,e){return vt(t,e).length>0}function xt(t){t.prototype.on=function(t,e){mt(this,t,e)},t.prototype.off=function(t,e){ft(this,t,e)}}function wt(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function Mt(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function _t(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function At(t){wt(t),Mt(t)}function Ht(t){return t.target||t.srcElement}function Vt(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),g&&t.ctrlKey&&1==e&&(e=3),e}var Lt,Bt,kt=function(){if(o&&l<9)return!1;var t=B("div");return"draggable"in t||"dragDrop"in t}();function Ct(t){if(null==Lt){var e=B("span","​");L(t,B("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(Lt=e.offsetWidth<=1&&e.offsetHeight>2&&!(o&&l<8))}var a=Lt?B("span","​"):B("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return a.setAttribute("cm-text",""),a}function St(t){if(null!=Bt)return Bt;var e=L(t,document.createTextNode("AخA")),a=A(e,0,1).getBoundingClientRect(),r=A(e,1,2).getBoundingClientRect();return V(t),!(!a||a.left==a.right)&&(Bt=r.right-a.right<3)}var Et,Ot=3!="\n\nb".split(/\n/).length?function(t){for(var e=0,a=[],r=t.length;e<=r;){var n=t.indexOf("\n",e);-1==n&&(n=t.length);var i=t.slice(e,"\r"==t.charAt(n-1)?n-1:n),o=i.indexOf("\r");-1!=o?(a.push(i.slice(0,o)),e+=o+1):(a.push(i),e=n+1)}return a}:function(t){return t.split(/\r\n?|\n/)},Tt=window.getSelection?function(t){try{return t.selectionStart!=t.selectionEnd}catch(Et){return!1}}:function(t){var e;try{e=t.ownerDocument.selection.createRange()}catch(Et){}return!(!e||e.parentElement()!=t)&&0!=e.compareEndPoints("StartToEnd",e)},Dt="oncopy"in(Et=B("div"))||(Et.setAttribute("oncopy","return;"),"function"==typeof Et.oncopy),jt=null;function Ft(t){if(null!=jt)return jt;var e=L(t,B("span","x")),a=e.getBoundingClientRect(),r=A(e,0,1).getBoundingClientRect();return jt=Math.abs(a.left-r.left)>1}var It={},Pt={};function Rt(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),It[t]=e}function Nt(t,e){Pt[t]=e}function $t(t){if("string"==typeof t&&Pt.hasOwnProperty(t))t=Pt[t];else if(t&&"string"==typeof t.name&&Pt.hasOwnProperty(t.name)){var e=Pt[t.name];"string"==typeof e&&(e={name:e}),(t=Q(e,t)).name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return $t("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return $t("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function Ut(t,e){e=$t(e);var a=It[e.name];if(!a)return Ut(t,"text/plain");var r=a(t,e);if(Wt.hasOwnProperty(e.name)){var n=Wt[e.name];for(var i in n)n.hasOwnProperty(i)&&(r.hasOwnProperty(i)&&(r["_"+i]=r[i]),r[i]=n[i])}if(r.name=e.name,e.helperType&&(r.helperType=e.helperType),e.modeProps)for(var o in e.modeProps)r[o]=e.modeProps[o];return r}var Wt={};function qt(t,e){j(e,Wt.hasOwnProperty(t)?Wt[t]:Wt[t]={})}function Gt(t,e){if(!0===e)return e;if(t.copyState)return t.copyState(e);var a={};for(var r in e){var n=e[r];n instanceof Array&&(n=n.concat([])),a[r]=n}return a}function Yt(t,e){for(var a;t.innerMode&&(a=t.innerMode(e))&&a.mode!=t;)e=a.state,t=a.mode;return a||{mode:t,state:e}}function Kt(t,e,a){return!t.startState||t.startState(e,a)}var Jt=function(t,e,a){this.pos=this.start=0,this.string=t,this.tabSize=e||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=a};function Zt(t,e){if((e-=t.first)<0||e>=t.size)throw new Error("There is no line "+(e+t.first)+" in the document.");for(var a=t;!a.lines;)for(var r=0;;++r){var n=a.children[r],i=n.chunkSize();if(e<i){a=n;break}e-=i}return a.lines[e]}function Xt(t,e,a){var r=[],n=e.line;return t.iter(e.line,a.line+1,(function(t){var i=t.text;n==a.line&&(i=i.slice(0,a.ch)),n==e.line&&(i=i.slice(e.ch)),r.push(i),++n})),r}function Qt(t,e,a){var r=[];return t.iter(e,a,(function(t){r.push(t.text)})),r}function te(t,e){var a=e-t.height;if(a)for(var r=t;r;r=r.parent)r.height+=a}function ee(t){if(null==t.parent)return null;for(var e=t.parent,a=P(e.lines,t),r=e.parent;r;e=r,r=r.parent)for(var n=0;r.children[n]!=e;++n)a+=r.children[n].chunkSize();return a+e.first}function ae(t,e){var a=t.first;t:do{for(var r=0;r<t.children.length;++r){var n=t.children[r],i=n.height;if(e<i){t=n;continue t}e-=i,a+=n.chunkSize()}return a}while(!t.lines);for(var o=0;o<t.lines.length;++o){var l=t.lines[o].height;if(e<l)break;e-=l}return a+o}function re(t,e){return e>=t.first&&e<t.first+t.size}function ne(t,e){return String(t.lineNumberFormatter(e+t.firstLineNumber))}function ie(t,e,a){if(void 0===a&&(a=null),!(this instanceof ie))return new ie(t,e,a);this.line=t,this.ch=e,this.sticky=a}function oe(t,e){return t.line-e.line||t.ch-e.ch}function le(t,e){return t.sticky==e.sticky&&0==oe(t,e)}function se(t){return ie(t.line,t.ch)}function ce(t,e){return oe(t,e)<0?e:t}function he(t,e){return oe(t,e)<0?t:e}function ue(t,e){return Math.max(t.first,Math.min(e,t.first+t.size-1))}function de(t,e){if(e.line<t.first)return ie(t.first,0);var a=t.first+t.size-1;return e.line>a?ie(a,Zt(t,a).text.length):pe(e,Zt(t,e.line).text.length)}function pe(t,e){var a=t.ch;return null==a||a>e?ie(t.line,e):a<0?ie(t.line,0):t}function me(t,e){for(var a=[],r=0;r<e.length;r++)a[r]=de(t,e[r]);return a}Jt.prototype.eol=function(){return this.pos>=this.string.length},Jt.prototype.sol=function(){return this.pos==this.lineStart},Jt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Jt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Jt.prototype.eat=function(t){var e=this.string.charAt(this.pos);if("string"==typeof t?e==t:e&&(t.test?t.test(e):t(e)))return++this.pos,e},Jt.prototype.eatWhile=function(t){for(var e=this.pos;this.eat(t););return this.pos>e},Jt.prototype.eatSpace=function(){for(var t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t},Jt.prototype.skipToEnd=function(){this.pos=this.string.length},Jt.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},Jt.prototype.backUp=function(t){this.pos-=t},Jt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=F(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?F(this.string,this.lineStart,this.tabSize):0)},Jt.prototype.indentation=function(){return F(this.string,null,this.tabSize)-(this.lineStart?F(this.string,this.lineStart,this.tabSize):0)},Jt.prototype.match=function(t,e,a){if("string"!=typeof t){var r=this.string.slice(this.pos).match(t);return r&&r.index>0?null:(r&&!1!==e&&(this.pos+=r[0].length),r)}var n=function(t){return a?t.toLowerCase():t};if(n(this.string.substr(this.pos,t.length))==n(t))return!1!==e&&(this.pos+=t.length),!0},Jt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Jt.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},Jt.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)},Jt.prototype.baseToken=function(){var t=this.lineOracle;return t&&t.baseToken(this.pos)};var ve=function(t,e){this.state=t,this.lookAhead=e},fe=function(t,e,a,r){this.state=e,this.doc=t,this.line=a,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function ye(t,e,a,r){var n=[t.state.modeGen],i={};He(t,e.text,t.doc.mode,a,(function(t,e){return n.push(t,e)}),i,r);for(var o=a.state,l=function(r){a.baseTokens=n;var l=t.state.overlays[r],s=1,c=0;a.state=!0,He(t,e.text,l.mode,a,(function(t,e){for(var a=s;c<t;){var r=n[s];r>t&&n.splice(s,1,t,n[s+1],r),s+=2,c=Math.min(t,r)}if(e)if(l.opaque)n.splice(a,s-a,t,"overlay "+e),s=a+2;else for(;a<s;a+=2){var i=n[a+1];n[a+1]=(i?i+" ":"")+"overlay "+e}}),i),a.state=o,a.baseTokens=null,a.baseTokenPos=1},s=0;s<t.state.overlays.length;++s)l(s);return{styles:n,classes:i.bgClass||i.textClass?i:null}}function ge(t,e,a){if(!e.styles||e.styles[0]!=t.state.modeGen){var r=be(t,ee(e)),n=e.text.length>t.options.maxHighlightLength&&Gt(t.doc.mode,r.state),i=ye(t,e,r);n&&(r.state=n),e.stateAfter=r.save(!n),e.styles=i.styles,i.classes?e.styleClasses=i.classes:e.styleClasses&&(e.styleClasses=null),a===t.doc.highlightFrontier&&(t.doc.modeFrontier=Math.max(t.doc.modeFrontier,++t.doc.highlightFrontier))}return e.styles}function be(t,e,a){var r=t.doc,n=t.display;if(!r.mode.startState)return new fe(r,!0,e);var i=Ve(t,e,a),o=i>r.first&&Zt(r,i-1).stateAfter,l=o?fe.fromSaved(r,o,i):new fe(r,Kt(r.mode),i);return r.iter(i,e,(function(a){ze(t,a.text,l);var r=l.line;a.stateAfter=r==e-1||r%5==0||r>=n.viewFrom&&r<n.viewTo?l.save():null,l.nextLine()})),a&&(r.modeFrontier=l.line),l}function ze(t,e,a,r){var n=t.doc.mode,i=new Jt(e,t.options.tabSize,a);for(i.start=i.pos=r||0,""==e&&xe(n,a.state);!i.eol();)we(n,i,a.state),i.start=i.pos}function xe(t,e){if(t.blankLine)return t.blankLine(e);if(t.innerMode){var a=Yt(t,e);return a.mode.blankLine?a.mode.blankLine(a.state):void 0}}function we(t,e,a,r){for(var n=0;n<10;n++){r&&(r[0]=Yt(t,a).mode);var i=t.token(e,a);if(e.pos>e.start)return i}throw new Error("Mode "+t.name+" failed to advance stream.")}fe.prototype.lookAhead=function(t){var e=this.doc.getLine(this.line+t);return null!=e&&t>this.maxLookAhead&&(this.maxLookAhead=t),e},fe.prototype.baseToken=function(t){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=t;)this.baseTokenPos+=2;var e=this.baseTokens[this.baseTokenPos+1];return{type:e&&e.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-t}},fe.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},fe.fromSaved=function(t,e,a){return e instanceof ve?new fe(t,Gt(t.mode,e.state),a,e.lookAhead):new fe(t,Gt(t.mode,e),a)},fe.prototype.save=function(t){var e=!1!==t?Gt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ve(e,this.maxLookAhead):e};var Me=function(t,e,a){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=e||null,this.state=a};function _e(t,e,a,r){var n,i,o=t.doc,l=o.mode,s=Zt(o,(e=de(o,e)).line),c=be(t,e.line,a),h=new Jt(s.text,t.options.tabSize,c);for(r&&(i=[]);(r||h.pos<e.ch)&&!h.eol();)h.start=h.pos,n=we(l,h,c.state),r&&i.push(new Me(h,n,Gt(o.mode,c.state)));return r?i:new Me(h,n,c.state)}function Ae(t,e){if(t)for(;;){var a=t.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!a)break;t=t.slice(0,a.index)+t.slice(a.index+a[0].length);var r=a[1]?"bgClass":"textClass";null==e[r]?e[r]=a[2]:new RegExp("(?:^|\\s)"+a[2]+"(?:$|\\s)").test(e[r])||(e[r]+=" "+a[2])}return t}function He(t,e,a,r,n,i,o){var l=a.flattenSpans;null==l&&(l=t.options.flattenSpans);var s,c=0,h=null,u=new Jt(e,t.options.tabSize,r),d=t.options.addModeClass&&[null];for(""==e&&Ae(xe(a,r.state),i);!u.eol();){if(u.pos>t.options.maxHighlightLength?(l=!1,o&&ze(t,e,r,u.pos),u.pos=e.length,s=null):s=Ae(we(a,u,r.state,d),i),d){var p=d[0].name;p&&(s="m-"+(s?p+" "+s:p))}if(!l||h!=s){for(;c<u.start;)n(c=Math.min(u.start,c+5e3),h);h=s}u.start=u.pos}for(;c<u.pos;){var m=Math.min(u.pos,c+5e3);n(m,h),c=m}}function Ve(t,e,a){for(var r,n,i=t.doc,o=a?-1:e-(t.doc.mode.innerMode?1e3:100),l=e;l>o;--l){if(l<=i.first)return i.first;var s=Zt(i,l-1),c=s.stateAfter;if(c&&(!a||l+(c instanceof ve?c.lookAhead:0)<=i.modeFrontier))return l;var h=F(s.text,null,t.options.tabSize);(null==n||r>h)&&(n=l-1,r=h)}return n}function Le(t,e){if(t.modeFrontier=Math.min(t.modeFrontier,e),!(t.highlightFrontier<e-10)){for(var a=t.first,r=e-1;r>a;r--){var n=Zt(t,r).stateAfter;if(n&&(!(n instanceof ve)||r+n.lookAhead<e)){a=r+1;break}}t.highlightFrontier=Math.min(t.highlightFrontier,a)}}var Be=!1,ke=!1;function Ce(){Be=!0}function Se(){ke=!0}function Ee(t,e,a){this.marker=t,this.from=e,this.to=a}function Oe(t,e){if(t)for(var a=0;a<t.length;++a){var r=t[a];if(r.marker==e)return r}}function Te(t,e){for(var a,r=0;r<t.length;++r)t[r]!=e&&(a||(a=[])).push(t[r]);return a}function De(t,e){t.markedSpans=t.markedSpans?t.markedSpans.concat([e]):[e],e.marker.attachLine(t)}function je(t,e,a){var r;if(t)for(var n=0;n<t.length;++n){var i=t[n],o=i.marker;if(null==i.from||(o.inclusiveLeft?i.from<=e:i.from<e)||i.from==e&&"bookmark"==o.type&&(!a||!i.marker.insertLeft)){var l=null==i.to||(o.inclusiveRight?i.to>=e:i.to>e);(r||(r=[])).push(new Ee(o,i.from,l?null:i.to))}}return r}function Fe(t,e,a){var r;if(t)for(var n=0;n<t.length;++n){var i=t[n],o=i.marker;if(null==i.to||(o.inclusiveRight?i.to>=e:i.to>e)||i.from==e&&"bookmark"==o.type&&(!a||i.marker.insertLeft)){var l=null==i.from||(o.inclusiveLeft?i.from<=e:i.from<e);(r||(r=[])).push(new Ee(o,l?null:i.from-e,null==i.to?null:i.to-e))}}return r}function Ie(t,e){if(e.full)return null;var a=re(t,e.from.line)&&Zt(t,e.from.line).markedSpans,r=re(t,e.to.line)&&Zt(t,e.to.line).markedSpans;if(!a&&!r)return null;var n=e.from.ch,i=e.to.ch,o=0==oe(e.from,e.to),l=je(a,n,o),s=Fe(r,i,o),c=1==e.text.length,h=K(e.text).length+(c?n:0);if(l)for(var u=0;u<l.length;++u){var d=l[u];if(null==d.to){var p=Oe(s,d.marker);p?c&&(d.to=null==p.to?null:p.to+h):d.to=n}}if(s)for(var m=0;m<s.length;++m){var v=s[m];null!=v.to&&(v.to+=h),null==v.from?Oe(l,v.marker)||(v.from=h,c&&(l||(l=[])).push(v)):(v.from+=h,c&&(l||(l=[])).push(v))}l&&(l=Pe(l)),s&&s!=l&&(s=Pe(s));var f=[l];if(!c){var y,g=e.text.length-2;if(g>0&&l)for(var b=0;b<l.length;++b)null==l[b].to&&(y||(y=[])).push(new Ee(l[b].marker,null,null));for(var z=0;z<g;++z)f.push(y);f.push(s)}return f}function Pe(t){for(var e=0;e<t.length;++e){var a=t[e];null!=a.from&&a.from==a.to&&!1!==a.marker.clearWhenEmpty&&t.splice(e--,1)}return t.length?t:null}function Re(t,e,a){var r=null;if(t.iter(e.line,a.line+1,(function(t){if(t.markedSpans)for(var e=0;e<t.markedSpans.length;++e){var a=t.markedSpans[e].marker;!a.readOnly||r&&-1!=P(r,a)||(r||(r=[])).push(a)}})),!r)return null;for(var n=[{from:e,to:a}],i=0;i<r.length;++i)for(var o=r[i],l=o.find(0),s=0;s<n.length;++s){var c=n[s];if(!(oe(c.to,l.from)<0||oe(c.from,l.to)>0)){var h=[s,1],u=oe(c.from,l.from),d=oe(c.to,l.to);(u<0||!o.inclusiveLeft&&!u)&&h.push({from:c.from,to:l.from}),(d>0||!o.inclusiveRight&&!d)&&h.push({from:l.to,to:c.to}),n.splice.apply(n,h),s+=h.length-3}}return n}function Ne(t){var e=t.markedSpans;if(e){for(var a=0;a<e.length;++a)e[a].marker.detachLine(t);t.markedSpans=null}}function $e(t,e){if(e){for(var a=0;a<e.length;++a)e[a].marker.attachLine(t);t.markedSpans=e}}function Ue(t){return t.inclusiveLeft?-1:0}function We(t){return t.inclusiveRight?1:0}function qe(t,e){var a=t.lines.length-e.lines.length;if(0!=a)return a;var r=t.find(),n=e.find(),i=oe(r.from,n.from)||Ue(t)-Ue(e);if(i)return-i;var o=oe(r.to,n.to)||We(t)-We(e);return o||e.id-t.id}function Ge(t,e){var a,r=ke&&t.markedSpans;if(r)for(var n=void 0,i=0;i<r.length;++i)(n=r[i]).marker.collapsed&&null==(e?n.from:n.to)&&(!a||qe(a,n.marker)<0)&&(a=n.marker);return a}function Ye(t){return Ge(t,!0)}function Ke(t){return Ge(t,!1)}function Je(t,e){var a,r=ke&&t.markedSpans;if(r)for(var n=0;n<r.length;++n){var i=r[n];i.marker.collapsed&&(null==i.from||i.from<e)&&(null==i.to||i.to>e)&&(!a||qe(a,i.marker)<0)&&(a=i.marker)}return a}function Ze(t,e,a,r,n){var i=Zt(t,e),o=ke&&i.markedSpans;if(o)for(var l=0;l<o.length;++l){var s=o[l];if(s.marker.collapsed){var c=s.marker.find(0),h=oe(c.from,a)||Ue(s.marker)-Ue(n),u=oe(c.to,r)||We(s.marker)-We(n);if(!(h>=0&&u<=0||h<=0&&u>=0)&&(h<=0&&(s.marker.inclusiveRight&&n.inclusiveLeft?oe(c.to,a)>=0:oe(c.to,a)>0)||h>=0&&(s.marker.inclusiveRight&&n.inclusiveLeft?oe(c.from,r)<=0:oe(c.from,r)<0)))return!0}}}function Xe(t){for(var e;e=Ye(t);)t=e.find(-1,!0).line;return t}function Qe(t){for(var e;e=Ke(t);)t=e.find(1,!0).line;return t}function ta(t){for(var e,a;e=Ke(t);)t=e.find(1,!0).line,(a||(a=[])).push(t);return a}function ea(t,e){var a=Zt(t,e),r=Xe(a);return a==r?e:ee(r)}function aa(t,e){if(e>t.lastLine())return e;var a,r=Zt(t,e);if(!ra(t,r))return e;for(;a=Ke(r);)r=a.find(1,!0).line;return ee(r)+1}function ra(t,e){var a=ke&&e.markedSpans;if(a)for(var r=void 0,n=0;n<a.length;++n)if((r=a[n]).marker.collapsed){if(null==r.from)return!0;if(!r.marker.widgetNode&&0==r.from&&r.marker.inclusiveLeft&&na(t,e,r))return!0}}function na(t,e,a){if(null==a.to){var r=a.marker.find(1,!0);return na(t,r.line,Oe(r.line.markedSpans,a.marker))}if(a.marker.inclusiveRight&&a.to==e.text.length)return!0;for(var n=void 0,i=0;i<e.markedSpans.length;++i)if((n=e.markedSpans[i]).marker.collapsed&&!n.marker.widgetNode&&n.from==a.to&&(null==n.to||n.to!=a.from)&&(n.marker.inclusiveLeft||a.marker.inclusiveRight)&&na(t,e,n))return!0}function ia(t){for(var e=0,a=(t=Xe(t)).parent,r=0;r<a.lines.length;++r){var n=a.lines[r];if(n==t)break;e+=n.height}for(var i=a.parent;i;i=(a=i).parent)for(var o=0;o<i.children.length;++o){var l=i.children[o];if(l==a)break;e+=l.height}return e}function oa(t){if(0==t.height)return 0;for(var e,a=t.text.length,r=t;e=Ye(r);){var n=e.find(0,!0);r=n.from.line,a+=n.from.ch-n.to.ch}for(r=t;e=Ke(r);){var i=e.find(0,!0);a-=r.text.length-i.from.ch,a+=(r=i.to.line).text.length-i.to.ch}return a}function la(t){var e=t.display,a=t.doc;e.maxLine=Zt(a,a.first),e.maxLineLength=oa(e.maxLine),e.maxLineChanged=!0,a.iter((function(t){var a=oa(t);a>e.maxLineLength&&(e.maxLineLength=a,e.maxLine=t)}))}var sa=function(t,e,a){this.text=t,$e(this,e),this.height=a?a(this):1};function ca(t,e,a,r){t.text=e,t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null),null!=t.order&&(t.order=null),Ne(t),$e(t,a);var n=r?r(t):1;n!=t.height&&te(t,n)}function ha(t){t.parent=null,Ne(t)}sa.prototype.lineNo=function(){return ee(this)},xt(sa);var ua={},da={};function pa(t,e){if(!t||/^\s*$/.test(t))return null;var a=e.addModeClass?da:ua;return a[t]||(a[t]=t.replace(/\S+/g,"cm-$&"))}function ma(t,e){var a=k("span",null,null,s?"padding-right: .1px":null),r={pre:k("pre",[a],"CodeMirror-line"),content:a,col:0,pos:0,cm:t,trailingSpace:!1,splitSpaces:t.getOption("lineWrapping")};e.measure={};for(var n=0;n<=(e.rest?e.rest.length:0);n++){var i=n?e.rest[n-1]:e.line,o=void 0;r.pos=0,r.addToken=fa,St(t.display.measure)&&(o=dt(i,t.doc.direction))&&(r.addToken=ga(r.addToken,o)),r.map=[],za(i,r,ge(t,i,e!=t.display.externalMeasured&&ee(i))),i.styleClasses&&(i.styleClasses.bgClass&&(r.bgClass=O(i.styleClasses.bgClass,r.bgClass||"")),i.styleClasses.textClass&&(r.textClass=O(i.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Ct(t.display.measure))),0==n?(e.measure.map=r.map,e.measure.cache={}):((e.measure.maps||(e.measure.maps=[])).push(r.map),(e.measure.caches||(e.measure.caches=[])).push({}))}if(s){var l=r.content.lastChild;(/\bcm-tab\b/.test(l.className)||l.querySelector&&l.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return yt(t,"renderLine",t,e.line,r.pre),r.pre.className&&(r.textClass=O(r.pre.className,r.textClass||"")),r}function va(t){var e=B("span","•","cm-invalidchar");return e.title="\\u"+t.charCodeAt(0).toString(16),e.setAttribute("aria-label",e.title),e}function fa(t,e,a,r,n,i,s){if(e){var c,h=t.splitSpaces?ya(e,t.trailingSpace):e,u=t.cm.state.specialChars,d=!1;if(u.test(e)){c=document.createDocumentFragment();for(var p=0;;){u.lastIndex=p;var m=u.exec(e),v=m?m.index-p:e.length-p;if(v){var f=document.createTextNode(h.slice(p,p+v));o&&l<9?c.appendChild(B("span",[f])):c.appendChild(f),t.map.push(t.pos,t.pos+v,f),t.col+=v,t.pos+=v}if(!m)break;p+=v+1;var y=void 0;if("\t"==m[0]){var g=t.cm.options.tabSize,b=g-t.col%g;(y=c.appendChild(B("span",Y(b),"cm-tab"))).setAttribute("role","presentation"),y.setAttribute("cm-text","\t"),t.col+=b}else"\r"==m[0]||"\n"==m[0]?((y=c.appendChild(B("span","\r"==m[0]?"␍":"␤","cm-invalidchar"))).setAttribute("cm-text",m[0]),t.col+=1):((y=t.cm.options.specialCharPlaceholder(m[0])).setAttribute("cm-text",m[0]),o&&l<9?c.appendChild(B("span",[y])):c.appendChild(y),t.col+=1);t.map.push(t.pos,t.pos+1,y),t.pos++}}else t.col+=e.length,c=document.createTextNode(h),t.map.push(t.pos,t.pos+e.length,c),o&&l<9&&(d=!0),t.pos+=e.length;if(t.trailingSpace=32==h.charCodeAt(e.length-1),a||r||n||d||i||s){var z=a||"";r&&(z+=r),n&&(z+=n);var x=B("span",[c],z,i);if(s)for(var w in s)s.hasOwnProperty(w)&&"style"!=w&&"class"!=w&&x.setAttribute(w,s[w]);return t.content.appendChild(x)}t.content.appendChild(c)}}function ya(t,e){if(t.length>1&&!/ /.test(t))return t;for(var a=e,r="",n=0;n<t.length;n++){var i=t.charAt(n);" "!=i||!a||n!=t.length-1&&32!=t.charCodeAt(n+1)||(i=" "),r+=i,a=" "==i}return r}function ga(t,e){return function(a,r,n,i,o,l,s){n=n?n+" cm-force-border":"cm-force-border";for(var c=a.pos,h=c+r.length;;){for(var u=void 0,d=0;d<e.length&&!((u=e[d]).to>c&&u.from<=c);d++);if(u.to>=h)return t(a,r,n,i,o,l,s);t(a,r.slice(0,u.to-c),n,i,null,l,s),i=null,r=r.slice(u.to-c),c=u.to}}}function ba(t,e,a,r){var n=!r&&a.widgetNode;n&&t.map.push(t.pos,t.pos+e,n),!r&&t.cm.display.input.needsContentAttribute&&(n||(n=t.content.appendChild(document.createElement("span"))),n.setAttribute("cm-marker",a.id)),n&&(t.cm.display.input.setUneditable(n),t.content.appendChild(n)),t.pos+=e,t.trailingSpace=!1}function za(t,e,a){var r=t.markedSpans,n=t.text,i=0;if(r)for(var o,l,s,c,h,u,d,p=n.length,m=0,v=1,f="",y=0;;){if(y==m){s=c=h=l="",d=null,u=null,y=1/0;for(var g=[],b=void 0,z=0;z<r.length;++z){var x=r[z],w=x.marker;if("bookmark"==w.type&&x.from==m&&w.widgetNode)g.push(w);else if(x.from<=m&&(null==x.to||x.to>m||w.collapsed&&x.to==m&&x.from==m)){if(null!=x.to&&x.to!=m&&y>x.to&&(y=x.to,c=""),w.className&&(s+=" "+w.className),w.css&&(l=(l?l+";":"")+w.css),w.startStyle&&x.from==m&&(h+=" "+w.startStyle),w.endStyle&&x.to==y&&(b||(b=[])).push(w.endStyle,x.to),w.title&&((d||(d={})).title=w.title),w.attributes)for(var M in w.attributes)(d||(d={}))[M]=w.attributes[M];w.collapsed&&(!u||qe(u.marker,w)<0)&&(u=x)}else x.from>m&&y>x.from&&(y=x.from)}if(b)for(var _=0;_<b.length;_+=2)b[_+1]==y&&(c+=" "+b[_]);if(!u||u.from==m)for(var A=0;A<g.length;++A)ba(e,0,g[A]);if(u&&(u.from||0)==m){if(ba(e,(null==u.to?p+1:u.to)-m,u.marker,null==u.from),null==u.to)return;u.to==m&&(u=!1)}}if(m>=p)break;for(var H=Math.min(p,y);;){if(f){var V=m+f.length;if(!u){var L=V>H?f.slice(0,H-m):f;e.addToken(e,L,o?o+s:s,h,m+L.length==y?c:"",l,d)}if(V>=H){f=f.slice(H-m),m=H;break}m=V,h=""}f=n.slice(i,i=a[v++]),o=pa(a[v++],e.cm.options)}}else for(var B=1;B<a.length;B+=2)e.addToken(e,n.slice(i,i=a[B]),pa(a[B+1],e.cm.options))}function xa(t,e,a){this.line=e,this.rest=ta(e),this.size=this.rest?ee(K(this.rest))-a+1:1,this.node=this.text=null,this.hidden=ra(t,e)}function wa(t,e,a){for(var r,n=[],i=e;i<a;i=r){var o=new xa(t.doc,Zt(t.doc,i),i);r=i+o.size,n.push(o)}return n}var Ma=null;function _a(t){Ma?Ma.ops.push(t):t.ownsGroup=Ma={ops:[t],delayedCallbacks:[]}}function Aa(t){var e=t.delayedCallbacks,a=0;do{for(;a<e.length;a++)e[a].call(null);for(var r=0;r<t.ops.length;r++){var n=t.ops[r];if(n.cursorActivityHandlers)for(;n.cursorActivityCalled<n.cursorActivityHandlers.length;)n.cursorActivityHandlers[n.cursorActivityCalled++].call(null,n.cm)}}while(a<e.length)}function Ha(t,e){var a=t.ownsGroup;if(a)try{Aa(a)}finally{Ma=null,e(a)}}var Va=null;function La(t,e){var a=vt(t,e);if(a.length){var r,n=Array.prototype.slice.call(arguments,2);Ma?r=Ma.delayedCallbacks:Va?r=Va:(r=Va=[],setTimeout(Ba,0));for(var i=function(t){r.push((function(){return a[t].apply(null,n)}))},o=0;o<a.length;++o)i(o)}}function Ba(){var t=Va;Va=null;for(var e=0;e<t.length;++e)t[e]()}function ka(t,e,a,r){for(var n=0;n<e.changes.length;n++){var i=e.changes[n];"text"==i?Oa(t,e):"gutter"==i?Da(t,e,a,r):"class"==i?Ta(t,e):"widget"==i&&ja(t,e,r)}e.changes=null}function Ca(t){return t.node==t.text&&(t.node=B("div",null,null,"position: relative"),t.text.parentNode&&t.text.parentNode.replaceChild(t.node,t.text),t.node.appendChild(t.text),o&&l<8&&(t.node.style.zIndex=2)),t.node}function Sa(t,e){var a=e.bgClass?e.bgClass+" "+(e.line.bgClass||""):e.line.bgClass;if(a&&(a+=" CodeMirror-linebackground"),e.background)a?e.background.className=a:(e.background.parentNode.removeChild(e.background),e.background=null);else if(a){var r=Ca(e);e.background=r.insertBefore(B("div",null,a),r.firstChild),t.display.input.setUneditable(e.background)}}function Ea(t,e){var a=t.display.externalMeasured;return a&&a.line==e.line?(t.display.externalMeasured=null,e.measure=a.measure,a.built):ma(t,e)}function Oa(t,e){var a=e.text.className,r=Ea(t,e);e.text==e.node&&(e.node=r.pre),e.text.parentNode.replaceChild(r.pre,e.text),e.text=r.pre,r.bgClass!=e.bgClass||r.textClass!=e.textClass?(e.bgClass=r.bgClass,e.textClass=r.textClass,Ta(t,e)):a&&(e.text.className=a)}function Ta(t,e){Sa(t,e),e.line.wrapClass?Ca(e).className=e.line.wrapClass:e.node!=e.text&&(e.node.className="");var a=e.textClass?e.textClass+" "+(e.line.textClass||""):e.line.textClass;e.text.className=a||""}function Da(t,e,a,r){if(e.gutter&&(e.node.removeChild(e.gutter),e.gutter=null),e.gutterBackground&&(e.node.removeChild(e.gutterBackground),e.gutterBackground=null),e.line.gutterClass){var n=Ca(e);e.gutterBackground=B("div",null,"CodeMirror-gutter-background "+e.line.gutterClass,"left: "+(t.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),t.display.input.setUneditable(e.gutterBackground),n.insertBefore(e.gutterBackground,e.text)}var i=e.line.gutterMarkers;if(t.options.lineNumbers||i){var o=Ca(e),l=e.gutter=B("div",null,"CodeMirror-gutter-wrapper","left: "+(t.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(t.display.input.setUneditable(l),o.insertBefore(l,e.text),e.line.gutterClass&&(l.className+=" "+e.line.gutterClass),!t.options.lineNumbers||i&&i["CodeMirror-linenumbers"]||(e.lineNumber=l.appendChild(B("div",ne(t.options,a),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+t.display.lineNumInnerWidth+"px"))),i)for(var s=0;s<t.display.gutterSpecs.length;++s){var c=t.display.gutterSpecs[s].className,h=i.hasOwnProperty(c)&&i[c];h&&l.appendChild(B("div",[h],"CodeMirror-gutter-elt","left: "+r.gutterLeft[c]+"px; width: "+r.gutterWidth[c]+"px"))}}}function ja(t,e,a){e.alignable&&(e.alignable=null);for(var r=_("CodeMirror-linewidget"),n=e.node.firstChild,i=void 0;n;n=i)i=n.nextSibling,r.test(n.className)&&e.node.removeChild(n);Ia(t,e,a)}function Fa(t,e,a,r){var n=Ea(t,e);return e.text=e.node=n.pre,n.bgClass&&(e.bgClass=n.bgClass),n.textClass&&(e.textClass=n.textClass),Ta(t,e),Da(t,e,a,r),Ia(t,e,r),e.node}function Ia(t,e,a){if(Pa(t,e.line,e,a,!0),e.rest)for(var r=0;r<e.rest.length;r++)Pa(t,e.rest[r],e,a,!1)}function Pa(t,e,a,r,n){if(e.widgets)for(var i=Ca(a),o=0,l=e.widgets;o<l.length;++o){var s=l[o],c=B("div",[s.node],"CodeMirror-linewidget"+(s.className?" "+s.className:""));s.handleMouseEvents||c.setAttribute("cm-ignore-events","true"),Ra(s,c,a,r),t.display.input.setUneditable(c),n&&s.above?i.insertBefore(c,a.gutter||a.text):i.appendChild(c),La(s,"redraw")}}function Ra(t,e,a,r){if(t.noHScroll){(a.alignable||(a.alignable=[])).push(e);var n=r.wrapperWidth;e.style.left=r.fixedPos+"px",t.coverGutter||(n-=r.gutterTotalWidth,e.style.paddingLeft=r.gutterTotalWidth+"px"),e.style.width=n+"px"}t.coverGutter&&(e.style.zIndex=5,e.style.position="relative",t.noHScroll||(e.style.marginLeft=-r.gutterTotalWidth+"px"))}function Na(t){if(null!=t.height)return t.height;var e=t.doc.cm;if(!e)return 0;if(!C(document.body,t.node)){var a="position: relative;";t.coverGutter&&(a+="margin-left: -"+e.display.gutters.offsetWidth+"px;"),t.noHScroll&&(a+="width: "+e.display.wrapper.clientWidth+"px;"),L(e.display.measure,B("div",[t.node],null,a))}return t.height=t.node.parentNode.offsetHeight}function $a(t,e){for(var a=Ht(e);a!=t.wrapper;a=a.parentNode)if(!a||1==a.nodeType&&"true"==a.getAttribute("cm-ignore-events")||a.parentNode==t.sizer&&a!=t.mover)return!0}function Ua(t){return t.lineSpace.offsetTop}function Wa(t){return t.mover.offsetHeight-t.lineSpace.offsetHeight}function qa(t){if(t.cachedPaddingH)return t.cachedPaddingH;var e=L(t.measure,B("pre","x","CodeMirror-line-like")),a=window.getComputedStyle?window.getComputedStyle(e):e.currentStyle,r={left:parseInt(a.paddingLeft),right:parseInt(a.paddingRight)};return isNaN(r.left)||isNaN(r.right)||(t.cachedPaddingH=r),r}function Ga(t){return R-t.display.nativeBarWidth}function Ya(t){return t.display.scroller.clientWidth-Ga(t)-t.display.barWidth}function Ka(t){return t.display.scroller.clientHeight-Ga(t)-t.display.barHeight}function Ja(t,e,a){var r=t.options.lineWrapping,n=r&&Ya(t);if(!e.measure.heights||r&&e.measure.width!=n){var i=e.measure.heights=[];if(r){e.measure.width=n;for(var o=e.text.firstChild.getClientRects(),l=0;l<o.length-1;l++){var s=o[l],c=o[l+1];Math.abs(s.bottom-c.bottom)>2&&i.push((s.bottom+c.top)/2-a.top)}}i.push(a.bottom-a.top)}}function Za(t,e,a){if(t.line==e)return{map:t.measure.map,cache:t.measure.cache};for(var r=0;r<t.rest.length;r++)if(t.rest[r]==e)return{map:t.measure.maps[r],cache:t.measure.caches[r]};for(var n=0;n<t.rest.length;n++)if(ee(t.rest[n])>a)return{map:t.measure.maps[n],cache:t.measure.caches[n],before:!0}}function Xa(t,e){var a=ee(e=Xe(e)),r=t.display.externalMeasured=new xa(t.doc,e,a);r.lineN=a;var n=r.built=ma(t,r);return r.text=n.pre,L(t.display.lineMeasure,n.pre),r}function Qa(t,e,a,r){return ar(t,er(t,e),a,r)}function tr(t,e){if(e>=t.display.viewFrom&&e<t.display.viewTo)return t.display.view[Tr(t,e)];var a=t.display.externalMeasured;return a&&e>=a.lineN&&e<a.lineN+a.size?a:void 0}function er(t,e){var a=ee(e),r=tr(t,a);r&&!r.text?r=null:r&&r.changes&&(ka(t,r,a,kr(t)),t.curOp.forceUpdate=!0),r||(r=Xa(t,e));var n=Za(r,e,a);return{line:e,view:r,rect:null,map:n.map,cache:n.cache,before:n.before,hasHeights:!1}}function ar(t,e,a,r,n){e.before&&(a=-1);var i,o=a+(r||"");return e.cache.hasOwnProperty(o)?i=e.cache[o]:(e.rect||(e.rect=e.view.text.getBoundingClientRect()),e.hasHeights||(Ja(t,e.view,e.rect),e.hasHeights=!0),(i=lr(t,e,a,r)).bogus||(e.cache[o]=i)),{left:i.left,right:i.right,top:n?i.rtop:i.top,bottom:n?i.rbottom:i.bottom}}var rr,nr={left:0,right:0,top:0,bottom:0};function ir(t,e,a){for(var r,n,i,o,l,s,c=0;c<t.length;c+=3)if(l=t[c],s=t[c+1],e<l?(n=0,i=1,o="left"):e<s?i=1+(n=e-l):(c==t.length-3||e==s&&t[c+3]>e)&&(n=(i=s-l)-1,e>=s&&(o="right")),null!=n){if(r=t[c+2],l==s&&a==(r.insertLeft?"left":"right")&&(o=a),"left"==a&&0==n)for(;c&&t[c-2]==t[c-3]&&t[c-1].insertLeft;)r=t[2+(c-=3)],o="left";if("right"==a&&n==s-l)for(;c<t.length-3&&t[c+3]==t[c+4]&&!t[c+5].insertLeft;)r=t[(c+=3)+2],o="right";break}return{node:r,start:n,end:i,collapse:o,coverStart:l,coverEnd:s}}function or(t,e){var a=nr;if("left"==e)for(var r=0;r<t.length&&(a=t[r]).left==a.right;r++);else for(var n=t.length-1;n>=0&&(a=t[n]).left==a.right;n--);return a}function lr(t,e,a,r){var n,i=ir(e.map,a,r),s=i.node,c=i.start,h=i.end,u=i.collapse;if(3==s.nodeType){for(var d=0;d<4;d++){for(;c&&it(e.line.text.charAt(i.coverStart+c));)--c;for(;i.coverStart+h<i.coverEnd&&it(e.line.text.charAt(i.coverStart+h));)++h;if((n=o&&l<9&&0==c&&h==i.coverEnd-i.coverStart?s.parentNode.getBoundingClientRect():or(A(s,c,h).getClientRects(),r)).left||n.right||0==c)break;h=c,c-=1,u="right"}o&&l<11&&(n=sr(t.display.measure,n))}else{var p;c>0&&(u=r="right"),n=t.options.lineWrapping&&(p=s.getClientRects()).length>1?p["right"==r?p.length-1:0]:s.getBoundingClientRect()}if(o&&l<9&&!c&&(!n||!n.left&&!n.right)){var m=s.parentNode.getClientRects()[0];n=m?{left:m.left,right:m.left+Br(t.display),top:m.top,bottom:m.bottom}:nr}for(var v=n.top-e.rect.top,f=n.bottom-e.rect.top,y=(v+f)/2,g=e.view.measure.heights,b=0;b<g.length-1&&!(y<g[b]);b++);var z=b?g[b-1]:0,x=g[b],w={left:("right"==u?n.right:n.left)-e.rect.left,right:("left"==u?n.left:n.right)-e.rect.left,top:z,bottom:x};return n.left||n.right||(w.bogus=!0),t.options.singleCursorHeightPerLine||(w.rtop=v,w.rbottom=f),w}function sr(t,e){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!Ft(t))return e;var a=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:e.left*a,right:e.right*a,top:e.top*r,bottom:e.bottom*r}}function cr(t){if(t.measure&&(t.measure.cache={},t.measure.heights=null,t.rest))for(var e=0;e<t.rest.length;e++)t.measure.caches[e]={}}function hr(t){t.display.externalMeasure=null,V(t.display.lineMeasure);for(var e=0;e<t.display.view.length;e++)cr(t.display.view[e])}function ur(t){hr(t),t.display.cachedCharWidth=t.display.cachedTextHeight=t.display.cachedPaddingH=null,t.options.lineWrapping||(t.display.maxLineChanged=!0),t.display.lineNumChars=null}function dr(){return h&&f?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function pr(){return h&&f?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function mr(t){var e=0;if(t.widgets)for(var a=0;a<t.widgets.length;++a)t.widgets[a].above&&(e+=Na(t.widgets[a]));return e}function vr(t,e,a,r,n){if(!n){var i=mr(e);a.top+=i,a.bottom+=i}if("line"==r)return a;r||(r="local");var o=ia(e);if("local"==r?o+=Ua(t.display):o-=t.display.viewOffset,"page"==r||"window"==r){var l=t.display.lineSpace.getBoundingClientRect();o+=l.top+("window"==r?0:pr());var s=l.left+("window"==r?0:dr());a.left+=s,a.right+=s}return a.top+=o,a.bottom+=o,a}function fr(t,e,a){if("div"==a)return e;var r=e.left,n=e.top;if("page"==a)r-=dr(),n-=pr();else if("local"==a||!a){var i=t.display.sizer.getBoundingClientRect();r+=i.left,n+=i.top}var o=t.display.lineSpace.getBoundingClientRect();return{left:r-o.left,top:n-o.top}}function yr(t,e,a,r,n){return r||(r=Zt(t.doc,e.line)),vr(t,r,Qa(t,r,e.ch,n),a)}function gr(t,e,a,r,n,i){function o(e,o){var l=ar(t,n,e,o?"right":"left",i);return o?l.left=l.right:l.right=l.left,vr(t,r,l,a)}r=r||Zt(t.doc,e.line),n||(n=er(t,r));var l=dt(r,t.doc.direction),s=e.ch,c=e.sticky;if(s>=r.text.length?(s=r.text.length,c="before"):s<=0&&(s=0,c="after"),!l)return o("before"==c?s-1:s,"before"==c);function h(t,e,a){return o(a?t-1:t,1==l[e].level!=a)}var u=ht(l,s,c),d=ct,p=h(s,u,"before"==c);return null!=d&&(p.other=h(s,d,"before"!=c)),p}function br(t,e){var a=0;e=de(t.doc,e),t.options.lineWrapping||(a=Br(t.display)*e.ch);var r=Zt(t.doc,e.line),n=ia(r)+Ua(t.display);return{left:a,right:a,top:n,bottom:n+r.height}}function zr(t,e,a,r,n){var i=ie(t,e,a);return i.xRel=n,r&&(i.outside=r),i}function xr(t,e,a){var r=t.doc;if((a+=t.display.viewOffset)<0)return zr(r.first,0,null,-1,-1);var n=ae(r,a),i=r.first+r.size-1;if(n>i)return zr(r.first+r.size-1,Zt(r,i).text.length,null,1,1);e<0&&(e=0);for(var o=Zt(r,n);;){var l=Ar(t,o,n,e,a),s=Je(o,l.ch+(l.xRel>0||l.outside>0?1:0));if(!s)return l;var c=s.find(1);if(c.line==n)return c;o=Zt(r,n=c.line)}}function wr(t,e,a,r){r-=mr(e);var n=e.text.length,i=lt((function(e){return ar(t,a,e-1).bottom<=r}),n,0);return{begin:i,end:n=lt((function(e){return ar(t,a,e).top>r}),i,n)}}function Mr(t,e,a,r){return a||(a=er(t,e)),wr(t,e,a,vr(t,e,ar(t,a,r),"line").top)}function _r(t,e,a,r){return!(t.bottom<=a)&&(t.top>a||(r?t.left:t.right)>e)}function Ar(t,e,a,r,n){n-=ia(e);var i=er(t,e),o=mr(e),l=0,s=e.text.length,c=!0,h=dt(e,t.doc.direction);if(h){var u=(t.options.lineWrapping?Vr:Hr)(t,e,a,i,h,r,n);l=(c=1!=u.level)?u.from:u.to-1,s=c?u.to:u.from-1}var d,p,m=null,v=null,f=lt((function(e){var a=ar(t,i,e);return a.top+=o,a.bottom+=o,!!_r(a,r,n,!1)&&(a.top<=n&&a.left<=r&&(m=e,v=a),!0)}),l,s),y=!1;if(v){var g=r-v.left<v.right-r,b=g==c;f=m+(b?0:1),p=b?"after":"before",d=g?v.left:v.right}else{c||f!=s&&f!=l||f++,p=0==f?"after":f==e.text.length?"before":ar(t,i,f-(c?1:0)).bottom+o<=n==c?"after":"before";var z=gr(t,ie(a,f,p),"line",e,i);d=z.left,y=n<z.top?-1:n>=z.bottom?1:0}return zr(a,f=ot(e.text,f,1),p,y,r-d)}function Hr(t,e,a,r,n,i,o){var l=lt((function(l){var s=n[l],c=1!=s.level;return _r(gr(t,ie(a,c?s.to:s.from,c?"before":"after"),"line",e,r),i,o,!0)}),0,n.length-1),s=n[l];if(l>0){var c=1!=s.level,h=gr(t,ie(a,c?s.from:s.to,c?"after":"before"),"line",e,r);_r(h,i,o,!0)&&h.top>o&&(s=n[l-1])}return s}function Vr(t,e,a,r,n,i,o){var l=wr(t,e,r,o),s=l.begin,c=l.end;/\s/.test(e.text.charAt(c-1))&&c--;for(var h=null,u=null,d=0;d<n.length;d++){var p=n[d];if(!(p.from>=c||p.to<=s)){var m=ar(t,r,1!=p.level?Math.min(c,p.to)-1:Math.max(s,p.from)).right,v=m<i?i-m+1e9:m-i;(!h||u>v)&&(h=p,u=v)}}return h||(h=n[n.length-1]),h.from<s&&(h={from:s,to:h.to,level:h.level}),h.to>c&&(h={from:h.from,to:c,level:h.level}),h}function Lr(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==rr){rr=B("pre",null,"CodeMirror-line-like");for(var e=0;e<49;++e)rr.appendChild(document.createTextNode("x")),rr.appendChild(B("br"));rr.appendChild(document.createTextNode("x"))}L(t.measure,rr);var a=rr.offsetHeight/50;return a>3&&(t.cachedTextHeight=a),V(t.measure),a||1}function Br(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=B("span","xxxxxxxxxx"),a=B("pre",[e],"CodeMirror-line-like");L(t.measure,a);var r=e.getBoundingClientRect(),n=(r.right-r.left)/10;return n>2&&(t.cachedCharWidth=n),n||10}function kr(t){for(var e=t.display,a={},r={},n=e.gutters.clientLeft,i=e.gutters.firstChild,o=0;i;i=i.nextSibling,++o){var l=t.display.gutterSpecs[o].className;a[l]=i.offsetLeft+i.clientLeft+n,r[l]=i.clientWidth}return{fixedPos:Cr(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:a,gutterWidth:r,wrapperWidth:e.wrapper.clientWidth}}function Cr(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function Sr(t){var e=Lr(t.display),a=t.options.lineWrapping,r=a&&Math.max(5,t.display.scroller.clientWidth/Br(t.display)-3);return function(n){if(ra(t.doc,n))return 0;var i=0;if(n.widgets)for(var o=0;o<n.widgets.length;o++)n.widgets[o].height&&(i+=n.widgets[o].height);return a?i+(Math.ceil(n.text.length/r)||1)*e:i+e}}function Er(t){var e=t.doc,a=Sr(t);e.iter((function(t){var e=a(t);e!=t.height&&te(t,e)}))}function Or(t,e,a,r){var n=t.display;if(!a&&"true"==Ht(e).getAttribute("cm-not-content"))return null;var i,o,l=n.lineSpace.getBoundingClientRect();try{i=e.clientX-l.left,o=e.clientY-l.top}catch(u){return null}var s,c=xr(t,i,o);if(r&&c.xRel>0&&(s=Zt(t.doc,c.line).text).length==c.ch){var h=F(s,s.length,t.options.tabSize)-s.length;c=ie(c.line,Math.max(0,Math.round((i-qa(t.display).left)/Br(t.display))-h))}return c}function Tr(t,e){if(e>=t.display.viewTo)return null;if((e-=t.display.viewFrom)<0)return null;for(var a=t.display.view,r=0;r<a.length;r++)if((e-=a[r].size)<0)return r}function Dr(t,e,a,r){null==e&&(e=t.doc.first),null==a&&(a=t.doc.first+t.doc.size),r||(r=0);var n=t.display;if(r&&a<n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>e)&&(n.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=n.viewTo)ke&&ea(t.doc,e)<n.viewTo&&Fr(t);else if(a<=n.viewFrom)ke&&aa(t.doc,a+r)>n.viewFrom?Fr(t):(n.viewFrom+=r,n.viewTo+=r);else if(e<=n.viewFrom&&a>=n.viewTo)Fr(t);else if(e<=n.viewFrom){var i=Ir(t,a,a+r,1);i?(n.view=n.view.slice(i.index),n.viewFrom=i.lineN,n.viewTo+=r):Fr(t)}else if(a>=n.viewTo){var o=Ir(t,e,e,-1);o?(n.view=n.view.slice(0,o.index),n.viewTo=o.lineN):Fr(t)}else{var l=Ir(t,e,e,-1),s=Ir(t,a,a+r,1);l&&s?(n.view=n.view.slice(0,l.index).concat(wa(t,l.lineN,s.lineN)).concat(n.view.slice(s.index)),n.viewTo+=r):Fr(t)}var c=n.externalMeasured;c&&(a<c.lineN?c.lineN+=r:e<c.lineN+c.size&&(n.externalMeasured=null))}function jr(t,e,a){t.curOp.viewChanged=!0;var r=t.display,n=t.display.externalMeasured;if(n&&e>=n.lineN&&e<n.lineN+n.size&&(r.externalMeasured=null),!(e<r.viewFrom||e>=r.viewTo)){var i=r.view[Tr(t,e)];if(null!=i.node){var o=i.changes||(i.changes=[]);-1==P(o,a)&&o.push(a)}}}function Fr(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function Ir(t,e,a,r){var n,i=Tr(t,e),o=t.display.view;if(!ke||a==t.doc.first+t.doc.size)return{index:i,lineN:a};for(var l=t.display.viewFrom,s=0;s<i;s++)l+=o[s].size;if(l!=e){if(r>0){if(i==o.length-1)return null;n=l+o[i].size-e,i++}else n=l-e;e+=n,a+=n}for(;ea(t.doc,a)!=a;){if(i==(r<0?0:o.length-1))return null;a+=r*o[i-(r<0?1:0)].size,i+=r}return{index:i,lineN:a}}function Pr(t,e,a){var r=t.display;0==r.view.length||e>=r.viewTo||a<=r.viewFrom?(r.view=wa(t,e,a),r.viewFrom=e):(r.viewFrom>e?r.view=wa(t,e,r.viewFrom).concat(r.view):r.viewFrom<e&&(r.view=r.view.slice(Tr(t,e))),r.viewFrom=e,r.viewTo<a?r.view=r.view.concat(wa(t,r.viewTo,a)):r.viewTo>a&&(r.view=r.view.slice(0,Tr(t,a)))),r.viewTo=a}function Rr(t){for(var e=t.display.view,a=0,r=0;r<e.length;r++){var n=e[r];n.hidden||n.node&&!n.changes||++a}return a}function Nr(t){t.display.input.showSelection(t.display.input.prepareSelection())}function $r(t,e){void 0===e&&(e=!0);for(var a=t.doc,r={},n=r.cursors=document.createDocumentFragment(),i=r.selection=document.createDocumentFragment(),o=0;o<a.sel.ranges.length;o++)if(e||o!=a.sel.primIndex){var l=a.sel.ranges[o];if(!(l.from().line>=t.display.viewTo||l.to().line<t.display.viewFrom)){var s=l.empty();(s||t.options.showCursorWhenSelecting)&&Ur(t,l.head,n),s||qr(t,l,i)}}return r}function Ur(t,e,a){var r=gr(t,e,"div",null,null,!t.options.singleCursorHeightPerLine),n=a.appendChild(B("div"," ","CodeMirror-cursor"));if(n.style.left=r.left+"px",n.style.top=r.top+"px",n.style.height=Math.max(0,r.bottom-r.top)*t.options.cursorHeight+"px",r.other){var i=a.appendChild(B("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));i.style.display="",i.style.left=r.other.left+"px",i.style.top=r.other.top+"px",i.style.height=.85*(r.other.bottom-r.other.top)+"px"}}function Wr(t,e){return t.top-e.top||t.left-e.left}function qr(t,e,a){var r=t.display,n=t.doc,i=document.createDocumentFragment(),o=qa(t.display),l=o.left,s=Math.max(r.sizerWidth,Ya(t)-r.sizer.offsetLeft)-o.right,c="ltr"==n.direction;function h(t,e,a,r){e<0&&(e=0),e=Math.round(e),r=Math.round(r),i.appendChild(B("div",null,"CodeMirror-selected","position: absolute; left: "+t+"px;\n top: "+e+"px; width: "+(null==a?s-t:a)+"px;\n height: "+(r-e)+"px"))}function u(e,a,r){var i,o,u=Zt(n,e),d=u.text.length;function p(a,r){return yr(t,ie(e,a),"div",u,r)}function m(e,a,r){var n=Mr(t,u,null,e),i="ltr"==a==("after"==r)?"left":"right";return p("after"==r?n.begin:n.end-(/\s/.test(u.text.charAt(n.end-1))?2:1),i)[i]}var v=dt(u,n.direction);return st(v,a||0,null==r?d:r,(function(t,e,n,u){var f="ltr"==n,y=p(t,f?"left":"right"),g=p(e-1,f?"right":"left"),b=null==a&&0==t,z=null==r&&e==d,x=0==u,w=!v||u==v.length-1;if(g.top-y.top<=3){var M=(c?z:b)&&w,_=(c?b:z)&&x?l:(f?y:g).left,A=M?s:(f?g:y).right;h(_,y.top,A-_,y.bottom)}else{var H,V,L,B;f?(H=c&&b&&x?l:y.left,V=c?s:m(t,n,"before"),L=c?l:m(e,n,"after"),B=c&&z&&w?s:g.right):(H=c?m(t,n,"before"):l,V=!c&&b&&x?s:y.right,L=!c&&z&&w?l:g.left,B=c?m(e,n,"after"):s),h(H,y.top,V-H,y.bottom),y.bottom<g.top&&h(l,y.bottom,null,g.top),h(L,g.top,B-L,g.bottom)}(!i||Wr(y,i)<0)&&(i=y),Wr(g,i)<0&&(i=g),(!o||Wr(y,o)<0)&&(o=y),Wr(g,o)<0&&(o=g)})),{start:i,end:o}}var d=e.from(),p=e.to();if(d.line==p.line)u(d.line,d.ch,p.ch);else{var m=Zt(n,d.line),v=Zt(n,p.line),f=Xe(m)==Xe(v),y=u(d.line,d.ch,f?m.text.length+1:null).end,g=u(p.line,f?0:null,p.ch).start;f&&(y.top<g.top-2?(h(y.right,y.top,null,y.bottom),h(l,g.top,g.left,g.bottom)):h(y.right,y.top,g.left-y.right,y.bottom)),y.bottom<g.top&&h(l,y.bottom,null,g.top)}a.appendChild(i)}function Gr(t){if(t.state.focused){var e=t.display;clearInterval(e.blinker);var a=!0;e.cursorDiv.style.visibility="",t.options.cursorBlinkRate>0?e.blinker=setInterval((function(){t.hasFocus()||Zr(t),e.cursorDiv.style.visibility=(a=!a)?"":"hidden"}),t.options.cursorBlinkRate):t.options.cursorBlinkRate<0&&(e.cursorDiv.style.visibility="hidden")}}function Yr(t){t.hasFocus()||(t.display.input.focus(),t.state.focused||Jr(t))}function Kr(t){t.state.delayingBlurEvent=!0,setTimeout((function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,t.state.focused&&Zr(t))}),100)}function Jr(t,e){t.state.delayingBlurEvent&&!t.state.draggingText&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(yt(t,"focus",t,e),t.state.focused=!0,E(t.display.wrapper,"CodeMirror-focused"),t.curOp||t.display.selForContextMenu==t.doc.sel||(t.display.input.reset(),s&&setTimeout((function(){return t.display.input.reset(!0)}),20)),t.display.input.receivedFocus()),Gr(t))}function Zr(t,e){t.state.delayingBlurEvent||(t.state.focused&&(yt(t,"blur",t,e),t.state.focused=!1,H(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout((function(){t.state.focused||(t.display.shift=!1)}),150))}function Xr(t){for(var e=t.display,a=e.lineDiv.offsetTop,r=0;r<e.view.length;r++){var n=e.view[r],i=t.options.lineWrapping,s=void 0,c=0;if(!n.hidden){if(o&&l<8){var h=n.node.offsetTop+n.node.offsetHeight;s=h-a,a=h}else{var u=n.node.getBoundingClientRect();s=u.bottom-u.top,!i&&n.text.firstChild&&(c=n.text.firstChild.getBoundingClientRect().right-u.left-1)}var d=n.line.height-s;if((d>.005||d<-.005)&&(te(n.line,s),Qr(n.line),n.rest))for(var p=0;p<n.rest.length;p++)Qr(n.rest[p]);if(c>t.display.sizerWidth){var m=Math.ceil(c/Br(t.display));m>t.display.maxLineLength&&(t.display.maxLineLength=m,t.display.maxLine=n.line,t.display.maxLineChanged=!0)}}}}function Qr(t){if(t.widgets)for(var e=0;e<t.widgets.length;++e){var a=t.widgets[e],r=a.node.parentNode;r&&(a.height=r.offsetHeight)}}function tn(t,e,a){var r=a&&null!=a.top?Math.max(0,a.top):t.scroller.scrollTop;r=Math.floor(r-Ua(t));var n=a&&null!=a.bottom?a.bottom:r+t.wrapper.clientHeight,i=ae(e,r),o=ae(e,n);if(a&&a.ensure){var l=a.ensure.from.line,s=a.ensure.to.line;l<i?(i=l,o=ae(e,ia(Zt(e,l))+t.wrapper.clientHeight)):Math.min(s,e.lastLine())>=o&&(i=ae(e,ia(Zt(e,s))-t.wrapper.clientHeight),o=s)}return{from:i,to:Math.max(o,i+1)}}function en(t,e){if(!gt(t,"scrollCursorIntoView")){var a=t.display,r=a.sizer.getBoundingClientRect(),n=null;if(e.top+r.top<0?n=!0:e.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(n=!1),null!=n&&!m){var i=B("div","​",null,"position: absolute;\n top: "+(e.top-a.viewOffset-Ua(t.display))+"px;\n height: "+(e.bottom-e.top+Ga(t)+a.barHeight)+"px;\n left: "+e.left+"px; width: "+Math.max(2,e.right-e.left)+"px;");t.display.lineSpace.appendChild(i),i.scrollIntoView(n),t.display.lineSpace.removeChild(i)}}}function an(t,e,a,r){var n;null==r&&(r=0),t.options.lineWrapping||e!=a||(a="before"==(e=e.ch?ie(e.line,"before"==e.sticky?e.ch-1:e.ch,"after"):e).sticky?ie(e.line,e.ch+1,"before"):e);for(var i=0;i<5;i++){var o=!1,l=gr(t,e),s=a&&a!=e?gr(t,a):l,c=nn(t,n={left:Math.min(l.left,s.left),top:Math.min(l.top,s.top)-r,right:Math.max(l.left,s.left),bottom:Math.max(l.bottom,s.bottom)+r}),h=t.doc.scrollTop,u=t.doc.scrollLeft;if(null!=c.scrollTop&&(dn(t,c.scrollTop),Math.abs(t.doc.scrollTop-h)>1&&(o=!0)),null!=c.scrollLeft&&(mn(t,c.scrollLeft),Math.abs(t.doc.scrollLeft-u)>1&&(o=!0)),!o)break}return n}function rn(t,e){var a=nn(t,e);null!=a.scrollTop&&dn(t,a.scrollTop),null!=a.scrollLeft&&mn(t,a.scrollLeft)}function nn(t,e){var a=t.display,r=Lr(t.display);e.top<0&&(e.top=0);var n=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:a.scroller.scrollTop,i=Ka(t),o={};e.bottom-e.top>i&&(e.bottom=e.top+i);var l=t.doc.height+Wa(a),s=e.top<r,c=e.bottom>l-r;if(e.top<n)o.scrollTop=s?0:e.top;else if(e.bottom>n+i){var h=Math.min(e.top,(c?l:e.bottom)-i);h!=n&&(o.scrollTop=h)}var u=t.options.fixedGutter?0:a.gutters.offsetWidth,d=t.curOp&&null!=t.curOp.scrollLeft?t.curOp.scrollLeft:a.scroller.scrollLeft-u,p=Ya(t)-a.gutters.offsetWidth,m=e.right-e.left>p;return m&&(e.right=e.left+p),e.left<10?o.scrollLeft=0:e.left<d?o.scrollLeft=Math.max(0,e.left+u-(m?0:10)):e.right>p+d-3&&(o.scrollLeft=e.right+(m?0:10)-p),o}function on(t,e){null!=e&&(hn(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+e)}function ln(t){hn(t);var e=t.getCursor();t.curOp.scrollToPos={from:e,to:e,margin:t.options.cursorScrollMargin}}function sn(t,e,a){null==e&&null==a||hn(t),null!=e&&(t.curOp.scrollLeft=e),null!=a&&(t.curOp.scrollTop=a)}function cn(t,e){hn(t),t.curOp.scrollToPos=e}function hn(t){var e=t.curOp.scrollToPos;e&&(t.curOp.scrollToPos=null,un(t,br(t,e.from),br(t,e.to),e.margin))}function un(t,e,a,r){var n=nn(t,{left:Math.min(e.left,a.left),top:Math.min(e.top,a.top)-r,right:Math.max(e.right,a.right),bottom:Math.max(e.bottom,a.bottom)+r});sn(t,n.scrollLeft,n.scrollTop)}function dn(t,e){Math.abs(t.doc.scrollTop-e)<2||(a||$n(t,{top:e}),pn(t,e,!0),a&&$n(t),Tn(t,100))}function pn(t,e,a){e=Math.max(0,Math.min(t.display.scroller.scrollHeight-t.display.scroller.clientHeight,e)),(t.display.scroller.scrollTop!=e||a)&&(t.doc.scrollTop=e,t.display.scrollbars.setScrollTop(e),t.display.scroller.scrollTop!=e&&(t.display.scroller.scrollTop=e))}function mn(t,e,a,r){e=Math.max(0,Math.min(e,t.display.scroller.scrollWidth-t.display.scroller.clientWidth)),(a?e==t.doc.scrollLeft:Math.abs(t.doc.scrollLeft-e)<2)&&!r||(t.doc.scrollLeft=e,Gn(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function vn(t){var e=t.display,a=e.gutters.offsetWidth,r=Math.round(t.doc.height+Wa(t.display));return{clientHeight:e.scroller.clientHeight,viewHeight:e.wrapper.clientHeight,scrollWidth:e.scroller.scrollWidth,clientWidth:e.scroller.clientWidth,viewWidth:e.wrapper.clientWidth,barLeft:t.options.fixedGutter?a:0,docHeight:r,scrollHeight:r+Ga(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:a}}var fn=function(t,e,a){this.cm=a;var r=this.vert=B("div",[B("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),n=this.horiz=B("div",[B("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=n.tabIndex=-1,t(r),t(n),mt(r,"scroll",(function(){r.clientHeight&&e(r.scrollTop,"vertical")})),mt(n,"scroll",(function(){n.clientWidth&&e(n.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,o&&l<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};fn.prototype.update=function(t){var e=t.scrollWidth>t.clientWidth+1,a=t.scrollHeight>t.clientHeight+1,r=t.nativeBarWidth;if(a){this.vert.style.display="block",this.vert.style.bottom=e?r+"px":"0";var n=t.viewHeight-(e?r:0);this.vert.firstChild.style.height=Math.max(0,t.scrollHeight-t.clientHeight+n)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(e){this.horiz.style.display="block",this.horiz.style.right=a?r+"px":"0",this.horiz.style.left=t.barLeft+"px";var i=t.viewWidth-t.barLeft-(a?r:0);this.horiz.firstChild.style.width=Math.max(0,t.scrollWidth-t.clientWidth+i)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&t.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:a?r:0,bottom:e?r:0}},fn.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},fn.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},fn.prototype.zeroWidthHack=function(){var t=g&&!p?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new I,this.disableVert=new I},fn.prototype.enableZeroWidthBar=function(t,e,a){function r(){var n=t.getBoundingClientRect();("vert"==a?document.elementFromPoint(n.right-1,(n.top+n.bottom)/2):document.elementFromPoint((n.right+n.left)/2,n.bottom-1))!=t?t.style.pointerEvents="none":e.set(1e3,r)}t.style.pointerEvents="auto",e.set(1e3,r)},fn.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var yn=function(){};function gn(t,e){e||(e=vn(t));var a=t.display.barWidth,r=t.display.barHeight;bn(t,e);for(var n=0;n<4&&a!=t.display.barWidth||r!=t.display.barHeight;n++)a!=t.display.barWidth&&t.options.lineWrapping&&Xr(t),bn(t,vn(t)),a=t.display.barWidth,r=t.display.barHeight}function bn(t,e){var a=t.display,r=a.scrollbars.update(e);a.sizer.style.paddingRight=(a.barWidth=r.right)+"px",a.sizer.style.paddingBottom=(a.barHeight=r.bottom)+"px",a.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(a.scrollbarFiller.style.display="block",a.scrollbarFiller.style.height=r.bottom+"px",a.scrollbarFiller.style.width=r.right+"px"):a.scrollbarFiller.style.display="",r.bottom&&t.options.coverGutterNextToScrollbar&&t.options.fixedGutter?(a.gutterFiller.style.display="block",a.gutterFiller.style.height=r.bottom+"px",a.gutterFiller.style.width=e.gutterWidth+"px"):a.gutterFiller.style.display=""}yn.prototype.update=function(){return{bottom:0,right:0}},yn.prototype.setScrollLeft=function(){},yn.prototype.setScrollTop=function(){},yn.prototype.clear=function(){};var zn={native:fn,null:yn};function xn(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&H(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new zn[t.options.scrollbarStyle]((function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),mt(e,"mousedown",(function(){t.state.focused&&setTimeout((function(){return t.display.input.focus()}),0)})),e.setAttribute("cm-not-content","true")}),(function(e,a){"horizontal"==a?mn(t,e):dn(t,e)}),t),t.display.scrollbars.addClass&&E(t.display.wrapper,t.display.scrollbars.addClass)}var wn=0;function Mn(t){t.curOp={cm:t,viewChanged:!1,startHeight:t.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++wn},_a(t.curOp)}function _n(t){var e=t.curOp;e&&Ha(e,(function(t){for(var e=0;e<t.ops.length;e++)t.ops[e].cm.curOp=null;An(t)}))}function An(t){for(var e=t.ops,a=0;a<e.length;a++)Hn(e[a]);for(var r=0;r<e.length;r++)Vn(e[r]);for(var n=0;n<e.length;n++)Ln(e[n]);for(var i=0;i<e.length;i++)Bn(e[i]);for(var o=0;o<e.length;o++)kn(e[o])}function Hn(t){var e=t.cm,a=e.display;Fn(e),t.updateMaxLine&&la(e),t.mustUpdate=t.viewChanged||t.forceUpdate||null!=t.scrollTop||t.scrollToPos&&(t.scrollToPos.from.line<a.viewFrom||t.scrollToPos.to.line>=a.viewTo)||a.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new jn(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function Vn(t){t.updatedDisplay=t.mustUpdate&&Rn(t.cm,t.update)}function Ln(t){var e=t.cm,a=e.display;t.updatedDisplay&&Xr(e),t.barMeasure=vn(e),a.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=Qa(e,a.maxLine,a.maxLine.text.length).left+3,e.display.sizerWidth=t.adjustWidthTo,t.barMeasure.scrollWidth=Math.max(a.scroller.clientWidth,a.sizer.offsetLeft+t.adjustWidthTo+Ga(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,a.sizer.offsetLeft+t.adjustWidthTo-Ya(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=a.input.prepareSelection())}function Bn(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLeft<e.doc.scrollLeft&&mn(e,Math.min(e.display.scroller.scrollLeft,t.maxScrollLeft),!0),e.display.maxLineChanged=!1);var a=t.focus&&t.focus==S();t.preparedSelection&&e.display.input.showSelection(t.preparedSelection,a),(t.updatedDisplay||t.startHeight!=e.doc.height)&&gn(e,t.barMeasure),t.updatedDisplay&&qn(e,t.barMeasure),t.selectionChanged&&Gr(e),e.state.focused&&t.updateInput&&e.display.input.reset(t.typing),a&&Yr(t.cm)}function kn(t){var e=t.cm,a=e.display,r=e.doc;t.updatedDisplay&&Nn(e,t.update),null==a.wheelStartX||null==t.scrollTop&&null==t.scrollLeft&&!t.scrollToPos||(a.wheelStartX=a.wheelStartY=null),null!=t.scrollTop&&pn(e,t.scrollTop,t.forceScroll),null!=t.scrollLeft&&mn(e,t.scrollLeft,!0,!0),t.scrollToPos&&en(e,an(e,de(r,t.scrollToPos.from),de(r,t.scrollToPos.to),t.scrollToPos.margin));var n=t.maybeHiddenMarkers,i=t.maybeUnhiddenMarkers;if(n)for(var o=0;o<n.length;++o)n[o].lines.length||yt(n[o],"hide");if(i)for(var l=0;l<i.length;++l)i[l].lines.length&&yt(i[l],"unhide");a.wrapper.offsetHeight&&(r.scrollTop=e.display.scroller.scrollTop),t.changeObjs&&yt(e,"changes",e,t.changeObjs),t.update&&t.update.finish()}function Cn(t,e){if(t.curOp)return e();Mn(t);try{return e()}finally{_n(t)}}function Sn(t,e){return function(){if(t.curOp)return e.apply(t,arguments);Mn(t);try{return e.apply(t,arguments)}finally{_n(t)}}}function En(t){return function(){if(this.curOp)return t.apply(this,arguments);Mn(this);try{return t.apply(this,arguments)}finally{_n(this)}}}function On(t){return function(){var e=this.cm;if(!e||e.curOp)return t.apply(this,arguments);Mn(e);try{return t.apply(this,arguments)}finally{_n(e)}}}function Tn(t,e){t.doc.highlightFrontier<t.display.viewTo&&t.state.highlight.set(e,D(Dn,t))}function Dn(t){var e=t.doc;if(!(e.highlightFrontier>=t.display.viewTo)){var a=+new Date+t.options.workTime,r=be(t,e.highlightFrontier),n=[];e.iter(r.line,Math.min(e.first+e.size,t.display.viewTo+500),(function(i){if(r.line>=t.display.viewFrom){var o=i.styles,l=i.text.length>t.options.maxHighlightLength?Gt(e.mode,r.state):null,s=ye(t,i,r,!0);l&&(r.state=l),i.styles=s.styles;var c=i.styleClasses,h=s.classes;h?i.styleClasses=h:c&&(i.styleClasses=null);for(var u=!o||o.length!=i.styles.length||c!=h&&(!c||!h||c.bgClass!=h.bgClass||c.textClass!=h.textClass),d=0;!u&&d<o.length;++d)u=o[d]!=i.styles[d];u&&n.push(r.line),i.stateAfter=r.save(),r.nextLine()}else i.text.length<=t.options.maxHighlightLength&&ze(t,i.text,r),i.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>a)return Tn(t,t.options.workDelay),!0})),e.highlightFrontier=r.line,e.modeFrontier=Math.max(e.modeFrontier,r.line),n.length&&Cn(t,(function(){for(var e=0;e<n.length;e++)jr(t,n[e],"text")}))}}var jn=function(t,e,a){var r=t.display;this.viewport=e,this.visible=tn(r,t.doc,e),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=Ya(t),this.force=a,this.dims=kr(t),this.events=[]};function Fn(t){var e=t.display;!e.scrollbarsClipped&&e.scroller.offsetWidth&&(e.nativeBarWidth=e.scroller.offsetWidth-e.scroller.clientWidth,e.heightForcer.style.height=Ga(t)+"px",e.sizer.style.marginBottom=-e.nativeBarWidth+"px",e.sizer.style.borderRightWidth=Ga(t)+"px",e.scrollbarsClipped=!0)}function In(t){if(t.hasFocus())return null;var e=S();if(!e||!C(t.display.lineDiv,e))return null;var a={activeElt:e};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&C(t.display.lineDiv,r.anchorNode)&&(a.anchorNode=r.anchorNode,a.anchorOffset=r.anchorOffset,a.focusNode=r.focusNode,a.focusOffset=r.focusOffset)}return a}function Pn(t){if(t&&t.activeElt&&t.activeElt!=S()&&(t.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(t.activeElt.nodeName)&&t.anchorNode&&C(document.body,t.anchorNode)&&C(document.body,t.focusNode))){var e=window.getSelection(),a=document.createRange();a.setEnd(t.anchorNode,t.anchorOffset),a.collapse(!1),e.removeAllRanges(),e.addRange(a),e.extend(t.focusNode,t.focusOffset)}}function Rn(t,e){var a=t.display,r=t.doc;if(e.editorIsHidden)return Fr(t),!1;if(!e.force&&e.visible.from>=a.viewFrom&&e.visible.to<=a.viewTo&&(null==a.updateLineNumbers||a.updateLineNumbers>=a.viewTo)&&a.renderedView==a.view&&0==Rr(t))return!1;Yn(t)&&(Fr(t),e.dims=kr(t));var n=r.first+r.size,i=Math.max(e.visible.from-t.options.viewportMargin,r.first),o=Math.min(n,e.visible.to+t.options.viewportMargin);a.viewFrom<i&&i-a.viewFrom<20&&(i=Math.max(r.first,a.viewFrom)),a.viewTo>o&&a.viewTo-o<20&&(o=Math.min(n,a.viewTo)),ke&&(i=ea(t.doc,i),o=aa(t.doc,o));var l=i!=a.viewFrom||o!=a.viewTo||a.lastWrapHeight!=e.wrapperHeight||a.lastWrapWidth!=e.wrapperWidth;Pr(t,i,o),a.viewOffset=ia(Zt(t.doc,a.viewFrom)),t.display.mover.style.top=a.viewOffset+"px";var s=Rr(t);if(!l&&0==s&&!e.force&&a.renderedView==a.view&&(null==a.updateLineNumbers||a.updateLineNumbers>=a.viewTo))return!1;var c=In(t);return s>4&&(a.lineDiv.style.display="none"),Un(t,a.updateLineNumbers,e.dims),s>4&&(a.lineDiv.style.display=""),a.renderedView=a.view,Pn(c),V(a.cursorDiv),V(a.selectionDiv),a.gutters.style.height=a.sizer.style.minHeight=0,l&&(a.lastWrapHeight=e.wrapperHeight,a.lastWrapWidth=e.wrapperWidth,Tn(t,400)),a.updateLineNumbers=null,!0}function Nn(t,e){for(var a=e.viewport,r=!0;;r=!1){if(r&&t.options.lineWrapping&&e.oldDisplayWidth!=Ya(t))r&&(e.visible=tn(t.display,t.doc,a));else if(a&&null!=a.top&&(a={top:Math.min(t.doc.height+Wa(t.display)-Ka(t),a.top)}),e.visible=tn(t.display,t.doc,a),e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)break;if(!Rn(t,e))break;Xr(t);var n=vn(t);Nr(t),gn(t,n),qn(t,n),e.force=!1}e.signal(t,"update",t),t.display.viewFrom==t.display.reportedViewFrom&&t.display.viewTo==t.display.reportedViewTo||(e.signal(t,"viewportChange",t,t.display.viewFrom,t.display.viewTo),t.display.reportedViewFrom=t.display.viewFrom,t.display.reportedViewTo=t.display.viewTo)}function $n(t,e){var a=new jn(t,e);if(Rn(t,a)){Xr(t),Nn(t,a);var r=vn(t);Nr(t),gn(t,r),qn(t,r),a.finish()}}function Un(t,e,a){var r=t.display,n=t.options.lineNumbers,i=r.lineDiv,o=i.firstChild;function l(e){var a=e.nextSibling;return s&&g&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),a}for(var c=r.view,h=r.viewFrom,u=0;u<c.length;u++){var d=c[u];if(d.hidden);else if(d.node&&d.node.parentNode==i){for(;o!=d.node;)o=l(o);var p=n&&null!=e&&e<=h&&d.lineNumber;d.changes&&(P(d.changes,"gutter")>-1&&(p=!1),ka(t,d,h,a)),p&&(V(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(ne(t.options,h)))),o=d.node.nextSibling}else{var m=Fa(t,d,h,a);i.insertBefore(m,o)}h+=d.size}for(;o;)o=l(o)}function Wn(t){var e=t.gutters.offsetWidth;t.sizer.style.marginLeft=e+"px"}function qn(t,e){t.display.sizer.style.minHeight=e.docHeight+"px",t.display.heightForcer.style.top=e.docHeight+"px",t.display.gutters.style.height=e.docHeight+t.display.barHeight+Ga(t)+"px"}function Gn(t){var e=t.display,a=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var r=Cr(e)-e.scroller.scrollLeft+t.doc.scrollLeft,n=e.gutters.offsetWidth,i=r+"px",o=0;o<a.length;o++)if(!a[o].hidden){t.options.fixedGutter&&(a[o].gutter&&(a[o].gutter.style.left=i),a[o].gutterBackground&&(a[o].gutterBackground.style.left=i));var l=a[o].alignable;if(l)for(var s=0;s<l.length;s++)l[s].style.left=i}t.options.fixedGutter&&(e.gutters.style.left=r+n+"px")}}function Yn(t){if(!t.options.lineNumbers)return!1;var e=t.doc,a=ne(t.options,e.first+e.size-1),r=t.display;if(a.length!=r.lineNumChars){var n=r.measure.appendChild(B("div",[B("div",a)],"CodeMirror-linenumber CodeMirror-gutter-elt")),i=n.firstChild.offsetWidth,o=n.offsetWidth-i;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(i,r.lineGutter.offsetWidth-o)+1,r.lineNumWidth=r.lineNumInnerWidth+o,r.lineNumChars=r.lineNumInnerWidth?a.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",Wn(t.display),!0}return!1}function Kn(t,e){for(var a=[],r=!1,n=0;n<t.length;n++){var i=t[n],o=null;if("string"!=typeof i&&(o=i.style,i=i.className),"CodeMirror-linenumbers"==i){if(!e)continue;r=!0}a.push({className:i,style:o})}return e&&!r&&a.push({className:"CodeMirror-linenumbers",style:null}),a}function Jn(t){var e=t.gutters,a=t.gutterSpecs;V(e),t.lineGutter=null;for(var r=0;r<a.length;++r){var n=a[r],i=n.className,o=n.style,l=e.appendChild(B("div",null,"CodeMirror-gutter "+i));o&&(l.style.cssText=o),"CodeMirror-linenumbers"==i&&(t.lineGutter=l,l.style.width=(t.lineNumWidth||1)+"px")}e.style.display=a.length?"":"none",Wn(t)}function Zn(t){Jn(t.display),Dr(t),Gn(t)}function Xn(t,e,r,n){var i=this;this.input=r,i.scrollbarFiller=B("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=B("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=k("div",null,"CodeMirror-code"),i.selectionDiv=B("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=B("div",null,"CodeMirror-cursors"),i.measure=B("div",null,"CodeMirror-measure"),i.lineMeasure=B("div",null,"CodeMirror-measure"),i.lineSpace=k("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var c=k("div",[i.lineSpace],"CodeMirror-lines");i.mover=B("div",[c],null,"position: relative"),i.sizer=B("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=B("div",null,null,"position: absolute; height: "+R+"px; width: 1px;"),i.gutters=B("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=B("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=B("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),o&&l<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),s||a&&y||(i.scroller.draggable=!0),t&&(t.appendChild?t.appendChild(i.wrapper):t(i.wrapper)),i.viewFrom=i.viewTo=e.first,i.reportedViewFrom=i.reportedViewTo=e.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,i.gutterSpecs=Kn(n.gutters,n.lineNumbers),Jn(i),r.init(i)}jn.prototype.signal=function(t,e){zt(t,e)&&this.events.push(arguments)},jn.prototype.finish=function(){for(var t=0;t<this.events.length;t++)yt.apply(null,this.events[t])};var Qn=0,ti=null;function ei(t){var e=t.wheelDeltaX,a=t.wheelDeltaY;return null==e&&t.detail&&t.axis==t.HORIZONTAL_AXIS&&(e=t.detail),null==a&&t.detail&&t.axis==t.VERTICAL_AXIS?a=t.detail:null==a&&(a=t.wheelDelta),{x:e,y:a}}function ai(t){var e=ei(t);return e.x*=ti,e.y*=ti,e}function ri(t,e){var r=ei(e),n=r.x,i=r.y,o=t.display,l=o.scroller,c=l.scrollWidth>l.clientWidth,h=l.scrollHeight>l.clientHeight;if(n&&c||i&&h){if(i&&g&&s)t:for(var d=e.target,p=o.view;d!=l;d=d.parentNode)for(var m=0;m<p.length;m++)if(p[m].node==d){t.display.currentWheelTarget=d;break t}if(n&&!a&&!u&&null!=ti)return i&&h&&dn(t,Math.max(0,l.scrollTop+i*ti)),mn(t,Math.max(0,l.scrollLeft+n*ti)),(!i||i&&h)&&wt(e),void(o.wheelStartX=null);if(i&&null!=ti){var v=i*ti,f=t.doc.scrollTop,y=f+o.wrapper.clientHeight;v<0?f=Math.max(0,f+v-50):y=Math.min(t.doc.height,y+v+50),$n(t,{top:f,bottom:y})}Qn<20&&(null==o.wheelStartX?(o.wheelStartX=l.scrollLeft,o.wheelStartY=l.scrollTop,o.wheelDX=n,o.wheelDY=i,setTimeout((function(){if(null!=o.wheelStartX){var t=l.scrollLeft-o.wheelStartX,e=l.scrollTop-o.wheelStartY,a=e&&o.wheelDY&&e/o.wheelDY||t&&o.wheelDX&&t/o.wheelDX;o.wheelStartX=o.wheelStartY=null,a&&(ti=(ti*Qn+a)/(Qn+1),++Qn)}}),200)):(o.wheelDX+=n,o.wheelDY+=i))}}o?ti=-.53:a?ti=15:h?ti=-.7:d&&(ti=-1/3);var ni=function(t,e){this.ranges=t,this.primIndex=e};ni.prototype.primary=function(){return this.ranges[this.primIndex]},ni.prototype.equals=function(t){if(t==this)return!0;if(t.primIndex!=this.primIndex||t.ranges.length!=this.ranges.length)return!1;for(var e=0;e<this.ranges.length;e++){var a=this.ranges[e],r=t.ranges[e];if(!le(a.anchor,r.anchor)||!le(a.head,r.head))return!1}return!0},ni.prototype.deepCopy=function(){for(var t=[],e=0;e<this.ranges.length;e++)t[e]=new ii(se(this.ranges[e].anchor),se(this.ranges[e].head));return new ni(t,this.primIndex)},ni.prototype.somethingSelected=function(){for(var t=0;t<this.ranges.length;t++)if(!this.ranges[t].empty())return!0;return!1},ni.prototype.contains=function(t,e){e||(e=t);for(var a=0;a<this.ranges.length;a++){var r=this.ranges[a];if(oe(e,r.from())>=0&&oe(t,r.to())<=0)return a}return-1};var ii=function(t,e){this.anchor=t,this.head=e};function oi(t,e,a){var r=t&&t.options.selectionsMayTouch,n=e[a];e.sort((function(t,e){return oe(t.from(),e.from())})),a=P(e,n);for(var i=1;i<e.length;i++){var o=e[i],l=e[i-1],s=oe(l.to(),o.from());if(r&&!o.empty()?s>0:s>=0){var c=he(l.from(),o.from()),h=ce(l.to(),o.to()),u=l.empty()?o.from()==o.head:l.from()==l.head;i<=a&&--a,e.splice(--i,2,new ii(u?h:c,u?c:h))}}return new ni(e,a)}function li(t,e){return new ni([new ii(t,e||t)],0)}function si(t){return t.text?ie(t.from.line+t.text.length-1,K(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function ci(t,e){if(oe(t,e.from)<0)return t;if(oe(t,e.to)<=0)return si(e);var a=t.line+e.text.length-(e.to.line-e.from.line)-1,r=t.ch;return t.line==e.to.line&&(r+=si(e).ch-e.to.ch),ie(a,r)}function hi(t,e){for(var a=[],r=0;r<t.sel.ranges.length;r++){var n=t.sel.ranges[r];a.push(new ii(ci(n.anchor,e),ci(n.head,e)))}return oi(t.cm,a,t.sel.primIndex)}function ui(t,e,a){return t.line==e.line?ie(a.line,t.ch-e.ch+a.ch):ie(a.line+(t.line-e.line),t.ch)}function di(t,e,a){for(var r=[],n=ie(t.first,0),i=n,o=0;o<e.length;o++){var l=e[o],s=ui(l.from,n,i),c=ui(si(l),n,i);if(n=l.to,i=c,"around"==a){var h=t.sel.ranges[o],u=oe(h.head,h.anchor)<0;r[o]=new ii(u?c:s,u?s:c)}else r[o]=new ii(s,s)}return new ni(r,t.sel.primIndex)}function pi(t){t.doc.mode=Ut(t.options,t.doc.modeOption),mi(t)}function mi(t){t.doc.iter((function(t){t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null)})),t.doc.modeFrontier=t.doc.highlightFrontier=t.doc.first,Tn(t,100),t.state.modeGen++,t.curOp&&Dr(t)}function vi(t,e){return 0==e.from.ch&&0==e.to.ch&&""==K(e.text)&&(!t.cm||t.cm.options.wholeLineUpdateBefore)}function fi(t,e,a,r){function n(t){return a?a[t]:null}function i(t,a,n){ca(t,a,n,r),La(t,"change",t,e)}function o(t,e){for(var a=[],i=t;i<e;++i)a.push(new sa(c[i],n(i),r));return a}var l=e.from,s=e.to,c=e.text,h=Zt(t,l.line),u=Zt(t,s.line),d=K(c),p=n(c.length-1),m=s.line-l.line;if(e.full)t.insert(0,o(0,c.length)),t.remove(c.length,t.size-c.length);else if(vi(t,e)){var v=o(0,c.length-1);i(u,u.text,p),m&&t.remove(l.line,m),v.length&&t.insert(l.line,v)}else if(h==u)if(1==c.length)i(h,h.text.slice(0,l.ch)+d+h.text.slice(s.ch),p);else{var f=o(1,c.length-1);f.push(new sa(d+h.text.slice(s.ch),p,r)),i(h,h.text.slice(0,l.ch)+c[0],n(0)),t.insert(l.line+1,f)}else if(1==c.length)i(h,h.text.slice(0,l.ch)+c[0]+u.text.slice(s.ch),n(0)),t.remove(l.line+1,m);else{i(h,h.text.slice(0,l.ch)+c[0],n(0)),i(u,d+u.text.slice(s.ch),p);var y=o(1,c.length-1);m>1&&t.remove(l.line+1,m-1),t.insert(l.line+1,y)}La(t,"change",t,e)}function yi(t,e,a){function r(t,n,i){if(t.linked)for(var o=0;o<t.linked.length;++o){var l=t.linked[o];if(l.doc!=n){var s=i&&l.sharedHist;a&&!s||(e(l.doc,s),r(l.doc,t,s))}}}r(t,null,!0)}function gi(t,e){if(e.cm)throw new Error("This document is already in use.");t.doc=e,e.cm=t,Er(t),pi(t),bi(t),t.options.lineWrapping||la(t),t.options.mode=e.modeOption,Dr(t)}function bi(t){("rtl"==t.doc.direction?E:H)(t.display.lineDiv,"CodeMirror-rtl")}function zi(t){Cn(t,(function(){bi(t),Dr(t)}))}function xi(t){this.done=[],this.undone=[],this.undoDepth=t?t.undoDepth:1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=t?t.maxGeneration:1}function wi(t,e){var a={from:se(e.from),to:si(e),text:Xt(t,e.from,e.to)};return Bi(t,a,e.from.line,e.to.line+1),yi(t,(function(t){return Bi(t,a,e.from.line,e.to.line+1)}),!0),a}function Mi(t){for(;t.length&&K(t).ranges;)t.pop()}function _i(t,e){return e?(Mi(t.done),K(t.done)):t.done.length&&!K(t.done).ranges?K(t.done):t.done.length>1&&!t.done[t.done.length-2].ranges?(t.done.pop(),K(t.done)):void 0}function Ai(t,e,a,r){var n=t.history;n.undone.length=0;var i,o,l=+new Date;if((n.lastOp==r||n.lastOrigin==e.origin&&e.origin&&("+"==e.origin.charAt(0)&&n.lastModTime>l-(t.cm?t.cm.options.historyEventDelay:500)||"*"==e.origin.charAt(0)))&&(i=_i(n,n.lastOp==r)))o=K(i.changes),0==oe(e.from,e.to)&&0==oe(e.from,o.to)?o.to=si(e):i.changes.push(wi(t,e));else{var s=K(n.done);for(s&&s.ranges||Li(t.sel,n.done),i={changes:[wi(t,e)],generation:n.generation},n.done.push(i);n.done.length>n.undoDepth;)n.done.shift(),n.done[0].ranges||n.done.shift()}n.done.push(a),n.generation=++n.maxGeneration,n.lastModTime=n.lastSelTime=l,n.lastOp=n.lastSelOp=r,n.lastOrigin=n.lastSelOrigin=e.origin,o||yt(t,"historyAdded")}function Hi(t,e,a,r){var n=e.charAt(0);return"*"==n||"+"==n&&a.ranges.length==r.ranges.length&&a.somethingSelected()==r.somethingSelected()&&new Date-t.history.lastSelTime<=(t.cm?t.cm.options.historyEventDelay:500)}function Vi(t,e,a,r){var n=t.history,i=r&&r.origin;a==n.lastSelOp||i&&n.lastSelOrigin==i&&(n.lastModTime==n.lastSelTime&&n.lastOrigin==i||Hi(t,i,K(n.done),e))?n.done[n.done.length-1]=e:Li(e,n.done),n.lastSelTime=+new Date,n.lastSelOrigin=i,n.lastSelOp=a,r&&!1!==r.clearRedo&&Mi(n.undone)}function Li(t,e){var a=K(e);a&&a.ranges&&a.equals(t)||e.push(t)}function Bi(t,e,a,r){var n=e["spans_"+t.id],i=0;t.iter(Math.max(t.first,a),Math.min(t.first+t.size,r),(function(a){a.markedSpans&&((n||(n=e["spans_"+t.id]={}))[i]=a.markedSpans),++i}))}function ki(t){if(!t)return null;for(var e,a=0;a<t.length;++a)t[a].marker.explicitlyCleared?e||(e=t.slice(0,a)):e&&e.push(t[a]);return e?e.length?e:null:t}function Ci(t,e){var a=e["spans_"+t.id];if(!a)return null;for(var r=[],n=0;n<e.text.length;++n)r.push(ki(a[n]));return r}function Si(t,e){var a=Ci(t,e),r=Ie(t,e);if(!a)return r;if(!r)return a;for(var n=0;n<a.length;++n){var i=a[n],o=r[n];if(i&&o)t:for(var l=0;l<o.length;++l){for(var s=o[l],c=0;c<i.length;++c)if(i[c].marker==s.marker)continue t;i.push(s)}else o&&(a[n]=o)}return a}function Ei(t,e,a){for(var r=[],n=0;n<t.length;++n){var i=t[n];if(i.ranges)r.push(a?ni.prototype.deepCopy.call(i):i);else{var o=i.changes,l=[];r.push({changes:l});for(var s=0;s<o.length;++s){var c=o[s],h=void 0;if(l.push({from:c.from,to:c.to,text:c.text}),e)for(var u in c)(h=u.match(/^spans_(\d+)$/))&&P(e,Number(h[1]))>-1&&(K(l)[u]=c[u],delete c[u])}}}return r}function Oi(t,e,a,r){if(r){var n=t.anchor;if(a){var i=oe(e,n)<0;i!=oe(a,n)<0?(n=e,e=a):i!=oe(e,a)<0&&(e=a)}return new ii(n,e)}return new ii(a||e,e)}function Ti(t,e,a,r,n){null==n&&(n=t.cm&&(t.cm.display.shift||t.extend)),Ri(t,new ni([Oi(t.sel.primary(),e,a,n)],0),r)}function Di(t,e,a){for(var r=[],n=t.cm&&(t.cm.display.shift||t.extend),i=0;i<t.sel.ranges.length;i++)r[i]=Oi(t.sel.ranges[i],e[i],null,n);Ri(t,oi(t.cm,r,t.sel.primIndex),a)}function ji(t,e,a,r){var n=t.sel.ranges.slice(0);n[e]=a,Ri(t,oi(t.cm,n,t.sel.primIndex),r)}function Fi(t,e,a,r){Ri(t,li(e,a),r)}function Ii(t,e,a){var r={ranges:e.ranges,update:function(e){this.ranges=[];for(var a=0;a<e.length;a++)this.ranges[a]=new ii(de(t,e[a].anchor),de(t,e[a].head))},origin:a&&a.origin};return yt(t,"beforeSelectionChange",t,r),t.cm&&yt(t.cm,"beforeSelectionChange",t.cm,r),r.ranges!=e.ranges?oi(t.cm,r.ranges,r.ranges.length-1):e}function Pi(t,e,a){var r=t.history.done,n=K(r);n&&n.ranges?(r[r.length-1]=e,Ni(t,e,a)):Ri(t,e,a)}function Ri(t,e,a){Ni(t,e,a),Vi(t,t.sel,t.cm?t.cm.curOp.id:NaN,a)}function Ni(t,e,a){(zt(t,"beforeSelectionChange")||t.cm&&zt(t.cm,"beforeSelectionChange"))&&(e=Ii(t,e,a));var r=a&&a.bias||(oe(e.primary().head,t.sel.primary().head)<0?-1:1);$i(t,Wi(t,e,r,!0)),a&&!1===a.scroll||!t.cm||"nocursor"==t.cm.getOption("readOnly")||ln(t.cm)}function $i(t,e){e.equals(t.sel)||(t.sel=e,t.cm&&(t.cm.curOp.updateInput=1,t.cm.curOp.selectionChanged=!0,bt(t.cm)),La(t,"cursorActivity",t))}function Ui(t){$i(t,Wi(t,t.sel,null,!1))}function Wi(t,e,a,r){for(var n,i=0;i<e.ranges.length;i++){var o=e.ranges[i],l=e.ranges.length==t.sel.ranges.length&&t.sel.ranges[i],s=Gi(t,o.anchor,l&&l.anchor,a,r),c=Gi(t,o.head,l&&l.head,a,r);(n||s!=o.anchor||c!=o.head)&&(n||(n=e.ranges.slice(0,i)),n[i]=new ii(s,c))}return n?oi(t.cm,n,e.primIndex):e}function qi(t,e,a,r,n){var i=Zt(t,e.line);if(i.markedSpans)for(var o=0;o<i.markedSpans.length;++o){var l=i.markedSpans[o],s=l.marker,c="selectLeft"in s?!s.selectLeft:s.inclusiveLeft,h="selectRight"in s?!s.selectRight:s.inclusiveRight;if((null==l.from||(c?l.from<=e.ch:l.from<e.ch))&&(null==l.to||(h?l.to>=e.ch:l.to>e.ch))){if(n&&(yt(s,"beforeCursorEnter"),s.explicitlyCleared)){if(i.markedSpans){--o;continue}break}if(!s.atomic)continue;if(a){var u=s.find(r<0?1:-1),d=void 0;if((r<0?h:c)&&(u=Yi(t,u,-r,u&&u.line==e.line?i:null)),u&&u.line==e.line&&(d=oe(u,a))&&(r<0?d<0:d>0))return qi(t,u,e,r,n)}var p=s.find(r<0?-1:1);return(r<0?c:h)&&(p=Yi(t,p,r,p.line==e.line?i:null)),p?qi(t,p,e,r,n):null}}return e}function Gi(t,e,a,r,n){var i=r||1,o=qi(t,e,a,i,n)||!n&&qi(t,e,a,i,!0)||qi(t,e,a,-i,n)||!n&&qi(t,e,a,-i,!0);return o||(t.cantEdit=!0,ie(t.first,0))}function Yi(t,e,a,r){return a<0&&0==e.ch?e.line>t.first?de(t,ie(e.line-1)):null:a>0&&e.ch==(r||Zt(t,e.line)).text.length?e.line<t.first+t.size-1?ie(e.line+1,0):null:new ie(e.line,e.ch+a)}function Ki(t){t.setSelection(ie(t.firstLine(),0),ie(t.lastLine()),$)}function Ji(t,e,a){var r={canceled:!1,from:e.from,to:e.to,text:e.text,origin:e.origin,cancel:function(){return r.canceled=!0}};return a&&(r.update=function(e,a,n,i){e&&(r.from=de(t,e)),a&&(r.to=de(t,a)),n&&(r.text=n),void 0!==i&&(r.origin=i)}),yt(t,"beforeChange",t,r),t.cm&&yt(t.cm,"beforeChange",t.cm,r),r.canceled?(t.cm&&(t.cm.curOp.updateInput=2),null):{from:r.from,to:r.to,text:r.text,origin:r.origin}}function Zi(t,e,a){if(t.cm){if(!t.cm.curOp)return Sn(t.cm,Zi)(t,e,a);if(t.cm.state.suppressEdits)return}if(!(zt(t,"beforeChange")||t.cm&&zt(t.cm,"beforeChange"))||(e=Ji(t,e,!0))){var r=Be&&!a&&Re(t,e.from,e.to);if(r)for(var n=r.length-1;n>=0;--n)Xi(t,{from:r[n].from,to:r[n].to,text:n?[""]:e.text,origin:e.origin});else Xi(t,e)}}function Xi(t,e){if(1!=e.text.length||""!=e.text[0]||0!=oe(e.from,e.to)){var a=hi(t,e);Ai(t,e,a,t.cm?t.cm.curOp.id:NaN),eo(t,e,a,Ie(t,e));var r=[];yi(t,(function(t,a){a||-1!=P(r,t.history)||(oo(t.history,e),r.push(t.history)),eo(t,e,null,Ie(t,e))}))}}function Qi(t,e,a){var r=t.cm&&t.cm.state.suppressEdits;if(!r||a){for(var n,i=t.history,o=t.sel,l="undo"==e?i.done:i.undone,s="undo"==e?i.undone:i.done,c=0;c<l.length&&(n=l[c],a?!n.ranges||n.equals(t.sel):n.ranges);c++);if(c!=l.length){for(i.lastOrigin=i.lastSelOrigin=null;;){if(!(n=l.pop()).ranges){if(r)return void l.push(n);break}if(Li(n,s),a&&!n.equals(t.sel))return void Ri(t,n,{clearRedo:!1});o=n}var h=[];Li(o,s),s.push({changes:h,generation:i.generation}),i.generation=n.generation||++i.maxGeneration;for(var u=zt(t,"beforeChange")||t.cm&&zt(t.cm,"beforeChange"),d=function(a){var r=n.changes[a];if(r.origin=e,u&&!Ji(t,r,!1))return l.length=0,{};h.push(wi(t,r));var i=a?hi(t,r):K(l);eo(t,r,i,Si(t,r)),!a&&t.cm&&t.cm.scrollIntoView({from:r.from,to:si(r)});var o=[];yi(t,(function(t,e){e||-1!=P(o,t.history)||(oo(t.history,r),o.push(t.history)),eo(t,r,null,Si(t,r))}))},p=n.changes.length-1;p>=0;--p){var m=d(p);if(m)return m.v}}}}function to(t,e){if(0!=e&&(t.first+=e,t.sel=new ni(J(t.sel.ranges,(function(t){return new ii(ie(t.anchor.line+e,t.anchor.ch),ie(t.head.line+e,t.head.ch))})),t.sel.primIndex),t.cm)){Dr(t.cm,t.first,t.first-e,e);for(var a=t.cm.display,r=a.viewFrom;r<a.viewTo;r++)jr(t.cm,r,"gutter")}}function eo(t,e,a,r){if(t.cm&&!t.cm.curOp)return Sn(t.cm,eo)(t,e,a,r);if(e.to.line<t.first)to(t,e.text.length-1-(e.to.line-e.from.line));else if(!(e.from.line>t.lastLine())){if(e.from.line<t.first){var n=e.text.length-1-(t.first-e.from.line);to(t,n),e={from:ie(t.first,0),to:ie(e.to.line+n,e.to.ch),text:[K(e.text)],origin:e.origin}}var i=t.lastLine();e.to.line>i&&(e={from:e.from,to:ie(i,Zt(t,i).text.length),text:[e.text[0]],origin:e.origin}),e.removed=Xt(t,e.from,e.to),a||(a=hi(t,e)),t.cm?ao(t.cm,e,r):fi(t,e,r),Ni(t,a,$),t.cantEdit&&Gi(t,ie(t.firstLine(),0))&&(t.cantEdit=!1)}}function ao(t,e,a){var r=t.doc,n=t.display,i=e.from,o=e.to,l=!1,s=i.line;t.options.lineWrapping||(s=ee(Xe(Zt(r,i.line))),r.iter(s,o.line+1,(function(t){if(t==n.maxLine)return l=!0,!0}))),r.sel.contains(e.from,e.to)>-1&&bt(t),fi(r,e,a,Sr(t)),t.options.lineWrapping||(r.iter(s,i.line+e.text.length,(function(t){var e=oa(t);e>n.maxLineLength&&(n.maxLine=t,n.maxLineLength=e,n.maxLineChanged=!0,l=!1)})),l&&(t.curOp.updateMaxLine=!0)),Le(r,i.line),Tn(t,400);var c=e.text.length-(o.line-i.line)-1;e.full?Dr(t):i.line!=o.line||1!=e.text.length||vi(t.doc,e)?Dr(t,i.line,o.line+1,c):jr(t,i.line,"text");var h=zt(t,"changes"),u=zt(t,"change");if(u||h){var d={from:i,to:o,text:e.text,removed:e.removed,origin:e.origin};u&&La(t,"change",t,d),h&&(t.curOp.changeObjs||(t.curOp.changeObjs=[])).push(d)}t.display.selForContextMenu=null}function ro(t,e,a,r,n){var i;r||(r=a),oe(r,a)<0&&(a=(i=[r,a])[0],r=i[1]),"string"==typeof e&&(e=t.splitLines(e)),Zi(t,{from:a,to:r,text:e,origin:n})}function no(t,e,a,r){a<t.line?t.line+=r:e<t.line&&(t.line=e,t.ch=0)}function io(t,e,a,r){for(var n=0;n<t.length;++n){var i=t[n],o=!0;if(i.ranges){i.copied||((i=t[n]=i.deepCopy()).copied=!0);for(var l=0;l<i.ranges.length;l++)no(i.ranges[l].anchor,e,a,r),no(i.ranges[l].head,e,a,r)}else{for(var s=0;s<i.changes.length;++s){var c=i.changes[s];if(a<c.from.line)c.from=ie(c.from.line+r,c.from.ch),c.to=ie(c.to.line+r,c.to.ch);else if(e<=c.to.line){o=!1;break}}o||(t.splice(0,n+1),n=0)}}}function oo(t,e){var a=e.from.line,r=e.to.line,n=e.text.length-(r-a)-1;io(t.done,a,r,n),io(t.undone,a,r,n)}function lo(t,e,a,r){var n=e,i=e;return"number"==typeof e?i=Zt(t,ue(t,e)):n=ee(e),null==n?null:(r(i,n)&&t.cm&&jr(t.cm,n,a),i)}function so(t){this.lines=t,this.parent=null;for(var e=0,a=0;a<t.length;++a)t[a].parent=this,e+=t[a].height;this.height=e}function co(t){this.children=t;for(var e=0,a=0,r=0;r<t.length;++r){var n=t[r];e+=n.chunkSize(),a+=n.height,n.parent=this}this.size=e,this.height=a,this.parent=null}ii.prototype.from=function(){return he(this.anchor,this.head)},ii.prototype.to=function(){return ce(this.anchor,this.head)},ii.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},so.prototype={chunkSize:function(){return this.lines.length},removeInner:function(t,e){for(var a=t,r=t+e;a<r;++a){var n=this.lines[a];this.height-=n.height,ha(n),La(n,"delete")}this.lines.splice(t,e)},collapse:function(t){t.push.apply(t,this.lines)},insertInner:function(t,e,a){this.height+=a,this.lines=this.lines.slice(0,t).concat(e).concat(this.lines.slice(t));for(var r=0;r<e.length;++r)e[r].parent=this},iterN:function(t,e,a){for(var r=t+e;t<r;++t)if(a(this.lines[t]))return!0}},co.prototype={chunkSize:function(){return this.size},removeInner:function(t,e){this.size-=e;for(var a=0;a<this.children.length;++a){var r=this.children[a],n=r.chunkSize();if(t<n){var i=Math.min(e,n-t),o=r.height;if(r.removeInner(t,i),this.height-=o-r.height,n==i&&(this.children.splice(a--,1),r.parent=null),0==(e-=i))break;t=0}else t-=n}if(this.size-e<25&&(this.children.length>1||!(this.children[0]instanceof so))){var l=[];this.collapse(l),this.children=[new so(l)],this.children[0].parent=this}},collapse:function(t){for(var e=0;e<this.children.length;++e)this.children[e].collapse(t)},insertInner:function(t,e,a){this.size+=e.length,this.height+=a;for(var r=0;r<this.children.length;++r){var n=this.children[r],i=n.chunkSize();if(t<=i){if(n.insertInner(t,e,a),n.lines&&n.lines.length>50){for(var o=n.lines.length%25+25,l=o;l<n.lines.length;){var s=new so(n.lines.slice(l,l+=25));n.height-=s.height,this.children.splice(++r,0,s),s.parent=this}n.lines=n.lines.slice(0,o),this.maybeSpill()}break}t-=i}},maybeSpill:function(){if(!(this.children.length<=10)){var t=this;do{var e=new co(t.children.splice(t.children.length-5,5));if(t.parent){t.size-=e.size,t.height-=e.height;var a=P(t.parent.children,t);t.parent.children.splice(a+1,0,e)}else{var r=new co(t.children);r.parent=t,t.children=[r,e],t=r}e.parent=t.parent}while(t.children.length>10);t.parent.maybeSpill()}},iterN:function(t,e,a){for(var r=0;r<this.children.length;++r){var n=this.children[r],i=n.chunkSize();if(t<i){var o=Math.min(e,i-t);if(n.iterN(t,o,a))return!0;if(0==(e-=o))break;t=0}else t-=i}}};var ho=function(t,e,a){if(a)for(var r in a)a.hasOwnProperty(r)&&(this[r]=a[r]);this.doc=t,this.node=e};function uo(t,e,a){ia(e)<(t.curOp&&t.curOp.scrollTop||t.doc.scrollTop)&&on(t,a)}function po(t,e,a,r){var n=new ho(t,a,r),i=t.cm;return i&&n.noHScroll&&(i.display.alignWidgets=!0),lo(t,e,"widget",(function(e){var a=e.widgets||(e.widgets=[]);if(null==n.insertAt?a.push(n):a.splice(Math.min(a.length,Math.max(0,n.insertAt)),0,n),n.line=e,i&&!ra(t,e)){var r=ia(e)<t.scrollTop;te(e,e.height+Na(n)),r&&on(i,n.height),i.curOp.forceUpdate=!0}return!0})),i&&La(i,"lineWidgetAdded",i,n,"number"==typeof e?e:ee(e)),n}ho.prototype.clear=function(){var t=this.doc.cm,e=this.line.widgets,a=this.line,r=ee(a);if(null!=r&&e){for(var n=0;n<e.length;++n)e[n]==this&&e.splice(n--,1);e.length||(a.widgets=null);var i=Na(this);te(a,Math.max(0,a.height-i)),t&&(Cn(t,(function(){uo(t,a,-i),jr(t,r,"widget")})),La(t,"lineWidgetCleared",t,this,r))}},ho.prototype.changed=function(){var t=this,e=this.height,a=this.doc.cm,r=this.line;this.height=null;var n=Na(this)-e;n&&(ra(this.doc,r)||te(r,r.height+n),a&&Cn(a,(function(){a.curOp.forceUpdate=!0,uo(a,r,n),La(a,"lineWidgetChanged",a,t,ee(r))})))},xt(ho);var mo=0,vo=function(t,e){this.lines=[],this.type=e,this.doc=t,this.id=++mo};function fo(t,e,a,r,n){if(r&&r.shared)return go(t,e,a,r,n);if(t.cm&&!t.cm.curOp)return Sn(t.cm,fo)(t,e,a,r,n);var i=new vo(t,n),o=oe(e,a);if(r&&j(r,i,!1),o>0||0==o&&!1!==i.clearWhenEmpty)return i;if(i.replacedWith&&(i.collapsed=!0,i.widgetNode=k("span",[i.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||i.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(i.widgetNode.insertLeft=!0)),i.collapsed){if(Ze(t,e.line,e,a,i)||e.line!=a.line&&Ze(t,a.line,e,a,i))throw new Error("Inserting collapsed marker partially overlapping an existing one");Se()}i.addToHistory&&Ai(t,{from:e,to:a,origin:"markText"},t.sel,NaN);var l,s=e.line,c=t.cm;if(t.iter(s,a.line+1,(function(t){c&&i.collapsed&&!c.options.lineWrapping&&Xe(t)==c.display.maxLine&&(l=!0),i.collapsed&&s!=e.line&&te(t,0),De(t,new Ee(i,s==e.line?e.ch:null,s==a.line?a.ch:null)),++s})),i.collapsed&&t.iter(e.line,a.line+1,(function(e){ra(t,e)&&te(e,0)})),i.clearOnEnter&&mt(i,"beforeCursorEnter",(function(){return i.clear()})),i.readOnly&&(Ce(),(t.history.done.length||t.history.undone.length)&&t.clearHistory()),i.collapsed&&(i.id=++mo,i.atomic=!0),c){if(l&&(c.curOp.updateMaxLine=!0),i.collapsed)Dr(c,e.line,a.line+1);else if(i.className||i.startStyle||i.endStyle||i.css||i.attributes||i.title)for(var h=e.line;h<=a.line;h++)jr(c,h,"text");i.atomic&&Ui(c.doc),La(c,"markerAdded",c,i)}return i}vo.prototype.clear=function(){if(!this.explicitlyCleared){var t=this.doc.cm,e=t&&!t.curOp;if(e&&Mn(t),zt(this,"clear")){var a=this.find();a&&La(this,"clear",a.from,a.to)}for(var r=null,n=null,i=0;i<this.lines.length;++i){var o=this.lines[i],l=Oe(o.markedSpans,this);t&&!this.collapsed?jr(t,ee(o),"text"):t&&(null!=l.to&&(n=ee(o)),null!=l.from&&(r=ee(o))),o.markedSpans=Te(o.markedSpans,l),null==l.from&&this.collapsed&&!ra(this.doc,o)&&t&&te(o,Lr(t.display))}if(t&&this.collapsed&&!t.options.lineWrapping)for(var s=0;s<this.lines.length;++s){var c=Xe(this.lines[s]),h=oa(c);h>t.display.maxLineLength&&(t.display.maxLine=c,t.display.maxLineLength=h,t.display.maxLineChanged=!0)}null!=r&&t&&this.collapsed&&Dr(t,r,n+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&Ui(t.doc)),t&&La(t,"markerCleared",t,this,r,n),e&&_n(t),this.parent&&this.parent.clear()}},vo.prototype.find=function(t,e){var a,r;null==t&&"bookmark"==this.type&&(t=1);for(var n=0;n<this.lines.length;++n){var i=this.lines[n],o=Oe(i.markedSpans,this);if(null!=o.from&&(a=ie(e?i:ee(i),o.from),-1==t))return a;if(null!=o.to&&(r=ie(e?i:ee(i),o.to),1==t))return r}return a&&{from:a,to:r}},vo.prototype.changed=function(){var t=this,e=this.find(-1,!0),a=this,r=this.doc.cm;e&&r&&Cn(r,(function(){var n=e.line,i=ee(e.line),o=tr(r,i);if(o&&(cr(o),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!ra(a.doc,n)&&null!=a.height){var l=a.height;a.height=null;var s=Na(a)-l;s&&te(n,n.height+s)}La(r,"markerChanged",r,t)}))},vo.prototype.attachLine=function(t){if(!this.lines.length&&this.doc.cm){var e=this.doc.cm.curOp;e.maybeHiddenMarkers&&-1!=P(e.maybeHiddenMarkers,this)||(e.maybeUnhiddenMarkers||(e.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(t)},vo.prototype.detachLine=function(t){if(this.lines.splice(P(this.lines,t),1),!this.lines.length&&this.doc.cm){var e=this.doc.cm.curOp;(e.maybeHiddenMarkers||(e.maybeHiddenMarkers=[])).push(this)}},xt(vo);var yo=function(t,e){this.markers=t,this.primary=e;for(var a=0;a<t.length;++a)t[a].parent=this};function go(t,e,a,r,n){(r=j(r)).shared=!1;var i=[fo(t,e,a,r,n)],o=i[0],l=r.widgetNode;return yi(t,(function(t){l&&(r.widgetNode=l.cloneNode(!0)),i.push(fo(t,de(t,e),de(t,a),r,n));for(var s=0;s<t.linked.length;++s)if(t.linked[s].isParent)return;o=K(i)})),new yo(i,o)}function bo(t){return t.findMarks(ie(t.first,0),t.clipPos(ie(t.lastLine())),(function(t){return t.parent}))}function zo(t,e){for(var a=0;a<e.length;a++){var r=e[a],n=r.find(),i=t.clipPos(n.from),o=t.clipPos(n.to);if(oe(i,o)){var l=fo(t,i,o,r.primary,r.primary.type);r.markers.push(l),l.parent=r}}}function xo(t){for(var e=function(e){var a=t[e],r=[a.primary.doc];yi(a.primary.doc,(function(t){return r.push(t)}));for(var n=0;n<a.markers.length;n++){var i=a.markers[n];-1==P(r,i.doc)&&(i.parent=null,a.markers.splice(n--,1))}},a=0;a<t.length;a++)e(a)}yo.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var t=0;t<this.markers.length;++t)this.markers[t].clear();La(this,"clear")}},yo.prototype.find=function(t,e){return this.primary.find(t,e)},xt(yo);var wo=0,Mo=function(t,e,a,r,n){if(!(this instanceof Mo))return new Mo(t,e,a,r,n);null==a&&(a=0),co.call(this,[new so([new sa("",null)])]),this.first=a,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=a;var i=ie(a,0);this.sel=li(i),this.history=new xi(null),this.id=++wo,this.modeOption=e,this.lineSep=r,this.direction="rtl"==n?"rtl":"ltr",this.extend=!1,"string"==typeof t&&(t=this.splitLines(t)),fi(this,{from:i,to:i,text:t}),Ri(this,li(i),$)};Mo.prototype=Q(co.prototype,{constructor:Mo,iter:function(t,e,a){a?this.iterN(t-this.first,e-t,a):this.iterN(this.first,this.first+this.size,t)},insert:function(t,e){for(var a=0,r=0;r<e.length;++r)a+=e[r].height;this.insertInner(t-this.first,e,a)},remove:function(t,e){this.removeInner(t-this.first,e)},getValue:function(t){var e=Qt(this,this.first,this.first+this.size);return!1===t?e:e.join(t||this.lineSeparator())},setValue:On((function(t){var e=ie(this.first,0),a=this.first+this.size-1;Zi(this,{from:e,to:ie(a,Zt(this,a).text.length),text:this.splitLines(t),origin:"setValue",full:!0},!0),this.cm&&sn(this.cm,0,0),Ri(this,li(e),$)})),replaceRange:function(t,e,a,r){ro(this,t,e=de(this,e),a=a?de(this,a):e,r)},getRange:function(t,e,a){var r=Xt(this,de(this,t),de(this,e));return!1===a?r:r.join(a||this.lineSeparator())},getLine:function(t){var e=this.getLineHandle(t);return e&&e.text},getLineHandle:function(t){if(re(this,t))return Zt(this,t)},getLineNumber:function(t){return ee(t)},getLineHandleVisualStart:function(t){return"number"==typeof t&&(t=Zt(this,t)),Xe(t)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(t){return de(this,t)},getCursor:function(t){var e=this.sel.primary();return null==t||"head"==t?e.head:"anchor"==t?e.anchor:"end"==t||"to"==t||!1===t?e.to():e.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:On((function(t,e,a){Fi(this,de(this,"number"==typeof t?ie(t,e||0):t),null,a)})),setSelection:On((function(t,e,a){Fi(this,de(this,t),de(this,e||t),a)})),extendSelection:On((function(t,e,a){Ti(this,de(this,t),e&&de(this,e),a)})),extendSelections:On((function(t,e){Di(this,me(this,t),e)})),extendSelectionsBy:On((function(t,e){Di(this,me(this,J(this.sel.ranges,t)),e)})),setSelections:On((function(t,e,a){if(t.length){for(var r=[],n=0;n<t.length;n++)r[n]=new ii(de(this,t[n].anchor),de(this,t[n].head||t[n].anchor));null==e&&(e=Math.min(t.length-1,this.sel.primIndex)),Ri(this,oi(this.cm,r,e),a)}})),addSelection:On((function(t,e,a){var r=this.sel.ranges.slice(0);r.push(new ii(de(this,t),de(this,e||t))),Ri(this,oi(this.cm,r,r.length-1),a)})),getSelection:function(t){for(var e,a=this.sel.ranges,r=0;r<a.length;r++){var n=Xt(this,a[r].from(),a[r].to());e=e?e.concat(n):n}return!1===t?e:e.join(t||this.lineSeparator())},getSelections:function(t){for(var e=[],a=this.sel.ranges,r=0;r<a.length;r++){var n=Xt(this,a[r].from(),a[r].to());!1!==t&&(n=n.join(t||this.lineSeparator())),e[r]=n}return e},replaceSelection:function(t,e,a){for(var r=[],n=0;n<this.sel.ranges.length;n++)r[n]=t;this.replaceSelections(r,e,a||"+input")},replaceSelections:On((function(t,e,a){for(var r=[],n=this.sel,i=0;i<n.ranges.length;i++){var o=n.ranges[i];r[i]={from:o.from(),to:o.to(),text:this.splitLines(t[i]),origin:a}}for(var l=e&&"end"!=e&&di(this,r,e),s=r.length-1;s>=0;s--)Zi(this,r[s]);l?Pi(this,l):this.cm&&ln(this.cm)})),undo:On((function(){Qi(this,"undo")})),redo:On((function(){Qi(this,"redo")})),undoSelection:On((function(){Qi(this,"undo",!0)})),redoSelection:On((function(){Qi(this,"redo",!0)})),setExtending:function(t){this.extend=t},getExtending:function(){return this.extend},historySize:function(){for(var t=this.history,e=0,a=0,r=0;r<t.done.length;r++)t.done[r].ranges||++e;for(var n=0;n<t.undone.length;n++)t.undone[n].ranges||++a;return{undo:e,redo:a}},clearHistory:function(){var t=this;this.history=new xi(this.history),yi(this,(function(e){return e.history=t.history}),!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(t){return t&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(t){return this.history.generation==(t||this.cleanGeneration)},getHistory:function(){return{done:Ei(this.history.done),undone:Ei(this.history.undone)}},setHistory:function(t){var e=this.history=new xi(this.history);e.done=Ei(t.done.slice(0),null,!0),e.undone=Ei(t.undone.slice(0),null,!0)},setGutterMarker:On((function(t,e,a){return lo(this,t,"gutter",(function(t){var r=t.gutterMarkers||(t.gutterMarkers={});return r[e]=a,!a&&rt(r)&&(t.gutterMarkers=null),!0}))})),clearGutter:On((function(t){var e=this;this.iter((function(a){a.gutterMarkers&&a.gutterMarkers[t]&&lo(e,a,"gutter",(function(){return a.gutterMarkers[t]=null,rt(a.gutterMarkers)&&(a.gutterMarkers=null),!0}))}))})),lineInfo:function(t){var e;if("number"==typeof t){if(!re(this,t))return null;if(e=t,!(t=Zt(this,t)))return null}else if(null==(e=ee(t)))return null;return{line:e,handle:t,text:t.text,gutterMarkers:t.gutterMarkers,textClass:t.textClass,bgClass:t.bgClass,wrapClass:t.wrapClass,widgets:t.widgets}},addLineClass:On((function(t,e,a){return lo(this,t,"gutter"==e?"gutter":"class",(function(t){var r="text"==e?"textClass":"background"==e?"bgClass":"gutter"==e?"gutterClass":"wrapClass";if(t[r]){if(_(a).test(t[r]))return!1;t[r]+=" "+a}else t[r]=a;return!0}))})),removeLineClass:On((function(t,e,a){return lo(this,t,"gutter"==e?"gutter":"class",(function(t){var r="text"==e?"textClass":"background"==e?"bgClass":"gutter"==e?"gutterClass":"wrapClass",n=t[r];if(!n)return!1;if(null==a)t[r]=null;else{var i=n.match(_(a));if(!i)return!1;var o=i.index+i[0].length;t[r]=n.slice(0,i.index)+(i.index&&o!=n.length?" ":"")+n.slice(o)||null}return!0}))})),addLineWidget:On((function(t,e,a){return po(this,t,e,a)})),removeLineWidget:function(t){t.clear()},markText:function(t,e,a){return fo(this,de(this,t),de(this,e),a,a&&a.type||"range")},setBookmark:function(t,e){var a={replacedWith:e&&(null==e.nodeType?e.widget:e),insertLeft:e&&e.insertLeft,clearWhenEmpty:!1,shared:e&&e.shared,handleMouseEvents:e&&e.handleMouseEvents};return fo(this,t=de(this,t),t,a,"bookmark")},findMarksAt:function(t){var e=[],a=Zt(this,(t=de(this,t)).line).markedSpans;if(a)for(var r=0;r<a.length;++r){var n=a[r];(null==n.from||n.from<=t.ch)&&(null==n.to||n.to>=t.ch)&&e.push(n.marker.parent||n.marker)}return e},findMarks:function(t,e,a){t=de(this,t),e=de(this,e);var r=[],n=t.line;return this.iter(t.line,e.line+1,(function(i){var o=i.markedSpans;if(o)for(var l=0;l<o.length;l++){var s=o[l];null!=s.to&&n==t.line&&t.ch>=s.to||null==s.from&&n!=t.line||null!=s.from&&n==e.line&&s.from>=e.ch||a&&!a(s.marker)||r.push(s.marker.parent||s.marker)}++n})),r},getAllMarks:function(){var t=[];return this.iter((function(e){var a=e.markedSpans;if(a)for(var r=0;r<a.length;++r)null!=a[r].from&&t.push(a[r].marker)})),t},posFromIndex:function(t){var e,a=this.first,r=this.lineSeparator().length;return this.iter((function(n){var i=n.text.length+r;if(i>t)return e=t,!0;t-=i,++a})),de(this,ie(a,e))},indexFromPos:function(t){var e=(t=de(this,t)).ch;if(t.line<this.first||t.ch<0)return 0;var a=this.lineSeparator().length;return this.iter(this.first,t.line,(function(t){e+=t.text.length+a})),e},copy:function(t){var e=new Mo(Qt(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return e.scrollTop=this.scrollTop,e.scrollLeft=this.scrollLeft,e.sel=this.sel,e.extend=!1,t&&(e.history.undoDepth=this.history.undoDepth,e.setHistory(this.getHistory())),e},linkedDoc:function(t){t||(t={});var e=this.first,a=this.first+this.size;null!=t.from&&t.from>e&&(e=t.from),null!=t.to&&t.to<a&&(a=t.to);var r=new Mo(Qt(this,e,a),t.mode||this.modeOption,e,this.lineSep,this.direction);return t.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:t.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:t.sharedHist}],zo(r,bo(this)),r},unlinkDoc:function(t){if(t instanceof jl&&(t=t.doc),this.linked)for(var e=0;e<this.linked.length;++e)if(this.linked[e].doc==t){this.linked.splice(e,1),t.unlinkDoc(this),xo(bo(this));break}if(t.history==this.history){var a=[t.id];yi(t,(function(t){return a.push(t.id)}),!0),t.history=new xi(null),t.history.done=Ei(this.history.done,a),t.history.undone=Ei(this.history.undone,a)}},iterLinkedDocs:function(t){yi(this,t)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(t){return this.lineSep?t.split(this.lineSep):Ot(t)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:On((function(t){"rtl"!=t&&(t="ltr"),t!=this.direction&&(this.direction=t,this.iter((function(t){return t.order=null})),this.cm&&zi(this.cm))}))}),Mo.prototype.eachLine=Mo.prototype.iter;var _o=0;function Ao(t){var e=this;if(Lo(e),!gt(e,t)&&!$a(e.display,t)){wt(t),o&&(_o=+new Date);var a=Or(e,t,!0),r=t.dataTransfer.files;if(a&&!e.isReadOnly())if(r&&r.length&&window.FileReader&&window.File)for(var n=r.length,i=Array(n),l=0,s=function(){++l==n&&Sn(e,(function(){var t={from:a=de(e.doc,a),to:a,text:e.doc.splitLines(i.filter((function(t){return null!=t})).join(e.doc.lineSeparator())),origin:"paste"};Zi(e.doc,t),Pi(e.doc,li(de(e.doc,a),de(e.doc,si(t))))}))()},c=function(t,a){if(e.options.allowDropFileTypes&&-1==P(e.options.allowDropFileTypes,t.type))s();else{var r=new FileReader;r.onerror=function(){return s()},r.onload=function(){var t=r.result;/[\x00-\x08\x0e-\x1f]{2}/.test(t)||(i[a]=t),s()},r.readAsText(t)}},h=0;h<r.length;h++)c(r[h],h);else{if(e.state.draggingText&&e.doc.sel.contains(a)>-1)return e.state.draggingText(t),void setTimeout((function(){return e.display.input.focus()}),20);try{var u=t.dataTransfer.getData("Text");if(u){var d;if(e.state.draggingText&&!e.state.draggingText.copy&&(d=e.listSelections()),Ni(e.doc,li(a,a)),d)for(var p=0;p<d.length;++p)ro(e.doc,"",d[p].anchor,d[p].head,"drag");e.replaceSelection(u,"around","paste"),e.display.input.focus()}}catch(m){}}}}function Ho(t,e){if(o&&(!t.state.draggingText||+new Date-_o<100))At(e);else if(!gt(t,e)&&!$a(t.display,e)&&(e.dataTransfer.setData("Text",t.getSelection()),e.dataTransfer.effectAllowed="copyMove",e.dataTransfer.setDragImage&&!d)){var a=B("img",null,null,"position: fixed; left: 0; top: 0;");a.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",u&&(a.width=a.height=1,t.display.wrapper.appendChild(a),a._top=a.offsetTop),e.dataTransfer.setDragImage(a,0,0),u&&a.parentNode.removeChild(a)}}function Vo(t,e){var a=Or(t,e);if(a){var r=document.createDocumentFragment();Ur(t,a,r),t.display.dragCursor||(t.display.dragCursor=B("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),t.display.lineSpace.insertBefore(t.display.dragCursor,t.display.cursorDiv)),L(t.display.dragCursor,r)}}function Lo(t){t.display.dragCursor&&(t.display.lineSpace.removeChild(t.display.dragCursor),t.display.dragCursor=null)}function Bo(t){if(document.getElementsByClassName){for(var e=document.getElementsByClassName("CodeMirror"),a=[],r=0;r<e.length;r++){var n=e[r].CodeMirror;n&&a.push(n)}a.length&&a[0].operation((function(){for(var e=0;e<a.length;e++)t(a[e])}))}}var ko=!1;function Co(){ko||(So(),ko=!0)}function So(){var t;mt(window,"resize",(function(){null==t&&(t=setTimeout((function(){t=null,Bo(Eo)}),100))})),mt(window,"blur",(function(){return Bo(Zr)}))}function Eo(t){var e=t.display;e.cachedCharWidth=e.cachedTextHeight=e.cachedPaddingH=null,e.scrollbarsClipped=!1,t.setSize()}for(var Oo={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},To=0;To<10;To++)Oo[To+48]=Oo[To+96]=String(To);for(var Do=65;Do<=90;Do++)Oo[Do]=String.fromCharCode(Do);for(var jo=1;jo<=12;jo++)Oo[jo+111]=Oo[jo+63235]="F"+jo;var Fo={};function Io(t){var e,a,r,n,i=t.split(/-(?!$)/);t=i[i.length-1];for(var o=0;o<i.length-1;o++){var l=i[o];if(/^(cmd|meta|m)$/i.test(l))n=!0;else if(/^a(lt)?$/i.test(l))e=!0;else if(/^(c|ctrl|control)$/i.test(l))a=!0;else{if(!/^s(hift)?$/i.test(l))throw new Error("Unrecognized modifier name: "+l);r=!0}}return e&&(t="Alt-"+t),a&&(t="Ctrl-"+t),n&&(t="Cmd-"+t),r&&(t="Shift-"+t),t}function Po(t){var e={};for(var a in t)if(t.hasOwnProperty(a)){var r=t[a];if(/^(name|fallthrough|(de|at)tach)$/.test(a))continue;if("..."==r){delete t[a];continue}for(var n=J(a.split(" "),Io),i=0;i<n.length;i++){var o=void 0,l=void 0;i==n.length-1?(l=n.join(" "),o=r):(l=n.slice(0,i+1).join(" "),o="...");var s=e[l];if(s){if(s!=o)throw new Error("Inconsistent bindings for "+l)}else e[l]=o}delete t[a]}for(var c in e)t[c]=e[c];return t}function Ro(t,e,a,r){var n=(e=Wo(e)).call?e.call(t,r):e[t];if(!1===n)return"nothing";if("..."===n)return"multi";if(null!=n&&a(n))return"handled";if(e.fallthrough){if("[object Array]"!=Object.prototype.toString.call(e.fallthrough))return Ro(t,e.fallthrough,a,r);for(var i=0;i<e.fallthrough.length;i++){var o=Ro(t,e.fallthrough[i],a,r);if(o)return o}}}function No(t){var e="string"==typeof t?t:Oo[t.keyCode];return"Ctrl"==e||"Alt"==e||"Shift"==e||"Mod"==e}function $o(t,e,a){var r=t;return e.altKey&&"Alt"!=r&&(t="Alt-"+t),(w?e.metaKey:e.ctrlKey)&&"Ctrl"!=r&&(t="Ctrl-"+t),(w?e.ctrlKey:e.metaKey)&&"Mod"!=r&&(t="Cmd-"+t),!a&&e.shiftKey&&"Shift"!=r&&(t="Shift-"+t),t}function Uo(t,e){if(u&&34==t.keyCode&&t.char)return!1;var a=Oo[t.keyCode];return null!=a&&!t.altGraphKey&&(3==t.keyCode&&t.code&&(a=t.code),$o(a,t,e))}function Wo(t){return"string"==typeof t?Fo[t]:t}function qo(t,e){for(var a=t.doc.sel.ranges,r=[],n=0;n<a.length;n++){for(var i=e(a[n]);r.length&&oe(i.from,K(r).to)<=0;){var o=r.pop();if(oe(o.from,i.from)<0){i.from=o.from;break}}r.push(i)}Cn(t,(function(){for(var e=r.length-1;e>=0;e--)ro(t.doc,"",r[e].from,r[e].to,"+delete");ln(t)}))}function Go(t,e,a){var r=ot(t.text,e+a,a);return r<0||r>t.text.length?null:r}function Yo(t,e,a){var r=Go(t,e.ch,a);return null==r?null:new ie(e.line,r,a<0?"after":"before")}function Ko(t,e,a,r,n){if(t){"rtl"==e.doc.direction&&(n=-n);var i=dt(a,e.doc.direction);if(i){var o,l=n<0?K(i):i[0],s=n<0==(1==l.level)?"after":"before";if(l.level>0||"rtl"==e.doc.direction){var c=er(e,a);o=n<0?a.text.length-1:0;var h=ar(e,c,o).top;o=lt((function(t){return ar(e,c,t).top==h}),n<0==(1==l.level)?l.from:l.to-1,o),"before"==s&&(o=Go(a,o,1))}else o=n<0?l.to:l.from;return new ie(r,o,s)}}return new ie(r,n<0?a.text.length:0,n<0?"before":"after")}function Jo(t,e,a,r){var n=dt(e,t.doc.direction);if(!n)return Yo(e,a,r);a.ch>=e.text.length?(a.ch=e.text.length,a.sticky="before"):a.ch<=0&&(a.ch=0,a.sticky="after");var i=ht(n,a.ch,a.sticky),o=n[i];if("ltr"==t.doc.direction&&o.level%2==0&&(r>0?o.to>a.ch:o.from<a.ch))return Yo(e,a,r);var l,s=function(t,a){return Go(e,t instanceof ie?t.ch:t,a)},c=function(a){return t.options.lineWrapping?(l=l||er(t,e),Mr(t,e,l,a)):{begin:0,end:e.text.length}},h=c("before"==a.sticky?s(a,-1):a.ch);if("rtl"==t.doc.direction||1==o.level){var u=1==o.level==r<0,d=s(a,u?1:-1);if(null!=d&&(u?d<=o.to&&d<=h.end:d>=o.from&&d>=h.begin)){var p=u?"before":"after";return new ie(a.line,d,p)}}var m=function(t,e,r){for(var i=function(t,e){return e?new ie(a.line,s(t,1),"before"):new ie(a.line,t,"after")};t>=0&&t<n.length;t+=e){var o=n[t],l=e>0==(1!=o.level),c=l?r.begin:s(r.end,-1);if(o.from<=c&&c<o.to)return i(c,l);if(c=l?o.from:s(o.to,-1),r.begin<=c&&c<r.end)return i(c,l)}},v=m(i+r,r,h);if(v)return v;var f=r>0?h.end:s(h.begin,-1);return null==f||r>0&&f==e.text.length||!(v=m(r>0?0:n.length-1,r,c(f)))?null:v}Fo.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Fo.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Fo.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Fo.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Fo.default=g?Fo.macDefault:Fo.pcDefault;var Zo={selectAll:Ki,singleSelection:function(t){return t.setSelection(t.getCursor("anchor"),t.getCursor("head"),$)},killLine:function(t){return qo(t,(function(e){if(e.empty()){var a=Zt(t.doc,e.head.line).text.length;return e.head.ch==a&&e.head.line<t.lastLine()?{from:e.head,to:ie(e.head.line+1,0)}:{from:e.head,to:ie(e.head.line,a)}}return{from:e.from(),to:e.to()}}))},deleteLine:function(t){return qo(t,(function(e){return{from:ie(e.from().line,0),to:de(t.doc,ie(e.to().line+1,0))}}))},delLineLeft:function(t){return qo(t,(function(t){return{from:ie(t.from().line,0),to:t.from()}}))},delWrappedLineLeft:function(t){return qo(t,(function(e){var a=t.charCoords(e.head,"div").top+5;return{from:t.coordsChar({left:0,top:a},"div"),to:e.from()}}))},delWrappedLineRight:function(t){return qo(t,(function(e){var a=t.charCoords(e.head,"div").top+5,r=t.coordsChar({left:t.display.lineDiv.offsetWidth+100,top:a},"div");return{from:e.from(),to:r}}))},undo:function(t){return t.undo()},redo:function(t){return t.redo()},undoSelection:function(t){return t.undoSelection()},redoSelection:function(t){return t.redoSelection()},goDocStart:function(t){return t.extendSelection(ie(t.firstLine(),0))},goDocEnd:function(t){return t.extendSelection(ie(t.lastLine()))},goLineStart:function(t){return t.extendSelectionsBy((function(e){return Xo(t,e.head.line)}),{origin:"+move",bias:1})},goLineStartSmart:function(t){return t.extendSelectionsBy((function(e){return tl(t,e.head)}),{origin:"+move",bias:1})},goLineEnd:function(t){return t.extendSelectionsBy((function(e){return Qo(t,e.head.line)}),{origin:"+move",bias:-1})},goLineRight:function(t){return t.extendSelectionsBy((function(e){var a=t.cursorCoords(e.head,"div").top+5;return t.coordsChar({left:t.display.lineDiv.offsetWidth+100,top:a},"div")}),W)},goLineLeft:function(t){return t.extendSelectionsBy((function(e){var a=t.cursorCoords(e.head,"div").top+5;return t.coordsChar({left:0,top:a},"div")}),W)},goLineLeftSmart:function(t){return t.extendSelectionsBy((function(e){var a=t.cursorCoords(e.head,"div").top+5,r=t.coordsChar({left:0,top:a},"div");return r.ch<t.getLine(r.line).search(/\S/)?tl(t,e.head):r}),W)},goLineUp:function(t){return t.moveV(-1,"line")},goLineDown:function(t){return t.moveV(1,"line")},goPageUp:function(t){return t.moveV(-1,"page")},goPageDown:function(t){return t.moveV(1,"page")},goCharLeft:function(t){return t.moveH(-1,"char")},goCharRight:function(t){return t.moveH(1,"char")},goColumnLeft:function(t){return t.moveH(-1,"column")},goColumnRight:function(t){return t.moveH(1,"column")},goWordLeft:function(t){return t.moveH(-1,"word")},goGroupRight:function(t){return t.moveH(1,"group")},goGroupLeft:function(t){return t.moveH(-1,"group")},goWordRight:function(t){return t.moveH(1,"word")},delCharBefore:function(t){return t.deleteH(-1,"codepoint")},delCharAfter:function(t){return t.deleteH(1,"char")},delWordBefore:function(t){return t.deleteH(-1,"word")},delWordAfter:function(t){return t.deleteH(1,"word")},delGroupBefore:function(t){return t.deleteH(-1,"group")},delGroupAfter:function(t){return t.deleteH(1,"group")},indentAuto:function(t){return t.indentSelection("smart")},indentMore:function(t){return t.indentSelection("add")},indentLess:function(t){return t.indentSelection("subtract")},insertTab:function(t){return t.replaceSelection("\t")},insertSoftTab:function(t){for(var e=[],a=t.listSelections(),r=t.options.tabSize,n=0;n<a.length;n++){var i=a[n].from(),o=F(t.getLine(i.line),i.ch,r);e.push(Y(r-o%r))}t.replaceSelections(e)},defaultTab:function(t){t.somethingSelected()?t.indentSelection("add"):t.execCommand("insertTab")},transposeChars:function(t){return Cn(t,(function(){for(var e=t.listSelections(),a=[],r=0;r<e.length;r++)if(e[r].empty()){var n=e[r].head,i=Zt(t.doc,n.line).text;if(i)if(n.ch==i.length&&(n=new ie(n.line,n.ch-1)),n.ch>0)n=new ie(n.line,n.ch+1),t.replaceRange(i.charAt(n.ch-1)+i.charAt(n.ch-2),ie(n.line,n.ch-2),n,"+transpose");else if(n.line>t.doc.first){var o=Zt(t.doc,n.line-1).text;o&&(n=new ie(n.line,1),t.replaceRange(i.charAt(0)+t.doc.lineSeparator()+o.charAt(o.length-1),ie(n.line-1,o.length-1),n,"+transpose"))}a.push(new ii(n,n))}t.setSelections(a)}))},newlineAndIndent:function(t){return Cn(t,(function(){for(var e=t.listSelections(),a=e.length-1;a>=0;a--)t.replaceRange(t.doc.lineSeparator(),e[a].anchor,e[a].head,"+input");e=t.listSelections();for(var r=0;r<e.length;r++)t.indentLine(e[r].from().line,null,!0);ln(t)}))},openLine:function(t){return t.replaceSelection("\n","start")},toggleOverwrite:function(t){return t.toggleOverwrite()}};function Xo(t,e){var a=Zt(t.doc,e),r=Xe(a);return r!=a&&(e=ee(r)),Ko(!0,t,r,e,1)}function Qo(t,e){var a=Zt(t.doc,e),r=Qe(a);return r!=a&&(e=ee(r)),Ko(!0,t,a,e,-1)}function tl(t,e){var a=Xo(t,e.line),r=Zt(t.doc,a.line),n=dt(r,t.doc.direction);if(!n||0==n[0].level){var i=Math.max(a.ch,r.text.search(/\S/)),o=e.line==a.line&&e.ch<=i&&e.ch;return ie(a.line,o?0:i,a.sticky)}return a}function el(t,e,a){if("string"==typeof e&&!(e=Zo[e]))return!1;t.display.input.ensurePolled();var r=t.display.shift,n=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),a&&(t.display.shift=!1),n=e(t)!=N}finally{t.display.shift=r,t.state.suppressEdits=!1}return n}function al(t,e,a){for(var r=0;r<t.state.keyMaps.length;r++){var n=Ro(e,t.state.keyMaps[r],a,t);if(n)return n}return t.options.extraKeys&&Ro(e,t.options.extraKeys,a,t)||Ro(e,t.options.keyMap,a,t)}var rl=new I;function nl(t,e,a,r){var n=t.state.keySeq;if(n){if(No(e))return"handled";if(/\'$/.test(e)?t.state.keySeq=null:rl.set(50,(function(){t.state.keySeq==n&&(t.state.keySeq=null,t.display.input.reset())})),il(t,n+" "+e,a,r))return!0}return il(t,e,a,r)}function il(t,e,a,r){var n=al(t,e,r);return"multi"==n&&(t.state.keySeq=e),"handled"==n&&La(t,"keyHandled",t,e,a),"handled"!=n&&"multi"!=n||(wt(a),Gr(t)),!!n}function ol(t,e){var a=Uo(e,!0);return!!a&&(e.shiftKey&&!t.state.keySeq?nl(t,"Shift-"+a,e,(function(e){return el(t,e,!0)}))||nl(t,a,e,(function(e){if("string"==typeof e?/^go[A-Z]/.test(e):e.motion)return el(t,e)})):nl(t,a,e,(function(e){return el(t,e)})))}function ll(t,e,a){return nl(t,"'"+a+"'",e,(function(e){return el(t,e,!0)}))}var sl=null;function cl(t){var e=this;if(!(t.target&&t.target!=e.display.input.getField()||(e.curOp.focus=S(),gt(e,t)))){o&&l<11&&27==t.keyCode&&(t.returnValue=!1);var r=t.keyCode;e.display.shift=16==r||t.shiftKey;var n=ol(e,t);u&&(sl=n?r:null,n||88!=r||Dt||!(g?t.metaKey:t.ctrlKey)||e.replaceSelection("",null,"cut")),a&&!g&&!n&&46==r&&t.shiftKey&&!t.ctrlKey&&document.execCommand&&document.execCommand("cut"),18!=r||/\bCodeMirror-crosshair\b/.test(e.display.lineDiv.className)||hl(e)}}function hl(t){var e=t.display.lineDiv;function a(t){18!=t.keyCode&&t.altKey||(H(e,"CodeMirror-crosshair"),ft(document,"keyup",a),ft(document,"mouseover",a))}E(e,"CodeMirror-crosshair"),mt(document,"keyup",a),mt(document,"mouseover",a)}function ul(t){16==t.keyCode&&(this.doc.sel.shift=!1),gt(this,t)}function dl(t){var e=this;if(!(t.target&&t.target!=e.display.input.getField()||$a(e.display,t)||gt(e,t)||t.ctrlKey&&!t.altKey||g&&t.metaKey)){var a=t.keyCode,r=t.charCode;if(u&&a==sl)return sl=null,void wt(t);if(!u||t.which&&!(t.which<10)||!ol(e,t)){var n=String.fromCharCode(null==r?a:r);"\b"!=n&&(ll(e,t,n)||e.display.input.onKeyPress(t))}}}var pl,ml,vl=400,fl=function(t,e,a){this.time=t,this.pos=e,this.button=a};function yl(t,e){var a=+new Date;return ml&&ml.compare(a,t,e)?(pl=ml=null,"triple"):pl&&pl.compare(a,t,e)?(ml=new fl(a,t,e),pl=null,"double"):(pl=new fl(a,t,e),ml=null,"single")}function gl(t){var e=this,a=e.display;if(!(gt(e,t)||a.activeTouch&&a.input.supportsTouch()))if(a.input.ensurePolled(),a.shift=t.shiftKey,$a(a,t))s||(a.scroller.draggable=!1,setTimeout((function(){return a.scroller.draggable=!0}),100));else if(!Vl(e,t)){var r=Or(e,t),n=Vt(t),i=r?yl(r,n):"single";window.focus(),1==n&&e.state.selectingText&&e.state.selectingText(t),r&&bl(e,n,r,i,t)||(1==n?r?xl(e,r,i,t):Ht(t)==a.scroller&&wt(t):2==n?(r&&Ti(e.doc,r),setTimeout((function(){return a.input.focus()}),20)):3==n&&(M?e.display.input.onContextMenu(t):Kr(e)))}}function bl(t,e,a,r,n){var i="Click";return"double"==r?i="Double"+i:"triple"==r&&(i="Triple"+i),nl(t,$o(i=(1==e?"Left":2==e?"Middle":"Right")+i,n),n,(function(e){if("string"==typeof e&&(e=Zo[e]),!e)return!1;var r=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),r=e(t,a)!=N}finally{t.state.suppressEdits=!1}return r}))}function zl(t,e,a){var r=t.getOption("configureMouse"),n=r?r(t,e,a):{};if(null==n.unit){var i=b?a.shiftKey&&a.metaKey:a.altKey;n.unit=i?"rectangle":"single"==e?"char":"double"==e?"word":"line"}return(null==n.extend||t.doc.extend)&&(n.extend=t.doc.extend||a.shiftKey),null==n.addNew&&(n.addNew=g?a.metaKey:a.ctrlKey),null==n.moveOnDrag&&(n.moveOnDrag=!(g?a.altKey:a.ctrlKey)),n}function xl(t,e,a,r){o?setTimeout(D(Yr,t),0):t.curOp.focus=S();var n,i=zl(t,a,r),l=t.doc.sel;t.options.dragDrop&&kt&&!t.isReadOnly()&&"single"==a&&(n=l.contains(e))>-1&&(oe((n=l.ranges[n]).from(),e)<0||e.xRel>0)&&(oe(n.to(),e)>0||e.xRel<0)?wl(t,r,e,i):_l(t,r,e,i)}function wl(t,e,a,r){var n=t.display,i=!1,c=Sn(t,(function(e){s&&(n.scroller.draggable=!1),t.state.draggingText=!1,t.state.delayingBlurEvent&&(t.hasFocus()?t.state.delayingBlurEvent=!1:Kr(t)),ft(n.wrapper.ownerDocument,"mouseup",c),ft(n.wrapper.ownerDocument,"mousemove",h),ft(n.scroller,"dragstart",u),ft(n.scroller,"drop",c),i||(wt(e),r.addNew||Ti(t.doc,a,null,null,r.extend),s&&!d||o&&9==l?setTimeout((function(){n.wrapper.ownerDocument.body.focus({preventScroll:!0}),n.input.focus()}),20):n.input.focus())})),h=function(t){i=i||Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)>=10},u=function(){return i=!0};s&&(n.scroller.draggable=!0),t.state.draggingText=c,c.copy=!r.moveOnDrag,mt(n.wrapper.ownerDocument,"mouseup",c),mt(n.wrapper.ownerDocument,"mousemove",h),mt(n.scroller,"dragstart",u),mt(n.scroller,"drop",c),t.state.delayingBlurEvent=!0,setTimeout((function(){return n.input.focus()}),20),n.scroller.dragDrop&&n.scroller.dragDrop()}function Ml(t,e,a){if("char"==a)return new ii(e,e);if("word"==a)return t.findWordAt(e);if("line"==a)return new ii(ie(e.line,0),de(t.doc,ie(e.line+1,0)));var r=a(t,e);return new ii(r.from,r.to)}function _l(t,e,a,r){o&&Kr(t);var n=t.display,i=t.doc;wt(e);var l,s,c=i.sel,h=c.ranges;if(r.addNew&&!r.extend?(s=i.sel.contains(a),l=s>-1?h[s]:new ii(a,a)):(l=i.sel.primary(),s=i.sel.primIndex),"rectangle"==r.unit)r.addNew||(l=new ii(a,a)),a=Or(t,e,!0,!0),s=-1;else{var u=Ml(t,a,r.unit);l=r.extend?Oi(l,u.anchor,u.head,r.extend):u}r.addNew?-1==s?(s=h.length,Ri(i,oi(t,h.concat([l]),s),{scroll:!1,origin:"*mouse"})):h.length>1&&h[s].empty()&&"char"==r.unit&&!r.extend?(Ri(i,oi(t,h.slice(0,s).concat(h.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),c=i.sel):ji(i,s,l,U):(s=0,Ri(i,new ni([l],0),U),c=i.sel);var d=a;function p(e){if(0!=oe(d,e))if(d=e,"rectangle"==r.unit){for(var n=[],o=t.options.tabSize,h=F(Zt(i,a.line).text,a.ch,o),u=F(Zt(i,e.line).text,e.ch,o),p=Math.min(h,u),m=Math.max(h,u),v=Math.min(a.line,e.line),f=Math.min(t.lastLine(),Math.max(a.line,e.line));v<=f;v++){var y=Zt(i,v).text,g=q(y,p,o);p==m?n.push(new ii(ie(v,g),ie(v,g))):y.length>g&&n.push(new ii(ie(v,g),ie(v,q(y,m,o))))}n.length||n.push(new ii(a,a)),Ri(i,oi(t,c.ranges.slice(0,s).concat(n),s),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var b,z=l,x=Ml(t,e,r.unit),w=z.anchor;oe(x.anchor,w)>0?(b=x.head,w=he(z.from(),x.anchor)):(b=x.anchor,w=ce(z.to(),x.head));var M=c.ranges.slice(0);M[s]=Al(t,new ii(de(i,w),b)),Ri(i,oi(t,M,s),U)}}var m=n.wrapper.getBoundingClientRect(),v=0;function f(e){var a=++v,o=Or(t,e,!0,"rectangle"==r.unit);if(o)if(0!=oe(o,d)){t.curOp.focus=S(),p(o);var l=tn(n,i);(o.line>=l.to||o.line<l.from)&&setTimeout(Sn(t,(function(){v==a&&f(e)})),150)}else{var s=e.clientY<m.top?-20:e.clientY>m.bottom?20:0;s&&setTimeout(Sn(t,(function(){v==a&&(n.scroller.scrollTop+=s,f(e))})),50)}}function y(e){t.state.selectingText=!1,v=1/0,e&&(wt(e),n.input.focus()),ft(n.wrapper.ownerDocument,"mousemove",g),ft(n.wrapper.ownerDocument,"mouseup",b),i.history.lastSelOrigin=null}var g=Sn(t,(function(t){0!==t.buttons&&Vt(t)?f(t):y(t)})),b=Sn(t,y);t.state.selectingText=b,mt(n.wrapper.ownerDocument,"mousemove",g),mt(n.wrapper.ownerDocument,"mouseup",b)}function Al(t,e){var a=e.anchor,r=e.head,n=Zt(t.doc,a.line);if(0==oe(a,r)&&a.sticky==r.sticky)return e;var i=dt(n);if(!i)return e;var o=ht(i,a.ch,a.sticky),l=i[o];if(l.from!=a.ch&&l.to!=a.ch)return e;var s,c=o+(l.from==a.ch==(1!=l.level)?0:1);if(0==c||c==i.length)return e;if(r.line!=a.line)s=(r.line-a.line)*("ltr"==t.doc.direction?1:-1)>0;else{var h=ht(i,r.ch,r.sticky),u=h-o||(r.ch-a.ch)*(1==l.level?-1:1);s=h==c-1||h==c?u<0:u>0}var d=i[c+(s?-1:0)],p=s==(1==d.level),m=p?d.from:d.to,v=p?"after":"before";return a.ch==m&&a.sticky==v?e:new ii(new ie(a.line,m,v),r)}function Hl(t,e,a,r){var n,i;if(e.touches)n=e.touches[0].clientX,i=e.touches[0].clientY;else try{n=e.clientX,i=e.clientY}catch(h){return!1}if(n>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;r&&wt(e);var o=t.display,l=o.lineDiv.getBoundingClientRect();if(i>l.bottom||!zt(t,a))return _t(e);i-=l.top-o.viewOffset;for(var s=0;s<t.display.gutterSpecs.length;++s){var c=o.gutters.childNodes[s];if(c&&c.getBoundingClientRect().right>=n)return yt(t,a,t,ae(t.doc,i),t.display.gutterSpecs[s].className,e),_t(e)}}function Vl(t,e){return Hl(t,e,"gutterClick",!0)}function Ll(t,e){$a(t.display,e)||Bl(t,e)||gt(t,e,"contextmenu")||M||t.display.input.onContextMenu(e)}function Bl(t,e){return!!zt(t,"gutterContextMenu")&&Hl(t,e,"gutterContextMenu",!1)}function kl(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),ur(t)}fl.prototype.compare=function(t,e,a){return this.time+vl>t&&0==oe(e,this.pos)&&a==this.button};var Cl={toString:function(){return"CodeMirror.Init"}},Sl={},El={};function Ol(t){var e=t.optionHandlers;function a(a,r,n,i){t.defaults[a]=r,n&&(e[a]=i?function(t,e,a){a!=Cl&&n(t,e,a)}:n)}t.defineOption=a,t.Init=Cl,a("value","",(function(t,e){return t.setValue(e)}),!0),a("mode",null,(function(t,e){t.doc.modeOption=e,pi(t)}),!0),a("indentUnit",2,pi,!0),a("indentWithTabs",!1),a("smartIndent",!0),a("tabSize",4,(function(t){mi(t),ur(t),Dr(t)}),!0),a("lineSeparator",null,(function(t,e){if(t.doc.lineSep=e,e){var a=[],r=t.doc.first;t.doc.iter((function(t){for(var n=0;;){var i=t.text.indexOf(e,n);if(-1==i)break;n=i+e.length,a.push(ie(r,i))}r++}));for(var n=a.length-1;n>=0;n--)ro(t.doc,e,a[n],ie(a[n].line,a[n].ch+e.length))}})),a("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(t,e,a){t.state.specialChars=new RegExp(e.source+(e.test("\t")?"":"|\t"),"g"),a!=Cl&&t.refresh()})),a("specialCharPlaceholder",va,(function(t){return t.refresh()}),!0),a("electricChars",!0),a("inputStyle",y?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),a("spellcheck",!1,(function(t,e){return t.getInputField().spellcheck=e}),!0),a("autocorrect",!1,(function(t,e){return t.getInputField().autocorrect=e}),!0),a("autocapitalize",!1,(function(t,e){return t.getInputField().autocapitalize=e}),!0),a("rtlMoveVisually",!z),a("wholeLineUpdateBefore",!0),a("theme","default",(function(t){kl(t),Zn(t)}),!0),a("keyMap","default",(function(t,e,a){var r=Wo(e),n=a!=Cl&&Wo(a);n&&n.detach&&n.detach(t,r),r.attach&&r.attach(t,n||null)})),a("extraKeys",null),a("configureMouse",null),a("lineWrapping",!1,Dl,!0),a("gutters",[],(function(t,e){t.display.gutterSpecs=Kn(e,t.options.lineNumbers),Zn(t)}),!0),a("fixedGutter",!0,(function(t,e){t.display.gutters.style.left=e?Cr(t.display)+"px":"0",t.refresh()}),!0),a("coverGutterNextToScrollbar",!1,(function(t){return gn(t)}),!0),a("scrollbarStyle","native",(function(t){xn(t),gn(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)}),!0),a("lineNumbers",!1,(function(t,e){t.display.gutterSpecs=Kn(t.options.gutters,e),Zn(t)}),!0),a("firstLineNumber",1,Zn,!0),a("lineNumberFormatter",(function(t){return t}),Zn,!0),a("showCursorWhenSelecting",!1,Nr,!0),a("resetSelectionOnContextMenu",!0),a("lineWiseCopyCut",!0),a("pasteLinesPerSelection",!0),a("selectionsMayTouch",!1),a("readOnly",!1,(function(t,e){"nocursor"==e&&(Zr(t),t.display.input.blur()),t.display.input.readOnlyChanged(e)})),a("screenReaderLabel",null,(function(t,e){e=""===e?null:e,t.display.input.screenReaderLabelChanged(e)})),a("disableInput",!1,(function(t,e){e||t.display.input.reset()}),!0),a("dragDrop",!0,Tl),a("allowDropFileTypes",null),a("cursorBlinkRate",530),a("cursorScrollMargin",0),a("cursorHeight",1,Nr,!0),a("singleCursorHeightPerLine",!0,Nr,!0),a("workTime",100),a("workDelay",100),a("flattenSpans",!0,mi,!0),a("addModeClass",!1,mi,!0),a("pollInterval",100),a("undoDepth",200,(function(t,e){return t.doc.history.undoDepth=e})),a("historyEventDelay",1250),a("viewportMargin",10,(function(t){return t.refresh()}),!0),a("maxHighlightLength",1e4,mi,!0),a("moveInputWithCursor",!0,(function(t,e){e||t.display.input.resetPosition()})),a("tabindex",null,(function(t,e){return t.display.input.getField().tabIndex=e||""})),a("autofocus",null),a("direction","ltr",(function(t,e){return t.doc.setDirection(e)}),!0),a("phrases",null)}function Tl(t,e,a){if(!e!=!(a&&a!=Cl)){var r=t.display.dragFunctions,n=e?mt:ft;n(t.display.scroller,"dragstart",r.start),n(t.display.scroller,"dragenter",r.enter),n(t.display.scroller,"dragover",r.over),n(t.display.scroller,"dragleave",r.leave),n(t.display.scroller,"drop",r.drop)}}function Dl(t){t.options.lineWrapping?(E(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(H(t.display.wrapper,"CodeMirror-wrap"),la(t)),Er(t),Dr(t),ur(t),setTimeout((function(){return gn(t)}),100)}function jl(t,e){var a=this;if(!(this instanceof jl))return new jl(t,e);this.options=e=e?j(e):{},j(Sl,e,!1);var r=e.value;"string"==typeof r?r=new Mo(r,e.mode,null,e.lineSeparator,e.direction):e.mode&&(r.modeOption=e.mode),this.doc=r;var n=new jl.inputStyles[e.inputStyle](this),i=this.display=new Xn(t,r,n,e);for(var c in i.wrapper.CodeMirror=this,kl(this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),xn(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new I,keySeq:null,specialChars:null},e.autofocus&&!y&&i.input.focus(),o&&l<11&&setTimeout((function(){return a.display.input.reset(!0)}),20),Fl(this),Co(),Mn(this),this.curOp.forceUpdate=!0,gi(this,r),e.autofocus&&!y||this.hasFocus()?setTimeout((function(){a.hasFocus()&&!a.state.focused&&Jr(a)}),20):Zr(this),El)El.hasOwnProperty(c)&&El[c](this,e[c],Cl);Yn(this),e.finishInit&&e.finishInit(this);for(var h=0;h<Il.length;++h)Il[h](this);_n(this),s&&e.lineWrapping&&"optimizelegibility"==getComputedStyle(i.lineDiv).textRendering&&(i.lineDiv.style.textRendering="auto")}function Fl(t){var e=t.display;mt(e.scroller,"mousedown",Sn(t,gl)),mt(e.scroller,"dblclick",o&&l<11?Sn(t,(function(e){if(!gt(t,e)){var a=Or(t,e);if(a&&!Vl(t,e)&&!$a(t.display,e)){wt(e);var r=t.findWordAt(a);Ti(t.doc,r.anchor,r.head)}}})):function(e){return gt(t,e)||wt(e)}),mt(e.scroller,"contextmenu",(function(e){return Ll(t,e)})),mt(e.input.getField(),"contextmenu",(function(a){e.scroller.contains(a.target)||Ll(t,a)}));var a,r={end:0};function n(){e.activeTouch&&(a=setTimeout((function(){return e.activeTouch=null}),1e3),(r=e.activeTouch).end=+new Date)}function i(t){if(1!=t.touches.length)return!1;var e=t.touches[0];return e.radiusX<=1&&e.radiusY<=1}function s(t,e){if(null==e.left)return!0;var a=e.left-t.left,r=e.top-t.top;return a*a+r*r>400}mt(e.scroller,"touchstart",(function(n){if(!gt(t,n)&&!i(n)&&!Vl(t,n)){e.input.ensurePolled(),clearTimeout(a);var o=+new Date;e.activeTouch={start:o,moved:!1,prev:o-r.end<=300?r:null},1==n.touches.length&&(e.activeTouch.left=n.touches[0].pageX,e.activeTouch.top=n.touches[0].pageY)}})),mt(e.scroller,"touchmove",(function(){e.activeTouch&&(e.activeTouch.moved=!0)})),mt(e.scroller,"touchend",(function(a){var r=e.activeTouch;if(r&&!$a(e,a)&&null!=r.left&&!r.moved&&new Date-r.start<300){var i,o=t.coordsChar(e.activeTouch,"page");i=!r.prev||s(r,r.prev)?new ii(o,o):!r.prev.prev||s(r,r.prev.prev)?t.findWordAt(o):new ii(ie(o.line,0),de(t.doc,ie(o.line+1,0))),t.setSelection(i.anchor,i.head),t.focus(),wt(a)}n()})),mt(e.scroller,"touchcancel",n),mt(e.scroller,"scroll",(function(){e.scroller.clientHeight&&(dn(t,e.scroller.scrollTop),mn(t,e.scroller.scrollLeft,!0),yt(t,"scroll",t))})),mt(e.scroller,"mousewheel",(function(e){return ri(t,e)})),mt(e.scroller,"DOMMouseScroll",(function(e){return ri(t,e)})),mt(e.wrapper,"scroll",(function(){return e.wrapper.scrollTop=e.wrapper.scrollLeft=0})),e.dragFunctions={enter:function(e){gt(t,e)||At(e)},over:function(e){gt(t,e)||(Vo(t,e),At(e))},start:function(e){return Ho(t,e)},drop:Sn(t,Ao),leave:function(e){gt(t,e)||Lo(t)}};var c=e.input.getField();mt(c,"keyup",(function(e){return ul.call(t,e)})),mt(c,"keydown",Sn(t,cl)),mt(c,"keypress",Sn(t,dl)),mt(c,"focus",(function(e){return Jr(t,e)})),mt(c,"blur",(function(e){return Zr(t,e)}))}jl.defaults=Sl,jl.optionHandlers=El;var Il=[];function Pl(t,e,a,r){var n,i=t.doc;null==a&&(a="add"),"smart"==a&&(i.mode.indent?n=be(t,e).state:a="prev");var o=t.options.tabSize,l=Zt(i,e),s=F(l.text,null,o);l.stateAfter&&(l.stateAfter=null);var c,h=l.text.match(/^\s*/)[0];if(r||/\S/.test(l.text)){if("smart"==a&&((c=i.mode.indent(n,l.text.slice(h.length),l.text))==N||c>150)){if(!r)return;a="prev"}}else c=0,a="not";"prev"==a?c=e>i.first?F(Zt(i,e-1).text,null,o):0:"add"==a?c=s+t.options.indentUnit:"subtract"==a?c=s-t.options.indentUnit:"number"==typeof a&&(c=s+a),c=Math.max(0,c);var u="",d=0;if(t.options.indentWithTabs)for(var p=Math.floor(c/o);p;--p)d+=o,u+="\t";if(d<c&&(u+=Y(c-d)),u!=h)return ro(i,u,ie(e,0),ie(e,h.length),"+input"),l.stateAfter=null,!0;for(var m=0;m<i.sel.ranges.length;m++){var v=i.sel.ranges[m];if(v.head.line==e&&v.head.ch<h.length){var f=ie(e,h.length);ji(i,m,new ii(f,f));break}}}jl.defineInitHook=function(t){return Il.push(t)};var Rl=null;function Nl(t){Rl=t}function $l(t,e,a,r,n){var i=t.doc;t.display.shift=!1,r||(r=i.sel);var o=+new Date-200,l="paste"==n||t.state.pasteIncoming>o,s=Ot(e),c=null;if(l&&r.ranges.length>1)if(Rl&&Rl.text.join("\n")==e){if(r.ranges.length%Rl.text.length==0){c=[];for(var h=0;h<Rl.text.length;h++)c.push(i.splitLines(Rl.text[h]))}}else s.length==r.ranges.length&&t.options.pasteLinesPerSelection&&(c=J(s,(function(t){return[t]})));for(var u=t.curOp.updateInput,d=r.ranges.length-1;d>=0;d--){var p=r.ranges[d],m=p.from(),v=p.to();p.empty()&&(a&&a>0?m=ie(m.line,m.ch-a):t.state.overwrite&&!l?v=ie(v.line,Math.min(Zt(i,v.line).text.length,v.ch+K(s).length)):l&&Rl&&Rl.lineWise&&Rl.text.join("\n")==s.join("\n")&&(m=v=ie(m.line,0)));var f={from:m,to:v,text:c?c[d%c.length]:s,origin:n||(l?"paste":t.state.cutIncoming>o?"cut":"+input")};Zi(t.doc,f),La(t,"inputRead",t,f)}e&&!l&&Wl(t,e),ln(t),t.curOp.updateInput<2&&(t.curOp.updateInput=u),t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=-1}function Ul(t,e){var a=t.clipboardData&&t.clipboardData.getData("Text");if(a)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||Cn(e,(function(){return $l(e,a,0,null,"paste")})),!0}function Wl(t,e){if(t.options.electricChars&&t.options.smartIndent)for(var a=t.doc.sel,r=a.ranges.length-1;r>=0;r--){var n=a.ranges[r];if(!(n.head.ch>100||r&&a.ranges[r-1].head.line==n.head.line)){var i=t.getModeAt(n.head),o=!1;if(i.electricChars){for(var l=0;l<i.electricChars.length;l++)if(e.indexOf(i.electricChars.charAt(l))>-1){o=Pl(t,n.head.line,"smart");break}}else i.electricInput&&i.electricInput.test(Zt(t.doc,n.head.line).text.slice(0,n.head.ch))&&(o=Pl(t,n.head.line,"smart"));o&&La(t,"electricInput",t,n.head.line)}}}function ql(t){for(var e=[],a=[],r=0;r<t.doc.sel.ranges.length;r++){var n=t.doc.sel.ranges[r].head.line,i={anchor:ie(n,0),head:ie(n+1,0)};a.push(i),e.push(t.getRange(i.anchor,i.head))}return{text:e,ranges:a}}function Gl(t,e,a,r){t.setAttribute("autocorrect",a?"":"off"),t.setAttribute("autocapitalize",r?"":"off"),t.setAttribute("spellcheck",!!e)}function Yl(){var t=B("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),e=B("div",[t],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return s?t.style.width="1000px":t.setAttribute("wrap","off"),v&&(t.style.border="1px solid black"),Gl(t),e}function Kl(t){var e=t.optionHandlers,a=t.helpers={};t.prototype={constructor:t,focus:function(){window.focus(),this.display.input.focus()},setOption:function(t,a){var r=this.options,n=r[t];r[t]==a&&"mode"!=t||(r[t]=a,e.hasOwnProperty(t)&&Sn(this,e[t])(this,a,n),yt(this,"optionChange",this,t))},getOption:function(t){return this.options[t]},getDoc:function(){return this.doc},addKeyMap:function(t,e){this.state.keyMaps[e?"push":"unshift"](Wo(t))},removeKeyMap:function(t){for(var e=this.state.keyMaps,a=0;a<e.length;++a)if(e[a]==t||e[a].name==t)return e.splice(a,1),!0},addOverlay:En((function(e,a){var r=e.token?e:t.getMode(this.options,e);if(r.startState)throw new Error("Overlays may not be stateful.");Z(this.state.overlays,{mode:r,modeSpec:e,opaque:a&&a.opaque,priority:a&&a.priority||0},(function(t){return t.priority})),this.state.modeGen++,Dr(this)})),removeOverlay:En((function(t){for(var e=this.state.overlays,a=0;a<e.length;++a){var r=e[a].modeSpec;if(r==t||"string"==typeof t&&r.name==t)return e.splice(a,1),this.state.modeGen++,void Dr(this)}})),indentLine:En((function(t,e,a){"string"!=typeof e&&"number"!=typeof e&&(e=null==e?this.options.smartIndent?"smart":"prev":e?"add":"subtract"),re(this.doc,t)&&Pl(this,t,e,a)})),indentSelection:En((function(t){for(var e=this.doc.sel.ranges,a=-1,r=0;r<e.length;r++){var n=e[r];if(n.empty())n.head.line>a&&(Pl(this,n.head.line,t,!0),a=n.head.line,r==this.doc.sel.primIndex&&ln(this));else{var i=n.from(),o=n.to(),l=Math.max(a,i.line);a=Math.min(this.lastLine(),o.line-(o.ch?0:1))+1;for(var s=l;s<a;++s)Pl(this,s,t);var c=this.doc.sel.ranges;0==i.ch&&e.length==c.length&&c[r].from().ch>0&&ji(this.doc,r,new ii(i,c[r].to()),$)}}})),getTokenAt:function(t,e){return _e(this,t,e)},getLineTokens:function(t,e){return _e(this,ie(t),e,!0)},getTokenTypeAt:function(t){t=de(this.doc,t);var e,a=ge(this,Zt(this.doc,t.line)),r=0,n=(a.length-1)/2,i=t.ch;if(0==i)e=a[2];else for(;;){var o=r+n>>1;if((o?a[2*o-1]:0)>=i)n=o;else{if(!(a[2*o+1]<i)){e=a[2*o+2];break}r=o+1}}var l=e?e.indexOf("overlay "):-1;return l<0?e:0==l?null:e.slice(0,l-1)},getModeAt:function(e){var a=this.doc.mode;return a.innerMode?t.innerMode(a,this.getTokenAt(e).state).mode:a},getHelper:function(t,e){return this.getHelpers(t,e)[0]},getHelpers:function(t,e){var r=[];if(!a.hasOwnProperty(e))return r;var n=a[e],i=this.getModeAt(t);if("string"==typeof i[e])n[i[e]]&&r.push(n[i[e]]);else if(i[e])for(var o=0;o<i[e].length;o++){var l=n[i[e][o]];l&&r.push(l)}else i.helperType&&n[i.helperType]?r.push(n[i.helperType]):n[i.name]&&r.push(n[i.name]);for(var s=0;s<n._global.length;s++){var c=n._global[s];c.pred(i,this)&&-1==P(r,c.val)&&r.push(c.val)}return r},getStateAfter:function(t,e){var a=this.doc;return be(this,(t=ue(a,null==t?a.first+a.size-1:t))+1,e).state},cursorCoords:function(t,e){var a=this.doc.sel.primary();return gr(this,null==t?a.head:"object"==typeof t?de(this.doc,t):t?a.from():a.to(),e||"page")},charCoords:function(t,e){return yr(this,de(this.doc,t),e||"page")},coordsChar:function(t,e){return xr(this,(t=fr(this,t,e||"page")).left,t.top)},lineAtHeight:function(t,e){return t=fr(this,{top:t,left:0},e||"page").top,ae(this.doc,t+this.display.viewOffset)},heightAtLine:function(t,e,a){var r,n=!1;if("number"==typeof t){var i=this.doc.first+this.doc.size-1;t<this.doc.first?t=this.doc.first:t>i&&(t=i,n=!0),r=Zt(this.doc,t)}else r=t;return vr(this,r,{top:0,left:0},e||"page",a||n).top+(n?this.doc.height-ia(r):0)},defaultTextHeight:function(){return Lr(this.display)},defaultCharWidth:function(){return Br(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,a,r,n){var i=this.display,o=(t=gr(this,de(this.doc,t))).bottom,l=t.left;if(e.style.position="absolute",e.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(e),i.sizer.appendChild(e),"over"==r)o=t.top;else if("above"==r||"near"==r){var s=Math.max(i.wrapper.clientHeight,this.doc.height),c=Math.max(i.sizer.clientWidth,i.lineSpace.clientWidth);("above"==r||t.bottom+e.offsetHeight>s)&&t.top>e.offsetHeight?o=t.top-e.offsetHeight:t.bottom+e.offsetHeight<=s&&(o=t.bottom),l+e.offsetWidth>c&&(l=c-e.offsetWidth)}e.style.top=o+"px",e.style.left=e.style.right="","right"==n?(l=i.sizer.clientWidth-e.offsetWidth,e.style.right="0px"):("left"==n?l=0:"middle"==n&&(l=(i.sizer.clientWidth-e.offsetWidth)/2),e.style.left=l+"px"),a&&rn(this,{left:l,top:o,right:l+e.offsetWidth,bottom:o+e.offsetHeight})},triggerOnKeyDown:En(cl),triggerOnKeyPress:En(dl),triggerOnKeyUp:ul,triggerOnMouseDown:En(gl),execCommand:function(t){if(Zo.hasOwnProperty(t))return Zo[t].call(null,this)},triggerElectric:En((function(t){Wl(this,t)})),findPosH:function(t,e,a,r){var n=1;e<0&&(n=-1,e=-e);for(var i=de(this.doc,t),o=0;o<e&&!(i=Jl(this.doc,i,n,a,r)).hitSide;++o);return i},moveH:En((function(t,e){var a=this;this.extendSelectionsBy((function(r){return a.display.shift||a.doc.extend||r.empty()?Jl(a.doc,r.head,t,e,a.options.rtlMoveVisually):t<0?r.from():r.to()}),W)})),deleteH:En((function(t,e){var a=this.doc.sel,r=this.doc;a.somethingSelected()?r.replaceSelection("",null,"+delete"):qo(this,(function(a){var n=Jl(r,a.head,t,e,!1);return t<0?{from:n,to:a.head}:{from:a.head,to:n}}))})),findPosV:function(t,e,a,r){var n=1,i=r;e<0&&(n=-1,e=-e);for(var o=de(this.doc,t),l=0;l<e;++l){var s=gr(this,o,"div");if(null==i?i=s.left:s.left=i,(o=Zl(this,s,n,a)).hitSide)break}return o},moveV:En((function(t,e){var a=this,r=this.doc,n=[],i=!this.display.shift&&!r.extend&&r.sel.somethingSelected();if(r.extendSelectionsBy((function(o){if(i)return t<0?o.from():o.to();var l=gr(a,o.head,"div");null!=o.goalColumn&&(l.left=o.goalColumn),n.push(l.left);var s=Zl(a,l,t,e);return"page"==e&&o==r.sel.primary()&&on(a,yr(a,s,"div").top-l.top),s}),W),n.length)for(var o=0;o<r.sel.ranges.length;o++)r.sel.ranges[o].goalColumn=n[o]})),findWordAt:function(t){var e=Zt(this.doc,t.line).text,a=t.ch,r=t.ch;if(e){var n=this.getHelper(t,"wordChars");"before"!=t.sticky&&r!=e.length||!a?++r:--a;for(var i=e.charAt(a),o=at(i,n)?function(t){return at(t,n)}:/\s/.test(i)?function(t){return/\s/.test(t)}:function(t){return!/\s/.test(t)&&!at(t)};a>0&&o(e.charAt(a-1));)--a;for(;r<e.length&&o(e.charAt(r));)++r}return new ii(ie(t.line,a),ie(t.line,r))},toggleOverwrite:function(t){null!=t&&t==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?E(this.display.cursorDiv,"CodeMirror-overwrite"):H(this.display.cursorDiv,"CodeMirror-overwrite"),yt(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==S()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:En((function(t,e){sn(this,t,e)})),getScrollInfo:function(){var t=this.display.scroller;return{left:t.scrollLeft,top:t.scrollTop,height:t.scrollHeight-Ga(this)-this.display.barHeight,width:t.scrollWidth-Ga(this)-this.display.barWidth,clientHeight:Ka(this),clientWidth:Ya(this)}},scrollIntoView:En((function(t,e){null==t?(t={from:this.doc.sel.primary().head,to:null},null==e&&(e=this.options.cursorScrollMargin)):"number"==typeof t?t={from:ie(t,0),to:null}:null==t.from&&(t={from:t,to:null}),t.to||(t.to=t.from),t.margin=e||0,null!=t.from.line?cn(this,t):un(this,t.from,t.to,t.margin)})),setSize:En((function(t,e){var a=this,r=function(t){return"number"==typeof t||/^\d+$/.test(String(t))?t+"px":t};null!=t&&(this.display.wrapper.style.width=r(t)),null!=e&&(this.display.wrapper.style.height=r(e)),this.options.lineWrapping&&hr(this);var n=this.display.viewFrom;this.doc.iter(n,this.display.viewTo,(function(t){if(t.widgets)for(var e=0;e<t.widgets.length;e++)if(t.widgets[e].noHScroll){jr(a,n,"widget");break}++n})),this.curOp.forceUpdate=!0,yt(this,"refresh",this)})),operation:function(t){return Cn(this,t)},startOperation:function(){return Mn(this)},endOperation:function(){return _n(this)},refresh:En((function(){var t=this.display.cachedTextHeight;Dr(this),this.curOp.forceUpdate=!0,ur(this),sn(this,this.doc.scrollLeft,this.doc.scrollTop),Wn(this.display),(null==t||Math.abs(t-Lr(this.display))>.5||this.options.lineWrapping)&&Er(this),yt(this,"refresh",this)})),swapDoc:En((function(t){var e=this.doc;return e.cm=null,this.state.selectingText&&this.state.selectingText(),gi(this,t),ur(this),this.display.input.reset(),sn(this,t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,La(this,"swapDoc",this,e),e})),phrase:function(t){var e=this.options.phrases;return e&&Object.prototype.hasOwnProperty.call(e,t)?e[t]:t},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},xt(t),t.registerHelper=function(e,r,n){a.hasOwnProperty(e)||(a[e]=t[e]={_global:[]}),a[e][r]=n},t.registerGlobalHelper=function(e,r,n,i){t.registerHelper(e,r,i),a[e]._global.push({pred:n,val:i})}}function Jl(t,e,a,r,n){var i=e,o=a,l=Zt(t,e.line),s=n&&"rtl"==t.direction?-a:a;function c(){var a=e.line+s;return!(a<t.first||a>=t.first+t.size)&&(e=new ie(a,e.ch,e.sticky),l=Zt(t,a))}function h(i){var o;if("codepoint"==r){var h=l.text.charCodeAt(e.ch+(a>0?0:-1));if(isNaN(h))o=null;else{var u=a>0?h>=55296&&h<56320:h>=56320&&h<57343;o=new ie(e.line,Math.max(0,Math.min(l.text.length,e.ch+a*(u?2:1))),-a)}}else o=n?Jo(t.cm,l,e,a):Yo(l,e,a);if(null==o){if(i||!c())return!1;e=Ko(n,t.cm,l,e.line,s)}else e=o;return!0}if("char"==r||"codepoint"==r)h();else if("column"==r)h(!0);else if("word"==r||"group"==r)for(var u=null,d="group"==r,p=t.cm&&t.cm.getHelper(e,"wordChars"),m=!0;!(a<0)||h(!m);m=!1){var v=l.text.charAt(e.ch)||"\n",f=at(v,p)?"w":d&&"\n"==v?"n":!d||/\s/.test(v)?null:"p";if(!d||m||f||(f="s"),u&&u!=f){a<0&&(a=1,h(),e.sticky="after");break}if(f&&(u=f),a>0&&!h(!m))break}var y=Gi(t,e,i,o,!0);return le(i,y)&&(y.hitSide=!0),y}function Zl(t,e,a,r){var n,i,o=t.doc,l=e.left;if("page"==r){var s=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(s-.5*Lr(t.display),3);n=(a>0?e.bottom:e.top)+a*c}else"line"==r&&(n=a>0?e.bottom+3:e.top-3);for(;(i=xr(t,l,n)).outside;){if(a<0?n<=0:n>=o.height){i.hitSide=!0;break}n+=5*a}return i}var Xl=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new I,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Ql(t,e){var a=tr(t,e.line);if(!a||a.hidden)return null;var r=Zt(t.doc,e.line),n=Za(a,r,e.line),i=dt(r,t.doc.direction),o="left";i&&(o=ht(i,e.ch)%2?"right":"left");var l=ir(n.map,e.ch,o);return l.offset="right"==l.collapse?l.end:l.start,l}function ts(t){for(var e=t;e;e=e.parentNode)if(/CodeMirror-gutter-wrapper/.test(e.className))return!0;return!1}function es(t,e){return e&&(t.bad=!0),t}function as(t,e,a,r,n){var i="",o=!1,l=t.doc.lineSeparator(),s=!1;function c(t){return function(e){return e.id==t}}function h(){o&&(i+=l,s&&(i+=l),o=s=!1)}function u(t){t&&(h(),i+=t)}function d(e){if(1==e.nodeType){var a=e.getAttribute("cm-text");if(a)return void u(a);var i,p=e.getAttribute("cm-marker");if(p){var m=t.findMarks(ie(r,0),ie(n+1,0),c(+p));return void(m.length&&(i=m[0].find(0))&&u(Xt(t.doc,i.from,i.to).join(l)))}if("false"==e.getAttribute("contenteditable"))return;var v=/^(pre|div|p|li|table|br)$/i.test(e.nodeName);if(!/^br$/i.test(e.nodeName)&&0==e.textContent.length)return;v&&h();for(var f=0;f<e.childNodes.length;f++)d(e.childNodes[f]);/^(pre|p)$/i.test(e.nodeName)&&(s=!0),v&&(o=!0)}else 3==e.nodeType&&u(e.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;d(e),e!=a;)e=e.nextSibling,s=!1;return i}function rs(t,e,a){var r;if(e==t.display.lineDiv){if(!(r=t.display.lineDiv.childNodes[a]))return es(t.clipPos(ie(t.display.viewTo-1)),!0);e=null,a=0}else for(r=e;;r=r.parentNode){if(!r||r==t.display.lineDiv)return null;if(r.parentNode&&r.parentNode==t.display.lineDiv)break}for(var n=0;n<t.display.view.length;n++){var i=t.display.view[n];if(i.node==r)return ns(i,e,a)}}function ns(t,e,a){var r=t.text.firstChild,n=!1;if(!e||!C(r,e))return es(ie(ee(t.line),0),!0);if(e==r&&(n=!0,e=r.childNodes[a],a=0,!e)){var i=t.rest?K(t.rest):t.line;return es(ie(ee(i),i.text.length),n)}var o=3==e.nodeType?e:null,l=e;for(o||1!=e.childNodes.length||3!=e.firstChild.nodeType||(o=e.firstChild,a&&(a=o.nodeValue.length));l.parentNode!=r;)l=l.parentNode;var s=t.measure,c=s.maps;function h(e,a,r){for(var n=-1;n<(c?c.length:0);n++)for(var i=n<0?s.map:c[n],o=0;o<i.length;o+=3){var l=i[o+2];if(l==e||l==a){var h=ee(n<0?t.line:t.rest[n]),u=i[o]+r;return(r<0||l!=e)&&(u=i[o+(r?1:0)]),ie(h,u)}}}var u=h(o,l,a);if(u)return es(u,n);for(var d=l.nextSibling,p=o?o.nodeValue.length-a:0;d;d=d.nextSibling){if(u=h(d,d.firstChild,0))return es(ie(u.line,u.ch-p),n);p+=d.textContent.length}for(var m=l.previousSibling,v=a;m;m=m.previousSibling){if(u=h(m,m.firstChild,-1))return es(ie(u.line,u.ch+v),n);v+=m.textContent.length}}Xl.prototype.init=function(t){var e=this,a=this,r=a.cm,n=a.div=t.lineDiv;function i(t){for(var e=t.target;e;e=e.parentNode){if(e==n)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(e.className))break}return!1}function o(t){if(i(t)&&!gt(r,t)){if(r.somethingSelected())Nl({lineWise:!1,text:r.getSelections()}),"cut"==t.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var e=ql(r);Nl({lineWise:!0,text:e.text}),"cut"==t.type&&r.operation((function(){r.setSelections(e.ranges,0,$),r.replaceSelection("",null,"cut")}))}if(t.clipboardData){t.clipboardData.clearData();var o=Rl.text.join("\n");if(t.clipboardData.setData("Text",o),t.clipboardData.getData("Text")==o)return void t.preventDefault()}var l=Yl(),s=l.firstChild;r.display.lineSpace.insertBefore(l,r.display.lineSpace.firstChild),s.value=Rl.text.join("\n");var c=document.activeElement;T(s),setTimeout((function(){r.display.lineSpace.removeChild(l),c.focus(),c==n&&a.showPrimarySelection()}),50)}}n.contentEditable=!0,Gl(n,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize),mt(n,"paste",(function(t){!i(t)||gt(r,t)||Ul(t,r)||l<=11&&setTimeout(Sn(r,(function(){return e.updateFromDOM()})),20)})),mt(n,"compositionstart",(function(t){e.composing={data:t.data,done:!1}})),mt(n,"compositionupdate",(function(t){e.composing||(e.composing={data:t.data,done:!1})})),mt(n,"compositionend",(function(t){e.composing&&(t.data!=e.composing.data&&e.readFromDOMSoon(),e.composing.done=!0)})),mt(n,"touchstart",(function(){return a.forceCompositionEnd()})),mt(n,"input",(function(){e.composing||e.readFromDOMSoon()})),mt(n,"copy",o),mt(n,"cut",o)},Xl.prototype.screenReaderLabelChanged=function(t){t?this.div.setAttribute("aria-label",t):this.div.removeAttribute("aria-label")},Xl.prototype.prepareSelection=function(){var t=$r(this.cm,!1);return t.focus=document.activeElement==this.div,t},Xl.prototype.showSelection=function(t,e){t&&this.cm.display.view.length&&((t.focus||e)&&this.showPrimarySelection(),this.showMultipleSelections(t))},Xl.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Xl.prototype.showPrimarySelection=function(){var t=this.getSelection(),e=this.cm,r=e.doc.sel.primary(),n=r.from(),i=r.to();if(e.display.viewTo==e.display.viewFrom||n.line>=e.display.viewTo||i.line<e.display.viewFrom)t.removeAllRanges();else{var o=rs(e,t.anchorNode,t.anchorOffset),l=rs(e,t.focusNode,t.focusOffset);if(!o||o.bad||!l||l.bad||0!=oe(he(o,l),n)||0!=oe(ce(o,l),i)){var s=e.display.view,c=n.line>=e.display.viewFrom&&Ql(e,n)||{node:s[0].measure.map[2],offset:0},h=i.line<e.display.viewTo&&Ql(e,i);if(!h){var u=s[s.length-1].measure,d=u.maps?u.maps[u.maps.length-1]:u.map;h={node:d[d.length-1],offset:d[d.length-2]-d[d.length-3]}}if(c&&h){var p,m=t.rangeCount&&t.getRangeAt(0);try{p=A(c.node,c.offset,h.offset,h.node)}catch(Et){}p&&(!a&&e.state.focused?(t.collapse(c.node,c.offset),p.collapsed||(t.removeAllRanges(),t.addRange(p))):(t.removeAllRanges(),t.addRange(p)),m&&null==t.anchorNode?t.addRange(m):a&&this.startGracePeriod()),this.rememberSelection()}else t.removeAllRanges()}}},Xl.prototype.startGracePeriod=function(){var t=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout((function(){t.gracePeriod=!1,t.selectionChanged()&&t.cm.operation((function(){return t.cm.curOp.selectionChanged=!0}))}),20)},Xl.prototype.showMultipleSelections=function(t){L(this.cm.display.cursorDiv,t.cursors),L(this.cm.display.selectionDiv,t.selection)},Xl.prototype.rememberSelection=function(){var t=this.getSelection();this.lastAnchorNode=t.anchorNode,this.lastAnchorOffset=t.anchorOffset,this.lastFocusNode=t.focusNode,this.lastFocusOffset=t.focusOffset},Xl.prototype.selectionInEditor=function(){var t=this.getSelection();if(!t.rangeCount)return!1;var e=t.getRangeAt(0).commonAncestorContainer;return C(this.div,e)},Xl.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()&&document.activeElement==this.div||this.showSelection(this.prepareSelection(),!0),this.div.focus())},Xl.prototype.blur=function(){this.div.blur()},Xl.prototype.getField=function(){return this.div},Xl.prototype.supportsTouch=function(){return!0},Xl.prototype.receivedFocus=function(){var t=this;function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))}this.selectionInEditor()?this.pollSelection():Cn(this.cm,(function(){return t.cm.curOp.selectionChanged=!0})),this.polling.set(this.cm.options.pollInterval,e)},Xl.prototype.selectionChanged=function(){var t=this.getSelection();return t.anchorNode!=this.lastAnchorNode||t.anchorOffset!=this.lastAnchorOffset||t.focusNode!=this.lastFocusNode||t.focusOffset!=this.lastFocusOffset},Xl.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var t=this.getSelection(),e=this.cm;if(f&&h&&this.cm.display.gutterSpecs.length&&ts(t.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var a=rs(e,t.anchorNode,t.anchorOffset),r=rs(e,t.focusNode,t.focusOffset);a&&r&&Cn(e,(function(){Ri(e.doc,li(a,r),$),(a.bad||r.bad)&&(e.curOp.selectionChanged=!0)}))}}},Xl.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var t,e,a,r=this.cm,n=r.display,i=r.doc.sel.primary(),o=i.from(),l=i.to();if(0==o.ch&&o.line>r.firstLine()&&(o=ie(o.line-1,Zt(r.doc,o.line-1).length)),l.ch==Zt(r.doc,l.line).text.length&&l.line<r.lastLine()&&(l=ie(l.line+1,0)),o.line<n.viewFrom||l.line>n.viewTo-1)return!1;o.line==n.viewFrom||0==(t=Tr(r,o.line))?(e=ee(n.view[0].line),a=n.view[0].node):(e=ee(n.view[t].line),a=n.view[t-1].node.nextSibling);var s,c,h=Tr(r,l.line);if(h==n.view.length-1?(s=n.viewTo-1,c=n.lineDiv.lastChild):(s=ee(n.view[h+1].line)-1,c=n.view[h+1].node.previousSibling),!a)return!1;for(var u=r.doc.splitLines(as(r,a,c,e,s)),d=Xt(r.doc,ie(e,0),ie(s,Zt(r.doc,s).text.length));u.length>1&&d.length>1;)if(K(u)==K(d))u.pop(),d.pop(),s--;else{if(u[0]!=d[0])break;u.shift(),d.shift(),e++}for(var p=0,m=0,v=u[0],f=d[0],y=Math.min(v.length,f.length);p<y&&v.charCodeAt(p)==f.charCodeAt(p);)++p;for(var g=K(u),b=K(d),z=Math.min(g.length-(1==u.length?p:0),b.length-(1==d.length?p:0));m<z&&g.charCodeAt(g.length-m-1)==b.charCodeAt(b.length-m-1);)++m;if(1==u.length&&1==d.length&&e==o.line)for(;p&&p>o.ch&&g.charCodeAt(g.length-m-1)==b.charCodeAt(b.length-m-1);)p--,m++;u[u.length-1]=g.slice(0,g.length-m).replace(/^\u200b+/,""),u[0]=u[0].slice(p).replace(/\u200b+$/,"");var x=ie(e,p),w=ie(s,d.length?K(d).length-m:0);return u.length>1||u[0]||oe(x,w)?(ro(r.doc,u,x,w,"+input"),!0):void 0},Xl.prototype.ensurePolled=function(){this.forceCompositionEnd()},Xl.prototype.reset=function(){this.forceCompositionEnd()},Xl.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Xl.prototype.readFromDOMSoon=function(){var t=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(t.readDOMTimeout=null,t.composing){if(!t.composing.done)return;t.composing=null}t.updateFromDOM()}),80))},Xl.prototype.updateFromDOM=function(){var t=this;!this.cm.isReadOnly()&&this.pollContent()||Cn(this.cm,(function(){return Dr(t.cm)}))},Xl.prototype.setUneditable=function(t){t.contentEditable="false"},Xl.prototype.onKeyPress=function(t){0==t.charCode||this.composing||(t.preventDefault(),this.cm.isReadOnly()||Sn(this.cm,$l)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0))},Xl.prototype.readOnlyChanged=function(t){this.div.contentEditable=String("nocursor"!=t)},Xl.prototype.onContextMenu=function(){},Xl.prototype.resetPosition=function(){},Xl.prototype.needsContentAttribute=!0;var is=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new I,this.hasSelection=!1,this.composing=null};function os(t,e){if((e=e?j(e):{}).value=t.value,!e.tabindex&&t.tabIndex&&(e.tabindex=t.tabIndex),!e.placeholder&&t.placeholder&&(e.placeholder=t.placeholder),null==e.autofocus){var a=S();e.autofocus=a==t||null!=t.getAttribute("autofocus")&&a==document.body}function r(){t.value=l.getValue()}var n;if(t.form&&(mt(t.form,"submit",r),!e.leaveSubmitMethodAlone)){var i=t.form;n=i.submit;try{var o=i.submit=function(){r(),i.submit=n,i.submit(),i.submit=o}}catch(Et){}}e.finishInit=function(a){a.save=r,a.getTextArea=function(){return t},a.toTextArea=function(){a.toTextArea=isNaN,r(),t.parentNode.removeChild(a.getWrapperElement()),t.style.display="",t.form&&(ft(t.form,"submit",r),e.leaveSubmitMethodAlone||"function"!=typeof t.form.submit||(t.form.submit=n))}},t.style.display="none";var l=jl((function(e){return t.parentNode.insertBefore(e,t.nextSibling)}),e);return l}function ls(t){t.off=ft,t.on=mt,t.wheelEventPixels=ai,t.Doc=Mo,t.splitLines=Ot,t.countColumn=F,t.findColumn=q,t.isWordChar=et,t.Pass=N,t.signal=yt,t.Line=sa,t.changeEnd=si,t.scrollbarModel=zn,t.Pos=ie,t.cmpPos=oe,t.modes=It,t.mimeModes=Pt,t.resolveMode=$t,t.getMode=Ut,t.modeExtensions=Wt,t.extendMode=qt,t.copyState=Gt,t.startState=Kt,t.innerMode=Yt,t.commands=Zo,t.keyMap=Fo,t.keyName=Uo,t.isModifierKey=No,t.lookupKey=Ro,t.normalizeKeyMap=Po,t.StringStream=Jt,t.SharedTextMarker=yo,t.TextMarker=vo,t.LineWidget=ho,t.e_preventDefault=wt,t.e_stopPropagation=Mt,t.e_stop=At,t.addClass=E,t.contains=C,t.rmClass=H,t.keyNames=Oo}is.prototype.init=function(t){var e=this,a=this,r=this.cm;this.createField(t);var n=this.textarea;function i(t){if(!gt(r,t)){if(r.somethingSelected())Nl({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var e=ql(r);Nl({lineWise:!0,text:e.text}),"cut"==t.type?r.setSelections(e.ranges,null,$):(a.prevInput="",n.value=e.text.join("\n"),T(n))}"cut"==t.type&&(r.state.cutIncoming=+new Date)}}t.wrapper.insertBefore(this.wrapper,t.wrapper.firstChild),v&&(n.style.width="0px"),mt(n,"input",(function(){o&&l>=9&&e.hasSelection&&(e.hasSelection=null),a.poll()})),mt(n,"paste",(function(t){gt(r,t)||Ul(t,r)||(r.state.pasteIncoming=+new Date,a.fastPoll())})),mt(n,"cut",i),mt(n,"copy",i),mt(t.scroller,"paste",(function(e){if(!$a(t,e)&&!gt(r,e)){if(!n.dispatchEvent)return r.state.pasteIncoming=+new Date,void a.focus();var i=new Event("paste");i.clipboardData=e.clipboardData,n.dispatchEvent(i)}})),mt(t.lineSpace,"selectstart",(function(e){$a(t,e)||wt(e)})),mt(n,"compositionstart",(function(){var t=r.getCursor("from");a.composing&&a.composing.range.clear(),a.composing={start:t,range:r.markText(t,r.getCursor("to"),{className:"CodeMirror-composing"})}})),mt(n,"compositionend",(function(){a.composing&&(a.poll(),a.composing.range.clear(),a.composing=null)}))},is.prototype.createField=function(t){this.wrapper=Yl(),this.textarea=this.wrapper.firstChild},is.prototype.screenReaderLabelChanged=function(t){t?this.textarea.setAttribute("aria-label",t):this.textarea.removeAttribute("aria-label")},is.prototype.prepareSelection=function(){var t=this.cm,e=t.display,a=t.doc,r=$r(t);if(t.options.moveInputWithCursor){var n=gr(t,a.sel.primary().head,"div"),i=e.wrapper.getBoundingClientRect(),o=e.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(e.wrapper.clientHeight-10,n.top+o.top-i.top)),r.teLeft=Math.max(0,Math.min(e.wrapper.clientWidth-10,n.left+o.left-i.left))}return r},is.prototype.showSelection=function(t){var e=this.cm.display;L(e.cursorDiv,t.cursors),L(e.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},is.prototype.reset=function(t){if(!this.contextMenuPending&&!this.composing){var e=this.cm;if(e.somethingSelected()){this.prevInput="";var a=e.getSelection();this.textarea.value=a,e.state.focused&&T(this.textarea),o&&l>=9&&(this.hasSelection=a)}else t||(this.prevInput=this.textarea.value="",o&&l>=9&&(this.hasSelection=null))}},is.prototype.getField=function(){return this.textarea},is.prototype.supportsTouch=function(){return!1},is.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!y||S()!=this.textarea))try{this.textarea.focus()}catch(Et){}},is.prototype.blur=function(){this.textarea.blur()},is.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},is.prototype.receivedFocus=function(){this.slowPoll()},is.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){t.poll(),t.cm.state.focused&&t.slowPoll()}))},is.prototype.fastPoll=function(){var t=!1,e=this;function a(){e.poll()||t?(e.pollingFast=!1,e.slowPoll()):(t=!0,e.polling.set(60,a))}e.pollingFast=!0,e.polling.set(20,a)},is.prototype.poll=function(){var t=this,e=this.cm,a=this.textarea,r=this.prevInput;if(this.contextMenuPending||!e.state.focused||Tt(a)&&!r&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var n=a.value;if(n==r&&!e.somethingSelected())return!1;if(o&&l>=9&&this.hasSelection===n||g&&/[\uf700-\uf7ff]/.test(n))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var i=n.charCodeAt(0);if(8203!=i||r||(r="​"),8666==i)return this.reset(),this.cm.execCommand("undo")}for(var s=0,c=Math.min(r.length,n.length);s<c&&r.charCodeAt(s)==n.charCodeAt(s);)++s;return Cn(e,(function(){$l(e,n.slice(s),r.length-s,null,t.composing?"*compose":null),n.length>1e3||n.indexOf("\n")>-1?a.value=t.prevInput="":t.prevInput=n,t.composing&&(t.composing.range.clear(),t.composing.range=e.markText(t.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},is.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},is.prototype.onKeyPress=function(){o&&l>=9&&(this.hasSelection=null),this.fastPoll()},is.prototype.onContextMenu=function(t){var e=this,a=e.cm,r=a.display,n=e.textarea;e.contextMenuPending&&e.contextMenuPending();var i=Or(a,t),c=r.scroller.scrollTop;if(i&&!u){a.options.resetSelectionOnContextMenu&&-1==a.doc.sel.contains(i)&&Sn(a,Ri)(a.doc,li(i),$);var h,d=n.style.cssText,p=e.wrapper.style.cssText,m=e.wrapper.offsetParent.getBoundingClientRect();if(e.wrapper.style.cssText="position: static",n.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-m.top-5)+"px; left: "+(t.clientX-m.left-5)+"px;\n z-index: 1000; background: "+(o?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",s&&(h=window.scrollY),r.input.focus(),s&&window.scrollTo(null,h),r.input.reset(),a.somethingSelected()||(n.value=e.prevInput=" "),e.contextMenuPending=y,r.selForContextMenu=a.doc.sel,clearTimeout(r.detectingSelectAll),o&&l>=9&&f(),M){At(t);var v=function(){ft(window,"mouseup",v),setTimeout(y,20)};mt(window,"mouseup",v)}else setTimeout(y,50)}function f(){if(null!=n.selectionStart){var t=a.somethingSelected(),i="​"+(t?n.value:"");n.value="⇚",n.value=i,e.prevInput=t?"":"​",n.selectionStart=1,n.selectionEnd=i.length,r.selForContextMenu=a.doc.sel}}function y(){if(e.contextMenuPending==y&&(e.contextMenuPending=!1,e.wrapper.style.cssText=p,n.style.cssText=d,o&&l<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=c),null!=n.selectionStart)){(!o||o&&l<9)&&f();var t=0,i=function(){r.selForContextMenu==a.doc.sel&&0==n.selectionStart&&n.selectionEnd>0&&"​"==e.prevInput?Sn(a,Ki)(a):t++<10?r.detectingSelectAll=setTimeout(i,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(i,200)}}},is.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled="nocursor"==t,this.textarea.readOnly=!!t},is.prototype.setUneditable=function(){},is.prototype.needsContentAttribute=!1,Ol(jl),Kl(jl);var ss="iter insert remove copy getEditor constructor".split(" ");for(var cs in Mo.prototype)Mo.prototype.hasOwnProperty(cs)&&P(ss,cs)<0&&(jl.prototype[cs]=function(t){return function(){return t.apply(this.doc,arguments)}}(Mo.prototype[cs]));return xt(Mo),jl.inputStyles={textarea:is,contenteditable:Xl},jl.defineMode=function(t){jl.defaults.mode||"null"==t||(jl.defaults.mode=t),Rt.apply(this,arguments)},jl.defineMIME=Nt,jl.defineMode("null",(function(){return{token:function(t){return t.skipToEnd()}}})),jl.defineMIME("text/plain","null"),jl.defineExtension=function(t,e){jl.prototype[t]=e},jl.defineDocExtension=function(t,e){Mo.prototype[t]=e},jl.fromTextArea=os,ls(jl),jl.version="5.60.0",jl}()}));kr((function(t,e){var a;(a=Ls).defineMode("javascript",(function(t,e){var r,n,i=t.indentUnit,o=e.statementIndent,l=e.jsonld,s=e.json||l,c=e.typescript,h=e.wordCharacters||/[\w$\xa1-\uffff]/,u=function(){function t(t){return{type:t,style:"keyword"}}var e=t("keyword a"),a=t("keyword b"),r=t("keyword c"),n=t("keyword d"),i=t("operator"),o={type:"atom",style:"atom"};return{if:t("if"),while:e,with:e,else:a,do:a,try:a,finally:a,return:n,break:n,continue:n,new:t("new"),delete:r,void:r,throw:r,debugger:t("debugger"),var:t("var"),const:t("var"),let:t("var"),function:t("function"),catch:t("catch"),for:t("for"),switch:t("switch"),case:t("case"),default:t("default"),in:i,typeof:i,instanceof:i,true:o,false:o,null:o,undefined:o,NaN:o,Infinity:o,this:t("this"),class:t("class"),super:t("atom"),yield:r,export:t("export"),import:t("import"),extends:r,await:r}}(),d=/[+\-*&%=<>!?|~^@]/,p=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function m(t){for(var e,a=!1,r=!1;null!=(e=t.next());){if(!a){if("/"==e&&!r)return;"["==e?r=!0:r&&"]"==e&&(r=!1)}a=!a&&"\\"==e}}function v(t,e,a){return r=t,n=a,e}function f(t,e){var a=t.next();if('"'==a||"'"==a)return e.tokenize=y(a),e.tokenize(t,e);if("."==a&&t.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return v("number","number");if("."==a&&t.match(".."))return v("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(a))return v(a);if("="==a&&t.eat(">"))return v("=>","operator");if("0"==a&&t.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return v("number","number");if(/\d/.test(a))return t.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),v("number","number");if("/"==a)return t.eat("*")?(e.tokenize=g,g(t,e)):t.eat("/")?(t.skipToEnd(),v("comment","comment")):ee(t,e,1)?(m(t),t.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),v("regexp","string-2")):(t.eat("="),v("operator","operator",t.current()));if("`"==a)return e.tokenize=b,b(t,e);if("#"==a&&"!"==t.peek())return t.skipToEnd(),v("meta","meta");if("#"==a&&t.eatWhile(h))return v("variable","property");if("<"==a&&t.match("!--")||"-"==a&&t.match("->")&&!/\S/.test(t.string.slice(0,t.start)))return t.skipToEnd(),v("comment","comment");if(d.test(a))return">"==a&&e.lexical&&">"==e.lexical.type||(t.eat("=")?"!"!=a&&"="!=a||t.eat("="):/[<>*+\-|&?]/.test(a)&&(t.eat(a),">"==a&&t.eat(a))),"?"==a&&t.eat(".")?v("."):v("operator","operator",t.current());if(h.test(a)){t.eatWhile(h);var r=t.current();if("."!=e.lastType){if(u.propertyIsEnumerable(r)){var n=u[r];return v(n.type,n.style,r)}if("async"==r&&t.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return v("async","keyword",r)}return v("variable","variable",r)}}function y(t){return function(e,a){var r,n=!1;if(l&&"@"==e.peek()&&e.match(p))return a.tokenize=f,v("jsonld-keyword","meta");for(;null!=(r=e.next())&&(r!=t||n);)n=!n&&"\\"==r;return n||(a.tokenize=f),v("string","string")}}function g(t,e){for(var a,r=!1;a=t.next();){if("/"==a&&r){e.tokenize=f;break}r="*"==a}return v("comment","comment")}function b(t,e){for(var a,r=!1;null!=(a=t.next());){if(!r&&("`"==a||"$"==a&&t.eat("{"))){e.tokenize=f;break}r=!r&&"\\"==a}return v("quasi","string-2",t.current())}var z="([{}])";function x(t,e){e.fatArrowAt&&(e.fatArrowAt=null);var a=t.string.indexOf("=>",t.start);if(!(a<0)){if(c){var r=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(t.string.slice(t.start,a));r&&(a=r.index)}for(var n=0,i=!1,o=a-1;o>=0;--o){var l=t.string.charAt(o),s=z.indexOf(l);if(s>=0&&s<3){if(!n){++o;break}if(0==--n){"("==l&&(i=!0);break}}else if(s>=3&&s<6)++n;else if(h.test(l))i=!0;else if(/["'\/`]/.test(l))for(;;--o){if(0==o)return;if(t.string.charAt(o-1)==l&&"\\"!=t.string.charAt(o-2)){o--;break}}else if(i&&!n){++o;break}}i&&!n&&(e.fatArrowAt=o)}}var w={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function M(t,e,a,r,n,i){this.indented=t,this.column=e,this.type=a,this.prev=n,this.info=i,null!=r&&(this.align=r)}function _(t,e){for(var a=t.localVars;a;a=a.next)if(a.name==e)return!0;for(var r=t.context;r;r=r.prev)for(a=r.vars;a;a=a.next)if(a.name==e)return!0}function A(t,e,a,r,n){var i=t.cc;for(H.state=t,H.stream=n,H.marked=null,H.cc=i,H.style=e,t.lexical.hasOwnProperty("align")||(t.lexical.align=!0);;)if((i.length?i.pop():s?U:N)(a,r)){for(;i.length&&i[i.length-1].lex;)i.pop()();return H.marked?H.marked:"variable"==a&&_(t,r)?"variable-2":e}}var H={state:null,column:null,marked:null,cc:null};function V(){for(var t=arguments.length-1;t>=0;t--)H.cc.push(arguments[t])}function L(){return V.apply(null,arguments),!0}function B(t,e){for(var a=e;a;a=a.next)if(a.name==t)return!0;return!1}function k(t){var a=H.state;if(H.marked="def",a.context)if("var"==a.lexical.info&&a.context&&a.context.block){var r=C(t,a.context);if(null!=r)return void(a.context=r)}else if(!B(t,a.localVars))return void(a.localVars=new O(t,a.localVars));e.globalVars&&!B(t,a.globalVars)&&(a.globalVars=new O(t,a.globalVars))}function C(t,e){if(e){if(e.block){var a=C(t,e.prev);return a?a==e.prev?e:new E(a,e.vars,!0):null}return B(t,e.vars)?e:new E(e.prev,new O(t,e.vars),!1)}return null}function S(t){return"public"==t||"private"==t||"protected"==t||"abstract"==t||"readonly"==t}function E(t,e,a){this.prev=t,this.vars=e,this.block=a}function O(t,e){this.name=t,this.next=e}var T=new O("this",new O("arguments",null));function D(){H.state.context=new E(H.state.context,H.state.localVars,!1),H.state.localVars=T}function j(){H.state.context=new E(H.state.context,H.state.localVars,!0),H.state.localVars=null}function F(){H.state.localVars=H.state.context.vars,H.state.context=H.state.context.prev}function I(t,e){var a=function(){var a=H.state,r=a.indented;if("stat"==a.lexical.type)r=a.lexical.indented;else for(var n=a.lexical;n&&")"==n.type&&n.align;n=n.prev)r=n.indented;a.lexical=new M(r,H.stream.column(),t,null,a.lexical,e)};return a.lex=!0,a}function P(){var t=H.state;t.lexical.prev&&(")"==t.lexical.type&&(t.indented=t.lexical.indented),t.lexical=t.lexical.prev)}function R(t){function e(a){return a==t?L():";"==t||"}"==a||")"==a||"]"==a?V():L(e)}return e}function N(t,e){return"var"==t?L(I("vardef",e),At,R(";"),P):"keyword a"==t?L(I("form"),q,N,P):"keyword b"==t?L(I("form"),N,P):"keyword d"==t?H.stream.match(/^\s*$/,!1)?L():L(I("stat"),Y,R(";"),P):"debugger"==t?L(R(";")):"{"==t?L(I("}"),j,ut,P,F):";"==t?L():"if"==t?("else"==H.state.lexical.info&&H.state.cc[H.state.cc.length-1]==P&&H.state.cc.pop()(),L(I("form"),q,N,P,Ct)):"function"==t?L(Tt):"for"==t?L(I("form"),St,N,P):"class"==t||c&&"interface"==e?(H.marked="keyword",L(I("form","class"==t?t:e),Pt,P)):"variable"==t?c&&"declare"==e?(H.marked="keyword",L(N)):c&&("module"==e||"enum"==e||"type"==e)&&H.stream.match(/^\s*\w/,!1)?(H.marked="keyword","enum"==e?L(Xt):"type"==e?L(jt,R("operator"),ft,R(";")):L(I("form"),Ht,R("{"),I("}"),ut,P,P)):c&&"namespace"==e?(H.marked="keyword",L(I("form"),U,N,P)):c&&"abstract"==e?(H.marked="keyword",L(N)):L(I("stat"),nt):"switch"==t?L(I("form"),q,R("{"),I("}","switch"),j,ut,P,P,F):"case"==t?L(U,R(":")):"default"==t?L(R(":")):"catch"==t?L(I("form"),D,$,N,P,F):"export"==t?L(I("stat"),Ut,P):"import"==t?L(I("stat"),qt,P):"async"==t?L(N):"@"==e?L(U,N):V(I("stat"),U,R(";"),P)}function $(t){if("("==t)return L(Ft,R(")"))}function U(t,e){return G(t,e,!1)}function W(t,e){return G(t,e,!0)}function q(t){return"("!=t?V():L(I(")"),Y,R(")"),P)}function G(t,e,a){if(H.state.fatArrowAt==H.stream.start){var r=a?tt:Q;if("("==t)return L(D,I(")"),ct(Ft,")"),P,R("=>"),r,F);if("variable"==t)return V(D,Ht,R("=>"),r,F)}var n=a?J:K;return w.hasOwnProperty(t)?L(n):"function"==t?L(Tt,n):"class"==t||c&&"interface"==e?(H.marked="keyword",L(I("form"),It,P)):"keyword c"==t||"async"==t?L(a?W:U):"("==t?L(I(")"),Y,R(")"),P,n):"operator"==t||"spread"==t?L(a?W:U):"["==t?L(I("]"),Zt,P,n):"{"==t?ht(ot,"}",null,n):"quasi"==t?V(Z,n):"new"==t?L(et(a)):L()}function Y(t){return t.match(/[;\}\)\],]/)?V():V(U)}function K(t,e){return","==t?L(Y):J(t,e,!1)}function J(t,e,a){var r=0==a?K:J,n=0==a?U:W;return"=>"==t?L(D,a?tt:Q,F):"operator"==t?/\+\+|--/.test(e)||c&&"!"==e?L(r):c&&"<"==e&&H.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?L(I(">"),ct(ft,">"),P,r):"?"==e?L(U,R(":"),n):L(n):"quasi"==t?V(Z,r):";"!=t?"("==t?ht(W,")","call",r):"."==t?L(it,r):"["==t?L(I("]"),Y,R("]"),P,r):c&&"as"==e?(H.marked="keyword",L(ft,r)):"regexp"==t?(H.state.lastType=H.marked="operator",H.stream.backUp(H.stream.pos-H.stream.start-1),L(n)):void 0:void 0}function Z(t,e){return"quasi"!=t?V():"${"!=e.slice(e.length-2)?L(Z):L(U,X)}function X(t){if("}"==t)return H.marked="string-2",H.state.tokenize=b,L(Z)}function Q(t){return x(H.stream,H.state),V("{"==t?N:U)}function tt(t){return x(H.stream,H.state),V("{"==t?N:W)}function et(t){return function(e){return"."==e?L(t?rt:at):"variable"==e&&c?L(wt,t?J:K):V(t?W:U)}}function at(t,e){if("target"==e)return H.marked="keyword",L(K)}function rt(t,e){if("target"==e)return H.marked="keyword",L(J)}function nt(t){return":"==t?L(P,N):V(K,R(";"),P)}function it(t){if("variable"==t)return H.marked="property",L()}function ot(t,e){return"async"==t?(H.marked="property",L(ot)):"variable"==t||"keyword"==H.style?(H.marked="property","get"==e||"set"==e?L(lt):(c&&H.state.fatArrowAt==H.stream.start&&(a=H.stream.match(/^\s*:\s*/,!1))&&(H.state.fatArrowAt=H.stream.pos+a[0].length),L(st))):"number"==t||"string"==t?(H.marked=l?"property":H.style+" property",L(st)):"jsonld-keyword"==t?L(st):c&&S(e)?(H.marked="keyword",L(ot)):"["==t?L(U,dt,R("]"),st):"spread"==t?L(W,st):"*"==e?(H.marked="keyword",L(ot)):":"==t?V(st):void 0;var a}function lt(t){return"variable"!=t?V(st):(H.marked="property",L(Tt))}function st(t){return":"==t?L(W):"("==t?V(Tt):void 0}function ct(t,e,a){function r(n,i){if(a?a.indexOf(n)>-1:","==n){var o=H.state.lexical;return"call"==o.info&&(o.pos=(o.pos||0)+1),L((function(a,r){return a==e||r==e?V():V(t)}),r)}return n==e||i==e?L():a&&a.indexOf(";")>-1?V(t):L(R(e))}return function(a,n){return a==e||n==e?L():V(t,r)}}function ht(t,e,a){for(var r=3;r<arguments.length;r++)H.cc.push(arguments[r]);return L(I(e,a),ct(t,e),P)}function ut(t){return"}"==t?L():V(N,ut)}function dt(t,e){if(c){if(":"==t)return L(ft);if("?"==e)return L(dt)}}function pt(t,e){if(c&&(":"==t||"in"==e))return L(ft)}function mt(t){if(c&&":"==t)return H.stream.match(/^\s*\w+\s+is\b/,!1)?L(U,vt,ft):L(ft)}function vt(t,e){if("is"==e)return H.marked="keyword",L()}function ft(t,e){return"keyof"==e||"typeof"==e||"infer"==e||"readonly"==e?(H.marked="keyword",L("typeof"==e?W:ft)):"variable"==t||"void"==e?(H.marked="type",L(xt)):"|"==e||"&"==e?L(ft):"string"==t||"number"==t||"atom"==t?L(xt):"["==t?L(I("]"),ct(ft,"]",","),P,xt):"{"==t?L(I("}"),gt,P,xt):"("==t?L(ct(zt,")"),yt,xt):"<"==t?L(ct(ft,">"),ft):void 0}function yt(t){if("=>"==t)return L(ft)}function gt(t){return t.match(/[\}\)\]]/)?L():","==t||";"==t?L(gt):V(bt,gt)}function bt(t,e){return"variable"==t||"keyword"==H.style?(H.marked="property",L(bt)):"?"==e||"number"==t||"string"==t?L(bt):":"==t?L(ft):"["==t?L(R("variable"),pt,R("]"),bt):"("==t?V(Dt,bt):t.match(/[;\}\)\],]/)?void 0:L()}function zt(t,e){return"variable"==t&&H.stream.match(/^\s*[?:]/,!1)||"?"==e?L(zt):":"==t?L(ft):"spread"==t?L(zt):V(ft)}function xt(t,e){return"<"==e?L(I(">"),ct(ft,">"),P,xt):"|"==e||"."==t||"&"==e?L(ft):"["==t?L(ft,R("]"),xt):"extends"==e||"implements"==e?(H.marked="keyword",L(ft)):"?"==e?L(ft,R(":"),ft):void 0}function wt(t,e){if("<"==e)return L(I(">"),ct(ft,">"),P,xt)}function Mt(){return V(ft,_t)}function _t(t,e){if("="==e)return L(ft)}function At(t,e){return"enum"==e?(H.marked="keyword",L(Xt)):V(Ht,dt,Bt,kt)}function Ht(t,e){return c&&S(e)?(H.marked="keyword",L(Ht)):"variable"==t?(k(e),L()):"spread"==t?L(Ht):"["==t?ht(Lt,"]"):"{"==t?ht(Vt,"}"):void 0}function Vt(t,e){return"variable"!=t||H.stream.match(/^\s*:/,!1)?("variable"==t&&(H.marked="property"),"spread"==t?L(Ht):"}"==t?V():"["==t?L(U,R("]"),R(":"),Vt):L(R(":"),Ht,Bt)):(k(e),L(Bt))}function Lt(){return V(Ht,Bt)}function Bt(t,e){if("="==e)return L(W)}function kt(t){if(","==t)return L(At)}function Ct(t,e){if("keyword b"==t&&"else"==e)return L(I("form","else"),N,P)}function St(t,e){return"await"==e?L(St):"("==t?L(I(")"),Et,P):void 0}function Et(t){return"var"==t?L(At,Ot):"variable"==t?L(Ot):V(Ot)}function Ot(t,e){return")"==t?L():";"==t?L(Ot):"in"==e||"of"==e?(H.marked="keyword",L(U,Ot)):V(U,Ot)}function Tt(t,e){return"*"==e?(H.marked="keyword",L(Tt)):"variable"==t?(k(e),L(Tt)):"("==t?L(D,I(")"),ct(Ft,")"),P,mt,N,F):c&&"<"==e?L(I(">"),ct(Mt,">"),P,Tt):void 0}function Dt(t,e){return"*"==e?(H.marked="keyword",L(Dt)):"variable"==t?(k(e),L(Dt)):"("==t?L(D,I(")"),ct(Ft,")"),P,mt,F):c&&"<"==e?L(I(">"),ct(Mt,">"),P,Dt):void 0}function jt(t,e){return"keyword"==t||"variable"==t?(H.marked="type",L(jt)):"<"==e?L(I(">"),ct(Mt,">"),P):void 0}function Ft(t,e){return"@"==e&&L(U,Ft),"spread"==t?L(Ft):c&&S(e)?(H.marked="keyword",L(Ft)):c&&"this"==t?L(dt,Bt):V(Ht,dt,Bt)}function It(t,e){return"variable"==t?Pt(t,e):Rt(t,e)}function Pt(t,e){if("variable"==t)return k(e),L(Rt)}function Rt(t,e){return"<"==e?L(I(">"),ct(Mt,">"),P,Rt):"extends"==e||"implements"==e||c&&","==t?("implements"==e&&(H.marked="keyword"),L(c?ft:U,Rt)):"{"==t?L(I("}"),Nt,P):void 0}function Nt(t,e){return"async"==t||"variable"==t&&("static"==e||"get"==e||"set"==e||c&&S(e))&&H.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(H.marked="keyword",L(Nt)):"variable"==t||"keyword"==H.style?(H.marked="property",L($t,Nt)):"number"==t||"string"==t?L($t,Nt):"["==t?L(U,dt,R("]"),$t,Nt):"*"==e?(H.marked="keyword",L(Nt)):c&&"("==t?V(Dt,Nt):";"==t||","==t?L(Nt):"}"==t?L():"@"==e?L(U,Nt):void 0}function $t(t,e){if("?"==e)return L($t);if(":"==t)return L(ft,Bt);if("="==e)return L(W);var a=H.state.lexical.prev;return V(a&&"interface"==a.info?Dt:Tt)}function Ut(t,e){return"*"==e?(H.marked="keyword",L(Jt,R(";"))):"default"==e?(H.marked="keyword",L(U,R(";"))):"{"==t?L(ct(Wt,"}"),Jt,R(";")):V(N)}function Wt(t,e){return"as"==e?(H.marked="keyword",L(R("variable"))):"variable"==t?V(W,Wt):void 0}function qt(t){return"string"==t?L():"("==t?V(U):"."==t?V(K):V(Gt,Yt,Jt)}function Gt(t,e){return"{"==t?ht(Gt,"}"):("variable"==t&&k(e),"*"==e&&(H.marked="keyword"),L(Kt))}function Yt(t){if(","==t)return L(Gt,Yt)}function Kt(t,e){if("as"==e)return H.marked="keyword",L(Gt)}function Jt(t,e){if("from"==e)return H.marked="keyword",L(U)}function Zt(t){return"]"==t?L():V(ct(W,"]"))}function Xt(){return V(I("form"),Ht,R("{"),I("}"),ct(Qt,"}"),P,P)}function Qt(){return V(Ht,Bt)}function te(t,e){return"operator"==t.lastType||","==t.lastType||d.test(e.charAt(0))||/[,.]/.test(e.charAt(0))}function ee(t,e,a){return e.tokenize==f&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(e.lastType)||"quasi"==e.lastType&&/\{\s*$/.test(t.string.slice(0,t.pos-(a||0)))}return F.lex=!0,P.lex=!0,{startState:function(t){var a={tokenize:f,lastType:"sof",cc:[],lexical:new M((t||0)-i,0,"block",!1),localVars:e.localVars,context:e.localVars&&new E(null,null,!1),indented:t||0};return e.globalVars&&"object"==typeof e.globalVars&&(a.globalVars=e.globalVars),a},token:function(t,e){if(t.sol()&&(e.lexical.hasOwnProperty("align")||(e.lexical.align=!1),e.indented=t.indentation(),x(t,e)),e.tokenize!=g&&t.eatSpace())return null;var a=e.tokenize(t,e);return"comment"==r?a:(e.lastType="operator"!=r||"++"!=n&&"--"!=n?r:"incdec",A(e,a,r,n,t))},indent:function(t,r){if(t.tokenize==g||t.tokenize==b)return a.Pass;if(t.tokenize!=f)return 0;var n,l=r&&r.charAt(0),s=t.lexical;if(!/^\s*else\b/.test(r))for(var c=t.cc.length-1;c>=0;--c){var h=t.cc[c];if(h==P)s=s.prev;else if(h!=Ct)break}for(;("stat"==s.type||"form"==s.type)&&("}"==l||(n=t.cc[t.cc.length-1])&&(n==K||n==J)&&!/^[,\.=+\-*:?[\(]/.test(r));)s=s.prev;o&&")"==s.type&&"stat"==s.prev.type&&(s=s.prev);var u=s.type,d=l==u;return"vardef"==u?s.indented+("operator"==t.lastType||","==t.lastType?s.info.length+1:0):"form"==u&&"{"==l?s.indented:"form"==u?s.indented+i:"stat"==u?s.indented+(te(t,r)?o||i:0):"switch"!=s.info||d||0==e.doubleIndentSwitch?s.align?s.column+(d?0:1):s.indented+(d?0:i):s.indented+(/^(?:case|default)\b/.test(r)?i:2*i)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:s?null:"/*",blockCommentEnd:s?null:"*/",blockCommentContinue:s?null:" * ",lineComment:s?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:s?"json":"javascript",jsonldMode:l,jsonMode:s,expressionAllowed:ee,skipExpression:function(t){var e=t.cc[t.cc.length-1];e!=U&&e!=W||t.cc.pop()}}})),a.registerHelper("wordChars","javascript",/[\w$]/),a.defineMIME("text/javascript","javascript"),a.defineMIME("text/ecmascript","javascript"),a.defineMIME("application/javascript","javascript"),a.defineMIME("application/x-javascript","javascript"),a.defineMIME("application/ecmascript","javascript"),a.defineMIME("application/json",{name:"javascript",json:!0}),a.defineMIME("application/x-json",{name:"javascript",json:!0}),a.defineMIME("application/manifest+json",{name:"javascript",json:!0}),a.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),a.defineMIME("text/typescript",{name:"javascript",typescript:!0}),a.defineMIME("application/typescript",{name:"javascript",typescript:!0})})),kr((function(t,e){!function(t){function e(t){for(var e;null!=(e=t.next());)if("`"==e&&!t.eat("`"))return"variable-2";return t.backUp(t.current().length-1),t.eatWhile(/\w/)?"variable-2":null}function a(t){for(var e;null!=(e=t.next());)if('"'==e&&!t.eat('"'))return"variable-2";return t.backUp(t.current().length-1),t.eatWhile(/\w/)?"variable-2":null}function r(t){return t.eat("@")&&(t.match("session."),t.match("local."),t.match("global.")),t.eat("'")?(t.match(/^.*'/),"variable-2"):t.eat('"')?(t.match(/^.*"/),"variable-2"):t.eat("`")?(t.match(/^.*`/),"variable-2"):t.match(/^[0-9a-zA-Z$\.\_]+/)?"variable-2":null}function n(t){return t.eat("N")?"atom":t.match(/^[a-zA-Z.#!?]/)?"variable-2":null}t.defineMode("sql",(function(e,a){var r=a.client||{},n=a.atoms||{false:!0,true:!0,null:!0},s=a.builtin||o(l),c=a.keywords||o(i),h=a.operatorChars||/^[*+\-%<>!=&|~^\/]/,u=a.support||{},d=a.hooks||{},p=a.dateSQL||{date:!0,time:!0,timestamp:!0},m=!1!==a.backslashStringEscapes,v=a.brackets||/^[\{}\(\)\[\]]/,f=a.punctuation||/^[;.,:]/;function y(t,e){var a=t.next();if(d[a]){var i=d[a](t,e);if(!1!==i)return i}if(u.hexNumber&&("0"==a&&t.match(/^[xX][0-9a-fA-F]+/)||("x"==a||"X"==a)&&t.match(/^'[0-9a-fA-F]+'/)))return"number";if(u.binaryNumber&&(("b"==a||"B"==a)&&t.match(/^'[01]+'/)||"0"==a&&t.match(/^b[01]+/)))return"number";if(a.charCodeAt(0)>47&&a.charCodeAt(0)<58)return t.match(/^[0-9]*(\.[0-9]+)?([eE][-+]?[0-9]+)?/),u.decimallessFloat&&t.match(/^\.(?!\.)/),"number";if("?"==a&&(t.eatSpace()||t.eol()||t.eat(";")))return"variable-3";if("'"==a||'"'==a&&u.doubleQuote)return e.tokenize=g(a),e.tokenize(t,e);if((u.nCharCast&&("n"==a||"N"==a)||u.charsetCast&&"_"==a&&t.match(/[a-z][a-z0-9]*/i))&&("'"==t.peek()||'"'==t.peek()))return"keyword";if(u.escapeConstant&&("e"==a||"E"==a)&&("'"==t.peek()||'"'==t.peek()&&u.doubleQuote))return e.tokenize=function(t,e){return(e.tokenize=g(t.next(),!0))(t,e)},"keyword";if(u.commentSlashSlash&&"/"==a&&t.eat("/"))return t.skipToEnd(),"comment";if(u.commentHash&&"#"==a||"-"==a&&t.eat("-")&&(!u.commentSpaceRequired||t.eat(" ")))return t.skipToEnd(),"comment";if("/"==a&&t.eat("*"))return e.tokenize=b(1),e.tokenize(t,e);if("."!=a){if(h.test(a))return t.eatWhile(h),"operator";if(v.test(a))return"bracket";if(f.test(a))return t.eatWhile(f),"punctuation";if("{"==a&&(t.match(/^( )*(d|D|t|T|ts|TS)( )*'[^']*'( )*}/)||t.match(/^( )*(d|D|t|T|ts|TS)( )*"[^"]*"( )*}/)))return"number";t.eatWhile(/^[_\w\d]/);var o=t.current().toLowerCase();return p.hasOwnProperty(o)&&(t.match(/^( )+'[^']*'/)||t.match(/^( )+"[^"]*"/))?"number":n.hasOwnProperty(o)?"atom":s.hasOwnProperty(o)?"builtin":c.hasOwnProperty(o)?"keyword":r.hasOwnProperty(o)?"string-2":null}return u.zerolessFloat&&t.match(/^(?:\d+(?:e[+-]?\d+)?)/i)?"number":t.match(/^\.+/)?null:u.ODBCdotTable&&t.match(/^[\w\d_$#]+/)?"variable-2":void 0}function g(t,e){return function(a,r){for(var n,i=!1;null!=(n=a.next());){if(n==t&&!i){r.tokenize=y;break}i=(m||e)&&!i&&"\\"==n}return"string"}}function b(t){return function(e,a){var r=e.match(/^.*?(\/\*|\*\/)/);return r?"/*"==r[1]?a.tokenize=b(t+1):a.tokenize=t>1?b(t-1):y:e.skipToEnd(),"comment"}}function z(t,e,a){e.context={prev:e.context,indent:t.indentation(),col:t.column(),type:a}}function x(t){t.indent=t.context.indent,t.context=t.context.prev}return{startState:function(){return{tokenize:y,context:null}},token:function(t,e){if(t.sol()&&e.context&&null==e.context.align&&(e.context.align=!1),e.tokenize==y&&t.eatSpace())return null;var a=e.tokenize(t,e);if("comment"==a)return a;e.context&&null==e.context.align&&(e.context.align=!0);var r=t.current();return"("==r?z(t,e,")"):"["==r?z(t,e,"]"):e.context&&e.context.type==r&&x(e),a},indent:function(a,r){var n=a.context;if(!n)return t.Pass;var i=r.charAt(0)==n.type;return n.align?n.col+(i?0:1):n.indent+(i?0:e.indentUnit)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:u.commentSlashSlash?"//":u.commentHash?"#":"--",closeBrackets:"()[]{}''\"\"``"}}));var i="alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit ";function o(t){for(var e={},a=t.split(" "),r=0;r<a.length;++r)e[a[r]]=!0;return e}var l="bool boolean bit blob enum long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision real date datetime year unsigned signed decimal numeric";t.defineMIME("text/x-sql",{name:"sql",keywords:o(i+"begin"),builtin:o(l),atoms:o("false true null unknown"),dateSQL:o("date time timestamp"),support:o("ODBCdotTable doubleQuote binaryNumber hexNumber")}),t.defineMIME("text/x-mssql",{name:"sql",client:o("$partition binary_checksum checksum connectionproperty context_info current_request_id error_line error_message error_number error_procedure error_severity error_state formatmessage get_filestream_transaction_context getansinull host_id host_name isnull isnumeric min_active_rowversion newid newsequentialid rowcount_big xact_state object_id"),keywords:o(i+"begin trigger proc view index for add constraint key primary foreign collate clustered nonclustered declare exec go if use index holdlock nolock nowait paglock readcommitted readcommittedlock readpast readuncommitted repeatableread rowlock serializable snapshot tablock tablockx updlock with"),builtin:o("bigint numeric bit smallint decimal smallmoney int tinyint money float real char varchar text nchar nvarchar ntext binary varbinary image cursor timestamp hierarchyid uniqueidentifier sql_variant xml table "),atoms:o("is not null like and or in left right between inner outer join all any some cross unpivot pivot exists"),operatorChars:/^[*+\-%<>!=^\&|\/]/,brackets:/^[\{}\(\)]/,punctuation:/^[;.,:/]/,backslashStringEscapes:!1,dateSQL:o("date datetimeoffset datetime2 smalldatetime datetime time"),hooks:{"@":r}}),t.defineMIME("text/x-mysql",{name:"sql",client:o("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:o(i+"accessible action add after algorithm all analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general get global grant grants group group_concat handler hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show signal slave slow smallint snapshot soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:o("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:o("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:o("date time timestamp"),support:o("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":r,"`":e,"\\":n}}),t.defineMIME("text/x-mariadb",{name:"sql",client:o("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:o(i+"accessible action add after algorithm all always analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general generated get global grant grants group groupby_concat handler hard hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password persistent phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show shutdown signal slave slow smallint snapshot soft soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views virtual warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:o("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:o("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:o("date time timestamp"),support:o("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":r,"`":e,"\\":n}}),t.defineMIME("text/x-sqlite",{name:"sql",client:o("auth backup bail binary changes check clone databases dbinfo dump echo eqp exit explain fullschema headers help import imposter indexes iotrace limit lint load log mode nullvalue once open output print prompt quit read restore save scanstats schema separator session shell show stats system tables testcase timeout timer trace vfsinfo vfslist vfsname width"),keywords:o(i+"abort action add after all analyze attach autoincrement before begin cascade case cast check collate column commit conflict constraint cross current_date current_time current_timestamp database default deferrable deferred detach each else end escape except exclusive exists explain fail for foreign full glob if ignore immediate index indexed initially inner instead intersect isnull key left limit match natural no notnull null of offset outer plan pragma primary query raise recursive references regexp reindex release rename replace restrict right rollback row savepoint temp temporary then to transaction trigger unique using vacuum view virtual when with without"),builtin:o("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text clob bigint int int2 int8 integer float double char varchar date datetime year unsigned signed numeric real"),atoms:o("null current_date current_time current_timestamp"),operatorChars:/^[*+\-%<>!=&|/~]/,dateSQL:o("date time timestamp datetime"),support:o("decimallessFloat zerolessFloat"),identifierQuote:'"',hooks:{"@":r,":":r,"?":r,$:r,'"':a,"`":e}}),t.defineMIME("text/x-cassandra",{name:"sql",client:{},keywords:o("add all allow alter and any apply as asc authorize batch begin by clustering columnfamily compact consistency count create custom delete desc distinct drop each_quorum exists filtering from grant if in index insert into key keyspace keyspaces level limit local_one local_quorum modify nan norecursive nosuperuser not of on one order password permission permissions primary quorum rename revoke schema select set storage superuser table three to token truncate ttl two type unlogged update use user users using values where with writetime"),builtin:o("ascii bigint blob boolean counter decimal double float frozen inet int list map static text timestamp timeuuid tuple uuid varchar varint"),atoms:o("false true infinity NaN"),operatorChars:/^[<>=]/,dateSQL:{},support:o("commentSlashSlash decimallessFloat"),hooks:{}}),t.defineMIME("text/x-plsql",{name:"sql",client:o("appinfo arraysize autocommit autoprint autorecovery autotrace blockterminator break btitle cmdsep colsep compatibility compute concat copycommit copytypecheck define describe echo editfile embedded escape exec execute feedback flagger flush heading headsep instance linesize lno loboffset logsource long longchunksize markup native newpage numformat numwidth pagesize pause pno recsep recsepchar release repfooter repheader serveroutput shiftinout show showmode size spool sqlblanklines sqlcase sqlcode sqlcontinue sqlnumber sqlpluscompatibility sqlprefix sqlprompt sqlterminator suffix tab term termout time timing trimout trimspool ttitle underline verify version wrap"),keywords:o("abort accept access add all alter and any array arraylen as asc assert assign at attributes audit authorization avg base_table begin between binary_integer body boolean by case cast char char_base check close cluster clusters colauth column comment commit compress connect connected constant constraint crash create current currval cursor data_base database date dba deallocate debugoff debugon decimal declare default definition delay delete desc digits dispose distinct do drop else elseif elsif enable end entry escape exception exception_init exchange exclusive exists exit external fast fetch file for force form from function generic goto grant group having identified if immediate in increment index indexes indicator initial initrans insert interface intersect into is key level library like limited local lock log logging long loop master maxextents maxtrans member minextents minus mislabel mode modify multiset new next no noaudit nocompress nologging noparallel not nowait number_base object of off offline on online only open option or order out package parallel partition pctfree pctincrease pctused pls_integer positive positiven pragma primary prior private privileges procedure public raise range raw read rebuild record ref references refresh release rename replace resource restrict return returning returns reverse revoke rollback row rowid rowlabel rownum rows run savepoint schema segment select separate session set share snapshot some space split sql start statement storage subtype successful synonym tabauth table tables tablespace task terminate then to trigger truncate type union unique unlimited unrecoverable unusable update use using validate value values variable view views when whenever where while with work"),builtin:o("abs acos add_months ascii asin atan atan2 average bfile bfilename bigserial bit blob ceil character chartorowid chr clob concat convert cos cosh count dec decode deref dual dump dup_val_on_index empty error exp false float floor found glb greatest hextoraw initcap instr instrb int integer isopen last_day least length lengthb ln lower lpad ltrim lub make_ref max min mlslabel mod months_between natural naturaln nchar nclob new_time next_day nextval nls_charset_decl_len nls_charset_id nls_charset_name nls_initcap nls_lower nls_sort nls_upper nlssort no_data_found notfound null number numeric nvarchar2 nvl others power rawtohex real reftohex round rowcount rowidtochar rowtype rpad rtrim serial sign signtype sin sinh smallint soundex sqlcode sqlerrm sqrt stddev string substr substrb sum sysdate tan tanh to_char text to_date to_label to_multi_byte to_number to_single_byte translate true trunc uid unlogged upper user userenv varchar varchar2 variance varying vsize xml"),operatorChars:/^[*\/+\-%<>!=~]/,dateSQL:o("date time timestamp"),support:o("doubleQuote nCharCast zerolessFloat binaryNumber hexNumber")}),t.defineMIME("text/x-hive",{name:"sql",keywords:o("select alter $elem$ $key$ $value$ add after all analyze and archive as asc before between binary both bucket buckets by cascade case cast change cluster clustered clusterstatus collection column columns comment compute concatenate continue create cross cursor data database databases dbproperties deferred delete delimited desc describe directory disable distinct distribute drop else enable end escaped exclusive exists explain export extended external fetch fields fileformat first format formatted from full function functions grant group having hold_ddltime idxproperties if import in index indexes inpath inputdriver inputformat insert intersect into is items join keys lateral left like limit lines load local location lock locks mapjoin materialized minus msck no_drop nocompress not of offline on option or order out outer outputdriver outputformat overwrite partition partitioned partitions percent plus preserve procedure purge range rcfile read readonly reads rebuild recordreader recordwriter recover reduce regexp rename repair replace restrict revoke right rlike row schema schemas semi sequencefile serde serdeproperties set shared show show_database sort sorted ssl statistics stored streamtable table tables tablesample tblproperties temporary terminated textfile then tmp to touch transform trigger unarchive undo union uniquejoin unlock update use using utc utc_tmestamp view when where while with admin authorization char compact compactions conf cube current current_date current_timestamp day decimal defined dependency directories elem_type exchange file following for grouping hour ignore inner interval jar less logical macro minute month more none noscan over owner partialscan preceding pretty principals protection reload rewrite role roles rollup rows second server sets skewed transactions truncate unbounded unset uri user values window year"),builtin:o("bool boolean long timestamp tinyint smallint bigint int float double date datetime unsigned string array struct map uniontype key_type utctimestamp value_type varchar"),atoms:o("false true null unknown"),operatorChars:/^[*+\-%<>!=]/,dateSQL:o("date timestamp"),support:o("ODBCdotTable doubleQuote binaryNumber hexNumber")}),t.defineMIME("text/x-pgsql",{name:"sql",client:o("source"),keywords:o(i+"a abort abs absent absolute access according action ada add admin after aggregate alias all allocate also alter always analyse analyze and any are array array_agg array_max_cardinality as asc asensitive assert assertion assignment asymmetric at atomic attach attribute attributes authorization avg backward base64 before begin begin_frame begin_partition bernoulli between bigint binary bit bit_length blob blocked bom boolean both breadth by c cache call called cardinality cascade cascaded case cast catalog catalog_name ceil ceiling chain char char_length character character_length character_set_catalog character_set_name character_set_schema characteristics characters check checkpoint class class_origin clob close cluster coalesce cobol collate collation collation_catalog collation_name collation_schema collect column column_name columns command_function command_function_code comment comments commit committed concurrently condition condition_number configuration conflict connect connection connection_name constant constraint constraint_catalog constraint_name constraint_schema constraints constructor contains content continue control conversion convert copy corr corresponding cost count covar_pop covar_samp create cross csv cube cume_dist current current_catalog current_date current_default_transform_group current_path current_role current_row current_schema current_time current_timestamp current_transform_group_for_type current_user cursor cursor_name cycle data database datalink datatype date datetime_interval_code datetime_interval_precision day db deallocate debug dec decimal declare default defaults deferrable deferred defined definer degree delete delimiter delimiters dense_rank depends depth deref derived desc describe descriptor detach detail deterministic diagnostics dictionary disable discard disconnect dispatch distinct dlnewcopy dlpreviouscopy dlurlcomplete dlurlcompleteonly dlurlcompletewrite dlurlpath dlurlpathonly dlurlpathwrite dlurlscheme dlurlserver dlvalue do document domain double drop dump dynamic dynamic_function dynamic_function_code each element else elseif elsif empty enable encoding encrypted end end_frame end_partition endexec enforced enum equals errcode error escape event every except exception exclude excluding exclusive exec execute exists exit exp explain expression extension external extract false family fetch file filter final first first_value flag float floor following for force foreach foreign fortran forward found frame_row free freeze from fs full function functions fusion g general generated get global go goto grant granted greatest group grouping groups handler having header hex hierarchy hint hold hour id identity if ignore ilike immediate immediately immutable implementation implicit import in include including increment indent index indexes indicator info inherit inherits initially inline inner inout input insensitive insert instance instantiable instead int integer integrity intersect intersection interval into invoker is isnull isolation join k key key_member key_type label lag language large last last_value lateral lead leading leakproof least left length level library like like_regex limit link listen ln load local localtime localtimestamp location locator lock locked log logged loop lower m map mapping match matched materialized max max_cardinality maxvalue member merge message message_length message_octet_length message_text method min minute minvalue mod mode modifies module month more move multiset mumps name names namespace national natural nchar nclob nesting new next nfc nfd nfkc nfkd nil no none normalize normalized not nothing notice notify notnull nowait nth_value ntile null nullable nullif nulls number numeric object occurrences_regex octet_length octets of off offset oids old on only open operator option options or order ordering ordinality others out outer output over overlaps overlay overriding owned owner p pad parallel parameter parameter_mode parameter_name parameter_ordinal_position parameter_specific_catalog parameter_specific_name parameter_specific_schema parser partial partition pascal passing passthrough password path percent percent_rank percentile_cont percentile_disc perform period permission pg_context pg_datatype_name pg_exception_context pg_exception_detail pg_exception_hint placing plans pli policy portion position position_regex power precedes preceding precision prepare prepared preserve primary print_strict_params prior privileges procedural procedure procedures program public publication query quote raise range rank read reads real reassign recheck recovery recursive ref references referencing refresh regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy regr_syy reindex relative release rename repeatable replace replica requiring reset respect restart restore restrict result result_oid return returned_cardinality returned_length returned_octet_length returned_sqlstate returning returns reverse revoke right role rollback rollup routine routine_catalog routine_name routine_schema routines row row_count row_number rows rowtype rule savepoint scale schema schema_name schemas scope scope_catalog scope_name scope_schema scroll search second section security select selective self sensitive sequence sequences serializable server server_name session session_user set setof sets share show similar simple size skip slice smallint snapshot some source space specific specific_name specifictype sql sqlcode sqlerror sqlexception sqlstate sqlwarning sqrt stable stacked standalone start state statement static statistics stddev_pop stddev_samp stdin stdout storage strict strip structure style subclass_origin submultiset subscription substring substring_regex succeeds sum symmetric sysid system system_time system_user t table table_name tables tablesample tablespace temp template temporary text then ties time timestamp timezone_hour timezone_minute to token top_level_count trailing transaction transaction_active transactions_committed transactions_rolled_back transform transforms translate translate_regex translation treat trigger trigger_catalog trigger_name trigger_schema trim trim_array true truncate trusted type types uescape unbounded uncommitted under unencrypted union unique unknown unlink unlisten unlogged unnamed unnest until untyped update upper uri usage use_column use_variable user user_defined_type_catalog user_defined_type_code user_defined_type_name user_defined_type_schema using vacuum valid validate validator value value_of values var_pop var_samp varbinary varchar variable_conflict variadic varying verbose version versioning view views volatile warning when whenever where while whitespace width_bucket window with within without work wrapper write xml xmlagg xmlattributes xmlbinary xmlcast xmlcomment xmlconcat xmldeclaration xmldocument xmlelement xmlexists xmlforest xmliterate xmlnamespaces xmlparse xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltext xmlvalidate year yes zone"),builtin:o("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),atoms:o("false true null unknown"),operatorChars:/^[*\/+\-%<>!=&|^\/#@?~]/,backslashStringEscapes:!1,dateSQL:o("date time timestamp"),support:o("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast escapeConstant")}),t.defineMIME("text/x-gql",{name:"sql",keywords:o("ancestor and asc by contains desc descendant distinct from group has in is limit offset on order select superset where"),atoms:o("false true"),builtin:o("blob datetime first key __key__ string integer double boolean null"),operatorChars:/^[*+\-%<>!=]/}),t.defineMIME("text/x-gpsql",{name:"sql",client:o("source"),keywords:o("abort absolute access action active add admin after aggregate all also alter always analyse analyze and any array as asc assertion assignment asymmetric at authorization backward before begin between bigint binary bit boolean both by cache called cascade cascaded case cast chain char character characteristics check checkpoint class close cluster coalesce codegen collate column comment commit committed concurrency concurrently configuration connection constraint constraints contains content continue conversion copy cost cpu_rate_limit create createdb createexttable createrole createuser cross csv cube current current_catalog current_date current_role current_schema current_time current_timestamp current_user cursor cycle data database day deallocate dec decimal declare decode default defaults deferrable deferred definer delete delimiter delimiters deny desc dictionary disable discard distinct distributed do document domain double drop dxl each else enable encoding encrypted end enum errors escape every except exchange exclude excluding exclusive execute exists explain extension external extract false family fetch fields filespace fill filter first float following for force foreign format forward freeze from full function global grant granted greatest group group_id grouping handler hash having header hold host hour identity if ignore ilike immediate immutable implicit in including inclusive increment index indexes inherit inherits initially inline inner inout input insensitive insert instead int integer intersect interval into invoker is isnull isolation join key language large last leading least left level like limit list listen load local localtime localtimestamp location lock log login mapping master match maxvalue median merge minute minvalue missing mode modifies modify month move name names national natural nchar new newline next no nocreatedb nocreateexttable nocreaterole nocreateuser noinherit nologin none noovercommit nosuperuser not nothing notify notnull nowait null nullif nulls numeric object of off offset oids old on only operator option options or order ordered others out outer over overcommit overlaps overlay owned owner parser partial partition partitions passing password percent percentile_cont percentile_disc placing plans position preceding precision prepare prepared preserve primary prior privileges procedural procedure protocol queue quote randomly range read readable reads real reassign recheck recursive ref references reindex reject relative release rename repeatable replace replica reset resource restart restrict returning returns revoke right role rollback rollup rootpartition row rows rule savepoint scatter schema scroll search second security segment select sequence serializable session session_user set setof sets share show similar simple smallint some split sql stable standalone start statement statistics stdin stdout storage strict strip subpartition subpartitions substring superuser symmetric sysid system table tablespace temp template temporary text then threshold ties time timestamp to trailing transaction treat trigger trim true truncate trusted type unbounded uncommitted unencrypted union unique unknown unlisten until update user using vacuum valid validation validator value values varchar variadic varying verbose version view volatile web when where whitespace window with within without work writable write xml xmlattributes xmlconcat xmlelement xmlexists xmlforest xmlparse xmlpi xmlroot xmlserialize year yes zone"),builtin:o("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),atoms:o("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:o("date time timestamp"),support:o("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast")}),t.defineMIME("text/x-sparksql",{name:"sql",keywords:o("add after all alter analyze and anti archive array as asc at between bucket buckets by cache cascade case cast change clear cluster clustered codegen collection column columns comment commit compact compactions compute concatenate cost create cross cube current current_date current_timestamp database databases data dbproperties defined delete delimited deny desc describe dfs directories distinct distribute drop else end escaped except exchange exists explain export extended external false fields fileformat first following for format formatted from full function functions global grant group grouping having if ignore import in index indexes inner inpath inputformat insert intersect interval into is items join keys last lateral lazy left like limit lines list load local location lock locks logical macro map minus msck natural no not null nulls of on optimize option options or order out outer outputformat over overwrite partition partitioned partitions percent preceding principals purge range recordreader recordwriter recover reduce refresh regexp rename repair replace reset restrict revoke right rlike role roles rollback rollup row rows schema schemas select semi separated serde serdeproperties set sets show skewed sort sorted start statistics stored stratify struct table tables tablesample tblproperties temp temporary terminated then to touch transaction transactions transform true truncate unarchive unbounded uncache union unlock unset use using values view when where window with"),builtin:o("tinyint smallint int bigint boolean float double string binary timestamp decimal array map struct uniontype delimited serde sequencefile textfile rcfile inputformat outputformat"),atoms:o("false true null"),operatorChars:/^[*\/+\-%<>!=~&|^]/,dateSQL:o("date time timestamp"),support:o("ODBCdotTable doubleQuote zerolessFloat")}),t.defineMIME("text/x-esper",{name:"sql",client:o("source"),keywords:o("alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit after all and as at asc avedev avg between by case cast coalesce count create current_timestamp day days delete define desc distinct else end escape events every exists false first from full group having hour hours in inner insert instanceof into irstream is istream join last lastweekday left limit like max match_recognize matches median measures metadatasql min minute minutes msec millisecond milliseconds not null offset on or order outer output partition pattern prev prior regexp retain-union retain-intersection right rstream sec second seconds select set some snapshot sql stddev sum then true unidirectional until update variable weekday when where window"),builtin:{},atoms:o("false true null"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:o("time"),support:o("decimallessFloat zerolessFloat binaryNumber hexNumber")})}(Ls)})),kr((function(t,e){!function(t){function e(t){for(var e={},a=0;a<t.length;++a)e[t[a].toLowerCase()]=!0;return e}t.defineMode("css",(function(e,a){var r=a.inline;a.propertyKeywords||(a=t.resolveMode("text/css"));var n,i,o=e.indentUnit,l=a.tokenHooks,s=a.documentTypes||{},c=a.mediaTypes||{},h=a.mediaFeatures||{},u=a.mediaValueKeywords||{},d=a.propertyKeywords||{},p=a.nonStandardPropertyKeywords||{},m=a.fontProperties||{},v=a.counterDescriptors||{},f=a.colorKeywords||{},y=a.valueKeywords||{},g=a.allowNested,b=a.lineComment,z=!0===a.supportsAtComponent,x=!1!==e.highlightNonStandardPropertyKeywords;function w(t,e){return n=e,t}function M(t,e){var a=t.next();if(l[a]){var r=l[a](t,e);if(!1!==r)return r}return"@"==a?(t.eatWhile(/[\w\\\-]/),w("def",t.current())):"="==a||("~"==a||"|"==a)&&t.eat("=")?w(null,"compare"):'"'==a||"'"==a?(e.tokenize=_(a),e.tokenize(t,e)):"#"==a?(t.eatWhile(/[\w\\\-]/),w("atom","hash")):"!"==a?(t.match(/^\s*\w*/),w("keyword","important")):/\d/.test(a)||"."==a&&t.eat(/\d/)?(t.eatWhile(/[\w.%]/),w("number","unit")):"-"!==a?/[,+>*\/]/.test(a)?w(null,"select-op"):"."==a&&t.match(/^-?[_a-z][_a-z0-9-]*/i)?w("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(a)?w(null,a):t.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(t.current())&&(e.tokenize=A),w("variable callee","variable")):/[\w\\\-]/.test(a)?(t.eatWhile(/[\w\\\-]/),w("property","word")):w(null,null):/[\d.]/.test(t.peek())?(t.eatWhile(/[\w.%]/),w("number","unit")):t.match(/^-[\w\\\-]*/)?(t.eatWhile(/[\w\\\-]/),t.match(/^\s*:/,!1)?w("variable-2","variable-definition"):w("variable-2","variable")):t.match(/^\w+-/)?w("meta","meta"):void 0}function _(t){return function(e,a){for(var r,n=!1;null!=(r=e.next());){if(r==t&&!n){")"==t&&e.backUp(1);break}n=!n&&"\\"==r}return(r==t||!n&&")"!=t)&&(a.tokenize=null),w("string","string")}}function A(t,e){return t.next(),t.match(/^\s*[\"\')]/,!1)?e.tokenize=null:e.tokenize=_(")"),w(null,"(")}function H(t,e,a){this.type=t,this.indent=e,this.prev=a}function V(t,e,a,r){return t.context=new H(a,e.indentation()+(!1===r?0:o),t.context),a}function L(t){return t.context.prev&&(t.context=t.context.prev),t.context.type}function B(t,e,a){return S[a.context.type](t,e,a)}function k(t,e,a,r){for(var n=r||1;n>0;n--)a.context=a.context.prev;return B(t,e,a)}function C(t){var e=t.current().toLowerCase();i=y.hasOwnProperty(e)?"atom":f.hasOwnProperty(e)?"keyword":"variable"}var S={top:function(t,e,a){if("{"==t)return V(a,e,"block");if("}"==t&&a.context.prev)return L(a);if(z&&/@component/i.test(t))return V(a,e,"atComponentBlock");if(/^@(-moz-)?document$/i.test(t))return V(a,e,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(t))return V(a,e,"atBlock");if(/^@(font-face|counter-style)/i.test(t))return a.stateArg=t,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(t))return"keyframes";if(t&&"@"==t.charAt(0))return V(a,e,"at");if("hash"==t)i="builtin";else if("word"==t)i="tag";else{if("variable-definition"==t)return"maybeprop";if("interpolation"==t)return V(a,e,"interpolation");if(":"==t)return"pseudo";if(g&&"("==t)return V(a,e,"parens")}return a.context.type},block:function(t,e,a){if("word"==t){var r=e.current().toLowerCase();return d.hasOwnProperty(r)?(i="property","maybeprop"):p.hasOwnProperty(r)?(i=x?"string-2":"property","maybeprop"):g?(i=e.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(i+=" error","maybeprop")}return"meta"==t?"block":g||"hash"!=t&&"qualifier"!=t?S.top(t,e,a):(i="error","block")},maybeprop:function(t,e,a){return":"==t?V(a,e,"prop"):B(t,e,a)},prop:function(t,e,a){if(";"==t)return L(a);if("{"==t&&g)return V(a,e,"propBlock");if("}"==t||"{"==t)return k(t,e,a);if("("==t)return V(a,e,"parens");if("hash"!=t||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(e.current())){if("word"==t)C(e);else if("interpolation"==t)return V(a,e,"interpolation")}else i+=" error";return"prop"},propBlock:function(t,e,a){return"}"==t?L(a):"word"==t?(i="property","maybeprop"):a.context.type},parens:function(t,e,a){return"{"==t||"}"==t?k(t,e,a):")"==t?L(a):"("==t?V(a,e,"parens"):"interpolation"==t?V(a,e,"interpolation"):("word"==t&&C(e),"parens")},pseudo:function(t,e,a){return"meta"==t?"pseudo":"word"==t?(i="variable-3",a.context.type):B(t,e,a)},documentTypes:function(t,e,a){return"word"==t&&s.hasOwnProperty(e.current())?(i="tag",a.context.type):S.atBlock(t,e,a)},atBlock:function(t,e,a){if("("==t)return V(a,e,"atBlock_parens");if("}"==t||";"==t)return k(t,e,a);if("{"==t)return L(a)&&V(a,e,g?"block":"top");if("interpolation"==t)return V(a,e,"interpolation");if("word"==t){var r=e.current().toLowerCase();i="only"==r||"not"==r||"and"==r||"or"==r?"keyword":c.hasOwnProperty(r)?"attribute":h.hasOwnProperty(r)?"property":u.hasOwnProperty(r)?"keyword":d.hasOwnProperty(r)?"property":p.hasOwnProperty(r)?x?"string-2":"property":y.hasOwnProperty(r)?"atom":f.hasOwnProperty(r)?"keyword":"error"}return a.context.type},atComponentBlock:function(t,e,a){return"}"==t?k(t,e,a):"{"==t?L(a)&&V(a,e,g?"block":"top",!1):("word"==t&&(i="error"),a.context.type)},atBlock_parens:function(t,e,a){return")"==t?L(a):"{"==t||"}"==t?k(t,e,a,2):S.atBlock(t,e,a)},restricted_atBlock_before:function(t,e,a){return"{"==t?V(a,e,"restricted_atBlock"):"word"==t&&"@counter-style"==a.stateArg?(i="variable","restricted_atBlock_before"):B(t,e,a)},restricted_atBlock:function(t,e,a){return"}"==t?(a.stateArg=null,L(a)):"word"==t?(i="@font-face"==a.stateArg&&!m.hasOwnProperty(e.current().toLowerCase())||"@counter-style"==a.stateArg&&!v.hasOwnProperty(e.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},keyframes:function(t,e,a){return"word"==t?(i="variable","keyframes"):"{"==t?V(a,e,"top"):B(t,e,a)},at:function(t,e,a){return";"==t?L(a):"{"==t||"}"==t?k(t,e,a):("word"==t?i="tag":"hash"==t&&(i="builtin"),"at")},interpolation:function(t,e,a){return"}"==t?L(a):"{"==t||";"==t?k(t,e,a):("word"==t?i="variable":"variable"!=t&&"("!=t&&")"!=t&&(i="error"),"interpolation")}};return{startState:function(t){return{tokenize:null,state:r?"block":"top",stateArg:null,context:new H(r?"block":"top",t||0,null)}},token:function(t,e){if(!e.tokenize&&t.eatSpace())return null;var a=(e.tokenize||M)(t,e);return a&&"object"==typeof a&&(n=a[1],a=a[0]),i=a,"comment"!=n&&(e.state=S[e.state](n,t,e)),i},indent:function(t,e){var a=t.context,r=e&&e.charAt(0),n=a.indent;return"prop"!=a.type||"}"!=r&&")"!=r||(a=a.prev),a.prev&&("}"!=r||"block"!=a.type&&"top"!=a.type&&"interpolation"!=a.type&&"restricted_atBlock"!=a.type?(")"!=r||"parens"!=a.type&&"atBlock_parens"!=a.type)&&("{"!=r||"at"!=a.type&&"atBlock"!=a.type)||(n=Math.max(0,a.indent-o)):n=(a=a.prev).indent),n},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:b,fold:"brace"}}));var a=["domain","regexp","url","url-prefix"],r=e(a),n=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],i=e(n),o=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover","prefers-color-scheme"],l=e(o),s=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive","dark","light"],c=e(s),h=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","all","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","binding","bleed","block-size","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","inset","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-height-step","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotate","rotation","rotation-point","row-gap","ruby-align","ruby-overhang","ruby-position","ruby-span","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-type","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-orientation","text-outline","text-overflow","text-rendering","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","touch-action","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","paint-order","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],u=e(h),d=["border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","margin-block","margin-block-end","margin-block-start","margin-inline","margin-inline-end","margin-inline-start","padding-block","padding-block-end","padding-block-start","padding-inline","padding-inline-end","padding-inline-start","scroll-snap-stop","scrollbar-3d-light-color","scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-track-color","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","shape-inside","zoom"],p=e(d),m=e(["font-display","font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"]),v=e(["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"]),f=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],y=e(f),g=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","manipulation","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiple_mask_images","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],b=e(g),z=a.concat(n).concat(o).concat(s).concat(h).concat(d).concat(f).concat(g);function x(t,e){for(var a,r=!1;null!=(a=t.next());){if(r&&"/"==a){e.tokenize=null;break}r="*"==a}return["comment","comment"]}t.registerHelper("hintWords","css",z),t.defineMIME("text/css",{documentTypes:r,mediaTypes:i,mediaFeatures:l,mediaValueKeywords:c,propertyKeywords:u,nonStandardPropertyKeywords:p,fontProperties:m,counterDescriptors:v,colorKeywords:y,valueKeywords:b,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=x,x(t,e))}},name:"css"}),t.defineMIME("text/x-scss",{mediaTypes:i,mediaFeatures:l,mediaValueKeywords:c,propertyKeywords:u,nonStandardPropertyKeywords:p,colorKeywords:y,valueKeywords:b,fontProperties:m,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=x,x(t,e)):["operator","operator"]},":":function(t){return!!t.match(/^\s*\{/,!1)&&[null,null]},$:function(t){return t.match(/^[\w-]+/),t.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(t){return!!t.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),t.defineMIME("text/x-less",{mediaTypes:i,mediaFeatures:l,mediaValueKeywords:c,propertyKeywords:u,nonStandardPropertyKeywords:p,colorKeywords:y,valueKeywords:b,fontProperties:m,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=x,x(t,e)):["operator","operator"]},"@":function(t){return t.eat("{")?[null,"interpolation"]:!t.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)&&(t.eatWhile(/[\w\\\-]/),t.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),t.defineMIME("text/x-gss",{documentTypes:r,mediaTypes:i,mediaFeatures:l,propertyKeywords:u,nonStandardPropertyKeywords:p,fontProperties:m,counterDescriptors:v,colorKeywords:y,valueKeywords:b,supportsAtComponent:!0,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=x,x(t,e))}},name:"css",helperType:"gss"})}(Ls)}));kr((function(t,e){!function(t){function e(t,e){if(!t.hasOwnProperty(e))throw new Error("Undefined state "+e+" in simple mode")}function a(t,e){if(!t)return/(?:)/;var a="";return t instanceof RegExp?(t.ignoreCase&&(a="i"),t=t.source):t=String(t),new RegExp((!1===e?"":"^")+"(?:"+t+")",a)}function r(t){if(!t)return null;if(t.apply)return t;if("string"==typeof t)return t.replace(/\./g," ");for(var e=[],a=0;a<t.length;a++)e.push(t[a]&&t[a].replace(/\./g," "));return e}function n(t,n){(t.next||t.push)&&e(n,t.next||t.push),this.regex=a(t.regex),this.token=r(t.token),this.data=t}function i(t,e){return function(a,r){if(r.pending){var n=r.pending.shift();return 0==r.pending.length&&(r.pending=null),a.pos+=n.text.length,n.token}if(r.local){if(r.local.end&&a.match(r.local.end)){var i=r.local.endToken||null;return r.local=r.localState=null,i}var o;return i=r.local.mode.token(a,r.localState),r.local.endScan&&(o=r.local.endScan.exec(a.current()))&&(a.pos=a.start+o.index),i}for(var s=t[r.state],c=0;c<s.length;c++){var h=s[c],u=(!h.data.sol||a.sol())&&a.match(h.regex);if(u){h.data.next?r.state=h.data.next:h.data.push?((r.stack||(r.stack=[])).push(r.state),r.state=h.data.push):h.data.pop&&r.stack&&r.stack.length&&(r.state=r.stack.pop()),h.data.mode&&l(e,r,h.data.mode,h.token),h.data.indent&&r.indent.push(a.indentation()+e.indentUnit),h.data.dedent&&r.indent.pop();var d=h.token;if(d&&d.apply&&(d=d(u)),u.length>2&&h.token&&"string"!=typeof h.token){for(var p=2;p<u.length;p++)u[p]&&(r.pending||(r.pending=[])).push({text:u[p],token:h.token[p-1]});return a.backUp(u[0].length-(u[1]?u[1].length:0)),d[0]}return d&&d.join?d[0]:d}}return a.next(),null}}function o(t,e){if(t===e)return!0;if(!t||"object"!=typeof t||!e||"object"!=typeof e)return!1;var a=0;for(var r in t)if(t.hasOwnProperty(r)){if(!e.hasOwnProperty(r)||!o(t[r],e[r]))return!1;a++}for(var r in e)e.hasOwnProperty(r)&&a--;return 0==a}function l(e,r,n,i){var l;if(n.persistent)for(var s=r.persistentStates;s&&!l;s=s.next)(n.spec?o(n.spec,s.spec):n.mode==s.mode)&&(l=s);var c=l?l.mode:n.mode||t.getMode(e,n.spec),h=l?l.state:t.startState(c);n.persistent&&!l&&(r.persistentStates={mode:c,spec:n.spec,state:h,next:r.persistentStates}),r.localState=h,r.local={mode:c,end:n.end&&a(n.end),endScan:n.end&&!1!==n.forceEnd&&a(n.end,!1),endToken:i&&i.join?i[i.length-1]:i}}function s(t,e){for(var a=0;a<e.length;a++)if(e[a]===t)return!0}function c(e,a){return function(r,n,i){if(r.local&&r.local.mode.indent)return r.local.mode.indent(r.localState,n,i);if(null==r.indent||r.local||a.dontIndentStates&&s(r.state,a.dontIndentStates)>-1)return t.Pass;var o=r.indent.length-1,l=e[r.state];t:for(;;){for(var c=0;c<l.length;c++){var h=l[c];if(h.data.dedent&&!1!==h.data.dedentIfLineStart){var u=h.regex.exec(n);if(u&&u[0]){o--,(h.next||h.push)&&(l=e[h.next||h.push]),n=n.slice(u[0].length);continue t}}}break}return o<0?0:r.indent[o]}}t.defineSimpleMode=function(e,a){t.defineMode(e,(function(e){return t.simpleMode(e,a)}))},t.simpleMode=function(a,r){e(r,"start");var o={},l=r.meta||{},s=!1;for(var h in r)if(h!=l&&r.hasOwnProperty(h))for(var u=o[h]=[],d=r[h],p=0;p<d.length;p++){var m=d[p];u.push(new n(m,r)),(m.indent||m.dedent)&&(s=!0)}var v={startState:function(){return{state:"start",pending:null,local:null,localState:null,indent:s?[]:null}},copyState:function(e){var a={state:e.state,pending:e.pending,local:e.local,localState:null,indent:e.indent&&e.indent.slice(0)};e.localState&&(a.localState=t.copyState(e.local.mode,e.localState)),e.stack&&(a.stack=e.stack.slice(0));for(var r=e.persistentStates;r;r=r.next)a.persistentStates={mode:r.mode,spec:r.spec,state:r.state==e.localState?a.localState:t.copyState(r.mode,r.state),next:a.persistentStates};return a},token:i(o,a),innerMode:function(t){return t.local&&{mode:t.local.mode,state:t.localState}},indent:c(o,l)};if(l)for(var f in l)l.hasOwnProperty(f)&&(v[f]=l[f]);return v}}(Ls)})),kr((function(t,e){var a;(a=Ls).multiplexingMode=function(t){var e=Array.prototype.slice.call(arguments,1);function r(t,e,a,r){if("string"==typeof e){var n=t.indexOf(e,a);return r&&n>-1?n+e.length:n}var i=e.exec(a?t.slice(a):t);return i?i.index+a+(r?i[0].length:0):-1}return{startState:function(){return{outer:a.startState(t),innerActive:null,inner:null,startingInner:!1}},copyState:function(e){return{outer:a.copyState(t,e.outer),innerActive:e.innerActive,inner:e.innerActive&&a.copyState(e.innerActive.mode,e.inner),startingInner:e.startingInner}},token:function(n,i){if(i.innerActive){var o=i.innerActive;if(c=n.string,!o.close&&n.sol())return i.innerActive=i.inner=null,this.token(n,i);if((u=o.close&&!i.startingInner?r(c,o.close,n.pos,o.parseDelimiters):-1)==n.pos&&!o.parseDelimiters)return n.match(o.close),i.innerActive=i.inner=null,o.delimStyle&&o.delimStyle+" "+o.delimStyle+"-close";u>-1&&(n.string=c.slice(0,u));var l=o.mode.token(n,i.inner);return u>-1?n.string=c:n.pos>n.start&&(i.startingInner=!1),u==n.pos&&o.parseDelimiters&&(i.innerActive=i.inner=null),o.innerStyle&&(l=l?l+" "+o.innerStyle:o.innerStyle),l}for(var s=1/0,c=n.string,h=0;h<e.length;++h){var u,d=e[h];if((u=r(c,d.open,n.pos))==n.pos){d.parseDelimiters||n.match(d.open),i.startingInner=!!d.parseDelimiters,i.innerActive=d;var p=0;if(t.indent){var m=t.indent(i.outer,"","");m!==a.Pass&&(p=m)}return i.inner=a.startState(d.mode,p),d.delimStyle&&d.delimStyle+" "+d.delimStyle+"-open"}-1!=u&&u<s&&(s=u)}s!=1/0&&(n.string=c.slice(0,s));var v=t.token(n,i.outer);return s!=1/0&&(n.string=c),v},indent:function(e,r,n){var i=e.innerActive?e.innerActive.mode:t;return i.indent?i.indent(e.innerActive?e.inner:e.outer,r,n):a.Pass},blankLine:function(r){var n=r.innerActive?r.innerActive.mode:t;if(n.blankLine&&n.blankLine(r.innerActive?r.inner:r.outer),r.innerActive)"\n"===r.innerActive.close&&(r.innerActive=r.inner=null);else for(var i=0;i<e.length;++i){var o=e[i];"\n"===o.open&&(r.innerActive=o,r.inner=a.startState(o.mode,n.indent?n.indent(r.outer,"",""):0))}},electricChars:t.electricChars,innerMode:function(e){return e.inner?{state:e.inner,mode:e.innerActive.mode}:{state:e.outer,mode:t}}}}}));kr((function(t,e){var a;(a=Ls).defineSimpleMode("handlebars-tags",{start:[{regex:/\{\{\{/,push:"handlebars_raw",token:"tag"},{regex:/\{\{!--/,push:"dash_comment",token:"comment"},{regex:/\{\{!/,push:"comment",token:"comment"},{regex:/\{\{/,push:"handlebars",token:"tag"}],handlebars_raw:[{regex:/\}\}\}/,pop:!0,token:"tag"}],handlebars:[{regex:/\}\}/,pop:!0,token:"tag"},{regex:/"(?:[^\\"]|\\.)*"?/,token:"string"},{regex:/'(?:[^\\']|\\.)*'?/,token:"string"},{regex:/>|[#\/]([A-Za-z_]\w*)/,token:"keyword"},{regex:/(?:else|this)\b/,token:"keyword"},{regex:/\d+/i,token:"number"},{regex:/=|~|@|true|false/,token:"atom"},{regex:/(?:\.\.\/)*(?:[A-Za-z_][\w\.]*)+/,token:"variable-2"}],dash_comment:[{regex:/--\}\}/,pop:!0,token:"comment"},{regex:/./,token:"comment"}],comment:[{regex:/\}\}/,pop:!0,token:"comment"},{regex:/./,token:"comment"}],meta:{blockCommentStart:"{{--",blockCommentEnd:"--}}"}}),a.defineMode("handlebars",(function(t,e){var r=a.getMode(t,"handlebars-tags");return e&&e.base?a.multiplexingMode(a.getMode(t,e.base),{open:"{{",close:/\}\}\}?/,mode:r,parseDelimiters:!0}):r})),a.defineMIME("text/x-handlebars-template","handlebars")})),kr((function(t,e){!function(t){var e="CodeMirror-hint",a="CodeMirror-hint-active";function r(t,e){if(this.cm=t,this.options=e,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length,this.options.updateOnCursorActivity){var a=this;t.on("cursorActivity",this.activityFunc=function(){a.cursorActivity()})}}t.showHint=function(t,e,a){if(!e)return t.showHint(a);a&&a.async&&(e.async=!0);var r={hint:e};if(a)for(var n in a)r[n]=a[n];return t.showHint(r)},t.defineExtension("showHint",(function(e){e=o(this,this.getCursor("start"),e);var a=this.listSelections();if(!(a.length>1)){if(this.somethingSelected()){if(!e.hint.supportsSelection)return;for(var n=0;n<a.length;n++)if(a[n].head.line!=a[n].anchor.line)return}this.state.completionActive&&this.state.completionActive.close();var i=this.state.completionActive=new r(this,e);i.options.hint&&(t.signal(this,"startCompletion",this),i.update(!0))}})),t.defineExtension("closeHint",(function(){this.state.completionActive&&this.state.completionActive.close()}));var n=window.requestAnimationFrame||function(t){return setTimeout(t,1e3/60)},i=window.cancelAnimationFrame||clearTimeout;function o(t,e,a){var r=t.options.hintOptions,n={};for(var i in m)n[i]=m[i];if(r)for(var i in r)void 0!==r[i]&&(n[i]=r[i]);if(a)for(var i in a)void 0!==a[i]&&(n[i]=a[i]);return n.hint.resolve&&(n.hint=n.hint.resolve(t,e)),n}function l(t){return"string"==typeof t?t:t.text}function s(t,e){var a={Up:function(){e.moveFocus(-1)},Down:function(){e.moveFocus(1)},PageUp:function(){e.moveFocus(1-e.menuSize(),!0)},PageDown:function(){e.moveFocus(e.menuSize()-1,!0)},Home:function(){e.setFocus(0)},End:function(){e.setFocus(e.length-1)},Enter:e.pick,Tab:e.pick,Esc:e.close};/Mac/.test(navigator.platform)&&(a["Ctrl-P"]=function(){e.moveFocus(-1)},a["Ctrl-N"]=function(){e.moveFocus(1)});var r=t.options.customKeys,n=r?{}:a;function i(t,r){var i;i="string"!=typeof r?function(t){return r(t,e)}:a.hasOwnProperty(r)?a[r]:r,n[t]=i}if(r)for(var o in r)r.hasOwnProperty(o)&&i(o,r[o]);var l=t.options.extraKeys;if(l)for(var o in l)l.hasOwnProperty(o)&&i(o,l[o]);return n}function c(t,e){for(;e&&e!=t;){if("LI"===e.nodeName.toUpperCase()&&e.parentNode==t)return e;e=e.parentNode}}function h(r,n){this.completion=r,this.data=n,this.picked=!1;var i=this,o=r.cm,h=o.getInputField().ownerDocument,u=h.defaultView||h.parentWindow,d=this.hints=h.createElement("ul"),p=r.cm.options.theme;d.className="CodeMirror-hints "+p,this.selectedHint=n.selectedHint||0;for(var m=n.list,v=0;v<m.length;++v){var f=d.appendChild(h.createElement("li")),y=m[v],g=e+(v!=this.selectedHint?"":" "+a);null!=y.className&&(g=y.className+" "+g),f.className=g,y.render?y.render(f,n,y):f.appendChild(h.createTextNode(y.displayText||l(y))),f.hintId=v}var b=r.options.container||h.body,z=o.cursorCoords(r.options.alignWithWord?n.from:null),x=z.left,w=z.bottom,M=!0,_=0,A=0;if(b!==h.body){var H=-1!==["absolute","relative","fixed"].indexOf(u.getComputedStyle(b).position)?b:b.offsetParent,V=H.getBoundingClientRect(),L=h.body.getBoundingClientRect();_=V.left-L.left-H.scrollLeft,A=V.top-L.top-H.scrollTop}d.style.left=x-_+"px",d.style.top=w-A+"px";var B=u.innerWidth||Math.max(h.body.offsetWidth,h.documentElement.offsetWidth),k=u.innerHeight||Math.max(h.body.offsetHeight,h.documentElement.offsetHeight);b.appendChild(d);var C,S=r.options.moveOnOverlap?d.getBoundingClientRect():new DOMRect,E=!!r.options.paddingForScrollbar&&d.scrollHeight>d.clientHeight+1;if(setTimeout((function(){C=o.getScrollInfo()})),S.bottom-k>0){var O=S.bottom-S.top;if(z.top-(z.bottom-S.top)-O>0)d.style.top=(w=z.top-O-A)+"px",M=!1;else if(O>k){d.style.height=k-5+"px",d.style.top=(w=z.bottom-S.top-A)+"px";var T=o.getCursor();n.from.ch!=T.ch&&(z=o.cursorCoords(T),d.style.left=(x=z.left-_)+"px",S=d.getBoundingClientRect())}}var D,j=S.right-B;if(j>0&&(S.right-S.left>B&&(d.style.width=B-5+"px",j-=S.right-S.left-B),d.style.left=(x=z.left-j-_)+"px"),E)for(var F=d.firstChild;F;F=F.nextSibling)F.style.paddingRight=o.display.nativeBarWidth+"px";o.addKeyMap(this.keyMap=s(r,{moveFocus:function(t,e){i.changeActive(i.selectedHint+t,e)},setFocus:function(t){i.changeActive(t)},menuSize:function(){return i.screenAmount()},length:m.length,close:function(){r.close()},pick:function(){i.pick()},data:n})),r.options.closeOnUnfocus&&(o.on("blur",this.onBlur=function(){D=setTimeout((function(){r.close()}),100)}),o.on("focus",this.onFocus=function(){clearTimeout(D)})),o.on("scroll",this.onScroll=function(){var t=o.getScrollInfo(),e=o.getWrapperElement().getBoundingClientRect(),a=w+C.top-t.top,n=a-(u.pageYOffset||(h.documentElement||h.body).scrollTop);if(M||(n+=d.offsetHeight),n<=e.top||n>=e.bottom)return r.close();d.style.top=a+"px",d.style.left=x+C.left-t.left+"px"}),t.on(d,"dblclick",(function(t){var e=c(d,t.target||t.srcElement);e&&null!=e.hintId&&(i.changeActive(e.hintId),i.pick())})),t.on(d,"click",(function(t){var e=c(d,t.target||t.srcElement);e&&null!=e.hintId&&(i.changeActive(e.hintId),r.options.completeOnSingleClick&&i.pick())})),t.on(d,"mousedown",(function(){setTimeout((function(){o.focus()}),20)}));var I=this.getSelectedHintRange();return 0===I.from&&0===I.to||this.scrollToActive(),t.signal(n,"select",m[this.selectedHint],d.childNodes[this.selectedHint]),!0}function u(t,e){if(!t.somethingSelected())return e;for(var a=[],r=0;r<e.length;r++)e[r].supportsSelection&&a.push(e[r]);return a}function d(t,e,a,r){if(t.async)t(e,r,a);else{var n=t(e,a);n&&n.then?n.then(r):r(n)}}function p(e,a){var r,n=e.getHelpers(a,"hint");if(n.length){var i=function(t,e,a){var r=u(t,n);function i(n){if(n==r.length)return e(null);d(r[n],t,a,(function(t){t&&t.list.length>0?e(t):i(n+1)}))}i(0)};return i.async=!0,i.supportsSelection=!0,i}return(r=e.getHelper(e.getCursor(),"hintWords"))?function(e){return t.hint.fromList(e,{words:r})}:t.hint.anyword?function(e,a){return t.hint.anyword(e,a)}:function(){}}r.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.options.updateOnCursorActivity&&this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&t.signal(this.data,"close"),this.widget&&this.widget.close(),t.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(e,a){var r=e.list[a],n=this;this.cm.operation((function(){r.hint?r.hint(n.cm,e,r):n.cm.replaceRange(l(r),r.from||e.from,r.to||e.to,"complete"),t.signal(e,"pick",r),n.cm.scrollIntoView()})),this.options.closeOnPick&&this.close()},cursorActivity:function(){this.debounce&&(i(this.debounce),this.debounce=0);var t=this.startPos;this.data&&(t=this.data.from);var e=this.cm.getCursor(),a=this.cm.getLine(e.line);if(e.line!=this.startPos.line||a.length-e.ch!=this.startLen-this.startPos.ch||e.ch<t.ch||this.cm.somethingSelected()||!e.ch||this.options.closeCharacters.test(a.charAt(e.ch-1)))this.close();else{var r=this;this.debounce=n((function(){r.update()})),this.widget&&this.widget.disable()}},update:function(t){if(null!=this.tick){var e=this,a=++this.tick;d(this.options.hint,this.cm,this.options,(function(r){e.tick==a&&e.finishUpdate(r,t)}))}},finishUpdate:function(e,a){this.data&&t.signal(this.data,"update");var r=this.widget&&this.widget.picked||a&&this.options.completeSingle;this.widget&&this.widget.close(),this.data=e,e&&e.list.length&&(r&&1==e.list.length?this.pick(e,0):(this.widget=new h(this,e),t.signal(e,"shown")))}},h.prototype={close:function(){if(this.completion.widget==this){this.completion.widget=null,this.hints.parentNode&&this.hints.parentNode.removeChild(this.hints),this.completion.cm.removeKeyMap(this.keyMap);var t=this.completion.cm;this.completion.options.closeOnUnfocus&&(t.off("blur",this.onBlur),t.off("focus",this.onFocus)),t.off("scroll",this.onScroll)}},disable:function(){this.completion.cm.removeKeyMap(this.keyMap);var t=this;this.keyMap={Enter:function(){t.picked=!0}},this.completion.cm.addKeyMap(this.keyMap)},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(e,r){if(e>=this.data.list.length?e=r?this.data.list.length-1:0:e<0&&(e=r?0:this.data.list.length-1),this.selectedHint!=e){var n=this.hints.childNodes[this.selectedHint];n&&(n.className=n.className.replace(" "+a,"")),(n=this.hints.childNodes[this.selectedHint=e]).className+=" "+a,this.scrollToActive(),t.signal(this.data,"select",this.data.list[this.selectedHint],n)}},scrollToActive:function(){var t=this.getSelectedHintRange(),e=this.hints.childNodes[t.from],a=this.hints.childNodes[t.to],r=this.hints.firstChild;e.offsetTop<this.hints.scrollTop?this.hints.scrollTop=e.offsetTop-r.offsetTop:a.offsetTop+a.offsetHeight>this.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=a.offsetTop+a.offsetHeight-this.hints.clientHeight+r.offsetTop)},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1},getSelectedHintRange:function(){var t=this.completion.options.scrollMargin||0;return{from:Math.max(0,this.selectedHint-t),to:Math.min(this.data.list.length-1,this.selectedHint+t)}}},t.registerHelper("hint","auto",{resolve:p}),t.registerHelper("hint","fromList",(function(e,a){var r,n=e.getCursor(),i=e.getTokenAt(n),o=t.Pos(n.line,i.start),l=n;i.start<n.ch&&/\w/.test(i.string.charAt(n.ch-i.start-1))?r=i.string.substr(0,n.ch-i.start):(r="",o=n);for(var s=[],c=0;c<a.words.length;c++){var h=a.words[c];h.slice(0,r.length)==r&&s.push(h)}if(s.length)return{list:s,from:o,to:l}})),t.commands.autocomplete=t.showHint;var m={hint:t.hint.auto,completeSingle:!0,alignWithWord:!0,closeCharacters:/[\s()\[\]{};:>,]/,closeOnPick:!0,closeOnUnfocus:!0,updateOnCursorActivity:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null,paddingForScrollbar:!0,moveOnOverlap:!0};t.defineOption("hintOptions",null)}(Ls)})),kr((function(t,e){!function(t){var e="CodeMirror-activeline",a="CodeMirror-activeline-background",r="CodeMirror-activeline-gutter";function n(t){for(var n=0;n<t.state.activeLines.length;n++)t.removeLineClass(t.state.activeLines[n],"wrap",e),t.removeLineClass(t.state.activeLines[n],"background",a),t.removeLineClass(t.state.activeLines[n],"gutter",r)}function i(t,e){if(t.length!=e.length)return!1;for(var a=0;a<t.length;a++)if(t[a]!=e[a])return!1;return!0}function o(t,o){for(var l=[],s=0;s<o.length;s++){var c=o[s],h=t.getOption("styleActiveLine");if("object"==typeof h&&h.nonEmpty?c.anchor.line==c.head.line:c.empty()){var u=t.getLineHandleVisualStart(c.head.line);l[l.length-1]!=u&&l.push(u)}}i(t.state.activeLines,l)||t.operation((function(){n(t);for(var i=0;i<l.length;i++)t.addLineClass(l[i],"wrap",e),t.addLineClass(l[i],"background",a),t.addLineClass(l[i],"gutter",r);t.state.activeLines=l}))}function l(t,e){o(t,e.ranges)}t.defineOption("styleActiveLine",!1,(function(e,a,r){var i=r!=t.Init&&r;a!=i&&(i&&(e.off("beforeSelectionChange",l),n(e),delete e.state.activeLines),a&&(e.state.activeLines=[],o(e,e.listSelections()),e.on("beforeSelectionChange",l)))}))}(Ls)})),kr((function(t,e){!function(t){var e={pairs:"()[]{}''\"\"",closeBefore:")]}'\":;>",triples:"",explode:"[]{}"},a=t.Pos;function r(t,a){return"pairs"==a&&"string"==typeof t?t:"object"==typeof t&&null!=t[a]?t[a]:e[a]}t.defineOption("autoCloseBrackets",!1,(function(e,a,o){o&&o!=t.Init&&(e.removeKeyMap(n),e.state.closeBrackets=null),a&&(i(r(a,"pairs")),e.state.closeBrackets=a,e.addKeyMap(n))}));var n={Backspace:s,Enter:c};function i(t){for(var e=0;e<t.length;e++){var a=t.charAt(e),r="'"+a+"'";n[r]||(n[r]=o(a))}}function o(t){return function(e){return d(e,t)}}function l(t){var e=t.state.closeBrackets;return!e||e.override?e:t.getModeAt(t.getCursor()).closeBrackets||e}function s(e){var n=l(e);if(!n||e.getOption("disableInput"))return t.Pass;for(var i=r(n,"pairs"),o=e.listSelections(),s=0;s<o.length;s++){if(!o[s].empty())return t.Pass;var c=p(e,o[s].head);if(!c||i.indexOf(c)%2!=0)return t.Pass}for(s=o.length-1;s>=0;s--){var h=o[s].head;e.replaceRange("",a(h.line,h.ch-1),a(h.line,h.ch+1),"+delete")}}function c(e){var a=l(e),n=a&&r(a,"explode");if(!n||e.getOption("disableInput"))return t.Pass;for(var i=e.listSelections(),o=0;o<i.length;o++){if(!i[o].empty())return t.Pass;var s=p(e,i[o].head);if(!s||n.indexOf(s)%2!=0)return t.Pass}e.operation((function(){var t=e.lineSeparator()||"\n";e.replaceSelection(t+t,null),h(e,-1),i=e.listSelections();for(var a=0;a<i.length;a++){var r=i[a].head.line;e.indentLine(r,null,!0),e.indentLine(r+1,null,!0)}}))}function h(t,e){for(var a=[],r=t.listSelections(),n=0,i=0;i<r.length;i++){var o=r[i];o.head==t.getCursor()&&(n=i);var l=o.head.ch||e>0?{line:o.head.line,ch:o.head.ch+e}:{line:o.head.line-1};a.push({anchor:l,head:l})}t.setSelections(a,n)}function u(e){var r=t.cmpPos(e.anchor,e.head)>0;return{anchor:new a(e.anchor.line,e.anchor.ch+(r?-1:1)),head:new a(e.head.line,e.head.ch+(r?1:-1))}}function d(e,n){var i=l(e);if(!i||e.getOption("disableInput"))return t.Pass;var o=r(i,"pairs"),s=o.indexOf(n);if(-1==s)return t.Pass;for(var c,d=r(i,"closeBefore"),p=r(i,"triples"),v=o.charAt(s+1)==n,f=e.listSelections(),y=s%2==0,g=0;g<f.length;g++){var b,z=f[g],x=z.head,w=e.getRange(x,a(x.line,x.ch+1));if(y&&!z.empty())b="surround";else if(!v&&y||w!=n)if(v&&x.ch>1&&p.indexOf(n)>=0&&e.getRange(a(x.line,x.ch-2),x)==n+n){if(x.ch>2&&/\bstring/.test(e.getTokenTypeAt(a(x.line,x.ch-2))))return t.Pass;b="addFour"}else if(v){var M=0==x.ch?" ":e.getRange(a(x.line,x.ch-1),x);if(t.isWordChar(w)||M==n||t.isWordChar(M))return t.Pass;b="both"}else{if(!y||!(0===w.length||/\s/.test(w)||d.indexOf(w)>-1))return t.Pass;b="both"}else b=v&&m(e,x)?"both":p.indexOf(n)>=0&&e.getRange(x,a(x.line,x.ch+3))==n+n+n?"skipThree":"skip";if(c){if(c!=b)return t.Pass}else c=b}var _=s%2?o.charAt(s-1):n,A=s%2?n:o.charAt(s+1);e.operation((function(){if("skip"==c)h(e,1);else if("skipThree"==c)h(e,3);else if("surround"==c){for(var t=e.getSelections(),a=0;a<t.length;a++)t[a]=_+t[a]+A;for(e.replaceSelections(t,"around"),t=e.listSelections().slice(),a=0;a<t.length;a++)t[a]=u(t[a]);e.setSelections(t)}else"both"==c?(e.replaceSelection(_+A,null),e.triggerElectric(_+A),h(e,-1)):"addFour"==c&&(e.replaceSelection(_+_+_+_,"before"),h(e,1))}))}function p(t,e){var r=t.getRange(a(e.line,e.ch-1),a(e.line,e.ch+1));return 2==r.length?r:null}function m(t,e){var r=t.getTokenAt(a(e.line,e.ch+1));return/\bstring/.test(r.type)&&r.start==e.ch&&(0==e.ch||!/\bstring/.test(t.getTokenTypeAt(e)))}i(e.pairs+"`")}(Ls)})),kr((function(t,e){!function(t){var e=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),a=t.Pos,r={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function n(t){return t&&t.bracketRegex||/[(){}[\]]/}function i(t,e,i){var l=t.getLineHandle(e.line),s=e.ch-1,c=i&&i.afterCursor;null==c&&(c=/(^| )cm-fat-cursor($| )/.test(t.getWrapperElement().className));var h=n(i),u=!c&&s>=0&&h.test(l.text.charAt(s))&&r[l.text.charAt(s)]||h.test(l.text.charAt(s+1))&&r[l.text.charAt(++s)];if(!u)return null;var d=">"==u.charAt(1)?1:-1;if(i&&i.strict&&d>0!=(s==e.ch))return null;var p=t.getTokenTypeAt(a(e.line,s+1)),m=o(t,a(e.line,s+(d>0?1:0)),d,p,i);return null==m?null:{from:a(e.line,s),to:m&&m.pos,match:m&&m.ch==u.charAt(0),forward:d>0}}function o(t,e,i,o,l){for(var s=l&&l.maxScanLineLength||1e4,c=l&&l.maxScanLines||1e3,h=[],u=n(l),d=i>0?Math.min(e.line+c,t.lastLine()+1):Math.max(t.firstLine()-1,e.line-c),p=e.line;p!=d;p+=i){var m=t.getLine(p);if(m){var v=i>0?0:m.length-1,f=i>0?m.length:-1;if(!(m.length>s))for(p==e.line&&(v=e.ch-(i<0?1:0));v!=f;v+=i){var y=m.charAt(v);if(u.test(y)&&(void 0===o||(t.getTokenTypeAt(a(p,v+1))||"")==(o||""))){var g=r[y];if(g&&">"==g.charAt(1)==i>0)h.push(y);else{if(!h.length)return{pos:a(p,v),ch:y};h.pop()}}}}}return p-i!=(i>0?t.lastLine():t.firstLine())&&null}function l(t,r,n){for(var o=t.state.matchBrackets.maxHighlightLineLength||1e3,l=n&&n.highlightNonMatching,s=[],c=t.listSelections(),h=0;h<c.length;h++){var u=c[h].empty()&&i(t,c[h].head,n);if(u&&(u.match||!1!==l)&&t.getLine(u.from.line).length<=o){var d=u.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";s.push(t.markText(u.from,a(u.from.line,u.from.ch+1),{className:d})),u.to&&t.getLine(u.to.line).length<=o&&s.push(t.markText(u.to,a(u.to.line,u.to.ch+1),{className:d}))}}if(s.length){e&&t.state.focused&&t.focus();var p=function(){t.operation((function(){for(var t=0;t<s.length;t++)s[t].clear()}))};if(!r)return p;setTimeout(p,800)}}function s(t){t.operation((function(){t.state.matchBrackets.currentlyHighlighted&&(t.state.matchBrackets.currentlyHighlighted(),t.state.matchBrackets.currentlyHighlighted=null),t.state.matchBrackets.currentlyHighlighted=l(t,!1,t.state.matchBrackets)}))}function c(t){t.state.matchBrackets&&t.state.matchBrackets.currentlyHighlighted&&(t.state.matchBrackets.currentlyHighlighted(),t.state.matchBrackets.currentlyHighlighted=null)}t.defineOption("matchBrackets",!1,(function(e,a,r){r&&r!=t.Init&&(e.off("cursorActivity",s),e.off("focus",s),e.off("blur",c),c(e)),a&&(e.state.matchBrackets="object"==typeof a?a:{},e.on("cursorActivity",s),e.on("focus",s),e.on("blur",c))})),t.defineExtension("matchBrackets",(function(){l(this,!0)})),t.defineExtension("findMatchingBracket",(function(t,e,a){return(a||"boolean"==typeof e)&&(a?(a.strict=e,e=a):e=e?{strict:!0}:null),i(this,t,e)})),t.defineExtension("scanForBracket",(function(t,e,a,r){return o(this,t,e,a,r)}))}(Ls)}));function Bs(t){let e;return{c(){e=F("div"),this.h()},l(t){e=X(t,"DIV",{class:!0,style:!0}),Z(e).forEach(D),this.h()},h(){G(e,"class","circle svelte-14upwad"),rt(e,"--size",t[0]+t[2]),rt(e,"--color",t[1]),rt(e,"--duration",t[3])},m(t,a){T(t,e,a)},p(t,[a]){5&a&&rt(e,"--size",t[0]+t[2]),2&a&&rt(e,"--color",t[1]),8&a&&rt(e,"--duration",t[3])},i:s,o:s,d(t){t&&D(e)}}}function ks(t,e,a){let{size:r=60}=e,{color:n="#FF3E00"}=e,{unit:i="px"}=e,{duration:o="0.75s"}=e;return t.$$set=t=>{"size"in t&&a(0,r=t.size),"color"in t&&a(1,n=t.color),"unit"in t&&a(2,i=t.unit),"duration"in t&&a(3,o=t.duration)},[r,n,i,o]}class Cs extends pe{constructor(t){super(),de(this,t,ks,Bs,v,{size:0,color:1,unit:2,duration:3})}}var Ss=function(t){return t},Es="object"==typeof Br&&Br&&Br.Object===Object&&Br,Os="object"==typeof self&&self&&self.Object===Object&&self,Ts=Es||Os||Function("return this")(),Ds=Ts.Symbol,js=Object.prototype,Fs=js.hasOwnProperty,Is=js.toString,Ps=Ds?Ds.toStringTag:void 0;var Rs=function(t){var e=Fs.call(t,Ps),a=t[Ps];try{t[Ps]=void 0;var r=!0}catch(i){}var n=Is.call(t);return r&&(e?t[Ps]=a:delete t[Ps]),n},Ns=Object.prototype.toString;var $s=function(t){return Ns.call(t)},Us=Ds?Ds.toStringTag:void 0;var Ws=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Us&&Us in Object(t)?Rs(t):$s(t)};var qs=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};var Gs,Ys=function(t){if(!qs(t))return!1;var e=Ws(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},Ks=Ts["__core-js_shared__"],Js=(Gs=/[^.]+$/.exec(Ks&&Ks.keys&&Ks.keys.IE_PROTO||""))?"Symbol(src)_1."+Gs:"";var Zs=function(t){return!!Js&&Js in t},Xs=Function.prototype.toString;var Qs=function(t){if(null!=t){try{return Xs.call(t)}catch(e){}try{return t+""}catch(e){}}return""},tc=/^\[object .+?Constructor\]$/,ec=Function.prototype,ac=Object.prototype,rc=ec.toString,nc=ac.hasOwnProperty,ic=RegExp("^"+rc.call(nc).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var oc=function(t){return!(!qs(t)||Zs(t))&&(Ys(t)?ic:tc).test(Qs(t))};var lc=function(t,e){return null==t?void 0:t[e]};var sc=function(t,e){var a=lc(t,e);return oc(a)?a:void 0},cc=sc(Ts,"WeakMap"),hc=cc&&new cc,uc=hc?function(t,e){return hc.set(t,e),t}:Ss,dc=Object.create,pc=function(){function t(){}return function(e){if(!qs(e))return{};if(dc)return dc(e);t.prototype=e;var a=new t;return t.prototype=void 0,a}}();var mc=function(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var a=pc(t.prototype),r=t.apply(a,e);return qs(r)?r:a}};var vc=function(t,e,a){var r=1&e,n=mc(t);return function e(){var i=this&&this!==Ts&&this instanceof e?n:t;return i.apply(r?a:this,arguments)}};var fc=function(t,e,a){switch(a.length){case 0:return t.call(e);case 1:return t.call(e,a[0]);case 2:return t.call(e,a[0],a[1]);case 3:return t.call(e,a[0],a[1],a[2])}return t.apply(e,a)},yc=Math.max;var gc=function(t,e,a,r){for(var n=-1,i=t.length,o=a.length,l=-1,s=e.length,c=yc(i-o,0),h=Array(s+c),u=!r;++l<s;)h[l]=e[l];for(;++n<o;)(u||n<i)&&(h[a[n]]=t[n]);for(;c--;)h[l++]=t[n++];return h},bc=Math.max;var zc=function(t,e,a,r){for(var n=-1,i=t.length,o=-1,l=a.length,s=-1,c=e.length,h=bc(i-l,0),u=Array(h+c),d=!r;++n<h;)u[n]=t[n];for(var p=n;++s<c;)u[p+s]=e[s];for(;++o<l;)(d||n<i)&&(u[p+a[o]]=t[n++]);return u};var xc=function(t,e){for(var a=t.length,r=0;a--;)t[a]===e&&++r;return r};var wc=function(){};function Mc(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}Mc.prototype=pc(wc.prototype),Mc.prototype.constructor=Mc;var _c=Mc;var Ac=hc?function(t){return hc.get(t)}:function(){},Hc={},Vc=Object.prototype.hasOwnProperty;var Lc=function(t){for(var e=t.name+"",a=Hc[e],r=Vc.call(Hc,e)?a.length:0;r--;){var n=a[r],i=n.func;if(null==i||i==t)return n.name}return e};function Bc(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=void 0}Bc.prototype=pc(wc.prototype),Bc.prototype.constructor=Bc;var kc=Bc,Cc=Array.isArray;var Sc=function(t){return null!=t&&"object"==typeof t};var Ec=function(t,e){var a=-1,r=t.length;for(e||(e=Array(r));++a<r;)e[a]=t[a];return e};var Oc=function(t){if(t instanceof _c)return t.clone();var e=new kc(t.__wrapped__,t.__chain__);return e.__actions__=Ec(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e},Tc=Object.prototype.hasOwnProperty;function Dc(t){if(Sc(t)&&!Cc(t)&&!(t instanceof _c)){if(t instanceof kc)return t;if(Tc.call(t,"__wrapped__"))return Oc(t)}return new kc(t)}Dc.prototype=wc.prototype,Dc.prototype.constructor=Dc;var jc=Dc;var Fc=function(t){var e=Lc(t),a=jc[e];if("function"!=typeof a||!(e in _c.prototype))return!1;if(t===a)return!0;var r=Ac(a);return!!r&&t===r[0]},Ic=Date.now;var Pc=function(t){var e=0,a=0;return function(){var r=Ic(),n=16-(r-a);if(a=r,n>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}},Rc=Pc(uc),Nc=/\{\n\/\* \[wrapped with (.+)\] \*/,$c=/,? & /;var Uc=function(t){var e=t.match(Nc);return e?e[1].split($c):[]},Wc=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;var qc=function(t,e){var a=e.length;if(!a)return t;var r=a-1;return e[r]=(a>1?"& ":"")+e[r],e=e.join(a>2?", ":" "),t.replace(Wc,"{\n/* [wrapped with "+e+"] */\n")};var Gc=function(t){return function(){return t}},Yc=function(){try{var t=sc(Object,"defineProperty");return t({},"",{}),t}catch(e){}}(),Kc=Pc(Yc?function(t,e){return Yc(t,"toString",{configurable:!0,enumerable:!1,value:Gc(e),writable:!0})}:Ss);var Jc=function(t,e){for(var a=-1,r=null==t?0:t.length;++a<r&&!1!==e(t[a],a,t););return t};var Zc=function(t,e,a,r){for(var n=t.length,i=a+(r?1:-1);r?i--:++i<n;)if(e(t[i],i,t))return i;return-1};var Xc=function(t){return t!=t};var Qc=function(t,e,a){for(var r=a-1,n=t.length;++r<n;)if(t[r]===e)return r;return-1};var th=function(t,e,a){return e==e?Qc(t,e,a):Zc(t,Xc,a)};var eh=function(t,e){return!!(null==t?0:t.length)&&th(t,e,0)>-1},ah=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];var rh=function(t,e){return Jc(ah,(function(a){var r="_."+a[0];e&a[1]&&!eh(t,r)&&t.push(r)})),t.sort()};var nh=function(t,e,a){var r=e+"";return Kc(t,qc(r,rh(Uc(r),a)))};var ih=function(t,e,a,r,n,i,o,l,s,c){var h=8&e;e|=h?32:64,4&(e&=~(h?64:32))||(e&=-4);var u=[t,e,n,h?i:void 0,h?o:void 0,h?void 0:i,h?void 0:o,l,s,c],d=a.apply(void 0,u);return Fc(t)&&Rc(d,u),d.placeholder=r,nh(d,t,e)};var oh=function(t){return t.placeholder},lh=/^(?:0|[1-9]\d*)$/;var sh=function(t,e){var a=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==a||"symbol"!=a&&lh.test(t))&&t>-1&&t%1==0&&t<e},ch=Math.min;var hh=function(t,e){for(var a=t.length,r=ch(e.length,a),n=Ec(t);r--;){var i=e[r];t[r]=sh(i,a)?n[i]:void 0}return t};var uh=function(t,e){for(var a=-1,r=t.length,n=0,i=[];++a<r;){var o=t[a];o!==e&&"__lodash_placeholder__"!==o||(t[a]="__lodash_placeholder__",i[n++]=a)}return i};var dh=function t(e,a,r,n,i,o,l,s,c,h){var u=128&a,d=1&a,p=2&a,m=24&a,v=512&a,f=p?void 0:mc(e);return function y(){for(var g=arguments.length,b=Array(g),z=g;z--;)b[z]=arguments[z];if(m)var x=oh(y),w=xc(b,x);if(n&&(b=gc(b,n,i,m)),o&&(b=zc(b,o,l,m)),g-=w,m&&g<h){var M=uh(b,x);return ih(e,a,t,y.placeholder,r,b,M,s,c,h-g)}var _=d?r:this,A=p?_[e]:e;return g=b.length,s?b=hh(b,s):v&&g>1&&b.reverse(),u&&c<g&&(b.length=c),this&&this!==Ts&&this instanceof y&&(A=f||mc(A)),A.apply(_,b)}};var ph=function(t,e,a){var r=mc(t);return function n(){for(var i=arguments.length,o=Array(i),l=i,s=oh(n);l--;)o[l]=arguments[l];var c=i<3&&o[0]!==s&&o[i-1]!==s?[]:uh(o,s);if((i-=c.length)<a)return ih(t,e,dh,n.placeholder,void 0,o,c,void 0,void 0,a-i);var h=this&&this!==Ts&&this instanceof n?r:t;return fc(h,this,o)}};var mh=function(t,e,a,r){var n=1&e,i=mc(t);return function e(){for(var o=-1,l=arguments.length,s=-1,c=r.length,h=Array(c+l),u=this&&this!==Ts&&this instanceof e?i:t;++s<c;)h[s]=r[s];for(;l--;)h[s++]=arguments[++o];return fc(u,n?a:this,h)}},vh=Math.min;var fh=function(t,e){var a=t[1],r=e[1],n=a|r,i=n<131,o=128==r&&8==a||128==r&&256==a&&t[7].length<=e[8]||384==r&&e[7].length<=e[8]&&8==a;if(!i&&!o)return t;1&r&&(t[2]=e[2],n|=1&a?0:4);var l=e[3];if(l){var s=t[3];t[3]=s?gc(s,l,e[4]):l,t[4]=s?uh(t[3],"__lodash_placeholder__"):e[4]}return(l=e[5])&&(s=t[5],t[5]=s?zc(s,l,e[6]):l,t[6]=s?uh(t[5],"__lodash_placeholder__"):e[6]),(l=e[7])&&(t[7]=l),128&r&&(t[8]=null==t[8]?e[8]:vh(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=n,t},yh=/\s/;var gh=function(t){for(var e=t.length;e--&&yh.test(t.charAt(e)););return e},bh=/^\s+/;var zh=function(t){return t?t.slice(0,gh(t)+1).replace(bh,""):t};var xh=function(t){return"symbol"==typeof t||Sc(t)&&"[object Symbol]"==Ws(t)},wh=/^[-+]0x[0-9a-f]+$/i,Mh=/^0b[01]+$/i,_h=/^0o[0-7]+$/i,Ah=parseInt;var Hh=function(t){if("number"==typeof t)return t;if(xh(t))return NaN;if(qs(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=qs(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=zh(t);var a=Mh.test(t);return a||_h.test(t)?Ah(t.slice(2),a?2:8):wh.test(t)?NaN:+t};var Vh=function(t){return t?Infinity===(t=Hh(t))||-Infinity===t?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0};var Lh=function(t){var e=Vh(t),a=e%1;return e==e?a?e-a:e:0},Bh=Math.max;var kh=function(t,e,a,r,n,i,o,l){var s=2&e;if(!s&&"function"!=typeof t)throw new TypeError("Expected a function");var c=r?r.length:0;if(c||(e&=-97,r=n=void 0),o=void 0===o?o:Bh(Lh(o),0),l=void 0===l?l:Lh(l),c-=n?n.length:0,64&e){var h=r,u=n;r=n=void 0}var d=s?void 0:Ac(t),p=[t,e,a,r,n,h,u,i,o,l];if(d&&fh(p,d),t=p[0],e=p[1],a=p[2],r=p[3],n=p[4],!(l=p[9]=void 0===p[9]?s?0:t.length:Bh(p[9]-c,0))&&24&e&&(e&=-25),e&&1!=e)m=8==e||16==e?ph(t,e,l):32!=e&&33!=e||n.length?dh.apply(void 0,p):mh(t,e,a,r);else var m=vc(t,e,a);return nh((d?uc:Rc)(m,p),t,e)};var Ch=function(t,e,a){return e=a?void 0:e,e=t&&null==e?t.length:e,kh(t,128,void 0,void 0,void 0,void 0,e)};var Sh=function(t,e,a){"__proto__"==e&&Yc?Yc(t,e,{configurable:!0,enumerable:!0,value:a,writable:!0}):t[e]=a};var Eh=function(t,e){return t===e||t!=t&&e!=e},Oh=Object.prototype.hasOwnProperty;var Th=function(t,e,a){var r=t[e];Oh.call(t,e)&&Eh(r,a)&&(void 0!==a||e in t)||Sh(t,e,a)};var Dh=function(t,e,a,r){var n=!a;a||(a={});for(var i=-1,o=e.length;++i<o;){var l=e[i],s=r?r(a[l],t[l],l,a,t):void 0;void 0===s&&(s=t[l]),n?Sh(a,l,s):Th(a,l,s)}return a};var jh=function(t,e){for(var a=-1,r=Array(t);++a<t;)r[a]=e(a);return r};var Fh=function(t){return Sc(t)&&"[object Arguments]"==Ws(t)},Ih=Object.prototype,Ph=Ih.hasOwnProperty,Rh=Ih.propertyIsEnumerable,Nh=Fh(function(){return arguments}())?Fh:function(t){return Sc(t)&&Ph.call(t,"callee")&&!Rh.call(t,"callee")};var $h=function(){return!1},Uh=kr((function(t,e){var a=e&&!e.nodeType&&e,r=a&&t&&!t.nodeType&&t,n=r&&r.exports===a?Ts.Buffer:void 0,i=(n?n.isBuffer:void 0)||$h;t.exports=i}));var Wh=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991},qh={};qh["[object Float32Array]"]=qh["[object Float64Array]"]=qh["[object Int8Array]"]=qh["[object Int16Array]"]=qh["[object Int32Array]"]=qh["[object Uint8Array]"]=qh["[object Uint8ClampedArray]"]=qh["[object Uint16Array]"]=qh["[object Uint32Array]"]=!0,qh["[object Arguments]"]=qh["[object Array]"]=qh["[object ArrayBuffer]"]=qh["[object Boolean]"]=qh["[object DataView]"]=qh["[object Date]"]=qh["[object Error]"]=qh["[object Function]"]=qh["[object Map]"]=qh["[object Number]"]=qh["[object Object]"]=qh["[object RegExp]"]=qh["[object Set]"]=qh["[object String]"]=qh["[object WeakMap]"]=!1;var Gh=function(t){return Sc(t)&&Wh(t.length)&&!!qh[Ws(t)]};var Yh=function(t){return function(e){return t(e)}},Kh=kr((function(t,e){var a=e&&!e.nodeType&&e,r=a&&t&&!t.nodeType&&t,n=r&&r.exports===a&&Es.process,i=function(){try{var t=r&&r.require&&r.require("util").types;return t||n&&n.binding&&n.binding("util")}catch(e){}}();t.exports=i})),Jh=Kh&&Kh.isTypedArray,Zh=Jh?Yh(Jh):Gh,Xh=Object.prototype.hasOwnProperty;var Qh=function(t,e){var a=Cc(t),r=!a&&Nh(t),n=!a&&!r&&Uh(t),i=!a&&!r&&!n&&Zh(t),o=a||r||n||i,l=o?jh(t.length,String):[],s=l.length;for(var c in t)!e&&!Xh.call(t,c)||o&&("length"==c||n&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||sh(c,s))||l.push(c);return l},tu=Object.prototype;var eu=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||tu)};var au=function(t,e){return function(a){return t(e(a))}},ru=au(Object.keys,Object),nu=Object.prototype.hasOwnProperty;var iu=function(t){if(!eu(t))return ru(t);var e=[];for(var a in Object(t))nu.call(t,a)&&"constructor"!=a&&e.push(a);return e};var ou=function(t){return null!=t&&Wh(t.length)&&!Ys(t)};var lu=function(t){return ou(t)?Qh(t):iu(t)};var su=function(t,e){return t&&Dh(e,lu(e),t)};var cu=function(){this.__data__=[],this.size=0};var hu=function(t,e){for(var a=t.length;a--;)if(Eh(t[a][0],e))return a;return-1},uu=Array.prototype.splice;var du=function(t){var e=this.__data__,a=hu(e,t);return!(a<0)&&(a==e.length-1?e.pop():uu.call(e,a,1),--this.size,!0)};var pu=function(t){var e=this.__data__,a=hu(e,t);return a<0?void 0:e[a][1]};var mu=function(t){return hu(this.__data__,t)>-1};var vu=function(t,e){var a=this.__data__,r=hu(a,t);return r<0?(++this.size,a.push([t,e])):a[r][1]=e,this};function fu(t){var e=-1,a=null==t?0:t.length;for(this.clear();++e<a;){var r=t[e];this.set(r[0],r[1])}}fu.prototype.clear=cu,fu.prototype.delete=du,fu.prototype.get=pu,fu.prototype.has=mu,fu.prototype.set=vu;var yu=fu;var gu=function(){this.__data__=new yu,this.size=0};var bu=function(t){var e=this.__data__,a=e.delete(t);return this.size=e.size,a};var zu=function(t){return this.__data__.get(t)};var xu=function(t){return this.__data__.has(t)},wu=sc(Ts,"Map"),Mu=sc(Object,"create");var _u=function(){this.__data__=Mu?Mu(null):{},this.size=0};var Au=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Hu=Object.prototype.hasOwnProperty;var Vu=function(t){var e=this.__data__;if(Mu){var a=e[t];return"__lodash_hash_undefined__"===a?void 0:a}return Hu.call(e,t)?e[t]:void 0},Lu=Object.prototype.hasOwnProperty;var Bu=function(t){var e=this.__data__;return Mu?void 0!==e[t]:Lu.call(e,t)};var ku=function(t,e){var a=this.__data__;return this.size+=this.has(t)?0:1,a[t]=Mu&&void 0===e?"__lodash_hash_undefined__":e,this};function Cu(t){var e=-1,a=null==t?0:t.length;for(this.clear();++e<a;){var r=t[e];this.set(r[0],r[1])}}Cu.prototype.clear=_u,Cu.prototype.delete=Au,Cu.prototype.get=Vu,Cu.prototype.has=Bu,Cu.prototype.set=ku;var Su=Cu;var Eu=function(){this.size=0,this.__data__={hash:new Su,map:new(wu||yu),string:new Su}};var Ou=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var Tu=function(t,e){var a=t.__data__;return Ou(e)?a["string"==typeof e?"string":"hash"]:a.map};var Du=function(t){var e=Tu(this,t).delete(t);return this.size-=e?1:0,e};var ju=function(t){return Tu(this,t).get(t)};var Fu=function(t){return Tu(this,t).has(t)};var Iu=function(t,e){var a=Tu(this,t),r=a.size;return a.set(t,e),this.size+=a.size==r?0:1,this};function Pu(t){var e=-1,a=null==t?0:t.length;for(this.clear();++e<a;){var r=t[e];this.set(r[0],r[1])}}Pu.prototype.clear=Eu,Pu.prototype.delete=Du,Pu.prototype.get=ju,Pu.prototype.has=Fu,Pu.prototype.set=Iu;var Ru=Pu;var Nu=function(t,e){var a=this.__data__;if(a instanceof yu){var r=a.__data__;if(!wu||r.length<199)return r.push([t,e]),this.size=++a.size,this;a=this.__data__=new Ru(r)}return a.set(t,e),this.size=a.size,this};function $u(t){var e=this.__data__=new yu(t);this.size=e.size}$u.prototype.clear=gu,$u.prototype.delete=bu,$u.prototype.get=zu,$u.prototype.has=xu,$u.prototype.set=Nu;var Uu=$u;var Wu=function(t){var e=[];if(null!=t)for(var a in Object(t))e.push(a);return e},qu=Object.prototype.hasOwnProperty;var Gu=function(t){if(!qs(t))return Wu(t);var e=eu(t),a=[];for(var r in t)("constructor"!=r||!e&&qu.call(t,r))&&a.push(r);return a};var Yu=function(t){return ou(t)?Qh(t,!0):Gu(t)};var Ku=function(t,e){return t&&Dh(e,Yu(e),t)},Ju=kr((function(t,e){var a=e&&!e.nodeType&&e,r=a&&t&&!t.nodeType&&t,n=r&&r.exports===a?Ts.Buffer:void 0,i=n?n.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var a=t.length,r=i?i(a):new t.constructor(a);return t.copy(r),r}}));var Zu=function(t,e){for(var a=-1,r=null==t?0:t.length,n=0,i=[];++a<r;){var o=t[a];e(o,a,t)&&(i[n++]=o)}return i};var Xu=function(){return[]},Qu=Object.prototype.propertyIsEnumerable,td=Object.getOwnPropertySymbols,ed=td?function(t){return null==t?[]:(t=Object(t),Zu(td(t),(function(e){return Qu.call(t,e)})))}:Xu;var ad=function(t,e){return Dh(t,ed(t),e)};var rd=function(t,e){for(var a=-1,r=e.length,n=t.length;++a<r;)t[n+a]=e[a];return t},nd=au(Object.getPrototypeOf,Object),id=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)rd(e,ed(t)),t=nd(t);return e}:Xu;var od=function(t,e){return Dh(t,id(t),e)};var ld=function(t,e,a){var r=e(t);return Cc(t)?r:rd(r,a(t))};var sd=function(t){return ld(t,lu,ed)};var cd=function(t){return ld(t,Yu,id)},hd=sc(Ts,"DataView"),ud=sc(Ts,"Promise"),dd=sc(Ts,"Set"),pd=Qs(hd),md=Qs(wu),vd=Qs(ud),fd=Qs(dd),yd=Qs(cc),gd=Ws;(hd&&"[object DataView]"!=gd(new hd(new ArrayBuffer(1)))||wu&&"[object Map]"!=gd(new wu)||ud&&"[object Promise]"!=gd(ud.resolve())||dd&&"[object Set]"!=gd(new dd)||cc&&"[object WeakMap]"!=gd(new cc))&&(gd=function(t){var e=Ws(t),a="[object Object]"==e?t.constructor:void 0,r=a?Qs(a):"";if(r)switch(r){case pd:return"[object DataView]";case md:return"[object Map]";case vd:return"[object Promise]";case fd:return"[object Set]";case yd:return"[object WeakMap]"}return e});var bd=gd,zd=Object.prototype.hasOwnProperty;var xd=function(t){var e=t.length,a=new t.constructor(e);return e&&"string"==typeof t[0]&&zd.call(t,"index")&&(a.index=t.index,a.input=t.input),a},wd=Ts.Uint8Array;var Md=function(t){var e=new t.constructor(t.byteLength);return new wd(e).set(new wd(t)),e};var _d=function(t,e){var a=e?Md(t.buffer):t.buffer;return new t.constructor(a,t.byteOffset,t.byteLength)},Ad=/\w*$/;var Hd=function(t){var e=new t.constructor(t.source,Ad.exec(t));return e.lastIndex=t.lastIndex,e},Vd=Ds?Ds.prototype:void 0,Ld=Vd?Vd.valueOf:void 0;var Bd=function(t){return Ld?Object(Ld.call(t)):{}};var kd=function(t,e){var a=e?Md(t.buffer):t.buffer;return new t.constructor(a,t.byteOffset,t.length)};var Cd=function(t,e,a){var r=t.constructor;switch(e){case"[object ArrayBuffer]":return Md(t);case"[object Boolean]":case"[object Date]":return new r(+t);case"[object DataView]":return _d(t,a);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return kd(t,a);case"[object Map]":return new r;case"[object Number]":case"[object String]":return new r(t);case"[object RegExp]":return Hd(t);case"[object Set]":return new r;case"[object Symbol]":return Bd(t)}};var Sd=function(t){return"function"!=typeof t.constructor||eu(t)?{}:pc(nd(t))};var Ed=function(t){return Sc(t)&&"[object Map]"==bd(t)},Od=Kh&&Kh.isMap,Td=Od?Yh(Od):Ed;var Dd=function(t){return Sc(t)&&"[object Set]"==bd(t)},jd=Kh&&Kh.isSet,Fd=jd?Yh(jd):Dd,Id={};Id["[object Arguments]"]=Id["[object Array]"]=Id["[object ArrayBuffer]"]=Id["[object DataView]"]=Id["[object Boolean]"]=Id["[object Date]"]=Id["[object Float32Array]"]=Id["[object Float64Array]"]=Id["[object Int8Array]"]=Id["[object Int16Array]"]=Id["[object Int32Array]"]=Id["[object Map]"]=Id["[object Number]"]=Id["[object Object]"]=Id["[object RegExp]"]=Id["[object Set]"]=Id["[object String]"]=Id["[object Symbol]"]=Id["[object Uint8Array]"]=Id["[object Uint8ClampedArray]"]=Id["[object Uint16Array]"]=Id["[object Uint32Array]"]=!0,Id["[object Error]"]=Id["[object Function]"]=Id["[object WeakMap]"]=!1;var Pd=function t(e,a,r,n,i,o){var l,s=1&a,c=2&a,h=4&a;if(r&&(l=i?r(e,n,i,o):r(e)),void 0!==l)return l;if(!qs(e))return e;var u=Cc(e);if(u){if(l=xd(e),!s)return Ec(e,l)}else{var d=bd(e),p="[object Function]"==d||"[object GeneratorFunction]"==d;if(Uh(e))return Ju(e,s);if("[object Object]"==d||"[object Arguments]"==d||p&&!i){if(l=c||p?{}:Sd(e),!s)return c?od(e,Ku(l,e)):ad(e,su(l,e))}else{if(!Id[d])return i?e:{};l=Cd(e,d,s)}}o||(o=new Uu);var m=o.get(e);if(m)return m;o.set(e,l),Fd(e)?e.forEach((function(n){l.add(t(n,a,r,n,e,o))})):Td(e)&&e.forEach((function(n,i){l.set(i,t(n,a,r,i,e,o))}));var v=u?void 0:(h?c?cd:sd:c?Yu:lu)(e);return Jc(v||e,(function(n,i){v&&(n=e[i=n]),Th(l,i,t(n,a,r,i,e,o))})),l};var Rd=function(t){return Pd(t,4)};function Nd(t,e,a){var r=kh(t,8,void 0,void 0,void 0,void 0,void 0,e=a?void 0:e);return r.placeholder=Nd.placeholder,r}Nd.placeholder={};var $d=Nd,Ud=Function.prototype,Wd=Object.prototype,qd=Ud.toString,Gd=Wd.hasOwnProperty,Yd=qd.call(Object);var Kd=function(t){if(!Sc(t)||"[object Object]"!=Ws(t))return!1;var e=nd(t);if(null===e)return!0;var a=Gd.call(e,"constructor")&&e.constructor;return"function"==typeof a&&a instanceof a&&qd.call(a)==Yd};var Jd=function(t){if(!Sc(t))return!1;var e=Ws(t);return"[object Error]"==e||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!Kd(t)};var Zd=function(t){return Sc(t)&&"[object WeakMap]"==bd(t)};var Xd=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this};var Qd=function(t){return this.__data__.has(t)};function tp(t){var e=-1,a=null==t?0:t.length;for(this.__data__=new Ru;++e<a;)this.add(t[e])}tp.prototype.add=tp.prototype.push=Xd,tp.prototype.has=Qd;var ep=tp;var ap=function(t,e){for(var a=-1,r=null==t?0:t.length;++a<r;)if(e(t[a],a,t))return!0;return!1};var rp=function(t,e){return t.has(e)};var np=function(t,e,a,r,n,i){var o=1&a,l=t.length,s=e.length;if(l!=s&&!(o&&s>l))return!1;var c=i.get(t),h=i.get(e);if(c&&h)return c==e&&h==t;var u=-1,d=!0,p=2&a?new ep:void 0;for(i.set(t,e),i.set(e,t);++u<l;){var m=t[u],v=e[u];if(r)var f=o?r(v,m,u,e,t,i):r(m,v,u,t,e,i);if(void 0!==f){if(f)continue;d=!1;break}if(p){if(!ap(e,(function(t,e){if(!rp(p,e)&&(m===t||n(m,t,a,r,i)))return p.push(e)}))){d=!1;break}}else if(m!==v&&!n(m,v,a,r,i)){d=!1;break}}return i.delete(t),i.delete(e),d};var ip=function(t){var e=-1,a=Array(t.size);return t.forEach((function(t,r){a[++e]=[r,t]})),a};var op=function(t){var e=-1,a=Array(t.size);return t.forEach((function(t){a[++e]=t})),a},lp=Ds?Ds.prototype:void 0,sp=lp?lp.valueOf:void 0;var cp=function(t,e,a,r,n,i,o){switch(a){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!i(new wd(t),new wd(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Eh(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var l=ip;case"[object Set]":var s=1&r;if(l||(l=op),t.size!=e.size&&!s)return!1;var c=o.get(t);if(c)return c==e;r|=2,o.set(t,e);var h=np(l(t),l(e),r,n,i,o);return o.delete(t),h;case"[object Symbol]":if(sp)return sp.call(t)==sp.call(e)}return!1},hp=Object.prototype.hasOwnProperty;var up=function(t,e,a,r,n,i){var o=1&a,l=sd(t),s=l.length;if(s!=sd(e).length&&!o)return!1;for(var c=s;c--;){var h=l[c];if(!(o?h in e:hp.call(e,h)))return!1}var u=i.get(t),d=i.get(e);if(u&&d)return u==e&&d==t;var p=!0;i.set(t,e),i.set(e,t);for(var m=o;++c<s;){var v=t[h=l[c]],f=e[h];if(r)var y=o?r(f,v,h,e,t,i):r(v,f,h,t,e,i);if(!(void 0===y?v===f||n(v,f,a,r,i):y)){p=!1;break}m||(m="constructor"==h)}if(p&&!m){var g=t.constructor,b=e.constructor;g==b||!("constructor"in t)||!("constructor"in e)||"function"==typeof g&&g instanceof g&&"function"==typeof b&&b instanceof b||(p=!1)}return i.delete(t),i.delete(e),p},dp=Object.prototype.hasOwnProperty;var pp=function(t,e,a,r,n,i){var o=Cc(t),l=Cc(e),s=o?"[object Array]":bd(t),c=l?"[object Array]":bd(e),h="[object Object]"==(s="[object Arguments]"==s?"[object Object]":s),u="[object Object]"==(c="[object Arguments]"==c?"[object Object]":c),d=s==c;if(d&&Uh(t)){if(!Uh(e))return!1;o=!0,h=!1}if(d&&!h)return i||(i=new Uu),o||Zh(t)?np(t,e,a,r,n,i):cp(t,e,s,a,r,n,i);if(!(1&a)){var p=h&&dp.call(t,"__wrapped__"),m=u&&dp.call(e,"__wrapped__");if(p||m){var v=p?t.value():t,f=m?e.value():e;return i||(i=new Uu),n(v,f,a,r,i)}}return!!d&&(i||(i=new Uu),up(t,e,a,r,n,i))};var mp=function t(e,a,r,n,i){return e===a||(null==e||null==a||!Sc(e)&&!Sc(a)?e!=e&&a!=a:pp(e,a,r,n,t,i))};var vp=function(t,e,a,r){var n=a.length,i=n,o=!r;if(null==t)return!i;for(t=Object(t);n--;){var l=a[n];if(o&&l[2]?l[1]!==t[l[0]]:!(l[0]in t))return!1}for(;++n<i;){var s=(l=a[n])[0],c=t[s],h=l[1];if(o&&l[2]){if(void 0===c&&!(s in t))return!1}else{var u=new Uu;if(r)var d=r(c,h,s,t,e,u);if(!(void 0===d?mp(h,c,3,r,u):d))return!1}}return!0};var fp=function(t){return t==t&&!qs(t)};var yp=function(t){for(var e=lu(t),a=e.length;a--;){var r=e[a],n=t[r];e[a]=[r,n,fp(n)]}return e};var gp=function(t,e){return function(a){return null!=a&&(a[t]===e&&(void 0!==e||t in Object(a)))}};var bp=function(t){var e=yp(t);return 1==e.length&&e[0][2]?gp(e[0][0],e[0][1]):function(a){return a===t||vp(a,t,e)}},zp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,xp=/^\w*$/;var wp=function(t,e){if(Cc(t))return!1;var a=typeof t;return!("number"!=a&&"symbol"!=a&&"boolean"!=a&&null!=t&&!xh(t))||(xp.test(t)||!zp.test(t)||null!=e&&t in Object(e))};function Mp(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var a=function(){var r=arguments,n=e?e.apply(this,r):r[0],i=a.cache;if(i.has(n))return i.get(n);var o=t.apply(this,r);return a.cache=i.set(n,o)||i,o};return a.cache=new(Mp.Cache||Ru),a}Mp.Cache=Ru;var _p=Mp;var Ap=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Hp=/\\(\\)?/g,Vp=function(t){var e=_p(t,(function(t){return 500===a.size&&a.clear(),t})),a=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Ap,(function(t,a,r,n){e.push(r?n.replace(Hp,"$1"):a||t)})),e}));var Lp=function(t,e){for(var a=-1,r=null==t?0:t.length,n=Array(r);++a<r;)n[a]=e(t[a],a,t);return n},Bp=Ds?Ds.prototype:void 0,kp=Bp?Bp.toString:void 0;var Cp=function t(e){if("string"==typeof e)return e;if(Cc(e))return Lp(e,t)+"";if(xh(e))return kp?kp.call(e):"";var a=e+"";return"0"==a&&1/e==-Infinity?"-0":a};var Sp=function(t){return null==t?"":Cp(t)};var Ep=function(t,e){return Cc(t)?t:wp(t,e)?[t]:Vp(Sp(t))};var Op=function(t){if("string"==typeof t||xh(t))return t;var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e};var Tp=function(t,e){for(var a=0,r=(e=Ep(e,t)).length;null!=t&&a<r;)t=t[Op(e[a++])];return a&&a==r?t:void 0};var Dp=function(t,e,a){var r=null==t?void 0:Tp(t,e);return void 0===r?a:r};var jp=function(t,e){return null!=t&&e in Object(t)};var Fp=function(t,e,a){for(var r=-1,n=(e=Ep(e,t)).length,i=!1;++r<n;){var o=Op(e[r]);if(!(i=null!=t&&a(t,o)))break;t=t[o]}return i||++r!=n?i:!!(n=null==t?0:t.length)&&Wh(n)&&sh(o,n)&&(Cc(t)||Nh(t))};var Ip=function(t,e){return null!=t&&Fp(t,e,jp)};var Pp=function(t,e){return wp(t)&&fp(e)?gp(Op(t),e):function(a){var r=Dp(a,t);return void 0===r&&r===e?Ip(a,t):mp(e,r,3)}};var Rp=function(t){return function(e){return null==e?void 0:e[t]}};var Np=function(t){return function(e){return Tp(e,t)}};var $p=function(t){return wp(t)?Rp(Op(t)):Np(t)};var Up=function(t){return"function"==typeof t?t:null==t?Ss:"object"==typeof t?Cc(t)?Pp(t[0],t[1]):bp(t):$p(t)};var Wp=function(t){return Up("function"==typeof t?t:Pd(t,1))},qp=Ds?Ds.isConcatSpreadable:void 0;var Gp=function(t){return Cc(t)||Nh(t)||!!(qp&&t&&t[qp])};var Yp=function t(e,a,r,n,i){var o=-1,l=e.length;for(r||(r=Gp),i||(i=[]);++o<l;){var s=e[o];a>0&&r(s)?a>1?t(s,a-1,r,n,i):rd(i,s):n||(i[i.length]=s)}return i};var Kp=function(t){return(null==t?0:t.length)?Yp(t,1):[]},Jp=Math.max;var Zp=function(t,e,a){return e=Jp(void 0===e?t.length-1:e,0),function(){for(var r=arguments,n=-1,i=Jp(r.length-e,0),o=Array(i);++n<i;)o[n]=r[e+n];n=-1;for(var l=Array(e+1);++n<e;)l[n]=r[n];return l[e]=a(o),fc(t,this,l)}};var Xp=function(t){return Kc(Zp(t,void 0,Kp),t+"")}((function(t,e){return kh(t,256,void 0,void 0,void 0,e)}));var Qp=function(t){return Cc(t)?Lp(t,Op):xh(t)?[t]:Ec(Vp(Sp(t)))},tm={ary:Ch,assign:su,clone:Rd,curry:$d,forEach:Jc,isArray:Cc,isError:Jd,isFunction:Ys,isWeakMap:Zd,iteratee:Wp,keys:iu,rearg:Xp,toInteger:Lh,toPath:Qp};var em=function(t,e,a){return Pr(tm,t,e,a)};var am=function(t,e,a,r){for(var n=-1,i=null==t?0:t.length;++n<i;){var o=t[n];e(r,o,a(o),t)}return r};var rm=function(t){return function(e,a,r){for(var n=-1,i=Object(e),o=r(e),l=o.length;l--;){var s=o[t?l:++n];if(!1===a(i[s],s,i))break}return e}}();var nm=function(t,e){return function(a,r){if(null==a)return a;if(!ou(a))return t(a,r);for(var n=a.length,i=e?n:-1,o=Object(a);(e?i--:++i<n)&&!1!==r(o[i],i,o););return a}}((function(t,e){return t&&rm(t,e,lu)}));var im=function(t,e,a,r){return nm(t,(function(t,n,i){e(r,t,a(t),i)})),r};var om=function(t,e){return function(a,r){var n=Cc(a)?am:im,i=e?e():{};return n(a,t,Up(r),i)}},lm=Object.prototype.hasOwnProperty,sm=em("groupBy",om((function(t,e,a){lm.call(t,a)?t[a].push(e):Sh(t,a,[e])})));sm.placeholder=Tr;var cm=sm;var hm=function(t,e){return Pd(t,5,e="function"==typeof e?e:void 0)},um=kr((function(t,e){t.exports=function t(e,a,r){var n,i,o=window,l="application/octet-stream",s=r||l,c=e,h=!a&&!r&&c,u=document.createElement("a"),d=function(t){return String(t)},p=o.Blob||o.MozBlob||o.WebKitBlob||d,m=a||"download";if(p=p.call?p.bind(o):Blob,"true"===String(this)&&(s=(c=[c,s])[0],c=c[1]),h&&h.length<2048&&(m=h.split("/").pop().split("?")[0],u.href=h,-1!==u.href.indexOf(h))){var v=new XMLHttpRequest;return v.open("GET",h,!0),v.responseType="blob",v.onload=function(e){t(e.target.response,m,l)},setTimeout((function(){v.send()}),0),v}if(/^data:([\w+-]+\/[\w+.-]+)?[,;]/.test(c)){if(!(c.length>2096103.424&&p!==d))return navigator.msSaveBlob?navigator.msSaveBlob(b(c),m):z(c);s=(c=b(c)).type||l}else if(/([\x80-\xff])/.test(c)){for(var f=0,y=new Uint8Array(c.length),g=y.length;f<g;++f)y[f]=c.charCodeAt(f);c=new p([y],{type:s})}function b(t){for(var e=t.split(/[:;,]/),a=e[1],r=("base64"==e[2]?atob:decodeURIComponent)(e.pop()),n=r.length,i=0,o=new Uint8Array(n);i<n;++i)o[i]=r.charCodeAt(i);return new p([o],{type:a})}function z(t,e){if("download"in u)return u.href=t,u.setAttribute("download",m),u.className="download-js-link",u.innerHTML="downloading...",u.style.display="none",document.body.appendChild(u),setTimeout((function(){u.click(),document.body.removeChild(u),!0===e&&setTimeout((function(){o.URL.revokeObjectURL(u.href)}),250)}),66),!0;if(/(Version)\/(\d+)\.(\d+)(?:\.(\d+))?.*Safari\//.test(navigator.userAgent))return/^data:/.test(t)&&(t="data:"+t.replace(/^data:([\w\/\-\+]+)/,l)),window.open(t)||confirm("Displaying New Document\n\nUse Save As... to download, then click back to return to this page.")&&(location.href=t),!0;var a=document.createElement("iframe");document.body.appendChild(a),!e&&/^data:/.test(t)&&(t="data:"+t.replace(/^data:([\w\/\-\+]+)/,l)),a.src=t,setTimeout((function(){document.body.removeChild(a)}),333)}if(n=c instanceof p?c:new p([c],{type:s}),navigator.msSaveBlob)return navigator.msSaveBlob(n,m);if(o.URL)z(o.URL.createObjectURL(n),!0);else{if("string"==typeof n||n.constructor===d)try{return z("data:"+s+";base64,"+o.btoa(n))}catch(x){return z("data:"+s+","+encodeURIComponent(n))}(i=new FileReader).onload=function(t){z(this.result)},i.readAsDataURL(n)}return!0}}));function dm(t,e,a){t.dispatchEvent(new CustomEvent("finalize",{detail:{items:e,info:a}}))}function pm(t,e,a){t.dispatchEvent(new CustomEvent("consider",{detail:{items:e,info:a}}))}const mm="leftForAnother",vm="outsideOfAny";function fm(t,e,a){t.dispatchEvent(new CustomEvent("draggedEntered",{detail:{indexObj:e,draggedEl:a}}))}function ym(t,e,a){t.dispatchEvent(new CustomEvent("draggedLeft",{detail:{draggedEl:e,type:mm,theOtherDz:a}}))}function gm(t,e,a){t.dispatchEvent(new CustomEvent("draggedOverIndex",{detail:{indexObj:e,draggedEl:a}}))}const bm="dragStarted",zm="draggedEntered",xm="dragEnteredAnother",wm="draggedOverIndex",Mm="draggedLeft",_m="draggedLeftAll",Am="droppedIntoZone",Hm="droppedIntoAnother",Vm="droppedOutsideOfAny",Lm="dragStopped",Bm="pointer",km="keyboard";let Cm=0;function Sm(){Cm++}function Em(){if(0===Cm)throw new Error("Bug! trying to decrement when there are no dropzones");Cm--}const Om="undefined"==typeof window;function Tm(t){let e;const a=t.getBoundingClientRect(),r=getComputedStyle(t),n=r.transform;if(n){let i,o,l,s;if(n.startsWith("matrix3d("))e=n.slice(9,-1).split(/, /),i=+e[0],o=+e[5],l=+e[12],s=+e[13];else{if(!n.startsWith("matrix("))return a;e=n.slice(7,-1).split(/, /),i=+e[0],o=+e[3],l=+e[4],s=+e[5]}const c=r.transformOrigin,h=a.x-l-(1-i)*parseFloat(c),u=a.y-s-(1-o)*parseFloat(c.slice(c.indexOf(" ")+1)),d=i?a.width/i:t.offsetWidth,p=o?a.height/o:t.offsetHeight;return{x:h,y:u,width:d,height:p,top:u,right:h+d,bottom:u+p,left:h}}return a}function Dm(t){const e=Tm(t);return{top:e.top+window.scrollY,bottom:e.bottom+window.scrollY,left:e.left+window.scrollX,right:e.right+window.scrollX}}function jm(t){const e=t.getBoundingClientRect();return{top:e.top+window.scrollY,bottom:e.bottom+window.scrollY,left:e.left+window.scrollX,right:e.right+window.scrollX}}function Fm(t){return{x:(t.left+t.right)/2,y:(t.top+t.bottom)/2}}function Im(t,e){return t.y<=e.bottom&&t.y>=e.top&&t.x>=e.left&&t.x<=e.right}function Pm(t){return Fm(jm(t))}function Rm(t,e){return Im(Pm(t),Dm(e))}function Nm(t,e){const a=Pm(t),r=Pm(e);return n=a,i=r,Math.sqrt(Math.pow(n.x-i.x,2)+Math.pow(n.y-i.y,2));var n,i}let $m;function Um(){$m=new Map}function Wm(t,e){if(!Rm(t,e))return null;const a=e.children;if(0===a.length)return{index:0,isProximityBased:!0};const r=function(t){const e=Array.from(t.children).findIndex((t=>t.getAttribute("data-is-dnd-shadow-item")));if(e>=0)return $m.has(t)||$m.set(t,new Map),$m.get(t).set(e,Dm(t.children[e])),e}(e);for(let o=0;o<a.length;o++)if(Rm(t,a[o])){const a=$m.has(e)&&$m.get(e).get(o);return a&&!Im(Pm(t),a)?{index:r,isProximityBased:!1}:{index:o,isProximityBased:!1}}let n,i=Number.MAX_VALUE;for(let o=0;o<a.length;o++){const e=Nm(t,a[o]);e<i&&(i=e,n=o)}return{index:n,isProximityBased:!0}}Um();function qm(){let t;function e(){t={directionObj:void 0,stepPx:0}}function a(e){const{directionObj:r,stepPx:n}=t;r&&(e.scrollBy(r.x*n,r.y*n),window.requestAnimationFrame((()=>a(e))))}function r(t){return 25-t}return e(),{scrollIfNeeded:function(n,i){if(!i)return!1;const o=function(t,e){const a=jm(e);return Im(t,a)?{top:t.y-a.top,bottom:a.bottom-t.y,left:t.x-a.left,right:Math.min(a.right,document.documentElement.clientWidth)-t.x}:null}(n,i);if(null===o)return e(),!1;const l=!!t.directionObj;let[s,c]=[!1,!1];return i.scrollHeight>i.clientHeight&&(o.bottom<25?(s=!0,t.directionObj={x:0,y:1},t.stepPx=r(o.bottom)):o.top<25&&(s=!0,t.directionObj={x:0,y:-1},t.stepPx=r(o.top)),!l&&s)||i.scrollWidth>i.clientWidth&&(o.right<25?(c=!0,t.directionObj={x:1,y:0},t.stepPx=r(o.right)):o.left<25&&(c=!0,t.directionObj={x:-1,y:0},t.stepPx=r(o.left)),!l&&c)?(a(i),!0):(e(),!1)},resetScrolling:e}}function Gm(t){return JSON.stringify(t,null,2)}function Ym(t){if(!t)throw new Error("cannot get depth of a falsy node");return Km(t,0)}function Km(t,e=0){return t.parentElement?Km(t.parentElement,e+1):e-1}const{scrollIfNeeded:Jm,resetScrolling:Zm}=qm();let Xm;function Qm(t,e,a=200){let r,n,i,o=!1;const l=Array.from(e).sort(((t,e)=>Ym(e)-Ym(t)));!function e(){const s=Pm(t);if(!Jm(s,r)&&i&&Math.abs(i.x-s.x)<10&&Math.abs(i.y-s.y)<10)return void(Xm=window.setTimeout(e,a));if(function(t){const e=jm(t);return e.right<0||e.left>document.documentElement.scrollWidth||e.bottom<0||e.top>document.documentElement.scrollHeight}(t))return void function(t){window.dispatchEvent(new CustomEvent("draggedLeftDocument",{detail:{draggedEl:t}}))}(t);i=s;let c=!1;for(const a of l){const e=Wm(t,a);if(null===e)continue;const{index:i}=e;c=!0,a!==r?(r&&ym(r,t,a),fm(a,e,t),r=a):i!==n&&(gm(a,e,t),n=i);break}!c&&o&&r?(!function(t,e){t.dispatchEvent(new CustomEvent("draggedLeft",{detail:{draggedEl:e,type:vm}}))}(r,t),r=void 0,n=void 0,o=!1):o=!0,Xm=window.setTimeout(e,a)}()}let tv;function ev(t){const e=t.touches?t.touches[0]:t;tv={x:e.clientX,y:e.clientY}}const{scrollIfNeeded:av,resetScrolling:rv}=qm();let nv;function iv(){tv&&av(tv,document.documentElement),nv=window.setTimeout(iv,300)}function ov(t){return`${t} 0.2s ease`}function lv(t,e,a,r,n){const i=e.getBoundingClientRect(),o=t.getBoundingClientRect(),l=i.width-o.width,s=i.height-o.height;if(l||s){const e={left:(a-o.left)/o.width,top:(r-o.top)/o.height};t.style.height=`${i.height}px`,t.style.width=`${i.width}px`,t.style.left=parseFloat(t.style.left)-e.left*l+"px",t.style.top=parseFloat(t.style.top)-e.top*s+"px"}sv(e,t),n()}function sv(t,e){const a=window.getComputedStyle(t);Array.from(a).filter((t=>t.startsWith("background")||t.startsWith("padding")||t.startsWith("font")||t.startsWith("text")||t.startsWith("align")||t.startsWith("justify")||t.startsWith("display")||t.startsWith("flex")||t.startsWith("border")||"opacity"===t||"color"===t||"list-style-type"===t)).forEach((t=>e.style.setProperty(t,a.getPropertyValue(t),a.getPropertyPriority(t))))}function cv(t,e){t.draggable=!1,t.ondragstart=()=>!1,e?(t.style.userSelect="",t.style.WebkitUserSelect="",t.style.cursor=""):(t.style.userSelect="none",t.style.WebkitUserSelect="none",t.style.cursor="grab")}function hv(t,e=(()=>{}),a=(()=>[])){t.forEach((t=>{const r=e(t);Object.keys(r).forEach((e=>{t.style[e]=r[e]})),a(t).forEach((e=>t.classList.add(e)))}))}function uv(t,e=(()=>{}),a=(()=>[])){t.forEach((t=>{const r=e(t);Object.keys(r).forEach((e=>{t.style[e]=""})),a(t).forEach((e=>t.classList.contains(e)&&t.classList.remove(e)))}))}const dv={outline:"rgba(255, 255, 102, 0.7) solid 2px"};let pv,mv,vv,fv,yv,gv,bv,zv,xv,wv,Mv,_v=!1,Av=!1,Hv=!1;const Vv=new Map,Lv=new Map,Bv=new WeakMap;function kv(t,e){Vv.get(e).delete(t),Em(),0===Vv.get(e).size&&Vv.delete(e)}function Cv(){window.addEventListener("mousemove",ev),window.addEventListener("touchmove",ev),iv();const t=Vv.get(fv);for(const a of t)a.addEventListener("draggedEntered",Ov),a.addEventListener("draggedLeft",Tv),a.addEventListener("draggedOverIndex",Dv);window.addEventListener("draggedLeftDocument",Fv);const e=Math.max(100,...Array.from(t.keys()).map((t=>Lv.get(t).dropAnimationDurationMs)));Qm(mv,t,1.07*e)}function Sv(){window.removeEventListener("mousemove",ev),window.removeEventListener("touchmove",ev),tv=void 0,window.clearTimeout(nv),rv();const t=Vv.get(fv);for(const e of t)e.removeEventListener("draggedEntered",Ov),e.removeEventListener("draggedLeft",Tv),e.removeEventListener("draggedOverIndex",Dv);window.removeEventListener("draggedLeftDocument",Fv),clearTimeout(Xm),Zm(),Um()}function Ev(t){return t.findIndex((t=>!!t.isDndShadowItem&&"id:dnd-shadow-placeholder-0000"!==t.id))}function Ov(t){let{items:e,dropFromOthersDisabled:a}=Lv.get(t.currentTarget);if(a&&t.currentTarget!==yv)return;if(Hv=!1,e=e.filter((t=>t.id!==bv.id)),yv!==t.currentTarget){const t=Lv.get(yv).items.filter((t=>!t.isDndShadowItem));pm(yv,t,{trigger:xm,id:vv.id,source:Bm})}else{const t=function(t){return t.findIndex((t=>"id:dnd-shadow-placeholder-0000"===t.id))}(e);-1!==t&&e.splice(t,1)}const{index:r,isProximityBased:n}=t.detail.indexObj,i=n&&r===t.currentTarget.children.length-1?r+1:r;zv=t.currentTarget,e.splice(i,0,bv),pm(t.currentTarget,e,{trigger:zm,id:vv.id,source:Bm})}function Tv(t){if(!_v)return;const{items:e,dropFromOthersDisabled:a}=Lv.get(t.currentTarget);if(a&&t.currentTarget!==yv&&t.currentTarget!==zv)return;const r=Ev(e),n=e.splice(r,1)[0];zv=void 0;const{type:i,theOtherDz:o}=t.detail;if(i===vm||i===mm&&o!==yv&&Lv.get(o).dropFromOthersDisabled){Hv=!0,zv=yv;const t=Lv.get(yv).items;t.splice(gv,0,n),pm(yv,t,{trigger:_m,id:vv.id,source:Bm})}pm(t.currentTarget,e,{trigger:Mm,id:vv.id,source:Bm})}function Dv(t){const{items:e,dropFromOthersDisabled:a}=Lv.get(t.currentTarget);if(a&&t.currentTarget!==yv)return;Hv=!1;const{index:r}=t.detail.indexObj,n=Ev(e);e.splice(n,1),e.splice(r,0,bv),pm(t.currentTarget,e,{trigger:wm,id:vv.id,source:Bm})}function jv(t){t.preventDefault();const e=t.touches?t.touches[0]:t;wv={x:e.clientX,y:e.clientY},mv.style.transform=`translate3d(${wv.x-xv.x}px, ${wv.y-xv.y}px, 0)`}function Fv(){Av=!0,window.removeEventListener("mousemove",jv),window.removeEventListener("touchmove",jv),window.removeEventListener("mouseup",Fv),window.removeEventListener("touchend",Fv),Sv(),mv.style.cursor="grab",zv||(zv=yv);let{items:t,type:e}=Lv.get(zv);uv(Vv.get(e),(t=>Lv.get(t).dropTargetStyle),(t=>Lv.get(t).dropTargetClasses));let a=Ev(t);-1===a&&(a=gv),t=t.map((t=>t.isDndShadowItem?vv:t)),function(t,e){const a=Tm(zv.children[t]),r={x:a.left-parseFloat(mv.style.left),y:a.top-parseFloat(mv.style.top)},{dropAnimationDurationMs:n}=Lv.get(zv),i=`transform ${n}ms ease`;mv.style.transition=mv.style.transition?mv.style.transition+","+i:i,mv.style.transform=`translate3d(${r.x}px, ${r.y}px, 0)`,window.setTimeout(e,n)}(a,(function(){var e;Mv(),dm(zv,t,{trigger:Hv?Vm:Am,id:vv.id,source:Bm}),zv!==yv&&dm(yv,Lv.get(yv).items,{trigger:Hm,id:vv.id,source:Bm}),(e=zv.children[a]).style.visibility="",e.removeAttribute("data-is-dnd-shadow-item"),mv.remove(),pv.remove(),mv=void 0,pv=void 0,vv=void 0,fv=void 0,yv=void 0,gv=void 0,bv=void 0,zv=void 0,xv=void 0,wv=void 0,_v=!1,Av=!1,Mv=void 0,Hv=!1}))}function Iv(t,e){const a={items:void 0,type:void 0,flipDurationMs:0,dragDisabled:!1,morphDisabled:!1,dropFromOthersDisabled:!1,dropTargetStyle:dv,dropTargetClasses:[],transformDraggedElement:()=>{},centreDraggedOnCursor:!1};let r=new Map;function n(){window.removeEventListener("mousemove",l),window.removeEventListener("touchmove",l),window.removeEventListener("mouseup",o),window.removeEventListener("touchend",o)}function o(){n(),pv=void 0,xv=void 0,wv=void 0}function l(t){t.preventDefault();const e=t.touches?t.touches[0]:t;wv={x:e.clientX,y:e.clientY},(Math.abs(wv.x-xv.x)>=3||Math.abs(wv.y-xv.y)>=3)&&(n(),function(){_v=!0;const t=r.get(pv);gv=t,yv=pv.parentElement;const{items:e,type:n,centreDraggedOnCursor:o}=a;vv=i({},e[t]),fv=n,bv=i(i({},vv),{isDndShadowItem:!0});const l=i(i({},bv),{id:"id:dnd-shadow-placeholder-0000"});function s(){var t;mv.parentElement?window.requestAnimationFrame(s):(document.body.appendChild(mv),mv.focus(),Cv(),(t=pv).style.display="none",t.style.position="fixed",t.style.zIndex="-5",document.body.appendChild(pv))}mv=function(t,e){const a=t.getBoundingClientRect(),r=t.cloneNode(!0);sv(t,r),r.id="dnd-action-dragged-el",r.style.position="fixed";let n=a.top,i=a.left;if(r.style.top=`${n}px`,r.style.left=`${i}px`,e){const t=Fm(a);n-=t.y-e.y,i-=t.x-e.x,window.setTimeout((()=>{r.style.top=`${n}px`,r.style.left=`${i}px`}),0)}return r.style.margin="0",r.style.boxSizing="border-box",r.style.height=`${a.height}px`,r.style.width=`${a.width}px`,r.style.transition=`${ov("top")}, ${ov("left")}, ${ov("background-color")}, ${ov("opacity")}, ${ov("color")} `,window.setTimeout((()=>r.style.transition+=`, ${ov("width")}, ${ov("height")}`),0),r.style.zIndex="9999",r.style.cursor="grabbing",r}(pv,o&&wv),window.requestAnimationFrame(s),hv(Array.from(Vv.get(a.type)).filter((t=>t===yv||!Lv.get(t).dropFromOthersDisabled)),(t=>Lv.get(t).dropTargetStyle),(t=>Lv.get(t).dropTargetClasses)),e.splice(t,1,l),Mv=function(t){const e=t.style.minHeight;t.style.minHeight=window.getComputedStyle(t).getPropertyValue("height");const a=t.style.minWidth;return t.style.minWidth=window.getComputedStyle(t).getPropertyValue("width"),function(){t.style.minHeight=e,t.style.minWidth=a}}(yv),pm(yv,e,{trigger:bm,id:vv.id,source:Bm}),window.addEventListener("mousemove",jv,{passive:!1}),window.addEventListener("touchmove",jv,{passive:!1,capture:!1}),window.addEventListener("mouseup",Fv,{passive:!1}),window.addEventListener("touchend",Fv,{passive:!1})}())}function s(t){if(t.target!==t.currentTarget&&(void 0!==t.target.value||t.target.isContentEditable))return;if(t.button)return;if(_v)return;t.stopPropagation();const e=t.touches?t.touches[0]:t;xv={x:e.clientX,y:e.clientY},wv=i({},xv),pv=t.currentTarget,window.addEventListener("mousemove",l,{passive:!1}),window.addEventListener("touchmove",l,{passive:!1,capture:!1}),window.addEventListener("mouseup",o,{passive:!1}),window.addEventListener("touchend",o,{passive:!1})}function c({items:e,flipDurationMs:n=0,type:i="--any--",dragDisabled:o=!1,morphDisabled:l=!1,dropFromOthersDisabled:c=!1,dropTargetStyle:h=dv,dropTargetClasses:u=[],transformDraggedElement:d=(()=>{}),centreDraggedOnCursor:p=!1}){var m,v;function f(t,e){return Lv.get(t)?Lv.get(t)[e]:a[e]}a.dropAnimationDurationMs=n,a.type&&i!==a.type&&kv(t,a.type),a.type=i,m=t,v=i,Vv.has(v)||Vv.set(v,new Set),Vv.get(v).has(m)||(Vv.get(v).add(m),Sm()),a.items=[...e],a.dragDisabled=o,a.morphDisabled=l,a.transformDraggedElement=d,a.centreDraggedOnCursor=p,!_v||Av||function(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const a in t)if(!{}.hasOwnProperty.call(e,a)||e[a]!==t[a])return!1;return!0}(h,a.dropTargetStyle)&&function(t,e){if(t.length!==e.length)return!1;for(let a=0;a<t.length;a++)if(t[a]!==e[a])return!1;return!0}(u,a.dropTargetClasses)||(uv([t],(()=>a.dropTargetStyle),(()=>u)),hv([t],(()=>h),(()=>u))),a.dropTargetStyle=h,a.dropTargetClasses=[...u],_v&&a.dropFromOthersDisabled!==c&&(c?uv([t],(t=>f(t,"dropTargetStyle")),(t=>f(t,"dropTargetClasses"))):hv([t],(t=>f(t,"dropTargetStyle")),(t=>f(t,"dropTargetClasses")))),a.dropFromOthersDisabled=c,Lv.set(t,a);const y=Ev(a.items);for(let b=0;b<t.children.length;b++){const e=t.children[b];cv(e,o),b!==y?(e.removeEventListener("mousedown",Bv.get(e)),e.removeEventListener("touchstart",Bv.get(e)),o||(e.addEventListener("mousedown",s),e.addEventListener("touchstart",s),Bv.set(e,s)),r.set(e,b)):(l||lv(mv,e,wv.x,wv.y,(()=>a.transformDraggedElement(mv,vv,b))),(g=e).style.visibility="hidden",g.setAttribute("data-is-dnd-shadow-item","true"))}var g}return c(e),{update:t=>{c(t)},destroy:()=>{kv(t,a.type),Lv.delete(t)}}}const Pv={DND_ZONE_ACTIVE:"dnd-zone-active",DND_ZONE_DRAG_DISABLED:"dnd-zone-drag-disabled"},Rv={[Pv.DND_ZONE_ACTIVE]:"Tab to one the items and press space-bar or enter to start dragging it",[Pv.DND_ZONE_DRAG_DISABLED]:"This is a disabled drag and drop list"};let Nv;function $v(){Nv=document.createElement("div"),Nv.id="dnd-action-aria-alert",Nv.style.position="fixed",Nv.style.bottom="0",Nv.style.left="0",Nv.style.zIndex="-5",Nv.style.opacity="0",Nv.style.height="0",Nv.style.width="0",Nv.setAttribute("role","alert"),document.body.prepend(Nv),Object.entries(Rv).forEach((([t,e])=>document.body.prepend(function(t,e){const a=document.createElement("div");return a.id=t,a.innerHTML=`<p>${e}</p>`,a.style.display="none",a.style.position="fixed",a.style.zIndex="-5",a}(t,e))))}function Uv(t){Nv.innerHTML="";const e=document.createTextNode(t);Nv.appendChild(e),Nv.style.display="none",Nv.style.display="inline"}const Wv={outline:"rgba(255, 255, 102, 0.7) solid 2px"};let qv,Gv,Yv,Kv,Jv=!1,Zv="",Xv="";const Qv=new WeakSet,tf=new WeakMap,ef=new WeakMap,af=new Map,rf=new Map,nf=new Map,of=Om?null:("complete"===document.readyState?$v():window.addEventListener("DOMContentLoaded",$v),i({},Pv));function lf(t,e){Gv===t&&df(),nf.get(e).delete(t),Em(),0===nf.get(e).size&&nf.delete(e),0===nf.size&&(window.removeEventListener("keydown",sf),window.removeEventListener("click",cf))}function sf(t){if(Jv)switch(t.key){case"Escape":df()}}function cf(){Jv&&(Qv.has(document.activeElement)||df())}function hf(t){if(!Jv)return;const e=t.currentTarget;if(e===Gv)return;Zv=e.getAttribute("aria-label")||"";const{items:a}=rf.get(Gv),r=a.find((t=>t.id===Kv)),n=a.indexOf(r),i=a.splice(n,1)[0],{items:o,autoAriaDisabled:l}=rf.get(e);e.getBoundingClientRect().top<Gv.getBoundingClientRect().top||e.getBoundingClientRect().left<Gv.getBoundingClientRect().left?(o.push(i),l||Uv(`Moved item ${Xv} to the end of the list ${Zv}`)):(o.unshift(i),l||Uv(`Moved item ${Xv} to the beginning of the list ${Zv}`));dm(Gv,a,{trigger:Hm,id:Kv,source:km}),dm(e,o,{trigger:Am,id:Kv,source:km}),Gv=e}function uf(){af.forEach((({update:t},e)=>t(rf.get(e))))}function df(t=!0){rf.get(Gv).autoAriaDisabled||Uv(`Stopped dragging item ${Xv}`),Qv.has(document.activeElement)&&document.activeElement.blur(),t&&pm(Gv,rf.get(Gv).items,{trigger:Lm,id:Kv,source:km}),uv(nf.get(qv),(t=>rf.get(t).dropTargetStyle),(t=>rf.get(t).dropTargetClasses)),Yv=null,Kv=null,Xv="",qv=null,Gv=null,Zv="",Jv=!1,uf()}function pf(t,e){const a={items:void 0,type:void 0,dragDisabled:!1,dropFromOthersDisabled:!1,dropTargetStyle:Wv,dropTargetClasses:[],autoAriaDisabled:!1};function r(t,e,a){t.length<=1||t.splice(a,1,t.splice(e,1,t[a])[0])}function n(e){switch(e.key){case"Enter":case" ":if((void 0!==e.target.disabled||e.target.href||e.target.isContentEditable)&&!Qv.has(e.target))return;e.preventDefault(),e.stopPropagation(),Jv?df():i(e);break;case"ArrowDown":case"ArrowRight":{if(!Jv)return;e.preventDefault(),e.stopPropagation();const{items:n}=rf.get(t),i=Array.from(t.children),o=i.indexOf(e.currentTarget);o<i.length-1&&(a.autoAriaDisabled||Uv(`Moved item ${Xv} to position ${o+2} in the list ${Zv}`),r(n,o,o+1),dm(t,n,{trigger:Am,id:Kv,source:km}));break}case"ArrowUp":case"ArrowLeft":{if(!Jv)return;e.preventDefault(),e.stopPropagation();const{items:n}=rf.get(t),i=Array.from(t.children).indexOf(e.currentTarget);i>0&&(a.autoAriaDisabled||Uv(`Moved item ${Xv} to position ${i} in the list ${Zv}`),r(n,i,i-1),dm(t,n,{trigger:Am,id:Kv,source:km}));break}}}function i(e){!function(e){const{items:a}=rf.get(t),r=Array.from(t.children),n=r.indexOf(e);Yv=e,Yv.tabIndex=0,Kv=a[n].id,Xv=r[n].getAttribute("aria-label")||""}(e.currentTarget),Gv=t,qv=a.type,Jv=!0;const r=Array.from(nf.get(a.type)).filter((t=>t===Gv||!rf.get(t).dropFromOthersDisabled));if(hv(r,(t=>rf.get(t).dropTargetStyle),(t=>rf.get(t).dropTargetClasses)),!a.autoAriaDisabled){let t=`Started dragging item ${Xv}. Use the arrow keys to move it within its list ${Zv}`;r.length>1&&(t+=", or tab to another list in order to move the item into it"),Uv(t)}pm(t,rf.get(t).items,{trigger:bm,id:Kv,source:km}),uf()}function o(t){Jv&&t.currentTarget!==Yv&&(t.stopPropagation(),df(!1),i(t))}function l({items:e=[],type:r="--any--",dragDisabled:i=!1,dropFromOthersDisabled:l=!1,dropTargetStyle:s=Wv,dropTargetClasses:c=[],autoAriaDisabled:h=!1}){var u,d;a.items=[...e],a.dragDisabled=i,a.dropFromOthersDisabled=l,a.dropTargetStyle=s,a.dropTargetClasses=c,a.autoAriaDisabled=h,h||(t.setAttribute("aria-disabled",i),t.setAttribute("role","list"),t.setAttribute("aria-describedby",i?of.DND_ZONE_DRAG_DISABLED:of.DND_ZONE_ACTIVE)),a.type&&r!==a.type&&lf(t,a.type),a.type=r,u=t,d=r,0===nf.size&&(window.addEventListener("keydown",sf),window.addEventListener("click",cf)),nf.has(d)||nf.set(d,new Set),nf.get(d).has(u)||(nf.get(d).add(u),Sm()),rf.set(t,a),t.tabIndex=Jv&&(t===Gv||Yv.contains(t)||a.dropFromOthersDisabled||Gv&&a.type!==rf.get(Gv).type)?-1:0,t.addEventListener("focus",hf);for(let p=0;p<t.children.length;p++){const e=t.children[p];Qv.add(e),e.tabIndex=Jv?-1:0,h||e.setAttribute("role","listitem"),e.removeEventListener("keydown",tf.get(e)),e.removeEventListener("click",ef.get(e)),i||(e.addEventListener("keydown",n),tf.set(e,n),e.addEventListener("click",o),ef.set(e,o)),Jv&&a.items[p].id===Kv&&(Yv=e,Yv.tabIndex=0,e.focus())}}l(e);const s={update:t=>{l(t)},destroy:()=>{lf(t,a.type),rf.delete(t),af.delete(t)}};return af.set(t,s),s}function mf(t,e){vf(e);const a=Iv(t,e),r=pf(t,e);return{update:t=>{vf(t),a.update(t),r.update(t)},destroy:()=>{a.destroy(),r.destroy()}}}function vf(t){const{items:n,flipDurationMs:i,type:o,dragDisabled:l,morphDisabled:s,dropFromOthersDisabled:c,dropTargetStyle:h,dropTargetClasses:u,transformDraggedElement:d,autoAriaDisabled:p,centreDraggedOnCursor:m}=t,v=((t,n)=>{var i={};for(var o in t)e.call(t,o)&&n.indexOf(o)<0&&(i[o]=t[o]);if(null!=t&&a)for(var o of a(t))n.indexOf(o)<0&&r.call(t,o)&&(i[o]=t[o]);return i})(t,["items","flipDurationMs","type","dragDisabled","morphDisabled","dropFromOthersDisabled","dropTargetStyle","dropTargetClasses","transformDraggedElement","autoAriaDisabled","centreDraggedOnCursor"]);if(Object.keys(v).length>0&&console.warn("dndzone will ignore unknown options",v),!n)throw new Error("no 'items' key provided to dndzone");const f=n.find((t=>!{}.hasOwnProperty.call(t,"id")));if(f)throw new Error(`missing 'id' property for item ${Gm(f)}`);if(u&&!Array.isArray(u))throw new Error(`dropTargetClasses should be an array but instead it is a ${typeof u}, ${Gm(u)}`)}function ff(){return(ff=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(t[r]=a[r])}return t}).apply(this,arguments)}function yf(t,e){for(var a=0;a<e.length;a++){var r=e[a];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var gf=Object.prototype.hasOwnProperty;function bf(t,e){return null!=t&&gf.call(t,e)}var zf=Array.isArray,xf="object"==typeof global&&global&&global.Object===Object&&global,wf="object"==typeof self&&self&&self.Object===Object&&self,Mf=xf||wf||Function("return this")(),_f=Mf.Symbol,Af=Object.prototype,Hf=Af.hasOwnProperty,Vf=Af.toString,Lf=_f?_f.toStringTag:void 0;var Bf=Object.prototype.toString;var kf=_f?_f.toStringTag:void 0;function Cf(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":kf&&kf in Object(t)?function(t){var e=Hf.call(t,Lf),a=t[Lf];try{t[Lf]=void 0;var r=!0}catch(i){}var n=Vf.call(t);return r&&(e?t[Lf]=a:delete t[Lf]),n}(t):function(t){return Bf.call(t)}(t)}function Sf(t){return null!=t&&"object"==typeof t}function Ef(t){return"symbol"==typeof t||Sf(t)&&"[object Symbol]"==Cf(t)}var Of=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Tf=/^\w*$/;function Df(t,e){if(zf(t))return!1;var a=typeof t;return!("number"!=a&&"symbol"!=a&&"boolean"!=a&&null!=t&&!Ef(t))||(Tf.test(t)||!Of.test(t)||null!=e&&t in Object(e))}function jf(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Ff(t){if(!jf(t))return!1;var e=Cf(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}var If=Mf["__core-js_shared__"],Pf=function(){var t=/[^.]+$/.exec(If&&If.keys&&If.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();var Rf=Function.prototype.toString;function Nf(t){if(null!=t){try{return Rf.call(t)}catch(e){}try{return t+""}catch(e){}}return""}var $f=/^\[object .+?Constructor\]$/,Uf=Function.prototype,Wf=Object.prototype,qf=Uf.toString,Gf=Wf.hasOwnProperty,Yf=RegExp("^"+qf.call(Gf).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Kf(t){return!(!jf(t)||(e=t,Pf&&Pf in e))&&(Ff(t)?Yf:$f).test(Nf(t));var e}function Jf(t,e){var a=function(t,e){return null==t?void 0:t[e]}(t,e);return Kf(a)?a:void 0}var Zf=Jf(Object,"create");var Xf=Object.prototype.hasOwnProperty;var Qf=Object.prototype.hasOwnProperty;function ty(t){var e=-1,a=null==t?0:t.length;for(this.clear();++e<a;){var r=t[e];this.set(r[0],r[1])}}function ey(t,e){return t===e||t!=t&&e!=e}function ay(t,e){for(var a=t.length;a--;)if(ey(t[a][0],e))return a;return-1}ty.prototype.clear=function(){this.__data__=Zf?Zf(null):{},this.size=0},ty.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},ty.prototype.get=function(t){var e=this.__data__;if(Zf){var a=e[t];return"__lodash_hash_undefined__"===a?void 0:a}return Xf.call(e,t)?e[t]:void 0},ty.prototype.has=function(t){var e=this.__data__;return Zf?void 0!==e[t]:Qf.call(e,t)},ty.prototype.set=function(t,e){var a=this.__data__;return this.size+=this.has(t)?0:1,a[t]=Zf&&void 0===e?"__lodash_hash_undefined__":e,this};var ry=Array.prototype.splice;function ny(t){var e=-1,a=null==t?0:t.length;for(this.clear();++e<a;){var r=t[e];this.set(r[0],r[1])}}ny.prototype.clear=function(){this.__data__=[],this.size=0},ny.prototype.delete=function(t){var e=this.__data__,a=ay(e,t);return!(a<0)&&(a==e.length-1?e.pop():ry.call(e,a,1),--this.size,!0)},ny.prototype.get=function(t){var e=this.__data__,a=ay(e,t);return a<0?void 0:e[a][1]},ny.prototype.has=function(t){return ay(this.__data__,t)>-1},ny.prototype.set=function(t,e){var a=this.__data__,r=ay(a,t);return r<0?(++this.size,a.push([t,e])):a[r][1]=e,this};var iy=Jf(Mf,"Map");function oy(t,e){var a=t.__data__;return function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}(e)?a["string"==typeof e?"string":"hash"]:a.map}function ly(t){var e=-1,a=null==t?0:t.length;for(this.clear();++e<a;){var r=t[e];this.set(r[0],r[1])}}ly.prototype.clear=function(){this.size=0,this.__data__={hash:new ty,map:new(iy||ny),string:new ty}},ly.prototype.delete=function(t){var e=oy(this,t).delete(t);return this.size-=e?1:0,e},ly.prototype.get=function(t){return oy(this,t).get(t)},ly.prototype.has=function(t){return oy(this,t).has(t)},ly.prototype.set=function(t,e){var a=oy(this,t),r=a.size;return a.set(t,e),this.size+=a.size==r?0:1,this};function sy(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var a=function(){var r=arguments,n=e?e.apply(this,r):r[0],i=a.cache;if(i.has(n))return i.get(n);var o=t.apply(this,r);return a.cache=i.set(n,o)||i,o};return a.cache=new(sy.Cache||ly),a}sy.Cache=ly;var cy,hy,uy,dy=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,py=/\\(\\)?/g,my=(cy=function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(dy,(function(t,a,r,n){e.push(r?n.replace(py,"$1"):a||t)})),e},hy=sy(cy,(function(t){return 500===uy.size&&uy.clear(),t})),uy=hy.cache,hy);function vy(t,e){for(var a=-1,r=null==t?0:t.length,n=Array(r);++a<r;)n[a]=e(t[a],a,t);return n}var fy=_f?_f.prototype:void 0,yy=fy?fy.toString:void 0;function gy(t){if("string"==typeof t)return t;if(zf(t))return vy(t,gy)+"";if(Ef(t))return yy?yy.call(t):"";var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e}function by(t){return null==t?"":gy(t)}function zy(t,e){return zf(t)?t:Df(t,e)?[t]:my(by(t))}function xy(t){return Sf(t)&&"[object Arguments]"==Cf(t)}var wy=Object.prototype,My=wy.hasOwnProperty,_y=wy.propertyIsEnumerable,Ay=xy(function(){return arguments}())?xy:function(t){return Sf(t)&&My.call(t,"callee")&&!_y.call(t,"callee")},Hy=/^(?:0|[1-9]\d*)$/;function Vy(t,e){var a=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==a||"symbol"!=a&&Hy.test(t))&&t>-1&&t%1==0&&t<e}function Ly(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function By(t){if("string"==typeof t||Ef(t))return t;var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e}function ky(t,e,a){for(var r=-1,n=(e=zy(e,t)).length,i=!1;++r<n;){var o=By(e[r]);if(!(i=null!=t&&a(t,o)))break;t=t[o]}return i||++r!=n?i:!!(n=null==t?0:t.length)&&Ly(n)&&Vy(o,n)&&(zf(t)||Ay(t))}function Cy(t,e){return null!=t&&ky(t,e,bf)}function Sy(t){var e=this.__data__=new ny(t);this.size=e.size}Sy.prototype.clear=function(){this.__data__=new ny,this.size=0},Sy.prototype.delete=function(t){var e=this.__data__,a=e.delete(t);return this.size=e.size,a},Sy.prototype.get=function(t){return this.__data__.get(t)},Sy.prototype.has=function(t){return this.__data__.has(t)},Sy.prototype.set=function(t,e){var a=this.__data__;if(a instanceof ny){var r=a.__data__;if(!iy||r.length<199)return r.push([t,e]),this.size=++a.size,this;a=this.__data__=new ly(r)}return a.set(t,e),this.size=a.size,this};var Ey=function(){try{var t=Jf(Object,"defineProperty");return t({},"",{}),t}catch(e){}}();function Oy(t,e,a){"__proto__"==e&&Ey?Ey(t,e,{configurable:!0,enumerable:!0,value:a,writable:!0}):t[e]=a}var Ty=Object.prototype.hasOwnProperty;function Dy(t,e,a){var r=t[e];Ty.call(t,e)&&ey(r,a)&&(void 0!==a||e in t)||Oy(t,e,a)}function jy(t,e,a,r){var n=!a;a||(a={});for(var i=-1,o=e.length;++i<o;){var l=e[i],s=r?r(a[l],t[l],l,a,t):void 0;void 0===s&&(s=t[l]),n?Oy(a,l,s):Dy(a,l,s)}return a}var Fy="object"==typeof exports&&exports&&!exports.nodeType&&exports,Iy=Fy&&"object"==typeof module&&module&&!module.nodeType&&module,Py=Iy&&Iy.exports===Fy?Mf.Buffer:void 0,Ry=(Py?Py.isBuffer:void 0)||function(){return!1},Ny={};function $y(t){return function(e){return t(e)}}Ny["[object Float32Array]"]=Ny["[object Float64Array]"]=Ny["[object Int8Array]"]=Ny["[object Int16Array]"]=Ny["[object Int32Array]"]=Ny["[object Uint8Array]"]=Ny["[object Uint8ClampedArray]"]=Ny["[object Uint16Array]"]=Ny["[object Uint32Array]"]=!0,Ny["[object Arguments]"]=Ny["[object Array]"]=Ny["[object ArrayBuffer]"]=Ny["[object Boolean]"]=Ny["[object DataView]"]=Ny["[object Date]"]=Ny["[object Error]"]=Ny["[object Function]"]=Ny["[object Map]"]=Ny["[object Number]"]=Ny["[object Object]"]=Ny["[object RegExp]"]=Ny["[object Set]"]=Ny["[object String]"]=Ny["[object WeakMap]"]=!1;var Uy="object"==typeof exports&&exports&&!exports.nodeType&&exports,Wy=Uy&&"object"==typeof module&&module&&!module.nodeType&&module,qy=Wy&&Wy.exports===Uy&&xf.process,Gy=function(){try{var t=Wy&&Wy.require&&Wy.require("util").types;return t||qy&&qy.binding&&qy.binding("util")}catch(e){}}(),Yy=Gy&&Gy.isTypedArray,Ky=Yy?$y(Yy):function(t){return Sf(t)&&Ly(t.length)&&!!Ny[Cf(t)]},Jy=Object.prototype.hasOwnProperty;function Zy(t,e){var a=zf(t),r=!a&&Ay(t),n=!a&&!r&&Ry(t),i=!a&&!r&&!n&&Ky(t),o=a||r||n||i,l=o?function(t,e){for(var a=-1,r=Array(t);++a<t;)r[a]=e(a);return r}(t.length,String):[],s=l.length;for(var c in t)!e&&!Jy.call(t,c)||o&&("length"==c||n&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Vy(c,s))||l.push(c);return l}var Xy=Object.prototype;function Qy(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Xy)}function tg(t,e){return function(a){return t(e(a))}}var eg=tg(Object.keys,Object),ag=Object.prototype.hasOwnProperty;function rg(t){return null!=t&&Ly(t.length)&&!Ff(t)}function ng(t){return rg(t)?Zy(t):function(t){if(!Qy(t))return eg(t);var e=[];for(var a in Object(t))ag.call(t,a)&&"constructor"!=a&&e.push(a);return e}(t)}var ig=Object.prototype.hasOwnProperty;function og(t){if(!jf(t))return function(t){var e=[];if(null!=t)for(var a in Object(t))e.push(a);return e}(t);var e=Qy(t),a=[];for(var r in t)("constructor"!=r||!e&&ig.call(t,r))&&a.push(r);return a}function lg(t){return rg(t)?Zy(t,!0):og(t)}var sg="object"==typeof exports&&exports&&!exports.nodeType&&exports,cg=sg&&"object"==typeof module&&module&&!module.nodeType&&module,hg=cg&&cg.exports===sg?Mf.Buffer:void 0,ug=hg?hg.allocUnsafe:void 0;function dg(t,e){var a=-1,r=t.length;for(e||(e=Array(r));++a<r;)e[a]=t[a];return e}function pg(){return[]}var mg=Object.prototype.propertyIsEnumerable,vg=Object.getOwnPropertySymbols,fg=vg?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var a=-1,r=null==t?0:t.length,n=0,i=[];++a<r;){var o=t[a];e(o,a,t)&&(i[n++]=o)}return i}(vg(t),(function(e){return mg.call(t,e)})))}:pg;function yg(t,e){for(var a=-1,r=e.length,n=t.length;++a<r;)t[n+a]=e[a];return t}var gg=tg(Object.getPrototypeOf,Object),bg=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)yg(e,fg(t)),t=gg(t);return e}:pg;function zg(t,e,a){var r=e(t);return zf(t)?r:yg(r,a(t))}function xg(t){return zg(t,ng,fg)}function wg(t){return zg(t,lg,bg)}var Mg=Jf(Mf,"DataView"),_g=Jf(Mf,"Promise"),Ag=Jf(Mf,"Set"),Hg=Jf(Mf,"WeakMap"),Vg=Nf(Mg),Lg=Nf(iy),Bg=Nf(_g),kg=Nf(Ag),Cg=Nf(Hg),Sg=Cf;(Mg&&"[object DataView]"!=Sg(new Mg(new ArrayBuffer(1)))||iy&&"[object Map]"!=Sg(new iy)||_g&&"[object Promise]"!=Sg(_g.resolve())||Ag&&"[object Set]"!=Sg(new Ag)||Hg&&"[object WeakMap]"!=Sg(new Hg))&&(Sg=function(t){var e=Cf(t),a="[object Object]"==e?t.constructor:void 0,r=a?Nf(a):"";if(r)switch(r){case Vg:return"[object DataView]";case Lg:return"[object Map]";case Bg:return"[object Promise]";case kg:return"[object Set]";case Cg:return"[object WeakMap]"}return e});var Eg=Sg,Og=Object.prototype.hasOwnProperty;var Tg=Mf.Uint8Array;function Dg(t){var e=new t.constructor(t.byteLength);return new Tg(e).set(new Tg(t)),e}var jg=/\w*$/;var Fg=_f?_f.prototype:void 0,Ig=Fg?Fg.valueOf:void 0;function Pg(t,e,a){var r,n=t.constructor;switch(e){case"[object ArrayBuffer]":return Dg(t);case"[object Boolean]":case"[object Date]":return new n(+t);case"[object DataView]":return function(t,e){var a=e?Dg(t.buffer):t.buffer;return new t.constructor(a,t.byteOffset,t.byteLength)}(t,a);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function(t,e){var a=e?Dg(t.buffer):t.buffer;return new t.constructor(a,t.byteOffset,t.length)}(t,a);case"[object Map]":return new n;case"[object Number]":case"[object String]":return new n(t);case"[object RegExp]":return function(t){var e=new t.constructor(t.source,jg.exec(t));return e.lastIndex=t.lastIndex,e}(t);case"[object Set]":return new n;case"[object Symbol]":return r=t,Ig?Object(Ig.call(r)):{}}}var Rg=Object.create,Ng=function(){function t(){}return function(e){if(!jf(e))return{};if(Rg)return Rg(e);t.prototype=e;var a=new t;return t.prototype=void 0,a}}();var $g=Gy&&Gy.isMap,Ug=$g?$y($g):function(t){return Sf(t)&&"[object Map]"==Eg(t)};var Wg=Gy&&Gy.isSet,qg=Wg?$y(Wg):function(t){return Sf(t)&&"[object Set]"==Eg(t)},Gg={};function Yg(t,e,a,r,n,i){var o,l=1&e,s=2&e,c=4&e;if(a&&(o=n?a(t,r,n,i):a(t)),void 0!==o)return o;if(!jf(t))return t;var h=zf(t);if(h){if(o=function(t){var e=t.length,a=new t.constructor(e);return e&&"string"==typeof t[0]&&Og.call(t,"index")&&(a.index=t.index,a.input=t.input),a}(t),!l)return dg(t,o)}else{var u=Eg(t),d="[object Function]"==u||"[object GeneratorFunction]"==u;if(Ry(t))return function(t,e){if(e)return t.slice();var a=t.length,r=ug?ug(a):new t.constructor(a);return t.copy(r),r}(t,l);if("[object Object]"==u||"[object Arguments]"==u||d&&!n){if(o=s||d?{}:function(t){return"function"!=typeof t.constructor||Qy(t)?{}:Ng(gg(t))}(t),!l)return s?function(t,e){return jy(t,bg(t),e)}(t,function(t,e){return t&&jy(e,lg(e),t)}(o,t)):function(t,e){return jy(t,fg(t),e)}(t,function(t,e){return t&&jy(e,ng(e),t)}(o,t))}else{if(!Gg[u])return n?t:{};o=Pg(t,u,l)}}i||(i=new Sy);var p=i.get(t);if(p)return p;i.set(t,o),qg(t)?t.forEach((function(r){o.add(Yg(r,e,a,r,t,i))})):Ug(t)&&t.forEach((function(r,n){o.set(n,Yg(r,e,a,n,t,i))}));var m=h?void 0:(c?s?wg:xg:s?lg:ng)(t);return function(t,e){for(var a=-1,r=null==t?0:t.length;++a<r&&!1!==e(t[a],a,t););}(m||t,(function(r,n){m&&(r=t[n=r]),Dy(o,n,Yg(r,e,a,n,t,i))})),o}Gg["[object Arguments]"]=Gg["[object Array]"]=Gg["[object ArrayBuffer]"]=Gg["[object DataView]"]=Gg["[object Boolean]"]=Gg["[object Date]"]=Gg["[object Float32Array]"]=Gg["[object Float64Array]"]=Gg["[object Int8Array]"]=Gg["[object Int16Array]"]=Gg["[object Int32Array]"]=Gg["[object Map]"]=Gg["[object Number]"]=Gg["[object Object]"]=Gg["[object RegExp]"]=Gg["[object Set]"]=Gg["[object String]"]=Gg["[object Symbol]"]=Gg["[object Uint8Array]"]=Gg["[object Uint8ClampedArray]"]=Gg["[object Uint16Array]"]=Gg["[object Uint32Array]"]=!0,Gg["[object Error]"]=Gg["[object Function]"]=Gg["[object WeakMap]"]=!1;function Kg(t,e){return Yg(t,5,e="function"==typeof e?e:void 0)}function Jg(t){var e=-1,a=Array(t.size);return t.forEach((function(t,r){a[++e]=[r,t]})),a}function Zg(t){var e=-1,a=Array(t.size);return t.forEach((function(t){a[++e]=t})),a}var Xg=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function Qg(t){return Xg.test(t)}var tb="[\\ud800-\\udfff]",eb="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",ab="\\ud83c[\\udffb-\\udfff]",rb="[^\\ud800-\\udfff]",nb="(?:\\ud83c[\\udde6-\\uddff]){2}",ib="[\\ud800-\\udbff][\\udc00-\\udfff]",ob="(?:"+eb+"|"+ab+")"+"?",lb="[\\ufe0e\\ufe0f]?"+ob+("(?:\\u200d(?:"+[rb,nb,ib].join("|")+")[\\ufe0e\\ufe0f]?"+ob+")*"),sb="(?:"+[rb+eb+"?",eb,nb,ib,tb].join("|")+")",cb=RegExp(ab+"(?="+ab+")|"+sb+lb,"g");function hb(t){return Qg(t)?function(t){return t.match(cb)||[]}(t):function(t){return t.split("")}(t)}function ub(t){return null==t?[]:function(t,e){return vy(e,(function(e){return t[e]}))}(t,ng(t))}var db=_f?_f.iterator:void 0;function pb(t){if(!t)return[];if(rg(t))return function(t){return"string"==typeof t||!zf(t)&&Sf(t)&&"[object String]"==Cf(t)}(t)?hb(t):dg(t);if(db&&t[db])return function(t){for(var e,a=[];!(e=t.next()).done;)a.push(e.value);return a}(t[db]());var e=Eg(t);return("[object Map]"==e?Jg:"[object Set]"==e?Zg:ub)(t)}var mb=Object.prototype.toString,vb=Error.prototype.toString,fb=RegExp.prototype.toString,yb="undefined"!=typeof Symbol?Symbol.prototype.toString:function(){return""},gb=/^Symbol\((.*)\)(.*)$/;function bb(t,e){if(void 0===e&&(e=!1),null==t||!0===t||!1===t)return""+t;var a=typeof t;if("number"===a)return function(t){return t!=+t?"NaN":0===t&&1/t<0?"-0":""+t}(t);if("string"===a)return e?'"'+t+'"':t;if("function"===a)return"[Function "+(t.name||"anonymous")+"]";if("symbol"===a)return yb.call(t).replace(gb,"Symbol($1)");var r=mb.call(t).slice(8,-1);return"Date"===r?isNaN(t.getTime())?""+t:t.toISOString(t):"Error"===r||t instanceof Error?"["+vb.call(t)+"]":"RegExp"===r?fb.call(t):null}function zb(t,e){var a=bb(t,e);return null!==a?a:JSON.stringify(t,(function(t,a){var r=bb(this[t],e);return null!==r?r:a}),2)}var xb="${path} is invalid",wb="${path} is a required field",Mb="${path} must be one of the following values: ${values}",_b="${path} must not be one of the following values: ${values}",Ab=function(t){var e=t.path,a=t.type,r=t.value,n=t.originalValue,i=null!=n&&n!==r,o=e+" must be a `"+a+"` type, but the final value was: `"+zb(r,!0)+"`"+(i?" (cast from the value `"+zb(n,!0)+"`).":".");return null===r&&(o+='\n If "null" is intended as an empty value be sure to mark the schema as `.nullable()`'),o},Hb="${path} must be defined",Vb="${path} must be exactly ${length} characters",Lb="${path} must be at least ${min} characters",Bb="${path} must be at most ${max} characters",kb='${path} must match the following: "${regex}"',Cb="${path} must be a valid email",Sb="${path} must be a valid URL",Eb="${path} must be a valid UUID",Ob="${path} must be a trimmed string",Tb="${path} must be a lowercase string",Db="${path} must be a upper case string",jb="${path} must be greater than or equal to ${min}",Fb="${path} must be less than or equal to ${max}",Ib="${path} must be less than ${less}",Pb="${path} must be greater than ${more}",Rb="${path} must be a positive number",Nb="${path} must be a negative number",$b="${path} must be an integer",Ub="${path} field must be later than ${min}",Wb="${path} field must be at earlier than ${max}",qb="${path} field has unspecified keys: ${unknown}",Gb="${path} field must have at least ${min} items",Yb="${path} field must have less than or equal to ${max} items",Kb=function(t){return t&&t.__isYupSchema__},Jb=function(){function t(t,e){if(this.refs=t,"function"!=typeof e){if(!Cy(e,"is"))throw new TypeError("`is:` is required for `when()` conditions");if(!e.then&&!e.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");var a=e.is,r=e.then,n=e.otherwise,i="function"==typeof a?a:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.every((function(t){return t===a}))};this.fn=function(){for(var t=arguments.length,e=new Array(t),a=0;a<t;a++)e[a]=arguments[a];var o=e.pop(),l=e.pop(),s=i.apply(void 0,e)?r:n;if(s)return"function"==typeof s?s(l):l.concat(s.resolve(o))}}else this.fn=e}return t.prototype.resolve=function(t,e){var a=this.refs.map((function(t){return t.getValue(e)})),r=this.fn.apply(t,a.concat(t,e));if(void 0===r||r===t)return t;if(!Kb(r))throw new TypeError("conditions must return a schema object");return r.resolve(e)},t}();function Zb(t,e){if(null==t)return{};var a,r,n={},i=Object.keys(t);for(r=0;r<i.length;r++)a=i[r],e.indexOf(a)>=0||(n[a]=t[a]);return n}function Xb(t){return Array.prototype.slice.apply(t)}function Qb(t){this.status="pending",this._continuations=[],this._parent=null,this._paused=!1,t&&t.call(this,this._continueWith.bind(this),this._failWith.bind(this))}function tz(t){return t&&"function"==typeof t.then}function ez(t){return t}function az(t){return"undefined"!=typeof window&&"AggregateError"in window?new window.AggregateError(t):{errors:t}}if(Qb.prototype={then:function(t,e){var a=Qb.unresolved()._setParent(this);if(this._isRejected()){if(this._paused)return this._continuations.push({promise:a,nextFn:t,catchFn:e}),a;if(e)try{var r=e(this._error);return tz(r)?(this._chainPromiseData(r,a),a):Qb.resolve(r)._setParent(this)}catch(n){return Qb.reject(n)._setParent(this)}return Qb.reject(this._error)._setParent(this)}return this._continuations.push({promise:a,nextFn:t,catchFn:e}),this._runResolutions(),a},catch:function(t){if(this._isResolved())return Qb.resolve(this._data)._setParent(this);var e=Qb.unresolved()._setParent(this);return this._continuations.push({promise:e,catchFn:t}),this._runRejections(),e},finally:function(t){var e=!1;function a(a,r){if(!e){e=!0,t||(t=ez);var n=t(a);return tz(n)?n.then((function(){if(r)throw r;return a})):a}}return this.then((function(t){return a(t)})).catch((function(t){return a(null,t)}))},pause:function(){return this._paused=!0,this},resume:function(){var t=this._findFirstPaused();return t&&(t._paused=!1,t._runResolutions(),t._runRejections()),this},_findAncestry:function(){return this._continuations.reduce((function(t,e){if(e.promise){var a={promise:e.promise,children:e.promise._findAncestry()};t.push(a)}return t}),[])},_setParent:function(t){if(this._parent)throw new Error("parent already set");return this._parent=t,this},_continueWith:function(t){var e=this._findFirstPending();e&&(e._data=t,e._setResolved())},_findFirstPending:function(){return this._findFirstAncestor((function(t){return t._isPending&&t._isPending()}))},_findFirstPaused:function(){return this._findFirstAncestor((function(t){return t._paused}))},_findFirstAncestor:function(t){for(var e,a=this;a;)t(a)&&(e=a),a=a._parent;return e},_failWith:function(t){var e=this._findFirstPending();e&&(e._error=t,e._setRejected())},_takeContinuations:function(){return this._continuations.splice(0,this._continuations.length)},_runRejections:function(){if(!this._paused&&this._isRejected()){var t=this._error,e=this._takeContinuations(),a=this;e.forEach((function(e){if(e.catchFn)try{var r=e.catchFn(t);a._handleUserFunctionResult(r,e.promise)}catch(n){e.promise.reject(n)}else e.promise.reject(t)}))}},_runResolutions:function(){if(!this._paused&&this._isResolved()&&!this._isPending()){var t=this._takeContinuations();if(tz(this._data))return this._handleWhenResolvedDataIsPromise(this._data);var e=this._data,a=this;t.forEach((function(t){if(t.nextFn)try{var r=t.nextFn(e);a._handleUserFunctionResult(r,t.promise)}catch(n){a._handleResolutionError(n,t)}else t.promise&&t.promise.resolve(e)}))}},_handleResolutionError:function(t,e){if(this._setRejected(),e.catchFn)try{return void e.catchFn(t)}catch(a){t=a}e.promise&&e.promise.reject(t)},_handleWhenResolvedDataIsPromise:function(t){var e=this;return t.then((function(t){e._data=t,e._runResolutions()})).catch((function(t){e._error=t,e._setRejected(),e._runRejections()}))},_handleUserFunctionResult:function(t,e){tz(t)?this._chainPromiseData(t,e):e.resolve(t)},_chainPromiseData:function(t,e){t.then((function(t){e.resolve(t)})).catch((function(t){e.reject(t)}))},_setResolved:function(){this.status="resolved",this._paused||this._runResolutions()},_setRejected:function(){this.status="rejected",this._paused||this._runRejections()},_isPending:function(){return"pending"===this.status},_isResolved:function(){return"resolved"===this.status},_isRejected:function(){return"rejected"===this.status}},Qb.resolve=function(t){return new Qb((function(e,a){tz(t)?t.then((function(t){e(t)})).catch((function(t){a(t)})):e(t)}))},Qb.reject=function(t){return new Qb((function(e,a){a(t)}))},Qb.unresolved=function(){return new Qb((function(t,e){this.resolve=t,this.reject=e}))},Qb.all=function(){var t=Xb(arguments);return Array.isArray(t[0])&&(t=t[0]),t.length?new Qb((function(e,a){var r=[],n=0,i=!1;t.forEach((function(o,l){Qb.resolve(o).then((function(a){r[l]=a,(n+=1)===t.length&&e(r)})).catch((function(t){!function(t){i||(i=!0,a(t))}(t)}))}))})):Qb.resolve([])},Qb.any=function(){var t=Xb(arguments);return Array.isArray(t[0])&&(t=t[0]),t.length?new Qb((function(e,a){var r=[],n=0,i=!1;t.forEach((function(o,l){Qb.resolve(o).then((function(t){!function(t){i||(i=!0,e(t))}(t)})).catch((function(e){r[l]=e,(n+=1)===t.length&&a(az(r))}))}))})):Qb.reject(az([]))},Qb.allSettled=function(){var t=Xb(arguments);return Array.isArray(t[0])&&(t=t[0]),t.length?new Qb((function(e){var a=[],r=0,n=function(){(r+=1)===t.length&&e(a)};t.forEach((function(t,e){Qb.resolve(t).then((function(t){a[e]={status:"fulfilled",value:t},n()})).catch((function(t){a[e]={status:"rejected",reason:t},n()}))}))})):Qb.resolve([])},Promise===Qb)throw new Error("Please use SynchronousPromise.installGlobally() to install globally");var rz=Promise;Qb.installGlobally=function(t){if(Promise===Qb)return t;var e=function(t){if(void 0===t||t.__patched)return t;var e=t;return(t=function(){e.apply(this,Xb(arguments))}).__patched=!0,t}(t);return Promise=Qb,e},Qb.uninstallGlobally=function(){Promise===Qb&&(Promise=rz)};var nz={SynchronousPromise:Qb},iz=/\$\{\s*(\w+)\s*\}/g,oz=function(t){return function(e){return t.replace(iz,(function(t,a){return zb(e[a])}))}};function lz(t,e,a,r){var n=this;this.name="ValidationError",this.value=e,this.path=a,this.type=r,this.errors=[],this.inner=[],t&&[].concat(t).forEach((function(t){n.errors=n.errors.concat(t.errors||t),t.inner&&(n.inner=n.inner.concat(t.inner.length?t.inner:t))})),this.message=this.errors.length>1?this.errors.length+" errors occurred":this.errors[0],Error.captureStackTrace&&Error.captureStackTrace(this,lz)}lz.prototype=Object.create(Error.prototype),lz.prototype.constructor=lz,lz.isError=function(t){return t&&"ValidationError"===t.name},lz.formatError=function(t,e){"string"==typeof t&&(t=oz(t));var a=function(e){return e.path=e.label||e.path||"this","function"==typeof t?t(e):t};return 1===arguments.length?a:a(e)};var sz=function(t){return t?nz.SynchronousPromise:Promise};function cz(t,e){return t?null:function(t){return e.push(t),t.value}}function hz(t){var e=t.validations,a=t.value,r=t.path,n=t.sync,i=t.errors,o=t.sort;return i=function(t){return void 0===t&&(t=[]),t.inner&&t.inner.length?t.inner:[].concat(t)}(i),function(t,e){var a=sz(e);return a.all(t.map((function(t){return a.resolve(t).then((function(t){return{fulfilled:!0,value:t}}),(function(t){return{fulfilled:!1,value:t}}))})))}(e,n).then((function(t){var e=t.filter((function(t){return!t.fulfilled})).reduce((function(t,e){var a=e.value;if(!lz.isError(a))throw a;return t.concat(a)}),[]);if(o&&e.sort(o),(i=e.concat(i)).length)throw new lz(i,a,r);return a}))}function uz(t){var e=t.endEarly,a=Zb(t,["endEarly"]);return e?function(t,e,a){return sz(a).all(t).catch((function(t){throw"ValidationError"===t.name&&(t.value=e),t})).then((function(){return e}))}(a.validations,a.value,a.sync):hz(a)}var dz=function(t){return"[object Object]"===Object.prototype.toString.call(t)};function pz(t,e){for(var a in e)if(Cy(e,a)){var r=e[a],n=t[a];if(void 0===n)t[a]=r;else{if(n===r)continue;Kb(n)?Kb(r)&&(t[a]=r.concat(n)):dz(n)?dz(r)&&(t[a]=pz(n,r)):Array.isArray(n)&&Array.isArray(r)&&(t[a]=r.concat(n))}}return t}var mz,vz=function(t,e,a){for(var r=-1,n=Object(t),i=a(t),o=i.length;o--;){var l=i[mz?o:++r];if(!1===e(n[l],l,n))break}return t};function fz(t,e){return t&&vz(t,e,ng)}function yz(t){var e=-1,a=null==t?0:t.length;for(this.__data__=new ly;++e<a;)this.add(t[e])}function gz(t,e){for(var a=-1,r=null==t?0:t.length;++a<r;)if(e(t[a],a,t))return!0;return!1}function bz(t,e){return t.has(e)}yz.prototype.add=yz.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},yz.prototype.has=function(t){return this.__data__.has(t)};function zz(t,e,a,r,n,i){var o=1&a,l=t.length,s=e.length;if(l!=s&&!(o&&s>l))return!1;var c=i.get(t),h=i.get(e);if(c&&h)return c==e&&h==t;var u=-1,d=!0,p=2&a?new yz:void 0;for(i.set(t,e),i.set(e,t);++u<l;){var m=t[u],v=e[u];if(r)var f=o?r(v,m,u,e,t,i):r(m,v,u,t,e,i);if(void 0!==f){if(f)continue;d=!1;break}if(p){if(!gz(e,(function(t,e){if(!bz(p,e)&&(m===t||n(m,t,a,r,i)))return p.push(e)}))){d=!1;break}}else if(m!==v&&!n(m,v,a,r,i)){d=!1;break}}return i.delete(t),i.delete(e),d}var xz=_f?_f.prototype:void 0,wz=xz?xz.valueOf:void 0;var Mz=Object.prototype.hasOwnProperty;var _z="[object Object]",Az=Object.prototype.hasOwnProperty;function Hz(t,e,a,r,n,i){var o=zf(t),l=zf(e),s=o?"[object Array]":Eg(t),c=l?"[object Array]":Eg(e),h=(s="[object Arguments]"==s?_z:s)==_z,u=(c="[object Arguments]"==c?_z:c)==_z,d=s==c;if(d&&Ry(t)){if(!Ry(e))return!1;o=!0,h=!1}if(d&&!h)return i||(i=new Sy),o||Ky(t)?zz(t,e,a,r,n,i):function(t,e,a,r,n,i,o){switch(a){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!i(new Tg(t),new Tg(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return ey(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var l=Jg;case"[object Set]":var s=1&r;if(l||(l=Zg),t.size!=e.size&&!s)return!1;var c=o.get(t);if(c)return c==e;r|=2,o.set(t,e);var h=zz(l(t),l(e),r,n,i,o);return o.delete(t),h;case"[object Symbol]":if(wz)return wz.call(t)==wz.call(e)}return!1}(t,e,s,a,r,n,i);if(!(1&a)){var p=h&&Az.call(t,"__wrapped__"),m=u&&Az.call(e,"__wrapped__");if(p||m){var v=p?t.value():t,f=m?e.value():e;return i||(i=new Sy),n(v,f,a,r,i)}}return!!d&&(i||(i=new Sy),function(t,e,a,r,n,i){var o=1&a,l=xg(t),s=l.length;if(s!=xg(e).length&&!o)return!1;for(var c=s;c--;){var h=l[c];if(!(o?h in e:Mz.call(e,h)))return!1}var u=i.get(t),d=i.get(e);if(u&&d)return u==e&&d==t;var p=!0;i.set(t,e),i.set(e,t);for(var m=o;++c<s;){var v=t[h=l[c]],f=e[h];if(r)var y=o?r(f,v,h,e,t,i):r(v,f,h,t,e,i);if(!(void 0===y?v===f||n(v,f,a,r,i):y)){p=!1;break}m||(m="constructor"==h)}if(p&&!m){var g=t.constructor,b=e.constructor;g==b||!("constructor"in t)||!("constructor"in e)||"function"==typeof g&&g instanceof g&&"function"==typeof b&&b instanceof b||(p=!1)}return i.delete(t),i.delete(e),p}(t,e,a,r,n,i))}function Vz(t,e,a,r,n){return t===e||(null==t||null==e||!Sf(t)&&!Sf(e)?t!=t&&e!=e:Hz(t,e,a,r,Vz,n))}function Lz(t){return t==t&&!jf(t)}function Bz(t,e){return function(a){return null!=a&&(a[t]===e&&(void 0!==e||t in Object(a)))}}function kz(t){var e=function(t){for(var e=ng(t),a=e.length;a--;){var r=e[a],n=t[r];e[a]=[r,n,Lz(n)]}return e}(t);return 1==e.length&&e[0][2]?Bz(e[0][0],e[0][1]):function(a){return a===t||function(t,e,a,r){var n=a.length,i=n,o=!r;if(null==t)return!i;for(t=Object(t);n--;){var l=a[n];if(o&&l[2]?l[1]!==t[l[0]]:!(l[0]in t))return!1}for(;++n<i;){var s=(l=a[n])[0],c=t[s],h=l[1];if(o&&l[2]){if(void 0===c&&!(s in t))return!1}else{var u=new Sy;if(r)var d=r(c,h,s,t,e,u);if(!(void 0===d?Vz(h,c,3,r,u):d))return!1}}return!0}(a,t,e)}}function Cz(t,e){for(var a=0,r=(e=zy(e,t)).length;null!=t&&a<r;)t=t[By(e[a++])];return a&&a==r?t:void 0}function Sz(t,e){return null!=t&&e in Object(t)}function Ez(t,e){return Df(t)&&Lz(e)?Bz(By(t),e):function(a){var r=function(t,e,a){var r=null==t?void 0:Cz(t,e);return void 0===r?a:r}(a,t);return void 0===r&&r===e?function(t,e){return null!=t&&ky(t,e,Sz)}(a,t):Vz(e,r,3)}}function Oz(t){return t}function Tz(t){return Df(t)?(e=By(t),function(t){return null==t?void 0:t[e]}):function(t){return function(e){return Cz(e,t)}}(t);var e}function Dz(t){return"function"==typeof t?t:null==t?Oz:"object"==typeof t?zf(t)?Ez(t[0],t[1]):kz(t):Tz(t)}function jz(t,e){var a={};return e=Dz(e),fz(t,(function(t,r,n){Oy(a,r,e(t,r,n))})),a}function Fz(t){this._maxSize=t,this.clear()}Fz.prototype.clear=function(){this._size=0,this._values=Object.create(null)},Fz.prototype.get=function(t){return this._values[t]},Fz.prototype.set=function(t,e){return this._size>=this._maxSize&&this.clear(),t in this._values||this._size++,this._values[t]=e};var Iz=/[^.^\]^[]+|(?=\[\]|\.\.)/g,Pz=/^\d+$/,Rz=/^\d/,Nz=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,$z=/^\s*(['"]?)(.*?)(\1)\s*$/,Uz=new Fz(512),Wz=new Fz(512),qz=new Fz(512),Gz={Cache:Fz,split:Kz,normalizePath:Yz,setter:function(t){var e=Yz(t);return Wz.get(t)||Wz.set(t,(function(t,a){for(var r=0,n=e.length,i=t;r<n-1;){var o=e[r];if("__proto__"===o||"constructor"===o||"prototype"===o)return t;i=i[e[r++]]}i[e[r]]=a}))},getter:function(t,e){var a=Yz(t);return qz.get(t)||qz.set(t,(function(t){for(var r=0,n=a.length;r<n;){if(null==t&&e)return;t=t[a[r++]]}return t}))},join:function(t){return t.reduce((function(t,e){return t+(Jz(e)||Pz.test(e)?"["+e+"]":(t?".":"")+e)}),"")},forEach:function(t,e,a){!function(t,e,a){var r,n,i,o,l=t.length;for(n=0;n<l;n++)(r=t[n])&&(Zz(r)&&(r='"'+r+'"'),i=!(o=Jz(r))&&/^\d+$/.test(r),e.call(a,r,o,i,n,t))}(Array.isArray(t)?t:Kz(t),e,a)}};function Yz(t){return Uz.get(t)||Uz.set(t,Kz(t).map((function(t){return t.replace($z,"$2")})))}function Kz(t){return t.match(Iz)}function Jz(t){return"string"==typeof t&&t&&-1!==["'",'"'].indexOf(t.charAt(0))}function Zz(t){return!Jz(t)&&(function(t){return t.match(Rz)&&!t.match(Pz)}(t)||function(t){return Nz.test(t)}(t))}var Xz="$",Qz=".",tx=function(){function t(t,e){if(void 0===e&&(e={}),"string"!=typeof t)throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),""===t)throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===Xz,this.isValue=this.key[0]===Qz,this.isSibling=!this.isContext&&!this.isValue;var a=this.isContext?Xz:this.isValue?Qz:"";this.path=this.key.slice(a.length),this.getter=this.path&&Gz.getter(this.path,!0),this.map=e.map}var e=t.prototype;return e.getValue=function(t){var e=this.isContext?t.context:this.isValue?t.value:t.parent;return this.getter&&(e=this.getter(e||{})),this.map&&(e=this.map(e)),e},e.cast=function(t,e){return this.getValue(ff({},e,{value:t}))},e.resolve=function(){return this},e.describe=function(){return{type:"ref",key:this.key}},e.toString=function(){return"Ref("+this.key+")"},t.isRef=function(t){return t&&t.__isYupRef},t}();tx.prototype.__isYupRef=!0;var ex=lz.formatError;function ax(t){var e=t.value,a=t.label,r=t.resolve,n=t.originalValue,i=Zb(t,["value","label","resolve","originalValue"]);return function(t){var o=void 0===t?{}:t,l=o.path,s=void 0===l?i.path:l,c=o.message,h=void 0===c?i.message:c,u=o.type,d=void 0===u?i.name:u,p=o.params;return p=ff({path:s,value:e,originalValue:n,label:a},function(t,e,a){return jz(ff({},t,e),a)}(i.params,p,r)),ff(new lz(ex(h,p),e,s,d),{params:p})}}function rx(t){var e=t.name,a=t.message,r=t.test,n=t.params;function i(t){var i=t.value,o=t.path,l=t.label,s=t.options,c=t.originalValue,h=t.sync,u=Zb(t,["value","path","label","options","originalValue","sync"]),d=s.parent,p=function(t){return tx.isRef(t)?t.getValue({value:i,parent:d,context:s.context}):t},m=ax({message:a,path:o,value:i,originalValue:c,params:n,label:l,resolve:p,name:e}),v=ff({path:o,parent:d,type:e,createError:m,resolve:p,options:s},u);return function(t,e,a,r){var n,i=t.call(e,a);if(!r)return Promise.resolve(i);if((n=i)&&"function"==typeof n.then&&"function"==typeof n.catch)throw new Error('Validation test of type: "'+e.type+'" returned a Promise during a synchronous validate. This test will finish after the validate call has returned');return nz.SynchronousPromise.resolve(i)}(r,v,i,h).then((function(t){if(lz.isError(t))throw t;if(!t)throw m()}))}return i.OPTIONS=t,i}function nx(t,e){var a;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(a=function(t,e){if(!t)return;if("string"==typeof t)return ix(t,e);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return ix(t,e)}(t))||e&&t&&"number"==typeof t.length){a&&(t=a);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(a=t[Symbol.iterator]()).next.bind(a)}function ix(t,e){(null==e||e>t.length)&&(e=t.length);for(var a=0,r=new Array(e);a<e;a++)r[a]=t[a];return r}var ox=function(){function t(){this.list=new Set,this.refs=new Map}var e,a,r,n=t.prototype;return n.describe=function(){for(var t,e=[],a=nx(this.list);!(t=a()).done;){var r=t.value;e.push(r)}for(var n,i=nx(this.refs);!(n=i()).done;){var o=n.value[1];e.push(o.describe())}return e},n.toArray=function(){return pb(this.list).concat(pb(this.refs.values()))},n.add=function(t){tx.isRef(t)?this.refs.set(t.key,t):this.list.add(t)},n.delete=function(t){tx.isRef(t)?this.refs.delete(t.key):this.list.delete(t)},n.has=function(t,e){if(this.list.has(t))return!0;for(var a,r=this.refs.values();!(a=r.next()).done;)if(e(a.value)===t)return!0;return!1},n.clone=function(){var e=new t;return e.list=new Set(this.list),e.refs=new Map(this.refs),e},n.merge=function(t,e){var a=this.clone();return t.list.forEach((function(t){return a.add(t)})),t.refs.forEach((function(t){return a.add(t)})),e.list.forEach((function(t){return a.delete(t)})),e.refs.forEach((function(t){return a.delete(t)})),a},e=t,(a=[{key:"size",get:function(){return this.list.size+this.refs.size}}])&&yf(e.prototype,a),r&&yf(e,r),t}();function lx(t){var e=this;if(void 0===t&&(t={}),!(this instanceof lx))return new lx;this._deps=[],this._conditions=[],this._options={abortEarly:!0,recursive:!0},this._exclusive=Object.create(null),this._whitelist=new ox,this._blacklist=new ox,this.tests=[],this.transforms=[],this.withMutation((function(){e.typeError(Ab)})),Cy(t,"default")&&(this._defaultDefault=t.default),this.type=t.type||"mixed",this._type=t.type||"mixed"}for(var sx=lx.prototype={__isYupSchema__:!0,constructor:lx,clone:function(){var t=this;return this._mutate?this:Kg(this,(function(e){if(Kb(e)&&e!==t)return e}))},label:function(t){var e=this.clone();return e._label=t,e},meta:function(t){if(0===arguments.length)return this._meta;var e=this.clone();return e._meta=ff(e._meta||{},t),e},withMutation:function(t){var e=this._mutate;this._mutate=!0;var a=t(this);return this._mutate=e,a},concat:function(t){if(!t||t===this)return this;if(t._type!==this._type&&"mixed"!==this._type)throw new TypeError("You cannot `concat()` schema's of different types: "+this._type+" and "+t._type);var e=pz(t.clone(),this);return Cy(t,"_default")&&(e._default=t._default),e.tests=this.tests,e._exclusive=this._exclusive,e._whitelist=this._whitelist.merge(t._whitelist,t._blacklist),e._blacklist=this._blacklist.merge(t._blacklist,t._whitelist),e.withMutation((function(e){t.tests.forEach((function(t){e.test(t.OPTIONS)}))})),e},isType:function(t){return!(!this._nullable||null!==t)||(!this._typeCheck||this._typeCheck(t))},resolve:function(t){var e=this;if(e._conditions.length){var a=e._conditions;(e=e.clone())._conditions=[],e=(e=a.reduce((function(e,a){return a.resolve(e,t)}),e)).resolve(t)}return e},cast:function(t,e){void 0===e&&(e={});var a=this.resolve(ff({},e,{value:t})),r=a._cast(t,e);if(void 0!==t&&!1!==e.assert&&!0!==a.isType(r)){var n=zb(t),i=zb(r);throw new TypeError("The value of "+(e.path||"field")+' could not be cast to a value that satisfies the schema type: "'+a._type+'". \n\nattempted value: '+n+" \n"+(i!==n?"result of cast: "+i:""))}return r},_cast:function(t){var e=this,a=void 0===t?t:this.transforms.reduce((function(a,r){return r.call(e,a,t)}),t);return void 0===a&&Cy(this,"_default")&&(a=this.default()),a},_validate:function(t,e){var a=this;void 0===e&&(e={});var r=t,n=null!=e.originalValue?e.originalValue:t,i=this._option("strict",e),o=this._option("abortEarly",e),l=e.sync,s=e.path,c=this._label;i||(r=this._cast(r,ff({assert:!1},e)));var h={value:r,path:s,schema:this,options:e,label:c,originalValue:n,sync:l};e.from&&(h.from=e.from);var u=[];return this._typeError&&u.push(this._typeError(h)),this._whitelistError&&u.push(this._whitelistError(h)),this._blacklistError&&u.push(this._blacklistError(h)),uz({validations:u,endEarly:o,value:r,path:s,sync:l}).then((function(t){return uz({path:s,sync:l,value:t,endEarly:o,validations:a.tests.map((function(t){return t(h)}))})}))},validate:function(t,e){return void 0===e&&(e={}),this.resolve(ff({},e,{value:t}))._validate(t,e)},validateSync:function(t,e){var a,r;if(void 0===e&&(e={}),this.resolve(ff({},e,{value:t}))._validate(t,ff({},e,{sync:!0})).then((function(t){return a=t})).catch((function(t){return r=t})),r)throw r;return a},isValid:function(t,e){return this.validate(t,e).then((function(){return!0})).catch((function(t){if("ValidationError"===t.name)return!1;throw t}))},isValidSync:function(t,e){try{return this.validateSync(t,e),!0}catch(a){if("ValidationError"===a.name)return!1;throw a}},getDefault:function(t){return void 0===t&&(t={}),this.resolve(t).default()},default:function(t){if(0===arguments.length){var e=Cy(this,"_default")?this._default:this._defaultDefault;return"function"==typeof e?e.call(this):Kg(e)}var a=this.clone();return a._default=t,a},strict:function(t){void 0===t&&(t=!0);var e=this.clone();return e._options.strict=t,e},_isPresent:function(t){return null!=t},required:function(t){return void 0===t&&(t=wb),this.test({message:t,name:"required",exclusive:!0,test:function(t){return this.schema._isPresent(t)}})},notRequired:function(){var t=this.clone();return t.tests=t.tests.filter((function(t){return"required"!==t.OPTIONS.name})),t},nullable:function(t){void 0===t&&(t=!0);var e=this.clone();return e._nullable=t,e},transform:function(t){var e=this.clone();return e.transforms.push(t),e},test:function(){var t;if(void 0===(t=1===arguments.length?"function"==typeof(arguments.length<=0?void 0:arguments[0])?{test:arguments.length<=0?void 0:arguments[0]}:arguments.length<=0?void 0:arguments[0]:2===arguments.length?{name:arguments.length<=0?void 0:arguments[0],test:arguments.length<=1?void 0:arguments[1]}:{name:arguments.length<=0?void 0:arguments[0],message:arguments.length<=1?void 0:arguments[1],test:arguments.length<=2?void 0:arguments[2]}).message&&(t.message=xb),"function"!=typeof t.test)throw new TypeError("`test` is a required parameters");var e=this.clone(),a=rx(t),r=t.exclusive||t.name&&!0===e._exclusive[t.name];if(t.exclusive&&!t.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return e._exclusive[t.name]=!!t.exclusive,e.tests=e.tests.filter((function(e){if(e.OPTIONS.name===t.name){if(r)return!1;if(e.OPTIONS.test===a.OPTIONS.test)return!1}return!0})),e.tests.push(a),e},when:function(t,e){1===arguments.length&&(e=t,t=".");var a=this.clone(),r=[].concat(t).map((function(t){return new tx(t)}));return r.forEach((function(t){t.isSibling&&a._deps.push(t.key)})),a._conditions.push(new Jb(r,e)),a},typeError:function(t){var e=this.clone();return e._typeError=rx({message:t,name:"typeError",test:function(t){return!(void 0!==t&&!this.schema.isType(t))||this.createError({params:{type:this.schema._type}})}}),e},oneOf:function(t,e){void 0===e&&(e=Mb);var a=this.clone();return t.forEach((function(t){a._whitelist.add(t),a._blacklist.delete(t)})),a._whitelistError=rx({message:e,name:"oneOf",test:function(t){if(void 0===t)return!0;var e=this.schema._whitelist;return!!e.has(t,this.resolve)||this.createError({params:{values:e.toArray().join(", ")}})}}),a},notOneOf:function(t,e){void 0===e&&(e=_b);var a=this.clone();return t.forEach((function(t){a._blacklist.add(t),a._whitelist.delete(t)})),a._blacklistError=rx({message:e,name:"notOneOf",test:function(t){var e=this.schema._blacklist;return!e.has(t,this.resolve)||this.createError({params:{values:e.toArray().join(", ")}})}}),a},strip:function(t){void 0===t&&(t=!0);var e=this.clone();return e._strip=t,e},_option:function(t,e){return Cy(e,t)?e[t]:this._options[t]},describe:function(){var t=this.clone(),e={type:t._type,meta:t._meta,label:t._label,tests:t.tests.map((function(t){return{name:t.OPTIONS.name,params:t.OPTIONS.params}})).filter((function(t,e,a){return a.findIndex((function(e){return e.name===t.name}))===e}))};return t._whitelist.size&&(e.oneOf=t._whitelist.describe()),t._blacklist.size&&(e.notOneOf=t._blacklist.describe()),e},defined:function(t){return void 0===t&&(t=Hb),this.nullable().test({message:t,name:"defined",exclusive:!0,test:function(t){return void 0!==t}})}},cx=function(){var t=ux[hx];sx[t+"At"]=function(e,a,r){void 0===r&&(r={});var n=function(t,e,a,r){var n,i,o;return void 0===r&&(r=a),e?(Gz.forEach(e,(function(l,s,c){var h=s?function(t){return t.substr(0,t.length-1).substr(1)}(l):l;if((t=t.resolve({context:r,parent:n,value:a})).innerType){var u=c?parseInt(h,10):0;if(a&&u>=a.length)throw new Error("Yup.reach cannot resolve an array item at index: "+l+", in the path: "+e+". because there is no value at that index. ");n=a,a=a&&a[u],t=t.innerType}if(!c){if(!t.fields||!t.fields[h])throw new Error("The schema does not contain the path: "+e+". (failed at: "+o+' which is a type: "'+t._type+'")');n=a,a=a&&a[h],t=t.fields[h]}i=h,o=s?"["+l+"]":"."+l})),{schema:t,parent:n,parentPath:i}):{parent:n,parentPath:e,schema:t}}(this,e,a,r.context),i=n.parent,o=n.parentPath;return n.schema[t](i&&i[o],ff({},r,{parent:i,path:e}))}},hx=0,ux=["validate","validateSync"];hx<ux.length;hx++)cx();for(var dx=0,px=["equals","is"];dx<px.length;dx++){sx[px[dx]]=sx.oneOf}for(var mx=0,vx=["not","nope"];mx<vx.length;mx++){sx[vx[mx]]=sx.notOneOf}function fx(t,e,a){t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),ff(t.prototype,a)}sx.optional=sx.notRequired,fx((function t(){var e=this;if(!(this instanceof t))return new t;lx.call(this,{type:"boolean"}),this.withMutation((function(){e.transform((function(t){if(!this.isType(t)){if(/^(true|1)$/i.test(t))return!0;if(/^(false|0)$/i.test(t))return!1}return t}))}))}),lx,{_typeCheck:function(t){return t instanceof Boolean&&(t=t.valueOf()),"boolean"==typeof t}});var yx=function(t){return null==t},gx=/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i,bx=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,zx=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$/i,xx=function(t){return yx(t)||t===t.trim()};function wx(){var t=this;if(!(this instanceof wx))return new wx;lx.call(this,{type:"string"}),this.withMutation((function(){t.transform((function(t){return this.isType(t)?t:null!=t&&t.toString?t.toString():t}))}))}fx(wx,lx,{_typeCheck:function(t){return t instanceof String&&(t=t.valueOf()),"string"==typeof t},_isPresent:function(t){return lx.prototype._isPresent.call(this,t)&&t.length>0},length:function(t,e){return void 0===e&&(e=Vb),this.test({message:e,name:"length",exclusive:!0,params:{length:t},test:function(e){return yx(e)||e.length===this.resolve(t)}})},min:function(t,e){return void 0===e&&(e=Lb),this.test({message:e,name:"min",exclusive:!0,params:{min:t},test:function(e){return yx(e)||e.length>=this.resolve(t)}})},max:function(t,e){return void 0===e&&(e=Bb),this.test({name:"max",exclusive:!0,message:e,params:{max:t},test:function(e){return yx(e)||e.length<=this.resolve(t)}})},matches:function(t,e){var a,r,n=!1;return e&&("object"==typeof e?(n=e.excludeEmptyString,a=e.message,r=e.name):a=e),this.test({name:r||"matches",message:a||kb,params:{regex:t},test:function(e){return yx(e)||""===e&&n||-1!==e.search(t)}})},email:function(t){return void 0===t&&(t=Cb),this.matches(gx,{name:"email",message:t,excludeEmptyString:!0})},url:function(t){return void 0===t&&(t=Sb),this.matches(bx,{name:"url",message:t,excludeEmptyString:!0})},uuid:function(t){return void 0===t&&(t=Eb),this.matches(zx,{name:"uuid",message:t,excludeEmptyString:!1})},ensure:function(){return this.default("").transform((function(t){return null===t?"":t}))},trim:function(t){return void 0===t&&(t=Ob),this.transform((function(t){return null!=t?t.trim():t})).test({message:t,name:"trim",test:xx})},lowercase:function(t){return void 0===t&&(t=Tb),this.transform((function(t){return yx(t)?t:t.toLowerCase()})).test({message:t,name:"string_case",exclusive:!0,test:function(t){return yx(t)||t===t.toLowerCase()}})},uppercase:function(t){return void 0===t&&(t=Db),this.transform((function(t){return yx(t)?t:t.toUpperCase()})).test({message:t,name:"string_case",exclusive:!0,test:function(t){return yx(t)||t===t.toUpperCase()}})}});fx((function t(){var e=this;if(!(this instanceof t))return new t;lx.call(this,{type:"number"}),this.withMutation((function(){e.transform((function(t){var e=t;if("string"==typeof e){if(""===(e=e.replace(/\s/g,"")))return NaN;e=+e}return this.isType(e)?e:parseFloat(e)}))}))}),lx,{_typeCheck:function(t){return t instanceof Number&&(t=t.valueOf()),"number"==typeof t&&!function(t){return t!=+t}(t)},min:function(t,e){return void 0===e&&(e=jb),this.test({message:e,name:"min",exclusive:!0,params:{min:t},test:function(e){return yx(e)||e>=this.resolve(t)}})},max:function(t,e){return void 0===e&&(e=Fb),this.test({message:e,name:"max",exclusive:!0,params:{max:t},test:function(e){return yx(e)||e<=this.resolve(t)}})},lessThan:function(t,e){return void 0===e&&(e=Ib),this.test({message:e,name:"max",exclusive:!0,params:{less:t},test:function(e){return yx(e)||e<this.resolve(t)}})},moreThan:function(t,e){return void 0===e&&(e=Pb),this.test({message:e,name:"min",exclusive:!0,params:{more:t},test:function(e){return yx(e)||e>this.resolve(t)}})},positive:function(t){return void 0===t&&(t=Rb),this.moreThan(0,t)},negative:function(t){return void 0===t&&(t=Nb),this.lessThan(0,t)},integer:function(t){return void 0===t&&(t=$b),this.test({name:"integer",message:t,test:function(t){return yx(t)||Number.isInteger(t)}})},truncate:function(){return this.transform((function(t){return yx(t)?t:0|t}))},round:function(t){var e=["ceil","floor","round","trunc"];if("trunc"===(t=t&&t.toLowerCase()||"round"))return this.truncate();if(-1===e.indexOf(t.toLowerCase()))throw new TypeError("Only valid options for round() are: "+e.join(", "));return this.transform((function(e){return yx(e)?e:Math[t](e)}))}});var Mx=/^(\d{4}|[+\-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;var _x=new Date("");function Ax(t,e){return e||(e=t.slice(0)),t.raw=e,t}fx((function t(){var e=this;if(!(this instanceof t))return new t;lx.call(this,{type:"date"}),this.withMutation((function(){e.transform((function(t){return this.isType(t)?t:(t=function(t){var e,a,r=[1,4,5,6,7,10,11],n=0;if(a=Mx.exec(t)){for(var i,o=0;i=r[o];++o)a[i]=+a[i]||0;a[2]=(+a[2]||1)-1,a[3]=+a[3]||1,a[7]=a[7]?String(a[7]).substr(0,3):0,void 0!==a[8]&&""!==a[8]||void 0!==a[9]&&""!==a[9]?("Z"!==a[8]&&void 0!==a[9]&&(n=60*a[10]+a[11],"+"===a[9]&&(n=0-n)),e=Date.UTC(a[1],a[2],a[3],a[4],a[5]+n,a[6],a[7])):e=+new Date(a[1],a[2],a[3],a[4],a[5],a[6],a[7])}else e=Date.parse?Date.parse(t):NaN;return e}(t),isNaN(t)?_x:new Date(t))}))}))}),lx,{_typeCheck:function(t){return e=t,"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(t.getTime());var e},min:function(t,e){void 0===e&&(e=Ub);var a=t;if(!tx.isRef(a)&&(a=this.cast(t),!this._typeCheck(a)))throw new TypeError("`min` must be a Date or a value that can be `cast()` to a Date");return this.test({message:e,name:"min",exclusive:!0,params:{min:t},test:function(t){return yx(t)||t>=this.resolve(a)}})},max:function(t,e){void 0===e&&(e=Wb);var a=t;if(!tx.isRef(a)&&(a=this.cast(t),!this._typeCheck(a)))throw new TypeError("`max` must be a Date or a value that can be `cast()` to a Date");return this.test({message:e,name:"max",exclusive:!0,params:{max:t},test:function(t){return yx(t)||t<=this.resolve(a)}})}});var Hx,Vx=(Hx={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"},function(t){return null==Hx?void 0:Hx[t]}),Lx=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Bx=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var kx=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var Cx=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var Sx="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ex="["+Sx+"]",Ox="\\d+",Tx="[\\u2700-\\u27bf]",Dx="[a-z\\xdf-\\xf6\\xf8-\\xff]",jx="[^\\ud800-\\udfff"+Sx+Ox+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",Fx="(?:\\ud83c[\\udde6-\\uddff]){2}",Ix="[\\ud800-\\udbff][\\udc00-\\udfff]",Px="[A-Z\\xc0-\\xd6\\xd8-\\xde]",Rx="(?:"+Dx+"|"+jx+")",Nx="(?:"+Px+"|"+jx+")",$x="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",Ux="[\\ufe0e\\ufe0f]?"+$x+("(?:\\u200d(?:"+["[^\\ud800-\\udfff]",Fx,Ix].join("|")+")[\\ufe0e\\ufe0f]?"+$x+")*"),Wx="(?:"+[Tx,Fx,Ix].join("|")+")"+Ux,qx=RegExp([Px+"?"+Dx+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[Ex,Px,"$"].join("|")+")",Nx+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[Ex,Px+Rx,"$"].join("|")+")",Px+"?"+Rx+"+(?:['’](?:d|ll|m|re|s|t|ve))?",Px+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ox,Wx].join("|"),"g");function Gx(t,e,a){return t=by(t),void 0===(e=a?void 0:e)?function(t){return Cx.test(t)}(t)?function(t){return t.match(qx)||[]}(t):function(t){return t.match(kx)||[]}(t):t.match(e)||[]}var Yx=RegExp("['’]","g");function Kx(t){return function(e){return function(t,e,a,r){var n=-1,i=null==t?0:t.length;for(r&&i&&(a=t[++n]);++n<i;)a=e(a,t[n],n,t);return a}(Gx(function(t){return(t=by(t))&&t.replace(Lx,Vx).replace(Bx,"")}(e).replace(Yx,"")),t,"")}}var Jx=Kx((function(t,e,a){return t+(a?"_":"")+e.toLowerCase()}));function Zx(t,e,a){var r=t.length;return a=void 0===a?r:a,!e&&a>=r?t:function(t,e,a){var r=-1,n=t.length;e<0&&(e=-e>n?0:n+e),(a=a>n?n:a)<0&&(a+=n),n=e>a?0:a-e>>>0,e>>>=0;for(var i=Array(n);++r<n;)i[r]=t[r+e];return i}(t,e,a)}var Xx,Qx=(Xx="toUpperCase",function(t){var e=Qg(t=by(t))?hb(t):void 0,a=e?e[0]:t.charAt(0),r=e?Zx(e,1).join(""):t.slice(1);return a[Xx]()+r});var tw=Kx((function(t,e,a){return e=e.toLowerCase(),t+(a?function(t){return Qx(by(t).toLowerCase())}(e):e)}));var ew=function(t){return aw(function(t){for(var e=new Set,a=0,r=t.length;a<r;a++){var n=t[a];e.add(n[0]),e.add(n[1])}return Array.from(e)}(t),t)};function aw(t,e){var a=t.length,r=new Array(a),n={},i=a,o=function(t){for(var e=new Map,a=0,r=t.length;a<r;a++){var n=t[a];e.has(n[0])||e.set(n[0],new Set),e.has(n[1])||e.set(n[1],new Set),e.get(n[0]).add(n[1])}return e}(e),l=function(t){for(var e=new Map,a=0,r=t.length;a<r;a++)e.set(t[a],a);return e}(t);for(e.forEach((function(t){if(!l.has(t[0])||!l.has(t[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")}));i--;)n[i]||s(t[i],i,new Set);return r;function s(t,e,i){if(i.has(t)){var c;try{c=", node was:"+JSON.stringify(t)}catch(d){c=""}throw new Error("Cyclic dependency"+c)}if(!l.has(t))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(t));if(!n[e]){n[e]=!0;var h=o.get(t)||new Set;if(e=(h=Array.from(h)).length){i.add(t);do{var u=h[--e];s(u,l.get(u),i)}while(e);i.delete(t)}r[--a]=t}}}function rw(t,e){void 0===e&&(e=[]);var a=[],r=[];function n(t,n){var i=Gz.split(t)[0];~r.indexOf(i)||r.push(i),~e.indexOf(n+"-"+i)||a.push([n,i])}for(var i in t)if(Cy(t,i)){var o=t[i];~r.indexOf(i)||r.push(i),tx.isRef(o)&&o.isSibling?n(o.path,i):Kb(o)&&o._deps&&o._deps.forEach((function(t){return n(t,i)}))}return ew.array(r,a).reverse()}function nw(t,e){var a=1/0;return t.some((function(t,r){if(-1!==e.path.indexOf(t))return a=r,!0})),a}function iw(t){for(var e=arguments.length,a=new Array(e>1?e-1:0),r=1;r<e;r++)a[r-1]=arguments[r];var n=t.reduce((function(t,e){var r=a.shift();return t+(null==r?"":r)+e}));return n.replace(/^\./,"")}function ow(){var t=Ax(["",'["','"]']);return ow=function(){return t},t}function lw(){var t=Ax(["",".",""]);return lw=function(){return t},t}function sw(){var t=Ax(["",".",""]);return sw=function(){return t},t}ew.array=aw;var cw=function(t){return"[object Object]"===Object.prototype.toString.call(t)};function hw(t){var e=this;if(!(this instanceof hw))return new hw(t);lx.call(this,{type:"object",default:function(){var t=this;if(this._nodes.length){var e={};return this._nodes.forEach((function(a){e[a]=t.fields[a].default?t.fields[a].default():void 0})),e}}}),this.fields=Object.create(null),this._nodes=[],this._excludedEdges=[],this.withMutation((function(){e.transform((function(t){if("string"==typeof t)try{t=JSON.parse(t)}catch(e){t=null}return this.isType(t)?t:null})),t&&e.shape(t)}))}function uw(){var t=Ax(["","[","]"]);return uw=function(){return t},t}function dw(){var t=Ax(["","[","]"]);return dw=function(){return t},t}fx(hw,lx,{_typeCheck:function(t){return cw(t)||"function"==typeof t},_cast:function(t,e){var a=this;void 0===e&&(e={});var r=lx.prototype._cast.call(this,t,e);if(void 0===r)return this.default();if(!this._typeCheck(r))return r;var n=this.fields,i=!0===this._option("stripUnknown",e),o=this._nodes.concat(Object.keys(r).filter((function(t){return-1===a._nodes.indexOf(t)}))),l={},s=ff({},e,{parent:l,__validating:e.__validating||!1}),c=!1;return o.forEach((function(t){var a=n[t],o=Cy(r,t);if(a){var h,u=a._options&&a._options.strict;if(s.path=iw(sw(),e.path,t),s.value=r[t],!0===(a=a.resolve(s))._strip)return void(c=c||t in r);void 0!==(h=e.__validating&&u?r[t]:a.cast(r[t],s))&&(l[t]=h)}else o&&!i&&(l[t]=r[t]);l[t]!==r[t]&&(c=!0)})),c?l:r},_validate:function(t,e){var a,r,n=this;void 0===e&&(e={});var i=e.sync,o=[],l=null!=e.originalValue?e.originalValue:t,s=[{schema:this,value:l}].concat(e.from||[]);return a=this._option("abortEarly",e),r=this._option("recursive",e),e=ff({},e,{__validating:!0,originalValue:l,from:s}),lx.prototype._validate.call(this,t,e).catch(cz(a,o)).then((function(t){if(!r||!cw(t)){if(o.length)throw o[0];return t}s=l?[].concat(s):[{schema:n,value:l||t}].concat(e.from||[]),l=l||t;var c,h,u=n._nodes.map((function(a){var r=-1===a.indexOf(".")?iw(lw(),e.path,a):iw(ow(),e.path,a),o=n.fields[a],c=ff({},e,{path:r,from:s,parent:t,originalValue:l[a]});return o&&o.validate?(c.strict=!0,o.validate(t[a],c)):function(t){return t?nz.SynchronousPromise:Promise}(i).resolve(!0)}));return uz({sync:i,validations:u,value:t,errors:o,endEarly:a,path:e.path,sort:(c=n.fields,h=Object.keys(c),function(t,e){return nw(h,t)-nw(h,e)})})}))},concat:function(t){var e=lx.prototype.concat.call(this,t);return e._nodes=rw(e.fields,e._excludedEdges),e},shape:function(t,e){void 0===e&&(e=[]);var a=this.clone(),r=ff(a.fields,t);if(a.fields=r,e.length){Array.isArray(e[0])||(e=[e]);var n=e.map((function(t){return t[0]+"-"+t[1]}));a._excludedEdges=a._excludedEdges.concat(n)}return a._nodes=rw(r,a._excludedEdges),a},from:function(t,e,a){var r=Gz.getter(t,!0);return this.transform((function(n){if(null==n)return n;var i=n;return Cy(n,t)&&(i=ff({},n),a||delete i[t],i[e]=r(n)),i}))},noUnknown:function(t,e){void 0===t&&(t=!0),void 0===e&&(e=qb),"string"==typeof t&&(e=t,t=!0);var a=this.test({name:"noUnknown",exclusive:!0,message:e,test:function(e){if(null==e)return!0;var a=function(t,e){var a=Object.keys(t.fields);return Object.keys(e).filter((function(t){return-1===a.indexOf(t)}))}(this.schema,e);return!t||0===a.length||this.createError({params:{unknown:a.join(", ")}})}});return a._options.stripUnknown=t,a},unknown:function(t,e){return void 0===t&&(t=!0),void 0===e&&(e=qb),this.noUnknown(!t,e)},transformKeys:function(t){return this.transform((function(e){return e&&function(t,e){var a={};return e=Dz(e),fz(t,(function(t,r,n){Oy(a,e(t,r,n),t)})),a}(e,(function(e,a){return t(a)}))}))},camelCase:function(){return this.transformKeys(tw)},snakeCase:function(){return this.transformKeys(Jx)},constantCase:function(){return this.transformKeys((function(t){return Jx(t).toUpperCase()}))},describe:function(){var t=lx.prototype.describe.call(this);return t.fields=jz(this.fields,(function(t){return t.describe()})),t}}),fx((function t(e){var a=this;if(!(this instanceof t))return new t(e);lx.call(this,{type:"array"}),this._subType=void 0,this.innerType=void 0,this.withMutation((function(){a.transform((function(t){if("string"==typeof t)try{t=JSON.parse(t)}catch(e){t=null}return this.isType(t)?t:null})),e&&a.of(e)}))}),lx,{_typeCheck:function(t){return Array.isArray(t)},_cast:function(t,e){var a=this,r=lx.prototype._cast.call(this,t,e);if(!this._typeCheck(r)||!this.innerType)return r;var n=!1,i=r.map((function(t,r){var i=a.innerType.cast(t,ff({},e,{path:iw(dw(),e.path,r)}));return i!==t&&(n=!0),i}));return n?i:r},_validate:function(t,e){var a=this;void 0===e&&(e={});var r=[],n=e.sync,i=e.path,o=this.innerType,l=this._option("abortEarly",e),s=this._option("recursive",e),c=null!=e.originalValue?e.originalValue:t;return lx.prototype._validate.call(this,t,e).catch(cz(l,r)).then((function(t){if(!s||!o||!a._typeCheck(t)){if(r.length)throw r[0];return t}c=c||t;for(var h=new Array(t.length),u=0;u<t.length;u++){var d=t[u],p=iw(uw(),e.path,u),m=ff({},e,{path:p,strict:!0,parent:t,index:u,originalValue:c[u]});h[u]=!o.validate||o.validate(d,m)}return uz({sync:n,path:i,value:t,errors:r,endEarly:l,validations:h})}))},_isPresent:function(t){return lx.prototype._isPresent.call(this,t)&&t.length>0},of:function(t){var e=this.clone();if(!1!==t&&!Kb(t))throw new TypeError("`array.of()` sub-schema must be a valid yup schema, or `false` to negate a current sub-schema. not: "+zb(t));return e._subType=t,e.innerType=t,e},min:function(t,e){return e=e||Gb,this.test({message:e,name:"min",exclusive:!0,params:{min:t},test:function(e){return yx(e)||e.length>=this.resolve(t)}})},max:function(t,e){return e=e||Yb,this.test({message:e,name:"max",exclusive:!0,params:{max:t},test:function(e){return yx(e)||e.length<=this.resolve(t)}})},ensure:function(){var t=this;return this.default((function(){return[]})).transform((function(e,a){return t._typeCheck(e)?e:null==a?[]:[].concat(a)}))},compact:function(t){var e=t?function(e,a,r){return!t(e,a,r)}:function(t){return!!t};return this.transform((function(t){return null!=t?t.filter(e):t}))},describe:function(){var t=lx.prototype.describe.call(this);return this.innerType&&(t.innerType=this.innerType.describe()),t}});var pw=Object.prototype.hasOwnProperty,mw=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),vw=function(t,e){for(var a=e&&e.plainObjects?Object.create(null):{},r=0;r<t.length;++r)void 0!==t[r]&&(a[r]=t[r]);return a},fw={arrayToObject:vw,assign:function(t,e){return Object.keys(e).reduce((function(t,a){return t[a]=e[a],t}),t)},compact:function(t){for(var e=[{obj:{o:t},prop:"o"}],a=[],r=0;r<e.length;++r)for(var n=e[r],i=n.obj[n.prop],o=Object.keys(i),l=0;l<o.length;++l){var s=o[l],c=i[s];"object"==typeof c&&null!==c&&-1===a.indexOf(c)&&(e.push({obj:i,prop:s}),a.push(c))}return function(t){for(var e;t.length;){var a=t.pop();if(e=a.obj[a.prop],Array.isArray(e)){for(var r=[],n=0;n<e.length;++n)void 0!==e[n]&&r.push(e[n]);a.obj[a.prop]=r}}return e}(e)},decode:function(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(e){return t}},encode:function(t){if(0===t.length)return t;for(var e="string"==typeof t?t:String(t),a="",r=0;r<e.length;++r){var n=e.charCodeAt(r);45===n||46===n||95===n||126===n||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122?a+=e.charAt(r):n<128?a+=mw[n]:n<2048?a+=mw[192|n>>6]+mw[128|63&n]:n<55296||n>=57344?a+=mw[224|n>>12]+mw[128|n>>6&63]+mw[128|63&n]:(r+=1,n=65536+((1023&n)<<10|1023&e.charCodeAt(r)),a+=mw[240|n>>18]+mw[128|n>>12&63]+mw[128|n>>6&63]+mw[128|63&n])}return a},isBuffer:function(t){return null!=t&&!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},merge:function t(e,a,r){if(!a)return e;if("object"!=typeof a){if(Array.isArray(e))e.push(a);else{if("object"!=typeof e)return[e,a];(r.plainObjects||r.allowPrototypes||!pw.call(Object.prototype,a))&&(e[a]=!0)}return e}if("object"!=typeof e)return[e].concat(a);var n=e;return Array.isArray(e)&&!Array.isArray(a)&&(n=vw(e,r)),Array.isArray(e)&&Array.isArray(a)?(a.forEach((function(a,n){pw.call(e,n)?e[n]&&"object"==typeof e[n]?e[n]=t(e[n],a,r):e.push(a):e[n]=a})),e):Object.keys(a).reduce((function(e,n){var i=a[n];return pw.call(e,n)?e[n]=t(e[n],i,r):e[n]=i,e}),n)}},yw=String.prototype.replace,gw=/%20/g,bw={default:"RFC3986",formatters:{RFC1738:function(t){return yw.call(t,gw,"+")},RFC3986:function(t){return t}},RFC1738:"RFC1738",RFC3986:"RFC3986"},zw={brackets:function(t){return t+"[]"},indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},xw=Date.prototype.toISOString,ww={delimiter:"&",encode:!0,encoder:fw.encode,encodeValuesOnly:!1,serializeDate:function(t){return xw.call(t)},skipNulls:!1,strictNullHandling:!1},Mw=function t(e,a,r,n,i,o,l,s,c,h,u,d){var p=e;if("function"==typeof l)p=l(a,p);else if(p instanceof Date)p=h(p);else if(null===p){if(n)return o&&!d?o(a,ww.encoder):a;p=""}if("string"==typeof p||"number"==typeof p||"boolean"==typeof p||fw.isBuffer(p))return o?[u(d?a:o(a,ww.encoder))+"="+u(o(p,ww.encoder))]:[u(a)+"="+u(String(p))];var m,v=[];if(void 0===p)return v;if(Array.isArray(l))m=l;else{var f=Object.keys(p);m=s?f.sort(s):f}for(var y=0;y<m.length;++y){var g=m[y];i&&null===p[g]||(v=Array.isArray(p)?v.concat(t(p[g],r(a,g),r,n,i,o,l,s,c,h,u,d)):v.concat(t(p[g],a+(c?"."+g:"["+g+"]"),r,n,i,o,l,s,c,h,u,d)))}return v},_w=Object.prototype.hasOwnProperty,Aw={allowDots:!1,allowPrototypes:!1,arrayLimit:20,decoder:fw.decode,delimiter:"&",depth:5,parameterLimit:1e3,plainObjects:!1,strictNullHandling:!1},Hw=function(t,e,a){if(t){var r=a.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,n=/(\[[^[\]]*])/g,i=/(\[[^[\]]*])/.exec(r),o=i?r.slice(0,i.index):r,l=[];if(o){if(!a.plainObjects&&_w.call(Object.prototype,o)&&!a.allowPrototypes)return;l.push(o)}for(var s=0;null!==(i=n.exec(r))&&s<a.depth;){if(s+=1,!a.plainObjects&&_w.call(Object.prototype,i[1].slice(1,-1))&&!a.allowPrototypes)return;l.push(i[1])}return i&&l.push("["+r.slice(i.index)+"]"),function(t,e,a){for(var r=e,n=t.length-1;n>=0;--n){var i,o=t[n];if("[]"===o)i=(i=[]).concat(r);else{i=a.plainObjects?Object.create(null):{};var l="["===o.charAt(0)&&"]"===o.charAt(o.length-1)?o.slice(1,-1):o,s=parseInt(l,10);!isNaN(s)&&o!==l&&String(s)===l&&s>=0&&a.parseArrays&&s<=a.arrayLimit?(i=[])[s]=r:i[l]=r}r=i}return r}(l,e,a)}},Vw={formats:bw,parse:function(t,e){var a=e?fw.assign({},e):{};if(null!==a.decoder&&void 0!==a.decoder&&"function"!=typeof a.decoder)throw new TypeError("Decoder has to be a function.");if(a.ignoreQueryPrefix=!0===a.ignoreQueryPrefix,a.delimiter="string"==typeof a.delimiter||fw.isRegExp(a.delimiter)?a.delimiter:Aw.delimiter,a.depth="number"==typeof a.depth?a.depth:Aw.depth,a.arrayLimit="number"==typeof a.arrayLimit?a.arrayLimit:Aw.arrayLimit,a.parseArrays=!1!==a.parseArrays,a.decoder="function"==typeof a.decoder?a.decoder:Aw.decoder,a.allowDots="boolean"==typeof a.allowDots?a.allowDots:Aw.allowDots,a.plainObjects="boolean"==typeof a.plainObjects?a.plainObjects:Aw.plainObjects,a.allowPrototypes="boolean"==typeof a.allowPrototypes?a.allowPrototypes:Aw.allowPrototypes,a.parameterLimit="number"==typeof a.parameterLimit?a.parameterLimit:Aw.parameterLimit,a.strictNullHandling="boolean"==typeof a.strictNullHandling?a.strictNullHandling:Aw.strictNullHandling,""===t||null==t)return a.plainObjects?Object.create(null):{};for(var r="string"==typeof t?function(t,e){for(var a={},r=e.ignoreQueryPrefix?t.replace(/^\?/,""):t,n=e.parameterLimit===1/0?void 0:e.parameterLimit,i=r.split(e.delimiter,n),o=0;o<i.length;++o){var l,s,c=i[o],h=c.indexOf("]="),u=-1===h?c.indexOf("="):h+1;-1===u?(l=e.decoder(c,Aw.decoder),s=e.strictNullHandling?null:""):(l=e.decoder(c.slice(0,u),Aw.decoder),s=e.decoder(c.slice(u+1),Aw.decoder)),_w.call(a,l)?a[l]=[].concat(a[l]).concat(s):a[l]=s}return a}(t,a):t,n=a.plainObjects?Object.create(null):{},i=Object.keys(r),o=0;o<i.length;++o){var l=i[o],s=Hw(l,r[l],a);n=fw.merge(n,s,a)}return fw.compact(n)},stringify:function(t,e){var a=t,r=e?fw.assign({},e):{};if(null!==r.encoder&&void 0!==r.encoder&&"function"!=typeof r.encoder)throw new TypeError("Encoder has to be a function.");var n=void 0===r.delimiter?ww.delimiter:r.delimiter,i="boolean"==typeof r.strictNullHandling?r.strictNullHandling:ww.strictNullHandling,o="boolean"==typeof r.skipNulls?r.skipNulls:ww.skipNulls,l="boolean"==typeof r.encode?r.encode:ww.encode,s="function"==typeof r.encoder?r.encoder:ww.encoder,c="function"==typeof r.sort?r.sort:null,h=void 0!==r.allowDots&&r.allowDots,u="function"==typeof r.serializeDate?r.serializeDate:ww.serializeDate,d="boolean"==typeof r.encodeValuesOnly?r.encodeValuesOnly:ww.encodeValuesOnly;if(void 0===r.format)r.format=bw.default;else if(!Object.prototype.hasOwnProperty.call(bw.formatters,r.format))throw new TypeError("Unknown format option provided.");var p,m,v=bw.formatters[r.format];"function"==typeof r.filter?a=(m=r.filter)("",a):Array.isArray(r.filter)&&(p=m=r.filter);var f,y=[];if("object"!=typeof a||null===a)return"";f=r.arrayFormat in zw?r.arrayFormat:"indices"in r?r.indices?"indices":"repeat":"indices";var g=zw[f];p||(p=Object.keys(a)),c&&p.sort(c);for(var b=0;b<p.length;++b){var z=p[b];o&&null===a[z]||(y=y.concat(Mw(a[z],z,g,i,o,l?s:null,m,c,h,u,v,d)))}var x=y.join(n),w=!0===r.addQueryPrefix?"?":"";return x.length>0?w+x:""}};export{rt as $,Ut as A,Wt as B,x as C,I as D,K as E,$ as F,p as G,xt as H,_t as I,at as J,J as K,Ht as L,le as M,Ot as N,V as O,N as P,j as Q,m as R,o as S,Et as T,Zt as U,Ga as V,q as W,U as X,_ as Y,Za as Z,Ya as _,l as a,wt as a0,Mt as a1,St as a2,Kt as a3,qa as a4,Jt as a5,ie as a6,oe as a7,M as a8,h as a9,ta as aA,Ls as aB,Cs as aC,cm as aD,Je as aE,Xe as aF,hm as aG,um as aH,f as aI,Ze as aJ,ae as aK,zt as aL,st as aM,mf as aN,Xt as aO,Qt as aP,qe as aQ,ea as aR,te as aS,wx as aT,lx as aU,hw as aV,We as aW,Ua as aX,za as aY,Vw as aZ,w as aa,Ve as ab,g as ac,vt as ad,ft as ae,mt as af,ne as ag,Xa as ah,re as ai,Lr as aj,Cr as ak,W as al,it as am,Sr as an,bt as ao,H as ap,Nr as aq,y as ar,_i as as,ls as at,dl as au,pl as av,Hs as aw,Le as ax,Vs as ay,Qe as az,pe as b,X as c,Z as d,F as e,Q as f,D as g,G as h,de as i,T as j,O as k,et as l,s as m,A as n,se as o,ce as p,he as q,qt as r,v as s,P as t,Gt as u,ue as v,b as w,R as x,tt as y,ot as z};