slthcore 0.4.3__tar.gz → 0.4.5__tar.gz

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.

Potentially problematic release.


This version of slthcore might be problematic. Click here for more details.

Files changed (108) hide show
  1. {slthcore-0.4.3/slthcore.egg-info → slthcore-0.4.5}/PKG-INFO +1 -1
  2. {slthcore-0.4.3 → slthcore-0.4.5}/setup.py +1 -1
  3. {slthcore-0.4.3 → slthcore-0.4.5}/slth/endpoints/__init__.py +3 -2
  4. {slthcore-0.4.3 → slthcore-0.4.5}/slth/forms.py +2 -2
  5. {slthcore-0.4.3 → slthcore-0.4.5}/slth/queryset.py +0 -1
  6. {slthcore-0.4.3 → slthcore-0.4.5}/slth/serializer.py +4 -1
  7. {slthcore-0.4.3 → slthcore-0.4.5}/slth/static/css/slth.css +8 -0
  8. {slthcore-0.4.3 → slthcore-0.4.5}/slth/static/js/slth.min.js +12 -12
  9. {slthcore-0.4.3 → slthcore-0.4.5}/slth/views.py +1 -1
  10. {slthcore-0.4.3 → slthcore-0.4.5/slthcore.egg-info}/PKG-INFO +1 -1
  11. {slthcore-0.4.3 → slthcore-0.4.5}/MANIFEST.in +0 -0
  12. {slthcore-0.4.3 → slthcore-0.4.5}/setup.cfg +0 -0
  13. {slthcore-0.4.3 → slthcore-0.4.5}/slth/__init__.py +0 -0
  14. {slthcore-0.4.3 → slthcore-0.4.5}/slth/apps.py +0 -0
  15. {slthcore-0.4.3 → slthcore-0.4.5}/slth/cmd/configure/__main__.py +0 -0
  16. {slthcore-0.4.3 → slthcore-0.4.5}/slth/cmd/init/__main__.py +0 -0
  17. {slthcore-0.4.3 → slthcore-0.4.5}/slth/cmd/init/__pycache__/__main__.cpython-312.pyc +0 -0
  18. {slthcore-0.4.3 → slthcore-0.4.5}/slth/cmd/init/boilerplate/.DS_Store +0 -0
  19. {slthcore-0.4.3 → slthcore-0.4.5}/slth/cmd/init/boilerplate/.gitignore +0 -0
  20. {slthcore-0.4.3 → slthcore-0.4.5}/slth/cmd/init/boilerplate/backend/api/__init__.py +0 -0
  21. {slthcore-0.4.3 → slthcore-0.4.5}/slth/cmd/init/boilerplate/backend/api/asgi.py +0 -0
  22. {slthcore-0.4.3 → slthcore-0.4.5}/slth/cmd/init/boilerplate/backend/api/endpoints/__init__.py +0 -0
  23. {slthcore-0.4.3 → slthcore-0.4.5}/slth/cmd/init/boilerplate/backend/api/models.py +0 -0
  24. {slthcore-0.4.3 → slthcore-0.4.5}/slth/cmd/init/boilerplate/backend/api/settings.py +0 -0
  25. {slthcore-0.4.3 → slthcore-0.4.5}/slth/cmd/init/boilerplate/backend/api/tests.py +0 -0
  26. {slthcore-0.4.3 → slthcore-0.4.5}/slth/cmd/init/boilerplate/backend/api/urls.py +0 -0
  27. {slthcore-0.4.3 → slthcore-0.4.5}/slth/cmd/init/boilerplate/backend/api/wsgi.py +0 -0
  28. {slthcore-0.4.3 → slthcore-0.4.5}/slth/cmd/init/boilerplate/backend/application.yml +0 -0
  29. {slthcore-0.4.3 → slthcore-0.4.5}/slth/cmd/init/boilerplate/backend/entrypoint.sh +0 -0
  30. {slthcore-0.4.3 → slthcore-0.4.5}/slth/cmd/init/boilerplate/backend/manage.py +0 -0
  31. {slthcore-0.4.3 → slthcore-0.4.5}/slth/cmd/init/boilerplate/backend/requirements.txt +0 -0
  32. {slthcore-0.4.3 → slthcore-0.4.5}/slth/cmd/init/boilerplate/base.env +0 -0
  33. {slthcore-0.4.3 → slthcore-0.4.5}/slth/cmd/init/boilerplate/docker-compose.yml +0 -0
  34. {slthcore-0.4.3 → slthcore-0.4.5}/slth/cmd/init/boilerplate/frontend/package.json +0 -0
  35. {slthcore-0.4.3 → slthcore-0.4.5}/slth/cmd/init/boilerplate/frontend/src/main.jsx +0 -0
  36. {slthcore-0.4.3 → slthcore-0.4.5}/slth/cmd/init/boilerplate/frontend/vite.config.js +0 -0
  37. {slthcore-0.4.3 → slthcore-0.4.5}/slth/cmd/init/boilerplate/local.env +0 -0
  38. {slthcore-0.4.3 → slthcore-0.4.5}/slth/cmd/init/boilerplate/run.sh +0 -0
  39. {slthcore-0.4.3 → slthcore-0.4.5}/slth/cmd/init/boilerplate/selenium/run.sh +0 -0
  40. {slthcore-0.4.3 → slthcore-0.4.5}/slth/cmd/init/boilerplate/test.sh +0 -0
  41. {slthcore-0.4.3 → slthcore-0.4.5}/slth/components.py +0 -0
  42. {slthcore-0.4.3 → slthcore-0.4.5}/slth/db/__init__.py +0 -0
  43. {slthcore-0.4.3 → slthcore-0.4.5}/slth/db/generic.py +0 -0
  44. {slthcore-0.4.3 → slthcore-0.4.5}/slth/db/models.py +0 -0
  45. {slthcore-0.4.3 → slthcore-0.4.5}/slth/endpoints/auth.py +0 -0
  46. {slthcore-0.4.3 → slthcore-0.4.5}/slth/endpoints/deletion.py +0 -0
  47. {slthcore-0.4.3 → slthcore-0.4.5}/slth/endpoints/dev.py +0 -0
  48. {slthcore-0.4.3 → slthcore-0.4.5}/slth/endpoints/email.py +0 -0
  49. {slthcore-0.4.3 → slthcore-0.4.5}/slth/endpoints/job.py +0 -0
  50. {slthcore-0.4.3 → slthcore-0.4.5}/slth/endpoints/log.py +0 -0
  51. {slthcore-0.4.3 → slthcore-0.4.5}/slth/endpoints/profile.py +0 -0
  52. {slthcore-0.4.3 → slthcore-0.4.5}/slth/endpoints/pushsubscription.py +0 -0
  53. {slthcore-0.4.3 → slthcore-0.4.5}/slth/endpoints/report.py +0 -0
  54. {slthcore-0.4.3 → slthcore-0.4.5}/slth/endpoints/role.py +0 -0
  55. {slthcore-0.4.3 → slthcore-0.4.5}/slth/endpoints/task.py +0 -0
  56. {slthcore-0.4.3 → slthcore-0.4.5}/slth/endpoints/timezone.py +0 -0
  57. {slthcore-0.4.3 → slthcore-0.4.5}/slth/endpoints/user.py +0 -0
  58. {slthcore-0.4.3 → slthcore-0.4.5}/slth/exceptions.py +0 -0
  59. {slthcore-0.4.3 → slthcore-0.4.5}/slth/factory.py +0 -0
  60. {slthcore-0.4.3 → slthcore-0.4.5}/slth/management/__init__.py +0 -0
  61. {slthcore-0.4.3 → slthcore-0.4.5}/slth/management/commands/__init__.py +0 -0
  62. {slthcore-0.4.3 → slthcore-0.4.5}/slth/management/commands/integration_test.py +0 -0
  63. {slthcore-0.4.3 → slthcore-0.4.5}/slth/management/commands/sync.py +0 -0
  64. {slthcore-0.4.3 → slthcore-0.4.5}/slth/management/commands/worker.py +0 -0
  65. {slthcore-0.4.3 → slthcore-0.4.5}/slth/middleware/__init__.py +0 -0
  66. {slthcore-0.4.3 → slthcore-0.4.5}/slth/middleware/timezone.py +0 -0
  67. {slthcore-0.4.3 → slthcore-0.4.5}/slth/migrations/0001_initial.py +0 -0
  68. {slthcore-0.4.3 → slthcore-0.4.5}/slth/migrations/0002_email_role_pushsubscription_error.py +0 -0
  69. {slthcore-0.4.3 → slthcore-0.4.5}/slth/migrations/0003_rename_photo_profile_alter_profile_options.py +0 -0
  70. {slthcore-0.4.3 → slthcore-0.4.5}/slth/migrations/0004_alter_profile_photo.py +0 -0
  71. {slthcore-0.4.3 → slthcore-0.4.5}/slth/migrations/0005_alter_profile_photo.py +0 -0
  72. {slthcore-0.4.3 → slthcore-0.4.5}/slth/migrations/0006_user.py +0 -0
  73. {slthcore-0.4.3 → slthcore-0.4.5}/slth/migrations/0007_deletion_log.py +0 -0
  74. {slthcore-0.4.3 → slthcore-0.4.5}/slth/migrations/0008_alter_deletion_datetime_alter_log_datetime.py +0 -0
  75. {slthcore-0.4.3 → slthcore-0.4.5}/slth/migrations/0009_remove_email_from_email_email_action_email_attempt_and_more.py +0 -0
  76. {slthcore-0.4.3 → slthcore-0.4.5}/slth/migrations/0010_email_key_alter_email_action_alter_email_attempt_and_more.py +0 -0
  77. {slthcore-0.4.3 → slthcore-0.4.5}/slth/migrations/0011_usertimezone.py +0 -0
  78. {slthcore-0.4.3 → slthcore-0.4.5}/slth/migrations/0012_timezone_remove_usertimezone_key_and_more.py +0 -0
  79. {slthcore-0.4.3 → slthcore-0.4.5}/slth/migrations/__init__.py +0 -0
  80. {slthcore-0.4.3 → slthcore-0.4.5}/slth/models.py +0 -0
  81. {slthcore-0.4.3 → slthcore-0.4.5}/slth/notifications.py +0 -0
  82. {slthcore-0.4.3 → slthcore-0.4.5}/slth/oauth.py +0 -0
  83. {slthcore-0.4.3 → slthcore-0.4.5}/slth/pdf/__init__.py +0 -0
  84. {slthcore-0.4.3 → slthcore-0.4.5}/slth/pdf/tests.py +0 -0
  85. {slthcore-0.4.3 → slthcore-0.4.5}/slth/permissions.py +0 -0
  86. {slthcore-0.4.3 → slthcore-0.4.5}/slth/printer.py +0 -0
  87. {slthcore-0.4.3 → slthcore-0.4.5}/slth/roles.py +0 -0
  88. {slthcore-0.4.3 → slthcore-0.4.5}/slth/selenium/__init__.py +0 -0
  89. {slthcore-0.4.3 → slthcore-0.4.5}/slth/selenium/browser.py +0 -0
  90. {slthcore-0.4.3 → slthcore-0.4.5}/slth/static/.DS_Store +0 -0
  91. {slthcore-0.4.3 → slthcore-0.4.5}/slth/static/css/.DS_Store +0 -0
  92. {slthcore-0.4.3 → slthcore-0.4.5}/slth/static/js/index.min.js +0 -0
  93. {slthcore-0.4.3 → slthcore-0.4.5}/slth/static/js/react.min.js +0 -0
  94. {slthcore-0.4.3 → slthcore-0.4.5}/slth/statistics.py +0 -0
  95. {slthcore-0.4.3 → slthcore-0.4.5}/slth/tasks.py +0 -0
  96. {slthcore-0.4.3 → slthcore-0.4.5}/slth/templates/email.html +0 -0
  97. {slthcore-0.4.3 → slthcore-0.4.5}/slth/templates/index.html +0 -0
  98. {slthcore-0.4.3 → slthcore-0.4.5}/slth/templates/report.html +0 -0
  99. {slthcore-0.4.3 → slthcore-0.4.5}/slth/templates/service-worker.js +0 -0
  100. {slthcore-0.4.3 → slthcore-0.4.5}/slth/templates/signature.html +0 -0
  101. {slthcore-0.4.3 → slthcore-0.4.5}/slth/tests.py +0 -0
  102. {slthcore-0.4.3 → slthcore-0.4.5}/slth/threadlocal.py +0 -0
  103. {slthcore-0.4.3 → slthcore-0.4.5}/slth/tz.py +0 -0
  104. {slthcore-0.4.3 → slthcore-0.4.5}/slth/urls.py +0 -0
  105. {slthcore-0.4.3 → slthcore-0.4.5}/slth/utils.py +0 -0
  106. {slthcore-0.4.3 → slthcore-0.4.5}/slthcore.egg-info/SOURCES.txt +0 -0
  107. {slthcore-0.4.3 → slthcore-0.4.5}/slthcore.egg-info/dependency_links.txt +0 -0
  108. {slthcore-0.4.3 → slthcore-0.4.5}/slthcore.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: slthcore
3
- Version: 0.4.3
3
+ Version: 0.4.5
4
4
  Summary: API generator based on yml file
5
5
  Home-page: https://github.com/brenokcc
6
6
  Author: Breno Silva
@@ -5,7 +5,7 @@ install_requires = []
5
5
 
6
6
  setup(
7
7
  name='slthcore',
8
- version='0.4.3',
8
+ version='0.4.5',
9
9
  packages=find_packages(),
10
10
  install_requires=install_requires,
11
11
  include_package_data=True,
@@ -82,7 +82,7 @@ class Endpoint(metaclass=EnpointMetaclass):
82
82
  return self
83
83
 
84
84
  def objects(self, model):
85
- return apps.get_model(model).objects
85
+ return apps.get_model(model).objects.contextualize(self.request)
86
86
 
87
87
  def get(self):
88
88
  fields = []
@@ -151,7 +151,7 @@ class Endpoint(metaclass=EnpointMetaclass):
151
151
  data = data.contextualize(self.request).settitle(title)
152
152
  elif isinstance(data, FormFactory):
153
153
  form = self.getform(data.settitle(title).form(self))
154
- if self.request.method == "POST" or (title and self.request.GET.get("form") == title):
154
+ if self.request.method == "POST" or (title and self.request.GET.get("form") == form._key):
155
155
  try:
156
156
  if isinstance(self, DeleteEndpoint):
157
157
  return self.post()
@@ -177,6 +177,7 @@ class Endpoint(metaclass=EnpointMetaclass):
177
177
  output = self.process()
178
178
  if isinstance(output, QuerySet) or isinstance(output, Serializer):
179
179
  output.base_url = self.base_url
180
+ output = output.contextualize(self.request)
180
181
  if isinstance(output, Task):
181
182
  job = Job.objects.create(task=output)
182
183
  output = Response(f'Tarefa {job.id} iniciada.', task=job.id)
@@ -4,6 +4,7 @@ import datetime
4
4
  from django.forms import *
5
5
  from django.utils.translation import gettext_lazy as _
6
6
  from django.forms.models import ModelChoiceIterator, ModelMultipleChoiceField
7
+ from django.forms import fields
7
8
  from django.db.models import Model, QuerySet, Manager
8
9
  from .models import Token, Profile
9
10
  from django.db import transaction
@@ -156,7 +157,6 @@ class FormMixin:
156
157
  field_name = self.request.GET.get("on_change")
157
158
  if field_name:
158
159
  raise JsonResponseException(self.controller.on_change(field_name))
159
-
160
160
  data = dict(
161
161
  type="form",
162
162
  key=self._key,
@@ -340,7 +340,7 @@ class FormMixin:
340
340
  if word in name:
341
341
  data.update(type="password")
342
342
  pick = getattr(field, "pick", False)
343
- if isinstance(field, CharField) or isinstance(field, IntegerField):
343
+ if isinstance(field, fields.CharField) or isinstance(field, fields.IntegerField):
344
344
  mask = getattr(field, "mask", None)
345
345
  if mask:
346
346
  data.update(mask=mask)
@@ -168,7 +168,6 @@ class QuerySet(models.QuerySet):
168
168
  raise JsonResponseException(endpoint.serialize())
169
169
  raise Exception()
170
170
 
171
-
172
171
  filters = qs.metadata.get('filters', ())
173
172
  for lookup in filters:
174
173
  if request and lookup in request.GET and lookup != choices_field_name:
@@ -316,12 +316,15 @@ class Serializer:
316
316
  returned = endpoint.process()
317
317
  if isinstance(returned, QuerySet) or isinstance(returned, Serializer):
318
318
  returned.base_url = endpoint.base_url
319
+ returned = returned.contextualize(self.request)
319
320
  path = self.path + [key]
320
321
  if wrap:
321
322
  data = dict(type='fieldset', key=key, title=title, url=None, data=serialize(returned))
322
323
  else:
323
324
  data = serialize(returned)
324
- data['title'] = title
325
+ #if 'title' in data and data['title'] is None:
326
+ if lazy:
327
+ data['title'] = title
325
328
  if isinstance(data, dict):
326
329
  data['url'] = absolute_url(self.request, 'only={}'.format('__'.join(path)))
327
330
  if leaf: raise JsonResponseException(data)
@@ -70,6 +70,14 @@ input[type="checkbox"], input[type="radio"]{
70
70
  text-align: center;
71
71
  }
72
72
 
73
+ #output h1{
74
+ font-size: 1.5rem;
75
+ }
76
+
77
+ .tabContent h1{
78
+ display: none;
79
+ }
80
+
73
81
 
74
82
  /* .object-viewer .object-fieldset {
75
83
  border: solid 1px #2c3e50;
@@ -1,6 +1,6 @@
1
- import{j as t,c as Y,r as I,R as Be}from"./react.min.js";const p={colors:{primary:"var(--primary-color)",success:"var(--success-color)",warning:"var(--warning-color)",info:"var(--info-color)",danger:"var(--danger-color)",highlight:"var(--highlight-color)",seconday:"var(--seconday-color)",auxiliary:"var(--auxiliary-color)"},border:{radius:"var(--border-radius)"},background:{info:"var(--info-background)"}};function Ae(e){function n(){const a={width:30,height:30,borderRadius:"50%",backgroundColor:e.data.value};return t.jsx("div",{style:a})}return n()}function Oe(e){function n(r){navigator.clipboard.writeText(r),U('Icon "'+r+'" copied to clipboard!')}const a={display:"inline-block",width:150,textAlign:"center",cursor:"pointer"};return t.jsx("div",{style:{marginTop:30},children:_e.map(r=>t.jsxs("div",{className:"icon-box",onClick:()=>n(r),style:a,children:[t.jsx("i",{className:"fa-solid fa-fw fa-"+r}),t.jsx("div",{className:"icon-text",children:r})]},Math.random()))})}function Re(e){function n(){return t.jsx("i",{style:e.style,className:"fa-solid fa-circle-notch fa-spin fa-1x spin"})}return n()}function C(e){var n="fa-solid fa-"+e.icon;return e.className&&(n+=" "+e.className),(e.onClick||e.clickable)&&(n+=" clickable"),t.jsx("i",{style:e.style,className:n,onClick:e.onClick})}function be(e){function n(){const a={padding:12,textDecoration:"none",whiteSpace:"nowrap",borderRadius:5,margin:5,cursor:"pointer",display:e.display||"block"};return e.primary&&(a.backgroundColor=p.colors.primary,a.color="white"),e.default&&(a.color=p.colors.primary,a.border="solid 1px "+p.colors.primary),t.jsx("a",{id:e.id,style:a,onClick:r=>{r.preventDefault(),e.onClick()},children:t.jsx(C,{icon:e.icon})})}return n()}const _e=["1","2","3","4","5","6","7","8","9","fill-drip","arrows-to-circle","circle-chevron-right","at","trash-can","text-height","user-xmark","stethoscope","message","info","down-left-and-up-right-to-center","explosion","file-text","wave-square","ring","building-un","dice-three","calendar-days","anchor-circle-check","building-circle-arrow-right","volleyball","arrows-up-to-line","sort-down","minus-circle","door-open","sign-out-alt","atom","soap","icons","microphone-lines-slash","bridge-circle-check","pump-medical","fingerprint","hand-point-right","search-location","step-forward","smile-beam","flag-checkered","football","school-circle-exclamation","crop","angles-down","users-rectangle","people-roof","people-line","beer","diagram-predecessor","long-arrow-up","fire-flame-simple","person","laptop","file-csv","menorah","truck-plane","record-vinyl","grin-stars","bong","spaghetti-monster-flying","arrow-down-up-across-line","utensil-spoon","jar-wheat","mail-bulk","file-circle-exclamation","hospital-symbol","pager","contact-book","strikethrough","k","landmark-flag","pencil","backward","caret-right","comments","paste","code-pull-request","clipboard-list","truck-ramp-box","user-check","vial-virus","sheet-plastic","blog","user-ninja","person-arrow-up-from-line","torah","quidditch","toggle-off","box-archive","person-drowning","sort-numeric-down-alt","grin-tongue-squint","spray-can","truck-monster","w","globe-africa","rainbow","circle-notch","tablet-screen-button","paw","cloud","trowel-bricks","flushed","hospital-user","tent-arrow-left-right","legal","binoculars","microphone-slash","box-tissue","motorcycle","concierge-bell","pencil-ruler","people-arrows","mars-and-venus-burst","square-caret-right","scissors","sun-plant-wilt","toilets-portable","hockey-puck","table","magnifying-glass-arrow-right","tachograph-digital","users-slash","clover","reply","star-and-crescent","house-fire","square-minus","helicopter","compass","square-caret-down","file-circle-question","laptop-code","swatchbook","prescription-bottle","navicon","people-group","hourglass-end","heart-crack","square-up-right","kiss-beam","film","ruler-horizontal","people-robbery","lightbulb","caret-left","exclamation-circle","school-circle-xmark","sign-out","circle-chevron-down","unlock-keyhole","cloud-showers-heavy","headphones-simple","sitemap","donate","memory","road-spikes","fire-burner","flag","hanukiah","feather","volume-low","comment-slash","cloud-sun-rain","compress","wheat-awn","ankh","hands-holding-child","asterisk","square-check","peseta-sign","heading","ghost","list","square-phone-flip","cart-plus","gamepad","dot-circle","face-dizzy","egg","house-medical-circle-xmark","campground","folder-plus","soccer-ball","paintbrush","lock","gas-pump","hot-tub","map-marked","house-flood-water","tree","bridge-lock","sack-dollar","pen-to-square","car-side","share-nodes","heart-circle-minus","hourglass-half","microscope","sink","shopping-bag","sort-alpha-down-alt","mitten","person-rays","users","eye-slash","flask-vial","hand","om","worm","house-circle-xmark","plug","chevron-up","hand-spock","stopwatch","kiss","bridge-circle-xmark","grin-tongue","chess-bishop","grin-wink","hard-of-hearing","road-circle-check","dice-five","square-rss","land-mine-on","i-cursor","stamp","stairs","i","hryvnia","pills","grin-alt","tooth","v","bangladeshi-taka-sign","bicycle","staff-snake","head-side-cough-slash","truck-medical","wheat-awn-circle-exclamation","snowman","mortar-pestle","road-barrier","school","igloo","joint","angle-right","horse","q","g","notes-medical","thermometer-half","dong-sign","capsules","poo-storm","frown-open","hand-point-up","money-bill","bookmark","align-justify","umbrella-beach","helmet-un","bullseye","bacon","hand-point-down","arrow-up-from-bracket","folder","file-waveform","radiation","chart-simple","mars-stroke","vial","tachometer-alt-average","wand-magic-sparkles","e","pen-clip","bridge-circle-exclamation","user","school-circle-check","dumpster","van-shuttle","building-user","square-caret-left","highlighter","key","bullhorn","globe","synagogue","person-half-dress","road-bridge","location-arrow","c","tablet-button","building-lock","pizza-slice","money-bill-wave","chart-area","house-flag","person-circle-minus","cancel","camera-rotate","spray-can-sparkles","star","repeat","cross","box","venus-mars","mouse-pointer","maximize","charging-station","triangle-circle-square","shuffle","running","mobile-retro","grip-lines-vertical","spider","hands-bound","file-invoice-dollar","plane-circle-exclamation","x-ray","spell-check","slash","mouse","sign-in","store-alt-slash","server","virus-covid-slash","shop-lock","hourglass-start","blender-phone","building-wheat","person-breastfeeding","sign-in-alt","venus","passport","heartbeat","people-carry","temperature-high","microchip","crown","weight-hanging","xmarks-lines","file-prescription","weight","user-group","sort-alpha-up","chess-knight","laugh-squint","wheelchair","circle-arrow-up","toggle-on","walking","l","fire","procedures","space-shuttle","laugh","folder-open","heart-circle-plus","code-fork","city","microphone-lines","pepper-hot","unlock","colon-sign","headset","store-slash","road-circle-xmark","user-minus","mars-stroke-v","glass-cheers","clipboard","house-circle-exclamation","file-upload","wifi","bathtub","underline","user-pen","signature","stroopwafel","bold","anchor-lock","building-ngo","manat-sign","not-equal","border-top-left","map-marked-alt","jedi","square-poll-vertical","mug-hot","car-battery","gift","dice-two","chess-queen","glasses","chess-board","building-circle-check","person-chalkboard","mars-stroke-right","hand-rock","square-caret-up","cloud-showers-water","chart-bar","hands-wash","less-than-equal","train","low-vision","crow","sailboat","window-restore","square-plus","torii-gate","frog","bucket","image","microphone","cow","caret-up","screwdriver","folder-closed","house-tsunami","square-nfi","arrow-up-from-ground-water","martini-glass","undo-alt","table-columns","lemon","head-side-mask","handshake","gem","dolly","smoking","minimize","monument","snowplow","angles-right","cannabis","play-circle","tablets","ethernet","euro","chair","circle-check","stop-circle","drafting-compass","plate-wheat","icicles","person-shelter","neuter","id-badge","marker","laugh-beam","helicopter-symbol","universal-access","circle-chevron-up","lari-sign","volcano","person-walking-dashed-line-arrow-right","sterling-sign","viruses","square-person-confined","user-tie","long-arrow-down","tent-arrow-down-to-line","certificate","reply-all","suitcase","skating","funnel-dollar","camera-retro","circle-arrow-down","file-import","square-arrow-up-right","box-open","scroll","spa","location-pin-lock","pause","hill-avalanche","thermometer-empty","bomb","registered","vcard","scale-unbalanced-flip","subscript","directions","burst","laptop-house","tired","money-bills","smog","crutch","cloud-upload","palette","arrows-turn-right","vest","ferry","arrows-down-to-people","sprout","left-right","boxes-packing","circle-arrow-left","group-arrows-rotate","bowl-food","candy-cane","sort-amount-down","thunderstorm","text-slash","smile-wink","file-word","file-powerpoint","arrows-left-right","house-lock","cloud-download","children","chalkboard","user-large-slash","envelope-open","handshake-simple-slash","mattress-pillow","guarani-sign","sync","fire-extinguisher","cruzeiro-sign","greater-than-equal","shield-halved","book-atlas","virus","envelope-circle-check","layer-group","arrows-to-dot","archway","heart-circle-check","house-damage","file-zipper","square","martini-glass-empty","couch","cedi-sign","italic","church","comments-dollar","democrat","z","skiing","road-lock","a","temperature-down","feather-pointed","p","snowflake","newspaper","rectangle-ad","circle-arrow-right","filter-circle-xmark","locust","unsorted","list-ol","person-dress-burst","money-check-dollar","vector-square","bread-slice","language","kiss-wink-heart","filter","question","file-signature","up-down-left-right","house-chimney-user","hand-holding-heart","puzzle-piece","money-check","star-half-stroke","code","whiskey-glass","building-circle-exclamation","magnifying-glass-chart","external-link","cubes-stacked","won","virus-covid","austral-sign","f","leaf","road","taxi","person-circle-plus","pie-chart","bolt-lightning","sack-xmark","file-excel","file-contract","fish-fins","building-flag","grin-beam","object-ungroup","poop","map-marker","kaaba","toilet-paper","helmet-safety","eject","circle-right","plane-circle-check","meh-rolling-eyes","object-group","line-chart","mask-ventilator","arrow-right","signs-post","cash-register","person-circle-question","h","tarp","tools","arrows-to-eye","plug-circle-bolt","heart","mars-and-venus","house-user","dumpster-fire","house-crack","martini-glass-citrus","surprise","bottle-water","pause-circle","toilet-paper-slash","apple-whole","kitchen-set","r","thermometer-quarter","cube","bitcoin-sign","shield-dog","solar-panel","lock-open","elevator","money-bill-transfer","money-bill-trend-up","house-flood-water-circle-arrow-right","square-poll-horizontal","circle","fast-backward","recycle","user-astronaut","plane-slash","trademark","basketball","satellite-dish","circle-up","mobile-screen-button","volume-up","users-rays","wallet","clipboard-check","file-audio","hamburger","wrench","bugs","rupee","file-image","question-circle","plane-departure","handshake-slash","book-bookmark","code-branch","hat-cowboy","bridge","phone-flip","truck-front","cat","anchor-circle-exclamation","truck-field","route","clipboard-question","panorama","comment-medical","teeth-open","file-circle-minus","tags","wine-glass","fast","meh-blank","square-parking","house-signal","tasks-alt","faucet-drip","dolly-flatbed","smoking-ban","terminal","mobile-button","house-medical-flag","shopping-basket","tape","bus-simple","eye","sad-cry","audio-description","person-military-to-person","file-shield","user-slash","pen","tower-observation","file-code","signal","bus","heart-circle-xmark","house-chimney","window-maximize","frown","prescription","store-alt","save","vihara","scale-unbalanced","sort-up","commenting","plant-wilt","diamond","grin-squint","hand-holding-usd","bacterium","hand-pointer","drum-steelpan","hand-scissors","praying-hands","redo","biohazard","location","mars-double","child-dress","users-between-lines","lungs-virus","grin-tears","phone","calendar-xmark","child-reaching","head-side-virus","user-gear","sort-numeric-up","door-closed","shield-virus","dice-six","mosquito-net","bridge-water","person-booth","text-width","hat-wizard","fancy","person-digging","trash","tachometer-average","book-medical","poo","quote-right","tshirt","cubes","divide","tenge","headphones","hands-holding","hands-clapping","republican","arrow-left","person-circle-xmark","ruler","align-left","dice-d6","restroom","j","users-viewfinder","file-video","up-right-from-square","th","file-pdf","book-bible","o","suitcase-medical","user-secret","otter","person-dress","comment-dollar","business-time","th-large","tanakh","volume-control-phone","hat-cowboy-side","clipboard-user","child","lira-sign","satellite","plane-lock","tag","comment","cake","envelope","angles-up","paperclip","arrow-right-to-city","ribbon","lungs","sort-numeric-up-alt","litecoin-sign","border-none","circle-nodes","parachute-box","indent","truck-field-un","hourglass","mountain","user-md","info-circle","cloud-meatball","camera","square-virus","meteor","car-on","sleigh","sort-numeric-down","hand-holding-water","water","calendar-check","braille","prescription-bottle-medical","landmark","truck","crosshairs","person-cane","tent","vest-patches","check-double","sort-alpha-down","money-bill-wheat","cookie","undo","hdd","grin-squint-tears","dumbbell","rectangle-list","tarp-droplet","house-medical-circle-check","skiing-nordic","calendar-plus","plane-arrival","circle-left","train-subway","chart-gantt","inr","crop-simple","money-bill-alt","long-arrow-alt-left","dna","virus-slash","subtract","chess","long-arrow-left","plug-circle-check","street-view","franc-sign","volume-off","hands-asl-interpreting","gear","tint-slash","mosque","mosquito","star-of-david","person-military-rifle","shopping-cart","vials","plug-circle-plus","place-of-worship","grip-vertical","level-up","u","square-root-variable","clock","step-backward","pallet","faucet","baseball-bat-ball","s","timeline","keyboard","caret-down","house-chimney-medical","thermometer-three-quarters","mobile-screen","plane-up","piggy-bank","battery-half","mountain-city","coins","khanda","sliders","folder-tree","network-wired","map-pin","hamsa","cent-sign","flask","person-pregnant","wand-sparkles","ellipsis-vertical","ticket","power-off","right-long","flag-usa","laptop-file","tty","diagram-next","person-rifle","house-medical-circle-exclamation","closed-captioning","person-hiking","venus-double","images","calculator","people-pulling","n","tram","cloud-rain","building-circle-xmark","ship","arrows-down-to-line","download","grin","delete-left","eyedropper","file-circle-check","forward","mobile","meh","align-center","book-skull","id-card","outdent","heart-circle-exclamation","house","calendar-week","laptop-medical","b","file-medical","dice-one","kiwi-bird","exchange","rotate-right","utensils","sort-amount-up","mill-sign","bowl-rice","skull","tower-broadcast","truck-pickup","up-long","stop","code-merge","upload","hurricane","mound","toilet-portable","compact-disc","file-download","caravan","shield-cat","zap","glass-water","oil-well","vault","mars","toilet","plane-circle-xmark","yen","ruble","sun","guitar","laugh-wink","horse-head","bore-hole","industry","circle-down","arrows-turn-to-dots","florin-sign","sort-amount-down-alt","less-than","angle-down","car-tunnel","head-side-cough","grip-lines","thumbs-down","user-lock","long-arrow-right","anchor-circle-xmark","ellipsis","chess-pawn","kit-medical","person-through-window","toolbox","hands-holding-circle","bug","credit-card","car","hand-holding-hand","book-reader","mountain-sun","arrows-left-right-to-line","dice-d20","truck-droplet","file-circle-xmark","temperature-up","medal","bed","square-h","podcast","thermometer-full","bell","superscript","plug-circle-xmark","star-of-life","phone-slash","paint-roller","handshake-angle","map-marker-alt","file","greater-than","swimmer","arrow-down","tint","eraser","globe-americas","person-burst","dove","battery-empty","socks","inbox","section","tachometer-alt","envelope-open-text","hospital","wine-bottle","chess-rook","stream","dharmachakra","hotdog","person-walking-with-cane","drum","ice-cream","heart-circle-bolt","fax","paragraph","vote-yea","star-half","boxes","link","ear-listen","tree-city","play","font","rupiah-sign","search","table-tennis","person-dots-from-line","trash-restore-alt","naira-sign","cart-arrow-down","walkie-talkie","file-pen","receipt","square-pen","suitcase-rolling","person-circle-exclamation","chevron-down","battery","skull-crossbones","code-compare","list-ul","school-lock","tower-cell","long-arrow-alt-down","ranking-star","chess-king","person-harassing","brazilian-real-sign","landmark-dome","arrow-up","tv","shrimp","tasks","jug-detergent","user-circle","user-shield","wind","car-crash","y","snowboarding","fast","fish","user-graduate","circle-half-stroke","clapperboard","radiation-alt","baseball","jet-fighter-up","project-diagram","copy","volume-xmark","hand-sparkles","grip","share-square","child-rifle","gun","square-phone","plus","expand","computer","xmark","arrows","chalkboard-user","peso-sign","building-shield","baby","users-line","quote-left","tractor","trash-restore","arrow-down-up-lock","lines-leaning","ruler-combined","copyright","equals","blender","teeth","sheqel","map","rocket","photo-video","folder-minus","store","arrow-trend-up","plug-circle-minus","sign","bezier-curve","bell-slash","tablet","school-flag","fill","angle-up","drumstick-bite","holly-berry","chevron-left","bacteria","hand-lizard","notdef","disease","briefcase-medical","genderless","chevron-right","retweet","car-rear","pump-soap","video-slash","battery-quarter","radio","carriage-baby","traffic-light","thermometer","vr-cardboard","hand-middle-finger","percentage","truck-moving","glass-water-droplet","display","smile","thumbtack","trophy","pray","hammer","hand-peace","sync-alt","spinner","robot","peace","gears","warehouse","arrow-up-right-dots","splotch","grin-hearts","dice-four","sim-card","transgender","mercury","level-down","falling-burst","award","ticket-simple","building","angles-left","qrcode","history","grin-beam-sweat","file-export","shield","sort-amount-up-alt","house-medical","golf-ball","circle-chevron-left","house-chimney-window","pen-nib","tent-arrow-turn-left","tents","wand-magic","dog","carrot","moon","wine-glass-empty","cheese","yin-yang","music","code-commit","temperature-low","person-biking","broom","shield-heart","gopuram","globe-oceania","xmark-square","hashtag","up-right-and-down-left-from-center","oil-can","t","hippo","chart-column","infinity","vial-circle-check","person-arrow-down-to-line","voicemail","fan","person-walking-luggage","up-down","cloud-moon-rain","calendar","trailer","haykal","sd-card","dragon","shoe-prints","plus-circle","grin-tongue-wink","hand-holding","plug-circle-exclamation","unlink","clone","person-walking-arrow-loop-left","sort-alpha-up-alt","fire-flame-curved","tornado","file-circle-plus","quran","anchor","border-all","face-angry","cookie-bite","arrow-trend-down","rss","draw-polygon","scale-balanced","tachometer","shower","desktop","m","th-list","sms","book","user-plus","check","battery-three-quarters","house-circle-check","angle-left","diagram-successor","truck-arrow-right","arrows-split-up-and-left","hand-fist","cloud-moon","briefcase","falling","portrait","user-tag","rug","globe-europe","luggage-cart","window-close","baht-sign","book-open","journal-whills","handcuffs","warning","database","share","bottle-droplet","face","hill-rockslide","right-left","paper-plane","road-circle-exclamation","dungeon","align-right","money-bill-wave-alt","life-ring","signing","calendar-day","water-ladder","arrows-v","grimace","wheelchair-move","turn-down","person-walking-arrow-right","square-envelope","dice","bowling-ball","brain","bandage","calendar-minus","xmark-circle","gifts","hotel","globe-asia","id-card-clip","search-plus","thumbs-up","user-clock","hand-dots","file-invoice","window-minimize","mug-saucer","brush","mask","search-minus","ruler-vertical","user-large","train-tram","user-nurse","syringe","cloud-sun","stopwatch-20","square-full","magnet","jar","sticky-note","bug-slash","arrow-up-from-water-pump","bone","user-injured","sad-tear","plane","tent-arrows-down","exclamation","arrows-spin","print","turkish-lira","usd","x","search-dollar","users-gear","person-military-pointing","university","umbrella","trowel","d","stapler","theater-masks","kip-sign","hand-point-left","handshake-simple","jet-fighter","square-share-nodes","barcode","plus-minus","video","mortar-board","hand-holding-medical","person-circle-check","turn-up"];function Fe(e){function n(){const a={position:"fixed",color:"white",backgroundColor:e.isError?"#e52207":p.colors.success,width:300,top:10,left:(window.innerWidth-320)/2,padding:15};return t.jsxs("div",{style:a,children:[t.jsx(C,{icon:e.isError?"xmark-circle":"circle-check",style:{marginRight:5}}),e.text]})}return n()}function U(e,n=!1){const a=document.createElement("div");a.classList.add("message"),Y.createRoot(document.body.appendChild(a)).render(t.jsx(Fe,{text:e,isError:n})),setTimeout(function(){a.remove()},3e3)}function ue(){document.querySelectorAll(".message").forEach(function(e){e.remove()})}function ne(e){function n(){const a={color:p.colors.info,backgroundColor:p.background.info,padding:20,display:"flex",justifyContent:"space-between",marginTop:10,marginBottom:10};return t.jsxs("div",{style:a,children:[t.jsx("div",{children:e.data.text}),e.children&&t.jsx("div",{children:e.children})]})}return n()}function We(e){const n=e.data;n.store&&Ce(n.store),n.redirect&&n.redirect.length>2?(n.message&&localStorage.setItem("message",n.message),document.location.href=X(n.redirect)):n.message&&U(n.message)}function Ce(e){Object.keys(e).map(function(n){e[n]?(localStorage.setItem(n,e[n]),n=="token"&&(document.cookie="token="+e[n]+";path=/")):(localStorage.removeItem(n,e[n]),n=="token"&&(document.cookie="token=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/"))})}function z(e){return e.replace("/app/","/api/")}function X(e){return e.replaceAll("/api/","/app/")}function O(e,n,a,r){const i=localStorage.getItem("token");var o={Accept:"application/json",TZ:Intl.DateTimeFormat().resolvedOptions().timeZone};i&&(o.Authorization="Token "+i);const s=z(n);var d={method:e,headers:new Headers(o),ajax:1};r&&(d.body=r);var c=null,u=null;fetch(s,d).then(function(l){if(c=l,u=c.headers.get("Content-Type"),u=="application/json")return l.text();if(u.indexOf("text")<0||u.indexOf("csv")>=0||u.indexOf("pdf")>=0)return l.arrayBuffer();l.text()}).then(l=>{if(u=="application/json"){var h=JSON.parse(l||"{}");typeof h=="object"&&h.type=="redirect"&&!h.autosubmit?document.location.href=X(h.url):a&&a(h,c)}else if(u.indexOf("text")<0||u.indexOf("csv")>=0||u.indexOf("pdf")>=0){var m=window.URL.createObjectURL(new Blob([new Uint8Array(l)],{type:u})),w=document.createElement("a");w.href=m,u.indexOf("excel")>=0?w.download="Download.xls":u.indexOf("pdf")>=0?w.download="Download.pdf":u.indexOf("zip")>=0?w.download="Download.zip":u.indexOf("json")>=0?w.download="Download.json":u.indexOf("csv")>=0?w.download="Download.csv":u.indexOf("png")>=0&&(w.download="Download.png"),document.body.appendChild(w),w.click()}else a&&a(l,c)})}function G(e){if(e===null||e==="")return"-";if(e===!0)return"Sim";if(e===!1)return"Não";if(typeof e=="number"){var n=e.toString().split(".");return n.length==1?e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,"."):(n[0]=n[0].toString().replace(/\B(?=(\d{3})+(?!\d))/g,"."),n[1]=n[1].substring(0,2),n[1].length==1&&(n[1]=n[1]+"0"),n[0]+","+n[1])}if(typeof e=="string"){if(e.length==7&&e[0]=="#")return t.jsx(x,{data:{type:"color",value:e}});if(e.length==19&&e[13]==":"&&e[16]==":"){var n=e.split(" "),a=n[0],r=n[1];return r=="00:00:00"?a:a+" "+r}else if(e.indexOf(`
1
+ import{j as t,c as Y,r as I,R as Be}from"./react.min.js";const p={colors:{primary:"var(--primary-color)",success:"var(--success-color)",warning:"var(--warning-color)",info:"var(--info-color)",danger:"var(--danger-color)",highlight:"var(--highlight-color)",seconday:"var(--seconday-color)",auxiliary:"var(--auxiliary-color)"},border:{radius:"var(--border-radius)"},background:{info:"var(--info-background)"}};function Ae(e){function n(){const a={width:30,height:30,borderRadius:"50%",backgroundColor:e.data.value};return t.jsx("div",{style:a})}return n()}function Oe(e){function n(r){navigator.clipboard.writeText(r),U('Icon "'+r+'" copied to clipboard!')}const a={display:"inline-block",width:150,textAlign:"center",cursor:"pointer"};return t.jsx("div",{style:{marginTop:30},children:_e.map(r=>t.jsxs("div",{className:"icon-box",onClick:()=>n(r),style:a,children:[t.jsx("i",{className:"fa-solid fa-fw fa-"+r}),t.jsx("div",{className:"icon-text",children:r})]},Math.random()))})}function Re(e){function n(){return t.jsx("i",{style:e.style,className:"fa-solid fa-circle-notch fa-spin fa-1x spin"})}return n()}function C(e){var n="fa-solid fa-"+e.icon;return e.className&&(n+=" "+e.className),(e.onClick||e.clickable)&&(n+=" clickable"),t.jsx("i",{style:e.style,className:n,onClick:e.onClick})}function be(e){function n(){const a={padding:12,textDecoration:"none",whiteSpace:"nowrap",borderRadius:5,margin:5,cursor:"pointer",display:e.display||"block"};return e.primary&&(a.backgroundColor=p.colors.primary,a.color="white"),e.default&&(a.color=p.colors.primary,a.border="solid 1px "+p.colors.primary),t.jsx("a",{id:e.id,style:a,onClick:r=>{r.preventDefault(),e.onClick()},children:t.jsx(C,{icon:e.icon})})}return n()}const _e=["1","2","3","4","5","6","7","8","9","fill-drip","arrows-to-circle","circle-chevron-right","at","trash-can","text-height","user-xmark","stethoscope","message","info","down-left-and-up-right-to-center","explosion","file-text","wave-square","ring","building-un","dice-three","calendar-days","anchor-circle-check","building-circle-arrow-right","volleyball","arrows-up-to-line","sort-down","minus-circle","door-open","sign-out-alt","atom","soap","icons","microphone-lines-slash","bridge-circle-check","pump-medical","fingerprint","hand-point-right","search-location","step-forward","smile-beam","flag-checkered","football","school-circle-exclamation","crop","angles-down","users-rectangle","people-roof","people-line","beer","diagram-predecessor","long-arrow-up","fire-flame-simple","person","laptop","file-csv","menorah","truck-plane","record-vinyl","grin-stars","bong","spaghetti-monster-flying","arrow-down-up-across-line","utensil-spoon","jar-wheat","mail-bulk","file-circle-exclamation","hospital-symbol","pager","contact-book","strikethrough","k","landmark-flag","pencil","backward","caret-right","comments","paste","code-pull-request","clipboard-list","truck-ramp-box","user-check","vial-virus","sheet-plastic","blog","user-ninja","person-arrow-up-from-line","torah","quidditch","toggle-off","box-archive","person-drowning","sort-numeric-down-alt","grin-tongue-squint","spray-can","truck-monster","w","globe-africa","rainbow","circle-notch","tablet-screen-button","paw","cloud","trowel-bricks","flushed","hospital-user","tent-arrow-left-right","legal","binoculars","microphone-slash","box-tissue","motorcycle","concierge-bell","pencil-ruler","people-arrows","mars-and-venus-burst","square-caret-right","scissors","sun-plant-wilt","toilets-portable","hockey-puck","table","magnifying-glass-arrow-right","tachograph-digital","users-slash","clover","reply","star-and-crescent","house-fire","square-minus","helicopter","compass","square-caret-down","file-circle-question","laptop-code","swatchbook","prescription-bottle","navicon","people-group","hourglass-end","heart-crack","square-up-right","kiss-beam","film","ruler-horizontal","people-robbery","lightbulb","caret-left","exclamation-circle","school-circle-xmark","sign-out","circle-chevron-down","unlock-keyhole","cloud-showers-heavy","headphones-simple","sitemap","donate","memory","road-spikes","fire-burner","flag","hanukiah","feather","volume-low","comment-slash","cloud-sun-rain","compress","wheat-awn","ankh","hands-holding-child","asterisk","square-check","peseta-sign","heading","ghost","list","square-phone-flip","cart-plus","gamepad","dot-circle","face-dizzy","egg","house-medical-circle-xmark","campground","folder-plus","soccer-ball","paintbrush","lock","gas-pump","hot-tub","map-marked","house-flood-water","tree","bridge-lock","sack-dollar","pen-to-square","car-side","share-nodes","heart-circle-minus","hourglass-half","microscope","sink","shopping-bag","sort-alpha-down-alt","mitten","person-rays","users","eye-slash","flask-vial","hand","om","worm","house-circle-xmark","plug","chevron-up","hand-spock","stopwatch","kiss","bridge-circle-xmark","grin-tongue","chess-bishop","grin-wink","hard-of-hearing","road-circle-check","dice-five","square-rss","land-mine-on","i-cursor","stamp","stairs","i","hryvnia","pills","grin-alt","tooth","v","bangladeshi-taka-sign","bicycle","staff-snake","head-side-cough-slash","truck-medical","wheat-awn-circle-exclamation","snowman","mortar-pestle","road-barrier","school","igloo","joint","angle-right","horse","q","g","notes-medical","thermometer-half","dong-sign","capsules","poo-storm","frown-open","hand-point-up","money-bill","bookmark","align-justify","umbrella-beach","helmet-un","bullseye","bacon","hand-point-down","arrow-up-from-bracket","folder","file-waveform","radiation","chart-simple","mars-stroke","vial","tachometer-alt-average","wand-magic-sparkles","e","pen-clip","bridge-circle-exclamation","user","school-circle-check","dumpster","van-shuttle","building-user","square-caret-left","highlighter","key","bullhorn","globe","synagogue","person-half-dress","road-bridge","location-arrow","c","tablet-button","building-lock","pizza-slice","money-bill-wave","chart-area","house-flag","person-circle-minus","cancel","camera-rotate","spray-can-sparkles","star","repeat","cross","box","venus-mars","mouse-pointer","maximize","charging-station","triangle-circle-square","shuffle","running","mobile-retro","grip-lines-vertical","spider","hands-bound","file-invoice-dollar","plane-circle-exclamation","x-ray","spell-check","slash","mouse","sign-in","store-alt-slash","server","virus-covid-slash","shop-lock","hourglass-start","blender-phone","building-wheat","person-breastfeeding","sign-in-alt","venus","passport","heartbeat","people-carry","temperature-high","microchip","crown","weight-hanging","xmarks-lines","file-prescription","weight","user-group","sort-alpha-up","chess-knight","laugh-squint","wheelchair","circle-arrow-up","toggle-on","walking","l","fire","procedures","space-shuttle","laugh","folder-open","heart-circle-plus","code-fork","city","microphone-lines","pepper-hot","unlock","colon-sign","headset","store-slash","road-circle-xmark","user-minus","mars-stroke-v","glass-cheers","clipboard","house-circle-exclamation","file-upload","wifi","bathtub","underline","user-pen","signature","stroopwafel","bold","anchor-lock","building-ngo","manat-sign","not-equal","border-top-left","map-marked-alt","jedi","square-poll-vertical","mug-hot","car-battery","gift","dice-two","chess-queen","glasses","chess-board","building-circle-check","person-chalkboard","mars-stroke-right","hand-rock","square-caret-up","cloud-showers-water","chart-bar","hands-wash","less-than-equal","train","low-vision","crow","sailboat","window-restore","square-plus","torii-gate","frog","bucket","image","microphone","cow","caret-up","screwdriver","folder-closed","house-tsunami","square-nfi","arrow-up-from-ground-water","martini-glass","undo-alt","table-columns","lemon","head-side-mask","handshake","gem","dolly","smoking","minimize","monument","snowplow","angles-right","cannabis","play-circle","tablets","ethernet","euro","chair","circle-check","stop-circle","drafting-compass","plate-wheat","icicles","person-shelter","neuter","id-badge","marker","laugh-beam","helicopter-symbol","universal-access","circle-chevron-up","lari-sign","volcano","person-walking-dashed-line-arrow-right","sterling-sign","viruses","square-person-confined","user-tie","long-arrow-down","tent-arrow-down-to-line","certificate","reply-all","suitcase","skating","funnel-dollar","camera-retro","circle-arrow-down","file-import","square-arrow-up-right","box-open","scroll","spa","location-pin-lock","pause","hill-avalanche","thermometer-empty","bomb","registered","vcard","scale-unbalanced-flip","subscript","directions","burst","laptop-house","tired","money-bills","smog","crutch","cloud-upload","palette","arrows-turn-right","vest","ferry","arrows-down-to-people","sprout","left-right","boxes-packing","circle-arrow-left","group-arrows-rotate","bowl-food","candy-cane","sort-amount-down","thunderstorm","text-slash","smile-wink","file-word","file-powerpoint","arrows-left-right","house-lock","cloud-download","children","chalkboard","user-large-slash","envelope-open","handshake-simple-slash","mattress-pillow","guarani-sign","sync","fire-extinguisher","cruzeiro-sign","greater-than-equal","shield-halved","book-atlas","virus","envelope-circle-check","layer-group","arrows-to-dot","archway","heart-circle-check","house-damage","file-zipper","square","martini-glass-empty","couch","cedi-sign","italic","church","comments-dollar","democrat","z","skiing","road-lock","a","temperature-down","feather-pointed","p","snowflake","newspaper","rectangle-ad","circle-arrow-right","filter-circle-xmark","locust","unsorted","list-ol","person-dress-burst","money-check-dollar","vector-square","bread-slice","language","kiss-wink-heart","filter","question","file-signature","up-down-left-right","house-chimney-user","hand-holding-heart","puzzle-piece","money-check","star-half-stroke","code","whiskey-glass","building-circle-exclamation","magnifying-glass-chart","external-link","cubes-stacked","won","virus-covid","austral-sign","f","leaf","road","taxi","person-circle-plus","pie-chart","bolt-lightning","sack-xmark","file-excel","file-contract","fish-fins","building-flag","grin-beam","object-ungroup","poop","map-marker","kaaba","toilet-paper","helmet-safety","eject","circle-right","plane-circle-check","meh-rolling-eyes","object-group","line-chart","mask-ventilator","arrow-right","signs-post","cash-register","person-circle-question","h","tarp","tools","arrows-to-eye","plug-circle-bolt","heart","mars-and-venus","house-user","dumpster-fire","house-crack","martini-glass-citrus","surprise","bottle-water","pause-circle","toilet-paper-slash","apple-whole","kitchen-set","r","thermometer-quarter","cube","bitcoin-sign","shield-dog","solar-panel","lock-open","elevator","money-bill-transfer","money-bill-trend-up","house-flood-water-circle-arrow-right","square-poll-horizontal","circle","fast-backward","recycle","user-astronaut","plane-slash","trademark","basketball","satellite-dish","circle-up","mobile-screen-button","volume-up","users-rays","wallet","clipboard-check","file-audio","hamburger","wrench","bugs","rupee","file-image","question-circle","plane-departure","handshake-slash","book-bookmark","code-branch","hat-cowboy","bridge","phone-flip","truck-front","cat","anchor-circle-exclamation","truck-field","route","clipboard-question","panorama","comment-medical","teeth-open","file-circle-minus","tags","wine-glass","fast","meh-blank","square-parking","house-signal","tasks-alt","faucet-drip","dolly-flatbed","smoking-ban","terminal","mobile-button","house-medical-flag","shopping-basket","tape","bus-simple","eye","sad-cry","audio-description","person-military-to-person","file-shield","user-slash","pen","tower-observation","file-code","signal","bus","heart-circle-xmark","house-chimney","window-maximize","frown","prescription","store-alt","save","vihara","scale-unbalanced","sort-up","commenting","plant-wilt","diamond","grin-squint","hand-holding-usd","bacterium","hand-pointer","drum-steelpan","hand-scissors","praying-hands","redo","biohazard","location","mars-double","child-dress","users-between-lines","lungs-virus","grin-tears","phone","calendar-xmark","child-reaching","head-side-virus","user-gear","sort-numeric-up","door-closed","shield-virus","dice-six","mosquito-net","bridge-water","person-booth","text-width","hat-wizard","fancy","person-digging","trash","tachometer-average","book-medical","poo","quote-right","tshirt","cubes","divide","tenge","headphones","hands-holding","hands-clapping","republican","arrow-left","person-circle-xmark","ruler","align-left","dice-d6","restroom","j","users-viewfinder","file-video","up-right-from-square","th","file-pdf","book-bible","o","suitcase-medical","user-secret","otter","person-dress","comment-dollar","business-time","th-large","tanakh","volume-control-phone","hat-cowboy-side","clipboard-user","child","lira-sign","satellite","plane-lock","tag","comment","cake","envelope","angles-up","paperclip","arrow-right-to-city","ribbon","lungs","sort-numeric-up-alt","litecoin-sign","border-none","circle-nodes","parachute-box","indent","truck-field-un","hourglass","mountain","user-md","info-circle","cloud-meatball","camera","square-virus","meteor","car-on","sleigh","sort-numeric-down","hand-holding-water","water","calendar-check","braille","prescription-bottle-medical","landmark","truck","crosshairs","person-cane","tent","vest-patches","check-double","sort-alpha-down","money-bill-wheat","cookie","undo","hdd","grin-squint-tears","dumbbell","rectangle-list","tarp-droplet","house-medical-circle-check","skiing-nordic","calendar-plus","plane-arrival","circle-left","train-subway","chart-gantt","inr","crop-simple","money-bill-alt","long-arrow-alt-left","dna","virus-slash","subtract","chess","long-arrow-left","plug-circle-check","street-view","franc-sign","volume-off","hands-asl-interpreting","gear","tint-slash","mosque","mosquito","star-of-david","person-military-rifle","shopping-cart","vials","plug-circle-plus","place-of-worship","grip-vertical","level-up","u","square-root-variable","clock","step-backward","pallet","faucet","baseball-bat-ball","s","timeline","keyboard","caret-down","house-chimney-medical","thermometer-three-quarters","mobile-screen","plane-up","piggy-bank","battery-half","mountain-city","coins","khanda","sliders","folder-tree","network-wired","map-pin","hamsa","cent-sign","flask","person-pregnant","wand-sparkles","ellipsis-vertical","ticket","power-off","right-long","flag-usa","laptop-file","tty","diagram-next","person-rifle","house-medical-circle-exclamation","closed-captioning","person-hiking","venus-double","images","calculator","people-pulling","n","tram","cloud-rain","building-circle-xmark","ship","arrows-down-to-line","download","grin","delete-left","eyedropper","file-circle-check","forward","mobile","meh","align-center","book-skull","id-card","outdent","heart-circle-exclamation","house","calendar-week","laptop-medical","b","file-medical","dice-one","kiwi-bird","exchange","rotate-right","utensils","sort-amount-up","mill-sign","bowl-rice","skull","tower-broadcast","truck-pickup","up-long","stop","code-merge","upload","hurricane","mound","toilet-portable","compact-disc","file-download","caravan","shield-cat","zap","glass-water","oil-well","vault","mars","toilet","plane-circle-xmark","yen","ruble","sun","guitar","laugh-wink","horse-head","bore-hole","industry","circle-down","arrows-turn-to-dots","florin-sign","sort-amount-down-alt","less-than","angle-down","car-tunnel","head-side-cough","grip-lines","thumbs-down","user-lock","long-arrow-right","anchor-circle-xmark","ellipsis","chess-pawn","kit-medical","person-through-window","toolbox","hands-holding-circle","bug","credit-card","car","hand-holding-hand","book-reader","mountain-sun","arrows-left-right-to-line","dice-d20","truck-droplet","file-circle-xmark","temperature-up","medal","bed","square-h","podcast","thermometer-full","bell","superscript","plug-circle-xmark","star-of-life","phone-slash","paint-roller","handshake-angle","map-marker-alt","file","greater-than","swimmer","arrow-down","tint","eraser","globe-americas","person-burst","dove","battery-empty","socks","inbox","section","tachometer-alt","envelope-open-text","hospital","wine-bottle","chess-rook","stream","dharmachakra","hotdog","person-walking-with-cane","drum","ice-cream","heart-circle-bolt","fax","paragraph","vote-yea","star-half","boxes","link","ear-listen","tree-city","play","font","rupiah-sign","search","table-tennis","person-dots-from-line","trash-restore-alt","naira-sign","cart-arrow-down","walkie-talkie","file-pen","receipt","square-pen","suitcase-rolling","person-circle-exclamation","chevron-down","battery","skull-crossbones","code-compare","list-ul","school-lock","tower-cell","long-arrow-alt-down","ranking-star","chess-king","person-harassing","brazilian-real-sign","landmark-dome","arrow-up","tv","shrimp","tasks","jug-detergent","user-circle","user-shield","wind","car-crash","y","snowboarding","fast","fish","user-graduate","circle-half-stroke","clapperboard","radiation-alt","baseball","jet-fighter-up","project-diagram","copy","volume-xmark","hand-sparkles","grip","share-square","child-rifle","gun","square-phone","plus","expand","computer","xmark","arrows","chalkboard-user","peso-sign","building-shield","baby","users-line","quote-left","tractor","trash-restore","arrow-down-up-lock","lines-leaning","ruler-combined","copyright","equals","blender","teeth","sheqel","map","rocket","photo-video","folder-minus","store","arrow-trend-up","plug-circle-minus","sign","bezier-curve","bell-slash","tablet","school-flag","fill","angle-up","drumstick-bite","holly-berry","chevron-left","bacteria","hand-lizard","notdef","disease","briefcase-medical","genderless","chevron-right","retweet","car-rear","pump-soap","video-slash","battery-quarter","radio","carriage-baby","traffic-light","thermometer","vr-cardboard","hand-middle-finger","percentage","truck-moving","glass-water-droplet","display","smile","thumbtack","trophy","pray","hammer","hand-peace","sync-alt","spinner","robot","peace","gears","warehouse","arrow-up-right-dots","splotch","grin-hearts","dice-four","sim-card","transgender","mercury","level-down","falling-burst","award","ticket-simple","building","angles-left","qrcode","history","grin-beam-sweat","file-export","shield","sort-amount-up-alt","house-medical","golf-ball","circle-chevron-left","house-chimney-window","pen-nib","tent-arrow-turn-left","tents","wand-magic","dog","carrot","moon","wine-glass-empty","cheese","yin-yang","music","code-commit","temperature-low","person-biking","broom","shield-heart","gopuram","globe-oceania","xmark-square","hashtag","up-right-and-down-left-from-center","oil-can","t","hippo","chart-column","infinity","vial-circle-check","person-arrow-down-to-line","voicemail","fan","person-walking-luggage","up-down","cloud-moon-rain","calendar","trailer","haykal","sd-card","dragon","shoe-prints","plus-circle","grin-tongue-wink","hand-holding","plug-circle-exclamation","unlink","clone","person-walking-arrow-loop-left","sort-alpha-up-alt","fire-flame-curved","tornado","file-circle-plus","quran","anchor","border-all","face-angry","cookie-bite","arrow-trend-down","rss","draw-polygon","scale-balanced","tachometer","shower","desktop","m","th-list","sms","book","user-plus","check","battery-three-quarters","house-circle-check","angle-left","diagram-successor","truck-arrow-right","arrows-split-up-and-left","hand-fist","cloud-moon","briefcase","falling","portrait","user-tag","rug","globe-europe","luggage-cart","window-close","baht-sign","book-open","journal-whills","handcuffs","warning","database","share","bottle-droplet","face","hill-rockslide","right-left","paper-plane","road-circle-exclamation","dungeon","align-right","money-bill-wave-alt","life-ring","signing","calendar-day","water-ladder","arrows-v","grimace","wheelchair-move","turn-down","person-walking-arrow-right","square-envelope","dice","bowling-ball","brain","bandage","calendar-minus","xmark-circle","gifts","hotel","globe-asia","id-card-clip","search-plus","thumbs-up","user-clock","hand-dots","file-invoice","window-minimize","mug-saucer","brush","mask","search-minus","ruler-vertical","user-large","train-tram","user-nurse","syringe","cloud-sun","stopwatch-20","square-full","magnet","jar","sticky-note","bug-slash","arrow-up-from-water-pump","bone","user-injured","sad-tear","plane","tent-arrows-down","exclamation","arrows-spin","print","turkish-lira","usd","x","search-dollar","users-gear","person-military-pointing","university","umbrella","trowel","d","stapler","theater-masks","kip-sign","hand-point-left","handshake-simple","jet-fighter","square-share-nodes","barcode","plus-minus","video","mortar-board","hand-holding-medical","person-circle-check","turn-up"];function Fe(e){function n(){const a={position:"fixed",color:"white",backgroundColor:e.isError?"#e52207":p.colors.success,width:300,top:10,left:(window.innerWidth-320)/2,padding:15};return t.jsxs("div",{style:a,children:[t.jsx(C,{icon:e.isError?"xmark-circle":"circle-check",style:{marginRight:5}}),e.text]})}return n()}function U(e,n=!1){const a=document.createElement("div");a.classList.add("message"),Y.createRoot(document.body.appendChild(a)).render(t.jsx(Fe,{text:e,isError:n})),setTimeout(function(){a.remove()},3e3)}function he(){document.querySelectorAll(".message").forEach(function(e){e.remove()})}function ae(e){function n(){const a={color:p.colors.info,backgroundColor:p.background.info,padding:20,display:"flex",justifyContent:"space-between",marginTop:10,marginBottom:10};return t.jsxs("div",{style:a,children:[t.jsx("div",{children:e.data.text}),e.children&&t.jsx("div",{children:e.children})]})}return n()}function We(e){const n=e.data;n.store&&Ce(n.store),n.redirect&&n.redirect.length>2?(n.message&&localStorage.setItem("message",n.message),document.location.href=X(n.redirect)):n.message&&U(n.message)}function Ce(e){Object.keys(e).map(function(n){e[n]?(localStorage.setItem(n,e[n]),n=="token"&&(document.cookie="token="+e[n]+";path=/")):(localStorage.removeItem(n,e[n]),n=="token"&&(document.cookie="token=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/"))})}function z(e){return e.replace("/app/","/api/")}function X(e){return e.replaceAll("/api/","/app/")}function R(e,n,a,r){const i=localStorage.getItem("token");var o={Accept:"application/json",TZ:Intl.DateTimeFormat().resolvedOptions().timeZone};i&&(o.Authorization="Token "+i);const s=z(n);var d={method:e,headers:new Headers(o),ajax:1};r&&(d.body=r);var c=null,u=null;fetch(s,d).then(function(l){if(c=l,u=c.headers.get("Content-Type"),u=="application/json")return l.text();if(u.indexOf("text")<0||u.indexOf("csv")>=0||u.indexOf("pdf")>=0)return l.arrayBuffer();l.text()}).then(l=>{if(u=="application/json"){var h=JSON.parse(l||"{}");typeof h=="object"&&h.type=="redirect"&&!h.autosubmit?document.location.href=X(h.url):a&&a(h,c)}else if(u.indexOf("text")<0||u.indexOf("csv")>=0||u.indexOf("pdf")>=0){var m=window.URL.createObjectURL(new Blob([new Uint8Array(l)],{type:u})),w=document.createElement("a");w.href=m,u.indexOf("excel")>=0?w.download="Download.xls":u.indexOf("pdf")>=0?w.download="Download.pdf":u.indexOf("zip")>=0?w.download="Download.zip":u.indexOf("json")>=0?w.download="Download.json":u.indexOf("csv")>=0?w.download="Download.csv":u.indexOf("png")>=0&&(w.download="Download.png"),document.body.appendChild(w),w.click()}else a&&a(l,c)})}function G(e){if(e===null||e==="")return"-";if(e===!0)return"Sim";if(e===!1)return"Não";if(typeof e=="number"){var n=e.toString().split(".");return n.length==1?e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,"."):(n[0]=n[0].toString().replace(/\B(?=(\d{3})+(?!\d))/g,"."),n[1]=n[1].substring(0,2),n[1].length==1&&(n[1]=n[1]+"0"),n[0]+","+n[1])}if(typeof e=="string"){if(e.length==7&&e[0]=="#")return t.jsx(x,{data:{type:"color",value:e}});if(e.length==19&&e[13]==":"&&e[16]==":"){var n=e.split(" "),a=n[0],r=n[1];return r=="00:00:00"?a:a+" "+r}else if(e.indexOf(`
2
2
  `)>=0)return e.split(`
3
- `).map(function(i,o){return t.jsx("div",{children:i},Math.random())});return e}return typeof e=="object"&&e.type?t.jsx(x,{data:e}):typeof e=="object"&&Array.isArray(e)?e.length==0?"-":typeof e[0]=="object"&&e[0].type!=null?t.jsx(t.Fragment,{children:e.map(function(i){return t.jsx(x,{data:i},Math.random())})}):t.jsx("ul",{style:{padding:0,marginLeft:17},children:e.map(function(i){return t.jsx("li",{children:i},Math.random())})}):typeof e=="object"&&JSON.stringify(Object.keys(e))==JSON.stringify(["id","text"])?e.text:JSON.stringify(e)}function he(){document.querySelector(".layer")==null&&Y.createRoot(document.body.appendChild(document.createElement("div"))).render(t.jsx(Pe,{}))}function Ee(e,n){ue(),he(),window.reloader=n;for(var a=document.getElementsByTagName("dialog"),r=0;r<a.length;r++)a[r].style.display="none";Y.createRoot(document.body.appendChild(document.createElement("div"))).render(t.jsx(Ue,{url:z(e)}))}function ze(e){ue(),he(),Y.createRoot(document.body.appendChild(document.createElement("div"))).render(t.jsx(Ge,{url:z(e)}))}function Z(e){e!=null&&showMessage(e);for(var n=document.getElementsByTagName("dialog"),a=0;a<n.length;a++)if(a==n.length-1){var r=n[a];r.close(),r.classList.remove("opened"),r.remove(),a==0?(document.querySelector(".layer").style.display="none",window.reloader&&window.reloader()):n[a-1].style.display="block"}}function He(e){ue(),he(),Y.createRoot(document.body.appendChild(document.createElement("div"))).render(t.jsx(Ye,{actions:e}))}function Pe(e){const n={backgroundColor:"black",bottom:0,left:0,position:"fixed",right:0,top:0,opacity:.7,display:"none"};return t.jsx("div",{className:"layer",onClick:function(){Z()},style:n})}function Ue(e){const[n,a]=I.useState(null),[r,i]=I.useState(0);I.useEffect(()=>{o(z(e.url)),document.querySelector(".layer").style.display="block"},[]);function o(c){O("GET",z(c),function(u){a(u),i(r+1)})}function s(){const c={maxWidth:800},u={textAlign:"right",cursor:"pointer",marginTop:-15};if(n)return t.jsxs("div",{style:c,children:[t.jsx("div",{style:u,children:t.jsx(C,{icon:"x",onClick:()=>Z()})}),t.jsx(x,{data:n})]})}const d={minWidth:window.innerWidth<800?"calc(100% - 60px)":800,display:n?"block":"none",maxWidth:800,top:window.scrollY+40,border:0};return t.jsx("dialog",{style:d,children:s()},r)}function Ge(e){var n=Math.random();I.useEffect(()=>{document.querySelector(".layer").style.display="block";var r=document.getElementById(n);r.style.top=document.documentElement.scrollTop+100},[]);function a(){const r={minWidth:window.innerWidth<800?"calc(100% - 60px)":800,display:"block",maxWidth:800,top:window.scrollY+40,border:0},i={float:"right",cursor:"pointer",marginTop:-20};return t.jsxs("dialog",{style:r,id:n,children:[t.jsx("div",{style:i,children:t.jsx(C,{icon:"x",onClick:()=>Z()})}),t.jsx("iframe",{src:z(e.url),width:"100%",height:500,style:{border:0}})]})}return a()}function Ye(e){const n=Math.random();I.useEffect(()=>{document.querySelector(".layer").style.display="block"},[]);function a(){const o={width:"100%",borderBottom:"solid 1px #DDDD",padding:20};return t.jsx("div",{align:"center",style:{},children:e.actions.map(function(s){return t.jsx("div",{style:o,onClick:r,children:t.jsx(H,{data:s,strech:!0})},Math.random())})})}function r(){const o=document.getElementById(n);o.close(),o.classList.remove("opened"),o.remove(),document.querySelector(".layer").style.display="none"}const i={width:"auto",display:"block",position:"fixed",bottom:0,border:0,padding:0};return t.jsx("dialog",{id:n,style:i,children:a()})}function T(e){return e!=null&&(e=e.toString().replace("-","").normalize("NFD").replace("_","").toLowerCase()),e}const we={};function F(e){let n="",a=window.document.styleSheets[0];e.split("}").forEach(r=>{let i=(r+"}").replace(/\r?\n|\r/g,"");n=n===""?i:n+i,n.split("{").length===n.split("}").length&&we[n]==null&&(a.insertRule(n,a.cssRules.length),n="",we[n]=!0)})}function H(e){const n=e.id||Math.random(),[a,r]=I.useState(e.data.name);function i(d){d.preventDefault();var c=e.data.url;e.data.urlfunc&&(c=e.data.urlfunc()),e.onClick?(a&&r("Aguarde...."),e.onClick(d)):e.data.modal==!1?window.load(X(c)):Ee(c)}function o(){return e.strech?e.data.name:e.data.icon?e.compact||!e.data.name||window.innerWidth<800?t.jsx(C,{icon:e.data.icon}):t.jsxs(t.Fragment,{children:[t.jsx(C,{icon:e.data.icon,style:{paddingRight:10}}),e.data.name||""]}):e.data.name}function s(){F(`
3
+ `).map(function(i,o){return t.jsx("div",{children:i},Math.random())});return e}return typeof e=="object"&&e.type?t.jsx(x,{data:e}):typeof e=="object"&&Array.isArray(e)?e.length==0?"-":typeof e[0]=="object"&&e[0].type!=null?t.jsx(t.Fragment,{children:e.map(function(i){return t.jsx(x,{data:i},Math.random())})}):t.jsx("ul",{style:{padding:0,marginLeft:17},children:e.map(function(i){return t.jsx("li",{children:i},Math.random())})}):typeof e=="object"&&JSON.stringify(Object.keys(e))==JSON.stringify(["id","text"])?e.text:JSON.stringify(e)}function me(){document.querySelector(".layer")==null&&Y.createRoot(document.body.appendChild(document.createElement("div"))).render(t.jsx(Pe,{}))}function Ee(e,n){he(),me(),window.reloader=n;for(var a=document.getElementsByTagName("dialog"),r=0;r<a.length;r++)a[r].style.display="none";Y.createRoot(document.body.appendChild(document.createElement("div"))).render(t.jsx(Ue,{url:z(e)}))}function ze(e){he(),me(),Y.createRoot(document.body.appendChild(document.createElement("div"))).render(t.jsx(Ge,{url:z(e)}))}function K(e){e!=null&&showMessage(e);for(var n=document.getElementsByTagName("dialog"),a=0;a<n.length;a++)if(a==n.length-1){var r=n[a];r.close(),r.classList.remove("opened"),r.remove(),a==0?(document.querySelector(".layer").style.display="none",window.reloader&&window.reloader()):n[a-1].style.display="block"}}function He(e){he(),me(),Y.createRoot(document.body.appendChild(document.createElement("div"))).render(t.jsx(Ye,{actions:e}))}function Pe(e){const n={backgroundColor:"black",bottom:0,left:0,position:"fixed",right:0,top:0,opacity:.7,display:"none"};return t.jsx("div",{className:"layer",onClick:function(){K()},style:n})}function Ue(e){const[n,a]=I.useState(null),[r,i]=I.useState(0);I.useEffect(()=>{o(z(e.url)),document.querySelector(".layer").style.display="block"},[]);function o(c){R("GET",z(c),function(u){a(u),i(r+1)})}function s(){const c={maxWidth:800},u={textAlign:"right",cursor:"pointer",marginTop:-15};if(n)return t.jsxs("div",{style:c,children:[t.jsx("div",{style:u,children:t.jsx(C,{icon:"x",onClick:()=>K()})}),t.jsx(x,{data:n})]})}const d={minWidth:window.innerWidth<800?"calc(100% - 60px)":800,display:n?"block":"none",maxWidth:800,top:window.scrollY+40,border:0};return t.jsx("dialog",{style:d,children:s()},r)}function Ge(e){var n=Math.random();I.useEffect(()=>{document.querySelector(".layer").style.display="block";var r=document.getElementById(n);r.style.top=document.documentElement.scrollTop+100},[]);function a(){const r={minWidth:window.innerWidth<800?"calc(100% - 60px)":800,display:"block",maxWidth:800,top:window.scrollY+40,border:0},i={float:"right",cursor:"pointer",marginTop:-20};return t.jsxs("dialog",{style:r,id:n,children:[t.jsx("div",{style:i,children:t.jsx(C,{icon:"x",onClick:()=>K()})}),t.jsx("iframe",{src:z(e.url),width:"100%",height:500,style:{border:0}})]})}return a()}function Ye(e){const n=Math.random();I.useEffect(()=>{document.querySelector(".layer").style.display="block"},[]);function a(){const o={width:"100%",borderBottom:"solid 1px #DDDD",padding:20};return t.jsx("div",{align:"center",style:{},children:e.actions.map(function(s){return t.jsx("div",{style:o,onClick:r,children:t.jsx(H,{data:s,strech:!0})},Math.random())})})}function r(){const o=document.getElementById(n);o.close(),o.classList.remove("opened"),o.remove(),document.querySelector(".layer").style.display="none"}const i={width:"auto",display:"block",position:"fixed",bottom:0,border:0,padding:0};return t.jsx("dialog",{id:n,style:i,children:a()})}function T(e){return e!=null&&(e=e.toString().replace("-","").normalize("NFD").replace("_","").toLowerCase()),e}const we={};function F(e){let n="",a=window.document.styleSheets[0];e.split("}").forEach(r=>{let i=(r+"}").replace(/\r?\n|\r/g,"");n=n===""?i:n+i,n.split("{").length===n.split("}").length&&we[n]==null&&(a.insertRule(n,a.cssRules.length),n="",we[n]=!0)})}function H(e){const n=e.id||Math.random(),[a,r]=I.useState(e.data.name);function i(d){d.preventDefault();var c=e.data.url;e.data.urlfunc&&(c=e.data.urlfunc()),e.onClick?(a&&r("Aguarde...."),e.onClick(d)):e.data.modal==!1?window.load(X(c)):Ee(c)}function o(){return e.strech?e.data.name:e.data.icon?e.compact||!e.data.name||window.innerWidth<800?t.jsx(C,{icon:e.data.icon}):t.jsxs(t.Fragment,{children:[t.jsx(C,{icon:e.data.icon,style:{paddingRight:10}}),e.data.name||""]}):e.data.name}function s(){F(`
4
4
  .action{
5
5
  padding: 12px;
6
6
  text-decoration: none;
@@ -9,7 +9,7 @@ import{j as t,c as Y,r as I,R as Be}from"./react.min.js";const p={colors:{primar
9
9
  margin: 5px;
10
10
  min-width: 50px;
11
11
  }
12
- `);var d={lineHeight:e.data.icon?"4rem":"auto"};return e.primary&&(d.backgroundColor=p.colors.primary,d.color="white"),e.default&&(d.border="solid 1px "+p.colors.primary,d.color=p.colors.primary),e.style&&Object.keys(e.style).map(function(c){d[c]=e.style[c]}),t.jsx("a",{id:n,className:"action",href:X(e.data.url)||"#",onClick:i,style:d,"data-label":T(e.data.name),children:o()})}return s()}function ae(e){function n(o){var s=o.target.parentNode.querySelector(".dropdown ul");return s==null&&(s=o.target.parentNode.parentNode.querySelector(".dropdown ul")),s==null&&(s=o.target.parentNode.parentNode.parentNode.querySelector(".dropdown ul")),s}function a(o){const s=n(o);if(s.style.display=="block")s.style.display="none";else{const d=o.target.getBoundingClientRect();document.querySelectorAll(".dropdown ul").forEach(c=>c.style.display="none"),s.style.left=d.left-150+d.width+"px",s.style.display="block"}}function r(o){const s=n(o);s.style.display="none"}function i(){return F(`
12
+ `);var d={lineHeight:e.data.icon?"4rem":"auto"};return e.primary&&(d.backgroundColor=p.colors.primary,d.color="white"),e.default&&(d.border="solid 1px "+p.colors.primary,d.color=p.colors.primary),e.style&&Object.keys(e.style).map(function(c){d[c]=e.style[c]}),t.jsx("a",{id:n,className:"action",href:X(e.data.url)||"#",onClick:i,style:d,"data-label":T(e.data.name),children:o()})}return s()}function re(e){function n(o){var s=o.target.parentNode.querySelector(".dropdown ul");return s==null&&(s=o.target.parentNode.parentNode.querySelector(".dropdown ul")),s==null&&(s=o.target.parentNode.parentNode.parentNode.querySelector(".dropdown ul")),s}function a(o){const s=n(o);if(s.style.display=="block")s.style.display="none";else{const d=o.target.getBoundingClientRect();document.querySelectorAll(".dropdown ul").forEach(c=>c.style.display="none"),s.style.left=d.left-150+d.width+"px",s.style.display="block"}}function r(o){const s=n(o);s.style.display="none"}function i(){return F(`
13
13
  .dropdown > div {
14
14
  cursor: pointer;
15
15
  }
@@ -27,7 +27,7 @@ import{j as t,c as Y,r as I,R as Be}from"./react.min.js";const p={colors:{primar
27
27
  list-style-type: none;
28
28
  padding: 10px;
29
29
  }
30
- `),t.jsxs("div",{className:"dropdown",children:[t.jsx("div",{onClick:a,"data-label":T(e.dataLabel),children:e.children}),e.actions&&e.actions.length>0&&t.jsx("ul",{onMouseLeave:r,children:e.actions.map(o=>t.jsx("li",{children:t.jsx(H,{data:o,style:{padding:0,whiteSpace:"normal"}})},Math.random()))})]})}return i()}function P({id:e,href:n,modal:a,imodal:r,children:i,onClick:o,dataLabel:s,style:d}){const c=n&&n.indexOf("/media/")<0?X(n):n;function u(h){c.indexOf("http")==0?document.location.href=c:(h.preventDefault(),a?Ee(c):r?ze(c):window.load(c))}function l(){return t.jsx("a",{id:e,onClick:o||u,href:c||"#","data-label":T(s),style:d,children:i})}return l()}function V(e){function n(){const r={display:"grid",gridGap:0,gridTemplateColumns:"repeat(auto-fit, minmax("+(e.width||200)+"px, 1fr))",alignItems:e.alignItems||"end"};return t.jsx("div",{style:r,children:e.children},Math.random())}return n()}function K(e){function n(){return e.data.url?t.jsx(Ve,{data:e.data}):t.jsx(Me,{data:e.data})}return n()}function Me(e){function n(){if(e.data.label)return t.jsxs(t.Fragment,{children:[t.jsx("strong",{children:e.data.label}),":",t.jsx("br",{})]})}function a(){return e.data.url&&e.data.url.indexOf("only=")<0?t.jsx(P,{href:e.data.url,children:t.jsxs(t.Fragment,{children:[G(e.data.value),t.jsx(C,{icon:"external-link",style:{marginLeft:10}})]})}):G(e.data.value)}function r(){const i={minWidth:e.width+"%",marginTop:5,marginBottom:5};return t.jsxs("div",{style:i,children:[n(),a()]})}return r()}function Ve(e){const n=Math.random(),[a,r]=I.useState(e.data);function i(s){O("GET",s,function(d){r(d)})}function o(){return window[n]=()=>i(e.data.url),t.jsx("div",{className:e.data.url&&"reloadable",id:n,children:t.jsx(Me,{data:a,width:100})})}return o()}function oe(e){function n(){return t.jsx("div",{style:{verticalAlign:"center",textAlign:"right",lineHeight:"3rem"},children:e.data.map(function(a){return t.jsx(H,{data:a,default:!0,compact:!(window.innerWidth>800)},Math.random())})})}return n()}function me(e){function n(){return e.data.map(function(a){if(Array.isArray(a))return t.jsx(V,{width:300,alignItems:"start",children:a.map(r=>t.jsx(K,{data:r,width:100/a.length},Math.random()))},Math.random());if(a.label!="ID"&&(e.exclude==null||a.label!=e.exclude))return t.jsx("div",{children:t.jsx(K,{data:a,width:100})},Math.random())})}return n()}function Xe(e){function n(){const o={marginTop:5,marginBottom:5};return t.jsx("h3",{style:o,children:e.data.title})}function a(){return t.jsx(me,{data:e.data.data})}function r(){return t.jsx(oe,{data:e.data.actions})}function i(){const o={border:"solid 1px #DDD",padding:10,borderStyle:"dashed"};return t.jsxs("div",{style:o,children:[n(),a(),r()]})}return i()}function $e(e){F(`
30
+ `),t.jsxs("div",{className:"dropdown",children:[t.jsx("div",{onClick:a,"data-label":T(e.dataLabel),children:e.children}),e.actions&&e.actions.length>0&&t.jsx("ul",{onMouseLeave:r,children:e.actions.map(o=>t.jsx("li",{children:t.jsx(H,{data:o,style:{padding:0,whiteSpace:"normal"}})},Math.random()))})]})}return i()}function P({id:e,href:n,modal:a,imodal:r,children:i,onClick:o,dataLabel:s,style:d}){const c=n&&n.indexOf("/media/")<0?X(n):n;function u(h){c.indexOf("http")==0?document.location.href=c:(h.preventDefault(),a?Ee(c):r?ze(c):window.load(c))}function l(){return t.jsx("a",{id:e,onClick:o||u,href:c||"#","data-label":T(s),style:d,children:i})}return l()}function V(e){function n(){const r={display:"grid",gridGap:0,gridTemplateColumns:"repeat(auto-fit, minmax("+(e.width||200)+"px, 1fr))",alignItems:e.alignItems||"end"};return t.jsx("div",{style:r,children:e.children},Math.random())}return n()}function ee(e){function n(){return e.data.url?t.jsx(Ve,{data:e.data}):t.jsx(Me,{data:e.data})}return n()}function Me(e){function n(){if(e.data.label)return t.jsxs(t.Fragment,{children:[t.jsx("strong",{children:e.data.label}),":",t.jsx("br",{})]})}function a(){return e.data.url&&e.data.url.indexOf("only=")<0?t.jsx(P,{href:e.data.url,children:t.jsxs(t.Fragment,{children:[G(e.data.value),t.jsx(C,{icon:"external-link",style:{marginLeft:10}})]})}):G(e.data.value)}function r(){const i={minWidth:e.width+"%",marginTop:5,marginBottom:5};return t.jsxs("div",{style:i,children:[n(),a()]})}return r()}function Ve(e){const n=Math.random(),[a,r]=I.useState(e.data);function i(s){R("GET",s,function(d){r(d)})}function o(){return window[n]=()=>i(e.data.url),t.jsx("div",{className:e.data.url&&"reloadable",id:n,children:t.jsx(Me,{data:a,width:100})})}return o()}function le(e){function n(){return t.jsx("div",{style:{verticalAlign:"center",textAlign:"right",lineHeight:"3rem"},children:e.data.map(function(a){return t.jsx(H,{data:a,default:!0,compact:!(window.innerWidth>800)},Math.random())})})}return n()}function fe(e){function n(){return e.data.map(function(a){if(Array.isArray(a))return t.jsx(V,{width:300,alignItems:"start",children:a.map(r=>t.jsx(ee,{data:r,width:100/a.length},Math.random()))},Math.random());if(a.label!="ID"&&(e.exclude==null||a.label!=e.exclude))return t.jsx("div",{children:t.jsx(ee,{data:a,width:100})},Math.random())})}return n()}function Xe(e){function n(){const o={marginTop:5,marginBottom:5};return t.jsx("h3",{style:o,children:e.data.title})}function a(){return t.jsx(fe,{data:e.data.data})}function r(){return t.jsx(le,{data:e.data.actions})}function i(){const o={border:"solid 1px #DDD",padding:10,borderStyle:"dashed"};return t.jsxs("div",{style:o,children:[n(),a(),r()]})}return i()}function $e(e){F(`
31
31
  .cards{
32
32
  padding: 10px;
33
33
  box-shadow: 0 1px 6px rgba( 0, 0, 0 , 0.16 );
@@ -45,11 +45,11 @@ import{j as t,c as Y,r as I,R as Be}from"./react.min.js";const p={colors:{primar
45
45
  height: 150px !important;
46
46
  object-fit: cover;
47
47
  }
48
- `);function n(){return t.jsx("h3",{children:e.data.title})}function a(){return t.jsx(me,{data:e.data.data})}function r(){return t.jsx(oe,{data:e.data.actions})}function i(){return t.jsxs("div",{className:"cards",children:[n(),a(),r()]})}return i()}function Je(e){function n(){const s={paddingTop:15,marginBottom:10,color:"#1151b3"};return t.jsx("div",{style:s,children:t.jsx("strong",{children:e.data.title})})}function a(){return t.jsx(me,{data:e.data.data,exclude:e.data.data[1].label})}function r(){const s={position:"absolute",width:140,marginLeft:-128,display:"flex",justifyContent:"space-between",marginTop:10,alignItems:"flex-end"},d={maxWidth:100},c={width:20,height:20,border:"3px solid #1151b3",backgroundColor:"white",borderRadius:"50%"};return t.jsxs("div",{style:s,children:[t.jsx("div",{className:"bold",style:d,children:e.data.data[1].value}),t.jsx("div",{style:c})]})}function i(){return t.jsx(oe,{data:e.data.actions})}function o(){const s={borderBottom:"solid 1px #DDD",padding:0,borderBottomStyle:"dashed",marginLeft:140,borderLeft:"3px solid #1151b3",marginBottom:-10},d={marginLeft:20};return t.jsxs("div",{style:s,children:[r(),t.jsxs("div",{style:d,children:[n(),a(),i()]})]})}return o()}function Qe(e){const n=Math.random(),[a,r]=I.useState(e.data);F(`
48
+ `);function n(){return t.jsx("h3",{children:e.data.title})}function a(){return t.jsx(fe,{data:e.data.data})}function r(){return t.jsx(le,{data:e.data.actions})}function i(){return t.jsxs("div",{className:"cards",children:[n(),a(),r()]})}return i()}function Je(e){function n(){const s={paddingTop:15,marginBottom:10,color:"#1151b3"};return t.jsx("div",{style:s,children:t.jsx("strong",{children:e.data.title})})}function a(){return t.jsx(fe,{data:e.data.data,exclude:e.data.data[1].label})}function r(){const s={position:"absolute",width:140,marginLeft:-128,display:"flex",justifyContent:"space-between",marginTop:10,alignItems:"flex-end"},d={maxWidth:100},c={width:20,height:20,border:"3px solid #1151b3",backgroundColor:"white",borderRadius:"50%"};return t.jsxs("div",{style:s,children:[t.jsx("div",{className:"bold",style:d,children:e.data.data[1].value}),t.jsx("div",{style:c})]})}function i(){return t.jsx(le,{data:e.data.actions})}function o(){const s={borderBottom:"solid 1px #DDD",padding:0,borderBottomStyle:"dashed",marginLeft:140,borderLeft:"3px solid #1151b3",marginBottom:-10},d={marginLeft:20};return t.jsxs("div",{style:s,children:[r(),t.jsxs("div",{style:d,children:[n(),a(),i()]})]})}return o()}function Qe(e){const n=Math.random(),[a,r]=I.useState(e.data);F(`
49
49
  .object-fieldset{
50
50
  margin-top: 10px;
51
51
  }
52
- `);function i(){return t.jsx(Te,{data:a})}function o(){const u={backgroundColor:"white",padding:15,marginBottom:15};return t.jsx("div",{style:u,children:s()})}function s(){return Array.isArray(a.data)?a.data.length==0?t.jsx("div",{children:"Nenhum registro encontrado."}):a.data.map(function(u){return Array.isArray(u)?t.jsx(V,{width:300,children:u.map(l=>t.jsx(K,{data:l,width:100/u.length},Math.random()))},Math.random()):t.jsx("div",{children:t.jsx(K,{data:u,width:100})},Math.random())}):t.jsx(x,{data:a.data})}function d(u){O("GET",u,function(l){r(l)})}function c(){return e.data.url?(window[n]=()=>d(e.data.url),t.jsxs("div",{className:e.data.url?"reloadable object-fieldset":"object-fieldset",id:n,children:[i(),o()]})):t.jsxs("div",{className:"object-fieldset",children:[i(),o()]})}return c()}function Ze(e){const n=Math.random(),[a,r]=I.useState(e.data.actions);function i(){const d=e.data.url.indexOf("?")<0?"?":"&";return e.data.url+d+"only=actions"}function o(){O("GET",i(),function(d){r(d)})}function s(){return window[n]=()=>o(),t.jsx("div",{className:"reloadable",id:n,children:a.map(function(d){return t.jsx(H,{data:d,default:!0},Math.random())})})}return s()}function Ke(e){function n(){F(`
52
+ `);function i(){return t.jsx(Te,{data:a})}function o(){const u={backgroundColor:"white",padding:15,marginBottom:15};return t.jsx("div",{style:u,children:s()})}function s(){return Array.isArray(a.data)?a.data.length==0?t.jsx("div",{children:"Nenhum registro encontrado."}):a.data.map(function(u){return Array.isArray(u)?t.jsx(V,{width:300,children:u.map(l=>t.jsx(ee,{data:l,width:100/u.length},Math.random()))},Math.random()):t.jsx("div",{children:t.jsx(ee,{data:u,width:100})},Math.random())}):t.jsx(x,{data:a.data})}function d(u){R("GET",u,function(l){r(l)})}function c(){return e.data.url?(window[n]=()=>d(e.data.url),t.jsxs("div",{className:e.data.url?"reloadable object-fieldset":"object-fieldset",id:n,children:[i(),o()]})):t.jsxs("div",{className:"object-fieldset",children:[i(),o()]})}return c()}function Ze(e){const n=Math.random(),[a,r]=I.useState(e.data.actions);function i(){const d=e.data.url.indexOf("?")<0?"?":"&";return e.data.url+d+"only=actions"}function o(){R("GET",i(),function(d){r(d)})}function s(){return window[n]=()=>o(),t.jsx("div",{className:"reloadable",id:n,children:a.map(function(d){return t.jsx(H,{data:d,default:!0},Math.random())})})}return s()}function Ke(e){function n(){F(`
53
53
  .object-title {
54
54
  display: flex;
55
55
  justify-content: space-between;
@@ -78,7 +78,7 @@ import{j as t,c as Y,r as I,R as Be}from"./react.min.js";const p={colors:{primar
78
78
  scrollbar-width: none; /* Firefox */
79
79
  min-height: 2rem;
80
80
  }
81
- `);const[n,a]=I.useState(0);function r(){return t.jsx("div",{className:"noscroll",style:{display:"inline-block",textAlign:"center",width:"100%",margin:"auto",marginBottom:20,overflowX:"auto"},children:e.data.map(function(i,o){return t.jsx(P,{href:i.url,style:{padding:5,fontWeight:n==o?"bold":"normal",borderBottom:n==o?"solid 3px #2670e8":"solid 3px inherite",textDecoration:"none",color:"#0c326f",margin:15},onClick:function(s){s.preventDefault(),a(o),e.loadContent(i.url)},dataLabel:T(i.title),children:i.title},Math.random())})})}return r()}function at(e){var n=Math.random();const[a,r]=I.useState(e.data.data[0]);function i(){return e.data.title!="Top"&&t.jsx("h2",{"data-label":T(e.data.title),children:e.data.title})}function o(){return t.jsx(oe,{data:e.data.actions})}function s(){return t.jsx(nt,{data:e.data.data,loadContent:u})}function d(){var h={...a};h.title=null;const m={padding:0};return t.jsx("div",{style:m,children:t.jsx(x,{data:h},Math.random())})}function c(){const h={width:"50%",margin:"auto",border:"solid 0.5px #DDD",marginTop:30,marginBottom:30};return t.jsx("div",{style:h})}function u(h){O("GET",h,function(m){r(m)})}function l(){return window[n]=()=>u(a.url),e.data.data.length>0&&t.jsxs("div",{className:"reloadable",id:n,children:[i(),o(),s(),d(),c()]})}return l()}function rt(){document.querySelectorAll(".reloadable").forEach(function(e){window[e.id]()})}function W({id:e,onClick:n,icon:a,label:r,display:i,primary:o,compact:s,spin:d}){function c(){return a?s||!r?t.jsx(C,{icon:a}):t.jsxs(t.Fragment,{children:[t.jsx(Re,{style:{marginRight:10,display:"none"}}),t.jsx(C,{icon:a,style:{marginRight:10}}),r||""]}):r}function u(){F(`
81
+ `);const[n,a]=I.useState(0);function r(){return t.jsx("div",{className:"noscroll",style:{display:"inline-block",textAlign:"center",width:"100%",margin:"auto",marginBottom:20,overflowX:"auto"},children:e.data.map(function(i,o){return t.jsx(P,{href:i.url,style:{padding:5,fontWeight:n==o?"bold":"normal",borderBottom:n==o?"solid 3px #2670e8":"solid 3px inherite",textDecoration:"none",color:"#0c326f",margin:15},onClick:function(s){s.preventDefault(),a(o),e.loadContent(i.url)},dataLabel:T(i.title),children:i.title},Math.random())})})}return r()}function at(e){var n=Math.random();const[a,r]=I.useState(e.data.data[0]);function i(){return e.data.title!="Top"&&t.jsx("h2",{"data-label":T(e.data.title),children:e.data.title})}function o(){return t.jsx(le,{data:e.data.actions})}function s(){return t.jsx(nt,{data:e.data.data,loadContent:u})}function d(){var h={...a};h.title=null;const m={padding:0};return t.jsx("div",{style:m,children:t.jsx(x,{data:h},Math.random())})}function c(){const h={width:"50%",margin:"auto",border:"solid 0.5px #DDD",marginTop:30,marginBottom:30};return t.jsx("div",{style:h})}function u(h){R("GET",h,function(m){r(m)})}function l(){return window[n]=()=>u(a.url),e.data.data.length>0&&t.jsxs("div",{className:"reloadable",id:n,children:[i(),o(),s(),d(),c()]})}return l()}function rt(){document.querySelectorAll(".reloadable").forEach(function(e){window[e.id]()})}function W({id:e,onClick:n,icon:a,label:r,display:i,primary:o,compact:s,spin:d}){function c(){return a?s||!r?t.jsx(C,{icon:a}):t.jsxs(t.Fragment,{children:[t.jsx(Re,{style:{marginRight:10,display:"none"}}),t.jsx(C,{icon:a,style:{marginRight:10}}),r||""]}):r}function u(){F(`
82
82
  .button{
83
83
  padding: 12px;
84
84
  text-decoration: none;
@@ -104,7 +104,7 @@ import{j as t,c as Y,r as I,R as Be}from"./react.min.js";const p={colors:{primar
104
104
  .scheduler .hidden{
105
105
  display: none;
106
106
  }
107
- `);function y(g){const N=document.getElementsByName(e.data.input_name)[0].closest("form"),R=N?Q(e.data.url,N,e.data.input_name)+"&week="+(g||m):e.data.url+"?week="+(g||m);O("GET",R,function(L){console.log(L),h(L)})}function j(){m>1&&(y(m-1),w(m-1))}function q(){y(m+1),w(m+1)}I.useEffect(()=>{document.getElementById(n).querySelector(".input-periodo-2").checked=!0,document.getElementById(n).querySelector(".input-periodo-3").checked=!0,window["reload-"+e.data.input_name+"-field"]=y},[]);function k(g,N){return l.readonly?g==null?r:i:g==null?l.selectable==null?r:l.selectable.indexOf(N)>=0?s:r:g.text==null?i:o}function B(g){a=!0}function D(g){a=!1,document.getElementById("input"+n).value=JSON.stringify({select:d,deselect:c})}function v(g){if(!l.readonly&&!(e.data.single_selection&&S().length>0&&g.target.style.backgroundColor!=i)&&a&&g.target.tagName!="I"&&g.target.style.backgroundColor!=o){const N=g.target.dataset.day.split("/"),R=g.target.dataset.time.split(":"),L=g.target.dataset.day+" "+g.target.dataset.time;if(new Date(parseInt(N[2],10),parseInt(N[1],10)-1,parseInt(N[0],10),parseInt(R[0],10),parseInt(R[1],10))>new Date||e.data.weekly){if(e.data.single_selection){for(;c.length>0;)c.pop();for(;d.length>0;)d.pop()}(g.target.style.backgroundColor==r||g.target.style.backgroundColor==s)&&(l.selectable==null||l.selectable.indexOf(L)>=0)?(g.target.style.backgroundColor=i,console.log("MARCOU",g.target.dataset.day,g.target.dataset.time),d.push([g.target.dataset.day,g.target.dataset.time])):(l.selectable==null?g.target.style.backgroundColor=r:g.target.style.backgroundColor=l.selectable.indexOf(L)>=0?s:r,console.log("DEMARCOU",g.target.dataset.day,g.target.dataset.time),c.push([g.target.dataset.day,g.target.dataset.time]))}}}function E(g){const N=g.split("/");return u[new Date(parseInt(N[2],10),parseInt(N[1],10)-1,parseInt(N[0],10)).getDay()]}function S(){const g=[];return document.getElementById(n).querySelectorAll("td").forEach(function(N){N.style.backgroundColor==i&&g.push(N.dataset.day,N.dataset.time)}),g}function f(g){if(g=parseInt(g.split(":")[0]),g>=0&&g<6)return 1;if(g>=6&&g<12)return 2;if(g>=12&&g<18)return 3;if(g>=18&&g<24)return 4}function b(g){const N=f(g);var R="period-"+N;return _(N)||(R+=" hidden"),R}function M(g,N){document.getElementById(n).querySelectorAll(".period-"+g).forEach(function(R){R.style.display=N?"table-row":"none"})}function _(g){return g==2||g==3}function A(){const g={overflowX:"auto"},N={width:"100%",borderSpacing:0,borderCollapse:"collapse",marginTop:15,marginBottom:15},R={border:"solid 4px white",userSelect:"none"};return t.jsxs("div",{id:n,style:g,className:"scheduler",children:[e.data.title&&t.jsx("h2",{children:e.data.title}),t.jsx("input",{id:"input"+n,type:"hidden",name:e.data.input_name}),t.jsx("table",{style:{width:"100%"},children:t.jsx("tbody",{children:t.jsxs("tr",{children:[e.data.url&&t.jsx("td",{align:"left",width:10,children:t.jsx(W,{primary:!0,icon:"chevron-left",onClick:()=>j()})}),t.jsx("td",{align:"center",children:t.jsxs("div",{className:"periods",children:[t.jsx("input",{className:"input-periodo-1",type:"checkbox","data-label":"madrugada",onChange:L=>M(1,L.target.checked)})," ",t.jsx("span",{children:"Madrugada"}),t.jsx("input",{className:"input-periodo-2",type:"checkbox","data-label":"manha",onChange:L=>M(2,L.target.checked)})," ",t.jsx("span",{children:"Manhã"}),t.jsx("input",{className:"input-periodo-3",type:"checkbox","data-label":"tarde",onChange:L=>M(3,L.target.checked)})," ",t.jsx("span",{children:"Tarde"}),t.jsx("input",{className:"input-periodo-4",type:"checkbox","data-label":"noite",onChange:L=>M(4,L.target.checked)})," ",t.jsx("span",{children:"Noite"})]})}),e.data.url&&t.jsx("td",{align:"right",width:10,children:t.jsx(W,{primary:!0,icon:"chevron-right",onClick:()=>q()})})]})})}),t.jsxs("table",{style:N,onMouseDown:B,onMouseUp:D,children:[t.jsx("thead",{children:t.jsx("tr",{children:l.matrix[0].map(function(L){return t.jsxs("th",{className:"bold",style:R,children:[E(L.text),!e.data.weekly&&t.jsx("br",{}),!e.data.weekly&&L.text]},Math.random())})})}),t.jsx("tbody",{children:l.matrix.map(function(L,ye){if(ye>0)return t.jsx("tr",{className:b(L[0].text),children:L.map(function(J,de){if(de==0)return t.jsx("th",{className:"bold",align:"center",style:R,children:J.text},Math.random());{const ve=l.matrix[0][de].text+" "+L[0].text,qe={backgroundColor:k(J,ve),border:"solid 4px white",cursor:"pointer"};return t.jsx("td",{align:"center",style:qe,onMouseDown:v,onMouseLeave:v,onMouseUp:v,"data-day":l.matrix[0][de].text,"data-time":L[0].text,"data-label":ve,children:J&&J.text&&t.jsx(wt,{text:J.text,children:t.jsx(C,{icon:J.icon||"x",style:{color:"white",cursor:"help"}})})},Math.random())}})},Math.random())})})]})]})}return A()}function wt(e){function n(){return F(`
107
+ `);function y(g){const N=document.getElementsByName(e.data.input_name)[0].closest("form");var O=N?Q(e.data.url,N,e.data.input_name):e.data.url,L=O.indexOf("?")>0?"&":"?";O=O+L+"week="+(g||m),R("GET",O,function(Z){console.log(Z),h(Z)})}function j(){m>1&&(y(m-1),w(m-1))}function q(){y(m+1),w(m+1)}I.useEffect(()=>{document.getElementById(n).querySelector(".input-periodo-2").checked=!0,document.getElementById(n).querySelector(".input-periodo-3").checked=!0,window["reload-"+e.data.input_name+"-field"]=y},[]);function k(g,N){return l.readonly?g==null?r:i:g==null?l.selectable==null?r:l.selectable.indexOf(N)>=0?s:r:g.text==null?i:o}function B(g){a=!0}function D(g){a=!1,document.getElementById("input"+n).value=JSON.stringify({select:d,deselect:c})}function v(g){if(!l.readonly&&!(e.data.single_selection&&S().length>0&&g.target.style.backgroundColor!=i)&&a&&g.target.tagName!="I"&&g.target.style.backgroundColor!=o){const N=g.target.dataset.day.split("/"),O=g.target.dataset.time.split(":"),L=g.target.dataset.day+" "+g.target.dataset.time;if(new Date(parseInt(N[2],10),parseInt(N[1],10)-1,parseInt(N[0],10),parseInt(O[0],10),parseInt(O[1],10))>new Date||e.data.weekly){if(e.data.single_selection){for(;c.length>0;)c.pop();for(;d.length>0;)d.pop()}(g.target.style.backgroundColor==r||g.target.style.backgroundColor==s)&&(l.selectable==null||l.selectable.indexOf(L)>=0)?(g.target.style.backgroundColor=i,console.log("MARCOU",g.target.dataset.day,g.target.dataset.time),d.push([g.target.dataset.day,g.target.dataset.time])):(l.selectable==null?g.target.style.backgroundColor=r:g.target.style.backgroundColor=l.selectable.indexOf(L)>=0?s:r,console.log("DEMARCOU",g.target.dataset.day,g.target.dataset.time),c.push([g.target.dataset.day,g.target.dataset.time]))}}}function E(g){const N=g.split("/");return u[new Date(parseInt(N[2],10),parseInt(N[1],10)-1,parseInt(N[0],10)).getDay()]}function S(){const g=[];return document.getElementById(n).querySelectorAll("td").forEach(function(N){N.style.backgroundColor==i&&g.push(N.dataset.day,N.dataset.time)}),g}function f(g){if(g=parseInt(g.split(":")[0]),g>=0&&g<6)return 1;if(g>=6&&g<12)return 2;if(g>=12&&g<18)return 3;if(g>=18&&g<24)return 4}function b(g){const N=f(g);var O="period-"+N;return _(N)||(O+=" hidden"),O}function M(g,N){document.getElementById(n).querySelectorAll(".period-"+g).forEach(function(O){O.style.display=N?"table-row":"none"})}function _(g){return g==2||g==3}function A(){const g={overflowX:"auto"},N={width:"100%",borderSpacing:0,borderCollapse:"collapse",marginTop:15,marginBottom:15},O={border:"solid 4px white",userSelect:"none"};return t.jsxs("div",{id:n,style:g,className:"scheduler",children:[e.data.title&&t.jsx("h2",{children:e.data.title}),t.jsx("input",{id:"input"+n,type:"hidden",name:e.data.input_name}),t.jsx("table",{style:{width:"100%"},children:t.jsx("tbody",{children:t.jsxs("tr",{children:[e.data.url&&m>1&&t.jsx("td",{align:"left",width:10,children:t.jsx(W,{primary:!0,icon:"chevron-left",onClick:()=>j()})}),t.jsx("td",{align:"center",children:t.jsxs("div",{className:"periods",children:[t.jsx("input",{className:"input-periodo-1",type:"checkbox","data-label":"madrugada",onChange:L=>M(1,L.target.checked)})," ",t.jsx("span",{children:"Madrugada"}),t.jsx("input",{className:"input-periodo-2",type:"checkbox","data-label":"manha",onChange:L=>M(2,L.target.checked)})," ",t.jsx("span",{children:"Manhã"}),t.jsx("input",{className:"input-periodo-3",type:"checkbox","data-label":"tarde",onChange:L=>M(3,L.target.checked)})," ",t.jsx("span",{children:"Tarde"}),t.jsx("input",{className:"input-periodo-4",type:"checkbox","data-label":"noite",onChange:L=>M(4,L.target.checked)})," ",t.jsx("span",{children:"Noite"})]})}),e.data.url&&t.jsx("td",{align:"right",width:10,children:t.jsx(W,{primary:!0,icon:"chevron-right",onClick:()=>q()})})]})})}),t.jsxs("table",{style:N,onMouseDown:B,onMouseUp:D,children:[t.jsx("thead",{children:t.jsx("tr",{children:l.matrix[0].map(function(L){return t.jsxs("th",{className:"bold",style:O,children:[E(L.text),!e.data.weekly&&t.jsx("br",{}),!e.data.weekly&&L.text]},Math.random())})})}),t.jsx("tbody",{children:l.matrix.map(function(L,Z){if(Z>0)return t.jsx("tr",{className:b(L[0].text),children:L.map(function(J,se){if(se==0)return t.jsx("th",{className:"bold",align:"center",style:O,children:J.text},Math.random());{const ve=l.matrix[0][se].text+" "+L[0].text,qe={backgroundColor:k(J,ve),border:"solid 4px white",cursor:"pointer"};return t.jsx("td",{align:"center",style:qe,onMouseDown:v,onMouseLeave:v,onMouseUp:v,"data-day":l.matrix[0][se].text,"data-time":L[0].text,"data-label":ve,children:J&&J.text&&t.jsx(wt,{text:J.text,children:t.jsx(C,{icon:J.icon||"x",style:{color:"white",cursor:"help"}})})},Math.random())}})},Math.random())})})]})]})}return A()}function wt(e){function n(){return F(`
108
108
  .tooltip {
109
109
  position: relative;
110
110
  display: inline-block;
@@ -127,7 +127,7 @@ import{j as t,c as Y,r as I,R as Be}from"./react.min.js";const p={colors:{primar
127
127
  .tooltip:hover .tooltiptext {
128
128
  visibility: visible;
129
129
  }
130
- `),t.jsxs("div",{className:"tooltip",children:[e.children,t.jsx("div",{className:"tooltiptext",children:G(e.text)})]})}return n()}const pt=["text","password","email","number","date","datetime-local","file","image","range","search","tel","time","url","week","hidden","color"],ee={padding:15,border:"solid 1px #d9d9d9",borderRadius:5,backgroundColor:"white"};function jt(e,n){const a=new FormData(e);for(let[r,i]of Array.from(a.entries())){const o=e[r];n!=r&&(o.tagName=="SELECT"&&i!==""||o.tagName==null&&i!==""||o.type=="radio"&&i!==""||o.type=="checkbox"&&i!==""||a.delete(r))}return new URLSearchParams(a).toString()}function Q(e,n,a){const r=e.indexOf("?")<0?"?":"&",i=jt(n,a);return e=e+(i?r+i:""),e}function se(e){if(e){const a=[".png",".jpeg",".jpeg",".gif"];for(var n=0;n<a.length;n++)if(e.toLowerCase().indexOf(a[n])>0)return!0}}function te(e,n){O("GET",Q(n,e.closest("form"),e.name),De)}function kt(e){if(e){var n=document.querySelector(".form-fieldset."+e);n&&(n.style.display="none");var a=document.querySelector(".form-group."+e);a&&(a.style.display="none")}}function St(e){if(e){var n=document.querySelector(".form-fieldset."+e);n&&(n.style.display="block");var a=document.querySelector(".form-group."+e);a&&(a.style.display="block")}}function Ct(e){const n="reload-"+e+"-field";window[n]&&window[n]()}function Et(e,n){var a=document.querySelector(".form-group."+e),r=a.querySelector('*[name="'+e+'"]');if(r.tagName=="INPUT")r.value=n;else if(r.tagName=="SELECT"){if(r.style.display!="none")r.dispatchEvent(new CustomEvent("customchange",{detail:{value:n}}));else for(var i=0;i<r.options.length;i++)if(r.options[i].value==n){r.selectedIndex=i;break}}}function De(e){if(e){for(var n=0;n<e.hide.length;n++)kt(e.hide[n]);for(var n=0;n<e.show.length;n++)St(e.show[n]);for(var n=0;n<e.reload.length;n++)Ct(e.reload[n]);for(var a in e.set)Et(a,e.set[a])}}function Mt(e){function n(){const a={color:p.colors.info,backgroundColor:p.background.info,padding:20,display:"flex",justifyContent:"space-between",marginTop:10,marginBottom:10};return t.jsxs("div",{style:a,children:[t.jsxs("div",{children:[t.jsx(C,{icon:"circle-check",style:{color:p.colors.info,marginRight:20}}),e.data.text]}),e.children&&t.jsx("div",{children:e.children})]})}return n()}function Tt(e){function n(){const a={color:"white",display:"none",backgroundColor:"#e52207",marginTop:2,marginBottom:2,padding:8};return t.jsxs("div",{style:a,id:e.id,className:"error",children:[t.jsx(C,{icon:"xmark-circle",style:{marginRight:5}}),t.jsx("span",{})]})}return n()}function It(e){function n(){const a={marginTop:2,marginBottom:2,fontStyle:"italic"};return t.jsx("div",{style:a,children:t.jsx("span",{children:e.text})})}return n()}function re(e){const n=e.data.name+Math.random();function a(){const d={display:"flex",justifyContent:"space-between",alignItems:"baseline"};return e.data.action&&(e.data.action.icon=null,e.data.action.modal=!0,e.data.action.urlfunc=function(){return Q(e.data.action.url,document.getElementById(n).closest("form"))}),t.jsxs("div",{style:d,children:[t.jsxs("label",{className:"bold",children:[e.data.label," ",e.data.label&&e.data.required?"*":""]}),e.data.action&&t.jsx(H,{data:e.data.action,style:{padding:0,margin:0}})]})}function r(){return e.data.type=="datetime"&&(e.data.type="datetime-local"),pt.indexOf(e.data.type)>=0?t.jsx(pe,{data:e.data}):e.data.type=="choice"&&Array.isArray(e.data.choices)?e.data.pick?Array.isArray(e.data.value)?t.jsx(je,{data:e.data}):t.jsx(ce,{data:e.data}):t.jsx(Lt,{data:e.data}):e.data.type=="choice"?e.data.pick?Array.isArray(e.data.value)?t.jsx(je,{data:e.data}):t.jsx(ce,{data:e.data}):t.jsx(Le,{data:e.data}):e.data.type=="decimal"?t.jsx(pe,{data:e.data}):e.data.type=="boolean"?t.jsx(Dt,{data:e.data}):e.data.type=="textarea"?t.jsx(Nt,{data:e.data}):e.data.type=="scheduler"?(e.data.scheduler.input_name=e.data.name,t.jsx(Ne,{data:e.data.scheduler})):t.jsx("span",{children:e.data.name})}function i(){return t.jsx("div",{children:t.jsx(Tt,{id:e.data.name+"_error"})})}function o(){return e.data.help_text&&t.jsx(It,{text:e.data.help_text})}function s(){const d={display:e.data.type=="hidden"?"none":"flex",flexDirection:"column",padding:5,width:"calc(100%-5px)"};return t.jsxs("div",{id:n,style:d,children:[a(),r(),o(),i()]})}return s()}function pe(e){var n="";const a=e.data.name+Math.random();e.data.mask=="decimal"&&(n="decimal",e.data.value&&(e.data.value=Math.round(parseFloat(e.data.value)).toFixed(2).replace(".",","))),I.useEffect(()=>{function s(u,l,h){var m=h.target,w=m.value.replace(/\D/g,""),y=m.value.length>l?1:0;VMasker(m).unMask(),VMasker(m).maskPattern(u[y]),m.value=VMasker.toPattern(w,u[y])}if(e.data.mask){var d=document.getElementById(a);if(e.data.mask=="decimal")VMasker(d).maskMoney({precision:2,separator:",",delimiter:"."});else if(e.data.mask.indexOf("|")>0){var c=e.data.mask.split("|");VMasker(d).maskPattern(c[0]),d.addEventListener("input",s.bind(void 0,c,14),!1)}else VMasker(d).maskPattern(e.data.mask)}},[]);function r(s){te(s.target,e.data.onchange)}function i(s){if(e.data.type=="file"&&s.target.files){let c=s.target.files[0];var d=new FileReader;d.onload=function(u){if(se(c.name)){const w="display"+a;var l=document.createElement("img");l.id=s.target.id+"img",l.style.width="200px",l.style.display="block",l.style.margin="auto",l.style.marginTop="20px",l.onload=function(y){const j=e.data.width>e.data.height?e.data.width/l.width:e.data.height/l.height;var q=document.createElement("canvas");const k=q.getContext("2d");q.height=q.width*(l.height/l.width);const B=document.createElement("canvas"),D=B.getContext("2d");B.width=l.width*j,B.height=l.height*j,D.drawImage(l,0,0,B.width,B.height),k.drawImage(B,0,0,B.width*j,B.height*j,0,0,q.width,q.height),B.toBlob(function(E){const S=new DataTransfer;S.items.add(new File([E],c.name)),s.target.files=S.files});var v=document.getElementById(w);v==null?(v=document.createElement("div"),v.id=w):v.removeChild(v.childNodes[0]),v.appendChild(l),s.target.parentNode.appendChild(v)},l.src=u.target.result}const h=document.getElementById("fileinfo"+a);var m=c.size/1024;m<1024?m=parseInt(m)+" Kb":m=(m/1024).toFixed(2)+" Mb",h.innerHTML=c.name+" / "+m,e.data.max_size&&c.size/1024/1024>e.data.max_size&&alert("O limite de tamanho é "+e.data.max_size+"Mb. O arquivo informado possui "+m+". Por favor, adicione um arquivo menor.")},d.readAsDataURL(c)}}function o(){var s=e.data.type;if(s=="datetime"&&(s="datetime-regional"),s=="decimal"&&(s="text"),s=="file"){const u={alignContent:"center",minHeight:75,padding:5,maxWidth:"100%",margin:"auto"};var d=null;return e.data.extensions&&e.data.extensions.length>0&&(d=e.data.extensions.map(l=>"."+l).join(", ")),t.jsxs(t.Fragment,{children:[t.jsxs("div",{style:{display:window.innerWidth<800?"block":"flex",justifyContent:"space-between",backgroundColor:"rgba(15, 145, 210, 0.05)",border:"1px dashed rgba(15, 145, 210, 0.4)",borderRadius:10,textAlign:"center"},children:[t.jsx("div",{style:u,children:t.jsx(C,{icon:"cloud-upload",style:{fontSize:"2.5rem",color:p.colors.primary}})}),t.jsxs("div",{style:u,children:[e.data.value&&se(e.data.value)&&t.jsx("div",{style:{textAlign:"center"},children:t.jsx("img",{src:e.data.value,height:50})}),e.data.value&&!se(e.data.value)&&t.jsx("div",{style:{textAlign:"center"},children:e.data.value}),"Selecione um arquivo clicando no botão ao lado.",t.jsxs("div",{className:"bold",id:"fileinfo"+a,children:["O arquivo",e.data.max_size&&"deve possuir até "+e.data.max_size+" Mb e ","deve ter extensão"," ",e.data.extensions.map(l=>"."+l).join(" ou "),"."]})]}),t.jsx("div",{style:u,align:"center",children:t.jsx(W,{label:"Selecionar Arquivo",onClick:()=>document.getElementById(a).click()})})]}),t.jsx("input",{className:"form-control "+n,type:s,name:e.data.name,id:a,"data-label":T(e.data.label),readOnly:e.data.read_only,onBlur:e.data.onchange?r:null,onChange:i,style:{zIndex:"-1",marginTop:-20},accept:d})]})}else{var c=ee;return s=="color"&&(c={...ee},c.width="100%",c.backgroundColor="white",c.height=47.5),t.jsx("input",{className:"form-control "+n,type:s,name:e.data.name,id:a,defaultValue:e.data.value,"data-label":T(e.data.label),readOnly:e.data.read_only,onBlur:e.data.onchange?r:null,onChange:i,style:c})}}return o()}function Le(e){var n=[];Array.isArray(e.data.value)?e.data.value.forEach(function(v,E){n.push({id:v.id,value:v.label})}):e.data.value!=null&&n.push({id:e.data.value.id,value:e.data.value.label}),e.data.id==null&&(e.data.id=Math.random()),e.data.id2==null&&(e.data.id2=e.data.id+"__autocomplete");const a=e.data.id,r=e.data.id2,i=Array.isArray(e.data.value),[o,s]=I.useState(!1),[d,c]=I.useState(null);var u=!1;let l;I.useEffect(()=>{k(n,!0),document.getElementById(a).addEventListener("customchange",function(v){k(v.detail.value);const E=document.getElementById(e.data.name);E&&reactTriggerChange(E)})},[]);function h(){const v=document.getElementById(a);if(i){const E={padding:5,display:"inline"},S={cursor:"pointer",marginRight:5},f={fontSize:"0.8rem"};return t.jsxs("div",{children:[v==null&&n.map((b,M)=>t.jsxs("div",{style:E,children:[t.jsx("span",{onClick:()=>B(M),style:S,children:t.jsx(C,{icon:"trash-can",style:f})}),b.value]},Math.random())),v!=null&&Array.from(v.options).map((b,M)=>t.jsxs("div",{style:E,children:[t.jsx("span",{onClick:()=>B(M),style:S,children:t.jsx(C,{icon:"trash-can",style:f})}),b.innerHTML]},Math.random()))]})}}function m(){return t.jsx("select",{id:a,name:e.data.name,multiple:i,readOnly:!0,style:{display:"contents"}})}function w(){const v={...ee,...e.style||{}},E={padding:0,margin:0,border:"solid 1px #d9d9d9",marginTop:-1,borderRadius:5,maxHeight:150,overflowY:"auto",zIndex:99999};E.position="absolute",E.backgroundColor="white";const S=document.getElementById(r);if(e.data.icon&&(v.paddingLeft=30),S){let A=null,g=S,N=null;for(;!N&&(g=g.parentElement)instanceof HTMLElement;)g.matches("dialog")&&(N=g);A=N;const R=S.getBoundingClientRect();var f=R.top+R.height,b=R.left;if(A){const L=A.getBoundingClientRect();f=f-L.top,b=b-L.left}else f+=window.scrollY,b+=window.scrollX;E.width=R.width,E.top=f,E.left=b}const M={cursor:"pointer",padding:10},_=!i&&n.length>0&&n[0].value||"";return t.jsxs(t.Fragment,{children:[e.data.icon&&t.jsx(C,{icon:e.data.icon,style:{position:"absolute",margin:13,color:"#d9d9d9"}}),t.jsx("input",{id:r,name:e.data.name+"__autocomplete",type:"text",className:"form-control",onFocus:A=>{A.target.select(),q(A)},onChange:q,onMouseLeave:y,onBlur:y,defaultValue:_,style:v,"data-label":T(e.data.label)}),d&&o&&t.jsxs("ul",{style:E,onMouseLeave:j,onMouseEnter:function(A){u=!0},children:[d.length==0&&t.jsx("li",{style:M,children:"Nenhuma opção encontrada."}),d.map(A=>t.jsx("li",{onClick:()=>{s(!1),e.onSelect?e.onSelect(A):k(A)},style:M,className:"autocomplete-item","data-label":T(A.value),children:A.value},Math.random()))]})]})}function y(v){u=!1,setTimeout(function(){u||j(v)},250)}function j(v){const E=document.getElementById(a);if(E){const S=document.getElementById(r);i||E.options.length>0&&S.value!=E.options[0].innerHTML&&(E.innerHTML="",S.value="",s(!1),e.data.onchange&&te(S,e.data.onchange)),v.target.tagName=="UL"?s(!1):u||s(!1)}}function q(v){clearTimeout(l),l=setTimeout(function(){const E=v.target.closest("form"),S=e.data.choices.indexOf("?")<0?"?":"&";s(!0),O("GET",Q(e.data.choices+S+"term="+v.target.value,E),function(b){c(b)})},1e3)}function k(v,E=!1){const S=document.getElementById(a),f=document.getElementById(r);S.innerHTML==null&&(S.innerHTML=""),Array.isArray(v)?S.innerHTML=v.map(b=>`<option selected value="${b.id}">${b.value}</option>`).join(""):v?i?(S.innerHTML+=`<option selected value="${v.id}">${v.value}</option>`,f.value=""):(S.innerHTML=`<option selected value="${v.id}">${v.value}</option>`,f.value=v.value):(S.innerHTML="",f.value=""),e.data.onchange&&!E&&te(f,e.data.onchange)}function B(v){const E=document.getElementById(a);var S=Array.from(E.options);E.innerHTML=S.slice(0,v).concat(S.slice(v+1)).map(f=>`<option selected value="${f.value}">${f.innerHTML}</option>`).join(""),c([])}function D(){return t.jsxs(t.Fragment,{children:[h(),m(),w()]})}return D()}function Nt(e){function n(){var a={...ee};return a.height=100,t.jsx("textarea",{id:e.data.name,name:e.data.name,"data-label":T(e.data.label),style:a,defaultValue:e.data.value||"",className:"form-control"})}return n()}function Dt(e){var n=e.data;return n.choices=[{id:!0,value:"Sim"},{id:!1,value:"Não"}],t.jsx(ce,{data:n})}function ce(e){const[n,a]=I.useState(e.data.choices);var r=Math.random(),i=e.data;function o(u){return i.value!=null?i.value==u.id?!0:i.value.id==u.id:!1}function s(u){var l=document.getElementById(u);i.checked&&(l.checked=!1),e.data.onchange&&te(l,e.data.onchange)}function d(u){var l=document.getElementById(u);i.checked=l.checked}function c(){return window["reload-"+i.name+"-field"]=function(){O("GET",Q(e.data.pick,document.querySelector(".radio-group."+i.name).closest("form")),function(l){a(l)})},n.length>0?t.jsx("div",{className:"radio-group "+i.name,children:n.map((u,l)=>(u.id||u.id===!1)&&t.jsxs("div",{style:{paddingTop:10,display:"inline-block",marginRight:25,width:window.innerWidth>800?"auto":"100%"},children:[t.jsx("input",{id:i.name+r+l,type:"radio",name:i.name,defaultValue:u.id,defaultChecked:o(u),"data-label":T(u.value),onClick:function(){s(i.name+r+l)},onMouseEnter:function(){d(i.name+r+l)}}),t.jsx("label",{htmlFor:i.name+r+l,children:u.value})]},r+l))}):t.jsx("div",{className:"radio-group empty "+i.name,children:t.jsx(ne,{data:{text:"Nenhuma opção disponível para seleção."}})})}return c()}function je(e){const[n,a]=I.useState(e.data.choices);var r=Math.random(),i=e.data;function o(c){var u=!1;if(i.value)for(var l=0;l<i.value.length;l++){var h=i.value[l];(h==c.id||h.id==c.id)&&(u=!0)}return u}function s(c){e.data.onchange&&te(c.target,e.data.onchange)}function d(){return window["reload-"+i.name+"-field"]=function(){O("GET",Q(e.data.pick,document.querySelector(".checkbox-group."+i.name).closest("form")),function(u){a(u)})},n.length>0?t.jsx("div",{className:"checkbox-group "+i.name,children:n.map((c,u)=>(c.id||c.id===!1)&&t.jsxs("div",{style:{paddingTop:10,display:"inline-block",marginRight:25,width:window.innerWidth>800?"auto":"100%"},children:[t.jsx("input",{id:i.name+r+u,type:"checkbox",name:i.name,onClick:s,defaultValue:c.id,defaultChecked:o(c),"data-label":T(c.value)}),t.jsx("label",{htmlFor:i.name+r+u,children:c.value})]},r+u))}):t.jsx("div",{className:"checkbox-group empty "+i.name,children:t.jsx(ne,{data:{text:"Nenhuma opção disponível para seleção."}})})}return d()}function Lt(e){var n=e.data;return t.jsx(t.Fragment,{children:t.jsx("select",{className:"form-control",id:n.name,name:n.name,"data-label":T(n.label),defaultValue:n.value,style:ee,children:n.choices.map(a=>t.jsx("option",{value:a.id,children:a.value},Math.random()))})})}function qt(e){const n=Math.random(),a=e.data.value[0],r=a.fields?a.fields[0]:a.fieldsets[0].fields[0][0];function i(){return!e.data.required&&t.jsx("div",{id:"info-"+n,children:t.jsxs(ne,{data:{text:"Esta informação é opcional. Controle seu preenchimento com o botão ao lado."},children:[t.jsx(W,{primary:!0,icon:"pen-clip",onClick:()=>o(!0),id:"show-"+n,display:r.value?"none":"inline"}),t.jsx(W,{primary:!0,icon:"trash",onClick:()=>o(!1),id:"hide-"+n,display:r.value?"inline":"none"})]})})}function o(c){const u=document.querySelector("input[name="+r.name+"]"),l=document.getElementById("inline-form-"+n),h=document.getElementById("show-"+n),m=document.getElementById("hide-"+n);l.style.display=c?"block":"none",h.style.display=c?"none":"inline",m.style.display=c?"inline":"none",c?u.value===""?u.value=0:u.value=-parseInt(u.value):parseInt(u.value)==0?u.value="":u.value=-parseInt(u.value)}function s(){const c={display:r.value?"block":"none"};return e.data.required&&(c.display="block",r.value===""&&(r.value=0)),t.jsx("div",{className:"fieldset-inline-forms",style:c,id:"inline-form-"+n,children:e.data.value.map(function(u){return t.jsx(fe,{data:u},Math.random())})})}function d(){const c={margin:0};return t.jsxs("div",{className:"form-fieldset",children:[t.jsx("h2",{style:c,"data-label":T(e.data.label),children:e.data.label}),i(),s()]})}return d()}function Bt(e){var n=0;const a=Math.random();e.data.template==null&&(e.data.template=e.data.value.pop());function r(l,h){const m=n;return n+=1,t.jsxs("div",{style:{display:"block"},id:"form-"+m+"-"+a,children:[t.jsx(fe,{data:l}),t.jsxs("div",{style:{textAlign:"center",marginTop:10,marginBottom:10},children:[t.jsx(W,{primary:!0,icon:"plus",onClick:()=>o(),id:"extra-add-"+m+"-",display:h}),t.jsx(W,{primary:!0,icon:"trash",onClick:()=>s(m),display:"inline"})]})]},Math.random())}function i(){const l=d(),h=l.length>0?"none":"inline";document.getElementById("add-"+a).style.display=h;for(var m=0;m<n;m++){var w=document.getElementById("extra-add-"+m+"-");w.style.display="none"}if(l.length>0){var w=document.getElementById("extra-add-"+l[l.length-1]+"-");w.style.display="inline"}}function o(){i();var l=JSON.parse(JSON.stringify(e.data.template));l.fields?(l.fields.map(function(h){h.name=h.name.replace("__n__","__"+n+"__")}),l.fields[0].value=0):l.fieldsets.map(function(h){h.fields.map(function(m){m.map(function(w){w.name=w.name.replace("__n__","__"+n+"__")}),m[0].value=0})}),Y.createRoot(document.getElementById(a).appendChild(document.createElement("div"))).render(r(l,"inline")),setTimeout(i,100)}function s(l){const h=e.data.template,w=(h.fields?h.fields[0]:h.fieldsets[0].fields[0][0]).name.replace("__n__","__"+l+"__"),y=document.querySelector("input[name="+w+"]");parseInt(y.value)==0?y.value="":y.value=-parseInt(y.value),document.getElementById("form-"+l+"-"+a).style.display="none",i()}function d(){for(var l=[],h=0;h<n;h++)document.getElementById("form-"+h+"-"+a).style.display=="block"&&l.push(h);return l}function c(){return t.jsx("div",{id:"info-"+a,children:t.jsx(ne,{data:{text:'Clique no botão com o ícone de "+" para adicionar e com o ícone da "lixeira" para remover.'},children:t.jsx(W,{primary:!0,icon:"add",onClick:()=>o(),id:"add-"+a,display:e.data.value.length>0?"none":"inline"})})})}function u(){const l={margin:0};return t.jsxs("div",{className:"form-fieldset",children:[t.jsx("h2",{style:l,"data-label":T(e.data.label),children:e.data.label}),t.jsx("div",{children:!1}),t.jsxs("div",{id:a,className:"fieldset-inline-forms",children:[c(),e.data.value.map(function(h,m){return r(h,m==e.data.value.length-1?"inline":"none")})]})]})}return u()}function fe(e){I.useEffect(()=>{e.data.controls&&De(e.data.controls)},[]);function n(r){return r.type=="inline"?r.max==r.min==1?t.jsx(qt,{data:r},Math.random()):t.jsx(Bt,{data:r},Math.random()):t.jsx(re,{data:r},Math.random())}function a(){return e.data.fields?t.jsx("div",{className:"form-fields",children:e.data.fields.map(r=>n(r))}):e.data.fieldsets.map(r=>t.jsx("div",{className:"form-fieldset",children:r.type=="inline"?n(r):t.jsxs(t.Fragment,{children:[t.jsx("h2",{"data-label":T(r.title),style:{margin:0},children:r.title}),r.fields.map(i=>t.jsx("div",{children:i.map(o=>t.jsx("div",{className:"form-group "+o.name,style:{verticalAlign:"bottom",width:100/i.length+"%",display:o.type=="hidden"?"none":"inline-block"},children:n(o)},Math.random()))},Math.random()))]})},Math.random()))}return a()}function At(e){const n=Math.random();I.useEffect(()=>{e.data.autosubmit&&setInterval(h,e.data.autosubmit*1e3)},[]);function a(){const m={margin:0,color:p.colors.primary};return t.jsx("h1",{style:m,children:e.data.title})}function r(){return e.data.info&&t.jsx(Mt,{data:{text:e.data.info}})}function i(){if(e.data.display)return t.jsxs(t.Fragment,{children:[e.data.display.map(m=>t.jsx(x,{data:m},Math.random())),t.jsx("div",{style:{marginTop:30}})]})}function o(){return t.jsx(fe,{data:e.data})}function s(){return t.jsxs("div",{style:{marginTop:20,textAlign:"right"},children:[t.jsx(W,{onClick:l,label:"Cancelar",default:!0,display:"inline"}),t.jsx(W,{onClick:h,label:"Enviar",primary:!0,display:"inline",icon:"chevron-right",spin:!0})]})}function d(){return t.jsx("div",{id:"output",style:{marginTop:30}})}function c(){if(e.data.image)return t.jsx("div",{style:{margin:"auto",width:"100%",textAlign:"center"},children:t.jsx("img",{src:e.data.image})})}function u(){return t.jsxs("form",{id:n,className:e.data.key,action:e.data.url,style:{margin:"auto",backgroundColor:"white"},method:e.data.method,children:[t.jsx("div",{children:!1}),t.jsxs("div",{style:{padding:5},children:[a(),c(),r(),i(),o(),s(),d()]})]})}function l(){Z()}function h(m){m&&m.preventDefault();var w=e.data.url,y=document.getElementById(n),j=new FormData(y);if(y.method.toUpperCase()=="GET"){const q=w.indexOf("?")>=0?"&":"?";w=w+q+"form="+e.data.title+"&"+new URLSearchParams(j).toString(),j=null}e.data.autosubmit&&m==null&&(w+="&autosubmit=1"),O(y.method.toUpperCase(),w,function(k){if(y.querySelectorAll(".error").forEach(D=>D.style.display="none"),m&&m.target.dataset.spinning&&(m.target.querySelector("i.fa-spin").style.display="none",m.target.querySelector("i.fa-"+m.target.dataset.spinning).style.display="inline-block"),k.type=="response")if(k.store&&Ce(k.store),k.redirect&&k.redirect.length>2)k.message&&localStorage.setItem("message",k.message),document.location.href=X(k.redirect);else if(k.message&&U(k.message),k.task){let D=function(){O("GET","/api/job/progress/"+k.task+"/",function(S){S==null||S.progress==100?m.target.innerHTML=v:(m.target.innerHTML="Aguarde... ("+(S.progress||0)+"%)",setTimeout(D,5e3))})};const v=m.target.innerHTML;m.target.innerHTML="Aguarde... (0%)",D()}else k.redirect==".."&&(document.getElementsByTagName("dialog").length==0?history.back():Z()),k.redirect=="."&&y.reset(),k.dispose&&(y.style.display="none"),rt();else if(k.type=="error"){var B=k.text;console.log(k),Object.keys(k.errors).map(function(D){if(D=="__all__")B=k.errors[D];else{const v=y.querySelector("#"+D+"_error");v==null?B=D+":"+k.errors[D]:(v.querySelector("span").innerHTML=k.errors[D],v.style.display="block")}}),U(B,!0)}else if(k.type!="redirect"){const D=document.querySelector("#output");D.innerHTML="",Y.createRoot(D.appendChild(document.createElement("div"))).render(t.jsx(x,{data:k}))}},j)}return u()}function Ot(e){F(`
130
+ `),t.jsxs("div",{className:"tooltip",children:[e.children,t.jsx("div",{className:"tooltiptext",children:G(e.text)})]})}return n()}const pt=["text","password","email","number","date","datetime-local","file","image","range","search","tel","time","url","week","hidden","color"],te={padding:15,border:"solid 1px #d9d9d9",borderRadius:5,backgroundColor:"white"};function jt(e,n){const a=new FormData(e);for(let[r,i]of Array.from(a.entries())){const o=e[r];n!=r&&(o.tagName=="SELECT"&&i!==""||o.tagName==null&&i!==""||o.type=="radio"&&i!==""||o.type=="checkbox"&&i!==""||a.delete(r))}return new URLSearchParams(a).toString()}function Q(e,n,a){const r=e.indexOf("?")<0?"?":"&",i=jt(n,a);return e=e+(i?r+i:""),e}function ce(e){if(e){const a=[".png",".jpeg",".jpeg",".gif"];for(var n=0;n<a.length;n++)if(e.toLowerCase().indexOf(a[n])>0)return!0}}function ne(e,n){R("GET",Q(n,e.closest("form"),e.name),De)}function kt(e){if(e){var n=document.querySelector(".form-fieldset."+e);n&&(n.style.display="none");var a=document.querySelector(".form-group."+e);a&&(a.style.display="none")}}function St(e){if(e){var n=document.querySelector(".form-fieldset."+e);n&&(n.style.display="block");var a=document.querySelector(".form-group."+e);a&&(a.style.display="block")}}function Ct(e){const n="reload-"+e+"-field";window[n]&&window[n]()}function Et(e,n){var a=document.querySelector(".form-group."+e),r=a.querySelector('*[name="'+e+'"]');if(r.tagName=="INPUT")r.value=n;else if(r.tagName=="SELECT"){if(r.style.display!="none")r.dispatchEvent(new CustomEvent("customchange",{detail:{value:n}}));else for(var i=0;i<r.options.length;i++)if(r.options[i].value==n){r.selectedIndex=i;break}}}function De(e){if(e){for(var n=0;n<e.hide.length;n++)kt(e.hide[n]);for(var n=0;n<e.show.length;n++)St(e.show[n]);for(var n=0;n<e.reload.length;n++)Ct(e.reload[n]);for(var a in e.set)Et(a,e.set[a])}}function Mt(e){function n(){const a={color:p.colors.info,backgroundColor:p.background.info,padding:20,display:"flex",justifyContent:"space-between",marginTop:10,marginBottom:10};return t.jsxs("div",{style:a,children:[t.jsxs("div",{children:[t.jsx(C,{icon:"circle-check",style:{color:p.colors.info,marginRight:20}}),e.data.text]}),e.children&&t.jsx("div",{children:e.children})]})}return n()}function Tt(e){function n(){const a={color:"white",display:"none",backgroundColor:"#e52207",marginTop:2,marginBottom:2,padding:8};return t.jsxs("div",{style:a,id:e.id,className:"error",children:[t.jsx(C,{icon:"xmark-circle",style:{marginRight:5}}),t.jsx("span",{})]})}return n()}function It(e){function n(){const a={marginTop:2,marginBottom:2,fontStyle:"italic"};return t.jsx("div",{style:a,children:t.jsx("span",{children:e.text})})}return n()}function ie(e){const n=e.data.name+Math.random();function a(){const d={display:"flex",justifyContent:"space-between",alignItems:"baseline"};return e.data.action&&(e.data.action.icon=null,e.data.action.modal=!0,e.data.action.urlfunc=function(){return Q(e.data.action.url,document.getElementById(n).closest("form"))}),t.jsxs("div",{style:d,children:[t.jsxs("label",{className:"bold",children:[e.data.label," ",e.data.label&&e.data.required?"*":""]}),e.data.action&&t.jsx(H,{data:e.data.action,style:{padding:0,margin:0}})]})}function r(){return e.data.type=="datetime"&&(e.data.type="datetime-local"),pt.indexOf(e.data.type)>=0?t.jsx(pe,{data:e.data}):e.data.type=="choice"&&Array.isArray(e.data.choices)?e.data.pick?Array.isArray(e.data.value)?t.jsx(je,{data:e.data}):t.jsx(ue,{data:e.data}):t.jsx(Lt,{data:e.data}):e.data.type=="choice"?e.data.pick?Array.isArray(e.data.value)?t.jsx(je,{data:e.data}):t.jsx(ue,{data:e.data}):t.jsx(Le,{data:e.data}):e.data.type=="decimal"?t.jsx(pe,{data:e.data}):e.data.type=="boolean"?t.jsx(Dt,{data:e.data}):e.data.type=="textarea"?t.jsx(Nt,{data:e.data}):e.data.type=="scheduler"?(e.data.scheduler.input_name=e.data.name,t.jsx(Ne,{data:e.data.scheduler})):t.jsx("span",{children:e.data.name})}function i(){return t.jsx("div",{children:t.jsx(Tt,{id:e.data.name+"_error"})})}function o(){return e.data.help_text&&t.jsx(It,{text:e.data.help_text})}function s(){const d={display:e.data.type=="hidden"?"none":"flex",flexDirection:"column",padding:5,width:"calc(100%-5px)"};return t.jsxs("div",{id:n,style:d,children:[a(),r(),o(),i()]})}return s()}function pe(e){var n="";const a=e.data.name+Math.random();e.data.mask=="decimal"&&(n="decimal",e.data.value&&(e.data.value=Math.round(parseFloat(e.data.value)).toFixed(2).replace(".",","))),I.useEffect(()=>{function s(u,l,h){var m=h.target,w=m.value.replace(/\D/g,""),y=m.value.length>l?1:0;VMasker(m).unMask(),VMasker(m).maskPattern(u[y]),m.value=VMasker.toPattern(w,u[y])}if(e.data.mask){var d=document.getElementById(a);if(e.data.mask=="decimal")VMasker(d).maskMoney({precision:2,separator:",",delimiter:"."});else if(e.data.mask.indexOf("|")>0){var c=e.data.mask.split("|");VMasker(d).maskPattern(c[0]),d.addEventListener("input",s.bind(void 0,c,14),!1)}else VMasker(d).maskPattern(e.data.mask)}},[]);function r(s){ne(s.target,e.data.onchange)}function i(s){if(e.data.type=="file"&&s.target.files){let c=s.target.files[0];var d=new FileReader;d.onload=function(u){if(ce(c.name)){const w="display"+a;var l=document.createElement("img");l.id=s.target.id+"img",l.style.width="200px",l.style.display="block",l.style.margin="auto",l.style.marginTop="20px",l.onload=function(y){const j=e.data.width>e.data.height?e.data.width/l.width:e.data.height/l.height;var q=document.createElement("canvas");const k=q.getContext("2d");q.height=q.width*(l.height/l.width);const B=document.createElement("canvas"),D=B.getContext("2d");B.width=l.width*j,B.height=l.height*j,D.drawImage(l,0,0,B.width,B.height),k.drawImage(B,0,0,B.width*j,B.height*j,0,0,q.width,q.height),B.toBlob(function(E){const S=new DataTransfer;S.items.add(new File([E],c.name)),s.target.files=S.files});var v=document.getElementById(w);v==null?(v=document.createElement("div"),v.id=w):v.removeChild(v.childNodes[0]),v.appendChild(l),s.target.parentNode.appendChild(v)},l.src=u.target.result}const h=document.getElementById("fileinfo"+a);var m=c.size/1024;m<1024?m=parseInt(m)+" Kb":m=(m/1024).toFixed(2)+" Mb",h.innerHTML=c.name+" / "+m,e.data.max_size&&c.size/1024/1024>e.data.max_size&&alert("O limite de tamanho é "+e.data.max_size+"Mb. O arquivo informado possui "+m+". Por favor, adicione um arquivo menor.")},d.readAsDataURL(c)}}function o(){var s=e.data.type;if(s=="datetime"&&(s="datetime-regional"),s=="decimal"&&(s="text"),s=="file"){const u={alignContent:"center",minHeight:75,padding:5,maxWidth:"100%",margin:"auto"};var d=null;return e.data.extensions&&e.data.extensions.length>0&&(d=e.data.extensions.map(l=>"."+l).join(", ")),t.jsxs(t.Fragment,{children:[t.jsxs("div",{style:{display:window.innerWidth<800?"block":"flex",justifyContent:"space-between",backgroundColor:"rgba(15, 145, 210, 0.05)",border:"1px dashed rgba(15, 145, 210, 0.4)",borderRadius:10,textAlign:"center"},children:[t.jsx("div",{style:u,children:t.jsx(C,{icon:"cloud-upload",style:{fontSize:"2.5rem",color:p.colors.primary}})}),t.jsxs("div",{style:u,children:[e.data.value&&ce(e.data.value)&&t.jsx("div",{style:{textAlign:"center"},children:t.jsx("img",{src:e.data.value,height:50})}),e.data.value&&!ce(e.data.value)&&t.jsx("div",{style:{textAlign:"center"},children:e.data.value}),"Selecione um arquivo clicando no botão ao lado.",t.jsxs("div",{className:"bold",id:"fileinfo"+a,children:["O arquivo",e.data.max_size&&"deve possuir até "+e.data.max_size+" Mb e ","deve ter extensão"," ",e.data.extensions.map(l=>"."+l).join(" ou "),"."]})]}),t.jsx("div",{style:u,align:"center",children:t.jsx(W,{label:"Selecionar Arquivo",onClick:()=>document.getElementById(a).click()})})]}),t.jsx("input",{className:"form-control "+n,type:s,name:e.data.name,id:a,"data-label":T(e.data.label),readOnly:e.data.read_only,onBlur:e.data.onchange?r:null,onChange:i,style:{zIndex:"-1",marginTop:-20},accept:d})]})}else{var c=te;return s=="color"&&(c={...te},c.width="100%",c.backgroundColor="white",c.height=47.5),t.jsx("input",{className:"form-control "+n,type:s,name:e.data.name,id:a,defaultValue:e.data.value,"data-label":T(e.data.label),readOnly:e.data.read_only,onBlur:e.data.onchange?r:null,onChange:i,style:c})}}return o()}function Le(e){var n=[];Array.isArray(e.data.value)?e.data.value.forEach(function(v,E){n.push({id:v.id,value:v.label})}):e.data.value!=null&&n.push({id:e.data.value.id,value:e.data.value.label}),e.data.id==null&&(e.data.id=Math.random()),e.data.id2==null&&(e.data.id2=e.data.id+"__autocomplete");const a=e.data.id,r=e.data.id2,i=Array.isArray(e.data.value),[o,s]=I.useState(!1),[d,c]=I.useState(null);var u=!1;let l;I.useEffect(()=>{k(n,!0),document.getElementById(a).addEventListener("customchange",function(v){k(v.detail.value);const E=document.getElementById(e.data.name);E&&reactTriggerChange(E)})},[]);function h(){const v=document.getElementById(a);if(i){const E={padding:5,display:"inline"},S={cursor:"pointer",marginRight:5},f={fontSize:"0.8rem"};return t.jsxs("div",{children:[v==null&&n.map((b,M)=>t.jsxs("div",{style:E,children:[t.jsx("span",{onClick:()=>B(M),style:S,children:t.jsx(C,{icon:"trash-can",style:f})}),b.value]},Math.random())),v!=null&&Array.from(v.options).map((b,M)=>t.jsxs("div",{style:E,children:[t.jsx("span",{onClick:()=>B(M),style:S,children:t.jsx(C,{icon:"trash-can",style:f})}),b.innerHTML]},Math.random()))]})}}function m(){return t.jsx("select",{id:a,name:e.data.name,multiple:i,readOnly:!0,style:{display:"contents"}})}function w(){const v={...te,...e.style||{}},E={padding:0,margin:0,border:"solid 1px #d9d9d9",marginTop:-1,borderRadius:5,maxHeight:150,overflowY:"auto",zIndex:99999};E.position="absolute",E.backgroundColor="white";const S=document.getElementById(r);if(e.data.icon&&(v.paddingLeft=30),S){let A=null,g=S,N=null;for(;!N&&(g=g.parentElement)instanceof HTMLElement;)g.matches("dialog")&&(N=g);A=N;const O=S.getBoundingClientRect();var f=O.top+O.height,b=O.left;if(A){const L=A.getBoundingClientRect();f=f-L.top,b=b-L.left}else f+=window.scrollY,b+=window.scrollX;E.width=O.width,E.top=f,E.left=b}const M={cursor:"pointer",padding:10},_=!i&&n.length>0&&n[0].value||"";return t.jsxs(t.Fragment,{children:[e.data.icon&&t.jsx(C,{icon:e.data.icon,style:{position:"absolute",margin:13,color:"#d9d9d9"}}),t.jsx("input",{id:r,name:e.data.name+"__autocomplete",type:"text",className:"form-control",onFocus:A=>{A.target.select(),q(A)},onChange:q,onMouseLeave:y,onBlur:y,defaultValue:_,style:v,"data-label":T(e.data.label)}),d&&o&&t.jsxs("ul",{style:E,onMouseLeave:j,onMouseEnter:function(A){u=!0},children:[d.length==0&&t.jsx("li",{style:M,children:"Nenhuma opção encontrada."}),d.map(A=>t.jsx("li",{onClick:()=>{s(!1),e.onSelect?e.onSelect(A):k(A)},style:M,className:"autocomplete-item","data-label":T(A.value),children:A.value},Math.random()))]})]})}function y(v){u=!1,setTimeout(function(){u||j(v)},250)}function j(v){const E=document.getElementById(a);if(E){const S=document.getElementById(r);i||E.options.length>0&&S.value!=E.options[0].innerHTML&&(E.innerHTML="",S.value="",s(!1),e.data.onchange&&ne(S,e.data.onchange)),v.target.tagName=="UL"?s(!1):u||s(!1)}}function q(v){clearTimeout(l),l=setTimeout(function(){const E=v.target.closest("form"),S=e.data.choices.indexOf("?")<0?"?":"&";s(!0),R("GET",Q(e.data.choices+S+"term="+v.target.value,E),function(b){c(b)})},1e3)}function k(v,E=!1){const S=document.getElementById(a),f=document.getElementById(r);S.innerHTML==null&&(S.innerHTML=""),Array.isArray(v)?S.innerHTML=v.map(b=>`<option selected value="${b.id}">${b.value}</option>`).join(""):v?i?(S.innerHTML+=`<option selected value="${v.id}">${v.value}</option>`,f.value=""):(S.innerHTML=`<option selected value="${v.id}">${v.value}</option>`,f.value=v.value):(S.innerHTML="",f.value=""),e.data.onchange&&!E&&ne(f,e.data.onchange)}function B(v){const E=document.getElementById(a);var S=Array.from(E.options);E.innerHTML=S.slice(0,v).concat(S.slice(v+1)).map(f=>`<option selected value="${f.value}">${f.innerHTML}</option>`).join(""),c([])}function D(){return t.jsxs(t.Fragment,{children:[h(),m(),w()]})}return D()}function Nt(e){function n(){var a={...te};return a.height=100,t.jsx("textarea",{id:e.data.name,name:e.data.name,"data-label":T(e.data.label),style:a,defaultValue:e.data.value||"",className:"form-control"})}return n()}function Dt(e){var n=e.data;return n.choices=[{id:!0,value:"Sim"},{id:!1,value:"Não"}],t.jsx(ue,{data:n})}function ue(e){const[n,a]=I.useState(e.data.choices);var r=Math.random(),i=e.data;function o(u){return i.value!=null?i.value==u.id?!0:i.value.id==u.id:!1}function s(u){var l=document.getElementById(u);i.checked&&(l.checked=!1),e.data.onchange&&ne(l,e.data.onchange)}function d(u){var l=document.getElementById(u);i.checked=l.checked}function c(){return window["reload-"+i.name+"-field"]=function(){R("GET",Q(e.data.pick,document.querySelector(".radio-group."+i.name).closest("form")),function(l){a(l)})},n.length>0?t.jsx("div",{className:"radio-group "+i.name,children:n.map((u,l)=>(u.id||u.id===!1)&&t.jsxs("div",{style:{paddingTop:10,display:"inline-block",marginRight:25,width:window.innerWidth>800?"auto":"100%"},children:[t.jsx("input",{id:i.name+r+l,type:"radio",name:i.name,defaultValue:u.id,defaultChecked:o(u),"data-label":T(u.value),onClick:function(){s(i.name+r+l)},onMouseEnter:function(){d(i.name+r+l)}}),t.jsx("label",{htmlFor:i.name+r+l,children:u.value})]},r+l))}):t.jsx("div",{className:"radio-group empty "+i.name,children:t.jsx(ae,{data:{text:"Nenhuma opção disponível para seleção."}})})}return c()}function je(e){const[n,a]=I.useState(e.data.choices);var r=Math.random(),i=e.data;function o(c){var u=!1;if(i.value)for(var l=0;l<i.value.length;l++){var h=i.value[l];(h==c.id||h.id==c.id)&&(u=!0)}return u}function s(c){e.data.onchange&&ne(c.target,e.data.onchange)}function d(){return window["reload-"+i.name+"-field"]=function(){R("GET",Q(e.data.pick,document.querySelector(".checkbox-group."+i.name).closest("form")),function(u){a(u)})},n.length>0?t.jsx("div",{className:"checkbox-group "+i.name,children:n.map((c,u)=>(c.id||c.id===!1)&&t.jsxs("div",{style:{paddingTop:10,display:"inline-block",marginRight:25,width:window.innerWidth>800?"auto":"100%"},children:[t.jsx("input",{id:i.name+r+u,type:"checkbox",name:i.name,onClick:s,defaultValue:c.id,defaultChecked:o(c),"data-label":T(c.value)}),t.jsx("label",{htmlFor:i.name+r+u,children:c.value})]},r+u))}):t.jsx("div",{className:"checkbox-group empty "+i.name,children:t.jsx(ae,{data:{text:"Nenhuma opção disponível para seleção."}})})}return d()}function Lt(e){var n=e.data;return t.jsx(t.Fragment,{children:t.jsx("select",{className:"form-control",id:n.name,name:n.name,"data-label":T(n.label),defaultValue:n.value,style:te,children:n.choices.map(a=>t.jsx("option",{value:a.id,children:a.value},Math.random()))})})}function qt(e){const n=Math.random(),a=e.data.value[0],r=a.fields?a.fields[0]:a.fieldsets[0].fields[0][0];function i(){return!e.data.required&&t.jsx("div",{id:"info-"+n,children:t.jsxs(ae,{data:{text:"Esta informação é opcional. Controle seu preenchimento com o botão ao lado."},children:[t.jsx(W,{primary:!0,icon:"pen-clip",onClick:()=>o(!0),id:"show-"+n,display:r.value?"none":"inline"}),t.jsx(W,{primary:!0,icon:"trash",onClick:()=>o(!1),id:"hide-"+n,display:r.value?"inline":"none"})]})})}function o(c){const u=document.querySelector("input[name="+r.name+"]"),l=document.getElementById("inline-form-"+n),h=document.getElementById("show-"+n),m=document.getElementById("hide-"+n);l.style.display=c?"block":"none",h.style.display=c?"none":"inline",m.style.display=c?"inline":"none",c?u.value===""?u.value=0:u.value=-parseInt(u.value):parseInt(u.value)==0?u.value="":u.value=-parseInt(u.value)}function s(){const c={display:r.value?"block":"none"};return e.data.required&&(c.display="block",r.value===""&&(r.value=0)),t.jsx("div",{className:"fieldset-inline-forms",style:c,id:"inline-form-"+n,children:e.data.value.map(function(u){return t.jsx(ge,{data:u},Math.random())})})}function d(){const c={margin:0};return t.jsxs("div",{className:"form-fieldset",children:[t.jsx("h2",{style:c,"data-label":T(e.data.label),children:e.data.label}),i(),s()]})}return d()}function Bt(e){var n=0;const a=Math.random();e.data.template==null&&(e.data.template=e.data.value.pop());function r(l,h){const m=n;return n+=1,t.jsxs("div",{style:{display:"block"},id:"form-"+m+"-"+a,children:[t.jsx(ge,{data:l}),t.jsxs("div",{style:{textAlign:"center",marginTop:10,marginBottom:10},children:[t.jsx(W,{primary:!0,icon:"plus",onClick:()=>o(),id:"extra-add-"+m+"-",display:h}),t.jsx(W,{primary:!0,icon:"trash",onClick:()=>s(m),display:"inline"})]})]},Math.random())}function i(){const l=d(),h=l.length>0?"none":"inline";document.getElementById("add-"+a).style.display=h;for(var m=0;m<n;m++){var w=document.getElementById("extra-add-"+m+"-");w.style.display="none"}if(l.length>0){var w=document.getElementById("extra-add-"+l[l.length-1]+"-");w.style.display="inline"}}function o(){i();var l=JSON.parse(JSON.stringify(e.data.template));l.fields?(l.fields.map(function(h){h.name=h.name.replace("__n__","__"+n+"__")}),l.fields[0].value=0):l.fieldsets.map(function(h){h.fields.map(function(m){m.map(function(w){w.name=w.name.replace("__n__","__"+n+"__")}),m[0].value=0})}),Y.createRoot(document.getElementById(a).appendChild(document.createElement("div"))).render(r(l,"inline")),setTimeout(i,100)}function s(l){const h=e.data.template,w=(h.fields?h.fields[0]:h.fieldsets[0].fields[0][0]).name.replace("__n__","__"+l+"__"),y=document.querySelector("input[name="+w+"]");parseInt(y.value)==0?y.value="":y.value=-parseInt(y.value),document.getElementById("form-"+l+"-"+a).style.display="none",i()}function d(){for(var l=[],h=0;h<n;h++)document.getElementById("form-"+h+"-"+a).style.display=="block"&&l.push(h);return l}function c(){return t.jsx("div",{id:"info-"+a,children:t.jsx(ae,{data:{text:'Clique no botão com o ícone de "+" para adicionar e com o ícone da "lixeira" para remover.'},children:t.jsx(W,{primary:!0,icon:"add",onClick:()=>o(),id:"add-"+a,display:e.data.value.length>0?"none":"inline"})})})}function u(){const l={margin:0};return t.jsxs("div",{className:"form-fieldset",children:[t.jsx("h2",{style:l,"data-label":T(e.data.label),children:e.data.label}),t.jsx("div",{children:!1}),t.jsxs("div",{id:a,className:"fieldset-inline-forms",children:[c(),e.data.value.map(function(h,m){return r(h,m==e.data.value.length-1?"inline":"none")})]})]})}return u()}function ge(e){I.useEffect(()=>{e.data.controls&&De(e.data.controls)},[]);function n(r){return r.type=="inline"?r.max==r.min==1?t.jsx(qt,{data:r},Math.random()):t.jsx(Bt,{data:r},Math.random()):t.jsx(ie,{data:r},Math.random())}function a(){return e.data.fields?t.jsx("div",{className:"form-fields",children:e.data.fields.map(r=>n(r))}):e.data.fieldsets.map(r=>t.jsx("div",{className:"form-fieldset",children:r.type=="inline"?n(r):t.jsxs(t.Fragment,{children:[t.jsx("h2",{"data-label":T(r.title),style:{margin:0},children:r.title}),r.fields.map(i=>t.jsx("div",{children:i.map(o=>t.jsx("div",{className:"form-group "+o.name,style:{verticalAlign:"bottom",width:100/i.length+"%",display:o.type=="hidden"?"none":"inline-block"},children:n(o)},Math.random()))},Math.random()))]})},Math.random()))}return a()}function At(e){const n=Math.random();I.useEffect(()=>{e.data.autosubmit&&setInterval(h,e.data.autosubmit*1e3)},[]);function a(){const m={margin:0,color:p.colors.primary};return t.jsx("h1",{style:m,children:e.data.title})}function r(){return e.data.info&&t.jsx(Mt,{data:{text:e.data.info}})}function i(){if(e.data.display)return t.jsxs(t.Fragment,{children:[e.data.display.map(m=>t.jsx(x,{data:m},Math.random())),t.jsx("div",{style:{marginTop:30}})]})}function o(){return t.jsx(ge,{data:e.data})}function s(){return t.jsxs("div",{style:{marginTop:20,textAlign:"right"},children:[t.jsx(W,{onClick:l,label:"Cancelar",default:!0,display:"inline"}),t.jsx(W,{onClick:h,label:"Enviar",primary:!0,display:"inline",icon:"chevron-right",spin:!0})]})}function d(){return t.jsx("div",{id:"output",style:{marginTop:30}})}function c(){if(e.data.image)return t.jsx("div",{style:{margin:"auto",width:"100%",textAlign:"center"},children:t.jsx("img",{src:e.data.image})})}function u(){return t.jsxs("form",{id:n,className:e.data.key,action:e.data.url,style:{margin:"auto",backgroundColor:"white"},method:e.data.method,children:[t.jsx("div",{children:!1}),t.jsxs("div",{style:{padding:5},children:[a(),c(),r(),i(),o(),s(),d()]})]})}function l(){K()}function h(m){m&&m.preventDefault();var w=e.data.url,y=document.getElementById(n),j=new FormData(y);if(y.method.toUpperCase()=="GET"){const q=w.indexOf("?")>=0?"&":"?";w=w+q+"form="+e.data.title+"&"+new URLSearchParams(j).toString(),j=null}e.data.autosubmit&&m==null&&(w+="&autosubmit=1"),R(y.method.toUpperCase(),w,function(k){if(y.querySelectorAll(".error").forEach(D=>D.style.display="none"),m&&m.target.dataset.spinning&&(m.target.querySelector("i.fa-spin").style.display="none",m.target.querySelector("i.fa-"+m.target.dataset.spinning).style.display="inline-block"),k.type=="response")if(k.store&&Ce(k.store),k.redirect&&k.redirect.length>2)k.message&&localStorage.setItem("message",k.message),document.location.href=X(k.redirect);else if(k.message&&U(k.message),k.task){let D=function(){R("GET","/api/job/progress/"+k.task+"/",function(S){S==null||S.progress==100?m.target.innerHTML=v:(m.target.innerHTML="Aguarde... ("+(S.progress||0)+"%)",setTimeout(D,5e3))})};const v=m.target.innerHTML;m.target.innerHTML="Aguarde... (0%)",D()}else k.redirect==".."&&(document.getElementsByTagName("dialog").length==0?history.back():K()),k.redirect=="."&&y.reset(),k.dispose&&(y.style.display="none"),rt();else if(k.type=="error"){var B=k.text;console.log(k),Object.keys(k.errors).map(function(D){if(D=="__all__")B=k.errors[D];else{const v=y.querySelector("#"+D+"_error");v==null?B=D+":"+k.errors[D]:(v.querySelector("span").innerHTML=k.errors[D],v.style.display="block")}}),U(B,!0)}else if(k.type!="redirect"){const D=document.querySelector("#output");D.innerHTML="",Y.createRoot(D.appendChild(document.createElement("div"))).render(t.jsx(x,{data:k}))}},j)}return u()}function Ot(e){F(`
131
131
  .calendar table{
132
132
  width: 100%;
133
133
  border-spacing: 0px;
@@ -216,11 +216,11 @@ import{j as t,c as Y,r as I,R as Be}from"./react.min.js";const p={colors:{primar
216
216
  font-weight: active ? bold : normal;
217
217
  text-decoration: none;
218
218
  }
219
- `),e.data.id==null&&(e.data.id=Math.random());const[n,a]=I.useState(e.data);function r(){return n.attrname?t.jsx("h2",{"data-label":T(n.title),children:n.title}):t.jsxs("h1",{"data-label":T(n.title),children:[n.title," ",n.total>10&&"("+n.total+")"]})}function i(){return t.jsxs("div",{className:"title",children:[r(),t.jsx("i",{id:"loader-"+e.data.id,className:"fa-solid fa-circle-notch fa-spin fa-1x"})]})}function o(f){const b=document.getElementById("loader-"+e.data.id);b&&(b.style.display=f?"block":"none")}function s(){return n.subsets&&t.jsx("div",{className:"tabs",children:n.subsets.map(function(f,b){var M=n.subset===f.name||!n.subset&&b==0;return t.jsxs(P,{href:"#",style:{borderBottom:M?"solid 3px #2670e8":0,color:"#0c326f"},onClick:function(_){_.preventDefault(),d(f.name)},dataLabel:T(f.label),children:[f.label," ",t.jsx(_t,{total:f.count})]},Math.random())})})}function d(f){const b=document.getElementById("subset-"+e.data.id);b.value=f||"",D()}function c(f,b,M){const _=document.getElementById("form-"+e.data.id);_.querySelector("input[name="+n.calendar.field+"__day]").value=f||"",_.querySelector("input[name="+n.calendar.field+"__month]").value=b||"",_.querySelector("input[name="+n.calendar.field+"__year]").value=M||"",y(1)}function u(){if(n.calendar)return t.jsx(Ot,{data:n.calendar,onChange:c})}function l(f){const b={textAlign:"left",verticalAlign:"top",lineHeight:"1.2rem",color:p.colors.primary,padding:5};if(!(window.innerWidth<800))return t.jsxs("tr",{children:[f.map(function(M){return M.label!="ID"&&t.jsx("th",{style:b,className:"bold",children:M.label},Math.random())}),t.jsx("th",{style:b})]})}function h(f){const b={borderBottom:"solid 1px #DDD",padding:5},M={borderBottom:"solid 1px #DDD",lineHeight:"3rem",textAlign:"right"};return window.innerWidth<800?t.jsxs("tr",{children:[t.jsx("td",{style:b,children:f.title},Math.random()),t.jsx("td",{style:M,children:t.jsx("div",{style:{verticalAlign:"center"},children:t.jsx(C,{icon:"chevron-right",onClick:()=>He(f.actions),style:{cursor:"pointer",marginRight:20}})})})]},Math.random()):t.jsxs("tr",{children:[f.data.map(function(_){return _.label!="ID"&&t.jsx("td",{style:b,children:G(_.value)},Math.random())}),t.jsx("td",{style:M,children:t.jsx("div",{style:{verticalAlign:"center"},children:f.actions.map(function(_){return t.jsx(H,{data:_,default:!0},Math.random())})})})]},Math.random())}function m(){return n.data.length>0?(n.render==null&&window.innerWidth<800&&(n.renderer="rows"),n.renderer?n.renderer=="cards"?t.jsx(V,{width:300,alignItems:"start",children:n.data.map(function(f){return f.type=n.renderer,t.jsx(x,{data:f},Math.random())})}):t.jsx("div",{style:{marginBottom:15},children:n.data.map(function(f){return f.type=n.renderer,t.jsx(x,{data:f},Math.random())})}):w()):t.jsx(ne,{data:{text:"Nenhum registro encontrado."}})}function w(){const f={width:"100%",overflowX:"auto"},b={width:"100%",lineHeight:"2rem",borderSpacing:0};return t.jsx("div",{style:f,children:t.jsxs("table",{style:b,children:[t.jsx("thead",{children:l(n.data[0].data)}),t.jsx("tbody",{children:n.data.map(function(M){return h(M)})})]})})}function y(f){const M=document.getElementById("form-"+e.data.id).querySelector("input[name=page]");M&&(M.value=f),D(),k()}function j(){const f=document.getElementById("form-"+e.data.id);if(f){const b=f.querySelector("input[name=page]");b&&(b.value=n.pagination.page.current)}return t.jsx(Rt,{data:n.pagination,onChange:y,total:n.total})}function q(){return t.jsx("div",{align:"right",style:{marginTop:20,marginBottom:20},children:n.actions.map(function(f){return t.jsx(H,{data:f,primary:!0},Math.random())})})}function k(){const f=document.getElementById(e.data.id).getBoundingClientRect().top+window.scrollY;console.log(f),console.log(e.data.id),window.scrollTo({top:f,behavior:"smooth"})}function B(){const f={backgroundColor:"#f8f8f8",borderBottom:"solid 1px #DDD",marginBottom:10,padding:10},b=n.search.length>0,M=n.filters.length>0;if((n.bi||n.data.length>=0)&&(b||M)){const _={name:"q",mask:null,type:"text",label:"Palavras-chaves",value:n.q};return t.jsxs("div",{style:f,children:[t.jsxs(V,{width:250,children:[b&&t.jsx("div",{children:t.jsx(re,{data:_})}),M&&n.filters.map(function(A){return A.type!="hidden"&&t.jsx("div",{children:t.jsx(re,{data:A})},Math.random())}),t.jsx("div",{children:t.jsx(W,{onClick:D,label:"Filtrar",icon:"filter"})})]}),M&&n.filters.map(function(A){return A.type=="hidden"&&t.jsx("div",{children:t.jsx(re,{data:A})},Math.random())})]})}}function D(){o(!0);var f;const b=new URLSearchParams(new FormData(document.getElementById("form-"+e.data.id))).toString();e.data.url.indexOf("?")>0?f=e.data.url+"&"+b:f=e.data.url+"?"+b,O("GET",f,function(M){a(M),o(!1)})}function v(){const f={color:p.colors.primary};return e.data.reloadable&&t.jsxs("div",{align:"center",children:[t.jsxs("i",{children:["Ultima atualização em ",new Date().toLocaleTimeString()]}),t.jsx("div",{children:t.jsx(P,{style:f,onClick:b=>{b.preventDefault(),D()},children:"Atualizar agora"})})]})}function E(){return n.bi?t.jsxs(t.Fragment,{children:[B(),n.bi.map(function(f){return t.jsx(V,{width:300,alignItems:"start",children:f.map(function(b){return t.jsx("div",{children:t.jsx(x,{data:b})},Math.random())})},Math.random())})]}):t.jsxs("div",{className:"content",children:[v(),q(),s(),B(),u(),m(),j()]})}function S(){window[e.data.id]=()=>D();const f={backgroundColor:"white",padding:20};return t.jsx("div",{className:"reloadable queryset",id:e.data.id,sytle:f,children:t.jsxs("form",{id:"form-"+e.data.id,children:[t.jsx("div",{children:!1}),t.jsx("input",{type:"hidden",name:"subset",id:"subset-"+e.data.id}),i(),E()]})})}return S()}function le(e){var n=Math.random();function a(){var r=document.getElementById(n);if(r){var i=echarts.init(r);i.setOption(e.option)}else setTimeout(a,1e3)}return setTimeout(a,1e3),t.jsx("div",{id:n,style:{width:"100%",height:300}})}function ge(e){var n=[["70%","78%"],["60%","68%"],["50%","58%"],["40%","48%"],["30%","48%"],["20%","28%"],["10%","18%"]];function a(){return e.headers?e.headers.slice(1).map(function(i,o){return{name:i,type:"pie",radius:n[o],emphasis:{label:{show:!0,formatter:function(s){return s.value.toLocaleString("pt-BR")},fontWeight:"bold"}},roseType:null,data:e.rows.map(function(s){return{name:s[0],value:s[o+1]}})}}):{name:null,type:"pie",radius:e.donut?["25%","65%"]:["0%","75%"],emphasis:{label:{show:!0,formatter:function(i){return i.value.toLocaleString("pt-BR")},fontWeight:"bold"}},roseType:e.area?"area":null,data:e.rows.map(function(i,o){return{name:i[0],value:i[1]}})}}function r(){var i={tooltip:{trigger:"item",formatter:function(o){return`${o.name}: <b>${o.data.value.toLocaleString("pt-BR")}</b> (${o.percent.toLocaleString("pt-BR")}%)`}},legend:{},label:{show:!0,formatter(o){return o.name+" ("+o.percent.toLocaleString("pt-BR")+"%)"}},series:a()};return t.jsx(le,{option:i})}return r()}function Wt(e){return t.jsx(ge,{donut:!0,headers:e.headers,rows:e.rows})}function zt(e){return t.jsx(ge,{area:!0,headers:e.headers,rows:e.rows})}function $(e){var n=e.invert||!1,a=e.type||"bar",r=e.stack,i={type:"value"},o={show:!0,feature:{mark:{show:!0},saveAsImage:{show:!0}}},s=e.area?{}:null;function d(){return e.headers?{type:"category",data:e.headers.slice(1)}:{type:"category",data:e.rows.map(function(l){return l[0]})}}function c(){return e.headers?e.rows.map(function(l){return{name:l[0],data:l.slice(1),type:a,stack:r,areaStyle:s}}):[{name:null,data:e.rows.map(function(l){return l[1]}),type:a,stack:r,areaStyle:s}]}function u(){var l={toolbox:o,tooltip:{trigger:"axis",axisPointer:{type:"shadow"},formatter:function(h){return`${h[0].name}: <b>${h[0].value.toLocaleString("pt-BR")}</b>`}},legend:{},label:{show:!0,formatter:function(h){return h.value.toLocaleString("pt-BR")}},xAxis:n?i:d(),yAxis:n?d():i,series:c()};return t.jsx(le,{option:l})}return u()}function Ht(e){return t.jsx($,{headers:e.headers,rows:e.rows})}function Pt(e){return t.jsx($,{type:"line",headers:e.headers,rows:e.rows})}function Ut(e){return t.jsx($,{area:!0,type:"line",headers:e.headers,rows:e.rows})}function Gt(e){return t.jsx($,{stack:"1",headers:e.headers,rows:e.rows})}function Yt(e){return t.jsx($,{invert:!0,headers:e.headers,rows:e.rows})}function Vt(e){return t.jsx($,{invert:!0,stack:"1",headers:e.headers,rows:e.rows})}function Xt(e){function n(){return e.headers?[{type:"treemap",roam:"move",nodeClick:!0,data:e.headers.slice(1).map(function(r,i){return{name:r,type:"pie",children:e.rows.map(function(o){return{name:o[0],value:o[i+1]}})}})}]:[{type:"treemap",roam:"move",nodeClick:!1,data:e.rows.map(function(r){return{name:r[0],value:r[1]}})}]}function a(){var r={tooltip:{trigger:"item"},legend:{},label:{show:!0,formatter(i){return i.name+" ("+i.value.toLocaleString("pt-BR")+")"}},series:n()};return t.jsx(le,{option:r})}return a()}function $t(e){function n(){var a={series:[{type:"gauge",startAngle:0,endAngle:360,min:0,max:100,progress:{show:!0,width:38},pointer:null,axisTick:null,splitLine:{length:0},axisLine:{lineStyle:{width:38}},axisLabel:null,detail:{backgroundColor:"#fff",fontSize:"2.5rem",width:"60%",lineHeight:40,height:40,borderRadius:8,offsetCenter:[0,"0%"],valueAnimation:!0,formatter:function(r){return r.toFixed(0)+"%"}},data:[{value:e.value}]}]};return t.jsx(le,{option:a})}return n()}function ke(e){function n(){switch(e.type){case"pie":return t.jsx(ge,{headers:e.headers,rows:e.rows});case"polar":return t.jsx(zt,{headers:e.headers,rows:e.rows});case"donut":return t.jsx(Wt,{headers:e.headers,rows:e.rows});case"bar":return t.jsx(Ht,{headers:e.headers,rows:e.rows});case"stacked_bar":return t.jsx(Gt,{headers:e.headers,rows:e.rows});case"column":return t.jsx(Yt,{headers:e.headers,rows:e.rows});case"stacked_column":return t.jsx(Vt,{headers:e.headers,rows:e.rows});case"tree_map":return t.jsx(Xt,{headers:e.headers,rows:e.rows});case"line":return t.jsx(Pt,{headers:e.headers,rows:e.rows});case"area":return t.jsx(Ut,{headers:e.headers,rows:e.rows});case"progress":return t.jsx($t,{headers:e.headers,rows:e.rows});default:return t.jsx($,{headers:e.headers,rows:e.rows})}}function a(){return t.jsxs("div",{style:{width:"100%",margin:"auto"},children:[e.title&&t.jsx("h2",{className:"title",children:e.title}),n()]})}return a()}function Jt(e){F(`
219
+ `),e.data.id==null&&(e.data.id=Math.random());const[n,a]=I.useState(e.data);function r(){return n.attrname?t.jsx("h2",{"data-label":T(n.title),children:n.title}):t.jsxs("h1",{"data-label":T(n.title),children:[n.title," ",n.total>10&&"("+n.total+")"]})}function i(){return t.jsxs("div",{className:"title",children:[r(),t.jsx("i",{id:"loader-"+e.data.id,className:"fa-solid fa-circle-notch fa-spin fa-1x"})]})}function o(f){const b=document.getElementById("loader-"+e.data.id);b&&(b.style.display=f?"block":"none")}function s(){return n.subsets&&t.jsx("div",{className:"tabs",children:n.subsets.map(function(f,b){var M=n.subset===f.name||!n.subset&&b==0;return t.jsxs(P,{href:"#",style:{borderBottom:M?"solid 3px #2670e8":0,color:"#0c326f"},onClick:function(_){_.preventDefault(),d(f.name)},dataLabel:T(f.label),children:[f.label," ",t.jsx(_t,{total:f.count})]},Math.random())})})}function d(f){const b=document.getElementById("subset-"+e.data.id);b.value=f||"",D()}function c(f,b,M){const _=document.getElementById("form-"+e.data.id);_.querySelector("input[name="+n.calendar.field+"__day]").value=f||"",_.querySelector("input[name="+n.calendar.field+"__month]").value=b||"",_.querySelector("input[name="+n.calendar.field+"__year]").value=M||"",y(1)}function u(){if(n.calendar)return t.jsx(Ot,{data:n.calendar,onChange:c})}function l(f){const b={textAlign:"left",verticalAlign:"top",lineHeight:"1.2rem",color:p.colors.primary,padding:5};if(!(window.innerWidth<800))return t.jsxs("tr",{children:[f.map(function(M){return M.label!="ID"&&t.jsx("th",{style:b,className:"bold",children:M.label},Math.random())}),t.jsx("th",{style:b})]})}function h(f){const b={borderBottom:"solid 1px #DDD",padding:5},M={borderBottom:"solid 1px #DDD",lineHeight:"3rem",textAlign:"right"};return window.innerWidth<800?t.jsxs("tr",{children:[t.jsx("td",{style:b,children:f.title},Math.random()),t.jsx("td",{style:M,children:t.jsx("div",{style:{verticalAlign:"center"},children:t.jsx(C,{icon:"chevron-right",onClick:()=>He(f.actions),style:{cursor:"pointer",marginRight:20}})})})]},Math.random()):t.jsxs("tr",{children:[f.data.map(function(_){return _.label!="ID"&&t.jsx("td",{style:b,children:G(_.value)},Math.random())}),t.jsx("td",{style:M,children:t.jsx("div",{style:{verticalAlign:"center"},children:f.actions.map(function(_){return t.jsx(H,{data:_,default:!0},Math.random())})})})]},Math.random())}function m(){return n.data.length>0?(n.render==null&&window.innerWidth<800&&(n.renderer="rows"),n.renderer?n.renderer=="cards"?t.jsx(V,{width:300,alignItems:"start",children:n.data.map(function(f){return f.type=n.renderer,t.jsx(x,{data:f},Math.random())})}):t.jsx("div",{style:{marginBottom:15},children:n.data.map(function(f){return f.type=n.renderer,t.jsx(x,{data:f},Math.random())})}):w()):t.jsx(ae,{data:{text:"Nenhum registro encontrado."}})}function w(){const f={width:"100%",overflowX:"auto"},b={width:"100%",lineHeight:"2rem",borderSpacing:0};return t.jsx("div",{style:f,children:t.jsxs("table",{style:b,children:[t.jsx("thead",{children:l(n.data[0].data)}),t.jsx("tbody",{children:n.data.map(function(M){return h(M)})})]})})}function y(f){const M=document.getElementById("form-"+e.data.id).querySelector("input[name=page]");M&&(M.value=f),D(),k()}function j(){const f=document.getElementById("form-"+e.data.id);if(f){const b=f.querySelector("input[name=page]");b&&(b.value=n.pagination.page.current)}return t.jsx(Rt,{data:n.pagination,onChange:y,total:n.total})}function q(){return t.jsx("div",{align:"right",style:{marginTop:20,marginBottom:20},children:n.actions.map(function(f){return t.jsx(H,{data:f,primary:!0},Math.random())})})}function k(){const f=document.getElementById(e.data.id).getBoundingClientRect().top+window.scrollY;console.log(f),console.log(e.data.id),window.scrollTo({top:f,behavior:"smooth"})}function B(){const f={backgroundColor:"#f8f8f8",borderBottom:"solid 1px #DDD",marginBottom:10,padding:10},b=n.search.length>0,M=n.filters.length>0;if((n.bi||n.data.length>=0)&&(b||M)){const _={name:"q",mask:null,type:"text",label:"Palavras-chaves",value:n.q};return t.jsxs("div",{style:f,children:[t.jsxs(V,{width:250,children:[b&&t.jsx("div",{children:t.jsx(ie,{data:_})}),M&&n.filters.map(function(A){return A.type!="hidden"&&t.jsx("div",{children:t.jsx(ie,{data:A})},Math.random())}),t.jsx("div",{children:t.jsx(W,{onClick:D,label:"Filtrar",icon:"filter"})})]}),M&&n.filters.map(function(A){return A.type=="hidden"&&t.jsx("div",{children:t.jsx(ie,{data:A})},Math.random())})]})}}function D(){o(!0);var f;const b=new URLSearchParams(new FormData(document.getElementById("form-"+e.data.id))).toString();e.data.url.indexOf("?")>0?f=e.data.url+"&"+b:f=e.data.url+"?"+b,R("GET",f,function(M){a(M),o(!1)})}function v(){const f={color:p.colors.primary};return e.data.reloadable&&t.jsxs("div",{align:"center",children:[t.jsxs("i",{children:["Ultima atualização em ",new Date().toLocaleTimeString()]}),t.jsx("div",{children:t.jsx(P,{style:f,onClick:b=>{b.preventDefault(),D()},children:"Atualizar agora"})})]})}function E(){return n.bi?t.jsxs(t.Fragment,{children:[B(),n.bi.map(function(f){return t.jsx(V,{width:300,alignItems:"start",children:f.map(function(b){return t.jsx("div",{children:t.jsx(x,{data:b})},Math.random())})},Math.random())})]}):t.jsxs("div",{className:"content",children:[v(),q(),s(),B(),u(),m(),j()]})}function S(){window[e.data.id]=()=>D();const f={backgroundColor:"white",padding:20};return t.jsx("div",{className:"reloadable queryset",id:e.data.id,sytle:f,children:t.jsxs("form",{id:"form-"+e.data.id,children:[t.jsx("div",{children:!1}),t.jsx("input",{type:"hidden",name:"subset",id:"subset-"+e.data.id}),i(),E()]})})}return S()}function de(e){var n=Math.random();function a(){var r=document.getElementById(n);if(r){var i=echarts.init(r);i.setOption(e.option)}else setTimeout(a,1e3)}return setTimeout(a,1e3),t.jsx("div",{id:n,style:{width:"100%",height:300}})}function xe(e){var n=[["70%","78%"],["60%","68%"],["50%","58%"],["40%","48%"],["30%","48%"],["20%","28%"],["10%","18%"]];function a(){return e.headers?e.headers.slice(1).map(function(i,o){return{name:i,type:"pie",radius:n[o],emphasis:{label:{show:!0,formatter:function(s){return s.value.toLocaleString("pt-BR")},fontWeight:"bold"}},roseType:null,data:e.rows.map(function(s){return{name:s[0],value:s[o+1]}})}}):{name:null,type:"pie",radius:e.donut?["25%","65%"]:["0%","75%"],emphasis:{label:{show:!0,formatter:function(i){return i.value.toLocaleString("pt-BR")},fontWeight:"bold"}},roseType:e.area?"area":null,data:e.rows.map(function(i,o){return{name:i[0],value:i[1]}})}}function r(){var i={tooltip:{trigger:"item",formatter:function(o){return`${o.name}: <b>${o.data.value.toLocaleString("pt-BR")}</b> (${o.percent.toLocaleString("pt-BR")}%)`}},legend:{},label:{show:!0,formatter(o){return o.name+" ("+o.percent.toLocaleString("pt-BR")+"%)"}},series:a()};return t.jsx(de,{option:i})}return r()}function Wt(e){return t.jsx(xe,{donut:!0,headers:e.headers,rows:e.rows})}function zt(e){return t.jsx(xe,{area:!0,headers:e.headers,rows:e.rows})}function $(e){var n=e.invert||!1,a=e.type||"bar",r=e.stack,i={type:"value"},o={show:!0,feature:{mark:{show:!0},saveAsImage:{show:!0}}},s=e.area?{}:null;function d(){return e.headers?{type:"category",data:e.headers.slice(1)}:{type:"category",data:e.rows.map(function(l){return l[0]})}}function c(){return e.headers?e.rows.map(function(l){return{name:l[0],data:l.slice(1),type:a,stack:r,areaStyle:s}}):[{name:null,data:e.rows.map(function(l){return l[1]}),type:a,stack:r,areaStyle:s}]}function u(){var l={toolbox:o,tooltip:{trigger:"axis",axisPointer:{type:"shadow"},formatter:function(h){return`${h[0].name}: <b>${h[0].value.toLocaleString("pt-BR")}</b>`}},legend:{},label:{show:!0,formatter:function(h){return h.value.toLocaleString("pt-BR")}},xAxis:n?i:d(),yAxis:n?d():i,series:c()};return t.jsx(de,{option:l})}return u()}function Ht(e){return t.jsx($,{headers:e.headers,rows:e.rows})}function Pt(e){return t.jsx($,{type:"line",headers:e.headers,rows:e.rows})}function Ut(e){return t.jsx($,{area:!0,type:"line",headers:e.headers,rows:e.rows})}function Gt(e){return t.jsx($,{stack:"1",headers:e.headers,rows:e.rows})}function Yt(e){return t.jsx($,{invert:!0,headers:e.headers,rows:e.rows})}function Vt(e){return t.jsx($,{invert:!0,stack:"1",headers:e.headers,rows:e.rows})}function Xt(e){function n(){return e.headers?[{type:"treemap",roam:"move",nodeClick:!0,data:e.headers.slice(1).map(function(r,i){return{name:r,type:"pie",children:e.rows.map(function(o){return{name:o[0],value:o[i+1]}})}})}]:[{type:"treemap",roam:"move",nodeClick:!1,data:e.rows.map(function(r){return{name:r[0],value:r[1]}})}]}function a(){var r={tooltip:{trigger:"item"},legend:{},label:{show:!0,formatter(i){return i.name+" ("+i.value.toLocaleString("pt-BR")+")"}},series:n()};return t.jsx(de,{option:r})}return a()}function $t(e){function n(){var a={series:[{type:"gauge",startAngle:0,endAngle:360,min:0,max:100,progress:{show:!0,width:38},pointer:null,axisTick:null,splitLine:{length:0},axisLine:{lineStyle:{width:38}},axisLabel:null,detail:{backgroundColor:"#fff",fontSize:"2.5rem",width:"60%",lineHeight:40,height:40,borderRadius:8,offsetCenter:[0,"0%"],valueAnimation:!0,formatter:function(r){return r.toFixed(0)+"%"}},data:[{value:e.value}]}]};return t.jsx(de,{option:a})}return n()}function ke(e){function n(){switch(e.type){case"pie":return t.jsx(xe,{headers:e.headers,rows:e.rows});case"polar":return t.jsx(zt,{headers:e.headers,rows:e.rows});case"donut":return t.jsx(Wt,{headers:e.headers,rows:e.rows});case"bar":return t.jsx(Ht,{headers:e.headers,rows:e.rows});case"stacked_bar":return t.jsx(Gt,{headers:e.headers,rows:e.rows});case"column":return t.jsx(Yt,{headers:e.headers,rows:e.rows});case"stacked_column":return t.jsx(Vt,{headers:e.headers,rows:e.rows});case"tree_map":return t.jsx(Xt,{headers:e.headers,rows:e.rows});case"line":return t.jsx(Pt,{headers:e.headers,rows:e.rows});case"area":return t.jsx(Ut,{headers:e.headers,rows:e.rows});case"progress":return t.jsx($t,{headers:e.headers,rows:e.rows});default:return t.jsx($,{headers:e.headers,rows:e.rows})}}function a(){return t.jsxs("div",{style:{width:"100%",margin:"auto"},children:[e.title&&t.jsx("h2",{className:"title",children:e.title}),n()]})}return a()}function Jt(e){F(`
220
220
  .statistics .odd {
221
221
  background-color: #EEE;
222
222
  }
223
- `);function n(){for(var r=[],i=0;i<e.data.series.length;i++)r.push([e.data.series[i][0],e.data.series[i][1]]);return e.data.chart?t.jsx(ke,{type:e.data.chart,title:e.data.title,rows:r}):t.jsxs("div",{className:"statistics",children:[e.data.title&&t.jsx("h2",{"data-label":T(e.data.title),children:e.data.title}),t.jsx("table",{style:{width:"100%",borderSpacing:0},children:t.jsx("tbody",{children:r.map((o,s)=>t.jsx("tr",{children:o.map((d,c)=>c==0?t.jsx("th",{style:{textAlign:"left",lineHeight:"2rem",padding:5},className:s%2==0?"even":"odd",children:d},Math.random()):t.jsx("td",{className:s%2==0?"even":"odd",children:G(d)},Math.random()))},Math.random()))})})]})}function a(){for(var r=[],i=[],o=Object.keys(e.data.series),s=[],d=0;d<o.length;d++){d==0&&r.push("");for(var c=[o[d]],u=0,l=0;l<e.data.series[o[d]].length;l++){var h=e.data.series[o[d]];d==0&&r.push(h[l][0]),c.push(h[l][1]),u+=h[l][1],o.length>1&&(d==0?s.push(h[l][1]):s[l]+=h[l][1],l>0&&l==e.data.series[o[d]].length-1&&(d==0?s.push(u):s[l+1]+=u))}c.length>2&&(d==0&&r.push(""),c.push(u)),i.push(c)}return e.data.chart?t.jsx(ke,{type:e.data.chart,title:e.data.title,headers:r,rows:i}):t.jsxs("div",{className:"statistics",children:[e.data.title&&t.jsx("h2",{"data-label":T(e.data.title),children:e.data.title}),t.jsxs("table",{style:{width:"100%",borderSpacing:0},children:[r&&t.jsx("thead",{children:t.jsx("tr",{children:r.map(m=>t.jsx("th",{className:"bold",style:{textAlign:"left",padding:5},children:m},Math.random()))})}),t.jsxs("tbody",{children:[i.map((m,w)=>t.jsx("tr",{children:m.map((y,j)=>j==0?t.jsx("th",{className:w%2==0?"even":"odd",style:{textAlign:"left",padding:5},children:y},Math.random()):t.jsx("td",{align:"center",className:(j==m.length-1&&r&&r[r.length-1]==""?"bold":"")+" "+(w%2==0?"even":"odd"),children:G(y)},Math.random()))},Math.random())),s.length>0&&t.jsxs("tr",{children:[t.jsx("th",{}),s.map(m=>t.jsxs("td",{align:"center",className:"bold",children:[G(m)," "]},Math.random()))]},Math.random())]})]})]})}return Array.isArray(e.data.series)?n():a()}function Qt(){function e(i){var o=i.target;const s=o.querySelector(":scope > ul, :scope > li");if(s){s.offsetParent===null?o.querySelectorAll(":scope > ul, :scope > li, :scope > ul > li").forEach(function(u){u.style.display="block"}):o.querySelectorAll(":scope > ul, :scope > li").forEach(function(u){u.style.display="none"});const d=o.querySelector(":scope > i.fa-solid.fa-chevron-right"),c=o.querySelector(":scope > i.fa-solid.fa-chevron-up");return d&&(d.classList.remove("fa-chevron-right"),d.classList.add("fa-chevron-up")),c&&(c.classList.remove("fa-chevron-up"),c.classList.add("fa-chevron-right")),i.preventDefault(),i.stopPropagation(),i.cancelBubble=!0,!1}else{const d=document.querySelector("aside");d.style.display=window.innerWidth<800?"none":"inline-block"}}function n(i,o){const s={display:o==0?"block":"none",cursor:"pointer",paddingLeft:15,paddingRight:20,paddingTop:10,paddingBottom:10,lineHeight:"2rem",color:p.colors.primary},d={padding:5,fontSize:"1.2rem"};return i.url?t.jsx("li",{style:s,onClick:e,className:"item",children:t.jsxs(P,{href:i.url,dataLabel:T(i.label),style:{textDecoration:"none",display:"block",width:"100%"},children:[o==0&&t.jsx(C,{icon:i.icon||"dot-circle",style:d}),i.label]})},Math.random()):i.items.length>0&&t.jsxs("li",{onClick:e,style:s,"data-label":T(i.label),children:[o==0&&t.jsx(C,{icon:i.icon||"dot-circle",style:d}),i.label,t.jsx(C,{icon:"chevron-right",style:{float:"right",paddingTop:8}}),t.jsx("ul",{style:{display:"none",paddingLeft:15},children:i.items.map(function(c){return n(c,o+1)})})]},Math.random())}function a(){const i={padding:0};return window.application.menu.items.length>0&&t.jsx("ul",{style:i,children:window.application.menu.items.map(function(o){return n(o,0)})})}function r(){const i={marginTop:10,height:"100%"};return t.jsx("div",{style:i,className:"menu",children:a()})}return r()}function Zt(e){var n;function a(o){const s="=".repeat((4-o.length%4)%4),d=(o+s).replace(/\-/g,"+").replace(/_/g,"/"),c=window.atob(d),u=new Uint8Array(c.length);for(let l=0;l<c.length;++l)u[l]=c.charCodeAt(l);return u}function r(){"serviceWorker"in navigator&&"PushManager"in window?navigator.serviceWorker.getRegistration().then(function(o){if(o){const s=a("BFvGgHYReJWJuSyOChUCEs1VYqZVs3TLJAvSkMW8jVqqgdWVbArBL4Kd6ibPKWlQo8Q3BuWwomybqwzs-1Ic8GU");o.pushManager.getSubscription(function(d){d&&(d.unsubscribe(),console.log("unsubscribed"))}),o.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:s}).then(function(d){if(console.log(d),n=JSON.stringify(d),console.log(n),d){alert("Notificação ativada com sucesso.");var c=new FormData;c.append("subscription",n),O("POST","/api/pushsubscription/subscribe/",function(u){console.log(u)},c)}else{alert("Problema ao ativar notificações.");return}}).catch(function(d){alert("Problema ao tentar ativar notificações."),console.log("Failed to subscribe the user: ",d)})}else console.log("No registered service worker.")}).catch(function(o){alert("Erro"),console.error("Service Worker Error",o)}):alert("Push messaging is not supported")}function i(){return t.jsx(C,{onClick:r,icon:"bell",style:{cursor:"pointer",color:p.colors.primary}})}return i()}function Kt(e,n){var a={startX:0,startY:0,endX:0,endY:0,minX:30,maxX:30,minY:50,maxY:60},r=null;e.addEventListener("touchstart",function(i){var o=i.touches[0];a.startX=o.screenX,a.startY=o.screenY}),e.addEventListener("touchmove",function(i){var o=i.touches[0];a.endX=o.screenX,a.endY=o.screenY}),e.addEventListener("touchend",function(i){Math.abs(a.endX-a.startX)>a.minX&&Math.abs(a.endY-a.startY)<a.maxY?r=a.endX>a.startX?"right":"left":Math.abs(a.endY-a.startY)>a.minY&&Math.abs(a.endX-a.startX)<a.maxX&&(r=a.endY>a.startY?"down":"up"),r!==null&&typeof n=="function"&&n(e,r)})}function en(e){function n(){if(window.innerWidth>800)return;const a={position:"fixed",display:"flex",width:50,height:50,backgroundColor:p.colors.primary,color:"white",right:10,borderRadius:"50%",cursor:"pointer"},r={paddingLeft:14,paddingTop:12,fontSize:"1.8rem"};return t.jsxs(t.Fragment,{children:[t.jsx("div",{style:{...a,bottom:100},onClick:()=>history.back(),children:t.jsx(C,{icon:"arrow-left",style:r})}),t.jsx("div",{style:{...a,bottom:20},onClick:()=>window.scrollTo({top:0,behavior:"smooth"}),children:t.jsx(C,{icon:"arrow-up",style:r})})]})}return n()}function tn(e){const[n,a]=I.useState(e.data);window.loaddata=i=>a(i);function r(){const i={minHeight:400,margin:window.innerWidth>800?20:5};return t.jsx("div",{style:i,id:"container",children:t.jsx(x,{data:n},Math.random())})}return r()}function nn(e){I.useEffect(()=>{const l=localStorage.getItem("message");l&&(localStorage.removeItem("message"),U(l)),window.addEventListener("resize",()=>{const h=document.querySelector("aside");h&&(h.style.display=window.innerWidth<800?"none":"inline-block")}),Kt(document.querySelector("main"),function(h,m){console.log(h,m)})},[]);function a(){const l=document.querySelector("aside");l&&(l.style.display=l.style.display=="none"?"inline-block":"none")}function r(l){const h=l.target.tagName=="A"?l.target:l.target.closest("a");l.preventDefault(),window.load(h.href)}function i(){const l={display:"flex",width:"100%",justifyContent:"space-between",boxShadow:"0px 15px 10px -15px #DDD",overflowX:"hidden"},h={choices:"/api/search/",help_text:null,label:null,mask:null,name:"search",required:!1,type:"choice",icon:"search"};return e.data.navbar?t.jsxs("div",{style:l,children:[t.jsxs("div",{style:{padding:20},children:[e.data.menu&&e.data.menu.items.length>0&&t.jsx(C,{icon:"navicon",style:{fontSize:"1.5rem",marginRight:10,cursor:"pointer"},onClick:a}),t.jsxs("a",{className:"brand",href:"/app/home/",onClick:r,style:{fontSize:"1.5rem",textDecoration:"none"},children:[e.data.navbar.logo&&t.jsx("img",{src:e.data.navbar.logo,height:20,style:{marginRight:10}}),t.jsx("span",{children:e.data.navbar.title})]}),t.jsx("div",{children:e.data.navbar.subtitle})]}),t.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[e.data.navbar.adder.length>0&&t.jsx("div",{style:{padding:10},children:t.jsx(ae,{actions:e.data.navbar.adder,position:{},dataLabel:"plus",children:t.jsx(C,{icon:"plus",style:{cursor:"pointer",color:p.colors.primary}})})}),t.jsx("div",{style:{padding:10},children:t.jsx(Zt,{})}),e.data.navbar.toolbar&&window.innerWidth>800&&e.data.navbar.toolbar.length>0&&t.jsx("div",{className:"toolbar",children:e.data.navbar.toolbar.map(function(m){return t.jsx(H,{data:m,primary:!0,compact:!0},Math.random())})}),e.data.navbar.actions&&e.data.navbar.actions.length>0&&e.data.navbar.actions.map(function(m){return m.url=="/api/auth/login/"&&(e.data.navbar.user||document.location.pathname=="/app/auth/login/")?null:t.jsx("div",{children:t.jsx(H,{data:m,primary:!0},Math.random())},Math.random())}),e.data.oauth&&e.data.oauth.length>0&&e.data.navbar.user==null&&e.data.oauth.map(function(m){return t.jsx(P,{href:m.url,style:{marginRight:10},children:m.label},Math.random())}),e.data.navbar.tools.length>0&&t.jsx("div",{style:{padding:10},children:t.jsx(ae,{actions:e.data.navbar.tools,position:{},dataLabel:"tools",children:t.jsx(C,{icon:"tools",style:{cursor:"pointer",color:p.colors.primary}})})}),e.data.navbar.settings.length>0&&t.jsx("div",{style:{padding:10},children:t.jsx(ae,{actions:e.data.navbar.settings,position:{},dataLabel:"gear",children:t.jsx(C,{icon:"gear",style:{cursor:"pointer",color:p.colors.primary}})})}),window.innerWidth>800&&e.data.navbar.user&&e.data.navbar.search&&t.jsx("div",{children:t.jsx(Le,{data:h,style:{padding:10},onSelect:m=>document.location.href=X(m.id)})}),e.data.navbar.user&&e.data.navbar.usermenu.length>0&&t.jsx("div",{style:{padding:10},children:t.jsx(ae,{actions:e.data.navbar.usermenu,position:{},dataLabel:T(e.data.navbar.user),children:t.jsx("img",{src:e.data.navbar.photo||"/static/images/user.svg",style:{width:30,height:30,borderRadius:"50%",objectFit:"cover",backgroundColor:p.colors.primary}})})})]})]}):null}function o(){return window.application.menu&&window.application.menu.items.length>0&&t.jsx("aside",{style:{verticalAlign:"top",maxWidth:"350px",minWidth:"350px",display:window.innerWidth<800?"none":"block",float:"left",minHeight:window.innerHeight+"px",backgroundColor:"white"},children:t.jsx(Qt,{})})}function s(){const l={margin:15,display:"flex",justifyContent:"space-between"},h={color:p.colors.primary};return e.data.navbar&&e.data.navbar.user&&t.jsxs("div",{style:l,children:[t.jsxs("div",{children:[t.jsx(P,{href:"/app/dashboard/",style:{marginRight:10},children:t.jsx(C,{icon:"home",style:h})}),"Área Administrativa"]}),t.jsx("div",{title:e.data.navbar.roles,children:e.data.navbar.user})]})}function d(){return t.jsxs("main",{id:"main",style:{width:"100%",overflowX:"auto"},children:[s(),t.jsx(tn,{data:e.data.content}),t.jsx("footer",{children:c()}),t.jsx(en,{})]})}function c(){return e.data.footer?t.jsxs("div",{align:"center",children:[t.jsx("div",{children:window.application.sponsors&&window.application.sponsors.length>0&&t.jsx("div",{children:window.application.sponsors.map(function(l){return t.jsx("img",{src:l,style:{height:30,padding:5}},Math.random())})})}),t.jsx("div",{children:Intl.DateTimeFormat().resolvedOptions().timeZone}),t.jsx("div",{children:"Todos os direitos reservados"}),t.jsx("div",{children:e.data.footer.version})]}):null}function u(){return t.jsxs("div",{children:[t.jsx("header",{children:i()}),t.jsxs("div",{style:{width:"100%",minHeight:window.innerHeight-70,display:"flex"},children:[o(),d()]})]})}return u()}function an(e){var n=null,a=null,r=null,i=!1,o=null,s=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia,d={constraints:{mandatory:{OfferToReceiveAudio:!0,OfferToReceiveVideo:!0},offerToReceiveAudio:1,offerToReceiveVideo:1},sdpTransform:y=>y.replace("a=fmtp:111 minptime=10;useinbandfec=1","a=fmtp:111 ptime=5;useinbandfec=1;stereo=1;maxplaybackrate=48000;maxaveragebitrat=128000;sprop-stereo=1")};function c(){console.log("Trying to connect..."),n=new Peer("999123"+e.data.caller.replaceAll(".","").replaceAll("-","")),n.on("open",function(y){document.getElementById("callerid").innerHTML=e.data.caller,m(),o=setInterval(function(){i?U("Em conexão com "+e.data.receiver+"."):(U("Tentando estabeler conexão com "+e.data.receiver+"..."),m())},15e3)}),n.on("call",function(y){var j=document.getElementById("video2");j.addEventListener("loadedmetadata",function(q){j.style.width=this.videoWidth/4+"px",j.style.height=this.videoHeight/4+"px",j.style.marginLeft=-this.videoWidth/4+"px",j.style.visibility="visible"},!1),j.srcObject=a,y.answer(a),y.on("stream",function(q){r=q,document.getElementById("video1").srcObject=r,i=!0}),y.on("close",function(){console.log("Closed!"),i=!1})}),n.on("error",function(y){y.type=="browser-incompatible"?alert("Navegador incompatível."):y.type=="invalid-id"?alert("Usuário inexistente."):y.type=="network"?(i=!1,console.log("Problema na conexão do usuário. Tentando novamente em 5 segundos."),setTimeout(c,5e3)):y.type=="peer-unavailable"&&(console.log("Usuário indisponível!"),i=!1)})}I.useEffect(()=>(c(),function(){clearInterval(o),u(),U("Desconectado!")}),[]);function u(){l(a,"audio"),l(a,"video"),l(r,"audio"),l(r,"video"),a=null,r=null;const y=document.getElementById("video1"),j=document.getElementById("video2");y&&(y.srcObject=null),j&&(j.srcObject=null),console.log("Stopped!"),i=!1}function l(y,j){y!=null&&y.getTracks().forEach(q=>{q.kind===j&&q.stop()})}function h(){var y=n.call("999123"+e.data.receiver.replaceAll(".","").replaceAll("-",""),a,d);y&&(y.on("stream",function(j){r=j,document.getElementById("video1").srcObject=r,i=!0}),y.on("close",function(){console.log("Closed!"),i=!1}))}function m(){if(a!=null&&!i)return h();a==null&&s({video:!0,audio:{autoGainControl:!1,echoCancellation:!1,googGainControl:!1,noiseSuppression:!1}},function(y){a=y;var j=document.getElementById("video2");j.addEventListener("loadedmetadata",function(q){j.style.width=this.videoWidth/4+"px",j.style.height=this.videoHeight/4+"px",j.style.marginLeft=-this.videoWidth/4+"px",j.style.visibility="visible"},!1),j.srcObject=a,h()},function(y){alert("Failed to get local stream.")})}function w(){return t.jsx("iframe",{width:"100%",height:700,style:{border:0},src:"https://us05web.zoom.us/j/82130251231?pwd=o46UhcNlDRq13oO1maHiaRLVOaxxnZ.1",allow:"camera; microphone; display-capture"})}return w()}function rn(e){F(`
223
+ `);function n(){for(var r=[],i=0;i<e.data.series.length;i++)r.push([e.data.series[i][0],e.data.series[i][1]]);return e.data.chart?t.jsx(ke,{type:e.data.chart,title:e.data.title,rows:r}):t.jsxs("div",{className:"statistics",children:[e.data.title&&t.jsx("h2",{"data-label":T(e.data.title),children:e.data.title}),t.jsx("table",{style:{width:"100%",borderSpacing:0},children:t.jsx("tbody",{children:r.map((o,s)=>t.jsx("tr",{children:o.map((d,c)=>c==0?t.jsx("th",{style:{textAlign:"left",lineHeight:"2rem",padding:5},className:s%2==0?"even":"odd",children:d},Math.random()):t.jsx("td",{className:s%2==0?"even":"odd",children:G(d)},Math.random()))},Math.random()))})})]})}function a(){for(var r=[],i=[],o=Object.keys(e.data.series),s=[],d=0;d<o.length;d++){d==0&&r.push("");for(var c=[o[d]],u=0,l=0;l<e.data.series[o[d]].length;l++){var h=e.data.series[o[d]];d==0&&r.push(h[l][0]),c.push(h[l][1]),u+=h[l][1],o.length>1&&(d==0?s.push(h[l][1]):s[l]+=h[l][1],l>0&&l==e.data.series[o[d]].length-1&&(d==0?s.push(u):s[l+1]+=u))}c.length>2&&(d==0&&r.push(""),c.push(u)),i.push(c)}return e.data.chart?t.jsx(ke,{type:e.data.chart,title:e.data.title,headers:r,rows:i}):t.jsxs("div",{className:"statistics",children:[e.data.title&&t.jsx("h2",{"data-label":T(e.data.title),children:e.data.title}),t.jsxs("table",{style:{width:"100%",borderSpacing:0},children:[r&&t.jsx("thead",{children:t.jsx("tr",{children:r.map(m=>t.jsx("th",{className:"bold",style:{textAlign:"left",padding:5},children:m},Math.random()))})}),t.jsxs("tbody",{children:[i.map((m,w)=>t.jsx("tr",{children:m.map((y,j)=>j==0?t.jsx("th",{className:w%2==0?"even":"odd",style:{textAlign:"left",padding:5},children:y},Math.random()):t.jsx("td",{align:"center",className:(j==m.length-1&&r&&r[r.length-1]==""?"bold":"")+" "+(w%2==0?"even":"odd"),children:G(y)},Math.random()))},Math.random())),s.length>0&&t.jsxs("tr",{children:[t.jsx("th",{}),s.map(m=>t.jsxs("td",{align:"center",className:"bold",children:[G(m)," "]},Math.random()))]},Math.random())]})]})]})}return Array.isArray(e.data.series)?n():a()}function Qt(){function e(i){var o=i.target;const s=o.querySelector(":scope > ul, :scope > li");if(s){s.offsetParent===null?o.querySelectorAll(":scope > ul, :scope > li, :scope > ul > li").forEach(function(u){u.style.display="block"}):o.querySelectorAll(":scope > ul, :scope > li").forEach(function(u){u.style.display="none"});const d=o.querySelector(":scope > i.fa-solid.fa-chevron-right"),c=o.querySelector(":scope > i.fa-solid.fa-chevron-up");return d&&(d.classList.remove("fa-chevron-right"),d.classList.add("fa-chevron-up")),c&&(c.classList.remove("fa-chevron-up"),c.classList.add("fa-chevron-right")),i.preventDefault(),i.stopPropagation(),i.cancelBubble=!0,!1}else{const d=document.querySelector("aside");d.style.display=window.innerWidth<800?"none":"inline-block"}}function n(i,o){const s={display:o==0?"block":"none",cursor:"pointer",paddingLeft:15,paddingRight:20,paddingTop:10,paddingBottom:10,lineHeight:"2rem",color:p.colors.primary},d={padding:5,fontSize:"1.2rem"};return i.url?t.jsx("li",{style:s,onClick:e,className:"item",children:t.jsxs(P,{href:i.url,dataLabel:T(i.label),style:{textDecoration:"none",display:"block",width:"100%"},children:[o==0&&t.jsx(C,{icon:i.icon||"dot-circle",style:d}),i.label]})},Math.random()):i.items.length>0&&t.jsxs("li",{onClick:e,style:s,"data-label":T(i.label),children:[o==0&&t.jsx(C,{icon:i.icon||"dot-circle",style:d}),i.label,t.jsx(C,{icon:"chevron-right",style:{float:"right",paddingTop:8}}),t.jsx("ul",{style:{display:"none",paddingLeft:15},children:i.items.map(function(c){return n(c,o+1)})})]},Math.random())}function a(){const i={padding:0};return window.application.menu.items.length>0&&t.jsx("ul",{style:i,children:window.application.menu.items.map(function(o){return n(o,0)})})}function r(){const i={marginTop:10,height:"100%"};return t.jsx("div",{style:i,className:"menu",children:a()})}return r()}function Zt(e){var n;function a(o){const s="=".repeat((4-o.length%4)%4),d=(o+s).replace(/\-/g,"+").replace(/_/g,"/"),c=window.atob(d),u=new Uint8Array(c.length);for(let l=0;l<c.length;++l)u[l]=c.charCodeAt(l);return u}function r(){"serviceWorker"in navigator&&"PushManager"in window?navigator.serviceWorker.getRegistration().then(function(o){if(o){const s=a("BFvGgHYReJWJuSyOChUCEs1VYqZVs3TLJAvSkMW8jVqqgdWVbArBL4Kd6ibPKWlQo8Q3BuWwomybqwzs-1Ic8GU");o.pushManager.getSubscription(function(d){d&&(d.unsubscribe(),console.log("unsubscribed"))}),o.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:s}).then(function(d){if(console.log(d),n=JSON.stringify(d),console.log(n),d){alert("Notificação ativada com sucesso.");var c=new FormData;c.append("subscription",n),R("POST","/api/pushsubscription/subscribe/",function(u){console.log(u)},c)}else{alert("Problema ao ativar notificações.");return}}).catch(function(d){alert("Problema ao tentar ativar notificações."),console.log("Failed to subscribe the user: ",d)})}else console.log("No registered service worker.")}).catch(function(o){alert("Erro"),console.error("Service Worker Error",o)}):alert("Push messaging is not supported")}function i(){return t.jsx(C,{onClick:r,icon:"bell",style:{cursor:"pointer",color:p.colors.primary}})}return i()}function Kt(e,n){var a={startX:0,startY:0,endX:0,endY:0,minX:30,maxX:30,minY:50,maxY:60},r=null;e.addEventListener("touchstart",function(i){var o=i.touches[0];a.startX=o.screenX,a.startY=o.screenY}),e.addEventListener("touchmove",function(i){var o=i.touches[0];a.endX=o.screenX,a.endY=o.screenY}),e.addEventListener("touchend",function(i){Math.abs(a.endX-a.startX)>a.minX&&Math.abs(a.endY-a.startY)<a.maxY?r=a.endX>a.startX?"right":"left":Math.abs(a.endY-a.startY)>a.minY&&Math.abs(a.endX-a.startX)<a.maxX&&(r=a.endY>a.startY?"down":"up"),r!==null&&typeof n=="function"&&n(e,r)})}function en(e){function n(){if(window.innerWidth>800)return;const a={position:"fixed",display:"flex",width:50,height:50,backgroundColor:p.colors.primary,color:"white",right:10,borderRadius:"50%",cursor:"pointer"},r={paddingLeft:14,paddingTop:12,fontSize:"1.8rem"};return t.jsxs(t.Fragment,{children:[t.jsx("div",{style:{...a,bottom:100},onClick:()=>history.back(),children:t.jsx(C,{icon:"arrow-left",style:r})}),t.jsx("div",{style:{...a,bottom:20},onClick:()=>window.scrollTo({top:0,behavior:"smooth"}),children:t.jsx(C,{icon:"arrow-up",style:r})})]})}return n()}function tn(e){const[n,a]=I.useState(e.data);window.loaddata=i=>a(i);function r(){const i={minHeight:400,margin:window.innerWidth>800?20:5};return t.jsx("div",{style:i,id:"container",children:t.jsx(x,{data:n},Math.random())})}return r()}function nn(e){I.useEffect(()=>{const l=localStorage.getItem("message");l&&(localStorage.removeItem("message"),U(l)),window.addEventListener("resize",()=>{const h=document.querySelector("aside");h&&(h.style.display=window.innerWidth<800?"none":"inline-block")}),Kt(document.querySelector("main"),function(h,m){console.log(h,m)})},[]);function a(){const l=document.querySelector("aside");l&&(l.style.display=l.style.display=="none"?"inline-block":"none")}function r(l){const h=l.target.tagName=="A"?l.target:l.target.closest("a");l.preventDefault(),window.load(h.href)}function i(){const l={display:"flex",width:"100%",justifyContent:"space-between",boxShadow:"0px 15px 10px -15px #DDD",overflowX:"hidden"},h={choices:"/api/search/",help_text:null,label:null,mask:null,name:"search",required:!1,type:"choice",icon:"search"};return e.data.navbar?t.jsxs("div",{style:l,children:[t.jsxs("div",{style:{padding:20},children:[e.data.menu&&e.data.menu.items.length>0&&t.jsx(C,{icon:"navicon",style:{fontSize:"1.5rem",marginRight:10,cursor:"pointer"},onClick:a}),t.jsxs("a",{className:"brand",href:"/app/home/",onClick:r,style:{fontSize:"1.5rem",textDecoration:"none"},children:[e.data.navbar.logo&&t.jsx("img",{src:e.data.navbar.logo,height:20,style:{marginRight:10}}),t.jsx("span",{children:e.data.navbar.title})]}),t.jsx("div",{children:e.data.navbar.subtitle})]}),t.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[e.data.navbar.adder.length>0&&t.jsx("div",{style:{padding:10},children:t.jsx(re,{actions:e.data.navbar.adder,position:{},dataLabel:"plus",children:t.jsx(C,{icon:"plus",style:{cursor:"pointer",color:p.colors.primary}})})}),t.jsx("div",{style:{padding:10},children:t.jsx(Zt,{})}),e.data.navbar.toolbar&&window.innerWidth>800&&e.data.navbar.toolbar.length>0&&t.jsx("div",{className:"toolbar",children:e.data.navbar.toolbar.map(function(m){return t.jsx(H,{data:m,primary:!0,compact:!0},Math.random())})}),e.data.navbar.actions&&e.data.navbar.actions.length>0&&e.data.navbar.actions.map(function(m){return m.url=="/api/auth/login/"&&(e.data.navbar.user||document.location.pathname=="/app/auth/login/")?null:t.jsx("div",{children:t.jsx(H,{data:m,primary:!0},Math.random())},Math.random())}),e.data.oauth&&e.data.oauth.length>0&&e.data.navbar.user==null&&e.data.oauth.map(function(m){return t.jsx(P,{href:m.url,style:{marginRight:10},children:m.label},Math.random())}),e.data.navbar.tools.length>0&&t.jsx("div",{style:{padding:10},children:t.jsx(re,{actions:e.data.navbar.tools,position:{},dataLabel:"tools",children:t.jsx(C,{icon:"tools",style:{cursor:"pointer",color:p.colors.primary}})})}),e.data.navbar.settings.length>0&&t.jsx("div",{style:{padding:10},children:t.jsx(re,{actions:e.data.navbar.settings,position:{},dataLabel:"gear",children:t.jsx(C,{icon:"gear",style:{cursor:"pointer",color:p.colors.primary}})})}),window.innerWidth>800&&e.data.navbar.user&&e.data.navbar.search&&t.jsx("div",{children:t.jsx(Le,{data:h,style:{padding:10},onSelect:m=>document.location.href=X(m.id)})}),e.data.navbar.user&&e.data.navbar.usermenu.length>0&&t.jsx("div",{style:{padding:10},children:t.jsx(re,{actions:e.data.navbar.usermenu,position:{},dataLabel:T(e.data.navbar.user),children:t.jsx("img",{src:e.data.navbar.photo||"/static/images/user.svg",style:{width:30,height:30,borderRadius:"50%",objectFit:"cover",backgroundColor:p.colors.primary}})})})]})]}):null}function o(){return window.application.menu&&window.application.menu.items.length>0&&t.jsx("aside",{style:{verticalAlign:"top",maxWidth:"350px",minWidth:"350px",display:window.innerWidth<800?"none":"block",float:"left",minHeight:window.innerHeight+"px",backgroundColor:"white"},children:t.jsx(Qt,{})})}function s(){const l={margin:15,display:"flex",justifyContent:"space-between"},h={color:p.colors.primary};return e.data.navbar&&e.data.navbar.user&&t.jsxs("div",{style:l,children:[t.jsxs("div",{children:[t.jsx(P,{href:"/app/dashboard/",style:{marginRight:10},children:t.jsx(C,{icon:"home",style:h})}),"Área Administrativa"]}),t.jsx("div",{title:e.data.navbar.roles,children:e.data.navbar.user})]})}function d(){return t.jsxs("main",{id:"main",style:{width:"100%",overflowX:"auto"},children:[s(),t.jsx(tn,{data:e.data.content}),t.jsx("footer",{children:c()}),t.jsx(en,{})]})}function c(){return e.data.footer?t.jsxs("div",{align:"center",children:[t.jsx("div",{children:window.application.sponsors&&window.application.sponsors.length>0&&t.jsx("div",{children:window.application.sponsors.map(function(l){return t.jsx("img",{src:l,style:{height:30,padding:5}},Math.random())})})}),t.jsx("div",{children:Intl.DateTimeFormat().resolvedOptions().timeZone}),t.jsx("div",{children:"Todos os direitos reservados"}),t.jsx("div",{children:e.data.footer.version})]}):null}function u(){return t.jsxs("div",{children:[t.jsx("header",{children:i()}),t.jsxs("div",{style:{width:"100%",minHeight:window.innerHeight-70,display:"flex"},children:[o(),d()]})]})}return u()}function an(e){var n=null,a=null,r=null,i=!1,o=null,s=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia,d={constraints:{mandatory:{OfferToReceiveAudio:!0,OfferToReceiveVideo:!0},offerToReceiveAudio:1,offerToReceiveVideo:1},sdpTransform:y=>y.replace("a=fmtp:111 minptime=10;useinbandfec=1","a=fmtp:111 ptime=5;useinbandfec=1;stereo=1;maxplaybackrate=48000;maxaveragebitrat=128000;sprop-stereo=1")};function c(){console.log("Trying to connect..."),n=new Peer("999123"+e.data.caller.replaceAll(".","").replaceAll("-","")),n.on("open",function(y){document.getElementById("callerid").innerHTML=e.data.caller,m(),o=setInterval(function(){i?U("Em conexão com "+e.data.receiver+"."):(U("Tentando estabeler conexão com "+e.data.receiver+"..."),m())},15e3)}),n.on("call",function(y){var j=document.getElementById("video2");j.addEventListener("loadedmetadata",function(q){j.style.width=this.videoWidth/4+"px",j.style.height=this.videoHeight/4+"px",j.style.marginLeft=-this.videoWidth/4+"px",j.style.visibility="visible"},!1),j.srcObject=a,y.answer(a),y.on("stream",function(q){r=q,document.getElementById("video1").srcObject=r,i=!0}),y.on("close",function(){console.log("Closed!"),i=!1})}),n.on("error",function(y){y.type=="browser-incompatible"?alert("Navegador incompatível."):y.type=="invalid-id"?alert("Usuário inexistente."):y.type=="network"?(i=!1,console.log("Problema na conexão do usuário. Tentando novamente em 5 segundos."),setTimeout(c,5e3)):y.type=="peer-unavailable"&&(console.log("Usuário indisponível!"),i=!1)})}I.useEffect(()=>(c(),function(){clearInterval(o),u(),U("Desconectado!")}),[]);function u(){l(a,"audio"),l(a,"video"),l(r,"audio"),l(r,"video"),a=null,r=null;const y=document.getElementById("video1"),j=document.getElementById("video2");y&&(y.srcObject=null),j&&(j.srcObject=null),console.log("Stopped!"),i=!1}function l(y,j){y!=null&&y.getTracks().forEach(q=>{q.kind===j&&q.stop()})}function h(){var y=n.call("999123"+e.data.receiver.replaceAll(".","").replaceAll("-",""),a,d);y&&(y.on("stream",function(j){r=j,document.getElementById("video1").srcObject=r,i=!0}),y.on("close",function(){console.log("Closed!"),i=!1}))}function m(){if(a!=null&&!i)return h();a==null&&s({video:!0,audio:{autoGainControl:!1,echoCancellation:!1,googGainControl:!1,noiseSuppression:!1}},function(y){a=y;var j=document.getElementById("video2");j.addEventListener("loadedmetadata",function(q){j.style.width=this.videoWidth/4+"px",j.style.height=this.videoHeight/4+"px",j.style.marginLeft=-this.videoWidth/4+"px",j.style.visibility="visible"},!1),j.srcObject=a,h()},function(y){alert("Failed to get local stream.")})}function w(){return t.jsx("iframe",{width:"100%",height:700,style:{border:0},src:"https://us05web.zoom.us/j/82130251231?pwd=o46UhcNlDRq13oO1maHiaRLVOaxxnZ.1",allow:"camera; microphone; display-capture"})}return w()}function rn(e){F(`
224
224
  .container {
225
225
  position: relative;
226
226
  width: 100%;
@@ -237,4 +237,4 @@ import{j as t,c as Y,r as I,R as Be}from"./react.min.js";const p={colors:{primar
237
237
  height: 100%;
238
238
  border: none;
239
239
  }
240
- `);function n(){const r=`/zoom/?token=${e.data.token}&username=${e.data.username}`;return t.jsx("div",{className:"container",children:t.jsx("iframe",{onLoad:a,className:"responsive-iframe",src:r})})}function a(r){r.target.contentWindow.location.href.indexOf("/zoom/")<0&&(r.target.parentNode.style.display="none")}return n()}function on(e){const n={color:e.data.color};function a(){return t.jsx("div",{style:n,children:e.data.text})}return a()}var ie,xe={};const ln="/api/application/",Se=localStorage.getItem("application");function x(e){if(e.data){const n=xe[e.data.type];return n?Be.createElement(n,{data:e.data}):t.jsx("div",{children:JSON.stringify(e.data)})}}x.register=function(e,n){xe[n.toLowerCase()]=e};x.render=function(e){ie=e,document.location.pathname=="/"?localStorage.getItem("token")?window.reload("/app/dashboard/"):window.reload("/app/home/"):document.location.pathname=="/app/auth/login/"&&(localStorage.getItem("token")||localStorage.getItem("application"))?(localStorage.removeItem("token"),localStorage.removeItem("application"),document.location.reload()):window.reload(document.location.href)};x.register(bt,"Counter");x.register(At,"Form");x.register(Ft,"QuerySet");x.register(Qe,"Fieldset");x.register(K,"Field");x.register(et,"Object");x.register(tt,"Section");x.register(at,"Group");x.register(Jt,"Statistics");x.register(lt,"Image");x.register(ot,"Banner");x.register(dt,"Map");x.register(st,"Steps");x.register(xt,"QrCode");x.register(Ie,"Badge");x.register(ut,"Status");x.register(ct,"Progress");x.register(Ae,"Color");x.register(ht,"Boxes");x.register(yt,"Indicators");x.register(mt,"Shell");x.register(ft,"FileLink");x.register(gt,"FilePreview");x.register(We,"Response");x.register(nn,"Application");x.register(Oe,"IconSet");x.register(vt,"Grid");x.register(Xe,"Rows");x.register($e,"Cards");x.register(Je,"Timeline");x.register(Ne,"Scheduler");x.register(an,"WebConf");x.register(on,"Text");x.register(it,"Html");x.register(rn,"ZoomMeet");window.addEventListener("popstate",e=>{window.reload(e.currentTarget.location.href)});window.reload=function(e){e==null&&(e=document.location.href);const n=e.split("/app/")[1].split("/")[0];xe[n]?O("GET",z(e),function(a){ie.render(t.jsx(x,{data:{type:n,data:a}}))}):(e!=document.location.href&&window.history.pushState({url:e},"",e),Se?(window.application=JSON.parse(Se),O("GET",z(e),function(a){window.application.content=a,ie.render(t.jsx(x,{data:window.application},Math.random()))})):O("GET",ln,function(r){window.application=r,localStorage.setItem("application",JSON.stringify(window.application)),O("GET",z(e),function(i){window.application.content=i,ie.render(t.jsx(x,{data:window.application},Math.random()))})}))};window.load=function(e){e.indexOf(window.origin)>=0||e.startsWith("/")?O("GET",z(e),function(n){e!=document.location.href&&e!=document.location.pathname&&window.history.pushState({url:e},"",e),window.loaddata(n),window.scrollTo({top:0,behavior:"smooth"})}):document.location.href=e};x.render(Y.createRoot(document.getElementById("root")));
240
+ `);function n(){const r=`/zoom/?token=${e.data.token}&username=${e.data.username}`;return t.jsx("div",{className:"container",children:t.jsx("iframe",{onLoad:a,className:"responsive-iframe",src:r})})}function a(r){r.target.contentWindow.location.href.indexOf("/zoom/")<0&&(r.target.parentNode.style.display="none")}return n()}function on(e){const n={color:e.data.color};function a(){return t.jsx("div",{style:n,children:e.data.text})}return a()}var oe,ye={};const ln="/api/application/",Se=localStorage.getItem("application");function x(e){if(e.data){const n=ye[e.data.type];return n?Be.createElement(n,{data:e.data}):t.jsx("div",{children:JSON.stringify(e.data)})}}x.register=function(e,n){ye[n.toLowerCase()]=e};x.render=function(e){oe=e,document.location.pathname=="/"?localStorage.getItem("token")?window.reload("/app/dashboard/"):window.reload("/app/home/"):document.location.pathname=="/app/auth/login/"&&(localStorage.getItem("token")||localStorage.getItem("application"))?(localStorage.removeItem("token"),localStorage.removeItem("application"),document.location.reload()):window.reload(document.location.href)};x.register(bt,"Counter");x.register(At,"Form");x.register(Ft,"QuerySet");x.register(Qe,"Fieldset");x.register(ee,"Field");x.register(et,"Object");x.register(tt,"Section");x.register(at,"Group");x.register(Jt,"Statistics");x.register(lt,"Image");x.register(ot,"Banner");x.register(dt,"Map");x.register(st,"Steps");x.register(xt,"QrCode");x.register(Ie,"Badge");x.register(ut,"Status");x.register(ct,"Progress");x.register(Ae,"Color");x.register(ht,"Boxes");x.register(yt,"Indicators");x.register(mt,"Shell");x.register(ft,"FileLink");x.register(gt,"FilePreview");x.register(We,"Response");x.register(nn,"Application");x.register(Oe,"IconSet");x.register(vt,"Grid");x.register(Xe,"Rows");x.register($e,"Cards");x.register(Je,"Timeline");x.register(Ne,"Scheduler");x.register(an,"WebConf");x.register(on,"Text");x.register(it,"Html");x.register(rn,"ZoomMeet");window.addEventListener("popstate",e=>{window.reload(e.currentTarget.location.href)});window.reload=function(e){e==null&&(e=document.location.href);const n=e.split("/app/")[1].split("/")[0];ye[n]?R("GET",z(e),function(a){oe.render(t.jsx(x,{data:{type:n,data:a}}))}):(e!=document.location.href&&window.history.pushState({url:e},"",e),Se?(window.application=JSON.parse(Se),R("GET",z(e),function(a){window.application.content=a,oe.render(t.jsx(x,{data:window.application},Math.random()))})):R("GET",ln,function(r){window.application=r,localStorage.setItem("application",JSON.stringify(window.application)),R("GET",z(e),function(i){window.application.content=i,oe.render(t.jsx(x,{data:window.application},Math.random()))})}))};window.load=function(e){e.indexOf(window.origin)>=0||e.startsWith("/")?R("GET",z(e),function(n){e!=document.location.href&&e!=document.location.pathname&&window.history.pushState({url:e},"",e),window.loaddata(n),window.scrollTo({top:0,behavior:"smooth"})}):document.location.href=e};x.render(Y.createRoot(document.getElementById("root")));
@@ -23,7 +23,7 @@ from django.http import FileResponse, HttpResponseNotFound
23
23
  @cache_control(max_age=0, no_cache=True, no_store=True, must_revalidate=True)
24
24
  def index(request, path=None):
25
25
  # host.docker.internal
26
- vite = not socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect_ex(('localhost',5173))
26
+ vite = not socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect_ex(('127.0.0.1',5173))
27
27
  return render(request, 'index.html', dict(vite=vite, application=APPLICATON))
28
28
 
29
29
  def service_worker(request):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: slthcore
3
- Version: 0.4.3
3
+ Version: 0.4.5
4
4
  Summary: API generator based on yml file
5
5
  Home-page: https://github.com/brenokcc
6
6
  Author: Breno Silva
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes