slthcore 0.2.5__tar.gz → 0.2.7__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.
- {slthcore-0.2.5/slthcore.egg-info → slthcore-0.2.7}/PKG-INFO +1 -1
- {slthcore-0.2.5 → slthcore-0.2.7}/setup.py +1 -1
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/endpoints/__init__.py +1 -1
- slthcore-0.2.7/slth/endpoints/profile.py +36 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/migrations/0005_alter_profile_photo.py +1 -1
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/models.py +1 -1
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/printer.py +1 -1
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/static/js/slth.min.js +1 -1
- {slthcore-0.2.5 → slthcore-0.2.7/slthcore.egg-info}/PKG-INFO +1 -1
- {slthcore-0.2.5 → slthcore-0.2.7}/slthcore.egg-info/SOURCES.txt +1 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/MANIFEST.in +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/setup.cfg +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/__init__.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/apps.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/cmd/configure/__main__.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/cmd/init/__main__.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/cmd/init/__pycache__/__main__.cpython-312.pyc +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/cmd/init/boilerplate/.DS_Store +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/cmd/init/boilerplate/.gitignore +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/cmd/init/boilerplate/backend/api/__init__.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/cmd/init/boilerplate/backend/api/asgi.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/cmd/init/boilerplate/backend/api/endpoints/__init__.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/cmd/init/boilerplate/backend/api/models.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/cmd/init/boilerplate/backend/api/settings.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/cmd/init/boilerplate/backend/api/tests.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/cmd/init/boilerplate/backend/api/urls.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/cmd/init/boilerplate/backend/api/wsgi.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/cmd/init/boilerplate/backend/application.yml +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/cmd/init/boilerplate/backend/entrypoint.sh +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/cmd/init/boilerplate/backend/manage.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/cmd/init/boilerplate/backend/requirements.txt +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/cmd/init/boilerplate/base.env +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/cmd/init/boilerplate/docker-compose.yml +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/cmd/init/boilerplate/frontend/package.json +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/cmd/init/boilerplate/frontend/src/main.jsx +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/cmd/init/boilerplate/frontend/vite.config.js +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/cmd/init/boilerplate/local.env +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/cmd/init/boilerplate/run.sh +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/cmd/init/boilerplate/selenium/run.sh +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/cmd/init/boilerplate/test.sh +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/components.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/db/__init__.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/db/generic.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/db/models.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/endpoints/auth.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/endpoints/deletion.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/endpoints/dev.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/endpoints/email.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/endpoints/job.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/endpoints/log.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/endpoints/pushsubscription.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/endpoints/report.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/endpoints/role.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/endpoints/task.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/endpoints/user.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/exceptions.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/factory.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/forms.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/management/__init__.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/management/commands/__init__.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/management/commands/integration_test.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/management/commands/sync.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/management/commands/worker.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/middleware/__init__.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/middleware/timezone.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/migrations/0001_initial.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/migrations/0002_email_role_pushsubscription_error.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/migrations/0003_rename_photo_profile_alter_profile_options.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/migrations/0004_alter_profile_photo.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/migrations/0006_user.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/migrations/0007_deletion_log.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/migrations/0008_alter_deletion_datetime_alter_log_datetime.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/migrations/0009_remove_email_from_email_email_action_email_attempt_and_more.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/migrations/0010_email_key_alter_email_action_alter_email_attempt_and_more.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/migrations/__init__.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/notifications.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/oauth.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/pdf/__init__.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/pdf/tests.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/permissions.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/queryset.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/roles.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/selenium/__init__.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/selenium/browser.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/serializer.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/static/.DS_Store +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/static/css/.DS_Store +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/static/css/slth.css +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/static/js/index.min.js +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/static/js/react.min.js +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/statistics.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/tasks.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/templates/email.html +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/templates/index.html +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/templates/report.html +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/templates/service-worker.js +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/templates/signature.html +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/tests.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/threadlocal.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/urls.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/utils.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slth/views.py +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slthcore.egg-info/dependency_links.txt +0 -0
- {slthcore-0.2.5 → slthcore-0.2.7}/slthcore.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import io
|
|
2
2
|
import inspect
|
|
3
|
-
from weasyprint import HTML
|
|
4
3
|
from ..models import Log
|
|
5
4
|
from django.apps import apps
|
|
6
5
|
from typing import TypeVar, Generic
|
|
@@ -130,6 +129,7 @@ class Endpoint(metaclass=EnpointMetaclass):
|
|
|
130
129
|
for template in templates:
|
|
131
130
|
html = render_to_string(template, data)
|
|
132
131
|
if pdf:
|
|
132
|
+
from weasyprint import HTML
|
|
133
133
|
doc = HTML(string=html).render()
|
|
134
134
|
pages.extend(doc.pages)
|
|
135
135
|
new_doc = doc.copy(pages=pages)
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
from .. import endpoints
|
|
2
|
+
from .. import forms
|
|
3
|
+
from ..models import Profile
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class UserProfile(endpoints.Endpoint):
|
|
7
|
+
photo = forms.ImageField(label='Foto', required=False)
|
|
8
|
+
password1 = forms.CharField(label='Informe a Senha', widget=forms.PasswordInput(), required=False)
|
|
9
|
+
password2 = forms.CharField(label='Confirme a Senha', widget=forms.PasswordInput(), required=False)
|
|
10
|
+
|
|
11
|
+
class Meta:
|
|
12
|
+
verbose_name = 'Editar Perfil'
|
|
13
|
+
|
|
14
|
+
def get(self):
|
|
15
|
+
return (
|
|
16
|
+
self.formfactory(self.get_profile())
|
|
17
|
+
.fieldset('Dados Gerais', ('photo',))
|
|
18
|
+
.fieldset('Acesso ao Sistema', (('password1', 'password2'),))
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
def post(self):
|
|
22
|
+
password1 = self.cleaned_data['password1']
|
|
23
|
+
password2 = self.cleaned_data['password2']
|
|
24
|
+
if password1 == password2:
|
|
25
|
+
if password1 and password2:
|
|
26
|
+
self.request.user.set_password(password1)
|
|
27
|
+
self.request.user.save()
|
|
28
|
+
else:
|
|
29
|
+
raise forms.ValidationError('Repita a mesma senha.')
|
|
30
|
+
return super().post()
|
|
31
|
+
|
|
32
|
+
def get_profile(self):
|
|
33
|
+
return Profile.objects.get_or_create(user=self.request.user, defaults=dict(photo=None))[0]
|
|
34
|
+
|
|
35
|
+
def check_permission(self):
|
|
36
|
+
return self.request.user.is_authenticated
|
|
@@ -14,6 +14,6 @@ class Migration(migrations.Migration):
|
|
|
14
14
|
migrations.AlterField(
|
|
15
15
|
model_name='profile',
|
|
16
16
|
name='photo',
|
|
17
|
-
field=slth.db.models.ImageField(blank=True, null=True, upload_to='', verbose_name='Foto'),
|
|
17
|
+
field=slth.db.models.ImageField(blank=True, null=True, upload_to='profile', verbose_name='Foto'),
|
|
18
18
|
),
|
|
19
19
|
]
|
|
@@ -396,7 +396,7 @@ class Email(models.Model):
|
|
|
396
396
|
class Profile(models.Model):
|
|
397
397
|
|
|
398
398
|
user = models.OneToOneField(settings.AUTH_USER_MODEL, on_delete=models.CASCADE)
|
|
399
|
-
photo = models.ImageField(verbose_name=_("Foto"), width=500, blank=True, null=True, extensions=['png', 'jpg', 'jpeg'])
|
|
399
|
+
photo = models.ImageField(verbose_name=_("Foto"), upload_to='profile', width=500, blank=True, null=True, extensions=['png', 'jpg', 'jpeg'])
|
|
400
400
|
|
|
401
401
|
class Meta:
|
|
402
402
|
verbose_name = _("Profile")
|
|
@@ -2,7 +2,6 @@ import io
|
|
|
2
2
|
import qrcode
|
|
3
3
|
import base64
|
|
4
4
|
from datetime import datetime
|
|
5
|
-
from weasyprint import HTML
|
|
6
5
|
from django.conf import settings
|
|
7
6
|
from django.template.loader import render_to_string
|
|
8
7
|
|
|
@@ -38,6 +37,7 @@ def image_base64(image_bytes):
|
|
|
38
37
|
|
|
39
38
|
|
|
40
39
|
def to_pdf(data, template, file_name=None, signature=None):
|
|
40
|
+
from weasyprint import HTML
|
|
41
41
|
templates = []
|
|
42
42
|
buffer = io.BytesIO()
|
|
43
43
|
templates.append(template)
|
|
@@ -217,7 +217,7 @@ import{j as t,c as P,r as N,R as Ie}from"./react.min.js";const p={colors:{primar
|
|
|
217
217
|
.statistics .odd {
|
|
218
218
|
background-color: #EEE;
|
|
219
219
|
}
|
|
220
|
-
`);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(be,{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,d)=>t.jsx("tr",{children:o.map((c,s)=>s==0?t.jsx("th",{style:{textAlign:"left",lineHeight:"2rem",padding:5},className:d%2==0?"even":"odd",children:c},Math.random()):t.jsx("td",{className:d%2==0?"even":"odd",children:H(c)},Math.random()))},Math.random()))})})]})}function a(){for(var r=[],i=[],o=Object.keys(e.data.series),d=[],c=0;c<o.length;c++){c==0&&r.push("");for(var s=[o[c]],u=0,l=0;l<e.data.series[o[c]].length;l++){var m=e.data.series[o[c]];c==0&&r.push(m[l][0]),s.push(m[l][1]),u+=m[l][1],o.length>1&&(c==0?d.push(m[l][1]):d[l]+=m[l][1],l>0&&l==e.data.series[o[c]].length-1&&(c==0?d.push(u):d[l+1]+=u))}s.length>2&&(c==0&&r.push(""),s.push(u)),i.push(s)}return e.data.chart?t.jsx(be,{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(f=>t.jsx("th",{className:"bold",style:{textAlign:"left",padding:5},children:f},Math.random()))})}),t.jsxs("tbody",{children:[i.map((f,w)=>t.jsx("tr",{children:f.map((y,b)=>b==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:(b==f.length-1&&r&&r[r.length-1]==""?"bold":"")+" "+(w%2==0?"even":"odd"),children:H(y)},Math.random()))},Math.random())),d.length>0&&t.jsxs("tr",{children:[t.jsx("th",{}),d.map(f=>t.jsxs("td",{align:"center",className:"bold",children:[H(f)," "]},Math.random()))]},Math.random())]})]})]})}return Array.isArray(e.data.series)?n():a()}function Yt(){function e(){const o={width:150,height:150,borderRadius:"50%",objectFit:"cover",backgroundColor:p.colors.success};return window.application.menu.user&&t.jsxs("div",{align:"center",children:[window.application.menu.image&&t.jsx("div",{children:t.jsx("img",{src:window.application.menu.image,style:o})}),t.jsx("div",{children:t.jsx(F,{dataLabel:"Editar Perfil",href:"/api/editprofile/",style:{textDecoration:"none"},children:window.application.menu.user})})]})}function n(o){var d=o.target;const c=d.querySelector(":scope > ul, :scope > li");if(c){c.offsetParent===null?d.querySelectorAll(":scope > ul, :scope > li, :scope > ul > li").forEach(function(l){l.style.display="block"}):d.querySelectorAll(":scope > ul, :scope > li").forEach(function(l){l.style.display="none"});const s=d.querySelector(":scope > i.fa-solid.fa-chevron-right"),u=d.querySelector(":scope > i.fa-solid.fa-chevron-up");return s&&(s.classList.remove("fa-chevron-right"),s.classList.add("fa-chevron-up")),u&&(u.classList.remove("fa-chevron-up"),u.classList.add("fa-chevron-right")),o.preventDefault(),o.stopPropagation(),o.cancelBubble=!0,!1}else{const s=document.querySelector("aside");s.style.display=window.innerWidth<800?"none":"inline-block"}}function a(o,d){const c={display:d==0?"block":"none",cursor:"pointer",paddingLeft:15,paddingRight:20,paddingTop:10,paddingBottom:10,lineHeight:"2rem",color:p.colors.primary},s={padding:5,fontSize:"1.2rem"};return o.url?t.jsx("li",{style:c,onClick:n,className:"item",children:t.jsxs(F,{href:o.url,dataLabel:T(o.label),style:{textDecoration:"none",display:"block",width:"100%"},children:[d==0&&t.jsx(E,{icon:o.icon||"dot-circle",style:s}),o.label]})},Math.random()):o.items.length>0&&t.jsxs("li",{onClick:n,style:c,"data-label":T(o.label),children:[d==0&&t.jsx(E,{icon:o.icon||"dot-circle",style:s}),o.label,t.jsx(E,{icon:"chevron-right",style:{float:"right",paddingTop:8}}),t.jsx("ul",{style:{display:"none",paddingLeft:15},children:o.items.map(function(u){return a(u,d+1)})})]},Math.random())}function r(){const o={padding:0};return window.application.menu.items.length>0&&t.jsx("ul",{style:o,children:window.application.menu.items.map(function(d){return a(d,0)})})}function i(){const o={marginTop:10,height:"100%",borderRight:"solid 1px #EEE"};return t.jsxs("div",{style:o,className:"menu",children:[e(),r()]})}return i()}function Vt(e){var n;function a(o){const d="=".repeat((4-o.length%4)%4),c=(o+d).replace(/\-/g,"+").replace(/_/g,"/"),s=window.atob(c),u=new Uint8Array(s.length);for(let l=0;l<s.length;++l)u[l]=s.charCodeAt(l);return u}function r(){"serviceWorker"in navigator&&"PushManager"in window?navigator.serviceWorker.getRegistration().then(function(o){if(o){const d=a("BFvGgHYReJWJuSyOChUCEs1VYqZVs3TLJAvSkMW8jVqqgdWVbArBL4Kd6ibPKWlQo8Q3BuWwomybqwzs-1Ic8GU");o.pushManager.getSubscription(function(c){c&&(c.unsubscribe(),console.log("unsubscribed"))}),o.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:d}).then(function(c){if(console.log(c),n=JSON.stringify(c),console.log(n),c){alert("Notificação ativada com sucesso.");var s=new FormData;s.append("subscription",n),B("POST","/api/pushsubscription/subscribe/",function(u){console.log(u)},s)}else{alert("Problema ao ativar notificações.");return}}).catch(function(c){alert("Problema ao tentar ativar notificações."),console.log("Failed to subscribe the user: ",c)})}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(E,{onClick:r,icon:"bell",style:{cursor:"pointer",color:p.colors.primary}})}return i()}function Xt(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 $t(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(E,{icon:"arrow-left",style:r})}),t.jsx("div",{style:{...a,bottom:20},onClick:()=>window.scrollTo({top:0,behavior:"smooth"}),children:t.jsx(E,{icon:"arrow-up",style:r})})]})}return n()}function Jt(e){const[n,a]=N.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 Qt(e){N.useEffect(()=>{const l=localStorage.getItem("message");l&&(localStorage.removeItem("message"),z(l)),window.addEventListener("resize",()=>{const m=document.querySelector("aside");m&&(m.style.display=window.innerWidth<800?"none":"inline-block")}),Xt(document.querySelector("main"),function(m,f){console.log(m,f)})},[]);function a(){const l=document.querySelector("aside"),m=document.querySelector("main");l.style.display=l.style.display=="none"?"inline-block":"none",m.style.width=l.style.display=="none"?"100%":"calc(100% - 350px)"}function r(l){const m=l.target.tagName=="A"?l.target:l.target.closest("a");l.preventDefault(),window.load(m.href)}function i(){const l={display:"flex",width:"100%",justifyContent:"space-between",boxShadow:"0px 15px 10px -15px #DDD",overflowX:"hidden"},m={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&&t.jsx(E,{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(ne,{actions:e.data.navbar.adder,position:{},dataLabel:"plus",children:t.jsx(E,{icon:"plus",style:{cursor:"pointer",color:p.colors.primary}})})}),t.jsx("div",{style:{padding:10},children:t.jsx(Vt,{})}),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(f){return t.jsx(W,{data:f,primary:!0,compact:!0},Math.random())})}),e.data.navbar.actions&&e.data.navbar.actions.length>0&&e.data.navbar.actions.map(function(f){return f.url=="/api/auth/login/"&&(e.data.navbar.user||document.location.pathname=="/app/auth/login/")?null:t.jsx("div",{children:t.jsx(W,{data:f,primary:!0},Math.random())},Math.random())}),e.data.oauth&&e.data.oauth.length>0&&e.data.navbar.user==null&&e.data.oauth.map(function(f){return t.jsx(F,{href:f.url,style:{marginRight:10},children:f.label},Math.random())}),e.data.navbar.tools.length>0&&t.jsx("div",{style:{padding:10},children:t.jsx(ne,{actions:e.data.navbar.tools,position:{},dataLabel:"tools",children:t.jsx(E,{icon:"tools",style:{cursor:"pointer",color:p.colors.primary}})})}),e.data.navbar.settings.length>0&&t.jsx("div",{style:{padding:10},children:t.jsx(ne,{actions:e.data.navbar.settings,position:{},dataLabel:"gear",children:t.jsx(E,{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(Te,{data:m,style:{padding:10},onSelect:f=>document.location.href=V(f.id)})}),e.data.navbar.user&&e.data.navbar.usermenu.length>0&&t.jsx("div",{style:{padding:10},children:t.jsx(ne,{actions:e.data.navbar.usermenu,position:{},dataLabel:T(e.data.navbar.user),children:t.jsx("img",{src:"/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":"inline-block"},children:t.jsx(Yt,{})})}function d(){const l={margin:15,display:"flex",justifyContent:"space-between"},m={color:p.colors.primary};return e.data.navbar&&e.data.navbar.user&&t.jsxs("div",{style:l,children:[t.jsxs("div",{children:[t.jsx(F,{href:"/app/dashboard/",style:{marginRight:10},children:t.jsx(E,{icon:"home",style:m})}),"Área Administrativa"]}),t.jsx("div",{title:e.data.navbar.roles,children:e.data.navbar.user})]})}function c(){const l=e.data.menu&&e.data.menu.items.length>0?350:0;return t.jsxs("main",{id:"main",style:{display:"inline-block",width:"calc(100% - "+l+"px)"},children:[d(),t.jsx(Jt,{data:e.data.content}),t.jsx("footer",{children:s()}),t.jsx($t,{})]})}function s(){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%",display:"block",minHeight:window.innerHeight-70},children:[o(),c()]})]})}return u()}function Zt(e){var n=null,a=null,r=null,i=!1,o=null,d=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia,c={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 s(){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,f(),o=setInterval(function(){i?z("Em conexão com "+e.data.receiver+"."):(z("Tentando estabeler conexão com "+e.data.receiver+"..."),f())},15e3)}),n.on("call",function(y){var b=document.getElementById("video2");b.addEventListener("loadedmetadata",function(D){b.style.width=this.videoWidth/4+"px",b.style.height=this.videoHeight/4+"px",b.style.marginLeft=-this.videoWidth/4+"px",b.style.visibility="visible"},!1),b.srcObject=a,y.answer(a),y.on("stream",function(D){r=D,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(s,5e3)):y.type=="peer-unavailable"&&(console.log("Usuário indisponível!"),i=!1)})}N.useEffect(()=>(s(),function(){clearInterval(o),u(),z("Desconectado!")}),[]);function u(){l(a,"audio"),l(a,"video"),l(r,"audio"),l(r,"video"),a=null,r=null;const y=document.getElementById("video1"),b=document.getElementById("video2");y&&(y.srcObject=null),b&&(b.srcObject=null),console.log("Stopped!"),i=!1}function l(y,b){y!=null&&y.getTracks().forEach(D=>{D.kind===b&&D.stop()})}function m(){var y=n.call("999123"+e.data.receiver.replaceAll(".","").replaceAll("-",""),a,c);y&&(y.on("stream",function(b){r=b,document.getElementById("video1").srcObject=r,i=!0}),y.on("close",function(){console.log("Closed!"),i=!1}))}function f(){if(a!=null&&!i)return m();a==null&&d({video:!0,audio:{autoGainControl:!1,echoCancellation:!1,googGainControl:!1,noiseSuppression:!1}},function(y){a=y;var b=document.getElementById("video2");b.addEventListener("loadedmetadata",function(D){b.style.width=this.videoWidth/4+"px",b.style.height=this.videoHeight/4+"px",b.style.marginLeft=-this.videoWidth/4+"px",b.style.visibility="visible"},!1),b.srcObject=a,m()},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 Kt(e){A(`
|
|
220
|
+
`);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(be,{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,d)=>t.jsx("tr",{children:o.map((c,s)=>s==0?t.jsx("th",{style:{textAlign:"left",lineHeight:"2rem",padding:5},className:d%2==0?"even":"odd",children:c},Math.random()):t.jsx("td",{className:d%2==0?"even":"odd",children:H(c)},Math.random()))},Math.random()))})})]})}function a(){for(var r=[],i=[],o=Object.keys(e.data.series),d=[],c=0;c<o.length;c++){c==0&&r.push("");for(var s=[o[c]],u=0,l=0;l<e.data.series[o[c]].length;l++){var m=e.data.series[o[c]];c==0&&r.push(m[l][0]),s.push(m[l][1]),u+=m[l][1],o.length>1&&(c==0?d.push(m[l][1]):d[l]+=m[l][1],l>0&&l==e.data.series[o[c]].length-1&&(c==0?d.push(u):d[l+1]+=u))}s.length>2&&(c==0&&r.push(""),s.push(u)),i.push(s)}return e.data.chart?t.jsx(be,{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(f=>t.jsx("th",{className:"bold",style:{textAlign:"left",padding:5},children:f},Math.random()))})}),t.jsxs("tbody",{children:[i.map((f,w)=>t.jsx("tr",{children:f.map((y,b)=>b==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:(b==f.length-1&&r&&r[r.length-1]==""?"bold":"")+" "+(w%2==0?"even":"odd"),children:H(y)},Math.random()))},Math.random())),d.length>0&&t.jsxs("tr",{children:[t.jsx("th",{}),d.map(f=>t.jsxs("td",{align:"center",className:"bold",children:[H(f)," "]},Math.random()))]},Math.random())]})]})]})}return Array.isArray(e.data.series)?n():a()}function Yt(){function e(){const o={width:150,height:150,borderRadius:"50%",objectFit:"cover",backgroundColor:p.colors.success};return window.application.menu.user&&t.jsxs("div",{align:"center",children:[window.application.menu.image&&t.jsx("div",{children:t.jsx("img",{src:window.application.menu.image,style:o})}),t.jsx("div",{children:t.jsx(F,{dataLabel:"Editar Perfil",href:"/api/profile/userprofile/",style:{textDecoration:"none"},children:window.application.menu.user})})]})}function n(o){var d=o.target;const c=d.querySelector(":scope > ul, :scope > li");if(c){c.offsetParent===null?d.querySelectorAll(":scope > ul, :scope > li, :scope > ul > li").forEach(function(l){l.style.display="block"}):d.querySelectorAll(":scope > ul, :scope > li").forEach(function(l){l.style.display="none"});const s=d.querySelector(":scope > i.fa-solid.fa-chevron-right"),u=d.querySelector(":scope > i.fa-solid.fa-chevron-up");return s&&(s.classList.remove("fa-chevron-right"),s.classList.add("fa-chevron-up")),u&&(u.classList.remove("fa-chevron-up"),u.classList.add("fa-chevron-right")),o.preventDefault(),o.stopPropagation(),o.cancelBubble=!0,!1}else{const s=document.querySelector("aside");s.style.display=window.innerWidth<800?"none":"inline-block"}}function a(o,d){const c={display:d==0?"block":"none",cursor:"pointer",paddingLeft:15,paddingRight:20,paddingTop:10,paddingBottom:10,lineHeight:"2rem",color:p.colors.primary},s={padding:5,fontSize:"1.2rem"};return o.url?t.jsx("li",{style:c,onClick:n,className:"item",children:t.jsxs(F,{href:o.url,dataLabel:T(o.label),style:{textDecoration:"none",display:"block",width:"100%"},children:[d==0&&t.jsx(E,{icon:o.icon||"dot-circle",style:s}),o.label]})},Math.random()):o.items.length>0&&t.jsxs("li",{onClick:n,style:c,"data-label":T(o.label),children:[d==0&&t.jsx(E,{icon:o.icon||"dot-circle",style:s}),o.label,t.jsx(E,{icon:"chevron-right",style:{float:"right",paddingTop:8}}),t.jsx("ul",{style:{display:"none",paddingLeft:15},children:o.items.map(function(u){return a(u,d+1)})})]},Math.random())}function r(){const o={padding:0};return window.application.menu.items.length>0&&t.jsx("ul",{style:o,children:window.application.menu.items.map(function(d){return a(d,0)})})}function i(){const o={marginTop:10,height:"100%",borderRight:"solid 1px #EEE"};return t.jsxs("div",{style:o,className:"menu",children:[e(),r()]})}return i()}function Vt(e){var n;function a(o){const d="=".repeat((4-o.length%4)%4),c=(o+d).replace(/\-/g,"+").replace(/_/g,"/"),s=window.atob(c),u=new Uint8Array(s.length);for(let l=0;l<s.length;++l)u[l]=s.charCodeAt(l);return u}function r(){"serviceWorker"in navigator&&"PushManager"in window?navigator.serviceWorker.getRegistration().then(function(o){if(o){const d=a("BFvGgHYReJWJuSyOChUCEs1VYqZVs3TLJAvSkMW8jVqqgdWVbArBL4Kd6ibPKWlQo8Q3BuWwomybqwzs-1Ic8GU");o.pushManager.getSubscription(function(c){c&&(c.unsubscribe(),console.log("unsubscribed"))}),o.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:d}).then(function(c){if(console.log(c),n=JSON.stringify(c),console.log(n),c){alert("Notificação ativada com sucesso.");var s=new FormData;s.append("subscription",n),B("POST","/api/pushsubscription/subscribe/",function(u){console.log(u)},s)}else{alert("Problema ao ativar notificações.");return}}).catch(function(c){alert("Problema ao tentar ativar notificações."),console.log("Failed to subscribe the user: ",c)})}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(E,{onClick:r,icon:"bell",style:{cursor:"pointer",color:p.colors.primary}})}return i()}function Xt(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 $t(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(E,{icon:"arrow-left",style:r})}),t.jsx("div",{style:{...a,bottom:20},onClick:()=>window.scrollTo({top:0,behavior:"smooth"}),children:t.jsx(E,{icon:"arrow-up",style:r})})]})}return n()}function Jt(e){const[n,a]=N.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 Qt(e){N.useEffect(()=>{const l=localStorage.getItem("message");l&&(localStorage.removeItem("message"),z(l)),window.addEventListener("resize",()=>{const m=document.querySelector("aside");m&&(m.style.display=window.innerWidth<800?"none":"inline-block")}),Xt(document.querySelector("main"),function(m,f){console.log(m,f)})},[]);function a(){const l=document.querySelector("aside"),m=document.querySelector("main");l.style.display=l.style.display=="none"?"inline-block":"none",m.style.width=l.style.display=="none"?"100%":"calc(100% - 350px)"}function r(l){const m=l.target.tagName=="A"?l.target:l.target.closest("a");l.preventDefault(),window.load(m.href)}function i(){const l={display:"flex",width:"100%",justifyContent:"space-between",boxShadow:"0px 15px 10px -15px #DDD",overflowX:"hidden"},m={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&&t.jsx(E,{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(ne,{actions:e.data.navbar.adder,position:{},dataLabel:"plus",children:t.jsx(E,{icon:"plus",style:{cursor:"pointer",color:p.colors.primary}})})}),t.jsx("div",{style:{padding:10},children:t.jsx(Vt,{})}),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(f){return t.jsx(W,{data:f,primary:!0,compact:!0},Math.random())})}),e.data.navbar.actions&&e.data.navbar.actions.length>0&&e.data.navbar.actions.map(function(f){return f.url=="/api/auth/login/"&&(e.data.navbar.user||document.location.pathname=="/app/auth/login/")?null:t.jsx("div",{children:t.jsx(W,{data:f,primary:!0},Math.random())},Math.random())}),e.data.oauth&&e.data.oauth.length>0&&e.data.navbar.user==null&&e.data.oauth.map(function(f){return t.jsx(F,{href:f.url,style:{marginRight:10},children:f.label},Math.random())}),e.data.navbar.tools.length>0&&t.jsx("div",{style:{padding:10},children:t.jsx(ne,{actions:e.data.navbar.tools,position:{},dataLabel:"tools",children:t.jsx(E,{icon:"tools",style:{cursor:"pointer",color:p.colors.primary}})})}),e.data.navbar.settings.length>0&&t.jsx("div",{style:{padding:10},children:t.jsx(ne,{actions:e.data.navbar.settings,position:{},dataLabel:"gear",children:t.jsx(E,{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(Te,{data:m,style:{padding:10},onSelect:f=>document.location.href=V(f.id)})}),e.data.navbar.user&&e.data.navbar.usermenu.length>0&&t.jsx("div",{style:{padding:10},children:t.jsx(ne,{actions:e.data.navbar.usermenu,position:{},dataLabel:T(e.data.navbar.user),children:t.jsx("img",{src:"/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":"inline-block"},children:t.jsx(Yt,{})})}function d(){const l={margin:15,display:"flex",justifyContent:"space-between"},m={color:p.colors.primary};return e.data.navbar&&e.data.navbar.user&&t.jsxs("div",{style:l,children:[t.jsxs("div",{children:[t.jsx(F,{href:"/app/dashboard/",style:{marginRight:10},children:t.jsx(E,{icon:"home",style:m})}),"Área Administrativa"]}),t.jsx("div",{title:e.data.navbar.roles,children:e.data.navbar.user})]})}function c(){const l=e.data.menu&&e.data.menu.items.length>0?350:0;return t.jsxs("main",{id:"main",style:{display:"inline-block",width:"calc(100% - "+l+"px)"},children:[d(),t.jsx(Jt,{data:e.data.content}),t.jsx("footer",{children:s()}),t.jsx($t,{})]})}function s(){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%",display:"block",minHeight:window.innerHeight-70},children:[o(),c()]})]})}return u()}function Zt(e){var n=null,a=null,r=null,i=!1,o=null,d=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia,c={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 s(){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,f(),o=setInterval(function(){i?z("Em conexão com "+e.data.receiver+"."):(z("Tentando estabeler conexão com "+e.data.receiver+"..."),f())},15e3)}),n.on("call",function(y){var b=document.getElementById("video2");b.addEventListener("loadedmetadata",function(D){b.style.width=this.videoWidth/4+"px",b.style.height=this.videoHeight/4+"px",b.style.marginLeft=-this.videoWidth/4+"px",b.style.visibility="visible"},!1),b.srcObject=a,y.answer(a),y.on("stream",function(D){r=D,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(s,5e3)):y.type=="peer-unavailable"&&(console.log("Usuário indisponível!"),i=!1)})}N.useEffect(()=>(s(),function(){clearInterval(o),u(),z("Desconectado!")}),[]);function u(){l(a,"audio"),l(a,"video"),l(r,"audio"),l(r,"video"),a=null,r=null;const y=document.getElementById("video1"),b=document.getElementById("video2");y&&(y.srcObject=null),b&&(b.srcObject=null),console.log("Stopped!"),i=!1}function l(y,b){y!=null&&y.getTracks().forEach(D=>{D.kind===b&&D.stop()})}function m(){var y=n.call("999123"+e.data.receiver.replaceAll(".","").replaceAll("-",""),a,c);y&&(y.on("stream",function(b){r=b,document.getElementById("video1").srcObject=r,i=!0}),y.on("close",function(){console.log("Closed!"),i=!1}))}function f(){if(a!=null&&!i)return m();a==null&&d({video:!0,audio:{autoGainControl:!1,echoCancellation:!1,googGainControl:!1,noiseSuppression:!1}},function(y){a=y;var b=document.getElementById("video2");b.addEventListener("loadedmetadata",function(D){b.style.width=this.videoWidth/4+"px",b.style.height=this.videoHeight/4+"px",b.style.marginLeft=-this.videoWidth/4+"px",b.style.visibility="visible"},!1),b.srcObject=a,m()},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 Kt(e){A(`
|
|
221
221
|
.container {
|
|
222
222
|
position: relative;
|
|
223
223
|
width: 100%;
|
|
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
|
{slthcore-0.2.5 → slthcore-0.2.7}/slth/cmd/init/boilerplate/backend/api/endpoints/__init__.py
RENAMED
|
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
|
|
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
|
{slthcore-0.2.5 → slthcore-0.2.7}/slth/migrations/0003_rename_photo_profile_alter_profile_options.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{slthcore-0.2.5 → slthcore-0.2.7}/slth/migrations/0008_alter_deletion_datetime_alter_log_datetime.py
RENAMED
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|