From: Andrea Bianco Date: Sat, 13 Jun 2020 08:50:48 +0000 (+0200) Subject: Built motion from commit (unavailable).|2.4.19 X-Git-Url: http://repos.xcallymotion.com/?a=commitdiff_plain;h=f116bed079ecf10b64854ce0245642dd25bb5dd8;p=motion2.git Built motion from commit (unavailable).|2.4.19 --- diff --git a/apidoc/api_data.js b/apidoc/api_data.js index 870fe89..207596a 100644 --- a/apidoc/api_data.js +++ b/apidoc/api_data.js @@ -21197,24 +21197,6 @@ define({ "api": [ "groupTitle": "Settings" }, { - "type": "put", - "url": "/api/settings/{id}", - "title": "Update settings", - "examples": [ - { - "title": "Example usage:", - "content": "curl https://{domain}/api/settings/{id} -v -u {name}:{password} -X PUT", - "type": "json" - } - ], - "name": "Update", - "group": "Settings", - "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", - "version": "0.0.0", - "filename": "server/api/setting/index.js", - "groupTitle": "Settings" - }, - { "type": "post", "url": "/api/settings/{id}/favicon", "title": "Add Favicon", @@ -21377,6 +21359,24 @@ define({ "api": [ "groupTitle": "Settings" }, { + "type": "put", + "url": "/api/settings/{id}", + "title": "Update an existing Setting", + "examples": [ + { + "title": "Example usage:", + "content": "curl https://{domain}/api/settings/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", + "type": "json" + } + ], + "name": "updateSettings", + "group": "Settings", + "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", + "version": "0.0.0", + "filename": "server/api/setting/index.js", + "groupTitle": "Settings" + }, + { "type": "post", "url": "/api/sms/accounts/{id}/users", "title": "Add agents to a sms account", @@ -24119,6 +24119,13 @@ define({ "api": [ "optional": true, "field": "savePath", "description": "" + }, + { + "group": "Body", + "type": "Virtual", + "optional": true, + "field": "format", + "description": "" } ] } @@ -35123,8 +35130,9 @@ define({ "api": [ "group": "Body", "type": "String", "allowedValues": [ - "\"Leads\"", - "\"Contacts\"" + "\"lead\"", + "\"contact\"", + "\"nothing\"" ], "optional": true, "field": "moduleCreate", @@ -35133,6 +35141,18 @@ define({ "api": [ { "group": "Body", "type": "String", + "allowedValues": [ + "\"contact_lead\"", + "\"contact\"", + "\"lead\"" + ], + "optional": true, + "field": "moduleSearch", + "description": "" + }, + { + "group": "Body", + "type": "String", "optional": true, "field": "description", "description": "" diff --git a/apidoc/api_data.json b/apidoc/api_data.json index 7992882..03829b0 100644 --- a/apidoc/api_data.json +++ b/apidoc/api_data.json @@ -21197,24 +21197,6 @@ "groupTitle": "Settings" }, { - "type": "put", - "url": "/api/settings/{id}", - "title": "Update settings", - "examples": [ - { - "title": "Example usage:", - "content": "curl https://{domain}/api/settings/{id} -v -u {name}:{password} -X PUT", - "type": "json" - } - ], - "name": "Update", - "group": "Settings", - "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", - "version": "0.0.0", - "filename": "server/api/setting/index.js", - "groupTitle": "Settings" - }, - { "type": "post", "url": "/api/settings/{id}/favicon", "title": "Add Favicon", @@ -21377,6 +21359,24 @@ "groupTitle": "Settings" }, { + "type": "put", + "url": "/api/settings/{id}", + "title": "Update an existing Setting", + "examples": [ + { + "title": "Example usage:", + "content": "curl https://{domain}/api/settings/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", + "type": "json" + } + ], + "name": "updateSettings", + "group": "Settings", + "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", + "version": "0.0.0", + "filename": "server/api/setting/index.js", + "groupTitle": "Settings" + }, + { "type": "post", "url": "/api/sms/accounts/{id}/users", "title": "Add agents to a sms account", @@ -24119,6 +24119,13 @@ "optional": true, "field": "savePath", "description": "" + }, + { + "group": "Body", + "type": "Virtual", + "optional": true, + "field": "format", + "description": "" } ] } @@ -35123,8 +35130,9 @@ "group": "Body", "type": "String", "allowedValues": [ - "\"Leads\"", - "\"Contacts\"" + "\"lead\"", + "\"contact\"", + "\"nothing\"" ], "optional": true, "field": "moduleCreate", @@ -35133,6 +35141,18 @@ { "group": "Body", "type": "String", + "allowedValues": [ + "\"contact_lead\"", + "\"contact\"", + "\"lead\"" + ], + "optional": true, + "field": "moduleSearch", + "description": "" + }, + { + "group": "Body", + "type": "String", "optional": true, "field": "description", "description": "" diff --git a/apidoc/api_project.js b/apidoc/api_project.js index af94c5d..5ff69e7 100644 --- a/apidoc/api_project.js +++ b/apidoc/api_project.js @@ -1,6 +1,6 @@ define({ "name": "xCALLY Motion API", - "version": "2.4.18", + "version": "2.4.19", "description": "Thank you for choosing xCALLY MOTION, one of the first Omni Channel solution integrated with AsteriskTM and the most innovative real time solutions available on the market.", "title": "xCALLY MOTION API", "header": { @@ -17,7 +17,7 @@ define({ "apidoc": "0.3.0", "generator": { "name": "apidoc", - "time": "2020-06-09T09:10:31.451Z", + "time": "2020-06-13T08:40:02.185Z", "url": "http://apidocjs.com", "version": "0.20.1" } diff --git a/apidoc/api_project.json b/apidoc/api_project.json index 9c748f2..cdee644 100644 --- a/apidoc/api_project.json +++ b/apidoc/api_project.json @@ -1,6 +1,6 @@ { "name": "xCALLY Motion API", - "version": "2.4.18", + "version": "2.4.19", "description": "Thank you for choosing xCALLY MOTION, one of the first Omni Channel solution integrated with AsteriskTM and the most innovative real time solutions available on the market.", "title": "xCALLY MOTION API", "header": { @@ -17,7 +17,7 @@ "apidoc": "0.3.0", "generator": { "name": "apidoc", - "time": "2020-06-09T09:10:31.451Z", + "time": "2020-06-13T08:40:02.185Z", "url": "http://apidocjs.com", "version": "0.20.1" } diff --git a/package.json b/package.json index 96272c9..390ff2d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "motion", - "version": "2.4.18", + "version": "2.4.19", "description": "xCALLY Motion is the new Realtime asynchronous solution for your multichannel contact center over Asterisk.", "main": "server/app.js", "engines": { diff --git a/public/app/main/apps/settings/i18n/ar.json b/public/app/main/apps/settings/i18n/ar.json index e3fdb56..7d95719 100644 --- a/public/app/main/apps/settings/i18n/ar.json +++ b/public/app/main/apps/settings/i18n/ar.json @@ -32,7 +32,8 @@ "BLOCKDURATION_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "يجب أن تكون القيمة أكبر من أو تساوي", "BLOCKDURATION_REQUIRED": "حقل الزامي", "LOGINMAILFREQUENCY_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "يجب أن تكون القيمة أكبر من أو تساوي", - "LOGINMAILFREQUENCY_REQUIRED": "حقل الزامي" + "LOGINMAILFREQUENCY_REQUIRED": "حقل الزامي", + "USERNAME_REQUIRED": "حقل الزامي" }, "HELP": { "ADDRESS": "العنوان", @@ -45,7 +46,9 @@ "MOTIONBARREMEMBERME": "تمكين / تعطيل ميزة تذكر البيانات في شريط الحركة", "RTLSUPPORT": "لتمكين دعم RTL للغات العربية والفارسية والعبرية", "DEFAULTSCREENRECORDINGPATH": "أدخل المسار حيث يمكنك تخزين ملفات تسجيل الشاشة على الكمبيوتر Agent (اتركه فارغًا لمسار مجلد الفيديو الافتراضي)", - "LOGINMAILFREQUENCY": "يرجى تذكر إعادة تشغيل خدمة البريد الإلكتروني في كل مرة يتم فيها تغيير هذه المعلمة" + "LOGINMAILFREQUENCY": "يرجى تذكر إعادة تشغيل خدمة البريد الإلكتروني في كل مرة يتم فيها تغيير هذه المعلمة", + "PASSWORD": "كلمه السر", + "USERNAME": "اسم المستخدم" }, "AGENTS": "عملاء", "AVG_LOAD": "متوسط التحميل", @@ -209,6 +212,7 @@ "DEFAULT_FAVICON": "الافتراضي Favicon", "FAVICON": "فافيكون", "IMAPGENERALSETTINGS": "الوصول عبر IMAP", - "LOGINMAILFREQUENCY": "تردد بريد تسجيل الدخول (ثانية)" + "LOGINMAILFREQUENCY": "تردد بريد تسجيل الدخول (ثانية)", + "USERNAME": "اسم المستخدم" } } \ No newline at end of file diff --git a/public/app/main/apps/settings/i18n/da.json b/public/app/main/apps/settings/i18n/da.json index b87919d..33722fe 100644 --- a/public/app/main/apps/settings/i18n/da.json +++ b/public/app/main/apps/settings/i18n/da.json @@ -79,7 +79,9 @@ "MOTIONBARREMEMBERME": "Aktivér / deaktiver funktionen Husk mig i Motion Phonebar", "RTLSUPPORT": "Aktiverer RTL-support til arabisk, persisk og hebraisk", "DEFAULTSCREENRECORDINGPATH": "Indtast stien, hvor skærmoptagelsesfiler skal gemmes på Agent-computeren (lad den stå tom som standard videomappesti)", - "LOGINMAILFREQUENCY": "Husk at genstarte EMAIL-tjenesten, hver gang denne parameter er ændret" + "LOGINMAILFREQUENCY": "Husk at genstarte EMAIL-tjenesten, hver gang denne parameter er ændret", + "PASSWORD": "Adgangskode", + "USERNAME": "Brugernavn" }, "ERRORS": { "ADDRESS_REQUIRED": "Adressen er påkrævet", @@ -111,7 +113,8 @@ "BLOCKDURATION_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "Værdien skal være større end eller lig med", "BLOCKDURATION_REQUIRED": "Obligatorisk felt", "LOGINMAILFREQUENCY_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "Værdien skal være større end eller lig med", - "LOGINMAILFREQUENCY_REQUIRED": "Obligatorisk felt" + "LOGINMAILFREQUENCY_REQUIRED": "Obligatorisk felt", + "USERNAME_REQUIRED": "Obligatorisk felt" }, "EDIT_NETWORK": "Edit Network", "DELETE_NETWORK": "Delete Network", @@ -209,6 +212,7 @@ "DEFAULT_FAVICON": "Standard Favicon", "FAVICON": "favicon", "IMAPGENERALSETTINGS": "IMAP", - "LOGINMAILFREQUENCY": "Login-mailfrekvens (sek)" + "LOGINMAILFREQUENCY": "Login-mailfrekvens (sek)", + "USERNAME": "Brugernavn" } } \ No newline at end of file diff --git a/public/app/main/apps/settings/i18n/de.json b/public/app/main/apps/settings/i18n/de.json index 45f2b6b..bb7d240 100644 --- a/public/app/main/apps/settings/i18n/de.json +++ b/public/app/main/apps/settings/i18n/de.json @@ -79,7 +79,9 @@ "MOTIONBARREMEMBERME": "Aktivieren / Deaktivieren der Funktion \"Merken\" in Motion Phonebar", "RTLSUPPORT": "Aktiviert die RTL-Unterstützung für Arabisch, Persisch und Hebräisch", "DEFAULTSCREENRECORDINGPATH": "Geben Sie den Pfad ein, in dem die Bildschirmaufzeichnungsdateien auf dem Agent-Computer gespeichert werden sollen (leer lassen für den Standardpfad für den Videoordner).", - "LOGINMAILFREQUENCY": "Bitte denken Sie daran, den EMAIL-Dienst jedes Mal neu zu starten, wenn dieser Parameter geändert wurde" + "LOGINMAILFREQUENCY": "Bitte denken Sie daran, den EMAIL-Dienst jedes Mal neu zu starten, wenn dieser Parameter geändert wurde", + "PASSWORD": "Passwort", + "USERNAME": "Nutzername" }, "ERRORS": { "ADDRESS_REQUIRED": "Die Adresse ist erforderlich", @@ -111,7 +113,8 @@ "BLOCKDURATION_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "Der Wert muss größer oder gleich sein", "BLOCKDURATION_REQUIRED": "Pflichtfeld", "LOGINMAILFREQUENCY_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "Der Wert muss größer oder gleich sein", - "LOGINMAILFREQUENCY_REQUIRED": "Pflichtfeld" + "LOGINMAILFREQUENCY_REQUIRED": "Pflichtfeld", + "USERNAME_REQUIRED": "Pflichtfeld" }, "EDIT_NETWORK": "Netzwerk bearbeiten", "DELETE_NETWORK": "Netzwerk löschen", @@ -209,6 +212,7 @@ "DEFAULT_FAVICON": "Standard-Favicon", "FAVICON": "Favicon", "IMAPGENERALSETTINGS": "IMAP", - "LOGINMAILFREQUENCY": "Anmelde-Mail-Häufigkeit (Sek.)" + "LOGINMAILFREQUENCY": "Anmelde-Mail-Häufigkeit (Sek.)", + "USERNAME": "Nutzername" } } \ No newline at end of file diff --git a/public/app/main/apps/settings/i18n/en.json b/public/app/main/apps/settings/i18n/en.json index caa69d0..a433cfe 100644 --- a/public/app/main/apps/settings/i18n/en.json +++ b/public/app/main/apps/settings/i18n/en.json @@ -97,6 +97,7 @@ "SMTP_SECURE": "Secure", "TYPE": "Type", "ADDRESS": "Address", + "USERNAME": "Username", "NEW_NETWORK": "New Network", "ADD_NETWORK": "Add Network", "IMAPGENERALSETTINGS": "IMAP", @@ -106,6 +107,8 @@ "DEFAULTSCREENRECORDINGPATH": "Enter the path where to store screen recording files on the Agent computer (leave empty for default Video Folder path)", "RTLSUPPORT": "Enables the RTL Support for Arabic, Persian and Hebrew languages", "ADDRESS": "External (public) ip address", + "USERNAME": "Username", + "PASSWORD": "Password", "LOCALNETADDRESS": "Local ip address/subnet", "SMTP_SECURE": "If true, the connection to the server will use TLS", "SMTP_USERNAME": "Username used for authentication", @@ -145,7 +148,8 @@ "ALLOWEDLOGINATTEMPTS_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "The value must be greater than or equal to", "BLOCKDURATION_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "The value must be greater than or equal to", "ALLOWEDLOGINATTEMPTS_REQUIRED": "Mandatory field", - "BLOCKDURATION_REQUIRED": "Mandatory field" + "BLOCKDURATION_REQUIRED": "Mandatory field", + "USERNAME_REQUIRED": "Mandatory field" }, "EDIT_NETWORK": "Edit Network", "DELETE_NETWORK": "Delete Network", diff --git a/public/app/main/apps/settings/i18n/es.json b/public/app/main/apps/settings/i18n/es.json index 63e2a5c..0f67922 100644 --- a/public/app/main/apps/settings/i18n/es.json +++ b/public/app/main/apps/settings/i18n/es.json @@ -13,7 +13,9 @@ "MOTIONBARREMEMBERME": "Habilitar/Deshabilitar la función Recordarme en Motion Phonebar", "RTLSUPPORT": "Habilita el soporte RTL para los idiomas árabe, persa y hebreo.", "DEFAULTSCREENRECORDINGPATH": "Ingrese la ruta donde almacenar los archivos de grabación de pantalla en la computadora del Agente (deje en blanco la ruta predeterminada de la Carpeta de video)", - "LOGINMAILFREQUENCY": "Recuerde reiniciar el servicio EMAIL cada vez que se modifique este parámetro" + "LOGINMAILFREQUENCY": "Recuerde reiniciar el servicio EMAIL cada vez que se modifique este parámetro", + "PASSWORD": "Contraseña", + "USERNAME": "Nombre de usuario" }, "ERRORS": { "ACCOUNTNAME_REQUIRED": "Campo obligatorio", @@ -45,7 +47,8 @@ "BLOCKDURATION_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "El valor debe ser mayor o igual que", "BLOCKDURATION_REQUIRED": "Campo obligatorio", "LOGINMAILFREQUENCY_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "El valor debe ser mayor o igual que", - "LOGINMAILFREQUENCY_REQUIRED": "Campo obligatorio" + "LOGINMAILFREQUENCY_REQUIRED": "Campo obligatorio", + "USERNAME_REQUIRED": "Campo obligatorio" }, "ACCOUNTNAME": "Nombre de la cuenta", "ADDRESS": "Dirección", @@ -209,6 +212,7 @@ "DEFAULT_FAVICON": "Favicon predeterminado", "FAVICON": "Favicon", "IMAPGENERALSETTINGS": "IMAP", - "LOGINMAILFREQUENCY": "Frecuencia de correo de inicio de sesión (seg.)" + "LOGINMAILFREQUENCY": "Frecuencia de correo de inicio de sesión (seg.)", + "USERNAME": "Nombre de usuario" } } \ No newline at end of file diff --git a/public/app/main/apps/settings/i18n/fa.json b/public/app/main/apps/settings/i18n/fa.json index 0306f49..62c8717 100644 --- a/public/app/main/apps/settings/i18n/fa.json +++ b/public/app/main/apps/settings/i18n/fa.json @@ -79,7 +79,9 @@ "MOTIONBARREMEMBERME": "فعال / غیر فعال کردن ویژگی به یاد ماندنی من در Phone Phone Motion", "RTLSUPPORT": "پشتیبانی RTL را برای زبانهای عربی ، فارسی و عبری فعال می کند", "DEFAULTSCREENRECORDINGPATH": "مسیری را که می توانید پرونده های ضبط صفحه را روی رایانه Agent ذخیره کنید وارد کنید (برای پیش فرض مسیر پوشه ویدیویی خالی بگذارید)", - "LOGINMAILFREQUENCY": "لطفاً به یاد داشته باشید که سرویس EMAIL را هر بار که این پارامتر تغییر کرد مجدداً راه اندازی کنید" + "LOGINMAILFREQUENCY": "لطفاً به یاد داشته باشید که سرویس EMAIL را هر بار که این پارامتر تغییر کرد مجدداً راه اندازی کنید", + "PASSWORD": "کلمه عبور", + "USERNAME": "نام کاربری" }, "ERRORS": { "ADDRESS_REQUIRED": "آدرس مورد نیاز است.", @@ -111,7 +113,8 @@ "BLOCKDURATION_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "مقدار باید بیشتر یا مساوی باشد", "BLOCKDURATION_REQUIRED": "زمینه اجباری", "LOGINMAILFREQUENCY_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "مقدار باید بیشتر یا مساوی باشد", - "LOGINMAILFREQUENCY_REQUIRED": "زمینه اجباری" + "LOGINMAILFREQUENCY_REQUIRED": "زمینه اجباری", + "USERNAME_REQUIRED": "زمینه اجباری" }, "EDIT_NETWORK": "ویرایش شبکه", "DELETE_NETWORK": "شبکه را حذف کنید", @@ -209,6 +212,7 @@ "DEFAULT_FAVICON": "Favicon پیش فرض", "FAVICON": "فاویکون", "IMAPGENERALSETTINGS": "IMAP", - "LOGINMAILFREQUENCY": "فرکانس ورود به سیستم (ثانیه)" + "LOGINMAILFREQUENCY": "فرکانس ورود به سیستم (ثانیه)", + "USERNAME": "نام کاربری" } } \ No newline at end of file diff --git a/public/app/main/apps/settings/i18n/fi.json b/public/app/main/apps/settings/i18n/fi.json index d04d542..61b5f67 100644 --- a/public/app/main/apps/settings/i18n/fi.json +++ b/public/app/main/apps/settings/i18n/fi.json @@ -78,7 +78,9 @@ "MOTIONBARREMEMBERME": "Ota käyttöön / poista käytöstä Muistuta -ominaisuus -toiminto Motion-puhelinpalkissa", "RTLSUPPORT": "Mahdollistaa arabian, persian ja heprealaisten kielten RTL-tuen", "DEFAULTSCREENRECORDINGPATH": "Kirjoita polku, johon näytön tallennustiedostot tallennetaan Agent-tietokoneelle (jätä tyhjä videokansion oletuspolulle)", - "LOGINMAILFREQUENCY": "Muista käynnistää EMAIL-palvelu uudelleen aina, kun tätä parametria muutetaan" + "LOGINMAILFREQUENCY": "Muista käynnistää EMAIL-palvelu uudelleen aina, kun tätä parametria muutetaan", + "PASSWORD": "Salasana", + "USERNAME": "Käyttäjätunnus" }, "ERRORS": { "ADDRESS_REQUIRED": "Osoite on pakollinen", @@ -110,7 +112,8 @@ "BLOCKDURATION_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "Arvon on oltava suurempi tai yhtä suuri kuin", "BLOCKDURATION_REQUIRED": "Pakollinen kenttä", "LOGINMAILFREQUENCY_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "Arvon on oltava suurempi tai yhtä suuri kuin", - "LOGINMAILFREQUENCY_REQUIRED": "Pakollinen kenttä" + "LOGINMAILFREQUENCY_REQUIRED": "Pakollinen kenttä", + "USERNAME_REQUIRED": "Pakollinen kenttä" }, "EDIT_NETWORK": "Muokkaa verkko", "DELETE_NETWORK": "Poista verkko", @@ -209,6 +212,7 @@ "DEFAULT_FAVICON": "Oletus Favicon", "FAVICON": "favicon", "IMAPGENERALSETTINGS": "IMAP", - "LOGINMAILFREQUENCY": "Sisäänkirjautumisen postitaajuus (sek)" + "LOGINMAILFREQUENCY": "Sisäänkirjautumisen postitaajuus (sek)", + "USERNAME": "Käyttäjätunnus" } } \ No newline at end of file diff --git a/public/app/main/apps/settings/i18n/fr.json b/public/app/main/apps/settings/i18n/fr.json index 4040ac8..8c56977 100644 --- a/public/app/main/apps/settings/i18n/fr.json +++ b/public/app/main/apps/settings/i18n/fr.json @@ -79,7 +79,9 @@ "MOTIONBARREMEMBERME": "Activer / désactiver la fonction Mémoriser mes informations dans Motion Phonebar", "RTLSUPPORT": "Active le support RTL pour l'arabe, le persan et l'hébreu", "DEFAULTSCREENRECORDINGPATH": "Entrez le chemin où stocker les fichiers d'enregistrement d'écran sur l'ordinateur de l'agent (laissez vide pour le chemin du dossier vidéo par défaut)", - "LOGINMAILFREQUENCY": "N'oubliez pas de redémarrer le service EMAIL chaque fois que ce paramètre a été modifié" + "LOGINMAILFREQUENCY": "N'oubliez pas de redémarrer le service EMAIL chaque fois que ce paramètre a été modifié", + "PASSWORD": "Mot de passe", + "USERNAME": "Nom d'utilisateur" }, "ERRORS": { "ADDRESS_REQUIRED": "Adresse nécessaire", @@ -111,7 +113,8 @@ "BLOCKDURATION_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "La valeur doit être supérieure ou égale à", "BLOCKDURATION_REQUIRED": "Champ obligatoire", "LOGINMAILFREQUENCY_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "La valeur doit être supérieure ou égale à", - "LOGINMAILFREQUENCY_REQUIRED": "Champ obligatoire" + "LOGINMAILFREQUENCY_REQUIRED": "Champ obligatoire", + "USERNAME_REQUIRED": "Champ obligatoire" }, "EDIT_NETWORK": "Modifier un réseau", "DELETE_NETWORK": "Supprimer réseau", @@ -209,6 +212,7 @@ "DEFAULT_FAVICON": "Favicon par défaut", "FAVICON": "Favicon", "IMAPGENERALSETTINGS": "IMAP", - "LOGINMAILFREQUENCY": "Fréquence de connexion par e-mail (sec)" + "LOGINMAILFREQUENCY": "Fréquence de connexion par e-mail (sec)", + "USERNAME": "Nom d'utilisateur" } } \ No newline at end of file diff --git a/public/app/main/apps/settings/i18n/he.json b/public/app/main/apps/settings/i18n/he.json index 03b8a8a..d2a0c2a 100644 --- a/public/app/main/apps/settings/i18n/he.json +++ b/public/app/main/apps/settings/i18n/he.json @@ -103,7 +103,9 @@ "MOTIONBARREMEMBERME": "הפעל/השבת את התכונה 'זכור אותי' ב-Motion Phonebar", "RTLSUPPORT": "מאפשר תמיכה ב- RTL לשפות ערבית, פרסית ועברית", "DEFAULTSCREENRECORDINGPATH": "הזן את הנתיב היכן לאחסן קבצי הקלטות מסך במחשב הסוכן (השאר ריק לנתיב תיקיית וידאו ברירת מחדל)", - "LOGINMAILFREQUENCY": "אנא זכור להפעיל מחדש את שירות EMAIL בכל פעם שהפרמטר הזה משתנה" + "LOGINMAILFREQUENCY": "אנא זכור להפעיל מחדש את שירות EMAIL בכל פעם שהפרמטר הזה משתנה", + "PASSWORD": "סיסמה", + "USERNAME": "שם משתמש" }, "ERRORS": { "CHATTIMEOUT_REQUIRED": "שדה חובה", @@ -135,7 +137,8 @@ "BLOCKDURATION_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "הערך חייב להיות גדול או שווה לו", "BLOCKDURATION_REQUIRED": "שדה חובה", "LOGINMAILFREQUENCY_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "הערך חייב להיות גדול או שווה לו", - "LOGINMAILFREQUENCY_REQUIRED": "שדה חובה" + "LOGINMAILFREQUENCY_REQUIRED": "שדה חובה", + "USERNAME_REQUIRED": "שדה חובה" }, "EDIT_NETWORK": "ערוך רשת", "DELETE_NETWORK": "מחק רשת", @@ -209,6 +212,7 @@ "DEFAULT_FAVICON": "Favicon ברירת מחדל", "FAVICON": "פייביקון", "IMAPGENERALSETTINGS": "IMAP", - "LOGINMAILFREQUENCY": "תדירות דואר בכניסה (שניות)" + "LOGINMAILFREQUENCY": "תדירות דואר בכניסה (שניות)", + "USERNAME": "שם משתמש" } } \ No newline at end of file diff --git a/public/app/main/apps/settings/i18n/hi.json b/public/app/main/apps/settings/i18n/hi.json index 2672729..82bc6ee 100644 --- a/public/app/main/apps/settings/i18n/hi.json +++ b/public/app/main/apps/settings/i18n/hi.json @@ -79,7 +79,9 @@ "MOTIONBARREMEMBERME": "मोशन फोनबार में मुझे याद रखें सुविधा को सक्षम / अक्षम करें", "RTLSUPPORT": "अरबी, फारसी और हिब्रू भाषाओं के लिए RTL समर्थन सक्षम करता है", "DEFAULTSCREENRECORDINGPATH": "एजेंट कंप्यूटर पर स्क्रीन रिकॉर्डिंग फ़ाइलों को स्टोर करने के लिए पथ दर्ज करें (डिफ़ॉल्ट वीडियो फ़ोल्डर पथ के लिए खाली छोड़ दें)", - "LOGINMAILFREQUENCY": "कृपया याद रखें कि हर बार जब यह पैरामीटर बदला गया है तो EMAIL सेवा को फिर से शुरू करें" + "LOGINMAILFREQUENCY": "कृपया याद रखें कि हर बार जब यह पैरामीटर बदला गया है तो EMAIL सेवा को फिर से शुरू करें", + "PASSWORD": "कुंजिका", + "USERNAME": "उपयोगकर्ता नाम" }, "ERRORS": { "ADDRESS_REQUIRED": "इस अभिभाषण की आवश्यकता है।", @@ -111,7 +113,8 @@ "BLOCKDURATION_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "मान इससे अधिक या उसके बराबर होना चाहिए", "BLOCKDURATION_REQUIRED": "आवश्यक स्थान", "LOGINMAILFREQUENCY_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "मान इससे अधिक या उसके बराबर होना चाहिए", - "LOGINMAILFREQUENCY_REQUIRED": "आवश्यक स्थान" + "LOGINMAILFREQUENCY_REQUIRED": "आवश्यक स्थान", + "USERNAME_REQUIRED": "आवश्यक स्थान" }, "EDIT_NETWORK": "नेटवर्क संपादित करें", "DELETE_NETWORK": "नेटवर्क हटाएं", @@ -209,6 +212,7 @@ "DEFAULT_FAVICON": "डिफ़ॉल्ट फ़ेविकॉन", "FAVICON": "फ़ेविकॉन", "IMAPGENERALSETTINGS": "IMAP", - "LOGINMAILFREQUENCY": "लॉगिन मेल फ्रीक्वेंसी (सेकंड)" + "LOGINMAILFREQUENCY": "लॉगिन मेल फ्रीक्वेंसी (सेकंड)", + "USERNAME": "उपयोगकर्ता नाम" } } \ No newline at end of file diff --git a/public/app/main/apps/settings/i18n/id.json b/public/app/main/apps/settings/i18n/id.json index c3261b6..b9ee921 100644 --- a/public/app/main/apps/settings/i18n/id.json +++ b/public/app/main/apps/settings/i18n/id.json @@ -32,7 +32,8 @@ "BLOCKDURATION_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "Nilai harus lebih besar dari atau sama dengan", "BLOCKDURATION_REQUIRED": "Bidang wajib", "LOGINMAILFREQUENCY_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "Nilai harus lebih besar dari atau sama dengan", - "LOGINMAILFREQUENCY_REQUIRED": "Bidang wajib" + "LOGINMAILFREQUENCY_REQUIRED": "Bidang wajib", + "USERNAME_REQUIRED": "Bidang wajib" }, "HELP": { "ADDRESS": "Alamat ip eksternal (publik)", @@ -45,7 +46,9 @@ "MOTIONBARREMEMBERME": "Aktifkan / Nonaktifkan fitur Remember Me di Motion Phonebar", "RTLSUPPORT": "Mengaktifkan Dukungan RTL untuk bahasa Arab, Persia, dan Ibrani", "DEFAULTSCREENRECORDINGPATH": "Masukkan jalur tempat menyimpan file rekaman layar pada komputer Agen (biarkan kosong untuk jalur Folder Video default)", - "LOGINMAILFREQUENCY": "Harap ingat untuk memulai kembali layanan EMAIL setiap kali parameter ini telah diubah" + "LOGINMAILFREQUENCY": "Harap ingat untuk memulai kembali layanan EMAIL setiap kali parameter ini telah diubah", + "PASSWORD": "Kata sandi", + "USERNAME": "Nama pengguna" }, "ACCOUNTNAME": "Nama akun", "ADDRESS": "Alamat", @@ -209,6 +212,7 @@ "DEFAULT_FAVICON": "Favicon default", "FAVICON": "Favicon", "IMAPGENERALSETTINGS": "IMAP", - "LOGINMAILFREQUENCY": "Frekuensi Email Masuk (dtk)" + "LOGINMAILFREQUENCY": "Frekuensi Email Masuk (dtk)", + "USERNAME": "Nama pengguna" } } \ No newline at end of file diff --git a/public/app/main/apps/settings/i18n/it.json b/public/app/main/apps/settings/i18n/it.json index d059e87..1e295bd 100644 --- a/public/app/main/apps/settings/i18n/it.json +++ b/public/app/main/apps/settings/i18n/it.json @@ -103,7 +103,9 @@ "MOTIONBARREMEMBERME": "Abilita/Disabilita la funzione Remember Me della Motion Phonebar", "RTLSUPPORT": "Abilita il supporto RTL per le lingue araba, persiana ed ebraica", "LOGINMAILFREQUENCY": "Si prega di riavviare il servizio EMAIL sul server dopo la modifica", - "DEFAULTSCREENRECORDINGPATH": "Immettere il percorso in cui archiviare i file di registrazione dello schermo sul computer dell'agente (lasciare vuoto per il percorso della cartella video predefinita)" + "DEFAULTSCREENRECORDINGPATH": "Immettere il percorso in cui archiviare i file di registrazione dello schermo sul computer dell'agente (lasciare vuoto per il percorso della cartella video predefinita)", + "PASSWORD": "Parola d'ordine", + "USERNAME": "Nome utente" }, "ERRORS": { "CHATTIMEOUT_REQUIRED": "Campo obbligatorio", @@ -135,7 +137,8 @@ "ALLOWEDLOGINATTEMPTS_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "Il valore introdotto deve essere superiore o uguale a", "BLOCKDURATION_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "Il valore introdotto deve essere superiore o uguale a", "ALLOWEDLOGINATTEMPTS_REQUIRED": "Campo obbligatorio", - "BLOCKDURATION_REQUIRED": "Campo obbligatorio" + "BLOCKDURATION_REQUIRED": "Campo obbligatorio", + "USERNAME_REQUIRED": "Campo obbligatorio" }, "EDIT_NETWORK": "Modifica Rete", "DELETE_NETWORK": "Elimina Rete", @@ -209,6 +212,7 @@ "UPDATE_LICENSE_MANUALLY": "Vuoi aggiornare la licenza manualmente?", "SECURITY": "Sicurezza", "BLOCKDURATION": "Tempo necessario prima dello sblocco automatico", - "ALLOWEDLOGINATTEMPTS": "Tentativi di accesso consentiti prima di bloccare l'utente / agente" + "ALLOWEDLOGINATTEMPTS": "Tentativi di accesso consentiti prima di bloccare l'utente / agente", + "USERNAME": "Nome utente" } } \ No newline at end of file diff --git a/public/app/main/apps/settings/i18n/ja.json b/public/app/main/apps/settings/i18n/ja.json index 1a85e0f..4339f70 100644 --- a/public/app/main/apps/settings/i18n/ja.json +++ b/public/app/main/apps/settings/i18n/ja.json @@ -32,7 +32,8 @@ "BLOCKDURATION_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "値は以上である必要があります", "BLOCKDURATION_REQUIRED": "必須フィールド", "LOGINMAILFREQUENCY_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "値は以上でなければなりません", - "LOGINMAILFREQUENCY_REQUIRED": "必須フィールド" + "LOGINMAILFREQUENCY_REQUIRED": "必須フィールド", + "USERNAME_REQUIRED": "必須フィールド" }, "HELP": { "ADDRESS": "外部(パブリック)IPアドレス", @@ -45,7 +46,9 @@ "MOTIONBARREMEMBERME": "モーションPhonebarのRemember Me機能を有効/無効にする", "RTLSUPPORT": "アラビア語、ペルシャ語、ヘブライ語のRTLサポートを有効にします", "DEFAULTSCREENRECORDINGPATH": "エージェントコンピューターで画面録画ファイルを保存するパスを入力します(デフォルトのビデオフォルダーパスは空のままにします)", - "LOGINMAILFREQUENCY": "このパラメータが変更されるたびに、EMAILサービスを再起動することを忘れないでください" + "LOGINMAILFREQUENCY": "このパラメータが変更されるたびに、EMAILサービスを再起動することを忘れないでください", + "PASSWORD": "パスワード", + "USERNAME": "ユーザー名" }, "ACCOUNTNAME": "アカウント名", "ADDRESS": "アドレス", @@ -209,6 +212,7 @@ "DEFAULT_FAVICON": "デフォルトのファビコン", "FAVICON": "ファビコン", "IMAPGENERALSETTINGS": "IMAP", - "LOGINMAILFREQUENCY": "ログインメールの頻度(秒)" + "LOGINMAILFREQUENCY": "ログインメールの頻度(秒)", + "USERNAME": "ユーザー名" } } \ No newline at end of file diff --git a/public/app/main/apps/settings/i18n/ko.json b/public/app/main/apps/settings/i18n/ko.json index ea3f588..a140275 100644 --- a/public/app/main/apps/settings/i18n/ko.json +++ b/public/app/main/apps/settings/i18n/ko.json @@ -79,7 +79,9 @@ "MOTIONBARREMEMBERME": "Motion Phonebar의 Remember Me 기능 활성화 / 비활성화", "RTLSUPPORT": "아랍어, 페르시아어 및 히브리어에 대한 RTL 지원 가능", "DEFAULTSCREENRECORDINGPATH": "에이전트 컴퓨터에서 화면 녹화 파일을 저장할 경로를 입력하십시오 (기본 비디오 폴더 경로는 비워 두십시오).", - "LOGINMAILFREQUENCY": "이 매개 변수가 변경 될 때마다 EMAIL 서비스를 다시 시작하십시오." + "LOGINMAILFREQUENCY": "이 매개 변수가 변경 될 때마다 EMAIL 서비스를 다시 시작하십시오.", + "PASSWORD": "암호", + "USERNAME": "사용자 이름" }, "ERRORS": { "ADDRESS_REQUIRED": "주소는 필수입니다.", @@ -111,7 +113,8 @@ "BLOCKDURATION_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "값은 크거나 같아야합니다", "BLOCKDURATION_REQUIRED": "필수 필드", "LOGINMAILFREQUENCY_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "값은 크거나 같아야합니다", - "LOGINMAILFREQUENCY_REQUIRED": "필수 필드" + "LOGINMAILFREQUENCY_REQUIRED": "필수 필드", + "USERNAME_REQUIRED": "필수 필드" }, "EDIT_NETWORK": "네트워크 수정", "DELETE_NETWORK": "네트워크 삭제", @@ -209,6 +212,7 @@ "DEFAULT_FAVICON": "기본 파비콘", "FAVICON": "파비콘", "IMAPGENERALSETTINGS": "IMAP", - "LOGINMAILFREQUENCY": "로그인 메일 빈도 (초)" + "LOGINMAILFREQUENCY": "로그인 메일 빈도 (초)", + "USERNAME": "사용자 이름" } } \ No newline at end of file diff --git a/public/app/main/apps/settings/i18n/lv.json b/public/app/main/apps/settings/i18n/lv.json index 7ee9a7f..f31be62 100644 --- a/public/app/main/apps/settings/i18n/lv.json +++ b/public/app/main/apps/settings/i18n/lv.json @@ -33,7 +33,8 @@ "BLOCKDURATION_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "Vērtībai jābūt lielākai vai vienādai ar", "BLOCKDURATION_REQUIRED": "Obligāts lauks", "LOGINMAILFREQUENCY_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "Vērtībai jābūt lielākai vai vienādai ar", - "LOGINMAILFREQUENCY_REQUIRED": "Obligāts lauks" + "LOGINMAILFREQUENCY_REQUIRED": "Obligāts lauks", + "USERNAME_REQUIRED": "Obligāts lauks" }, "HELP": { "ADDRESS": "Ārējā (publiskā) IP adrese", @@ -46,7 +47,9 @@ "MOTIONBARREMEMBERME": "Aktivizēt/atspējot \"Atcerēties mani\" iespēju Motion tālruņa joslā.", "RTLSUPPORT": "Iespējo RTL atbalstu arābu, persiešu un ebreju valodām", "DEFAULTSCREENRECORDINGPATH": "Ievadiet ceļu, kur aģenta datorā saglabāt ekrāna ierakstīšanas failus (noklusējuma video mapes ceļam atstājiet tukšu)", - "LOGINMAILFREQUENCY": "Lūdzu, atcerieties, ka katru reizi, mainot šo parametru, restartējiet EMAIL pakalpojumu" + "LOGINMAILFREQUENCY": "Lūdzu, atcerieties, ka katru reizi, mainot šo parametru, restartējiet EMAIL pakalpojumu", + "PASSWORD": "Parole", + "USERNAME": "Lietotājvārds" }, "SMTP_SSL": "Protokola SMTP standarts SSL", "CALL_RECORDING_ENCRYPTION": "Balss ierakstu šifrēšana", @@ -209,6 +212,7 @@ "DEFAULT_FAVICON": "Noklusējuma Faviksons", "FAVICON": "Faviksons", "IMAPGENERALSETTINGS": "IMAP", - "LOGINMAILFREQUENCY": "Pieteikšanās pasta frekvence (sek)" + "LOGINMAILFREQUENCY": "Pieteikšanās pasta frekvence (sek)", + "USERNAME": "Lietotājvārds" } } \ No newline at end of file diff --git a/public/app/main/apps/settings/i18n/nl.json b/public/app/main/apps/settings/i18n/nl.json index 1ca6ee5..1a34586 100644 --- a/public/app/main/apps/settings/i18n/nl.json +++ b/public/app/main/apps/settings/i18n/nl.json @@ -78,7 +78,9 @@ "MOTIONBARREMEMBERME": "Schakel de Remember Me-functie in / uit in Motion Phonebar", "RTLSUPPORT": "Schakelt de RTL-ondersteuning in voor Arabische, Perzische en Hebreeuwse talen", "DEFAULTSCREENRECORDINGPATH": "Voer het pad in waar bestanden op het scherm moeten worden opgeslagen op de agentcomputer (laat dit leeg voor het standaard pad van de videomap)", - "LOGINMAILFREQUENCY": "Vergeet niet om de EMAIL-service opnieuw te starten telkens wanneer deze parameter is gewijzigd" + "LOGINMAILFREQUENCY": "Vergeet niet om de EMAIL-service opnieuw te starten telkens wanneer deze parameter is gewijzigd", + "PASSWORD": "Wachtwoord", + "USERNAME": "Gebruikersnaam" }, "ERRORS": { "ADDRESS_REQUIRED": "Het adres is vereist.", @@ -110,7 +112,8 @@ "BLOCKDURATION_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "De waarde moet groter zijn dan of gelijk zijn aan", "BLOCKDURATION_REQUIRED": "Verplicht veld", "LOGINMAILFREQUENCY_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "De waarde moet groter dan of gelijk zijn aan", - "LOGINMAILFREQUENCY_REQUIRED": "Verplicht veld" + "LOGINMAILFREQUENCY_REQUIRED": "Verplicht veld", + "USERNAME_REQUIRED": "Verplicht veld" }, "EDIT_NETWORK": "Edit netwerk", "DELETE_NETWORK": "Netwerk verwijderen", @@ -209,6 +212,7 @@ "DEFAULT_FAVICON": "Standaard Favicon", "FAVICON": "Favicon", "IMAPGENERALSETTINGS": "IMAP", - "LOGINMAILFREQUENCY": "Aanmeldingsfrequentie (sec)" + "LOGINMAILFREQUENCY": "Aanmeldingsfrequentie (sec)", + "USERNAME": "Gebruikersnaam" } } \ No newline at end of file diff --git a/public/app/main/apps/settings/i18n/no.json b/public/app/main/apps/settings/i18n/no.json index 0ae685a..7981990 100644 --- a/public/app/main/apps/settings/i18n/no.json +++ b/public/app/main/apps/settings/i18n/no.json @@ -79,7 +79,9 @@ "MOTIONBARREMEMBERME": "Aktiver / deaktiver funksjonen Husk meg i Motion Phonebar", "RTLSUPPORT": "Aktiverer RTL-støtte for arabisk, persisk og hebraisk", "DEFAULTSCREENRECORDINGPATH": "Angi banen der du vil lagre skjermopptaksfiler på Agent-datamaskinen (la stå tom for standard videomappebane)", - "LOGINMAILFREQUENCY": "Husk å starte EMAIL-tjenesten på nytt hver gang denne parameteren er endret" + "LOGINMAILFREQUENCY": "Husk å starte EMAIL-tjenesten på nytt hver gang denne parameteren er endret", + "PASSWORD": "Passord", + "USERNAME": "Brukernavn" }, "ERRORS": { "ADDRESS_REQUIRED": "Adressen er nødvendig", @@ -111,7 +113,8 @@ "BLOCKDURATION_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "Verdien må være større enn eller lik", "BLOCKDURATION_REQUIRED": "Obligatoriske felt", "LOGINMAILFREQUENCY_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "Verdien må være større enn eller lik", - "LOGINMAILFREQUENCY_REQUIRED": "Obligatoriske felt" + "LOGINMAILFREQUENCY_REQUIRED": "Obligatoriske felt", + "USERNAME_REQUIRED": "Obligatoriske felt" }, "EDIT_NETWORK": "Endre nettverk", "DELETE_NETWORK": "Slette nettverket", @@ -209,6 +212,7 @@ "DEFAULT_FAVICON": "Standard Favicon", "FAVICON": "favicon", "IMAPGENERALSETTINGS": "IMAP", - "LOGINMAILFREQUENCY": "Påloggingspostfrekvens (sek)" + "LOGINMAILFREQUENCY": "Påloggingspostfrekvens (sek)", + "USERNAME": "Brukernavn" } } \ No newline at end of file diff --git a/public/app/main/apps/settings/i18n/pl.json b/public/app/main/apps/settings/i18n/pl.json index 7b9ddc9..e9a0333 100644 --- a/public/app/main/apps/settings/i18n/pl.json +++ b/public/app/main/apps/settings/i18n/pl.json @@ -79,7 +79,9 @@ "MOTIONBARREMEMBERME": "Włącz / wyłącz funkcję Zapamiętaj mnie w Ruchomy pasek telefonu", "RTLSUPPORT": "Włącza obsługę RTL dla języków arabskiego, perskiego i hebrajskiego", "DEFAULTSCREENRECORDINGPATH": "Wprowadź ścieżkę, w której mają być przechowywane pliki nagrań ekranu na komputerze agenta (pozostaw puste dla domyślnej ścieżki folderu wideo)", - "LOGINMAILFREQUENCY": "Pamiętaj, aby ponownie uruchomić usługę EMAIL za każdym razem, gdy ten parametr zostanie zmieniony" + "LOGINMAILFREQUENCY": "Pamiętaj, aby ponownie uruchomić usługę EMAIL za każdym razem, gdy ten parametr zostanie zmieniony", + "PASSWORD": "Hasło", + "USERNAME": "Nazwa Użytkownika" }, "ERRORS": { "ADDRESS_REQUIRED": "Pole obowiązkowe", @@ -111,7 +113,8 @@ "BLOCKDURATION_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "Wartość musi być większa lub równa", "BLOCKDURATION_REQUIRED": "Pole obowiązkowe", "LOGINMAILFREQUENCY_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "Wartość musi być większa lub równa", - "LOGINMAILFREQUENCY_REQUIRED": "Pole obowiązkowe" + "LOGINMAILFREQUENCY_REQUIRED": "Pole obowiązkowe", + "USERNAME_REQUIRED": "Pole obowiązkowe" }, "EDIT_NETWORK": "Edycja sieci", "DELETE_NETWORK": "Usuń sieć", @@ -209,6 +212,7 @@ "DEFAULT_FAVICON": "Domyślny Favicon", "FAVICON": "Favicon", "IMAPGENERALSETTINGS": "IMAP", - "LOGINMAILFREQUENCY": "Częstotliwość logowania do logowania (s)" + "LOGINMAILFREQUENCY": "Częstotliwość logowania do logowania (s)", + "USERNAME": "Nazwa Użytkownika" } } \ No newline at end of file diff --git a/public/app/main/apps/settings/i18n/pt-BR.json b/public/app/main/apps/settings/i18n/pt-BR.json index e891eae..174e3a8 100644 --- a/public/app/main/apps/settings/i18n/pt-BR.json +++ b/public/app/main/apps/settings/i18n/pt-BR.json @@ -105,7 +105,9 @@ "MOTIONBARREMEMBERME": "Ativar / desativar o recurso Lembrar-me no Motion Phonebar", "RTLSUPPORT": "Ativa o suporte RTL para os idiomas árabe, persa e hebraico", "DEFAULTSCREENRECORDINGPATH": "Digite o caminho para armazenar os arquivos de gravação de tela no computador do agente (deixe em branco para o caminho padrão da pasta de vídeo)", - "LOGINMAILFREQUENCY": "Lembre-se de reiniciar o serviço EMAIL sempre que esse parâmetro for alterado" + "LOGINMAILFREQUENCY": "Lembre-se de reiniciar o serviço EMAIL sempre que esse parâmetro for alterado", + "PASSWORD": "Senha", + "USERNAME": "Nome do usuário" }, "ERRORS": { "CHATTIMEOUT_REQUIRED": "Campo obrigatório", @@ -137,7 +139,8 @@ "BLOCKDURATION_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "O valor deve ser maior ou igual a", "BLOCKDURATION_REQUIRED": "Campo obrigatório", "LOGINMAILFREQUENCY_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "O valor deve ser maior ou igual a", - "LOGINMAILFREQUENCY_REQUIRED": "Campo obrigatório" + "LOGINMAILFREQUENCY_REQUIRED": "Campo obrigatório", + "USERNAME_REQUIRED": "Campo obrigatório" }, "EDIT_NETWORK": "Editar rede", "DELETE_NETWORK": "Excluir rede", @@ -209,6 +212,7 @@ "DEFAULT_FAVICON": "Favicon padrão", "FAVICON": "Favicon", "IMAPGENERALSETTINGS": "IMAP", - "LOGINMAILFREQUENCY": "Frequência de email de login (s)" + "LOGINMAILFREQUENCY": "Frequência de email de login (s)", + "USERNAME": "Nome do usuário" } } \ No newline at end of file diff --git a/public/app/main/apps/settings/i18n/pt-PT.json b/public/app/main/apps/settings/i18n/pt-PT.json index bb5bd90..f5ee97c 100644 --- a/public/app/main/apps/settings/i18n/pt-PT.json +++ b/public/app/main/apps/settings/i18n/pt-PT.json @@ -79,7 +79,9 @@ "MOTIONBARREMEMBERME": "Ativar / desativar o recurso Lembrar-me no Motion Phonebar", "RTLSUPPORT": "Ativa o suporte RTL para os idiomas árabe, persa e hebraico", "DEFAULTSCREENRECORDINGPATH": "Digite o caminho para armazenar os arquivos de gravação de tela no computador do agente (deixe em branco para o caminho padrão da pasta de vídeo)", - "LOGINMAILFREQUENCY": "Lembre-se de reiniciar o serviço EMAIL sempre que esse parâmetro for alterado" + "LOGINMAILFREQUENCY": "Lembre-se de reiniciar o serviço EMAIL sempre que esse parâmetro for alterado", + "PASSWORD": "Senha", + "USERNAME": "Nome do usuário" }, "ERRORS": { "ADDRESS_REQUIRED": "O endereço é obrigatório", @@ -111,7 +113,8 @@ "BLOCKDURATION_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "O valor deve ser maior ou igual a", "BLOCKDURATION_REQUIRED": "Campo obrigatório", "LOGINMAILFREQUENCY_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "O valor deve ser maior ou igual a", - "LOGINMAILFREQUENCY_REQUIRED": "Campo obrigatório" + "LOGINMAILFREQUENCY_REQUIRED": "Campo obrigatório", + "USERNAME_REQUIRED": "Campo obrigatório" }, "EDIT_NETWORK": "Editar rede", "DELETE_NETWORK": "Excluir redes", @@ -209,6 +212,7 @@ "DEFAULT_FAVICON": "Favicon padrão", "FAVICON": "Favicon", "IMAPGENERALSETTINGS": "IMAP", - "LOGINMAILFREQUENCY": "Frequência de email de login (s)" + "LOGINMAILFREQUENCY": "Frequência de email de login (s)", + "USERNAME": "Nome do usuário" } } \ No newline at end of file diff --git a/public/app/main/apps/settings/i18n/ru.json b/public/app/main/apps/settings/i18n/ru.json index 18bb5aa..ae91388 100644 --- a/public/app/main/apps/settings/i18n/ru.json +++ b/public/app/main/apps/settings/i18n/ru.json @@ -79,7 +79,9 @@ "MOTIONBARREMEMBERME": "Включить / отключить функцию «Запомнить меня» в телефонной панели Motion", "RTLSUPPORT": "Включает поддержку RTL для арабского, персидского и иврита", "DEFAULTSCREENRECORDINGPATH": "Введите путь для сохранения файлов записи экрана на компьютере агента (оставьте пустым для пути к видео папке по умолчанию)", - "LOGINMAILFREQUENCY": "Пожалуйста, не забывайте перезапускать сервис EMAIL каждый раз, когда этот параметр был изменен" + "LOGINMAILFREQUENCY": "Пожалуйста, не забывайте перезапускать сервис EMAIL каждый раз, когда этот параметр был изменен", + "PASSWORD": "пароль", + "USERNAME": "имя пользователя" }, "ERRORS": { "ADDRESS_REQUIRED": "Адрес не требуется", @@ -111,7 +113,8 @@ "BLOCKDURATION_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "Значение должно быть больше или равно", "BLOCKDURATION_REQUIRED": "Обязательное поле", "LOGINMAILFREQUENCY_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "Значение должно быть больше или равно", - "LOGINMAILFREQUENCY_REQUIRED": "Обязательное поле" + "LOGINMAILFREQUENCY_REQUIRED": "Обязательное поле", + "USERNAME_REQUIRED": "Обязательное поле" }, "EDIT_NETWORK": "Редактировать сети", "DELETE_NETWORK": "Удалить сеть", @@ -209,6 +212,7 @@ "DEFAULT_FAVICON": "Фавикон по умолчанию", "FAVICON": "Favicon", "IMAPGENERALSETTINGS": "IMAP", - "LOGINMAILFREQUENCY": "Частота входящей почты (сек)" + "LOGINMAILFREQUENCY": "Частота входящей почты (сек)", + "USERNAME": "имя пользователя" } } \ No newline at end of file diff --git a/public/app/main/apps/settings/i18n/sv.json b/public/app/main/apps/settings/i18n/sv.json index 819b61c..20cb857 100644 --- a/public/app/main/apps/settings/i18n/sv.json +++ b/public/app/main/apps/settings/i18n/sv.json @@ -79,7 +79,9 @@ "MOTIONBARREMEMBERME": "Aktivera / inaktivera funktionen Kom ihåg mig i Motion Phonebar", "RTLSUPPORT": "Aktiverar RTL-stödet för arabiska, persiska och hebreiska språk", "DEFAULTSCREENRECORDINGPATH": "Ange sökvägen där skärminspelningsfiler lagras på Agent-datorn (lämna tom för standardväg för videomapp)", - "LOGINMAILFREQUENCY": "Kom ihåg att starta om EMAIL-tjänsten varje gång denna parameter har ändrats" + "LOGINMAILFREQUENCY": "Kom ihåg att starta om EMAIL-tjänsten varje gång denna parameter har ändrats", + "PASSWORD": "Lösenord", + "USERNAME": "Användarnamn" }, "ERRORS": { "ADDRESS_REQUIRED": "Adressen är obligatoriskt", @@ -111,7 +113,8 @@ "BLOCKDURATION_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "Värdet måste vara större än eller lika med", "BLOCKDURATION_REQUIRED": "Obligatoriskt fält", "LOGINMAILFREQUENCY_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "Värdet måste vara större än eller lika med", - "LOGINMAILFREQUENCY_REQUIRED": "Obligatoriskt fält" + "LOGINMAILFREQUENCY_REQUIRED": "Obligatoriskt fält", + "USERNAME_REQUIRED": "Obligatoriskt fält" }, "EDIT_NETWORK": "Edit Network", "DELETE_NETWORK": "Ta bort nätverket", @@ -209,6 +212,7 @@ "DEFAULT_FAVICON": "Standard Favicon", "FAVICON": "favicon", "IMAPGENERALSETTINGS": "IMAP", - "LOGINMAILFREQUENCY": "Logga in e-postfrekvens (sek)" + "LOGINMAILFREQUENCY": "Logga in e-postfrekvens (sek)", + "USERNAME": "Användarnamn" } } \ No newline at end of file diff --git a/public/app/main/apps/settings/i18n/tr.json b/public/app/main/apps/settings/i18n/tr.json index 3bfed77..9346334 100644 --- a/public/app/main/apps/settings/i18n/tr.json +++ b/public/app/main/apps/settings/i18n/tr.json @@ -79,7 +79,9 @@ "MOTIONBARREMEMBERME": "Motion Phonebar'daki Beni Hatırla özelliğini etkinleştir / devre dışı bırak", "RTLSUPPORT": "Arapça, Farsça ve İbranice dilleri için RTL Desteğini etkinleştirir", "DEFAULTSCREENRECORDINGPATH": "Ajan bilgisayarda ekran kayıt dosyalarının kaydedileceği yolu girin (varsayılan Video Klasörü yolu için boş bırakın)", - "LOGINMAILFREQUENCY": "Lütfen bu parametre her değiştirildiğinde EMAIL hizmetini yeniden başlatmayı unutmayın." + "LOGINMAILFREQUENCY": "Lütfen bu parametre her değiştirildiğinde EMAIL hizmetini yeniden başlatmayı unutmayın.", + "PASSWORD": "Parola", + "USERNAME": "Kullanıcı adı" }, "ERRORS": { "ADDRESS_REQUIRED": "Bu Adresi gerekli", @@ -111,7 +113,8 @@ "BLOCKDURATION_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "Değer şuna eşit veya daha büyük olmalıdır", "BLOCKDURATION_REQUIRED": "Zorunlu alan", "LOGINMAILFREQUENCY_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "Değer şuna eşit veya daha büyük olmalıdır", - "LOGINMAILFREQUENCY_REQUIRED": "Zorunlu alan" + "LOGINMAILFREQUENCY_REQUIRED": "Zorunlu alan", + "USERNAME_REQUIRED": "Zorunlu alan" }, "EDIT_NETWORK": "Edit Ağ", "DELETE_NETWORK": "Delete Ağ", @@ -209,6 +212,7 @@ "DEFAULT_FAVICON": "Varsayılan Favicon", "FAVICON": "favicon", "IMAPGENERALSETTINGS": "IMAP", - "LOGINMAILFREQUENCY": "Giriş Posta Sıklığı (sn)" + "LOGINMAILFREQUENCY": "Giriş Posta Sıklığı (sn)", + "USERNAME": "Kullanıcı adı" } } \ No newline at end of file diff --git a/public/app/main/apps/settings/i18n/zh-CN.json b/public/app/main/apps/settings/i18n/zh-CN.json index c39186d..0493b0a 100644 --- a/public/app/main/apps/settings/i18n/zh-CN.json +++ b/public/app/main/apps/settings/i18n/zh-CN.json @@ -79,7 +79,9 @@ "MOTIONBARREMEMBERME": "在Motion Phonebar中启用/禁用“记住我”功能", "RTLSUPPORT": "支持阿拉伯语,波斯语和希伯来语的RTL支持", "DEFAULTSCREENRECORDINGPATH": "输入在代理计算机上存储屏幕录像文件的路径(将其保留为默认的“视频文件夹”路径为空)", - "LOGINMAILFREQUENCY": "请记住,每次更改此参数后,都要重新启动EMAIL服务" + "LOGINMAILFREQUENCY": "请记住,每次更改此参数后,都要重新启动EMAIL服务", + "PASSWORD": "密码", + "USERNAME": "用户名" }, "ERRORS": { "ADDRESS_REQUIRED": "该地址是必填项", @@ -111,7 +113,8 @@ "BLOCKDURATION_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "该值必须大于或等于", "BLOCKDURATION_REQUIRED": "必填项", "LOGINMAILFREQUENCY_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "该值必须大于或等于", - "LOGINMAILFREQUENCY_REQUIRED": "必填项" + "LOGINMAILFREQUENCY_REQUIRED": "必填项", + "USERNAME_REQUIRED": "必填项" }, "EDIT_NETWORK": "编辑网络", "DELETE_NETWORK": "删除网络", @@ -209,6 +212,7 @@ "DEFAULT_FAVICON": "默认图标", "FAVICON": "网站图标", "IMAPGENERALSETTINGS": "IMAP", - "LOGINMAILFREQUENCY": "登录邮件频率(秒)" + "LOGINMAILFREQUENCY": "登录邮件频率(秒)", + "USERNAME": "用户名" } } \ No newline at end of file diff --git a/public/app/main/apps/settings/i18n/zh-TW.json b/public/app/main/apps/settings/i18n/zh-TW.json index 43e3557..a48b323 100644 --- a/public/app/main/apps/settings/i18n/zh-TW.json +++ b/public/app/main/apps/settings/i18n/zh-TW.json @@ -79,7 +79,9 @@ "MOTIONBARREMEMBERME": "在Motion Phonebar中啟用/禁用“記住我”功能", "RTLSUPPORT": "支持阿拉伯語,波斯語和希伯來語的RTL支持", "DEFAULTSCREENRECORDINGPATH": "輸入在代理計算機上存儲屏幕錄像文件的路徑(將其保留為默認的“視頻文件夾”路徑為空)", - "LOGINMAILFREQUENCY": "請記住,每次更改此參數後,都要重新啟動EMAIL服務" + "LOGINMAILFREQUENCY": "請記住,每次更改此參數後,都要重新啟動EMAIL服務", + "PASSWORD": "密碼", + "USERNAME": "用戶名" }, "ERRORS": { "ADDRESS_REQUIRED": "地址為必填欄位", @@ -111,7 +113,8 @@ "BLOCKDURATION_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "該值必須大於或等於", "BLOCKDURATION_REQUIRED": "必填項", "LOGINMAILFREQUENCY_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "該值必須大於或等於", - "LOGINMAILFREQUENCY_REQUIRED": "必填項" + "LOGINMAILFREQUENCY_REQUIRED": "必填項", + "USERNAME_REQUIRED": "必填項" }, "EDIT_NETWORK": "編輯網路", "DELETE_NETWORK": "刪除網路", @@ -209,6 +212,7 @@ "DEFAULT_FAVICON": "默認圖標", "FAVICON": "網站圖標", "IMAPGENERALSETTINGS": "IMAP", - "LOGINMAILFREQUENCY": "登錄郵件頻率(秒)" + "LOGINMAILFREQUENCY": "登錄郵件頻率(秒)", + "USERNAME": "用戶名" } } \ No newline at end of file diff --git a/public/index.html b/public/index.html index 08d179a..739e40b 100644 --- a/public/index.html +++ b/public/index.html @@ -60,7 +60,7 @@ - + diff --git a/public/scripts/app.14cb6f21.js b/public/scripts/app.18c2e2aa.js similarity index 55% rename from public/scripts/app.14cb6f21.js rename to public/scripts/app.18c2e2aa.js index 58e42ef..d22c205 100644 --- a/public/scripts/app.14cb6f21.js +++ b/public/scripts/app.18c2e2aa.js @@ -1 +1 @@ -!function(){"use strict";angular.module("app.auth",[])}(),function(){"use strict";angular.module("app.core",["ngAnimate","ngAria","ngCookies","ngMessages","ngResource","ngSanitize","ngMaterial","pascalprecht.translate","ui.router","ui.router.state.events","gridster","ds.clock","angucomplete-alt"])}(),function(){"use strict";function e(e,n){e.state("app.errors_error-404",{url:"/errors/error-404",views:{"main@":{templateUrl:"app/core/layouts/content-only.html",controller:"MainController as vm"},"content@app.errors_error-404":{templateUrl:"app/errors/404/error-404.html",controller:"Error404Controller as vm"}},params:{status:404,statusText:"",data:{},config:{}},bodyClass:"error-404"}),n.addPart("app/errors/404")}e.$inject=["$stateProvider","$translatePartialLoaderProvider"],angular.module("app.errors.error-404",[]).config(e)}(),function(){"use strict";function e(e,n){e.state("app.errors_error-500",{url:"/errors/error-500",views:{"main@":{templateUrl:"app/core/layouts/content-only.html",controller:"MainController as vm"},"content@app.errors_error-500":{templateUrl:"app/errors/500/error-500.html",controller:"Error500Controller as vm"}},params:{status:500,statusText:"",data:{},config:{}},bodyClass:"error-500"}),n.addPart("app/errors/500")}e.$inject=["$stateProvider","$translatePartialLoaderProvider"],angular.module("app.errors.error-500",[]).config(e)}(),function(){"use strict";angular.module("app.errors",["app.errors.error-404","app.errors.error-500"])}(),function(){"use strict";function e(e){e.addPart("app/footer")}e.$inject=["$translatePartialLoaderProvider"],angular.module("app.footer",[]).config(e)}(),function(){"use strict";function e(e,n){e.state("app.forgot",{url:"/forgot",views:{"main@":{templateUrl:"app/core/layouts/content-only.html",controller:"MainController as vm"},"content@app.forgot":{templateUrl:"app/forgot/forgot.html",controller:"ForgotPasswordController as vm"}},bodyClass:"forgot"}),n.addPart("app/forgot")}e.$inject=["$stateProvider","$translatePartialLoaderProvider"],angular.module("app.forgot",[]).config(e)}(),function(){"use strict";function e(e){e.addPart("app/header")}e.$inject=["$translatePartialLoaderProvider"],angular.module("app.header",[]).config(e)}(),function(){"use strict";angular.module("motion",["angular-toasty","app.core","app.auth","app.navigation","app.toolbar","app.quick-panel","app.header","app.footer","app.dashboards","app.staff","app.contactmanager","app.voice","app.chat","app.mail","app.sms","app.openchannel","app.fax","app.tools","app.callysquare","app.analytics","app.integrations","app.settings","app.motiondialer","app.help","app.jscripty","app.marketplace","app.plugins","app.video","app.login","app.forgot","app.reset","app.errors"])}(),function(){"use strict";function e(e,n){e.state("app.login",{url:"/login?token&userId",views:{"main@":{templateUrl:"app/core/layouts/content-only.html",controller:"MainController as vm"},"content@app.login":{templateUrl:"app/login/login.html",controller:"LoginController as vm"}},bodyClass:"login"}),n.addPart("app/login")}e.$inject=["$stateProvider","$translatePartialLoaderProvider"],angular.module("app.login",[]).config(e)}(),function(){"use strict";function e(e,n,t,a){e.state("app.analytics",{abstract:!0,url:"/analytics"}).state("app.analytics.metrics",{url:"/metrics",views:{"content@app":{templateUrl:"app/main/apps/analytics/views/metrics/metrics.html",controller:"MetricsController as vm"}},resolve:{metrics:["apiResolver","Auth",function(e,n){return n.hasRole("admin")?e.resolve("analyticMetric@get",{fields:"createdAt,updatedAt,id,name,table,metric,description",sort:"-updatedAt",limit:10,offset:0}):e.resolve("userProfile@getResources",{id:n.getCurrentUser().userProfileId,section:"Metrics",fields:"createdAt,updatedAt,id,name,table,metric,description",sort:"-updatedAt",limit:10,offset:0})}],userProfile:["apiResolver","Auth",function(e,n){return n.hasRole("admin")?null:e.resolve("userProfile@get",{fields:"id,name,crudPermissions",id:n.getCurrentUser().userProfileId})}],userProfileSection:["apiResolver","Auth",function(e,n){return n.hasRole("admin")?null:e.resolve("userProfileSection@get",{fields:"id,name,enabled,includeAll,autoAssociation,crudPermissions",userProfileId:n.getCurrentUser().userProfileId,sectionId:1201})}]},authenticate:!0,permissionId:1201,bodyClass:"analytics"}).state("app.analytics.extractedReports",{url:"/extractedReports",views:{"content@app":{templateUrl:"app/main/apps/analytics/views/extractedReports/extractedReports.html",controller:"ExtractedReportsController as vm"}},resolve:{extractedReports:["apiResolver","Auth",function(e,n){return n.hasRole("admin")?e.resolve("analyticExtractedReport@get",{fields:"createdAt,updatedAt,id,name,basename,savename,type,startDate,endDate,status,output,reportId,reportType",sort:"-updatedAt",limit:10,offset:0}):e.resolve("userProfile@getResources",{id:n.getCurrentUser().userProfileId,section:"ExtractedReports",fields:"createdAt,updatedAt,id,name,basename,savename,type,startDate,endDate,status,output,reportId,reportType",sort:"-updatedAt",limit:10,offset:0})}],userProfile:["apiResolver","Auth",function(e,n){return n.hasRole("admin")?null:e.resolve("userProfile@get",{fields:"id,name,crudPermissions",id:n.getCurrentUser().userProfileId})}],userProfileSection:["apiResolver","Auth",function(e,n){return n.hasRole("admin")?null:e.resolve("userProfileSection@get",{fields:"id,name,enabled,includeAll,autoAssociation,crudPermissions",userProfileId:n.getCurrentUser().userProfileId,sectionId:1202})}]},authenticate:!0,permissionId:1202,bodyClass:"analytics"}),n.addPart("app/main/apps/analytics")}e.$inject=["$stateProvider","$translatePartialLoaderProvider","msApiProvider","msNavigationServiceProvider"],angular.module("app.analytics",["ngCsv","ngPassword","md.data.table","flow","mdColorPicker","ckeditor","ng-sortable","ngAria","ngAnimate","mdPickers","mwFormBuilder","mwFormViewer","mwFormUtils","ngclipboard","angular-cron-jobs","ngEmbed","angularMaterialFormBuilder","material.components.expansionPanels","chart.js","angular.filter","app.analytics.reports"]).config(e)}(),function(){"use strict";function e(e){e.state("app.analytics.reports",{url:"/reports",views:{"content@app":{templateUrl:"app/main/apps/analytics/views/reports/reports.html",controller:"ReportsController as vm"}},resolve:{treeReports:["apiResolver",function(e){return e.resolve("analyticTreeReport@get",{fields:"id,tree",limit:10,offset:0})}],userProfile:["apiResolver","Auth",function(e,n){return e.resolve("userProfile@get",{fields:"id,name,crudPermissions",id:n.getCurrentUser().userProfileId})}],userProfileSection:["apiResolver","Auth",function(e,n){return e.resolve("userProfileSection@get",{fields:"id,name,enabled,includeAll,autoAssociation,crudPermissions",userProfileId:n.getCurrentUser().userProfileId,sectionId:1203})}]},authenticate:!0,permissionId:1203,bodyClass:"analytics"}).state("app.analytics.reports.edit",{url:"/:id?tab",views:{"content@app":{templateUrl:"app/main/apps/analytics/views/reports/edit/view.html",controller:"ReportController as vm"}},resolve:{report:["apiResolver","$stateParams","$q","describeTable",function(e,n,a,i){var s;return e.resolve("analyticCustomReport@get",{fields:"createdAt,updatedAt,id,name,description,table,conditions,joins",id:n.id}).then(function(e){var n=[];if((s=e).joins)try{s.joins=JSON.parse(s.joins);for(var t=0;t');a.append(n),o(function(){!function(e,n){var t=n.find("code"),a=e.split("\n"),i=(a=a.filter(function(e){return e.trim().length}))[0].match(/^\s*/)[0],s=new RegExp("^"+i);a=a.map(function(e){return e.replace(s,"").replace(/\s+$/,"")});var o=hljs.highlight(r.language||r.lang,a.join("\n"),!0);o.value=o.value.replace(/=""<\/span>/gi,"").replace("","").replace("",""),t.append(o.value).addClass("highlight")}(e,n)},34,!1)}})}}}}e.$inject=["$timeout","$q","$interpolate"],angular.module("app.core").directive("hljs",e)}(),function(){"use strict";function e(a,i,s,o){var r=this;function n(){var a=r.selectedField.options&&!_.isEmpty(r.selectedField.options.extraOperators),i=r.selectedField.options&&!_.isEmpty(r.selectedField.options.excludedOperators);r.availableOperators=_.filter(r.operators,function(n){var e=!n.applyTo||_.includes(n.applyTo,r.selectedField.type);n.isExtra=a&&_.some(r.selectedField.options.extraOperators,function(e){return e===n.type});var t=_.includes(n.excludeFrom,r.selectedField.type)||i&&_.includes(r.selectedField.options.excludedOperators,n.type);if((e||n.isExtra)&&!t)return n})}function t(){!r.value||_.isArray(r.value)&&_.isEmpty(r.value)?r.isValidCondition=!1:r.selectedOperator&&"$between"===r.selectedOperator.type?r.isValidCondition=!(!r.endRangeValue||!r.isValidRange):r.isValidCondition=!0}function e(){"number"===r.selectedField.type?_.isNumber(r.endRangeValue)?r.isValidRange=Number(r.endRangeValue)>Number(r.value):r.isValidRange=!0:"date"===r.selectedField.type&&(r.maxDateRange=moment(r.endRangeValue).subtract(1,"day"),r.isValidRange=!0),t()}function l(){var e=c();r.options.conditions.push(e),u()}function d(){var e=c(),n=_.findIndex(r.options.conditions,"style");r.options.conditions.splice(n,1,e),u(),r.pendingCondition.style=null,r.pendingCondition=void 0}function c(){return{name:r.selectedField.name,operator:a.instant("DASHBOARDS."+r.selectedOperator.translate),value:r.value,endValue:r.endRangeValue,displayValue:m(r.value),displayEndValue:m(r.endRangeValue),query:{column:r.selectedField.column,operator:r.selectedOperator.type,value:function(){var e,n=r.value,t=r.endRangeValue;switch(r.selectedField.type){case"date":var a=moment(n).utcOffset(0,!0).format("YYYY-MM-DD");if("$between"===r.selectedOperator.type){var i=moment(t).utcOffset(0,!0).format("YYYY-MM-DD");e=[a,i]}else e=a;break;case"number":e="$between"===r.selectedOperator.type?[n,t]:n;break;case"multiselect":var s=r.selectedField.options.field||"id";e=_.map(n,s);break;case"select":e=n.id;break;case"autocomplete":e=r.selectedOperator.isExtra?n:n.id;break;default:e=n}return e}()},disabled:!1}}function m(e){var n;if(e){switch(r.selectedField.type){case"date":n=moment(e).format("YYYY-MM-DD");break;case"multiselect":var t=_.map(e,function(e){return e.name});n="$eq"===r.selectedOperator.type?t.join(" or "):t.join(" and ");break;case"select":n=e.name;break;case"autocomplete":n=r.selectedOperator.isExtra?e:e.displayValue;break;default:n=e}return n}}function u(){r.value=null,r.endRangeValue=null,r.minDateRange=null,r.maxDateRange=null,r.isValidCondition=!1}r.operators=r.availableOperators=[{type:"$eq",symbol:"=",translate:"EQUALS",excludeFrom:["multiselect"]},{type:"$ne",symbol:"≠",translate:"IS_NOT_EQUAL",excludeFrom:["multiselect"]},{type:"$in",symbol:"∈",translate:"IS_AMONG",applyTo:["multiselect"]},{type:"$notIn",symbol:"∉",translate:"IS_NOT_AMONG",applyTo:["multiselect"]},{type:"$substring",symbol:"⊃",translate:"CONTAINS",applyTo:["text"]},{type:"$startsWith",symbol:"a..",translate:"STARTS_WITH",applyTo:["text"]},{type:"$endsWith",symbol:"..a",translate:"ENDS_WITH",applyTo:["text"]},{type:"$lt",symbol:"<",translate:"IS_LESS_THAN",applyTo:["date","number"]},{type:"$gt",symbol:">",translate:"IS_GREATER_THAN",applyTo:["date","number"]},{type:"$lte",symbol:"≤",translate:"IS_LESS_THAN_OR_EQUAL_TO",applyTo:["date","number"]},{type:"$gte",symbol:"≥",translate:"IS_GREATER_THAN_OR_EQUAL_TO",applyTo:["date","number"]},{type:"$between",symbol:"≬",translate:"IS_BETWEEN",applyTo:["date","number"]}],r.addCondition=l,r.editCondition=function(e){r.pendingCondition=e,r.pendingCondition.style="md-amber-200-bg",r.selectedField=_.find(r.options.fields,["name",r.pendingCondition.name]),n(),r.selectedOperator=_.find(r.availableOperators,["type",r.pendingCondition.query.operator]),"date"===r.selectedField.type&&"string"==typeof r.pendingCondition.value?(r.value=new Date(r.pendingCondition.value),r.minDateRange=moment(r.value).add(1,"day"),r.endRangeValue=r.pendingCondition.endValue?new Date(r.pendingCondition.endValue):void 0):(r.value=r.pendingCondition.value,r.endRangeValue=r.pendingCondition.endValue);r.isValidRange=!0,r.isValidCondition=!0},r.updateCondition=d,r.cancelUpdateCondition=function(){r.pendingCondition.style=null,r.pendingCondition=void 0},r.setConditionStatus=function(e){e.style=e.disabled?void 0:"chip-disabled",e.disabled=!e.disabled},r.removeCondition=function(){_.isEmpty(r.options.conditions)&&r.clearFilter()},r.getValues=function(){var n=angular.copy(r.selectedField.options.route);if("autocomplete"===r.selectedField.type)for(var e=0;e',compile:function(e){return e.addClass("ms-card"),function(e,n){e.cardTemplateLoaded=function(){e.$emit("msCard::cardTemplateLoaded",n)}}}}})}(),function(){"use strict";angular.module("app.core").directive("msChipColor",function(){return{restrict:"A",link:function(e,i,n){n.$observe("msChipColor",function(e){var n=i.parent().parent();if(n.hasClass("md-background-bg md-hue-3")||n.addClass("md-background-bg md-hue-3"),_.isEmpty(e)){var t=n[0].className.split(" "),a=t.indexOf("md-hue-3");t.length=a+1,n[0].className=t.join(" ")}else n.addClass(e)})}}})}(),function(){"use strict";angular.module("app.core").directive("msClickToCall",function(){return{restrict:"E",scope:{type:"=",disabled:"=",target:"=",prefix:"=",license:"="},controller:["$scope","$rootScope","$http","$translate","$document","$mdDialog","Auth","toasty","api",function(t,n,a,i,s,o,e,r,l){function d(e){switch(t.currentUser.showWebBar){case 0:return m("http://127.0.0.1:"+(t.currentUser.phoneBarRemoteControlPort||"9888")+"/api/originate/"+c(e));case 2:return n.$broadcast("webrtc::call",{target:c(e)})}}function c(e){return _.isNil(e)?"":e.replace(/[^\w.+#*\-]+/g,"")}function m(e){return a.get(e).success(function(){r.success({title:"Successful call",msg:"Call properly handled!"})}).error(function(e){r.error({title:"PhoneBar API Error",msg:i.instant("CONTACTMANAGER.ERRORS.PHONEBAR_API")})})}t.currentUser=e.getCurrentUser(),t.showMenu=function(){return t.target&&t.target.indexOf("@")<0&&t.target!=t.currentUser.internal&&t.target!=t.currentUser.name&&(0==t.currentUser.showWebBar&&t.currentUser.phoneBarRemoteControl||2==t.currentUser.showWebBar&&t.license.webrtc)&&!t.disabled},t.call=function(e){return 2!==t.currentUser.showWebBar?(n=e,l.user.getVoicePrefixes({id:t.currentUser.id}).$promise.then(function(e){if(e.count)return o.show({controller:"PrefixDialogController",controllerAs:"vm",templateUrl:"assets/ms-phonebar/prefix/dialog.html",parent:angular.element(s.body),clickOutsideToClose:!0,locals:{prefixes:e,required:t.currentUser.phoneBarPrefixRequired}})}).then(function(e){t.currentUser.phoneBarPrefixRequired?e&&-1!==e&&d(e+n):e&&-1!==e?d(e+n):e||d(n)})):d(e);var n},t.transfer=function(e){switch(t.currentUser.showWebBar){case 0:return m("http://127.0.0.1:"+(t.currentUser.phoneBarRemoteControlPort||"9888")+"/api/transfer?number="+c(e));case 2:n.$broadcast("webrtc::transfer",{target:c(e)})}}}],templateUrl:"app/core/directives/ms-click-to-call/ms-click-to-call.html"}})}(),function(){"use strict";function e(i){return{require:"ngModel",priority:1,link:function(e,n,t,a){a.$formatters.push(i.formatter),a.$parsers.push(i.parser)}}}e.$inject=["msDatepickerFixConfig"],angular.module("app.core").provider("msDatepickerFixConfig",function(){var n={formatter:function(e){return e?""===e?e:new Date(e):""},parser:function(e){return e?moment(e).add(moment(e).utcOffset(),"m").toDate():""}};this.config=function(e){n=angular.extend({},n,e)},this.$get=function(){return n}}).directive("msDatepickerFix",e)}(),function(){"use strict";function e(s){return{restrict:"E",scope:{id:"=",model:"=",element:"=",title:"=",path:"="},replace:!0,link:function(n,e){var t=!1,a={};a.id=n.id,_.isNil(n.path)||(a.path=n.path);var i=document.createElement(n.element);i.setAttribute("preload","none"),i.setAttribute("controls","true"),"audio"===n.element&&i.setAttribute("style","width: 265px;"),"video"===n.element&&i.setAttribute("style","max-width: 500px;"),i.setAttribute("title",n.title),i.setAttribute("src"," "),i.onplay=function(e){t||(t=!0,e.preventDefault(),s[n.model].download(a).$promise.then(function(e){var n=[e.buffer],t=new Blob(n,{type:e.type});i.setAttribute("type",e.type),i.setAttribute("src",URL.createObjectURL(t)),i.play()}).catch(function(e){console.error(e)}))},e.append(i)}}}e.$inject=["api"],angular.module("app.core").directive("msDialogRecording",e)}(),function(){"use strict";angular.module("app.core").directive("msDualMultiselect",function(){return{restrict:"E",scope:{options:"="},controller:["$scope",function(o){o.canTransfer=function(e,n,t){if(!n.readOnly)return void 0!==e.isValid&&e.isValid?t?o.transfer(n.selectedItems,n.items,n.selectedItems.indexOf(e),t):o.transfer(n.items,n.selectedItems,n.items.indexOf(e),t):void 0},o.transfer=function(e,n,t,a){var i=[];if(0<=t)i.push(e[t]),n.push(e[t]),e.splice(t,1);else{for(var s=0;s',link:function(t,e){var n=e.emojioneArea({pickerPosition:t.pickerPosition,search:t.search,recentEmojis:t.recentEmojis,placeholder:a.instant(t.placeholder||"Type a message"),attributes:{spellcheck:!0},events:{keypress:function(e,n){t.ngModel=this.getText(),t.onReply({event:n,body:this.getText()})},emojibtn_click:function(){t.ngModel=this.getText()}}});t.ngModel&&n[0].emojioneArea.setText(t.ngModel),t.internalControl=t.ctrlMethods||{},t.internalControl.setText=function(e){n[0].emojioneArea.setText(e)},t.internalControl.getText=function(){return n[0].emojioneArea.getText()},t.$watch("ngModel",function(e){e||n[0].emojioneArea.setText("")})}}}e.$inject=["$translate"],angular.module("app.core").directive("msEmojiArea",e)}(),function(){"use strict";angular.module("app.core").directive("msFontFamily",function(){return{restrict:"E",scope:{ngModel:"="},controller:["$scope",function(e){e.fonts=[{option:"Arial",value:"Arial,Helvetica,sans-serif"},{option:"Century Gothic",value:"Century Gothic,Futura,Didact Gothic,san-serif"},{option:"Calibri",value:"Calibri, Verdana, Geneva, sans-serif"},{option:"Comic Sans MS",value:"Comic Sans MS,cursive"},{option:"Courier New",value:"Courier New,Courier,monospace"},{option:"Georgia",value:"Georgia,serif"},{option:"Lucida Sans Unicode",value:"Lucida Sans Unicode,Lucida Grande,sans-serif"},{option:"Tahoma",value:"Tahoma,Geneva,sans-serif"},{option:"Times New Roman",value:"Times New Roman,Times,serif"},{option:"Trebuchet MS",value:"Trebuchet MS,Helvetica,sans-serif"},{option:"Verdana",value:"Verdana,Geneva,sans-serif"}]}],templateUrl:"app/core/directives/ms-font-family/ms-font-family.html"}})}(),function(){"use strict";angular.module("app.core").controller("MsFormWizardController",function(){var n=this;function e(){return n.forms.length}function t(){return 0===n.selectedIndex}function a(){return n.selectedIndex===e()-1}n.forms=[],n.selectedIndex=0,n.registerForm=function(e){n.forms.push(e)},n.previousStep=function(){if(t())return;n.selectedIndex--},n.nextStep=function(){if(a())return;n.selectedIndex++},n.firstStep=function(){n.selectedIndex=0},n.lastStep=function(){n.selectedIndex=e()-1},n.totalSteps=e,n.isFirstStep=t,n.isLastStep=a,n.currentStepInvalid=function(){return angular.isDefined(n.forms[n.selectedIndex])&&n.forms[n.selectedIndex].$invalid},n.previousStepInvalid=function(){return 0d.options.responsive.md?d.options.responsive.md:d.columnCount:l("sm")?d.columnCount=d.columnCount>d.options.responsive.sm?d.options.responsive.sm:d.columnCount:d.columnCount=d.options.responsive.xs;d.columnWidth=d.containerPos.width/d.columnCount}(),r.$broadcast("msMasonry:relayoutStarted"),d.items=d.container.find("ms-masonry-item");for(var e=Array.apply(null,new Array(d.columnCount)).map(function(){return 0}),n=0;n'),r=angular.element('
'),l=n.parent();function d(){s.addClass("ms-nav-folded"),g.$broadcast("msNav::forceCollapse"),n.scrollTop(0),l.append(o),o.on("mouseenter touchstart",function(e){c(e),i=!0})}function c(e){angular.isDefined(e)&&e.preventDefault(),s.addClass("ms-nav-folded-open"),g.$broadcast("msNav::expandMatchingToggles"),l.find(o).remove(),l.parent().append(r),r.on("mouseenter touchstart",function(e){m(e),i=!1})}function m(e){angular.isDefined(e)&&e.preventDefault(),g.$broadcast("msNav::forceCollapse"),n.scrollTop(0),s.removeClass("ms-nav-folded-open"),l.parent().find(r).remove(),l.append(o),o.on("mouseenter touchstart",function(e){c(e),i=!0})}function u(){s.removeClass("ms-nav-folded ms-nav-folded-open"),g.$broadcast("msNav::expandMatchingToggles"),n.off("mouseenter mouseleave")}v.setFoldable(e,n,a),a?d():u(),e.toggleFold=function(){(a=!a)?d():u()},e.openFolded=c,e.closeFolded=m,e.isNavFoldedOpen=function(){return i},e.$on("$destroy",function(){o.off("mouseenter touchstart"),r.off("mouseenter touchstart"),n.off("mouseenter mouseleave")})}}}function n(t,a,i){return{restrict:"E",scope:{},controller:"MsNavController",compile:function(e){return e.addClass("ms-nav"),function(e){t.$broadcast("msNav::expandMatchingToggles");var n=t.$on("$stateChangeSuccess",function(){t.$broadcast("msNav::expandMatchingToggles"),a.when("navigation").then(function(e){e.close(),i.isNavFoldedOpen()&&i.closeFolded()})});e.$on("$destroy",function(){n()})}}}}function t(m,u,p,g){return{restrict:"A",require:"^msNav",scope:!0,compile:function(e,n){return e.addClass("ms-nav-toggle"),angular.isUndefined(n.collapsed)&&(n.collapsed=!0),e.attr("collapsed",n.collapsed),function(a,i,e,t){var s={expanded:"expanded",expandAnimation:"expand-animation",collapseAnimation:"collapse-animation"},n=i.find("a"),o=[],r=/\(.*\)/g;function l(){return"true"===i.attr("collapsed")}function d(){var e=u.defer();if(!l())return e.reject({error:!0}),e.promise;i.attr("collapsed",!1);var n=angular.element(i.find("ms-nav-toggle-items")[0]);n.css({position:"absolute",visibility:"hidden",display:"block",height:"auto"});var t=n[0].offsetHeight;return n.css({position:"",visibility:"",display:"",height:""}),a.$evalAsync(function(){p.animate(n,{display:"block",height:"0px"},{height:t+"px"},s.expandAnimation).then(function(){n.addClass(s.expanded),n.css({height:""}),e.resolve({success:!0})})}),e.promise}function c(){var e=u.defer();if(l())return e.reject({error:!0}),e.promise;i.attr("collapsed",!0);var n=angular.element(i.find("ms-nav-toggle-items")[0]),t=n[0].offsetHeight;return a.$evalAsync(function(){p.animate(n,{height:t+"px"},{height:"0px"},s.collapseAnimation).then(function(){n.removeClass(s.expanded),n.css({display:"",height:""}),e.resolve({success:!0})})}),e.promise}angular.forEach(n,function(e){var n=angular.element(e).attr("ui-sref");angular.isUndefined(n)||(n=n.replace(r,""),o.push(n))}),t.setToggleItem(i,a),i.children(".ms-nav-button").on("click",function(){if(t.isDisabled())return;t.disable(),l()?(t.clearLockedItems(),a.$emit("msNav::pushToLockedList"),m.$broadcast("msNav::collapse"),d().then(function(){t.enable()})):a.$broadcast("msNav::forceCollapse")}),a.$on("$destroy",function(){i.children(".ms-nav-button").off("click")}),a.$on("msNav::collapse",function(){var e=t.getLockedItems(),n=!1;angular.forEach(e,function(e){angular.equals(e.scope,a)&&(n=!0)}),n||c().then(function(){t.enable()})}),a.$on("msNav::forceCollapse",function(){c().then(function(){t.enable()})}),a.$on("msNav::expandMatchingToggles",function(){var n=g.current.name,t=!1;angular.forEach(o,function(e){n===e&&(t=!0)}),t?d():c()}),a.$on("msNav::pushToLockedList",function(){t.setLockedItem(i,a)})}}}}e.$inject=["$document","$rootScope","msNavFoldService"],n.$inject=["$rootScope","$mdComponentRegistry","msNavFoldService"],t.$inject=["$rootScope","$q","$animate","$state"],angular.module("app.core").factory("msNavFoldService",function(){var t={};return{setFoldable:function(e,n){t={scope:e,element:n}},isNavFoldedOpen:function(){return t.scope.isNavFoldedOpen()},toggleFold:function(){t.scope.toggleFold()},openFolded:function(){t.scope.openFolded()},closeFolded:function(){t.scope.closeFolded()}}}).directive("msNavIsFolded",e).controller("MsNavController",function(){var e=this,n=!1,t=[],a=[];e.isDisabled=function(){return n},e.enable=function(){n=!1},e.disable=function(){n=!0},e.setToggleItem=function(e,n){t.push({element:e,scope:n})},e.getLockedItems=function(){return a},e.setLockedItem=function(e,n){a.push({element:e,scope:n})},e.clearLockedItems=function(){a=[]}}).directive("msNav",n).directive("msNavTitle",function(){return{restrict:"A",compile:function(e){return e.addClass("ms-nav-title"),function(){}}}}).directive("msNavButton",function(){return{restrict:"AE",compile:function(e){return e.addClass("ms-nav-button"),function(){}}}}).directive("msNavToggle",t)}(),function(){"use strict";function e(e,n){e.root?this.navigation=n.getNavigation(e.root):this.navigation=n.getNavigation(),this.toggleHorizontalMobileMenu=function(){angular.element("body").toggleClass("ms-navigation-horizontal-mobile-menu-active")},n.sort()}function n(c,m,u,p){return{restrict:"E",scope:{folded:"=",root:"@"},controller:"MsNavigationController as vm",templateUrl:"app/core/directives/ms-navigation/templates/vertical.html",transclude:!0,compile:function(e){return e.addClass("ms-navigation"),function(e,n){var t=angular.element("body"),a=angular.element('
'),i=angular.element('
'),s=u("navigation");function o(e){if(p.setFolded(e),e)c.$broadcast("msNavigation::collapse"),t.addClass("ms-navigation-folded"),r();else{var n=p.getActiveItem();n&&n.scope.$emit("msNavigation::stateMatched"),t.removeClass("ms-navigation-folded ms-navigation-folded-open"),i.remove()}}function r(){n.parent().append(a),m(function(){a.on("mouseenter touchstart",l)})}function l(e){e&&e.preventDefault(),p.setFoldedOpen(!0);var n=p.getActiveItem();n&&n.scope.$emit("msNavigation::stateMatched"),t.addClass("ms-navigation-folded-open"),a.remove(),t.find("#main").append(i),i.on("mouseenter touchstart",d)}function d(e){e&&e.preventDefault(),p.setFoldedOpen(!1),c.$broadcast("msNavigation::collapse"),t.removeClass("ms-navigation-folded-open"),i.remove(),r()}p.setNavigationScope(e),function(){null===p.getFolded()&&p.setFolded(e.folded);p.getFolded()&&(m(function(){c.$broadcast("msNavigation::collapse")}),t.addClass("ms-navigation-folded"),r())}(),e.$watch(function(){return s.isLockedOpen()},function(e,n){if(!angular.isUndefined(e)&&!angular.equals(e,n)&&p.getFolded())if(e)c.$broadcast("msNavigation::collapse");else{var t=p.getActiveItem();t&&t.scope.$emit("msNavigation::stateMatched")}}),e.$watch("folded",function(e,n){angular.isUndefined(e)||angular.equals(e,n)||o(e)}),e.toggleFolded=function(){o(!p.getFolded())},e.$on("$stateChangeStart",function(){s.close()}),e.$on("$destroy",function(){i.off("mouseenter touchstart"),a.off("mouseenter touchstart")})}}}}function t(t,e,a,i,n,s){var o=this;o.element=e,o.node=t.node,o.hasChildren=void 0,o.collapsed=void 0,o.collapsable=void 0,o.group=void 0,o.animateHeightClass="animate-height",o.toggleCollapsed=function(){o.collapsed?o.expand():o.collapse()},o.collapse=function(){var e=o.element.children("ul"),n=e[0].offsetHeight;t.$evalAsync(function(){o.collapsed=!0,o.element.addClass("collapsing"),i.animate(e,{display:"block",height:n+"px"},{height:"0px"},o.animateHeightClass).then(function(){e.css({display:"",height:""}),o.element.removeClass("collapsing")}),t.$broadcast("msNavigation::collapse")})},o.expand=function(){var e=o.element.children("ul");e.css({position:"absolute",visibility:"hidden",display:"block",height:"auto"});var n=e[0].offsetHeight;e.css({position:"",visibility:"",display:"",height:""}),t.$evalAsync(function(){o.collapsed=!1,o.element.addClass("expanding"),i.animate(e,{display:"block",height:"0px"},{height:n+"px"},o.animateHeightClass).then(function(){e.css({height:""}),o.element.removeClass("expanding")}),a.$broadcast("msNavigation::collapse",o.node._path)})},o.getClass=function(){return o.node.class},o.isHidden=function(){if(angular.isDefined(o.node.hidden)&&angular.isFunction(o.node.hidden))return o.node.hidden();return!1},function(){o.hasChildren=0 target, inbound, fullname",e,n,t),g.calls.unshift({target:e,fullname:t||e,inbound:n,time:moment().format("HH:mm")}),50 session",e),g.conf.microphoneId?g.sessionConf.mediaConstraints.audio={deviceId:g.conf.microphoneId}:g.sessionConf.mediaConstraints.audio=!0,e.answer(g.sessionConf),g.isJabraEnabled&&(jabra.offHook(),g.jabraSession=e)}function A(e){console.debug("terminate -> session",e);var n={};if(e.isEstablished()||(n.status_code=603),e.terminate(n),g.isJabraEnabled)if(0===g.sessions.length)e.localHold&&jabra.resume(),jabra.onHook(),g.jabraSession=null;else{var t=_.last(g.sessions);t.localHold?(jabra.onHook(),jabra.hold(),g.jabraSession=t):jabra.offHook()}}function E(e){console.debug("onAddstream -> data",e),this.remotePlayer.srcObject=e.stream,this.remotePlayer.play()}function y(){g.canGoInConference=!1,g.isInConference=!1,g.currentconferenceSessions=[]}function S(e,n){switch(e){case"ringing":g.soundPlayer.muted=g.conf.ringingMute,g.conf.ringingId&&g.soundPlayer.setSinkId(g.conf.ringingId).then(function(){g.soundPlayer.volume=g.conf.ringingVolume}).then(function(){n&&h()}).catch(function(e){console.info(e.message,g.conf.ringingId)});break;case"speaker":g.remotePlayer.muted=g.conf.speakerMute,g.conf.speakerId&&g.remotePlayer.setSinkId(g.conf.speakerId).then(function(){g.remotePlayer.volume=g.conf.speakerVolume}).then(function(){n&&h()}).catch(function(e){console.info(e.message,g.conf.speakerId)});break;case"microphone":for(var t=0;t session, textContent, position, delay",e,n,t,a),function(){i.show(i.simple().textContent(n).position(t).hideDelay(a)),A(e)}}e(function(){},999),g.direction="right",g.selectedMode="md-scale",g.target="",g.showDialpad=!1,g.soundPlayer=document.createElement("audio"),g.remotePlayer=document.getElementById(g.conf.remotePlayerId),g.soundPlayer.volume=1,g.sessionConf={mediaConstraints:{audio:!0,video:!1}},g.sessions=[],g.calls=[],g.canGoInConference=!1,g.isInConference=!1,g.currentConferenceSessions=[],g.ua=new JsSIP.UA({sockets:[new JsSIP.WebSocketInterface("wss://"+g.conf.host+":8089/ws")],uri:new JsSIP.URI("sip",g.conf.name,g.conf.host,5060,null,null).toString(),authorization_user:g.conf.name,ha1:g.conf.ha1,realm:g.conf.realm,user_agent:g.conf.ua,session_timers_refresh_method:"invite",register_expires:g.conf.phoneBarExpires||60,register:!0}),g.conf=_.merge(o.webrtc,g.conf),g.initDeviceInProgress=!1,g.isJabraEnabled=!1,g.isJabraInitialized=!1,g.jabraSession=null,g.jabraClicked=!1,g.buttonClicked=!1,t.bind("keyup",function(e){switch(e.keyCode){case 27:l(function(){g.showDialpad=!1})}}),g.$onInit=function(){v(!1),navigator.mediaDevices.ondevicechange=function(e){g.initDeviceInProgress||(g.initDeviceInProgress=!0,jabra&&g.isJabraInitialized?jabra.shutdown().then(function(){g.isJabraInitialized=!1,v(!(g.isJabraEnabled=!1))}).catch(function(e){console.error("Unable to shutdown Jabra library",e)}):v(!0))},this.ua.on("registered",function(){this.registered=!0}.bind(this)),this.ua.on("unregistered",function(){this.registered=!1}.bind(this)),this.ua.on("newRTCSession",function(e){console.debug("onNewRTCSession -> data",e);var n=e.session,t=!0,a="",i=0;switch(e.originator){case"local":n.outgoing=!0,n.name=e.request.ruri.user,n.user=e.request.ruri.user,f(n.user,!1),g.isJabraEnabled&&(g.jabraSession&&jabra.resume(),g.jabraSession=n,jabra.offHook());break;case"remote":var s=p.getCurrentUser();if(s.voicePause&&s.phoneBarDnd)t=!1;else if(n.incoming=!0,n.name=e.request.from.display_name,n.user=e.request.from.uri.user,a=e.request.getHeader("X-Answer-Mode")||"",i=e.request.getHeader("X-Answer-After")||0,function(n){console.debug("getNotification -> session",n);var e=n.name?n.name+" <"+n.user+">":n.user;u.create("Incoming call from: ",e,null,function(){b(n)},function(){A(n)}).then(function(e){n.notification=e}).catch(function(e){console.error("Error creating notification for incoming call",e)})}(e.session),f(e.session.user,!0),g.isJabraEnabled&&jabra.ring(),g.conf.autoAnswer&&l(function(){n.isInProgress()&&(n.autoAnswer=!0,b(n))},g.conf.autoAnswerDelay?1e3*g.conf.autoAnswerDelay:0),console.debug("xAnswerMode",a),console.debug("xAnswerAfterSec",i),"auto"==a.toLowerCase()){var o=0==i?500:1e3*i;console.debug("auto answer enabled after:"+o+" ms"),l(function(){n.isInProgress()&&(n.autoAnswer=!0,b(n))},o)}}t?(n.call_id=e.request.call_id,n.connection&&(n.connection.onaddstream=E.bind(this)),n.on("progress",function(e,n){console.debug("onProgress -> session, data",e,n);var t=!1;switch(n.originator){case"local":this.conf.ringingMute||(this.soundPlayer.setAttribute("src","assets/ms-phonebar/sounds/incoming-call.ogg"),t=!0);break;case"remote":this.putOtherCallsOnHold(e),this.soundPlayer.setAttribute("src","assets/ms-phonebar/sounds/outgoing-call.ogg"),t=!0}t&&(this.soundPlayer.loop="loop",this.soundPlayer.play().catch(function(e){console.log(e.message)}))}.bind(this,n)),n.on("confirmed",function(t,e){console.debug("onConfirmed -> session, data",t,e);var n=document.getElementById("div_session_"+t.id.substr(0,32));return n&&$(n).scope().$broadcast("timer-start"),t.confirmed=!0,"remote"===e.originator&&t.connection&&(t.connection.onaddstream=E.bind(this),_.head(t.connection.getRemoteStreams())&&(this.remotePlayer.srcObject=_.head(t.connection.getRemoteStreams()),this.remotePlayer.play())),this.soundPlayer.pause(),this.soundPlayer.loop=null,this.putOtherCallsOnHold(t),t.autoAnswer&&(this.soundPlayer.setAttribute("src","assets/ms-phonebar/sounds/beep.ogg"),this.soundPlayer.play().catch(function(e){console.log("Unable to play autoAnswer notification",e)})),g.canGoInConference=2==g.sessions.length,d.rpc.getVoiceChannels().$promise.then(function(e){var n=_.find(e.rows,function(e){return e.sipcalllinkedid===t.call_id?e:e.sipcalluniqueid===t.call_id?e:null});n&&(t.monitor=n.monitor,t.uniqueid=n.uniqueid,t.monitors=n.monitors)}).catch(function(e){console.error("Unable to retrieve voice channels",e)})}.bind(this,n)),n.on("hold",function(e,n){console.debug("onHold -> session, data",e,n),"local"===n.originator&&(e.localHold=!0)}.bind(this,n)),n.on("unhold",function(e,n){console.debug("onUnhold -> session, data",e,n),"local"===n.originator&&(e.localHold=!1)}.bind(this,n)),n.on("ended",function(e,n){if(console.debug("onEnded -> session, data",e,n),g.isInConference&&_.includes(g.currentConferenceSessions,e.id)&&(y(),g.buttonClicked=!0),_.remove(this.sessions,{id:e.id}),2!==g.sessions.length&&(g.canGoInConference=!1),g.isJabraEnabled)if(0===g.sessions.length)e.localHold&&jabra.resume(),jabra.onHook(),g.jabraSession=null;else{var t=_.last(g.sessions);t.localHold?(jabra.onHook(),jabra.hold(),g.jabraSession=t):jabra.offHook()}}.bind(this,n)),n.on("failed",function(e,n){if(console.debug("onFailed -> session, data",e,n),this.soundPlayer.pause(),this.soundPlayer.loop=null,e.notification&&e.notification.close(),g.isInConference&&_.includes(g.currentConferenceSessions,e.id)&&y(),_.remove(this.sessions,{id:e.id}),2!==g.sessions.length&&(g.canGoInConference=!1),g.isJabraEnabled)if(0===g.sessions.length)e.localHold&&jabra.resume(),jabra.onHook(),g.jabraSession=null;else{var t=_.last(g.sessions);t.localHold?(jabra.onHook(),jabra.hold(),g.jabraSession=t):jabra.offHook()}}.bind(this,n)),g.sessions.push(n),l(function(){r.$apply(),console.debug("onNewRTCSession -> vm_pb.sessions",g.sessions)})):A(n)}.bind(this))}.bind(this),g.type=function(e,n){var t=e;switch(g.target||(g.target=""),n&&(g.target+=e,r.$broadcast("angucomplete-alt:changeInput","ms-target-wrap",g.target)),e){case"*":t="asterisk";break;case"#":t="pound"}g.conf.enableDtmfTone&&(g.soundPlayer.setAttribute("src","assets/ms-phonebar/sounds/dialpad/"+t+".ogg"),g.soundPlayer.play().catch(function(e){console.log(e.message)}));for(var a=0;a session",e),e.hold({useUpdate:!1}),g.isJabraEnabled&&(jabra.hold(),jabra.onHook())},g.refer=function(n){console.debug("refer -> session",n);var e=a.prompt().title("Transfer").textContent("Type the target").placeholder("Target").ariaLabel("Target").ok("Transfer").cancel("Cancel");a.show(e).then(function(e){return I(e)}).then(function(e){n.refer(e,{eventHandlers:{requestSucceeded:O(n,"requestSucceeded","top right",3e3),requestFailed:O(n,"requestFailed","top right",3e3)}})})},g.record=function(e){console.debug("record -> session",e),a.show({controller:"RecordDialogController",controllerAs:"vm",templateUrl:"assets/ms-phonebar/record/dialog.html",parent:angular.element(t.body),clickOutsideToClose:!0,locals:{session:e,sessions:g.sessions}})},g.unhold=function(e){console.debug("unhold -> session",e),e.unhold({useUpdate:!1}),g.putOtherCallsOnHold(e),g.isJabraEnabled&&(jabra.offHook(),jabra.resume())},g.answer=b,g.terminate=A,g.selectSession=function(e){console.debug("selectSession -> session",e),g.unhold(e)},g.typeWrapper=function(e){switch(e.key.toLowerCase()){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"*":case"#":g.type(e.key);break;case"enter":g.call()}},g.toggleDialpad=function(){g.showDialpad=!g.showDialpad},g.referAttended=function(e){console.debug("referAttended -> session",e),a.show({controller:"ReferAttendedDialogController",controllerAs:"vm",templateUrl:"assets/ms-phonebar/referAttended/dialog.html",parent:angular.element(t.body),clickOutsideToClose:!0,locals:{session:e,sessions:_.reject(g.sessions,{id:e.id}),isJabraEnabled:g.isJabraEnabled}})},g.closeDialpad=function(){g.showDialpad=!1},g.initDevice=S,g.putOtherCallsOnHold=function(e){if(console.debug("putOtherCallsOnHold -> session",e),1 evt, data",e,n),n.target&&(g.target=n.target,g.call())}),r.$on("webrtc::transfer",function(e,n){if(console.debug("onRemoteTransfer -> evt, data",e,n),n.target)for(var t=0;t session, textContent, position, delay",e,n,t,a),function(){s.show(s.simple().textContent(n).position(t).hideDelay(a)),e.terminate(),jabra&&i&&jabra.onHook(),l()}}function l(e){n.hide(e)}o.title="Refer Attended",o.sessions=a,o.session=i,o.isJabraEnabled=e,o.sessionTarget=null,a.length&&(o.target=a[0].user),o.closeDialog=l,o.transfer=function(){var e,n,t=_.find(a,function(e){if(e.user===o.target)return e});n=t.outgoing?(e=t,o.session):(e=o.session,t);n.refer(e.user,{replaces:e,eventHandlers:{requestSucceeded:r(i,"requestSucceeded","top right",3e3,o.isJabraEnabled),requestFailed:r(i,"requestFailed","top right",3e3,o.isJabraEnabled)}})}}e.$inject=["$mdDialog","$mdToast","sessions","session","isJabraEnabled"],angular.module("app.core").controller("ReferAttendedDialogController",e)}(),function(){"use strict";function e(e,s,n){var t=this;function a(e,n,t){var a;if(s[t]){if(a=_.find(e,function(e){return e.deviceId===s[t]}))return a.deviceId;var i=_.findIndex(e,function(e){return e.kind===n});if(0<=i)return e[i].deviceId}else(a=_.find(e,function(e){return e.kind===n}))&&(s[t]=a.deviceId);return s[t]||null}_.remove(n,function(e){return"audioinput"===e.kind&&("default"===e.deviceId||"communications"===e.deviceId)||"audiooutput"===e.kind&&("default"===e.deviceId||"communications"===e.deviceId)}),s.ringingId=a(n,"audiooutput","ringingId"),s.speakerId=a(n,"audiooutput","speakerId"),s.microphoneId=a(n,"audioinput","microphoneId"),s.ringingVolume=s.ringingVolume||.5,s.speakerVolume=s.speakerVolume||.5,s.microphoneVolume=s.microphoneVolume||1,s.ringingMute=s.ringingMute||!1,s.speakerMute=s.speakerMute||!1,s.microphoneMute=s.microphoneMute||!1,t.conf=angular.copy(s),t.devices=n,t.saveSettings=function(){e.hide(t.conf)},t.closeDialog=function(){e.hide()},t.isCompatibleBrowser=function(){return"chrome"===t.conf.browserName.toLowerCase()||"opera"===t.conf.browserName.toLowerCase()||"safari"===t.conf.browserName.toLowerCase()}}e.$inject=["$mdDialog","conf","devices"],angular.module("app.toolbar").controller("SettingsController",e)}(),function(){"use strict";function e(t,a){var i=this;function n(e){var n=e.key,t={param:i.query[n],resources:e.options,placeholder:e.placeholder};a.setPlaceholder(t).then(function(e){i.placeholders[n]=e})}i.pickerModels={},i.placeholders={},i.localizationMap=t.localizationMap,i.onMultiselectInit=function(e){n(e)},i.onDateRangeInit=function(e){var n=e.key;i.query[n]?i.pickerModels[n]=t.setSelectedDate(i.query[n]):i.pickerModels[n]={dateStart:null}},i.onMultiselectSelection=function(e){n(e),i.search()},i.onDateRangeSelection=function(e){var n=e.key;i.pickerModels[n].dateStart?i.query[n]={$gte:moment(i.pickerModels[n].dateStart).utcOffset(0,!0).format(),$lte:moment(i.pickerModels[n].dateEnd).utcOffset(0,!0).add(23,"hours").add(59,"minutes").add(59,"seconds").format()}:i.query[n]=void 0;i.search()},i.clearDate=function(e){var n=e.key;i.pickerModels[n]={dateStart:null},delete i.query[n],i.search()},i.clearSelection=function(e){var n=e.key;i.query[n]=!1===e.clearAll?[_.head(e.options).id]:[],i.search()},i.selectAll=function(e){var n=e.key;i.query[n]=_.map(e.options,"id"),i.search()}}function n(p,e){var g={localizationMap:e,setSelectedDate:function(e){var n=new Date(moment.utc(e.$gte).format("YYYY-MM-DD")),t=new Date(moment.utc(e.$lte).format("YYYY-MM-DD")),a={dateStart:new Date(n.getFullYear(),n.getMonth(),n.getDate()),dateEnd:new Date(t.getFullYear(),t.getMonth(),t.getDate())};return a.selectedTemplateName=(i=a,moment(i.dateStart).isSame(i.dateEnd)?(u=i,moment().startOf("day").isSame(u.dateStart)?g.localizationMap.Today:(m=i,moment().subtract(1,"days").startOf("day").isSame(m.dateStart)?g.localizationMap.Yesterday:p("date")(i.dateStart,"dd MMM yyyy"))):(c=i,moment().startOf("isoWeek").isSame(c.dateStart,"day")&&moment().endOf("isoWeek").isSame(c.dateEnd,"day")?g.localizationMap["This Week"]:(d=i,moment().subtract(1,"weeks").startOf("isoWeek").isSame(d.dateStart,"day")&&moment().subtract(1,"weeks").endOf("isoWeek").isSame(d.dateEnd,"day")?g.localizationMap["Last Week"]:(l=i,moment().startOf("month").isSame(l.dateStart,"day")&&moment().endOf("month").isSame(l.dateEnd,"day")?g.localizationMap["This Month"]:(r=i,moment().subtract(1,"months").startOf("month").isSame(r.dateStart,"day")&&moment().subtract(1,"months").endOf("month").isSame(r.dateEnd,"day")?g.localizationMap["Last Month"]:(o=i,moment().startOf("year").isSame(o.dateStart,"day")&&moment().endOf("year").isSame(o.dateEnd,"day")?g.localizationMap["This Year"]:(s=i,moment().subtract(1,"years").startOf("year").isSame(s.dateStart,"day")&&moment().subtract(1,"years").endOf("year").isSame(s.dateEnd,"day")?g.localizationMap["Last Year"]:p("date")(i.dateStart,"dd"+(i.dateStart.getMonth()!==i.dateEnd.getMonth()||i.dateStart.getFullYear()!==i.dateEnd.getFullYear()?" MMM":"")+(i.dateStart.getFullYear()!==i.dateEnd.getFullYear()?" yyyy":""))+" - "+p("date")(i.dateEnd,"dd MMM yyyy")))))))),a;var i,s,o,r,l,d,c,m,u}};return g}n.$inject=["$filter","dateFilterLocalizationFactory"],e.$inject=["dateRangeManager","quickFilterManager"],angular.module("app.core").directive("msQuickFilter",function(){return{restrict:"E",scope:{query:"=",filters:"=",search:"&"},controller:e,controllerAs:"vm",bindToController:!0,templateUrl:"app/core/directives/ms-quick-filter/ms-quick-filter.html"}}).factory("dateRangeManager",n)}(),function(){"use strict";angular.module("app.core").directive("msRandomClass",function(){return{restrict:"A",scope:{msRandomClass:"="},link:function(e,n){var t=e.msRandomClass[Math.floor(Math.random()*e.msRandomClass.length)];n.addClass(t)}}})}(),function(){"use strict";function e(i){return{restrict:"E",scope:{id:"=",model:"=",download:"="},replace:!0,link:function(n,e){var t=!1,a=document.createElement("audio");n.download||a.setAttribute("controlsList","nodownload"),a.setAttribute("preload","none"),a.setAttribute("controls",""),a.setAttribute("style","width: 265px;"),a.setAttribute("src"," "),a.onplay=function(e){t||(t=!0,e.preventDefault(),i[n.model||"voiceRecording"].download({id:n.id}).$promise.then(function(e){var n=[e.buffer],t=new Blob(n,{type:e.type});a.setAttribute("type",e.type),a.setAttribute("src",URL.createObjectURL(t)),a.play()}).catch(function(e){console.error(e)}))},e.append(a)}}}e.$inject=["api"],angular.module("app.core").directive("msRecording",e)}(),function(){"use strict";angular.module("app.core").directive("msResponsiveTable",function(){return{restrict:"A",link:function(e,n){var t=angular.element('
');n.after(t),t.append(n)}}})}(),function(){"use strict";function e(s,o,n,t){return{restrict:"AE",compile:function(e){if(!(t.getConfig("disableCustomScrollbars")||t.getConfig("disableCustomScrollbarsOnMobile")&&n.isMobile()))return e.addClass("ms-scroll"),function(e,n,t){var a={};function i(){PerfectScrollbar.update(n[0])}t.msScroll&&(a=e.$eval(t.msScroll)),a=angular.extend({},o.getConfig(),a),s(function(){PerfectScrollbar.initialize(n[0],a)},0),n.on("mouseenter",i),e.$watch(function(){return n.prop("scrollHeight")},function(e,n){angular.isUndefined(e)||angular.equals(e,n)||i()}),e.$watch(function(){return n.prop("scrollWidth")},function(e,n){angular.isUndefined(e)||angular.equals(e,n)||i()}),e.$on("$destroy",function(){n.off("mouseenter"),PerfectScrollbar.destroy(n[0])})}}}}e.$inject=["$timeout","msScrollConfig","msUtils","motionConfig"],angular.module("app.core").provider("msScrollConfig",function(){var n={wheelSpeed:1,wheelPropagation:!1,swipePropagation:!0,minScrollbarLength:null,maxScrollbarLength:null,useBothWheelAxes:!1,useKeyboard:!0,suppressScrollX:!1,suppressScrollY:!1,scrollXMarginOffset:0,scrollYMarginOffset:0,stopPropagationOnClick:!0};this.config=function(e){n=angular.extend({},n,e)},this.$get=function(){var e={getConfig:function(){return n}};return e}}).directive("msScroll",e)}(),function(){"use strict";function e(s,i,e){var o=this;o.collapsed=!0,o.query=void 0,o.queryOptions={debounce:o.debounce||0};var n=!(!o.collapseOnBlur||"true"!=o.collapseOnBlur);o.resultsLoading=!1,o.results=null,o.selectedResultIndex=0,o.ignoreMouseEvents=!1,o.onInit=function(){s.$watch("MsSearchBar.query",function(e,n){if(!angular.isUndefined(e)&&!angular.equals(e,n)){if(o.collapsed){if(!e)return;s.expand()}var t=s.$parent.$eval(o.onSearch,{query:e}),a=angular.isArray(t),i=t&&!!t.then;a&&o.populateResults(t),i&&(o.resultsLoading=!0,t.then(function(e){o.populateResults(e)},function(){o.populateResults([])}).finally(function(){o.resultsLoading=!1}))}})},o.populateResults=function(e){if(o.collapsed)return;var n=angular.isArray(e),t=null===e;if(!n&&!t)return;o.selectedResultIndex=0,o.results=e},o.expand=function(){o.collapsed=!1,s.expand(),o.onExpand&&angular.isFunction(o.onExpand)&&o.onExpand()},o.collapse=function(){o.query="",o.populateResults(null),o.collapsed=!0,s.collapse(),o.onCollapse&&angular.isFunction(o.onCollapse)&&o.onCollapse()},o.blurCollapse=function(){if(!n)return;o.collapse()},o.absorbEvent=function(e){e.preventDefault()},o.handleKeydown=function(e){var n=e.keyCode;-1<[27,38,40].indexOf(n)&&e.preventDefault();switch(n){case 13:if(!o.results)return;o.handleResultClick(o.results[o.selectedResultIndex]);break;case 27:o.collapse();break;case 38:0<=o.selectedResultIndex-1&&(o.selectedResultIndex--,o.ensureSelectedResultIsVisible());break;case 40:if(!o.results)return;o.selectedResultIndex+1t&&e.scrollTop(t),a>e.height()+e.scrollTop()&&e.scrollTop(a-e.height())}}}function n(i){return{restrict:"E",scope:{},require:"msSearchBar",controller:"MsSearchBarController as vm",bindToController:{query:"=?",debounce:"=?",direction:"@",iconColor:"@",onSearch:"@",onResultClick:"&?",onExpand:"&?",onCollapse:"&?",collapseOnBlur:"@"},templateUrl:"app/core/directives/ms-search-bar/ms-search-bar.html",compile:function(e){return e.addClass("ms-search-bar"),function(n,t){var a=i.find("body");n.collapse=function(){if(t.removeClass("expanded"),"down"===n.vm.direction){t.removeClass("down");var e=t.closest("md-toolbar");e&&e.removeClass("h-128")}a.removeClass("ms-search-bar-expanded")},n.expand=function(){if(t.addClass("expanded"),"down"===n.vm.direction){t.addClass("down");var e=t.closest("md-toolbar");e&&e.addClass("h-128")}a.addClass("ms-search-bar-expanded")}}}}}e.$inject=["$scope","$element","$timeout"],n.$inject=["$document"],angular.module("app.core").controller("MsSearchBarController",e).directive("msSearchBar",n)}(),function(){"use strict";function e(e,t,i,o,r,l){var d=this;d.query="",d.queryOptions={debounce:300},d.resultsLoading=!1,d.selectedResultIndex=0,d.ignoreMouseEvents=!1,d.mobileBarActive=!1,d.results=null,d.shortcuts=[],d.sortableOptions={ghostClass:"ghost",forceFallback:!0,fallbackClass:"dragging",onSort:function(){d.saveShortcuts()}},d.populateResults=function(){for(var e=[],n=l.getFlatNavigation(),t=r.defer(),a=0;a=d.shortcuts.length&&(d.selectedResultIndex=d.shortcuts.length-1)));d.saveShortcuts()},d.handleResultClick=function(e){e.hasShortcut?d.removeShortcut(e):d.addShortcut(e)},d.absorbEvent=function(e){e.preventDefault()},d.handleKeydown=function(e){var n=e.keyCode;-1<[38,40].indexOf(n)&&e.preventDefault();switch(n){case 13:d.handleResultClick(d.results[d.selectedResultIndex]);break;case 38:0<=d.selectedResultIndex-1&&(d.selectedResultIndex--,d.ensureSelectedResultIsVisible());break;case 40:d.selectedResultIndex+1t&&e.scrollTop(t),a>e.height()+e.scrollTop()&&e.scrollTop(a-e.height())}},d.toggleMobileBar=function(){d.mobileBarActive=!d.mobileBarActive},d.loadShortcuts().then(function(e){d.shortcuts=e,0i.steps.length)}i.mainForm=void 0,i.orientation="horizontal",i.steps=[],i.currentStep=void 0,i.currentStepNumber=1,i.setOrientation=function(e){i.orientation=e||"horizontal"},i.registerMainForm=function(e){i.mainForm=e},i.registerStep=function(e,n,t){var a={element:e,scope:n,form:t,stepNumber:n.step||i.steps.length+1,stepTitle:n.stepTitle,stepTitleTranslate:n.stepTitleTranslate};return i.steps.push(a),i.steps.sort(function(e,n){return e.stepNumber-n.stepNumber}),a},i.setupSteps=function(){i.setCurrentStep(i.currentStepNumber)},i.resetForm=function(){e(function(){for(var e=0;ee.scrollWidth&&0==e.scrollLeft&&0==n.scrollLeft?"right":n.scrollWidth>e.scrollWidth&&n.scrollLeft>e.scrollLeft&&e.scrollWidth+n.scrollLeft>=n.scrollWidth?"left":n.scrollWidth>e.scrollWidth&&n.scrollLeft>e.scrollLeft&&e.scrollWidth+n.scrollLeftt.position().top+i&&(m(function(){o=!0}),r.off("scroll",c))}}}}}e.$inject=["$timeout","$q"],angular.module("app.core").controller("MsTimelineController",function(){var n=this;n.scrollEl=void 0,n.setScrollEl=function(e){n.scrollEl=e},n.getScrollEl=function(){return n.scrollEl}}).directive("msTimeline",function(){return{scope:{msTimeline:"=?",loadMore:"&?msTimelineLoadMore"},controller:"MsTimelineController",compile:function(e){return e.addClass("ms-timeline"),function(e,n,t,a){var i=angular.element('
');n.append(i);var s={scrollEl:"#content"};s=angular.extend(s,e.msTimeline,{});var o=angular.element(s.scrollEl);a.setScrollEl(o);var r=144;function l(){o.scrollTop()+o.height()+r>i.position().top&&(i.addClass("show"),c(),e.loadMore().then(function(){i.removeClass("show"),d()},function(){i.remove()}))}function d(){o.on("scroll",l)}function c(){o.off("scroll",l)}d(),e.$on("$destroy",function(){c()})}}}}).directive("msTimelineItem",e)}(),function(){"use strict";function e(a,e,n,t,i,s,o,r,l){function d(){a.timeoutId&&clearTimeout(a.timeoutId)}function c(){void 0!==o.startTime&&(a.millis=moment().diff(moment(a.startTime))),a.maxTimeUnit&&"day"!==a.maxTimeUnit?"second"===a.maxTimeUnit?(a.seconds=Math.floor(a.millis/1e3),a.minutes=0,a.hours=0,a.days=0,a.months=0,a.years=0):"minute"===a.maxTimeUnit?(a.seconds=Math.floor(a.millis/1e3%60),a.minutes=Math.floor(a.millis/6e4),a.hours=0,a.days=0,a.months=0,a.years=0):"hour"===a.maxTimeUnit?(a.seconds=Math.floor(a.millis/1e3%60),a.minutes=Math.floor(a.millis/6e4%60),a.hours=Math.floor(a.millis/36e5),a.days=0,a.months=0,a.years=0):"month"===a.maxTimeUnit?(a.seconds=Math.floor(a.millis/1e3%60),a.minutes=Math.floor(a.millis/6e4%60),a.hours=Math.floor(a.millis/36e5%24),a.days=Math.floor(a.millis/36e5/24%30),a.months=Math.floor(a.millis/36e5/24/30),a.years=0):"year"===a.maxTimeUnit&&(a.seconds=Math.floor(a.millis/1e3%60),a.minutes=Math.floor(a.millis/6e4%60),a.hours=Math.floor(a.millis/36e5%24),a.days=Math.floor(a.millis/36e5/24%30),a.months=Math.floor(a.millis/36e5/24/30%12),a.years=Math.floor(a.millis/36e5/24/365)):(a.seconds=Math.floor(a.millis/1e3%60),a.minutes=Math.floor(a.millis/6e4%60),a.hours=Math.floor(a.millis/36e5%24),a.days=Math.floor(a.millis/36e5/24),a.months=0,a.years=0),a.secondsS=1===a.seconds||0===a.seconds?"":"s",a.minutesS=1===a.minutes||0===a.minutes?"":"s",a.hoursS=1===a.hours||0===a.hours?"":"s",a.daysS=1===a.days||0===a.days?"":"s",a.monthsS=1===a.months||0===a.months?"":"s",a.yearsS=1===a.years||0===a.years?"":"s",a.sseconds=a.seconds<10?"0"+a.seconds:a.seconds,a.mminutes=a.minutes<10?"0"+a.minutes:a.minutes,a.hhours=a.hours<10?"0"+a.hours:a.hours,a.ddays=a.days<10?"0"+a.days:a.days,a.mmonths=a.months<10?"0"+a.months:a.months,a.yyears=a.years<10?"0"+a.years:a.years}"function"!=typeof String.prototype.trim&&(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")}),a.autoStart=o.autoStart||o.autostart,0===r.html().trim().length?r.append(l("{{millis}}")(a)):r.append(l(r.contents())(a)),a.interval=a.intervalAttr||1e3,a.startTime=null,a.endTime=null,a.timeoutId=null,a.countdown=a.countdownAttr&&0<=parseInt(a.countdownAttr,10)?parseInt(a.countdownAttr,10):void 0,a.isRunning=!1,a.$watch("startTimeAttr",function(e,n){e!==n&&a.isRunning&&a.start()}),a.$on("timer-start",function(){a.start()}),a.$on("timer-resume",function(){a.resume()}),a.$on("timer-stop",function(){a.stop()}),a.$on("timer-clear",function(){a.clear()}),a.$on("timer-set-countdown",function(e,n){a.countdown=n}),a.start=r[0].start=function(){var e=moment(),n=a.startTimeAttr?moment(a.startTimeAttr):null;a.startTime=!n||er.properties.length){var n=r.multiBarChart.series.length-r.properties.length;r.multiBarChart.series.splice(0,n),r.multiBarChart.data.splice(0,n)}for(var t=0;tr.filter.length){var a=r.multiBarChart.labels.length-r.filter.length;r.multiBarChart.labels.splice(0,a),r.multiBarChart.data[t].splice(0,a)}for(var i=0,s=0;io.properties.length){var n=o.pieChart.labels.length-o.properties.length;o.pieChart.labels.splice(0,n),o.pieChart.data.splice(0,n)}for(var t=0,a=0;t]+>/gm,"")}}).filter("nospace",function(){return function(e){return e?e.replace(/ /g,""):""}}).filter("humanizeDoc",function(){return function(e){if(e)return"directive"===e.type?e.name.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()}):e.label||e.name}})}(),function(){"use strict";angular.module("app.core").filter("filterByIds",function(){return function(e,n){if(0===e.length||!n)return e;if(0===n.length)return[];for(var t=[],a=0;a')).html(i),s.append(o)})},rgba:l};function l(e,n){var t=n||!1;return 4===e.length&&255===e[0]&&255===e[1]&&255===e[2]&&e.splice(3,4),t&&(e=function(e,n){var t={white:{1:"1",2:"0.7",3:"0.3",4:"0.12"},black:{1:"0.87",2:"0.54",3:"0.26",4:"0.12"}};255===e[0]&&255===e[1]&&255===e[2]?e[3]=t.white[n]:0===e[0]&&0===e[1]&&0===e[2]&&(e[3]=t.black[n]);return e}(e,t)),3===e.length?"rgb("+e.join(",")+")":4===e.length?"rgba("+e.join(",")+")":void a.error("Invalid number of arguments supplied in the color array: "+e.length+"\nThe array must have 3 or 4 colors.")}function d(e){return e.charAt(0).toUpperCase()+e.slice(1)}}e.$inject=["$cookies","$log","motionTheming"],angular.module("app.core").factory("motionGenerator",e)}(),function(){"use strict";angular.module("app.core").constant("motionPalettes",[{name:"motion-blue",options:{50:"#ebf1fa",100:"#c2d4ef",200:"#9ab8e5",300:"#78a0dc",400:"#5688d3",500:"#3470ca",600:"#2e62b1",700:"#275498",800:"#21467e",900:"#1a3865",A100:"#c2d4ef",A200:"#9ab8e5",A400:"#5688d3",A700:"#275498",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 A100",contrastStrongLightColors:"300 400"}},{name:"motion-paleblue",options:{50:"#ececee",100:"#c5c6cb",200:"#9ea1a9",300:"#7d818c",400:"#5c616f",500:"#3c4252",600:"#353a48",700:"#2d323e",800:"#262933",900:"#1e2129",A100:"#c5c6cb",A200:"#9ea1a9",A400:"#5c616f",A700:"#2d323e",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 A100",contrastStrongLightColors:"300 400"}}])}(),function(){"use strict";angular.module("app.core").constant("motionThemes",{default:{primary:{name:"motion-paleblue",hues:{default:"700","hue-1":"500","hue-2":"600","hue-3":"400"}},accent:{name:"light-blue",hues:{default:"600","hue-1":"400","hue-2":"700","hue-3":"A100"}},warn:{name:"red"},background:{name:"grey",hues:{default:"A100","hue-1":"A100","hue-2":"100","hue-3":"300"}}},pinkTheme:{primary:{name:"blue-grey",hues:{default:"800","hue-1":"600","hue-2":"400","hue-3":"A100"}},accent:{name:"pink",hues:{default:"400","hue-1":"300","hue-2":"600","hue-3":"A100"}},warn:{name:"blue"},background:{name:"grey",hues:{default:"A100","hue-1":"A100","hue-2":"100","hue-3":"300"}}},tealTheme:{primary:{name:"motion-blue",hues:{default:"900","hue-1":"600","hue-2":"500","hue-3":"A100"}},accent:{name:"teal",hues:{default:"500","hue-1":"400","hue-2":"600","hue-3":"A100"}},warn:{name:"deep-orange"},background:{name:"grey",hues:{default:"A100","hue-1":"A100","hue-2":"100","hue-3":"300"}}}})}(),function(){"use strict";function e(t,e,n){var a;angular.injector(["ngCookies"]).invoke(["$cookies",function(e){a=e}]);var i=a.getObject("motion.customTheme");i&&(n.custom=i),t.alwaysWatchTheme(!0),angular.forEach(e,function(e){t.definePalette(e.name,e.options)}),angular.forEach(n,function(e,n){t.theme(n).primaryPalette(e.primary.name,e.primary.hues).accentPalette(e.accent.name,e.accent.hues).warnPalette(e.warn.name,e.warn.hues).backgroundPalette(e.background.name,e.background.hues)})}e.$inject=["$mdThemingProvider","motionPalettes","motionThemes"],angular.module("app.core").config(e)}(),function(){"use strict";function e(n,t,e){var a={getRegisteredPalettes:function(){return e.PALETTES},getRegisteredThemes:function(){return e.THEMES},setActiveTheme:function(e){if(angular.isUndefined(a.themes.list[e]))return angular.isUndefined(a.themes.list.default)?void t.error('You must have at least one theme named "default"'):(t.warn('The theme "'+e+'" does not exist! Falling back to the "default" theme.'),a.themes.active.name="default",a.themes.active.theme=a.themes.list.default,void n.put("motion.selectedTheme",a.themes.active.name));a.themes.active.name=e,a.themes.active.theme=a.themes.list[e],n.put("motion.selectedTheme",e)},setThemesList:function(e){a.themes.list=e},themes:{list:{},active:{name:"",theme:{}}}};return a}e.$inject=["$cookies","$log","$mdTheming"],angular.module("app.core").service("motionTheming",e)}(),function(){"use strict";function e(n,s,o,r){this.search=function(n){for(var e=[],t=r.getFlatNavigation(),a=o.defer(),i=0;i"+(e.name||"extractedReport")+" will be deleted.").ariaLabel("delete extractedReport").targetEvent(n).ok("OK").cancel("CANCEL");i.show(t).then(function(){S(e)},function(){console.log("CANCEL")})},b.success=y,b.getExtractedReports=function(){b.query.offset=(b.query.page-1)*b.query.limit,g.hasRole("admin")?b.promise=m.analyticExtractedReport.get(b.query,y).$promise:(b.query.id=b.userProfile.id,b.query.section="ExtractedReports",b.promise=m.userProfile.getResources(b.query,y).$promise)},b.createOrEditExtractedReport=function(e,n){i.show({controller:"CreateOrEditExtractedReportDialogController",controllerAs:"vm",templateUrl:"app/main/apps/analytics/views/extractedReports/create/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{extractedReport:n,extractedReports:b.extractedReports.rows,license:b.license,setting:b.setting,crudPermissions:b.crudPermissions}})},b.deleteExtractedReport=S,b.exportSelectedExtractedReports=function(){var e=angular.copy(b.selectedExtractedReports);return b.selectedExtractedReports=[],e},b.deleteSelectedExtractedReports=function(e){var n=i.confirm().title("Are you sure want to delete the selected extractedReports?").htmlContent(""+b.selectedExtractedReports.length+" selected will be deleted.").ariaLabel("delete ExtractedReports").targetEvent(e).ok("OK").cancel("CANCEL");i.show(n).then(function(){b.selectedExtractedReports.forEach(function(e){S(e)}),b.selectedExtractedReports=[]})},b.deselectExtractedReports=function(){b.selectedExtractedReports=[]},b.selectAllExtractedReports=function(){b.selectedExtractedReports=b.extractedReports.rows};var A=!0,E=1;function y(e){b.extractedReports=e||{count:0,rows:[]}}function S(e){m.analyticExtractedReport.delete({id:e.id}).$promise.then(function(){_.remove(b.extractedReports.rows,{id:e.id}),b.extractedReports.count-=1,b.extractedReports.rows.length||b.getExtractedReports(),p.success({title:_.startCase("ExtractedReport")+" deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){b.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEanalyticExtractedReport"}];for(var n=0;n"+(e.name||"metric")+" will be deleted.").ariaLabel("delete metric").targetEvent(n).ok("OK").cancel("CANCEL");i.show(t).then(function(){S(e)},function(){console.log("CANCEL")})},b.success=y,b.getMetrics=function(){b.query.offset=(b.query.page-1)*b.query.limit,g.hasRole("admin")?b.promise=m.analyticMetric.get(b.query,y).$promise:(b.query.id=b.userProfile.id,b.query.section="Metrics",b.promise=m.userProfile.getResources(b.query,y).$promise)},b.createOrEditMetric=function(e,n){i.show({controller:"CreateOrEditMetricDialogController",controllerAs:"vm",templateUrl:"app/main/apps/analytics/views/metrics/create/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{metric:n,metrics:b.metrics.rows,license:b.license,setting:b.setting,crudPermissions:b.crudPermissions}})},b.deleteMetric=S,b.exportSelectedMetrics=function(){var e=angular.copy(b.selectedMetrics);return b.selectedMetrics=[],e},b.deleteSelectedMetrics=function(e){var n=i.confirm().title("Are you sure want to delete the selected metrics?").htmlContent(""+b.selectedMetrics.length+" selected will be deleted.").ariaLabel("delete Metrics").targetEvent(e).ok("OK").cancel("CANCEL");i.show(n).then(function(){b.selectedMetrics.forEach(function(e){S(e)}),b.selectedMetrics=[]})},b.deselectMetrics=function(){b.selectedMetrics=[]},b.selectAllMetrics=function(){b.selectedMetrics=b.metrics.rows};var A=!0,E=1;function y(e){b.metrics=e||{count:0,rows:[]}}function S(e){m.analyticMetric.delete({id:e.id}).$promise.then(function(){_.remove(b.metrics.rows,{id:e.id}),b.metrics.count-=1,b.metrics.rows.length||b.getMetrics(),p.success({title:_.startCase("Metric")+" deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){b.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEanalyticMetric"}];for(var n=0;n"+e.field+" will be deleted.").ariaLabel("delete field").targetEvent(n).ok("OK").cancel("CANCEL");a.show(t).then(function(){p(e)},function(){console.log("CANCEL")})},c.success=u,c.getReportFields=function(){c.promise=o.analyticFieldReport.get(c.query,u).$promise},c.createOrEditReportField=function(e,n){a.show({controller:"CreateOrEditReportFieldDialogController",controllerAs:"vm",templateUrl:"app/main/apps/analytics/views/reports/edit/field/dialog.html",parent:angular.element(i.body),targetEvent:e,clickOutsideToClose:!0,locals:{report:c.report,reportField:n,reportFields:c.reportFields.rows,metrics:c.metrics,columns:c.columns,setting:null,crudPermissions:c.crudPermissions}})},c.deleteReportField=p,c.deleteSelectedReportFields=function(e){var n=a.confirm().title("Are you sure want to delete the selected fields?").htmlContent(""+c.selectedReportFields.length+" selected will be deleted.").ariaLabel("delete fields").targetEvent(e).ok("OK").cancel("CANCEL");a.show(n).then(function(){c.selectedReportFields.forEach(function(e){p(e)}),c.selectedReportFields=[]})},c.getMetricName=function(e){var n=_.find(c.metrics,{id:e});return n?n.name:d.instant("ANALYTICS.NO_METRIC_FOUND")},c.getMetricValue=function(e){var n=_.find(c.metrics,{id:e});return n?n.metric:d.instant("ANALYTICS.NO_METRIC_FOUND")};var m=!0;function u(e){c.reportFields=e||{count:0,rows:[]}}function p(e){o.analyticFieldReport.delete({id:e.id}).$promise.then(function(){c.selectedReportFields=[],_.remove(c.reportFields.rows,{id:e.id}),c.reportFields.count-=1,c.reportFields.rows.length||c.getReportFields(),s.success({title:"Field deleted!",msg:e.field?e.field+" has been deleted!":""})}).catch(function(e){s.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEFIELD",msg:e.data?JSON.stringify(e.data):e.toString()})})}n.$watch("vm_rf.query.filter",function(e,n){m?t(function(){m=!1}):c.getReportFields()})}e.$inject=["$cookies","$scope","$timeout","$mdDialog","$document","toasty","api","describeTable","sqlUtil","$translate"],angular.module("app.analytics").controller("ReportFieldsController",e)}(),function(){"use strict";angular.module("app.analytics").factory("sqlUtil",function(){return{getFunctions:[{value:"SUM",option:function(e){return"SUM ("+e+")"}},{value:"COUNT",option:function(e){return"COUNT ("+e+")"}},{value:"COUNT DISTINCT",option:function(e){return"COUNT (DISTINCT "+e+")"}},{value:"MAX",option:function(e){return"MAX ("+e+")"}},{value:"MIN",option:function(e){return"MIN ("+e+")"}},{value:"AVG",option:function(e){return"AVG ("+e+")"}},{value:"GROUP_CONCAT",option:function(e){return"GROUP_CONCAT ("+e+")"}},{value:"GROUP_CONCAT ASC",option:function(e){return"GROUP_CONCAT ("+e+" ORDER BY "+e+" ASC)"}},{value:"GROUP_CONCAT DESC",option:function(e){return"GROUP_CONCAT ("+e+" ORDER BY "+e+" DESC)"}}],getFormats:[{value:"SEC_TO_TIME",option:function(e){return"SEC_TO_TIME ("+e+")"}},{value:"DATE",option:function(e){return"DATE ("+e+")"}},{value:"HOUR",option:function(e){return"HOUR ("+e+")"}},{value:"ROUND",option:function(e){return"ROUND ("+e+")"}},{value:"UNIX_TIMESTAMP",option:function(e){return"UNIX_TIMESTAMP ("+e+")"}}],getGroupBy:[{value:!1,option:function(){return"No"}},{value:!0,option:function(e){return"GROUP BY "+e}}],getOrderBy:[{value:"ASC",option:function(e){return"ORDER BY "+e+" ASC"}},{value:"DESC",option:function(e){return"ORDER BY "+e+" DESC"}}],getConditions:["=","!=","<","<=",">",">=","LIKE","NOT LIKE","IS NULL","IS NOT NULL","IS EMPTY","IS NOT EMPTY"]}})}(),function(){"use strict";function e(e,n,t,a,i,s){var o=this;function r(e){return _.isArray(e)}o.report=a||{},o.userProfileSection=s&&1==s.count?s.rows[0]:null,o.crudPermissions=i.parseCrudPermissions(o.userProfileSection?o.userProfileSection.crudPermissions:null),o.selectedTab=e.params.tab||0,o.gotoReports=function(){e.go("app.analytics.reports")},o.saveReport=function(){o.report.conditions=angular.toJson(o.report.condition),t.analyticCustomReport.update({id:o.report.id},_.omit(o.report,"joins")).$promise.then(function(){n.success({title:"Report updated!",msg:o.report.name?o.report.name+" has been updated!":""})}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETreport",msg:e.data?JSON.stringify(e.data):e.toString()})})},o.previewReport=function(){o.columns=[],o.rows=[],o.error=!1,t.analyticFieldReport.get({fields:"field,alias",nolimit:!0,CustomReportId:o.report.id}).$promise.then(function(e){return o.columns=e?e.rows:[],t.analyticCustomReport.preview({id:o.report.id}).$promise}).then(function(e){o.rows=e}).catch(function(e){console.log(e),o.error={title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:analyticFieldReport",msg:e.data?e.data.message:e.toString(),sql:e.data&&e.data.parent?e.data.parent.sql:"NO QUERY"},n.error(o.error)})},o.queryReport=function(){return o.queryResult="Loading...",t.analyticCustomReport.query({id:o.report.id}).$promise.then(function(e){o.queryResult=e.sql}).catch(function(e){o.queryResult="",console.log(e),o.error={title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:analyticFieldReport",msg:e.data?e.data.message:e.toString(),sql:e.data&&e.data.parent?e.data.parent.sql:"NO QUERY"},n.error(o.error)})},o.mapArray=function(e,n){if(r(e))return _.map(e,n).join(",");return""},o.isArray=r,o.valueReplacer=function(e,n){moment(n,"YYYY-MM-DDTHH:mm:ssZ",!0).isValid()&&(n=moment(n,"").format("YYYY-MM-DD HH:mm:ss"));return n}}e.$inject=["$state","toasty","api","report","Auth","userProfileSection"],angular.module("app.analytics").controller("ReportController",e)}(),function(){"use strict";function e(e,n,t,a,i,s){var o=this;o.errors=[],o.report=angular.copy(a),o.valueReplacer=function(e,n){moment(n,"YYYY-MM-DDTHH:mm:ssZ",!0).isValid()&&(n=moment(n,"").format("YYYY-MM-DD HH:mm:ss"));return n},o.closeDialog=function(){n.hide()},function(){o.columns=[],o.rows=[],o.error=!1;var e={fields:"field,alias",nolimit:!0};e["analyticCustomReport"===s?"CustomReportId":"DefaultReportId"]=o.report.id,o.promise=i.analyticFieldReport.get(e).$promise.then(function(e){return o.columns=e?e.rows:[],i[s].preview({id:o.report.id}).$promise}).then(function(e){o.rows=e}).catch(function(e){console.log(e),o.error={title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:analyticFieldReport",msg:e.data?e.data.message:e.toString(),sql:e.data&&e.data.parent?e.data.parent.sql:"NO QUERY"},t.error(o.error)})}()}e.$inject=["$location","$mdDialog","toasty","report","api","apiName"],angular.module("app.analytics").controller("PreviewReportDialogController",e)}(),function(){"use strict";function e(e,t,a,i,s,o,n,r,l,d,c,m,u){var p=this;p.currentUser=u.getCurrentUser(),p.reports={count:0,rows:[]},p.userProfile=r,p.userProfileSection=l&&1==l.count?l.rows[0]:null,p.crudPermissions=u.parseCrudPermissions(p.userProfileSection?p.userProfileSection.crudPermissions:null),p.selectedReports=[],p.query={fields:"createdAt,updatedAt,id,name,description,table,parent,conditions,joins",limit:10,page:1,sort:"-updatedAt"},p.apiName=null,p.currentPath="",p.customTree=!0,p.editstate=function(e,n){s.go("app.analytics.reports.edit",{id:e.id,crudPermissions:p.crudPermissions})},p.copydialog=function(e,n){i.show({controller:"CopyReportDialogController",controllerAs:"vm",templateUrl:"app/main/apps/analytics/views/reports/copy/dialog.html",parent:angular.element(a.body),targetEvent:n,clickOutsideToClose:!0,locals:{report:e,apiName:p.apiName,treeCustomData:p.treeCustomInstance.jstree(!0).get_json("#")}}).finally(function(){})},p.previewdialog=function(e,n){i.show({controller:"PreviewReportDialogController",controllerAs:"vm",templateUrl:"app/main/apps/analytics/views/reports/preview/dialog.html",parent:angular.element(a.body),targetEvent:n,clickOutsideToClose:!0,locals:{report:e,apiName:p.apiName}})},p.rundialog=function(e,n){i.show({controller:"RunReportDialogController",controllerAs:"vm",templateUrl:"app/main/apps/analytics/views/reports/run/dialog.html",parent:angular.element(a.body),targetEvent:n,clickOutsideToClose:!0,locals:{report:e,apiName:p.apiName,currentPath:p.currentPath}})},p.downloadfile=function(a,e){var i;d.analyticMetric.get({fields:"id,name,metric,table",nolimit:!0}).$promise.then(function(e){i=_.keyBy(e.rows,"id");var n={fields:"field,alias,function,format,groupBy,orderBy,custom,MetricId",nolimit:!0};return n["analyticCustomReport"===p.apiName?"CustomReportId":"DefaultReportId"]=a.id,d.analyticFieldReport.get(n).$promise}).then(function(e){for(var n=0;n"+e.name+" will be deleted.").ariaLabel("delete report").targetEvent(n).ok("OK").cancel("CANCEL");i.show(t).then(function(){b(e)},function(){console.log("CANCEL")})},p.success=h,p.getReports=f,p.createOrEditReport=function(e,n){i.show({controller:"CreateOrEditReportDialogController",controllerAs:"vm",templateUrl:"app/main/apps/analytics/views/reports/create/dialog.html",parent:angular.element(a.body),targetEvent:e,clickOutsideToClose:!0,locals:{report:n,reports:p.reports.rows,apiName:p.apiName,currentNode:p.currentNode,setting:null,crudPermissions:p.crudPermissions}})},p.importReport=function(e,n,t){if("application/json"===e.file.type){var a=new FileReader;a.onload=function(e){console.log(e.target.result);try{var t=atob(e.target.result.split(",")[1]);t=angular.fromJson(t),d.analyticCustomReport.save({name:t.name,description:t.description,table:t.table,conditions:t.conditions,joins:t.joins,parent:p.currentNode.id}).$promise.then(function(n){p.reports.rows.unshift(n),m.success({title:"Report saved!",msg:n.name?n.name+" has been saved!":""});var e=_.map(t.fields,function(e){return _.extend({},e,{CustomReportId:n.id})});return d.analyticFieldReport.bulkCreate(e).$promise}).then(function(e){m.success({title:"Fields saved!",msg:"Fields has been saved!"})}).catch(function(e){m.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETanalyticReport",msg:e.data?JSON.stringify(e.data):e.toString()})})}catch(e){console.error(e),m.error({title:"Decode File Error",msg:e.toString()})}},a.readAsDataURL(e.file)}else m.error({title:"Format Error",msg:"Please use only json files"})},p.deleteReport=b,p.exportSelectedReports=function(){var e=angular.copy(p.selectedReports);return p.selectedReports=[],e},p.deleteSelectedReports=function(e){var n=i.confirm().title("Are you sure want to delete the selected reports?").htmlContent(""+p.selectedReports.length+" selected will be deleted.").ariaLabel("delete Reports").targetEvent(e).ok("OK").cancel("CANCEL");i.show(n).then(function(){p.selectedReports.forEach(function(e){b(e)}),p.selectedReports=[]})},p.deselectReports=function(){p.selectedReports=[]},p.selectAllReports=function(){p.selectedReports=p.reports.rows},p.treeDefaultData=c.rows[0]?angular.fromJson(c.rows[0].tree):[],p.treeCustomData=c.rows[1]?angular.fromJson(c.rows[1].tree):[],p.treeDefaultConfig=S(!1),p.treeCustomConfig=S(!0),p.treeDefaultEvents=T(!1),p.treeCustomEvents=T(!0);var g=!0,v=1;function h(e){p.reports=e||{count:0,rows:[]}}function f(){if(p.query.offset=(p.query.page-1)*p.query.limit,p.apiName)if("admin"===p.currentUser.role||p.userProfileSection.autoAssociation)p.promise=d[p.apiName].get(p.query,h).$promise;else{var a=[];p.promise=d[p.apiName].get(p.query).$promise.then(function(e){return 0<(a=e&&e.rows?e.rows:[]).length?d.userProfileResource.get({sectionId:p.userProfileSection.id,type:"analyticDefaultReport"===p.apiName?"DefaultReports":"CustomReports"}).$promise.then(function(e){var n=e&&e.rows?e.rows:[];if(0"+(t.text?t.text:"Node")+" and its subnode will be deleted.").ariaLabel("delete node").ok("OK").cancel("CANCEL");i.show(e).then(function(){var e,n=p.treeCustomInstance.jstree(!0).get_parent(t);n=p.treeCustomInstance.jstree(!0).get_node(n),p.treeCustomInstance.jstree(!0).delete_node(t),e=[t.id].concat(t.children_d||[]),d.analyticCustomReport.get({parent:e.join(","),fields:"id,name"}).$promise.then(function(e){e&&e.rows&&e.rows.forEach(function(e){b(e)})}).catch(function(e){m.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEreportsByParents",msg:e.data?JSON.stringify(e.data):e.toString()})}),p.treeCustomInstance.jstree(!0).select_node(n)})}}}),e}}}}function T(e){return e?{create_node:y,rename_node:y,move_node:y,delete_node:y,select_node:A}:{select_node:E}}e.$watch("vm.query.filter",function(e,n){g?t(function(){g=!1}):(n||(v=p.query.page),e!==n&&(p.query.page=1),e||(p.query.page=v),p.getReports())}),e.$watch("vm.search",function(e,n){p.treeDefaultInstance&&p.treeDefaultInstance.jstree(!0).search(e),p.treeCustomInstance&&p.treeCustomInstance.jstree(!0).search(e)})}e.$inject=["$scope","$timeout","$document","$mdDialog","$state","$window","$translate","userProfile","userProfileSection","api","treeReports","toasty","Auth"],angular.module("app.analytics").controller("ReportsController",e)}(),function(){"use strict";function e(e,t,a,n,i,s,o,r){var l=this;function d(){l.export={id:l.report.id,name:l.report.name,startDate:new Date(moment().startOf("day")),endDate:new Date(moment().endOf("day")),output:"xlsx",fullPath:r?r+"/"+l.report.name:l.report.name}}function c(){t.hide()}l.errors=[],l.report=angular.copy(n),l.export={},l.runReport=function(n){l.errors=[],l.exportDate=_.assign({},l.export,{startDate:moment(l.export.startDate).format("YYYY-MM-DD HH:mm:ss"),endDate:moment(l.export.endDate).format("YYYY-MM-DD HH:mm:ss")}),i[s].run(l.exportDate).$promise.then(function(e){"web"===l.export.output?t.show({controller:"WebReportDialogController",controllerAs:"vm",templateUrl:"app/main/apps/analytics/views/reports/run/web/dialog.html",parent:angular.element(o.body),targetEvent:n,skipHide:!0,locals:{apiName:s,exportDate:l.exportDate,results:e},resolve:{columns:["apiResolver",function(e){var n={fields:"field,alias",nolimit:!0};return n["analyticCustomReport"===s?"CustomReportId":"DefaultReportId"]=l.report.id,e.resolve("analyticFieldReport@get",n)}]}}):(a.success({title:"Report properly run!",msg:l.report.name?l.report.name+" has been run!":""}),c())}).catch(function(e){a.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DESCRIBE",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},l.closeDialog=c,(l.refreshDate=d)()}e.$inject=["$location","$mdDialog","toasty","report","api","apiName","$document","currentPath"],angular.module("app.analytics").controller("RunReportDialogController",e)}(),function(){"use strict";function e(e,n,t,a,i,s,o){var r=this;function l(e){r.results=e||{count:0,rows:[]}}r.errors=[],r.columns=a?a.rows:[],r.results=i||{rows:[],count:0},r.query={limit:10,page:1},r.closeDialog=function(){e.hide()},r.getResults=function(){o.offset=(r.query.page-1)*r.query.limit,o.limit=r.query.limit,r.promise=t[s].run(o,l).$promise},r.valueReplacer=function(e,n){moment(n,"YYYY-MM-DDTHH:mm:ssZ",!0).isValid()&&(n=moment(n,"").format("YYYY-MM-DD HH:mm:ss"));return n}}e.$inject=["$mdDialog","toasty","api","columns","results","apiName","exportDate"],angular.module("app.analytics").controller("WebReportDialogController",e)}(),function(){"use strict";function e(e,n,t,a,i,s,o,r,l,d,c,m,u,p){var g=this;function v(e){a.hide(e)}g.currentUser=c.getCurrentUser(),g.errors=[],g.setting=u,g.license=m,g.crudPermissions=p,g.hasModulePermissions={},g.passwordPattern=g.setting&&g.setting.securePassword?/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/:"",g.title="CALLYSQUARE.EDIT_ODBC",g.odbc=angular.copy(l),g.odbcs=r,g.newOdbc=!1,g.odbc||(g.odbc={},g.title="CALLYSQUARE.NEW_ODBC",g.newOdbc=!0),g.addNewOdbc=function(){g.errors=[],d.squareOdbc.save(g.odbc).$promise.then(function(e){g.odbcs.unshift(e.toJSON()),o.success({title:"Odbc properly created",msg:g.odbc.name?g.odbc.name+" has been created!":""}),v(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){g.errors=e.data.errors||[{message:e.toString(),type:"api.squareOdbc.save"}];for(var n=0;n"+(e.name||"odbc")+" will be deleted.").ariaLabel("delete odbc").targetEvent(n).ok("OK").cancel("CANCEL");i.show(t).then(function(){S(e)},function(){console.log("CANCEL")})},b.success=y,b.getODBC=function(){b.query.offset=(b.query.page-1)*b.query.limit,g.hasRole("admin")?b.promise=m.squareOdbc.get(b.query,y).$promise:(b.query.id=b.userProfile.id,b.query.section="ODBC",b.promise=m.userProfile.getResources(b.query,y).$promise)},b.createOrEditOdbc=function(e,n){i.show({controller:"CreateOrEditOdbcDialogController",controllerAs:"vm",templateUrl:"app/main/apps/callysquare/views/odbcs/create/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{odbc:n,odbcs:b.odbcs.rows,license:b.license,setting:b.setting,crudPermissions:b.crudPermissions}})},b.deleteOdbc=S,b.exportSelectedODBC=function(){var e=angular.copy(b.selectedODBC);return b.selectedODBC=[],e},b.deleteSelectedODBC=function(e){var n=i.confirm().title("Are you sure want to delete the selected odbcs?").htmlContent(""+b.selectedODBC.length+" selected will be deleted.").ariaLabel("delete Odbcs").targetEvent(e).ok("OK").cancel("CANCEL");i.show(n).then(function(){b.selectedODBC.forEach(function(e){S(e)}),b.selectedODBC=[]})},b.deselectODBC=function(){b.selectedODBC=[]},b.selectAllODBC=function(){b.selectedODBC=b.odbcs.rows};var A=!0,E=1;function y(e){b.odbcs=e||{count:0,rows:[]}}function S(e){m.squareOdbc.delete({id:e.id}).$promise.then(function(){_.remove(b.odbcs.rows,{id:e.id}),b.odbcs.count-=1,b.odbcs.rows.length||b.getODBC(),p.success({title:_.startCase("Odbc")+" deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){b.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEsquareOdbc"}];for(var n=0;n"+e.name+" will be deleted.").ariaLabel("delete project").targetEvent(n).ok("OK").cancel("CANCEL");l.show(t).then(function(){f(e)},function(){console.log("CANCEL")})},p.success=h,p.getProjects=function(){p.query.offset=(p.query.page-1)*p.query.limit,u.hasRole("admin")?p.promise=o.squareProject.get(p.query,h).$promise:(p.query.id=p.userProfile.id,p.query.section="SquareProjects",p.promise=o.userProfile.getResources(p.query,h).$promise)},p.createOrEditProject=function(e,n){l.show({controller:"CreateOrEditSquareProjectDialogController",controllerAs:"vm",templateUrl:"app/main/apps/callysquare/views/projects/create/dialog.html",parent:angular.element(d.body),targetEvent:e,clickOutsideToClose:!0,locals:{project:n,projects:p.projects.rows,openFromEditor:null,setting:null,crudPermissions:p.crudPermissions}})},p.deleteProject=f,p.exportSelectedProjects=function(){var e=angular.copy(p.selectedProjects);return p.selectedProjects=[],e},p.deleteSelectedProjects=function(e){var n=l.confirm().title("Are you sure want to delete the selected projects?").htmlContent(""+p.selectedProjects.length+" selected will be deleted.").ariaLabel("delete Projects").targetEvent(e).ok("OK").cancel("CANCEL");l.show(n).then(function(){p.selectedProjects.forEach(function(e){f(e)}),p.selectedProjects=[]})},p.deselectProjects=function(){p.selectedProjects=[]},p.selectAllProjects=function(){p.selectedProjects=p.projects.rows};var g=!0,v=1;function h(e){p.projects=e||{count:0,rows:[]}}function f(e){o.squareProject.delete({id:e.id}).$promise.then(function(){_.remove(p.projects.rows,{id:e.id}),p.projects.count-=1,p.projects.rows.length||p.getProjects(),m.success({title:"Project deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){p.errors=e.data.errors||[{message:e.toString(),type:"api.project.delete"}];for(var n=0;n"+(e.name||"squareRecording")+" will be deleted.").ariaLabel("delete squareRecording").targetEvent(n).ok("OK").cancel("CANCEL");i.show(t).then(function(){S(e)},function(){console.log("CANCEL")})},b.success=y,b.getSquareRecordings=function(){b.query.offset=(b.query.page-1)*b.query.limit,g.hasRole("admin")?b.promise=m.squareRecording.get(b.query,y).$promise:(b.query.id=b.userProfile.id,b.query.section="SquareRecordings",b.promise=m.userProfile.getResources(b.query,y).$promise)},b.createOrEditSquareRecording=function(e,n){i.show({controller:"CreateOrEditSquareRecordingDialogController",controllerAs:"vm",templateUrl:"app/main/apps/callysquare/views/squareRecordings/create/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{squareRecording:n,squareRecordings:b.squareRecordings.rows,license:b.license,setting:b.setting,crudPermissions:b.crudPermissions}})},b.deleteSquareRecording=S,b.exportSelectedSquareRecordings=function(){var e=angular.copy(b.selectedSquareRecordings);return b.selectedSquareRecordings=[],e},b.deleteSelectedSquareRecordings=function(e){var n=i.confirm().title("Are you sure want to delete the selected squareRecordings?").htmlContent(""+b.selectedSquareRecordings.length+" selected will be deleted.").ariaLabel("delete SquareRecordings").targetEvent(e).ok("OK").cancel("CANCEL");i.show(n).then(function(){b.selectedSquareRecordings.forEach(function(e){S(e)}),b.selectedSquareRecordings=[]})},b.deselectSquareRecordings=function(){b.selectedSquareRecordings=[]},b.selectAllSquareRecordings=function(){b.selectedSquareRecordings=b.squareRecordings.rows};var A=!0,E=1;function y(e){b.squareRecordings=e||{count:0,rows:[]}}function S(e){m.squareRecording.delete({id:e.id}).$promise.then(function(){_.remove(b.squareRecordings.rows,{id:e.id}),b.squareRecordings.count-=1,b.squareRecordings.rows.length||b.getSquareRecordings(),p.success({title:_.startCase("SquareRecording")+" deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){b.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEsquareRecording"}];for(var n=0;n"+(e.name||"chatQueue")+" will be deleted.").ariaLabel("delete chatQueue").targetEvent(n).ok("OK").cancel("CANCEL");i.show(t).then(function(){S(e)},function(){console.log("CANCEL")})},b.gotorealtimegoto=function(e,n){{if(!g.hasRole("admin"))return m.userProfileSection.get({userProfileId:g.getCurrentUser().userProfileId,sectionId:510}).$promise.then(function(e){var n=e&&e.rows?e.rows[0]:null;n&&n.enabled?t.go("app.chat.realtime.queues",{}):p.info({title:r.instant("STAFF.PERMISSIONS_UNAUTHORIZED_REDIRECT_TITLE"),msg:r.instant("STAFF.PERMISSIONS_UNAUTHORIZED_REDIRECT_MESSAGE")})}).catch(function(e){p.error({title:e.status?"API:"+e.status+" - "+e.statusText:"USERPROFILE:GET_SECTION",msg:e.status?JSON.stringify(e.data):e.toString()})});t.go("app.chat.realtime.queues",{})}},b.success=y,b.getChatQueues=function(){b.query.offset=(b.query.page-1)*b.query.limit,g.hasRole("admin")?b.promise=m.chatQueue.get(b.query,y).$promise:(b.query.id=b.userProfile.id,b.query.section="ChatQueues",b.promise=m.userProfile.getResources(b.query,y).$promise)},b.createOrEditChatQueue=function(e,n){i.show({controller:"CreateOrEditChatQueueDialogController",controllerAs:"vm",templateUrl:"app/main/apps/chat/views/chatQueues/create/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{chatQueue:n,chatQueues:b.chatQueues.rows,license:b.license,setting:b.setting,crudPermissions:b.crudPermissions}})},b.deleteChatQueue=S,b.exportSelectedChatQueues=function(){var e=angular.copy(b.selectedChatQueues);return b.selectedChatQueues=[],e},b.deleteSelectedChatQueues=function(e){var n=i.confirm().title("Are you sure want to delete the selected chatQueues?").htmlContent(""+b.selectedChatQueues.length+" selected will be deleted.").ariaLabel("delete ChatQueues").targetEvent(e).ok("OK").cancel("CANCEL");i.show(n).then(function(){b.selectedChatQueues.forEach(function(e){S(e)}),b.selectedChatQueues=[]})},b.deselectChatQueues=function(){b.selectedChatQueues=[]},b.selectAllChatQueues=function(){b.selectedChatQueues=b.chatQueues.rows};var A=!0,E=1;function y(e){b.chatQueues=e||{count:0,rows:[]}}function S(e){m.chatQueue.delete({id:e.id}).$promise.then(function(){_.remove(b.chatQueues.rows,{id:e.id}),b.chatQueues.count-=1,b.chatQueues.rows.length||b.getChatQueues(),p.success({title:_.startCase("ChatQueue")+" deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){b.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEchatQueue"}];for(var n=0;n":"",n}),c.startingSelectedItems=angular.copy(c.selectedItems),c.dualMultiselectOptions.selectedItems=c.selectedItems,c.dualMultiselectOptions.items=_.differenceBy(c.allowedItems,c.dualMultiselectOptions.selectedItems,"id"),t()}).catch(function(e){n(e)})})}c.currentUser=l.getCurrentUser(),c.chatQueue=n,c.crudPermissions=d,c.realtime=o,c.items=[],c.allowedItems=[],c.selectedItems=[],c.startingAllowedItems=[],c.startingSelectedItems=[],c.pendingChanges=!1,c.onInit=function(){return l.hasRole("admin")?m().catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GET_AGENTS",msg:e.status?JSON.stringify(e.data):e.toString()})}):a(function(t,n){s.userProfileSection.get({userProfileId:c.currentUser.userProfileId,name:"Agents"}).$promise.then(function(e){var n=e&&e.rows?e.rows[0]:null;t(n)}).catch(function(e){n(e)})}).then(function(e){return c.section=e,m()}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GET_AGENTS",msg:e.status?JSON.stringify(e.data):e.toString()})})},c.saveAgents=function(){var e=_.differenceBy(c.startingSelectedItems,c.selectedItems,"id"),n=_.differenceBy(c.selectedItems,c.startingSelectedItems,"id");return(t=e,a(function(e,n){_.isEmpty(t)?e():s.chatQueue.removeAgents({id:c.chatQueue.id,ids:_.map(t,"id")}).$promise.then(function(){e()}).catch(function(e){n(e)})})).then(function(){return t=n,a(function(e,n){_.isEmpty(t)?e():s.chatQueue.addAgents({id:c.chatQueue.id,ids:_.map(t,"id")}).$promise.then(function(){e()}).catch(function(e){n(e)})});var t}).then(function(){c.pendingChanges=!1,c.startingAllowedItems=angular.copy(c.allowedItems),c.startingSelectedItems=angular.copy(c.selectedItems),i.success({title:"SUCCESS",msg:"Agents association has been updated!"})}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:LISTS_ASSOCIATION",msg:e.status?JSON.stringify(e.data):e.toString()})});var t},c.closeDialog=function(){e.hide()},c.dualMultiselectOptions={readOnly:!c.crudPermissions.canEdit,items:[],selectedItems:[],showSelectAndDeselectAll:!0,orderBy:"name",line1:"fullname",line2:["name","internal"],line3:"",labelAll:r.instant("CHAT.ALL_AGENTS"),labelSelected:r.instant("CHAT.SELECTED_AGENTS"),transferCallback:function(e,n){var t=_.xorBy(c.startingSelectedItems,c.selectedItems,"id");c.pendingChanges=!_.isEmpty(t)}}}e.$inject=["$mdDialog","$q","toasty","api","chatQueue","chatQueues","realtime","$translate","Auth","crudPermissions"],angular.module("app.chat").controller("ChatQueueagentaddController",e)}(),function(){"use strict";function e(e,a,i,s,n,t,o,r){var l=this;function d(){return a(function(t,n){return a(function(n,t){return s.team.get({fields:"id,name",nolimit:!0}).$promise.then(function(e){n(e)}).catch(function(e){t(e)})}).then(function(e){return l.items=e.rows?e.rows:[],o.hasRole("admin")?e:l.section?l.section.autoAssociation?e:a(function(n,t){return s.userProfileResource.get({sectionId:l.section.id,nolimit:!0}).$promise.then(function(e){n(e)}).catch(function(e){t(e)})}):null}).then(function(e){var n=e&&e.rows?e.rows:[];return l.allowedItems=_.map(n,function(e){return _.find(l.items,{id:o.hasRole("admin")||l.section.autoAssociation?e.id:e.resourceId})}),l.items.forEach(function(e){var n=_.find(l.allowedItems,{id:e.id});o.hasRole("admin")?e.isValid=!0:e.isValid=void 0!==n}),a(function(n,t){return s.chatQueue.getTeams({id:l.chatQueue.id,fields:"id,name",nolimit:!0}).$promise.then(function(e){n(e)}).catch(function(e){t(e)})})}).then(function(e){var n=e&&e.rows?e.rows:[];l.selectedItems=_.map(n,function(e){return _.find(l.items,{id:e.id})}),l.startingSelectedItems=angular.copy(l.selectedItems),l.dualMultiselectOptions.selectedItems=l.selectedItems,l.dualMultiselectOptions.items=_.differenceBy(l.allowedItems,l.dualMultiselectOptions.selectedItems,"id"),t()}).catch(function(e){n(e)})})}l.currentUser=o.getCurrentUser(),l.chatQueue=n,l.crudPermissions=r,l.items=[],l.allowedItems=[],l.selectedItems=[],l.startingAllowedItems=[],l.startingSelectedItems=[],l.pendingChanges=!1,l.dualMultiselectOptions={readOnly:!l.crudPermissions.canEdit,allowedItems:[],selectedItems:[],showSelectAndDeselectAll:!0,orderBy:"name",line1:"name",line2:"",line3:"",labelAll:t.instant("CHAT.ALL_TEAMS"),labelSelected:t.instant("CHAT.SELECTED_TEAMS"),transferCallback:function(e,n){var t=_.xorBy(l.startingSelectedItems,l.selectedItems,"id");l.pendingChanges=!_.isEmpty(t)}},l.onInit=function(){return o.hasRole("admin")?d().catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GET_TEAMS",msg:e.status?JSON.stringify(e.data):e.toString()})}):a(function(t,n){s.userProfileSection.get({userProfileId:l.currentUser.userProfileId,name:"Teams"}).$promise.then(function(e){var n=e&&e.rows?e.rows[0]:null;t(n)}).catch(function(e){n(e)})}).then(function(e){return l.section=e,d()}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GET_TEAMS",msg:e.status?JSON.stringify(e.data):e.toString()})})},l.saveTeams=function(){var e=_.differenceBy(l.startingSelectedItems,l.selectedItems,"id"),n=_.differenceBy(l.selectedItems,l.startingSelectedItems,"id");return(t=e,a(function(e,n){_.isEmpty(t)?e():s.chatQueue.removeTeams({id:l.chatQueue.id,ids:_.map(t,"id")}).$promise.then(function(){e()}).catch(function(e){n(e)})})).then(function(){return t=n,a(function(e,n){_.isEmpty(t)?e():s.chatQueue.addTeams({id:l.chatQueue.id,ids:_.map(t,"id")}).$promise.then(function(){e()}).catch(function(e){n(e)})});var t}).then(function(){l.pendingChanges=!1,l.startingAllowedItems=angular.copy(l.allowedItems),l.startingSelectedItems=angular.copy(l.selectedItems),i.success({title:"SUCCESS",msg:"Teams association has been updated!"})}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:LISTS_ASSOCIATION",msg:e.status?JSON.stringify(e.data):e.toString()})});var t},l.closeDialog=function(){e.hide()}}e.$inject=["$mdDialog","$q","toasty","api","chatQueue","$translate","Auth","crudPermissions"],angular.module("app.chat").controller("ChatQueueteamaddController",e)}(),function(){"use strict";function e(e,n,t,a,i,s,o,r,l,d,c,m){var u=this;u.currentUser=d.getCurrentUser(),u.license=s,u.setting=o,u.passwordPattern=u.setting.securePassword?/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/:"",u.location=n.protocol()+"://"+n.host(),u.chatQueue=c||e.params.chatQueue||{},u.userProfileSection=m&&1==m.count?m.rows[0]:null,u.crudPermissions=d.parseCrudPermissions(u.userProfileSection?u.userProfileSection.crudPermissions:null),u.hasModulePermissions={},u.selectedTab=e.params.tab||0,u.teamadddialog=function(e,n){t.show({controller:"ChatQueueteamaddController",controllerAs:"vm",templateUrl:"app/main/apps/chat/views/chatQueues/edit/teamadd/teamadd.html",parent:angular.element(a.body),targetEvent:n,clickOutsideToClose:!0,locals:{chatQueue:e,chatQueues:u.chatQueues?u.chatQueues.rows:[],crudPermissions:u.crudPermissions}})},u.agentadddialog=function(e,n){t.show({controller:"ChatQueueagentaddController",controllerAs:"vm",templateUrl:"app/main/apps/chat/views/chatQueues/edit/agentadd/agentadd.html",parent:angular.element(a.body),targetEvent:n,clickOutsideToClose:!0,locals:{chatQueue:e,chatQueues:u.chatQueues?u.chatQueues.rows:[],crudPermissions:u.crudPermissions,realtime:!1}})},u.alert=l.info,u.gotoChatQueues=function(){e.go("app.chat.chatQueues")},u.saveChatQueue=function(){r.chatQueue.update({id:u.chatQueue.id},u.chatQueue).$promise.then(function(){l.success({title:"ChatQueue updated!",msg:u.chatQueue.name?u.chatQueue.name+" has been updated!":""})}).catch(function(e){l.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETchatQueue",msg:e.data?JSON.stringify(e.data):e.toString()})})}}e.$inject=["$state","$location","$mdDialog","$document","$translate","license","setting","api","toasty","Auth","chatQueue","userProfileSection"],angular.module("app.chat").controller("ChatQueueController",e)}(),function(){"use strict";function e(e,n,t,a,i,s,o,r,l,d,c,m,u,p,g,v,h,f){var b=this;b.license=v,b.setting=h,b.currentUser=g.getCurrentUser(),b.chatWebsites=l||{count:0,rows:[]},b.userProfile=d,b.userProfileSection=c&&1==c.count?c.rows[0]:null,b.crudPermissions=g.parseCrudPermissions(b.userProfileSection?b.userProfileSection.crudPermissions:null),b.table="chatWebsites",b.listOrder="",b.listOrderAsc=null,b.selectedChatWebsites=[],b.query={fields:"createdAt,updatedAt,id,token,agentIdentifier,customerAlias,messageFontSize,name,key,address,remote,ListId,fidelity,timeout,agentAlias,closingQuestion,formSubmitSuccessMessage,formSubmitFailureMessage,color,color_focus,color_button,textColor,backgroundColor,fontSize,header_shape,showAgentAvatar,showCustomerAvatar,alignment,verticalAlignment,messagesAlignment,defaultTitle,animation,defaultWhiteLabel,whiteLabel,defaultLogo,conditionAgreement,autoclose,enableUnmanagedNote,unmanagedMessage,skipUnmanaged,sendUnmanaged,enableCustomerWriting,waitingTitle,waitingMessage,closingMessage,noteTitle,placeholderMessage,skipMessageButton,enableRating,ratingType,ratingStarsNumber,enableFeedback,feedbackTitle,forwardTranscript,forwardTranscriptMessage,closingMessageButton,download_transcript,enableCustomerAttachment,enableSendButton,enableCustomerCheckmarks,systemAlias,enquiry_enable,enquiry_forwarding,enquiry_forwarding_address,name_title,username_placeholder,email_title,email_placeholder,header_online,hideWhenOffline,header_offline,start_chat_button,offline_chat_button,offlineMessageSubject,offlineMessageBody,offline_message,message_title,enquiry_message_placeholder,enquiry_button,rating_message,rating_send,rating_skip,onlineForm,offlineForm,mapKey,mapKeyOffline,forwardOffline,forwardOfflineAddress,IntervalId,timezone,waitForTheAssignedAgent,mandatoryDisposition,mandatoryDispositionPauseId,description,notificationSound,notificationShake,notificationTemplate,queueTransfer,queueTransferTimeout,agentTransfer,agentTransferTimeout",sort:"-updatedAt",limit:10,page:1},b.arrayagentIdentifier=_.keyBy([{option:"WebsiteAlias",value:"'website_alias'"},{option:"AgentAlias",value:"'agent_alias'"},{option:"AgentFullname",value:"'agent_fullname'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),b.arrayheader_shape=_.keyBy([{option:"Rounded",value:"'rounded'"},{option:"Squared",value:"'squared'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),b.arrayalignment=_.keyBy([{option:"bottom_right",value:"'bottom_right'"},{option:"right",value:"'right'"},{option:"left",value:"'left'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),b.arraymessagesAlignment=_.keyBy([{option:"alternate",value:"'alternate'"},{option:"centered",value:"'centered'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),b.arrayratingType=_.keyBy([{option:"Star",value:"'star'"},{option:"Thumb",value:"'thumb'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),b.editstate=function(e,n){t.go("app.chat.chatWebsites.edit",{id:e.id,chatWebsite:e,crudPermissions:b.crudPermissions})},b.interactionsgoto=function(e,n){t.go("app.chat.chatWebsites.edit",{id:e.id,tab:9})},b.offlinemessagesgoto=function(e,n){t.go("app.chat.chatWebsites.edit",{id:e.id,tab:10})},b.agentadddialog=function(e,n){i.show({controller:"ChatWebsiteagentaddController",controllerAs:"vm",templateUrl:"app/main/apps/chat/views/chatWebsites/edit/agentadd/agentadd.html",parent:angular.element(s.body),targetEvent:n,clickOutsideToClose:!0,locals:{chatWebsite:e,chatWebsites:b.chatWebsites?b.chatWebsites.rows:[],crudPermissions:b.crudPermissions,realtime:!1}})},b.deleteconfirm=function(e,n){var t=i.confirm().title("Are you sure want to delete the "+_.startCase("chatWebsite")+"?").htmlContent(""+(e.name||"chatWebsite")+" will be deleted.").ariaLabel("delete chatWebsite").targetEvent(n).ok("OK").cancel("CANCEL");i.show(t).then(function(){S(e)},function(){console.log("CANCEL")})},b.success=y,b.getChatWebsites=function(){b.query.offset=(b.query.page-1)*b.query.limit,g.hasRole("admin")?b.promise=m.chatWebsite.get(b.query,y).$promise:(b.query.id=b.userProfile.id,b.query.section="ChatWebsites",b.promise=m.userProfile.getResources(b.query,y).$promise)},b.createOrEditChatWebsite=function(e,n){i.show({controller:"CreateOrEditChatWebsiteDialogController",controllerAs:"vm",templateUrl:"app/main/apps/chat/views/chatWebsites/create/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{chatWebsite:n,chatWebsites:b.chatWebsites.rows,license:b.license,setting:b.setting,crudPermissions:b.crudPermissions}})},b.deleteChatWebsite=S,b.exportSelectedChatWebsites=function(){var e=angular.copy(b.selectedChatWebsites);return b.selectedChatWebsites=[],e},b.deleteSelectedChatWebsites=function(e){var n=i.confirm().title("Are you sure want to delete the selected chatWebsites?").htmlContent(""+b.selectedChatWebsites.length+" selected will be deleted.").ariaLabel("delete ChatWebsites").targetEvent(e).ok("OK").cancel("CANCEL");i.show(n).then(function(){b.selectedChatWebsites.forEach(function(e){S(e)}),b.selectedChatWebsites=[]})},b.deselectChatWebsites=function(){b.selectedChatWebsites=[]},b.selectAllChatWebsites=function(){b.selectedChatWebsites=b.chatWebsites.rows},g.hasRole("admin")?m.cmList.get({fields:"id,name",sort:"name"}).$promise.then(function(e){b.lists=e.rows||[]}).catch(function(e){p.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GET_LISTS",msg:e.data?JSON.stringify(e.data):e.toString()})}):m.cmList.get({fields:"id,name",sort:"name"}).$promise.then(function(e){b.lists=e.rows||[]}).then(function(){return m.userProfileSection.get({userProfileId:b.currentUser.userProfileId,sectionId:301}).$promise}).then(function(e){var n=e&&e.rows?e.rows[0]:null;if(n){if(!n.autoAssociation)return m.userProfileResource.get({sectionId:n.id}).$promise.then(function(e){var n=_.map(e.rows,function(e){return _.find(b.lists,{id:e.resourceId})}),t=null;if(b.chatWebsite&&(t=_.find(b.lists,{id:Number(b.chatWebsite.ListId)})),t&&!_.some(n,["id",t.id])){var a=_.find(b.lists,{id:t.id});a.canSelect=!1,n.push(a)}b.lists=n})}else{var t=[],a=null;b.chatWebsite&&(a=_.find(b.lists,{id:Number(b.chatWebsite.ListId)}));for(var i=0;i"+e.app+" will be deleted.").ariaLabel("delete application").targetEvent(t).ok("OK").cancel("CANCEL");i.show(a).then(function(){r.chatWebsiteApps.rows.splice(n,1),l()},function(){console.log("CANCEL")})},r.getChatWebsiteApps=function(){r.promise=o.chatWebsite.getApplications(r.query,t).$promise},r.editChatWebsiteApp=n,r.editInterval=function(e,n){if(r.chatWebsiteApps.rows.length){var t=r.chatWebsiteApps.rows[n]?r.chatWebsiteApps.rows[n]:r.chatWebsiteApps.rows[0];i.show({controller:"EditChatWebsiteAppintervalDialogController",controllerAs:"vm",templateUrl:"app/main/apps/chat/views/chatWebsites/edit/apps/interval/dialog.html",parent:angular.element(a.body),targetEvent:e,clickOutsideToClose:!0,locals:{interval:{interval:t.interval,IntervalId:t.IntervalId,application:!0},intervals:[],crudPermissions:r.crudPermissions}}).then(function(e){e&&(t.interval=e.interval||"*,*,*,*",t.IntervalId=e.IntervalId||null,l())})}},r.deleteChatWebsiteApp=function(e){_.remove(r.chatWebsiteApps.rows,{id:e.id}),l(),s.success({title:"App deleted!",msg:e.app?e.app+" has been deleted!":""})},r.deleteSelectedChatWebsiteApps=function(e){var n=i.confirm().title("Are you sure want to delete the selected applications?").htmlContent(""+r.selectedChatWebsiteApps.length+" selected will be deleted.").ariaLabel("delete applications").targetEvent(e).ok("OK").cancel("CANCEL");i.show(n).then(function(){r.selectedChatWebsiteApps.forEach(function(e){_.remove(r.chatWebsiteApps.rows,{id:e.id})}),r.selectedChatWebsiteApps=[],l()})},r.rewriteRouting=l,r.getIntervals=function(){return o.interval.get({fields:"id,interval,IntervalId"}).$promise.then(function(e){r.intervals=e}).catch(function(e){console.error(e)})}}e.$inject=["api","$mdDialog","$document","toasty","Auth"],angular.module("app.chat").controller("ChatWebsiteActionsController",e)}(),function(){"use strict";function e(e,a,i,s,n,t,o,r,l,d){var c=this;function m(){return a(function(t,n){return a(function(n,t){return s.user.get({fields:"id,name,internal,fullname",nolimit:!0,role:"agent"}).$promise.then(function(e){n(e)}).catch(function(e){t(e)})}).then(function(e){return c.items=e.rows?e.rows:[],l.hasRole("admin")?e:c.section?c.section.autoAssociation?e:a(function(n,t){return s.userProfileResource.get({sectionId:c.section.id,nolimit:!0}).$promise.then(function(e){n(e)}).catch(function(e){t(e)})}):null}).then(function(e){var n=e&&e.rows?e.rows:[];return c.allowedItems=_.map(n,function(e){return _.find(c.items,{id:l.hasRole("admin")||c.section.autoAssociation?e.id:e.resourceId})}),c.startingAllowedItems=angular.copy(c.allowedItems),c.items.forEach(function(e){var n=_.find(c.allowedItems,{id:e.id});l.hasRole("admin")?e.isValid=!0:e.isValid=void 0!==n}),a(function(n,t){return s.chatWebsite.getAgents({id:c.chatWebsite.id,fields:"id,name,internal,fullname",nolimit:!0,role:"agent"}).$promise.then(function(e){n(e)}).catch(function(e){t(e)})})}).then(function(e){var n=e&&e.rows?e.rows:[];c.selectedItems=_.map(n,function(e){var n=_.find(c.items,{id:e.id});return n.penalty=e.UserChatWebsite?"penalty "+e.UserChatWebsite.penalty:"",n.internal=e.hasOwnProperty("internal")?"<"+e.internal+">":"",n}),c.startingSelectedItems=angular.copy(c.selectedItems),c.dualMultiselectOptions.selectedItems=c.selectedItems,c.dualMultiselectOptions.items=_.differenceBy(c.allowedItems,c.dualMultiselectOptions.selectedItems,"id"),t()}).catch(function(e){n(e)})})}c.currentUser=l.getCurrentUser(),c.chatWebsite=n,c.crudPermissions=d,c.realtime=o,c.items=[],c.allowedItems=[],c.selectedItems=[],c.startingAllowedItems=[],c.startingSelectedItems=[],c.pendingChanges=!1,c.onInit=function(){return l.hasRole("admin")?m().catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GET_AGENTS",msg:e.status?JSON.stringify(e.data):e.toString()})}):a(function(t,n){s.userProfileSection.get({userProfileId:c.currentUser.userProfileId,name:"Agents"}).$promise.then(function(e){var n=e&&e.rows?e.rows[0]:null;t(n)}).catch(function(e){n(e)})}).then(function(e){return c.section=e,m()}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GET_AGENTS",msg:e.status?JSON.stringify(e.data):e.toString()})})},c.saveAgents=function(){var e=_.differenceBy(c.startingSelectedItems,c.selectedItems,"id"),n=_.differenceBy(c.selectedItems,c.startingSelectedItems,"id");return(t=e,a(function(e,n){_.isEmpty(t)?e():s.chatWebsite.removeAgents({id:c.chatWebsite.id,ids:_.map(t,"id")}).$promise.then(function(){e()}).catch(function(e){n(e)})})).then(function(){return t=n,a(function(e,n){_.isEmpty(t)?e():s.chatWebsite.addAgents({id:c.chatWebsite.id,ids:_.map(t,"id")}).$promise.then(function(){e()}).catch(function(e){n(e)})});var t}).then(function(){c.pendingChanges=!1,c.startingAllowedItems=angular.copy(c.allowedItems),c.startingSelectedItems=angular.copy(c.selectedItems),i.success({title:"SUCCESS",msg:"Agents association has been updated!"})}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:LISTS_ASSOCIATION",msg:e.status?JSON.stringify(e.data):e.toString()})});var t},c.closeDialog=function(){e.hide()},c.dualMultiselectOptions={readOnly:!c.crudPermissions.canEdit,items:[],selectedItems:[],showSelectAndDeselectAll:!0,orderBy:"name",line1:"fullname",line2:["name","internal"],line3:"",labelAll:r.instant("CHAT.ALL_AGENTS"),labelSelected:r.instant("CHAT.SELECTED_AGENTS"),transferCallback:function(e,n){var t=_.xorBy(c.startingSelectedItems,c.selectedItems,"id");c.pendingChanges=!_.isEmpty(t)}}}e.$inject=["$mdDialog","$q","toasty","api","chatWebsite","chatWebsites","realtime","$translate","Auth","crudPermissions"],angular.module("app.chat").controller("ChatWebsiteagentaddController",e)}(),function(){"use strict";function e(e,a){var i=this;i.chatWebsite={},i.crudPermissions,i.ngFlowOptions={singleFile:!0,maxChunkRetries:1,chunkSize:8388608,simultaneousUploads:1,testChunks:!1,progressCallbacksInterval:1e3,allowDuplicateUploads:!0},i.ngFlow={flow:{}},i.dropping=!1,i.fileAdded=function(e){var n=["png","jpg"];if(!_.includes(n,e.getExtension()))return a.error({title:"Invalid extension: "+e.getExtension(),msg:"Supported extension: "+n.join()}),!1;if(8388608"+(e.name||e.id&&_.upperFirst("chatCannedAnswer #")+e.id||"chatCannedAnswer")+" will be deleted.").ariaLabel("delete chatCannedAnswer").targetEvent(n).ok("OK").cancel("CANCEL");o.show(t).then(function(){g(e)},function(){console.log("CANCEL")})},m.success=u,m.getChatWebsiteChatCannedAnswers=p,m.createOrEditChatWebsiteChatCannedAnswer=function(e,n){o.show({controller:"CreateOrEditChatCannedAnswerDialogController",controllerAs:"vm",templateUrl:"app/main/apps/chat/views/chatWebsites/edit/chatCannedAnswers/dialog.html",parent:angular.element(r.body),targetEvent:e,clickOutsideToClose:!0,locals:{chatWebsite:m.chatWebsite,chatCannedAnswer:n,chatCannedAnswers:m.chatWebsiteChatCannedAnswers.rows,license:null,setting:null,crudPermissions:m.crudPermissions}})},m.exportSelectedChatWebsiteChatCannedAnswers=function(){var e=angular.copy(m.selectedChatWebsiteChatCannedAnswers);return m.selectedChatWebsiteChatCannedAnswers=[],e},m.deleteChatWebsiteChatCannedAnswer=g,m.deleteSelectedChatWebsiteChatCannedAnswers=function(e){var n=o.confirm().title("Are you sure want to delete the selected chatCannedAnswers?").htmlContent(""+m.selectedChatWebsiteChatCannedAnswers.length+" selected will be deleted.").ariaLabel("delete chatCannedAnswers").targetEvent(e).ok("OK").cancel("CANCEL");o.show(n).then(function(){m.selectedChatWebsiteChatCannedAnswers.forEach(function(e){g(e)}),m.selectedChatWebsiteChatCannedAnswers=[]})};var v=!0,h=1;n.$watch("vm_dc.query.filter",function(e,n){v?s(function(){v=!1}):(n||(h=m.query.page),e!==n&&(m.query.page=1),e||(m.query.page=h),p())})}e.$inject=["$cookies","$scope","$state","$q","$translate","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.chat").controller("ChatWebsiteChatCannedAnswersController",e)}(),function(){"use strict";function e(e,n,t,a,i,s,o,r,l,d,c,m,u,p){var g=this;function v(e){a.hide(e)}g.currentUser=c.getCurrentUser(),g.errors=[],g.setting=u,g.license=m,g.crudPermissions=p,g.hasModulePermissions={},g.passwordPattern=g.setting&&g.setting.securePassword?/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/:"",g.title="CHAT.EDIT_CHATCANNEDANSWER",g.chatCannedAnswer=angular.copy(l),g.chatCannedAnswers=r,g.newChatCannedAnswer=!1,g.chatCannedAnswer||(g.chatCannedAnswer={},g.title="CHAT.NEW_CHATCANNEDANSWER",g.newChatCannedAnswer=!0),n.params.id&&(g.chatCannedAnswer.ChatWebsiteId=n.params.id),g.addNewChatCannedAnswer=function(){g.errors=[],d.cannedAnswer.save(g.chatCannedAnswer).$promise.then(function(e){g.chatCannedAnswers.unshift(e.toJSON()),o.success({title:"ChatCannedAnswer properly created",msg:g.chatCannedAnswer.name?g.chatCannedAnswer.name+" has been created!":""}),v(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){g.errors=e.data.errors||[{message:e.toString(),type:"api.cannedAnswer.save"}];for(var n=0;n"+(e.name||e.id&&_.upperFirst("chatDisposition #")+e.id||"chatDisposition")+" will be deleted.").ariaLabel("delete chatDisposition").targetEvent(n).ok("OK").cancel("CANCEL");o.show(t).then(function(){g(e)},function(){console.log("CANCEL")})},m.success=u,m.getChatWebsiteChatDispositions=p,m.createOrEditChatWebsiteChatDisposition=function(e,n){o.show({controller:"CreateOrEditChatDispositionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/chat/views/chatWebsites/edit/chatDispositions/dialog.html",parent:angular.element(r.body),targetEvent:e,clickOutsideToClose:!0,locals:{chatWebsite:m.chatWebsite,chatDisposition:n,chatDispositions:m.chatWebsiteChatDispositions.rows,license:null,setting:null,crudPermissions:m.crudPermissions}})},m.exportSelectedChatWebsiteChatDispositions=function(){var e=angular.copy(m.selectedChatWebsiteChatDispositions);return m.selectedChatWebsiteChatDispositions=[],e},m.deleteChatWebsiteChatDisposition=g,m.deleteSelectedChatWebsiteChatDispositions=function(e){var n=o.confirm().title("Are you sure want to delete the selected chatDispositions?").htmlContent(""+m.selectedChatWebsiteChatDispositions.length+" selected will be deleted.").ariaLabel("delete chatDispositions").targetEvent(e).ok("OK").cancel("CANCEL");o.show(n).then(function(){m.selectedChatWebsiteChatDispositions.forEach(function(e){g(e)}),m.selectedChatWebsiteChatDispositions=[]})};var v=!0,h=1;n.$watch("vm_dc.query.filter",function(e,n){v?s(function(){v=!1}):(n||(h=m.query.page),e!==n&&(m.query.page=1),e||(m.query.page=h),p())})}e.$inject=["$cookies","$scope","$state","$q","$translate","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.chat").controller("ChatWebsiteChatDispositionsController",e)}(),function(){"use strict";function e(e,n,t,a,i,s,o,r,l,d,c,m,u,p){var g=this;function v(e){a.hide(e)}g.currentUser=c.getCurrentUser(),g.errors=[],g.setting=u,g.license=m,g.crudPermissions=p,g.hasModulePermissions={},g.passwordPattern=g.setting&&g.setting.securePassword?/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/:"",g.title="CHAT.EDIT_CHATDISPOSITION",g.chatDisposition=angular.copy(l),g.chatDispositions=r,g.newChatDisposition=!1,g.chatDisposition||(g.chatDisposition={},g.title="CHAT.NEW_CHATDISPOSITION",g.newChatDisposition=!0),n.params.id&&(g.chatDisposition.ChatWebsiteId=n.params.id),g.addNewChatDisposition=function(){g.errors=[],d.disposition.save(g.chatDisposition).$promise.then(function(e){g.chatDispositions.unshift(e.toJSON()),o.success({title:"ChatDisposition properly created",msg:g.chatDisposition.name?g.chatDisposition.name+" has been created!":""}),v(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){g.errors=e.data.errors||[{message:e.toString(),type:"api.disposition.save"}];for(var n=0;n":i.instant("DASHBOARDS.NOT_ASSIGNED")}m.currentUser=c.getCurrentUser(),m.chatWebsite={},m.chatWebsiteInteractions={count:0,rows:[]},m.selectedChatWebsiteInteractions=[],m.crudPermissions,m.query={read:"null",closed:"null",sort:"-createdAt",includeAll:"true",limit:10,page:1},m.init=function(e,n){m.chatWebsite=e,m.crudPermissions=void 0!==n?n:{readOnly:!0,canEdit:!1,canDelete:!1},m.query.ChatWebsiteId=m.chatWebsite.id,m.advancedSearch={fields:[{name:"Id",column:"id",type:"number"},{name:"Contact",column:"Contact",type:"autocomplete",options:{searchFields:["firstName","lastName","email"],route:{model:"cmContact",action:"get",params:{fields:"id,firstName,lastName,email",Contact:"@autocomplete",nolimit:!0}},extraOperators:["$substring"],excludedOperators:["$ne"]}},{name:"Subject",column:"subject",type:"text",options:{excludedOperators:["$eq","$ne"]}},{name:"Body",column:"plainBody",type:"text",options:{excludedOperators:["$eq","$ne"]}},{name:"Status",column:"closed",type:"select",values:[{id:0,translate:"DASHBOARDS.OPENED"},{id:1,translate:"DASHBOARDS.CLOSED"}],options:{excludedOperators:["$ne"]}},{name:"Agent",column:"User",type:"autocomplete",options:{table:"i",route:{model:"user",action:"get",params:{role:"agent",fields:"id,name,fullname",nolimit:!0}},searchFields:["fullname","name"],extraOperators:["$substring"],excludedOperators:["$ne"]}},{name:"Tags",column:"Tag",type:"multiselect",options:{route:{model:"tag",action:"get",params:{nolimit:!0}},excludedOperators:["$notIn"]}},{name:"Start Date",column:"createdAt",type:"date",options:{excludedOperators:["$ne"]}},{name:"Read",column:"unreadMessages",type:"select",values:[{id:1,translate:"DASHBOARDS.READ"},{id:0,translate:"DASHBOARDS.UNREAD"}],options:{excludedOperators:["$ne"]}}]},d.tag.get().$promise.then(function(e){m.tags=e||{count:0,rows:[]}}).then(function(){m.quickFilters=[{name:"Start Date",key:"createdAt",type:"date",label:"DASHBOARDS.SELECT_DATE"},{name:"Messages",key:"read",type:"select",label:"DASHBOARDS.SELECT_READ_UNREAD",customOptions:[{value:0,translate:"DASHBOARDS.UNREAD"},{value:1,translate:"DASHBOARDS.READ"},{value:null,translate:"DASHBOARDS.ALL"}]},{name:"Status",key:"closed",type:"select",label:"DASHBOARDS.SELECT_STATUS",customOptions:[{value:0,translate:"DASHBOARDS.OPENED"},{value:1,translate:"DASHBOARDS.CLOSED"},{value:null,translate:"DASHBOARDS.ALL"}]},{name:"Agent",key:"UserId",type:"select",label:"DASHBOARDS.SELECT_AGENT",customOptions:[{value:"null",translate:"DASHBOARDS.NOT_ASSIGNED"},{value:void 0,translate:"DASHBOARDS.ALL"}]},{name:"Tag",key:"tag",type:"multiselect",label:"DASHBOARDS.SELECT_TAG",options:m.tags.rows,placeholder:"DASHBOARDS.TAGS"}]})},m.deleteConfirm=function(e,n){var t=o.confirm().title("Are you sure want to delete the interaction?").htmlContent(""+(e.name||e.id&&_.upperFirst("interaction #")+e.id||"interaction")+" will be deleted.").ariaLabel("delete interaction").targetEvent(n).ok("OK").cancel("CANCEL");o.show(t).then(function(){g(e)},function(){console.log("CANCEL")})},m.chatInteractionDownload=function(s,e,n){return d.chatInteraction.download({id:s.id,exists:!0,attachments:n}).$promise.then(function(e){var n=[e.buffer],t="interaction"+s.id,a=new Blob(n,{type:e.type});t="chat-interaction"+s.id+".zip";var i=window.document.createElement("a");i.setAttribute("href",URL.createObjectURL(a)),i.setAttribute("download",t),document.body.appendChild(i),i.click()}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length)for(var n=0;n"+m.selectedChatWebsiteInteractions.length+" selected will be deleted.").ariaLabel("delete interactions").targetEvent(e).ok("OK").cancel("CANCEL");o.show(n).then(function(){m.selectedChatWebsiteInteractions.forEach(function(e){g(e)}),m.selectedChatWebsiteInteractions=[]})};var f=!0,b=1;a.$watch("vm_dc.query.filter",function(e,n){f?s(function(){f=!1}):(n||(b=m.query.page),e!==n&&(m.query.page=1),e||(m.query.page=b),p())})}e.$inject=["$cookies","$scope","$state","$q","$translate","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.chat").controller("ChatWebsiteInteractionsController",e)}(),function(){"use strict";function e(e,a){var i=this;i.chatWebsite={},i.crudPermissions,i.ngFlowOptions={singleFile:!0,maxChunkRetries:1,chunkSize:8388608,simultaneousUploads:1,testChunks:!1,progressCallbacksInterval:1e3,allowDuplicateUploads:!0},i.ngFlow={flow:{}},i.dropping=!1,i.fileAdded=function(e){var n=["png","jpg"];if(!_.includes(n,e.getExtension()))return a.error({title:"Invalid extension: "+e.getExtension(),msg:"Supported extension: "+n.join()}),!1;if(8388608"+(e.name||e.id&&_.upperFirst("offlineMessage #")+e.id||"offlineMessage")+" will be deleted.").ariaLabel("delete offlineMessage").targetEvent(n).ok("OK").cancel("CANCEL");o.show(t).then(function(){g(e)},function(){console.log("CANCEL")})},m.success=u,m.getChatWebsiteOfflineMessages=p,m.createOrEditChatWebsiteOfflineMessage=function(e,n){o.show({controller:"CreateOrEditOfflineMessageDialogController",controllerAs:"vm",templateUrl:"app/main/apps/chat/views/chatWebsites/edit/offlineMessages/dialog.html",parent:angular.element(r.body),targetEvent:e,clickOutsideToClose:!0,locals:{chatWebsite:m.chatWebsite,offlineMessage:n,offlineMessages:m.chatWebsiteOfflineMessages.rows,license:null,setting:null,crudPermissions:m.crudPermissions}})},m.showOfflineMessageChatWebsiteOfflineMessage=function(e,t){o.show({controller:"ShowOfflineMessageOfflineMessageDialogController",controllerAs:"vm",templateUrl:"app/main/apps/chat/views/chatWebsites/edit/offlineMessages/dialog.html",parent:angular.element(r.body),targetEvent:e,clickOutsideToClose:!0,resolve:{message:["apiResolver","$stateParams",function(e,n){return e.resolve("chatOfflineMessage@get",{fields:"id,body",id:t.id})}]}})},m.exportSelectedChatWebsiteOfflineMessages=function(){var e=angular.copy(m.selectedChatWebsiteOfflineMessages);return m.selectedChatWebsiteOfflineMessages=[],e},m.deleteChatWebsiteOfflineMessage=g,m.deleteSelectedChatWebsiteOfflineMessages=function(e){var n=o.confirm().title("Are you sure want to delete the selected offlineMessages?").htmlContent(""+m.selectedChatWebsiteOfflineMessages.length+" selected will be deleted.").ariaLabel("delete offlineMessages").targetEvent(e).ok("OK").cancel("CANCEL");o.show(n).then(function(){m.selectedChatWebsiteOfflineMessages.forEach(function(e){g(e)}),m.selectedChatWebsiteOfflineMessages=[]})};var v=!0,h=1;n.$watch("vm_dc.query.filter",function(e,n){v?s(function(){v=!1}):(n||(h=m.query.page),e!==n&&(m.query.page=1),e||(m.query.page=h),p())})}e.$inject=["$cookies","$scope","$state","$q","$translate","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.chat").controller("ChatWebsiteOfflineMessagesController",e)}(),function(){"use strict";function e(n,e){this.title="CHAT.OFFLINE_MESSAGE",this.message=e,this.closeDialog=function(e){n.hide(e)}}e.$inject=["$mdDialog","message"],angular.module("app.chat").controller("ShowOfflineMessageOfflineMessageDialogController",e)}(),function(){"use strict";function e(e,n,t,a,i,s,o,r,l,d,c){var m=this;function u(e){m.chatWebsiteProactiveActions=e||{count:0,rows:[]}}function p(){m.query.offset=(m.query.page-1)*m.query.limit,m.promise=d.chatWebsite.getProactiveActions(m.query,u).$promise}function g(e){d.chatProactiveAction.delete({id:e.id}).$promise.then(function(){_.remove(m.chatWebsiteProactiveActions.rows,{id:e.id}),m.chatWebsiteProactiveActions.count-=1,m.chatWebsiteProactiveActions.rows.length||p(),l.success({title:"ChatProactiveAction deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETchatWebsite"}];for(var n=0;n"+(e.name||e.id&&_.upperFirst("chatProactiveAction #")+e.id||"chatProactiveAction")+" will be deleted.").ariaLabel("delete chatProactiveAction").targetEvent(n).ok("OK").cancel("CANCEL");o.show(t).then(function(){g(e)},function(){console.log("CANCEL")})},m.success=u,m.getChatWebsiteProactiveActions=p,m.createOrEditChatWebsiteChatProactiveAction=function(e,n){o.show({controller:"CreateOrEditChatProactiveActionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/chat/views/chatWebsites/edit/proactive/dialog.html",parent:angular.element(r.body),targetEvent:e,clickOutsideToClose:!0,locals:{chatWebsite:m.chatWebsite,chatProactiveAction:n,proactive:m.chatWebsiteProactiveActions.rows,license:null,setting:null,crudPermissions:m.crudPermissions}})},m.exportSelectedChatWebsiteProactiveActions=function(){var e=angular.copy(m.selectedChatWebsiteProactiveActions);return m.selectedChatWebsiteProactiveActions=[],e},m.deleteChatWebsiteChatProactiveAction=g,m.deleteSelectedChatWebsiteProactiveActions=function(e){var n=o.confirm().title("Are you sure want to delete the selected proactive?").htmlContent(""+m.selectedChatWebsiteProactiveActions.length+" selected will be deleted.").ariaLabel("delete proactive").targetEvent(e).ok("OK").cancel("CANCEL");o.show(n).then(function(){m.selectedChatWebsiteProactiveActions.forEach(function(e){g(e)}),m.selectedChatWebsiteProactiveActions=[]})};var v=!0,h=1;n.$watch("vm_dc.query.filter",function(e,n){v?s(function(){v=!1}):(n||(h=m.query.page),e!==n&&(m.query.page=1),e||(m.query.page=h),p())})}e.$inject=["$cookies","$scope","$state","$q","$translate","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.chat").controller("ChatWebsiteProactiveActionsController",e)}(),function(){"use strict";function e(e,n,t,a,i,s,o,r,l,d,c,m,u,p){var g=this;function v(e){a.hide(e)}g.currentUser=c.getCurrentUser(),g.errors=[],g.setting=u,g.license=m,g.crudPermissions=p,g.hasModulePermissions={},g.passwordPattern=g.setting&&g.setting.securePassword?/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/:"",g.title="CHAT.EDIT_CHATPROACTIVEACTION",g.chatProactiveAction=angular.copy(l),g.proactive=r,g.newChatProactiveAction=!1,g.chatProactiveAction||(g.chatProactiveAction={type:"mouseOver"},g.title="CHAT.NEW_CHATPROACTIVEACTION",g.newChatProactiveAction=!0),n.params.id&&(g.chatProactiveAction.ChatWebsiteId=n.params.id),g.addNewChatProactiveAction=function(){g.errors=[],d.chatProactiveAction.save(g.chatProactiveAction).$promise.then(function(e){g.proactive.unshift(e.toJSON()),o.success({title:"ChatProactiveAction properly created",msg:g.chatProactiveAction.name?g.chatProactiveAction.name+" has been created!":""}),v(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){g.errors=e.data.errors||[{message:e.toString(),type:"api.chatProactiveAction.save"}];for(var n=0;n<\/script>',n.end="\n\x3c!-- START Motion Chat Script --\x3e"},n.info={},e.$watch("vm_ac.chatWebsite.remote",function(e){n.script='\n