summaryrefslogtreecommitdiffstats
path: root/admin/survey/modules
diff options
context:
space:
mode:
authorAnton Luka Šijanec <anton@sijanec.eu>2022-01-11 12:35:47 +0100
committerAnton Luka Šijanec <anton@sijanec.eu>2022-01-11 12:35:47 +0100
commit19985dbb8c0aa66dc4bf7905abc1148de909097d (patch)
tree2cd5a5d20d7e80fc2a51adf60d838d8a2c40999e /admin/survey/modules
download1ka-19985dbb8c0aa66dc4bf7905abc1148de909097d.tar
1ka-19985dbb8c0aa66dc4bf7905abc1148de909097d.tar.gz
1ka-19985dbb8c0aa66dc4bf7905abc1148de909097d.tar.bz2
1ka-19985dbb8c0aa66dc4bf7905abc1148de909097d.tar.lz
1ka-19985dbb8c0aa66dc4bf7905abc1148de909097d.tar.xz
1ka-19985dbb8c0aa66dc4bf7905abc1148de909097d.tar.zst
1ka-19985dbb8c0aa66dc4bf7905abc1148de909097d.zip
Diffstat (limited to '')
-rw-r--r--admin/survey/modules/mod_360_1KA/R/360_stopinj_1ka.R970
-rw-r--r--admin/survey/modules/mod_360_1KA/class.Survey3601ka.php258
-rw-r--r--admin/survey/modules/mod_360_1KA/latexkosi/a-glava-1ka.tex105
-rw-r--r--admin/survey/modules/mod_360_1KA/latexkosi/logo/CDI.pngbin0 -> 9623 bytes
-rw-r--r--admin/survey/modules/mod_360_1KA/latexkosi/logo/CDI1.pngbin0 -> 27392 bytes
-rw-r--r--admin/survey/modules/mod_360_1KA/latexkosi/logo/CDI_glava.pngbin0 -> 7557 bytes
-rw-r--r--admin/survey/modules/mod_360_1KA/latexkosi/logo/CDI_naslovnica - Copy.pngbin0 -> 103881 bytes
-rw-r--r--admin/survey/modules/mod_360_1KA/latexkosi/logo/CDI_naslovnica.pngbin0 -> 62604 bytes
-rw-r--r--admin/survey/modules/mod_360_1KA/latexkosi/logo/circle.pngbin0 -> 21379 bytes
-rw-r--r--admin/survey/modules/mod_360_1KA/latexkosi/pojasnilo.tex21
-rw-r--r--admin/survey/modules/mod_360_1KA/latexkosi/sloven2e.sty42
-rw-r--r--admin/survey/modules/mod_360_1KA/latexkosi/tabela.tex11
-rw-r--r--admin/survey/modules/mod_360_1KA/latexkosi/uvod.tex7
-rw-r--r--admin/survey/modules/mod_360_1KA/latexkosi/varstvo_osebnih_podatkov.tex8
-rw-r--r--admin/survey/modules/mod_360_1KA/latexkosi/z-noga.tex1
-rw-r--r--admin/survey/modules/mod_360_1KA/results/.gitignore2
-rw-r--r--admin/survey/modules/mod_MAZA/class.MAZA.php1944
-rw-r--r--admin/survey/modules/mod_MAZA/class.MAZAExport.php325
-rw-r--r--admin/survey/modules/mod_MAZA/css/MAZA.css109
-rw-r--r--admin/survey/modules/mod_MAZA/info MAZA.txt1
-rw-r--r--admin/survey/modules/mod_MAZA/js/MAZA.js731
-rw-r--r--admin/survey/modules/mod_SPEEDINDEX/R/speeder_index.R98
-rw-r--r--admin/survey/modules/mod_SPEEDINDEX/class.SurveySpeedIndex.php204
-rw-r--r--admin/survey/modules/mod_WPN/class.WPN.php184
-rw-r--r--admin/survey/modules/mod_WPN/frontend/_DS_Storebin0 -> 6148 bytes
-rw-r--r--admin/survey/modules/mod_WPN/frontend/android-chrome-192x192.pngbin0 -> 6211 bytes
-rw-r--r--admin/survey/modules/mod_WPN/frontend/android-chrome-512x512.pngbin0 -> 14989 bytes
-rw-r--r--admin/survey/modules/mod_WPN/frontend/apple-splash-1125.pngbin0 -> 91858 bytes
-rw-r--r--admin/survey/modules/mod_WPN/frontend/apple-splash-1242.pngbin0 -> 107859 bytes
-rw-r--r--admin/survey/modules/mod_WPN/frontend/apple-splash-1536.pngbin0 -> 109418 bytes
-rw-r--r--admin/survey/modules/mod_WPN/frontend/apple-splash-1668.pngbin0 -> 129115 bytes
-rw-r--r--admin/survey/modules/mod_WPN/frontend/apple-splash-2048.pngbin0 -> 181771 bytes
-rw-r--r--admin/survey/modules/mod_WPN/frontend/apple-splash-640.pngbin0 -> 38268 bytes
-rw-r--r--admin/survey/modules/mod_WPN/frontend/apple-splash-750.pngbin0 -> 57249 bytes
-rw-r--r--admin/survey/modules/mod_WPN/frontend/apple-touch-icon.pngbin0 -> 6129 bytes
-rw-r--r--admin/survey/modules/mod_WPN/frontend/browserconfig.xml9
-rw-r--r--admin/survey/modules/mod_WPN/frontend/css/main.css509
-rw-r--r--admin/survey/modules/mod_WPN/frontend/css/normalize.min.css1
-rw-r--r--admin/survey/modules/mod_WPN/frontend/css/production.css1
-rw-r--r--admin/survey/modules/mod_WPN/frontend/favicon-16x16.pngbin0 -> 997 bytes
-rw-r--r--admin/survey/modules/mod_WPN/frontend/favicon-32x32.pngbin0 -> 1785 bytes
-rw-r--r--admin/survey/modules/mod_WPN/frontend/favicon.icobin0 -> 15086 bytes
-rw-r--r--admin/survey/modules/mod_WPN/frontend/humans.txt13
-rw-r--r--admin/survey/modules/mod_WPN/frontend/img/1ka_logo_en.pngbin0 -> 28565 bytes
-rw-r--r--admin/survey/modules/mod_WPN/frontend/img/assign.svg1
-rw-r--r--admin/survey/modules/mod_WPN/frontend/img/aths.pngbin0 -> 12051 bytes
-rw-r--r--admin/survey/modules/mod_WPN/frontend/img/connected.svg1
-rw-r--r--admin/survey/modules/mod_WPN/frontend/img/data.svg1
-rw-r--r--admin/survey/modules/mod_WPN/frontend/img/facebook.svg1
-rw-r--r--admin/survey/modules/mod_WPN/frontend/img/googleplay.pngbin0 -> 9230 bytes
-rw-r--r--admin/survey/modules/mod_WPN/frontend/img/ios.pngbin0 -> 13356 bytes
-rw-r--r--admin/survey/modules/mod_WPN/frontend/img/mail.svg1
-rw-r--r--admin/survey/modules/mod_WPN/frontend/img/mentioned.svg1
-rw-r--r--admin/survey/modules/mod_WPN/frontend/img/messaging.svg1
-rw-r--r--admin/survey/modules/mod_WPN/frontend/img/search.svg1
-rw-r--r--admin/survey/modules/mod_WPN/frontend/img/security.svg1
-rw-r--r--admin/survey/modules/mod_WPN/frontend/img/share.pngbin0 -> 4719 bytes
-rw-r--r--admin/survey/modules/mod_WPN/frontend/img/text.svg1
-rw-r--r--admin/survey/modules/mod_WPN/frontend/img/twitter.svg1
-rw-r--r--admin/survey/modules/mod_WPN/frontend/img/vault.svg1
-rw-r--r--admin/survey/modules/mod_WPN/frontend/img/youtube.svg1
-rw-r--r--admin/survey/modules/mod_WPN/frontend/index.html196
-rw-r--r--admin/survey/modules/mod_WPN/frontend/index1.html360
-rw-r--r--admin/survey/modules/mod_WPN/frontend/js/main.js169
-rw-r--r--admin/survey/modules/mod_WPN/frontend/manifest.json21
-rw-r--r--admin/survey/modules/mod_WPN/frontend/mstile-150x150.pngbin0 -> 4751 bytes
-rw-r--r--admin/survey/modules/mod_WPN/frontend/safari-pinned-tab.svg290
-rw-r--r--admin/survey/modules/mod_WPN/frontend/sw.js124
-rw-r--r--admin/survey/modules/mod_WPN/frontend/ui.html104
-rw-r--r--admin/survey/modules/mod_WPN/info WPN.txt5
-rw-r--r--admin/survey/modules/mod_advanced_paradata/class.SurveyAdvancedParadata.php145
-rw-r--r--admin/survey/modules/mod_advanced_paradata/class.SurveyAdvancedParadataExport.php559
-rw-r--r--admin/survey/modules/mod_advanced_paradata/class.SurveyAdvancedParadataLog.php309
-rw-r--r--admin/survey/modules/mod_advanced_paradata/docs/Specifikacija parapodatkov.xml165
-rw-r--r--admin/survey/modules/mod_advanced_paradata/js/advanced_paradata.js556
-rw-r--r--admin/survey/modules/mod_advanced_paradata/js/advanced_paradata_postTime.js20
-rw-r--r--admin/survey/modules/mod_advanced_paradata/js/sledenjeOpozoril.js264
-rw-r--r--admin/survey/modules/mod_chat/class.SurveyChat.php82
-rw-r--r--admin/survey/modules/mod_fieldwork/class.SurveyFieldwork.php126
-rw-r--r--admin/survey/modules/mod_geoIP/class.SurveyGeoIP.php276
-rw-r--r--admin/survey/modules/mod_hierarhija/class/Ajax/AjaxHierarhijaClass.php561
-rw-r--r--admin/survey/modules/mod_hierarhija/class/Ajax/AjaxHierarhijaDostopUporabnikovClass.php243
-rw-r--r--admin/survey/modules/mod_hierarhija/class/Ajax/AjaxSuperSifraClass.php69
-rw-r--r--admin/survey/modules/mod_hierarhija/class/Ajax/AjaxUporabnikiClass.php834
-rw-r--r--admin/survey/modules/mod_hierarhija/class/HierarhijaAjaxClass.php1063
-rw-r--r--admin/survey/modules/mod_hierarhija/class/HierarhijaAnalysisClass.php2617
-rw-r--r--admin/survey/modules/mod_hierarhija/class/HierarhijaClass.php2261
-rw-r--r--admin/survey/modules/mod_hierarhija/class/HierarhijaHelper.php340
-rw-r--r--admin/survey/modules/mod_hierarhija/class/HierarhijaIzvoz.php344
-rw-r--r--admin/survey/modules/mod_hierarhija/class/HierarhijaIzvozAnalize.php470
-rw-r--r--admin/survey/modules/mod_hierarhija/class/HierarhijaKopiranjeClass.php418
-rw-r--r--admin/survey/modules/mod_hierarhija/class/HierarhijaPorocilaClass.php321
-rw-r--r--admin/survey/modules/mod_hierarhija/css/mod_hierarhija.css755
-rw-r--r--admin/survey/modules/mod_hierarhija/css/vendor/datatables.min.css21
-rw-r--r--admin/survey/modules/mod_hierarhija/css/vendor/jstree/default-dark/32px.pngbin0 -> 1562 bytes
-rw-r--r--admin/survey/modules/mod_hierarhija/css/vendor/jstree/default-dark/40px.pngbin0 -> 5717 bytes
-rw-r--r--admin/survey/modules/mod_hierarhija/css/vendor/jstree/default-dark/style.css1075
-rw-r--r--admin/survey/modules/mod_hierarhija/css/vendor/jstree/default-dark/style.min.css1
-rw-r--r--admin/survey/modules/mod_hierarhija/css/vendor/jstree/default-dark/throbber.gifbin0 -> 1720 bytes
-rw-r--r--admin/survey/modules/mod_hierarhija/css/vendor/jstree/default/32px.pngbin0 -> 3121 bytes
-rw-r--r--admin/survey/modules/mod_hierarhija/css/vendor/jstree/default/40px.pngbin0 -> 1880 bytes
-rw-r--r--admin/survey/modules/mod_hierarhija/css/vendor/jstree/default/style.css1031
-rw-r--r--admin/survey/modules/mod_hierarhija/css/vendor/jstree/default/style.min.css1
-rw-r--r--admin/survey/modules/mod_hierarhija/css/vendor/jstree/default/throbber.gifbin0 -> 1720 bytes
-rw-r--r--admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/30px.pngbin0 -> 6423 bytes
-rw-r--r--admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/32px.pngbin0 -> 3333 bytes
-rw-r--r--admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/fonts/titillium/titilliumweb-bold-webfont.eotbin0 -> 24108 bytes
-rw-r--r--admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/fonts/titillium/titilliumweb-bold-webfont.svg2377
-rw-r--r--admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/fonts/titillium/titilliumweb-bold-webfont.ttfbin0 -> 49936 bytes
-rw-r--r--admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/fonts/titillium/titilliumweb-bold-webfont.woffbin0 -> 27344 bytes
-rw-r--r--admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/fonts/titillium/titilliumweb-extralight-webfont.eotbin0 -> 24056 bytes
-rw-r--r--admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/fonts/titillium/titilliumweb-extralight-webfont.svg2410
-rw-r--r--admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/fonts/titillium/titilliumweb-extralight-webfont.ttfbin0 -> 50224 bytes
-rw-r--r--admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/fonts/titillium/titilliumweb-extralight-webfont.woffbin0 -> 27108 bytes
-rw-r--r--admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/fonts/titillium/titilliumweb-regular-webfont.eotbin0 -> 25059 bytes
-rw-r--r--admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/fonts/titillium/titilliumweb-regular-webfont.svg2725
-rw-r--r--admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/fonts/titillium/titilliumweb-regular-webfont.ttfbin0 -> 50788 bytes
-rw-r--r--admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/fonts/titillium/titilliumweb-regular-webfont.woffbin0 -> 28152 bytes
-rw-r--r--admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/style.css1122
-rw-r--r--admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/style.min.css1
-rw-r--r--admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/throbber.gifbin0 -> 1720 bytes
-rw-r--r--admin/survey/modules/mod_hierarhija/css/vendor/select2.min.css1
-rw-r--r--admin/survey/modules/mod_hierarhija/db_hirarhija_create.sql190
-rw-r--r--admin/survey/modules/mod_hierarhija/img/sort_asc.pngbin0 -> 160 bytes
-rw-r--r--admin/survey/modules/mod_hierarhija/img/sort_asc_disabled.pngbin0 -> 148 bytes
-rw-r--r--admin/survey/modules/mod_hierarhija/img/sort_both.pngbin0 -> 201 bytes
-rw-r--r--admin/survey/modules/mod_hierarhija/img/sort_desc.pngbin0 -> 158 bytes
-rw-r--r--admin/survey/modules/mod_hierarhija/img/sort_desc_disabled.pngbin0 -> 146 bytes
-rw-r--r--admin/survey/modules/mod_hierarhija/index.php5
-rw-r--r--admin/survey/modules/mod_hierarhija/js/vendor/custom-vue.js1545
-rw-r--r--admin/survey/modules/mod_hierarhija/js/vendor/custom.js832
-rw-r--r--admin/survey/modules/mod_hierarhija/js/vendor/datatables-slovenian.json23
-rw-r--r--admin/survey/modules/mod_hierarhija/js/vendor/datatables.min.js237
-rw-r--r--admin/survey/modules/mod_hierarhija/js/vendor/hierarhija_analize.js363
-rw-r--r--admin/survey/modules/mod_hierarhija/js/vendor/jquery.nicefileinput.min.js1
-rw-r--r--admin/survey/modules/mod_hierarhija/js/vendor/jstree.min.js6
-rw-r--r--admin/survey/modules/mod_hierarhija/js/vendor/onload.js16
-rw-r--r--admin/survey/modules/mod_hierarhija/js/vendor/select2.min.js3
-rw-r--r--admin/survey/modules/mod_hierarhija/js/vendor/status.js137
-rw-r--r--admin/survey/modules/mod_hierarhija/js/vendor/vue-resource.min.js7
-rw-r--r--admin/survey/modules/mod_hierarhija/js/vendor/vue.min.js9
-rw-r--r--admin/survey/modules/mod_hierarhija/model/HierarhijaOnlyQuery.php328
-rw-r--r--admin/survey/modules/mod_hierarhija/model/HierarhijaQuery.php981
-rw-r--r--admin/survey/modules/mod_hierarhija/porocila/R/Anketiranci.docxbin0 -> 18072 bytes
-rw-r--r--admin/survey/modules/mod_hierarhija/porocila/R/Hierarhija_1ka.R358
-rw-r--r--admin/survey/modules/mod_hierarhija/porocila/R/Hierarhija_1ka_pdf.R315
-rw-r--r--admin/survey/modules/mod_hierarhija/porocila/R/Hierarhija_1ka_streznik.R348
-rw-r--r--admin/survey/modules/mod_hierarhija/porocila/R/test.tex1
-rw-r--r--admin/survey/modules/mod_hierarhija/porocila/R/test_1ka.R19
-rw-r--r--admin/survey/modules/mod_hierarhija/porocila/R/test_1ka_pdf.R17
-rw-r--r--admin/survey/modules/mod_hierarhija/porocila/latexkosi/samoevalvacija_glava.tex91
-rw-r--r--admin/survey/modules/mod_hierarhija/porocila/latexkosi/samoevalvacija_noga.tex1
-rw-r--r--admin/survey/modules/mod_hierarhija/porocila/results/.gitignore3
-rw-r--r--admin/survey/modules/mod_hierarhija/porocila/results/slike/.gitignore2
-rw-r--r--admin/survey/modules/mod_hierarhija/porocila/temp/.gitignore2
-rw-r--r--admin/survey/modules/mod_json_survey_export/class.SurveyJsonSurveyData.php642
-rw-r--r--admin/survey/modules/mod_json_survey_export/docs/Demo izvoza Test 1, r1-NB.json374
-rw-r--r--admin/survey/modules/mod_json_survey_export/docs/Specifikacija izvoza, r1-NB.docxbin0 -> 38741 bytes
-rw-r--r--admin/survey/modules/mod_kakovost/R/calc.usability.R72
-rw-r--r--admin/survey/modules/mod_kakovost/R/gen.survey.str.R71
-rw-r--r--admin/survey/modules/mod_kakovost/R/gen.usability.matrix.R181
-rw-r--r--admin/survey/modules/mod_kakovost/R/kakovost.R47
-rw-r--r--admin/survey/modules/mod_kakovost/class.SurveyKakovost.php906
-rw-r--r--admin/survey/modules/mod_panel/class.SurveyPanel.php168
-rw-r--r--admin/survey/modules/mod_quiz/class.SurveyQuiz.php106
-rw-r--r--admin/survey/modules/mod_slideshow/class.SurveySlideshow.php248
-rw-r--r--admin/survey/modules/mod_uporabnost/R/calc.usability.R72
-rw-r--r--admin/survey/modules/mod_uporabnost/R/gen.survey.str.R71
-rw-r--r--admin/survey/modules/mod_uporabnost/R/gen.usability.matrix.R181
-rw-r--r--admin/survey/modules/mod_uporabnost/R/uporabnost.R47
-rw-r--r--admin/survey/modules/mod_uporabnost/class.SurveyUporabnost.php1023
-rw-r--r--admin/survey/modules/mod_uporabnost/results/.gitignore2
-rw-r--r--admin/survey/modules/mod_uporabnost/temp/.gitignore2
-rw-r--r--admin/survey/modules/mod_vizualizacija/R/app/rsconnect/shinyapps.io/1kadsa/vizual.dcf10
-rw-r--r--admin/survey/modules/mod_vizualizacija/R/app/vizual.R58
-rw-r--r--admin/survey/modules/mod_vizualizacija/class.SurveyVizualizacija.php211
-rw-r--r--admin/survey/modules/mod_voting/class.SurveyVoting.php71
177 files changed, 40802 insertions, 0 deletions
diff --git a/admin/survey/modules/mod_360_1KA/R/360_stopinj_1ka.R b/admin/survey/modules/mod_360_1KA/R/360_stopinj_1ka.R
new file mode 100644
index 0000000..16b3416
--- /dev/null
+++ b/admin/survey/modules/mod_360_1KA/R/360_stopinj_1ka.R
@@ -0,0 +1,970 @@
+#Sys.setlocale(category = "LC_ALL", locale = "slovenian")
+#Sys.setlocale('LC_CTYPE', 'pl_PL.UTF-8')
+Sys.setlocale(category = "LC_CTYPE", locale = "Slovenian")
+# Potrebne knjinjice
+libraries <- c('tools', 'psych', 'Hmisc', 'reports',
+ 'fmsb','car','Cairo','openxlsx','sqldf','data.table',
+ 'gridExtra','ggplot2','Rcpp','grid','scales')
+lapply(libraries, FUN = function(y) {
+ do.call('require', list(y))})
+
+library(scales)
+# //Potrebne knjinjice// #
+
+# Ustvarimo mape, kamor bomo shranjevali poroilo in pdf grafov
+dir.create('modules/mod_360_1KA/results', showWarnings=FALSE)
+dir.create('modules/mod_360_1KA/results/slike', showWarnings=FALSE)
+
+
+
+# Uvoz podatkov
+podatki <- read.csv2("modules/mod_360_1KA/temp/test.csv",sep=";", header=T, fill=T, stringsAsFactors=FALSE,encoding='UTF-8')
+if (podatki[1,1]==("Ustreznost") | podatki[1,1]==("Relevance")) {podatki <- podatki[2:nrow(podatki),]}
+# Izberemo le veljavne enote (status=6)
+podatki <- subset(podatki, status==6)
+
+
+# Ker bomo raunalni povpreja iz baze odstranimo tudi vse manjkajole vrednosti
+junk <- c("-1","-2", "-3", "-4", "-5")
+# Izberemo vse stolpce, ki se zanejo na rko Q
+sel <- grepl("Q",names(podatki))
+podatki[sel] <- lapply(podatki[sel], function(x) replace(x,x %in% junk, NA))
+podatki <- subset(podatki, !(is.na(Q1)))
+
+
+# Povpreja ocen agregirana glede na razmerje (nadrejeni, podrejeni, samoocenjevalec, sodelavec)
+# Uporabimo v grafih posameznih kompetenc
+razmerjeMean_Q2 <- sqldf("
+ select
+ Q1
+ ,round(avg(Q2a),1) as Q2a
+ ,round(avg(Q2b),1) as Q2b
+ ,round(avg(Q2c),1) as Q2c
+ ,round(avg(Q2d),1) as Q2d
+ ,round(avg(Q2e),1) as Q2e
+ ,round(avg(Q2f),1) as Q2f
+ from podatki
+ group by
+ Q1
+ ")
+
+razmerjeMean_Q3 <- sqldf("
+ select
+ round(avg(Q3a),1) as Q3a
+ ,round(avg(Q3b),1) as Q3b
+ ,round(avg(Q3c),1) as Q3c
+ ,round(avg(Q3d),1) as Q3d
+ ,round(avg(Q3e),1) as Q3e
+ ,round(avg(Q3f),1) as Q3f
+ ,round(avg(Q3g),1) as Q3g
+ ,round(avg(Q3h),1) as Q3h
+ ,round(avg(Q3i),1) as Q3i
+ from podatki
+ group by
+ Q1
+ ")
+
+razmerjeMean_Q4 <- sqldf("
+ select
+ round(avg(Q4a),1) as Q4a
+ ,round(avg(Q4b),1) as Q4b
+ ,round(avg(Q4c),1) as Q4c
+ ,round(avg(Q4d),1) as Q4d
+ ,round(avg(Q4e),1) as Q4e
+ ,round(avg(Q4f),1) as Q4f
+ from podatki
+ group by
+ Q1
+ ")
+
+razmerjeMean_Q5 <- sqldf("
+ select
+ round(avg(Q5a),1) as Q5a
+ ,round(avg(Q5b),1) as Q5b
+ ,round(avg(Q5c),1) as Q5c
+ ,round(avg(Q5d),1) as Q5d
+ ,round(avg(Q5e),1) as Q5e
+ ,round(avg(Q5f),1) as Q5f
+ ,round(avg(Q5g),1) as Q5g
+ from podatki
+ group by
+ Q1
+ ")
+
+razmerjeMean_Q6 <- sqldf("
+ select
+ round(avg(Q6a),1) as Q6a
+ ,round(avg(Q6b),1) as Q6b
+ ,round(avg(Q6c),1) as Q6c
+ ,round(avg(Q6d),1) as Q6d
+ ,round(avg(Q6e),1) as Q6e
+ ,round(avg(Q6f),1) as Q6f
+ from podatki
+ group by
+ Q1
+ ")
+
+razmerjeMean <- cbind(razmerjeMean_Q2,razmerjeMean_Q3,razmerjeMean_Q4,razmerjeMean_Q5,razmerjeMean_Q6)
+razmerjeMean <- as.data.frame(lapply(razmerjeMean, as.numeric))
+
+povprecja.razmerij <- razmerjeMean
+#Izraun skupnih povpreij posameznih komponent
+povprecja.razmerij$Q2_komuniciranje <- round(rowMeans(razmerjeMean[grepl("Q2",names(razmerjeMean))],na.rm=T),1)
+povprecja.razmerij$Q3_odlocanje <- round(rowMeans(razmerjeMean[grepl("Q3",names(razmerjeMean))],na.rm=T),1)
+povprecja.razmerij$Q4_vodenje_ravnanje <-round(rowMeans(razmerjeMean[grepl("Q4",names(razmerjeMean))],na.rm=T),1)
+povprecja.razmerij$Q5_vodenje_projektov <- round(rowMeans(razmerjeMean[grepl("Q5",names(razmerjeMean))],na.rm=T),1)
+povprecja.razmerij$Q6_medosebne_vescine <- round(rowMeans(razmerjeMean[grepl("Q6",names(razmerjeMean))],na.rm=T),1)
+
+
+# Povpreja posameznih kompetence glede na razmerje do ocenjevane osebe
+# Skupna povpreja po stolpcih za GRAFE
+# Prikaemo posamezne barplote povprene ocene glede na razmerje
+Q2_komuniciranje <- round(colMeans(razmerjeMean[grepl("Q2",names(razmerjeMean))],na.rm=T),1)
+Q3_odlocanje <- round(colMeans(razmerjeMean[grepl("Q3",names(razmerjeMean))],na.rm=T),1)
+Q4_vodenje_ravnanje <- round(colMeans(razmerjeMean[grepl("Q4",names(razmerjeMean))],na.rm=T),1)
+Q5_vodenje_projektov <- round(colMeans(razmerjeMean[grepl("Q5",names(razmerjeMean))],na.rm=T),1)
+Q6_medosebne_vescine <- round(colMeans(razmerjeMean[grepl("Q6",names(razmerjeMean))],na.rm=T),1)
+## Povpreja kompetenc glede na razmerje do ocenjevane osebe// ##
+
+
+#Skupna povpreja po stolpcih za posamezne TABELE # Skupne ocene
+osnovni.podatki <- podatki
+osnovni.podatki <- as.data.frame(suppressWarnings(lapply(osnovni.podatki, as.numeric)))
+Q2_komuniciranje.skupaj <- round(colMeans(osnovni.podatki[grepl("Q2",names(osnovni.podatki))],na.rm=T),1)
+Q3_odlocanje.skupaj <- round(colMeans(osnovni.podatki[grepl("Q3",names(osnovni.podatki))],na.rm=T),1)
+Q4_vodenje_ravnanje.skupaj <- round(colMeans(osnovni.podatki[grepl("Q4",names(osnovni.podatki))],na.rm=T),1)
+Q5_vodenje_projektov.skupaj <- round(colMeans(osnovni.podatki[grepl("Q5",names(osnovni.podatki))],na.rm=T),1)
+Q6_medosebne_vescine.skupaj <- round(colMeans(osnovni.podatki[grepl("Q6",names(osnovni.podatki))],na.rm=T),1)
+
+# //TABELE # Skupne ocene// #
+
+
+# pretvorba imen stolpcev in vrstic tabel za latex znake
+toLatex <- function(tabela) {
+ if (!is.null(colnames(tabela))) {
+ colnames(tabela) <- Hmisc::latexTranslate(colnames(tabela))
+ }
+ if (!is.null(rownames(tabela))) {
+ rownames(tabela) <- Hmisc::latexTranslate(rownames(tabela))
+ }
+ return(tabela)
+}
+##
+
+##############################
+## Opisne statistike za tabele
+##############################
+# N oz. tevilo odgovorov
+predN <- apply(osnovni.podatki[c(grepl("Q",names(osnovni.podatki)))],2, FUN=function(x) sum(!is.na(x)))
+names(predN) <- paste0(names(predN),"_N")
+#SD
+predSd <- apply(osnovni.podatki[c(grepl("Q",names(osnovni.podatki)))], 2, FUN=sd, na.rm=TRUE)
+names(predSd) <- paste0(names(predSd),"_sd")
+predSd <- round(predSd,1)
+#MIN
+predMin <- apply(osnovni.podatki[c(grepl("Q",names(osnovni.podatki)))], 2, FUN=min, na.rm=TRUE)
+names(predMin) <- paste0(names(predMin),"_max")
+predMin[predMin==Inf] <- NA
+#MAX
+predMax <- apply(osnovni.podatki[c(grepl("Q",names(osnovni.podatki)))],2, FUN=max, na.rm=TRUE)
+names(predMax) <- paste0(names(predMax),"_max")
+predMax[predMax==Inf] <- NA
+## //Opisne statistike za tabele// ##
+
+
+###########################
+#### making latex file ####
+###########################
+## LATEX TABLE 1: Q2 KOMUNICIRANJE
+mean.Q2_komuniciranje.skupaj <- round(mean(Q2_komuniciranje.skupaj),1)
+
+tabela.Q2 <- cbind.data.frame(
+ N = as.numeric(predN[grepl("Q2",names(predN))]),
+ mean = Q2_komuniciranje.skupaj,
+ sd = as.numeric(predSd[grepl("Q2",names(predSd))]),
+ min = as.numeric(predMin[grepl("Q2",names(predMin))]),
+ max = as.numeric(predMax[grepl("Q2",names(predMax))]))
+# e je NA naj se v tabeli prikae "."
+tabela.Q2[is.na(tabela.Q2)] <- "."
+# Dodamo skupno povpreje komponent
+tabela.Q2 <- rbind(tabela.Q2, c('',mean.Q2_komuniciranje.skupaj,'','',''))
+
+# Dodamo imena vrstic, ki bodo imena anketnih vpraanj
+namesQ2_komuniciranje <- c("Sposobnost besednega izraanja pri predstavitvi ideje.",
+ "Sposobnost pravoasnega in tonega poroanja.",
+ "Sposobnost informiranja drugih.",
+ "Sposobnost spodbujanja in uporabe odkrite komunikacije.",
+ "Sposobnost podajanja tonih in usklajenih informacij ali navodil.",
+ "Sposobnost uporabe primernih komunikacijskih orodij.")
+
+rownames(tabela.Q2) <- c(Hmisc::latexTranslate(paste0("\\hline\n",namesQ2_komuniciranje)), "\\hline\n\\textbf{Skupaj}")
+# Imena stolpcev
+colnames(tabela.Q2) <- c("\\textbf{n}","\\textbf{povpreje}","\\textbf{std. odklon}","\\textbf{min}","\\textbf{max}")
+
+# Latex tabela
+tabelatex1 <- capture.output(Hmisc::latex(toLatex(tabela.Q2),
+ caption="Povpreje komponent ",
+ rowlabel='\\textbf{Kompetence komuniciranja}',
+ file='',
+ where='H',
+ col.just=rep_len('|c', ncol(tabela.Q2)),
+ rowlabel.just='m{8cm}'))
+
+## //LATEX TABLE 1: Q2 KOMUNICIRANJE// ##
+
+
+####################################################
+## LATEX TABLE 2: Q3 Sposobnost odloanja in presoje
+####################################################
+# Izraunamo skupno povpreje
+mean.Q3_odlocanje.skupaj <- round(mean(Q3_odlocanje.skupaj),1)
+
+tabela.Q3 <- cbind.data.frame(
+ N = as.numeric(predN[grepl("Q3",names(predN))]),
+ mean = Q3_odlocanje.skupaj,
+ sd = as.numeric(predSd[grepl("Q3",names(predSd))]),
+ min = as.numeric(predMin[grepl("Q3",names(predMin))]),
+ max = as.numeric(predMax[grepl("Q3",names(predMax))]))
+
+# e je NA naj se v tabeli prikae "."
+tabela.Q3[is.na(tabela.Q3)] <- "."
+# Dodamo skupno povpreje komponent
+tabela.Q3 <- rbind(tabela.Q3, c('',mean.Q3_odlocanje.skupaj,'','',''))
+
+# Dodamo imena vrstic, ki bodo imena anketnih vpraanj
+namesQ3_sposobnost <- c("Sposobnost dobrih in pravoasnih odloitev.",
+ "Sposobnost samozavestnega in suverenega odloanja.",
+ "Sposobnost uporabe sistematinega in analitinega pristopa.",
+ "Sposobnost sprejemanja dobrih odloitev tudi pod pritiskom.",
+ "Sposobnost mediacije in iskanja konsenza med vpletenimi v konfliktu. ",
+ "Sposobnost sprejemanja odloitev in ukrepov v tekih situacijah.",
+ "Sposobnost prevzemanja odgovornosti za svoje odloitve.",
+ "Sposobnost uporabe preteklih izkuenj.",
+ "Sposobnost irokega razmiljanja.")
+
+rownames(tabela.Q3) <- c(Hmisc::latexTranslate(paste0("\\hline\n",namesQ3_sposobnost)), "\\hline\n\\textbf{Skupaj}")
+# Imena stolpcev
+colnames(tabela.Q3) <- c("\\textbf{n}","\\textbf{povpreje}","\\textbf{std. odklon}","\\textbf{min}","\\textbf{max}")
+
+# Latex tabela
+tabelatex2 <- capture.output(Hmisc::latex(toLatex(tabela.Q3),
+ caption="Povpreje komponent ",
+ rowlabel='\\textbf{Kompetence sposobnosti odloanja in presoje}',
+ file='',
+ where='H',
+ col.just=rep_len('|c', ncol(tabela.Q3)),
+ rowlabel.just='m{8cm}'))
+
+## //LATEX TABLE 2: Q3 Sposobnost odloanja in presoje// ##
+
+
+
+
+#################################################
+## LATEX TABLE 3: Q4 Vodenje in ravnanje z ljudmi
+#################################################
+# Izraunamo e skupna povpreja
+mean.Q4_vodenje_ravnanje.skupaj <- round(mean(Q4_vodenje_ravnanje.skupaj),1)
+
+tabela.Q4 <- cbind.data.frame(
+ N = as.numeric(predN[grepl("Q4",names(predN))]),
+ mean = Q4_vodenje_ravnanje.skupaj,
+ sd = as.numeric(predSd[grepl("Q4",names(predSd))]),
+ min = as.numeric(predMin[grepl("Q4",names(predMin))]),
+ max = as.numeric(predMax[grepl("Q4",names(predMax))]))
+
+# e je NA naj se v tabeli prikae "."
+tabela.Q4[is.na(tabela.Q4)] <- "."
+# Dodamo skupno povpreje komponent
+tabela.Q4 <- rbind(tabela.Q4, c('',mean.Q4_vodenje_ravnanje.skupaj,'','',''))
+
+# Dodamo imena vrstic, ki bodo imena anketnih vpraanj
+namesQ4_vodenje <- c("Sposobnost spodbujanja in motiviranja zaposlenih.",
+ "Sposobnost definiranja nalog in odgovornost.",
+ "Sposobnost modrega in uinkovitega delegiranja.",
+ "Sposobnost vzdrevanja dobrega, zabavnega in stimulativnega delovnega okolja.",
+ "Sposobnost nagrajevanja posaminih in skupinskih dosekov in dela.",
+ "Sposobnost razvijanja sodelovanja na vseh ravneh.")
+
+rownames(tabela.Q4) <- c(Hmisc::latexTranslate(paste0("\\hline\n",namesQ4_vodenje)), "\\hline\n\\textbf{Skupaj}")
+# Imena stolpcev
+colnames(tabela.Q4) <- c("\\textbf{n}","\\textbf{povpreje}","\\textbf{std. odklon}","\\textbf{min}","\\textbf{max}")
+
+# Latex tabela
+tabelatex3 <- capture.output(Hmisc::latex(toLatex(tabela.Q4),
+ caption="Povpreje komponent ",
+ rowlabel='\\textbf{Kompetence vodenja in ravnanja z ljudmi}',
+ file='',
+ where='H',
+ col.just=rep_len('|c', ncol(tabela.Q4)),
+ rowlabel.just='m{8cm}'))
+
+## //LATEX TABLE 3: Q4 Vodenje in ravnanje z ljudmi// ##
+
+
+
+
+#################################################
+## LATEX TABLE 4: Q5 Vodenje projektov
+#################################################
+# Izraunamo e skupna povpreja
+mean.Q5_vodenje_projektov.skupaj <- round(mean(Q5_vodenje_projektov.skupaj),1)
+
+tabela.Q5 <- cbind.data.frame(
+ N = as.numeric(predN[grepl("Q5",names(predN))]),
+ mean = Q5_vodenje_projektov.skupaj,
+ sd = as.numeric(predSd[grepl("Q5",names(predSd))]),
+ min = as.numeric(predMin[grepl("Q5",names(predMin))]),
+ max = as.numeric(predMax[grepl("Q5",names(predMax))]))
+
+# e je NA naj se v tabeli prikae "."
+tabela.Q5[is.na(tabela.Q5)] <- "."
+# Dodamo skupno povpreje komponent
+tabela.Q5 <- rbind(tabela.Q5, c('',mean.Q5_vodenje_projektov.skupaj,'','',''))
+
+# Dodamo imena vrstic, ki bodo imena anketnih vpraanj
+namesQ5_vodenje_projektov <- c("Sposobnost postavljanja jasnih in merljivih ciljev in mejnikov.",
+ "Sposobnost sistematizacije dela in procesov.",
+ "Sposobnost opredeljevanja vloge in pristojnosti ter odgovornosti.",
+ "Sposobnost definiranja potrebnih virov.",
+ "Sposobnost koordinacije procesov v celotni organizaciji.",
+ "Sposobnost spremljanja projektov in doloanja korektivnih akcij.",
+ "Sposobnost vodenja ve projektov hkrati.")
+
+rownames(tabela.Q5) <- c(Hmisc::latexTranslate(paste0("\\hline\n",namesQ5_vodenje_projektov)), "\\hline\n\\textbf{Skupaj}")
+# Imena stolpcev
+colnames(tabela.Q5) <- c("\\textbf{n}","\\textbf{povpreje}","\\textbf{std. odklon}","\\textbf{min}","\\textbf{max}")
+
+# Latex tabela
+tabelatex4 <- capture.output(Hmisc::latex(toLatex(tabela.Q5),
+ caption="Povpreje komponent ",
+ rowlabel='\\textbf{Kompetence vodenja projektov}',
+ file='',
+ where='H',
+ col.just=rep_len('|c', ncol(tabela.Q5)),
+ rowlabel.just='m{8cm}'))
+
+## //LATEX TABLE 4: Q5 Vodenje projektov// ##
+
+
+
+
+#################################################
+## LATEX TABLE 5: Q6 Medosebne veine
+#################################################
+# Izraunamo e skupna povpreja
+mean.Q6_medosebne_vescine.skupaj <- round(mean(Q6_medosebne_vescine.skupaj),1)
+
+tabela.Q6 <- cbind.data.frame(
+ N = as.numeric(predN[grepl("Q6",names(predN))]),
+ mean = Q6_medosebne_vescine.skupaj,
+ sd = as.numeric(predSd[grepl("Q6",names(predSd))]),
+ min = as.numeric(predMin[grepl("Q6",names(predMin))]),
+ max = as.numeric(predMax[grepl("Q6",names(predMax))]))
+
+# e je NA naj se v tabeli prikae "."
+tabela.Q6[is.na(tabela.Q6)] <- "."
+# Dodamo skupno povpreje komponent
+tabela.Q6 <- rbind(tabela.Q6, c('',mean.Q6_medosebne_vescine.skupaj,'','',''))
+
+# Dodamo imena vrstic, ki bodo imena anketnih vpraanj
+namesQ6_vescine <- c("Sposobnost reevanja konfliktov.",
+ "Sposobnost posluanja.",
+ "Sposobnost podajanja povratnih informacij in konstruktivne kritike.",
+ "Sposobnost grajenja neformalnih odnosov za doseganje ciljev.",
+ "Sposobnost prilagodljivosti in odprte glave.",
+ "Sposobnost pogajanja.")
+
+rownames(tabela.Q6) <- c(Hmisc::latexTranslate(paste0("\\hline\n",namesQ6_vescine)),"\\hline\n\\textbf{Skupaj}")
+# Imena stolpcev
+colnames(tabela.Q6) <- c("\\textbf{n}","\\textbf{povpreje}","\\textbf{std. odklon}","\\textbf{min}","\\textbf{max}")
+
+# Latex tabela
+tabelatex5 <- capture.output(Hmisc::latex(toLatex(tabela.Q6),
+ caption="Povpreje komponent",
+ rowlabel='\\textbf{Medosebne veine}',
+ file='',
+ where='H',
+ col.just=rep_len('|c', ncol(tabela.Q6)),
+ rowlabel.just='m{8cm}'))
+
+## //LATEX TABLE 5: Q6 Medosebne veine// ##
+
+
+
+#########
+#BARPLOT
+#########
+# Rangiranje kompetenc
+
+tabela.cont <- cbind.data.frame(
+ a = povprecja.razmerij$Q2_komuniciranje,
+ b = povprecja.razmerij$Q3_odlocanje,
+ c = povprecja.razmerij$Q4_vodenje_ravnanje,
+ d = povprecja.razmerij$Q5_vodenje_projektov,
+ e = povprecja.razmerij$Q6_medosebne_vescine)
+
+
+tabela.cont1 <- t(tabela.cont)
+tabela.cont2 <- rowMeans(tabela.cont1)
+tabela.cont1.means <- colMeans(tabela.cont1)
+
+tabela.cont <- rbind(tabela.cont1, tabela.cont1.means)
+tabela.cont2 <- rowMeans(tabela.cont)
+tabela.cont <- cbind(tabela.cont,tabela.cont2)
+tabela.cont <- round(tabela.cont, 1)
+
+tabela.odstopanje.max <- apply(tabela.cont, 1, max)
+tabela.odstopanje.min <- apply(tabela.cont, 1, min)
+tabela.odstop.skupaj <- tabela.odstopanje.max - tabela.odstopanje.min
+tabela.cont <- cbind(tabela.cont, round(tabela.odstop.skupaj,1))
+rownames(tabela.cont) <- c("Komuniciranje","Sposobnost odloanja","Vodenje in ravnanje",
+ "Vodenje projektov","Medosebne veine",'\\hline\n\\textbf{Povpreje}')
+colnames(tabela.cont) <- c('Nadrejeni', 'Podrejeni', 'Sodelavec', 'Samoocenjevalec',"\\textbf{Skupaj}","\\textbf{Odstopanje}")
+
+# Latex tabele
+tabela.contR.tex <- capture.output(Hmisc::latex(toLatex(tabela.cont),
+ caption="Rangirane kompetence glede na povpreje rezultatov",
+ rowlabel='Kompetenca',
+ file='',
+ where='H',
+ col.just=c("|c","|c","|c","|c|","|c","|c"),
+ rowlabel.just='m{5cm}'))
+
+
+## TABELA ZA <- Rangiranje kompetenc ##
+tabela.matrix <- cbind.data.frame(
+ a = povprecja.razmerij$Q2_komuniciranje,
+ b = povprecja.razmerij$Q3_odlocanje,
+ c = povprecja.razmerij$Q4_vodenje_ravnanje,
+ d = povprecja.razmerij$Q5_vodenje_projektov,
+ e = povprecja.razmerij$Q6_medosebne_vescine)
+
+tabela.matrix<-t(tabela.matrix)
+rownames(tabela.cont) <- c("Komuniciranje","Sposobnost odloanja","Vodenje in ravnanje",
+ "Vodenje projektov","Medosebne veine",'\\hline\n\\textbf{Povpreje}')
+colnames(tabela.matrix) <- c('Nadrejeni', 'Podrejeni', 'Enak nivo', 'Samoocenjevalec')
+tabela.matrix <- round(tabela.matrix, 1)
+
+## GRAF ##
+# BARPLOT RANGIRANIH KOMPETENC
+df <- as.data.frame(tabela.matrix)
+rownames(df) <- c("Komuniciranje", "Sposobnost odlocanja", "Vodenje in ravnanje", "Vodenje projektov", "Medosebne vescine")
+df$name <- rownames(df)
+
+# Data.table
+df2 <- melt(setDT(df), id="name")
+df2[, difference := max(value) - min(value), by = name]
+
+
+
+pdf(paste('modules/mod_360_1KA/results/slike/rangiranje_kompetenc.pdf', sep=''), family='sans', pointsize=11, width=8, height=7,encoding = 'CP1250')
+
+
+
+# GGplot
+p <- ggplot(df2, aes(x=name, y=value, fill=variable)) +
+ theme_bw()+
+ geom_bar(stat="identity",width=0.8, position="dodge") +
+ geom_line(aes(x=name, y=difference, group=1), size=1.5, color="red") +
+ scale_x_discrete(expand = c(0,0)) +
+ scale_y_continuous(expand = c(0,0), limits = c(0,5)) +
+ theme(legend.position = "bottom", axis.text.x = element_text(angle = 20,vjust = 0.3)) +
+ scale_fill_manual(values = c("#d99694", "#c00000", "#632523","#7F7F7F")) +
+ geom_text(aes(x = name, y = 0.15, label = round(value, 2), fill = variable),
+ angle = 90, position = position_dodge(width = 0.7), size = 5)
+
+# Odstranimo e imena x in y osi ter naslov legende
+p + labs(x="",y="")+ guides(fill=guide_legend(title=NULL))
+
+dev.off()
+
+tex.graf <- c(paste0(
+ "\\begin{figure}[H]",
+ "\\caption{Razlike med ocenjevalci za povpreno oceno na \\textbf{vseh kompetencah}}",
+ paste0("\\centerline{\\includegraphics[width=0.80\\textwidth]{slike/rangiranje_kompetenc.pdf}}"),
+ "\\end{figure}")
+
+)
+## //RANGIRANJE KOMPETENC// ##
+
+
+
+#####################################
+# PRIPRAVA PDOATKOV ZA GRAFE: GGPLOT
+####################################
+# Najprej ustvarimo spremenljivke v katere zapiemo tekst vpraanj, ki se bo prikazal na grafih, na y osi
+# IMENA KOMPETENC ZA GGPLOT pod tabelami za posamenzo kompetenco. Prikaz CELOTNEGA TEKSTA ##
+######
+## TEKST Q2 KOMUNICIRANJE ##
+#####
+names(Q2_komuniciranje.skupaj) <- (namesQ2_komuniciranje)
+# Za prikaz CELOTNEGA teksta v ggplotu
+# Dodaj line break oz. nov odstavek za vsakih 30 znakov teksta.
+names.komuniciranje <- gsub('(.{1,43})(\\s|$)', '\\1\n',names(Q2_komuniciranje.skupaj))
+
+######
+## TEKST Q3 SPOSOBNOST ODLOANJA ##
+#####
+names(Q3_odlocanje.skupaj) <- (namesQ3_sposobnost)
+# Za prikaz CELOTNEGA teksta v ggplotu
+# Dodaj line break oz. nov odstavek za vsakih 30 znakov teksta.
+names.sposobnost <- gsub('(.{1,43})(\\s|$)', '\\1\n',names(Q3_odlocanje.skupaj))
+
+######
+## TEKST Q4 Vodenje in ravnanje z ljudmi ##
+#####
+names(Q4_vodenje_ravnanje.skupaj) <- (namesQ4_vodenje)
+# Za prikaz CELOTNEGA teksta v ggplotu
+# Dodaj line break oz. nov odstavek za vsakih 30 znakov teksta.
+names.vodenje.ravnanje <- gsub('(.{1,43})(\\s|$)', '\\1\n',names(Q4_vodenje_ravnanje.skupaj))
+
+######
+## TEKST Q5 Vodenje projektov ##
+#####
+names(Q5_vodenje_projektov.skupaj) <- (namesQ5_vodenje_projektov)
+# Za prikaz CELOTNEGA teksta v ggplotu
+# Dodaj line break oz. nov odstavek za vsakih 30 znakov teksta.
+names.vodenje.projektov <- gsub('(.{1,43})(\\s|$)', '\\1\n',names(Q5_vodenje_projektov.skupaj))
+
+######
+## TEKST Q6 Medosebne veine ##
+#####
+names(Q6_medosebne_vescine.skupaj) <- (namesQ6_vescine)
+# Za prikaz CELOTNEGA teksta v ggplotu
+# Dodaj line break oz. nov odstavek za vsakih 30 znakov teksta.
+names.vescine <- gsub('(.{1,43})(\\s|$)', '\\1\n',names(namesQ6_vescine))
+
+## //IMENA KOMPETENC// ##
+
+
+##############################################################
+## IZRAUN POVPREIJ POSAMEZNE SKUPINE ZA POSAMEZNO KOMPETENCO
+##############################################################
+###########
+# NADREJENI
+###########
+nadrejeni <- subset(razmerjeMean, Q1==1)
+#1 Q2 Komuniciranje
+nadrejeni.komuniciranje <- colMeans(nadrejeni[grepl("Q2",names(nadrejeni))],na.rm=T)
+#2 Q3 Sposobnost odloanja in presoje
+nadrejeni.odlocanje <- colMeans(nadrejeni[grepl("Q3",names(nadrejeni))],na.rm=T)
+#3 Q4 Vodenje in ravnanje z ljudmi
+nadrejeni.vodenje.ravananje <- colMeans(nadrejeni[grepl("Q4",names(nadrejeni))],na.rm=T)
+#5 Q5 Vodenje projektov
+nadrejeni.vodenje.projektov <- colMeans(nadrejeni[grepl("Q5",names(nadrejeni))],na.rm=T)
+#6 Q6 Medosebne veine
+nadrejeni.vescine <- colMeans(nadrejeni[grepl("Q6",names(nadrejeni))],na.rm=T)
+## //nadrejeni// ##
+
+
+###########
+# Podrejeni
+###########
+podrejeni <- subset(razmerjeMean, Q1==2)
+#1 Q2 Komuniciranje
+podrejeni.komuniciranje <- colMeans(podrejeni[grepl("Q2",names(podrejeni))],na.rm=T)
+#2 Q3 Sposobnost odloanja in presoje
+podrejeni.odlocanje <- colMeans(podrejeni[grepl("Q3",names(podrejeni))],na.rm=T)
+#3 Q4 Vodenje in ravnanje z ljudmi
+podrejeni.vodenje.ravananje <- colMeans(podrejeni[grepl("Q4",names(podrejeni))],na.rm=T)
+#5 Q5 Vodenje projektov
+podrejeni.vodenje.projektov <- colMeans(podrejeni[grepl("Q5",names(podrejeni))],na.rm=T)
+#6 Q6 Medosebne veine
+podrejeni.vescine <- colMeans(podrejeni[grepl("Q6",names(podrejeni))],na.rm=T)
+
+
+###########
+# Sodelavec
+###########
+sodelavec <- subset(razmerjeMean, Q1==3)
+#1 Q2 Komuniciranje
+sodelavec.komuniciranje <- colMeans(sodelavec[grepl("Q2",names(sodelavec))],na.rm=T)
+#2 Q3 Sposobnost odloanja in presoje
+sodelavec.odlocanje <- colMeans(sodelavec[grepl("Q3",names(sodelavec))],na.rm=T)
+#3 Q4 Vodenje in ravnanje z ljudmi
+sodelavec.vodenje.ravananje <- colMeans(sodelavec[grepl("Q4",names(sodelavec))],na.rm=T)
+#5 Q5 Vodenje projektov
+sodelavec.vodenje.projektov <- colMeans(sodelavec[grepl("Q5",names(sodelavec))],na.rm=T)
+#6 Q6 Medosebne veine
+sodelavec.vescine <- colMeans(sodelavec[grepl("Q6",names(sodelavec))],na.rm=T)
+
+#################
+# Samoocenjevalec
+#################
+samoocenjevalec <- subset(razmerjeMean, Q1==4)
+#1 Q2 Komuniciranje
+samoocenjevalec.komuniciranje <- colMeans(samoocenjevalec[grepl("Q2",names(samoocenjevalec))],na.rm=T)
+#2 Q3 Sposobnost odloanja in presoje
+samoocenjevalec.odlocanje <- colMeans(samoocenjevalec[grepl("Q3",names(samoocenjevalec))],na.rm=T)
+#3 Q4 Vodenje in ravnanje z ljudmi
+samoocenjevalec.vodenje.ravananje <- colMeans(samoocenjevalec[grepl("Q4",names(samoocenjevalec))],na.rm=T)
+#5 Q5 Vodenje projektov
+samoocenjevalec.vodenje.projektov <- colMeans(samoocenjevalec[grepl("Q5",names(samoocenjevalec))],na.rm=T)
+#6 Q6 Medosebne veine
+samoocenjevalec.vescine <- colMeans(samoocenjevalec[grepl("Q6",names(samoocenjevalec))],na.rm=T)
+## //IZRAUN POVPREIJ POSAMEZNE SKUPINE ZA POSAMEZNO KOMPETENCO// ##
+
+
+
+#################GGPLOT#############################
+##GGPLOT GRAF ZA POSAMEZNO SKUPINO POD TABELAMI#####
+####################################################
+
+####### GGPLOT Q2 KOMUNICIRANJE ########
+library(reshape2)
+kompetenc.Q2.KOMUNICIRANJE <- rbind(nadrejeni.komuniciranje,podrejeni.komuniciranje,sodelavec.komuniciranje,samoocenjevalec.komuniciranje)
+kompetenc.Q2.KOMUNICIRANJE <- t(as.matrix(kompetenc.Q2.KOMUNICIRANJE))
+colnames(kompetenc.Q2.KOMUNICIRANJE) <- c("Nadrejeni", "Podrejeni", "Enak nivo", "Samooc.")
+test<- c("Sposobnost besednega izrazanja pri predstavitvi ideje.",
+ "Sposobnost pravocasnega in tocnega porocanja.",
+ "Sposobnost informiranja drugih.",
+ "Sposobnost spodbujanja in uporabe odkrite komunikacije.",
+ "Sposobnost podajanja tocnih in usklajenih informacij ali navodil.",
+ "Sposobnost uporabe primernih komunikacijskih orodij.")
+rownames(kompetenc.Q2.KOMUNICIRANJE) <- test
+
+
+
+ggplot.Q2 <- melt(kompetenc.Q2.KOMUNICIRANJE)
+
+
+pdf(paste('modules/mod_360_1KA/results/slike/ggplot_komuniciranje.pdf', sep=''), pointsize=10, width=7.5, height=6.5,encoding = 'CP1250')
+
+
+
+p<-ggplot(ggplot.Q2, aes(y = value,x = Var1, fill = Var2)) + coord_flip()+
+ theme_bw() +
+ scale_y_continuous(expand=c(0,0), limits=c(0,5.4),oob = rescale_none) +
+ scale_fill_manual(values = c("#d99694", "#c00000", "#632523","#7F7F7F")) + xlim(rev(levels(ggplot.Q2$Var1)))+
+ theme(axis.title=element_blank(),axis.ticks.y=element_blank(),legend.position = "bottom",
+ axis.text.x = element_text(angle = 0,vjust = 0.4)) +
+ geom_bar(stat = "identity", width = 0.7, position = position_dodge(width=0.7)) +
+ geom_text(aes(x = Var1, y=5.2, label = round(value, 2), fill = Var2),
+ angle = 0, position = position_dodge(width = 0.7), size = 4.2)
+p <- p + labs(fill="")
+#Nastavitve sirine in viine legende
+#p + guides(fill=guide_legend(
+# keywidth=1,
+# keyheight=1,
+# default.unit="inch")
+#)
+p2 <- p +
+ stat_summary(fun.y = mean, color = "red", geom = "line", aes(group = 1)) +
+ stat_summary(fun.y = mean, color = "black", geom ="point", aes(group = 1), size = 3,
+ show.legend = FALSE)
+
+# This is the data for your dots in the graph
+foo <- as.data.frame(ggplot_build(p2)$data[[4]])
+foo$y <- round(foo$y, 1)
+
+p2 + annotate("text", x = foo$x, y = foo$y + 0.5, color = "black", label = foo$y)
+
+dev.off()
+
+# SLIKA GRAFA: Latex in PDF
+tex.ggplot.Q2 <- c(paste0(
+ "\\begin{figure}[H]",
+ "\\caption{Povpreje komponent po skupinah \\textbf{kompetence komuniciranja}}",
+ paste0("\\centerline{\\includegraphics[width=0.85\\textwidth]{slike/ggplot_komuniciranje.pdf}}"),
+ "\\end{figure}"))
+## //GGPLOT Q2 KOMUNICIRANJE// ##
+
+#########################
+
+####### GGPLOT Q3 SPOSOBNOST ODLOANJA IN PRESOJE ########
+
+
+pdf(paste('modules/mod_360_1KA/results/slike/ggplot_odlocanje.pdf', sep=''), family = 'sans', pointsize=10, width=7.5, height=7,encoding = 'CP1250')
+
+kompetenc.Q3.SPOSOBNOST.OD <- rbind(nadrejeni.odlocanje,podrejeni.odlocanje,sodelavec.odlocanje,samoocenjevalec.odlocanje)
+kompetenc.Q3.SPOSOBNOST.OD <- t(as.matrix(kompetenc.Q3.SPOSOBNOST.OD))
+colnames(kompetenc.Q3.SPOSOBNOST.OD) <- c("Nadrejeni", "Podrejeni", "Enak nivo", "Samooc.")
+
+
+
+#test22 <- c("Sposobnost dobrih in pravoasnih odloitev.",
+ # "odlo\u010Danja.",
+ # "Sposobnost uporabe sistemati\u010Dnega in analiti\u010Dnega pristopa.",
+ # "Sposobnost sprejemanja dobrih odloitev tudi pod pritiskom.",
+ # "Sposobnost mediacije in iskanja konsenza med vpletenimi v konfliktu. ",
+ # "Sposobnost sprejemanja odloitev in ukrepov v tekih situacijah.",
+ # "Sposobnost prevzemanja odgovornosti za svoje odloitve.",
+ # "Sposobnost uporabe preteklih izkuenj.",
+ # "Sposobnost irokega razmiljanja.")
+#rownames(kompetenc.Q3.SPOSOBNOST.OD) <- test22
+rownames(kompetenc.Q3.SPOSOBNOST.OD) <- names.sposobnost
+ggplot.Q3 <- melt(kompetenc.Q3.SPOSOBNOST.OD)
+# e so manjkajoi podatki (NA ali NaN) v vrsticah jih odstranimo
+ggplot.Q3 <- ggplot.Q3[complete.cases(ggplot.Q3),]
+
+
+
+p<-ggplot(ggplot.Q3, aes(x = Var1, y = value, fill = Var2)) + coord_flip()+
+ theme_bw() +
+ scale_y_continuous(expand=c(0,0), limits=c(0,5.4),oob = rescale_none) +
+ scale_fill_manual(values = c("#d99694", "#c00000", "#632523","#7F7F7F")) + xlim(rev(levels(ggplot.Q3$Var1)))+
+ theme(axis.title=element_blank(),axis.ticks.y=element_blank(),legend.position = "bottom",
+ axis.text.x = element_text(angle = 0,vjust = 0.4)) +
+ geom_bar(stat = "identity", width = 0.7, position = position_dodge(width=0.7)) +
+ geom_text(aes(x = Var1, y =5.2, label = round(value, 2), fill = Var2),
+ angle = 0, position = position_dodge(width = 0.8), size = 4.2)
+p <- p + labs(fill="")
+
+p2 <- p +
+ stat_summary(fun.y = mean, color = "red", geom = "line", aes(group = 1)) +
+ stat_summary(fun.y = mean, color = "black", geom ="point", aes(group = 1), size = 3,
+ show.legend = FALSE)
+
+# This is the data for your dots in the graph
+foo <- as.data.frame(ggplot_build(p2)$data[[4]])
+foo$y <- round(foo$y, 1)
+
+p2 + annotate("text", x = foo$x, y = foo$y + 0.5, color = "black", label = foo$y)
+
+dev.off()
+
+# SLIKA GRAFA: Latex in PDF
+tex.ggplot.Q3 <- c(paste0(
+ "\\begin{figure}[H]",
+ "\\caption{Povpreje komponent po skupinah \\textbf{kompetence sposobnosti odloanja in presoje}}",
+ paste0("\\centerline{\\includegraphics[width=0.75\\textwidth]{slike/ggplot_odlocanje.pdf}}"),
+ "\\end{figure}"))
+## //GGPLOT Q3 SPOSOBNOST ODLOANJA IN PRESOJE// ##
+
+#########################
+
+####### GGPLOT Q4 VODENJE IN RAVNANJE Z LJUDMI ########
+kompetenc.Q4.VODENJE.LJUDI <- rbind(nadrejeni.vodenje.ravananje,podrejeni.vodenje.ravananje,
+ sodelavec.vodenje.ravananje,samoocenjevalec.vodenje.ravananje)
+kompetenc.Q4.VODENJE.LJUDI <- t(as.matrix(kompetenc.Q4.VODENJE.LJUDI))
+colnames(kompetenc.Q4.VODENJE.LJUDI) <- c("Nadrejeni", "Podrejeni", "Enak nivo", "Samooc.")
+rownames(kompetenc.Q4.VODENJE.LJUDI) <- names.vodenje.ravnanje
+
+
+ggplot.Q4 <- melt(kompetenc.Q4.VODENJE.LJUDI)
+# e so manjkajoi podatki (NA ali NaN) v vrsticah jih odstranimo
+ggplot.Q4 <- ggplot.Q4[complete.cases(ggplot.Q4),]
+
+
+pdf(paste('modules/mod_360_1KA/results/slike/ggplot_vodenje_ravnanje.pdf', sep=''), family = 'sans', pointsize=10, width=7.5, height=7,encoding = 'CP1250')
+
+p<-ggplot(ggplot.Q4, aes(x = Var1, y = value, fill = Var2)) + coord_flip()+
+ theme_bw() +
+ scale_y_continuous(expand=c(0,0), limits=c(0,5.4),oob = rescale_none) +
+ scale_fill_manual(values = c("#d99694", "#c00000", "#632523","#7F7F7F")) + xlim(rev(levels(ggplot.Q4$Var1)))+
+ theme(axis.title=element_blank(),axis.ticks.y=element_blank(),legend.position = "bottom",
+ axis.text.x = element_text(angle = 0,vjust = 0.4)) +
+ geom_bar(stat = "identity", width = 0.7, position = position_dodge(width=0.7)) +
+ geom_text(aes(x = Var1, y =5.2, label = round(value, 2), fill = Var2),
+ angle = 0, position = position_dodge(width = 0.8), size = 4.2)
+p <- p + labs(fill="")
+
+p2 <- p +
+ stat_summary(fun.y = mean, color = "red", geom = "line", aes(group = 1)) +
+ stat_summary(fun.y = mean, color = "black", geom ="point", aes(group = 1), size = 3,
+ show.legend = FALSE)
+
+# This is the data for your dots in the graph
+foo <- as.data.frame(ggplot_build(p2)$data[[4]])
+foo$y <- round(foo$y, 1)
+
+p2 + annotate("text", x = foo$x, y = foo$y + 0.5, color = "black", label = foo$y)
+
+dev.off()
+
+# SLIKA GRAFA: Latex in PDF
+tex.ggplot.Q4 <- c(paste0(
+ "\\begin{figure}[H]",
+ "\\caption{Povpreje komponent po skupinah \\textbf{kompetence vodenja in ravnanja z ljudmi}}",
+ paste0("\\centerline{\\includegraphics[width=0.85\\textwidth]{slike/ggplot_vodenje_ravnanje.pdf}}"),
+ "\\end{figure}"))
+## //GGPLOT Q4 VODENJE IN RAVNANJE Z LJUDMI// ##
+
+#########################
+
+####### GGPLOT Q5 VODENJE PROJEKTOV ########
+kompetenc.Q5.VODENJE.PROJEKTOV <- rbind(nadrejeni.vodenje.projektov,podrejeni.vodenje.projektov,
+ sodelavec.vodenje.projektov,samoocenjevalec.vodenje.projektov)
+kompetenc.Q5.VODENJE.PROJEKTOV <- t(as.matrix(kompetenc.Q5.VODENJE.PROJEKTOV))
+colnames(kompetenc.Q5.VODENJE.PROJEKTOV) <- c("Nadrejeni", "Podrejeni", "Enak nivo", "Samooc.")
+rownames(kompetenc.Q5.VODENJE.PROJEKTOV) <- names.vodenje.projektov
+
+
+ggplot.Q5 <- melt(kompetenc.Q5.VODENJE.PROJEKTOV)
+# e so manjkajoi podatki (NA ali NaN) v vrsticah jih odstranimo
+ggplot.Q5 <- ggplot.Q5[complete.cases(ggplot.Q5),]
+#
+#
+#
+#
+
+pdf(paste('modules/mod_360_1KA/results/slike/ggplot_vodenje_projektov.pdf', sep=''), family = 'sans', pointsize=10, width=7.5, height=7)
+
+p<-ggplot(ggplot.Q5, aes(x = Var1, y = value, fill = Var2)) + coord_flip()+
+ theme_bw() +
+ scale_y_continuous(expand=c(0,0), limits=c(0,5.4),oob = rescale_none) +
+ scale_fill_manual(values = c("#d99694", "#c00000", "#632523","#7F7F7F")) + xlim(rev(levels(ggplot.Q5$Var1)))+
+ theme(axis.title=element_blank(),axis.ticks.y=element_blank(),legend.position = "bottom",
+ axis.text.x = element_text(angle = 0,vjust = 0.4)) +
+ geom_bar(stat = "identity", width = 0.7, position = position_dodge(width=0.7)) +
+ geom_text(aes(x = Var1, y =5.2, label = round(value, 2), fill = Var2),
+ angle = 0, position = position_dodge(width = 0.8), size = 4.2)
+p <- p + labs(fill="")
+
+p2 <- p +
+ stat_summary(fun.y = mean, color = "red", geom = "line", aes(group = 1)) +
+ stat_summary(fun.y = mean, color = "black", geom ="point", aes(group = 1), size = 3,
+ show.legend = FALSE)
+
+# This is the data for your dots in the graph
+foo <- as.data.frame(ggplot_build(p2)$data[[4]])
+foo$y <- round(foo$y, 1)
+
+p2 + annotate("text", x = foo$x, y = foo$y + 0.5, color = "black", label = foo$y)
+
+dev.off()
+
+# SLIKA GRAFA: Latex in PDF
+tex.ggplot.Q5 <- c(paste0(
+ "\\begin{figure}[H]",
+ "\\caption{Povpreje komponent po skupinah \\textbf{kompetence vodenja projektov}}",
+ paste0("\\centerline{\\includegraphics[width=0.85\\textwidth]{slike/ggplot_vodenje_projektov.pdf}}"),
+ "\\end{figure}"))
+## //GGPLOT Q5 VODENJE PROJEKTOV// ##
+
+###################
+
+####### GGPLOT Q6 MEDOSEBNE VEINE ########
+kompetenc.Q6.MEDOSEBNE.VESCINE <- rbind(nadrejeni.vescine,podrejeni.vescine,
+ sodelavec.vescine,samoocenjevalec.vescine)
+kompetenc.Q6.MEDOSEBNE.VESCINE <- t(as.matrix(kompetenc.Q6.MEDOSEBNE.VESCINE))
+colnames(kompetenc.Q6.MEDOSEBNE.VESCINE) <- c("Nadrejeni", "Podrejeni", "Enak nivo", "Samooc.")
+rownames(kompetenc.Q6.MEDOSEBNE.VESCINE) <- names.vescine
+
+
+ggplot.Q6 <- melt(kompetenc.Q6.MEDOSEBNE.VESCINE)
+# e so manjkajoi podatki (NA ali NaN) v vrsticah jih odstranimo
+ggplot.Q6 <- ggplot.Q6[complete.cases(ggplot.Q6),]
+#
+#
+#
+#
+
+pdf(paste('modules/mod_360_1KA/results/slike/ggplot_medosebne_vescine.pdf', sep=''), family = 'sans', pointsize=10, width=7.5, height=7)
+
+p<-ggplot(ggplot.Q6, aes(x = Var1, y = value, fill = Var2)) + coord_flip()+
+ theme_bw() +
+ scale_y_continuous(expand=c(0,0), limits=c(0,5.4),oob = rescale_none) +
+ scale_fill_manual(values = c("#d99694", "#c00000", "#632523","#7F7F7F")) + xlim(rev(levels(ggplot.Q2$Var1)))+
+ theme(axis.title=element_blank(),axis.ticks.y=element_blank(),legend.position = "bottom",
+ axis.text.x = element_text(angle = 0,vjust = 0.4)) +
+ geom_bar(stat = "identity", width = 0.7, position = position_dodge(width=0.7)) +
+ geom_text(aes(x = Var1, y =5.2, label = round(value, 2), fill = Var2),
+ angle = 0, position = position_dodge(width = 0.8), size = 4.2)
+p <- p + labs(fill="")
+
+p2 <- p +
+ stat_summary(fun.y = mean, color = "red", geom = "line", aes(group = 1)) +
+ stat_summary(fun.y = mean, color = "black", geom ="point", aes(group = 1), size = 3,
+ show.legend = FALSE)
+
+# This is the data for your dots in the graph
+foo <- as.data.frame(ggplot_build(p2)$data[[4]])
+foo$y <- round(foo$y, 1)
+
+p2 + annotate("text", x = foo$x, y = foo$y + 0.5, color = "black", label = foo$y)
+
+dev.off()
+
+# SLIKA GRAFA: Latex in PDF
+tex.ggplot.Q6 <- c(paste0(
+ "\\begin{figure}[H]",
+ "\\caption{Povpreje komponent po skupinah \\textbf{kompetence medosebnih vein}}",
+ paste0("\\centerline{\\includegraphics[width=0.85\\textwidth]{slike/ggplot_medosebne_vescine.pdf}}"),
+ "\\end{figure}"))
+## //GGPLOT Q6 MEDOSEBNE VEINE// ##
+
+
+
+#######################
+#RADAR AKA. SPIDER GRAF
+#######################
+## RADAR GRAF
+
+pdf(paste('modules/mod_360_1KA/results/slike/radar.pdf', sep=''), family='sans', pointsize=11, width=8, height=7)
+
+radar.data <- t(tabela.matrix)
+# provide the data you want to plot, and the desired range
+
+myrange <- c(1, 5)
+
+# create a data frame with the max and min as the first two rows
+mydf <- data.frame(rbind(max=myrange[2], min=myrange[1], radar.data))
+
+# create a radar chart
+colnames(mydf) <- c("Komuniciranje","Sposobnost odlocanja\nin presoje","Vodenje in ravnanje z ljudmi","Vodenje projektov", "Medosebne vescine")
+
+
+radarchart(mydf, pcol=c("#d99694", "#c00000", "#632523","#7F7F7F"), cglcol='gray75',
+ plwd=2, plty=1, cglwd=1, cglty=1, seg=4, axistype=1, caxislabels=c(1:5),
+ axislabcol='gray25', centerzero=TRUE)
+
+legend('topright', legend=c("Nadrejeni","Podrejeni","Enak nivo","Samooc."),
+ col=c("#d99694", "#c00000", "#632523","#7F7F7F"), lty=1, lwd=2, bty='n')
+
+dev.off()
+
+#tekst nad radar grafom
+radar.poj <- c("Kvantitativno pridobljene informacije kompetenc so zelo uporabne pri oblikovanju
+ radar diagrama. Znotraj diagrama so ustrezno prikazane bolj/manj poudarjene lastnosti posameznega zaposlenega.\\
+ Radar diagram prikazuje, kako se je ocenjevana oseba pri posameznih kompetencah ocenila, glede na to, kako so to osebo
+ ocenili drugi. Slednje pa je zelo uporabno in hitro lahko opazimo ali med ocenjevano osebo
+ in drugimi obstajajo razlike pri percepciji posameznih kompetenc.")
+
+tex.radar <- c(radar.poj,"\\begin{figure}[H]", "\\caption{Radar diagram povpreij kompetenc po skupinah}",
+ paste0('\\centerline{\\includegraphics[width=0.95\\textwidth]{slike/radar.pdf}}'),
+ "\\end{figure}")
+
+##// RADAR GRAF//##
+
+Sys.setlocale("LC_ALL", "Czech")
+
+
+
+# Dodatno pojasnilo glede VAROVANJA OSEBNIH PODATKOV
+varovanje.podatkov <- scan("modules/mod_360_1KA/latexkosi/varstvo_osebnih_podatkov.tex", character(0), sep="\n", quiet=TRUE,encoding='UTF-8')
+varovanje.podatkov <- gsub('', '', varovanje.podatkov, fixed=T)
+varovanje.podatkov <- gsub('', '', varovanje.podatkov,fixed=T)
+varovanje.podatkov <- gsub('', '', varovanje.podatkov,fixed=T)
+varovanje.podatkov <- gsub('\u017E', '', varovanje.podatkov,fixed=T)
+varovanje.podatkov <- gsub('\u2013', '-', varovanje.podatkov,fixed=T)
+################################################
+## Sestavljanje latex datotek in Generiranje PDF
+################################################
+tex.glava <- scan("modules/mod_360_1KA/latexkosi/a-glava-1ka.tex", character(0), sep="\n", quiet=TRUE,encoding='UTF-8')
+tex.pojasnilo <- scan("modules/mod_360_1KA/latexkosi/pojasnilo.tex", character(0), sep="\n", quiet=TRUE,encoding='UTF-8') # Uvod
+tex.pojasnilo <- gsub('', '', tex.pojasnilo, fixed=T)
+tex.pojasnilo <- gsub('', '', tex.pojasnilo,fixed=T)
+tex.pojasnilo <- gsub('', '', tex.pojasnilo,fixed=T)
+tex.pojasnilo <- gsub('\u017E', '', tex.pojasnilo,fixed=T)
+tex.pojasnilo <- gsub('\u2013', '-', tex.pojasnilo,fixed=T)
+tex.noga <- scan("modules/mod_360_1KA/latexkosi/z-noga.tex", character(0), sep="\n", quiet=TRUE)
+Rdirektorij <- getwd()
+
+
+tex.izbor <- c(tex.glava,tex.pojasnilo, "\\newpage",
+ "\\chapter{Kompetence komuniciranja}",tabelatex1,"\\newpage",tex.ggplot.Q2,
+ "\\chapter{Kompetence sposobnosti odloanja in presoje}", tabelatex2,"\\newpage",tex.ggplot.Q3,
+ "\\chapter{Kompetence vodenja in ravnanja z ljudmi}",tabelatex3,"\\newpage", tex.ggplot.Q4,
+ "\\chapter{Kompetence vodenja projektov}",tabelatex4,"\\newpage",tex.ggplot.Q5,
+ "\\chapter{Medosebne veine}",tabelatex5,"\\newpage",tex.ggplot.Q6,
+ "\\chapter{Rangiranje kompetenc}",tabela.contR.tex,"\\newpage",tex.graf,
+ "\\chapter{Radar diagram}",tex.radar,varovanje.podatkov,tex.noga)
+
+
+setwd(paste(Rdirektorij, "modules/mod_360_1KA/results", sep="/"))
+cat(tex.izbor, file=paste0("mod_360_CDI.tex"), sep="\n")
+tools::texi2pdf(file=paste0("mod_360_CDI.tex"), quiet=TRUE, clean=TRUE)
+setwd(Rdirektorij)
+
diff --git a/admin/survey/modules/mod_360_1KA/class.Survey3601ka.php b/admin/survey/modules/mod_360_1KA/class.Survey3601ka.php
new file mode 100644
index 0000000..aa4a6c0
--- /dev/null
+++ b/admin/survey/modules/mod_360_1KA/class.Survey3601ka.php
@@ -0,0 +1,258 @@
+<?php
+
+define("TEMP_FOLDER", "admin/survey/modules/mod_360_1KA/temp");
+define("SCRIPT_FOLDER", "admin/survey/modules/mod_360_1KA/R");
+define("RESULTS_FOLDER", "admin/survey/modules/mod_360_1KA/results");
+
+class Survey3601ka{
+
+ var $anketa; # id ankete
+ var $db_table = '';
+
+
+ function __construct($anketa){
+ global $site_url;
+
+ // Ce imamo anketo, smo v status->ul evealvacija
+ if ((int)$anketa > 0){
+ $this->anketa = $anketa;
+
+ # polovimo vrsto tabel (aktivne / neaktivne)
+ SurveyInfo :: getInstance()->SurveyInit($this->anketa);
+ if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) {
+ $this->db_table = '_active';
+ }
+ }
+ }
+
+
+ // Prikazemo vsa porocila
+ public function displayReports(){
+ global $lang;
+
+ echo '<fieldset><legend>'.$lang['srv_360_reports'].'</legend>';
+ echo '<ul>';
+
+ // Poiščemo vprašanja z odnosom in identifikacijo ocenjevanca
+ $sql = sisplet_query("SELECT s.id AS spr_id, s.variable AS variable, s.tip AS tip FROM srv_spremenljivka s, srv_grupa g
+ WHERE g.ank_id='$this->anketa' AND s.gru_id=g.id AND (s.variable='odnos' OR s.variable='ime' OR s.variable='drugo')");
+ while($row = mysqli_fetch_array($sql)){
+
+ if($row['variable'] == 'odnos'){
+
+ }
+ elseif($row['variable'] == 'drugo'){
+
+ // Loop po vseh odgovorih drugo (ocenjevanec) in jih zgrupiramo
+ $sqlU = sisplet_query("SELECT * FROM srv_data_text".$this->db_table." WHERE spr_id='".$row['id']."'");
+ while($rowU = mysqli_fetch_array($sqlU)){
+
+ }
+ }
+ }
+
+
+ echo '<li>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&amp;a=' . A_ANALYSIS . '&amp;m=' . M_ANALYSIS_360_1KA . '&amp;export=1">Izvozi poročilo</a>';
+ echo '</li>';
+
+ echo '</ul>';
+ echo '</fieldset>';
+
+ // Izvažamo
+ if(isset($_GET['export']) && $_GET['export'] == '1'){
+ $this->executeExport();
+ }
+ }
+
+ // Prikazemo nastavitve pri vklopu naprednega modula
+ public function displaySettings(){
+ global $lang;
+
+ echo 'Dodatne nastavitve...';
+ }
+
+
+ // Zgeneriramo pdf analizo
+ public function executeExport(){
+ global $site_path;
+ global $lang;
+ global $admin_type;
+
+ // Zgeneriramo zacasne csv datoteke
+ $this->prepareCSV();
+
+ // Poklicemo R skripto in zgeneriramo pdf
+ $script = $site_path . SCRIPT_FOLDER . '/360_stopinj_1ka.R';
+ $out = exec('Rscript '.$script.' 2>&1', $output, $return_var);
+
+ // Testiranje - izpis errorjev
+ if($admin_type == 0){
+ echo '<div>';
+ echo 'Rscript '.$script;
+ //echo '<br />'.$out.'<br />';
+ var_dump($output);
+ echo '</div>';
+ }
+
+ // Pripravimo file za download
+ if(file_exists($site_path . RESULTS_FOLDER . '/mod_360_CDI.pdf')){
+
+ $file = $site_path . RESULTS_FOLDER . '/mod_360_CDI.pdf';
+
+ header('Content-Description: File Transfer');
+ header('Content-Type: application/octet-stream');
+ header('Content-Disposition: attachment; filename='.basename('mod_360_CDI.pdf'));
+ header('Content-Transfer-Encoding: binary');
+ header('Expires: 0');
+ header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
+ header('Pragma: public');
+ header('Content-Length: ' . filesize($file));
+
+ ob_clean();
+ flush();
+
+ readfile($file);
+ }
+
+ // Na koncu pobrisemo zacasne datoteke
+ $this->deleteTemp();
+
+ // Ugasnemo skripto:)
+ die();
+ }
+
+ // Pripravimo zacasne datoteke
+ private function prepareCSV(){
+ global $site_path;
+
+ $temp_folder = $site_path . TEMP_FOLDER.'/';
+
+ $SDF = SurveyDataFile::get_instance();
+ $SDF->init($this->anketa);
+ $_headFileName = $SDF->getHeaderFileName();
+ $_dataFileName = $SDF->getDataFileName();
+ $_fileStatus = $SDF->getStatus();
+
+ if ($_headFileName != null && $_headFileName != '') {
+ $_HEADERS = unserialize(file_get_contents($_headFileName));
+ }
+ else {
+ echo 'Error! Empty file name!';
+ }
+
+ // Zaenkrat dopuscamo samo status 6 in brez lurkerjev
+ //$status_filter = '('.STATUS_FIELD.' ~ /6|5/)&&('.LURKER_FIELD.'==0)';
+ $status_filter = '('.STATUS_FIELD.'==6)&&('.LURKER_FIELD.'==0)';
+
+ //$start_sequence = $_HEADERS['_settings']['dataSequence'];
+ $start_sequence = 2;
+ $end_sequence = $_HEADERS['_settings']['metaSequence']-1;
+
+ $field_delimit = ';';
+
+ // Filtriramo podatke po statusu in jih zapisemo v temp folder
+ if (IS_WINDOWS) {
+ //$command = 'awk -F"|" "BEGIN {{OFS=\",\"} {ORS=\"\n\"}} '.$status_filter.' { print $0}" '.$_dataFileName.' >> '.$temp_folder.'/temp_data_'.$this->anketa.'.dat';
+ $out = shell_exec('awk -F"|" "BEGIN {{OFS=\",\"} {ORS=\"\n\"}} '.$status_filter.'" '.$_dataFileName.' | cut -d "|" -f '.$start_sequence.'-'.$end_sequence.' >> '.$temp_folder.'/temp_data_'.$this->anketa.'.dat');
+
+ # zamenjamo | z ;
+ //exec('sed "s/|/\x22'.$field_delimit.'=\x22/g" '.$temp_folder.'/temp_data_'.$this->anketa.'.dat >> '.$temp_folder.'/temp_data_'.$this->anketa.'.csv');
+ }
+ else {
+ //$command = 'awk -F"|" \'BEGIN {{OFS=","} {ORS="\n"}} '.$status_filter.' { print $0; }\' '.$_dataFileName.' >> '.$temp_folder.'/temp_data_'.$this->anketa.'.dat';
+ $out = shell_exec('awk -F"|" \'BEGIN {{OFS=","} {ORS="\n"}} '.$status_filter.'\' '.$_dataFileName.' | cut -d \'|\' -f '.$start_sequence.'-'.$end_sequence.' >> '.$temp_folder.'/temp_data_'.$this->anketa.'.dat');
+
+ # zamenjamo | z ;
+ //exec('sed \'s/|/\x22'.$field_delimit.'=\x22/g\' '.$temp_folder.'/temp_data_'.$this->anketa.'.dat >> '.$temp_folder.'/temp_data_'.$this->anketa.'.csv');
+ }
+
+
+ // Ustvarimo koncni CSV
+ if ($fd = fopen($temp_folder.'/temp_data_'.$this->anketa.'.dat', "r")) {
+
+ //$fd2 = fopen($temp_folder.'/data_'.$this->anketa.'.csv', "w");
+ $fd2 = fopen($temp_folder.'/test.csv', "w");
+
+ //header('Content-Encoding: windows-1250');
+ //header('Content-Type: application/csv charset=windows-1250');
+
+ # naredimo header row
+ foreach ($_HEADERS AS $spid => $spremenljivka) {
+ if (count($spremenljivka['grids']) > 0) {
+ foreach ($spremenljivka['grids'] AS $gid => $grid) {
+ foreach ($grid['variables'] AS $vid => $variable ){
+ if ($spremenljivka['tip'] !== 'sm' && !($variable['variable'] == 'uid' && $variable['naslov'] == 'User ID')){
+ $output1 .= strip_tags($variable['variable']).$field_delimit;
+ $output2 .= '"'.strip_tags($variable['naslov']).'"'.$field_delimit;
+ }
+ }
+ }
+ }
+ }
+
+ // Spremenimo encoding v windows-1250
+ //$output1 = iconv("UTF-8","Windows-1250//TRANSLIT", $output1);
+ //$output2 = iconv("UTF-8","Windows-1250//TRANSLIT", $output2);
+
+ fwrite($fd2, $output1."\r\n");
+ fwrite($fd2, $output2."\r\n");
+
+
+ while ($line = fgets($fd)) {
+
+ //fwrite($fd2, '="');
+ //$line = str_replace(array("\r","\n","|"), array("","",'";="'), $line);
+ $line = '"' . str_replace(array("\r","\n","\"","|"), array("","","",'";"'), $line) . '"';
+
+ // Spremenimo encoding v windows-1250
+ $line = iconv("UTF-8","Windows-1250//TRANSLIT", $line);
+ //$line = str_replace(array("č","š","ž","Č","Š","Ž"), array("\v{c}","\v{s}","\v{z}","\v{C}","\v{S}","\v{Z}"), $line);
+
+ fwrite($fd2, $line);
+ //fwrite($fd2, '"');
+ fwrite($fd2, "\r\n");
+ }
+
+ fclose($fd2);
+ }
+ fclose($fd);
+
+
+ // Na koncu pobrisemo temp datoteke
+ if (file_exists($temp_folder.'/temp_data_'.$this->anketa.'.dat')) {
+ unlink($temp_folder.'/temp_data_'.$this->anketa.'.dat');
+ }
+ }
+
+ // Pobrisemo zacasne datoteke
+ private function deleteTemp(){
+ global $site_path;
+
+ $temp_folder = $site_path . TEMP_FOLDER.'/';
+
+ if (file_exists($temp_folder.'/data_'.$this->anketa.'.csv')) {
+ unlink($temp_folder.'/data_'.$this->anketa.'.csv');
+ }
+
+ // Pobrisemo zacasno CSV datoteko s podatki
+ if (file_exists($temp_folder.'/test.csv')) {
+ unlink($temp_folder.'/test.csv');
+ }
+
+ // Pobrisemo pdf grafe ki so bili vstavljeni v porocilo
+ $files = glob($site_path . RESULTS_FOLDER . '/part-predmet-slike/*');
+ foreach($files as $file){
+ if(is_file($file))
+ unlink($file);
+ }
+
+ // Pobrisemo še vse ostalo v rezultatih
+ $files = glob($site_path . RESULTS_FOLDER . '/*');
+ foreach($files as $file){
+ if(is_file($file))
+ unlink($file);
+ }
+ }
+
+} \ No newline at end of file
diff --git a/admin/survey/modules/mod_360_1KA/latexkosi/a-glava-1ka.tex b/admin/survey/modules/mod_360_1KA/latexkosi/a-glava-1ka.tex
new file mode 100644
index 0000000..9292e1f
--- /dev/null
+++ b/admin/survey/modules/mod_360_1KA/latexkosi/a-glava-1ka.tex
@@ -0,0 +1,105 @@
+\documentclass[11pt,a4paper]{report}
+\usepackage[cm]{fullpage}
+\setlength{\headheight}{12pt}
+\usepackage{arev}
+\usepackage[T1]{fontenc}
+\usepackage{times}
+%\usepackage[nofligs]{verdana}
+\usepackage[fontsize=11pt]{scrextend}
+\usepackage{amsmath}
+\usepackage[cp1250]{inputenc}
+\usepackage[utf8]{inputenc}
+
+\usepackage{subcaption}
+\usepackage{graphicx}
+\usepackage{xcolor}
+\definecolor{firebrick3}{HTML}{cd2626}
+\definecolor{dodgerblue3}{HTML}{1874cd}
+\definecolor{BrickRed}{HTML}{B6321C}
+\definecolor{OrangeRed}{HTML}{F58137}
+\definecolor{PineGreen}{HTML}{008B72}
+\definecolor{Orange}{HTML}{F58137}
+\definecolor{Green}{HTML}{00A64F}
+\definecolor{Atlantis}{HTML}{8CBA2E}
+\definecolor{Blue Stone}{HTML}{006666}
+\definecolor{Black}{HTML}{000000}
+\definecolor{Red}{HTML}{FF0006}
+\definecolor{Gray}{HTML}{AAAAAA}
+\usepackage{times}
+\usepackage{float}
+\usepackage{multirow}
+\usepackage{wrapfig}
+
+
+
+\usepackage{setspace}
+
+\renewcommand\thesection{\Alph{section}}
+\renewcommand\thesubsection{\thechapter.\arabic{subsection}}
+\usepackage{chngcntr}
+\counterwithout*{subsection}{section}
+\counterwithin*{subsection}{chapter}
+\usepackage{titlesec}
+\titleformat{\chapter}[hang]{\LARGE\bfseries}{\thechapter{. }}{12pt}{\LARGE\bfseries}
+\titlespacing*{\chapter}{0pt}{-13pt}{10pt}
+\usepackage{longtable}
+\usepackage{setspace}
+\usepackage{array,calc}
+\newcolumntype{A}[1]{>{\begin{minipage}{#1}\vspace{\tabcolsep}}l<{\vspace{\tabcolsep}\end{minipage}}}
+\newenvironment{Complement}[1][0.75cm]{\hspace{#1}\begin{minipage}{\linewidth-#1}\hspace{-#1}\ignorespaces}{\end{minipage}}
+
+
+
+\usepackage{fancyhdr}
+\pagestyle{fancyplain}
+\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
+\fancyhf{}
+\renewcommand{\headrulewidth}{0.4pt}
+\renewcommand{\footrulewidth}{0.4pt}
+\fancyhead[L]{ \includegraphics[width=2cm]{../latexkosi/logo/CDI_glava.png} }
+\fancyfoot[L]{}
+\fancyfoot[R]{\small{Stran \thepage}}
+\headsep 25pt
+\fancypagestyle{plain}{
+ \renewcommand{\headrulewidth}{0.4pt}
+ \renewcommand{\footrulewidth}{0.4pt}
+}
+
+
+\usepackage{hyperref}
+\hypersetup{
+ colorlinks=true,
+ linkcolor=black,
+ urlcolor=blue,
+ pdfstartview={XYZ null null 1},
+ pdftitle={naslov!}
+}
+\urlstyle{same}
+
+\setlength{\parindent}{0cm}
+\LTcapwidth=\textwidth %to keep longtable captions in one row
+
+%začetek za dodatek po letih
+\makeatletter
+\@addtoreset{chapter}{part}
+\makeatother
+\usepackage{alphalph}
+\makeatletter
+\newalphalph{\alphmult}[mult]{\@Alph}{26}
+\makeatother
+\renewcommand{\thesection}{\alphmult{\value{section}}}
+%konec za dodatek po letih
+
+
+\begin{document}
+ \begin{titlepage}
+ \begin{center}
+ \vspace*{-8.5\baselineskip} % Da bo slika na vrhu
+ \includegraphics[width=18cm]{../latexkosi/logo/CDI1.png}~\\[4cm]
+ \includegraphics[width=17.5cm]{../latexkosi/logo/CDI_naslovnica.png}~\\[4cm]
+ %\textsc{ \LARGE \textbf{ \color{Red} Center za družboslovno informatiko \\[2cm] analiza 360 stopinj}}\\[6.5cm]
+ %\includegraphics[width=14.5cm]{../latexkosi/logo/slika.jpg}~\\[6cm]
+ {\large Ljubljana, \today}
+ \end{center}
+ \end{titlepage}
+\tableofcontents \ No newline at end of file
diff --git a/admin/survey/modules/mod_360_1KA/latexkosi/logo/CDI.png b/admin/survey/modules/mod_360_1KA/latexkosi/logo/CDI.png
new file mode 100644
index 0000000..bcdaa99
--- /dev/null
+++ b/admin/survey/modules/mod_360_1KA/latexkosi/logo/CDI.png
Binary files differ
diff --git a/admin/survey/modules/mod_360_1KA/latexkosi/logo/CDI1.png b/admin/survey/modules/mod_360_1KA/latexkosi/logo/CDI1.png
new file mode 100644
index 0000000..757bd7d
--- /dev/null
+++ b/admin/survey/modules/mod_360_1KA/latexkosi/logo/CDI1.png
Binary files differ
diff --git a/admin/survey/modules/mod_360_1KA/latexkosi/logo/CDI_glava.png b/admin/survey/modules/mod_360_1KA/latexkosi/logo/CDI_glava.png
new file mode 100644
index 0000000..2bdaa9e
--- /dev/null
+++ b/admin/survey/modules/mod_360_1KA/latexkosi/logo/CDI_glava.png
Binary files differ
diff --git a/admin/survey/modules/mod_360_1KA/latexkosi/logo/CDI_naslovnica - Copy.png b/admin/survey/modules/mod_360_1KA/latexkosi/logo/CDI_naslovnica - Copy.png
new file mode 100644
index 0000000..fd80776
--- /dev/null
+++ b/admin/survey/modules/mod_360_1KA/latexkosi/logo/CDI_naslovnica - Copy.png
Binary files differ
diff --git a/admin/survey/modules/mod_360_1KA/latexkosi/logo/CDI_naslovnica.png b/admin/survey/modules/mod_360_1KA/latexkosi/logo/CDI_naslovnica.png
new file mode 100644
index 0000000..6f9b9c0
--- /dev/null
+++ b/admin/survey/modules/mod_360_1KA/latexkosi/logo/CDI_naslovnica.png
Binary files differ
diff --git a/admin/survey/modules/mod_360_1KA/latexkosi/logo/circle.png b/admin/survey/modules/mod_360_1KA/latexkosi/logo/circle.png
new file mode 100644
index 0000000..428c976
--- /dev/null
+++ b/admin/survey/modules/mod_360_1KA/latexkosi/logo/circle.png
Binary files differ
diff --git a/admin/survey/modules/mod_360_1KA/latexkosi/pojasnilo.tex b/admin/survey/modules/mod_360_1KA/latexkosi/pojasnilo.tex
new file mode 100644
index 0000000..58352a9
--- /dev/null
+++ b/admin/survey/modules/mod_360_1KA/latexkosi/pojasnilo.tex
@@ -0,0 +1,21 @@
+\chapter{Metodologija}
+\subsection{Vprašalnik kompetenc po metodi 360°}
+Kompetence so skupek povezav med znanjem, veščinami in vedenji, ki vplivajo na delo posameznika in korelirajo z uspešnostjo na delovnem mestu. So skupek povezav, ki so merljive z dobro sprejetimi standardi in ki jih lahko izboljšujemo z izobraževanjem in razvojem zaposlenih. Z vprašalnikom kompetenc merimo sledeče dimenzije:
+
+
+\begin{itemize}
+\item Komuniciranje
+\item Sposobnosti odločanja in presoje
+\item Vodenje in ravnanje z ljudmi
+\item Vodenje projektov
+\item Medosebne veščine
+\end{itemize}
+\bigskip
+ \textbf{Metoda 360 stopinj} je orodje, s katerim merimo prisotnost oziroma izraženost kompetenc pri posamezniku. Pomaga nam identificirati posameznikove prednosti in njegove šibke točke ter odkriti potenciale za razvoj ter možnosti za izboljšave. Ta metoda je kompleksna in zanesljiva, saj pri njej ocenjujemo kompetence posameznika z več vidikov, z vidika:
+\begin{enumerate}
+ \item nadrejenih,
+ \item sodelavcev na enakem nivoju,
+ \item podrejenih,
+ \item ter z vidika ocenjevanca (samoocena).
+\end{enumerate}
+Na ta način dobimo celostno sliko, ki je lahko v pomoč pri določanju nadaljnjih razvojnih ciljev za posameznika na področjih, kjer se je pokazalo, da je še prostor za izboljšave.
diff --git a/admin/survey/modules/mod_360_1KA/latexkosi/sloven2e.sty b/admin/survey/modules/mod_360_1KA/latexkosi/sloven2e.sty
new file mode 100644
index 0000000..d3c0728
--- /dev/null
+++ b/admin/survey/modules/mod_360_1KA/latexkosi/sloven2e.sty
@@ -0,0 +1,42 @@
+%
+% slovene.sty - prilagoditev zvrsti ARTICLE, BOOK in REPORT slovenscini
+%
+\@ifundefined{slovensko}{\def\slovensko{}}{\endinput}
+\typeout{Document Style Option 'Sloven2e' ver 0.1. / 11-Nov-95 / V.B.}
+
+% naslovi
+
+\def\abstractname{Povzetek}
+\def\appendixname{Dodatek}
+\def\bibname{Literatura}
+\def\ccname{cc}
+\def\chaptername{Poglavje}
+\def\contentsname{Kazalo}
+\def\enclname{Priloge}
+\def\figurename{Slika\ }
+\def\headpagename{Stran}
+\def\headtoname{Komu}
+\def\indexname{Stvarno kazalo}
+\def\listfigurename{Slike}
+\def\listtablename{Tabele}
+\def\partname{Del}
+\def\prefacename{Predgovor}
+\def\seename{glej}
+\def\alsoseename{glej tudi}
+\def\refname{Viri}
+\def\tablename{Tabela\ }
+
+% tekoci datum
+
+\def\today{\number\day. \ifcase\month\or
+ januar\or februar\or marec\or april\or maj\or junij\or
+ julij\or avgust\or september\or oktober\or november\or december\fi
+ \space\number\year}
+
+
+% slovenski narekovaji
+
+\def\lqlq{\leavevmode\hbox{,\kern-.1em,}}
+\def\rqrq{\leavevmode\hbox{`\kern-.1em`}}
+
+\endinput
diff --git a/admin/survey/modules/mod_360_1KA/latexkosi/tabela.tex b/admin/survey/modules/mod_360_1KA/latexkosi/tabela.tex
new file mode 100644
index 0000000..2823ed7
--- /dev/null
+++ b/admin/survey/modules/mod_360_1KA/latexkosi/tabela.tex
@@ -0,0 +1,11 @@
+\documentclass[landscape]{report}
+\usepackage[cp1250]{inputenc}
+\usepackage{csz}
+\usepackage{sloven2e}
+\usepackage{longtable}
+\usepackage{geometry}
+\newgeometry{left=0cm,bottom=0cm}
+\begin{document}
+\footnotesize
+\renewcommand*{\arraystretch}{1.25}
+\renewcommand{\tabcolsep}{1mm} \ No newline at end of file
diff --git a/admin/survey/modules/mod_360_1KA/latexkosi/uvod.tex b/admin/survey/modules/mod_360_1KA/latexkosi/uvod.tex
new file mode 100644
index 0000000..7bdcdec
--- /dev/null
+++ b/admin/survey/modules/mod_360_1KA/latexkosi/uvod.tex
@@ -0,0 +1,7 @@
+\textbf{ANALIZA 360° STOPINJ:}
+\begin{itemize}
+\item je mera povratnih informacij vedenj in kompetenc,
+\item zagotavlja povratne informacije odnosu podjetja (nadrejenih, podrejenih, sodelavcev) do zaposlenega,
+\item obravnava spretnosti kot so: komuniciranje, vodenje, odločanje, ravnanje itd.,
+\item se osredotoča na subjektivna področja, kot so značaj zaposlenega in njegova učinkovitost.
+\end{itemize} \ No newline at end of file
diff --git a/admin/survey/modules/mod_360_1KA/latexkosi/varstvo_osebnih_podatkov.tex b/admin/survey/modules/mod_360_1KA/latexkosi/varstvo_osebnih_podatkov.tex
new file mode 100644
index 0000000..cb31f1e
--- /dev/null
+++ b/admin/survey/modules/mod_360_1KA/latexkosi/varstvo_osebnih_podatkov.tex
@@ -0,0 +1,8 @@
+
+\chapter{Dodatek}
+Vse ocene, izsledki in poročila (bodisi individualna poročila bodisi skupna poročila) vsebujejo osebne in občutljive osebne podatke kandidatov in so zato strogo zaupne narave. Njihova uporaba, posredovanje, dostopnost in arhiviranje mora biti dosledno izvedeno v skladu z Zakonom o varstvu osebnih podatkov (ZVOP-1, Ur.l. RS, št. 86/2004, Ur.l. RS, št. 113/2005-ZInfP, 51/2007-ZUstS-A, 67/2007, 94/2007-UPB1). S predajo teh podatkov Pogodbeniku, se le-ta obvezuje, da bo s temi podatki ravnal v skladu z zgoraj omenjenim zakonom in da prevzame popolno odgovornost za nepravilno uporabo, nepooblaščen dostop ali neupravičeno posredovanje tretjim osebam.
+
+
+
+\chapter{Varstvo osebnih podatkov}
+Vsi podatki o kandidatih (bodisi individualna poročila bodisi skupna poročila), ki vsebujejo psihološke podatke kandidatov ter ocene, izsledke in poročila ocenjevalnega centra so občutljivi podatki in so strogo zaupne narave. Njihova uporaba, posredovanje, dostopnost in arhiviranje mora biti dosledno izvedeno v skladu z Zakonom o varstvu osebnih podatkov (ZVOP-1, Ur.l. RS, št. 86/2004, Ur.l. RS, št. 113/2005-ZInfP, 51/2007-ZUstS-A, 67/2007, 94/2007-UPB1). S predajo teh podatkov Pogodbeniku, se le-ta obvezuje, da bo s temi podatki ravnal v skladu z zgoraj omenjenim zakonom in da prevzame popolno odgovornost za nepravilno uporabo, nepooblaščen dostop ali neupravičeno posredovanje tretjim osebam. \ No newline at end of file
diff --git a/admin/survey/modules/mod_360_1KA/latexkosi/z-noga.tex b/admin/survey/modules/mod_360_1KA/latexkosi/z-noga.tex
new file mode 100644
index 0000000..815ab68
--- /dev/null
+++ b/admin/survey/modules/mod_360_1KA/latexkosi/z-noga.tex
@@ -0,0 +1 @@
+\end{document} \ No newline at end of file
diff --git a/admin/survey/modules/mod_360_1KA/results/.gitignore b/admin/survey/modules/mod_360_1KA/results/.gitignore
new file mode 100644
index 0000000..a3a0c8b
--- /dev/null
+++ b/admin/survey/modules/mod_360_1KA/results/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore \ No newline at end of file
diff --git a/admin/survey/modules/mod_MAZA/class.MAZA.php b/admin/survey/modules/mod_MAZA/class.MAZA.php
new file mode 100644
index 0000000..c430546
--- /dev/null
+++ b/admin/survey/modules/mod_MAZA/class.MAZA.php
@@ -0,0 +1,1944 @@
+<?php
+/**
+ *
+ * MAZA - mobilna aplikacija za anketirance
+ * Class za posiljanje sporocil uporabnikom (v mojih anketah)
+ *
+ * Uroš Podkrižnik 16.10.2017
+ */
+class MAZA {
+
+ var $_ank_id;
+ var $_ank_title;
+ var $_ank_link;
+ var $isRepeaterRunning;
+ //if change is needed, synch with mobile app
+ var $nextpin_token_prefix = '1KAPanel_';
+
+ function __construct($ank_id = 0) {
+ $this->_ank_id = $ank_id;
+ //get survey title and link
+ if($ank_id > 0){
+ SurveyInfo::getInstance()->SurveyInit($ank_id);
+ $this->_ank_title = SurveyInfo::getSurveyColumn('naslov');
+ $this->_ank_link = SurveyInfo::getSurveyLink();
+ }
+ }
+
+ public function display() {
+ global $admin_type, $lang;
+
+ // Izpis vseh poslanih sporocil
+ if ($admin_type == 0) {
+ //navigacija
+ $this->displayNavigation();
+
+ //is survey activated
+ $act = sisplet_query("SELECT active FROM srv_anketa WHERE id='" . $this->_ank_id . "'", 'obj');
+ if($act->active != 1)
+ echo '<p class="red">'.$lang['srv_anketa_noactive2'].'<p>';
+
+ $_sub_action = isset($_GET['m']) ? $_GET['m'] : 'maza_dashboard';
+
+ $active_step[] = array(1 => '', 2 => '', 3 => '', 4 => '', 5 => '', 6 => '', 7 => '');
+
+ switch ($_sub_action) {
+ case 'maza_dashboard':
+ $this -> surveyDescription();
+ echo '<br>';
+ $this -> getUsersStatistics();
+ echo '<br>';
+ $this -> generateNewUsersForm();
+ echo '<br>';
+ $this -> exportIdentifiersForm();
+ break;
+
+ case 'maza_send_notification':
+ // obrazec za posiljanje sporocil
+ $this->sendMessageForm();
+ break;
+
+ case 'maza_set_alarm':
+ // obrazec za posiljanje alarmov
+ $this->setRepeaterForm();
+ echo '<br>';
+ $this->setAlarmForm();
+ echo '<script type="text/javascript">onAlarmsFormsLoad();</script>';
+ break;
+
+ case 'maza_set_geofencing':
+ //obrazec za posiljanje geofences
+ $sql_r = sisplet_query("SELECT COUNT(geofence_on) AS cnt FROM maza_srv_geofences WHERE ank_id='" . $this->_ank_id . "' AND geofence_on=1", 'obj');
+ $this->setGeofencesForm($sql_r->cnt);
+ echo '<script type="text/javascript">onGeofencingFormsLoad('.$this->_ank_id.', '.($sql_r->cnt>0).');</script>';
+ break;
+
+ case 'maza_set_activity':
+ //obrazec za posiljanje aktivnosti
+ $this->setActivityForm();
+ break;
+
+ case 'maza_set_tracking':
+ //obrazec za posiljanje sledenja
+ $this->setTrackingForm();
+ //echo '<script type="text/javascript">onTrackingFormsLoad();</script>';
+ break;
+
+ case 'maza_set_entry':
+ //obrazec za posiljanje sledenja
+ $this->setEntryForm();
+ //echo '<script type="text/javascript">onTrackingFormsLoad();</script>';
+ break;
+
+ default:
+ $active_step['1'] = ' active';
+ break;
+ }
+ if(isset($_GET['FCM_response']))
+ echo '<br><br>'.$_GET['FCM_response'];
+ }
+ }
+
+ function displayNavigation() {
+ global $lang;
+
+ $_sub_action = isset($_GET['m']) ? $_GET['m'] : 'maza_dashboard';
+
+ $active_step[] = array(1 => '', 2 => '', 3 => '', 4 => '', 5 => '', 6 => '', 7 => '');
+
+ switch ($_sub_action) {
+ case 'maza_dashboard':
+ $active_step['1'] = ' active';
+ break;
+
+ case 'maza_send_notification':
+ $active_step['2'] = ' active';
+ break;
+
+ case 'maza_set_alarm':
+ $active_step['3'] = ' active';
+ break;
+
+ case 'maza_set_geofencing':
+ $active_step['4'] = ' active';
+ break;
+
+ case 'maza_set_activity':
+ $active_step['5'] = ' active';
+ break;
+
+ case 'maza_set_tracking':
+ $active_step['6'] = ' active';
+ break;
+
+ case 'maza_set_entry':
+ $active_step['7'] = ' active';
+ break;
+
+ default:
+ $active_step['1'] = ' active';
+ break;
+ }
+
+ echo '<div class="secondNavigation">';
+ echo '<ul class="secondNavigation">';
+
+ echo'<li>';
+ echo '<a class="no-img ' . $active_step[1] . '" href="' . $this->addUrl('maza_dashboard') . '">';
+ echo '<span class="label">' . $lang['srv_telephone_navi_dashboard'] . '</span>';
+ echo '</a>';
+ echo'</li>';
+
+ #space
+ echo'<li class="space">';
+
+ #navigacija
+ echo'<li>';
+ echo '<a class="no-img ' . $active_step[2] . '" href="' . $this->addUrl('maza_send_notification') . '">';
+ echo '<span class="label">' . $lang['srv_maza_send_notification'] . '</span>';
+ echo '</a>';
+ echo'</li>';
+
+ echo'<li class="space">';
+
+ echo'<li>';
+ echo '<a class="no-img ' . $active_step[3] . '" href="' . $this->addUrl('maza_set_alarm') . '">';
+ echo '<span class="label">' . $lang['srv_maza_send_alarm'] . '</span>';
+ echo '</a>';
+ echo'</li>';
+
+ echo'<li class="space">';
+
+ echo'<li>';
+ echo '<div >';
+ echo '<a class="no-img ' . $active_step[4] . '" href="' . $this->addUrl('maza_set_geofencing') . '">';
+ echo '<span class="label">'. $lang['srv_maza_geofencing'] .'</span>';
+ echo '</a>';
+ echo '</div>';
+ echo'</li>';
+
+ echo'<li class="space">';
+
+ echo'<li>';
+ echo '<div >';
+ echo '<a class="no-img ' . $active_step[6] . '" href="' . $this->addUrl('maza_set_tracking') . '">';
+ echo '<span class="label">'. $lang['srv_maza_tracking'] .'</span>';
+ echo '</a>';
+ echo '</div>';
+ echo'</li>';
+
+ echo'<li class="space">';
+
+ echo'<li>';
+ echo '<div >';
+ echo '<a class="no-img ' . $active_step[5] . '" href="' . $this->addUrl('maza_set_activity') . '">';
+ echo '<span class="label">'. $lang['srv_maza_activity'] .'</span>';
+ echo '</a>';
+ echo '</div>';
+ echo'</li>';
+
+ echo'<li class="space">';
+
+ echo'<li>';
+ echo '<div >';
+ echo '<a class="no-img ' . $active_step[7] . '" href="' . $this->addUrl('maza_set_entry') . '">';
+ echo '<span class="label">'. $lang['srv_maza_entry'] .'</span>';
+ echo '</a>';
+ echo '</div>';
+ echo'</li>';
+
+ echo'</ul>';
+ echo '</div>';
+
+ echo '<br class="clr" />';
+ echo '<br class="clr" />';
+ }
+
+ // Obrazec za posiljanje notificationa
+ private function sendMessageForm() {
+ global $lang;
+
+ //FORM FOR NOTIFICATION
+ echo '<fieldset>';
+ echo '<legend>' . $lang['srv_maza_send_notification'] . '</legend>';
+ echo '<form name="maza_send_notification_form" id="maza_send_notification_form" method="post" action="ajax.php?t=MAZA&a=maza_send_notification">';
+ /* echo '<span class="clr bold">'.$lang['srv_notifications_send_reciever'].': </span><input type="text" name="recipient" id="recipient">';
+
+ // Checkboxa za posiljenje vsem uporabnikoom (slo in ang)
+ echo '<div style="padding-top:5px;"><input type="checkbox" value="1" name="recipient_all_slo" id="recipient_all_slo" onClick="recipient_all_disable_email();"> <label for="recipient_all_slo"><span class="clr bold">'.$lang['srv_notifications_send_all_slo'].'</span></label></div>';
+ echo '<div style="padding-top:5px;"><input type="checkbox" value="1" name="recipient_all_ang" id="recipient_all_ang" onClick="recipient_all_disable_email();"> <label for="recipient_all_ang"><span class="clr bold">'.$lang['srv_notifications_send_all_ang'].'</span></label></div><br />';
+ */
+ echo '<input type="hidden" name="maza_action" value="notification">';
+ echo '<input type="hidden" name="ank_id" value="' . $this->_ank_id . '">';
+ echo '<span class="clr bold">' . $lang['srv_notifications_send_title'] . ': </span><input type="text" name="maza_title" id="maza_title" size="35" maxlength="35"><br><br>';
+ echo '<span class="clr bold">' . $lang['srv_notifications_send_text'] . ': </span><input type="text" name="maza_message" id="maza_message" size="45" maxlength="45"></textarea><br><br>';
+
+ echo '<label><input type="checkbox" id="maza_notification_priority" name="maza_notification_priority" value="1" />';
+ echo $lang['srv_maza_notification_priority'] . '</label><br><br>';
+
+ //echo '<label><input type="checkbox" id="maza_notification_sound" name="maza_notification_sound" value="1" />';
+ //echo $lang['srv_maza_notification_sound'] . '</label><br><br>';
+
+ echo '<span class="floatLeft spaceRight"><div class="buttonwrapper">'
+ . '<a class="ovalbutton ovalbutton_orange btn_savesettings" href="#" onclick="$(\'#maza_send_notification_form\').submit();">';
+ echo $lang['srv_notifications_send'];
+ echo '</a></div></span>';
+
+ echo '<br><br><p id="maza_result">' . $_POST['maza_result'] . '</p>';
+
+ echo '</form>';
+ echo '</fieldset><br><br>';
+
+ //FORM FOR WEB PUSH NOTIFICATIONs
+ /*echo '<fieldset>';
+ echo '<legend>PWA notification (test and fixed)</legend>';
+ echo '<form name="maza_send_notification_form_pwa" id="maza_send_notification_form_pwa" method="post" action="ajax.php?t=MAZA&a=maza_send_notification_pwa">';
+ /* echo '<span class="clr bold">'.$lang['srv_notifications_send_reciever'].': </span><input type="text" name="recipient" id="recipient">';
+
+ // Checkboxa za posiljenje vsem uporabnikoom (slo in ang)
+ echo '<div style="padding-top:5px;"><input type="checkbox" value="1" name="recipient_all_slo" id="recipient_all_slo" onClick="recipient_all_disable_email();"> <label for="recipient_all_slo"><span class="clr bold">'.$lang['srv_notifications_send_all_slo'].'</span></label></div>';
+ echo '<div style="padding-top:5px;"><input type="checkbox" value="1" name="recipient_all_ang" id="recipient_all_ang" onClick="recipient_all_disable_email();"> <label for="recipient_all_ang"><span class="clr bold">'.$lang['srv_notifications_send_all_ang'].'</span></label></div><br />';
+ */
+ /*echo '<input type="hidden" name="maza_action" value="notification">';
+ echo '<input type="hidden" name="ank_id" value="' . $this->_ank_id . '">';
+ echo '<span class="clr bold">' . $lang['srv_notifications_send_title'] . ': </span><input type="text" name="wpn_title" id="wpn_title" size="35" value="You have new survey!" maxlength="35"><br><br>';
+ echo '<span class="clr bold">' . $lang['srv_notifications_send_text'] . ': </span><input type="text" name="wpn_message" id="wpn_message" size="45" value="'.$this->_ank_title.'" maxlength="45"></textarea><br><br>';
+
+ //echo '<label><input type="checkbox" id="maza_notification_priority" name="maza_notification_priority" value="1" />';
+ //echo $lang['srv_maza_notification_priority'] . '</label><br><br>';
+
+ //echo '<label><input type="checkbox" id="maza_notification_sound" name="maza_notification_sound" value="1" />';
+ //echo $lang['srv_maza_notification_sound'] . '</label><br><br>';
+
+ echo '<span class="floatLeft spaceRight"><div class="buttonwrapper">'
+ . '<a class="ovalbutton ovalbutton_orange btn_savesettings" href="#" onclick="$(\'#maza_send_notification_form_pwa\').submit();">';
+ echo $lang['srv_notifications_send'];
+ echo '</a></div></span>';
+
+ echo '<br><br><p id="maza_result">' . $_POST['maza_result'] . '</p>';
+
+ echo '</form>';
+ echo '</fieldset>';*/
+ }
+
+ // Obrazec za posiljanje alarmov
+ private function setAlarmForm() {
+ global $lang;
+
+ //FORM FOR ALARM
+ $sql_r = sisplet_query("SELECT * FROM maza_srv_alarms WHERE ank_id='" . $this->_ank_id . "'", 'obj');
+
+ echo '<fieldset>';
+ echo '<legend>' . $lang['srv_maza_send_alarm'] . '</legend>';
+
+ $disabled = '';
+ if ($this->isRepeaterRunning && $sql_r->alarm_on == '1') {
+ echo '<form name="maza_cancel_alarm_form" id="maza_cancel_alarm_form" method="post" action="ajax.php?t=MAZA&a=maza_cancel_alarm">';
+ echo '<input type="hidden" name="ank_id" value="' . $this->_ank_id . '">';
+ //$disabled = ' disabled="disabled"';
+ echo '<i class="red">' . $lang['srv_maza_alarm_on'] . '</i><br>';
+
+ ///////////////////////////////////AKCIJA
+ echo '<span class="spaceRight floatLeft"><div class="buttonwrapper">'
+ . '<a class="ovalbutton ovalbutton_orange btn_savesettings" href="#" onclick="$(\'#maza_cancel_alarm_form\').submit();">';
+ echo $lang['srv_maza_alarm_turn_off'];
+ echo '</a></div></span><br><br>';
+ echo '</form>';
+ }
+
+ //form to set or update alarm
+ echo '<form name="maza_send_alarm_form" id="maza_send_alarm_form" method="post" action="ajax.php?t=MAZA&a=maza_send_notification">';
+ /* echo '<span class="clr bold">'.$lang['srv_notifications_send_reciever'].': </span><input type="text" name="recipient" id="recipient">';
+
+ // Checkboxa za posiljenje vsem uporabnikoom (slo in ang)
+ echo '<div style="padding-top:5px;"><input type="checkbox" value="1" name="recipient_all_slo" id="recipient_all_slo" onClick="recipient_all_disable_email();"> <label for="recipient_all_slo"><span class="clr bold">'.$lang['srv_notifications_send_all_slo'].'</span></label></div>';
+ echo '<div style="padding-top:5px;"><input type="checkbox" value="1" name="recipient_all_ang" id="recipient_all_ang" onClick="recipient_all_disable_email();"> <label for="recipient_all_ang"><span class="clr bold">'.$lang['srv_notifications_send_all_ang'].'</span></label></div><br />';
+ */
+
+ if ((sizeof($sql_r) == 0 || $sql_r->alarm_on == '0') && $this->isRepeaterRunning)
+ echo '<i>' . $lang['srv_maza_alarm_off'] . '</i><br>';
+ else
+ echo '<fieldset disabled="disabled">';
+
+ echo '<input type="hidden" name="maza_action" value="alarm">';
+ echo '<input type="hidden" name="ank_id" value="' . $this->_ank_id . '">';
+
+ echo '<div style="overflow: hidden;">';
+ echo '<div style="float: left;margin-right:5em;">';
+
+ $sql_r->alarm_notif_title = ($sql_r->alarm_notif_title) ? $sql_r->alarm_notif_title : $lang['srv_maza_alarm_default_title'];
+ $sql_r->alarm_notif_message = ($sql_r->alarm_notif_message) ? $sql_r->alarm_notif_message : $lang['srv_maza_alarm_default_message'].$this->_ank_title;
+ echo '<span class="clr bold">' . $lang['srv_notifications_send_title'] . ': </span><input type="text" name="maza_title" id="maza_title" size="35" maxlength="35" '
+ . $disabled . 'value="' . $sql_r->alarm_notif_title . '" disabled="disabled"><br><br>';
+ echo '<span class="clr bold">' . $lang['srv_notifications_send_text'] . ': </span><input type="text" name="maza_message" id="maza_message" size="45" maxlength="45" '
+ . $disabled . 'value="' . $sql_r->alarm_notif_message . '"><br><br>';
+
+ /*echo '<label><input type="checkbox" id="maza_notification_priority" name="maza_notification_priority" ' . $disabled . ' value="1" />';
+ echo $lang['srv_maza_notification_priority'] . '</label><br><br>';*/
+
+ //echo '<label><input type="checkbox" id="maza_notification_sound" name="maza_notification_sound" ' . $disabled . ' value="1" ' . (($sql_r->alarm_notif_sound == 1) ? 'checked' : '') . '/>';
+ //echo $lang['srv_maza_notification_sound'] . '</label><br><br>';
+
+ echo '</div>';
+
+ echo '<div style="float: left;">';
+
+ echo '<span class="clr bold">' . $lang['srv_maza_alarm_when_to_show'] . '</span>';
+
+ echo '
+ <label class="middle"><input type="radio" value="everyday" name="maza_alarm_intervalby" '. (($sql_r->repeat_by == 'everyday') ? "checked" : "") .'>' . $lang['srv_maza_alarm_intervalby_every_day'] . '</label>
+ <label class="middle"><input type="radio" value="daily" name="maza_alarm_intervalby" '. (($sql_r->repeat_by == 'daily') ? "checked" : "") .'>' . $lang['srv_maza_alarm_intervalby_daily'] . '</label>
+ <label class="middle"><input type="radio" value="weekly" name="maza_alarm_intervalby" '. (($sql_r->repeat_by == 'weekly') ? "checked" : "") .'>' . $lang['srv_maza_alarm_intervalby_weekly'] . '</label><br><br>';
+
+ echo '<div id="maza_alarm_div_daily" '. (($sql_r->repeat_by == 'daily') ? '' : 'style="display: none;"') .'>';
+ echo '<span class="clr bold">' . $lang['srv_maza_alarm_daily_every'] . ': </span><input style="float: none;" type="number" name="maza_alarm_everywhichday"'
+ . ' min="2" max="6" ' . $disabled . ' value="' . $sql_r->every_which_day . '">'
+ . '<span class="clr"> ' . $lang['srv_maza_alarm_days'] . '</span><br></div>';
+
+ $weekly_array = (isset($sql_r->day_in_week) && $sql_r->day_in_week != 'null') ? json_decode($sql_r->day_in_week) : array();
+ echo '<div id="maza_alarm_div_weekly" '. (($sql_r->repeat_by == 'weekly') ? '' : 'style="display: none;"') .'>';
+ echo '<span class="clr bold">' . $lang['srv_maza_alarm_day_week'] . ':</span>';
+ echo '<table>';
+ //echo '<caption><span class="clr bold">At time in day:</span></caption>';
+ echo '<tr><td><label class="middle"><input type="checkbox" value="1" name="maza_alarm_dayinweek[]" '. (in_array("1", $weekly_array) ? 'checked' : '') .'>' . $lang['Mon'] . '</label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="2" name="maza_alarm_dayinweek[]" '. (in_array("2", $weekly_array) ? 'checked' : '') .'>' . $lang['Tue'] . '</label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="3" name="maza_alarm_dayinweek[]" '. (in_array("3", $weekly_array) ? 'checked' : '') .'>' . $lang['Wed'] . '</label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="4" name="maza_alarm_dayinweek[]" '. (in_array("4", $weekly_array) ? 'checked' : '') .'>' . $lang['Thu'] . '</label></td></tr>';
+ echo '<td><label class="middle"><input type="checkbox" value="5" name="maza_alarm_dayinweek[]" '. (in_array("5", $weekly_array) ? 'checked' : '') .'>' . $lang['Fri'] . '</label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="6" name="maza_alarm_dayinweek[]" '. (in_array("6", $weekly_array) ? 'checked' : '') .'>' . $lang['Sat'] . '</label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="7" name="maza_alarm_dayinweek[]" '. (in_array("7", $weekly_array) ? 'checked' : '') .'>' . $lang['Sun'] . '</label></td></tr>';
+ echo '</table><br></div>';
+
+ $time_array = (isset($sql_r->time_in_day) && $sql_r->time_in_day != 'null') ? json_decode($sql_r->time_in_day) : array();
+ echo '<span class="clr bold">' . $lang['srv_maza_alarm_time_day'] . ':</span>';
+ echo '<table>';
+ //echo '<caption><span class="clr bold">At time in day:</span></caption>';
+ echo '<tr><td><label class="middle"><input type="checkbox" value="0600" name="maza_alarm_timeinday[]" '. (in_array("0600", $time_array) ? 'checked' : '') .'>6:00 </label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="0700" name="maza_alarm_timeinday[]" '. (in_array("0700", $time_array) ? 'checked' : '') .'>7:00 </label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="0800" name="maza_alarm_timeinday[]" '. (in_array("0800", $time_array) ? 'checked' : '') .'>8:00 </label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="0900" name="maza_alarm_timeinday[]" '. (in_array("0900", $time_array) ? 'checked' : '') .'>9:00 </label></td></tr>';
+ echo '<td><label class="middle"><input type="checkbox" value="1000" name="maza_alarm_timeinday[]" '. (in_array("1000", $time_array) ? 'checked' : '') .'>10:00</label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="1100" name="maza_alarm_timeinday[]" '. (in_array("1100", $time_array) ? 'checked' : '') .'>11:00</label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="1200" name="maza_alarm_timeinday[]" '. (in_array("1200", $time_array) ? 'checked' : '') .'>12:00</label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="1300" name="maza_alarm_timeinday[]" '. (in_array("1300", $time_array) ? 'checked' : '') .'>13:00</label></td></tr>';
+ echo '<td><label class="middle"><input type="checkbox" value="1400" name="maza_alarm_timeinday[]" '. (in_array("1400", $time_array) ? 'checked' : '') .'>14:00</label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="1500" name="maza_alarm_timeinday[]" '. (in_array("1500", $time_array) ? 'checked' : '') .'>15:00</label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="1600" name="maza_alarm_timeinday[]" '. (in_array("1600", $time_array) ? 'checked' : '') .'>16:00</label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="1700" name="maza_alarm_timeinday[]" '. (in_array("1700", $time_array) ? 'checked' : '') .'>17:00</label></td></tr>';
+ echo '<td><label class="middle"><input type="checkbox" value="1800" name="maza_alarm_timeinday[]" '. (in_array("1800", $time_array) ? 'checked' : '') .'>18:00</label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="1900" name="maza_alarm_timeinday[]" '. (in_array("1900", $time_array) ? 'checked' : '') .'>19:00</label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="2000" name="maza_alarm_timeinday[]" '. (in_array("2000", $time_array) ? 'checked' : '') .'>20:00</label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="2100" name="maza_alarm_timeinday[]" '. (in_array("2100", $time_array) ? 'checked' : '') .'>21:00</label></td></tr>';
+ echo '<td><label class="middle"><input type="checkbox" value="2200" name="maza_alarm_timeinday[]" '. (in_array("2200", $time_array) ? 'checked' : '') .'>22:00</label></td>';
+ echo '</table>';
+
+ echo '</div>';
+ echo '</div>';
+
+ if ((sizeof($sql_r) == 0 || $sql_r->alarm_on == '0') && $this->isRepeaterRunning){
+ echo '<span id="maza_submit_alarms" class="floatLeft spaceRight" style="display:none;"><div class="buttonwrapper">'
+ . '<a class="ovalbutton ovalbutton_orange btn_savesettings" href="#" onclick="$(\'#maza_send_alarm_form\').submit();">';
+ echo $lang['srv_notifications_save_send'];
+ echo '</a></div></span>';
+ }
+ else
+ echo '</fieldset>';
+
+ echo '<p id="maza_result">' . $_POST['maza_result'] . '</p>';
+
+ echo '</form>';
+ echo '</fieldset>';
+
+ echo '<br>';
+
+ echo '<fieldset>';
+ echo '<legend>' . $lang['srv_maza_data_export'] . '</legend>';
+ echo '<a href="' . makeEncodedIzvozUrlString('izvoz.php?b=export&m=maza_csv&anketa=' . $this->_ank_id) . '&m=maza_csv&a=alarm_respondents" class="srv_ico">'
+ . '<span class="hover_export_icon"><span class="sprites xls_large"></span></span>' . $lang['srv_maza_alarm_export_respondents'] . '</a>';
+ echo '</fieldset>';
+ }
+
+ // Obrazec za posiljanje alarmov
+ private function setRepeaterForm() {
+ global $lang;
+
+ //FORM FOR ALARM
+ $sql_r = sisplet_query("SELECT * FROM maza_srv_repeaters WHERE ank_id='" . $this->_ank_id . "'", 'obj');
+
+ $dateToday = DateTime::createFromFormat('Y-m-d', date("Y-m-d"));
+ //if start date of repeater exists
+ if($sql_r->datetime_start){
+ $dateTimeStart = new DateTime($sql_r->datetime_start);
+ $dateStart = DateTime::createFromFormat('Y-m-d', $dateTimeStart->format('Y-m-d'));
+ //is repeater start date <= of today? if yes, repeater has started
+ $hasRepeaterStarted = ($dateStart->getTimestamp() <= $dateToday->getTimestamp());
+ $this->isRepeaterRunning = $hasRepeaterStarted && $sql_r->repeater_on == '1';
+ $dateTimeStart = $dateTimeStart->format('d.m.Y');
+ }
+ else
+ $dateTimeStart = "";
+
+ //if end date of repeater exists
+ if($sql_r->datetime_end){
+ $dateTimeEnd = new DateTime($sql_r->datetime_end);
+ $dateEnd = DateTime::createFromFormat('Y-m-d', $dateTimeEnd->format('Y-m-d'));
+ //is repeater end date < of today? if yes, repeater has ended
+ $hasRepeaterEnd = ($dateEnd->getTimestamp() < $dateToday->getTimestamp());
+ $this->isRepeaterRunning = $hasRepeaterStarted && $sql_r->repeater_on == '1' && !$hasRepeaterEnd;
+ $dateTimeEnd = $dateTimeEnd->format('d.m.Y');
+ }
+ else
+ $dateTimeEnd = "";
+
+ echo '<fieldset>';
+ echo '<legend>' . $lang['srv_maza_repeater_title'] . '</legend>';
+
+ $disabled = '';
+ if ($this->isRepeaterRunning) {
+ echo '<form name="maza_cancel_repeater_form" id="maza_cancel_repeater_form" method="post" action="ajax.php?t=MAZA&a=cancelRepeater">';
+ echo '<input type="hidden" name="ank_id" value="' . $this->_ank_id . '">';
+ //$disabled = ' disabled="disabled"';
+ echo '<i class="red">' . $lang['srv_maza_repeater_on'] . '</i><br>';
+
+ ///////////////////////////////////AKCIJA
+ echo '<span id="maza_cancel_repeater" class="floatLeft spaceRight"><div class="buttonwrapper">'
+ . '<a class="ovalbutton ovalbutton_orange btn_savesettings" href="#" onclick="maza_repeater_cancel_click();">';
+ echo $lang['srv_maza_repeater_cancel_repeater'];
+ echo '</a></div></span><br><br>';
+ echo '</form>';
+ }
+
+ //form to set or update alarm
+ echo '<form name="maza_save_repeater_form" id="maza_save_repeater_form" method="post" action="ajax.php?t=MAZA&a=maza_save_repeater">';
+ /* echo '<span class="clr bold">'.$lang['srv_notifications_send_reciever'].': </span><input type="text" name="recipient" id="recipient">';
+
+ // Checkboxa za posiljenje vsem uporabnikoom (slo in ang)
+ echo '<div style="padding-top:5px;"><input type="checkbox" value="1" name="recipient_all_slo" id="recipient_all_slo" onClick="recipient_all_disable_email();"> <label for="recipient_all_slo"><span class="clr bold">'.$lang['srv_notifications_send_all_slo'].'</span></label></div>';
+ echo '<div style="padding-top:5px;"><input type="checkbox" value="1" name="recipient_all_ang" id="recipient_all_ang" onClick="recipient_all_disable_email();"> <label for="recipient_all_ang"><span class="clr bold">'.$lang['srv_notifications_send_all_ang'].'</span></label></div><br />';
+ */
+
+ if ($sql_r->repeater_on > 0 && $hasRepeaterStarted)
+ echo '<fieldset disabled="disabled">';
+
+ //echo '<input type="hidden" name="maza_action" value="repeater">';
+ echo '<input type="hidden" name="ank_id" value="' . $this->_ank_id . '">';
+
+ //echo '<div style="float: left;">';
+
+ echo '<div><div><span class="clr bold">' . $lang['srv_maza_repeater_when_to_start'] . '</span>';
+ echo '<input type="text" id="maza_repeater_date_start" name="maza_repeater_date_start" value="' . $dateTimeStart . '" />';
+ if (!$hasRepeaterStarted && $dateTimeStart)
+ echo '<i id="maza_repeater_start_date_warning"> '.$lang['srv_maza_repeater_edit_warning'].'</i>';
+ echo '</div><br>';
+
+ echo '<div><span class="clr bold">' . $lang['srv_maza_repeater_when_to_end'] . '</span>';
+ echo '<input type="text" id="maza_repeater_date_end" name="maza_repeater_date_end" class="" value="' . $dateTimeEnd . '" />';
+ echo '</div></div><br><br>';
+
+ echo '<div><span class="clr bold">' . $lang['srv_maza_repeater_when_to_repeat'] . '</span>';
+ echo '
+ <label class="middle"><input type="radio" value="everyday" name="maza_repeater_intervalby" '. (($sql_r->repeat_by == 'everyday') ? "checked" : "") .'>' . $lang['srv_maza_alarm_intervalby_every_day'] . '</label>
+ <label class="middle"><input type="radio" value="daily" name="maza_repeater_intervalby" '. (($sql_r->repeat_by == 'daily') ? "checked" : "") .'>' . $lang['srv_maza_alarm_intervalby_daily'] . '</label>
+ <label class="middle"><input type="radio" value="weekly" name="maza_repeater_intervalby" '. (($sql_r->repeat_by == 'weekly') ? "checked" : "") .'>' . $lang['srv_maza_alarm_intervalby_weekly'] . '</label></div><br><br>';
+
+ echo '<div id="maza_repeater_div_daily" '. (($sql_r->repeat_by == 'daily') ? '' : 'style="display: none;"') .'>';
+ echo '<span class="clr bold">' . $lang['srv_maza_alarm_daily_every'] . ': </span><input style="float: none;" type="number" name="maza_repeater_everywhichday"'
+ . ' min="2" max="6" ' . $disabled . ' value="' . $sql_r->every_which_day . '">'
+ . '<span class="clr"> ' . $lang['srv_maza_alarm_days'] . '</span><br></div>';
+
+ $weekly_array = (isset($sql_r->day_in_week) && $sql_r->day_in_week != 'null') ? json_decode($sql_r->day_in_week) : array();
+ echo '<div id="maza_repeater_div_weekly" '. (($sql_r->repeat_by == 'weekly') ? '' : 'style="display: none;"') .'>';
+ echo '<span class="clr bold">' . $lang['srv_maza_alarm_day_week'] . ':</span>';
+ echo '<table>';
+ //echo '<caption><span class="clr bold">At time in day:</span></caption>';
+ echo '<tr><td><label class="middle"><input type="checkbox" value="1" name="maza_repeater_dayinweek[]" '. (in_array("1", $weekly_array) ? 'checked' : '') .'>' . $lang['Mon'] . '</label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="2" name="maza_repeater_dayinweek[]" '. (in_array("2", $weekly_array) ? 'checked' : '') .'>' . $lang['Tue'] . '</label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="3" name="maza_repeater_dayinweek[]" '. (in_array("3", $weekly_array) ? 'checked' : '') .'>' . $lang['Wed'] . '</label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="4" name="maza_repeater_dayinweek[]" '. (in_array("4", $weekly_array) ? 'checked' : '') .'>' . $lang['Thu'] . '</label></td></tr>';
+ echo '<td><label class="middle"><input type="checkbox" value="5" name="maza_repeater_dayinweek[]" '. (in_array("5", $weekly_array) ? 'checked' : '') .'>' . $lang['Fri'] . '</label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="6" name="maza_repeater_dayinweek[]" '. (in_array("6", $weekly_array) ? 'checked' : '') .'>' . $lang['Sat'] . '</label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="7" name="maza_repeater_dayinweek[]" '. (in_array("7", $weekly_array) ? 'checked' : '') .'>' . $lang['Sun'] . '</label></td></tr>';
+ echo '</table><br></div>';
+
+ $time_array = (isset($sql_r->time_in_day) && $sql_r->time_in_day != 'null') ? json_decode($sql_r->time_in_day) : array();
+ echo '<span class="clr bold">' . $lang['srv_maza_alarm_time_day'] . ':</span>';
+ echo '<table id="maza_repeater_div_everyday">';
+ //echo '<caption><span class="clr bold">At time in day:</span></caption>';
+ echo '<tr><td><label class="middle"><input type="checkbox" value="0000" name="maza_repeater_timeinday[]" '. (in_array("0000", $time_array) ? 'checked' : '') .'>0:00 </label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="0030" name="maza_repeater_timeinday[]" '. (in_array("0030", $time_array) ? 'checked' : '') .'>0:30 </label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="0100" name="maza_repeater_timeinday[]" '. (in_array("0100", $time_array) ? 'checked' : '') .'>1:00 </label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="0130" name="maza_repeater_timeinday[]" '. (in_array("0130", $time_array) ? 'checked' : '') .'>1:30 </label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="0200" name="maza_repeater_timeinday[]" '. (in_array("0200", $time_array) ? 'checked' : '') .'>2:00</label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="0230" name="maza_repeater_timeinday[]" '. (in_array("0230", $time_array) ? 'checked' : '') .'>2:30</label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="0300" name="maza_repeater_timeinday[]" '. (in_array("0300", $time_array) ? 'checked' : '') .'>3:00</label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="0330" name="maza_repeater_timeinday[]" '. (in_array("0330", $time_array) ? 'checked' : '') .'>3:30</label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="0400" name="maza_repeater_timeinday[]" '. (in_array("0400", $time_array) ? 'checked' : '') .'>4:00 </label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="0430" name="maza_repeater_timeinday[]" '. (in_array("0430", $time_array) ? 'checked' : '') .'>4:30 </label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="0500" name="maza_repeater_timeinday[]" '. (in_array("0500", $time_array) ? 'checked' : '') .'>5:00 </label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="0530" name="maza_repeater_timeinday[]" '. (in_array("0530", $time_array) ? 'checked' : '') .'>5:30 </label></td></tr>';
+ echo '<tr><td><label class="middle"><input type="checkbox" value="0600" name="maza_repeater_timeinday[]" '. (in_array("0600", $time_array) ? 'checked' : '') .'>6:00</label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="0630" name="maza_repeater_timeinday[]" '. (in_array("0630", $time_array) ? 'checked' : '') .'>6:30</label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="0700" name="maza_repeater_timeinday[]" '. (in_array("0700", $time_array) ? 'checked' : '') .'>7:00</label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="0730" name="maza_repeater_timeinday[]" '. (in_array("0730", $time_array) ? 'checked' : '') .'>7:30</label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="0800" name="maza_repeater_timeinday[]" '. (in_array("0800", $time_array) ? 'checked' : '') .'>8:00 </label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="0830" name="maza_repeater_timeinday[]" '. (in_array("0830", $time_array) ? 'checked' : '') .'>8:30 </label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="0900" name="maza_repeater_timeinday[]" '. (in_array("0900", $time_array) ? 'checked' : '') .'>9:00 </label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="0930" name="maza_repeater_timeinday[]" '. (in_array("0930", $time_array) ? 'checked' : '') .'>9:30 </label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="1000" name="maza_repeater_timeinday[]" '. (in_array("1000", $time_array) ? 'checked' : '') .'>10:00</label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="1030" name="maza_repeater_timeinday[]" '. (in_array("1030", $time_array) ? 'checked' : '') .'>10:30</label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="1100" name="maza_repeater_timeinday[]" '. (in_array("1100", $time_array) ? 'checked' : '') .'>11:00</label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="1130" name="maza_repeater_timeinday[]" '. (in_array("1130", $time_array) ? 'checked' : '') .'>11:30</label></td></tr>';
+ echo '<tr><td><label class="middle"><input type="checkbox" value="1200" name="maza_repeater_timeinday[]" '. (in_array("1200", $time_array) ? 'checked' : '') .'>12:00</label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="1230" name="maza_repeater_timeinday[]" '. (in_array("1230", $time_array) ? 'checked' : '') .'>12:30</label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="1300" name="maza_repeater_timeinday[]" '. (in_array("1300", $time_array) ? 'checked' : '') .'>13:00</label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="1330" name="maza_repeater_timeinday[]" '. (in_array("1330", $time_array) ? 'checked' : '') .'>13:30</label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="1400" name="maza_repeater_timeinday[]" '. (in_array("1400", $time_array) ? 'checked' : '') .'>14:00</label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="1430" name="maza_repeater_timeinday[]" '. (in_array("1430", $time_array) ? 'checked' : '') .'>14:30</label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="1500" name="maza_repeater_timeinday[]" '. (in_array("1500", $time_array) ? 'checked' : '') .'>15:00</label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="1530" name="maza_repeater_timeinday[]" '. (in_array("1530", $time_array) ? 'checked' : '') .'>15:30</label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="1600" name="maza_repeater_timeinday[]" '. (in_array("1600", $time_array) ? 'checked' : '') .'>16:00</label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="1630" name="maza_repeater_timeinday[]" '. (in_array("1630", $time_array) ? 'checked' : '') .'>16:30</label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="1700" name="maza_repeater_timeinday[]" '. (in_array("1700", $time_array) ? 'checked' : '') .'>17:00</label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="1730" name="maza_repeater_timeinday[]" '. (in_array("1730", $time_array) ? 'checked' : '') .'>17:30</label></td></tr>';
+ echo '<tr><td><label class="middle"><input type="checkbox" value="1800" name="maza_repeater_timeinday[]" '. (in_array("1800", $time_array) ? 'checked' : '') .'>18:00</label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="1830" name="maza_repeater_timeinday[]" '. (in_array("1830", $time_array) ? 'checked' : '') .'>18:30</label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="1900" name="maza_repeater_timeinday[]" '. (in_array("1900", $time_array) ? 'checked' : '') .'>19:00</label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="1930" name="maza_repeater_timeinday[]" '. (in_array("1930", $time_array) ? 'checked' : '') .'>19:30</label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="2000" name="maza_repeater_timeinday[]" '. (in_array("2000", $time_array) ? 'checked' : '') .'>20:00</label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="2030" name="maza_repeater_timeinday[]" '. (in_array("2030", $time_array) ? 'checked' : '') .'>20:30</label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="2100" name="maza_repeater_timeinday[]" '. (in_array("2100", $time_array) ? 'checked' : '') .'>21:00</label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="2130" name="maza_repeater_timeinday[]" '. (in_array("2130", $time_array) ? 'checked' : '') .'>21:30</label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="2200" name="maza_repeater_timeinday[]" '. (in_array("2200", $time_array) ? 'checked' : '') .'>22:00</label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="2230" name="maza_repeater_timeinday[]" '. (in_array("2230", $time_array) ? 'checked' : '') .'>22:30</label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="2300" name="maza_repeater_timeinday[]" '. (in_array("2300", $time_array) ? 'checked' : '') .'>23:00</label></td>';
+ echo '<td><label class="middle"><input type="checkbox" value="2330" name="maza_repeater_timeinday[]" '. (in_array("2330", $time_array) ? 'checked' : '') .'>23:30</label></td></tr>';
+ echo '</table>';
+
+ //echo '</div>';
+ echo '<br>';
+
+ //repeater not in motion yet
+ if ((sizeof($sql_r) == 0 || $sql_r->repeater_on < 2) && !$hasRepeaterStarted){
+ echo '<span id="maza_submit_repeater" class="floatLeft spaceRight" style="display:none;"><div class="buttonwrapper">'
+ . '<a class="ovalbutton ovalbutton_orange btn_savesettings" href="#" onclick="maza_repeater_submit_button_click();">';
+ echo $lang['save'];
+ echo '</a></div></span>';
+ }
+ //repeater ended
+ else
+ echo '</fieldset>';
+
+ echo '<p id="maza_result">' . $_POST['maza_result'] . '</p>';
+
+ echo '</form>';
+ echo '</fieldset>';
+ }
+
+ /**
+ * Obrazec za posiljanje geofencev
+ * @global type $admin_type
+ * @global type $global_user_id
+ * @global type $lang
+ * @param type $geocnt - count of all geofences that are on
+ */
+ private function setGeofencesForm($geocnt) {
+ global $lang;
+
+ echo '<fieldset>';
+ echo '<legend>' . $lang['srv_maza_geofencing'] . '</legend>';
+
+ //FORM FOR GEOFENCES
+ if ($geocnt > 0) {
+ echo '<form name="maza_cancel_geofencing_form" id="maza_cancel_geofencing_form" method="post" action="ajax.php?t=MAZA&a=maza_cancel_geofencing">';
+ echo '<input type="hidden" name="ank_id" value="' . $this->_ank_id . '">';
+ //$disabled = ' disabled="disabled"';
+ echo '<i class="red">' . $lang['srv_maza_geofencing_on'] . '</i><br>';
+
+ ///////////////////////////////////AKCIJA
+ echo '<span class="spaceRight floatLeft"><div class="buttonwrapper">'
+ . '<a class="ovalbutton ovalbutton_orange btn_savesettings" href="#" onclick="$(\'#maza_cancel_geofencing_form\').submit();">';
+ echo $lang['srv_maza_geofencing_turn_off'];
+ echo '</a></div></span><br><br>';
+ echo '</form>';
+ }
+ else
+ echo '<i>' . $lang['srv_maza_geofencing_off'] . '</i><br>';
+
+ //form to set or update GEOFENCES
+ echo '<form name="maza_send_geofences_form" id="maza_send_geofences_form" method="post" action="ajax.php?t=MAZA&a=maza_run_geofences">';
+
+ echo '<input type="hidden" name="maza_action" value="geofencing">';
+ echo '<input type="hidden" name="ank_id" value="' . $this->_ank_id . '">';
+
+ //izrisi search box za v mapo
+ echo '<input id="pac-input_maza_map_geofencing" class="pac-input" type="text" style="display:none" onkeypress="return event.keyCode != 13;">';
+
+ //DIV for google map
+ echo '<div id="maza_map_geofencing" style="width:100%;height:400px;margin:0px 30px 0px 0px;border-style: solid;border-width: 1px;border-color: #b4b3b3;"></div>';
+ echo '<br>';
+
+ //NOTIFICATION SETTINGS
+ //FORM FOR geofence notification
+ $sql_r = sisplet_query("SELECT * FROM maza_srv_geofences WHERE ank_id='" . $this->_ank_id . "' LIMIT 1", 'obj');
+
+ echo '<fieldset>';
+ echo '<legend>' . $lang['srv_maza_geofencing_notification'] . '</legend>';
+
+ echo '<div style="overflow: hidden;">';
+ echo '<div style="float: left;margin-right:5em;">';
+
+ if(!$sql_r)
+ $sql_r = (object)array('notif_title'=>'', 'notif_message'=>'', 'notif_sound'=>1, 'trigger_survey' => "1", 'on_transition'=>'dwell', 'after_seconds' => 300);
+
+ $disable = ($sql_r->trigger_survey == null) ? ' disabled="disabled"' : '';
+
+ echo '<div>';
+ echo '<label><input type="checkbox" id="maza_geofence_trigger_survey" name="maza_geofence_trigger_survey" value="1" ' . (($sql_r->trigger_survey == null) ? 'checked' : '') . ' />';
+ echo $lang['srv_maza_geofence_dont_trigger_survey'] . '</label><br><br>';
+ echo '</div>';
+
+ $sql_r->notif_title = ($sql_r->notif_title) ? $sql_r->notif_title : $lang['srv_maza_geofence_default_title'];
+ $sql_r->notif_message = ($sql_r->notif_message) ? $sql_r->notif_message : $lang['srv_maza_alarm_default_message'].$this->_ank_title;
+ echo '<span class="clr bold">' . $lang['srv_notifications_send_title'] . ': </span><input type="text" name="maza_title" id="maza_title" size="35" maxlength="35" '
+ . 'value="' . $sql_r->notif_title . '"'.$disable.'><br><br>';
+ echo '<span class="clr bold">' . $lang['srv_notifications_send_text'] . ': </span><input type="text" name="maza_message" id="maza_message" size="45" maxlength="45" '
+ . 'value="' . $sql_r->notif_message . '"'.$disable.'><br><br>';
+
+ /*echo '<label><input type="checkbox" id="maza_notification_priority" name="maza_notification_priority" ' . $disabled . ' value="1" />';
+ echo $lang['srv_maza_notification_priority'] . '</label><br><br>';*/
+
+ //echo '<label><input type="checkbox" id="maza_notification_sound" name="maza_notification_sound" value="1" ' . (($sql_r->notif_sound == 1) ? 'checked' : '') . '/>';
+ //echo $lang['srv_maza_notification_sound'] . '</label><br><br>';
+
+ echo '</div>';
+
+ echo '<div style="float: left;">';
+
+ echo '<div>';
+ echo '<label><input type="checkbox" id="maza_geofence_location_triggered" name="maza_geofence_location_triggered" value="1" ' . (($sql_r->location_triggered == 1) ? 'checked' : '') . ' />';
+ echo $lang['srv_maza_geofence_location_triggered'] . '</label><br><br>';
+ echo '</div>';
+
+ echo '<span class="clr bold">' . $lang['srv_maza_alarm_when_to_show'] . '</span>';
+
+ echo '
+ <label class="middle"><input type="radio" value="dwell" name="maza_geofence_on_transition" '. (($sql_r->on_transition == 'dwell') ? "checked" : "").'>' . $lang['srv_maza_geofence_dwell'] . '</label>
+ <label class="middle"><input type="radio" value="exit" name="maza_geofence_on_transition" '. (($sql_r->on_transition == 'exit') ? "checked" : "").'>' . $lang['srv_maza_geofence_exit'] . '</label><br><br>';
+
+ echo '<div id="maza_alarm_div_daily">';
+ echo '<span class="clr bold">' . $lang['srv_maza_geofence_after'] . ': </span><input style="float: none;" type="number" name="maza_geofence_after_time"'
+ . ' value="' . $sql_r->after_seconds . '">'
+ . '<span class="clr"> ' . $lang['srv_maza_geofence_time_unit'] . '</span><br></div>';
+
+ echo '</div>';
+ echo '</div>';
+ echo '</fieldset><br>';
+
+ echo '<span id="maza_submit_geofencing" class="floatLeft spaceRight"><div class="buttonwrapper">'
+ . '<a class="ovalbutton ovalbutton_orange btn_savesettings" href="#" onclick="$(\'#maza_send_geofences_form\').submit();">';
+ echo $lang['srv_notifications_save_send'];
+ echo '</a></div></span>';
+
+ echo '<p id="maza_result">' . $_POST['maza_result'] . '</p>';
+
+ echo '</form>';
+ echo '</fieldset>';
+
+ echo '<br>';
+
+ echo '<fieldset>';
+ echo '<legend>' . $lang['srv_maza_data_export'] . '</legend>';
+ echo '<a href="' . makeEncodedIzvozUrlString('izvoz.php?b=export&m=maza_csv&anketa=' . $this->_ank_id) . '&m=maza_csv&a=triggered_geofences_answers" target="_blank" class="srv_ico">'
+ . '<span class="hover_export_icon"><span class="sprites xls_large"></span></span>' . $lang['srv_maza_geofence_export_triggered_answered'] . '</a>';
+ echo '<a href="' . makeEncodedIzvozUrlString('izvoz.php?b=export&m=maza_csv&anketa=' . $this->_ank_id) . '&m=maza_csv&a=triggered_geofences" target="_blank" class="srv_ico">'
+ . '<span class="hover_export_icon"><span class="sprites xls_large"></span></span>' . $lang['srv_maza_geofence_export_triggered'] . '</a>';
+ echo '<a href="' . makeEncodedIzvozUrlString('izvoz.php?b=export&m=maza_csv&anketa=' . $this->_ank_id) . '&m=maza_csv&a=geofences" target="_blank" class="srv_ico">'
+ . '<span class="hover_export_icon"><span class="sprites xls_large"></span></span>' . $lang['srv_maza_geofence_export'] . '</a>';
+ echo '</fieldset>';
+ }
+
+ // Obrazec za posiljanje nextpin aktivnosti
+ private function setActivityForm() {
+ global $lang;
+
+ echo '<fieldset>';
+ echo '<legend>' . $lang['srv_maza_activity'] . '</legend>';
+
+ //FORM FOR activity
+ $sql_r = sisplet_query("SELECT COUNT(activity_on) AS cnt FROM maza_srv_activity WHERE ank_id='" . $this->_ank_id . "' AND activity_on=1", 'obj');
+
+ if ($sql_r->cnt > 0) {
+ echo '<form name="maza_cancel_activity_form" id="maza_cancel_activity_form" method="post" action="ajax.php?t=MAZA&a=maza_cancel_activity">';
+ echo '<input type="hidden" name="ank_id" value="' . $this->_ank_id . '">';
+ //$disabled = ' disabled="disabled"';
+ echo '<i class="red">' . $lang['srv_maza_activity_on'] . '</i><br>';
+
+ ///////////////////////////////////AKCIJA
+ echo '<span class="spaceRight floatLeft"><div class="buttonwrapper">'
+ . '<a class="ovalbutton ovalbutton_orange btn_savesettings" href="#" onclick="$(\'#maza_cancel_activity_form\').submit();">';
+ echo $lang['srv_maza_activity_turn_off'];
+ echo '</a></div></span><br><br>';
+ echo '</form>';
+ }
+ else
+ echo '<i>' . $lang['srv_maza_activity_off'] . '</i><br>';
+
+ //form to set or update activity
+ echo '<form name="maza_send_activity_form" id="maza_send_activity_form" method="post" action="ajax.php?t=MAZA&a=maza_run_activity">';
+
+ echo '<input type="hidden" name="maza_action" value="activity">';
+ echo '<input type="hidden" name="ank_id" value="' . $this->_ank_id . '">';
+
+ //NOTIFICATION SETTINGS
+ //FORM FOR activity notification
+ $sql_r = sisplet_query("SELECT * FROM maza_srv_activity WHERE ank_id='" . $this->_ank_id . "' LIMIT 1", 'obj');
+
+ echo '<fieldset>';
+ echo '<legend>' . $lang['srv_maza_geofencing_notification'] . '</legend>';
+
+ echo '<div style="overflow: hidden;">';
+ echo '<div style="float: left;margin-right:5em;">';
+
+ if(!$sql_r)
+ $sql_r = (object)array('notif_title'=>'', 'notif_message'=>'', 'notif_sound'=>1, 'activity_type'=>'path', 'after_seconds' => 300);
+
+ $sql_r->notif_title = ($sql_r->notif_title) ? $sql_r->notif_title : $lang['srv_maza_geofence_default_title'];
+ $sql_r->notif_message = ($sql_r->notif_message) ? $sql_r->notif_message : $lang['srv_maza_alarm_default_message'].$this->_ank_title;
+ echo '<span class="clr bold">' . $lang['srv_notifications_send_title'] . ': </span><input type="text" name="maza_title" id="maza_title" size="35" maxlength="35" '
+ . 'value="' . $sql_r->notif_title . '"><br><br>';
+ echo '<span class="clr bold">' . $lang['srv_notifications_send_text'] . ': </span><input type="text" name="maza_message" id="maza_message" size="45" maxlength="45" '
+ . 'value="' . $sql_r->notif_message . '"><br><br>';
+
+ /*echo '<label><input type="checkbox" id="maza_notification_priority" name="maza_notification_priority" ' . $disabled . ' value="1" />';
+ echo $lang['srv_maza_notification_priority'] . '</label><br><br>';*/
+
+ //echo '<label><input type="checkbox" id="maza_notification_sound" name="maza_notification_sound" value="1" ' . (($sql_r->notif_sound == 1) ? 'checked' : '') . '/>';
+ //echo $lang['srv_maza_notification_sound'] . '</label><br><br>';
+
+ echo '</div>';
+
+ echo '<div style="float: left;">';
+
+ echo '<span class="clr bold">' . $lang['srv_maza_alarm_when_to_show'] . '</span>';
+
+ echo '
+ <label class="middle"><input type="radio" value="staypoint" name="maza_activity_type" '. (($sql_r->activity_type == 'staypoint') ? "checked" : "") .'>' . $lang['srv_maza_activity_staypoint'] . '</label>
+ <label class="middle"><input type="radio" value="path" name="maza_activity_type" '. (($sql_r->activity_type == 'path') ? "checked" : "") .'>' . $lang['srv_maza_activity_path'] . '</label><br><br>';
+
+ echo '<div id="maza_alarm_div_daily">';
+ echo '<span class="clr bold">' . $lang['srv_maza_activity_after'] . ': </span><input style="float: none;" type="number" name="maza_activity_after_time"'
+ . ' value="' . $sql_r->after_seconds . '">'
+ . '<span class="clr"> ' . $lang['srv_maza_geofence_time_unit'] . '</span><br></div>';
+
+ echo '</div>';
+ echo '</div>';
+ echo '</fieldset><br>';
+
+ echo '<span id="maza_submit_activity" class="floatLeft spaceRight"><div class="buttonwrapper">'
+ . '<a class="ovalbutton ovalbutton_orange btn_savesettings" href="#" onclick="$(\'#maza_send_activity_form\').submit();">';
+ echo $lang['srv_notifications_save_send'];
+ echo '</a></div></span>';
+
+ echo '<p id="maza_result">' . $_POST['maza_result'] . '</p>';
+
+ echo '</form>';
+ echo '</fieldset>';
+ }
+
+ // Obrazec za posiljanje sledenja
+ private function setTrackingForm() {
+ global $lang;
+
+ echo '<fieldset>';
+ echo '<legend>' . $lang['srv_maza_tracking'] . '</legend>';
+
+ //FORM FOR activity
+ $sql_r = sisplet_query("SELECT COUNT(tracking_on) AS cnt FROM maza_srv_tracking WHERE ank_id='" . $this->_ank_id . "' AND tracking_on=1", 'obj');
+
+ if ($sql_r->cnt > 0) {
+ echo '<form name="maza_cancel_tracking_form" id="maza_cancel_tracking_form" method="post" action="ajax.php?t=MAZA&a=maza_cancel_tracking">';
+ echo '<input type="hidden" name="ank_id" value="' . $this->_ank_id . '">';
+ //$disabled = ' disabled="disabled"';
+ echo '<i class="red">' . $lang['srv_maza_tracking_on'] . '</i><br>';
+
+ ///////////////////////////////////AKCIJA
+ echo '<span class="spaceRight floatLeft"><div class="buttonwrapper">'
+ . '<a class="ovalbutton ovalbutton_orange btn_savesettings" href="#" onclick="$(\'#maza_cancel_tracking_form\').submit();">';
+ echo $lang['srv_maza_tracking_turn_off'];
+ echo '</a></div></span><br><br>';
+ echo '</form>';
+ }
+ else
+ echo '<i>' . $lang['srv_maza_tracking_off'] . '</i><br>';
+
+ //form to set or update activity
+ echo '<form name="maza_send_tracking_form" id="maza_send_tracking_form" method="post" action="ajax.php?t=MAZA&a=maza_run_tracking">';
+
+ echo '<input type="hidden" name="maza_action" value="tracking">';
+ echo '<input type="hidden" name="ank_id" value="' . $this->_ank_id . '">';
+
+ //NOTIFICATION SETTINGS
+ //FORM FOR activity notification
+ $sql_r = sisplet_query("SELECT * FROM maza_srv_tracking WHERE ank_id='" . $this->_ank_id . "' LIMIT 1", 'obj');
+
+ echo '<fieldset>';
+ echo '<legend>' . $lang['srv_maza_tracking_settings'] . '</legend>';
+
+ echo '<div style="overflow: hidden;">';
+
+ if(!$sql_r)
+ $sql_r = (object)array('activity_recognition'=>0, 'tracking_accuracy'=>'high', 'interval_wanted' => 30, 'interval_fastes' => 10, 'displacement_min' => 10, 'ar_interval_wanted' => 30);
+
+ echo '<div style="float: left;">';
+
+ echo '<span class="clr bold">' . $lang['srv_maza_tracking_accuracy'] . ': </span>';
+
+ echo '
+ <label><input type="radio" value="high" name="maza_tracking_accuracy" '. (($sql_r->tracking_accuracy == 'high') ? "checked" : "") .'>' . $lang['srv_maza_tracking_accuracy_high'] . '</label>
+ <label><input type="radio" value="balanced" name="maza_tracking_accuracy" '. (($sql_r->tracking_accuracy == 'balanced') ? "checked" : "") .'>' . $lang['srv_maza_tracking_accuracy_balanced'] . '</label><br><br>';
+
+ echo '<div>';
+ echo '<span class="clr bold">' . $lang['srv_maza_tracking_interval_wanted'] . ': </span><input style="float: none;" type="number" name="maza_tracking_interval_wanted"'
+ . ' value="' . $sql_r->interval_wanted . '">'
+ . '<span class="clr"> ' . $lang['srv_maza_geofence_time_unit'] . '</span><br></div>';
+ echo '<div>';
+
+ echo '<div>';
+ echo '<span class="clr bold">' . $lang['srv_maza_tracking_interval_fastes'] . ': </span><input style="float: none;" type="number" name="maza_tracking_interval_fastes"'
+ . ' value="' . $sql_r->interval_fastes . '">'
+ . '<span class="clr"> ' . $lang['srv_maza_geofence_time_unit'] . '</span><br></div>';
+ echo '<div>';
+
+ echo '<div>';
+ echo '<span class="clr bold">' . $lang['srv_maza_tracking_displacement_min'] . ': </span><input style="float: none;" type="number" name="maza_tracking_displacement_min"'
+ . ' value="' . $sql_r->displacement_min . '">'
+ . '<span class="clr"> ' . $lang['srv_maza_tracking_displacement_m'] . '</span><br></div>';
+ echo '</div>';
+
+ echo '<br>';
+
+ echo '<div>';
+ echo '<label><input type="checkbox" id="maza_tracking_activity_recognition" name="maza_tracking_activity_recognition" value="1" ' . (($sql_r->activity_recognition == 1) ? 'checked' : '') .
+ ' onclick="toggleARInterval(this);" />';
+ echo $lang['srv_maza_tracking_activity_recognition'] . '</label><br><br>';
+ echo '</div>';
+
+ echo '<div id="maza_ar_interval_div" '.(($sql_r->activity_recognition == 1) ? '' : 'hidden').'>';
+ echo '<span class="clr bold">' . $lang['srv_maza_tracking_interval_wanted'] . ': </span><input style="float: none;" type="number" name="maza_tracking_ar_interval_wanted"'
+ . ' value="' . $sql_r->ar_interval_wanted . '">'
+ . '<span class="clr"> ' . $lang['srv_maza_geofence_time_unit'] . '</span><br></div>';
+ echo '<div>';
+
+ echo '</div>';
+ echo '</fieldset><br>';
+
+ echo '<span id="maza_submit_tracking" class="floatLeft spaceRight"><div class="buttonwrapper">'
+ . '<a class="ovalbutton ovalbutton_orange btn_savesettings" href="#" onclick="$(\'#maza_send_tracking_form\').submit();">';
+ echo $lang['srv_notifications_save_send'];
+ echo '</a></div></span>';
+
+ echo '<p id="maza_result">' . $_POST['maza_result'] . '</p>';
+
+ echo '</form>';
+ echo '</fieldset>';
+
+ echo '<br>';
+
+ echo '<fieldset>';
+ echo '<legend>' . $lang['srv_maza_data_export'] . '</legend>';
+ echo '<a href="' . makeEncodedIzvozUrlString('izvoz.php?b=export&m=maza_csv&anketa=' . $this->_ank_id) . '&m=maza_csv&a=tracking_locations" target="_blank" class="srv_ico">'
+ . '<span class="hover_export_icon"><span class="sprites xls_large"></span></span>' . $lang['srv_maza_tracking_export_all_locations'] . '</a>';
+ echo '<a href="' . makeEncodedIzvozUrlString('izvoz.php?b=export&m=maza_csv&anketa=' . $this->_ank_id) . '&m=maza_csv&a=tracking_ar" target="_blank" class="srv_ico">'
+ . '<span class="hover_export_icon"><span class="sprites xls_large"></span></span>' . $lang['srv_maza_tracking_export_all_ar'] . '</a>';
+ echo '</fieldset>';
+ }
+
+ // Obrazec za nastavljanje vnosov
+ private function setEntryForm() {
+ global $lang;
+
+ echo '<fieldset>';
+ echo '<legend>' . $lang['srv_maza_entry'] . '</legend>';
+
+ //FORM FOR DATA ENTRIES
+ $sql_r = sisplet_query("SELECT COUNT(entry_on) AS cnt FROM maza_srv_entry WHERE ank_id='" . $this->_ank_id . "' AND entry_on=1", 'obj');
+
+ if ($sql_r->cnt > 0) {
+ echo '<form name="maza_cancel_entry_form" id="maza_cancel_entry_form" method="post" action="ajax.php?t=MAZA&a=maza_cancel_entry">';
+ echo '<input type="hidden" name="ank_id" value="' . $this->_ank_id . '">';
+ //$disabled = ' disabled="disabled"';
+ echo '<i class="red">' . $lang['srv_maza_entry_on'] . '</i><br>';
+
+ ///////////////////////////////////AKCIJA
+ echo '<span class="spaceRight floatLeft"><div class="buttonwrapper">'
+ . '<a class="ovalbutton ovalbutton_orange btn_savesettings" href="#" onclick="$(\'#maza_cancel_entry_form\').submit();">';
+ echo $lang['srv_maza_entry_turn_off'];
+ echo '</a></div></span><br><br>';
+ echo '</form>';
+ }
+ else
+ echo '<i>' . $lang['srv_maza_entry_off'] . '</i><br>';
+
+ //form to set or update entry
+ echo '<form name="maza_send_entry_form" id="maza_send_entry_form" method="post" action="ajax.php?t=MAZA&a=maza_run_entry">';
+
+ echo '<input type="hidden" name="maza_action" value="entry">';
+ echo '<input type="hidden" name="ank_id" value="' . $this->_ank_id . '">';
+
+ $sql_r = sisplet_query("SELECT * FROM maza_srv_entry WHERE ank_id='" . $this->_ank_id . "' LIMIT 1", 'obj');
+
+ echo '<br><div>';
+ echo '<label><input type="checkbox" id="maza_entry_location_check" name="maza_entry_location_check" value="1" ' . (($sql_r->location_check == 1) ? 'checked' : '') . ' />';
+ echo $lang['srv_maza_entry_location_check'] . '</label><br><br>';
+ echo '</div><br>';
+
+ echo '<span id="maza_submit_entry" class="floatLeft spaceRight"><div class="buttonwrapper">'
+ . '<a class="ovalbutton ovalbutton_orange btn_savesettings" href="#" onclick="$(\'#maza_send_entry_form\').submit();">';
+ echo $lang['srv_notifications_save_send'];
+ echo '</a></div></span>';
+
+ echo '<p id="maza_result">' . $_POST['maza_result'] . '</p>';
+
+ echo '</form>';
+ echo '</fieldset>';
+
+ echo '<br>';
+
+ echo '<fieldset>';
+ echo '<legend>' . $lang['srv_maza_data_export'] . '</legend>';
+ echo '<a href="' . makeEncodedIzvozUrlString('izvoz.php?b=export&m=maza_csv&anketa=' . $this->_ank_id) . '&m=maza_csv&a=entry_locations" target="_blank" class="srv_ico">'
+ . '<span class="hover_export_icon"><span class="sprites xls_large"></span></span>' . $lang['srv_maza_tracking_export_all_locations'] . '</a>';
+ echo '</fieldset>';
+ }
+
+ // Obrazec za generiranje novih identifikatorjev
+ private function generateNewUsersForm() {
+ global $lang;
+
+ //FORM FOR NOTIFICATION
+ echo '<fieldset>';
+ echo '<legend>' . $lang['srv_maza_users_generator'] . '</legend>';
+ echo '<form name="maza_generate_users_form" id="maza_generate_users_form" method="post" action="ajax.php?t=MAZA&a=maza_generate_users">';
+
+ echo '<input type="hidden" name="maza_action" value="generate_users">';
+ echo '<input type="hidden" name="ank_id" value="' . $this->_ank_id . '">';
+ echo '<span class="clr bold">' . $lang['srv_maza_users_generator_number'] . ': <input type="text" name="maza_users_generator_number" id="maza_users_generator_number" size="3" maxlength="3" onkeyup="checkNumber(this, 3, 0, true);"></span><br>';
+
+ echo '<span class="floatLeft spaceRight"><div class="buttonwrapper">'
+ . '<a class="ovalbutton ovalbutton_orange btn_savesettings" href="#" onclick="$(\'#maza_generate_users_form\').submit();">';
+ echo $lang['srv_maza_generate'];
+ echo '</a></div></span>';
+
+ echo '</form>';
+ echo '</fieldset>';
+ }
+
+ // Obrazec za urejanje opisa raziskave
+ private function surveyDescription() {
+ global $lang;
+
+ $sql_r = sisplet_query("SELECT srv_description FROM maza_survey WHERE srv_id='" . $this->_ank_id . "'", 'obj');
+
+ //FORM FOR NOTIFICATION
+ echo '<fieldset>';
+ echo '<legend>' . $lang['srv_maza_users_description'] . '</legend>';
+ echo '<form name="maza_survey_description_form" id="maza_survey_description_form" method="post" action="ajax.php?t=MAZA&a=maza_survey_description">';
+
+ echo '<input type="hidden" name="maza_action" value="survey_description">';
+ echo '<input type="hidden" name="ank_id" value="' . $this->_ank_id . '">';
+ echo '<textarea name="srv_maza_users_description" id="srv_maza_users_description" rows="6" maxlength="511">'.$sql_r->srv_description.'</textarea><br><br>';
+
+ echo '<span class="floatLeft spaceRight"><div class="buttonwrapper">'
+ . '<a class="ovalbutton ovalbutton_orange btn_savesettings" href="#" onclick="$(\'#maza_survey_description_form\').submit();">';
+ echo $lang['srv_notifications_save_send'];
+ echo '</a></div></span>';
+
+ echo '</form>';
+ echo '</fieldset>';
+ }
+
+ // Obrazec za izvoz vseh identifikatorjev
+ private function exportIdentifiersForm() {
+ global $lang;
+
+ echo '<fieldset>';
+ echo '<legend>' . $lang['srv_maza_data_export'] . '</legend>';
+ echo '<form name="maza_ident_export_form" id="maza_ident_export_form" method="post" action="'.makeEncodedIzvozUrlString('izvoz.php?b=export&m=maza_csv&anketa=' . $this->_ank_id) . '&m=maza_csv&a=ident_export'.'">';
+
+ echo '<div style="padding-top:5px;"><input type="checkbox" value="1" name="maza_active_ident" id="maza_active_ident" checked> <label for="maza_active_ident"><span class="clr">'.$lang['srv_maza_users_activated'].'</span></label></div>';
+ echo '<div style="padding-top:5px;"><input type="checkbox" value="1" name="maza_inactive_ident" id="maza_inactive_ident" checked> <label for="maza_inactive_ident"><span class="clr">'.$lang['srv_maza_users_inactive'].'</span></label></div>';
+ echo '<div style="padding-top:5px;"><input type="checkbox" value="1" name="maza_deactive_ident" id="maza_deactive_ident" checked> <label for="maza_deactive_ident"><span class="clr">'.$lang['srv_maza_users_deactive'].'</span></label></div><br />';
+
+ echo '<a href="#" onclick="$(\'#maza_ident_export_form\').submit();" class="srv_ico">'
+ . '<span class="hover_export_icon"><span class="sprites xls_large"></span></span>' . $lang['srv_lnk_excel'] . '</a>';
+
+ echo '</form>';
+ echo '</fieldset>';
+
+ //header('location: ' . makeEncodedIzvozUrlString('izvoz.php?b=export&m=maza_csv&anketa=' . $this->_ank_id) . '&m=maza_csv&a=ident_export');
+ }
+
+ // Obrazec za posiljanje notificationa
+ private function getUsersStatistics() {
+ global $lang;
+
+ $Query = "SELECT COUNT(*) cnt FROM maza_user_srv_access AS sa " .
+ "LEFT JOIN (SELECT id, datetime_last_active FROM maza_app_users) AS au " .
+ "ON au.id = sa.maza_user_id WHERE sa.ank_id='$this->_ank_id' AND au.datetime_last_active IS NOT NULL AND datetime_unsubscribed IS NULL;";
+ $resultActivated = sisplet_query($Query, "obj");
+
+ $Query = "SELECT COUNT(*) cnt FROM maza_user_srv_access " .
+ "WHERE ank_id='$this->_ank_id' AND datetime_unsubscribed IS NOT NULL;";
+ $resultDeactivated = sisplet_query($Query, "obj");
+
+ $Query = "SELECT COUNT(*) cnt FROM maza_user_srv_access WHERE ank_id='$this->_ank_id';";
+ $resultAll = sisplet_query($Query, "obj");
+
+ //TABLE OF USERS STATISTICS
+ echo '<fieldset>';
+ echo '<legend>' . $lang['srv_maza_users_statistics'] . '</legend>';
+
+ echo '<span class="dashboard_status_span">' . $lang['srv_maza_users_activated'] . ':</span>' . $resultActivated->cnt.'<br/>';
+ echo '<span class="dashboard_status_span">' . $lang['srv_maza_users_inactive'] . ':</span>' . ($resultAll->cnt - $resultActivated->cnt - $resultDeactivated->cnt) .'<br/>';
+ echo '<span class="dashboard_status_span">' . $lang['srv_maza_users_deactive'] . ':</span>' . $resultDeactivated->cnt .'<br/>';
+ echo '<div class="anl_dash_bt full strong"><span class="dashboard_status_span">'.$lang['srv_maza_users_sum'].': </span>'.$resultAll->cnt.'<br/></div><br/>';
+
+ //echo '<a href="' . makeEncodedIzvozUrlString('izvoz.php?b=export&m=maza_csv&anketa=' . $this->_ank_id) . '&m=maza_csv&a=inactive_identifiers" target="_blank" class="srv_ico"><span class="hover_export_icon"><span class="sprites xls_large"></span></span>' . $lang['srv_lnk_excel'] . ' (' . $lang['srv_maza_users_inactive'] . ')</a>';
+ //echo '<a href="' . makeEncodedIzvozUrlString('izvoz.php?b=export&m=maza_csv&anketa=' . $this->_ank_id) . '&m=maza_csv&a=active_identifiers" target="_blank" class="srv_ico"><span class="hover_export_icon"><span class="sprites xls_large"></span></span>' . $lang['srv_lnk_excel'] . ' (' . $lang['srv_maza_users_activated'] . ')</a>';
+
+ echo '</fieldset>';
+ }
+
+ function addUrl($what) {
+ global $site_url;
+
+ if ($what == null || trim($what) == '') {
+ $what = 'maza_dashboard';
+ }
+ $url = $site_url . 'admin/survey/index.php?anketa=' . $this->_ank_id . '&amp;a=' . A_MAZA . '&amp;m=' . $what;
+
+ return $url;
+ }
+
+ private function send_FCM_message($msg, $action) {
+ //get all registration ids
+ $reg_ids = array();
+ $Query = "SELECT registration_id FROM maza_app_users AS au "
+ . "LEFT JOIN (SELECT maza_user_id, ank_id FROM maza_user_srv_access) AS sa "
+ . "ON au.id = sa.maza_user_id WHERE sa.ank_id='$this->_ank_id' AND "
+ . "au.registration_id != 'NULL' AND au.registration_id != ''";
+ $sql_array = sisplet_query($Query, 'array');
+ //$rql = mysqli_fetch_assoc ($reg_ids);
+ foreach ($sql_array as $pair)
+ array_push($reg_ids, $pair['registration_id']);
+
+ $fields = array
+ (
+ //can send to max 1000 reg_ids at once - split it on 1000 and send each chuck
+ 'registration_ids' => $reg_ids,
+ 'data' => $msg
+ );
+
+ if ((isset($_POST['maza_notification_priority']) && $_POST['maza_notification_priority'] == 1)
+ || $action == 'alarm' || $action == 'geofencing' || $action == 'activity' || $action == 'tracking' || $action == 'entry' || $action == 'all')
+ $fields['priority'] = 'high';
+
+ //do a curl to send notifications
+ $result = $this->send_FCM_mesage_curl($fields);
+ $this->send_FCM_message_navigate($action, $fields, $result);
+ }
+
+ /**
+ * Do a curl to firebase to send notifications to devices
+ * @global type $FCM_server_key - FCM server key
+ * @param type $fields - json object containig FCM registration ids of devices and data to send
+ * @return type - json result of curl output
+ */
+ private function send_FCM_mesage_curl($fields){
+ #API access key from Google API's Console
+ global $FCM_server_key;
+
+ $headers = array
+ (
+ 'Authorization: key=' . $FCM_server_key,
+ 'Content-Type: application/json'
+ );
+ #Send Reponse To FireBase Server
+ $ch = curl_init();
+ curl_setopt($ch, CURLOPT_URL, 'https://fcm.googleapis.com/fcm/send');
+ curl_setopt($ch, CURLOPT_POST, true);
+ curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
+ //curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
+ curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($fields));
+ $result = curl_exec($ch);
+ curl_close($ch);
+
+ #Echo Result Of FireBase Server
+ //error_log($result);
+ //error_log(json_encode($headers));
+ //error_log(json_encode($fields));
+ //error_log(json_encode($result));
+
+ return $result;
+ }
+
+ /**
+ * After sending FCM message, navigate to right submodule
+ * @param type $action - action or name of submodule
+ * @param type $fields - optional (just for test)
+ * @param type $headers - optional (just for test)
+ * @param type $result - optional (just for test)
+ */
+ private function send_FCM_message_navigate($action, $fields, $result){
+ switch ($action) {
+ case 'alarm':
+ $action = '&m=maza_set_alarm';
+ break;
+
+ case 'notification':
+ $action = '&m=maza_send_notification';
+ break;
+
+ case 'geofencing':
+ $action = '&m=maza_set_geofencing';
+ break;
+
+ case 'activity':
+ $action = '&m=maza_set_activity';
+ break;
+
+ case 'tracking':
+ $action = '&m=maza_set_tracking';
+ break;
+
+ case 'entry':
+ $action = '&m=maza_set_entry';
+ break;
+
+ case 'survey_info':
+ $action = '&m=maza_dashboard';
+ break;
+
+ default:
+ $action = '&m=maza_dashboard';
+ break;
+ }
+
+ if($action)
+ header('location: index.php?anketa=' . $this->_ank_id . '&a=maza' . $action . '&FCM_response=' . json_encode($fields, JSON_UNESCAPED_SLASHES). /*json_encode($headers, JSON_UNESCAPED_SLASHES).*/ json_encode($result, JSON_UNESCAPED_SLASHES));
+ }
+
+ public function ajax_sendNotification() {
+ $action = $_POST['maza_action'];
+ $title = $_POST['maza_title'];
+ $message = $_POST['maza_message'];
+ $srv_title = "";
+ $repeat = 0;
+ $repeater = 0;
+ $geofences = 0;
+ $activity = 0;
+ $entry = 0;
+
+ if ($action == 'alarm'){
+ $this->maza_save_alarm($title, $message, /*$_POST['maza_notification_sound']*/1);
+ $sql_a = sisplet_query("SELECT repeat_by, time_in_day, day_in_week, every_which_day FROM maza_srv_alarms WHERE ank_id='" . $this->_ank_id . "'", 'obj');
+ $repeat = array("repeat_by" => $sql_a->repeat_by, "time_in_day" => json_decode($sql_a->time_in_day), "day_in_week" => json_decode($sql_a->day_in_week), "every_which_day" => $sql_a->every_which_day);
+ $sql_r = sisplet_query("SELECT repeat_by, time_in_day, day_in_week, every_which_day, datetime_start, datetime_end FROM maza_srv_repeaters WHERE ank_id='" . $this->_ank_id . "'", 'obj');
+ $repeater = array("repeat_by" => $sql_r->repeat_by, "time_in_day" => json_decode($sql_r->time_in_day), "day_in_week" => json_decode($sql_r->day_in_week), "every_which_day" => $sql_r->every_which_day,
+ "datetime_start" => $sql_r->datetime_start, "datetime_end" => $sql_r->datetime_end);
+ }
+ else if ($action == 'geofencing'){
+ $geofences = $this->getRunningGeofences();
+ }
+ else if ($action == 'activity'){
+ $sql_a = sisplet_query("SELECT id, activity_type, after_seconds FROM maza_srv_activity WHERE ank_id='" . $this->_ank_id . "'", 'obj');
+ $activity = array("id" => $sql_a->id, "activity_type" => $sql_a->activity_type, "after_seconds" => $sql_a->after_seconds);
+
+ $sql_n = sisplet_query("SELECT naslov FROM srv_anketa WHERE id='" . $this->_ank_id . "'", 'obj');
+ $srv_title = $sql_n->naslov;
+ }
+ else if ($action == 'tracking'){
+ $sql_a = sisplet_query("SELECT * FROM maza_srv_tracking WHERE ank_id='" . $this->_ank_id . "'", 'obj');
+ $tracking = array("id" => $sql_a->id, "activity_recognition" => $sql_a->activity_recognition,
+ "tracking_accuracy" => $sql_a->tracking_accuracy, "interval_wanted" => $sql_a->interval_wanted,
+ "interval_fastes" => $sql_a->interval_fastes, "displacement_min" => $sql_a->displacement_min,
+ "ar_interval_wanted" => $sql_a->ar_interval_wanted);
+
+ $sql_n = sisplet_query("SELECT naslov FROM srv_anketa WHERE id='" . $this->_ank_id . "'", 'obj');
+ $srv_title = $sql_n->naslov;
+ }
+ else if ($action == 'entry'){
+ $entry = $this->getRunningEntry();
+ $sql_n = sisplet_query("SELECT naslov FROM srv_anketa WHERE id='" . $this->_ank_id . "'", 'obj');
+ $srv_title = $sql_n->naslov;
+ }
+
+ #prep the bundle
+ $msg = array
+ (
+ 'action' => $action,
+ 'ank_id' => $this->_ank_id,
+ 'message' => $message,
+ 'title' => $title,
+ 'link' => $this->_ank_link,
+ 'srv_title' => $srv_title,
+ 'repeat' => $repeat,
+ 'repeater' => $repeater,
+ 'geofences' => $geofences,
+ 'activity' => $activity,
+ 'tracking' => $tracking,
+ 'entry' => $entry,
+ 'sound' => /*(isset($_POST['maza_notification_sound']) && $_POST['maza_notification_sound'] == 1) ?*/ 1 //: 0
+ );
+
+ $this->send_FCM_message($msg, $action);
+ }
+
+ private function send_FCM_message_pwa($msg, $action) {
+ $reg_ids = sisplet_query("SELECT endpoint_key FROM browser_notifications_respondents", 'onevalarray');
+
+ //get all registration ids
+ /*$reg_ids = array('cJyD7jXFuGY:APA91bGmB4qXhZE2QOxPbjHm8ZTeyslXaejUfyVDmr06FDm-2p76sF2_A8Q0HGm0EZGdJ_O_iUACfJcsXznVWGe5SeDuI9S8F5HgqwZ1d7G2hN0PQiJL7Q8TlqjWCpbajjAWZ_OmxzLU',
+ 'e0jGT0OYYCY:APA91bGRjTI7iAuuvevYEtz9QLg5bQE2ha1L44PLSVg_kkrFn4up7ZeHzh50dW9vOxCch_hdTs-cEmx3HKuKIoxOnvCMuj7faInTkU4t80fxOjL7D1isuEmWXBM52pheEiE9nScF-i63');*/
+ /*$Query = "SELECT registration_id FROM maza_app_users AS au "
+ . "LEFT JOIN (SELECT maza_user_id, ank_id FROM maza_user_srv_access) AS sa "
+ . "ON au.id = sa.maza_user_id WHERE sa.ank_id='$this->_ank_id' AND "
+ . "au.registration_id != 'NULL' AND au.registration_id != ''";
+ $sql_array = sisplet_query($Query, 'array');
+ //$rql = mysqli_fetch_assoc ($reg_ids);
+ foreach ($sql_array as $pair)
+ array_push($reg_ids, $pair['registration_id']);*/
+
+ $fields = array
+ (
+ //can send to max 1000 reg_ids at once - split it on 1000 and send each chuck
+ 'registration_ids' => $reg_ids,
+ 'data' => $msg
+ );
+
+ //do a curl to send notifications
+ $result = $this->send_FCM_mesage_curl($fields);
+ $this->send_FCM_message_navigate($action, $fields, $result);
+ }
+
+ public function ajax_sendNotification_pwa() {
+ $action = $_POST['maza_action'];
+ $title = $_POST['maza_title'];
+ $message = $_POST['maza_message'];
+
+ $sql_n = sisplet_query("SELECT naslov FROM srv_anketa WHERE id='" . $this->_ank_id . "'", 'obj');
+
+ #prep the bundle
+ $msg = array
+ (
+ 'action' => $action,
+ 'ank_id' => $this->_ank_id,
+ 'message' => $message,
+ 'title' => $title,
+ 'link' => $this->_ank_link,
+ 'srv_title' => $sql_n->naslov,
+ 'sound' => /*(isset($_POST['maza_notification_sound']) && $_POST['maza_notification_sound'] == 1) ?*/ 1 //: 0
+ );
+
+ $this->send_FCM_message_pwa($msg, $action);
+ }
+
+ /**
+ * Check if id of maza app user and indentifier match
+ * @param type $maza_uid - id of maza app auser
+ * @param type $maza_identifier - string identifier of maza app user
+ * @return boolean - true if match, false otherwise
+ */
+ public function maza_validate_user($maza_uid, $maza_identifier) {
+ $sql = sisplet_query("SELECT * FROM maza_app_users WHERE id='$maza_uid' AND identifier='$maza_identifier'");
+ if (mysqli_num_rows($sql) > 0)
+ return true;
+ else
+ return false;
+ }
+
+ /**
+ * Update datetime of user last_active
+ * @param type $maza_uid - id of maza app user
+ */
+ public function maza_update_user_active($maza_uid, $registration_id = null) {
+ $registration_id_query = '';
+ if (isset($registration_id) && $registration_id != '')
+ $registration_id_query = ", registration_id = '$registration_id'";
+
+ sisplet_query("UPDATE maza_app_users SET datetime_last_active = NOW()$registration_id_query WHERE id='$maza_uid'");
+ }
+
+ /**
+ * Insert pair of users id's in maza_srv_users table if not already exists
+ * @param type $maza_uid - id of maza app user
+ * @param type $srv_uid - id of survey respondent
+ * @param type $srv_version - timestamp version of survey (important with repeaters)
+ * @param type $tgeofence_id - id of triggered geofence
+ * @param type $tactivity_id - id of triggered activity
+ * @param type $mode - mode of survey (repeater, geofence, activity, entry)
+ */
+ public function maza_save_srv_user($maza_uid, $srv_uid, $srv_version, $tgeofence_id=null, $tactivity_id=null, $mode) {
+ //check if pair already existst in DB
+ $sql = sisplet_query("SELECT * FROM maza_srv_users WHERE maza_user_id='$maza_uid' AND srv_user_id='$srv_uid'");
+ //it is already there
+ if (mysqli_num_rows($sql) > 0)
+ return false;
+ else {
+ if(!$tgeofence_id)
+ $tgeofence_id = 'NULL';
+ if(!$tactivity_id)
+ $tactivity_id = 'NULL';
+
+ //get datetime from version
+ if($srv_version){
+ $myDateTime = new DateTime();
+ $myDateTime->setTimestamp($srv_version);
+ $newDateString = $myDateTime->format('Y-m-d H:i:s');
+ }
+
+ //insert in table
+ sisplet_query("INSERT INTO maza_srv_users (maza_user_id, srv_user_id, srv_version_datetime, tgeof_id, tact_id, mode) VALUES ('" . $maza_uid . "', '" . $srv_uid . "', '$newDateString', $tgeofence_id, $tactivity_id, ".($mode ? "'$mode'" : 'NULL').");");
+ return true;
+ }
+ }
+
+ public function ajax_maza_on_off() {
+ $on_off = json_decode($_POST['on_off']);
+ if (isset($on_off) && $on_off)
+ $this->maza_on();
+ else
+ $this->maza_off();
+ }
+
+
+ public function ajax_maza_cancel_alarm() {
+ $msg = array
+ (
+ 'action' => 'cancel_alarm',
+ 'srv_id' => $this->_ank_id
+ );
+
+ sisplet_query("UPDATE maza_srv_alarms SET alarm_on='0' WHERE ank_id='" . $this->_ank_id . "'");
+
+ $this->send_FCM_message($msg, 'alarm');
+ }
+
+ public function maza_off($ank_id = null) {
+ if($ank_id)
+ $this->_ank_id = $ank_id;
+
+ $this->maza_cancel_repeater_db();
+ $this->maza_cancel_geofencing_db();
+ $this->maza_cancel_entry_db();
+ $this->maza_cancel_activity_db();
+ $this->maza_cancel_tracking_db();
+
+ $msg = array
+ (
+ 'action' => 'cancel_all',
+ 'srv_id' => $this->_ank_id
+ );
+ $this->send_FCM_message($msg, 'all');
+ }
+
+ public function maza_cancel_repeater(){
+ $msg = array
+ (
+ 'action' => 'stop_repeater',
+ 'srv_id' => $this->_ank_id
+ );
+ $this->send_FCM_message($msg, 'alarm');
+
+ $this->maza_cancel_repeater_db();
+ header('location: index.php?anketa=' . $this->_ank_id . '&a=maza&m=maza_set_alarm');
+ }
+
+ public function maza_cancel_repeater_db(){
+ sisplet_query("UPDATE maza_srv_alarms SET alarm_on='0' WHERE ank_id = '" . $this->_ank_id . "'");
+ //for now, we cannot change repeater of survey - repeater_on = 2 means that survey was canceled while repeater was on
+ sisplet_query("UPDATE maza_srv_repeaters SET repeater_on='2', datetime_end=NOW() WHERE ank_id='" . $this->_ank_id . "'");
+ }
+
+ public function maza_on() {
+ $sel = sisplet_query("SELECT COUNT(id) as cnt FROM maza_srv_alarms WHERE ank_id = '" . $this->_ank_id . "';", 'obj');
+ if($sel->cnt == 0)
+ sisplet_query("INSERT INTO maza_srv_alarms (ank_id) VALUES ('" . $this->_ank_id . "')");
+ $sel = sisplet_query("SELECT COUNT(id) as cnt FROM maza_srv_repeaters WHERE ank_id = '" . $this->_ank_id . "';", 'obj');
+ if($sel->cnt == 0)
+ sisplet_query("INSERT INTO maza_srv_repeaters (ank_id) VALUES ('" . $this->_ank_id . "')");
+ $sel = sisplet_query("SELECT COUNT(id) as cnt FROM maza_survey WHERE srv_id = '" . $this->_ank_id . "';", 'obj');
+ if($sel->cnt == 0)
+ sisplet_query("INSERT INTO maza_survey (srv_id) VALUES ('" . $this->_ank_id . "')");
+ }
+
+ private function maza_save_alarm($title, $message, $sound) {
+ //for now, available title is only default
+ sisplet_query("UPDATE maza_srv_alarms SET alarm_on='1', "//alarm_notif_title='$title', "
+ . "alarm_notif_message='$message', alarm_notif_sound='$sound' WHERE ank_id='" . $this->_ank_id . "'");
+ }
+
+ //returns random alphanumerical code
+ public function randomAlphaNumericCode($length) {
+ $token = "";
+ $codeAlphabet = "ABCDEFGHJKLMNOPQRSTUVWXYZ";
+ $codeAlphabet .= "abcdefghijkmnopqrstuvwxyz";
+ $codeAlphabet .= "0123456789";
+ $max = /*strlen($codeAlphabet)-1;*/59; // edited
+
+ for ($i = 0; $i < $length; $i++) {
+ $token .= $codeAlphabet[mt_rand(0, $max)];
+ }
+
+ return $token;
+ }
+
+ /**
+ * Generate new users or
+ * @param type $howManyUsers - number of new users to generate or 'self' for self identifier creation by app via API
+ * @return array array of identifiers or pair of id and identifier if 'self'
+ */
+ public function insertNewUsers ($howManyUsers = 0){
+ //create users from modul
+ if($howManyUsers > 0){
+ $identifiers = array();
+ $query = "BEGIN; ";
+ for($i = 0; $i < $howManyUsers; $i++){
+ $generated_identifier = $this -> randomAlphaNumericCode(8);
+ //$salted_identifier = base64_encode(hash(SHA256, $generated_identifier . $pass_salt));
+
+ array_push($identifiers, $generated_identifier);
+ $query .= "INSERT INTO maza_app_users (identifier) VALUES('$generated_identifier'); INSERT INTO maza_user_srv_access (maza_user_id, ank_id) VALUES(LAST_INSERT_ID(), '$this->_ank_id'); ";
+ }
+ $query .= "COMMIT;";
+ sisplet_query($query, 'multi_query');
+
+ return $identifiers;
+ }
+ //user self creates an identifier (from mobile app via API)
+ elseif($howManyUsers == 'self'){
+ $generated_identifier = $this -> randomAlphaNumericCode(8);
+ sisplet_query("INSERT INTO maza_app_users (identifier, datetime_last_active) VALUES ('".$generated_identifier."', NOW())");
+ $id = mysqli_insert_id($GLOBALS['connect_db']);
+ return array("id"=>$id, "identifier"=>$generated_identifier);
+ }
+ }
+
+ public function ajax_maza_generate_users() {
+ $userNumb = $_POST['maza_users_generator_number'];
+ $this->insertNewUsers($userNumb);
+ header('location: index.php?anketa=' . $this->_ank_id . '&a=maza&m=maza_dashboard');
+ }
+
+ public function ajax_maza_survey_description() {
+ $desc = $_POST['srv_maza_users_description'];
+
+ sisplet_query("UPDATE maza_survey SET srv_description='$desc' WHERE srv_id='" . $this->_ank_id . "'");
+
+ /*$msg = array
+ (
+ 'action' => 'survey_info',
+ 'description' => $desc,
+ 'srv_id' => $this->_ank_id
+ );
+ $this->send_FCM_message($msg, 'survey_info');*/
+ header('location: index.php?anketa=' . $this->_ank_id . '&a=maza&m=maza_dashboard');
+ }
+
+ public function ajax_changeRepeatBy() {
+ $repeatby = $_POST['maza_repeatby'];
+ $table = $_POST['maza_table'];
+ sisplet_query("UPDATE maza_srv_$table SET repeat_by='$repeatby' WHERE ank_id='" . $this->_ank_id . "'");
+ }
+
+ public function ajax_changeTimeInDay() {
+ $time_in_day = json_encode($_POST['maza_time_in_day']);
+ $table = $_POST['maza_table'];
+ sisplet_query("UPDATE maza_srv_$table SET time_in_day='$time_in_day' WHERE ank_id='" . $this->_ank_id . "'");
+ }
+
+ public function ajax_changeDayInWeek() {
+ $day_in_week = json_encode($_POST['maza_day_in_week']);
+ $table = $_POST['maza_table'];
+ sisplet_query("UPDATE maza_srv_$table SET day_in_week='$day_in_week' WHERE ank_id='" . $this->_ank_id . "'");
+ }
+
+ public function ajax_changeEveryWhichDay() {
+ $every_which_day = $_POST['maza_every_which_day'];
+ $table = $_POST['maza_table'];
+ sisplet_query("UPDATE maza_srv_$table SET every_which_day='$every_which_day' WHERE ank_id='" . $this->_ank_id . "'");
+ }
+
+ public function ajax_saveRepeater() {
+ $repeatby = $_POST['maza_repeater_intervalby'];
+ $time_in_day = json_encode($_POST['maza_repeater_timeinday']);
+ $every_which_day = ($_POST['maza_repeater_everywhichday']) ? $_POST['maza_repeater_everywhichday'] : 1;
+ $day_in_week = json_encode($_POST['maza_repeater_dayinweek']);
+ $Start_date = $_POST['maza_repeater_date_start'];
+ $End_date = $_POST['maza_repeater_date_end'];
+
+ if($Start_date){
+ if($End_date){
+ $End_date = DateTime::createFromFormat('d.m.Y', $End_date);
+ $End_date = $End_date->format("Y-m-d");
+ $End_date = "datetime_end='$End_date', ";
+ }
+ $Start_date = DateTime::createFromFormat('d.m.Y', $Start_date);
+ $Start_date = $Start_date->format("Y-m-d");
+
+ sisplet_query("UPDATE maza_srv_repeaters SET repeater_on='1', datetime_start='$Start_date', $End_date"
+ . "every_which_day='$every_which_day', day_in_week='$day_in_week', "
+ . "time_in_day='$time_in_day', repeat_by='$repeatby' WHERE ank_id='" . $this->_ank_id . "'");
+ }
+ header('location: index.php?anketa=' . $this->_ank_id . '&a=maza&m=maza_set_alarm');
+ }
+
+ /**
+ * Insert/save new geofence
+ */
+ function ajax_insert_geofence(){
+ $add = $_POST['address'];
+ $lat = $_POST['lat'];
+ $lng = $_POST['lng'];
+ $rad = $_POST['radius'];
+ $trigger_survey = "NOW()";
+
+ $sql = sisplet_query("SELECT trigger_survey FROM maza_srv_geofences WHERE ank_id=".$this->_ank_id." LIMIT 1", 'obj');
+ if($sql && $sql->trigger_survey==null){
+ $trigger_survey="NULL";
+ }
+
+ //last decimals of coordiates are not exact same in database, because float in mySql is not precise - practical variations are minimal
+ $id = sisplet_query("INSERT INTO maza_srv_geofences (ank_id, address, lat, lng, radius, trigger_survey) "
+ . "VALUES ('$this->_ank_id', '$add', '$lat', '$lng', '$rad', $trigger_survey)", "id");
+
+ echo $id;
+ }
+
+ /**
+ * Update geofence by ID
+ */
+ function ajax_update_geofence(){
+ if($_POST['id']){
+ $update = '';
+ $update .= $_POST['address'] ? "address = '".$_POST['address']."', " : '';
+ $update .= $_POST['lat'] ? "lat = '".$_POST['lat']."', " : '';
+ $update .= $_POST['lng'] ? "lng = '".$_POST['lng']."', " : '';
+ $update .= $_POST['radius'] ? "radius = '".$_POST['radius']."', " : '';
+ $update = substr($update, 0, -2);
+
+ //last decimals of coordiates are not exact same in database, because float in mySql is not precise - practical variations are minimal
+ sisplet_query("UPDATE maza_srv_geofences SET $update WHERE id='".$_POST['id']."'");
+ }
+ }
+
+ /**
+ * Update geofenceinternal name by ID
+ */
+ function ajax_update_geofence_name(){
+ if($_POST['id']){
+ sisplet_query("UPDATE maza_srv_geofences SET name='".$_POST['name']."' WHERE id='".$_POST['id']."'");
+ }
+ }
+
+ /**
+ * Delete geofence by ID
+ */
+ function ajax_delete_geofence(){
+ if($_POST['id']){
+ $sql = sisplet_query("DELETE FROM maza_srv_geofences WHERE id='".$_POST['id']."'");
+ if($sql)
+ echo 'OK';
+ }
+ }
+
+ /**
+ * Get array of geofences for this survey
+ * @return type string JSON array of all geofences for this survey
+ */
+ function ajax_get_all_geofences(){
+ $sql = sisplet_query("SELECT * FROM maza_srv_geofences WHERE ank_id=".$this->_ank_id, 'array');
+ echo json_encode($sql);
+ }
+
+ /**
+ * Calncel all geofences for this survey
+ * Turn geofences off in DB and send cancelation to all subscriptors via FCM
+ */
+ public function maza_cancel_geofencing(){
+ $msg = array
+ (
+ 'action' => 'cancel_geofencing',
+ 'srv_id' => $this->_ank_id
+ );
+ $this->send_FCM_message($msg, 'geofencing');
+
+ $this->maza_cancel_geofencing_db();
+ header('location: index.php?anketa=' . $this->_ank_id . '&a=maza&m=maza_set_geofencing');
+ }
+
+ public function maza_cancel_geofencing_db(){
+ sisplet_query("UPDATE maza_srv_geofences SET geofence_on='0' WHERE ank_id = '" . $this->_ank_id . "'");
+ }
+
+ /**
+ * Run all geofences for this survey
+ * Turn geofences on in DB and send them to subscriptors via FCM
+ */
+ public function maza_run_geofences(){
+ $title = $_POST['maza_title'];
+ $message = $_POST['maza_message'];
+ $sound = /*$_POST['maza_notification_sound']*/1;
+ $transition = $_POST['maza_geofence_on_transition'];
+ $time = $_POST['maza_geofence_after_time'];
+ $location_triggered = $_POST['maza_geofence_location_triggered'];
+ $trigger_survey = $_POST['maza_geofence_trigger_survey'];
+
+ sisplet_query("UPDATE maza_srv_geofences SET geofence_on='1', notif_title='$title', "
+ . "notif_message='$message', notif_sound='$sound', after_seconds='$time', "
+ . "on_transition='$transition', location_triggered='$location_triggered', "
+ . "trigger_survey=".($trigger_survey ? 'NULL' : 'NOW()' )." "
+ . "WHERE ank_id='" . $this->_ank_id . "'");
+
+ $this->ajax_sendNotification();
+ }
+
+ /**
+ * Get array of running geofences for this survey
+ * @return type array of all running geofences for this survey
+ */
+ public function getRunningGeofences(){
+ return sisplet_query("SELECT * FROM maza_srv_geofences WHERE geofence_on=1 AND ank_id='" . $this->_ank_id . "'", 'array');
+ }
+
+ /**
+ * Get object of running data entry for this survey
+ * @return type object of running data entry for this survey
+ */
+ private function getRunningEntry(){
+ return sisplet_query("SELECT * FROM maza_srv_entry WHERE entry_on=1 AND ank_id='" . $this->_ank_id . "'", 'obj');
+ }
+
+ /**
+ * Calncel data entry for this survey
+ * Turn data entry off in DB and send cancelation to all subscriptors via FCM
+ */
+ public function maza_cancel_entry(){
+ $msg = array
+ (
+ 'action' => 'cancel_entry',
+ 'srv_id' => $this->_ank_id
+ );
+ $this->send_FCM_message($msg, 'entry');
+
+ $this->maza_cancel_entry_db();
+ header('location: index.php?anketa=' . $this->_ank_id . '&a=maza&m=maza_set_entry');
+ }
+
+ public function maza_cancel_entry_db(){
+ sisplet_query("UPDATE maza_srv_entry SET entry_on='0' WHERE ank_id = '" . $this->_ank_id . "'");
+ }
+
+ /**
+ * Run all data entry for this survey
+ * Turn data entry on in DB and send them to subscriptors via FCM
+ */
+ public function maza_run_entry(){
+ $location_triggered = $_POST['maza_entry_location_check'];
+
+ $sel = sisplet_query("SELECT COUNT(id) as cnt FROM maza_srv_entry WHERE ank_id = '" . $this->_ank_id . "';", 'obj');
+ if($sel->cnt == 0)
+ sisplet_query("INSERT INTO maza_srv_entry (ank_id, location_check, entry_on) VALUES ('" . $this->_ank_id . "', '$location_triggered', '1')");
+ else
+ sisplet_query("UPDATE maza_srv_entry SET entry_on='1', location_check='$location_triggered' WHERE ank_id='" . $this->_ank_id . "'");
+
+ //if location is on, create system variables for coordinates
+ if($location_triggered == '1'){
+ //is there already system varibles in survey for coordinates
+ $sel = sisplet_query("SELECT COUNT(s.id) as cnt, g.id, s.gru_id, g.ank_id, s.variable FROM srv_spremenljivka as s "
+ . "LEFT JOIN (SELECT id, ank_id FROM srv_grupa) AS g ON g.id = s.gru_id "
+ . "WHERE g.ank_id='$this->_ank_id' AND variable='latitude';", 'obj');
+
+ //sys variables not created yet
+ if($sel->cnt == 0){
+ //create empty variables
+ $ba = new BranchingAjax($this->_ank_id);
+ $spr_lng = $ba->spremenljivka_new(0, 0, 0, 0, true);
+ $spr_lat = $ba->spremenljivka_new(0, 0, 0, 0, true);
+
+ //set system variables
+ sisplet_query("UPDATE srv_spremenljivka SET naslov='latitude', variable='latitude', tip='21', "
+ . "visible='0', sistem='1', variable_custom='1' WHERE id='$spr_lat';");
+ sisplet_query("UPDATE srv_spremenljivka SET naslov='longitude', variable='longitude', tip='21', "
+ . "visible='0', sistem='1', variable_custom='1' WHERE id='$spr_lng';");
+
+ sisplet_query("INSERT INTO srv_vrednost (id, spr_id, naslov, variable, vrstni_red, variable_custom, hidden) VALUES ('', '$spr_lat', 'latitude', 'latitude', '1', '1', '1');");
+ sisplet_query("INSERT INTO srv_vrednost (id, spr_id, naslov, variable, vrstni_red, variable_custom, hidden) VALUES ('', '$spr_lng', 'longitude', 'longitude', '1', '1', '1');");
+
+ Common::getInstance()->updateEditStamp();
+ }
+ }
+ $this->ajax_sendNotification();
+ }
+
+ /**
+ * Run activity for this survey
+ * Turn activity on in DB and send them to subscriptors via FCM
+ */
+ public function maza_run_activity(){
+ $title = $_POST['maza_title'];
+ $message = $_POST['maza_message'];
+ $sound = /*$_POST['maza_notification_sound']*/1;
+ $transition = $_POST['maza_activity_type'];
+ $time = $_POST['maza_activity_after_time'];
+
+ $sel = sisplet_query("SELECT COUNT(id) as cnt FROM maza_srv_activity WHERE ank_id = '" . $this->_ank_id . "';", 'obj');
+ if($sel->cnt > 0)
+ sisplet_query("UPDATE maza_srv_activity SET activity_on='1', notif_title='$title', "
+ . "notif_message='$message', notif_sound='$sound', after_seconds='$time', activity_type='$transition' WHERE ank_id='" . $this->_ank_id . "'");
+ else
+ sisplet_query("INSERT INTO maza_srv_activity (ank_id, activity_on, notif_title, notif_message, notif_sound, after_seconds, activity_type) "
+ . "VALUES ('".$this->_ank_id."', '1', '".$title."', '".$message."', '".$sound."', '".$time."', '".$transition."')");
+
+ $this->ajax_sendNotification();
+ }
+
+ /**
+ * Calncel all activities for this survey
+ * Turn activities off in DB and send cancelation to all subscriptors via FCM
+ */
+ public function maza_cancel_activity(){
+ $msg = array
+ (
+ 'action' => 'cancel_activity',
+ 'srv_id' => $this->_ank_id
+ );
+ $this->send_FCM_message($msg, 'activity');
+
+ $this->maza_cancel_activity_db();
+ header('location: index.php?anketa=' . $this->_ank_id . '&a=maza&m=maza_set_activity');
+ }
+
+ public function maza_cancel_activity_db(){
+ sisplet_query("UPDATE maza_srv_activity SET activity_on='0' WHERE ank_id = '" . $this->_ank_id . "'");
+ }
+
+ /**
+ * Send post request to nextpin API to create new user
+ * @param type $identifier - identifier of user to register on nextpin
+ * @param type $password - passwor to set in nextpin for this user
+ */
+ public function nextpin_create_user($identifier, $password){
+ #credentials to use nextpin API
+ global $NextPinMainToken;
+
+ $fields = array
+ (
+ 'username' => $this->nextpin_token_prefix . $identifier,
+ 'password' => $password
+ );
+
+ $this -> nextpin_API_call($NextPinMainToken, $fields, 'auth/createUser');
+ }
+
+ /**
+ * Send post request to nextpin API to set new activity listener
+ * @param type $identifier - identifier of user to register on nextpin
+ * @param type $password - passwor to set in nextpin for this user
+ */
+ public function nextpin_set_activity_listener($identifier){
+ global $site_url;
+
+ $sql_a = sisplet_query("SELECT id, activity_type, after_seconds FROM maza_srv_activity WHERE ank_id='" . $this->_ank_id . "'", 'obj');
+
+ $target = $sql_a->activity_type == 'path' ? 'P' : 'S';
+
+ $fields = array
+ (
+ 'target' => $target,
+ 'trigger_group' => "1KAPanel_trigger_".$this->_ank_id,
+ 'threshold' => $sql_a->after_seconds,
+ 'host' => $site_url,
+ 'port' => "80",
+ 'path' => "/admin/survey/api/api.php?action=nextpinalarmgetter&act_id=".$sql_a->id."&identifier=".$identifier
+ );
+
+ $this -> nextpin_API_call($this->nextpin_token_prefix.$identifier, $fields, 'alerts/setActivityForUser');
+ }
+
+ /**
+ * Send post request to nextpin API
+ * @param type $token - token/username to use it in request header
+ * @param type $body - data to put it in body of request
+ * @param type $method - method to append in link after .../NextPin/
+ */
+ private function nextpin_API_call($token, $body, $method){
+ $headers = array
+ (
+ 'token: ' . $token,
+ 'Content-Type: application/json'
+ );
+ //error_log(json_encode($body, JSON_UNESCAPED_SLASHES));
+ //error_log(json_encode($headers));
+ #Send Reponse To FireBase Server
+ $ch = curl_init();
+ curl_setopt($ch, CURLOPT_URL, 'http://traffic.ijs.si/NextPin/'.$method);
+ curl_setopt($ch, CURLOPT_POST, true);
+ curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
+ //curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
+ curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($body, JSON_UNESCAPED_SLASHES));
+ $result = curl_exec($ch);
+ curl_close($ch);
+
+ $myfile = fopen("nextpin_test3.txt", "a+") or die("Unable to open file!");
+ //if($this->params['action'] != 'mazaUpdateTrackingLog'){
+ $date = new DateTime();
+ $date = $date->format('d.m.Y H:i:s');
+ //}
+ fwrite($myfile, $date.' nextpin_API_call'."\n");
+ fwrite($myfile, "\n".json_encode($headers)."\n");
+
+ fwrite($myfile, json_encode($body, JSON_UNESCAPED_SLASHES)."\n");
+
+ fwrite($myfile, json_encode($result, JSON_UNESCAPED_SLASHES)."\n");
+
+ $txt = "------------------------------------------------------------------------------------------------\n\n";
+ fwrite($myfile, $txt);
+ fclose($myfile);
+
+ //error_log(json_encode($result));
+ }
+
+ public function writeintxt ($text){
+ $myfile = fopen("nextpin_test3.txt", "a+") or die("Unable to open file!");
+ //if($this->params['action'] != 'mazaUpdateTrackingLog'){
+ $date = new DateTime();
+ $date = $date->format('d.m.Y H:i:s');
+ //}
+ fwrite($myfile, $date.' '.$text."\n");
+
+ $txt = "------------------------------------------------------------------------------------------------\n\n";
+ fwrite($myfile, $txt);
+ fclose($myfile);
+ }
+
+ /**
+ * Run tracking for this survey
+ * Turn tracking on in DB and send them to subscriptors via FCM
+ */
+ public function maza_run_tracking(){
+ $activity_recognition = $_POST['maza_tracking_activity_recognition'];
+ $tracking_accuracy = $_POST['maza_tracking_accuracy'];
+ $interval_wanted = $_POST['maza_tracking_interval_wanted'];
+ $interval_fastes = $_POST['maza_tracking_interval_fastes'];
+ $displacement_min = $_POST['maza_tracking_displacement_min'];
+ $ar_interval_wanted = $_POST['maza_tracking_ar_interval_wanted'];
+
+ $sel = sisplet_query("SELECT COUNT(id) as cnt FROM maza_srv_tracking WHERE ank_id = '" . $this->_ank_id . "';", 'obj');
+ if($sel->cnt > 0)
+ sisplet_query("UPDATE maza_srv_tracking SET tracking_on='1', activity_recognition='$activity_recognition', "
+ . "tracking_accuracy='$tracking_accuracy', interval_wanted='$interval_wanted', "
+ . "interval_fastes='$interval_fastes', displacement_min='$displacement_min', "
+ . "ar_interval_wanted='$ar_interval_wanted' WHERE ank_id='" . $this->_ank_id . "'");
+ else
+ sisplet_query("INSERT INTO maza_srv_tracking (ank_id, tracking_on, activity_recognition, tracking_accuracy, interval_wanted, interval_fastes, displacement_min, ar_interval_wanted) "
+ . "VALUES ('".$this->_ank_id."', '1', '".$activity_recognition."', '".$tracking_accuracy."', '".$interval_wanted."', '".$interval_fastes."', '".$displacement_min."', '".$ar_interval_wanted."')");
+
+ $this->ajax_sendNotification();
+ }
+
+ /**
+ * Calncel all activities for this survey
+ * Turn activities off in DB and send cancelation to all subscriptors via FCM
+ */
+ public function maza_cancel_tracking(){
+ $msg = array
+ (
+ 'action' => 'cancel_tracking',
+ 'srv_id' => $this->_ank_id
+ );
+ $this->send_FCM_message($msg, 'tracking');
+
+ $this->maza_cancel_tracking_db();
+ header('location: index.php?anketa=' . $this->_ank_id . '&a=maza&m=maza_set_tracking');
+ }
+
+ public function maza_cancel_tracking_db(){
+ sisplet_query("UPDATE maza_srv_tracking SET tracking_on='0' WHERE ank_id = '" . $this->_ank_id . "'");
+ }
+
+ public function maza_check_expired_surveys(){
+ $arr = sisplet_query("SELECT ank.id, ank.expire, ank.active, mo.ank_id, mo.modul, mo.vrednost FROM srv_anketa AS ank "
+ . "LEFT JOIN (SELECT * FROM srv_anketa_module) AS mo ON ank.id = mo.ank_id "
+ . "WHERE ank.active = '1' AND ank.expire < CURDATE() AND mo.modul = 'maza' AND mo.vrednost = '1'", 'array');
+
+ if($arr){
+ foreach ($arr as $ank){
+ $this -> maza_off($ank['ank_id']);
+ }
+ }
+ }
+}
+?> \ No newline at end of file
diff --git a/admin/survey/modules/mod_MAZA/class.MAZAExport.php b/admin/survey/modules/mod_MAZA/class.MAZAExport.php
new file mode 100644
index 0000000..cfb6863
--- /dev/null
+++ b/admin/survey/modules/mod_MAZA/class.MAZAExport.php
@@ -0,0 +1,325 @@
+<?php
+
+/**
+ * Created on 23.1.2018
+ *
+ * @author: Uroš Podkrižnik
+ *
+ * @desc: for exports of module MAZA - mobile app for respondents
+ *
+ *
+ */
+class MAZAExport {
+
+ var $_ank_id; // id ankete
+
+ function __construct($ank_id = 0) {
+ $this->_ank_id = $ank_id;
+ }
+
+ /*private function getDataInactiveIdentifiers() {
+ $Query = "SELECT au.datetime_inserted, au.identifier FROM maza_app_users AS au " .
+ "LEFT JOIN (SELECT ank_id, maza_user_id FROM maza_user_srv_access) AS sa " .
+ "ON au.id = sa.maza_user_id WHERE sa.ank_id='$this->_ank_id' AND au.datetime_last_active IS NULL;";
+
+ $podatki = array(array('inserted', 'identifier'));
+
+ $sqlQuery = sisplet_query($Query);
+
+ if (mysqli_num_rows($sqlQuery)) {
+ while ($sql_row = mysqli_fetch_assoc($sqlQuery)) {
+ $podatki[] = array($sql_row['datetime_inserted'], $sql_row['identifier']);
+ }
+ }
+
+ return $podatki;
+ }
+
+ private function getDataActiveIdentifiers() {
+ $Query = "SELECT au.datetime_inserted, au.identifier, au.datetime_last_active, au.deviceInfo, au.tracking_log FROM maza_app_users AS au " .
+ "LEFT JOIN (SELECT ank_id, maza_user_id FROM maza_user_srv_access) AS sa " .
+ "ON au.id = sa.maza_user_id WHERE sa.ank_id='$this->_ank_id' AND au.datetime_last_active IS NOT NULL;";
+
+ $podatki = array(array('inserted', 'identifier', 'last_active', 'device_info', 'tracking_log'));
+
+ $sqlQuery = sisplet_query($Query);
+
+ if (mysqli_num_rows($sqlQuery)) {
+ while ($sql_row = mysqli_fetch_assoc($sqlQuery)) {
+ $podatki[] = array($sql_row['datetime_inserted'], $sql_row['identifier'], $sql_row['datetime_last_active'], $sql_row['deviceInfo'], $sql_row['tracking_log']);
+ }
+ }
+
+ return $podatki;
+ }*/
+
+ private function getDataIdentifiers() {
+ $act = isset($_POST['maza_active_ident']) && $_POST['maza_active_ident'] == 1;
+ $inact = isset($_POST['maza_inactive_ident']) && $_POST['maza_inactive_ident'] == 1;
+ $deact = isset($_POST['maza_deactive_ident']) && $_POST['maza_deactive_ident'] == 1;
+
+ $where = '';
+ if($act && !$inact)
+ $where .= ' AND au.datetime_last_active IS NOT NULL';
+ else if(!$act && $inact && $deact)
+ $where .= ' AND (au.datetime_last_active IS NULL OR sa.datetime_unsubscribed IS NOT NULL)';
+ else if(!$act && $inact)
+ $where .= ' AND au.datetime_last_active IS NULL';
+ if($deact && !$act && !$inact)
+ $where .= ' AND sa.datetime_unsubscribed IS NOT NULL';
+ else if(!$deact)
+ $where .= ' AND sa.datetime_unsubscribed IS NULL';
+
+ $Query = "SELECT au.datetime_inserted, au.identifier, au.datetime_last_active, au.deviceInfo, au.tracking_log, sa.datetime_unsubscribed FROM maza_app_users AS au " .
+ "LEFT JOIN (SELECT ank_id, maza_user_id, datetime_unsubscribed FROM maza_user_srv_access) AS sa " .
+ "ON au.id = sa.maza_user_id WHERE sa.ank_id='$this->_ank_id'$where;";
+
+ $podatki = array(array('inserted', 'identifier', 'last_active', 'device_info', 'tracking_log', 'unsubscribed'));
+
+ $sqlQuery = sisplet_query($Query);
+
+ if (mysqli_num_rows($sqlQuery)) {
+ while ($sql_row = mysqli_fetch_assoc($sqlQuery)) {
+ $podatki[] = array($sql_row['datetime_inserted'], $sql_row['identifier'], $sql_row['datetime_last_active'], $sql_row['deviceInfo'], $sql_row['tracking_log'], $sql_row['datetime_unsubscribed']);
+ }
+ }
+
+ return $podatki;
+ }
+
+ private function getDataTrackingLocations() {
+ $Query = "SELECT au.identifier, ml.maza_user_id, ml.lat, ml.lng, ml.provider, ml.timestamp, ml.accuracy, ml.altitude, "
+ . "ml.bearing, ml.speed, ml.vertical_acc, ml.speed_acc, ml.bearing_acc, ml.extras, ml.is_mock FROM maza_user_locations AS ml "
+ . "LEFT JOIN (SELECT ank_id, maza_user_id, datetime_started FROM maza_user_srv_access) AS sa "
+ . "ON ml.maza_user_id = sa.maza_user_id "
+ . "LEFT JOIN (SELECT id, identifier FROM maza_app_users) AS au ON au.id = ml.maza_user_id "
+ . "WHERE sa.ank_id='$this->_ank_id' AND sa.datetime_started IS NOT NULL AND sa.datetime_started <= ml.timestamp "
+ . "ORDER BY sa.datetime_started, au.identifier, ml.timestamp DESC;";
+
+ $podatki = array(array('Identifier', 'timestamp', 'latitude', 'longitude', 'provider', 'accuracy',
+ 'altitude', 'bearing', 'speed', 'vertical_acc', 'speed_acc', 'bearing_acc', 'extras', 'is_mock'));
+
+ $sqlQuery = sisplet_query($Query);
+
+ if (mysqli_num_rows($sqlQuery)) {
+ while ($row = mysqli_fetch_assoc($sqlQuery)) {
+ $podatki[] = array($row['identifier'], $row['timestamp'], $row['lat'], $row['lng'], $row['provider'],
+ $row['accuracy'], $row['altitude'], $row['bearing'], $row['speed'], $row['vertical_acc'], $row['speed_acc'],
+ $row['bearing_acc'], $row['extras'], $row['is_mock']);
+ }
+ }
+ return $podatki;
+ }
+
+ private function getDataTrackingAR() {
+ $Query = "SELECT au.identifier, ml.maza_user_id, ml.timestamp, ml.in_vehicle, ml.on_bicycle, ml.on_foot, ml.walking, "
+ . "ml.running, ml.still, ml.tilting, ml.unknown FROM maza_user_activity_recognition AS ml "
+ . "LEFT JOIN (SELECT ank_id, maza_user_id, datetime_started FROM maza_user_srv_access) AS sa "
+ . "ON ml.maza_user_id = sa.maza_user_id "
+ . "LEFT JOIN (SELECT id, identifier FROM maza_app_users) AS au ON au.id = ml.maza_user_id "
+ . "WHERE sa.ank_id='$this->_ank_id' AND sa.datetime_started IS NOT NULL AND sa.datetime_started <= ml.timestamp "
+ . "ORDER BY sa.datetime_started, au.identifier, ml.timestamp DESC;";
+
+ $podatki = array(array('identifier', 'timestamp', 'in_vehicle', 'on_bicycle', 'on_foot', 'walking', 'running',
+ 'still', 'tilting', 'unknown'));
+
+ $sqlQuery = sisplet_query($Query);
+
+ if (mysqli_num_rows($sqlQuery)) {
+ while ($row = mysqli_fetch_assoc($sqlQuery)) {
+ $podatki[] = array($row['identifier'], $row['timestamp'], $row['in_vehicle'], $row['on_bicycle'], $row['on_foot'],
+ $row['walking'], $row['running'], $row['still'], $row['tilting'], $row['unknown']);
+ }
+ }
+
+ return $podatki;
+ }
+
+ private function getDataAlarmRespondents() {
+ $Query = "SELECT au.identifier, su.maza_user_id, su.srv_user_id, su.mode, su.srv_version_datetime, res.id, res.recnum, re.ank_id FROM maza_srv_users AS su "
+ . "LEFT JOIN (SELECT ank_id, maza_user_id, datetime_started FROM maza_user_srv_access) AS sa ON su.maza_user_id = sa.maza_user_id "
+ . "LEFT JOIN (SELECT ank_id FROM maza_srv_repeaters) AS re ON re.ank_id = sa.ank_id "
+ . "LEFT JOIN (SELECT id, identifier FROM maza_app_users) AS au ON au.id = su.maza_user_id "
+ . "LEFT JOIN (SELECT id, recnum FROM srv_user) AS res ON res.id = su.srv_user_id "
+ . "WHERE sa.ank_id='$this->_ank_id' AND re.ank_id='$this->_ank_id' AND sa.datetime_started IS NOT NULL AND (mode='repeater' OR (su.geof_id IS NULL AND su.activity_id IS NULL)) "//todo zadnji OR je samo zacasno, pobrisi enkrat po APP verziji 25
+ . "ORDER BY sa.datetime_started, au.identifier, su.srv_version_datetime DESC;";
+
+ $podatki = array(array('identifier', 'recnum', 'time_version'));
+
+ $sqlQuery = sisplet_query($Query);
+
+ if (mysqli_num_rows($sqlQuery)) {
+ while ($row = mysqli_fetch_assoc($sqlQuery)) {
+ $podatki[] = array($row['identifier'], $row['recnum'], $row['srv_version_datetime']);
+ }
+ }
+ return $podatki;
+ }
+
+ private function getDataTriggeredGeofences() {
+ $Query = "SELECT tg.id, tg.maza_user_id, tg.geof_id, tg.triggered_timestamp, tg.enter_timestamp, tg.dwell_timestamp, au.identifier, ge.name, su.maza_user_id, su.srv_user_id, su.srv_version_datetime, su.mode, su.tgeof_id, res.id, res.recnum "
+ . ", ml.maza_user_id, ml.lat, ml.lng, ml.provider, ml.timestamp, ml.accuracy, ml.altitude, ml.bearing, ml.speed, ml.vertical_acc, ml.speed_acc, ml.bearing_acc, ml.extras, ml.is_mock"
+ . " FROM maza_srv_triggered_geofences AS tg "
+ . "LEFT JOIN (SELECT tgeof_id, maza_user_id, lat, lng, provider, timestamp, accuracy, altitude, bearing, speed, vertical_acc, speed_acc, bearing_acc, extras, is_mock FROM maza_user_locations) AS ml ON tg.id = ml.tgeof_id "
+ . "LEFT JOIN (SELECT ank_id, id, name FROM maza_srv_geofences) AS ge ON ge.id = tg.geof_id "
+ . "LEFT JOIN (SELECT ank_id, maza_user_id, datetime_started FROM maza_user_srv_access) AS sa ON tg.maza_user_id = sa.maza_user_id "
+ . "LEFT JOIN (SELECT id, identifier FROM maza_app_users) AS au ON au.id = tg.maza_user_id "
+ . "LEFT JOIN (SELECT maza_user_id, srv_user_id, srv_version_datetime, tgeof_id, mode FROM maza_srv_users) AS su ON su.maza_user_id = tg.maza_user_id AND su.tgeof_id = tg.id "
+ . "LEFT JOIN (SELECT id, recnum FROM srv_user) AS res ON res.id = su.srv_user_id "
+ . "WHERE sa.ank_id='$this->_ank_id' AND ge.ank_id='$this->_ank_id' AND sa.datetime_started IS NOT NULL "
+ . "ORDER BY sa.datetime_started, au.identifier, tg.triggered_timestamp DESC;";
+
+ $podatki = array(array('identifier', 'recnum', 'geofence_id', 'geofence_name', 'triggered_timestamp', 'enter_timestamp', 'dwell_timestamp', 'location_timestamp', 'latitude', 'longitude', 'provider', 'accuracy',
+ 'altitude', 'bearing', 'speed', 'vertical_acc', 'speed_acc', 'bearing_acc', 'extras', 'is_mock'));
+
+ $sqlQuery = sisplet_query($Query);
+
+ if (mysqli_num_rows($sqlQuery)) {
+ while ($row = mysqli_fetch_assoc($sqlQuery)) {
+ $podatki[] = array($row['identifier'], $row['recnum'], $row['geof_id'], $row['name'], $row['triggered_timestamp'], $row['enter_timestamp'], $row['dwell_timestamp'],
+ $row['timestamp'], $row['lat'], $row['lng'], $row['provider'], $row['accuracy'], $row['altitude'], $row['bearing'], $row['speed'], $row['vertical_acc'], $row['speed_acc'],
+ $row['bearing_acc'], $row['extras'], $row['is_mock']);
+ }
+ }
+ return $podatki;
+ }
+
+ private function getDataTriggeredGeofencesAnswers() {
+ $Query = "SELECT tg.id, tg.maza_user_id, tg.geof_id, tg.triggered_timestamp, au.identifier, ge.name, su.maza_user_id, su.srv_user_id, su.srv_version_datetime, su.mode, su.tgeof_id, res.id, res.recnum "
+ . ", ml.maza_user_id, ml.lat, ml.lng, ml.provider, ml.timestamp, ml.accuracy, ml.altitude, ml.bearing, ml.speed, ml.vertical_acc, ml.speed_acc, ml.bearing_acc, ml.extras, ml.is_mock"
+ . " FROM maza_srv_triggered_geofences AS tg "
+ . "LEFT JOIN (SELECT tgeof_id, maza_user_id, lat, lng, provider, timestamp, accuracy, altitude, bearing, speed, vertical_acc, speed_acc, bearing_acc, extras, is_mock FROM maza_user_locations) AS ml ON tg.id = ml.tgeof_id "
+ . "LEFT JOIN (SELECT ank_id, id, name FROM maza_srv_geofences) AS ge ON ge.id = tg.geof_id "
+ . "LEFT JOIN (SELECT ank_id, maza_user_id, datetime_started FROM maza_user_srv_access) AS sa ON tg.maza_user_id = sa.maza_user_id "
+ . "LEFT JOIN (SELECT id, identifier FROM maza_app_users) AS au ON au.id = tg.maza_user_id "
+ . "LEFT JOIN (SELECT maza_user_id, srv_user_id, srv_version_datetime, tgeof_id, mode FROM maza_srv_users) AS su ON su.maza_user_id = tg.maza_user_id AND su.tgeof_id = tg.id "
+ . "LEFT JOIN (SELECT id, recnum FROM srv_user) AS res ON res.id = su.srv_user_id "
+ . "WHERE sa.ank_id='$this->_ank_id' AND ge.ank_id='$this->_ank_id' AND sa.datetime_started IS NOT NULL AND su.mode='geofence' "
+ . "ORDER BY res.recnum DESC;";
+
+ $podatki = array(array('identifier', 'recnum', 'geofence_id', 'geofence_name', 'triggered_timestamp', 'location_timestamp', 'latitude', 'longitude', 'provider', 'accuracy',
+ 'altitude', 'bearing', 'speed', 'vertical_acc', 'speed_acc', 'bearing_acc', 'extras', 'is_mock'));
+
+ $sqlQuery = sisplet_query($Query);
+
+ if (mysqli_num_rows($sqlQuery)) {
+ while ($row = mysqli_fetch_assoc($sqlQuery)) {
+ $podatki[] = array($row['identifier'], $row['recnum'], $row['geof_id'], $row['name'], $row['triggered_timestamp'], $row['timestamp'], $row['lat'], $row['lng'], $row['provider'],
+ $row['accuracy'], $row['altitude'], $row['bearing'], $row['speed'], $row['vertical_acc'], $row['speed_acc'],
+ $row['bearing_acc'], $row['extras'], $row['is_mock']);
+ }
+ }
+ return $podatki;
+ }
+
+ private function getDataEntryLocations() {
+ $Query = "SELECT au.identifier, su.maza_user_id, su.srv_user_id, su.srv_version_datetime, su.mode, res.id, res.recnum, su.loc_id, ml.id "
+ . ", ml.maza_user_id, ml.lat, ml.lng, ml.provider, ml.timestamp, ml.accuracy, ml.altitude, ml.bearing, ml.speed, ml.vertical_acc, ml.speed_acc, ml.bearing_acc, ml.extras, ml.is_mock"
+ . " FROM maza_srv_users AS su "
+ . "LEFT JOIN (SELECT ank_id, maza_user_id, datetime_started FROM maza_user_srv_access) AS sa ON su.maza_user_id = sa.maza_user_id "
+ . "LEFT JOIN (SELECT id, identifier FROM maza_app_users) AS au ON au.id = su.maza_user_id "
+ . "LEFT JOIN (SELECT * FROM maza_user_locations) AS ml ON su.maza_user_id = ml.maza_user_id AND su.loc_id = ml.id "
+ . "LEFT JOIN (SELECT id, recnum FROM srv_user) AS res ON res.id = su.srv_user_id "
+ . "WHERE sa.ank_id='$this->_ank_id' AND sa.datetime_started IS NOT NULL AND su.mode='entry' "
+ . "ORDER BY res.recnum DESC;";
+
+ $podatki = array(array('identifier', 'recnum', 'entry_timestamp', 'location_timestamp', 'latitude', 'longitude', 'provider', 'accuracy',
+ 'altitude', 'bearing', 'speed', 'vertical_acc', 'speed_acc', 'bearing_acc', 'extras', 'is_mock'));
+
+ $sqlQuery = sisplet_query($Query);
+
+ if (mysqli_num_rows($sqlQuery)) {
+ while ($row = mysqli_fetch_assoc($sqlQuery)) {
+ $podatki[] = array($row['identifier'], $row['recnum'], $row['srv_version_datetime'], $row['timestamp'], $row['lat'], $row['lng'], $row['provider'],
+ $row['accuracy'], $row['altitude'], $row['bearing'], $row['speed'], $row['vertical_acc'], $row['speed_acc'],
+ $row['bearing_acc'], $row['extras'], $row['is_mock']);
+ }
+ }
+ return $podatki;
+ }
+
+ private function getDataGeofences() {
+ $Query = "SELECT * FROM maza_srv_geofences WHERE ank_id='$this->_ank_id' ORDER BY id;";
+
+ $podatki = array(array('id', 'survey_id', 'geofence_on', 'center_latitude', 'center_longitude', 'radius', 'center_address', 'name',
+ 'notification_title', 'notification_message', 'notification_sound', 'on_transition', 'after_seconds', 'location_after_triggered'));
+
+ $sqlQuery = sisplet_query($Query);
+
+ if (mysqli_num_rows($sqlQuery)) {
+ while ($row = mysqli_fetch_assoc($sqlQuery)) {
+ $podatki[] = array($row['id'], $row['ank_id'], $row['geofence_on'], $row['lat'], $row['lng'], $row['radius'], $row['address'], $row['name'], $row['notif_title'],
+ $row['notif_message'], $row['notif_sound'], $row['on_transition'], $row['after_seconds'], $row['location_triggered']);
+ }
+ }
+
+ return $podatki;
+ }
+
+ private function exportCSVTable($data, $name) {
+ // Izvozimo CSV
+ $fp = fopen('php://output', 'w');
+
+ header('Content-Type: application/csv charset=UTF-8');
+ header('Content-Disposition: attachement; filename="'.$name.'_' . time() .'_'. $this->_ank_id . '.csv";');
+ echo "\xEF\xBB\xBF"; // UTF-8 BOM
+
+ foreach ($data as $row) {
+ fputcsv($fp, $row, ',');
+ }
+
+ fclose($fp);
+ }
+
+ public function exportCSVIdentifiers(){
+ $data = $this->getDataIdentifiers();
+ $this->exportCSVTable($data, 'maza_identifiers');
+ }
+
+ /*public function exportCSVInactiveIdentifiers(){
+ $data = $this->getDataInactiveIdentifiers();
+ $this->exportCSVTable($data, 'maza_inactive');
+ }
+
+ public function exportCSVActiveIdentifiers(){
+ $data = $this->getDataActiveIdentifiers();
+ $this->exportCSVTable($data, 'maza_active');
+ }*/
+
+ public function exportCSVTrackingLocations(){
+ $data = $this->getDataTrackingLocations();
+ $this->exportCSVTable($data, 'maza_tracking_locations');
+ }
+
+ public function exportCSVTrackingAR(){
+ $data = $this->getDataTrackingAR();
+ $this->exportCSVTable($data, 'maza_tracking_ar');
+ }
+
+ public function exportCSVEntryLocations(){
+ $data = $this->getDataEntryLocations();
+ $this->exportCSVTable($data, 'maza_entry_locations');
+ }
+
+ public function exportCSVTriggeredGeofences(){
+ $data = $this->getDataTriggeredGeofences();
+ $this->exportCSVTable($data, 'maza_triggered_geofences');
+ }
+
+ public function exportCSVTriggeredGeofencesAnswered(){
+ $data = $this->getDataTriggeredGeofencesAnswers();
+ $this->exportCSVTable($data, 'maza_triggered_geofences_answers');
+ }
+
+ public function exportCSVGeofences(){
+ $data = $this->getDataGeofences();
+ $this->exportCSVTable($data, 'maza_geofences');
+ }
+
+ public function exportCSVAlarmRespondets(){
+ $data = $this->getDataAlarmRespondents();
+ $this->exportCSVTable($data, 'maza_alarm_respondets');
+ }
+}
+
+?> \ No newline at end of file
diff --git a/admin/survey/modules/mod_MAZA/css/MAZA.css b/admin/survey/modules/mod_MAZA/css/MAZA.css
new file mode 100644
index 0000000..8793fc2
--- /dev/null
+++ b/admin/survey/modules/mod_MAZA/css/MAZA.css
@@ -0,0 +1,109 @@
+/**
+*Uroš Podkrižnik 12.10.2017
+*
+*za modul MAZA - mobilna aplikacija za anketirance (projekt ARRS 2017) mobilno zbiranje podatkov
+*/
+#MAZA{
+ margin: 60px 35px;
+ min-height: 500px;
+ padding: 5px 1% 0 13px;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/*KOPIJA OD NOTIFICATIONS*/
+#MAZA .sent_list,
+#MAZA .recieved_list{
+ display: inline;
+ float: left;
+
+ width: 470px;
+ min-height: 200px;
+ margin-right: 60px;
+}
+#MAZA .sent_list ul,
+#MAZA .recieved_list ul{
+ padding-left: 0;
+}
+#MAZA .sent_list ul li,
+#MAZA .recieved_list ul li{
+ list-style-type: none;
+
+ margin: 5px 0;
+ padding: 5px 8px;
+
+ background-color: #eff2f7;
+ border: 1px #eff2f7 solid;
+}
+#MAZA .sent_list ul li.unread,
+#MAZA .recieved_list ul li.unread{
+ background-color: #d8dfea;
+}
+
+#MAZA .recieved_list ul li:hover,
+#MAZA .recieved_list ul li.active{
+ cursor: pointer;
+
+ background-color: #d8dfea;
+ border: 1px #6d87ad solid;
+}
+
+#MAZA #message{
+ display: inline;
+ float: left;
+
+ margin-top: 30px;
+ padding: 20px;
+
+ width: 415px;
+
+ background-color: #eff2f7;
+}
+
+#MAZA .send_form{
+ display: inline;
+ float: left;
+
+ margin-top: 30px;
+ padding: 20px;
+
+ width: 415px;
+
+ background-color: #eff2f7;
+}
+#MAZA .send_form input[type="text"],
+#MAZA .send_form textarea{
+ width: 400px;
+ padding: 3px 5px;
+
+ border: 1px solid #c6c6c6 !important;
+ color: #333 !important;
+} \ No newline at end of file
diff --git a/admin/survey/modules/mod_MAZA/info MAZA.txt b/admin/survey/modules/mod_MAZA/info MAZA.txt
new file mode 100644
index 0000000..e43b360
--- /dev/null
+++ b/admin/survey/modules/mod_MAZA/info MAZA.txt
@@ -0,0 +1 @@
+Mobilna Aplikacija Za Anketirance \ No newline at end of file
diff --git a/admin/survey/modules/mod_MAZA/js/MAZA.js b/admin/survey/modules/mod_MAZA/js/MAZA.js
new file mode 100644
index 0000000..a229c26
--- /dev/null
+++ b/admin/survey/modules/mod_MAZA/js/MAZA.js
@@ -0,0 +1,731 @@
+/**
+ * modul MAZA - mobilna aplikacija za anketirance
+ * Uroš Podkrižnik 17.10.2017
+ */
+
+//default number of meters of radius for geofences
+var maza_default_radius = 50;
+//days relative to today to start date of repeater
+var maza_start_day_repeater = -1;
+//days relative to today to end date of repeater
+var maza_end_day_repeater = 1;
+//is geofencing on
+var geofencing_on = false;
+
+function maza_on_off() {
+ $.post('ajax.php?t=MAZA&a=maza_on_off', {on_off: $('#advanced_module_maza').is(':checked'), anketa: srv_meta_anketa_id});
+}
+
+function doMAZAInactiveUsersExportCSV() {
+ $.post('ajax.php?t=MAZA&a=InactiveUsersExportCSV', {anketa: srv_meta_anketa_id});
+}
+
+function onAlarmsFormsLoad() {
+ var maza_submit_repeater = $('#maza_submit_repeater');
+ var maza_submit_alarms = $('#maza_submit_alarms');
+ //array of range from - to for input everywhichday in form of alarms or repeater
+ var maza_everywhichday_range = [2, 6];
+
+ //ALARM
+ $('input[name="maza_title"]').bind('input', function () {
+ maza_toggle_submit_alarms();
+ });
+ $('input[name="maza_message"]').bind('input', function () {
+ maza_toggle_submit_alarms();
+ });
+ $('input[name="maza_alarm_intervalby"]').bind('change', function () {
+ $('#maza_alarm_div_weekly').toggle(($(this).val() === 'weekly'));
+ $('#maza_alarm_div_daily').toggle(($(this).val() === 'daily'));
+ maza_toggle_submit_alarms();
+ $.post('ajax.php?t=MAZA&a=changeRepeatBy', {anketa: srv_meta_anketa_id, maza_repeatby: $(this).val(), maza_table: "alarms"});
+ });
+ $('input[name="maza_alarm_timeinday[]"]').bind('change', function () {
+ var times = [];
+ $('input:checkbox[name="maza_alarm_timeinday[]"]:checked').each(function () {
+ times.push($(this).val());
+ });
+ maza_toggle_submit_alarms();
+ $.post('ajax.php?t=MAZA&a=changeTimeInDay', {anketa: srv_meta_anketa_id, maza_time_in_day: times, maza_table: "alarms"});
+ });
+ $('input[name="maza_alarm_dayinweek[]"]').bind('change', function () {
+ var times = [];
+ $('input:checkbox[name="maza_alarm_dayinweek[]"]:checked').each(function () {
+ times.push($(this).val());
+ });
+ maza_toggle_submit_alarms();
+ $.post('ajax.php?t=MAZA&a=changeDayInWeek', {anketa: srv_meta_anketa_id, maza_day_in_week: times, maza_table: "alarms"});
+ });
+ $('input[name="maza_alarm_everywhichday"]').bind('input', function () {
+ if ($(this).val() >= maza_everywhichday_range[0] && $(this).val() <= maza_everywhichday_range[1])
+ $.post('ajax.php?t=MAZA&a=changeEveryWhichDay', {anketa: srv_meta_anketa_id, maza_every_which_day: $(this).val(), maza_table: "alarms"});
+ maza_toggle_submit_alarms();
+ });
+
+ //REPEATER
+ $('input[name="maza_repeater_intervalby"]').bind('change', function () {
+ $('#maza_repeater_div_weekly').toggle(($(this).val() === 'weekly'));
+ $('#maza_repeater_div_daily').toggle(($(this).val() === 'daily'));
+ //$.post('ajax.php?t=MAZA&a=changeRepeatBy', {anketa: srv_meta_anketa_id, maza_repeatby: $(this).val(), maza_table: "repeaters"});
+ maza_toggle_submit_repeater();
+ });
+ $('input[name="maza_repeater_timeinday[]"]').bind('change', function () {
+ /*var times = [];
+ $('input:checkbox[name="maza_repeater_timeinday[]"]:checked').each(function () {
+ times.push($(this).val());
+ });
+ if(times)
+ $('#maza_repeater_div_everyday').css("border", "none");*/
+ maza_toggle_submit_repeater();
+ //$.post('ajax.php?t=MAZA&a=changeTimeInDay', {anketa: srv_meta_anketa_id, maza_time_in_day: times, maza_table: "repeaters"});
+ });
+ $('input[name="maza_repeater_dayinweek[]"]').bind('change', function () {
+ /*var times = [];
+ $('input:checkbox[name="maza_repeater_dayinweek[]"]:checked').each(function () {
+ times.push($(this).val());
+ });*/
+ /*if(times)
+ $('#maza_repeater_div_weekly').css("border", "none");*/
+ maza_toggle_submit_repeater();
+ //$.post('ajax.php?t=MAZA&a=changeDayInWeek', {anketa: srv_meta_anketa_id, maza_day_in_week: times, maza_table: "repeaters"});
+ });
+ $('input[name="maza_repeater_everywhichday"]').bind('input', function () {
+ /*if ($(this).val() > 1 && $(this).val() < 7){
+ //$('#maza_repeater_div_everywhichday').css("border", "none");
+ //$.post('ajax.php?t=MAZA&a=changeEveryWhichDay', {anketa: srv_meta_anketa_id, maza_every_which_day: $(this).val(), maza_table: "repeaters"});
+ }*/
+ maza_toggle_submit_repeater();
+ });
+ $('input[name="maza_repeater_date_start"]').bind('change', function () {
+ var pickedDateSplit = this.value.split(".");
+ var pickedDate = new Date(pickedDateSplit[2], pickedDateSplit[1]-1, pickedDateSplit[0]);
+ var pickedDateFormated = $.datepicker.formatDate('dd.mm.yy', pickedDate);
+ this.value = pickedDateFormated;
+
+ var pickedDateTimestamp = pickedDate.getTime();
+ var nowDate = new Date();
+ var todayDateTimestamp = (new Date(nowDate.getFullYear(), nowDate.getMonth(), nowDate.getDate())).getTime();
+
+ //if date is not valid, clear it
+ if(!pickedDateTimestamp || pickedDateTimestamp < todayDateTimestamp+(maza_start_day_repeater*86400000)){
+ this.value = "";
+ $("#maza_repeater_start_date_warning").hide();
+ }
+ maza_toggle_submit_repeater();
+ });
+ $('input[name="maza_repeater_date_end"]').bind('change', function () {
+ var pickedDateSplit = this.value.split(".");
+ var pickedDate = new Date(pickedDateSplit[2], pickedDateSplit[1]-1, pickedDateSplit[0]);
+ var pickedDateFormated = $.datepicker.formatDate('dd.mm.yy', pickedDate);
+ this.value = pickedDateFormated;
+
+ var pickedDateTimestamp = pickedDate.getTime();
+ var nowDate = new Date();
+ var todayDateTimestamp = (new Date(nowDate.getFullYear(), nowDate.getMonth(), nowDate.getDate())).getTime();
+
+ //if date is not valid, clear it
+ if(!pickedDateTimestamp || pickedDateTimestamp < todayDateTimestamp+(maza_end_day_repeater*86400000)){
+ this.value = "";
+ }
+ maza_toggle_submit_repeater();
+ });
+
+ /**
+ * Toggle submition button for alarms form
+ */
+ function maza_toggle_submit_alarms() {
+ if (!$('input[name="maza_message"]').val().length > 0)
+ maza_submit_alarms.hide();
+ else {
+ if ($('input:checkbox[name="maza_alarm_timeinday[]"]:checked').length === 0)
+ maza_submit_alarms.hide();
+ else if ($('input[name="maza_alarm_intervalby"]:checked').val() === "everyday")
+ maza_submit_alarms.show();
+ else if ($('input[name="maza_alarm_intervalby"]:checked').val() === "daily") {
+ var everywhichday = $('input[name="maza_alarm_everywhichday"]').val();
+ if (everywhichday >= maza_everywhichday_range[0] && everywhichday <= maza_everywhichday_range[1])
+ maza_submit_alarms.show();
+ else
+ maza_submit_alarms.hide();
+ } else if ($('input[name="maza_alarm_intervalby"]:checked').val() === "weekly") {
+ if ($('input:checkbox[name="maza_alarm_dayinweek[]"]:checked').length === 0)
+ maza_submit_alarms.hide();
+ else
+ maza_submit_alarms.show();
+ }
+ }
+ }
+
+ /**
+ * Toggle submition button for repeater form
+ */
+ /*function maza_check_submit_repeater() {
+ if($('#maza_repeater_date_start').val().length > 0){
+ if ($('input:checkbox[name="maza_repeater_timeinday"]:checked').length === 0){
+ $('#maza_repeater_div_everyday').css("border", "red solid 1px");
+ return false;
+ }
+ else if ($('input[name="maza_repeater_intervalby"]:checked').val() === "everyday")
+ return true;
+ else if ($('input[name="maza_repeater_intervalby"]:checked').val() === "daily") {
+ var everywhichday = $('input[name="maza_repeater_everywhichday"]').val();
+ if (everywhichday >= maza_everywhichday_range[0] && everywhichday <= maza_everywhichday_range[1])
+ return true;
+ else{
+ $('#maza_repeater_div_daily').css("border", "red solid 1px");
+ return false;
+ }
+ } else if ($('input[name="maza_repeater_intervalby"]:checked').val() === "weekly") {
+ if ($('input:checkbox[name="maza_repeater_dayinweek"]:checked').length === 0){
+ $('#maza_repeater_div_weekly').css("border", "red solid 1px");
+ return false;
+ }
+ else
+ return true;
+ }
+ }
+ }*/
+
+ /**
+ * Toggle submition button for repeater form
+ */
+ function maza_toggle_submit_repeater() {
+ var startVal = $('#maza_repeater_date_start').val();
+ var endVal = $('#maza_repeater_date_end').val();
+ var datesValid = true;
+
+ if(startVal && endVal){
+ var startDateSplit = startVal.split(".");
+ var startDate = new Date(startDateSplit[2], startDateSplit[1]-1, startDateSplit[0]);
+ var endDateSplit = endVal.split(".");
+ var endDate = new Date(endDateSplit[2], endDateSplit[1]-1, endDateSplit[0]);
+ datesValid = startVal < endVal;
+ }
+
+ if(!startVal || (startVal && !datesValid))
+ maza_submit_repeater.hide();
+ else if ($('input:checkbox[name="maza_repeater_timeinday[]"]:checked').length === 0)
+ maza_submit_repeater.hide();
+ else if ($('input[name="maza_repeater_intervalby"]:checked').val() === "everyday")
+ maza_submit_repeater.show();
+ else if ($('input[name="maza_repeater_intervalby"]:checked').val() === "daily") {
+ var everywhichday = $('input[name="maza_repeater_everywhichday"]').val();
+ if (everywhichday >= maza_everywhichday_range[0] && everywhichday <= maza_everywhichday_range[1])
+ maza_submit_repeater.show();
+ else
+ maza_submit_repeater.hide();
+ } else if ($('input[name="maza_repeater_intervalby"]:checked').val() === "weekly") {
+ if ($('input:checkbox[name="maza_repeater_dayinweek[]"]:checked').length === 0)
+ maza_submit_repeater.hide();
+ else
+ maza_submit_repeater.show();
+ }
+ }
+
+ maza_toggle_submit_alarms();
+ maza_toggle_submit_repeater();
+ mazaChooseDate(maza_start_day_repeater, $("#maza_repeater_date_start"));
+ mazaChooseDate(maza_end_day_repeater, $("#maza_repeater_date_end"));
+}
+
+/**
+ * Sets datepicke on start of repeater input
+ * @param {type} maza_start_day_repeater - int of days to start calendar relative to today
+ * @param {type} element - element to set calendar on
+ * @returns {undefined}
+ */
+function mazaChooseDate(maza_start_day_repeater, element) {
+ element.datepicker({
+ //selectOtherMonths: true,
+ //changeMonth: true,
+ minDate: maza_start_day_repeater,
+ dateFormat: "dd.mm.yy",
+ showAnim: "slideDown",
+ //showOn: "button",
+ //buttonImage: srv_site_url + "admin/survey/script/calendar/calendar.gif",
+ //buttonImageOnly: true,
+ onSelect: function (dateText, inst) {
+ element.trigger('change');
+ return false;
+ }
+ });
+}
+
+/**
+ * When geofencing form is loaded
+ * @param {type} ank_id - ID of survey
+ * @param {type} geo_on - is geofencing on
+ * @returns {undefined}
+ */
+function onGeofencingFormsLoad(ank_id, geo_on){
+ geofencing_on = geo_on;
+ //preveri, ce je google API ze includan (ce se je vedno icludal, je prislo do errorjev)
+ if((typeof google === 'object' && typeof google.maps === 'object')){
+ mazaMaps(ank_id);
+ }
+ else{
+ //main/app/contollers/js/Maps/Declaration.js
+ mapsAPIseNi (function(){mazaMaps(ank_id);});
+ }
+
+ //disable/enable notification setting based on checkbox
+ $('#maza_geofence_trigger_survey').bind('change', function () {
+ if(this.checked){
+ $("#maza_title").prop('disabled', true);
+ $("#maza_message").prop('disabled', true);
+ }
+ else{
+ $("#maza_title").prop('disabled', false);
+ $("#maza_message").prop('disabled', false);
+ }
+ });
+}
+
+/**
+ * Toggle AR interval on AR checkbox changed
+ * @param {type} checkbox - checkbox element
+ * @returns {undefined}
+ */
+function toggleARInterval(checkbox){
+ if (checkbox.checked)
+ $('#maza_ar_interval_div').show();
+ else
+ $('#maza_ar_interval_div').hide();
+}
+
+//nastavi mapo
+function mazaMaps(ank_id){
+ //mapType = tip zemljevida, ki bo prikazan. Recimo za satelitsko sliko google.maps.MapTypeId.SATELLITE (možno še .ROADMAP)
+ var mapType = google.maps.MapTypeId.ROADMAP;
+ //centerInMap = string naslova, kaj bo zajel zemljevid. Rec. Slovenija / ali Ljubljana
+ //var centerInMap = '';
+
+ //pridobi parametre za centriranje mape in jo nastavi za kasnejso uporabo
+ /*var centerInMapKoordinate = <?php echo json_encode($fokus_koordinate)?>;
+ if(centerInMapKoordinate)
+ centerInMapKoordinate = JSON.parse(centerInMapKoordinate);*/
+
+ //Deklaracija potrebnih stvari za delovanje in upravljanje google maps JS API
+ var mapOptions = {
+ disableDoubleClickZoom: true,
+ mapTypeId: mapType
+ };
+
+ //ce je v bazi naslov enak vpisanemu v nastavitvah, nastavi po parametrih
+ /*if(centerInMapKoordinate.fokus === centerInMap || centerInMap === ''){
+ mapOptions.center = {lat: parseFloat(centerInMapKoordinate.center.lat),
+ lng: parseFloat(centerInMapKoordinate.center.lng)};
+ mapOptions.zoom = parseInt(centerInMapKoordinate.zoom);
+ } */
+ //ce ni parametrov v bazi ali pa je nanovo kreirana spremenljivka, nastavi na Slovenijo
+ //else if(!centerInMapKoordinate && centerInMap === '<?php echo $default_centerInMap; ?>'){
+ mapOptions.center = {lat: 46.151241, lng: 14.995463};
+ mapOptions.zoom = 7;
+ //}
+
+ //deklaracija zemljevida
+ var mapdiv = document.getElementById("maza_map_geofencing");
+ var map = new google.maps.Map(mapdiv, mapOptions);
+ //to se kasneje uporabi za pridobitev mape z id-em spremenljivke
+ mapdiv.gMap = map;
+ //deklaracija mej/okvira prikaza na zemljevidu
+ bounds['maza_map_geofencing'] = new google.maps.LatLngBounds();
+
+ //deklaracija geocoderja (API)
+ if(!geocoder)
+ geocoder = new google.maps.Geocoder();
+ if(!infowindow)
+ infowindow = new google.maps.InfoWindow();
+
+ allMarkers['maza_map_geofencing'] = [];
+
+ if(!geofencing_on){
+ searchBox('maza_map_geofencing', function doAfterPlaceFromSearchBox(pos, address){
+ //reset bounds, so we can focus only on this geofence
+ bounds['maza_map_geofencing'] = new google.maps.LatLngBounds();
+ //save geofence
+ maza_saveGeofence(address, maza_create_basic_circle(pos, address, maza_default_radius, true));
+ });
+
+ //set click event on map
+ maza_klikNaMapo();
+ }
+
+ //ni ok, ce se klice globalna spremenljivka srv_meta_anketa_id, ker se ne vedno pravi cas nastavi
+ $.post('ajax.php?t=MAZA&a=get_all_geofences', {anketa: ank_id},
+ function (data) {
+ if(data.length > 0)
+ //id - id markerja v bazi
+ map_data_fill_vnaprej_geofences(JSON.parse(data));
+ });
+}
+
+/**
+ * Create and fill existing geofences in map
+ * @param map_data JSON Object
+ */
+function map_data_fill_vnaprej_geofences(map_data) {
+ for (var row in map_data) {
+ var row_object = map_data[row];
+ var pos = {lat: row_object.lat, lng: row_object.lng};
+
+ maza_createCircleVnaprej(row_object.address, maza_create_basic_circle(pos, row_object.address, row_object.radius, false), row_object.id, row_object.name);
+ }
+}
+
+
+/**
+ * Ustvari in vrne basic circle, na mapo spremenljivke z danimi koordinatami
+ * @param {type} pos - koordinate - objekt {lat: ???, lng: ???}
+ * @param {string} addressFromSearchBox - address if adding marker from searchBox, null otherwise
+ * (used for ignoring duplicates)
+ * @returns {google.maps.Circle}
+ */
+function maza_create_basic_circle(pos, address, radius, fromSearchBox) {
+ var circle = null;
+
+ if(fromSearchBox === undefined) {
+ fromSearchBox = false;
+ }
+
+ //pridobi mapo spremenljivke
+ var map = document.getElementById("maza_map_geofencing").gMap;
+
+ if(fromSearchBox)
+ circle = address ? findMarkerFromAddress(address, "maza_map_geofencing") : null;
+
+ if (!circle) {
+ //kreiraj marker
+ /*var marker = new google.maps.Marker({
+ position: new google.maps.LatLng(pos.lat, pos.lng),
+ map: map,
+ identifier: getMarkerUniqueId(pos.lat, pos.lng, "maza_map_geofencing")//,
+ //icon: {url: "img_0/marker_text_off.png"}
+ });*/
+
+ // Add circle overlay and bind to marker
+ circle = new google.maps.Circle({
+ center: new google.maps.LatLng(pos.lat, pos.lng),
+ map: map,
+ radius: parseFloat(radius), //in meters
+ editable: !geofencing_on,
+ fillColor: 'red'
+ });
+ //circle.bindTo('center', marker, 'position');
+
+ //add marker in array
+ allMarkers["maza_map_geofencing"].push(circle);
+
+ return circle;
+ } else {
+ //trigger click on marker, to focus it and open infowindow
+ //google.maps.event.trigger(circle, 'click');
+
+ //reset bounds
+ bounds['maza_map_geofencing'] = new google.maps.LatLngBounds();
+ //add to bounds
+ bounds["maza_map_geofencing"].union(circle.getBounds());
+ //zemljevid se prilagodi okviru
+ map.fitBounds(bounds["maza_map_geofencing"]);
+ return null
+ }
+}
+
+/**
+ * funkcija, ki kreira osnovni geofence (rdec)
+ * @param {type} address - String - label o informacijah markerja
+ * @param {type} marker - google maps new created circle
+ * @returns {undefined}
+ */
+function maza_saveGeofence(address, circle) {
+ if (circle != null) {
+ //save new marker in DB
+ $.post('ajax.php?t=MAZA&a=insert_geofence', {address: address,
+ lat: circle.getCenter().lat(), lng: circle.getCenter().lng(), radius: maza_default_radius, anketa: srv_meta_anketa_id},
+ function (id) {
+ //id - id markerja v bazi
+ maza_createCircleVnaprej(address, circle, id, null);
+ });
+ }
+}
+
+/**
+ * Set what to do when click event on map
+ * @returns {undefined}
+ */
+function maza_klikNaMapo() {
+ //pridobi mapo spremenljivke
+ var map = document.getElementById("maza_map_geofencing").gMap;
+
+ // ko user klikne na mapo, funkcija vrne pozicijo (koordinate - position) ter kreira
+ google.maps.event.addListener(map, 'click', function (event) {
+
+ //koordinate
+ var pos = {
+ lat: event.latLng.lat(),
+ lng: event.latLng.lng()
+ };
+
+ // naslov se pridobi, da se klice geocoding
+ GeocodingF(pos, function (data) {
+ //ce ne vrne null - je nasel naslov
+ if (data != null) {
+ //reset bounds, to set focus only on this geofence
+ bounds['maza_map_geofencing'] = new google.maps.LatLngBounds();
+
+ //kreira marker na lokaciji, kjer je uporabnik kliknil
+ maza_saveGeofence(data.formatted_address, maza_create_basic_circle(pos, data.formatted_address, maza_default_radius, false));
+ } else {
+ //odpre se okno, ce je prislo do napake - null - (mozen je tudi prekratek delay med geocoding requesti)
+ alert(lang['srv_resevanje_alert_location_not_found_map']);
+ }
+ });
+
+
+ return pos;
+ });
+}
+
+/**
+ * funkcija, ki kreira osnovni circle (rdec)
+ * @param {type} address - String - label o informacijah markerja
+ * @param {type} circle - google maps new created circle
+ * @param {type} id - id vrednosti markerja iz tabele geofence
+ * @param {type} name - interno ime geofenca
+ * @returns {undefined}
+ */
+function maza_createCircleVnaprej(address, circle, id, name) {
+ if (circle != null) {
+ //pridobi mapo spremenljivke
+ var map = document.getElementById("maza_map_geofencing").gMap;
+
+ circle.address = address;
+ circle.id = id;
+ if(name)
+ circle.name = name;
+ circle.infowin = makeGeofenceInfoWindow(circle);
+ setListenersGeofence(circle, map);
+
+ //markers[markerId] = marker; // cache marker in markers object
+ //dont set listeners if survey is locked
+ //bindMarkerEventsVM("maza_map_geofencing", marker, map); // bind right click event to marker
+ //maza_setDeleteMenu(circle, map, "maza_map_geofencing");
+
+ //Create a div element for container.
+ /*var container = document.createElement("div");
+ //margin, da se pri italic ne odreze zadja crka
+ container.style.cssText = 'margin-right:1px';
+
+ //Create a label element for address.
+ var address = document.createElement("label");
+ address.innerHTML = '<i>' + address + '</i>';
+ address.style.cssText = 'font-size:0.85em;';
+ container.appendChild(address);*/
+
+ //listener ob kliku na marker
+ /*google.maps.event.addListener(marker, 'click', function () {
+ //if infowindow in opened, blur focus, so saving in DB can be triggered
+ blurTitleInfowindow(false);
+ infowindow.setContent(container);
+ infowindow.open(map, marker);
+ });*/
+
+ google.maps.event.addListener(circle,'radius_changed',function(){
+ //console.log('radius_changed '+circle.getRadius());
+ $.post('ajax.php?t=MAZA&a=update_geofence', {id: circle.id, radius: circle.getRadius(), anketa: srv_meta_anketa_id});
+ circle.radius = circle.getRadius();
+ circle.infowin = makeGeofenceInfoWindow(circle);
+ infowindow.close();
+ });
+ google.maps.event.addListener(circle,'center_changed',function(){
+ //console.log('center_changed '+circle.getCenter());
+ //koordinate
+ var pos = {
+ lat: circle.getCenter().lat(),
+ lng: circle.getCenter().lng()
+ };
+
+ // naslov se pridobi, da se klice geocoding
+ GeocodingF(pos, function (data) {
+ //ce ne vrne null - je nasel naslov
+ if (data != null) {
+ //save changes in DB
+ $.post('ajax.php?t=MAZA&a=update_geofence', {id: circle.id, lat: circle.getCenter().lat(), lng: circle.getCenter().lng(), address: data.formatted_address, anketa: srv_meta_anketa_id});
+ circle.address = data.formatted_address;
+ } else {
+ //did not found address, save empty string
+ $.post('ajax.php?t=MAZA&a=update_geofence', {id: circle.id, lat: circle.getCenter().lat(), lng: circle.getCenter().lng(), address: '', anketa: srv_meta_anketa_id});
+ circle.address = 'Unknown address';
+ }
+ circle.infowin = makeGeofenceInfoWindow(circle);
+ infowindow.close();
+ });
+
+ });
+
+ //add to bounds
+ bounds["maza_map_geofencing"].union(circle.getBounds());
+
+ //zemljevid se prilagodi okviru
+ map.fitBounds(bounds["maza_map_geofencing"]);
+ }
+}
+
+/**
+ * Creates and returns a html container for infowindow
+ * @param {type} shape - googles shape - polyline or polygon
+ * @returns {makeShapeInfoWindow.container|Element}
+ */
+function makeGeofenceInfoWindow(shape) {
+ //Create a div element for container.
+ var container = document.createElement("div");
+ //margin, da se pri italic ne odreze zadja crka
+ container.style.cssText = 'margin-right:1px';
+
+ //Create a textarea for the input text
+ var textBoxTitle = document.createElement("input");
+ textBoxTitle.style.cssText = "font-weight:bold; font-size:1em !important; display: block; float: left;";
+ textBoxTitle.type = "text";
+ textBoxTitle.placeholder = lang['srv_maza_geofence_infowin_name'];
+ if(shape.name)
+ textBoxTitle.value = shape.name;
+ textBoxTitle.className = "input_title";
+ textBoxTitle.maxLength = "20";
+ textBoxTitle.id = "map_input_overlay_id_" + shape.id;
+ if(geofencing_on)
+ textBoxTitle.disabled=true;
+ container.appendChild(textBoxTitle);
+ //ko se spremeni textarea v windowinfo, spremeni value inputa za text
+ google.maps.event.addDomListener(textBoxTitle, "change", function () {
+ //save title of marker in DB
+ $.post('ajax.php?t=MAZA&a=update_geofence_name', {id: shape.id, name: textBoxTitle.value,
+ anketa: srv_meta_anketa_id, lang_id: srv_meta_lang_id});
+ });
+
+ if(!geofencing_on){
+ var deleteImg = document.createElement("span");
+ deleteImg.className = "faicon delete icon-grey_dark_link";
+ deleteImg.title = lang['srv_vprasanje_delete_line_map'];
+ deleteImg.style.cssText = "height:1.65em; display: block; float: right; margin-left:7px; cursor: pointer;";
+ container.appendChild(deleteImg);
+
+ //ko se spremeni textarea v windowinfo, spremeni value inputa za text
+ google.maps.event.addDomListener(deleteImg, "click", function () {
+ if (confirm(lang['srv_maza_geofence_delete_confirm_map']))
+ maza_delete_geofence(shape);
+ });
+ }
+
+ container.appendChild(document.createElement("br"));
+
+ //Create a label element for address.
+ var address = document.createElement("label");
+ address.innerHTML = '<i>' + shape.address + '</i>';
+ address.style.cssText = 'font-size:0.85em; cursor: default;';
+ container.appendChild(address);
+ container.appendChild(document.createElement("br"));
+
+ //Create a label element for radius.
+ var radius = document.createElement("label");
+ radius.innerHTML = lang['srv_maza_geofence_infowin_radius'] + Math.round(shape.radius) + lang['srv_maza_geofence_infowin_radius_unit'];
+ radius.style.cssText = 'font-size:0.85em;cursor: default;';
+ container.appendChild(radius);
+ container.appendChild(document.createElement("br"));
+
+ //ko se spremeni textarea v windowinfo, spremeni value inputa za text
+ /*google.maps.event.addDomListener(textBoxTitle, "change", function () {
+ //save title of SHAPE in DB
+ var lineData = {anketa: srv_meta_anketa_id, spr_id: spremenljivka,
+ overlay_id: shape.overlay_id, address: textBoxTitle.value};
+ $.post('ajax.php?t=branching&a=edit_naslov_polyline', lineData);
+ });*/
+
+ return container;
+}
+
+/**
+ * Set Liteners when editing a shape
+ * @param {type} spremenljivka - id spremenljivke
+ * @param {type} shape - googles shape to set listeners on
+ * @param {type} map - google map
+ * @param locked boolean true, if survey is locked in branching
+ * @returns {undefined}
+ */
+function setListenersGeofence(shape, map) {
+ //listener ob kliku na marker
+ google.maps.event.addListener(shape, 'click', function (ev) {
+ //changeFocusLine(this);
+
+ //open infowindow
+ infowindow.setContent(this.infowin);
+ infowindow.setPosition(ev.latLng);
+ infowindow.open(map);
+
+ $("#map_input_overlay_id_" + shape.id).focus();
+ });
+}
+
+/**
+ * Sets rightclick and dblclick listeners to open delete menu
+ * @param {type} shape - shape to set listeners on
+ * @param {type} map - map on which to hover menu (shape's map)
+ * @param {type} spremenljivka - id of variable
+ * @returns {undefined}
+ */
+function maza_delete_geofence(circle) {
+ $.post('ajax.php?t=MAZA&a=delete_geofence', {id: circle.id, anketa: srv_meta_anketa_id},
+ function (data){
+ if(data = 'OK')
+ circle.setMap(null);
+ infowindow.close();
+ });
+}
+
+/**
+ * Sets rightclick and dblclick listeners to open delete menu
+ * @param {type} shape - shape to set listeners on
+ * @param {type} map - map on which to hover menu (shape's map)
+ * @param {type} spremenljivka - id of variable
+ * @returns {undefined}
+ */
+function maza_setDeleteMenu(shape, map, spremenljivka) {
+ google.maps.event.addListener(shape, 'rightclick', function (e) {
+ deleteMenu.open_shape(map, shape, e.latLng, spremenljivka);
+ });
+ google.maps.event.addListener(shape, 'dblclick', function (e) {
+ deleteMenu.open_shape(map, shape, e.latLng, spremenljivka);
+ });
+}
+
+/**
+ * Onclick function when saving repeater
+ * @returns {undefined}
+ */
+function maza_repeater_submit_button_click(){
+ var inputVal = $("#maza_repeater_date_start").val();
+ var pickedDateSplit = inputVal.split(".");
+ var pickedDate = new Date(pickedDateSplit[2], pickedDateSplit[1]-1, pickedDateSplit[0]);
+
+ var pickedDateTimestamp = pickedDate.getTime();
+ var nowDate = new Date();
+ var todayDateTimestamp = (new Date(nowDate.getFullYear(), nowDate.getMonth(), nowDate.getDate())).getTime();
+
+ //date is in starting range, show warning
+ if(pickedDateTimestamp <= todayDateTimestamp){
+ var result = confirm(lang['srv_maza_repeater_edit_warning_alert']);
+ if(result)
+ $('#maza_save_repeater_form').submit();
+ }
+ //date is in the future, all ok, save it
+ else
+ $('#maza_save_repeater_form').submit();
+}
+
+/**
+ * Onclick function when finishing repeater
+ * @returns {undefined}
+ */
+function maza_repeater_cancel_click(){
+ var result = confirm(lang['srv_maza_repeater_finish_warning_alert']);
+ if(result)
+ $('#maza_cancel_repeater_form').submit();
+}
diff --git a/admin/survey/modules/mod_SPEEDINDEX/R/speeder_index.R b/admin/survey/modules/mod_SPEEDINDEX/R/speeder_index.R
new file mode 100644
index 0000000..f41ef2f
--- /dev/null
+++ b/admin/survey/modules/mod_SPEEDINDEX/R/speeder_index.R
@@ -0,0 +1,98 @@
+params <- commandArgs(trailingOnly = TRUE)
+ID <- params[1]
+
+library(foreign) # Import csv or sav data
+
+#########################
+# SPEEDER INDEX FUNKCIJA
+#########################
+# funkcija je napisana s for zankami, da je lazje razumljivo, sicer pa je to poanseji nain, zato ce bos popravljal
+# raje uporabi apply ali by ali kaj podobnega
+speeder <- function(data){
+ # izracuna mediane po stolpcih
+ medians <- apply(X = data, 2, median, na.rm=T)
+ # naredi novo matriko enakih dimenizij, kot je orig. podatkovna matrika
+ news <- matrix(NA, nrow = dim(data)[1], ncol = dim(data)[2])
+
+ # gre cez vse enote
+ for (i in 1:dim(data)[1]){
+ for (j in 1:dim(data)[2]){
+ # ce je manjkajoca vrednost ne naredi nic
+ if (is.na(data[i,j]) == T) {news[i,j] <- NA}
+ if (is.na(data[i,j]) == F){
+ # ce je vrednost pri enoti vecja ali enaka od mediane potem ji pripise 1
+ if (data[i,j] >= medians[j]){news[i,j] <- 1}
+ # ce je vrednost pri enoti manjsa, ji pripise vrednost pri enoti deljeno z vrednostjo mediane odgovarajaoce spr.
+ if (data[i,j] < medians[j]){news[i,j] <- (data[i,j]/medians[j])}
+ }
+ }
+ }
+
+ # izracuna povprecja (tocka 3 v algoritmu)
+ povprecja <- rowMeans(news, na.rm=T)
+ # ce je pod 10 procentov vseh, potem je speeder
+ speed_no_speed <- as.numeric(povprecja < quantile(povprecja, 0.1))
+ speed_no_speed[speed_no_speed == 1] <- "1"
+ speed_no_speed[speed_no_speed == 0] <- "0"
+ return(speed_no_speed)
+}
+## //SPEEDER INDEX FUNKCIJA// ##
+
+
+
+# Preberemo vhodne podatke
+datumi <- read.csv2(paste0("modules/mod_SPEEDINDEX/temp/datum", ID, ".csv"), sep=";", header = T, fill = T, stringsAsFactors = FALSE)
+#if (datumi[1,1]=="Ustreznost") {datumi <- datumi[2:nrow(datumi),]}
+datumi <- subset(datumi, Status==6)
+
+## SELECT APROPRIATE DATA ##
+# Iz baze izberemo le stolpce, ki nas zanimajo: Vse stolpce, ki v imenu vsebujejo Datum (ker raunamo ase na strani) ter Id = RECNUM
+test <- datumi[ ,grepl("Datum|Id" , names( datumi ) ) ]
+
+# Izberemo le stolpce, ki vsebujejo ve kot 10 znakov zato, ker so bile nekje v stolpcih vrednosti 0 ali 1
+#test <- test[apply(test, MARGIN = 1, function(x) all(nchar(x) > 10)), ]
+
+# Zapiemo RECNUm oz. ID
+test_id <- test[1]
+
+
+# Poistimo e DATUM in izberemo le URO
+test <- apply(test[2:ncol(test)], 2, function(y) gsub(".* ", "", y))
+test <- test[ , ! apply( test , 2 , function(x) all(is.na(x)) ) ]
+# e so na straneh prazne vrednosti, prepiemo vrednosti iz prejnjega stolpca
+#test <- ifelse(test=="", test[,-1], test)
+## //SELECT APROPRIATE DATA// ##
+
+
+
+# as v sekundah, ki ga je anketiranec preivel na x strani (ki se izrauna kot razlika med stolpcem date_x in date_x+1)
+makeTime <- function(x) as.POSIXct(paste(Sys.Date(), x))
+dat <- apply(test, 2, makeTime)
+data <- mapply(x = 2:ncol(dat),
+ y = 1:(ncol(dat) -1),
+ function(x, y) dat[ , x] - dat[ , y])
+
+
+
+
+# data <- read.spss("speederindex.sav", to.data.frame = T)
+data <- as.matrix(data)
+# Poenemo funkcijo speeder index na podatkih
+#speeder(data)
+speederindex <- speeder(data)
+# Indeksu dodamo ase respondentov po straneh
+speederindex <- cbind(speederindex, data)
+
+df <- speederindex
+
+colnames(df)[1] <- "Index hitrosti"
+
+for(i in 2:ncol(df)){
+ colnames(df)[i] <- paste0("Stran ", i-1)
+}
+
+df <- cbind(test_id,df)
+
+# Zapiemo rezultat v csv
+write.csv2(df, paste0("modules/mod_SPEEDINDEX/results/speederindex", ID, ".csv"),row.names=F)
+#write.csv2(speederindex, file ="modules/mod_SPEEDINDEX/results/speederindex.csv",row.names=T)
diff --git a/admin/survey/modules/mod_SPEEDINDEX/class.SurveySpeedIndex.php b/admin/survey/modules/mod_SPEEDINDEX/class.SurveySpeedIndex.php
new file mode 100644
index 0000000..87a1e8b
--- /dev/null
+++ b/admin/survey/modules/mod_SPEEDINDEX/class.SurveySpeedIndex.php
@@ -0,0 +1,204 @@
+<?php
+
+define("TEMP_FOLDER", "admin/survey/modules/mod_SPEEDINDEX/temp");
+define("SCRIPT_FOLDER", "admin/survey/modules/mod_SPEEDINDEX/R");
+define("RESULTS_FOLDER", "admin/survey/modules/mod_SPEEDINDEX/results");
+
+class SurveySpeedIndex{
+
+ var $anketa; # id ankete
+ var $db_table = '';
+
+
+ function __construct($anketa){
+ global $site_url;
+
+ // Ce imamo anketo, smo v status->ul evealvacija
+ if ((int)$anketa > 0){
+ $this->anketa = $anketa;
+
+ # polovimo vrsto tabel (aktivne / neaktivne)
+ SurveyInfo :: getInstance()->SurveyInit($this->anketa);
+ if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) {
+ $this->db_table = '_active';
+ }
+ }
+ }
+
+
+ // Prikažemo stran
+ public function displaySpeedIndex(){
+ global $lang;
+
+ // Izvedemo pripravo datoteke
+ $this->executeExport();
+
+ // Izrisemo tabelo
+ $this->displaySpeedIndexTable();
+ }
+
+ // Prikazemo tabelo
+ private function displaySpeedIndexTable(){
+ global $site_path;
+ global $lang;
+
+ $result_folder = $site_path . RESULTS_FOLDER.'/';
+
+ echo '<div id="speeder_table">';
+
+ echo '<span class="bold">'.$lang['srv_speeder_index_text'].'</span>';
+
+ // Legenda
+ echo '<div class="speeder_leg">';
+ echo '<span class="speeder_legend spaceLeft spaceRight" style="background-color:#ffffff;">'.$lang['srv_speeder_index_legend_0'].'</span>';
+ echo '<span class="speeder_legend spaceLeft" style="background-color:#ffe8e8;">'.$lang['srv_speeder_index_legend_1'].'</span>';
+ echo '</div>';
+
+ echo '<table id="tbl_speeder">';
+
+ if (($handle = fopen($result_folder."speederindex".$this->anketa.".csv", "r")) !== FALSE) {
+ // Loop po vrsticah
+ $cnt=0;
+ while (($row = fgetcsv($handle, 1000, ';')) !== FALSE) {
+
+ $status = ($row[1] == 1 ? 'speeder' : 'no_speeder');
+
+ echo '<tr class="'.$status.'">';
+
+ // Prva vrstica
+ if($cnt == 0){
+ foreach($row as $val){
+ echo '<th>';
+
+ // Prevedemo kar na roko:)
+ if($lang['id'] == '2'){
+ if($val == 'Index hitrosti')
+ echo $lang['srv_speeder_index'];
+ else
+ echo str_replace("Stran", $lang['page'], $val);
+ }
+ else
+ echo $val;
+
+ echo '</th>';
+ }
+ }
+ // Vrstice s podatki
+ else{
+ foreach($row as $val){
+ echo '<td>';
+ echo $val;
+ echo '</td>';
+ }
+ }
+
+ echo '</tr>';
+
+ $cnt++;
+ }
+ fclose($handle);
+ }
+
+ echo '</table></div>';
+ }
+
+
+ // Zgeneriramo pdf analizo
+ public function executeExport(){
+ global $site_path;
+ global $lang;
+ global $admin_type;
+
+ // Zgeneriramo zacasne csv datoteke
+ $this->prepareCSV();
+
+ // Poklicemo R skripto in zgeneriramo pdf
+ $script = $site_path . SCRIPT_FOLDER . '/speeder_index.R';
+ $out = exec('Rscript '.$script.' '.$this->anketa.' 2>&1', $output, $return_var);
+
+ // Testiranje - izpis errorjev
+ /*if($admin_type == 0){
+ echo '<div>';
+ echo 'Rscript '.$script;
+ //echo '<br />'.$out.'<br />';
+ var_dump($output);
+ echo '</div>';
+ }*/
+
+ // Na koncu pobrisemo zacasne datoteke
+ $this->deleteTemp();
+ }
+
+ // Pripravi csv s podatki o casih po straneh
+ public function prepareCSV(){
+ global $site_path;
+ global $lang;
+ global $admin_type;
+
+ $temp_folder = $site_path . TEMP_FOLDER.'/';
+
+ $file_handler = fopen($temp_folder.'datum'.$this->anketa.'.csv',"w");
+
+
+ // Prva vrstica
+ $line_header = 'Id;Status;Lurker;Datum_0;';
+
+ $grupe = array();
+ $sql = sisplet_query("SELECT * FROM srv_grupa WHERE ank_id='".$this->anketa."' ORDER BY vrstni_red ASC");
+ while ($row = mysqli_fetch_array($sql)) {
+ $line_header .= 'Datum_'.$row['vrstni_red'].';';
+
+ $grupe[$row['id']] = $row['vrstni_red'];
+ }
+
+ fwrite($file_handler, substr($line_header, 0, -1)."\r\n");
+
+
+ // Vrstice s podatki
+ $sql = sisplet_query("SELECT id, recnum, last_status, lurker, time_insert FROM srv_user u
+ WHERE ank_id='".$this->anketa."' AND preview='0' AND deleted='0'
+ ORDER BY recnum ASC");
+ while ($row = mysqli_fetch_array($sql)) {
+
+ $line = $row['recnum'].';';
+ $line .= $row['last_status'].';';
+ $line .= $row['lurker'].';';
+ $line .= $row['time_insert'].';';
+
+ // Napolnimo case respondenta
+ $user_grupe = array();
+ $sqlG = sisplet_query("SELECT gru_id, time_edit FROM srv_user_grupa".$this->db_table."
+ WHERE usr_id='".$row['id']."'");
+ while ($rowG = mysqli_fetch_array($sqlG)) {
+ $user_grupe[$rowG['gru_id']] = $rowG['time_edit'];
+ }
+
+ // Sprehodimo se po vseh straneh in zapisemo case v vrstico
+ foreach($grupe as $gru_id => $vrstni_red){
+
+ if(isset($user_grupe[$gru_id]))
+ $line .= $user_grupe[$gru_id].';';
+ else
+ $line .= ';';
+ }
+
+ fwrite($file_handler, substr($line, 0, -1)."\r\n");
+ }
+
+
+ fclose($file_handler);
+ }
+
+ // Pobrisemo zacasne datoteke
+ private function deleteTemp(){
+ global $site_path;
+
+ $temp_folder = $site_path . TEMP_FOLDER.'/';
+
+ // Pobrisemo zacasno CSV datoteko s podatki
+ if (file_exists($temp_folder.'/datum'.$this->anketa.'.csv')) {
+ unlink($temp_folder.'/datum'.$this->anketa.'.csv');
+ }
+ }
+
+} \ No newline at end of file
diff --git a/admin/survey/modules/mod_WPN/class.WPN.php b/admin/survey/modules/mod_WPN/class.WPN.php
new file mode 100644
index 0000000..baabfef
--- /dev/null
+++ b/admin/survey/modules/mod_WPN/class.WPN.php
@@ -0,0 +1,184 @@
+<?php
+/**
+ *
+ * MAZA - mobilna aplikacija za anketirance
+ * Class za posiljanje sporocil uporabnikom (v mojih anketah)
+ *
+ * Uroš Podkrižnik 16.10.2017
+ */
+
+require __DIR__ . '/../../../../vendor/autoload.php';
+use Minishlink\WebPush\WebPush;
+use Minishlink\WebPush\Subscription;
+use Minishlink\WebPush\VAPID;
+
+class WPN {
+
+ var $_ank_id;
+ var $_ank_link;
+ var $_ank_title;
+
+ function __construct($ank_id = 0) {
+ $this->_ank_id = $ank_id;
+ //get survey title and link
+ if($ank_id > 0){
+ SurveyInfo::getInstance()->SurveyInit($ank_id);
+ $this->_ank_title = SurveyInfo::getSurveyColumn('naslov');
+ $this->_ank_link = SurveyInfo::getSurveyLink();
+ }
+ }
+
+ public function display() {
+ global $admin_type, $global_user_id, $lang;
+
+ // Izpis vseh poslanih sporocil
+ if ($admin_type == 0) {
+ //is survey activated
+ $act = sisplet_query("SELECT active FROM srv_anketa WHERE id='" . $this->_ank_id . "'", 'obj');
+ if($act->active != 1)
+ echo '<p class="red">'.$lang['srv_anketa_noactive2'].'<p>';
+
+ $this->sendMessageForm();
+
+ if(isset($_GET['FCM_response']))
+ echo '<br><br>'.$_GET['FCM_response'];
+ }
+ }
+
+ // Obrazec za posiljanje notificationa
+ private function sendMessageForm() {
+ global $admin_type, $global_user_id, $lang;
+
+ //FORM FOR WEB PUSH NOTIFICATIONs
+ echo '<fieldset>';
+ echo '<legend>'.$lang["srv_wpn"].'</legend>';
+ echo '<form name="wpn_send_notification" id="wpn_send_notification" method="post" action="ajax.php?t=WPN&a=wpn_send_notification">';
+ /* echo '<span class="clr bold">'.$lang['srv_notifications_send_reciever'].': </span><input type="text" name="recipient" id="recipient">';
+
+ // Checkboxa za posiljenje vsem uporabnikoom (slo in ang)
+ echo '<div style="padding-top:5px;"><input type="checkbox" value="1" name="recipient_all_slo" id="recipient_all_slo" onClick="recipient_all_disable_email();"> <label for="recipient_all_slo"><span class="clr bold">'.$lang['srv_notifications_send_all_slo'].'</span></label></div>';
+ echo '<div style="padding-top:5px;"><input type="checkbox" value="1" name="recipient_all_ang" id="recipient_all_ang" onClick="recipient_all_disable_email();"> <label for="recipient_all_ang"><span class="clr bold">'.$lang['srv_notifications_send_all_ang'].'</span></label></div><br />';
+ */
+
+ echo '<input type="hidden" name="anketa" value="' . $this->_ank_id . '">';
+ echo '<span class="clr bold">' . $lang['srv_notifications_send_title'] . ': </span><input type="text" name="wpn_title" id="wpn_title" size="35" value="' . $lang['srv_wpn_notification_title_default'] . '" maxlength="35"><br><br>';
+ echo '<span class="clr bold">' . $lang['srv_notifications_send_text'] . ': </span><input type="text" name="wpn_message" id="wpn_message" size="45" value="'.$this->_ank_title.'" maxlength="45"></textarea><br><br>';
+
+ //echo '<label><input type="checkbox" id="maza_notification_priority" name="maza_notification_priority" value="1" />';
+ //echo $lang['srv_maza_notification_priority'] . '</label><br><br>';
+
+ //echo '<label><input type="checkbox" id="maza_notification_sound" name="maza_notification_sound" value="1" />';
+ //echo $lang['srv_maza_notification_sound'] . '</label><br><br>';
+
+ echo '<span class="floatLeft spaceRight"><div class="buttonwrapper">'
+ . '<a class="ovalbutton ovalbutton_orange btn_savesettings" href="#" onclick="$(\'#wpn_send_notification\').submit();">';
+ echo $lang['srv_notifications_send'];
+ echo '</a></div></span>';
+
+ echo '<br><br><p id="maza_result">' . $_POST['maza_result'] . '</p>';
+
+ echo '</form>';
+ echo '</fieldset>';
+ }
+
+ //PWA
+ public function ajax_wpn_save_subscription(){
+ //whole link for endpoint - browser request link and endpoint key of user
+ $endpoint = $_POST['endpoint'];
+ //last slash index
+ $lsi = strrpos($endpoint, '/');
+ //endpoint key
+ $endpoint_key = substr($endpoint, $lsi + 1);
+ //endpoint link
+ $endpoint_link = substr($endpoint, 0, $lsi + 1);
+
+ sisplet_query("INSERT INTO browser_notifications_respondents (timestamp_joined, endpoint_link, endpoint_key, public_key, auth) "
+ . "VALUES (NOW(), '".$endpoint_link."', '".$endpoint_key."', '".$_POST['keys']['p256dh']."', '".$_POST['keys']['auth']."')");
+
+ echo 'Subscription added';
+ }
+
+ public function sendWebPushNotificationsToAll(){
+ //global $FCM_server_key;
+
+ $title = $_POST['wpn_title'];
+ $message = $_POST['wpn_message'];
+
+ $payload = array('title'=>$title, 'message'=>$message, 'link'=>$this->_ank_link);
+
+ /*$notifications = [ // this is the structure for the working draft from october 2018 (https://www.w3.org/TR/2018/WD-push-api-20181026/)
+ [
+ 'subscription' => Subscription::create([
+ "endpoint" => "https://updates.push.services.mozilla.com/wpush/v1/gAAAAABdoHSjAgtlSI2QNu_D6p3WDWITErDHYLWfbf37pgJd1HYnIukVaHfAxAOi4gxzPq1c8baWSMk9O6YkSOrbn7brlWaLpcNnKba1xgia13ESTwKNaevwY9_ciy3ojB4IXprryHTb",
+ "keys" => [
+ 'p256dh' => "BIvluRM0T5ezCbH_IwEhsDr8D-kXq4sRfgmaG4OKOGbqrE6CWwcrvY5S7YpqfMgn_ZqOHlLaZX11skBWar3Xj3w",
+ 'auth' => "Tqco8e4PIAZL9zogxks3qQ"
+ ]
+ ])
+ ],
+ [
+ 'subscription' => Subscription::create([
+ "endpoint" => "https://fcm.googleapis.com/fcm/send/cDZBBiO8nwA:APA91bG6pQJNapbmiT0zMED_HEiQNi2OxgmAJbjqWnny1H78FXFRzJXtcBi62xwdZHOr9GWrBsbE5ePPK58m9H9ZKhy0Q8TFKCu-Os-ykAN2IJL4lPVcUyslBMt8sCABlomHUHl8AQLR",
+ "keys" => [
+ 'p256dh' => "BPyTEM7mLZAFQm-8bSsVmAJRDMeCTjwSmOCJXieK-xtwcRsKE9zLHZRpfp52ChQzrDZLi_n0RdBiX5yydC7DL90",
+ 'auth' => "iSKAhIqNvjlaOhXzk4ulJw"
+ ]
+ ])
+ ],
+ [
+ 'subscription' => Subscription::create([
+ "endpoint" => "https://updates.push.services.mozilla.com/wpush/v2/gAAAAABdpZDL1nFRXedBJYYfTwdcqfrf2khsEXllMLEWPBIolO1t1wkptE7HzkypkPDEVwYq0ju1kNblwJHxA9v0k05oVNCuxBi0l0dDqsrZZ_TRao_hDprjzoSuuHE5z4zrTzbTwwxKqmxDYvF_1Ty28qaUaaLqFJGgOTgSjN9W3bkifRqDZnQ",
+ "keys" => [
+ 'p256dh' => "BESWycM2xqcaFcvG1kYWGpnamq6IZd8mhGtSQpUsROBn0ejJmwI_vptgpW4jBwbQrcb-T8sXvmRRZ4HY9VLWJes",
+ 'auth' => "WnRV6LQEYcvwb21DnpXzkA"
+ ]
+ ])
+ ],
+ [
+ 'subscription' => Subscription::create([
+ "endpoint" => "https://fcm.googleapis.com/fcm/send/cyGorE1fYnM:APA91bHq1if5UrRr1uI8HLD92M2OCekH1kH6q7HmrINkMFHmLq_RtuytWb9DKo2446WgvDRbzUjQXwQ88_b70NzOUBBFWhxaslJuQFyJZPHIkxRf--MIHTY-KSQ1JcPQYcED1QreaEZf",
+ "keys" => [
+ 'p256dh' => "BPTZTRDEztn_YpAvdv4wjtCyNqo0RNFfWbjm9r7bgyZh2RBZgDvitaW_68hNC6cYGzKGJM9aMpGi59-_H8HYSn8",
+ 'auth' => "M79ZKrfJwEzPfHIpkN-tIw"
+ ]
+ ])
+ ]
+ ];*/
+
+ //get all subscriptions and put them in array
+ $subscriptions = sisplet_query("SELECT endpoint_link, endpoint_key, public_key, auth FROM browser_notifications_respondents", 'array');
+ $notifications = array();
+ foreach ($subscriptions as $subsc){
+ $subscription = array("endpoint"=>$subsc['endpoint_link'].$subsc['endpoint_key'], "keys"=>array('p256dh' => $subsc['public_key'],'auth' => $subsc['auth']));
+ array_push($notifications, array('subscription' => Subscription::create($subscription)));
+ }
+
+ $auth = array(
+ 'VAPID' => array(
+ 'subject' => 'mailto:enklikanketa@gmail.com',
+ 'publicKey' => 'BNVIBdCsC6vkmByQJ861pusHN1mV76X3mvAa1u4PxmleTv2m2whcEu9Elhh8Qz3XnqV6k58YCSVqaafl3bhPKLU',
+ 'privateKey' => 'c7mxuK7Nexe4NHnCtYE79p0iHzaXZGikWpua7z66dQg',
+ ),
+ );
+ $webPush = new WebPush($auth);
+ // send multiple notifications with payload
+ foreach ($notifications as $notification) {
+ $webPush->sendNotification(
+ $notification['subscription'],
+ json_encode($payload)
+ );
+ }
+
+ // handle eventual errors here, and remove the subscription from your server if it is expired
+ foreach ($webPush->flush() as $report) {
+ $endpoint = $report->getRequest()->getUri()->__toString();
+ if ($report->isSuccess()) {
+ echo "<br>[v] Message sent successfully for subscription {$endpoint}.";
+ } else {
+ echo "<br>[x] Message failed to sent for subscription {$endpoint}: {$report->getReason()}";
+ }
+ }
+ }
+
+}
+?> \ No newline at end of file
diff --git a/admin/survey/modules/mod_WPN/frontend/_DS_Store b/admin/survey/modules/mod_WPN/frontend/_DS_Store
new file mode 100644
index 0000000..404f156
--- /dev/null
+++ b/admin/survey/modules/mod_WPN/frontend/_DS_Store
Binary files differ
diff --git a/admin/survey/modules/mod_WPN/frontend/android-chrome-192x192.png b/admin/survey/modules/mod_WPN/frontend/android-chrome-192x192.png
new file mode 100644
index 0000000..76f01ba
--- /dev/null
+++ b/admin/survey/modules/mod_WPN/frontend/android-chrome-192x192.png
Binary files differ
diff --git a/admin/survey/modules/mod_WPN/frontend/android-chrome-512x512.png b/admin/survey/modules/mod_WPN/frontend/android-chrome-512x512.png
new file mode 100644
index 0000000..8e10c1b
--- /dev/null
+++ b/admin/survey/modules/mod_WPN/frontend/android-chrome-512x512.png
Binary files differ
diff --git a/admin/survey/modules/mod_WPN/frontend/apple-splash-1125.png b/admin/survey/modules/mod_WPN/frontend/apple-splash-1125.png
new file mode 100644
index 0000000..0aaf720
--- /dev/null
+++ b/admin/survey/modules/mod_WPN/frontend/apple-splash-1125.png
Binary files differ
diff --git a/admin/survey/modules/mod_WPN/frontend/apple-splash-1242.png b/admin/survey/modules/mod_WPN/frontend/apple-splash-1242.png
new file mode 100644
index 0000000..dbd4770
--- /dev/null
+++ b/admin/survey/modules/mod_WPN/frontend/apple-splash-1242.png
Binary files differ
diff --git a/admin/survey/modules/mod_WPN/frontend/apple-splash-1536.png b/admin/survey/modules/mod_WPN/frontend/apple-splash-1536.png
new file mode 100644
index 0000000..86c5313
--- /dev/null
+++ b/admin/survey/modules/mod_WPN/frontend/apple-splash-1536.png
Binary files differ
diff --git a/admin/survey/modules/mod_WPN/frontend/apple-splash-1668.png b/admin/survey/modules/mod_WPN/frontend/apple-splash-1668.png
new file mode 100644
index 0000000..3c88be3
--- /dev/null
+++ b/admin/survey/modules/mod_WPN/frontend/apple-splash-1668.png
Binary files differ
diff --git a/admin/survey/modules/mod_WPN/frontend/apple-splash-2048.png b/admin/survey/modules/mod_WPN/frontend/apple-splash-2048.png
new file mode 100644
index 0000000..c61ef82
--- /dev/null
+++ b/admin/survey/modules/mod_WPN/frontend/apple-splash-2048.png
Binary files differ
diff --git a/admin/survey/modules/mod_WPN/frontend/apple-splash-640.png b/admin/survey/modules/mod_WPN/frontend/apple-splash-640.png
new file mode 100644
index 0000000..02fdc6f
--- /dev/null
+++ b/admin/survey/modules/mod_WPN/frontend/apple-splash-640.png
Binary files differ
diff --git a/admin/survey/modules/mod_WPN/frontend/apple-splash-750.png b/admin/survey/modules/mod_WPN/frontend/apple-splash-750.png
new file mode 100644
index 0000000..36ec024
--- /dev/null
+++ b/admin/survey/modules/mod_WPN/frontend/apple-splash-750.png
Binary files differ
diff --git a/admin/survey/modules/mod_WPN/frontend/apple-touch-icon.png b/admin/survey/modules/mod_WPN/frontend/apple-touch-icon.png
new file mode 100644
index 0000000..6fce72f
--- /dev/null
+++ b/admin/survey/modules/mod_WPN/frontend/apple-touch-icon.png
Binary files differ
diff --git a/admin/survey/modules/mod_WPN/frontend/browserconfig.xml b/admin/survey/modules/mod_WPN/frontend/browserconfig.xml
new file mode 100644
index 0000000..3b0a805
--- /dev/null
+++ b/admin/survey/modules/mod_WPN/frontend/browserconfig.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<browserconfig>
+ <msapplication>
+ <tile>
+ <square150x150logo src="/mstile-150x150.png"/>
+ <TileColor>#da532c</TileColor>
+ </tile>
+ </msapplication>
+</browserconfig>
diff --git a/admin/survey/modules/mod_WPN/frontend/css/main.css b/admin/survey/modules/mod_WPN/frontend/css/main.css
new file mode 100644
index 0000000..5a9be8b
--- /dev/null
+++ b/admin/survey/modules/mod_WPN/frontend/css/main.css
@@ -0,0 +1,509 @@
+/*! HTML5 Boilerplate v5.0 | MIT License | http://h5bp.com/ */
+
+html {
+ color: #222;
+ font-size: 1em;
+ line-height: 1.4;
+}
+
+::-moz-selection {
+ background: #b3d4fc;
+ text-shadow: none;
+}
+
+::selection {
+ background: #b3d4fc;
+ text-shadow: none;
+}
+
+hr {
+ display: block;
+ height: 1px;
+ border: 0;
+ border-top: 1px solid #ccc;
+ margin: 1em 0;
+ padding: 0;
+}
+
+audio,
+canvas,
+iframe,
+img,
+svg,
+video {
+ vertical-align: middle;
+}
+
+fieldset {
+ border: 0;
+ margin: 0;
+ padding: 0;
+}
+
+textarea {
+ resize: vertical;
+}
+
+.browserupgrade {
+ margin: 0.2em 0;
+ background: #ccc;
+ color: #000;
+ padding: 0.2em 0;
+}
+
+
+/* ===== Initializr Styles ==================================================
+ Author: Jonathan Verrecchia - verekia.com/initializr/responsive-template
+ ========================================================================== */
+
+body {
+ font: 16px/26px Helvetica, Helvetica Neue, Arial;
+}
+
+.wrapper {
+ width: 90%;
+ margin: 0 5%;
+}
+
+/* ===================
+ ALL: Blue Theme
+ =================== */
+
+.header-container {
+ border-bottom: 20px solid #264de4;
+ position: fixed;
+ width: 100%;
+ top: 0px;
+}
+
+.footer-container,
+.main aside {
+ border-top: 20px solid #264de4;
+}
+
+.header-container,
+.footer-container,
+.main aside {
+ background: #2965f1;
+}
+
+.title {
+ color: white;
+}
+
+/* ==============
+ MOBILE: Menu
+ ============== */
+
+nav ul {
+ margin: 0;
+ padding: 0;
+ list-style-type: none;
+}
+
+nav a {
+ display: block;
+ margin-bottom: 10px;
+ padding: 15px 0;
+
+ text-align: center;
+ text-decoration: none;
+ font-weight: bold;
+
+ color: white;
+ background: #264de4;
+}
+
+nav{
+ display: none;
+}
+
+nav a:hover,
+nav a:visited {
+ color: white;
+}
+
+nav a:hover {
+ text-decoration: underline;
+}
+
+/* ==============
+ MOBILE: Main
+ ============== */
+
+.main {
+ padding: 30px 0;
+}
+
+.main article h1 {
+ font-size: 2em;
+}
+
+.main aside {
+ color: white;
+ padding: 0px 5% 10px;
+}
+
+.footer-container footer {
+ color: white;
+ padding: 20px 0;
+}
+
+/* ===============
+ ALL: IE Fixes
+ =============== */
+
+.ie7 .title {
+ padding-top: 20px;
+}
+
+/* ==========================================================================
+ Author's custom styles
+ ========================================================================== */
+
+.subtitle{
+ font-size: 1.1em;
+ font-style: italic;
+ font-weight: bolder;
+}
+
+.responsiveImg {
+ margin: auto;
+ max-width: 128px;
+ border-radius: 50%;
+ padding: 0px 20px 10px 10px;
+}
+
+.main header, .main section, .main footer{
+ padding: 10px;
+ margin-bottom: 20px;
+}
+
+.main header h1, .main section h2, .facultyContainer h4{
+ background: #2965f1;
+ color: white;
+ padding: 10px;
+ border-top: 20px solid #264de4;
+}
+
+.facultyContainer{
+ padding: 5px;
+
+}
+.facultyImage{
+ float: left;
+ width: 30%;
+ height: 30%;
+ min-width: 180px;
+ margin: auto;
+ text-align: center;
+}
+
+aside a{
+ color: white;
+ text-decoration: none;
+}
+
+.footerLinks{
+ float: right;
+ text-align: right;
+}
+
+.footerLinks a{
+ color: white;
+ text-decoration: none;
+}
+
+#trigger{
+ float: right;
+ line-height: 10px;
+ padding: 5px;
+ height: 32px;
+ width: 32px;
+ position: fixed;
+ margin: 5px 10px 0px 15px;
+ cursor: pointer;
+ cursor: hand;
+ background-color: #264de4;
+ border-radius: 21px;
+ vertical-align: text-top;
+ right: 10px;
+ top: 10px;
+}
+.triggerLine{
+ display: block;
+ width: calc(100% - 9px);
+ text-align: center;
+ height: 2px;
+ background-color: white;
+ margin: 6px auto;
+ border-radius: 2px;
+}
+.main-container{
+ margin-top: 40px;
+}
+
+#addToHomeScreen{
+ display: block;
+ margin-top: 20px;
+ padding: 0px;
+ display: none;
+}
+
+#addToHomeScreen img{
+ max-width: 57px;
+ margin: 10px;
+ float: left;
+}
+
+#addToHomeScreen button{
+ background-color: #264de4;
+ color: white;
+ border: 1px #2965f1 solid;
+ margin: 5px 10px;
+}
+
+#instructions{
+ text-align: center;
+ background-color: #f2f4f4;
+ position: fixed;
+ bottom: 0px;
+ right: 20px;
+ left: 20px;
+ width: calc(100%-40px);
+ padding: 0px 10px 10px 10px;
+ display: none;
+}
+
+#instructions img{
+ max-width: 64px;
+}
+
+#instructions button{
+ position: absolute;
+ top: 0px;
+ right: 0px;
+ background-color: #264de4;
+ color: white;
+ border: 1px #2965f1 solid;
+}
+
+
+/* ==========================================================================
+ Media Queries
+ ========================================================================== */
+
+@media only screen and (min-width: 480px) {
+
+/* ====================
+ INTERMEDIATE: Menu
+ ==================== */
+
+ nav a {
+ float: left;
+ width: 27%;
+ margin: 0 1.7%;
+ padding: 25px 2%;
+ margin-bottom: 0;
+ }
+
+ nav li:first-child a {
+ margin-left: 0;
+ }
+
+ nav li:last-child a {
+ margin-right: 0;
+ }
+ #trigger{
+ display: block;
+ }
+
+
+/* ========================
+ INTERMEDIATE: IE Fixes
+ ======================== */
+
+ nav ul li {
+ display: inline;
+ }
+
+ .oldie nav a {
+ margin: 0 0.7%;
+ }
+}
+
+@media only screen and (min-width: 768px) {
+
+/* ====================
+ WIDE: CSS3 Effects
+ ==================== */
+
+ .header-container,
+ .main aside,
+ .main header,
+ .main section,
+ .main footer {
+ -webkit-box-shadow: 0 5px 10px #aaa;
+ -moz-box-shadow: 0 5px 10px #aaa;
+ box-shadow: 0 5px 10px #aaa;
+ }
+
+/* ============
+ WIDE: Menu
+ ============ */
+
+ .title {
+ float: left;
+ }
+
+ nav {
+ float: right;
+ width: 38%;
+ display: block !important;
+ }
+ #trigger{
+ display: none;
+ }
+
+/* ============
+ WIDE: Main
+ ============ */
+
+ .main article {
+ float: left;
+ width: 57%;
+ }
+
+ .main aside {
+ float: right;
+ width: 28%;
+ }
+
+ .main-container{
+ margin-top: 100px;
+ }
+}
+
+@media only screen and (min-width: 1140px) {
+
+/* ===============
+ Maximal Width
+ =============== */
+
+ .wrapper {
+ width: 1026px; /* 1140px - 10% for margins */
+ margin: 0 auto;
+ }
+}
+
+/* ==========================================================================
+ Helper classes
+ ========================================================================== */
+
+.hidden {
+ display: none !important;
+ visibility: hidden;
+}
+
+.visuallyhidden {
+ border: 0;
+ clip: rect(0 0 0 0);
+ height: 1px;
+ margin: -1px;
+ overflow: hidden;
+ padding: 0;
+ position: absolute;
+ width: 1px;
+}
+
+.visuallyhidden.focusable:active,
+.visuallyhidden.focusable:focus {
+ clip: auto;
+ height: auto;
+ margin: 0;
+ overflow: visible;
+ position: static;
+ width: auto;
+}
+
+.invisible {
+ visibility: hidden;
+}
+
+.clearfix:before,
+.clearfix:after {
+ content: " ";
+ display: table;
+}
+
+.clearfix:after {
+ clear: both;
+}
+
+.clearfix {
+ *zoom: 1;
+}
+
+/* ==========================================================================
+ Print styles
+ ========================================================================== */
+
+@media print {
+ *,
+ *:before,
+ *:after {
+ background: transparent !important;
+ color: #000 !important;
+ box-shadow: none !important;
+ text-shadow: none !important;
+ }
+
+ a,
+ a:visited {
+ text-decoration: underline;
+ }
+
+ a[href]:after {
+ content: " (" attr(href) ")";
+ }
+
+ abbr[title]:after {
+ content: " (" attr(title) ")";
+ }
+
+ a[href^="#"]:after,
+ a[href^="javascript:"]:after {
+ content: "";
+ }
+
+ pre,
+ blockquote {
+ border: 1px solid #999;
+ page-break-inside: avoid;
+ }
+
+ thead {
+ display: table-header-group;
+ }
+
+ tr,
+ img {
+ page-break-inside: avoid;
+ }
+
+ img {
+ max-width: 100% !important;
+ }
+
+ p,
+ h2,
+ h3 {
+ orphans: 3;
+ widows: 3;
+ }
+
+ h2,
+ h3 {
+ page-break-after: avoid;
+ }
+} \ No newline at end of file
diff --git a/admin/survey/modules/mod_WPN/frontend/css/normalize.min.css b/admin/survey/modules/mod_WPN/frontend/css/normalize.min.css
new file mode 100644
index 0000000..f6e0b65
--- /dev/null
+++ b/admin/survey/modules/mod_WPN/frontend/css/normalize.min.css
@@ -0,0 +1 @@
+/*! normalize.css v3.0.2 | MIT License | git.io/normalize */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0} \ No newline at end of file
diff --git a/admin/survey/modules/mod_WPN/frontend/css/production.css b/admin/survey/modules/mod_WPN/frontend/css/production.css
new file mode 100644
index 0000000..bf89b99
--- /dev/null
+++ b/admin/survey/modules/mod_WPN/frontend/css/production.css
@@ -0,0 +1 @@
+/*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,footer,header,nav,section{display:block}h1{font-size:2em;margin:.67em 0}figcaption,figure,main{display:block}figure{margin:1em 40px}hr{-webkit-box-sizing:content-box;box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent;-webkit-text-decoration-skip:objects}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:inherit}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}dfn{font-style:italic}mark{background-color:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}audio,video{display:inline-block}audio:not([controls]){display:none;height:0}img{border-style:none}svg:not(:root){overflow:hidden}button,input,optgroup,select,textarea{font-family:sans-serif;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{display:inline-block;vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{-webkit-box-sizing:border-box;box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details,menu{display:block}summary{display:list-item}canvas{display:inline-block}template{display:none}[hidden]{display:none}blockquote,caption,dd,dl,fieldset,figure,form,hr,ol,pre,table,td,th,ul{margin:0;padding:0}[tabindex='-1']:focus{outline:0}body,button,input,select,textarea{-webkit-font-smoothing:antialiased;-webkit-text-size-adjust:100%}a:active,a:hover{outline:0}[role=button],a,button,input,label,select,textarea{-ms-touch-action:manipulation;touch-action:manipulation}ol,ul{margin-bottom:.8rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}code,kbd,pre,samp{font-family:Monaco,Menlo,Consolas,monospace}b,strong{line-height:inherit}em,i{font-style:italic;line-height:inherit}table{display:table;max-width:100%}td,th{line-height:1.6rem;vertical-align:middle}th{text-align:left}form{font-size:1rem}fieldset{border:0;min-width:0}legend{line-height:inherit;margin:0}input,optgroup,select,textarea{line-height:inherit}input,label,select{vertical-align:middle}input[type=file]{display:block;width:100%}textarea{height:auto;resize:vertical}input:focus,select:focus,textarea:focus{outline:0}.select select:focus:-moz-focusring{color:transparent;text-shadow:0 0 0 #000}select[multiple],select[size]{height:auto}.select--list:after{content:none!important}select::-ms-expand{display:none}option{color:#262b3a;background-color:#fff}fieldset[disabled] input,input[disabled],input[readonly]{cursor:not-allowed;opacity:1;pointer-events:none}button{line-height:inherit;vertical-align:middle}embed,iframe,img,object{display:inline-block;vertical-align:middle}iframe{border:0}img{border:0;font-style:italic;height:auto;-ms-interpolation-mode:bicubic}svg{max-height:100%}.gm-style img{max-width:none}html{-webkit-box-sizing:border-box;box-sizing:border-box;font-family:Montserrat,Avenir,"Avenir Next",Trebuchet,Verdana,sans-serif;font-size:14px;font-style:normal;font-weight:400;min-height:100%;-webkit-tap-highlight-color:transparent}*,:after,:before{-webkit-box-sizing:inherit;box-sizing:inherit}body{background-color:#f2f2f2!important;color:#262b3a;line-height:1.6rem;margin:0;padding:0;-moz-osx-font-smoothing:grayscale}::-moz-selection{background-color:#294ace;color:#fff;text-shadow:none}::selection{background-color:#294ace;color:#fff;text-shadow:none}img::-moz-selection{background:0 0}img::selection{background:0 0}img::-moz-selection{background:0 0}.btn{background-image:none;border-radius:30px;border-style:solid;border-width:1px;cursor:pointer;display:inline-block;font-family:Montserrat,Avenir,"Avenir Next",Trebuchet,Verdana,sans-serif;font-size:1rem;font-weight:700;line-height:1.6rem;margin-bottom:0;padding:.65rem 2.2rem .55rem;text-align:center;text-decoration:none;-ms-touch-action:manipulation;touch-action:manipulation;-webkit-transition:background-color .2s ease-out,background .2s ease-out,color .2s ease-out,border .2s ease-out;transition:background-color .2s ease-out,background .2s ease-out,color .2s ease-out,border .2s ease-out;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:middle;white-space:nowrap;-webkit-appearance:none;-moz-appearance:none;appearance:none}.btn:focus,.btn:hover{outline:0;text-decoration:none}.btn:active{outline:0;background-image:none}.btn.disabled,.btn[disabled],.btn[readonly],fieldset[disabled] .btn{cursor:not-allowed!important;opacity:1;pointer-events:none}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn--sm{font-size:.618rem;padding:.1rem .6rem 0}.btn--default{background-color:#294ace;border-color:#294ace;color:#fff}.btn--default:focus,.btn--default:hover{background-color:#213ba3;border-color:#213ba3}.btn--default:active{background-color:#182b79;border-color:#182b79}.btn--secondary,.btn--secondary:visited{background-color:#69f0ae;border-color:#69f0ae;color:#262b3a}.btn--secondary:focus,.btn--secondary:hover,.btn--secondary:visited:focus,.btn--secondary:visited:hover{background-color:#3beb95;border-color:#3beb95}.btn--secondary:active,.btn--secondary:visited:active{background-color:#16dd7c;border-color:#16dd7c}.container{margin-left:auto;margin-right:auto;max-width:900px;width:90%}.container--lg{margin-left:auto;margin-right:auto;max-width:1100px;width:90%}canvas,iframe,img,svg,video{max-width:100%}.logo{max-height:300px}.download{max-height:45px}.mentioned{max-height:45px}.illustration--small{max-height:80px}.icon{height:30px}.cta-image{max-height:100px}.form-control{background-image:none;border:1px solid transparent;border-radius:7px;color:#262b3a;display:block;font-family:Montserrat,Avenir,"Avenir Next",Trebuchet,Verdana,sans-serif;font-size:1rem;line-height:1.6rem;max-width:100%;padding:.65rem .8rem .55rem;width:100%;-moz-osx-font-smoothing:grayscale}.label{cursor:default;display:inline-block;max-width:100%}.legend{display:block;white-space:normal;width:100%}.form--stacked .checkbox,.form--stacked .input,.form--stacked .label,.form--stacked .radio,.form--stacked .select,.form--stacked .textarea{display:block;width:100%}.form--inline .form-control{display:inline-block;vertical-align:middle;width:auto}.form--inline .checkbox,.form--inline .radio{display:inline-block;vertical-align:middle}.select{color:#262b3a;display:block;position:relative}.select select{background-color:#fff;border:1px solid #abb2c9;border-radius:7px;color:#262b3a;cursor:pointer;display:inline-block;font-family:Montserrat,Avenir,"Avenir Next",Trebuchet,Verdana,sans-serif;line-height:1.6rem;margin:0;outline:0;padding:.65rem .8rem .55rem;width:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none}.select select>option{background-color:#fff}.select:after{border-top:5px solid;border-right:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid transparent;content:"";display:inline-block;height:0;margin-top:-2px;pointer-events:none;position:absolute;right:13px;top:50%;width:0}::-webkit-input-placeholder{color:#7380a4;-webkit-font-smoothing:antialiased}::-moz-placeholder{color:#7380a4;-moz-osx-font-smoothing:grayscale}:-ms-input-placeholder{color:#7380a4}.grid-row{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:0;-ms-flex:0 1 auto;flex:0 1 auto;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;margin:0 -.8rem}.grid-column{-webkit-box-flex:1;-ms-flex:1 0 0%;flex:1 0 0%;padding:0 .8rem}.grid-row--flex-cells>.grid-column{display:-webkit-box;display:-ms-flexbox;display:flex}.grid-row--top{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.grid-row--center{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.grid-row--bottom{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.column--top{-ms-flex-item-align:start;align-self:flex-start}.column--center{-ms-flex-item-align:center;align-self:center}.column--bottom{-ms-flex-item-align:end;align-self:flex-end}.span-12,.span-whole{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.span-6,.span-half{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.span-4,.span-one-third{-ms-flex-preferred-size:33.33333%;flex-basis:33.33333%;max-width:33.33333%}.span-8,.span-two-thirds{-ms-flex-preferred-size:66.66667%;flex-basis:66.66667%;max-width:66.66667%}.span-3,.span-one-fourth{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.span-two-fourths{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.span-9,.span-three-fourths{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.span-one-fifth{-ms-flex-preferred-size:20%;flex-basis:20%;max-width:20%}.span-two-fifths{-ms-flex-preferred-size:40%;flex-basis:40%;max-width:40%}.span-three-fifths{-ms-flex-preferred-size:60%;flex-basis:60%;max-width:60%}.span-four-fifths{-ms-flex-preferred-size:80%;flex-basis:80%;max-width:80%}.span-1{-ms-flex-preferred-size:8.33333%;flex-basis:8.33333%;max-width:8.33333%}.span-2{-ms-flex-preferred-size:16.66667%;flex-basis:16.66667%;max-width:16.66667%}.span-5{-ms-flex-preferred-size:41.66667%;flex-basis:41.66667%;max-width:41.66667%}.span-7{-ms-flex-preferred-size:58.33333%;flex-basis:58.33333%;max-width:58.33333%}.span-10{-ms-flex-preferred-size:83.33333%;flex-basis:83.33333%;max-width:83.33333%}.span-11{-ms-flex-preferred-size:91.66667%;flex-basis:91.66667%;max-width:91.66667%}.offset-12{margin-left:100%}.offset-6,.offset-half{margin-left:50%}.offset-4,.offset-one-third{margin-left:33.33333%}.offset-8,.offset-two-thirds{margin-left:66.66667%}.offset-3,.offset-one-fourth{margin-left:25%}.offset-two-fourths{margin-left:50%}.offset-9,.offset-three-fourths{margin-left:75%}.offset-one-fifth{margin-left:20%}.offset-two-fifths{margin-left:40%}.offset-three-fifths{margin-left:60%}.offset-four-fifths{margin-left:80%}.offset-1{margin-left:8.33333%}.offset-2{margin-left:16.66667%}.offset-5{margin-left:41.66667%}.offset-7{margin-left:58.33333%}.offset-10{margin-left:83.33333%}.offset-11{margin-left:91.66667%}.default-links a,.default-links a:link,.default-links a:visited,.link,.link:link,.link:visited{color:#294ace;text-decoration:none;-webkit-transition:color .2s ease-out;transition:color .2s ease-out}.default-links a:focus,.default-links a:hover,.link:focus,.link:hover{color:#213ba3}.default-links a:active,.link:active{background-image:none;color:#142464;outline:0;-webkit-transition:color .2s ease-out;transition:color .2s ease-out}.link--text{border-bottom:1px solid #294ace}.no-bullets{list-style:none}.list--indented{padding-left:2.4rem}.list--inline{font-size:0}.list--inline li{display:inline-block;font-size:1rem}.h1,h1{font-size:2.1rem}.h2,h2{font-size:1.8rem}.h3,h3{font-size:1.3rem}.h4,dl,h4,ol,p,ul{font-size:1rem}.h5,h5{font-size:.618rem}.h6,.small,h6,small{font-size:.618rem}h1,h2,h3,h4,h5,h6{font-family:"Source Serif Pro",Georgia,Times,serif;font-weight:700;line-height:1;margin-top:0;margin-bottom:.8rem;text-rendering:optimizeLegibility}h6{color:#4a5472}.h1,.h2,.h3,.h4,.h5,.h6{line-height:1;margin-bottom:.8rem}p{margin:0}.small,small{font-weight:400;line-height:1;font-size:.8rem}hr{border:0;border-top:1px solid #abb2c9;display:block;height:1px}.blockquote{border-left:4px solid #abb2c9;font-family:Montserrat,Avenir,"Avenir Next",Trebuchet,Verdana,sans-serif;font-size:1.3rem;font-style:italic;max-width:100%;margin-bottom:.8rem;padding-left:1.2rem}.blockquote:after,.blockquote:before{content:""}.bold{font-weight:700}.regular{font-weight:400}.italic{font-style:italic}.align--left{text-align:left}.align--center{text-align:center}.align--right{text-align:right}.align--justify{text-align:justify}.line-height--base{line-height:1.6rem}.line-height--heading{line-height:1}.font--heading{font-family:"Source Serif Pro",Georgia,Times,serif}.font--reading{font-family:"Source Serif Pro",Georgia,Times,serif}.font--ui{font-family:Montserrat,Avenir,"Avenir Next",Trebuchet,Verdana,sans-serif}.border--full{border-color:#abb2c9;border-style:solid;border-width:1px}.border--top{border-top-color:#abb2c9;border-top-style:solid;border-top-width:1px}.border--right{border-right-color:#abb2c9;border-right-style:solid;border-right-width:1px}.border--bottom{border-bottom-color:#abb2c9;border-bottom-style:solid;border-bottom-width:1px}.border--left{border-left-color:#abb2c9;border-left-style:solid;border-left-width:1px}.border--none{border:0}.rounded{border-radius:7px}.rounded--top{border-radius:7px 7px 0 0}.rounded--right{border-radius:0 7px 7px 0}.rounded--bottom{border-radius:0 0 7px 7px}.rounded--left{border-radius:7px 0 0 7px}.circle{border-radius:50%}.text--white{color:#fff}.text--lightest-gray{color:#abb2c9}.text--light-gray{color:#7380a4}.text--gray{color:#4a5472}.text--dark-gray{color:#262b3a}.text--darkest-gray{color:#020203}.text--primary-color{color:#294ace}.text--secondary-color{color:#69f0ae}.text--tertiary-color{color:#ff5252}.bg--white{background-color:#fff}.bg--lightest-gray{background-color:#abb2c9}.bg--light-gray{background-color:#7380a4}.bg--gray{background-color:#4a5472}.bg--dark-gray{background-color:#262b3a}.bg--darkest-gray{background-color:#020203}.bg--primary-color{background-color:#294ace}.bg--secondary-color{background-color:#69f0ae}.bg--tertiary-color{background-color:#ff5252}.m0{margin:0}.mt0{margin-top:0}.mr0{margin-right:0}.mb0{margin-bottom:0}.ml0{margin-left:0}.m1{margin:.8rem}.mt1{margin-top:.8rem}.mr1{margin-right:.8rem}.mb1{margin-bottom:.8rem}.ml1{margin-left:.8rem}.m2{margin:2rem}.mt2{margin-top:2rem}.mr2{margin-right:2rem}.mb2{margin-bottom:2rem}.ml2{margin-left:2rem}.m3{margin:3.2rem}.mt3{margin-top:3.2rem}.mr3{margin-right:3.2rem}.mb3{margin-bottom:3.2rem}.ml3{margin-left:3.2rem}.m4{margin:4.4rem}.mt4{margin-top:4.4rem}.mr4{margin-right:4.4rem}.mb4{margin-bottom:4.4rem}.ml4{margin-left:4.4rem}.p-mb{margin-bottom:.8rem}.centered{margin-right:auto;margin-left:auto}.p0{padding:0}.pt0{padding-top:0}.pr0{padding-right:0}.pb0{padding-bottom:0}.pl0{padding-left:0}.p1{padding:.8rem}.pt1{padding-top:.8rem}.pr1{padding-right:.8rem}.pb1{padding-bottom:.8rem}.pl1{padding-left:.8rem}.p2{padding:2rem}.pt2{padding-top:2rem}.pr2{padding-right:2rem}.pb2{padding-bottom:2rem}.pl2{padding-left:2rem}.p3{padding:3.2rem}.pt3{padding-top:3.2rem}.pr3{padding-right:3.2rem}.pb3{padding-bottom:3.2rem}.pl3{padding-left:3.2rem}.p4{padding:4.4rem}.pt4{padding-top:4.4rem}.pr4{padding-right:4.4rem}.pb4{padding-bottom:4.4rem}.pl4{padding-left:4.4rem}.relative{position:relative}.absolute{position:absolute}.fixed{position:fixed}.top--0{top:0}.right--0{right:0}.bottom--0{bottom:0}.left--0{left:0}.z1{z-index:1}.z2{z-index:2}.z3{z-index:3}.z4{z-index:4}.z5{z-index:5}.vertical--top{vertical-align:top}.vertical--middle{vertical-align:middle}.vertical--bottom{vertical-align:bottom}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:-webkit-box;display:-ms-flexbox;display:flex}.overflow--scroll{overflow:scroll}.overflow--hidden{overflow:hidden}.overflow--visible{overflow:visible}.overflow--auto{overflow:auto}.show-on-mobile{display:none!important}.float--left{float:left}.float--right{float:right}.float--none{float:none}.full-width{width:100%}.half-width{width:50%}.fit{max-width:100%}.clearfix:after,.clearfix:before{content:"";display:table}.clearfix:after{clear:both}@media screen and (min-width:40em){html{font-size:16px}.h1,h1{font-size:4.236rem}.h2,h2{font-size:2.618rem}.h3,h3{font-size:1.618rem}.h4,dl,h4,ol,p,ul{font-size:1rem}.h5,h5{font-size:.618rem}.h6,.small,h6,small{font-size:.618rem}}@media screen and (max-width:50em){input,select,textarea{font-size:16px}}@media screen and (max-width:40em){.btn{display:block;margin-top:.8rem;width:100%}.grid-row{margin:0 auto}.grid-column{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%;padding:0;margin-left:0}.order-1{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.order-2{-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2}.order-3{-webkit-box-ordinal-group:4;-ms-flex-order:3;order:3}.block-on-mobile,.show-on-mobile{display:block!important}.hide-on-mobile{display:none!important}.align--center-on-mobile{text-align:center!important}.no-mr-on-mobile{margin-right:0!important}} \ No newline at end of file
diff --git a/admin/survey/modules/mod_WPN/frontend/favicon-16x16.png b/admin/survey/modules/mod_WPN/frontend/favicon-16x16.png
new file mode 100644
index 0000000..55b63b1
--- /dev/null
+++ b/admin/survey/modules/mod_WPN/frontend/favicon-16x16.png
Binary files differ
diff --git a/admin/survey/modules/mod_WPN/frontend/favicon-32x32.png b/admin/survey/modules/mod_WPN/frontend/favicon-32x32.png
new file mode 100644
index 0000000..5bde17d
--- /dev/null
+++ b/admin/survey/modules/mod_WPN/frontend/favicon-32x32.png
Binary files differ
diff --git a/admin/survey/modules/mod_WPN/frontend/favicon.ico b/admin/survey/modules/mod_WPN/frontend/favicon.ico
new file mode 100644
index 0000000..8036a6b
--- /dev/null
+++ b/admin/survey/modules/mod_WPN/frontend/favicon.ico
Binary files differ
diff --git a/admin/survey/modules/mod_WPN/frontend/humans.txt b/admin/survey/modules/mod_WPN/frontend/humans.txt
new file mode 100644
index 0000000..168fd9d
--- /dev/null
+++ b/admin/survey/modules/mod_WPN/frontend/humans.txt
@@ -0,0 +1,13 @@
+# humanstxt.org/
+# The humans responsible & technology colophon
+
+# TEAM
+
+ Designer/Developer: Jordan Bowman
+ @jrdnbwmn
+ eatapapaya.com
+
+# TECHNOLOGY COLOPHON
+
+ HTML5, CSS3, Javascript
+ Normalize.css, Sass, Pear
diff --git a/admin/survey/modules/mod_WPN/frontend/img/1ka_logo_en.png b/admin/survey/modules/mod_WPN/frontend/img/1ka_logo_en.png
new file mode 100644
index 0000000..17ad047
--- /dev/null
+++ b/admin/survey/modules/mod_WPN/frontend/img/1ka_logo_en.png
Binary files differ
diff --git a/admin/survey/modules/mod_WPN/frontend/img/assign.svg b/admin/survey/modules/mod_WPN/frontend/img/assign.svg
new file mode 100644
index 0000000..80adabf
--- /dev/null
+++ b/admin/survey/modules/mod_WPN/frontend/img/assign.svg
@@ -0,0 +1 @@
+<svg data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="874.47" height="747.94"><defs><linearGradient id="a" x1="769.97" y1="1002.12" x2="769.97" y2="454.75" gradientTransform="rotate(90 961.385 567.605)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="gray" stop-opacity=".25"/><stop offset=".54" stop-color="gray" stop-opacity=".12"/><stop offset="1" stop-color="gray" stop-opacity=".1"/></linearGradient><linearGradient id="b" x1="683.95" y1="639.26" x2="683.95" y2="526.2" gradientTransform="rotate(8.58 3132.77 755.811)" xlink:href="#a"/><linearGradient id="c" x1="475.23" y1="384.44" x2="475.23" y2="-162.93" gradientTransform="translate(-72.73 343.57)" xlink:href="#a"/><linearGradient id="d" x1="393.32" y1="20.38" x2="393.32" y2="-95.86" gradientTransform="rotate(-9.31 2548.498 729.095)" xlink:href="#a"/><linearGradient id="e" x1="480.71" y1="712.84" x2="480.71" y2="165.47" xlink:href="#a"/><linearGradient id="f" x1="-513.22" y1="427.6" x2="-513.22" y2="308.75" gradientTransform="matrix(-1 0 0 1 48 0)" xlink:href="#a"/><linearGradient id="g" x1="652.07" y1="747.94" x2="652.07" y2="579.17" xlink:href="#a"/></defs><path transform="rotate(-81.42 675.036 432.75)" fill="url(#a)" d="M526.87 178.11h547.37v396.16H526.87z" opacity=".5"/><path fill="#f5f5f5" d="M407.334 534.045L487.19 4.765l381.759 57.6-79.857 529.28z"/><path fill="#e0e0e0" d="M503.394 241.968l275.532 41.572-2.52 16.701-275.532-41.572zm-6.298 41.743l275.531 41.572-2.52 16.701-275.53-41.572zM657.133 128.53l141.944 21.415-2.52 16.701-141.944-21.416z"/><path fill="#294ace" d="M663.363 172.172L780.26 189.81l-2.52 16.7-116.897-17.637z"/><path fill="#e0e0e0" d="M490.792 325.46l242.139 36.534-2.52 16.701-242.14-36.533zm-6.305 41.75l208.738 31.494-2.52 16.701-208.738-31.494zm-6.297 41.746l183.69 27.716-2.52 16.7-183.69-27.715zm-6.298 41.749l233.784 35.273-2.52 16.701-233.784-35.273z"/><path fill="#294ace" d="M465.6 492.449l91.841 13.857-2.52 16.7-91.84-13.856z"/><path d="M793 227.53a56.36 56.36 0 1 0-93.8 33.16v.25a19.29 19.29 0 0 0 5.71 5l.11-.24c2.27 2.63 12.72 7.87 25.35 9.74h.28c8 1.22 16.89 1.11 25.14-1.87 0 0 .09-.14.24-.4a20.08 20.08 0 0 0 5.8-2.81l.18-.62A56.3 56.3 0 0 0 793 227.53z" transform="translate(-162.77 -76.03)" fill="url(#b)" opacity=".5"/><circle cx="736.97" cy="217.05" r="54.67" transform="rotate(-81.42 611.44 273.601)" fill="#f5f5f5"/><path d="M549.33 159.05s-13-.89-13.17 23.09a18.71 18.71 0 0 0 5.54 4.83l10.94-23.43zm41.8 6.31s12.72 3 5.78 25.95a18.71 18.71 0 0 1-6.72 3l-3.55-25.61z" fill="#fda57d"/><path d="M555.69 120.69s-8.82 16.91-11.91 14.73c0 0 28.06 32.73 60.75 9.16a85.9 85.9 0 0 0-9.82-18z" fill="#333"/><circle cx="739.39" cy="198.16" r="24.23" transform="rotate(-81.42 613.867 254.714)" fill="#333"/><path d="M590.88 165.32l-41.8-6.3-6.42 16.13s-3.46 7.39-1.12 11.23 27.79 15.59 49 8a22.05 22.05 0 0 0 2.66-13.85c-1.05-8.14-.47-.64-.47-.64z" opacity=".1"/><path d="M591.44 165.41l-41.8-6.3-6.41 16.12s-3.46 7.39-1.12 11.23 27.79 15.59 49 8a22.05 22.05 0 0 0 2.66-13.85c-1.05-8.14-.47-.64-.47-.64z" opacity=".1"/><path d="M591.13 165.36l-41.8-6.3-6.42 16.13s-3.46 7.39-1.12 11.23 27.79 15.59 49 8a22.05 22.05 0 0 0 2.66-13.85c-1.05-8.14-.47-.64-.47-.64z" fill="#fdd835"/><path d="M564.231 147.165l16.72 2.522-2.276 15.09a6.73 6.73 0 0 1-7.658 5.65l-3.422-.516a6.73 6.73 0 0 1-5.65-7.659l2.276-15.089.01.002z" opacity=".1"/><path d="M564.313 146.545l16.72 2.523-2.276 15.089a6.73 6.73 0 0 1-7.659 5.65l-3.411-.514a6.73 6.73 0 0 1-5.651-7.659l2.277-15.09z" fill="#fda57d"/><path d="M564 148.91a24.33 24.33 0 0 0 16.71 2.57l.31-2.05-16.72-2.52z" opacity=".1"/><circle cx="738.61" cy="203.36" r="24.23" transform="rotate(-81.42 613.083 259.916)" fill="#fda57d"/><path d="M554.3 114.78l45.7 6.89s-1.12-19-18.57-20.47-27.13 13.58-27.13 13.58z" fill="#333"/><ellipse cx="715.3" cy="198.8" rx="4.23" ry="2.25" transform="rotate(-81.42 589.763 255.354)" fill="#fda57d"/><ellipse cx="762.11" cy="205.86" rx="4.23" ry="2.25" transform="rotate(-81.42 636.58 262.415)" fill="#fda57d"/><path d="M554.23 115.4l45.7 6.89s-1.12-19-18.57-20.47-27.13 13.58-27.13 13.58z" opacity=".1"/><path transform="matrix(.99 -.16 .16 .99 -230.95 -4.95)" fill="url(#c)" d="M204.42 180.64h396.16v547.37H204.42z" opacity=".5"/><path fill="#f5f5f5" d="M5.635 143.413L386.63 80.955l86.593 528.219L92.23 671.632z"/><path fill="#e0e0e0" d="M93.989 364.122l274.98-45.079 2.732 16.667-274.98 45.08zm6.83 41.666l274.98-45.079 2.732 16.668-274.98 45.079zm104.644-196.845l141.659-23.223 2.732 16.668-141.659 23.223z"/><path fill="#294ace" d="M224.785 248.561l116.663-19.125 2.733 16.668-116.663 19.125z"/><path fill="#e0e0e0" d="M107.649 447.453l241.654-39.616 2.732 16.668-241.654 39.615zm6.828 41.655l208.32-34.151 2.732 16.667-208.32 34.151zm6.831 41.672l183.323-30.054 2.732 16.668-183.323 30.053zm6.83 41.655l233.316-38.25 2.732 16.668-233.315 38.249z"/><path fill="#294ace" d="M134.975 614.104l91.657-15.026 2.732 16.668-91.656 15.026z"/><path d="M354.81 311.49a57.94 57.94 0 1 0-81.3 62.06l.08.25a19.83 19.83 0 0 0 7.16 3.06v-.27c3.05 1.86 14.93 3.69 27.88 1.53h.28c8.21-1.33 16.87-4.25 24-9.77 0 0 0-.16.1-.46a20.64 20.64 0 0 0 4.79-4.58v-.66a57.88 57.88 0 0 0 17.01-51.16z" transform="translate(-162.77 -76.03)" fill="url(#d)" opacity=".5"/><circle cx="297.63" cy="320.86" r="56.2" transform="rotate(-9.31 -250.72 1282.25)" fill="#f5f5f5"/><path d="M114.42 270.45s-13 3.25-5.6 26.75a19.24 19.24 0 0 0 6.95 3l3.31-26.38zm42.88-7.03s13.39-1.09 13.84 23.57a19.24 19.24 0 0 1-5.63 5l-11.56-23.94z" fill="#4d8af0"/><circle cx="292.23" cy="301.74" r="24.91" transform="rotate(-9.31 -256.087 1263.145)" fill="#333"/><path d="M157.05 263.46l-42.88 7-1.19 17.81s-1 8.33 2.45 11.34 32.12 6.48 50.41-7.68a22.67 22.67 0 0 0-1.77-14.39c-3.6-7.63-.67-.48-.67-.48z" fill="#4d8af0"/><path d="M157.62 263.37l-42.88 7-1.19 17.81s-1 8.33 2.45 11.34 32.12 6.48 50.41-7.68a22.67 22.67 0 0 0-1.77-14.39c-3.6-7.63-.67-.48-.67-.48z" fill="#4d8af0"/><path d="M157.3 263.42l-42.88 7-1.19 17.84s-1 8.33 2.45 11.34 32.12 6.48 50.41-7.68a22.67 22.67 0 0 0-1.77-14.39c-3.6-7.63-.67-.48-.67-.48z" fill="#4d8af0"/><path d="M125.254 254.053l17.15-2.812 2.568 15.66a6.73 6.73 0 0 1-5.553 7.73l-3.878.637a6.73 6.73 0 0 1-7.73-5.553l-2.567-15.66.01-.002z" opacity=".1"/><path d="M125.151 253.417l17.151-2.812 2.568 15.661a6.73 6.73 0 0 1-5.553 7.73l-3.878.636a6.73 6.73 0 0 1-7.73-5.552l-2.568-15.661.01-.002z" fill="#fda57d"/><path d="M125.57 255.89a25 25 0 0 0 17.16-2.76l-.35-2.11-17.15 2.82z" opacity=".1"/><circle cx="293.11" cy="307.08" r="24.91" transform="rotate(-9.31 -255.223 1268.47)" fill="#fda57d"/><path d="M105.41 226.19l46.89-7.68s-7.11-18.28-24.63-14.16-22.26 21.84-22.26 21.84z" opacity=".1"/><path d="M105.3 225.56l46.93-7.69s-7.11-18.28-24.63-14.16-22.3 21.85-22.3 21.85z" fill="#333"/><ellipse cx="268.86" cy="309.97" rx="2.32" ry="4.35" transform="matrix(.99 -.16 .16 .99 -209.36 -28.46)" fill="#fda57d"/><ellipse cx="316.89" cy="302.1" rx="2.32" ry="4.35" transform="rotate(-9.31 -231.456 1263.544)" fill="#fda57d"/><path fill="url(#e)" d="M282.63 165.47h396.16v547.37H282.63z" opacity=".5"/><path fill="#fff" d="M287.67 169.5h386.08v535.27H287.67z"/><path d="M502 368a59.24 59.24 0 1 1 92.29 49.17v.26a20.28 20.28 0 0 1-6.72 4.28l-.08-.26c-2.77 2.38-14.45 6.19-27.87 6.15h-.29c-8.5 0-17.72-1.5-25.84-5.89 0 0-.07-.16-.18-.45a21.1 21.1 0 0 1-5.59-3.83l-.09-.67A59.18 59.18 0 0 1 502 368z" transform="translate(-162.77 -76.03)" fill="url(#f)" opacity=".5"/><circle cx="398.46" cy="291.97" r="57.46" fill="#f5f5f5"/><path d="M375.92 313.86s-13.69 1.11-10.07 26.11a19.67 19.67 0 0 0 6.52 4.15l7.7-26.07zm44.43 0s13.69 1.11 10.07 26.11a19.67 19.67 0 0 1-6.52 4.15l-7.67-26.15z" fill="#be7c5e"/><path d="M376.51 272.97s-1.05 3.07-2.55 6.62c-3.26 7.76.46 37.58 8.26 40.76 8.75 3.57 20.26 5.85 32.21 1.49 10.39-3.79 13.59-37.73 6.25-46-.86-1-1.76-1.93-2.7-2.87z" fill="#333"/><circle cx="398.5" cy="271.2" r="25.47" fill="#333"/><path d="M420.09 313.86h-44.43l-4.15 17.77s-2.44 8.23.59 11.85 31.33 11.85 52.13.59a23.18 23.18 0 0 0 .59-14.81c-2.37-8.29-.59-.59-.59-.59z" opacity=".1"/><path d="M420.68 313.86h-44.45l-4.15 17.77s-2.44 8.23.59 11.85 31.33 11.85 52.13.59a23.18 23.18 0 0 0 .59-14.81c-2.37-8.29-.59-.59-.59-.59z" opacity=".1"/><path d="M420.35 313.86h-44.43l-4.15 17.77s-2.44 8.23.59 11.85 31.33 11.85 52.13.59a23.18 23.18 0 0 0 .59-14.81c-2.37-8.29-.59-.59-.59-.59z" fill="#3ad29f"/><path d="M389.55 299.11h17.77v16.38a6.73 6.73 0 0 1-6.73 6.73h-4.32a6.73 6.73 0 0 1-6.73-6.73v-16.38z" opacity=".1"/><path d="M389.55 298.45h17.77v16.38a6.73 6.73 0 0 1-6.73 6.73h-4.32a6.73 6.73 0 0 1-6.73-6.73v-16.38z" fill="#be7c5e"/><path d="M389.58 300.97a25.58 25.58 0 0 0 17.77 0v-2.18h-17.77z" opacity=".1"/><circle cx="398.5" cy="276.73" r="25.47" fill="#be7c5e"/><path d="M374.14 267.06h48.58s-4.15-19.62-22.51-18.36-26.07 18.36-26.07 18.36z" fill="#333"/><ellipse cx="373.56" cy="275.65" rx="2.37" ry="4.44" fill="#be7c5e"/><ellipse cx="423.32" cy="275.65" rx="2.37" ry="4.44" fill="#be7c5e"/><path d="M374.14 267.71h48.58s-4.15-19.62-22.51-18.36-26.07 18.36-26.07 18.36z" opacity=".1"/><path fill="#e0e0e0" d="M339.15 401.6H617.8v16.89H339.15zm0 42.22H617.8v16.89H339.15zM474.26 266.5h143.55v16.89H474.26z"/><path fill="#294ace" d="M486.92 308.72h118.22v16.89H486.92z"/><path fill="#e0e0e0" d="M339.15 486.04h244.88v16.89H339.15zm0 42.22h211.1v16.89h-211.1zm0 42.23h185.77v16.89H339.15zm0 42.22h236.43v16.89H339.15z"/><path fill="#294ace" d="M339.15 654.93h92.88v16.89h-92.88z"/><circle cx="652.07" cy="663.56" r="84.39" fill="url(#g)" opacity=".5"/><circle cx="652.07" cy="663.56" r="79.42" fill="#69f0ae"/><path fill="#fff" d="M617.6 652.96l29.78 27.3 42.19-62.04 14.9 12.41-57.09 74.45-42.19-47.15 12.41-4.97z"/></svg> \ No newline at end of file
diff --git a/admin/survey/modules/mod_WPN/frontend/img/aths.png b/admin/survey/modules/mod_WPN/frontend/img/aths.png
new file mode 100644
index 0000000..ee66f21
--- /dev/null
+++ b/admin/survey/modules/mod_WPN/frontend/img/aths.png
Binary files differ
diff --git a/admin/survey/modules/mod_WPN/frontend/img/connected.svg b/admin/survey/modules/mod_WPN/frontend/img/connected.svg
new file mode 100644
index 0000000..0308ba8
--- /dev/null
+++ b/admin/survey/modules/mod_WPN/frontend/img/connected.svg
@@ -0,0 +1 @@
+<svg data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="874.11" height="733.63"><defs><linearGradient id="a" x1="875.04" y1="475.49" x2="303.77" y2="474.73" gradientTransform="matrix(0 1 -1.02 0 1081.62 -103.54)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="gray" stop-opacity=".25"/><stop offset=".54" stop-color="gray" stop-opacity=".12"/><stop offset="1" stop-color="gray" stop-opacity=".1"/></linearGradient><linearGradient id="b" x1="590.41" y1="841.63" x2="590.41" y2="111.52" gradientTransform="matrix(0 1 -1.02 0 1082.43 -102.87)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-opacity=".09"/><stop offset=".55" stop-opacity=".07"/><stop offset="1" stop-opacity=".02"/></linearGradient><linearGradient id="c" x1="837.64" y1="295.46" x2="837.64" y2="83.19" xlink:href="#a"/><linearGradient id="d" x1="305.44" y1="442.78" x2="305.44" y2="230.5" xlink:href="#a"/><linearGradient id="e" x1="-537.55" y1="760.23" x2="-537.55" y2="547.95" gradientTransform="matrix(-1 0 0 1 48 0)" xlink:href="#a"/><linearGradient id="f" x1="137.34" y1="416.18" x2="137.34" y2="343.15" xlink:href="#a"/><linearGradient id="g" x1="677.83" y1="259.53" x2="677.83" y2="186.5" xlink:href="#a"/><linearGradient id="h" x1="425.74" y1="733.63" x2="425.74" y2="660.6" xlink:href="#a"/></defs><path d="M163.68 752.21L162.94 222a20 20 0 0 1 20-20l833.41-1.11a20 20 0 0 1 20 20l.73 530.21a20 20 0 0 1-20 20l-833.41 1.11a20 20 0 0 1-19.99-20z" transform="translate(-162.94 -83.19)" fill="url(#a)" opacity=".5"/><path transform="rotate(-.08 -59067.805 117142.994)" fill="url(#b)" d="M227.85 241.33h741.32v492.4H227.85z"/><rect x="180.15" y="218.77" width="843.16" height="535.49" rx="12.68" ry="12.68" transform="rotate(-.08 -59067.8 117135.832)" fill="#fff"/><path fill="#294ace" opacity=".2" d="M795.12 172.38v462.44H87.93V172.38z"/><ellipse cx="216.59" cy="489.24" rx="19.52" ry="19.06" transform="translate(-163.62 -82.89)" fill="#dbdbdb"/><ellipse cx="989.37" cy="406.92" rx="6.51" ry="6.35" transform="translate(-163.5 -81.82)" fill="#dbdbdb"/><rect x="948.83" y="476.71" width="82.58" height="6.51" rx=".76" ry=".76" transform="rotate(89.92 950.305 356.802)" fill="#dbdbdb"/><path d="M943.46 189a105.82 105.82 0 1 0-164.86 87.83l.07.47a36.22 36.22 0 0 0 12 7.64l.14-.47c5 4.25 25.81 11.05 49.79 11h.52c15.18 0 31.66-2.68 46.16-10.52 0 0 .13-.28.33-.8a37.7 37.7 0 0 0 10-6.83q.09-.61.17-1.2A105.7 105.7 0 0 0 943.46 189z" transform="translate(-162.94 -83.19)" fill="url(#c)" opacity=".5"/><circle cx="674.7" cy="105.83" r="102.64" fill="#f5f5f5"/><path d="M635.49 148.03s-24.46 2-18 46.56a35.13 35.13 0 0 0 11.64 7.41l13.76-46.56zm79.36 0s24.46 2 18 46.56a35.13 35.13 0 0 1-11.64 7.41l-13.76-46.56z" fill="#fda57d"/><path d="M636.55 75.01s-11.64 33.86-18 30.69c0 0 61.26 52.91 115.34 0 0 0-9.52-16.93-23.28-30.69z" fill="#333"/><circle cx="675.81" cy="71.84" r="45.5" fill="#333"/><path d="M714.38 148.03h-79.32l-7.45 31.78s-4.35 14.7 1.06 21.16 56 21.16 93.12 1.06a41.4 41.4 0 0 0 1.06-26.45c-4.23-14.81-1.06-1.06-1.06-1.06z" opacity=".1"/><path d="M715.44 148.03h-79.38l-7.39 31.78s-4.35 14.7 1.06 21.16 56 21.16 93.12 1.06a41.4 41.4 0 0 0 1.06-26.45c-4.23-14.81-1.06-1.06-1.06-1.06z" opacity=".1"/><path d="M714.85 148.03h-79.36l-7.43 31.78s-4.35 14.7 1.06 21.16 56 21.16 93.12 1.06a41.4 41.4 0 0 0 1.06-26.45c-4.23-14.81-1.06-1.06-1.06-1.06z" fill="#294ace"/><path d="M659.82 121.7h31.75v26a15.3 15.3 0 0 1-15.3 15.3h-1.15a15.3 15.3 0 0 1-15.3-15.3v-26z" opacity=".1"/><path d="M659.82 120.52h31.75v26a15.3 15.3 0 0 1-15.3 15.3h-1.15a15.3 15.3 0 0 1-15.3-15.3v-26z" fill="#fda57d"/><path d="M659.89 125.09a45.69 45.69 0 0 0 31.75.09v-3.9h-31.75z" opacity=".1"/><circle cx="675.81" cy="81.72" r="45.5" fill="#fda57d"/><path d="M632.31 64.43h86.75s-7.41-35-40.21-32.8-46.54 32.8-46.54 32.8z" fill="#333"/><ellipse cx="631.25" cy="79.78" rx="4.23" ry="7.94" fill="#fda57d"/><ellipse cx="720.14" cy="79.78" rx="4.23" ry="7.94" fill="#fda57d"/><path d="M632.31 65.61h86.75s-7.41-35-40.21-32.8-46.54 32.8-46.54 32.8z" opacity=".1"/><path d="M411.26 336.32a105.82 105.82 0 1 0-164.85 87.83l.07.47a36.22 36.22 0 0 0 12 7.64l.14-.47c5 4.25 25.81 11.05 49.79 11h.52c15.18 0 31.66-2.68 46.16-10.52 0 0 .13-.28.33-.8a37.7 37.7 0 0 0 10-6.83q.09-.61.17-1.2a105.7 105.7 0 0 0 45.67-87.12z" transform="translate(-162.94 -83.19)" fill="url(#d)" opacity=".5"/><circle cx="142.5" cy="253.14" r="102.64" fill="#f5f5f5"/><path d="M98.06 293.27s-24.46 2-18 46.56a35.13 35.13 0 0 0 11.64 7.41l13.76-46.56zm79.41 0s24.46 2 18 46.56a35.13 35.13 0 0 1-11.64 7.41l-13.77-46.57z" fill="#294ace"/><circle cx="138.43" cy="217.08" r="45.5" fill="#333"/><path d="M177 293.27H97.63l-7.41 31.75s-4.35 14.7 1.06 21.16 56 21.16 93.12 1.06a41.4 41.4 0 0 0 1.06-26.43c-4.23-14.81-1.06-1.06-1.06-1.06z" fill="#4d8af0"/><path d="M178.06 293.27H98.69l-7.41 31.75s-4.35 14.7 1.06 21.16 56 21.16 93.12 1.06a41.4 41.4 0 0 0 1.06-26.43c-4.23-14.81-1.06-1.06-1.06-1.06z" fill="#4d8af0"/><path d="M177.47 293.27H98.06l-7.41 31.75s-4.35 14.7 1.06 21.16 56 21.16 93.12 1.06a41.4 41.4 0 0 0 1.1-26.43c-4.23-14.81-1.06-1.06-1.06-1.06z" fill="#294ace"/><path d="M122.44 266.93h31.75v26a15.3 15.3 0 0 1-15.3 15.3h-1.15a15.3 15.3 0 0 1-15.3-15.3v-26z" opacity=".1"/><path d="M122.44 265.76h31.75v26a15.3 15.3 0 0 1-15.3 15.3h-1.15a15.3 15.3 0 0 1-15.3-15.3v-26z" fill="#fdb797"/><path d="M122.5 270.33a45.69 45.69 0 0 0 31.75.09v-3.9H122.5z" opacity=".1"/><circle cx="138.43" cy="226.96" r="45.5" fill="#fdb797"/><path d="M94.93 210.81h86.77s-7.41-35-40.21-32.8-46.56 32.8-46.56 32.8z" opacity=".1"/><path d="M94.93 209.67h86.77s-7.41-35-40.21-32.8-46.56 32.8-46.56 32.8z" fill="#333"/><ellipse cx="93.87" cy="225.02" rx="4.23" ry="7.94" fill="#fdb797"/><ellipse cx="182.75" cy="225.02" rx="4.23" ry="7.94" fill="#fdb797"/><path d="M101.67 186.46a16.13 16.13 0 0 1 5.85-8.67c2.22-1.54 4.87-2.28 7.41-3.18a56.65 56.65 0 0 0 10.78-5.15c3.86-2.38 7.48-5.24 11.73-6.81 7.31-2.7 15.45-1.24 23 .7a19.35 19.35 0 0 1 5.38 2 20.36 20.36 0 0 1 4.77 4.62l12 14.45a23 23 0 0 1 3 4.19 14.43 14.43 0 0 1 1.36 4.73 12.38 12.38 0 0 1-1.28 7.76c-2 3.46-6.2 5.2-10.2 5.36s-7.93-1-11.78-2.13c-12.4-3.63-25-7-37.82-8.52a106.67 106.67 0 0 0-19.24-.62c-2 .13-4.68 1.06-5.9-1-1.11-1.79.39-5.95.94-7.73z" fill="#333"/><path d="M479.73 653.77a105.82 105.82 0 1 1 164.85 87.83l-.07.47a36.22 36.22 0 0 1-12 7.64l-.14-.47c-5 4.25-25.81 11.05-49.79 11h-.52c-15.18 0-31.66-2.68-46.16-10.52 0 0-.13-.28-.33-.8a37.7 37.7 0 0 1-10-6.83q-.09-.61-.17-1.2a105.7 105.7 0 0 1-45.67-87.12z" transform="translate(-162.94 -83.19)" fill="url(#e)" opacity=".5"/><circle cx="422.6" cy="570.59" r="102.64" fill="#f5f5f5"/><path d="M382.36 609.68s-24.46 2-18 46.56a35.13 35.13 0 0 0 11.64 7.41l13.76-46.56zm79.36 0s24.46 2 18 46.56a35.13 35.13 0 0 1-11.66 7.41l-13.76-46.56z" fill="#be7c5e"/><path d="M383.42 536.67s-1.88 5.48-4.55 11.82c-5.82 13.87.82 67.13 14.75 72.8 15.63 6.37 36.18 10.45 57.53 2.66 18.56-6.77 24.28-67.39 11.16-82.16-1.54-1.73-3.15-3.45-4.83-5.13z" fill="#333"/><circle cx="422.68" cy="533.5" r="45.5" fill="#333"/><path d="M461.25 609.68h-79.36l-7.41 31.75s-4.35 14.7 1.06 21.16 56 21.16 93.12 1.06a41.4 41.4 0 0 0 1.06-26.45c-4.23-14.81-1.06-1.06-1.06-1.06z" opacity=".1"/><path d="M462.31 609.68h-79.36l-7.41 31.75s-4.35 14.7 1.06 21.16 56 21.16 93.12 1.06a41.4 41.4 0 0 0 1.06-26.45c-4.23-14.81-1.06-1.06-1.06-1.06z" opacity=".1"/><path d="M461.72 609.68h-79.36l-7.41 31.75s-4.35 14.7 1.06 21.16 56 21.16 93.12 1.06a41.4 41.4 0 0 0 1.06-26.45c-4.23-14.81-1.06-1.06-1.06-1.06z" fill="#294ace"/><path d="M406.69 583.35h31.75v26a15.3 15.3 0 0 1-15.3 15.3H422a15.3 15.3 0 0 1-15.3-15.3v-26h-.01z" opacity=".1"/><path d="M406.69 582.17h31.75v26a15.3 15.3 0 0 1-15.3 15.3H422a15.3 15.3 0 0 1-15.3-15.3v-26h-.01z" fill="#be7c5e"/><path d="M406.76 586.74a45.69 45.69 0 0 0 31.75.09v-3.9h-31.75z" opacity=".1"/><circle cx="422.68" cy="543.37" r="45.5" fill="#be7c5e"/><path d="M379.18 526.09h86.77s-7.41-35-40.21-32.8-46.56 32.8-46.56 32.8z" fill="#333"/><ellipse cx="378.12" cy="541.43" rx="4.23" ry="7.94" fill="#be7c5e"/><ellipse cx="467.01" cy="541.43" rx="4.23" ry="7.94" fill="#be7c5e"/><path d="M379.18 527.26h86.77s-7.41-35-40.21-32.8-46.56 32.8-46.56 32.8z" opacity=".1"/><path fill="none" stroke="#294ace" stroke-miterlimit="10" stroke-width="2" stroke-dasharray="12" d="M672.1 240.44v382.81H569.4M139.91 380.49v242.76h149.38"/><circle cx="137.34" cy="379.66" r="36.52" fill="url(#f)" opacity=".5"/><circle cx="137.34" cy="379.66" r="34.37" fill="#69f0ae"/><path fill="#fff" d="M122.42 375.08l12.89 11.81 18.25-26.85 6.45 5.37-24.7 32.22-18.26-20.4 5.37-2.15z"/><circle cx="677.83" cy="223.01" r="36.52" fill="url(#g)" opacity=".5"/><circle cx="677.83" cy="223.01" r="34.37" fill="#69f0ae"/><path fill="#fff" d="M662.91 218.43l12.89 11.81 18.26-26.85 6.44 5.37-24.7 32.22-18.26-20.41 5.37-2.14z"/><circle cx="425.74" cy="697.11" r="36.52" fill="url(#h)" opacity=".5"/><circle cx="425.74" cy="697.11" r="34.37" fill="#69f0ae"/><path fill="#fff" d="M410.82 692.53l12.89 11.81 18.26-26.85 6.44 5.37-24.7 32.22-18.26-20.4 5.37-2.15z"/></svg> \ No newline at end of file
diff --git a/admin/survey/modules/mod_WPN/frontend/img/data.svg b/admin/survey/modules/mod_WPN/frontend/img/data.svg
new file mode 100644
index 0000000..a7628fb
--- /dev/null
+++ b/admin/survey/modules/mod_WPN/frontend/img/data.svg
@@ -0,0 +1 @@
+<svg data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="891" height="711.05"><defs><linearGradient id="a" x1="213.62" y1="486" x2="213.62" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="gray" stop-opacity=".25"/><stop offset=".54" stop-color="gray" stop-opacity=".12"/><stop offset="1" stop-color="gray" stop-opacity=".1"/></linearGradient><linearGradient id="b" x1="227.62" y1="373" x2="227.62" y2="362" xlink:href="#a"/><linearGradient id="c" x1="227.62" y1="429" x2="227.62" y2="418" xlink:href="#a"/><linearGradient id="d" x1="329.62" y1="429" x2="329.62" y2="418" xlink:href="#a"/><linearGradient id="e" x1="336.62" y1="83" x2="336.62" y2="72" xlink:href="#a"/><linearGradient id="f" x1="336.62" y1="98" x2="336.62" y2="87" xlink:href="#a"/><linearGradient id="g" x1="336.62" y1="113" x2="336.62" y2="102" xlink:href="#a"/><linearGradient id="h" x1="336.62" y1="128" x2="336.62" y2="117" xlink:href="#a"/><linearGradient id="i" x1="214.12" y1="332" x2="214.12" y2="182" xlink:href="#a"/><linearGradient id="j" x1="383.9" y1="435.3" x2="383.9" y2="283.3" gradientTransform="translate(-5.78 .18)" xlink:href="#a"/><linearGradient id="k" x1="442.9" y1="321.3" x2="442.9" y2="307.3" gradientTransform="translate(-10.11 -4.98)" xlink:href="#a"/><linearGradient id="l" x1="484.9" y1="317.3" x2="484.9" y2="303.3" gradientTransform="translate(-10.64 -8.78)" xlink:href="#a"/><linearGradient id="m" x1="547.96" y1="413.42" x2="547.96" y2="413.16" xlink:href="#a"/><linearGradient id="n" x1="517.63" y1="581.29" x2="517.63" y2="408.48" xlink:href="#a"/><linearGradient id="o" x1="191.31" y1="423.33" x2="191.31" y2="423.02" xlink:href="#a"/><linearGradient id="p" x1="228.23" y1="619.83" x2="228.23" y2="417.36" xlink:href="#a"/><linearGradient id="q" x1="692" y1="659.05" x2="692" y2="163.05" xlink:href="#a"/><linearGradient id="r" x1="595.12" y1="395.68" x2="595.12" y2="241.68" xlink:href="#a"/><linearGradient id="s" x1="788.12" y1="472.68" x2="788.12" y2="318.68" xlink:href="#a"/><linearGradient id="t" x1="696.12" y1="614.68" x2="696.12" y2="508.68" xlink:href="#a"/><linearGradient id="u" x1="749.12" y1="475.15" x2="749.12" y2="351.15" xlink:href="#a"/><linearGradient id="v" x1="790.62" y1="362.68" x2="790.62" y2="344.68" xlink:href="#a"/><linearGradient id="w" x1="760.62" y1="699.68" x2="760.62" y2="677.68" xlink:href="#a"/><linearGradient id="x" x1="607.62" y1="687.68" x2="607.62" y2="566.68" xlink:href="#a"/><linearGradient id="y" x1="608.62" y1="648.68" x2="608.62" y2="648.68" xlink:href="#a"/><linearGradient id="z" x1="482.12" y1="645.68" x2="482.12" y2="590.68" xlink:href="#a"/><linearGradient id="A" x1="459.62" y1="699.68" x2="459.62" y2="677.68" xlink:href="#a"/><linearGradient id="B" x1="486.35" y1="708.79" x2="600.65" y2="708.79" xlink:href="#a"/></defs><ellipse cx="370" cy="694.05" rx="67" ry="17" fill="#f2f2f2"/><ellipse cx="375" cy="506.05" rx="67" ry="17" fill="#f2f2f2"/><ellipse cx="67" cy="514.05" rx="67" ry="17" fill="#f2f2f2"/><path fill="#f5f5f5" d="M22.62 4h383v14.5h-383z"/><path fill="url(#a)" d="M15.62 0h396v486h-396z"/><path fill="#fff" d="M22.62 18.5h383V478h-383z"/><circle cx="30.5" cy="11.5" r="3.5" fill="#ff5252"/><circle cx="40.12" cy="11.5" r="3.5" fill="#ff0"/><circle cx="49.75" cy="11.5" r="3.5" fill="#69f0ae"/><path fill="#294ace" d="M33.62 36h149v9h-149z" opacity=".2"/><path fill="#f5f5f5" d="M139.62 73h149v9h-149z"/><path fill="#294ace" opacity=".5" d="M33.62 363h149v9h-149z"/><path fill="url(#b)" d="M202.62 362h50v11h-50z"/><path fill="url(#c)" d="M202.62 418h50v11h-50z"/><path fill="url(#d)" d="M304.62 418h50v11h-50z"/><path fill="#294ace" d="M204.62 363h47v9h-47zm0 56h47v9h-47zm101 0h47v9h-47z"/><path fill="#f5f5f5" d="M33.62 391h149v9h-149z"/><path fill="#294ace" opacity=".5" d="M204.62 391h149v9h-149z"/><path fill="#f5f5f5" d="M204.62 447h149v9h-149z"/><path fill="#294ace" opacity=".5" d="M33.62 419h149v9h-149z"/><path fill="#f5f5f5" d="M33.62 447h149v9h-149zm106-359h84v9h-84zm99 0h29v9h-29zm-99 30h84v9h-84zm99 0h29v9h-29zm-99-15h149v9h-149z"/><path fill="#294ace" d="M243.62 36h149v9h-149z" opacity=".2"/><path fill="url(#e)" d="M327.62 72h18v11h-18z"/><path fill="url(#f)" d="M327.62 87h18v11h-18z"/><path fill="url(#g)" d="M327.62 102h18v11h-18z"/><path fill="#ff5252" d="M328.62 73h16v9h-16z"/><path fill="#ff9800" d="M328.62 88h16v9h-16z"/><path fill="#69f0ae" d="M328.62 103h16v9h-16z"/><path fill="url(#h)" d="M327.62 117h18v11h-18z"/><path fill="#294ace" d="M328.62 118h16v9h-16z"/><path fill="url(#i)" d="M30.62 182h367v150h-367z"/><path fill="#294ace" opacity=".5" d="M33.62 185h359v142h-359z"/><path fill="#fff" opacity=".5" d="M44.62 196h348v-11h-359v142h11V196z"/><path transform="rotate(-5.2 -739.107 2013.604)" fill="url(#j)" d="M193.12 283.48h370v152h-370z"/><path fill="#fff" d="M38.811 209.538l357.523-32.537 12.87 141.416L51.68 350.954z"/><path d="M65.5 325.59l-6.2-78.77s32-34 96.6-8.8 95.06 7.41 105.56-9.61 65-36 82.66-7.53 38.84-3.54 38.84-3.54l7.16 78.67z" fill="#294ace" opacity=".5"/><path fill="none" stroke="#294ace" stroke-miterlimit="10" d="M98.03 229.66l.54 5.98"/><path fill="none" stroke="#294ace" stroke-miterlimit="10" stroke-dasharray="11.51 11.51" d="M99.62 247.1l5.74 63.06"/><path fill="none" stroke="#294ace" stroke-miterlimit="10" d="M105.88 315.89l.55 5.97m53.09-82.44l.55 5.97"/><path fill="none" stroke="#294ace" stroke-miterlimit="10" stroke-dasharray="13.06 13.06" d="M161.25 258.4l4.15 45.51"/><path fill="none" stroke="#294ace" stroke-miterlimit="10" d="M165.99 310.41l.54 5.98m55.73-66.29l.6 5.97"/><path fill="none" stroke="#294ace" stroke-miterlimit="10" stroke-dasharray="9.79 9.79" d="M223.83 265.82l3.38 34.1"/><path fill="none" stroke="#294ace" stroke-miterlimit="10" d="M227.7 304.79l.59 5.98m50.36-95.93l.54 5.98"/><path fill="none" stroke="#294ace" stroke-miterlimit="10" stroke-dasharray="11.28 11.28" d="M280.21 232.05l5.63 61.79"/><path fill="none" stroke="#294ace" stroke-miterlimit="10" d="M286.35 299.45l.55 5.98m32.45-98.84l.54 5.97"/><path fill="none" stroke="#294ace" stroke-miterlimit="10" stroke-dasharray="11.93 11.93" d="M320.97 224.44l5.95 65.33"/><path fill="none" stroke="#294ace" stroke-miterlimit="10" d="M327.46 295.71l.55 5.97"/><circle cx="252.36" cy="323.73" r="5" transform="rotate(-5.2 -864.923 1977.88)" fill="#ff9800"/><circle cx="313.56" cy="334.23" r="5" transform="rotate(-5.2 -803.722 1988.382)" fill="#ff5252"/><circle cx="376.76" cy="344.54" r="5" transform="rotate(-5.2 -740.524 1998.644)" fill="#69f0ae"/><circle cx="432.8" cy="309.31" r="7" transform="rotate(-5.2 -684.42 1963.457)" fill="url(#k)"/><circle cx="474.26" cy="301.52" r="7" transform="rotate(-5.2 -642.91 1955.633)" fill="url(#l)"/><circle cx="432.8" cy="309.31" r="5" transform="rotate(-5.2 -684.42 1963.457)" fill="#294ace"/><circle cx="474.26" cy="301.52" r="5" transform="rotate(-5.2 -642.91 1955.633)" fill="#294ace"/><circle cx="537.64" cy="313.82" r="5" transform="rotate(-5.2 -579.477 1968.002)" fill="#69f0ae"/><path d="M547.76 413.2l.07.23c.77-.43-.07-.23-.07-.23z" transform="translate(-154.5 -94.48)" fill="url(#m)" opacity=".2"/><path d="M539.48 581.18l16.28-2.63-2.24-10v-.14h-.06l-11.54-53v-38.65a14.26 14.26 0 0 0-.08-1.47c17.24-22.86 7-58.73 6-61.86-.18.09-.45.21-.83.36a21.06 21.06 0 0 0-.79-4.13s-5-3.18-7.73.91c-2.38 3.57-.61 5.75-.12 6.26l-.34.11a11.52 11.52 0 0 1 1.58 3.94 8.65 8.65 0 0 0-.54-1c-.63-.11-1-.21-1-.21l-.12-.11-.34.11c1.73 2.53 2.34 7 2.26 12.3a17.36 17.36 0 0 0-2-2.31 17.65 17.65 0 0 0-11.7-4.88h-.83q-.68 0-1.36.09h-.34l-.57.08-.65.12-.47.1-.81.22-.3.09c-.34.11-.67.22-1 .35a17.24 17.24 0 0 1-3.43 1.24c-.16 0-.32 0-.49.05a5.72 5.72 0 0 1-3.75-1.07l-.36-.28a5.29 5.29 0 0 1-.39-.37 2.54 2.54 0 0 0-.17 1.09 3.35 3.35 0 0 0 1.17 2.27 3.17 3.17 0 0 0 .62.42 2.68 2.68 0 0 0 1.06.3h.38-.09c-.23.11-.46.21-.7.3h-.05c-.26.09-.51.17-.78.24a8.68 8.68 0 0 1-4 .06l-.43-.1c-.21-.06-.43-.12-.63-.19a4.8 4.8 0 0 0 .22.44l.08.13.18.28.11.14.2.25.12.13.25.25.1.09.37.31.13.09.27.19.18.11.24.14.2.1.25.11.21.09.28.1.35.1.26.07h1.74a5 5 0 0 0 1.5-.37l-.92.38-.46.16-.47.17-.47.14-.48.14-.47.12-.5.12-.46.09-.53.09-.44.07-.57.07h-2.4a4.21 4.21 0 0 1 1.51.8 4 4 0 0 0 .93.5 3.59 3.59 0 0 0 .45.1H512a6.54 6.54 0 0 1 2.59.83 4.65 4.65 0 0 1 1.11 1c-.14.23-.28.45-.4.69s-.21.4-.31.61q-.3.62-.53 1.27a14.08 14.08 0 0 0-.86 4.85v1.16q0 .36.08.72v.19q.06.44.16.87v.17q.08.36.18.71l.06.21a14 14 0 0 0 .61 1.66l.07.16q.17.37.35.72v.07q.22.4.46.79v.06q.22.36.47.7l.06.08a14.17 14.17 0 0 0 1.17 1.41 14.14 14.14 0 0 0 3.77 2.83 6.3 6.3 0 0 0-.11.65 6.36 6.36 0 0 0 0 .68v5.28q-.45.24-.88.51c-12.53-5.69-31.19-46-31.19-46h-.45c1.82-1.36 0-7.28 0-7.28a8.54 8.54 0 0 0-3.5-1.16h-1.61l-.2.06h-.1l-.3.11-.28.13-.1.05-.19.11-.13.61-.18.12-.11.09-.17.14-.11.1-.17.16-.1.11-.17.2-.08.1-.25.34c-2.73 4.09 0 6.37 0 6.37a40.74 40.74 0 0 0-.25 4.75c-.2 29.46 31.33 52.29 32.94 53.43-.71 1.84-6.57 18.14.07 38.49a.65.65 0 0 0 .08.14 59.08 59.08 0 0 0-17.72 55.88l.13.61h.29a4 4 0 0 1-.11.4 4.59 4.59 0 0 1-.29.7 5.43 5.43 0 0 1-.73 1.07c-.31.36-.67.72-1.05 1.09l-.4.38c-1.59 1.52-3.2 3-2 3.6h17.21v-7.51h.3s-.12-.23-.3-.68V571h-.06c-.9-2.32-3-9.5.36-20.56 4.09-13.65 20-20.47 20-20.47l.29 1h-.06l12.48 41c0 .16 0 .32-.05.49a6.67 6.67 0 0 1-.27 1.14 7.25 7.25 0 0 1-.34.84c-.77 1.59-2.1 3.46-2.68 4.86a4.71 4.71 0 0 0-.21.59 1.82 1.82 0 0 0-.07.7.81.81 0 0 0 .53.67h.23l.48-.08zm-4.82-116.73q-.47-.26-1-.49V459a6.32 6.32 0 0 0-.11-1.13 14.11 14.11 0 0 0 3-1.93c-.6 3.06-1.27 5.99-1.88 8.51z" transform="translate(-154.5 -94.48)" fill="url(#n)" opacity=".2"/><path d="M325.88 328.61s-3-2.52 0-7.06 8.57-1 8.57-1 2 6.55 0 8.06-8.57 0-8.57 0z" fill="#ca7070"/><path data-name="&lt;Path&gt;" d="M357.04 497.27h-13.89a4.56 4.56 0 0 1-1.31 3.57c-1.87 2.16-5.63 4.77-3.86 5.66h19.06z" fill="#00695c"/><path d="M342.85 500.84a4.56 4.56 0 0 0 1.31-3.57h-1a4.56 4.56 0 0 1-1.31 3.57c-1.87 2.16-5.63 4.77-3.86 5.66h1c-1.77-.89 1.99-3.49 3.86-5.66z" fill="#fff" opacity=".2"/><path data-name="&lt;Path&gt;" d="M406.5 494.41l-13 2.11a6.62 6.62 0 0 1-.59 4.58c-1.42 3-4.61 6.74-2.69 7.55l18.82-3z" fill="#00695c"/><path d="M400.16 322.46s14.87 46.91-10.07 72.88l-7.2-5.51s14.74-51.2 6.49-63.22c14.56-4.85 10.78-4.15 10.78-4.15z" fill="#00695c"/><path d="M389.88 326.6s-3-2.52 0-7.06 8.57-1 8.57-1 2 6.55 0 8.06-8.57 0-8.57 0z" fill="#ca7070"/><path d="M393.91 501.11a6.62 6.62 0 0 0 .59-4.59l12-2v-.16l-13 2.16a6.62 6.62 0 0 1-.59 4.58c-1.42 3-4.61 6.74-2.69 7.55l.79-.13c-1.43-1 1.54-4.59 2.9-7.41z" fill="#fff" opacity=".2"/><rect x="370.48" y="366.16" width="14.11" height="20.91" rx="7.06" ry="7.06" fill="#ca7070"/><path d="M383.9 392.85s14.56-50.57 6.63-63c-.7-.13-1.15-.23-1.15-.23l-.13-.12-.37.12c8.25 12-6.49 63.22-6.49 63.22l7.2 5.51.63-.68z" fill="#fff" opacity=".2"/><circle cx="377.79" cy="357.85" r="15.62" fill="#ca7070"/><path d="M372.24 380.02v-6.8a7 7 0 0 1 .16-1.48 15.62 15.62 0 0 1 6.26-29.49h-.88a15.62 15.62 0 0 0-7.15 29.51 7 7 0 0 0-.16 1.48v6.8a7 7 0 0 0 7.94 7 7.08 7.08 0 0 1-6.17-7.02z" fill="#fff" opacity=".2"/><path d="M393.66 435.7s-30.13 3.4-31.24 0c-7.81-23.94 0-42.83 0-42.83a15.62 15.62 0 0 1 15.62-15.62 15.62 15.62 0 0 1 15.62 15.62z" fill="#00695c"/><path d="M393.66 435.7l13.61 62.49h-13.61l-14.11-46.36s-17.64 7.56-22.17 22.68 0 23.68 0 23.68h-14.62l-.15-.68a65 65 0 0 1 19.8-61.81" fill="#263238"/><path d="M364.18 435.7c-7.81-23.94 0-42.83 0-42.83a15.62 15.62 0 0 1 14.61-15.59h-1a15.62 15.62 0 0 0-15.62 15.62s-7.81 18.9 0 42.83c.4 1.22 4.52 1.56 9.64 1.51-4.16-.09-7.31-.49-7.63-1.54z" fill="#fff" opacity=".2"/><path d="M362.17 392.61s-40.31-28.22-36.28-64h9.07s21.66 46.91 35.54 51.41-8.33 12.59-8.33 12.59z" fill="#00695c"/><path d="M379.81 452.93l13.85 45.51h2l-14.11-46.36s-.65.28-1.74.85zm-15.38-16.98h-2a65 65 0 0 0-19.8 61.81l.15.68h2l-.15-.68a65 65 0 0 1 19.8-61.81zM327.4 329.12h-1.51c-4 35.78 36.28 64 36.28 64l1-.38c-4.67-3.45-39.54-30.22-35.77-63.62z" opacity=".2" fill="#fff"/><path d="M365.33 350.87a25.85 25.85 0 0 1 1.82 6.29c1 4.38 3.26 8.75 7.15 11a15.87 15.87 0 0 0 7 1.91c3.72.23 7.75-.49 10.38-3.13a12.86 12.86 0 0 0 3.17-6.39 21.63 21.63 0 0 0-5.69-19.88 19.19 19.19 0 0 0-20-4.19 19.1 19.1 0 0 1-3.79 1.38 6.31 6.31 0 0 1-5.53-1.84 3.49 3.49 0 0 0 3.37 4.52 9.73 9.73 0 0 1-7.46.4 6.33 6.33 0 0 0 8 3.19 21.32 21.32 0 0 1-9 1.84c.65 0 1.92 1.2 2.71 1.44a17.18 17.18 0 0 0 3 .21 5.82 5.82 0 0 1 4.87 3.25z" fill="#263238"/><path d="M363.25 340.52a9.63 9.63 0 0 1-3.7.95 9.7 9.7 0 0 0 4.71-.95 3.53 3.53 0 0 1-3.54-3.81 5.94 5.94 0 0 1-.84-.71 3.49 3.49 0 0 0 3.37 4.52zm3.16-2.65a19.1 19.1 0 0 0 3.79-1.38 17.38 17.38 0 0 1 6-1.21 17.56 17.56 0 0 0-7 1.21 19.1 19.1 0 0 1-3.79 1.38c-.18 0-.36 0-.54.06a6 6 0 0 0 1.54-.06zm-7.99 9.55c-.79-.23-2.06-1.42-2.71-1.44a21.32 21.32 0 0 0 9-1.84 5.58 5.58 0 0 1-2 .42 21.33 21.33 0 0 1-8 1.42c.65 0 1.92 1.2 2.71 1.44a6.71 6.71 0 0 0 2.1.17 4.38 4.38 0 0 1-1.1-.17zm23.91 22.66a15.87 15.87 0 0 1-7-1.91c-3.89-2.27-6.11-6.64-7.15-11a25.85 25.85 0 0 0-1.82-6.29 5.82 5.82 0 0 0-4.93-3.23 10.07 10.07 0 0 0-1.5 0h.49a5.82 5.82 0 0 1 4.93 3.23 25.85 25.85 0 0 1 1.82 6.29c1 4.38 3.26 8.75 7.15 11a15.87 15.87 0 0 0 7 1.91h1.75zm-20.25-25.56a6.38 6.38 0 0 1-5.12-3.27 9.32 9.32 0 0 1-1.17-.33 6.38 6.38 0 0 0 6.29 3.6zm-35.19-15.91s-3-2.52 0-7.06a4.83 4.83 0 0 1 3.74-2.29 4.9 4.9 0 0 0-4.74 2.29c-3 4.54 0 7.06 0 7.06a27.32 27.32 0 0 0 5.93.66 29.83 29.83 0 0 1-4.93-.66z" opacity=".2" fill="#fff"/><path d="M191.47 423.33l.08-.27s-1.02-.2-.08.27z" transform="translate(-154.5 -94.48)" fill="url(#o)" opacity=".2"/><path d="M285.7 440.09a6.59 6.59 0 0 0-.36-.93c0-.1-.1-.18-.15-.27a5.61 5.61 0 0 0-.3-.52l-.2-.26a5.06 5.06 0 0 0-.33-.39l-.23-.23c-.12-.11-.24-.21-.36-.3l-.25-.18-.4-.24-.25-.13-.45-.19-.23-.09q-.32-.11-.65-.18a10.33 10.33 0 0 0-4.39.12s-4.19 6.18-2.58 8.4l-.53-.16s-31.13 34.74-48.69 41.19q-.67-.46-1.39-.86v-6.5a7.67 7.67 0 0 0 0-.82 7.6 7.6 0 0 0-.13-.77l.13-.07.52-.29.75-.46.48-.31q.54-.37 1-.78l.39-.34c.24-.2.47-.41.69-.63l.4-.39q.42-.43.8-.88l.28-.34q.36-.45.69-.92l.28-.42q.3-.46.57-.94l.18-.31c.22-.41.43-.84.61-1.28l.16-.39q.21-.53.39-1.07c0-.13.09-.25.12-.38.14-.47.27-.94.37-1.43 0-.1 0-.19.05-.29q.12-.61.19-1.24v-.42c0-.51.08-1 .08-1.55a17 17 0 0 0-3.78-10.69c1.33-2.08 2.2-3.31 2.2-3.31-.8-.55-1.59-1.05-2.37-1.54l-.76-.45c-.52-.31-1-.62-1.56-.9l-.87-.46c-.47-.25-.93-.49-1.39-.71l-.89-.41-1.33-.58-.87-.35a42.3 42.3 0 0 0-1.31-.48l-.82-.28c-.45-.14-.9-.27-1.34-.39l-.73-.2c-.5-.12-1-.22-1.49-.32l-.53-.11c-.67-.12-1.33-.21-2-.27a23.71 23.71 0 0 0-12 1.84c.2-4.78 1-8.72 2.68-11.16l-.41-.14-.14.14s-.49.11-1.26.25a10.44 10.44 0 0 0-.65 1.21 13.91 13.91 0 0 1 1.91-4.76l-.41-.14c.59-.61 2.73-3.24-.14-7.55-3.3-4.94-9.34-1.1-9.34-1.1a25.56 25.56 0 0 0-.94 5c-.46-.19-.79-.33-1-.44a124.5 124.5 0 0 0-4.69 31.36c-10.89 15.46-15.39 38.28-16.27 43.2l-.07.39c-.06.36-.09.55-.09.55l28.31.66v45.12L178 588.22s7.84.25 19.64 1.76l-3.26 23.31-1.09 6.54h19.62c2.18-4.36-8.72-6.54-8.72-6.54h-.24l4.25-21.75q2.82.47 5.8 1a56.81 56.81 0 0 0 8.83 1 46.94 46.94 0 0 0 7.35-.32c1.44 11.79-.45 18.83-.81 20h-.11l-1.09 6.54h19.62c1.9-3.8-6.14-5.95-8.23-6.43l.09-.64a109.41 109.41 0 0 0 .77-22.2 26.87 26.87 0 0 0 7-4.17l.27-.24.08-.08-14.61-41c2.73-11.6-6.77-23.78-1.7-29.87s2-13.86 1.4-15.19c13.72-6 41.45-21 49.23-47a49.17 49.17 0 0 0 1.39-5.57s3.92-1.59 2.22-7.28z" transform="translate(-154.5 -94.48)" fill="url(#p)" opacity=".2"/><path d="M40.08 336.46s-14.87 46.91 10.07 72.88l7.2-5.51s-14.74-51.2-6.49-63.22c-14.56-4.85-10.78-4.15-10.78-4.15z" fill="#ff5252"/><path d="M50.36 340.6s3-2.52 0-7.06-8.57-1-8.57-1-2 6.55 0 8.06 8.57 0 8.57 0z" fill="#f6b9ad"/><rect x="210.15" y="474.64" width="14.11" height="20.91" rx="7.06" ry="7.06" transform="rotate(180 139.955 437.855)" fill="#f6b9ad"/><path d="M56.34 406.85s-14.56-50.57-6.63-63c.7-.13 1.15-.23 1.15-.23l.13-.12.37.12c-8.25 12 6.49 63.22 6.49 63.22l-7.2 5.51-.63-.68z" fill="#fff" opacity=".2"/><circle cx="62.45" cy="371.85" r="15.62" fill="#f6b9ad"/><path d="M68 394.02v-6.8a7 7 0 0 0-.16-1.48 15.62 15.62 0 0 0-6.26-29.49h.88a15.62 15.62 0 0 1 7.15 29.51 7 7 0 0 1 .16 1.48v6.8a7 7 0 0 1-7.94 7 7.08 7.08 0 0 0 6.17-7.02z" fill="#fff" opacity=".2"/><path d="M46.58 449.7s30.13 3.4 31.24 0c3.6-11-6-22.89-1.2-28.7 5-6 1.2-14.13 1.2-14.13a15.62 15.62 0 0 0-15.62-15.62 15.62 15.62 0 0 0-15.62 15.62z" fill="#ff5252"/><path d="M76.66 421c5-6 1.2-14.13 1.2-14.13a15.62 15.62 0 0 0-15.62-15.62c-.34 0-.67 0-1 .05a15.61 15.61 0 0 1 14.62 15.57s3.8 8.13-1.2 14.13c-4.84 5.81 4.8 17.69 1.2 28.7-.34 1.05-3.45 1.45-7.58 1.51 5.09.05 9.19-.29 9.58-1.51 3.64-11.02-6.04-22.89-1.2-28.7z" fill="#fff" opacity=".2"/><path d="M71.43 448.7c11 15.59 15.87 39.15 12.72 61.81l-.09.68h-9.39s2.91-8.57 0-23.68a37.39 37.39 0 0 0-14.24-22.68l-9.06 46.36h-8.74l8.74-62.49zm52.96-89.87s3.63-1.52 2.07-6.75-7.9-3.47-7.9-3.47-3.85 5.67-2.36 7.71 8.19 2.51 8.19 2.51z" fill="#f6b9ad"/><path d="M70.94 409.39s46.81-15.17 53.44-50.56l-8.67-2.66s-34.45 38.46-49 38.73 4.23 14.49 4.23 14.49z" fill="#ff5252"/><path d="M122.79 358.87l1.45.44c-6.63 35.39-53.44 50.56-53.44 50.56l-.83-.65c5.53-1.92 46.64-17.34 52.82-50.35zM58.42 464.83l-9.06 46.36h2l8.8-45a21.63 21.63 0 0 0-1.74-1.36zm13.01-16.13h-2c11 15.59 15.87 39.15 12.72 61.81l-.09.68h2l.09-.68c3.15-22.66-1.7-46.22-12.72-61.81zm51.99-90.18s3.63-1.52 2.07-6.75a4.83 4.83 0 0 0-2.9-3.29 4.9 4.9 0 0 1 3.86 3.58c1.56 5.22-2.07 6.75-2.07 6.75a27.32 27.32 0 0 1-5.86-1.1 29.83 29.83 0 0 0 4.9.81z" fill="#fff" opacity=".2"/><path d="M46.58 448l-19 40a235 235 0 0 1 33 4c21 4 31-6 31-6l-13.55-38z" fill="#263238"/><path d="M51.62 511s10 2 8 6h-18l1-6zm32 0s10 2 8 6h-18l1-6z" fill="#ff5252"/><path d="M76.62 359s-24 34-13 48l-43-1s12-77 56-47z" fill="#fccc63"/><path d="M76.62 359c-6.2-4.23-11.76-6.33-16.75-6.82A42.33 42.33 0 0 1 71.62 358s-24 34-13 48l-37.85-.88c-.1.57-.15.88-.15.88l43 1c-11-14 13-48 13-48zm1.46 89h-3l13.55 38s-6.46 6.45-19.9 6.91c15.47.5 22.9-6.91 22.9-6.91zm-26.46 63h-2s10 2 8 6h2c2-4-8-6-8-6zm32 0h-2s10 2 8 6h2c2-4-8-6-8-6z" fill="#fff" opacity=".2"/><path fill="#f5f5f5" d="M500.62 167.68h383v14.5h-383z"/><path fill="url(#q)" d="M493 163.05h398v496H493z"/><path fill="#fff" d="M500.62 182.18h383v459.5h-383z"/><circle cx="509.5" cy="175.18" r="3.5" fill="#ff5252"/><circle cx="519.12" cy="175.18" r="3.5" fill="#ff0"/><circle cx="528.75" cy="175.18" r="3.5" fill="#69f0ae"/><path fill="#294ace" d="M524.62 202.68h336v9h-336z" opacity=".2"/><path fill="url(#r)" d="M522.62 241.68h145v154h-145z"/><path fill="#fff" d="M525.62 246.68h139v144h-139z"/><path fill="url(#s)" d="M715.62 318.68h145v154h-145z"/><path fill="#fff" d="M718.62 323.68h139v144h-139z"/><path fill="url(#t)" d="M525.62 508.68h341v106h-341z"/><path fill="#294ace" opacity=".5" d="M532.62 515.68h328v95h-328z"/><path fill="#fff" opacity=".5" d="M540.62 524.68h320v-9h-328v95h8v-86z"/><path d="M796.09 372.71a62 62 0 1 0 15 40.45 61.84 61.84 0 0 0-15-40.45zm-25 77.47a43 43 0 1 1 21.08-37 42.81 42.81 0 0 1-21.05 37z" transform="translate(-154.5 -94.48)" fill="url(#u)"/><path d="M625.67 291.94l13.65-11.75a58.85 58.85 0 0 0-44.7-20.51v18a40.91 40.91 0 0 1 31.05 14.26z" fill="#ff5252"/><path d="M594.62 359.67A40.74 40.74 0 0 1 577.7 356l-7.43 16.41a59 59 0 0 0 54.49-3l-9.2-15.49a40.74 40.74 0 0 1-20.94 5.75z" fill="#69f0ae"/><path d="M653.62 318.67a58.75 58.75 0 0 0-14.3-38.49l-13.65 11.75a40.93 40.93 0 0 1-10.11 62l9.2 15.49a59 59 0 0 0 28.86-50.75z" fill="#ff9800"/><path d="M553.62 318.67a41 41 0 0 1 41-41v-18a59 59 0 0 0-24.35 112.74L577.7 356a41 41 0 0 1-24.08-37.33z" fill="#294ace"/><path fill="url(#v)" d="M737.62 344.68h106v18h-106z"/><path fill="#294ace" d="M738.62 345.68h104v16h-104z"/><path fill="#ff5252" d="M738.62 372.68h76v16h-76z"/><path fill="#69f0ae" d="M738.62 399.68h52v16h-52z"/><path fill="#ff9800" d="M738.62 426.68h94v16h-94z"/><path fill="#f5f5f5" d="M525.62 419.68h149v9h-149zm0 15h84v9h-84zm99 0h29v9h-29zm0 33h29v9h-29zm-99-3h84v9h-84zm0-15h149v9h-149zm188-207h149v9h-149zm0 15h84v9h-84zm99 0h29v9h-29zm0 33h29v9h-29zm-99-3h84v9h-84zm0-15h149v9h-149z"/><circle cx="760.62" cy="688.68" r="11" fill="url(#w)"/><circle cx="760.62" cy="688.68" r="8" fill="#ff5252"/><path fill="url(#x)" d="M435.62 566.68h344v121h-344z"/><path fill="#fff" d="M445.62 571.68h328v95h-328z"/><path stroke="#294ace" stroke-miterlimit="10" stroke-width="3" fill="url(#y)" d="M456.62 648.68h304"/><path fill="url(#z)" d="M459.62 590.68h45v55h-45z"/><path fill="#294ace" d="M462.12 593.18h40v51h-40z"/><path fill="#69f0ae" d="M712.62 629.68h40v16h-40z"/><path fill="#ff9800" d="M637.62 608.68h40v36h-40z"/><path fill="#ff5252" d="M549.62 614.68h40v30h-40zm-104 52h328v14h-328z"/><circle cx="459.62" cy="688.68" r="11" fill="url(#A)"/><circle cx="459.62" cy="688.68" r="8" fill="#ff5252"/><path fill="#ff5252" d="M437.62 575.68h8v105h-8z"/><path opacity=".2" d="M437.62 575.68h8v105h-8z"/><path d="M600.65 681.32v-.81c0-.16 0-.21-.06-.31s-.07-.3-.12-.44-.06-.19-.1-.29-.12-.28-.18-.42l-.12-.25c-.08-.14-.17-.28-.26-.41l-.13-.19a6.62 6.62 0 0 0-.42-.52 9.62 9.62 0 0 0-2.79-2.06 8.05 8.05 0 0 0 1.79-3.08 6.42 6.42 0 0 0 .24-.94v-.29a5.46 5.46 0 0 0 .05-.58v-.81c0-.16 0-.21-.06-.31s-.07-.3-.12-.44-.06-.19-.1-.29-.12-.28-.18-.42l-.12-.25c-.08-.14-.17-.28-.26-.41l-.13-.19a6.62 6.62 0 0 0-.42-.52 10.07 10.07 0 0 0-3.55-2.4s-6.35 2.35-6.77 4.93c-4.66 1-31.82 6.65-50.47 6.2l-.14-.37a16.59 16.59 0 0 0-8.83-14.67v-6.28a7.48 7.48 0 0 0 0-.8 7.41 7.41 0 0 0-.12-.76l.12-.07.51-.28.74-.45.47-.31q.52-.36 1-.76l.38-.33c.23-.2.45-.4.67-.61l.39-.38q.41-.42.78-.86l.27-.34q.35-.44.67-.9l.27-.41q.29-.45.56-.92l.17-.3c.22-.4.42-.82.6-1.24l.15-.38q.21-.51.38-1l.12-.37c.14-.46.26-.92.36-1.39 0-.09 0-.19.05-.28q.11-.6.18-1.21v-.41c0-.5.08-1 .08-1.51a16.51 16.51 0 0 0-2.13-8.11c1.07-.26 1.72-.47 1.64-.57-.41-.55-.82-1.07-1.25-1.57l-.41-.47c-.3-.34-.59-.66-.89-1l-.48-.49c-.3-.3-.6-.58-.9-.85l-.47-.42c-.38-.32-.76-.63-1.14-.93l-.25-.2c-.46-.34-.92-.66-1.39-1l-.52-.32c-.3-.19-.61-.37-.92-.53l-.62-.32-.86-.41-.63-.28c-.3-.13-.61-.24-.92-.35l-.57-.21c-.46-.15-.92-.29-1.38-.41l-.71-.16-.77-.16-.77-.12-.71-.08-.79-.07h-1.47q-.65 0-1.3.06c-10.23.84-19.19 9.77-19.19 24V655h16v5.34a16.59 16.59 0 0 0-9.64 15.05v45.51l-13.58 62.39H489l-2.67 11.91 19.16 3.1.83.13c2-.86-1.35-4.89-2.86-8a8.54 8.54 0 0 1-.4-1 7.57 7.57 0 0 1-.38-1.94l14.72-48.29h-.07l.35-1.13s18.74 8 23.56 24.09c3.91 13 1.48 21.46.42 24.2h-.07v.16c-.21.52-.36.81-.36.81h.36v8.83h20.26c1.88-.95-2.11-3.72-4.1-6a5.67 5.67 0 0 1-1.32-2.55h.34l.16-.72a69.53 69.53 0 0 0-20.86-65.77.77.77 0 0 0 .09-.17 74.45 74.45 0 0 0 3.51-18.06c15.49 1.48 36.1.42 51.51-11.52a48 48 0 0 0 4.21-3.58c1.33-.1 3.66-.84 4.95-4.6a6.42 6.42 0 0 0 .24-.94v-.29a5.46 5.46 0 0 0 .07-.64z" transform="translate(-154.5 -94.48)" fill="url(#B)"/><path d="M364.99 604.46s46.9 14.91 72.88-10l-5.51-7.21s-50.4 11.23-62.41 3-4.96 14.21-4.96 14.21z" fill="#294ace"/><path d="M436.55 593.52l.92 1.2c-26 24.92-72.88 10-72.88 10s-.12-.38-.3-1c5.59 1.67 48.02 13.08 72.26-10.2z" fill="#fff" opacity=".2"/><path d="M436.87 594.45s3.84.87 5.61-4.28-4.4-7.42-4.4-7.42-6.43 2.37-6.41 4.89 5.2 6.81 5.2 6.81z" fill="#985454"/><path d="M436.26 593.64s3.84.87 5.61-4.28a4.83 4.83 0 0 0-.45-4.36 4.9 4.9 0 0 1 1.06 5.16c-1.77 5.16-5.61 4.28-5.61 4.28a27.32 27.32 0 0 1-4.12-4.31 29.83 29.83 0 0 0 3.51 3.51z" fill="#fff" opacity=".2"/><path data-name="&lt;Path&gt;" d="M387.2 687.27h13.89a4.56 4.56 0 0 0 1.31 3.57c1.87 2.16 5.63 4.77 3.86 5.66H387.2z" fill="#294ace"/><path d="M401.39 690.84a4.56 4.56 0 0 1-1.31-3.57h1a4.56 4.56 0 0 0 1.31 3.57c1.87 2.16 5.63 4.77 3.86 5.66h-1c1.77-.89-1.99-3.49-3.86-5.66z" fill="#fff" opacity=".2"/><path data-name="&lt;Path&gt;" d="M337.73 684.41l13 2.13a6.62 6.62 0 0 0 .59 4.58c1.42 3 4.61 6.74 2.69 7.55l-18.82-3z" fill="#294ace"/><path d="M350.33 691.11a6.62 6.62 0 0 1-.59-4.58l-12.05-2v-.16l13 2.13a6.62 6.62 0 0 0 .59 4.58c1.42 3 4.61 6.74 2.69 7.55l-.79-.13c1.48-.98-1.49-4.57-2.85-7.39z" fill="#fff" opacity=".2"/><rect x="514.15" y="650.64" width="14.11" height="20.91" rx="7.06" ry="7.06" transform="rotate(180 443.955 613.855)" fill="#985454"/><circle cx="366.45" cy="547.85" r="15.62" fill="#985454"/><path d="M372 570.02v-6.8a7 7 0 0 0-.16-1.48 15.62 15.62 0 0 0-6.26-29.49h.88a15.62 15.62 0 0 1 7.15 29.51 7 7 0 0 1 .16 1.48v6.8a7 7 0 0 1-7.94 7 7.08 7.08 0 0 0 6.17-7.02z" fill="#fff" opacity=".2"/><path d="M350.58 625.7s30.13 3.4 31.24 0c7.81-23.94 0-42.83 0-42.83a15.62 15.62 0 0 0-15.62-15.62 15.62 15.62 0 0 0-15.62 15.62z" fill="#294ace"/><path d="M350.58 625.7l-13.61 62.49h13.61l14.11-46.36s17.64 7.56 22.17 22.68 0 23.68 0 23.68h14.64l.15-.68a65 65 0 0 0-19.8-61.81" fill="#263238"/><path d="M380.06 625.7c7.81-23.94 0-42.83 0-42.83a15.62 15.62 0 0 0-14.61-15.59h1a15.62 15.62 0 0 1 15.62 15.62s7.81 18.9 0 42.83c-.4 1.22-4.52 1.56-9.64 1.51 4.16-.09 7.29-.49 7.63-1.54z" fill="#fff" opacity=".2"/><path d="M364.43 642.93l-13.85 45.51h-2l14.11-46.36s.65.28 1.74.85zm15.38-16.98h2a65 65 0 0 1 19.8 61.81l-.15.68h-2l.15-.68a65 65 0 0 0-19.8-61.81z" opacity=".2" fill="#fff"/><path d="M362.99 594.46s46.9 14.91 72.88-10l-5.51-7.21s-50.4 11.23-62.41 3-4.96 14.21-4.96 14.21z" fill="#294ace"/><path d="M434.55 583.52l.92 1.2c-26 24.92-72.88 10-72.88 10s-.12-.38-.3-1c5.59 1.67 48.02 13.08 72.26-10.2z" fill="#fff" opacity=".2"/><path d="M434.87 584.45s3.84.87 5.61-4.28-4.4-7.42-4.4-7.42-6.43 2.37-6.41 4.89 5.2 6.81 5.2 6.81z" fill="#985454"/><path d="M434.26 583.64s3.84.87 5.61-4.28a4.83 4.83 0 0 0-.45-4.36 4.9 4.9 0 0 1 1.06 5.16c-1.77 5.16-5.61 4.28-5.61 4.28a27.32 27.32 0 0 1-4.12-4.31 29.83 29.83 0 0 0 3.51 3.51z" fill="#fff" opacity=".2"/><path d="M367.62 542.67l-1 21h-22v-11.15c0-22.39 23.67-30.89 37-12.9.33.49-14 3.05-14 3.05z" fill="#263238"/><path d="M362.68 530.01c5.61.46 11.38 3.52 15.94 9.67.33.44-14 3-14 3l-1 21h3l1-21s14.33-2.56 14-3c-5.37-7.26-12.43-10.16-18.94-9.67z" fill="#fff" opacity=".2"/></svg> \ No newline at end of file
diff --git a/admin/survey/modules/mod_WPN/frontend/img/facebook.svg b/admin/survey/modules/mod_WPN/frontend/img/facebook.svg
new file mode 100644
index 0000000..d3af18c
--- /dev/null
+++ b/admin/survey/modules/mod_WPN/frontend/img/facebook.svg
@@ -0,0 +1 @@
+<svg width="18" height="18" xmlns="http://www.w3.org/2000/svg"><path d="M16 0H2C.9 0 0 .9 0 2v14c0 1.101.9 2 2 2h7v-7H7V8.525h2v-2.05c0-2.164 1.212-3.684 3.766-3.684l1.803.002v2.605h-1.197c-.994 0-1.372.746-1.372 1.438v1.69h2.568L14 11h-2v7h4c1.1 0 2-.899 2-2V2c0-1.1-.9-2-2-2z" fill="#262B3A"/></svg> \ No newline at end of file
diff --git a/admin/survey/modules/mod_WPN/frontend/img/googleplay.png b/admin/survey/modules/mod_WPN/frontend/img/googleplay.png
new file mode 100644
index 0000000..7714f8a
--- /dev/null
+++ b/admin/survey/modules/mod_WPN/frontend/img/googleplay.png
Binary files differ
diff --git a/admin/survey/modules/mod_WPN/frontend/img/ios.png b/admin/survey/modules/mod_WPN/frontend/img/ios.png
new file mode 100644
index 0000000..ddc393a
--- /dev/null
+++ b/admin/survey/modules/mod_WPN/frontend/img/ios.png
Binary files differ
diff --git a/admin/survey/modules/mod_WPN/frontend/img/mail.svg b/admin/survey/modules/mod_WPN/frontend/img/mail.svg
new file mode 100644
index 0000000..e05b85c
--- /dev/null
+++ b/admin/survey/modules/mod_WPN/frontend/img/mail.svg
@@ -0,0 +1 @@
+<svg data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="733.51" height="728.97"><defs><linearGradient id="a" x1="383.47" y1="728.97" x2="383.47" y2="400.92" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="gray" stop-opacity=".25"/><stop offset=".54" stop-color="gray" stop-opacity=".12"/><stop offset="1" stop-color="gray" stop-opacity=".1"/></linearGradient><linearGradient id="b" x1="238.26" y1="361.82" x2="838.21" y2="361.82" xlink:href="#a"/><linearGradient id="c" x1="465.73" y1="249.13" x2="465.73" y2="125.75" xlink:href="#a"/><linearGradient id="d" x1="264.33" y1="382.43" x2="264.33" y2="305.75" gradientTransform="matrix(0 -1 -1 0 760.81 597.66)" xlink:href="#a"/><linearGradient id="e" x1="212.21" y1="392.96" x2="212.21" y2="316.28" gradientTransform="matrix(0 -1 -1 0 821.81 562.29)" xlink:href="#a"/><linearGradient id="f" x1="295.6" y1="440.27" x2="295.6" y2="336.33" gradientTransform="matrix(0 -1 -1 0 768.63 669.04)" xlink:href="#a"/><linearGradient id="g" x1="224.95" y1="454.54" x2="224.95" y2="350.6" gradientTransform="matrix(0 -1 -1 0 851.31 621.1)" xlink:href="#a"/><linearGradient id="h" x1="627.39" y1="372.38" x2="627.39" y2="313.03" gradientTransform="matrix(-.65 .76 .76 .65 837.43 -649.66)" xlink:href="#a"/><linearGradient id="i" x1="303.02" y1="618.34" x2="303.02" y2="531.38" gradientTransform="rotate(32.36 1049.232 -85.334)" xlink:href="#a"/></defs><path fill="url(#a)" d="M346.26 400.92h74.42v328.05h-74.42z"/><path fill="#eceff1" d="M353.11 400.92h62.67V723.1h-62.67z"/><path d="M779.59 228.64H444.43a88.94 88.94 0 0 0-33.43 7.45c-34.07 15.1-53.9 38.8-59.5 91.36v121.43l-88.81-.94c-17.86 0-24.39 28.08-24.39 47.06h599.91V290.93c0-34.4-26.21-62.29-58.62-62.29z" transform="translate(-185.78 -83.31)" fill="url(#b)"/><path d="M270.85 158.06h332.08a40.68 40.68 0 0 1 40.68 40.68v202.18H270.85V158.06z" fill="#294ace"/><path d="M263 158.06a90.09 90.09 0 0 1 90.09 90.09v108.68A44.09 44.09 0 0 1 309 400.92h-92a44.09 44.09 0 0 1-44.09-44.09V248.15A90.09 90.09 0 0 1 263 158.06z" fill="#294ace"/><path d="M263 158.06a90.09 90.09 0 0 1 90.09 90.09v108.68A44.09 44.09 0 0 1 309 400.92h-92a44.09 44.09 0 0 1-44.09-44.09V248.15A90.09 90.09 0 0 1 263 158.06z" opacity=".2"/><path fill="url(#c)" d="M502.94 125.75h-74.42v123.38h33.78v-68.07h40.64v-55.31z"/><path fill="#ffcc80" d="M497.06 125.75h-62.67v113.59h23.5v-62.67h39.17v-50.92z"/><path transform="rotate(-83.06 276.792 396.563)" fill="url(#d)" d="M378.38 270.95h76.68v124.77h-76.68z"/><path fill="#faf8e4" d="M166.283 277.535l8.647-71.035 119.656 14.565-8.646 71.035z"/><path d="M193.296 225.682l-15.228-1.854 1.371-11.267 15.228 1.854zm53.051 28.696l-58.458-7.115.445-3.653 58.458 7.115zm-.96 7.92l-42.626-5.188.296-2.433 42.626 5.189z" opacity=".6" fill="#294ace"/><path transform="rotate(-83.06 327.256 413.312)" fill="url(#e)" d="M428.85 287.7h76.68v124.77h-76.68z"/><path fill="#faf8e4" d="M216.749 294.29l8.646-71.037 119.657 14.565-8.647 71.036z"/><path d="M243.77 242.437l-15.228-1.853 1.371-11.267 15.228 1.853zm53.051 28.697l-58.459-7.116.445-3.653 58.459 7.116zm-.981 7.918l-42.625-5.188.296-2.432 42.625 5.188z" opacity=".6" fill="#294ace"/><path transform="rotate(-83.06 240.401 436.673)" fill="url(#f)" d="M328.36 288.88H432.3V458H328.36z"/><path fill="#fff" d="M106.914 327.421l11.721-96.299 162.193 19.742-11.722 96.3z"/><path d="M143.527 257.131l-20.637-2.512 1.858-15.267 20.638 2.512zm71.903 38.909l-79.244-9.646.603-4.953 79.245 9.646zm-1.296 10.728l-57.784-7.033.402-3.306 57.784 7.034z" opacity=".6" fill="#294ace"/><path transform="rotate(-83.06 308.803 459.376)" fill="url(#g)" d="M396.77 311.59h103.94v169.12H396.77z"/><path fill="#fff" d="M175.312 350.135l11.722-96.299 162.193 19.742-11.722 96.3z"/><path d="M211.933 279.841l-20.638-2.512 1.858-15.267 20.638 2.512zm71.903 38.909l-79.245-9.645.603-4.954 79.245 9.646zm-1.298 10.729l-57.784-7.034.402-3.305 57.784 7.033z" opacity=".6" fill="#294ace"/><path d="M262.04 159.04a89.8 89.8 0 0 0-34.35 6.8 90.77 90.77 0 0 1 12.81-.92 90.09 90.09 0 0 1 90.09 90.09v143h21.54V249.13a90.09 90.09 0 0 0-90.09-90.09z" opacity=".2"/><path d="M94.59 369.58h258.52v31.34H63.25a31.34 31.34 0 0 1 31.34-31.34z" fill="#294ace"/><path d="M94.59 369.58h258.52v31.34H63.25a31.34 31.34 0 0 1 31.34-31.34z" fill="#fff" opacity=".2"/><path fill="url(#h)" d="M657.37 70.58l-2.97 1.45.34-.61-.26.08.37-.27L694.87 0l20.46 17.45 17.56 16.25-5.04 2.46 5.66 9.99-76.14 24.43z"/><path fill="#294ace" d="M713.31 19.31l16.04 14.88-72.72 36.15 38.7-49.6 17.98-1.43z"/><path opacity=".2" d="M713.31 19.31l16.04 14.88-72.72 36.15 38.7-49.6 17.98-1.43z"/><path fill="#294ace" d="M694.59 3.35l-37.96 66.99 56.68-51.03-18.72-15.96z"/><path fill="#294ace" d="M729.82 45.7l-73.11 24.15 61.11-45.62 12 21.47z"/><path fill="url(#i)" d="M121.67 86.97l4.78.74-.74-.7h.41l-.64-.22L38.62 4.42 17.54 37.69 0 68.04l8.12 1.26-3.6 16.44 117.15 1.23z"/><path fill="#294ace" d="M21.18 39.42L5.16 67.19 122.6 86.31 46.96 33.64l-25.78 5.78z"/><path opacity=".2" d="M21.18 39.42L5.16 67.19 122.6 86.31 46.96 33.64l-25.78 5.78z"/><path fill="#294ace" d="M40.47 8.99l82.13 77.32L21.18 39.42 40.47 8.99z"/><path fill="#294ace" d="M9.49 83.51l112.79 2.16-105.29-37.4-7.5 35.24z"/></svg> \ No newline at end of file
diff --git a/admin/survey/modules/mod_WPN/frontend/img/mentioned.svg b/admin/survey/modules/mod_WPN/frontend/img/mentioned.svg
new file mode 100644
index 0000000..078c89f
--- /dev/null
+++ b/admin/survey/modules/mod_WPN/frontend/img/mentioned.svg
@@ -0,0 +1 @@
+<svg width="1460" height="76" xmlns="http://www.w3.org/2000/svg"><path d="M38.77 13.673c0-5.52-5.25-7.27-9.693-7.135v.539c2.692.27 4.711 1.346 4.711 3.096 0 1.212-.942 2.827-3.5 2.827-2.153 0-5.519-1.212-8.884-2.288-3.635-1.212-7-2.424-9.827-2.424-5.52 0-9.827 4.174-9.827 9.289 0 4.173 3.23 5.52 4.442 6.058l.135-.27c-.808-.538-1.346-1.211-1.346-2.961 0-1.48 1.077-3.5 3.904-3.5 2.557 0 5.923 1.211 10.5 2.423 3.903 1.077 8.077 2.154 10.365 2.423v9.02l-4.308 3.634 4.308 3.77v12.384c-2.288 1.346-4.846 1.75-7.135 1.75-4.173 0-7.942-1.212-11.038-4.577l11.711-5.654V22.288L9.02 28.75c1.481-3.77 4.308-6.596 7.404-8.48l-.135-.27C7.808 22.288 0 30.096 0 39.788c0 11.577 9.288 20.058 19.923 20.058 11.577 0 18.308-9.02 18.173-18.577h-.27c-1.75 3.635-4.441 7.135-7.672 9.02V38.172l4.577-3.635-4.577-3.634v-9.02c4.308-.134 8.615-2.96 8.615-8.21zm-24.097 31.77l-3.365 1.75c-2.02-2.693-3.366-6.328-3.366-11.174 0-2.019.27-4.711.943-6.596l5.923-2.692-.135 18.711zm53.712-15.885l-2.289 1.75-6.73-6.058-7.943 6.058V7.885l-10.77 7.403c1.212.404 2.693 1.077 2.693 3.904V51.77l-3.634 2.827.403.404L42 53.654l6.327 5.788 8.615-5.654-.404-.538-2.153 1.48-2.962-2.96V32.114l2.02-1.48 4.71 4.038V51.77c0 10.77-2.422 13.058-7.268 14.808v.27c8.077.403 15.346-2.424 15.346-16.29V31.982l2.423-2.02-.27-.403zm14.403 29.75l12.385-9.962-.404-.538-6.461 5.115-7.539-5.788V44.5l12.923-9.154-6.461-10.096-14.404 7.942v18.712L70 54.058l.404.404 2.692-2.154 9.692 7zM80.77 43.692V29.558l6.193 9.827-6.193 4.307zm65.827-32.711c0-.943-.27-1.616-.538-2.693h-.27c-.942 2.424-1.884 3.635-4.576 3.635-2.424 0-4.308-1.48-5.385-2.558 0 .135-8.212 9.423-8.212 9.423l.404.404 2.289-2.692c1.75 1.346 3.365 2.962 7.269 2.962v23.826L121.02 14.346c-1.346-2.154-3.5-5.384-7.404-5.384-4.442 0-7.942 3.903-7.403 10.365h.269c.404-1.615 1.346-3.635 3.23-3.635 1.616 0 2.827 1.481 3.635 2.827v9.289c-5.115 0-8.077 2.423-8.077 6.461 0 1.75 1.212 5.385 4.712 5.923v-.269c-.539-.538-.943-.942-.943-1.885 0-1.615 1.212-2.423 3.231-2.423.404 0 .808.135 1.077.135v12.115c-6.058.135-10.77 3.366-10.77 9.154 0 5.385 4.712 7.943 9.559 7.673v-.269c-3.097-.404-4.577-1.885-4.577-4.173 0-2.423 1.75-3.77 4.038-3.77 2.289 0 3.904 1.482 5.385 3.097l8.211-9.154-.404-.404-2.153 2.423c-3.097-2.827-5.116-4.038-8.75-4.577V19.327l23.019 40.115h1.211v-39.98c4.577-.27 8.481-3.5 8.481-8.481zm7.808 48.327l12.384-9.962-.403-.538-6.462 5.115L152.385 48v-3.635l12.923-9.153-6.462-10.097-14.404 7.943v18.711l-2.827 2.154.404.404 2.693-2.154 9.692 7.135zm-1.885-15.616V29.558l6.193 9.827-6.193 4.307zm58.423-15.211l-1.884 1.48-5.385-4.576-6.327 5.653 2.558 2.424V54.73l-6.462-4.443v-17.23l2.289-1.616-6.596-6.192-6.193 5.654 2.558 2.423v20.596l-.404.27-6.058-4.443V32.923c0-3.904-2.019-5.115-4.442-6.596-2.154-1.346-3.23-2.558-3.23-4.442 0-2.154 1.884-3.097 2.557-3.366-2.154-.134-8.211 2.154-8.346 7.673-.135 2.827 1.346 4.039 2.692 5.385 1.481 1.346 2.827 2.692 2.827 4.98v16.558l-2.961 2.289.403.404 2.827-2.154 7.27 5.923 7-4.846 7.673 4.846 14.942-8.885v-19.25l3.365-2.557-.673-.404zm50.077-16.154l-2.827 2.558-6.327-5.52-8.615 7V9.904h-.538v46.711c-.943-.134-2.962-.673-5.116-1.077V16.5c0-2.827-2.02-6.73-7.134-6.73-5.25 0-8.347 4.307-8.347 8.076h.27c.269-1.75 1.48-3.23 3.096-3.23 1.75 0 3.23 1.076 3.23 4.846v11.173c-4.846.269-7.807 3.23-7.807 6.461 0 1.885 1.211 5.25 4.846 5.385v-.27c-1.212-.538-1.48-1.211-1.48-1.884 0-1.615 1.615-2.154 3.768-2.154h.539v17.904c-4.173 1.48-6.058 4.173-6.058 7.673 0 4.712 3.77 8.48 9.423 8.48 3.904 0 6.731-.672 10.366-1.48 2.961-.673 6.057-1.346 7.807-1.346 2.154 0 3.097.942 3.097 2.558 0 2.019-.808 2.961-1.885 3.365v.27c4.711-.943 7.404-3.635 7.404-7.809 0-4.307-4.173-7-8.75-7-2.423 0-6.731.808-10.231 1.616-3.904.942-7.404 1.346-8.615 1.346-2.02 0-4.443-.942-4.443-3.5 0-2.423 2.02-4.308 6.866-4.308 2.692 0 5.25.404 8.48 1.212 3.5.808 5.789 1.75 8.885 1.75 4.173 0 7.539-1.48 7.539-7.539V15.558l3.096-2.827-.539-.404zm-11.711 18.711c-.808.808-1.616 1.481-3.096 1.481-1.616 0-2.424-.807-3.097-1.48v-14l2.02-1.616 4.173 3.5v12.115zm0 6.731c-.673-.673-1.616-1.346-3.096-1.346-1.481 0-2.558.808-3.097 1.346v-5.923c.673.539 1.616 1.346 3.097 1.346 1.48 0 2.423-.673 3.096-1.346v5.923zm0 14c0 2.289-1.212 4.846-4.173 4.846-.539 0-1.616-.134-2.02-.134V38.442c.673-.673 1.616-1.48 3.097-1.48 1.48 0 2.288.673 3.096 1.48V51.77zm24.23 7.539l13.866-8.616V31.846l-9.02-6.596-13.865 7.942v18.712l-2.692 2.154.27.404 2.288-1.885 9.153 6.73zm-.942-9.693V29.423l7 5.115v20.058l-7-4.98zm41.327-23.961c-1.077.808-2.02 1.211-3.096 1.211-1.077 0-2.423-.673-3.096-1.615 0 .135-5.116 5.52-5.116 5.52l-5.115-5.52-8.48 5.788.268.539 2.289-1.48 3.096 3.365v18.307l-3.635 2.827.404.404 1.885-1.346 6.865 5.788 8.75-5.788-.269-.404-2.288 1.346-3.5-3.23V31.307c1.48 1.615 3.096 2.961 4.98 2.961 3.231 0 5.654-4.173 6.058-8.615zm32.846 27.058l-2.557 1.615-14.404-21.404.807-1.077c1.616.942 2.962 2.289 5.923 2.289 2.962 0 6.731-3.097 7.135-8.885-.808 1.077-2.288 2.288-4.711 2.288-1.75 0-3.5-1.211-4.577-2.288l-9.827 14.404 12.923 19.788 9.423-6.192-.135-.538zm-17.5.538l-2.154 1.48-2.961-2.96V7.884l-10.77 7.403c1.212.404 2.693 1.077 2.693 3.904V51.77l-3.635 2.827.404.404 1.885-1.346 6.327 5.788 8.615-5.654-.404-.538zm63.135-39.577c0-5.52-5.25-7.27-9.692-7.135v.539c2.692.27 4.711 1.346 4.711 3.096 0 1.212-.942 2.827-3.5 2.827-2.154 0-5.52-1.212-8.885-2.288-3.634-1.212-7-2.424-9.826-2.424-5.52 0-9.827 4.174-9.827 9.289 0 4.173 3.23 5.52 4.442 6.058l.135-.27c-.808-.538-1.347-1.211-1.347-2.961 0-1.48 1.077-3.5 3.904-3.5 2.558 0 5.923 1.211 10.5 2.423 3.904 1.077 8.077 2.154 10.366 2.423v9.02l-4.308 3.634 4.308 3.77v12.384c-2.289 1.346-4.847 1.75-7.135 1.75-4.173 0-7.942-1.212-11.038-4.577l11.711-5.654V22.288l-14.404 6.327c1.481-3.769 4.308-6.596 7.404-8.48l-.135-.27c-8.48 2.289-16.288 10.097-16.288 19.789 0 11.577 9.288 20.058 19.923 20.058 11.577 0 18.308-9.02 18.173-18.577h-.27c-1.75 3.634-4.441 7.134-7.672 9.019V38.038l4.577-3.634-4.577-3.635V21.75c4.442 0 8.75-2.827 8.75-8.077zm-24.23 31.77l-3.366 1.75c-2.02-2.693-3.366-6.328-3.366-11.174 0-2.019.27-4.711.943-6.596l5.923-2.692-.135 18.711zm32.98-33.924L395.23 16.5l5.115 5.788 5.923-4.98-5.115-5.789zm9.154 41.731l-2.154 1.48-2.962-2.96V31.98l2.558-2.018-.404-.404-2.154 1.615-4.98-5.923L392 30.904l.27.538 2.018-1.346 2.693 3.366v18.307l-3.635 2.827.404.404 1.885-1.346 6.327 5.788 8.615-5.654-.27-.538zm45.769-.27l-2.02 1.347-3.23-3.096V31.98l2.558-2.02-.404-.403-2.289 1.75-6.73-6.058-7.674 5.923-6.73-5.923-7.539 5.923-5.115-5.923-8.212 5.654.27.538 2.019-1.346 2.961 3.366v18.173l-2.288 2.288 6.461 5.52 6.327-5.655-2.557-2.423V31.846l1.75-1.211 4.711 4.038v16.962l-2.154 2.288 6.596 5.52 6.193-5.655-2.558-2.423V31.846l1.615-1.346 4.712 4.173v16.692l-1.885 2.02 6.597 6.057 8.75-5.923-.135-.538zm23.827-4.038l-6.462 5.116-7.538-5.923V44.5l12.923-9.154-6.462-10.096-14.403 7.942v19.116l9.826 7.134 12.385-9.961-.27-.539zm-14-5.25V29.558l6.192 9.827-6.192 4.307zM504.808 41l-5.52-4.173c3.635-3.23 4.981-7.27 4.981-10.23 0-.405-.134-1.212-.134-1.885h-.27c-.538 1.48-2.019 2.826-4.173 2.826s-3.5-1.211-4.846-2.692l-12.654 7v10.23l4.846 3.77c-4.846 4.308-5.788 7-5.788 9.423 0 2.558 1.48 4.577 3.904 5.52l.27-.404c-.674-.539-1.212-.943-1.212-2.154 0-.943.942-2.423 3.096-2.423 2.827 0 4.442 1.884 5.384 2.961 0-.134 12.116-7.404 12.116-7.404V41zm-2.827-8.346c-1.885 3.365-6.058 6.73-8.616 8.615l-3.096-2.557V28.75c1.212 2.692 3.77 4.98 7 4.98 2.02 0 3.231-.403 4.712-1.076zM496.73 55c-1.481-3.23-4.443-5.52-7.943-5.52-.807 0-3.365-.134-5.519 1.347 1.346-2.154 5.116-6.058 10.096-9.02l3.366 2.828V55zm370.462-20c0 19.33-15.67 35-35 35s-35-15.67-35-35 15.67-35 35-35 35 15.67 35 35zm-30.333 0h-9.917V24.5h9.917a5.25 5.25 0 0 1 0 10.5zm0-17.5h-16.917v35h7V42h9.917c6.765 0 12.25-5.485 12.25-12.25 0-6.766-5.485-12.25-12.25-12.25zm67.103 13.222c0-1.925-1.48-3.094-3.402-3.094h-5.155v6.152h5.155c1.922 0 3.402-1.168 3.402-3.058zm-13.436 15.945V23.333h10.72c4.983 0 7.697 3.368 7.697 7.389 0 3.986-2.748 7.353-7.698 7.353h-5.84v8.592h-4.88zm21.385 0V29.655h4.363v2.235c1.203-1.444 3.232-2.646 5.294-2.646v4.26c-.31-.068-.689-.102-1.203-.102-1.444 0-3.37.824-4.091 1.89v11.375h-4.363zm24.336-8.729c0-2.577-1.514-4.811-4.262-4.811-2.717 0-4.228 2.234-4.228 4.811 0 2.612 1.511 4.845 4.228 4.845 2.748 0 4.262-2.233 4.262-4.845m-13.026 0c0-4.708 3.3-8.694 8.764-8.694 5.498 0 8.797 3.986 8.797 8.694s-3.299 8.729-8.797 8.729c-5.465 0-8.764-4.021-8.764-8.729m32.246 2.955v-5.876c-.722-1.1-2.303-1.89-3.747-1.89-2.507 0-4.225 1.958-4.225 4.81 0 2.887 1.718 4.846 4.225 4.846 1.444 0 3.025-.79 3.747-1.89zm0 5.774v-2.544c-1.307 1.65-3.092 2.544-5.12 2.544-4.159 0-7.354-3.162-7.354-8.73 0-5.394 3.128-8.693 7.353-8.693 1.959 0 3.814.824 5.12 2.542v-8.453h4.4v23.334h-4.4zm19.942 0v-2.509c-1.133 1.237-3.126 2.509-5.84 2.509-3.643 0-5.361-1.994-5.361-5.224V29.656h4.362v10.069c0 2.302 1.203 3.058 3.058 3.058 1.685 0 3.025-.928 3.78-1.89V29.655h4.366v17.012h-4.365zm7.641-8.729c0-5.085 3.71-8.694 8.798-8.694 3.402 0 5.464 1.478 6.564 2.99l-2.854 2.68c-.79-1.169-1.993-1.787-3.503-1.787-2.648 0-4.503 1.925-4.503 4.811s1.855 4.845 4.503 4.845c1.51 0 2.714-.687 3.503-1.822l2.854 2.68c-1.1 1.513-3.162 3.026-6.564 3.026-5.087 0-8.798-3.608-8.798-8.729m19.114 4.158v-8.625h-2.748v-3.815h2.748V25.12h4.365v4.536h3.366v3.815h-3.366v7.457c0 1.064.549 1.855 1.511 1.855.652 0 1.273-.24 1.511-.515l.93 3.333c-.653.584-1.823 1.066-3.644 1.066-3.059 0-4.673-1.581-4.673-4.571m35.686 4.571v-10.07h-10.826v10.07h-4.877V23.333h4.877v9.003h10.826v-9.003h4.913v23.334zm20.53 0v-2.509c-1.134 1.237-3.126 2.509-5.84 2.509-3.643 0-5.362-1.994-5.362-5.224V29.656h4.363v10.069c0 2.302 1.203 3.058 3.058 3.058 1.684 0 3.025-.928 3.78-1.89V29.655h4.365v17.012h-4.365zm19.905 0V36.22c0-2.303-1.2-3.093-3.058-3.093-1.718 0-3.022.962-3.78 1.925v11.615h-4.363V29.655h4.363v2.131c1.066-1.236 3.128-2.542 5.808-2.542 3.677 0 5.429 2.061 5.429 5.291v12.132h-4.399zm9.6-4.571v-8.625h-2.748v-3.815h2.748V25.12h4.365v4.536h3.366v3.815h-3.366v7.457c0 1.064.549 1.855 1.511 1.855.652 0 1.273-.24 1.514-.515l.926 3.333c-.652.584-1.822 1.066-3.643 1.066-3.058 0-4.673-1.581-4.673-4.571m113.03-14.996V12.75c-6.3 0-10.745 2.66-13.3 7.98v-7h-14.77v51.835h15.75v-25.34c0-9.765 2.065-13.09 11.935-13.09h.385V27.1zm258.51 16.45c0-19.075-11.165-30.8-27.475-30.8-6.965 0-13.72 2.87-18.9 8.015a26.708 26.708 0 0 0-6.16 9.52V-2.93h-15.575v22.365c-3.5-4.55-8.435-6.685-14.84-6.685-6.685 0-12.705 2.45-17.64 7.28-3.57 3.43-6.055 7.455-7.35 11.935a27.15 27.15 0 0 0-7.28-11.795c-5.145-4.865-11.55-7.455-19.005-7.455-6.965 0-13.755 2.87-18.9 8.015-2.765 2.765-4.865 6.02-6.195 9.59-4.48-11.41-13.51-17.57-25.55-17.57-5.425 0-10.255 1.47-14.525 4.375l-7.42 17.955c-2.835-14-12.915-22.33-26.635-22.33-6.965 0-13.72 2.87-18.9 8.015-5.075 5.04-7.84 11.62-7.84 18.76 0 7.245 2.59 13.72 7.525 18.97 5.25 5.53 11.55 8.19 19.355 8.19 5.845 0 10.92-1.435 15.155-4.235l4.9-11.9h-11.76c-2.275 1.995-4.76 2.87-7.805 2.87-6.58 0-10.5-2.87-11.83-8.295h33.67c1.015 4.97 3.325 9.555 6.965 13.37 5.25 5.53 11.515 8.19 19.32 8.19 11.725 0 21.14-6.475 25.41-17.43 1.26 3.395 3.22 6.475 5.81 9.205 5.25 5.53 11.55 8.225 19.39 8.225 7.735 0 14.245-2.765 19.495-8.015 3.185-3.185 5.39-6.825 6.58-10.99 1.4 4.9 4.13 9.205 8.155 12.81 4.62 4.13 10.15 6.195 16.555 6.195 6.3 0 11.025-1.68 15.645-6.195v5.04h15.085V49.08c1.26 3.43 3.22 6.615 5.88 9.415 5.25 5.53 11.55 8.19 19.355 8.19 11.445 0 19.95-5.425 24.885-16.135h-16.59c-2.275 1.995-4.76 2.87-7.805 2.87-6.58 0-10.5-2.87-11.83-8.295h38.64V43.55h.035zm-245.105-9.065c1.05-4.865 5.53-8.12 11.83-8.12 6.02 0 10.29 2.87 12.11 8.12h-23.94zm70.525 12.6c-2.485 3.325-5.81 5.04-9.905 5.04-7.245 0-12.18-4.865-12.18-12.67 0-7.035 4.935-12.18 11.725-12.18 4.935 0 8.47 1.89 10.57 5.425h14.28c-.595 2.205-.875 4.48-.875 6.86 0 2.59.35 5.11 1.015 7.525h-14.63zm40.635 5.635c-6.755 0-12.46-5.775-12.46-12.95 0-7.245 5.6-13.055 12.46-13.055 6.86 0 12.46 5.775 12.46 13.055 0 7.175-5.6 12.95-12.46 12.95zm54.145 0c-7.945 0-13.65-5.6-13.65-12.95 0-7.07 5.705-13.055 13.055-13.055 7.245 0 12.845 5.705 12.845 13.23.035 7.28-5.565 12.775-12.25 12.775zm40.705-18.235c1.05-4.865 5.53-8.12 11.83-8.12 6.02 0 10.29 2.87 12.11 8.12h-23.94zM651 0v23.333h-23.333V70h-23.334V23.333H581V0zm23.333 23.333H721V0h-46.667zm0 0v23.334H721V70h-70V23.333z" fill="#B8B8B8"/></svg> \ No newline at end of file
diff --git a/admin/survey/modules/mod_WPN/frontend/img/messaging.svg b/admin/survey/modules/mod_WPN/frontend/img/messaging.svg
new file mode 100644
index 0000000..ea5751b
--- /dev/null
+++ b/admin/survey/modules/mod_WPN/frontend/img/messaging.svg
@@ -0,0 +1 @@
+<svg data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="664" height="779.55"><defs><linearGradient id="a" x1="324.23" y1="775.01" x2="630.7" y2="51.33" gradientTransform="rotate(-.14 -841.696 5577.13)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="gray" stop-opacity=".25"/><stop offset=".54" stop-color="gray" stop-opacity=".12"/><stop offset="1" stop-color="gray" stop-opacity=".1"/></linearGradient><linearGradient id="b" x1="557.77" y1="856.45" x2="863.06" y2="135.54" xlink:href="#a"/><linearGradient id="c" x1="430.18" y1="453.24" x2="430.18" y2="294.18" xlink:href="#a"/></defs><g opacity=".5"><path d="M645.11 60.78l-362.25.88A14.89 14.89 0 0 0 268 76.57l1.65 667.73a14.89 14.89 0 0 0 14.93 14.85l362.25-.88a14.89 14.89 0 0 0 14.85-14.92L660 75.62a14.89 14.89 0 0 0-14.89-14.84z" transform="translate(-268 -60.22)" fill="url(#a)"/><rect x="274.12" y="60.65" width="381.44" height="688.5" rx="13.64" ry="13.64" transform="rotate(-.14 -24317.39 110051.963)" fill="#fff"/><path d="M377.62 190.78l-.38-159a14.49 14.49 0 0 0-14.52-14.45l-70.85.17a30.92 30.92 0 0 1-30.41 26.38l-131.75.32a30.92 30.92 0 0 1-30.54-26.23l-69.79.17a14.49 14.49 0 0 0-14.45 14.52L15.32 193l1.13 464.66A14.49 14.49 0 0 0 31 672.08l333.34-.81a14.49 14.49 0 0 0 14.41-14.49z" fill="#bbb"/><rect x="418.12" y="86.18" width="85" height="5.31" rx="2" ry="2" transform="rotate(-.86 -3684.913 17913.26)" fill="#dbdbdb"/><circle cx="521.17" cy="87.39" r="3.19" transform="rotate(-.86 -3624.272 17911.716)" fill="#dbdbdb"/><path fill="#e0e0e0" d="M166.1 103.52h177.59v14.16H166.1zm0 28.32h177.59V146H166.1z"/><ellipse cx="78.09" cy="118.92" rx="33.54" ry="33.7" fill="#f5f5f5"/><path d="M92.54 142.51H63.45a8.67 8.67 0 0 0-7.08 3.76 43.63 43.63 0 0 0 43 .24 8.66 8.66 0 0 0-6.83-4z" fill="#294ace"/><path d="M63.69 119.78s-4.26 12.4-6.59 11.24c0 0 22.44 19.38 42.25 0a59.07 59.07 0 0 0-8.53-11.24z" fill="#333"/><circle cx="78.07" cy="118.62" r="16.67" fill="#333"/><path d="M72.21 136.73h11.63v4.52a5.34 5.34 0 0 1-5.34 5.34h-1a5.34 5.34 0 0 1-5.34-5.34v-4.52h.05z" opacity=".1"/><path d="M73.44 136.45h9.18a1.23 1.23 0 0 1 1.23 1.23V141a5.34 5.34 0 0 1-5.34 5.34h-1a5.34 5.34 0 0 1-5.3-5.34v-3.29a1.23 1.23 0 0 1 1.23-1.26z" fill="#fda57d"/><path d="M72.24 138.13a16.73 16.73 0 0 0 11.63 0v-1.35H72.24z" opacity=".1"/><circle cx="78.07" cy="122.24" r="16.67" fill="#fda57d"/><path d="M62.14 115.91h31.78s-2.71-12.83-14.73-12-17.05 12-17.05 12z" fill="#333"/><ellipse cx="61.75" cy="121.53" rx="1.55" ry="2.91" fill="#fda57d"/><ellipse cx="94.31" cy="121.53" rx="1.55" ry="2.91" fill="#fda57d"/><path d="M62.14 116.35h31.78s-2.71-12.83-14.73-12-17.05 12-17.05 12z" opacity=".1"/><path fill="#e0e0e0" d="M166.1 211.38h177.59v14.16H166.1zm0 28.32h177.59v14.16H166.1z"/><ellipse cx="78.09" cy="226.78" rx="33.54" ry="33.7" fill="#e0e0e0"/><path fill="#e0e0e0" d="M166.1 319.24h177.59v14.16H166.1zm0 28.32h177.59v14.16H166.1z"/><ellipse cx="78.09" cy="334.64" rx="33.54" ry="33.7" fill="#e0e0e0"/><path fill="#e0e0e0" d="M166.1 427.1h177.59v14.16H166.1zm0 28.32h177.59v14.16H166.1z"/><ellipse cx="78.09" cy="442.5" rx="33.54" ry="33.7" fill="#e0e0e0"/><path fill="#e0e0e0" d="M166.1 534.96h177.59v14.16H166.1zm0 28.32h177.59v14.16H166.1z"/><ellipse cx="78.09" cy="550.36" rx="33.54" ry="33.7" fill="#e0e0e0"/></g><path d="M878.26 144.67l-362.26.88a14.89 14.89 0 0 0-14.85 14.92l1.65 664.46a14.89 14.89 0 0 0 14.93 14.85L880 838.9a14.89 14.89 0 0 0 14.83-14.9l-1.65-664.46a14.89 14.89 0 0 0-14.92-14.87z" transform="translate(-268 -60.22)" fill="url(#b)"/><rect x="507.27" y="141.27" width="381.44" height="688.5" rx="13.64" ry="13.64" transform="rotate(-.14 -24084.214 110134.099)" fill="#fff"/><path data-name="&lt;Path&gt;" d="M610.77 272.49l-.38-160.13a14.49 14.49 0 0 0-14.52-14.45l-70.87.17a30.92 30.92 0 0 1-30.41 26.38l-131.74.32a30.92 30.92 0 0 1-30.54-26.23l-69.79.17a14.49 14.49 0 0 0-14.45 14.52l.39 160.34" fill="#fafafa"/><path data-name="&lt;Path&gt;" d="M248.46 273.59l1.13 464.66a14.49 14.49 0 0 0 14.52 14.45l333.34-.81a14.49 14.49 0 0 0 14.45-14.52l-1.14-466" fill="#fafafa"/><path fill="#e0e0e0" d="M280.5 164.53h70.82v70.82H280.5z"/><path fill="url(#c)" d="M196.37 294.18H664v159.07H196.37z" opacity=".5"/><path fill="#fff" d="M201.94 300.72h456.5V447.8h-456.5z"/><path fill="#294ace" d="M384 355.19h177.59v14.16H384zm0 28.33h177.59v14.16H384z"/><path fill="#e0e0e0" d="M384 512.08h177.59v14.16H384z"/><path fill="#eee" d="M384 540.4h177.59v14.16H384z"/><path fill="#294ace" d="M433.03 221.18h79.53v25.06h-79.53z"/><ellipse cx="295.99" cy="370.59" rx="33.54" ry="33.7" fill="#f5f5f5"/><path d="M310.44 394.18h-29.1a8.67 8.67 0 0 0-7.08 3.76 43.63 43.63 0 0 0 43 .24 8.66 8.66 0 0 0-6.82-4z" fill="#294ace"/><path d="M281.59 371.46s-4.26 12.4-6.59 11.24c0 0 22.44 19.38 42.25 0a59.07 59.07 0 0 0-8.53-11.24z" fill="#333"/><circle cx="295.97" cy="370.3" r="16.67" fill="#333"/><path d="M290.11 388.41h11.63v4.52a5.34 5.34 0 0 1-5.34 5.34h-1a5.34 5.34 0 0 1-5.34-5.34v-4.52h.05z" opacity=".1"/><path d="M291.34 388.13h9.18a1.23 1.23 0 0 1 1.23 1.23v3.29a5.34 5.34 0 0 1-5.35 5.35h-1a5.34 5.34 0 0 1-5.34-5.34v-3.29a1.23 1.23 0 0 1 1.23-1.23z" fill="#fda57d"/><path d="M290.13 389.78a16.73 16.73 0 0 0 11.63 0v-1.43h-11.63z" opacity=".1"/><circle cx="295.97" cy="373.91" r="16.67" fill="#fda57d"/><path d="M280 367.59h31.78s-2.71-12.83-14.73-12-17.05 12-17.05 12z" fill="#333"/><ellipse cx="279.65" cy="373.2" rx="1.55" ry="2.91" fill="#fda57d"/><ellipse cx="312.2" cy="373.2" rx="1.55" ry="2.91" fill="#fda57d"/><path d="M280 368.02h31.78s-2.71-12.83-14.73-12-17.05 12-17.05 12z" opacity=".1"/><ellipse cx="317.78" cy="528.57" rx="33.54" ry="33.7" fill="#e0e0e0"/><ellipse cx="317.78" cy="658.22" rx="33.54" ry="33.7" fill="#e0e0e0"/><path fill="#e0e0e0" d="M384 637.37h177.59v14.16H384z"/><path fill="#eee" d="M384 665.69h177.59v14.16H384z"/><path fill="#e0e0e0" d="M384 164.53h177.59v14.16H384zm0 28.33h177.59v14.16H384z"/><rect x="651.27" y="166.8" width="85" height="5.31" rx="2" ry="2" transform="rotate(-.86 -3451 17994.3)" fill="#dbdbdb"/><circle cx="754.32" cy="168.02" r="3.19" transform="rotate(-.86 -3390.359 17992.756)" fill="#dbdbdb"/></svg> \ No newline at end of file
diff --git a/admin/survey/modules/mod_WPN/frontend/img/search.svg b/admin/survey/modules/mod_WPN/frontend/img/search.svg
new file mode 100644
index 0000000..61fb516
--- /dev/null
+++ b/admin/survey/modules/mod_WPN/frontend/img/search.svg
@@ -0,0 +1 @@
+<svg width="688" height="679" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><linearGradient x1="50%" y1="100%" x2="50%" y2="0%" id="a"><stop stop-color="gray" stop-opacity=".25" offset="0%"/><stop stop-color="gray" stop-opacity=".12" offset="54%"/><stop stop-color="gray" stop-opacity=".1" offset="100%"/></linearGradient><linearGradient x1="27444%" y1="40932%" x2="27444%" y2="24816%" id="b"><stop stop-color="gray" stop-opacity=".25" offset="0%"/><stop stop-color="gray" stop-opacity=".12" offset="54%"/><stop stop-color="gray" stop-opacity=".1" offset="100%"/></linearGradient><linearGradient x1="27444%" y1="36144%" x2="27444%" y2="26101%" id="c"><stop stop-color="gray" stop-opacity=".25" offset="0%"/><stop stop-color="gray" stop-opacity=".12" offset="54%"/><stop stop-color="gray" stop-opacity=".1" offset="100%"/></linearGradient><path id="d" d="M.54.72h143.79v96.93H.54z"/><linearGradient x1="27444%" y1="61603%" x2="27444%" y2="45487%" id="f"><stop stop-color="gray" stop-opacity=".25" offset="0%"/><stop stop-color="gray" stop-opacity=".12" offset="54%"/><stop stop-color="gray" stop-opacity=".1" offset="100%"/></linearGradient><linearGradient x1="27444%" y1="56815%" x2="27444%" y2="46772%" id="g"><stop stop-color="gray" stop-opacity=".25" offset="0%"/><stop stop-color="gray" stop-opacity=".12" offset="54%"/><stop stop-color="gray" stop-opacity=".1" offset="100%"/></linearGradient><path id="h" d="M.54.42h143.79v96.93H.54z"/><linearGradient x1="68876%" y1="76586%" x2="68876%" y2="16326%" id="j"><stop stop-color="gray" stop-opacity=".25" offset="0%"/><stop stop-color="gray" stop-opacity=".12" offset="54%"/><stop stop-color="gray" stop-opacity=".1" offset="100%"/></linearGradient><linearGradient x1="68818%" y1="56849%" x2="68818%" y2="40967%" id="k"><stop stop-color="gray" stop-opacity=".25" offset="0%"/><stop stop-color="gray" stop-opacity=".12" offset="54%"/><stop stop-color="gray" stop-opacity=".1" offset="100%"/></linearGradient><linearGradient x1="50%" y1="100%" x2="50%" y2=".001%" id="l"><stop stop-color="#B3B3B3" stop-opacity=".25" offset="0%"/><stop stop-color="#B3B3B3" stop-opacity=".1" offset="54%"/><stop stop-color="#B3B3B3" stop-opacity=".05" offset="100%"/></linearGradient><linearGradient x1="49.98%" y1="99.949%" x2="49.98%" y2="0%" id="m"><stop stop-color="#FFF" stop-opacity=".12" offset="0%"/><stop stop-color="#FFF" stop-opacity=".09" offset="55%"/><stop stop-color="#FFF" stop-opacity=".02" offset="100%"/></linearGradient><linearGradient x1="77499%" y1="48473%" x2="77499%" y2="42515%" id="n"><stop stop-color="#FFF" stop-opacity=".12" offset="0%"/><stop stop-color="#FFF" stop-opacity=".09" offset="55%"/><stop stop-color="#FFF" stop-opacity=".02" offset="100%"/></linearGradient></defs><g fill="none" fill-rule="evenodd"><path d="M.15.21h448.44v602.6H.15z" opacity=".5" transform="translate(0 30)" fill-rule="nonzero" fill="url(#a)"/><path fill="#F2F2F2" fill-rule="nonzero" d="M5.99 38.39h434.43v581.58H5.99z"/><path fill="#E0E0E0" fill-rule="nonzero" d="M39.86 62.91h149.48v4.67H39.86z"/><path fill="#294ACE" fill-rule="nonzero" opacity=".7" d="M39.86 83.93h149.48v4.67H39.86z"/><path fill="#E0E0E0" fill-rule="nonzero" d="M211.53 62.91h149.48v4.67H211.53zm23.35 133.14h149.48v4.67H234.88zm3.51 12.84h149.48v4.67H238.39zm7.01 12.85h149.48v4.67H245.4zm-10.52 181.01h149.48v4.67H234.88zm3.51 12.85h149.48v4.67H238.39zm7.01 12.84h149.48v4.67H245.4z"/><path d="M.03.16h158.82v161.16H.03z" opacity=".5" transform="translate(41 148)" fill-rule="nonzero" fill="url(#b)"/><path fill="#F5F5F5" fill-rule="nonzero" d="M42.03 151.67h156.32v154.15H42.03z"/><path d="M.54.01h145.8v100.43H.54z" opacity=".5" transform="translate(47 161)" fill-rule="nonzero" fill="url(#c)"/><path fill="#FFF" fill-rule="nonzero" d="M48.54 162.18h143.79v96.93H48.54z"/><g transform="translate(227 222)"><mask id="e" fill="#fff"><use xlink:href="#d"/></mask><g mask="url(#e)" fill-rule="nonzero" fill="#294ACE" opacity=".4"><g transform="translate(-196 -57)"><path d="M5.35 90.61l36.21-56.06 15.18 24.52 32.7-33.86 28.03 33.86 24.52-50.21 63.06 100.43L.68 102.28z"/><circle cx="33.38" cy="11.19" r="10.51"/></g></g></g><path d="M.03.87h158.82v161.16H.03z" opacity=".5" transform="translate(41 354)" fill-rule="nonzero" fill="url(#f)"/><path fill="#F5F5F5" fill-rule="nonzero" d="M42.03 358.37h156.32v154.15H42.03z"/><path d="M.54.72h145.8v100.43H.54z" opacity=".5" transform="translate(47 367)" fill-rule="nonzero" fill="url(#g)"/><path fill="#FFF" fill-rule="nonzero" d="M48.54 368.88h143.79v96.93H48.54z"/><g transform="translate(227 429)"><mask id="i" fill="#fff"><use xlink:href="#h"/></mask><g mask="url(#i)" fill-rule="nonzero" fill="#BDBDBD" opacity=".4"><g transform="translate(-196 -57)"><path d="M5.35 90.31l36.21-56.06 15.18 24.53 32.7-33.87 28.03 33.87 24.52-50.22 63.06 100.43-204.37-7z"/><circle cx="33.38" cy="10.9" r="10.51"/></g></g></g><path transform="rotate(-78.76 312.134 300.068)" d="M-21.666 115.442h602.6v448.44h-602.6z" opacity=".5" fill-rule="nonzero" fill="url(#j)"/><path fill="#FFF" fill-rule="nonzero" d="M74.214 580.02L187.575 9.595l426.097 84.679-113.36 570.425z"/><path fill="#E0E0E0" fill-rule="nonzero" d="M213.319 42.077l302.396 60.096-.91 4.58L212.41 46.657zm-86.043 432.981l302.396 60.096-.91 4.58-302.396-60.095zm-5.246 26.335L355.7 547.83l-.91 4.58-233.67-46.437z"/><path fill="#294ACE" fill-rule="nonzero" opacity=".7" d="M116.797 527.746l87.048 17.3-.91 4.58-87.048-17.3zm91.277-459.319l151.194 30.047-.91 4.58-151.194-30.046z"/><path fill="#E0E0E0" fill-rule="nonzero" d="M202.85 94.769l272.61 54.176-.91 4.58L201.94 99.35z"/><path fill="#3AD29F" fill-rule="nonzero" opacity=".7" d="M197.61 121.119l66.432 13.202-.91 4.58L196.7 125.7z"/><path fill="#E0E0E0" fill-rule="nonzero" d="M192.38 147.464l302.396 60.096-.91 4.58-302.396-60.096z"/><path transform="rotate(-78.76 402.434 120.086)" d="M71.865-32.78h158.82v276.77H71.865z" opacity=".5" fill-rule="nonzero" fill="url(#k)"/><path fill="#FFF" fill-rule="nonzero" d="M220.561 260.23l268.029 53.266-30.275 152.341-268.029-53.265z"/><path fill="#E0E0E0" fill-rule="nonzero" d="M187.145 173.818l302.396 60.096-.91 4.58-302.396-60.095z"/><path fill="#294ACE" fill-rule="nonzero" d="M244.533 286.425l33.22 6.602-22.08 111.108-33.22-6.602z"/><path fill="#3AD29F" fill-rule="nonzero" d="M296.81 334.918l33.22 6.602-14.797 74.454-33.22-6.602z"/><path fill="#F55F44" fill-rule="nonzero" d="M349.55 381.12l33.22 6.602-7.966 40.086-33.22-6.602z"/><path fill="#FDD835" fill-rule="nonzero" d="M417.308 351.72l33.22 6.602-16.162 81.33-33.22-6.602z"/><path d="M547.45 250.01a155.89 155.89 0 0 0-223.11-1.68c-59 59.48-60 156.33-2.29 217.07 52.347 55.099 136.798 64.418 199.9 22.06l112.69 117.21a7.59 7.59 0 0 0 10.73.21l28.08-27a7.59 7.59 0 0 0 .21-10.73L561 449.95c44.59-61.108 38.876-145.407-13.55-199.94zm-35.1 188.45c-44.392 42.677-114.975 41.287-157.652-3.104-42.678-44.39-41.29-114.973 3.1-157.652 44.39-42.679 114.972-41.293 157.652 3.096a111.5 111.5 0 0 1-3.1 157.66z" fill="url(#l)" fill-rule="nonzero"/><path d="M352.49 327.06c-12.54 0-12.56 19.49 0 19.49s12.56-19.49 0-19.49z" fill="url(#m)" fill-rule="nonzero"/><path d="M439.9 264.63c-33.75-.76-64.46 16.17-80.79 41.73-5.33 8.34 9.8 15.71 15.1 7.41 13.52-21.16 39.21-34.6 67-33.9 29.12.73 55.62 17.39 69.65 40.51 5.32 8.77 19.27.8 14-7.92-17.06-28-50.1-47-84.96-47.83z" fill="url(#n)" fill-rule="nonzero"/><path d="M559.68 244.09a155.89 155.89 0 0 0-223.11-1.68c-59 59.48-60 156.33-2.29 217.07 52.35 55.095 136.8 64.41 199.9 22.05l112.68 117.22a7.59 7.59 0 0 0 10.73.21l28.08-27a7.59 7.59 0 0 0 .21-10.73L573.19 444.02c44.594-61.096 38.898-145.389-13.51-199.93zm-35.1 188.37c-44.392 42.677-114.975 41.287-157.652-3.104-42.678-44.39-41.29-114.973 3.1-157.652C414.417 229.025 485 230.41 527.68 274.8a111.5 111.5 0 0 1-3.1 157.66z" fill="#294ACE" fill-rule="nonzero"/><path d="M364.72 321.13c-12.54 0-12.56 19.49 0 19.49s12.56-19.49 0-19.49zm87.41-62.42c-33.75-.76-64.46 16.17-80.79 41.73-5.33 8.34 9.8 15.71 15.1 7.41 13.52-21.16 39.21-34.6 67-33.9 29.12.73 55.62 17.39 69.65 40.51 5.32 8.77 19.27.8 14-7.92-17.09-28.08-50.09-47.08-84.96-47.83z" fill="#294ACE" fill-rule="nonzero"/></g></svg> \ No newline at end of file
diff --git a/admin/survey/modules/mod_WPN/frontend/img/security.svg b/admin/survey/modules/mod_WPN/frontend/img/security.svg
new file mode 100644
index 0000000..39f9f73
--- /dev/null
+++ b/admin/survey/modules/mod_WPN/frontend/img/security.svg
@@ -0,0 +1 @@
+<svg data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="859.4" height="751.86"><defs><linearGradient id="a" x1="602" y1="795.44" x2="602" y2="79.05" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="gray" stop-opacity=".25"/><stop offset=".54" stop-color="gray" stop-opacity=".12"/><stop offset="1" stop-color="gray" stop-opacity=".1"/></linearGradient><linearGradient id="b" x1="344.92" y1="369.4" x2="505.4" y2="369.4" xlink:href="#a"/><linearGradient id="c" x1="445.92" y1="830.86" x2="445.92" y2="392.54" xlink:href="#a"/></defs><path d="M602 79.05L324 250.13S324 603 602 795.44C880 603 880 250.13 880 250.13z" transform="translate(-170.6 -79)" fill="url(#a)" opacity=".5"/><path d="M431.4 10.75l-269.7 166s0 342.31 269.7 529c269.7-186.72 269.7-529 269.7-529z" fill="#fff"/><path d="M433.01 10.75l-4.61 2.83v688.93c1.53 1.08 3.06 2.17 4.61 3.24 269.7-186.72 269.7-529 269.7-529z" fill="#294ace" opacity=".04"/><path fill="url(#b)" d="M366.11 347.07l50.84 46.6 63.03-90.92 25.42 21.19-88.45 112.1-72.03-80.5 21.19-8.47z" opacity=".7"/><path fill="#3ad29f" d="M378.11 349.87l41.24 37.8 58.43-85.92 20.62 17.19-79.05 103.1-58.43-65.3 17.19-6.87z"/><path d="M554.46 455a10.83 10.83 0 0 0-8.46 6.1c-3.47 7.19-10.35 19.79-16.67 21.77-4.11 1.28-10.1.2-15.38-1.34l-2.15-.66v-2.73S480.91 461 463.27 457v-12.56a22.85 22.85 0 0 0 5.25-34c4.73-1.74 7.85-4.75 7.85-8.18 0-5.39-7.74-9.76-17.28-9.76-8.3 0-15.23 3.3-16.9 7.71a23.42 23.42 0 0 0-6.8 43.39v12.5c-9.48-.09-36.65 3.89-48.51 50.42 0 0 1.68 1.44 4.28 3.46l-.35.91-31.53 81.22s-25.09 6.69-12.27 19c0 0 0-.19-.06-.51l6.3 14.5 1.12 2.4 7.43 15.86-.74 3.61-9.52 46.72h-13.11v7.41H350l-26.4 129.76h8.34l25.44-129.76h31.48l16.93 36.15h-8v8.34h12L420.65 769c-1.32 1.33-1.46 3.37 3 6.32l3.46 7.38h-9.86v5.56h12.47l20 42.64h16.68l-20.17-42.64h9v-2.81c9.15 1.33 16.7 1.33 18.09-.06 2.79-2.79 2.23-14.5-1.67-20.07a7.16 7.16 0 0 0-1.5-1.61c.46-11.7 2.12-35 8.19-49.12 8.36-19.51-4.46-41.26-4.46-41.26l-.4-8.09V662c4.6-.88 7.65-1.53 7.65-1.53s-8.36-27.32 0-41.26c5.81-9.68 6.23-23.93 2.78-36.6v-.09q-.26-.94-.54-1.86v-.1a41.48 41.48 0 0 0 5.07-5.4s-11.71-54.64 0-71.93l23.42 1.67v-3.07h20.91l18.4-25.65s12.82-3.35 16.73-14.5c2.48-7.35-6.8-7.43-13.44-6.68zm-155.59 96.45s7.61-13.39 11.36-27.13v-.05q.28-1 .53-2.08c.6.22 1.18.42 1.75.57 0 0 5.58 50.18-3.35 52.41 0 0 1.79 1.16 4.88 2.84l-3.28 1.31-18.88 7.55 1.21 4c-.68.13-1.44.28-2.25.45-5.39 1.15-13.38 3.39-19.78 7.4s7.18-24.41 27.81-47.27zM363.93 605a17.21 17.21 0 0 0-1.62 2.66l-2-5.29c.75.09 1.52.21 2.35.36-.03.01.52.94 1.27 2.27zm2.18 51.6l.57-2.89 12.94 27.62a67.12 67.12 0 0 1-16.14 1.34 11.66 11.66 0 0 0-2.86 1.92l5.49-28zm-7.27 37.07l1-5.29c1 1.34 3.43 2.75 8.56 4.07a59.62 59.62 0 0 0 6.27 1.22h-15.83zM426 745.59h9.74v-8.34h-13.68L405 701.1h7.62v-7.41h-9.08c6.07-.79 10.48-2 11.28-3.26 2.07-3.22-.71-14-5.44-18.83-3.14-13.27-10.61-42-17.44-46.27l9.78-1.82h.1l1.26-.23 3.36 11a177.18 177.18 0 0 0 23.42-3.14v.12a184.09 184.09 0 0 1-19.63 2.74l.07.24a174.74 174.74 0 0 0 19.43-2.38c-1.41 12.47-2.62 33.93 5.66 34.72a36.75 36.75 0 0 0 4.56.09v2.81h.18c.6 7.6 2.22 17.74 6.41 26.12l5.38 72.66a67.28 67.28 0 0 1-14.89.66l-11-23.31z" transform="translate(-170.6 -79)" fill="url(#c)" opacity=".5"/><path d="M228 511.94s-46.3 5.38-32.3 33.38a318 318 0 0 1 21.27 56.8l24.5-5.11s-9.69-45.76-18.31-51.15l23.15-4.31z" fill="#fda57d"/><path d="M223.16 545.86l23.15-4.31L228 511.94s-.54.06-1.49.21l18.18 29.4-23.15 4.31c8.61 5.38 18.31 51.15 18.31 51.15l-23 4.79.08.32 24.5-5.11s-9.66-45.77-18.27-51.15z" opacity=".05"/><path d="M231.68 591.82s-14.31 10.26-36 9.44c0 0-11.53 5.25 4.79 9.43s42.68 1.23 44.74-2-.86-14.14-5.68-18.6-7.85 1.73-7.85 1.73z" fill="#294ace"/><path d="M269.46 577.62s-1.08 21 6.46 36.07l5.38 72.68h17.23s0-35.53 8.08-54.38-4.31-39.84-4.31-39.84l-1.08-21.54z" fill="#fda57d"/><path d="M260.84 543.7s-7 40.92 4.31 42 44.15-5.92 44.15-5.92-8.08-26.38 0-39.84 5.38-36.07-3.77-50.07-19.38 0-19.38 0z" fill="#47e6b1"/><circle cx="280.23" cy="352.57" r="22.07" fill="#fda57d"/><path fill="#fda57d" d="M265.15 363.88h26.92v24.23h-26.92z"/><path d="M292.07 681s-16.15 7-37.15 1.62c0 0-12.38 2.69 2.69 10.23s41.46 10.23 44.15 7.54 2.15-14-1.62-19.38-8.07-.01-8.07-.01z" fill="#294ace"/><path d="M223.4 432l-31.77 81.84s-24.23 6.46-11.84 18.31c0 0-2.15-11.31 15.07-8.08 0 0 4.85 8.08 4.85 10.77s5.54-9 3.31-14.72a131.31 131.31 0 0 1 26.84-45.58s13.46-23.69 12.92-39.84zm106.63-29.09s17.23 8.08 25.84 5.38c6.1-1.91 12.74-14.08 16.1-21a10.46 10.46 0 0 1 8.16-5.85c6.41-.77 15.38-.69 12.89 6.41-3.77 10.77-16.15 14-16.15 14L359.1 426.6h-31.23z" fill="#fda57d"/><circle cx="276.19" cy="350.69" r="22.61" fill="#3d213c"/><ellipse cx="288.03" cy="330.5" rx="16.69" ry="9.42" fill="#3d213c"/><path opacity=".05" d="M269.55 585.78v2.71l32.36-4.14v-3.09l-32.36 4.52z"/><path d="M258.15 494.71l-35 14 14 45.76s42-2.15 57.61-18.31-25.84-48.46-25.84-48.46z" fill="#47e6b1"/><path d="M298.81 527a12.15 12.15 0 0 1-3.51 9.18c-13 13.47-44.4 17.21-54.45 18.07l.07.23s42-2.15 57.61-18.31a12.09 12.09 0 0 0 3.52-8.7" opacity=".05"/><path d="M268.4 382.72s-36.07-6.46-50.07 48.46c0 0 15.07 12.92 24.77 15.61 0 0 5.38 48.46-3.23 50.61 0 0 50.61 32.84 76.45 0 0 0-11.31-52.76 0-69.45l22.61 1.62v-25.85s-33.92-18.84-50.07-21z" fill="#294ace"/><path opacity=".05" d="M224.32 512.52l-2.17.44 10.45 31.14 1.31-.24-9.59-31.34zm114.59-106.16l2.14.65.69 19.59h-2.83v-20.24zm-116.47 28.16l-.71 1.85 19.12 11.96.54-2.09-18.95-11.72zm22.12 65.63l-3.16 1.26s53.09 25.72 70.59 3.18l-.58-2s-16.1 21.57-66.85-2.44z"/><path fill="#b0bec5" d="M171.52 611.87h71.6v7.16h-71.6zm5.37-86.82l8.95 20.59h15.22l-8.95-23.27-15.22 2.68z"/><path fill="#b0bec5" d="M278.92 744.32h16.11l-95.29-201.69-14.51 1.12 93.69 200.57z"/><path fill="#b0bec5" d="M157.2 744.32h8.06l35.8-182.57-5.37-6.27-38.49 188.84z"/><path fill="#eceff1" d="M186.93 547.95l-1.09-2.31h15.22l.54 1.15-14.67 1.16z"/><path opacity=".1" d="M186.93 547.95l-1.09-2.31h15.22l.54 1.15-14.67 1.16zm7.17 15.31l4.7 10.02-.55 2.79-4.86-9.32.71-3.49zm-2.87 48.61l-1.4 7.15h2.43l1.13-7.15h-2.16z"/><path fill="#b0bec5" d="M228.8 653.93h36.69v8.05H228.8zm18.8 43.85h36.69v5.37H247.6z"/><path opacity=".1" d="M252.28 653.93l3.81 8.06h2.02l-2.91-8.06h-2.92zm20.74 43.85l2.54 5.37h2.24l-2.39-5.37h-2.39zm-40.64-85.91l3.39 7.15h1.83l-3.58-7.15h-1.64z"/><path d="M165.29 48a3.67 3.67 0 0 1-2-4.44 1.77 1.77 0 0 0 .08-.41 1.84 1.84 0 0 0-3.31-1.22 1.77 1.77 0 0 0-.2.36 3.67 3.67 0 0 1-4.44 2 1.77 1.77 0 0 0-.41-.08 1.84 1.84 0 0 0-1.22 3.31 1.77 1.77 0 0 0 .36.2 3.67 3.67 0 0 1 2 4.44 1.77 1.77 0 0 0-.08.41 1.84 1.84 0 0 0 3.33 1.23 1.77 1.77 0 0 0 .2-.36 3.67 3.67 0 0 1 4.44-2 1.77 1.77 0 0 0 .41.08 1.84 1.84 0 0 0 1.22-3.31 1.77 1.77 0 0 0-.38-.21zm-146 325a3.67 3.67 0 0 1-2-4.44 1.77 1.77 0 0 0 .08-.41 1.84 1.84 0 0 0-3.31-1.22 1.77 1.77 0 0 0-.2.36 3.67 3.67 0 0 1-4.44 2 1.77 1.77 0 0 0-.41-.08 1.84 1.84 0 0 0-1.22 3.31 1.77 1.77 0 0 0 .36.2 3.67 3.67 0 0 1 2 4.44 1.77 1.77 0 0 0-.08.41 1.84 1.84 0 0 0 3.33 1.23 1.77 1.77 0 0 0 .2-.36 3.67 3.67 0 0 1 4.44-2 1.77 1.77 0 0 0 .41.08 1.84 1.84 0 0 0 1.22-3.31 1.77 1.77 0 0 0-.38-.21z" fill="#4d8af0" opacity=".5"/><circle cx="748.4" cy="254" r="6" fill="#f55f44" opacity=".5"/><circle cx="121.4" cy="683" r="6" fill="#f55f44" opacity=".5"/><circle cx="850.4" cy="485" r="6" fill="#f55f44" opacity=".5"/><path d="M704.29 77a3.67 3.67 0 0 1-2-4.44 1.77 1.77 0 0 0 .08-.41 1.84 1.84 0 0 0-3.31-1.22 1.77 1.77 0 0 0-.2.36 3.67 3.67 0 0 1-4.44 2 1.77 1.77 0 0 0-.41-.08 1.84 1.84 0 0 0-1.22 3.31 1.77 1.77 0 0 0 .36.2 3.67 3.67 0 0 1 2 4.44 1.77 1.77 0 0 0-.08.41 1.84 1.84 0 0 0 3.33 1.23 1.77 1.77 0 0 0 .2-.36 3.67 3.67 0 0 1 4.44-2 1.77 1.77 0 0 0 .41.08 1.84 1.84 0 0 0 1.22-3.31 1.77 1.77 0 0 0-.38-.21zm100 628a3.67 3.67 0 0 1-2-4.44 1.77 1.77 0 0 0 .08-.41 1.84 1.84 0 0 0-3.31-1.22 1.77 1.77 0 0 0-.2.36 3.67 3.67 0 0 1-4.44 2 1.77 1.77 0 0 0-.41-.08 1.84 1.84 0 0 0-1.22 3.31 1.77 1.77 0 0 0 .36.2 3.67 3.67 0 0 1 2 4.44 1.77 1.77 0 0 0-.08.41 1.84 1.84 0 0 0 3.33 1.23 1.77 1.77 0 0 0 .2-.36 3.67 3.67 0 0 1 4.44-2 1.77 1.77 0 0 0 .41.08 1.84 1.84 0 0 0 1.22-3.31 1.77 1.77 0 0 0-.38-.21zm-792-522a3.67 3.67 0 0 1-2-4.44 1.77 1.77 0 0 0 .08-.41 1.84 1.84 0 0 0-3.31-1.22 1.77 1.77 0 0 0-.2.36 3.67 3.67 0 0 1-4.44 2 1.77 1.77 0 0 0-.41-.08 1.84 1.84 0 0 0-1.22 3.31 1.77 1.77 0 0 0 .36.2 3.67 3.67 0 0 1 2 4.44 1.77 1.77 0 0 0-.08.41 1.84 1.84 0 0 0 3.33 1.23 1.77 1.77 0 0 0 .2-.36 3.67 3.67 0 0 1 4.44-2 1.77 1.77 0 0 0 .41.08 1.84 1.84 0 0 0 1.22-3.31 1.77 1.77 0 0 0-.38-.21z" fill="#4d8af0" opacity=".5"/><circle cx="79.4" cy="284" r="6" fill="#47e6b1" opacity=".5"/><circle cx="853.4" cy="332" r="6" fill="#47e6b1" opacity=".5"/><g opacity=".5" fill="#47e6b1"><path d="M583.4 0h3v17h-3z"/><path d="M593.4 7v3h-17V7z"/></g><g opacity=".5" fill="#47e6b1"><path d="M594.4 666h3v17h-3z"/><path d="M604.4 673v3h-17v-3z"/></g><g opacity=".5" fill="#47e6b1"><path d="M26.4 702h3v17h-3z"/><path d="M36.4 709v3h-17v-3z"/></g><g opacity=".5" fill="#47e6b1"><path d="M709.4 396h3v17h-3z"/><path d="M719.4 403v3h-17v-3z"/></g><path fill="#47e6b1" opacity=".5" d="M795.61 123.02l6.44 5.9 9.13-13.42 3.22 2.69-12.35 16.1-9.13-10.2 2.69-1.07z"/></svg> \ No newline at end of file
diff --git a/admin/survey/modules/mod_WPN/frontend/img/share.png b/admin/survey/modules/mod_WPN/frontend/img/share.png
new file mode 100644
index 0000000..74f11bc
--- /dev/null
+++ b/admin/survey/modules/mod_WPN/frontend/img/share.png
Binary files differ
diff --git a/admin/survey/modules/mod_WPN/frontend/img/text.svg b/admin/survey/modules/mod_WPN/frontend/img/text.svg
new file mode 100644
index 0000000..a734814
--- /dev/null
+++ b/admin/survey/modules/mod_WPN/frontend/img/text.svg
@@ -0,0 +1 @@
+<svg data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="722" height="756.57"><defs><linearGradient id="a" x1="635.65" y1="790.5" x2="635.65" y2="501.26" gradientTransform="translate(.01 -.01)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="gray" stop-opacity=".25"/><stop offset=".54" stop-color="gray" stop-opacity=".12"/><stop offset="1" stop-color="gray" stop-opacity=".1"/></linearGradient><linearGradient id="b" x1="457.34" y1="294.83" x2="457.34" y2="145.49" xlink:href="#a"/><linearGradient id="c" x1="591.52" y1="654.18" x2="591.52" y2="72.22" gradientTransform="translate(-238.99 -72.23)" xlink:href="#a"/><linearGradient id="d" x1="771.88" y1="599.91" x2="771.88" y2="322.65" xlink:href="#a"/><linearGradient id="e" x1="683.94" y1="827.36" x2="683.94" y2="758.36" gradientTransform="translate(-238.99 -72.23)" xlink:href="#a"/><linearGradient id="f" x1="432.87" y1="501.19" x2="432.87" y2="377.79" xlink:href="#a"/><linearGradient id="g" x1="428.07" y1="603.48" x2="428.07" y2="493.95" xlink:href="#a"/><linearGradient id="h" x1="352.52" y1="380.93" x2="352.52" y2="201.04" xlink:href="#a"/><linearGradient id="i" x1="442.05" y1="399.65" x2="442.05" y2="262.62" xlink:href="#a"/></defs><circle cx="361" cy="395.57" r="297" fill="none" stroke="#3ad29f" stroke-miterlimit="10" stroke-width="2" stroke-dasharray="12"/><circle cx="361" cy="395.57" r="360" fill="none" stroke="#3ad29f" stroke-miterlimit="10" stroke-width="2" stroke-dasharray="12"/><path d="M840.94 582.47a81.21 81.21 0 0 0-161-15.14l-249.59-6.77 2.74 42.88s-35.59 82.12 151.46 104v83h216.24v-138a81.16 81.16 0 0 0 40.15-69.97z" transform="translate(-239 -72.21)" fill="url(#a)"/><path d="M202.66 533.03s-34.08 78.64 145.05 99.62v79.52H554.8V501.58L200 491.96z" fill="#be7c5e"/><path d="M545.16 277.07a38.18 38.18 0 0 1-52.5 11.93l-111.19-73.27a38.18 38.18 0 0 1-11.93-52.5A38.18 38.18 0 0 1 422 151.3l111.19 73.27a38.18 38.18 0 0 1 11.97 52.5z" transform="translate(-239 -72.21)" fill="url(#b)"/><path d="M300 200.86a35.49 35.49 0 0 1-48.8 11.09l-103.39-68.16a35.49 35.49 0 0 1-11.09-48.8 35.49 35.49 0 0 1 48.8-11.09l103.37 68.12A35.49 35.49 0 0 1 300 200.86z" fill="#be7c5e"/><circle cx="515.49" cy="512.94" r="77.77" fill="#be7c5e"/><rect x="191.32" width="322.42" height="581.96" rx="12.25" ry="12.25" fill="url(#c)"/><rect x="195.67" y="7.87" width="313.7" height="566.24" rx="13.64" ry="13.64" fill="#fff"/><path d="M431.33 22.07a25.43 25.43 0 0 1-25.07 21.63H297.92a25.43 25.43 0 0 1-25.06-21.63h-57.4a11.91 11.91 0 0 0-11.92 11.91v514a11.91 11.91 0 0 0 11.91 11.92h274.14a11.91 11.91 0 0 0 11.92-11.91v-514a11.91 11.91 0 0 0-11.91-11.92z" fill="#6c63ff"/><rect x="318.01" y="28.84" width="69.91" height="4.37" rx="2" ry="2" fill="#dbdbdb"/><circle cx="402.77" cy="30.59" r="2.62" fill="#dbdbdb"/><path d="M804.76 598.87c-22.57 5.22-38.06-9.5-43.28-32.06l-51.86-192.57a42.24 42.24 0 0 1 31.55-50.51 42.24 42.24 0 0 1 50.51 31.55L834 552.82c5.22 22.57-6.68 40.83-29.24 46.05z" transform="translate(-239 -72.21)" fill="url(#d)"/><rect x="739.86" y="329.79" width="70.78" height="282.61" rx="35.39" ry="35.39" transform="rotate(-13.01 339.366 1483.163)" fill="#be7c5e"/><path fill="url(#e)" d="M296.93 686.15h296v69h-296z"/><path fill="#4d8af0" d="M304.93 694.15h280v54h-280z"/><path d="M502 483.65a37.72 37.72 0 0 1-51.87 11.79l-74.57-48.25a37.72 37.72 0 0 1-11.79-51.87 37.72 37.72 0 0 1 51.87-11.79l74.57 48.25A37.72 37.72 0 0 1 502 483.65z" transform="translate(-239 -72.21)" fill="url(#f)"/><path d="M483.28 585.78a38.06 38.06 0 0 1-52.34 11.9L384.75 564a38.06 38.06 0 0 1-11.9-52.34 38.06 38.06 0 0 1 52.34-11.9l46.19 33.69a38.06 38.06 0 0 1 11.9 52.33z" transform="translate(-239 -72.21)" fill="url(#g)"/><circle cx="352.52" cy="290.99" r="89.94" fill="url(#h)" opacity=".5"/><circle cx="352.52" cy="290.99" r="84.65" fill="#69f0ae"/><path fill="#fff" d="M315.78 279.69l31.74 29.1 44.97-66.13 15.88 13.23-60.85 79.36-44.97-50.26 13.23-5.3z"/><path d="M240.55 511.06a35.49 35.49 0 0 1-48.8 11.09l-43.08-31.36a35.49 35.49 0 0 1-11.09-48.8 35.49 35.49 0 0 1 48.8-11.09l43.07 31.42a35.49 35.49 0 0 1 11.1 48.74zm18.35-102.27a35.49 35.49 0 0 1-48.8 11.09l-70.16-45.4a35.49 35.49 0 0 1-11.09-48.8 35.49 35.49 0 0 1 48.8-11.09l70.16 45.4a35.49 35.49 0 0 1 11.09 48.8z" fill="#be7c5e"/><path d="M521.28 382a37.9 37.9 0 0 1-52.11 11.84l-94.5-61.53a37.9 37.9 0 0 1-11.84-52.11 37.9 37.9 0 0 1 52.11-11.84l94.5 61.53A37.9 37.9 0 0 1 521.28 382z" transform="translate(-239 -72.21)" fill="url(#i)"/><path d="M277.26 306.59a35.49 35.49 0 0 1-48.8 11.09l-88.51-57.63a35.49 35.49 0 0 1-11.09-48.8 35.49 35.49 0 0 1 48.8-11.09l88.5 57.63a35.49 35.49 0 0 1 11.1 48.8z" fill="#be7c5e"/></svg> \ No newline at end of file
diff --git a/admin/survey/modules/mod_WPN/frontend/img/twitter.svg b/admin/survey/modules/mod_WPN/frontend/img/twitter.svg
new file mode 100644
index 0000000..0c635e2
--- /dev/null
+++ b/admin/survey/modules/mod_WPN/frontend/img/twitter.svg
@@ -0,0 +1 @@
+<svg width="20" height="16" xmlns="http://www.w3.org/2000/svg"><path d="M17.316 4.246c.008.162.011.326.011.488 0 4.99-3.797 10.742-10.74 10.742-2.133 0-4.116-.625-5.787-1.697a7.577 7.577 0 0 0 5.588-1.562 3.779 3.779 0 0 1-3.526-2.621 3.858 3.858 0 0 0 1.705-.065 3.779 3.779 0 0 1-3.028-3.703v-.047a3.766 3.766 0 0 0 1.71.473 3.775 3.775 0 0 1-1.168-5.041 10.716 10.716 0 0 0 7.781 3.945 3.813 3.813 0 0 1-.097-.861A3.773 3.773 0 0 1 13.539.524a3.77 3.77 0 0 1 2.756 1.191 7.602 7.602 0 0 0 2.397-.916 3.789 3.789 0 0 1-1.66 2.088 7.55 7.55 0 0 0 2.168-.594 7.623 7.623 0 0 1-1.884 1.953z" fill="#262B3A"/></svg> \ No newline at end of file
diff --git a/admin/survey/modules/mod_WPN/frontend/img/vault.svg b/admin/survey/modules/mod_WPN/frontend/img/vault.svg
new file mode 100644
index 0000000..d22f72d
--- /dev/null
+++ b/admin/survey/modules/mod_WPN/frontend/img/vault.svg
@@ -0,0 +1 @@
+<svg data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="678.3" height="733"><defs><linearGradient id="a" x1="585.48" y1="733" x2="585.48" y2="673.63" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="gray" stop-opacity=".25"/><stop offset=".54" stop-color="gray" stop-opacity=".12"/><stop offset="1" stop-color="gray" stop-opacity=".1"/></linearGradient><linearGradient id="b" x1="93.98" x2="93.98" y2="673.63" xlink:href="#a"/><linearGradient id="c" x1="339.15" y1="681.8" x2="339.15" xlink:href="#a"/><linearGradient id="d" x1="339.15" y1="569.14" x2="339.15" y2="111.49" xlink:href="#a"/><linearGradient id="e" x1="806.95" y1="427.79" x2="806.95" y2="354.24" gradientTransform="translate(-.46 -24.57)" xlink:href="#a"/><linearGradient id="f" x1="780.89" y1="503.2" x2="780.89" y2="429.65" gradientTransform="rotate(90 788.23 481.69)" xlink:href="#a"/><linearGradient id="g" x1="565.48" y1="376.26" x2="565.48" y2="302.71" xlink:href="#a"/><linearGradient id="h" x1="339.15" y1="423.21" x2="339.15" y2="255.09" xlink:href="#a"/><linearGradient id="i" x1="290.11" y1="525.36" x2="290.11" y2="499.67" xlink:href="#a"/><linearGradient id="j" x1="322.8" y1="525.36" x2="322.8" y2="499.67" xlink:href="#a"/><linearGradient id="k" x1="355.49" y1="525.36" x2="355.49" y2="499.67" xlink:href="#a"/><linearGradient id="l" x1="388.18" y1="525.36" x2="388.18" y2="499.67" xlink:href="#a"/><linearGradient id="m" x1="339.15" y1="389.93" x2="339.15" y2="288.36" xlink:href="#a"/><linearGradient id="n" x1="377.6" y1="380.54" x2="377.6" y2="283.64" xlink:href="#a"/><linearGradient id="o" x1="377.6" y1="563.83" x2="377.6" y2="466.93" xlink:href="#a"/></defs><path fill="url(#a)" d="M560.38 673.63h50.2V733h-50.2z"/><path fill="#f5f5f5" d="M609.42 730.83h-47.87v-57.21h47.87z"/><path fill="url(#b)" d="M68.88 673.63h50.2V733h-50.2z"/><path fill="#f5f5f5" d="M70.05 673.63h47.87v57.21H70.05z"/><rect width="678.3" height="681.8" rx="14.86" ry="14.86" fill="url(#c)"/><rect x="4.67" y="3.5" width="670.12" height="670.12" rx="14.86" ry="14.86" fill="#fafafa"/><path fill="url(#d)" d="M112.66 111.49h452.98v457.65H112.66z"/><path transform="rotate(-14.86 353.904 1324.53)" fill="url(#e)" d="M731.19 329.67h150.6v73.55h-150.6z"/><path fill="#fff" d="M464.853 267.018l143.312-38.025 18.265 68.838-143.312 38.025z"/><path fill="#69f0ae" d="M470.158 268.021l133.916-35.532 17.068 64.324-133.917 35.532z"/><ellipse cx="805.77" cy="366.03" rx="25.68" ry="14.01" transform="rotate(-14.86 353.216 1324.127)" fill="#fff"/><path transform="rotate(-71.04 614.22 615.064)" fill="url(#f)" d="M766.71 399.05h73.55v150.6h-73.55z"/><path fill="#fff" d="M484.09 332.578l140.225 48.174-23.14 67.356-140.225-48.174z"/><path fill="#69f0ae" d="M487.935 336.373l131.033 45.016-21.623 62.94-131.033-45.016z"/><ellipse cx="803.13" cy="473.61" rx="14.01" ry="25.68" transform="rotate(-71.04 613.86 614.322)" fill="#fff"/><path fill="url(#g)" d="M490.18 302.71h150.6v73.55h-150.6z"/><path fill="#fff" d="M491.35 303.88h148.27v71.22H491.35z"/><path fill="#69f0ae" d="M496.21 306.21h138.55v66.55H496.21z"/><ellipse cx="564.9" cy="338.9" rx="25.68" ry="14.01" fill="#fff"/><path fill="#fff" d="M116.16 116.16h445.97v445.97H116.16z"/><circle cx="339.15" cy="339.15" r="84.06" fill="url(#h)"/><circle cx="339.15" cy="339.15" r="80.56" fill="#fafafa"/><path fill="url(#i)" d="M277.86 499.67h24.52v25.68h-24.52z"/><path fill="url(#j)" d="M310.55 499.67h24.52v25.68h-24.52z"/><path fill="url(#k)" d="M343.23 499.67h24.52v25.68h-24.52z"/><path fill="url(#l)" d="M375.92 499.67h24.52v25.68h-24.52z"/><path fill="#294ace" d="M278.44 500.84h23.35v23.35h-23.35z"/><path fill="#294ace" opacity=".7" d="M311.13 500.84h23.35v23.35h-23.35z"/><path fill="#294ace" opacity=".5" d="M343.82 500.84h23.35v23.35h-23.35z"/><path fill="#294ace" opacity=".3" d="M376.51 500.84h23.35v23.35h-23.35z"/><path fill="#294ace" d="M372.871 287.937l3.826 2.678L367.325 304l-3.826-2.678zm17.492 84.929l-2.679 3.826-13.385-9.373 2.68-3.825zm-84.939 17.492l-3.825-2.678 9.372-13.385 3.825 2.678zm-17.483-84.929l2.679-3.825 13.385 9.372-2.679 3.825z"/><path opacity=".2" d="M372.829 287.799l3.825 2.679-9.372 13.385-3.825-2.68zm17.496 84.933l-2.679 3.825-13.385-9.372 2.679-3.825zm-84.933 17.486l-3.825-2.679 9.372-13.385 3.826 2.679zm-17.488-84.927l2.678-3.825 13.385 9.372-2.678 3.826z"/><circle cx="339.15" cy="339.15" r="50.78" fill="url(#m)"/><circle cx="339.15" cy="339.15" r="47.87" fill="#294ace"/><path d="M300.04 345.57A47.86 47.86 0 0 1 371.71 304a47.86 47.86 0 1 0-57 76 47.71 47.71 0 0 1-14.67-34.43z" fill="#fff" opacity=".2"/><path d="M396.28 380.54h-37.36v-93.28a3.63 3.63 0 0 1 3.63-3.62h30.11a3.63 3.63 0 0 1 3.63 3.63z" transform="translate(-260.85 -84)" fill="url(#n)"/><path d="M392.47 563.83h-29.74a3.81 3.81 0 0 1-3.81-3.81v-93.09h37.36V560a3.81 3.81 0 0 1-3.81 3.83z" transform="translate(-260.85 -84)" fill="url(#o)"/><path d="M102.4 200.8h28.69a3.17 3.17 0 0 1 3.17 3.17v90.23h-35V204a3.17 3.17 0 0 1 3.14-3.2zm-3.17 183.3h35v92.33a1.06 1.06 0 0 1-1.06 1.06H100.3a1.06 1.06 0 0 1-1.06-1.06V384.1h-.01z" fill="#fafafa"/></svg> \ No newline at end of file
diff --git a/admin/survey/modules/mod_WPN/frontend/img/youtube.svg b/admin/survey/modules/mod_WPN/frontend/img/youtube.svg
new file mode 100644
index 0000000..483d27d
--- /dev/null
+++ b/admin/survey/modules/mod_WPN/frontend/img/youtube.svg
@@ -0,0 +1 @@
+<svg width="20" height="16" xmlns="http://www.w3.org/2000/svg"><path d="M10 .3C.172.3 0 1.174 0 8c0 6.826.172 7.7 10 7.7s10-.874 10-7.7c0-6.826-.172-7.7-10-7.7zm3.205 8.034l-4.49 2.096c-.393.182-.715-.022-.715-.456V6.026c0-.433.322-.638.715-.456l4.49 2.096c.393.184.393.484 0 .668z" fill="#262B3A"/></svg> \ No newline at end of file
diff --git a/admin/survey/modules/mod_WPN/frontend/index.html b/admin/survey/modules/mod_WPN/frontend/index.html
new file mode 100644
index 0000000..1b5c4a9
--- /dev/null
+++ b/admin/survey/modules/mod_WPN/frontend/index.html
@@ -0,0 +1,196 @@
+<!doctype html>
+<html lang="en-us">
+
+ <head>
+
+ <!-- Meta -->
+ <meta charset="utf-8">
+ <meta http-equiv="x-ua-compatible" content="ie=edge">
+ <meta name="viewport" content="width=device-width,initial-scale=1">
+
+ <title>1KA WPN</title>
+ <meta name="description" content="">
+
+ <!-- The compiled CSS file -->
+ <link rel="stylesheet" href="admin/survey/modules/mod_WPN/frontend/css/production.css">
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
+
+ <!-- Web fonts -->
+ <link href="https://fonts.googleapis.com/css?family=Montserrat:400,400i,700|Source+Serif+Pro:700" rel="stylesheet">
+
+ <!-- favicon.ico. Place these in the root directory. -->
+ <link rel="shortcut icon" href="favicon.ico">
+
+ <link rel="apple-touch-icon" sizes="180x180" href="apple-touch-icon.png">
+ <link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png">
+ <link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png">
+ <link rel="manifest" href="manifest.json">
+ <link rel="mask-icon" href="safari-pinned-tab.svg" color="#ffffff">
+ <meta name="msapplication-TileColor" content="#da532c">
+ <meta name="theme-color" content="#ffffff">
+ <meta name="apple-moblile-web-app-capable" content="yes">
+ <meta name="apple-moblile-web-app-status-bar-style" content="default">
+ <link rel="apple-touch-startup-image" href="apple-touch-icon.png">
+ <!-- iOS Splash Screen Images -->
+ <link rel="apple-touch-startup-image" href="apple-splash-640.png" media="(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)">
+ <link rel="apple-touch-startup-image" href="apple-splash-750.png" media="(device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)">
+ <link rel="apple-touch-startup-image" href="apple-splash-1242.png" media="(device-width: 414px) and (device-height: 736px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)">
+ <link rel="apple-touch-startup-image" href="apple-splash-1125.png" media="(device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)">
+ <link rel="apple-touch-startup-image" href="apple-splash-1536.png" media="(min-device-width: 768px) and (max-device-width: 1024px) and (-webkit-min-device-pixel-ratio: 2) and (orientation: portrait)">
+ <link rel="apple-touch-startup-image" href="apple-splash-1668.png" media="(min-device-width: 834px) and (max-device-width: 834px) and (-webkit-min-device-pixel-ratio: 2) and (orientation: portrait)">
+ <link rel="apple-touch-startup-image" href="apple-splash-2048.png" media="(min-device-width: 1024px) and (max-device-width: 1024px) and (-webkit-min-device-pixel-ratio: 2) and (orientation: portrait)">
+
+ </head>
+
+ <body>
+
+
+ <!-- Header -->
+ <header class="align--center pt3">
+ <div class="container--lg border--bottom pb3">
+ <img class="logo mb3" src="admin/survey/modules/mod_WPN/frontend/img/1ka_logo_en.png" alt="1KA">
+ <div id="notif_join_div" style="display: none;">
+ <button class="mb2 btn btn--secondary" id="notif_join_button" onclick="clickButtonSubscribe();" style="font-size: 1.5em;">Join us!</button>
+ <br><br>
+ <div id="notification_permission_warning" style="display: none;">
+ <h3 class="mb2" style="color:red">In order to use our services, you have to enable notifications</h3>
+ <br><br>
+ </div>
+ <h1 class="mb2">Be first to know when new surveys are up!</h1>
+ </div>
+ <div id="notif_joined_div" style="display: none;">
+ <h1 class="mb2">You are in!</h1>
+ <p class="mb2">You will be among first who will get notifications when new surveys are up!</p>
+ </div>
+ <div id="notif_not_supported_div" style="display: none;">
+ <h1 class="mb2">This browser does not support our services!</h1>
+ <p class="mb2">Please update your browser or use another (latest versions of Chrome and Firefox are recommended)</p>
+ </div>
+ <!--<span>
+ <a href="https://www.apple.com/ios/app-store/" class="link"><img class="download" src="/pwa/img/ios.png" alt="Download on the App Store"></a>
+ </span>
+ <span>
+ <a href="https://play.google.com/store" class="link"><img class="download" src="/pwa/img/googleplay.png" alt="Download on Google Play"></a>
+ </span>-->
+ </div>
+ </header>
+
+ <main>
+ <!-- Feature list -->
+ <div class="container pt3 mt2 text--gray align--center">
+ <p class="mb3">Efficient data gathering.</p>
+ <div class="grid-row">
+ <div class="grid-column span-one-third mb3">
+ <img class="illustration--small mb1" src="admin/survey/modules/mod_WPN/frontend/img/messaging.svg" alt="Fast messaging">
+ <p>Fast messaging</p>
+ </div>
+ <div class="grid-column span-one-third mb3">
+ <img class="illustration--small mb1" src="admin/survey/modules/mod_WPN/frontend/img/assign.svg" alt="Assign to others">
+ <p>Assign to others</p>
+ </div>
+ <div class="grid-column span-one-third mb3">
+ <img class="illustration--small mb1" src="admin/survey/modules/mod_WPN/frontend/img/connected.svg" alt="Stay connected">
+ <p>Stay connected</p>
+ </div>
+ <!-- <div class="grid-column span-one-third mb3">
+ <img class="illustration--small mb1" src="img/search.svg" alt="Powerful search">
+ <p>Powerful search</p>
+ </div>
+ <div class="grid-column span-one-third mb3">
+ <img class="illustration--small mb1" src="img/vault.svg" alt="Put in a vault">
+ <p>Put in a vault</p>
+ </div>-->
+ <!-- <div class="grid-column span-one-third mb3">
+ <img class="illustration--small mb1" src="img/mail.svg" alt="Share with others">
+ <p>Share with others</p>
+ </div>-->
+ </div>
+ </div>
+
+ <!-- Focus -->
+ <div class="container--lg pt1 pb1">
+
+ <div class="grid-row grid-row--center">
+ <div class="grid-column mt3 mb2 order-2">
+ <div class="border--bottom pb2 mb2">
+ <h2>Usage data</h2>
+ <p>Quis istud possit, inquit, negare? Videamus animi partes, quarum est conspectus illustrior; Illa sunt similia: hebes acies est cuipiam oculorum, corpore alius senescit; Non enim, si omnia non&nbsp;sequebatur.</p>
+ </div>
+ <p class="italic text--gray mb1">Quae quo sunt excelsiores, eo dant clariora indicia naturae. Causa autem fuit huc veniendi ut quosdam&nbsp;hinc.</p>
+ <p class="bold">Carry Andersen, COO at&nbsp;Stripe</p>
+ </div>
+ <div class="grid-column span-1"></div>
+ <div class="grid-column mt3 mb2 order-1">
+ <img src="admin/survey/modules/mod_WPN/frontend/img/data.svg" alt="Usage data">
+ </div>
+ </div>
+
+ <div class="grid-row grid-row--center">
+ <div class="grid-column mt3 mb2">
+ <img src="admin/survey/modules/mod_WPN/frontend/img/security.svg" alt="Absolute security">
+ </div>
+ <div class="grid-column span-1"></div>
+ <div class="grid-column mt3 mb2">
+ <div class="border--bottom pb2 mb2">
+ <h2>Absolute security</h2>
+ <p>Itaque his sapiens semper vacabit. Qualis ista philosophia est, quae non interitum afferat pravitatis, sed sit contenta mediocritate vitiorum? Quid de Platone aut de Democrito loquar? Quis istud possit, inquit&nbsp;negare?</p>
+ </div>
+ <p class="italic text--gray mb1">Estne, quaeso, inquam, sitienti in bibendo voluptas? Duo Reges: constructio&nbsp;interrete.</p>
+ <p class="bold">Josh Blenton, Product Manager at&nbsp;Blinkist</p>
+ </div>
+ </div>
+
+ </div>
+
+ <!-- Mentioned -->
+ <!--<div class="container--lg pt3 pb3 mb2 align--center">
+ <p class="mb2">Mentioned in</p>
+ <span><img class="mentioned" src="img/mentioned.svg" alt="New York Times, TC, Product Hunt, Recode"></span>
+ </div>-->
+
+ <!-- CTA -->
+ <!--<div class="bg--dark-gray align--center pt3 pb3">
+ <div class="container pt2 pb2">
+ <img class="cta-image mb2" src="img/text.svg" alt="Text the app">
+ <p class="h3 text--white mb1 bold">We'll text you the&nbsp;app</p>
+ <p class="text--white mb3">Just insert your number below. Messaging rates&nbsp;apply.</p>
+ <div class="inline-block mr1 no-mr-on-mobile" style="width:280px;max-width:100%">
+ <input class="form-control" type="tel" placeholder="Phone number">
+ </div>
+ <button class="btn btn--secondary">Send</button>
+ </div>
+ </div>-->
+
+ </main>
+
+ <!-- Footer -->
+ <footer class="pt1 pb3 align--center-on-mobile">
+ <!--<div class="container">
+ <div class="grid-row">
+ <div class="grid-column mt2 span-half">
+ <div class="mb1">
+ <span>
+ <a href="https://www.apple.com/ios/app-store/" class="link"><img class="download" src="img/ios.png" alt="Download on the App Store"></a>
+ </span>
+ <span>
+ <a href="https://play.google.com/store" class="link"><img class="download" src="img/googleplay.png" alt="Download on Google Play"></a>
+ </span>
+ </div>
+ <p class="small">Design by <a href="https://www.eatapapaya.com" class="link link--text">Papaya</a>. Illustrations from&nbsp;<a href="https://undraw.co/" class="link link--text">Undraw</a>.</p>
+ </div>
+ <div class="grid-column mt2 span-half align--right align--center-on-mobile">
+ <ul class="no-bullets list--inline">
+ <li class="mr1"><a href="" class="link"><img class="icon" src="img/youtube.svg" alt="YouTube"></a></li>
+ <li class="mr1"><a href="" class="link"><img class="icon" src="img/twitter.svg" alt="Twitter"></a></li>
+ <li><a href="" class="link"><img class="icon" src="img/facebook.svg" alt="Facebook"></a></li>
+ </ul>
+ </div>
+ </div>
+ </div>-->
+ </footer>
+
+ <script src="admin/survey/modules/mod_WPN/frontend/js/main.js"></script>
+ </body>
+</html>
+
diff --git a/admin/survey/modules/mod_WPN/frontend/index1.html b/admin/survey/modules/mod_WPN/frontend/index1.html
new file mode 100644
index 0000000..eca291f
--- /dev/null
+++ b/admin/survey/modules/mod_WPN/frontend/index1.html
@@ -0,0 +1,360 @@
+<!doctype html>
+<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang=""> <![endif]-->
+<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang=""> <![endif]-->
+<!--[if IE 8]> <html class="no-js lt-ie9" lang=""> <![endif]-->
+<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
+ <head>
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+ <title>NCC Computer Science</title>
+ <meta name="description" content="NCC Computer Science Progressive Web App">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+
+ <link rel="stylesheet" href="css/normalize.min.css">
+ <link rel="stylesheet" href="css/main.css">
+ <script src="js/main.js"></script>
+
+ <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
+ <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
+ <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
+ <link rel="manifest" href="/manifest.json">
+ <link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">
+ <meta name="msapplication-TileColor" content="#da532c">
+ <meta name="theme-color" content="#ffffff">
+ <meta name="apple-moblile-web-app-capable" content="yes">
+ <meta name="apple-moblile-web-app-status-bar-style" content="default">
+ <link rel="apple-touch-startup-image" href="/apple-touch-icon.png">
+ <!-- iOS Splash Screen Images -->
+ <link rel="apple-touch-startup-image" href="apple-splash-640.png" media="(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)">
+ <link rel="apple-touch-startup-image" href="apple-splash-750.png" media="(device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)">
+ <link rel="apple-touch-startup-image" href="apple-splash-1242.png" media="(device-width: 414px) and (device-height: 736px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)">
+ <link rel="apple-touch-startup-image" href="apple-splash-1125.png" media="(device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)">
+ <link rel="apple-touch-startup-image" href="apple-splash-1536.png" media="(min-device-width: 768px) and (max-device-width: 1024px) and (-webkit-min-device-pixel-ratio: 2) and (orientation: portrait)">
+ <link rel="apple-touch-startup-image" href="apple-splash-1668.png" media="(min-device-width: 834px) and (max-device-width: 834px) and (-webkit-min-device-pixel-ratio: 2) and (orientation: portrait)">
+ <link rel="apple-touch-startup-image" href="apple-splash-2048.png" media="(min-device-width: 1024px) and (max-device-width: 1024px) and (-webkit-min-device-pixel-ratio: 2) and (orientation: portrait)">
+
+ </head>
+ <body>
+ <!--[if lt IE 8]>
+ <p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
+ <![endif]-->
+ <div class="header-container">
+ <header class="wrapper clearfix">
+ <span id="trigger" onClick="toggleNav()">
+ <span class="triggerLine"></span>
+ <span class="triggerLine"></span>
+ <span class="triggerLine"></span>
+ </span>
+ <h1 class="title">Computer Science</h1>
+ <nav>
+ <ul>
+ <li><a href="#faculty" onclick="toggleNav()">Faculty</a></li>
+ <li><a href="#programs" onclick="toggleNav()">Programs</a></li>
+ <li><a href="#courses" onclick="toggleNav()">Courses</a></li>
+ </ul>
+ </nav>
+ </header>
+ </div>
+
+ <div class="main-container">
+ <div class="main wrapper clearfix">
+ <section id="addToHomeScreen">
+ <h1>Install App</h1>
+ <img src="/pwa/android-chrome-192x192.png" alt="NCC CS" />
+ Add our app to your home screen?<br />
+ <a href="javascript:void(0)" onClick="hidePrompt()" style="text-decoration:none;">No, Thanks</a>
+ <button onClick="installApp()">Yes, Please!</button>
+ </section>
+ <article id="top">
+ <header>
+ <h1>Welcome!</h1>
+ <p class="subtitle">
+ You've come to the right place!
+ </p>
+ <p>
+ It’s an exciting – and lucrative – time to be a
+ Computer Science major. At NCC, you’ll be grounded
+ in Computer Science fundamentals and exposed to
+ today’s employable technologies. Want to build
+ Mobile Apps? Want to create state of the art web
+ pages? Want to learn advanced topics? No worries
+ – we’ve got you covered.
+ </p>
+ <p>
+ Whether you are a transfer student looking to start
+ an advanced degree or a programmer learning a new
+ language or just looking to add skills to your tool
+ set, NCC’s Computer Science Department has Courses
+ and Programs to meet your needs.
+ </p>
+
+ </header>
+ <section id="faculty">
+ <h2>Faculty</h2>
+ <p>
+ NCC's Computer Science faculty possess an abundance
+ of real world experience coupled with twenty-first century
+ teaching abilities. The result is classes that ground
+ students in theory while teaching them how to implement
+ the technologies needed to thrive in today's economy.
+ </p>
+ <div class="facultyContainer">
+ <h4>
+ Professor Tom Duffy, Department Chair
+ </h4>
+ <div class="facultyImage">
+ <p>
+ <img class="responsiveImg" src="img/duffy.jpg" alt="Tom Duffy" />
+ </p>
+ <p>
+ <a href="tel:2038576892">(203) 857-6892</a>
+ </p>
+ <p>
+ <a href="mailto:tduffy@norwalk.edu">tduffy@norwalk.edu</a>
+ </p>
+ </div>
+ <p>
+
+ Professor Tom Duffy is the Chair of the Computer
+ Science Department and the Program Coordinator
+ for the Computer Science degree as well as the Web
+ Developer, Relational Database, and Smartphone App
+ Development certificates. He teaches courses in Web
+ Development, XML, Java, and Mobile Device Programming.
+ </p>
+ <p>
+ Tom holds a Bachelor of Science degree in Mathematics
+ and Master of Arts degree in Mathematics/Computer Science
+ from Western Connecticut State University. He is the
+ owner of Bright Moments Software – a software company
+ specializing in Web Technologies.
+ </p>
+ <p>
+ Tom has recently published <a href="http://www.bright-moments.com/pmd" target="_blank" rel="noopener">Programming With Mobile Applications</a>, his second book. The book is available from Cengage Learning.
+ </p>
+ <p>
+ <a href="#top">Back To Top</a>
+ </p>
+
+ </div>
+ <div class="facultyContainer">
+ <h4>
+ Professor Patrick Cassidy
+ </h4>
+ <div class="facultyImage">
+ <p>
+ <img class="responsiveImg" src="img/cassidy.jpg" alt="Patrick Cassidy" />
+ </p>
+ <p>
+ <a href="tel:2038577336">(203) 857-7336</a>
+ </p>
+ <p>
+ <a href="mailto:pcassidy@norwalk.edu">pcassidy@norwalk.edu</a>
+ </p>
+ </div>
+ <p>
+ Professor Cassidy is the Coordinator for the Computer
+ Security degree and Networking Certificate programs.
+ He is also the Main Contact for NCC’s Cisco Academy.
+ </p>
+ <p>
+ Before coming to NCC, Prof. Cassidy was a Project
+ Associate for the University of Michigan working out
+ of the General Motors Plant in Tarrytown, NY. He has
+ also taught at Westchester Community College in both
+ the Mathematics and Computer Science departments.
+ </p>
+ <p>
+ He holds a M.S. in Computer Science from Polytechnic
+ University, a B.S. in Aeronautical Science from
+ Embry Riddle Aeronautical University, and an A.S.
+ in Mathematics and Science from Westchester Community
+ College. Prof. Cassidy is a Cisco Certified Network
+ Associate (CCNA) and Cisco Certified Academy Instructor
+ (CCAI). He also holds multiple ratings from the
+ FAA as well as being a Certified Flight
+ Instructor – Instrument (CFII).
+ </p>
+ <p>
+ <a href="#top">Back To Top</a>
+ </p>
+ </div>
+ <div class="facultyContainer">
+ <h4>
+ Professor Kerry Cramer
+ </h4>
+ <div class="facultyImage">
+ <p>
+ <img class="responsiveImg" src="img/cramer.jpg" alt="Kerry Cramer" />
+ </p>
+ <p>
+ <a href="tel:2038573332">(203) 857-3332</a>
+ </p>
+ <p>
+ <a href="mailto:kcramer@norwalk.edu">kcramer@norwalk.edu</a>
+ </p>
+ </div>
+ <p>
+ Professor Kerry V. Cramer is an information technology
+ professional with 30 years experience in computer
+ programming, information technologies, and IT project
+ management. Mr. Cramer has been an adjunct professor at
+ Manhattanville College, and University of New Haven
+ teaching several courses in the Computer Science
+ curriculum as well as substitute teaching K-12 at
+ schools in the Danbury, CT area.
+ </p>
+ <p>Professor Cramer’s strengths
+ include strong project management disciplines,
+ technical, supervisory and team management skills in
+ Internet, Lotus Notes, and legacy application development
+ and maintenance environments as well as extensive college
+ and professional recruiting experience.
+ </p>
+ <p>
+ <a href="#top">Back To Top</a>
+ </p>
+ </div>
+ <div class="facultyContainer">
+ <h4>
+ Professor Charles Gabor
+ </h4>
+ <div class="facultyImage">
+ <p>
+ <img class="responsiveImg" src="img/gabor.jpg" alt="Charles Gabor" />
+ </p>
+ <p>
+ <a href="tel:2038577315">(203) 857-7315</a>
+ </p>
+ <p>
+ <a href="mailto:cgabor@norwalk.edu">cgabor@norwalk.edu</a>
+ </p>
+ </div>
+ <p>
+ Professor Gabor teaches Database Development and Java courses.
+ Before joining the NCC faculty he was a Lieutenant/Senior
+ Military Instructor at the United States Naval Academy.
+ Prior to that he was a Software Engineer at Pitney Bowes Inc.
+ </p>
+ <p>
+ Professor Gabor holds a graduate certificate in Computer
+ Science from Purdue University, a M.S. degree from
+ the University of New Haven and a B.S degree in
+ Applied Science from Charter Oak State College.
+ He is a member of the Honor Society in Computer Science,
+ Upsilon Pi Epsilon and a retired Commander in the U.S. Navy.
+ </p>
+ <p>
+ <a href="#top">Back To Top</a>
+ </p>
+ </div>
+
+ </section>
+ <section id="programs">
+ <h2>Programs</h2>
+ <p>
+ Our programs serve both traditional first-time students
+ as well as professionals currently working in the field.
+ The curriculum is flexible enough to meet the needs of
+ students who wish to transfer to a baccalaureate
+ institution and students preparing for immediate
+ entry into the workplace.
+ </p>
+ <p class="subtitle">
+ Degree Programs
+ </p>
+ <p>
+ <a href="https://norwalk.edu/academics/cs/computer-science-program-a-s/" target="_blank" rel="noopener">AS Computer Science</a>
+ </p>
+ <p>
+ <a href="https://norwalk.edu/academics/cs/computer-security-program-a-s/" target="_blank" rel="noopener">AS Computer Security</a>
+ </p>
+ <p class="subtitle">
+ Certificate Programs
+ </p>
+ <p>
+ <a href="https://norwalk.edu/academics/cs/relational-database-development-certificate-program/" target="_blank" rel="noopener">Relational Database Development</a>
+ </p>
+ <p>
+ <a href="https://norwalk.edu/academics/cs/smartphone-app-development-certificate-program/" target="_blank" rel="noopener">Smartphone App Development</a>
+ </p>
+ <p>
+ <a href="https://norwalk.edu/academics/cs/web-developer-certificate-program/" target="_blank" rel="noopener">Web Developer</a>
+ </p>
+ <p>
+ <a href="#top">Back To Top</a>
+ </p>
+ </section>
+ <section id="courses">
+ <h2>Courses</h2>
+ <p>
+ Computer Science courses at NCC not only prepare students to
+ transfer into a baccalaureate institution. They also serve
+ those students who wish to enter the workforce directly.
+ All our courses expose students to the course's underlying CS
+ theory as well as teach students how to implement those
+ theories. The result is students who are prepared for
+ whatever they choose to do next.
+ </p>
+ <p>
+ <a href="http://catalog.norwalk.edu/content.php?filter%5B27%5D=CSC&filter%5B29%5D=&filter%5Bcourse_type%5D=-1&filter%5Bkeyword%5D=&filter%5B32%5D=1&filter%5Bcpage%5D=1&cur_cat_oid=3&expand=&navoid=136&search_database=Filter#acalog_template_course_filter" target="_blank" rel="noopener">Computer Science (CSC)</a>
+ </p>
+ <p>
+ <a href="http://catalog.norwalk.edu/content.php?filter%5B27%5D=CST&filter%5B29%5D=&filter%5Bcourse_type%5D=-1&filter%5Bkeyword%5D=&filter%5B32%5D=1&filter%5Bcpage%5D=1&cur_cat_oid=3&expand=&navoid=136&search_database=Filter#acalog_template_course_filter" target="_blank" rel="noopener">Computer Technology (CST)</a>
+ </p>
+ <p>
+ <a href="http://catalog.norwalk.edu/content.php?filter%5B27%5D=CSA&filter%5B29%5D=&filter%5Bcourse_type%5D=-1&filter%5Bkeyword%5D=&filter%5B32%5D=1&filter%5Bcpage%5D=1&cur_cat_oid=3&expand=&navoid=136&search_database=Filter#acalog_template_course_filter" target="_blank" rel="noopener">Computer Applications (CSA)</a>
+ </p>
+ <p>
+ <a href="#top">Back To Top</a>
+ </p>
+ </section>
+ </article>
+
+ <aside id="info">
+ <h3>&lt;metadata></h3>
+ <h4>
+ &nbsp;&nbsp;<a href="https://insights.stackoverflow.com/survey/2018/#technology" target="_blank" rel="noopener">Most popular lang</a>
+ </h4>
+ <h4>
+ &nbsp;&nbsp;<a href="https://www.indeed.com/jobtrends/techsoftware-category-trends" target="_blank" rel="noopener">Job Trends</a>
+ </h4>
+ <h4>
+ &nbsp;&nbsp;<a href="https://www.naceweb.org/job-market/compensation/the-top-paid-majors-for-the-class-of-2018/" target="_blank" rel="noopener">Top Paid Majors</a>
+ </h4>
+ <h4>
+ &nbsp;&nbsp;<a href="https://youtu.be/nKIu9yen5nc" target="_blank" rel="noopener">Get Coding!</a>
+ </h4>
+ <h3>&lt;/metadata></h3>
+ </aside>
+
+ </div>
+ </div>
+
+ <div class="footer-container">
+ <footer class="wrapper">
+ <p class="footerLinks">
+ <a href="#top">Top</a><br/>
+ <a href="#faculty">Faculty</a><br/>
+ <a href="#programs">Programs</a><br/>
+ <a href="#courses">Courses</a>
+ </p>
+ <p>
+ &copy; 2017 Norwalk Community College <br/>188 Richards Avenue <br/>Norwalk, CT 06854 <br/>203-857-7000
+ </p>
+ </footer>
+ </div>
+ <div id="instructions">
+ <button onClick="hideInstructions()">X</button>
+ <p>
+ <img src="apple-touch-icon.png" alt="icon" />
+ </p>
+ <p>
+ Install our app on your Home Screen for Quick Access
+ </p>
+ <p>
+ Tap <img src="img/share.png" alt="share" /> then <img src="img/aths.png" alt="Add To Home Screen" />
+ </p>
+ </div>
+ </body>
+</html>
diff --git a/admin/survey/modules/mod_WPN/frontend/js/main.js b/admin/survey/modules/mod_WPN/frontend/js/main.js
new file mode 100644
index 0000000..aa9ff02
--- /dev/null
+++ b/admin/survey/modules/mod_WPN/frontend/js/main.js
@@ -0,0 +1,169 @@
+window.onhashchange = function(){
+ //Header is fixed, need to slide down some to see sectionHead
+ setTimeout('scrollBy(0,-110)',10);
+};
+var hidden = true;
+function toggleNav(){
+ if(hidden){
+ document.getElementsByTagName('nav')[0].style.display = 'block';
+ }else{
+ document.getElementsByTagName('nav')[0].style.display = 'none';
+ }
+ hidden = !hidden;
+}
+var pwaSupport = false;
+
+if('serviceWorker' in navigator){
+ pwaSupport = true;
+ //register the service worker
+ navigator.serviceWorker.register('sw.js').then(function(result){
+ console.log('Service Worker Registered');
+ console.log('Scope: ' + result.scope);
+ console.log('calling');
+ subscribeDivControl();
+
+ /*
+ if('Notification' in window){
+ console.log('Notifications Supported');
+ Notification.requestPermission(function(status){
+ console.log('Notification Status: ', status);
+ });
+ var options = {
+ body: 'See What\'s New',
+ icon: 'android-chrome-192x192.png',
+ data: {
+ timestamp: Date.now(),
+ loc: 'index.html#info'
+ },
+ actions: [
+ {action: 'go', title: 'Go Now'}
+ ]
+ };
+ notify('NCC Computer Science', options);
+ }
+ */
+ }, function(error){
+ console.log('Service Worker Regiatration Failed: '+ error);
+ });
+}else{
+ document.getElementById('notif_not_supported_div').style.display='block';
+ console.log('Service Workers Not Supported');
+}
+
+function notify(title, options){
+ if(Notification.permission === 'granted'){
+ navigator.serviceWorker.ready.then(function(reg){
+ reg.showNotification(title, options);
+ });
+ }
+}
+
+var installEvt;
+window.addEventListener('beforeinstallprompt', function(evt){
+ console.log('Before Install Prompt');
+ installEvt = evt;
+ evt.preventDefault();
+ //document.getElementById('addToHomeScreen').style.display = 'block';
+});
+
+function hidePrompt(){
+ //document.getElementById('addToHomeScreen').style.display = 'none';
+}
+
+function installApp(){
+ hidePrompt();
+ installEvt.prompt();
+ installEvt.userChoice.then(function(result){
+ if(result.outcome === 'accepted')
+ console.log('App Installed');
+ else
+ console.log('App Not Installed');
+ });
+}
+
+window.addEventListener('appinstalled', function(evt){
+ console.log('App Installed Event');
+});
+
+window.onload = function(){
+ if(pwaSupport){
+ var p = navigator.platform;
+ if(p === 'iPhone' || p === 'iPad' || p === 'iPod'){
+ if(!navigator.standalone){
+ var lastShown = parseInt(localStorage.getItem('lastShown'));
+ var now = new Date().getTime();
+ if(isNaN(lastShown) || (lastShown + 1000*60*60*24*7) <= now){
+ document.getElementById('instructions').style.display = 'block';
+ localStorage.setItem('lastShown', now);
+ }
+ }
+ }
+ }
+};
+
+function hideInstructions(){
+ document.getElementById('instructions').style.display = 'none';
+}
+
+function clickButtonSubscribe(){
+ subscribeToPush();
+ subscribeDivControl();
+}
+
+function subscribeDivControl(){
+ if(Notification.permission != 'granted'){
+ document.getElementById('notif_join_div').style.display='block';
+ document.getElementById('notif_joined_div').style.display='none';
+ document.getElementById('notification_permission_warning').style.display='none';
+ }
+ else {
+ document.getElementById('notif_joined_div').style.display='block';
+ document.getElementById('notif_join_div').style.display='none';
+ }
+}
+
+function subscribeToPush(){
+ console.log('subscribeToPush');
+ navigator.serviceWorker.ready.then(function(reg){
+ console.log(reg);
+ reg.pushManager.subscribe({
+ userVisibleOnly:true,
+ applicationServerKey: urlBase64ToUint8Array('BNVIBdCsC6vkmByQJ861pusHN1mV76X3mvAa1u4PxmleTv2m2whcEu9Elhh8Qz3XnqV6k58YCSVqaafl3bhPKLU')
+ }).then(function(sub){
+ subscribeDivControl();
+ var json = JSON.parse(JSON.stringify(sub));
+ console.log(json);
+ /*console.log(JSON.stringify(sub));
+ console.log(sub.json());*/
+ console.log('User Subscribed');
+ //var json = {endpoint:"https://fcm.googleapis.com/fcm/send/deaedc3PCAg:APA91bGy7QpBtbuokjOQv0Y_BcSOujpabeRY6PG5MUbcsOpf7kZaKTmJMb1jYmW03rPRSIY1shFlzh3UOI4hItQoHlzp6yNuPamxOwgbIbK1tG7oiRaUplQBNC8dN3qwm52bEOPgbqBX",expirationTime:null,keys:{p256dh:"BIIbHDXNbOGKG-gYec7a8DMpqst2Uxavo_p1MS695lvPJ1ZHO0audpMPRSWwae5BmaHCN6MYC2rThAsGlamS3sw",auth:"7P5IQKoInqQnTOBG1ZzNgw"}};
+
+ $.post('../../../api/api.php?action=wpnAddSubscription&identifier=wpn', json, function(data){console.log(data);});
+
+ }).catch(function (err){
+ //console.log(err);
+ document.getElementById('notification_permission_warning').style.display='block';
+ });
+ });
+}
+
+/**
+ * urlBase64ToUint8Array
+ *
+ * @param {string} base64String a public vavid key
+ */
+function urlBase64ToUint8Array(base64String) {
+ var padding = '='.repeat((4 - base64String.length % 4) % 4);
+ var base64 = (base64String + padding)
+ .replace(/\-/g, '+')
+ .replace(/_/g, '/');
+
+ var rawData = window.atob(base64);
+ var outputArray = new Uint8Array(rawData.length);
+
+ for (var i = 0; i < rawData.length; ++i) {
+ outputArray[i] = rawData.charCodeAt(i);
+ }
+ return outputArray;
+}
+
diff --git a/admin/survey/modules/mod_WPN/frontend/manifest.json b/admin/survey/modules/mod_WPN/frontend/manifest.json
new file mode 100644
index 0000000..9451ce5
--- /dev/null
+++ b/admin/survey/modules/mod_WPN/frontend/manifest.json
@@ -0,0 +1,21 @@
+{
+ "name": "1KA WPN",
+ "short_name": "1KA WPN",
+ "icons": [
+ {
+ "src": "/admin/survey/modules/mod_WPN/frontend/android-chrome-192x192.png",
+ "sizes": "192x192",
+ "type": "image/png"
+ },
+ {
+ "src": "/admin/survey/modules/mod_WPN/frontend/android-chrome-512x512.png",
+ "sizes": "512x512",
+ "type": "image/png"
+ }
+ ],
+ "theme_color": "#ffffff",
+ "background_color": "#ffffff",
+ "display": "standalone",
+ "start_url": "/admin/survey/modules/mod_WPN/frontend/index.html",
+ "gcm_sender_id": "271835672394"
+}
diff --git a/admin/survey/modules/mod_WPN/frontend/mstile-150x150.png b/admin/survey/modules/mod_WPN/frontend/mstile-150x150.png
new file mode 100644
index 0000000..2e5b11d
--- /dev/null
+++ b/admin/survey/modules/mod_WPN/frontend/mstile-150x150.png
Binary files differ
diff --git a/admin/survey/modules/mod_WPN/frontend/safari-pinned-tab.svg b/admin/survey/modules/mod_WPN/frontend/safari-pinned-tab.svg
new file mode 100644
index 0000000..6a74d32
--- /dev/null
+++ b/admin/survey/modules/mod_WPN/frontend/safari-pinned-tab.svg
@@ -0,0 +1,290 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
+ "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
+<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
+ width="1728.000000pt" height="1728.000000pt" viewBox="0 0 1728.000000 1728.000000"
+ preserveAspectRatio="xMidYMid meet">
+<metadata>
+Created by potrace 1.11, written by Peter Selinger 2001-2013
+</metadata>
+<g transform="translate(0.000000,1728.000000) scale(0.100000,-0.100000)"
+fill="#000000" stroke="none">
+<path d="M2020 13517 c-69 -34 -128 -66 -131 -70 -3 -5 -8 -8 -10 -8 -13 2
+-49 -13 -49 -20 0 -5 -6 -9 -14 -9 -7 0 -46 -18 -86 -40 -40 -22 -77 -40 -82
+-40 -6 0 -22 -8 -36 -18 -15 -10 -52 -29 -82 -42 -30 -14 -57 -27 -60 -31 -6
+-6 -37 -19 -46 -18 -4 0 -10 -3 -13 -8 -3 -4 -172 -91 -376 -193 -203 -101
+-387 -195 -407 -207 -21 -13 -38 -20 -38 -17 0 4 -6 2 -13 -4 -6 -5 -139 -73
+-294 -152 l-283 -141 0 -1221 0 -1220 25 16 c14 9 25 14 25 12 0 -2 42 14 93
+36 50 22 98 40 105 41 6 0 12 4 12 9 0 4 7 8 15 8 8 0 40 12 72 26 83 37 111
+48 178 75 33 13 63 28 66 32 3 5 9 8 13 8 14 -2 35 6 124 45 29 13 55 24 57
+24 4 0 200 82 252 106 17 8 34 14 37 14 3 0 35 14 71 30 36 17 69 30 73 30 4
+0 30 11 57 25 28 13 57 25 65 25 9 0 24 6 35 13 11 8 70 33 130 57 61 24 121
+50 135 57 14 7 31 13 38 13 9 0 12 -432 12 -2125 l0 -2125 2193 0 c1207 0
+2196 3 2199 6 4 3 2 19 -2 35 -5 16 -6 29 -2 29 4 0 7 45 7 100 0 55 -4 100
+-8 100 -5 0 -5 5 -2 11 4 5 6 38 6 72 -1 34 -1 71 -1 82 0 11 0 70 1 132 0 62
+-2 117 -6 123 -3 5 -3 10 2 10 4 0 7 21 5 47 -2 27 -3 55 -3 63 2 60 3 107 1
+115 -1 6 -2 12 -1 15 7 17 5 100 -2 100 -5 0 -5 5 -2 10 9 14 9 266 0 279 -3
+6 -3 11 2 11 4 0 7 21 5 47 -2 27 -3 55 -3 63 2 60 3 107 1 115 -1 6 -2 12 -1
+15 7 17 5 100 -2 100 -5 0 -5 5 -2 10 4 6 6 56 6 113 -1 121 -1 129 0 187 0
+25 0 50 -1 55 -1 6 -1 15 0 20 1 6 1 28 1 50 -2 51 -2 40 1 232 2 90 -1 163
+-5 163 -5 0 -5 5 -2 10 4 6 6 39 6 73 -1 34 -1 70 -2 80 0 9 1 56 2 105 l2 87
+33 -70 c18 -38 33 -76 34 -82 0 -7 4 -13 9 -13 5 0 12 -10 16 -22 10 -32 8
+-27 35 -83 13 -27 23 -53 22 -57 -1 -5 3 -8 8 -8 6 0 10 -9 10 -20 0 -11 4
+-20 10 -20 5 0 9 -3 8 -7 -1 -5 14 -39 32 -78 18 -38 33 -73 32 -77 -1 -5 3
+-8 8 -8 5 0 9 -3 8 -7 -1 -5 26 -66 60 -136 34 -71 62 -130 62 -131 0 -2 33
+-73 74 -157 40 -85 84 -176 96 -204 13 -27 47 -101 76 -162 30 -62 54 -117 54
+-123 0 -5 5 -10 10 -10 6 0 10 -6 10 -13 0 -7 10 -33 22 -58 12 -24 21 -47 20
+-51 -1 -5 3 -8 9 -8 5 0 8 -4 4 -9 -3 -5 2 -16 10 -24 8 -9 15 -20 15 -25 0
+-5 16 -42 36 -83 121 -250 204 -429 204 -439 0 -6 5 -10 10 -10 6 0 10 -6 10
+-13 0 -7 10 -33 22 -58 12 -24 23 -49 24 -56 1 -7 12 -26 24 -43 12 -16 19
+-30 15 -30 -3 0 7 -26 24 -57 34 -68 105 -216 106 -223 1 -3 16 -35 33 -71 18
+-36 32 -71 32 -77 0 -7 5 -12 10 -12 6 0 10 -7 10 -15 0 -13 233 -15 2039 -15
+l2039 0 11 29 c7 16 13 35 14 42 2 8 6 20 10 27 5 6 6 12 2 12 -3 0 -1 9 5 21
+7 11 14 33 16 47 2 15 8 36 13 47 8 17 53 158 56 175 1 3 4 14 7 25 4 11 23
+74 43 140 20 66 44 140 52 165 8 25 16 52 18 60 2 8 13 44 25 80 12 36 24 74
+26 85 9 35 10 40 18 63 4 13 16 22 29 23 12 0 553 1 1202 1 l1179 1 13 -32 c8
+-18 11 -36 8 -42 -4 -5 -2 -9 3 -9 5 0 13 -15 17 -32 10 -41 1 -12 70 -223 32
+-99 60 -183 61 -187 1 -5 2 -9 4 -10 1 -2 3 -10 5 -18 3 -17 113 -357 122
+-380 4 -8 7 -17 8 -20 1 -3 7 -24 15 -47 l13 -43 1184 0 1184 0 -7 23 c-3 12
+-13 34 -21 50 -7 15 -11 27 -7 27 4 0 1 7 -6 15 -7 8 -9 15 -5 15 4 0 1 7 -6
+16 -11 14 -31 60 -43 99 -2 6 -8 23 -15 40 -7 16 -60 149 -118 295 -58 146
+-111 279 -118 295 -16 37 -59 148 -60 155 0 3 -7 21 -16 40 -9 19 -33 78 -54
+130 -20 52 -40 104 -44 115 -5 11 -13 31 -18 45 -5 14 -19 45 -31 70 -12 25
+-22 52 -22 61 0 8 -5 20 -11 26 -6 6 -12 19 -14 29 -2 11 -4 20 -5 22 -2 1 -3
+5 -5 10 -5 18 -26 68 -35 84 -6 10 -10 25 -10 33 0 8 -5 15 -11 15 -5 0 -8 4
+-5 8 2 4 -2 23 -11 42 -31 72 -41 97 -73 180 -18 47 -39 99 -46 115 -38 89
+-61 154 -56 159 3 3 0 6 -6 6 -7 0 -12 7 -12 15 0 8 -4 23 -10 33 -5 9 -39 94
+-76 187 -36 94 -72 184 -80 200 -15 34 -78 197 -79 205 0 3 -6 15 -13 26 -6
+12 -8 24 -5 28 3 3 1 6 -5 6 -7 0 -12 6 -12 13 0 6 -13 44 -28 82 -32 78 -39
+98 -40 105 0 3 -14 35 -31 73 -17 37 -28 67 -24 67 3 0 1 6 -5 13 -6 7 -20 39
+-33 72 -12 33 -26 71 -32 85 -6 14 -10 28 -9 33 1 4 -3 7 -8 7 -6 0 -10 6 -10
+13 0 7 -22 69 -50 137 -27 68 -50 129 -50 136 0 6 -7 17 -15 24 -8 7 -13 16
+-10 20 3 4 -2 20 -9 36 -8 16 -62 148 -120 294 -57 146 -110 279 -117 295 -7
+17 -13 32 -14 35 -1 3 -7 18 -13 33 -7 16 -12 31 -12 33 0 3 -8 24 -19 47 -10
+23 -39 96 -66 162 -26 66 -51 129 -56 140 -8 19 -30 74 -34 85 -1 3 -7 19 -14
+35 -14 32 -55 140 -73 190 -6 17 -15 34 -19 40 -5 5 -9 17 -9 27 0 10 -5 18
+-12 18 -6 0 -8 3 -5 7 4 3 2 12 -4 20 -6 7 -9 13 -6 13 3 0 -3 21 -14 48 -11
+26 -24 56 -29 67 -4 11 -15 36 -24 57 -9 20 -16 39 -16 43 0 7 -6 21 -44 107
+-9 20 -16 41 -16 46 0 6 -6 23 -14 39 -22 44 -41 93 -45 118 -1 6 -8 19 -15
+30 -7 11 -19 38 -26 60 -12 39 -32 86 -71 173 -10 23 -19 51 -19 62 0 10 -4
+21 -9 24 -4 3 -16 27 -26 53 -19 51 -34 90 -55 138 -7 17 -14 35 -16 40 -1 6
+-8 24 -15 40 -7 17 -12 33 -11 38 1 4 -2 7 -6 7 -5 0 -9 6 -9 13 -1 19 -37
+112 -46 115 -4 2 -7 9 -7 15 0 7 -37 105 -82 219 l-83 208 -1086 0 -1087 0
+-21 -52 c-11 -29 -26 -66 -32 -83 -7 -16 -13 -32 -14 -35 -1 -3 -6 -16 -12
+-30 -6 -14 -10 -27 -9 -30 0 -3 -7 -18 -17 -33 -9 -15 -15 -27 -12 -27 3 0 -1
+-13 -9 -29 -9 -16 -12 -31 -9 -35 4 -3 1 -6 -6 -6 -7 0 -10 -4 -7 -8 3 -5 -4
+-23 -15 -41 -11 -18 -17 -36 -14 -42 4 -5 1 -9 -4 -9 -6 0 -11 -6 -11 -12 0
+-7 -37 -103 -81 -213 -45 -110 -81 -206 -82 -212 0 -7 -4 -13 -9 -13 -4 0 -7
+-3 -6 -7 2 -7 -157 -414 -202 -518 -9 -22 -25 -64 -36 -92 -10 -29 -21 -53
+-24 -53 -4 0 -7 -6 -7 -13 0 -13 -28 -89 -59 -162 -7 -17 -27 -66 -44 -110
+-17 -44 -35 -89 -40 -100 -5 -11 -46 -112 -90 -225 -45 -113 -85 -214 -90
+-225 -5 -11 -21 -51 -35 -90 -15 -38 -32 -76 -39 -84 -6 -8 -9 -16 -8 -18 4
+-3 -36 -110 -74 -198 -7 -16 -33 -82 -58 -145 -25 -63 -51 -128 -57 -145 -7
+-16 -13 -32 -13 -35 -1 -5 -19 -49 -47 -115 -5 -11 -36 -89 -70 -174 -33 -85
+-65 -166 -71 -180 -6 -14 -12 -31 -13 -37 -2 -6 -10 -27 -18 -45 -9 -19 -25
+-59 -37 -89 -11 -30 -25 -64 -29 -75 -8 -17 -20 -49 -26 -65 -4 -10 -18 -46
+-35 -85 -10 -22 -21 -51 -25 -65 -4 -14 -16 -43 -25 -65 -28 -62 -122 -299
+-124 -310 -1 -5 -4 -14 -8 -20 -3 -5 -49 -120 -102 -255 -53 -135 -101 -254
+-105 -265 -31 -72 -40 -93 -47 -115 -4 -14 -7 -28 -6 -32 1 -5 -2 -8 -8 -8 -5
+0 -10 -4 -10 -9 0 -5 -4 -20 -9 -33 -5 -13 -9 -25 -9 -28 -1 -3 -12 -31 -26
+-63 -15 -32 -26 -64 -26 -73 0 -9 -5 -12 -12 -8 -7 4 -10 4 -6 -1 7 -7 -22
+-93 -48 -143 -8 -15 -14 -33 -14 -40 0 -7 -4 -20 -10 -30 -17 -30 -89 -212
+-84 -212 2 0 -3 -11 -12 -25 -9 -14 -12 -25 -8 -25 5 0 4 -4 -1 -8 -10 -6 -52
+-108 -59 -140 -1 -7 -7 -17 -13 -23 -10 -10 -27 20 -177 316 -11 22 -19 43
+-18 48 1 4 -2 7 -6 7 -4 0 -21 28 -37 63 -16 34 -35 70 -43 80 -8 9 -12 17 -9
+17 4 0 -4 19 -17 43 -13 23 -69 132 -126 242 -56 110 -106 206 -112 213 -6 6
+-7 12 -3 12 4 0 3 6 -3 13 -5 6 -72 134 -147 282 -76 149 -146 285 -157 303
+-11 17 -16 32 -12 32 4 0 0 8 -8 18 -8 9 -30 49 -50 87 -19 39 -55 112 -81
+162 -26 51 -47 96 -46 99 0 4 -3 10 -8 13 -4 3 -54 97 -110 208 l-102 202 43
+93 c61 131 134 290 163 358 9 19 30 67 48 105 18 39 47 104 65 145 18 41 56
+125 84 185 29 61 68 146 87 190 18 44 37 82 42 83 4 2 7 10 7 17 0 19 32 88
+45 97 6 4 6 8 1 8 -5 0 -3 7 4 15 7 8 9 15 4 15 -5 0 -4 4 1 8 6 4 23 34 38
+68 15 33 39 87 54 120 14 32 27 61 28 64 3 7 43 96 75 165 16 33 39 85 53 115
+40 90 68 152 93 208 13 28 36 78 50 110 14 31 36 80 49 107 46 99 78 170 80
+175 4 13 26 61 56 125 18 39 33 72 34 75 1 3 13 30 27 60 14 30 35 78 48 105
+12 28 34 75 48 105 14 30 25 58 24 63 -1 4 2 7 6 7 5 0 9 6 9 13 0 6 15 44 34
+82 18 39 32 73 31 78 -1 4 2 7 8 7 5 0 10 5 10 12 0 6 11 35 25 65 14 29 37
+79 51 111 14 31 37 81 50 110 13 29 24 55 24 57 0 3 -580 5 -1289 5 -1019 0
+-1291 -3 -1298 -12 -6 -7 -20 -39 -31 -70 -12 -32 -26 -66 -31 -75 -6 -10 -25
+-56 -43 -103 -18 -47 -36 -87 -39 -90 -3 -3 -12 -23 -19 -45 -7 -22 -21 -58
+-31 -80 -10 -22 -34 -80 -54 -130 -20 -49 -42 -103 -49 -120 -8 -16 -24 -55
+-36 -85 -12 -30 -33 -79 -46 -108 -13 -29 -24 -57 -24 -62 0 -6 -4 -18 -10
+-28 -5 -9 -39 -89 -75 -177 -37 -88 -73 -176 -82 -195 -9 -19 -16 -41 -16 -47
+0 -7 -4 -13 -9 -13 -4 0 -8 -6 -8 -13 0 -12 -31 -89 -85 -212 -7 -16 -16 -41
+-20 -55 -4 -14 -10 -27 -14 -30 -6 -5 -29 -62 -35 -85 -1 -5 -12 -32 -25 -60
+-33 -74 -34 -77 -106 -255 -37 -91 -72 -171 -79 -179 -6 -8 -10 -17 -10 -20 1
+-3 -3 -17 -8 -31 -6 -14 -11 -31 -12 -38 -1 -7 -8 -18 -14 -24 -7 -7 -12 -22
+-12 -35 0 -13 -4 -23 -10 -23 -5 0 -10 -7 -10 -16 0 -8 -5 -25 -12 -37 -7 -12
+-13 -26 -14 -32 -1 -5 -9 -27 -18 -47 -9 -21 -16 -39 -15 -40 1 -2 -8 -21 -20
+-43 -11 -22 -21 -45 -21 -51 0 -6 -13 -37 -29 -70 -15 -32 -32 -70 -37 -84 -8
+-23 -9 -22 -14 15 -3 22 -4 44 -2 49 9 18 8 85 -1 79 -6 -3 -7 -1 -3 5 9 14
+10 217 2 231 -4 6 -4 11 1 11 4 0 7 21 5 47 -2 27 -3 55 -3 63 2 60 3 107 1
+115 -1 6 -2 12 -1 15 7 17 5 100 -2 100 -5 0 -5 5 -2 10 9 14 9 266 0 279 -3
+6 -3 11 2 11 4 0 7 21 5 47 -2 27 -3 55 -3 63 2 60 3 107 1 115 -1 6 -2 12 -1
+15 7 17 5 100 -2 100 -5 0 -5 5 -2 10 9 14 9 266 0 279 -3 6 -3 11 2 11 4 0 7
+21 5 47 -2 27 -3 55 -3 63 2 60 3 107 1 115 -1 6 -2 12 -1 15 7 17 5 100 -2
+100 -5 0 -5 5 -2 10 9 14 9 266 0 279 -3 6 -3 11 2 11 4 0 7 21 5 47 -2 27 -3
+55 -3 63 2 60 3 107 1 115 -1 6 -2 12 -1 15 7 17 5 100 -2 100 -5 0 -5 5 -2
+10 5 8 7 113 4 243 0 16 -101 17 -1967 17 l-1967 0 -125 -63z m11076 -2576
+c22 -69 38 -132 38 -138 -1 -7 2 -13 7 -13 5 0 9 -11 9 -24 0 -14 4 -27 9 -30
+5 -3 11 -18 14 -33 7 -40 14 -63 31 -111 8 -23 15 -43 15 -45 0 -1 2 -9 5 -17
+8 -23 48 -164 49 -170 0 -3 6 -20 14 -37 7 -18 11 -33 8 -33 -4 0 -3 -6 2 -12
+4 -7 8 -15 8 -18 1 -6 51 -165 97 -310 17 -52 37 -116 45 -141 8 -25 16 -55
+18 -65 2 -10 4 -20 5 -21 2 -2 3 -6 5 -10 1 -5 4 -15 8 -23 5 -12 21 -66 33
+-112 1 -5 3 -10 4 -13 1 -3 4 -9 5 -15 1 -5 4 -12 5 -15 1 -3 3 -8 4 -12 1 -5
+9 -33 19 -63 9 -30 16 -57 16 -60 0 -3 5 -18 11 -35 7 -16 20 -56 30 -87 l17
+-56 -69 0 c-38 0 -71 -2 -75 -5 -3 -4 -10 -4 -15 -1 -12 8 -178 7 -186 0 -3
+-3 -11 -1 -18 5 -8 7 -14 7 -19 -1 -3 -6 -11 -7 -17 -4 -12 8 -174 7 -187 0
+-5 -4 -13 -2 -16 4 -5 8 -11 8 -19 1 -7 -6 -16 -8 -19 -5 -7 7 -126 9 -133 2
+-3 -3 -21 -2 -40 2 -23 5 -34 4 -34 -3 0 -8 -3 -8 -11 0 -8 8 -20 8 -34 3 -13
+-5 -25 -7 -27 -5 -9 10 -88 11 -88 2 0 -7 -4 -7 -11 0 -8 8 -20 8 -34 3 -13
+-5 -25 -6 -28 -4 -3 3 -23 5 -46 6 -23 0 -41 3 -41 6 0 4 23 78 51 166 28 87
+52 168 53 180 1 11 7 30 13 41 9 19 51 151 58 185 2 8 4 16 5 18 2 1 4 7 5 12
+1 6 4 13 5 18 2 4 4 12 5 17 1 6 5 17 8 25 6 18 30 92 33 103 1 4 2 8 4 10 1
+1 3 9 5 18 3 16 52 176 101 329 84 263 122 395 118 402 -3 4 0 8 5 8 6 0 11 6
+11 14 0 7 12 49 26 92 14 44 26 87 27 97 1 9 4 17 7 17 3 0 6 8 7 18 3 33 21
+69 36 69 10 0 27 -40 53 -126z"/>
+<path d="M1643 4378 c0 -601 2 -667 16 -670 13 -3 925 -2 956 1 11 1 12 62 1
+79 -3 6 -2 13 4 17 6 4 7 11 4 17 -5 8 -9 112 -4 121 1 1 3 12 4 24 2 15 -4
+22 -18 25 -12 2 -152 4 -312 3 l-292 0 2 62 c1 38 -3 63 -9 63 -6 0 -6 3 1 8
+6 4 10 27 10 52 l-1 45 235 2 c129 0 244 2 255 2 20 1 21 7 20 139 l-1 137
+-219 2 c-311 2 -297 1 -292 16 2 6 0 20 -5 30 -5 9 -5 17 0 17 4 0 7 38 6 85
+0 47 2 87 6 90 3 2 140 5 303 7 296 3 296 3 306 26 6 12 7 22 1 22 -5 0 -5 12
+0 30 5 18 5 32 -1 36 -6 4 -6 11 1 19 8 10 8 15 0 20 -8 5 -8 11 -1 19 6 7 8
+16 4 20 -4 3 -6 28 -4 54 l2 47 -489 0 -489 0 0 -667z"/>
+<path d="M2900 5043 c0 -5 -12 -9 -27 -9 l-28 1 -1 -215 c0 -118 -2 -219 -4
+-225 -1 -5 -1 -12 0 -15 8 -17 5 -148 -3 -143 -6 4 -7 1 -1 -8 11 -18 13 -448
+2 -471 -4 -9 -4 -19 0 -22 4 -3 7 -59 7 -126 l-2 -120 185 2 185 3 1 352 c1
+193 4 355 9 359 4 4 7 1 7 -7 0 -8 9 -21 20 -29 11 -8 20 -19 20 -25 0 -5 11
+-23 25 -40 20 -25 112 -150 173 -234 9 -13 23 -29 30 -36 6 -8 12 -18 12 -23
+0 -6 3 -12 8 -14 6 -3 72 -89 112 -148 8 -12 27 -36 42 -54 15 -17 30 -39 34
+-48 3 -10 9 -18 14 -18 5 0 12 -9 15 -20 6 -19 15 -20 158 -20 l152 0 0 673 0
+672 -77 0 c-43 0 -78 3 -78 8 0 4 -5 5 -12 1 -18 -12 -58 -11 -58 1 0 7 -3 6
+-8 -1 -4 -5 -32 -9 -62 -9 -30 1 -57 -2 -60 -6 -3 -5 -5 -67 -4 -139 1 -89 -2
+-130 -10 -130 -8 0 -8 -2 0 -8 16 -11 14 -451 -2 -445 -7 2 -15 16 -18 29 -4
+14 -10 23 -15 20 -4 -3 -14 7 -22 22 -8 15 -16 29 -19 32 -4 3 -22 27 -41 55
+-18 27 -40 56 -46 65 -7 8 -37 49 -67 90 -31 41 -60 80 -66 87 -5 7 -10 17
+-10 23 0 5 -3 10 -7 10 -5 0 -19 17 -33 38 -14 20 -33 46 -42 56 -10 11 -18
+23 -18 26 0 4 -10 19 -22 33 -13 14 -42 52 -65 85 l-42 59 -86 -1 c-53 -1 -85
+2 -85 9 0 6 -3 7 -8 0 -8 -12 -32 -13 -49 -2 -7 5 -13 4 -13 0z"/>
+<path d="M4356 5043 c-4 -4 -17 -8 -29 -8 -22 0 -22 -2 -22 -173 0 -94 -4
+-172 -8 -172 -5 0 -5 -5 -1 -11 9 -15 9 -143 0 -158 -4 -6 -4 -11 1 -11 4 0 8
+-32 8 -70 0 -39 -4 -70 -8 -70 -5 0 -5 -5 -1 -11 9 -15 9 -143 0 -158 -4 -6
+-4 -11 1 -11 10 0 9 -172 -1 -188 -4 -7 -4 -12 1 -12 9 0 9 -162 0 -177 -3 -5
+-2 -15 3 -23 4 -7 4 -24 -1 -37 -5 -15 -5 -23 2 -23 6 0 8 -9 4 -20 -6 -19 -2
+-20 174 -20 181 0 181 0 182 23 0 12 1 142 1 289 l1 266 21 -22 c11 -12 50
+-57 86 -101 35 -44 69 -85 75 -91 5 -7 17 -20 25 -31 22 -27 103 -126 115
+-140 5 -6 21 -26 35 -44 14 -18 34 -42 45 -53 11 -12 33 -38 48 -59 l28 -37
+215 0 c235 0 230 -1 177 55 -10 11 -58 70 -107 130 -91 114 -95 119 -223 276
+-43 52 -91 113 -108 134 -16 21 -38 47 -48 57 -18 19 -17 21 9 56 16 20 34 43
+41 50 7 7 13 17 13 20 0 4 10 18 23 32 12 14 34 43 50 66 15 22 35 49 45 60
+10 10 21 27 25 37 3 9 11 17 17 17 5 0 10 7 10 15 0 7 6 18 13 22 7 4 23 25
+37 45 14 21 28 38 33 38 4 0 7 5 7 12 0 6 7 18 16 27 22 23 144 189 144 197 0
+3 -7 4 -15 1 -8 -4 -17 -2 -21 4 -3 6 -11 6 -17 1 -9 -6 -114 -7 -182 -2 -5 1
+-19 -1 -30 -3 -11 -2 -23 1 -27 7 -6 8 -8 8 -8 0 0 -7 -22 -10 -59 -8 -59 2
+-60 1 -87 -37 -15 -21 -31 -39 -35 -39 -5 0 -9 -6 -9 -13 0 -7 -11 -24 -23
+-38 -13 -13 -37 -44 -52 -67 -15 -23 -32 -42 -36 -42 -5 0 -8 -3 -7 -7 3 -8
+-100 -149 -134 -185 -10 -10 -18 -21 -18 -25 0 -5 -10 -20 -23 -35 -12 -15
+-33 -43 -47 -62 -14 -20 -28 -36 -31 -36 -3 0 -6 127 -6 283 0 270 -3 314 -23
+302 -5 -3 -11 -1 -15 5 -4 6 -12 7 -18 3 -16 -10 -231 -11 -238 -1 -3 5 -9 5
+-13 1z"/>
+<path d="M5715 5040 c-1 -3 -2 -305 -2 -672 0 -486 3 -668 11 -669 14 0 904 0
+931 0 19 1 20 7 18 138 0 76 -2 143 -2 148 -1 6 -102 10 -283 9 -156 0 -288 1
+-295 4 -7 2 -12 29 -12 70 -1 37 -1 74 -2 82 0 8 0 58 0 110 1 52 1 102 1 110
+0 13 0 273 0 325 0 11 0 75 1 142 0 67 -2 127 -6 132 -3 6 -2 11 3 11 10 0 3
+59 -7 61 -21 4 -353 3 -356 -1z"/>
+<path d="M7017 5042 c-3 -4 -48 -7 -101 -7 l-96 1 -1 -25 c-3 -89 -4 -1298 -1
+-1308 3 -10 49 -13 186 -13 l182 0 0 675 c0 537 -3 675 -13 671 -7 -3 -15 -1
+-19 5 -3 6 -10 6 -17 1 -13 -11 -87 -9 -105 2 -6 3 -13 3 -15 -2z"/>
+<path d="M7636 5042 c-2 -4 -48 -7 -100 -6 -53 1 -97 -1 -97 -5 -1 -3 -3 -306
+-3 -673 l-2 -668 181 0 180 0 0 291 0 290 30 -33 c16 -19 44 -52 60 -73 17
+-21 35 -43 41 -49 6 -6 41 -49 79 -96 37 -47 71 -87 74 -90 5 -4 61 -73 93
+-115 5 -5 22 -26 39 -45 16 -19 37 -45 46 -57 15 -23 18 -23 235 -23 249 0
+235 -7 156 86 -24 28 -56 68 -73 89 -87 109 -113 140 -132 161 -7 7 -13 15
+-13 18 0 3 -8 14 -17 24 -20 21 -62 71 -95 116 -13 16 -31 37 -40 45 -10 9
+-18 19 -18 24 0 4 -9 18 -20 30 -12 12 -32 35 -45 52 l-24 29 27 36 c14 19 32
+41 39 48 7 7 20 26 30 42 9 17 21 30 25 30 4 0 8 7 8 15 0 8 3 15 8 15 4 0 18
+17 32 37 14 21 32 47 42 58 9 11 48 63 86 115 39 52 75 100 80 106 5 6 27 35
+48 65 21 30 41 56 45 59 3 3 11 14 17 26 11 20 9 21 -54 20 -36 -1 -68 2 -71
+7 -2 4 -10 4 -16 0 -16 -10 -218 -11 -239 -1 -13 7 -37 -20 -123 -134 -58 -79
+-111 -150 -118 -158 -7 -9 -25 -33 -42 -55 -16 -22 -33 -44 -37 -50 -5 -5 -38
+-50 -74 -100 -36 -49 -69 -91 -73 -93 -4 -1 -7 129 -7 290 l0 293 -70 1 c-39
+0 -75 4 -81 7 -7 4 -14 4 -17 -1z"/>
+<path d="M9876 5043 c-3 -4 -25 -7 -48 -7 -45 -1 -49 -5 -82 -86 -7 -19 -27
+-66 -42 -105 -16 -38 -29 -72 -30 -75 -1 -8 -15 -42 -35 -87 -10 -24 -19 -50
+-19 -58 0 -8 -5 -15 -11 -15 -5 0 -8 -4 -5 -8 3 -5 -1 -19 -7 -33 -7 -13 -24
+-53 -37 -89 -13 -36 -29 -76 -36 -90 -7 -14 -42 -101 -79 -195 -36 -93 -72
+-185 -80 -203 -8 -18 -15 -39 -15 -47 0 -8 -3 -15 -8 -15 -4 0 -16 -27 -26
+-60 -11 -33 -23 -60 -28 -60 -4 0 -7 -3 -7 -7 3 -15 -14 -74 -22 -79 -5 -3 -9
+-12 -9 -20 0 -12 31 -14 189 -14 199 0 196 -1 206 45 7 28 59 171 66 179 4 5
+119 9 255 9 l246 1 14 -40 c8 -21 26 -74 41 -116 l26 -78 193 0 194 0 -16 38
+c-8 20 -25 60 -36 87 -11 28 -25 61 -31 75 -6 14 -11 27 -12 30 -3 8 -16 39
+-67 165 -28 66 -51 125 -52 130 -1 6 -10 27 -19 49 -9 21 -17 41 -17 44 0 3
+-9 24 -19 46 -10 23 -40 95 -66 161 -26 66 -58 147 -72 180 -14 33 -29 69 -33
+80 -4 11 -20 49 -35 84 -15 35 -28 68 -29 75 -1 6 -10 26 -19 43 -10 18 -17
+35 -17 38 0 3 0 9 0 13 0 5 -18 8 -41 8 -22 -1 -43 2 -46 7 -2 4 -10 4 -16 -1
+-14 -10 -127 -9 -143 1 -6 3 -14 3 -18 0z m109 -494 c12 -35 43 -124 68 -198
+26 -74 47 -136 47 -137 0 -2 -65 -4 -145 -4 -159 0 -158 0 -129 58 8 18 13 36
+9 42 -3 5 -2 10 4 10 5 0 12 15 16 33 4 17 13 46 20 62 11 26 33 87 42 120 13
+48 30 84 37 82 6 -2 19 -32 31 -68z"/>
+<path d="M10887 5044 c-3 -3 -20 -7 -39 -8 l-33 -3 0 -671 0 -672 180 0 180 0
+0 353 c-1 193 1 355 3 360 4 8 112 -128 112 -142 0 -5 4 -11 8 -13 5 -1 28
+-30 53 -63 24 -33 47 -61 52 -63 4 -2 7 -10 7 -18 0 -8 3 -14 8 -14 4 0 18
+-17 32 -38 14 -20 27 -39 30 -42 7 -7 93 -121 110 -147 8 -12 41 -55 73 -97
+l58 -76 148 0 147 0 0 673 c-1 590 -3 672 -16 672 -8 0 -20 4 -27 8 -6 4 -14
+4 -17 -1 -5 -9 -208 -8 -223 1 -6 4 -13 3 -17 -1 -4 -4 -20 -7 -34 -7 l-26 -1
+-1 -361 c0 -199 -3 -365 -7 -369 -5 -4 -8 -2 -8 4 0 6 -6 17 -13 24 -7 7 -32
+40 -55 73 -23 33 -71 101 -107 150 -37 50 -74 100 -83 113 -9 13 -24 32 -32
+42 -8 10 -33 44 -55 76 -22 31 -46 62 -52 70 -7 7 -13 15 -13 18 0 3 -6 14
+-14 23 -8 10 -36 46 -61 81 -26 34 -51 60 -56 56 -5 -3 -9 0 -9 6 0 6 -5 8
+-12 3 -17 -10 -149 -11 -169 -1 -9 4 -19 5 -22 2z"/>
+<path d="M12381 5041 c-6 -4 -34 -7 -62 -5 -27 1 -50 -1 -50 -4 -1 -4 -2 -307
+-3 -674 l-1 -668 181 0 c165 0 182 2 186 18 2 9 3 137 3 285 -1 147 2 267 5
+267 4 0 18 -15 32 -32 15 -18 35 -43 45 -55 10 -11 34 -41 53 -64 19 -24 60
+-73 90 -110 84 -102 124 -150 140 -171 8 -11 26 -32 40 -48 14 -16 36 -42 49
+-59 l23 -31 220 0 220 0 -27 38 c-16 20 -33 42 -39 47 -6 6 -27 30 -46 55 -19
+25 -38 47 -42 48 -4 2 -8 8 -8 13 0 5 -9 20 -21 32 -63 68 -99 114 -99 125 0
+7 -4 10 -10 7 -5 -3 -10 1 -10 9 0 9 -9 21 -20 28 -11 7 -20 16 -20 20 0 7
+-16 28 -45 62 -6 6 -30 36 -55 66 -25 30 -47 57 -50 60 -3 3 -16 19 -27 35
+l-21 31 54 74 c30 41 61 83 69 93 9 9 32 41 52 70 20 28 90 123 155 210 65 87
+118 163 118 168 0 5 3 9 8 9 4 0 15 11 24 24 l17 23 -40 -2 c-21 -2 -42 1 -45
+6 -3 5 -10 6 -16 3 -17 -11 -151 -12 -170 -2 -10 5 -19 4 -23 -2 -4 -7 -12 -7
+-24 0 -10 5 -21 7 -24 4 -3 -3 -24 -7 -46 -8 -23 -1 -42 -4 -44 -7 -2 -2 -24
+-31 -48 -64 -24 -33 -46 -62 -49 -65 -3 -3 -24 -30 -45 -60 -22 -30 -45 -62
+-52 -70 -7 -8 -62 -82 -124 -165 -61 -82 -115 -151 -118 -153 -4 -1 -7 130 -7
+292 1 162 -2 292 -6 290 -4 -2 -10 0 -13 6 -4 7 -12 7 -18 2 -13 -9 -178 -9
+-193 1 -6 3 -16 2 -23 -2z"/>
+<path d="M13694 5041 c-2 -2 -4 -304 -4 -670 l0 -666 478 1 c262 1 482 2 488
+3 12 1 18 280 6 282 -4 1 -142 2 -307 3 l-300 1 -1 116 -1 115 253 0 c163 -1
+254 3 255 9 1 6 2 67 3 138 1 105 -2 128 -14 132 -8 2 -118 4 -245 4 -126 -1
+-235 0 -242 0 -8 1 -11 37 -11 121 l1 120 166 1 c172 1 431 5 443 8 4 0 6 65
+5 143 l-2 143 -483 0 c-266 0 -485 -2 -488 -4z"/>
+<path d="M14976 5042 c-3 -5 -46 -8 -96 -7 l-90 3 0 -153 0 -153 195 1 c167 2
+195 0 196 -13 4 -97 2 -170 -4 -170 -5 0 -5 -5 -2 -11 10 -15 12 -69 3 -69 -4
+0 -5 -7 -1 -16 9 -24 9 -224 0 -224 -5 0 -5 -5 -2 -11 10 -15 12 -69 3 -69 -4
+0 -5 -7 -1 -16 9 -24 9 -224 0 -224 -5 0 -5 -5 -2 -11 11 -16 12 -69 2 -69 -4
+0 -5 -5 -1 -12 4 -6 7 -38 6 -70 l-1 -58 185 0 184 0 0 520 0 520 53 1 c28 0
+116 0 195 0 l142 0 1 32 c1 38 1 260 0 267 -1 3 -35 5 -77 5 -41 -1 -78 3 -80
+7 -3 5 -10 5 -16 2 -19 -12 -68 -12 -68 0 0 7 -3 8 -8 0 -8 -11 -200 -12 -219
+-1 -6 4 -14 4 -17 -1 -4 -7 -141 -9 -156 -2 -3 1 -9 1 -15 0 -33 -8 -65 -6
+-65 4 0 7 -3 8 -8 0 -8 -11 -200 -12 -219 -1 -6 4 -14 3 -17 -1z"/>
+<path d="M16516 5043 c-4 -4 -34 -8 -66 -9 -78 -1 -82 -2 -75 -13 3 -5 1 -12
+-5 -16 -5 -3 -10 -15 -10 -26 0 -10 -5 -19 -12 -19 -6 0 -9 -3 -6 -6 4 -3 -11
+-48 -32 -99 -21 -51 -36 -96 -32 -99 3 -3 0 -6 -6 -6 -7 0 -12 -5 -12 -11 0
+-10 -152 -396 -171 -434 -6 -12 -11 -27 -13 -35 -2 -8 -9 -28 -16 -45 -7 -16
+-14 -34 -16 -40 -6 -22 -52 -126 -58 -132 -3 -3 -6 -13 -6 -22 0 -9 -6 -27
+-13 -41 -7 -14 -21 -47 -31 -75 -10 -27 -25 -63 -32 -80 -17 -40 -54 -135 -54
+-140 0 -3 85 -5 189 -5 l189 0 16 40 c9 22 16 47 16 55 0 8 4 15 8 15 4 0 8 9
+9 20 1 11 9 34 17 51 9 18 13 35 10 40 -3 5 -2 9 3 10 11 1 450 1 484 0 23 -1
+29 -9 48 -68 12 -38 25 -75 28 -83 4 -8 7 -18 7 -22 1 -3 4 -10 9 -14 4 -4 7
+-16 7 -26 0 -17 13 -18 195 -18 l195 0 -22 53 c-11 28 -28 72 -37 97 -9 25
+-19 47 -23 48 -5 2 -8 11 -8 21 0 9 -4 21 -8 26 -5 6 -16 30 -25 55 -9 25 -22
+59 -28 75 -7 17 -13 32 -14 35 -1 3 -7 19 -15 35 -32 73 -40 93 -40 100 0 4
+-7 21 -15 38 -8 18 -39 93 -69 167 -133 333 -208 517 -221 547 -8 17 -15 35
+-15 40 0 5 -45 9 -102 8 -57 0 -106 3 -109 7 -3 5 -9 5 -13 1z m74 -501 c13
+-42 23 -80 22 -84 -1 -5 3 -8 8 -8 6 0 10 -9 10 -19 0 -11 9 -40 20 -65 10
+-25 17 -46 13 -46 -3 0 0 -7 7 -15 7 -8 9 -15 5 -15 -4 0 -3 -6 2 -12 6 -7 13
+-25 17 -40 l6 -28 -145 0 c-80 0 -145 2 -145 4 0 6 70 211 87 256 4 8 7 18 8
+23 2 4 3 8 4 10 2 1 4 11 6 22 6 32 34 95 43 95 4 0 18 -35 32 -78z"/>
+</g>
+</svg>
diff --git a/admin/survey/modules/mod_WPN/frontend/sw.js b/admin/survey/modules/mod_WPN/frontend/sw.js
new file mode 100644
index 0000000..f20d9ac
--- /dev/null
+++ b/admin/survey/modules/mod_WPN/frontend/sw.js
@@ -0,0 +1,124 @@
+/*
+ * To change this license header, choose License Headers in Project Properties.
+ * To change this template file, choose Tools | Templates
+ * and open the template in the editor.
+ */
+var cacheName = 'CSv4';
+
+var cachedFiles = [
+ /*'/frontend/',
+ '/index.html',
+ '/manifest.json',
+ '/js/main.js',
+ '/js/production.css',
+ '/css/main.css'
+ '/frontend/css/normalize.min.css',
+ '/frontend/img/cassidy.jpg',
+ '/frontend/img/cramer.jpg',
+ '/frontend/img/duffy.jpg',
+ '/frontend/img/gabor.jpg',
+ '/frontend/img/aths.png',
+ '/frontend/img/share.png',
+ '/frontend/apple-touch-icon.png',
+ '/frontend/android-chrome-192x192.png'*/
+];
+
+self.addEventListener('install', function(evt){
+ console.log('Service Worker Install Event');
+ //Add the file to the cache
+ evt.waitUntil(
+ caches.open(cacheName).then(function(cache){
+ console.log('Caching Files');
+ return cache.addAll(cachedFiles);
+ }).then(function(){
+ return self.skipWaiting();
+ }).catch(function(err){
+ console.log('Cache Failed', err);
+ })
+ );
+});
+
+self.addEventListener('activate', function(evt){
+ console.log('Service Worker Activated');
+ evt.waitUntil(
+ caches.keys().then(function(keyList){
+ return Promise.all(keyList.map(function(key){
+ if(key !== cacheName){
+ console.log('Removing Old Cache', key);
+ return caches.delete(key)
+ }
+ }));
+ })
+ );
+ return self.clients.claim();
+});
+
+/*self.addEventListener('fetch', function(evt){
+ console.log('Fetch Event' + evt.request.url);
+ evt.respondWith(
+ caches.match(evt.request).then(function(response){
+ return response || fetch(evt.request);
+ })
+ );
+});*/
+
+function closeNotification(msg, evt){
+ console.log(msg, evt.notification.data);
+ evt.notification.close();
+}
+
+self.addEventListener('notificationclose', function(evt){
+ closeNotification('Notification Closed', evt);
+});
+
+self.addEventListener('notificationclick', function(evt){
+ if(evt.action !== 'close'){
+ evt.waitUntil(
+ self.clients.matchAll({type: 'window', includeUncontrolled: 'true'}).then(function(allClients){
+ console.log(allClients);
+ var matchingClient = null;
+ for(var i = 0; i<allClients.length; i++){
+ if(allClients[i].visibilityState === 'visible'){
+ matchingClient = allClients[i];
+ console.log('Navigating');
+ matchingClient.navigate(evt.notification.data.loc);
+ break;
+ }
+ }
+ if(matchingClient === null){
+ console.log('Opening');
+ self.clients.openWindow(evt.notification.data.loc);
+ }
+ })
+ );
+ }
+ closeNotification('Notification Clicked', evt);
+});
+
+self.addEventListener('pushsubscriptionchange', function(e) {
+ // remove the entry from DB
+ console.log(e);
+});
+
+self.addEventListener('push', function(evt){
+ console.log('Push Message Received');
+ if(evt.data){
+ console.log('Data Received');
+ var payload = JSON.parse(evt.data.text());
+ console.log(evt.data.text());
+ var options = {
+ body: payload.message,
+ icon: 'admin/survey/modules/mod_WPN/frontend/android-chrome-192x192.png',
+ data: {
+ timestamp: Date.now(),
+ loc: payload.link
+ },
+ actions: [
+ {action: 'go', title: 'Fill out'}
+ ]
+ };
+ evt.waitUntil(
+ self.registration.showNotification(payload.title, options)
+ );
+ }
+}); \ No newline at end of file
diff --git a/admin/survey/modules/mod_WPN/frontend/ui.html b/admin/survey/modules/mod_WPN/frontend/ui.html
new file mode 100644
index 0000000..dc088f5
--- /dev/null
+++ b/admin/survey/modules/mod_WPN/frontend/ui.html
@@ -0,0 +1,104 @@
+<!doctype html>
+<html lang="en-us">
+
+ <head>
+
+ <!-- Meta -->
+ <meta charset="utf-8">
+ <meta http-equiv="x-ua-compatible" content="ie=edge">
+ <meta name="viewport" content="width=device-width,initial-scale=1">
+
+ <title>Carta</title>
+ <meta name="description" content="">
+
+ <!-- The compiled CSS file -->
+ <link rel="stylesheet" href="css/production.css">
+
+ <!-- Web fonts -->
+ <link href="https://fonts.googleapis.com/css?family=Montserrat:400,400i,700|Source+Serif+Pro:700" rel="stylesheet">
+
+ <!-- favicon.ico. Place these in the root directory. -->
+ <link rel="shortcut icon" href="favicon.ico">
+
+ </head>
+
+ <body>
+
+
+ <div class="container pt3 pb3">
+
+ <!-- Colors -->
+ <section class="pb4 align--center">
+ <h2 class="text--gray pb1 border--bottom">Colors</h2>
+ <div class="pt1 pb1 text--white bg--primary-color">Primary brand color</div>
+ <div class="pt1 pb1 text--white bg--secondary-color">Secondary brand color</div>
+ <div class="pt1 pb1 text--white bg--tertiary-color">Brand accent color</div>
+ <div class="pt1 pb1 text--white bg--darkest-gray">Darkest gray</div>
+ <div class="pt1 pb1 text--white bg--dark-gray">Dark gray</div>
+ <div class="pt1 pb1 text--white bg--gray">Gray</div>
+ <div class="pt1 pb1 text--white bg--light-gray">Light gray</div>
+ <div class="pt1 pb1 bg--lightest-gray">Lightest gray</div>
+ </section>
+
+ <!-- Type -->
+ <section class="pb4 reading-font">
+ <h2 class="text--gray pb1 border--bottom">Type</h2>
+ <h1>A new take on health care for small businesses.</h1>
+ <h2>Heading 2</h2>
+ <h3>Heading 3</h3>
+ <h4>Heading 4</h4>
+ <h5>Heading 5</h5>
+ <h6>Heading 6</h6>
+ <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, semper suscipit, posuere a, pede.</p>
+ <p>Sed adipiscing ornare risus. Morbi est est, blandit sit amet, sagittis vel, euismod vel, velit. Pellentesque egestas sem. Suspendisse commodo ullamcorper magna. Ut aliquam sollicitudin leo.</p>
+ <blockquote class="blockquote">This is a blockquote. Suspendisse commodo ullamcorper magna.</blockquote>
+ <p>Lorem <sup>superscript</sup> dolor <sub>subscript</sub> amet, consectetuer adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. <cite>cite</cite>. Donec sed tellus eget sapien fringilla nonummy. <acronym title="National Basketball Association">NBA</acronym> Morbi imperdiet augue quis tellus. Suspendisse quam sem, <abbr title="Avenue">AVE</abbr> consequat at, commodo vitae, feugiat in nunc.</p>
+ <p>Morbi in sem quis dui <a class="link" href="#">placerat ornare</a>. Pellentesque odio nisi, euismod in <a class="link" href="#">pharetra</a> a, ultricies in, diam. Sed arcu. Cras consequat.</p>
+ <ul class="list--indented">
+ <li>Aliquam tincidunt mauris eu risus.</li>
+ <li>Vestibulum auctor dapibus neque.</li>
+ <li>Nunc dignissim risus id metus.</li>
+ <li>Vivamus vestibulum nulla nec ante.</li>
+ </ul>
+ <p>Morbi in sem quis dui placerat ornare. Pellentesque odio nisi, euismod in, pharetra a, ultricies in, diam. Sed arcu. Cras consequat.</p>
+ <ol class="list--indented m0">
+ <li>Integer vitae libero ac risus egestas placerat.</li>
+ <li>Praesent placerat risus quis eros.</li>
+ <li>Ut aliquam sollicitudin leo.</li>
+ <li>Donec quis dui at dolor tempor interdum.</li>
+ </ol>
+ </section>
+
+ <!-- Forms -->
+ <section class="pb4">
+ <h2 class="text--gray pb1 border--bottom">Forms</h2>
+ <form class="form">
+ <input class="form-control mb1" placeholder="Name">
+ <input class="form-control mb1" type="email" placeholder="Email Address">
+ <input class="form-control mb1" type="subject" placeholder="Subject">
+ <div class="select mb1">
+ <select>
+ <option selected="selected">Open this select</option>
+ <option>One</option>
+ <option>Two</option>
+ <option>Three</option>
+ </select>
+ </div>
+ <textarea class="form-control mb1" placeholder="Message"></textarea>
+ <button class="btn btn--default">Default</button>
+ </form>
+ </section>
+
+ <!-- Buttons -->
+ <section class="pb4">
+ <h2 class="text--gray pb1 border--bottom">Buttons</h2>
+ <a class="btn btn--default" href="">Medium Default</a>
+ <a class="btn btn--outline" href="">Medium Outline</a>
+ <a class="btn btn--default btn--sm" href="">Small Default</a>
+ </section>
+
+ </div> <!-- End container -->
+
+ </body>
+</html>
+
diff --git a/admin/survey/modules/mod_WPN/info WPN.txt b/admin/survey/modules/mod_WPN/info WPN.txt
new file mode 100644
index 0000000..9d62bf7
--- /dev/null
+++ b/admin/survey/modules/mod_WPN/info WPN.txt
@@ -0,0 +1,5 @@
+Web Push Notifications
+- Module is used for sending web push notifications to subscribers (browsers)
+- This module is using third party library: https://github.com/web-push-libs/web-push-php
+ - PHP 7.1+
+ - gmp, mbstring, curl, openssl \ No newline at end of file
diff --git a/admin/survey/modules/mod_advanced_paradata/class.SurveyAdvancedParadata.php b/admin/survey/modules/mod_advanced_paradata/class.SurveyAdvancedParadata.php
new file mode 100644
index 0000000..5368909
--- /dev/null
+++ b/admin/survey/modules/mod_advanced_paradata/class.SurveyAdvancedParadata.php
@@ -0,0 +1,145 @@
+<?php
+
+/*
+ * Modul za pregledovanje in urejanje nastavitev naprednih parapodatkov
+ *
+ */
+
+
+class SurveyAdvancedParadata {
+
+ var $anketa; # id ankete
+
+
+ function __construct($anketa){
+
+ // Ce imamo anketo
+ if ((int)$anketa > 0){
+ $this->anketa = $anketa;
+ }
+ }
+
+
+ public function displaySettings(){
+ global $lang;
+
+ $settings = $this->getSettings();
+
+ echo '<fieldset><legend>'.$lang['settings'].'</legend>';
+
+ // Belezenje post time-a
+ echo '<span class="nastavitveSpan1" >'.$lang['srv_advanced_paradata_collect_post_time'].':</span>';
+ echo '<label for="collect_post_time_0"><input type="radio" name="collect_post_time" id="collect_post_time_0" value="0" '.(($settings['collect_post_time'] == 0) ? ' checked="checked" ' : '').' />'.$lang['no1'].'</label>';
+ echo '<label for="collect_post_time_1"><input type="radio" name="collect_post_time" id="collect_post_time_1" value="1" '.(($settings['collect_post_time'] == 1) ? ' checked="checked" ' : '').' />'.$lang['yes'].'</label>';
+
+ echo '<br />';
+
+ echo '</fieldset>';
+
+
+ // Gumb shrani
+ echo '<br class="clr" />';
+ echo '<span class="floatLeft spaceRight"><div class="buttonwrapper"><a class="ovalbutton ovalbutton_orange btn_savesettings" href="#" onclick="advanced_paradata_save_settings(); return false;"><span>';
+ echo $lang['edit1337'] . '</span></a></div></span>';
+ echo '<div class="clr"></div>';
+ echo '<div id="success_save"></div>';
+
+ echo '<br />';
+
+
+ // Prikazemo parapodatke
+ $this->displayParadata();
+ }
+
+ // Pridobimo trenutne nastavitve za anketo
+ public function getSettings(){
+
+ $settings = array();
+
+ // Default vrednosti
+ $settings['collect_post_time'] = '1';
+
+ $sql = sisplet_query("SELECT * FROM srv_advanced_paradata_settings WHERE ank_id='".$this->anketa."'");
+ if(mysqli_num_rows($sql) > 0){
+ $row = mysqli_fetch_array($sql);
+
+ $settings['collect_post_time'] = $row['collect_post_time'];
+ }
+
+ return $settings;
+ }
+
+
+ private function displayParadata(){
+ global $lang;
+ global $site_url;
+
+ $sape = new SurveyAdvancedParadataExport($this->anketa);
+
+ echo '<fieldset><legend>'.$lang['srv_results'].'</legend>';
+
+ // Opcija za brisanje loga
+ echo '<p>';
+ echo ' <a href="#" onClick="advanced_paradata_data_delete(); return false;">Delete all data</a>';
+ echo '</p>';
+
+ // Po sejah po straneh
+ echo '<span class="bold">Seja na strani</span>';
+ $href_csv = 'izvoz.php?m=advanced_paradata_csv&table=srv_advanced_paradata_page&anketa=' . $this->anketa;
+ echo ' <span class="spaceLeft">(<a href="'.$href_csv.'">CSV izvoz</a>)</span>';
+ $sape->displayPageTable();
+
+ // Po vprasanjih
+ echo '<span class="bold">Vprašanja</span>';
+ $href_csv = 'izvoz.php?m=advanced_paradata_csv&table=srv_advanced_paradata_question&anketa=' . $this->anketa;
+ echo ' <span class="spaceLeft">(<a href="'.$href_csv.'">CSV izvoz</a>)</span>';
+ $sape->displayQuestionTable();
+
+ // Po vrednostih
+ echo '<span class="bold">Vrednosti</span>';
+ $href_csv = 'izvoz.php?m=advanced_paradata_csv&table=srv_advanced_paradata_vrednost&anketa=' . $this->anketa;
+ echo ' <span class="spaceLeft">(<a href="'.$href_csv.'">CSV izvoz</a>)</span>';
+ $sape->displayVrednostTable();
+
+ // Ostalo
+ echo '<span class="bold">Ostalo</span>';
+ $href_csv = 'izvoz.php?m=advanced_paradata_csv&table=srv_advanced_paradata_other&anketa=' . $this->anketa;
+ echo ' <span class="spaceLeft">(<a href="'.$href_csv.'">CSV izvoz</a>)</span>';
+ $sape->displayOtherTable();
+
+ // Premiki miske
+ echo '<span class="bold">Premiki miške</span>';
+ $href_csv = 'izvoz.php?m=advanced_paradata_csv&table=srv_advanced_paradata_movement&anketa=' . $this->anketa;
+ echo ' <span class="spaceLeft">(<a href="'.$href_csv.'">CSV izvoz</a>)</span>';
+ $sape->displayMovementTable();
+
+ // Alerti
+ echo '<span class="bold">Alerti</span>';
+ $href_csv = 'izvoz.php?m=advanced_paradata_csv&table=srv_advanced_paradata_alert&anketa=' . $this->anketa;
+ echo ' <span class="spaceLeft">(<a href="'.$href_csv.'">CSV izvoz</a>)</span>';
+ $sape->displayAlertTable();
+
+ echo '</fieldset>';
+ }
+
+
+ public function ajax() {
+
+ // Brisanje logov
+ if (isset($_GET['a']) && $_GET['a'] == 'logDataDelete') {
+
+ $sql = sisplet_query("DELETE FROM srv_advanced_paradata_page WHERE ank_id='".$this->anketa."'");
+ }
+
+ // Shranjevanje nastavitev
+ if(isset($_GET['a']) && $_GET['a'] == 'save_settings'){
+
+ $collect_post_time = isset($_POST['collect_post_time']) ? $_POST['collect_post_time'] : '1';
+
+ $sql = sisplet_query("INSERT INTO srv_advanced_paradata_settings
+ (ank_id, collect_post_time) VALUES ('".$this->anketa."', '".$collect_post_time."')
+ ON DUPLICATE KEY UPDATE collect_post_time='".$collect_post_time."'");
+ if (!$sql) echo mysqli_error($GLOBALS['connect_db']);
+ }
+ }
+} \ No newline at end of file
diff --git a/admin/survey/modules/mod_advanced_paradata/class.SurveyAdvancedParadataExport.php b/admin/survey/modules/mod_advanced_paradata/class.SurveyAdvancedParadataExport.php
new file mode 100644
index 0000000..7055b07
--- /dev/null
+++ b/admin/survey/modules/mod_advanced_paradata/class.SurveyAdvancedParadataExport.php
@@ -0,0 +1,559 @@
+<?php
+
+/*
+ * Modul za pripravo izvoza naprednih parapodatkov
+ *
+ */
+
+
+class SurveyAdvancedParadataExport {
+
+ var $anketa; // ID ankete
+
+ var $limit = 100; // Max vrstic pri izpisu
+
+
+ function __construct($anketa){
+ global $site_url;
+
+ // Ce imamo anketo
+ if ((int)$anketa > 0){
+ $this->anketa = $anketa;
+ }
+ }
+
+
+ // Izvozimo ustrezno tabelo v csv
+ public function exportTable($table_name='srv_advanced_paradata_page'){
+ global $site_path;
+
+ ini_set('memory_limit', '4048M');
+
+ // Dobimo naslove stolpcev
+ $header = $this->getHeader($table_name);
+
+
+ // Pripravimo datoteko za izvoz
+ $file = $site_path.'admin/survey/modules/mod_advanced_paradata/temp/'.$table_name.'_'.$this->anketa.'.csv';
+ $fd = fopen($file, "w");
+
+ $convertTypes = array('charSet' => 'windows-1250',
+ 'delimit' => ',',
+ 'newLine' => "\n",
+ 'BOMchar' => "\xEF\xBB\xBF");
+ # dodamo boomchar za utf-8
+ fwrite($fd, $convertTypes['BOMchar']);
+
+ // Zapisemo header row
+ $header_line = '';
+ foreach($header as $col){
+ $header_line .= $col.',';
+ }
+ $header_line = substr($header_line, 0, -1);
+ fwrite($fd, $header_line."\r\n");
+
+ // Zapisemo vsako vrstico posebej
+ // Dobimo vrstice s podatki
+ switch($table_name){
+
+ case 'srv_advanced_paradata_question':
+ $data = $this->writeQuestionParadata($fd, $header);
+ break;
+
+ case 'srv_advanced_paradata_vrednost':
+ $data = $this->writeVrednostParadata($fd, $header);
+ break;
+
+ case 'srv_advanced_paradata_other':
+ $data = $this->writeOtherParadata($fd, $header);
+ break;
+
+ case 'srv_advanced_paradata_movement':
+ $data = $this->writeMovementParadata($fd, $header);
+ break;
+
+ case 'srv_advanced_paradata_alert':
+ $data = $this->writeAlertParadata($fd, $header);
+ break;
+
+ default:
+ $data = $this->writePageParadata($fd, $header);
+ break;
+ }
+
+ fclose($fd);
+
+
+ // Pripravimo file za download
+ if(file_exists($file)){
+
+ header('Content-Description: File Transfer');
+ //header('Content-Type: application/octet-stream');
+ header('Content-Disposition: attachment; filename='.basename(''.$table_name.'_'.$this->anketa.'.csv'.''));
+
+ header("Content-type: text/x-csv; charset=utf-8");
+ //header("Content-type: text/csv");
+
+ header('Content-Transfer-Encoding: binary');
+ header('Expires: 0');
+ header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
+ header('Pragma: public');
+ header('Content-Length: ' . filesize($file));
+
+ ob_clean();
+ flush();
+
+ readfile($file);
+ }
+
+ // Na koncu pobrisemo zacasne datoteke
+ if (file_exists($file)) {
+ unlink($file);
+ }
+
+ // Ugasnemo skripto:)
+ die();
+ }
+
+
+ // Izpisemo tabelo parapodatkov vezanih na strani
+ public function displayPageTable(){
+ global $lang;
+
+ $data = $this->getPageParadata();
+
+ echo '<table class="advanced_paradata_table page_paradata styled_table">';
+
+ echo '<tr>';
+ echo '<th>ID</th>';
+ echo '<th>User ID</th>';
+ echo '<th>Page ID</th>';
+ echo '<th>Recnum</th>';
+ echo '<th>Load time</th>';
+ echo '<th>Post time</th>';
+ echo '<th>User Agent</th>';
+ echo '<th>Device pixel ratio</th>';
+ echo '<th>width x height</th>';
+ echo '<th>availWidth x availHeight</th>';
+ echo '<th>jQuery windowWidth x windowHeight</th>';
+ echo '<th>jQuery documentWidth x documentHeight</th>';
+ echo '<th>Language</th>';
+ echo '</tr>';
+
+ foreach($data as $row){
+
+ echo '<tr>';
+
+ echo '<td>'.$row['id'].'</td>';
+ echo '<td>'.$row['usr_id'].'</td>';
+ echo '<td>'.$row['gru_id'].'</td>';
+ echo '<td>'.$row['recnum'].'</td>';
+ echo '<td>'.$row['load_time'].'</td>';
+ echo '<td>'.$row['post_time'].'</td>';
+ echo '<td>'.$row['user_agent'].'</td>';
+ echo '<td>'.$row['devicePixelRatio'].'</td>';
+ echo '<td>'.$row['width'].'px X '.$row['height'].'px</td>';
+ echo '<td>'.$row['availWidth'].'px X '.$row['availHeight'].'px</td>';
+ echo '<td>'.$row['jquery_windowW'].'px X '.$row['jquery_windowH'].'px</td>';
+ echo '<td>'.$row['jquery_documentW'].'px X '.$row['jquery_documentH'].'px</td>';
+ echo '<td>'.$row['language'].'</td>';
+
+ echo '</tr>';
+ }
+
+ echo '</table>';
+ }
+ // Izpisemo tabelo parapodatkov vezanih na vprasanja
+ public function displayQuestionTable(){
+
+ $data = $this->getQuestionParadata();
+
+ echo '<table class="advanced_paradata_table question_paradata styled_table">';
+
+ echo '<tr>';
+ echo '<th>Page session ID</th>';
+ echo '<th>Question ID</th>';
+ echo '<th>Order</th>';
+ echo '</tr>';
+
+ foreach($data as $row){
+
+ echo '<tr>';
+
+ echo '<td>'.$row['page_id'].'</td>';
+ echo '<td>'.$row['spr_id'].'</td>';
+ echo '<td>'.$row['vre_order'].'</td>';
+
+ echo '</tr>';
+ }
+
+ echo '</table>';
+ }
+
+ // Izpisemo tabelo parapodatkov vezanih na vredosti
+ public function displayVrednostTable(){
+
+ $data = $this->getVrednostParadata();
+
+ echo '<table class="advanced_paradata_table vrednost_paradata styled_table">';
+
+ echo '<tr>';
+ echo '<th>Page session ID</th>';
+ echo '<th>Question ID</th>';
+ echo '<th>Vrednost ID</th>';
+ echo '<th>Time</th>';
+ echo '<th>Event</th>';
+ echo '<th>Value</th>';
+ echo '</tr>';
+
+ foreach($data as $row){
+
+ echo '<tr>';
+
+ echo '<td>'.$row['page_id'].'</td>';
+ echo '<td>'.$row['spr_id'].'</td>';
+ echo '<td>'.$row['vre_id'].'</td>';
+ echo '<td>'.$row['time'].'</td>';
+ echo '<td>'.$row['event'].'</td>';
+ echo '<td>'.$row['value'].'</td>';
+
+ echo '</tr>';
+ }
+
+ echo '</table>';
+ }
+
+ // Izpisemo tabelo ostalih parapodatkov
+ public function displayOtherTable(){
+
+ $data = $this->getOtherParadata();
+
+ echo '<table class="advanced_paradata_table other_paradata styled_table">';
+
+ echo '<tr>';
+ echo '<th>Page session ID</th>';
+ echo '<th>Time</th>';
+ echo '<th>Event</th>';
+ echo '<th>Value</th>';
+ echo '<th>Position</th>';
+ echo '<th>Element type</th>';
+ echo '<th>Element id</th>';
+ echo '<th>Element class</th>';
+ echo '</tr>';
+
+ foreach($data as $row){
+
+ echo '<tr>';
+
+ echo '<td>'.$row['page_id'].'</td>';
+ echo '<td>'.$row['time'].'</td>';
+ echo '<td>'.$row['event'].'</td>';
+ echo '<td>'.$row['value'].'</td>';
+ echo '<td>X: '.$row['pos_x'].', Y: '.$row['pos_y'].'</td>';
+ echo '<td>'.$row['div_type'].'</td>';
+ echo '<td>'.$row['div_id'].'</td>';
+ echo '<td>'.$row['div_class'].'</td>';
+
+ echo '</tr>';
+ }
+
+ echo '</table>';
+ }
+
+ // Izpisemo tabelo premikov miske
+ public function displayMovementTable(){
+
+ $data = $this->getMovementParadata();
+
+ echo '<table class="advanced_paradata_table movement_paradata styled_table">';
+
+ echo '<tr>';
+ echo '<th>Page session ID</th>';
+ echo '<th>Time start</th>';
+ echo '<th>Time end</th>';
+ echo '<th>Position start</th>';
+ echo '<th>Position end</th>';
+ echo '<th>Distance traveled</th>';
+ echo '</tr>';
+
+ foreach($data as $row){
+
+ echo '<tr>';
+
+ echo '<td>'.$row['page_id'].'</td>';
+ echo '<td>'.$row['time_start'].'</td>';
+ echo '<td>'.$row['time_end'].'</td>';
+ echo '<td>X: '.$row['pos_x_start'].', Y: '.$row['pos_y_start'].'</td>';
+ echo '<td>X: '.$row['pos_x_end'].', Y: '.$row['pos_y_end'].'</td>';
+ echo '<td>'.$row['distance'].'</td>';
+
+ echo '</tr>';
+ }
+
+ echo '</table>';
+ }
+
+ // Izpisemo tabelo ostalih parapodatkov
+ public function displayAlertTable(){
+
+ $data = $this->getAlertParadata();
+
+ echo '<table class="advanced_paradata_table alert_paradata styled_table">';
+
+ echo '<tr>';
+ echo '<th>Page session ID</th>';
+ echo '<th>Display time</th>';
+ echo '<th>Close time</th>';
+ echo '<th>Type</th>';
+ echo '<th>Trigger ID</th>';
+ echo '<th>Trigger type</th>';
+ echo '<th>Ignorable</th>';
+ echo '<th>Alert text</th>';
+ echo '<th>User action</th>';
+ echo '</tr>';
+
+ foreach($data as $row){
+
+ echo '<tr>';
+
+ echo '<td>'.$row['page_id'].'</td>';
+ echo '<td>'.$row['time_display'].'</td>';
+ echo '<td>'.$row['time_close'].'</td>';
+ echo '<td>'.$row['type'].'</td>';
+ echo '<td>'.$row['trigger_id'].'</td>';
+ echo '<td>'.$row['trigger_type'].'</td>';
+ echo '<td>'.$row['ignorable'].'</td>';
+ echo '<td>'.$row['text'].'</td>';
+ echo '<td>'.$row['action'].'</td>';
+
+ echo '</tr>';
+ }
+
+ echo '</table>';
+ }
+
+
+ // Pridobimo naslove parapodatkov vezane na strani
+ private function getHeader($table_name='srv_advanced_paradata_page'){
+
+ $header = array();
+
+ $sql = sisplet_query("SHOW columns FROM ".$table_name."");
+ while($row = mysqli_fetch_array($sql)){
+ $header[] = $row['Field'];
+ }
+
+ return $header;
+ }
+
+ // Pridobimo parapodatke vezane na strani
+ private function getPageParadata($all=false){
+
+ $data = array();
+
+ $limit = $all ? '' : ' LIMIT '.$this->limit;
+
+ $sql = sisplet_query("SELECT * FROM srv_advanced_paradata_page
+ WHERE ank_id='".$this->anketa."'
+ ORDER BY id DESC ".$limit."");
+ while($row = mysqli_fetch_array($sql)){
+ $data[] = $row;
+ }
+
+ return $data;
+ }
+
+ // Pridobimo parapodatke vezane na vprasanja
+ private function getQuestionParadata($all=false){
+
+ $data = array();
+
+ $limit = $all ? '' : ' LIMIT '.$this->limit;
+
+ $sql = sisplet_query("SELECT q.* FROM srv_advanced_paradata_question q, srv_advanced_paradata_page p
+ WHERE p.ank_id='".$this->anketa."' AND q.page_id=p.id
+ ORDER BY id DESC ".$limit."");
+ while($row = mysqli_fetch_array($sql)){
+ $data[] = $row;
+ }
+
+ return $data;
+ }
+
+ // Pridobimo parapodatke vezane na vrednosti v vprasanju
+ private function getVrednostParadata($all=false){
+
+ $data = array();
+
+ $limit = $all ? '' : ' LIMIT '.$this->limit;
+
+ $sql = sisplet_query("SELECT v.* FROM srv_advanced_paradata_vrednost v, srv_advanced_paradata_page p
+ WHERE p.ank_id='".$this->anketa."' AND v.page_id=p.id
+ ORDER BY id DESC ".$limit."");
+ while($row = mysqli_fetch_array($sql)){
+ $data[] = $row;
+ }
+
+ return $data;
+ }
+
+ // Pridobimo ostale parapodatke
+ private function getOtherParadata($all=false){
+
+ $data = array();
+
+ $limit = $all ? '' : ' LIMIT '.$this->limit;
+
+ $sql = sisplet_query("SELECT o.* FROM srv_advanced_paradata_other o, srv_advanced_paradata_page p
+ WHERE p.ank_id='".$this->anketa."' AND o.page_id=p.id
+ ORDER BY id DESC ".$limit."");
+ while($row = mysqli_fetch_array($sql)){
+ $data[] = $row;
+ }
+
+ return $data;
+ }
+
+ // Pridobimo parapodatke premikov miske
+ private function getMovementParadata($all=false){
+
+ $data = array();
+
+ $limit = $all ? '' : ' LIMIT '.$this->limit;
+
+ $sql = sisplet_query("SELECT m.* FROM srv_advanced_paradata_movement m, srv_advanced_paradata_page p
+ WHERE p.ank_id='".$this->anketa."' AND m.page_id=p.id
+ ORDER BY id DESC ".$limit."");
+ while($row = mysqli_fetch_array($sql)){
+ $data[] = $row;
+ }
+
+ return $data;
+ }
+
+ // Pridobimo parapodatke alertov
+ private function getAlertParadata($all=false){
+
+ $data = array();
+
+ $limit = $all ? '' : ' LIMIT '.$this->limit;
+
+ $sql = sisplet_query("SELECT a.* FROM srv_advanced_paradata_alert a, srv_advanced_paradata_page p
+ WHERE p.ank_id='".$this->anketa."' AND a.page_id=p.id
+ ORDER BY id DESC ".$limit."");
+ while($row = mysqli_fetch_array($sql)){
+ $data[] = $row;
+ }
+
+ return $data;
+ }
+
+
+ // Zapisemo v datoteko parapodatke vezane na strani
+ private function writePageParadata($fd, $header){
+
+ $sql = sisplet_query("SELECT * FROM srv_advanced_paradata_page
+ WHERE ank_id='".$this->anketa."'
+ ORDER BY id DESC ".$limit."");
+ while($row = mysqli_fetch_array($sql)){
+
+ $data_line = '';
+ foreach($header as $col){
+ $data_line .= '\''.$row[$col].'\',';
+ }
+ $data_line = substr($data_line, 0, -1);
+
+ fwrite($fd, $data_line."\r\n");
+ }
+ }
+
+ // Zapisemo v datoteko parapodatke vezane na vprasanja
+ private function writeQuestionParadata($fd, $header){
+
+ $sql = sisplet_query("SELECT q.* FROM srv_advanced_paradata_question q, srv_advanced_paradata_page p
+ WHERE p.ank_id='".$this->anketa."' AND q.page_id=p.id
+ ORDER BY id DESC ".$limit."");
+ while($row = mysqli_fetch_array($sql)){
+
+ $data_line = '';
+ foreach($header as $col){
+ $data_line .= '\''.$row[$col].'\',';
+ }
+ $data_line = substr($data_line, 0, -1);
+
+ fwrite($fd, $data_line."\r\n");
+ }
+ }
+
+ // Zapisemo v datoteko parapodatke vezane na vrednosti v vprasanju
+ private function writeVrednostParadata($fd, $header){
+
+ $sql = sisplet_query("SELECT v.* FROM srv_advanced_paradata_vrednost v, srv_advanced_paradata_page p
+ WHERE p.ank_id='".$this->anketa."' AND v.page_id=p.id
+ ORDER BY id DESC ".$limit."");
+ while($row = mysqli_fetch_array($sql)){
+
+ $data_line = '';
+ foreach($header as $col){
+ $data_line .= '\''.$row[$col].'\',';
+ }
+ $data_line = substr($data_line, 0, -1);
+
+ fwrite($fd, $data_line."\r\n");
+ }
+ }
+
+ // Zapisemo v datoteko ostale parapodatke
+ private function writeOtherParadata($fd, $header){
+
+ $sql = sisplet_query("SELECT o.* FROM srv_advanced_paradata_other o, srv_advanced_paradata_page p
+ WHERE p.ank_id='".$this->anketa."' AND o.page_id=p.id
+ ORDER BY id DESC ".$limit."");
+ while($row = mysqli_fetch_array($sql)){
+
+ $data_line = '';
+ foreach($header as $col){
+ $data_line .= '\''.$row[$col].'\',';
+ }
+ $data_line = substr($data_line, 0, -1);
+
+ fwrite($fd, $data_line."\r\n");
+ }
+ }
+
+ // Zapisemo v datoteko parapodatke premikov miske
+ private function writeMovementParadata($fd, $header){
+
+ $sql = sisplet_query("SELECT m.* FROM srv_advanced_paradata_movement m, srv_advanced_paradata_page p
+ WHERE p.ank_id='".$this->anketa."' AND m.page_id=p.id
+ ORDER BY id DESC ".$limit."");
+ while($row = mysqli_fetch_array($sql)){
+
+ $data_line = '';
+ foreach($header as $col){
+ $data_line .= '\''.$row[$col].'\',';
+ }
+ $data_line = substr($data_line, 0, -1);
+
+ fwrite($fd, $data_line."\r\n");
+ }
+ }
+
+ // Zapisemo v datoteko parapodatke alertov
+ private function writeAlertParadata($fd, $header){
+
+ $sql = sisplet_query("SELECT a.* FROM srv_advanced_paradata_alert a, srv_advanced_paradata_page p
+ WHERE p.ank_id='".$this->anketa."' AND a.page_id=p.id
+ ORDER BY id DESC ".$limit."");
+ while($row = mysqli_fetch_array($sql)){
+
+ $data_line = '';
+ foreach($header as $col){
+ $data_line .= '\''.$row[$col].'\',';
+ }
+ $data_line = substr($data_line, 0, -1);
+
+ fwrite($fd, $data_line."\r\n");
+ }
+ }
+} \ No newline at end of file
diff --git a/admin/survey/modules/mod_advanced_paradata/class.SurveyAdvancedParadataLog.php b/admin/survey/modules/mod_advanced_paradata/class.SurveyAdvancedParadataLog.php
new file mode 100644
index 0000000..267231a
--- /dev/null
+++ b/admin/survey/modules/mod_advanced_paradata/class.SurveyAdvancedParadataLog.php
@@ -0,0 +1,309 @@
+<?php
+
+/*
+ * Modul za beleženje naprednih parapodatkov med izpolnjevanjem ankete
+ *
+ */
+
+class SurveyAdvancedParadataLog {
+
+
+ private static $instance = false;
+
+ private $collectParadata = false;
+
+ private $anketa = 0;
+ private $session_id = 0;
+
+
+ // Privatni construct, ki ga 1x poklice getInstance
+ private function __construct (/*$anketa*/) {
+
+ /*ini_set('display_errors', 1);
+ ini_set('display_startup_errors', 1);
+ error_reporting(E_ALL);*/
+
+ // Ce imamo anketo
+ /*if ((int)$anketa > 0){
+ $this->anketa = $anketa;
+ }*/
+
+ $this->anketa = (int)$_REQUEST['anketa'];
+ //$this->anketa = $anketa_id;
+
+ if($this->anketa > 0){
+ SurveyInfo::getInstance()->SurveyInit($this->anketa);
+ $this->collectParadata = (SurveyInfo::getInstance()->checkSurveyModule('advanced_paradata')) ? true : false;
+ }
+ else
+ throw new Exception('Survey ID not set in class.SurveyAdvancedParadataLog.php !');
+ }
+
+ // Vrne instanco classa - da mamo singleton
+ public static function getInstance () {
+
+ if (!self::$instance)
+ self::$instance = new SurveyAdvancedParadataLog();
+
+ return self::$instance;
+ }
+
+ // Vrne ce zbiramo napredne parapodatke
+ public function paradataEnabled(){
+ return $this->collectParadata;
+ }
+
+ // Vrne ce zbiramo post time
+ public function collectPostTime(){
+
+ $collectPostTime = true;
+
+ $sql = sisplet_query("SELECT collect_post_time FROM srv_advanced_paradata_settings WHERE ank_id='".$this->anketa."'");
+ if(mysqli_num_rows($sql) > 0){
+
+ $row = mysqli_fetch_array($sql);
+
+ if($row['collect_post_time'] == '0')
+ $collectPostTime = false;
+ }
+
+ return $collectPostTime;
+ }
+
+
+ // Ustvarimo polje v bazi za session (vezan na load posamezne strani) in nastavimo session_id za js
+ public function prepareLogging () {
+
+ $user_agent = $_SERVER['HTTP_USER_AGENT'];
+
+ // Vstavimo v bazo novo polje za session na strani
+ $sql = sisplet_query("INSERT INTO srv_advanced_paradata_page (ank_id, load_time, user_agent) VALUES ('".$this->anketa."', NOW(3), '".$user_agent."')");
+
+ if (!$sql){
+ echo mysqli_error($GLOBALS['connect_db']);
+ }
+ else{
+ // Nastavimo session_id
+ $this->session_id = mysqli_insert_id($GLOBALS['connect_db']);
+
+ // Nastavimo session_id se za JS
+ echo '<script> var _session_id = '.$this->session_id.'; </script>';
+ }
+ }
+
+ // Zapiše log v bazo
+ public function logData ($event_type, $event, $data) {
+
+ switch ($event_type) {
+
+ case 'page':
+ $this->logDataPage($event, $data);
+ break;
+
+ case 'question':
+ $this->logDataQuestion($event, $data);
+ break;
+
+ case 'vrednost':
+ $this->logDataVrednost($event, $data);
+ break;
+
+ case 'other':
+ $this->logDataOther($event, $data);
+ break;
+
+ case 'movement':
+ $this->logDataMovement($event, $data);
+ break;
+
+ case 'alert':
+ $this->logDataAlert($event, $data);
+ break;
+ }
+ }
+
+ // Zabelezimo dogodek na nivoju strani
+ private function logDataPage($event, $data){
+
+ $update = '';
+
+ // Nastavimo katere parametre updatamo
+ switch($event){
+ case 'load_page':
+ $update = " gru_id = '".$data['page']."',
+ usr_id = '".$data['usr_id']."',
+ recnum = '".$data['recnum']."',
+ language = '".$data['language']."',
+ load_time = '".$data['timestamp']."',
+ devicePixelRatio = '".$data['data']['devicePixelRatio']."',
+ width = '".$data['data']['width']."',
+ height = '".$data['data']['height']."',
+ availWidth = '".$data['data']['availWidth']."',
+ availHeight = '".$data['data']['availHeight']."',
+ jquery_windowW = '".$data['data']['jquery_windowW']."',
+ jquery_windowH = '".$data['data']['jquery_windowH']."',
+ jquery_documentW = '".$data['data']['jquery_documentW']."',
+ jquery_documentH = '".$data['data']['jquery_documentH']."'";
+ break;
+
+ case 'unload_page':
+ $update = " post_time='".$data['timestamp']."' ";
+ break;
+ }
+
+ $sql = sisplet_query("UPDATE srv_advanced_paradata_page SET ".$update." WHERE id='$this->session_id'");
+ if (!$sql) echo mysqli_error($GLOBALS['connect_db']);
+
+ /*var_dump($data);
+ echo "UPDATE srv_advanced_paradata_page SET ".$update." WHERE id='$this->session_id'";*/
+ }
+
+ // Zabelezimo dogodek na nivoju vprasanja
+ private function logDataQuestion($event, $data){
+
+ // Preverimo, ce gre ya vprasanje v ifu - potem se preveri da se zapise samo 1x
+ $sqlU = sisplet_query("SELECT p.id
+ FROM srv_advanced_paradata_page p, srv_advanced_paradata_question q
+ WHERE p.usr_id='".$data['usr_id']."' AND p.id=q.page_id AND q.spr_id='".$data['data']['spr_id']."'
+ ");
+
+ // Ce se nimamo vnosa za vprasanje in userja zapisemo
+ if(mysqli_num_rows($sqlU) == 0){
+
+ $sql = sisplet_query("INSERT INTO srv_advanced_paradata_question
+ (page_id, spr_id, vre_order)
+ VALUES
+ ('".$this->session_id."', '".$data['data']['spr_id']."', '".$data['data']['vre_order']."')");
+ if (!$sql) echo mysqli_error($GLOBALS['connect_db']);
+ }
+ }
+
+ // Zabelezimo dogodek na nivoju vrednosti vprasanja
+ private function logDataVrednost($event, $data){
+
+ $value = isset($data['data']['value']) ? $data['data']['value'] : '';
+
+ $sql = sisplet_query("INSERT INTO srv_advanced_paradata_vrednost
+ (page_id, spr_id, vre_id, time, event, value)
+ VALUES
+ ('".$this->session_id."', '".$data['data']['spr_id']."', '".$data['data']['vre_id']."', '".$data['timestamp']."', '".$event."', '".$value."')");
+ if (!$sql) echo mysqli_error($GLOBALS['connect_db']);
+ }
+
+ // Zabelezimo ostale dogodke
+ private function logDataOther($event, $data){
+
+ $value = isset($data['data']['value']) ? $data['data']['value'] : '';
+ $pos_x = isset($data['data']['pos_x']) ? $data['data']['pos_x'] : '';
+ $pos_y = isset($data['data']['pos_y']) ? $data['data']['pos_y'] : '';
+ $div_type = isset($data['data']['div_type']) ? $data['data']['div_type'] : '';
+ $div_id = isset($data['data']['div_id']) ? $data['data']['div_id'] : '';
+ $div_class = isset($data['data']['div_class']) ? $data['data']['div_class'] : '';
+
+ $sql = sisplet_query("INSERT INTO srv_advanced_paradata_other
+ (page_id, time, event, value, pos_x, pos_y, div_type, div_id, div_class)
+ VALUES
+ ('".$this->session_id."', '".$data['timestamp']."', '".$event."', '".$value."', '".$pos_x."', '".$pos_y."', '".$div_type."', '".$div_id."', '".$div_class."')");
+ if (!$sql) echo mysqli_error($GLOBALS['connect_db']);
+ }
+
+ // Zabelezimo premike miske
+ private function logDataMovement($event, $data){
+
+ $time_start_raw = mysqli_real_escape_string($GLOBALS['connect_db'], $data['data']['time_start']);
+ $time_start = date("Y-m-d H:i:s", $time_start_raw/1000).'.'.substr($time_start_raw, -3);
+
+ $time_end_raw = mysqli_real_escape_string($GLOBALS['connect_db'], $data['data']['time_end']);
+ $time_end = date("Y-m-d H:i:s", $time_end_raw/1000).'.'.substr($time_end_raw, -3);
+
+ $pos_x_start = isset($data['data']['pos_x_start']) ? $data['data']['pos_x_start'] : '';
+ $pos_y_start = isset($data['data']['pos_y_start']) ? $data['data']['pos_y_start'] : '';
+ $pos_x_end = isset($data['data']['pos_x_end']) ? $data['data']['pos_x_end'] : '';
+ $pos_y_end = isset($data['data']['pos_y_end']) ? $data['data']['pos_y_end'] : '';
+ $distance = isset($data['data']['distance']) ? $data['data']['distance'] : '';
+
+ $sql = sisplet_query("INSERT INTO srv_advanced_paradata_movement
+ (page_id, time_start, time_end, pos_x_start, pos_y_start, pos_x_end, pos_y_end, distance)
+ VALUES
+ ('".$this->session_id."', '".$time_start."', '".$time_end."', '".$pos_x_start."', '".$pos_y_start."', '".$pos_x_end."', '".$pos_y_end."', '".$distance."')");
+ if (!$sql) echo mysqli_error($GLOBALS['connect_db']);
+ }
+
+ // Zabelezimo alerte
+ private function logDataAlert($event, $data){
+
+ $type = isset($data['data']['type']) ? $data['data']['type'] : '';
+ $trigger_id = isset($data['data']['trigger_id']) ? $data['data']['trigger_id'] : 0;
+ $trigger_type = isset($data['data']['trigger_type']) ? $data['data']['trigger_type'] : '';
+ $ignorable = isset($data['data']['ignorable']) ? $data['data']['ignorable'] : 0;
+ $text = isset($data['data']['text']) ? $data['data']['text'] : '';
+ $action = isset($data['data']['action']) ? $data['data']['action'] : '';
+
+ $timestamp_display_raw = isset($data['data']['time_display']) ? $data['data']['time_display'] : '';
+ $timestamp_display = date("Y-m-d H:i:s", $timestamp_display_raw/1000).'.'.substr($timestamp_display_raw, -3);
+
+ $sql = sisplet_query("INSERT INTO srv_advanced_paradata_alert
+ (page_id, time_display, time_close, type, trigger_id, trigger_type, ignorable, text, action)
+ VALUES
+ ('".$this->session_id."', '".$timestamp_display."', '".$data['timestamp']."', '".$type."', '".$trigger_id."', '".$trigger_type."', '".$ignorable."', '".$text."', '".$action."')");
+ if (!$sql) echo mysqli_error($GLOBALS['connect_db']);
+ }
+
+
+ // Izpise link na javascript datoteko v header htmlja
+ public function linkJavaScript() {
+ global $site_url;
+
+ // Osnovni js za belezenje parapodatkov
+ echo ' <script src="'.$site_url.'admin/survey/modules/mod_advanced_paradata/js/advanced_paradata.js"></script>'."\n";
+
+ // Belezenje post tima (upocasni prehode cez strani)
+ if($this->collectPostTime())
+ echo ' <script src="'.$site_url.'admin/survey/modules/mod_advanced_paradata/js/advanced_paradata_postTime.js"></script>'."\n";
+
+ // JS za belezenje alertov
+ echo ' <script src="'.$site_url.'admin/survey/modules/mod_advanced_paradata/js/sledenjeOpozoril.js"></script>'."\n";
+ }
+
+ // Izpise trenutno grupo v JS
+ public function displayGrupa ($grupa) {
+
+ echo '<script> var srv_meta_grupa_id = '.$grupa.'; </script>';
+ }
+
+
+ // Ajax klici
+ public function ajax() {
+
+ if ($_GET['a'] == 'logData') {
+ $this->ajax_logData();
+ }
+ }
+
+ // Logiranje eventa
+ private function ajax_logData () {
+
+ $this->session_id = $_POST['session_id'];
+
+ $event_type = mysqli_real_escape_string($GLOBALS['connect_db'], $_POST['event_type']);
+ $event = mysqli_real_escape_string($GLOBALS['connect_db'], $_POST['event']);
+
+ $timestamp_raw = mysqli_real_escape_string($GLOBALS['connect_db'], $_POST['timestamp']);
+ $timestamp = date("Y-m-d H:i:s", $timestamp_raw/1000).'.'.substr($timestamp_raw, -3);
+
+ $data_array = array(
+ 'page' => mysqli_real_escape_string($GLOBALS['connect_db'], $_POST['page']),
+ 'usr_id' => mysqli_real_escape_string($GLOBALS['connect_db'], $_POST['usr_id']),
+ 'recnum' => mysqli_real_escape_string($GLOBALS['connect_db'], $_POST['recnum']),
+ 'language' => mysqli_real_escape_string($GLOBALS['connect_db'], $_POST['language']),
+ 'timestamp' => $timestamp,
+ 'data' => $_POST['data']
+ );
+
+ var_dump($_POST);
+
+ $this->logData($event_type, $event, $data_array);
+ }
+}
+
+?> \ No newline at end of file
diff --git a/admin/survey/modules/mod_advanced_paradata/docs/Specifikacija parapodatkov.xml b/admin/survey/modules/mod_advanced_paradata/docs/Specifikacija parapodatkov.xml
new file mode 100644
index 0000000..4481add
--- /dev/null
+++ b/admin/survey/modules/mod_advanced_paradata/docs/Specifikacija parapodatkov.xml
@@ -0,0 +1,165 @@
+<!--
+ - Zaenkrat je specifikacija v XML formatu, ampak to je samo za prikaz,
+ kaj bi radi imeli. O končnem formatu izvoza se bomo še zmenili.
+ - Kjerkoli se beleži čas dogodka (timestamp), naj se kolikor natančno JavaScript omogoča.
+ Če lahko v milisekundah, naj bodo milisekunde. Tako kot je zdaj, ko se beležijo
+ sekunde, je premalo natančno in je težko dogodke razvrstit po času.
+ - Format timestampa naj bo standarden (recimo YYYY-MM-DD hh:mm:ss.sss)
+ - Stvari označene z (?) niso tako bistvene ali pa jih je treba še bolj definirat,
+ zato te zaenkrat pustimo. Razen, če je kaj čisto trivialnega za naredit. -->
+
+<respondent id="" recnum="">
+ <page id="">
+ <!-- Timestamp, ko se je stran naložila-->
+ <load_time></load_time>
+
+ <!-- (?) Ali se je stran naložila zaradi refresha -->
+ <refresh>True | False</refresh>
+
+ <!-- Jezik ankete, ki je uporabljen na tej strani. V principu lahko
+ vmes spremeni jezik in je kul, da vemo, če se to zgodi. -->
+ <language></language>
+
+ <!-- A se da prebrati nek ID sessiona? Recimo, vidim da:
+ - je v anketi brez kukijev nek dolg parameter v URL (6a515eaaa86e2cfdd207b56fb25352d2)
+ - je v anketi s kukiji podoben parameter v contentu kukija (194ca1f075ca168711b93f3168d4f868)
+ Če bi nam to pomagalo kasneje pri definiranju sessionov, bi bilo zelo fajn
+ shranit tak parameter. -->
+ <session_id></session_id>
+
+ <!-- uas, screen_resolution, window_size, screen_orientation,
+ device_orientation so zaenkrat predvideni, da se zabeležijo samo
+ ob nalaganju strani. Kasneje morda dodamo tudi sproti ob vsaki
+ spremembi, zato že zdaj shranimo tudi čas, ko se ta podatek
+ zabeleži. -->
+
+ <!-- Celoten user-agent string -->
+ <uas></uas>
+
+ <!-- Ločljivost zaslona. -->
+ <screen_resolution>
+ <time></time>
+ <res>h_res, v_res</res>
+ </screen_resolution>
+
+ <!-- Velikost okna brskalnika. -->
+ <window_size>
+ <time></time>
+ <size>h_size, v_size</size>
+ </window_size>
+
+ <!-- (?) Orientacija zaslona.
+ Vprašanje je, ali to sploh rabimo eksplicitno zabeležit ob prihodu na stran.
+ To lahko namreč raberemo iz h_res in v_res zgoraj. Drugo je, če bi to
+ kasneje naredili, da se zabeleži real-time ob vsaki spremembi. -->
+ <screen_orientation>
+ <time></time>
+ <orient>portrait | landscape</orient>
+ </screen_orientation>
+
+ <!-- (?) TABLICA/TELEFON: Orientacija naprave. -->
+ <device_orientation>
+ <time></time>
+ <orient>x_coord, y_coord, z_coord</orient>
+ </device_orientation>
+
+ <!-- (?) Zaporedje prikaza randomiziranih vprašanj na strani.
+ Zapišejo se IDji vprašanj v takšnem zaporedju kot so prikazana na strani. -->
+ <rand_q_order>q_id_3, q_id_1, q_id_2</rand_q_order>
+
+ <!-- Zaporedje prikaza randomiziranih odgovorov na strani.
+ Vnos se naredi za vsako vprašanje z randomizacijo odgovorov posebej.
+ Pri randomiziranih vrsticah v gridih so navedeni IDji spremenljivk (vrstic). -->
+ <rand_resp_order q_id="">val_3, val_1, val_2, val_5, val_4</rand_resp_order>
+ <rand_resp_order q_id="">var_id_3, var_id_4, var_id_2, var_id_1</rand_resp_order>
+
+ <!-- Izbor odgovora (zaprt tip vprašanja). Shrani se ob vsakem izboru
+ odgovora, da lahko tako sledimo vse spremembe odgovorov.
+ q_id: id vprašanja
+ var_id: id spremenljivke
+ Če lahko question id dobimo iz id spremenljivke, lahko q_id izpustimo.
+ -->
+ <response q_id ="" var_id="">
+ <!-- Timestamp, ko je izbral določen odgovor -->
+ <time></time>
+
+ <!-- Vrednost odgovora kot je določena v 1KA. Za checkbox je 1: označil, 0: odznačil -->
+ <value></value>
+
+ </response>
+
+ <!-- Vnos odgovora (odprt tip vprašanja). Shrani se ob vsakem izboru / kliku
+ na vnosno polje.
+ Če lahko question id dobimo iz id spremenljivke, lahko q_id izpustimo.
+ -->
+ <response q_id ="" var_id="">
+ <!-- Timestamp vstopa v vnosno polje -->
+ <focus_in_time></focus_in_time>
+
+ <!-- Timestamp izstopa iz vnosnega polja -->
+ <focus_out_time></focus_out_time>
+
+ <!-- Vnesen tekst ob izstopu iz polja -->
+ <text></text>
+ </response>
+
+ <!-- Lost in got fokus za okno browserja oziroma za tab. Shrani se vsakič, ko
+ anketiranec zapusti oziroma pride nazaj v browser/tab z anketo-->
+ <lost_focus_time></lost_focus_time>
+ <got_focus_time></got_focus_time>
+
+ <!-- Prikaz sporočil (alertov) anketirancu. Zabeleži se ob vsakem
+ prikazu sporočila. -->
+ <message>
+ <time></time>
+
+ <!-- Za kateri tip alerta gre (neodgovor, neveljaven številski vnos, validacija...) -->
+ <type>nonresponse | num range | validation</type>
+
+ <!-- Kaj je sprožilo to obvestilo (npr. katero vprašanje
+ ali katera validacija. -->
+ <trigger_type>question | variable | validation</trigger_type>
+ <trigger>q_id | var_id | validaton_id</trigger>
+
+ <!-- A lahko skensla obvestilo. V bistvu soft alert = True, hard alert = False -->
+ <ignorable>True | False</ignorable>
+
+ <!-- (?) Besedilo prikazanega obvestila -->
+ <text>Message text</text>
+
+ <!-- (?) Kateri gumb je kliknil - relevantno samo za soft alerte -->
+ <action>ok | cancel</action>
+ </message>
+
+ <!-- Klik kjerkoli na strani. Zabeleži se vsak klik event, s katerimkoli
+ gumbom miške. Če je to problem, lahko zaenkrat samo leve klike,
+ toliko da testiramo. -->
+ <click>
+ <time></time>
+
+ <!-- (?) Za kakšen klik gre. S tem se bomo ubadali kasneje, ko bomo
+ videli, kako ta reč deluje in kako je na mobilnih napravah. Če je pa to
+ dokaj trivialno zabeležit, se lahko tudi kar doda. -->
+ <type>single | double | right | middle | tap</type>
+
+ <!-- Koordinate klika na strani. -->
+ <location>X, Y</location>
+
+ <!-- Kaj je tam, kjer je kliknil. Zanekrat se mi zdi najlažje, da vrne
+ div_class in div_id po potrebi pa kasneje spremenimo v kaj bolj
+ user-friendly. -->
+ <div_class></div_class>
+ <div_id></div_id>
+ </click>
+
+ <!-- Timestamp, ko je stran postana -->
+ <post_time></post_time>
+
+
+ </page>
+</respondent>
+
+
+
+
+
diff --git a/admin/survey/modules/mod_advanced_paradata/js/advanced_paradata.js b/admin/survey/modules/mod_advanced_paradata/js/advanced_paradata.js
new file mode 100644
index 0000000..eb93c09
--- /dev/null
+++ b/admin/survey/modules/mod_advanced_paradata/js/advanced_paradata.js
@@ -0,0 +1,556 @@
+// Glavna funkcija, ki se vedno klice za logiranje
+function logEvent(event_type, event, data){
+
+ //console.log(event_type + ' ' + event + ' ' + _session_id);
+
+ // Pridobimo id sessiona na strani
+ var session_id = _session_id;
+
+ // Pridobimo id ankete
+ var anketa = $('#srv_meta_anketa_id').val();
+
+ // Pridobimo trenutno stran
+ if (typeof srv_meta_grupa_id != 'undefined'){
+ var page = srv_meta_grupa_id;
+ }
+ else if ($('#outercontainer').hasClass('intro')){
+ var page = '-1';
+ }
+ else if ($('#outercontainer').hasClass('concl')){
+ var page = '-2';
+ }
+ else{
+ var page = '0';
+ }
+
+ // Pridobimo user id, recnum in jezik
+ var user = _usr_id;
+ var recnum = _recnum;
+ var language = _lang;
+
+ // Zabelezimo cas dogodka
+ var timestamp = Date.now();
+
+ // Opcijski parameter data
+ data = data || '';
+
+
+ // Pri submit oz unload eventu mora biti klic sinhron
+ if(event == 'unload_page'){
+ $.ajax({
+ type: 'POST',
+ url: '../main/survey/ajax.php?t=parapodatki&a=logData',
+ data: {
+ session_id: session_id,
+ anketa: anketa,
+ page: page,
+ usr_id: user,
+ recnum: recnum,
+ language: language,
+
+ event_type: event_type,
+ event: event,
+ timestamp: timestamp,
+
+ data: data
+ },
+ /*success: success,
+ dataType: dataType,*/
+ async: false
+ });
+ }
+ else{
+ $.post('../main/survey/ajax.php?t=parapodatki&a=logData', {
+ session_id: session_id,
+ anketa: anketa,
+ page: page,
+ usr_id: user,
+ recnum: recnum,
+ language: language,
+
+ event_type: event_type,
+ event: event,
+ timestamp: timestamp,
+
+ data: data
+ });
+ }
+}
+
+
+// EVENTI, KI JIH SPREMLJAMO
+$(function () {
+
+ // LOAD PAGE
+ window.addEventListener('load', function () {
+
+ var event_type = 'page';
+ var event = 'load_page';
+
+ // Belezimo parametre za velikost in zoom
+ var data = {
+ devicePixelRatio: window.devicePixelRatio,
+ width: window.screen.width,
+ height: window.screen.height,
+ availWidth: window.screen.availWidth,
+ availHeight: window.screen.availHeight,
+ jquery_windowW: $(window).width(),
+ jquery_windowH: $(window).height(),
+ jquery_documentW: $(document).width(),
+ jquery_documentH: $(document).height(),
+ }
+
+ // Logiramo load
+ logEvent(event_type, event, data);
+
+ // Logiramo vidna vprasanja
+ //visibleQuestions();
+ });
+
+
+ // RESIZE
+ window.addEventListener('resize', function () {
+
+ var data = {
+ pos_x: $(window).width(),
+ pos_y: $(window).height(),
+ value: window.devicePixelRatio
+ }
+
+ var event_type = 'other';
+ var event = 'resize';
+
+ // Logiramo scroll
+ logEvent(event_type, event, data);
+
+ // Logiramo vidna vprasanja
+ //visibleQuestions();
+ });
+
+ // PINCH ZOOM
+ var pinch_scaling = false;
+ var pinch_distance = 0;
+ window.addEventListener('touchstart', function (e) {
+
+ // Zaznamo 2 prsta
+ if (e.touches.length === 2) {
+ pinch_scaling = true;
+
+ // Izracunamo razdaljo med prstoma
+ pinch_distance = Math.hypot(
+ e.touches[0].screenX - e.touches[1].screenX,
+ e.touches[0].screenY - e.touches[1].screenY
+ );
+ }
+ });
+ window.addEventListener('touchend', function (e) {
+
+ if(pinch_scaling){
+ pinch_scaling = false;
+
+ // Izracunamo razdaljo med prstoma
+ var pinch_distance2 = Math.hypot(
+ e.touches[0].screenX - e.changedTouches[0].screenX,
+ e.touches[0].screenY - e.changedTouches[0].screenY
+ );
+
+ // Preracunamo razliko v razdalji
+ var diff = pinch_distance2 - pinch_distance;
+ var zoom = Math.round((diff / pinch_distance * 100));
+
+ var data = {
+ value: zoom
+ }
+
+ var event_type = 'other';
+ var event = 'pinch_resize';
+
+ // Logiramo scroll
+ logEvent(event_type, event, data);
+ }
+ });
+
+
+ // ORIENTATION CHANGE
+ window.addEventListener('orientationchange', function () {
+
+ var value = '';
+
+ if(window.orientation == 90 || window.orientation == -90)
+ value = 'landscape';
+ else
+ value = 'portrait';
+
+ var data = {
+ value: value
+ }
+
+ var event_type = 'other';
+ var event = 'orientation_change';
+
+ // Logiramo scroll
+ logEvent(event_type, event, data);
+ });
+
+ // SCROLL
+ var scroll_time_prev = 0;
+ window.addEventListener('scroll', function () {
+
+ // Dobimo trenuten cas
+ var scroll_time = new Date().getTime();
+
+ // Ce je ze poteklo dovolj casa od prejsnjega zaznavanja
+ if ((scroll_time - scroll_time_prev > 50) || scroll_time_prev == 0) {
+
+ var event_type = 'other';
+ var event = 'scroll_page';
+
+ var data = {
+ pos_x: (window.pageXOffset || document.documentElement.scrollLeft) - (document.documentElement.clientLeft || 0),
+ pos_y: (window.pageYOffset || document.documentElement.scrollTop) - (document.documentElement.clientTop || 0)
+ }
+
+ // Logiramo scroll
+ logEvent(event_type, event, data);
+
+ // Logiramo vidna vprasanja
+ //visibleQuestions();
+
+ // Shranimo cas za interval
+ scroll_time_prev = scroll_time;
+ }
+ });
+
+ // BLUR (leave to another tab etc..)
+ window.addEventListener('blur', function () {
+
+ var event_type = 'other';
+ var event = 'blur';
+
+ logEvent(event_type, event);
+ });
+
+ // FOCUS
+ window.addEventListener('focus', function () {
+
+ var event_type = 'other';
+ var event = 'focus';
+
+ logEvent(event_type, event);
+ });
+
+ // MOUSE CLICK
+ window.addEventListener('click', function (event) {
+
+ var div_id = $(event.target).attr('id');
+
+ // Ce je id prazen najdemo prvega parenta z id-jem
+ if(div_id == null){
+ div_id = $(event.target).closest('[id]').attr('id') + ' (parent)';
+ }
+
+ var data = {
+ pos_x: event.pageX,
+ pos_y: event.pageY,
+ div_type: event.target.tagName,
+ div_id: div_id,
+ div_class: $(event.target).attr('class')
+ }
+
+ var event_type = 'other';
+ var event_name = 'click';
+
+ logEvent(event_type, event_name, data);
+
+ // Posebej shranimo se mouse movement do tega klika
+ movementClickEvent(event);
+ });
+
+
+
+ // INPUT TEXT, TEXTAREA FOCUS
+ $('input[type=text], textarea').bind('focus', function () {
+
+ // Ce gre za textbox v selectu ga ignoriramo
+ if(!$(this).parent().hasClass('chzn-search')){
+
+ var event_type = 'vrednost';
+ var event = 'text_enter';
+
+ var id = $(this).attr('id');
+ var id_array = id.split('_');
+ var spr_id = id_array[1];
+ var vre_id = id_array[3];
+
+ var data = {
+ spr_id: spr_id,
+ vre_id: vre_id,
+ value: $(this).val()
+ }
+
+ logEvent(event_type, event, data);
+
+
+ // Preverimo ce gre za polje drugo - potem oznacimo tudi checkbox/radio
+ if($(this).parent().parent().parent().hasClass('tip_1') || $(this).parent().parent().parent().hasClass('tip_2')){
+
+ event = 'radio_checkbox_change';
+
+ data = {
+ spr_id: spr_id,
+ vre_id: vre_id,
+ value: 1
+ }
+
+ logEvent(event_type, event, data);
+ }
+ }
+ });
+ // INPUT TEXT, TEXTAREA BLUR
+ $('input[type=text], textarea').bind('blur', function () {
+
+ // Ce gre za textbox v selectu ga ignoriramo
+ if(!$(this).parent().hasClass('chzn-search')){
+
+ var event_type = 'vrednost';
+ var event = 'text_leave';
+
+ var id = $(this).attr('id');
+ var id_array = id.split('_');
+ var spr_id = id_array[1];
+ var vre_id = id_array[3];
+
+ var data = {
+ spr_id: spr_id,
+ vre_id: vre_id,
+ value: $(this).val()
+ }
+
+ logEvent(event_type, event, data);
+ }
+ });
+
+ // INPUT RADIO, CHECKBOX CHANGE
+ $('input[type=radio], input[type=checkbox]').bind('click', function () {
+
+ var event_type = 'vrednost';
+ var event = 'radio_checkbox_change';
+
+ var id = $(this).attr('id');
+ var id_array = id.split('_');
+
+ // Ce gre za tabelo
+ if(id_array[2] == 'grid' || id_array[0] == 'grid'){
+ var spr_id = id_array[1];
+ var vre_id = id_array[3];
+
+ // Ce je 'value' gre za missing
+ if(spr_id == 'missing'){
+ spr_id = id_array[3];
+ vre_id = id_array[5];
+ }
+ }
+ // Navadni radio oz. checkbox
+ else{
+ var spr_id = id_array[1];
+ var vre_id = id_array[3];
+
+ // Ce je 'value' gre za missing
+ if(spr_id == 'value'){
+ spr_id = id_array[3];
+ vre_id = id_array[5];
+ }
+ }
+
+ var val;
+ if ($(this).is(':checked'))
+ val = 1;
+ else
+ val = 0
+
+ var data = {
+ spr_id: spr_id,
+ vre_id: vre_id,
+ value: val
+ }
+
+ logEvent(event_type, event, data);
+ });
+
+ // SELECT CHANGE
+ $('select').bind('change', function () {
+
+ var event_type = 'vrednost';
+ var event = 'select_change';
+
+ var id = $(this).attr('id');
+ var id_array = id.split('_');
+ var spr_id = id_array[1];
+ var vre_id = $(this).val();
+
+ var data = {
+ spr_id: spr_id,
+ vre_id: vre_id,
+ value: vre_id
+ }
+
+ logEvent(event_type, event, data);
+ });
+
+
+
+ // MOUSE MOVE
+ var movements = [];
+ var currentMovement = {
+ timeStart: 0,
+ timeEnd: 0,
+ duration: 0,
+
+ startPosX: 0,
+ startPosY: 0,
+ endPosX: 0,
+ endPosY: 0,
+
+ distance_traveled: 0,
+ prevPosX: 0,
+ prevPosY: 0
+ }
+
+ // Lovimo vse preimke miske
+ window.addEventListener('mousemove', function (event) {
+ var clicked = false;
+ movementTrack(event, clicked);
+ });
+
+ // Belezimo premik v array objektov
+ var time_prev = new Date().getTime();
+ function movementTrack(event, clicked){
+
+ // Dobimo trenuten cas
+ var time = new Date().getTime();
+
+ // Ce je ze poteklo dovolj casa od prejsnjega zaznavanja
+ if (time - time_prev > 50 || clicked) {
+
+ // Preverimo, ce je to ze nov premik - zaenkrat tretiramo nov premik ce je pavze vec kot 300ms
+ if(time - currentMovement.timeEnd > 300 || clicked){
+
+ // Dodamo trenuten premik v array premikov - trik da ne insertamo reference ampak dejansko kopijo objekta
+ if(currentMovement.timeStart !== 0 && currentMovement.startPosX !== undefined && currentMovement.endPosX !== undefined){
+ movements.push(JSON.parse(JSON.stringify(currentMovement)));
+ }
+
+ // Resetiramo trenuten premik in mu nastavimo vse parametre
+ currentMovement.timeStart = time;
+ currentMovement.timeEnd = time;
+
+ currentMovement.startPosX = event.pageX;
+ currentMovement.startPosY = event.pageY;
+
+ currentMovement.endPosX = event.pageX;
+ currentMovement.endPosY = event.pageY;
+
+ currentMovement.distance_traveled = 0;
+ currentMovement.prevPosX = event.pageX;
+ currentMovement.prevPosY = event.pageY;
+ }
+ // Gre se za star premik - samo posodobimo end time in end position
+ else{
+ currentMovement.timeEnd = time;
+ currentMovement.duration = time - currentMovement.timeStart;
+
+ currentMovement.endPosX = event.pageX;
+ currentMovement.endPosY = event.pageY;
+
+ // Izracunamo razdaljo prepotovano od prejsnjega premika
+ var a = currentMovement.prevPosX - event.pageX;
+ var b = currentMovement.prevPosY - event.pageY;
+ var distance = Math.sqrt(a*a + b*b);
+
+ currentMovement.distance_traveled += distance;
+ currentMovement.prevPosX = event.pageX;
+ currentMovement.prevPosY = event.pageY;
+ }
+
+ // Shranimo cas za interval
+ time_prev = time;
+
+ /*console.log(currentMovement);*/
+ }
+ }
+
+ // Poklicemo ob vsakem kliku in shranimo podatke o premikanju med klikoma
+ function movementClickEvent(event) {
+
+ var event_type = 'movement';
+ var event = 'mouse_move';
+
+ var clicked = true;
+ movementTrack(event, clicked);
+
+ // Loop cez vse premike
+ for (var i=0; i<movements.length; i++) {
+
+ var data = {
+ time_start: movements[i].timeStart,
+ time_end: movements[i].timeEnd,
+ pos_x_start: movements[i].startPosX,
+ pos_y_start: movements[i].startPosY,
+ pos_x_end: movements[i].endPosX,
+ pos_y_end: movements[i].endPosY,
+ distance: movements[i].distance_traveled
+ }
+
+ logEvent(event_type, event, data);
+ }
+
+ // Pocitstimo array vseh premikov
+ movements = [];
+ }
+
+
+
+ // VISIBLE
+ /*function visibleQuestions() {
+
+ var event_type = 'other';
+ var event = 'visible_question';
+
+ var q = $('.grupa').find('.spremenljivka');
+ var arr = [];
+
+ $.each(q, function (i, val) {
+ if ($(val).is(':visible') && isVisible(val)) {
+ if ($(val).attr('id'))
+ arr[arr.length] = $(val).attr('id').substring(14);
+ }
+ })
+
+ var log = "" + arr;
+
+ if (log != prev_log) {
+
+ var data = {
+ log: log
+ }
+
+ logEvent(event_type, event, data);
+
+ prev_log = log;
+ }
+ }
+ var prev_log = '';
+
+ // Vrnemo ce je element viden
+ function isVisible(elem) {
+
+ var containerTop = $(window).scrollTop();
+ var containerBottom = containerTop + $(window).height();
+
+ var elemTop = $(elem).offset().top;
+ var elemBottom = elemTop + $(elem).height();
+
+ return ((elemBottom >= containerTop) && (elemTop <= containerBottom)
+ && (elemBottom <= containerBottom) && (elemTop >= containerTop) );
+ }*/
+}) \ No newline at end of file
diff --git a/admin/survey/modules/mod_advanced_paradata/js/advanced_paradata_postTime.js b/admin/survey/modules/mod_advanced_paradata/js/advanced_paradata_postTime.js
new file mode 100644
index 0000000..cc9d46b
--- /dev/null
+++ b/admin/survey/modules/mod_advanced_paradata/js/advanced_paradata_postTime.js
@@ -0,0 +1,20 @@
+// EVENT LEAVE PAGE, ki se mora izvajati sinhrono (drugace se pri nekaterih browserjih izgubi)
+$(function () {
+
+ // LEAVE PAGE (gledamo unload, beforeunload, klik na submit, klik na back)
+ var leavePageFunction_called = false;
+ var leavePageFunction = function (){
+ var event_type = 'page';
+ var event = 'unload_page';
+
+ if(!leavePageFunction_called){
+ logEvent(event_type, event);
+ leavePageFunction_called = true;
+ }
+ }
+ window.addEventListener('beforeunload', leavePageFunction);
+ window.addEventListener('unload', leavePageFunction);
+ $("input.next:submit").bind('click', leavePageFunction);
+ $("input.prev:button").bind('click', leavePageFunction);
+
+}) \ No newline at end of file
diff --git a/admin/survey/modules/mod_advanced_paradata/js/sledenjeOpozoril.js b/admin/survey/modules/mod_advanced_paradata/js/sledenjeOpozoril.js
new file mode 100644
index 0000000..899bc5e
--- /dev/null
+++ b/admin/survey/modules/mod_advanced_paradata/js/sledenjeOpozoril.js
@@ -0,0 +1,264 @@
+
+var spr_id_variable = []; //za sledenje opozoril: polje, ki hrani spr_id, kjer se pojavijo opozorila
+var tip_opozorila = []; //za sledenje opozoril: polje, ki hrani tip reminderja/opozorila
+var spr_id_indeks = 0; //za sledenje opozoril: indeks za polja, ki hranita spr_id, kjer se pojavijo opozorila in tip reminderja
+var opozorila_sum = []; //za sledenje opozoril
+var opozorila_num = []; //za sledenje opozoril
+var opozorila_validation = []; //za sledenje opozoril
+
+var tip_opozorila_temp = [];
+var validacijaZabelezena = [];
+var zacetnaValidacijaZabelezena = 1; //belezi, ce se je zabelezila validacija ne dinamicno, brez da bi respondent kliknu na bilo kateri odgovor in sel neposredno na naslednjo stran ankete
+var spremenljivkaVal = []; //polje, ki belezi katere spremenljivke imajo opozorilo val
+
+
+
+// ZAZNAMO PROŽENJE ALERTA
+$(function () {
+
+ var time_display;
+
+ // remember the normal alert
+ var oldAlert = (function(){ return this.alert; }()),
+ oldConfirm = (function(){ return this.confirm; }());
+
+ // inject ourself into the window.alert and window.confirm globals
+ alert = function (msg) {
+ time_display = Date.now();
+
+ oldAlert.call(window, msg);
+ window.onAlert(msg);
+ };
+ confirm = function (msg) {
+ time_display = Date.now();
+
+ var result = oldConfirm.call(window, msg);
+ window.onConfirm(msg, result);
+
+ return result;
+ };
+
+ // these just chill and listen for events
+ window.onAlert = function (text) {
+ logAlert({text:text, type:'alert box', ignorable:0, action:'ok', time_display:time_display});
+ };
+ window.onConfirm = function (text, result) {
+ var action = result ? 'yes' : 'no';
+ logAlert({text:text, type:'confirm box', ignorable:1, action:action, time_display:time_display});
+ };
+});
+
+
+
+// Logiramo alert (ob submitu)
+function logAlert(box_data){
+
+ //console.log("Trenutna dolzina polja: "+spr_id_variable.length);
+ //console.log(box_data);
+
+ var spremenljivkaVal = []; //polje, ki shranjuje spr_id spremenljivk s sprozenim val opozorilom
+ var tip_opozorila_tmp = [];
+
+ spr_id_variable.forEach(function(variable, index) {
+
+ // ce tip opozorila vsebuje vejico, pomeni, da belezi dva opozorila hkrati
+ // razbij opozorilo na dva dela
+ if(tip_opozorila[variable].includes(",")){
+ var opozorilo = tip_opozorila[variable].split(",");
+ opozorilo[1] = opozorilo[1].substring(1); //odstrani presledek na zacetku opozorila
+
+ //$.post('../main/survey/ajax.php?t=parapodatki&a=logData', {usr_id: _usr_id, what: opozorilo[0], what2: opozorilo[1], gru_id: page, anketa: srv_meta_anketa_id, spr_id_variable: variable});
+ var event_type = 'alert';
+ var event = 'alert';
+
+ opozorilo_type[0] = opozorilo[0].substring(4);
+ opozorilo_trigger_type[0] = opozorilo[0].substring(0, 3);
+ opozorilo_type[1] = opozorilo[1].substring(4);
+ opozorilo_trigger_type[1] = opozorilo[1].substring(0, 3);
+
+ var data = {
+ type: opozorilo_type[0] + ' ' + opozorilo_type[1] + ' (' + box_data.type + ')',
+ trigger_id: variable,
+ trigger_type: opozorilo_trigger_type[0] + ' ' + opozorilo_trigger_type[1],
+ text: box_data.text,
+ ignorable: box_data.ignorable,
+ action: box_data.action,
+ time_display: box_data.time_display
+ };
+
+ logEvent(event_type, event, data);
+ }
+ else{
+ //$.post('../main/survey/ajax.php?t=parapodatki&a=logData', {usr_id: _usr_id, what: tip_opozorila[variable], gru_id: page, anketa: srv_meta_anketa_id, spr_id_variable: variable});
+ var event_type = 'alert';
+ var event = 'alert';
+
+ var opozorilo_type = tip_opozorila[variable].substring(4);
+ var opozorilo_trigger_type = tip_opozorila[variable].substring(0, 3);
+
+ // Ce gre za multigrid zabelezimo samo id vprasanja
+ if(variable.substring(0, 12) == '#vrednost_if'){
+
+ var spremenljivka_id = $(""+variable).closest('.spremenljivka').attr('id').substring(14);
+
+ //variable = spremenljivka_id + '_' + variable.substring(13);
+ variable = spremenljivka_id;
+ }
+
+ var data = {
+ type: opozorilo_type + ' (' + box_data.type + ')',
+ trigger_id: variable,
+ trigger_type: opozorilo_trigger_type,
+ text: box_data.text,
+ ignorable: box_data.ignorable,
+ action: box_data.action,
+ time_display: box_data.time_display
+ };
+
+ logEvent(event_type, event, data);
+ }
+
+ //console.log("Spr_id opozorila: "+variable+", indeks "+index+", tip:"+tip_opozorila[variable]+" za user: "+_usr_id+" zacetnaValidacijaZabelezena: "+zacetnaValidacijaZabelezena);
+
+ //ce se ne belezi prvic validacije in tip opozorila je validacija
+ if(zacetnaValidacijaZabelezena == 0 && tip_opozorila[variable].includes("val"))
+ {
+ spremenljivkaVal.push(variable);
+
+ //ce se belezi dvojno opozorilo
+ if(tip_opozorila[variable].includes(",")){
+ tip_opozorila_tmp[variable] = opozorilo[0];
+ }
+ else{
+ tip_opozorila_tmp[variable] = tip_opozorila[variable];
+ }
+ }
+ });
+
+ spr_id_variable = []; // pucanje polja
+ tip_opozorila = [];
+
+ if(spremenljivkaVal.length != 0){
+ spremenljivkaVal.forEach(function(valSprem) {
+ spr_id_variable.push(valSprem);
+ tip_opozorila[valSprem] = tip_opozorila_tmp[valSprem];
+ });
+ }
+
+ //console.log("Polje spremenljivkaVal: "+spremenljivkaVal.length);
+}
+
+
+
+function dodaj_opozorilo_val(bol, id){
+
+ var spr_id = id.replace('#spremenljivka_', '');
+
+ //console.log("Tip opozorila prej:" + tip_opozorila[spr_id]);
+
+ if(zacetnaValidacijaZabelezena == 1){
+ zacetnaValidacijaZabelezena = 0;
+ }
+ else{
+ }
+
+ if(!validacijaZabelezena[spr_id]){
+ spr_id_variable.push(spr_id);
+ }
+
+
+ var tip_alerta = '';
+
+ tip_alerta = 'val';
+ validacijaZabelezena[spr_id] = 1;
+ spremenljivkaVal[spr_id] = spr_id;
+
+ tip_opozorila[spr_id] = tip_alerta + ' ' + bol + ' alert';
+}
+
+function dodaj_opozorilo(alert_sum, alert_num, alert_validation, bol, id){
+
+ //console.log("Dodaj opozorilo");
+
+ var spr_id = id.replace('#spremenljivka_', '');
+
+ var tip_alerta = '';
+
+ if(alert_sum) tip_alerta = 'sum';
+ if(alert_num) tip_alerta = 'num';
+
+ if(tip_alerta == ''){
+
+ // ce ni se nobenega opozorila zabelezenega za to spremenljivko
+ if(tip_opozorila[spr_id] == undefined){
+ tip_opozorila[spr_id] = bol+' alert';
+ spr_id_variable.push(spr_id);
+ }
+ else{
+ //drugace, ce je zabelezeno kaksno opozorilo, po navadi, ko je validation
+ tip_opozorila_temp[spr_id] = bol+' alert';
+
+ //ce je prejsnje opozorilo enako trenutnemu
+ if(tip_opozorila[spr_id] == tip_opozorila_temp[spr_id]){
+
+ tip_opozorila[spr_id] = tip_opozorila_temp[spr_id];
+ tip_opozorila_temp[spr_id] = '';
+
+ spr_id_variable.push(spr_id);
+ }
+ // drugace imamo dva razlicna opozorila, ki ju je potrebno zabeleziti
+ else if(validacijaZabelezena[spr_id] == 1){
+
+ tip_opozorila[spr_id] = tip_opozorila[spr_id]+', '+bol+' alert';
+ tip_opozorila_temp[spr_id] = '';
+
+ //console.log("Dvojno opozorilo");
+ }
+ }
+ }
+ else{
+ // ce ni se nobenega opozorila zabelezenega za to spremenljivko
+ if(tip_opozorila[spr_id] == undefined){
+
+ tip_opozorila[spr_id] = tip_alerta+' '+bol+' alert';
+ spr_id_variable.push(spr_id);
+ }
+ //drugace, ce je zabelezeno kaksno opozorilo, po navadi, ko je validation
+ else{
+ tip_opozorila_temp[spr_id] = tip_alerta+' '+bol+' alert';
+
+ // ce je prejsnje opozorilo enako trenutnemu
+ if(tip_opozorila[spr_id] == tip_opozorila_temp[spr_id]){
+ tip_opozorila[spr_id] = tip_opozorila_temp[spr_id];
+ tip_opozorila_temp[spr_id] = '';
+ spr_id_variable.push(spr_id);
+ }
+ // drugace imamo dva razlicna opozorila, ki ju je potrebno zabeleziti
+ else if(validacijaZabelezena[spr_id] == 1){
+ tip_opozorila[spr_id] = tip_opozorila[spr_id]+', '+tip_alerta+' '+bol+' alert';
+ tip_opozorila_temp[spr_id] = '';
+ }
+ }
+ }
+}
+
+function odstrani_opozorilo(id, alert_sum, alert_num, alert_validation){
+
+ //console.log("Odstrani");
+
+ var spr_id = id.replace('#spremenljivka_', '');
+
+ tip_opozorila.splice(spr_id, 1); //odstrani opozorilo iz polja
+
+ if(alert_validation){
+
+ //odstrani iz polja zabelezeno validacijo
+ spr_id_variable.forEach(function(variable, index) {
+ if(variable == spremenljivkaVal[variable]){
+ spr_id_variable.splice(index, 1);
+ }
+ });
+
+ validacijaZabelezena[spr_id] = 0;
+ }
+}
diff --git a/admin/survey/modules/mod_chat/class.SurveyChat.php b/admin/survey/modules/mod_chat/class.SurveyChat.php
new file mode 100644
index 0000000..4f65b13
--- /dev/null
+++ b/admin/survey/modules/mod_chat/class.SurveyChat.php
@@ -0,0 +1,82 @@
+<?php
+
+/*
+ * Modul za chat z respondenti
+ *
+ * Zaenkrat se uporablja storitev TAWK
+ *
+ */
+
+
+class SurveyChat{
+
+ var $anketa; # id ankete
+
+
+ function __construct($anketa){
+ global $site_url;
+
+ // Ce imamo anketo
+ if ((int)$anketa > 0){
+ $this->anketa = $anketa;
+ }
+ }
+
+
+ // Nastavitve chat-a (na kateri strani se prikaze...)
+ public function displaySettings(){
+ global $lang;
+
+ $row = SurveyInfo::getInstance()->getSurveyRow();
+
+
+ echo '<fieldset><legend>'.$lang['settings'].'</legend>';
+
+ // Koda za embed tawk chat widgeta
+ $code = '';
+ $sql = sisplet_query("SELECT * FROM srv_chat_settings WHERE ank_id='".$this->anketa."'");
+ if(mysqli_num_rows($sql) > 0){
+
+ $row = mysqli_fetch_array($sql);
+ $code = $row['code'];
+ }
+ echo '<span class="nastavitveSpan2" style="vertical-align:top;">'.$lang['srv_chat_code'].':</span>';
+ echo '<textarea id="chat_code" name="chat_code" rows="5" cold="20">'.$code.'</textarea>';
+
+ echo '<br /><br />';
+
+ // Prikaz vklopa chata
+ echo '<span class="nastavitveSpan2" >'.$lang['srv_chat_type'].':</span>';
+ echo '<input type="radio" name="chat_type" id="chat_type_0" value="0" '.(($row['chat_type'] == 0) ? ' checked="checked" ' : '').' /><label for="chat_type_0">'.$lang['srv_chat_type_0'].'</label>';
+ echo '<input type="radio" name="chat_type" id="chat_type_1" value="1" '.(($row['chat_type'] == 1) ? ' checked="checked" ' : '').' /><label for="chat_type_1">'.$lang['srv_chat_type_1'].'</label>';
+ echo '<input type="radio" name="chat_type" id="chat_type_2" value="2" '.(($row['chat_type'] == 2) ? ' checked="checked" ' : '').' /><label for="chat_type_2">'.$lang['srv_chat_type_2'].'</label>';
+
+ echo '<br /><br />';
+
+ echo '</fieldset>';
+
+
+ // Gumb shrani
+ echo '<br class="clr" />';
+ echo '<span class="floatLeft spaceRight"><div class="buttonwrapper"><a class="ovalbutton ovalbutton_orange btn_savesettings" href="#" onclick="chat_save_settings(); return false;"><span>';
+ echo $lang['edit1337'] . '</span></a></div></span>';
+ echo '<div class="clr"></div>';
+ echo '<div id="success_save"></div>';
+ }
+
+
+ public function ajax() {
+
+ if(isset($_GET['a']) && $_GET['a'] == 'save_settings'){
+
+ $code = isset($_POST['code']) ? $_POST['code'] : '';
+ $chat_type = isset($_POST['chat_type']) ? $_POST['chat_type'] : '0';
+
+ $sql = sisplet_query("INSERT INTO srv_chat_settings
+ (ank_id, code, chat_type) VALUES ('".$this->anketa."', '".$code."', '".$chat_type."')
+ ON DUPLICATE KEY UPDATE code='".$code."', chat_type='".$chat_type."'");
+ if (!$sql) echo mysqli_error($GLOBALS['connect_db']);
+ }
+
+ }
+} \ No newline at end of file
diff --git a/admin/survey/modules/mod_fieldwork/class.SurveyFieldwork.php b/admin/survey/modules/mod_fieldwork/class.SurveyFieldwork.php
new file mode 100644
index 0000000..1026a93
--- /dev/null
+++ b/admin/survey/modules/mod_fieldwork/class.SurveyFieldwork.php
@@ -0,0 +1,126 @@
+<?php
+/** class ki skrbi za delo s tablicami
+ * in laptopi (fieldwork naprave)
+ *
+ */
+
+ // takole gre:
+
+ // tablicam daš unique_id (naredi skripto za generiranje)
+ // tu si zabeležiš, katere tablice lahko pišejo v to anketo, v tabelo prevodov:
+ // TABLET_ID - TABLET_ANK - TALE_ANK
+ // vzameš "tisti" merge, ampak dodaš da popravi ID (da vzame prave)
+
+ // deployment (kasneje)
+
+class SurveyFieldwork {
+ private $sid; # id ankete
+ private $surveySettings; # zakeširamo nastavitve ankete
+
+ var $isAnketar = false;
+
+ function __construct($sid) {
+
+ $this->sid = $sid;
+
+ SurveyInfo::SurveyInit($this->sid);
+ $this->surveySettings = SurveyInfo::getInstance()->getSurveyRow();
+ SurveyDataSettingProfiles :: Init($this->sid);
+
+ $d = new Dostop();
+ $this->isAnketar = $d->isAnketar();
+
+ }
+
+ public function action ($action) {
+ switch ($action) {
+ case "neki":
+ die();
+ break;
+ default:
+ $this->nastavitve();
+ break;
+ }
+ }
+
+ private function nastavitve () {
+ global $lang;
+
+?>
+ <fieldset>
+ <legend><?=$lang['srv_fieldwork_devices']?> <?=Help::display('fieldwork_devices')?></legend>
+
+
+
+<?php
+ $result = sisplet_query ("SELECT id, terminal_id, sid_terminal, secret, lastnum FROM srv_fieldwork WHERE sid_server='" .$this->sid ."'");
+
+ if (mysqli_num_rows ($result) == 0) {
+ echo $lang['srv_fieldwork_no_devices'];
+ }
+ else {
+
+ echo '<table class="dataTable"><thead><tr><td>Naziv naprave</td><td>Geslo</td><td>ID ankete na napravi</td><td>Numerus</td><td>Briši</td></tr></thead>';
+
+ while ($r = mysqli_fetch_assoc ($result)) {
+?>
+ <tr>
+ <td><?=$r['terminal_id']?></td>
+ <td><?=$r['secret']?></td>
+ <td><?=$r['sid_terminal']?></td>
+ <td><?=$r['lastnum']?></td>
+ <td><a href="ajax.php?a=anketadeldevice&dev=<?=$r['id']?>&srv=<?=$this->sid?>">x</a></td>
+ </tr>
+
+
+<?php
+ }
+ echo '</table>';
+ }
+?>
+ </fieldset>
+ <br><br>
+ <fieldset>
+ <legend><?=$lang['srv_fieldwork_add_device']?></legend>
+ <form name="addtablet" id="addtablet" method="post" action="ajax.php?a=anketaadddevice">
+ <input type="hidden" name="sid" value="<?=$this->sid?>">
+ <span class="nastavitveSpan3 bold"><?=$lang['srv_fieldwork_device_name']?>:&nbsp;</span>
+ <label> <input type="text" name="tablet_name"> <i>(npr. T01)</i></label>
+ <br>
+ <span class="nastavitveSpan3 bold"><?=$lang['srv_fieldwork_device_pass']?>:&nbsp;</span>
+ <label><input type="text" name="tablet_secret"> <i>(npr. zrbrtbdtzsythw6r)</i></label>
+ <br>
+ <span class="nastavitveSpan3 bold"><?=$lang['srv_fieldwork_device_surveyID']?>:&nbsp;</span>
+ <label><input type="number" name="terminal_srv_id" id="term_srv_id"> <i>(npr. 12)</i></label>
+ <br>
+
+ <span class="floatLeft spaceRight">
+ <div class="buttonwrapper">
+ <a class="ovalbutton ovalbutton_orange btn_savesettings" href="#" onclick="$('#addtablet').submit();"><?=$lang['srv_fieldwork_add_device']?></a></div>
+ </span>
+ </form>
+ </fieldset>
+ <br>
+
+ <span class="floatLeft spaceRight">
+ <div class="buttonwrapper">
+ <a class="ovalbutton ovalbutton_orange btn_savesettings" href="/utils/SurveySyncMergeImport.php?srv_id=<?=$this->sid?>" ><?=$lang['srv_fieldwork_sync_data']?></a></div>
+ </span>
+
+ <?php
+
+ if (isset ($_GET['n'])) {
+ if (is_numeric ($_GET['n']) && $_GET['n'] > 0) {
+ echo '<strong>Podatki so uspešno uvoženi v novo anketo, <a href="index.php?anketa=' .$_GET['n'] .'" target="_blank">odpri jo</a></strong>';
+ }
+ else {
+ echo '<strong>Pri uvažanju je prišlo do težave.</strong>';
+ }
+ }
+
+ }
+
+ private function doImport () {
+ // ko bom prenesel sem iz /utils/
+ }
+}
diff --git a/admin/survey/modules/mod_geoIP/class.SurveyGeoIP.php b/admin/survey/modules/mod_geoIP/class.SurveyGeoIP.php
new file mode 100644
index 0000000..a8942f7
--- /dev/null
+++ b/admin/survey/modules/mod_geoIP/class.SurveyGeoIP.php
@@ -0,0 +1,276 @@
+<?php
+
+/*
+ * Modul za dolocanje lokacije na podlagi IP-ja
+ *
+ * Po novem se uporablja GeoIP2 z GeoLiteCity knjiznico
+ *
+ */
+
+
+use GeoIp2\Database\Reader;
+
+class SurveyGeoIP{
+
+ var $anketa; # id ankete
+ var $data = array(); # tabela z ip analizo lokacij
+
+ var $countryDB = false;
+ var $countriesLocationsData = array();
+
+
+ function __construct($anketa){
+ global $site_url;
+
+ // Ce imamo anketo
+ if ((int)$anketa > 0){
+ $this->anketa = $anketa;
+ }
+
+ // Check if we have data for countries
+ $sql = sisplet_query("SELECT COUNT(*) AS cnt FROM countries_locations", 'obj');
+ if($sql->cnt > 0){
+ $this->countryDB = true;
+ }
+ }
+
+
+ public function displayData(){
+ global $lang;
+
+ // Zakesiramo podatke o lokacijah
+ $this->calculateLocations();
+ //var_dump($this->data);
+
+
+ // Opozorilo o nenatancnosti
+ echo '<p class="bold">'.$lang['srv_geoip_warning'].'</p>';
+
+
+ echo '<div>';
+ echo '<div class="floatLeft">';
+
+ // Izpis tabele frekvenc
+ echo '<table class="geoip_table">';
+
+ // Prva vrstica
+ echo '<tr>';
+ echo '<th>'.$lang['srv_geoip_country'].'</th>';
+ echo '<th>'.$lang['srv_geoip_city'].'</th>';
+ echo '<th>'.$lang['srv_geoip_freq'].'</th>';
+ echo '<th>%</th>';
+ echo '</tr>';
+
+ // Vrstice s podatki
+ if(isset($this->data['all'])){
+
+ foreach($this->data['all'] as $country => $country_freq){
+
+ if($country !== 'all'){
+
+ // Frekvenca po drzavi
+ $country_percent = ($this->data['freq'] > 0) ? round($country_freq['freq'] / $this->data['freq'], 3) * 100 : 0;
+
+ echo '<tr class="country">';
+ echo '<td>'.($country == '' ? '<i>'.$lang['srv_geoip_unknown'].'<i>' : mb_convert_encoding($country, "UTF-8", "ISO-8859-1")).'</td>';
+ $cities = mb_convert_encoding($this->data['all'][$country]['cities'], "UTF-8", "ISO-8859-1");
+ echo '<td>'.(isset($country_freq['showMap']) ? '<a class="fMap rawData" title="'.$lang['srv_view_data_on_map'].'" href="javascript:void(0);" onclick=\'passMapDataRaw('.json_encode($cities).');\'><img src="img_0/Google_Maps_Icon.png" height="24" width="24" /></a></td>' : '');
+ echo '<td>'.$country_freq['freq'].'</td>';
+ echo '<td>'.$country_percent.' %</td>';
+ echo '</tr>';
+
+ // Se frekvence po mestih
+ foreach($this->data['all'][$country]['cities'] as $city => $city_data){
+
+ $city_percent = ($this->data['freq'] > 0) ? round($city_data['cnt'] / $this->data['freq'], 3) * 100 : 0;
+
+ echo '<tr class="city">';
+ echo '<td></td>';
+ echo '<td>'.($city == '' ? '<i>'.$lang['srv_geoip_unknown'].'<i>' : mb_convert_encoding($city, "UTF-8", "ISO-8859-1")).'</td>';
+ echo '<td>'.$city_data['cnt'].'</td>';
+ echo '<td>'.$city_percent.' %</td>';
+ echo '</tr>';
+ }
+ }
+ }
+ }
+
+ // Zadnja vrstica
+ echo '<tr class="country">';
+ echo '<td>'.$lang['hour_total'].'</td>';
+ echo '<td></td>';
+ echo '<td>'.$this->data['freq'].'</td>';
+ echo '<td>100%</td>';
+ echo '</tr>';
+ echo '</table>';
+
+ echo '</div>';
+
+ // Google maps on right of table
+ if(count($this->countriesLocationsData)>0){
+
+ echo '<div class="floatLeft" style="margin: 15px 0px 0px 50px;">';
+
+ if(count($this->countriesLocationsData) > 1)
+ $this->displayNavigationMaps();
+
+ echo '<div id="map_ip" style="width: 800px; height:500px;border-style: solid;border-width: 1px;border-color: #b4b3b3;"></div>';
+
+ echo '</div>';
+
+ $cities = mb_convert_encoding($this->data['all']['all']['cities'], "UTF-8", "ISO-8859-1");
+
+ echo '<script type="text/javascript">passMapDataRaw('.json_encode($cities).');googleMapsAPIProcedura(initializeMapGeneralForIPs);</script>';
+ }
+ echo '</div>';
+ }
+
+
+ // Loop cez response in zackesiramo ip-je in lokacije
+ private function calculateLocations(){
+ global $site_path;
+ global $lang;
+
+ // Inicializiramo reader s knjiznico ip lokacij
+ $reader = new Reader($site_path.'admin/survey/modules/mod_geoIP/db/GeoLite2-City.mmdb');
+ //$reader = new Reader($site_path.'admin/survey/modules/mod_geoIP/db/GeoLite2-Country.mmdb');
+
+
+ $sql = sisplet_query("SELECT ip, preview, testdata, last_status, lurker
+ FROM srv_user
+ WHERE ank_id='".$this->anketa."' AND testdata='0' AND preview='0' AND deleted='0'
+ ");
+ while($row = mysqli_fetch_array($sql)){
+
+ // Ce locimo glede na status
+ //$index = $row['last_status'].'_'.$row['lurker'];
+ $index = 'all';
+
+ // Poskusimo ustvariti objekt z lokacijo za IP
+ $unknown_location = false;
+ try {
+ $location_object = $reader->city($row['ip']);
+ }
+ catch (Exception $e) {
+ //echo 'Error: ', $e->getMessage();
+ $unknown_location = true;
+ }
+
+ // Ce ni ip-ja v bazi gre za neznano lokacijo
+ if($unknown_location){
+ $location_data['country_name'] = $lang['srv_unknown'];
+ $location_data['country_code'] = '';
+ $location_data['city'] = $lang['srv_unknown'];
+ $location_data['longitude'] = '';
+ $location_data['latitude'] = '';
+ }
+ // Drugace preberemo iz knjiznice podatke o lokaciji
+ else{
+ $location_data['country_name'] = $location_object->country->name;
+ $location_data['country_code'] = $location_object->country->isoCode;
+ $location_data['city'] = $location_object->city->name;
+ $location_data['longitude'] = $location_object->location->longitude;
+ $location_data['latitude'] = $location_object->location->latitude;
+ }
+
+ // Frekvence po drzavah
+ if(isset($this->data[$index][$location_data['country_name']]['freq'])){
+
+ $this->data[$index][$location_data['country_name']]['freq']++;
+
+ if($location_data['country_name']!='')
+ $this->countriesLocationsData[$location_data['country_name']]['cnt']++;
+ }
+ else{
+ $this->data[$index][$location_data['country_name']]['freq'] = 1;
+
+ //store coordinates for country
+ if($this->countryDB && $location_data['country_name'] != '' && $location_data['country_name'] != $lang['srv_unknown']){
+
+ $sqlc = sisplet_query("SELECT latitude, longitude FROM countries_locations WHERE country_code='".$location_data['country_code']."'", 'obj');
+
+ $this->countriesLocationsData[$location_data['country_name']]['cnt'] = 1;
+ $this->countriesLocationsData[$location_data['country_name']]['lat'] = $sqlc->latitude;
+ $this->countriesLocationsData[$location_data['country_name']]['lng'] = $sqlc->longitude;
+ }
+ }
+
+ // Frekvence po mestih
+ if(isset($this->data[$index][$location_data['country_name']]['cities'][$location_data['city']])){
+ $this->data[$index][$location_data['country_name']]['cities'][$location_data['city']]['cnt']++;
+ $this->data[$index]['all']['cities'][$location_data['city']]['cnt']++;
+ }
+ else{
+ $this->data[$index][$location_data['country_name']]['cities'][$location_data['city']]['cnt'] = 1;
+ $this->data[$index]['all']['cities'][$location_data['city']]['cnt'] = 1;
+
+ if($location_data['city'] != '' && $location_data['city'] != $lang['srv_unknown']){
+ $this->data[$index][$location_data['country_name']]['cities'][$location_data['city']]['lat'] = floatval($location_data['latitude']);
+ $this->data[$index][$location_data['country_name']]['cities'][$location_data['city']]['lng'] = floatval($location_data['longitude']);
+ $this->data[$index]['all']['cities'][$location_data['city']]['lat'] = floatval($location_data['latitude']);
+ $this->data[$index]['all']['cities'][$location_data['city']]['lng'] = floatval($location_data['longitude']);
+ }
+ }
+
+ // Mesto ni znano, imamo pa koordinate
+ if($location_data['city'] == '' && isset($location_data['longitude']) && $location_data['longitude'] != '' && isset($location_data['latitude']) && $location_data['latitude'] != ''){
+
+ if(isset($this->data[$index][$location_data['country_name']]['cities'][$location_data['city']][''.floatval($location_data['latitude']).floatval($location_data['longitude'])])){
+ $this->data[$index][$location_data['country_name']]['cities'][$location_data['city']][''.floatval($location_data['latitude']).floatval($location_data['longitude'])]['cnt']++;
+ $this->data[$index]['all']['cities'][$location_data['city']][''.floatval($location_data['latitude']).floatval($location_data['longitude'])]['cnt']++;
+ }
+ else{
+ $this->data[$index][$location_data['country_name']]['cities'][$location_data['city']][''.floatval($location_data['latitude']).floatval($location_data['longitude'])]['cnt'] = 1;
+ $this->data[$index][$location_data['country_name']]['cities'][$location_data['city']][''.floatval($location_data['latitude']).floatval($location_data['longitude'])]['lat'] = floatval($location_data['latitude']);
+ $this->data[$index][$location_data['country_name']]['cities'][$location_data['city']][''.floatval($location_data['latitude']).floatval($location_data['longitude'])]['lng'] = floatval($location_data['longitude']);
+ $this->data[$index]['all']['cities'][$location_data['city']][''.floatval($location_data['latitude']).floatval($location_data['longitude'])]['cnt'] = 1;
+ $this->data[$index]['all']['cities'][$location_data['city']][''.floatval($location_data['latitude']).floatval($location_data['longitude'])]['lat'] = floatval($location_data['latitude']);
+ $this->data[$index]['all']['cities'][$location_data['city']][''.floatval($location_data['latitude']).floatval($location_data['longitude'])]['lng'] = floatval($location_data['longitude']);
+ }
+ }
+
+ if(isset($location_data['latitude']) && $location_data['latitude'] != ''){
+ $this->data[$index][$location_data['country_name']]['showMap'] = 1;
+ $this->data[$index]['all']['showMap'] = 1;
+ }
+
+ // Frekvenca vseh
+ if(isset($this->data['freq']))
+ $this->data['freq']++;
+ else
+ $this->data['freq'] = 1;
+ }
+ }
+
+ function displayNavigationMaps() {
+ global $lang;
+
+ $countries = mb_convert_encoding($this->countriesLocationsData, "UTF-8", "ISO-8859-1");
+ $cities = mb_convert_encoding($this->data['all']['all']['cities'], "UTF-8", "ISO-8859-1");
+
+ echo '<div class="secondNavigation">';
+ echo '<ul class="secondNavigation">';
+
+ echo'<li>';
+ echo '<a class="no-img active" id="geoip_cities" onclick=\'geoip_map_navigation_toggle(this, '.json_encode($cities).');\'>';
+ echo '<span class="label">' . $lang['srv_geoip_map_cities'] . '</span>';
+ echo '</a>';
+ echo'</li>';
+
+ #space
+ echo'<li class="space">';
+ echo'</li>';
+
+ echo'<li>';
+ echo '<a class="no-img" id="geoip_countries" onclick=\'geoip_map_navigation_toggle(this, '.json_encode($countries).');\'>';
+ echo '<span class="label">' . $lang['srv_geoip_map_countries'] . '</span>';
+ echo '</a>';
+ echo'</li>';
+
+ echo'</ul>';
+ echo '</div>';
+
+ echo '<br class="clr" />';
+ echo '<br class="clr" />';
+ }
+} \ No newline at end of file
diff --git a/admin/survey/modules/mod_hierarhija/class/Ajax/AjaxHierarhijaClass.php b/admin/survey/modules/mod_hierarhija/class/Ajax/AjaxHierarhijaClass.php
new file mode 100644
index 0000000..5bc9a66
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/class/Ajax/AjaxHierarhijaClass.php
@@ -0,0 +1,561 @@
+<?php
+/***************************************
+ * Description: Ajax requesti, ki se uporabljajo za kreiranje hierarhije, šifrantov in nivojev
+ * Autor: Robert Šmalc
+ * Created date: 03.02.2017
+ *****************************************/
+
+namespace Hierarhija\Ajax;
+
+
+use Hierarhija\HierarhijaKopiranjeClass;
+use Hierarhija\Model\HierarhijaQuery;
+use JsonSerializable;
+use TrackingClass;
+
+class AjaxHierarhija implements JsonSerializable
+{
+ private $anketa;
+ private $json;
+ private $lang;
+ private $user_id;
+
+ public function __construct($anketa)
+ {
+ $this->anketa = $anketa;
+
+ //global
+ global $lang;
+ global $global_user_id;
+ $this->lang = $lang;
+ $this->user_id = $global_user_id;
+
+ return $this;
+ }
+
+ private static $_instance;
+
+ public static function init($anketa)
+ {
+ if (!static::$_instance)
+ return (new AjaxHierarhija($anketa));
+
+ return static::$_instance;
+ }
+
+ /**
+ * Shranjuje št. in ime nivoja
+ *
+ * @return html -> select -> option
+ */
+ public function postNivoji()
+ {
+ $nivo = $_POST['nivo'];
+ $ime = $_POST['ime'];
+
+ // tracking - beleženje sprememb
+ $this->trackingChanges();
+
+ sisplet_query("INSERT INTO srv_hierarhija_ravni (anketa_id, user_id, level, ime) VALUES ('" . $this->anketa . "', '" . $this->user_id . "', '" . $nivo . "', '" . $ime . "')");
+ $nivo_id = mysqli_insert_id($GLOBALS['connect_db']);
+
+ return $nivo_id;
+ }
+
+
+ /**
+ * Shranjuje id nivoja, in šifrant za sledeči nivo
+ *
+ * @return JSON
+ */
+ public function postSifranti()
+ {
+ $idNivoja = $_POST['idNivoja'];
+ $imeSifranta = $_POST['imeSifranta'];
+
+ // tracking - beleženje sprememb
+ $this->trackingChanges();
+
+ // V podatke shranimo samo kadar pošljemo vrednost polja
+ if (!empty($imeSifranta)) {
+ $sql_hs = sisplet_query("INSERT INTO srv_hierarhija_sifranti (hierarhija_ravni_id, ime) VALUES ('" . $idNivoja . "', '" . $imeSifranta . "')");
+ $this->sqlError($sql_hs);
+ }
+
+ //izbrišemo šifrante
+ $sql_vsi_sifranti = sisplet_query("SELECT ime FROM srv_hierarhija_sifranti WHERE hierarhija_ravni_id='" . $idNivoja . "' ORDER BY ime");
+ $sifranti = array();
+ while ($row = mysqli_fetch_row($sql_vsi_sifranti)) {
+ $sifranti[] = $row[0];
+ }
+
+ // vrnemo json seznam vseh šifrantov za sledeči nivo
+ return json_encode($sifranti);
+ }
+
+ /**
+ * Select box spremeni v ul in ponudi možnost brisanje šifrantov
+ *
+ * @return JSON
+ */
+ public function brisiSifrante()
+ {
+ $idNivoja = $_POST['idNivoja'];
+
+ //izbrišemo šifrante
+ $sql_vsi_sifranti = sisplet_query("SELECT * FROM srv_hierarhija_sifranti WHERE hierarhija_ravni_id='" . $idNivoja . "' ORDER BY ime");
+ $sifranti = array();
+ while ($row = mysqli_fetch_assoc($sql_vsi_sifranti)) {
+ $sifranti[] = [
+ 'id' => $row['id'],
+ 'ime' => $row['ime']
+ ];
+ }
+
+ // vrnemo json seznam vseh šifrantov za sledeči nivo
+ return json_encode($sifranti);
+ }
+
+ /**
+ * Delete šifrant
+ */
+ public function izbrisiSifrant()
+ {
+ $idSifranta = $_POST['idSifranta'];
+
+ // tracking - beleženje sprememb
+ $this->trackingChanges();
+
+ // Najprej preveri, če je v strukturi že uporabljen omenjen šifrant v kolikor je potem ga ne sme dovoliti izbrisati
+ $sql_result = sisplet_query("SELECT ID FROM srv_hierarhija_struktura WHERE hierarhija_sifranti_id='" . $idSifranta . "'");
+
+ // V kolkor je kak vpis potem šifrant obstaja, drugače pa ga lahko izbrišemo
+ if (mysqli_num_rows($sql_result) > 0) {
+ echo 1;
+ } else {
+ //izbriši šifrant
+ sisplet_query("DELETE FROM srv_hierarhija_sifranti WHERE id='" . $idSifranta . "'");
+ }
+ }
+
+ /**
+ * Pridobi število že vpisanih nivojev
+ */
+ public function stNnivojev()
+ {
+ $sql = sisplet_query("SELECT COUNT(id) FROM `srv_hierarhija_ravni` WHERE anketa_id='" . $this->anketa . "'");
+ echo $sql->fetch_row()[0];
+ }
+
+ public function obnoviHierarhijo()
+ {
+ $hierarhija = (isset($_POST['hierarhija']) ? $_POST['hierarhija'] : null);
+ $uporabniki = (isset($_POST['uporabniki']) ? $_POST['uporabniki'] : null);
+ $id_shranjene_strukture = (isset($_POST['id']) ? $_POST['id'] : null);
+
+ // tracking - beleženje sprememb
+ $this->trackingChanges();
+
+ // Pobrišemo dosedanjo hierarhijo
+ $this->izbrisiVseRavni();
+
+ // preverimo, če je json
+ if ($this->isJson($hierarhija))
+ $hierarhija = $this->isJson($hierarhija, 1);
+
+ $kopiranje = HierarhijaKopiranjeClass::getInstance($this->anketa)->ustvariRavniInSifranteLahkoTudiStrukturo($hierarhija, $id_shranjene_strukture, $uporabniki);
+
+ if ($kopiranje) {
+ // Vkolikor je bilo kopiranje uspešno shranimo še podatke srv_hierarhija_shrani
+
+ // Pridobimo vse ravni in šifrante, ki smo jih vpisali skupaj z ID-ji;
+ return json_encode($this->pridobiVseRavniSifrante());
+ }
+
+ return 'Napaka pri kopiranju hierarhije';
+ }
+
+ // izbriše shranjeno hierarhijo
+ public function izbrisiHierarhijo()
+ {
+ $hierarhija_id = $_POST['id'];
+
+ if (empty($hierarhija_id)) {
+ echo 'Ni mogoče izbrisati error';
+ return false;
+ }
+
+ // tracking - beleženje sprememb
+ $this->trackingChanges();
+
+ // Preverimo, če je omenjena hierarhija že kje uporabljena
+ $uporabljena_hierarhija = sisplet_query("SELECT id FROM srv_hierarhija_options WHERE option_name='srv_hierarhija_shrani_id' AND option_value='" . $hierarhija_id . "'", "obj");
+
+ if (empty($uporabljena_hierarhija) || sizeof($uporabljena_hierarhija) == 0) {
+ $sql = sisplet_query("DELETE FROM srv_hierarhija_shrani WHERE id='" . $hierarhija_id . "'");
+ $this->sqlError($sql);
+
+ echo 'success';
+ }else{
+ echo 'nothing';
+ }
+
+ }
+
+ // Uvozi hierarhijo
+ public function uvoziHierarhijo()
+ {
+ $izrisi = '<div>';
+ $izrisi .= '<h2>' . $this->lang['srv_hierarchy_import_code'] . '</h2>';
+ $izrisi .= '<div>';
+ $izrisi .= '<a href="/uploadi/dokumenti/primer_csv_sifrantov_in_nivojev.csv" download><h5>' . $this->lang['srv_hierarchy_import_example'] . '</h5></a>';
+ $izrisi .= '
+ <form action="index.php?anketa=' . $this->anketa . '&a=hierarhija_superadmin&m=uvoz-sifrantov&t=hierarhija-uvoz" method="POST" enctype="multipart/form-data">
+ <div style="display:block !important;width:52%;float:left; clear:both;">
+ <input type="file" name="uvozi-hierarhijo" class="upload-file" required="required"/>
+ </div>
+ <div style="display:block;float:left; padding-left: 20px;">
+ <button type="submit" class="btn btn-moder">Uvozi hierarhijo</button>
+ </div>
+ </form>
+ ';
+
+ $izrisi .= '</div>';
+ $izrisi .= '</div>';
+
+ // Gumb za zapret popup
+ $izrisi .= '<div class="buttonwrapper spaceRight floatLeft" style="clear: both;padding-top: 20px;">';
+ $izrisi .= '<a class="ovalbutton ovalbutton_gray" href="#" onclick="vrednost_cancel(); return false;"><span>' . $this->lang['srv_close_profile'] . '</span></a>' . "\n\r";
+ $izrisi .= '</div>';
+
+ return $izrisi;
+ }
+
+ /**
+ * Pridobimo vse shranjene hierarhije
+ *
+ * @return $array
+ */
+ public function seznamVsehShranjenihHierarhij()
+ {
+ $sql = sisplet_query("SELECT * FROM srv_hierarhija_shrani WHERE user_id='" . $this->user_id . "'");
+ $this->sqlError($sql);
+
+ $data = array();
+ if ($sql->num_rows > 0) {
+ while ($row = $sql->fetch_object()) {
+ $data[] = [
+ 'id' => $row->id,
+ 'ime' => $row->ime,
+ 'anketa' => $row->anketa_id,
+ 'hierarhija' => $row->hierarhija,
+ 'struktura' => (!is_null($row->struktura) ? 1 : 0),
+ 'stEvalvirancev' => (!is_null($row->st_uciteljev) ? $row->st_uciteljev : 0),
+ 'stUporabnikov' => (!is_null($row->st_vseh_uporabnikov) ? $row->st_vseh_uporabnikov : 0)
+ ];
+ }
+ }
+
+ return $data;
+ }
+
+ /**
+ * Aktivno/trenutno hierarhijo shrani v srv_hierarhija_shrani v stringu
+ */
+ public function updateAktivnoHierarhijo()
+ {
+ $id = $_POST['id'];
+ $hierarhija = $_POST['hierarhija'];
+
+ // tracking - beleženje sprememb
+ $this->trackingChanges();
+
+ $sql_insert = sisplet_query("UPDATE srv_hierarhija_shrani SET hierarhija='" . $hierarhija . "' WHERE id='" . $id . "' AND anketa_id='" . $this->anketa . "'");
+ $this->sqlError($sql_insert);
+ }
+
+ private function trackingChanges()
+ {
+ TrackingClass::update($this->anketa, '21');
+ }
+
+ /**
+ * Pobrišemo vse ravni in nastavitve v podatkovni bazi
+ */
+ public function izbrisiVseRavni()
+ {
+ //Pobrišemo vse nastavitve za omenjeno anketo
+ sisplet_query("DELETE FROM srv_hierarhija_options WHERE anketa_id='" . $this->anketa . "'");
+
+ sisplet_query("DELETE FROM srv_hierarhija_ravni WHERE anketa_id='" . $this->anketa . "'");
+ }
+
+ /**
+ * Pridobimo seznam vseh ravni skupaj s šifrani in vrnemo v obliki polja
+ *
+ * @param $anketa_id ;
+ * @return array();
+ */
+ public function pridobiVseRavniSifrante()
+ {
+
+ $sql = sisplet_query("SELECT id, level, ime, unikaten FROM `srv_hierarhija_ravni` WHERE anketa_id='" . $this->anketa . "'");
+
+ $polje = array();
+ if ($sql->num_rows > 0) {
+ while ($row = $sql->fetch_object()) {
+
+ //Poiščemo še šifrante za omenjen nivo
+ $sql_sifranti = sisplet_query("SELECT id, ime FROM `srv_hierarhija_sifranti` WHERE hierarhija_ravni_id='" . $row->id . "' ORDER BY ime");
+ $sifranti = array();
+ if ($sql_sifranti->num_rows > 0) {
+ while ($sifrant = $sql_sifranti->fetch_object()) {
+ $sifranti[] = [
+ 'id' => $sifrant->id,
+ 'ime' => $sifrant->ime
+ ];
+ }
+ }
+
+
+ $polje[] = [
+ 'st' => $row->level,
+ 'ime' => $row->ime,
+ 'id' => $row->id,
+ 'unikaten' => $row->unikaten,
+ 'sifranti' => $sifranti
+ ];
+ }
+ }
+
+ return $polje;
+ }
+
+ /**
+ * Preimenuje ime hierarhije iz seznama hierarhij
+ */
+ public function preimenujHierarhijo()
+ {
+ $hierarhija_id = $_POST['id'];
+ $ime = strip_tags($_POST['ime']);
+
+ // tracking - beleženje sprememb
+ $this->trackingChanges();
+
+ if (!empty($ime)) {
+ $sql = sisplet_query("UPDATE srv_hierarhija_shrani SET ime='" . $ime . "' WHERE id='" . $hierarhija_id . "' AND anketa_id='" . $this->anketa . "'");
+ $this->sqlError($sql);
+ }
+ }
+
+ /**
+ * Popravi ime nivoja ali, da je unikaten in se ga lahko uporabi samo 1x , ko je enkrat že vnešeno v bazo
+ */
+ public function postPopraviNivoSsifranti()
+ {
+ $id_nivoja = $_POST['id_nivoja'];
+ $vsebina = $_POST['besedilo'];
+ $unikaten = $_POST['unikaten'];
+
+ // tracking - beleženje sprememb
+ $this->trackingChanges();
+
+ if (!empty($vsebina)) {
+ sisplet_query("UPDATE srv_hierarhija_ravni SET ime='$vsebina' WHERE id='$id_nivoja' AND anketa_id='" . $this->anketa . "'");
+ }
+
+ if (!is_null($unikaten)) {
+ sisplet_query("UPDATE srv_hierarhija_ravni SET unikaten='$unikaten' WHERE id='$id_nivoja' AND anketa_id='" . $this->anketa . "'");
+ }
+ }
+
+ /**
+ * Briši cel nivo skupaj s šifranti
+ *
+ * @return integer
+ */
+ public function brisiCelNivoSkupajSsifranti()
+ {
+ $id_nivoja = $_POST['id_nivoja'];
+
+ // tracking - beleženje sprememb
+ $this->trackingChanges();
+
+ # Najprej preverimo, če je za ta nivo že zgrajena hierarhija
+ $hierarhija = sisplet_query("SELECT * FROM srv_hierarhija_struktura WHERE hierarhija_ravni_id='$id_nivoja'");
+ $this->sqlError($hierarhija);
+ if ($hierarhija->num_rows == 0) {
+ // sql level
+ $sql_level = sisplet_query("SELECT level FROM srv_hierarhija_ravni WHERE id='" . $id_nivoja . "'");
+ $this->sqlError($sql_level);
+
+ $nivo_brisi = sisplet_query("DELETE FROM srv_hierarhija_ravni WHERE id='" . $id_nivoja . "'");
+ $this->sqlError($nivo_brisi);
+
+ //Vse ostale preštevilčimo
+ $sql_prestevilci = sisplet_query("SELECT id, level FROM `srv_hierarhija_ravni` WHERE anketa_id='" . $this->anketa . "' AND level>'" . $sql_level->fetch_row()[0] . "'");
+ if ($sql_prestevilci->num_rows > 0) {
+ while ($row = $sql_prestevilci->fetch_object()) {
+ sisplet_query("UPDATE `srv_hierarhija_ravni` SET level='" . ($row->level - 1) . "' WHERE anketa_id='" . $this->anketa . "' AND id='" . $row->id . "'");
+ }
+ }
+
+
+ $sql = sisplet_query("SELECT COUNT(id) FROM `srv_hierarhija_ravni` WHERE anketa_id='" . $this->anketa . "'");
+ echo $sql->fetch_row()[0];
+ } else {
+ echo 0;
+ }
+ }
+
+ /**
+ * Možnost dodajanja komentarja k hierarhiji
+ *
+ * @return html
+ */
+ public function htmlPopUpKomentarKhierarhiji()
+ {
+ $shrani_id = (new HierarhijaQuery)->getRowOptions($this->anketa, 'srv_hierarhija_shrani_id');
+ if (!is_null($shrani_id))
+ $shrani_id = $shrani_id->option_value;
+
+ // Če komenatar že obstaja
+ $sql_shrani = sisplet_query("SELECT komentar FROM srv_hierarhija_shrani WHERE id='" . $shrani_id . "'");
+ $komentar = $sql_shrani->fetch_object()->komentar;
+
+ echo '<div>';
+ echo '<h2> Komentar k hierarhiji </h2>';
+ echo '<div>';
+
+ echo '<div style="padding:15px 0;">';
+ echo '<textarea data-id="' . $shrani_id . '" id="hierarhija-komentar" name="komentar" style="height:100px; width:100%;">' . $komentar . '</textarea>';
+ echo '</div>';
+
+ echo '</div>';
+ echo '</div>';
+
+ // Gumb za zapret popup in potrdit
+ echo '<div class="buttonwrapper spaceRight floatLeft">';
+ echo '<a class="ovalbutton ovalbutton_orange" href="#" onclick="shraniKomentar()"; return false;"><span>' . $this->lang['srv_potrdi'] . '</span></a>' . "\n\r";
+ echo '</div>';
+
+ echo '<div class="buttonwrapper spaceRight floatLeft">';
+ echo '<a class="ovalbutton ovalbutton_gray" href="#" onclick="vrednost_cancel(); return false;"><span>' . $this->lang['srv_close_profile'] . '</span></a>' . "\n\r";
+ echo '</div>';
+ }
+
+ /**
+ * Post komentar k hierarhiji
+ *
+ * @return integer
+ */
+ public function postKomentarKhierarhiji()
+ {
+ // tracking - beleženje sprememb
+ $this->trackingChanges();
+
+ $komentar = (!empty($_POST['komentar']) ? $_POST['komentar'] : null);
+ $shrani_id = (!empty($_POST['id']) ? $_POST['id'] : null);
+
+ if (is_null($shrani_id))
+ return 'Ni ID-ja.';
+
+ sisplet_query("UPDATE srv_hierarhija_shrani SET komentar='" . $komentar . "' WHERE id='" . $shrani_id . "' AND anketa_id='" . $this->anketa . "'");
+
+ echo 1;
+ }
+
+ /**
+ * Prikaži popup za nalaganje logotipa
+ *
+ * @return render HTML
+ */
+ public function htmlPopUpUploadLogo()
+ {
+ global $site_url;
+
+ $shrani_id = (new HierarhijaQuery)->getRowOptions($this->anketa, 'srv_hierarhija_shrani_id');
+
+ if (!is_null($shrani_id))
+ $shrani_id = $shrani_id->option_value;
+
+ // Če komenatar že obstaja
+ $logo = sisplet_query("SELECT logo FROM srv_hierarhija_shrani WHERE id='" . $shrani_id . "'", "obj")->logo;
+
+ echo '<div style="clear: both;" id="hierarhija-container">';
+ echo '<h2> Logotip </h2>';
+ echo '<div>';
+ if (!empty($logo))
+ echo '<div id="hierarhija-logo" style="padding-bottom: 15px; display: block; float: left;">
+ <img src="' . $site_url . 'admin/survey/modules/mod_hierarhija/porocila/logo/' . $logo . '" style="max-height: 100px; max-width: 500px;display: block;float: left;">
+ <span style="display: block;float: left; color:#ffa608;cursor: pointer;padding: 10px;" onclick="izbrisiLogo(\'' . $shrani_id . '\')"><i class="fa fa-trash" aria-hidden="true"></i> Izbriši</span>
+ </div>';
+
+ echo '<div style="padding:15px 0;">';
+ echo '
+ <form action="index.php?anketa=' . $this->anketa . '&a=hierarhija_superadmin&m=upload-logo" method="POST" enctype="multipart/form-data">
+ <input type="hidden" name="id" value="' . $shrani_id . '">
+ <div style="display:block !important;width:52%;float:left; clear:both;">
+ <input type="file" name="logo" class="upload-file" required="required"/>
+ </div>
+
+ <div style="clear: both; padding-top: 20px;">
+ <div class="buttonwrapper spaceRight floatLeft">
+ <button type="submit" class="btn btn-moder">Naloži</button>
+ </div>
+
+ <div class="buttonwrapper spaceRight floatLeft">
+ <button class="btn btn-moder" href="#" onclick="vrednost_cancel(); return false;"><span>' . $this->lang['srv_close_profile'] . '</span></button>
+ </div>
+ </div>
+
+ </form>
+ ';
+ echo '</div>';
+ echo '</div>';
+ echo '</div>';
+ }
+
+
+ /**
+ * Preverimo, če je JSON
+ *
+ * @param (string) $string
+ * @return return true ali error
+ */
+ private function isJson($string, $polje = 0)
+ {
+ if (is_string($string)) {
+ $array = json_decode(stripslashes($string));
+
+ if (json_last_error() == JSON_ERROR_NONE) {
+ if ($polje)
+ return $array;
+
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ private function sqlError($sql)
+ {
+ if (!$sql) {
+ echo mysqli_error($GLOBALS['connect_db']);
+ die();
+ }
+
+ }
+
+ /**
+ * Naredi JSON format
+ *
+ * @return json response
+ */
+ public function jsonSerialize()
+ {
+ return $this->json;
+ }
+
+} \ No newline at end of file
diff --git a/admin/survey/modules/mod_hierarhija/class/Ajax/AjaxHierarhijaDostopUporabnikovClass.php b/admin/survey/modules/mod_hierarhija/class/Ajax/AjaxHierarhijaDostopUporabnikovClass.php
new file mode 100644
index 0000000..652cfa9
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/class/Ajax/AjaxHierarhijaDostopUporabnikovClass.php
@@ -0,0 +1,243 @@
+<?php
+/***************************************
+ * Description: Omogočanje dostopa za SA modul
+ * Autor: Robert Šmalc
+ * Created date: 28.09.2017
+ *****************************************/
+
+namespace Hierarhija\Ajax;
+
+
+class AjaxHierarhijaDostopUporabnikovClass {
+
+ public function __construct()
+ {
+ global $admin_type;
+
+ if($admin_type != 0)
+ return false;
+
+ if (!$this->isAjax())
+ return redirect('/admin/survey/');
+ }
+
+ public function popupNew($id = null){
+ $user = null;
+
+ if(!empty($id)) {
+ $user = sisplet_query("SELECT id, u.name, u.surname, u.email, d.ustanova, d.aai_email FROM srv_hierarhija_dostop AS d LEFT JOIN users AS u ON u.id=d.user_id WHERE id='".$id."'", "obj");
+
+ if(empty($user->email))
+ $user = null;
+ }
+
+ global $lang;
+ echo '<div class="sa-modul">';
+
+ echo '<div>';
+ if(!empty($user)){
+ echo '<h2> Urejanje uporabnika <span class="red">'.$user->name.' ' .$user->surname.'</span> za dostop do SA modula</h2>';
+ }else {
+ echo '<h2> Vpiši uporabnika za dostop do SA modula</h2>';
+ }
+ echo '<div>';
+
+ // EMAIL
+ echo '<div style="width: 100%;">';
+ echo '<label>Elektronski naslov</label><br/>';
+ if(!empty($user)){
+ echo '<input type="email" value="'.$user->email .'" disabled="disabled" style="width: 80%; padding: 4px; margin: 2px 0;"/>';
+ }else{
+ echo '<input type="email"
+ value=""
+ placeholder="janez.novak@sola.si"
+ id="sa-email"
+ onblur="preveriVpisanEmailZaSAdostop()"
+ required="required"
+ style="width: 80%; padding: 4px; margin: 2px 0;"/>';
+ echo '<input type="hidden" value="" id="sa-id" "/>';
+ echo '<span id="sa-email-sporocilo"></span>';
+ }
+ echo '</div>';
+
+ // Organizzacija
+ echo '<div style="padding:15px 0;width: 100%;">';
+ echo '<label>Šola oz. javni zavod</label><br/>';
+ echo '<input type="text" value="'.(!empty($user) ? $user->ustanova : NULL).'" placeholder="Srednja šola" id="sa-ustanova" required="required" style="width: 80%; padding: 4px; margin: 2px 0;"/>';
+ echo '</div>';
+
+ // Email za AAI dostop
+ echo '<div style="padding-bottom:15px; width: 100%;">';
+ echo '<label>Elektronski naaslov za AAI dostop (v kolikor je primarni email drugačen od AAI dostopa)</label><br/>';
+ echo '<input type="email" value="'.(!empty($user) ? $user->aai_email : NULL).'" placeholder="janez.novak@guest.arnes.si" id="sa-aai" style="width: 80%; padding: 4px; margin: 2px 0;"/>';
+ echo '</div>';
+
+ echo '</div>';
+ echo '</div>';
+
+ // Gumb za zapret popup in potrdit
+ echo '<div class="sa-modul">';
+ echo '<div class="buttonwrapper spaceRight floatLeft">';
+ if(!empty($user)) {
+ echo '<a class="ovalbutton ovalbutton_orange sa-potrdi" href="#" onclick="posodobiSAuporabnika(\'' . $user->id . '\')"; return false;"><span>' . $lang['srv_potrdi'] . '</span></a>' . "\n\r";
+ }else {
+ echo '<a class="ovalbutton ovalbutton_orange sa-potrdi" href="#" onclick="shraniSAuporabnika()"; return false;"><span>' . $lang['srv_potrdi'] . '</span></a>' . "\n\r";
+ }
+ echo '</div>';
+
+ echo '<div class="buttonwrapper spaceRight floatLeft">';
+ echo '<a class="ovalbutton ovalbutton_gray" href="#" onclick="vrednost_cancel(); return false;"><span>' . $lang['srv_close_profile'] . '</span></a>' . "\n\r";
+ echo '</div>';
+ echo '</div>';
+
+ echo '</div>';
+
+ }
+
+ public function save(){
+ $email = (!empty($_POST['email']) ? $_POST['email'] : null);
+ $user_id = (!empty($_POST['id']) ? $_POST['id'] : null);
+ $ustanova = (!empty($_POST['ustanova']) ? $_POST['ustanova'] : null);
+ $aai_email = (!empty($_POST['aai']) ? $_POST['aai'] : null);
+
+ $uporabnik = sisplet_query("SELECT id, email FROM users WHERE email='".$email."'", "obj");
+ if($uporabnik->id != $user_id)
+ return false;
+
+ sisplet_query("INSERT INTO srv_hierarhija_dostop (user_id, dostop, ustanova, aai_email) VALUES ('".$uporabnik->id."', '1', '".$ustanova."', '".$aai_email."')");
+
+ echo 'success';
+ }
+
+ public function update(){
+ $user_id = (!empty($_POST['id']) ? $_POST['id'] : null);
+ $ustanova = (!empty($_POST['ustanova']) ? $_POST['ustanova'] : null);
+ $aai_email = (!empty($_POST['aai']) ? $_POST['aai'] : null);
+
+ sisplet_query("UPDATE srv_hierarhija_dostop SET ustanova='".$ustanova."' , aai_email='".$aai_email."' WHERE user_id='".$user_id."'");
+
+ echo 'success';
+ }
+
+ public function delete(){
+ $user_id = (!empty($_POST['id']) ? $_POST['id'] : null);
+
+ sisplet_query("DELETE FROM srv_hierarhija_dostop WHERE user_id='".$user_id."'");
+ }
+
+ public function checkUserEmail(){
+ $email = (!empty($_POST['email']) ? $_POST['email'] : null);
+
+ if(!validEmail($email)) {
+ echo json_encode([
+ 'tip' => 'error',
+ 'sporocilo' => 'Napačen email.'
+ ]);
+
+ return FALSE;
+ }
+
+ $uporabnik = sisplet_query("SELECT id, email FROM users WHERE email='".$email."'", "obj");
+
+ if(empty($uporabnik)) {
+ echo json_encode([
+ 'tip' => 'error',
+ 'sporocilo' => 'Uporabnika z omenjenim emailom ni v bazi.'
+ ]);
+
+ return FALSE;
+ }
+
+ echo json_encode([
+ 'tip' => 'success',
+ 'sporocilo' => 'Email pravilen, ker uporabnik obstaja v bazi.',
+ 'id' => $uporabnik->id
+ ]);
+ }
+
+ public function show(){
+ global $lang;
+ global $global_user_id;
+ global $admin_type;
+
+ $user_id = (!empty($_POST['id']) ? $_POST['id'] : null);
+
+ if(is_null($user_id))
+ return false;
+
+
+ echo '<div style="float: right; width: 250px; max-height: 345px; overflow-y: auto">';
+ echo '<h3><strong>'.$lang['srv_ankete'].'</strong></h3>';
+
+ echo '<ul>';
+ $sql = sisplet_query("SELECT srv_anketa.id, srv_anketa.naslov FROM srv_dostop, srv_anketa WHERE srv_dostop.uid='$user_id' AND srv_dostop.ank_id=srv_anketa.id ORDER BY srv_anketa.edit_time DESC");
+ while ($row = mysqli_fetch_array($sql)) {
+ echo '<li><a href="#" onclick="anketa_user_dostop(\''.$uid.'\', \''.$row['id'].'\'); return false;">'.$row['naslov'].'</a></li>';
+ }
+
+ echo '</ul>';
+ echo '</div>';
+
+ $user = sisplet_query("SELECT id, u.name, u.surname, u.email, d.ustanova, d.aai_email, u.type, u.status, DATE_FORMAT(d.created_at, '%d.%m.%Y - %H:%i') AS created, DATE_FORMAT(d.updated_at, '%d.%m.%Y - %H:%i') AS updated FROM srv_hierarhija_dostop AS d LEFT JOIN users AS u ON u.id=d.user_id WHERE user_id='".$user_id."'", "obj");
+
+ echo '<div class="sa-modul">';
+ echo '<h3><strong>'.$lang['user2'].'</strong></h3>';
+ echo '<p><label for="type">'.$lang['admin_type'].':</label>';
+ switch ($user->type){
+ case 0:
+ echo $lang['admin_manager'];
+ break;
+ case 1:
+ echo $lang['admin_manager'];
+ break;
+ case 2:
+ echo $lang['admin_clan'];
+ break;
+ default:
+ echo $lang['admin_narocnik'];
+ }
+ echo '</p>';
+ echo '<p><label for="status">'.$lang['status'].':</label>';
+ switch ($user->status){
+ case 0:
+ echo $lang['srv_user_banned'];
+ break;
+ case 1:
+ echo $lang['srv_user_notbanned'];
+ break;
+ }
+ echo '</p>';
+ echo '<p><label for="email">'.$lang['email'].':</label>'.$user->email.'</p>';
+ echo '<p><label for="name">'.$lang['name'].':</label>'.$user->name.'</p>';
+ echo '<p><label for="surname">'.$lang['surname'].':</label>'.$user->surname.'</p>';
+ echo '<p><label for="ustanova">'.$lang['srv_hierarchy_users_organization'].':</label>'.$user->ustanova.'</p>';
+ echo '<p><label for="aai_uporabnik">'.$lang['srv_hierarchy_users_aai'].':</label>'.$user->aai_email.'</p>';
+ echo '<p><label for="created">'.$lang['srv_hierarchy_users_created'].':</label>'.$user->created.'</p>';
+ echo '<p><label for="updatetd">'.$lang['srv_hierarchy_users_updated'].':</label>'.$user->updated.'</p>';
+
+ // Gumb za zapret popup in potrdit
+ echo '<div style=" display: block;">';
+ echo '<div class="buttonwrapper spaceRight floatLeft">';
+ echo '<a class="ovalbutton ovalbutton_gray" href="#" onclick="vrednost_cancel(); return false;"><span>' . $lang['srv_close_profile'] . '</span></a>' . "\n\r";
+ echo '</div>';
+ echo '</div>';
+ echo '</div>';
+
+
+ }
+
+
+ /**
+ * Preverimo, če je ajax request
+ *
+ * @return boolean
+ */
+ private function isAjax()
+ {
+ if (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest')
+ return true;
+
+ return false;
+ }
+
+} \ No newline at end of file
diff --git a/admin/survey/modules/mod_hierarhija/class/Ajax/AjaxSuperSifraClass.php b/admin/survey/modules/mod_hierarhija/class/Ajax/AjaxSuperSifraClass.php
new file mode 100644
index 0000000..478094d
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/class/Ajax/AjaxSuperSifraClass.php
@@ -0,0 +1,69 @@
+<?php
+/***************************************
+ * Description:
+ * Autor: Robert Šmalc
+ * Created date: 06.07.2017
+ *****************************************/
+
+namespace Hierarhija\Ajax;
+
+use Hierarhija\Model\HierarhijaQuery;
+use TrackingClass;
+
+class AjaxSuperSifra
+{
+
+ private $anketa;
+ private $lang;
+ private $user_id;
+
+ public function __construct($anketa)
+ {
+ $this->anketa = $anketa;
+
+ //global
+ global $lang;
+ global $global_user_id;
+ $this->lang = $lang;
+ $this->user_id = $global_user_id;
+
+ // tracking - beleženje sprememb
+ TrackingClass::update($this->anketa, '22');
+
+ return $this;
+ }
+
+ private static $_instance;
+
+ public static function init($anketa)
+ {
+ if (!static::$_instance)
+ return (new AjaxSuperSifra($anketa));
+
+ return static::$_instance;
+ }
+
+
+ /**
+ * Shrani superšifro in prikaži v tabeli
+ *
+ * @return
+ */
+ public function shrani()
+ {
+ $kode = ((!empty($_POST['kode']) && is_array($_POST['kode'])) ? $_POST['kode'] : null);
+
+ if(is_null($kode))
+ return '';
+
+ $ss = HierarhijaQuery::saveSuperSifra($this->anketa, $kode);
+
+ echo json_encode($ss);
+ }
+
+ public function getAll()
+ {
+ echo json_encode(HierarhijaQuery::vseSuperkodeSpripadajocimiHierarhijami($this->anketa));
+ }
+
+} \ No newline at end of file
diff --git a/admin/survey/modules/mod_hierarhija/class/Ajax/AjaxUporabnikiClass.php b/admin/survey/modules/mod_hierarhija/class/Ajax/AjaxUporabnikiClass.php
new file mode 100644
index 0000000..628977f
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/class/Ajax/AjaxUporabnikiClass.php
@@ -0,0 +1,834 @@
+<?php
+/***************************************
+ * Description:
+ * Autor: Robert Šmalc
+ * Created date: 03.02.2017
+ *****************************************/
+
+namespace Hierarhija\Ajax;
+
+
+use Hierarhija\HierarhijaAjax;
+use Hierarhija\HierarhijaHelper;
+use Hierarhija\Model\HierarhijaOnlyQuery;
+use Hierarhija\Model\HierarhijaQuery;
+use SurveyInfo;
+use TrackingClass;
+
+class AjaxUporabniki
+{
+ private $anketa;
+ private $lang;
+ private $hierarhija_type;
+
+ public function __construct($anketa)
+ {
+ if (empty($anketa))
+ return null;
+
+ $this->anketa = $anketa;
+
+ // global variable
+ global $lang;
+ global $global_user_id;
+ $this->lang = $lang;
+ $this->user_id = $global_user_id;
+ $this->hierarhija_type = HierarhijaHelper::preveriTipHierarhije($this->anketa);
+
+ return $this;
+ }
+
+ private static $_instance;
+
+ public static function init($anketa)
+ {
+ if (!static::$_instance)
+ return (new AjaxUporabniki($anketa));
+
+ return static::$_instance;
+ }
+
+ /**
+ * Pridobimo vse celotno strukturo za prikaz v dataTables
+ *
+ * @return $array - večdimenzionalni
+ */
+ public function getDataTablesPodatkeZaPrikazTabele()
+ {
+ // če je admin
+ if ($this->hierarhija_type < 5) {
+ $podatki = (new HierarhijaQuery())->hierarhijaArrayDataTables($this->anketa);
+ } else {
+ $hierarhija = (new HierarhijaQuery());
+ $uporabnik = $hierarhija->preveriPravicoUporabnika($this->anketa);
+ $struktura = $hierarhija->poisciHierarhijoNavzgor($uporabnik->struktura_id);
+
+ $podatki = (new HierarhijaQuery())->hierarhijaArrayDataTables($this->anketa, $struktura);
+ }
+
+ return $podatki;
+ }
+
+ /**
+ * Preverimo, če je omenjen šifrant že napisan za ustrezen nivo
+ *
+ * @return $array or null
+ */
+ public function preveriVpisSifrantaZaSledeciNivo()
+ {
+ $level = $_POST['level'];
+ $hierarhija_sifranti_id = $_POST['hierarhija_sifranti_id'];
+
+ // Če je parent_id = potem moramo pogledati na prvi nivo IS NULL
+ if (empty($_POST['parent_id'])) {
+ $parent = "parent_id IS NULL";
+ } else {
+ $parent = "parent_id='" . $_POST['parent_id'] . "'";
+ }
+
+ $sql = sisplet_query("SELECT * FROM srv_hierarhija_struktura WHERE hierarhija_sifranti_id='" . $hierarhija_sifranti_id . "' AND level='" . $level . "' AND " . $parent);
+
+ // imamo zapis v bazi, potem pogledamo še če obstajajo uporabniki
+ if ($sql->num_rows > 0) {
+
+ $podatki = [];
+ while ($row = $sql->fetch_object()) {
+
+ $podatki = [
+ 'id' => $row->id,
+ 'level' => $row->level,
+ 'parent_id' => $row->parent_id,
+ 'hierarhija_sifranti_id' => $row->hierarhija_sifranti_id
+
+ ];
+
+ $sql_user = sisplet_query("
+ SELECT
+ users.id as id,
+ users.email as email,
+ users.name as name,
+ users.surname as surname
+ FROM
+ srv_hierarhija_struktura_users as u
+ LEFT JOIN
+ users ON users.id = u.user_id
+ WHERE
+ u.hierarhija_struktura_id = '" . $row->id . "'
+ ");
+
+ // V kolikor so v bazi uporabniki potem pridobimo vse in zapišemo v polje
+ if ($sql_user->num_rows > 0) {
+ while ($user = $sql_user->fetch_object()) {
+ $podatki['uporabniki'][] = [
+ 'id' => $user->id,
+ 'email' => $user->email,
+ 'ime' => $user->name,
+ 'priimek' => $user->surname
+ ];
+ }
+ }
+
+ }
+
+ return ($podatki);
+ }
+
+ return 0;
+ }
+
+ /**
+ * Posodobimo sifrante za JS tree, če brišemo element iz drevesne strukture
+ *
+ * @return array
+ */
+ public function getPosodobiSifranteZaJsTree()
+ {
+ $id = $_POST['id'];
+
+ # Pridobimo strukturo navzgor od trenutnega ID-ja za vse šifrante
+ $nivoji = HierarhijaQuery::posodobiSifranteVrednostiGledeNaTrenutenIdStrukture($id);
+
+ # Pridobimo max st nivojev
+ $max_st = sisplet_query("SELECT MAX(level) AS max FROM srv_hierarhija_ravni WHERE anketa_id='$this->anketa'")->fetch_object()->max;
+
+ # Preverimo na katerem ID-ju (nivoju) se nahaja uporabnik, ki je kliknil na strukturo
+ $user_db = HierarhijaOnlyQuery::queryStrukturaUsersLevel($this->anketa, $this->user_id);
+ if ($user_db->num_rows == 0 && $this->hierarhija_type < 5) {
+ $nivoji['user'] = [
+ 'id_strukture' => 'admin',
+ 'max_level' => $max_st
+ ];
+ }
+
+ if ($user_db->num_rows > 0) {
+ $user_db = $user_db->fetch_object();
+ $nivoji['user'] = [
+ 'id_strukture' => $user_db->struktura_id,
+ 'level' => $user_db->level,
+ 'max_level' => $max_st
+ ];
+ }
+
+ return $nivoji;
+ }
+
+ /**
+ * Shrani strukturo v bazo (novi šifranti in uporabniki za sledeči nivo
+ *
+ * @return string or intiger
+ */
+ public function shraniStrukturoSifrantovInUporabnikov()
+ {
+ // tracking - beleženje sprememb
+ $this->trackingChanges();
+
+ $vnos = $_POST['vnos'];
+ $osebe = $_POST['osebe'];
+ $hierarhija_id = null;
+
+ if (empty($vnos))
+ return 0;
+
+ // Najprev shranimo strukturo, da pridobimo id za vpis oseb
+ foreach ($vnos as $nivo => $vpis) {
+ // Vpišemo samo nivoje večje od 0, ker post request vsebuje tudi polje 0, ki za naš ni relavanto
+
+ if ($nivo > 0 && is_array($vpis) && empty($vpis['id'])) {
+ $ravni_id = $vpis['hierarhija_ravni_id'];
+ $sifrant_id = $vpis['hierarhija_sifranti_id'];
+ $level = $vpis['level'];
+
+ // Če je prvi nivo potem je parent_id NULL, za vse ostale primere pa moramo met parenta, če naprej v hierarhiji ni parenta potem uporabimo $hierarhija_id - predhodni element vpisa
+ if ($level == 1)
+ $parent_id = null;
+ elseif ($level > 1 && empty($vpis['parent_id']))
+ $parent_id = $hierarhija_id;
+ else
+ $parent_id = $vpis['parent_id'];
+
+ // Vpis nove strukture, kjer dobimo ID in uporabimo potem za parent id
+ $hierarhija_id = sisplet_query("INSERT INTO
+ srv_hierarhija_struktura (anketa_id, hierarhija_ravni_id, parent_id, hierarhija_sifranti_id, level)
+ VALUES
+ ('" . $this->anketa . "', '" . $ravni_id . "', " . var_export($parent_id, true) . ",'" . $sifrant_id . "', ' " . $level . "')", "id");
+
+ // Vpišemo še uporabnike, če obstaja
+ if (!empty($osebe[$vpis['level']]) && is_array($osebe[$vpis['level']])) {
+ // Osebe so nanizane v poljih, vsaka oseba je podana preko polja, kjer [ 0 => email, 1=>ime, 2=>priimek], obvezen je samo prvi element
+ foreach ($osebe[$vpis['level']] as $oseba) {
+ $this->dodajUporabnikaVbazo($oseba, $hierarhija_id);
+ }
+ }
+
+ } elseif ($nivo > 0 && is_array($vpis) && !empty($vpis['id'])) {
+ // Vpišemo samo uporabnika
+ if (!empty($osebe[$vpis['level']]) && is_array($osebe[$vpis['level']])) {
+ // Osebe so nanizane v poljih, vsaka oseba je podana preko polja, kjer [ 0 => email, 1=>ime, 2=>priimek], obvezen je samo prvi element
+ foreach ($osebe[$vpis['level']] as $oseba) {
+ $this->dodajUporabnikaVbazo($oseba, $vpis['id']);
+ }
+ }
+ }
+ }
+
+ // Podatke shranimo še v srv_hierarhija_shrani
+ (new HierarhijaAjax($this->anketa))->shraniStrukturoHierarhijeVString();
+
+ return 'success';
+ }
+
+ /**
+ * pridobimo pravice trenutnega uporabnika
+ *
+ * level 1 - super admin ima vse pravice, ponavadi je lastnik ankete oz. jo je ustvaril in vključil hierarhijo
+ * levle 10 - običajni uporabnik, ki je dodan na določen nivo hierarhije
+ *
+ * @return array
+ */
+ public function getUserLevelPermission()
+ {
+ // vrne polje leve, struktura_id in parent_id
+ $hierarhija = (new HierarhijaQuery());
+ $uporabnik = $hierarhija->preveriPravicoUporabnika($this->anketa);
+
+ if (is_array($uporabnik) && $uporabnik['uporabnik'] == 1) {
+ echo json_encode($uporabnik);
+ die();
+ }
+
+ $struktura = $hierarhija->poisciHierarhijoNavzgor($uporabnik->struktura_id);
+
+ return [
+ 'uporabnik' => $uporabnik,
+ 'struktura' => $struktura
+ ];
+ }
+
+ /**
+ * Pridobimo nivoje in šifrane za sledečo raven pri tem če ni super admin ga omejimo
+ *
+ * @return array - ['nivoji', 'sifranti', 'maxLevel]
+ */
+ public function getSifrantiZaHierarhijaUserType()
+ {
+ if ($this->hierarhija_type < 5) {
+ // Pridobimo vse ravni in šifrante
+ $podatki = (new HierarhijaQuery())->getSifrantAdmin($this->anketa);
+ } else {
+ // Pridobimo nivo uporabnika, ki se nahaja najvišje v strukturi
+ $uporabnik = (new HierarhijaQuery())->preveriPravicoUporabnika($this->anketa);
+
+ // Pridobimo vse ravni in šifrante samo od uporabnikovega nivoja/level navzdol
+ $podatki = (new HierarhijaQuery())->getSifrantAdmin($this->anketa, 999, $uporabnik->level);
+ }
+
+ // Pridobimo max število nivojev, ki jih lahko vnesemo
+ $podatki['maxLevel'] = sisplet_query("SELECT MAX(level) as level FROM srv_hierarhija_ravni WHERE anketa_id='" . $this->anketa . "'")->fetch_object()->level;
+
+ return $podatki;
+ }
+
+ /**
+ * Dodamo uporabnika v bazo za sledečo strukturo
+ */
+ private function dodajUporabnikaVbazo($oseba, $struktura_id, $last = false)
+ {
+ global $pass_salt;
+
+ // Podatki o uporabniku
+ $email = (is_array($oseba) ? trim($oseba[0]) : $oseba);
+ $update = false;
+
+ //Iz emaila pridobimo podatke
+ preg_match('/(\w+)((?:\.)(\w+))?/', $email, $matches);
+
+ $name = !empty($oseba[1]) ? trim($oseba[1]) : ucfirst(mb_strtolower($matches[1]));
+
+ // V kolikor je primek ga
+ if(!empty($oseba[2])) {
+ $surname = trim($oseba[2]);
+ $update = true;
+ }elseif(!empty($matches[3])){
+ $surname = ucfirst(mb_strtolower($matches[3]));
+ }else{
+ $surname = '';
+ }
+
+
+ if ($email != '' && validEmail($email)) {
+ $sql_user = sisplet_query("SELECT id FROM users WHERE email='$email'");
+
+ if (mysqli_num_rows($sql_user) == 0) {
+ sisplet_query("INSERT INTO users (name, surname, email, pass, type, when_reg, came_from) VALUES ('$name', '$surname', '$email', '" . base64_encode((hash(SHA256, '' . $pass_salt))) . "', '3', DATE_FORMAT(NOW(), '%Y-%m-%d'), '1')");
+ $user_id = mysqli_insert_id($GLOBALS['connect_db']);
+ } else {
+ $row = mysqli_fetch_array($sql_user);
+ $user_id = $row['id'];
+
+ // V kolikor smo mi vnesli ime in prrimek potem popravimo tudi v bazi
+ if($update)
+ sisplet_query("UPDATE users SET name='".$name."', surname='".$surname."' WHERE id='".$user_id."'");
+ }
+
+ // V kolikor smo dodali nov email na zadnji nivo potem samo zamenjamo z obstoječim
+ if ($last) {
+ $query = sisplet_query("UPDATE srv_hierarhija_struktura_users SET user_id='" . $user_id . "' WHERE hierarhija_struktura_id='" . $struktura_id . "'");
+ } else {
+ $query = sisplet_query("INSERT INTO srv_hierarhija_struktura_users (hierarhija_struktura_id, user_id) VALUES ('" . $struktura_id . "', '" . $user_id . "')");
+ }
+ if (!$query) echo mysqli_error($GLOBALS['connect_db']);
+
+ // Preverimo, če je uporabnik že dodan in če ni ga nato šele dodamo
+ $user_search = sisplet_query("SELECT * FROM srv_hierarhija_users WHERE user_id='" . $user_id . "' AND anketa_id='$this->anketa'");
+ if ($user_search->num_rows == 0) {
+ $user_query = sisplet_query("INSERT INTO srv_hierarhija_users (user_id, anketa_id, type) VALUES ('" . $user_id . "', '" . $this->anketa . "', 10)");
+ if (!$user_query) echo mysqli_error($GLOBALS['connect_db']);
+ }
+
+ // Preverimo, če ima uporabnik za omenjeno anketo že pravice in mu nato dodamo pravice
+ HierarhijaQuery::dostopZaUporabnika($this->anketa, $user_id, 'insert');
+ }
+
+ }
+
+ /**
+ * Pridobi vse uporabnike za določen nivo
+ * uporablja se prid DataTables edit mode, da izpiše uporabnike pod vsak nivo
+ *
+ * @var $id - struktura id
+ * @return $array
+ */
+ public function pridobiUporabnikeZaDolocenNivoId()
+ {
+ // id strukture, da preverimo kateri uporabnikise nahajajo na omenjeni strukturi
+ $id = $_POST['id'];
+
+ $uporabniki = (new HierarhijaQuery())->pridobiVseUporabnikeZaSpecificnoStrukturo($id);
+
+ if (!is_array($uporabniki) || sizeof($uporabniki) == 0)
+ return 0;
+
+ //Preverimo max število nivojev/ravni za omenjeno anketo
+ $max_level = sisplet_query("SELECT MAX(level) AS level FROM srv_hierarhija_ravni WHERE anketa_id='" . $this->anketa . "'")->fetch_object()->level;
+
+ return [
+ 'uporabniki' => $uporabniki,
+ 'maxLevel' => $max_level
+ ];
+ }
+
+ /**
+ * Shrani uporabnike na določen nivo strukture - pri DataTables edit mode
+ */
+ public function postUporabnikeZaDolocenNivoId()
+ {
+ // tracking - beleženje sprememb
+ $this->trackingChanges();
+
+ $uporabniki = json_decode(stripslashes($_POST['uporabniki']));
+ $struktura_id = $_POST['struktura'];
+
+ if (sizeof($uporabniki) == 0)
+ return 'uporabnik';
+
+ // pobrišemo vse že dodane uporabnike
+ sisplet_query("DELETE FROM srv_hierarhija_struktura_users WHERE hierarhija_struktura_id='" . $struktura_id . "'");
+
+ // vpišemo nove uporabnike
+ foreach ($uporabniki as $uporabnik) {
+ sisplet_query("INSERT INTO srv_hierarhija_struktura_users (hierarhija_struktura_id, user_id) VALUES ('" . $struktura_id . "', '" . $uporabnik . "')");
+ }
+ }
+
+ /**
+ * Prikaži popup za vnos uporabnikov
+ *
+ * @return html
+ */
+ public function getUsersImportPopup(){
+
+ // tracking - beleženje sprememb
+ $this->trackingChanges();
+
+ echo '<div>';
+ echo '<h2>' . $this->lang['srv_hierarchy_import_user_title'] . '</h2>';
+ echo '<div>';
+ echo $this->lang['srv_hierarchy_import_user_text'];
+
+ echo '<div style="padding:15px 0;">';
+ echo '<textarea id="users-email-import" name="emails" style="height:300px; width:45%;float: left;" placeholder="jan.nov@sola.si, Janez, Novak"></textarea>';
+ echo '<div style="width:50%;display: block;float: left;height: 320px;clear: right;overflow: auto;padding-left: 18px;">';
+ echo '<b>Seznam učiteljev:</b>';
+
+ $vsi_ucitelji = $this->getAllUserInJson(true);
+
+ if(!empty($vsi_ucitelji)) {
+ echo '<div style="height: 269px;overflow: auto;"><ul>';
+ foreach($vsi_ucitelji as $ucitelj) {
+ echo '<li>'.$ucitelj['label'].'</li>';
+ }
+ echo '</ul></div>';
+ }
+ echo '</div>';
+ echo '</div>';
+
+ echo '</div>';
+ echo '</div>';
+
+ // Gumb za zapret popup in potrdit
+ echo '<div class="buttonwrapper spaceRight floatLeft">';
+ echo '<a class="ovalbutton ovalbutton_orange" href="#" onclick="shraniVseVpisaneUporabnike(); return false;"><span>' . $this->lang['srv_potrdi'] . '</span></a>' . "\n\r";
+ echo '</div>';
+
+ echo '<div class="buttonwrapper spaceRight floatLeft">';
+ echo '<a class="ovalbutton ovalbutton_gray" href="#" onclick="vrednost_cancel(); return false;"><span>' . $this->lang['srv_close_profile'] . '</span></a>' . "\n\r";
+ echo '</div>';
+ }
+
+ /**
+ * POST: vnos podatkov za vpis uporabnikov*
+ */
+ public function postImportUsers(){
+ $users = (!empty($_POST['users']) ? json_decode(stripslashes($_POST['users'])) : null);
+
+ if(is_null($users))
+ return 'null';
+
+ // Vsakega uporabnika pridobimo v svoj array
+ $users = explode(PHP_EOL, $users);
+
+ // Pridobimo ID za izbrano shranjeno hierarhijo
+ $id = HierarhijaQuery::getOptions($this->anketa, 'srv_hierarhija_shrani_id');
+
+ // Pridobimo podatke od prej, če niso NULL
+ $ze_vpisani_uporabniki = HierarhijaQuery::getHierarhijaShraniRow($id, 'uporabniki_list');
+
+ // Če imamo obstoječe upoabnik, jih sedajali nove
+ $polje = [];
+ if(!empty($ze_vpisani_uporabniki))
+ $polje = unserialize($ze_vpisani_uporabniki);
+
+ foreach($users as $user){
+ $user = trim($user);
+
+ $uporabnik = explode(',', $user);
+
+ if(validEmail($uporabnik[0])) {
+ preg_match('/(\w+)((?:\.)(\w+))?/', $uporabnik[0], $matches);
+
+ $name = ( !empty($uporabnik[1]) ? trim($uporabnik[1]) : ucfirst(mb_strtolower($matches[1])) );
+ $surname = ( !empty($uporabnik[2]) ? trim($uporabnik[2]) : ucfirst(mb_strtolower($matches[2])) );
+
+ $polje[] = [
+ 'id' => $user,
+ 'label' => $name. ' '.$surname.' - ('.$uporabnik[0].')'
+ ];
+ }
+ }
+
+ sisplet_query("UPDATE srv_hierarhija_shrani SET uporabniki_list='".serialize($polje)."' WHERE id='" . $id . "' AND anketa_id='" . $this->anketa . "'");
+
+ echo json_encode($polje);
+ }
+
+ /**
+ * Pridobimo vse uporabnike
+ *
+ * @return json
+ */
+ public function getAllUserInJson($return = false)
+ {
+ $id = HierarhijaQuery::getOptions($this->anketa, 'srv_hierarhija_shrani_id');
+ $uporabniki = HierarhijaQuery::getHierarhijaShraniRow($id, 'uporabniki_list');
+
+ if($return)
+ return unserialize($uporabniki);
+
+ echo json_encode(unserialize($uporabniki));
+ }
+
+
+ /**
+ * Pop up obrazec za dodajanje uporabnikov na določen nivo
+ *
+ * @return html
+ */
+ public function htmlPopUpDodajUporabnikeZaDolocenNivoId()
+ {
+
+ // tracking - beleženje sprememb
+ $this->trackingChanges();
+
+ $struktura_id = $_POST['struktura'];
+ $last = $_POST['last'];
+
+ echo '<div>';
+ echo '<h2>' . ($last ? $this->lang['srv_hierarchy_add_new_user_popup_last'] : $this->lang['srv_hierarchy_add_new_user_popup']) . '</h2>';
+ echo '<div>';
+ echo($last ? $this->lang['srv_hierarchy_edit_users_last'] : $this->lang['srv_hierarchy_edit_users']);
+ echo '<div style="padding:15px 0;">';
+ if ($last) {
+ echo '<input type="text" id="vpis-email-popup" name="emails" style="height: 16px; width:100%;" />';
+ } else {
+ echo '<textarea id="vpis-email-popup" name="emails" style="height:100px; width:100%;"></textarea>';
+ }
+ echo '</div>';
+
+ echo '</div>';
+ echo '</div>';
+
+ // Gumb za zapret popup in potrdit
+ echo '<div class="buttonwrapper spaceRight floatLeft">';
+ echo '<a class="ovalbutton ovalbutton_orange" href="#" onclick="shrani_email(' . $struktura_id . ', ' . $last . '); return false;"><span>' . $this->lang['srv_potrdi'] . '</span></a>' . "\n\r";
+ echo '</div>';
+
+ echo '<div class="buttonwrapper spaceRight floatLeft">';
+ echo '<a class="ovalbutton ovalbutton_gray" href="#" onclick="vrednost_cancel(); return false;"><span>' . $this->lang['srv_close_profile'] . '</span></a>' . "\n\r";
+ echo '</div>';
+ }
+
+ /**
+ * Pošlji ID uporabnikov za vpis na strukturo
+ *
+ * @return boolean
+ */
+ public function postDodatneUporabnikeNaNivoId()
+ {
+ $struktura = $_POST['struktura'];
+ $uporabniki = $_POST['uporabniki'];
+ $last = $_POST['last'];
+
+ if (empty($struktura) || empty($uporabniki))
+ return false;
+
+ $this->trackingChanges();
+
+ $uporabniki = json_decode(stripslashes($uporabniki));
+
+ foreach ($uporabniki as $uporabnik) {
+ $this->dodajUporabnikaVbazo($uporabnik, $struktura, $last);
+ }
+
+ return true;
+ }
+
+ /**
+ * Kopiraj vrstico iz DataTables v urejanje
+ *
+ * @return array $struktura
+ */
+ public function kopirajVrsticoStruktureIzDataTablesVFormo()
+ {
+ $idLastStrukture = $_POST['id'];
+ if (empty($idLastStrukture))
+ return false;
+
+ // tracking - beleženje sprememb
+ $this->trackingChanges();
+
+ return (new HierarhijaQuery())->poisciHierarhijoNavzgor($idLastStrukture);
+ }
+
+ /**
+ * Pop up zamenjaj uporabnika v strukturi
+ *
+ * @return html
+ */
+ public function htmlPopUpZamenjajUporabnikaVstrukturi()
+ {
+ echo '<div class="zamenjava-uporabnika-v-strukturi">';
+ echo '<div>';
+ echo '<h2>' . $this->lang['srv_hierarchy_title_find_and_replace_user'] . '</h2>';
+
+ echo '<div>';
+ echo $this->lang['srv_hierarchy_text_find_and_replace_user'];
+
+ echo '<div style="padding:15px 0;">';
+ echo '<label style="font-weight: bold;padding-right: 10px;">' . $this->lang['srv_hierarchy_label_find_email'] . '</label>';
+ echo '<input type="text" id="find-email" name="emails" style="height: 16px; width:60%;float: right;margin-right: 10px;" />';
+ echo '<span class="error-label">' . $this->lang['srv_hierarchy_error_wrong_email_format'] . '</span>';
+ echo '</div>';
+
+ echo '<div style="padding:15px 0;">';
+ echo '<label style="font-weight: bold;padding-right: 10px;">' . $this->lang['srv_hierarchy_label_replace_email'] . '</label>';
+ echo '<input type="text" id="replace-email" name="emails" style="height: 16px; width:60%;float: right;margin-right: 10px;" />';
+ echo '<span class="error-label">' . $this->lang['srv_hierarchy_error_wrong_email_format'] . '</span>';
+ echo '</div>';
+
+ echo '</div>';
+
+ echo '</div>';
+
+ echo '<div id="st_zamenjav_uporabnikov"></div>';
+
+ // Gumb za zapret popup in potrdit
+ echo '<div class="buttonwrapper spaceRight floatLeft">';
+ echo '<a class="ovalbutton ovalbutton_orange" href="#" onclick="potriZamenjavoUporabnika(); return false;"><span>' . $this->lang['srv_potrdi'] . '</span></a>' . "\n\r";
+ echo '</div>';
+
+ echo '<div class="buttonwrapper spaceRight floatLeft">';
+ echo '<a class="ovalbutton ovalbutton_gray" href="#" onclick="testnoPreveriKolikoUporabnikovBoZamnjenihVStrukturi(); return false;"><span>' . $this->lang['srv_hierarchy_button_count_user_emails'] . '</span></a>' . "\n\r";
+ echo '</div>';
+
+ echo '<div class="buttonwrapper spaceRight floatLeft">';
+ echo '<a class="ovalbutton ovalbutton_gray" href="#" onclick="vrednost_cancel(); return false;"><span>' . $this->lang['srv_close_profile'] . '</span></a>' . "\n\r";
+ echo '</div>';
+ echo '</div>';
+ }
+
+ /**
+ * testno preveri, kolikokrat bi bil email zamenjan
+ *
+ * @return integer
+ */
+ public function getTestnoPreveriStZamenjavEmailVstrukturi()
+ {
+ $email_za_zamenjavo = $_POST['find_email'];
+
+ $user = sisplet_query("SELECT id, email FROM users WHERE email='" . $email_za_zamenjavo . "'", "obj");
+
+ if (sizeof($user) == 0)
+ return 'Ni v baz';
+
+ // Pridobimo uporabnika samo na zadnjem nivoju
+ $users_upravicen_do_evalvacije = (new HierarhijaOnlyQuery())->queryStrukturaUsers($this->anketa, ' AND users.id="' . $user->id . '" AND hs.level=(SELECT MAX(level) FROM srv_hierarhija_struktura WHERE anketa_id=' . $this->anketa . ')');
+
+ if (mysqli_num_rows($users_upravicen_do_evalvacije) > 0) {
+ echo mysqli_num_rows($users_upravicen_do_evalvacije);
+ } else {
+ echo 0;
+ }
+ }
+
+ /**
+ * Briši uporabnika iz strukture pri DataTables pogledu oz. če je že vpisan v bazo
+ */
+ public function brisiUporabnikaIzStrukture()
+ {
+ // tracking - beleženje sprememb
+ $this->trackingChanges();
+
+ if (empty($_POST['uporabnik_id']) || !is_numeric($_POST['uporabnik_id']) || empty($_POST['struktura_id'])) {
+ echo 'Ni mogoče';
+ return false;
+ }
+
+ $uporabnik_id = $_POST['uporabnik_id'];
+ $struktura_id = $_POST['struktura_id'];
+
+ // Uporabnika najprej izbrišemo iz strukture hierarhije
+ $sql_user = sisplet_query("DELETE FROM srv_hierarhija_struktura_users WHERE hierarhija_struktura_id='" . $struktura_id . "' AND user_id='" . $uporabnik_id . "'");
+ $this->sqlError($sql_user);
+
+ // Preverimo, če je uporabnik še kje drugje dodan v hierarhiji, drugače ga moramo odstraniti še iz srv_hierarhija_users, da nima dostopa do ankete ob aktivaciji in tudi da ne prejme emaila za dostop
+ $this->preveriCeJeUporabnikPrisotenSeKjeVStrukturi($uporabnik_id);
+ }
+
+ /**
+ * Zamenjaj email uporabnika v strukturi z novim emailom
+ *
+ * @param
+ * @return
+ */
+ public function postZamenjajEmailVstrukturi()
+ {
+ // tracking - beleženje sprememb
+ $this->trackingChanges();
+
+ $find_email = $_POST['find_email'];
+ $replace_email = $_POST['replace_email'];
+
+ // Validacija, če email obstaja
+ if (empty($find_email) && !validEmail($find_email) || empty($replace_email) && !validEmail($replace_email))
+ return 'Manjka email';
+
+ // Poiščemo ID uporabnika
+ $user = sisplet_query("SELECT id, email FROM users WHERE email='" . $find_email . "'", "obj");
+
+ // Pridobimo uporabnika samo na zadnjem nivoju
+ $users_upravicen_do_evalvacije = (new HierarhijaOnlyQuery())->queryStrukturaUsers($this->anketa, ' AND users.id="' . $user->id . '" AND hs.level=(SELECT MAX(level) FROM srv_hierarhija_struktura WHERE anketa_id=' . $this->anketa . ')');
+
+ // Dodamo novega uporabnika v
+ if (mysqli_num_rows($users_upravicen_do_evalvacije) > 0) {
+ while ($evalviranec = $users_upravicen_do_evalvacije->fetch_object()) {
+ $this->dodajUporabnikaVbazo($replace_email, $evalviranec->id, true);
+ }
+ }
+
+ // Preverimo, če je uporabnik, ki smo ga želeli zamenjati prisoten še kje
+ $this->preveriCeJeUporabnikPrisotenSeKjeVStrukturi($user->id);
+
+ return 1;
+ }
+
+ /**
+ * Briši element vhiertarhiji, ki se prikaže v data tables ali jstree
+ *
+ * @param
+ * @return
+ */
+ public function brisiZadnjiElementVstrukturiHierarhije()
+ {
+ $id = $_POST['id'];
+
+ #V kolikor je anketa aktivna potem brisanje ni več možno
+ if (SurveyInfo::getSurveyModules('hierarhija') == 2)
+ return 2;
+
+
+ // tracking - beleženje sprememb
+ $this->trackingChanges();
+
+ # Omenjen Id je tudi parent id, zato brisanje ni mogoče
+ $parent_obstaja = sisplet_query("SELECT id, parent_id FROM srv_hierarhija_struktura WHERE parent_id='$id'");
+ if ($parent_obstaja->num_rows > 0) {
+ echo 'obstaja';
+ die();
+ }
+
+// # Pridobimo vse ID strukture hierarhije, ki so pod to drevesno strukturo, da lahko potem izbrišemo vse te elemente
+// $el = (new HierarhijaQuery())->pridobiIdStruktureDoKonca($id, $this->anketa);
+// # Dodamo naš $id in sortiramo po zadnjih elementih, ter brišemo hierarhijo od spodaj navzgor. Do našega ID-ja
+// array_push($el, $id);
+// rsort($el);
+
+
+ # Preverimo, če je bil dodan uporabnik na to strukturo
+ $user_id = sisplet_query("SELECT user_id FROM srv_hierarhija_struktura_users WHERE hierarhija_struktura_id='" . $id . "'", "obj");
+
+ # Izbrišemo uporabnika, ki je bil pri določeni strukturi v hierarhiji
+ $sql_us = sisplet_query("DELETE FROM srv_hierarhija_struktura_users WHERE hierarhija_struktura_id='" . $id . "'");
+ $this->sqlError($sql_us);
+
+ // V kolikor je bil dodan uporabnik na strukturo potem tudi odstranimo vse pravice tega uporabnika, če ga ni več v strukturi
+ if (!is_null($user_id))
+ $this->preveriCeJeUporabnikPrisotenSeKjeVStrukturi($user_id->user_id);
+
+ # Izbrišemo strukturo
+ $sql_hi = sisplet_query("DELETE FROM srv_hierarhija_struktura WHERE id='" . $id . "' AND anketa_id='" . $this->anketa . "'");
+ $this->sqlError($sql_hi);
+
+ # Pobriši opcijo, če ni več strukture
+ $st_vpisov = sisplet_query("SELECT COUNT(ID) as vsota FROM srv_hierarhija_struktura WHERE anketa_id='" . $this->anketa . "'", "obj");
+ if ($st_vpisov->vsota == 0)
+ (new HierarhijaQuery())->getDeleteHierarhijaOptions($this->anketa, 'vpisana_struktura', null, true);
+ }
+
+ /**
+ * Shrani hierarhijo in prido ID polja v bazi
+ *
+ * @return integer
+ */
+ public function shraniHierarhijo()
+ {
+ $ime = $_POST['ime'];
+
+ // Za decoding je potrebno json_decode(stripslashes($_POST['hierarhija'])), za shranjevanje v bazo pustomo kar json format
+ $hierarhija = $_POST['hierarhija'];
+
+ echo sisplet_query("INSERT INTO srv_hierarhija_shrani (anketa_id, user_id, ime, hierarhija) VALUES ('$this->anketa', '$this->user_id','$ime', '$hierarhija')", "id");
+ }
+
+ /**
+ * Preverimo, če je user id prisoten še kje v strukturi, v kolikor ga ni potem odstranimo pravice dostopa do ankete in strukture
+ *
+ * @param $user_id
+ * @return boolean
+ */
+ private function preveriCeJeUporabnikPrisotenSeKjeVStrukturi($user_id)
+ {
+ $uporabnik_db = (new HierarhijaOnlyQuery())->queryStrukturaUsers($this->anketa, ' AND users.id="' . $user_id . '"');
+
+ // Uporabnik je še prisoten
+ if (mysqli_num_rows($uporabnik_db) > 0)
+ return true;
+
+ // Uporabnik ni prisoten in odstranimo vse pravice za dostop do ankete in hierarhije
+ // Preverimo, če je uporabnik med privilegiji za dostop do hierarhije
+ $user_search = sisplet_query("SELECT id FROM srv_hierarhija_users WHERE user_id='" . $user_id . "' AND anketa_id='" . $this->anketa . "' AND type='10'", 'obj');
+ if (sizeof($user_search) > 0)
+ sisplet_query("DELETE FROM srv_hierarhija_users WHERE id='" . $user_search->id . "'");
+
+
+ // Preverimo, če ima uporabnik ima pravice za dostop do ankete in potem tudi to odstranimo
+ HierarhijaQuery::dostopZaUporabnika($this->anketa, $user_id, 'delete');
+
+ return false;
+ }
+
+ private function trackingChanges()
+ {
+ TrackingClass::update($this->anketa, '22');
+ }
+
+ private function sqlError($sql)
+ {
+ if (!$sql) {
+ echo mysqli_error($GLOBALS['connect_db']);
+ die();
+ }
+
+ }
+
+
+} \ No newline at end of file
diff --git a/admin/survey/modules/mod_hierarhija/class/HierarhijaAjaxClass.php b/admin/survey/modules/mod_hierarhija/class/HierarhijaAjaxClass.php
new file mode 100644
index 0000000..0ed3956
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/class/HierarhijaAjaxClass.php
@@ -0,0 +1,1063 @@
+<?php
+
+/**
+ * Ime: Samoocena hierarhija vsi AJAX requesti
+ * Avtor: Robert Šmalc
+ */
+
+namespace Hierarhija;
+
+use Branching;
+use Dostop;
+use Common;
+use Hierarhija\Ajax\AjaxHierarhija;
+use Hierarhija\Ajax\AjaxHierarhijaClass;
+use Hierarhija\Ajax\AjaxUporabniki;
+use Hierarhija\Ajax\AjaxSuperSifra;
+use Hierarhija\Model\HierarhijaOnlyQuery;
+use Hierarhija\Model\HierarhijaQuery;
+use MailAdapter;
+use SurveyInfo;
+use TrackingClass;
+
+
+class HierarhijaAjax
+{
+ protected $anketa;
+ protected $lang;
+ protected $user_id;
+ protected $hierarhija_type;
+ protected $site_url;
+
+ public function __construct($anketa)
+ {
+ $this->anketa = $anketa;
+
+ if (!(new Dostop())->checkDostop($this->anketa))
+ return false;
+
+ if (!$this->isAjax())
+ return redirect('/admin/survey/');
+
+ global $lang;
+ global $global_user_id;
+ global $site_url;
+ $this->lang = $lang;
+ $this->user_id = $global_user_id;
+ $this->hierarhija_type = HierarhijaHelper::preveriTipHierarhije($this->anketa);
+ $this->site_url = $site_url;
+
+ }
+
+ /**
+ * Preverimo, če je ajax request
+ *
+ * @return boolean
+ */
+ private function isAjax()
+ {
+ if (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest')
+ return true;
+
+ return false;
+ }
+
+ //AJAX POST requesti
+ public function ajax()
+ {
+ // Preverimo ustreznost ankete
+ if ($_GET['a'] == 'preveri-ustreznost-ankete')
+ return $this->preveriUstreznostCeJePrimernaZaHierarhijo();
+
+ if ($_GET['a'] == 'get-all-hierarchy-library')
+ return $this->pridobiVseAnketeKiSoVknjizniciZaHierarhijo();
+
+
+ /********* HIERARHIJA UREJANJE **************/
+ /**
+ * Shranjuje št. in ime nivoja
+ *
+ * @return html -> select -> option
+ */
+ if ($_GET['a'] === 'post_nivoji')
+ echo AjaxHierarhija::init($this->anketa)->postNivoji();
+
+ /**
+ * Shranjuje id nivoja, in šifrant za sledeči nivo
+ *
+ * @return JSON
+ */
+ if ($_GET['a'] === 'post_sifranti')
+ echo AjaxHierarhija::init($this->anketa)->postSifranti();
+
+ /**
+ * Select box spremeni v ul in ponudi možnost brisanje šifrantov
+ *
+ * @return JSON
+ */
+ if ($_GET['a'] === 'brisi_sifrante')
+ echo AjaxHierarhija::init($this->anketa)->brisiSifrante();
+
+ /**
+ * Delete šifrant
+ */
+ if ($_GET['a'] === 'izbrisi_sifrant')
+ return AjaxHierarhija::init($this->anketa)->izbrisiSifrant();
+
+ /**
+ * Pridobi število že vpisanih nivojev
+ */
+ if ($_GET['a'] === 'st_nivojev') {
+ $sql = sisplet_query("SELECT COUNT(id) FROM `srv_hierarhija_ravni` WHERE anketa_id='" . $this->anketa . "'");
+ echo $sql->fetch_row()[0];
+ }
+
+ /**
+ * Popravimo ime nivoja v bazi
+ */
+ if ($_GET['a'] == 'popravi_nivo_hierarhija')
+ return AjaxHierarhija::init($this->anketa)->postPopraviNivoSsifranti();
+
+ /**
+ * Briši nivo v hierarhiji preko AJAX ukaza
+ */
+ if ($_GET['a'] == 'brisi_nivo_hierarhija')
+ return AjaxHierarhija::init($this->anketa)->brisiCelNivoSkupajSsifranti();
+
+ if ($_GET['a'] === 'json_nivoji_podatki') {
+ echo json_encode(AjaxHierarhija::init($this->anketa)->pridobiVseRavniSifrante());
+ }
+
+ // Komentar k izbrani hierarhiji
+ if ($_GET['a'] == 'komentar-k-hierarhiji') {
+ if ($_GET['m'] == 'get')
+ return AjaxHierarhija::init($this->anketa)->htmlPopUpKomentarKhierarhiji();
+
+ if ($_GET['m'] == 'post')
+ return AjaxHierarhija::init($this->anketa)->postKomentarKhierarhiji();
+ }
+
+ // Naloži logo kj hierarhiji
+ if ($_GET['a'] == 'upload-logo') {
+ if ($_GET['m'] == 'get')
+ return AjaxHierarhija::init($this->anketa)->htmlPopUpUploadLogo();
+
+ if ($_GET['m'] == 'delete')
+ return Hierarhija::brisiLogo($this->anketa);
+ }
+ /********* END HIERARHIJA UREJANJE **************/
+
+
+ /***************************** HIERARHIJA UPORABNIKI ***********************/
+ //Brišemo iz DataTables ali JsTree
+ if ($_GET['a'] == 'brisi_element_v_hierarhiji')
+ echo AjaxUporabniki::init($this->anketa)->brisiZadnjiElementVstrukturiHierarhije();
+
+ // Pridobimo podatke o sifrantih iz baze
+ if ($_GET['a'] == 'posodobi_sifrante')
+ echo json_encode(AjaxUporabniki::init($this->anketa)->getPosodobiSifranteZaJsTree());
+
+ /**
+ * Shranimo hierarhijo
+ */
+ if ($_GET['a'] == 'shrani_hierarhijo')
+ return AjaxUporabniki::init($this->anketa)->shraniHierarhijo();
+
+
+ /**
+ * Shrani strukturo hierarhije v tabelo srv_hierarhija_shrani
+ *
+ * @param (int) shrani
+ * @param (int) id
+ */
+ if ($_GET['a'] == 'shrani-strukturo-hierarhije') {
+ if ($_POST['id'] != $this->anketa && empty($_POST['shrani']))
+ return 'Ni shranjeno';
+
+ // tracking - beleženje sprememb
+ $this->trackingChanges();
+
+ $this->shraniStrukturoHierarhijeVString();
+ }
+
+ /**
+ * Vrnemo JSON podatke hierarhije za jsTree
+ */
+ if ($_GET['a'] == 'json_jstree') {
+ $struktura = (new HierarhijaQuery())->json_jstree($this->anketa);
+
+ echo json_encode($struktura);
+ }
+
+ /**
+ * Podatki, ko nalagamo prvi element hierarhije
+ */
+ if ($_GET['a'] == 'json_jstree_first_level') {
+ $hierarhija = (new HierarhijaOnlyQuery())->queryStruktura($this->anketa, null, ' AND parent_id IS NULL')->fetch_object();
+
+ echo '<h2>Hierarhija</h2>';
+ echo '<b>' . $hierarhija->ravni_ime;
+ if ($this->hierarhija_type > 4)
+ echo ' - ' . $hierarhija->sifrant_ime;
+ echo ': </b>';
+ }
+
+ /**
+ * Update hierarhije, ki je trenutno aktivna
+ */
+ if ($_GET['a'] == 'update-aktivno-hierarhijo')
+ return AjaxHierarhija::init($this->anketa)->updateAktivnoHierarhijo();
+
+
+ if ($_GET['a'] == 'json_shranjene_hierarhije')
+ echo json_encode(AjaxHierarhija::init($this->anketa)->seznamVsehShranjenihHierarhij());
+
+ // vse nastavitve povezane s hierarhijo
+ if ($_GET['a'] == 'hierarhija-options') {
+
+ if ($_GET['m'] == 'get') {
+ if (!empty($_POST['option_name'])) {
+ echo (new HierarhijaQuery())->getDeleteHierarhijaOptions($this->anketa, $_POST['option_name'], null, null, false);
+ return '';
+ }
+
+ return json_encode((new HierarhijaQuery())->getDeleteHierarhijaOptions($this->anketa));
+ }
+
+ if ($_GET['m'] == 'save') {
+ $option = $_POST['option_name'];
+ $value = (!empty($_POST['option_value']) ? $_POST['option_value'] : 'false');
+
+ // tracking - beleženje sprememb
+ $this->trackingChanges();
+
+ if (!empty($option))
+ (new HierarhijaQuery())->saveHierarhijaOptions($this->anketa, $option, $value);
+ }
+ }
+
+ // pridobimo hierarhijo iz JSON in pobrišemo staro ali pa samo dopišemo nove nivoje in šifrante
+ if ($_GET['a'] == 'obnovi-hierarhijo')
+ echo AjaxHierarhija::init($this->anketa)->obnoviHierarhijo();
+
+
+ // izbriše shranjeno hierarhijo
+ if ($_GET['a'] == 'izbrisi-hierarhijo')
+ return AjaxHierarhija::init($this->anketa)->izbrisiHierarhijo();
+
+
+ // izbriši trenutno shranjene ravni
+ if ($_GET['a'] == 'izbrisi_vse_ravni') {
+ // tracking - beleženje sprememb
+ $this->trackingChanges();
+ return AjaxHierarhija::init($this->anketa)->izbrisiVseRavni();
+ }
+
+ // preimenuj hierarhijo
+ if ($_GET['a'] == 'preimenuj-hierarhijo') {
+ $this->trackingChanges();
+ return AjaxHierarhija::init($this->anketa)->preimenujHierarhijo();
+ }
+
+ // Uvoz hierarhije
+ if ($_GET['a'] == 'uvozi-hierarhijo')
+ echo AjaxHierarhija::init($this->anketa)->uvoziHierarhijo();
+
+
+ // pridobimo celotno strukturo šifrantov za prikaz v tabeli
+ if ($_GET['a'] == 'get-datatables-data') {
+ $polje = [
+ 'data' => AjaxUporabniki::init($this->anketa)->getDataTablesPodatkeZaPrikazTabele()
+ ];
+
+ echo json_encode($polje);
+ }
+
+ // Ukazi za brisanje
+ if ($_GET['a'] == 'brisi') {
+ // Briši uporabnika iz baze srv_hierarhija_struktura_users in srv_hierarhija_users (tukaj ima pravico do ankete)
+ if ($_GET['m'] == 'uporabnika')
+ return AjaxUporabniki::init($this->anketa)->brisiUporabnikaIzStrukture();
+
+ }
+
+ // pridobimo podatke iz srv_hierarhija_shrani
+ if ($_GET['a'] == 'pridobi-shranjeno-hierarhijo-bool') {
+ $id = (!empty($_POST['id']) ? $_POST['id'] : null);
+ $polje = (!empty($_POST['polje']) ? $_POST['polje'] : null);
+
+ if (is_null($id))
+ return '';
+
+ $polje = HierarhijaQuery::getHierarhijaShraniRow($id, $polje);
+
+
+ echo(!is_null($polje) ? 1 : 0);
+ }
+
+
+ /**
+ * Gradnja hierarhije
+ */
+ if ($_GET['a'] == 'gradnja-hierarhije') {
+ /**
+ * Uvoz uporabnikov preko tekstovnega polaj
+ */
+ if ($_GET['m'] == 'import-user') {
+ // PPrikaži popup za uvoz uporabnikov
+ if ($_GET['s'] == 'get')
+ return AjaxUporabniki::init($this->anketa)->getUsersImportPopup();
+
+ if ($_GET['s'] == 'getAll')
+ return AjaxUporabniki::init($this->anketa)->getAllUserInJson();
+
+ // Pošlji podatke za shranjevanje
+ if ($_GET['s'] == 'post')
+ return AjaxUporabniki::init($this->anketa)->postImportUsers();
+ }
+
+
+ /**
+ * Preveri pravice uporabnika in v kolikor ni admin tudi njegove nivoje, ki so nad njim
+ *
+ * Preveri, če gre za admina in v tem primeru vrne samo uporabnik=1, drugače vrne objekt s podatki o levele, parent_id, struktura_id
+ * @return json
+ */
+ if ($_GET['m'] == 'get-user-level')
+ echo json_encode(AjaxUporabniki::init($this->anketa)->getUserLevelPermission());
+
+
+ /**
+ * Pridobimo nivoje in šifrane za sledečo raven, vrenomo polje ['nivoji', 'sifranti']
+ *
+ * @return json
+ */
+ if ($_GET['m'] == 'get-sifranti')
+ echo json_encode(AjaxUporabniki::init($this->anketa)->getSifrantiZaHierarhijaUserType());
+
+
+ /**
+ * Preveri, če je omenjen šifrant že napisan na nivo in če je pridobi podatke o uporabnikih
+ * @return json object
+ */
+ if ($_GET['m'] == 'preveri-sifrant-za-nivo')
+ echo json_encode(AjaxUporabniki::init($this->anketa)->preveriVpisSifrantaZaSledeciNivo());
+
+
+ /**
+ * Shranimo vse nove šifrante in tudi uporabnike, ki so dodani k novim šifrantom
+ */
+ if ($_GET['m'] == 'post-struktura')
+ AjaxUporabniki::init($this->anketa)->shraniStrukturoSifrantovInUporabnikov();
+
+ /**
+ * Pridobi uporabnike, ki so dodani na specifični nivo
+ * @params $id - struktura id
+ * @return json
+ */
+ if ($_GET['m'] == 'get-uporabniki')
+ echo json_encode(AjaxUporabniki::init($this->anketa)->pridobiUporabnikeZaDolocenNivoId());
+
+ /**
+ * Pošljemo id uporabnikov in id strukture, da ponovno shranimo druge uporabnike v bazo
+ */
+ if ($_GET['m'] == 'post-uporabniki')
+ return AjaxUporabniki::init($this->anketa)->postUporabnikeZaDolocenNivoId();
+
+ /**
+ * Popup z vsebino, kjer se urejajo uporabniki za posamezni nivo / textarea za dodajanje novega uporabnika
+ *
+ * @return html
+ */
+ if ($_GET['m'] == 'uredi-uporabnike-v-strukturi')
+ return AjaxUporabniki::init($this->anketa)->htmlPopUpDodajUporabnikeZaDolocenNivoId();
+
+
+ /**
+ * Pošljemo dodano dodane uporab
+ *
+ * @param
+ */
+ if ($_GET['m'] == 'post-dodatne-uporabnike-k-strukturi')
+ return AjaxUporabniki::init($this->anketa)->postDodatneUporabnikeNaNivoId();
+
+ /**
+ * Kopiranje vrstice hierarhije iz DataTables ponovno v možnost urejanja
+ *
+ * @param (int) id - id zadnjega elementa strukture
+ * @return json
+ */
+ if ($_GET['m'] == 'kopiranje-vrstice')
+ echo json_encode(AjaxUporabniki::init($this->anketa)->kopirajVrsticoStruktureIzDataTablesVFormo());
+
+ /**
+ * Poišči uporabnika glede na vpisan email in ga zamnjaj z novim emailom.
+ */
+ if ($_GET['m'] == 'zamenjaj-uporabnika-v-strukturi')
+ return AjaxUporabniki::init($this->anketa)->htmlPopUpZamenjajUporabnikaVstrukturi();
+
+ /**
+ * Pridobimo število oseb, ki jih je potrebno zamenjati
+ */
+ if ($_GET['m'] == 'post-st-zamenjav')
+ return AjaxUporabniki::init($this->anketa)->getTestnoPreveriStZamenjavEmailVstrukturi();
+
+ /**
+ * Uporabnika v strukturi zamenjaj z novim
+ * Zamenjamo samo na zadnjem nivoju, prejšnjega pa izbrišemo iz sistema
+ */
+ if ($_GET['m'] == 'post-zamenjaj-uporabnika-z-novim')
+ echo AjaxUporabniki::init($this->anketa)->postZamenjajEmailVstrukturi();
+ /***************************** HIERARHIJA UPORABNIKI ***********************/
+
+ }
+
+ /**
+ * Aktivacija ankete in generiranje sistemskih vprašanj za Hierarhijo
+ */
+ if ($_GET['a'] == 'aktivacija_ankete') {
+ if (SurveyInfo::getSurveyModules('hierarhija') == 1) {
+ // tracking - beleženje sprememb
+ $this->trackingChanges();
+
+ // Sistemsko vprašanje prestavimo na prvo mesto VLOGA v kolikor ni
+ $this->postaviVlogoNaPrvoMestoInIzbrisiCeJeKakNivo();
+
+ //pridobimo vse nivoje za omenjeno anketo, ker potrebujemo število nivojov in imena nivojev
+ $nivoji = (new HierarhijaOnlyQuery())->getRavni($this->anketa);
+
+ //preštevilčimo vsa vprašnja na prvi strani za število nivojev pustimo samo vlogo na prvem mestu
+ (new HierarhijaAjax($this->anketa))->prestevilciBranching($nivoji->num_rows);
+
+ //Pridobimo gru_id od vloge, ker je na isti strani
+ $grup_id = HierarhijaOnlyQuery::getGrupaId($this->anketa, 1);
+
+ $vrstni_red = 2;
+ while ($nivo = $nivoji->fetch_object()) {
+ //vnesemo v srv_spremenljivke in srv_branching
+ $naslov = $nivo->level . ". " . $nivo->ime;
+ $variabla = 'nivo' . $nivo->level;
+
+ $spr = [$grup_id, $naslov, $variabla, '3', $vrstni_red];
+ $sql_sifranti = (new HierarhijaOnlyQuery())->getSamoSifrant($nivo->id);
+
+ (new HierarhijaQuery())->insertSpremenljivkaBranching($spr, $sql_sifranti, $this->anketa);
+
+ $vrstni_red++;
+ }
+
+ //Popravimo vrednost pri anleketi, da je sedaj hierarhija enako 2 = je že bila aktivirana
+ $anketa_id = SurveyInfo::getInstance()->getSurveyColumn('id');
+ sisplet_query("UPDATE srv_anketa_module SET vrednost='2' WHERE ank_id='" . $anketa_id . "'");
+
+ $b = new Branching($anketa_id);
+ $b->repare_branching();
+
+ // Shranimo podatke kdaj in kdo je aktiviral hierarhijo
+ (new HierarhijaQuery())->saveHierarhijaOptions($this->anketa, 'uporabnik_aktiviral_hierarhijo', $this->user_id);
+ (new HierarhijaQuery())->saveHierarhijaOptions($this->anketa, 'cas_aktivacije_hierarhije', date('d.m.Y, G:i'));
+
+ // KO se izdelajo polja za anketo se potem tudi posreduje email za učitelje oz. zadnji nivo
+ Hierarhija::aktivacijaAnketePosljiEmail($this->anketa);
+ }
+ }
+
+ /**
+ * Statusi in generiranje superšifre
+ */
+ if($_GET['a'] == 'super-sifra'){
+
+ //Shrani superšifro
+ if ($_GET['m'] == 'shrani')
+ return AjaxSuperSifra::init($this->anketa)->shrani();
+
+ //Shrani superšifro
+ if ($_GET['m'] == 'getAll')
+ return AjaxSuperSifra::init($this->anketa)->getAll();
+
+ }
+
+ /* Ostalo */
+ if ($_GET['a'] == 'ostalo') {
+ //Obvesti managerje
+ if ($_GET['m'] == 'obvesti-managerje') {
+ // tracking - beleženje sprememb
+ $this->trackingChanges();
+
+ $this->obvestiManagerjeSendEmail();
+ }
+
+ if ($_GET['m'] == 'preview-mail') {
+ // tracking - beleženje sprememb
+ $this->trackingChanges();
+
+ return $this->predogledEmailaZaUciteljeAliManagerje();
+ }
+
+ if ($_GET['m'] == 'opcije') {
+ // tracking - beleženje sprememb
+ $this->trackingChanges();
+
+ return $this->posodobiAliVnesiVtabeloOpcije();
+ }
+
+ if ($_GET['m'] == 'poslji-email-samo-uciteljem') {
+ // tracking - beleženje sprememb
+ $this->trackingChanges();
+
+ return $this->posljiElektronskoSamoUciteljem();
+ }
+ }
+ }
+
+ /**
+ * Prestavimo vlogo na prvo stran in rvo mesto v kolikor, bi slučajno bila zmaknjena, kje drugje v anketi
+ */
+ private function postaviVlogoNaPrvoMestoInIzbrisiCeJeKakNivo()
+ {
+ //Preverimo, če je sistemsko vprašanje vloga že ustvarjeno
+ $grup_ids = sisplet_query("SELECT id, vrstni_red FROM srv_grupa WHERE ank_id='" . $this->anketa . "' ORDER BY vrstni_red", "obj");
+
+ $prva_stran_group_id = null;
+
+ // gremo po vseh straneh, da preverimo, če je kje vloga
+ foreach ($grup_ids as $grup_id) {
+ $sql_vpisane_spr = sisplet_query("SELECT id, gru_id, variable, vrstni_red FROM srv_spremenljivka WHERE gru_id='" . $grup_id->id . "' AND variable='vloga'", "obj");
+
+ // Pridobimo Group ID za prvo stran
+ if ($grup_id->vrstni_red == 1)
+ $prva_stran_group_id = $grup_id->id;
+
+ // Vloga je na prvi strani vendar ne na prvem mestu, zato jo postavimo na prvo mesto ali, če je na katerikoli drugi strani jo tudi postzavimo na prvo mesto
+ if (!empty($sql_vpisane_spr) && ($sql_vpisane_spr->vrstni_red > 1 || $sql_vpisane_spr->gru_id != $prva_stran_group_id)) {
+ sisplet_query("UPDATE srv_branching SET vrstni_red = '1' WHERE ank_id='" . $this->anketa . "' AND element_spr='" . $sql_vpisane_spr->id . "'");
+ sisplet_query("UPDATE srv_spremenljivka SET vrstni_red = '1', gru_id = '" . $prva_stran_group_id . "' WHERE id='" . $sql_vpisane_spr->id . "'");
+ }
+ }
+ }
+
+ private function trackingChanges()
+ {
+ TrackingClass::update($this->anketa, '20');
+ }
+
+
+// /**
+// * Funkcija, ko poišče parent id, zanka gre od prvega nivoja do predzadnjega, ki je parent ID
+// *
+// * @param array $nivoId
+// * @param int $velikost
+// * @return int $parent_id
+// */
+// protected $nivoId;
+// protected $velikost;
+//
+// private function poisciPrentId($nivoId, $velikost)
+// {
+// $parent_id = null;
+// for ($i = 0; $i < ($velikost - 1); $i++) {
+// $nivo = explode('-', $nivoId[$i]);
+// $search = ' AND hr.level=' . $nivo[0] . ' AND hs.id=' . $nivo[1] . (!empty($parent_id) ? " AND str.parent_id='$parent_id'" : '');
+// if ($i == 0)
+// $search = ' AND hr.level=' . $nivo[0] . ' AND hs.id=' . $nivo[1];
+// $parent_id = (new HierarhijaOnlyQuery())->queryStruktura($this->anketa, null, $search)->fetch_object()->id;
+// }
+//
+// return $parent_id;
+// }
+
+ protected $sql;
+
+ public function sqlError($sql)
+ {
+ if (!$sql) {
+ echo mysqli_error($GLOBALS['connect_db']);
+ die();
+ }
+
+ }
+
+
+ /**
+ * Funkcija preštevilci vrstni red vprašanj samo na prvi strani, ker bomo tam dodajali sistemske spremenljivke, vlogo pustimo na prvem mestu
+ */
+ protected $st_prestevilcenja;
+
+ public function prestevilciBranching($st_prestevilcenja = 0, $vloga_prestevilci = false)
+ {
+ // Pridobi id srv_grupa - vsa sistemska vprašanaj bodo na strani 1
+ $grup_id = HierarhijaOnlyQuery::getGrupaId($this->anketa, 1);
+
+ if (empty($grup_id))
+ die('Group ID is null!');
+
+ // Pogleda za že vnesene spremenljivke na prvi strani in povečamo vrstni red za št. nivojev, ki bodo naše sistemske spremenljivke srv_spremenljivke
+ $vpisane_spr = sisplet_query("SELECT id, gru_id, variable, vrstni_red FROM srv_spremenljivka WHERE gru_id='" . $grup_id . "' AND variable!='vloga' ORDER BY vrstni_red", "obj");
+
+ // povečamo vrstni red pri srv_spremenljivke
+ if (!is_null($vpisane_spr) && sizeof($vpisane_spr) > 0) {
+ // ker prvi je še vedno vloga, ko se aktivira anketo
+ $i = 2;
+ if (!empty($vpisane_spr->id)) {
+ $vrstni_red = $st_prestevilcenja + $i;
+ sisplet_query("UPDATE srv_spremenljivka SET vrstni_red='" . $vrstni_red . "' WHERE id='" . $vpisane_spr->id . "'");
+ } else {
+ foreach ($vpisane_spr as $spr) {
+ $vrstni_red = $i + $st_prestevilcenja;
+ $sql_spremenljivka = sisplet_query("UPDATE srv_spremenljivka SET vrstni_red='" . $vrstni_red . "' WHERE id='" . $spr->id . "'");
+ $this->sqlError($sql_spremenljivka);
+ $i++;
+ }
+ }
+ }
+
+ $vloga_je = '';
+ if (!$vloga_prestevilci) {
+ // Pridobi spremenljivka id za vlogo in ga ne šteje pri srv_branchingu
+ $sql_vloga_id = sisplet_query("SELECT id, gru_id, variable, vrstni_red FROM srv_spremenljivka WHERE gru_id='" . $grup_id . "' AND variable='vloga' ORDER BY vrstni_red LIMIT 0,1", "obj")->id;
+ $vloga_je = " AND element_spr!='" . $sql_vloga_id . "'";
+ }
+
+ // Pridobi branching brez vloge, ker vloga mora ostati na prvem mestu
+ $vpisan_branch = sisplet_query("SELECT * FROM srv_branching WHERE ank_id='$this->anketa' " . $vloga_je . " ORDER BY vrstni_red", "obj");
+
+ //povečamo vrstni red tudi pri srv_branching
+ if (!is_null($vpisan_branch) && sizeof($vpisan_branch) > 0) {
+ if (!empty($vpisan_branch->ank_id)) {
+ $vrstni_red = $st_prestevilcenja + 2;
+ sisplet_query("UPDATE srv_branching SET vrstni_red='" . $vrstni_red . "' WHERE element_spr='" . $vpisan_branch->element_spr . "' AND ank_id='" . $this->anketa . "'");
+ } else {
+ foreach ($vpisan_branch as $branch) {
+ $vrstni_red = $branch->vrstni_red + ($st_prestevilcenja + 1);
+ $sql_branching = sisplet_query("UPDATE srv_branching SET vrstni_red='" . $vrstni_red . "' WHERE element_spr='" . $branch->element_spr . "' AND ank_id='" . $this->anketa . "'");
+ $this->sqlError($sql_branching);
+ }
+ }
+
+ }
+ }
+
+ /**
+ * Preverimo, če je JSON
+ *
+ * @param (string) $string
+ * @return return true ali error
+ */
+ public function isJson($string, $polje = 0)
+ {
+ if (is_string($string)) {
+ $array = json_decode(stripslashes($string));
+
+ if (json_last_error() == JSON_ERROR_NONE) {
+ if ($polje)
+ return $array;
+
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Iz vgnezdenega polja izdela vrstice z vsemi nivoji, če nekje ni podatka potem izdela prazna polja do konca
+ * @return array
+ */
+ public function array_flatten($array, $koncniArray = [])
+ {
+
+ foreach ($array as $key => $value) {
+ if (is_array($value) && $key != 0)
+ return $this->array_flatten($value, $koncniArray);
+
+ }
+ $koncniArray[] = $array;
+
+// d($koncniArray);
+ return $koncniArray;
+
+ foreach ($array as $key => $row) {
+ if (is_array($row)) {
+ return $this->array_flatten($row, $return);
+ } else {
+ $return[] = $row;
+ }
+// if (count($row) == count($row, COUNT_RECURSIVE))
+// $row = $this->array_flatten($row);
+
+
+ $return[] = $array;
+ }
+
+ return $return;
+ }
+
+
+ /**
+ * Shrani trenutno strukturo v srv_hierarhija_shrani
+ *
+ * @param
+ * @return
+ */
+ public function shraniStrukturoHierarhijeVString()
+ {
+ // tracking - beleženje sprememb
+ $this->trackingChanges();
+
+ if (empty($this->anketa))
+ return 'false';
+
+ // ID shranjene strukture
+ $id = (new HierarhijaQuery())->getDeleteHierarhijaOptions($this->anketa, 'srv_hierarhija_shrani_id', null, null, false);
+
+ // Celotno strukturo skopiramo v string/serialize()
+ $struktura_string = HierarhijaKopiranjeClass::getInstance($this->anketa)->get(true);
+
+ // Kadar še nimamo vpisano strukturo ali izbrišemo vse uporabnike, vedno shranimo potem NULL
+ if (sizeof($struktura_string) == 0)
+ return sisplet_query("UPDATE srv_hierarhija_shrani SET struktura = NULL WHERE id='" . $id . "' AND anketa_id='" . $this->anketa . "'");
+
+ // Shrani strukturo
+ $sql_insert = sisplet_query("UPDATE srv_hierarhija_shrani SET struktura='" . $struktura_string . "' WHERE id='" . $id . "' AND anketa_id='" . $this->anketa . "'");
+ $this->sqlError($sql_insert);
+
+ // Prešteje število uporabnikov na zadnjem nivoju
+ $users_upravicen_do_evalvacije = (new HierarhijaOnlyQuery())->queryStrukturaUsers($this->anketa, ' AND hs.level=(SELECT MAX(level) FROM srv_hierarhija_struktura WHERE anketa_id=' . $this->anketa . ')');
+ $st_upravicencev_do_evalvacije = mysqli_num_rows($users_upravicen_do_evalvacije);
+
+ // Število vseh uporabnikov v hierarhiji
+ $vseh_uporabnikov = (new HierarhijaOnlyQuery())->queryStrukturaUsers($this->anketa);
+ $st_vseh_uporabnikov = mysqli_num_rows($vseh_uporabnikov);
+
+ sisplet_query("UPDATE srv_hierarhija_shrani SET st_uciteljev='" . $st_upravicencev_do_evalvacije . "' WHERE id='" . $id . "' AND anketa_id='" . $this->anketa . "'");
+ sisplet_query("UPDATE srv_hierarhija_shrani SET st_vseh_uporabnikov='" . $st_vseh_uporabnikov . "' WHERE id='" . $id . "' AND anketa_id='" . $this->anketa . "'");
+ }
+
+ public function sendMail($email, $content = null, $subject = null)
+ {
+ if (empty($email))
+ return false;
+
+ try {
+ $MA = new MailAdapter($this->anketa, $type='account');
+ $MA->addRecipients($email);
+ $MA->sendMail(stripslashes($content), $subject);
+ } catch (Exception $e) {
+ print_r('Email ni bil poslan: ' . $e);
+ error_log("Email ni bil poslan: $e");
+ }
+ }
+
+ /**
+ * Pošlji email za managerje, ki so na hiearhiji
+ *
+ * @return string
+ */
+ public function obvestiManagerjeSendEmail()
+ {
+ $managerji = (!empty($_POST['managerji']) ? $_POST['managerji'] : null);
+
+ if (sizeof($managerji) > 0) {
+ foreach ($managerji as $user_id) {
+ $email = sisplet_query("SELECT email FROM users WHERE id='" . $user_id . "'", "obj")->email;
+
+ $subject = 'Dostop do gradnje samooevalvacije - 1ka.si';
+ $content = $this->lang['srv_hierarchy_manager_email_1'];
+ $content .= '<p>' . $this->lang['srv_hierarchy_manager_email_2'] . '»<b>' . SurveyInfo::getInstance()->getSurveyColumn('naslov') . '</b>«' . $this->lang['srv_hierarchy_manager_email_3'] . '<a href="' . $this->site_url . '" target="_blank">' . $this->site_url . '</a></p>';
+
+ //Zaključek emaila
+ $content .= '<p>' . $this->lang['srv_hierarchy_manager_email_4'] . '<a href="' . $this->site_url . '" target="_blank">' . $this->site_url . '</a>.' . $this->lang['srv_hierarchy_manager_email_5'];
+ $content .= '»' . $email . '«' . $this->lang['srv_hierarchy_manager_email_6'] . '</p>';
+
+ // Podpis
+ $signature = Common::getEmailSignature();
+ $content .= $signature;
+
+ $this->sendMail($email, $content, $subject);
+ }
+ }
+
+ return 'success';
+ }
+
+
+ /**
+ * Vrni html predogleda emaila za učitelje ali managerje
+ *
+ * @return html
+ */
+ public function predogledEmailaZaUciteljeAliManagerje()
+ {
+ if (empty($_POST['vrsta']))
+ return null;
+
+ // Kodo za učence pokažemo, samo kadar ni podatka v bazi
+ if (HierarhijaQuery::getOptionsPosljiKode($this->anketa) == 'nikomur' && SurveyInfo::getSurveyModules('hierarhija') < 2) {
+
+ echo '<div style="padding: 50px 20px;">' . $this->lang['srv_hierarchy_preview_none'] . '</div>';
+
+ } else {
+
+ $vrsta = $_POST['vrsta'];
+
+ echo '<div style="padding-bottom: 20px;">';
+ echo '<h2>' . ($vrsta == 1 ? $this->lang['srv_hierarchy_preview_email_teacher_header'] : $this->lang['srv_hierarchy_preview_email_manager_header']) . '</h2>';
+ echo '<div>';
+
+ // email učitelji
+ if ($vrsta == 1) {
+ $koda_za_resevanje_ankete = HierarhijaQuery::getOptionsPosljiKode($this->anketa);
+
+ echo $this->lang['srv_hierarchy_teacher_email_1'];
+ echo '<p>' . $this->lang['srv_hierarchy_teacher_email_2'] . '»<b>' . SurveyInfo::getSurveyTitle() . '</b>«' . $this->lang['srv_hierarchy_teacher_email_3'] . '<a href="' . $this->site_url . 'sa" target="_blank">' . $this->site_url . 'sa</a></p>';
+
+ echo '<br /><table style="border-spacing: 0;">';
+ echo '<thead>';
+ echo '<tr>
+ <th style="border: 1px solid #ddd; padding: 8px 10px; text-align: left; background-color: #EFF2F7;">Hierarhija</th>';
+
+ // Koda samo za ucence
+ if (SurveyInfo::getSurveyModules('hierarhija') == 2 || in_array($koda_za_resevanje_ankete, ['vsem', 'ucitelju']))
+ echo '<th style="border: 1px solid #ddd; padding: 8px 10px; text-align: center; background-color: #EFF2F7;">Koda za učitelja</th>';
+
+ // V kolikor nimamo nikakršne izbere potem posredujemo kodo tudi za učence
+ if (in_array($koda_za_resevanje_ankete, ['vsem', 'ucencem']))
+ echo '<th style="border: 1px solid #ddd; padding: 8px 10px; text-align: center; background-color: #EFF2F7;">Koda za učence</th>';
+
+ echo '<tr>';
+ echo '</thead>';
+ echo '<tbody>';
+
+ echo '<tr>';
+ echo '<td style="border: 1px solid #ddd; padding: 8px 10px; text-align: left;">Struktura hierarhije</td>';
+
+ if (SurveyInfo::getSurveyModules('hierarhija') == 2 || in_array($koda_za_resevanje_ankete, ['vsem', 'ucitelju']))
+ echo '<td style="border: 1px solid #ddd; padding: 8px 10px; text-align: center;"><span style="letter-spacing: 1px; font-size:16px; font-weight: bold;"> # # # # # </span></td>';
+
+ if (in_array($koda_za_resevanje_ankete, ['vsem', 'ucencem']))
+ echo '<td style="border: 1px solid #ddd; padding: 8px 10px; text-align: center;color:#ffa608;"><span style="letter-spacing: 1px; font-size:16px; font-weight: bold;"> # # # # # </span></td>';
+ echo '</tr>';
+
+ echo '</tbody>';
+ echo '<table><br />';
+
+ //Zaključek emaila
+ // V kolikor se emailpošlje samo učiteljem potem se skrije možnost za dostop učiteljem
+ $onemogocenDostopUcitelju = (new HierarhijaQuery())->getDeleteHierarhijaOptions($this->anketa, 'onemogoci_dostop_uciteljem', NULL, NULL, FALSE);
+
+ if (is_null($onemogocenDostopUcitelju) && in_array($koda_za_resevanje_ankete, ['ucitelju'])) {
+ echo '<p>' . $this->lang['srv_hierarchy_teacher_email_4'] . '<a href="' . $site_url . '" target="_blank">' . $site_url . '</a>' . $this->lang['srv_hierarchy_teacher_email_5'];
+ echo '»' . $uporabnik->email . '«' . $this->lang['srv_hierarchy_teacher_email_6'] . '</p>';
+ }
+
+ }
+
+
+ // email managerji
+ if ($vrsta == 2) {
+ echo $this->lang['srv_hierarchy_manager_email_1'];
+ echo '<p>' . $this->lang['srv_hierarchy_manager_email_2'] . '»<b>' . SurveyInfo::getInstance()->getSurveyColumn('naslov') . '</b>«' . $this->lang['srv_hierarchy_manager_email_3'] . '<a href="' . $this->site_url . '" target="_blank">' . $this->site_url . '</a></p>';
+
+ //Zaključek emaila
+ echo '<p>' . $this->lang['srv_hierarchy_manager_email_4'] . '<a href="' . $this->site_url . '" target="_blank">' . $this->site_url . '</a>.' . $this->lang['srv_hierarchy_manager_email_5'];
+ echo '»<i>#elektronski naslov uporabnika#</i>«' . $this->lang['srv_hierarchy_manager_email_6'] . '</p>';
+ }
+
+ // Podpis
+ $signature = Common::getEmailSignature();
+ echo $signature . '<br /><br />';
+
+ echo '</div>';
+ echo '</div>';
+ }
+
+ // Gumb za zapret popup in potrdit
+ echo '<div class="buttonwrapper spaceRight floatLeft">';
+ echo '<a class="ovalbutton ovalbutton_gray" href="#" onclick="vrednost_cancel(); return false;"><span>' . $this->lang['srv_close_profile'] . '</span></a>' . "\n\r";
+ echo '</div>';
+
+ }
+
+ /**
+ * Preverimo, če vprašanja obstajajo in če vsebuje samo dovoljena vprašanja
+ *
+ * @return int 1 or 0;
+ */
+ public function preveriUstreznostCeJePrimernaZaHierarhijo()
+ {
+
+ if(!HierarhijaHelper::preveriDostop($this->anketa)){
+ echo 'dostop';
+ return false;
+ }
+
+
+ // Preverimo, če je že kakšno vprašanje v anketi ali ni nič
+ $napaka = HierarhijaQuery::preveriBranchingCeJeKakoVprasanje($this->anketa);
+
+ // Izberemo prevzeto anketo, ker v bazi še ni vprašanj
+ if ($napaka == 1)
+ echo 'privzeta';
+
+ // Ne moremo aktivirati modula, ker vsebuje napačen tip
+ if ($napaka == 2)
+ echo 'napacen-tip';
+
+ if ($napaka == 3)
+ echo 'samo-besedilni-tip';
+
+ if ($napaka == 9)
+ echo 'ponovna-aktivacija';
+
+ if ($napaka == 'ok')
+ echo 'ok';
+
+ }
+
+ /**
+ * Pridobimo vse ankete, ki so v knjižnici za hierarhijo
+ *
+ * @return HTML
+ */
+ public function pridobiVseAnketeKiSoVknjizniciZaHierarhijo()
+ {
+ global $site_url;
+ global $hierarhija_folder_id;
+
+ $ime_mape = sisplet_query("SELECT * FROM srv_library_folder where id='" . $hierarhija_folder_id . "'", "obj")->naslov;
+ $ankete_v_knjiznici = sisplet_query("SELECT * FROM srv_library_anketa WHERE folder='" . $hierarhija_folder_id . "'", "obj");
+
+ if (empty($ime_mape) && sizeof($ankete_v_knjiznici) == 0) {
+ echo 'Knjižnica je prazna.';
+ return null;
+ }
+
+ echo '<h4>' . $ime_mape . '</h4>';
+ echo '<ul style="list-style: none;">';
+
+ if (is_array($ankete_v_knjiznici) && empty($ankete_v_knjiznici->ank_id)) {
+ foreach ($ankete_v_knjiznici as $anketa) {
+ $srv_anketa = sisplet_query("SELECT id, naslov FROM srv_anketa WHERE id='" . $anketa->ank_id . "'", "obj");
+
+ if(!empty($srv_anketa->naslov)) {
+ echo '<li>';
+ echo '<input type="radio" name="knjiznica_izbira" id="ank_'.$anketa->ank_id.'" value="'.$anketa->ank_id.'" /> ';
+ echo '<span class="enka-checkbox-radio"></span>';
+ echo '<span>
+ <a href="'.$this->site_url.'/main/survey/index.php?anketa='.$anketa->ank_id.'&amp;preview=on" target="_blank" title="Predogled ankete">
+ <span class="faicon preview"></span>
+ </a>
+ </span>';
+ echo '<label for="ank_'.$anketa->ank_id.'">'.$srv_anketa->naslov.'</label>';
+ echo '</li>';
+ }
+ }
+ } elseif (is_object($ankete_v_knjiznici)) {
+ $srv_anketa = sisplet_query("SELECT id, naslov FROM srv_anketa WHERE id='" . $ankete_v_knjiznici->ank_id . "'", "obj");
+
+ if(!empty($srv_anketa->naslov)) {
+ echo '<li>';
+ echo '<input type="radio" name="knjiznica_izbira" id="ank_'.$ankete_v_knjiznici->ank_id.'" value="'.$ankete_v_knjiznici->ank_id.'" /> ';
+ echo '<span>
+ <a href="'.$this->site_url.'main/survey/index.php?anketa='.$ankete_v_knjiznici->ank_id.'&amp;preview=on" target="_blank" title="Predogled ankete">
+ <span class="faicon preview"></span>
+ </a>
+ </span>';
+ echo '<label for="ank_'.$ankete_v_knjiznici->ank_id.'">'.$srv_anketa->naslov.'</label>';
+ echo '</li>';
+ }
+ }
+
+ echo '</ul>';
+
+ }
+
+ /**
+ * Posodobi, vnesi ali briši iz tabele srv_hierarhija_options
+ *
+ * @return
+ */
+ public function posodobiAliVnesiVtabeloOpcije()
+ {
+ $name = (!empty($_POST['name']) ? $_POST['name'] : null);
+ $value = (!empty($_POST['value']) ? $_POST['value'] : null);
+ $method = (!empty($_POST['method']) ? $_POST['method'] : null);
+
+ if (empty($name))
+ return false;
+
+ if ($method == 'delete') {
+ sisplet_query("DELETE FROM srv_hierarhija_options WHERE anketa_id='" . $this->anketa . "' AND option_name='" . $name . "'");
+
+ // Pri ocijah izbrišemo "onemogoci_dostop_uciteljem" potem moramo v tabeli srv_dostop dodati dostop za vse te učitelje
+ if ($name == 'onemogoci_dostop_uciteljem')
+ $this->preveriDostopDoAnkete('insert');
+
+ echo 'Delete';
+ return true;
+ }
+
+ // Vsekakor preverimo, če podatek že obstaja v bazi
+ $obstaja = sisplet_query("SELECT id FROM srv_hierarhija_options WHERE anketa_id='" . $this->anketa . "' AND option_name='" . $name . "'", "obj");
+ if (!is_null($obstaja) && sizeof($obstaja) > 0)
+ $method = 'put';
+
+ if ($method == 'put') {
+ sisplet_query("UPDATE srv_hierarhija_options SET option_value='" . $value . "' WHERE anketa_id='" . $this->anketa . "' AND option_name='" . $name . "'");
+ echo 'Update';
+ return true;
+ }
+
+ sisplet_query("INSERT INTO srv_hierarhija_options (anketa_id, option_name, option_value) VALUES ($this->anketa, '" . $name . "', '" . $value . "')");
+
+ // Pri ocijah dodamoo "onemogoci_dostop_uciteljem" potem moramo v tabeli srv_dostop izbrisati vsem učiteljem dostop
+ if ($name == 'onemogoci_dostop_uciteljem')
+ $this->preveriDostopDoAnkete('delete');
+
+ echo 'Insert';
+ }
+
+ /**
+ * Prteverimo, če imajo učitelji na hierarhiji dostop drugače jih dodamo ali odstranimo
+ *
+ * @param string $tip
+ */
+
+ private function preveriDostopDoAnkete($tip = null)
+ {
+ // Vsi uporabniki na zadnjem nivoju
+ $users_na_zadnjem_nivoju = (new HierarhijaOnlyQuery())->queryStrukturaUsers($this->anketa, ' AND hs.level=(SELECT MAX(level) FROM srv_hierarhija_struktura WHERE anketa_id=' . $this->anketa . ') GROUP BY users.id');
+
+ if ($tip == 'insert') {
+ while ($uporabnik = $users_na_zadnjem_nivoju->fetch_object()) {
+ HierarhijaQuery::dostopZaUporabnika($this->anketa, $uporabnik->user_id, 'insert');
+ }
+ }
+
+ if ($tip == 'delete') {
+ while ($uporabnik = $users_na_zadnjem_nivoju->fetch_object()) {
+ HierarhijaQuery::dostopZaUporabnika($this->anketa, $uporabnik->user_id, 'delete');
+ }
+ }
+ }
+
+
+ /**
+ * Pošlji vabilo samo učiteljem, če jim predhodno ni bilo poslano
+ *
+ * @return string
+ */
+ private function posljiElektronskoSamoUciteljem()
+ {
+
+ Hierarhija::posljiEmailSkodamiUcencemAliSamoUciteljem($this->anketa);
+
+ HierarhijaQuery::saveOptions($this->anketa, 'obvesti_samo_ucitelje', 1);
+
+ return true;
+ }
+
+
+}
+
+
diff --git a/admin/survey/modules/mod_hierarhija/class/HierarhijaAnalysisClass.php b/admin/survey/modules/mod_hierarhija/class/HierarhijaAnalysisClass.php
new file mode 100644
index 0000000..a322a5d
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/class/HierarhijaAnalysisClass.php
@@ -0,0 +1,2617 @@
+<?php
+/** Kopija razreda class.SurveyMeans povprečja - meanse
+ *
+ *
+ */
+
+define("EXPORT_FOLDER", "admin/survey/SurveyData");
+
+class HierarhijaAnalysis
+{
+ private $anketa; # id ankete
+ private $db_table; # katere tabele uporabljamo
+ private $_HEADERS = array(); # shranimo podatke vseh variabel
+ private $struktura = null; # ID strukture hierarhije, če želimo prikazati specifične rezultate za posameznega učitelja
+ private $struktura_ucitelj = []; # Pridobimo vse strukture za posameznega učitelja
+
+ private $headFileName = null; # pot do header fajla
+ private $dataFileName = null; # pot do data fajla
+ private $dataFileStatus = null; # status data datoteke
+ private $SDF = null; # class za inkrementalno dodajanje fajlov
+
+ public $variabla1 = array('0' => array('seq' => '0', 'spr' => 'undefined', 'grd' => 'undefined')); # array drugih variable, kamor shranimo spr, grid_id, in sequenco
+ public $variabla2 = array('0' => array('seq' => '0', 'spr' => 'undefined', 'grd' => 'undefined')); # array drugih variable, kamor shranimo spr, grid_id, in sequenco
+
+ public $variablesList = null; # Seznam vseh variabel nad katerimi lahko izvajamo meanse (zakeširamo)
+
+ public $_CURRENT_STATUS_FILTER = ''; # filter po statusih, privzeto izvažamo 6 in 5
+
+ public $_HAS_TEST_DATA = false; # ali anketa vsebuje testne podatke
+
+ public $doValues = true; # checkbox Prikaži vrednosti
+
+ private $sessionData; # podatki ki so bili prej v sessionu - za nastavitve, ki se prenasajo v izvoze...
+
+
+ public function __construct($sid)
+ {
+ global $global_user_id;
+
+ if (is_null($sid))
+ $sid = $_GET['anketa'];
+
+ // v kolikor ni ID ankete potem nič ne prikazujemo
+ if ((int)$sid <= 0) {
+ echo 'Invalid Survey ID!';
+ exit();
+ }
+
+ // ID ankete
+ $this->anketa = $sid;
+
+ // Preveri, če ia parameter id strukture
+ $this->pregledAnalizeSamoZaEnoStrukturo();
+
+ # polovimo vrsto tabel (aktivne / neaktivne)
+ SurveyInfo::getInstance()->SurveyInit($this->anketa);
+ if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) {
+ $this->db_table = '_active';
+ }
+
+ # Inicializiramo in polovimo nastavitve missing profila
+ SurveyStatusProfiles::Init($this->anketa);
+ SurveyUserSetting::getInstance()->Init($this->anketa, $global_user_id);
+
+ $this->_CURRENT_STATUS_FILTER = STATUS_FIELD . ' ~ /6|5/';
+
+ SurveyStatusProfiles::Init($this->anketa);
+ SurveyMissingProfiles::Init($this->anketa, $global_user_id);
+ SurveyConditionProfiles::Init($this->anketa, $global_user_id);
+ SurveyZankaProfiles::Init($this->anketa, $global_user_id);
+ SurveyTimeProfiles::Init($this->anketa, $global_user_id);
+ SurveyVariablesProfiles::Init($this->anketa);
+ SurveyDataSettingProfiles:: Init($this->anketa);
+
+
+ // Poskrbimo za datoteko s podatki
+ $SDF = SurveyDataFile::get_instance();
+ $SDF->init($this->anketa);
+ $SDF->prepareFiles();
+
+ $this->headFileName = $SDF->getHeaderFileName();
+ $this->dataFileName = $SDF->getDataFileName();
+ $this->dataFileStatus = $SDF->getStatus();
+
+
+ // preberemo nastavitve iz baze (prej v sessionu)
+ SurveyUserSession::Init($this->anketa);
+ // V kolikor ni shranjeno polje v bazi potem pobrišemo trenutno, kar je nastavljeno, da se izognemo napakam, ki bi se pojavile v nadaljevanju
+ if (!empty(SurveyUserSession::getData()) && !is_array(SurveyUserSession::getData()))
+ SurveyUserSession::delete();
+
+ $this->sessionData = SurveyUserSession::getData();
+
+ if (empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) != 'xmlhttprequest') {
+ if (!empty($_GET['s'])) {
+ $this->sessionData['means']['struktura'] = (int)$_GET['s'];
+ } elseif (!empty($this->sessionData['means']['struktura'])) {
+ unset($this->sessionData['means']['struktura']);
+ }
+
+ SurveyUserSession::saveData($this->sessionData);
+ }
+
+ // V kolikor preverjamo anketo za učitelja z že izbranimi parametri potem pobrišemo nastavitve iz baze
+ if (!is_null($this->struktura))
+ $this->sessionData['means']['filterHierarhija'] = array();
+
+
+ if ($this->dataFileStatus == FILE_STATUS_NO_DATA || $this->dataFileStatus == FILE_STATUS_NO_FILE || $this->dataFileStatus == FILE_STATUS_SRV_DELETED) {
+ Common::noDataAlert();
+ exit();
+ }
+
+ if ($this->headFileName !== null && $this->headFileName != '') {
+ $this->_HEADERS = unserialize(file_get_contents($this->headFileName));
+ }
+
+ // Kdar je variable2 prazna in podatki še niso shranjeni v bazi potem prikažemo vse odgovore;
+ if (!is_null($this->struktura) || (empty($this->sessionData['means']['means_variables']['variabla2']) || sizeof($this->sessionData['means']['means_variables']['variabla2']) < 1) && !empty($this->_HEADERS)) {
+ $polje = array();
+ if (!empty($this->getVariableList(2))) {
+ foreach ($this->getVariableList(2) as $vprasanje) {
+ if ($vprasanje['canChoose']) {
+ $polje[] = [
+ 'seq' => $vprasanje['sequence'],
+ 'spr' => $vprasanje['spr_id'],
+ 'grd' => 'undefined'
+ ];
+ }
+ }
+ }
+
+ $this->sessionData['means']['means_variables']['variabla2'] = $polje;
+
+ if (!empty($this->struktura))
+ $this->variabla2 = $polje;
+
+
+ // dodan js, da osveži vse elemente in vse izbrane spremenljivke shrani v bazo
+ echo '<script>
+ window.onload = function () {
+ change_hierarhy_means();
+ };
+ </script>';
+ }
+
+
+ # nastavimo vse filtre
+// $this->setUpFilter();
+
+ # nastavimo uporabniške nastavitve
+ $this->readUserSettings();
+
+ if (!empty($this->struktura)) {
+ // posodobimo vse filtre, ki so bili izbrani
+ echo '<script>
+ window.onload = function () {
+ posodobil_filter_analiz();
+ };
+ </script>';
+ }
+
+ }
+
+
+ /**
+ * Pogledamo, če imamo id strukture in potem prikažemo rezulatate samo teh reševanj
+ */
+ private function pregledAnalizeSamoZaEnoStrukturo()
+ {
+ if (is_null($_GET['s']) || is_string((int)$_GET['s']))
+ return null;
+
+ $this->struktura = (int)$_GET['s'];
+ }
+
+
+ private function readUserSettings()
+ {
+ $sdsp = SurveyDataSettingProfiles:: getSetting();
+ $this->doValues = $sdsp['doValues'] == '1' ? true : false;
+ }
+
+
+ public function ajax()
+ {
+ #nastavimo variable če so postane
+ $this->setPostVars();
+
+ # izvedemo akcijo
+ switch ($_GET['a']) {
+ case 'changeDropdown':
+ $this->displayDropdowns();
+ break;
+ case 'change':
+ $this->displayData();
+ break;
+ case 'add_new_variable':
+ $this->addNewVariable();
+ break;
+ case 'changeMeansSubSetting':
+ $this->changeMeansSubSetting();
+ break;
+ case 'changeMeansShowChart':
+ $this->changeMeansShowChart();
+ break;
+ case 'posodobi-ucitelja':
+ $this->posodobiPodatkeZaUcitelja();
+ break;
+ case 'posodobi-izbran-predmet':
+ $this->posodobiIzbranPredmet();
+ break;
+ case 'posodobi-seznam-za-ucitelje':
+ $this->posodobiSeznamFiltrovUcitelja();
+ breake;
+ case 'pobrisi-filter':
+ $this->pobrisiFilterUciteljevAliHierarhije();
+ break;
+ default:
+ print_r("<pre>");
+ print_r($_GET);
+ print_r($_POST);
+ break;
+ }
+
+ }
+
+ function Display()
+ {
+ global $lang;
+
+ $hierarhija_type = (!empty($_SESSION['hierarhija'][$this->anketa]['type']) ? $_SESSION['hierarhija'][$this->anketa]['type'] : null);
+
+ // meni za izbiranlje za filtre
+ $this->displayHierarhijaAliUcitelji();
+
+ # ali imamo testne podatke
+ if ($this->_HAS_TEST_DATA) {
+ # izrišemo bar za testne podatke
+ $SSH = new SurveyStaticHtml($this->anketa);
+ $SSH->displayTestDataBar(true);
+ }
+
+ # preberemo prednastavljene variable iz seje, če obstajajo
+ # v koolikor gledamo za specifični ID, potem prikažemo trenutne podatke
+ if (is_null($_GET['s']))
+ $this->presetVariables();
+
+ // v kolikor gre za specifično anketo potem naredimo skrito polje z ID-jem strukture tega učitelja
+ if (!is_null($this->struktura))
+ echo '<input type="hidden" id="id-strukture" value="' . $this->struktura . '" />';
+
+
+// $this->DisplayLinks();
+// $this->DisplayFilters();
+
+ // ruleta za izbiro po učiteljih
+ if ($hierarhija_type < 5) {
+ $prikazi_fitre = is_array($this->sessionData['means']['strukturaUcitelj']);
+ $prikazi_rezultate = (isset($this->sessionData['means']['uciteljFilter']) && $this->sessionData['means']['uciteljFilter'] == 'predmeti');
+
+ echo '<div id="ucitelji" style="display:' . (($prikazi_fitre && !$prikazi_rezultate) ? 'block' : 'none') . ';">';
+ // Prikažemo seznam učiteljev za agregirane analize
+ $this->displayDropdownSeznamUciteljev();
+ echo '</div>';
+
+ echo '<div id="predmeti-in-ucitelji" style="display:' . (($prikazi_fitre && $prikazi_rezultate) ? 'block' : 'none') . ';">';
+ $this->displayDropdownSeznamUciteljevZaSpecificniPredmet();
+ echo '</div>';
+ }
+
+
+ echo '<div id="div_means_show_filter">';
+// echo '<div class="znak plus"><i class="fa fa-lg fa-plus-circle" aria-hidden="true"></i> Prikaži filtre</div>';
+// echo '<div class="znak minus"><i class="fa fa-lg fa-minus-circle" aria-hidden="true"></i> Skrij filtre</div>';
+ echo '<div id="div_means_dropdowns">';
+ $this->displayDropdowns();
+ echo '</div>';
+
+ // Prikažemo izvoz, če gre za učitelja
+ if ($_GET['a'] == 'hierarhija') {
+ $href_pdf = makeEncodedIzvozUrlString('izvoz.php?b=export&m=hierarhija_pdf_izpis&anketa=' . $this->anketa);
+ $href_rtf = 'index.php?anketa=' . $this->anketa . '&a=hierarhija&m=analize&r=custom';
+
+ echo '<div class="izvozi ucitelj">';
+ echo '<a href="#" onClick="printElement(\'Analize\'); return false;" title="' . $lang['PRN_Izpis'] . '" class="ikone"><span class="hover_export_icon"><span class="faicon print icon-grey_dark_link"></span></span>' . $lang['srv_export_hover_print'] . '</a>';
+ echo '<a href="'.$href_pdf.'" id="meansDoPdf" target="_blank" class="ikone"><span class="hover_export_icon"><span class="sprites pdf_large"></span></span>' . $lang['srv_export_hover_pdf'] . '</a>';
+ echo '<a href="'.$href_rtf.'" id="meansDoRtf" target="_blank" class="ikone"><span class="hover_export_icon"><span class="sprites rtf_large"></span></span>' . $lang['srv_export_hover_rtf'] . '</a>';
+ echo '</div>';
+
+ }
+ echo '</div>';
+
+ echo '<div id="div_means_data">';
+ $this->displayData();
+ echo '</div>'; #id="div_means_data"
+
+ }
+
+
+ /**
+ * Izpišemo opcijo za izbiro ali filtri hierarhije ali filtri po učiteljih
+ *
+ * @return html
+ */
+ public function displayHierarhijaAliUcitelji()
+ {
+ $hierarhija_type = (!empty($_SESSION['hierarhija'][$this->anketa]['type']) ? $_SESSION['hierarhija'][$this->anketa]['type'] : null);
+ global $lang;
+
+ if ($hierarhija_type > 4)
+ return null;
+
+ echo '<div id="hierarhija-specificni-ucitelj"><h2>';
+ $seja = SurveyUserSession::getData(['means']['imeHierarhije']);
+ if(!empty($this->sessionData['means']['imeHierarhije']))
+ echo $this->sessionData['means']['imeHierarhije'];
+ echo '</h2></div>';
+
+
+ // V kolikor gre za filtre po hierarhiji ali za filtre samo po učiteljih
+ echo '<div id="analize-nastavitve">';
+ echo '<div class="filtri">';
+ echo '<b>Filtriranje po: </b>';
+ echo '<input type="radio" name="hierarhija-ucitelj" id="hierarhija-radio-filter" value="filtri" onclick="posodobiPrikazHierarhije(\'filtri\')" ' . (!isset($this->sessionData['means']['strukturaUcitelj']) ? 'checked="checked"' : null) . '/> <label for="hierarhija-radio-filter">hierarhiji</label>';
+ echo '<input type="radio" name="hierarhija-ucitelj" id="hierarhija-radio-ucitelj" value="ucitelji" onclick="posodobiPrikazHierarhije(\'ucitelji\')" ' . (is_array($this->sessionData['means']['strukturaUcitelj']) ? 'checked="checked"' : null) . '/> <label for="hierarhija-radio-ucitelj">učiteljih</label>';
+
+ echo '<div class="filtri-ucitelji" style="display:' . (is_array($this->sessionData['means']['strukturaUcitelj']) ? 'block' : 'none') . ';">';
+ echo '<b>Rezultati bodo prikazani: </b>';
+ echo '<input type="radio" name="ucitelj-filter" id="ucitelj-filter-agregirano" value="agregirano" onclick="posodobiPrikazFiltraPoUciteljih(\'agregirano\')" ' . (!isset($this->sessionData['means']['uciteljFilter']) || $this->sessionData['means']['uciteljFilter'] == 'agregirano' ? 'checked="checked"' : null) . '/> <label for="ucitelj-filter-agregirano">agregirano</label>';
+ echo '<input type="radio" name="ucitelj-filter" id="ucitelj-filter-predmeti" value="predmeti" onclick="posodobiPrikazFiltraPoUciteljih(\'predmeti\')" ' . ($this->sessionData['means']['uciteljFilter'] == 'predmeti' ? 'checked="checked"' : null) . '/> <label for="ucitelj-filter-predmeti">po predmetih</label>';
+ echo '</div>';
+
+ echo '</div>';
+
+ echo '<div class="izvoz">';
+ echo '<b>Poročila po meri: </b>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=hierarhija_superadmin&m=analize&r=custom&t=pdf" class="link-ikona pdf"><span class="faicon pdf black very_large" aria-hidden="true"></span></a>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=hierarhija_superadmin&m=analize&r=custom&t=word" class="link-ikona word"><span class="faicon rtf black very_large" aria-hidden="true"></span></a>';
+ if($_GET['error'] == 'invalid') {
+ echo '<div class="error-display">'.$lang['srv_hierarchy_analysis_error_invalid_data'].'</div>';
+ }
+ echo '</div>';
+ echo '</div>';
+ }
+
+ /**
+ * Izriše seznam vseh učiteljev, ki so v strukturi
+ *
+ * @return html
+ */
+ private function displayDropdownSeznamUciteljev()
+ {
+ $vsi_uporabniki_upraviceni_do_evalvacije = (new \Hierarhija\Model\HierarhijaOnlyQuery())->queryStrukturaUsers($this->anketa, ' AND hs.level=(SELECT MAX(level) FROM srv_hierarhija_struktura WHERE anketa_id=' . $this->anketa . ') GROUP BY users.id');
+
+ echo '<label>Izberite ustreznega učitelja:</label>';
+ echo '<select name="filter-po-ucitelju"
+ id="filter-po-ucitelju"
+ class="filter-ucitelji"
+ data-placeholder="' . $lang['srv_hierarchy_label_filter_teacher'] . '"
+ onchange="posodobi_izbranega_ucitelja()"
+ >';
+ echo '<option value="" selected="selected">---</option>';
+ while ($uporabnik = $vsi_uporabniki_upraviceni_do_evalvacije->fetch_object()) {
+
+ $izpis = $uporabnik->email;
+ if (!empty($uporabnik->name) && $uporabnik->name != $uporabnik->email || !empty($uporabnik->surname) && $uporabnik->surname != $uporabnik->email)
+ $izpis .= ' (' . $uporabnik->name . ' ' . $uporabnik->surname . ')';
+
+ echo '<option value="' . $uporabnik->user_id . '">' . $izpis . '</option>';
+ }
+ echo '</select>';
+ }
+
+ /**
+ * Izriše seznam vseh učiteljev in strukture - za 1 predmet
+ *
+ * @return html
+ */
+ private function displayDropdownSeznamUciteljevZaSpecificniPredmet()
+ {
+ $struktura_uporabnikov = (new \Hierarhija\Model\HierarhijaOnlyQuery())->queryStrukturaUsers($this->anketa, ' AND hs.level=(SELECT MAX(level) FROM srv_hierarhija_struktura WHERE anketa_id=' . $this->anketa . ')');
+
+ echo '<label>Izberite ustrezen predmet:</label>';
+ echo '<select name="filter-po-ucitelju-in-predmetu"
+ id="filter-po-ucitelju-in-predmetu"
+ class="filter-ucitelji"
+ data-placeholder="' . $lang['srv_hierarchy_label_filter_teacher'] . '"
+ onchange="posodobi_izbran_predmet()"
+ >';
+ echo '<option value="" selected="selected">---</option>';
+ while ($uporabnik = $struktura_uporabnikov->fetch_object()) {
+
+ $izpis = \Hierarhija\HierarhijaHelper::hierarhijaPrikazNaslovovpriUrlju($this->anketa, $uporabnik->id, $uporabnik->user_id);
+ $izpis .= '&nbsp; &nbsp; &nbsp; ('.$uporabnik->email.')';
+
+ echo '<option value="' . $uporabnik->id . '">' . $izpis . '</option>';
+ }
+ echo '</select>';
+ }
+
+ public function displayDropdowns()
+ {
+ global $lang;
+ $variables1 = $this->getVariableList(1);
+ $variables2 = $this->getVariableList(2);
+
+
+ // V kolikor je struktura 0 in post request je notri ID strukture potem zapišemo v globalno spremenljivko
+ if (is_null($this->struktura) && !empty($_POST['strukturaId']))
+ $this->struktura = (int)$_POST['strukturaId'];
+
+ // Pridobimo strukturo za specifično anketo
+ $imena_sifrantov_ucitelja = array();
+ if (!is_null($this->struktura)) {
+ $this->sessionData['means']['filterHierarhija'] = array();
+ $imena_sifrantov_ucitelja = $this->pridobiStrukturoZaUcitelja();
+ }
+
+ ### Levi meni za prikaz vloge
+ echo '<div id="meansLeftDropdowns" style="display:none;">';
+ if ((int)$this->variabla1['0']['seq'] > 0) {
+ echo '<span class="pointer space_means_new" >&nbsp;</span>';
+ }
+ echo $lang['srv_means_label1'];
+ echo '<br />';
+
+ #iz header datoteke preberemo spremenljivke
+ #js: $("#means_variable_1, #means_variable_2").live('click', function() {})
+ if (count($this->variabla1) > 0) {
+ $br = null;
+
+ foreach ($this->variabla1 AS $_key => $variabla1) {
+ echo $_br;
+ echo '<span id="v1_' . $_key . '">';
+
+ echo '<select name="means_variable_1" id="means_variable_1" onchange="change_hierarhy_means(); return false;" autocomplete="off">';
+//
+// # Tukaj vedno izberemo variablo vloga
+ if ($variabla1['seq'] == null || $variabla1['seq'] == 0) {
+ echo '<option value="0" selected="selected" >' . $lang['srv_means_izberi_prvo'] . '</option>';
+ }
+ foreach ($variables1 as $variable) {
+ echo '<option value="' . $variable['sequence'] . '" spr_id="' . $variable['spr_id'] . '" '
+ . (isset($variable['grd_id']) ? ' grd_id="' . $variable['grd_id'] . '" ' : '')
+ . ' selected="selected"> '
+ . ((int)$variable['sub'] == 0 ? '' : ((int)$variable['sub'] == 1 ? '&nbsp;&nbsp;' : '&nbsp;&nbsp;&nbsp;&nbsp;'))
+ . $variable['variableNaslov'] . '</option>';
+
+ }
+
+ echo '</select>';
+ if (count($this->variabla1) > 1) {
+ echo '<span class="pointer" id="means_remove" onclick="hierarhy_means_remove_variable(this);"><span class="faicon delete_circle icon-orange_link" title=""></span></span>';
+ } else {
+ #echo '<span class="space_means_new">&nbsp;</span>';
+ }
+
+ $_br = '<br/><span class="space_means_new">&nbsp;</span>';
+ echo '</span>';
+ }
+ $_br = null;
+ }
+
+ echo '</div>';
+
+ ### Prikaz elementov hierarhije in nivojev, ki so že zaklenjeni
+ echo '<div id="meansLeftDropdowns" class="hierarhija-filtri-levi" ' . ((!empty($this->struktura) || is_array($this->sessionData['means']['struktura']) || isset($this->sessionData['means']['strukturaUcitelj'])) ? ' style="display:none;"' : '') . '>';
+ echo $lang['srv_hierarchy_label_analyse'];
+ echo '<br />';
+
+ #### Pridobimo strukturo hierarhije
+ $struktura_hierarhije = $this->hierarhijaUporabnika(); //tukaj dobimo samo polja, do katerih ima uporabnik dovoljenje
+
+ #### V kolikor je učitelj oz. poljuben uporabnik na določeni ravni potem preverimo max št nivojev
+ $max_st_nivojev = sisplet_query("SELECT MAX(level) AS max
+ FROM
+ srv_hierarhija_ravni AS r
+ LEFT JOIN
+ srv_hierarhija_sifranti AS s
+ ON
+ s.hierarhija_ravni_id = r.id
+ WHERE
+ r.anketa_id = '" . $this->anketa . "'
+ ORDER BY level", "obj")->max;
+
+ // filter za vsak nivo shranimo v polje in v kolikor se filter ponovi potem izpišemo vedno samo enega
+ foreach ($this->_HEADERS as $h_key => $header) {
+ preg_match('/^(?:nivo)([0-9]+)/', $header['variable'], $match);
+ if ((int)$h_key > 0 && sizeof($match) > 0) {
+ echo '<div class="hierarhija-filter">';
+ echo '<label>';
+ echo $header['naslov'] . ': ';
+ echo '</label>';
+ echo '</div>';
+
+ // Prikaz chosen za vse šifrante, ki jih imamo
+ echo '<select name="' . $header['variable'] . '"
+ id="' . $header['variable'] . '"
+ class="filter-analize"
+ data-placeholder="' . $lang['srv_hierarchy_label_filter'] . '"
+ onchange="posodobil_filter_analiz()"
+ ' . ((false && $struktura_hierarhije != 'admin' && $match[1] == 1) ? null : "multiple") . '
+ >';
+
+ foreach ($header['options'] as $v_key => $value) {
+ $select = null;
+
+ // Označi chosen "select" za spremenljivke, ki smo jih izbrali iz filtrov
+ if (
+ !empty($this->sessionData['means']['filterHierarhija'][$header['variable']]) &&
+ sizeof($this->sessionData['means']['filterHierarhija'][$header['variable']]) > 0 &&
+ in_array($v_key, $this->sessionData['means']['filterHierarhija'][$header['variable']])
+ ) {
+ $select = 'selected="selected"';
+ }
+
+
+ // Če je izbrana struktura
+ if (!is_null($this->struktura) && sizeof($imena_sifrantov_ucitelja) > 0 && in_array($value, $imena_sifrantov_ucitelja)) {
+ $this->sessionData['means']['filterHierarhija'][$header['variable']][] = $v_key;
+ $select = 'selected="selected"';
+ }
+
+ #### V Kolikor ni admin, potem prikažemo samo te stvari, ki jih lahk on izbere
+ $st_nivoja = substr($header['variable'], 4);
+ $polje_uporabnikove_hierarhije = $struktura_hierarhije[$st_nivoja];
+
+ #### Če gre za administratorja, potem prikažemo vse šifrante
+ if ($struktura_hierarhije == 'admin') {
+ echo '<option value="' . $v_key . '" ' . $select . '>' . $value . '</option>';
+
+ #### Za 1. in 2. nivo ter zadnji nivo prikažemo samo šifrante na katerih je izbran sledeči uporabnik
+ } elseif (
+ $struktura_hierarhije != 'admin' &&
+ !empty($polje_uporabnikove_hierarhije) &&
+ in_array($v_key, $polje_uporabnikove_hierarhije) &&
+ ($st_nivoja < 3 || $max_st_nivojev == $st_nivoja)
+ ) {
+ ##### Če imam samo en podatek v polju potem tega že privzeto izberemo
+ if (sizeof($polje_uporabnikove_hierarhije) == 1) {
+
+ // V kolikor smo zbrisali zadnji nivo potem ga ponovno dodamo in shranimo sejo
+ if (!in_array($v_key, $this->sessionData['means']['filterHierarhija'][$header['variable']])) {
+ $this->sessionData['means']['filterHierarhija'][$header['variable']] = [$v_key];
+ SurveyUserSession::saveData($this->sessionData);
+ }
+
+ $select = 'selected="selected"';
+ }
+
+ if (empty($this->sessionData['means']['filterHierarhija'][$header['variable']]) || in_array($v_key, $this->sessionData['means']['filterHierarhija'][$header['variable']]))
+ echo '<option value="' . $v_key . '" ' . $select . '>' . $value . '</option>';
+
+ #### Vse umesne šifrante prikažemo vse
+ } elseif ($st_nivoja > 2 && $max_st_nivojev != $st_nivoja) {
+
+ if (in_array($v_key, $struktura_hierarhije[$match[1]]))
+ echo '<option value="' . $v_key . '" ' . $select . '>' . $value . '</option>';
+ }
+ }
+ echo '</select>';
+ echo '<br />';
+ }
+ }
+
+ echo '<script>';
+ echo '$(".filter-analize").chosen();';
+ echo '</script>';
+
+ echo '</div>';
+
+
+# echo '<div id="meansImgHolder">';
+# if ($this->isSelectedBothVariables()) {
+# echo '<img src="../images/rotate.png" alt="rotate" onclick="change_means(\'rotate\');return false;" />';
+# } else {
+# echo '<img src="../images/rotate_dis.png" alt="rotate" />';
+# }
+# echo '</div>';
+
+ echo '<div id="meansRightDropdowns" ' . (!empty($this->struktura) ? ' style="display:none;"' : '') . '>';
+ if ((int)$this->variabla1['0']['seq'] > 0) {
+ echo '<span class="pointer space_means_new" >&nbsp;</span>';
+ }
+ echo $lang['srv_means_label2'];
+ echo '<br />';
+
+
+ # za vsako novo spremenljivko 2 nardimo svoj select
+ if (count($this->variabla2) > 0) {
+ if ((int)$this->variabla1['0']['seq'] > 0) {
+ echo '<span class="pointer" id="means_add_new" onclick="hierarhy_means_add_new_variable(\'2\');"><span class="faicon add small icon-as_link" title="' . '"></span></span>';
+ }
+
+ foreach ($this->variabla2 AS $_key => $variabla2) {
+ echo $_br;
+ echo '<span id="v2_' . $_key . '">';
+ echo '<select name="means_variable_2" id="means_variable_2" onchange="change_hierarhy_means(); return false;" autocomplete="off">';
+
+ # ce prva variabla ni izbrana, dodamo tekst za izbiro prve variable
+ if ((int)$this->variabla1['0']['seq'] == 0) {
+ echo '<option value="0" selected="selected" >' . $lang['srv_means_najprej_prvo'] . '</option>';
+ } else {
+ # če druga variabla ni izbrana dodamo tekst za izbiro druge variable
+ if ($variabla2['seq'] == null || $variabla2['seq'] == 0) {
+ echo '<option value="0" selected="selected" >' . $lang['srv_means_izberi_drugo'] . '</option>';
+ }
+ }
+
+ foreach ($variables2 as $variable) {
+ echo '<option value="' . $variable['sequence'] . '" spr_id="' . $variable['spr_id'] . '" '
+ . (isset($variable['grd_id']) ? ' grd_id="' . $variable['grd_id'] . '" ' : '')
+ . (((int)$variable['canChoose'] == 1) ? '' : ' disabled="disabled" ')
+ . ($variabla2['seq'] > 0 && $variabla2['seq'] == $variable['sequence'] ? ' selected="selected" ' : '')
+ . '> '
+ . ((int)$variable['sub'] == 0 ? '' : ((int)$variable['sub'] == 1 ? '&nbsp;&nbsp;' : '&nbsp;&nbsp;&nbsp;&nbsp;'))
+ . $variable['variableNaslov'] . '</option>';
+
+ }
+ echo '</select>';
+ if (count($this->variabla2) > 1) {
+ echo '<span class="pointer" id="means_remove" onclick="hierarhy_means_remove_variable(this);"><span class="faicon delete_circle icon-orange_link" title=""></span></span>';
+ } else {
+ echo '<span class="space_means_new">&nbsp;</span>';
+ }
+
+ $_br = '<br/><span class="space_means_new">&nbsp;</span>';
+ echo '</span>';
+ }
+ }
+ echo '</div>';
+
+ echo '<span id="meansSubSetting" class="floatLeft spaceLeft">';
+ if (count($this->variabla2) > 1) {
+ ### Skrijemo možnost preklopa odgovorov v skupno tabelo
+ echo '<div style="display:none;">';
+ echo '<label><input id="chkMeansSeperate" type="checkbox" onchange="changeHierarhyMeansSubSetting();" ' . ($this->sessionData['means']['meansSeperateTables'] == true ? ' checked="checked"' : '') . '> ' . $lang['srv_means_setting_1'] . '</label>';
+ echo '</div>';
+ echo '<div class="vprasanja prikazi" onclick="tooglePrikazVprasanja(1)"><i class="fa fa-lg fa-plus-circle" aria-hidden="true"></i> ' . $lang['srv_hierarchy_analysis_show_questions'] . '</div>';
+ echo '<div class="vprasanja skrij" onclick="tooglePrikazVprasanja(0)" style="display: none;"><i class="fa fa-lg fa-minus-circle" aria-hidden="true"></i> ' . $lang['srv_hierarchy_analysis_hide_questions'] . '</div>';
+// echo '<br /><span id="spanMeansJoinPercentage"' . ($this->sessionData['means']['meansSeperateTables'] != true ? '' : ' class="displayNone"') . '><label><input id="chkMeansJoinPercentage" type="checkbox" onchange="changeHierarhyMeansSubSetting();" ' . ($this->sessionData['means']['meansJoinPercentage'] == true ? ' checked="checked"' : '') . '> ' . $lang['srv_means_setting_2'] . '</label></span>';
+ }
+ echo '<div class="prikazi-graf"><input id="showChart" type="checkbox" onchange="showTableChart(\'hierarhy_mean\');" ' . ($this->sessionData['mean_charts']['showChart'] == true ? ' checked="checked"' : '') . '> <label for="showChart">' . $lang['srv_show_charts'] . '</label></div>';
+ echo '</span>';
+ echo '</span>';
+
+ echo '<br class="clr"/>';
+
+
+ // Ikone za izvoz (so tukaj da se refreshajo ob ajax klicu)
+ $this->displayExport();
+ }
+
+
+ /**
+ * Pridobimo hierarhijo uporabnika, ki je prijavljen
+ *
+ * @return (array) $hierarhija
+ */
+ public function hierarhijaUporabnika()
+ {
+ # Podatki za pregled nivojev hierarhije
+ $hierarhija_type = \Hierarhija\HierarhijaHelper::preveriTipHierarhije($this->anketa);
+
+ if (empty($hierarhija_type))
+ return false;
+
+ if ($hierarhija_type > 4) {
+ $struktura_user = (new \Hierarhija\Model\HierarhijaQuery())->pridobiHierarhijoNavzgor($this->anketa, true);
+
+ $hierarhija = array();
+
+ foreach ($struktura_user as $key => $struktura) {
+ foreach ($struktura as $row) {
+ $nivo = trim($row['nivo'], 'nivo');
+
+ ### Gremo skozi hierarhijo in v kolikor ima uporabnik več izvedenih anket (za različne letnike) potem vpišemo vse unikatne nivoje hierarhije;
+ if (!in_array($nivo, $hierarhija) &&
+ (is_array($hierarhija[$nivo]) &&
+ !in_array($row['st_odgovora'], $hierarhija[$nivo]) || empty($hierarhija[$nivo]))
+ ) {
+ $hierarhija[$nivo][] = $row['st_odgovora'];
+ }
+// else {
+//
+//// $st_last = 0;
+// ### V kolikor obstaja element potem vedno prepišemo zadnjega vnešenega
+//// if (isset($hierarhija[$nivo]) && sizeof($hierarhija[$nivo]) > 0)
+//// $st_last = sizeof($hierarhija[$nivo]) - 1;
+//
+//// $hierarhija[$nivo][$st_last] = $row['st_odgovora']; //če se je nivo ponovil ga vedno vpišemo na prvo mesto
+//
+// }
+
+ }
+ }
+
+ return $hierarhija;
+ }
+
+ return 'admin';
+ }
+
+
+ /**
+ * Pridobimo strukturo za učitelja za specifično anketo in vrnemo imena vseh šifrantov, ker jih bomo uporabili za filtriranje
+ *
+ * @return (array) $imena_sifrantov
+ */
+ public function pridobiStrukturoZaUcitelja()
+ {
+ $struktura = \Hierarhija\Model\HierarhijaQuery::posodobiSifranteVrednostiGledeNaTrenutenIdStrukture($this->struktura);
+ $imena_sifrantov = array();
+ foreach ($struktura as $row) {
+ $sql = sisplet_query("SELECT ime FROM srv_hierarhija_sifranti WHERE id='" . $row['id_sifranta'] . "'", "obj");
+ $imena_sifrantov[] = $sql->ime;
+ }
+
+ return $imena_sifrantov;
+ }
+
+ /**
+ * Osvežimo vse podatke, ki so potrebni za pridobitev pdoatkov
+ *
+ * @return html
+ */
+ public function displayData($filter_hierarhija = null)
+ {
+ global $site_path;
+
+ $br = '';
+ $means = array();
+
+ if (!file_exists($site_path . EXPORT_FOLDER . '/export_data_' . $this->anketa . '.dat')) {
+ echo 'Ni odgovorov';
+ die();
+ }
+
+
+ # če ne uporabljamo privzetega časovnega profila izpišemo opozorilo
+ SurveyTimeProfiles::printIsDefaultProfile(false);
+
+ # če imamo filter ifov ga izpišemo
+ SurveyConditionProfiles::getConditionString();
+
+ # če imamo filter spremenljivk ga izpišemo
+ SurveyVariablesProfiles::getProfileString($doNewLine, true);
+
+ # če imamo rekodiranje
+ $SR = new SurveyRecoding($this->anketa);
+ $SR->getProfileString();
+
+ if ($this->getSelectedVariables(1) !== null && $this->getSelectedVariables(2) !== null) {
+ $variables1 = $this->getSelectedVariables(2);
+ $variables2 = $this->getSelectedVariables(1);
+
+ $c1 = 0;
+ $c2 = 0;
+
+ # odvisno ok checkboxa prikazujemo druge variable v isti tabeli ali v svoji
+ if ($this->sessionData['means']['meansSeperateTables'] == true || !isset($this->sessionData['means']['meansSeperateTables'])) {
+ #prikazujemo ločeno
+ if (is_array($variables2) && count($variables2) > 0) {
+ foreach ($variables2 AS $v_second) {
+ if (is_array($variables1) && count($variables1) > 0) {
+ foreach ($variables1 AS $v_first) {
+ $_means = $this->createMeans($v_first, $v_second);
+ if ($_means != null) {
+ $means[$c1][0] = $_means;
+ }
+ $c1++;
+ }
+ }
+ }
+ }
+ } else {
+ #prikazujemo v isti tabeli
+ if (is_array($variables2) && count($variables2) > 0) {
+ foreach ($variables2 AS $v_second) {
+ if (is_array($variables1) && count($variables1) > 0) {
+ foreach ($variables1 AS $v_first) {
+ $_means = $this->createMeans($v_first, $v_second);
+ if ($_means != null) {
+ $means[$c1][$c2] = $_means;
+ }
+ $c2++;
+ }
+ }
+ $c1++;
+ $c2 = 0;
+ }
+ }
+ }
+
+ //ddd($means);
+ if (is_array($means) && count($means) > 0) {
+ $counter = 0;
+ foreach ($means AS $mean_sub_grup) {
+ echo($br);
+ $this->displayMeansTable($mean_sub_grup);
+ $br = '<br />';
+
+ // Zvezdica za vkljucitev v porocilo
+ $spr2 = $mean_sub_grup[0]['v1']['seq'] . '-' . $mean_sub_grup[0]['v1']['spr'] . '-' . $mean_sub_grup[0]['v1']['grd'];
+ $spr1 = $mean_sub_grup[0]['v2']['seq'] . '-' . $mean_sub_grup[0]['v2']['spr'] . '-' . $mean_sub_grup[0]['v2']['grd'];
+ SurveyAnalysis::Init($this->anketa);
+ SurveyAnalysis::addCustomReportElement($type = 6, $sub_type = 0, $spr1, $spr2);
+
+ // Izrisemo graf za tabelo - zaenkrat samo admin
+ if ($this->sessionData['mean_charts']['showChart'] && $_GET['m'] != 'analysis_creport') {
+ $tableChart = new SurveyTableChart($this->anketa, $this, 'mean', $counter);
+ $tableChart->display();
+ }
+
+ $counter++;
+ }
+ }
+
+ } else {
+ # dropdowni niso izbrani
+ }
+
+
+ if ($this->aliImaPravicoDoPrikazaOdprtihOdgovorov()) {
+ echo '<div id="div_odprto_vprasanje">';
+
+ foreach ($this->_HEADERS AS $skey => $spremenljivka) {
+ if ($spremenljivka['tip'] == 21) {
+ if ($spremenljivka['cnt_all'] == 1) {
+ // če je enodimenzionalna prikažemo kot frekvence
+ // predvsem zaradi vprašanj tipa: language, email...
+
+ $this->izrisiOdprteOdgovoreZaUcitelja($skey, $spremenljivka);
+// $this->sumTextVertical($skey, 'sums');
+//
+ } else {
+ SurveyAnalysis::sumMultiText($skey, 'sums');
+ }
+ }
+ }
+
+ echo '</div>';
+ }
+ }
+
+ /**
+ * Preverimo, če je res učitelj in če ima pravico do odprtih odgovorov
+ *
+ * @return boolean
+ */
+ public function aliImaPravicoDoPrikazaOdprtihOdgovorov()
+ {
+ global $global_user_id;
+
+ // Pridobimo max število nivojev
+ $max_st = (new \Hierarhija\Model\HierarhijaOnlyQuery())->getRavni($this->anketa, 'MAX(level) AS max_level')->fetch_object()->max_level;
+
+ $struktura = sisplet_query("SELECT s.level AS level FROM srv_hierarhija_struktura_users AS u LEFT JOIN srv_hierarhija_struktura AS s ON s.id=u.hierarhija_struktura_id WHERE s.anketa_id='" . $this->anketa . "' AND u.user_id='" . $global_user_id . "'", "obj");
+
+ if (is_array($struktura) && $struktura[0]->level == $max_st || $struktura->level == $max_st)
+ return true;
+
+ return false;
+ }
+
+ /*
+ * Pridobimo strukture za učitelja na vseh nivojih
+ */
+ public function posodobiPodatkeZaUcitelja($user_id = null)
+ {
+ if (empty($_POST['user_id']) && is_null($user_id))
+ return null;
+
+ if (is_null($user_id))
+ $user_id = $_POST['user_id'];
+
+ // Pridobimo uporabnika za vse njegove predmete
+ $vsi_predmeti_uporabnika = (new \Hierarhija\Model\HierarhijaOnlyQuery())->queryStrukturaUsers($this->anketa, ' AND hs.level=(SELECT MAX(level) FROM srv_hierarhija_struktura WHERE anketa_id=' . $this->anketa . ') AND users.id="' . $user_id . '"');
+
+ $struktura_ids = [];
+ while ($row = $vsi_predmeti_uporabnika->fetch_object()) {
+ $struktura_ids[] = $row->id;
+ }
+
+ // Pridobimo vse šifrante od učitelja navzgor - celo strukturo
+ $this->struktura_ucitelj = [];
+ foreach ($struktura_ids as $struktura_id) {
+ $struktura_baza = \Hierarhija\Model\HierarhijaQuery::posodobiSifranteVrednostiGledeNaTrenutenIdStrukture($struktura_id);
+
+ foreach ($struktura_baza as $key => $row) {
+ // $struktura_id - je ID strukture na kateremse nahaja učitelj
+ // $key - je level na katerem je šifrant
+ // $row['id_sifranta'] - je ID sifranta kateri je na tem nivoju
+ $this->struktura_ucitelj[$struktura_id][$key]['sifrant'] = $row['id_sifranta'];
+
+ // Šifrant preverimo glede na vrstni red
+ $this->struktura_ucitelj[$struktura_id][$key]['stevilka'] = $this->pridobiStZaSpecificniSifrant($row['hierarhija_ravni_id'], $row['id_sifranta']);
+ }
+ }
+
+ // Filtriranje po učitelju
+ if (isset($this->struktura_ucitelj) && sizeof($this->struktura_ucitelj) > 0)
+ $this->sessionData['means']['strukturaUcitelj'] = $this->struktura_ucitelj;
+
+ // Shranimo spremenjene nastavitve v bazo
+ SurveyUserSession::saveData($this->sessionData);
+
+ return $this->struktura_ucitelj;
+ }
+
+ /*
+* Pridobimo strukture za učitelja na vseh nivojih
+*/
+ public function posodobiIzbranPredmet()
+ {
+ if (empty($_POST['strukutra_id']))
+ return null;
+
+ $struktura_id = $_POST['strukutra_id'];
+
+ // Pridobimo vse šifrante od učitelja navzgor - celo strukturo
+ $this->struktura_ucitelj = [];
+
+ $struktura_baza = \Hierarhija\Model\HierarhijaQuery::posodobiSifranteVrednostiGledeNaTrenutenIdStrukture($struktura_id);
+
+
+ foreach ($struktura_baza as $key => $row) {
+ // $struktura_id - je ID strukture na kateremse nahaja učitelj
+ // $key - je level na katerem je šifrant
+ // $row['id_sifranta'] - je ID sifranta kateri je na tem nivoju
+ $this->struktura_ucitelj[$struktura_id][$key]['sifrant'] = $row['id_sifranta'];
+
+ // Šifrant preverimo glede na vrstni red
+ $this->struktura_ucitelj[$struktura_id][$key]['stevilka'] = $this->pridobiStZaSpecificniSifrant($row['hierarhija_ravni_id'], $row['id_sifranta']);
+ }
+
+
+ // Filtriranje po učitelju
+ if (isset($this->struktura_ucitelj) && sizeof($this->struktura_ucitelj) > 0){
+ $this->sessionData['means']['strukturaUcitelj'] = $this->struktura_ucitelj;
+
+ $user = sisplet_query("SELECT user_id FROM srv_hierarhija_struktura_users WHERE hierarhija_struktura_id='".$struktura_id."'", "obj")->user_id;
+
+ $this->sessionData['means']['imeHierarhije'] = \Hierarhija\HierarhijaHelper::hierarhijaPrikazNaslovovpriUrlju($this->anketa, $struktura_id, $user);
+ }
+
+ // Shranimo spremenjene nastavitve v bazo
+ SurveyUserSession::saveData($this->sessionData);
+
+
+ echo $this->sessionData['means']['imeHierarhije'];
+ }
+
+ /**
+ * Posodobimo seznam filtrov za učitelja ali so samo učitelji ali so izlistani po predmetih:
+ */
+ public function posodobiSeznamFiltrovUcitelja(){
+ $this->sessionData['means']['uciteljFilter'] = (!empty($_POST['vrsta']) ? $_POST['vrsta'] : 'agregirano');
+
+ unset($this->sessionData['means']['imeHierarhije']);
+
+ SurveyUserSession::saveData($this->sessionData);
+
+ }
+
+ /**
+ * Pobrišemo filter učitljev ali hierarhije, odvisno kaj je bilo izbrano
+ *
+ * @return bool
+ */
+ public function pobrisiFilterUciteljevAliHierarhije()
+ {
+ if (empty($_POST['vrsta']))
+ return null;
+
+ $vrsta = $_POST['vrsta'];
+
+ if ($vrsta == 'ucitelji') {
+ $this->struktura = [];
+ $this->sessionData['means']['strukturaUcitelj'] = [];
+ unset($this->sessionData['means']['filterHierarhija']);
+ }
+
+ if ($vrsta == 'filtri') {
+ $this->struktura_ucitelj = null;
+ unset($this->sessionData['means']['strukturaUcitelj']);
+ }
+
+ SurveyUserSession::saveData($this->sessionData);
+ }
+
+ /**
+ * Pridobimo vrstni red šifranta iz tabele srv_hierarhija_sifranti
+ *
+ * @param int $sifrant_id
+ * @return int
+ */
+ private function pridobiStZaSpecificniSifrant($ravni_id, $sifrant_id)
+ {
+ if (!is_numeric($sifrant_id) || !is_numeric($sifrant_id))
+ return null;
+
+ $sql = sisplet_query("SELECT id, ime FROM srv_hierarhija_sifranti WHERE hierarhija_ravni_id='" . $ravni_id . "' ORDER BY ime", "obj");
+
+ $st = 0;
+ foreach ($sql as $row) {
+ $st++;
+ if ($row->id == $sifrant_id)
+ break;
+ }
+
+ return $st;
+ }
+
+ static public $textAnswersMore = array('0' => '10', '10' => '30', '30' => '300', '300' => '600', '600' => '900', '900' => '100000');
+
+ static function getNumRecords()
+ {
+ if (isset($_POST['num_records']) && (int)$_POST['num_records'] > 0) {
+ $result = (int)self::$textAnswersMore[$_POST['num_records']];
+ } else {
+ $result = (int)SurveyDataSettingProfiles:: getSetting('numOpenAnswers');
+ }
+ return $result;
+ }
+
+ /**
+ * Izriši odprrte odgovore za specifičnega učitelja
+ *
+ * @param int $variable - ID vpršanja, ki se nahaja v $_HEADERS
+ * @param array $data
+ * @return html
+ */
+ public function izrisiOdprteOdgovoreZaUcitelja($variable, $data)
+ {
+ global $site_path;
+ global $global_user_id;
+
+ if (!is_array($data))
+ return null;
+
+
+ $polje_v_datoteki = '$' . $data['sequences'];
+// $filter_za_specificno_anketo = $this->filterHierarhijeZaSpecificnegaUciteljaIzDatoteke();
+
+ // V sejo shranimo vse strukture, ki ima dotični učitelj
+ $this->posodobiPodatkeZaUcitelja($global_user_id);
+
+ if (!empty($this->sessionData['means']['strukturaUcitelj'][$this->sessionData['means']['struktura']])) {
+ $ucitelj_filter = '&& (';
+ $ostali_fitri = false;
+ foreach ($this->sessionData['means']['strukturaUcitelj'][$this->sessionData['means']['struktura']] as $key => $struktura) {
+
+ $ucitelj_filter .= ($ostali_fitri ? ' && ' : null);
+ $ucitelj_filter .= '($1' . $key . ' == ' . $struktura['stevilka'] . ')';
+ $ostali_fitri = true;
+ }
+ $ucitelj_filter .= ')';
+ }
+
+
+ if (is_null($ucitelj_filter))
+ return null;
+
+ # začasna datoteka za hierarhijo odprti odgovori
+ $folder = $site_path . EXPORT_FOLDER . '/';
+ $tmp_file = $folder . 'tmp_hierarhija_' . $this->anketa . '.tmp';
+
+
+ // Na začetku datoteke dodamo <?php
+ $file_handler = fopen($tmp_file, "w+");
+ fwrite($file_handler, "<?php\n");
+ fclose($file_handler);
+
+ $commandHierarhija = 'awk -F"|" \'BEGIN {{OFS=""} {ORS="\n"}} 1 ' . $ucitelj_filter . ' { print "$odprtiOdgovori[\x27",' . $variable . ',"\x27][]=\x27",' . $polje_v_datoteki . ',"\x27;"}\' ' . $this->dataFileName . ' >> ' . $tmp_file;
+ shell_exec($commandHierarhija);
+
+ // Na koncu datoteke dodamo zaključek php dokumenta
+ $file_handler = fopen($tmp_file, "a");
+ fwrite($file_handler, '?>');
+ fclose($file_handler);
+
+ include($tmp_file);
+
+ if (file_exists($tmp_file))
+ unlink($tmp_file);
+
+ return $this->izrisiHtmlTabeloZaOdprtOdgovor($odprtiOdgovori);
+
+ }
+
+ /**
+ * Izrišemo tabelo za odprt odgovor
+ *
+ * @param array $odprtiOdgovori
+ * @return html
+ */
+ private function izrisiHtmlTabeloZaOdprtOdgovor($odprtiOdgovori)
+ {
+ foreach ($odprtiOdgovori as $keyVprasanja => $tabela) {
+ $vprasanje = $this->_HEADERS[$keyVprasanja . '_0'];
+
+ echo '<table class="anl_tbl anl_bt anl_br tbl_clps">
+ <tbody>
+ <tr>
+ <td class="anl_bl anl_br anl_bb anl_ac anl_bck_freq_1 anl_w110">
+ <span class="spaceLeft anl_variabla">' . $vprasanje['variable'] . '</span>
+ </td>
+ <td class="anl_br anl_bb anl_al anl_bck_freq_1" colspan="3">
+ <span class="anl_variabla_label">' . $vprasanje['naslov'] . '</span>
+ </td>
+ </tr>
+ <tr>
+ <td class="anl_bl anl_br anl_bb anl_ac anl_bck anl_w110"></td>
+ <td class="anl_br anl_bb anl_ac anl_bck anl_variabla_line">Odgovori</td>
+ <td class="anl_br anl_bb anl_ac anl_bck anl_w70 anl_variabla_line">Frekvenca</td>
+ </tr>';
+ $st = 0;
+ foreach ($tabela as $keyOdgovor => $odgovori) {
+ if (!is_numeric($odgovori) && is_string($odgovori)) {
+ $st++;
+ echo '<tr id="' . $keyVprasanja . '_0_20_' . $keyOdgovor . '" name="valid_row_20">
+ <td class="anl_bl anl_ac anl_br gray">&nbsp;</td>
+ <td class="anl_br anl_bck_0_0">
+ <div class="anl_user_text_more">' . $odgovori . '</div>
+ </td>
+ <td class="anl_ac anl_br anl_bck_0_0">1</td>
+ </tr>';
+ }
+ }
+ echo '<tr id="anl_click_missing_tr_15" class="anl_bb">
+ <td class="anl_bl anl_br anl_al gray anl_ti_20 anl_bck_text_1">
+ </td>
+ <td class="anl_br anl_al anl_ita red anl_bck_text_1">Skupaj</td>
+ <td class="anl_ita red anl_br anl_ac anl_bck_text_1">' . $st . '</td>
+ </tr>';
+ echo '</tbody>
+ </table>';
+ }
+ }
+
+
+ /** Izriše tekstovne odgovore v vertikalni obliki
+ *
+ * @param unknown_type $spid
+ */
+ public function sumTextVertical($spid, $_from)
+ {
+ global $lang;
+
+ # dajemo v bufer, da da ne prikazujemo vprašanj brez veljavnih odgovorov če imamo tako nastavljeno
+ $spremenljivka = $this->_HEADERS[$spid];
+ $_FREQUENCYS = SurveyAnalysis::getFrequencys();
+
+ # preverimo ali prikazujemo spremenljivko, glede na veljavne odgovore in nastavitev
+ // Izrisujemo naše odgovore
+ $only_valid = 0;
+ if (count($spremenljivka['grids']) > 0) {
+ foreach ($spremenljivka['grids'] AS $gid => $grid) {
+
+ # dodamo dodatne vrstice z albelami grida
+ if (count($grid['variables']) > 0)
+ foreach ($grid['variables'] AS $vid => $variable) {
+ $_sequence = $variable['sequence']; # id kolone z podatki v text datoteki
+ $only_valid += (int)$_FREQUENCYS[$_sequence]['validCnt'];
+ }
+
+ }
+ }
+
+ // V kolikor ni odgovorov potem nič ne izrisujemo
+ if (SurveyDataSettingProfiles:: getSetting('hideEmpty') == 1 && $only_valid == 0) {
+ return;
+ }
+
+ # dodamo opcijo kje izrisujemo legendo
+ # če je besedilo * in je samo ena kategorija je inline legd('da');enda false
+ $inline_legenda = ($this->_HEADERS[$spid]['cnt_all'] == 1 || in_array($spremenljivka['tip'], array(1, 8))) ? false : true;
+
+ # koliko zapisov prikažemo naenkrat
+ $num_show_records = self::getNumRecords();
+
+ $options = array('inline_legenda' => $inline_legenda, 'isTextAnswer' => false, 'isOtherAnswer' => false, 'num_show_records' => $num_show_records);
+
+// if (self :: $show_spid_div == true) {
+// echo '<div id="sum_'.$spid.'" loop="'.self::$_CURRENT_LOOP['cnt'].'" class="div_sum_variable div_analiza_holder">';
+// self::displaySpremenljivkaIcons($spid);
+// }
+ # tekst vprašanja
+ echo '<table class="anl_tbl anl_bt anl_br tbl_clps">';
+
+ // naslovna vrstica tabele
+ echo '<tr>';
+ #variabla
+ echo '<td class="anl_bl anl_br anl_bb anl_ac anl_bck_freq_1 anl_w110">';
+ echo '<span class="spaceLeft anl_variabla">';
+ echo $spremenljivka['variable'];
+ echo '</span>';
+ echo '</td>';
+
+ #odgovori
+ echo '<td class="anl_br anl_bb anl_al anl_bck_freq_1" colspan="5"><span class="anl_variabla_label">';
+ echo $spremenljivka['naslov'] . '</span>';
+ echo '</td>';
+ echo '</tr>';
+
+ // Druga vrstica glave pri odprtih odgovorih
+ echo '<tr>';
+ #variabla
+ echo '<td class="anl_bl anl_br anl_bb anl_ac anl_bck anl_w110">';
+ // echo self::showIcons($spid,$spremenljivka,$_from);
+ echo '</td>';
+
+ #odgovori
+ echo '<td class="anl_br anl_bb anl_ac anl_bck anl_variabla_line">' . $lang['srv_analiza_frekvence_titleAnswers'] . '</td>';
+ // if (self::$_SHOW_LEGENDA && $inline_legenda){
+ // echo '<td class="anl_br anl_bb anl_ac anl_bck anl_w70 anl_legend anl_variabla_line">'.$lang['srv_analiza_opisne_variable_expression'].'</td>';
+ // echo '<td class="anl_br anl_bb anl_ac anl_bck anl_w70 anl_legend anl_variabla_line">'.$lang['srv_analiza_opisne_variable_skala'].'</td>';
+ // }
+ echo '<td class="anl_br anl_bb anl_ac anl_bck anl_w70 anl_variabla_line">' . $lang['srv_analiza_frekvence_titleFrekvenca'] . '</td>';
+ echo '<td class="anl_br anl_bb anl_ac anl_bck anl_w70 anl_variabla_line">' . $lang['srv_analiza_frekvence_titleOdstotek'] . '</td>';
+ if ($this->_HEADERS[$spid]['show_valid_percent'] == true) {
+ echo '<td class="anl_br anl_bb anl_ac anl_bck anl_w70 anl_variabla_line">' . $lang['srv_analiza_frekvence_titleVeljavni'] . '</td>';
+ }
+ echo '<td class="anl_br anl_bb anl_ac anl_bck anl_w70 anl_variabla_line">' . $lang['srv_analiza_frekvence_titleKumulativa'] . '</td>';
+ echo '</tr>';
+ // end naslovne vrstice
+
+ // Prikažemo naše odgovore
+ $_answersOther = array();
+ $_grids_count = count($spremenljivka['grids']);
+
+ if ($_grids_count > 0)
+ foreach ($spremenljivka['grids'] AS $gid => $grid) {
+ $_variables_count = count($grid['variables']);
+ if ($_variables_count > 0)
+ foreach ($grid['variables'] AS $vid => $variable) {
+ $_sequence = $variable['sequence']; # id kolone z podatki
+
+ if ($variable['other'] != true) {
+ # dodamo dodatne vrstice z labelami grida
+ if ($_variables_count > 1) {
+ self::outputGridLabelVertical($gid, $grid, $vid, $variable, $spid, $options);
+ }
+
+ $counter = 0;
+ $_kumulativa = 0;
+
+ //self::$_FREQUENCYS[$_sequence]
+
+ if (count($_FREQUENCYS[$_sequence]['valid']) > 0) {
+ $_valid_answers = SurveyAnalysis::sortTextValidAnswers($spid, $variable, $_FREQUENCYS[$_sequence]['valid']);
+
+ foreach ($_valid_answers AS $vkey => $vAnswer) {
+ if ($counter < $num_show_records || self::$isArchive) {
+ if ($vAnswer['cnt'] > 0 || true) { # izpisujemo samo tiste ki nisno 0
+ $options['isTextAnswer'] = true;
+ $counter = SurveyAnalysis::outputValidAnswerVertical($counter, $vkey, $vAnswer, $_sequence, $spid, $_kumulativa, $options);
+ }
+ }
+ }
+ # izpišemo sumo veljavnih
+ $counter = SurveyAnalysis::outputSumaValidAnswerVertical($counter, $_sequence, $spid, $options);
+ }
+ if (count($_FREQUENCYS[$_sequence]['invalid']) > 0) {
+ foreach ($_FREQUENCYS[$_sequence]['invalid'] AS $ikey => $iAnswer) {
+ if ($iAnswer['cnt'] > 0) { # izpisujemo samo tiste ki nisno 0
+ $counter = SurveyAnalysis::outputInvalidAnswerVertical($counter, $ikey, $iAnswer, $_sequence, $spid, $options);
+ }
+ }
+ # izpišemo sumo veljavnih
+ $counter = SurveyAnalysis::outputSumaInvalidAnswerVertical($counter, $_sequence, $spid, $options);
+ }
+ #izpišemo še skupno sumo
+// $counter = self::outputSumaVertical($counter,$_sequence,$spid,$options);
+ } else {
+ $_answersOther[] = array('spid' => $spid, 'gid' => $gid, 'vid' => $vid, 'sequence' => $_sequence);
+ }
+ }
+ }
+
+ echo '</table>';
+ # izpišemo še tekstovne odgovore za polja drugo
+ if (count($_answersOther) > 0 && self::$_FILTRED_OTHER) {
+ foreach ($_answersOther AS $oAnswers) {
+ echo '<div class="div_other_text">';
+ SurveyAnalysis::outputOtherAnswers($oAnswers);
+ echo '</div>';
+ }
+ }
+
+// if (self :: $show_spid_div == true) {
+// echo '</div>';
+// echo '<br/>';
+// }
+
+ }
+
+ static function outputValidAnswerVertical($counter, $vkey, $vAnswer, $_sequence, $spid, &$_kumulativa, $_options = array())
+ {
+ global $lang;
+ # opcije
+
+ $options = array('isTextAnswer' => false, # ali je tekstovni odgovor
+ 'isOtherAnswer' => false, # ali je odgovor Drugo
+ 'inline_legenda' => true, # ali je legenda inline ali v headerju
+ );
+
+ foreach ($_options as $_oKey => $_option) {
+ $options[$_oKey] = $_option;
+ }
+ $cssBck = ' ' . self::$cssColors['0_' . ($counter & 1)];
+
+ $_valid = (self::$_FREQUENCYS[$_sequence]['validCnt'] > 0) ? 100 * $vAnswer['cnt'] / self::$_FREQUENCYS[$_sequence]['validCnt'] : 0;
+ $_percent = (self::$_FREQUENCYS[$_sequence]['allCnt'] > 0) ? 100 * $vAnswer['cnt'] / self::$_FREQUENCYS[$_sequence]['allCnt'] : 0;
+ $_kumulativa += $_valid;
+
+ # če smo v arhivih dodamovse odgovore vendar so nekateri skriti
+ if ($counter >= $options['num_show_records'] && self::$isArchive) {
+ $cssHide = ' class="displayNone"';
+ }
+ echo '<tr id="' . $spid . '_' . $_sequence . '_' . $counter . '" name="valid_row_' . $_sequence . '"' . (self::$enableInspect == true && (int)$vAnswer['cnt'] > 0 ? ' vkey="' . $vkey . '"' : '') . $cssHide . '>';
+ echo '<td class="anl_bl anl_ac anl_br gray">&nbsp;</td>';
+ echo '<td class="anl_br' . $cssBck . '">';
+ echo '<div class="anl_user_text_more">' . $vkey . '</div>';
+ echo(($options['isTextAnswer'] == false && (string)$vkey != $vAnswer['text']) ? ' (' . $vAnswer['text'] . ')' : '');
+ # if ( $counter+1 == $options['num_show_records'] && $options['num_show_records'] < count(self::$_FREQUENCYS[$_sequence]['valid'])) {
+ # echo '<div id="valid_row_togle_more_'.$_sequence.'" class="floatRight blue pointer anl_more" onclick="showHidenTextTable(\''.$spid.'\', \''.$options['num_show_records'].'\', \''.self::$_CURRENT_LOOP['cnt'].'\');return false;">'.$lang['srv_anl_more'].'</div>';
+ # }
+ echo '</td>';
+ if (self::$_SHOW_LEGENDA && $options['isOtherAnswer'] == false && $options['inline_legenda'] == true) {
+ echo '<td class="anl_ac anl_br' . $cssBck . '">&nbsp;</td>';
+ echo '<td class="anl_ac anl_br' . $cssBck . '">&nbsp;</td>';
+ }
+
+ echo '<td class="anl_ac anl_br' . $cssBck . (self::$enableInspect == true && $options['isOtherAnswer'] == false && (int)$vAnswer['cnt'] > 0 ? ' fr_inspect' : '') . '">';
+ echo (int)$vAnswer['cnt'];
+ echo '</td>';
+ echo '<td class="anl_ar anl_br' . $cssBck . ' anl_pr10">';
+ echo self::formatNumber($_percent, SurveyDataSettingProfiles:: getSetting('NUM_DIGIT_PERCENT'), '%');
+ echo '</td>';
+ if (self::$_HEADERS[$spid]['show_valid_percent']) {
+ echo '<td class="anl_ar anl_br' . $cssBck . ' anl_pr10">';
+ echo self::formatNumber($_valid, SurveyDataSettingProfiles:: getSetting('NUM_DIGIT_PERCENT'), '%');
+ echo '</td>';
+ }
+ echo '<td class="anl_ar' . $cssBck . ' anl_pr10">';
+ echo self::formatNumber($_kumulativa, SurveyDataSettingProfiles:: getSetting('NUM_DIGIT_PERCENT'), '%');
+
+ echo '</td>';
+ echo '</tr>';
+
+ # če mamo več
+ if ($counter + 1 == $options['num_show_records'] && $options['num_show_records'] < count(self::$_FREQUENCYS[$_sequence]['valid'])) {
+ if (self::$isArchive == false) {
+ echo '<tr id="' . $spid . '_' . $_sequence . '_' . $counter . '" name="valid_row_' . $_sequence . '" >';
+ echo '<td class="anl_bl anl_ac anl_br gray">&nbsp;</td>';
+ echo '<td class="anl_br' . $cssBck . '">';
+ // Pri javni povezavi drugace izpisemo
+ if (self::$printPreview == false) {
+ echo '<div id="valid_row_togle_more_' . $_sequence . '" class="floatLeft blue pointer anl_more" onclick="showHidenTextTable(\'' . $spid . '\', \'' . $options['num_show_records'] . '\', \'' . self::$_CURRENT_LOOP['cnt'] . '\');return false;">' . $lang['srv_anl_more'] . '</div>';
+ echo '<div id="valid_row_togle_more_' . $_sequence . '" class="floatRight blue pointer anl_more" onclick="showHidenTextTable(\'' . $spid . '\', \'' . $options['num_show_records'] . '\', \'' . self::$_CURRENT_LOOP['cnt'] . '\');return false;">' . $lang['srv_anl_more'] . '</div>';
+ } else {
+ echo '<div id="valid_row_togle_more_' . $_sequence . '" class="floatLeft anl_more">' . $lang['srv_anl_more'] . '</div>';
+ echo '<div id="valid_row_togle_more_' . $_sequence . '" class="floatRight anl_more">' . $lang['srv_anl_more'] . '</div>';
+ }
+ echo '</td>';
+ if (self::$_SHOW_LEGENDA && $options['isOtherAnswer'] == false && $options['inline_legenda'] == true) {
+ echo '<td class="anl_ac anl_br' . $cssBck . '">&nbsp;</td>';
+ echo '<td class="anl_ac anl_br' . $cssBck . '">&nbsp;</td>';
+ }
+ echo '<td class="anl_ac anl_br' . $cssBck . '">' . '</td>';
+ echo '<td class="anl_ar anl_br' . $cssBck . ' anl_pr10">' . '</td>';
+ if (self::$_HEADERS[$spid]['show_valid_percent']) {
+ echo '<td class="anl_ar anl_br' . $cssBck . ' anl_pr10">' . '</td>';
+ }
+ echo '<td class="anl_ar' . $cssBck . ' anl_pr10">' . '</td>';
+ echo '</tr>';
+ } else {
+ #v arhivie dodamo vse odgovore vendar so skriti
+ echo '<tr id="' . $spid . '_' . $_sequence . '_' . $counter . '" name="valid_row_' . $_sequence . '" >';
+ echo '<td class="anl_bl anl_ac anl_br gray">&nbsp;</td>';
+ echo '<td class="anl_br' . $cssBck . '">';
+ echo '<div id="valid_row_togle_more_' . $_sequence . '" class="floatLeft blue pointer" onclick="$(this).parent().parent().parent().find(\'tr.displayNone\').removeClass(\'displayNone\');$(this).parent().parent().addClass(\'displayNone\');return false;">' . $lang['srv_anl_all'] . '</div>';
+ echo '<div id="valid_row_togle_more_' . $_sequence . '" class="floatRight blue pointer" onclick="$(this).parent().parent().parent().find(\'tr.displayNone\').removeClass(\'displayNone\');$(this).parent().parent().addClass(\'displayNone\');return false;">' . $lang['srv_anl_all'] . '</div>';
+ echo '</td>';
+ if (self::$_SHOW_LEGENDA && $options['isOtherAnswer'] == false && $options['inline_legenda'] == true) {
+ echo '<td class="anl_ac anl_br' . $cssBck . '">&nbsp;</td>';
+ echo '<td class="anl_ac anl_br' . $cssBck . '">&nbsp;</td>';
+ }
+ echo '<td class="anl_ac anl_br' . $cssBck . '">' . '</td>';
+ echo '<td class="anl_ar anl_br' . $cssBck . ' anl_pr10">' . '</td>';
+ if (self::$_HEADERS[$spid]['show_valid_percent']) {
+ echo '<td class="anl_ar anl_br' . $cssBck . ' anl_pr10">' . '</td>';
+ }
+ echo '<td class="anl_ar' . $cssBck . ' anl_pr10">' . '</td>';
+ echo '</tr>';
+ }
+ }
+
+ $counter++;
+ return $counter;
+ }
+
+
+ // Izvoz pdf in rtf
+ function displayExport()
+ {
+
+ if ($this->isSelectedBothVariables()) {
+ $vars1 = $this->getSelectedVariables(1);
+ $vars2 = $this->getSelectedVariables(2);
+
+ $data1 = '';
+ $data2 = '';
+
+ foreach ($vars1 as $var1) {
+ $data1 .= implode(',', array_values($var1)) . ',';
+ }
+ $data1 = substr($data1, 0, -1);
+
+ foreach ($vars2 as $var2) {
+ $data2 .= implode(',', array_values($var2)) . ',';
+ }
+ $data2 = substr($data2, 0, -1);
+
+
+ $href_pdf = makeEncodedIzvozUrlString('izvoz.php?b=export&m=hierarhija_pdf_izpis&anketa=' . $this->anketa);
+// $href_rtf = 'index.php?anketa=' . $this->anketa . '&a=hierarhija_superadmin&m=analize&r=custom';
+ $href_rtf = makeEncodedIzvozUrlString('izvoz.php?b=export&m=hierarhija_rtf_izpis&anketa=' . $this->anketa);
+// $href_xls = makeEncodedIzvozUrlString('izvoz.php?b=export&m=mean_izpis_xls&anketa=' . $this->anketa);
+ echo '<script>';
+ # nastavimopravilne linke
+ echo '$("#secondNavigation_links a#meansDoPdf").attr("href", "' . $href_pdf . '");';
+ echo '$("#secondNavigation_links a#meansDoRtf").attr("href", "' . $href_rtf . '");';
+// echo '$("#secondNavigation_links a#meansDoXls").attr("href", "' . $href_xls . '");';
+ # prikažemo linke
+ echo '$("#hover_export_icon").removeClass("hidden");';
+ echo '$("#secondNavigation_links a").removeClass("hidden");';
+ echo '</script>';
+ }
+ }
+
+ public function setPostVars()
+ {
+ if (isset($_POST['sequence1']) && count($_POST['sequence1']) > 0) {
+ $i = 0;
+ if (is_array($_POST['sequence1']) && count($_POST['sequence1']) > 0) {
+ foreach ($_POST['sequence1'] AS $_seq1) {
+ $this->variabla1[$i]['seq'] = $_seq1;
+ $i++;
+ }
+ }
+ }
+ if (isset($_POST['spr1']) && count($_POST['spr1']) > 0) {
+ $i = 0;
+ if (is_array($_POST['spr1']) && count($_POST['spr1']) > 0) {
+ foreach ($_POST['spr1'] AS $_spr1) {
+ $this->variabla1[$i]['spr'] = $_spr1;
+ $i++;
+ }
+ }
+ }
+ if (isset($_POST['grid1']) && count($_POST['grid1']) > 0) {
+ $i = 0;
+ if (is_array($_POST['grid1']) && count($_POST['grid1']) > 0) {
+ foreach ($_POST['grid1'] AS $_grd1) {
+ $this->variabla1[$i]['grd'] = $_grd1;
+ $i++;
+ }
+ }
+ }
+
+ if (isset($_POST['sequence2']) && count($_POST['sequence2']) > 0) {
+ $i = 0;
+
+ if (is_array($_POST['sequence2']) && count($_POST['sequence2']) > 0) {
+
+ foreach ($_POST['sequence2'] AS $_seq2) {
+ $this->variabla2[$i]['seq'] = $_seq2;
+ $i++;
+ }
+ }
+ }
+ if (isset($_POST['spr2']) && count($_POST['spr2']) > 0) {
+ $i = 0;
+ if (is_array($_POST['spr2']) && count($_POST['spr2']) > 0) {
+ foreach ($_POST['spr2'] AS $_spr2) {
+ $this->variabla2[$i]['spr'] = $_spr2;
+ $i++;
+ }
+ }
+ }
+ if (isset($_POST['grid2']) && is_array($_POST['grid2']) && count($_POST['grid2']) > 0) {
+ $i = 0;
+ if (count($_POST['grid2']) > 0) {
+ foreach ($_POST['grid2'] AS $_grd2) {
+ $this->variabla2[$i]['grd'] = $_grd2;
+ $i++;
+ }
+ }
+ }
+
+ if (isset($_POST['filter_vrednosti']) && count($_POST['filter_vrednosti']) > 0) {
+ $this->filter_hierarhija = $_POST['filter_vrednosti'];
+ }
+
+ if (is_null($_POST['filter_vrednosti'])) {
+ $this->filter_hierarhija = array();
+ }
+
+ // Preverimo, če imamo strukturo za uporabnika in , če do sedaj ni bil izbran še noben filter, potem vedno izberemo vse iz danjega nivoja
+ $struktura_ucitelja = $this->hierarhijaUporabnika();
+
+ if (empty($this->sessionData['means']['filterHierarhija']) && $struktura_ucitelja != 'admin' && is_array($struktura_ucitelja)) {
+ $st_nivojev = sizeof($struktura_ucitelja);
+ $this->filter_hierarhija['nivo' . $st_nivojev] = $struktura_ucitelja[$st_nivojev];
+ }
+
+ # variable shranimo v sejo, da jih obdržimo tudi če spreminjamo nastavitve ali razne filtre analiz
+ if (isset($this->variabla1) && count($this->variabla1) > 0) {
+ $this->sessionData['means']['means_variables']['variabla1'] = $this->variabla1;
+ }
+ if (isset($this->variabla2) && count($this->variabla2) > 0) {
+ $this->sessionData['means']['means_variables']['variabla2'] = $this->variabla2;
+ }
+
+ // Filtriranje po šifrantih
+ if (isset($this->filter_hierarhija) && sizeof($this->filter_hierarhija) > 0) {
+ $this->sessionData['means']['filterHierarhija'] = $this->filter_hierarhija;
+ }
+
+ // Shranimo spremenjene nastavitve v bazo
+ SurveyUserSession::saveData($this->sessionData);
+ }
+
+
+ /**
+ * funkcija vrne seznam primern variabel za meanse
+ */
+ function getVariableList($dropdown)
+ {
+ if (isset($this->variablesList[$dropdown]) && is_array($this->variablesList[$dropdown]) && count($this->variablesList[$dropdown]) > 0) {
+ return $this->variablesList[$dropdown];
+ } else {
+ # pobrišemo array()
+ $this->variablesList = array();
+
+
+ # zloopamo skozi header in dodamo variable (potrebujemo posamezne sekvence)
+ foreach ($this->_HEADERS AS $skey => $spremenljivka) {
+ if ((int)$spremenljivka['hide_system'] == 1 && in_array($spremenljivka['variable'], array('email', 'ime', 'priimek', 'telefon', 'naziv', 'drugo'))) {
+ continue;
+ }
+
+ $tip = $spremenljivka['tip'];
+
+ $skala = (int)$spremenljivka['skala'];
+ # pri drugi, analizirani variabli morajo biti numerične ali ordinalne, v ostalem pa nič)
+ # skala - 0 Ordinalna
+ # skala - 1 Nominalna
+ $_dropdown_condition = $dropdown == 1
+ || ($dropdown == 2
+ && ($skala == 0 # ordinalna
+ || $tip == 7 # number
+ || $tip == 6
+ || $tip == 18 # vsota
+ || $tip == 20)) # multi number
+ ? true : false;
+
+ //V kolikor gre za prvi meni, potem notri dodamo samo vlogo, ki jo bomo naknadno skrili pri prikazu
+ if ((is_numeric($tip)
+ && $tip != 4 #text
+ && $tip != 5 #label
+ && $tip != 9 #SN-imena
+ && $tip != 22 #compute
+ && $_dropdown_condition # ali ustreza pogoju za meanse
+ && $dropdown != 1)
+ || (is_numeric($tip)
+ && $tip == 1
+ && $dropdown == 1)
+ ) {
+
+ $cnt_all = (int)$spremenljivka['cnt_all'];
+ # radio in select in checkbox
+ if ($cnt_all == '1' || $tip == 1 || $tip == 3 || $tip == 2) {
+
+
+ # pri tipu radio ali select dodamo tisto variablo ki ni polje "drugo"
+ if (($tip == 1 || $tip == 3)) {
+ if (count($spremenljivka['grids']) == 1) {
+
+ # če imamo samo en grid ( lahko je več variabel zaradi polja drugo.
+ $grid = $spremenljivka['grids'][0];
+ if (count($grid['variables']) > 0) {
+ foreach ($grid['variables'] AS $vid => $variable) {
+
+ //Tukaj zapišemo, samo če gre za vlogo, ker bomo delali anlize po teh vrednostih
+ if (($variable['other'] != 1 && $dropdown == 2) || ($variable['variable'] == 'vloga' && $dropdown == 1)) {
+ # imampo samo eno sekvenco grids[0]variables[0]
+ $this->variablesList[$dropdown][] = array(
+ 'tip' => $tip,
+ 'spr_id' => $skey,
+ 'sequence' => $spremenljivka['grids'][0]['variables'][$vid]['sequence'],
+ 'variableNaslov' => '(' . $spremenljivka['variable'] . ')&nbsp;' . strip_tags($spremenljivka['naslov']),
+ 'canChoose' => true,
+ 'sub' => 0);
+
+ }
+
+ }
+ }
+ }
+ } else if ($skala == 1 || true) { # ta pogoj skala == 1 je malo sumljiv. ne vem več zakaj je tako
+
+ # imampo samo eno sekvenco grids[0]variables[0]
+ $this->variablesList[$dropdown][] = array(
+ 'tip' => $tip,
+ 'spr_id' => $skey,
+ 'sequence' => $spremenljivka['grids'][0]['variables'][0]['sequence'],
+ 'variableNaslov' => '(' . $spremenljivka['variable'] . ')&nbsp;' . strip_tags($spremenljivka['naslov']),
+ 'canChoose' => true,
+ 'sub' => 0);
+ }
+ } else if ($cnt_all > 1) {
+
+ # imamo več skupin ali podskupin, zato zlopamo skozi gride in variable
+ if (count($spremenljivka['grids']) > 0) {
+ $this->variablesList[$dropdown][] = array(
+ 'tip' => $tip,
+
+ 'variableNaslov' => '(' . $spremenljivka['variable'] . ')&nbsp;' . strip_tags($spremenljivka['naslov']),
+ 'canChoose' => false,
+ 'sub' => 0);
+ # ali imamo en grid, ali več (tabele
+ if (count($spremenljivka['grids']) == 1) {
+ # če imamo samo en grid ( lahko je več variabel zaradi polja drugo.
+ $grid = $spremenljivka['grids'][0];
+ if (count($grid['variables']) > 0) {
+ foreach ($grid['variables'] AS $vid => $variable) {
+ if ($variable['other'] != 1) {
+ $this->variablesList[$dropdown][] = array(
+ 'tip' => $tip,
+ 'spr_id' => $skey,
+ 'sequence' => $variable['sequence'],
+ 'variableNaslov' => '(' . $variable['variable'] . ')&nbsp;' . strip_tags($variable['naslov']),
+ 'canChoose' => true,
+ 'sub' => 1);
+ }
+ }
+ }
+
+ } else if ($tip == 16 || $tip == 18) {
+ # imamo multicheckbox
+ foreach ($spremenljivka['grids'] AS $gid => $grid) {
+ $sub = 0;
+ if ($grid['variable'] != '') {
+ $sub++;
+ $this->variablesList[$dropdown][] = array(
+ 'tip' => $tip,
+ 'spr_id' => $skey,
+ 'grd_id' => $gid,
+ 'sequence' => $grid['variables'][0]['sequence'],
+ 'variableNaslov' => '(' . $grid['variable'] . ')&nbsp;' . strip_tags($grid['naslov']),
+ 'canChoose' => true,
+ 'sub' => 1);
+ }
+ }
+ } else {
+ # imamo več gridov - tabele
+ foreach ($spremenljivka['grids'] AS $gid => $grid) {
+ $sub = 0;
+ if ($grid['variable'] != '') {
+ $sub++;
+ $this->variablesList[$dropdown][] = array(
+ 'tip' => $tip,
+ 'variableNaslov' => '(' . $grid['variable'] . ')&nbsp;' . strip_tags($grid['naslov']),
+ 'canChoose' => false,
+ 'sub' => $sub);
+ }
+ if (count($grid['variables']) > 0) {
+ $sub++;
+ foreach ($grid['variables'] AS $vid => $variable) {
+ if ($variable['other'] != 1) {
+ $this->variablesList[$dropdown][] = array(
+ 'tip' => $tip,
+ 'spr_id' => $skey,
+ 'sequence' => $variable['sequence'],
+ 'variableNaslov' => '(' . $variable['variable'] . ')&nbsp;' . strip_tags($variable['naslov']),
+ 'canChoose' => true,
+ 'sub' => $sub);
+ }
+ }
+ }
+ }
+ }
+
+ }
+ }
+ }
+ }
+ return $this->variablesList[$dropdown];
+ }
+ }
+
+ function isSelectedBothVariables()
+ {
+ $selected1 = false;
+ $selected2 = false;
+ if (count($this->variabla1)) {
+ foreach ($this->variabla1 AS $var1) {
+ if ((int)$var1['seq'] > 0) {
+ $selected1 = true;
+ }
+ }
+ }
+ if (count($this->variabla2)) {
+ foreach ($this->variabla2 AS $var2) {
+ if ((int)$var2['seq'] > 0) {
+ $selected2 = true;
+ }
+ }
+ }
+
+ return ($selected1 && $selected2);
+ }
+
+
+ function getSelectedVariables($which = 1)
+ {
+ $selected = array();
+ if ($which == 1) {
+ if (count($this->variabla1) > 0) {
+ foreach ($this->variabla1 AS $var1) {
+ if ((int)$var1['seq'] > 0) {
+ $selected[] = $var1;
+ }
+ }
+ }
+ } else {
+ if (count($this->variabla2) > 0) {
+ foreach ($this->variabla2 AS $var2) {
+ if ((int)$var2['seq'] > 0) {
+ $selected[] = $var2;
+ }
+ }
+ }
+ }
+
+ return count($selected) > 0 ? $selected : null;
+ }
+
+
+ public function createMeans($v_first, $v_second)
+ {
+ global $site_path;
+
+ $folder = $site_path . EXPORT_FOLDER . '/';
+
+ if ($this->dataFileName != '' && file_exists($this->dataFileName)) {
+
+ $spr1 = $this->_HEADERS[$v_first['spr']];
+ $spr2 = $this->_HEADERS[$v_second['spr']];
+
+ $grid1 = $spr1['grids'][$v_first['grd']];
+ $grid2 = $spr2['grids'][$v_second['grd']];
+
+ $sequence1 = $v_first['seq'];
+ $sequence2 = $v_second['seq'];
+
+ # za checkboxe gledamo samo odgovore ki so bili 1 in za vse opcije
+ $sekvences1 = array();
+ $sekvences2 = array();
+ $spr_1_checkbox = false;
+ $spr_2_checkbox = false;
+
+ if ($spr1['tip'] == 2 || $spr1['tip'] == 16) {
+ $spr_1_checkbox = true;
+ if ($spr1['tip'] == 2) {
+ $sekvences1 = explode('_', $spr1['sequences']);
+ }
+ if ($spr1['tip'] == 16) {
+
+ foreach ($grid1['variables'] AS $_variables) {
+ $sekvences1[] = $_variables['sequence'];
+ }
+ }
+ } else {
+ $sekvences1[] = $sequence1;
+ }
+
+ if ($spr2['tip'] == 2 || $spr2['tip'] == 16) {
+ $spr_2_checkbox = true;
+ if ($spr2['tip'] == 2) {
+ $sekvences2 = explode('_', $this->_HEADERS[$v_second['spr']]['sequences']);
+ }
+ if ($spr2['tip'] == 16) {
+ foreach ($grid2['variables'] AS $_variables) {
+ $sekvences2[] = $_variables['sequence'];
+ }
+ }
+ } else {
+ $sekvences2[] = $sequence2;
+ }
+
+ # pogoji so že dodani v _CURRENT_STATUS_FILTER
+
+ # dodamo filter za loop-e
+ if (isset($this->_CURRENT_LOOP['filter']) && $this->_CURRENT_LOOP['filter'] != '') {
+ $status_filter = $this->_CURRENT_STATUS_FILTER . ' && ' . $this->_CURRENT_LOOP['filter'];
+ } else {
+ $status_filter = $this->_CURRENT_STATUS_FILTER;
+ }
+
+
+ # dodamo status filter za vse sekvence checkbox-a da so == 1
+ if ($additional_status_filter != null) {
+ $status_filter .= $additional_status_filter;
+ }
+
+ # odstranimo vse zapise, kjer katerakoli od variabel vsebuje missing
+ $_allMissing_answers = SurveyMissingValues::GetMissingValuesForSurvey(array(1, 2, 3));
+ $_pageMissing_answers = $this->getInvalidAnswers(MISSING_TYPE_CROSSTAB);
+ # polovimo obe sequenci
+ $tmp_file = $folder . 'tmp_means_' . $this->anketa . '.tmp';
+
+ // Na začetku datoteke dodamo <?php
+ $file_handler = fopen($tmp_file, "w");
+ fwrite($file_handler, "<?php\n");
+ fclose($file_handler);
+
+ if (count($sekvences1) > 0)
+ foreach ($sekvences1 AS $sequence1) {
+ if (count($sekvences2) > 0)
+ foreach ($sekvences2 AS $sequence2) {
+ #skreira variable: $meansArray
+ $additional_filter = '';
+ if ($spr_1_checkbox == true) {
+ $_seq_1_text = '' . $sequence1;
+
+ # pri checkboxih gledamo samo kjer je 1 ( ne more bit missing)
+ $additional_filter = ' && ($' . $sequence1 . ' == 1)';
+ } else {
+ $_seq_1_text = '$' . $sequence1;
+
+ # dodamo še pogoj za missinge
+ foreach ($_pageMissing_answers AS $m_key1 => $missing1) {
+ $additional_filter .= ' && ($' . $sequence1 . ' != ' . $m_key1 . ')';
+ }
+ }
+
+ if ($spr_2_checkbox == true) {
+ $_seq_2_text = '' . $sequence2;
+
+ # pri checkboxih gledamo samo kjer je 1 ( ne more bit missing)
+ $additional_filter .= ' && ($' . $sequence2 . ' == 1)';
+ } else {
+ $_seq_2_text = '$' . $sequence2;
+
+ # dodamo še pogoj za missinge
+ foreach ($_pageMissing_answers AS $m_key2 => $missing2) {
+ $additional_filter .= ' && ($' . $sequence2 . ' != ' . $m_key2 . ')';
+ }
+ }
+
+ # V kolikor smo izbrali filtre potem prikažemo samo ustrezne rezultate glede na filtre
+ ## Postavimo filter za hierarhijo na null
+ $hierarhija_filter = $this->filterHierarhijeIzTekstovneDatoteke();
+
+ // V kolikor imamo filter po učiteljih
+ $ucitelj_filter = $this->filterHierarhijeZaSpecificnegaUciteljaIzDatoteke();
+
+ if (IS_WINDOWS) {
+ $command = 'awk -F"|" "BEGIN {{OFS=\"\"} {ORS=\"\n\"}} ' . $status_filter . $additional_filter . (!empty($ucitelj_filter) ? $ucitelj_filter : $hierarhija_filter) . ' { print \"$meansArray[\x27\",' . $_seq_2_text . ',\"\x27][\x27\",' . $_seq_1_text . ',\"\x27]++;\"}" ' . $this->dataFileName . ' >> ' . $tmp_file;
+ } else {
+ $command = 'awk -F"|" \'BEGIN {{OFS=""} {ORS="\n"}} ' . $status_filter . $additional_filter . (!empty($ucitelj_filter) ? $ucitelj_filter : $hierarhija_filter) . ' { print "$meansArray[\x27",' . $_seq_2_text . ',"\x27][\x27",' . $_seq_1_text . ',"\x27]++;"}\' ' . $this->dataFileName . ' >> ' . $tmp_file;
+ }
+ $out = shell_exec($command);
+
+ }
+
+ }
+
+ // Na koncu datoteke dodamo zaključek php dokumenta
+ $file_handler = fopen($tmp_file, "a");
+ fwrite($file_handler, '?>');
+ fclose($file_handler);
+
+ include($tmp_file);
+
+ if (file_exists($tmp_file)) {
+ unlink($tmp_file);
+ }
+
+ # izračunamo povprečja
+ $means = array();
+ $max_vrednost = array();
+ $min_vrednost = array();
+ $sumMin = null;
+ $sumMax = null;
+ $sumStdDeviation = null;
+ $_tmp_sumaMeans = 0;
+ $sum_std_dev = array();
+ if (is_array($meansArray) && count($meansArray) > 0) {
+ foreach ($meansArray AS $f_key => $first) {
+ $tmp_sum = 0;
+ $tmp_cnt = 0;
+ $min = null;
+ $max = null;
+
+ //$s_key je vrednost odgovora in zato vzamemo min in max
+ foreach ($first AS $s_key => $second) {
+ # preverimo da je vse numeric
+ if (is_numeric($s_key) && is_numeric($second)) {
+ $tmp_sum = $tmp_sum + ($s_key * $second);
+ $tmp_cnt = $tmp_cnt + $second;
+ }
+
+ if (is_null($min) || $min > $s_key)
+ $min = $s_key;
+
+ if (is_null($max) || $max < $s_key)
+ $max = $s_key;
+
+ if (is_null($sumMin) || $sumMin > $s_key)
+ $sumMin = $s_key;
+
+ if (is_null($sumMax) || $sumMax < $s_key)
+ $sumMax = $s_key;
+ }
+
+
+ $_tmp_sumaMeans += $tmp_sum;
+ $key = $f_key;
+ if ($tmp_cnt != 0) {
+ $means[$key] = bcdiv($tmp_sum, $tmp_cnt, 3);
+ } else {
+ $means[$key] = bcdiv(0, 1, 3);
+ }
+
+ //računamo še standardno deviacijo
+ $st_rezultatov = 0;
+ $std_dev = [];
+ $polje = [];
+ foreach ($first AS $s_key => $second) {
+ # preverimo da je vse numeric
+ if (is_numeric($s_key) && is_numeric($second)) {
+ $std_vmesna = pow(($s_key - $means[$key]), 2);
+ $std_dev[] = $std_vmesna * $second;
+ $st_rezultatov = $st_rezultatov + $second;
+ }
+ }
+
+ //Prevzeto je standardna deviacija 0, ker pri učiteljih imamo samo 1 rezltat in ne moremo računati po njem
+ $std_deviacija[$key] = 0;
+
+ //izračunamo standardno diviacio za učence
+ if (array_sum($std_dev) > 0)
+ $std_deviacija[$key] = sqrt((array_sum($std_dev) / ($st_rezultatov - 1)));
+
+
+ //Vpišemo min in max vrednost za sledeče vprašanje
+ $max_vrednost[$key] = $max;
+ $min_vrednost[$key] = $min;
+
+ }
+
+ }
+
+
+ # inicializacija
+ $_all_options = array();
+ $sumaVrstica = array();
+ $sumaSkupna = 0;
+ $sumaMeans = 0;
+
+ # poiščemo pripadajočo spremenljivko
+ $var_options = $this->_HEADERS[$v_second['spr']]['options'];
+
+ # najprej poiščemo (združimo) vse opcije ki so definirane kot opcije spremenljivke in vse ki so v meansih
+ if (count($var_options) > 0 && $spr_2_checkbox !== true) {
+ foreach ($var_options as $okey => $opt) {
+ $_all_options[$okey] = array('naslov' => $opt, 'type' => 'o');
+ }
+ }
+
+ # za checkboxe dodamo posebej vse opcije
+ if ($spr_2_checkbox == true) {
+ if ($spr2['tip'] == 2) {
+ $grid2 = $this->_HEADERS[$v_second['spr']]['grids']['0'];
+ }
+
+ foreach ($grid2['variables'] As $vkey => $variable) {
+ if ($variable['other'] != 1) {
+ $_all_options[$variable['sequence']] = array('naslov' => $variable['naslov'], 'type' => 'o', 'vr_id' => $variable['variable']);
+ }
+ }
+ }
+
+ # dodamo odgovore iz baze ki niso missingi
+ if (count($meansArray) > 0) {
+ foreach ($meansArray AS $_kvar1 => $_var1) {
+ # missingov ne dodajamo še zdaj, da ohranimo pravilen vrstni red
+ foreach ($_var1 AS $_kvar2 => $_var2) {
+ if (!isset($_allMissing_answers[$_kvar1]) || (isset($_allMissing_answers[$_kvar1]) && isset($_pageMissing_answers[$_kvar1]))) {
+ $sumaVrstica[$_kvar1] += $_var2;
+ }
+ }
+ # missingov ne dodajamo še zdaj, da ohranimo pravilen vrstni red
+ if (!isset($_allMissing_answers[$_kvar1]) && !isset($_all_options[$_kvar1])) {
+ $_all_options[$_kvar1] = array('naslov' => $_kvar1, 'type' => 't');
+ }
+
+ }
+ }
+ # dodamo še missinge, samo tiste ki so izbrani z profilom
+ foreach ($_allMissing_answers AS $miskey => $_missing) {
+ if (!isset($_pageMissing_answers[$miskey])) {
+ if ($spr_2_checkbox !== true) {
+ $_all_options[$miskey] = array('naslov' => $_missing, 'type' => 'm');
+ }
+ }
+ }
+ $sumaSkupna = array_sum($sumaVrstica);
+ $sumaMeans = ($sumaSkupna > 0) ? $_tmp_sumaMeans / $sumaSkupna : 0;;
+
+ # če lovimo po enotah, moramo skupne enote za vsako kolono(vrstico) izračunati posebej
+ if ($this->crossNavVsEno == 1) {
+ $sumaSkupna = 0;
+ $sumaVrstica = array();
+
+ # sestavimo filtre za posamezno variablo da ni missing
+ if (count($sekvences1) > 0) {
+ $spr1_addFilter = '';
+
+ foreach ($sekvences1 AS $sequence1) {
+ # dodamo še pogoj za missinge
+ foreach ($_pageMissing_answers AS $m_key1 => $missing1) {
+ $spr1_addFilter .= ' && ($' . $sequence1 . ' != ' . $m_key1 . ')';
+ }
+ }
+ }
+ if (count($sekvences2) > 0) {
+ $spr2_addFilter = '';
+
+ foreach ($sekvences2 AS $sequence2) {
+ # dodamo še pogoj za missinge
+ foreach ($_pageMissing_answers AS $m_key2 => $missing2) {
+ $spr2_addFilter .= ' && ($' . $sequence2 . ' != ' . $m_key2 . ')';
+ }
+ }
+ }
+
+ # polovimo obe sequenci
+ $tmp_file = $folder . 'tmp_means_' . $this->anketa . '.TMP';
+
+
+ $file_handler = fopen($tmp_file, "w");
+ fwrite($file_handler, "<?php\n");
+
+ fclose($file_handler);
+
+ # preštejemo vse veljavne enote (nobena vrednost ne sme bit missing)
+ if (IS_WINDOWS) {
+ $command_all = 'awk -F"|" "BEGIN {{OFS=\"\"} {ORS=\"\n\"}} ' . $status_filter . $spr1_addFilter . $spr2_addFilter . ' { print \"$sumaSkupna++;\"}" ' . $this->dataFileName . ' >> ' . $tmp_file;
+ } else {
+ $command_all = 'awk -F"|" \'BEGIN {{OFS=""} {ORS="\n"}} ' . $status_filter . $spr1_addFilter . $spr2_addFilter . ' { print "$sumaSkupna++;"}\' ' . $this->dataFileName . ' >> ' . $tmp_file;
+ }
+
+ $out_all = shell_exec($command_all);
+
+
+ #za vsako variablo polovimo število enot
+ #najprej za stolpce
+ if (count($sekvences1) > 0) {
+ foreach ($sekvences1 AS $sequence1) {
+ if ($spr_1_checkbox == true) {
+ $_seq_1_text = '' . $sequence1;
+ # pri checkboxih lovimo samo tiste ki so 1
+ $chckbox_filter1 = ' && ($' . $sequence1 . ' == 1)';
+ } else {
+ $_seq_1_text = '$' . $sequence1;
+ }
+
+ if (IS_WINDOWS) {
+ $command_1 = 'awk -F"|" "BEGIN {{OFS=\"\"} {ORS=\"\n\"}} ' . $status_filter . $chckbox_filter1 . $spr2_addFilter . ' { print \"$sumaVrstica[\x27\",' . $_seq_1_text . ',\"\x27]++;\"}" ' . $this->dataFileName . ' >> ' . $tmp_file;
+ } else {
+ $command_1 = 'awk -F"|" \'BEGIN {{OFS=""} {ORS="\n"}} ' . $status_filter . $chckbox_filter1 . $spr2_addFilter . ' { print "$sumaVrstica[\x27",' . $_seq_1_text . ',"\x27]++;"}\' ' . $this->dataFileName . ' >> ' . $tmp_file;
+ }
+ $out = shell_exec($command_1);
+ }
+ }
+ }
+
+ # skupna standardna deviacija
+ if (!is_null($meansArray)) {
+ $sum_std_dev = array();
+ foreach ($meansArray AS $row) {
+ foreach ($row AS $value => $st) {
+ if (is_numeric($value) && is_numeric($st)) {
+ $sum_vmesna = pow(($value - $sumaMeans), 2);
+ $sum_std_dev[] = $sum_vmesna * $st;
+ }
+ }
+ }
+
+ $sum_std_deviacija = 0;
+ // Izračunamo skupno standardno deviacijo
+ if (array_sum($sum_std_dev) > 0)
+ $sum_std_deviacija = sqrt((array_sum($sum_std_dev) / ($sumaSkupna - 1)));
+ }
+
+ $meansArr['v1'] = $v_first; # prva variabla
+ $meansArr['v2'] = $v_second; # druga variabla
+ $meansArr['result'] = $means; # povprečja
+ $meansArr['options'] = $_all_options; # vse opcije za variablo 2
+ $meansArr['max'] = $max_vrednost; #Max vrednost pri odgovorih
+ $meansArr['min'] = $min_vrednost; #Min vrednost pri odgovorih
+ $meansArr['stdDeviation'] = $std_deviacija;
+ $meansArr['sumaMin'] = $sumMin; #Min vrednost pri vseh odgovorih
+ $meansArr['sumaMax'] = $sumMax; #Max vrednost pri vseh odgovorih
+ $meansArr['sumaStdDeviation'] = $sum_std_deviacija;
+ $meansArr['sumaVrstica'] = $sumaVrstica; #št odgovorov glede na vrstice
+ $meansArr['sumaSkupna'] = $sumaSkupna; #skupno št. odgovorov
+ $meansArr['sumaMeans'] = $sumaMeans; #skupno povprečje
+
+ return $meansArr;
+ }
+ }
+
+ /**
+ * Standardna diviacija
+ *
+ * @param (array) $a
+ * @return integer
+ */
+ private function stats_standard_deviation(array $a, $sample = false)
+ {
+ $n = count($a);
+ if ($n === 0) {
+ trigger_error("The array has zero elements", E_USER_WARNING);
+ return false;
+ }
+ if ($sample && $n === 1) {
+ trigger_error("The array has only 1 element", E_USER_WARNING);
+ return false;
+ }
+ $mean = array_sum($a) / $n;
+ $carry = 0.0;
+ foreach ($a as $val) {
+ $d = ((double)$val) - $mean;
+ $carry += $d * $d;
+ };
+ if ($sample) {
+ --$n;
+ }
+ return sqrt($carry / $n);
+ }
+
+ /**
+ * Filter po hierarhiji za filtriranje pdoatkov iz tekstovne datoteke
+ *
+ * @return null || string
+ */
+ public function filterHierarhijeIzTekstovneDatoteke()
+ {
+ if (!is_array($this->sessionData['means']['filterHierarhija']) || empty($this->sessionData['means']['filterHierarhija']))
+ return null;
+
+ $hierarhija_filter = null;
+
+ if (is_array($this->sessionData['means']['filterHierarhija'])) {
+ foreach ($this->sessionData['means']['filterHierarhija'] as $nivo_key => $polje) {
+ $hierarhija_filter .= ' && (';
+
+ if (!is_null($polje) && is_array($polje)) {
+ foreach ($polje as $key => $vrednost) {
+ $nivo = trim($nivo_key, 'nivo');
+
+ if (sizeof($polje) > 1) {
+ if ($key != 0)
+ $hierarhija_filter .= ' || '; //OR uporabimo, kadar iščemo po več spremenljivkah na istem nivoju
+ $hierarhija_filter .= '($1' . $nivo . ' == ' . $vrednost . ')';
+ } else {
+ $hierarhija_filter .= '($1' . $nivo . ' == ' . $vrednost . ')';
+ }
+
+ }
+ }
+
+ $hierarhija_filter .= ')';
+ }
+ }
+
+ return $hierarhija_filter;
+ }
+
+ /**
+ * Filter hierarhije za specifičnega učitelja
+ *
+ * @return null || string
+ */
+ public function filterHierarhijeZaSpecificnegaUciteljaIzDatoteke()
+ {
+ global $global_user_id;
+
+// $this->posodobiPodatkeZaUcitelja($global_user_id);
+
+ if (!empty($this->struktura) || empty($this->sessionData['means']['strukturaUcitelj']) || sizeof($this->sessionData['means']['strukturaUcitelj']) == 0)
+ return null;
+
+
+ $ucitelj_filter = ' && (';
+
+ // Gremo po vsej strukturi, kjer se nahaja učitelj lahko je 1 ali pa jih je več
+ // Ključ je ID strukture - srv_hierarhija_struktura table
+ $oklepaj = false;
+ foreach ($this->sessionData['means']['strukturaUcitelj'] as $key => $struktura) {
+ // Vse nadalne poizvedbe vsebujejo OR - kje je treba pridobiti podatke iz vseh struktur
+ $ucitelj_filter .= ($oklepaj ? ' || (' : ' (');
+
+ foreach ($struktura as $nivo => $vrednost) {
+ $ucitelj_filter .= ($nivo != key($struktura) ? ' && ' : null);
+ $ucitelj_filter .= '($1' . $nivo . ' == ' . $vrednost['stevilka'] . ')';
+ }
+
+ $ucitelj_filter .= ')';
+ $oklepaj = true;
+ }
+
+ $ucitelj_filter .= ' )';
+
+ return $ucitelj_filter;
+
+ }
+
+
+ /**
+ * Prikaže tabelo s povprečji, min, max in standardna deviacija
+ *
+ * @param $_means
+ * @return html
+ */
+ function displayMeansTable($_means)
+ {
+ global $lang;
+
+ #število vratic in število kolon
+ $cols = count($_means);
+ # preberemo kr iz prvega loopa
+ $rows = count($_means[0]['options']);
+
+
+ # ali prikazujemo vrednosti variable pri spremenljivkah
+ $show_variables_values = $this->doValues;
+
+ $showSingleUnits = $this->sessionData['means']['meansJoinPercentage'] == true && $this->sessionData['means']['meansSeperateTables'] == false;
+
+ # izrišemo tabelo
+ echo '<table class="anl_tbl_crosstab fullWidth" style="margin-top:10px;">';
+ echo '<colgroup>';
+ echo '<col style="width:auto; min-width:30px;" />';
+ echo '<col style="width:auto; min-width:30px; " />';
+ for ($i = 0; $i < $cols; $i++) {
+ echo '<col style="width:auto; min-width:30px;" />';
+ if ($showSingleUnits == false) {
+ echo '<col style="width:auto; min-width:30px;" />';
+ }
+ }
+ if ($showSingleUnits == true) {
+ echo '<col style="width:auto; min-width:30px;" />';
+ }
+ echo '</colgroup>';
+
+ echo '<tr>';
+ #echo '<td>xx&nbsp;</td>';
+ # ime variable
+ # teksti labele:
+ $label2 = $this->getSpremenljivkaTitle($_means[0]['v2']);
+ if ($showSingleUnits == false) {
+ $span = ' colspan="5"';
+ }
+ echo '<td class="anl_bt anl_bl anl_ac rsdl_bck_title ctbCll" rowspan="2">';
+ echo $label2;
+ echo '</td>';
+
+ for ($i = 0; $i < $cols; $i++) {
+ echo '<td class="anl_bt anl_bl anl_br anl_ac rsdl_bck_title ctbCll"' . $span . '>';
+ $label1 = $this->getSpremenljivkaTitle($_means[$i]['v1']);
+ echo $label1;
+ echo '</td>';
+ }
+ if ($showSingleUnits == true) {
+ echo '<td class="anl_bl ">&nbsp;</td>';
+ }
+ echo '</tr>';
+ echo '<tr>';
+
+ for ($i = 0; $i < $cols; $i++) {
+ #Povprečje
+ echo '<td class="anl_bt anl_bl anl_br anl_ac rsdl_bck_variable1 ctbCll" >';
+ echo $lang['srv_means_label'];
+ echo '</td>';
+ #enote
+ if ($showSingleUnits == false) {
+ echo '<td class="anl_bl anl_bt anl_br anl_ac red anl_ita anl_bck_text_0 rsdl_bck_variable1 ctbCll">' . $lang['srv_hierarchy_label_st'] . '</td>';
+ }
+
+ #Min
+ echo '<td class="anl_bt anl_bl anl_br anl_ac rsdl_bck_variable1 ctbCll" >';
+ echo $lang['srv_hierarchy_label_min'];
+ echo '</td>';
+
+ #Max
+ echo '<td class="anl_bt anl_bl anl_br anl_ac rsdl_bck_variable1 ctbCll" >';
+ echo $lang['srv_hierarchy_label_max'];
+ echo '</td>';
+
+ #Standardna deviacija
+ echo '<td class="anl_bt anl_bl anl_br anl_ac rsdl_bck_variable1 ctbCll" >';
+ echo $lang['srv_hierarchy_label_std_dev'];
+ echo '</td>';
+ }
+ if ($showSingleUnits == true) {
+ echo '<td class="anl_bl anl_bt anl_br anl_ac red anl_ita anl_bck_text_0 rsdl_bck_variable1 ctbCll">' . $lang['srv_hierarchy_label_st'] . '</td>';
+ }
+
+ echo '</tr>';
+
+ if (count($_means[0]['options']) > 0) {
+
+ foreach ($_means[0]['options'] as $ckey2 => $crossVariabla2) {
+
+ $units_per_row = 0;
+ echo '<tr>';
+ echo '<td class="anl_bt anl_bl anl_ac rsdl_bck_variable1 ctbCll">';
+ echo $crossVariabla2['naslov'];
+ # če ni tekstovni odgovor dodamo key
+ if ($crossVariabla2['type'] !== 't') {
+ if ($show_variables_values == true) {
+ if ($crossVariabla2['vr_id'] == null) {
+ echo '&nbsp;( ' . $ckey2 . ' )';
+ } else {
+ echo '&nbsp;( ' . $crossVariabla2['vr_id'] . ' )';
+ }
+ }
+ }
+ echo '</td>';
+
+ # celice z vsebino
+ for ($i = 0; $i < $cols; $i++) {
+ echo '<td class="ct_in_cell anl_bt' . '" k1="' . $ckey1 . '" k2="' . $ckey2 . '" n1="' . $crossVariabla1['naslov'] . '" n2="' . $crossVariabla2['naslov'] . '" v1="' . $crossVariabla1['vr_id'] . '" v2="' . $crossVariabla2['vr_id'] . '">';
+ echo $this->formatNumber($_means[$i]['result'][$ckey2], SurveyDataSettingProfiles:: getSetting('NUM_DIGIT_RESIDUAL'));
+ echo '</td>';
+ if ($showSingleUnits == false) {
+ echo '<td class="anl_ac anl_bl anl_bt anl_br rsdl_bck0 crostabSuma">';
+ echo (int)$_means[$i]['sumaVrstica'][$ckey2];
+ echo '</td>';
+ } else {
+ $units_per_row = max($units_per_row, (int)$_means[$i]['sumaVrstica'][$ckey2]);
+ }
+
+ #Min - rezultati
+ echo '<td class="anl_ac anl_bl anl_bt anl_br rsdl_bck0">';
+ echo $this->formatNumber($_means[$i]['min'][$ckey2], SurveyDataSettingProfiles:: getSetting('NUM_DIGIT_RESIDUAL'));
+ echo '</td>';
+
+ #Max - rezultati
+ echo '<td class="anl_ac anl_bl anl_bt anl_br rsdl_bck0">';
+ echo $this->formatNumber($_means[$i]['max'][$ckey2], SurveyDataSettingProfiles:: getSetting('NUM_DIGIT_RESIDUAL'));
+ echo '</td>';
+
+ #Standardna deviacija - rezultati
+ echo '<td class="anl_ac anl_bl anl_bt anl_br rsdl_bck0">';
+ echo $this->formatNumber($_means[$i]['stdDeviation'][$ckey2], SurveyDataSettingProfiles:: getSetting('NUM_DIGIT_RESIDUAL'));
+ echo '</td>';
+
+ }
+ if ($showSingleUnits == true) {
+ echo '<td class="anl_ac anl_bl anl_bt anl_br rsdl_bck0 crostabSuma">';
+ echo $units_per_row;
+ echo '</tr>';
+ }
+ echo '</tr>';
+ $max_units += $units_per_row;
+ }
+ }
+ echo '<tr>';
+ echo '<td class="anl_bb anl_bt anl_bl anl_ac red anl_ita anl_bck_text_0 rsdl_bck_variable1 ctbCll">' . $lang['srv_means_label3'] . '</td>';
+
+ for ($i = 0; $i < $cols; $i++) {
+ echo '<td class="anl_ac anl_bt anl_bl anl_br anl_bb rsdl_bck0 crostabSuma">';
+ echo $this->formatNumber($_means[$i]['sumaMeans'], SurveyDataSettingProfiles:: getSetting('NUM_DIGIT_RESIDUAL'));
+ echo '</td>';
+ if ($showSingleUnits == false) {
+ echo '<td class="anl_ac anl_bt anl_bl anl_br anl_bb rsdl_bck0 crostabSuma">';
+ echo (int)$_means[$i]['sumaSkupna'];
+ echo '</td>';
+ }
+
+ #Skupaj Min
+ echo '<td class="anl_ac anl_bt anl_bl anl_br anl_bb rsdl_bck0 crostabSuma">';
+ echo $this->formatNumber($_means[$i]['sumaMin'], SurveyDataSettingProfiles:: getSetting('NUM_DIGIT_RESIDUAL'));
+ echo '</td>';
+
+ #Skupaj Max
+ echo '<td class="anl_ac anl_bt anl_bl anl_br anl_bb rsdl_bck0 crostabSuma">';
+ echo $this->formatNumber($_means[$i]['sumaMax'], SurveyDataSettingProfiles:: getSetting('NUM_DIGIT_RESIDUAL'));
+ echo '</td>';
+
+ #Skupaj standardna deviacija
+ echo '<td class="anl_ac anl_bt anl_bl anl_br anl_bb rsdl_bck0 crostabSuma">';
+ echo $this->formatNumber($_means[$i]['sumaStdDeviation'], SurveyDataSettingProfiles:: getSetting('NUM_DIGIT_RESIDUAL'));
+ echo '</td>';
+
+ }
+ if ($showSingleUnits == true) {
+ echo '<td class="anl_ac anl_bt anl_bl anl_br anl_bb rsdl_bck0 crostabSuma">';
+ echo $max_units;
+ echo '</tr>';
+ }
+
+ echo '</tr>';
+ echo '</table>';
+ }
+
+ /** Sestavi array nepravilnih odgovorov
+ *
+ */
+ function getInvalidAnswers($type)
+ {
+ $result = array();
+ $missingValuesForAnalysis = SurveyMissingProfiles:: GetMissingValuesForAnalysis($type);
+
+ foreach ($missingValuesForAnalysis AS $k => $answer) {
+ $result[$k] = array('text' => $answer, 'cnt' => 0);
+ }
+ return $result;
+ }
+
+
+ /** Naredimo formatiran izpis
+ *
+ * @param $value
+ * @param $digit
+ * @param $sufix
+ */
+
+ static function formatNumber($value, $digit = 0, $sufix = "")
+ {
+ if ($value <> 0 && $value != null)
+ $result = round($value, $digit);
+ else
+ $result = "0";
+
+ # polovimo decimalna mesta in vejice za tisočice
+
+ $decimal_point = SurveyDataSettingProfiles:: getSetting('decimal_point');
+ $thousands = SurveyDataSettingProfiles:: getSetting('thousands');
+
+ $result = number_format($result, $digit, $decimal_point, $thousands) . $sufix;
+
+ return $result;
+ }
+
+ //Dodajamo novo variablo iz spustnega seznama, vendar bo v našem primeru tole zaprto
+ function addNewVariable()
+ {
+ global $lang;
+ $which = $_POST['which'];
+ $variables = $this->getVariableList($which);
+ $multiple = true;
+
+ if ($which == '1') {
+ echo '<br/>';
+ echo '<span class="space_means_new">&nbsp;</span>';
+ echo '<select name="means_variable_' . $which . '" id="means_variable_' . $which . '" onchange="change_hierarhy_means(); return false;" autocomplete="off"'
+ . '>';
+ # ce prva variabla ni izbrana, dodamo tekst za izbiro prve variable
+ if ($variabla1['seq'] == null || $variabla1['seq'] == 0) {
+ echo '<option value="0" selected="selected" >' . $lang['srv_analiza_crosstab_izberi_more'] . '</option>';
+ }
+
+ foreach ($variables as $variable) {
+ echo '<option value="' . $variable['sequence'] . '" spr_id="' . $variable['spr_id'] . '" '
+ . (isset($variable['grd_id']) ? ' grd_id="' . $variable['grd_id'] . '" ' : '')
+ . (((int)$variable['canChoose'] == 1) ? '' : ' disabled="disabled" ')
+ . '> '
+ . ((int)$variable['sub'] == 0 ? '' : ((int)$variable['sub'] == 1 ? '&nbsp;&nbsp;' : '&nbsp;&nbsp;&nbsp;&nbsp;'))
+ . $variable['variableNaslov'] . '</option>';
+
+ }
+ echo '</select>';
+ echo '<span class="pointer" id="means_remove" onclick="hierarhy_means_remove_variable(this);"><span class="faicon delete_circle icon-orange_link" title=""></span></span>';
+
+ } else {
+ # which = 2
+ echo '<br/>';
+ echo '<span class="space_means_new">&nbsp;</span>';
+ echo '<select name="means_variable_' . $which . '" id="means_variable_' . $which . '" onchange="change_hierarhy_means(); return false;" autocomplete="off"'
+ . '>';
+
+ # ce prva variabla ni izbrana, dodamo tekst za izbiro prve variable
+ if ((int)$this->variabla1['0']['seq'] > 0) {
+ echo '<option value="0" selected="selected" >' . $lang['srv_analiza_crosstab_najprej_prvo'] . '</option>';
+ } else {
+ # če druga variabla ni izbrana dodamo tekst za izbiro druge variable
+ echo '<option value="0" selected="selected">' . $lang['srv_analiza_crosstab_izberi_more'] . '</option>';
+ }
+
+ foreach ($variables as $variable) {
+ echo '<option value="' . $variable['sequence'] . '" spr_id="' . $variable['spr_id'] . '" '
+ . (isset($variable['grd_id']) ? ' grd_id="' . $variable['grd_id'] . '" ' : '')
+ . (((int)$variable['canChoose'] == 1) ? '' : ' disabled="disabled" ')
+ . '> '
+ . ((int)$variable['sub'] == 0 ? '' : ((int)$variable['sub'] == 1 ? '&nbsp;&nbsp;' : '&nbsp;&nbsp;&nbsp;&nbsp;'))
+ . $variable['variableNaslov'] . '</option>';
+
+ }
+ echo '</select>';
+ echo '<span class="pointer" id="means_remove" onclick="hierarhy_means_remove_variable(this);"><span class="faicon delete_circle icon-orange_link" title=""></span></span>';
+ }
+ }
+
+ function getSpremenljivkaTitle($v_first)
+ {
+ global $lang;
+ # podatki spremenljivk
+ $spremenljivka_id = $v_first['spr'];
+ $grid_id = $v_first['grd'];
+ $sekvenca = $v_first['seq'];
+
+ $spremenljivka = $this->_HEADERS[$spremenljivka_id];
+ $grid = $spremenljivka['grids'][$grid_id];
+
+
+ # za multicheckboxe popravimo naslov, na podtip
+ $labela = null;
+ if ($spremenljivka['tip'] == '6' || $spremenljivka['tip'] == '7' || $spremenljivka['tip'] == '16' || $spremenljivka['tip'] == '17' || $spremenljivka['tip'] == '18' || $spremenljivka['tip'] == '19' || $spremenljivka['tip'] == '20' || $spremenljivka['tip'] == '21') {
+ foreach ($spremenljivka['grids'] AS $grids) {
+ foreach ($grids['variables'] AS $variable) {
+ if ($variable['sequence'] == $sekvenca) {
+ $labela .= '<span class="anl_variabla">';
+ $labela .= '<a href="/" title="' . $lang['srv_predogled_spremenljivka'] . '" onclick="showspremenljivkaSingleVarPopup(\'' . $spremenljivka_id . '\'); return false;">';
+ $labela .= strip_tags($spremenljivka['naslov']);
+ if ($show_variables_values == true) {
+ $labela .= '&nbsp;(' . strip_tags($spremenljivka['variable']) . ')';
+ }
+ $labela .= '</a>';
+ $labela .= '</span>';
+
+ if ($spremenljivka['tip'] == '16') {
+ if (strip_tags($grid['naslov']) != $lang['srv_new_text']) {
+ $labela .= '<br/>' . strip_tags($grid['naslov']);
+ }
+ $labela .= '&nbsp;(' . strip_tags($grid['variable']) . ')';
+ } else {
+ if (strip_tags($variable['naslov']) != $lang['srv_new_text']) {
+ $labela .= '<br/>' . strip_tags($variable['naslov']);
+ }
+ if ($show_variables_values == true) {
+ $labela .= '&nbsp;(' . strip_tags($variable['variable']) . ')';
+ }
+ }
+
+ }
+ }
+ }
+ }
+ if ($labela == null) {
+ $labela = '<span class="anl_variabla">';
+ $labela .= '<a href="/" title="' . $lang['srv_predogled_spremenljivka'] . '" onclick="showspremenljivkaSingleVarPopup(\'' . $spremenljivka_id . '\'); return false;">';
+ $labela .= strip_tags($spremenljivka['naslov']);
+ if ($show_variables_values == true) {
+ $labela .= '&nbsp;(' . strip_tags($spremenljivka['variable']) . ')';
+ }
+ $labela .= '</a>';
+ $labela .= '</span>' . NEW_LINE;
+ }
+ return $labela;
+ }
+
+ function changeMeansSubSetting()
+ {
+ $this->sessionData['means']['meansSeperateTables'] = ($_POST['chkMeansSeperate'] == 1);
+ $this->sessionData['means']['meansJoinPercentage'] = ($_POST['chkMeansJoinPercentage'] == 1);
+
+ // Shranimo spremenjene nastavitve v bazo
+ SurveyUserSession::saveData($this->sessionData);
+ }
+
+ function changeMeansShowChart()
+ {
+ $this->sessionData['mean_charts']['showChart'] = ($_POST['showChart'] == 'true');
+ $this->sessionData['means']['meansSeperateTables'] = ($_POST['showChart'] == 'true') ? true : $this->sessionData['means']['meansSeperateTables'];
+ $this->sessionData['means']['meansJoinPercentage'] = ($_POST['showChart'] == 'true') ? true : $this->sessionData['means']['meansJoinPercentage'];
+
+ // Shranimo spremenjene nastavitve v bazo
+ SurveyUserSession::saveData($this->sessionData);
+ }
+
+
+ function presetVariables()
+ {
+ # preberemo prednastavljene variable iz seje, če obstajajo
+ if (isset($this->sessionData['means']['means_variables']['variabla1']) && count($this->sessionData['means']['means_variables']['variabla1']) > 0) {
+ $this->variabla1 = $this->sessionData['means']['means_variables']['variabla1'];
+ }
+
+ if (isset($this->sessionData['means']['means_variables']['variabla2']) && count($this->sessionData['means']['means_variables']['variabla2']) > 0) {
+
+ $this->variabla2 = $this->sessionData['means']['means_variables']['variabla2'];
+
+ }
+ }
+} \ No newline at end of file
diff --git a/admin/survey/modules/mod_hierarhija/class/HierarhijaClass.php b/admin/survey/modules/mod_hierarhija/class/HierarhijaClass.php
new file mode 100644
index 0000000..37bf787
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/class/HierarhijaClass.php
@@ -0,0 +1,2261 @@
+<?php
+
+/** *
+ * Ime: Samoocena hierarhija
+ * Opis: Class skrbi za izdelavo hierarhije za administratorja/osebo s
+ * pravicami za gradnjo hierarhije na nivoju posamezne ankete Avtor: Robert
+ * Šmalc
+ */
+
+namespace Hierarhija;
+
+use Cache;
+use Common;
+use Export;
+use finfo;
+use Help;
+use Hierarhija\Model\HierarhijaOnlyQuery;
+use Hierarhija\Model\HierarhijaQuery;
+use MailAdapter;
+use SurveyInfo;
+use SurveySetting;
+use TrackingClass;
+use function is_null;
+
+
+class Hierarhija {
+
+ #v konstruktor poberemo vse globalne spremenljivke, ki jih omenjen razrred uporablja
+ protected $anketa;
+
+ /**
+ * Funkcija poišče ustrezne srv_vrednost-i za določeno spremenljivko, kjer
+ * moramo izbrati "variablo" te spremenljivke
+ *
+ * @param (string) $var
+ *
+ * @return (array) or null
+ */
+
+ protected $var;
+
+ public function __construct($anketa)
+ {
+ global $lang, $global_user_id, $site_url, $admin_type;
+
+ $this->anketa = $anketa;
+ $this->lang = $lang;
+ $this->hierarhija_type = HierarhijaHelper::preveriTipHierarhije($this->anketa);
+ $this->user = $global_user_id;
+ $this->admin_type = $admin_type;
+ $this->url = $site_url;
+ $this->modul = \SurveyInfo::getSurveyModules();
+ }
+
+ /**
+ * Inicializacija hierarhije
+ *
+ * @param
+ *
+ * @return
+ */
+ public static function hierarhijaInit($anketa)
+ {
+ $new = new Hierarhija($anketa);
+ $new->DolociPraviceUporabniku();
+ $new->izrisisSistemskoVprsanjeVloga();
+ $new->hierarhijaSuperadminSifranti();
+ }
+
+ /**
+ * Uporabniku določimo pravice, če vključi anketo dobi type 1 - admin
+ * hierarhije
+ */
+ public function dolociPraviceUporabniku()
+ {
+ if (is_null($this->hierarhija_type)) {
+
+ // Preverimo, kdo je anketo ustvaril
+ $sql_dostop = sisplet_query("SELECT type FROM srv_hierarhija_users WHERE anketa_d='".$this->anketa."' AND user_id='".$this->user."'", "obj");
+
+ if(empty($sql_dostop))
+ $user_query = sisplet_query("INSERT INTO srv_hierarhija_users (user_id, anketa_id, type) VALUES ('".$this->user."', '$this->anketa', 1)");
+
+
+ if (!$user_query && $this->admin_type == 0) {
+ echo mysqli_error($GLOBALS['connect_db']);
+ }
+ }
+ }
+
+ /**
+ * Ko se kativira anketa se določi prvo sistemsko vprašanje VLOGA (učenece,
+ * učitelj) to vprašanje samo 1 izrišemo in potem nikoli več
+ */
+ public function izrisisSistemskoVprsanjeVloga()
+ {
+ //Preverimo, če je sistemsko vprašanje vloga že ustvarjeno
+ $grup_id = sisplet_query("SELECT id, vrstni_red FROM srv_grupa WHERE ank_id='" . $this->anketa . "' ORDER BY vrstni_red LIMIT 0,1", "obj");
+ $sql_vpisane_spr = sisplet_query("SELECT id, gru_id, variable, vrstni_red FROM srv_spremenljivka WHERE gru_id='" . $grup_id->id . "' AND variable='vloga'");
+
+ //V kolikor je vloga že vnešena in ni postavljena na prvo mesto, potem jo moramo premakniti na prvo mesto
+ if (mysqli_num_rows($sql_vpisane_spr) == 0) {
+
+ //preštevilčimo ostala vprašanja za 1
+ (new HierarhijaAjax($this->anketa))->prestevilciBranching(0, TRUE);
+
+ //vedno ustavimo vlogo (učenec - učitelj)
+ $vloga = [$grup_id->id, 'vloga', 'vloga', '2', '1'];
+ (new HierarhijaQuery())->insertSpremenljivkaBranching($vloga, NULL, $this->anketa, 1);
+
+ }
+ }
+
+ /**
+ * Prikaže nastavitve za dodajanje nivojev in šifrantov - SUPERADMIN
+ * HIERARHIJA
+ *
+ * @return html page
+ */
+ public function hierarhijaSuperadminSifranti()
+ {
+ $aktivna = $this->preveriCeJeAktivirana();
+ $this->preverimoCeJeVnesenaStruktura();
+
+ if ($_GET['e'] == 'null') {
+ echo '<div style="color: #ffa608; font-style: italic;">' . $this->lang['srv_hierarchy_element_missing'] . '</div>';
+ }
+
+ if ($aktivna && (is_null($this->hierarhija_type) || $this->hierarhija_type < 4)) {
+ echo '<div id="hierarhija-app">';
+
+ // meni na levi strani
+ echo '<div class="hierarhija-levi-meni">';
+ echo '<div>' . $this->lang['srv_hierarchy_save_list'] . '</div>';
+ echo '<div class="h-tabela">';
+ echo '<table><tbody>';
+ echo '<tr v-for="shranjena in shranjenaHierarhija">';
+ echo '<td class="h-ime-shranjeno"
+ v-show="!imeHierarhije.urejanje"
+ v-on:click="pregledShranjeneHierarhije($index, shranjena.id, shranjena.struktura)"';
+ // v-on:click="uporabiShranjenoHierarhijo($index, shranjena.id, shranjena.struktura)"
+ echo 'v-bind:class="[{ \'active\': $index == imeHierarhije.index }]"
+ >
+ <div class="h-ime-prikaz">
+ {{ shranjena.ime }}
+ <span class="stevilo-evalvirancev" title="Število uporabnikov, ki so že dodani k strukturi" v-if="shranjena.stUporabnikov > 0">({{ shranjena.stEvalvirancev }})</span>
+ </div>
+ <td>';
+ echo '<td class="h-brisi-shranjeno" v-show="imeHierarhije.urejanje" v-on:click="izbrisiShranjenoHierarhijo($index, shranjena.id)"><span class="faicon delete_circle icon-orange_link" title="' . $this->lang['srv_hierarchy_help_1'] . '"></span></td>';
+ echo '<td class="h-ime-shranjeno"
+ v-show="imeHierarhije.urejanje"
+ v-on:click="imeHierarhije.index = $index"
+ v-bind:class="[{ \'editable-hierarhija\': $index == imeHierarhije.index && imeHierarhije.urejanje}]"
+ v-bind="{ contenteditable: $index == imeHierarhije.index && imeHierarhije.urejanje }"
+ v-on:blur="preimenujHierarhijo($index, shranjena.id)">
+ <div class="h-ime-prikaz h-urejanje">
+ {{ shranjena.ime }}
+ <span class="stevilo-evalvirancev" title="Število uporabnikov, ki so že dodani k strukturi" v-if="shranjena.stUporabnikov > 0 && imeHierarhije.index != $index"">({{ shranjena.stEvalvirancev }})</span>
+ </div>
+ <td>';
+ echo '</tr>';
+ echo '</tbody></table>';
+ echo '</div>';
+ echo '<div>
+ <span style="float: left; padding: 6px 15px 5px 0;">Urejanje</span>
+ <div class="onoffswitch" style="float: left; margin: 6px;">
+ <input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" v-model="imeHierarhije.urejanje" id="urejanje-imen" v-on:click="posodobiOpcijeHierarhije()">
+ <label class="onoffswitch-label" for="urejanje-imen">
+ <span class="onoffswitch-inner"></span>
+ <span class="onoffswitch-switch"></span>
+ </label>
+ </div>
+ </div>';
+ echo '<div style="float: left;">
+ <span style="margin: 10px 15px 0 0;display: inline-block;float: left;">Uvoz/Izvoz</span>
+ <span class="faicon import hierarhija-ikona"
+ title="Uvoz hierarhije"
+ style="margin: 8px 15px 0 0"
+ @click="uvozHierarhije"
+ ></span>
+ <a href="index.php?anketa=' . $this->anketa . '&a=hierarhija_superadmin&m=' . M_ADMIN_IZVOZ_SIFRANTOV . '">
+ <span class="faicon export hierarhija-ikona"
+ title="Izvoz hierarhije"
+ style="margin: 8px 10px 0 0"
+ ></span>
+ </a>
+ </div>';
+ echo '</div>';
+
+ // Uvodno besedilo, ko se aktivira modul hierarhija$anketa
+ echo '<div v-if="imeHierarhije.aktivna.length == 0 &&
+ imeHierarhije.shrani.length == 0 &&
+ previewHierarhije.ime.length == 0"
+ style="width: 650px;"
+ >';
+ echo '<h1>' . $this->lang['srv_hierarchy_wellcome_title'] . '</h1>';
+ echo $this->lang['srv_hierarchy_wellcome_text'] . '<br /><br />';
+ echo '<button class="btn btn-moder"
+ v-on:click="izbrisiCelotnoHierarhijo()"
+ style="float:right; margin: 20px 60px;"
+ >
+ Ustvari novo hierarhijo
+ </button>';
+ echo '</div>';
+
+
+ // Omogočimo predogled hierarhije
+ echo '<div class="hierarhija_fieldset" v-show="previewHierarhije.vklop && previewHierarhije.ime.length > 0" style="display:none;">';
+ echo '<h1>Predogled hierarhije: <span class="oranzna">{{ previewHierarhije.ime }}</span></h1>';
+
+ echo '<div v-if="shranjenaHierarhija[previewHierarhije.index] && shranjenaHierarhija[previewHierarhije.index].stUporabnikov > 0">Hierarhija ima {{ shranjenaHierarhija[previewHierarhije.index].stEvalvirancev }} evalvacij in {{ shranjenaHierarhija[previewHierarhije.index].stUporabnikov }} uporabnikov.</div>';
+
+ // Tabela nivojev in šifrantov
+ echo '<div id="primer-sifrantov" v-show="previewHierarhije.input.length > 0">';
+ echo '<table>';
+ echo '<thead style="text-align: left;">';
+ echo '<tr>';
+ echo '<th>' . $this->lang['srv_hierarchy_table_header_1'] . '</th>';
+ echo '<th>' . $this->lang['srv_hierarchy_table_header_2'] . '</th>';
+ echo '</tr>';
+ echo '</thead>';
+ echo '<tbody>';
+
+ // Vuejs dinamično kreiranje novih nivojev
+ echo '<tr id="nivo-{{ nivo.id }}" v-for="nivo in previewHierarhije.input" track-by="$index">';
+ echo '<td><label> {{ nivo.st}}. {{ nivo.ime }}</label></td>';
+ echo '<td><select name="nivo" data-opcije="{{ nivo.id }}">';
+ echo '<option value = "#" v-for="sifrant in nivo.sifranti">{{ sifrant.ime }}</option >';
+ echo '</select></td>';
+ echo '</tr>';
+
+ echo '</tbody></table></div>';
+ echo '<div v-else>Hierarhija je prazna in ima določen samo naslov.</div>';
+
+ // Gumbi
+ echo '<div style="padding:20px 10px; float: right;">';
+ echo '<button class="btn btn-moder" @click="izklopiPredogled()" style="margin: 0 10px;">' . $this->lang['back'] . '</button>';
+ echo '<button class="btn btn-moder"
+ @click="aktivirajIzbranoHierarhijo()"
+ v-if="previewHierarhije.input.length > 0"
+ >
+ Uporabi omenjeno hierarhijo
+ </button>';
+ echo '</div>';
+ echo '</div>';
+
+
+ // naslov hierarhije
+ echo '<div class="hierarhija_fieldset" v-if="(imeHierarhije.aktivna > 0 || imeHierarhije.shrani.length > 0) && !previewHierarhije.vklop">';
+ echo '<div class="left-float">';
+ echo '<h1>Hierarhija
+ <span class="oranzna">
+ <span v-if="imeHierarhije.shrani != imeHierarhije.aktivna">{{ (imeHierarhije.shrani.length > 30 ? (imeHierarhije.shrani.substring(0,30)+\' ...\') }}</span>
+ <span v-else>{{ (imeHierarhije.aktivna.length > 30 ? (imeHierarhije.aktivna.substring(0,30)+\' ...\') : imeHierarhije.aktivna) }}</span>
+ </span>
+ </h1>';
+ echo '</div>';
+ echo '<div class="left-float" style="padding: 20px 10px;">
+ <a href="#"
+ class="surveycomment"
+ v-on:click="dodajKomentar()"
+ title="Dodaj komentar k hierarhiji"
+ >
+ <span class="faicon inline_comment"></span> Dodaj komentar
+ </a>
+ </div>';
+ echo '<div class="left-float" style="padding: 20px 0px;">
+ <a href="#" class="logo-upload" v-on:click="logoUpload()" title="Naloži logotip za izpis pri poročilih">
+ <i class="fa fa-lg fa-file-image-o" aria-hidden="true"></i> Naloži logo
+ </a>
+ </div>';
+
+ // V kolikor imamo že strukturo prikažemo tudi številke
+ echo '<div style="clear:both;" v-if="shranjenaHierarhija[imeHierarhije.index] && shranjenaHierarhija[imeHierarhije.index].stUporabnikov > 0">Hierarhija ima {{ shranjenaHierarhija[imeHierarhije.index].stEvalvirancev }} evalvacij in {{ shranjenaHierarhija[imeHierarhije.index].stUporabnikov }} uporabnikov.</div>';
+
+ // Dodajanje nivojev in njihovih nazivov
+ echo '<div v-if="!vpisanaStruktura" style="clear: both;">';
+ echo '<h2 v-if="!vpisanaStruktura">' . $this->lang['srv_hierarchy_create_code'] . '</h2>';
+ echo '<div class="hierarhija-nov-nivo"
+ v-on:click="izbrisiCelotnoHierarhijo()"
+ v-if="!vpisanaStruktura"
+ style="float: right;display: block;margin:-30px -35px 0 0;">
+ Ustvari novo hierarhijo<span class="faicon edit small icon-as_link pointer h-edit-nivo hierarhija-inline"></span>
+ </div>';
+ echo '<div>';
+ echo '<table v-if="!vpisanaStruktura">';
+ echo '<thead style="text-align: left;">';
+ echo '<tr>';
+ echo '<th>' . $this->lang['srv_hierarchy_table_header_nivo_1'] . '</th>';
+ echo '<th style="padding-left: 15px;">' . $this->lang['srv_hierarchy_table_header_nivo_2'] . '</th>';
+ echo '</tr>';
+ echo '</thead>';
+ echo '<tbody>';
+
+ // Vuejs dinamično kreiranje novih nivojev
+ echo '<tr>';
+ echo '<td>';
+ echo '<span class="hierarhija-elementi">{{ novaHierarhijaSt }}.</span>';
+ echo '</td>';
+ echo '<td>';
+ echo '<input type="text" size="50" class="hierarhija-elementi" v-model="imeNivoja" v-on:keyup.enter="dodajNivoHierarhije()">';
+ echo '<div class="hierarhija-nov-nivo" v-on:click="dodajNivoHierarhije()">' . $this->lang['srv_hierarchy_input_name_nivo'] . '<span class="hierarhija-plus"></span></div>';
+ echo '</td>';
+ echo '</tr>';
+
+ echo '</tbody></table>';
+ echo '</div>';
+ echo '</div>';
+ echo '<div class="clear"></div>';
+
+
+ // Selectbox s šifranti za posamezen nivo, vpis šifrantov dovolimo šele ko imamo vpisano prvo raven
+ echo '<div v-show="inputNivo[0]">';
+ echo '<div class="h-sa-list">';
+ echo '<div style="margin-top: 16px;">';
+ echo '<h2 style="float: left; display: inline-block; margin-top: 0;">' . $this->lang['srv_hierarchy_code_lists'] . '</h2>';
+
+ echo '<div class="hierarhija-urejanje">
+ <div class="onoffswitch">
+ <input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" v-model="vklopiUrejanje" id="vklopi-urejanje-hierarhije" checked v-on:click="getSaveOptions(\'admin_skrij_urejanje_nivojev\', !vklopiUrejanje)">
+ <label class="onoffswitch-label" for="vklopi-urejanje-hierarhije">
+ <span class="onoffswitch-inner"></span>
+ <span class="onoffswitch-switch"></span>
+ </label>
+ </div>
+ </div>';
+ echo '<span class="toolbox_add_title"> ' . Help::display('srv_hierarchy_edit_elements') . '</span>';
+
+ echo '</div>';
+
+ echo '<div class="clear"></div>';
+
+ // izris primera šifrantov
+ echo '<div id="primer-sifrantov">';
+ echo '<table>';
+ echo '<thead style="text-align: left;">';
+ echo '<tr>';
+ echo '<th>' . $this->lang['srv_hierarchy_table_header_1'] . '</th>';
+ echo '<th>' . $this->lang['srv_hierarchy_table_header_2'] . '</th>';
+ echo '<th>' . $this->lang['srv_hierarchy_table_header_3'] . '</th>';
+ echo '<th v-show="vklopiUrejanje">' . $this->lang['srv_hierarchy_table_header_4'] . '</th>';
+ echo '</tr>';
+ echo '</thead>';
+ echo '<tbody>';
+
+ // Vuejs dinamično kreiranje novih nivojev
+ echo '<tr id="nivo-{{ nivo.id }}" v-for="nivo in inputNivo">';
+ echo '<td><label> {{ nivo.st}}. <span contenteditable="true" class="h-edit-nivo editable" data-labela="{{ nivo.id }}" v-on:blur="preimenujLabeloNivoja(nivo.id)">{{ nivo.ime }}</span></label></td>';
+ echo '<td><select name="nivo" data-opcije="{{ nivo.id }}">';
+ echo '<option value = "#" v-for="sifrant in nivo.sifranti">{{ sifrant.ime }}</option >';
+ echo '</select></td>';
+
+ echo '<td>';
+ echo '<span class="faicon delete_circle icon-orange_link spaceLeft hierarhija-inline" v-on:click="odstraniNivoHierarhije($index, nivo.id)" v-show="vklopiUrejanje && vpisanaStruktura == 0" title="' . $this->lang['srv_hierarchy_help_1'] . '"></span>';
+ echo '<span class="faicon edit small icon-as_link pointer h-edit-nivo hierarhija-inline" v-on:click="brisiSifrant(nivo.id)" v-show="vklopiUrejanje" title="' . $this->lang['srv_hierarchy_help_2'] . '"></span>';
+
+ ## Vstavimo checkboc od kje naprej se lahko šifranti ponavljajo
+ echo '<input type="checkbox" name="unikatni-sifranti" class="hierarhija-inline" style="cursor: pointer;" value="1" :checked="nivo.unikaten == 1" v-on:click="posodobiUnikatnega(nivo.id, nivo)" title="' . $this->lang['srv_hierarchy_help_3'] . '">';
+ echo '</td>';
+ echo '<td>';
+ echo '<input type="text" class="hierarhija-inline" size="40" data-nivo="{{ nivo.id }}" v-show="vklopiUrejanje" v-on:keyup.enter="dodajSifrant( $index, nivo.id )" placeholder="' . $this->lang['srv_hierarchy_input_name_sifrant'] . '"/>';
+ echo '<div class="hierarhija-nov-nivo" v-show="vklopiUrejanje" v-on:click="dodajSifrant( $index, nivo.id )">' . $this->lang['srv_hierarchy_input_name_sifrant'] . '<span class="hierarhija-plus"></span></div>';
+ echo '</td>';
+ echo '</tr>';
+
+ echo '</tbody></table>';
+ echo '</div>';
+
+ // Naprej na naslednji korak
+ echo '<div>';
+ // Shranjevanje hierarhije
+ echo '<div style="padding: 20px 0 10px;" v-show="prikaziImeZaShranjevanje">';
+ echo '<b>Shrani trenutno hierarhijo pod imenom: </b>';
+ echo '<input size="50" type="text" v-model="imeHierarhije.shrani">';
+ echo '</div>';
+
+ echo '<div style="float: right; width: 100%; text-align: right; padding: 7px 0;">
+ <input type="checkbox" v-model="prikaziImeZaShranjevanje" value="1"> Hierarhijo želim shraniti pod novim imenom.
+ </div>';
+
+ echo '<div style="padding:20px;float:right;">';
+ echo '<button v-on:click="shraniTrenutnoHierarhijo()" v-show="prikaziImeZaShranjevanje" class="btn btn-moder" style="margin-right: 15px;">' . $this->lang['save'] . '</button>';
+ echo '<button v-on:click="premikNaprej(\'' . M_UREDI_UPORABNIKE . '\')" class="btn btn-moder" style="margin-right: 15px;">' . $this->lang['next1'] . '</button>';
+ echo '</div>';
+ echo '</div>';
+
+ echo '</div>';
+
+
+ echo '</fieldset>';
+ echo '</div>';
+ echo '</div>';
+
+ // popup za urejanje vrednosti
+ echo '<div id="vrednost_edit" class="divPopUp">';
+ echo '</div>';
+
+ // fade pri fullscreen urejanje spremenljivke
+ echo '<div id="fade">';
+ echo '</div>';
+
+ } else {
+ echo '<div id="hierarhija-app">';
+ // Naslov
+ echo '<div class="hierarhija_fieldset">';
+ echo '<div class="left-float"><h1 v-show="imeHierarhije.aktivna">Hierarhija: <span style="color: #fa4913">{{ imeHierarhije.aktivna }}</span></h1></div>';
+ echo '<div class="left-float" style="padding: 20px;"><a href="#" class="surveycomment" title="Dodaj komentar o vprašanju"> <span class="faicon inline_comment"></span> Dodaj komentar</a></div>';
+ echo '<div class="left-float" style="padding: 20px 0px;">
+ <a href="#" class="logo-upload" v-on:click="logoUpload()" title="Naloži logotip za izpis pri poročilih">
+ <i class="fa fa-lg fa-file-image-o" aria-hidden="true"></i> Naloži logo
+ </a>
+ </div>';
+ echo '</div>';
+
+ echo '<div class="clear"></div>';
+
+ // Podatki o aktivaciji hierarhije
+ $hierarhija_options = new HierarhijaQuery();
+ $cas_aktivacije = $hierarhija_options->getDeleteHierarhijaOptions($this->anketa, 'cas_aktivacije_hierarhije', NULL, NULL, FALSE);
+ $uporabnik_aktivacije = $hierarhija_options->getDeleteHierarhijaOptions($this->anketa, 'uporabnik_aktiviral_hierarhijo', NULL, NULL, FALSE);
+ $uporabnik = HierarhijaQuery::getUserSurvey($uporabnik_aktivacije);
+
+ echo '<div class="okvircek" style="padding-bottom: 3px;">';
+ echo '<h3>Čas aktivacije: <b>' . $cas_aktivacije . '</b></h3>';
+ echo '<h3>Hierarhijo je aktiviral uporabnik: <b>' . $uporabnik->name . ' ' . $uporabnik->surname . '</b> (' . $uporabnik->email . ') <a class="btn" href="index.php?anketa=' . $this->anketa . '&a=hierarhija_superadmin&m=aktivacija-strukture-ankete">Podrobnosti</a></h3>';
+ echo '</div>';
+
+ echo '<div class="clear"></div>';
+
+ // Tabela nivojev in šifrantov
+ echo '<div id="primer-sifrantov" class="pregled">';
+ echo '<table>';
+ echo '<thead style="text-align: left;">';
+ echo '<tr>';
+ echo '<th>' . $this->lang['srv_hierarchy_table_header_1'] . '</th>';
+ echo '<th>' . $this->lang['srv_hierarchy_table_header_2'] . '</th>';
+ echo '</tr>';
+ echo '</thead>';
+ echo '<tbody>';
+
+ // Vuejs dinamično kreiranje novih nivojev
+ echo '<tr id="nivo-{{ nivo.id }}" v-for="nivo in inputNivo">';
+ echo '<td><label> {{ nivo.st}}. {{ nivo.ime }}</label></td>';
+ echo '<td><select name="nivo" data-opcije="{{ nivo.id }}">';
+ echo '<option value = "#" v-for="sifrant in nivo.sifranti">{{ sifrant.ime }}</option >';
+ echo '</select></td>';
+ echo '</tr>';
+
+ echo '</tbody></table>';
+ echo '</div>';
+
+ echo '<div style="width:35%;text-align: right;">';
+ echo '<a class="btn btn-moder" href="index.php?anketa=' . $this->anketa . '&a=hierarhija_superadmin&m=' . M_ADMIN_IZVOZ_SIFRANTOV . '">Izvoz šifrantov</a>';
+ echo '</div>';
+
+ echo '</div>';
+ }
+ }
+
+ /**
+ * V kolikor je hierarhija aktivirana potem jo ni mogoče več urejati
+ *
+ * @return boolean
+ */
+
+ private function preveriCeJeAktivirana()
+ {
+
+ if ($this->modul['hierarhija'] == 2 && $this->hierarhija_type < 4) {
+ echo $this->lang['srv_hierarchy_active_text'];
+ return FALSE;
+ }
+
+ return TRUE;
+ }
+
+ /**
+ * Preverimo, če je bila struktura vnešena
+ *
+ * @return boolean
+ */
+
+ private function preverimoCeJeVnesenaStruktura()
+ {
+
+ $hierarhija_opcije = (new HierarhijaQuery())->getDeleteHierarhijaOptions($this->anketa, 'vpisana_struktura', NULL, NULL, FALSE);
+
+ if (sizeof($hierarhija_opcije) > 0 && isset($hierarhija_opcije['vpisana_struktura']) && $hierarhija_opcije['vpisana_struktura'] == 1) {
+ $sql_str = sisplet_query("SELECT id FROM srv_hierarhija_struktura WHERE anketa_id='" . $this->anketa . "'");
+
+ if ($sql_str->num_rows == 0) {
+ (new HierarhijaQuery())->getDeleteHierarhijaOptions($this->anketa, 'vpisana_struktura', $id = NULL, 1);
+ }
+ }
+
+ }
+
+ /**
+ * Ko se aktivira anketa se posreduje email učiteljem za reševanje ankete
+ */
+
+ public static function aktivacijaAnketePosljiEmail($anketa)
+ {
+ # Dobimo samo uporabnike na zadnjem nivoju
+ $users_upravicen_do_evalvacije = (new HierarhijaOnlyQuery())->queryStrukturaUsers($anketa, ' AND hs.level=(SELECT MAX(level) FROM srv_hierarhija_struktura WHERE anketa_id=' . $anketa . ') GROUP BY users.id');
+
+ if ($users_upravicen_do_evalvacije->num_rows == 0) {
+ return FALSE;
+ }
+
+ # Če imamo uporabnike potem gremo za vsak id uporabnika preverit kakšno ima strukturo
+ while ($uporabnik = $users_upravicen_do_evalvacije->fetch_object()) {
+ $vloga_poizvedba = self::spremenljivkaVloga('vloga', $anketa);
+ $url_hierarhija = self::hierarhijaUrl($anketa, $uporabnik->user_id);
+
+ // generiramo kode za vse
+ foreach ($url_hierarhija as $struktura_id => $url) {
+ // generiranje kode
+ foreach ($vloga_poizvedba as $v) {
+ if ($v->variable == 1) {
+ $vloga = 'ucenec';
+ }
+
+ if ($v->variable == 2) {
+ $vloga = 'ucitelj';
+ }
+
+ // Url parametri hierarhije (nivoji in vloga)
+ $url_baza = 'vloga=' . $v->id . $url;
+
+ // Url parametre vstavimo v tabelo in generiramo kodo, Pri kodi trenutno uporabimo brez šumnikov, kar zadošča za 60.466.176 različnih kod (36 unikatnih znakov), če bi primanjkovalo se doda šumnik in je nato 90.224.199 kod.
+
+ $vpis_kode_loop = FALSE;
+ while (!$vpis_kode_loop) {
+ $vpis_kode_loop = sisplet_query("INSERT INTO
+ srv_hierarhija_koda
+ (koda, anketa_id, url, vloga, user_id, hierarhija_struktura_id, datetime)
+ VALUES
+ (CONCAT(SUBSTRING('abcdefghijklmnoprstuvzwxq0123456789', RAND()*34+1, 1),
+ SUBSTRING('abcdefghijklmnoprstuvzwxq0123456789', RAND()*34+1, 1),
+ SUBSTRING('abcdefghijklmnoprstuvzwxq0123456789', RAND()*34+1, 1),
+ SUBSTRING('abcdefghijklmnoprstuvzwxq0123456789', RAND()*34+1, 1),
+ SUBSTRING('abcdefghijklmnoprstuvzwxq0123456789', RAND()*34+1, 1)
+ ), '" . $anketa . "', '" . $url_baza . "', '" . $vloga . "', '" . $uporabnik->user_id . "', '" . $struktura_id . "', NOW())");
+
+
+ }
+ }
+ }
+ }
+
+ if (HierarhijaQuery::getOptionsPosljiKode($anketa) == 'nikomur') {
+ HierarhijaQuery::saveOptions($anketa, 'obvesti_samo_ucitelje', 0);
+ } else {
+ self::posljiEmailSkodamiUcencemAliSamoUciteljem($anketa);
+ }
+
+ return TRUE;
+ }
+
+ private static function spremenljivkaVloga($var, $anketa)
+ {
+ $spremenljivke = Cache::cache_all_srv_spremenljivka($anketa, TRUE);
+
+ $spremenljivka_id = NULL;
+ foreach ($spremenljivke as $spr) {
+ if ($spr['variable'] == $var) {
+ $spremenljivka_id = $spr['id'];
+ }
+ }
+
+ if (!is_null($spremenljivka_id)) {
+ return Cache::cache_all_srv_vrednost($spremenljivka_id);
+ }
+
+ return NULL;
+ }
+
+ private static function hierarhijaUrl($anketa, $user = NULL)
+ {
+ $hierarhija = (new HierarhijaQuery())->pridobiHierarhijoNavzgor($anketa, NULL, $user);
+
+ // če hierarhija še ni narejena
+ if (is_null($hierarhija)) {
+ return [];
+ }
+
+ $max_level = sisplet_query("SELECT MAX(level) AS level FROM srv_hierarhija_ravni WHERE anketa_id='" . $anketa . "'", "obj");
+
+ //najprej moramo priti do polja z ustreznimi nivjo
+ foreach ($hierarhija as $key => $array) {
+
+ // če smo res na zadnjem nivoju
+ if ($max_level->level == sizeof($array)) {
+ //gremo po nivojih ter sestavimo URL naslov
+ $url_zacasni = NULL;
+ foreach ($array as $nivoji) {
+ $id = (new HierarhijaQuery())->getVrednostIdFromPivot($nivoji['id']);
+ $url_zacasni .= '&' . $nivoji['nivo'] . '=' . $id;
+ }
+
+ //sestavljen url dodamo v polje, kot ključ uporabimo ID strukture hierarhije
+ $url[$key] = $url_zacasni;
+ }
+ }
+
+ return $url;
+ }
+
+ /**
+ * Funkcija za pošiljanja kode učiteljem pri hierarhiji
+ *
+ * @param (int) $anketa
+ *
+ * @return send email | error
+ */
+
+ public static function posljiEmailSkodamiUcencemAliSamoUciteljem($anketa)
+ {
+ global $site_url;
+ global $lang;
+
+ $ucitelji = sisplet_query("SELECT user_id FROM srv_hierarhija_koda WHERE anketa_id='" . $anketa . "' AND vloga='ucitelj' GROUP BY user_id");
+ $koda_za_resevanje_ankete = HierarhijaQuery::getOptionsPosljiKode($anketa);
+
+ if (mysqli_num_rows($ucitelji) == 0) {
+ return 'Ni podatka o učiteljih';
+ }
+
+
+ while ($ucitelj = $ucitelji->fetch_object()) {
+ $kode = sisplet_query("SELECT koda, hierarhija_struktura_id FROM srv_hierarhija_koda WHERE anketa_id='" . $anketa . "' AND vloga='ucitelj' AND user_id='" . $ucitelj->user_id . "'");
+
+ // Email naslov
+ $subject = 'Povezava do samooevalvacije za anketo: ' . SurveyInfo::getSurveyTitle();
+
+ // Email besedilo
+ $email = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+ <html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <style>
+ body {
+ width: 100% !important;
+ min-width: 100%;
+ -webkit-text-size-adjust: 100%;
+ -ms-text-size-adjust: 100%;
+ margin: 0;
+ Margin: 0;
+ padding: 0;
+ -moz-box-sizing: border-box;
+ -webkit-box-sizing: border-box;
+ box-sizing: border-box;
+ }
+
+ table {
+ border-spacing: 0;
+ border-collapse: collapse;
+ }
+
+ td {
+ word-wrap: break-word;
+ -webkit-hyphens: auto;
+ -moz-hyphens: auto;
+ hyphens: auto;
+ border-collapse: collapse !important;
+ }
+
+
+ tr, td, th {
+ text-align: left;
+ padding: 8px 10px;
+ border-color: #dddddd;
+ border-width: 1px;
+ border-style: solid;
+ }
+
+
+ th {
+ background-color: #EFF2F7;
+ }
+
+ .center{
+ text-align: center !important;
+ }
+ </style>
+ </head><body>';
+
+ $email .= $lang['srv_hierarchy_teacher_email_1'];
+ $email .= '<p>' . $lang['srv_hierarchy_teacher_email_2'] . '»<b>' . SurveyInfo::getSurveyTitle() . '</b>«' . $lang['srv_hierarchy_teacher_email_3'] . '<a href="' . $site_url . 'sa" target="_blank">' . $site_url . 'sa</a></p>';
+
+ $email .= '<br /><table cellspacing="0" style="border-collapse: collapse;">';
+ $email .= '<thead>';
+ $email .= '<tr>
+ <th border="1" cellpadding="0">Hierarhija</th>';
+
+ if (SurveyInfo::getSurveyModules('hierarhija') == 2 || in_array($koda_za_resevanje_ankete, ['vsem', 'ucitelju'])) {
+ $email .= '<th border="1" cellspacing="0" class="center">Koda za učitelja</th>';
+ }
+
+ // V kolikor nimamo nikakršne izbere potem posredujemo kodo tudi za učence
+ if (in_array($koda_za_resevanje_ankete, ['vsem', 'ucencem'])) {
+ $email .= '<th border="1" cellspacing="0" class="center">Koda za učence</th>';
+ }
+
+ $email .= '<tr>';
+ $email .= '</thead>';
+ $email .= '<tbody>';
+
+ // generiranje kode
+ while ($koda = mysqli_fetch_object($kode)) {
+ $email .= '<tr>';
+ $email .= '<td border="1" cellspacing="0">' . HierarhijaHelper::hierarhijaPrikazNaslovovpriUrlju($anketa, $koda->hierarhija_struktura_id, TRUE) . '</td>';
+
+ if (SurveyInfo::getSurveyModules('hierarhija') == 2 || in_array($koda_za_resevanje_ankete, ['vsem', 'ucitelju'])) {
+ $email .= '<td border="1" cellspacing="0" class="center"><span style="letter-spacing: 1px; font-size:16px; font-weight: bold;">' . strtoupper($koda->koda) . '</span></td>';
+ }
+
+ // V kolikor prejme učitelj email tudi s kodami za učence
+ if (in_array($koda_za_resevanje_ankete, ['vsem', 'ucencem'])) {
+ $koda_ucenci = sisplet_query("SELECT koda FROM srv_hierarhija_koda WHERE anketa_id='" . $anketa . "' AND vloga='ucenec' AND user_id='" . $ucitelj->user_id . "' AND hierarhija_struktura_id='" . $koda->hierarhija_struktura_id . "'", "obj");
+ $email .= '<td border="1" cellspacing="0" class="center"><span style="letter-spacing: 1px; font-size:16px; font-weight: bold; color:#ffa608;">' . strtoupper($koda_ucenci->koda) . '</span></td>';
+ }
+
+ $email .= '</tr>';
+ }
+
+ $email .= '</tbody>';
+ $email .= '</table>';
+
+ $user = sisplet_query("SELECT email FROM users WHERE id='" . $ucitelj->user_id . "'", "obj");
+
+ //Zaključek emaila
+ // V kolikor se emailpošlje samo učiteljem potem se skrije možnost za dostop učiteljem
+ $onemogocenDostopUcitelju = (new HierarhijaQuery())->getDeleteHierarhijaOptions($anketa, 'onemogoci_dostop_uciteljem', NULL, NULL, FALSE);
+
+
+ if (is_null($onemogocenDostopUcitelju) && is_null($koda_za_resevanje_ankete)) {
+ $email .= '<p>' . $lang['srv_hierarchy_teacher_email_4'] . '<a href="' . $site_url . '" target="_blank">' . $site_url . '</a>' . $lang['srv_hierarchy_teacher_email_5'];
+ $email .= '»' . $user->email . '«' . $lang['srv_hierarchy_teacher_email_6'] . '</p>';
+ }
+
+ // Podpis
+ $signature = Common::getEmailSignature();
+ $email .= $signature;
+
+ // Zaključek emaila
+ $email .= '</body></html>';
+
+
+ // Pošljemo email
+ try {
+ $MA = new MailAdapter($anketa, $type='invitation');
+ $MA->addRecipients($user->email);
+ $MA->sendMail(stripslashes($email), $subject);
+ } catch (Exception $e) {
+ echo "Email za hierarhijo ni bil poslan: " . $e;
+ error_log("Email za hierarhijo ni bil poslan: " . $e);
+ }
+
+ }
+ }
+
+ /**
+ * Prikažemo podatke o hierarhiji pri izpolnjevanju
+ *
+ * @param array $get - pridobimo vse get parametre od respondenta
+ *
+ * @return eho html
+ */
+ public static function displayPodatkeOhierarhijiZaRespondente($get = [], $only_hierarhija = FALSE)
+ {
+ global $lang;
+ $izpis = '';
+
+ if (!$only_hierarhija) {
+ $izpis .= '<div class="hierarhija-naslov-uvod">';
+ $izpis .= $lang['srv_hierarchy_main'];
+ }
+
+ if (empty($get) || sizeof($get) == 0) {
+ return NULL;
+ }
+
+ // Pridobimo ime glede na izbiro
+ $sifrant = [];
+ foreach ($get as $key => $param) {
+ if (preg_match('/nivo(\d+)/', $key, $match)) {
+ $sql = sisplet_query("SELECT naslov FROM srv_vrednost WHERE id='" . $param . "'", 'obj');
+ $sifrant[$match[1]] = $sql->naslov;
+ }
+ }
+
+ // Sortiramo po nivojih, da je vedno prvi najprej
+ ksort($sifrant);
+ $izpis .= '<b>';
+ foreach ($sifrant as $key => $sifra) {
+ $izpis .= ($key > 1 ? ' - ' : NULL) . $sifra;
+ }
+ $izpis .= '</b>';
+
+ if (!$only_hierarhija) {
+ $izpis .= '</div>';
+ }
+
+ return $izpis;
+ }
+
+ /**
+ * Iščemo v vrednost v 2 dimenzionalnem polju
+ * return $row/null
+ */
+ public static function iskanjeArray($id, $array, $keyValue = 'id')
+ {
+ foreach ($array as $key => $value) {
+ if ($value[$keyValue] == $id) {
+ return $value;
+ }
+ }
+
+ return NULL;
+ }
+
+
+ /********** SUPERADMIN HIERARHIJA END ***********/
+
+ /**
+ * Izvoz šifrantov iz trenutno aktivne hierahije
+ */
+ public function izvozSifrantov()
+ {
+ $ravni = (new HierarhijaOnlyQuery())->getSifrantiRavni($this->anketa);
+
+ // V kolikor nimamo šifrantov potem ne moremo nič izvažati
+ if (is_null($ravni)) {
+ return redirect('index.php?anketa=' . $this->anketa . '&a=hierarhija_superadmin&m=uredi-sifrante');
+ }
+
+
+ $csv_polje = NULL;
+ while ($row = $ravni->fetch_object()) {
+ $csv_polje[] = [$row->level, $row->raven, $row->sifranti];
+ }
+
+ return Export::init()->csv('Hierarhija_izvoz', $csv_polje);
+ }
+
+ /**
+ * Možnost uvoza hierarhije šifrantov
+ *
+ * @return html page
+ */
+ public function hierarhijaSuperadminUvoz()
+ {
+ $aktivna = $this->preveriCeJeAktivirana();
+
+ #Shranimo CSV datoteko in naredimo strukturo hierarhije
+ if ($_GET['t'] == 'hierarhija-uvoz' && $aktivna) {
+ //preverimo, če je CSV format
+ if (FALSE === array_search($_FILES['uvozi-hierarhijo']['type'], [
+ 'csv' => 'text/csv',
+ ], TRUE)) {
+ // V kolikor datoteka za uvoz ni v pravem formatu samo vrnemo na prvotno stran
+ return redirect('index.php?anketa=' . $this->anketa . '&a=hierarhija_superadmin&m=uredi-sifrante');
+ }
+
+ if (($datoteka = fopen($_FILES['uvozi-hierarhijo']['tmp_name'], "r")) !== FALSE) {
+
+ //CSV preberemo in zapišemo v polje
+ while (($data = fgetcsv($datoteka, 10000, ",")) !== FALSE) {
+ $uvozi_hierarhijo[] = $data;
+ }
+
+ $ravni = [];
+ $sifrant = [];
+ foreach ($uvozi_hierarhijo as $uvoz) {
+ //pridobimo samo unikatne nivoje in imena nivojev
+ if (!$this->in_mul_array($uvoz[1], $ravni)) {
+ $ravni[] = $uvoz;
+ }
+
+ //Pridobimo vse šifrante samo vranostno preverimo, če bi se slučajno kak šifrant dvakrat ponovil
+ if (!$this->in_mul_array($uvoz[2], $sifrant)) {
+ $sifrant[] = $uvoz;
+ }
+ }
+
+ // preden vnesemo novo hierarhijo izbrišemo že obstoječo
+ sisplet_query("DELETE FROM srv_hierarhija_ravni WHERE anketa_id='" . $this->anketa . "'");
+
+ //vpisemo vse ravni
+ foreach ($ravni as $raven) {
+ // Vpišem, samo če je prvi element polja številka, ker gre za številko ravni
+ if (!empty($raven[0]) && is_numeric($raven[0])) {
+ sisplet_query("INSERT INTO srv_hierarhija_ravni (anketa_id, user_id, level, ime) VALUES ('$this->anketa', '$this->user', '$raven[0]', '$raven[1]')");
+ $raven_id = mysqli_insert_id($GLOBALS['connect_db']);
+
+ //vpišemo vse šifre za sledečo raven
+ foreach ($sifrant as $sifra) {
+ if ($raven[0] == $sifra[0]) {
+ sisplet_query("INSERT INTO srv_hierarhija_sifranti (hierarhija_ravni_id, ime) VALUES ('" . $raven_id . "', '" . $sifra[2] . "')");
+ }
+ }
+ }
+ }
+
+ fclose($datoteka);
+ }
+
+ return redirect('index.php?anketa=' . $this->anketa . '&a=hierarhija_superadmin&m=uredi-sifrante');
+ }
+ }
+
+ /**
+ * Preveri, če se spremenljivka nahaja v večdimenzionalnem polju
+ *
+ * @param string $value
+ * @param array $array
+ *
+ * @return boolean
+ */
+
+ public function in_mul_array($value, $array)
+ {
+ foreach ($array as $row) {
+ if (in_array($value, $row)) {
+ return TRUE;
+ }
+ }
+ return FALSE;
+ }
+
+ /**
+ * Možnost nalaganja datoteke, tudi ko je hierarhija aktivna
+ */
+ public function hierarhijaSuperadminUploadLogo()
+ {
+ global $site_path;
+
+ // tracking - beleženje sprememb
+ TrackingClass::update($this->anketa, '20');
+
+ $finfo = new finfo(FILEINFO_MIME_TYPE);
+ if (FALSE === $ext = array_search($finfo->file($_FILES['logo']['tmp_name']), [
+ 'jpg' => 'image/jpeg',
+ 'png' => 'image/png',
+ 'gif' => 'image/gif',
+ ], TRUE)) {
+ throw new RuntimeException('Datoteka ni v pravem formatu.');
+ }
+
+ $shrani_id = (!empty($_POST['id']) ? $_POST['id'] : NULL);
+ $path = $site_path . 'admin/survey/modules/mod_hierarhija/porocila/logo/';
+
+ // Predhodno datoteko pobrišemo
+ self::brisiLogo($this->anketa, $shrani_id);
+
+
+ $logo_ime = time() . '_' . slug($_FILES['logo']['name'], '_');
+ if (!move_uploaded_file($_FILES['logo']['tmp_name'], sprintf($path . $logo_ime, sha1_file($_FILES['logo']['tmp_name']), $ext))) {
+ throw new RuntimeException('Ne morem premakniti datoteke.');
+ }
+
+
+ $shrani_id = (!empty($_POST['id']) ? $_POST['id'] : NULL);
+
+ sisplet_query("UPDATE srv_hierarhija_shrani SET logo='" . $logo_ime . "' WHERE id='" . $shrani_id . "' AND anketa_id='" . $this->anketa . "'");
+
+ return redirect('index.php?anketa=' . $this->anketa . '&a=hierarhija_superadmin&m=uredi-sifrante');
+ }
+
+ public static function brisiLogo($anketa, $id = NULL)
+ {
+ global $site_path;
+
+ if (is_null($id)) {
+ $id = (!empty($_POST['id']) ? $_POST['id'] : NULL);
+ }
+
+ $old_logo_name = sisplet_query("SELECT logo FROM srv_hierarhija_shrani WHERE id='" . $id . "' AND anketa_id='" . $anketa . "'", "obj")->logo;
+
+ $datoteka_za_izbris = NULL;
+
+ if (!empty($old_logo_name)) {
+ $datoteka_za_izbris = $site_path . 'admin/survey/modules/mod_hierarhija/porocila/logo/' . $old_logo_name;
+ }
+
+ if (file_exists($datoteka_za_izbris)) {
+ unlink($datoteka_za_izbris);
+ }
+
+ sisplet_query("UPDATE srv_hierarhija_shrani SET logo='' WHERE id='" . $id . "' AND anketa_id='" . $anketa . "'");
+ }
+
+ /**
+ * Uporabniko prikažemo opcijo za aktiviranje ankete in hierarhije
+ *
+ * V kolikor anketa še ni bila aktivirana potem ima uporabnik tudi možnost
+ * izklopiti hierarhijo
+ *
+ * @return
+ */
+ public function aktivacijaHierarhijeInAnkete()
+ {
+ // Preveri če je kak uporabnik upravičen do evalvacije
+ $st_uporabnikov_upravicenih_do_evalvacije = (new HierarhijaOnlyQuery())->queryStrukturaUsers($this->anketa, ' AND hs.level=(SELECT MAX(level) FROM srv_hierarhija_struktura WHERE anketa_id=' . $this->anketa . ') GROUP BY users.id');
+ $st_uporabnikov_upravicenih_do_evalvacije = mysqli_num_rows($st_uporabnikov_upravicenih_do_evalvacije);
+
+ if (SurveyInfo::getSurveyModules('hierarhija') == 1) {
+ // Aktivacija ankete, ki tudi aktivira hierarhij
+ echo '<div class="okvircek">';
+ echo '<h2>' . $this->lang['srv_hierarchy_activation_link'];
+ echo ' <a href="#" class="surveycomment" title="Dodaj komentar k hierarhiji" style="float:right; margin-top: -5px; margin-left: 10px;">
+ <span class="faicon inline_comment"></span>
+ </a>';
+ echo '<span onclick="previewMail(\'1\')"><i class="fa fa-envelope-o block right link" aria-hidden="true"></i></span></h2>';
+ echo $this->lang['srv_hierarhy_activation_text'];
+
+ if ($st_uporabnikov_upravicenih_do_evalvacije) {
+ echo '<div style="padding: 15px 0 20px;">';
+ echo '<b>Ob aktiviciji ankete bodo upoštevane naslednje nastavitve:</b><br />';
+ echo '<table>';
+ echo '<tbody>';
+ $nastavitve = [
+ 'srv_hierarchy_code_for_teacher' => 'ne_poslji_kodo_ucitelju',
+ 'srv_hierarchy_code_for_students' => 'ne_poslji_kode_ucencem',
+ 'srv_hierarchy_code_teacher_has_access' => 'onemogoci_dostop_uciteljem',
+ ];
+ foreach ($nastavitve as $prevod => $nastavitev) {
+ echo '<tr>';
+ echo '<td style="width: 180px;">' . $this->lang[$prevod] . '</td>';
+ echo '<td><input type="radio" name="' . $nastavitev . '" id="' . $nastavitev . '-0" value="0" onclick="posodobiPosiljanjeKod(\'' . $nastavitev . '\', 0);" ' . (is_null(HierarhijaQuery::getOptions($this->anketa, $nastavitev)) ? 'checked="checked"' : NULL) . '>
+ <label for="' . $nastavitev . '-0">' . $this->lang['srv_hierarchy_yes'] . '</label>';
+ echo '<input type="radio" name="' . $nastavitev . '" id="' . $nastavitev . '-1" value="1" onclick="posodobiPosiljanjeKod(\'' . $nastavitev . '\', 1);" ' . (HierarhijaQuery::getOptions($this->anketa, $nastavitev) == 1 ? 'checked="checked"' : NULL) . '>
+ <label for="' . $nastavitev . '-1">' . $this->lang['srv_hierarchy_no'] . '</label></td>';
+ echo '</tr>';
+ }
+ echo '</tbody>';
+ echo '</table>';
+
+ echo '<br />';
+ echo $this->lang['srv_hierarchy_code_text_bottom'];
+ echo '</div>';
+ echo '<button type="button" class="btn btn-moder" onclick="anketa_active(\'' . $this->anketa . '\',\'0\', \'\', \'1\'); return false;">Aktiviraj hierarhijo in anketo</button>';
+ } else {
+ echo '<div class="error-email"><span class="faicon warning icon-orange"></span> V bazi ni dodanega nobenega učitelja, zato aktivacija ni mogoča!</div>';
+ }
+
+ echo '</div>';
+
+ // izklop ankete
+ echo '<div class="okvircek" style="margin-top: 30px;">';
+ echo '<h2>' . $this->lang['srv_hierarchy_turnoff'] . '</h2>';
+ echo $this->lang['srv_hierarhy_turnoff_text'];
+ echo '<div>';
+ echo '<a id="h-navbar-link"
+ class="no-img side-right btn btn-moder
+ ref="#"
+ title="' . $this->lang['srv_hierarchy_turnoff'] . '"
+ onclick="toggleAdvancedModule(\'hierarhija\', 1);">';
+ echo $this->lang['srv_hierarchy_turnoff'] . '</a>';
+ echo '</div>';
+ echo '</div>';
+
+ } else {
+ // Aktivirana anketa in hierarhija
+ echo '<div class="okvircek">';
+ echo '<h2>' . $this->lang['srv_hierarchy_active_hierarchy_and_survey'] . '</h2>';
+ echo $this->lang['srv_hierarchy_active_hierarchy_and_survey_text'];
+
+ $row = SurveyInfo::getInstance()->getSurveyRow();
+ echo '<button type="button" class="btn btn-moder" onclick="anketa_active(\'' . $this->anketa . '\',\'' . $row['active'] . '\'); return false;">' . ($row['active'] ? $this->lang['srv_hierarchy_deactivate_survey'] : $this->lang['srv_hierarchy_activate_survey']) . '</button>';
+ echo '</div>';
+
+ // Podatki o aktivaciji hierarhije
+ $hierarhija_options = new HierarhijaQuery();
+ $cas_aktivacije = $hierarhija_options->getDeleteHierarhijaOptions($this->anketa, 'cas_aktivacije_hierarhije', NULL, NULL, FALSE);
+ $uporabnik_aktivacije = $hierarhija_options->getDeleteHierarhijaOptions($this->anketa, 'uporabnik_aktiviral_hierarhijo', NULL, NULL, FALSE);
+ $uporabnik = HierarhijaQuery::getUserSurvey($uporabnik_aktivacije);
+
+ echo '<div class="okvircek" style="margin-top: 30px;">';
+ echo '<h2>' . $this->lang['srv_hierarchy_active_information_user'] . ' <span onclick="previewMail(\'1\')"><i class="fa fa-envelope-o block right link" aria-hidden="true"></i></span></h2>';
+ echo '<h3>Čas aktivacije: <b>' . $cas_aktivacije . '</b></h3>';
+ echo '<h3>Aktivnost evalvacije: <b> od ' . date('d.m.Y', strtotime($row['starts'])) . ' do ' . date('d.m.Y', strtotime($row['expire'])) . '</b><a href="index.php?anketa=' . $row['id'] . '&a=trajanje"><span class="faicon edit"></span></a></h3>';
+ echo '<h3>Hierarhijo je aktiviral uporabnik: <b>' . $uporabnik->name . ' ' . $uporabnik->surname . '</b> (' . $uporabnik->email . ')</h3>';
+
+ if (HierarhijaQuery::getOptions($this->anketa, 'onemogoci_dostop_uciteljem') == 1) {
+ echo '<h3>' . $this->lang['srv_hierarchy_teacher_can_not_access'] . '</h3>';
+ }
+
+ echo '<h3>' . HierarhijaHelper::textGledeNaOpcije($this->anketa, 'srv_hierarchy_email_code') . '</h3>';
+
+ $users_upravicen_do_evalvacije = (new HierarhijaOnlyQuery())->queryStrukturaUsers($this->anketa, ' AND hs.level=(SELECT MAX(level) FROM srv_hierarhija_struktura WHERE anketa_id=' . $this->anketa . ') GROUP BY users.id');
+ echo '<ul style="list-style: initial;max-height: 500px; overflow: auto;">';
+ while ($uporabnik = $users_upravicen_do_evalvacije->fetch_object()) {
+ echo '<li>' . $uporabnik->email . '</li>';
+ }
+ echo '</ul>';
+
+ // Obvesti učitelje, če niso bili obveščeni
+ $obvesti_Samo_ucitelje = HierarhijaQuery::getOptions($this->anketa, 'obvesti_samo_ucitelje');
+ if (!is_null($obvesti_Samo_ucitelje) && $obvesti_Samo_ucitelje == 0) {
+ echo '<div id="obvesti-samo-ucitelje" style="padding-top: 15px;"><button class="btn btn-moder" onclick="obvestiUciteljeZaResevanjeAnkete()">Pošlji obvestilo učiteljem s kodo za reševanje</button></div>';
+ }
+
+ echo '</div>';
+
+ // Obveščanje managerjev
+ $managerji_ankete = (new HierarhijaOnlyQuery())->queryStrukturaUsers($this->anketa, ' AND hs.level<(SELECT MAX(level) FROM srv_hierarhija_struktura WHERE anketa_id=' . $this->anketa . ')');
+ if (mysqli_num_rows($managerji_ankete) > 0) {
+ echo '<div class="okvircek" style="margin-top: 30px;" id="vue-custom">';
+ echo '<h2>' . $this->lang['srv_hierarchy_active_information_about_manager'] . ' <span onclick="previewMail(\'2\')"><i class="fa fa-envelope-o block right link" aria-hidden="true"></i></span></h2>';
+ echo '<p>' . $this->lang['srv_hierarchy_active_information_about_manager_text'] . '</p>';
+
+ echo '<form action="#" method="post">';
+ echo '<div v-if="managerOznaciVse" v-on:click="managerZamenjajOznaci" class="link oznaci"><i class="fa fa-check-square-o" aria-hidden="true"></i> - označi vse</div>';
+ echo '<div v-else v-on:click="managerZamenjajOznaci" class="link oznaci"><i class="fa fa-square-o" aria-hidden="true"></i> - označi nobenega</div>';
+
+ echo '<ul style="padding: 4px;">';
+ while ($manager = $managerji_ankete->fetch_object()) {
+ echo '<li style="padding: 2px 0;"><input type="checkbox" v-model="!managerOznaciVse" name="manager" value="' . $manager->user_id . '" id="manager-' . $manager->id . $manager->user_id . '"/><label for="manager-' . $manager->id . $manager->user_id . '">' . $manager->level . '.nivo: ' . $manager->email . '</label></li>';
+ }
+ echo '</ul>';
+
+ echo '<button type="submit" class="btn btn-moder" v-on:click="emailObvestiloZaManagerje()"; return false;">' . $this->lang['srv_hierarchy_submit'] . '</button>';
+ echo '</form>';
+ echo '</div>';
+ }
+ }
+
+ }
+
+ /**
+ * Uporabniko prikažemo opcijo za kopiranje ankete s šifranti in strukturo
+ */
+ public function kopiranjeHierarhijeInAnkete()
+ {
+
+ echo '<div class="okvircek">';
+ echo '<h2>' . $this->lang['srv_hierarchy_copy_link'] . '</h2>';
+ echo $this->lang['srv_hierarhy_copy_text'];
+ echo '<button type="button" class="btn btn-moder" onclick="anketa_copy_top(\'' . $this->anketa . '\', \'1\'); return false;">Kopiraj anketo skupaj s strukturo uporabnikov</button>';
+ echo '<br /><br />';
+ echo $this->lang['srv_hierarhy_copy_text_2'];
+ echo '<button type="button" class="btn btn-moder" onclick="anketa_copy_top(\'' . $this->anketa . '\'); return false;">Kopiraj anketo</button>';
+ echo '</div>';
+
+ }
+
+ /**
+ * Prikaz in urejanje hierarhije
+ *
+ * @return html page
+ */
+ public function displayHierarhijaUporabniki()
+ {
+ SurveySetting::getInstance()->Init($this->anketa);
+ $row = SurveyInfo::getInstance()
+ ->getSurveyRow(); //("SELECT * FROM srv_anketa WHERE id='$this->anketa'")
+
+ $max_st_nivojev = (new HierarhijaOnlyQuery())->getSifrantiRavni($this->anketa, ', MAX(level) AS max', NULL);
+
+ //preverimo število nivojev v kolikor jih ni potem nimamo še podatka o vnesenih šifrantih
+ if (!empty($max_st_nivojev) && !is_null($max_st_nivojev = $max_st_nivojev->fetch_object()->max) && SurveyInfo::getSurveyModules('hierarhija') == 1) {
+ // Pridobimo ime hierarhije
+ $aktivna_hierarhija_ime = (new HierarhijaQuery())->getDeleteHierarhijaOptions($this->anketa, 'aktivna_hierarhija_ime', NULL, NULL, FALSE);
+
+ echo '<h2>Izgradnja hierarhije <span class="oranzna">' . (!empty($aktivna_hierarhija_ime) ? $aktivna_hierarhija_ime : '') . '</span> za anketo: ' . $row['naslov'] . '</h2>';
+ echo '<span>Ob aktiviranju bodo uporabniki na najnižjem nivoju prejeli kodo/šifro</span>';
+
+ //vnosni obrazec za izgradnjo hierarhije
+ echo '<div class="izgradnja_hierarhije">';
+
+ //pravice za gradnjo hierarhije v kolikor uporabnik ni super admin (type 5 ali več) ima tyle manjši kot 5
+ if ($this->hierarhija_type > 4) {
+
+ $sql = HierarhijaOnlyQuery::queryStrukturaUsersLevel($this->anketa, $this->user, 'ASC');
+ //pridobimo največji nivo uporabnika ter id-je strukture
+ while ($struktura = $sql->fetch_object()) {
+ ## pridobimo največji nivo uporabnika ter id-je strukture za posamezen vpis
+ if (!isset($level) || $struktura->level < $level) {
+ $level = $struktura->level;
+ }
+
+ $struktura_nivo[] = $struktura->parent_id;
+ $struktura_nivo[] = $struktura->struktura_id;
+ }
+
+ $struktura_parent = (new HierarhijaOnlyQuery())->queryStruktura($this->anketa, NULL, NULL, 'id DESC');
+ while ($obj = $struktura_parent->fetch_object()) {
+ //v polje vnesemo samo id strukture, ki je višja od trenutnega nivoja uporabnika
+ if (isset($obj) && in_array($obj->id, $struktura_nivo)) {
+ $struktura_nivo[] = $obj->parent_id; //tu povnimo parent_id, da lahko potem poiščemo celotno strukturo
+ $struktura_sifrant_id[] = $obj->sifrant_id; // narredimo polje z vsemi ID, sifrantov, ki so že vpisani za hierarhijo
+ }
+ }
+
+ }
+ $results = (new HierarhijaQuery())->getSifrantAdmin($this->anketa);
+
+ if (!is_null($results)) {
+ if (isset($level)) {
+ $this->vpisHierarhijeAdmin($results, $level, $struktura_sifrant_id);
+ } else {
+ $this->vpisHierarhijeAdmin($results);
+ }
+ }
+
+ echo '</div>';
+
+ //prikaži JS Tree s trenutno hierarhijo
+ $this->jsTreePrikazHierarhije();
+ } elseif (!empty($max_st_nivojev) && SurveyInfo::getSurveyModules('hierarhija') == 2) {
+ echo '<h3>' . $this->lang['srv_hierarchy_active_text'] . '</h3>';
+ $this->jsTreePrikazHierarhije();
+ } else {
+ echo '<h3>' . $this->lang['srv_hierarchy_nothing'] . '</h3>';
+ }
+ }
+
+ /**
+ * Nariše drevesno strukturo hierarhi
+ *
+ * @return HTML view
+ */
+ public function jsTreePrikazHierarhije()
+ {
+
+ $hierarhija = (new HierarhijaOnlyQuery())->queryStruktura($this->anketa, NULL, ' AND parent_id IS NULL')
+ ->fetch_object();
+
+ echo '<div id="hierarhija-jstree-ime">';
+ if (!is_null($hierarhija->ravni_ime)) {
+ echo '<h2>Hierarhija</h2>';
+ echo '<b>' . $hierarhija->ravni_ime;
+ if ($this->hierarhija_type > 4) {
+ echo ' - ' . $hierarhija->sifrant_ime;
+ }
+ echo ': </b>';
+ }
+ echo '</div>';
+
+ // LOAD jsTree na ta element
+ echo '<div id="admin_hierarhija_jstree"></div>';
+
+ echo '<script type="text/javascript" src="modules/mod_hierarhija/js/vendor/jstree.min.js"></script>';
+ echo '<script>jstree_json_data(' . $this->anketa . ');</script>';
+ }
+
+ /**
+ * Gradnja uporabnikov/hierarhije, kjer lahko uporabnik izbira kako želi
+ * imeti prikazana podatke
+ */
+ public function izberiDodajanjeUporabnikovNaHierarhijo()
+ {
+ global $site_url;
+
+ // za vse ostalo je ure uredi uporabnike - M_UREDI_UPORABNIKE
+ SurveySetting::getInstance()->Init($this->anketa);
+ $row = SurveyInfo::getInstance()->getSurveyRow();
+ $hierarchy_status = SurveyInfo::getSurveyModules('hierarhija');
+
+ $max_st_nivojev = (new HierarhijaOnlyQuery())->getSifrantiRavni($this->anketa, ', MAX(level) AS max', NULL);
+
+ //preverimo število nivojev v kolikor jih ni potem nimamo še podatka o vnesenih šifrantih
+ if (!empty($max_st_nivojev) && !is_null($max_st_nivojev = $max_st_nivojev->fetch_object()->max) && $hierarchy_status == 1) {
+
+ // Preverimo, če so vpisani šifranti, drugače preusmerimo na vpis šifrantov
+ $sql = (new HierarhijaOnlyQuery())->getSifrantiRavni($this->anketa); // pridobimo vse nivoje in šifre za vpis uporabnikov
+ if ($sql->num_rows > 0) {
+ while ($obj = $sql->fetch_object()) {
+ if (empty($obj->sifranti)) {
+ return redirect($site_url . 'admin/survey/index.php?anketa=' . $this->anketa . '&a=' . A_HIERARHIJA_SUPERADMIN . '&m=' . M_ADMIN_UREDI_SIFRANTE . '&e=null');
+ }
+ }
+ }
+
+ // Preverimo na katerem nivoju se nahaja uporabnik
+ $uporabnik_level = HierarhijaOnlyQuery::queryStrukturaUsersLevel($this->anketa, $this->user, 'ASC')
+ ->fetch_object()->level;
+
+ if ($this->hierarhija_type < 4 || $uporabnik_level != $max_st_nivojev) {
+ // Pridobimo ime hierarhije
+ $aktivna_hierarhija_ime = (new HierarhijaQuery())->getDeleteHierarhijaOptions($this->anketa, 'aktivna_hierarhija_ime', NULL, NULL, FALSE);
+
+ echo '<h2>Izgradnja hierarhije <span class="oranzna">' . (!empty($aktivna_hierarhija_ime) ? $aktivna_hierarhija_ime : '') . '</span> za anketo: ' . $row['naslov'] . '</h2>';
+ echo '<div class="help-text">';
+ echo '<div class="srv_hierarchy_user_help">';
+ echo $this->lang['srv_hierarchy_user_help_top_1'];
+ echo ' Vse uporabnike lahko uvozite tukaj <i class="fa fa-lg modra click fa-user-plus" onclick="uvoziUporabnike()" aria-hidden="true"></i>';
+ echo '<br/><br/>' . $this->lang['srv_hierarchy_user_help_top_2'];
+ echo '</div>';
+ echo '<div class="srv_hierarchy_user_help_sifrant_vnesen" style="display: none;">' . $this->lang['srv_hierarchy_user_help_sifrant_vnesen_1'] . ' Vse uporabnike lahko uvozite tukaj <i class="fa fa-lg modra click fa-user-plus" onclick="uvoziUporabnike()" aria-hidden="true"></i><br /><br />' . $this->lang['srv_hierarchy_user_help_sifrant_vnesen_2'] . '</div>';
+ echo '</div>';
+
+ //vnosni obrazec za izgradnjo hierarhije
+ echo '<div class="izgradnja_hierarhije">';
+
+ $results = (new HierarhijaQuery())->getSifrantAdmin($this->anketa);
+
+ if (!is_null($results)) {
+
+ // V kolikor je postavvljena spremenljivka $level, potem ni superadmin, ampak uporabnik na določenem nivoju
+ if ($this->hierarhija_type > 4) {
+ $this->vpisHierarhijeUporabnikTabela($results);
+ } else {
+ $this->vpisHierarhijeAdminTabela($results);
+ }
+
+ }
+
+ echo '</div>';
+ }
+
+ //prikaži JS Tree s trenutno hierarhijo
+ $this->jsTreePrikazHierarhije();
+ } elseif (!empty($max_st_nivojev) && $hierarchy_status == 2) {
+ echo '<h3>' . $this->lang['srv_hierarchy_active_text'] . '</h3>';
+
+ if ($this->hierarhija_type < 5) {
+ $results = (new HierarhijaQuery())->getSifrantAdmin($this->anketa);
+
+ // Prikažemo samo datatables
+ echo '<div id="vue-gradnja-hierarhije">';
+ echo '<div style="padding-top:26px;clear: both;display: block;">';
+ echo '<h2>Prikaz zgrajene hierarhije:</h2>';
+ echo '<div id="secondNavigation_links">
+ <a href="#" class="srv_ico" id="hover_export_icon" title="Izvoz v"><span class="faicon export" deluminate_imagetype="png"></span> Izvozi strukturo uporabnikov</a>
+ <div id="hover_export" style="display: none;">
+ <a href="index.php?anketa=' . $this->anketa . '&a=' . ($this->hierarhija_type < 5 ? A_HIERARHIJA_SUPERADMIN : A_HIERARHIJA) . '&m=uredi-uporabnike&izvoz=1" class="srv_ico" title="CSV izvoz uporabnikov za analizo">
+ Iz tabele
+ </a>
+ <a href="index.php?anketa=' . $this->anketa . '&a=' . ($this->hierarhija_type < 5 ? A_HIERARHIJA_SUPERADMIN : A_HIERARHIJA) . '&m=uredi-uporabnike&izvoz=struktura-analiz&n=1" class="srv_ico" title="Izvozi v excel">
+ Za združevanje s podatki ankete
+ </a>
+ <a href="index.php?anketa=' . $this->anketa . '&a=' . ($this->hierarhija_type < 5 ? A_HIERARHIJA_SUPERADMIN : A_HIERARHIJA) . '&m=uredi-uporabnike&izvoz=struktura-analiz" class="srv_ico" title="Izvozi v excel">
+ Za združevanje z imenskimi vnosi šifrantov
+ </a>
+ </div>
+ </div>';
+
+// echo '<div class="uporabniki-ikona-tabela"
+// title="CSV izvoz uporabnikov"
+// >
+// <a href="index.php?anketa=' . $this->anketa . '&a=' . ($this->hierarhija_type < 5 ? A_HIERARHIJA_SUPERADMIN : A_HIERARHIJA) . '&m=uredi-uporabnike&izvoz=1" class="btn btn-moder">Izvoz uporabnikov</a>
+// </div>';
+// echo '<div class="uporabniki-ikona-tabela"
+// title="CSV izvoz uporabnikov za analizo"
+// style="padding-right: 20px;"
+// >
+// <a href="index.php?anketa=' . $this->anketa . '&a=' . ($this->hierarhija_type < 5 ? A_HIERARHIJA_SUPERADMIN : A_HIERARHIJA) . '&m=uredi-uporabnike&izvoz=struktura-analiz" class="btn btn-moder">Struktura uporabnikov za analizo</a>
+// </div>';
+ echo '<table id="vpis-sifrantov-admin-tabela" class="tabela-obroba custom-datatables">';
+ echo '<thead>';
+ echo ' <tr>';
+ foreach ($results['nivoji'] as $key => $nivo) {
+ echo '<th style="text-align: left;">' . $nivo['level'] . '.nivo: ' . $nivo['ime'] . '</th>';
+ }
+ echo '</tr>';
+ echo '</thead>';
+ echo '<tbody>';
+ echo '<tbody>';
+ echo '</table>';
+ echo '</div>';
+ echo '</div>';
+ }
+
+ $this->jsTreePrikazHierarhije();
+ } else {
+ echo '<h3>' . $this->lang['srv_hierarchy_nothing'] . '</h3>';
+ }
+ }
+
+ /**
+ * Izris forme za gradnjo hierarhije uporabnik na določenem nivoju
+ *
+ * @param array $results
+ *
+ * @return echo html
+ */
+ private function vpisHierarhijeUporabnikTabela($results)
+ {
+ echo '<div id="vue-gradnja-hierarhije">';
+
+ // Kadar nimamo vpisanih šifrantov
+ echo '<div v-if="podatki[0].sifranti[0].sifrant == null" style="padding:10px 0">';
+ echo $this->lang['srv_hierarchy_empty_drop_downs'];
+ echo '</div>';
+
+ echo '<div class="vpis-sifrantov" v-else>';
+ echo '<table class="tabela-obroba tabela-vpis-sifrantov">';
+
+ echo '<thead>';
+ echo '<tr>';
+ foreach ($results['nivoji'] as $key => $nivo) {
+ $array_key = array_keys($results['nivoji']);
+ if ($key == end($array_key)) {
+ echo '<th style="border-right: none;">' . $nivo['level'] . '. nivo - ' . $nivo['ime'] . '</th>';
+ } else {
+ echo '<th>' . $nivo['level'] . '. nivo - ' . $nivo['ime'] . '</th>';
+ }
+ }
+ echo '<th style="border-left: none;">Evalviranec</th>';
+ echo '</tr>';
+ echo '</thead>';
+
+ echo '<tbody>';
+ echo '<tr>';
+
+ // Če je uporabnik izbran na določen nivo, potem pred tem naredimo fiksna polja z input disabled
+ echo '<td style="width: auto;vertical-align: top;" v-for="struktura in user.struktura">';
+ echo '<div style="font-weight: bold;margin: 5px 0;text-align: center;">{{ struktura.ime }}</div>';
+ echo '</td>';
+
+ echo '<td v-for="nivo in podatki" v-if="nivo.level > user.uporabnik.level" style="width: auto;vertical-align: top;">';
+ // Prikažemo Select2, samo če je 1 nivo in celotne js oz. spletna stran naložena - v kolikor je počasna povezava potem nekaj časa potrebuje, da naloži tudi select2
+ echo '<div v-show="pageLoadComplete && (izbran.strukturaId[nivo.level -1] > 0 || izbran.sifrant[nivo.level-1] > 0)">';
+ echo '<div class="h-select2">
+ <select class="select2" v-select="izbran.sifrant[nivo.level]" data-level="{{ nivo.level }}">
+ <option value="0"> --- </option>
+ <option v-for="s in nivo.sifranti" :value="s.id" >{{ s.sifrant }}</option>
+ </select>
+ </div>';
+ echo '<div class="h-uporabnik" v-show="izbran.sifrant[nivo.level] > 0" v-on:click="prikaziVnosOseb(nivo.level)">
+ <span v-if="nivo.level == podatki.maxLevel" class="icon user-red"></span>
+ <span v-else class="faicon users icon-as_link"></span>
+ </div>';
+ echo '</div>';
+
+ // Prikažemo že dodane uporabnike in tudi uporabnike samo dodane v virtual dom
+ echo '<div class="h-uporabnik-prikazi" v-if="osebe.show[nivo.level] && (nivo.level < podatki.maxLevel)">';
+ echo 'Uporabnik/i:';
+ echo '<ul>';
+ // Seznam uporabnikov, ki so že v bazi in jih samo prikličemo
+ echo '<li v-for="uporabnik in izbran.sifrantPodatki[nivo.level].uporabniki">{{ uporabnik.email }}
+ <span v-if="uporabnik.ime != uporabnik.email">({{ uporabnik.ime }} {{ uporabnik.priimek }})</span>
+ <span class="icon brisi-x"
+ v-on:click="izbrisiUporabnikaIzBaze(uporabnik.id, $index, nivo.level)"
+ v-if="osebe.nivo < podatki.maxLevel"
+ ></span>
+ </li>';
+ // Seznam uporabnikov, ki jih še ni v bazi in so bili na novo dodani
+ echo '<li v-for="oseba in osebe.nove[nivo.level]">{{ oseba[0] }} <span v-if="oseba[1]">({{ oseba[1] }} {{ oseba[2] }})</span> <span class="icon brisi-x" v-on:click="izbrisiUporabnika(nivo.level)" ></span></li>';
+ echo '</ul>';
+ echo '</div>';
+ echo '</td>';
+ echo '<td style="vertical-align: top;padding: 13px;color:#ffa608;border-left: none;">';
+ // Seznam uporabnikov, ki so že v bazi in jih samo prikličemo
+ echo '<div v-for="uporabnik in izbran.sifrantPodatki[podatki.maxLevel].uporabniki">{{ uporabnik.email }}
+ <span v-if="uporabnik.ime != uporabnik.email">({{ uporabnik.ime }} {{ uporabnik.priimek }})</span>
+ </div>';
+ // Seznam uporabnikov, ki jih še ni v bazi in so bili na novo dodani
+ echo '<div v-for="oseba in osebe.nove[podatki.maxLevel]">{{ oseba[0] }} <span v-if="oseba[1]">({{ oseba[1] }} {{ oseba[2] }})</span> <span class="icon brisi-x" v-on:click="izbrisiUporabnika(podatki.maxLevel)" style="margin-left: 10px;"></span></div>';
+ echo '</td>';
+ echo '</tr>';
+ echo '<tr id="gumb">
+ <td colspan="' . (sizeof($results['nivoji']) + 1) . '">
+ <button type="button" class="btn btn-moder" v-on:click="submitSifrante()">Potrdi in prenesi</button>
+ </td>
+ </tr>';
+ echo '</tbody>';
+ echo '</table>';
+ echo '</div>';
+
+ // možnost vpisa osebe za določen nivo
+ echo '<div style="padding-top:26px;clear: both;display: block;" v-if="osebe.prikazi">';
+ echo '<div class="okvircek">';
+ echo '<h2>Vnos oseb za {{ osebe.nivo }}. nivo:</h2>';
+ echo '<div>';
+ echo $this->lang['srv_hierarchy_add_users'] . '
+ <div style="padding:15px 0;">
+ <textarea name="emails" style="height:100px; width:100%;"
+ v-if="osebe.nivo < podatki.maxLevel"
+ v-model="osebe.textarea"
+ v-on:keyup.enter="preveriPravilnostEmaila()"
+ ></textarea>
+ <input type="text"
+ name="emails"
+ style="height: 16px; width:100%;"
+ v-else
+ v-model="osebe.textarea"
+ v-on:keyup.enter="preveriPravilnostEmaila()"
+ />
+ </div>
+ <div class="h-opozorilo">*Polje email je obvezno polje za zadnji nivo.</div>
+ <div v-if="email.opozorilo" style="color:red;font-style:italic;padding: 0 0 10px;"><ul><li v-for="email in email.napake">Elektronski naslov <b>{{ email.naslov }}</b> v vrstici <b>{{ email.vrstica }}</b> ni pravilen.</li></ul></div>
+ ';
+ echo '</div>';
+ echo '<button type="button" class="btn btn-moder" v-on:click="vpisOsebNaNivoTextarea()">Vnesi osebe</button>';
+ echo '</div>';
+ echo '</div>';
+
+
+ // Prikažemo Datatables rezultate samo za zdanji nivo;
+ echo '<div style="padding-top:26px;clear: both;display: block;">';
+ echo '<h2>Prikaz zgrajene hierarhije:</h2>';
+ echo '<table id="vpis-sifrantov-admin-tabela" class="tabela-obroba">';
+ echo '<thead>';
+ echo ' <tr>';
+ foreach ($results['nivoji'] as $key => $nivo) {
+ echo '<th style="text-align: left;">' . $nivo['level'] . '.nivo: ' . $nivo['ime'] . '</th>';
+ }
+ echo '<th style="width: 120px;"> </th>';
+ echo '</tr>';
+ echo '</thead>';
+ echo '<tbody>';
+ echo '<tbody>';
+ echo '</table>';
+ echo '</div>';
+ echo '</div>';
+ }
+
+ /**
+ * Izris forme za gradnjo hierarhije Superadmin
+ *
+ * @param array $results
+ *
+ * @return echo html
+ */
+ private function vpisHierarhijeAdminTabela($results)
+ {
+ global $site_url;
+
+ echo '<div id="vue-gradnja-hierarhije">';
+ // Kadar nimamo vpisanih šifrantov
+ echo '<div v-if="podatki[0].sifranti[0].sifrant == null" style="padding:10px 0">';
+ echo $this->lang['srv_hierarchy_empty_drop_downs'];
+ echo '</div>';
+
+ echo '<div class="vpis-sifrantov" v-else><table class="tabela-obroba tabela-vpis-sifrantov">';
+ echo '<thead>';
+ echo '<tr>';
+ foreach ($results['nivoji'] as $key => $nivo) {
+ $polje_kljuci = array_keys($results['nivoji']);
+ if ($key == end($polje_kljuci)) {
+ echo '<th style="border-right: none;">' . $nivo['level'] . '. nivo - ' . $nivo['ime'] . '</th>';
+ } else {
+ echo '<th>' . $nivo['level'] . '. nivo - ' . $nivo['ime'] . '</th>';
+ }
+ }
+ echo '<th style="border-left: none;">Evalviranec</th>';
+ echo '</tr>';
+ echo '</thead>';
+ echo '<tbody>';
+ echo '<tr>';
+ echo '<td v-for="nivo in podatki" style="width: auto;vertical-align: top; border-right:none;">';
+ // Prikažemo Select2, samo če je 1 nivo in celotne js oz. spletna stran naložena - v kolikor je počasna povezava potem nekaj časa potrebuje, da naloži tudi select2
+ echo '<div v-show="prikaziJsKoSeJeCelaSpletnaStranZeNalozila(nivo.level)">';
+
+ echo '<div class="h-select2">
+ <select class="select2" v-select="izbran.sifrant[nivo.level]" data-level="{{ nivo.level }}">
+ <option value="0"> --- </option>
+ <option v-for="s in nivo.sifranti" :value="s.id">{{ s.sifrant }}</option>
+ </select>
+ </div>';
+
+ echo '<div class="h-uporabnik" v-show="aliPrikazemIkonoZaDodajanjeUporabnikov(nivo.level)" v-on:click="prikaziVnosOseb(nivo.level)">
+ <span v-if="nivo.level == podatki.maxLevel" class="icon user-red"></span>
+ <span v-else class="faicon users icon-as_link"></span>
+ </div>';
+
+ echo '<div class="h-select2 izberi-uporabnika" v-if="prikaziSelectZaZadnjiNivo(nivo.level)">
+ <select class="select2" id="izbira-uciteljev" v-select="user.selected" v-on:change="vpisemoUporabnikaIzDropDownMenija()">
+ <option value="0"> --- </option>
+ <option v-for="user in user.dropdown" :value="user.id">{{ user.label }}</option>
+ </select>
+ </div>';
+
+ echo '</div>';
+
+
+ // Prikažemo že dodane uporabnike in tudi uporabnike samo dodane v virtual dom
+ echo '<div class="h-uporabnik-prikazi" v-if="osebe.show[nivo.level] && (nivo.level < podatki.maxLevel)">';
+ echo 'Uporabnik/i:';
+ echo '<ul>';
+ // Seznam uporabnikov, ki so že v bazi in jih samo prikličemo
+ echo '<li v-for="uporabnik in izbran.sifrantPodatki[nivo.level].uporabniki">{{ uporabnik.email }}
+ <span v-if="uporabnik.ime != uporabnik.email">({{ uporabnik.ime }} {{ uporabnik.priimek }})</span>
+ <span class="icon brisi-x"
+ v-on:click="izbrisiUporabnikaIzBaze(uporabnik.id, $index, nivo.level)"
+ v-if="nivo.level < podatki.maxLevel"
+ ></span>
+ </li>';
+ // Seznam uporabnikov, ki jih še ni v bazi in so bili na novo dodani
+ echo '<li v-for="oseba in osebe.nove[nivo.level]">{{ oseba[0] }} <span v-if="oseba[1]">({{ oseba[1] }} {{ oseba[2] }})</span> <span class="icon brisi-x" v-on:click="izbrisiUporabnika(nivo.level)" ></span></li>';
+ echo '</ul>';
+ echo '</div>';
+ echo '</td>';
+ echo '<td style="vertical-align: top;padding: 13px;color:#ffa608; border-left: none;">';
+ echo '<div v-if="izbran.sifrantPodatki[podatki.maxLevel]">';
+ // Seznam uporabnikov, ki so že v bazi in jih samo prikličemo
+ echo '<div v-for="uporabnik in izbran.sifrantPodatki[podatki.maxLevel].uporabniki">{{ uporabnik.email }}
+ <span v-if="uporabnik.ime != uporabnik.email">({{ uporabnik.ime }} {{ uporabnik.priimek }})</span>
+ </div>';
+ // Seznam uporabnikov, ki jih še ni v bazi in so bili na novo dodani
+ echo '<div v-for="oseba in osebe.nove[podatki.maxLevel]">{{ oseba[0] }} <span v-if="oseba[1]">({{ oseba[1] }} {{ oseba[2] }})</span> <span class="icon brisi-x" v-on:click="izbrisiUporabnika(podatki.maxLevel)" style="margin-left: 10px;"></span></div>';
+ echo '</div>';
+ echo '</td>';
+ echo '</tr>';
+ echo '<tr id="gumb">
+ <td colspan="' . (sizeof($results['nivoji']) + 1) . '">
+ <button type="button" class="btn btn-moder" v-on:click="submitSifrante()">Potrdi in prenesi</button>
+ </td>
+ </tr>';
+ echo '</tbody>';
+ echo '</table>';
+ echo '<div class="error-email" style="display: none;" v-if="preveriCejeEmailZeVnesenVbazoZaUcitelja(podatki.maxLevel)"><span class="faicon warning icon-orange"></span> Elektronski naslov za zadnji nivo je že vnešen v bazo.</div>';
+ echo '</div>';
+
+ // možnost vpisa osebe za določen nivo
+ echo '<div style="padding-top:26px;clear: both;display: block;" v-if="osebe.prikazi">';
+ echo '<div class="okvircek">';
+ echo '<h2 v-if="osebe.nivo < podatki.maxLevel">Vnos oseb za {{ osebe.nivo }}. nivo ​– managerji z vpogledom v rezultate (?)</h2>';
+ echo '<h2 v-else class="oranzna">​Vnos osebe na zadnjem nivoju - učitelj, ki bo evalviran (?)</h2>';
+ echo '<div>';
+ echo '<p v-if="osebe.nivo < podatki.maxLevel">' . $this->lang['srv_hierarchy_add_users'] . '</p>';
+ echo '<p v-else>' . $this->lang['srv_hierarchy_add_users_last'] . '</p>';
+ echo '<div style="padding:15px 0;">';
+ echo '<textarea name="emails" style="height:100px; width:100%;"
+ v-if="osebe.nivo < podatki.maxLevel"
+ v-model="osebe.textarea"
+ v-on:keyup.enter="preveriPravilnostEmaila()"
+ ></textarea>
+ <input type="text"
+ name="emails"
+ style="height: 16px; width:100%;"
+ v-if="osebe.nivo == podatki.maxLevel"
+ v-model="osebe.textarea"
+ v-on:keyup.enter="preveriPravilnostEmaila()"
+ />
+ </div>
+ <div class="h-opozorilo">*Polje email je obvezno polje za zadnji nivo.</div>
+ <div v-if="email.opozorilo" style="color:red;font-style:italic;padding: 0 0 10px;"><ul><li v-for="email in email.napake">Elektronski naslov <b>{{ email.naslov }}</b> v vrstici <b>{{ email.vrstica }}</b> ni pravilen.</li></ul></div>';
+ echo '</div>';
+ echo '<button type="button" class="btn btn-moder" v-on:click="vpisOsebNaNivoTextarea()">
+ <span v-if="osebe.nivo < podatki.maxLevel">Vnos oseb</span>
+ <span v-else>Vnos osebe</span>
+ </button>';
+ echo '</div>';
+ echo '</div>';
+
+
+ // Prikažemo Datatables rezultate samo za zdanji nivo;
+ echo '<div id="div-datatables" style="padding-top:26px;clear: both;display: block;">';
+ echo '<h2>Prikaz zgrajene hierarhije:</h2>';
+ // Vklopimo prikaz pomoči in števila vnoso uporabnikov
+ echo '<div class="help-text" style="width: 100%">';
+ $this->prikaziStUporabnikovNaZadnjemNivojuHelp();
+ echo '</div>';
+
+ echo '<div class="uporabniki-ikona-tabela"
+ title="Zamenjaj uporabnika na zadnjem nivoju"
+ onclick="zamenjajUporabnikaZNovim()"
+ >
+ <div class="btn btn-moder">' . $this->lang['srv_hierarchy_btn_find_and_replace'] . '</div>
+ </div>';
+ echo '<div class="uporabniki-ikona-tabela"
+ title="CSV izvoz uporabnikov"
+ style="padding: 0 10px;"
+ >
+ <a href="index.php?anketa=' . $this->anketa . '&a=' . ($this->hierarhija_type < 5 ? A_HIERARHIJA_SUPERADMIN : A_HIERARHIJA) . '&m=uredi-uporabnike&izvoz=1" class="btn btn-moder">Izvoz uporabnikov</a>
+ </div>';
+ echo '<table id="vpis-sifrantov-admin-tabela" class="tabela-obroba">';
+ echo '<thead>';
+ echo ' <tr>';
+ foreach ($results['nivoji'] as $key => $nivo) {
+ echo '<th style="text-align: left;">' . $nivo['level'] . '.nivo: ' . $nivo['ime'] . '</th>';
+ }
+ echo '<th style="width: 70px;"> </th>';
+ echo '</tr>';
+ echo '</thead>';
+ echo '<tbody>';
+ echo '<tbody>';
+ echo '</table>';
+ echo '<div style="display:block; margin:25px -20px; padding-bottom:25px; width: 100%;">';
+ echo '<button class="btn btn-moder"
+ style="float: right;"
+ onclick="opozoriUporabnikaKerNiPotrdilPodatkov(\'index.php?anketa=' . $this->anketa . '&amp;a=' . A_HIERARHIJA_SUPERADMIN . '&amp;m=' . M_ADMIN_AKTIVACIJA . '\')"
+ title="' . $this->lang['srv_hierarchy_status'] . '">';
+ echo $this->lang['next1'] . '</button>';
+ echo '</div>';
+ echo '</div>';
+ echo '</div>';
+ }
+
+ /**
+ * Prikažemo število vseh uporabnikov na zadnjem nivoju, število unikatnih
+ * učiteljev in število predmetov
+ *
+ * @return html
+ */
+ private function prikaziStUporabnikovNaZadnjemNivojuHelp()
+ {
+
+ $id = (new HierarhijaQuery())->getDeleteHierarhijaOptions($this->anketa, 'srv_hierarhija_shrani_id', NULL, NULL, FALSE);
+ // Če ne dobimo ID-ja
+ if (empty($id)) {
+ return NULL;
+ }
+
+ $sql_st_uciteljev = sisplet_query("SELECT st_uciteljev FROM srv_hierarhija_shrani WHERE id='" . $id . "' AND anketa_id='" . $this->anketa . "'", "obj");
+
+ // Prešteje število unikatnih učiteljev
+ $unikatni_uporabniki = (new HierarhijaOnlyQuery())->queryStrukturaUsers($this->anketa, ' AND hs.level=(SELECT MAX(level) FROM srv_hierarhija_struktura WHERE anketa_id=' . $this->anketa . ') GROUP BY users.id');
+ $st_unikatnih_uporabnikov = mysqli_num_rows($unikatni_uporabniki);
+
+ // Prešteje število unikatnih predmetov
+ $unikatni_predmeti = (new HierarhijaOnlyQuery())->queryStrukturaUsers($this->anketa, ' AND hs.level=(SELECT MAX(level) FROM srv_hierarhija_struktura WHERE anketa_id=' . $this->anketa . ') GROUP BY hs.hierarhija_sifranti_id');
+ $st_unikatnih_predmetov = mysqli_num_rows($unikatni_predmeti);
+
+ echo $this->lang['srv_hierarchy_user_help_1_1'];
+ echo ' ' . $sql_st_uciteljev->st_uciteljev . ' ';
+ echo $this->lang['srv_hierarchy_user_help_1_2'];
+ echo ' ' . $st_unikatnih_uporabnikov . ' ' . $this->lang['srv_hierarchy_user_help_1_3'] . ' ' . $st_unikatnih_predmetov . ' ' . $this->lang['srv_hierarchy_user_help_1_4'];
+
+ }
+
+ /**
+ * Prikaže tabelo za gradnjo hierarhije uporabnikov
+ */
+ public function displayHierarhijaUporabnikiTabela()
+ {
+ SurveySetting::getInstance()->Init($this->anketa);
+ $row = SurveyInfo::getInstance()
+ ->getSurveyRow(); //("SELECT * FROM srv_anketa WHERE id='$this->anketa'")
+
+ $max_st_nivojev = (new HierarhijaOnlyQuery())->getSifrantiRavni($this->anketa, ', MAX(level) AS max', NULL);
+
+
+ //preverimo število nivojev v kolikor jih ni potem nimamo še podatka o vnesenih šifrantih
+ if (!empty($max_st_nivojev) && !is_null($max_st_nivojev = $max_st_nivojev->fetch_object()->max) && SurveyInfo::getSurveyModules('hierarhija') == 1) {
+ // Pridobimo ime hierarhije
+ $aktivna_hierarhija_ime = (new HierarhijaQuery())->getDeleteHierarhijaOptions($this->anketa, 'aktivna_hierarhija_ime', NULL, NULL, FALSE);
+
+ echo '<h2>Izgradnja hierarhije <span class="oranzan">' . (!empty($aktivna_hierarhija_ime) ? $aktivna_hierarhija_ime : '') . '</span> za anketo: ' . $row['naslov'] . '</h2>';
+
+ //vnosni obrazec za izgradnjo hierarhije
+ echo '<div class="izgradnja_hierarhije">';
+
+ //pravice za gradnjo hierarhije v kolikor uporabnik ni super admin (type večji kot 5)
+ if ($this->hierarhija_type > 4) {
+
+ $sql = HierarhijaOnlyQuery::queryStrukturaUsersLevel($this->anketa, $this->user, 'ASC');
+ //pridobimo največji nivo uporabnika ter id-je strukture
+ while ($struktura = $sql->fetch_object()) {
+ ## pridobimo največji nivo uporabnika ter id-je strukture za posamezen vpis
+ if (!isset($level) || $struktura->level < $level) {
+ $level = $struktura->level;
+ }
+
+ $struktura_nivo[] = $struktura->parent_id;
+ $struktura_nivo[] = $struktura->struktura_id;
+ }
+
+ $struktura_parent = (new HierarhijaOnlyQuery())->queryStruktura($this->anketa, NULL, NULL, 'id DESC');
+ while ($obj = $struktura_parent->fetch_object()) {
+ //v polje vnesemo samo id strukture, ki je višja od trenutnega nivoja uporabnika
+ if (isset($obj) && in_array($obj->id, $struktura_nivo)) {
+ $struktura_nivo[] = $obj->parent_id; //tu povnimo parent_id, da lahko potem poiščemo celotno strukturo
+ $struktura_sifrant_id[] = $obj->sifrant_id; // narredimo polje z vsemi ID, sifrantov, ki so že vpisani za hierarhijo
+ }
+ }
+
+ }
+ $results = (new HierarhijaQuery())->getSifrantAdmin($this->anketa);
+
+ if (!is_null($results)) {
+ // echo '<form id="h-submit">';
+ // echo '<input type="hidden" value="' . $this->anketa . '" id="anketa_id" name="anketa_id">';
+ //
+ // if (isset($level)) {
+ // $this->vpisHierarhijeTabela($results, $level, $struktura_sifrant_id);
+ // } else {
+ // $this->vpisHierarhijeTabela($results, null, null, $max_st_nivojev);
+ // }
+
+ // echo '<form id="h-submit">';
+ // echo '<input type="hidden" value="' . $this->anketa . '" id="anketa_id" name="anketa_id">';
+ //
+ // if (isset($level)) {
+ // $this->vpisHierarhijeAdmin($results, $level, $struktura_sifrant_id);
+ // } else {
+ // $this->vpisHierarhijeAdmin($results);
+ // }
+ //
+ //
+ // echo '<div class="h-form-field">
+ // <label id="check-uporabnik">Dodaj uporabnika na izbran nivo:</label>
+ // <div class="h-form-options">
+ // <input type="checkbox" name="email-check" value="1" id="dovoli-vpis-emaila"/>
+ // </div>
+ // </div>';
+ //
+ // echo '<div class="h-form-field" id="vpis-emaila">
+ // <label>' . $this->lang['srv_hierarchy_add_users'] . '</label>
+ // <div class="h-form-options h-email-user">
+ // <textarea name="emails"></textarea>
+ // </div>
+ // <div class="h-opozorilo">*Polje email je obvezno polje za zadnji nivo.</div>
+ // </div>';
+ //
+ // echo '<div class="h-form-field" style="padding-left: 35em; clear: both;">
+ // <input type="submit" value="Vnesi">
+ // </div>';
+ // echo '</form>';
+
+ }
+
+
+ echo '</div>';
+
+ //prikaži JS Tree s trenutno hierarhijo
+ $this->jsTreePrikazHierarhije();
+ } elseif (!empty($max_st_nivojev) && SurveyInfo::getSurveyModules('hierarhija') == 2) {
+ echo '<h3>' . $this->lang['srv_hierarchy_active_text'] . '</h3>';
+ $this->jsTreePrikazHierarhije();
+ } else {
+ echo '<h3>' . $this->lang['srv_hierarchy_nothing'] . '</h3>';
+ }
+
+ }
+
+ public function statistikaHierjearhije()
+ {
+ if ($this->hierarhija_type < 5) {
+ return $this->statistikaAdminHierarhije();
+ }
+
+ if ($this->hierarhija_type == 10) {
+ return $this->statistikaUcitelj();
+ }
+
+ echo $this->lang['srv_hierarchy_only_teachers'];
+ }
+
+ /**
+ * Prikaz statisti za vse ankete brez kod, ker administrator nima pravice do
+ * vpolgeda teh kod
+ */
+
+ public function statistikaAdminHierarhije()
+ {
+ echo '<div id="hierarhija-status">';
+
+ if (SurveyInfo::getSurveyModules('hierarhija') == 2) {
+ echo '<div class="status-gumbi">';
+ echo '<button class="btn btn-moder" onclick="prikaziUrejanjeSuperkode()">Vključi izdelavo superšifre</button>';
+ echo '</div>';
+ }
+
+ echo '<div class="tabela-status">';
+ echo '<table class="hierarhija-status-admin custom-datatables printElement printTable" id="hierarhija-status-admin">';
+ echo '<thead>';
+ echo '<tr>
+ <th rowspan="2" class="anl_br anl_ac anl_bck anl_variabla_line anl_bb auto-width" style="width:90px;">Izberi učitelja za generiranje super šifre</th>
+ <th rowspan="2" class="anl_br anl_ac anl_bck anl_variabla_line anl_bb auto-width">Hierarhija</th>
+ <th rowspan="2" class="anl_br anl_ac anl_bck anl_variabla_line anl_bb">Email učitelja</th>
+ <th rowspan="2" class="anl_br anl_ac anl_bck anl_variabla_line anl_bb">Koda za učence</th>
+ <th colspan="3" style="text-align: center;" class="anl_br anl_ac anl_bck anl_variabla_line anl_bb">Status učencev</th>
+ <th colspan="2" style="text-align: center;" class="anl_br anl_ac anl_bck anl_variabla_line anl_bb">Časovni potek učencev</th>';
+ echo '<th rowspan="2" class="anl_br anl_ac anl_bck anl_variabla_line anl_bb" style="border-left:2px solid #fa4913 !important;">Koda za učitelja</th>';
+ echo '<th rowspan="2" class="anl_br anl_ac anl_bck anl_variabla_line anl_bb">Vnos učitelja (datum)</th>
+ </tr>';
+ echo '<tr>
+ <th class="anl_br anl_ac anl_bck anl_variabla_line anl_bb">' . $this->lang['srv_userstatus_5ll'] . '</th>
+ <th class="anl_br anl_ac anl_bck anl_variabla_line anl_bb">' . $this->lang['srv_userstatus_5'] . '</th>
+ <th class="anl_br anl_ac anl_bck anl_variabla_line anl_bb">' . $this->lang['srv_userstatus_6'] . '</th>
+ <th class="anl_br anl_ac anl_bck anl_variabla_line anl_bb">Prvi vnos</th>
+ <th class="anl_br anl_ac anl_bck anl_variabla_line anl_bb">Zadnji vnos</th>
+ </tr>';
+ echo '</thead>';
+ echo '<tbody>';
+
+ $body = HierarhijaIzvoz::getInstance($this->anketa)->getStatus(TRUE);
+
+ if (is_null($body)) {
+ return '';
+ }
+
+ foreach ($body as $id_koda => $row) {
+ echo '<tr>';
+ echo '<td style="text-align: center;">
+ <input type="checkbox" value="' . $id_koda . '" class="koda-za-kosarico" onclick="dodajKodoVKosarico(\'' . $id_koda . '\')"/>
+ </td>';
+
+ // Izrišemo vse stolpce v omenjeni vrstici
+ foreach ($row as $key => $podatek) {
+ if ($key == 0 || $key == 1) {
+
+ echo '<td ' . ($key == 0 ? 'data-hierarhija' : 'data-email') . '="' . $id_koda . '">' . $podatek . '</td>';
+
+ } elseif ($key == 2 || $key == 8) {
+
+ echo '<td style="text-align:center; letter-spacing:1px; ' . ($key == 2 ? 'color:#1e88e5;' : NULL) . ($key == 8 ? 'border-left:2px solid #fa4913 !important;' : NULL) . '">' . $podatek . '</td>';
+
+ } else {
+
+ echo '<td style="text-align:center;">' . $podatek . '</td>';
+
+ }
+
+ }
+
+ echo '</tr>';
+ }
+
+ echo '</tbody>';
+ echo '</table>';
+ echo '</div>';
+
+ echo '<div class="analysis_bottom_settings">
+
+ <a href="#" onclick="printElement(\'Status\'); return false;" title="Natisni" class="srv_ico">
+ <span class="faicon print icon-grey_dark_link"></span>
+ </a>
+
+ <a href="index.php/?anketa=' . $this->anketa . '&a=' . A_HIERARHIJA_SUPERADMIN . '&m=' . M_HIERARHIJA_STATUS . '&izvoz=status" title="CSV izvoz" class="srv_ico">
+ <span class="sprites xls_large"></span>
+ </a>
+
+ </div>';
+
+ echo '</div>';
+
+ // košarica s kodami
+ echo '<div class="superkode">';
+ echo '<div class="kosarica" style="display: none;">';
+ echo '<h2>Tranutno izbrane kode:</h2>';
+ echo '<ul id="seznamKod"></ul>';
+ echo '<button class="btn btn-moder" id="ustvari-superkodo">Ustvari novo super kodo</button>';
+ echo '</div>';
+
+ echo '<div class="prikaz-superkod" style="display: none;">
+ <h2>Superkode</h2>
+ <table class="hierarhija-tabela">
+ <thead>
+ <tr>
+ <th class="anl_br anl_ac anl_bck anl_variabla_line anl_bb auto-width">Superkoda</th>
+ <th class="anl_br anl_ac anl_bck anl_variabla_line anl_bb auto-width">Seznam hierarhije, ki jih pokriva</th>
+ </tr>
+ </thead>
+ <tbody></tbody>
+ </table>
+ </div>';
+ echo '</div>';
+ }
+
+ /**
+ * Prikaže tabelo s kodami za učitelja in učence skupaj s s statističnimi
+ * podatki
+ */
+
+ protected function statistikaUcitelj()
+ {
+ if (!$this->upravicenDoSamoevalvacije()) {
+ die();
+ }
+
+ echo '<table class="hierarhija-status-ucitelji printElement">';
+ echo '<thead>';
+ echo '<tr>
+ <th rowspan="2" class="anl_br anl_ac anl_bck anl_variabla_line anl_bb">Hierarhija</th>';
+ echo '<th rowspan="2" class="anl_br anl_ac anl_bck anl_variabla_line anl_bb">Koda za učence</th>';
+
+ echo '<th rowspan="2" class="anl_br anl_ac anl_bck anl_variabla_line anl_bb">Koda za učitelja</th>
+ <th colspan="3" style="text-align: center;" class="anl_br anl_ac anl_bck anl_variabla_line anl_bb">Status učencev</th>
+ <th colspan="2" style="text-align: center;" class="anl_br anl_ac anl_bck anl_variabla_line anl_bb">Časovni potek učencev</th>
+ <th rowspan="2" class="anl_br anl_ac anl_bck anl_variabla_line anl_bb">Vnos učitelja (datum)</th>
+ </tr>';
+ echo '<tr>
+ <th class="anl_br anl_ac anl_bck anl_variabla_line anl_bb">' . $this->lang['srv_userstatus_5ll'] . '</th>
+ <th class="anl_br anl_ac anl_bck anl_variabla_line anl_bb">' . $this->lang['srv_userstatus_5'] . '</th>
+ <th class="anl_br anl_ac anl_bck anl_variabla_line anl_bb">' . $this->lang['srv_userstatus_6'] . '</th>
+ <th class="anl_br anl_ac anl_bck anl_variabla_line anl_bb">Prvi vnos</th>
+ <th class="anl_br anl_ac anl_bck anl_variabla_line anl_bb">Zadnji vnos</th>
+
+ </tr>';
+ echo '</thead>';
+ echo '<tbody>';
+
+ //v kolikor imamo več URL-jev se pravi za več predmetov potem moramo izpisati sklope za vse predmete
+ $url_hierarhija = self::hierarhijaUrl($this->anketa);
+
+ // pridobimo podatke
+
+ foreach ($url_hierarhija as $struktura_id => $url) {
+ // pridobimo podatke o rešenih anketah samo za to strukturo
+ $cas = $this->pridobiStatisticnePodatke($struktura_id, 'ucenec');
+ $cas_ucitelj = $this->pridobiStatisticnePodatke($struktura_id, 'ucitelj');
+
+ $first_insert = NULL;
+ $last_insert = NULL;
+ $zacel_izpolnjevati = 0;
+ $delno_izpolnjena = 0;
+ $koncal_anketo = 0;
+
+ if (!is_null($cas)) {
+ foreach ($cas as $key => $row) {
+ if ($row['cas'] < $first_insert || $key == 0) {
+ $first_insert = $row['cas'];
+ }
+
+ if ($row['cas'] > $last_insert) {
+ $last_insert = $row['cas'];
+ }
+
+ // Končal anketo
+ if ($row['status'] == 6 && $row['lurker'] == 0) {
+ $koncal_anketo++;
+ }
+
+ // Delno izpolnjena
+ if ($row['status'] == 5 && $row['lurker'] == 0) {
+ $delno_izpolnjena++;
+ }
+
+ if ($row['lurker'] == 1) {
+ $zacel_izpolnjevati++;
+ }
+ }
+ }
+
+ echo '<tr>
+ <td>' . HierarhijaHelper::hierarhijaPrikazNaslovovpriUrlju($this->anketa, $struktura_id) . '</td>';
+
+ echo '<td style="text-align:center;color:#ffa608;">' . strtoupper(HierarhijaOnlyQuery::getKodaRow($this->anketa, $struktura_id)->koda) . '</td>';
+
+ echo '<td style="text-align:center;">' . strtoupper(HierarhijaOnlyQuery::getKodaRow($this->anketa, $struktura_id, 'ucitelj')->koda) . '</td>
+ <td style="text-align:center;">' . (!empty($zacel_izpolnjevati) ? $zacel_izpolnjevati : '/') . '</td>
+ <td style="text-align:center;">' . (!empty($delno_izpolnjena) ? $delno_izpolnjena : '/') . '</td>
+ <td style="text-align:center;">' . (!empty($koncal_anketo) ? $koncal_anketo : '/') . '</td>
+ <td style="text-align:center;">' . (!is_null($first_insert) ? date('d.m.Y, H:i', $first_insert) : '/') . '</td>
+ <td style="text-align:center;">' . (!is_null($last_insert) ? date('d.m.Y, H:i', $last_insert) : '/') . '</td>
+ <td style="text-align:center;">' . ((!is_null($cas_ucitelj['cas']) && $cas_ucitelj['status'] == 6 && $cas_ucitelj['lurker'] == 0) ? date('d.m.Y, H:i', $cas_ucitelj['cas']) : '/') . '</td>';
+
+ // V kolikor je hierarhija aktivna potem prikažemo možnost pregleda analiz
+ if ($this->modul['hierarhija'] > 1) {
+ echo '<td><a href="index.php?anketa=' . $this->anketa . '&a=' . A_HIERARHIJA . '&m=' . M_ANALIZE . '&s=' . $struktura_id . '" class="btn btn-moder">Poglej analizo</button></td>';
+ }
+ echo '</tr>';
+ }
+
+ echo '</tbody>';
+ echo '</table>';
+ }
+
+ /**
+ * Preverimo, če je uporabnik upravičen do samoevalvacije - je na zadnjem
+ * nivoju hierarhije
+ *
+ * @return boolean
+ */
+
+ public function upravicenDoSamoevalvacije()
+ {
+
+ $max_level = (new HierarhijaOnlyQuery())->getSifrantiRavni($this->anketa, ', MAX(level) AS max', NULL);
+ $user_level = HierarhijaOnlyQuery::queryStrukturaUsersLevel($this->anketa, $this->user, 'DESC');
+
+ if (!empty($user_level) && !empty($user_level) && $user_level->fetch_object()->level == $max_level->fetch_object()->max) {
+ return TRUE;
+ }
+
+ return FALSE;
+ }
+
+ /********** Prikaz in urejanje hierarhije END **********/
+
+ private function pridobiStatisticnePodatke($struktura_id, $vloga)
+ {
+
+ $url = sisplet_query("SELECT url FROM srv_hierarhija_koda WHERE anketa_id='" . $this->anketa . "' AND hierarhija_struktura_id='" . $struktura_id . "' AND vloga='" . $vloga . "'", "obj")->url;
+
+ // V kolikor anketa še ni bila aktivirana potem vrnemo null, ker nimamo še podatkov o izpolnjevanju
+ if (is_null($url)) {
+ return NULL;
+ }
+
+ parse_str($url, $nivoji);
+
+ $polje_iskanja = NULL;
+ foreach ($nivoji as $key => $nivo) {
+ if ($key == 'vloga') {
+ $polje_iskanja = $nivo;
+ } else {
+ $polje_iskanja .= ', ' . $nivo;
+ }
+ }
+
+ $db_table = (SurveyInfo::getInstance()
+ ->getSurveyColumn('db_table') == 1) ? '_active' : '';
+
+ // tukaj pridobimo podatke o anketi za določeno strukturo
+ // preverimov prvi in zadnji nivo
+ $sql_user = sisplet_query("SELECT time_insert, last_status, lurker FROM srv_data_vrednost" . $db_table . " as sa LEFT JOIN srv_user as us ON (sa.usr_id=us.id) WHERE vre_id IN (" . $polje_iskanja . ") GROUP BY usr_id HAVING COUNT(usr_id)=" . sizeof($nivoji));
+ $cas = [];
+
+ // V kolikor ni zapisov vrnemo prazno
+ if ($sql_user->num_rows == 0) {
+ return NULL;
+ }
+
+ while ($row = mysqli_fetch_object($sql_user)) {
+ $cas[] = [
+ 'cas' => strtotime($row->time_insert),
+ 'status' => $row->last_status,
+ 'lurker' => $row->lurker,
+ ];
+ }
+
+ if ($vloga == 'ucitelj') {
+ return $cas[0];
+ }
+
+
+ return (sizeof($cas) > 0 ? $cas : NULL);
+ }
+ /********** Prikaz in urejanje hierarhije END **********/
+
+ /**
+ * Prikaže glavni meni za super admina - userja, ki je aktiviral hierarhijo
+ *
+ * @return html
+ */
+ public function displayHierarhijaNavigationSuperAdmin()
+ {
+ if (is_null($this->hierarhija_type)) {
+ $this->hierarhija_type = HierarhijaHelper::preveriTipHierarhije($this->anketa);
+ }
+
+ // V kolikor nima pravic običjanega uporabnika potem ne prikažemo nič
+ if ($this->admin_type > 0 && (is_null($this->hierarhija_type) || $this->hierarhija_type > 4)) {
+ die();
+ }
+
+ $url = NULL;
+ if (!empty($_GET['m'])) {
+ $url = $_GET['m'];
+ }
+
+ // preverimo status hierarhije
+ $hierarchy_status = SurveyInfo::getSurveyModules('hierarhija');
+
+ echo '<div class="hierarhija-navigacija">';
+ echo '<ul>';
+
+ # zavihek urejanje hierarhije
+ echo '<li>';
+
+ echo '<a id="h-navbar-link" class="no-img side-right' . ($url == M_ADMIN_UREDI_SIFRANTE ? ' active' : '') . '"' . ' href="index.php?anketa=' . $this->anketa . '&amp;a=' . A_HIERARHIJA_SUPERADMIN . '&amp;m=' . M_ADMIN_UREDI_SIFRANTE . '"
+ title="' . ($hierarchy_status == 2 ? $this->lang['srv_hierarchy_code_active'] : $this->lang['srv_hierarchy_code']) . '">';
+ echo ($hierarchy_status == 2 ? $this->lang['srv_hierarchy_code_active'] : $this->lang['srv_hierarchy_code']) . '</a>';
+ echo '</li>';
+ echo '<li class="space"></li>';
+
+ # zavihek uredi uporabnike
+ echo '<li>';
+ echo '<a id="h-navbar-link"
+ class="no-img side-right' . ($url == M_UREDI_UPORABNIKE ? ' active' : '') . '"' . ' href="index.php?anketa=' . $this->anketa . '&amp;a=' . A_HIERARHIJA_SUPERADMIN . '&amp;m=' . M_UREDI_UPORABNIKE . '"
+ title="' . ($hierarchy_status == 2 ? $this->lang['srv_hierarchy_add_users_link_active'] : $this->lang['srv_hierarchy_add_users_link']) . '">';
+ echo ($hierarchy_status == 2 ? $this->lang['srv_hierarchy_add_users_link_active'] : $this->lang['srv_hierarchy_add_users_link']) . '</a>';
+ echo '</li>';
+ echo '<li class="space"></li>';
+
+ # zavihek AKTIVIRANJE ANEKTE v kolikor je bila že aktivirana potem izklop ni več mogoč
+ echo '<li>';
+ echo '<a id="h-navbar-link" class="no-img side-right' . ($url == M_ADMIN_AKTIVACIJA ? ' active' : '') . '"' . ' href="index.php?anketa=' . $this->anketa . '&amp;a=' . A_HIERARHIJA_SUPERADMIN . '&amp;m=' . M_ADMIN_AKTIVACIJA . '" title="' . $this->lang['srv_hierarchy_activation_link'] . '">';
+ echo $this->lang['srv_hierarchy_activation_link'] . '</a>';
+ echo '</li>';
+ echo '<li class="space"></li>';
+
+ # zavihek status
+ echo '<li>';
+ echo '<a id="h-navbar-link" class="no-img side-right' . ($url == M_HIERARHIJA_STATUS ? ' active' : '') . '"' . ' href="index.php?anketa=' . $this->anketa . '&amp;a=' . A_HIERARHIJA_SUPERADMIN . '&amp;m=' . M_HIERARHIJA_STATUS . '" title="' . $this->lang['srv_hierarchy_status'] . '">';
+ echo $this->lang['srv_hierarchy_status'] . '</a>';
+ echo '</li>';
+ echo '<li class="space"></li>';
+
+ # zavihek analize
+ if (HierarhijaHelper::preveriDostop($this->anketa) ) {
+ echo '<li>';
+ echo '<a id="h-navbar-link" class="no-img side-right' . ($url == M_ANALIZE ? ' active' : '') . '"' . ' href="index.php?anketa=' . $this->anketa . '&amp;a=' . A_HIERARHIJA_SUPERADMIN . '&amp;m=' . M_ANALIZE . '" title="' . $this->lang['srv_hierarchy_analysis_link'] . '">';
+ echo $this->lang['srv_hierarchy_analysis_link'] . '</a>';
+ echo '</li>';
+ echo '<li class="space"></li>';
+ }
+
+ # zavihek KOPIRANJE ankete
+ echo '<li>';
+ echo '<a id="h-navbar-link" class="no-img side-right' . ($url == M_ADMIN_KOPIRANJE ? ' active' : '') . '"' . ' href="index.php?anketa=' . $this->anketa . '&amp;a=' . A_HIERARHIJA_SUPERADMIN . '&amp;m=' . M_ADMIN_KOPIRANJE . '" title="' . $this->lang['srv_hierarchy_copy_link'] . '">';
+ echo $this->lang['srv_hierarchy_copy_link'] . '</a>';
+ echo '</li>';
+ echo '<li class="space"></li>';
+
+
+ echo '</ul>';
+ echo '</div>';
+
+ }
+
+ /**
+ * Prikaže glavni meni vse uporabnike, ki imajo pravico za dostop do
+ * hierarhije
+ *
+ * @return html
+ */
+ public function displayHierarhijaNavigation()
+ {
+ global $site_url;
+ // V kolikor nima pravic običjanega uporabnika potem ne prikažemo nič
+ if (is_null($this->hierarhija_type) || $this->hierarhija_type < 5) {
+ die();
+ }
+
+ $url = NULL;
+ if (!empty($_GET['m'])) {
+ $url = $_GET['m'];
+ }
+
+
+ $hierarchy_status = SurveyInfo::getSurveyModules('hierarhija');
+
+ echo '<div class="hierarhija-navigacija ucitelji">';
+ echo '<ul>';
+
+ # zavihek uredi uporabnike
+ echo '<li>';
+ echo '<a id="h-navbar-link" class="no-img side-right' . ($url == M_UREDI_UPORABNIKE ? ' active' : '') . '"' . ' href="index.php?anketa=' . $this->anketa . '&amp;a=' . A_HIERARHIJA . '&amp;m=' . M_UREDI_UPORABNIKE . '"
+ title="' . ($hierarchy_status == 2 ? $this->lang['srv_hierarchy_add_users_link_active'] : $this->lang['srv_hierarchy_add_users_link']) . '">';
+ echo ($hierarchy_status == 2 ? $this->lang['srv_hierarchy_add_users_link_active'] : $this->lang['srv_hierarchy_add_users_link']) . '</a>';
+ echo '</li>';
+ echo '<li class="space"></li>';
+
+ # zavihek status
+ echo '<li>';
+ echo '<a id="h-navbar-link" class="no-img side-right' . ($url == M_HIERARHIJA_STATUS ? ' active' : '') . '"' . ' href="index.php?anketa=' . $this->anketa . '&amp;a=' . A_HIERARHIJA . '&amp;m=' . M_HIERARHIJA_STATUS . '" title="' . $this->lang['srv_hierarchy_status'] . '">';
+ echo $this->lang['srv_hierarchy_status'] . '</a>';
+ echo '</li>';
+ echo '<li class="space"></li>';
+
+ # zavihek analize
+ echo '<li>';
+ echo '<a id="h-navbar-link" class="no-img side-right' . ($url == M_ANALIZE ? ' active' : '') . '"' . ' href="index.php?anketa=' . $this->anketa . '&amp;a=' . A_HIERARHIJA . '&amp;m=' . M_ANALIZE . '" title="' . $this->lang['srv_hierarchy_analysis_link'] . '">';
+ echo $this->lang['srv_hierarchy_analysis_link'] . '</a>';
+ echo '</li>';
+ echo '<li class="space"></li>';
+
+
+ # url naslov
+ echo '<li class="hierarhija-desni-link">';
+ echo '<span>' . $this->lang['srv_hierarchy_link_name'] . '</span>';
+ echo '<a id="h-navbar-link" class="no-img side-right" href="' . $site_url . 'sa" target="_blank">';
+ echo $site_url . 'sa</a>';
+ echo '</li>';
+
+ echo '</ul>';
+ echo '</div>';
+
+ }
+
+} \ No newline at end of file
diff --git a/admin/survey/modules/mod_hierarhija/class/HierarhijaHelper.php b/admin/survey/modules/mod_hierarhija/class/HierarhijaHelper.php
new file mode 100644
index 0000000..3f283f6
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/class/HierarhijaHelper.php
@@ -0,0 +1,340 @@
+<?php
+/***************************************
+ * Description: Funkcije za pomoč pri hierarhiji
+ * Autor: Robert Šmalc
+ * Created date: 11.04.2017
+ *****************************************/
+
+namespace Hierarhija;
+
+use Hierarhija\Model\HierarhijaOnlyQuery;
+use Hierarhija\Model\HierarhijaQuery;
+use SurveyInfo;
+use Common;
+
+class HierarhijaHelper
+{
+ /**
+ * Iz teksa zamenjamo besede, ki so med lojtrami (#nivo1#, #nivo2#, #ime
+ * ucitelja#, #email ucitelja#)
+ *
+ * @param text $text
+ * @param int $ank_id
+ *
+ * @return text
+ */
+ public static function dataPiping($text, $ank_id = null)
+ {
+
+ if (is_null($ank_id)) {
+ $ank_id = (! empty(get('anketa')) ? get('anketa') : $_GET['anketa']);
+ }
+
+ // Preverimo, če tekst vsebuje kaj
+ if (! preg_match_all('/#([\w\s]+)#/', $text, $matches) || is_null($ank_id)) {
+ return $text;
+ }
+
+ // Pridobimo ID vrednosti spremenljivk, za katere moramo dobiti naslove, da jih lahko prikažemo
+ $get = get('get');
+
+ // V kolikor smo na katerikoli strani, potem gledamo po piškotkih
+ if (isset($get->{'survey-'.$ank_id})) {
+
+ $active = '';
+ if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) {
+ $active = '_active';
+ }
+
+ // ID uporabnika, glede na njegov piškot
+ $srv_user = sisplet_query("SELECT id FROM srv_user WHERE cookie='".$get->{'survey-'.$ank_id}."'", "obj")->id;
+
+ // Pridobimo vse odgovore - strukturo hierarhije
+ $vrednosti = sisplet_query("SELECT
+ v.naslov AS naslov,
+ ss.variable AS variable,
+ v.id AS spr_id
+ FROM
+ srv_data_vrednost".$active." AS sd
+ LEFT JOIN
+ srv_vrednost AS v
+ ON
+ sd.vre_id=v.id
+ LEFT JOIN
+ srv_spremenljivka AS ss
+ ON
+ v.spr_id=ss.id
+ WHERE sd.usr_id='".$srv_user."' ORDER BY ss.variable DESC", "obj");
+ }
+
+ // Zanka po vseh besedah v texstu, k so med lojtrama (
+ foreach ($matches[0] as $key => $match) {
+ $iskanje = strtolower($matches[1][$key]);
+
+ // Zamenjava nivojev (primer: nivo1, nivo2, ...) in vloge (učenec, učitelj)
+ if (! empty($get->{$iskanje})) {
+ $variabla = sisplet_query("SELECT naslov FROM srv_vrednost WHERE id='".$get->{$matches[1][$key]}."'", "obj");
+ $text = str_ireplace($match, $variabla->naslov, $text);
+ } elseif ($iskanje === 'hierarhija') {
+ $hierarhija_pot = Hierarhija::displayPodatkeOhierarhijiZaRespondente($get, true);
+ $text = str_ireplace($match, $hierarhija_pot, $text);
+ }
+
+ // Kadar nivoje menjamo na ostalih vprašanjih in nimamo več Get parametrov, potem pridobimo iz že shranjenih sistemskih odgovorov
+ if (! empty($vrednosti)) {
+ $url_variables = '';
+
+ foreach ($vrednosti as $vrednost) {
+ if ($vrednost->variable == $matches[1][$key]) {
+ $text = str_ireplace($match, $vrednost->naslov, $text);
+ }
+
+ if (! empty($vrednost->variable)) {
+ $url_variables .= $vrednost->variable.'='.$vrednost->spr_id.'&';
+ }
+ }
+ }
+
+ // Ostranimo lojtro iz zadnjega nivoja, da lahko nato preverimo pa url naslovu v bazi
+ $url_variables = substr($url_variables, 0, strlen($url_variables) - 1);
+
+ // zamenjava podatkov o učitelju/uporabniku - ime, priimek, email
+ if (in_array($iskanje, ['ime ucitelja', 'email ucitelja'])) {
+ // Pridobimo podatke u uporabniku za sledečo anketo
+ if (! empty($get->enc)) {
+ $url_variables = base64_decode($get->enc);
+ }
+
+ $user = sisplet_query("SELECT u.email AS email, u.name AS name, u.surname AS surname FROM srv_hierarhija_koda AS h LEFT JOIN users AS u ON u.id=h.user_id WHERE h.anketa_id='".$ank_id."' AND h.url='".$url_variables."'", "obj");
+
+ $zamenjaj = $match;
+
+ // email ne sme biti enak imenu ali priimku
+ if ($iskanje == 'ime ucitelja' && ! in_array($user->email, [$user->name, $user->surname])) {
+ $zamenjaj = $user->name." ".$user->surname;
+ } elseif ($iskanje == 'ime ucitelja') {
+ preg_match('/(\w+)((?:\.)(\w+))?/', $user->email, $ucitelj);
+
+ $zamenjaj = self::velikaZacetnica($ucitelj[1]);
+
+ if (! empty($ucitelj[3])) {
+ $zamenjaj .= " ".self::velikaZacetnica($ucitelj[3]);
+ }
+ }
+
+ if ($iskanje == 'email ucitelja') {
+ $zamenjaj = $user->email;
+ }
+
+ $text = str_ireplace($match, $zamenjaj, $text);
+ }
+ }
+
+ return $text;
+ }
+
+ /**
+ * Iz besedila najprej pretvorimo v male črke in nato veliko začetnico
+ *
+ * @param string $string
+ *
+ * @return string
+ */
+ private static function velikaZacetnica($string)
+ {
+ return ucfirst(mb_strtolower($string, 'UTF-8'));
+ }
+
+ /**
+ * Preverimo dostop določenega uporabnika do modula SA
+ *
+ * @param (int) $anketa
+ */
+ public static function preveriDostop($anketa_id = 0)
+ {
+ global $admin_type;
+
+ // Če ima dostop in je modul vključen
+ if (Common::checkModule('hierarhija') == '1') {
+
+ //anketa še ni ustvarjena, potem mu je dostop omogočen
+ if ($anketa_id == 0 && self::aliImaDostopDoIzdelovanjaHierarhije()) {
+ return true;
+ }
+
+ // Imamo anketa ID in smo znotraj ankete
+ if ($anketa_id > 0) {
+
+ // Če je modul vključen potem lahko do hierarhije dostopajo samo (admini, oseba, ki je mod vključila in osebe, katerim je bil dodan dostop do urejanja hierarhije)
+ if (SurveyInfo::checkSurveyModule('hierarhija', $anketa_id) && ($admin_type == 1 || self::preveriTipHierarhije($anketa_id) < 5)) {
+
+ return true;
+
+ // Če modul še ni bil vključen imajo dostop samo uporabniki s predhodnimi pravicami
+ } elseif (! SurveyInfo::checkSurveyModule('hierarhija', $anketa_id) && self::aliImaDostopDoIzdelovanjaHierarhije()) {
+
+ return true;
+
+ }
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Preverimo, če ima dostop do grajenja hierarhije, dostop omogočimo:
+ * AAI uporabnikom
+ * 1ka administrator
+ * Uporabniku, kateremu je bil dodeljen dostop do ankete
+ */
+ public static function aliImaDostopDoIzdelovanjaHierarhije()
+ {
+
+ global $site_url;
+
+ $strani = [
+ 'https://www.1ka.si/',
+ 'http://test.1ka.si/',
+ 'http://1ka.test/',
+ 'https://1ka.arnes.si/'
+ ];
+
+ // Če je domena prava in če je modul vključen na inštalaciji
+ $modul = Common::checkModule('hierarhija');
+ if ($modul == '0' || $modul == '1' && ! in_array($site_url, $strani)) {
+ return false;
+ }
+
+ // Ali je administrator
+ global $admin_type;
+ if ($admin_type == 0) {
+ return true;
+ }
+
+ //AAI uporabnik
+ if (! empty($_COOKIE['aai']) && $_COOKIE['aai'] == 1) {
+ return true;
+ }
+
+ // Ima dostop, ker je bil dodan v bazo uporabnikov za dostop do hierarhije
+ if (sizeof(sisplet_query("SHOW TABLES LIKE 'srv_hierarhija_dostop'", "array")) == 1) {
+
+ global $global_user_id;
+ $dostop = sisplet_query("SELECT dostop FROM srv_hierarhija_dostop WHERE user_id='".$global_user_id."'", "obj");
+
+ if (! empty($dostop) && $dostop->dostop == 1) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ public static function preveriTipHierarhije($anketa)
+ {
+ global $global_user_id;
+ $type = null;
+
+ if (is_null($anketa)) {
+ return null;
+ }
+
+ if (! SurveyInfo::checkSurveyModule('hierarhija', $anketa)) {
+ return null;
+ }
+
+ // V kolikor je tip hierarhije že v seji
+ if (! empty($_SESSION['hierarhija'][$anketa]['type']) && $_SESSION['hierarhija'][$anketa]['type'] > 5) {
+ return $_SESSION['hierarhija'][$anketa]['type'];
+ }
+
+ $sql = sisplet_query("SELECT type FROM srv_hierarhija_users WHERE user_id='".$global_user_id."' AND anketa_id='".$anketa."'");
+
+ if (! empty($sql) && mysqli_num_rows($sql) > 0) {
+ $row = mysqli_fetch_object($sql);
+ $type = $row->type;
+ }
+
+ $_SESSION['hierarhija'][$anketa]['type'] = $type;
+
+ return $type;
+ }
+
+ /**
+ * Preverimo, komu so bile poslane kode in vrnemo ustrezno besedilo
+ *
+ * @param int $anketa
+ * @param string $string
+ *
+ * @return text
+ */
+ public static function textGledeNaOpcije($anketa, $string = null)
+ {
+ global $lang;
+
+ if (is_null($string)) {
+ return null;
+ }
+
+ $poslji_kode = HierarhijaQuery::getOptionsPosljiKode($anketa);
+
+ return $lang[$string.'_'.$poslji_kode];
+ }
+
+ /**
+ * Izpišemo nivoje hierarhije za našega uporabnika za prikaz linkov
+ */
+ public static function hierarhijaPrikazNaslovovpriUrlju(
+ $anketa,
+ $struktura_id,
+ $email = null
+ ) {
+ global $global_user_id;
+
+ $predmet = (new HierarhijaOnlyQuery())->queryStruktura($anketa, null, ' AND str.id='.$struktura_id)->fetch_object();
+
+ // V kolikor pošiljamo email vabilo admin in je aktiviral ali je $email že user_id
+ if ($email && is_numeric($email)) {
+ $user_id = $email;
+ } elseif ($email) {
+ $user_id = sisplet_query("SELECT user_id FROM srv_hierarhija_struktura_users WHERE hierarhija_struktura_id='".$predmet->id."'")->fetch_object()->user_id;
+ } else {
+ $user_id = $global_user_id;
+ }
+ $veja_hierarhije = (new HierarhijaQuery())->pridobiHierarhijoNavzgor($anketa, null, $user_id);
+
+ $ime_strukture = [];
+ foreach ($veja_hierarhije as $key_struktura => $value_sifranta) {
+
+ ### Če ključ trenutnega predmeta ustreza ključi polja za to hierarhijo, potem izpišemo pot za ta predmet (ime, razred, itd...)
+ if ($key_struktura == $predmet->id) {
+ #### Sortiramo polje od nivoja 1 do 6, ker drugače imamo obratno
+ krsort($value_sifranta);
+ $st_vnosov = sizeof($value_sifranta);
+
+ $nivo_ime = null;
+ foreach ($value_sifranta as $key => $element) {
+
+ // Tukaj prikaže tudi najvišji nivo, če je potrebno, če želimo najviši nivo izpustu
+ if ($key < $st_vnosov) {
+ $zacas_ime = (new HierarhijaOnlyQuery())->getSamoSifrant($element['id'], true)->fetch_object();
+ $nivo_ime .= $zacas_ime->ime;
+ if ($key != 0) {
+ $nivo_ime .= ' - ';
+ }
+ }
+ }
+
+ // V kolikor nas zanima naslov samo za eno strukturo
+ if (! is_null($struktura_id)) {
+ return $nivo_ime;
+ }
+
+ $ime_strukture[$key_struktura] = $nivo_ime;
+ }
+ }
+
+ return $ime_strukture;
+ }
+} \ No newline at end of file
diff --git a/admin/survey/modules/mod_hierarhija/class/HierarhijaIzvoz.php b/admin/survey/modules/mod_hierarhija/class/HierarhijaIzvoz.php
new file mode 100644
index 0000000..18bda68
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/class/HierarhijaIzvoz.php
@@ -0,0 +1,344 @@
+<?php
+/***************************************
+ * Description:
+ * Autor: Robert Šmalc
+ * Created date: 10.08.2017
+ *****************************************/
+
+namespace Hierarhija;
+
+use Dostop;
+use Export;
+use Hierarhija\Model\HierarhijaOnlyQuery;
+use Hierarhija\Model\HierarhijaQuery;
+use SurveyInfo;
+use TrackingClass;
+
+class HierarhijaIzvoz {
+
+ private static $_instance;
+
+ protected $anketa;
+
+ protected $polje_strukture = [];
+
+ protected $user_id;
+
+ public function __construct($anketa)
+ {
+ $this->anketa = $anketa;
+
+ global $global_user_id;
+ $this->user_id = $global_user_id;
+
+ TrackingClass::update($anketa, '21');
+
+ if (!(new Dostop())->checkDostop($this->anketa)) {
+ return FALSE;
+ }
+ }
+
+ public static function getInstance($anketa)
+ {
+ if (self::$_instance) {
+ return self::$_instance;
+ }
+
+ return new HierarhijaIzvoz($anketa);
+ }
+
+ /**
+ * Izvozimo vse uporabnike, do katerih imamo dostop
+ *
+ * @param bool $porocilo - v kolikor gre za poročilo vrnemo polje;
+ * @return response downlod CSV
+ */
+
+ public function csvIzvozVsehUporabnikov()
+ {
+ $hierarhija_type = (!empty($_SESSION['hierarhija'][$this->anketa]['type']) ? $_SESSION['hierarhija'][$this->anketa]['type'] : NULL);
+
+ if ($hierarhija_type < 5) {
+ $podatki = (new HierarhijaQuery())->hierarhijaArrayDataTables($this->anketa, NULL, TRUE);
+ } else {
+ $hierarhija = (new HierarhijaQuery());
+ $uporabnik = $hierarhija->preveriPravicoUporabnika($this->anketa);
+ $struktura = $hierarhija->poisciHierarhijoNavzgor($uporabnik->struktura_id);
+
+ $podatki = (new HierarhijaQuery())->hierarhijaArrayDataTables($this->anketa, $struktura, TRUE);
+ }
+
+ // pridobimo prvo vrstico za izvoz
+ $ravni = sisplet_query("SELECT level, ime FROM srv_hierarhija_ravni WHERE anketa_id='" . $this->anketa . "' ORDER BY level", "obj");
+ foreach ($ravni as $raven) {
+ $header[] = $raven->level . '. ' . $raven->ime;
+ }
+ $izvoz[] = $header;
+
+ foreach ($podatki as $key => $row) {
+ foreach ($row as $podatek) {
+ $izvoz[$key + 1][] = str_replace('<br />', '', $podatek['label']);
+ }
+ }
+
+ return Export::init($this->anketa)->csv('Izvoz uporabnikov', $izvoz);
+ }
+
+ /**
+ * Pripravimo izvoz strukture za R poročilo ali CSV izvoz
+ *
+ * @param bool $porocilo
+ * @param bool $stevilke
+ *
+ * @return array|bool|void
+ */
+ public function csvIzvozStruktureZaObdelavo($porocilo = false, $stevilke = false)
+ {
+ $hierarhija_type = (!empty($_SESSION['hierarhija'][$this->anketa]['type']) ? $_SESSION['hierarhija'][$this->anketa]['type'] : NULL);
+
+ if ($hierarhija_type > 4) {
+ return FALSE;
+ }
+
+ //Pridobimo vso strukturo iz šifer
+ $strukture = sisplet_query("SELECT k.url AS url, u.name AS name, u.surname AS surname, u.email AS email FROM srv_hierarhija_koda AS k LEFT JOIN users AS u ON k.user_id=u.id WHERE anketa_id='" . $this->anketa . "'", "obj");
+
+ // pridobimo prvo vrstico za izvoz
+ $ravni = sisplet_query("SELECT level, ime FROM srv_hierarhija_ravni WHERE anketa_id='" . $this->anketa . "' ORDER BY level", "obj");
+ $header[] = 'vloga';
+ foreach ($ravni as $raven) {
+ $header[] = $raven->level . '. ' . $raven->ime;
+ }
+ //podatki o učitelju
+ $header[] = 'Ime in priimek';
+ $header[] = 'Email';
+
+ $izvoz[] = $header;
+
+ foreach ($strukture as $key => $struktura) {
+ parse_str($struktura->url, $url);
+ asort($url);
+
+ // izvozimo strukturo za vsakega učitelja posebej
+ foreach ($url as $keySifrant => $row) {
+ if ($key == 0) {
+ $izvoz[$key + 1][] = $keySifrant;
+ }
+
+ $podatek = sisplet_query("SELECT naslov, variable FROM srv_vrednost WHERE id='".$row."'", "obj");
+ if($stevilke){
+ $izvoz[$key + 2][] = $podatek->variable;
+ }else {
+// $podatek = sisplet_query("SELECT naslov, variable FROM srv_vrednost WHERE id='".$row."'", "obj");
+ $izvoz[$key + 2][] = $podatek->naslov;
+ }
+ }
+
+
+ // Dodamo še drugo vrstico ime in email
+ $izvoz[1][sizeof($url)] = 'ime';
+ $izvoz[1][sizeof($url) + 1] = 'email';
+
+ //Podatki o učitelju
+ $izvoz[$key + 2][] = $struktura->name . ' ' . $struktura->surname;
+ $izvoz[$key + 2][] = $struktura->email;
+
+ }
+
+ if($porocilo)
+ return $izvoz;
+
+ return Export::init($this->anketa)
+ ->csv('Izvoz strukture hierarhije', $izvoz);
+ }
+
+ /**
+ * Izvoz tabele status z vsemi šiframi in časi reševanja
+ *
+ * @return CSV download response
+ */
+ public function csvIzvozStatusa()
+ {
+
+ $hierarhija_type = (!empty($_SESSION['hierarhija'][$this->anketa]['type']) ? $_SESSION['hierarhija'][$this->anketa]['type'] : NULL);
+
+ if ($hierarhija_type > 4) {
+ return FALSE;
+ }
+
+ $header[] = [
+ 'Hierarhija',
+ 'Email učitelja',
+ 'Koda za učence',
+ 'Status učencev - začel izpolnjevati',
+ 'Status učencev - delno izpolnjene',
+ 'Status učencev - končal anketo',
+ 'Časovni potek - prvi vnos',
+ 'Časovni potek - zadnji vnos',
+ 'Koda za učitelja',
+ 'Vnos učitelja',
+ ];
+
+ $body = $this->getStatus();
+
+ if (!is_null($body)) {
+ $izvoz = array_merge($header, $body);
+ } else {
+ $izvoz = $header;
+ }
+
+ return Export::init($this->anketa)->csv('Status_izvoz', $izvoz);
+ }
+
+ /**
+ * Pridobimo večdimenzionalno polje, kjer posamezna vrstica ima podatke o
+ * enem predmetu njegovih respondentih
+ *
+ * @param (boolean) $array - v kolikor vrnemo polje
+ *
+ * @return array|null
+ */
+ public function getStatus($array = FALSE)
+ {
+ $izvoz = [];
+
+ //v kolikor imamo več URL-jev se pravi za več predmetov potem moramo izpisati sklope za vse predmete
+ $max_st_nivojev = sisplet_query("SELECT MAX(level) FROM srv_hierarhija_struktura WHERE anketa_id='" . $this->anketa . "'");
+
+ // V kolikor še ni nič vnosov
+ if ($max_st_nivojev->num_rows == 0) {
+ return NULL;
+ }
+
+ $max_st_nivojev = $max_st_nivojev->fetch_row()[0];
+
+ // Pridobimo vse ID-je na zadnjem nivoju
+ $strukture = (new HierarhijaOnlyQuery())->queryStrukturaUsers($this->anketa);
+
+ // Zanka po celotni strukturi za vsakega učitelja pridobimo vse response
+ foreach ($strukture as $struktura) {
+
+ // Prikažemo samo vpise, ki imajo vpisanega učitelja na zadnjem nivoju
+ if ($struktura['level'] == $max_st_nivojev) {
+
+ // pridobimo podatke o rešenih anketah samo za to strukturo
+ $cas = $this->pridobiStatisticnePodatke($struktura['id'], 'ucenec');
+ $cas_ucitelj = $this->pridobiStatisticnePodatke($struktura['id'], 'ucitelj');
+
+ $first_insert = NULL;
+ $last_insert = NULL;
+ $zacel_izpolnjevati = 0;
+ $delno_izpolnjena = 0;
+ $koncal_anketo = 0;
+
+ if (!is_null($cas)) {
+ foreach ($cas as $key => $row) {
+ if ($row['cas'] < $first_insert || $key == 0) {
+ $first_insert = $row['cas'];
+ }
+
+ if ($row['cas'] > $last_insert) {
+ $last_insert = $row['cas'];
+ }
+
+ // Končal anketo
+ if ($row['status'] == 6 && $row['lurker'] == 0) {
+ $koncal_anketo++;
+ }
+
+ // Delno izpolnjena
+ if ($row['status'] == 5 && $row['lurker'] == 0) {
+ $delno_izpolnjena++;
+ }
+
+ if ($row['lurker'] == 1) {
+ $zacel_izpolnjevati++;
+ }
+ }
+ }
+
+ $vrstica = [
+ HierarhijaHelper::hierarhijaPrikazNaslovovpriUrlju($this->anketa, $struktura['id'], $struktura['email']),
+ $struktura['email'],
+ strtoupper(HierarhijaOnlyQuery::getKodaRow($this->anketa, $struktura['id'])->koda),
+ (!empty($zacel_izpolnjevati) ? $zacel_izpolnjevati : '/'),
+ (!empty($delno_izpolnjena) ? $delno_izpolnjena : '/'),
+ (!empty($koncal_anketo) ? $koncal_anketo : '/'),
+ (!is_null($first_insert) ? date('d.m.Y, H:i', $first_insert) : '/'),
+ (!is_null($last_insert) ? date('d.m.Y, H:i', $last_insert) : '/'),
+ strtoupper(HierarhijaOnlyQuery::getKodaRow($this->anketa, $struktura['id'], 'ucitelj')->koda),
+ ((!is_null($cas_ucitelj['cas']) && $cas_ucitelj['status'] == 6 && $cas_ucitelj['lurker'] == 0) ? date('d.m.Y, H:i', $cas_ucitelj['cas']) : '/'),
+ ];
+
+ $id_kode = HierarhijaOnlyQuery::getKodaRow($this->anketa, $struktura['id'])->koda;
+
+ if ($array && !is_null($id_kode)) {
+ $izvoz[$id_kode] = $vrstica;
+ } else {
+ $izvoz[] = $vrstica;
+ }
+ }
+
+ }
+
+ return $izvoz;
+ }
+
+ /**
+ * Pridobimo podatke o izpolnjevanju posameznega respondenta
+ *
+ * @param $struktura_id
+ * @param $vloga
+ *
+ * @return array|mixed|null
+ */
+ private function pridobiStatisticnePodatke($struktura_id, $vloga)
+ {
+
+ $url = sisplet_query("SELECT url FROM srv_hierarhija_koda WHERE anketa_id='" . $this->anketa . "' AND hierarhija_struktura_id='" . $struktura_id . "' AND vloga='" . $vloga . "'", "obj")->url;
+
+ // V kolikor anketa še ni bila aktivirana potem vrnemo null, ker nimamo še podatkov o izpolnjevanju
+ if (is_null($url)) {
+ return NULL;
+ }
+
+ parse_str($url, $nivoji);
+
+ $polje_iskanja = NULL;
+ foreach ($nivoji as $key => $nivo) {
+ if ($key == 'vloga') {
+ $polje_iskanja = $nivo;
+ } else {
+ $polje_iskanja .= ', ' . $nivo;
+ }
+ }
+
+ $db_table = (SurveyInfo::getInstance()
+ ->getSurveyColumn('db_table') == 1) ? '_active' : '';
+
+ // tukaj pridobimo podatke o anketi za določeno strukturo
+ // preverimov prvi in zadnji nivo
+ $sql_user = sisplet_query("SELECT time_insert, last_status, lurker FROM srv_data_vrednost" . $db_table . " as sa LEFT JOIN srv_user as us ON (sa.usr_id=us.id) WHERE vre_id IN (" . $polje_iskanja . ") GROUP BY usr_id HAVING COUNT(usr_id)=" . sizeof($nivoji));
+ $cas = [];
+
+ // V kolikor ni zapisov vrnemo prazno
+ if ($sql_user->num_rows == 0) {
+ return NULL;
+ }
+
+ while ($row = mysqli_fetch_object($sql_user)) {
+ $cas[] = [
+ 'cas' => strtotime($row->time_insert),
+ 'status' => $row->last_status,
+ 'lurker' => $row->lurker,
+ ];
+ }
+
+ if ($vloga == 'ucitelj') {
+ return $cas[0];
+ }
+
+
+ return (sizeof($cas) > 0 ? $cas : NULL);
+ }
+} \ No newline at end of file
diff --git a/admin/survey/modules/mod_hierarhija/class/HierarhijaIzvozAnalize.php b/admin/survey/modules/mod_hierarhija/class/HierarhijaIzvozAnalize.php
new file mode 100644
index 0000000..b79b8ba
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/class/HierarhijaIzvozAnalize.php
@@ -0,0 +1,470 @@
+<?php
+/***************************************
+ * Description:
+ * Autor: Robert Šmalc
+ * Created date: 06.05.2017
+ *****************************************/
+
+namespace Hierarhija;
+
+
+include_once($_SERVER['DOCUMENT_ROOT'].'/function.php');
+include_once($_SERVER['DOCUMENT_ROOT'].'/admin/survey/definition.php');
+include_once($_SERVER['DOCUMENT_ROOT'].'/admin/exportclases/class.pdfIzvozAnalizaFunctions.php');
+require_once($_SERVER['DOCUMENT_ROOT'].'/admin/exportclases/class.enka.pdf.php');
+
+define("ALLOW_HIDE_ZERRO_REGULAR", false); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za navadne odgovore
+define("ALLOW_HIDE_ZERRO_MISSING", true); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za missinge
+
+define("NUM_DIGIT_AVERAGE", 2); // stevilo digitalnih mest za povprecje
+define("NUM_DIGIT_DEVIATION", 2); // stevilo digitalnih mest za povprecje
+
+define("M_ANALIZA_DESCRIPTOR", "descriptor");
+define("M_ANALIZA_FREQUENCY", "frequency");
+
+define("FNT_FREESERIF", "freeserif");
+define("FNT_FREESANS", "freesans");
+define("FNT_HELVETICA", "helvetica");
+
+define("FNT_MAIN_TEXT", FNT_FREESANS);
+define("FNT_QUESTION_TEXT", FNT_FREESANS);
+define("FNT_HEADER_TEXT", FNT_FREESANS);
+
+define("FNT_MAIN_SIZE", 10);
+define("FNT_QUESTION_SIZE", 9);
+define("FNT_HEADER_SIZE", 10);
+
+define("RADIO_BTN_SIZE", 3);
+define("CHCK_BTN_SIZE", 3);
+define("LINE_BREAK", 6);
+
+define ('PDF_MARGIN_HEADER', 8);
+define ('PDF_MARGIN_FOOTER', 12);
+define ('PDF_MARGIN_TOP', 18);
+define ('PDF_MARGIN_BOTTOM', 18);
+define ('PDF_MARGIN_LEFT', 15);
+define ('PDF_MARGIN_RIGHT', 15);
+
+use enka_TCPDF;
+use SurveyUserSession;
+use SurveyMeans;
+use HierarhijaAnalysis;
+use SurveyInfo;
+use SurveyUserSetting;
+use SurveyDataSettingProfiles;
+
+class HierarhijaIzvozAnalize
+{
+
+ var $anketa;// = array(); // trenutna anketa
+
+ var $pi=array('canCreate'=>false); // za shrambo parametrov in sporocil
+ var $pdf;
+ var $currentStyle;
+ var $db_table = '';
+
+ public $meansClass = null; //means class
+
+ var $meanData1;
+ var $meanData2;
+
+ var $sessionData; // podatki ki so bili prej v sessionu - za nastavitve, ki se prenasajo v izvoze...
+
+
+ /**
+ * @desc konstruktor
+ */
+ function __construct ($anketa = null, $podstran = 'mean')
+ {
+ global $site_path;
+ global $global_user_id;
+
+ // preverimo ali imamo stevilko ankete
+ if ( is_numeric($anketa) )
+ {
+ $this->anketa['id'] = $anketa;
+ $this->anketa['podstran'] = $podstran;
+ // create new PDF document
+ $this->pdf = new enka_TCPDF('L', PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+ }
+ else
+ {
+ $this->pi['msg'] = "Anketa ni izbrana!";
+ $this->pi['canCreate'] = false;
+ return false;
+ }
+ $_GET['a'] = A_ANALYSIS;
+
+ // preberemo nastavitve iz baze (prej v sessionu)
+ SurveyUserSession::Init($this->anketa['id']);
+ $this->sessionData = SurveyUserSession::getData();
+
+ // ustvarimo means objekt
+ $this->meansClass = new HierarhijaAnalysis($anketa);
+
+ if ( SurveyInfo::getInstance()->SurveyInit($this->anketa['id']) && $this->init())
+ {
+ $this->anketa['uid'] = $global_user_id;
+ SurveyUserSetting::getInstance()->Init($this->anketa['id'], $this->anketa['uid']);
+ }
+ else
+ return false;
+ // ce smo prisli do tu je vse ok
+ $this->pi['canCreate'] = true;
+
+ return true;
+ }
+
+ // SETTERS && GETTERS
+
+ function checkCreate()
+ {
+ return $this->pi['canCreate'];
+ }
+ function getFile($fileName)
+ {
+ //Close and output PDF document
+ ob_end_clean();
+ $this->pdf->Output($fileName, 'I');
+ }
+
+
+ function init()
+ {
+ global $lang;
+
+ // array used to define the language and charset of the pdf file to be generated
+ $language_meta = Array();
+ $language_meta['a_meta_charset'] = 'UTF-8';
+ $language_meta['a_meta_dir'] = 'ltr';
+ $language_meta['a_meta_language'] = 'sl';
+ $language_meta['w_page'] = $lang['page'];
+
+ //set some language-dependent strings
+ $this->pdf->setLanguageArray($language_meta);
+
+ //set margins
+ $this->pdf->setPrintHeaderFirstPage(true);
+ $this->pdf->setPrintFooterFirstPage(true);
+ $this->pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+ $this->pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+ $this->pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+ // set header and footer fonts
+ $this->pdf->setHeaderFont(Array(FNT_HEADER_TEXT, "I", FNT_HEADER_SIZE));
+ $this->pdf->setFooterFont(Array(FNT_HEADER_TEXT, 'I', FNT_HEADER_SIZE));
+
+
+ // set document information
+ $this->pdf->SetAuthor('An Order Form');
+ $this->pdf->SetTitle('An Order');
+ $this->pdf->SetSubject('An Order');
+
+ // set default header data
+ $this->pdf->SetHeaderData(null, null, "www.1ka.si", $this->encodeText(SurveyInfo::getInstance()->getSurveyAkronim()));
+
+ //set auto page breaks
+ $this->pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+ $this->pdf->SetFont(FNT_MAIN_TEXT, '', FNT_MAIN_SIZE);
+ //set image scale factor
+ $this->pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+ return true;
+ }
+
+ function encodeText($text)
+ { // popravimo sumnike ce je potrebno
+ $text = html_entity_decode($text, ENT_NOQUOTES, 'UTF-8');
+ $text = str_replace(array("&scaron;","&#353;","&#269;"),array("š","š","č"),$text);
+ return strip_tags($text);
+ }
+
+ function createPdf()
+ {
+ global $site_path;
+ global $lang;
+
+
+ // izpisemo prvo stran
+ //$this->createFrontPage();
+
+ $this->pdf->AddPage();
+
+ $this->pdf->setFont('','B','11');
+ $this->pdf->MultiCell(150, 5, $lang['srv_hierarchy_analysis_export'], 0, 'L', 0, 1, 0 ,0, true);
+
+ $this->pdf->setDrawColor(128, 128, 128);
+ $this->pdf->setFont('','','6');
+
+ # polovimo nastavtve missing profila
+ //SurveyConditionProfiles:: getConditionString();
+
+
+ $this->meanData1 = $this->sessionData['means']['means_variables']['variabla1'];
+ $this->meanData2 = $this->sessionData['means']['means_variables']['variabla2'];
+
+ $means = array();
+ # če ne uporabljamo privzetega časovnega profila izpišemo opozorilo
+ //$doNewLine = SurveyTimeProfiles :: printIsDefaultProfile(false);
+
+ # če imamo filter ifov ga izpišemo
+ //$doNewLine = SurveyConditionProfiles:: getConditionString($doNewLine );
+
+ # če imamo filter spremenljivk ga izpišemo
+ //$doNewLine = SurveyVariablesProfiles:: getProfileString($doNewLine , true) || $doNewLine;
+
+ if ($this->meanData1 !== null && $this->meanData2 !== null) {
+ $variables1 = $this->meanData2;
+ $variables2 = $this->meanData1;
+ $c1=0;
+ $c2=0;
+
+ if(is_array($variables2) && count($variables2) > 0){
+ #prikazujemo ločeno
+ if ($this->sessionData['means']['meansSeperateTables'] == true || $this->sessionData['mean_charts']['showChart'] == '1') {
+ foreach ($variables2 AS $v_second) {
+ if (is_array($variables1) && count($variables1) > 0) {
+ foreach ($variables1 AS $v_first) {
+ $_means = $this->meansClass->createMeans($v_first, $v_second);
+ if ($_means != null) {
+ $means[$c1][0] = $_means;
+ }
+ $c1++;
+ }
+ }
+ }
+ }
+ #prikazujemo skupaj
+ else {
+ foreach ($variables2 AS $v_second) {
+ if (is_array($variables1) && count($variables1) > 0) {
+ foreach ($variables1 AS $v_first) {
+ $_means = $this->meansClass->createMeans($v_first, $v_second);
+ if ($_means != null) {
+ $means[$c1][$c2] = $_means;
+ }
+ $c2++;
+ }
+ }
+ $c1++;
+ $c2=0;
+ }
+ }
+ }
+
+
+ if (is_array($means) && count($means) > 0) {
+
+ $count = 0;
+ foreach ($means AS $mean_sub_grup) {
+
+ if($this->sessionData['mean_charts']['showChart'] == '1'){
+ if($count > 0){
+ $this->pdf->AddPage();
+ }
+
+ $this->pdf->ln(10);
+
+ $this->displayMeansTable($mean_sub_grup);
+ $this->displayChart($count);
+ }
+ else{
+ if($count%2 == 0 && $count > 0){
+ $this->pdf->AddPage();
+ }
+
+ $this->pdf->ln(10);
+ $this->displayMeansTable($mean_sub_grup);
+ $this->pdf->ln(10);
+ }
+
+ $count++;
+ }
+ }
+ }
+ }
+
+ public function displayMeansTable($_means) {
+ global $lang;
+
+ #število vratic in število kolon
+ $cols = count($_means);
+ # preberemo kr iz prvega loopa
+ $rows = count($_means[0]['options']);
+
+ // sirina ene celice
+ $singleWidth = round( 180 / $cols / 5 );
+
+ // visina prve vrstice
+ $firstHeight = 0;
+ for ($i = 0; $i < $cols; $i++) {
+
+ $label1 = $this->meansClass->getSpremenljivkaTitle($_means[$i]['v1']);
+
+ /*$linecount = $this->pdf->getNumLines($this->encodeText($label1), $singleWidth*2);
+ $height = ( $linecount == 1 ? 4.7 : (4.7 + ($linecount-1)*3.3) );
+ $firstHeight = ($height > $firstHeight) ? $height : $firstHeight;*/
+ $firstHeight = ($firstHeight > $this->getCellHeight($this->encodeText($label1), $singleWidth*2)) ? $firstHeight : $this->getCellHeight($this->encodeText($label1), $singleWidth*2);
+ }
+
+
+ // prva vrstica
+ $this->pdf->setFont('','B','6');
+
+ $label2 = $this->meansClass->getSpremenljivkaTitle($_means[0]['v2']);
+ $this->pdf->MultiCell(80, $firstHeight, $this->encodeText($label2), 'TLR', 'C', 0, 0, 0 ,0, true);
+
+ for ($i = 0; $i < $cols; $i++) {
+
+ $label1 = $this->meansClass->getSpremenljivkaTitle($_means[$i]['v1']);
+ $this->pdf->MultiCell($singleWidth*5, $firstHeight, $this->encodeText($label1), 1, 'C', 0, 0, 0 ,0, true);
+ }
+ $this->pdf->MultiCell(1, $firstHeight, $this->encodeText(''), 0, 'C', 0, 1, 0 ,0, true);
+
+ $this->pdf->setFont('','','6');
+
+ // druga vrstica
+ $this->pdf->MultiCell(80, 7, $this->encodeText(''), 'BLR', 'C', 0, 0, 0 ,0, true);
+
+ for ($i = 0; $i < $cols; $i++) {
+
+ $this->pdf->MultiCell($singleWidth, 7, $this->encodeText($lang['srv_means_label']), 1, 'C', 0, 0, 0 ,0, true);
+ $this->pdf->MultiCell($singleWidth, 7, $this->encodeText($lang['srv_hierarchy_label_st']), 1, 'C', 0, 0, 0 ,0, true);
+ $this->pdf->MultiCell($singleWidth, 7, $this->encodeText($lang['srv_hierarchy_label_min']), 1, 'C', 0, 0, 0 ,0, true);
+ $this->pdf->MultiCell($singleWidth, 7, $this->encodeText($lang['srv_hierarchy_label_max']), 1, 'C', 0, 0, 0 ,0, true);
+ $this->pdf->MultiCell($singleWidth, 7, $this->encodeText($lang['srv_hierarchy_label_std_dev']), 1, 'C', 0, 0, 0 ,0, true);
+ }
+ $this->pdf->MultiCell(1, 7, $this->encodeText(''), 0, 'C', 0, 1, 0 ,0, true);
+
+
+ // vrstice s podatki
+ if (count($_means[0]['options']) > 0) {
+ foreach ($_means[0]['options'] as $ckey2 =>$crossVariabla2) {
+
+ $variabla = $crossVariabla2['naslov'];
+ # če ni tekstovni odgovor dodamo key
+ if ($crossVariabla2['type'] !== 't' ) {
+ if ($crossVariabla2['vr_id'] == null) {
+ $variabla .= ' ( '.$ckey2.' )';
+ } else {
+ $variabla .= ' ( '.$crossVariabla2['vr_id'].' )';
+ }
+ }
+ $this->pdf->MultiCell(80, 7, $this->encodeText($variabla), 1, 'C', 0, 0, 0 ,0, true);
+
+ # celice z vsebino
+ for ($i = 0; $i < $cols; $i++) {
+ $this->pdf->MultiCell($singleWidth, 7, $this->encodeText($this->meansClass->formatNumber($_means[$i]['result'][$ckey2], SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_RESIDUAL'))), 1, 'C', 0, 0, 0 ,0, true);
+ $this->pdf->MultiCell($singleWidth, 7, $this->encodeText((int)$_means[$i]['sumaVrstica'][$ckey2]), 1, 'C', 0, 0, 0 ,0, true);
+
+ $this->pdf->MultiCell($singleWidth, 7, $this->encodeText($this->meansClass->formatNumber($_means[$i]['min'][$ckey2], SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_RESIDUAL'))), 1, 'C', 0, 0, 0 ,0, true);
+ $this->pdf->MultiCell($singleWidth, 7, $this->encodeText($this->meansClass->formatNumber($_means[$i]['max'][$ckey2], SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_RESIDUAL'))), 1, 'C', 0, 0, 0 ,0, true);
+ $this->pdf->MultiCell($singleWidth, 7, $this->encodeText($this->meansClass->formatNumber($_means[$i]['stdDeviation'][$ckey2], SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_RESIDUAL'))), 1, 'C', 0, 0, 0 ,0, true);
+
+ }
+ $this->pdf->MultiCell(1, 7, $this->encodeText(''), 0, 'C', 0, 1, 0 ,0, true);
+ }
+ }
+
+ // SKUPAJ
+ $this->pdf->MultiCell(80, 7, $this->encodeText($lang['srv_means_label3']), 1, 'C', 0, 0, 0 ,0, true);
+
+ for ($i = 0; $i < $cols; $i++) {
+
+ $this->pdf->MultiCell($singleWidth, 7, $this->encodeText($this->meansClass->formatNumber($_means[$i]['sumaMeans'], SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_RESIDUAL'))), 1, 'C', 0, 0, 0 ,0, true);
+ $this->pdf->MultiCell($singleWidth, 7, $this->encodeText((int)$_means[$i]['sumaSkupna']), 1, 'C', 0, 0, 0 ,0, true);
+
+ $this->pdf->MultiCell($singleWidth, 7, $this->encodeText($this->meansClass->formatNumber($_means[$i]['sumaMin'], SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_RESIDUAL'))), 1, 'C', 0, 0, 0 ,0, true);
+ $this->pdf->MultiCell($singleWidth, 7, $this->encodeText($this->meansClass->formatNumber($_means[$i]['sumaMax'], SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_RESIDUAL'))), 1, 'C', 0, 0, 0 ,0, true);
+ $this->pdf->MultiCell($singleWidth, 7, $this->encodeText($this->meansClass->formatNumber($_means[$i]['sumaStdDeviation'], SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_RESIDUAL'))), 1, 'C', 0, 0, 0 ,0, true);
+
+ }
+ $this->pdf->MultiCell(1, 7, $this->encodeText(''), 0, 'C', 0, 1, 0 ,0, true);
+ }
+
+ function displayChart($counter){
+ global $lang;
+
+ $variables1 = $this->meanData1;
+ $variables2 = $this->meanData2;
+
+ $pos1 = floor($counter / count($variables2));
+ $pos2 = $counter % count($variables2);
+
+ $chartID = implode('_', $variables1[$pos1]).'_'.implode('_', $variables2[$pos2]);
+ $chartID .= '_counter_'.$counter;
+
+
+ $settings = $this->sessionData['mean_charts'][$chartID];
+ $imgName = $settings['name'];
+
+ $size = getimagesize('pChart/Cache/'.$imgName);
+ $height = $size[1] / 4;
+
+ if($this->pdf->getY() + $height > 250)
+ {
+ $this->pdf->AddPage();
+ }
+ else
+ $this->pdf->setY($this->pdf->getY() + 15);
+
+
+ $this->pdf->Image('pChart/Cache/'.$imgName, $x='', $y='', $w=200, $h, $type='PNG', $link='', $align='N', $resize=true, $dpi=1600, $palign='C', $ismask=false, $imgmask=false, $border=0);
+
+
+ $this->pdf->setY($this->pdf->getY() + 5);
+ }
+
+ /*Skrajsa tekst in doda '...' na koncu*/
+ function snippet($text,$length=64,$tail="...")
+ {
+ $text = trim($text);
+ $txtl = strlen($text);
+ if($txtl > $length)
+ {
+ for($i=1;$text[$length-$i]!=" ";$i++)
+ {
+ if($i == $length)
+ {
+ return substr($text,0,$length) . $tail;
+ }
+ }
+ $text = substr($text,0,$length-$i+1) . $tail;
+ }
+ return $text;
+ }
+
+ function drawLine()
+ {
+ $cy = $this->pdf->getY();
+ $this->pdf->Line(15, $cy , 195, $cy , $this->currentStyle);
+ }
+
+ function setUserId($usrId) {$this->anketa['uid'] = $usrId;}
+ function getUserId() {return ($this->anketa['uid'])?$this->anketa['uid']:false;}
+
+ function formatNumber($value,$digit=0,$sufix="")
+ {
+ if ( $value <> 0 && $value != null )
+ $result = round($value,$digit);
+ else
+ $result = "0";
+ $result = number_format($result, $digit, ',', '.').$sufix;
+
+ return $result;
+ }
+
+ function getCellHeight($string, $width){
+
+ $this->pdf->startTransaction();
+ // get the number of lines calling you method
+ $linecount = $this->pdf->MultiCell($width, 0, $string, 0, 'L', 0, 0, '', '', true, 0, false, true, 0);
+ // restore previous object
+ $this->pdf = $this->pdf->rollbackTransaction();
+
+ $height = ($linecount <= 1) ? 4.7 : $linecount * ($this->pdf->getFontSize() * $this->pdf->getCellHeightRatio()) + 2;
+
+ return $height;
+ }
+
+} \ No newline at end of file
diff --git a/admin/survey/modules/mod_hierarhija/class/HierarhijaKopiranjeClass.php b/admin/survey/modules/mod_hierarhija/class/HierarhijaKopiranjeClass.php
new file mode 100644
index 0000000..27dd880
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/class/HierarhijaKopiranjeClass.php
@@ -0,0 +1,418 @@
+<?php
+
+/***************************************
+ * Description: Razred omogoča kopiranja obstoječe strukture in shranjevanje v json
+ * Autor: Robert Šmalc
+ * Created date: 04.11.2016
+ *****************************************/
+namespace Hierarhija;
+
+use Hierarhija\Model\HierarhijaOnlyQuery;
+use Hierarhija\Model\HierarhijaQuery;
+
+class HierarhijaKopiranjeClass
+{
+ private static $_instance;
+ protected $anketa;
+ protected $polje_strukture = [];
+ protected $user_id;
+
+ public function __construct($anketa)
+ {
+ $this->anketa = $anketa;
+
+ global $global_user_id;
+ $this->user_id = $global_user_id;
+ }
+
+ public static function getInstance($anketa)
+ {
+ if (self::$_instance)
+ return self::$_instance;
+
+ return new HierarhijaKopiranjeClass($anketa);
+ }
+
+ /**
+ * Pridobimo celotno polje in tudi možnsz serialize v string za shranjevanje v bazo uporabimo
+ *
+ * @param (boolean) $seialize
+ * @return array | string
+ */
+ public function get($serialize = false)
+ {
+ $struktura = $this->getStrukturaInUporabniki();
+
+ if ($serialize && !empty($struktura))
+ return serialize($struktura);
+
+ return $struktura;
+ }
+
+ protected $polje_primerjava;
+
+ /**
+ * Shranimo polje in uporabni
+ *
+ * @param (array) $struktura
+ * @return
+ */
+
+ public function save($struktura)
+ {
+ // Ustvarimo sistemsko vprašanje v kolikor kopiramo tudi strukturo k vlogi
+ (new Hierarhija($this->anketa))->izrisisSistemskoVprsanjeVloga();
+
+ // Shranimo strukturo
+ $this->insert($struktura, 0);
+
+ }
+
+ /**
+ * Vpišemo elemente v bazo
+ *
+ * @param (array) $polje - polje struktura, ki ga pridobimo iz baze
+ * @param (int) $parent_id - id parenta iz prejšnje strukture, po kateri iščemo
+ * @param (int) $new_parent_id - ID vpisa strukture, ki ga uporabimo za vpis parenta
+ */
+ private function insert(array $polje, $parent_id, $new_parent_id = null)
+ {
+ if (isset($parent_id) && is_array($polje) && sizeof($polje) > 0) {
+ foreach ($polje as $raven) {
+
+ if ($raven['parent_id'] == $parent_id) {
+
+ // Pridobimo nove podatke s primerjavo s starimi ID-ji od prej, da shranimo strukturo
+ $hierarhija_ravni_id = (int)$this->primerjava['ravni'][$raven['ravni_id']];
+ $hierarhija_sifrant_id = (int)$this->primerjava['sifranti'][$raven['sifrant_id']];
+ $level = (int)$raven['level'];
+
+ $sql_raven = sisplet_query("
+ INSERT INTO srv_hierarhija_struktura
+ (hierarhija_ravni_id, parent_id, hierarhija_sifranti_id, level, anketa_id)
+ VALUES
+ ('" . $hierarhija_ravni_id . "', " . var_export($new_parent_id, true) . " , '" . $hierarhija_sifrant_id . "', '" . $level . "', '" . $this->anketa . "')
+ ");
+ $this->sqlError($sql_raven);
+
+ // Pridobimo ID vpisa strukture
+ $id_strukture = mysqli_insert_id($GLOBALS['connect_db']);
+
+ // Vpišemo uporabnike v kolikor jih imammo
+ if (isset($raven['uporabniki']) && sizeof($raven['uporabniki']) > 0) {
+ foreach ($raven['uporabniki'] as $uporabnik) {
+ $sql_user = sisplet_query("INSERT INTO srv_hierarhija_struktura_users (hierarhija_struktura_id, user_id)
+ VALUES ('" . $id_strukture . "', '" . $uporabnik . "')");
+ $this->sqlError($sql_user);
+
+ // Omogočimo tudi dostop uporabnikom do hierarhije s pravicami 10, najprej pa preverimo če je že vpisan, ker ne dovolimo duplikatov
+ $sql_uporabnik_obstaja = sisplet_query("SELECT type FROM srv_hierarhija_users WHERE anketa_id='".$this->anketa."' AND user_id='".$uporabnik."'");
+
+ if(mysqli_num_rows($sql_uporabnik_obstaja)) {
+ $sql_hierarhija_user = sisplet_query("INSERT INTO srv_hierarhija_users (user_id, anketa_id, type) VALUES ('" . $uporabnik . "', '" . $this->anketa . "', 10)");
+ $this->sqlError($sql_hierarhija_user);
+ }
+
+ // Omogočimo dostop omenjenim uporabnikom
+ HierarhijaQuery::dostopZaUporabnika($this->anketa, $uporabnik, 'insert');
+ }
+ }
+
+ // Vpišemo še vse child elemente, ki so v drevesni strukturi
+ $this->insert($polje, $raven['id'], $id_strukture);
+
+
+ }
+ }
+
+ }
+
+ }
+
+
+ /**
+ * Pridobimo vrednost za primerjavo;
+ *
+ * @param (array) $primerjava
+ * @return $this;
+ */
+ private $primerjava;
+
+ public function compare($primerjava)
+ {
+ $this->primerjava = $primerjava;
+ return $this;
+ }
+
+ /**
+ * Pridobimo strukturo v obliki multi arraya in potem dodamo še uporabnike
+ *
+ * @return (array)
+ */
+ protected function getStrukturaInUporabniki()
+ {
+
+ $sql_vsa_hierarhija = (new HierarhijaOnlyQuery())->queryStruktura($this->anketa);
+
+ // Izdelamo polje iz sql poizvedbe, da bomo v nadaljevanju izdelali vgnezdeno polje
+ $struktura = [];
+ while ($obj = $sql_vsa_hierarhija->fetch_object()) {
+ $struktura[] = [
+ 'id' => $obj->id,
+ 'ravni_id' => $obj->ravni_id,
+ 'parent_id' => (is_null($obj->parent_id) ? 0 : $obj->parent_id),
+ 'sifrant_id' => $obj->sifrant_id,
+ 'level' => $obj->level,
+ 'uporabniki' => $this->getVseUporabnikeZaStrukturo($obj->id)
+ ];
+ }
+
+ return $struktura;
+ }
+
+
+ /**
+ * Pridobimo ID vseh uporabnikov, ki so na določeni strukturi
+ *
+ * @param (int) $id
+ * @return null | (array)
+ */
+
+ protected function getVseUporabnikeZaStrukturo($id)
+ {
+ $sql_uporabniki = sisplet_query("SELECT hierarhija_struktura_id, user_id FROM srv_hierarhija_struktura_users WHERE hierarhija_struktura_id='" . $id . "'");
+
+ if ($sql_uporabniki->num_rows == 0)
+ return null;
+
+ $uporabniki = [];
+ while ($obj = $sql_uporabniki->fetch_object()) {
+ $uporabniki[] = $obj->user_id;
+ }
+
+ return $uporabniki;
+ }
+
+ /**
+ * Iz strukture hierarhije izdelamo vgnezdena polja kot je drevesna struktura
+ *
+ * @param (array) $elements
+ * @param (int) $parentId
+ * @return array
+ */
+ protected function createTreeArray(array $elements, $parentId = 0)
+ {
+ $polje = [];
+
+ foreach ($elements as $element) {
+ // Najprej poiščemoprvi nivo
+ if ($element['parent_id'] == $parentId) {
+ $naslednji = $this->createTreeArray($elements, $element['id']);
+
+ // V kolikor imamo naslednji element polja, ga zapišemo
+ if ($naslednji)
+ $element['child'] = $naslednji;
+
+ $polje[] = $element;
+ }
+ }
+
+ return $polje;
+ }
+
+ public function kopirajHierarhijo($hierarhija, $uporabniki = 0)
+ {
+ // preverimo, če je json
+ if ($this->isJson($hierarhija))
+ $hierarhija = $this->isJson($hierarhija, 1);
+
+ // v kolikor želimo kopirati tudi uporabnike/strukturo potem zbiramo stare in nove vrednosti
+ if ($uporabniki == 1)
+ $primerjava = [
+ 'ravni' => [],
+ 'sifranti' => [],
+ ];
+
+ // vpisemo vse ravni in šifrante
+ if (!empty($hierarhija) && is_array($hierarhija) && sizeof($hierarhija) > 0) {
+
+ foreach ($hierarhija as $ravni) {
+ $sql_ravni = sisplet_query("INSERT INTO srv_hierarhija_ravni (anketa_id, user_id, level, ime) VALUES ('$this->anketa', '" . $this->user_id . "', '" . $ravni['st'] . "', '" . $ravni['ime'] . "')");
+ $this->sqlError($sql_ravni);
+ $id_ravni = mysqli_insert_id($GLOBALS['connect_db']);
+
+ if ($uporabniki == 1 && isset($primerjava))
+ $primerjava['ravni'][$ravni['id']] = $id_ravni;
+
+ // V kolikor so tudi šifranti vpišemo še šifrante
+ if (!empty($ravni['sifranti']) && sizeof($ravni['sifranti']) > 0 && !empty($id_ravni)) {
+ foreach ($ravni['sifranti'] as $sifrant) {
+ if (!empty($sifrant['ime'])) {
+ $sql_hs = sisplet_query("INSERT INTO srv_hierarhija_sifranti (hierarhija_ravni_id, ime) VALUES ('" . $id_ravni . "', '" . $sifrant['ime'] . "')");
+ $this->sqlError($sql_hs);
+
+ if ($uporabniki == 1 && isset($primerjava['sifranti'])) {
+ $primerjava['sifranti'][$sifrant['id']] = mysqli_insert_id($GLOBALS['connect_db']);
+ }
+
+ }
+ }
+ }
+ }
+
+ }
+
+ if ($uporabniki == 1 && isset($primerjava) && sizeof($primerjava['ravni']) > 0 && $id_shranjene_strukture > 0) {
+ $struktura = HierarhijaQuery::getHierarhijaShraniRow($id_shranjene_strukture, 'struktura');
+ $struktura = unserialize($struktura);
+
+ $this->compare($primerjava)->save($struktura);
+ }
+
+ }
+
+ /**
+ * Ustvarimo ravni in šifrante ter lahko tudi strukturo z uporabniki
+ *
+ * Funkcija omogoča kopiranje/ustvarjanje novih ravni in šifrantov, ki jih dobi preko večdimenzionalnega polja,
+ * lahko pa tudi kopira strukturo in uporabnike, tako da primerja nove ID-je ravni/sifrantov s starimi in gre postari strukturi ter
+ * zamenja stare ID-je z novimi ter zapiše tudi uporabnike
+ *
+ * @param (array) $hierarhija - multi array
+ * @param (int) $id_shranjene_strukture - pridobimo id vrstice iz tabele srv_hierarhija_shrani
+ * @param (int) $uporabniki - ali se kopirajo tudi uporabniki
+ * @return boolean
+ */
+ public function ustvariRavniInSifranteLahkoTudiStrukturo($hierarhija, $id_shranjene_strukture = null, $uporabniki = 0)
+ {
+ // v kolikor želimo kopirati tudi uporabnike/strukturo potem zbiramo stare in nove vrednosti
+ if ($uporabniki == 1)
+ $primerjava = [
+ 'ravni' => [],
+ 'sifranti' => [],
+ ];
+
+ // Nimamo hierarhije
+ if (empty($hierarhija))
+ return false;
+
+ // vpisemo vse ravni in šifrante
+ if (!empty($hierarhija) && is_array($hierarhija) && sizeof($hierarhija) > 0) {
+
+ foreach ($hierarhija as $ravni) {
+ $ravni = (array)$ravni;
+
+ $id_ravni = sisplet_query("INSERT INTO srv_hierarhija_ravni (anketa_id, user_id, level, ime) VALUES ('".$this->anketa."', '".$this->user_id."', '" . $ravni['st'] . "', '" . $ravni['ime'] . "')", "id");
+
+ if ($uporabniki == 1 && isset($primerjava))
+ $primerjava['ravni'][$ravni['id']] = $id_ravni;
+
+ // V kolikor so tudi šifranti vpišemo še šifrante
+ if (!empty($ravni['sifranti']) && sizeof($ravni['sifranti']) > 0 && !empty($id_ravni)) {
+ foreach ($ravni['sifranti'] as $sifrant) {
+ $sifrant = (array)$sifrant;
+
+ if (!empty($sifrant['ime'])) {
+ $sql_hs = sisplet_query("INSERT INTO srv_hierarhija_sifranti (hierarhija_ravni_id, ime) VALUES ('" . $id_ravni . "', '" . $sifrant['ime'] . "')");
+ $this->sqlError($sql_hs);
+
+ if ($uporabniki == 1 && isset($primerjava['sifranti'])) {
+ $primerjava['sifranti'][$sifrant['id']] = mysqli_insert_id($GLOBALS['connect_db']);
+ }
+
+ }
+ }
+ }
+ }
+
+ }
+
+ if ($uporabniki == 1 && isset($primerjava) && sizeof($primerjava['ravni']) > 0 && $id_shranjene_strukture > 0) {
+ $struktura = HierarhijaQuery::getHierarhijaShraniRow($id_shranjene_strukture, 'struktura');
+ $struktura = unserialize($struktura);
+
+ if (!empty($struktura) && sizeof($primerjava['ravni']) > 0) {
+ $this->compare($primerjava)->save($struktura);
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * Kopira celotrno strukturo iz stare ankete na novo anketo
+ *
+ * @param int $old_id
+ */
+ public function kopirajCelotroStrukturoKNoviAnketi($old_id)
+ {
+ // pridobimo ID trenutne hierarhije še s tarim ID-jem ankete
+ // $old_id - ID trenutne ankete, preden jo skopiramo
+ $id_shranjene_strukture = (new HierarhijaQuery())->getDeleteHierarhijaOptions($old_id, 'srv_hierarhija_shrani_id', null, null, false);
+ $shranjeni_podatki_stare_ankete = sisplet_query("SELECT * FROM srv_hierarhija_shrani WHERE id='" . $id_shranjene_strukture . "'", "obj");
+
+ // Kopiramo podatke iz srv_hierarhija_shrani
+ $ime_strukture_pri_novi_anketi = $shranjeni_podatki_stare_ankete->ime . '_' . date('H:i:s');
+ $id_stranjene_nove_ankete = sisplet_query("INSERT INTO
+ srv_hierarhija_shrani
+ (anketa_id, user_id, ime, hierarhija, struktura, st_uciteljev, st_vseh_uporabnikov, komentar)
+ VALUES
+ (
+ $this->anketa,
+ $this->user_id,
+ '" . $ime_strukture_pri_novi_anketi . "',
+ '" . $shranjeni_podatki_stare_ankete->hierarhija . "',
+ '" . $shranjeni_podatki_stare_ankete->struktura . "',
+ '" . $shranjeni_podatki_stare_ankete->st_uciteljev . "',
+ '" . $shranjeni_podatki_stare_ankete->st_vseh_uporabnikov . "',
+ '" . $shranjeni_podatki_stare_ankete->komentar . "'
+ )
+ ", "id");
+
+ // podatke shranimo še med opcije za specifično anketo
+ sisplet_query("INSERT INTO srv_hierarhija_options (anketa_id, option_name, option_value) VALUES ($this->anketa, 'srv_hierarhija_shrani_id', $id_stranjene_nove_ankete)");
+ sisplet_query("INSERT INTO srv_hierarhija_options (anketa_id, option_name, option_value) VALUES ($this->anketa, 'aktivna_hierarhija_ime', '" . $ime_strukture_pri_novi_anketi . "')");
+
+ if ($this->isJson($shranjeni_podatki_stare_ankete->hierarhija)) {
+ $hierarhija = json_decode($shranjeni_podatki_stare_ankete->hierarhija);
+ } else {
+ $hierarhija = unserialize($shranjeni_podatki_stare_ankete->hierarhija);
+ }
+
+ // $new_id je ID nove ankete, ki je bila skopirana
+ return $this->ustvariRavniInSifranteLahkoTudiStrukturo($hierarhija, $id_shranjene_strukture, 1);
+
+ }
+
+ /**
+ * Preverimo, če je JSON
+ *
+ * @param (string) $string
+ * @return return true ali error
+ */
+ public function isJson($string, $polje = 0)
+ {
+ if (is_string($string)) {
+ $array = json_decode(stripslashes($string));
+
+ if (json_last_error() == JSON_ERROR_NONE) {
+ if ($polje)
+ return $array;
+
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ public function sqlError($sql)
+ {
+ if (!$sql) {
+ echo mysqli_error($GLOBALS['connect_db']);
+ die();
+ }
+
+ }
+
+} \ No newline at end of file
diff --git a/admin/survey/modules/mod_hierarhija/class/HierarhijaPorocilaClass.php b/admin/survey/modules/mod_hierarhija/class/HierarhijaPorocilaClass.php
new file mode 100644
index 0000000..87745a2
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/class/HierarhijaPorocilaClass.php
@@ -0,0 +1,321 @@
+<?php
+/***************************************
+ * Description:
+ * Autor: Robert Šmalc
+ * Created date: 22.05.2017
+ *****************************************/
+
+namespace Hierarhija;
+
+use Hierarhija\Model\HierarhijaOnlyQuery;
+use Hierarhija\Model\HierarhijaQuery;
+use SurveyDataFile;
+use SurveyInfo;
+
+class HierarhijaPorocilaClass
+{
+ // Konstante do direktorijev
+ const tempFolder = "admin/survey/modules/mod_hierarhija/porocila/temp/";
+ const scriptFolder = "admin/survey/modules/mod_hierarhija/porocila/R/";
+ const resultFolder = "admin/survey/modules/mod_hierarhija/porocila/results/";
+
+ public function __construct($anketa = null)
+ {
+ if (is_null($anketa))
+ return 'Ni izbrane ankete';
+
+ $this->anketa = $anketa;
+
+ global $site_path;
+ $this->site_path = $site_path;
+
+ }
+
+ public function izvoz($vrsta = 'word')
+ {
+ if (!empty($_GET['t']) && in_array($_GET['t'], ['word', 'pdf']))
+ $vrsta = $_GET['t'];
+
+ // Samo za debug
+ if (false && $admin_type == 0) {
+
+ // R parametri za PDF
+ if ($vrsta == 'pdf') {
+ $script = $this->site_path . self::scriptFolder . 'test_1ka_pdf.R';
+ $content_type = 'text/x-csv; charset=utf-8';
+ $file_name = 'test.pdf';
+ }else{
+ // R parametri, za DOC,DOCX
+ $script = $this->site_path . self::scriptFolder . 'test_1ka.R';
+ $content_type = 'application/octet-stream';
+ $file_name = 'test.docx';
+ }
+
+ $out = exec('Rscript ' . $script . ' 2>&1', $output, $return_var);
+
+ // Testiranje - izpis errorjev
+ echo '<div>';
+ echo 'Rscript ' . $script;
+ //echo '<br />'.$out.'<br />';
+ var_dump($output);
+ echo '</div>';
+
+
+ // Pripravimo file za download
+ if (file_exists($this->site_path . self::resultFolder . $file_name)) {
+
+ $file = $this->site_path . self::resultFolder . $file_name;
+
+ header('Content-Description: File Transfer');
+ header('Content-Disposition: attachment; filename=' . basename($file_name));
+ header('Content-Type: '.$content_type);
+ header("Content-Transfer-Encoding: Binary");
+ header('Expires: 0');
+ header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
+ header('Pragma: public');
+ header('Content-Length: ' . filesize($file));
+
+ ob_clean();
+ flush();
+
+ readfile($file);
+ }
+
+ }
+
+ // Pripravi CSV s podatki
+ $this->pripraviCSV();
+ $this->pripraviCSVuciteljev();
+
+ // R parametri, za DOC,DOCX
+ $script = $this->site_path . self::scriptFolder . 'Hierarhija_1ka.R';
+ $content_type = 'application/octet-stream';
+ //Ime ankete
+ $ime = slug(SurveyInfo::getSurveyTitle(), '_');
+ $file_name = 'SAMOEVALVACIJSKO_POROCILO__' . $ime . '.docx';
+
+ // R parametri za PDF
+ if ($vrsta == 'pdf') {
+ $script = $this->site_path . self::scriptFolder . 'Hierarhija_1ka_pdf.R';
+ $content_type = 'text/x-csv; charset=utf-8';
+ $file_name = 'SAMOEVALVACIJSKO_POROCILO_' . $ime . '.pdf';
+ }
+
+ $shrani_id = HierarhijaQuery::getOptions($this->anketa, 'srv_hierarhija_shrani_id');
+ $logo = sisplet_query("SELECT logo FROM srv_hierarhija_shrani WHERE id='" . $shrani_id . "' AND anketa_id='" . $this->anketa . "'", "obj")->logo;
+
+ // 1 - odgovori v anketami
+ // 2 - seznam uciteljev in predmetov
+ // 3 - ime datoteke v katero shranimo (pdf, docx)
+ // 4 - logo
+ $param = 'hierarhija_' . $this->anketa . '.csv hierarhija_ucitelji_' . $this->anketa . '.csv '. $file_name . ' ' . $logo;
+
+ $out = exec('Rscript ' . $script . ' ' . $param . ' 2>&1', $output, $return_var);
+
+ // Testiranje - izpis errorjev
+ if ($admin_type == 0) {
+ echo '<div>';
+ echo 'Rscript ' . $script;
+ //echo '<br />'.$out.'<br />';
+ var_dump($output);
+ echo '</div>';
+ }
+
+ // Pripravimo file za download
+ if (file_exists($this->site_path . self::resultFolder . $file_name)) {
+
+ $file = $this->site_path . self::resultFolder . $file_name;
+
+ header('Content-Description: File Transfer');
+ header('Content-Disposition: attachment; filename=' . basename($file_name));
+ header('Content-Type: '.$content_type);
+ header("Content-Transfer-Encoding: Binary");
+ header('Expires: 0');
+ header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
+ header('Pragma: public');
+ header('Content-Length: ' . filesize($file));
+
+ ob_clean();
+ flush();
+
+ readfile($file);
+ }
+
+ // Na koncu pobrisemo zacasne datoteke
+ $this->deleteTemp();
+
+ // Ugasnemo skripto:)
+ die();
+ }
+
+ /**
+ * Pripravimo CSV izvoz vseh podatkov
+ */
+ private function pripraviCSV()
+ {
+ $temp_folder = $this->site_path . self::tempFolder;
+
+ $SDF = SurveyDataFile::get_instance();
+ $SDF->init($this->anketa);
+ $_headFileName = $SDF->getHeaderFileName();
+ $_dataFileName = $SDF->getDataFileName();
+ $_fileStatus = $SDF->getStatus();
+
+ if(count(file($_dataFileName)) < 3){
+ global $site_url;
+ echo 'Premalo podatkov';
+ redirect($site_url . 'admin/survey/index.php?anketa=' . $this->anketa . '&a=' . A_HIERARHIJA_SUPERADMIN . '&m=' . M_ANALIZE.'&error=invalid');
+ die();
+ }
+
+ if ($_headFileName != null && $_headFileName != '') {
+ $_HEADERS = unserialize(file_get_contents($_headFileName));
+ } else {
+ echo 'Error! Empty file name!';
+ }
+
+ // Zaenkrat dopuscamo samo status 6 in brez lurkerjev
+ $status_filter = '(' . STATUS_FIELD . ' ~ /6|5/)&&(' . LURKER_FIELD . '==0)';
+ //$status_filter = '('.STATUS_FIELD.'==6)&&('.LURKER_FIELD.'==0)';
+
+ //$start_sequence = $_HEADERS['_settings']['dataSequence'];
+ $start_sequence = 2;
+ $end_sequence = $_HEADERS['_settings']['metaSequence'] - 1;
+
+ $field_delimit = ';';
+
+ // Pridobi filtre
+// $hierarhija_analize = (new \HierarhijaAnalysis($this->anketa));
+// $hierarhija_filter = $hierarhija_analize->filterHierarhijeIzTekstovneDatoteke();
+// $ucitelj_filter = $hierarhija_analize->filterHierarhijeZaSpecificnegaUciteljaIzDatoteke();
+// (!empty($ucitelj_filter) ? $ucitelj_filter : $hierarhija_filter) // preveri izpis conzole
+
+ // Filtriramo podatke po statusu in jih zapisemo v temp folder
+ $out = shell_exec('awk -F"|" \'BEGIN {{OFS=","} {ORS="\n"}} ' . $status_filter . '\' ' . $_dataFileName . ' | cut -d \'|\' -f ' . $start_sequence . '-' . $end_sequence . ' >> ' . $temp_folder . 'temp_data_' . $this->anketa . '.dat');
+// dump('awk -F"|" \'BEGIN {{OFS=","} {ORS="\n"}} '.$status_filter.'\' '.$_dataFileName.' | cut -d \'|\' -f '.$start_sequence.'-'.$end_sequence.' >> '.$temp_folder.'temp_data_'.$this->anketa.'.dat');
+
+
+ // Ustvarimo koncni CSV
+ if ($fd = fopen($temp_folder . 'temp_data_' . $this->anketa . '.dat', "r")) {
+
+ $fd2 = fopen($temp_folder . 'hierarhija_' . $this->anketa . '.csv', "w+");
+
+ $convertType = 1; // kateri tip konvertiranja uporabimo
+ $convertTypes[1] = array('charSet' => 'windows-1250',
+ 'delimit' => ';',
+ 'newLine' => "\n",
+ 'BOMchar' => "\xEF\xBB\xBF");
+ # dodamo boomchar za utf-8
+ fwrite($fd2, $convertTypes[$convertType]['BOMchar']);
+
+ # naredimo header row
+ foreach ($_HEADERS AS $spid => $spremenljivka) {
+ if (count($spremenljivka['grids']) > 0) {
+ foreach ($spremenljivka['grids'] AS $gid => $grid) {
+ foreach ($grid['variables'] AS $vid => $variable) {
+ if ($spremenljivka['tip'] !== 'sm' && !($variable['variable'] == 'uid' && $variable['naslov'] == 'User ID')) {
+ $output1 .= strip_tags($variable['variable']) . $field_delimit;
+ $output2 .= '"' . strip_tags($variable['naslov']) . '"' . $field_delimit;
+ }
+ }
+ }
+ }
+ }
+
+ fwrite($fd2, $output1 . "\r\n");
+ fwrite($fd2, $output2 . "\r\n");
+
+ while ($line = fgets($fd)) {
+
+ $temp = array();
+ $temp = explode('|', $line);
+
+ // Zamenjamo številke z vrednostmi predmetov hierarhije
+ $grupaId = HierarhijaOnlyQuery::getGrupaId($this->anketa);
+
+ // Pripravimo polje po katerem iščemo nivoje
+ $stRavni = sisplet_query("SELECT count('id') as st FROM srv_hierarhija_ravni WHERE anketa_id = '" . $this->anketa . "'", "obj")->st;
+ $isci_po_polju = "'nivo1'";
+ for ($i = 2; $i <= $stRavni; $i++) {
+ $isci_po_polju .= ",'nivo" . $i . "'";
+ }
+
+ $elementi_hierarhije = sisplet_query("SELECT id, variable FROM srv_spremenljivka WHERE gru_id='" . $grupaId . "' AND variable IN (" . $isci_po_polju . ") ORDER BY vrstni_red", "obj");
+
+ // od 8 elementa v txt datoteki se začne naprej hierarhija
+ $line_explode = explode('|', $line);
+ // številka prvega elementa, ki ga bomo zamenjali - vloga
+ $st = 9;
+ foreach ($elementi_hierarhije as $element) {
+ $ime_strukture = sisplet_query("SELECT naslov FROM srv_vrednost WHERE spr_id='" . $element->id . "' AND variable='" . $line_explode[$st] . "'", "obj")->naslov;
+ $line_explode[$st] = $ime_strukture;
+ $st++;
+ }
+
+ $line = join('|', $line_explode);
+ $line = '"' . str_replace(array("\r", "\n", "\"", "|"), array("", "", "", '";"'), $line) . '"';
+
+
+ // Spremenimo encoding v windows-1250
+ //$line = iconv("UTF-8","Windows-1250//TRANSLIT", $line);
+
+ fwrite($fd2, $line);
+ fwrite($fd2, "\r\n");
+
+ }
+
+ fclose($fd2);
+ }
+ fclose($fd);
+
+
+ // Na koncu pobrisemo temp datoteke
+ if (file_exists($temp_folder . '/temp_data_' . $this->anketa . '.dat')) {
+ unlink($temp_folder . '/temp_data_' . $this->anketa . '.dat');
+ }
+ }
+
+ /**
+ * Izvoz hierarhije učiteljev z imenomin priimkom ter elektronskim naslovom
+ */
+ private function pripraviCSVuciteljev(){
+ $ucitelji = HierarhijaIzvoz::getInstance($this->anketa)->csvIzvozStruktureZaObdelavo(true);
+
+ $temp_folder = $this->site_path . self::tempFolder;
+ $file = fopen($temp_folder . 'hierarhija_ucitelji_' . $this->anketa . '.csv', "w+");
+
+ $convertType = 1; // kateri tip konvertiranja uporabimo
+ $convertTypes[1] = array('charSet' => 'windows-1250',
+ 'delimit' => ';',
+ 'newLine' => "\n",
+ 'BOMchar' => "\xEF\xBB\xBF");
+ # dodamo boomchar za utf-8
+ fwrite($file, $convertTypes[$convertType]['BOMchar']);
+
+ foreach($ucitelji as $ucitelj){
+ fputcsv($file, $ucitelj);
+ }
+
+ fclose($file);
+ }
+
+ private function deleteTemp()
+ {
+ $temp_folder = $this->site_path . self::tempFolder;
+
+ // Pobriše CSV datoteko
+ if (file_exists($temp_folder . '/hierarhija' . $this->anketa . '.csv'))
+ unlink($temp_folder . '/hierarhija' . $this->anketa . '.csv');
+
+ // Pobriše CSV datoteko uciteljev
+ if (file_exists($temp_folder . '/hierarhija_ucitelji_' . $this->anketa . '.csv'))
+ unlink($temp_folder . '/hierarhija_ucitelji_' . $this->anketa . '.csv');
+
+ // Pobrisemo še vse v rezultatih
+ $files = glob($this->site_path . self::resultFolder . '*');
+ foreach ($files as $file) {
+ if (is_file($file))
+ unlink($file);
+ }
+ }
+} \ No newline at end of file
diff --git a/admin/survey/modules/mod_hierarhija/css/mod_hierarhija.css b/admin/survey/modules/mod_hierarhija/css/mod_hierarhija.css
new file mode 100644
index 0000000..28ff332
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/css/mod_hierarhija.css
@@ -0,0 +1,755 @@
+.clear {
+ clear: both;
+}
+
+/* JsTree */
+ /*righ click */
+.vakata-context {
+ z-index: 10052 !important;
+}
+#admin_hierarhija_jstree{
+ padding-bottom: 20px;
+}
+
+/* SUPERADMIN HIERARHIJA */
+.hierarhija-levi-meni{
+ float: left;
+ display:block;
+ padding: 10px 8px;
+ margin: 20px 10px 0 0;
+ width: 140px;
+ min-height: 250px;
+ background-color: #eff2f7;
+}
+.hierarhija-levi-meni>div{
+ font-weight: bold;
+ padding-bottom: 10px;
+}
+.hierarhija-levi-meni>div.h-tabela{
+ padding: 2px;
+ background: #FFF;
+ min-height: 240px;
+ border: 1px solid #e2e2e2;
+ max-height: 340px;
+ overflow: auto;
+}
+.hierarhija-levi-meni>div>table{
+ font-weight: normal;
+ width: 100%;
+ cursor: pointer;
+}
+.hierarhija-levi-meni>div>table td.h-ime-shranjeno{
+ padding-bottom: 5px;
+ border-bottom: 1px solid #e2e2e2;
+}
+
+td.h-ime-shranjeno:hover {
+ color: #0C377A !important;
+}
+
+.hierarhija_fieldset {
+ padding-bottom: 1em;
+ float: left;
+ display: block;
+}
+
+.h-sa-div-inline {
+ display: inline-block;
+ float: left;
+ min-width: 12em;
+ padding-right: 2em;
+}
+
+.h-sa-div-inline label {
+ clear: both;
+ display: block;
+}
+
+.h-sa-div-inline.nivo select {
+ width: 10em;
+}
+
+.h-sa-div-inline.submit {
+ padding-top: 1.5em;
+ padding-left: 1em;
+}
+
+.h-sa-list {
+ padding-top: 1em;
+}
+
+.h-sa-nivo-primer select {
+ margin: 5px;
+}
+
+.izgradnja_hierarhije {
+ width: auto;
+ display: block;
+}
+
+.h-form-field {
+ padding: 1.3em 0;
+}
+
+.h-form-field label {
+ width: 22em;
+ padding: 0 1em;
+ display: block;
+ float: left;
+ text-align: right;
+}
+
+.h-form-options {
+ display: block;
+ float: left;
+ min-width: 25em;
+}
+
+.h-form-options textarea {
+ height: 6em;
+ width: 40em;
+}
+
+.h-required {
+ border: 1px solid red !important;
+}
+
+.h-email-user {
+ min-width: 0;
+ margin-right: 10px;
+}
+
+.h-opozorilo {
+ float: left;
+ color: red;
+ font-style: italic;
+ display: none;
+}
+
+.hierarhija-filter {
+ min-width: 75px;
+ display: block;
+ float: left;
+}
+
+.upload-file {
+ border: solid #8a9fbf 1px;
+ background: #fff;
+ font-size: 11px;
+ display: block !important;
+ width: 100%;
+ max-width: 360px;
+ -webkit-transition: all 0.2s ease-in-out;
+ -moz-transition: all 0.2s ease-in-out;
+ -o-transition: all 0.2s ease-in-out;
+ transition: all 0.2s ease-in-out;
+ box-shadow: 0 0 0 2px #fff;
+}
+
+.upload-file:hover {
+ border: solid #fa4913 1px;
+}
+
+.upload-file .NFI-button {
+ height: 22px;
+ line-height: 22px;
+ background: #8a9fbf;
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
+ color: #fff;
+ width: 30%;
+ font-weight: 700;
+}
+
+.upload-file .NFI-button:hover {
+ background: #fa4913;
+}
+
+.upload-file .NFI-filename {
+ width: 66%;
+ height: 20px;
+ margin: 0 !important;
+ padding: 0 !important;
+ display: block !important;
+ -webkit-appearance: none !important;
+ -moz-appearance: none !important;
+ appearance: none !important;
+ border: none !important;
+}
+
+/* MENI HIERARHIJA UČITELJ IN SUPERADMIN */
+.hierarhija-navigacija ul {
+ list-style-type: none;
+ margin: 0;
+ padding: 0;
+ overflow: hidden;
+ border: 1px solid #B9C5D9;
+ background-color: #eff2f7;
+ font-weight: bold;
+}
+
+.hierarhija-navigacija li {
+ float: left;
+}
+
+.hierarhija-navigacija li a {
+ display: block;
+ color: #8a9fbf;
+ text-align: center;
+ padding: 10px 12px;
+ text-decoration: none;
+}
+
+.hierarhija-navigacija li a:hover:not(.active) {
+ color: #1f356c;
+ background-color: #ddd;
+}
+
+.hierarhija-navigacija li a.active {
+ color: white;
+ background-color: #fa4913;
+}
+
+.hierarhija-desni-link{
+ float: right !important;
+ display: inline-block;
+}
+
+.hierarhija-desni-link a{
+ display: inline-block !important;
+}
+
+
+/* end meni hierarhija - superadmin */
+
+.hierarhija-status-ucitelji {
+ padding-top: 20px;
+}
+
+table.hierarhija-status-ucitelji, table.hierarhija-status-admin {
+ border-spacing: 0;
+}
+
+.hierarhija-status-ucitelji th, .hierarhija-status-admin th {
+ padding: 8px 10px;
+ text-align: left;
+ border: 1px solid #ddd;
+}
+
+.hierarhija-status-ucitelji td, .hierarhija-status-admin td {
+ padding: 8px 10px;
+ text-align: left;
+ border: 1px solid #ddd;
+}
+
+.hierarhija-plus {
+ display: inline-block;
+ float: left;
+ cursor: pointer;
+ background-image: url('../../../img_new/sprites.png');
+ background-position: -220px -54px;
+ width: 15px;
+ height: 14px;
+}
+.hierarhija-minus {
+ display: inline-block;
+ float: left;
+ cursor: pointer;
+ background-image: url('/admin/survey/img_new/sprites.png');
+ background-position: 0px -58px;
+ width: 15px;
+ height: 14px;
+}
+.hierarhija-izvoz {
+ display: inline-block;
+ float: left;
+ cursor: pointer;
+ background-image: url('/admin/survey/img_new/sprites.png');
+ background-position: -687px -759px;
+ width: 14px;
+ height: 20px;
+}
+.hierarhija-uvoz {
+ display: inline-block;
+ float: left;
+ cursor: pointer;
+ background-image: url('/admin/survey/img_new/sprites.png');
+ background-position: -3px -866px;
+ width: 20px;
+ height: 20px;
+}
+
+.hierarhija-nov-nivo, .hierarhija-urejanje {
+ cursor: pointer;
+ display: block;
+ float: left;
+ margin: 0 10px;
+}
+
+.hierarhija-elementi {
+ float: left;
+ margin: 0 10px;
+ display: inline-block;
+}
+
+.hierarhija-inline {
+ float: left;
+ display: inline-block;
+ margin-right: 2px;
+}
+
+.sifranti-brisanje{
+ display: block;
+ float: left;
+ clear: both;
+}
+.sifranti-brisanje>.brisi-x{
+ float: left;
+ padding: 4px 0px;
+ margin: -2px 5px;
+}
+.sifranti-razmik{
+ padding: 10px 5px;
+}
+.sifranti-razmik>ul{
+ padding: 0;
+}
+
+/* ON - OFF gumb */
+.onoffswitch {
+ position: relative;
+ width: 56px;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+}
+
+.onoffswitch-checkbox {
+ display: none;
+}
+
+.onoffswitch-label {
+ display: block;
+ overflow: hidden;
+ cursor: pointer;
+ border: 2px solid #999999;
+ border-radius: 18px;
+}
+
+.onoffswitch-inner {
+ display: block;
+ width: 200%;
+ margin-left: -100%;
+ transition: margin 0.3s ease-in 0s;
+}
+
+.onoffswitch-inner:before, .onoffswitch-inner:after {
+ display: block;
+ float: left;
+ width: 50%;
+ height: 15px;
+ padding: 0;
+ line-height: 15px;
+ font-size: 14px;
+ color: white;
+ font-family: Trebuchet, Arial, sans-serif;
+ font-weight: bold;
+ box-sizing: border-box;
+}
+
+.onoffswitch-inner:before {
+ content: "Da";
+ padding-left: 10px;
+ background-color: #647faa;
+ color: #FFFFFF;
+}
+
+.onoffswitch-inner:after {
+ content: "Ne";
+ padding-right: 10px;
+ background-color: #EEEEEE;
+ color: #999999;
+ text-align: right;
+}
+
+.onoffswitch-switch {
+ display: block;
+ width: 14px;
+ margin: 0.5px;
+ background: #FFFFFF;
+ position: absolute;
+ top: 0;
+ bottom: 0;
+ right: 37px;
+ border: 2px solid #999999;
+ border-radius: 18px;
+ transition: all 0.3s ease-in 0s;
+}
+
+.onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-inner {
+ margin-left: 0;
+}
+
+.onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-switch {
+ right: 0;
+}
+
+.editable-hierarhija{
+ border: 1px dashed #0C377A !important;
+}
+
+#div_odprto_vprasanje > table {
+ margin: 35px 0 !important;
+}
+
+/* x briši*/
+.brisi-x{
+ background-image: url(/admin/survey/img_new/sprites.png) !important;
+ background-position: -440px -54px;
+ width: 12px;
+ height: 18px;
+ cursor: pointer;
+ float: right;
+}
+.brisi-x:hover{
+ background-position: -452px -54px;
+}
+
+/*urejanje ikone datatables*/
+.ikona{
+ background-image: url(/admin/survey/img_new/sprites.png) !important;
+ cursor: pointer;
+ display: inline-block;
+ margin-left: 9px;
+ width: 16px;
+ height: 20px;
+ background-repeat: no-repeat;
+}
+.ikona-kopiraj{
+ background-position: -32px -54px;
+ width: 19px;
+ height: 20px;
+}
+.ikona-brisi{
+ background-position: -16px -54px;
+}
+.ikona-uporabniki{
+ background-position: 0 -54px;
+}
+/* end ON - OFF */
+
+/***** TOOGLE RADIO BUTTON *****/
+.wrapper {
+ /*margin: 100px 0;*/
+}
+.toggle_radio{
+ position: relative;
+ background: rgba(12,92,196, .6);
+ margin: 4px auto;
+ overflow: hidden;
+ padding: 0 !important;
+ -webkit-border-radius: 50px;
+ -moz-border-radius: 50px;
+ border-radius: 50px;
+ position: relative;
+ height: 26px;
+ width: 354px;
+}
+.toggle_radio > * {
+ float: left;
+}
+.toggle_radio input[type=radio]{
+ display: none;
+ /*position: fixed;*/
+}
+.toggle_radio label{
+ color: rgba(255,255,255,.9);
+ z-index: 0;
+ display: block;
+ width: 170px;
+ height: 20px;
+ margin: 3px 3px;
+ -webkit-border-radius: 50px;
+ -moz-border-radius: 50px;
+ border-radius: 50px;
+ cursor: pointer;
+ z-index: 1;
+ text-align: center;
+ margin-top: -7px;
+}
+.toggle_option_slider{
+ width: 172px;
+ height: 20px;
+ position: absolute;
+ top: 3px;
+ -webkit-border-radius: 50px;
+ -moz-border-radius: 50px;
+ border-radius: 50px;
+ background: #ffe6d6 !important;
+}
+
+#seznam_toggle:checked ~ .toggle_option_slider{
+ background: rgba(255,255,255,.3);
+ left: 3px;
+}
+#tabela_toggle:checked ~ .toggle_option_slider{
+ background: rgba(255,255,255,.3);
+ left: 179px;
+}
+/***** END TOOGLE RADIO BUTTON *****/
+
+
+/***** Hierarhija prikaz v tabeli in izbira opcij *****/
+.prikaz-sifrantov{
+ width: 100%;
+ clear: both;
+}
+.prikaz-sifrantov .gumb{
+ padding: 20px 0;
+}
+.prikaz-sifrantov .tabela, .prikaz-sifrantov .gumb{
+ display: inline-block;
+ float: left;
+}
+.table-prikaz-izbranih-sifrantov{
+ border-spacing: 0;
+ padding: 0 35px 25px;
+}
+
+table.tabela-obroba{
+ border-spacing: 0;
+}
+.tabela-obroba th{
+ color: gray;
+ background-color: #EFF2F7;
+}
+.tabela-obroba th, .tabela-obroba td{
+ padding: 8px 10px;
+ border: 1px solid #ddd;
+}
+
+.tabela-vpis-sifrantov #gumb td{
+ text-align:right;
+ border: none;
+}
+
+.tabela-vpis-sifrantov #gumb td button{
+ margin: 10px 10px 0;
+}
+
+.table-prikaz-izbranih-sifrantov th{
+ padding: 0 15px;
+}
+
+.table-prikaz-izbranih-sifrantov td{
+ padding: 8px 10px;
+ border: 1px solid #ddd;
+}
+.table-prikaz-izbranih-sifrantov span{
+ float: right;
+ cursor: pointer;
+}
+
+.inline-element-hierarhije{
+ width: 30%;
+ display: inline-block;
+ float: left;
+ padding: 0 15px;
+}
+
+.inline-element-hierarhije .gumb{
+ padding-top: 20px;
+}
+
+.custom-datatables, .custom-datatables th, .custom-datatables td{
+ border: 1px solid #ddd !important;
+}
+
+#vpis-sifrantov-admin-tabela_wrapper #vpis-sifrantov-admin-tabela_filter,
+#hierarhija-status-admin_wrapper #hierarhija-status-admin_filter{
+ padding: 10px 0 20px !important;
+}
+#vpis-sifrantov-admin-tabela>tbody>tr{
+ vertical-align: top;
+}
+
+.h-uporabnik {
+ display: inline-block;
+ float: right;
+ padding: 4px 0 0 16px;
+ cursor: pointer;
+}
+.h-select2{
+ min-width: 100px;
+ display: inline-block;
+ float: left;
+}
+
+.h-uporabnik-prikazi{
+ clear: both;
+ display: block;
+ padding-top: 10px;
+ font-size: 11px;
+}
+.h-uporabnik-prikazi ul{
+ list-style: inherit !important;
+ padding-left: 15px !important;
+}
+
+/***** END Hierarhija prikaz v tabeli in izbira opcij *****/
+
+/***** DataTables pot do slik *****/
+table.dataTable thead th{
+ background-color: #EFF2F7 !important;
+}
+table.dataTable thead .sorting_asc{
+ background: url('/admin/survey/modules/mod_hierarhija/img/sort_asc.png') no-repeat top right;
+}
+
+table.dataTable thead .sorting_desc{
+ background: url('/admin/survey/modules/mod_hierarhija/img/sort_desc.png') no-repeat top right;
+}
+
+table.dataTable thead .sorting{
+ background: url('/admin/survey/modules/mod_hierarhija/img/sort_both.png') no-repeat top right;
+}
+
+table.dataTable thead .sorting_asc_disabled{
+ background: url('/admin/survey/modules/mod_hierarhija/img/sort_asc_disabled.png') no-repeat top right;
+}
+
+table.dataTable thead .sorting_desc_disabled {
+ background: url('/admin/survey/modules/mod_hierarhija/img/sort_desc_disabled.png') no-repeat top right;
+}
+tr.aktivno-urejanje {
+ background: #ffe6d6 !important;
+}
+/***** END DataTables pot do slik *****/
+
+
+
+/***** button groups *****/
+.btn{
+ display: inline-block;
+ padding: .2rem .6rem;
+ font-size: .8rem;
+ font-weight: 400;
+ line-height: 1.5;
+ text-align: center;
+ white-space: nowrap;
+ vertical-align: middle;
+ cursor: pointer;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ border: 1px solid transparent;
+ border-radius: .25rem;
+}
+/* moder */
+.btn-moder{
+ color: #ffffff;
+ background-color: #3d5f95;
+ background-image: none;
+ border-color: #24467C;
+}
+.btn-moder:hover {
+ color: #3d5f95;
+ background-color: #ffffff;
+ border-color: #3d5f95;
+}
+
+/* moder outline */
+.btn-moder-outline{
+ color: #3d5f95;
+ background-color: #ffffff;
+ background-image: none;
+ border-color: #24467C;
+}
+.btn-moder-outline:hover {
+ color: #fff;
+ background-color: #3d5f95;
+ border-color: #24467C;
+}
+
+/* rdeč */
+.btn-rdec{
+ color: #fff;
+ background-color: #fa4913;
+ border-color: #E13000;
+ background-image: none;
+}
+.btn-rdec:hover {
+ color: #fa4913;
+ background-color: #ffffff;
+ border-color: #fa4913;
+}
+
+/* rdeč outline */
+.btn-rdec-outline{
+ color: #fa4913;
+ background-color: #ffffff;
+ background-image: none;
+ border-color: #fa4913;
+}
+.btn-rdec-outline:hover {
+ color: #fff;
+ background-color: #fa4913;
+ border-color: #fa4913;
+}
+/***** END button groups *****/
+
+/***** Sweet alert 1ka barvna modifikacija *****/
+/* error */
+.sweet-alert .sa-icon.sa-error{
+ border-color: #fa4913 !important;
+}
+.sweet-alert .sa-icon.sa-error .sa-line{
+ background-color: #fa4913 !important;
+}an
+
+/* warning - klicaj */
+.sweet-alert .sa-icon.sa-warning {
+ border-color: #ffe6d6 !important;
+}
+.sweet-alert .sa-icon.sa-warning .sa-line{
+ background-color: #ffe6d6 !important;
+}
+
+.sweet-alert button {
+ color: #3d5f95 !important;
+ background-color: #ffffff !important;
+ background-image: none !important;
+ border: 1px solid #3d5f95 !important;
+}
+.sweet-alert button:hover {
+ color: #fff !important;
+ background-color: #3d5f95 !important;
+ border-color: #3d5f95 !important;
+}
+/***** END Sweet alert 1ka barvna modifikacija *****/
+
+div.qtip-content {
+ font-size: 9px;
+}
+.qtip-wrapper, .qtip-contentWrapper{
+ border: 0 !important;
+}
+.qtip-borderTop, .qtip-borderBottom{
+ display: none !important;
+}
+.qtip-title{
+ color: #0C377A !important;
+ background-color: #D8DFEA !important;
+}
+.qtip-content{
+ padding: 12px 9px !important;
+ background-color: #f7f7f7 !important;
+ border: 1px #D8DFEA solid;
+}
+
+/* Okvirčke */
+.okvircek{
+ width: 522px;
+ border: 1px dashed #B9C5D9;
+ padding: 3px 25px 18px;
+}
diff --git a/admin/survey/modules/mod_hierarhija/css/vendor/datatables.min.css b/admin/survey/modules/mod_hierarhija/css/vendor/datatables.min.css
new file mode 100644
index 0000000..aca8f9d
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/css/vendor/datatables.min.css
@@ -0,0 +1,21 @@
+/*
+ * This combined file was created by the DataTables downloader builder:
+ * https://datatables.net/download
+ *
+ * To rebuild or modify this file with the latest versions of the included
+ * software please visit:
+ * https://datatables.net/download/#dt/dt-1.10.12,r-2.1.0,sc-1.4.2
+ *
+ * Included libraries:
+ * DataTables 1.10.12, Responsive 2.1.0, Scroller 1.4.2
+ */
+
+table.dataTable{width:100%;margin:0 auto;clear:both;border-collapse:separate;border-spacing:0}table.dataTable thead th,table.dataTable tfoot th{font-weight:bold}table.dataTable thead th,table.dataTable thead td{padding:10px 18px;border-bottom:1px solid #111}table.dataTable thead th:active,table.dataTable thead td:active{outline:none}table.dataTable tfoot th,table.dataTable tfoot td{padding:10px 18px 6px 18px;border-top:1px solid #111}table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_desc{cursor:pointer;*cursor:hand}table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_desc,table.dataTable thead .sorting_asc_disabled,table.dataTable thead .sorting_desc_disabled{background-repeat:no-repeat;background-position:center right}table.dataTable thead .sorting{background-image:url("DataTables-1.10.12/images/sort_both.png")}table.dataTable thead .sorting_asc{background-image:url("DataTables-1.10.12/images/sort_asc.png")}table.dataTable thead .sorting_desc{background-image:url("DataTables-1.10.12/images/sort_desc.png")}table.dataTable thead .sorting_asc_disabled{background-image:url("DataTables-1.10.12/images/sort_asc_disabled.png")}table.dataTable thead .sorting_desc_disabled{background-image:url("DataTables-1.10.12/images/sort_desc_disabled.png")}table.dataTable tbody tr{background-color:#ffffff}table.dataTable tbody tr.selected{background-color:#B0BED9}table.dataTable tbody th,table.dataTable tbody td{padding:8px 10px}table.dataTable.row-border tbody th,table.dataTable.row-border tbody td,table.dataTable.display tbody th,table.dataTable.display tbody td{border-top:1px solid #ddd}table.dataTable.row-border tbody tr:first-child th,table.dataTable.row-border tbody tr:first-child td,table.dataTable.display tbody tr:first-child th,table.dataTable.display tbody tr:first-child td{border-top:none}table.dataTable.cell-border tbody th,table.dataTable.cell-border tbody td{border-top:1px solid #ddd;border-right:1px solid #ddd}table.dataTable.cell-border tbody tr th:first-child,table.dataTable.cell-border tbody tr td:first-child{border-left:1px solid #ddd}table.dataTable.cell-border tbody tr:first-child th,table.dataTable.cell-border tbody tr:first-child td{border-top:none}table.dataTable.stripe tbody tr.odd,table.dataTable.display tbody tr.odd{background-color:#f9f9f9}table.dataTable.stripe tbody tr.odd.selected,table.dataTable.display tbody tr.odd.selected{background-color:#acbad4}table.dataTable.hover tbody tr:hover,table.dataTable.display tbody tr:hover{background-color:#f6f6f6}table.dataTable.hover tbody tr:hover.selected,table.dataTable.display tbody tr:hover.selected{background-color:#aab7d1}table.dataTable.order-column tbody tr>.sorting_1,table.dataTable.order-column tbody tr>.sorting_2,table.dataTable.order-column tbody tr>.sorting_3,table.dataTable.display tbody tr>.sorting_1,table.dataTable.display tbody tr>.sorting_2,table.dataTable.display tbody tr>.sorting_3{background-color:#fafafa}table.dataTable.order-column tbody tr.selected>.sorting_1,table.dataTable.order-column tbody tr.selected>.sorting_2,table.dataTable.order-column tbody tr.selected>.sorting_3,table.dataTable.display tbody tr.selected>.sorting_1,table.dataTable.display tbody tr.selected>.sorting_2,table.dataTable.display tbody tr.selected>.sorting_3{background-color:#acbad5}table.dataTable.display tbody tr.odd>.sorting_1,table.dataTable.order-column.stripe tbody tr.odd>.sorting_1{background-color:#f1f1f1}table.dataTable.display tbody tr.odd>.sorting_2,table.dataTable.order-column.stripe tbody tr.odd>.sorting_2{background-color:#f3f3f3}table.dataTable.display tbody tr.odd>.sorting_3,table.dataTable.order-column.stripe tbody tr.odd>.sorting_3{background-color:whitesmoke}table.dataTable.display tbody tr.odd.selected>.sorting_1,table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_1{background-color:#a6b4cd}table.dataTable.display tbody tr.odd.selected>.sorting_2,table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_2{background-color:#a8b5cf}table.dataTable.display tbody tr.odd.selected>.sorting_3,table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_3{background-color:#a9b7d1}table.dataTable.display tbody tr.even>.sorting_1,table.dataTable.order-column.stripe tbody tr.even>.sorting_1{background-color:#fafafa}table.dataTable.display tbody tr.even>.sorting_2,table.dataTable.order-column.stripe tbody tr.even>.sorting_2{background-color:#fcfcfc}table.dataTable.display tbody tr.even>.sorting_3,table.dataTable.order-column.stripe tbody tr.even>.sorting_3{background-color:#fefefe}table.dataTable.display tbody tr.even.selected>.sorting_1,table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_1{background-color:#acbad5}table.dataTable.display tbody tr.even.selected>.sorting_2,table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_2{background-color:#aebcd6}table.dataTable.display tbody tr.even.selected>.sorting_3,table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_3{background-color:#afbdd8}table.dataTable.display tbody tr:hover>.sorting_1,table.dataTable.order-column.hover tbody tr:hover>.sorting_1{background-color:#eaeaea}table.dataTable.display tbody tr:hover>.sorting_2,table.dataTable.order-column.hover tbody tr:hover>.sorting_2{background-color:#ececec}table.dataTable.display tbody tr:hover>.sorting_3,table.dataTable.order-column.hover tbody tr:hover>.sorting_3{background-color:#efefef}table.dataTable.display tbody tr:hover.selected>.sorting_1,table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_1{background-color:#a2aec7}table.dataTable.display tbody tr:hover.selected>.sorting_2,table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_2{background-color:#a3b0c9}table.dataTable.display tbody tr:hover.selected>.sorting_3,table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_3{background-color:#a5b2cb}table.dataTable.no-footer{border-bottom:1px solid #111}table.dataTable.nowrap th,table.dataTable.nowrap td{white-space:nowrap}table.dataTable.compact thead th,table.dataTable.compact thead td{padding:4px 17px 4px 4px}table.dataTable.compact tfoot th,table.dataTable.compact tfoot td{padding:4px}table.dataTable.compact tbody th,table.dataTable.compact tbody td{padding:4px}table.dataTable th.dt-left,table.dataTable td.dt-left{text-align:left}table.dataTable th.dt-center,table.dataTable td.dt-center,table.dataTable td.dataTables_empty{text-align:center}table.dataTable th.dt-right,table.dataTable td.dt-right{text-align:right}table.dataTable th.dt-justify,table.dataTable td.dt-justify{text-align:justify}table.dataTable th.dt-nowrap,table.dataTable td.dt-nowrap{white-space:nowrap}table.dataTable thead th.dt-head-left,table.dataTable thead td.dt-head-left,table.dataTable tfoot th.dt-head-left,table.dataTable tfoot td.dt-head-left{text-align:left}table.dataTable thead th.dt-head-center,table.dataTable thead td.dt-head-center,table.dataTable tfoot th.dt-head-center,table.dataTable tfoot td.dt-head-center{text-align:center}table.dataTable thead th.dt-head-right,table.dataTable thead td.dt-head-right,table.dataTable tfoot th.dt-head-right,table.dataTable tfoot td.dt-head-right{text-align:right}table.dataTable thead th.dt-head-justify,table.dataTable thead td.dt-head-justify,table.dataTable tfoot th.dt-head-justify,table.dataTable tfoot td.dt-head-justify{text-align:justify}table.dataTable thead th.dt-head-nowrap,table.dataTable thead td.dt-head-nowrap,table.dataTable tfoot th.dt-head-nowrap,table.dataTable tfoot td.dt-head-nowrap{white-space:nowrap}table.dataTable tbody th.dt-body-left,table.dataTable tbody td.dt-body-left{text-align:left}table.dataTable tbody th.dt-body-center,table.dataTable tbody td.dt-body-center{text-align:center}table.dataTable tbody th.dt-body-right,table.dataTable tbody td.dt-body-right{text-align:right}table.dataTable tbody th.dt-body-justify,table.dataTable tbody td.dt-body-justify{text-align:justify}table.dataTable tbody th.dt-body-nowrap,table.dataTable tbody td.dt-body-nowrap{white-space:nowrap}table.dataTable,table.dataTable th,table.dataTable td{-webkit-box-sizing:content-box;box-sizing:content-box}.dataTables_wrapper{position:relative;clear:both;*zoom:1;zoom:1}.dataTables_wrapper .dataTables_length{float:left}.dataTables_wrapper .dataTables_filter{float:right;text-align:right}.dataTables_wrapper .dataTables_filter input{margin-left:0.5em}.dataTables_wrapper .dataTables_info{clear:both;float:left;padding-top:0.755em}.dataTables_wrapper .dataTables_paginate{float:right;text-align:right;padding-top:0.25em}.dataTables_wrapper .dataTables_paginate .paginate_button{box-sizing:border-box;display:inline-block;min-width:1.5em;padding:0.5em 1em;margin-left:2px;text-align:center;text-decoration:none !important;cursor:pointer;*cursor:hand;color:#333 !important;border:1px solid transparent;border-radius:2px}.dataTables_wrapper .dataTables_paginate .paginate_button.current,.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover{color:#333 !important;border:1px solid #979797;background-color:white;background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #fff), color-stop(100%, #dcdcdc));background:-webkit-linear-gradient(top, #fff 0%, #dcdcdc 100%);background:-moz-linear-gradient(top, #fff 0%, #dcdcdc 100%);background:-ms-linear-gradient(top, #fff 0%, #dcdcdc 100%);background:-o-linear-gradient(top, #fff 0%, #dcdcdc 100%);background:linear-gradient(to bottom, #fff 0%, #dcdcdc 100%)}.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover,.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active{cursor:default;color:#666 !important;border:1px solid transparent;background:transparent;box-shadow:none}.dataTables_wrapper .dataTables_paginate .paginate_button:hover{color:white !important;border:1px solid #111;background-color:#585858;background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #585858), color-stop(100%, #111));background:-webkit-linear-gradient(top, #585858 0%, #111 100%);background:-moz-linear-gradient(top, #585858 0%, #111 100%);background:-ms-linear-gradient(top, #585858 0%, #111 100%);background:-o-linear-gradient(top, #585858 0%, #111 100%);background:linear-gradient(to bottom, #585858 0%, #111 100%)}.dataTables_wrapper .dataTables_paginate .paginate_button:active{outline:none;background-color:#2b2b2b;background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #2b2b2b), color-stop(100%, #0c0c0c));background:-webkit-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:-moz-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:-ms-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:-o-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:linear-gradient(to bottom, #2b2b2b 0%, #0c0c0c 100%);box-shadow:inset 0 0 3px #111}.dataTables_wrapper .dataTables_paginate .ellipsis{padding:0 1em}.dataTables_wrapper .dataTables_processing{position:absolute;top:50%;left:50%;width:100%;height:40px;margin-left:-50%;margin-top:-25px;padding-top:20px;text-align:center;font-size:1.2em;background-color:white;background:-webkit-gradient(linear, left top, right top, color-stop(0%, rgba(255,255,255,0)), color-stop(25%, rgba(255,255,255,0.9)), color-stop(75%, rgba(255,255,255,0.9)), color-stop(100%, rgba(255,255,255,0)));background:-webkit-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);background:-moz-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);background:-ms-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);background:-o-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);background:linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%)}.dataTables_wrapper .dataTables_length,.dataTables_wrapper .dataTables_filter,.dataTables_wrapper .dataTables_info,.dataTables_wrapper .dataTables_processing,.dataTables_wrapper .dataTables_paginate{color:#333}.dataTables_wrapper .dataTables_scroll{clear:both}.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody{*margin-top:-1px;-webkit-overflow-scrolling:touch}.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody th,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody td{vertical-align:middle}.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody th>div.dataTables_sizing,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody td>div.dataTables_sizing{height:0;overflow:hidden;margin:0 !important;padding:0 !important}.dataTables_wrapper.no-footer .dataTables_scrollBody{border-bottom:1px solid #111}.dataTables_wrapper.no-footer div.dataTables_scrollHead table,.dataTables_wrapper.no-footer div.dataTables_scrollBody table{border-bottom:none}.dataTables_wrapper:after{visibility:hidden;display:block;content:"";clear:both;height:0}@media screen and (max-width: 767px){.dataTables_wrapper .dataTables_info,.dataTables_wrapper .dataTables_paginate{float:none;text-align:center}.dataTables_wrapper .dataTables_paginate{margin-top:0.5em}}@media screen and (max-width: 640px){.dataTables_wrapper .dataTables_length,.dataTables_wrapper .dataTables_filter{float:none;text-align:center}.dataTables_wrapper .dataTables_filter{margin-top:0.5em}}
+
+
+table.dataTable.dtr-inline.collapsed>tbody>tr>td.child,table.dataTable.dtr-inline.collapsed>tbody>tr>th.child,table.dataTable.dtr-inline.collapsed>tbody>tr>td.dataTables_empty{cursor:default !important}table.dataTable.dtr-inline.collapsed>tbody>tr>td.child:before,table.dataTable.dtr-inline.collapsed>tbody>tr>th.child:before,table.dataTable.dtr-inline.collapsed>tbody>tr>td.dataTables_empty:before{display:none !important}table.dataTable.dtr-inline.collapsed>tbody>tr>td:first-child,table.dataTable.dtr-inline.collapsed>tbody>tr>th:first-child{position:relative;padding-left:30px;cursor:pointer}table.dataTable.dtr-inline.collapsed>tbody>tr>td:first-child:before,table.dataTable.dtr-inline.collapsed>tbody>tr>th:first-child:before{top:9px;left:4px;height:14px;width:14px;display:block;position:absolute;color:white;border:2px solid white;border-radius:14px;box-shadow:0 0 3px #444;box-sizing:content-box;text-align:center;font-family:'Courier New', Courier, monospace;line-height:14px;content:'+';background-color:#31b131}table.dataTable.dtr-inline.collapsed>tbody>tr.parent>td:first-child:before,table.dataTable.dtr-inline.collapsed>tbody>tr.parent>th:first-child:before{content:'-';background-color:#d33333}table.dataTable.dtr-inline.collapsed>tbody>tr.child td:before{display:none}table.dataTable.dtr-inline.collapsed.compact>tbody>tr>td:first-child,table.dataTable.dtr-inline.collapsed.compact>tbody>tr>th:first-child{padding-left:27px}table.dataTable.dtr-inline.collapsed.compact>tbody>tr>td:first-child:before,table.dataTable.dtr-inline.collapsed.compact>tbody>tr>th:first-child:before{top:5px;left:4px;height:14px;width:14px;border-radius:14px;line-height:14px;text-indent:3px}table.dataTable.dtr-column>tbody>tr>td.control,table.dataTable.dtr-column>tbody>tr>th.control{position:relative;cursor:pointer}table.dataTable.dtr-column>tbody>tr>td.control:before,table.dataTable.dtr-column>tbody>tr>th.control:before{top:50%;left:50%;height:16px;width:16px;margin-top:-10px;margin-left:-10px;display:block;position:absolute;color:white;border:2px solid white;border-radius:14px;box-shadow:0 0 3px #444;box-sizing:content-box;text-align:center;font-family:'Courier New', Courier, monospace;line-height:14px;content:'+';background-color:#31b131}table.dataTable.dtr-column>tbody>tr.parent td.control:before,table.dataTable.dtr-column>tbody>tr.parent th.control:before{content:'-';background-color:#d33333}table.dataTable>tbody>tr.child{padding:0.5em 1em}table.dataTable>tbody>tr.child:hover{background:transparent !important}table.dataTable>tbody>tr.child ul{display:inline-block;list-style-type:none;margin:0;padding:0}table.dataTable>tbody>tr.child ul li{border-bottom:1px solid #efefef;padding:0.5em 0}table.dataTable>tbody>tr.child ul li:first-child{padding-top:0}table.dataTable>tbody>tr.child ul li:last-child{border-bottom:none}table.dataTable>tbody>tr.child span.dtr-title{display:inline-block;min-width:75px;font-weight:bold}div.dtr-modal{position:fixed;box-sizing:border-box;top:0;left:0;height:100%;width:100%;z-index:100;padding:10em 1em}div.dtr-modal div.dtr-modal-display{position:absolute;top:0;left:0;bottom:0;right:0;width:50%;height:50%;overflow:auto;margin:auto;z-index:102;overflow:auto;background-color:#f5f5f7;border:1px solid black;border-radius:0.5em;box-shadow:0 12px 30px rgba(0,0,0,0.6)}div.dtr-modal div.dtr-modal-content{position:relative;padding:1em}div.dtr-modal div.dtr-modal-close{position:absolute;top:6px;right:6px;width:22px;height:22px;border:1px solid #eaeaea;background-color:#f9f9f9;text-align:center;border-radius:3px;cursor:pointer;z-index:12}div.dtr-modal div.dtr-modal-close:hover{background-color:#eaeaea}div.dtr-modal div.dtr-modal-background{position:fixed;top:0;left:0;right:0;bottom:0;z-index:101;background:rgba(0,0,0,0.6)}@media screen and (max-width: 767px){div.dtr-modal div.dtr-modal-display{width:95%}}
+
+
+div.DTS{display:block !important}div.DTS tbody th,div.DTS tbody td{white-space:nowrap}div.DTS div.DTS_Loading{z-index:1}div.DTS div.dataTables_scrollBody{background:repeating-linear-gradient(45deg, #edeeff, #edeeff 10px, #fff 10px, #fff 20px)}div.DTS div.dataTables_scrollBody table{z-index:2}div.DTS div.dataTables_paginate,div.DTS div.dataTables_length{display:none}
+
+
diff --git a/admin/survey/modules/mod_hierarhija/css/vendor/jstree/default-dark/32px.png b/admin/survey/modules/mod_hierarhija/css/vendor/jstree/default-dark/32px.png
new file mode 100644
index 0000000..d6fd721
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/css/vendor/jstree/default-dark/32px.png
Binary files differ
diff --git a/admin/survey/modules/mod_hierarhija/css/vendor/jstree/default-dark/40px.png b/admin/survey/modules/mod_hierarhija/css/vendor/jstree/default-dark/40px.png
new file mode 100644
index 0000000..4fc88e4
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/css/vendor/jstree/default-dark/40px.png
Binary files differ
diff --git a/admin/survey/modules/mod_hierarhija/css/vendor/jstree/default-dark/style.css b/admin/survey/modules/mod_hierarhija/css/vendor/jstree/default-dark/style.css
new file mode 100644
index 0000000..afae08c
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/css/vendor/jstree/default-dark/style.css
@@ -0,0 +1,1075 @@
+/* jsTree default dark theme */
+.jstree-node,
+.jstree-children,
+.jstree-container-ul {
+ display: block;
+ margin: 0;
+ padding: 0;
+ list-style-type: none;
+ list-style-image: none;
+}
+.jstree-node {
+ white-space: nowrap;
+}
+.jstree-anchor {
+ display: inline-block;
+ color: black;
+ white-space: nowrap;
+ padding: 0 4px 0 1px;
+ margin: 0;
+ vertical-align: top;
+}
+.jstree-anchor:focus {
+ outline: 0;
+}
+.jstree-anchor,
+.jstree-anchor:link,
+.jstree-anchor:visited,
+.jstree-anchor:hover,
+.jstree-anchor:active {
+ text-decoration: none;
+ color: inherit;
+}
+.jstree-icon {
+ display: inline-block;
+ text-decoration: none;
+ margin: 0;
+ padding: 0;
+ vertical-align: top;
+ text-align: center;
+}
+.jstree-icon:empty {
+ display: inline-block;
+ text-decoration: none;
+ margin: 0;
+ padding: 0;
+ vertical-align: top;
+ text-align: center;
+}
+.jstree-ocl {
+ cursor: pointer;
+}
+.jstree-leaf > .jstree-ocl {
+ cursor: default;
+}
+.jstree .jstree-open > .jstree-children {
+ display: block;
+}
+.jstree .jstree-closed > .jstree-children,
+.jstree .jstree-leaf > .jstree-children {
+ display: none;
+}
+.jstree-anchor > .jstree-themeicon {
+ margin-right: 2px;
+}
+.jstree-no-icons .jstree-themeicon,
+.jstree-anchor > .jstree-themeicon-hidden {
+ display: none;
+}
+.jstree-rtl .jstree-anchor {
+ padding: 0 1px 0 4px;
+}
+.jstree-rtl .jstree-anchor > .jstree-themeicon {
+ margin-left: 2px;
+ margin-right: 0;
+}
+.jstree-rtl .jstree-node {
+ margin-left: 0;
+}
+.jstree-rtl .jstree-container-ul > .jstree-node {
+ margin-right: 0;
+}
+.jstree-wholerow-ul {
+ position: relative;
+ display: inline-block;
+ min-width: 100%;
+}
+.jstree-wholerow-ul .jstree-leaf > .jstree-ocl {
+ cursor: pointer;
+}
+.jstree-wholerow-ul .jstree-anchor,
+.jstree-wholerow-ul .jstree-icon {
+ position: relative;
+}
+.jstree-wholerow-ul .jstree-wholerow {
+ width: 100%;
+ cursor: pointer;
+ position: absolute;
+ left: 0;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+.vakata-context {
+ display: none;
+}
+.vakata-context,
+.vakata-context ul {
+ margin: 0;
+ padding: 2px;
+ position: absolute;
+ background: #f5f5f5;
+ border: 1px solid #979797;
+ box-shadow: 2px 2px 2px #999999;
+}
+.vakata-context ul {
+ list-style: none;
+ left: 100%;
+ margin-top: -2.7em;
+ margin-left: -4px;
+}
+.vakata-context .vakata-context-right ul {
+ left: auto;
+ right: 100%;
+ margin-left: auto;
+ margin-right: -4px;
+}
+.vakata-context li {
+ list-style: none;
+ display: inline;
+}
+.vakata-context li > a {
+ display: block;
+ padding: 0 2em 0 2em;
+ text-decoration: none;
+ width: auto;
+ color: black;
+ white-space: nowrap;
+ line-height: 2.4em;
+ text-shadow: 1px 1px 0 white;
+ border-radius: 1px;
+}
+.vakata-context li > a:hover {
+ position: relative;
+ background-color: #e8eff7;
+ box-shadow: 0 0 2px #0a6aa1;
+}
+.vakata-context li > a.vakata-context-parent {
+ background-image: url("data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAIORI4JlrqN1oMSnmmZDQUAOw==");
+ background-position: right center;
+ background-repeat: no-repeat;
+}
+.vakata-context li > a:focus {
+ outline: 0;
+}
+.vakata-context .vakata-context-hover > a {
+ position: relative;
+ background-color: #e8eff7;
+ box-shadow: 0 0 2px #0a6aa1;
+}
+.vakata-context .vakata-context-separator > a,
+.vakata-context .vakata-context-separator > a:hover {
+ background: white;
+ border: 0;
+ border-top: 1px solid #e2e3e3;
+ height: 1px;
+ min-height: 1px;
+ max-height: 1px;
+ padding: 0;
+ margin: 0 0 0 2.4em;
+ border-left: 1px solid #e0e0e0;
+ text-shadow: 0 0 0 transparent;
+ box-shadow: 0 0 0 transparent;
+ border-radius: 0;
+}
+.vakata-context .vakata-contextmenu-disabled a,
+.vakata-context .vakata-contextmenu-disabled a:hover {
+ color: silver;
+ background-color: transparent;
+ border: 0;
+ box-shadow: 0 0 0;
+}
+.vakata-context li > a > i {
+ text-decoration: none;
+ display: inline-block;
+ width: 2.4em;
+ height: 2.4em;
+ background: transparent;
+ margin: 0 0 0 -2em;
+ vertical-align: top;
+ text-align: center;
+ line-height: 2.4em;
+}
+.vakata-context li > a > i:empty {
+ width: 2.4em;
+ line-height: 2.4em;
+}
+.vakata-context li > a .vakata-contextmenu-sep {
+ display: inline-block;
+ width: 1px;
+ height: 2.4em;
+ background: white;
+ margin: 0 0.5em 0 0;
+ border-left: 1px solid #e2e3e3;
+}
+.vakata-context .vakata-contextmenu-shortcut {
+ font-size: 0.8em;
+ color: silver;
+ opacity: 0.5;
+ display: none;
+}
+.vakata-context-rtl ul {
+ left: auto;
+ right: 100%;
+ margin-left: auto;
+ margin-right: -4px;
+}
+.vakata-context-rtl li > a.vakata-context-parent {
+ background-image: url("data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAINjI+AC7rWHIsPtmoxLAA7");
+ background-position: left center;
+ background-repeat: no-repeat;
+}
+.vakata-context-rtl .vakata-context-separator > a {
+ margin: 0 2.4em 0 0;
+ border-left: 0;
+ border-right: 1px solid #e2e3e3;
+}
+.vakata-context-rtl .vakata-context-left ul {
+ right: auto;
+ left: 100%;
+ margin-left: -4px;
+ margin-right: auto;
+}
+.vakata-context-rtl li > a > i {
+ margin: 0 -2em 0 0;
+}
+.vakata-context-rtl li > a .vakata-contextmenu-sep {
+ margin: 0 0 0 0.5em;
+ border-left-color: white;
+ background: #e2e3e3;
+}
+#jstree-marker {
+ position: absolute;
+ top: 0;
+ left: 0;
+ margin: -5px 0 0 0;
+ padding: 0;
+ border-right: 0;
+ border-top: 5px solid transparent;
+ border-bottom: 5px solid transparent;
+ border-left: 5px solid;
+ width: 0;
+ height: 0;
+ font-size: 0;
+ line-height: 0;
+}
+#jstree-dnd {
+ line-height: 16px;
+ margin: 0;
+ padding: 4px;
+}
+#jstree-dnd .jstree-icon,
+#jstree-dnd .jstree-copy {
+ display: inline-block;
+ text-decoration: none;
+ margin: 0 2px 0 0;
+ padding: 0;
+ width: 16px;
+ height: 16px;
+}
+#jstree-dnd .jstree-ok {
+ background: green;
+}
+#jstree-dnd .jstree-er {
+ background: red;
+}
+#jstree-dnd .jstree-copy {
+ margin: 0 2px 0 2px;
+}
+.jstree-default-dark .jstree-node,
+.jstree-default-dark .jstree-icon {
+ background-repeat: no-repeat;
+ background-color: transparent;
+}
+.jstree-default-dark .jstree-anchor,
+.jstree-default-dark .jstree-wholerow {
+ transition: background-color 0.15s, box-shadow 0.15s;
+}
+.jstree-default-dark .jstree-hovered {
+ background: #555555;
+ border-radius: 2px;
+ box-shadow: inset 0 0 1px #555555;
+}
+.jstree-default-dark .jstree-clicked {
+ background: #5fa2db;
+ border-radius: 2px;
+ box-shadow: inset 0 0 1px #666666;
+}
+.jstree-default-dark .jstree-no-icons .jstree-anchor > .jstree-themeicon {
+ display: none;
+}
+.jstree-default-dark .jstree-disabled {
+ background: transparent;
+ color: #666666;
+}
+.jstree-default-dark .jstree-disabled.jstree-hovered {
+ background: transparent;
+ box-shadow: none;
+}
+.jstree-default-dark .jstree-disabled.jstree-clicked {
+ background: #333333;
+}
+.jstree-default-dark .jstree-disabled > .jstree-icon {
+ opacity: 0.8;
+ filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale");
+ /* Firefox 10+ */
+ filter: gray;
+ /* IE6-9 */
+ -webkit-filter: grayscale(100%);
+ /* Chrome 19+ & Safari 6+ */
+}
+.jstree-default-dark .jstree-search {
+ font-style: italic;
+ color: #ffffff;
+ font-weight: bold;
+}
+.jstree-default-dark .jstree-no-checkboxes .jstree-checkbox {
+ display: none !important;
+}
+.jstree-default-dark.jstree-checkbox-no-clicked .jstree-clicked {
+ background: transparent;
+ box-shadow: none;
+}
+.jstree-default-dark.jstree-checkbox-no-clicked .jstree-clicked.jstree-hovered {
+ background: #555555;
+}
+.jstree-default-dark.jstree-checkbox-no-clicked > .jstree-wholerow-ul .jstree-wholerow-clicked {
+ background: transparent;
+}
+.jstree-default-dark.jstree-checkbox-no-clicked > .jstree-wholerow-ul .jstree-wholerow-clicked.jstree-wholerow-hovered {
+ background: #555555;
+}
+.jstree-default-dark > .jstree-striped {
+ min-width: 100%;
+ display: inline-block;
+ background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAkCAMAAAB/qqA+AAAABlBMVEUAAAAAAAClZ7nPAAAAAnRSTlMNAMM9s3UAAAAXSURBVHjajcEBAQAAAIKg/H/aCQZ70AUBjAATb6YPDgAAAABJRU5ErkJggg==") left top repeat;
+}
+.jstree-default-dark > .jstree-wholerow-ul .jstree-hovered,
+.jstree-default-dark > .jstree-wholerow-ul .jstree-clicked {
+ background: transparent;
+ box-shadow: none;
+ border-radius: 0;
+}
+.jstree-default-dark .jstree-wholerow {
+ -moz-box-sizing: border-box;
+ -webkit-box-sizing: border-box;
+ box-sizing: border-box;
+}
+.jstree-default-dark .jstree-wholerow-hovered {
+ background: #555555;
+}
+.jstree-default-dark .jstree-wholerow-clicked {
+ background: #5fa2db;
+ background: -webkit-linear-gradient(top, #5fa2db 0%, #5fa2db 100%);
+ background: linear-gradient(to bottom, #5fa2db 0%, #5fa2db 100%);
+}
+.jstree-default-dark .jstree-node {
+ min-height: 24px;
+ line-height: 24px;
+ margin-left: 24px;
+ min-width: 24px;
+}
+.jstree-default-dark .jstree-anchor {
+ line-height: 24px;
+ height: 24px;
+}
+.jstree-default-dark .jstree-icon {
+ width: 24px;
+ height: 24px;
+ line-height: 24px;
+}
+.jstree-default-dark .jstree-icon:empty {
+ width: 24px;
+ height: 24px;
+ line-height: 24px;
+}
+.jstree-default-dark.jstree-rtl .jstree-node {
+ margin-right: 24px;
+}
+.jstree-default-dark .jstree-wholerow {
+ height: 24px;
+}
+.jstree-default-dark .jstree-node,
+.jstree-default-dark .jstree-icon {
+ background-image: url("32px.png");
+}
+.jstree-default-dark .jstree-node {
+ background-position: -292px -4px;
+ background-repeat: repeat-y;
+}
+.jstree-default-dark .jstree-last {
+ background: transparent;
+}
+.jstree-default-dark .jstree-open > .jstree-ocl {
+ background-position: -132px -4px;
+}
+.jstree-default-dark .jstree-closed > .jstree-ocl {
+ background-position: -100px -4px;
+}
+.jstree-default-dark .jstree-leaf > .jstree-ocl {
+ background-position: -68px -4px;
+}
+.jstree-default-dark .jstree-themeicon {
+ background-position: -260px -4px;
+}
+.jstree-default-dark > .jstree-no-dots .jstree-node,
+.jstree-default-dark > .jstree-no-dots .jstree-leaf > .jstree-ocl {
+ background: transparent;
+}
+.jstree-default-dark > .jstree-no-dots .jstree-open > .jstree-ocl {
+ background-position: -36px -4px;
+}
+.jstree-default-dark > .jstree-no-dots .jstree-closed > .jstree-ocl {
+ background-position: -4px -4px;
+}
+.jstree-default-dark .jstree-disabled {
+ background: transparent;
+}
+.jstree-default-dark .jstree-disabled.jstree-hovered {
+ background: transparent;
+}
+.jstree-default-dark .jstree-disabled.jstree-clicked {
+ background: #efefef;
+}
+.jstree-default-dark .jstree-checkbox {
+ background-position: -164px -4px;
+}
+.jstree-default-dark .jstree-checkbox:hover {
+ background-position: -164px -36px;
+}
+.jstree-default-dark.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox,
+.jstree-default-dark .jstree-checked > .jstree-checkbox {
+ background-position: -228px -4px;
+}
+.jstree-default-dark.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox:hover,
+.jstree-default-dark .jstree-checked > .jstree-checkbox:hover {
+ background-position: -228px -36px;
+}
+.jstree-default-dark .jstree-anchor > .jstree-undetermined {
+ background-position: -196px -4px;
+}
+.jstree-default-dark .jstree-anchor > .jstree-undetermined:hover {
+ background-position: -196px -36px;
+}
+.jstree-default-dark > .jstree-striped {
+ background-size: auto 48px;
+}
+.jstree-default-dark.jstree-rtl .jstree-node {
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==");
+ background-position: 100% 1px;
+ background-repeat: repeat-y;
+}
+.jstree-default-dark.jstree-rtl .jstree-last {
+ background: transparent;
+}
+.jstree-default-dark.jstree-rtl .jstree-open > .jstree-ocl {
+ background-position: -132px -36px;
+}
+.jstree-default-dark.jstree-rtl .jstree-closed > .jstree-ocl {
+ background-position: -100px -36px;
+}
+.jstree-default-dark.jstree-rtl .jstree-leaf > .jstree-ocl {
+ background-position: -68px -36px;
+}
+.jstree-default-dark.jstree-rtl > .jstree-no-dots .jstree-node,
+.jstree-default-dark.jstree-rtl > .jstree-no-dots .jstree-leaf > .jstree-ocl {
+ background: transparent;
+}
+.jstree-default-dark.jstree-rtl > .jstree-no-dots .jstree-open > .jstree-ocl {
+ background-position: -36px -36px;
+}
+.jstree-default-dark.jstree-rtl > .jstree-no-dots .jstree-closed > .jstree-ocl {
+ background-position: -4px -36px;
+}
+.jstree-default-dark .jstree-themeicon-custom {
+ background-color: transparent;
+ background-image: none;
+ background-position: 0 0;
+}
+.jstree-default-dark > .jstree-container-ul .jstree-loading > .jstree-ocl {
+ background: url("throbber.gif") center center no-repeat;
+}
+.jstree-default-dark .jstree-file {
+ background: url("32px.png") -100px -68px no-repeat;
+}
+.jstree-default-dark .jstree-folder {
+ background: url("32px.png") -260px -4px no-repeat;
+}
+.jstree-default-dark > .jstree-container-ul > .jstree-node {
+ margin-left: 0;
+ margin-right: 0;
+}
+#jstree-dnd.jstree-default-dark {
+ line-height: 24px;
+ padding: 0 4px;
+}
+#jstree-dnd.jstree-default-dark .jstree-ok,
+#jstree-dnd.jstree-default-dark .jstree-er {
+ background-image: url("32px.png");
+ background-repeat: no-repeat;
+ background-color: transparent;
+}
+#jstree-dnd.jstree-default-dark i {
+ background: transparent;
+ width: 24px;
+ height: 24px;
+ line-height: 24px;
+}
+#jstree-dnd.jstree-default-dark .jstree-ok {
+ background-position: -4px -68px;
+}
+#jstree-dnd.jstree-default-dark .jstree-er {
+ background-position: -36px -68px;
+}
+.jstree-default-dark.jstree-rtl .jstree-node {
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==");
+}
+.jstree-default-dark.jstree-rtl .jstree-last {
+ background: transparent;
+}
+.jstree-default-dark-small .jstree-node {
+ min-height: 18px;
+ line-height: 18px;
+ margin-left: 18px;
+ min-width: 18px;
+}
+.jstree-default-dark-small .jstree-anchor {
+ line-height: 18px;
+ height: 18px;
+}
+.jstree-default-dark-small .jstree-icon {
+ width: 18px;
+ height: 18px;
+ line-height: 18px;
+}
+.jstree-default-dark-small .jstree-icon:empty {
+ width: 18px;
+ height: 18px;
+ line-height: 18px;
+}
+.jstree-default-dark-small.jstree-rtl .jstree-node {
+ margin-right: 18px;
+}
+.jstree-default-dark-small .jstree-wholerow {
+ height: 18px;
+}
+.jstree-default-dark-small .jstree-node,
+.jstree-default-dark-small .jstree-icon {
+ background-image: url("32px.png");
+}
+.jstree-default-dark-small .jstree-node {
+ background-position: -295px -7px;
+ background-repeat: repeat-y;
+}
+.jstree-default-dark-small .jstree-last {
+ background: transparent;
+}
+.jstree-default-dark-small .jstree-open > .jstree-ocl {
+ background-position: -135px -7px;
+}
+.jstree-default-dark-small .jstree-closed > .jstree-ocl {
+ background-position: -103px -7px;
+}
+.jstree-default-dark-small .jstree-leaf > .jstree-ocl {
+ background-position: -71px -7px;
+}
+.jstree-default-dark-small .jstree-themeicon {
+ background-position: -263px -7px;
+}
+.jstree-default-dark-small > .jstree-no-dots .jstree-node,
+.jstree-default-dark-small > .jstree-no-dots .jstree-leaf > .jstree-ocl {
+ background: transparent;
+}
+.jstree-default-dark-small > .jstree-no-dots .jstree-open > .jstree-ocl {
+ background-position: -39px -7px;
+}
+.jstree-default-dark-small > .jstree-no-dots .jstree-closed > .jstree-ocl {
+ background-position: -7px -7px;
+}
+.jstree-default-dark-small .jstree-disabled {
+ background: transparent;
+}
+.jstree-default-dark-small .jstree-disabled.jstree-hovered {
+ background: transparent;
+}
+.jstree-default-dark-small .jstree-disabled.jstree-clicked {
+ background: #efefef;
+}
+.jstree-default-dark-small .jstree-checkbox {
+ background-position: -167px -7px;
+}
+.jstree-default-dark-small .jstree-checkbox:hover {
+ background-position: -167px -39px;
+}
+.jstree-default-dark-small.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox,
+.jstree-default-dark-small .jstree-checked > .jstree-checkbox {
+ background-position: -231px -7px;
+}
+.jstree-default-dark-small.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox:hover,
+.jstree-default-dark-small .jstree-checked > .jstree-checkbox:hover {
+ background-position: -231px -39px;
+}
+.jstree-default-dark-small .jstree-anchor > .jstree-undetermined {
+ background-position: -199px -7px;
+}
+.jstree-default-dark-small .jstree-anchor > .jstree-undetermined:hover {
+ background-position: -199px -39px;
+}
+.jstree-default-dark-small > .jstree-striped {
+ background-size: auto 36px;
+}
+.jstree-default-dark-small.jstree-rtl .jstree-node {
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==");
+ background-position: 100% 1px;
+ background-repeat: repeat-y;
+}
+.jstree-default-dark-small.jstree-rtl .jstree-last {
+ background: transparent;
+}
+.jstree-default-dark-small.jstree-rtl .jstree-open > .jstree-ocl {
+ background-position: -135px -39px;
+}
+.jstree-default-dark-small.jstree-rtl .jstree-closed > .jstree-ocl {
+ background-position: -103px -39px;
+}
+.jstree-default-dark-small.jstree-rtl .jstree-leaf > .jstree-ocl {
+ background-position: -71px -39px;
+}
+.jstree-default-dark-small.jstree-rtl > .jstree-no-dots .jstree-node,
+.jstree-default-dark-small.jstree-rtl > .jstree-no-dots .jstree-leaf > .jstree-ocl {
+ background: transparent;
+}
+.jstree-default-dark-small.jstree-rtl > .jstree-no-dots .jstree-open > .jstree-ocl {
+ background-position: -39px -39px;
+}
+.jstree-default-dark-small.jstree-rtl > .jstree-no-dots .jstree-closed > .jstree-ocl {
+ background-position: -7px -39px;
+}
+.jstree-default-dark-small .jstree-themeicon-custom {
+ background-color: transparent;
+ background-image: none;
+ background-position: 0 0;
+}
+.jstree-default-dark-small > .jstree-container-ul .jstree-loading > .jstree-ocl {
+ background: url("throbber.gif") center center no-repeat;
+}
+.jstree-default-dark-small .jstree-file {
+ background: url("32px.png") -103px -71px no-repeat;
+}
+.jstree-default-dark-small .jstree-folder {
+ background: url("32px.png") -263px -7px no-repeat;
+}
+.jstree-default-dark-small > .jstree-container-ul > .jstree-node {
+ margin-left: 0;
+ margin-right: 0;
+}
+#jstree-dnd.jstree-default-dark-small {
+ line-height: 18px;
+ padding: 0 4px;
+}
+#jstree-dnd.jstree-default-dark-small .jstree-ok,
+#jstree-dnd.jstree-default-dark-small .jstree-er {
+ background-image: url("32px.png");
+ background-repeat: no-repeat;
+ background-color: transparent;
+}
+#jstree-dnd.jstree-default-dark-small i {
+ background: transparent;
+ width: 18px;
+ height: 18px;
+ line-height: 18px;
+}
+#jstree-dnd.jstree-default-dark-small .jstree-ok {
+ background-position: -7px -71px;
+}
+#jstree-dnd.jstree-default-dark-small .jstree-er {
+ background-position: -39px -71px;
+}
+.jstree-default-dark-small.jstree-rtl .jstree-node {
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAACAQMAAABv1h6PAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMHBgAAiABBI4gz9AAAAABJRU5ErkJggg==");
+}
+.jstree-default-dark-small.jstree-rtl .jstree-last {
+ background: transparent;
+}
+.jstree-default-dark-large .jstree-node {
+ min-height: 32px;
+ line-height: 32px;
+ margin-left: 32px;
+ min-width: 32px;
+}
+.jstree-default-dark-large .jstree-anchor {
+ line-height: 32px;
+ height: 32px;
+}
+.jstree-default-dark-large .jstree-icon {
+ width: 32px;
+ height: 32px;
+ line-height: 32px;
+}
+.jstree-default-dark-large .jstree-icon:empty {
+ width: 32px;
+ height: 32px;
+ line-height: 32px;
+}
+.jstree-default-dark-large.jstree-rtl .jstree-node {
+ margin-right: 32px;
+}
+.jstree-default-dark-large .jstree-wholerow {
+ height: 32px;
+}
+.jstree-default-dark-large .jstree-node,
+.jstree-default-dark-large .jstree-icon {
+ background-image: url("32px.png");
+}
+.jstree-default-dark-large .jstree-node {
+ background-position: -288px 0px;
+ background-repeat: repeat-y;
+}
+.jstree-default-dark-large .jstree-last {
+ background: transparent;
+}
+.jstree-default-dark-large .jstree-open > .jstree-ocl {
+ background-position: -128px 0px;
+}
+.jstree-default-dark-large .jstree-closed > .jstree-ocl {
+ background-position: -96px 0px;
+}
+.jstree-default-dark-large .jstree-leaf > .jstree-ocl {
+ background-position: -64px 0px;
+}
+.jstree-default-dark-large .jstree-themeicon {
+ background-position: -256px 0px;
+}
+.jstree-default-dark-large > .jstree-no-dots .jstree-node,
+.jstree-default-dark-large > .jstree-no-dots .jstree-leaf > .jstree-ocl {
+ background: transparent;
+}
+.jstree-default-dark-large > .jstree-no-dots .jstree-open > .jstree-ocl {
+ background-position: -32px 0px;
+}
+.jstree-default-dark-large > .jstree-no-dots .jstree-closed > .jstree-ocl {
+ background-position: 0px 0px;
+}
+.jstree-default-dark-large .jstree-disabled {
+ background: transparent;
+}
+.jstree-default-dark-large .jstree-disabled.jstree-hovered {
+ background: transparent;
+}
+.jstree-default-dark-large .jstree-disabled.jstree-clicked {
+ background: #efefef;
+}
+.jstree-default-dark-large .jstree-checkbox {
+ background-position: -160px 0px;
+}
+.jstree-default-dark-large .jstree-checkbox:hover {
+ background-position: -160px -32px;
+}
+.jstree-default-dark-large.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox,
+.jstree-default-dark-large .jstree-checked > .jstree-checkbox {
+ background-position: -224px 0px;
+}
+.jstree-default-dark-large.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox:hover,
+.jstree-default-dark-large .jstree-checked > .jstree-checkbox:hover {
+ background-position: -224px -32px;
+}
+.jstree-default-dark-large .jstree-anchor > .jstree-undetermined {
+ background-position: -192px 0px;
+}
+.jstree-default-dark-large .jstree-anchor > .jstree-undetermined:hover {
+ background-position: -192px -32px;
+}
+.jstree-default-dark-large > .jstree-striped {
+ background-size: auto 64px;
+}
+.jstree-default-dark-large.jstree-rtl .jstree-node {
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==");
+ background-position: 100% 1px;
+ background-repeat: repeat-y;
+}
+.jstree-default-dark-large.jstree-rtl .jstree-last {
+ background: transparent;
+}
+.jstree-default-dark-large.jstree-rtl .jstree-open > .jstree-ocl {
+ background-position: -128px -32px;
+}
+.jstree-default-dark-large.jstree-rtl .jstree-closed > .jstree-ocl {
+ background-position: -96px -32px;
+}
+.jstree-default-dark-large.jstree-rtl .jstree-leaf > .jstree-ocl {
+ background-position: -64px -32px;
+}
+.jstree-default-dark-large.jstree-rtl > .jstree-no-dots .jstree-node,
+.jstree-default-dark-large.jstree-rtl > .jstree-no-dots .jstree-leaf > .jstree-ocl {
+ background: transparent;
+}
+.jstree-default-dark-large.jstree-rtl > .jstree-no-dots .jstree-open > .jstree-ocl {
+ background-position: -32px -32px;
+}
+.jstree-default-dark-large.jstree-rtl > .jstree-no-dots .jstree-closed > .jstree-ocl {
+ background-position: 0px -32px;
+}
+.jstree-default-dark-large .jstree-themeicon-custom {
+ background-color: transparent;
+ background-image: none;
+ background-position: 0 0;
+}
+.jstree-default-dark-large > .jstree-container-ul .jstree-loading > .jstree-ocl {
+ background: url("throbber.gif") center center no-repeat;
+}
+.jstree-default-dark-large .jstree-file {
+ background: url("32px.png") -96px -64px no-repeat;
+}
+.jstree-default-dark-large .jstree-folder {
+ background: url("32px.png") -256px 0px no-repeat;
+}
+.jstree-default-dark-large > .jstree-container-ul > .jstree-node {
+ margin-left: 0;
+ margin-right: 0;
+}
+#jstree-dnd.jstree-default-dark-large {
+ line-height: 32px;
+ padding: 0 4px;
+}
+#jstree-dnd.jstree-default-dark-large .jstree-ok,
+#jstree-dnd.jstree-default-dark-large .jstree-er {
+ background-image: url("32px.png");
+ background-repeat: no-repeat;
+ background-color: transparent;
+}
+#jstree-dnd.jstree-default-dark-large i {
+ background: transparent;
+ width: 32px;
+ height: 32px;
+ line-height: 32px;
+}
+#jstree-dnd.jstree-default-dark-large .jstree-ok {
+ background-position: 0px -64px;
+}
+#jstree-dnd.jstree-default-dark-large .jstree-er {
+ background-position: -32px -64px;
+}
+.jstree-default-dark-large.jstree-rtl .jstree-node {
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAACAQMAAAAD0EyKAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjgIIGBgABCgCBvVLXcAAAAABJRU5ErkJggg==");
+}
+.jstree-default-dark-large.jstree-rtl .jstree-last {
+ background: transparent;
+}
+@media (max-width: 768px) {
+ #jstree-dnd.jstree-dnd-responsive {
+ line-height: 40px;
+ font-weight: bold;
+ font-size: 1.1em;
+ text-shadow: 1px 1px white;
+ }
+ #jstree-dnd.jstree-dnd-responsive > i {
+ background: transparent;
+ width: 40px;
+ height: 40px;
+ }
+ #jstree-dnd.jstree-dnd-responsive > .jstree-ok {
+ background-image: url("40px.png");
+ background-position: 0 -200px;
+ background-size: 120px 240px;
+ }
+ #jstree-dnd.jstree-dnd-responsive > .jstree-er {
+ background-image: url("40px.png");
+ background-position: -40px -200px;
+ background-size: 120px 240px;
+ }
+ #jstree-marker.jstree-dnd-responsive {
+ border-left-width: 10px;
+ border-top-width: 10px;
+ border-bottom-width: 10px;
+ margin-top: -10px;
+ }
+}
+@media (max-width: 768px) {
+ .jstree-default-dark-responsive {
+ /*
+ .jstree-open > .jstree-ocl,
+ .jstree-closed > .jstree-ocl { border-radius:20px; background-color:white; }
+ */
+ }
+ .jstree-default-dark-responsive .jstree-icon {
+ background-image: url("40px.png");
+ }
+ .jstree-default-dark-responsive .jstree-node,
+ .jstree-default-dark-responsive .jstree-leaf > .jstree-ocl {
+ background: transparent;
+ }
+ .jstree-default-dark-responsive .jstree-node {
+ min-height: 40px;
+ line-height: 40px;
+ margin-left: 40px;
+ min-width: 40px;
+ white-space: nowrap;
+ }
+ .jstree-default-dark-responsive .jstree-anchor {
+ line-height: 40px;
+ height: 40px;
+ }
+ .jstree-default-dark-responsive .jstree-icon,
+ .jstree-default-dark-responsive .jstree-icon:empty {
+ width: 40px;
+ height: 40px;
+ line-height: 40px;
+ }
+ .jstree-default-dark-responsive > .jstree-container-ul > .jstree-node {
+ margin-left: 0;
+ }
+ .jstree-default-dark-responsive.jstree-rtl .jstree-node {
+ margin-left: 0;
+ margin-right: 40px;
+ }
+ .jstree-default-dark-responsive.jstree-rtl .jstree-container-ul > .jstree-node {
+ margin-right: 0;
+ }
+ .jstree-default-dark-responsive .jstree-ocl,
+ .jstree-default-dark-responsive .jstree-themeicon,
+ .jstree-default-dark-responsive .jstree-checkbox {
+ background-size: 120px 240px;
+ }
+ .jstree-default-dark-responsive .jstree-leaf > .jstree-ocl {
+ background: transparent;
+ }
+ .jstree-default-dark-responsive .jstree-open > .jstree-ocl {
+ background-position: 0 0px !important;
+ }
+ .jstree-default-dark-responsive .jstree-closed > .jstree-ocl {
+ background-position: 0 -40px !important;
+ }
+ .jstree-default-dark-responsive.jstree-rtl .jstree-closed > .jstree-ocl {
+ background-position: -40px 0px !important;
+ }
+ .jstree-default-dark-responsive .jstree-themeicon {
+ background-position: -40px -40px;
+ }
+ .jstree-default-dark-responsive .jstree-checkbox,
+ .jstree-default-dark-responsive .jstree-checkbox:hover {
+ background-position: -40px -80px;
+ }
+ .jstree-default-dark-responsive.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox,
+ .jstree-default-dark-responsive.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox:hover,
+ .jstree-default-dark-responsive .jstree-checked > .jstree-checkbox,
+ .jstree-default-dark-responsive .jstree-checked > .jstree-checkbox:hover {
+ background-position: 0 -80px;
+ }
+ .jstree-default-dark-responsive .jstree-anchor > .jstree-undetermined,
+ .jstree-default-dark-responsive .jstree-anchor > .jstree-undetermined:hover {
+ background-position: 0 -120px;
+ }
+ .jstree-default-dark-responsive .jstree-anchor {
+ font-weight: bold;
+ font-size: 1.1em;
+ text-shadow: 1px 1px white;
+ }
+ .jstree-default-dark-responsive > .jstree-striped {
+ background: transparent;
+ }
+ .jstree-default-dark-responsive .jstree-wholerow {
+ border-top: 1px solid #666666;
+ border-bottom: 1px solid #000000;
+ background: #333333;
+ height: 40px;
+ }
+ .jstree-default-dark-responsive .jstree-wholerow-hovered {
+ background: #555555;
+ }
+ .jstree-default-dark-responsive .jstree-wholerow-clicked {
+ background: #5fa2db;
+ }
+ .jstree-default-dark-responsive .jstree-children .jstree-last > .jstree-wholerow {
+ box-shadow: inset 0 -6px 3px -5px #111111;
+ }
+ .jstree-default-dark-responsive .jstree-children .jstree-open > .jstree-wholerow {
+ box-shadow: inset 0 6px 3px -5px #111111;
+ border-top: 0;
+ }
+ .jstree-default-dark-responsive .jstree-children .jstree-open + .jstree-open {
+ box-shadow: none;
+ }
+ .jstree-default-dark-responsive .jstree-node,
+ .jstree-default-dark-responsive .jstree-icon,
+ .jstree-default-dark-responsive .jstree-node > .jstree-ocl,
+ .jstree-default-dark-responsive .jstree-themeicon,
+ .jstree-default-dark-responsive .jstree-checkbox {
+ background-image: url("40px.png");
+ background-size: 120px 240px;
+ }
+ .jstree-default-dark-responsive .jstree-node {
+ background-position: -80px 0;
+ background-repeat: repeat-y;
+ }
+ .jstree-default-dark-responsive .jstree-last {
+ background: transparent;
+ }
+ .jstree-default-dark-responsive .jstree-leaf > .jstree-ocl {
+ background-position: -40px -120px;
+ }
+ .jstree-default-dark-responsive .jstree-last > .jstree-ocl {
+ background-position: -40px -160px;
+ }
+ .jstree-default-dark-responsive .jstree-themeicon-custom {
+ background-color: transparent;
+ background-image: none;
+ background-position: 0 0;
+ }
+ .jstree-default-dark-responsive .jstree-file {
+ background: url("40px.png") 0 -160px no-repeat;
+ background-size: 120px 240px;
+ }
+ .jstree-default-dark-responsive .jstree-folder {
+ background: url("40px.png") -40px -40px no-repeat;
+ background-size: 120px 240px;
+ }
+ .jstree-default-dark-responsive > .jstree-container-ul > .jstree-node {
+ margin-left: 0;
+ margin-right: 0;
+ }
+}
+.jstree-default-dark {
+ background: #333;
+}
+.jstree-default-dark .jstree-anchor {
+ color: #999;
+ text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
+}
+.jstree-default-dark .jstree-clicked,
+.jstree-default-dark .jstree-checked {
+ color: white;
+}
+.jstree-default-dark .jstree-hovered {
+ color: white;
+}
+#jstree-marker.jstree-default-dark {
+ border-left-color: #999;
+ background: transparent;
+}
+.jstree-default-dark .jstree-anchor > .jstree-icon {
+ opacity: 0.75;
+}
+.jstree-default-dark .jstree-clicked > .jstree-icon,
+.jstree-default-dark .jstree-hovered > .jstree-icon,
+.jstree-default-dark .jstree-checked > .jstree-icon {
+ opacity: 1;
+}
+.jstree-default-dark.jstree-rtl .jstree-node {
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAACZmZl+9SADAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==");
+}
+.jstree-default-dark.jstree-rtl .jstree-last {
+ background: transparent;
+}
+.jstree-default-dark-small.jstree-rtl .jstree-node {
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAACAQMAAABv1h6PAAAABlBMVEUAAACZmZl+9SADAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMHBgAAiABBI4gz9AAAAABJRU5ErkJggg==");
+}
+.jstree-default-dark-small.jstree-rtl .jstree-last {
+ background: transparent;
+}
+.jstree-default-dark-large.jstree-rtl .jstree-node {
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAACAQMAAAAD0EyKAAAABlBMVEUAAACZmZl+9SADAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjgIIGBgABCgCBvVLXcAAAAABJRU5ErkJggg==");
+}
+.jstree-default-dark-large.jstree-rtl .jstree-last {
+ background: transparent;
+}
diff --git a/admin/survey/modules/mod_hierarhija/css/vendor/jstree/default-dark/style.min.css b/admin/survey/modules/mod_hierarhija/css/vendor/jstree/default-dark/style.min.css
new file mode 100644
index 0000000..d123edd
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/css/vendor/jstree/default-dark/style.min.css
@@ -0,0 +1 @@
+.jstree-node,.jstree-children,.jstree-container-ul{display:block;margin:0;padding:0;list-style-type:none;list-style-image:none}.jstree-node{white-space:nowrap}.jstree-anchor{display:inline-block;color:#000;white-space:nowrap;padding:0 4px 0 1px;margin:0;vertical-align:top}.jstree-anchor:focus{outline:0}.jstree-anchor,.jstree-anchor:link,.jstree-anchor:visited,.jstree-anchor:hover,.jstree-anchor:active{text-decoration:none;color:inherit}.jstree-icon{display:inline-block;text-decoration:none;margin:0;padding:0;vertical-align:top;text-align:center}.jstree-icon:empty{display:inline-block;text-decoration:none;margin:0;padding:0;vertical-align:top;text-align:center}.jstree-ocl{cursor:pointer}.jstree-leaf>.jstree-ocl{cursor:default}.jstree .jstree-open>.jstree-children{display:block}.jstree .jstree-closed>.jstree-children,.jstree .jstree-leaf>.jstree-children{display:none}.jstree-anchor>.jstree-themeicon{margin-right:2px}.jstree-no-icons .jstree-themeicon,.jstree-anchor>.jstree-themeicon-hidden{display:none}.jstree-rtl .jstree-anchor{padding:0 1px 0 4px}.jstree-rtl .jstree-anchor>.jstree-themeicon{margin-left:2px;margin-right:0}.jstree-rtl .jstree-node{margin-left:0}.jstree-rtl .jstree-container-ul>.jstree-node{margin-right:0}.jstree-wholerow-ul{position:relative;display:inline-block;min-width:100%}.jstree-wholerow-ul .jstree-leaf>.jstree-ocl{cursor:pointer}.jstree-wholerow-ul .jstree-anchor,.jstree-wholerow-ul .jstree-icon{position:relative}.jstree-wholerow-ul .jstree-wholerow{width:100%;cursor:pointer;position:absolute;left:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vakata-context{display:none}.vakata-context,.vakata-context ul{margin:0;padding:2px;position:absolute;background:#f5f5f5;border:1px solid #979797;box-shadow:2px 2px 2px #999}.vakata-context ul{list-style:none;left:100%;margin-top:-2.7em;margin-left:-4px}.vakata-context .vakata-context-right ul{left:auto;right:100%;margin-left:auto;margin-right:-4px}.vakata-context li{list-style:none;display:inline}.vakata-context li>a{display:block;padding:0 2em;text-decoration:none;width:auto;color:#000;white-space:nowrap;line-height:2.4em;text-shadow:1px 1px 0 #fff;border-radius:1px}.vakata-context li>a:hover{position:relative;background-color:#e8eff7;box-shadow:0 0 2px #0a6aa1}.vakata-context li>a.vakata-context-parent{background-image:url(data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAIORI4JlrqN1oMSnmmZDQUAOw==);background-position:right center;background-repeat:no-repeat}.vakata-context li>a:focus{outline:0}.vakata-context .vakata-context-hover>a{position:relative;background-color:#e8eff7;box-shadow:0 0 2px #0a6aa1}.vakata-context .vakata-context-separator>a,.vakata-context .vakata-context-separator>a:hover{background:#fff;border:0;border-top:1px solid #e2e3e3;height:1px;min-height:1px;max-height:1px;padding:0;margin:0 0 0 2.4em;border-left:1px solid #e0e0e0;text-shadow:0 0 0 transparent;box-shadow:0 0 0 transparent;border-radius:0}.vakata-context .vakata-contextmenu-disabled a,.vakata-context .vakata-contextmenu-disabled a:hover{color:silver;background-color:transparent;border:0;box-shadow:0 0 0}.vakata-context li>a>i{text-decoration:none;display:inline-block;width:2.4em;height:2.4em;background:0 0;margin:0 0 0 -2em;vertical-align:top;text-align:center;line-height:2.4em}.vakata-context li>a>i:empty{width:2.4em;line-height:2.4em}.vakata-context li>a .vakata-contextmenu-sep{display:inline-block;width:1px;height:2.4em;background:#fff;margin:0 .5em 0 0;border-left:1px solid #e2e3e3}.vakata-context .vakata-contextmenu-shortcut{font-size:.8em;color:silver;opacity:.5;display:none}.vakata-context-rtl ul{left:auto;right:100%;margin-left:auto;margin-right:-4px}.vakata-context-rtl li>a.vakata-context-parent{background-image:url(data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAINjI+AC7rWHIsPtmoxLAA7);background-position:left center;background-repeat:no-repeat}.vakata-context-rtl .vakata-context-separator>a{margin:0 2.4em 0 0;border-left:0;border-right:1px solid #e2e3e3}.vakata-context-rtl .vakata-context-left ul{right:auto;left:100%;margin-left:-4px;margin-right:auto}.vakata-context-rtl li>a>i{margin:0 -2em 0 0}.vakata-context-rtl li>a .vakata-contextmenu-sep{margin:0 0 0 .5em;border-left-color:#fff;background:#e2e3e3}#jstree-marker{position:absolute;top:0;left:0;margin:-5px 0 0 0;padding:0;border-right:0;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid;width:0;height:0;font-size:0;line-height:0}#jstree-dnd{line-height:16px;margin:0;padding:4px}#jstree-dnd .jstree-icon,#jstree-dnd .jstree-copy{display:inline-block;text-decoration:none;margin:0 2px 0 0;padding:0;width:16px;height:16px}#jstree-dnd .jstree-ok{background:green}#jstree-dnd .jstree-er{background:red}#jstree-dnd .jstree-copy{margin:0 2px}.jstree-default-dark .jstree-node,.jstree-default-dark .jstree-icon{background-repeat:no-repeat;background-color:transparent}.jstree-default-dark .jstree-anchor,.jstree-default-dark .jstree-wholerow{transition:background-color .15s,box-shadow .15s}.jstree-default-dark .jstree-hovered{background:#555;border-radius:2px;box-shadow:inset 0 0 1px #555}.jstree-default-dark .jstree-clicked{background:#5fa2db;border-radius:2px;box-shadow:inset 0 0 1px #666}.jstree-default-dark .jstree-no-icons .jstree-anchor>.jstree-themeicon{display:none}.jstree-default-dark .jstree-disabled{background:0 0;color:#666}.jstree-default-dark .jstree-disabled.jstree-hovered{background:0 0;box-shadow:none}.jstree-default-dark .jstree-disabled.jstree-clicked{background:#333}.jstree-default-dark .jstree-disabled>.jstree-icon{opacity:.8;filter:url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale");filter:gray;-webkit-filter:grayscale(100%)}.jstree-default-dark .jstree-search{font-style:italic;color:#fff;font-weight:700}.jstree-default-dark .jstree-no-checkboxes .jstree-checkbox{display:none!important}.jstree-default-dark.jstree-checkbox-no-clicked .jstree-clicked{background:0 0;box-shadow:none}.jstree-default-dark.jstree-checkbox-no-clicked .jstree-clicked.jstree-hovered{background:#555}.jstree-default-dark.jstree-checkbox-no-clicked>.jstree-wholerow-ul .jstree-wholerow-clicked{background:0 0}.jstree-default-dark.jstree-checkbox-no-clicked>.jstree-wholerow-ul .jstree-wholerow-clicked.jstree-wholerow-hovered{background:#555}.jstree-default-dark>.jstree-striped{min-width:100%;display:inline-block;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAkCAMAAAB/qqA+AAAABlBMVEUAAAAAAAClZ7nPAAAAAnRSTlMNAMM9s3UAAAAXSURBVHjajcEBAQAAAIKg/H/aCQZ70AUBjAATb6YPDgAAAABJRU5ErkJggg==) left top repeat}.jstree-default-dark>.jstree-wholerow-ul .jstree-hovered,.jstree-default-dark>.jstree-wholerow-ul .jstree-clicked{background:0 0;box-shadow:none;border-radius:0}.jstree-default-dark .jstree-wholerow{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.jstree-default-dark .jstree-wholerow-hovered{background:#555}.jstree-default-dark .jstree-wholerow-clicked{background:#5fa2db;background:-webkit-linear-gradient(top,#5fa2db 0,#5fa2db 100%);background:linear-gradient(to bottom,#5fa2db 0,#5fa2db 100%)}.jstree-default-dark .jstree-node{min-height:24px;line-height:24px;margin-left:24px;min-width:24px}.jstree-default-dark .jstree-anchor{line-height:24px;height:24px}.jstree-default-dark .jstree-icon{width:24px;height:24px;line-height:24px}.jstree-default-dark .jstree-icon:empty{width:24px;height:24px;line-height:24px}.jstree-default-dark.jstree-rtl .jstree-node{margin-right:24px}.jstree-default-dark .jstree-wholerow{height:24px}.jstree-default-dark .jstree-node,.jstree-default-dark .jstree-icon{background-image:url(32px.png)}.jstree-default-dark .jstree-node{background-position:-292px -4px;background-repeat:repeat-y}.jstree-default-dark .jstree-last{background:0 0}.jstree-default-dark .jstree-open>.jstree-ocl{background-position:-132px -4px}.jstree-default-dark .jstree-closed>.jstree-ocl{background-position:-100px -4px}.jstree-default-dark .jstree-leaf>.jstree-ocl{background-position:-68px -4px}.jstree-default-dark .jstree-themeicon{background-position:-260px -4px}.jstree-default-dark>.jstree-no-dots .jstree-node,.jstree-default-dark>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-dark>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-36px -4px}.jstree-default-dark>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-4px -4px}.jstree-default-dark .jstree-disabled{background:0 0}.jstree-default-dark .jstree-disabled.jstree-hovered{background:0 0}.jstree-default-dark .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default-dark .jstree-checkbox{background-position:-164px -4px}.jstree-default-dark .jstree-checkbox:hover{background-position:-164px -36px}.jstree-default-dark.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-default-dark .jstree-checked>.jstree-checkbox{background-position:-228px -4px}.jstree-default-dark.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-default-dark .jstree-checked>.jstree-checkbox:hover{background-position:-228px -36px}.jstree-default-dark .jstree-anchor>.jstree-undetermined{background-position:-196px -4px}.jstree-default-dark .jstree-anchor>.jstree-undetermined:hover{background-position:-196px -36px}.jstree-default-dark>.jstree-striped{background-size:auto 48px}.jstree-default-dark.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);background-position:100% 1px;background-repeat:repeat-y}.jstree-default-dark.jstree-rtl .jstree-last{background:0 0}.jstree-default-dark.jstree-rtl .jstree-open>.jstree-ocl{background-position:-132px -36px}.jstree-default-dark.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-100px -36px}.jstree-default-dark.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-68px -36px}.jstree-default-dark.jstree-rtl>.jstree-no-dots .jstree-node,.jstree-default-dark.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-dark.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-36px -36px}.jstree-default-dark.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-4px -36px}.jstree-default-dark .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-default-dark>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url(throbber.gif) center center no-repeat}.jstree-default-dark .jstree-file{background:url(32px.png) -100px -68px no-repeat}.jstree-default-dark .jstree-folder{background:url(32px.png) -260px -4px no-repeat}.jstree-default-dark>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}#jstree-dnd.jstree-default-dark{line-height:24px;padding:0 4px}#jstree-dnd.jstree-default-dark .jstree-ok,#jstree-dnd.jstree-default-dark .jstree-er{background-image:url(32px.png);background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-default-dark i{background:0 0;width:24px;height:24px;line-height:24px}#jstree-dnd.jstree-default-dark .jstree-ok{background-position:-4px -68px}#jstree-dnd.jstree-default-dark .jstree-er{background-position:-36px -68px}.jstree-default-dark.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==)}.jstree-default-dark.jstree-rtl .jstree-last{background:0 0}.jstree-default-dark-small .jstree-node{min-height:18px;line-height:18px;margin-left:18px;min-width:18px}.jstree-default-dark-small .jstree-anchor{line-height:18px;height:18px}.jstree-default-dark-small .jstree-icon{width:18px;height:18px;line-height:18px}.jstree-default-dark-small .jstree-icon:empty{width:18px;height:18px;line-height:18px}.jstree-default-dark-small.jstree-rtl .jstree-node{margin-right:18px}.jstree-default-dark-small .jstree-wholerow{height:18px}.jstree-default-dark-small .jstree-node,.jstree-default-dark-small .jstree-icon{background-image:url(32px.png)}.jstree-default-dark-small .jstree-node{background-position:-295px -7px;background-repeat:repeat-y}.jstree-default-dark-small .jstree-last{background:0 0}.jstree-default-dark-small .jstree-open>.jstree-ocl{background-position:-135px -7px}.jstree-default-dark-small .jstree-closed>.jstree-ocl{background-position:-103px -7px}.jstree-default-dark-small .jstree-leaf>.jstree-ocl{background-position:-71px -7px}.jstree-default-dark-small .jstree-themeicon{background-position:-263px -7px}.jstree-default-dark-small>.jstree-no-dots .jstree-node,.jstree-default-dark-small>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-dark-small>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-39px -7px}.jstree-default-dark-small>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-7px -7px}.jstree-default-dark-small .jstree-disabled{background:0 0}.jstree-default-dark-small .jstree-disabled.jstree-hovered{background:0 0}.jstree-default-dark-small .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default-dark-small .jstree-checkbox{background-position:-167px -7px}.jstree-default-dark-small .jstree-checkbox:hover{background-position:-167px -39px}.jstree-default-dark-small.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-default-dark-small .jstree-checked>.jstree-checkbox{background-position:-231px -7px}.jstree-default-dark-small.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-default-dark-small .jstree-checked>.jstree-checkbox:hover{background-position:-231px -39px}.jstree-default-dark-small .jstree-anchor>.jstree-undetermined{background-position:-199px -7px}.jstree-default-dark-small .jstree-anchor>.jstree-undetermined:hover{background-position:-199px -39px}.jstree-default-dark-small>.jstree-striped{background-size:auto 36px}.jstree-default-dark-small.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);background-position:100% 1px;background-repeat:repeat-y}.jstree-default-dark-small.jstree-rtl .jstree-last{background:0 0}.jstree-default-dark-small.jstree-rtl .jstree-open>.jstree-ocl{background-position:-135px -39px}.jstree-default-dark-small.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-103px -39px}.jstree-default-dark-small.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-71px -39px}.jstree-default-dark-small.jstree-rtl>.jstree-no-dots .jstree-node,.jstree-default-dark-small.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-dark-small.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-39px -39px}.jstree-default-dark-small.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-7px -39px}.jstree-default-dark-small .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-default-dark-small>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url(throbber.gif) center center no-repeat}.jstree-default-dark-small .jstree-file{background:url(32px.png) -103px -71px no-repeat}.jstree-default-dark-small .jstree-folder{background:url(32px.png) -263px -7px no-repeat}.jstree-default-dark-small>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}#jstree-dnd.jstree-default-dark-small{line-height:18px;padding:0 4px}#jstree-dnd.jstree-default-dark-small .jstree-ok,#jstree-dnd.jstree-default-dark-small .jstree-er{background-image:url(32px.png);background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-default-dark-small i{background:0 0;width:18px;height:18px;line-height:18px}#jstree-dnd.jstree-default-dark-small .jstree-ok{background-position:-7px -71px}#jstree-dnd.jstree-default-dark-small .jstree-er{background-position:-39px -71px}.jstree-default-dark-small.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAACAQMAAABv1h6PAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMHBgAAiABBI4gz9AAAAABJRU5ErkJggg==)}.jstree-default-dark-small.jstree-rtl .jstree-last{background:0 0}.jstree-default-dark-large .jstree-node{min-height:32px;line-height:32px;margin-left:32px;min-width:32px}.jstree-default-dark-large .jstree-anchor{line-height:32px;height:32px}.jstree-default-dark-large .jstree-icon{width:32px;height:32px;line-height:32px}.jstree-default-dark-large .jstree-icon:empty{width:32px;height:32px;line-height:32px}.jstree-default-dark-large.jstree-rtl .jstree-node{margin-right:32px}.jstree-default-dark-large .jstree-wholerow{height:32px}.jstree-default-dark-large .jstree-node,.jstree-default-dark-large .jstree-icon{background-image:url(32px.png)}.jstree-default-dark-large .jstree-node{background-position:-288px 0;background-repeat:repeat-y}.jstree-default-dark-large .jstree-last{background:0 0}.jstree-default-dark-large .jstree-open>.jstree-ocl{background-position:-128px 0}.jstree-default-dark-large .jstree-closed>.jstree-ocl{background-position:-96px 0}.jstree-default-dark-large .jstree-leaf>.jstree-ocl{background-position:-64px 0}.jstree-default-dark-large .jstree-themeicon{background-position:-256px 0}.jstree-default-dark-large>.jstree-no-dots .jstree-node,.jstree-default-dark-large>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-dark-large>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-32px 0}.jstree-default-dark-large>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:0 0}.jstree-default-dark-large .jstree-disabled{background:0 0}.jstree-default-dark-large .jstree-disabled.jstree-hovered{background:0 0}.jstree-default-dark-large .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default-dark-large .jstree-checkbox{background-position:-160px 0}.jstree-default-dark-large .jstree-checkbox:hover{background-position:-160px -32px}.jstree-default-dark-large.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-default-dark-large .jstree-checked>.jstree-checkbox{background-position:-224px 0}.jstree-default-dark-large.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-default-dark-large .jstree-checked>.jstree-checkbox:hover{background-position:-224px -32px}.jstree-default-dark-large .jstree-anchor>.jstree-undetermined{background-position:-192px 0}.jstree-default-dark-large .jstree-anchor>.jstree-undetermined:hover{background-position:-192px -32px}.jstree-default-dark-large>.jstree-striped{background-size:auto 64px}.jstree-default-dark-large.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);background-position:100% 1px;background-repeat:repeat-y}.jstree-default-dark-large.jstree-rtl .jstree-last{background:0 0}.jstree-default-dark-large.jstree-rtl .jstree-open>.jstree-ocl{background-position:-128px -32px}.jstree-default-dark-large.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-96px -32px}.jstree-default-dark-large.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-64px -32px}.jstree-default-dark-large.jstree-rtl>.jstree-no-dots .jstree-node,.jstree-default-dark-large.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-dark-large.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-32px -32px}.jstree-default-dark-large.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:0 -32px}.jstree-default-dark-large .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-default-dark-large>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url(throbber.gif) center center no-repeat}.jstree-default-dark-large .jstree-file{background:url(32px.png) -96px -64px no-repeat}.jstree-default-dark-large .jstree-folder{background:url(32px.png) -256px 0 no-repeat}.jstree-default-dark-large>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}#jstree-dnd.jstree-default-dark-large{line-height:32px;padding:0 4px}#jstree-dnd.jstree-default-dark-large .jstree-ok,#jstree-dnd.jstree-default-dark-large .jstree-er{background-image:url(32px.png);background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-default-dark-large i{background:0 0;width:32px;height:32px;line-height:32px}#jstree-dnd.jstree-default-dark-large .jstree-ok{background-position:0 -64px}#jstree-dnd.jstree-default-dark-large .jstree-er{background-position:-32px -64px}.jstree-default-dark-large.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAACAQMAAAAD0EyKAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjgIIGBgABCgCBvVLXcAAAAABJRU5ErkJggg==)}.jstree-default-dark-large.jstree-rtl .jstree-last{background:0 0}@media (max-width:768px){#jstree-dnd.jstree-dnd-responsive{line-height:40px;font-weight:700;font-size:1.1em;text-shadow:1px 1px #fff}#jstree-dnd.jstree-dnd-responsive>i{background:0 0;width:40px;height:40px}#jstree-dnd.jstree-dnd-responsive>.jstree-ok{background-image:url(40px.png);background-position:0 -200px;background-size:120px 240px}#jstree-dnd.jstree-dnd-responsive>.jstree-er{background-image:url(40px.png);background-position:-40px -200px;background-size:120px 240px}#jstree-marker.jstree-dnd-responsive{border-left-width:10px;border-top-width:10px;border-bottom-width:10px;margin-top:-10px}}@media (max-width:768px){.jstree-default-dark-responsive .jstree-icon{background-image:url(40px.png)}.jstree-default-dark-responsive .jstree-node,.jstree-default-dark-responsive .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-dark-responsive .jstree-node{min-height:40px;line-height:40px;margin-left:40px;min-width:40px;white-space:nowrap}.jstree-default-dark-responsive .jstree-anchor{line-height:40px;height:40px}.jstree-default-dark-responsive .jstree-icon,.jstree-default-dark-responsive .jstree-icon:empty{width:40px;height:40px;line-height:40px}.jstree-default-dark-responsive>.jstree-container-ul>.jstree-node{margin-left:0}.jstree-default-dark-responsive.jstree-rtl .jstree-node{margin-left:0;margin-right:40px}.jstree-default-dark-responsive.jstree-rtl .jstree-container-ul>.jstree-node{margin-right:0}.jstree-default-dark-responsive .jstree-ocl,.jstree-default-dark-responsive .jstree-themeicon,.jstree-default-dark-responsive .jstree-checkbox{background-size:120px 240px}.jstree-default-dark-responsive .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-dark-responsive .jstree-open>.jstree-ocl{background-position:0 0!important}.jstree-default-dark-responsive .jstree-closed>.jstree-ocl{background-position:0 -40px!important}.jstree-default-dark-responsive.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-40px 0!important}.jstree-default-dark-responsive .jstree-themeicon{background-position:-40px -40px}.jstree-default-dark-responsive .jstree-checkbox,.jstree-default-dark-responsive .jstree-checkbox:hover{background-position:-40px -80px}.jstree-default-dark-responsive.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-default-dark-responsive.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-default-dark-responsive .jstree-checked>.jstree-checkbox,.jstree-default-dark-responsive .jstree-checked>.jstree-checkbox:hover{background-position:0 -80px}.jstree-default-dark-responsive .jstree-anchor>.jstree-undetermined,.jstree-default-dark-responsive .jstree-anchor>.jstree-undetermined:hover{background-position:0 -120px}.jstree-default-dark-responsive .jstree-anchor{font-weight:700;font-size:1.1em;text-shadow:1px 1px #fff}.jstree-default-dark-responsive>.jstree-striped{background:0 0}.jstree-default-dark-responsive .jstree-wholerow{border-top:1px solid #666;border-bottom:1px solid #000;background:#333;height:40px}.jstree-default-dark-responsive .jstree-wholerow-hovered{background:#555}.jstree-default-dark-responsive .jstree-wholerow-clicked{background:#5fa2db}.jstree-default-dark-responsive .jstree-children .jstree-last>.jstree-wholerow{box-shadow:inset 0 -6px 3px -5px #111}.jstree-default-dark-responsive .jstree-children .jstree-open>.jstree-wholerow{box-shadow:inset 0 6px 3px -5px #111;border-top:0}.jstree-default-dark-responsive .jstree-children .jstree-open+.jstree-open{box-shadow:none}.jstree-default-dark-responsive .jstree-node,.jstree-default-dark-responsive .jstree-icon,.jstree-default-dark-responsive .jstree-node>.jstree-ocl,.jstree-default-dark-responsive .jstree-themeicon,.jstree-default-dark-responsive .jstree-checkbox{background-image:url(40px.png);background-size:120px 240px}.jstree-default-dark-responsive .jstree-node{background-position:-80px 0;background-repeat:repeat-y}.jstree-default-dark-responsive .jstree-last{background:0 0}.jstree-default-dark-responsive .jstree-leaf>.jstree-ocl{background-position:-40px -120px}.jstree-default-dark-responsive .jstree-last>.jstree-ocl{background-position:-40px -160px}.jstree-default-dark-responsive .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-default-dark-responsive .jstree-file{background:url(40px.png) 0 -160px no-repeat;background-size:120px 240px}.jstree-default-dark-responsive .jstree-folder{background:url(40px.png) -40px -40px no-repeat;background-size:120px 240px}.jstree-default-dark-responsive>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}}.jstree-default-dark{background:#333}.jstree-default-dark .jstree-anchor{color:#999;text-shadow:1px 1px 0 rgba(0,0,0,.5)}.jstree-default-dark .jstree-clicked,.jstree-default-dark .jstree-checked{color:#fff}.jstree-default-dark .jstree-hovered{color:#fff}#jstree-marker.jstree-default-dark{border-left-color:#999;background:0 0}.jstree-default-dark .jstree-anchor>.jstree-icon{opacity:.75}.jstree-default-dark .jstree-clicked>.jstree-icon,.jstree-default-dark .jstree-hovered>.jstree-icon,.jstree-default-dark .jstree-checked>.jstree-icon{opacity:1}.jstree-default-dark.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAACZmZl+9SADAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==)}.jstree-default-dark.jstree-rtl .jstree-last{background:0 0}.jstree-default-dark-small.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAACAQMAAABv1h6PAAAABlBMVEUAAACZmZl+9SADAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMHBgAAiABBI4gz9AAAAABJRU5ErkJggg==)}.jstree-default-dark-small.jstree-rtl .jstree-last{background:0 0}.jstree-default-dark-large.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAACAQMAAAAD0EyKAAAABlBMVEUAAACZmZl+9SADAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjgIIGBgABCgCBvVLXcAAAAABJRU5ErkJggg==)}.jstree-default-dark-large.jstree-rtl .jstree-last{background:0 0} \ No newline at end of file
diff --git a/admin/survey/modules/mod_hierarhija/css/vendor/jstree/default-dark/throbber.gif b/admin/survey/modules/mod_hierarhija/css/vendor/jstree/default-dark/throbber.gif
new file mode 100644
index 0000000..cd75035
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/css/vendor/jstree/default-dark/throbber.gif
Binary files differ
diff --git a/admin/survey/modules/mod_hierarhija/css/vendor/jstree/default/32px.png b/admin/survey/modules/mod_hierarhija/css/vendor/jstree/default/32px.png
new file mode 100644
index 0000000..1532715
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/css/vendor/jstree/default/32px.png
Binary files differ
diff --git a/admin/survey/modules/mod_hierarhija/css/vendor/jstree/default/40px.png b/admin/survey/modules/mod_hierarhija/css/vendor/jstree/default/40px.png
new file mode 100644
index 0000000..1959347
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/css/vendor/jstree/default/40px.png
Binary files differ
diff --git a/admin/survey/modules/mod_hierarhija/css/vendor/jstree/default/style.css b/admin/survey/modules/mod_hierarhija/css/vendor/jstree/default/style.css
new file mode 100644
index 0000000..b2b14fc
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/css/vendor/jstree/default/style.css
@@ -0,0 +1,1031 @@
+/* jsTree default theme */
+.jstree-node,
+.jstree-children,
+.jstree-container-ul {
+ display: block;
+ margin: 0;
+ padding: 0;
+ list-style-type: none;
+ list-style-image: none;
+}
+.jstree-node {
+ white-space: nowrap;
+}
+.jstree-anchor {
+ display: inline-block;
+ color: black;
+ white-space: nowrap;
+ padding: 0 4px 0 1px;
+ margin: 0;
+ vertical-align: top;
+}
+.jstree-anchor:focus {
+ outline: 0;
+}
+.jstree-anchor,
+.jstree-anchor:link,
+.jstree-anchor:visited,
+.jstree-anchor:hover,
+.jstree-anchor:active {
+ text-decoration: none;
+ color: inherit;
+}
+.jstree-icon {
+ display: inline-block;
+ text-decoration: none;
+ margin: 0;
+ padding: 0;
+ vertical-align: top;
+ text-align: center;
+}
+.jstree-icon:empty {
+ display: inline-block;
+ text-decoration: none;
+ margin: 0;
+ padding: 0;
+ vertical-align: top;
+ text-align: center;
+}
+.jstree-ocl {
+ cursor: pointer;
+}
+.jstree-leaf > .jstree-ocl {
+ cursor: default;
+}
+.jstree .jstree-open > .jstree-children {
+ display: block;
+}
+.jstree .jstree-closed > .jstree-children,
+.jstree .jstree-leaf > .jstree-children {
+ display: none;
+}
+.jstree-anchor > .jstree-themeicon {
+ margin-right: 2px;
+}
+.jstree-no-icons .jstree-themeicon,
+.jstree-anchor > .jstree-themeicon-hidden {
+ display: none;
+}
+.jstree-rtl .jstree-anchor {
+ padding: 0 1px 0 4px;
+}
+.jstree-rtl .jstree-anchor > .jstree-themeicon {
+ margin-left: 2px;
+ margin-right: 0;
+}
+.jstree-rtl .jstree-node {
+ margin-left: 0;
+}
+.jstree-rtl .jstree-container-ul > .jstree-node {
+ margin-right: 0;
+}
+.jstree-wholerow-ul {
+ position: relative;
+ display: inline-block;
+ min-width: 100%;
+}
+.jstree-wholerow-ul .jstree-leaf > .jstree-ocl {
+ cursor: pointer;
+}
+.jstree-wholerow-ul .jstree-anchor,
+.jstree-wholerow-ul .jstree-icon {
+ position: relative;
+}
+.jstree-wholerow-ul .jstree-wholerow {
+ width: 100%;
+ cursor: pointer;
+ position: absolute;
+ left: 0;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+.vakata-context {
+ display: none;
+}
+.vakata-context,
+.vakata-context ul {
+ margin: 0;
+ padding: 2px;
+ position: absolute;
+ background: #f5f5f5;
+ border: 1px solid #979797;
+ box-shadow: 2px 2px 2px #999999;
+}
+.vakata-context ul {
+ list-style: none;
+ left: 100%;
+ margin-top: -2.7em;
+ margin-left: -4px;
+}
+.vakata-context .vakata-context-right ul {
+ left: auto;
+ right: 100%;
+ margin-left: auto;
+ margin-right: -4px;
+}
+.vakata-context li {
+ list-style: none;
+ display: inline;
+}
+.vakata-context li > a {
+ display: block;
+ padding: 0 2em 0 2em;
+ text-decoration: none;
+ width: auto;
+ color: black;
+ white-space: nowrap;
+ line-height: 2.4em;
+ text-shadow: 1px 1px 0 white;
+ border-radius: 1px;
+}
+.vakata-context li > a:hover {
+ position: relative;
+ background-color: #e8eff7;
+ box-shadow: 0 0 2px #0a6aa1;
+}
+.vakata-context li > a.vakata-context-parent {
+ background-image: url("data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAIORI4JlrqN1oMSnmmZDQUAOw==");
+ background-position: right center;
+ background-repeat: no-repeat;
+}
+.vakata-context li > a:focus {
+ outline: 0;
+}
+.vakata-context .vakata-context-hover > a {
+ position: relative;
+ background-color: #e8eff7;
+ box-shadow: 0 0 2px #0a6aa1;
+}
+.vakata-context .vakata-context-separator > a,
+.vakata-context .vakata-context-separator > a:hover {
+ background: white;
+ border: 0;
+ border-top: 1px solid #e2e3e3;
+ height: 1px;
+ min-height: 1px;
+ max-height: 1px;
+ padding: 0;
+ margin: 0 0 0 2.4em;
+ border-left: 1px solid #e0e0e0;
+ text-shadow: 0 0 0 transparent;
+ box-shadow: 0 0 0 transparent;
+ border-radius: 0;
+}
+.vakata-context .vakata-contextmenu-disabled a,
+.vakata-context .vakata-contextmenu-disabled a:hover {
+ color: silver;
+ background-color: transparent;
+ border: 0;
+ box-shadow: 0 0 0;
+}
+.vakata-context li > a > i {
+ text-decoration: none;
+ display: inline-block;
+ width: 2.4em;
+ height: 2.4em;
+ background: transparent;
+ margin: 0 0 0 -2em;
+ vertical-align: top;
+ text-align: center;
+ line-height: 2.4em;
+}
+.vakata-context li > a > i:empty {
+ width: 2.4em;
+ line-height: 2.4em;
+}
+.vakata-context li > a .vakata-contextmenu-sep {
+ display: inline-block;
+ width: 1px;
+ height: 2.4em;
+ background: white;
+ margin: 0 0.5em 0 0;
+ border-left: 1px solid #e2e3e3;
+}
+.vakata-context .vakata-contextmenu-shortcut {
+ font-size: 0.8em;
+ color: silver;
+ opacity: 0.5;
+ display: none;
+}
+.vakata-context-rtl ul {
+ left: auto;
+ right: 100%;
+ margin-left: auto;
+ margin-right: -4px;
+}
+.vakata-context-rtl li > a.vakata-context-parent {
+ background-image: url("data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAINjI+AC7rWHIsPtmoxLAA7");
+ background-position: left center;
+ background-repeat: no-repeat;
+}
+.vakata-context-rtl .vakata-context-separator > a {
+ margin: 0 2.4em 0 0;
+ border-left: 0;
+ border-right: 1px solid #e2e3e3;
+}
+.vakata-context-rtl .vakata-context-left ul {
+ right: auto;
+ left: 100%;
+ margin-left: -4px;
+ margin-right: auto;
+}
+.vakata-context-rtl li > a > i {
+ margin: 0 -2em 0 0;
+}
+.vakata-context-rtl li > a .vakata-contextmenu-sep {
+ margin: 0 0 0 0.5em;
+ border-left-color: white;
+ background: #e2e3e3;
+}
+#jstree-marker {
+ position: absolute;
+ top: 0;
+ left: 0;
+ margin: -5px 0 0 0;
+ padding: 0;
+ border-right: 0;
+ border-top: 5px solid transparent;
+ border-bottom: 5px solid transparent;
+ border-left: 5px solid;
+ width: 0;
+ height: 0;
+ font-size: 0;
+ line-height: 0;
+}
+#jstree-dnd {
+ line-height: 16px;
+ margin: 0;
+ padding: 4px;
+}
+#jstree-dnd .jstree-icon,
+#jstree-dnd .jstree-copy {
+ display: inline-block;
+ text-decoration: none;
+ margin: 0 2px 0 0;
+ padding: 0;
+ width: 16px;
+ height: 16px;
+}
+#jstree-dnd .jstree-ok {
+ background: green;
+}
+#jstree-dnd .jstree-er {
+ background: red;
+}
+#jstree-dnd .jstree-copy {
+ margin: 0 2px 0 2px;
+}
+.jstree-default .jstree-node,
+.jstree-default .jstree-icon {
+ background-repeat: no-repeat;
+ background-color: transparent;
+}
+.jstree-default .jstree-anchor,
+.jstree-default .jstree-wholerow {
+ transition: background-color 0.15s, box-shadow 0.15s;
+}
+.jstree-default .jstree-hovered {
+ background: #e7f4f9;
+ border-radius: 2px;
+ box-shadow: inset 0 0 1px #cccccc;
+}
+.jstree-default .jstree-clicked {
+ background: #beebff;
+ border-radius: 2px;
+ box-shadow: inset 0 0 1px #999999;
+}
+.jstree-default .jstree-no-icons .jstree-anchor > .jstree-themeicon {
+ display: none;
+}
+.jstree-default .jstree-disabled {
+ background: transparent;
+ color: #666666;
+}
+.jstree-default .jstree-disabled.jstree-hovered {
+ background: transparent;
+ box-shadow: none;
+}
+.jstree-default .jstree-disabled.jstree-clicked {
+ background: #efefef;
+}
+.jstree-default .jstree-disabled > .jstree-icon {
+ opacity: 0.8;
+ filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale");
+ /* Firefox 10+ */
+ filter: gray;
+ /* IE6-9 */
+ -webkit-filter: grayscale(100%);
+ /* Chrome 19+ & Safari 6+ */
+}
+.jstree-default .jstree-search {
+ font-style: italic;
+ color: #8b0000;
+ font-weight: bold;
+}
+.jstree-default .jstree-no-checkboxes .jstree-checkbox {
+ display: none !important;
+}
+.jstree-default.jstree-checkbox-no-clicked .jstree-clicked {
+ background: transparent;
+ box-shadow: none;
+}
+.jstree-default.jstree-checkbox-no-clicked .jstree-clicked.jstree-hovered {
+ background: #e7f4f9;
+}
+.jstree-default.jstree-checkbox-no-clicked > .jstree-wholerow-ul .jstree-wholerow-clicked {
+ background: transparent;
+}
+.jstree-default.jstree-checkbox-no-clicked > .jstree-wholerow-ul .jstree-wholerow-clicked.jstree-wholerow-hovered {
+ background: #e7f4f9;
+}
+.jstree-default > .jstree-striped {
+ min-width: 100%;
+ display: inline-block;
+ background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAkCAMAAAB/qqA+AAAABlBMVEUAAAAAAAClZ7nPAAAAAnRSTlMNAMM9s3UAAAAXSURBVHjajcEBAQAAAIKg/H/aCQZ70AUBjAATb6YPDgAAAABJRU5ErkJggg==") left top repeat;
+}
+.jstree-default > .jstree-wholerow-ul .jstree-hovered,
+.jstree-default > .jstree-wholerow-ul .jstree-clicked {
+ background: transparent;
+ box-shadow: none;
+ border-radius: 0;
+}
+.jstree-default .jstree-wholerow {
+ -moz-box-sizing: border-box;
+ -webkit-box-sizing: border-box;
+ box-sizing: border-box;
+}
+.jstree-default .jstree-wholerow-hovered {
+ background: #e7f4f9;
+}
+.jstree-default .jstree-wholerow-clicked {
+ background: #beebff;
+ background: -webkit-linear-gradient(top, #beebff 0%, #a8e4ff 100%);
+ background: linear-gradient(to bottom, #beebff 0%, #a8e4ff 100%);
+}
+.jstree-default .jstree-node {
+ min-height: 24px;
+ line-height: 24px;
+ margin-left: 24px;
+ min-width: 24px;
+}
+.jstree-default .jstree-anchor {
+ line-height: 24px;
+ height: 24px;
+}
+.jstree-default .jstree-icon {
+ width: 24px;
+ height: 24px;
+ line-height: 24px;
+}
+.jstree-default .jstree-icon:empty {
+ width: 24px;
+ height: 24px;
+ line-height: 24px;
+}
+.jstree-default.jstree-rtl .jstree-node {
+ margin-right: 24px;
+}
+.jstree-default .jstree-wholerow {
+ height: 24px;
+}
+.jstree-default .jstree-node,
+.jstree-default .jstree-icon {
+ background-image: url("32px.png");
+}
+.jstree-default .jstree-node {
+ background-position: -292px -4px;
+ background-repeat: repeat-y;
+}
+.jstree-default .jstree-last {
+ background: transparent;
+}
+.jstree-default .jstree-open > .jstree-ocl {
+ background-position: -132px -4px;
+}
+.jstree-default .jstree-closed > .jstree-ocl {
+ background-position: -100px -4px;
+}
+.jstree-default .jstree-leaf > .jstree-ocl {
+ background-position: -68px -4px;
+}
+.jstree-default .jstree-themeicon {
+ background-position: -260px -4px;
+}
+.jstree-default > .jstree-no-dots .jstree-node,
+.jstree-default > .jstree-no-dots .jstree-leaf > .jstree-ocl {
+ background: transparent;
+}
+.jstree-default > .jstree-no-dots .jstree-open > .jstree-ocl {
+ background-position: -36px -4px;
+}
+.jstree-default > .jstree-no-dots .jstree-closed > .jstree-ocl {
+ background-position: -4px -4px;
+}
+.jstree-default .jstree-disabled {
+ background: transparent;
+}
+.jstree-default .jstree-disabled.jstree-hovered {
+ background: transparent;
+}
+.jstree-default .jstree-disabled.jstree-clicked {
+ background: #efefef;
+}
+.jstree-default .jstree-checkbox {
+ background-position: -164px -4px;
+}
+.jstree-default .jstree-checkbox:hover {
+ background-position: -164px -36px;
+}
+.jstree-default.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox,
+.jstree-default .jstree-checked > .jstree-checkbox {
+ background-position: -228px -4px;
+}
+.jstree-default.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox:hover,
+.jstree-default .jstree-checked > .jstree-checkbox:hover {
+ background-position: -228px -36px;
+}
+.jstree-default .jstree-anchor > .jstree-undetermined {
+ background-position: -196px -4px;
+}
+.jstree-default .jstree-anchor > .jstree-undetermined:hover {
+ background-position: -196px -36px;
+}
+.jstree-default > .jstree-striped {
+ background-size: auto 48px;
+}
+.jstree-default.jstree-rtl .jstree-node {
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==");
+ background-position: 100% 1px;
+ background-repeat: repeat-y;
+}
+.jstree-default.jstree-rtl .jstree-last {
+ background: transparent;
+}
+.jstree-default.jstree-rtl .jstree-open > .jstree-ocl {
+ background-position: -132px -36px;
+}
+.jstree-default.jstree-rtl .jstree-closed > .jstree-ocl {
+ background-position: -100px -36px;
+}
+.jstree-default.jstree-rtl .jstree-leaf > .jstree-ocl {
+ background-position: -68px -36px;
+}
+.jstree-default.jstree-rtl > .jstree-no-dots .jstree-node,
+.jstree-default.jstree-rtl > .jstree-no-dots .jstree-leaf > .jstree-ocl {
+ background: transparent;
+}
+.jstree-default.jstree-rtl > .jstree-no-dots .jstree-open > .jstree-ocl {
+ background-position: -36px -36px;
+}
+.jstree-default.jstree-rtl > .jstree-no-dots .jstree-closed > .jstree-ocl {
+ background-position: -4px -36px;
+}
+.jstree-default .jstree-themeicon-custom {
+ background-color: transparent;
+ background-image: none;
+ background-position: 0 0;
+}
+.jstree-default > .jstree-container-ul .jstree-loading > .jstree-ocl {
+ background: url("throbber.gif") center center no-repeat;
+}
+.jstree-default .jstree-file {
+ background: url("32px.png") -100px -68px no-repeat;
+}
+.jstree-default .jstree-folder {
+ background: url("32px.png") -260px -4px no-repeat;
+}
+.jstree-default > .jstree-container-ul > .jstree-node {
+ margin-left: 0;
+ margin-right: 0;
+}
+#jstree-dnd.jstree-default {
+ line-height: 24px;
+ padding: 0 4px;
+}
+#jstree-dnd.jstree-default .jstree-ok,
+#jstree-dnd.jstree-default .jstree-er {
+ background-image: url("32px.png");
+ background-repeat: no-repeat;
+ background-color: transparent;
+}
+#jstree-dnd.jstree-default i {
+ background: transparent;
+ width: 24px;
+ height: 24px;
+ line-height: 24px;
+}
+#jstree-dnd.jstree-default .jstree-ok {
+ background-position: -4px -68px;
+}
+#jstree-dnd.jstree-default .jstree-er {
+ background-position: -36px -68px;
+}
+.jstree-default.jstree-rtl .jstree-node {
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==");
+}
+.jstree-default.jstree-rtl .jstree-last {
+ background: transparent;
+}
+.jstree-default-small .jstree-node {
+ min-height: 18px;
+ line-height: 18px;
+ margin-left: 18px;
+ min-width: 18px;
+}
+.jstree-default-small .jstree-anchor {
+ line-height: 18px;
+ height: 18px;
+}
+.jstree-default-small .jstree-icon {
+ width: 18px;
+ height: 18px;
+ line-height: 18px;
+}
+.jstree-default-small .jstree-icon:empty {
+ width: 18px;
+ height: 18px;
+ line-height: 18px;
+}
+.jstree-default-small.jstree-rtl .jstree-node {
+ margin-right: 18px;
+}
+.jstree-default-small .jstree-wholerow {
+ height: 18px;
+}
+.jstree-default-small .jstree-node,
+.jstree-default-small .jstree-icon {
+ background-image: url("32px.png");
+}
+.jstree-default-small .jstree-node {
+ background-position: -295px -7px;
+ background-repeat: repeat-y;
+}
+.jstree-default-small .jstree-last {
+ background: transparent;
+}
+.jstree-default-small .jstree-open > .jstree-ocl {
+ background-position: -135px -7px;
+}
+.jstree-default-small .jstree-closed > .jstree-ocl {
+ background-position: -103px -7px;
+}
+.jstree-default-small .jstree-leaf > .jstree-ocl {
+ background-position: -71px -7px;
+}
+.jstree-default-small .jstree-themeicon {
+ background-position: -263px -7px;
+}
+.jstree-default-small > .jstree-no-dots .jstree-node,
+.jstree-default-small > .jstree-no-dots .jstree-leaf > .jstree-ocl {
+ background: transparent;
+}
+.jstree-default-small > .jstree-no-dots .jstree-open > .jstree-ocl {
+ background-position: -39px -7px;
+}
+.jstree-default-small > .jstree-no-dots .jstree-closed > .jstree-ocl {
+ background-position: -7px -7px;
+}
+.jstree-default-small .jstree-disabled {
+ background: transparent;
+}
+.jstree-default-small .jstree-disabled.jstree-hovered {
+ background: transparent;
+}
+.jstree-default-small .jstree-disabled.jstree-clicked {
+ background: #efefef;
+}
+.jstree-default-small .jstree-checkbox {
+ background-position: -167px -7px;
+}
+.jstree-default-small .jstree-checkbox:hover {
+ background-position: -167px -39px;
+}
+.jstree-default-small.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox,
+.jstree-default-small .jstree-checked > .jstree-checkbox {
+ background-position: -231px -7px;
+}
+.jstree-default-small.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox:hover,
+.jstree-default-small .jstree-checked > .jstree-checkbox:hover {
+ background-position: -231px -39px;
+}
+.jstree-default-small .jstree-anchor > .jstree-undetermined {
+ background-position: -199px -7px;
+}
+.jstree-default-small .jstree-anchor > .jstree-undetermined:hover {
+ background-position: -199px -39px;
+}
+.jstree-default-small > .jstree-striped {
+ background-size: auto 36px;
+}
+.jstree-default-small.jstree-rtl .jstree-node {
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==");
+ background-position: 100% 1px;
+ background-repeat: repeat-y;
+}
+.jstree-default-small.jstree-rtl .jstree-last {
+ background: transparent;
+}
+.jstree-default-small.jstree-rtl .jstree-open > .jstree-ocl {
+ background-position: -135px -39px;
+}
+.jstree-default-small.jstree-rtl .jstree-closed > .jstree-ocl {
+ background-position: -103px -39px;
+}
+.jstree-default-small.jstree-rtl .jstree-leaf > .jstree-ocl {
+ background-position: -71px -39px;
+}
+.jstree-default-small.jstree-rtl > .jstree-no-dots .jstree-node,
+.jstree-default-small.jstree-rtl > .jstree-no-dots .jstree-leaf > .jstree-ocl {
+ background: transparent;
+}
+.jstree-default-small.jstree-rtl > .jstree-no-dots .jstree-open > .jstree-ocl {
+ background-position: -39px -39px;
+}
+.jstree-default-small.jstree-rtl > .jstree-no-dots .jstree-closed > .jstree-ocl {
+ background-position: -7px -39px;
+}
+.jstree-default-small .jstree-themeicon-custom {
+ background-color: transparent;
+ background-image: none;
+ background-position: 0 0;
+}
+.jstree-default-small > .jstree-container-ul .jstree-loading > .jstree-ocl {
+ background: url("throbber.gif") center center no-repeat;
+}
+.jstree-default-small .jstree-file {
+ background: url("32px.png") -103px -71px no-repeat;
+}
+.jstree-default-small .jstree-folder {
+ background: url("32px.png") -263px -7px no-repeat;
+}
+.jstree-default-small > .jstree-container-ul > .jstree-node {
+ margin-left: 0;
+ margin-right: 0;
+}
+#jstree-dnd.jstree-default-small {
+ line-height: 18px;
+ padding: 0 4px;
+}
+#jstree-dnd.jstree-default-small .jstree-ok,
+#jstree-dnd.jstree-default-small .jstree-er {
+ background-image: url("32px.png");
+ background-repeat: no-repeat;
+ background-color: transparent;
+}
+#jstree-dnd.jstree-default-small i {
+ background: transparent;
+ width: 18px;
+ height: 18px;
+ line-height: 18px;
+}
+#jstree-dnd.jstree-default-small .jstree-ok {
+ background-position: -7px -71px;
+}
+#jstree-dnd.jstree-default-small .jstree-er {
+ background-position: -39px -71px;
+}
+.jstree-default-small.jstree-rtl .jstree-node {
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAACAQMAAABv1h6PAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMHBgAAiABBI4gz9AAAAABJRU5ErkJggg==");
+}
+.jstree-default-small.jstree-rtl .jstree-last {
+ background: transparent;
+}
+.jstree-default-large .jstree-node {
+ min-height: 32px;
+ line-height: 32px;
+ margin-left: 32px;
+ min-width: 32px;
+}
+.jstree-default-large .jstree-anchor {
+ line-height: 32px;
+ height: 32px;
+}
+.jstree-default-large .jstree-icon {
+ width: 32px;
+ height: 32px;
+ line-height: 32px;
+}
+.jstree-default-large .jstree-icon:empty {
+ width: 32px;
+ height: 32px;
+ line-height: 32px;
+}
+.jstree-default-large.jstree-rtl .jstree-node {
+ margin-right: 32px;
+}
+.jstree-default-large .jstree-wholerow {
+ height: 32px;
+}
+.jstree-default-large .jstree-node,
+.jstree-default-large .jstree-icon {
+ background-image: url("32px.png");
+}
+.jstree-default-large .jstree-node {
+ background-position: -288px 0px;
+ background-repeat: repeat-y;
+}
+.jstree-default-large .jstree-last {
+ background: transparent;
+}
+.jstree-default-large .jstree-open > .jstree-ocl {
+ background-position: -128px 0px;
+}
+.jstree-default-large .jstree-closed > .jstree-ocl {
+ background-position: -96px 0px;
+}
+.jstree-default-large .jstree-leaf > .jstree-ocl {
+ background-position: -64px 0px;
+}
+.jstree-default-large .jstree-themeicon {
+ background-position: -256px 0px;
+}
+.jstree-default-large > .jstree-no-dots .jstree-node,
+.jstree-default-large > .jstree-no-dots .jstree-leaf > .jstree-ocl {
+ background: transparent;
+}
+.jstree-default-large > .jstree-no-dots .jstree-open > .jstree-ocl {
+ background-position: -32px 0px;
+}
+.jstree-default-large > .jstree-no-dots .jstree-closed > .jstree-ocl {
+ background-position: 0px 0px;
+}
+.jstree-default-large .jstree-disabled {
+ background: transparent;
+}
+.jstree-default-large .jstree-disabled.jstree-hovered {
+ background: transparent;
+}
+.jstree-default-large .jstree-disabled.jstree-clicked {
+ background: #efefef;
+}
+.jstree-default-large .jstree-checkbox {
+ background-position: -160px 0px;
+}
+.jstree-default-large .jstree-checkbox:hover {
+ background-position: -160px -32px;
+}
+.jstree-default-large.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox,
+.jstree-default-large .jstree-checked > .jstree-checkbox {
+ background-position: -224px 0px;
+}
+.jstree-default-large.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox:hover,
+.jstree-default-large .jstree-checked > .jstree-checkbox:hover {
+ background-position: -224px -32px;
+}
+.jstree-default-large .jstree-anchor > .jstree-undetermined {
+ background-position: -192px 0px;
+}
+.jstree-default-large .jstree-anchor > .jstree-undetermined:hover {
+ background-position: -192px -32px;
+}
+.jstree-default-large > .jstree-striped {
+ background-size: auto 64px;
+}
+.jstree-default-large.jstree-rtl .jstree-node {
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==");
+ background-position: 100% 1px;
+ background-repeat: repeat-y;
+}
+.jstree-default-large.jstree-rtl .jstree-last {
+ background: transparent;
+}
+.jstree-default-large.jstree-rtl .jstree-open > .jstree-ocl {
+ background-position: -128px -32px;
+}
+.jstree-default-large.jstree-rtl .jstree-closed > .jstree-ocl {
+ background-position: -96px -32px;
+}
+.jstree-default-large.jstree-rtl .jstree-leaf > .jstree-ocl {
+ background-position: -64px -32px;
+}
+.jstree-default-large.jstree-rtl > .jstree-no-dots .jstree-node,
+.jstree-default-large.jstree-rtl > .jstree-no-dots .jstree-leaf > .jstree-ocl {
+ background: transparent;
+}
+.jstree-default-large.jstree-rtl > .jstree-no-dots .jstree-open > .jstree-ocl {
+ background-position: -32px -32px;
+}
+.jstree-default-large.jstree-rtl > .jstree-no-dots .jstree-closed > .jstree-ocl {
+ background-position: 0px -32px;
+}
+.jstree-default-large .jstree-themeicon-custom {
+ background-color: transparent;
+ background-image: none;
+ background-position: 0 0;
+}
+.jstree-default-large > .jstree-container-ul .jstree-loading > .jstree-ocl {
+ background: url("throbber.gif") center center no-repeat;
+}
+.jstree-default-large .jstree-file {
+ background: url("32px.png") -96px -64px no-repeat;
+}
+.jstree-default-large .jstree-folder {
+ background: url("32px.png") -256px 0px no-repeat;
+}
+.jstree-default-large > .jstree-container-ul > .jstree-node {
+ margin-left: 0;
+ margin-right: 0;
+}
+#jstree-dnd.jstree-default-large {
+ line-height: 32px;
+ padding: 0 4px;
+}
+#jstree-dnd.jstree-default-large .jstree-ok,
+#jstree-dnd.jstree-default-large .jstree-er {
+ background-image: url("32px.png");
+ background-repeat: no-repeat;
+ background-color: transparent;
+}
+#jstree-dnd.jstree-default-large i {
+ background: transparent;
+ width: 32px;
+ height: 32px;
+ line-height: 32px;
+}
+#jstree-dnd.jstree-default-large .jstree-ok {
+ background-position: 0px -64px;
+}
+#jstree-dnd.jstree-default-large .jstree-er {
+ background-position: -32px -64px;
+}
+.jstree-default-large.jstree-rtl .jstree-node {
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAACAQMAAAAD0EyKAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjgIIGBgABCgCBvVLXcAAAAABJRU5ErkJggg==");
+}
+.jstree-default-large.jstree-rtl .jstree-last {
+ background: transparent;
+}
+@media (max-width: 768px) {
+ #jstree-dnd.jstree-dnd-responsive {
+ line-height: 40px;
+ font-weight: bold;
+ font-size: 1.1em;
+ text-shadow: 1px 1px white;
+ }
+ #jstree-dnd.jstree-dnd-responsive > i {
+ background: transparent;
+ width: 40px;
+ height: 40px;
+ }
+ #jstree-dnd.jstree-dnd-responsive > .jstree-ok {
+ background-image: url("40px.png");
+ background-position: 0 -200px;
+ background-size: 120px 240px;
+ }
+ #jstree-dnd.jstree-dnd-responsive > .jstree-er {
+ background-image: url("40px.png");
+ background-position: -40px -200px;
+ background-size: 120px 240px;
+ }
+ #jstree-marker.jstree-dnd-responsive {
+ border-left-width: 10px;
+ border-top-width: 10px;
+ border-bottom-width: 10px;
+ margin-top: -10px;
+ }
+}
+@media (max-width: 768px) {
+ .jstree-default-responsive {
+ /*
+ .jstree-open > .jstree-ocl,
+ .jstree-closed > .jstree-ocl { border-radius:20px; background-color:white; }
+ */
+ }
+ .jstree-default-responsive .jstree-icon {
+ background-image: url("40px.png");
+ }
+ .jstree-default-responsive .jstree-node,
+ .jstree-default-responsive .jstree-leaf > .jstree-ocl {
+ background: transparent;
+ }
+ .jstree-default-responsive .jstree-node {
+ min-height: 40px;
+ line-height: 40px;
+ margin-left: 40px;
+ min-width: 40px;
+ white-space: nowrap;
+ }
+ .jstree-default-responsive .jstree-anchor {
+ line-height: 40px;
+ height: 40px;
+ }
+ .jstree-default-responsive .jstree-icon,
+ .jstree-default-responsive .jstree-icon:empty {
+ width: 40px;
+ height: 40px;
+ line-height: 40px;
+ }
+ .jstree-default-responsive > .jstree-container-ul > .jstree-node {
+ margin-left: 0;
+ }
+ .jstree-default-responsive.jstree-rtl .jstree-node {
+ margin-left: 0;
+ margin-right: 40px;
+ }
+ .jstree-default-responsive.jstree-rtl .jstree-container-ul > .jstree-node {
+ margin-right: 0;
+ }
+ .jstree-default-responsive .jstree-ocl,
+ .jstree-default-responsive .jstree-themeicon,
+ .jstree-default-responsive .jstree-checkbox {
+ background-size: 120px 240px;
+ }
+ .jstree-default-responsive .jstree-leaf > .jstree-ocl {
+ background: transparent;
+ }
+ .jstree-default-responsive .jstree-open > .jstree-ocl {
+ background-position: 0 0px !important;
+ }
+ .jstree-default-responsive .jstree-closed > .jstree-ocl {
+ background-position: 0 -40px !important;
+ }
+ .jstree-default-responsive.jstree-rtl .jstree-closed > .jstree-ocl {
+ background-position: -40px 0px !important;
+ }
+ .jstree-default-responsive .jstree-themeicon {
+ background-position: -40px -40px;
+ }
+ .jstree-default-responsive .jstree-checkbox,
+ .jstree-default-responsive .jstree-checkbox:hover {
+ background-position: -40px -80px;
+ }
+ .jstree-default-responsive.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox,
+ .jstree-default-responsive.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox:hover,
+ .jstree-default-responsive .jstree-checked > .jstree-checkbox,
+ .jstree-default-responsive .jstree-checked > .jstree-checkbox:hover {
+ background-position: 0 -80px;
+ }
+ .jstree-default-responsive .jstree-anchor > .jstree-undetermined,
+ .jstree-default-responsive .jstree-anchor > .jstree-undetermined:hover {
+ background-position: 0 -120px;
+ }
+ .jstree-default-responsive .jstree-anchor {
+ font-weight: bold;
+ font-size: 1.1em;
+ text-shadow: 1px 1px white;
+ }
+ .jstree-default-responsive > .jstree-striped {
+ background: transparent;
+ }
+ .jstree-default-responsive .jstree-wholerow {
+ border-top: 1px solid rgba(255, 255, 255, 0.7);
+ border-bottom: 1px solid rgba(64, 64, 64, 0.2);
+ background: #ebebeb;
+ height: 40px;
+ }
+ .jstree-default-responsive .jstree-wholerow-hovered {
+ background: #e7f4f9;
+ }
+ .jstree-default-responsive .jstree-wholerow-clicked {
+ background: #beebff;
+ }
+ .jstree-default-responsive .jstree-children .jstree-last > .jstree-wholerow {
+ box-shadow: inset 0 -6px 3px -5px #666666;
+ }
+ .jstree-default-responsive .jstree-children .jstree-open > .jstree-wholerow {
+ box-shadow: inset 0 6px 3px -5px #666666;
+ border-top: 0;
+ }
+ .jstree-default-responsive .jstree-children .jstree-open + .jstree-open {
+ box-shadow: none;
+ }
+ .jstree-default-responsive .jstree-node,
+ .jstree-default-responsive .jstree-icon,
+ .jstree-default-responsive .jstree-node > .jstree-ocl,
+ .jstree-default-responsive .jstree-themeicon,
+ .jstree-default-responsive .jstree-checkbox {
+ background-image: url("40px.png");
+ background-size: 120px 240px;
+ }
+ .jstree-default-responsive .jstree-node {
+ background-position: -80px 0;
+ background-repeat: repeat-y;
+ }
+ .jstree-default-responsive .jstree-last {
+ background: transparent;
+ }
+ .jstree-default-responsive .jstree-leaf > .jstree-ocl {
+ background-position: -40px -120px;
+ }
+ .jstree-default-responsive .jstree-last > .jstree-ocl {
+ background-position: -40px -160px;
+ }
+ .jstree-default-responsive .jstree-themeicon-custom {
+ background-color: transparent;
+ background-image: none;
+ background-position: 0 0;
+ }
+ .jstree-default-responsive .jstree-file {
+ background: url("40px.png") 0 -160px no-repeat;
+ background-size: 120px 240px;
+ }
+ .jstree-default-responsive .jstree-folder {
+ background: url("40px.png") -40px -40px no-repeat;
+ background-size: 120px 240px;
+ }
+ .jstree-default-responsive > .jstree-container-ul > .jstree-node {
+ margin-left: 0;
+ margin-right: 0;
+ }
+}
diff --git a/admin/survey/modules/mod_hierarhija/css/vendor/jstree/default/style.min.css b/admin/survey/modules/mod_hierarhija/css/vendor/jstree/default/style.min.css
new file mode 100644
index 0000000..d219660
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/css/vendor/jstree/default/style.min.css
@@ -0,0 +1 @@
+.jstree-node,.jstree-children,.jstree-container-ul{display:block;margin:0;padding:0;list-style-type:none;list-style-image:none}.jstree-node{white-space:nowrap}.jstree-anchor{display:inline-block;color:#000;white-space:nowrap;padding:0 4px 0 1px;margin:0;vertical-align:top}.jstree-anchor:focus{outline:0}.jstree-anchor,.jstree-anchor:link,.jstree-anchor:visited,.jstree-anchor:hover,.jstree-anchor:active{text-decoration:none;color:inherit}.jstree-icon{display:inline-block;text-decoration:none;margin:0;padding:0;vertical-align:top;text-align:center}.jstree-icon:empty{display:inline-block;text-decoration:none;margin:0;padding:0;vertical-align:top;text-align:center}.jstree-ocl{cursor:pointer}.jstree-leaf>.jstree-ocl{cursor:default}.jstree .jstree-open>.jstree-children{display:block}.jstree .jstree-closed>.jstree-children,.jstree .jstree-leaf>.jstree-children{display:none}.jstree-anchor>.jstree-themeicon{margin-right:2px}.jstree-no-icons .jstree-themeicon,.jstree-anchor>.jstree-themeicon-hidden{display:none}.jstree-rtl .jstree-anchor{padding:0 1px 0 4px}.jstree-rtl .jstree-anchor>.jstree-themeicon{margin-left:2px;margin-right:0}.jstree-rtl .jstree-node{margin-left:0}.jstree-rtl .jstree-container-ul>.jstree-node{margin-right:0}.jstree-wholerow-ul{position:relative;display:inline-block;min-width:100%}.jstree-wholerow-ul .jstree-leaf>.jstree-ocl{cursor:pointer}.jstree-wholerow-ul .jstree-anchor,.jstree-wholerow-ul .jstree-icon{position:relative}.jstree-wholerow-ul .jstree-wholerow{width:100%;cursor:pointer;position:absolute;left:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vakata-context{display:none}.vakata-context,.vakata-context ul{margin:0;padding:2px;position:absolute;background:#f5f5f5;border:1px solid #979797;box-shadow:2px 2px 2px #999}.vakata-context ul{list-style:none;left:100%;margin-top:-2.7em;margin-left:-4px}.vakata-context .vakata-context-right ul{left:auto;right:100%;margin-left:auto;margin-right:-4px}.vakata-context li{list-style:none;display:inline}.vakata-context li>a{display:block;padding:0 2em;text-decoration:none;width:auto;color:#000;white-space:nowrap;line-height:2.4em;text-shadow:1px 1px 0 #fff;border-radius:1px}.vakata-context li>a:hover{position:relative;background-color:#e8eff7;box-shadow:0 0 2px #0a6aa1}.vakata-context li>a.vakata-context-parent{background-image:url(data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAIORI4JlrqN1oMSnmmZDQUAOw==);background-position:right center;background-repeat:no-repeat}.vakata-context li>a:focus{outline:0}.vakata-context .vakata-context-hover>a{position:relative;background-color:#e8eff7;box-shadow:0 0 2px #0a6aa1}.vakata-context .vakata-context-separator>a,.vakata-context .vakata-context-separator>a:hover{background:#fff;border:0;border-top:1px solid #e2e3e3;height:1px;min-height:1px;max-height:1px;padding:0;margin:0 0 0 2.4em;border-left:1px solid #e0e0e0;text-shadow:0 0 0 transparent;box-shadow:0 0 0 transparent;border-radius:0}.vakata-context .vakata-contextmenu-disabled a,.vakata-context .vakata-contextmenu-disabled a:hover{color:silver;background-color:transparent;border:0;box-shadow:0 0 0}.vakata-context li>a>i{text-decoration:none;display:inline-block;width:2.4em;height:2.4em;background:0 0;margin:0 0 0 -2em;vertical-align:top;text-align:center;line-height:2.4em}.vakata-context li>a>i:empty{width:2.4em;line-height:2.4em}.vakata-context li>a .vakata-contextmenu-sep{display:inline-block;width:1px;height:2.4em;background:#fff;margin:0 .5em 0 0;border-left:1px solid #e2e3e3}.vakata-context .vakata-contextmenu-shortcut{font-size:.8em;color:silver;opacity:.5;display:none}.vakata-context-rtl ul{left:auto;right:100%;margin-left:auto;margin-right:-4px}.vakata-context-rtl li>a.vakata-context-parent{background-image:url(data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAINjI+AC7rWHIsPtmoxLAA7);background-position:left center;background-repeat:no-repeat}.vakata-context-rtl .vakata-context-separator>a{margin:0 2.4em 0 0;border-left:0;border-right:1px solid #e2e3e3}.vakata-context-rtl .vakata-context-left ul{right:auto;left:100%;margin-left:-4px;margin-right:auto}.vakata-context-rtl li>a>i{margin:0 -2em 0 0}.vakata-context-rtl li>a .vakata-contextmenu-sep{margin:0 0 0 .5em;border-left-color:#fff;background:#e2e3e3}#jstree-marker{position:absolute;top:0;left:0;margin:-5px 0 0 0;padding:0;border-right:0;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid;width:0;height:0;font-size:0;line-height:0}#jstree-dnd{line-height:16px;margin:0;padding:4px}#jstree-dnd .jstree-icon,#jstree-dnd .jstree-copy{display:inline-block;text-decoration:none;margin:0 2px 0 0;padding:0;width:16px;height:16px}#jstree-dnd .jstree-ok{background:green}#jstree-dnd .jstree-er{background:red}#jstree-dnd .jstree-copy{margin:0 2px}.jstree-default .jstree-node,.jstree-default .jstree-icon{background-repeat:no-repeat;background-color:transparent}.jstree-default .jstree-anchor,.jstree-default .jstree-wholerow{transition:background-color .15s,box-shadow .15s}.jstree-default .jstree-hovered{background:#e7f4f9;border-radius:2px;box-shadow:inset 0 0 1px #ccc}.jstree-default .jstree-clicked{background:#beebff;border-radius:2px;box-shadow:inset 0 0 1px #999}.jstree-default .jstree-no-icons .jstree-anchor>.jstree-themeicon{display:none}.jstree-default .jstree-disabled{background:0 0;color:#666}.jstree-default .jstree-disabled.jstree-hovered{background:0 0;box-shadow:none}.jstree-default .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default .jstree-disabled>.jstree-icon{opacity:.8;filter:url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale");filter:gray;-webkit-filter:grayscale(100%)}.jstree-default .jstree-search{font-style:italic;color:#8b0000;font-weight:700}.jstree-default .jstree-no-checkboxes .jstree-checkbox{display:none!important}.jstree-default.jstree-checkbox-no-clicked .jstree-clicked{background:0 0;box-shadow:none}.jstree-default.jstree-checkbox-no-clicked .jstree-clicked.jstree-hovered{background:#e7f4f9}.jstree-default.jstree-checkbox-no-clicked>.jstree-wholerow-ul .jstree-wholerow-clicked{background:0 0}.jstree-default.jstree-checkbox-no-clicked>.jstree-wholerow-ul .jstree-wholerow-clicked.jstree-wholerow-hovered{background:#e7f4f9}.jstree-default>.jstree-striped{min-width:100%;display:inline-block;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAkCAMAAAB/qqA+AAAABlBMVEUAAAAAAAClZ7nPAAAAAnRSTlMNAMM9s3UAAAAXSURBVHjajcEBAQAAAIKg/H/aCQZ70AUBjAATb6YPDgAAAABJRU5ErkJggg==) left top repeat}.jstree-default>.jstree-wholerow-ul .jstree-hovered,.jstree-default>.jstree-wholerow-ul .jstree-clicked{background:0 0;box-shadow:none;border-radius:0}.jstree-default .jstree-wholerow{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.jstree-default .jstree-wholerow-hovered{background:#e7f4f9}.jstree-default .jstree-wholerow-clicked{background:#beebff;background:-webkit-linear-gradient(top,#beebff 0,#a8e4ff 100%);background:linear-gradient(to bottom,#beebff 0,#a8e4ff 100%)}.jstree-default .jstree-node{min-height:24px;line-height:24px;margin-left:24px;min-width:24px}.jstree-default .jstree-anchor{line-height:24px;height:24px}.jstree-default .jstree-icon{width:24px;height:24px;line-height:24px}.jstree-default .jstree-icon:empty{width:24px;height:24px;line-height:24px}.jstree-default.jstree-rtl .jstree-node{margin-right:24px}.jstree-default .jstree-wholerow{height:24px}.jstree-default .jstree-node,.jstree-default .jstree-icon{background-image:url(32px.png)}.jstree-default .jstree-node{background-position:-292px -4px;background-repeat:repeat-y}.jstree-default .jstree-last{background:0 0}.jstree-default .jstree-open>.jstree-ocl{background-position:-132px -4px}.jstree-default .jstree-closed>.jstree-ocl{background-position:-100px -4px}.jstree-default .jstree-leaf>.jstree-ocl{background-position:-68px -4px}.jstree-default .jstree-themeicon{background-position:-260px -4px}.jstree-default>.jstree-no-dots .jstree-node,.jstree-default>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-36px -4px}.jstree-default>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-4px -4px}.jstree-default .jstree-disabled{background:0 0}.jstree-default .jstree-disabled.jstree-hovered{background:0 0}.jstree-default .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default .jstree-checkbox{background-position:-164px -4px}.jstree-default .jstree-checkbox:hover{background-position:-164px -36px}.jstree-default.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-default .jstree-checked>.jstree-checkbox{background-position:-228px -4px}.jstree-default.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-default .jstree-checked>.jstree-checkbox:hover{background-position:-228px -36px}.jstree-default .jstree-anchor>.jstree-undetermined{background-position:-196px -4px}.jstree-default .jstree-anchor>.jstree-undetermined:hover{background-position:-196px -36px}.jstree-default>.jstree-striped{background-size:auto 48px}.jstree-default.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);background-position:100% 1px;background-repeat:repeat-y}.jstree-default.jstree-rtl .jstree-last{background:0 0}.jstree-default.jstree-rtl .jstree-open>.jstree-ocl{background-position:-132px -36px}.jstree-default.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-100px -36px}.jstree-default.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-68px -36px}.jstree-default.jstree-rtl>.jstree-no-dots .jstree-node,.jstree-default.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-36px -36px}.jstree-default.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-4px -36px}.jstree-default .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-default>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url(throbber.gif) center center no-repeat}.jstree-default .jstree-file{background:url(32px.png) -100px -68px no-repeat}.jstree-default .jstree-folder{background:url(32px.png) -260px -4px no-repeat}.jstree-default>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}#jstree-dnd.jstree-default{line-height:24px;padding:0 4px}#jstree-dnd.jstree-default .jstree-ok,#jstree-dnd.jstree-default .jstree-er{background-image:url(32px.png);background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-default i{background:0 0;width:24px;height:24px;line-height:24px}#jstree-dnd.jstree-default .jstree-ok{background-position:-4px -68px}#jstree-dnd.jstree-default .jstree-er{background-position:-36px -68px}.jstree-default.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==)}.jstree-default.jstree-rtl .jstree-last{background:0 0}.jstree-default-small .jstree-node{min-height:18px;line-height:18px;margin-left:18px;min-width:18px}.jstree-default-small .jstree-anchor{line-height:18px;height:18px}.jstree-default-small .jstree-icon{width:18px;height:18px;line-height:18px}.jstree-default-small .jstree-icon:empty{width:18px;height:18px;line-height:18px}.jstree-default-small.jstree-rtl .jstree-node{margin-right:18px}.jstree-default-small .jstree-wholerow{height:18px}.jstree-default-small .jstree-node,.jstree-default-small .jstree-icon{background-image:url(32px.png)}.jstree-default-small .jstree-node{background-position:-295px -7px;background-repeat:repeat-y}.jstree-default-small .jstree-last{background:0 0}.jstree-default-small .jstree-open>.jstree-ocl{background-position:-135px -7px}.jstree-default-small .jstree-closed>.jstree-ocl{background-position:-103px -7px}.jstree-default-small .jstree-leaf>.jstree-ocl{background-position:-71px -7px}.jstree-default-small .jstree-themeicon{background-position:-263px -7px}.jstree-default-small>.jstree-no-dots .jstree-node,.jstree-default-small>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-small>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-39px -7px}.jstree-default-small>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-7px -7px}.jstree-default-small .jstree-disabled{background:0 0}.jstree-default-small .jstree-disabled.jstree-hovered{background:0 0}.jstree-default-small .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default-small .jstree-checkbox{background-position:-167px -7px}.jstree-default-small .jstree-checkbox:hover{background-position:-167px -39px}.jstree-default-small.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-default-small .jstree-checked>.jstree-checkbox{background-position:-231px -7px}.jstree-default-small.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-default-small .jstree-checked>.jstree-checkbox:hover{background-position:-231px -39px}.jstree-default-small .jstree-anchor>.jstree-undetermined{background-position:-199px -7px}.jstree-default-small .jstree-anchor>.jstree-undetermined:hover{background-position:-199px -39px}.jstree-default-small>.jstree-striped{background-size:auto 36px}.jstree-default-small.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);background-position:100% 1px;background-repeat:repeat-y}.jstree-default-small.jstree-rtl .jstree-last{background:0 0}.jstree-default-small.jstree-rtl .jstree-open>.jstree-ocl{background-position:-135px -39px}.jstree-default-small.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-103px -39px}.jstree-default-small.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-71px -39px}.jstree-default-small.jstree-rtl>.jstree-no-dots .jstree-node,.jstree-default-small.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-small.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-39px -39px}.jstree-default-small.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-7px -39px}.jstree-default-small .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-default-small>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url(throbber.gif) center center no-repeat}.jstree-default-small .jstree-file{background:url(32px.png) -103px -71px no-repeat}.jstree-default-small .jstree-folder{background:url(32px.png) -263px -7px no-repeat}.jstree-default-small>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}#jstree-dnd.jstree-default-small{line-height:18px;padding:0 4px}#jstree-dnd.jstree-default-small .jstree-ok,#jstree-dnd.jstree-default-small .jstree-er{background-image:url(32px.png);background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-default-small i{background:0 0;width:18px;height:18px;line-height:18px}#jstree-dnd.jstree-default-small .jstree-ok{background-position:-7px -71px}#jstree-dnd.jstree-default-small .jstree-er{background-position:-39px -71px}.jstree-default-small.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAACAQMAAABv1h6PAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMHBgAAiABBI4gz9AAAAABJRU5ErkJggg==)}.jstree-default-small.jstree-rtl .jstree-last{background:0 0}.jstree-default-large .jstree-node{min-height:32px;line-height:32px;margin-left:32px;min-width:32px}.jstree-default-large .jstree-anchor{line-height:32px;height:32px}.jstree-default-large .jstree-icon{width:32px;height:32px;line-height:32px}.jstree-default-large .jstree-icon:empty{width:32px;height:32px;line-height:32px}.jstree-default-large.jstree-rtl .jstree-node{margin-right:32px}.jstree-default-large .jstree-wholerow{height:32px}.jstree-default-large .jstree-node,.jstree-default-large .jstree-icon{background-image:url(32px.png)}.jstree-default-large .jstree-node{background-position:-288px 0;background-repeat:repeat-y}.jstree-default-large .jstree-last{background:0 0}.jstree-default-large .jstree-open>.jstree-ocl{background-position:-128px 0}.jstree-default-large .jstree-closed>.jstree-ocl{background-position:-96px 0}.jstree-default-large .jstree-leaf>.jstree-ocl{background-position:-64px 0}.jstree-default-large .jstree-themeicon{background-position:-256px 0}.jstree-default-large>.jstree-no-dots .jstree-node,.jstree-default-large>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-large>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-32px 0}.jstree-default-large>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:0 0}.jstree-default-large .jstree-disabled{background:0 0}.jstree-default-large .jstree-disabled.jstree-hovered{background:0 0}.jstree-default-large .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default-large .jstree-checkbox{background-position:-160px 0}.jstree-default-large .jstree-checkbox:hover{background-position:-160px -32px}.jstree-default-large.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-default-large .jstree-checked>.jstree-checkbox{background-position:-224px 0}.jstree-default-large.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-default-large .jstree-checked>.jstree-checkbox:hover{background-position:-224px -32px}.jstree-default-large .jstree-anchor>.jstree-undetermined{background-position:-192px 0}.jstree-default-large .jstree-anchor>.jstree-undetermined:hover{background-position:-192px -32px}.jstree-default-large>.jstree-striped{background-size:auto 64px}.jstree-default-large.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);background-position:100% 1px;background-repeat:repeat-y}.jstree-default-large.jstree-rtl .jstree-last{background:0 0}.jstree-default-large.jstree-rtl .jstree-open>.jstree-ocl{background-position:-128px -32px}.jstree-default-large.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-96px -32px}.jstree-default-large.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-64px -32px}.jstree-default-large.jstree-rtl>.jstree-no-dots .jstree-node,.jstree-default-large.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-large.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-32px -32px}.jstree-default-large.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:0 -32px}.jstree-default-large .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-default-large>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url(throbber.gif) center center no-repeat}.jstree-default-large .jstree-file{background:url(32px.png) -96px -64px no-repeat}.jstree-default-large .jstree-folder{background:url(32px.png) -256px 0 no-repeat}.jstree-default-large>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}#jstree-dnd.jstree-default-large{line-height:32px;padding:0 4px}#jstree-dnd.jstree-default-large .jstree-ok,#jstree-dnd.jstree-default-large .jstree-er{background-image:url(32px.png);background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-default-large i{background:0 0;width:32px;height:32px;line-height:32px}#jstree-dnd.jstree-default-large .jstree-ok{background-position:0 -64px}#jstree-dnd.jstree-default-large .jstree-er{background-position:-32px -64px}.jstree-default-large.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAACAQMAAAAD0EyKAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjgIIGBgABCgCBvVLXcAAAAABJRU5ErkJggg==)}.jstree-default-large.jstree-rtl .jstree-last{background:0 0}@media (max-width:768px){#jstree-dnd.jstree-dnd-responsive{line-height:40px;font-weight:700;font-size:1.1em;text-shadow:1px 1px #fff}#jstree-dnd.jstree-dnd-responsive>i{background:0 0;width:40px;height:40px}#jstree-dnd.jstree-dnd-responsive>.jstree-ok{background-image:url(40px.png);background-position:0 -200px;background-size:120px 240px}#jstree-dnd.jstree-dnd-responsive>.jstree-er{background-image:url(40px.png);background-position:-40px -200px;background-size:120px 240px}#jstree-marker.jstree-dnd-responsive{border-left-width:10px;border-top-width:10px;border-bottom-width:10px;margin-top:-10px}}@media (max-width:768px){.jstree-default-responsive .jstree-icon{background-image:url(40px.png)}.jstree-default-responsive .jstree-node,.jstree-default-responsive .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-responsive .jstree-node{min-height:40px;line-height:40px;margin-left:40px;min-width:40px;white-space:nowrap}.jstree-default-responsive .jstree-anchor{line-height:40px;height:40px}.jstree-default-responsive .jstree-icon,.jstree-default-responsive .jstree-icon:empty{width:40px;height:40px;line-height:40px}.jstree-default-responsive>.jstree-container-ul>.jstree-node{margin-left:0}.jstree-default-responsive.jstree-rtl .jstree-node{margin-left:0;margin-right:40px}.jstree-default-responsive.jstree-rtl .jstree-container-ul>.jstree-node{margin-right:0}.jstree-default-responsive .jstree-ocl,.jstree-default-responsive .jstree-themeicon,.jstree-default-responsive .jstree-checkbox{background-size:120px 240px}.jstree-default-responsive .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-responsive .jstree-open>.jstree-ocl{background-position:0 0!important}.jstree-default-responsive .jstree-closed>.jstree-ocl{background-position:0 -40px!important}.jstree-default-responsive.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-40px 0!important}.jstree-default-responsive .jstree-themeicon{background-position:-40px -40px}.jstree-default-responsive .jstree-checkbox,.jstree-default-responsive .jstree-checkbox:hover{background-position:-40px -80px}.jstree-default-responsive.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-default-responsive.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-default-responsive .jstree-checked>.jstree-checkbox,.jstree-default-responsive .jstree-checked>.jstree-checkbox:hover{background-position:0 -80px}.jstree-default-responsive .jstree-anchor>.jstree-undetermined,.jstree-default-responsive .jstree-anchor>.jstree-undetermined:hover{background-position:0 -120px}.jstree-default-responsive .jstree-anchor{font-weight:700;font-size:1.1em;text-shadow:1px 1px #fff}.jstree-default-responsive>.jstree-striped{background:0 0}.jstree-default-responsive .jstree-wholerow{border-top:1px solid rgba(255,255,255,.7);border-bottom:1px solid rgba(64,64,64,.2);background:#ebebeb;height:40px}.jstree-default-responsive .jstree-wholerow-hovered{background:#e7f4f9}.jstree-default-responsive .jstree-wholerow-clicked{background:#beebff}.jstree-default-responsive .jstree-children .jstree-last>.jstree-wholerow{box-shadow:inset 0 -6px 3px -5px #666}.jstree-default-responsive .jstree-children .jstree-open>.jstree-wholerow{box-shadow:inset 0 6px 3px -5px #666;border-top:0}.jstree-default-responsive .jstree-children .jstree-open+.jstree-open{box-shadow:none}.jstree-default-responsive .jstree-node,.jstree-default-responsive .jstree-icon,.jstree-default-responsive .jstree-node>.jstree-ocl,.jstree-default-responsive .jstree-themeicon,.jstree-default-responsive .jstree-checkbox{background-image:url(40px.png);background-size:120px 240px}.jstree-default-responsive .jstree-node{background-position:-80px 0;background-repeat:repeat-y}.jstree-default-responsive .jstree-last{background:0 0}.jstree-default-responsive .jstree-leaf>.jstree-ocl{background-position:-40px -120px}.jstree-default-responsive .jstree-last>.jstree-ocl{background-position:-40px -160px}.jstree-default-responsive .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-default-responsive .jstree-file{background:url(40px.png) 0 -160px no-repeat;background-size:120px 240px}.jstree-default-responsive .jstree-folder{background:url(40px.png) -40px -40px no-repeat;background-size:120px 240px}.jstree-default-responsive>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}} \ No newline at end of file
diff --git a/admin/survey/modules/mod_hierarhija/css/vendor/jstree/default/throbber.gif b/admin/survey/modules/mod_hierarhija/css/vendor/jstree/default/throbber.gif
new file mode 100644
index 0000000..1b5b2fd
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/css/vendor/jstree/default/throbber.gif
Binary files differ
diff --git a/admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/30px.png b/admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/30px.png
new file mode 100644
index 0000000..5582154
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/30px.png
Binary files differ
diff --git a/admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/32px.png b/admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/32px.png
new file mode 100644
index 0000000..eb1db46
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/32px.png
Binary files differ
diff --git a/admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/fonts/titillium/titilliumweb-bold-webfont.eot b/admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/fonts/titillium/titilliumweb-bold-webfont.eot
new file mode 100644
index 0000000..ec01fc3
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/fonts/titillium/titilliumweb-bold-webfont.eot
Binary files differ
diff --git a/admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/fonts/titillium/titilliumweb-bold-webfont.svg b/admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/fonts/titillium/titilliumweb-bold-webfont.svg
new file mode 100644
index 0000000..82ba7a1
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/fonts/titillium/titilliumweb-bold-webfont.svg
@@ -0,0 +1,2377 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
+<svg xmlns="http://www.w3.org/2000/svg">
+<metadata></metadata>
+<defs>
+<font id="titillium_webbold" horiz-adv-x="1146" >
+<font-face units-per-em="2048" ascent="1638" descent="-410" />
+<missing-glyph horiz-adv-x="450" />
+<glyph horiz-adv-x="2048" />
+<glyph horiz-adv-x="2048" />
+<glyph unicode="&#xd;" horiz-adv-x="681" />
+<glyph unicode=" " horiz-adv-x="450" />
+<glyph unicode="&#x09;" horiz-adv-x="450" />
+<glyph unicode="&#xa0;" horiz-adv-x="450" />
+<glyph unicode="!" horiz-adv-x="573" d="M139 0v330h295v-330h-295zM139 1393h297l-28 -881h-242z" />
+<glyph unicode="&#x22;" horiz-adv-x="841" d="M113 1393h264l-12 -492h-242zM467 1393h264l-14 -492h-242z" />
+<glyph unicode="#" d="M33 305v230h196v258h-196v229h196v330h238v-330h213v330h238v-330h196v-229h-196v-258h196v-230h-196v-305h-238v305h-213v-305h-238v305h-196zM467 535h213v258h-213v-258z" />
+<glyph unicode="$" d="M106 975q0 203 123 302t338 99h27l37 283h151l-37 -295q127 -12 234 -33l35 -8l-23 -217q-150 16 -276 24l-41 -329q213 -68 289.5 -148.5t76.5 -244.5q0 -213 -129 -323t-338 -110h-2l-30 -241q-152 6 -152 14l29 238q-152 18 -254 43l-41 8l27 213q162 -23 299 -31 l45 356q-211 63 -299.5 153.5t-88.5 246.5zM379 993q0 -49 30.5 -79.5t118.5 -63.5l35 285q-184 -9 -184 -142zM602 217q166 18 166 172q0 49 -27.5 81t-99.5 60z" />
+<glyph unicode="%" d="M29 1078q0 298 245.5 298t245.5 -298t-245.5 -298t-245.5 298zM229 1079.5q0 -73.5 9.5 -104.5t36 -31t35.5 31t9 104.5t-9 103t-35.5 29.5t-36 -29.5t-9.5 -103zM256 -16l481 1448l150 -54l-481 -1444zM627 273q0 298 245.5 298t245.5 -298t-245.5 -298t-245.5 298z M827 274.5q0 -73.5 9.5 -104.5t36 -31t36 31t9.5 104.5t-9.5 103.5t-36 30t-36 -30t-9.5 -103.5z" />
+<glyph unicode="&#x26;" horiz-adv-x="1435" d="M72 401q0 166 69.5 261.5t220.5 154.5q-84 102 -109.5 166t-25.5 166q0 143 115 226t310.5 83t304 -85t108.5 -232.5t-61.5 -231.5t-219.5 -194l201 -201q12 31 24.5 119t14.5 143l266 -6q-31 -238 -104 -416l229 -200l-155 -179l-218 179q-72 -78 -183 -128.5 t-236 -50.5q-299 0 -425 107.5t-126 318.5zM350 424q0 -203 238 -203q82 0 159.5 22.5t108.5 59.5l-354 354q-152 -74 -152 -233zM506 1087q0 -82 92 -180l35 -37q84 61 118.5 109.5t34.5 116.5q0 129 -140 128.5t-140 -137.5z" />
+<glyph unicode="'" horiz-adv-x="489" d="M115 1393h264l-14 -492h-242z" />
+<glyph unicode="(" horiz-adv-x="630" d="M78 616.5q0 137.5 24.5 282.5t59.5 254q74 229 129 336l24 47h260q-70 -178 -132 -458.5t-62 -461t49 -398.5t98 -345l47 -129h-260q-29 45 -75.5 151.5t-78.5 203t-57.5 238.5t-25.5 279.5z" />
+<glyph unicode=")" horiz-adv-x="630" d="M55 -256q70 158 132.5 425t62.5 447.5t-48 410.5t-98 370l-49 139h260q29 -51 76 -167t79 -218t57.5 -249.5t25.5 -285t-24.5 -277.5t-59.5 -243q-74 -215 -129 -309l-25 -43h-260z" />
+<glyph unicode="*" horiz-adv-x="870" d="M82 938l215 160l-209 149l94 129l207 -149l80 248l154 -52l-78 -249h252v-152h-252l78 -246l-150 -45l-84 248l-211 -162z" />
+<glyph unicode="+" d="M102 391v246h347v344h245v-344h350v-246h-350v-348h-245v348h-347z" />
+<glyph unicode="," horiz-adv-x="538" d="M41 -252l102 533h303l-184 -533h-221z" />
+<glyph unicode="-" horiz-adv-x="835" d="M115 420v250h606v-250h-606z" />
+<glyph unicode="." horiz-adv-x="524" d="M115 0v340h295v-340h-295z" />
+<glyph unicode="/" horiz-adv-x="954" d="M63 16l590 1454l242 -86l-590 -1454z" />
+<glyph unicode="0" d="M49 668.5q0 371.5 132 539.5t392.5 168t392.5 -168t132 -539.5t-131 -532.5t-393.5 -161t-393.5 161t-131 532.5zM340 674q0 -252 55.5 -352.5t180 -100.5t178 100.5t53.5 353.5t-53.5 354t-179 101t-180 -102t-54.5 -354z" />
+<glyph unicode="1" d="M152 1055l446 297h258v-1352h-283v1032l-292 -188z" />
+<glyph unicode="2" d="M133 0v240l289 292q154 158 214 242t60 179.5t-50 134t-142 38.5q-137 0 -299 -24l-49 -6l-15 219q201 61 416 61q430 0 430 -387q0 -152 -65.5 -262.5t-237.5 -267.5l-235 -213h561v-246h-877z" />
+<glyph unicode="3" d="M117 45l14 215q229 -39 385 -39q211 0 211 180q0 76 -54.5 121t-142.5 45h-272v234h272q68 0 120 57t52 127q0 145 -202 145q-141 0 -301 -28l-54 -8l-18 209q188 74 420.5 73.5t339 -89.5t106.5 -285.5t-157 -301.5q98 -53 140 -110.5t42 -181.5q0 -219 -109.5 -326 t-351.5 -107q-178 0 -375 54z" />
+<glyph unicode="4" d="M82 223v215l334 914h311l-362 -883h290v379h283v-379h129v-246h-129v-223h-283v223h-573z" />
+<glyph unicode="5" d="M102 51l31 209q248 -39 414 -39q100 0 153.5 53.5t53.5 152.5t-45 144t-127 45q-137 0 -242 -26l-31 -8l-168 39l37 731h826v-246h-605l-34 -293q127 49 241 49q438 0 438 -407q0 -229 -120.5 -354.5t-341.5 -125.5q-94 0 -214 18.5t-192 39.5z" />
+<glyph unicode="6" d="M72 690q0 352 145 519t418 167q160 0 342 -45l63 -14l-24 -217q-209 31 -363 30q-291 0 -291 -315l44 12q135 39 215 39q231 0 347.5 -106.5t116.5 -330.5t-131 -339t-379.5 -115t-375.5 181.5t-127 533.5zM360 575q0 -354 230 -354q98 0 151.5 54.5t53.5 152.5 q0 193 -199 193q-96 0 -201 -35z" />
+<glyph unicode="7" d="M141 1100v252h865v-320l-482 -1057l-262 74l461 985v66h-582z" />
+<glyph unicode="8" d="M57 344q0 131 40 204t130 148q-86 70 -116.5 136.5t-30.5 175.5q0 174 133 271t356.5 97t360.5 -98t137 -272q0 -119 -28.5 -178.5t-118.5 -131.5q90 -76 128.5 -143.5t38.5 -185.5q0 -201 -143 -296.5t-375 -95.5q-512 0 -512 369zM360 410q0 -180 212 -180.5t212 180.5 q0 106 -120 153h-181q-123 -47 -123 -153zM383 956q0 -84 100 -153h181q100 70 100 160q-1 159 -191 159q-92 0 -141 -41t-49 -125z" />
+<glyph unicode="9" d="M57 923q0 214 133.5 333.5t378 119.5t373.5 -181t129 -538.5t-143.5 -519.5t-419.5 -162q-160 0 -342 45l-64 15l25 217q209 -31 381 -31q272 0 272 332l-43 -14q-141 -47 -215 -47q-223 0 -344 108.5t-121 322.5zM348 924q0 -187 199 -187q94 0 203 37l32 10 q0 346 -229 346q-98 0 -151.5 -54t-53.5 -152z" />
+<glyph unicode=":" horiz-adv-x="524" d="M115 0v340h295v-340h-295zM115 592v340h295v-340h-295z" />
+<glyph unicode=";" horiz-adv-x="571" d="M55 -252l103 533h303l-185 -533h-221zM141 592v340h295v-340h-295z" />
+<glyph unicode="&#x3c;" d="M135 401v226l832 374v-278l-535 -203l535 -221v-279z" />
+<glyph unicode="=" d="M119 178v248h909v-248h-909zM119 604v248h909v-248h-909z" />
+<glyph unicode="&#x3e;" d="M180 20v279l535 221l-535 203v278l832 -374v-226z" />
+<glyph unicode="?" horiz-adv-x="894" d="M61 1346q176 72 373 71.5t296 -80.5t99 -239.5t-31.5 -232t-134 -149.5t-129 -118t-26.5 -90v-64h-219q-63 70 -64 187q0 74 130 178t160 144t30 98q0 121 -174 120q-123 0 -252 -24l-43 -8zM244 0v330h295v-330h-295z" />
+<glyph unicode="@" horiz-adv-x="1992" d="M78 535q0 473 256 715.5t700.5 242.5t671.5 -222t227 -646v-17q0 -315 -99 -461.5t-296 -146.5q-145 0 -238 74q-20 16 -34 41q-164 -115 -303 -115q-193 0 -288 120t-95 387t89 392t302 125q72 0 155 -37l31 -14v26h275v-366q0 -283 11 -324t24.5 -57t27.5 -19.5 t39 -3.5q66 0 95.5 80t29.5 299v19q0 328 -150.5 476t-479.5 148t-503 -188.5t-174 -547.5t156 -530t522 -171l293 18l10 -240q-184 -20 -303 -20q-236 0 -405.5 47t-296.5 156q-250 219 -250 760zM858 514q0 -272 127 -272q78 0 184 51q-12 74 -12 217v252q-86 20 -125 20 q-106 0 -140 -59t-34 -209z" />
+<glyph unicode="A" horiz-adv-x="1232" d="M35 0l313 1393h537l313 -1393h-283l-55 252h-487l-56 -252h-282zM426 498h381l-141 661h-99z" />
+<glyph unicode="B" horiz-adv-x="1247" d="M152 0v1393h546q217 0 326 -87t109 -282q0 -117 -35 -185.5t-119 -121.5q92 -39 136 -113t44 -205q0 -203 -118.5 -301t-333.5 -98h-555zM434 242h258q92 0 136 36.5t44 135.5q0 168 -180 168h-258v-340zM434 819h252q160 0 160 166t-162 166h-250v-332z" />
+<glyph unicode="C" horiz-adv-x="1112" d="M96 696q0 403 114 562t419 159q176 0 407 -55l-8 -225q-200 31 -333 31h-4q-134 0 -191.5 -36t-85 -136.5t-27.5 -342t56.5 -335t225.5 -93.5t359 29l6 -231q-217 -47 -391 -47q-2 0 -4 -1q-171 0 -275 43t-163.5 137.5t-82 221.5t-22.5 319z" />
+<glyph unicode="D" horiz-adv-x="1306" d="M152 0v1393h469q180 0 296.5 -38t181 -125t89 -205t24.5 -306.5t-22.5 -312t-85 -221t-181 -141.5t-302.5 -44h-469zM434 246h187q154 0 223 78q60 63 74 229q4 66 4 181.5t-8.5 185t-39 127t-91 79t-162.5 21.5h-187v-901z" />
+<glyph unicode="E" horiz-adv-x="1134" d="M152 0v1393h901v-246h-619v-326h496v-241h-496v-334h619v-246h-901z" />
+<glyph unicode="F" horiz-adv-x="1087" d="M152 0v1393h888v-246h-606v-410h496v-245h-496v-492h-282z" />
+<glyph unicode="G" horiz-adv-x="1251" d="M92 702.5q0 378.5 127 546.5t432 168q190 0 412 -43l74 -14l-9 -219q-242 27 -397 27h-5q-157 -1 -220.5 -37.5t-93 -136t-29.5 -340t59.5 -337t245.5 -96.5l170 8v271h-127v245h406v-722q-293 -47 -475 -48q-326 0 -448 174.5t-122 553z" />
+<glyph unicode="H" horiz-adv-x="1386" d="M152 0v1393h282v-570h518v570h283v-1393h-283v578h-518v-578h-282z" />
+<glyph unicode="I" horiz-adv-x="585" d="M152 0v1393h282v-1393h-282z" />
+<glyph unicode="J" horiz-adv-x="618" d="M39 102q82 0 119 31t37 115v1145h280l2 -1157q0 -223 -99 -301t-339 -78v245z" />
+<glyph unicode="K" horiz-adv-x="1214" d="M152 0v1393h282v-613l189 21l229 592h322l-304 -699l312 -694h-326l-233 555l-189 -20v-535h-282z" />
+<glyph unicode="L" horiz-adv-x="966" d="M152 0v1393h282v-1143h510v-250h-792z" />
+<glyph unicode="M" horiz-adv-x="1757" d="M152 0v1393h481l246 -1016l245 1016h482v-1393h-283v1077h-31l-272 -1016h-283l-272 1016h-31v-1077h-282z" />
+<glyph unicode="N" horiz-adv-x="1419" d="M152 0v1393h477l336 -1147h20v1147h283v-1393h-465l-348 1147h-21v-1147h-282z" />
+<glyph unicode="O" horiz-adv-x="1335" d="M90 690.5q0 368.5 130 547.5t447.5 179t447.5 -179t130 -547.5t-130 -542t-447.5 -173.5t-447.5 173.5t-130 542zM381 689q0 -253 60.5 -360.5t226.5 -107.5t226 107.5t60 360.5t-61.5 367.5t-225 114.5t-225 -114.5t-61.5 -367.5z" />
+<glyph unicode="P" horiz-adv-x="1206" d="M152 0v1393h512q495 0 495 -482q0 -246 -125.5 -375.5t-369.5 -129.5h-230v-406h-282zM434 647h228q210 0 210 260q0 131 -51 187.5t-159 56.5h-228v-504z" />
+<glyph unicode="Q" horiz-adv-x="1335" d="M90 689q0 370 130 549t447.5 179t447.5 -179t130 -550q0 -455 -215 -612l170 -275l-258 -120l-184 301q-20 -7 -90 -7q-319 0 -448.5 172t-129.5 542zM381 688q0 -254 60.5 -360.5t226.5 -106.5t226 106.5t60 360.5t-61.5 368.5t-225 114.5t-225 -114.5t-61.5 -368.5z " />
+<glyph unicode="R" horiz-adv-x="1269" d="M152 0v1393h540q492 0 492 -459q0 -272 -205 -402l199 -532h-310l-161 467h-273v-467h-282zM434 709h262q101 0 150 61t49 161.5t-52 160t-151 59.5h-258v-442z" />
+<glyph unicode="S" horiz-adv-x="1114" d="M76 1004q0 209 127 311t348 102q152 0 385 -41l74 -14l-23 -223q-288 32 -407 32q-223 0 -224 -147q0 -66 55.5 -100.5t259 -100t285.5 -148.5t82 -255q0 -219 -133 -332t-348 -113q-160 0 -391 50l-74 14l29 219q274 -37 420 -37q217 0 217 180q0 66 -50.5 103 t-199.5 80q-238 68 -335 161t-97 259z" />
+<glyph unicode="T" horiz-adv-x="1077" d="M27 1143v250h1024v-250h-369v-1143h-283v1143h-372z" />
+<glyph unicode="U" horiz-adv-x="1339" d="M139 471v922h283v-928q0 -244 248 -244t248 244v928h282v-922q0 -256 -132 -376t-398.5 -120t-398.5 120t-132 376z" />
+<glyph unicode="V" horiz-adv-x="1234" d="M33 1393h297l241 -1147h93l241 1147h297l-323 -1393h-523z" />
+<glyph unicode="W" horiz-adv-x="1904" d="M39 1393h297l172 -1151h31l249 1151h328l250 -1151h31l172 1151h297l-267 -1393h-428l-219 1059l-219 -1059h-428z" />
+<glyph unicode="X" horiz-adv-x="1165" d="M18 0l402 668l-402 725h314l258 -512l264 512h293l-402 -711l402 -682h-313l-259 481l-264 -481h-293z" />
+<glyph unicode="Y" horiz-adv-x="1140" d="M0 1393h313l256 -555l256 555h314l-426 -830v-563h-283v563z" />
+<glyph unicode="Z" horiz-adv-x="1089" d="M84 0v244l582 866v37h-582v246h922v-246l-582 -864v-37h582v-246h-922z" />
+<glyph unicode="[" horiz-adv-x="727" d="M139 -252v1786h516v-246h-235v-1294h235v-246h-516z" />
+<glyph unicode="\" horiz-adv-x="1019" d="M66 1360l233 106l655 -1439l-237 -101z" />
+<glyph unicode="]" horiz-adv-x="727" d="M72 -6h235v1294h-235v246h516v-1786h-516v246z" />
+<glyph unicode="^" d="M43 641l397 711h234l397 -711h-287l-223 444l-231 -444h-287z" />
+<glyph unicode="_" horiz-adv-x="1269" d="M197 -150h876v-233h-876v233z" />
+<glyph unicode="`" horiz-adv-x="548" d="M-35 1307l82 235l516 -209l-61 -178z" />
+<glyph unicode="a" horiz-adv-x="1046" d="M59 311q0 164 88.5 232.5t270.5 81.5l219 16v64q0 63 -28.5 86.5t-92.5 23.5l-385 -16l-8 190q219 59 417 59q1 0 2 1q196 0 282 -82q87 -82 87 -262v-426q4 -49 16.5 -69t51.5 -28l-8 -207q-104 0 -167 14.5t-126 57.5q-147 -72 -301 -72q-317 0 -318 336zM336 311.5 q0 -112.5 100 -112.5q78 0 170 24l31 8v220l-186 -17q-115 -10 -115 -122.5z" />
+<glyph unicode="b" horiz-adv-x="1114" d="M127 4v1430h274v-441q132 56 222 56q215 0 314 -118t99 -421t-114.5 -419t-395.5 -116q-88 0 -321 21zM401 229q94 -8 125 -8q137 0 184.5 66.5t47.5 238.5q0 276 -172 277q-82 0 -156 -21l-29 -6v-547z" />
+<glyph unicode="c" horiz-adv-x="913" d="M78 514q0 283 102.5 409t329.5 126q106 0 272 -33l56 -12l-9 -218q-162 16 -239 17q-141 0 -187.5 -60.5t-46.5 -228.5t46.5 -230.5t189.5 -62.5l237 17l9 -220q-219 -43 -334 -43q-227 0 -326.5 128t-99.5 411z" />
+<glyph unicode="d" horiz-adv-x="1124" d="M78 513q0 280 105.5 408t318.5 128q66 0 182 -21l39 -8v414h274v-1434h-272v43q-143 -68 -248 -68q-223 0 -311 129t-88 409zM356 516q0 -160 37 -227.5t122 -67.5t179 25l29 6v539q-113 20 -201 20q-166 0 -166 -295z" />
+<glyph unicode="e" horiz-adv-x="1044" d="M76 498q0 551 452 551q446 0 447 -463l-21 -191h-602q2 -94 50.5 -136t138.5 -42q190 0 340 12l57 7l4 -203q-236 -57 -426 -58q-231 0 -335.5 123t-104.5 400zM350 604h355q0 123 -39 171t-136.5 48t-137.5 -50t-42 -169z" />
+<glyph unicode="f" horiz-adv-x="731" d="M66 791v233h110v45q0 221 65.5 305t233.5 84q74 0 191 -20l43 -6l-4 -224q-90 4 -151.5 4t-82 -32.5t-20.5 -112.5v-43h247v-233h-247v-791h-275v791h-110z" />
+<glyph unicode="g" horiz-adv-x="1093" d="M76 -186q0 129 147 243q-76 51 -76 156q0 41 62 135l18 29q-139 100 -139 295.5t118 283.5t312 88q88 0 174 -20l33 -6l330 10v-219l-154 12q45 -70 45 -139q0 -205 -104.5 -282.5t-327.5 -77.5q-47 0 -84 8q-20 -53 -20 -87t34.5 -46.5t163.5 -14.5q258 -2 352.5 -68.5 t94.5 -241.5t-135.5 -259t-365.5 -84t-354 61.5t-124 223.5zM346 -158q0 -88 216 -88t216 103q0 55 -36.5 70.5t-155.5 17.5l-185 14q-55 -56 -55 -117zM362 680.5q0 -150.5 157 -150.5t157 150.5t-157 150.5t-157 -150.5z" />
+<glyph unicode="h" horiz-adv-x="1132" d="M127 0v1434h274v-459q141 74 254 74q205 0 283 -121t78 -373v-555h-275v549q0 129 -30.5 191.5t-122.5 62.5q-80 0 -160 -25l-27 -8v-770h-274z" />
+<glyph unicode="i" horiz-adv-x="528" d="M127 0v1024h274v-1024h-274zM127 1155v279h274v-279h-274z" />
+<glyph unicode="j" horiz-adv-x="530" d="M-70 -268q92 61 129 96t53.5 83t16.5 138v975h274v-977q0 -209 -72.5 -308t-291.5 -210zM129 1155v279h274v-279h-274z" />
+<glyph unicode="k" horiz-adv-x="1054" d="M127 0v1434h274v-816l105 19l203 387h307l-266 -485l280 -539h-309l-207 399l-113 -18v-381h-274z" />
+<glyph unicode="l" horiz-adv-x="552" d="M139 0v1434h275v-1434h-275z" />
+<glyph unicode="m" horiz-adv-x="1718" d="M127 0v1024h272v-57q141 82 242 82q166 0 256 -97q188 96 344 97q203 0 282 -118t79 -376v-555h-275v547q0 131 -28.5 193.5t-114.5 62.5q-66 0 -160 -29l-31 -10q8 -154 8 -234v-530h-274v526q0 152 -26.5 214.5t-116.5 62.5q-80 0 -158 -29l-25 -8v-766h-274z" />
+<glyph unicode="n" horiz-adv-x="1132" d="M127 0v1024h272v-57q139 82 256 82q205 0 283 -121t78 -373v-555h-275v547q0 131 -30.5 193.5t-122.5 62.5q-84 0 -162 -29l-25 -8v-766h-274z" />
+<glyph unicode="o" horiz-adv-x="1089" d="M74 514q0 254 108.5 394.5t362.5 140.5t362.5 -140.5t108.5 -394.5q0 -539 -471 -539t-471 539zM352 514q0 -158 42 -231.5t150.5 -73.5t150.5 73.5t42 231.5t-42 229.5t-150.5 71.5t-150.5 -71.5t-42 -229.5z" />
+<glyph unicode="p" horiz-adv-x="1114" d="M127 -430v1454h272v-55q133 80 234 80q207 0 305 -124t98 -421t-108.5 -413t-356.5 -116q-68 0 -145 13l-25 4v-422h-274zM401 225q92 -12 150 -12q119 0 163 69.5t44 237.5q0 283 -178 283q-76 0 -154 -31l-25 -10v-537z" />
+<glyph unicode="q" horiz-adv-x="1112" d="M78 515q0 304 113.5 419t394.5 115q125 0 325 -21l74 -6v-1452h-274v461q-132 -56 -222 -56q-215 0 -313 118t-98 422zM352 498q0 -276 174 -277q82 0 158 21l27 6v555q-76 8 -125 8q-137 0 -185.5 -70.5t-48.5 -242.5z" />
+<glyph unicode="r" horiz-adv-x="761" d="M127 0v1024h272v-109q172 102 328 134v-277q-166 -35 -285 -72l-41 -14v-686h-274z" />
+<glyph unicode="s" horiz-adv-x="966" d="M74 718q0 163 110.5 246t284.5 83q121 0 330 -39l67 -13l-4 -227q-254 33 -355 33t-131 -18.5t-30 -58.5t40 -55.5t205 -45t234.5 -97t69.5 -219.5q0 -332 -412 -332q-135 0 -327 37l-66 13l8 229q254 -33 353.5 -33t135.5 19.5t36 58.5t-38 57.5t-197 45t-236.5 90 t-77.5 226.5z" />
+<glyph unicode="t" horiz-adv-x="745" d="M47 791v233h121v285h274v-285h252v-233h-252v-420q0 -61 3.5 -87t22.5 -44.5t60 -18.5l156 4l12 -219q-137 -31 -209 -31q-184 0 -251.5 83t-67.5 307v426h-121z" />
+<glyph unicode="u" horiz-adv-x="1132" d="M117 487v537h274v-541q0 -152 24.5 -207t119.5 -55q90 0 170 29l26 8v766h275v-1024h-273v57q-147 -82 -256 -82q-213 0 -286.5 118t-73.5 394z" />
+<glyph unicode="v" horiz-adv-x="1019" d="M31 1024h286l164 -791h58l172 791h278l-246 -1024h-467z" />
+<glyph unicode="w" horiz-adv-x="1581" d="M49 1024h270l125 -791h50l155 771h283l155 -771h50l125 791h270l-195 -1024h-430l-116 627l-117 -627h-430z" />
+<glyph unicode="x" horiz-adv-x="970" d="M29 0l280 514l-280 510h293l163 -317l166 317h293l-291 -502l291 -522h-293l-166 313l-163 -313h-293z" />
+<glyph unicode="y" horiz-adv-x="1024" d="M33 1024h270l186 -791h48l186 791h270l-360 -1454h-268l112 430h-192z" />
+<glyph unicode="z" horiz-adv-x="929" d="M84 0v246l430 532h-430v246h760v-246l-430 -532h430v-246h-760z" />
+<glyph unicode="{" horiz-adv-x="739" d="M33 535v213q229 53 229 192l-14 260q0 195 93 272.5t325 86.5v-234q-88 -8 -120 -42.5t-32 -102.5l14 -262q0 -129 -42 -184.5t-187 -90.5q143 -35 187 -97.5t44 -193.5l-14 -239q0 -70 29.5 -109t116.5 -45v-233q-227 8 -320.5 88t-93.5 264l14 248q0 150 -229 209z" />
+<glyph unicode="|" horiz-adv-x="548" d="M137 -430v1864h275v-1864h-275z" />
+<glyph unicode="}" horiz-adv-x="739" d="M74 1325v234q231 -8 324.5 -86t93.5 -273l-15 -260q0 -139 230 -192v-213q-229 -59 -230 -209l15 -248q0 -184 -93.5 -264t-320.5 -88v233q86 6 115.5 45t29.5 109l-14 239q0 131 44 193.5t187 97.5q-145 35 -187 90t-42 185l14 262q0 68 -31.5 102.5t-119.5 42.5z" />
+<glyph unicode="~" d="M125 578q129 106 252 106q57 0 212.5 -45t196.5 -45q76 0 181 57l34 21l17 -219q-39 -39 -107.5 -72t-126 -33t-219.5 45t-200.5 45t-95 -20.5t-89.5 -40.5l-35 -19z" />
+<glyph unicode="&#xa1;" horiz-adv-x="540" d="M121 -369l29 881h241l27 -881h-297zM123 694v330h295v-330h-295z" />
+<glyph unicode="&#xa2;" d="M180 509q0 423 373 454v206h225v-215l162 -26l-8 -205q-162 6 -265.5 6t-155.5 -50t-52 -167t53 -168t182 -51l238 8l8 -205q-80 -20 -162 -26v-224h-225v213q-373 27 -373 450z" />
+<glyph unicode="&#xa3;" d="M154 0v233h151v420h-131v234h131v121q0 213 82 289.5t258 76.5q137 0 268 -37l45 -12l-8 -213q-139 16 -268 16q-106 0 -107 -133v-108h314v-234h-314v-420h254l142 33l43 -229l-166 -37h-694z" />
+<glyph unicode="&#xa4;" d="M61 193l148 147q-39 84 -39 175t39 175l-148 150l189 188l147 -149q82 41 175.5 41t175.5 -41l149 149l188 -188l-149 -150q41 -82 41 -175t-41 -175l149 -147l-188 -189l-149 150q-82 -41 -174.5 -41t-174.5 41l-149 -150zM397 516q0 -72 52.5 -124t124 -52t124 52 t52.5 124t-52.5 124t-124 52t-124 -52t-52.5 -124z" />
+<glyph unicode="&#xa5;" d="M10 1352h314l251 -432l250 432h314l-293 -527h182v-229h-309v-92h309v-230h-309v-274h-283v274h-317v230h317v92h-317v229h188z" />
+<glyph unicode="&#xa6;" horiz-adv-x="557" d="M141 348h275v-778h-275v778zM141 672v762h275v-762h-275z" />
+<glyph unicode="&#xa7;" horiz-adv-x="1058" d="M76 436q0 72 41 153t90 122q-90 66 -90 221q0 375 444 375q131 0 303 -37l58 -13l-13 -221q-231 33 -339.5 33t-147.5 -28.5t-39 -104.5q0 -45 55.5 -68.5t231.5 -66.5t239.5 -102.5t63.5 -202t-103 -287.5q41 -39 59.5 -84t18.5 -139q0 -199 -105.5 -287t-338.5 -88 q-115 0 -318 37l-63 10l27 221q221 -31 330.5 -31t157.5 28t48 86t-51 83t-235.5 71t-254 110.5t-69.5 209.5zM352 496.5q0 -68.5 23.5 -91t104.5 -45t177 -55.5q37 47 37 150q0 51 -32.5 76.5t-91 41t-109.5 27.5t-74 18q-35 -53 -35 -121.5z" />
+<glyph unicode="&#xa8;" horiz-adv-x="548" d="M-61 1221v270h262v-270h-262zM381 1221v270h262v-270h-262z" />
+<glyph unicode="&#xa9;" horiz-adv-x="1316" d="M94 892q0 249 160 413.5t408.5 164.5t404.5 -168.5t156 -416.5t-156 -413t-403.5 -165t-408.5 168t-161 417zM221 888.5q0 -190.5 125 -324.5t312.5 -134t312.5 133t125 323.5t-126 326t-311.5 135.5t-311.5 -134.5t-126 -325zM414 889.5q0 191.5 62.5 263.5t207.5 72 q80 0 143 -25l21 -6l-14 -176q-72 12 -125.5 12t-68.5 -28.5t-15 -102.5q0 -154 71 -154l138 11l14 -168q-57 -37 -185 -37t-188.5 73.5t-60.5 265z" />
+<glyph unicode="&#xaa;" horiz-adv-x="851" d="M86 868q0 195 260 207l137 6v45q0 31 -90 31l-268 -14l-6 153q143 53 294.5 53.5t228.5 -50t77 -185.5v-289q16 -12 37 -16l-4 -168q-139 0 -187.5 15.5t-72.5 52.5q-86 -66 -188.5 -66t-160 60.5t-57.5 164.5zM322 877q0 -54 63 -54q37 0 98 33v82l-96 -6 q-66 -6 -65 -55z" />
+<glyph unicode="&#xab;" horiz-adv-x="1230" d="M82 397v197l457 336v-277l-224 -153l224 -176v-277zM662 397v197l456 336v-277l-223 -153l223 -176v-277z" />
+<glyph unicode="&#xac;" d="M117 487v246h893v-520h-246v274h-647z" />
+<glyph unicode="&#xad;" horiz-adv-x="835" d="M115 420v250h606v-250h-606z" />
+<glyph unicode="&#xae;" horiz-adv-x="1316" d="M94 891q0 250 160 414.5t407.5 164.5t404.5 -168.5t157 -416.5t-155 -413t-403.5 -165t-409.5 167t-161 417zM221 888.5q0 -188.5 127 -323.5t312.5 -135t310.5 134t125 323.5t-126 325t-311.5 135.5t-311.5 -135.5t-126 -324zM412 565v645h278q106 0 170 -52t64 -147.5 t-16.5 -139.5t-61.5 -80l84 -226h-205l-57 191h-60v-191h-196zM606 901h58q70 0 69.5 81t-71.5 81h-56v-162z" />
+<glyph unicode="&#xaf;" horiz-adv-x="548" d="M-10 1223v204h588v-204h-588z" />
+<glyph unicode="&#xb0;" d="M266 1110q0 137 85 222t222.5 85t222.5 -85t85 -222t-85 -221t-222.5 -84t-222.5 84t-85 221zM420 1110q0 -70 42 -113t111.5 -43t113.5 43t44 113t-44 114t-113.5 44t-111.5 -44t-42 -114z" />
+<glyph unicode="&#xb1;" d="M102 39v246h942v-246h-942zM102 553v246h347v221h245v-221h350v-246h-350v-205h-245v205h-347z" />
+<glyph unicode="&#xb2;" horiz-adv-x="573" d="M43 979v184l150 121q94 76 94 117q0 31 -76 31l-156 -13l-8 203q150 18 258.5 18t159.5 -47t51 -136t-26.5 -135t-88.5 -91l-77 -57h192v-195h-473z" />
+<glyph unicode="&#xb3;" horiz-adv-x="573" d="M41 973l12 190q125 -12 188.5 -12t63.5 33q0 29 -53 28h-135v174h131q41 0 41 30t-56 30l-172 -10l-12 186q139 18 221 18q248 0 248 -182q0 -109 -59 -143q72 -31 71 -144q0 -215 -241 -215z" />
+<glyph unicode="&#xb4;" horiz-adv-x="548" d="M10 1333l516 209l82 -235l-536 -152z" />
+<glyph unicode="&#xb5;" d="M129 -430v1454h274v-592q2 -119 29 -165t115 -46q90 0 170 29l26 8v766h275v-1024h-273v57q-147 -82 -256 -82q-47 0 -86 7v-412h-274z" />
+<glyph unicode="&#xb6;" horiz-adv-x="1226" d="M57 987q0 178 106.5 292t278.5 114h678v-234h-73v-1159h-234v1159h-127v-1159h-233v586h-15q-172 0 -276.5 111.5t-104.5 289.5z" />
+<glyph unicode="&#xb7;" horiz-adv-x="524" d="M115 342v340h295v-340h-295z" />
+<glyph unicode="&#xb8;" horiz-adv-x="540" d="M61 -471l9 160q63 -2 98 -2q78 0 78 53q0 45 -78 45h-49v217h108v-78q131 -2 191.5 -39t60.5 -149.5t-59.5 -171t-167.5 -58.5q-90 0 -162 17z" />
+<glyph unicode="&#xb9;" horiz-adv-x="573" d="M20 1464l218 154h196v-639h-217v399l-96 -65z" />
+<glyph unicode="&#xba;" horiz-adv-x="860" d="M82 996.5q0 353.5 350 353.5q346 0 346 -353.5t-346 -353.5q-350 0 -350 353.5zM328 999.5q0 -73.5 22.5 -107.5t82 -34t78.5 33t19 108.5t-19 106.5t-78.5 31t-82 -32t-22.5 -105.5z" />
+<glyph unicode="&#xbb;" horiz-adv-x="1234" d="M113 47v277l223 176l-223 153v277l456 -336v-197zM692 47v277l223 176l-223 153v277l457 -336v-197z" />
+<glyph unicode="&#xbc;" horiz-adv-x="1122" d="M37 1464l217 154h197v-639h-218v399l-96 -65zM59 59l805 1295l109 -72l-805 -1296zM567 47l80 387h242l-107 -373h56l28 185h187v-185h22v-194h-22v-72h-215v72h-271v180z" />
+<glyph unicode="&#xbd;" horiz-adv-x="1110" d="M37 1464l217 154h197v-639h-218v399l-96 -65zM59 59l805 1295l109 -72l-805 -1296zM575 -20l150 120q94 76 94 117q0 31 -76 31l-155 -12l-8 202q150 18 258 18.5t159.5 -47t51.5 -136.5t-27 -135t-88 -91l-78 -57h193v-195h-474v185z" />
+<glyph unicode="&#xbe;" horiz-adv-x="1148" d="M74 973l12 190q125 -12 188.5 -12t63.5 33q0 29 -53 28h-135v174h131q41 0 41 30t-56 30l-172 -10l-12 186q139 18 221 18q248 0 248 -182q0 -109 -59 -143q72 -31 71 -144q0 -215 -241 -215zM88 59l805 1295l108 -72l-804 -1296zM596 47l80 387h242l-107 -373h55l29 185 h186v-185h23v-194h-23v-72h-215v72h-270v180z" />
+<glyph unicode="&#xbf;" horiz-adv-x="886" d="M59 -73.5q0 159.5 32 232t134.5 149.5t129 118t26.5 90v64h219q63 -70 64 -187q0 -74 -130.5 -178t-160 -144t-29.5 -98q0 -121 174 -120q123 0 252 24l43 8l14 -207q-176 -72 -372.5 -71.5t-296 80.5t-99.5 239.5zM350 694v330h295v-330h-295z" />
+<glyph unicode="&#xc0;" horiz-adv-x="1232" d="M35 0l313 1393h537l313 -1393h-283l-55 252h-487l-56 -252h-282zM291 1690l84 245l516 -217l-68 -190zM426 498h381l-141 661h-99z" />
+<glyph unicode="&#xc1;" horiz-adv-x="1232" d="M35 0l313 1393h537l313 -1393h-283l-55 252h-487l-56 -252h-282zM332 1718l516 217l84 -245l-533 -162zM426 498h381l-141 661h-99z" />
+<glyph unicode="&#xc2;" horiz-adv-x="1232" d="M35 0l313 1393h537l313 -1393h-283l-55 252h-487l-56 -252h-282zM219 1567l275 305h239l275 -305h-291l-101 114l-106 -114h-291zM426 498h381l-141 661h-99z" />
+<glyph unicode="&#xc3;" horiz-adv-x="1232" d="M35 0l313 1393h537l313 -1393h-283l-55 252h-487l-56 -252h-282zM207 1757q41 49 105.5 90t125 41t185.5 -47t147 -47q47 0 135 66l31 20l59 -199q-43 -49 -106.5 -89t-116.5 -40t-183 47.5t-157 47.5q-51 0 -137 -66l-29 -20zM426 498h381l-141 661h-99z" />
+<glyph unicode="&#xc4;" horiz-adv-x="1232" d="M35 0l313 1393h537l313 -1393h-283l-55 252h-487l-56 -252h-282zM264 1565v270h262v-270h-262zM426 498h381l-141 661h-99zM702 1565v270h263v-270h-263z" />
+<glyph unicode="&#xc5;" horiz-adv-x="1232" d="M35 0l305 1356q-31 53 -31 121q0 121 88 189.5t219.5 68.5t219.5 -68.5t88 -189.5q0 -63 -31 -121l305 -1356h-283l-55 252h-487l-56 -252h-282zM426 498h381l-141 661h-99zM496 1478q0 -38 28.5 -60.5t79.5 -24.5h12q55 0 88 22.5t33 61.5t-32.5 61.5t-88 22.5 t-88 -22.5t-32.5 -60.5z" />
+<glyph unicode="&#xc6;" horiz-adv-x="1783" d="M25 0l376 1413h1299v-270h-619v-293h496v-268h-496v-312h619v-270h-897v238h-436l-60 -238h-282zM436 510h367l2 633h-205z" />
+<glyph unicode="&#xc7;" horiz-adv-x="1112" d="M96 720q0 380 114 538.5t419 158.5q176 0 407 -55l-8 -225q-203 31 -337 30.5t-191.5 -36t-85 -136t-27.5 -342t56.5 -335t225.5 -93.5t359 29l6 -231q-193 -43 -389 -48v-51q131 -2 191.5 -39t60.5 -149.5t-59.5 -171t-167.5 -58.5q-88 0 -162 17l-29 6l8 160 q63 -2 99 -2q78 0 78 53q0 45 -78 45h-49v195q-254 25 -347.5 192.5t-93.5 547.5z" />
+<glyph unicode="&#xc8;" horiz-adv-x="1134" d="M152 0v1393h901v-246h-619v-326h496v-241h-496v-334h619v-246h-901zM285 1690l84 245l516 -217l-68 -190z" />
+<glyph unicode="&#xc9;" horiz-adv-x="1134" d="M152 0v1393h901v-246h-619v-326h496v-241h-496v-334h619v-246h-901zM315 1718l516 217l84 -245l-532 -162z" />
+<glyph unicode="&#xca;" horiz-adv-x="1134" d="M152 0v1393h901v-246h-619v-326h496v-241h-496v-334h619v-246h-901zM215 1567l274 305h240l275 -305h-291l-101 114l-106 -114h-291z" />
+<glyph unicode="&#xcb;" horiz-adv-x="1134" d="M152 0v1393h901v-246h-619v-326h496v-241h-496v-334h619v-246h-901zM252 1565v270h262v-270h-262zM690 1565v270h262v-270h-262z" />
+<glyph unicode="&#xcc;" horiz-adv-x="585" d="M-49 1690l84 245l516 -217l-68 -190zM152 0v1393h282v-1393h-282z" />
+<glyph unicode="&#xcd;" horiz-adv-x="585" d="M14 1718l516 217l84 -245l-532 -162zM152 0v1393h282v-1393h-282z" />
+<glyph unicode="&#xce;" horiz-adv-x="585" d="M-102 1567l274 305h240l274 -305h-291l-100 114l-107 -114h-290zM152 0v1393h282v-1393h-282z" />
+<glyph unicode="&#xcf;" horiz-adv-x="585" d="M-57 1565v270h262v-270h-262zM152 0v1393h282v-1393h-282zM381 1565v270h262v-270h-262z" />
+<glyph unicode="&#xd0;" horiz-adv-x="1314" d="M51 567v271h111v575h465q180 0 296.5 -39t181 -128t89.5 -208.5t25 -309t-22.5 -314.5t-85 -224.5t-181.5 -144.5t-303 -45h-465v567h-111zM440 268h187q154 0 225 78q76 84 76 379q0 88 -3 139t-13.5 102.5t-31 81t-53.5 54.5q-63 43 -200 43h-187v-307h267v-271h-267 v-299z" />
+<glyph unicode="&#xd1;" horiz-adv-x="1419" d="M152 0v1393h477l336 -1147h20v1147h283v-1393h-465l-348 1147h-21v-1147h-282zM305 1757q41 49 105.5 90t125 41t185.5 -47t147 -47q47 0 136 66l30 20l60 -199q-43 -49 -106.5 -89t-117 -40t-183.5 47.5t-157 47.5q-51 0 -137 -66l-28 -20z" />
+<glyph unicode="&#xd2;" horiz-adv-x="1335" d="M90 690.5q0 368.5 130 547.5t447.5 179t447.5 -179t130 -547.5t-130 -542t-447.5 -173.5t-447.5 173.5t-130 542zM334 1690l84 245l516 -217l-68 -190zM381 689q0 -253 60.5 -360.5t226.5 -107.5t226 107.5t60 360.5t-61.5 367.5t-225 114.5t-225 -114.5t-61.5 -367.5z " />
+<glyph unicode="&#xd3;" horiz-adv-x="1335" d="M90 690.5q0 368.5 130 547.5t447.5 179t447.5 -179t130 -547.5t-130 -542t-447.5 -173.5t-447.5 173.5t-130 542zM342 1718l516 217l84 -245l-532 -162zM381 689q0 -253 60.5 -360.5t226.5 -107.5t226 107.5t60 360.5t-61.5 367.5t-225 114.5t-225 -114.5t-61.5 -367.5z " />
+<glyph unicode="&#xd4;" horiz-adv-x="1335" d="M90 690.5q0 368.5 130 547.5t447.5 179t447.5 -179t130 -547.5t-130 -542t-447.5 -173.5t-447.5 173.5t-130 542zM276 1567l275 305h240l274 -305h-291l-100 114l-107 -114h-291zM381 689q0 -253 60.5 -360.5t226.5 -107.5t226 107.5t60 360.5t-61.5 367.5t-225 114.5 t-225 -114.5t-61.5 -367.5z" />
+<glyph unicode="&#xd5;" horiz-adv-x="1335" d="M90 690.5q0 368.5 130 547.5t447.5 179t447.5 -179t130 -547.5t-130 -542t-447.5 -173.5t-447.5 173.5t-130 542zM272 1757q41 49 105.5 90t125 41t185.5 -47t148 -47q47 0 135 66l30 20l60 -199q-43 -49 -106.5 -89t-117 -40t-183.5 47.5t-156 47.5q-51 0 -138 -66 l-28 -20zM381 689q0 -253 60.5 -360.5t226.5 -107.5t226 107.5t60 360.5t-61.5 367.5t-225 114.5t-225 -114.5t-61.5 -367.5z" />
+<glyph unicode="&#xd6;" horiz-adv-x="1335" d="M90 690.5q0 368.5 130 547.5t447.5 179t447.5 -179t130 -547.5t-130 -542t-447.5 -173.5t-447.5 173.5t-130 542zM317 1565v270h263v-270h-263zM381 689q0 -253 60.5 -360.5t226.5 -107.5t226 107.5t60 360.5t-61.5 367.5t-225 114.5t-225 -114.5t-61.5 -367.5zM756 1565 v270h262v-270h-262z" />
+<glyph unicode="&#xd7;" d="M115 227l291 285l-289 283l174 174l282 -289l287 293l172 -174l-293 -287l293 -285l-174 -174l-285 291l-284 -289z" />
+<glyph unicode="&#xd8;" horiz-adv-x="1335" d="M90 688q0 371 130 550t448 179q119 0 206 -24l125 266l205 -88l-133 -287q174 -168 174 -596q0 -367 -130 -540t-447 -173q-100 0 -197 21l-119 -256l-200 100l118 254q-180 160 -180 594zM381 720q0 -222 31 -323l354 760q-49 14 -98 14q-164 0 -225.5 -114.5 t-61.5 -336.5zM580 229q35 -8 88 -8q166 0 226 107.5t60 324.5t-28 320z" />
+<glyph unicode="&#xd9;" horiz-adv-x="1339" d="M139 471v922h283v-928q0 -244 248 -244t248 244v928h282v-922q0 -256 -132 -376t-398.5 -120t-398.5 120t-132 376zM358 1690l84 245l516 -217l-67 -190z" />
+<glyph unicode="&#xda;" horiz-adv-x="1339" d="M139 471v922h283v-928q0 -244 248 -244t248 244v928h282v-922q0 -256 -132 -376t-398.5 -120t-398.5 120t-132 376zM358 1718l516 217l84 -245l-532 -162z" />
+<glyph unicode="&#xdb;" horiz-adv-x="1339" d="M139 471v922h283v-928q0 -244 248 -244t248 244v928h282v-922q0 -256 -132 -376t-398.5 -120t-398.5 120t-132 376zM276 1567l275 305h240l274 -305h-291l-100 114l-107 -114h-291z" />
+<glyph unicode="&#xdc;" horiz-adv-x="1339" d="M139 471v922h283v-928q0 -244 248 -244t248 244v928h282v-922q0 -256 -132 -376t-398.5 -120t-398.5 120t-132 376zM319 1565v270h263v-270h-263zM758 1565v270h262v-270h-262z" />
+<glyph unicode="&#xdd;" horiz-adv-x="1140" d="M0 1393h313l256 -555l256 555h314l-426 -830v-563h-283v563zM272 1718l516 217l84 -245l-532 -162z" />
+<glyph unicode="&#xde;" horiz-adv-x="1220" d="M152 0v1413h282v-201h230q500 0 499 -489q0 -248 -127.5 -384t-371.5 -136h-230v-203h-282zM434 477h228q104 0 159.5 64.5t55.5 181.5q0 219 -215 219h-228v-465z" />
+<glyph unicode="&#xdf;" horiz-adv-x="1251" d="M127 0v1069q0 209 109.5 299t355.5 90t362.5 -75.5t116.5 -245.5q0 -111 -44 -162t-134 -91t-112.5 -58.5t-22.5 -47t32.5 -53.5t169 -87.5t190.5 -122.5t54 -179q0 -207 -93 -284t-320 -77q-111 0 -267 37l-49 11l8 219q199 -25 275 -25q164 0 164 78q0 47 -31 71.5 t-166 82t-192.5 126t-57.5 173t37 162t127 94t119.5 59t29.5 65.5t-40.5 66t-150.5 23t-153 -36t-43 -118v-1063h-274z" />
+<glyph unicode="&#xe0;" horiz-adv-x="1046" d="M59 311q0 164 88.5 232.5t270.5 81.5l219 16v64q0 63 -28.5 86.5t-92.5 23.5l-385 -16l-8 190q219 59 416.5 59.5t284.5 -81.5t87 -262v-426q4 -49 16.5 -69t51.5 -28l-8 -207q-104 0 -167 14.5t-126 57.5q-147 -72 -301 -72q-317 0 -318 336zM211 1307l82 235l516 -209 l-61 -178zM336 311.5q0 -112.5 100 -112.5q78 0 170 24l31 8v220l-186 -17q-115 -10 -115 -122.5z" />
+<glyph unicode="&#xe1;" horiz-adv-x="1046" d="M59 311q0 164 88.5 232.5t270.5 81.5l219 16v64q0 63 -28.5 86.5t-92.5 23.5l-385 -16l-8 190q219 59 416.5 59.5t284.5 -81.5t87 -262v-426q4 -49 16.5 -69t51.5 -28l-8 -207q-104 0 -167 14.5t-126 57.5q-147 -72 -301 -72q-317 0 -318 336zM197 1333l516 209l82 -235 l-537 -152zM336 311.5q0 -112.5 100 -112.5q78 0 170 24l31 8v220l-186 -17q-115 -10 -115 -122.5z" />
+<glyph unicode="&#xe2;" horiz-adv-x="1046" d="M59 311q0 164 88.5 232.5t270.5 81.5l219 16v64q0 63 -28.5 86.5t-92.5 23.5l-385 -16l-8 190q219 59 416.5 59.5t284.5 -81.5t87 -262v-426q4 -49 16.5 -69t51.5 -28l-8 -207q-104 0 -167 14.5t-126 57.5q-147 -72 -301 -72q-317 0 -318 336zM170 1188l258 309h172 l262 -309h-252l-94 137l-94 -137h-252zM336 311.5q0 -112.5 100 -112.5q78 0 170 24l31 8v220l-186 -17q-115 -10 -115 -122.5z" />
+<glyph unicode="&#xe3;" horiz-adv-x="1046" d="M59 311q0 164 88.5 232.5t270.5 81.5l219 16v64q0 63 -28.5 86.5t-92.5 23.5l-385 -16l-8 190q219 59 416.5 59.5t284.5 -81.5t87 -262v-426q4 -49 16.5 -69t51.5 -28l-8 -207q-104 0 -167 14.5t-126 57.5q-147 -72 -301 -72q-317 0 -318 336zM111 1362q41 47 103 85 t108.5 38t141.5 -37t120 -37q49 0 135 51l29 19l59 -156q-12 -14 -32.5 -35.5t-78 -56.5t-103.5 -35t-140.5 37t-120.5 37q-59 0 -135 -47l-27 -17zM336 311.5q0 -112.5 100 -112.5q78 0 170 24l31 8v220l-186 -17q-115 -10 -115 -122.5z" />
+<glyph unicode="&#xe4;" horiz-adv-x="1046" d="M59 311q0 164 88.5 232.5t270.5 81.5l219 16v64q0 63 -28.5 86.5t-92.5 23.5l-385 -16l-8 190q219 59 416.5 59.5t284.5 -81.5t87 -262v-426q4 -49 16.5 -69t51.5 -28l-8 -207q-104 0 -167 14.5t-126 57.5q-147 -72 -301 -72q-317 0 -318 336zM133 1221v270h262v-270 h-262zM336 311.5q0 -112.5 100 -112.5q78 0 170 24l31 8v220l-186 -17q-115 -10 -115 -122.5zM575 1221v270h263v-270h-263z" />
+<glyph unicode="&#xe5;" horiz-adv-x="1046" d="M59 311q0 164 88.5 232.5t270.5 81.5l219 16v64q0 63 -28.5 86.5t-92.5 23.5l-385 -16l-8 190q219 59 416.5 59.5t284.5 -81.5t87 -262v-426q4 -49 16.5 -69t51.5 -28l-8 -207q-104 0 -167 14.5t-126 57.5q-147 -72 -301 -72q-317 0 -318 336zM303 1305.5 q0 101.5 68.5 171t170 69.5t171 -69.5t69.5 -171t-69.5 -170t-171 -68.5t-170 68.5t-68.5 170zM336 311.5q0 -112.5 100 -112.5q78 0 170 24l31 8v220l-186 -17q-115 -10 -115 -122.5zM451 1307q0 -41 26.5 -68t67.5 -27t66.5 27t25.5 68t-25.5 66.5t-66.5 25.5t-67.5 -25.5 t-26.5 -66.5z" />
+<glyph unicode="&#xe6;" horiz-adv-x="1605" d="M59 314.5q0 160.5 89.5 231t267.5 81.5l221 14v51q0 41 -28.5 66.5t-84.5 25.5q-147 0 -321 -16l-66 -6l-8 239q272 45 435 45.5t251 -75.5q106 76 272 76q446 0 447 -461l-21 -193h-602q2 -88 49.5 -127t139.5 -39q139 0 340 15l57 4l4 -213q-236 -57 -435.5 -57.5 t-303.5 98.5l-47 -23q-172 -76 -336 -76t-242 89.5t-78 250zM336 319q0 -109 84 -108q82 0 182 22l35 9l-2 190l-184 -8q-115 -6 -115 -105zM911 604h353q0 109 -40 154t-137.5 45t-136.5 -47.5t-39 -151.5z" />
+<glyph unicode="&#xe7;" horiz-adv-x="913" d="M78 529.5q0 267.5 102.5 393.5t329.5 126q106 0 272 -33l56 -12l-9 -218q-162 16 -239 17q-141 0 -187.5 -60.5t-46.5 -228.5t46.5 -230.5t189.5 -62.5l237 17l9 -220q-199 -39 -316 -43v-51q131 -2 191.5 -39t60.5 -149.5t-59.5 -171t-167.5 -58.5q-88 0 -162 17l-29 6 l9 160q63 -2 98 -2q78 0 78 53q0 45 -78 45h-49v197q-178 23 -257 151.5t-79 396z" />
+<glyph unicode="&#xe8;" horiz-adv-x="1044" d="M76 498q0 551 452 551q446 0 447 -463l-21 -191h-602q2 -94 50.5 -136t138.5 -42q190 0 340 12l57 7l4 -203q-236 -57 -426 -58q-231 0 -335.5 123t-104.5 400zM225 1307l82 235l516 -209l-61 -178zM350 604h355q0 123 -39 171t-136.5 48t-137.5 -50t-42 -169z" />
+<glyph unicode="&#xe9;" horiz-adv-x="1044" d="M76 498q0 551 452 551q446 0 447 -463l-21 -191h-602q2 -94 50.5 -136t138.5 -42q190 0 340 12l57 7l4 -203q-236 -57 -426 -58q-231 0 -335.5 123t-104.5 400zM215 1333l516 209l82 -235l-537 -152zM350 604h355q0 123 -39 171t-136.5 48t-137.5 -50t-42 -169z" />
+<glyph unicode="&#xea;" horiz-adv-x="1044" d="M76 498q0 551 452 551q446 0 447 -463l-21 -191h-602q2 -94 50.5 -136t138.5 -42q190 0 340 12l57 7l4 -203q-236 -57 -426 -58q-231 0 -335.5 123t-104.5 400zM182 1188l258 309h172l262 -309h-251l-95 137l-94 -137h-252zM350 604h355q0 123 -39 171t-136.5 48 t-137.5 -50t-42 -169z" />
+<glyph unicode="&#xeb;" horiz-adv-x="1044" d="M76 498q0 551 452 551q446 0 447 -463l-21 -191h-602q2 -94 50.5 -136t138.5 -42q190 0 340 12l57 7l4 -203q-236 -57 -426 -58q-231 0 -335.5 123t-104.5 400zM172 1221v270h262v-270h-262zM350 604h355q0 123 -39 171t-136.5 48t-137.5 -50t-42 -169zM614 1221v270h263 v-270h-263z" />
+<glyph unicode="&#xec;" horiz-adv-x="528" d="M-121 1307l82 235l516 -209l-61 -178zM127 0v1024h274v-1024h-274z" />
+<glyph unicode="&#xed;" horiz-adv-x="528" d="M63 1333l517 209l82 -235l-537 -152zM127 0v1024h274v-1024h-274z" />
+<glyph unicode="&#xee;" horiz-adv-x="528" d="M-92 1188l258 309h172l262 -309h-252l-94 137l-94 -137h-252zM127 0v1024h274v-1024h-274z" />
+<glyph unicode="&#xef;" horiz-adv-x="528" d="M-98 1221v270h262v-270h-262zM127 0v1024h274v-1024h-274zM344 1221v270h262v-270h-262z" />
+<glyph unicode="&#xf0;" horiz-adv-x="1161" d="M78 442q0 213 111.5 334t334.5 121q127 0 232 -37l35 -12q-10 96 -51.5 164.5t-131.5 120.5l-264 -177l-111 156l156 105q-94 25 -221 49l37 192q248 -18 428 -80l196 131l111 -155l-111 -74q252 -180 252 -562t-122.5 -559t-399.5 -177q-481 0 -481 460zM369 442 q0 -215 190 -215q115 0 173.5 90.5t58.5 292.5q-103 45 -250 45q-84 0 -128 -62.5t-44 -150.5z" />
+<glyph unicode="&#xf1;" horiz-adv-x="1132" d="M127 0v1024h272v-57l39 20q37 20 101.5 41t115.5 21q205 0 283 -121t78 -373v-555h-275v547q0 131 -30.5 193.5t-124.5 62.5t-185 -37v-766h-274zM227 1362q41 47 103.5 85t108.5 38t141.5 -37t119.5 -37q49 0 136 51l28 19l60 -156q-12 -14 -33 -35.5t-78 -56.5 t-103 -35t-140.5 37t-123.5 37q-57 0 -133 -47l-26 -17z" />
+<glyph unicode="&#xf2;" horiz-adv-x="1089" d="M74 514q0 254 108.5 394.5t362.5 140.5t362.5 -140.5t108.5 -394.5q0 -539 -471 -539t-471 539zM252 1307l82 235l516 -209l-62 -178zM352 514q0 -158 42 -231.5t150.5 -73.5t150.5 73.5t42 231.5t-42 229.5t-150.5 71.5t-150.5 -71.5t-42 -229.5z" />
+<glyph unicode="&#xf3;" horiz-adv-x="1089" d="M74 514q0 254 108.5 394.5t362.5 140.5t362.5 -140.5t108.5 -394.5q0 -539 -471 -539t-471 539zM238 1333l516 209l82 -235l-537 -152zM352 514q0 -158 42 -231.5t150.5 -73.5t150.5 73.5t42 231.5t-42 229.5t-150.5 71.5t-150.5 -71.5t-42 -229.5z" />
+<glyph unicode="&#xf4;" horiz-adv-x="1089" d="M74 514q0 254 108.5 394.5t362.5 140.5t362.5 -140.5t108.5 -394.5q0 -539 -471 -539t-471 539zM186 1188l258 309h172l263 -309h-252l-95 137l-94 -137h-252zM352 514q0 -158 42 -231.5t150.5 -73.5t150.5 73.5t42 231.5t-42 229.5t-150.5 71.5t-150.5 -71.5t-42 -229.5 z" />
+<glyph unicode="&#xf5;" horiz-adv-x="1089" d="M74 514q0 254 108.5 394.5t362.5 140.5t362.5 -140.5t108.5 -394.5q0 -539 -471 -539t-471 539zM186 1362q41 47 103.5 85t108.5 38t141.5 -37t119.5 -37q49 0 136 51l28 19l60 -156q-12 -14 -33 -35.5t-78 -56.5t-103 -35t-140.5 37t-122.5 37q-57 0 -134 -47l-26 -17z M352 514q0 -158 42 -231.5t150.5 -73.5t150.5 73.5t42 231.5t-42 229.5t-150.5 71.5t-150.5 -71.5t-42 -229.5z" />
+<glyph unicode="&#xf6;" horiz-adv-x="1089" d="M74 514q0 254 108.5 394.5t362.5 140.5t362.5 -140.5t108.5 -394.5q0 -539 -471 -539t-471 539zM190 1221v270h263v-270h-263zM352 514q0 -158 42 -231.5t150.5 -73.5t150.5 73.5t42 231.5t-42 229.5t-150.5 71.5t-150.5 -71.5t-42 -229.5zM633 1221v270h262v-270h-262z " />
+<glyph unicode="&#xf7;" d="M102 391v246h942v-246h-942zM436 35v270h271v-270h-271zM436 721v270h271v-270h-271z" />
+<glyph unicode="&#xf8;" horiz-adv-x="1089" d="M74 514q0 254 108.5 394.5t362.5 140.5q57 0 114 -11l82 205l166 -61l-84 -201q193 -121 193 -467q0 -539 -471 -539q-70 0 -129 13l-84 -209l-164 61l88 211q-182 123 -182 463zM352 528.5q0 -143.5 25 -209.5l194 494l-26 2q-109 0 -151 -71.5t-42 -215zM504 211 q12 -2 41 -2q109 0 150.5 73.5t41.5 219t-28 215.5z" />
+<glyph unicode="&#xf9;" horiz-adv-x="1132" d="M117 487v537h274v-541q0 -152 24.5 -207t119.5 -55q90 0 170 29l26 8v766h275v-1024h-273v57q-147 -82 -256 -82q-213 0 -286.5 118t-73.5 394zM201 1307l82 235l516 -209l-62 -178z" />
+<glyph unicode="&#xfa;" horiz-adv-x="1132" d="M117 487v537h274v-541q0 -152 24.5 -207t123 -55t192.5 37v766h275v-1024h-273v57l-41 -20q-39 -20 -102.5 -41t-112.5 -21q-213 0 -286.5 118t-73.5 394zM266 1333l516 209l82 -235l-536 -152z" />
+<glyph unicode="&#xfb;" horiz-adv-x="1132" d="M117 487v537h274v-541q0 -152 24.5 -207t123 -55t192.5 37v766h275v-1024h-273v57l-41 -20q-39 -20 -102.5 -41t-112.5 -21q-213 0 -286.5 118t-73.5 394zM168 1188l258 309h172l262 -309h-252l-94 137l-94 -137h-252z" />
+<glyph unicode="&#xfc;" horiz-adv-x="1132" d="M117 487v537h274v-541q0 -152 24.5 -207t123 -55t192.5 37v766h275v-1024h-273v57l-41 -20q-39 -20 -102.5 -41t-112.5 -21q-213 0 -286.5 118t-73.5 394zM217 1221v270h262v-270h-262zM659 1221v270h263v-270h-263z" />
+<glyph unicode="&#xfd;" horiz-adv-x="1024" d="M33 1024h270l186 -791h48l186 791h270l-360 -1454h-268l112 430h-192zM250 1333l516 209l82 -235l-537 -152z" />
+<glyph unicode="&#xfe;" horiz-adv-x="1114" d="M127 -430v1864h274v-441q132 56 222 56q215 0 314 -118t99 -421t-108.5 -419t-356.5 -116q-68 0 -145 13l-25 4v-422h-274zM401 225q93 -12 150 -12q119 0 163 69.5t44 239.5q0 281 -172 281q-82 0 -156 -21l-29 -6v-551z" />
+<glyph unicode="&#xff;" horiz-adv-x="1024" d="M33 1024h270l186 -791h48l186 791h270l-360 -1454h-268l112 430h-192zM162 1221v270h262v-270h-262zM604 1221v270h262v-270h-262z" />
+<glyph unicode="&#x152;" horiz-adv-x="1847" d="M94 712.5q0 395.5 120 560.5t413 165q88 0 239 -25h897v-270h-618v-293h495v-268h-495v-312h618v-270h-893q-156 -25 -243 -25q-309 0 -421 171t-112 566.5zM385 665.5q0 -227.5 56.5 -319.5t234.5 -92q51 0 190 12v881q-143 12 -227 12t-142.5 -36t-85 -133 t-26.5 -324.5z" />
+<glyph unicode="&#x153;" horiz-adv-x="1708" d="M74 512q0 254 108.5 394.5t362.5 140.5q119 0 198.5 -38t133.5 -128q53 92 129.5 129t183.5 37q446 0 446 -461l-20 -193h-602q2 -88 49 -127t139 -39q139 0 340 15l57 4l5 -213q-236 -57 -442 -57.5t-298 139.5q-98 -139 -335.5 -139.5t-346 141t-108.5 395.5zM352 512 q0 -150 42 -219.5t150.5 -69.5t150.5 69.5t42 219.5t-42 218.5t-150.5 68.5t-150.5 -68.5t-42 -218.5zM1012 604h354q0 109 -40 154t-136 45t-137 -48.5t-41 -150.5z" />
+<glyph unicode="&#x178;" horiz-adv-x="1140" d="M0 1393h313l256 -555l256 555h314l-426 -830v-563h-283v563zM215 1565v270h262v-270h-262zM653 1565v270h262v-270h-262z" />
+<glyph unicode="&#x2c6;" horiz-adv-x="548" d="M-49 1188l258 309h172l262 -309h-252l-94 137l-94 -137h-252z" />
+<glyph unicode="&#x2dc;" horiz-adv-x="548" d="M-45 1362q41 47 103.5 85t108.5 38t141 -37t120 -37q49 0 135 51l29 19l59 -156q-12 -14 -32.5 -35.5t-78 -56.5t-103.5 -35t-140 37t-121 37q-59 0 -135 -47l-27 -17z" />
+<glyph unicode="&#x2000;" horiz-adv-x="967" />
+<glyph unicode="&#x2001;" horiz-adv-x="1935" />
+<glyph unicode="&#x2002;" horiz-adv-x="967" />
+<glyph unicode="&#x2003;" horiz-adv-x="1935" />
+<glyph unicode="&#x2004;" horiz-adv-x="645" />
+<glyph unicode="&#x2005;" horiz-adv-x="483" />
+<glyph unicode="&#x2006;" horiz-adv-x="322" />
+<glyph unicode="&#x2007;" horiz-adv-x="322" />
+<glyph unicode="&#x2008;" horiz-adv-x="241" />
+<glyph unicode="&#x2009;" horiz-adv-x="387" />
+<glyph unicode="&#x200a;" horiz-adv-x="107" />
+<glyph unicode="&#x2010;" horiz-adv-x="835" d="M115 420v250h606v-250h-606z" />
+<glyph unicode="&#x2011;" horiz-adv-x="835" d="M115 420v250h606v-250h-606z" />
+<glyph unicode="&#x2012;" horiz-adv-x="835" d="M115 420v250h606v-250h-606z" />
+<glyph unicode="&#x2013;" horiz-adv-x="1257" d="M117 428v234h1024v-234h-1024z" />
+<glyph unicode="&#x2014;" horiz-adv-x="2281" d="M117 428v234h2048v-234h-2048z" />
+<glyph unicode="&#x2018;" horiz-adv-x="530" d="M72 885l174 506h211l-99 -506h-286z" />
+<glyph unicode="&#x2019;" horiz-adv-x="520" d="M84 887l96 506h289l-174 -506h-211z" />
+<glyph unicode="&#x201a;" horiz-adv-x="524" d="M47 -240l96 506h289l-174 -506h-211z" />
+<glyph unicode="&#x201c;" horiz-adv-x="907" d="M72 885l174 506h211l-99 -506h-286zM449 885l174 506h211l-99 -506h-286z" />
+<glyph unicode="&#x201d;" horiz-adv-x="899" d="M84 889l96 506h289l-176 -506h-209zM461 889l96 506h289l-174 -506h-211z" />
+<glyph unicode="&#x201e;" horiz-adv-x="862" d="M-14 -266l174 506h211l-99 -506h-286zM375 -266l174 506h211l-98 -506h-287z" />
+<glyph unicode="&#x2022;" horiz-adv-x="921" d="M205 205v573h512v-573h-512z" />
+<glyph unicode="&#x2026;" horiz-adv-x="1568" d="M115 0v340h295v-340h-295zM637 0v340h295v-340h-295zM1159 0v340h295v-340h-295z" />
+<glyph unicode="&#x202f;" horiz-adv-x="387" />
+<glyph unicode="&#x2039;" horiz-adv-x="651" d="M82 397v197l457 336v-277l-224 -153l224 -176v-277z" />
+<glyph unicode="&#x203a;" horiz-adv-x="651" d="M111 68v276l223 176l-223 154v276l456 -336v-196z" />
+<glyph unicode="&#x205f;" horiz-adv-x="483" />
+<glyph unicode="&#x20ac;" d="M53 383v209h113v135h-113v209h127q31 240 144.5 340t357.5 100q158 0 395 -53l-8 -219q-180 29 -322.5 29t-200 -41t-81.5 -156h481v-209h-497v-135h497v-209h-473q25 -92 82 -128t184 -36t330 27l6 -223q-207 -47 -416.5 -47.5t-324.5 98t-150 309.5h-131z" />
+<glyph unicode="&#x2122;" horiz-adv-x="1351" d="M164 1157v162h409v-162h-84v-477h-180v477h-145zM625 678v641h211l84 -324l92 324h209v-641h-168v356l-70 -313h-113l-77 313v-356h-168z" />
+<glyph unicode="&#xe000;" horiz-adv-x="1024" d="M0 0v1024h1024v-1024h-1024z" />
+<hkern u1="&#x22;" u2="&#xf0;" k="18" />
+<hkern u1="&#x22;" u2="&#xef;" k="-37" />
+<hkern u1="&#x22;" u2="&#xee;" k="-25" />
+<hkern u1="&#x22;" u2="&#xec;" k="-55" />
+<hkern u1="&#x22;" u2="&#xc6;" k="78" />
+<hkern u1="&#x22;" u2="&#x40;" k="20" />
+<hkern u1="&#x22;" u2="&#x2f;" k="131" />
+<hkern u1="&#x22;" u2="&#x26;" k="43" />
+<hkern u1="&#x26;" u2="&#x201d;" k="70" />
+<hkern u1="&#x26;" u2="&#x2019;" k="70" />
+<hkern u1="&#x26;" u2="&#x178;" k="96" />
+<hkern u1="&#x26;" u2="&#xdd;" k="96" />
+<hkern u1="&#x26;" u2="Y" k="96" />
+<hkern u1="&#x26;" u2="W" k="27" />
+<hkern u1="&#x26;" u2="V" k="47" />
+<hkern u1="&#x26;" u2="T" k="68" />
+<hkern u1="&#x26;" u2="&#x27;" k="78" />
+<hkern u1="&#x26;" u2="&#x22;" k="78" />
+<hkern u1="&#x27;" u2="&#xf0;" k="18" />
+<hkern u1="&#x27;" u2="&#xef;" k="-37" />
+<hkern u1="&#x27;" u2="&#xee;" k="-25" />
+<hkern u1="&#x27;" u2="&#xec;" k="-55" />
+<hkern u1="&#x27;" u2="&#xc6;" k="78" />
+<hkern u1="&#x27;" u2="&#x40;" k="20" />
+<hkern u1="&#x27;" u2="&#x2f;" k="131" />
+<hkern u1="&#x27;" u2="&#x26;" k="43" />
+<hkern u1="&#x28;" u2="&#x153;" k="41" />
+<hkern u1="&#x28;" u2="&#x152;" k="31" />
+<hkern u1="&#x28;" u2="&#xff;" k="20" />
+<hkern u1="&#x28;" u2="&#xfd;" k="20" />
+<hkern u1="&#x28;" u2="&#xfc;" k="31" />
+<hkern u1="&#x28;" u2="&#xfb;" k="31" />
+<hkern u1="&#x28;" u2="&#xfa;" k="31" />
+<hkern u1="&#x28;" u2="&#xf9;" k="31" />
+<hkern u1="&#x28;" u2="&#xf8;" k="41" />
+<hkern u1="&#x28;" u2="&#xf6;" k="41" />
+<hkern u1="&#x28;" u2="&#xf5;" k="41" />
+<hkern u1="&#x28;" u2="&#xf4;" k="41" />
+<hkern u1="&#x28;" u2="&#xf3;" k="41" />
+<hkern u1="&#x28;" u2="&#xf2;" k="41" />
+<hkern u1="&#x28;" u2="&#xf1;" k="23" />
+<hkern u1="&#x28;" u2="&#xf0;" k="23" />
+<hkern u1="&#x28;" u2="&#xef;" k="-78" />
+<hkern u1="&#x28;" u2="&#xec;" k="-41" />
+<hkern u1="&#x28;" u2="&#xeb;" k="41" />
+<hkern u1="&#x28;" u2="&#xea;" k="41" />
+<hkern u1="&#x28;" u2="&#xe9;" k="41" />
+<hkern u1="&#x28;" u2="&#xe8;" k="41" />
+<hkern u1="&#x28;" u2="&#xe7;" k="41" />
+<hkern u1="&#x28;" u2="&#xe6;" k="25" />
+<hkern u1="&#x28;" u2="&#xe5;" k="25" />
+<hkern u1="&#x28;" u2="&#xe4;" k="25" />
+<hkern u1="&#x28;" u2="&#xe3;" k="25" />
+<hkern u1="&#x28;" u2="&#xe2;" k="25" />
+<hkern u1="&#x28;" u2="&#xe1;" k="25" />
+<hkern u1="&#x28;" u2="&#xe0;" k="25" />
+<hkern u1="&#x28;" u2="&#xd8;" k="31" />
+<hkern u1="&#x28;" u2="&#xd6;" k="31" />
+<hkern u1="&#x28;" u2="&#xd5;" k="31" />
+<hkern u1="&#x28;" u2="&#xd4;" k="31" />
+<hkern u1="&#x28;" u2="&#xd3;" k="31" />
+<hkern u1="&#x28;" u2="&#xd2;" k="31" />
+<hkern u1="&#x28;" u2="&#xc7;" k="29" />
+<hkern u1="&#x28;" u2="&#x7b;" k="27" />
+<hkern u1="&#x28;" u2="y" k="20" />
+<hkern u1="&#x28;" u2="w" k="29" />
+<hkern u1="&#x28;" u2="v" k="20" />
+<hkern u1="&#x28;" u2="u" k="31" />
+<hkern u1="&#x28;" u2="s" k="20" />
+<hkern u1="&#x28;" u2="r" k="23" />
+<hkern u1="&#x28;" u2="q" k="39" />
+<hkern u1="&#x28;" u2="p" k="23" />
+<hkern u1="&#x28;" u2="o" k="41" />
+<hkern u1="&#x28;" u2="n" k="23" />
+<hkern u1="&#x28;" u2="m" k="23" />
+<hkern u1="&#x28;" u2="j" k="-45" />
+<hkern u1="&#x28;" u2="f" k="20" />
+<hkern u1="&#x28;" u2="e" k="41" />
+<hkern u1="&#x28;" u2="d" k="39" />
+<hkern u1="&#x28;" u2="c" k="41" />
+<hkern u1="&#x28;" u2="a" k="25" />
+<hkern u1="&#x28;" u2="Q" k="31" />
+<hkern u1="&#x28;" u2="O" k="31" />
+<hkern u1="&#x28;" u2="G" k="31" />
+<hkern u1="&#x28;" u2="C" k="29" />
+<hkern u1="&#x2a;" u2="&#x153;" k="33" />
+<hkern u1="&#x2a;" u2="&#xf8;" k="33" />
+<hkern u1="&#x2a;" u2="&#xf6;" k="33" />
+<hkern u1="&#x2a;" u2="&#xf5;" k="33" />
+<hkern u1="&#x2a;" u2="&#xf4;" k="33" />
+<hkern u1="&#x2a;" u2="&#xf3;" k="33" />
+<hkern u1="&#x2a;" u2="&#xf2;" k="33" />
+<hkern u1="&#x2a;" u2="&#xf0;" k="29" />
+<hkern u1="&#x2a;" u2="&#xef;" k="-82" />
+<hkern u1="&#x2a;" u2="&#xee;" k="-109" />
+<hkern u1="&#x2a;" u2="&#xec;" k="-51" />
+<hkern u1="&#x2a;" u2="&#xeb;" k="33" />
+<hkern u1="&#x2a;" u2="&#xea;" k="33" />
+<hkern u1="&#x2a;" u2="&#xe9;" k="33" />
+<hkern u1="&#x2a;" u2="&#xe8;" k="33" />
+<hkern u1="&#x2a;" u2="&#xe7;" k="33" />
+<hkern u1="&#x2a;" u2="&#xc6;" k="74" />
+<hkern u1="&#x2a;" u2="&#xc5;" k="59" />
+<hkern u1="&#x2a;" u2="&#xc4;" k="59" />
+<hkern u1="&#x2a;" u2="&#xc3;" k="59" />
+<hkern u1="&#x2a;" u2="&#xc2;" k="59" />
+<hkern u1="&#x2a;" u2="&#xc1;" k="59" />
+<hkern u1="&#x2a;" u2="&#xc0;" k="59" />
+<hkern u1="&#x2a;" u2="s" k="23" />
+<hkern u1="&#x2a;" u2="q" k="37" />
+<hkern u1="&#x2a;" u2="o" k="33" />
+<hkern u1="&#x2a;" u2="g" k="29" />
+<hkern u1="&#x2a;" u2="e" k="33" />
+<hkern u1="&#x2a;" u2="d" k="37" />
+<hkern u1="&#x2a;" u2="c" k="33" />
+<hkern u1="&#x2a;" u2="T" k="-20" />
+<hkern u1="&#x2a;" u2="J" k="20" />
+<hkern u1="&#x2a;" u2="A" k="59" />
+<hkern u1="&#x2c;" u2="v" k="47" />
+<hkern u1="&#x2c;" u2="f" k="23" />
+<hkern u1="&#x2c;" u2="V" k="82" />
+<hkern u1="&#x2d;" u2="&#xc6;" k="18" />
+<hkern u1="&#x2d;" u2="x" k="47" />
+<hkern u1="&#x2d;" u2="v" k="18" />
+<hkern u1="&#x2d;" u2="f" k="23" />
+<hkern u1="&#x2d;" u2="X" k="66" />
+<hkern u1="&#x2d;" u2="V" k="49" />
+<hkern u1="&#x2e;" u2="v" k="47" />
+<hkern u1="&#x2e;" u2="f" k="23" />
+<hkern u1="&#x2e;" u2="V" k="82" />
+<hkern u1="&#x2f;" u2="&#x153;" k="74" />
+<hkern u1="&#x2f;" u2="&#x152;" k="31" />
+<hkern u1="&#x2f;" u2="&#xff;" k="29" />
+<hkern u1="&#x2f;" u2="&#xfd;" k="29" />
+<hkern u1="&#x2f;" u2="&#xfc;" k="41" />
+<hkern u1="&#x2f;" u2="&#xfb;" k="41" />
+<hkern u1="&#x2f;" u2="&#xfa;" k="41" />
+<hkern u1="&#x2f;" u2="&#xf9;" k="41" />
+<hkern u1="&#x2f;" u2="&#xf8;" k="74" />
+<hkern u1="&#x2f;" u2="&#xf6;" k="74" />
+<hkern u1="&#x2f;" u2="&#xf5;" k="74" />
+<hkern u1="&#x2f;" u2="&#xf4;" k="74" />
+<hkern u1="&#x2f;" u2="&#xf3;" k="74" />
+<hkern u1="&#x2f;" u2="&#xf2;" k="74" />
+<hkern u1="&#x2f;" u2="&#xf1;" k="45" />
+<hkern u1="&#x2f;" u2="&#xf0;" k="20" />
+<hkern u1="&#x2f;" u2="&#xef;" k="-92" />
+<hkern u1="&#x2f;" u2="&#xec;" k="-88" />
+<hkern u1="&#x2f;" u2="&#xeb;" k="74" />
+<hkern u1="&#x2f;" u2="&#xea;" k="74" />
+<hkern u1="&#x2f;" u2="&#xe9;" k="74" />
+<hkern u1="&#x2f;" u2="&#xe8;" k="74" />
+<hkern u1="&#x2f;" u2="&#xe7;" k="74" />
+<hkern u1="&#x2f;" u2="&#xe6;" k="57" />
+<hkern u1="&#x2f;" u2="&#xe5;" k="57" />
+<hkern u1="&#x2f;" u2="&#xe4;" k="57" />
+<hkern u1="&#x2f;" u2="&#xe3;" k="57" />
+<hkern u1="&#x2f;" u2="&#xe2;" k="57" />
+<hkern u1="&#x2f;" u2="&#xe1;" k="57" />
+<hkern u1="&#x2f;" u2="&#xe0;" k="57" />
+<hkern u1="&#x2f;" u2="&#xd8;" k="31" />
+<hkern u1="&#x2f;" u2="&#xd6;" k="31" />
+<hkern u1="&#x2f;" u2="&#xd5;" k="31" />
+<hkern u1="&#x2f;" u2="&#xd4;" k="31" />
+<hkern u1="&#x2f;" u2="&#xd3;" k="31" />
+<hkern u1="&#x2f;" u2="&#xd2;" k="31" />
+<hkern u1="&#x2f;" u2="&#xc7;" k="25" />
+<hkern u1="&#x2f;" u2="&#xc6;" k="90" />
+<hkern u1="&#x2f;" u2="&#xc5;" k="76" />
+<hkern u1="&#x2f;" u2="&#xc4;" k="76" />
+<hkern u1="&#x2f;" u2="&#xc3;" k="76" />
+<hkern u1="&#x2f;" u2="&#xc2;" k="76" />
+<hkern u1="&#x2f;" u2="&#xc1;" k="76" />
+<hkern u1="&#x2f;" u2="&#xc0;" k="76" />
+<hkern u1="&#x2f;" u2="z" k="35" />
+<hkern u1="&#x2f;" u2="y" k="29" />
+<hkern u1="&#x2f;" u2="w" k="25" />
+<hkern u1="&#x2f;" u2="v" k="27" />
+<hkern u1="&#x2f;" u2="u" k="41" />
+<hkern u1="&#x2f;" u2="s" k="61" />
+<hkern u1="&#x2f;" u2="r" k="45" />
+<hkern u1="&#x2f;" u2="q" k="74" />
+<hkern u1="&#x2f;" u2="p" k="45" />
+<hkern u1="&#x2f;" u2="o" k="74" />
+<hkern u1="&#x2f;" u2="n" k="45" />
+<hkern u1="&#x2f;" u2="m" k="45" />
+<hkern u1="&#x2f;" u2="g" k="70" />
+<hkern u1="&#x2f;" u2="e" k="74" />
+<hkern u1="&#x2f;" u2="d" k="74" />
+<hkern u1="&#x2f;" u2="c" k="74" />
+<hkern u1="&#x2f;" u2="a" k="57" />
+<hkern u1="&#x2f;" u2="Q" k="31" />
+<hkern u1="&#x2f;" u2="O" k="31" />
+<hkern u1="&#x2f;" u2="J" k="29" />
+<hkern u1="&#x2f;" u2="G" k="31" />
+<hkern u1="&#x2f;" u2="C" k="25" />
+<hkern u1="&#x2f;" u2="A" k="76" />
+<hkern u1="&#x2f;" u2="&#x2f;" k="614" />
+<hkern u1="&#x3a;" u2="V" k="20" />
+<hkern u1="&#x3b;" u2="V" k="20" />
+<hkern u1="&#x40;" u2="&#x178;" k="51" />
+<hkern u1="&#x40;" u2="&#xdd;" k="51" />
+<hkern u1="&#x40;" u2="Y" k="51" />
+<hkern u1="A" u2="&#x2122;" k="61" />
+<hkern u1="A" u2="&#xf0;" k="10" />
+<hkern u1="A" u2="&#xae;" k="37" />
+<hkern u1="A" u2="v" k="29" />
+<hkern u1="A" u2="f" k="16" />
+<hkern u1="A" u2="\" k="86" />
+<hkern u1="A" u2="V" k="55" />
+<hkern u1="A" u2="&#x3f;" k="29" />
+<hkern u1="A" u2="&#x2a;" k="55" />
+<hkern u1="B" u2="&#x178;" k="45" />
+<hkern u1="B" u2="&#xdd;" k="45" />
+<hkern u1="B" u2="&#xc6;" k="23" />
+<hkern u1="B" u2="&#xc5;" k="16" />
+<hkern u1="B" u2="&#xc4;" k="16" />
+<hkern u1="B" u2="&#xc3;" k="16" />
+<hkern u1="B" u2="&#xc2;" k="16" />
+<hkern u1="B" u2="&#xc1;" k="16" />
+<hkern u1="B" u2="&#xc0;" k="16" />
+<hkern u1="B" u2="g" k="14" />
+<hkern u1="B" u2="]" k="29" />
+<hkern u1="B" u2="\" k="33" />
+<hkern u1="B" u2="Y" k="45" />
+<hkern u1="B" u2="X" k="23" />
+<hkern u1="B" u2="V" k="18" />
+<hkern u1="B" u2="A" k="16" />
+<hkern u1="C" u2="&#xf0;" k="12" />
+<hkern u1="C" u2="&#xef;" k="-72" />
+<hkern u1="C" u2="&#xee;" k="-59" />
+<hkern u1="C" u2="&#xec;" k="-90" />
+<hkern u1="C" u2="v" k="10" />
+<hkern u1="C" u2="f" k="10" />
+<hkern u1="D" u2="&#xc6;" k="27" />
+<hkern u1="D" u2="&#x7d;" k="25" />
+<hkern u1="D" u2="]" k="39" />
+<hkern u1="D" u2="\" k="37" />
+<hkern u1="D" u2="X" k="37" />
+<hkern u1="D" u2="V" k="20" />
+<hkern u1="D" u2="&#x2f;" k="31" />
+<hkern u1="D" u2="&#x29;" k="27" />
+<hkern u1="E" u2="&#xf0;" k="12" />
+<hkern u1="E" u2="&#xef;" k="-66" />
+<hkern u1="E" u2="&#xee;" k="-59" />
+<hkern u1="E" u2="&#xec;" k="-86" />
+<hkern u1="F" u2="&#x2026;" k="102" />
+<hkern u1="F" u2="&#x201e;" k="102" />
+<hkern u1="F" u2="&#x201a;" k="102" />
+<hkern u1="F" u2="&#x2014;" k="18" />
+<hkern u1="F" u2="&#x2013;" k="18" />
+<hkern u1="F" u2="&#x153;" k="35" />
+<hkern u1="F" u2="&#xff;" k="10" />
+<hkern u1="F" u2="&#xfd;" k="10" />
+<hkern u1="F" u2="&#xfc;" k="27" />
+<hkern u1="F" u2="&#xfb;" k="27" />
+<hkern u1="F" u2="&#xfa;" k="27" />
+<hkern u1="F" u2="&#xf9;" k="27" />
+<hkern u1="F" u2="&#xf8;" k="35" />
+<hkern u1="F" u2="&#xf6;" k="35" />
+<hkern u1="F" u2="&#xf5;" k="35" />
+<hkern u1="F" u2="&#xf4;" k="35" />
+<hkern u1="F" u2="&#xf3;" k="35" />
+<hkern u1="F" u2="&#xf2;" k="35" />
+<hkern u1="F" u2="&#xf1;" k="35" />
+<hkern u1="F" u2="&#xf0;" k="25" />
+<hkern u1="F" u2="&#xef;" k="-100" />
+<hkern u1="F" u2="&#xee;" k="-94" />
+<hkern u1="F" u2="&#xec;" k="-121" />
+<hkern u1="F" u2="&#xeb;" k="35" />
+<hkern u1="F" u2="&#xea;" k="35" />
+<hkern u1="F" u2="&#xe9;" k="35" />
+<hkern u1="F" u2="&#xe8;" k="35" />
+<hkern u1="F" u2="&#xe7;" k="35" />
+<hkern u1="F" u2="&#xe6;" k="35" />
+<hkern u1="F" u2="&#xe5;" k="35" />
+<hkern u1="F" u2="&#xe4;" k="35" />
+<hkern u1="F" u2="&#xe3;" k="35" />
+<hkern u1="F" u2="&#xe2;" k="35" />
+<hkern u1="F" u2="&#xe1;" k="35" />
+<hkern u1="F" u2="&#xe0;" k="35" />
+<hkern u1="F" u2="&#xc6;" k="59" />
+<hkern u1="F" u2="&#xc5;" k="43" />
+<hkern u1="F" u2="&#xc4;" k="43" />
+<hkern u1="F" u2="&#xc3;" k="43" />
+<hkern u1="F" u2="&#xc2;" k="43" />
+<hkern u1="F" u2="&#xc1;" k="43" />
+<hkern u1="F" u2="&#xc0;" k="43" />
+<hkern u1="F" u2="z" k="20" />
+<hkern u1="F" u2="y" k="10" />
+<hkern u1="F" u2="x" k="14" />
+<hkern u1="F" u2="w" k="12" />
+<hkern u1="F" u2="u" k="27" />
+<hkern u1="F" u2="s" k="33" />
+<hkern u1="F" u2="r" k="35" />
+<hkern u1="F" u2="q" k="37" />
+<hkern u1="F" u2="p" k="35" />
+<hkern u1="F" u2="o" k="35" />
+<hkern u1="F" u2="n" k="35" />
+<hkern u1="F" u2="m" k="35" />
+<hkern u1="F" u2="g" k="43" />
+<hkern u1="F" u2="f" k="10" />
+<hkern u1="F" u2="e" k="35" />
+<hkern u1="F" u2="d" k="37" />
+<hkern u1="F" u2="c" k="35" />
+<hkern u1="F" u2="a" k="35" />
+<hkern u1="F" u2="J" k="16" />
+<hkern u1="F" u2="A" k="43" />
+<hkern u1="F" u2="&#x2f;" k="78" />
+<hkern u1="F" u2="&#x2e;" k="102" />
+<hkern u1="F" u2="&#x2d;" k="18" />
+<hkern u1="F" u2="&#x2c;" k="102" />
+<hkern u1="G" u2="&#xef;" k="-31" />
+<hkern u1="G" u2="&#xee;" k="-18" />
+<hkern u1="G" u2="&#xec;" k="-51" />
+<hkern u1="G" u2="v" k="10" />
+<hkern u1="G" u2="f" k="12" />
+<hkern u1="G" u2="\" k="20" />
+<hkern u1="G" u2="V" k="16" />
+<hkern u1="H" u2="&#xf0;" k="16" />
+<hkern u1="H" u2="&#xec;" k="-16" />
+<hkern u1="H" u2="f" k="12" />
+<hkern u1="I" u2="&#xf0;" k="16" />
+<hkern u1="I" u2="&#xec;" k="-16" />
+<hkern u1="I" u2="f" k="12" />
+<hkern u1="J" u2="&#xf0;" k="14" />
+<hkern u1="J" u2="&#xec;" k="-23" />
+<hkern u1="J" u2="f" k="10" />
+<hkern u1="K" u2="&#xf0;" k="27" />
+<hkern u1="K" u2="&#xef;" k="-104" />
+<hkern u1="K" u2="&#xee;" k="-12" />
+<hkern u1="K" u2="&#xec;" k="-96" />
+<hkern u1="K" u2="v" k="35" />
+<hkern u1="K" u2="f" k="23" />
+<hkern u1="L" u2="&#x2122;" k="156" />
+<hkern u1="L" u2="&#xae;" k="127" />
+<hkern u1="L" u2="v" k="66" />
+<hkern u1="L" u2="f" k="16" />
+<hkern u1="L" u2="\" k="147" />
+<hkern u1="L" u2="V" k="113" />
+<hkern u1="L" u2="&#x2a;" k="154" />
+<hkern u1="M" u2="&#xf0;" k="16" />
+<hkern u1="M" u2="&#xec;" k="-16" />
+<hkern u1="M" u2="f" k="12" />
+<hkern u1="N" u2="&#xf0;" k="16" />
+<hkern u1="N" u2="&#xec;" k="-16" />
+<hkern u1="N" u2="f" k="12" />
+<hkern u1="O" u2="&#xc6;" k="27" />
+<hkern u1="O" u2="&#x7d;" k="25" />
+<hkern u1="O" u2="]" k="41" />
+<hkern u1="O" u2="\" k="39" />
+<hkern u1="O" u2="X" k="35" />
+<hkern u1="O" u2="V" k="20" />
+<hkern u1="O" u2="&#x2f;" k="29" />
+<hkern u1="O" u2="&#x29;" k="27" />
+<hkern u1="P" u2="&#x2026;" k="125" />
+<hkern u1="P" u2="&#x201e;" k="125" />
+<hkern u1="P" u2="&#x201a;" k="125" />
+<hkern u1="P" u2="&#x178;" k="41" />
+<hkern u1="P" u2="&#xf0;" k="25" />
+<hkern u1="P" u2="&#xef;" k="-16" />
+<hkern u1="P" u2="&#xee;" k="-33" />
+<hkern u1="P" u2="&#xec;" k="-23" />
+<hkern u1="P" u2="&#xe6;" k="10" />
+<hkern u1="P" u2="&#xe5;" k="10" />
+<hkern u1="P" u2="&#xe4;" k="10" />
+<hkern u1="P" u2="&#xe3;" k="10" />
+<hkern u1="P" u2="&#xe2;" k="10" />
+<hkern u1="P" u2="&#xe1;" k="10" />
+<hkern u1="P" u2="&#xe0;" k="10" />
+<hkern u1="P" u2="&#xdd;" k="41" />
+<hkern u1="P" u2="&#xc6;" k="51" />
+<hkern u1="P" u2="&#xc5;" k="39" />
+<hkern u1="P" u2="&#xc4;" k="39" />
+<hkern u1="P" u2="&#xc3;" k="39" />
+<hkern u1="P" u2="&#xc2;" k="39" />
+<hkern u1="P" u2="&#xc1;" k="39" />
+<hkern u1="P" u2="&#xc0;" k="39" />
+<hkern u1="P" u2="&#x7d;" k="20" />
+<hkern u1="P" u2="a" k="10" />
+<hkern u1="P" u2="]" k="27" />
+<hkern u1="P" u2="\" k="25" />
+<hkern u1="P" u2="Y" k="41" />
+<hkern u1="P" u2="X" k="35" />
+<hkern u1="P" u2="V" k="14" />
+<hkern u1="P" u2="J" k="18" />
+<hkern u1="P" u2="A" k="39" />
+<hkern u1="P" u2="&#x2f;" k="78" />
+<hkern u1="P" u2="&#x2e;" k="125" />
+<hkern u1="P" u2="&#x2c;" k="125" />
+<hkern u1="P" u2="&#x29;" k="20" />
+<hkern u1="Q" u2="&#xc6;" k="27" />
+<hkern u1="Q" u2="&#x7d;" k="25" />
+<hkern u1="Q" u2="]" k="41" />
+<hkern u1="Q" u2="\" k="39" />
+<hkern u1="Q" u2="X" k="35" />
+<hkern u1="Q" u2="V" k="20" />
+<hkern u1="Q" u2="&#x2f;" k="29" />
+<hkern u1="Q" u2="&#x29;" k="27" />
+<hkern u1="R" u2="&#xf0;" k="29" />
+<hkern u1="R" u2="&#xc6;" k="20" />
+<hkern u1="R" u2="\" k="31" />
+<hkern u1="R" u2="X" k="12" />
+<hkern u1="R" u2="V" k="18" />
+<hkern u1="S" u2="&#xef;" k="-41" />
+<hkern u1="S" u2="&#xee;" k="-16" />
+<hkern u1="S" u2="&#xec;" k="-57" />
+<hkern u1="S" u2="&#xc6;" k="20" />
+<hkern u1="S" u2="x" k="16" />
+<hkern u1="S" u2="v" k="12" />
+<hkern u1="S" u2="f" k="18" />
+<hkern u1="S" u2="X" k="10" />
+<hkern u1="S" u2="V" k="16" />
+<hkern u1="T" u2="&#xf0;" k="37" />
+<hkern u1="T" u2="&#xef;" k="-119" />
+<hkern u1="T" u2="&#xee;" k="-113" />
+<hkern u1="T" u2="&#xec;" k="-139" />
+<hkern u1="T" u2="&#xe4;" k="111" />
+<hkern u1="T" u2="&#xe3;" k="90" />
+<hkern u1="T" u2="&#xc6;" k="100" />
+<hkern u1="T" u2="x" k="100" />
+<hkern u1="T" u2="v" k="100" />
+<hkern u1="T" u2="f" k="31" />
+<hkern u1="T" u2="&#x40;" k="31" />
+<hkern u1="T" u2="&#x2f;" k="100" />
+<hkern u1="T" u2="&#x26;" k="20" />
+<hkern u1="U" u2="&#xf0;" k="16" />
+<hkern u1="U" u2="&#xec;" k="-29" />
+<hkern u1="U" u2="&#xc6;" k="14" />
+<hkern u1="U" u2="f" k="10" />
+<hkern u1="U" u2="&#x2f;" k="33" />
+<hkern u1="V" u2="&#x203a;" k="23" />
+<hkern u1="V" u2="&#x2039;" k="49" />
+<hkern u1="V" u2="&#x2026;" k="82" />
+<hkern u1="V" u2="&#x201e;" k="82" />
+<hkern u1="V" u2="&#x201a;" k="82" />
+<hkern u1="V" u2="&#x2014;" k="49" />
+<hkern u1="V" u2="&#x2013;" k="49" />
+<hkern u1="V" u2="&#x153;" k="59" />
+<hkern u1="V" u2="&#x152;" k="20" />
+<hkern u1="V" u2="&#xff;" k="12" />
+<hkern u1="V" u2="&#xfd;" k="12" />
+<hkern u1="V" u2="&#xfc;" k="35" />
+<hkern u1="V" u2="&#xfb;" k="35" />
+<hkern u1="V" u2="&#xfa;" k="35" />
+<hkern u1="V" u2="&#xf9;" k="35" />
+<hkern u1="V" u2="&#xf8;" k="59" />
+<hkern u1="V" u2="&#xf6;" k="59" />
+<hkern u1="V" u2="&#xf5;" k="59" />
+<hkern u1="V" u2="&#xf4;" k="59" />
+<hkern u1="V" u2="&#xf3;" k="59" />
+<hkern u1="V" u2="&#xf2;" k="59" />
+<hkern u1="V" u2="&#xf1;" k="43" />
+<hkern u1="V" u2="&#xf0;" k="39" />
+<hkern u1="V" u2="&#xef;" k="-115" />
+<hkern u1="V" u2="&#xee;" k="-61" />
+<hkern u1="V" u2="&#xec;" k="-117" />
+<hkern u1="V" u2="&#xeb;" k="59" />
+<hkern u1="V" u2="&#xea;" k="59" />
+<hkern u1="V" u2="&#xe9;" k="59" />
+<hkern u1="V" u2="&#xe8;" k="59" />
+<hkern u1="V" u2="&#xe7;" k="59" />
+<hkern u1="V" u2="&#xe6;" k="47" />
+<hkern u1="V" u2="&#xe5;" k="47" />
+<hkern u1="V" u2="&#xe4;" k="47" />
+<hkern u1="V" u2="&#xe3;" k="47" />
+<hkern u1="V" u2="&#xe2;" k="47" />
+<hkern u1="V" u2="&#xe1;" k="47" />
+<hkern u1="V" u2="&#xe0;" k="47" />
+<hkern u1="V" u2="&#xd8;" k="20" />
+<hkern u1="V" u2="&#xd6;" k="20" />
+<hkern u1="V" u2="&#xd5;" k="20" />
+<hkern u1="V" u2="&#xd4;" k="20" />
+<hkern u1="V" u2="&#xd3;" k="20" />
+<hkern u1="V" u2="&#xd2;" k="20" />
+<hkern u1="V" u2="&#xc7;" k="18" />
+<hkern u1="V" u2="&#xc6;" k="63" />
+<hkern u1="V" u2="&#xc5;" k="55" />
+<hkern u1="V" u2="&#xc4;" k="55" />
+<hkern u1="V" u2="&#xc3;" k="55" />
+<hkern u1="V" u2="&#xc2;" k="55" />
+<hkern u1="V" u2="&#xc1;" k="55" />
+<hkern u1="V" u2="&#xc0;" k="55" />
+<hkern u1="V" u2="&#xbb;" k="23" />
+<hkern u1="V" u2="&#xab;" k="49" />
+<hkern u1="V" u2="z" k="27" />
+<hkern u1="V" u2="y" k="12" />
+<hkern u1="V" u2="x" k="14" />
+<hkern u1="V" u2="w" k="18" />
+<hkern u1="V" u2="v" k="12" />
+<hkern u1="V" u2="u" k="35" />
+<hkern u1="V" u2="s" k="45" />
+<hkern u1="V" u2="r" k="43" />
+<hkern u1="V" u2="q" k="57" />
+<hkern u1="V" u2="p" k="43" />
+<hkern u1="V" u2="o" k="59" />
+<hkern u1="V" u2="n" k="43" />
+<hkern u1="V" u2="m" k="43" />
+<hkern u1="V" u2="g" k="61" />
+<hkern u1="V" u2="f" k="14" />
+<hkern u1="V" u2="e" k="59" />
+<hkern u1="V" u2="d" k="57" />
+<hkern u1="V" u2="c" k="59" />
+<hkern u1="V" u2="a" k="47" />
+<hkern u1="V" u2="S" k="16" />
+<hkern u1="V" u2="Q" k="20" />
+<hkern u1="V" u2="O" k="20" />
+<hkern u1="V" u2="J" k="23" />
+<hkern u1="V" u2="G" k="20" />
+<hkern u1="V" u2="C" k="18" />
+<hkern u1="V" u2="A" k="55" />
+<hkern u1="V" u2="&#x40;" k="25" />
+<hkern u1="V" u2="&#x3b;" k="20" />
+<hkern u1="V" u2="&#x3a;" k="20" />
+<hkern u1="V" u2="&#x2f;" k="82" />
+<hkern u1="V" u2="&#x2e;" k="82" />
+<hkern u1="V" u2="&#x2d;" k="49" />
+<hkern u1="V" u2="&#x2c;" k="82" />
+<hkern u1="V" u2="&#x26;" k="29" />
+<hkern u1="W" u2="&#xf0;" k="27" />
+<hkern u1="W" u2="&#xef;" k="-109" />
+<hkern u1="W" u2="&#xee;" k="-61" />
+<hkern u1="W" u2="&#xec;" k="-111" />
+<hkern u1="W" u2="&#xc6;" k="47" />
+<hkern u1="W" u2="&#x2f;" k="59" />
+<hkern u1="X" u2="&#x2039;" k="37" />
+<hkern u1="X" u2="&#x2014;" k="66" />
+<hkern u1="X" u2="&#x2013;" k="66" />
+<hkern u1="X" u2="&#x153;" k="53" />
+<hkern u1="X" u2="&#x152;" k="35" />
+<hkern u1="X" u2="&#xff;" k="47" />
+<hkern u1="X" u2="&#xfd;" k="47" />
+<hkern u1="X" u2="&#xfc;" k="39" />
+<hkern u1="X" u2="&#xfb;" k="39" />
+<hkern u1="X" u2="&#xfa;" k="39" />
+<hkern u1="X" u2="&#xf9;" k="39" />
+<hkern u1="X" u2="&#xf8;" k="53" />
+<hkern u1="X" u2="&#xf6;" k="53" />
+<hkern u1="X" u2="&#xf5;" k="53" />
+<hkern u1="X" u2="&#xf4;" k="53" />
+<hkern u1="X" u2="&#xf3;" k="53" />
+<hkern u1="X" u2="&#xf2;" k="53" />
+<hkern u1="X" u2="&#xf1;" k="10" />
+<hkern u1="X" u2="&#xf0;" k="35" />
+<hkern u1="X" u2="&#xef;" k="-127" />
+<hkern u1="X" u2="&#xee;" k="-27" />
+<hkern u1="X" u2="&#xec;" k="-113" />
+<hkern u1="X" u2="&#xeb;" k="53" />
+<hkern u1="X" u2="&#xea;" k="53" />
+<hkern u1="X" u2="&#xe9;" k="53" />
+<hkern u1="X" u2="&#xe8;" k="53" />
+<hkern u1="X" u2="&#xe7;" k="53" />
+<hkern u1="X" u2="&#xe6;" k="10" />
+<hkern u1="X" u2="&#xe5;" k="10" />
+<hkern u1="X" u2="&#xe4;" k="10" />
+<hkern u1="X" u2="&#xe3;" k="10" />
+<hkern u1="X" u2="&#xe2;" k="10" />
+<hkern u1="X" u2="&#xe1;" k="10" />
+<hkern u1="X" u2="&#xe0;" k="10" />
+<hkern u1="X" u2="&#xd8;" k="35" />
+<hkern u1="X" u2="&#xd6;" k="35" />
+<hkern u1="X" u2="&#xd5;" k="35" />
+<hkern u1="X" u2="&#xd4;" k="35" />
+<hkern u1="X" u2="&#xd3;" k="35" />
+<hkern u1="X" u2="&#xd2;" k="35" />
+<hkern u1="X" u2="&#xc7;" k="33" />
+<hkern u1="X" u2="&#xab;" k="37" />
+<hkern u1="X" u2="y" k="47" />
+<hkern u1="X" u2="w" k="49" />
+<hkern u1="X" u2="v" k="45" />
+<hkern u1="X" u2="u" k="39" />
+<hkern u1="X" u2="t" k="20" />
+<hkern u1="X" u2="r" k="10" />
+<hkern u1="X" u2="q" k="41" />
+<hkern u1="X" u2="p" k="10" />
+<hkern u1="X" u2="o" k="53" />
+<hkern u1="X" u2="n" k="10" />
+<hkern u1="X" u2="m" k="10" />
+<hkern u1="X" u2="g" k="41" />
+<hkern u1="X" u2="f" k="18" />
+<hkern u1="X" u2="e" k="53" />
+<hkern u1="X" u2="d" k="41" />
+<hkern u1="X" u2="c" k="53" />
+<hkern u1="X" u2="a" k="10" />
+<hkern u1="X" u2="Q" k="35" />
+<hkern u1="X" u2="O" k="35" />
+<hkern u1="X" u2="G" k="35" />
+<hkern u1="X" u2="C" k="33" />
+<hkern u1="X" u2="&#x2d;" k="66" />
+<hkern u1="Y" u2="&#xff;" k="49" />
+<hkern u1="Y" u2="&#xf0;" k="53" />
+<hkern u1="Y" u2="&#xef;" k="-143" />
+<hkern u1="Y" u2="&#xee;" k="-43" />
+<hkern u1="Y" u2="&#xec;" k="-127" />
+<hkern u1="Y" u2="&#xeb;" k="125" />
+<hkern u1="Y" u2="&#xe4;" k="88" />
+<hkern u1="Y" u2="&#xe3;" k="70" />
+<hkern u1="Y" u2="&#xdf;" k="29" />
+<hkern u1="Y" u2="&#xc6;" k="121" />
+<hkern u1="Y" u2="&#xae;" k="39" />
+<hkern u1="Y" u2="x" k="70" />
+<hkern u1="Y" u2="v" k="68" />
+<hkern u1="Y" u2="f" k="47" />
+<hkern u1="Y" u2="&#x40;" k="72" />
+<hkern u1="Y" u2="&#x2f;" k="133" />
+<hkern u1="Y" u2="&#x2a;" k="-10" />
+<hkern u1="Y" u2="&#x26;" k="57" />
+<hkern u1="Z" u2="&#xf0;" k="14" />
+<hkern u1="Z" u2="&#xef;" k="-61" />
+<hkern u1="Z" u2="&#xee;" k="-57" />
+<hkern u1="Z" u2="&#xec;" k="-84" />
+<hkern u1="Z" u2="v" k="14" />
+<hkern u1="Z" u2="f" k="14" />
+<hkern u1="[" u2="&#x153;" k="55" />
+<hkern u1="[" u2="&#x152;" k="41" />
+<hkern u1="[" u2="&#xff;" k="41" />
+<hkern u1="[" u2="&#xfd;" k="41" />
+<hkern u1="[" u2="&#xfc;" k="41" />
+<hkern u1="[" u2="&#xfb;" k="41" />
+<hkern u1="[" u2="&#xfa;" k="41" />
+<hkern u1="[" u2="&#xf9;" k="41" />
+<hkern u1="[" u2="&#xf8;" k="55" />
+<hkern u1="[" u2="&#xf6;" k="55" />
+<hkern u1="[" u2="&#xf5;" k="55" />
+<hkern u1="[" u2="&#xf4;" k="55" />
+<hkern u1="[" u2="&#xf3;" k="55" />
+<hkern u1="[" u2="&#xf2;" k="55" />
+<hkern u1="[" u2="&#xf0;" k="23" />
+<hkern u1="[" u2="&#xef;" k="-78" />
+<hkern u1="[" u2="&#xec;" k="-98" />
+<hkern u1="[" u2="&#xeb;" k="55" />
+<hkern u1="[" u2="&#xea;" k="55" />
+<hkern u1="[" u2="&#xe9;" k="55" />
+<hkern u1="[" u2="&#xe8;" k="55" />
+<hkern u1="[" u2="&#xe7;" k="55" />
+<hkern u1="[" u2="&#xe6;" k="35" />
+<hkern u1="[" u2="&#xe5;" k="35" />
+<hkern u1="[" u2="&#xe4;" k="35" />
+<hkern u1="[" u2="&#xe3;" k="35" />
+<hkern u1="[" u2="&#xe2;" k="35" />
+<hkern u1="[" u2="&#xe1;" k="35" />
+<hkern u1="[" u2="&#xe0;" k="35" />
+<hkern u1="[" u2="&#xd8;" k="41" />
+<hkern u1="[" u2="&#xd6;" k="41" />
+<hkern u1="[" u2="&#xd5;" k="41" />
+<hkern u1="[" u2="&#xd4;" k="41" />
+<hkern u1="[" u2="&#xd3;" k="41" />
+<hkern u1="[" u2="&#xd2;" k="41" />
+<hkern u1="[" u2="&#xc7;" k="33" />
+<hkern u1="[" u2="&#x7b;" k="37" />
+<hkern u1="[" u2="y" k="41" />
+<hkern u1="[" u2="w" k="43" />
+<hkern u1="[" u2="v" k="41" />
+<hkern u1="[" u2="u" k="41" />
+<hkern u1="[" u2="t" k="23" />
+<hkern u1="[" u2="q" k="53" />
+<hkern u1="[" u2="o" k="55" />
+<hkern u1="[" u2="j" k="-18" />
+<hkern u1="[" u2="f" k="20" />
+<hkern u1="[" u2="e" k="55" />
+<hkern u1="[" u2="d" k="53" />
+<hkern u1="[" u2="c" k="55" />
+<hkern u1="[" u2="a" k="35" />
+<hkern u1="[" u2="Q" k="41" />
+<hkern u1="[" u2="O" k="41" />
+<hkern u1="[" u2="G" k="41" />
+<hkern u1="[" u2="C" k="33" />
+<hkern u1="\" u2="&#x201d;" k="139" />
+<hkern u1="\" u2="&#x2019;" k="139" />
+<hkern u1="\" u2="&#x178;" k="145" />
+<hkern u1="\" u2="&#x153;" k="20" />
+<hkern u1="\" u2="&#x152;" k="41" />
+<hkern u1="\" u2="&#xff;" k="45" />
+<hkern u1="\" u2="&#xfd;" k="45" />
+<hkern u1="\" u2="&#xf8;" k="20" />
+<hkern u1="\" u2="&#xf6;" k="20" />
+<hkern u1="\" u2="&#xf5;" k="20" />
+<hkern u1="\" u2="&#xf4;" k="20" />
+<hkern u1="\" u2="&#xf3;" k="20" />
+<hkern u1="\" u2="&#xf2;" k="20" />
+<hkern u1="\" u2="&#xeb;" k="20" />
+<hkern u1="\" u2="&#xea;" k="20" />
+<hkern u1="\" u2="&#xe9;" k="20" />
+<hkern u1="\" u2="&#xe8;" k="20" />
+<hkern u1="\" u2="&#xe7;" k="20" />
+<hkern u1="\" u2="&#xdd;" k="145" />
+<hkern u1="\" u2="&#xdc;" k="45" />
+<hkern u1="\" u2="&#xdb;" k="45" />
+<hkern u1="\" u2="&#xda;" k="45" />
+<hkern u1="\" u2="&#xd9;" k="45" />
+<hkern u1="\" u2="&#xd8;" k="41" />
+<hkern u1="\" u2="&#xd6;" k="41" />
+<hkern u1="\" u2="&#xd5;" k="41" />
+<hkern u1="\" u2="&#xd4;" k="41" />
+<hkern u1="\" u2="&#xd3;" k="41" />
+<hkern u1="\" u2="&#xd2;" k="41" />
+<hkern u1="\" u2="&#xc7;" k="39" />
+<hkern u1="\" u2="y" k="45" />
+<hkern u1="\" u2="w" k="35" />
+<hkern u1="\" u2="v" k="43" />
+<hkern u1="\" u2="t" k="33" />
+<hkern u1="\" u2="o" k="20" />
+<hkern u1="\" u2="f" k="25" />
+<hkern u1="\" u2="e" k="20" />
+<hkern u1="\" u2="c" k="20" />
+<hkern u1="\" u2="Y" k="145" />
+<hkern u1="\" u2="W" k="70" />
+<hkern u1="\" u2="V" k="92" />
+<hkern u1="\" u2="U" k="45" />
+<hkern u1="\" u2="T" k="115" />
+<hkern u1="\" u2="S" k="20" />
+<hkern u1="\" u2="Q" k="41" />
+<hkern u1="\" u2="O" k="41" />
+<hkern u1="\" u2="G" k="41" />
+<hkern u1="\" u2="C" k="39" />
+<hkern u1="\" u2="&#x27;" k="150" />
+<hkern u1="\" u2="&#x22;" k="150" />
+<hkern u1="a" u2="&#x2122;" k="31" />
+<hkern u1="a" u2="v" k="12" />
+<hkern u1="a" u2="\" k="88" />
+<hkern u1="a" u2="V" k="57" />
+<hkern u1="a" u2="&#x3f;" k="27" />
+<hkern u1="a" u2="&#x2a;" k="16" />
+<hkern u1="b" u2="&#x2122;" k="31" />
+<hkern u1="b" u2="&#xc6;" k="12" />
+<hkern u1="b" u2="&#x7d;" k="37" />
+<hkern u1="b" u2="x" k="16" />
+<hkern u1="b" u2="v" k="12" />
+<hkern u1="b" u2="]" k="53" />
+<hkern u1="b" u2="\" k="82" />
+<hkern u1="b" u2="X" k="45" />
+<hkern u1="b" u2="V" k="55" />
+<hkern u1="b" u2="&#x3f;" k="33" />
+<hkern u1="b" u2="&#x2a;" k="16" />
+<hkern u1="b" u2="&#x29;" k="39" />
+<hkern u1="c" u2="&#xf0;" k="14" />
+<hkern u1="c" u2="\" k="49" />
+<hkern u1="c" u2="V" k="25" />
+<hkern u1="d" u2="&#xef;" k="-16" />
+<hkern u1="d" u2="&#xec;" k="-37" />
+<hkern u1="e" u2="&#x2122;" k="25" />
+<hkern u1="e" u2="&#xc6;" k="10" />
+<hkern u1="e" u2="&#x7d;" k="20" />
+<hkern u1="e" u2="v" k="12" />
+<hkern u1="e" u2="\" k="78" />
+<hkern u1="e" u2="X" k="10" />
+<hkern u1="e" u2="V" k="51" />
+<hkern u1="e" u2="&#x3f;" k="23" />
+<hkern u1="e" u2="&#x29;" k="25" />
+<hkern u1="f" u2="&#x2039;" k="49" />
+<hkern u1="f" u2="&#x2026;" k="70" />
+<hkern u1="f" u2="&#x201e;" k="70" />
+<hkern u1="f" u2="&#x201a;" k="70" />
+<hkern u1="f" u2="&#x2014;" k="63" />
+<hkern u1="f" u2="&#x2013;" k="63" />
+<hkern u1="f" u2="&#x178;" k="-27" />
+<hkern u1="f" u2="&#x153;" k="8" />
+<hkern u1="f" u2="&#xf8;" k="8" />
+<hkern u1="f" u2="&#xf6;" k="8" />
+<hkern u1="f" u2="&#xf5;" k="8" />
+<hkern u1="f" u2="&#xf4;" k="8" />
+<hkern u1="f" u2="&#xf3;" k="8" />
+<hkern u1="f" u2="&#xf2;" k="8" />
+<hkern u1="f" u2="&#xf0;" k="39" />
+<hkern u1="f" u2="&#xef;" k="-121" />
+<hkern u1="f" u2="&#xee;" k="-90" />
+<hkern u1="f" u2="&#xec;" k="-139" />
+<hkern u1="f" u2="&#xeb;" k="8" />
+<hkern u1="f" u2="&#xea;" k="8" />
+<hkern u1="f" u2="&#xe9;" k="8" />
+<hkern u1="f" u2="&#xe8;" k="8" />
+<hkern u1="f" u2="&#xe7;" k="8" />
+<hkern u1="f" u2="&#xdd;" k="-27" />
+<hkern u1="f" u2="&#xc6;" k="49" />
+<hkern u1="f" u2="&#xc5;" k="37" />
+<hkern u1="f" u2="&#xc4;" k="37" />
+<hkern u1="f" u2="&#xc3;" k="37" />
+<hkern u1="f" u2="&#xc2;" k="37" />
+<hkern u1="f" u2="&#xc1;" k="37" />
+<hkern u1="f" u2="&#xc0;" k="37" />
+<hkern u1="f" u2="&#xab;" k="49" />
+<hkern u1="f" u2="o" k="8" />
+<hkern u1="f" u2="e" k="8" />
+<hkern u1="f" u2="c" k="8" />
+<hkern u1="f" u2="Y" k="-27" />
+<hkern u1="f" u2="J" k="14" />
+<hkern u1="f" u2="A" k="37" />
+<hkern u1="f" u2="&#x2f;" k="51" />
+<hkern u1="f" u2="&#x2e;" k="70" />
+<hkern u1="f" u2="&#x2d;" k="63" />
+<hkern u1="f" u2="&#x2c;" k="70" />
+<hkern u1="g" u2="&#xf0;" k="12" />
+<hkern u1="g" u2="j" k="-49" />
+<hkern u1="g" u2="\" k="31" />
+<hkern u1="g" u2="V" k="10" />
+<hkern u1="h" u2="&#x2122;" k="29" />
+<hkern u1="h" u2="v" k="8" />
+<hkern u1="h" u2="\" k="82" />
+<hkern u1="h" u2="V" k="55" />
+<hkern u1="h" u2="&#x3f;" k="29" />
+<hkern u1="h" u2="&#x2a;" k="16" />
+<hkern u1="h" u2="&#x29;" k="23" />
+<hkern u1="i" u2="&#xef;" k="-16" />
+<hkern u1="i" u2="&#xec;" k="-37" />
+<hkern u1="j" u2="&#xef;" k="-16" />
+<hkern u1="j" u2="&#xec;" k="-37" />
+<hkern u1="k" u2="&#xf0;" k="25" />
+<hkern u1="k" u2="\" k="35" />
+<hkern u1="k" u2="V" k="16" />
+<hkern u1="l" u2="&#xec;" k="-25" />
+<hkern u1="l" u2="&#xb7;" k="131" />
+<hkern u1="m" u2="&#x2122;" k="29" />
+<hkern u1="m" u2="v" k="8" />
+<hkern u1="m" u2="\" k="82" />
+<hkern u1="m" u2="V" k="55" />
+<hkern u1="m" u2="&#x3f;" k="29" />
+<hkern u1="m" u2="&#x2a;" k="16" />
+<hkern u1="m" u2="&#x29;" k="23" />
+<hkern u1="n" u2="&#x2122;" k="29" />
+<hkern u1="n" u2="v" k="8" />
+<hkern u1="n" u2="\" k="82" />
+<hkern u1="n" u2="V" k="55" />
+<hkern u1="n" u2="&#x3f;" k="29" />
+<hkern u1="n" u2="&#x2a;" k="16" />
+<hkern u1="n" u2="&#x29;" k="23" />
+<hkern u1="o" u2="&#x2122;" k="29" />
+<hkern u1="o" u2="&#xc6;" k="14" />
+<hkern u1="o" u2="&#x7d;" k="39" />
+<hkern u1="o" u2="x" k="20" />
+<hkern u1="o" u2="v" k="14" />
+<hkern u1="o" u2="]" k="55" />
+<hkern u1="o" u2="\" k="84" />
+<hkern u1="o" u2="X" k="53" />
+<hkern u1="o" u2="V" k="59" />
+<hkern u1="o" u2="&#x3f;" k="31" />
+<hkern u1="o" u2="&#x2a;" k="16" />
+<hkern u1="o" u2="&#x29;" k="41" />
+<hkern u1="p" u2="&#x2122;" k="31" />
+<hkern u1="p" u2="&#xc6;" k="12" />
+<hkern u1="p" u2="&#x7d;" k="37" />
+<hkern u1="p" u2="x" k="16" />
+<hkern u1="p" u2="v" k="12" />
+<hkern u1="p" u2="]" k="53" />
+<hkern u1="p" u2="\" k="82" />
+<hkern u1="p" u2="X" k="45" />
+<hkern u1="p" u2="V" k="55" />
+<hkern u1="p" u2="&#x3f;" k="33" />
+<hkern u1="p" u2="&#x2a;" k="16" />
+<hkern u1="p" u2="&#x29;" k="39" />
+<hkern u1="q" u2="&#x2122;" k="18" />
+<hkern u1="q" u2="\" k="57" />
+<hkern u1="q" u2="X" k="10" />
+<hkern u1="q" u2="V" k="43" />
+<hkern u1="q" u2="&#x29;" k="23" />
+<hkern u1="r" u2="&#xf0;" k="39" />
+<hkern u1="r" u2="&#xc6;" k="63" />
+<hkern u1="r" u2="&#x7d;" k="25" />
+<hkern u1="r" u2="]" k="39" />
+<hkern u1="r" u2="\" k="23" />
+<hkern u1="r" u2="X" k="59" />
+<hkern u1="r" u2="&#x2f;" k="68" />
+<hkern u1="r" u2="&#x29;" k="20" />
+<hkern u1="s" u2="&#x2122;" k="23" />
+<hkern u1="s" u2="&#xc6;" k="10" />
+<hkern u1="s" u2="&#x7d;" k="25" />
+<hkern u1="s" u2="v" k="10" />
+<hkern u1="s" u2="]" k="37" />
+<hkern u1="s" u2="\" k="59" />
+<hkern u1="s" u2="X" k="16" />
+<hkern u1="s" u2="V" k="37" />
+<hkern u1="s" u2="&#x29;" k="27" />
+<hkern u1="t" u2="\" k="35" />
+<hkern u1="t" u2="V" k="12" />
+<hkern u1="u" u2="&#x2122;" k="18" />
+<hkern u1="u" u2="\" k="57" />
+<hkern u1="u" u2="X" k="10" />
+<hkern u1="u" u2="V" k="43" />
+<hkern u1="u" u2="&#x29;" k="23" />
+<hkern u1="v" u2="&#x2039;" k="20" />
+<hkern u1="v" u2="&#x2026;" k="47" />
+<hkern u1="v" u2="&#x201e;" k="47" />
+<hkern u1="v" u2="&#x201a;" k="47" />
+<hkern u1="v" u2="&#x2014;" k="18" />
+<hkern u1="v" u2="&#x2013;" k="18" />
+<hkern u1="v" u2="&#x178;" k="68" />
+<hkern u1="v" u2="&#x153;" k="14" />
+<hkern u1="v" u2="&#xf8;" k="14" />
+<hkern u1="v" u2="&#xf6;" k="14" />
+<hkern u1="v" u2="&#xf5;" k="14" />
+<hkern u1="v" u2="&#xf4;" k="14" />
+<hkern u1="v" u2="&#xf3;" k="14" />
+<hkern u1="v" u2="&#xf2;" k="14" />
+<hkern u1="v" u2="&#xf0;" k="23" />
+<hkern u1="v" u2="&#xeb;" k="14" />
+<hkern u1="v" u2="&#xea;" k="14" />
+<hkern u1="v" u2="&#xe9;" k="14" />
+<hkern u1="v" u2="&#xe8;" k="14" />
+<hkern u1="v" u2="&#xe7;" k="14" />
+<hkern u1="v" u2="&#xe6;" k="12" />
+<hkern u1="v" u2="&#xe5;" k="12" />
+<hkern u1="v" u2="&#xe4;" k="12" />
+<hkern u1="v" u2="&#xe3;" k="12" />
+<hkern u1="v" u2="&#xe2;" k="12" />
+<hkern u1="v" u2="&#xe1;" k="12" />
+<hkern u1="v" u2="&#xe0;" k="12" />
+<hkern u1="v" u2="&#xdd;" k="68" />
+<hkern u1="v" u2="&#xc6;" k="35" />
+<hkern u1="v" u2="&#xc5;" k="29" />
+<hkern u1="v" u2="&#xc4;" k="29" />
+<hkern u1="v" u2="&#xc3;" k="29" />
+<hkern u1="v" u2="&#xc2;" k="29" />
+<hkern u1="v" u2="&#xc1;" k="29" />
+<hkern u1="v" u2="&#xc0;" k="29" />
+<hkern u1="v" u2="&#xab;" k="20" />
+<hkern u1="v" u2="&#x7d;" k="25" />
+<hkern u1="v" u2="s" k="10" />
+<hkern u1="v" u2="q" k="12" />
+<hkern u1="v" u2="o" k="14" />
+<hkern u1="v" u2="g" k="14" />
+<hkern u1="v" u2="e" k="14" />
+<hkern u1="v" u2="d" k="12" />
+<hkern u1="v" u2="c" k="14" />
+<hkern u1="v" u2="a" k="12" />
+<hkern u1="v" u2="]" k="41" />
+<hkern u1="v" u2="\" k="37" />
+<hkern u1="v" u2="Z" k="14" />
+<hkern u1="v" u2="Y" k="68" />
+<hkern u1="v" u2="X" k="45" />
+<hkern u1="v" u2="V" k="12" />
+<hkern u1="v" u2="T" k="102" />
+<hkern u1="v" u2="J" k="25" />
+<hkern u1="v" u2="A" k="29" />
+<hkern u1="v" u2="&#x2f;" k="37" />
+<hkern u1="v" u2="&#x2e;" k="47" />
+<hkern u1="v" u2="&#x2d;" k="18" />
+<hkern u1="v" u2="&#x2c;" k="47" />
+<hkern u1="v" u2="&#x29;" k="23" />
+<hkern u1="w" u2="&#xf0;" k="14" />
+<hkern u1="w" u2="&#xc6;" k="29" />
+<hkern u1="w" u2="&#x7d;" k="31" />
+<hkern u1="w" u2="]" k="43" />
+<hkern u1="w" u2="\" k="37" />
+<hkern u1="w" u2="X" k="47" />
+<hkern u1="w" u2="V" k="18" />
+<hkern u1="w" u2="&#x2f;" k="29" />
+<hkern u1="w" u2="&#x29;" k="29" />
+<hkern u1="x" u2="&#x2039;" k="43" />
+<hkern u1="x" u2="&#x2014;" k="49" />
+<hkern u1="x" u2="&#x2013;" k="49" />
+<hkern u1="x" u2="&#x178;" k="66" />
+<hkern u1="x" u2="&#x153;" k="20" />
+<hkern u1="x" u2="&#xf8;" k="20" />
+<hkern u1="x" u2="&#xf6;" k="20" />
+<hkern u1="x" u2="&#xf5;" k="20" />
+<hkern u1="x" u2="&#xf4;" k="20" />
+<hkern u1="x" u2="&#xf3;" k="20" />
+<hkern u1="x" u2="&#xf2;" k="20" />
+<hkern u1="x" u2="&#xf0;" k="33" />
+<hkern u1="x" u2="&#xeb;" k="20" />
+<hkern u1="x" u2="&#xea;" k="20" />
+<hkern u1="x" u2="&#xe9;" k="20" />
+<hkern u1="x" u2="&#xe8;" k="20" />
+<hkern u1="x" u2="&#xe7;" k="20" />
+<hkern u1="x" u2="&#xdd;" k="66" />
+<hkern u1="x" u2="&#xab;" k="43" />
+<hkern u1="x" u2="q" k="18" />
+<hkern u1="x" u2="o" k="20" />
+<hkern u1="x" u2="g" k="16" />
+<hkern u1="x" u2="e" k="20" />
+<hkern u1="x" u2="d" k="18" />
+<hkern u1="x" u2="c" k="20" />
+<hkern u1="x" u2="\" k="31" />
+<hkern u1="x" u2="Y" k="66" />
+<hkern u1="x" u2="V" k="12" />
+<hkern u1="x" u2="T" k="98" />
+<hkern u1="x" u2="&#x2d;" k="49" />
+<hkern u1="y" u2="&#xf0;" k="27" />
+<hkern u1="y" u2="&#xc6;" k="37" />
+<hkern u1="y" u2="&#x7d;" k="23" />
+<hkern u1="y" u2="]" k="39" />
+<hkern u1="y" u2="\" k="37" />
+<hkern u1="y" u2="X" k="45" />
+<hkern u1="y" u2="V" k="12" />
+<hkern u1="y" u2="&#x2f;" k="39" />
+<hkern u1="z" u2="&#xf0;" k="8" />
+<hkern u1="z" u2="\" k="51" />
+<hkern u1="z" u2="V" k="27" />
+<hkern u1="&#x7b;" u2="&#x153;" k="39" />
+<hkern u1="&#x7b;" u2="&#x152;" k="29" />
+<hkern u1="&#x7b;" u2="&#xff;" k="25" />
+<hkern u1="&#x7b;" u2="&#xfd;" k="25" />
+<hkern u1="&#x7b;" u2="&#xfc;" k="31" />
+<hkern u1="&#x7b;" u2="&#xfb;" k="31" />
+<hkern u1="&#x7b;" u2="&#xfa;" k="31" />
+<hkern u1="&#x7b;" u2="&#xf9;" k="31" />
+<hkern u1="&#x7b;" u2="&#xf8;" k="39" />
+<hkern u1="&#x7b;" u2="&#xf6;" k="39" />
+<hkern u1="&#x7b;" u2="&#xf5;" k="39" />
+<hkern u1="&#x7b;" u2="&#xf4;" k="39" />
+<hkern u1="&#x7b;" u2="&#xf3;" k="39" />
+<hkern u1="&#x7b;" u2="&#xf2;" k="39" />
+<hkern u1="&#x7b;" u2="&#xef;" k="-76" />
+<hkern u1="&#x7b;" u2="&#xec;" k="-92" />
+<hkern u1="&#x7b;" u2="&#xeb;" k="39" />
+<hkern u1="&#x7b;" u2="&#xea;" k="39" />
+<hkern u1="&#x7b;" u2="&#xe9;" k="39" />
+<hkern u1="&#x7b;" u2="&#xe8;" k="39" />
+<hkern u1="&#x7b;" u2="&#xe7;" k="39" />
+<hkern u1="&#x7b;" u2="&#xe6;" k="25" />
+<hkern u1="&#x7b;" u2="&#xe5;" k="25" />
+<hkern u1="&#x7b;" u2="&#xe4;" k="25" />
+<hkern u1="&#x7b;" u2="&#xe3;" k="25" />
+<hkern u1="&#x7b;" u2="&#xe2;" k="25" />
+<hkern u1="&#x7b;" u2="&#xe1;" k="25" />
+<hkern u1="&#x7b;" u2="&#xe0;" k="25" />
+<hkern u1="&#x7b;" u2="&#xd8;" k="29" />
+<hkern u1="&#x7b;" u2="&#xd6;" k="29" />
+<hkern u1="&#x7b;" u2="&#xd5;" k="29" />
+<hkern u1="&#x7b;" u2="&#xd4;" k="29" />
+<hkern u1="&#x7b;" u2="&#xd3;" k="29" />
+<hkern u1="&#x7b;" u2="&#xd2;" k="29" />
+<hkern u1="&#x7b;" u2="&#xc7;" k="25" />
+<hkern u1="&#x7b;" u2="&#x7b;" k="25" />
+<hkern u1="&#x7b;" u2="y" k="25" />
+<hkern u1="&#x7b;" u2="w" k="31" />
+<hkern u1="&#x7b;" u2="v" k="25" />
+<hkern u1="&#x7b;" u2="u" k="31" />
+<hkern u1="&#x7b;" u2="q" k="37" />
+<hkern u1="&#x7b;" u2="o" k="39" />
+<hkern u1="&#x7b;" u2="j" k="-43" />
+<hkern u1="&#x7b;" u2="e" k="39" />
+<hkern u1="&#x7b;" u2="d" k="37" />
+<hkern u1="&#x7b;" u2="c" k="39" />
+<hkern u1="&#x7b;" u2="a" k="25" />
+<hkern u1="&#x7b;" u2="Q" k="29" />
+<hkern u1="&#x7b;" u2="O" k="29" />
+<hkern u1="&#x7b;" u2="G" k="29" />
+<hkern u1="&#x7b;" u2="C" k="25" />
+<hkern u1="&#x7c;" u2="&#xec;" k="-31" />
+<hkern u1="&#x7d;" u2="&#x7d;" k="25" />
+<hkern u1="&#x7d;" u2="]" k="37" />
+<hkern u1="&#x7d;" u2="&#x29;" k="27" />
+<hkern u1="&#xa1;" u2="&#x178;" k="55" />
+<hkern u1="&#xa1;" u2="&#xdd;" k="55" />
+<hkern u1="&#xa1;" u2="Y" k="55" />
+<hkern u1="&#xa1;" u2="T" k="61" />
+<hkern u1="&#xab;" u2="V" k="23" />
+<hkern u1="&#xae;" u2="&#x178;" k="39" />
+<hkern u1="&#xae;" u2="&#xdd;" k="39" />
+<hkern u1="&#xae;" u2="&#xc6;" k="53" />
+<hkern u1="&#xae;" u2="&#xc5;" k="41" />
+<hkern u1="&#xae;" u2="&#xc4;" k="41" />
+<hkern u1="&#xae;" u2="&#xc3;" k="41" />
+<hkern u1="&#xae;" u2="&#xc2;" k="41" />
+<hkern u1="&#xae;" u2="&#xc1;" k="41" />
+<hkern u1="&#xae;" u2="&#xc0;" k="41" />
+<hkern u1="&#xae;" u2="Y" k="39" />
+<hkern u1="&#xae;" u2="J" k="27" />
+<hkern u1="&#xae;" u2="A" k="41" />
+<hkern u1="&#xb7;" u2="l" k="131" />
+<hkern u1="&#xbb;" u2="x" k="43" />
+<hkern u1="&#xbb;" u2="f" k="20" />
+<hkern u1="&#xbb;" u2="X" k="41" />
+<hkern u1="&#xbb;" u2="V" k="47" />
+<hkern u1="&#xbf;" u2="&#x178;" k="115" />
+<hkern u1="&#xbf;" u2="&#x153;" k="45" />
+<hkern u1="&#xbf;" u2="&#x152;" k="35" />
+<hkern u1="&#xbf;" u2="&#xff;" k="51" />
+<hkern u1="&#xbf;" u2="&#xfe;" k="37" />
+<hkern u1="&#xbf;" u2="&#xfd;" k="51" />
+<hkern u1="&#xbf;" u2="&#xfc;" k="41" />
+<hkern u1="&#xbf;" u2="&#xfb;" k="41" />
+<hkern u1="&#xbf;" u2="&#xfa;" k="41" />
+<hkern u1="&#xbf;" u2="&#xf9;" k="41" />
+<hkern u1="&#xbf;" u2="&#xf8;" k="45" />
+<hkern u1="&#xbf;" u2="&#xf6;" k="45" />
+<hkern u1="&#xbf;" u2="&#xf5;" k="45" />
+<hkern u1="&#xbf;" u2="&#xf4;" k="45" />
+<hkern u1="&#xbf;" u2="&#xf3;" k="45" />
+<hkern u1="&#xbf;" u2="&#xf2;" k="45" />
+<hkern u1="&#xbf;" u2="&#xf1;" k="37" />
+<hkern u1="&#xbf;" u2="&#xf0;" k="49" />
+<hkern u1="&#xbf;" u2="&#xef;" k="37" />
+<hkern u1="&#xbf;" u2="&#xee;" k="37" />
+<hkern u1="&#xbf;" u2="&#xed;" k="37" />
+<hkern u1="&#xbf;" u2="&#xec;" k="37" />
+<hkern u1="&#xbf;" u2="&#xeb;" k="45" />
+<hkern u1="&#xbf;" u2="&#xea;" k="45" />
+<hkern u1="&#xbf;" u2="&#xe9;" k="45" />
+<hkern u1="&#xbf;" u2="&#xe8;" k="45" />
+<hkern u1="&#xbf;" u2="&#xe7;" k="45" />
+<hkern u1="&#xbf;" u2="&#xe6;" k="41" />
+<hkern u1="&#xbf;" u2="&#xe5;" k="41" />
+<hkern u1="&#xbf;" u2="&#xe4;" k="41" />
+<hkern u1="&#xbf;" u2="&#xe3;" k="41" />
+<hkern u1="&#xbf;" u2="&#xe2;" k="41" />
+<hkern u1="&#xbf;" u2="&#xe1;" k="41" />
+<hkern u1="&#xbf;" u2="&#xe0;" k="41" />
+<hkern u1="&#xbf;" u2="&#xdf;" k="37" />
+<hkern u1="&#xbf;" u2="&#xde;" k="29" />
+<hkern u1="&#xbf;" u2="&#xdd;" k="115" />
+<hkern u1="&#xbf;" u2="&#xdc;" k="37" />
+<hkern u1="&#xbf;" u2="&#xdb;" k="37" />
+<hkern u1="&#xbf;" u2="&#xda;" k="37" />
+<hkern u1="&#xbf;" u2="&#xd9;" k="37" />
+<hkern u1="&#xbf;" u2="&#xd8;" k="35" />
+<hkern u1="&#xbf;" u2="&#xd6;" k="35" />
+<hkern u1="&#xbf;" u2="&#xd5;" k="35" />
+<hkern u1="&#xbf;" u2="&#xd4;" k="35" />
+<hkern u1="&#xbf;" u2="&#xd3;" k="35" />
+<hkern u1="&#xbf;" u2="&#xd2;" k="35" />
+<hkern u1="&#xbf;" u2="&#xd1;" k="29" />
+<hkern u1="&#xbf;" u2="&#xd0;" k="29" />
+<hkern u1="&#xbf;" u2="&#xcf;" k="29" />
+<hkern u1="&#xbf;" u2="&#xce;" k="29" />
+<hkern u1="&#xbf;" u2="&#xcd;" k="29" />
+<hkern u1="&#xbf;" u2="&#xcc;" k="29" />
+<hkern u1="&#xbf;" u2="&#xcb;" k="29" />
+<hkern u1="&#xbf;" u2="&#xca;" k="29" />
+<hkern u1="&#xbf;" u2="&#xc9;" k="29" />
+<hkern u1="&#xbf;" u2="&#xc8;" k="29" />
+<hkern u1="&#xbf;" u2="&#xc7;" k="33" />
+<hkern u1="&#xbf;" u2="&#xc6;" k="35" />
+<hkern u1="&#xbf;" u2="&#xc5;" k="33" />
+<hkern u1="&#xbf;" u2="&#xc4;" k="33" />
+<hkern u1="&#xbf;" u2="&#xc3;" k="33" />
+<hkern u1="&#xbf;" u2="&#xc2;" k="33" />
+<hkern u1="&#xbf;" u2="&#xc1;" k="33" />
+<hkern u1="&#xbf;" u2="&#xc0;" k="33" />
+<hkern u1="&#xbf;" u2="z" k="37" />
+<hkern u1="&#xbf;" u2="y" k="51" />
+<hkern u1="&#xbf;" u2="x" k="35" />
+<hkern u1="&#xbf;" u2="w" k="45" />
+<hkern u1="&#xbf;" u2="v" k="49" />
+<hkern u1="&#xbf;" u2="u" k="41" />
+<hkern u1="&#xbf;" u2="t" k="41" />
+<hkern u1="&#xbf;" u2="s" k="41" />
+<hkern u1="&#xbf;" u2="r" k="37" />
+<hkern u1="&#xbf;" u2="q" k="45" />
+<hkern u1="&#xbf;" u2="p" k="37" />
+<hkern u1="&#xbf;" u2="o" k="45" />
+<hkern u1="&#xbf;" u2="n" k="37" />
+<hkern u1="&#xbf;" u2="m" k="37" />
+<hkern u1="&#xbf;" u2="l" k="37" />
+<hkern u1="&#xbf;" u2="k" k="37" />
+<hkern u1="&#xbf;" u2="j" k="37" />
+<hkern u1="&#xbf;" u2="i" k="37" />
+<hkern u1="&#xbf;" u2="h" k="37" />
+<hkern u1="&#xbf;" u2="f" k="41" />
+<hkern u1="&#xbf;" u2="e" k="45" />
+<hkern u1="&#xbf;" u2="d" k="45" />
+<hkern u1="&#xbf;" u2="c" k="45" />
+<hkern u1="&#xbf;" u2="b" k="37" />
+<hkern u1="&#xbf;" u2="a" k="41" />
+<hkern u1="&#xbf;" u2="Z" k="33" />
+<hkern u1="&#xbf;" u2="Y" k="115" />
+<hkern u1="&#xbf;" u2="X" k="37" />
+<hkern u1="&#xbf;" u2="W" k="53" />
+<hkern u1="&#xbf;" u2="V" k="68" />
+<hkern u1="&#xbf;" u2="U" k="37" />
+<hkern u1="&#xbf;" u2="T" k="121" />
+<hkern u1="&#xbf;" u2="S" k="25" />
+<hkern u1="&#xbf;" u2="R" k="29" />
+<hkern u1="&#xbf;" u2="Q" k="35" />
+<hkern u1="&#xbf;" u2="P" k="29" />
+<hkern u1="&#xbf;" u2="O" k="35" />
+<hkern u1="&#xbf;" u2="N" k="29" />
+<hkern u1="&#xbf;" u2="M" k="29" />
+<hkern u1="&#xbf;" u2="L" k="29" />
+<hkern u1="&#xbf;" u2="K" k="29" />
+<hkern u1="&#xbf;" u2="I" k="29" />
+<hkern u1="&#xbf;" u2="H" k="29" />
+<hkern u1="&#xbf;" u2="G" k="35" />
+<hkern u1="&#xbf;" u2="F" k="29" />
+<hkern u1="&#xbf;" u2="E" k="29" />
+<hkern u1="&#xbf;" u2="D" k="29" />
+<hkern u1="&#xbf;" u2="C" k="33" />
+<hkern u1="&#xbf;" u2="B" k="29" />
+<hkern u1="&#xbf;" u2="A" k="33" />
+<hkern u1="&#xc0;" u2="&#x2122;" k="61" />
+<hkern u1="&#xc0;" u2="&#xf0;" k="10" />
+<hkern u1="&#xc0;" u2="&#xae;" k="37" />
+<hkern u1="&#xc0;" u2="v" k="29" />
+<hkern u1="&#xc0;" u2="f" k="16" />
+<hkern u1="&#xc0;" u2="\" k="86" />
+<hkern u1="&#xc0;" u2="V" k="55" />
+<hkern u1="&#xc0;" u2="&#x3f;" k="29" />
+<hkern u1="&#xc0;" u2="&#x2a;" k="55" />
+<hkern u1="&#xc1;" u2="&#x2122;" k="61" />
+<hkern u1="&#xc1;" u2="&#xf0;" k="10" />
+<hkern u1="&#xc1;" u2="&#xae;" k="37" />
+<hkern u1="&#xc1;" u2="v" k="29" />
+<hkern u1="&#xc1;" u2="f" k="16" />
+<hkern u1="&#xc1;" u2="\" k="86" />
+<hkern u1="&#xc1;" u2="V" k="55" />
+<hkern u1="&#xc1;" u2="&#x3f;" k="29" />
+<hkern u1="&#xc1;" u2="&#x2a;" k="55" />
+<hkern u1="&#xc2;" u2="&#x2122;" k="61" />
+<hkern u1="&#xc2;" u2="&#xf0;" k="10" />
+<hkern u1="&#xc2;" u2="&#xae;" k="37" />
+<hkern u1="&#xc2;" u2="v" k="29" />
+<hkern u1="&#xc2;" u2="f" k="16" />
+<hkern u1="&#xc2;" u2="\" k="86" />
+<hkern u1="&#xc2;" u2="V" k="55" />
+<hkern u1="&#xc2;" u2="&#x3f;" k="29" />
+<hkern u1="&#xc2;" u2="&#x2a;" k="55" />
+<hkern u1="&#xc3;" u2="&#x2122;" k="61" />
+<hkern u1="&#xc3;" u2="&#xf0;" k="10" />
+<hkern u1="&#xc3;" u2="&#xae;" k="37" />
+<hkern u1="&#xc3;" u2="v" k="29" />
+<hkern u1="&#xc3;" u2="f" k="16" />
+<hkern u1="&#xc3;" u2="\" k="86" />
+<hkern u1="&#xc3;" u2="V" k="55" />
+<hkern u1="&#xc3;" u2="&#x3f;" k="29" />
+<hkern u1="&#xc3;" u2="&#x2a;" k="55" />
+<hkern u1="&#xc4;" u2="&#x2122;" k="61" />
+<hkern u1="&#xc4;" u2="&#xf0;" k="10" />
+<hkern u1="&#xc4;" u2="&#xae;" k="37" />
+<hkern u1="&#xc4;" u2="v" k="29" />
+<hkern u1="&#xc4;" u2="f" k="16" />
+<hkern u1="&#xc4;" u2="\" k="86" />
+<hkern u1="&#xc4;" u2="V" k="55" />
+<hkern u1="&#xc4;" u2="&#x3f;" k="29" />
+<hkern u1="&#xc4;" u2="&#x2a;" k="55" />
+<hkern u1="&#xc5;" u2="&#x2122;" k="61" />
+<hkern u1="&#xc5;" u2="&#xf0;" k="10" />
+<hkern u1="&#xc5;" u2="&#xae;" k="37" />
+<hkern u1="&#xc5;" u2="v" k="29" />
+<hkern u1="&#xc5;" u2="f" k="16" />
+<hkern u1="&#xc5;" u2="\" k="86" />
+<hkern u1="&#xc5;" u2="V" k="55" />
+<hkern u1="&#xc5;" u2="&#x3f;" k="29" />
+<hkern u1="&#xc5;" u2="&#x2a;" k="55" />
+<hkern u1="&#xc6;" u2="&#xf0;" k="12" />
+<hkern u1="&#xc6;" u2="&#xef;" k="-66" />
+<hkern u1="&#xc6;" u2="&#xee;" k="-59" />
+<hkern u1="&#xc6;" u2="&#xec;" k="-86" />
+<hkern u1="&#xc7;" u2="&#xf0;" k="12" />
+<hkern u1="&#xc7;" u2="&#xef;" k="-72" />
+<hkern u1="&#xc7;" u2="&#xee;" k="-59" />
+<hkern u1="&#xc7;" u2="&#xec;" k="-90" />
+<hkern u1="&#xc7;" u2="v" k="10" />
+<hkern u1="&#xc7;" u2="f" k="10" />
+<hkern u1="&#xc8;" u2="&#xf0;" k="12" />
+<hkern u1="&#xc8;" u2="&#xef;" k="-66" />
+<hkern u1="&#xc8;" u2="&#xee;" k="-59" />
+<hkern u1="&#xc8;" u2="&#xec;" k="-86" />
+<hkern u1="&#xc9;" u2="&#xf0;" k="12" />
+<hkern u1="&#xc9;" u2="&#xef;" k="-66" />
+<hkern u1="&#xc9;" u2="&#xee;" k="-59" />
+<hkern u1="&#xc9;" u2="&#xec;" k="-86" />
+<hkern u1="&#xca;" u2="&#xf0;" k="12" />
+<hkern u1="&#xca;" u2="&#xef;" k="-66" />
+<hkern u1="&#xca;" u2="&#xee;" k="-59" />
+<hkern u1="&#xca;" u2="&#xec;" k="-86" />
+<hkern u1="&#xcb;" u2="&#xf0;" k="12" />
+<hkern u1="&#xcb;" u2="&#xef;" k="-66" />
+<hkern u1="&#xcb;" u2="&#xee;" k="-59" />
+<hkern u1="&#xcb;" u2="&#xec;" k="-86" />
+<hkern u1="&#xcc;" u2="&#xf0;" k="16" />
+<hkern u1="&#xcc;" u2="&#xec;" k="-16" />
+<hkern u1="&#xcc;" u2="f" k="12" />
+<hkern u1="&#xcd;" u2="&#xf0;" k="16" />
+<hkern u1="&#xcd;" u2="&#xec;" k="-16" />
+<hkern u1="&#xcd;" u2="f" k="12" />
+<hkern u1="&#xce;" u2="&#xf0;" k="16" />
+<hkern u1="&#xce;" u2="&#xec;" k="-16" />
+<hkern u1="&#xce;" u2="f" k="12" />
+<hkern u1="&#xcf;" u2="&#xf0;" k="16" />
+<hkern u1="&#xcf;" u2="&#xec;" k="-16" />
+<hkern u1="&#xcf;" u2="f" k="12" />
+<hkern u1="&#xd0;" u2="&#xc6;" k="27" />
+<hkern u1="&#xd0;" u2="&#x7d;" k="25" />
+<hkern u1="&#xd0;" u2="]" k="39" />
+<hkern u1="&#xd0;" u2="\" k="37" />
+<hkern u1="&#xd0;" u2="X" k="37" />
+<hkern u1="&#xd0;" u2="V" k="20" />
+<hkern u1="&#xd0;" u2="&#x2f;" k="31" />
+<hkern u1="&#xd0;" u2="&#x29;" k="27" />
+<hkern u1="&#xd1;" u2="&#xf0;" k="16" />
+<hkern u1="&#xd1;" u2="&#xec;" k="-16" />
+<hkern u1="&#xd1;" u2="f" k="12" />
+<hkern u1="&#xd2;" u2="&#xc6;" k="27" />
+<hkern u1="&#xd2;" u2="&#x7d;" k="25" />
+<hkern u1="&#xd2;" u2="]" k="41" />
+<hkern u1="&#xd2;" u2="\" k="39" />
+<hkern u1="&#xd2;" u2="X" k="35" />
+<hkern u1="&#xd2;" u2="V" k="20" />
+<hkern u1="&#xd2;" u2="&#x2f;" k="29" />
+<hkern u1="&#xd2;" u2="&#x29;" k="27" />
+<hkern u1="&#xd3;" u2="&#xc6;" k="27" />
+<hkern u1="&#xd3;" u2="&#x7d;" k="25" />
+<hkern u1="&#xd3;" u2="]" k="41" />
+<hkern u1="&#xd3;" u2="\" k="39" />
+<hkern u1="&#xd3;" u2="X" k="35" />
+<hkern u1="&#xd3;" u2="V" k="20" />
+<hkern u1="&#xd3;" u2="&#x2f;" k="29" />
+<hkern u1="&#xd3;" u2="&#x29;" k="27" />
+<hkern u1="&#xd4;" u2="&#xc6;" k="27" />
+<hkern u1="&#xd4;" u2="&#x7d;" k="25" />
+<hkern u1="&#xd4;" u2="]" k="41" />
+<hkern u1="&#xd4;" u2="\" k="39" />
+<hkern u1="&#xd4;" u2="X" k="35" />
+<hkern u1="&#xd4;" u2="V" k="20" />
+<hkern u1="&#xd4;" u2="&#x2f;" k="29" />
+<hkern u1="&#xd4;" u2="&#x29;" k="27" />
+<hkern u1="&#xd5;" u2="&#xc6;" k="27" />
+<hkern u1="&#xd5;" u2="&#x7d;" k="25" />
+<hkern u1="&#xd5;" u2="]" k="41" />
+<hkern u1="&#xd5;" u2="\" k="39" />
+<hkern u1="&#xd5;" u2="X" k="35" />
+<hkern u1="&#xd5;" u2="V" k="20" />
+<hkern u1="&#xd5;" u2="&#x2f;" k="29" />
+<hkern u1="&#xd5;" u2="&#x29;" k="27" />
+<hkern u1="&#xd6;" u2="&#xc6;" k="27" />
+<hkern u1="&#xd6;" u2="&#x7d;" k="25" />
+<hkern u1="&#xd6;" u2="]" k="41" />
+<hkern u1="&#xd6;" u2="\" k="39" />
+<hkern u1="&#xd6;" u2="X" k="35" />
+<hkern u1="&#xd6;" u2="V" k="20" />
+<hkern u1="&#xd6;" u2="&#x2f;" k="29" />
+<hkern u1="&#xd6;" u2="&#x29;" k="27" />
+<hkern u1="&#xd8;" u2="&#xc6;" k="27" />
+<hkern u1="&#xd8;" u2="&#x7d;" k="25" />
+<hkern u1="&#xd8;" u2="]" k="41" />
+<hkern u1="&#xd8;" u2="\" k="39" />
+<hkern u1="&#xd8;" u2="X" k="35" />
+<hkern u1="&#xd8;" u2="V" k="20" />
+<hkern u1="&#xd8;" u2="&#x2f;" k="29" />
+<hkern u1="&#xd8;" u2="&#x29;" k="27" />
+<hkern u1="&#xd9;" u2="&#xf0;" k="16" />
+<hkern u1="&#xd9;" u2="&#xec;" k="-29" />
+<hkern u1="&#xd9;" u2="&#xc6;" k="14" />
+<hkern u1="&#xd9;" u2="f" k="10" />
+<hkern u1="&#xd9;" u2="&#x2f;" k="33" />
+<hkern u1="&#xda;" u2="&#xf0;" k="16" />
+<hkern u1="&#xda;" u2="&#xec;" k="-29" />
+<hkern u1="&#xda;" u2="&#xc6;" k="14" />
+<hkern u1="&#xda;" u2="f" k="10" />
+<hkern u1="&#xda;" u2="&#x2f;" k="33" />
+<hkern u1="&#xdb;" u2="&#xf0;" k="16" />
+<hkern u1="&#xdb;" u2="&#xec;" k="-29" />
+<hkern u1="&#xdb;" u2="&#xc6;" k="14" />
+<hkern u1="&#xdb;" u2="f" k="10" />
+<hkern u1="&#xdb;" u2="&#x2f;" k="33" />
+<hkern u1="&#xdc;" u2="&#xf0;" k="16" />
+<hkern u1="&#xdc;" u2="&#xec;" k="-29" />
+<hkern u1="&#xdc;" u2="&#xc6;" k="14" />
+<hkern u1="&#xdc;" u2="f" k="10" />
+<hkern u1="&#xdc;" u2="&#x2f;" k="33" />
+<hkern u1="&#xdd;" u2="&#xff;" k="49" />
+<hkern u1="&#xdd;" u2="&#xf0;" k="53" />
+<hkern u1="&#xdd;" u2="&#xef;" k="-143" />
+<hkern u1="&#xdd;" u2="&#xee;" k="-43" />
+<hkern u1="&#xdd;" u2="&#xec;" k="-127" />
+<hkern u1="&#xdd;" u2="&#xeb;" k="125" />
+<hkern u1="&#xdd;" u2="&#xe4;" k="88" />
+<hkern u1="&#xdd;" u2="&#xe3;" k="70" />
+<hkern u1="&#xdd;" u2="&#xdf;" k="29" />
+<hkern u1="&#xdd;" u2="&#xc6;" k="121" />
+<hkern u1="&#xdd;" u2="&#xae;" k="39" />
+<hkern u1="&#xdd;" u2="x" k="70" />
+<hkern u1="&#xdd;" u2="v" k="68" />
+<hkern u1="&#xdd;" u2="f" k="47" />
+<hkern u1="&#xdd;" u2="&#x40;" k="72" />
+<hkern u1="&#xdd;" u2="&#x2f;" k="133" />
+<hkern u1="&#xdd;" u2="&#x2a;" k="-10" />
+<hkern u1="&#xdd;" u2="&#x26;" k="57" />
+<hkern u1="&#xde;" u2="&#x2026;" k="39" />
+<hkern u1="&#xde;" u2="&#x201e;" k="39" />
+<hkern u1="&#xde;" u2="&#x201a;" k="39" />
+<hkern u1="&#xde;" u2="&#x178;" k="72" />
+<hkern u1="&#xde;" u2="&#xdd;" k="72" />
+<hkern u1="&#xde;" u2="&#xc6;" k="35" />
+<hkern u1="&#xde;" u2="&#xc5;" k="29" />
+<hkern u1="&#xde;" u2="&#xc4;" k="29" />
+<hkern u1="&#xde;" u2="&#xc3;" k="29" />
+<hkern u1="&#xde;" u2="&#xc2;" k="29" />
+<hkern u1="&#xde;" u2="&#xc1;" k="29" />
+<hkern u1="&#xde;" u2="&#xc0;" k="29" />
+<hkern u1="&#xde;" u2="&#x7d;" k="33" />
+<hkern u1="&#xde;" u2="]" k="59" />
+<hkern u1="&#xde;" u2="\" k="49" />
+<hkern u1="&#xde;" u2="Z" k="18" />
+<hkern u1="&#xde;" u2="Y" k="72" />
+<hkern u1="&#xde;" u2="X" k="68" />
+<hkern u1="&#xde;" u2="W" k="10" />
+<hkern u1="&#xde;" u2="V" k="27" />
+<hkern u1="&#xde;" u2="T" k="39" />
+<hkern u1="&#xde;" u2="J" k="14" />
+<hkern u1="&#xde;" u2="A" k="29" />
+<hkern u1="&#xde;" u2="&#x2f;" k="47" />
+<hkern u1="&#xde;" u2="&#x2e;" k="39" />
+<hkern u1="&#xde;" u2="&#x2c;" k="39" />
+<hkern u1="&#xde;" u2="&#x29;" k="35" />
+<hkern u1="&#xdf;" u2="&#x2122;" k="18" />
+<hkern u1="&#xdf;" u2="&#x201d;" k="25" />
+<hkern u1="&#xdf;" u2="&#x201c;" k="29" />
+<hkern u1="&#xdf;" u2="&#x2019;" k="25" />
+<hkern u1="&#xdf;" u2="&#x2018;" k="29" />
+<hkern u1="&#xdf;" u2="&#x178;" k="74" />
+<hkern u1="&#xdf;" u2="&#xff;" k="27" />
+<hkern u1="&#xdf;" u2="&#xfd;" k="27" />
+<hkern u1="&#xdf;" u2="&#xdd;" k="74" />
+<hkern u1="&#xdf;" u2="&#xdc;" k="12" />
+<hkern u1="&#xdf;" u2="&#xdb;" k="12" />
+<hkern u1="&#xdf;" u2="&#xda;" k="12" />
+<hkern u1="&#xdf;" u2="&#xd9;" k="12" />
+<hkern u1="&#xdf;" u2="&#xae;" k="25" />
+<hkern u1="&#xdf;" u2="y" k="27" />
+<hkern u1="&#xdf;" u2="x" k="8" />
+<hkern u1="&#xdf;" u2="w" k="12" />
+<hkern u1="&#xdf;" u2="v" k="23" />
+<hkern u1="&#xdf;" u2="t" k="10" />
+<hkern u1="&#xdf;" u2="g" k="8" />
+<hkern u1="&#xdf;" u2="f" k="12" />
+<hkern u1="&#xdf;" u2="]" k="20" />
+<hkern u1="&#xdf;" u2="\" k="43" />
+<hkern u1="&#xdf;" u2="Y" k="74" />
+<hkern u1="&#xdf;" u2="X" k="10" />
+<hkern u1="&#xdf;" u2="W" k="29" />
+<hkern u1="&#xdf;" u2="V" k="43" />
+<hkern u1="&#xdf;" u2="U" k="12" />
+<hkern u1="&#xdf;" u2="T" k="37" />
+<hkern u1="&#xdf;" u2="&#x2a;" k="25" />
+<hkern u1="&#xdf;" u2="&#x27;" k="23" />
+<hkern u1="&#xdf;" u2="&#x22;" k="23" />
+<hkern u1="&#xe0;" u2="&#x2122;" k="31" />
+<hkern u1="&#xe0;" u2="v" k="12" />
+<hkern u1="&#xe0;" u2="\" k="88" />
+<hkern u1="&#xe0;" u2="V" k="57" />
+<hkern u1="&#xe0;" u2="&#x3f;" k="27" />
+<hkern u1="&#xe0;" u2="&#x2a;" k="16" />
+<hkern u1="&#xe1;" u2="&#x2122;" k="31" />
+<hkern u1="&#xe1;" u2="v" k="12" />
+<hkern u1="&#xe1;" u2="\" k="88" />
+<hkern u1="&#xe1;" u2="V" k="57" />
+<hkern u1="&#xe1;" u2="&#x3f;" k="27" />
+<hkern u1="&#xe1;" u2="&#x2a;" k="16" />
+<hkern u1="&#xe2;" u2="&#x2122;" k="31" />
+<hkern u1="&#xe2;" u2="v" k="12" />
+<hkern u1="&#xe2;" u2="\" k="88" />
+<hkern u1="&#xe2;" u2="V" k="57" />
+<hkern u1="&#xe2;" u2="&#x3f;" k="27" />
+<hkern u1="&#xe2;" u2="&#x2a;" k="16" />
+<hkern u1="&#xe3;" u2="&#x2122;" k="31" />
+<hkern u1="&#xe3;" u2="v" k="12" />
+<hkern u1="&#xe3;" u2="\" k="88" />
+<hkern u1="&#xe3;" u2="V" k="57" />
+<hkern u1="&#xe3;" u2="&#x3f;" k="27" />
+<hkern u1="&#xe3;" u2="&#x2a;" k="16" />
+<hkern u1="&#xe4;" u2="&#x2122;" k="31" />
+<hkern u1="&#xe4;" u2="v" k="12" />
+<hkern u1="&#xe4;" u2="\" k="88" />
+<hkern u1="&#xe4;" u2="V" k="57" />
+<hkern u1="&#xe4;" u2="&#x3f;" k="27" />
+<hkern u1="&#xe4;" u2="&#x2a;" k="16" />
+<hkern u1="&#xe5;" u2="&#x2122;" k="31" />
+<hkern u1="&#xe5;" u2="v" k="12" />
+<hkern u1="&#xe5;" u2="\" k="88" />
+<hkern u1="&#xe5;" u2="V" k="57" />
+<hkern u1="&#xe5;" u2="&#x3f;" k="27" />
+<hkern u1="&#xe5;" u2="&#x2a;" k="16" />
+<hkern u1="&#xe6;" u2="&#x2122;" k="25" />
+<hkern u1="&#xe6;" u2="&#xc6;" k="10" />
+<hkern u1="&#xe6;" u2="&#x7d;" k="20" />
+<hkern u1="&#xe6;" u2="v" k="12" />
+<hkern u1="&#xe6;" u2="\" k="78" />
+<hkern u1="&#xe6;" u2="X" k="10" />
+<hkern u1="&#xe6;" u2="V" k="51" />
+<hkern u1="&#xe6;" u2="&#x3f;" k="23" />
+<hkern u1="&#xe6;" u2="&#x29;" k="25" />
+<hkern u1="&#xe7;" u2="&#xf0;" k="14" />
+<hkern u1="&#xe7;" u2="\" k="49" />
+<hkern u1="&#xe7;" u2="V" k="25" />
+<hkern u1="&#xe8;" u2="&#x2122;" k="25" />
+<hkern u1="&#xe8;" u2="&#xc6;" k="10" />
+<hkern u1="&#xe8;" u2="&#x7d;" k="20" />
+<hkern u1="&#xe8;" u2="v" k="12" />
+<hkern u1="&#xe8;" u2="\" k="78" />
+<hkern u1="&#xe8;" u2="X" k="10" />
+<hkern u1="&#xe8;" u2="V" k="51" />
+<hkern u1="&#xe8;" u2="&#x3f;" k="23" />
+<hkern u1="&#xe8;" u2="&#x29;" k="25" />
+<hkern u1="&#xe9;" u2="&#x2122;" k="25" />
+<hkern u1="&#xe9;" u2="&#xc6;" k="10" />
+<hkern u1="&#xe9;" u2="&#x7d;" k="20" />
+<hkern u1="&#xe9;" u2="v" k="12" />
+<hkern u1="&#xe9;" u2="\" k="78" />
+<hkern u1="&#xe9;" u2="X" k="10" />
+<hkern u1="&#xe9;" u2="V" k="51" />
+<hkern u1="&#xe9;" u2="&#x3f;" k="23" />
+<hkern u1="&#xe9;" u2="&#x29;" k="25" />
+<hkern u1="&#xea;" u2="&#x2122;" k="25" />
+<hkern u1="&#xea;" u2="&#xc6;" k="10" />
+<hkern u1="&#xea;" u2="&#x7d;" k="20" />
+<hkern u1="&#xea;" u2="v" k="12" />
+<hkern u1="&#xea;" u2="\" k="78" />
+<hkern u1="&#xea;" u2="X" k="10" />
+<hkern u1="&#xea;" u2="V" k="51" />
+<hkern u1="&#xea;" u2="&#x3f;" k="23" />
+<hkern u1="&#xea;" u2="&#x29;" k="25" />
+<hkern u1="&#xeb;" u2="&#x2122;" k="25" />
+<hkern u1="&#xeb;" u2="&#xc6;" k="10" />
+<hkern u1="&#xeb;" u2="&#x7d;" k="20" />
+<hkern u1="&#xeb;" u2="v" k="12" />
+<hkern u1="&#xeb;" u2="\" k="78" />
+<hkern u1="&#xeb;" u2="X" k="10" />
+<hkern u1="&#xeb;" u2="V" k="51" />
+<hkern u1="&#xeb;" u2="&#x3f;" k="23" />
+<hkern u1="&#xeb;" u2="&#x29;" k="25" />
+<hkern u1="&#xec;" u2="&#xef;" k="-16" />
+<hkern u1="&#xec;" u2="&#xec;" k="-37" />
+<hkern u1="&#xed;" u2="&#x2122;" k="-74" />
+<hkern u1="&#xed;" u2="&#x201d;" k="-16" />
+<hkern u1="&#xed;" u2="&#x2019;" k="-16" />
+<hkern u1="&#xed;" u2="&#xfe;" k="-51" />
+<hkern u1="&#xed;" u2="&#xef;" k="-16" />
+<hkern u1="&#xed;" u2="&#xee;" k="-49" />
+<hkern u1="&#xed;" u2="&#xed;" k="-49" />
+<hkern u1="&#xed;" u2="&#xec;" k="-37" />
+<hkern u1="&#xed;" u2="&#xdf;" k="-49" />
+<hkern u1="&#xed;" u2="&#x7d;" k="-104" />
+<hkern u1="&#xed;" u2="&#x7c;" k="-43" />
+<hkern u1="&#xed;" u2="l" k="-37" />
+<hkern u1="&#xed;" u2="k" k="-49" />
+<hkern u1="&#xed;" u2="j" k="-49" />
+<hkern u1="&#xed;" u2="i" k="-49" />
+<hkern u1="&#xed;" u2="h" k="-49" />
+<hkern u1="&#xed;" u2="b" k="-51" />
+<hkern u1="&#xed;" u2="]" k="-111" />
+<hkern u1="&#xed;" u2="\" k="-100" />
+<hkern u1="&#xed;" u2="&#x3f;" k="-121" />
+<hkern u1="&#xed;" u2="&#x2a;" k="-100" />
+<hkern u1="&#xed;" u2="&#x29;" k="-55" />
+<hkern u1="&#xed;" u2="&#x27;" k="-63" />
+<hkern u1="&#xed;" u2="&#x22;" k="-63" />
+<hkern u1="&#xed;" u2="&#x21;" k="-41" />
+<hkern u1="&#xee;" u2="&#x2122;" k="-14" />
+<hkern u1="&#xee;" u2="&#xef;" k="-16" />
+<hkern u1="&#xee;" u2="&#xec;" k="-37" />
+<hkern u1="&#xee;" u2="&#x3f;" k="-53" />
+<hkern u1="&#xee;" u2="&#x2a;" k="-68" />
+<hkern u1="&#xef;" u2="&#x2122;" k="-20" />
+<hkern u1="&#xef;" u2="&#xef;" k="-16" />
+<hkern u1="&#xef;" u2="&#xec;" k="-37" />
+<hkern u1="&#xef;" u2="&#x7d;" k="-55" />
+<hkern u1="&#xef;" u2="]" k="-57" />
+<hkern u1="&#xef;" u2="\" k="-63" />
+<hkern u1="&#xef;" u2="&#x3f;" k="-70" />
+<hkern u1="&#xef;" u2="&#x2a;" k="-92" />
+<hkern u1="&#xef;" u2="&#x29;" k="-57" />
+<hkern u1="&#xef;" u2="&#x27;" k="-12" />
+<hkern u1="&#xef;" u2="&#x22;" k="-12" />
+<hkern u1="&#xf0;" u2="&#x178;" k="68" />
+<hkern u1="&#xf0;" u2="&#xff;" k="10" />
+<hkern u1="&#xf0;" u2="&#xfd;" k="10" />
+<hkern u1="&#xf0;" u2="&#xde;" k="10" />
+<hkern u1="&#xf0;" u2="&#xdd;" k="68" />
+<hkern u1="&#xf0;" u2="&#xd1;" k="10" />
+<hkern u1="&#xf0;" u2="&#xd0;" k="10" />
+<hkern u1="&#xf0;" u2="&#xcf;" k="10" />
+<hkern u1="&#xf0;" u2="&#xce;" k="10" />
+<hkern u1="&#xf0;" u2="&#xcd;" k="10" />
+<hkern u1="&#xf0;" u2="&#xcc;" k="10" />
+<hkern u1="&#xf0;" u2="&#xcb;" k="10" />
+<hkern u1="&#xf0;" u2="&#xca;" k="10" />
+<hkern u1="&#xf0;" u2="&#xc9;" k="10" />
+<hkern u1="&#xf0;" u2="&#xc8;" k="10" />
+<hkern u1="&#xf0;" u2="&#xc6;" k="20" />
+<hkern u1="&#xf0;" u2="&#xc5;" k="16" />
+<hkern u1="&#xf0;" u2="&#xc4;" k="16" />
+<hkern u1="&#xf0;" u2="&#xc3;" k="16" />
+<hkern u1="&#xf0;" u2="&#xc2;" k="16" />
+<hkern u1="&#xf0;" u2="&#xc1;" k="16" />
+<hkern u1="&#xf0;" u2="&#xc0;" k="16" />
+<hkern u1="&#xf0;" u2="&#x7d;" k="29" />
+<hkern u1="&#xf0;" u2="y" k="10" />
+<hkern u1="&#xf0;" u2="x" k="8" />
+<hkern u1="&#xf0;" u2="v" k="8" />
+<hkern u1="&#xf0;" u2="]" k="39" />
+<hkern u1="&#xf0;" u2="\" k="37" />
+<hkern u1="&#xf0;" u2="Z" k="23" />
+<hkern u1="&#xf0;" u2="Y" k="68" />
+<hkern u1="&#xf0;" u2="X" k="55" />
+<hkern u1="&#xf0;" u2="W" k="18" />
+<hkern u1="&#xf0;" u2="V" k="29" />
+<hkern u1="&#xf0;" u2="T" k="43" />
+<hkern u1="&#xf0;" u2="R" k="10" />
+<hkern u1="&#xf0;" u2="P" k="10" />
+<hkern u1="&#xf0;" u2="N" k="10" />
+<hkern u1="&#xf0;" u2="M" k="10" />
+<hkern u1="&#xf0;" u2="L" k="10" />
+<hkern u1="&#xf0;" u2="K" k="10" />
+<hkern u1="&#xf0;" u2="J" k="29" />
+<hkern u1="&#xf0;" u2="I" k="10" />
+<hkern u1="&#xf0;" u2="H" k="10" />
+<hkern u1="&#xf0;" u2="F" k="10" />
+<hkern u1="&#xf0;" u2="E" k="10" />
+<hkern u1="&#xf0;" u2="D" k="10" />
+<hkern u1="&#xf0;" u2="B" k="10" />
+<hkern u1="&#xf0;" u2="A" k="16" />
+<hkern u1="&#xf0;" u2="&#x2f;" k="25" />
+<hkern u1="&#xf0;" u2="&#x29;" k="33" />
+<hkern u1="&#xf1;" u2="&#x2122;" k="29" />
+<hkern u1="&#xf1;" u2="v" k="8" />
+<hkern u1="&#xf1;" u2="\" k="82" />
+<hkern u1="&#xf1;" u2="V" k="55" />
+<hkern u1="&#xf1;" u2="&#x3f;" k="29" />
+<hkern u1="&#xf1;" u2="&#x2a;" k="16" />
+<hkern u1="&#xf1;" u2="&#x29;" k="23" />
+<hkern u1="&#xf2;" u2="&#x2122;" k="29" />
+<hkern u1="&#xf2;" u2="&#xc6;" k="14" />
+<hkern u1="&#xf2;" u2="&#x7d;" k="39" />
+<hkern u1="&#xf2;" u2="x" k="20" />
+<hkern u1="&#xf2;" u2="v" k="14" />
+<hkern u1="&#xf2;" u2="]" k="55" />
+<hkern u1="&#xf2;" u2="\" k="84" />
+<hkern u1="&#xf2;" u2="X" k="53" />
+<hkern u1="&#xf2;" u2="V" k="59" />
+<hkern u1="&#xf2;" u2="&#x3f;" k="31" />
+<hkern u1="&#xf2;" u2="&#x2a;" k="16" />
+<hkern u1="&#xf2;" u2="&#x29;" k="41" />
+<hkern u1="&#xf3;" u2="&#x2122;" k="29" />
+<hkern u1="&#xf3;" u2="&#xc6;" k="14" />
+<hkern u1="&#xf3;" u2="&#x7d;" k="39" />
+<hkern u1="&#xf3;" u2="x" k="20" />
+<hkern u1="&#xf3;" u2="v" k="14" />
+<hkern u1="&#xf3;" u2="]" k="55" />
+<hkern u1="&#xf3;" u2="\" k="84" />
+<hkern u1="&#xf3;" u2="X" k="53" />
+<hkern u1="&#xf3;" u2="V" k="59" />
+<hkern u1="&#xf3;" u2="&#x3f;" k="31" />
+<hkern u1="&#xf3;" u2="&#x2a;" k="16" />
+<hkern u1="&#xf3;" u2="&#x29;" k="41" />
+<hkern u1="&#xf4;" u2="&#x2122;" k="29" />
+<hkern u1="&#xf4;" u2="&#xc6;" k="14" />
+<hkern u1="&#xf4;" u2="&#x7d;" k="39" />
+<hkern u1="&#xf4;" u2="x" k="20" />
+<hkern u1="&#xf4;" u2="v" k="14" />
+<hkern u1="&#xf4;" u2="]" k="55" />
+<hkern u1="&#xf4;" u2="\" k="84" />
+<hkern u1="&#xf4;" u2="X" k="53" />
+<hkern u1="&#xf4;" u2="V" k="59" />
+<hkern u1="&#xf4;" u2="&#x3f;" k="31" />
+<hkern u1="&#xf4;" u2="&#x2a;" k="16" />
+<hkern u1="&#xf4;" u2="&#x29;" k="41" />
+<hkern u1="&#xf5;" u2="&#x2122;" k="29" />
+<hkern u1="&#xf5;" u2="&#xc6;" k="14" />
+<hkern u1="&#xf5;" u2="&#x7d;" k="39" />
+<hkern u1="&#xf5;" u2="x" k="20" />
+<hkern u1="&#xf5;" u2="v" k="14" />
+<hkern u1="&#xf5;" u2="]" k="55" />
+<hkern u1="&#xf5;" u2="\" k="84" />
+<hkern u1="&#xf5;" u2="X" k="53" />
+<hkern u1="&#xf5;" u2="V" k="59" />
+<hkern u1="&#xf5;" u2="&#x3f;" k="31" />
+<hkern u1="&#xf5;" u2="&#x2a;" k="16" />
+<hkern u1="&#xf5;" u2="&#x29;" k="41" />
+<hkern u1="&#xf6;" u2="&#x2122;" k="29" />
+<hkern u1="&#xf6;" u2="&#xc6;" k="14" />
+<hkern u1="&#xf6;" u2="&#x7d;" k="39" />
+<hkern u1="&#xf6;" u2="x" k="20" />
+<hkern u1="&#xf6;" u2="v" k="14" />
+<hkern u1="&#xf6;" u2="]" k="55" />
+<hkern u1="&#xf6;" u2="\" k="84" />
+<hkern u1="&#xf6;" u2="X" k="53" />
+<hkern u1="&#xf6;" u2="V" k="59" />
+<hkern u1="&#xf6;" u2="&#x3f;" k="31" />
+<hkern u1="&#xf6;" u2="&#x2a;" k="16" />
+<hkern u1="&#xf6;" u2="&#x29;" k="41" />
+<hkern u1="&#xf8;" u2="&#x2122;" k="29" />
+<hkern u1="&#xf8;" u2="&#xc6;" k="14" />
+<hkern u1="&#xf8;" u2="&#x7d;" k="39" />
+<hkern u1="&#xf8;" u2="x" k="20" />
+<hkern u1="&#xf8;" u2="v" k="14" />
+<hkern u1="&#xf8;" u2="]" k="55" />
+<hkern u1="&#xf8;" u2="\" k="84" />
+<hkern u1="&#xf8;" u2="X" k="53" />
+<hkern u1="&#xf8;" u2="V" k="59" />
+<hkern u1="&#xf8;" u2="&#x3f;" k="31" />
+<hkern u1="&#xf8;" u2="&#x2a;" k="16" />
+<hkern u1="&#xf8;" u2="&#x29;" k="41" />
+<hkern u1="&#xf9;" u2="&#x2122;" k="18" />
+<hkern u1="&#xf9;" u2="\" k="57" />
+<hkern u1="&#xf9;" u2="X" k="10" />
+<hkern u1="&#xf9;" u2="V" k="43" />
+<hkern u1="&#xf9;" u2="&#x29;" k="23" />
+<hkern u1="&#xfa;" u2="&#x2122;" k="18" />
+<hkern u1="&#xfa;" u2="\" k="57" />
+<hkern u1="&#xfa;" u2="X" k="10" />
+<hkern u1="&#xfa;" u2="V" k="43" />
+<hkern u1="&#xfa;" u2="&#x29;" k="23" />
+<hkern u1="&#xfb;" u2="&#x2122;" k="18" />
+<hkern u1="&#xfb;" u2="\" k="57" />
+<hkern u1="&#xfb;" u2="X" k="10" />
+<hkern u1="&#xfb;" u2="V" k="43" />
+<hkern u1="&#xfb;" u2="&#x29;" k="23" />
+<hkern u1="&#xfc;" u2="&#x2122;" k="18" />
+<hkern u1="&#xfc;" u2="\" k="57" />
+<hkern u1="&#xfc;" u2="X" k="10" />
+<hkern u1="&#xfc;" u2="V" k="43" />
+<hkern u1="&#xfc;" u2="&#x29;" k="23" />
+<hkern u1="&#xfd;" u2="&#xf0;" k="27" />
+<hkern u1="&#xfd;" u2="&#xc6;" k="37" />
+<hkern u1="&#xfd;" u2="&#x7d;" k="23" />
+<hkern u1="&#xfd;" u2="]" k="39" />
+<hkern u1="&#xfd;" u2="\" k="37" />
+<hkern u1="&#xfd;" u2="X" k="45" />
+<hkern u1="&#xfd;" u2="V" k="12" />
+<hkern u1="&#xfd;" u2="&#x2f;" k="39" />
+<hkern u1="&#xfe;" u2="&#x2122;" k="31" />
+<hkern u1="&#xfe;" u2="&#xc6;" k="12" />
+<hkern u1="&#xfe;" u2="&#x7d;" k="37" />
+<hkern u1="&#xfe;" u2="x" k="16" />
+<hkern u1="&#xfe;" u2="v" k="12" />
+<hkern u1="&#xfe;" u2="]" k="53" />
+<hkern u1="&#xfe;" u2="\" k="82" />
+<hkern u1="&#xfe;" u2="X" k="45" />
+<hkern u1="&#xfe;" u2="V" k="55" />
+<hkern u1="&#xfe;" u2="&#x3f;" k="33" />
+<hkern u1="&#xfe;" u2="&#x2a;" k="16" />
+<hkern u1="&#xfe;" u2="&#x29;" k="39" />
+<hkern u1="&#xff;" u2="&#xf0;" k="27" />
+<hkern u1="&#xff;" u2="&#xc6;" k="37" />
+<hkern u1="&#xff;" u2="&#x7d;" k="23" />
+<hkern u1="&#xff;" u2="]" k="39" />
+<hkern u1="&#xff;" u2="\" k="37" />
+<hkern u1="&#xff;" u2="X" k="45" />
+<hkern u1="&#xff;" u2="V" k="12" />
+<hkern u1="&#xff;" u2="&#x2f;" k="39" />
+<hkern u1="&#x152;" u2="&#xf0;" k="12" />
+<hkern u1="&#x152;" u2="&#xef;" k="-66" />
+<hkern u1="&#x152;" u2="&#xee;" k="-59" />
+<hkern u1="&#x152;" u2="&#xec;" k="-86" />
+<hkern u1="&#x153;" u2="&#x2122;" k="25" />
+<hkern u1="&#x153;" u2="&#xc6;" k="10" />
+<hkern u1="&#x153;" u2="&#x7d;" k="20" />
+<hkern u1="&#x153;" u2="v" k="12" />
+<hkern u1="&#x153;" u2="\" k="78" />
+<hkern u1="&#x153;" u2="X" k="10" />
+<hkern u1="&#x153;" u2="V" k="51" />
+<hkern u1="&#x153;" u2="&#x3f;" k="23" />
+<hkern u1="&#x153;" u2="&#x29;" k="25" />
+<hkern u1="&#x178;" u2="&#xff;" k="49" />
+<hkern u1="&#x178;" u2="&#xf0;" k="53" />
+<hkern u1="&#x178;" u2="&#xef;" k="-143" />
+<hkern u1="&#x178;" u2="&#xee;" k="-43" />
+<hkern u1="&#x178;" u2="&#xec;" k="-127" />
+<hkern u1="&#x178;" u2="&#xeb;" k="125" />
+<hkern u1="&#x178;" u2="&#xe4;" k="88" />
+<hkern u1="&#x178;" u2="&#xe3;" k="70" />
+<hkern u1="&#x178;" u2="&#xdf;" k="29" />
+<hkern u1="&#x178;" u2="&#xc6;" k="121" />
+<hkern u1="&#x178;" u2="&#xae;" k="39" />
+<hkern u1="&#x178;" u2="x" k="70" />
+<hkern u1="&#x178;" u2="v" k="68" />
+<hkern u1="&#x178;" u2="f" k="47" />
+<hkern u1="&#x178;" u2="&#x40;" k="72" />
+<hkern u1="&#x178;" u2="&#x2f;" k="133" />
+<hkern u1="&#x178;" u2="&#x2a;" k="-10" />
+<hkern u1="&#x178;" u2="&#x26;" k="57" />
+<hkern u1="&#x2013;" u2="&#xc6;" k="18" />
+<hkern u1="&#x2013;" u2="x" k="47" />
+<hkern u1="&#x2013;" u2="v" k="18" />
+<hkern u1="&#x2013;" u2="f" k="23" />
+<hkern u1="&#x2013;" u2="X" k="66" />
+<hkern u1="&#x2013;" u2="V" k="49" />
+<hkern u1="&#x2014;" u2="&#xc6;" k="18" />
+<hkern u1="&#x2014;" u2="x" k="47" />
+<hkern u1="&#x2014;" u2="v" k="18" />
+<hkern u1="&#x2014;" u2="f" k="23" />
+<hkern u1="&#x2014;" u2="X" k="66" />
+<hkern u1="&#x2014;" u2="V" k="49" />
+<hkern u1="&#x2018;" u2="&#xef;" k="-74" />
+<hkern u1="&#x2018;" u2="&#xee;" k="-31" />
+<hkern u1="&#x2018;" u2="&#xec;" k="-80" />
+<hkern u1="&#x2018;" u2="&#xc6;" k="86" />
+<hkern u1="&#x2019;" u2="&#xef;" k="-94" />
+<hkern u1="&#x2019;" u2="&#xee;" k="-18" />
+<hkern u1="&#x2019;" u2="&#xec;" k="-88" />
+<hkern u1="&#x2019;" u2="&#xc6;" k="94" />
+<hkern u1="&#x2019;" u2="&#x40;" k="49" />
+<hkern u1="&#x2019;" u2="&#x2f;" k="150" />
+<hkern u1="&#x2019;" u2="&#x26;" k="47" />
+<hkern u1="&#x201a;" u2="v" k="47" />
+<hkern u1="&#x201a;" u2="f" k="23" />
+<hkern u1="&#x201a;" u2="V" k="82" />
+<hkern u1="&#x201c;" u2="&#xef;" k="-74" />
+<hkern u1="&#x201c;" u2="&#xee;" k="-31" />
+<hkern u1="&#x201c;" u2="&#xec;" k="-80" />
+<hkern u1="&#x201c;" u2="&#xc6;" k="86" />
+<hkern u1="&#x201d;" u2="&#xef;" k="-94" />
+<hkern u1="&#x201d;" u2="&#xee;" k="-18" />
+<hkern u1="&#x201d;" u2="&#xec;" k="-88" />
+<hkern u1="&#x201d;" u2="&#xc6;" k="94" />
+<hkern u1="&#x201d;" u2="&#x40;" k="49" />
+<hkern u1="&#x201d;" u2="&#x2f;" k="150" />
+<hkern u1="&#x201d;" u2="&#x26;" k="47" />
+<hkern u1="&#x201e;" u2="v" k="47" />
+<hkern u1="&#x201e;" u2="f" k="23" />
+<hkern u1="&#x201e;" u2="V" k="82" />
+<hkern u1="&#x2039;" u2="V" k="23" />
+<hkern u1="&#x203a;" u2="x" k="43" />
+<hkern u1="&#x203a;" u2="f" k="20" />
+<hkern u1="&#x203a;" u2="X" k="41" />
+<hkern u1="&#x203a;" u2="V" k="47" />
+<hkern u1="&#x2122;" u2="&#xef;" k="-72" />
+<hkern u1="&#x2122;" u2="&#xee;" k="-66" />
+<hkern u1="&#x2122;" u2="&#xec;" k="-92" />
+<hkern u1="&#x2122;" u2="&#xc6;" k="57" />
+<hkern u1="&#x2122;" u2="&#xc5;" k="45" />
+<hkern u1="&#x2122;" u2="&#xc4;" k="45" />
+<hkern u1="&#x2122;" u2="&#xc3;" k="45" />
+<hkern u1="&#x2122;" u2="&#xc2;" k="45" />
+<hkern u1="&#x2122;" u2="&#xc1;" k="45" />
+<hkern u1="&#x2122;" u2="&#xc0;" k="45" />
+<hkern u1="&#x2122;" u2="J" k="23" />
+<hkern u1="&#x2122;" u2="A" k="45" />
+<hkern g1="C,Ccedilla" g2="G,O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="12" />
+<hkern g1="C,Ccedilla" g2="d,q" k="12" />
+<hkern g1="C,Ccedilla" g2="g" k="27" />
+<hkern g1="C,Ccedilla" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="16" />
+<hkern g1="C,Ccedilla" g2="w" k="14" />
+<hkern g1="C,Ccedilla" g2="y,yacute,ydieresis" k="10" />
+<hkern g1="C,Ccedilla" g2="hyphen,endash,emdash" k="37" />
+<hkern g1="C,Ccedilla" g2="u,ugrave,uacute,ucircumflex,udieresis" k="12" />
+<hkern g1="D,Eth" g2="T" k="10" />
+<hkern g1="D,Eth" g2="Y,Yacute,Ydieresis" k="53" />
+<hkern g1="D,Eth" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="20" />
+<hkern g1="D,Eth" g2="J" k="12" />
+<hkern g1="E,AE,Egrave,Eacute,Ecircumflex,Edieresis,OE" g2="C,Ccedilla" k="10" />
+<hkern g1="E,AE,Egrave,Eacute,Ecircumflex,Edieresis,OE" g2="G,O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="12" />
+<hkern g1="E,AE,Egrave,Eacute,Ecircumflex,Edieresis,OE" g2="d,q" k="10" />
+<hkern g1="E,AE,Egrave,Eacute,Ecircumflex,Edieresis,OE" g2="g" k="25" />
+<hkern g1="E,AE,Egrave,Eacute,Ecircumflex,Edieresis,OE" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="12" />
+<hkern g1="E,AE,Egrave,Eacute,Ecircumflex,Edieresis,OE" g2="w" k="12" />
+<hkern g1="E,AE,Egrave,Eacute,Ecircumflex,Edieresis,OE" g2="hyphen,endash,emdash" k="29" />
+<hkern g1="G" g2="Y,Yacute,Ydieresis" k="33" />
+<hkern g1="G" g2="g" k="12" />
+<hkern g1="G" g2="w" k="12" />
+<hkern g1="G" g2="y,yacute,ydieresis" k="10" />
+<hkern g1="H,I,M,N,Igrave,Iacute,Icircumflex,Idieresis,Ntilde" g2="d,q" k="10" />
+<hkern g1="H,I,M,N,Igrave,Iacute,Icircumflex,Idieresis,Ntilde" g2="g" k="18" />
+<hkern g1="H,I,M,N,Igrave,Iacute,Icircumflex,Idieresis,Ntilde" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="12" />
+<hkern g1="H,I,M,N,Igrave,Iacute,Icircumflex,Idieresis,Ntilde" g2="w" k="12" />
+<hkern g1="J" g2="d,q" k="10" />
+<hkern g1="J" g2="g" k="16" />
+<hkern g1="J" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="10" />
+<hkern g1="J" g2="w" k="10" />
+<hkern g1="K" g2="C,Ccedilla" k="10" />
+<hkern g1="K" g2="G,O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="14" />
+<hkern g1="K" g2="d,q" k="29" />
+<hkern g1="K" g2="g" k="35" />
+<hkern g1="K" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="35" />
+<hkern g1="K" g2="t" k="20" />
+<hkern g1="K" g2="w" k="41" />
+<hkern g1="K" g2="y,yacute,ydieresis" k="37" />
+<hkern g1="K" g2="hyphen,endash,emdash" k="51" />
+<hkern g1="K" g2="u,ugrave,uacute,ucircumflex,udieresis" k="35" />
+<hkern g1="K" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="10" />
+<hkern g1="K" g2="guillemotleft,guilsinglleft" k="35" />
+<hkern g1="K" g2="m,n,p,r,ntilde" k="14" />
+<hkern g1="L" g2="G,O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="12" />
+<hkern g1="L" g2="T" k="156" />
+<hkern g1="L" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="10" />
+<hkern g1="L" g2="W" k="90" />
+<hkern g1="L" g2="Y,Yacute,Ydieresis" k="174" />
+<hkern g1="L" g2="g" k="10" />
+<hkern g1="L" g2="quoteleft,quotedblleft" k="156" />
+<hkern g1="L" g2="quoteright,quotedblright" k="154" />
+<hkern g1="L" g2="quotedbl,quotesingle" k="156" />
+<hkern g1="L" g2="t" k="23" />
+<hkern g1="L" g2="w" k="37" />
+<hkern g1="L" g2="y,yacute,ydieresis" k="70" />
+<hkern g1="L" g2="hyphen,endash,emdash" k="98" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="T" k="14" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="Y,Yacute,Ydieresis" k="55" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="20" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="J" k="12" />
+<hkern g1="R" g2="Y,Yacute,Ydieresis" k="45" />
+<hkern g1="R" g2="d,q" k="14" />
+<hkern g1="R" g2="g" k="14" />
+<hkern g1="R" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="16" />
+<hkern g1="R" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="16" />
+<hkern g1="R" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="10" />
+<hkern g1="S" g2="Y,Yacute,Ydieresis" k="31" />
+<hkern g1="S" g2="g" k="14" />
+<hkern g1="S" g2="t" k="10" />
+<hkern g1="S" g2="w" k="14" />
+<hkern g1="S" g2="y,yacute,ydieresis" k="14" />
+<hkern g1="S" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="16" />
+<hkern g1="T" g2="G,O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="12" />
+<hkern g1="T" g2="d,q" k="137" />
+<hkern g1="T" g2="g" k="154" />
+<hkern g1="T" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="141" />
+<hkern g1="T" g2="t" k="20" />
+<hkern g1="T" g2="w" k="102" />
+<hkern g1="T" g2="y,yacute,ydieresis" k="102" />
+<hkern g1="T" g2="hyphen,endash,emdash" k="117" />
+<hkern g1="T" g2="u,ugrave,uacute,ucircumflex,udieresis" k="111" />
+<hkern g1="T" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="76" />
+<hkern g1="T" g2="J" k="14" />
+<hkern g1="T" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="147" />
+<hkern g1="T" g2="guillemotleft,guilsinglleft" k="113" />
+<hkern g1="T" g2="m,n,p,r,ntilde" k="106" />
+<hkern g1="T" g2="colon,semicolon" k="98" />
+<hkern g1="T" g2="guillemotright,guilsinglright" k="98" />
+<hkern g1="T" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="115" />
+<hkern g1="T" g2="s" k="141" />
+<hkern g1="T" g2="z" k="143" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="d,q" k="12" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="g" k="20" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="10" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="u,ugrave,uacute,ucircumflex,udieresis" k="12" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="10" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="J" k="12" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="10" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="m,n,p,r,ntilde" k="10" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="18" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="s" k="10" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="z" k="10" />
+<hkern g1="W" g2="d,q" k="37" />
+<hkern g1="W" g2="g" k="43" />
+<hkern g1="W" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="39" />
+<hkern g1="W" g2="hyphen,endash,emdash" k="31" />
+<hkern g1="W" g2="u,ugrave,uacute,ucircumflex,udieresis" k="20" />
+<hkern g1="W" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="39" />
+<hkern g1="W" g2="J" k="12" />
+<hkern g1="W" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="31" />
+<hkern g1="W" g2="guillemotleft,guilsinglleft" k="31" />
+<hkern g1="W" g2="m,n,p,r,ntilde" k="27" />
+<hkern g1="W" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="59" />
+<hkern g1="W" g2="s" k="29" />
+<hkern g1="W" g2="z" k="14" />
+<hkern g1="Y,Yacute,Ydieresis" g2="C,Ccedilla" k="51" />
+<hkern g1="Y,Yacute,Ydieresis" g2="G,O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="57" />
+<hkern g1="Y,Yacute,Ydieresis" g2="S" k="37" />
+<hkern g1="Y,Yacute,Ydieresis" g2="d,q" k="137" />
+<hkern g1="Y,Yacute,Ydieresis" g2="g" k="147" />
+<hkern g1="Y,Yacute,Ydieresis" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="141" />
+<hkern g1="Y,Yacute,Ydieresis" g2="t" k="33" />
+<hkern g1="Y,Yacute,Ydieresis" g2="w" k="82" />
+<hkern g1="Y,Yacute,Ydieresis" g2="y,yacute,ydieresis" k="72" />
+<hkern g1="Y,Yacute,Ydieresis" g2="hyphen,endash,emdash" k="131" />
+<hkern g1="Y,Yacute,Ydieresis" g2="u,ugrave,uacute,ucircumflex,udieresis" k="106" />
+<hkern g1="Y,Yacute,Ydieresis" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="109" />
+<hkern g1="Y,Yacute,Ydieresis" g2="J" k="39" />
+<hkern g1="Y,Yacute,Ydieresis" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="129" />
+<hkern g1="Y,Yacute,Ydieresis" g2="guillemotleft,guilsinglleft" k="119" />
+<hkern g1="Y,Yacute,Ydieresis" g2="m,n,p,r,ntilde" k="121" />
+<hkern g1="Y,Yacute,Ydieresis" g2="colon,semicolon" k="76" />
+<hkern g1="Y,Yacute,Ydieresis" g2="guillemotright,guilsinglright" k="74" />
+<hkern g1="Y,Yacute,Ydieresis" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="143" />
+<hkern g1="Y,Yacute,Ydieresis" g2="s" k="141" />
+<hkern g1="Y,Yacute,Ydieresis" g2="z" k="100" />
+<hkern g1="Z" g2="d,q" k="14" />
+<hkern g1="Z" g2="g" k="29" />
+<hkern g1="Z" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="16" />
+<hkern g1="Z" g2="w" k="18" />
+<hkern g1="Z" g2="y,yacute,ydieresis" k="14" />
+<hkern g1="Z" g2="hyphen,endash,emdash" k="39" />
+<hkern g1="Z" g2="u,ugrave,uacute,ucircumflex,udieresis" k="16" />
+<hkern g1="Z" g2="m,n,p,r,ntilde" k="10" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="T" k="141" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="18" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="W" k="39" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="Y,Yacute,Ydieresis" k="135" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="quotedbl,quotesingle" k="18" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="w" k="8" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="y,yacute,ydieresis" k="14" />
+<hkern g1="b,p,thorn" g2="S" k="10" />
+<hkern g1="b,p,thorn" g2="T" k="139" />
+<hkern g1="b,p,thorn" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="10" />
+<hkern g1="b,p,thorn" g2="W" k="35" />
+<hkern g1="b,p,thorn" g2="Y,Yacute,Ydieresis" k="137" />
+<hkern g1="b,p,thorn" g2="quotedbl,quotesingle" k="25" />
+<hkern g1="b,p,thorn" g2="y,yacute,ydieresis" k="16" />
+<hkern g1="b,p,thorn" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="10" />
+<hkern g1="b,p,thorn" g2="J" k="20" />
+<hkern g1="b,p,thorn" g2="B,D,E,F,H,I,K,L,M,N,P,R,Egrave,Eacute,Ecircumflex,Edieresis,Igrave,Iacute,Icircumflex,Idieresis,Eth,Ntilde,Thorn" k="10" />
+<hkern g1="b,p,thorn" g2="Z" k="18" />
+<hkern g1="c,ccedilla" g2="T" k="152" />
+<hkern g1="c,ccedilla" g2="W" k="10" />
+<hkern g1="c,ccedilla" g2="Y,Yacute,Ydieresis" k="98" />
+<hkern g1="c,ccedilla" g2="g" k="8" />
+<hkern g1="c,ccedilla" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="8" />
+<hkern g1="c,ccedilla" g2="hyphen,endash,emdash" k="35" />
+<hkern g1="c,ccedilla" g2="guillemotleft,guilsinglleft" k="27" />
+<hkern g1="colon,semicolon" g2="T" k="98" />
+<hkern g1="colon,semicolon" g2="Y,Yacute,Ydieresis" k="76" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="T" k="150" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="10" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="W" k="31" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="Y,Yacute,Ydieresis" k="162" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="quotedbl,quotesingle" k="18" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="y,yacute,ydieresis" k="16" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="Z" k="10" />
+<hkern g1="g" g2="T" k="102" />
+<hkern g1="g" g2="Y,Yacute,Ydieresis" k="66" />
+<hkern g1="g" g2="hyphen,endash,emdash" k="20" />
+<hkern g1="g" g2="guillemotleft,guilsinglleft" k="20" />
+<hkern g1="guillemotleft,guilsinglleft" g2="T" k="104" />
+<hkern g1="guillemotleft,guilsinglleft" g2="Y,Yacute,Ydieresis" k="78" />
+<hkern g1="guillemotright,guilsinglright" g2="T" k="113" />
+<hkern g1="guillemotright,guilsinglright" g2="W" k="29" />
+<hkern g1="guillemotright,guilsinglright" g2="Y,Yacute,Ydieresis" k="115" />
+<hkern g1="guillemotright,guilsinglright" g2="quoteright,quotedblright" k="39" />
+<hkern g1="guillemotright,guilsinglright" g2="quotedbl,quotesingle" k="49" />
+<hkern g1="guillemotright,guilsinglright" g2="y,yacute,ydieresis" k="23" />
+<hkern g1="guillemotright,guilsinglright" g2="z" k="25" />
+<hkern g1="hyphen,endash,emdash" g2="S" k="37" />
+<hkern g1="hyphen,endash,emdash" g2="T" k="117" />
+<hkern g1="hyphen,endash,emdash" g2="W" k="31" />
+<hkern g1="hyphen,endash,emdash" g2="Y,Yacute,Ydieresis" k="131" />
+<hkern g1="hyphen,endash,emdash" g2="quoteright,quotedblright" k="113" />
+<hkern g1="hyphen,endash,emdash" g2="quotedbl,quotesingle" k="123" />
+<hkern g1="hyphen,endash,emdash" g2="t" k="18" />
+<hkern g1="hyphen,endash,emdash" g2="y,yacute,ydieresis" k="20" />
+<hkern g1="hyphen,endash,emdash" g2="J" k="35" />
+<hkern g1="hyphen,endash,emdash" g2="z" k="31" />
+<hkern g1="hyphen,endash,emdash" g2="Z" k="41" />
+<hkern g1="k" g2="T" k="111" />
+<hkern g1="k" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="10" />
+<hkern g1="k" g2="Y,Yacute,Ydieresis" k="74" />
+<hkern g1="k" g2="d,q" k="14" />
+<hkern g1="k" g2="g" k="14" />
+<hkern g1="k" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="18" />
+<hkern g1="k" g2="hyphen,endash,emdash" k="47" />
+<hkern g1="k" g2="guillemotleft,guilsinglleft" k="41" />
+<hkern g1="h,m,n,ntilde" g2="S" k="10" />
+<hkern g1="h,m,n,ntilde" g2="T" k="145" />
+<hkern g1="h,m,n,ntilde" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="14" />
+<hkern g1="h,m,n,ntilde" g2="W" k="35" />
+<hkern g1="h,m,n,ntilde" g2="Y,Yacute,Ydieresis" k="137" />
+<hkern g1="h,m,n,ntilde" g2="quotedbl,quotesingle" k="20" />
+<hkern g1="h,m,n,ntilde" g2="w" k="8" />
+<hkern g1="h,m,n,ntilde" g2="y,yacute,ydieresis" k="10" />
+<hkern g1="h,m,n,ntilde" g2="Z" k="14" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="S" k="14" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="T" k="145" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="10" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="W" k="39" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="Y,Yacute,Ydieresis" k="141" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="quotedbl,quotesingle" k="23" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="y,yacute,ydieresis" k="18" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="10" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="J" k="23" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="B,D,E,F,H,I,K,L,M,N,P,R,Egrave,Eacute,Ecircumflex,Edieresis,Igrave,Iacute,Icircumflex,Idieresis,Eth,Ntilde,Thorn" k="12" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="Z" k="20" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="T" k="117" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="18" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="W" k="59" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="Y,Yacute,Ydieresis" k="143" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="quoteleft,quotedblleft" k="236" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="quoteright,quotedblright" k="244" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="quotedbl,quotesingle" k="256" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="t" k="29" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="w" k="35" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="y,yacute,ydieresis" k="51" />
+<hkern g1="quoteleft,quotedblleft" g2="d,q" k="35" />
+<hkern g1="quoteleft,quotedblleft" g2="g" k="27" />
+<hkern g1="quoteleft,quotedblleft" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="31" />
+<hkern g1="quoteleft,quotedblleft" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="68" />
+<hkern g1="quoteleft,quotedblleft" g2="J" k="23" />
+<hkern g1="quoteleft,quotedblleft" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="264" />
+<hkern g1="quoteleft,quotedblleft" g2="s" k="20" />
+<hkern g1="quoteright,quotedblright" g2="G,O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="20" />
+<hkern g1="quoteright,quotedblright" g2="d,q" k="51" />
+<hkern g1="quoteright,quotedblright" g2="g" k="41" />
+<hkern g1="quoteright,quotedblright" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="47" />
+<hkern g1="quoteright,quotedblright" g2="hyphen,endash,emdash" k="154" />
+<hkern g1="quoteright,quotedblright" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="76" />
+<hkern g1="quoteright,quotedblright" g2="J" k="23" />
+<hkern g1="quoteright,quotedblright" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="27" />
+<hkern g1="quoteright,quotedblright" g2="guillemotleft,guilsinglleft" k="94" />
+<hkern g1="quoteright,quotedblright" g2="m,n,p,r,ntilde" k="16" />
+<hkern g1="quoteright,quotedblright" g2="colon,semicolon" k="25" />
+<hkern g1="quoteright,quotedblright" g2="guillemotright,guilsinglright" k="27" />
+<hkern g1="quoteright,quotedblright" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="285" />
+<hkern g1="quoteright,quotedblright" g2="s" k="35" />
+<hkern g1="quotedbl,quotesingle" g2="d,q" k="27" />
+<hkern g1="quotedbl,quotesingle" g2="g" k="16" />
+<hkern g1="quotedbl,quotesingle" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="23" />
+<hkern g1="quotedbl,quotesingle" g2="hyphen,endash,emdash" k="125" />
+<hkern g1="quotedbl,quotesingle" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="61" />
+<hkern g1="quotedbl,quotesingle" g2="J" k="25" />
+<hkern g1="quotedbl,quotesingle" g2="guillemotleft,guilsinglleft" k="57" />
+<hkern g1="quotedbl,quotesingle" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="256" />
+<hkern g1="r" g2="T" k="88" />
+<hkern g1="r" g2="Y,Yacute,Ydieresis" k="49" />
+<hkern g1="r" g2="hyphen,endash,emdash" k="53" />
+<hkern g1="r" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="47" />
+<hkern g1="r" g2="J" k="31" />
+<hkern g1="r" g2="guillemotleft,guilsinglleft" k="51" />
+<hkern g1="r" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="104" />
+<hkern g1="r" g2="Z" k="16" />
+<hkern g1="s" g2="T" k="143" />
+<hkern g1="s" g2="W" k="23" />
+<hkern g1="s" g2="Y,Yacute,Ydieresis" k="104" />
+<hkern g1="s" g2="y,yacute,ydieresis" k="14" />
+<hkern g1="t" g2="T" k="96" />
+<hkern g1="t" g2="Y,Yacute,Ydieresis" k="68" />
+<hkern g1="t" g2="guillemotleft,guilsinglleft" k="20" />
+<hkern g1="q,u,ugrave,uacute,ucircumflex,udieresis" g2="T" k="109" />
+<hkern g1="q,u,ugrave,uacute,ucircumflex,udieresis" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="10" />
+<hkern g1="q,u,ugrave,uacute,ucircumflex,udieresis" g2="W" k="27" />
+<hkern g1="q,u,ugrave,uacute,ucircumflex,udieresis" g2="Y,Yacute,Ydieresis" k="121" />
+<hkern g1="q,u,ugrave,uacute,ucircumflex,udieresis" g2="Z" k="10" />
+<hkern g1="w" g2="T" k="102" />
+<hkern g1="w" g2="Y,Yacute,Ydieresis" k="82" />
+<hkern g1="w" g2="g" k="8" />
+<hkern g1="w" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="25" />
+<hkern g1="w" g2="J" k="27" />
+<hkern g1="w" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="35" />
+<hkern g1="w" g2="B,D,E,F,H,I,K,L,M,N,P,R,Egrave,Eacute,Ecircumflex,Edieresis,Igrave,Iacute,Icircumflex,Idieresis,Eth,Ntilde,Thorn" k="12" />
+<hkern g1="w" g2="Z" k="20" />
+<hkern g1="y,yacute,ydieresis" g2="T" k="102" />
+<hkern g1="y,yacute,ydieresis" g2="Y,Yacute,Ydieresis" k="70" />
+<hkern g1="y,yacute,ydieresis" g2="d,q" k="16" />
+<hkern g1="y,yacute,ydieresis" g2="g" k="18" />
+<hkern g1="y,yacute,ydieresis" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="16" />
+<hkern g1="y,yacute,ydieresis" g2="hyphen,endash,emdash" k="20" />
+<hkern g1="y,yacute,ydieresis" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="31" />
+<hkern g1="y,yacute,ydieresis" g2="J" k="25" />
+<hkern g1="y,yacute,ydieresis" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="16" />
+<hkern g1="y,yacute,ydieresis" g2="guillemotleft,guilsinglleft" k="23" />
+<hkern g1="y,yacute,ydieresis" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="53" />
+<hkern g1="y,yacute,ydieresis" g2="s" k="14" />
+<hkern g1="y,yacute,ydieresis" g2="Z" k="16" />
+<hkern g1="z" g2="T" k="145" />
+<hkern g1="z" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="10" />
+<hkern g1="z" g2="W" k="14" />
+<hkern g1="z" g2="Y,Yacute,Ydieresis" k="102" />
+<hkern g1="z" g2="hyphen,endash,emdash" k="31" />
+<hkern g1="z" g2="guillemotleft,guilsinglleft" k="25" />
+</font>
+</defs></svg> \ No newline at end of file
diff --git a/admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/fonts/titillium/titilliumweb-bold-webfont.ttf b/admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/fonts/titillium/titilliumweb-bold-webfont.ttf
new file mode 100644
index 0000000..ea4ca80
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/fonts/titillium/titilliumweb-bold-webfont.ttf
Binary files differ
diff --git a/admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/fonts/titillium/titilliumweb-bold-webfont.woff b/admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/fonts/titillium/titilliumweb-bold-webfont.woff
new file mode 100644
index 0000000..35ca59e
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/fonts/titillium/titilliumweb-bold-webfont.woff
Binary files differ
diff --git a/admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/fonts/titillium/titilliumweb-extralight-webfont.eot b/admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/fonts/titillium/titilliumweb-extralight-webfont.eot
new file mode 100644
index 0000000..e6b9784
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/fonts/titillium/titilliumweb-extralight-webfont.eot
Binary files differ
diff --git a/admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/fonts/titillium/titilliumweb-extralight-webfont.svg b/admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/fonts/titillium/titilliumweb-extralight-webfont.svg
new file mode 100644
index 0000000..d61247b
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/fonts/titillium/titilliumweb-extralight-webfont.svg
@@ -0,0 +1,2410 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
+<svg xmlns="http://www.w3.org/2000/svg">
+<metadata></metadata>
+<defs>
+<font id="titillium_webthin" horiz-adv-x="1146" >
+<font-face units-per-em="2048" ascent="1638" descent="-410" />
+<missing-glyph horiz-adv-x="450" />
+<glyph horiz-adv-x="2048" />
+<glyph horiz-adv-x="2048" />
+<glyph unicode="&#xd;" horiz-adv-x="681" />
+<glyph unicode=" " horiz-adv-x="450" />
+<glyph unicode="&#x09;" horiz-adv-x="450" />
+<glyph unicode="&#xa0;" horiz-adv-x="450" />
+<glyph unicode="!" horiz-adv-x="460" d="M190 0v164h82v-164h-82zM195 438v996h71v-996h-71z" />
+<glyph unicode="&#x22;" horiz-adv-x="712" d="M152 1434h79l-6 -430h-67zM481 1434h80l-6 -430h-68z" />
+<glyph unicode="#" d="M61 389v66h246v463h-246v65h246v389h74v-389h385v389h74v-389h245v-65h-245v-463h245v-66h-245v-389h-74v389h-385v-389h-74v389h-246zM381 455h385v463h-385v-463z" />
+<glyph unicode="$" d="M164 1030q0 340 416 340q41 0 63 -2l33 250h72l-33 -254l248 -25l-9 -67q-133 16 -249 24l-74 -569q193 -33 276.5 -102.5t83.5 -233.5q0 -219 -100 -312t-307 -93q-31 0 -49 2l-29 -234q-72 6 -72 15l29 221l-293 26l8 68q158 -20 293 -29l80 613q-209 33 -298 103.5 t-89 258.5zM236 1034q0 -156 71.5 -212t251.5 -85l76 566q-23 2 -55 2q-344 -1 -344 -271zM543 51h39q338 0 338 314q0 154 -67 209t-230 83z" />
+<glyph unicode="%" d="M78 1098q0 272 211 272t211 -274q0 -141 -57.5 -212t-155 -71t-153.5 70.5t-56 214.5zM150 1098q0 -219 139 -219t139 217q0 106 -31.5 157.5t-106.5 51.5t-107.5 -51.5t-32.5 -155.5zM358 -2l379 1372l66 -18l-381 -1370zM649 266q0 273 211 273t211 -275 q0 -141 -57.5 -211.5t-154.5 -70.5t-153.5 70.5t-56.5 213.5zM721 266q0 -219 139 -219t139 217q0 106 -31.5 157.5t-106.5 51.5t-107.5 -51.5t-32.5 -155.5z" />
+<glyph unicode="&#x26;" horiz-adv-x="1392" d="M96 407.5q0 200.5 78 289.5t256 141q-66 72 -85 133t-19 155q0 134 79.5 214.5t236.5 80.5t233.5 -79.5t76.5 -222t-77.5 -225.5t-260.5 -142l383 -379q23 61 44.5 177t27.5 202h72q-23 -266 -88 -433l286 -280l-49 -53l-268 266q-135 -270 -455 -270 q-258 0 -364.5 112.5t-106.5 313zM168 412q0 -174 94 -268.5t309 -94.5q281 0 398 254l-486 481q-176 -47 -245.5 -122.5t-69.5 -249.5zM397 1126q0 -160 92 -252l74 -73q178 61 248 128.5t70 196.5q0 229 -242 229t-242 -229z" />
+<glyph unicode="'" horiz-adv-x="382" d="M152 1434h81l-10 -430h-67z" />
+<glyph unicode="(" horiz-adv-x="479" d="M121 616.5q0 182.5 50 411.5t99 369l49 139h72q-70 -182 -132 -465t-62 -454t49 -389t98 -351l47 -133h-72q-23 51 -55.5 139t-87.5 319.5t-55 414z" />
+<glyph unicode=")" horiz-adv-x="479" d="M90 -256q70 172 132.5 437t62.5 436t-48.5 401.5t-97.5 374.5l-49 143h72q23 -57 55.5 -153.5t87.5 -340t55 -426t-49 -400.5t-98 -345l-51 -127h-72z" />
+<glyph unicode="*" horiz-adv-x="854" d="M131 938l225 164l-223 164l41 55l225 -166l86 264l66 -20l-86 -266h276v-70h-280l86 -264l-66 -21l-86 266l-225 -161z" />
+<glyph unicode="+" d="M121 479v70h414v434h73v-434h418v-70h-418v-438h-73v438h-414z" />
+<glyph unicode="," horiz-adv-x="403" d="M90 -252l86 430h82l-104 -430h-64z" />
+<glyph unicode="-" horiz-adv-x="937" d="M156 541v69h628v-69h-628z" />
+<glyph unicode="." horiz-adv-x="389" d="M154 0v164h82v-164h-82z" />
+<glyph unicode="/" horiz-adv-x="770" d="M68 25l567 1413l67 -29l-567 -1411z" />
+<glyph unicode="0" d="M100 645q0 428 125 584q66 80 148 111.5t200.5 31.5t201.5 -31.5t147 -111.5q123 -152 122 -582q0 -381 -126 -528q-63 -74 -146.5 -105.5t-198 -31.5t-197.5 30.5t-147 102.5q-129 145 -129 530zM178 643q0 -350 107 -477q53 -63 121.5 -89t183.5 -26t196.5 46 t131 180.5t49.5 381t-45 392t-128 199t-221.5 53.5t-220.5 -54q-174 -111 -174 -606z" />
+<glyph unicode="1" d="M264 1073l418 279h74v-1352h-74v1272l-383 -258z" />
+<glyph unicode="2" d="M147 0v63l465 496q100 106 147.5 161.5t85.5 137.5t38 166q0 150 -85 213t-259 63q-139 0 -312 -38l-57 -15l-10 70q190 53 390 53t305.5 -80t105.5 -266q0 -137 -61.5 -238.5t-207.5 -250.5l-444 -469h756v-66h-857z" />
+<glyph unicode="3" d="M135 29l12 69q215 -47 433 -47q348 2 348 316q0 168 -89 236.5t-243 76.5h-274v70h272q100 0 197.5 75.5t97.5 216t-73 201t-253 60.5t-338 -33l-51 -13l-12 70q195 45 405.5 45t305 -81t94.5 -257q0 -72 -23.5 -130t-56.5 -90t-68 -54q-59 -37 -84 -37 q133 -35 202 -108.5t69 -258.5q0 -375 -426 -374q-182 0 -383 34z" />
+<glyph unicode="4" d="M82 291v61l420 1000h80l-412 -992h623v449h73v-449h201v-69h-201v-291h-73v291h-711z" />
+<glyph unicode="5" d="M147 35l11 69q225 -49 405 -49t280.5 102.5t100.5 293.5q0 324 -350 323q-82 0 -173 -28.5t-142 -57.5l-52 -26l-69 8l39 682h761v-74h-692l-37 -539q70 41 176.5 73t190.5 32q426 0 426 -393q0 -231 -118 -348t-329 -117q-182 0 -366 37z" />
+<glyph unicode="6" d="M123 690q0 344 133 512t371 168q152 0 299 -14l49 -6l-8 -68q-168 18 -355.5 18t-298 -144t-112.5 -423l57 25q59 23 157.5 48t178.5 25q446 0 446 -405q0 -211 -117.5 -327.5t-340.5 -116.5q-459 0 -459 708zM199 662q10 -610 383 -611q186 0 283.5 96.5t97.5 271.5 t-97.5 259t-273.5 84q-84 0 -182.5 -24.5t-155.5 -49.5z" />
+<glyph unicode="7" d="M170 1282v70h823v-133l-549 -1237l-71 28l542 1225v47h-745z" />
+<glyph unicode="8" d="M70 344q0 156 68.5 233.5t207.5 135.5q-127 45 -190.5 118.5t-63.5 204.5q0 336 477 336q227 0 356.5 -83t129.5 -255q0 -133 -67.5 -206.5t-211.5 -114.5q143 -41 221 -120t78 -226q0 -213 -136 -299t-363.5 -86t-366.5 85t-139 277zM150 346q-1 -295 419 -295 q201 0 314.5 69.5t113.5 244.5q0 158 -96 221q-51 35 -98 52t-125 38h-240q-143 -35 -215.5 -108.5t-72.5 -221.5zM170 1046.5q0 -133.5 64.5 -199t203.5 -104.5h240q150 35 223.5 102.5t73.5 199t-104.5 195t-300 63.5t-298 -61.5t-102.5 -195z" />
+<glyph unicode="9" d="M102 924q0 205 123 325.5t328 120.5q240 0 354.5 -185.5t114.5 -538.5t-129 -508.5t-387 -155.5q-168 0 -299 16l-49 6l8 68q168 -21 340 -21q219 0 327.5 135.5t110.5 427.5q-233 -90 -414 -90q-428 0 -428 400zM180 924q0 -172 88.5 -251t266.5 -79q72 0 175 22.5 t171 47.5l65 22q-14 614 -393 614q-172 0 -272.5 -102t-100.5 -274z" />
+<glyph unicode=":" horiz-adv-x="391" d="M154 0v164h82v-164h-82zM154 705v163h82v-163h-82z" />
+<glyph unicode=";" horiz-adv-x="466" d="M127 -252l84 430h86l-107 -430h-63zM205 705v163h82v-163h-82z" />
+<glyph unicode="&#x3c;" d="M117 477v74l868 442v-80l-801 -399l801 -399v-84z" />
+<glyph unicode="=" d="M139 305v70h869v-70h-869zM139 651v70h869v-70h-869z" />
+<glyph unicode="&#x3e;" d="M160 31v84l801 399l-801 399v80l868 -442v-74z" />
+<glyph unicode="?" horiz-adv-x="927" d="M84 1397q229 55 340 55q203 0 306.5 -75t103.5 -249q0 -125 -38 -191.5t-139.5 -155.5t-133 -119.5t-64.5 -86t-33 -108.5v-78h-70q-2 45 -2 88t16.5 87t55.5 91q61 68 161.5 158t137.5 151.5t37 163.5q0 141 -83 198.5t-255 57.5q-88 0 -268 -43l-62 -14zM350 2v164h82 v-164h-82z" />
+<glyph unicode="@" horiz-adv-x="2004" d="M123 515q0 525 221 741.5t686 216.5t664.5 -203t199.5 -645v-35q0 -367 -71 -488q-25 -45 -48.5 -68.5t-62.5 -35.5q-61 -18 -134 -18t-116 13t-65 32q-45 43 -56 84q-84 -49 -200.5 -88t-178 -39t-98.5 5t-90 33.5t-86 80t-58.5 153.5t-25.5 244q0 279 94.5 411.5 t335.5 132.5q109 0 228 -41l43 -14v37h71v-410q0 -410 29 -483q10 -29 33.5 -54.5t53.5 -30.5t81 -5t80.5 6t66.5 35t56 86q43 131 43 422v37q0 412 -180.5 596t-611.5 184t-629.5 -196.5t-198.5 -675.5q0 -254 49 -424t156.5 -269.5t257 -141.5t370.5 -42l293 20l6 -67 q-201 -18 -299 -19q-238 0 -399.5 44.5t-280.5 150.5q-229 203 -229 728zM676 492q0 -289 96 -377q45 -41 85 -54.5t98.5 -13.5t152.5 31t158 61l61 31q-23 233 -22 444v308q-150 55 -271 55q-207 0 -282.5 -118t-75.5 -367z" />
+<glyph unicode="A" horiz-adv-x="1212" d="M57 0l441 1434h217l440 -1434h-74l-133 440h-684l-133 -440h-74zM287 510h639l-262 854h-115z" />
+<glyph unicode="B" horiz-adv-x="1269" d="M188 0v1434h492q414 0 414 -355q0 -266 -199 -340q254 -70 254 -344q0 -221 -109.5 -308t-320.5 -87h-531zM262 70h457q170 0 262 72.5t92 252.5q0 303 -371 303h-440v-628zM262 768h440q166 0 241 76t75 229.5t-82 222t-256 68.5h-418v-596z" />
+<glyph unicode="C" horiz-adv-x="1116" d="M137 692q0 164 11.5 268.5t43 203t87.5 157.5q123 131 368 131q180 0 379 -39l-6 -72q-197 41 -341 41t-224 -32.5t-126 -85t-72 -143.5t-34 -183t-8 -227.5t8 -227.5t35 -180t74 -139q104 -113 315 -113q160 0 373 41l6 -69q-205 -41 -369.5 -41t-266 48t-157 148.5 t-76 225t-20.5 288.5z" />
+<glyph unicode="D" horiz-adv-x="1329" d="M188 0v1434h533q131 0 226 -57.5t149.5 -159t79 -221t24.5 -263t-25.5 -268.5t-79 -232.5t-149.5 -170t-225 -62.5h-533zM262 70h459q111 0 191.5 59t124.5 158.5t64.5 211t20.5 257t-33.5 279.5t-128 231.5t-239.5 97.5h-459v-1294z" />
+<glyph unicode="E" horiz-adv-x="1130" d="M188 0v1434h838v-70h-764v-596h641v-70h-641v-628h764v-70h-838z" />
+<glyph unicode="F" horiz-adv-x="1071" d="M188 0v1434h822v-70h-748v-647h643v-70h-643v-647h-74z" />
+<glyph unicode="G" horiz-adv-x="1267" d="M133 711q0 178 23.5 306t81.5 230q115 205 432 205q182 0 387 -39l63 -12l-6 -72q-258 53 -422 53t-256 -45t-140 -139t-66.5 -207.5t-18.5 -278.5t19.5 -279t68.5 -204q96 -178 371 -178q152 0 377 41v549h-308v70h381v-678q-264 -51 -450 -51q-301 0 -419 182t-118 547 z" />
+<glyph unicode="H" horiz-adv-x="1380" d="M188 0v1434h74v-680h856v680h74v-1434h-74v684h-856v-684h-74z" />
+<glyph unicode="I" horiz-adv-x="450" d="M188 0v1434h74v-1434h-74z" />
+<glyph unicode="J" horiz-adv-x="573" d="M37 -80q199 0 231 35q41 45 45 107.5t4 134.5v1237h74v-1268q0 -160 -39 -219q-23 -35 -45 -54.5t-69 -27.5q-70 -14 -201 -15v70z" />
+<glyph unicode="K" horiz-adv-x="1132" d="M188 0v1434h74v-691h264l451 691h88l-473 -721l506 -713h-94l-474 674h-268v-674h-74z" />
+<glyph unicode="L" horiz-adv-x="989" d="M188 0v1434h74v-1364h699v-70h-773z" />
+<glyph unicode="M" horiz-adv-x="1695" d="M188 0v1434h156l504 -1321l504 1321h155v-1434h-73v1364h-29l-504 -1321h-106l-504 1321h-29v-1364h-74z" />
+<glyph unicode="N" horiz-adv-x="1361" d="M188 0v1434h174l682 -1364h56v1364h74v-1434h-175l-684 1364h-53v-1364h-74z" />
+<glyph unicode="O" horiz-adv-x="1363" d="M133 711q0 377 119 559t430 182t430 -181t119 -566.5t-116 -554t-437 -168.5t-436 186q-61 98 -85 226t-24 317zM211 710q0 -173 18.5 -286t68.5 -202t144.5 -130t240.5 -41t239.5 38t143.5 125t68.5 201.5t18.5 295.5q0 344 -99.5 507.5t-371.5 163.5q-285 0 -383 -178 q-49 -90 -68.5 -205.5t-19.5 -288.5z" />
+<glyph unicode="P" horiz-adv-x="1218" d="M188 0v1434h523q221 0 322.5 -107.5t101.5 -333.5q0 -467 -424 -467h-449v-526h-74zM262 596h449q346 0 346 397q0 188 -82 279.5t-264 91.5h-449v-768z" />
+<glyph unicode="Q" horiz-adv-x="1363" d="M133 711q0 377 119 559t430 182t430 -181t119 -560q0 -281 -54.5 -440.5t-193.5 -231.5l176 -287l-74 -35l-178 293q-96 -29 -239 -29q-2 0 -4 1q-146 0 -254.5 45t-169 142t-84 225t-23.5 317zM211 710q0 -173 18.5 -286t68.5 -202t144.5 -130t240.5 -41t239.5 38 t143.5 125t68.5 201.5t18.5 295.5q0 344 -99.5 507.5t-371.5 163.5q-285 0 -383 -178q-49 -90 -68.5 -205.5t-19.5 -288.5z" />
+<glyph unicode="R" horiz-adv-x="1255" d="M188 0v1434h514q217 0 321.5 -98.5t104.5 -311.5q0 -362 -297 -420l324 -604h-84l-319 594h-490v-594h-74zM262 664h440q349 0 349 360q0 178 -84 259t-265 81h-440v-700z" />
+<glyph unicode="S" horiz-adv-x="1105" d="M115 1096q0 360 442 360q141 0 340 -24l68 -9l-9 -71q-280 34 -399 34q-364 0 -364 -284q0 -131 43 -189q25 -31 51 -52t78 -38q84 -25 213 -45q223 -35 320 -107.5t97 -254.5q0 -231 -107.5 -330.5t-326.5 -99.5q-135 0 -362 24l-76 8l8 72q283 -35 447 -35 q340 0 340 355q0 150 -78 207t-241 81.5t-231.5 44t-133 60.5t-92 111.5t-27.5 181.5z" />
+<glyph unicode="T" horiz-adv-x="1077" d="M27 1364v70h1024v-70h-473v-1364h-74v1364h-477z" />
+<glyph unicode="U" horiz-adv-x="1306" d="M180 401v1033h74v-1033q0 -186 100.5 -268t296 -82t299 81t103.5 269v1033h73v-1033q0 -223 -121.5 -321t-354 -98t-351.5 98t-119 321z" />
+<glyph unicode="V" horiz-adv-x="1163" d="M61 1434h74l381 -1364h131l381 1364h74l-402 -1434h-237z" />
+<glyph unicode="W" horiz-adv-x="1753" d="M78 1434h74l286 -1364h80l313 1343h91l313 -1343h80l287 1364h73l-301 -1434h-196l-301 1313l-302 -1313h-196z" />
+<glyph unicode="X" horiz-adv-x="1128" d="M51 0l463 711l-463 723h88l426 -668l424 668h88l-456 -723l456 -711h-88l-422 659l-428 -659h-88z" />
+<glyph unicode="Y" horiz-adv-x="1077" d="M35 1434h86l418 -736l417 736h86l-467 -818v-616h-73v616z" />
+<glyph unicode="Z" horiz-adv-x="1103" d="M90 -2v141l846 1176v49h-846v70h922v-144l-846 -1177v-45h846v-70h-922z" />
+<glyph unicode="[" horiz-adv-x="636" d="M176 -252v1786h373v-66h-301v-1654h301v-66h-373z" />
+<glyph unicode="\" horiz-adv-x="808" d="M59 1407l72 29l617 -1407l-72 -29z" />
+<glyph unicode="]" horiz-adv-x="636" d="M88 -186h301v1654h-301v66h373v-1786h-373v66z" />
+<glyph unicode="^" d="M168 662l369 690h73l387 -690h-82l-342 616l-323 -616h-82z" />
+<glyph unicode="_" horiz-adv-x="1310" d="M217 -213h877v-70h-877v70z" />
+<glyph unicode="`" horiz-adv-x="440" d="M20 1436l33 63l393 -196l-30 -56z" />
+<glyph unicode="a" horiz-adv-x="1013" d="M98 273.5q0 140.5 67.5 214t215.5 87.5l389 41v107q0 131 -56.5 190.5t-170.5 59.5q-117 0 -324 -27l-63 -8l-6 68q223 36 384 36h9q299 0 299 -319v-590q8 -74 153 -86l-4 -63q-150 0 -211 86q-209 -88 -413 -88q-127 0 -198 75.5t-71 216zM174 278.5q0 -110.5 50 -171 t140.5 -60.5t190.5 21.5t158 42.5l57 20v420l-381 -39q-117 -12 -166 -67.5t-49 -166z" />
+<glyph unicode="b" horiz-adv-x="1052" d="M160 0v1495h71v-534q169 82 359 82q0 -1 2 -1q192 0 266 -118.5t74 -407.5t-96.5 -411.5t-370.5 -122.5q-143 0 -260 14zM231 59q160 -12 259.5 -12t178.5 26.5t119.5 92t54 146.5t13.5 216q0 242 -55.5 345.5t-216.5 103.5q-82 0 -170 -20.5t-135 -41.5l-48 -20v-836z " />
+<glyph unicode="c" horiz-adv-x="878" d="M123 517q0 300 94 412.5t326 112.5l245 -20l-4 -66q-163 21 -241 21q-195 0 -269.5 -98.5t-74.5 -359.5t67.5 -366.5t276.5 -105.5l245 19l5 -66q-172 -18 -250 -18q-250 0 -335 117.5t-85 417.5z" />
+<glyph unicode="d" horiz-adv-x="1054" d="M119 496q0 279 95 412.5t337 133.5q117 0 270 -24v477h72v-1495h-72v86q-59 -39 -165.5 -71.5t-173 -32.5t-102.5 5t-89 32.5t-87 79t-59.5 153.5t-25.5 244zM195 496q0 -295 94 -381q45 -41 85 -54.5t105.5 -13.5t154.5 26.5t138 53.5l49 27v798q-160 25 -270 25 q-207 0 -281.5 -117t-74.5 -364z" />
+<glyph unicode="e" horiz-adv-x="1028" d="M119 512q0 530 413 530q195 0 292.5 -116.5t97.5 -374.5v-68h-727q0 -221 69.5 -328.5t231 -107.5t321.5 14l62 5l4 -66q-229 -18 -379 -18q-217 2 -301 132t-84 398zM195 549h651q0 231 -75 329.5t-239 98.5q-337 0 -337 -428z" />
+<glyph unicode="f" horiz-adv-x="641" d="M59 958v66h142v125q0 215 57 289.5t203 74.5l188 -6v-63q-131 4 -188 4q-109 0 -149 -60.5t-40 -240.5v-123h332v-66h-332v-958h-71v958h-142z" />
+<glyph unicode="g" horiz-adv-x="1026" d="M119 -164q0 117 78 187q29 27 96 75q-45 29 -45 133q0 29 47 127l14 33q-176 57 -176 311q0 342 350 342q106 0 189 -20l28 -6l287 6v-72h-221q82 -76 82 -255t-89 -254.5t-284 -75.5q-61 0 -110 8q-47 -117 -47.5 -147.5t4 -47t16.5 -31t47 -18.5q63 -10 239.5 -10 t256.5 -56.5t80 -230.5t-103.5 -248.5t-342.5 -74.5t-317.5 68.5t-78.5 256.5zM193 -162q0 -152 64.5 -207t262 -55t281.5 58.5t84 198.5t-61.5 181t-229.5 41l-248 6q-92 -63 -122.5 -107t-30.5 -116zM207 702.5q0 -151.5 63.5 -211t218 -59.5t219 58.5t64.5 212t-64.5 215 t-219 61.5t-218 -62.5t-63.5 -214z" />
+<glyph unicode="h" horiz-adv-x="1077" d="M162 0v1495h71v-532q179 80 369 80q1 -1 2 -1q191 0 256.5 -103t65.5 -407v-532h-72v528q0 270 -49 359.5t-215 89.5q-82 0 -171 -20.5t-136 -41.5l-50 -20v-895h-71z" />
+<glyph unicode="i" horiz-adv-x="395" d="M162 0v1024h71v-1024h-71zM162 1321v113h71v-113h-71z" />
+<glyph unicode="j" horiz-adv-x="393" d="M-121 -383q178 96 230.5 166.5t52.5 228.5v1012h71v-1014q0 -174 -64.5 -265t-260.5 -191zM162 1321v113h71v-113h-71z" />
+<glyph unicode="k" horiz-adv-x="931" d="M162 0v1495h71v-903h197l352 432h86l-376 -463l393 -561h-86l-369 526h-197v-526h-71z" />
+<glyph unicode="l" horiz-adv-x="419" d="M174 0v1495h72v-1495h-72z" />
+<glyph unicode="m" horiz-adv-x="1708" d="M162 0v1024h71v-82q18 10 49 27.5t120.5 45t183.5 27.5q188 0 258 -110q74 43 180 76.5t197 33.5q205 0 270 -103t65 -407v-532h-71v528q0 270 -49.5 359.5t-214.5 89.5q-88 0 -176.5 -25.5t-131.5 -50.5l-45 -24q37 -100 37 -345v-532h-71v528q0 270 -49.5 359.5 t-215.5 89.5q-82 0 -166 -25.5t-127 -50.5l-43 -27v-874h-71z" />
+<glyph unicode="n" horiz-adv-x="1079" d="M162 0v1024h71v-82q182 100 373 100t256.5 -103t65.5 -407v-532h-72v528q0 270 -49 359.5t-215 89.5q-82 0 -171 -25.5t-138 -50.5l-50 -27v-874h-71z" />
+<glyph unicode="o" horiz-adv-x="1077" d="M123 514q0 299 94 413.5t321.5 114.5t321.5 -114.5t94 -413.5t-84 -415.5t-331.5 -116.5t-331.5 116.5t-84 415.5zM199 530q0 -145 10 -226t46 -145.5t102.5 -88t181 -23.5t181 23.5t102.5 88t46.5 145.5t10.5 226q0 258 -72 352.5t-268.5 94.5t-268 -94.5t-71.5 -352.5z " />
+<glyph unicode="p" horiz-adv-x="1056" d="M162 -471v1495h71v-86q59 39 166 71.5t189 32.5q184 0 267 -124.5t83 -401t-99.5 -405.5t-334.5 -129q-139 0 -271 28v-481h-71zM233 76q158 -29 271 -29q197 0 277.5 109.5t80.5 360.5t-68.5 355.5t-205.5 104.5q-78 0 -167 -27.5t-138 -54.5l-50 -27v-792z" />
+<glyph unicode="q" horiz-adv-x="1052" d="M119 507.5q0 278.5 102.5 406.5t364.5 128l305 -18v-1495h-72v530q-149 -78 -340 -78q-1 0 -2 1q-192 0 -275 123.5t-83 402zM195 510q0 -244 64.5 -353.5t227.5 -109.5q82 0 165 20.5t126 41.5l41 20v836q-159 12 -231 12q-229 0 -311 -111.5t-82 -355.5z" />
+<glyph unicode="r" horiz-adv-x="671" d="M162 0v1024h71v-160q61 49 183.5 105.5t222.5 74.5v-73q-90 -18 -191.5 -61.5t-156.5 -78.5l-58 -34v-797h-71z" />
+<glyph unicode="s" horiz-adv-x="944" d="M104 751.5q0 118.5 55.5 183t129 86t153.5 21.5q166 0 312 -22l53 -8l-4 -68q-209 33 -348 33q-274 0 -275 -205q0 -96 57.5 -136t254 -70.5t274.5 -82t78 -206t-98.5 -225t-290.5 -70.5q-104 0 -279 24l-59 8l8 68q221 -35 352 -35t211 51.5t80 174t-62.5 161.5 t-256 68.5t-269.5 80t-76 169z" />
+<glyph unicode="t" horiz-adv-x="700" d="M59 958v66h162v334h72v-334h373v-66h-373v-536q0 -236 33.5 -306.5t154.5 -70.5l201 16l6 -65q-135 -16 -207 -16q-145 0 -202.5 74.5t-57.5 289.5v614h-162z" />
+<glyph unicode="u" horiz-adv-x="1056" d="M152 492v532h71v-528q0 -270 49.5 -359.5t214.5 -89.5q82 0 166 25.5t127 50.5l43 27v874h72v-1024h-72v82q-18 -10 -49 -27.5t-120 -45t-167 -27.5q-205 0 -270 103t-65 407z" />
+<glyph unicode="v" horiz-adv-x="962" d="M63 1024h84l289 -958h90l297 958h76l-317 -1024h-201z" />
+<glyph unicode="w" horiz-adv-x="1548" d="M74 1024h76l260 -958h22l303 938h78l303 -938h23l260 958h76l-277 -1024h-139l-285 918l-285 -918h-139z" />
+<glyph unicode="x" horiz-adv-x="894" d="M57 0l346 512l-346 512h84l305 -457l308 457h84l-349 -512l347 -512h-84l-306 457l-305 -457h-84z" />
+<glyph unicode="y" horiz-adv-x="964" d="M63 1024h76l301 -958h84l303 958h76l-469 -1495h-76l148 471h-125z" />
+<glyph unicode="z" horiz-adv-x="931" d="M86 0v66l670 892h-670v66h760v-66l-668 -892h668v-66h-760z" />
+<glyph unicode="{" horiz-adv-x="708" d="M59 602v66q117 29 165 86t48 159l-14 263q0 184 83 269t277 93l5 -65q-168 -8 -230.5 -79t-62.5 -218l14 -244q0 -133 -45 -195.5t-160 -99.5q115 -37 160 -100.5t45 -190.5q-14 -143 -14 -237q0 -145 63.5 -217t229.5 -80l-5 -66q-195 8 -277.5 93t-82.5 270l14 251 q0 98 -48 153.5t-165 88.5z" />
+<glyph unicode="|" horiz-adv-x="419" d="M174 -471v1966h72v-1966h-72z" />
+<glyph unicode="}" horiz-adv-x="708" d="M86 -188q166 8 229.5 80t63.5 217q0 94 -14 237q0 127 45 190.5t159 100.5q-115 37 -159.5 99.5t-44.5 195.5l14 244q0 147 -62.5 217.5t-230.5 79.5l4 65q195 -8 278 -93t83 -269l-15 -263q0 -102 48 -159.5t165 -85.5v-66q-117 -33 -165 -88t-48 -154l15 -251 q0 -184 -83 -269.5t-278 -93.5z" />
+<glyph unicode="~" d="M145 543q127 111 230 110q61 0 211.5 -74.5t187.5 -74.5t89 26.5t87 53.5l37 26l23 -63q-128 -113 -230 -113q-61 0 -211.5 75t-187.5 75t-89 -27t-87 -53l-37 -27z" />
+<glyph unicode="&#xa1;" horiz-adv-x="417" d="M166 860v164h82v-164h-82zM172 -410v996h72v-996h-72z" />
+<glyph unicode="&#xa2;" d="M223 499.5q0 235.5 84 337t273 107.5v266h71v-268q82 0 199 -18l39 -6l-4 -68q-164 20 -283 20q-164 0 -230.5 -82.5t-66.5 -284.5t64.5 -273.5t253.5 -71.5q106 0 225 12l41 4l4 -72q-152 -16 -240 -18v-258h-71v258q-197 6 -278 93t-81 322.5z" />
+<glyph unicode="&#xa3;" d="M170 0v70h188v696h-141v65h141v107q0 258 60.5 345t220.5 87q70 0 201 -18l45 -6v-66q-178 25 -246 25q-127 0 -168 -74t-41 -301v-99h373v-65h-373v-696h356l168 32l15 -65l-168 -37h-631z" />
+<glyph unicode="&#xa4;" d="M158 154l145 143q-78 94 -78 219t78 219l-145 144l53 53l143 -146q94 78 219 78t220 -78l143 146l53 -53l-145 -144q78 -94 78 -219t-78 -219l145 -143l-53 -54l-143 146q-95 -78 -219.5 -78t-219.5 78l-143 -146zM299 516q0 -113 81 -193.5t193.5 -80.5t193.5 80.5 t81 193.5t-81 194t-193.5 81t-193.5 -81t-81 -194z" />
+<glyph unicode="&#xa5;" d="M72 1352h84l419 -633l414 633h86l-391 -604h344v-70h-389l-27 -41v-195h418v-69h-418v-373h-73v373h-420v69h420v195l-27 41h-395v70h350z" />
+<glyph unicode="&#xa6;" horiz-adv-x="428" d="M178 299h72v-770h-72v770zM178 725v770h72v-770h-72z" />
+<glyph unicode="&#xa7;" horiz-adv-x="997" d="M127 580q0 61 27.5 122.5t54.5 92.5l29 30q-90 68 -91 224q0 303 359 303q129 0 268 -21l51 -6l-4 -65q-217 26 -315 26q-287 0 -287 -225q0 -133 66.5 -179t239.5 -73t255 -86t82 -201q0 -59 -19.5 -123.5t-39.5 -99.5l-21 -37q74 -57 74 -203.5t-91 -228.5t-263 -82 q-90 0 -285 21l-59 6l6 65q225 -29 338 -28q283 0 282 258q0 117 -64.5 154.5t-242.5 62t-264 87t-86 206.5zM199 580.5q0 -107.5 71.5 -157.5t233.5 -73.5t225 -54.5q61 106 61.5 222t-66.5 160t-222.5 68.5t-212.5 51.5q-90 -109 -90 -216.5z" />
+<glyph unicode="&#xa8;" horiz-adv-x="440" d="M0 1307v127h72v-127h-72zM389 1307v127h72v-127h-72z" />
+<glyph unicode="&#xa9;" horiz-adv-x="1325" d="M139 889q0 227 149.5 386t373 159t374 -159t150.5 -386t-150.5 -385t-374 -158t-373 158t-149.5 385zM205 889q0 -201 130 -339t326.5 -138t327.5 138t131 339t-131 340t-327.5 139t-326.5 -139t-130 -340zM438 887.5q0 154.5 47 234.5t177 80q80 0 131 -10l20 -4l-2 -66 q-84 14 -149 15q-100 0 -129 -57.5t-29 -188.5t32.5 -190.5t125.5 -59.5l149 16l2 -65q-88 -17 -151 -17q-127 0 -175.5 79t-48.5 233.5z" />
+<glyph unicode="&#xaa;" horiz-adv-x="749" d="M127 954q0 143 154 156l208 14v47q0 63 -25.5 90t-80.5 27l-213 -14l-4 59q141 16 223 16.5t123 -42t41 -138.5v-274q23 -35 76 -47l-4 -57q-66 2 -111 45q-129 -45 -244 -45q-63 0 -103 45t-40 118zM195 950q0 -96 81.5 -96t180.5 27l32 10v174l-198 -12 q-51 -2 -73.5 -27t-22.5 -76z" />
+<glyph unicode="&#xab;" horiz-adv-x="1017" d="M98 479v74l342 264v-80l-276 -217l276 -239v-84zM522 479v74l342 264v-80l-276 -217l276 -239v-84z" />
+<glyph unicode="&#xac;" d="M145 610v70h865v-422h-74v352h-791z" />
+<glyph unicode="&#xad;" horiz-adv-x="937" d="M156 541v69h628v-69h-628z" />
+<glyph unicode="&#xae;" horiz-adv-x="1325" d="M139 889q0 227 149.5 386t373 159t374 -159t150.5 -386t-150.5 -385t-374 -158t-373 158t-149.5 385zM205 889q0 -201 130 -339t326.5 -138t327.5 138t131 339t-131 340t-327.5 139t-326.5 -139t-130 -340zM453 586v604h190q121 0 176 -41t55 -141q0 -147 -120 -179 l133 -243h-72l-135 237h-162v-237h-65zM518 887h164q70 0 98.5 26.5t28.5 94t-39 93t-125 25.5h-127v-239z" />
+<glyph unicode="&#xaf;" horiz-adv-x="440" d="M-41 1315v65h547v-65h-547z" />
+<glyph unicode="&#xb0;" d="M295 1173.5q0 124.5 77 201.5t201.5 77t201.5 -77t77 -201.5t-77 -200.5t-201.5 -76t-201.5 76t-77 200.5zM365 1173.5q0 -96.5 57 -153.5t152.5 -57t153.5 58t58 153.5t-59 153.5t-153.5 58t-151.5 -58t-57 -154.5z" />
+<glyph unicode="&#xb1;" d="M121 102v70h905v-70h-905zM121 631v69h414v283h73v-283h418v-69h-418v-295h-73v295h-414z" />
+<glyph unicode="&#xb2;" horiz-adv-x="573" d="M74 979v63l200 220q68 72 89.5 117.5t21.5 92t-33 73t-73 26.5q-72 0 -164 -15l-31 -6l-4 60q104 27 190 26q186 0 187 -174q0 -68 -30 -120t-101 -125l-164 -170h309v-68h-397z" />
+<glyph unicode="&#xb3;" horiz-adv-x="573" d="M76 983l6 64q111 -18 194.5 -18.5t115.5 32.5t32 88q0 127 -123 127h-133v67h133q37 0 71 39t34 91q0 96 -119 96q-94 0 -168 -13l-29 -6l-6 64q109 23 205 22.5t142 -39t46 -107.5t-22 -108q-37 -59 -72 -65q59 -16 86 -50t27 -116q0 -190 -201 -190q-98 0 -186 16z" />
+<glyph unicode="&#xb4;" horiz-adv-x="548" d="M82 1303l393 196l33 -63l-395 -189z" />
+<glyph unicode="&#xb5;" d="M201 -471v1495h71v-528q0 -270 49.5 -359.5t215.5 -89.5q82 0 165.5 25.5t126.5 50.5l43 27v874h72v-1024h-72v82q-18 -10 -48.5 -27.5t-120 -45t-166.5 -27.5q-197 0 -265 92v-545h-71z" />
+<glyph unicode="&#xb6;" horiz-adv-x="1206" d="M82 1073q0 158 109.5 259.5t271.5 101.5h672v-68h-199v-1366h-74v1366h-311v-1366h-74v717h-14q-162 0 -271.5 99t-109.5 257z" />
+<glyph unicode="&#xb7;" horiz-adv-x="391" d="M156 553v164h82v-164h-82z" />
+<glyph unicode="&#xb8;" horiz-adv-x="538" d="M102 -403l4 57q90 -8 160 -8q98 0 99 94q0 86 -99 86h-110v176h67v-119q115 0 164 -30.5t49 -112.5q0 -152 -168 -152z" />
+<glyph unicode="&#xb9;" horiz-adv-x="573" d="M94 1481l203 137h72v-639h-72v559l-168 -115z" />
+<glyph unicode="&#xba;" horiz-adv-x="722" d="M126 1070.5q0 279.5 236 279.5q119 0 175.5 -66.5t56.5 -210.5q0 -283 -232 -282q-236 0 -236 279.5zM197 1072q0 -116 38.5 -166t127 -50t125 50t36.5 167t-36.5 164t-125 47t-127 -48t-38.5 -164z" />
+<glyph unicode="&#xbb;" horiz-adv-x="1017" d="M154 197v84l276 239l-276 217v80l342 -264v-74zM578 197v84l276 239l-276 217v80l342 -264v-74z" />
+<glyph unicode="&#xbc;" horiz-adv-x="1075" d="M80 57l803 1293l61 -39l-803 -1291zM100 1481l203 137h72v-639h-72v559l-168 -115zM549 -25l182 459h78l-178 -454h217v180h74v-180h75v-68h-75v-117h-74v117h-299v63z" />
+<glyph unicode="&#xbd;" horiz-adv-x="1064" d="M74 57l803 1293l61 -39l-803 -1291zM115 1481l202 137h72v-639h-72v559l-167 -115zM563 -141l201 219q68 72 89 118t21 92t-32.5 72.5t-73.5 26.5q-72 0 -164 -14l-31 -6l-4 59q104 27 191 27q186 0 186 -174q0 -68 -29.5 -120.5t-101.5 -125.5l-164 -170h310v-68h-398 v64z" />
+<glyph unicode="&#xbe;" horiz-adv-x="1112" d="M119 57l803 1293l61 -39l-803 -1291zM119 983l6 64q111 -18 194.5 -18.5t115.5 32.5t32 88q0 127 -123 127h-133v67h133q37 0 71 39t34 91q0 96 -119 96q-94 0 -168 -13l-29 -6l-6 64q109 23 205 22.5t142 -39t46 -107.5t-22 -108q-31 -51 -72 -65q59 -16 86 -51t27 -115 q0 -190 -201 -190q-98 0 -186 16zM588 -25l182 459h78l-178 -454h217v180h74v-180h75v-68h-75v-117h-74v117h-299v63z" />
+<glyph unicode="&#xbf;" horiz-adv-x="915" d="M88 -102q0 125 38 191.5t139.5 155.5t133 119.5t64.5 86t33 108.5v78h69q2 -45 2 -88t-16 -87t-55 -89q-61 -70 -162 -160t-137.5 -151.5t-36.5 -163.5q0 -141 83 -198.5t255 -57.5q88 0 268 43l61 14l11 -70q-229 -55 -340 -55q-203 0 -306.5 75t-103.5 249zM489 860 v164h82v-164h-82z" />
+<glyph unicode="&#xc0;" horiz-adv-x="1212" d="M57 0l441 1434h217l440 -1434h-74l-133 440h-684l-133 -440h-74zM287 510h639l-262 854h-115zM362 1825l33 63l393 -196l-30 -56z" />
+<glyph unicode="&#xc1;" horiz-adv-x="1212" d="M57 0l441 1434h217l440 -1434h-74l-133 440h-684l-133 -440h-74zM287 510h639l-262 854h-115zM414 1692l393 196l33 -63l-396 -189z" />
+<glyph unicode="&#xc2;" horiz-adv-x="1212" d="M57 0l441 1434h217l440 -1434h-74l-133 440h-684l-133 -440h-74zM287 510h639l-262 854h-115zM299 1657l274 256h62l274 -256h-92l-213 196l-211 -196h-94z" />
+<glyph unicode="&#xc3;" horiz-adv-x="1212" d="M57 0l441 1434h217l440 -1434h-74l-133 440h-684l-133 -440h-74zM287 510h639l-262 854h-115zM289 1782q90 111 157 110q47 0 171 -60t149 -60q37 0 104 73l23 25l22 -58q-80 -106 -135 -106t-179 61.5t-148 61.5q-45 0 -119 -80l-25 -27z" />
+<glyph unicode="&#xc4;" horiz-adv-x="1212" d="M57 0l441 1434h217l440 -1434h-74l-133 440h-684l-133 -440h-74zM287 510h639l-262 854h-115zM369 1716v127h71v-127h-71zM770 1716v127h72v-127h-72z" />
+<glyph unicode="&#xc5;" horiz-adv-x="1212" d="M57 0l428 1395q-82 49 -82 148t54.5 149.5t144.5 50.5t144.5 -50.5t54.5 -145.5t-76 -148l430 -1399h-74l-133 440h-684l-133 -440h-74zM287 510h639l-262 854h-115zM471 1554q0 -98 82 -120h96q84 23 84 120q0 61 -34.5 94t-96 33t-96.5 -33t-35 -94z" />
+<glyph unicode="&#xc6;" horiz-adv-x="1800" d="M51 0l514 1434h1131v-70h-764v-590h641v-69h-641v-635h764v-70h-838v440h-565l-160 -440h-82zM317 510h541v854h-235z" />
+<glyph unicode="&#xc7;" horiz-adv-x="1116" d="M137 713.5q0 142.5 11.5 247t43 203t87.5 157.5q123 131 368 131q180 0 379 -39l-6 -72q-197 41 -341 41t-224 -32.5t-126 -85t-72 -143.5t-34 -183t-8 -227.5t8 -227.5t35 -180t74 -139q104 -113 315 -113q160 0 373 41l6 -69q-184 -39 -356 -41v-99q115 0 164 -30.5 t49 -112.5q0 -152 -168 -152l-166 9l4 57q90 -8 160 -8q98 0 98 94q0 86 -98 86h-111v158q-221 12 -330 137q-98 115 -125 346q-10 104 -10 246.5z" />
+<glyph unicode="&#xc8;" horiz-adv-x="1130" d="M188 0v1434h838v-70h-764v-596h641v-70h-641v-628h764v-70h-838zM387 1825l33 63l393 -196l-31 -56z" />
+<glyph unicode="&#xc9;" horiz-adv-x="1130" d="M188 0v1434h838v-70h-764v-596h641v-70h-641v-628h764v-70h-838zM393 1692l393 196l33 -63l-395 -189z" />
+<glyph unicode="&#xca;" horiz-adv-x="1130" d="M188 0v1434h838v-70h-764v-596h641v-70h-641v-628h764v-70h-838zM291 1657l274 256h62l274 -256h-92l-213 196l-211 -196h-94z" />
+<glyph unicode="&#xcb;" horiz-adv-x="1130" d="M188 0v1434h838v-70h-764v-596h641v-70h-641v-628h764v-70h-838zM369 1716v127h71v-127h-71zM770 1716v127h72v-127h-72z" />
+<glyph unicode="&#xcc;" horiz-adv-x="450" d="M-37 1825l33 63l393 -196l-31 -56zM188 0v1434h74v-1434h-74z" />
+<glyph unicode="&#xcd;" horiz-adv-x="450" d="M35 1692l393 196l33 -63l-395 -189zM188 0v1434h74v-1434h-74z" />
+<glyph unicode="&#xce;" horiz-adv-x="450" d="M-92 1657l274 256h62l274 -256h-92l-213 196l-211 -196h-94zM188 0v1434h74v-1434h-74z" />
+<glyph unicode="&#xcf;" horiz-adv-x="450" d="M-12 1716v127h71v-127h-71zM188 0v1434h74v-1434h-74zM389 1716v127h72v-127h-72z" />
+<glyph unicode="&#xd0;" horiz-adv-x="1333" d="M35 684v70h158v680h532q131 0 226.5 -57.5t150.5 -157.5q102 -190 102 -482q0 -289 -104 -501q-53 -109 -149.5 -172.5t-225.5 -63.5h-532v684h-158zM266 70h459q111 0 191.5 59t124.5 160.5t64.5 213t20.5 234.5t-20.5 228.5t-64.5 198.5t-124.5 146.5t-191.5 53.5h-459 v-610h363v-70h-363v-614z" />
+<glyph unicode="&#xd1;" horiz-adv-x="1361" d="M188 0v1434h174l682 -1364h56v1364h74v-1434h-175l-684 1364h-53v-1364h-74zM367 1782q90 111 157 110q47 0 171 -60t149 -60q37 0 104 73l23 25l22 -58q-80 -106 -135 -106t-179 61.5t-149 61.5q-45 0 -118 -80l-25 -27z" />
+<glyph unicode="&#xd2;" horiz-adv-x="1363" d="M133 711q0 377 119 559t430 182t430 -181t119 -566.5t-116 -554t-437 -168.5t-436 186q-61 98 -85 226t-24 317zM211 710q0 -173 18.5 -286t68.5 -202t144.5 -130t240.5 -41t239.5 38t143.5 125t68.5 201.5t18.5 295.5q0 344 -99.5 507.5t-371.5 163.5q-285 0 -383 -178 q-49 -90 -68.5 -205.5t-19.5 -288.5zM463 1825l33 63l393 -196l-31 -56z" />
+<glyph unicode="&#xd3;" horiz-adv-x="1363" d="M133 711q0 377 119 559t430 182t430 -181t119 -566.5t-116 -554t-437 -168.5t-436 186q-61 98 -85 226t-24 317zM211 710q0 -173 18.5 -286t68.5 -202t144.5 -130t240.5 -41t239.5 38t143.5 125t68.5 201.5t18.5 295.5q0 344 -99.5 507.5t-371.5 163.5q-285 0 -383 -178 q-49 -90 -68.5 -205.5t-19.5 -288.5zM449 1692l393 196l32 -63l-395 -189z" />
+<glyph unicode="&#xd4;" horiz-adv-x="1363" d="M133 711q0 377 119 559t430 182t430 -181t119 -566.5t-116 -554t-437 -168.5t-436 186q-61 98 -85 226t-24 317zM211 710q0 -173 18.5 -286t68.5 -202t144.5 -130t240.5 -41t239.5 38t143.5 125t68.5 201.5t18.5 295.5q0 344 -99.5 507.5t-371.5 163.5q-285 0 -383 -178 q-49 -90 -68.5 -205.5t-19.5 -288.5zM377 1657l274 256h62l274 -256h-92l-213 196l-211 -196h-94z" />
+<glyph unicode="&#xd5;" horiz-adv-x="1363" d="M133 711q0 377 119 559t430 182t430 -181t119 -566.5t-116 -554t-437 -168.5t-436 186q-61 98 -85 226t-24 317zM211 710q0 -173 18.5 -286t68.5 -202t144.5 -130t240.5 -41t239.5 38t143.5 125t68.5 201.5t18.5 295.5q0 344 -99.5 507.5t-371.5 163.5q-285 0 -383 -178 q-49 -90 -68.5 -205.5t-19.5 -288.5zM360 1782q90 111 158 110q47 0 171 -60t147 -60q43 0 106 73l23 25l22 -58q-80 -106 -135 -106t-179 61.5t-149 61.5q-45 0 -118 -80l-25 -27z" />
+<glyph unicode="&#xd6;" horiz-adv-x="1363" d="M133 711q0 377 119 559t430 182t430 -181t119 -566.5t-116 -554t-437 -168.5t-436 186q-61 98 -85 226t-24 317zM211 710q0 -173 18.5 -286t68.5 -202t144.5 -130t240.5 -41t239.5 38t143.5 125t68.5 201.5t18.5 295.5q0 344 -99.5 507.5t-371.5 163.5q-285 0 -383 -178 q-49 -90 -68.5 -205.5t-19.5 -288.5zM446 1716v127h72v-127h-72zM848 1716v127h72v-127h-72z" />
+<glyph unicode="&#xd7;" d="M166 156l360 358l-360 358l49 50l358 -361l359 361l49 -50l-360 -358l360 -358l-49 -50l-359 361l-358 -361z" />
+<glyph unicode="&#xd8;" horiz-adv-x="1363" d="M133 711q0 377 119 559t430 182q176 0 291 -59l108 229l62 -25l-113 -241q111 -84 156 -243t45 -402q0 -391 -116 -560t-433 -169q-164 0 -274 47l-119 -252l-62 22l121 260q-121 80 -168 238t-47 414zM211 681q0 -202 37 -341t133 -211l561 1196q-102 57 -252.5 57 t-245 -43t-144.5 -134t-69.5 -206.5t-19.5 -317.5zM438 94q94 -43 242.5 -43t242 38t143.5 125t68.5 201.5t18.5 295.5q0 434 -158 573z" />
+<glyph unicode="&#xd9;" horiz-adv-x="1306" d="M180 401v1033h74v-1033q0 -186 100.5 -268t296 -82t299 81t103.5 269v1033h73v-1033q0 -223 -121.5 -321t-354 -98t-351.5 98t-119 321zM430 1825l33 63l393 -196l-31 -56z" />
+<glyph unicode="&#xda;" horiz-adv-x="1306" d="M180 401v1033h74v-1033q0 -186 100.5 -268t296 -82t299 81t103.5 269v1033h73v-1033q0 -223 -121.5 -321t-354 -98t-351.5 98t-119 321zM440 1692l394 196l32 -63l-395 -189z" />
+<glyph unicode="&#xdb;" horiz-adv-x="1306" d="M180 401v1033h74v-1033q0 -186 100.5 -268t296 -82t299 81t103.5 269v1033h73v-1033q0 -223 -121.5 -321t-354 -98t-351.5 98t-119 321zM346 1657l275 256h61l274 -256h-92l-213 196l-211 -196h-94z" />
+<glyph unicode="&#xdc;" horiz-adv-x="1306" d="M180 401v1033h74v-1033q0 -186 100.5 -268t296 -82t299 81t103.5 269v1033h73v-1033q0 -223 -121.5 -321t-354 -98t-351.5 98t-119 321zM418 1716v127h71v-127h-71zM819 1716v127h72v-127h-72z" />
+<glyph unicode="&#xdd;" horiz-adv-x="1077" d="M35 1434h86l418 -736l417 736h86l-467 -818v-616h-73v616zM389 1692l393 196l33 -63l-395 -189z" />
+<glyph unicode="&#xde;" horiz-adv-x="1230" d="M188 0v1434h74v-250h449q221 0 322.5 -104.5t101.5 -327.5q0 -476 -424 -476h-449v-276h-74zM262 346h449q346 0 346 406q0 188 -81 275t-265 87h-449v-768z" />
+<glyph unicode="&#xdf;" horiz-adv-x="1124" d="M162 0v1149q0 205 81 284.5t273.5 79.5t269 -65.5t76.5 -212.5q0 -106 -33.5 -167.5t-112.5 -97.5t-102.5 -54.5t-23.5 -51.5t34.5 -60.5t165 -95t188.5 -136t58 -191.5q0 -211 -94 -305t-315 -94q-72 0 -195 14l-41 6l4 68q158 -18 232 -19q184 0 257.5 77t73.5 243 q0 109 -50 166t-184 125.5t-172 105.5t-38 94.5t36 89t110.5 66.5t99 82t24.5 149.5t-59 148.5t-212 46t-216.5 -64.5t-63.5 -257.5v-1122h-71z" />
+<glyph unicode="&#xe0;" horiz-adv-x="1013" d="M98 273.5q0 140.5 67.5 214t215.5 87.5l389 41v107q0 131 -56.5 190.5t-170.5 59.5q-117 0 -324 -27l-63 -8l-6 68q229 37 393 36q299 0 299 -319v-590q8 -74 153 -86l-4 -63q-150 0 -211 86q-209 -88 -413 -88q-127 0 -198 75.5t-71 216zM174 278.5q0 -110.5 50 -171 t140.5 -60.5t190.5 21.5t158 42.5l57 20v420l-381 -39q-117 -12 -166 -67.5t-49 -166zM272 1436l33 63l393 -196l-30 -56z" />
+<glyph unicode="&#xe1;" horiz-adv-x="1013" d="M98 273.5q0 140.5 67.5 214t215.5 87.5l389 41v107q0 131 -56.5 190.5t-170.5 59.5q-117 0 -324 -27l-63 -8l-6 68q229 37 393 36q299 0 299 -319v-590q8 -74 153 -86l-4 -63q-150 0 -211 86q-209 -88 -413 -88q-127 0 -198 75.5t-71 216zM174 278.5q0 -110.5 50 -171 t140.5 -60.5t190.5 21.5t158 42.5l57 20v420l-381 -39q-117 -12 -166 -67.5t-49 -166zM270 1303l394 196l32 -63l-395 -189z" />
+<glyph unicode="&#xe2;" horiz-adv-x="1013" d="M98 273.5q0 140.5 67.5 214t215.5 87.5l389 41v107q0 131 -56.5 190.5t-170.5 59.5q-117 0 -324 -27l-63 -8l-6 68q229 37 393 36q299 0 299 -319v-590q8 -74 153 -86l-4 -63q-150 0 -211 86q-209 -88 -413 -88q-127 0 -198 75.5t-71 216zM174 278.5q0 -110.5 50 -171 t140.5 -60.5t190.5 21.5t158 42.5l57 20v420l-381 -39q-117 -12 -166 -67.5t-49 -166zM211 1229l248 270h57l250 -270h-88l-189 205l-190 -205h-88z" />
+<glyph unicode="&#xe3;" horiz-adv-x="1013" d="M98 273.5q0 140.5 67.5 214t215.5 87.5l389 41v107q0 131 -56.5 190.5t-170.5 59.5q-117 0 -324 -27l-63 -8l-6 68q229 37 393 36q299 0 299 -319v-590q8 -74 153 -86l-4 -63q-150 0 -211 86q-209 -88 -413 -88q-127 0 -198 75.5t-71 216zM174 278.5q0 -110.5 50 -171 t140.5 -60.5t190.5 21.5t158 42.5l57 20v420l-381 -39q-117 -12 -166 -67.5t-49 -166zM188 1368q100 96 168 96q43 0 157 -54t138 -54q41 0 111 61l22 23l19 -62q-86 -88 -139.5 -88t-167 55.5t-138.5 55.5q-45 0 -122 -70l-27 -22z" />
+<glyph unicode="&#xe4;" horiz-adv-x="1013" d="M98 273.5q0 140.5 67.5 214t215.5 87.5l389 41v107q0 131 -56.5 190.5t-170.5 59.5q-117 0 -324 -27l-63 -8l-6 68q229 37 393 36q299 0 299 -319v-590q8 -74 153 -86l-4 -63q-150 0 -211 86q-209 -88 -413 -88q-127 0 -198 75.5t-71 216zM174 278.5q0 -110.5 50 -171 t140.5 -60.5t190.5 21.5t158 42.5l57 20v420l-381 -39q-117 -12 -166 -67.5t-49 -166zM270 1307v127h72v-127h-72zM659 1307v127h72v-127h-72z" />
+<glyph unicode="&#xe5;" horiz-adv-x="1013" d="M98 273.5q0 140.5 67.5 214t215.5 87.5l389 41v107q0 131 -56.5 190.5t-170.5 59.5q-117 0 -324 -27l-63 -8l-6 68q229 37 393 36q299 0 299 -319v-590q8 -74 153 -86l-4 -63q-150 0 -211 86q-209 -88 -413 -88q-127 0 -198 75.5t-71 216zM174 278.5q0 -110.5 50 -171 t140.5 -60.5t190.5 21.5t158 42.5l57 20v420l-381 -39q-117 -12 -166 -67.5t-49 -166zM313 1331q0 82 57.5 138.5t139.5 56.5t137 -56.5t55 -138.5t-55 -138t-138 -56t-139.5 56t-56.5 138zM383 1331q0 -53 37 -92t89 -39t89 39t37 92t-37 91t-89 38t-89 -38t-37 -91z" />
+<glyph unicode="&#xe6;" horiz-adv-x="1675" d="M98 281q0 164 80 220t299 85l293 30v107q0 131 -56.5 190.5t-170.5 59.5q-104 0 -322 -15l-63 -4l-4 68q225 20 389 20q236 0 284 -196q100 197 353 196q195 0 292 -116.5t97 -374.5v-68h-727q0 -221 69.5 -328.5t231 -107.5t321.5 14l62 5l4 -66q-229 -18 -379 -18 q-201 0 -293 118l-78 -32q-190 -86 -422 -86q-260 0 -260 299zM174 279.5q0 -111.5 49 -172t136 -60.5t200 25q158 35 268 80q-61 121 -61 397l-377 -37q-113 -10 -164 -65.5t-51 -167zM842 549h651q0 231 -75 329.5t-238 98.5q-338 0 -338 -428z" />
+<glyph unicode="&#xe7;" horiz-adv-x="878" d="M123 534.5q0 282.5 94 395t326 112.5l245 -20l-4 -66q-164 20 -241 21q-195 0 -269.5 -98.5t-74.5 -359.5t67.5 -366.5t276.5 -105.5l245 19l5 -66q-172 -18 -225.5 -18t-67.5 2v-101q115 0 164 -30.5t49 -112.5q0 -152 -168 -152l-166 9l4 57q90 -8 160 -8q98 0 98 94 q0 86 -98 86h-111v162q-182 23 -245.5 143.5t-63.5 403z" />
+<glyph unicode="&#xe8;" horiz-adv-x="1028" d="M119 512q0 530 413 530q195 0 292.5 -116.5t97.5 -374.5v-68h-727q0 -221 69.5 -328.5t231 -107.5t321.5 14l62 5l4 -66q-229 -18 -379 -18q-217 2 -301 132t-84 398zM195 549h651q0 231 -75 329.5t-239 98.5q-337 0 -337 -428zM262 1438l33 63l393 -196l-31 -56z" />
+<glyph unicode="&#xe9;" horiz-adv-x="1028" d="M119 512q0 530 413 530q195 0 292.5 -116.5t97.5 -374.5v-68h-727q0 -221 69.5 -328.5t231 -107.5t321.5 14l62 5l4 -66q-229 -18 -379 -18q-217 2 -301 132t-84 398zM195 549h651q0 231 -75 329.5t-239 98.5q-337 0 -337 -428zM350 1303l393 196l33 -63l-395 -189z" />
+<glyph unicode="&#xea;" horiz-adv-x="1028" d="M119 512q0 530 413 530q195 0 292.5 -116.5t97.5 -374.5v-68h-727q0 -221 69.5 -328.5t231 -107.5t321.5 14l62 5l4 -66q-229 -18 -379 -18q-217 2 -301 132t-84 398zM195 549h651q0 231 -75 329.5t-239 98.5q-337 0 -337 -428zM262 1229l248 270h57l250 -270h-88 l-188 205l-191 -205h-88z" />
+<glyph unicode="&#xeb;" horiz-adv-x="1028" d="M119 512q0 530 413 530q195 0 292.5 -116.5t97.5 -374.5v-68h-727q0 -221 69.5 -328.5t231 -107.5t321.5 14l62 5l4 -66q-229 -18 -379 -18q-217 2 -301 132t-84 398zM195 549h651q0 231 -75 329.5t-239 98.5q-337 0 -337 -428zM295 1307v127h72v-127h-72zM684 1307v127 h72v-127h-72z" />
+<glyph unicode="&#xec;" horiz-adv-x="395" d="M-123 1436l33 63l393 -196l-31 -56zM162 0v1024h71v-1024h-71z" />
+<glyph unicode="&#xed;" horiz-adv-x="395" d="M88 1303l393 196l33 -63l-395 -189zM162 0v1024h71v-1024h-71z" />
+<glyph unicode="&#xee;" horiz-adv-x="395" d="M-80 1229l248 270h57l250 -270h-88l-188 205l-191 -205h-88zM162 0v1024h71v-1024h-71z" />
+<glyph unicode="&#xef;" horiz-adv-x="395" d="M-39 1307v127h72v-127h-72zM162 0v1024h71v-1024h-71zM350 1307v127h72v-127h-72z" />
+<glyph unicode="&#xf0;" horiz-adv-x="1095" d="M92 427q0 206 112.5 324.5t305.5 118.5q72 0 168 -22.5t158 -44.5l61 -23q-10 319 -342 523l-244 -164l-41 55l217 147q-123 63 -272 109l27 63q178 -53 311 -129l209 142l41 -56l-182 -124q352 -227 352 -629t-101.5 -568.5t-339.5 -166.5q-207 0 -323.5 119.5 t-116.5 325.5zM166 426q0 -174 95 -274.5t284.5 -100.5t270.5 141.5t83 516.5q-238 92 -392.5 92t-247.5 -100.5t-93 -274.5z" />
+<glyph unicode="&#xf1;" horiz-adv-x="1079" d="M162 0v1024h71v-82l50 25q51 25 141 50t168 25q205 0 270.5 -103t65.5 -407v-532h-72v528q0 270 -49 359.5t-215 89.5q-82 0 -189.5 -33t-169.5 -70v-874h-71zM256 1368q100 96 168 96q43 0 156.5 -54t136.5 -54q43 0 110 61l25 23l18 -62q-86 -88 -139 -88t-166.5 55.5 t-138.5 55.5q-45 0 -123 -70l-27 -22z" />
+<glyph unicode="&#xf2;" horiz-adv-x="1077" d="M123 514q0 299 94 413.5t321.5 114.5t321.5 -114.5t94 -413.5t-84 -415.5t-331.5 -116.5t-331.5 116.5t-84 415.5zM199 530q0 -145 10 -226t46 -145.5t102.5 -88t181 -23.5t181 23.5t102.5 88t46.5 145.5t10.5 226q0 258 -72 352.5t-268.5 94.5t-268 -94.5t-71.5 -352.5z M315 1436l33 63l393 -196l-30 -56z" />
+<glyph unicode="&#xf3;" horiz-adv-x="1077" d="M123 514q0 299 94 413.5t321.5 114.5t321.5 -114.5t94 -413.5t-84 -415.5t-331.5 -116.5t-331.5 116.5t-84 415.5zM199 530q0 -145 10 -226t46 -145.5t102.5 -88t181 -23.5t181 23.5t102.5 88t46.5 145.5t10.5 226q0 258 -72 352.5t-268.5 94.5t-268 -94.5t-71.5 -352.5z M367 1303l393 196l33 -63l-396 -189z" />
+<glyph unicode="&#xf4;" horiz-adv-x="1077" d="M123 514q0 299 94 413.5t321.5 114.5t321.5 -114.5t94 -413.5t-84 -415.5t-331.5 -116.5t-331.5 116.5t-84 415.5zM199 530q0 -145 10 -226t46 -145.5t102.5 -88t181 -23.5t181 23.5t102.5 88t46.5 145.5t10.5 226q0 258 -72 352.5t-268.5 94.5t-268 -94.5t-71.5 -352.5z M262 1229l248 270h57l250 -270h-88l-188 205l-191 -205h-88z" />
+<glyph unicode="&#xf5;" horiz-adv-x="1077" d="M123 514q0 299 94 413.5t321.5 114.5t321.5 -114.5t94 -413.5t-84 -415.5t-331.5 -116.5t-331.5 116.5t-84 415.5zM199 530q0 -145 10 -226t46 -145.5t102.5 -88t181 -23.5t181 23.5t102.5 88t46.5 145.5t10.5 226q0 258 -72 352.5t-268.5 94.5t-268 -94.5t-71.5 -352.5z M233 1368q100 96 168 96q43 0 157 -54t138 -54q41 0 111 61l22 23l19 -62q-86 -88 -139.5 -88t-167 55.5t-138.5 55.5q-45 0 -122 -70l-27 -22z" />
+<glyph unicode="&#xf6;" horiz-adv-x="1077" d="M123 514q0 299 94 413.5t321.5 114.5t321.5 -114.5t94 -413.5t-84 -415.5t-331.5 -116.5t-331.5 116.5t-84 415.5zM199 530q0 -145 10 -226t46 -145.5t102.5 -88t181 -23.5t181 23.5t102.5 88t46.5 145.5t10.5 226q0 258 -72 352.5t-268.5 94.5t-268 -94.5t-71.5 -352.5z M299 1307v127h72v-127h-72zM688 1307v127h72v-127h-72z" />
+<glyph unicode="&#xf7;" d="M119 479v70h909v-70h-909zM535 80v164h77v-164h-77zM535 784v164h77v-164h-77z" />
+<glyph unicode="&#xf8;" horiz-adv-x="1077" d="M123 557q0 256 94.5 370.5t321.5 114.5q109 0 176 -22l90 219l61 -22l-92 -220q94 -51 137 -162.5t43 -304.5q0 -315 -84 -431.5t-331 -116.5q-100 0 -172 18l-95 -233l-61 20l94 231q-104 47 -143 165t-39 374zM199 557q0 -231 26.5 -332.5t108.5 -142.5l356 876 q-61 19 -151 19q-197 0 -268.5 -94.5t-71.5 -325.5zM391 61q55 -14 158.5 -14t170 23.5t102.5 88t46.5 145.5t10.5 239.5t-29 253t-100 137.5z" />
+<glyph unicode="&#xf9;" horiz-adv-x="1056" d="M152 492v532h71v-528q0 -270 49.5 -359.5t214.5 -89.5q82 0 166 25.5t127 50.5l43 27v874h72v-1024h-72v82q-18 -10 -49 -27.5t-120 -45t-167 -27.5q-205 0 -270 103t-65 407zM256 1436l33 63l393 -196l-31 -56z" />
+<glyph unicode="&#xfa;" horiz-adv-x="1056" d="M152 492v532h71v-528q0 -270 49.5 -359.5t214.5 -89.5q82 0 185.5 34t150.5 69v874h72v-1024h-72v82l-45 -25q-45 -27 -129 -51t-162 -24q-205 0 -270 103t-65 407zM352 1303l393 196l33 -63l-395 -189z" />
+<glyph unicode="&#xfb;" horiz-adv-x="1056" d="M152 492v532h71v-528q0 -270 49.5 -359.5t214.5 -89.5q82 0 185.5 34t150.5 69v874h72v-1024h-72v82l-45 -25q-45 -27 -129 -51t-162 -24q-205 0 -270 103t-65 407zM248 1229l248 270h57l250 -270h-88l-189 205l-190 -205h-88z" />
+<glyph unicode="&#xfc;" horiz-adv-x="1056" d="M152 492v532h71v-528q0 -270 49.5 -359.5t214.5 -89.5q82 0 185.5 34t150.5 69v874h72v-1024h-72v82l-45 -25q-45 -27 -129 -51t-162 -24q-205 0 -270 103t-65 407zM305 1307v127h72v-127h-72zM694 1307v127h72v-127h-72z" />
+<glyph unicode="&#xfd;" horiz-adv-x="964" d="M63 1024h76l301 -958h84l303 958h76l-469 -1495h-76l148 471h-125zM358 1303l394 196l32 -63l-395 -189z" />
+<glyph unicode="&#xfe;" horiz-adv-x="1054" d="M162 -471v1966h71v-534q170 82 362.5 81.5t265.5 -116t73 -404.5t-96.5 -414.5t-370.5 -125.5l-234 12v-465h-71zM233 59q160 -12 259.5 -12t178.5 27.5t119.5 93t54 147.5t13.5 215q0 244 -54 345.5t-218 101.5q-82 0 -170 -20.5t-135 -41.5l-48 -20v-836z" />
+<glyph unicode="&#xff;" horiz-adv-x="964" d="M63 1024h76l301 -958h84l303 958h76l-469 -1495h-76l148 471h-125zM248 1307v127h71v-127h-71zM637 1307v127h72v-127h-72z" />
+<glyph unicode="&#x152;" horiz-adv-x="1925" d="M133 706.5q0 186.5 24.5 316.5t84.5 230q119 199 440 199q207 0 322 -18h817v-74h-744v-586h621v-74h-621v-626h744v-76h-815q-172 -16 -330 -16t-266.5 45t-169 142t-84 224t-23.5 313.5zM211 710q0 -173 18.5 -286t68.5 -202t144.5 -130t220 -41t341.5 19v1288 q-287 25 -322 24q-285 0 -383 -178q-49 -90 -68.5 -205.5t-19.5 -288.5z" />
+<glyph unicode="&#x153;" horiz-adv-x="1787" d="M123 518q0 299 95 411.5t325 112.5q299 0 377 -245q90 246 372 245q195 0 292 -116.5t97 -374.5v-68h-727q0 -221 70 -328.5t231.5 -107.5t321.5 14l61 5l4 -66q-229 -18 -378 -18q-266 0 -346 219q-37 -115 -125 -167t-250 -52q-250 0 -335 118.5t-85 417.5zM199 535 q0 -143 11 -226.5t48 -148t104.5 -89t179 -24.5t180.5 27.5t102.5 94.5t44 146.5t10.5 214.5q0 242 -81 344.5t-267.5 102.5t-259 -93t-72.5 -349zM954 549h652q0 231 -75 329.5t-239 98.5q-338 0 -338 -428z" />
+<glyph unicode="&#x178;" horiz-adv-x="1077" d="M35 1434h86l418 -736l417 736h86l-467 -818v-616h-73v616zM301 1716v127h72v-127h-72zM702 1716v127h72v-127h-72z" />
+<glyph unicode="&#x2c6;" horiz-adv-x="440" d="M-31 1229l248 270h57l250 -270h-88l-188 205l-191 -205h-88z" />
+<glyph unicode="&#x2dc;" horiz-adv-x="440" d="M-72 1368q100 96 168 96q43 0 157 -54t136 -54q43 0 111 61l24 23l19 -62q-86 -88 -139.5 -88t-167 55.5t-138.5 55.5q-45 0 -123 -70l-26 -22z" />
+<glyph unicode="&#x2000;" horiz-adv-x="956" />
+<glyph unicode="&#x2001;" horiz-adv-x="1913" />
+<glyph unicode="&#x2002;" horiz-adv-x="956" />
+<glyph unicode="&#x2003;" horiz-adv-x="1913" />
+<glyph unicode="&#x2004;" horiz-adv-x="637" />
+<glyph unicode="&#x2005;" horiz-adv-x="478" />
+<glyph unicode="&#x2006;" horiz-adv-x="318" />
+<glyph unicode="&#x2007;" horiz-adv-x="318" />
+<glyph unicode="&#x2008;" horiz-adv-x="239" />
+<glyph unicode="&#x2009;" horiz-adv-x="382" />
+<glyph unicode="&#x200a;" horiz-adv-x="106" />
+<glyph unicode="&#x2010;" horiz-adv-x="937" d="M156 541v69h628v-69h-628z" />
+<glyph unicode="&#x2011;" horiz-adv-x="937" d="M156 541v69h628v-69h-628z" />
+<glyph unicode="&#x2012;" horiz-adv-x="937" d="M156 541v69h628v-69h-628z" />
+<glyph unicode="&#x2013;" horiz-adv-x="1316" d="M147 516v70h1024v-70h-1024z" />
+<glyph unicode="&#x2014;" horiz-adv-x="2340" d="M147 516v70h2048v-70h-2048z" />
+<glyph unicode="&#x2018;" horiz-adv-x="395" d="M127 1079l100 410h60l-82 -410h-78z" />
+<glyph unicode="&#x2019;" horiz-adv-x="391" d="M129 1079l82 410h78l-101 -410h-59z" />
+<glyph unicode="&#x201a;" horiz-adv-x="393" d="M88 -174l100 410h60l-82 -410h-78z" />
+<glyph unicode="&#x201c;" horiz-adv-x="667" d="M127 1079l100 410h60l-82 -410h-78zM399 1079l101 410h59l-82 -410h-78z" />
+<glyph unicode="&#x201d;" horiz-adv-x="686" d="M129 1079l82 410h78l-101 -410h-59zM424 1079l82 410h78l-101 -410h-59z" />
+<glyph unicode="&#x201e;" horiz-adv-x="649" d="M84 -186l100 409h60l-82 -409h-78zM346 -186l100 409h60l-82 -409h-78z" />
+<glyph unicode="&#x2022;" horiz-adv-x="999" d="M244 225v594h512v-594h-512z" />
+<glyph unicode="&#x2026;" horiz-adv-x="1429" d="M154 0v164h82v-164h-82zM674 0v164h82v-164h-82zM1194 0v164h82v-164h-82z" />
+<glyph unicode="&#x202f;" horiz-adv-x="382" />
+<glyph unicode="&#x2039;" horiz-adv-x="593" d="M98 479v74l342 264v-80l-276 -217l276 -239v-84z" />
+<glyph unicode="&#x203a;" horiz-adv-x="593" d="M154 197v84l276 239l-276 217v80l342 -264v-74z" />
+<glyph unicode="&#x205f;" horiz-adv-x="478" />
+<glyph unicode="&#x20ac;" d="M66 502v69h129v101q0 90 2 133h-131v69h135q23 246 128 371t347 125q182 0 358 -37l-6 -67q-172 39 -366.5 39t-282.5 -107.5t-105 -323.5h656v-69h-660q-2 -43 -2 -123t2 -111h660v-69h-658q16 -229 103.5 -341t300.5 -112q152 0 352 37l6 -66q-193 -37 -358 -36 q-244 0 -350.5 128t-126.5 390h-133z" />
+<glyph unicode="&#x2122;" horiz-adv-x="1411" d="M203 1208v64h409v-64h-170v-528h-67v528h-172zM684 678v594h102l172 -496l179 496h102v-594h-65v528l-181 -506h-71l-172 506v-528h-66z" />
+<glyph unicode="&#xe000;" horiz-adv-x="1024" d="M0 0v1024h1024v-1024h-1024z" />
+<hkern u1="&#x22;" u2="&#xf0;" k="33" />
+<hkern u1="&#x22;" u2="&#xec;" k="-20" />
+<hkern u1="&#x22;" u2="&#xc6;" k="129" />
+<hkern u1="&#x22;" u2="&#x40;" k="29" />
+<hkern u1="&#x22;" u2="&#x2f;" k="127" />
+<hkern u1="&#x22;" u2="&#x26;" k="68" />
+<hkern u1="&#x26;" u2="&#x201d;" k="117" />
+<hkern u1="&#x26;" u2="&#x2019;" k="117" />
+<hkern u1="&#x26;" u2="&#x178;" k="123" />
+<hkern u1="&#x26;" u2="&#x152;" k="23" />
+<hkern u1="&#x26;" u2="&#xff;" k="43" />
+<hkern u1="&#x26;" u2="&#xfd;" k="43" />
+<hkern u1="&#x26;" u2="&#xdd;" k="123" />
+<hkern u1="&#x26;" u2="&#xdc;" k="20" />
+<hkern u1="&#x26;" u2="&#xdb;" k="20" />
+<hkern u1="&#x26;" u2="&#xda;" k="20" />
+<hkern u1="&#x26;" u2="&#xd9;" k="20" />
+<hkern u1="&#x26;" u2="&#xd8;" k="23" />
+<hkern u1="&#x26;" u2="&#xd6;" k="23" />
+<hkern u1="&#x26;" u2="&#xd5;" k="23" />
+<hkern u1="&#x26;" u2="&#xd4;" k="23" />
+<hkern u1="&#x26;" u2="&#xd3;" k="23" />
+<hkern u1="&#x26;" u2="&#xd2;" k="23" />
+<hkern u1="&#x26;" u2="&#xc7;" k="23" />
+<hkern u1="&#x26;" u2="y" k="43" />
+<hkern u1="&#x26;" u2="w" k="35" />
+<hkern u1="&#x26;" u2="v" k="43" />
+<hkern u1="&#x26;" u2="t" k="25" />
+<hkern u1="&#x26;" u2="Y" k="123" />
+<hkern u1="&#x26;" u2="W" k="51" />
+<hkern u1="&#x26;" u2="V" k="82" />
+<hkern u1="&#x26;" u2="U" k="20" />
+<hkern u1="&#x26;" u2="T" k="96" />
+<hkern u1="&#x26;" u2="Q" k="23" />
+<hkern u1="&#x26;" u2="O" k="23" />
+<hkern u1="&#x26;" u2="G" k="23" />
+<hkern u1="&#x26;" u2="C" k="23" />
+<hkern u1="&#x26;" u2="&#x27;" k="117" />
+<hkern u1="&#x26;" u2="&#x22;" k="117" />
+<hkern u1="&#x27;" u2="&#xf0;" k="33" />
+<hkern u1="&#x27;" u2="&#xec;" k="-20" />
+<hkern u1="&#x27;" u2="&#xc6;" k="129" />
+<hkern u1="&#x27;" u2="&#x40;" k="29" />
+<hkern u1="&#x27;" u2="&#x2f;" k="127" />
+<hkern u1="&#x27;" u2="&#x26;" k="68" />
+<hkern u1="&#x28;" u2="&#x153;" k="35" />
+<hkern u1="&#x28;" u2="&#x152;" k="23" />
+<hkern u1="&#x28;" u2="&#xfc;" k="27" />
+<hkern u1="&#x28;" u2="&#xfb;" k="27" />
+<hkern u1="&#x28;" u2="&#xfa;" k="27" />
+<hkern u1="&#x28;" u2="&#xf9;" k="27" />
+<hkern u1="&#x28;" u2="&#xf8;" k="35" />
+<hkern u1="&#x28;" u2="&#xf6;" k="35" />
+<hkern u1="&#x28;" u2="&#xf5;" k="35" />
+<hkern u1="&#x28;" u2="&#xf4;" k="35" />
+<hkern u1="&#x28;" u2="&#xf3;" k="35" />
+<hkern u1="&#x28;" u2="&#xf2;" k="35" />
+<hkern u1="&#x28;" u2="&#xec;" k="-49" />
+<hkern u1="&#x28;" u2="&#xeb;" k="35" />
+<hkern u1="&#x28;" u2="&#xea;" k="35" />
+<hkern u1="&#x28;" u2="&#xe9;" k="35" />
+<hkern u1="&#x28;" u2="&#xe8;" k="35" />
+<hkern u1="&#x28;" u2="&#xe7;" k="35" />
+<hkern u1="&#x28;" u2="&#xd8;" k="23" />
+<hkern u1="&#x28;" u2="&#xd6;" k="23" />
+<hkern u1="&#x28;" u2="&#xd5;" k="23" />
+<hkern u1="&#x28;" u2="&#xd4;" k="23" />
+<hkern u1="&#x28;" u2="&#xd3;" k="23" />
+<hkern u1="&#x28;" u2="&#xd2;" k="23" />
+<hkern u1="&#x28;" u2="&#xc7;" k="20" />
+<hkern u1="&#x28;" u2="&#x7b;" k="20" />
+<hkern u1="&#x28;" u2="u" k="27" />
+<hkern u1="&#x28;" u2="q" k="35" />
+<hkern u1="&#x28;" u2="o" k="35" />
+<hkern u1="&#x28;" u2="e" k="35" />
+<hkern u1="&#x28;" u2="d" k="35" />
+<hkern u1="&#x28;" u2="c" k="35" />
+<hkern u1="&#x28;" u2="Q" k="23" />
+<hkern u1="&#x28;" u2="O" k="23" />
+<hkern u1="&#x28;" u2="G" k="23" />
+<hkern u1="&#x28;" u2="C" k="20" />
+<hkern u1="&#x29;" u2="&#x7d;" k="29" />
+<hkern u1="&#x29;" u2="]" k="29" />
+<hkern u1="&#x2a;" u2="&#x153;" k="35" />
+<hkern u1="&#x2a;" u2="&#xf8;" k="35" />
+<hkern u1="&#x2a;" u2="&#xf6;" k="35" />
+<hkern u1="&#x2a;" u2="&#xf5;" k="35" />
+<hkern u1="&#x2a;" u2="&#xf4;" k="35" />
+<hkern u1="&#x2a;" u2="&#xf3;" k="35" />
+<hkern u1="&#x2a;" u2="&#xf2;" k="35" />
+<hkern u1="&#x2a;" u2="&#xf0;" k="39" />
+<hkern u1="&#x2a;" u2="&#xeb;" k="35" />
+<hkern u1="&#x2a;" u2="&#xea;" k="35" />
+<hkern u1="&#x2a;" u2="&#xe9;" k="35" />
+<hkern u1="&#x2a;" u2="&#xe8;" k="35" />
+<hkern u1="&#x2a;" u2="&#xe7;" k="35" />
+<hkern u1="&#x2a;" u2="&#xc6;" k="115" />
+<hkern u1="&#x2a;" u2="&#xc5;" k="92" />
+<hkern u1="&#x2a;" u2="&#xc4;" k="92" />
+<hkern u1="&#x2a;" u2="&#xc3;" k="92" />
+<hkern u1="&#x2a;" u2="&#xc2;" k="92" />
+<hkern u1="&#x2a;" u2="&#xc1;" k="92" />
+<hkern u1="&#x2a;" u2="&#xc0;" k="92" />
+<hkern u1="&#x2a;" u2="s" k="23" />
+<hkern u1="&#x2a;" u2="q" k="43" />
+<hkern u1="&#x2a;" u2="o" k="35" />
+<hkern u1="&#x2a;" u2="g" k="29" />
+<hkern u1="&#x2a;" u2="e" k="35" />
+<hkern u1="&#x2a;" u2="d" k="43" />
+<hkern u1="&#x2a;" u2="c" k="35" />
+<hkern u1="&#x2a;" u2="Z" k="39" />
+<hkern u1="&#x2a;" u2="J" k="59" />
+<hkern u1="&#x2a;" u2="A" k="92" />
+<hkern u1="&#x2c;" u2="v" k="88" />
+<hkern u1="&#x2c;" u2="f" k="18" />
+<hkern u1="&#x2c;" u2="V" k="125" />
+<hkern u1="&#x2d;" u2="&#xc6;" k="47" />
+<hkern u1="&#x2d;" u2="x" k="74" />
+<hkern u1="&#x2d;" u2="v" k="31" />
+<hkern u1="&#x2d;" u2="f" k="25" />
+<hkern u1="&#x2d;" u2="X" k="88" />
+<hkern u1="&#x2d;" u2="V" k="72" />
+<hkern u1="&#x2e;" u2="v" k="88" />
+<hkern u1="&#x2e;" u2="f" k="18" />
+<hkern u1="&#x2e;" u2="V" k="125" />
+<hkern u1="&#x2f;" u2="&#x153;" k="63" />
+<hkern u1="&#x2f;" u2="&#xfc;" k="33" />
+<hkern u1="&#x2f;" u2="&#xfb;" k="33" />
+<hkern u1="&#x2f;" u2="&#xfa;" k="33" />
+<hkern u1="&#x2f;" u2="&#xf9;" k="33" />
+<hkern u1="&#x2f;" u2="&#xf8;" k="63" />
+<hkern u1="&#x2f;" u2="&#xf6;" k="63" />
+<hkern u1="&#x2f;" u2="&#xf5;" k="63" />
+<hkern u1="&#x2f;" u2="&#xf4;" k="63" />
+<hkern u1="&#x2f;" u2="&#xf3;" k="63" />
+<hkern u1="&#x2f;" u2="&#xf2;" k="63" />
+<hkern u1="&#x2f;" u2="&#xf1;" k="37" />
+<hkern u1="&#x2f;" u2="&#xf0;" k="39" />
+<hkern u1="&#x2f;" u2="&#xef;" k="-25" />
+<hkern u1="&#x2f;" u2="&#xec;" k="-82" />
+<hkern u1="&#x2f;" u2="&#xeb;" k="63" />
+<hkern u1="&#x2f;" u2="&#xea;" k="63" />
+<hkern u1="&#x2f;" u2="&#xe9;" k="63" />
+<hkern u1="&#x2f;" u2="&#xe8;" k="63" />
+<hkern u1="&#x2f;" u2="&#xe7;" k="63" />
+<hkern u1="&#x2f;" u2="&#xe6;" k="35" />
+<hkern u1="&#x2f;" u2="&#xe5;" k="35" />
+<hkern u1="&#x2f;" u2="&#xe4;" k="35" />
+<hkern u1="&#x2f;" u2="&#xe3;" k="35" />
+<hkern u1="&#x2f;" u2="&#xe2;" k="35" />
+<hkern u1="&#x2f;" u2="&#xe1;" k="35" />
+<hkern u1="&#x2f;" u2="&#xe0;" k="35" />
+<hkern u1="&#x2f;" u2="&#xc6;" k="117" />
+<hkern u1="&#x2f;" u2="&#xc5;" k="96" />
+<hkern u1="&#x2f;" u2="&#xc4;" k="96" />
+<hkern u1="&#x2f;" u2="&#xc3;" k="96" />
+<hkern u1="&#x2f;" u2="&#xc2;" k="96" />
+<hkern u1="&#x2f;" u2="&#xc1;" k="96" />
+<hkern u1="&#x2f;" u2="&#xc0;" k="96" />
+<hkern u1="&#x2f;" u2="u" k="33" />
+<hkern u1="&#x2f;" u2="s" k="47" />
+<hkern u1="&#x2f;" u2="r" k="37" />
+<hkern u1="&#x2f;" u2="q" k="68" />
+<hkern u1="&#x2f;" u2="p" k="37" />
+<hkern u1="&#x2f;" u2="o" k="63" />
+<hkern u1="&#x2f;" u2="n" k="37" />
+<hkern u1="&#x2f;" u2="m" k="37" />
+<hkern u1="&#x2f;" u2="g" k="61" />
+<hkern u1="&#x2f;" u2="e" k="63" />
+<hkern u1="&#x2f;" u2="d" k="68" />
+<hkern u1="&#x2f;" u2="c" k="63" />
+<hkern u1="&#x2f;" u2="a" k="35" />
+<hkern u1="&#x2f;" u2="J" k="47" />
+<hkern u1="&#x2f;" u2="A" k="96" />
+<hkern u1="&#x2f;" u2="&#x2f;" k="551" />
+<hkern u1="&#x3a;" u2="V" k="33" />
+<hkern u1="&#x3b;" u2="V" k="33" />
+<hkern u1="&#x40;" u2="&#x178;" k="66" />
+<hkern u1="&#x40;" u2="&#xdd;" k="66" />
+<hkern u1="&#x40;" u2="&#xc6;" k="20" />
+<hkern u1="&#x40;" u2="Y" k="66" />
+<hkern u1="&#x40;" u2="V" k="27" />
+<hkern u1="&#x40;" u2="T" k="53" />
+<hkern u1="&#x40;" u2="J" k="27" />
+<hkern u1="A" u2="&#x2122;" k="98" />
+<hkern u1="A" u2="&#xf0;" k="10" />
+<hkern u1="A" u2="&#xae;" k="63" />
+<hkern u1="A" u2="&#x7d;" k="68" />
+<hkern u1="A" u2="v" k="41" />
+<hkern u1="A" u2="f" k="14" />
+<hkern u1="A" u2="]" k="78" />
+<hkern u1="A" u2="\" k="102" />
+<hkern u1="A" u2="V" k="59" />
+<hkern u1="A" u2="&#x3f;" k="66" />
+<hkern u1="A" u2="&#x2a;" k="86" />
+<hkern u1="B" u2="&#x178;" k="55" />
+<hkern u1="B" u2="&#xff;" k="12" />
+<hkern u1="B" u2="&#xfd;" k="12" />
+<hkern u1="B" u2="&#xdd;" k="55" />
+<hkern u1="B" u2="&#xc6;" k="29" />
+<hkern u1="B" u2="&#xc5;" k="23" />
+<hkern u1="B" u2="&#xc4;" k="23" />
+<hkern u1="B" u2="&#xc3;" k="23" />
+<hkern u1="B" u2="&#xc2;" k="23" />
+<hkern u1="B" u2="&#xc1;" k="23" />
+<hkern u1="B" u2="&#xc0;" k="23" />
+<hkern u1="B" u2="&#x7d;" k="68" />
+<hkern u1="B" u2="y" k="12" />
+<hkern u1="B" u2="x" k="16" />
+<hkern u1="B" u2="w" k="12" />
+<hkern u1="B" u2="v" k="12" />
+<hkern u1="B" u2="g" k="20" />
+<hkern u1="B" u2="]" k="72" />
+<hkern u1="B" u2="Y" k="55" />
+<hkern u1="B" u2="X" k="29" />
+<hkern u1="B" u2="W" k="10" />
+<hkern u1="B" u2="V" k="27" />
+<hkern u1="B" u2="T" k="55" />
+<hkern u1="B" u2="J" k="55" />
+<hkern u1="B" u2="A" k="23" />
+<hkern u1="B" u2="&#x3f;" k="25" />
+<hkern u1="C" u2="&#xf0;" k="16" />
+<hkern u1="C" u2="&#xec;" k="-51" />
+<hkern u1="C" u2="&#xae;" k="43" />
+<hkern u1="C" u2="v" k="47" />
+<hkern u1="C" u2="f" k="12" />
+<hkern u1="D" u2="&#xc6;" k="41" />
+<hkern u1="D" u2="&#x7d;" k="72" />
+<hkern u1="D" u2="x" k="10" />
+<hkern u1="D" u2="]" k="74" />
+<hkern u1="D" u2="X" k="47" />
+<hkern u1="D" u2="V" k="27" />
+<hkern u1="D" u2="&#x3f;" k="31" />
+<hkern u1="D" u2="&#x29;" k="23" />
+<hkern u1="E" u2="&#xf0;" k="18" />
+<hkern u1="E" u2="&#xec;" k="-66" />
+<hkern u1="E" u2="v" k="39" />
+<hkern u1="E" u2="f" k="10" />
+<hkern u1="F" u2="&#x2026;" k="176" />
+<hkern u1="F" u2="&#x201e;" k="176" />
+<hkern u1="F" u2="&#x201a;" k="176" />
+<hkern u1="F" u2="&#x153;" k="37" />
+<hkern u1="F" u2="&#x152;" k="35" />
+<hkern u1="F" u2="&#xff;" k="39" />
+<hkern u1="F" u2="&#xfd;" k="39" />
+<hkern u1="F" u2="&#xfc;" k="43" />
+<hkern u1="F" u2="&#xfb;" k="43" />
+<hkern u1="F" u2="&#xfa;" k="43" />
+<hkern u1="F" u2="&#xf9;" k="43" />
+<hkern u1="F" u2="&#xf8;" k="37" />
+<hkern u1="F" u2="&#xf6;" k="37" />
+<hkern u1="F" u2="&#xf5;" k="37" />
+<hkern u1="F" u2="&#xf4;" k="37" />
+<hkern u1="F" u2="&#xf3;" k="37" />
+<hkern u1="F" u2="&#xf2;" k="37" />
+<hkern u1="F" u2="&#xf1;" k="49" />
+<hkern u1="F" u2="&#xf0;" k="53" />
+<hkern u1="F" u2="&#xef;" k="-29" />
+<hkern u1="F" u2="&#xec;" k="-109" />
+<hkern u1="F" u2="&#xeb;" k="37" />
+<hkern u1="F" u2="&#xea;" k="37" />
+<hkern u1="F" u2="&#xe9;" k="37" />
+<hkern u1="F" u2="&#xe8;" k="37" />
+<hkern u1="F" u2="&#xe7;" k="37" />
+<hkern u1="F" u2="&#xe6;" k="90" />
+<hkern u1="F" u2="&#xe5;" k="90" />
+<hkern u1="F" u2="&#xe4;" k="90" />
+<hkern u1="F" u2="&#xe3;" k="90" />
+<hkern u1="F" u2="&#xe2;" k="90" />
+<hkern u1="F" u2="&#xe1;" k="90" />
+<hkern u1="F" u2="&#xe0;" k="90" />
+<hkern u1="F" u2="&#xd8;" k="35" />
+<hkern u1="F" u2="&#xd6;" k="35" />
+<hkern u1="F" u2="&#xd5;" k="35" />
+<hkern u1="F" u2="&#xd4;" k="35" />
+<hkern u1="F" u2="&#xd3;" k="35" />
+<hkern u1="F" u2="&#xd2;" k="35" />
+<hkern u1="F" u2="&#xc7;" k="33" />
+<hkern u1="F" u2="&#xc6;" k="119" />
+<hkern u1="F" u2="&#xc5;" k="86" />
+<hkern u1="F" u2="&#xc4;" k="86" />
+<hkern u1="F" u2="&#xc3;" k="86" />
+<hkern u1="F" u2="&#xc2;" k="86" />
+<hkern u1="F" u2="&#xc1;" k="86" />
+<hkern u1="F" u2="&#xc0;" k="86" />
+<hkern u1="F" u2="z" k="53" />
+<hkern u1="F" u2="y" k="39" />
+<hkern u1="F" u2="x" k="68" />
+<hkern u1="F" u2="w" k="39" />
+<hkern u1="F" u2="v" k="39" />
+<hkern u1="F" u2="u" k="43" />
+<hkern u1="F" u2="t" k="25" />
+<hkern u1="F" u2="s" k="37" />
+<hkern u1="F" u2="r" k="49" />
+<hkern u1="F" u2="q" k="41" />
+<hkern u1="F" u2="p" k="49" />
+<hkern u1="F" u2="o" k="37" />
+<hkern u1="F" u2="n" k="49" />
+<hkern u1="F" u2="m" k="49" />
+<hkern u1="F" u2="g" k="43" />
+<hkern u1="F" u2="f" k="16" />
+<hkern u1="F" u2="e" k="37" />
+<hkern u1="F" u2="d" k="41" />
+<hkern u1="F" u2="c" k="37" />
+<hkern u1="F" u2="a" k="90" />
+<hkern u1="F" u2="X" k="12" />
+<hkern u1="F" u2="S" k="35" />
+<hkern u1="F" u2="Q" k="35" />
+<hkern u1="F" u2="O" k="35" />
+<hkern u1="F" u2="J" k="61" />
+<hkern u1="F" u2="G" k="35" />
+<hkern u1="F" u2="C" k="33" />
+<hkern u1="F" u2="A" k="86" />
+<hkern u1="F" u2="&#x2f;" k="55" />
+<hkern u1="F" u2="&#x2e;" k="176" />
+<hkern u1="F" u2="&#x2c;" k="176" />
+<hkern u1="G" u2="&#xec;" k="-16" />
+<hkern u1="G" u2="v" k="18" />
+<hkern u1="G" u2="f" k="12" />
+<hkern u1="G" u2="V" k="20" />
+<hkern u1="K" u2="&#xf0;" k="10" />
+<hkern u1="K" u2="&#xef;" k="-23" />
+<hkern u1="K" u2="&#xec;" k="-102" />
+<hkern u1="K" u2="&#xae;" k="39" />
+<hkern u1="K" u2="v" k="59" />
+<hkern u1="L" u2="&#x2122;" k="203" />
+<hkern u1="L" u2="&#xf0;" k="16" />
+<hkern u1="L" u2="&#xb7;" k="190" />
+<hkern u1="L" u2="&#xae;" k="201" />
+<hkern u1="L" u2="&#x7d;" k="37" />
+<hkern u1="L" u2="v" k="111" />
+<hkern u1="L" u2="]" k="49" />
+<hkern u1="L" u2="\" k="143" />
+<hkern u1="L" u2="V" k="125" />
+<hkern u1="L" u2="&#x3f;" k="45" />
+<hkern u1="L" u2="&#x2a;" k="203" />
+<hkern u1="O" u2="&#xc6;" k="35" />
+<hkern u1="O" u2="&#x7d;" k="68" />
+<hkern u1="O" u2="]" k="70" />
+<hkern u1="O" u2="X" k="43" />
+<hkern u1="O" u2="V" k="27" />
+<hkern u1="O" u2="&#x3f;" k="25" />
+<hkern u1="P" u2="&#x2039;" k="31" />
+<hkern u1="P" u2="&#x2026;" k="193" />
+<hkern u1="P" u2="&#x201e;" k="193" />
+<hkern u1="P" u2="&#x201a;" k="193" />
+<hkern u1="P" u2="&#x2014;" k="31" />
+<hkern u1="P" u2="&#x2013;" k="31" />
+<hkern u1="P" u2="&#x178;" k="41" />
+<hkern u1="P" u2="&#x153;" k="14" />
+<hkern u1="P" u2="&#xf8;" k="14" />
+<hkern u1="P" u2="&#xf6;" k="14" />
+<hkern u1="P" u2="&#xf5;" k="14" />
+<hkern u1="P" u2="&#xf4;" k="14" />
+<hkern u1="P" u2="&#xf3;" k="14" />
+<hkern u1="P" u2="&#xf2;" k="14" />
+<hkern u1="P" u2="&#xf0;" k="41" />
+<hkern u1="P" u2="&#xeb;" k="14" />
+<hkern u1="P" u2="&#xea;" k="14" />
+<hkern u1="P" u2="&#xe9;" k="14" />
+<hkern u1="P" u2="&#xe8;" k="14" />
+<hkern u1="P" u2="&#xe7;" k="14" />
+<hkern u1="P" u2="&#xe6;" k="10" />
+<hkern u1="P" u2="&#xe5;" k="10" />
+<hkern u1="P" u2="&#xe4;" k="10" />
+<hkern u1="P" u2="&#xe3;" k="10" />
+<hkern u1="P" u2="&#xe2;" k="10" />
+<hkern u1="P" u2="&#xe1;" k="10" />
+<hkern u1="P" u2="&#xe0;" k="10" />
+<hkern u1="P" u2="&#xdd;" k="41" />
+<hkern u1="P" u2="&#xc6;" k="90" />
+<hkern u1="P" u2="&#xc5;" k="80" />
+<hkern u1="P" u2="&#xc4;" k="80" />
+<hkern u1="P" u2="&#xc3;" k="80" />
+<hkern u1="P" u2="&#xc2;" k="80" />
+<hkern u1="P" u2="&#xc1;" k="80" />
+<hkern u1="P" u2="&#xc0;" k="80" />
+<hkern u1="P" u2="&#xab;" k="31" />
+<hkern u1="P" u2="&#x7d;" k="59" />
+<hkern u1="P" u2="q" k="16" />
+<hkern u1="P" u2="o" k="14" />
+<hkern u1="P" u2="g" k="12" />
+<hkern u1="P" u2="e" k="14" />
+<hkern u1="P" u2="d" k="16" />
+<hkern u1="P" u2="c" k="14" />
+<hkern u1="P" u2="a" k="10" />
+<hkern u1="P" u2="]" k="59" />
+<hkern u1="P" u2="Z" k="23" />
+<hkern u1="P" u2="Y" k="41" />
+<hkern u1="P" u2="X" k="35" />
+<hkern u1="P" u2="V" k="12" />
+<hkern u1="P" u2="J" k="76" />
+<hkern u1="P" u2="A" k="80" />
+<hkern u1="P" u2="&#x2f;" k="72" />
+<hkern u1="P" u2="&#x2e;" k="193" />
+<hkern u1="P" u2="&#x2d;" k="31" />
+<hkern u1="P" u2="&#x2c;" k="193" />
+<hkern u1="Q" u2="&#xc6;" k="35" />
+<hkern u1="Q" u2="&#x7d;" k="68" />
+<hkern u1="Q" u2="]" k="70" />
+<hkern u1="Q" u2="X" k="43" />
+<hkern u1="Q" u2="V" k="27" />
+<hkern u1="Q" u2="&#x3f;" k="25" />
+<hkern u1="R" u2="&#xf0;" k="25" />
+<hkern u1="R" u2="&#xc6;" k="12" />
+<hkern u1="R" u2="&#x7d;" k="51" />
+<hkern u1="R" u2="]" k="59" />
+<hkern u1="R" u2="V" k="23" />
+<hkern u1="S" u2="&#xec;" k="-29" />
+<hkern u1="S" u2="&#xc6;" k="27" />
+<hkern u1="S" u2="x" k="20" />
+<hkern u1="S" u2="v" k="27" />
+<hkern u1="S" u2="f" k="14" />
+<hkern u1="S" u2="X" k="10" />
+<hkern u1="S" u2="V" k="20" />
+<hkern u1="T" u2="&#xf0;" k="94" />
+<hkern u1="T" u2="&#xef;" k="-61" />
+<hkern u1="T" u2="&#xec;" k="-143" />
+<hkern u1="T" u2="&#xe4;" k="205" />
+<hkern u1="T" u2="&#xe3;" k="166" />
+<hkern u1="T" u2="&#xdf;" k="14" />
+<hkern u1="T" u2="&#xc6;" k="117" />
+<hkern u1="T" u2="&#xae;" k="29" />
+<hkern u1="T" u2="x" k="178" />
+<hkern u1="T" u2="v" k="162" />
+<hkern u1="T" u2="f" k="29" />
+<hkern u1="T" u2="&#x40;" k="68" />
+<hkern u1="T" u2="&#x2f;" k="109" />
+<hkern u1="T" u2="&#x26;" k="57" />
+<hkern u1="U" u2="&#xc6;" k="23" />
+<hkern u1="V" u2="&#x203a;" k="51" />
+<hkern u1="V" u2="&#x2039;" k="63" />
+<hkern u1="V" u2="&#x2026;" k="125" />
+<hkern u1="V" u2="&#x201e;" k="125" />
+<hkern u1="V" u2="&#x201a;" k="125" />
+<hkern u1="V" u2="&#x2014;" k="72" />
+<hkern u1="V" u2="&#x2013;" k="72" />
+<hkern u1="V" u2="&#x153;" k="70" />
+<hkern u1="V" u2="&#x152;" k="27" />
+<hkern u1="V" u2="&#xff;" k="18" />
+<hkern u1="V" u2="&#xfd;" k="18" />
+<hkern u1="V" u2="&#xfc;" k="55" />
+<hkern u1="V" u2="&#xfb;" k="55" />
+<hkern u1="V" u2="&#xfa;" k="55" />
+<hkern u1="V" u2="&#xf9;" k="55" />
+<hkern u1="V" u2="&#xf8;" k="70" />
+<hkern u1="V" u2="&#xf6;" k="70" />
+<hkern u1="V" u2="&#xf5;" k="70" />
+<hkern u1="V" u2="&#xf4;" k="70" />
+<hkern u1="V" u2="&#xf3;" k="70" />
+<hkern u1="V" u2="&#xf2;" k="70" />
+<hkern u1="V" u2="&#xf1;" k="61" />
+<hkern u1="V" u2="&#xf0;" k="70" />
+<hkern u1="V" u2="&#xef;" k="-27" />
+<hkern u1="V" u2="&#xec;" k="-109" />
+<hkern u1="V" u2="&#xeb;" k="70" />
+<hkern u1="V" u2="&#xea;" k="70" />
+<hkern u1="V" u2="&#xe9;" k="70" />
+<hkern u1="V" u2="&#xe8;" k="70" />
+<hkern u1="V" u2="&#xe7;" k="70" />
+<hkern u1="V" u2="&#xe6;" k="59" />
+<hkern u1="V" u2="&#xe5;" k="59" />
+<hkern u1="V" u2="&#xe4;" k="59" />
+<hkern u1="V" u2="&#xe3;" k="59" />
+<hkern u1="V" u2="&#xe2;" k="59" />
+<hkern u1="V" u2="&#xe1;" k="59" />
+<hkern u1="V" u2="&#xe0;" k="59" />
+<hkern u1="V" u2="&#xd8;" k="27" />
+<hkern u1="V" u2="&#xd6;" k="27" />
+<hkern u1="V" u2="&#xd5;" k="27" />
+<hkern u1="V" u2="&#xd4;" k="27" />
+<hkern u1="V" u2="&#xd3;" k="27" />
+<hkern u1="V" u2="&#xd2;" k="27" />
+<hkern u1="V" u2="&#xc7;" k="25" />
+<hkern u1="V" u2="&#xc6;" k="68" />
+<hkern u1="V" u2="&#xc5;" k="59" />
+<hkern u1="V" u2="&#xc4;" k="59" />
+<hkern u1="V" u2="&#xc3;" k="59" />
+<hkern u1="V" u2="&#xc2;" k="59" />
+<hkern u1="V" u2="&#xc1;" k="59" />
+<hkern u1="V" u2="&#xc0;" k="59" />
+<hkern u1="V" u2="&#xbb;" k="51" />
+<hkern u1="V" u2="&#xae;" k="25" />
+<hkern u1="V" u2="&#xab;" k="63" />
+<hkern u1="V" u2="z" k="25" />
+<hkern u1="V" u2="y" k="18" />
+<hkern u1="V" u2="x" k="16" />
+<hkern u1="V" u2="w" k="20" />
+<hkern u1="V" u2="v" k="18" />
+<hkern u1="V" u2="u" k="55" />
+<hkern u1="V" u2="s" k="55" />
+<hkern u1="V" u2="r" k="61" />
+<hkern u1="V" u2="q" k="72" />
+<hkern u1="V" u2="p" k="61" />
+<hkern u1="V" u2="o" k="70" />
+<hkern u1="V" u2="n" k="61" />
+<hkern u1="V" u2="m" k="61" />
+<hkern u1="V" u2="g" k="86" />
+<hkern u1="V" u2="e" k="70" />
+<hkern u1="V" u2="d" k="72" />
+<hkern u1="V" u2="c" k="70" />
+<hkern u1="V" u2="a" k="59" />
+<hkern u1="V" u2="S" k="16" />
+<hkern u1="V" u2="Q" k="27" />
+<hkern u1="V" u2="O" k="27" />
+<hkern u1="V" u2="J" k="76" />
+<hkern u1="V" u2="G" k="27" />
+<hkern u1="V" u2="C" k="25" />
+<hkern u1="V" u2="A" k="59" />
+<hkern u1="V" u2="&#x40;" k="33" />
+<hkern u1="V" u2="&#x3b;" k="33" />
+<hkern u1="V" u2="&#x3a;" k="33" />
+<hkern u1="V" u2="&#x2f;" k="86" />
+<hkern u1="V" u2="&#x2e;" k="125" />
+<hkern u1="V" u2="&#x2d;" k="72" />
+<hkern u1="V" u2="&#x2c;" k="125" />
+<hkern u1="V" u2="&#x26;" k="45" />
+<hkern u1="W" u2="&#xf0;" k="45" />
+<hkern u1="W" u2="&#xec;" k="-90" />
+<hkern u1="W" u2="&#xc6;" k="61" />
+<hkern u1="W" u2="&#x2f;" k="53" />
+<hkern u1="W" u2="&#x26;" k="20" />
+<hkern u1="X" u2="&#x2039;" k="53" />
+<hkern u1="X" u2="&#x2014;" k="86" />
+<hkern u1="X" u2="&#x2013;" k="86" />
+<hkern u1="X" u2="&#x153;" k="35" />
+<hkern u1="X" u2="&#x152;" k="43" />
+<hkern u1="X" u2="&#xff;" k="59" />
+<hkern u1="X" u2="&#xfd;" k="59" />
+<hkern u1="X" u2="&#xfc;" k="29" />
+<hkern u1="X" u2="&#xfb;" k="29" />
+<hkern u1="X" u2="&#xfa;" k="29" />
+<hkern u1="X" u2="&#xf9;" k="29" />
+<hkern u1="X" u2="&#xf8;" k="35" />
+<hkern u1="X" u2="&#xf6;" k="35" />
+<hkern u1="X" u2="&#xf5;" k="35" />
+<hkern u1="X" u2="&#xf4;" k="35" />
+<hkern u1="X" u2="&#xf3;" k="35" />
+<hkern u1="X" u2="&#xf2;" k="35" />
+<hkern u1="X" u2="&#xf0;" k="16" />
+<hkern u1="X" u2="&#xef;" k="-37" />
+<hkern u1="X" u2="&#xec;" k="-117" />
+<hkern u1="X" u2="&#xeb;" k="35" />
+<hkern u1="X" u2="&#xea;" k="35" />
+<hkern u1="X" u2="&#xe9;" k="35" />
+<hkern u1="X" u2="&#xe8;" k="35" />
+<hkern u1="X" u2="&#xe7;" k="35" />
+<hkern u1="X" u2="&#xd8;" k="43" />
+<hkern u1="X" u2="&#xd6;" k="43" />
+<hkern u1="X" u2="&#xd5;" k="43" />
+<hkern u1="X" u2="&#xd4;" k="43" />
+<hkern u1="X" u2="&#xd3;" k="43" />
+<hkern u1="X" u2="&#xd2;" k="43" />
+<hkern u1="X" u2="&#xc7;" k="41" />
+<hkern u1="X" u2="&#xae;" k="31" />
+<hkern u1="X" u2="&#xab;" k="53" />
+<hkern u1="X" u2="y" k="59" />
+<hkern u1="X" u2="w" k="53" />
+<hkern u1="X" u2="v" k="59" />
+<hkern u1="X" u2="u" k="29" />
+<hkern u1="X" u2="t" k="18" />
+<hkern u1="X" u2="q" k="35" />
+<hkern u1="X" u2="o" k="35" />
+<hkern u1="X" u2="g" k="27" />
+<hkern u1="X" u2="e" k="35" />
+<hkern u1="X" u2="d" k="35" />
+<hkern u1="X" u2="c" k="35" />
+<hkern u1="X" u2="Q" k="43" />
+<hkern u1="X" u2="O" k="43" />
+<hkern u1="X" u2="G" k="43" />
+<hkern u1="X" u2="C" k="41" />
+<hkern u1="X" u2="&#x2d;" k="86" />
+<hkern u1="Y" u2="&#xff;" k="82" />
+<hkern u1="Y" u2="&#xf0;" k="98" />
+<hkern u1="Y" u2="&#xef;" k="-55" />
+<hkern u1="Y" u2="&#xec;" k="-135" />
+<hkern u1="Y" u2="&#xeb;" k="145" />
+<hkern u1="Y" u2="&#xe4;" k="135" />
+<hkern u1="Y" u2="&#xe3;" k="135" />
+<hkern u1="Y" u2="&#xc6;" k="96" />
+<hkern u1="Y" u2="&#xae;" k="49" />
+<hkern u1="Y" u2="x" k="90" />
+<hkern u1="Y" u2="v" k="94" />
+<hkern u1="Y" u2="f" k="31" />
+<hkern u1="Y" u2="&#x40;" k="76" />
+<hkern u1="Y" u2="&#x2f;" k="131" />
+<hkern u1="Y" u2="&#x26;" k="88" />
+<hkern u1="Z" u2="&#xf0;" k="18" />
+<hkern u1="Z" u2="&#xee;" k="-14" />
+<hkern u1="Z" u2="&#xec;" k="-76" />
+<hkern u1="Z" u2="&#xae;" k="25" />
+<hkern u1="Z" u2="v" k="31" />
+<hkern u1="[" u2="&#x153;" k="94" />
+<hkern u1="[" u2="&#x152;" k="70" />
+<hkern u1="[" u2="&#xff;" k="76" />
+<hkern u1="[" u2="&#xfd;" k="76" />
+<hkern u1="[" u2="&#xfc;" k="88" />
+<hkern u1="[" u2="&#xfb;" k="88" />
+<hkern u1="[" u2="&#xfa;" k="88" />
+<hkern u1="[" u2="&#xf9;" k="88" />
+<hkern u1="[" u2="&#xf8;" k="94" />
+<hkern u1="[" u2="&#xf6;" k="94" />
+<hkern u1="[" u2="&#xf5;" k="94" />
+<hkern u1="[" u2="&#xf4;" k="94" />
+<hkern u1="[" u2="&#xf3;" k="94" />
+<hkern u1="[" u2="&#xf2;" k="94" />
+<hkern u1="[" u2="&#xf1;" k="86" />
+<hkern u1="[" u2="&#xf0;" k="31" />
+<hkern u1="[" u2="&#xec;" k="-68" />
+<hkern u1="[" u2="&#xeb;" k="94" />
+<hkern u1="[" u2="&#xea;" k="94" />
+<hkern u1="[" u2="&#xe9;" k="94" />
+<hkern u1="[" u2="&#xe8;" k="94" />
+<hkern u1="[" u2="&#xe7;" k="94" />
+<hkern u1="[" u2="&#xe6;" k="84" />
+<hkern u1="[" u2="&#xe5;" k="84" />
+<hkern u1="[" u2="&#xe4;" k="84" />
+<hkern u1="[" u2="&#xe3;" k="84" />
+<hkern u1="[" u2="&#xe2;" k="84" />
+<hkern u1="[" u2="&#xe1;" k="84" />
+<hkern u1="[" u2="&#xe0;" k="84" />
+<hkern u1="[" u2="&#xd8;" k="70" />
+<hkern u1="[" u2="&#xd6;" k="70" />
+<hkern u1="[" u2="&#xd5;" k="70" />
+<hkern u1="[" u2="&#xd4;" k="70" />
+<hkern u1="[" u2="&#xd3;" k="70" />
+<hkern u1="[" u2="&#xd2;" k="70" />
+<hkern u1="[" u2="&#xc7;" k="68" />
+<hkern u1="[" u2="&#xc6;" k="80" />
+<hkern u1="[" u2="&#xc5;" k="78" />
+<hkern u1="[" u2="&#xc4;" k="78" />
+<hkern u1="[" u2="&#xc3;" k="78" />
+<hkern u1="[" u2="&#xc2;" k="78" />
+<hkern u1="[" u2="&#xc1;" k="78" />
+<hkern u1="[" u2="&#xc0;" k="78" />
+<hkern u1="[" u2="&#x7b;" k="47" />
+<hkern u1="[" u2="z" k="70" />
+<hkern u1="[" u2="y" k="76" />
+<hkern u1="[" u2="x" k="61" />
+<hkern u1="[" u2="w" k="84" />
+<hkern u1="[" u2="v" k="82" />
+<hkern u1="[" u2="u" k="88" />
+<hkern u1="[" u2="t" k="70" />
+<hkern u1="[" u2="s" k="84" />
+<hkern u1="[" u2="r" k="86" />
+<hkern u1="[" u2="q" k="92" />
+<hkern u1="[" u2="p" k="86" />
+<hkern u1="[" u2="o" k="94" />
+<hkern u1="[" u2="n" k="86" />
+<hkern u1="[" u2="m" k="86" />
+<hkern u1="[" u2="f" k="37" />
+<hkern u1="[" u2="e" k="94" />
+<hkern u1="[" u2="d" k="92" />
+<hkern u1="[" u2="c" k="94" />
+<hkern u1="[" u2="a" k="84" />
+<hkern u1="[" u2="S" k="39" />
+<hkern u1="[" u2="Q" k="70" />
+<hkern u1="[" u2="O" k="70" />
+<hkern u1="[" u2="G" k="70" />
+<hkern u1="[" u2="C" k="68" />
+<hkern u1="[" u2="A" k="78" />
+<hkern u1="[" u2="&#x28;" k="29" />
+<hkern u1="\" u2="&#x201d;" k="139" />
+<hkern u1="\" u2="&#x2019;" k="139" />
+<hkern u1="\" u2="&#x178;" k="135" />
+<hkern u1="\" u2="&#xff;" k="49" />
+<hkern u1="\" u2="&#xfd;" k="49" />
+<hkern u1="\" u2="&#xdd;" k="135" />
+<hkern u1="\" u2="y" k="49" />
+<hkern u1="\" u2="w" k="39" />
+<hkern u1="\" u2="v" k="49" />
+<hkern u1="\" u2="t" k="20" />
+<hkern u1="\" u2="Y" k="135" />
+<hkern u1="\" u2="W" k="55" />
+<hkern u1="\" u2="V" k="90" />
+<hkern u1="\" u2="T" k="117" />
+<hkern u1="\" u2="&#x27;" k="135" />
+<hkern u1="\" u2="&#x22;" k="135" />
+<hkern u1="a" u2="&#x2122;" k="20" />
+<hkern u1="a" u2="&#x7d;" k="31" />
+<hkern u1="a" u2="v" k="8" />
+<hkern u1="a" u2="]" k="39" />
+<hkern u1="a" u2="\" k="61" />
+<hkern u1="a" u2="V" k="47" />
+<hkern u1="a" u2="&#x3f;" k="33" />
+<hkern u1="b" u2="&#x2122;" k="37" />
+<hkern u1="b" u2="&#xc6;" k="16" />
+<hkern u1="b" u2="&#x7d;" k="88" />
+<hkern u1="b" u2="x" k="29" />
+<hkern u1="b" u2="v" k="18" />
+<hkern u1="b" u2="]" k="92" />
+<hkern u1="b" u2="\" k="68" />
+<hkern u1="b" u2="X" k="39" />
+<hkern u1="b" u2="V" k="70" />
+<hkern u1="b" u2="&#x3f;" k="63" />
+<hkern u1="b" u2="&#x2a;" k="16" />
+<hkern u1="b" u2="&#x29;" k="35" />
+<hkern u1="c" u2="&#xf0;" k="29" />
+<hkern u1="c" u2="&#x7d;" k="55" />
+<hkern u1="c" u2="]" k="66" />
+<hkern u1="c" u2="V" k="25" />
+<hkern u1="c" u2="&#x3f;" k="31" />
+<hkern u1="e" u2="&#x2122;" k="31" />
+<hkern u1="e" u2="&#xc6;" k="10" />
+<hkern u1="e" u2="&#x7d;" k="80" />
+<hkern u1="e" u2="x" k="14" />
+<hkern u1="e" u2="v" k="18" />
+<hkern u1="e" u2="]" k="84" />
+<hkern u1="e" u2="\" k="66" />
+<hkern u1="e" u2="V" k="72" />
+<hkern u1="e" u2="&#x3f;" k="53" />
+<hkern u1="f" u2="&#x203a;" k="74" />
+<hkern u1="f" u2="&#x2039;" k="84" />
+<hkern u1="f" u2="&#x2026;" k="94" />
+<hkern u1="f" u2="&#x201e;" k="94" />
+<hkern u1="f" u2="&#x201a;" k="94" />
+<hkern u1="f" u2="&#x2014;" k="100" />
+<hkern u1="f" u2="&#x2013;" k="100" />
+<hkern u1="f" u2="&#x178;" k="51" />
+<hkern u1="f" u2="&#x153;" k="25" />
+<hkern u1="f" u2="&#xf8;" k="25" />
+<hkern u1="f" u2="&#xf6;" k="25" />
+<hkern u1="f" u2="&#xf5;" k="25" />
+<hkern u1="f" u2="&#xf4;" k="25" />
+<hkern u1="f" u2="&#xf3;" k="25" />
+<hkern u1="f" u2="&#xf2;" k="25" />
+<hkern u1="f" u2="&#xf0;" k="94" />
+<hkern u1="f" u2="&#xec;" k="-170" />
+<hkern u1="f" u2="&#xeb;" k="25" />
+<hkern u1="f" u2="&#xea;" k="25" />
+<hkern u1="f" u2="&#xe9;" k="25" />
+<hkern u1="f" u2="&#xe8;" k="25" />
+<hkern u1="f" u2="&#xe7;" k="25" />
+<hkern u1="f" u2="&#xdd;" k="51" />
+<hkern u1="f" u2="&#xc6;" k="82" />
+<hkern u1="f" u2="&#xc5;" k="78" />
+<hkern u1="f" u2="&#xc4;" k="78" />
+<hkern u1="f" u2="&#xc3;" k="78" />
+<hkern u1="f" u2="&#xc2;" k="78" />
+<hkern u1="f" u2="&#xc1;" k="78" />
+<hkern u1="f" u2="&#xc0;" k="78" />
+<hkern u1="f" u2="&#xbb;" k="74" />
+<hkern u1="f" u2="&#xab;" k="84" />
+<hkern u1="f" u2="q" k="33" />
+<hkern u1="f" u2="o" k="25" />
+<hkern u1="f" u2="g" k="16" />
+<hkern u1="f" u2="e" k="25" />
+<hkern u1="f" u2="d" k="33" />
+<hkern u1="f" u2="c" k="25" />
+<hkern u1="f" u2="Z" k="39" />
+<hkern u1="f" u2="Y" k="51" />
+<hkern u1="f" u2="X" k="45" />
+<hkern u1="f" u2="T" k="104" />
+<hkern u1="f" u2="J" k="76" />
+<hkern u1="f" u2="A" k="78" />
+<hkern u1="f" u2="&#x2f;" k="57" />
+<hkern u1="f" u2="&#x2e;" k="94" />
+<hkern u1="f" u2="&#x2d;" k="100" />
+<hkern u1="f" u2="&#x2c;" k="94" />
+<hkern u1="f" u2="&#x26;" k="31" />
+<hkern u1="g" u2="&#xf0;" k="10" />
+<hkern u1="g" u2="j" k="-33" />
+<hkern u1="h" u2="&#x2122;" k="35" />
+<hkern u1="h" u2="&#x7d;" k="82" />
+<hkern u1="h" u2="v" k="12" />
+<hkern u1="h" u2="]" k="88" />
+<hkern u1="h" u2="\" k="68" />
+<hkern u1="h" u2="V" k="63" />
+<hkern u1="h" u2="&#x3f;" k="55" />
+<hkern u1="k" u2="&#xf0;" k="41" />
+<hkern u1="k" u2="&#x7d;" k="45" />
+<hkern u1="k" u2="]" k="57" />
+<hkern u1="k" u2="V" k="18" />
+<hkern u1="k" u2="&#x3f;" k="23" />
+<hkern u1="l" u2="&#xb7;" k="98" />
+<hkern u1="m" u2="&#x2122;" k="35" />
+<hkern u1="m" u2="&#x7d;" k="82" />
+<hkern u1="m" u2="v" k="12" />
+<hkern u1="m" u2="]" k="88" />
+<hkern u1="m" u2="\" k="68" />
+<hkern u1="m" u2="V" k="63" />
+<hkern u1="m" u2="&#x3f;" k="55" />
+<hkern u1="n" u2="&#x2122;" k="35" />
+<hkern u1="n" u2="&#x7d;" k="82" />
+<hkern u1="n" u2="v" k="12" />
+<hkern u1="n" u2="]" k="88" />
+<hkern u1="n" u2="\" k="68" />
+<hkern u1="n" u2="V" k="63" />
+<hkern u1="n" u2="&#x3f;" k="55" />
+<hkern u1="o" u2="&#x2122;" k="33" />
+<hkern u1="o" u2="&#xc6;" k="14" />
+<hkern u1="o" u2="&#x7d;" k="88" />
+<hkern u1="o" u2="x" k="29" />
+<hkern u1="o" u2="v" k="20" />
+<hkern u1="o" u2="]" k="94" />
+<hkern u1="o" u2="\" k="72" />
+<hkern u1="o" u2="X" k="35" />
+<hkern u1="o" u2="V" k="70" />
+<hkern u1="o" u2="&#x3f;" k="59" />
+<hkern u1="o" u2="&#x29;" k="35" />
+<hkern u1="p" u2="&#x2122;" k="37" />
+<hkern u1="p" u2="&#xc6;" k="16" />
+<hkern u1="p" u2="&#x7d;" k="88" />
+<hkern u1="p" u2="x" k="29" />
+<hkern u1="p" u2="v" k="18" />
+<hkern u1="p" u2="]" k="92" />
+<hkern u1="p" u2="\" k="68" />
+<hkern u1="p" u2="X" k="39" />
+<hkern u1="p" u2="V" k="70" />
+<hkern u1="p" u2="&#x3f;" k="63" />
+<hkern u1="p" u2="&#x2a;" k="16" />
+<hkern u1="p" u2="&#x29;" k="35" />
+<hkern u1="q" u2="&#x2122;" k="27" />
+<hkern u1="q" u2="&#x7d;" k="78" />
+<hkern u1="q" u2="]" k="86" />
+<hkern u1="q" u2="\" k="41" />
+<hkern u1="q" u2="V" k="61" />
+<hkern u1="q" u2="&#x3f;" k="43" />
+<hkern u1="r" u2="&#xf0;" k="111" />
+<hkern u1="r" u2="&#xc6;" k="102" />
+<hkern u1="r" u2="&#x7d;" k="63" />
+<hkern u1="r" u2="]" k="72" />
+<hkern u1="r" u2="X" k="53" />
+<hkern u1="r" u2="&#x2f;" k="70" />
+<hkern u1="r" u2="&#x26;" k="35" />
+<hkern u1="s" u2="&#x2122;" k="25" />
+<hkern u1="s" u2="&#xc6;" k="10" />
+<hkern u1="s" u2="&#x7d;" k="76" />
+<hkern u1="s" u2="x" k="10" />
+<hkern u1="s" u2="v" k="16" />
+<hkern u1="s" u2="]" k="84" />
+<hkern u1="s" u2="\" k="35" />
+<hkern u1="s" u2="V" k="51" />
+<hkern u1="s" u2="&#x3f;" k="43" />
+<hkern u1="t" u2="&#xf0;" k="12" />
+<hkern u1="t" u2="&#x7d;" k="29" />
+<hkern u1="t" u2="]" k="39" />
+<hkern u1="u" u2="&#x2122;" k="27" />
+<hkern u1="u" u2="&#x7d;" k="78" />
+<hkern u1="u" u2="]" k="86" />
+<hkern u1="u" u2="\" k="41" />
+<hkern u1="u" u2="V" k="61" />
+<hkern u1="u" u2="&#x3f;" k="43" />
+<hkern u1="v" u2="&#x2039;" k="27" />
+<hkern u1="v" u2="&#x2026;" k="88" />
+<hkern u1="v" u2="&#x201e;" k="88" />
+<hkern u1="v" u2="&#x201a;" k="88" />
+<hkern u1="v" u2="&#x2014;" k="33" />
+<hkern u1="v" u2="&#x2013;" k="33" />
+<hkern u1="v" u2="&#x178;" k="94" />
+<hkern u1="v" u2="&#x153;" k="20" />
+<hkern u1="v" u2="&#xf8;" k="20" />
+<hkern u1="v" u2="&#xf6;" k="20" />
+<hkern u1="v" u2="&#xf5;" k="20" />
+<hkern u1="v" u2="&#xf4;" k="20" />
+<hkern u1="v" u2="&#xf3;" k="20" />
+<hkern u1="v" u2="&#xf2;" k="20" />
+<hkern u1="v" u2="&#xf0;" k="29" />
+<hkern u1="v" u2="&#xeb;" k="20" />
+<hkern u1="v" u2="&#xea;" k="20" />
+<hkern u1="v" u2="&#xe9;" k="20" />
+<hkern u1="v" u2="&#xe8;" k="20" />
+<hkern u1="v" u2="&#xe7;" k="20" />
+<hkern u1="v" u2="&#xe6;" k="18" />
+<hkern u1="v" u2="&#xe5;" k="18" />
+<hkern u1="v" u2="&#xe4;" k="18" />
+<hkern u1="v" u2="&#xe3;" k="18" />
+<hkern u1="v" u2="&#xe2;" k="18" />
+<hkern u1="v" u2="&#xe1;" k="18" />
+<hkern u1="v" u2="&#xe0;" k="18" />
+<hkern u1="v" u2="&#xdd;" k="94" />
+<hkern u1="v" u2="&#xc6;" k="47" />
+<hkern u1="v" u2="&#xc5;" k="41" />
+<hkern u1="v" u2="&#xc4;" k="41" />
+<hkern u1="v" u2="&#xc3;" k="41" />
+<hkern u1="v" u2="&#xc2;" k="41" />
+<hkern u1="v" u2="&#xc1;" k="41" />
+<hkern u1="v" u2="&#xc0;" k="41" />
+<hkern u1="v" u2="&#xab;" k="27" />
+<hkern u1="v" u2="&#x7d;" k="76" />
+<hkern u1="v" u2="s" k="14" />
+<hkern u1="v" u2="q" k="20" />
+<hkern u1="v" u2="o" k="20" />
+<hkern u1="v" u2="g" k="20" />
+<hkern u1="v" u2="e" k="20" />
+<hkern u1="v" u2="d" k="20" />
+<hkern u1="v" u2="c" k="20" />
+<hkern u1="v" u2="a" k="18" />
+<hkern u1="v" u2="]" k="82" />
+<hkern u1="v" u2="Z" k="43" />
+<hkern u1="v" u2="Y" k="94" />
+<hkern u1="v" u2="X" k="59" />
+<hkern u1="v" u2="V" k="18" />
+<hkern u1="v" u2="T" k="162" />
+<hkern u1="v" u2="J" k="72" />
+<hkern u1="v" u2="A" k="41" />
+<hkern u1="v" u2="&#x3f;" k="31" />
+<hkern u1="v" u2="&#x2f;" k="45" />
+<hkern u1="v" u2="&#x2e;" k="88" />
+<hkern u1="v" u2="&#x2d;" k="33" />
+<hkern u1="v" u2="&#x2c;" k="88" />
+<hkern u1="w" u2="&#xf0;" k="23" />
+<hkern u1="w" u2="&#xc6;" k="43" />
+<hkern u1="w" u2="&#x7d;" k="76" />
+<hkern u1="w" u2="]" k="84" />
+<hkern u1="w" u2="X" k="55" />
+<hkern u1="w" u2="V" k="20" />
+<hkern u1="w" u2="&#x3f;" k="33" />
+<hkern u1="w" u2="&#x2f;" k="39" />
+<hkern u1="x" u2="&#x2039;" k="59" />
+<hkern u1="x" u2="&#x2014;" k="76" />
+<hkern u1="x" u2="&#x2013;" k="76" />
+<hkern u1="x" u2="&#x178;" k="90" />
+<hkern u1="x" u2="&#x153;" k="29" />
+<hkern u1="x" u2="&#xf8;" k="29" />
+<hkern u1="x" u2="&#xf6;" k="29" />
+<hkern u1="x" u2="&#xf5;" k="29" />
+<hkern u1="x" u2="&#xf4;" k="29" />
+<hkern u1="x" u2="&#xf3;" k="29" />
+<hkern u1="x" u2="&#xf2;" k="29" />
+<hkern u1="x" u2="&#xf0;" k="41" />
+<hkern u1="x" u2="&#xeb;" k="29" />
+<hkern u1="x" u2="&#xea;" k="29" />
+<hkern u1="x" u2="&#xe9;" k="29" />
+<hkern u1="x" u2="&#xe8;" k="29" />
+<hkern u1="x" u2="&#xe7;" k="29" />
+<hkern u1="x" u2="&#xe6;" k="12" />
+<hkern u1="x" u2="&#xe5;" k="12" />
+<hkern u1="x" u2="&#xe4;" k="12" />
+<hkern u1="x" u2="&#xe3;" k="12" />
+<hkern u1="x" u2="&#xe2;" k="12" />
+<hkern u1="x" u2="&#xe1;" k="12" />
+<hkern u1="x" u2="&#xe0;" k="12" />
+<hkern u1="x" u2="&#xdd;" k="90" />
+<hkern u1="x" u2="&#xab;" k="59" />
+<hkern u1="x" u2="&#x7d;" k="53" />
+<hkern u1="x" u2="q" k="31" />
+<hkern u1="x" u2="o" k="29" />
+<hkern u1="x" u2="g" k="25" />
+<hkern u1="x" u2="e" k="29" />
+<hkern u1="x" u2="d" k="31" />
+<hkern u1="x" u2="c" k="29" />
+<hkern u1="x" u2="a" k="12" />
+<hkern u1="x" u2="]" k="63" />
+<hkern u1="x" u2="Y" k="90" />
+<hkern u1="x" u2="V" k="14" />
+<hkern u1="x" u2="T" k="180" />
+<hkern u1="x" u2="J" k="10" />
+<hkern u1="x" u2="&#x2d;" k="76" />
+<hkern u1="y" u2="&#xf0;" k="29" />
+<hkern u1="y" u2="&#xc6;" k="47" />
+<hkern u1="y" u2="&#x7d;" k="68" />
+<hkern u1="y" u2="]" k="74" />
+<hkern u1="y" u2="X" k="59" />
+<hkern u1="y" u2="V" k="18" />
+<hkern u1="y" u2="&#x3f;" k="31" />
+<hkern u1="y" u2="&#x2f;" k="47" />
+<hkern u1="z" u2="&#x2122;" k="16" />
+<hkern u1="z" u2="&#xf0;" k="23" />
+<hkern u1="z" u2="&#x7d;" k="59" />
+<hkern u1="z" u2="]" k="70" />
+<hkern u1="z" u2="V" k="27" />
+<hkern u1="z" u2="&#x3f;" k="29" />
+<hkern u1="&#x7b;" u2="&#x153;" k="88" />
+<hkern u1="&#x7b;" u2="&#x152;" k="68" />
+<hkern u1="&#x7b;" u2="&#xff;" k="70" />
+<hkern u1="&#x7b;" u2="&#xfd;" k="70" />
+<hkern u1="&#x7b;" u2="&#xfc;" k="82" />
+<hkern u1="&#x7b;" u2="&#xfb;" k="82" />
+<hkern u1="&#x7b;" u2="&#xfa;" k="82" />
+<hkern u1="&#x7b;" u2="&#xf9;" k="82" />
+<hkern u1="&#x7b;" u2="&#xf8;" k="88" />
+<hkern u1="&#x7b;" u2="&#xf6;" k="88" />
+<hkern u1="&#x7b;" u2="&#xf5;" k="88" />
+<hkern u1="&#x7b;" u2="&#xf4;" k="88" />
+<hkern u1="&#x7b;" u2="&#xf3;" k="88" />
+<hkern u1="&#x7b;" u2="&#xf2;" k="88" />
+<hkern u1="&#x7b;" u2="&#xf1;" k="78" />
+<hkern u1="&#x7b;" u2="&#xf0;" k="31" />
+<hkern u1="&#x7b;" u2="&#xec;" k="-70" />
+<hkern u1="&#x7b;" u2="&#xeb;" k="88" />
+<hkern u1="&#x7b;" u2="&#xea;" k="88" />
+<hkern u1="&#x7b;" u2="&#xe9;" k="88" />
+<hkern u1="&#x7b;" u2="&#xe8;" k="88" />
+<hkern u1="&#x7b;" u2="&#xe7;" k="88" />
+<hkern u1="&#x7b;" u2="&#xe6;" k="76" />
+<hkern u1="&#x7b;" u2="&#xe5;" k="76" />
+<hkern u1="&#x7b;" u2="&#xe4;" k="76" />
+<hkern u1="&#x7b;" u2="&#xe3;" k="76" />
+<hkern u1="&#x7b;" u2="&#xe2;" k="76" />
+<hkern u1="&#x7b;" u2="&#xe1;" k="76" />
+<hkern u1="&#x7b;" u2="&#xe0;" k="76" />
+<hkern u1="&#x7b;" u2="&#xd8;" k="68" />
+<hkern u1="&#x7b;" u2="&#xd6;" k="68" />
+<hkern u1="&#x7b;" u2="&#xd5;" k="68" />
+<hkern u1="&#x7b;" u2="&#xd4;" k="68" />
+<hkern u1="&#x7b;" u2="&#xd3;" k="68" />
+<hkern u1="&#x7b;" u2="&#xd2;" k="68" />
+<hkern u1="&#x7b;" u2="&#xc7;" k="66" />
+<hkern u1="&#x7b;" u2="&#xc6;" k="72" />
+<hkern u1="&#x7b;" u2="&#xc5;" k="68" />
+<hkern u1="&#x7b;" u2="&#xc4;" k="68" />
+<hkern u1="&#x7b;" u2="&#xc3;" k="68" />
+<hkern u1="&#x7b;" u2="&#xc2;" k="68" />
+<hkern u1="&#x7b;" u2="&#xc1;" k="68" />
+<hkern u1="&#x7b;" u2="&#xc0;" k="68" />
+<hkern u1="&#x7b;" u2="&#x7b;" k="49" />
+<hkern u1="&#x7b;" u2="z" k="59" />
+<hkern u1="&#x7b;" u2="y" k="70" />
+<hkern u1="&#x7b;" u2="x" k="53" />
+<hkern u1="&#x7b;" u2="w" k="76" />
+<hkern u1="&#x7b;" u2="v" k="74" />
+<hkern u1="&#x7b;" u2="u" k="82" />
+<hkern u1="&#x7b;" u2="t" k="61" />
+<hkern u1="&#x7b;" u2="s" k="76" />
+<hkern u1="&#x7b;" u2="r" k="78" />
+<hkern u1="&#x7b;" u2="q" k="88" />
+<hkern u1="&#x7b;" u2="p" k="78" />
+<hkern u1="&#x7b;" u2="o" k="88" />
+<hkern u1="&#x7b;" u2="n" k="78" />
+<hkern u1="&#x7b;" u2="m" k="78" />
+<hkern u1="&#x7b;" u2="f" k="37" />
+<hkern u1="&#x7b;" u2="e" k="88" />
+<hkern u1="&#x7b;" u2="d" k="88" />
+<hkern u1="&#x7b;" u2="c" k="88" />
+<hkern u1="&#x7b;" u2="a" k="76" />
+<hkern u1="&#x7b;" u2="S" k="37" />
+<hkern u1="&#x7b;" u2="Q" k="68" />
+<hkern u1="&#x7b;" u2="O" k="68" />
+<hkern u1="&#x7b;" u2="G" k="68" />
+<hkern u1="&#x7b;" u2="C" k="66" />
+<hkern u1="&#x7b;" u2="A" k="68" />
+<hkern u1="&#x7b;" u2="&#x28;" k="29" />
+<hkern u1="&#x7d;" u2="&#x7d;" k="49" />
+<hkern u1="&#x7d;" u2="]" k="47" />
+<hkern u1="&#x7d;" u2="&#x29;" k="20" />
+<hkern u1="&#xa1;" u2="&#x178;" k="72" />
+<hkern u1="&#xa1;" u2="&#xdd;" k="72" />
+<hkern u1="&#xa1;" u2="Y" k="72" />
+<hkern u1="&#xa1;" u2="V" k="27" />
+<hkern u1="&#xa1;" u2="T" k="123" />
+<hkern u1="&#xab;" u2="V" k="51" />
+<hkern u1="&#xae;" u2="&#x178;" k="51" />
+<hkern u1="&#xae;" u2="&#xdd;" k="51" />
+<hkern u1="&#xae;" u2="&#xc6;" k="78" />
+<hkern u1="&#xae;" u2="&#xc5;" k="63" />
+<hkern u1="&#xae;" u2="&#xc4;" k="63" />
+<hkern u1="&#xae;" u2="&#xc3;" k="63" />
+<hkern u1="&#xae;" u2="&#xc2;" k="63" />
+<hkern u1="&#xae;" u2="&#xc1;" k="63" />
+<hkern u1="&#xae;" u2="&#xc0;" k="63" />
+<hkern u1="&#xae;" u2="Z" k="45" />
+<hkern u1="&#xae;" u2="Y" k="51" />
+<hkern u1="&#xae;" u2="X" k="33" />
+<hkern u1="&#xae;" u2="V" k="25" />
+<hkern u1="&#xae;" u2="T" k="31" />
+<hkern u1="&#xae;" u2="J" k="63" />
+<hkern u1="&#xae;" u2="A" k="63" />
+<hkern u1="&#xb7;" u2="l" k="98" />
+<hkern u1="&#xbb;" u2="&#xc6;" k="23" />
+<hkern u1="&#xbb;" u2="x" k="59" />
+<hkern u1="&#xbb;" u2="v" k="27" />
+<hkern u1="&#xbb;" u2="X" k="55" />
+<hkern u1="&#xbb;" u2="V" k="63" />
+<hkern u1="&#xbf;" u2="&#x178;" k="150" />
+<hkern u1="&#xbf;" u2="&#x153;" k="82" />
+<hkern u1="&#xbf;" u2="&#x152;" k="72" />
+<hkern u1="&#xbf;" u2="&#xff;" k="70" />
+<hkern u1="&#xbf;" u2="&#xfe;" k="82" />
+<hkern u1="&#xbf;" u2="&#xfd;" k="70" />
+<hkern u1="&#xbf;" u2="&#xfc;" k="78" />
+<hkern u1="&#xbf;" u2="&#xfb;" k="78" />
+<hkern u1="&#xbf;" u2="&#xfa;" k="78" />
+<hkern u1="&#xbf;" u2="&#xf9;" k="78" />
+<hkern u1="&#xbf;" u2="&#xf8;" k="82" />
+<hkern u1="&#xbf;" u2="&#xf6;" k="82" />
+<hkern u1="&#xbf;" u2="&#xf5;" k="82" />
+<hkern u1="&#xbf;" u2="&#xf4;" k="82" />
+<hkern u1="&#xbf;" u2="&#xf3;" k="82" />
+<hkern u1="&#xbf;" u2="&#xf2;" k="82" />
+<hkern u1="&#xbf;" u2="&#xf1;" k="82" />
+<hkern u1="&#xbf;" u2="&#xf0;" k="80" />
+<hkern u1="&#xbf;" u2="&#xef;" k="82" />
+<hkern u1="&#xbf;" u2="&#xee;" k="82" />
+<hkern u1="&#xbf;" u2="&#xed;" k="82" />
+<hkern u1="&#xbf;" u2="&#xec;" k="82" />
+<hkern u1="&#xbf;" u2="&#xeb;" k="82" />
+<hkern u1="&#xbf;" u2="&#xea;" k="82" />
+<hkern u1="&#xbf;" u2="&#xe9;" k="82" />
+<hkern u1="&#xbf;" u2="&#xe8;" k="82" />
+<hkern u1="&#xbf;" u2="&#xe7;" k="82" />
+<hkern u1="&#xbf;" u2="&#xe6;" k="88" />
+<hkern u1="&#xbf;" u2="&#xe5;" k="88" />
+<hkern u1="&#xbf;" u2="&#xe4;" k="88" />
+<hkern u1="&#xbf;" u2="&#xe3;" k="88" />
+<hkern u1="&#xbf;" u2="&#xe2;" k="88" />
+<hkern u1="&#xbf;" u2="&#xe1;" k="88" />
+<hkern u1="&#xbf;" u2="&#xe0;" k="88" />
+<hkern u1="&#xbf;" u2="&#xdf;" k="82" />
+<hkern u1="&#xbf;" u2="&#xde;" k="78" />
+<hkern u1="&#xbf;" u2="&#xdd;" k="150" />
+<hkern u1="&#xbf;" u2="&#xdc;" k="76" />
+<hkern u1="&#xbf;" u2="&#xdb;" k="76" />
+<hkern u1="&#xbf;" u2="&#xda;" k="76" />
+<hkern u1="&#xbf;" u2="&#xd9;" k="76" />
+<hkern u1="&#xbf;" u2="&#xd8;" k="72" />
+<hkern u1="&#xbf;" u2="&#xd6;" k="72" />
+<hkern u1="&#xbf;" u2="&#xd5;" k="72" />
+<hkern u1="&#xbf;" u2="&#xd4;" k="72" />
+<hkern u1="&#xbf;" u2="&#xd3;" k="72" />
+<hkern u1="&#xbf;" u2="&#xd2;" k="72" />
+<hkern u1="&#xbf;" u2="&#xd1;" k="78" />
+<hkern u1="&#xbf;" u2="&#xd0;" k="78" />
+<hkern u1="&#xbf;" u2="&#xcf;" k="78" />
+<hkern u1="&#xbf;" u2="&#xce;" k="78" />
+<hkern u1="&#xbf;" u2="&#xcd;" k="78" />
+<hkern u1="&#xbf;" u2="&#xcc;" k="78" />
+<hkern u1="&#xbf;" u2="&#xcb;" k="78" />
+<hkern u1="&#xbf;" u2="&#xca;" k="78" />
+<hkern u1="&#xbf;" u2="&#xc9;" k="78" />
+<hkern u1="&#xbf;" u2="&#xc8;" k="78" />
+<hkern u1="&#xbf;" u2="&#xc7;" k="74" />
+<hkern u1="&#xbf;" u2="&#xc6;" k="113" />
+<hkern u1="&#xbf;" u2="&#xc5;" k="109" />
+<hkern u1="&#xbf;" u2="&#xc4;" k="109" />
+<hkern u1="&#xbf;" u2="&#xc3;" k="109" />
+<hkern u1="&#xbf;" u2="&#xc2;" k="109" />
+<hkern u1="&#xbf;" u2="&#xc1;" k="109" />
+<hkern u1="&#xbf;" u2="&#xc0;" k="109" />
+<hkern u1="&#xbf;" u2="z" k="74" />
+<hkern u1="&#xbf;" u2="y" k="70" />
+<hkern u1="&#xbf;" u2="x" k="68" />
+<hkern u1="&#xbf;" u2="w" k="78" />
+<hkern u1="&#xbf;" u2="v" k="78" />
+<hkern u1="&#xbf;" u2="u" k="78" />
+<hkern u1="&#xbf;" u2="t" k="70" />
+<hkern u1="&#xbf;" u2="s" k="82" />
+<hkern u1="&#xbf;" u2="r" k="82" />
+<hkern u1="&#xbf;" u2="q" k="82" />
+<hkern u1="&#xbf;" u2="p" k="82" />
+<hkern u1="&#xbf;" u2="o" k="82" />
+<hkern u1="&#xbf;" u2="n" k="82" />
+<hkern u1="&#xbf;" u2="m" k="82" />
+<hkern u1="&#xbf;" u2="l" k="82" />
+<hkern u1="&#xbf;" u2="k" k="82" />
+<hkern u1="&#xbf;" u2="j" k="-78" />
+<hkern u1="&#xbf;" u2="i" k="82" />
+<hkern u1="&#xbf;" u2="h" k="82" />
+<hkern u1="&#xbf;" u2="f" k="66" />
+<hkern u1="&#xbf;" u2="e" k="82" />
+<hkern u1="&#xbf;" u2="d" k="82" />
+<hkern u1="&#xbf;" u2="c" k="82" />
+<hkern u1="&#xbf;" u2="b" k="82" />
+<hkern u1="&#xbf;" u2="a" k="88" />
+<hkern u1="&#xbf;" u2="Z" k="104" />
+<hkern u1="&#xbf;" u2="Y" k="150" />
+<hkern u1="&#xbf;" u2="X" k="100" />
+<hkern u1="&#xbf;" u2="W" k="90" />
+<hkern u1="&#xbf;" u2="V" k="106" />
+<hkern u1="&#xbf;" u2="U" k="76" />
+<hkern u1="&#xbf;" u2="T" k="188" />
+<hkern u1="&#xbf;" u2="S" k="78" />
+<hkern u1="&#xbf;" u2="R" k="78" />
+<hkern u1="&#xbf;" u2="Q" k="72" />
+<hkern u1="&#xbf;" u2="P" k="78" />
+<hkern u1="&#xbf;" u2="O" k="72" />
+<hkern u1="&#xbf;" u2="N" k="78" />
+<hkern u1="&#xbf;" u2="M" k="78" />
+<hkern u1="&#xbf;" u2="L" k="78" />
+<hkern u1="&#xbf;" u2="K" k="78" />
+<hkern u1="&#xbf;" u2="J" k="45" />
+<hkern u1="&#xbf;" u2="I" k="78" />
+<hkern u1="&#xbf;" u2="H" k="78" />
+<hkern u1="&#xbf;" u2="G" k="72" />
+<hkern u1="&#xbf;" u2="F" k="78" />
+<hkern u1="&#xbf;" u2="E" k="78" />
+<hkern u1="&#xbf;" u2="D" k="78" />
+<hkern u1="&#xbf;" u2="C" k="74" />
+<hkern u1="&#xbf;" u2="B" k="78" />
+<hkern u1="&#xbf;" u2="A" k="109" />
+<hkern u1="&#xc0;" u2="&#x2122;" k="98" />
+<hkern u1="&#xc0;" u2="&#xf0;" k="10" />
+<hkern u1="&#xc0;" u2="&#xae;" k="63" />
+<hkern u1="&#xc0;" u2="&#x7d;" k="68" />
+<hkern u1="&#xc0;" u2="v" k="41" />
+<hkern u1="&#xc0;" u2="f" k="14" />
+<hkern u1="&#xc0;" u2="]" k="78" />
+<hkern u1="&#xc0;" u2="\" k="102" />
+<hkern u1="&#xc0;" u2="V" k="59" />
+<hkern u1="&#xc0;" u2="&#x3f;" k="66" />
+<hkern u1="&#xc0;" u2="&#x2a;" k="86" />
+<hkern u1="&#xc1;" u2="&#x2122;" k="98" />
+<hkern u1="&#xc1;" u2="&#xf0;" k="10" />
+<hkern u1="&#xc1;" u2="&#xae;" k="63" />
+<hkern u1="&#xc1;" u2="&#x7d;" k="68" />
+<hkern u1="&#xc1;" u2="v" k="41" />
+<hkern u1="&#xc1;" u2="f" k="14" />
+<hkern u1="&#xc1;" u2="]" k="78" />
+<hkern u1="&#xc1;" u2="\" k="102" />
+<hkern u1="&#xc1;" u2="V" k="59" />
+<hkern u1="&#xc1;" u2="&#x3f;" k="66" />
+<hkern u1="&#xc1;" u2="&#x2a;" k="86" />
+<hkern u1="&#xc2;" u2="&#x2122;" k="98" />
+<hkern u1="&#xc2;" u2="&#xf0;" k="10" />
+<hkern u1="&#xc2;" u2="&#xae;" k="63" />
+<hkern u1="&#xc2;" u2="&#x7d;" k="68" />
+<hkern u1="&#xc2;" u2="v" k="41" />
+<hkern u1="&#xc2;" u2="f" k="14" />
+<hkern u1="&#xc2;" u2="]" k="78" />
+<hkern u1="&#xc2;" u2="\" k="102" />
+<hkern u1="&#xc2;" u2="V" k="59" />
+<hkern u1="&#xc2;" u2="&#x3f;" k="66" />
+<hkern u1="&#xc2;" u2="&#x2a;" k="86" />
+<hkern u1="&#xc3;" u2="&#x2122;" k="98" />
+<hkern u1="&#xc3;" u2="&#xf0;" k="10" />
+<hkern u1="&#xc3;" u2="&#xae;" k="63" />
+<hkern u1="&#xc3;" u2="&#x7d;" k="68" />
+<hkern u1="&#xc3;" u2="v" k="41" />
+<hkern u1="&#xc3;" u2="f" k="14" />
+<hkern u1="&#xc3;" u2="]" k="78" />
+<hkern u1="&#xc3;" u2="\" k="102" />
+<hkern u1="&#xc3;" u2="V" k="59" />
+<hkern u1="&#xc3;" u2="&#x3f;" k="66" />
+<hkern u1="&#xc3;" u2="&#x2a;" k="86" />
+<hkern u1="&#xc4;" u2="&#x2122;" k="98" />
+<hkern u1="&#xc4;" u2="&#xf0;" k="10" />
+<hkern u1="&#xc4;" u2="&#xae;" k="63" />
+<hkern u1="&#xc4;" u2="&#x7d;" k="68" />
+<hkern u1="&#xc4;" u2="v" k="41" />
+<hkern u1="&#xc4;" u2="f" k="14" />
+<hkern u1="&#xc4;" u2="]" k="78" />
+<hkern u1="&#xc4;" u2="\" k="102" />
+<hkern u1="&#xc4;" u2="V" k="59" />
+<hkern u1="&#xc4;" u2="&#x3f;" k="66" />
+<hkern u1="&#xc4;" u2="&#x2a;" k="86" />
+<hkern u1="&#xc5;" u2="&#x2122;" k="98" />
+<hkern u1="&#xc5;" u2="&#xf0;" k="10" />
+<hkern u1="&#xc5;" u2="&#xae;" k="63" />
+<hkern u1="&#xc5;" u2="&#x7d;" k="68" />
+<hkern u1="&#xc5;" u2="v" k="41" />
+<hkern u1="&#xc5;" u2="f" k="14" />
+<hkern u1="&#xc5;" u2="]" k="78" />
+<hkern u1="&#xc5;" u2="\" k="102" />
+<hkern u1="&#xc5;" u2="V" k="59" />
+<hkern u1="&#xc5;" u2="&#x3f;" k="66" />
+<hkern u1="&#xc5;" u2="&#x2a;" k="86" />
+<hkern u1="&#xc6;" u2="&#xf0;" k="18" />
+<hkern u1="&#xc6;" u2="&#xec;" k="-66" />
+<hkern u1="&#xc6;" u2="v" k="39" />
+<hkern u1="&#xc6;" u2="f" k="10" />
+<hkern u1="&#xc7;" u2="&#xf0;" k="16" />
+<hkern u1="&#xc7;" u2="&#xec;" k="-51" />
+<hkern u1="&#xc7;" u2="&#xae;" k="43" />
+<hkern u1="&#xc7;" u2="v" k="47" />
+<hkern u1="&#xc7;" u2="f" k="12" />
+<hkern u1="&#xc8;" u2="&#xf0;" k="18" />
+<hkern u1="&#xc8;" u2="&#xec;" k="-66" />
+<hkern u1="&#xc8;" u2="v" k="39" />
+<hkern u1="&#xc8;" u2="f" k="10" />
+<hkern u1="&#xc9;" u2="&#xf0;" k="18" />
+<hkern u1="&#xc9;" u2="&#xec;" k="-66" />
+<hkern u1="&#xc9;" u2="v" k="39" />
+<hkern u1="&#xc9;" u2="f" k="10" />
+<hkern u1="&#xca;" u2="&#xf0;" k="18" />
+<hkern u1="&#xca;" u2="&#xec;" k="-66" />
+<hkern u1="&#xca;" u2="v" k="39" />
+<hkern u1="&#xca;" u2="f" k="10" />
+<hkern u1="&#xcb;" u2="&#xf0;" k="18" />
+<hkern u1="&#xcb;" u2="&#xec;" k="-66" />
+<hkern u1="&#xcb;" u2="v" k="39" />
+<hkern u1="&#xcb;" u2="f" k="10" />
+<hkern u1="&#xd0;" u2="&#xc6;" k="41" />
+<hkern u1="&#xd0;" u2="&#x7d;" k="72" />
+<hkern u1="&#xd0;" u2="x" k="10" />
+<hkern u1="&#xd0;" u2="]" k="74" />
+<hkern u1="&#xd0;" u2="X" k="47" />
+<hkern u1="&#xd0;" u2="V" k="27" />
+<hkern u1="&#xd0;" u2="&#x3f;" k="31" />
+<hkern u1="&#xd0;" u2="&#x29;" k="23" />
+<hkern u1="&#xd2;" u2="&#xc6;" k="35" />
+<hkern u1="&#xd2;" u2="&#x7d;" k="68" />
+<hkern u1="&#xd2;" u2="]" k="70" />
+<hkern u1="&#xd2;" u2="X" k="43" />
+<hkern u1="&#xd2;" u2="V" k="27" />
+<hkern u1="&#xd2;" u2="&#x3f;" k="25" />
+<hkern u1="&#xd3;" u2="&#xc6;" k="35" />
+<hkern u1="&#xd3;" u2="&#x7d;" k="68" />
+<hkern u1="&#xd3;" u2="]" k="70" />
+<hkern u1="&#xd3;" u2="X" k="43" />
+<hkern u1="&#xd3;" u2="V" k="27" />
+<hkern u1="&#xd3;" u2="&#x3f;" k="25" />
+<hkern u1="&#xd4;" u2="&#xc6;" k="35" />
+<hkern u1="&#xd4;" u2="&#x7d;" k="68" />
+<hkern u1="&#xd4;" u2="]" k="70" />
+<hkern u1="&#xd4;" u2="X" k="43" />
+<hkern u1="&#xd4;" u2="V" k="27" />
+<hkern u1="&#xd4;" u2="&#x3f;" k="25" />
+<hkern u1="&#xd5;" u2="&#xc6;" k="35" />
+<hkern u1="&#xd5;" u2="&#x7d;" k="68" />
+<hkern u1="&#xd5;" u2="]" k="70" />
+<hkern u1="&#xd5;" u2="X" k="43" />
+<hkern u1="&#xd5;" u2="V" k="27" />
+<hkern u1="&#xd5;" u2="&#x3f;" k="25" />
+<hkern u1="&#xd6;" u2="&#xc6;" k="35" />
+<hkern u1="&#xd6;" u2="&#x7d;" k="68" />
+<hkern u1="&#xd6;" u2="]" k="70" />
+<hkern u1="&#xd6;" u2="X" k="43" />
+<hkern u1="&#xd6;" u2="V" k="27" />
+<hkern u1="&#xd6;" u2="&#x3f;" k="25" />
+<hkern u1="&#xd8;" u2="&#xc6;" k="35" />
+<hkern u1="&#xd8;" u2="&#x7d;" k="68" />
+<hkern u1="&#xd8;" u2="]" k="70" />
+<hkern u1="&#xd8;" u2="X" k="43" />
+<hkern u1="&#xd8;" u2="V" k="27" />
+<hkern u1="&#xd8;" u2="&#x3f;" k="25" />
+<hkern u1="&#xd9;" u2="&#xc6;" k="23" />
+<hkern u1="&#xda;" u2="&#xc6;" k="23" />
+<hkern u1="&#xdb;" u2="&#xc6;" k="23" />
+<hkern u1="&#xdc;" u2="&#xc6;" k="23" />
+<hkern u1="&#xdd;" u2="&#xff;" k="82" />
+<hkern u1="&#xdd;" u2="&#xf0;" k="98" />
+<hkern u1="&#xdd;" u2="&#xef;" k="-55" />
+<hkern u1="&#xdd;" u2="&#xec;" k="-135" />
+<hkern u1="&#xdd;" u2="&#xeb;" k="145" />
+<hkern u1="&#xdd;" u2="&#xe4;" k="135" />
+<hkern u1="&#xdd;" u2="&#xe3;" k="135" />
+<hkern u1="&#xdd;" u2="&#xc6;" k="96" />
+<hkern u1="&#xdd;" u2="&#xae;" k="49" />
+<hkern u1="&#xdd;" u2="x" k="90" />
+<hkern u1="&#xdd;" u2="v" k="94" />
+<hkern u1="&#xdd;" u2="f" k="31" />
+<hkern u1="&#xdd;" u2="&#x40;" k="76" />
+<hkern u1="&#xdd;" u2="&#x2f;" k="131" />
+<hkern u1="&#xdd;" u2="&#x26;" k="88" />
+<hkern u1="&#xde;" u2="&#x2122;" k="20" />
+<hkern u1="&#xde;" u2="&#x2026;" k="82" />
+<hkern u1="&#xde;" u2="&#x201e;" k="82" />
+<hkern u1="&#xde;" u2="&#x201a;" k="82" />
+<hkern u1="&#xde;" u2="&#x178;" k="86" />
+<hkern u1="&#xde;" u2="&#xdd;" k="86" />
+<hkern u1="&#xde;" u2="&#xc6;" k="53" />
+<hkern u1="&#xde;" u2="&#xc5;" k="43" />
+<hkern u1="&#xde;" u2="&#xc4;" k="43" />
+<hkern u1="&#xde;" u2="&#xc3;" k="43" />
+<hkern u1="&#xde;" u2="&#xc2;" k="43" />
+<hkern u1="&#xde;" u2="&#xc1;" k="43" />
+<hkern u1="&#xde;" u2="&#xc0;" k="43" />
+<hkern u1="&#xde;" u2="&#x7d;" k="84" />
+<hkern u1="&#xde;" u2="]" k="86" />
+<hkern u1="&#xde;" u2="\" k="29" />
+<hkern u1="&#xde;" u2="Z" k="59" />
+<hkern u1="&#xde;" u2="Y" k="86" />
+<hkern u1="&#xde;" u2="X" k="92" />
+<hkern u1="&#xde;" u2="W" k="14" />
+<hkern u1="&#xde;" u2="V" k="35" />
+<hkern u1="&#xde;" u2="T" k="141" />
+<hkern u1="&#xde;" u2="J" k="70" />
+<hkern u1="&#xde;" u2="A" k="43" />
+<hkern u1="&#xde;" u2="&#x3f;" k="59" />
+<hkern u1="&#xde;" u2="&#x2f;" k="33" />
+<hkern u1="&#xde;" u2="&#x2e;" k="82" />
+<hkern u1="&#xde;" u2="&#x2c;" k="82" />
+<hkern u1="&#xde;" u2="&#x29;" k="29" />
+<hkern u1="&#xdf;" u2="&#x2122;" k="27" />
+<hkern u1="&#xdf;" u2="&#x201d;" k="33" />
+<hkern u1="&#xdf;" u2="&#x201c;" k="33" />
+<hkern u1="&#xdf;" u2="&#x2019;" k="33" />
+<hkern u1="&#xdf;" u2="&#x2018;" k="33" />
+<hkern u1="&#xdf;" u2="&#x178;" k="92" />
+<hkern u1="&#xdf;" u2="&#xff;" k="39" />
+<hkern u1="&#xdf;" u2="&#xfd;" k="39" />
+<hkern u1="&#xdf;" u2="&#xdd;" k="92" />
+<hkern u1="&#xdf;" u2="&#xc6;" k="10" />
+<hkern u1="&#xdf;" u2="&#xae;" k="27" />
+<hkern u1="&#xdf;" u2="&#x7d;" k="57" />
+<hkern u1="&#xdf;" u2="z" k="8" />
+<hkern u1="&#xdf;" u2="y" k="39" />
+<hkern u1="&#xdf;" u2="x" k="27" />
+<hkern u1="&#xdf;" u2="w" k="31" />
+<hkern u1="&#xdf;" u2="v" k="39" />
+<hkern u1="&#xdf;" u2="t" k="23" />
+<hkern u1="&#xdf;" u2="s" k="8" />
+<hkern u1="&#xdf;" u2="g" k="12" />
+<hkern u1="&#xdf;" u2="f" k="10" />
+<hkern u1="&#xdf;" u2="]" k="57" />
+<hkern u1="&#xdf;" u2="\" k="35" />
+<hkern u1="&#xdf;" u2="Y" k="92" />
+<hkern u1="&#xdf;" u2="X" k="12" />
+<hkern u1="&#xdf;" u2="W" k="45" />
+<hkern u1="&#xdf;" u2="V" k="68" />
+<hkern u1="&#xdf;" u2="T" k="80" />
+<hkern u1="&#xdf;" u2="S" k="18" />
+<hkern u1="&#xdf;" u2="J" k="70" />
+<hkern u1="&#xdf;" u2="&#x3f;" k="31" />
+<hkern u1="&#xdf;" u2="&#x2a;" k="35" />
+<hkern u1="&#xdf;" u2="&#x27;" k="31" />
+<hkern u1="&#xdf;" u2="&#x22;" k="31" />
+<hkern u1="&#xe0;" u2="&#x2122;" k="20" />
+<hkern u1="&#xe0;" u2="&#x7d;" k="31" />
+<hkern u1="&#xe0;" u2="v" k="8" />
+<hkern u1="&#xe0;" u2="]" k="39" />
+<hkern u1="&#xe0;" u2="\" k="61" />
+<hkern u1="&#xe0;" u2="V" k="47" />
+<hkern u1="&#xe0;" u2="&#x3f;" k="33" />
+<hkern u1="&#xe1;" u2="&#x2122;" k="20" />
+<hkern u1="&#xe1;" u2="&#x7d;" k="31" />
+<hkern u1="&#xe1;" u2="v" k="8" />
+<hkern u1="&#xe1;" u2="]" k="39" />
+<hkern u1="&#xe1;" u2="\" k="61" />
+<hkern u1="&#xe1;" u2="V" k="47" />
+<hkern u1="&#xe1;" u2="&#x3f;" k="33" />
+<hkern u1="&#xe2;" u2="&#x2122;" k="20" />
+<hkern u1="&#xe2;" u2="&#x7d;" k="31" />
+<hkern u1="&#xe2;" u2="v" k="8" />
+<hkern u1="&#xe2;" u2="]" k="39" />
+<hkern u1="&#xe2;" u2="\" k="61" />
+<hkern u1="&#xe2;" u2="V" k="47" />
+<hkern u1="&#xe2;" u2="&#x3f;" k="33" />
+<hkern u1="&#xe3;" u2="&#x2122;" k="20" />
+<hkern u1="&#xe3;" u2="&#x7d;" k="31" />
+<hkern u1="&#xe3;" u2="v" k="8" />
+<hkern u1="&#xe3;" u2="]" k="39" />
+<hkern u1="&#xe3;" u2="\" k="61" />
+<hkern u1="&#xe3;" u2="V" k="47" />
+<hkern u1="&#xe3;" u2="&#x3f;" k="33" />
+<hkern u1="&#xe4;" u2="&#x2122;" k="20" />
+<hkern u1="&#xe4;" u2="&#x7d;" k="31" />
+<hkern u1="&#xe4;" u2="v" k="8" />
+<hkern u1="&#xe4;" u2="]" k="39" />
+<hkern u1="&#xe4;" u2="\" k="61" />
+<hkern u1="&#xe4;" u2="V" k="47" />
+<hkern u1="&#xe4;" u2="&#x3f;" k="33" />
+<hkern u1="&#xe5;" u2="&#x2122;" k="20" />
+<hkern u1="&#xe5;" u2="&#x7d;" k="31" />
+<hkern u1="&#xe5;" u2="v" k="8" />
+<hkern u1="&#xe5;" u2="]" k="39" />
+<hkern u1="&#xe5;" u2="\" k="61" />
+<hkern u1="&#xe5;" u2="V" k="47" />
+<hkern u1="&#xe5;" u2="&#x3f;" k="33" />
+<hkern u1="&#xe6;" u2="&#x2122;" k="31" />
+<hkern u1="&#xe6;" u2="&#xc6;" k="10" />
+<hkern u1="&#xe6;" u2="&#x7d;" k="80" />
+<hkern u1="&#xe6;" u2="x" k="14" />
+<hkern u1="&#xe6;" u2="v" k="18" />
+<hkern u1="&#xe6;" u2="]" k="84" />
+<hkern u1="&#xe6;" u2="\" k="66" />
+<hkern u1="&#xe6;" u2="V" k="72" />
+<hkern u1="&#xe6;" u2="&#x3f;" k="53" />
+<hkern u1="&#xe7;" u2="&#xf0;" k="29" />
+<hkern u1="&#xe7;" u2="&#x7d;" k="55" />
+<hkern u1="&#xe7;" u2="]" k="66" />
+<hkern u1="&#xe7;" u2="V" k="25" />
+<hkern u1="&#xe7;" u2="&#x3f;" k="31" />
+<hkern u1="&#xe8;" u2="&#x2122;" k="31" />
+<hkern u1="&#xe8;" u2="&#xc6;" k="10" />
+<hkern u1="&#xe8;" u2="&#x7d;" k="80" />
+<hkern u1="&#xe8;" u2="x" k="14" />
+<hkern u1="&#xe8;" u2="v" k="18" />
+<hkern u1="&#xe8;" u2="]" k="84" />
+<hkern u1="&#xe8;" u2="\" k="66" />
+<hkern u1="&#xe8;" u2="V" k="72" />
+<hkern u1="&#xe8;" u2="&#x3f;" k="53" />
+<hkern u1="&#xe9;" u2="&#x2122;" k="31" />
+<hkern u1="&#xe9;" u2="&#xc6;" k="10" />
+<hkern u1="&#xe9;" u2="&#x7d;" k="80" />
+<hkern u1="&#xe9;" u2="x" k="14" />
+<hkern u1="&#xe9;" u2="v" k="18" />
+<hkern u1="&#xe9;" u2="]" k="84" />
+<hkern u1="&#xe9;" u2="\" k="66" />
+<hkern u1="&#xe9;" u2="V" k="72" />
+<hkern u1="&#xe9;" u2="&#x3f;" k="53" />
+<hkern u1="&#xea;" u2="&#x2122;" k="31" />
+<hkern u1="&#xea;" u2="&#xc6;" k="10" />
+<hkern u1="&#xea;" u2="&#x7d;" k="80" />
+<hkern u1="&#xea;" u2="x" k="14" />
+<hkern u1="&#xea;" u2="v" k="18" />
+<hkern u1="&#xea;" u2="]" k="84" />
+<hkern u1="&#xea;" u2="\" k="66" />
+<hkern u1="&#xea;" u2="V" k="72" />
+<hkern u1="&#xea;" u2="&#x3f;" k="53" />
+<hkern u1="&#xeb;" u2="&#x2122;" k="31" />
+<hkern u1="&#xeb;" u2="&#xc6;" k="10" />
+<hkern u1="&#xeb;" u2="&#x7d;" k="80" />
+<hkern u1="&#xeb;" u2="x" k="14" />
+<hkern u1="&#xeb;" u2="v" k="18" />
+<hkern u1="&#xeb;" u2="]" k="84" />
+<hkern u1="&#xeb;" u2="\" k="66" />
+<hkern u1="&#xeb;" u2="V" k="72" />
+<hkern u1="&#xeb;" u2="&#x3f;" k="53" />
+<hkern u1="&#xed;" u2="&#x7d;" k="-66" />
+<hkern u1="&#xed;" u2="]" k="-63" />
+<hkern u1="&#xed;" u2="\" k="-82" />
+<hkern u1="&#xed;" u2="&#x3f;" k="-47" />
+<hkern u1="&#xed;" u2="&#x29;" k="-47" />
+<hkern u1="&#xed;" u2="&#x27;" k="-14" />
+<hkern u1="&#xed;" u2="&#x22;" k="-14" />
+<hkern u1="&#xee;" u2="&#x2a;" k="-18" />
+<hkern u1="&#xef;" u2="\" k="-20" />
+<hkern u1="&#xf0;" u2="&#x2122;" k="23" />
+<hkern u1="&#xf0;" u2="&#x2026;" k="31" />
+<hkern u1="&#xf0;" u2="&#x201e;" k="31" />
+<hkern u1="&#xf0;" u2="&#x201d;" k="18" />
+<hkern u1="&#xf0;" u2="&#x201c;" k="16" />
+<hkern u1="&#xf0;" u2="&#x201a;" k="31" />
+<hkern u1="&#xf0;" u2="&#x2019;" k="18" />
+<hkern u1="&#xf0;" u2="&#x2018;" k="16" />
+<hkern u1="&#xf0;" u2="&#x178;" k="98" />
+<hkern u1="&#xf0;" u2="&#xff;" k="16" />
+<hkern u1="&#xf0;" u2="&#xfd;" k="16" />
+<hkern u1="&#xf0;" u2="&#xde;" k="10" />
+<hkern u1="&#xf0;" u2="&#xdd;" k="98" />
+<hkern u1="&#xf0;" u2="&#xd1;" k="10" />
+<hkern u1="&#xf0;" u2="&#xd0;" k="10" />
+<hkern u1="&#xf0;" u2="&#xcf;" k="10" />
+<hkern u1="&#xf0;" u2="&#xce;" k="10" />
+<hkern u1="&#xf0;" u2="&#xcd;" k="10" />
+<hkern u1="&#xf0;" u2="&#xcc;" k="10" />
+<hkern u1="&#xf0;" u2="&#xcb;" k="10" />
+<hkern u1="&#xf0;" u2="&#xca;" k="10" />
+<hkern u1="&#xf0;" u2="&#xc9;" k="10" />
+<hkern u1="&#xf0;" u2="&#xc8;" k="10" />
+<hkern u1="&#xf0;" u2="&#xc6;" k="23" />
+<hkern u1="&#xf0;" u2="&#xc5;" k="18" />
+<hkern u1="&#xf0;" u2="&#xc4;" k="18" />
+<hkern u1="&#xf0;" u2="&#xc3;" k="18" />
+<hkern u1="&#xf0;" u2="&#xc2;" k="18" />
+<hkern u1="&#xf0;" u2="&#xc1;" k="18" />
+<hkern u1="&#xf0;" u2="&#xc0;" k="18" />
+<hkern u1="&#xf0;" u2="&#x7d;" k="53" />
+<hkern u1="&#xf0;" u2="y" k="16" />
+<hkern u1="&#xf0;" u2="x" k="12" />
+<hkern u1="&#xf0;" u2="w" k="14" />
+<hkern u1="&#xf0;" u2="v" k="14" />
+<hkern u1="&#xf0;" u2="]" k="55" />
+<hkern u1="&#xf0;" u2="\" k="39" />
+<hkern u1="&#xf0;" u2="Z" k="27" />
+<hkern u1="&#xf0;" u2="Y" k="98" />
+<hkern u1="&#xf0;" u2="X" k="59" />
+<hkern u1="&#xf0;" u2="W" k="29" />
+<hkern u1="&#xf0;" u2="V" k="53" />
+<hkern u1="&#xf0;" u2="T" k="143" />
+<hkern u1="&#xf0;" u2="S" k="12" />
+<hkern u1="&#xf0;" u2="R" k="10" />
+<hkern u1="&#xf0;" u2="P" k="10" />
+<hkern u1="&#xf0;" u2="N" k="10" />
+<hkern u1="&#xf0;" u2="M" k="10" />
+<hkern u1="&#xf0;" u2="L" k="10" />
+<hkern u1="&#xf0;" u2="K" k="10" />
+<hkern u1="&#xf0;" u2="J" k="72" />
+<hkern u1="&#xf0;" u2="I" k="10" />
+<hkern u1="&#xf0;" u2="H" k="10" />
+<hkern u1="&#xf0;" u2="F" k="10" />
+<hkern u1="&#xf0;" u2="E" k="10" />
+<hkern u1="&#xf0;" u2="D" k="10" />
+<hkern u1="&#xf0;" u2="B" k="10" />
+<hkern u1="&#xf0;" u2="A" k="18" />
+<hkern u1="&#xf0;" u2="&#x3f;" k="43" />
+<hkern u1="&#xf0;" u2="&#x2e;" k="31" />
+<hkern u1="&#xf0;" u2="&#x2c;" k="31" />
+<hkern u1="&#xf0;" u2="&#x29;" k="27" />
+<hkern u1="&#xf1;" u2="&#x2122;" k="35" />
+<hkern u1="&#xf1;" u2="&#x7d;" k="82" />
+<hkern u1="&#xf1;" u2="v" k="12" />
+<hkern u1="&#xf1;" u2="]" k="88" />
+<hkern u1="&#xf1;" u2="\" k="68" />
+<hkern u1="&#xf1;" u2="V" k="63" />
+<hkern u1="&#xf1;" u2="&#x3f;" k="55" />
+<hkern u1="&#xf2;" u2="&#x2122;" k="33" />
+<hkern u1="&#xf2;" u2="&#xc6;" k="14" />
+<hkern u1="&#xf2;" u2="&#x7d;" k="88" />
+<hkern u1="&#xf2;" u2="x" k="29" />
+<hkern u1="&#xf2;" u2="v" k="20" />
+<hkern u1="&#xf2;" u2="]" k="94" />
+<hkern u1="&#xf2;" u2="\" k="72" />
+<hkern u1="&#xf2;" u2="X" k="35" />
+<hkern u1="&#xf2;" u2="V" k="70" />
+<hkern u1="&#xf2;" u2="&#x3f;" k="59" />
+<hkern u1="&#xf2;" u2="&#x29;" k="35" />
+<hkern u1="&#xf3;" u2="&#x2122;" k="33" />
+<hkern u1="&#xf3;" u2="&#xc6;" k="14" />
+<hkern u1="&#xf3;" u2="&#x7d;" k="88" />
+<hkern u1="&#xf3;" u2="x" k="29" />
+<hkern u1="&#xf3;" u2="v" k="20" />
+<hkern u1="&#xf3;" u2="]" k="94" />
+<hkern u1="&#xf3;" u2="\" k="72" />
+<hkern u1="&#xf3;" u2="X" k="35" />
+<hkern u1="&#xf3;" u2="V" k="70" />
+<hkern u1="&#xf3;" u2="&#x3f;" k="59" />
+<hkern u1="&#xf3;" u2="&#x29;" k="35" />
+<hkern u1="&#xf4;" u2="&#x2122;" k="33" />
+<hkern u1="&#xf4;" u2="&#xc6;" k="14" />
+<hkern u1="&#xf4;" u2="&#x7d;" k="88" />
+<hkern u1="&#xf4;" u2="x" k="29" />
+<hkern u1="&#xf4;" u2="v" k="20" />
+<hkern u1="&#xf4;" u2="]" k="94" />
+<hkern u1="&#xf4;" u2="\" k="72" />
+<hkern u1="&#xf4;" u2="X" k="35" />
+<hkern u1="&#xf4;" u2="V" k="70" />
+<hkern u1="&#xf4;" u2="&#x3f;" k="59" />
+<hkern u1="&#xf4;" u2="&#x29;" k="35" />
+<hkern u1="&#xf5;" u2="&#x2122;" k="33" />
+<hkern u1="&#xf5;" u2="&#xc6;" k="14" />
+<hkern u1="&#xf5;" u2="&#x7d;" k="88" />
+<hkern u1="&#xf5;" u2="x" k="29" />
+<hkern u1="&#xf5;" u2="v" k="20" />
+<hkern u1="&#xf5;" u2="]" k="94" />
+<hkern u1="&#xf5;" u2="\" k="72" />
+<hkern u1="&#xf5;" u2="X" k="35" />
+<hkern u1="&#xf5;" u2="V" k="70" />
+<hkern u1="&#xf5;" u2="&#x3f;" k="59" />
+<hkern u1="&#xf5;" u2="&#x29;" k="35" />
+<hkern u1="&#xf6;" u2="&#x2122;" k="33" />
+<hkern u1="&#xf6;" u2="&#xc6;" k="14" />
+<hkern u1="&#xf6;" u2="&#x7d;" k="88" />
+<hkern u1="&#xf6;" u2="x" k="29" />
+<hkern u1="&#xf6;" u2="v" k="20" />
+<hkern u1="&#xf6;" u2="]" k="94" />
+<hkern u1="&#xf6;" u2="\" k="72" />
+<hkern u1="&#xf6;" u2="X" k="35" />
+<hkern u1="&#xf6;" u2="V" k="70" />
+<hkern u1="&#xf6;" u2="&#x3f;" k="59" />
+<hkern u1="&#xf6;" u2="&#x29;" k="35" />
+<hkern u1="&#xf8;" u2="&#x2122;" k="33" />
+<hkern u1="&#xf8;" u2="&#xc6;" k="14" />
+<hkern u1="&#xf8;" u2="&#x7d;" k="88" />
+<hkern u1="&#xf8;" u2="x" k="29" />
+<hkern u1="&#xf8;" u2="v" k="20" />
+<hkern u1="&#xf8;" u2="]" k="94" />
+<hkern u1="&#xf8;" u2="\" k="72" />
+<hkern u1="&#xf8;" u2="X" k="35" />
+<hkern u1="&#xf8;" u2="V" k="70" />
+<hkern u1="&#xf8;" u2="&#x3f;" k="59" />
+<hkern u1="&#xf8;" u2="&#x29;" k="35" />
+<hkern u1="&#xf9;" u2="&#x2122;" k="27" />
+<hkern u1="&#xf9;" u2="&#x7d;" k="78" />
+<hkern u1="&#xf9;" u2="]" k="86" />
+<hkern u1="&#xf9;" u2="\" k="41" />
+<hkern u1="&#xf9;" u2="V" k="61" />
+<hkern u1="&#xf9;" u2="&#x3f;" k="43" />
+<hkern u1="&#xfa;" u2="&#x2122;" k="27" />
+<hkern u1="&#xfa;" u2="&#x7d;" k="78" />
+<hkern u1="&#xfa;" u2="]" k="86" />
+<hkern u1="&#xfa;" u2="\" k="41" />
+<hkern u1="&#xfa;" u2="V" k="61" />
+<hkern u1="&#xfa;" u2="&#x3f;" k="43" />
+<hkern u1="&#xfb;" u2="&#x2122;" k="27" />
+<hkern u1="&#xfb;" u2="&#x7d;" k="78" />
+<hkern u1="&#xfb;" u2="]" k="86" />
+<hkern u1="&#xfb;" u2="\" k="41" />
+<hkern u1="&#xfb;" u2="V" k="61" />
+<hkern u1="&#xfb;" u2="&#x3f;" k="43" />
+<hkern u1="&#xfc;" u2="&#x2122;" k="27" />
+<hkern u1="&#xfc;" u2="&#x7d;" k="78" />
+<hkern u1="&#xfc;" u2="]" k="86" />
+<hkern u1="&#xfc;" u2="\" k="41" />
+<hkern u1="&#xfc;" u2="V" k="61" />
+<hkern u1="&#xfc;" u2="&#x3f;" k="43" />
+<hkern u1="&#xfd;" u2="&#xf0;" k="29" />
+<hkern u1="&#xfd;" u2="&#xc6;" k="47" />
+<hkern u1="&#xfd;" u2="&#x7d;" k="68" />
+<hkern u1="&#xfd;" u2="]" k="74" />
+<hkern u1="&#xfd;" u2="X" k="59" />
+<hkern u1="&#xfd;" u2="V" k="18" />
+<hkern u1="&#xfd;" u2="&#x3f;" k="31" />
+<hkern u1="&#xfd;" u2="&#x2f;" k="47" />
+<hkern u1="&#xfe;" u2="&#x2122;" k="37" />
+<hkern u1="&#xfe;" u2="&#xc6;" k="16" />
+<hkern u1="&#xfe;" u2="&#x7d;" k="88" />
+<hkern u1="&#xfe;" u2="x" k="29" />
+<hkern u1="&#xfe;" u2="v" k="18" />
+<hkern u1="&#xfe;" u2="]" k="92" />
+<hkern u1="&#xfe;" u2="\" k="68" />
+<hkern u1="&#xfe;" u2="X" k="39" />
+<hkern u1="&#xfe;" u2="V" k="70" />
+<hkern u1="&#xfe;" u2="&#x3f;" k="63" />
+<hkern u1="&#xfe;" u2="&#x2a;" k="16" />
+<hkern u1="&#xfe;" u2="&#x29;" k="35" />
+<hkern u1="&#xff;" u2="&#xf0;" k="29" />
+<hkern u1="&#xff;" u2="&#xc6;" k="47" />
+<hkern u1="&#xff;" u2="&#x7d;" k="68" />
+<hkern u1="&#xff;" u2="]" k="74" />
+<hkern u1="&#xff;" u2="X" k="59" />
+<hkern u1="&#xff;" u2="V" k="18" />
+<hkern u1="&#xff;" u2="&#x3f;" k="31" />
+<hkern u1="&#xff;" u2="&#x2f;" k="47" />
+<hkern u1="&#x152;" u2="&#xf0;" k="18" />
+<hkern u1="&#x152;" u2="&#xec;" k="-66" />
+<hkern u1="&#x152;" u2="v" k="39" />
+<hkern u1="&#x152;" u2="f" k="10" />
+<hkern u1="&#x153;" u2="&#x2122;" k="31" />
+<hkern u1="&#x153;" u2="&#xc6;" k="10" />
+<hkern u1="&#x153;" u2="&#x7d;" k="80" />
+<hkern u1="&#x153;" u2="x" k="14" />
+<hkern u1="&#x153;" u2="v" k="18" />
+<hkern u1="&#x153;" u2="]" k="84" />
+<hkern u1="&#x153;" u2="\" k="66" />
+<hkern u1="&#x153;" u2="V" k="72" />
+<hkern u1="&#x153;" u2="&#x3f;" k="53" />
+<hkern u1="&#x178;" u2="&#xff;" k="82" />
+<hkern u1="&#x178;" u2="&#xf0;" k="98" />
+<hkern u1="&#x178;" u2="&#xef;" k="-55" />
+<hkern u1="&#x178;" u2="&#xec;" k="-135" />
+<hkern u1="&#x178;" u2="&#xeb;" k="145" />
+<hkern u1="&#x178;" u2="&#xe4;" k="135" />
+<hkern u1="&#x178;" u2="&#xe3;" k="135" />
+<hkern u1="&#x178;" u2="&#xc6;" k="96" />
+<hkern u1="&#x178;" u2="&#xae;" k="49" />
+<hkern u1="&#x178;" u2="x" k="90" />
+<hkern u1="&#x178;" u2="v" k="94" />
+<hkern u1="&#x178;" u2="f" k="31" />
+<hkern u1="&#x178;" u2="&#x40;" k="76" />
+<hkern u1="&#x178;" u2="&#x2f;" k="131" />
+<hkern u1="&#x178;" u2="&#x26;" k="88" />
+<hkern u1="&#x2013;" u2="&#xc6;" k="47" />
+<hkern u1="&#x2013;" u2="x" k="74" />
+<hkern u1="&#x2013;" u2="v" k="31" />
+<hkern u1="&#x2013;" u2="f" k="25" />
+<hkern u1="&#x2013;" u2="X" k="88" />
+<hkern u1="&#x2013;" u2="V" k="72" />
+<hkern u1="&#x2014;" u2="&#xc6;" k="47" />
+<hkern u1="&#x2014;" u2="x" k="74" />
+<hkern u1="&#x2014;" u2="v" k="31" />
+<hkern u1="&#x2014;" u2="f" k="25" />
+<hkern u1="&#x2014;" u2="X" k="88" />
+<hkern u1="&#x2014;" u2="V" k="72" />
+<hkern u1="&#x2018;" u2="&#xf0;" k="33" />
+<hkern u1="&#x2018;" u2="&#xec;" k="-53" />
+<hkern u1="&#x2018;" u2="&#xc6;" k="143" />
+<hkern u1="&#x2019;" u2="&#xf0;" k="33" />
+<hkern u1="&#x2019;" u2="&#xec;" k="-59" />
+<hkern u1="&#x2019;" u2="&#xc6;" k="145" />
+<hkern u1="&#x2019;" u2="&#x40;" k="49" />
+<hkern u1="&#x2019;" u2="&#x2f;" k="141" />
+<hkern u1="&#x2019;" u2="&#x26;" k="76" />
+<hkern u1="&#x201a;" u2="v" k="88" />
+<hkern u1="&#x201a;" u2="f" k="18" />
+<hkern u1="&#x201a;" u2="V" k="125" />
+<hkern u1="&#x201c;" u2="&#xf0;" k="33" />
+<hkern u1="&#x201c;" u2="&#xec;" k="-53" />
+<hkern u1="&#x201c;" u2="&#xc6;" k="143" />
+<hkern u1="&#x201d;" u2="&#xf0;" k="33" />
+<hkern u1="&#x201d;" u2="&#xec;" k="-59" />
+<hkern u1="&#x201d;" u2="&#xc6;" k="145" />
+<hkern u1="&#x201d;" u2="&#x40;" k="49" />
+<hkern u1="&#x201d;" u2="&#x2f;" k="141" />
+<hkern u1="&#x201d;" u2="&#x26;" k="76" />
+<hkern u1="&#x201e;" u2="v" k="88" />
+<hkern u1="&#x201e;" u2="f" k="18" />
+<hkern u1="&#x201e;" u2="V" k="125" />
+<hkern u1="&#x2039;" u2="V" k="51" />
+<hkern u1="&#x203a;" u2="&#xc6;" k="23" />
+<hkern u1="&#x203a;" u2="x" k="59" />
+<hkern u1="&#x203a;" u2="v" k="27" />
+<hkern u1="&#x203a;" u2="X" k="55" />
+<hkern u1="&#x203a;" u2="V" k="63" />
+<hkern u1="&#x2122;" u2="&#xee;" k="-16" />
+<hkern u1="&#x2122;" u2="&#xc6;" k="82" />
+<hkern u1="&#x2122;" u2="&#xc5;" k="66" />
+<hkern u1="&#x2122;" u2="&#xc4;" k="66" />
+<hkern u1="&#x2122;" u2="&#xc3;" k="66" />
+<hkern u1="&#x2122;" u2="&#xc2;" k="66" />
+<hkern u1="&#x2122;" u2="&#xc1;" k="66" />
+<hkern u1="&#x2122;" u2="&#xc0;" k="66" />
+<hkern u1="&#x2122;" u2="Z" k="16" />
+<hkern u1="&#x2122;" u2="J" k="59" />
+<hkern u1="&#x2122;" u2="A" k="66" />
+<hkern g1="C,Ccedilla" g2="C,Ccedilla" k="27" />
+<hkern g1="C,Ccedilla" g2="J" k="14" />
+<hkern g1="C,Ccedilla" g2="G,O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="29" />
+<hkern g1="C,Ccedilla" g2="d,q" k="25" />
+<hkern g1="C,Ccedilla" g2="g" k="35" />
+<hkern g1="C,Ccedilla" g2="guillemotleft,guilsinglleft" k="51" />
+<hkern g1="C,Ccedilla" g2="hyphen,endash,emdash" k="82" />
+<hkern g1="C,Ccedilla" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="25" />
+<hkern g1="C,Ccedilla" g2="t" k="18" />
+<hkern g1="C,Ccedilla" g2="w" k="45" />
+<hkern g1="C,Ccedilla" g2="y,yacute,ydieresis" k="45" />
+<hkern g1="C,Ccedilla" g2="guillemotright,guilsinglright" k="16" />
+<hkern g1="C,Ccedilla" g2="m,n,p,r,ntilde" k="14" />
+<hkern g1="C,Ccedilla" g2="u,ugrave,uacute,ucircumflex,udieresis" k="29" />
+<hkern g1="D,Eth" g2="J" k="59" />
+<hkern g1="D,Eth" g2="T" k="72" />
+<hkern g1="D,Eth" g2="W" k="10" />
+<hkern g1="D,Eth" g2="Y,Yacute,Ydieresis" k="63" />
+<hkern g1="D,Eth" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="33" />
+<hkern g1="D,Eth" g2="Z" k="25" />
+<hkern g1="D,Eth" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="51" />
+<hkern g1="E,AE,Egrave,Eacute,Ecircumflex,Edieresis,OE" g2="C,Ccedilla" k="20" />
+<hkern g1="E,AE,Egrave,Eacute,Ecircumflex,Edieresis,OE" g2="G,O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="20" />
+<hkern g1="E,AE,Egrave,Eacute,Ecircumflex,Edieresis,OE" g2="S" k="10" />
+<hkern g1="E,AE,Egrave,Eacute,Ecircumflex,Edieresis,OE" g2="d,q" k="25" />
+<hkern g1="E,AE,Egrave,Eacute,Ecircumflex,Edieresis,OE" g2="g" k="31" />
+<hkern g1="E,AE,Egrave,Eacute,Ecircumflex,Edieresis,OE" g2="guillemotleft,guilsinglleft" k="41" />
+<hkern g1="E,AE,Egrave,Eacute,Ecircumflex,Edieresis,OE" g2="hyphen,endash,emdash" k="51" />
+<hkern g1="E,AE,Egrave,Eacute,Ecircumflex,Edieresis,OE" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="23" />
+<hkern g1="E,AE,Egrave,Eacute,Ecircumflex,Edieresis,OE" g2="t" k="20" />
+<hkern g1="E,AE,Egrave,Eacute,Ecircumflex,Edieresis,OE" g2="w" k="35" />
+<hkern g1="E,AE,Egrave,Eacute,Ecircumflex,Edieresis,OE" g2="y,yacute,ydieresis" k="39" />
+<hkern g1="E,AE,Egrave,Eacute,Ecircumflex,Edieresis,OE" g2="u,ugrave,uacute,ucircumflex,udieresis" k="27" />
+<hkern g1="G" g2="J" k="33" />
+<hkern g1="G" g2="Y,Yacute,Ydieresis" k="35" />
+<hkern g1="G" g2="g" k="12" />
+<hkern g1="G" g2="t" k="18" />
+<hkern g1="G" g2="w" k="16" />
+<hkern g1="G" g2="y,yacute,ydieresis" k="18" />
+<hkern g1="H,I,M,N,Igrave,Iacute,Icircumflex,Idieresis,Ntilde" g2="J" k="20" />
+<hkern g1="H,I,M,N,Igrave,Iacute,Icircumflex,Idieresis,Ntilde" g2="d,q" k="10" />
+<hkern g1="H,I,M,N,Igrave,Iacute,Icircumflex,Idieresis,Ntilde" g2="g" k="20" />
+<hkern g1="H,I,M,N,Igrave,Iacute,Icircumflex,Idieresis,Ntilde" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="10" />
+<hkern g1="J" g2="d,q" k="10" />
+<hkern g1="J" g2="g" k="16" />
+<hkern g1="J" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="10" />
+<hkern g1="K" g2="C,Ccedilla" k="45" />
+<hkern g1="K" g2="G,O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="49" />
+<hkern g1="K" g2="d,q" k="29" />
+<hkern g1="K" g2="g" k="18" />
+<hkern g1="K" g2="guillemotleft,guilsinglleft" k="53" />
+<hkern g1="K" g2="hyphen,endash,emdash" k="88" />
+<hkern g1="K" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="29" />
+<hkern g1="K" g2="t" k="23" />
+<hkern g1="K" g2="w" k="57" />
+<hkern g1="K" g2="y,yacute,ydieresis" k="61" />
+<hkern g1="K" g2="u,ugrave,uacute,ucircumflex,udieresis" k="23" />
+<hkern g1="L" g2="C,Ccedilla" k="55" />
+<hkern g1="L" g2="G,O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="59" />
+<hkern g1="L" g2="T" k="219" />
+<hkern g1="L" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="39" />
+<hkern g1="L" g2="W" k="92" />
+<hkern g1="L" g2="Y,Yacute,Ydieresis" k="186" />
+<hkern g1="L" g2="d,q" k="18" />
+<hkern g1="L" g2="guillemotleft,guilsinglleft" k="133" />
+<hkern g1="L" g2="hyphen,endash,emdash" k="184" />
+<hkern g1="L" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="18" />
+<hkern g1="L" g2="quoteleft,quotedblleft" k="203" />
+<hkern g1="L" g2="quoteright,quotedblright" k="203" />
+<hkern g1="L" g2="quotedbl,quotesingle" k="203" />
+<hkern g1="L" g2="t" k="45" />
+<hkern g1="L" g2="w" k="96" />
+<hkern g1="L" g2="y,yacute,ydieresis" k="111" />
+<hkern g1="L" g2="guillemotright,guilsinglright" k="49" />
+<hkern g1="L" g2="u,ugrave,uacute,ucircumflex,udieresis" k="16" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="J" k="55" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="T" k="59" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="W" k="10" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="Y,Yacute,Ydieresis" k="59" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="29" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="Z" k="16" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="39" />
+<hkern g1="R" g2="J" k="16" />
+<hkern g1="R" g2="T" k="33" />
+<hkern g1="R" g2="Y,Yacute,Ydieresis" k="43" />
+<hkern g1="R" g2="d,q" k="20" />
+<hkern g1="R" g2="g" k="18" />
+<hkern g1="R" g2="guillemotleft,guilsinglleft" k="49" />
+<hkern g1="R" g2="hyphen,endash,emdash" k="35" />
+<hkern g1="R" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="18" />
+<hkern g1="R" g2="u,ugrave,uacute,ucircumflex,udieresis" k="10" />
+<hkern g1="R" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="12" />
+<hkern g1="S" g2="J" k="47" />
+<hkern g1="S" g2="Y,Yacute,Ydieresis" k="31" />
+<hkern g1="S" g2="g" k="16" />
+<hkern g1="S" g2="t" k="23" />
+<hkern g1="S" g2="w" k="23" />
+<hkern g1="S" g2="y,yacute,ydieresis" k="25" />
+<hkern g1="S" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="23" />
+<hkern g1="S" g2="z" k="10" />
+<hkern g1="T" g2="C,Ccedilla" k="49" />
+<hkern g1="T" g2="J" k="66" />
+<hkern g1="T" g2="G,O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="61" />
+<hkern g1="T" g2="d,q" k="217" />
+<hkern g1="T" g2="g" k="242" />
+<hkern g1="T" g2="guillemotleft,guilsinglleft" k="133" />
+<hkern g1="T" g2="hyphen,endash,emdash" k="141" />
+<hkern g1="T" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="217" />
+<hkern g1="T" g2="t" k="76" />
+<hkern g1="T" g2="w" k="166" />
+<hkern g1="T" g2="y,yacute,ydieresis" k="164" />
+<hkern g1="T" g2="guillemotright,guilsinglright" k="131" />
+<hkern g1="T" g2="m,n,p,r,ntilde" k="221" />
+<hkern g1="T" g2="u,ugrave,uacute,ucircumflex,udieresis" k="223" />
+<hkern g1="T" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="109" />
+<hkern g1="T" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="139" />
+<hkern g1="T" g2="z" k="197" />
+<hkern g1="T" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="205" />
+<hkern g1="T" g2="b,thorn" k="25" />
+<hkern g1="T" g2="colon,semicolon" k="121" />
+<hkern g1="T" g2="s" k="207" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="J" k="45" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="d,q" k="10" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="g" k="23" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="10" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="u,ugrave,uacute,ucircumflex,udieresis" k="10" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="16" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="29" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="s" k="10" />
+<hkern g1="W" g2="J" k="57" />
+<hkern g1="W" g2="d,q" k="45" />
+<hkern g1="W" g2="g" k="53" />
+<hkern g1="W" g2="guillemotleft,guilsinglleft" k="39" />
+<hkern g1="W" g2="hyphen,endash,emdash" k="45" />
+<hkern g1="W" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="43" />
+<hkern g1="W" g2="guillemotright,guilsinglright" k="27" />
+<hkern g1="W" g2="m,n,p,r,ntilde" k="33" />
+<hkern g1="W" g2="u,ugrave,uacute,ucircumflex,udieresis" k="29" />
+<hkern g1="W" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="49" />
+<hkern g1="W" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="84" />
+<hkern g1="W" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="31" />
+<hkern g1="W" g2="s" k="31" />
+<hkern g1="Y,Yacute,Ydieresis" g2="C,Ccedilla" k="57" />
+<hkern g1="Y,Yacute,Ydieresis" g2="J" k="102" />
+<hkern g1="Y,Yacute,Ydieresis" g2="G,O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="61" />
+<hkern g1="Y,Yacute,Ydieresis" g2="S" k="37" />
+<hkern g1="Y,Yacute,Ydieresis" g2="d,q" k="152" />
+<hkern g1="Y,Yacute,Ydieresis" g2="g" k="158" />
+<hkern g1="Y,Yacute,Ydieresis" g2="guillemotleft,guilsinglleft" k="147" />
+<hkern g1="Y,Yacute,Ydieresis" g2="hyphen,endash,emdash" k="156" />
+<hkern g1="Y,Yacute,Ydieresis" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="145" />
+<hkern g1="Y,Yacute,Ydieresis" g2="t" k="37" />
+<hkern g1="Y,Yacute,Ydieresis" g2="w" k="98" />
+<hkern g1="Y,Yacute,Ydieresis" g2="y,yacute,ydieresis" k="94" />
+<hkern g1="Y,Yacute,Ydieresis" g2="guillemotright,guilsinglright" k="121" />
+<hkern g1="Y,Yacute,Ydieresis" g2="m,n,p,r,ntilde" k="127" />
+<hkern g1="Y,Yacute,Ydieresis" g2="u,ugrave,uacute,ucircumflex,udieresis" k="131" />
+<hkern g1="Y,Yacute,Ydieresis" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="90" />
+<hkern g1="Y,Yacute,Ydieresis" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="158" />
+<hkern g1="Y,Yacute,Ydieresis" g2="z" k="98" />
+<hkern g1="Y,Yacute,Ydieresis" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="135" />
+<hkern g1="Y,Yacute,Ydieresis" g2="colon,semicolon" k="96" />
+<hkern g1="Y,Yacute,Ydieresis" g2="s" k="145" />
+<hkern g1="Z" g2="C,Ccedilla" k="16" />
+<hkern g1="Z" g2="G,O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="18" />
+<hkern g1="Z" g2="d,q" k="27" />
+<hkern g1="Z" g2="g" k="33" />
+<hkern g1="Z" g2="guillemotleft,guilsinglleft" k="53" />
+<hkern g1="Z" g2="hyphen,endash,emdash" k="82" />
+<hkern g1="Z" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="25" />
+<hkern g1="Z" g2="t" k="12" />
+<hkern g1="Z" g2="w" k="31" />
+<hkern g1="Z" g2="y,yacute,ydieresis" k="31" />
+<hkern g1="Z" g2="guillemotright,guilsinglright" k="16" />
+<hkern g1="Z" g2="m,n,p,r,ntilde" k="12" />
+<hkern g1="Z" g2="u,ugrave,uacute,ucircumflex,udieresis" k="27" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="T" k="176" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="W" k="23" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="Y,Yacute,Ydieresis" k="125" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="y,yacute,ydieresis" k="8" />
+<hkern g1="b,p,thorn" g2="J" k="74" />
+<hkern g1="b,p,thorn" g2="S" k="18" />
+<hkern g1="b,p,thorn" g2="T" k="219" />
+<hkern g1="b,p,thorn" g2="W" k="43" />
+<hkern g1="b,p,thorn" g2="Y,Yacute,Ydieresis" k="139" />
+<hkern g1="b,p,thorn" g2="quoteleft,quotedblleft" k="51" />
+<hkern g1="b,p,thorn" g2="quoteright,quotedblright" k="51" />
+<hkern g1="b,p,thorn" g2="quotedbl,quotesingle" k="37" />
+<hkern g1="b,p,thorn" g2="t" k="10" />
+<hkern g1="b,p,thorn" g2="w" k="16" />
+<hkern g1="b,p,thorn" g2="y,yacute,ydieresis" k="18" />
+<hkern g1="b,p,thorn" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="14" />
+<hkern g1="b,p,thorn" g2="Z" k="16" />
+<hkern g1="b,p,thorn" g2="z" k="10" />
+<hkern g1="b,p,thorn" g2="B,D,E,F,H,I,K,L,M,N,P,R,Egrave,Eacute,Ecircumflex,Edieresis,Igrave,Iacute,Icircumflex,Idieresis,Eth,Ntilde,Thorn" k="10" />
+<hkern g1="c,ccedilla" g2="J" k="23" />
+<hkern g1="c,ccedilla" g2="T" k="246" />
+<hkern g1="c,ccedilla" g2="Y,Yacute,Ydieresis" k="102" />
+<hkern g1="c,ccedilla" g2="d,q" k="18" />
+<hkern g1="c,ccedilla" g2="g" k="12" />
+<hkern g1="c,ccedilla" g2="guillemotleft,guilsinglleft" k="88" />
+<hkern g1="c,ccedilla" g2="hyphen,endash,emdash" k="115" />
+<hkern g1="c,ccedilla" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="16" />
+<hkern g1="c,ccedilla" g2="guillemotright,guilsinglright" k="23" />
+<hkern g1="colon,semicolon" g2="T" k="123" />
+<hkern g1="colon,semicolon" g2="Y,Yacute,Ydieresis" k="96" />
+<hkern g1="d" g2="J" k="57" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="J" k="51" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="S" k="14" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="T" k="213" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="W" k="39" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="Y,Yacute,Ydieresis" k="178" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="quoteleft,quotedblleft" k="33" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="quoteright,quotedblright" k="33" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="quotedbl,quotesingle" k="31" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="t" k="10" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="w" k="16" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="y,yacute,ydieresis" k="18" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="Z" k="10" />
+<hkern g1="g" g2="T" k="182" />
+<hkern g1="g" g2="Y,Yacute,Ydieresis" k="66" />
+<hkern g1="g" g2="hyphen,endash,emdash" k="27" />
+<hkern g1="guillemotleft,guilsinglleft" g2="J" k="61" />
+<hkern g1="guillemotleft,guilsinglleft" g2="T" k="133" />
+<hkern g1="guillemotleft,guilsinglleft" g2="W" k="27" />
+<hkern g1="guillemotleft,guilsinglleft" g2="Y,Yacute,Ydieresis" k="121" />
+<hkern g1="guillemotleft,guilsinglleft" g2="quoteright,quotedblright" k="121" />
+<hkern g1="guillemotleft,guilsinglleft" g2="quotedbl,quotesingle" k="125" />
+<hkern g1="guillemotleft,guilsinglleft" g2="t" k="27" />
+<hkern g1="guillemotright,guilsinglright" g2="J" k="63" />
+<hkern g1="guillemotright,guilsinglright" g2="S" k="51" />
+<hkern g1="guillemotright,guilsinglright" g2="T" k="133" />
+<hkern g1="guillemotright,guilsinglright" g2="W" k="39" />
+<hkern g1="guillemotright,guilsinglright" g2="Y,Yacute,Ydieresis" k="147" />
+<hkern g1="guillemotright,guilsinglright" g2="quoteright,quotedblright" k="182" />
+<hkern g1="guillemotright,guilsinglright" g2="quotedbl,quotesingle" k="188" />
+<hkern g1="guillemotright,guilsinglright" g2="t" k="25" />
+<hkern g1="guillemotright,guilsinglright" g2="w" k="20" />
+<hkern g1="guillemotright,guilsinglright" g2="y,yacute,ydieresis" k="27" />
+<hkern g1="guillemotright,guilsinglright" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="16" />
+<hkern g1="guillemotright,guilsinglright" g2="Z" k="39" />
+<hkern g1="guillemotright,guilsinglright" g2="z" k="72" />
+<hkern g1="hyphen,endash,emdash" g2="J" k="76" />
+<hkern g1="hyphen,endash,emdash" g2="S" k="68" />
+<hkern g1="hyphen,endash,emdash" g2="T" k="141" />
+<hkern g1="hyphen,endash,emdash" g2="W" k="45" />
+<hkern g1="hyphen,endash,emdash" g2="Y,Yacute,Ydieresis" k="156" />
+<hkern g1="hyphen,endash,emdash" g2="quoteright,quotedblright" k="160" />
+<hkern g1="hyphen,endash,emdash" g2="quotedbl,quotesingle" k="170" />
+<hkern g1="hyphen,endash,emdash" g2="t" k="39" />
+<hkern g1="hyphen,endash,emdash" g2="w" k="27" />
+<hkern g1="hyphen,endash,emdash" g2="y,yacute,ydieresis" k="33" />
+<hkern g1="hyphen,endash,emdash" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="33" />
+<hkern g1="hyphen,endash,emdash" g2="Z" k="68" />
+<hkern g1="hyphen,endash,emdash" g2="z" k="104" />
+<hkern g1="hyphen,endash,emdash" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="29" />
+<hkern g1="i,j,igrave,iacute,icircumflex,idieresis" g2="J" k="57" />
+<hkern g1="k" g2="C,Ccedilla" k="10" />
+<hkern g1="k" g2="G,O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="12" />
+<hkern g1="k" g2="T" k="182" />
+<hkern g1="k" g2="Y,Yacute,Ydieresis" k="90" />
+<hkern g1="k" g2="d,q" k="33" />
+<hkern g1="k" g2="g" k="25" />
+<hkern g1="k" g2="guillemotleft,guilsinglleft" k="66" />
+<hkern g1="k" g2="hyphen,endash,emdash" k="92" />
+<hkern g1="k" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="33" />
+<hkern g1="k" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="10" />
+<hkern g1="l" g2="J" k="57" />
+<hkern g1="h,m,n,ntilde" g2="J" k="61" />
+<hkern g1="h,m,n,ntilde" g2="S" k="12" />
+<hkern g1="h,m,n,ntilde" g2="T" k="227" />
+<hkern g1="h,m,n,ntilde" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="10" />
+<hkern g1="h,m,n,ntilde" g2="W" k="39" />
+<hkern g1="h,m,n,ntilde" g2="Y,Yacute,Ydieresis" k="145" />
+<hkern g1="h,m,n,ntilde" g2="quoteleft,quotedblleft" k="27" />
+<hkern g1="h,m,n,ntilde" g2="quoteright,quotedblright" k="29" />
+<hkern g1="h,m,n,ntilde" g2="quotedbl,quotesingle" k="29" />
+<hkern g1="h,m,n,ntilde" g2="t" k="10" />
+<hkern g1="h,m,n,ntilde" g2="w" k="10" />
+<hkern g1="h,m,n,ntilde" g2="y,yacute,ydieresis" k="12" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="J" k="74" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="S" k="18" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="T" k="221" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="10" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="W" k="43" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="Y,Yacute,Ydieresis" k="145" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="quoteleft,quotedblleft" k="35" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="quoteright,quotedblright" k="37" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="quotedbl,quotesingle" k="35" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="t" k="12" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="w" k="18" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="y,yacute,ydieresis" k="20" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="12" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="Z" k="14" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="z" k="10" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="B,D,E,F,H,I,K,L,M,N,P,R,Egrave,Eacute,Ecircumflex,Edieresis,Igrave,Iacute,Icircumflex,Idieresis,Eth,Ntilde,Thorn" k="10" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="C,Ccedilla" k="39" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="G,O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="39" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="T" k="139" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="29" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="W" k="84" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="Y,Yacute,Ydieresis" k="158" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="hyphen,endash,emdash" k="115" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="quoteleft,quotedblleft" k="328" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="quoteright,quotedblright" k="328" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="quotedbl,quotesingle" k="332" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="t" k="45" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="w" k="74" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="y,yacute,ydieresis" k="88" />
+<hkern g1="quoteleft,quotedblleft" g2="J" k="61" />
+<hkern g1="quoteleft,quotedblleft" g2="G,O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="16" />
+<hkern g1="quoteleft,quotedblleft" g2="d,q" k="80" />
+<hkern g1="quoteleft,quotedblleft" g2="g" k="41" />
+<hkern g1="quoteleft,quotedblleft" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="49" />
+<hkern g1="quoteleft,quotedblleft" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="121" />
+<hkern g1="quoteleft,quotedblleft" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="344" />
+<hkern g1="quoteleft,quotedblleft" g2="s" k="33" />
+<hkern g1="quoteright,quotedblright" g2="C,Ccedilla" k="16" />
+<hkern g1="quoteright,quotedblright" g2="J" k="61" />
+<hkern g1="quoteright,quotedblright" g2="G,O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="18" />
+<hkern g1="quoteright,quotedblright" g2="d,q" k="82" />
+<hkern g1="quoteright,quotedblright" g2="g" k="43" />
+<hkern g1="quoteright,quotedblright" g2="guillemotleft,guilsinglleft" k="207" />
+<hkern g1="quoteright,quotedblright" g2="hyphen,endash,emdash" k="176" />
+<hkern g1="quoteright,quotedblright" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="51" />
+<hkern g1="quoteright,quotedblright" g2="guillemotright,guilsinglright" k="139" />
+<hkern g1="quoteright,quotedblright" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="121" />
+<hkern g1="quoteright,quotedblright" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="346" />
+<hkern g1="quoteright,quotedblright" g2="s" k="35" />
+<hkern g1="quotedbl,quotesingle" g2="J" k="61" />
+<hkern g1="quotedbl,quotesingle" g2="d,q" k="49" />
+<hkern g1="quotedbl,quotesingle" g2="g" k="29" />
+<hkern g1="quotedbl,quotesingle" g2="guillemotleft,guilsinglleft" k="188" />
+<hkern g1="quotedbl,quotesingle" g2="hyphen,endash,emdash" k="172" />
+<hkern g1="quotedbl,quotesingle" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="35" />
+<hkern g1="quotedbl,quotesingle" g2="guillemotright,guilsinglright" k="125" />
+<hkern g1="quotedbl,quotesingle" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="106" />
+<hkern g1="quotedbl,quotesingle" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="334" />
+<hkern g1="quotedbl,quotesingle" g2="s" k="18" />
+<hkern g1="r" g2="J" k="76" />
+<hkern g1="r" g2="T" k="176" />
+<hkern g1="r" g2="Y,Yacute,Ydieresis" k="51" />
+<hkern g1="r" g2="d,q" k="43" />
+<hkern g1="r" g2="g" k="23" />
+<hkern g1="r" g2="guillemotleft,guilsinglleft" k="109" />
+<hkern g1="r" g2="hyphen,endash,emdash" k="123" />
+<hkern g1="r" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="35" />
+<hkern g1="r" g2="guillemotright,guilsinglright" k="76" />
+<hkern g1="r" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="80" />
+<hkern g1="r" g2="Z" k="43" />
+<hkern g1="r" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="119" />
+<hkern g1="s" g2="J" k="74" />
+<hkern g1="s" g2="T" k="207" />
+<hkern g1="s" g2="W" k="27" />
+<hkern g1="s" g2="Y,Yacute,Ydieresis" k="123" />
+<hkern g1="s" g2="g" k="16" />
+<hkern g1="s" g2="hyphen,endash,emdash" k="33" />
+<hkern g1="s" g2="w" k="14" />
+<hkern g1="s" g2="y,yacute,ydieresis" k="16" />
+<hkern g1="t" g2="T" k="190" />
+<hkern g1="t" g2="Y,Yacute,Ydieresis" k="53" />
+<hkern g1="t" g2="guillemotleft,guilsinglleft" k="88" />
+<hkern g1="t" g2="hyphen,endash,emdash" k="80" />
+<hkern g1="t" g2="guillemotright,guilsinglright" k="59" />
+<hkern g1="q,u,ugrave,uacute,ucircumflex,udieresis" g2="J" k="57" />
+<hkern g1="q,u,ugrave,uacute,ucircumflex,udieresis" g2="T" k="225" />
+<hkern g1="q,u,ugrave,uacute,ucircumflex,udieresis" g2="W" k="33" />
+<hkern g1="q,u,ugrave,uacute,ucircumflex,udieresis" g2="Y,Yacute,Ydieresis" k="127" />
+<hkern g1="w" g2="J" k="70" />
+<hkern g1="w" g2="T" k="168" />
+<hkern g1="w" g2="Y,Yacute,Ydieresis" k="98" />
+<hkern g1="w" g2="d,q" k="18" />
+<hkern g1="w" g2="g" k="18" />
+<hkern g1="w" g2="guillemotleft,guilsinglleft" k="20" />
+<hkern g1="w" g2="hyphen,endash,emdash" k="27" />
+<hkern g1="w" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="18" />
+<hkern g1="w" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="37" />
+<hkern g1="w" g2="Z" k="41" />
+<hkern g1="w" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="74" />
+<hkern g1="w" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="16" />
+<hkern g1="w" g2="s" k="12" />
+<hkern g1="y,yacute,ydieresis" g2="J" k="72" />
+<hkern g1="y,yacute,ydieresis" g2="T" k="162" />
+<hkern g1="y,yacute,ydieresis" g2="Y,Yacute,Ydieresis" k="92" />
+<hkern g1="y,yacute,ydieresis" g2="d,q" k="20" />
+<hkern g1="y,yacute,ydieresis" g2="g" k="20" />
+<hkern g1="y,yacute,ydieresis" g2="guillemotleft,guilsinglleft" k="27" />
+<hkern g1="y,yacute,ydieresis" g2="hyphen,endash,emdash" k="33" />
+<hkern g1="y,yacute,ydieresis" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="20" />
+<hkern g1="y,yacute,ydieresis" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="41" />
+<hkern g1="y,yacute,ydieresis" g2="Z" k="43" />
+<hkern g1="y,yacute,ydieresis" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="88" />
+<hkern g1="y,yacute,ydieresis" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="18" />
+<hkern g1="y,yacute,ydieresis" g2="s" k="14" />
+<hkern g1="z" g2="J" k="23" />
+<hkern g1="z" g2="T" k="197" />
+<hkern g1="z" g2="W" k="10" />
+<hkern g1="z" g2="Y,Yacute,Ydieresis" k="106" />
+<hkern g1="z" g2="d,q" k="12" />
+<hkern g1="z" g2="g" k="8" />
+<hkern g1="z" g2="guillemotleft,guilsinglleft" k="72" />
+<hkern g1="z" g2="hyphen,endash,emdash" k="88" />
+<hkern g1="z" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="10" />
+</font>
+</defs></svg> \ No newline at end of file
diff --git a/admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/fonts/titillium/titilliumweb-extralight-webfont.ttf b/admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/fonts/titillium/titilliumweb-extralight-webfont.ttf
new file mode 100644
index 0000000..e0b6ec3
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/fonts/titillium/titilliumweb-extralight-webfont.ttf
Binary files differ
diff --git a/admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/fonts/titillium/titilliumweb-extralight-webfont.woff b/admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/fonts/titillium/titilliumweb-extralight-webfont.woff
new file mode 100644
index 0000000..0f297db
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/fonts/titillium/titilliumweb-extralight-webfont.woff
Binary files differ
diff --git a/admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/fonts/titillium/titilliumweb-regular-webfont.eot b/admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/fonts/titillium/titilliumweb-regular-webfont.eot
new file mode 100644
index 0000000..5c9e81a
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/fonts/titillium/titilliumweb-regular-webfont.eot
Binary files differ
diff --git a/admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/fonts/titillium/titilliumweb-regular-webfont.svg b/admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/fonts/titillium/titilliumweb-regular-webfont.svg
new file mode 100644
index 0000000..539b912
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/fonts/titillium/titilliumweb-regular-webfont.svg
@@ -0,0 +1,2725 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
+<svg xmlns="http://www.w3.org/2000/svg">
+<metadata></metadata>
+<defs>
+<font id="titillium_webregular" horiz-adv-x="1146" >
+<font-face units-per-em="2048" ascent="1638" descent="-410" />
+<missing-glyph horiz-adv-x="450" />
+<glyph horiz-adv-x="2048" />
+<glyph horiz-adv-x="2048" />
+<glyph unicode="&#xd;" horiz-adv-x="681" />
+<glyph unicode=" " horiz-adv-x="450" />
+<glyph unicode="&#x09;" horiz-adv-x="450" />
+<glyph unicode="&#xa0;" horiz-adv-x="450" />
+<glyph unicode="!" horiz-adv-x="505" d="M170 0v229h168v-229h-168zM172 1417h162l-10 -950h-142z" />
+<glyph unicode="&#x22;" horiz-adv-x="763" d="M135 1417h154l-8 -454h-138zM475 1417h154l-8 -454h-138z" />
+<glyph unicode="#" d="M49 356v131h227v381h-227v131h227v365h140v-365h315v365h139v-365h228v-131h-228v-381h228v-131h-228v-356h-139v356h-315v-356h-140v356h-227zM416 487h315v381h-315v-381z" />
+<glyph unicode="$" d="M141 1010q0 362 434 362q31 0 48 -2l34 264h105l-35 -270l256 -31l-12 -127q-141 16 -260 27l-62 -477q199 -47 281 -121t82 -238q0 -416 -432 -415h-31l-29 -236q-104 6 -104 14l28 228l-292 37l16 125q158 -23 293 -31l67 512q-209 49 -298 126t-89 253zM293 1018 q0 -111 55 -158t199 -82l59 461h-20q-293 0 -293 -221zM567 115h4q289 0 289 272q0 98 -51 145.5t-178 77.5z" />
+<glyph unicode="%" d="M57 1090q0 282 225.5 282t225.5 -282q0 -145 -59.5 -217t-166 -72t-166 71.5t-59.5 217.5zM182 1090q0 -184 101.5 -184.5t101.5 184.5q0 92 -23.5 135t-78 43t-78 -43t-23.5 -135zM317 -8l420 1403l99 -33l-420 -1399zM641 270q0 281 224.5 281t224.5 -283 q0 -143 -59.5 -215.5t-166 -72.5t-165 72.5t-58.5 217.5zM764 270q0 -186 100 -186q57 0 80 45t23 139t-22.5 136t-78 42t-79 -42t-23.5 -134z" />
+<glyph unicode="&#x26;" horiz-adv-x="1409" d="M86 396.5q0 195.5 75 286.5t242 146q-72 82 -94 145.5t-22 160.5q0 137 94 219t266 82t261 -82t89 -226.5t-71.5 -227.5t-243.5 -163l311 -307q45 131 58 332l149 -2q-27 -256 -94 -426l264 -250l-92 -102l-248 231q-141 -233 -428 -233t-401.5 110.5t-114.5 306z M242 414q0 -295 336 -295q252 0 346 184l-432 430q-135 -43 -192.5 -110.5t-57.5 -208.5zM440 1110q0 -125 92 -223l60 -58q141 61 196.5 121t55.5 164q0 188 -202 188.5t-202 -192.5z" />
+<glyph unicode="'" horiz-adv-x="425" d="M137 1417h154l-10 -454h-138z" />
+<glyph unicode="(" horiz-adv-x="540" d="M104 616q0 197 53.5 427.5t106.5 361.5l53 131h148q-72 -188 -133.5 -465.5t-61.5 -453t49.5 -393.5t98.5 -349l47 -131h-148q-213 479 -213 872z" />
+<glyph unicode=")" horiz-adv-x="540" d="M76 -256q70 164 132 431t62 442.5t-48 404.5t-97 371l-49 143h147q136 -305 191 -653q23 -143 22.5 -303t-53.5 -378t-107 -337l-53 -121h-147z" />
+<glyph unicode="*" horiz-adv-x="860" d="M111 938l221 162l-217 157l63 86l217 -159l84 258l101 -33l-82 -260h266v-102h-270l84 -256l-101 -31l-84 258l-219 -162z" />
+<glyph unicode="+" d="M113 444v140h387v399h143v-399h391v-140h-391v-403h-143v403h-387z" />
+<glyph unicode="," horiz-adv-x="456" d="M70 -252l94 471h170l-137 -471h-127z" />
+<glyph unicode="-" horiz-adv-x="897" d="M139 492v143h621v-143h-621z" />
+<glyph unicode="." horiz-adv-x="442" d="M137 0v233h168v-233h-168z" />
+<glyph unicode="/" horiz-adv-x="843" d="M66 20l577 1430l137 -51l-577 -1428z" />
+<glyph unicode="0" d="M80 667q0 386 121.5 546.5t369.5 160.5q168 0 273 -63q221 -131 221 -656q0 -371 -123 -523t-368.5 -152t-369.5 150.5t-124 536.5zM244 653q0 -303 79.5 -418.5t249.5 -115.5t250 116.5t80 433t-77 440.5t-253 124q-117 0 -184 -49q-145 -100 -145 -531z" />
+<glyph unicode="1" d="M219 1065l430 287h148v-1352h-158v1176l-348 -230z" />
+<glyph unicode="2" d="M141 0v133l396 416q102 106 149 161.5t85 131.5t38 151q0 131 -71.5 184.5t-223.5 53.5q-133 0 -297 -35l-53 -10l-12 131q195 55 401.5 55t312 -87t105.5 -275q0 -143 -63.5 -250t-219.5 -256l-360 -367h678v-137h-865z" />
+<glyph unicode="3" d="M127 35l14 129q221 -45 414 -45q293 2 293 262q0 244 -279 254h-272v135h272q86 0 166 68.5t80 181.5t-63.5 163t-212.5 50q-164 0 -324 -31l-53 -10l-15 125q193 57 413 57t318.5 -84t98.5 -268q0 -94 -25.5 -136t-41 -64.5t-40.5 -43.5q-45 -35 -71 -49l-23 -14 q119 -43 176.5 -109.5t57.5 -218.5q0 -207 -105.5 -307t-333.5 -100q-180 0 -381 40z" />
+<glyph unicode="4" d="M82 264v123l385 965h172l-391 -949h489v422h158v-422h172v-139h-172v-264h-158v264h-655z" />
+<glyph unicode="5" d="M129 41l18 125q236 -45 397 -45t242.5 83t81.5 232.5t-74.5 212t-211.5 62.5q-74 0 -155 -20.5t-124 -41.5l-43 -20l-108 20l36 703h789v-144h-658l-36 -440q158 84 317 84q430 0 430 -399q0 -229 -118.5 -350t-333.5 -121q-172 0 -381 45z" />
+<glyph unicode="6" d="M102 682q0 354 138.5 522t390.5 168q166 0 315 -24l55 -11l-14 -129q-184 25 -358 25t-268.5 -121t-94.5 -346l51 20q51 18 136.5 39t150.5 21q455 0 455 -420q0 -215 -124 -330.5t-349 -115.5q-483 0 -484 702zM264 627q2 -233 79 -370.5t234.5 -137.5t237.5 78.5 t80 223t-79 214.5t-222 70q-70 0 -153 -19.5t-130 -38.5z" />
+<glyph unicode="7" d="M158 1208v144h839v-207l-520 -1165l-149 47l510 1128v53h-680z" />
+<glyph unicode="8" d="M66 344q0 145 56 221t177 142q-111 55 -161 125.5t-50 191.5q0 172 128 261t353.5 89t357.5 -89t132 -263q0 -127 -51.5 -193.5t-173.5 -121.5q123 -55 184 -130t61 -210q0 -387 -506.5 -387t-506.5 364zM233 371q0 -248 339 -248t339 260q0 109 -60 161t-179 87h-215 q-113 -31 -168.5 -91t-55.5 -169zM256 1006q0 -90 49 -145.5t152 -92.5h215q111 35 165 90.5t54 145.5q0 227 -317.5 227t-317.5 -225z" />
+<glyph unicode="9" d="M84 924q0 207 127 327.5t342 120.5q248 0 368.5 -183t120.5 -538.5t-136 -513t-400 -157.5q-154 0 -318 28l-53 8l15 127q184 -24 356 -24q371 0 373 471q-205 -78 -353 -78q-442 0 -442 412zM248 924q0 -273 291 -273q125 0 288 56l54 18q-6 508 -328 508 q-143 0 -224 -83t-81 -226z" />
+<glyph unicode=":" horiz-adv-x="444" d="M137 0v233h168v-233h-168zM137 659v234h168v-234h-168z" />
+<glyph unicode=";" horiz-adv-x="507" d="M98 -252l92 471h172l-137 -471h-127zM180 659v234h166v-234h-166z" />
+<glyph unicode="&#x3c;" d="M125 446v136l852 415v-159l-694 -322l694 -328v-161z" />
+<glyph unicode="=" d="M131 254v141h885v-141h-885zM131 633v141h885v-141h-885z" />
+<glyph unicode="&#x3e;" d="M168 27v161l694 328l-694 322v159l852 -415v-136z" />
+<glyph unicode="?" horiz-adv-x="915" d="M76 1376q207 61 342 62q211 0 312 -77t101 -251q0 -133 -35.5 -201.5t-145 -160t-150.5 -145.5t-41 -120v-71h-129q-27 55 -27 124.5t47 130t151.5 150.5t139.5 143.5t35 148.5t-65.5 142t-207.5 47q-90 0 -264 -36l-53 -11zM307 2v229h168v-229h-168z" />
+<glyph unicode="@" horiz-adv-x="2000" d="M104 535q0 494 235.5 720t692.5 226t668 -210t211 -646v-27q0 -434 -137 -547q-49 -39 -99.5 -51t-115 -12t-110.5 12t-71 31q-49 37 -67 80q-201 -121 -357 -121q-76 0 -132 18.5t-113 69.5q-115 102 -115 399t93 427t323 130q88 0 198 -39l37 -14v33h154v-391 q0 -358 22 -426q10 -27 29.5 -49.5t42.5 -26.5t78 -4t93 26.5t64.5 135t26.5 319.5v29q0 379 -168 549t-558 170t-579.5 -194t-189.5 -629t180.5 -619.5t591.5 -184.5l293 21l6 -137q-193 -18 -299 -19q-238 0 -402.5 45t-285.5 154q-240 209 -240 752zM750 500 q0 -375 215 -375q88 0 299 94q-18 111 -19 354v285q-123 41 -211 41q-166 0 -225 -94t-59 -305z" />
+<glyph unicode="A" horiz-adv-x="1220" d="M49 0l389 1417h344l389 -1417h-155l-103 365h-606l-102 -365h-156zM342 506h537l-215 776h-107z" />
+<glyph unicode="B" horiz-adv-x="1261" d="M174 0v1417h514q211 0 316.5 -87t105.5 -273q0 -133 -46 -208t-136 -118q225 -78 225 -334q0 -213 -112.5 -305t-325.5 -92h-541zM332 139h377q139 0 211.5 58.5t72.5 205.5q0 78 -29.5 131.5t-78.5 75.5q-91 41 -187 41h-366v-512zM332 788h364q131 0 191.5 62.5 t60.5 188.5t-64.5 182.5t-201.5 56.5h-350v-490z" />
+<glyph unicode="C" horiz-adv-x="1114" d="M121 706.5q0 188.5 21.5 316.5t77.5 226.5t158.5 143.5t266.5 45t385 -45l-6 -133q-202 36 -360 36h-9q-225 0 -297.5 -134t-72.5 -457q0 -162 13 -260.5t52 -177.5t114 -112.5t219 -33.5t341 37l6 -135q-211 -43 -379 -43t-271.5 46t-159.5 143t-77.5 223t-21.5 314.5z " />
+<glyph unicode="D" horiz-adv-x="1320" d="M174 0v1417h506q346 0 459 -274q65 -156 65 -406v-8q0 -535 -266 -674q-106 -55 -258 -55h-506zM332 139h348q362 0 362 590q0 408 -182 508q-74 41 -180 41h-348v-1139z" />
+<glyph unicode="E" horiz-adv-x="1132" d="M174 0v1417h862v-139h-704v-490h581v-137h-581v-512h704v-139h-862z" />
+<glyph unicode="F" horiz-adv-x="1077" d="M174 0v1417h848v-139h-690v-553h583v-139h-583v-586h-158z" />
+<glyph unicode="G" horiz-adv-x="1261" d="M117 707.5q0 371.5 119.5 551t425.5 179.5q190 0 395 -41l69 -13l-6 -131q-254 43 -440 43q-236 0 -317.5 -136t-81.5 -452.5t81.5 -452.5t315.5 -136q143 0 293 28v437h-236v141h391v-696q-258 -49 -460 -49q-309 0 -429 178t-120 549.5z" />
+<glyph unicode="H" horiz-adv-x="1382" d="M174 0v1417h158v-635h721v635h155v-1417h-155v641h-721v-641h-158z" />
+<glyph unicode="I" horiz-adv-x="503" d="M174 0v1417h158v-1417h-158z" />
+<glyph unicode="J" horiz-adv-x="591" d="M37 -6q147 0 189 36t42 187v1200h156l2 -1222q0 -172 -57 -252q-47 -68 -187 -84q-55 -6 -145 -6v141z" />
+<glyph unicode="K" horiz-adv-x="1165" d="M174 0v1417h158v-659l233 8l363 651h180l-406 -712l428 -705h-186l-377 627l-235 -9v-618h-158z" />
+<glyph unicode="L" horiz-adv-x="980" d="M174 0v1417h158v-1276h622v-141h-780z" />
+<glyph unicode="M" horiz-adv-x="1720" d="M174 0v1417h285l401 -1198l402 1198h284v-1417h-157v1249h-29l-412 -1198h-176l-412 1198h-28v-1249h-158z" />
+<glyph unicode="N" horiz-adv-x="1384" d="M174 0v1417h295l543 -1278h43v1278h155v-1417h-288l-551 1278h-39v-1278h-158z" />
+<glyph unicode="O" horiz-adv-x="1351" d="M117 701.5q0 373.5 122.5 555t436 181.5t437.5 -180.5t124 -559.5t-121 -548.5t-439.5 -169.5t-439 174t-120.5 547.5zM279 702.5q0 -311.5 81.5 -447.5t316 -136t315.5 133t81 446.5t-84 456.5t-314.5 143t-313 -142t-82.5 -453.5z" />
+<glyph unicode="P" horiz-adv-x="1214" d="M174 0v1417h518q231 0 342 -112.5t111 -343.5q0 -484 -453 -484h-360v-477h-158zM332 616h358q293 0 293 345q0 164 -69.5 240.5t-223.5 76.5h-358v-662z" />
+<glyph unicode="Q" horiz-adv-x="1351" d="M117 701.5q0 373.5 122.5 555t436 181.5t437.5 -180.5t124 -555.5q0 -260 -53.5 -416.5t-182.5 -232.5l175 -280l-148 -70l-180 295q-68 -18 -172 -18q-317 0 -438 174t-121 547.5zM279 702.5q0 -311.5 81.5 -447.5t316 -136t315.5 132t81 446.5t-84 457.5t-314.5 143 t-313 -142t-82.5 -453.5z" />
+<glyph unicode="R" horiz-adv-x="1261" d="M174 0v1417h524q225 0 339 -104.5t114 -325.5q0 -328 -260 -412l272 -575h-174l-256 543h-401v-543h-158zM332 682h368q289 0 289 298t-291 298h-366v-596z" />
+<glyph unicode="S" horiz-adv-x="1110" d="M98 1059q0 381 457 381q150 0 358 -31l70 -10l-14 -133q-285 34 -404 34q-307 0 -307 -231q0 -129 70.5 -177t286.5 -96t306.5 -125t90.5 -253q0 -436 -453 -436q-150 0 -375 34l-73 11l16 131q279 -37 424 -37q303 0 303 285q0 115 -66.5 165t-248.5 84 q-240 51 -340.5 132t-100.5 272z" />
+<glyph unicode="T" horiz-adv-x="1077" d="M27 1276v141h1024v-141h-433v-1276h-155v1276h-436z" />
+<glyph unicode="U" horiz-adv-x="1318" d="M164 430v987h158v-991q0 -307 331 -307q172 0 259 72.5t87 234.5v991h156v-987q0 -238 -126 -344t-371.5 -106t-369.5 106.5t-124 343.5z" />
+<glyph unicode="V" horiz-adv-x="1191" d="M49 1417h164l326 -1278h114l326 1278h164l-371 -1417h-352z" />
+<glyph unicode="W" horiz-adv-x="1814" d="M61 1417h164l242 -1278h59l289 1266h184l289 -1266h60l241 1278h162l-287 -1417h-288l-269 1210l-268 -1210h-289z" />
+<glyph unicode="X" horiz-adv-x="1142" d="M39 0l438 694l-438 723h178l358 -606l361 606h170l-436 -719l436 -698h-178l-357 588l-362 -588h-170z" />
+<glyph unicode="Y" horiz-adv-x="1101" d="M20 1417h179l352 -663l352 663h178l-450 -821v-596h-158v596z" />
+<glyph unicode="Z" horiz-adv-x="1097" d="M88 -2v182l739 1053v45h-739v139h922v-184l-742 -1053v-41h742v-141h-922z" />
+<glyph unicode="[" horiz-adv-x="673" d="M162 -252v1786h430v-137h-275v-1512h275v-137h-430z" />
+<glyph unicode="\" horiz-adv-x="892" d="M61 1389l138 59l630 -1419l-137 -58z" />
+<glyph unicode="]" horiz-adv-x="673" d="M82 -115h274v1512h-274v137h430v-1786h-430v137z" />
+<glyph unicode="^" d="M119 653l379 699h137l391 -699h-164l-293 547l-286 -547h-164z" />
+<glyph unicode="_" horiz-adv-x="1294" d="M209 -188h876v-136h-876v136z" />
+<glyph unicode="`" horiz-adv-x="483" d="M-2 1384l53 132l443 -201l-43 -105z" />
+<glyph unicode="a" horiz-adv-x="1026" d="M82 288.5q0 149.5 75.5 220.5t237.5 87l322 31v88q0 104 -45 149t-123 45q-164 0 -340 -20l-64 -6l-6 116q225 45 399.5 45t253 -79.5t78.5 -249.5v-525q6 -76 119 -90l-6 -120q-162 0 -244 81q-182 -81 -364 -81h-4q-141 0 -215 79.5t-74 229zM240 297q0 -188 155 -188 q139 0 275 47l47 16v338l-303 -29q-92 -8 -133 -53t-41 -131z" />
+<glyph unicode="b" horiz-adv-x="1077" d="M147 2v1468h152v-497q156 71 301 71q207 0 290 -117.5t83 -412.5t-103.5 -414.5t-380.5 -119.5q-86 0 -284 16zM299 127q133 -10 188 -10q201 0 265.5 91t64.5 308t-51 304t-182 87q-119 0 -244 -45l-41 -14v-721z" />
+<glyph unicode="c" horiz-adv-x="892" d="M104 517q0 292 98.5 409.5t327.5 117.5q68 0 230 -24l49 -6l-6 -125q-164 18 -242 18q-174 0 -236.5 -83t-62.5 -307t58.5 -312t242.5 -88l242 18l6 -127q-184 -28 -279 -28h-6q-240 0 -331 122.5t-91 414.5z" />
+<glyph unicode="d" horiz-adv-x="1083" d="M102 482.5q0 297.5 99.5 429.5t328.5 132q119 0 252 -26v452h152v-1470h-152v70q-158 -90 -311 -90q-82 0 -143.5 20t-114.5 74q-111 111 -111 408.5zM260 504q0 -238 72 -320q33 -39 69.5 -53t95 -14t131 19.5t113.5 37.5l41 19v694q-126 24 -234 24h-9 q-156 0 -217.5 -99t-61.5 -308z" />
+<glyph unicode="e" horiz-adv-x="1034" d="M102 506q0 538 426 538h2q207 0 309.5 -115.5t102.5 -363.5l-8 -116h-676q0 -170 61.5 -252t214 -82t310.5 12l59 6l4 -121q-226 -32 -389 -32h-10q-221 0 -313.5 128t-92.5 398zM256 571h532q0 188 -60 266t-196.5 78t-205 -81.5t-70.5 -262.5z" />
+<glyph unicode="f" horiz-adv-x="677" d="M61 891v133h129v92q0 217 61.5 296t215.5 79l207 -14l-2 -127q-115 4 -189.5 4t-106.5 -49.5t-32 -190.5v-90h297v-133h-297v-891h-154v891h-129z" />
+<glyph unicode="g" horiz-adv-x="1052" d="M102 -172q0 84 37 136t125 118q-57 39 -57 141q0 35 51 129l18 33q-162 74 -161 309q0 350 383 350q98 0 182 -20l31 -6l303 8v-131l-195 4q68 -68 68 -205q0 -193 -95.5 -269.5t-299.5 -76.5q-55 0 -101 8q-37 -90 -37 -116q0 -63 39 -79t235.5 -16t282.5 -61t86 -241 q0 -324 -454 -324q-246 0 -343.5 66.5t-97.5 242.5zM254 -160q0 -109 60.5 -150.5t223 -41.5t233.5 45t71 150.5t-51.5 136t-200.5 30.5l-221 10q-68 -49 -91.5 -86t-23.5 -94zM268 694q0 -121 54.5 -172t179.5 -51t178 51t53 173t-53 173.5t-178 51.5t-179.5 -52.5 t-54.5 -173.5z" />
+<glyph unicode="h" horiz-adv-x="1099" d="M147 0v1470h154v-503q162 77 311 77h4q205 0 276 -110.5t71 -392.5v-541h-154v537q0 213 -42 291.5t-177 78.5q-129 0 -250 -47l-39 -14v-846h-154z" />
+<glyph unicode="i" horiz-adv-x="448" d="M147 0v1024h154v-1024h-154zM147 1255v179h154v-179h-154z" />
+<glyph unicode="j" horiz-adv-x="448" d="M-100 -338q160 92 205 157t45 208v997h151v-999q0 -188 -67.5 -282.5t-272.5 -199.5zM150 1255v179h151v-179h-151z" />
+<glyph unicode="k" horiz-adv-x="980" d="M147 0v1470h154v-868l160 8l293 414h174l-334 -471l348 -553h-174l-305 475l-162 -6v-469h-154z" />
+<glyph unicode="l" horiz-adv-x="473" d="M160 0v1470h153v-1470h-153z" />
+<glyph unicode="m" horiz-adv-x="1712" d="M147 0v1024h152v-72q154 92 299 92q190 0 266 -104q68 41 175.5 72.5t189.5 31.5q205 0 275.5 -109.5t70.5 -393.5v-541h-154v537q0 213 -41 291.5t-174 78.5q-68 0 -139.5 -19.5t-110.5 -37.5l-38 -19q26 -66 26 -283v-16v-532h-153v528q0 221 -40 300t-176 79 q-66 0 -134 -19.5t-105 -37.5l-35 -19v-831h-154z" />
+<glyph unicode="n" horiz-adv-x="1099" d="M147 0v1024h152v-72q166 92 317 92q205 0 276 -110.5t71 -392.5v-541h-152v537q0 213 -42 291.5t-179 78.5q-66 0 -138.5 -19.5t-111.5 -37.5l-39 -19v-831h-154z" />
+<glyph unicode="o" horiz-adv-x="1081" d="M102 514q0 281 100.5 405.5t339 124.5t338 -124.5t99.5 -405.5t-94 -407.5t-344 -126.5t-344.5 126.5t-94.5 407.5zM260 517q0 -224 54.5 -314t227.5 -90t226 89t53 314t-59.5 310t-220 85t-221 -85t-60.5 -309z" />
+<glyph unicode="p" horiz-adv-x="1079" d="M147 -455v1479h152v-74q156 94 307 94q195 0 283 -123.5t88 -408.5t-103.5 -408.5t-343.5 -123.5q-125 0 -229 22v-457h-154zM301 135q139 -22 215 -22h6q166 0 232.5 94t66.5 307t-60 303t-177 90q-61 0 -132 -20.5t-112 -40.5l-39 -21v-690z" />
+<glyph unicode="q" horiz-adv-x="1077" d="M102 510q0 289 106.5 411.5t377.5 122.5l342 -20v-1479h-152v502q-144 -67 -289 -67q-207 0 -296 120.5t-89 409.5zM258 509q0 -210 56.5 -301t189.5 -91q119 0 235 45l37 14v723q-127 12 -188 12q-193 0 -261.5 -96t-68.5 -306z" />
+<glyph unicode="r" horiz-adv-x="708" d="M147 0v1024h152v-139q178 123 375 162v-156q-86 -16 -179.5 -51t-142.5 -62l-51 -26v-752h-154z" />
+<glyph unicode="s" horiz-adv-x="952" d="M92 751.5q0 149.5 105.5 221t263.5 71.5q125 0 313 -28l57 -10l-4 -132q-227 33 -358 33q-223 0 -223 -155q0 -72 51 -101.5t233.5 -61.5t258 -89.5t75.5 -215t-101 -231t-296 -73.5q-127 0 -299 28l-62 10l9 134q233 -35 352 -35t181.5 38t62.5 127t-53.5 120.5 t-233.5 60.5t-256 84t-76 204.5z" />
+<glyph unicode="t" horiz-adv-x="718" d="M55 891v133h146v313h151v-313h326v-133h-326v-490q0 -176 25.5 -231t122.5 -55l182 12l10 -127q-137 -23 -209 -23q-160 0 -221 78t-61 297v539h-146z" />
+<glyph unicode="u" horiz-adv-x="1087" d="M137 489v535h154v-532q0 -223 39 -299t176 -76q68 0 137.5 19.5t106.5 37.5l36 19v831h154v-1024h-154v72q-154 -92 -303 -92q-209 0 -277.5 108.5t-68.5 400.5z" />
+<glyph unicode="v" horiz-adv-x="985" d="M51 1024h164l240 -891h75l248 891h158l-289 -1024h-307z" />
+<glyph unicode="w" horiz-adv-x="1560" d="M63 1024h154l207 -891h33l243 871h160l244 -871h35l204 891h154l-244 -1024h-256l-217 801l-217 -801h-256z" />
+<glyph unicode="x" horiz-adv-x="925" d="M45 0l322 512l-322 512h168l250 -401l250 401h168l-326 -508l324 -516h-168l-248 399l-250 -399h-168z" />
+<glyph unicode="y" horiz-adv-x="989" d="M51 1024h154l256 -891h67l258 891h154l-426 -1479h-154l134 455h-152z" />
+<glyph unicode="z" horiz-adv-x="931" d="M86 0v137l573 750h-573v137h760v-137l-574 -750h574v-137h-760z" />
+<glyph unicode="{" horiz-adv-x="720" d="M49 575v125q117 27 168 81.5t51 142.5l-14 262q0 188 87 270t296 90l2 -133q-135 -8 -185.5 -64t-50.5 -171l15 -252q0 -131 -44 -190.5t-171 -96.5q125 -37 170 -99.5t45 -191.5l-15 -237q0 -115 50.5 -173.5t185.5 -66.5l-4 -133q-207 8 -294 91t-87 267l14 250 q0 88 -51 142.5t-168 86.5z" />
+<glyph unicode="|" horiz-adv-x="471" d="M160 -455v1925h151v-1925h-151z" />
+<glyph unicode="}" horiz-adv-x="720" d="M82 -129q135 8 185 66.5t50 173.5l-14 237q0 129 45 191.5t170 99.5q-127 37 -171 96.5t-44 190.5l14 252q0 115 -50 171t-185 64l2 133q209 -8 296 -90t87 -270l-14 -262q0 -88 51 -142.5t168 -81.5v-125q-117 -33 -168 -87t-51 -142l14 -250q0 -184 -87 -267t-294 -91z " />
+<glyph unicode="~" d="M137 557q127 109 238 109q59 0 211.5 -62.5t191.5 -62.5q72 0 180 69l35 25l21 -125q-129 -111 -238 -111q-55 0 -209.5 63.5t-192.5 63.5t-91.5 -23.5t-87.5 -47.5l-35 -25z" />
+<glyph unicode="&#xa1;" horiz-adv-x="466" d="M147 795v229h168v-229h-168zM152 -393l10 950h141l10 -950h-161z" />
+<glyph unicode="&#xa2;" d="M207 503.5q0 227.5 89 333t273 115.5v242h133v-248q80 0 175 -18l32 -6l-6 -123q-162 14 -264 14q-152 0 -212 -68.5t-60 -236.5t60 -232.5t224 -64.5l254 14l6 -125q-123 -18 -209 -22v-244h-133v240q-190 10 -276 106t-86 323.5z" />
+<glyph unicode="&#xa3;" d="M164 0v135h174v586h-137v133h137v113q0 240 68.5 322.5t234.5 82.5q106 0 227 -24l45 -11l-2 -125q-164 23 -259 23t-130 -57.5t-35 -221.5v-102h351v-133h-351v-586h316l158 33l26 -131l-168 -37h-655z" />
+<glyph unicode="&#xa4;" d="M119 170l143 143q-59 92 -59 201t59 205l-143 143l108 109l144 -146q90 61 200.5 61.5t204.5 -61.5l144 146l108 -109l-145 -143q61 -94 61 -205t-61 -201l145 -143l-108 -109l-144 146q-94 -61 -204.5 -61.5t-200.5 61.5l-144 -146zM338 516q0 -96 69.5 -165.5 t166 -69.5t166 69.5t69.5 165.5t-69.5 166t-166 70t-166 -70t-69.5 -166z" />
+<glyph unicode="&#xa5;" d="M47 1352h176l352 -553l349 553h176l-350 -574h278v-133h-356l-17 -39v-139h375v-133h-375v-334h-157v334h-379v133h379v139l-17 39h-364v133h286z" />
+<glyph unicode="&#xa6;" horiz-adv-x="479" d="M164 319h151v-774h-151v774zM164 705v765h151v-765h-151z" />
+<glyph unicode="&#xa7;" horiz-adv-x="1021" d="M106 522q0 80 43.5 156t75.5 102q-90 66 -90 228q0 326 393 325q104 0 283 -26l53 -9l-8 -129q-223 31 -338 31t-174 -45t-59 -143.5t62.5 -136t236.5 -70.5t248.5 -92.5t74.5 -199.5t-90 -271q76 -66 76 -205q0 -344 -391 -344q-131 0 -297 24l-62 11l15 129 q223 -31 336 -31q252 0 251 203q0 92 -59 123.5t-239.5 65.5t-260.5 97.5t-80 206.5zM260 533.5q0 -78.5 51 -117.5t189.5 -64.5t199.5 -52.5q10 14 31 74.5t21 134.5t-52.5 110.5t-184.5 60t-187 46.5q-68 -113 -68 -191.5z" />
+<glyph unicode="&#xa8;" horiz-adv-x="483" d="M-25 1272v184h148v-184h-148zM385 1272v184h150v-184h-150z" />
+<glyph unicode="&#xa9;" horiz-adv-x="1320" d="M121 889.5q0 236.5 153.5 397.5t387 161t386 -163t152.5 -398.5t-151.5 -396t-385 -160.5t-388 161.5t-154.5 398zM211 888.5q0 -196.5 128 -332.5t320.5 -136t321.5 136t129 332.5t-129 334t-320.5 137.5t-320.5 -137.5t-129 -334zM428 888q0 169 54.5 245.5t187.5 76.5 q76 0 137 -14l20 -6l-8 -109q-78 12 -148.5 12.5t-94 -46t-23.5 -156t25.5 -159.5t97.5 -50l143 14l8 -106q-75 -25 -159 -25q-133 0 -186.5 77t-53.5 246z" />
+<glyph unicode="&#xaa;" horiz-adv-x="790" d="M111 920q0 164 196 176l180 12v45q0 45 -24.5 63.5t-75.5 18.5l-235 -14l-5 98q141 31 252 31t165 -45t54 -158v-281q18 -23 62 -35l-4 -100q-78 0 -111 12.5t-59 40.5q-113 -53 -207 -53t-141 51.5t-47 137.5zM246 922q0 -80 73 -80q59 0 144 26l24 9v137l-157 -10 q-45 -4 -64.5 -22.5t-19.5 -59.5z" />
+<glyph unicode="&#xab;" horiz-adv-x="1103" d="M92 446v123l387 293v-157l-254 -193l254 -215v-160zM578 446v123l389 293v-157l-256 -193l256 -215v-160z" />
+<glyph unicode="&#xac;" d="M133 561v139h877v-460h-144v321h-733z" />
+<glyph unicode="&#xad;" horiz-adv-x="897" d="M139 492v143h621v-143h-621z" />
+<glyph unicode="&#xae;" horiz-adv-x="1320" d="M121 889.5q0 236.5 153.5 397.5t387 161t386 -162t152.5 -398.5t-151.5 -397t-385 -160.5t-388 161.5t-154.5 398zM211 889.5q0 -195.5 129 -332.5t320.5 -137t320.5 136t129 332.5t-129 334t-320.5 137.5t-320.5 -137.5t-129 -333zM436 578v620h226q117 0 175 -45 t58 -135t-23.5 -134t-80.5 -71l112 -235h-125l-102 219h-121v-219h-119zM553 893h121q55 0 79.5 24.5t24.5 79.5q0 104 -127 105h-98v-209z" />
+<glyph unicode="&#xaf;" horiz-adv-x="483" d="M-29 1278v121h564v-121h-564z" />
+<glyph unicode="&#xb0;" d="M283 1149q0 129 80.5 209t209.5 80t210 -80t81 -209t-81 -209t-210 -80t-209.5 80t-80.5 209zM387 1148q0 -85 51 -137.5t135 -52.5t137.5 52.5t53.5 137.5t-53.5 138t-137.5 53t-135 -53t-51 -138z" />
+<glyph unicode="&#xb1;" d="M113 78v139h921v-139h-921zM113 600v139h387v258h143v-258h391v-139h-391v-260h-143v260h-387z" />
+<glyph unicode="&#xb2;" horiz-adv-x="573" d="M61 979v113l181 178q104 100 104 170q0 76 -100 76l-174 -19l-4 117q121 25 219 24q195 0 194 -186q0 -68 -28.5 -118t-96.5 -111l-129 -125h262v-119h-428z" />
+<glyph unicode="&#xb3;" horiz-adv-x="573" d="M61 979l9 115q117 -16 212 -16.5t95 86.5t-96 87h-134v109h134q29 0 53 26.5t24 63.5q0 70 -92 70l-188 -15l-8 113q121 20 209 20q215 0 215 -172q0 -104 -80 -149q49 -16 72.5 -50t23.5 -110q0 -199 -217 -199q-88 0 -195 17z" />
+<glyph unicode="&#xb4;" horiz-adv-x="548" d="M53 1315l443 201l53 -132l-453 -174z" />
+<glyph unicode="&#xb5;" d="M172 -455v1479h154v-532q0 -223 38.5 -299t176.5 -76q68 0 137.5 19.5t105.5 37.5l37 19v831h154v-1024h-154v72q-154 -92 -288 -92t-207 34v-469h-154z" />
+<glyph unicode="&#xb6;" horiz-adv-x="1214" d="M72 1038q0 166 108.5 272.5t274.5 106.5h673v-133h-147v-1284h-139v1284h-238v-1284h-137v664h-14q-166 0 -273.5 104t-107.5 270z" />
+<glyph unicode="&#xb7;" horiz-adv-x="444" d="M139 469v233h168v-233h-168z" />
+<glyph unicode="&#xb8;" horiz-adv-x="538" d="M86 -430l6 98q80 -6 135 -6q90 0 90 78q0 70 -90 70h-86v192h84v-102q121 0 174.5 -33t53.5 -127q0 -184 -191 -184q-94 0 -151 10z" />
+<glyph unicode="&#xb9;" horiz-adv-x="573" d="M66 1475l206 143h123v-639h-131v496l-139 -97z" />
+<glyph unicode="&#xba;" horiz-adv-x="778" d="M109 1044q0 158 70.5 232t210.5 74t209 -74t69 -232q0 -313 -277 -313q-283 0 -282 313zM250 1043.5q0 -99.5 31.5 -143.5t108.5 -44t106.5 44t29.5 144.5t-29.5 140.5t-106.5 40t-108.5 -41t-31.5 -140.5z" />
+<glyph unicode="&#xbb;" horiz-adv-x="1103" d="M137 137v160l256 215l-256 193v157l387 -293v-123zM623 137v160l256 215l-256 193v157l389 -293v-123z" />
+<glyph unicode="&#xbc;" horiz-adv-x="1093" d="M72 57l802 1295l82 -54l-804 -1292zM76 1475l207 143h123v-639h-132v496l-139 -97zM555 4l141 430h144l-150 -422h154l10 183h119v-183h55v-118h-55v-99h-129v99h-289v110z" />
+<glyph unicode="&#xbd;" horiz-adv-x="1083" d="M68 57l802 1295l82 -54l-805 -1292zM84 1475l207 143h123v-639h-131v496l-140 -97zM567 -92l181 178q104 100 104 170q0 76 -100 76l-174 -19l-5 117q121 25 218 25q197 0 196 -187q0 -68 -28.5 -118t-96.5 -111l-129 -125h262v-119h-428v113z" />
+<glyph unicode="&#xbe;" horiz-adv-x="1126" d="M100 979l9 115q117 -16 212 -16.5t95 86.5t-97 87h-133v109h133q29 0 53.5 26.5t24.5 63.5q0 70 -92 70l-188 -15l-8 113q120 20 208 20q215 0 215 -172q0 -104 -79 -149q49 -16 72.5 -50t23.5 -110q0 -199 -217 -199q-88 0 -197 17zM106 57l803 1295l82 -54l-805 -1292z M590 4l141 430h143l-149 -422h154l10 183h119v-183h55v-118h-55v-99h-129v99h-289v110z" />
+<glyph unicode="&#xbf;" horiz-adv-x="903" d="M78 -84q0 133 36 201.5t145.5 160t150.5 145.5t41 120v71h129q27 -55 26.5 -124.5t-47.5 -130t-151.5 -150.5t-139.5 -143.5t-35 -148.5t66 -142t207 -47q109 0 264 34l53 13l11 -125q-207 -61 -342 -62q-211 0 -312.5 77t-101.5 251zM434 795v229h168v-229h-168z" />
+<glyph unicode="&#xc0;" horiz-adv-x="1220" d="M49 0l389 1417h344l389 -1417h-155l-103 365h-606l-102 -365h-156zM334 1772l53 135l442 -205l-47 -109zM342 506h537l-215 776h-107z" />
+<glyph unicode="&#xc1;" horiz-adv-x="1220" d="M49 0l389 1417h344l389 -1417h-155l-103 365h-606l-102 -365h-156zM342 506h537l-215 776h-107zM381 1702l442 205l54 -135l-449 -179z" />
+<glyph unicode="&#xc2;" horiz-adv-x="1220" d="M49 0l389 1417h344l389 -1417h-155l-103 365h-606l-102 -365h-156zM266 1620l275 276h133l274 -276h-172l-168 164l-170 -164h-172zM342 506h537l-215 776h-107z" />
+<glyph unicode="&#xc3;" horiz-adv-x="1220" d="M49 0l389 1417h344l389 -1417h-155l-103 365h-606l-102 -365h-156zM256 1772q39 45 92 81.5t100.5 36.5t172 -55t145.5 -55q41 0 119 71l24 23l37 -115q-96 -114 -180 -114q-43 0 -170 55t-154 55q-45 0 -125 -74l-26 -24zM342 506h537l-215 776h-107z" />
+<glyph unicode="&#xc4;" horiz-adv-x="1220" d="M49 0l389 1417h344l389 -1417h-155l-103 365h-606l-102 -365h-156zM326 1655v184h149v-184h-149zM342 506h537l-215 776h-107zM743 1655v184h148v-184h-148z" />
+<glyph unicode="&#xc5;" horiz-adv-x="1220" d="M49 0l377 1370q-61 57 -61 155.5t68.5 156t175 57.5t174 -57.5t67.5 -151.5t-57 -156l378 -1374h-155l-103 365h-606l-102 -365h-156zM342 506h537l-215 776h-107zM481 1524q0 -90 88 -107h76q90 16 90 107q0 51 -33.5 79.5t-93.5 28.5q-127 1 -127 -108z" />
+<glyph unicode="&#xc6;" horiz-adv-x="1794" d="M41 0l459 1425h1198v-149h-707v-471h584v-150h-584v-505h707v-150h-862v358h-514l-119 -358h-162zM365 510h471l2 766h-224z" />
+<glyph unicode="&#xc7;" horiz-adv-x="1114" d="M121 705q0 190 21.5 318t77.5 226.5t158.5 143.5t266.5 45t385 -45l-6 -133q-207 37 -369 36q-225 0 -297.5 -134t-72.5 -457q0 -162 13 -260.5t52 -177.5t114 -112.5t219 -33.5t341 37l6 -135q-188 -41 -371 -43v-80q121 0 174.5 -33t53.5 -127q0 -184 -191 -184 q-94 0 -151 10l-25 4l6 98q80 -6 136 -6q90 0 90 78q0 70 -90 70h-87v172q-264 18 -359 191t-95 532z" />
+<glyph unicode="&#xc8;" horiz-adv-x="1132" d="M174 0v1417h862v-139h-704v-490h581v-137h-581v-512h704v-139h-862zM346 1772l53 135l443 -205l-47 -109z" />
+<glyph unicode="&#xc9;" horiz-adv-x="1132" d="M174 0v1417h862v-139h-704v-490h581v-137h-581v-512h704v-139h-862zM360 1702l443 205l53 -135l-448 -179z" />
+<glyph unicode="&#xca;" horiz-adv-x="1132" d="M174 0v1417h862v-139h-704v-490h581v-137h-581v-512h704v-139h-862zM260 1620l275 276h133l274 -276h-172l-168 164l-170 -164h-172z" />
+<glyph unicode="&#xcb;" horiz-adv-x="1132" d="M174 0v1417h862v-139h-704v-490h581v-137h-581v-512h704v-139h-862zM322 1655v184h149v-184h-149zM739 1655v184h148v-184h-148z" />
+<glyph unicode="&#xcc;" horiz-adv-x="503" d="M-41 1772l53 135l443 -205l-47 -109zM174 0v1417h158v-1417h-158z" />
+<glyph unicode="&#xcd;" horiz-adv-x="503" d="M27 1702l442 205l53 -135l-448 -179zM174 0v1417h158v-1417h-158z" />
+<glyph unicode="&#xce;" horiz-adv-x="503" d="M-96 1620l274 276h133l275 -276h-172l-168 164l-170 -164h-172zM174 0v1417h158v-1417h-158z" />
+<glyph unicode="&#xcf;" horiz-adv-x="503" d="M-31 1655v184h150v-184h-150zM174 0v1417h158v-1417h-158zM387 1655v184h148v-184h-148z" />
+<glyph unicode="&#xd0;" horiz-adv-x="1325" d="M41 637v149h139v639h506q289 0 406.5 -180t117.5 -510q0 -537 -268 -678q-104 -57 -256 -57h-506v637h-139zM336 150h350q361 -1 361 585q0 397 -183 500q-72 41 -178 41h-350v-490h323v-149h-323v-487z" />
+<glyph unicode="&#xd1;" horiz-adv-x="1384" d="M174 0v1417h295l543 -1278h43v1278h155v-1417h-288l-551 1278h-39v-1278h-158zM342 1772q39 45 92 81.5t100.5 36.5t172 -55t145.5 -55q41 0 119 71l24 23l37 -115q-96 -114 -180 -114q-43 0 -170 55t-154 55q-45 0 -125 -74l-26 -24z" />
+<glyph unicode="&#xd2;" horiz-adv-x="1351" d="M117 701.5q0 373.5 122.5 555t436 181.5t437.5 -180.5t124 -559.5t-121 -548.5t-439.5 -169.5t-439 174t-120.5 547.5zM279 702.5q0 -311.5 81.5 -447.5t316 -136t315.5 133t81 446.5t-84 456.5t-314.5 143t-313 -142t-82.5 -453.5zM412 1772l53 135l442 -205l-47 -109z " />
+<glyph unicode="&#xd3;" horiz-adv-x="1351" d="M117 701.5q0 373.5 122.5 555t436 181.5t437.5 -180.5t124 -559.5t-121 -548.5t-439.5 -169.5t-439 174t-120.5 547.5zM279 702.5q0 -311.5 81.5 -447.5t316 -136t315.5 133t81 446.5t-84 456.5t-314.5 143t-313 -142t-82.5 -453.5zM406 1702l442 205l53 -135l-448 -179z " />
+<glyph unicode="&#xd4;" horiz-adv-x="1351" d="M117 701.5q0 373.5 122.5 555t436 181.5t437.5 -180.5t124 -559.5t-121 -548.5t-439.5 -169.5t-439 174t-120.5 547.5zM279 702.5q0 -311.5 81.5 -447.5t316 -136t315.5 133t81 446.5t-84 456.5t-314.5 143t-313 -142t-82.5 -453.5zM336 1620l274 276h133l275 -276h-172 l-168 164l-170 -164h-172z" />
+<glyph unicode="&#xd5;" horiz-adv-x="1351" d="M117 701.5q0 373.5 122.5 555t436 181.5t437.5 -180.5t124 -559.5t-121 -548.5t-439.5 -169.5t-439 174t-120.5 547.5zM279 702.5q0 -311.5 81.5 -447.5t316 -136t315.5 133t81 446.5t-84 456.5t-314.5 143t-313 -142t-82.5 -453.5zM326 1772q39 45 92 81.5t100 36.5 t172 -55t146 -55q41 0 118 71l25 23l37 -115q-96 -114 -180 -114q-43 0 -170 55t-154 55q-45 0 -125 -74l-27 -24z" />
+<glyph unicode="&#xd6;" horiz-adv-x="1351" d="M117 701.5q0 373.5 122.5 555t436 181.5t437.5 -180.5t124 -559.5t-121 -548.5t-439.5 -169.5t-439 174t-120.5 547.5zM279 702.5q0 -311.5 81.5 -447.5t316 -136t315.5 133t81 446.5t-84 456.5t-314.5 143t-313 -142t-82.5 -453.5zM393 1655v184h150v-184h-150z M811 1655v184h147v-184h-147z" />
+<glyph unicode="&#xd7;" d="M145 184l332 330l-332 328l101 98l327 -332l330 334l98 -98l-333 -330l333 -330l-98 -98l-330 332l-329 -332z" />
+<glyph unicode="&#xd8;" horiz-adv-x="1351" d="M117 702q0 373 122.5 554.5t436.5 181.5q154 0 258 -43l115 241l118 -49l-120 -260q190 -160 190 -625q0 -383 -121 -552.5t-440 -169.5q-141 0 -246 34l-117 -252l-116 54l120 258q-109 82 -154.5 235.5t-45.5 392.5zM279 677q0 -337 106 -456l487 1039q-78 39 -196 38 q-232 0 -314.5 -142t-82.5 -479zM494 147q69 -28 182 -28q236 0 316.5 133t80.5 462.5t-98 461.5z" />
+<glyph unicode="&#xd9;" horiz-adv-x="1318" d="M164 430v987h158v-991q0 -307 331 -307q172 0 259 72.5t87 234.5v991h156v-987q0 -238 -126 -344t-371.5 -106t-369.5 106.5t-124 343.5zM401 1772l54 135l442 -205l-47 -109z" />
+<glyph unicode="&#xda;" horiz-adv-x="1318" d="M164 430v987h158v-991q0 -307 331 -307q172 0 259 72.5t87 234.5v991h156v-987q0 -238 -126 -344t-371.5 -106t-369.5 106.5t-124 343.5zM408 1702l442 205l53 -135l-448 -179z" />
+<glyph unicode="&#xdb;" horiz-adv-x="1318" d="M164 430v987h158v-991q0 -307 331 -307q172 0 259 72.5t87 234.5v991h156v-987q0 -238 -126 -344t-371.5 -106t-369.5 106.5t-124 343.5zM317 1620l275 276h133l274 -276h-172l-168 164l-170 -164h-172z" />
+<glyph unicode="&#xdc;" horiz-adv-x="1318" d="M164 430v987h158v-991q0 -307 331 -307q172 0 259 72.5t87 234.5v991h156v-987q0 -238 -126 -344t-371.5 -106t-369.5 106.5t-124 343.5zM377 1655v184h149v-184h-149zM795 1655v184h147v-184h-147z" />
+<glyph unicode="&#xdd;" horiz-adv-x="1101" d="M20 1417h179l352 -663l352 663h178l-450 -821v-596h-158v596zM342 1702l442 205l54 -135l-449 -179z" />
+<glyph unicode="&#xde;" horiz-adv-x="1226" d="M174 0v1425h158v-229h360q231 0 343 -112.5t112 -347t-114 -361.5t-341 -127h-360v-248h-158zM332 399h358q295 0 295 340q0 160 -70.5 232.5t-224.5 72.5h-358v-645z" />
+<glyph unicode="&#xdf;" horiz-adv-x="1175" d="M147 0v1116q0 207 93.5 291t306.5 84t306 -69.5t93 -225.5q0 -109 -39 -167t-120.5 -94t-105.5 -54.5t-24 -50t34 -58.5t167 -92.5t189.5 -131t56.5 -186.5q0 -209 -93 -295.5t-319 -86.5q-102 0 -225 22l-43 8l6 129q174 -23 250 -22q147 0 205.5 54t58.5 153.5 t-43 144.5t-176 108.5t-180 112.5t-47 126t37.5 119t117.5 77t106.5 72.5t26.5 116.5t-52 116t-188 37t-190.5 -53.5t-54.5 -202.5v-1098h-154z" />
+<glyph unicode="&#xe0;" horiz-adv-x="1026" d="M82 288.5q0 149.5 75.5 220.5t237.5 87l322 31v88q0 104 -45 149t-123 45q-164 0 -340 -20l-64 -6l-6 116q225 45 399.5 45t253 -79.5t78.5 -249.5v-525q6 -76 119 -90l-6 -120q-162 0 -244 81q-184 -82 -368 -81q-141 0 -215 79.5t-74 229zM240 297q0 -188 155 -188 q139 0 275 47l47 16v338l-303 -29q-92 -8 -133 -53t-41 -131zM248 1384l53 132l442 -201l-43 -105z" />
+<glyph unicode="&#xe1;" horiz-adv-x="1026" d="M82 288.5q0 149.5 75.5 220.5t237.5 87l322 31v88q0 104 -45 149t-123 45q-164 0 -340 -20l-64 -6l-6 116q225 45 399.5 45t253 -79.5t78.5 -249.5v-525q6 -76 119 -90l-6 -120q-162 0 -244 81q-184 -82 -368 -81q-141 0 -215 79.5t-74 229zM240 297q0 -188 155 -188 q139 0 275 47l47 16v338l-303 -29q-92 -8 -133 -53t-41 -131zM242 1315l442 201l53 -132l-452 -174z" />
+<glyph unicode="&#xe2;" horiz-adv-x="1026" d="M82 288.5q0 149.5 75.5 220.5t237.5 87l322 31v88q0 104 -45 149t-123 45q-164 0 -340 -20l-64 -6l-6 116q225 45 399.5 45t253 -79.5t78.5 -249.5v-525q6 -76 119 -90l-6 -120q-162 0 -244 81q-184 -82 -368 -81q-141 0 -215 79.5t-74 229zM195 1212l251 287h105 l254 -287h-154l-149 179l-154 -179h-153zM240 297q0 -188 155 -188q139 0 275 47l47 16v338l-303 -29q-92 -8 -133 -53t-41 -131z" />
+<glyph unicode="&#xe3;" horiz-adv-x="1026" d="M82 288.5q0 149.5 75.5 220.5t237.5 87l322 31v88q0 104 -45 149t-123 45q-164 0 -340 -20l-64 -6l-6 116q225 45 399.5 45t253 -79.5t78.5 -249.5v-525q6 -76 119 -90l-6 -120q-162 0 -244 81q-184 -82 -368 -81q-141 0 -215 79.5t-74 229zM158 1366q102 106 186 107 q43 0 149.5 -47.5t129.5 -47.5q45 0 122 60l25 18l35 -98q-94 -105 -176 -105q-43 0 -148.5 48.5t-132.5 48.5q-47 0 -127 -62l-26 -20zM240 297q0 -188 155 -188q139 0 275 47l47 16v338l-303 -29q-92 -8 -133 -53t-41 -131z" />
+<glyph unicode="&#xe4;" horiz-adv-x="1026" d="M82 288.5q0 149.5 75.5 220.5t237.5 87l322 31v88q0 104 -45 149t-123 45q-164 0 -340 -20l-64 -6l-6 116q225 45 399.5 45t253 -79.5t78.5 -249.5v-525q6 -76 119 -90l-6 -120q-162 0 -244 81q-184 -82 -368 -81q-141 0 -215 79.5t-74 229zM215 1272v184h147v-184h-147z M240 297q0 -188 155 -188q139 0 275 47l47 16v338l-303 -29q-92 -8 -133 -53t-41 -131zM625 1272v184h149v-184h-149z" />
+<glyph unicode="&#xe5;" horiz-adv-x="1026" d="M82 288.5q0 149.5 75.5 220.5t237.5 87l322 31v88q0 104 -45 149t-123 45q-164 0 -340 -20l-64 -6l-6 116q225 45 399.5 45t253 -79.5t78.5 -249.5v-525q6 -76 119 -90l-6 -120q-162 0 -244 81q-184 -82 -368 -81q-141 0 -215 79.5t-74 229zM240 297q0 -188 155 -188 q139 0 275 47l47 16v338l-303 -29q-92 -8 -133 -53t-41 -131zM309 1321q0 90 61.5 151.5t150.5 61.5t150.5 -61.5t61.5 -151.5t-60.5 -151.5t-150.5 -61.5t-151.5 61.5t-61.5 151.5zM410 1320q0 -48 32.5 -82t79.5 -34t80 34t33 82t-33 82t-80 34t-79.5 -34t-32.5 -82z" />
+<glyph unicode="&#xe6;" horiz-adv-x="1646" d="M82 299q0 158 84 220.5t287 82.5l264 25v84q0 186 -178 186q-135 0 -326 -16l-63 -4l-7 137q244 31 404 30q209 0 276 -149q98 150 312.5 149.5t316.5 -116t102 -363.5l-8 -119h-676q0 -168 61.5 -247.5t187.5 -79.5t335 14l59 4l5 -125q-231 -33 -415.5 -32.5 t-283.5 110.5l-65 -29q-178 -82 -394 -81q-137 0 -207.5 80.5t-70.5 238.5zM240 297q0 -184 145 -184q94 0 215 29.5t152 45.5q-39 104 -39 314l-299 -25q-90 -8 -132 -51t-42 -129zM870 571h531q0 182 -60.5 259t-196.5 77t-205 -80t-69 -256z" />
+<glyph unicode="&#xe7;" horiz-adv-x="892" d="M104 532.5q0 276.5 98.5 394t327.5 117.5q68 0 230 -24l49 -6l-6 -125q-164 18 -242 18q-174 0 -236.5 -83t-62.5 -307t58.5 -312t242.5 -88l242 18l6 -127q-190 -29 -285 -28h-16v-80q121 0 174 -33t53 -127q0 -184 -190 -184q-94 0 -154 10l-22 4l6 98q80 -6 135 -6 q90 0 90 78q0 70 -90 70h-86v176q-180 20 -251 145t-71 401.5z" />
+<glyph unicode="&#xe8;" horiz-adv-x="1034" d="M102 506q0 539 428 538q207 0 309.5 -115.5t102.5 -363.5l-8 -116h-676q0 -170 61.5 -252t214 -82t310.5 12l59 6l4 -121q-233 -33 -399 -32q-221 0 -313.5 128t-92.5 398zM248 1386l53 132l442 -201l-43 -105zM256 571h532q0 188 -60 266t-196.5 78t-205 -81.5 t-70.5 -262.5z" />
+<glyph unicode="&#xe9;" horiz-adv-x="1034" d="M102 506q0 539 428 538q207 0 309.5 -115.5t102.5 -363.5l-8 -116h-676q0 -170 61.5 -252t214 -82t310.5 12l59 6l4 -121q-233 -33 -399 -32q-221 0 -313.5 128t-92.5 398zM256 571h532q0 188 -60 266t-196.5 78t-205 -81.5t-70.5 -262.5zM297 1315l442 201l54 -132 l-453 -174z" />
+<glyph unicode="&#xea;" horiz-adv-x="1034" d="M102 506q0 539 428 538q207 0 309.5 -115.5t102.5 -363.5l-8 -116h-676q0 -170 61.5 -252t214 -82t310.5 12l59 6l4 -121q-233 -33 -399 -32q-221 0 -313.5 128t-92.5 398zM229 1212l252 287h105l254 -287h-154l-149 179l-154 -179h-154zM256 571h532q0 188 -60 266 t-196.5 78t-205 -81.5t-70.5 -262.5z" />
+<glyph unicode="&#xeb;" horiz-adv-x="1034" d="M102 506q0 539 428 538q207 0 309.5 -115.5t102.5 -363.5l-8 -116h-676q0 -170 61.5 -252t214 -82t310.5 12l59 6l4 -121q-233 -33 -399 -32q-221 0 -313.5 128t-92.5 398zM246 1272v184h147v-184h-147zM256 571h532q0 188 -60 266t-196.5 78t-205 -81.5t-70.5 -262.5z M655 1272v184h150v-184h-150z" />
+<glyph unicode="&#xec;" horiz-adv-x="448" d="M-123 1384l53 132l443 -201l-43 -105zM147 0v1024h154v-1024h-154z" />
+<glyph unicode="&#xed;" horiz-adv-x="448" d="M78 1315l442 201l53 -132l-452 -174zM147 0v1024h154v-1024h-154z" />
+<glyph unicode="&#xee;" horiz-adv-x="448" d="M-86 1212l252 287h104l254 -287h-153l-150 179l-153 -179h-154zM147 0v1024h154v-1024h-154z" />
+<glyph unicode="&#xef;" horiz-adv-x="448" d="M-63 1272v184h147v-184h-147zM147 0v1024h154v-1024h-154zM346 1272v184h150v-184h-150z" />
+<glyph unicode="&#xf0;" horiz-adv-x="1122" d="M86 429q0 212 112.5 332t317.5 120q133 0 287 -56l51 -18q-14 266 -281 424l-249 -166l-68 96l195 131q-111 47 -254 84l30 115q205 -41 355 -111l206 140l70 -97l-158 -106q315 -201 315.5 -597t-110 -567t-362.5 -171q-219 0 -338 117.5t-119 329.5zM248 430 q0 -143 74.5 -226t231.5 -83t228.5 121t73.5 428q-184 74 -323.5 73.5t-212 -85.5t-72.5 -228z" />
+<glyph unicode="&#xf1;" horiz-adv-x="1099" d="M147 0v1024h152v-72l45 23q47 25 126 47t146 22q205 0 276 -110.5t71 -392.5v-541h-152v537q0 213 -42 291.5t-184.5 78.5t-283.5 -76v-831h-154zM244 1366q102 106 186 107q43 0 149.5 -47.5t129.5 -47.5q45 0 122 60l25 18l35 -98q-94 -105 -176 -105 q-43 0 -148.5 48.5t-132.5 48.5q-47 0 -127 -62l-26 -20z" />
+<glyph unicode="&#xf2;" horiz-adv-x="1081" d="M102 514q0 281 100.5 405.5t339 124.5t338 -124.5t99.5 -405.5t-94 -407.5t-344 -126.5t-344.5 126.5t-94.5 407.5zM260 517q0 -224 54.5 -314t227.5 -90t226 89t53 314t-59.5 310t-220 85t-221 -85t-60.5 -309zM289 1384l53 132l442 -201l-43 -105z" />
+<glyph unicode="&#xf3;" horiz-adv-x="1081" d="M102 514q0 281 100.5 405.5t339 124.5t338 -124.5t99.5 -405.5t-94 -407.5t-344 -126.5t-344.5 126.5t-94.5 407.5zM260 517q0 -224 54.5 -314t227.5 -90t226 89t53 314t-59.5 310t-220 85t-221 -85t-60.5 -309zM315 1315l443 201l53 -132l-453 -174z" />
+<glyph unicode="&#xf4;" horiz-adv-x="1081" d="M102 514q0 281 100.5 405.5t339 124.5t338 -124.5t99.5 -405.5t-94 -407.5t-344 -126.5t-344.5 126.5t-94.5 407.5zM231 1212l252 287h105l254 -287h-154l-149 179l-154 -179h-154zM260 517q0 -224 54.5 -314t227.5 -90t226 89t53 314t-59.5 310t-220 85t-221 -85 t-60.5 -309z" />
+<glyph unicode="&#xf5;" horiz-adv-x="1081" d="M102 514q0 281 100.5 405.5t339 124.5t338 -124.5t99.5 -405.5t-94 -407.5t-344 -126.5t-344.5 126.5t-94.5 407.5zM215 1366q102 106 186 107q43 0 149.5 -47.5t129.5 -47.5q45 0 123 60l24 18l35 -98q-94 -105 -176 -105q-43 0 -148.5 48.5t-131.5 48.5q-47 0 -127 -62 l-27 -20zM260 517q0 -224 54.5 -314t227.5 -90t226 89t53 314t-59.5 310t-220 85t-221 -85t-60.5 -309z" />
+<glyph unicode="&#xf6;" horiz-adv-x="1081" d="M102 514q0 281 100.5 405.5t339 124.5t338 -124.5t99.5 -405.5t-94 -407.5t-344 -126.5t-344.5 126.5t-94.5 407.5zM256 1272v184h147v-184h-147zM260 517q0 -224 54.5 -314t227.5 -90t226 89t53 314t-59.5 310t-220 85t-221 -85t-60.5 -309zM666 1272v184h149v-184h-149 z" />
+<glyph unicode="&#xf7;" d="M246 575v150h116v98h422v-98h115v-150h-653zM496 61v207h153v-207h-153z" />
+<glyph unicode="&#xf8;" horiz-adv-x="1081" d="M102 524q0 270 100.5 395t338.5 125q80 0 151 -16l88 213l103 -39l-88 -213q184 -102 184 -465q0 -291 -94 -417.5t-344 -126.5q-84 0 -156 16l-88 -225l-102 36l90 224q-100 55 -141.5 174t-41.5 319zM260 558q0 -183 17.5 -267t68.5 -127l297 735q-43 12 -102 12 q-160 0 -220.5 -85t-60.5 -268zM436 123q37 -10 105 -10q174 0 227 89t53 331.5t-86 320.5z" />
+<glyph unicode="&#xf9;" horiz-adv-x="1087" d="M137 489v535h154v-532q0 -223 39 -299t176 -76q68 0 137.5 19.5t106.5 37.5l36 19v831h154v-1024h-154v72q-154 -92 -303 -92q-209 0 -277.5 108.5t-68.5 400.5zM233 1384l54 132l442 -201l-43 -105z" />
+<glyph unicode="&#xfa;" horiz-adv-x="1087" d="M137 489v535h154v-532q0 -223 39 -299t183 -76t273 76v831h154v-1024h-154v72l-43 -23q-43 -25 -118.5 -47t-141.5 -22q-209 0 -277.5 108.5t-68.5 400.5zM317 1315l443 201l53 -132l-453 -174z" />
+<glyph unicode="&#xfb;" horiz-adv-x="1087" d="M137 489v535h154v-532q0 -223 39 -299t183 -76t273 76v831h154v-1024h-154v72l-43 -23q-43 -25 -118.5 -47t-141.5 -22q-209 0 -277.5 108.5t-68.5 400.5zM215 1212l252 287h104l254 -287h-153l-150 179l-153 -179h-154z" />
+<glyph unicode="&#xfc;" horiz-adv-x="1087" d="M137 489v535h154v-532q0 -223 39 -299t183 -76t273 76v831h154v-1024h-154v72l-43 -23q-43 -25 -118.5 -47t-141.5 -22q-209 0 -277.5 108.5t-68.5 400.5zM270 1272v184h148v-184h-148zM680 1272v184h149v-184h-149z" />
+<glyph unicode="&#xfd;" horiz-adv-x="989" d="M51 1024h154l256 -891h67l258 891h154l-426 -1479h-154l134 455h-152zM315 1315l443 201l53 -132l-453 -174z" />
+<glyph unicode="&#xfe;" horiz-adv-x="1079" d="M147 -455v1925h154v-497q154 71 299 71q207 0 291 -117.5t84 -410.5t-101.5 -414.5t-365.5 -121.5l-207 14v-449h-154zM301 125q133 -12 199 -12q193 0 255 93t62 309t-50 304t-181 88q-119 0 -246 -45l-39 -14v-723z" />
+<glyph unicode="&#xff;" horiz-adv-x="989" d="M51 1024h154l256 -891h67l258 891h154l-426 -1479h-154l134 455h-152zM213 1272v184h147v-184h-147zM623 1272v184h149v-184h-149z" />
+<glyph unicode="&#x152;" horiz-adv-x="1894" d="M117 710q0 384 118.5 560t423.5 176q162 0 289 -21h850v-151h-694v-469h571v-152h-571v-501h694v-154h-846q-188 -18 -293 -18q-313 0 -427.5 173t-114.5 557zM281 709.5q0 -316.5 79.5 -446.5t319.5 -130q106 0 268 14v1127q-215 18 -272 18q-231 0 -313 -133 t-82 -449.5z" />
+<glyph unicode="&#x153;" horiz-adv-x="1755" d="M102 515q0 282 101.5 405.5t339.5 123.5q139 0 226 -50t134 -165q92 215 348 215q207 0 309.5 -115.5t102.5 -363.5l-8 -119h-676q0 -168 61.5 -247.5t188.5 -79.5t334 14l59 4l4 -125q-231 -33 -397 -32q-244 0 -332 186q-45 -98 -129 -142t-225 -44 q-252 0 -346.5 126.5t-94.5 408.5zM260 519q0 -220 55.5 -311t226.5 -91t225 92t54 305t-64.5 302t-220 89t-216 -83t-60.5 -303zM977 571h532q0 182 -60 259t-198 77q-274 0 -274 -336z" />
+<glyph unicode="&#x178;" horiz-adv-x="1101" d="M20 1417h179l352 -663l352 663h178l-450 -821v-596h-158v596zM266 1655v184h150v-184h-150zM684 1655v184h147v-184h-147z" />
+<glyph unicode="&#x2c6;" horiz-adv-x="483" d="M-39 1212l252 287h104l254 -287h-153l-150 179l-153 -179h-154z" />
+<glyph unicode="&#x2dc;" horiz-adv-x="483" d="M-61 1366q102 106 186 107q43 0 149.5 -47.5t131.5 -47.5q43 0 118 60l27 18l35 -98q-94 -105 -176 -105q-43 0 -148.5 48.5t-132.5 48.5q-47 0 -127 -62l-27 -20z" />
+<glyph unicode="&#x2000;" horiz-adv-x="953" />
+<glyph unicode="&#x2001;" horiz-adv-x="1907" />
+<glyph unicode="&#x2002;" horiz-adv-x="953" />
+<glyph unicode="&#x2003;" horiz-adv-x="1907" />
+<glyph unicode="&#x2004;" horiz-adv-x="635" />
+<glyph unicode="&#x2005;" horiz-adv-x="476" />
+<glyph unicode="&#x2006;" horiz-adv-x="317" />
+<glyph unicode="&#x2007;" horiz-adv-x="317" />
+<glyph unicode="&#x2008;" horiz-adv-x="238" />
+<glyph unicode="&#x2009;" horiz-adv-x="381" />
+<glyph unicode="&#x200a;" horiz-adv-x="105" />
+<glyph unicode="&#x2010;" horiz-adv-x="897" d="M139 492v143h621v-143h-621z" />
+<glyph unicode="&#x2011;" horiz-adv-x="897" d="M139 492v143h621v-143h-621z" />
+<glyph unicode="&#x2012;" horiz-adv-x="897" d="M139 492v143h621v-143h-621z" />
+<glyph unicode="&#x2013;" horiz-adv-x="1292" d="M135 481v135h1024v-135h-1024z" />
+<glyph unicode="&#x2014;" horiz-adv-x="2316" d="M135 481v135h2048v-135h-2048z" />
+<glyph unicode="&#x2018;" horiz-adv-x="448" d="M104 1001l132 449h120l-90 -449h-162z" />
+<glyph unicode="&#x2019;" horiz-adv-x="442" d="M109 1001l90 449h161l-131 -449h-120z" />
+<glyph unicode="&#x201a;" horiz-adv-x="446" d="M139 -43l27 88h24l-18 -88h-33z" />
+<glyph unicode="&#x201c;" horiz-adv-x="763" d="M104 1001l132 449h120l-90 -449h-162zM418 1001l131 449h121l-90 -449h-162z" />
+<glyph unicode="&#x201d;" horiz-adv-x="772" d="M109 1004l90 448h161l-131 -448h-120zM436 1004l90 448h162l-131 -448h-121z" />
+<glyph unicode="&#x201e;" horiz-adv-x="735" d="M45 -219l131 448h121l-90 -448h-162zM356 -219l131 448h121l-90 -448h-162z" />
+<glyph unicode="&#x2022;" horiz-adv-x="968" d="M227 217v586h512v-586h-512z" />
+<glyph unicode="&#x2026;" horiz-adv-x="1484" d="M137 0v233h168v-233h-168zM659 0v233h166v-233h-166zM1180 0v233h168v-233h-168z" />
+<glyph unicode="&#x202f;" horiz-adv-x="381" />
+<glyph unicode="&#x2039;" horiz-adv-x="616" d="M92 446v123l387 293v-157l-254 -193l254 -215v-160z" />
+<glyph unicode="&#x203a;" horiz-adv-x="616" d="M137 145v160l254 215l-254 193v157l387 -292v-123z" />
+<glyph unicode="&#x205f;" horiz-adv-x="476" />
+<glyph unicode="&#x20ac;" d="M61 455v125h123q-2 29 -2 95t2 99h-123v125h132q25 244 134 358.5t351 114.5q172 0 373 -43l-7 -127q-186 35 -354 35t-244.5 -80t-95.5 -258h586v-125h-594q-2 -33 -2 -102v-92h596v-125h-588q18 -178 95 -259t247 -81t354 37l7 -129q-203 -43 -373 -43 q-242 0 -351.5 116.5t-136.5 358.5h-129z" />
+<glyph unicode="&#x2122;" horiz-adv-x="1386" d="M186 1188v102h410v-102h-135v-508h-113v508h-162zM659 678v612h148l135 -426l145 426h144v-612h-107v459l-135 -428h-88l-135 428v-459h-107z" />
+<glyph unicode="&#xe000;" horiz-adv-x="1024" d="M0 0v1024h1024v-1024h-1024z" />
+<hkern u1="&#x22;" u2="&#xf0;" k="27" />
+<hkern u1="&#x22;" u2="&#xef;" k="-14" />
+<hkern u1="&#x22;" u2="&#xee;" k="-10" />
+<hkern u1="&#x22;" u2="&#xec;" k="-35" />
+<hkern u1="&#x22;" u2="&#xc6;" k="109" />
+<hkern u1="&#x22;" u2="&#x40;" k="25" />
+<hkern u1="&#x22;" u2="&#x2f;" k="129" />
+<hkern u1="&#x22;" u2="&#x26;" k="57" />
+<hkern u1="&#x26;" u2="&#x201d;" k="98" />
+<hkern u1="&#x26;" u2="&#x2019;" k="98" />
+<hkern u1="&#x26;" u2="&#x178;" k="113" />
+<hkern u1="&#x26;" u2="&#x152;" k="14" />
+<hkern u1="&#x26;" u2="&#xff;" k="27" />
+<hkern u1="&#x26;" u2="&#xfd;" k="27" />
+<hkern u1="&#x26;" u2="&#xdd;" k="113" />
+<hkern u1="&#x26;" u2="&#xdc;" k="12" />
+<hkern u1="&#x26;" u2="&#xdb;" k="12" />
+<hkern u1="&#x26;" u2="&#xda;" k="12" />
+<hkern u1="&#x26;" u2="&#xd9;" k="12" />
+<hkern u1="&#x26;" u2="&#xd8;" k="14" />
+<hkern u1="&#x26;" u2="&#xd6;" k="14" />
+<hkern u1="&#x26;" u2="&#xd5;" k="14" />
+<hkern u1="&#x26;" u2="&#xd4;" k="14" />
+<hkern u1="&#x26;" u2="&#xd3;" k="14" />
+<hkern u1="&#x26;" u2="&#xd2;" k="14" />
+<hkern u1="&#x26;" u2="&#xc7;" k="14" />
+<hkern u1="&#x26;" u2="y" k="27" />
+<hkern u1="&#x26;" u2="w" k="20" />
+<hkern u1="&#x26;" u2="v" k="27" />
+<hkern u1="&#x26;" u2="t" k="14" />
+<hkern u1="&#x26;" u2="Y" k="113" />
+<hkern u1="&#x26;" u2="W" k="41" />
+<hkern u1="&#x26;" u2="V" k="68" />
+<hkern u1="&#x26;" u2="U" k="12" />
+<hkern u1="&#x26;" u2="T" k="84" />
+<hkern u1="&#x26;" u2="Q" k="14" />
+<hkern u1="&#x26;" u2="O" k="14" />
+<hkern u1="&#x26;" u2="G" k="14" />
+<hkern u1="&#x26;" u2="C" k="14" />
+<hkern u1="&#x26;" u2="&#x27;" k="100" />
+<hkern u1="&#x26;" u2="&#x22;" k="100" />
+<hkern u1="&#x27;" u2="&#xf0;" k="27" />
+<hkern u1="&#x27;" u2="&#xef;" k="-14" />
+<hkern u1="&#x27;" u2="&#xee;" k="-10" />
+<hkern u1="&#x27;" u2="&#xec;" k="-35" />
+<hkern u1="&#x27;" u2="&#xc6;" k="109" />
+<hkern u1="&#x27;" u2="&#x40;" k="25" />
+<hkern u1="&#x27;" u2="&#x2f;" k="129" />
+<hkern u1="&#x27;" u2="&#x26;" k="57" />
+<hkern u1="&#x28;" u2="&#x153;" k="37" />
+<hkern u1="&#x28;" u2="&#x152;" k="27" />
+<hkern u1="&#x28;" u2="&#xff;" k="8" />
+<hkern u1="&#x28;" u2="&#xfd;" k="8" />
+<hkern u1="&#x28;" u2="&#xfc;" k="29" />
+<hkern u1="&#x28;" u2="&#xfb;" k="29" />
+<hkern u1="&#x28;" u2="&#xfa;" k="29" />
+<hkern u1="&#x28;" u2="&#xf9;" k="29" />
+<hkern u1="&#x28;" u2="&#xf8;" k="37" />
+<hkern u1="&#x28;" u2="&#xf6;" k="37" />
+<hkern u1="&#x28;" u2="&#xf5;" k="37" />
+<hkern u1="&#x28;" u2="&#xf4;" k="37" />
+<hkern u1="&#x28;" u2="&#xf3;" k="37" />
+<hkern u1="&#x28;" u2="&#xf2;" k="37" />
+<hkern u1="&#x28;" u2="&#xf1;" k="8" />
+<hkern u1="&#x28;" u2="&#xf0;" k="8" />
+<hkern u1="&#x28;" u2="&#xef;" k="-31" />
+<hkern u1="&#x28;" u2="&#xec;" k="-45" />
+<hkern u1="&#x28;" u2="&#xeb;" k="37" />
+<hkern u1="&#x28;" u2="&#xea;" k="37" />
+<hkern u1="&#x28;" u2="&#xe9;" k="37" />
+<hkern u1="&#x28;" u2="&#xe8;" k="37" />
+<hkern u1="&#x28;" u2="&#xe7;" k="37" />
+<hkern u1="&#x28;" u2="&#xe6;" k="10" />
+<hkern u1="&#x28;" u2="&#xe5;" k="10" />
+<hkern u1="&#x28;" u2="&#xe4;" k="10" />
+<hkern u1="&#x28;" u2="&#xe3;" k="10" />
+<hkern u1="&#x28;" u2="&#xe2;" k="10" />
+<hkern u1="&#x28;" u2="&#xe1;" k="10" />
+<hkern u1="&#x28;" u2="&#xe0;" k="10" />
+<hkern u1="&#x28;" u2="&#xd8;" k="27" />
+<hkern u1="&#x28;" u2="&#xd6;" k="27" />
+<hkern u1="&#x28;" u2="&#xd5;" k="27" />
+<hkern u1="&#x28;" u2="&#xd4;" k="27" />
+<hkern u1="&#x28;" u2="&#xd3;" k="27" />
+<hkern u1="&#x28;" u2="&#xd2;" k="27" />
+<hkern u1="&#x28;" u2="&#xc7;" k="25" />
+<hkern u1="&#x28;" u2="&#x7b;" k="23" />
+<hkern u1="&#x28;" u2="y" k="8" />
+<hkern u1="&#x28;" u2="w" k="12" />
+<hkern u1="&#x28;" u2="v" k="8" />
+<hkern u1="&#x28;" u2="u" k="29" />
+<hkern u1="&#x28;" u2="s" k="8" />
+<hkern u1="&#x28;" u2="r" k="8" />
+<hkern u1="&#x28;" u2="q" k="37" />
+<hkern u1="&#x28;" u2="p" k="8" />
+<hkern u1="&#x28;" u2="o" k="37" />
+<hkern u1="&#x28;" u2="n" k="8" />
+<hkern u1="&#x28;" u2="m" k="8" />
+<hkern u1="&#x28;" u2="j" k="-18" />
+<hkern u1="&#x28;" u2="f" k="8" />
+<hkern u1="&#x28;" u2="e" k="37" />
+<hkern u1="&#x28;" u2="d" k="37" />
+<hkern u1="&#x28;" u2="c" k="37" />
+<hkern u1="&#x28;" u2="a" k="10" />
+<hkern u1="&#x28;" u2="Q" k="27" />
+<hkern u1="&#x28;" u2="O" k="27" />
+<hkern u1="&#x28;" u2="G" k="27" />
+<hkern u1="&#x28;" u2="C" k="25" />
+<hkern u1="&#x29;" u2="&#x7d;" k="16" />
+<hkern u1="&#x29;" u2="]" k="16" />
+<hkern u1="&#x2a;" u2="&#x153;" k="35" />
+<hkern u1="&#x2a;" u2="&#xf8;" k="35" />
+<hkern u1="&#x2a;" u2="&#xf6;" k="35" />
+<hkern u1="&#x2a;" u2="&#xf5;" k="35" />
+<hkern u1="&#x2a;" u2="&#xf4;" k="35" />
+<hkern u1="&#x2a;" u2="&#xf3;" k="35" />
+<hkern u1="&#x2a;" u2="&#xf2;" k="35" />
+<hkern u1="&#x2a;" u2="&#xf0;" k="35" />
+<hkern u1="&#x2a;" u2="&#xef;" k="-33" />
+<hkern u1="&#x2a;" u2="&#xee;" k="-43" />
+<hkern u1="&#x2a;" u2="&#xec;" k="-20" />
+<hkern u1="&#x2a;" u2="&#xeb;" k="35" />
+<hkern u1="&#x2a;" u2="&#xea;" k="35" />
+<hkern u1="&#x2a;" u2="&#xe9;" k="35" />
+<hkern u1="&#x2a;" u2="&#xe8;" k="35" />
+<hkern u1="&#x2a;" u2="&#xe7;" k="35" />
+<hkern u1="&#x2a;" u2="&#xc6;" k="98" />
+<hkern u1="&#x2a;" u2="&#xc5;" k="80" />
+<hkern u1="&#x2a;" u2="&#xc4;" k="80" />
+<hkern u1="&#x2a;" u2="&#xc3;" k="80" />
+<hkern u1="&#x2a;" u2="&#xc2;" k="80" />
+<hkern u1="&#x2a;" u2="&#xc1;" k="80" />
+<hkern u1="&#x2a;" u2="&#xc0;" k="80" />
+<hkern u1="&#x2a;" u2="s" k="23" />
+<hkern u1="&#x2a;" u2="q" k="41" />
+<hkern u1="&#x2a;" u2="o" k="35" />
+<hkern u1="&#x2a;" u2="g" k="29" />
+<hkern u1="&#x2a;" u2="e" k="35" />
+<hkern u1="&#x2a;" u2="d" k="41" />
+<hkern u1="&#x2a;" u2="c" k="35" />
+<hkern u1="&#x2a;" u2="Z" k="23" />
+<hkern u1="&#x2a;" u2="T" k="-8" />
+<hkern u1="&#x2a;" u2="J" k="43" />
+<hkern u1="&#x2a;" u2="A" k="80" />
+<hkern u1="&#x2c;" u2="v" k="72" />
+<hkern u1="&#x2c;" u2="f" k="20" />
+<hkern u1="&#x2c;" u2="V" k="109" />
+<hkern u1="&#x2d;" u2="&#xc6;" k="35" />
+<hkern u1="&#x2d;" u2="x" k="63" />
+<hkern u1="&#x2d;" u2="v" k="27" />
+<hkern u1="&#x2d;" u2="f" k="25" />
+<hkern u1="&#x2d;" u2="X" k="80" />
+<hkern u1="&#x2d;" u2="V" k="63" />
+<hkern u1="&#x2e;" u2="v" k="72" />
+<hkern u1="&#x2e;" u2="f" k="20" />
+<hkern u1="&#x2e;" u2="V" k="109" />
+<hkern u1="&#x2f;" u2="&#x153;" k="68" />
+<hkern u1="&#x2f;" u2="&#x152;" k="12" />
+<hkern u1="&#x2f;" u2="&#xff;" k="12" />
+<hkern u1="&#x2f;" u2="&#xfd;" k="12" />
+<hkern u1="&#x2f;" u2="&#xfc;" k="37" />
+<hkern u1="&#x2f;" u2="&#xfb;" k="37" />
+<hkern u1="&#x2f;" u2="&#xfa;" k="37" />
+<hkern u1="&#x2f;" u2="&#xf9;" k="37" />
+<hkern u1="&#x2f;" u2="&#xf8;" k="68" />
+<hkern u1="&#x2f;" u2="&#xf6;" k="68" />
+<hkern u1="&#x2f;" u2="&#xf5;" k="68" />
+<hkern u1="&#x2f;" u2="&#xf4;" k="68" />
+<hkern u1="&#x2f;" u2="&#xf3;" k="68" />
+<hkern u1="&#x2f;" u2="&#xf2;" k="68" />
+<hkern u1="&#x2f;" u2="&#xf1;" k="41" />
+<hkern u1="&#x2f;" u2="&#xf0;" k="31" />
+<hkern u1="&#x2f;" u2="&#xef;" k="-51" />
+<hkern u1="&#x2f;" u2="&#xec;" k="-84" />
+<hkern u1="&#x2f;" u2="&#xeb;" k="68" />
+<hkern u1="&#x2f;" u2="&#xea;" k="68" />
+<hkern u1="&#x2f;" u2="&#xe9;" k="68" />
+<hkern u1="&#x2f;" u2="&#xe8;" k="68" />
+<hkern u1="&#x2f;" u2="&#xe7;" k="68" />
+<hkern u1="&#x2f;" u2="&#xe6;" k="43" />
+<hkern u1="&#x2f;" u2="&#xe5;" k="43" />
+<hkern u1="&#x2f;" u2="&#xe4;" k="43" />
+<hkern u1="&#x2f;" u2="&#xe3;" k="43" />
+<hkern u1="&#x2f;" u2="&#xe2;" k="43" />
+<hkern u1="&#x2f;" u2="&#xe1;" k="43" />
+<hkern u1="&#x2f;" u2="&#xe0;" k="43" />
+<hkern u1="&#x2f;" u2="&#xd8;" k="12" />
+<hkern u1="&#x2f;" u2="&#xd6;" k="12" />
+<hkern u1="&#x2f;" u2="&#xd5;" k="12" />
+<hkern u1="&#x2f;" u2="&#xd4;" k="12" />
+<hkern u1="&#x2f;" u2="&#xd3;" k="12" />
+<hkern u1="&#x2f;" u2="&#xd2;" k="12" />
+<hkern u1="&#x2f;" u2="&#xc7;" k="10" />
+<hkern u1="&#x2f;" u2="&#xc6;" k="106" />
+<hkern u1="&#x2f;" u2="&#xc5;" k="88" />
+<hkern u1="&#x2f;" u2="&#xc4;" k="88" />
+<hkern u1="&#x2f;" u2="&#xc3;" k="88" />
+<hkern u1="&#x2f;" u2="&#xc2;" k="88" />
+<hkern u1="&#x2f;" u2="&#xc1;" k="88" />
+<hkern u1="&#x2f;" u2="&#xc0;" k="88" />
+<hkern u1="&#x2f;" u2="z" k="14" />
+<hkern u1="&#x2f;" u2="y" k="12" />
+<hkern u1="&#x2f;" u2="w" k="10" />
+<hkern u1="&#x2f;" u2="v" k="10" />
+<hkern u1="&#x2f;" u2="u" k="37" />
+<hkern u1="&#x2f;" u2="s" k="53" />
+<hkern u1="&#x2f;" u2="r" k="41" />
+<hkern u1="&#x2f;" u2="q" k="70" />
+<hkern u1="&#x2f;" u2="p" k="41" />
+<hkern u1="&#x2f;" u2="o" k="68" />
+<hkern u1="&#x2f;" u2="n" k="41" />
+<hkern u1="&#x2f;" u2="m" k="41" />
+<hkern u1="&#x2f;" u2="g" k="66" />
+<hkern u1="&#x2f;" u2="e" k="68" />
+<hkern u1="&#x2f;" u2="d" k="70" />
+<hkern u1="&#x2f;" u2="c" k="68" />
+<hkern u1="&#x2f;" u2="a" k="43" />
+<hkern u1="&#x2f;" u2="Q" k="12" />
+<hkern u1="&#x2f;" u2="O" k="12" />
+<hkern u1="&#x2f;" u2="J" k="39" />
+<hkern u1="&#x2f;" u2="G" k="12" />
+<hkern u1="&#x2f;" u2="C" k="10" />
+<hkern u1="&#x2f;" u2="A" k="88" />
+<hkern u1="&#x2f;" u2="&#x2f;" k="575" />
+<hkern u1="&#x3a;" u2="V" k="29" />
+<hkern u1="&#x3b;" u2="V" k="29" />
+<hkern u1="&#x40;" u2="&#x178;" k="59" />
+<hkern u1="&#x40;" u2="&#xdd;" k="59" />
+<hkern u1="&#x40;" u2="&#xc6;" k="12" />
+<hkern u1="&#x40;" u2="Y" k="59" />
+<hkern u1="&#x40;" u2="V" k="16" />
+<hkern u1="&#x40;" u2="T" k="33" />
+<hkern u1="&#x40;" u2="J" k="16" />
+<hkern u1="A" u2="&#x2122;" k="84" />
+<hkern u1="A" u2="&#xf0;" k="10" />
+<hkern u1="A" u2="&#xae;" k="53" />
+<hkern u1="A" u2="&#x7d;" k="41" />
+<hkern u1="A" u2="v" k="37" />
+<hkern u1="A" u2="f" k="14" />
+<hkern u1="A" u2="]" k="47" />
+<hkern u1="A" u2="\" k="96" />
+<hkern u1="A" u2="V" k="57" />
+<hkern u1="A" u2="&#x3f;" k="51" />
+<hkern u1="A" u2="&#x2a;" k="74" />
+<hkern u1="B" u2="&#x178;" k="51" />
+<hkern u1="B" u2="&#xff;" k="8" />
+<hkern u1="B" u2="&#xfd;" k="8" />
+<hkern u1="B" u2="&#xdd;" k="51" />
+<hkern u1="B" u2="&#xc6;" k="27" />
+<hkern u1="B" u2="&#xc5;" k="20" />
+<hkern u1="B" u2="&#xc4;" k="20" />
+<hkern u1="B" u2="&#xc3;" k="20" />
+<hkern u1="B" u2="&#xc2;" k="20" />
+<hkern u1="B" u2="&#xc1;" k="20" />
+<hkern u1="B" u2="&#xc0;" k="20" />
+<hkern u1="B" u2="&#x7d;" k="41" />
+<hkern u1="B" u2="y" k="8" />
+<hkern u1="B" u2="x" k="10" />
+<hkern u1="B" u2="w" k="8" />
+<hkern u1="B" u2="v" k="8" />
+<hkern u1="B" u2="g" k="18" />
+<hkern u1="B" u2="]" k="55" />
+<hkern u1="B" u2="\" k="12" />
+<hkern u1="B" u2="Y" k="51" />
+<hkern u1="B" u2="X" k="27" />
+<hkern u1="B" u2="W" k="6" />
+<hkern u1="B" u2="V" k="23" />
+<hkern u1="B" u2="T" k="33" />
+<hkern u1="B" u2="J" k="33" />
+<hkern u1="B" u2="A" k="20" />
+<hkern u1="B" u2="&#x3f;" k="14" />
+<hkern u1="C" u2="&#xf0;" k="14" />
+<hkern u1="C" u2="&#xef;" k="-29" />
+<hkern u1="C" u2="&#xee;" k="-25" />
+<hkern u1="C" u2="&#xec;" k="-68" />
+<hkern u1="C" u2="&#xae;" k="27" />
+<hkern u1="C" u2="v" k="33" />
+<hkern u1="C" u2="f" k="12" />
+<hkern u1="D" u2="&#xc6;" k="35" />
+<hkern u1="D" u2="&#x7d;" k="53" />
+<hkern u1="D" u2="x" k="6" />
+<hkern u1="D" u2="]" k="59" />
+<hkern u1="D" u2="\" k="14" />
+<hkern u1="D" u2="X" k="43" />
+<hkern u1="D" u2="V" k="25" />
+<hkern u1="D" u2="&#x3f;" k="18" />
+<hkern u1="D" u2="&#x2f;" k="12" />
+<hkern u1="D" u2="&#x29;" k="25" />
+<hkern u1="E" u2="&#xf0;" k="16" />
+<hkern u1="E" u2="&#xef;" k="-27" />
+<hkern u1="E" u2="&#xee;" k="-25" />
+<hkern u1="E" u2="&#xec;" k="-74" />
+<hkern u1="E" u2="v" k="23" />
+<hkern u1="E" u2="f" k="6" />
+<hkern u1="F" u2="&#x2026;" k="147" />
+<hkern u1="F" u2="&#x201e;" k="147" />
+<hkern u1="F" u2="&#x201a;" k="147" />
+<hkern u1="F" u2="&#x2014;" k="8" />
+<hkern u1="F" u2="&#x2013;" k="8" />
+<hkern u1="F" u2="&#x153;" k="37" />
+<hkern u1="F" u2="&#x152;" k="20" />
+<hkern u1="F" u2="&#xff;" k="27" />
+<hkern u1="F" u2="&#xfd;" k="27" />
+<hkern u1="F" u2="&#xfc;" k="37" />
+<hkern u1="F" u2="&#xfb;" k="37" />
+<hkern u1="F" u2="&#xfa;" k="37" />
+<hkern u1="F" u2="&#xf9;" k="37" />
+<hkern u1="F" u2="&#xf8;" k="37" />
+<hkern u1="F" u2="&#xf6;" k="37" />
+<hkern u1="F" u2="&#xf5;" k="37" />
+<hkern u1="F" u2="&#xf4;" k="37" />
+<hkern u1="F" u2="&#xf3;" k="37" />
+<hkern u1="F" u2="&#xf2;" k="37" />
+<hkern u1="F" u2="&#xf1;" k="43" />
+<hkern u1="F" u2="&#xf0;" k="41" />
+<hkern u1="F" u2="&#xef;" k="-57" />
+<hkern u1="F" u2="&#xee;" k="-37" />
+<hkern u1="F" u2="&#xec;" k="-113" />
+<hkern u1="F" u2="&#xeb;" k="37" />
+<hkern u1="F" u2="&#xea;" k="37" />
+<hkern u1="F" u2="&#xe9;" k="37" />
+<hkern u1="F" u2="&#xe8;" k="37" />
+<hkern u1="F" u2="&#xe7;" k="37" />
+<hkern u1="F" u2="&#xe6;" k="68" />
+<hkern u1="F" u2="&#xe5;" k="68" />
+<hkern u1="F" u2="&#xe4;" k="68" />
+<hkern u1="F" u2="&#xe3;" k="68" />
+<hkern u1="F" u2="&#xe2;" k="68" />
+<hkern u1="F" u2="&#xe1;" k="68" />
+<hkern u1="F" u2="&#xe0;" k="68" />
+<hkern u1="F" u2="&#xd8;" k="20" />
+<hkern u1="F" u2="&#xd6;" k="20" />
+<hkern u1="F" u2="&#xd5;" k="20" />
+<hkern u1="F" u2="&#xd4;" k="20" />
+<hkern u1="F" u2="&#xd3;" k="20" />
+<hkern u1="F" u2="&#xd2;" k="20" />
+<hkern u1="F" u2="&#xc7;" k="20" />
+<hkern u1="F" u2="&#xc6;" k="94" />
+<hkern u1="F" u2="&#xc5;" k="70" />
+<hkern u1="F" u2="&#xc4;" k="70" />
+<hkern u1="F" u2="&#xc3;" k="70" />
+<hkern u1="F" u2="&#xc2;" k="70" />
+<hkern u1="F" u2="&#xc1;" k="70" />
+<hkern u1="F" u2="&#xc0;" k="70" />
+<hkern u1="F" u2="z" k="41" />
+<hkern u1="F" u2="y" k="27" />
+<hkern u1="F" u2="x" k="47" />
+<hkern u1="F" u2="w" k="29" />
+<hkern u1="F" u2="v" k="23" />
+<hkern u1="F" u2="u" k="37" />
+<hkern u1="F" u2="t" k="14" />
+<hkern u1="F" u2="s" k="35" />
+<hkern u1="F" u2="r" k="43" />
+<hkern u1="F" u2="q" k="39" />
+<hkern u1="F" u2="p" k="43" />
+<hkern u1="F" u2="o" k="37" />
+<hkern u1="F" u2="n" k="43" />
+<hkern u1="F" u2="m" k="43" />
+<hkern u1="F" u2="g" k="43" />
+<hkern u1="F" u2="f" k="14" />
+<hkern u1="F" u2="e" k="37" />
+<hkern u1="F" u2="d" k="39" />
+<hkern u1="F" u2="c" k="37" />
+<hkern u1="F" u2="a" k="68" />
+<hkern u1="F" u2="X" k="8" />
+<hkern u1="F" u2="S" k="20" />
+<hkern u1="F" u2="Q" k="20" />
+<hkern u1="F" u2="O" k="20" />
+<hkern u1="F" u2="J" k="43" />
+<hkern u1="F" u2="G" k="20" />
+<hkern u1="F" u2="C" k="20" />
+<hkern u1="F" u2="A" k="70" />
+<hkern u1="F" u2="&#x2f;" k="63" />
+<hkern u1="F" u2="&#x2e;" k="147" />
+<hkern u1="F" u2="&#x2d;" k="8" />
+<hkern u1="F" u2="&#x2c;" k="147" />
+<hkern u1="G" u2="&#xef;" k="-12" />
+<hkern u1="G" u2="&#xee;" k="-8" />
+<hkern u1="G" u2="&#xec;" k="-31" />
+<hkern u1="G" u2="v" k="14" />
+<hkern u1="G" u2="f" k="12" />
+<hkern u1="G" u2="\" k="8" />
+<hkern u1="G" u2="V" k="18" />
+<hkern u1="H" u2="&#xf0;" k="6" />
+<hkern u1="H" u2="&#xec;" k="-6" />
+<hkern u1="I" u2="&#xf0;" k="6" />
+<hkern u1="I" u2="&#xec;" k="-6" />
+<hkern u1="J" u2="&#xf0;" k="6" />
+<hkern u1="J" u2="&#xec;" k="-8" />
+<hkern u1="K" u2="&#xf0;" k="16" />
+<hkern u1="K" u2="&#xef;" k="-55" />
+<hkern u1="K" u2="&#xec;" k="-100" />
+<hkern u1="K" u2="&#xae;" k="23" />
+<hkern u1="K" u2="v" k="49" />
+<hkern u1="K" u2="f" k="8" />
+<hkern u1="L" u2="&#x2122;" k="184" />
+<hkern u1="L" u2="&#xf0;" k="10" />
+<hkern u1="L" u2="&#xb7;" k="115" />
+<hkern u1="L" u2="&#xae;" k="172" />
+<hkern u1="L" u2="&#x7d;" k="23" />
+<hkern u1="L" u2="v" k="92" />
+<hkern u1="L" u2="f" k="6" />
+<hkern u1="L" u2="]" k="29" />
+<hkern u1="L" u2="\" k="145" />
+<hkern u1="L" u2="V" k="121" />
+<hkern u1="L" u2="&#x3f;" k="27" />
+<hkern u1="L" u2="&#x2a;" k="182" />
+<hkern u1="M" u2="&#xf0;" k="6" />
+<hkern u1="M" u2="&#xec;" k="-6" />
+<hkern u1="N" u2="&#xf0;" k="6" />
+<hkern u1="N" u2="&#xec;" k="-6" />
+<hkern u1="O" u2="&#xc6;" k="31" />
+<hkern u1="O" u2="&#x7d;" k="51" />
+<hkern u1="O" u2="]" k="57" />
+<hkern u1="O" u2="\" k="16" />
+<hkern u1="O" u2="X" k="39" />
+<hkern u1="O" u2="V" k="25" />
+<hkern u1="O" u2="&#x3f;" k="14" />
+<hkern u1="O" u2="&#x2f;" k="12" />
+<hkern u1="O" u2="&#x29;" k="10" />
+<hkern u1="P" u2="&#x2039;" k="18" />
+<hkern u1="P" u2="&#x2026;" k="166" />
+<hkern u1="P" u2="&#x201e;" k="166" />
+<hkern u1="P" u2="&#x201a;" k="166" />
+<hkern u1="P" u2="&#x2014;" k="18" />
+<hkern u1="P" u2="&#x2013;" k="18" />
+<hkern u1="P" u2="&#x178;" k="41" />
+<hkern u1="P" u2="&#x153;" k="8" />
+<hkern u1="P" u2="&#xf8;" k="8" />
+<hkern u1="P" u2="&#xf6;" k="8" />
+<hkern u1="P" u2="&#xf5;" k="8" />
+<hkern u1="P" u2="&#xf4;" k="8" />
+<hkern u1="P" u2="&#xf3;" k="8" />
+<hkern u1="P" u2="&#xf2;" k="8" />
+<hkern u1="P" u2="&#xf0;" k="35" />
+<hkern u1="P" u2="&#xef;" k="-6" />
+<hkern u1="P" u2="&#xee;" k="-12" />
+<hkern u1="P" u2="&#xec;" k="-8" />
+<hkern u1="P" u2="&#xeb;" k="8" />
+<hkern u1="P" u2="&#xea;" k="8" />
+<hkern u1="P" u2="&#xe9;" k="8" />
+<hkern u1="P" u2="&#xe8;" k="8" />
+<hkern u1="P" u2="&#xe7;" k="8" />
+<hkern u1="P" u2="&#xe6;" k="10" />
+<hkern u1="P" u2="&#xe5;" k="10" />
+<hkern u1="P" u2="&#xe4;" k="10" />
+<hkern u1="P" u2="&#xe3;" k="10" />
+<hkern u1="P" u2="&#xe2;" k="10" />
+<hkern u1="P" u2="&#xe1;" k="10" />
+<hkern u1="P" u2="&#xe0;" k="10" />
+<hkern u1="P" u2="&#xdd;" k="41" />
+<hkern u1="P" u2="&#xc6;" k="74" />
+<hkern u1="P" u2="&#xc5;" k="63" />
+<hkern u1="P" u2="&#xc4;" k="63" />
+<hkern u1="P" u2="&#xc3;" k="63" />
+<hkern u1="P" u2="&#xc2;" k="63" />
+<hkern u1="P" u2="&#xc1;" k="63" />
+<hkern u1="P" u2="&#xc0;" k="63" />
+<hkern u1="P" u2="&#xab;" k="18" />
+<hkern u1="P" u2="&#x7d;" k="43" />
+<hkern u1="P" u2="q" k="10" />
+<hkern u1="P" u2="o" k="8" />
+<hkern u1="P" u2="g" k="8" />
+<hkern u1="P" u2="e" k="8" />
+<hkern u1="P" u2="d" k="10" />
+<hkern u1="P" u2="c" k="8" />
+<hkern u1="P" u2="a" k="10" />
+<hkern u1="P" u2="]" k="47" />
+<hkern u1="P" u2="\" k="10" />
+<hkern u1="P" u2="Z" k="14" />
+<hkern u1="P" u2="Y" k="41" />
+<hkern u1="P" u2="X" k="35" />
+<hkern u1="P" u2="V" k="12" />
+<hkern u1="P" u2="J" k="53" />
+<hkern u1="P" u2="A" k="63" />
+<hkern u1="P" u2="&#x2f;" k="74" />
+<hkern u1="P" u2="&#x2e;" k="166" />
+<hkern u1="P" u2="&#x2d;" k="18" />
+<hkern u1="P" u2="&#x2c;" k="166" />
+<hkern u1="P" u2="&#x29;" k="8" />
+<hkern u1="Q" u2="&#xc6;" k="31" />
+<hkern u1="Q" u2="&#x7d;" k="51" />
+<hkern u1="Q" u2="]" k="57" />
+<hkern u1="Q" u2="\" k="16" />
+<hkern u1="Q" u2="X" k="39" />
+<hkern u1="Q" u2="V" k="25" />
+<hkern u1="Q" u2="&#x3f;" k="14" />
+<hkern u1="Q" u2="&#x2f;" k="12" />
+<hkern u1="Q" u2="&#x29;" k="10" />
+<hkern u1="R" u2="&#xf0;" k="27" />
+<hkern u1="R" u2="&#xc6;" k="16" />
+<hkern u1="R" u2="&#x7d;" k="31" />
+<hkern u1="R" u2="]" k="35" />
+<hkern u1="R" u2="\" k="12" />
+<hkern u1="R" u2="V" k="20" />
+<hkern u1="S" u2="&#xef;" k="-16" />
+<hkern u1="S" u2="&#xee;" k="-6" />
+<hkern u1="S" u2="&#xec;" k="-41" />
+<hkern u1="S" u2="&#xc6;" k="25" />
+<hkern u1="S" u2="x" k="18" />
+<hkern u1="S" u2="v" k="20" />
+<hkern u1="S" u2="f" k="16" />
+<hkern u1="S" u2="X" k="10" />
+<hkern u1="S" u2="V" k="18" />
+<hkern u1="T" u2="&#xf0;" k="72" />
+<hkern u1="T" u2="&#xef;" k="-84" />
+<hkern u1="T" u2="&#xee;" k="-45" />
+<hkern u1="T" u2="&#xec;" k="-141" />
+<hkern u1="T" u2="&#xe4;" k="168" />
+<hkern u1="T" u2="&#xe3;" k="135" />
+<hkern u1="T" u2="&#xdf;" k="8" />
+<hkern u1="T" u2="&#xc6;" k="111" />
+<hkern u1="T" u2="&#xae;" k="16" />
+<hkern u1="T" u2="x" k="147" />
+<hkern u1="T" u2="v" k="137" />
+<hkern u1="T" u2="f" k="29" />
+<hkern u1="T" u2="&#x40;" k="53" />
+<hkern u1="T" u2="&#x2f;" k="104" />
+<hkern u1="T" u2="&#x26;" k="43" />
+<hkern u1="U" u2="&#xf0;" k="6" />
+<hkern u1="U" u2="&#xec;" k="-12" />
+<hkern u1="U" u2="&#xc6;" k="18" />
+<hkern u1="U" u2="&#x2f;" k="12" />
+<hkern u1="V" u2="&#x203a;" k="39" />
+<hkern u1="V" u2="&#x2039;" k="57" />
+<hkern u1="V" u2="&#x2026;" k="109" />
+<hkern u1="V" u2="&#x201e;" k="109" />
+<hkern u1="V" u2="&#x201a;" k="109" />
+<hkern u1="V" u2="&#x2014;" k="63" />
+<hkern u1="V" u2="&#x2013;" k="63" />
+<hkern u1="V" u2="&#x153;" k="66" />
+<hkern u1="V" u2="&#x152;" k="25" />
+<hkern u1="V" u2="&#xff;" k="16" />
+<hkern u1="V" u2="&#xfd;" k="16" />
+<hkern u1="V" u2="&#xfc;" k="47" />
+<hkern u1="V" u2="&#xfb;" k="47" />
+<hkern u1="V" u2="&#xfa;" k="47" />
+<hkern u1="V" u2="&#xf9;" k="47" />
+<hkern u1="V" u2="&#xf8;" k="66" />
+<hkern u1="V" u2="&#xf6;" k="66" />
+<hkern u1="V" u2="&#xf5;" k="66" />
+<hkern u1="V" u2="&#xf4;" k="66" />
+<hkern u1="V" u2="&#xf3;" k="66" />
+<hkern u1="V" u2="&#xf2;" k="66" />
+<hkern u1="V" u2="&#xf1;" k="53" />
+<hkern u1="V" u2="&#xf0;" k="57" />
+<hkern u1="V" u2="&#xef;" k="-61" />
+<hkern u1="V" u2="&#xee;" k="-25" />
+<hkern u1="V" u2="&#xec;" k="-113" />
+<hkern u1="V" u2="&#xeb;" k="66" />
+<hkern u1="V" u2="&#xea;" k="66" />
+<hkern u1="V" u2="&#xe9;" k="66" />
+<hkern u1="V" u2="&#xe8;" k="66" />
+<hkern u1="V" u2="&#xe7;" k="66" />
+<hkern u1="V" u2="&#xe6;" k="55" />
+<hkern u1="V" u2="&#xe5;" k="55" />
+<hkern u1="V" u2="&#xe4;" k="55" />
+<hkern u1="V" u2="&#xe3;" k="55" />
+<hkern u1="V" u2="&#xe2;" k="55" />
+<hkern u1="V" u2="&#xe1;" k="55" />
+<hkern u1="V" u2="&#xe0;" k="55" />
+<hkern u1="V" u2="&#xd8;" k="25" />
+<hkern u1="V" u2="&#xd6;" k="25" />
+<hkern u1="V" u2="&#xd5;" k="25" />
+<hkern u1="V" u2="&#xd4;" k="25" />
+<hkern u1="V" u2="&#xd3;" k="25" />
+<hkern u1="V" u2="&#xd2;" k="25" />
+<hkern u1="V" u2="&#xc7;" k="23" />
+<hkern u1="V" u2="&#xc6;" k="66" />
+<hkern u1="V" u2="&#xc5;" k="57" />
+<hkern u1="V" u2="&#xc4;" k="57" />
+<hkern u1="V" u2="&#xc3;" k="57" />
+<hkern u1="V" u2="&#xc2;" k="57" />
+<hkern u1="V" u2="&#xc1;" k="57" />
+<hkern u1="V" u2="&#xc0;" k="57" />
+<hkern u1="V" u2="&#xbb;" k="39" />
+<hkern u1="V" u2="&#xae;" k="14" />
+<hkern u1="V" u2="&#xab;" k="57" />
+<hkern u1="V" u2="z" k="25" />
+<hkern u1="V" u2="y" k="16" />
+<hkern u1="V" u2="x" k="16" />
+<hkern u1="V" u2="w" k="20" />
+<hkern u1="V" u2="v" k="16" />
+<hkern u1="V" u2="u" k="47" />
+<hkern u1="V" u2="s" k="51" />
+<hkern u1="V" u2="r" k="53" />
+<hkern u1="V" u2="q" k="66" />
+<hkern u1="V" u2="p" k="53" />
+<hkern u1="V" u2="o" k="66" />
+<hkern u1="V" u2="n" k="53" />
+<hkern u1="V" u2="m" k="53" />
+<hkern u1="V" u2="g" k="76" />
+<hkern u1="V" u2="f" k="6" />
+<hkern u1="V" u2="e" k="66" />
+<hkern u1="V" u2="d" k="66" />
+<hkern u1="V" u2="c" k="66" />
+<hkern u1="V" u2="a" k="55" />
+<hkern u1="V" u2="S" k="16" />
+<hkern u1="V" u2="Q" k="25" />
+<hkern u1="V" u2="O" k="25" />
+<hkern u1="V" u2="J" k="55" />
+<hkern u1="V" u2="G" k="25" />
+<hkern u1="V" u2="C" k="23" />
+<hkern u1="V" u2="A" k="57" />
+<hkern u1="V" u2="&#x40;" k="29" />
+<hkern u1="V" u2="&#x3b;" k="29" />
+<hkern u1="V" u2="&#x3a;" k="29" />
+<hkern u1="V" u2="&#x2f;" k="84" />
+<hkern u1="V" u2="&#x2e;" k="109" />
+<hkern u1="V" u2="&#x2d;" k="63" />
+<hkern u1="V" u2="&#x2c;" k="109" />
+<hkern u1="V" u2="&#x26;" k="39" />
+<hkern u1="W" u2="&#xf0;" k="37" />
+<hkern u1="W" u2="&#xef;" k="-43" />
+<hkern u1="W" u2="&#xee;" k="-25" />
+<hkern u1="W" u2="&#xec;" k="-98" />
+<hkern u1="W" u2="&#xc6;" k="55" />
+<hkern u1="W" u2="&#x2f;" k="55" />
+<hkern u1="W" u2="&#x26;" k="12" />
+<hkern u1="X" u2="&#x2039;" k="47" />
+<hkern u1="X" u2="&#x2014;" k="78" />
+<hkern u1="X" u2="&#x2013;" k="78" />
+<hkern u1="X" u2="&#x153;" k="43" />
+<hkern u1="X" u2="&#x152;" k="39" />
+<hkern u1="X" u2="&#xff;" k="55" />
+<hkern u1="X" u2="&#xfd;" k="55" />
+<hkern u1="X" u2="&#xfc;" k="33" />
+<hkern u1="X" u2="&#xfb;" k="33" />
+<hkern u1="X" u2="&#xfa;" k="33" />
+<hkern u1="X" u2="&#xf9;" k="33" />
+<hkern u1="X" u2="&#xf8;" k="43" />
+<hkern u1="X" u2="&#xf6;" k="43" />
+<hkern u1="X" u2="&#xf5;" k="43" />
+<hkern u1="X" u2="&#xf4;" k="43" />
+<hkern u1="X" u2="&#xf3;" k="43" />
+<hkern u1="X" u2="&#xf2;" k="43" />
+<hkern u1="X" u2="&#xf0;" k="25" />
+<hkern u1="X" u2="&#xef;" k="-74" />
+<hkern u1="X" u2="&#xee;" k="-10" />
+<hkern u1="X" u2="&#xec;" k="-115" />
+<hkern u1="X" u2="&#xeb;" k="43" />
+<hkern u1="X" u2="&#xea;" k="43" />
+<hkern u1="X" u2="&#xe9;" k="43" />
+<hkern u1="X" u2="&#xe8;" k="43" />
+<hkern u1="X" u2="&#xe7;" k="43" />
+<hkern u1="X" u2="&#xd8;" k="39" />
+<hkern u1="X" u2="&#xd6;" k="39" />
+<hkern u1="X" u2="&#xd5;" k="39" />
+<hkern u1="X" u2="&#xd4;" k="39" />
+<hkern u1="X" u2="&#xd3;" k="39" />
+<hkern u1="X" u2="&#xd2;" k="39" />
+<hkern u1="X" u2="&#xc7;" k="37" />
+<hkern u1="X" u2="&#xae;" k="18" />
+<hkern u1="X" u2="&#xab;" k="47" />
+<hkern u1="X" u2="y" k="55" />
+<hkern u1="X" u2="w" k="51" />
+<hkern u1="X" u2="v" k="53" />
+<hkern u1="X" u2="u" k="33" />
+<hkern u1="X" u2="t" k="18" />
+<hkern u1="X" u2="q" k="37" />
+<hkern u1="X" u2="o" k="43" />
+<hkern u1="X" u2="g" k="33" />
+<hkern u1="X" u2="f" k="8" />
+<hkern u1="X" u2="e" k="43" />
+<hkern u1="X" u2="d" k="37" />
+<hkern u1="X" u2="c" k="43" />
+<hkern u1="X" u2="Q" k="39" />
+<hkern u1="X" u2="O" k="39" />
+<hkern u1="X" u2="G" k="39" />
+<hkern u1="X" u2="C" k="37" />
+<hkern u1="X" u2="&#x2d;" k="78" />
+<hkern u1="Y" u2="&#xff;" k="70" />
+<hkern u1="Y" u2="&#xf0;" k="80" />
+<hkern u1="Y" u2="&#xef;" k="-90" />
+<hkern u1="Y" u2="&#xee;" k="-16" />
+<hkern u1="Y" u2="&#xec;" k="-131" />
+<hkern u1="Y" u2="&#xeb;" k="137" />
+<hkern u1="Y" u2="&#xe4;" k="117" />
+<hkern u1="Y" u2="&#xe3;" k="109" />
+<hkern u1="Y" u2="&#xdf;" k="12" />
+<hkern u1="Y" u2="&#xc6;" k="106" />
+<hkern u1="Y" u2="&#xae;" k="45" />
+<hkern u1="Y" u2="x" k="82" />
+<hkern u1="Y" u2="v" k="84" />
+<hkern u1="Y" u2="f" k="37" />
+<hkern u1="Y" u2="&#x40;" k="74" />
+<hkern u1="Y" u2="&#x2f;" k="131" />
+<hkern u1="Y" u2="&#x26;" k="76" />
+<hkern u1="Z" u2="&#xf0;" k="16" />
+<hkern u1="Z" u2="&#xef;" k="-25" />
+<hkern u1="Z" u2="&#xee;" k="-31" />
+<hkern u1="Z" u2="&#xec;" k="-80" />
+<hkern u1="Z" u2="&#xae;" k="14" />
+<hkern u1="Z" u2="v" k="25" />
+<hkern u1="Z" u2="f" k="6" />
+<hkern u1="[" u2="&#x153;" k="78" />
+<hkern u1="[" u2="&#x152;" k="57" />
+<hkern u1="[" u2="&#xff;" k="61" />
+<hkern u1="[" u2="&#xfd;" k="61" />
+<hkern u1="[" u2="&#xfc;" k="70" />
+<hkern u1="[" u2="&#xfb;" k="70" />
+<hkern u1="[" u2="&#xfa;" k="70" />
+<hkern u1="[" u2="&#xf9;" k="70" />
+<hkern u1="[" u2="&#xf8;" k="78" />
+<hkern u1="[" u2="&#xf6;" k="78" />
+<hkern u1="[" u2="&#xf5;" k="78" />
+<hkern u1="[" u2="&#xf4;" k="78" />
+<hkern u1="[" u2="&#xf3;" k="78" />
+<hkern u1="[" u2="&#xf2;" k="78" />
+<hkern u1="[" u2="&#xf1;" k="51" />
+<hkern u1="[" u2="&#xf0;" k="27" />
+<hkern u1="[" u2="&#xef;" k="-31" />
+<hkern u1="[" u2="&#xec;" k="-80" />
+<hkern u1="[" u2="&#xeb;" k="78" />
+<hkern u1="[" u2="&#xea;" k="78" />
+<hkern u1="[" u2="&#xe9;" k="78" />
+<hkern u1="[" u2="&#xe8;" k="78" />
+<hkern u1="[" u2="&#xe7;" k="78" />
+<hkern u1="[" u2="&#xe6;" k="63" />
+<hkern u1="[" u2="&#xe5;" k="63" />
+<hkern u1="[" u2="&#xe4;" k="63" />
+<hkern u1="[" u2="&#xe3;" k="63" />
+<hkern u1="[" u2="&#xe2;" k="63" />
+<hkern u1="[" u2="&#xe1;" k="63" />
+<hkern u1="[" u2="&#xe0;" k="63" />
+<hkern u1="[" u2="&#xd8;" k="57" />
+<hkern u1="[" u2="&#xd6;" k="57" />
+<hkern u1="[" u2="&#xd5;" k="57" />
+<hkern u1="[" u2="&#xd4;" k="57" />
+<hkern u1="[" u2="&#xd3;" k="57" />
+<hkern u1="[" u2="&#xd2;" k="57" />
+<hkern u1="[" u2="&#xc7;" k="53" />
+<hkern u1="[" u2="&#xc6;" k="47" />
+<hkern u1="[" u2="&#xc5;" k="47" />
+<hkern u1="[" u2="&#xc4;" k="47" />
+<hkern u1="[" u2="&#xc3;" k="47" />
+<hkern u1="[" u2="&#xc2;" k="47" />
+<hkern u1="[" u2="&#xc1;" k="47" />
+<hkern u1="[" u2="&#xc0;" k="47" />
+<hkern u1="[" u2="&#x7b;" k="43" />
+<hkern u1="[" u2="z" k="41" />
+<hkern u1="[" u2="y" k="61" />
+<hkern u1="[" u2="x" k="37" />
+<hkern u1="[" u2="w" k="68" />
+<hkern u1="[" u2="v" k="66" />
+<hkern u1="[" u2="u" k="70" />
+<hkern u1="[" u2="t" k="51" />
+<hkern u1="[" u2="s" k="51" />
+<hkern u1="[" u2="r" k="51" />
+<hkern u1="[" u2="q" k="76" />
+<hkern u1="[" u2="p" k="51" />
+<hkern u1="[" u2="o" k="78" />
+<hkern u1="[" u2="n" k="51" />
+<hkern u1="[" u2="m" k="51" />
+<hkern u1="[" u2="j" k="-8" />
+<hkern u1="[" u2="f" k="31" />
+<hkern u1="[" u2="e" k="78" />
+<hkern u1="[" u2="d" k="76" />
+<hkern u1="[" u2="c" k="78" />
+<hkern u1="[" u2="a" k="63" />
+<hkern u1="[" u2="S" k="23" />
+<hkern u1="[" u2="Q" k="57" />
+<hkern u1="[" u2="O" k="57" />
+<hkern u1="[" u2="G" k="57" />
+<hkern u1="[" u2="C" k="53" />
+<hkern u1="[" u2="A" k="47" />
+<hkern u1="[" u2="&#x28;" k="16" />
+<hkern u1="\" u2="&#x201d;" k="139" />
+<hkern u1="\" u2="&#x2019;" k="139" />
+<hkern u1="\" u2="&#x178;" k="139" />
+<hkern u1="\" u2="&#x153;" k="8" />
+<hkern u1="\" u2="&#x152;" k="16" />
+<hkern u1="\" u2="&#xff;" k="47" />
+<hkern u1="\" u2="&#xfd;" k="47" />
+<hkern u1="\" u2="&#xf8;" k="8" />
+<hkern u1="\" u2="&#xf6;" k="8" />
+<hkern u1="\" u2="&#xf5;" k="8" />
+<hkern u1="\" u2="&#xf4;" k="8" />
+<hkern u1="\" u2="&#xf3;" k="8" />
+<hkern u1="\" u2="&#xf2;" k="8" />
+<hkern u1="\" u2="&#xeb;" k="8" />
+<hkern u1="\" u2="&#xea;" k="8" />
+<hkern u1="\" u2="&#xe9;" k="8" />
+<hkern u1="\" u2="&#xe8;" k="8" />
+<hkern u1="\" u2="&#xe7;" k="8" />
+<hkern u1="\" u2="&#xdd;" k="139" />
+<hkern u1="\" u2="&#xdc;" k="18" />
+<hkern u1="\" u2="&#xdb;" k="18" />
+<hkern u1="\" u2="&#xda;" k="18" />
+<hkern u1="\" u2="&#xd9;" k="18" />
+<hkern u1="\" u2="&#xd8;" k="16" />
+<hkern u1="\" u2="&#xd6;" k="16" />
+<hkern u1="\" u2="&#xd5;" k="16" />
+<hkern u1="\" u2="&#xd4;" k="16" />
+<hkern u1="\" u2="&#xd3;" k="16" />
+<hkern u1="\" u2="&#xd2;" k="16" />
+<hkern u1="\" u2="&#xc7;" k="16" />
+<hkern u1="\" u2="y" k="47" />
+<hkern u1="\" u2="w" k="37" />
+<hkern u1="\" u2="v" k="47" />
+<hkern u1="\" u2="t" k="25" />
+<hkern u1="\" u2="o" k="8" />
+<hkern u1="\" u2="f" k="10" />
+<hkern u1="\" u2="e" k="8" />
+<hkern u1="\" u2="c" k="8" />
+<hkern u1="\" u2="Y" k="139" />
+<hkern u1="\" u2="W" k="61" />
+<hkern u1="\" u2="V" k="90" />
+<hkern u1="\" u2="U" k="18" />
+<hkern u1="\" u2="T" k="117" />
+<hkern u1="\" u2="S" k="8" />
+<hkern u1="\" u2="Q" k="16" />
+<hkern u1="\" u2="O" k="16" />
+<hkern u1="\" u2="G" k="16" />
+<hkern u1="\" u2="C" k="16" />
+<hkern u1="\" u2="&#x27;" k="141" />
+<hkern u1="\" u2="&#x22;" k="141" />
+<hkern u1="a" u2="&#x2122;" k="25" />
+<hkern u1="a" u2="&#x7d;" k="18" />
+<hkern u1="a" u2="v" k="10" />
+<hkern u1="a" u2="]" k="23" />
+<hkern u1="a" u2="\" k="72" />
+<hkern u1="a" u2="V" k="51" />
+<hkern u1="a" u2="&#x3f;" k="31" />
+<hkern u1="a" u2="&#x2a;" k="6" />
+<hkern u1="b" u2="&#x2122;" k="35" />
+<hkern u1="b" u2="&#xc6;" k="14" />
+<hkern u1="b" u2="&#x7d;" k="68" />
+<hkern u1="b" u2="x" k="25" />
+<hkern u1="b" u2="v" k="16" />
+<hkern u1="b" u2="]" k="76" />
+<hkern u1="b" u2="\" k="74" />
+<hkern u1="b" u2="X" k="41" />
+<hkern u1="b" u2="V" k="63" />
+<hkern u1="b" u2="&#x3f;" k="51" />
+<hkern u1="b" u2="&#x2a;" k="16" />
+<hkern u1="b" u2="&#x29;" k="37" />
+<hkern u1="c" u2="&#xf0;" k="23" />
+<hkern u1="c" u2="&#x7d;" k="33" />
+<hkern u1="c" u2="]" k="39" />
+<hkern u1="c" u2="\" k="20" />
+<hkern u1="c" u2="V" k="25" />
+<hkern u1="c" u2="&#x3f;" k="18" />
+<hkern u1="d" u2="&#xef;" k="-6" />
+<hkern u1="d" u2="&#xec;" k="-14" />
+<hkern u1="e" u2="&#x2122;" k="29" />
+<hkern u1="e" u2="&#xc6;" k="10" />
+<hkern u1="e" u2="&#x7d;" k="55" />
+<hkern u1="e" u2="x" k="8" />
+<hkern u1="e" u2="v" k="16" />
+<hkern u1="e" u2="]" k="51" />
+<hkern u1="e" u2="\" k="70" />
+<hkern u1="e" u2="V" k="63" />
+<hkern u1="e" u2="&#x3f;" k="41" />
+<hkern u1="e" u2="&#x29;" k="10" />
+<hkern u1="f" u2="&#x203a;" k="45" />
+<hkern u1="f" u2="&#x2039;" k="70" />
+<hkern u1="f" u2="&#x2026;" k="84" />
+<hkern u1="f" u2="&#x201e;" k="84" />
+<hkern u1="f" u2="&#x201a;" k="84" />
+<hkern u1="f" u2="&#x2014;" k="86" />
+<hkern u1="f" u2="&#x2013;" k="86" />
+<hkern u1="f" u2="&#x178;" k="20" />
+<hkern u1="f" u2="&#x153;" k="18" />
+<hkern u1="f" u2="&#xf8;" k="18" />
+<hkern u1="f" u2="&#xf6;" k="18" />
+<hkern u1="f" u2="&#xf5;" k="18" />
+<hkern u1="f" u2="&#xf4;" k="18" />
+<hkern u1="f" u2="&#xf3;" k="18" />
+<hkern u1="f" u2="&#xf2;" k="18" />
+<hkern u1="f" u2="&#xf0;" k="72" />
+<hkern u1="f" u2="&#xef;" k="-49" />
+<hkern u1="f" u2="&#xee;" k="-37" />
+<hkern u1="f" u2="&#xec;" k="-158" />
+<hkern u1="f" u2="&#xeb;" k="18" />
+<hkern u1="f" u2="&#xea;" k="18" />
+<hkern u1="f" u2="&#xe9;" k="18" />
+<hkern u1="f" u2="&#xe8;" k="18" />
+<hkern u1="f" u2="&#xe7;" k="18" />
+<hkern u1="f" u2="&#xdd;" k="20" />
+<hkern u1="f" u2="&#xc6;" k="70" />
+<hkern u1="f" u2="&#xc5;" k="61" />
+<hkern u1="f" u2="&#xc4;" k="61" />
+<hkern u1="f" u2="&#xc3;" k="61" />
+<hkern u1="f" u2="&#xc2;" k="61" />
+<hkern u1="f" u2="&#xc1;" k="61" />
+<hkern u1="f" u2="&#xc0;" k="61" />
+<hkern u1="f" u2="&#xbb;" k="45" />
+<hkern u1="f" u2="&#xab;" k="70" />
+<hkern u1="f" u2="q" k="20" />
+<hkern u1="f" u2="o" k="18" />
+<hkern u1="f" u2="g" k="10" />
+<hkern u1="f" u2="e" k="18" />
+<hkern u1="f" u2="d" k="20" />
+<hkern u1="f" u2="c" k="18" />
+<hkern u1="f" u2="Z" k="23" />
+<hkern u1="f" u2="Y" k="20" />
+<hkern u1="f" u2="X" k="27" />
+<hkern u1="f" u2="T" k="63" />
+<hkern u1="f" u2="J" k="51" />
+<hkern u1="f" u2="A" k="61" />
+<hkern u1="f" u2="&#x2f;" k="55" />
+<hkern u1="f" u2="&#x2e;" k="84" />
+<hkern u1="f" u2="&#x2d;" k="86" />
+<hkern u1="f" u2="&#x2c;" k="84" />
+<hkern u1="f" u2="&#x26;" k="18" />
+<hkern u1="g" u2="&#xf0;" k="10" />
+<hkern u1="g" u2="j" k="-39" />
+<hkern u1="g" u2="\" k="12" />
+<hkern u1="h" u2="&#x2122;" k="33" />
+<hkern u1="h" u2="&#x7d;" k="49" />
+<hkern u1="h" u2="v" k="10" />
+<hkern u1="h" u2="]" k="53" />
+<hkern u1="h" u2="\" k="74" />
+<hkern u1="h" u2="V" k="59" />
+<hkern u1="h" u2="&#x3f;" k="45" />
+<hkern u1="h" u2="&#x2a;" k="6" />
+<hkern u1="h" u2="&#x29;" k="8" />
+<hkern u1="i" u2="&#xef;" k="-6" />
+<hkern u1="i" u2="&#xec;" k="-14" />
+<hkern u1="j" u2="&#xef;" k="-6" />
+<hkern u1="j" u2="&#xec;" k="-14" />
+<hkern u1="k" u2="&#xf0;" k="35" />
+<hkern u1="k" u2="&#x7d;" k="27" />
+<hkern u1="k" u2="]" k="35" />
+<hkern u1="k" u2="\" k="14" />
+<hkern u1="k" u2="V" k="18" />
+<hkern u1="k" u2="&#x3f;" k="14" />
+<hkern u1="l" u2="&#xec;" k="-10" />
+<hkern u1="l" u2="&#xb7;" k="111" />
+<hkern u1="m" u2="&#x2122;" k="33" />
+<hkern u1="m" u2="&#x7d;" k="49" />
+<hkern u1="m" u2="v" k="10" />
+<hkern u1="m" u2="]" k="53" />
+<hkern u1="m" u2="\" k="74" />
+<hkern u1="m" u2="V" k="59" />
+<hkern u1="m" u2="&#x3f;" k="45" />
+<hkern u1="m" u2="&#x2a;" k="6" />
+<hkern u1="m" u2="&#x29;" k="8" />
+<hkern u1="n" u2="&#x2122;" k="33" />
+<hkern u1="n" u2="&#x7d;" k="49" />
+<hkern u1="n" u2="v" k="10" />
+<hkern u1="n" u2="]" k="53" />
+<hkern u1="n" u2="\" k="74" />
+<hkern u1="n" u2="V" k="59" />
+<hkern u1="n" u2="&#x3f;" k="45" />
+<hkern u1="n" u2="&#x2a;" k="6" />
+<hkern u1="n" u2="&#x29;" k="8" />
+<hkern u1="o" u2="&#x2122;" k="31" />
+<hkern u1="o" u2="&#xc6;" k="14" />
+<hkern u1="o" u2="&#x7d;" k="68" />
+<hkern u1="o" u2="x" k="25" />
+<hkern u1="o" u2="v" k="18" />
+<hkern u1="o" u2="]" k="78" />
+<hkern u1="o" u2="\" k="76" />
+<hkern u1="o" u2="X" k="43" />
+<hkern u1="o" u2="V" k="66" />
+<hkern u1="o" u2="&#x3f;" k="47" />
+<hkern u1="o" u2="&#x2a;" k="6" />
+<hkern u1="o" u2="&#x29;" k="37" />
+<hkern u1="p" u2="&#x2122;" k="35" />
+<hkern u1="p" u2="&#xc6;" k="14" />
+<hkern u1="p" u2="&#x7d;" k="68" />
+<hkern u1="p" u2="x" k="25" />
+<hkern u1="p" u2="v" k="16" />
+<hkern u1="p" u2="]" k="76" />
+<hkern u1="p" u2="\" k="74" />
+<hkern u1="p" u2="X" k="41" />
+<hkern u1="p" u2="V" k="63" />
+<hkern u1="p" u2="&#x3f;" k="51" />
+<hkern u1="p" u2="&#x2a;" k="16" />
+<hkern u1="p" u2="&#x29;" k="37" />
+<hkern u1="q" u2="&#x2122;" k="23" />
+<hkern u1="q" u2="&#x7d;" k="47" />
+<hkern u1="q" u2="]" k="51" />
+<hkern u1="q" u2="\" k="47" />
+<hkern u1="q" u2="V" k="53" />
+<hkern u1="q" u2="&#x3f;" k="27" />
+<hkern u1="q" u2="&#x29;" k="8" />
+<hkern u1="r" u2="&#xf0;" k="82" />
+<hkern u1="r" u2="&#xc6;" k="86" />
+<hkern u1="r" u2="&#x7d;" k="47" />
+<hkern u1="r" u2="]" k="59" />
+<hkern u1="r" u2="\" k="8" />
+<hkern u1="r" u2="X" k="55" />
+<hkern u1="r" u2="&#x2f;" k="70" />
+<hkern u1="r" u2="&#x29;" k="8" />
+<hkern u1="r" u2="&#x26;" k="20" />
+<hkern u1="s" u2="&#x2122;" k="25" />
+<hkern u1="s" u2="&#xc6;" k="10" />
+<hkern u1="s" u2="&#x7d;" k="55" />
+<hkern u1="s" u2="x" k="6" />
+<hkern u1="s" u2="v" k="14" />
+<hkern u1="s" u2="]" k="66" />
+<hkern u1="s" u2="\" k="45" />
+<hkern u1="s" u2="X" k="6" />
+<hkern u1="s" u2="V" k="45" />
+<hkern u1="s" u2="&#x3f;" k="27" />
+<hkern u1="s" u2="&#x29;" k="10" />
+<hkern u1="t" u2="&#xf0;" k="8" />
+<hkern u1="t" u2="&#x7d;" k="16" />
+<hkern u1="t" u2="]" k="23" />
+<hkern u1="t" u2="\" k="14" />
+<hkern u1="u" u2="&#x2122;" k="23" />
+<hkern u1="u" u2="&#x7d;" k="47" />
+<hkern u1="u" u2="]" k="51" />
+<hkern u1="u" u2="\" k="47" />
+<hkern u1="u" u2="V" k="53" />
+<hkern u1="u" u2="&#x3f;" k="27" />
+<hkern u1="u" u2="&#x29;" k="8" />
+<hkern u1="v" u2="&#x2039;" k="25" />
+<hkern u1="v" u2="&#x2026;" k="72" />
+<hkern u1="v" u2="&#x201e;" k="72" />
+<hkern u1="v" u2="&#x201a;" k="72" />
+<hkern u1="v" u2="&#x2014;" k="27" />
+<hkern u1="v" u2="&#x2013;" k="27" />
+<hkern u1="v" u2="&#x178;" k="84" />
+<hkern u1="v" u2="&#x153;" k="18" />
+<hkern u1="v" u2="&#xf8;" k="18" />
+<hkern u1="v" u2="&#xf6;" k="18" />
+<hkern u1="v" u2="&#xf5;" k="18" />
+<hkern u1="v" u2="&#xf4;" k="18" />
+<hkern u1="v" u2="&#xf3;" k="18" />
+<hkern u1="v" u2="&#xf2;" k="18" />
+<hkern u1="v" u2="&#xf0;" k="27" />
+<hkern u1="v" u2="&#xeb;" k="18" />
+<hkern u1="v" u2="&#xea;" k="18" />
+<hkern u1="v" u2="&#xe9;" k="18" />
+<hkern u1="v" u2="&#xe8;" k="18" />
+<hkern u1="v" u2="&#xe7;" k="18" />
+<hkern u1="v" u2="&#xe6;" k="16" />
+<hkern u1="v" u2="&#xe5;" k="16" />
+<hkern u1="v" u2="&#xe4;" k="16" />
+<hkern u1="v" u2="&#xe3;" k="16" />
+<hkern u1="v" u2="&#xe2;" k="16" />
+<hkern u1="v" u2="&#xe1;" k="16" />
+<hkern u1="v" u2="&#xe0;" k="16" />
+<hkern u1="v" u2="&#xdd;" k="84" />
+<hkern u1="v" u2="&#xc6;" k="43" />
+<hkern u1="v" u2="&#xc5;" k="37" />
+<hkern u1="v" u2="&#xc4;" k="37" />
+<hkern u1="v" u2="&#xc3;" k="37" />
+<hkern u1="v" u2="&#xc2;" k="37" />
+<hkern u1="v" u2="&#xc1;" k="37" />
+<hkern u1="v" u2="&#xc0;" k="37" />
+<hkern u1="v" u2="&#xab;" k="25" />
+<hkern u1="v" u2="&#x7d;" k="55" />
+<hkern u1="v" u2="s" k="12" />
+<hkern u1="v" u2="q" k="16" />
+<hkern u1="v" u2="o" k="18" />
+<hkern u1="v" u2="g" k="18" />
+<hkern u1="v" u2="e" k="18" />
+<hkern u1="v" u2="d" k="16" />
+<hkern u1="v" u2="c" k="18" />
+<hkern u1="v" u2="a" k="16" />
+<hkern u1="v" u2="]" k="66" />
+<hkern u1="v" u2="\" k="14" />
+<hkern u1="v" u2="Z" k="31" />
+<hkern u1="v" u2="Y" k="84" />
+<hkern u1="v" u2="X" k="53" />
+<hkern u1="v" u2="V" k="16" />
+<hkern u1="v" u2="T" k="137" />
+<hkern u1="v" u2="J" k="53" />
+<hkern u1="v" u2="A" k="37" />
+<hkern u1="v" u2="&#x3f;" k="18" />
+<hkern u1="v" u2="&#x2f;" k="41" />
+<hkern u1="v" u2="&#x2e;" k="72" />
+<hkern u1="v" u2="&#x2d;" k="27" />
+<hkern u1="v" u2="&#x2c;" k="72" />
+<hkern u1="v" u2="&#x29;" k="8" />
+<hkern u1="w" u2="&#xf0;" k="18" />
+<hkern u1="w" u2="&#xc6;" k="37" />
+<hkern u1="w" u2="&#x7d;" k="57" />
+<hkern u1="w" u2="]" k="68" />
+<hkern u1="w" u2="\" k="14" />
+<hkern u1="w" u2="X" k="51" />
+<hkern u1="w" u2="V" k="20" />
+<hkern u1="w" u2="&#x3f;" k="20" />
+<hkern u1="w" u2="&#x2f;" k="35" />
+<hkern u1="w" u2="&#x29;" k="12" />
+<hkern u1="x" u2="&#x2039;" k="53" />
+<hkern u1="x" u2="&#x2014;" k="66" />
+<hkern u1="x" u2="&#x2013;" k="66" />
+<hkern u1="x" u2="&#x178;" k="80" />
+<hkern u1="x" u2="&#x153;" k="25" />
+<hkern u1="x" u2="&#xf8;" k="25" />
+<hkern u1="x" u2="&#xf6;" k="25" />
+<hkern u1="x" u2="&#xf5;" k="25" />
+<hkern u1="x" u2="&#xf4;" k="25" />
+<hkern u1="x" u2="&#xf3;" k="25" />
+<hkern u1="x" u2="&#xf2;" k="25" />
+<hkern u1="x" u2="&#xf0;" k="37" />
+<hkern u1="x" u2="&#xeb;" k="25" />
+<hkern u1="x" u2="&#xea;" k="25" />
+<hkern u1="x" u2="&#xe9;" k="25" />
+<hkern u1="x" u2="&#xe8;" k="25" />
+<hkern u1="x" u2="&#xe7;" k="25" />
+<hkern u1="x" u2="&#xe6;" k="8" />
+<hkern u1="x" u2="&#xe5;" k="8" />
+<hkern u1="x" u2="&#xe4;" k="8" />
+<hkern u1="x" u2="&#xe3;" k="8" />
+<hkern u1="x" u2="&#xe2;" k="8" />
+<hkern u1="x" u2="&#xe1;" k="8" />
+<hkern u1="x" u2="&#xe0;" k="8" />
+<hkern u1="x" u2="&#xdd;" k="80" />
+<hkern u1="x" u2="&#xab;" k="53" />
+<hkern u1="x" u2="&#x7d;" k="33" />
+<hkern u1="x" u2="q" k="27" />
+<hkern u1="x" u2="o" k="25" />
+<hkern u1="x" u2="g" k="20" />
+<hkern u1="x" u2="e" k="25" />
+<hkern u1="x" u2="d" k="27" />
+<hkern u1="x" u2="c" k="25" />
+<hkern u1="x" u2="a" k="8" />
+<hkern u1="x" u2="]" k="39" />
+<hkern u1="x" u2="\" k="12" />
+<hkern u1="x" u2="Y" k="80" />
+<hkern u1="x" u2="V" k="14" />
+<hkern u1="x" u2="T" k="147" />
+<hkern u1="x" u2="J" k="6" />
+<hkern u1="x" u2="&#x2d;" k="66" />
+<hkern u1="y" u2="&#xf0;" k="29" />
+<hkern u1="y" u2="&#xc6;" k="43" />
+<hkern u1="y" u2="&#x7d;" k="49" />
+<hkern u1="y" u2="]" k="59" />
+<hkern u1="y" u2="\" k="14" />
+<hkern u1="y" u2="X" k="53" />
+<hkern u1="y" u2="V" k="16" />
+<hkern u1="y" u2="&#x3f;" k="18" />
+<hkern u1="y" u2="&#x2f;" k="43" />
+<hkern u1="z" u2="&#x2122;" k="10" />
+<hkern u1="z" u2="&#xf0;" k="16" />
+<hkern u1="z" u2="&#x7d;" k="35" />
+<hkern u1="z" u2="]" k="41" />
+<hkern u1="z" u2="\" k="20" />
+<hkern u1="z" u2="V" k="27" />
+<hkern u1="z" u2="&#x3f;" k="16" />
+<hkern u1="&#x7b;" u2="&#x153;" k="68" />
+<hkern u1="&#x7b;" u2="&#x152;" k="51" />
+<hkern u1="&#x7b;" u2="&#xff;" k="51" />
+<hkern u1="&#x7b;" u2="&#xfd;" k="51" />
+<hkern u1="&#x7b;" u2="&#xfc;" k="61" />
+<hkern u1="&#x7b;" u2="&#xfb;" k="61" />
+<hkern u1="&#x7b;" u2="&#xfa;" k="61" />
+<hkern u1="&#x7b;" u2="&#xf9;" k="61" />
+<hkern u1="&#x7b;" u2="&#xf8;" k="68" />
+<hkern u1="&#x7b;" u2="&#xf6;" k="68" />
+<hkern u1="&#x7b;" u2="&#xf5;" k="68" />
+<hkern u1="&#x7b;" u2="&#xf4;" k="68" />
+<hkern u1="&#x7b;" u2="&#xf3;" k="68" />
+<hkern u1="&#x7b;" u2="&#xf2;" k="68" />
+<hkern u1="&#x7b;" u2="&#xf1;" k="47" />
+<hkern u1="&#x7b;" u2="&#xf0;" k="18" />
+<hkern u1="&#x7b;" u2="&#xef;" k="-31" />
+<hkern u1="&#x7b;" u2="&#xec;" k="-78" />
+<hkern u1="&#x7b;" u2="&#xeb;" k="68" />
+<hkern u1="&#x7b;" u2="&#xea;" k="68" />
+<hkern u1="&#x7b;" u2="&#xe9;" k="68" />
+<hkern u1="&#x7b;" u2="&#xe8;" k="68" />
+<hkern u1="&#x7b;" u2="&#xe7;" k="68" />
+<hkern u1="&#x7b;" u2="&#xe6;" k="55" />
+<hkern u1="&#x7b;" u2="&#xe5;" k="55" />
+<hkern u1="&#x7b;" u2="&#xe4;" k="55" />
+<hkern u1="&#x7b;" u2="&#xe3;" k="55" />
+<hkern u1="&#x7b;" u2="&#xe2;" k="55" />
+<hkern u1="&#x7b;" u2="&#xe1;" k="55" />
+<hkern u1="&#x7b;" u2="&#xe0;" k="55" />
+<hkern u1="&#x7b;" u2="&#xd8;" k="51" />
+<hkern u1="&#x7b;" u2="&#xd6;" k="51" />
+<hkern u1="&#x7b;" u2="&#xd5;" k="51" />
+<hkern u1="&#x7b;" u2="&#xd4;" k="51" />
+<hkern u1="&#x7b;" u2="&#xd3;" k="51" />
+<hkern u1="&#x7b;" u2="&#xd2;" k="51" />
+<hkern u1="&#x7b;" u2="&#xc7;" k="49" />
+<hkern u1="&#x7b;" u2="&#xc6;" k="43" />
+<hkern u1="&#x7b;" u2="&#xc5;" k="41" />
+<hkern u1="&#x7b;" u2="&#xc4;" k="41" />
+<hkern u1="&#x7b;" u2="&#xc3;" k="41" />
+<hkern u1="&#x7b;" u2="&#xc2;" k="41" />
+<hkern u1="&#x7b;" u2="&#xc1;" k="41" />
+<hkern u1="&#x7b;" u2="&#xc0;" k="41" />
+<hkern u1="&#x7b;" u2="&#x7b;" k="39" />
+<hkern u1="&#x7b;" u2="z" k="35" />
+<hkern u1="&#x7b;" u2="y" k="51" />
+<hkern u1="&#x7b;" u2="x" k="33" />
+<hkern u1="&#x7b;" u2="w" k="57" />
+<hkern u1="&#x7b;" u2="v" k="53" />
+<hkern u1="&#x7b;" u2="u" k="61" />
+<hkern u1="&#x7b;" u2="t" k="37" />
+<hkern u1="&#x7b;" u2="s" k="45" />
+<hkern u1="&#x7b;" u2="r" k="47" />
+<hkern u1="&#x7b;" u2="q" k="68" />
+<hkern u1="&#x7b;" u2="p" k="47" />
+<hkern u1="&#x7b;" u2="o" k="68" />
+<hkern u1="&#x7b;" u2="n" k="47" />
+<hkern u1="&#x7b;" u2="m" k="47" />
+<hkern u1="&#x7b;" u2="j" k="-16" />
+<hkern u1="&#x7b;" u2="f" k="23" />
+<hkern u1="&#x7b;" u2="e" k="68" />
+<hkern u1="&#x7b;" u2="d" k="68" />
+<hkern u1="&#x7b;" u2="c" k="68" />
+<hkern u1="&#x7b;" u2="a" k="55" />
+<hkern u1="&#x7b;" u2="S" k="23" />
+<hkern u1="&#x7b;" u2="Q" k="51" />
+<hkern u1="&#x7b;" u2="O" k="51" />
+<hkern u1="&#x7b;" u2="G" k="51" />
+<hkern u1="&#x7b;" u2="C" k="49" />
+<hkern u1="&#x7b;" u2="A" k="41" />
+<hkern u1="&#x7b;" u2="&#x28;" k="16" />
+<hkern u1="&#x7c;" u2="&#xec;" k="-12" />
+<hkern u1="&#x7d;" u2="&#x7d;" k="39" />
+<hkern u1="&#x7d;" u2="]" k="43" />
+<hkern u1="&#x7d;" u2="&#x29;" k="23" />
+<hkern u1="&#xa1;" u2="&#x178;" k="66" />
+<hkern u1="&#xa1;" u2="&#xdd;" k="66" />
+<hkern u1="&#xa1;" u2="Y" k="66" />
+<hkern u1="&#xa1;" u2="V" k="16" />
+<hkern u1="&#xa1;" u2="T" k="98" />
+<hkern u1="&#xab;" u2="V" k="39" />
+<hkern u1="&#xae;" u2="&#x178;" k="47" />
+<hkern u1="&#xae;" u2="&#xdd;" k="47" />
+<hkern u1="&#xae;" u2="&#xc6;" k="68" />
+<hkern u1="&#xae;" u2="&#xc5;" k="55" />
+<hkern u1="&#xae;" u2="&#xc4;" k="55" />
+<hkern u1="&#xae;" u2="&#xc3;" k="55" />
+<hkern u1="&#xae;" u2="&#xc2;" k="55" />
+<hkern u1="&#xae;" u2="&#xc1;" k="55" />
+<hkern u1="&#xae;" u2="&#xc0;" k="55" />
+<hkern u1="&#xae;" u2="Z" k="27" />
+<hkern u1="&#xae;" u2="Y" k="47" />
+<hkern u1="&#xae;" u2="X" k="20" />
+<hkern u1="&#xae;" u2="V" k="14" />
+<hkern u1="&#xae;" u2="T" k="18" />
+<hkern u1="&#xae;" u2="J" k="49" />
+<hkern u1="&#xae;" u2="A" k="55" />
+<hkern u1="&#xb7;" u2="l" k="111" />
+<hkern u1="&#xbb;" u2="&#xc6;" k="14" />
+<hkern u1="&#xbb;" u2="x" k="53" />
+<hkern u1="&#xbb;" u2="v" k="16" />
+<hkern u1="&#xbb;" u2="f" k="8" />
+<hkern u1="&#xbb;" u2="X" k="49" />
+<hkern u1="&#xbb;" u2="V" k="57" />
+<hkern u1="&#xbf;" u2="&#x178;" k="135" />
+<hkern u1="&#xbf;" u2="&#x153;" k="68" />
+<hkern u1="&#xbf;" u2="&#x152;" k="57" />
+<hkern u1="&#xbf;" u2="&#xff;" k="61" />
+<hkern u1="&#xbf;" u2="&#xfe;" k="63" />
+<hkern u1="&#xbf;" u2="&#xfd;" k="61" />
+<hkern u1="&#xbf;" u2="&#xfc;" k="63" />
+<hkern u1="&#xbf;" u2="&#xfb;" k="63" />
+<hkern u1="&#xbf;" u2="&#xfa;" k="63" />
+<hkern u1="&#xbf;" u2="&#xf9;" k="63" />
+<hkern u1="&#xbf;" u2="&#xf8;" k="68" />
+<hkern u1="&#xbf;" u2="&#xf6;" k="68" />
+<hkern u1="&#xbf;" u2="&#xf5;" k="68" />
+<hkern u1="&#xbf;" u2="&#xf4;" k="68" />
+<hkern u1="&#xbf;" u2="&#xf3;" k="68" />
+<hkern u1="&#xbf;" u2="&#xf2;" k="68" />
+<hkern u1="&#xbf;" u2="&#xf1;" k="63" />
+<hkern u1="&#xbf;" u2="&#xf0;" k="68" />
+<hkern u1="&#xbf;" u2="&#xef;" k="63" />
+<hkern u1="&#xbf;" u2="&#xee;" k="63" />
+<hkern u1="&#xbf;" u2="&#xed;" k="63" />
+<hkern u1="&#xbf;" u2="&#xec;" k="63" />
+<hkern u1="&#xbf;" u2="&#xeb;" k="68" />
+<hkern u1="&#xbf;" u2="&#xea;" k="68" />
+<hkern u1="&#xbf;" u2="&#xe9;" k="68" />
+<hkern u1="&#xbf;" u2="&#xe8;" k="68" />
+<hkern u1="&#xbf;" u2="&#xe7;" k="68" />
+<hkern u1="&#xbf;" u2="&#xe6;" k="70" />
+<hkern u1="&#xbf;" u2="&#xe5;" k="70" />
+<hkern u1="&#xbf;" u2="&#xe4;" k="70" />
+<hkern u1="&#xbf;" u2="&#xe3;" k="70" />
+<hkern u1="&#xbf;" u2="&#xe2;" k="70" />
+<hkern u1="&#xbf;" u2="&#xe1;" k="70" />
+<hkern u1="&#xbf;" u2="&#xe0;" k="70" />
+<hkern u1="&#xbf;" u2="&#xdf;" k="63" />
+<hkern u1="&#xbf;" u2="&#xde;" k="57" />
+<hkern u1="&#xbf;" u2="&#xdd;" k="135" />
+<hkern u1="&#xbf;" u2="&#xdc;" k="59" />
+<hkern u1="&#xbf;" u2="&#xdb;" k="59" />
+<hkern u1="&#xbf;" u2="&#xda;" k="59" />
+<hkern u1="&#xbf;" u2="&#xd9;" k="59" />
+<hkern u1="&#xbf;" u2="&#xd8;" k="57" />
+<hkern u1="&#xbf;" u2="&#xd6;" k="57" />
+<hkern u1="&#xbf;" u2="&#xd5;" k="57" />
+<hkern u1="&#xbf;" u2="&#xd4;" k="57" />
+<hkern u1="&#xbf;" u2="&#xd3;" k="57" />
+<hkern u1="&#xbf;" u2="&#xd2;" k="57" />
+<hkern u1="&#xbf;" u2="&#xd1;" k="57" />
+<hkern u1="&#xbf;" u2="&#xd0;" k="57" />
+<hkern u1="&#xbf;" u2="&#xcf;" k="57" />
+<hkern u1="&#xbf;" u2="&#xce;" k="57" />
+<hkern u1="&#xbf;" u2="&#xcd;" k="57" />
+<hkern u1="&#xbf;" u2="&#xcc;" k="57" />
+<hkern u1="&#xbf;" u2="&#xcb;" k="57" />
+<hkern u1="&#xbf;" u2="&#xca;" k="57" />
+<hkern u1="&#xbf;" u2="&#xc9;" k="57" />
+<hkern u1="&#xbf;" u2="&#xc8;" k="57" />
+<hkern u1="&#xbf;" u2="&#xc7;" k="57" />
+<hkern u1="&#xbf;" u2="&#xc6;" k="82" />
+<hkern u1="&#xbf;" u2="&#xc5;" k="78" />
+<hkern u1="&#xbf;" u2="&#xc4;" k="78" />
+<hkern u1="&#xbf;" u2="&#xc3;" k="78" />
+<hkern u1="&#xbf;" u2="&#xc2;" k="78" />
+<hkern u1="&#xbf;" u2="&#xc1;" k="78" />
+<hkern u1="&#xbf;" u2="&#xc0;" k="78" />
+<hkern u1="&#xbf;" u2="z" k="59" />
+<hkern u1="&#xbf;" u2="y" k="61" />
+<hkern u1="&#xbf;" u2="x" k="55" />
+<hkern u1="&#xbf;" u2="w" k="66" />
+<hkern u1="&#xbf;" u2="v" k="66" />
+<hkern u1="&#xbf;" u2="u" k="63" />
+<hkern u1="&#xbf;" u2="t" k="57" />
+<hkern u1="&#xbf;" u2="s" k="66" />
+<hkern u1="&#xbf;" u2="r" k="63" />
+<hkern u1="&#xbf;" u2="q" k="68" />
+<hkern u1="&#xbf;" u2="p" k="63" />
+<hkern u1="&#xbf;" u2="o" k="68" />
+<hkern u1="&#xbf;" u2="n" k="63" />
+<hkern u1="&#xbf;" u2="m" k="63" />
+<hkern u1="&#xbf;" u2="l" k="63" />
+<hkern u1="&#xbf;" u2="k" k="63" />
+<hkern u1="&#xbf;" u2="j" k="63" />
+<hkern u1="&#xbf;" u2="i" k="63" />
+<hkern u1="&#xbf;" u2="h" k="63" />
+<hkern u1="&#xbf;" u2="f" k="55" />
+<hkern u1="&#xbf;" u2="e" k="68" />
+<hkern u1="&#xbf;" u2="d" k="68" />
+<hkern u1="&#xbf;" u2="c" k="68" />
+<hkern u1="&#xbf;" u2="b" k="63" />
+<hkern u1="&#xbf;" u2="a" k="70" />
+<hkern u1="&#xbf;" u2="Z" k="76" />
+<hkern u1="&#xbf;" u2="Y" k="135" />
+<hkern u1="&#xbf;" u2="X" k="76" />
+<hkern u1="&#xbf;" u2="W" k="76" />
+<hkern u1="&#xbf;" u2="V" k="90" />
+<hkern u1="&#xbf;" u2="U" k="59" />
+<hkern u1="&#xbf;" u2="T" k="162" />
+<hkern u1="&#xbf;" u2="S" k="57" />
+<hkern u1="&#xbf;" u2="R" k="57" />
+<hkern u1="&#xbf;" u2="Q" k="57" />
+<hkern u1="&#xbf;" u2="P" k="57" />
+<hkern u1="&#xbf;" u2="O" k="57" />
+<hkern u1="&#xbf;" u2="N" k="57" />
+<hkern u1="&#xbf;" u2="M" k="57" />
+<hkern u1="&#xbf;" u2="L" k="57" />
+<hkern u1="&#xbf;" u2="K" k="57" />
+<hkern u1="&#xbf;" u2="J" k="27" />
+<hkern u1="&#xbf;" u2="I" k="57" />
+<hkern u1="&#xbf;" u2="H" k="57" />
+<hkern u1="&#xbf;" u2="G" k="57" />
+<hkern u1="&#xbf;" u2="F" k="57" />
+<hkern u1="&#xbf;" u2="E" k="57" />
+<hkern u1="&#xbf;" u2="D" k="57" />
+<hkern u1="&#xbf;" u2="C" k="57" />
+<hkern u1="&#xbf;" u2="B" k="57" />
+<hkern u1="&#xbf;" u2="A" k="78" />
+<hkern u1="&#xc0;" u2="&#x2122;" k="84" />
+<hkern u1="&#xc0;" u2="&#xf0;" k="10" />
+<hkern u1="&#xc0;" u2="&#xae;" k="53" />
+<hkern u1="&#xc0;" u2="&#x7d;" k="41" />
+<hkern u1="&#xc0;" u2="v" k="37" />
+<hkern u1="&#xc0;" u2="f" k="14" />
+<hkern u1="&#xc0;" u2="]" k="47" />
+<hkern u1="&#xc0;" u2="\" k="96" />
+<hkern u1="&#xc0;" u2="V" k="57" />
+<hkern u1="&#xc0;" u2="&#x3f;" k="51" />
+<hkern u1="&#xc0;" u2="&#x2a;" k="74" />
+<hkern u1="&#xc1;" u2="&#x2122;" k="84" />
+<hkern u1="&#xc1;" u2="&#xf0;" k="10" />
+<hkern u1="&#xc1;" u2="&#xae;" k="53" />
+<hkern u1="&#xc1;" u2="&#x7d;" k="41" />
+<hkern u1="&#xc1;" u2="v" k="37" />
+<hkern u1="&#xc1;" u2="f" k="14" />
+<hkern u1="&#xc1;" u2="]" k="47" />
+<hkern u1="&#xc1;" u2="\" k="96" />
+<hkern u1="&#xc1;" u2="V" k="57" />
+<hkern u1="&#xc1;" u2="&#x3f;" k="51" />
+<hkern u1="&#xc1;" u2="&#x2a;" k="74" />
+<hkern u1="&#xc2;" u2="&#x2122;" k="84" />
+<hkern u1="&#xc2;" u2="&#xf0;" k="10" />
+<hkern u1="&#xc2;" u2="&#xae;" k="53" />
+<hkern u1="&#xc2;" u2="&#x7d;" k="41" />
+<hkern u1="&#xc2;" u2="v" k="37" />
+<hkern u1="&#xc2;" u2="f" k="14" />
+<hkern u1="&#xc2;" u2="]" k="47" />
+<hkern u1="&#xc2;" u2="\" k="96" />
+<hkern u1="&#xc2;" u2="V" k="57" />
+<hkern u1="&#xc2;" u2="&#x3f;" k="51" />
+<hkern u1="&#xc2;" u2="&#x2a;" k="74" />
+<hkern u1="&#xc3;" u2="&#x2122;" k="84" />
+<hkern u1="&#xc3;" u2="&#xf0;" k="10" />
+<hkern u1="&#xc3;" u2="&#xae;" k="53" />
+<hkern u1="&#xc3;" u2="&#x7d;" k="41" />
+<hkern u1="&#xc3;" u2="v" k="37" />
+<hkern u1="&#xc3;" u2="f" k="14" />
+<hkern u1="&#xc3;" u2="]" k="47" />
+<hkern u1="&#xc3;" u2="\" k="96" />
+<hkern u1="&#xc3;" u2="V" k="57" />
+<hkern u1="&#xc3;" u2="&#x3f;" k="51" />
+<hkern u1="&#xc3;" u2="&#x2a;" k="74" />
+<hkern u1="&#xc4;" u2="&#x2122;" k="84" />
+<hkern u1="&#xc4;" u2="&#xf0;" k="10" />
+<hkern u1="&#xc4;" u2="&#xae;" k="53" />
+<hkern u1="&#xc4;" u2="&#x7d;" k="41" />
+<hkern u1="&#xc4;" u2="v" k="37" />
+<hkern u1="&#xc4;" u2="f" k="14" />
+<hkern u1="&#xc4;" u2="]" k="47" />
+<hkern u1="&#xc4;" u2="\" k="96" />
+<hkern u1="&#xc4;" u2="V" k="57" />
+<hkern u1="&#xc4;" u2="&#x3f;" k="51" />
+<hkern u1="&#xc4;" u2="&#x2a;" k="74" />
+<hkern u1="&#xc5;" u2="&#x2122;" k="84" />
+<hkern u1="&#xc5;" u2="&#xf0;" k="10" />
+<hkern u1="&#xc5;" u2="&#xae;" k="53" />
+<hkern u1="&#xc5;" u2="&#x7d;" k="41" />
+<hkern u1="&#xc5;" u2="v" k="37" />
+<hkern u1="&#xc5;" u2="f" k="14" />
+<hkern u1="&#xc5;" u2="]" k="47" />
+<hkern u1="&#xc5;" u2="\" k="96" />
+<hkern u1="&#xc5;" u2="V" k="57" />
+<hkern u1="&#xc5;" u2="&#x3f;" k="51" />
+<hkern u1="&#xc5;" u2="&#x2a;" k="74" />
+<hkern u1="&#xc6;" u2="&#xf0;" k="16" />
+<hkern u1="&#xc6;" u2="&#xef;" k="-27" />
+<hkern u1="&#xc6;" u2="&#xee;" k="-25" />
+<hkern u1="&#xc6;" u2="&#xec;" k="-74" />
+<hkern u1="&#xc6;" u2="v" k="23" />
+<hkern u1="&#xc6;" u2="f" k="6" />
+<hkern u1="&#xc7;" u2="&#xf0;" k="14" />
+<hkern u1="&#xc7;" u2="&#xef;" k="-29" />
+<hkern u1="&#xc7;" u2="&#xee;" k="-25" />
+<hkern u1="&#xc7;" u2="&#xec;" k="-68" />
+<hkern u1="&#xc7;" u2="&#xae;" k="27" />
+<hkern u1="&#xc7;" u2="v" k="33" />
+<hkern u1="&#xc7;" u2="f" k="12" />
+<hkern u1="&#xc8;" u2="&#xf0;" k="16" />
+<hkern u1="&#xc8;" u2="&#xef;" k="-27" />
+<hkern u1="&#xc8;" u2="&#xee;" k="-25" />
+<hkern u1="&#xc8;" u2="&#xec;" k="-74" />
+<hkern u1="&#xc8;" u2="v" k="23" />
+<hkern u1="&#xc8;" u2="f" k="6" />
+<hkern u1="&#xc9;" u2="&#xf0;" k="16" />
+<hkern u1="&#xc9;" u2="&#xef;" k="-27" />
+<hkern u1="&#xc9;" u2="&#xee;" k="-25" />
+<hkern u1="&#xc9;" u2="&#xec;" k="-74" />
+<hkern u1="&#xc9;" u2="v" k="23" />
+<hkern u1="&#xc9;" u2="f" k="6" />
+<hkern u1="&#xca;" u2="&#xf0;" k="16" />
+<hkern u1="&#xca;" u2="&#xef;" k="-27" />
+<hkern u1="&#xca;" u2="&#xee;" k="-25" />
+<hkern u1="&#xca;" u2="&#xec;" k="-74" />
+<hkern u1="&#xca;" u2="v" k="23" />
+<hkern u1="&#xca;" u2="f" k="6" />
+<hkern u1="&#xcb;" u2="&#xf0;" k="16" />
+<hkern u1="&#xcb;" u2="&#xef;" k="-27" />
+<hkern u1="&#xcb;" u2="&#xee;" k="-25" />
+<hkern u1="&#xcb;" u2="&#xec;" k="-74" />
+<hkern u1="&#xcb;" u2="v" k="23" />
+<hkern u1="&#xcb;" u2="f" k="6" />
+<hkern u1="&#xcc;" u2="&#xf0;" k="6" />
+<hkern u1="&#xcc;" u2="&#xec;" k="-6" />
+<hkern u1="&#xcd;" u2="&#xf0;" k="6" />
+<hkern u1="&#xcd;" u2="&#xec;" k="-6" />
+<hkern u1="&#xce;" u2="&#xf0;" k="6" />
+<hkern u1="&#xce;" u2="&#xec;" k="-6" />
+<hkern u1="&#xcf;" u2="&#xf0;" k="6" />
+<hkern u1="&#xcf;" u2="&#xec;" k="-6" />
+<hkern u1="&#xd0;" u2="&#xc6;" k="35" />
+<hkern u1="&#xd0;" u2="&#x7d;" k="53" />
+<hkern u1="&#xd0;" u2="x" k="6" />
+<hkern u1="&#xd0;" u2="]" k="59" />
+<hkern u1="&#xd0;" u2="\" k="14" />
+<hkern u1="&#xd0;" u2="X" k="43" />
+<hkern u1="&#xd0;" u2="V" k="25" />
+<hkern u1="&#xd0;" u2="&#x3f;" k="18" />
+<hkern u1="&#xd0;" u2="&#x2f;" k="12" />
+<hkern u1="&#xd0;" u2="&#x29;" k="25" />
+<hkern u1="&#xd1;" u2="&#xf0;" k="6" />
+<hkern u1="&#xd1;" u2="&#xec;" k="-6" />
+<hkern u1="&#xd2;" u2="&#xc6;" k="31" />
+<hkern u1="&#xd2;" u2="&#x7d;" k="51" />
+<hkern u1="&#xd2;" u2="]" k="57" />
+<hkern u1="&#xd2;" u2="\" k="16" />
+<hkern u1="&#xd2;" u2="X" k="39" />
+<hkern u1="&#xd2;" u2="V" k="25" />
+<hkern u1="&#xd2;" u2="&#x3f;" k="14" />
+<hkern u1="&#xd2;" u2="&#x2f;" k="12" />
+<hkern u1="&#xd2;" u2="&#x29;" k="10" />
+<hkern u1="&#xd3;" u2="&#xc6;" k="31" />
+<hkern u1="&#xd3;" u2="&#x7d;" k="51" />
+<hkern u1="&#xd3;" u2="]" k="57" />
+<hkern u1="&#xd3;" u2="\" k="16" />
+<hkern u1="&#xd3;" u2="X" k="39" />
+<hkern u1="&#xd3;" u2="V" k="25" />
+<hkern u1="&#xd3;" u2="&#x3f;" k="14" />
+<hkern u1="&#xd3;" u2="&#x2f;" k="12" />
+<hkern u1="&#xd3;" u2="&#x29;" k="10" />
+<hkern u1="&#xd4;" u2="&#xc6;" k="31" />
+<hkern u1="&#xd4;" u2="&#x7d;" k="51" />
+<hkern u1="&#xd4;" u2="]" k="57" />
+<hkern u1="&#xd4;" u2="\" k="16" />
+<hkern u1="&#xd4;" u2="X" k="39" />
+<hkern u1="&#xd4;" u2="V" k="25" />
+<hkern u1="&#xd4;" u2="&#x3f;" k="14" />
+<hkern u1="&#xd4;" u2="&#x2f;" k="12" />
+<hkern u1="&#xd4;" u2="&#x29;" k="10" />
+<hkern u1="&#xd5;" u2="&#xc6;" k="31" />
+<hkern u1="&#xd5;" u2="&#x7d;" k="51" />
+<hkern u1="&#xd5;" u2="]" k="57" />
+<hkern u1="&#xd5;" u2="\" k="16" />
+<hkern u1="&#xd5;" u2="X" k="39" />
+<hkern u1="&#xd5;" u2="V" k="25" />
+<hkern u1="&#xd5;" u2="&#x3f;" k="14" />
+<hkern u1="&#xd5;" u2="&#x2f;" k="12" />
+<hkern u1="&#xd5;" u2="&#x29;" k="10" />
+<hkern u1="&#xd6;" u2="&#xc6;" k="31" />
+<hkern u1="&#xd6;" u2="&#x7d;" k="51" />
+<hkern u1="&#xd6;" u2="]" k="57" />
+<hkern u1="&#xd6;" u2="\" k="16" />
+<hkern u1="&#xd6;" u2="X" k="39" />
+<hkern u1="&#xd6;" u2="V" k="25" />
+<hkern u1="&#xd6;" u2="&#x3f;" k="14" />
+<hkern u1="&#xd6;" u2="&#x2f;" k="12" />
+<hkern u1="&#xd6;" u2="&#x29;" k="10" />
+<hkern u1="&#xd8;" u2="&#xc6;" k="31" />
+<hkern u1="&#xd8;" u2="&#x7d;" k="51" />
+<hkern u1="&#xd8;" u2="]" k="57" />
+<hkern u1="&#xd8;" u2="\" k="16" />
+<hkern u1="&#xd8;" u2="X" k="39" />
+<hkern u1="&#xd8;" u2="V" k="25" />
+<hkern u1="&#xd8;" u2="&#x3f;" k="14" />
+<hkern u1="&#xd8;" u2="&#x2f;" k="12" />
+<hkern u1="&#xd8;" u2="&#x29;" k="10" />
+<hkern u1="&#xd9;" u2="&#xf0;" k="6" />
+<hkern u1="&#xd9;" u2="&#xec;" k="-12" />
+<hkern u1="&#xd9;" u2="&#xc6;" k="18" />
+<hkern u1="&#xd9;" u2="&#x2f;" k="12" />
+<hkern u1="&#xda;" u2="&#xf0;" k="6" />
+<hkern u1="&#xda;" u2="&#xec;" k="-12" />
+<hkern u1="&#xda;" u2="&#xc6;" k="18" />
+<hkern u1="&#xda;" u2="&#x2f;" k="12" />
+<hkern u1="&#xdb;" u2="&#xf0;" k="6" />
+<hkern u1="&#xdb;" u2="&#xec;" k="-12" />
+<hkern u1="&#xdb;" u2="&#xc6;" k="18" />
+<hkern u1="&#xdb;" u2="&#x2f;" k="12" />
+<hkern u1="&#xdc;" u2="&#xf0;" k="6" />
+<hkern u1="&#xdc;" u2="&#xec;" k="-12" />
+<hkern u1="&#xdc;" u2="&#xc6;" k="18" />
+<hkern u1="&#xdc;" u2="&#x2f;" k="12" />
+<hkern u1="&#xdd;" u2="&#xff;" k="70" />
+<hkern u1="&#xdd;" u2="&#xf0;" k="80" />
+<hkern u1="&#xdd;" u2="&#xef;" k="-90" />
+<hkern u1="&#xdd;" u2="&#xee;" k="-16" />
+<hkern u1="&#xdd;" u2="&#xec;" k="-131" />
+<hkern u1="&#xdd;" u2="&#xeb;" k="137" />
+<hkern u1="&#xdd;" u2="&#xe4;" k="117" />
+<hkern u1="&#xdd;" u2="&#xe3;" k="109" />
+<hkern u1="&#xdd;" u2="&#xdf;" k="12" />
+<hkern u1="&#xdd;" u2="&#xc6;" k="106" />
+<hkern u1="&#xdd;" u2="&#xae;" k="45" />
+<hkern u1="&#xdd;" u2="x" k="82" />
+<hkern u1="&#xdd;" u2="v" k="84" />
+<hkern u1="&#xdd;" u2="f" k="37" />
+<hkern u1="&#xdd;" u2="&#x40;" k="74" />
+<hkern u1="&#xdd;" u2="&#x2f;" k="131" />
+<hkern u1="&#xdd;" u2="&#x26;" k="76" />
+<hkern u1="&#xde;" u2="&#x2122;" k="12" />
+<hkern u1="&#xde;" u2="&#x2026;" k="66" />
+<hkern u1="&#xde;" u2="&#x201e;" k="66" />
+<hkern u1="&#xde;" u2="&#x201a;" k="66" />
+<hkern u1="&#xde;" u2="&#x178;" k="80" />
+<hkern u1="&#xde;" u2="&#xdd;" k="80" />
+<hkern u1="&#xde;" u2="&#xc6;" k="45" />
+<hkern u1="&#xde;" u2="&#xc5;" k="37" />
+<hkern u1="&#xde;" u2="&#xc4;" k="37" />
+<hkern u1="&#xde;" u2="&#xc3;" k="37" />
+<hkern u1="&#xde;" u2="&#xc2;" k="37" />
+<hkern u1="&#xde;" u2="&#xc1;" k="37" />
+<hkern u1="&#xde;" u2="&#xc0;" k="37" />
+<hkern u1="&#xde;" u2="&#x7d;" k="63" />
+<hkern u1="&#xde;" u2="]" k="76" />
+<hkern u1="&#xde;" u2="\" k="37" />
+<hkern u1="&#xde;" u2="Z" k="43" />
+<hkern u1="&#xde;" u2="Y" k="80" />
+<hkern u1="&#xde;" u2="X" k="82" />
+<hkern u1="&#xde;" u2="W" k="12" />
+<hkern u1="&#xde;" u2="V" k="31" />
+<hkern u1="&#xde;" u2="T" k="100" />
+<hkern u1="&#xde;" u2="J" k="47" />
+<hkern u1="&#xde;" u2="A" k="37" />
+<hkern u1="&#xde;" u2="&#x3f;" k="35" />
+<hkern u1="&#xde;" u2="&#x2f;" k="39" />
+<hkern u1="&#xde;" u2="&#x2e;" k="66" />
+<hkern u1="&#xde;" u2="&#x2c;" k="66" />
+<hkern u1="&#xde;" u2="&#x29;" k="31" />
+<hkern u1="&#xdf;" u2="&#x2122;" k="23" />
+<hkern u1="&#xdf;" u2="&#x201d;" k="29" />
+<hkern u1="&#xdf;" u2="&#x201c;" k="31" />
+<hkern u1="&#xdf;" u2="&#x2019;" k="29" />
+<hkern u1="&#xdf;" u2="&#x2018;" k="31" />
+<hkern u1="&#xdf;" u2="&#x178;" k="84" />
+<hkern u1="&#xdf;" u2="&#xff;" k="35" />
+<hkern u1="&#xdf;" u2="&#xfd;" k="35" />
+<hkern u1="&#xdf;" u2="&#xdd;" k="84" />
+<hkern u1="&#xdf;" u2="&#xc6;" k="6" />
+<hkern u1="&#xdf;" u2="&#xae;" k="27" />
+<hkern u1="&#xdf;" u2="&#x7d;" k="35" />
+<hkern u1="&#xdf;" u2="y" k="35" />
+<hkern u1="&#xdf;" u2="x" k="18" />
+<hkern u1="&#xdf;" u2="w" k="23" />
+<hkern u1="&#xdf;" u2="v" k="33" />
+<hkern u1="&#xdf;" u2="t" k="18" />
+<hkern u1="&#xdf;" u2="g" k="10" />
+<hkern u1="&#xdf;" u2="f" k="10" />
+<hkern u1="&#xdf;" u2="]" k="43" />
+<hkern u1="&#xdf;" u2="\" k="39" />
+<hkern u1="&#xdf;" u2="Y" k="84" />
+<hkern u1="&#xdf;" u2="X" k="12" />
+<hkern u1="&#xdf;" u2="W" k="39" />
+<hkern u1="&#xdf;" u2="V" k="57" />
+<hkern u1="&#xdf;" u2="T" k="63" />
+<hkern u1="&#xdf;" u2="S" k="10" />
+<hkern u1="&#xdf;" u2="J" k="41" />
+<hkern u1="&#xdf;" u2="&#x3f;" k="18" />
+<hkern u1="&#xdf;" u2="&#x2a;" k="31" />
+<hkern u1="&#xdf;" u2="&#x27;" k="27" />
+<hkern u1="&#xdf;" u2="&#x22;" k="27" />
+<hkern u1="&#xe0;" u2="&#x2122;" k="25" />
+<hkern u1="&#xe0;" u2="&#x7d;" k="18" />
+<hkern u1="&#xe0;" u2="v" k="10" />
+<hkern u1="&#xe0;" u2="]" k="23" />
+<hkern u1="&#xe0;" u2="\" k="72" />
+<hkern u1="&#xe0;" u2="V" k="51" />
+<hkern u1="&#xe0;" u2="&#x3f;" k="31" />
+<hkern u1="&#xe0;" u2="&#x2a;" k="6" />
+<hkern u1="&#xe1;" u2="&#x2122;" k="25" />
+<hkern u1="&#xe1;" u2="&#x7d;" k="18" />
+<hkern u1="&#xe1;" u2="v" k="10" />
+<hkern u1="&#xe1;" u2="]" k="23" />
+<hkern u1="&#xe1;" u2="\" k="72" />
+<hkern u1="&#xe1;" u2="V" k="51" />
+<hkern u1="&#xe1;" u2="&#x3f;" k="31" />
+<hkern u1="&#xe1;" u2="&#x2a;" k="6" />
+<hkern u1="&#xe2;" u2="&#x2122;" k="25" />
+<hkern u1="&#xe2;" u2="&#x7d;" k="18" />
+<hkern u1="&#xe2;" u2="v" k="10" />
+<hkern u1="&#xe2;" u2="]" k="23" />
+<hkern u1="&#xe2;" u2="\" k="72" />
+<hkern u1="&#xe2;" u2="V" k="51" />
+<hkern u1="&#xe2;" u2="&#x3f;" k="31" />
+<hkern u1="&#xe2;" u2="&#x2a;" k="6" />
+<hkern u1="&#xe3;" u2="&#x2122;" k="25" />
+<hkern u1="&#xe3;" u2="&#x7d;" k="18" />
+<hkern u1="&#xe3;" u2="v" k="10" />
+<hkern u1="&#xe3;" u2="]" k="23" />
+<hkern u1="&#xe3;" u2="\" k="72" />
+<hkern u1="&#xe3;" u2="V" k="51" />
+<hkern u1="&#xe3;" u2="&#x3f;" k="31" />
+<hkern u1="&#xe3;" u2="&#x2a;" k="6" />
+<hkern u1="&#xe4;" u2="&#x2122;" k="25" />
+<hkern u1="&#xe4;" u2="&#x7d;" k="18" />
+<hkern u1="&#xe4;" u2="v" k="10" />
+<hkern u1="&#xe4;" u2="]" k="23" />
+<hkern u1="&#xe4;" u2="\" k="72" />
+<hkern u1="&#xe4;" u2="V" k="51" />
+<hkern u1="&#xe4;" u2="&#x3f;" k="31" />
+<hkern u1="&#xe4;" u2="&#x2a;" k="6" />
+<hkern u1="&#xe5;" u2="&#x2122;" k="25" />
+<hkern u1="&#xe5;" u2="&#x7d;" k="18" />
+<hkern u1="&#xe5;" u2="v" k="10" />
+<hkern u1="&#xe5;" u2="]" k="23" />
+<hkern u1="&#xe5;" u2="\" k="72" />
+<hkern u1="&#xe5;" u2="V" k="51" />
+<hkern u1="&#xe5;" u2="&#x3f;" k="31" />
+<hkern u1="&#xe5;" u2="&#x2a;" k="6" />
+<hkern u1="&#xe6;" u2="&#x2122;" k="29" />
+<hkern u1="&#xe6;" u2="&#xc6;" k="10" />
+<hkern u1="&#xe6;" u2="&#x7d;" k="55" />
+<hkern u1="&#xe6;" u2="x" k="8" />
+<hkern u1="&#xe6;" u2="v" k="16" />
+<hkern u1="&#xe6;" u2="]" k="51" />
+<hkern u1="&#xe6;" u2="\" k="70" />
+<hkern u1="&#xe6;" u2="V" k="63" />
+<hkern u1="&#xe6;" u2="&#x3f;" k="41" />
+<hkern u1="&#xe6;" u2="&#x29;" k="10" />
+<hkern u1="&#xe7;" u2="&#xf0;" k="23" />
+<hkern u1="&#xe7;" u2="&#x7d;" k="33" />
+<hkern u1="&#xe7;" u2="]" k="39" />
+<hkern u1="&#xe7;" u2="\" k="20" />
+<hkern u1="&#xe7;" u2="V" k="25" />
+<hkern u1="&#xe7;" u2="&#x3f;" k="18" />
+<hkern u1="&#xe8;" u2="&#x2122;" k="29" />
+<hkern u1="&#xe8;" u2="&#xc6;" k="10" />
+<hkern u1="&#xe8;" u2="&#x7d;" k="55" />
+<hkern u1="&#xe8;" u2="x" k="8" />
+<hkern u1="&#xe8;" u2="v" k="16" />
+<hkern u1="&#xe8;" u2="]" k="51" />
+<hkern u1="&#xe8;" u2="\" k="70" />
+<hkern u1="&#xe8;" u2="V" k="63" />
+<hkern u1="&#xe8;" u2="&#x3f;" k="41" />
+<hkern u1="&#xe8;" u2="&#x29;" k="10" />
+<hkern u1="&#xe9;" u2="&#x2122;" k="29" />
+<hkern u1="&#xe9;" u2="&#xc6;" k="10" />
+<hkern u1="&#xe9;" u2="&#x7d;" k="55" />
+<hkern u1="&#xe9;" u2="x" k="8" />
+<hkern u1="&#xe9;" u2="v" k="16" />
+<hkern u1="&#xe9;" u2="]" k="51" />
+<hkern u1="&#xe9;" u2="\" k="70" />
+<hkern u1="&#xe9;" u2="V" k="63" />
+<hkern u1="&#xe9;" u2="&#x3f;" k="41" />
+<hkern u1="&#xe9;" u2="&#x29;" k="10" />
+<hkern u1="&#xea;" u2="&#x2122;" k="29" />
+<hkern u1="&#xea;" u2="&#xc6;" k="10" />
+<hkern u1="&#xea;" u2="&#x7d;" k="55" />
+<hkern u1="&#xea;" u2="x" k="8" />
+<hkern u1="&#xea;" u2="v" k="16" />
+<hkern u1="&#xea;" u2="]" k="51" />
+<hkern u1="&#xea;" u2="\" k="70" />
+<hkern u1="&#xea;" u2="V" k="63" />
+<hkern u1="&#xea;" u2="&#x3f;" k="41" />
+<hkern u1="&#xea;" u2="&#x29;" k="10" />
+<hkern u1="&#xeb;" u2="&#x2122;" k="29" />
+<hkern u1="&#xeb;" u2="&#xc6;" k="10" />
+<hkern u1="&#xeb;" u2="&#x7d;" k="55" />
+<hkern u1="&#xeb;" u2="x" k="8" />
+<hkern u1="&#xeb;" u2="v" k="16" />
+<hkern u1="&#xeb;" u2="]" k="51" />
+<hkern u1="&#xeb;" u2="\" k="70" />
+<hkern u1="&#xeb;" u2="V" k="63" />
+<hkern u1="&#xeb;" u2="&#x3f;" k="41" />
+<hkern u1="&#xeb;" u2="&#x29;" k="10" />
+<hkern u1="&#xec;" u2="&#xef;" k="-6" />
+<hkern u1="&#xec;" u2="&#xec;" k="-14" />
+<hkern u1="&#xed;" u2="&#x2122;" k="-29" />
+<hkern u1="&#xed;" u2="&#x201d;" k="-6" />
+<hkern u1="&#xed;" u2="&#x2019;" k="-6" />
+<hkern u1="&#xed;" u2="&#xfe;" k="-20" />
+<hkern u1="&#xed;" u2="&#xef;" k="-6" />
+<hkern u1="&#xed;" u2="&#xee;" k="-20" />
+<hkern u1="&#xed;" u2="&#xed;" k="-20" />
+<hkern u1="&#xed;" u2="&#xec;" k="-14" />
+<hkern u1="&#xed;" u2="&#xdf;" k="-20" />
+<hkern u1="&#xed;" u2="&#x7d;" k="-82" />
+<hkern u1="&#xed;" u2="&#x7c;" k="-16" />
+<hkern u1="&#xed;" u2="l" k="-14" />
+<hkern u1="&#xed;" u2="k" k="-20" />
+<hkern u1="&#xed;" u2="j" k="-20" />
+<hkern u1="&#xed;" u2="i" k="-20" />
+<hkern u1="&#xed;" u2="h" k="-20" />
+<hkern u1="&#xed;" u2="b" k="-20" />
+<hkern u1="&#xed;" u2="]" k="-82" />
+<hkern u1="&#xed;" u2="\" k="-90" />
+<hkern u1="&#xed;" u2="&#x3f;" k="-76" />
+<hkern u1="&#xed;" u2="&#x2a;" k="-41" />
+<hkern u1="&#xed;" u2="&#x29;" k="-51" />
+<hkern u1="&#xed;" u2="&#x27;" k="-35" />
+<hkern u1="&#xed;" u2="&#x22;" k="-35" />
+<hkern u1="&#xed;" u2="&#x21;" k="-16" />
+<hkern u1="&#xee;" u2="&#x2122;" k="-6" />
+<hkern u1="&#xee;" u2="&#xef;" k="-6" />
+<hkern u1="&#xee;" u2="&#xec;" k="-14" />
+<hkern u1="&#xee;" u2="&#x3f;" k="-20" />
+<hkern u1="&#xee;" u2="&#x2a;" k="-39" />
+<hkern u1="&#xef;" u2="&#x2122;" k="-8" />
+<hkern u1="&#xef;" u2="&#xef;" k="-6" />
+<hkern u1="&#xef;" u2="&#xec;" k="-14" />
+<hkern u1="&#xef;" u2="&#x7d;" k="-23" />
+<hkern u1="&#xef;" u2="]" k="-23" />
+<hkern u1="&#xef;" u2="\" k="-37" />
+<hkern u1="&#xef;" u2="&#x3f;" k="-29" />
+<hkern u1="&#xef;" u2="&#x2a;" k="-37" />
+<hkern u1="&#xef;" u2="&#x29;" k="-23" />
+<hkern u1="&#xf0;" u2="&#x2122;" k="14" />
+<hkern u1="&#xf0;" u2="&#x2026;" k="18" />
+<hkern u1="&#xf0;" u2="&#x201e;" k="18" />
+<hkern u1="&#xf0;" u2="&#x201d;" k="10" />
+<hkern u1="&#xf0;" u2="&#x201c;" k="10" />
+<hkern u1="&#xf0;" u2="&#x201a;" k="18" />
+<hkern u1="&#xf0;" u2="&#x2019;" k="10" />
+<hkern u1="&#xf0;" u2="&#x2018;" k="10" />
+<hkern u1="&#xf0;" u2="&#x178;" k="86" />
+<hkern u1="&#xf0;" u2="&#xff;" k="14" />
+<hkern u1="&#xf0;" u2="&#xfd;" k="14" />
+<hkern u1="&#xf0;" u2="&#xde;" k="10" />
+<hkern u1="&#xf0;" u2="&#xdd;" k="86" />
+<hkern u1="&#xf0;" u2="&#xd1;" k="10" />
+<hkern u1="&#xf0;" u2="&#xd0;" k="10" />
+<hkern u1="&#xf0;" u2="&#xcf;" k="10" />
+<hkern u1="&#xf0;" u2="&#xce;" k="10" />
+<hkern u1="&#xf0;" u2="&#xcd;" k="10" />
+<hkern u1="&#xf0;" u2="&#xcc;" k="10" />
+<hkern u1="&#xf0;" u2="&#xcb;" k="10" />
+<hkern u1="&#xf0;" u2="&#xca;" k="10" />
+<hkern u1="&#xf0;" u2="&#xc9;" k="10" />
+<hkern u1="&#xf0;" u2="&#xc8;" k="10" />
+<hkern u1="&#xf0;" u2="&#xc6;" k="23" />
+<hkern u1="&#xf0;" u2="&#xc5;" k="18" />
+<hkern u1="&#xf0;" u2="&#xc4;" k="18" />
+<hkern u1="&#xf0;" u2="&#xc3;" k="18" />
+<hkern u1="&#xf0;" u2="&#xc2;" k="18" />
+<hkern u1="&#xf0;" u2="&#xc1;" k="18" />
+<hkern u1="&#xf0;" u2="&#xc0;" k="18" />
+<hkern u1="&#xf0;" u2="&#x7d;" k="43" />
+<hkern u1="&#xf0;" u2="y" k="14" />
+<hkern u1="&#xf0;" u2="x" k="10" />
+<hkern u1="&#xf0;" u2="w" k="8" />
+<hkern u1="&#xf0;" u2="v" k="12" />
+<hkern u1="&#xf0;" u2="]" k="49" />
+<hkern u1="&#xf0;" u2="\" k="39" />
+<hkern u1="&#xf0;" u2="Z" k="25" />
+<hkern u1="&#xf0;" u2="Y" k="86" />
+<hkern u1="&#xf0;" u2="X" k="57" />
+<hkern u1="&#xf0;" u2="W" k="25" />
+<hkern u1="&#xf0;" u2="V" k="43" />
+<hkern u1="&#xf0;" u2="T" k="102" />
+<hkern u1="&#xf0;" u2="S" k="8" />
+<hkern u1="&#xf0;" u2="R" k="10" />
+<hkern u1="&#xf0;" u2="P" k="10" />
+<hkern u1="&#xf0;" u2="N" k="10" />
+<hkern u1="&#xf0;" u2="M" k="10" />
+<hkern u1="&#xf0;" u2="L" k="10" />
+<hkern u1="&#xf0;" u2="K" k="10" />
+<hkern u1="&#xf0;" u2="J" k="55" />
+<hkern u1="&#xf0;" u2="I" k="10" />
+<hkern u1="&#xf0;" u2="H" k="10" />
+<hkern u1="&#xf0;" u2="F" k="10" />
+<hkern u1="&#xf0;" u2="E" k="10" />
+<hkern u1="&#xf0;" u2="D" k="10" />
+<hkern u1="&#xf0;" u2="B" k="10" />
+<hkern u1="&#xf0;" u2="A" k="18" />
+<hkern u1="&#xf0;" u2="&#x3f;" k="27" />
+<hkern u1="&#xf0;" u2="&#x2f;" k="10" />
+<hkern u1="&#xf0;" u2="&#x2e;" k="18" />
+<hkern u1="&#xf0;" u2="&#x2c;" k="18" />
+<hkern u1="&#xf0;" u2="&#x29;" k="29" />
+<hkern u1="&#xf1;" u2="&#x2122;" k="33" />
+<hkern u1="&#xf1;" u2="&#x7d;" k="49" />
+<hkern u1="&#xf1;" u2="v" k="10" />
+<hkern u1="&#xf1;" u2="]" k="53" />
+<hkern u1="&#xf1;" u2="\" k="74" />
+<hkern u1="&#xf1;" u2="V" k="59" />
+<hkern u1="&#xf1;" u2="&#x3f;" k="45" />
+<hkern u1="&#xf1;" u2="&#x2a;" k="6" />
+<hkern u1="&#xf1;" u2="&#x29;" k="8" />
+<hkern u1="&#xf2;" u2="&#x2122;" k="31" />
+<hkern u1="&#xf2;" u2="&#xc6;" k="14" />
+<hkern u1="&#xf2;" u2="&#x7d;" k="68" />
+<hkern u1="&#xf2;" u2="x" k="25" />
+<hkern u1="&#xf2;" u2="v" k="18" />
+<hkern u1="&#xf2;" u2="]" k="78" />
+<hkern u1="&#xf2;" u2="\" k="76" />
+<hkern u1="&#xf2;" u2="X" k="43" />
+<hkern u1="&#xf2;" u2="V" k="66" />
+<hkern u1="&#xf2;" u2="&#x3f;" k="47" />
+<hkern u1="&#xf2;" u2="&#x2a;" k="6" />
+<hkern u1="&#xf2;" u2="&#x29;" k="37" />
+<hkern u1="&#xf3;" u2="&#x2122;" k="31" />
+<hkern u1="&#xf3;" u2="&#xc6;" k="14" />
+<hkern u1="&#xf3;" u2="&#x7d;" k="68" />
+<hkern u1="&#xf3;" u2="x" k="25" />
+<hkern u1="&#xf3;" u2="v" k="18" />
+<hkern u1="&#xf3;" u2="]" k="78" />
+<hkern u1="&#xf3;" u2="\" k="76" />
+<hkern u1="&#xf3;" u2="X" k="43" />
+<hkern u1="&#xf3;" u2="V" k="66" />
+<hkern u1="&#xf3;" u2="&#x3f;" k="47" />
+<hkern u1="&#xf3;" u2="&#x2a;" k="6" />
+<hkern u1="&#xf3;" u2="&#x29;" k="37" />
+<hkern u1="&#xf4;" u2="&#x2122;" k="31" />
+<hkern u1="&#xf4;" u2="&#xc6;" k="14" />
+<hkern u1="&#xf4;" u2="&#x7d;" k="68" />
+<hkern u1="&#xf4;" u2="x" k="25" />
+<hkern u1="&#xf4;" u2="v" k="18" />
+<hkern u1="&#xf4;" u2="]" k="78" />
+<hkern u1="&#xf4;" u2="\" k="76" />
+<hkern u1="&#xf4;" u2="X" k="43" />
+<hkern u1="&#xf4;" u2="V" k="66" />
+<hkern u1="&#xf4;" u2="&#x3f;" k="47" />
+<hkern u1="&#xf4;" u2="&#x2a;" k="6" />
+<hkern u1="&#xf4;" u2="&#x29;" k="37" />
+<hkern u1="&#xf5;" u2="&#x2122;" k="31" />
+<hkern u1="&#xf5;" u2="&#xc6;" k="14" />
+<hkern u1="&#xf5;" u2="&#x7d;" k="68" />
+<hkern u1="&#xf5;" u2="x" k="25" />
+<hkern u1="&#xf5;" u2="v" k="18" />
+<hkern u1="&#xf5;" u2="]" k="78" />
+<hkern u1="&#xf5;" u2="\" k="76" />
+<hkern u1="&#xf5;" u2="X" k="43" />
+<hkern u1="&#xf5;" u2="V" k="66" />
+<hkern u1="&#xf5;" u2="&#x3f;" k="47" />
+<hkern u1="&#xf5;" u2="&#x2a;" k="6" />
+<hkern u1="&#xf5;" u2="&#x29;" k="37" />
+<hkern u1="&#xf6;" u2="&#x2122;" k="31" />
+<hkern u1="&#xf6;" u2="&#xc6;" k="14" />
+<hkern u1="&#xf6;" u2="&#x7d;" k="68" />
+<hkern u1="&#xf6;" u2="x" k="25" />
+<hkern u1="&#xf6;" u2="v" k="18" />
+<hkern u1="&#xf6;" u2="]" k="78" />
+<hkern u1="&#xf6;" u2="\" k="76" />
+<hkern u1="&#xf6;" u2="X" k="43" />
+<hkern u1="&#xf6;" u2="V" k="66" />
+<hkern u1="&#xf6;" u2="&#x3f;" k="47" />
+<hkern u1="&#xf6;" u2="&#x2a;" k="6" />
+<hkern u1="&#xf6;" u2="&#x29;" k="37" />
+<hkern u1="&#xf8;" u2="&#x2122;" k="31" />
+<hkern u1="&#xf8;" u2="&#xc6;" k="14" />
+<hkern u1="&#xf8;" u2="&#x7d;" k="68" />
+<hkern u1="&#xf8;" u2="x" k="25" />
+<hkern u1="&#xf8;" u2="v" k="18" />
+<hkern u1="&#xf8;" u2="]" k="78" />
+<hkern u1="&#xf8;" u2="\" k="76" />
+<hkern u1="&#xf8;" u2="X" k="43" />
+<hkern u1="&#xf8;" u2="V" k="66" />
+<hkern u1="&#xf8;" u2="&#x3f;" k="47" />
+<hkern u1="&#xf8;" u2="&#x2a;" k="6" />
+<hkern u1="&#xf8;" u2="&#x29;" k="37" />
+<hkern u1="&#xf9;" u2="&#x2122;" k="23" />
+<hkern u1="&#xf9;" u2="&#x7d;" k="47" />
+<hkern u1="&#xf9;" u2="]" k="51" />
+<hkern u1="&#xf9;" u2="\" k="47" />
+<hkern u1="&#xf9;" u2="V" k="53" />
+<hkern u1="&#xf9;" u2="&#x3f;" k="27" />
+<hkern u1="&#xf9;" u2="&#x29;" k="8" />
+<hkern u1="&#xfa;" u2="&#x2122;" k="23" />
+<hkern u1="&#xfa;" u2="&#x7d;" k="47" />
+<hkern u1="&#xfa;" u2="]" k="51" />
+<hkern u1="&#xfa;" u2="\" k="47" />
+<hkern u1="&#xfa;" u2="V" k="53" />
+<hkern u1="&#xfa;" u2="&#x3f;" k="27" />
+<hkern u1="&#xfa;" u2="&#x29;" k="8" />
+<hkern u1="&#xfb;" u2="&#x2122;" k="23" />
+<hkern u1="&#xfb;" u2="&#x7d;" k="47" />
+<hkern u1="&#xfb;" u2="]" k="51" />
+<hkern u1="&#xfb;" u2="\" k="47" />
+<hkern u1="&#xfb;" u2="V" k="53" />
+<hkern u1="&#xfb;" u2="&#x3f;" k="27" />
+<hkern u1="&#xfb;" u2="&#x29;" k="8" />
+<hkern u1="&#xfc;" u2="&#x2122;" k="23" />
+<hkern u1="&#xfc;" u2="&#x7d;" k="47" />
+<hkern u1="&#xfc;" u2="]" k="51" />
+<hkern u1="&#xfc;" u2="\" k="47" />
+<hkern u1="&#xfc;" u2="V" k="53" />
+<hkern u1="&#xfc;" u2="&#x3f;" k="27" />
+<hkern u1="&#xfc;" u2="&#x29;" k="8" />
+<hkern u1="&#xfd;" u2="&#xf0;" k="29" />
+<hkern u1="&#xfd;" u2="&#xc6;" k="43" />
+<hkern u1="&#xfd;" u2="&#x7d;" k="49" />
+<hkern u1="&#xfd;" u2="]" k="59" />
+<hkern u1="&#xfd;" u2="\" k="14" />
+<hkern u1="&#xfd;" u2="X" k="53" />
+<hkern u1="&#xfd;" u2="V" k="16" />
+<hkern u1="&#xfd;" u2="&#x3f;" k="18" />
+<hkern u1="&#xfd;" u2="&#x2f;" k="43" />
+<hkern u1="&#xfe;" u2="&#x2122;" k="35" />
+<hkern u1="&#xfe;" u2="&#xc6;" k="14" />
+<hkern u1="&#xfe;" u2="&#x7d;" k="68" />
+<hkern u1="&#xfe;" u2="x" k="25" />
+<hkern u1="&#xfe;" u2="v" k="16" />
+<hkern u1="&#xfe;" u2="]" k="76" />
+<hkern u1="&#xfe;" u2="\" k="74" />
+<hkern u1="&#xfe;" u2="X" k="41" />
+<hkern u1="&#xfe;" u2="V" k="63" />
+<hkern u1="&#xfe;" u2="&#x3f;" k="51" />
+<hkern u1="&#xfe;" u2="&#x2a;" k="16" />
+<hkern u1="&#xfe;" u2="&#x29;" k="37" />
+<hkern u1="&#xff;" u2="&#xf0;" k="29" />
+<hkern u1="&#xff;" u2="&#xc6;" k="43" />
+<hkern u1="&#xff;" u2="&#x7d;" k="49" />
+<hkern u1="&#xff;" u2="]" k="59" />
+<hkern u1="&#xff;" u2="\" k="14" />
+<hkern u1="&#xff;" u2="X" k="53" />
+<hkern u1="&#xff;" u2="V" k="16" />
+<hkern u1="&#xff;" u2="&#x3f;" k="18" />
+<hkern u1="&#xff;" u2="&#x2f;" k="43" />
+<hkern u1="&#x152;" u2="&#xf0;" k="16" />
+<hkern u1="&#x152;" u2="&#xef;" k="-27" />
+<hkern u1="&#x152;" u2="&#xee;" k="-25" />
+<hkern u1="&#x152;" u2="&#xec;" k="-74" />
+<hkern u1="&#x152;" u2="v" k="23" />
+<hkern u1="&#x152;" u2="f" k="6" />
+<hkern u1="&#x153;" u2="&#x2122;" k="29" />
+<hkern u1="&#x153;" u2="&#xc6;" k="10" />
+<hkern u1="&#x153;" u2="&#x7d;" k="55" />
+<hkern u1="&#x153;" u2="x" k="8" />
+<hkern u1="&#x153;" u2="v" k="16" />
+<hkern u1="&#x153;" u2="]" k="51" />
+<hkern u1="&#x153;" u2="\" k="70" />
+<hkern u1="&#x153;" u2="V" k="63" />
+<hkern u1="&#x153;" u2="&#x3f;" k="41" />
+<hkern u1="&#x153;" u2="&#x29;" k="10" />
+<hkern u1="&#x178;" u2="&#xff;" k="70" />
+<hkern u1="&#x178;" u2="&#xf0;" k="80" />
+<hkern u1="&#x178;" u2="&#xef;" k="-90" />
+<hkern u1="&#x178;" u2="&#xee;" k="-16" />
+<hkern u1="&#x178;" u2="&#xec;" k="-131" />
+<hkern u1="&#x178;" u2="&#xeb;" k="137" />
+<hkern u1="&#x178;" u2="&#xe4;" k="117" />
+<hkern u1="&#x178;" u2="&#xe3;" k="109" />
+<hkern u1="&#x178;" u2="&#xdf;" k="12" />
+<hkern u1="&#x178;" u2="&#xc6;" k="106" />
+<hkern u1="&#x178;" u2="&#xae;" k="45" />
+<hkern u1="&#x178;" u2="x" k="82" />
+<hkern u1="&#x178;" u2="v" k="84" />
+<hkern u1="&#x178;" u2="f" k="37" />
+<hkern u1="&#x178;" u2="&#x40;" k="74" />
+<hkern u1="&#x178;" u2="&#x2f;" k="131" />
+<hkern u1="&#x178;" u2="&#x26;" k="76" />
+<hkern u1="&#x2013;" u2="&#xc6;" k="35" />
+<hkern u1="&#x2013;" u2="x" k="63" />
+<hkern u1="&#x2013;" u2="v" k="27" />
+<hkern u1="&#x2013;" u2="f" k="25" />
+<hkern u1="&#x2013;" u2="X" k="80" />
+<hkern u1="&#x2013;" u2="V" k="63" />
+<hkern u1="&#x2014;" u2="&#xc6;" k="35" />
+<hkern u1="&#x2014;" u2="x" k="63" />
+<hkern u1="&#x2014;" u2="v" k="27" />
+<hkern u1="&#x2014;" u2="f" k="25" />
+<hkern u1="&#x2014;" u2="X" k="80" />
+<hkern u1="&#x2014;" u2="V" k="63" />
+<hkern u1="&#x2018;" u2="&#xf0;" k="20" />
+<hkern u1="&#x2018;" u2="&#xef;" k="-29" />
+<hkern u1="&#x2018;" u2="&#xee;" k="-12" />
+<hkern u1="&#x2018;" u2="&#xec;" k="-63" />
+<hkern u1="&#x2018;" u2="&#xc6;" k="121" />
+<hkern u1="&#x2019;" u2="&#xf0;" k="20" />
+<hkern u1="&#x2019;" u2="&#xef;" k="-37" />
+<hkern u1="&#x2019;" u2="&#xee;" k="-8" />
+<hkern u1="&#x2019;" u2="&#xec;" k="-72" />
+<hkern u1="&#x2019;" u2="&#xc6;" k="125" />
+<hkern u1="&#x2019;" u2="&#x40;" k="49" />
+<hkern u1="&#x2019;" u2="&#x2f;" k="145" />
+<hkern u1="&#x2019;" u2="&#x26;" k="63" />
+<hkern u1="&#x201a;" u2="v" k="72" />
+<hkern u1="&#x201a;" u2="f" k="20" />
+<hkern u1="&#x201a;" u2="V" k="109" />
+<hkern u1="&#x201c;" u2="&#xf0;" k="20" />
+<hkern u1="&#x201c;" u2="&#xef;" k="-29" />
+<hkern u1="&#x201c;" u2="&#xee;" k="-12" />
+<hkern u1="&#x201c;" u2="&#xec;" k="-63" />
+<hkern u1="&#x201c;" u2="&#xc6;" k="121" />
+<hkern u1="&#x201d;" u2="&#xf0;" k="20" />
+<hkern u1="&#x201d;" u2="&#xef;" k="-37" />
+<hkern u1="&#x201d;" u2="&#xee;" k="-8" />
+<hkern u1="&#x201d;" u2="&#xec;" k="-72" />
+<hkern u1="&#x201d;" u2="&#xc6;" k="125" />
+<hkern u1="&#x201d;" u2="&#x40;" k="49" />
+<hkern u1="&#x201d;" u2="&#x2f;" k="145" />
+<hkern u1="&#x201d;" u2="&#x26;" k="63" />
+<hkern u1="&#x201e;" u2="v" k="72" />
+<hkern u1="&#x201e;" u2="f" k="20" />
+<hkern u1="&#x201e;" u2="V" k="109" />
+<hkern u1="&#x2039;" u2="V" k="39" />
+<hkern u1="&#x203a;" u2="&#xc6;" k="14" />
+<hkern u1="&#x203a;" u2="x" k="53" />
+<hkern u1="&#x203a;" u2="v" k="16" />
+<hkern u1="&#x203a;" u2="f" k="8" />
+<hkern u1="&#x203a;" u2="X" k="49" />
+<hkern u1="&#x203a;" u2="V" k="57" />
+<hkern u1="&#x2122;" u2="&#xef;" k="-29" />
+<hkern u1="&#x2122;" u2="&#xee;" k="-37" />
+<hkern u1="&#x2122;" u2="&#xec;" k="-37" />
+<hkern u1="&#x2122;" u2="&#xc6;" k="72" />
+<hkern u1="&#x2122;" u2="&#xc5;" k="57" />
+<hkern u1="&#x2122;" u2="&#xc4;" k="57" />
+<hkern u1="&#x2122;" u2="&#xc3;" k="57" />
+<hkern u1="&#x2122;" u2="&#xc2;" k="57" />
+<hkern u1="&#x2122;" u2="&#xc1;" k="57" />
+<hkern u1="&#x2122;" u2="&#xc0;" k="57" />
+<hkern u1="&#x2122;" u2="Z" k="10" />
+<hkern u1="&#x2122;" u2="J" k="45" />
+<hkern u1="&#x2122;" u2="A" k="57" />
+<hkern g1="C,Ccedilla" g2="C,Ccedilla" k="16" />
+<hkern g1="C,Ccedilla" g2="J" k="8" />
+<hkern g1="C,Ccedilla" g2="G,O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="23" />
+<hkern g1="C,Ccedilla" g2="d,q" k="20" />
+<hkern g1="C,Ccedilla" g2="g" k="31" />
+<hkern g1="C,Ccedilla" g2="guillemotleft,guilsinglleft" k="31" />
+<hkern g1="C,Ccedilla" g2="hyphen,endash,emdash" k="63" />
+<hkern g1="C,Ccedilla" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="20" />
+<hkern g1="C,Ccedilla" g2="t" k="10" />
+<hkern g1="C,Ccedilla" g2="w" k="33" />
+<hkern g1="C,Ccedilla" g2="y,yacute,ydieresis" k="31" />
+<hkern g1="C,Ccedilla" g2="guillemotright,guilsinglright" k="10" />
+<hkern g1="C,Ccedilla" g2="m,n,p,r,ntilde" k="8" />
+<hkern g1="C,Ccedilla" g2="u,ugrave,uacute,ucircumflex,udieresis" k="23" />
+<hkern g1="D,Eth" g2="J" k="41" />
+<hkern g1="D,Eth" g2="T" k="47" />
+<hkern g1="D,Eth" g2="W" k="6" />
+<hkern g1="D,Eth" g2="Y,Yacute,Ydieresis" k="59" />
+<hkern g1="D,Eth" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="29" />
+<hkern g1="D,Eth" g2="Z" k="14" />
+<hkern g1="D,Eth" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="31" />
+<hkern g1="E,AE,Egrave,Eacute,Ecircumflex,Edieresis,OE" g2="C,Ccedilla" k="16" />
+<hkern g1="E,AE,Egrave,Eacute,Ecircumflex,Edieresis,OE" g2="G,O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="16" />
+<hkern g1="E,AE,Egrave,Eacute,Ecircumflex,Edieresis,OE" g2="S" k="6" />
+<hkern g1="E,AE,Egrave,Eacute,Ecircumflex,Edieresis,OE" g2="d,q" k="18" />
+<hkern g1="E,AE,Egrave,Eacute,Ecircumflex,Edieresis,OE" g2="g" k="29" />
+<hkern g1="E,AE,Egrave,Eacute,Ecircumflex,Edieresis,OE" g2="guillemotleft,guilsinglleft" k="25" />
+<hkern g1="E,AE,Egrave,Eacute,Ecircumflex,Edieresis,OE" g2="hyphen,endash,emdash" k="43" />
+<hkern g1="E,AE,Egrave,Eacute,Ecircumflex,Edieresis,OE" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="18" />
+<hkern g1="E,AE,Egrave,Eacute,Ecircumflex,Edieresis,OE" g2="t" k="12" />
+<hkern g1="E,AE,Egrave,Eacute,Ecircumflex,Edieresis,OE" g2="w" k="27" />
+<hkern g1="E,AE,Egrave,Eacute,Ecircumflex,Edieresis,OE" g2="y,yacute,ydieresis" k="23" />
+<hkern g1="E,AE,Egrave,Eacute,Ecircumflex,Edieresis,OE" g2="u,ugrave,uacute,ucircumflex,udieresis" k="16" />
+<hkern g1="G" g2="J" k="20" />
+<hkern g1="G" g2="Y,Yacute,Ydieresis" k="35" />
+<hkern g1="G" g2="g" k="12" />
+<hkern g1="G" g2="t" k="10" />
+<hkern g1="G" g2="w" k="14" />
+<hkern g1="G" g2="y,yacute,ydieresis" k="14" />
+<hkern g1="H,I,M,N,Igrave,Iacute,Icircumflex,Idieresis,Ntilde" g2="J" k="12" />
+<hkern g1="H,I,M,N,Igrave,Iacute,Icircumflex,Idieresis,Ntilde" g2="d,q" k="10" />
+<hkern g1="H,I,M,N,Igrave,Iacute,Icircumflex,Idieresis,Ntilde" g2="g" k="20" />
+<hkern g1="H,I,M,N,Igrave,Iacute,Icircumflex,Idieresis,Ntilde" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="10" />
+<hkern g1="J" g2="d,q" k="10" />
+<hkern g1="J" g2="g" k="16" />
+<hkern g1="J" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="10" />
+<hkern g1="K" g2="C,Ccedilla" k="31" />
+<hkern g1="K" g2="G,O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="35" />
+<hkern g1="K" g2="d,q" k="29" />
+<hkern g1="K" g2="g" k="25" />
+<hkern g1="K" g2="guillemotleft,guilsinglleft" k="45" />
+<hkern g1="K" g2="hyphen,endash,emdash" k="74" />
+<hkern g1="K" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="31" />
+<hkern g1="K" g2="t" k="23" />
+<hkern g1="K" g2="w" k="51" />
+<hkern g1="K" g2="y,yacute,ydieresis" k="51" />
+<hkern g1="K" g2="m,n,p,r,ntilde" k="6" />
+<hkern g1="K" g2="u,ugrave,uacute,ucircumflex,udieresis" k="27" />
+<hkern g1="L" g2="C,Ccedilla" k="33" />
+<hkern g1="L" g2="G,O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="41" />
+<hkern g1="L" g2="T" k="195" />
+<hkern g1="L" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="27" />
+<hkern g1="L" g2="W" k="92" />
+<hkern g1="L" g2="Y,Yacute,Ydieresis" k="182" />
+<hkern g1="L" g2="d,q" k="10" />
+<hkern g1="L" g2="guillemotleft,guilsinglleft" k="80" />
+<hkern g1="L" g2="hyphen,endash,emdash" k="150" />
+<hkern g1="L" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="10" />
+<hkern g1="L" g2="quoteleft,quotedblleft" k="184" />
+<hkern g1="L" g2="quoteright,quotedblright" k="182" />
+<hkern g1="L" g2="quotedbl,quotesingle" k="184" />
+<hkern g1="L" g2="t" k="37" />
+<hkern g1="L" g2="w" k="72" />
+<hkern g1="L" g2="y,yacute,ydieresis" k="94" />
+<hkern g1="L" g2="guillemotright,guilsinglright" k="29" />
+<hkern g1="L" g2="u,ugrave,uacute,ucircumflex,udieresis" k="10" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="J" k="39" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="T" k="41" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="W" k="6" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="Y,Yacute,Ydieresis" k="57" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="25" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="Z" k="10" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="23" />
+<hkern g1="R" g2="J" k="10" />
+<hkern g1="R" g2="T" k="20" />
+<hkern g1="R" g2="Y,Yacute,Ydieresis" k="43" />
+<hkern g1="R" g2="d,q" k="18" />
+<hkern g1="R" g2="g" k="16" />
+<hkern g1="R" g2="guillemotleft,guilsinglleft" k="29" />
+<hkern g1="R" g2="hyphen,endash,emdash" k="20" />
+<hkern g1="R" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="18" />
+<hkern g1="R" g2="u,ugrave,uacute,ucircumflex,udieresis" k="6" />
+<hkern g1="R" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="14" />
+<hkern g1="S" g2="J" k="29" />
+<hkern g1="S" g2="Y,Yacute,Ydieresis" k="31" />
+<hkern g1="S" g2="g" k="16" />
+<hkern g1="S" g2="t" k="18" />
+<hkern g1="S" g2="w" k="18" />
+<hkern g1="S" g2="y,yacute,ydieresis" k="20" />
+<hkern g1="S" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="20" />
+<hkern g1="S" g2="z" k="6" />
+<hkern g1="T" g2="C,Ccedilla" k="29" />
+<hkern g1="T" g2="J" k="45" />
+<hkern g1="T" g2="G,O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="41" />
+<hkern g1="T" g2="d,q" k="184" />
+<hkern g1="T" g2="g" k="207" />
+<hkern g1="T" g2="guillemotleft,guilsinglleft" k="125" />
+<hkern g1="T" g2="hyphen,endash,emdash" k="131" />
+<hkern g1="T" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="186" />
+<hkern g1="T" g2="t" k="53" />
+<hkern g1="T" g2="w" k="141" />
+<hkern g1="T" g2="y,yacute,ydieresis" k="139" />
+<hkern g1="T" g2="guillemotright,guilsinglright" k="119" />
+<hkern g1="T" g2="m,n,p,r,ntilde" k="176" />
+<hkern g1="T" g2="u,ugrave,uacute,ucircumflex,udieresis" k="178" />
+<hkern g1="T" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="96" />
+<hkern g1="T" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="129" />
+<hkern g1="T" g2="z" k="176" />
+<hkern g1="T" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="182" />
+<hkern g1="T" g2="b,thorn" k="14" />
+<hkern g1="T" g2="colon,semicolon" k="113" />
+<hkern g1="T" g2="s" k="180" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="J" k="33" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="d,q" k="10" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="g" k="23" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="10" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="u,ugrave,uacute,ucircumflex,udieresis" k="10" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="14" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="25" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="s" k="10" />
+<hkern g1="W" g2="J" k="39" />
+<hkern g1="W" g2="d,q" k="41" />
+<hkern g1="W" g2="g" k="49" />
+<hkern g1="W" g2="guillemotleft,guilsinglleft" k="35" />
+<hkern g1="W" g2="hyphen,endash,emdash" k="39" />
+<hkern g1="W" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="41" />
+<hkern g1="W" g2="guillemotright,guilsinglright" k="16" />
+<hkern g1="W" g2="m,n,p,r,ntilde" k="31" />
+<hkern g1="W" g2="u,ugrave,uacute,ucircumflex,udieresis" k="25" />
+<hkern g1="W" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="45" />
+<hkern g1="W" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="74" />
+<hkern g1="W" g2="z" k="6" />
+<hkern g1="W" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="31" />
+<hkern g1="W" g2="s" k="31" />
+<hkern g1="Y,Yacute,Ydieresis" g2="C,Ccedilla" k="55" />
+<hkern g1="Y,Yacute,Ydieresis" g2="J" k="78" />
+<hkern g1="Y,Yacute,Ydieresis" g2="G,O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="59" />
+<hkern g1="Y,Yacute,Ydieresis" g2="S" k="37" />
+<hkern g1="Y,Yacute,Ydieresis" g2="d,q" k="145" />
+<hkern g1="Y,Yacute,Ydieresis" g2="g" k="154" />
+<hkern g1="Y,Yacute,Ydieresis" g2="guillemotleft,guilsinglleft" k="135" />
+<hkern g1="Y,Yacute,Ydieresis" g2="hyphen,endash,emdash" k="145" />
+<hkern g1="Y,Yacute,Ydieresis" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="143" />
+<hkern g1="Y,Yacute,Ydieresis" g2="t" k="35" />
+<hkern g1="Y,Yacute,Ydieresis" g2="w" k="92" />
+<hkern g1="Y,Yacute,Ydieresis" g2="y,yacute,ydieresis" k="86" />
+<hkern g1="Y,Yacute,Ydieresis" g2="guillemotright,guilsinglright" k="102" />
+<hkern g1="Y,Yacute,Ydieresis" g2="m,n,p,r,ntilde" k="125" />
+<hkern g1="Y,Yacute,Ydieresis" g2="u,ugrave,uacute,ucircumflex,udieresis" k="121" />
+<hkern g1="Y,Yacute,Ydieresis" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="98" />
+<hkern g1="Y,Yacute,Ydieresis" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="152" />
+<hkern g1="Y,Yacute,Ydieresis" g2="z" k="98" />
+<hkern g1="Y,Yacute,Ydieresis" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="133" />
+<hkern g1="Y,Yacute,Ydieresis" g2="colon,semicolon" k="88" />
+<hkern g1="Y,Yacute,Ydieresis" g2="s" k="143" />
+<hkern g1="Z" g2="C,Ccedilla" k="10" />
+<hkern g1="Z" g2="G,O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="10" />
+<hkern g1="Z" g2="d,q" k="23" />
+<hkern g1="Z" g2="g" k="31" />
+<hkern g1="Z" g2="guillemotleft,guilsinglleft" k="33" />
+<hkern g1="Z" g2="hyphen,endash,emdash" k="66" />
+<hkern g1="Z" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="20" />
+<hkern g1="Z" g2="t" k="8" />
+<hkern g1="Z" g2="w" k="27" />
+<hkern g1="Z" g2="y,yacute,ydieresis" k="25" />
+<hkern g1="Z" g2="guillemotright,guilsinglright" k="10" />
+<hkern g1="Z" g2="m,n,p,r,ntilde" k="12" />
+<hkern g1="Z" g2="u,ugrave,uacute,ucircumflex,udieresis" k="23" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="T" k="162" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="8" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="W" k="29" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="Y,Yacute,Ydieresis" k="129" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="quotedbl,quotesingle" k="8" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="y,yacute,ydieresis" k="10" />
+<hkern g1="b,p,thorn" g2="J" k="53" />
+<hkern g1="b,p,thorn" g2="S" k="14" />
+<hkern g1="b,p,thorn" g2="T" k="186" />
+<hkern g1="b,p,thorn" g2="W" k="39" />
+<hkern g1="b,p,thorn" g2="Y,Yacute,Ydieresis" k="139" />
+<hkern g1="b,p,thorn" g2="quoteleft,quotedblleft" k="31" />
+<hkern g1="b,p,thorn" g2="quoteright,quotedblright" k="31" />
+<hkern g1="b,p,thorn" g2="quotedbl,quotesingle" k="33" />
+<hkern g1="b,p,thorn" g2="t" k="6" />
+<hkern g1="b,p,thorn" g2="w" k="10" />
+<hkern g1="b,p,thorn" g2="y,yacute,ydieresis" k="18" />
+<hkern g1="b,p,thorn" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="12" />
+<hkern g1="b,p,thorn" g2="Z" k="16" />
+<hkern g1="b,p,thorn" g2="z" k="6" />
+<hkern g1="b,p,thorn" g2="B,D,E,F,H,I,K,L,M,N,P,R,Egrave,Eacute,Ecircumflex,Edieresis,Igrave,Iacute,Icircumflex,Idieresis,Eth,Ntilde,Thorn" k="10" />
+<hkern g1="c,ccedilla" g2="J" k="14" />
+<hkern g1="c,ccedilla" g2="T" k="209" />
+<hkern g1="c,ccedilla" g2="Y,Yacute,Ydieresis" k="100" />
+<hkern g1="c,ccedilla" g2="d,q" k="10" />
+<hkern g1="c,ccedilla" g2="g" k="10" />
+<hkern g1="c,ccedilla" g2="guillemotleft,guilsinglleft" k="63" />
+<hkern g1="c,ccedilla" g2="hyphen,endash,emdash" k="82" />
+<hkern g1="c,ccedilla" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="12" />
+<hkern g1="c,ccedilla" g2="guillemotright,guilsinglright" k="14" />
+<hkern g1="colon,semicolon" g2="T" k="113" />
+<hkern g1="colon,semicolon" g2="Y,Yacute,Ydieresis" k="88" />
+<hkern g1="d" g2="J" k="35" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="J" k="31" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="S" k="8" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="T" k="188" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="W" k="35" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="Y,Yacute,Ydieresis" k="172" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="quoteleft,quotedblleft" k="20" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="quoteright,quotedblright" k="20" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="quotedbl,quotesingle" k="27" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="t" k="6" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="w" k="10" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="y,yacute,ydieresis" k="18" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="Z" k="10" />
+<hkern g1="g" g2="T" k="150" />
+<hkern g1="g" g2="Y,Yacute,Ydieresis" k="66" />
+<hkern g1="g" g2="guillemotleft,guilsinglleft" k="8" />
+<hkern g1="g" g2="hyphen,endash,emdash" k="25" />
+<hkern g1="guillemotleft,guilsinglleft" g2="J" k="37" />
+<hkern g1="guillemotleft,guilsinglleft" g2="T" k="121" />
+<hkern g1="guillemotleft,guilsinglleft" g2="W" k="16" />
+<hkern g1="guillemotleft,guilsinglleft" g2="Y,Yacute,Ydieresis" k="104" />
+<hkern g1="guillemotleft,guilsinglleft" g2="quoteright,quotedblright" k="72" />
+<hkern g1="guillemotleft,guilsinglleft" g2="quotedbl,quotesingle" k="76" />
+<hkern g1="guillemotleft,guilsinglleft" g2="t" k="16" />
+<hkern g1="guillemotright,guilsinglright" g2="J" k="39" />
+<hkern g1="guillemotright,guilsinglright" g2="S" k="31" />
+<hkern g1="guillemotright,guilsinglright" g2="T" k="125" />
+<hkern g1="guillemotright,guilsinglright" g2="W" k="35" />
+<hkern g1="guillemotright,guilsinglright" g2="Y,Yacute,Ydieresis" k="135" />
+<hkern g1="guillemotright,guilsinglright" g2="quoteright,quotedblright" k="125" />
+<hkern g1="guillemotright,guilsinglright" g2="quotedbl,quotesingle" k="133" />
+<hkern g1="guillemotright,guilsinglright" g2="t" k="14" />
+<hkern g1="guillemotright,guilsinglright" g2="w" k="12" />
+<hkern g1="guillemotright,guilsinglright" g2="y,yacute,ydieresis" k="25" />
+<hkern g1="guillemotright,guilsinglright" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="10" />
+<hkern g1="guillemotright,guilsinglright" g2="Z" k="23" />
+<hkern g1="guillemotright,guilsinglright" g2="z" k="53" />
+<hkern g1="hyphen,endash,emdash" g2="J" k="59" />
+<hkern g1="hyphen,endash,emdash" g2="S" k="55" />
+<hkern g1="hyphen,endash,emdash" g2="T" k="131" />
+<hkern g1="hyphen,endash,emdash" g2="W" k="39" />
+<hkern g1="hyphen,endash,emdash" g2="Y,Yacute,Ydieresis" k="145" />
+<hkern g1="hyphen,endash,emdash" g2="quoteright,quotedblright" k="141" />
+<hkern g1="hyphen,endash,emdash" g2="quotedbl,quotesingle" k="152" />
+<hkern g1="hyphen,endash,emdash" g2="t" k="31" />
+<hkern g1="hyphen,endash,emdash" g2="w" k="16" />
+<hkern g1="hyphen,endash,emdash" g2="y,yacute,ydieresis" k="29" />
+<hkern g1="hyphen,endash,emdash" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="20" />
+<hkern g1="hyphen,endash,emdash" g2="Z" k="57" />
+<hkern g1="hyphen,endash,emdash" g2="z" k="76" />
+<hkern g1="hyphen,endash,emdash" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="16" />
+<hkern g1="i,j,igrave,iacute,icircumflex,idieresis" g2="J" k="35" />
+<hkern g1="k" g2="C,Ccedilla" k="6" />
+<hkern g1="k" g2="G,O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="8" />
+<hkern g1="k" g2="T" k="154" />
+<hkern g1="k" g2="Y,Yacute,Ydieresis" k="84" />
+<hkern g1="k" g2="d,q" k="25" />
+<hkern g1="k" g2="g" k="20" />
+<hkern g1="k" g2="guillemotleft,guilsinglleft" k="55" />
+<hkern g1="k" g2="hyphen,endash,emdash" k="74" />
+<hkern g1="k" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="27" />
+<hkern g1="k" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="6" />
+<hkern g1="l" g2="J" k="35" />
+<hkern g1="h,m,n,ntilde" g2="J" k="37" />
+<hkern g1="h,m,n,ntilde" g2="S" k="12" />
+<hkern g1="h,m,n,ntilde" g2="T" k="195" />
+<hkern g1="h,m,n,ntilde" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="12" />
+<hkern g1="h,m,n,ntilde" g2="W" k="37" />
+<hkern g1="h,m,n,ntilde" g2="Y,Yacute,Ydieresis" k="141" />
+<hkern g1="h,m,n,ntilde" g2="quoteleft,quotedblleft" k="16" />
+<hkern g1="h,m,n,ntilde" g2="quoteright,quotedblright" k="16" />
+<hkern g1="h,m,n,ntilde" g2="quotedbl,quotesingle" k="25" />
+<hkern g1="h,m,n,ntilde" g2="t" k="6" />
+<hkern g1="h,m,n,ntilde" g2="w" k="10" />
+<hkern g1="h,m,n,ntilde" g2="y,yacute,ydieresis" k="12" />
+<hkern g1="h,m,n,ntilde" g2="Z" k="6" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="J" k="53" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="S" k="16" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="T" k="190" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="10" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="W" k="41" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="Y,Yacute,Ydieresis" k="143" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="quoteleft,quotedblleft" k="20" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="quoteright,quotedblright" k="23" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="quotedbl,quotesingle" k="31" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="t" k="8" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="w" k="10" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="y,yacute,ydieresis" k="20" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="12" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="Z" k="16" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="z" k="6" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="B,D,E,F,H,I,K,L,M,N,P,R,Egrave,Eacute,Ecircumflex,Edieresis,Igrave,Iacute,Icircumflex,Idieresis,Eth,Ntilde,Thorn" k="10" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="C,Ccedilla" k="23" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="G,O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="23" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="T" k="131" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="25" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="W" k="74" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="Y,Yacute,Ydieresis" k="152" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="hyphen,endash,emdash" k="70" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="quoteleft,quotedblleft" k="291" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="quoteright,quotedblright" k="295" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="quotedbl,quotesingle" k="301" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="t" k="39" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="w" k="57" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="y,yacute,ydieresis" k="74" />
+<hkern g1="quoteleft,quotedblleft" g2="J" k="45" />
+<hkern g1="quoteleft,quotedblleft" g2="G,O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="10" />
+<hkern g1="quoteleft,quotedblleft" g2="d,q" k="61" />
+<hkern g1="quoteleft,quotedblleft" g2="g" k="35" />
+<hkern g1="quoteleft,quotedblleft" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="41" />
+<hkern g1="quoteleft,quotedblleft" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="100" />
+<hkern g1="quoteleft,quotedblleft" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="311" />
+<hkern g1="quoteleft,quotedblleft" g2="s" k="29" />
+<hkern g1="quoteright,quotedblright" g2="C,Ccedilla" k="10" />
+<hkern g1="quoteright,quotedblright" g2="J" k="45" />
+<hkern g1="quoteright,quotedblright" g2="G,O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="18" />
+<hkern g1="quoteright,quotedblright" g2="d,q" k="70" />
+<hkern g1="quoteright,quotedblright" g2="g" k="43" />
+<hkern g1="quoteright,quotedblright" g2="guillemotleft,guilsinglleft" k="162" />
+<hkern g1="quoteright,quotedblright" g2="hyphen,endash,emdash" k="168" />
+<hkern g1="quoteright,quotedblright" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="49" />
+<hkern g1="quoteright,quotedblright" g2="guillemotright,guilsinglright" k="94" />
+<hkern g1="quoteright,quotedblright" g2="m,n,p,r,ntilde" k="6" />
+<hkern g1="quoteright,quotedblright" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="102" />
+<hkern g1="quoteright,quotedblright" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="322" />
+<hkern g1="quoteright,quotedblright" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="10" />
+<hkern g1="quoteright,quotedblright" g2="colon,semicolon" k="10" />
+<hkern g1="quoteright,quotedblright" g2="s" k="35" />
+<hkern g1="quotedbl,quotesingle" g2="J" k="47" />
+<hkern g1="quotedbl,quotesingle" g2="d,q" k="41" />
+<hkern g1="quotedbl,quotesingle" g2="g" k="25" />
+<hkern g1="quotedbl,quotesingle" g2="guillemotleft,guilsinglleft" k="135" />
+<hkern g1="quotedbl,quotesingle" g2="hyphen,endash,emdash" k="154" />
+<hkern g1="quotedbl,quotesingle" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="31" />
+<hkern g1="quotedbl,quotesingle" g2="guillemotright,guilsinglright" k="76" />
+<hkern g1="quotedbl,quotesingle" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="88" />
+<hkern g1="quotedbl,quotesingle" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="303" />
+<hkern g1="quotedbl,quotesingle" g2="s" k="10" />
+<hkern g1="r" g2="J" k="57" />
+<hkern g1="r" g2="T" k="141" />
+<hkern g1="r" g2="Y,Yacute,Ydieresis" k="51" />
+<hkern g1="r" g2="d,q" k="27" />
+<hkern g1="r" g2="g" k="14" />
+<hkern g1="r" g2="guillemotleft,guilsinglleft" k="86" />
+<hkern g1="r" g2="hyphen,endash,emdash" k="94" />
+<hkern g1="r" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="20" />
+<hkern g1="r" g2="guillemotright,guilsinglright" k="45" />
+<hkern g1="r" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="68" />
+<hkern g1="r" g2="Z" k="33" />
+<hkern g1="r" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="113" />
+<hkern g1="s" g2="J" k="45" />
+<hkern g1="s" g2="T" k="182" />
+<hkern g1="s" g2="W" k="25" />
+<hkern g1="s" g2="Y,Yacute,Ydieresis" k="115" />
+<hkern g1="s" g2="g" k="10" />
+<hkern g1="s" g2="hyphen,endash,emdash" k="20" />
+<hkern g1="s" g2="w" k="8" />
+<hkern g1="s" g2="y,yacute,ydieresis" k="16" />
+<hkern g1="t" g2="T" k="154" />
+<hkern g1="t" g2="Y,Yacute,Ydieresis" k="59" />
+<hkern g1="t" g2="guillemotleft,guilsinglleft" k="61" />
+<hkern g1="t" g2="hyphen,endash,emdash" k="47" />
+<hkern g1="t" g2="guillemotright,guilsinglright" k="35" />
+<hkern g1="q,u,ugrave,uacute,ucircumflex,udieresis" g2="J" k="35" />
+<hkern g1="q,u,ugrave,uacute,ucircumflex,udieresis" g2="T" k="178" />
+<hkern g1="q,u,ugrave,uacute,ucircumflex,udieresis" g2="W" k="31" />
+<hkern g1="q,u,ugrave,uacute,ucircumflex,udieresis" g2="Y,Yacute,Ydieresis" k="125" />
+<hkern g1="w" g2="J" k="53" />
+<hkern g1="w" g2="T" k="141" />
+<hkern g1="w" g2="Y,Yacute,Ydieresis" k="92" />
+<hkern g1="w" g2="d,q" k="10" />
+<hkern g1="w" g2="g" k="14" />
+<hkern g1="w" g2="guillemotleft,guilsinglleft" k="12" />
+<hkern g1="w" g2="hyphen,endash,emdash" k="16" />
+<hkern g1="w" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="10" />
+<hkern g1="w" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="33" />
+<hkern g1="w" g2="Z" k="33" />
+<hkern g1="w" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="57" />
+<hkern g1="w" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="10" />
+<hkern g1="w" g2="s" k="8" />
+<hkern g1="y,yacute,ydieresis" g2="J" k="53" />
+<hkern g1="y,yacute,ydieresis" g2="T" k="137" />
+<hkern g1="y,yacute,ydieresis" g2="Y,Yacute,Ydieresis" k="84" />
+<hkern g1="y,yacute,ydieresis" g2="d,q" k="18" />
+<hkern g1="y,yacute,ydieresis" g2="g" k="20" />
+<hkern g1="y,yacute,ydieresis" g2="guillemotleft,guilsinglleft" k="25" />
+<hkern g1="y,yacute,ydieresis" g2="hyphen,endash,emdash" k="29" />
+<hkern g1="y,yacute,ydieresis" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="18" />
+<hkern g1="y,yacute,ydieresis" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="37" />
+<hkern g1="y,yacute,ydieresis" g2="Z" k="33" />
+<hkern g1="y,yacute,ydieresis" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="74" />
+<hkern g1="y,yacute,ydieresis" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="18" />
+<hkern g1="y,yacute,ydieresis" g2="s" k="14" />
+<hkern g1="z" g2="J" k="14" />
+<hkern g1="z" g2="T" k="176" />
+<hkern g1="z" g2="W" k="12" />
+<hkern g1="z" g2="Y,Yacute,Ydieresis" k="104" />
+<hkern g1="z" g2="d,q" k="8" />
+<hkern g1="z" g2="guillemotleft,guilsinglleft" k="53" />
+<hkern g1="z" g2="hyphen,endash,emdash" k="66" />
+<hkern g1="z" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="6" />
+</font>
+</defs></svg> \ No newline at end of file
diff --git a/admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/fonts/titillium/titilliumweb-regular-webfont.ttf b/admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/fonts/titillium/titilliumweb-regular-webfont.ttf
new file mode 100644
index 0000000..f3adc9f
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/fonts/titillium/titilliumweb-regular-webfont.ttf
Binary files differ
diff --git a/admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/fonts/titillium/titilliumweb-regular-webfont.woff b/admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/fonts/titillium/titilliumweb-regular-webfont.woff
new file mode 100644
index 0000000..4758678
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/fonts/titillium/titilliumweb-regular-webfont.woff
Binary files differ
diff --git a/admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/style.css b/admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/style.css
new file mode 100644
index 0000000..4879612
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/style.css
@@ -0,0 +1,1122 @@
+/* jsTree default theme */
+.jstree-node,
+.jstree-children,
+.jstree-container-ul {
+ display: block;
+ margin: 0;
+ padding: 0;
+ list-style-type: none;
+ list-style-image: none;
+}
+.jstree-node {
+ white-space: nowrap;
+}
+.jstree-anchor {
+ display: inline-block;
+ color: #333;
+ white-space: nowrap;
+ padding: 0 4px 0 1px;
+ margin: 0;
+ vertical-align: top;
+}
+.jstree-anchor:focus {
+ outline: 0;
+}
+.jstree-anchor,
+.jstree-anchor:link,
+.jstree-anchor:visited,
+.jstree-anchor:hover,
+.jstree-anchor:active {
+ text-decoration: none;
+ color: inherit;
+}
+.jstree-icon {
+ display: inline-block;
+ text-decoration: none;
+ margin: 0;
+ padding: 0;
+ vertical-align: top;
+ text-align: center;
+}
+.jstree-icon:empty {
+ display: inline-block;
+ text-decoration: none;
+ margin: 0;
+ padding: 0;
+ vertical-align: top;
+ text-align: center;
+}
+.jstree-ocl {
+ cursor: pointer;
+}
+.jstree-leaf > .jstree-ocl {
+ cursor: default;
+}
+.jstree .jstree-open > .jstree-children {
+ display: block;
+}
+.jstree .jstree-closed > .jstree-children,
+.jstree .jstree-leaf > .jstree-children {
+ display: none;
+}
+.jstree-anchor > .jstree-themeicon {
+ margin-right: 2px;
+}
+.jstree-no-icons .jstree-themeicon,
+.jstree-anchor > .jstree-themeicon-hidden {
+ display: none;
+}
+.jstree-rtl .jstree-anchor {
+ padding: 0 1px 0 4px;
+}
+.jstree-rtl .jstree-anchor > .jstree-themeicon {
+ margin-left: 2px;
+ margin-right: 0;
+}
+.jstree-rtl .jstree-node {
+ margin-left: 0;
+}
+.jstree-rtl .jstree-container-ul > .jstree-node {
+ margin-right: 0;
+}
+.jstree-wholerow-ul {
+ position: relative;
+ display: inline-block;
+ min-width: 100%;
+}
+.jstree-wholerow-ul .jstree-leaf > .jstree-ocl {
+ cursor: pointer;
+}
+.jstree-wholerow-ul .jstree-anchor,
+.jstree-wholerow-ul .jstree-icon {
+ position: relative;
+}
+.jstree-wholerow-ul .jstree-wholerow {
+ width: 100%;
+ cursor: pointer;
+ position: absolute;
+ left: 0;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+.vakata-context {
+ display: none;
+}
+.vakata-context,
+.vakata-context ul {
+ margin: 0;
+ padding: 2px;
+ position: absolute;
+ background: #f5f5f5;
+ border: 1px solid #979797;
+ -moz-box-shadow: 5px 5px 4px -4px #666666;
+ -webkit-box-shadow: 2px 2px 2px #999999;
+ box-shadow: 2px 2px 2px #999999;
+}
+.vakata-context ul {
+ list-style: none;
+ left: 100%;
+ margin-top: -2.7em;
+ margin-left: -4px;
+}
+.vakata-context .vakata-context-right ul {
+ left: auto;
+ right: 100%;
+ margin-left: auto;
+ margin-right: -4px;
+}
+.vakata-context li {
+ list-style: none;
+ display: inline;
+}
+.vakata-context li > a {
+ display: block;
+ padding: 0 2em 0 2em;
+ text-decoration: none;
+ width: auto;
+ color: black;
+ white-space: nowrap;
+ line-height: 2.4em;
+ -moz-text-shadow: 1px 1px 0 white;
+ -webkit-text-shadow: 1px 1px 0 white;
+ text-shadow: 1px 1px 0 white;
+ -moz-border-radius: 1px;
+ -webkit-border-radius: 1px;
+ border-radius: 1px;
+}
+.vakata-context li > a:hover {
+ position: relative;
+ background-color: #e8eff7;
+ -moz-box-shadow: 0 0 2px #0a6aa1;
+ -webkit-box-shadow: 0 0 2px #0a6aa1;
+ box-shadow: 0 0 2px #0a6aa1;
+}
+.vakata-context li > a.vakata-context-parent {
+ background-image: url("data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAIORI4JlrqN1oMSnmmZDQUAOw==");
+ background-position: right center;
+ background-repeat: no-repeat;
+}
+.vakata-context li > a:focus {
+ outline: 0;
+}
+.vakata-context .vakata-context-hover > a {
+ position: relative;
+ background-color: #e8eff7;
+ -moz-box-shadow: 0 0 2px #0a6aa1;
+ -webkit-box-shadow: 0 0 2px #0a6aa1;
+ box-shadow: 0 0 2px #0a6aa1;
+}
+.vakata-context .vakata-context-separator > a,
+.vakata-context .vakata-context-separator > a:hover {
+ background: white;
+ border: 0;
+ border-top: 1px solid #e2e3e3;
+ height: 1px;
+ min-height: 1px;
+ max-height: 1px;
+ padding: 0;
+ margin: 0 0 0 2.4em;
+ border-left: 1px solid #e0e0e0;
+ -moz-text-shadow: 0 0 0 transparent;
+ -webkit-text-shadow: 0 0 0 transparent;
+ text-shadow: 0 0 0 transparent;
+ -moz-box-shadow: 0 0 0 transparent;
+ -webkit-box-shadow: 0 0 0 transparent;
+ box-shadow: 0 0 0 transparent;
+ -moz-border-radius: 0;
+ -webkit-border-radius: 0;
+ border-radius: 0;
+}
+.vakata-context .vakata-contextmenu-disabled a,
+.vakata-context .vakata-contextmenu-disabled a:hover {
+ color: silver;
+ background-color: transparent;
+ border: 0;
+ box-shadow: 0 0 0;
+}
+.vakata-context li > a > i {
+ text-decoration: none;
+ display: inline-block;
+ width: 2.4em;
+ height: 2.4em;
+ background: transparent;
+ margin: 0 0 0 -2em;
+ vertical-align: top;
+ text-align: center;
+ line-height: 2.4em;
+}
+.vakata-context li > a > i:empty {
+ width: 2.4em;
+ line-height: 2.4em;
+}
+.vakata-context li > a .vakata-contextmenu-sep {
+ display: inline-block;
+ width: 1px;
+ height: 2.4em;
+ background: white;
+ margin: 0 0.5em 0 0;
+ border-left: 1px solid #e2e3e3;
+}
+.vakata-context .vakata-contextmenu-shortcut {
+ font-size: 0.8em;
+ color: silver;
+ opacity: 0.5;
+ display: none;
+}
+.vakata-context-rtl ul {
+ left: auto;
+ right: 100%;
+ margin-left: auto;
+ margin-right: -4px;
+}
+.vakata-context-rtl li > a.vakata-context-parent {
+ background-image: url("data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAINjI+AC7rWHIsPtmoxLAA7");
+ background-position: left center;
+ background-repeat: no-repeat;
+}
+.vakata-context-rtl .vakata-context-separator > a {
+ margin: 0 2.4em 0 0;
+ border-left: 0;
+ border-right: 1px solid #e2e3e3;
+}
+.vakata-context-rtl .vakata-context-left ul {
+ right: auto;
+ left: 100%;
+ margin-left: -4px;
+ margin-right: auto;
+}
+.vakata-context-rtl li > a > i {
+ margin: 0 -2em 0 0;
+}
+.vakata-context-rtl li > a .vakata-contextmenu-sep {
+ margin: 0 0 0 0.5em;
+ border-left-color: white;
+ background: #e2e3e3;
+}
+#jstree-marker {
+ position: absolute;
+ top: 0;
+ left: 0;
+ margin: -5px 0 0 0;
+ padding: 0;
+ border-right: 0;
+ border-top: 5px solid transparent;
+ border-bottom: 5px solid transparent;
+ border-left: 5px solid;
+ width: 0;
+ height: 0;
+ font-size: 0;
+ line-height: 0;
+}
+#jstree-dnd {
+ line-height: 16px;
+ margin: 0;
+ padding: 4px;
+}
+#jstree-dnd .jstree-icon,
+#jstree-dnd .jstree-copy {
+ display: inline-block;
+ text-decoration: none;
+ margin: 0 2px 0 0;
+ padding: 0;
+ width: 16px;
+ height: 16px;
+}
+#jstree-dnd .jstree-ok {
+ background: green;
+}
+#jstree-dnd .jstree-er {
+ background: red;
+}
+#jstree-dnd .jstree-copy {
+ margin: 0 2px 0 2px;
+}
+.jstree-proton .jstree-node,
+.jstree-proton .jstree-icon {
+ background-repeat: no-repeat;
+ background-color: transparent;
+}
+.jstree-proton .jstree-anchor,
+.jstree-proton .jstree-wholerow {
+ transition: background-color 0.15s, box-shadow 0.15s, color 0.15s;
+}
+.jstree-proton .jstree-hovered {
+ background: #76b6ec;
+ color: #ffffff;
+ border-radius: 3px;
+ box-shadow: inset 0 0 1px #76b6ec;
+}
+.jstree-proton .jstree-clicked {
+ background: #3392e3;
+ color: #ffffff;
+ border-radius: 3px;
+ box-shadow: inset 0 0 1px #3392e3;
+}
+.jstree-proton .jstree-no-icons .jstree-anchor > .jstree-themeicon {
+ display: none;
+}
+.jstree-proton .jstree-disabled {
+ background: transparent;
+ color: #666666;
+}
+.jstree-proton .jstree-disabled.jstree-hovered {
+ background: transparent;
+ box-shadow: none;
+}
+.jstree-proton .jstree-disabled.jstree-clicked {
+ background: #efefef;
+}
+.jstree-proton .jstree-disabled > .jstree-icon {
+ opacity: 0.8;
+ filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale");
+ /* Firefox 10+ *
+filter: gray;
+/* IE6-9 */
+ -webkit-filter: grayscale(100%);
+ /* Chrome 19+ & Safari 6+ */
+}
+.jstree-proton .jstree-search {
+ font-style: italic;
+ color: #8b0000;
+ font-weight: bold;
+}
+.jstree-proton .jstree-no-checkboxes .jstree-checkbox {
+ display: none !important;
+}
+.jstree-proton.jstree-checkbox-no-clicked .jstree-clicked {
+ background: transparent;
+ color: inherit;
+ box-shadow: none;
+}
+.jstree-proton.jstree-checkbox-no-clicked .jstree-clicked.jstree-hovered {
+ background: #76b6ec;
+ color: #ffffff;
+}
+.jstree-proton.jstree-checkbox-no-clicked > .jstree-wholerow-ul .jstree-wholerow-clicked {
+ background: transparent;
+ color: inherit;
+}
+.jstree-proton.jstree-checkbox-no-clicked > .jstree-wholerow-ul .jstree-wholerow-clicked.jstree-wholerow-hovered {
+ background: #76b6ec;
+ color: #ffffff;
+}
+.jstree-proton > .jstree-striped {
+ background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAkCAMAAAB/qqA+AAAABlBMVEUAAAAAAAClZ7nPAAAAAnRSTlMNAMM9s3UAAAAXSURBVHjajcEBAQAAAIKg/H/aCQZ70AUBjAATb6YPDgAAAABJRU5ErkJggg==") left top repeat;
+}
+.jstree-proton > .jstree-wholerow-ul .jstree-hovered,
+.jstree-proton > .jstree-wholerow-ul .jstree-clicked {
+ background: transparent;
+ box-shadow: none;
+ border-radius: 0;
+}
+.jstree-proton .jstree-wholerow {
+ -moz-box-sizing: border-box;
+ -webkit-box-sizing: border-box;
+ box-sizing: border-box;
+}
+.jstree-proton .jstree-wholerow-hovered {
+ background: #76b6ec;
+}
+.jstree-proton .jstree-wholerow-clicked {
+ background: #3392e3;
+ background: -moz-linear-gradient(top, #3392e3 0%, #3392e3 100%);
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #3392e3), color-stop(100%, #3392e3));
+ background: -webkit-linear-gradient(top, #3392e3 0%, #3392e3 100%);
+ background: -o-linear-gradient(top, #3392e3 0%, #3392e3 100%);
+ background: -ms-linear-gradient(top, #3392e3 0%, #3392e3 100%);
+ background: linear-gradient(to bottom, #3392e3 0%, #3392e3 100%);
+ /*filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='@color1', endColorstr='@color2',GradientType=0 );*/
+}
+.jstree-proton .jstree-node {
+ min-height: 22px;
+ line-height: 22px;
+ margin-left: 22px;
+ min-width: 22px;
+}
+.jstree-proton .jstree-anchor {
+ line-height: 22px;
+ margin: 1px 0 2px;
+ height: 22px;
+}
+.jstree-proton .jstree-icon {
+ width: 22px;
+ height: 22px;
+ line-height: 22px;
+}
+.jstree-proton .jstree-icon:empty {
+ width: 22px;
+ height: 22px;
+ line-height: 22px;
+}
+.jstree-proton.jstree-rtl .jstree-node {
+ margin-right: 22px;
+}
+.jstree-proton .jstree-wholerow {
+ height: 22px;
+}
+.jstree-proton .jstree-node,
+.jstree-proton .jstree-icon {
+ background-size: 320px 96px;
+ background-image: url("32px.png");
+}
+.jstree-proton .jstree-node {
+ background-position: -293px -5px;
+ background-repeat: repeat-y;
+}
+.jstree-proton .jstree-last {
+ background: transparent;
+}
+.jstree-proton .jstree-open > .jstree-ocl {
+ background-position: -133px -5px;
+}
+.jstree-proton .jstree-closed > .jstree-ocl {
+ background-position: -101px -5px;
+}
+.jstree-proton .jstree-leaf > .jstree-ocl {
+ background-position: -69px -5px;
+}
+.jstree-proton .jstree-themeicon {
+ background-position: -261px -7px;
+}
+.jstree-proton > .jstree-no-dots .jstree-node,
+.jstree-proton > .jstree-no-dots .jstree-leaf > .jstree-ocl {
+ background: transparent;
+}
+.jstree-proton > .jstree-no-dots .jstree-open > .jstree-ocl {
+ background-position: -37px -5px;
+}
+.jstree-proton > .jstree-no-dots .jstree-closed > .jstree-ocl {
+ background-position: -5px -5px;
+}
+.jstree-proton .jstree-disabled {
+ background: transparent;
+}
+.jstree-proton .jstree-disabled.jstree-hovered {
+ background: transparent;
+}
+.jstree-proton .jstree-disabled.jstree-clicked {
+ background: #efefef;
+}
+.jstree-proton .jstree-checkbox {
+ background-position: -165px -5px;
+}
+.jstree-proton .jstree-checkbox:hover {
+ background-position: -165px -37px;
+}
+.jstree-proton.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox,
+.jstree-proton .jstree-checked > .jstree-checkbox {
+ background-position: -229px -5px;
+}
+.jstree-proton.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox:hover,
+.jstree-proton .jstree-checked > .jstree-checkbox:hover {
+ background-position: -229px -37px;
+}
+.jstree-proton .jstree-anchor > .jstree-undetermined {
+ background-position: -197px -5px;
+}
+.jstree-proton .jstree-anchor > .jstree-undetermined:hover {
+ background-position: -197px -37px;
+}
+.jstree-proton > .jstree-striped {
+ background-size: auto 44px;
+}
+.jstree-proton.jstree-rtl .jstree-node {
+ background-size: 320px 96px;
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==");
+ background-position: 100% 1px;
+ background-repeat: repeat-y;
+}
+.jstree-proton.jstree-rtl .jstree-last {
+ background: transparent;
+}
+.jstree-proton.jstree-rtl .jstree-open > .jstree-ocl {
+ background-position: -133px -37px;
+}
+.jstree-proton.jstree-rtl .jstree-closed > .jstree-ocl {
+ background-position: -101px -37px;
+}
+.jstree-proton.jstree-rtl .jstree-leaf > .jstree-ocl {
+ background-position: -69px -37px;
+}
+.jstree-proton.jstree-rtl > .jstree-no-dots .jstree-node,
+.jstree-proton.jstree-rtl > .jstree-no-dots .jstree-leaf > .jstree-ocl {
+ background: transparent;
+}
+.jstree-proton.jstree-rtl > .jstree-no-dots .jstree-open > .jstree-ocl {
+ background-position: -37px -37px;
+}
+.jstree-proton.jstree-rtl > .jstree-no-dots .jstree-closed > .jstree-ocl {
+ background-position: -5px -37px;
+}
+.jstree-proton .jstree-themeicon-custom {
+ background-color: transparent;
+ background-size: 320px 96px;
+ background-image: none;
+ background-position: 0 0;
+}
+.jstree-proton > .jstree-container-ul .jstree-loading > .jstree-ocl {
+ background: url("throbber.gif") center center no-repeat;
+}
+.jstree-proton .jstree-file {
+ background: url("32px.png") -101px -69px no-repeat;
+}
+.jstree-proton .jstree-folder {
+ background: url("32px.png") -261px -5px no-repeat;
+}
+.jstree-proton > .jstree-container-ul > .jstree-node {
+ margin-left: 0;
+ margin-right: 0;
+}
+#jstree-dnd.jstree-proton {
+ line-height: 22px;
+ padding: 0 4px;
+}
+#jstree-dnd.jstree-proton .jstree-ok,
+#jstree-dnd.jstree-proton .jstree-er {
+ background-size: 320px 96px;
+ background-image: url("32px.png");
+ background-repeat: no-repeat;
+ background-color: transparent;
+}
+#jstree-dnd.jstree-proton i {
+ background: transparent;
+ width: 22px;
+ height: 22px;
+ line-height: 22px;
+}
+#jstree-dnd.jstree-proton .jstree-ok {
+ background-position: -5px -69px;
+}
+#jstree-dnd.jstree-proton .jstree-er {
+ background-position: -37px -69px;
+}
+.jstree-proton.jstree-rtl .jstree-node {
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==");
+}
+.jstree-proton.jstree-rtl .jstree-last {
+ background: transparent;
+}
+.jstree-proton-small .jstree-node {
+ min-height: 18px;
+ line-height: 18px;
+ margin-left: 18px;
+ min-width: 18px;
+}
+.jstree-proton-small .jstree-anchor {
+ line-height: 18px;
+ margin: 1px 0 2px;
+ height: 18px;
+}
+.jstree-proton-small .jstree-icon {
+ width: 18px;
+ height: 18px;
+ line-height: 18px;
+}
+.jstree-proton-small .jstree-icon:empty {
+ width: 18px;
+ height: 18px;
+ line-height: 18px;
+}
+.jstree-proton-small.jstree-rtl .jstree-node {
+ margin-right: 18px;
+}
+.jstree-proton-small .jstree-wholerow {
+ height: 18px;
+}
+.jstree-proton-small .jstree-node,
+.jstree-proton-small .jstree-icon {
+ background-size: 320px 96px;
+ background-image: url("32px.png");
+}
+.jstree-proton-small .jstree-node {
+ background-position: -295px -7px;
+ background-repeat: repeat-y;
+}
+.jstree-proton-small .jstree-last {
+ background: transparent;
+}
+.jstree-proton-small .jstree-open > .jstree-ocl {
+ background-position: -135px -7px;
+}
+.jstree-proton-small .jstree-closed > .jstree-ocl {
+ background-position: -103px -7px;
+}
+.jstree-proton-small .jstree-leaf > .jstree-ocl {
+ background-position: -71px -7px;
+}
+.jstree-proton-small .jstree-themeicon {
+ background-position: -263px -9px;
+}
+.jstree-proton-small > .jstree-no-dots .jstree-node,
+.jstree-proton-small > .jstree-no-dots .jstree-leaf > .jstree-ocl {
+ background: transparent;
+}
+.jstree-proton-small > .jstree-no-dots .jstree-open > .jstree-ocl {
+ background-position: -39px -7px;
+}
+.jstree-proton-small > .jstree-no-dots .jstree-closed > .jstree-ocl {
+ background-position: -7px -7px;
+}
+.jstree-proton-small .jstree-disabled {
+ background: transparent;
+}
+.jstree-proton-small .jstree-disabled.jstree-hovered {
+ background: transparent;
+}
+.jstree-proton-small .jstree-disabled.jstree-clicked {
+ background: #efefef;
+}
+.jstree-proton-small .jstree-checkbox {
+ background-position: -167px -7px;
+}
+.jstree-proton-small .jstree-checkbox:hover {
+ background-position: -167px -39px;
+}
+.jstree-proton-small.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox,
+.jstree-proton-small .jstree-checked > .jstree-checkbox {
+ background-position: -231px -7px;
+}
+.jstree-proton-small.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox:hover,
+.jstree-proton-small .jstree-checked > .jstree-checkbox:hover {
+ background-position: -231px -39px;
+}
+.jstree-proton-small .jstree-anchor > .jstree-undetermined {
+ background-position: -199px -7px;
+}
+.jstree-proton-small .jstree-anchor > .jstree-undetermined:hover {
+ background-position: -199px -39px;
+}
+.jstree-proton-small > .jstree-striped {
+ background-size: auto 36px;
+}
+.jstree-proton-small.jstree-rtl .jstree-node {
+ background-size: 320px 96px;
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==");
+ background-position: 100% 1px;
+ background-repeat: repeat-y;
+}
+.jstree-proton-small.jstree-rtl .jstree-last {
+ background: transparent;
+}
+.jstree-proton-small.jstree-rtl .jstree-open > .jstree-ocl {
+ background-position: -135px -39px;
+}
+.jstree-proton-small.jstree-rtl .jstree-closed > .jstree-ocl {
+ background-position: -103px -39px;
+}
+.jstree-proton-small.jstree-rtl .jstree-leaf > .jstree-ocl {
+ background-position: -71px -39px;
+}
+.jstree-proton-small.jstree-rtl > .jstree-no-dots .jstree-node,
+.jstree-proton-small.jstree-rtl > .jstree-no-dots .jstree-leaf > .jstree-ocl {
+ background: transparent;
+}
+.jstree-proton-small.jstree-rtl > .jstree-no-dots .jstree-open > .jstree-ocl {
+ background-position: -39px -39px;
+}
+.jstree-proton-small.jstree-rtl > .jstree-no-dots .jstree-closed > .jstree-ocl {
+ background-position: -7px -39px;
+}
+.jstree-proton-small .jstree-themeicon-custom {
+ background-color: transparent;
+ background-size: 320px 96px;
+ background-image: none;
+ background-position: 0 0;
+}
+.jstree-proton-small > .jstree-container-ul .jstree-loading > .jstree-ocl {
+ background: url("throbber.gif") center center no-repeat;
+}
+.jstree-proton-small .jstree-file {
+ background: url("32px.png") -103px -71px no-repeat;
+}
+.jstree-proton-small .jstree-folder {
+ background: url("32px.png") -263px -7px no-repeat;
+}
+.jstree-proton-small > .jstree-container-ul > .jstree-node {
+ margin-left: 0;
+ margin-right: 0;
+}
+#jstree-dnd.jstree-proton-small {
+ line-height: 18px;
+ padding: 0 4px;
+}
+#jstree-dnd.jstree-proton-small .jstree-ok,
+#jstree-dnd.jstree-proton-small .jstree-er {
+ background-size: 320px 96px;
+ background-image: url("32px.png");
+ background-repeat: no-repeat;
+ background-color: transparent;
+}
+#jstree-dnd.jstree-proton-small i {
+ background: transparent;
+ width: 18px;
+ height: 18px;
+ line-height: 18px;
+}
+#jstree-dnd.jstree-proton-small .jstree-ok {
+ background-position: -7px -71px;
+}
+#jstree-dnd.jstree-proton-small .jstree-er {
+ background-position: -39px -71px;
+}
+.jstree-proton-small.jstree-rtl .jstree-node {
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAACAQMAAABv1h6PAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMHBgAAiABBI4gz9AAAAABJRU5ErkJggg==");
+}
+.jstree-proton-small.jstree-rtl .jstree-last {
+ background: transparent;
+}
+.jstree-proton-large .jstree-node {
+ min-height: 32px;
+ line-height: 32px;
+ margin-left: 32px;
+ min-width: 32px;
+}
+.jstree-proton-large .jstree-anchor {
+ line-height: 32px;
+ margin: 1px 0 2px;
+ height: 32px;
+}
+.jstree-proton-large .jstree-icon {
+ width: 32px;
+ height: 32px;
+ line-height: 32px;
+}
+.jstree-proton-large .jstree-icon:empty {
+ width: 32px;
+ height: 32px;
+ line-height: 32px;
+}
+.jstree-proton-large.jstree-rtl .jstree-node {
+ margin-right: 32px;
+}
+.jstree-proton-large .jstree-wholerow {
+ height: 32px;
+}
+.jstree-proton-large .jstree-node,
+.jstree-proton-large .jstree-icon {
+ background-size: 320px 96px;
+ background-image: url("32px.png");
+}
+.jstree-proton-large .jstree-node {
+ background-position: -288px 0px;
+ background-repeat: repeat-y;
+}
+.jstree-proton-large .jstree-last {
+ background: transparent;
+}
+.jstree-proton-large .jstree-open > .jstree-ocl {
+ background-position: -128px 0px;
+}
+.jstree-proton-large .jstree-closed > .jstree-ocl {
+ background-position: -96px 0px;
+}
+.jstree-proton-large .jstree-leaf > .jstree-ocl {
+ background-position: -64px 0px;
+}
+.jstree-proton-large .jstree-themeicon {
+ background-position: -256px -2px;
+}
+.jstree-proton-large > .jstree-no-dots .jstree-node,
+.jstree-proton-large > .jstree-no-dots .jstree-leaf > .jstree-ocl {
+ background: transparent;
+}
+.jstree-proton-large > .jstree-no-dots .jstree-open > .jstree-ocl {
+ background-position: -32px 0px;
+}
+.jstree-proton-large > .jstree-no-dots .jstree-closed > .jstree-ocl {
+ background-position: 0px 0px;
+}
+.jstree-proton-large .jstree-disabled {
+ background: transparent;
+}
+.jstree-proton-large .jstree-disabled.jstree-hovered {
+ background: transparent;
+}
+.jstree-proton-large .jstree-disabled.jstree-clicked {
+ background: #efefef;
+}
+.jstree-proton-large .jstree-checkbox {
+ background-position: -160px 0px;
+}
+.jstree-proton-large .jstree-checkbox:hover {
+ background-position: -160px -32px;
+}
+.jstree-proton-large.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox,
+.jstree-proton-large .jstree-checked > .jstree-checkbox {
+ background-position: -224px 0px;
+}
+.jstree-proton-large.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox:hover,
+.jstree-proton-large .jstree-checked > .jstree-checkbox:hover {
+ background-position: -224px -32px;
+}
+.jstree-proton-large .jstree-anchor > .jstree-undetermined {
+ background-position: -192px 0px;
+}
+.jstree-proton-large .jstree-anchor > .jstree-undetermined:hover {
+ background-position: -192px -32px;
+}
+.jstree-proton-large > .jstree-striped {
+ background-size: auto 64px;
+}
+.jstree-proton-large.jstree-rtl .jstree-node {
+ background-size: 320px 96px;
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==");
+ background-position: 100% 1px;
+ background-repeat: repeat-y;
+}
+.jstree-proton-large.jstree-rtl .jstree-last {
+ background: transparent;
+}
+.jstree-proton-large.jstree-rtl .jstree-open > .jstree-ocl {
+ background-position: -128px -32px;
+}
+.jstree-proton-large.jstree-rtl .jstree-closed > .jstree-ocl {
+ background-position: -96px -32px;
+}
+.jstree-proton-large.jstree-rtl .jstree-leaf > .jstree-ocl {
+ background-position: -64px -32px;
+}
+.jstree-proton-large.jstree-rtl > .jstree-no-dots .jstree-node,
+.jstree-proton-large.jstree-rtl > .jstree-no-dots .jstree-leaf > .jstree-ocl {
+ background: transparent;
+}
+.jstree-proton-large.jstree-rtl > .jstree-no-dots .jstree-open > .jstree-ocl {
+ background-position: -32px -32px;
+}
+.jstree-proton-large.jstree-rtl > .jstree-no-dots .jstree-closed > .jstree-ocl {
+ background-position: 0px -32px;
+}
+.jstree-proton-large .jstree-themeicon-custom {
+ background-color: transparent;
+ background-size: 320px 96px;
+ background-image: none;
+ background-position: 0 0;
+}
+.jstree-proton-large > .jstree-container-ul .jstree-loading > .jstree-ocl {
+ background: url("throbber.gif") center center no-repeat;
+}
+.jstree-proton-large .jstree-file {
+ background: url("32px.png") -96px -64px no-repeat;
+}
+.jstree-proton-large .jstree-folder {
+ background: url("32px.png") -256px 0px no-repeat;
+}
+.jstree-proton-large > .jstree-container-ul > .jstree-node {
+ margin-left: 0;
+ margin-right: 0;
+}
+#jstree-dnd.jstree-proton-large {
+ line-height: 32px;
+ padding: 0 4px;
+}
+#jstree-dnd.jstree-proton-large .jstree-ok,
+#jstree-dnd.jstree-proton-large .jstree-er {
+ background-size: 320px 96px;
+ background-image: url("32px.png");
+ background-repeat: no-repeat;
+ background-color: transparent;
+}
+#jstree-dnd.jstree-proton-large i {
+ background: transparent;
+ width: 32px;
+ height: 32px;
+ line-height: 32px;
+}
+#jstree-dnd.jstree-proton-large .jstree-ok {
+ background-position: 0px -64px;
+}
+#jstree-dnd.jstree-proton-large .jstree-er {
+ background-position: -32px -64px;
+}
+.jstree-proton-large.jstree-rtl .jstree-node {
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAACAQMAAAAD0EyKAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjgIIGBgABCgCBvVLXcAAAAABJRU5ErkJggg==");
+}
+.jstree-proton-large.jstree-rtl .jstree-last {
+ background: transparent;
+}
+@media (max-width: 768px) {
+ #jstree-dnd.jstree-dnd-responsive {
+ line-height: 30px;
+ font-weight: bold;
+ font-size: 1.1em;
+ text-shadow: 1px 1px white;
+ }
+ #jstree-dnd.jstree-dnd-responsive > i {
+ background: transparent;
+ width: 30px;
+ height: 30px;
+ }
+ #jstree-dnd.jstree-dnd-responsive > .jstree-ok {
+ background-image: url("30px.png");
+ background-position: 0 -150px;
+ background-size: 90px 180px;
+ }
+ #jstree-dnd.jstree-dnd-responsive > .jstree-er {
+ background-image: url("30px.png");
+ background-position: -30px -150px;
+ background-size: 90px 180px;
+ }
+ #jstree-marker.jstree-dnd-responsive {
+ border-left-width: 10px;
+ border-top-width: 10px;
+ border-bottom-width: 10px;
+ margin-top: -10px;
+ }
+}
+@media (max-width: 768px) {
+ .jstree-proton-responsive {
+ /*
+ .jstree-open > .jstree-ocl,
+ .jstree-closed > .jstree-ocl {
+ border-radius:20px;
+ background-color:white;
+ }
+ */
+ }
+ .jstree-proton-responsive .jstree-container-ul {
+ overflow: hidden;
+ }
+ .jstree-proton-responsive .jstree-icon {
+ background-image: url("30px.png");
+ background-size: 90px 180px;
+ }
+ .jstree-proton-responsive .jstree-node,
+ .jstree-proton-responsive .jstree-leaf > .jstree-ocl {
+ background: transparent;
+ }
+ .jstree-proton-responsive .jstree-node {
+ min-height: 30px;
+ line-height: 30px;
+ margin-left: 30px;
+ min-width: 30px;
+ white-space: nowrap;
+ }
+ .jstree-proton-responsive .jstree-anchor {
+ line-height: 38px;
+ height: 38px;
+ margin: 0;
+ }
+ .jstree-proton-responsive .jstree-icon,
+ .jstree-proton-responsive .jstree-icon:empty {
+ margin-top: 4px;
+ width: 30px;
+ height: 30px;
+ line-height: 30px;
+ }
+ .jstree-proton-responsive > .jstree-container-ul > .jstree-node {
+ margin-left: 0;
+ }
+ .jstree-proton-responsive.jstree-rtl .jstree-node {
+ margin-left: 0;
+ margin-right: 30px;
+ }
+ .jstree-proton-responsive.jstree-rtl .jstree-container-ul > .jstree-node {
+ margin-right: 0;
+ }
+ .jstree-proton-responsive .jstree-ocl,
+ .jstree-proton-responsive .jstree-themeicon,
+ .jstree-proton-responsive .jstree-checkbox {
+ background-size: 90px 180px;
+ }
+ .jstree-proton-responsive .jstree-leaf > .jstree-ocl {
+ background: transparent;
+ }
+ .jstree-proton-responsive .jstree-open > .jstree-ocl {
+ background-position: 0 0px !important;
+ }
+ .jstree-proton-responsive .jstree-closed > .jstree-ocl {
+ background-position: 0 -30px !important;
+ }
+ .jstree-proton-responsive.jstree-rtl .jstree-closed > .jstree-ocl {
+ background-position: -30px 0px !important;
+ }
+ .jstree-proton-responsive .jstree-themeicon {
+ background-position: -30px -30px;
+ }
+ .jstree-proton-responsive .jstree-checkbox,
+ .jstree-proton-responsive .jstree-checkbox:hover {
+ background-position: -30px -60px;
+ }
+ .jstree-proton-responsive.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox,
+ .jstree-proton-responsive.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox:hover,
+ .jstree-proton-responsive .jstree-checked > .jstree-checkbox,
+ .jstree-proton-responsive .jstree-checked > .jstree-checkbox:hover {
+ background-position: 0 -60px;
+ }
+ .jstree-proton-responsive .jstree-anchor > .jstree-undetermined,
+ .jstree-proton-responsive .jstree-anchor > .jstree-undetermined:hover {
+ background-position: 0 -90px;
+ }
+ .jstree-proton-responsive > .jstree-striped {
+ background: transparent;
+ }
+ .jstree-proton-responsive .jstree-wholerow-ul li {
+ position: relative;
+ }
+ .jstree-proton-responsive .jstree-wholerow-ul .jstree-wholerow {
+ position: absolute;
+ top: 0;
+ left: -1000px;
+ right: -1000px;
+ width: auto;
+ height: 100%;
+ }
+ .jstree-proton-responsive .jstree-wholerow {
+ border-top: 1px solid rgba(0, 0, 0, 0.05);
+ background: rgba(0, 0, 0, 0.02);
+ height: 30px;
+ }
+ .jstree-proton-responsive .jstree-wholerow-hovered {
+ background: #76b6ec;
+ }
+ .jstree-proton-responsive .jstree-wholerow-clicked {
+ background: #3392e3;
+ }
+ .jstree-proton-responsive .jstree-children .jstree-open + .jstree-open {
+ box-shadow: none;
+ }
+ .jstree-proton-responsive .jstree-node,
+ .jstree-proton-responsive .jstree-icon,
+ .jstree-proton-responsive .jstree-node > .jstree-ocl,
+ .jstree-proton-responsive .jstree-themeicon,
+ .jstree-proton-responsive .jstree-checkbox {
+ background-image: url("30px.png");
+ background-size: 90px 180px;
+ }
+ .jstree-proton-responsive .jstree-node {
+ background-position: -60px 0;
+ background-repeat: repeat-y;
+ }
+ .jstree-proton-responsive .jstree-last {
+ background: transparent;
+ }
+ .jstree-proton-responsive .jstree-leaf > .jstree-ocl {
+ background-position: -30px -90px;
+ }
+ .jstree-proton-responsive .jstree-last > .jstree-ocl {
+ background-position: -30px -120px;
+ }
+ .jstree-proton-responsive .jstree-themeicon-custom {
+ background-color: transparent;
+ background-image: none;
+ background-position: 0 0;
+ }
+ .jstree-proton-responsive .jstree-file {
+ background: url("30px.png") 0 -120px no-repeat;
+ background-size: 90px 180px;
+ }
+ .jstree-proton-responsive .jstree-folder {
+ background: url("30px.png") -30px -30px no-repeat;
+ background-size: 90px 180px;
+ }
+ .jstree-proton-responsive > .jstree-container-ul > .jstree-node {
+ margin-left: 0;
+ margin-right: 0;
+ }
+}
+@font-face {
+ font-family: 'Titillium Web';
+ src: url('fonts/titillium/titilliumweb-extralight-webfont.eot');
+ src: url('fonts/titillium/titilliumweb-extralight-webfont.eot?#iefix') format('embedded-opentype'), url('fonts/titillium/titilliumweb-extralight-webfont.woff') format('woff'), url('fonts/titillium/titilliumweb-extralight-webfont.ttf') format('truetype'), url('fonts/titillium/titilliumweb-extralight-webfont.svg#titillium_webthin') format('svg');
+ font-weight: 300;
+ font-style: normal;
+}
+@font-face {
+ font-family: 'Titillium Web';
+ src: url('fonts/titillium/titilliumweb-regular-webfont.eot');
+ src: url('fonts/titillium/titilliumweb-regular-webfont.eot?#iefix') format('embedded-opentype'), url('fonts/titillium/titilliumweb-regular-webfont.woff') format('woff'), url('fonts/titillium/titilliumweb-regular-webfont.ttf') format('truetype'), url('fonts/titillium/titilliumweb-regular-webfont.svg#titillium_webregular') format('svg');
+ font-weight: 400;
+ font-style: normal;
+}
+@font-face {
+ font-family: 'Titillium Web';
+ src: url('fonts/titillium/titilliumweb-bold-webfont.eot');
+ src: url('fonts/titillium/titilliumweb-bold-webfont.eot?#iefix') format('embedded-opentype'), url('fonts/titillium/titilliumweb-bold-webfont.woff') format('woff'), url('fonts/titillium/titilliumweb-bold-webfont.ttf') format('truetype'), url('fonts/titillium/titilliumweb-bold-webfont.svg#titillium_webbold') format('svg');
+ font-weight: 700;
+ font-style: normal;
+}
+@media screen and (-webkit-min-device-pixel-ratio: 0) {
+ @font-face {
+ font-family: 'Titillium Web';
+ src: url('fonts/titillium/titilliumweb-extralight-webfont.svg#titillium_webthin') format('svg');
+ font-weight: 300;
+ font-style: normal;
+ }
+ @font-face {
+ font-family: 'Titillium Web';
+ src: url('fonts/titillium/titilliumweb-regular-webfont.svg#titillium_webregular') format('svg');
+ font-weight: 400;
+ font-style: normal;
+ }
+ @font-face {
+ font-family: 'Titillium Web';
+ src: url('fonts/titillium/titilliumweb-bold-webfont.svg#titillium_webbold') format('svg');
+ font-weight: 700;
+ font-style: normal;
+ }
+}
+.jstree-proton {
+ font-family: 'Titillium Web', sans-serif, Arial, sans-serif;
+}
diff --git a/admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/style.min.css b/admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/style.min.css
new file mode 100644
index 0000000..5024e5c
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/style.min.css
@@ -0,0 +1 @@
+.jstree-node,.jstree-children,.jstree-container-ul{display:block;margin:0;padding:0;list-style-type:none;list-style-image:none}.jstree-node{white-space:nowrap}.jstree-anchor{display:inline-block;color:#333;white-space:nowrap;padding:0 4px 0 1px;margin:0;vertical-align:top}.jstree-anchor:focus{outline:0}.jstree-anchor,.jstree-anchor:link,.jstree-anchor:visited,.jstree-anchor:hover,.jstree-anchor:active{text-decoration:none;color:inherit}.jstree-icon{display:inline-block;text-decoration:none;margin:0;padding:0;vertical-align:top;text-align:center}.jstree-icon:empty{display:inline-block;text-decoration:none;margin:0;padding:0;vertical-align:top;text-align:center}.jstree-ocl{cursor:pointer}.jstree-leaf>.jstree-ocl{cursor:default}.jstree .jstree-open>.jstree-children{display:block}.jstree .jstree-closed>.jstree-children,.jstree .jstree-leaf>.jstree-children{display:none}.jstree-anchor>.jstree-themeicon{margin-right:2px}.jstree-no-icons .jstree-themeicon,.jstree-anchor>.jstree-themeicon-hidden{display:none}.jstree-rtl .jstree-anchor{padding:0 1px 0 4px}.jstree-rtl .jstree-anchor>.jstree-themeicon{margin-left:2px;margin-right:0}.jstree-rtl .jstree-node{margin-left:0}.jstree-rtl .jstree-container-ul>.jstree-node{margin-right:0}.jstree-wholerow-ul{position:relative;display:inline-block;min-width:100%}.jstree-wholerow-ul .jstree-leaf>.jstree-ocl{cursor:pointer}.jstree-wholerow-ul .jstree-anchor,.jstree-wholerow-ul .jstree-icon{position:relative}.jstree-wholerow-ul .jstree-wholerow{width:100%;cursor:pointer;position:absolute;left:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vakata-context{display:none}.vakata-context,.vakata-context ul{margin:0;padding:2px;position:absolute;background:#f5f5f5;border:1px solid #979797;-moz-box-shadow:5px 5px 4px -4px #666;-webkit-box-shadow:2px 2px 2px #999;box-shadow:2px 2px 2px #999}.vakata-context ul{list-style:none;left:100%;margin-top:-2.7em;margin-left:-4px}.vakata-context .vakata-context-right ul{left:auto;right:100%;margin-left:auto;margin-right:-4px}.vakata-context li{list-style:none;display:inline}.vakata-context li>a{display:block;padding:0 2em;text-decoration:none;width:auto;color:#000;white-space:nowrap;line-height:2.4em;-moz-text-shadow:1px 1px 0 #fff;-webkit-text-shadow:1px 1px 0 #fff;text-shadow:1px 1px 0 #fff;-moz-border-radius:1px;-webkit-border-radius:1px;border-radius:1px}.vakata-context li>a:hover{position:relative;background-color:#e8eff7;-moz-box-shadow:0 0 2px #0a6aa1;-webkit-box-shadow:0 0 2px #0a6aa1;box-shadow:0 0 2px #0a6aa1}.vakata-context li>a.vakata-context-parent{background-image:url(data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAIORI4JlrqN1oMSnmmZDQUAOw==);background-position:right center;background-repeat:no-repeat}.vakata-context li>a:focus{outline:0}.vakata-context .vakata-context-hover>a{position:relative;background-color:#e8eff7;-moz-box-shadow:0 0 2px #0a6aa1;-webkit-box-shadow:0 0 2px #0a6aa1;box-shadow:0 0 2px #0a6aa1}.vakata-context .vakata-context-separator>a,.vakata-context .vakata-context-separator>a:hover{background:#fff;border:0;border-top:1px solid #e2e3e3;height:1px;min-height:1px;max-height:1px;padding:0;margin:0 0 0 2.4em;border-left:1px solid #e0e0e0;-moz-text-shadow:0 0 0 transparent;-webkit-text-shadow:0 0 0 transparent;text-shadow:0 0 0 transparent;-moz-box-shadow:0 0 0 transparent;-webkit-box-shadow:0 0 0 transparent;box-shadow:0 0 0 transparent;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.vakata-context .vakata-contextmenu-disabled a,.vakata-context .vakata-contextmenu-disabled a:hover{color:silver;background-color:transparent;border:0;box-shadow:0 0 0}.vakata-context li>a>i{text-decoration:none;display:inline-block;width:2.4em;height:2.4em;background:0 0;margin:0 0 0 -2em;vertical-align:top;text-align:center;line-height:2.4em}.vakata-context li>a>i:empty{width:2.4em;line-height:2.4em}.vakata-context li>a .vakata-contextmenu-sep{display:inline-block;width:1px;height:2.4em;background:#fff;margin:0 .5em 0 0;border-left:1px solid #e2e3e3}.vakata-context .vakata-contextmenu-shortcut{font-size:.8em;color:silver;opacity:.5;display:none}.vakata-context-rtl ul{left:auto;right:100%;margin-left:auto;margin-right:-4px}.vakata-context-rtl li>a.vakata-context-parent{background-image:url(data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAINjI+AC7rWHIsPtmoxLAA7);background-position:left center;background-repeat:no-repeat}.vakata-context-rtl .vakata-context-separator>a{margin:0 2.4em 0 0;border-left:0;border-right:1px solid #e2e3e3}.vakata-context-rtl .vakata-context-left ul{right:auto;left:100%;margin-left:-4px;margin-right:auto}.vakata-context-rtl li>a>i{margin:0 -2em 0 0}.vakata-context-rtl li>a .vakata-contextmenu-sep{margin:0 0 0 .5em;border-left-color:#fff;background:#e2e3e3}#jstree-marker{position:absolute;top:0;left:0;margin:-5px 0 0 0;padding:0;border-right:0;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid;width:0;height:0;font-size:0;line-height:0}#jstree-dnd{line-height:16px;margin:0;padding:4px}#jstree-dnd .jstree-icon,#jstree-dnd .jstree-copy{display:inline-block;text-decoration:none;margin:0 2px 0 0;padding:0;width:16px;height:16px}#jstree-dnd .jstree-ok{background:green}#jstree-dnd .jstree-er{background:red}#jstree-dnd .jstree-copy{margin:0 2px}.jstree-proton .jstree-node,.jstree-proton .jstree-icon{background-repeat:no-repeat;background-color:transparent}.jstree-proton .jstree-anchor,.jstree-proton .jstree-wholerow{transition:background-color .15s,box-shadow .15s,color .15s}.jstree-proton .jstree-hovered{background:#76b6ec;color:#fff;border-radius:3px;box-shadow:inset 0 0 1px #76b6ec}.jstree-proton .jstree-clicked{background:#3392e3;color:#fff;border-radius:3px;box-shadow:inset 0 0 1px #3392e3}.jstree-proton .jstree-no-icons .jstree-anchor>.jstree-themeicon{display:none}.jstree-proton .jstree-disabled{background:0 0;color:#666}.jstree-proton .jstree-disabled.jstree-hovered{background:0 0;box-shadow:none}.jstree-proton .jstree-disabled.jstree-clicked{background:#efefef}.jstree-proton .jstree-disabled>.jstree-icon{opacity:.8;filter:url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale");-webkit-filter:grayscale(100%)}.jstree-proton .jstree-search{font-style:italic;color:#8b0000;font-weight:700}.jstree-proton .jstree-no-checkboxes .jstree-checkbox{display:none!important}.jstree-proton.jstree-checkbox-no-clicked .jstree-clicked{background:0 0;color:inherit;box-shadow:none}.jstree-proton.jstree-checkbox-no-clicked .jstree-clicked.jstree-hovered{background:#76b6ec;color:#fff}.jstree-proton.jstree-checkbox-no-clicked>.jstree-wholerow-ul .jstree-wholerow-clicked{background:0 0;color:inherit}.jstree-proton.jstree-checkbox-no-clicked>.jstree-wholerow-ul .jstree-wholerow-clicked.jstree-wholerow-hovered{background:#76b6ec;color:#fff}.jstree-proton>.jstree-striped{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAkCAMAAAB/qqA+AAAABlBMVEUAAAAAAAClZ7nPAAAAAnRSTlMNAMM9s3UAAAAXSURBVHjajcEBAQAAAIKg/H/aCQZ70AUBjAATb6YPDgAAAABJRU5ErkJggg==) left top repeat}.jstree-proton>.jstree-wholerow-ul .jstree-hovered,.jstree-proton>.jstree-wholerow-ul .jstree-clicked{background:0 0;box-shadow:none;border-radius:0}.jstree-proton .jstree-wholerow{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.jstree-proton .jstree-wholerow-hovered{background:#76b6ec}.jstree-proton .jstree-wholerow-clicked{background:#3392e3;background:-moz-linear-gradient(top,#3392e3 0,#3392e3 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#3392e3),color-stop(100%,#3392e3));background:-webkit-linear-gradient(top,#3392e3 0,#3392e3 100%);background:-o-linear-gradient(top,#3392e3 0,#3392e3 100%);background:-ms-linear-gradient(top,#3392e3 0,#3392e3 100%);background:linear-gradient(to bottom,#3392e3 0,#3392e3 100%)}.jstree-proton .jstree-node{min-height:22px;line-height:22px;margin-left:22px;min-width:22px}.jstree-proton .jstree-anchor{line-height:22px;margin:1px 0 2px;height:22px}.jstree-proton .jstree-icon{width:22px;height:22px;line-height:22px}.jstree-proton .jstree-icon:empty{width:22px;height:22px;line-height:22px}.jstree-proton.jstree-rtl .jstree-node{margin-right:22px}.jstree-proton .jstree-wholerow{height:22px}.jstree-proton .jstree-node,.jstree-proton .jstree-icon{background-size:320px 96px;background-image:url(32px.png)}.jstree-proton .jstree-node{background-position:-293px -5px;background-repeat:repeat-y}.jstree-proton .jstree-last{background:0 0}.jstree-proton .jstree-open>.jstree-ocl{background-position:-133px -5px}.jstree-proton .jstree-closed>.jstree-ocl{background-position:-101px -5px}.jstree-proton .jstree-leaf>.jstree-ocl{background-position:-69px -5px}.jstree-proton .jstree-themeicon{background-position:-261px -7px}.jstree-proton>.jstree-no-dots .jstree-node,.jstree-proton>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-proton>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-37px -5px}.jstree-proton>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-5px -5px}.jstree-proton .jstree-disabled{background:0 0}.jstree-proton .jstree-disabled.jstree-hovered{background:0 0}.jstree-proton .jstree-disabled.jstree-clicked{background:#efefef}.jstree-proton .jstree-checkbox{background-position:-165px -5px}.jstree-proton .jstree-checkbox:hover{background-position:-165px -37px}.jstree-proton.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-proton .jstree-checked>.jstree-checkbox{background-position:-229px -5px}.jstree-proton.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-proton .jstree-checked>.jstree-checkbox:hover{background-position:-229px -37px}.jstree-proton .jstree-anchor>.jstree-undetermined{background-position:-197px -5px}.jstree-proton .jstree-anchor>.jstree-undetermined:hover{background-position:-197px -37px}.jstree-proton>.jstree-striped{background-size:auto 44px}.jstree-proton.jstree-rtl .jstree-node{background-size:320px 96px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);background-position:100% 1px;background-repeat:repeat-y}.jstree-proton.jstree-rtl .jstree-last{background:0 0}.jstree-proton.jstree-rtl .jstree-open>.jstree-ocl{background-position:-133px -37px}.jstree-proton.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-101px -37px}.jstree-proton.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-69px -37px}.jstree-proton.jstree-rtl>.jstree-no-dots .jstree-node,.jstree-proton.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-proton.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-37px -37px}.jstree-proton.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-5px -37px}.jstree-proton .jstree-themeicon-custom{background-color:transparent;background-size:320px 96px;background-image:none;background-position:0 0}.jstree-proton>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url(throbber.gif) center center no-repeat}.jstree-proton .jstree-file{background:url(32px.png) -101px -69px no-repeat}.jstree-proton .jstree-folder{background:url(32px.png) -261px -5px no-repeat}.jstree-proton>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}#jstree-dnd.jstree-proton{line-height:22px;padding:0 4px}#jstree-dnd.jstree-proton .jstree-ok,#jstree-dnd.jstree-proton .jstree-er{background-size:320px 96px;background-image:url(32px.png);background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-proton i{background:0 0;width:22px;height:22px;line-height:22px}#jstree-dnd.jstree-proton .jstree-ok{background-position:-5px -69px}#jstree-dnd.jstree-proton .jstree-er{background-position:-37px -69px}.jstree-proton.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==)}.jstree-proton.jstree-rtl .jstree-last{background:0 0}.jstree-proton-small .jstree-node{min-height:18px;line-height:18px;margin-left:18px;min-width:18px}.jstree-proton-small .jstree-anchor{line-height:18px;margin:1px 0 2px;height:18px}.jstree-proton-small .jstree-icon{width:18px;height:18px;line-height:18px}.jstree-proton-small .jstree-icon:empty{width:18px;height:18px;line-height:18px}.jstree-proton-small.jstree-rtl .jstree-node{margin-right:18px}.jstree-proton-small .jstree-wholerow{height:18px}.jstree-proton-small .jstree-node,.jstree-proton-small .jstree-icon{background-size:320px 96px;background-image:url(32px.png)}.jstree-proton-small .jstree-node{background-position:-295px -7px;background-repeat:repeat-y}.jstree-proton-small .jstree-last{background:0 0}.jstree-proton-small .jstree-open>.jstree-ocl{background-position:-135px -7px}.jstree-proton-small .jstree-closed>.jstree-ocl{background-position:-103px -7px}.jstree-proton-small .jstree-leaf>.jstree-ocl{background-position:-71px -7px}.jstree-proton-small .jstree-themeicon{background-position:-263px -9px}.jstree-proton-small>.jstree-no-dots .jstree-node,.jstree-proton-small>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-proton-small>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-39px -7px}.jstree-proton-small>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-7px -7px}.jstree-proton-small .jstree-disabled{background:0 0}.jstree-proton-small .jstree-disabled.jstree-hovered{background:0 0}.jstree-proton-small .jstree-disabled.jstree-clicked{background:#efefef}.jstree-proton-small .jstree-checkbox{background-position:-167px -7px}.jstree-proton-small .jstree-checkbox:hover{background-position:-167px -39px}.jstree-proton-small.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-proton-small .jstree-checked>.jstree-checkbox{background-position:-231px -7px}.jstree-proton-small.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-proton-small .jstree-checked>.jstree-checkbox:hover{background-position:-231px -39px}.jstree-proton-small .jstree-anchor>.jstree-undetermined{background-position:-199px -7px}.jstree-proton-small .jstree-anchor>.jstree-undetermined:hover{background-position:-199px -39px}.jstree-proton-small>.jstree-striped{background-size:auto 36px}.jstree-proton-small.jstree-rtl .jstree-node{background-size:320px 96px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);background-position:100% 1px;background-repeat:repeat-y}.jstree-proton-small.jstree-rtl .jstree-last{background:0 0}.jstree-proton-small.jstree-rtl .jstree-open>.jstree-ocl{background-position:-135px -39px}.jstree-proton-small.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-103px -39px}.jstree-proton-small.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-71px -39px}.jstree-proton-small.jstree-rtl>.jstree-no-dots .jstree-node,.jstree-proton-small.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-proton-small.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-39px -39px}.jstree-proton-small.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-7px -39px}.jstree-proton-small .jstree-themeicon-custom{background-color:transparent;background-size:320px 96px;background-image:none;background-position:0 0}.jstree-proton-small>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url(throbber.gif) center center no-repeat}.jstree-proton-small .jstree-file{background:url(32px.png) -103px -71px no-repeat}.jstree-proton-small .jstree-folder{background:url(32px.png) -263px -7px no-repeat}.jstree-proton-small>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}#jstree-dnd.jstree-proton-small{line-height:18px;padding:0 4px}#jstree-dnd.jstree-proton-small .jstree-ok,#jstree-dnd.jstree-proton-small .jstree-er{background-size:320px 96px;background-image:url(32px.png);background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-proton-small i{background:0 0;width:18px;height:18px;line-height:18px}#jstree-dnd.jstree-proton-small .jstree-ok{background-position:-7px -71px}#jstree-dnd.jstree-proton-small .jstree-er{background-position:-39px -71px}.jstree-proton-small.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAACAQMAAABv1h6PAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMHBgAAiABBI4gz9AAAAABJRU5ErkJggg==)}.jstree-proton-small.jstree-rtl .jstree-last{background:0 0}.jstree-proton-large .jstree-node{min-height:32px;line-height:32px;margin-left:32px;min-width:32px}.jstree-proton-large .jstree-anchor{line-height:32px;margin:1px 0 2px;height:32px}.jstree-proton-large .jstree-icon{width:32px;height:32px;line-height:32px}.jstree-proton-large .jstree-icon:empty{width:32px;height:32px;line-height:32px}.jstree-proton-large.jstree-rtl .jstree-node{margin-right:32px}.jstree-proton-large .jstree-wholerow{height:32px}.jstree-proton-large .jstree-node,.jstree-proton-large .jstree-icon{background-size:320px 96px;background-image:url(32px.png)}.jstree-proton-large .jstree-node{background-position:-288px 0;background-repeat:repeat-y}.jstree-proton-large .jstree-last{background:0 0}.jstree-proton-large .jstree-open>.jstree-ocl{background-position:-128px 0}.jstree-proton-large .jstree-closed>.jstree-ocl{background-position:-96px 0}.jstree-proton-large .jstree-leaf>.jstree-ocl{background-position:-64px 0}.jstree-proton-large .jstree-themeicon{background-position:-256px -2px}.jstree-proton-large>.jstree-no-dots .jstree-node,.jstree-proton-large>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-proton-large>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-32px 0}.jstree-proton-large>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:0 0}.jstree-proton-large .jstree-disabled{background:0 0}.jstree-proton-large .jstree-disabled.jstree-hovered{background:0 0}.jstree-proton-large .jstree-disabled.jstree-clicked{background:#efefef}.jstree-proton-large .jstree-checkbox{background-position:-160px 0}.jstree-proton-large .jstree-checkbox:hover{background-position:-160px -32px}.jstree-proton-large.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-proton-large .jstree-checked>.jstree-checkbox{background-position:-224px 0}.jstree-proton-large.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-proton-large .jstree-checked>.jstree-checkbox:hover{background-position:-224px -32px}.jstree-proton-large .jstree-anchor>.jstree-undetermined{background-position:-192px 0}.jstree-proton-large .jstree-anchor>.jstree-undetermined:hover{background-position:-192px -32px}.jstree-proton-large>.jstree-striped{background-size:auto 64px}.jstree-proton-large.jstree-rtl .jstree-node{background-size:320px 96px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);background-position:100% 1px;background-repeat:repeat-y}.jstree-proton-large.jstree-rtl .jstree-last{background:0 0}.jstree-proton-large.jstree-rtl .jstree-open>.jstree-ocl{background-position:-128px -32px}.jstree-proton-large.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-96px -32px}.jstree-proton-large.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-64px -32px}.jstree-proton-large.jstree-rtl>.jstree-no-dots .jstree-node,.jstree-proton-large.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-proton-large.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-32px -32px}.jstree-proton-large.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:0 -32px}.jstree-proton-large .jstree-themeicon-custom{background-color:transparent;background-size:320px 96px;background-image:none;background-position:0 0}.jstree-proton-large>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url(throbber.gif) center center no-repeat}.jstree-proton-large .jstree-file{background:url(32px.png) -96px -64px no-repeat}.jstree-proton-large .jstree-folder{background:url(32px.png) -256px 0 no-repeat}.jstree-proton-large>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}#jstree-dnd.jstree-proton-large{line-height:32px;padding:0 4px}#jstree-dnd.jstree-proton-large .jstree-ok,#jstree-dnd.jstree-proton-large .jstree-er{background-size:320px 96px;background-image:url(32px.png);background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-proton-large i{background:0 0;width:32px;height:32px;line-height:32px}#jstree-dnd.jstree-proton-large .jstree-ok{background-position:0 -64px}#jstree-dnd.jstree-proton-large .jstree-er{background-position:-32px -64px}.jstree-proton-large.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAACAQMAAAAD0EyKAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjgIIGBgABCgCBvVLXcAAAAABJRU5ErkJggg==)}.jstree-proton-large.jstree-rtl .jstree-last{background:0 0}@media (max-width:768px){#jstree-dnd.jstree-dnd-responsive{line-height:30px;font-weight:700;font-size:1.1em;text-shadow:1px 1px #fff}#jstree-dnd.jstree-dnd-responsive>i{background:0 0;width:30px;height:30px}#jstree-dnd.jstree-dnd-responsive>.jstree-ok{background-image:url(30px.png);background-position:0 -150px;background-size:90px 180px}#jstree-dnd.jstree-dnd-responsive>.jstree-er{background-image:url(30px.png);background-position:-30px -150px;background-size:90px 180px}#jstree-marker.jstree-dnd-responsive{border-left-width:10px;border-top-width:10px;border-bottom-width:10px;margin-top:-10px}}@media (max-width:768px){.jstree-proton-responsive .jstree-container-ul{overflow:hidden}.jstree-proton-responsive .jstree-icon{background-image:url(30px.png);background-size:90px 180px}.jstree-proton-responsive .jstree-node,.jstree-proton-responsive .jstree-leaf>.jstree-ocl{background:0 0}.jstree-proton-responsive .jstree-node{min-height:30px;line-height:30px;margin-left:30px;min-width:30px;white-space:nowrap}.jstree-proton-responsive .jstree-anchor{line-height:38px;height:38px;margin:0}.jstree-proton-responsive .jstree-icon,.jstree-proton-responsive .jstree-icon:empty{margin-top:4px;width:30px;height:30px;line-height:30px}.jstree-proton-responsive>.jstree-container-ul>.jstree-node{margin-left:0}.jstree-proton-responsive.jstree-rtl .jstree-node{margin-left:0;margin-right:30px}.jstree-proton-responsive.jstree-rtl .jstree-container-ul>.jstree-node{margin-right:0}.jstree-proton-responsive .jstree-ocl,.jstree-proton-responsive .jstree-themeicon,.jstree-proton-responsive .jstree-checkbox{background-size:90px 180px}.jstree-proton-responsive .jstree-leaf>.jstree-ocl{background:0 0}.jstree-proton-responsive .jstree-open>.jstree-ocl{background-position:0 0!important}.jstree-proton-responsive .jstree-closed>.jstree-ocl{background-position:0 -30px!important}.jstree-proton-responsive.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-30px 0!important}.jstree-proton-responsive .jstree-themeicon{background-position:-30px -30px}.jstree-proton-responsive .jstree-checkbox,.jstree-proton-responsive .jstree-checkbox:hover{background-position:-30px -60px}.jstree-proton-responsive.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-proton-responsive.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-proton-responsive .jstree-checked>.jstree-checkbox,.jstree-proton-responsive .jstree-checked>.jstree-checkbox:hover{background-position:0 -60px}.jstree-proton-responsive .jstree-anchor>.jstree-undetermined,.jstree-proton-responsive .jstree-anchor>.jstree-undetermined:hover{background-position:0 -90px}.jstree-proton-responsive>.jstree-striped{background:0 0}.jstree-proton-responsive .jstree-wholerow-ul li{position:relative}.jstree-proton-responsive .jstree-wholerow-ul .jstree-wholerow{position:absolute;top:0;left:-1000px;right:-1000px;width:auto;height:100%}.jstree-proton-responsive .jstree-wholerow{border-top:1px solid rgba(0,0,0,.05);background:rgba(0,0,0,.02);height:30px}.jstree-proton-responsive .jstree-wholerow-hovered{background:#76b6ec}.jstree-proton-responsive .jstree-wholerow-clicked{background:#3392e3}.jstree-proton-responsive .jstree-children .jstree-open+.jstree-open{box-shadow:none}.jstree-proton-responsive .jstree-node,.jstree-proton-responsive .jstree-icon,.jstree-proton-responsive .jstree-node>.jstree-ocl,.jstree-proton-responsive .jstree-themeicon,.jstree-proton-responsive .jstree-checkbox{background-image:url(30px.png);background-size:90px 180px}.jstree-proton-responsive .jstree-node{background-position:-60px 0;background-repeat:repeat-y}.jstree-proton-responsive .jstree-last{background:0 0}.jstree-proton-responsive .jstree-leaf>.jstree-ocl{background-position:-30px -90px}.jstree-proton-responsive .jstree-last>.jstree-ocl{background-position:-30px -120px}.jstree-proton-responsive .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-proton-responsive .jstree-file{background:url(30px.png) 0 -120px no-repeat;background-size:90px 180px}.jstree-proton-responsive .jstree-folder{background:url(30px.png) -30px -30px no-repeat;background-size:90px 180px}.jstree-proton-responsive>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}}@font-face{font-family:'Titillium Web';src:url(fonts/titillium/titilliumweb-extralight-webfont.eot);src:url(fonts/titillium/titilliumweb-extralight-webfont.eot?#iefix) format('embedded-opentype'),url(fonts/titillium/titilliumweb-extralight-webfont.woff) format('woff'),url(fonts/titillium/titilliumweb-extralight-webfont.ttf) format('truetype'),url(fonts/titillium/titilliumweb-extralight-webfont.svg#titillium_webthin) format('svg');font-weight:300;font-style:normal}@font-face{font-family:'Titillium Web';src:url(fonts/titillium/titilliumweb-regular-webfont.eot);src:url(fonts/titillium/titilliumweb-regular-webfont.eot?#iefix) format('embedded-opentype'),url(fonts/titillium/titilliumweb-regular-webfont.woff) format('woff'),url(fonts/titillium/titilliumweb-regular-webfont.ttf) format('truetype'),url(fonts/titillium/titilliumweb-regular-webfont.svg#titillium_webregular) format('svg');font-weight:400;font-style:normal}@font-face{font-family:'Titillium Web';src:url(fonts/titillium/titilliumweb-bold-webfont.eot);src:url(fonts/titillium/titilliumweb-bold-webfont.eot?#iefix) format('embedded-opentype'),url(fonts/titillium/titilliumweb-bold-webfont.woff) format('woff'),url(fonts/titillium/titilliumweb-bold-webfont.ttf) format('truetype'),url(fonts/titillium/titilliumweb-bold-webfont.svg#titillium_webbold) format('svg');font-weight:700;font-style:normal}@media screen and (-webkit-min-device-pixel-ratio:0){@font-face{font-family:'Titillium Web';src:url(fonts/titillium/titilliumweb-extralight-webfont.svg#titillium_webthin) format('svg');font-weight:300;font-style:normal}@font-face{font-family:'Titillium Web';src:url(fonts/titillium/titilliumweb-regular-webfont.svg#titillium_webregular) format('svg');font-weight:400;font-style:normal}@font-face{font-family:'Titillium Web';src:url(fonts/titillium/titilliumweb-bold-webfont.svg#titillium_webbold) format('svg');font-weight:700;font-style:normal}}.jstree-proton{font-family:'Titillium Web',sans-serif,Arial,sans-serif} \ No newline at end of file
diff --git a/admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/throbber.gif b/admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/throbber.gif
new file mode 100644
index 0000000..1b5b2fd
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/css/vendor/jstree/proton/throbber.gif
Binary files differ
diff --git a/admin/survey/modules/mod_hierarhija/css/vendor/select2.min.css b/admin/survey/modules/mod_hierarhija/css/vendor/select2.min.css
new file mode 100644
index 0000000..d2278f9
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/css/vendor/select2.min.css
@@ -0,0 +1 @@
+.select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle}.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:28px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding-left:8px;padding-right:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered{padding-right:8px;padding-left:20px}.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:32px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-block;overflow:hidden;padding-left:8px;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-search--inline{float:left}.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;padding:0}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{background-color:white;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;display:block;position:absolute;left:-100000px;width:100%;z-index:1051}.select2-results{display:block}.select2-results__options{list-style:none;margin:0;padding:0}.select2-results__option{padding:6px;user-select:none;-webkit-user-select:none}.select2-results__option[aria-selected]{cursor:pointer}.select2-container--open .select2-dropdown{left:0}.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background-color:#fff;filter:alpha(opacity=0)}.select2-hidden-accessible{border:0 !important;clip:rect(0 0 0 0) !important;height:1px !important;margin:-1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important}.select2-container--default .select2-selection--single{background-color:#fff;border:1px solid #aaa;border-radius:4px}.select2-container--default .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--default .select2-selection--single .select2-selection__arrow{height:26px;position:absolute;top:1px;right:1px;width:20px}.select2-container--default .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow{left:1px;right:auto}.select2-container--default.select2-container--disabled .select2-selection--single{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--default .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text}.select2-container--default .select2-selection--multiple .select2-selection__rendered{box-sizing:border-box;list-style:none;margin:0;padding:0 5px;width:100%}.select2-container--default .select2-selection--multiple .select2-selection__rendered li{list-style:none}.select2-container--default .select2-selection--multiple .select2-selection__placeholder{color:#999;margin-top:5px;float:left}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-top:5px;margin-right:10px}.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{color:#999;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:#333}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline{float:right}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--default.select2-container--focus .select2-selection--multiple{border:solid black 1px;outline:0}.select2-container--default.select2-container--disabled .select2-selection--multiple{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection__choice__remove{display:none}.select2-container--default.select2-container--open.select2-container--above .select2-selection--single,.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid #aaa}.select2-container--default .select2-search--inline .select2-search__field{background:transparent;border:none;outline:0;box-shadow:none;-webkit-appearance:textfield}.select2-container--default .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--default .select2-results__option[role=group]{padding:0}.select2-container--default .select2-results__option[aria-disabled=true]{color:#999}.select2-container--default .select2-results__option[aria-selected=true]{background-color:#ddd}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--default .select2-results__option--highlighted[aria-selected]{background-color:#5897fb;color:white}.select2-container--default .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic .select2-selection--single{background-color:#f7f7f7;border:1px solid #aaa;border-radius:4px;outline:0;background-image:-webkit-linear-gradient(top, #fff 50%, #eee 100%);background-image:-o-linear-gradient(top, #fff 50%, #eee 100%);background-image:linear-gradient(to bottom, #fff 50%, #eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic .select2-selection--single:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--classic .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-right:10px}.select2-container--classic .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--classic .select2-selection--single .select2-selection__arrow{background-color:#ddd;border:none;border-left:1px solid #aaa;border-top-right-radius:4px;border-bottom-right-radius:4px;height:26px;position:absolute;top:1px;right:1px;width:20px;background-image:-webkit-linear-gradient(top, #eee 50%, #ccc 100%);background-image:-o-linear-gradient(top, #eee 50%, #ccc 100%);background-image:linear-gradient(to bottom, #eee 50%, #ccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0)}.select2-container--classic .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow{border:none;border-right:1px solid #aaa;border-radius:0;border-top-left-radius:4px;border-bottom-left-radius:4px;left:1px;right:auto}.select2-container--classic.select2-container--open .select2-selection--single{border:1px solid #5897fb}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow{background:transparent;border:none}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single{border-top:none;border-top-left-radius:0;border-top-right-radius:0;background-image:-webkit-linear-gradient(top, #fff 0%, #eee 50%);background-image:-o-linear-gradient(top, #fff 0%, #eee 50%);background-image:linear-gradient(to bottom, #fff 0%, #eee 50%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;background-image:-webkit-linear-gradient(top, #eee 50%, #fff 100%);background-image:-o-linear-gradient(top, #eee 50%, #fff 100%);background-image:linear-gradient(to bottom, #eee 50%, #fff 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0)}.select2-container--classic .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text;outline:0}.select2-container--classic .select2-selection--multiple:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--multiple .select2-selection__rendered{list-style:none;margin:0;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__clear{display:none}.select2-container--classic .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove{color:#888;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover{color:#555}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{float:right}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--classic.select2-container--open .select2-selection--multiple{border:1px solid #5897fb}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--classic .select2-search--dropdown .select2-search__field{border:1px solid #aaa;outline:0}.select2-container--classic .select2-search--inline .select2-search__field{outline:0;box-shadow:none}.select2-container--classic .select2-dropdown{background-color:#fff;border:1px solid transparent}.select2-container--classic .select2-dropdown--above{border-bottom:none}.select2-container--classic .select2-dropdown--below{border-top:none}.select2-container--classic .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--classic .select2-results__option[role=group]{padding:0}.select2-container--classic .select2-results__option[aria-disabled=true]{color:grey}.select2-container--classic .select2-results__option--highlighted[aria-selected]{background-color:#3875d7;color:#fff}.select2-container--classic .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic.select2-container--open .select2-dropdown{border-color:#5897fb}
diff --git a/admin/survey/modules/mod_hierarhija/db_hirarhija_create.sql b/admin/survey/modules/mod_hierarhija/db_hirarhija_create.sql
new file mode 100644
index 0000000..b7c3682
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/db_hirarhija_create.sql
@@ -0,0 +1,190 @@
+# Vse tabele, ki so potrebne za modul mod_hierarhija
+
+#Hierarhija admin nivo - izgradnja nivojev in šifrantov
+CREATE TABLE srv_hierarhija_ravni (
+ id integer NOT NULL auto_increment,
+ anketa_id INTEGER NOT NULL,
+ user_id INTEGER NOT NULL,
+ level TINYINT NULL DEFAULT NULL,
+ ime VARCHAR(255) NULL DEFAULT NULL,
+ PRIMARY KEY (id),
+ FOREIGN KEY (anketa_id) REFERENCES srv_anketa (id) ON DELETE CASCADE
+)ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE srv_hierarhija_sifranti (
+ id integer NOT NULL auto_increment,
+ hierarhija_ravni_id INTEGER NOT NULL,
+ ime VARCHAR(255) NULL DEFAULT NULL,
+ PRIMARY KEY (id),
+ FOREIGN KEY (hierarhija_ravni_id) REFERENCES srv_hierarhija_ravni (id) ON DELETE CASCADE
+)ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE srv_hierarhija_users (
+ user_id INTEGER NOT NULL,
+ type TINYINT NULL DEFAULT 10
+)ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+
+# Hierarhija uporabniki, kjer se zgradi struktura
+CREATE TABLE srv_hierarhija_struktura (
+ id INTEGER NOT NULL auto_increment,
+ hierarhija_ravni_id INTEGER NOT NULL,
+ parent_id INTEGER DEFAULT NULL,
+ hierarhija_sifranti_id INTEGER NOT NULL,
+ level TINYINT NOT NULL,
+ PRIMARY KEY (id),
+ FOREIGN KEY (hierarhija_ravni_id) REFERENCES srv_hierarhija_ravni (id) ON DELETE CASCADE,
+ FOREIGN KEY (parent_id) REFERENCES srv_hierarhija_struktura (id) ON DELETE CASCADE,
+ FOREIGN KEY (hierarhija_sifranti_id) REFERENCES srv_hierarhija_sifranti (id) ON DELETE CASCADE
+)ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE srv_hierarhija_struktura_users (
+ hierarhija_struktura_id INTEGER NOT NULL,
+ user_id INTEGER NOT NULL,
+ FOREIGN KEY (hierarhija_struktura_id) REFERENCES srv_hierarhija_struktura (id) ON DELETE CASCADE
+)ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+#Pivot table srv_hierarhija in srv_vrednost
+CREATE TABLE srv_hierarhija_sifrant_vrednost (
+ sifrant_id INTEGER NOT NULL,
+ vrednost_id INTEGER NOT NULL,
+ FOREIGN KEY (sifrant_id) REFERENCES srv_hierarhija_sifranti (id) ON DELETE CASCADE,
+ FOREIGN KEY (vrednost_id) REFERENCES srv_vrednost (id) ON DELETE CASCADE
+)ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+#Pivot table srv_hierarhija in srv_vrednost
+#ALTER TABLE srv_hierarhija_struktura CHANGE hidden hidden ENUM('0','1','2') NOT NULL DEFAULT '0';
+
+ALTER TABLE srv_hierarhija_struktura
+ ADD COLUMN anketa_id INTEGER NOT NULL AFTER id,
+ ADD FOREIGN KEY (anketa_id) REFERENCES srv_anketa (id) ON DELETE CASCADE;
+
+# Dodamo možnost unikaten, da upošteva samo unikatne šifrante na omenjeni ravni
+ALTER TABLE srv_hierarhija_ravni
+ ADD COLUMN unikaten INTEGER DEFAULT 0;
+
+
+# 23.12.2015
+# dDoločimo user type glede na anketo
+ALTER TABLE srv_hierarhija_users
+ ADD COLUMN id INT UNSIGNED NOT NULL AUTO_INCREMENT FIRST,
+ ADD COLUMN anketa_id INTEGER NOT NULL AFTER user_id,
+ ADD PRIMARY KEY (id),
+ ADD FOREIGN KEY (anketa_id) REFERENCES srv_anketa (id) ON DELETE CASCADE;
+
+# kreiranje naključnega 5 znakov dolgega unikatnega niza
+# CAST(MD5(RAND()) as CHAR(5))
+# 8.4.2016
+CREATE TABLE srv_hierarhija_koda (
+ koda VARCHAR(10) NOT NULL UNIQUE,
+ anketa_id INTEGER NOT NULL,
+ url TEXT NOT NULL,
+ vloga ENUM('ucitelj', 'ucenec') NOT NULL,
+ user_id INT(15) NOT NULL,
+ hierarhija_struktura_id INT(15) NOT NULL,
+ datetime DATETIME,
+ PRIMARY KEY (koda),
+ FOREIGN KEY (anketa_id) REFERENCES srv_anketa (id) ON DELETE CASCADE,
+ FOREIGN KEY (hierarhija_struktura_id) REFERENCES srv_hierarhija_struktura (id) ON DELETE CASCADE
+)ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+# Možnost shranjevanja hierarhije
+# 10.05.2016
+CREATE TABLE srv_hierarhija_shrani (
+ id integer NOT NULL auto_increment,
+ anketa_id INTEGER NOT NULL,
+ user_id INTEGER NOT NULL,
+ ime VARCHAR(255) NULL DEFAULT NULL,
+ hierarhija LONGTEXT,
+ PRIMARY KEY (id),
+ FOREIGN KEY (anketa_id) REFERENCES srv_anketa (id) ON DELETE CASCADE
+)ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+# Shranjevanje opcij za hierarhijo
+# 26.5.2016
+CREATE TABLE srv_hierarhija_options (
+ id integer NOT NULL auto_increment,
+ anketa_id INTEGER NOT NULL,
+ option_name VARCHAR(200) NOT NULL,
+ option_value LONGTEXT,
+ PRIMARY KEY (id),
+ FOREIGN KEY (anketa_id) REFERENCES srv_anketa (id) ON DELETE CASCADE
+)ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+# Hierarhija help
+INSERT INTO srv_help (what, help) VALUES ('srv_hierarchy_edit_elements', 'Za vsak izbran nivo se lahko dodaja nove elemente. Z izbiro mo&#382;nosti brisanja se izbri&#353;e celoten nivo z vsemi &#353;ifranti. Lahko pa se omenejene elemente ureja in odstrani zgolj poljuben element nivoja.');
+INSERT INTO srv_help (what, help) VALUES ('srv_hierarhy_last_level_missing', 'Na zadnjem nivoju manjka izbran element in elektronski naslov osebe, ki bo preko elektronske po&#353;te dobila kodo za re&#353;evanje ankete.');
+
+# Shranjevanje strukture
+# 3.11.2016
+ALTER TABLE srv_hierarhija_shrani ADD COLUMN struktura LONGTEXT DEFAULT NULL;
+
+# Dodana stolpec za seštevek vseh učitelje v in vseh uporabnikov
+# 25.11.2016
+ALTER TABLE srv_hierarhija_shrani ADD COLUMN st_uciteljev INTEGER DEFAULT NULL;
+ALTER TABLE srv_hierarhija_shrani ADD COLUMN st_vseh_uporabnikov INTEGER DEFAULT NULL;
+
+# Omogočimo komentarje za posamezno anketo
+# 02.12.2016
+ALTER TABLE srv_hierarhija_shrani ADD COLUMN komentar TEXT DEFAULT NULL;
+
+# Piškot zapišemo za učitelja
+# 26.05.2017
+ALTER TABLE srv_hierarhija_koda
+ ADD COLUMN srv_user_id INT(11) DEFAULT NULL AFTER vloga,
+ ADD FOREIGN KEY (srv_user_id) REFERENCES srv_user (id);
+
+# Omogočimo komentarje za posamezno anketo
+# V mod_hierarhija/porocila je potreno ustvariti mapo logo (755)
+# 09.06.2017
+ALTER TABLE srv_hierarhija_shrani ADD COLUMN logo VARCHAR(255) DEFAULT NULL;
+
+# 16.06.2017
+DROP INDEX koda ON srv_hierarhija_koda;
+ALTER TABLE srv_hierarhija_koda ADD UNIQUE INDEX (koda);
+
+# 19.06.2017
+INSERT INTO srv_hierarhija_options (anketa_id, option_name, option_value) SELECT anketa_id, 'ne_poslji_kode_ucencem', '1' FROM srv_hierarhija_options WHERE option_name='poslji_kode' AND option_value='uciteljem';
+INSERT INTO srv_hierarhija_options (anketa_id, option_name, option_value) SELECT anketa_id, 'ne_poslji_kode_ucencem', '1' FROM srv_hierarhija_options WHERE option_name='poslji_kode' AND option_value='nikomur';
+INSERT INTO srv_hierarhija_options (anketa_id, option_name, option_value) SELECT anketa_id, 'ne_poslji_kodo_ucitelju', '1' FROM srv_hierarhija_options WHERE option_name='poslji_kode' AND option_value='nikomur';
+DELETE FROM srv_hierarhija_options WHERE option_name='poslji_kode';
+
+#22.06.2017
+ALTER TABLE srv_hierarhija_shrani ADD COLUMN uporabniki_list TEXT DEFAULT NULL;
+
+# Ustvarjena tabela za superšifro
+# 06.07.2017
+CREATE TABLE srv_hierarhija_supersifra (
+ koda VARCHAR(10) NOT NULL UNIQUE,
+ anketa_id INTEGER NOT NULL,
+ kode TEXT NOT NULL,
+ datetime DATETIME,
+ PRIMARY KEY (koda),
+ FOREIGN KEY (anketa_id) REFERENCES srv_anketa (id) ON DELETE CASCADE
+)ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+# tabela, ki beleži uporabnike in katere ankete je rešil s superšiframi
+# 10.7.2017
+CREATE TABLE srv_hierarhija_supersifra_resevanje (
+ user_id INTEGER NOT NULL,
+ supersifra VARCHAR(10) NOT NULL,
+ koda VARCHAR(10) NOT NULL,
+ status TINYINT DEFAULT NULL,
+ datetime DATETIME DEFAULT NOW(),
+ PRIMARY KEY (user_id),
+ FOREIGN KEY (user_id) REFERENCES srv_user (id) ON DELETE CASCADE,
+ FOREIGN KEY (supersifra) REFERENCES srv_hierarhija_supersifra (koda) ON DELETE CASCADE,
+ FOREIGN KEY (koda) REFERENCES srv_hierarhija_koda (koda) ON DELETE CASCADE #na testu povzročal težave
+)ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+# Dostop do mdula SA
+CREATE TABLE srv_hierarhija_dostop (
+ user_id INTEGER NOT NULL,
+ dostop TINYINT DEFAULT 0,
+ ustanova VARCHAR(255) DEFAULT NULL,
+ aai_email VARCHAR(100) DEFAULT NULL,
+ created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
+ updated_at DATETIME ON UPDATE CURRENT_TIMESTAMP,
+ PRIMARY KEY (user_id),
+ FOREIGN KEY (user_id) REFERENCES users (id) ON DELETE CASCADE
+)ENGINE=InnoDB DEFAULT CHARSET=utf8;
diff --git a/admin/survey/modules/mod_hierarhija/img/sort_asc.png b/admin/survey/modules/mod_hierarhija/img/sort_asc.png
new file mode 100644
index 0000000..e1ba61a
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/img/sort_asc.png
Binary files differ
diff --git a/admin/survey/modules/mod_hierarhija/img/sort_asc_disabled.png b/admin/survey/modules/mod_hierarhija/img/sort_asc_disabled.png
new file mode 100644
index 0000000..fb11dfe
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/img/sort_asc_disabled.png
Binary files differ
diff --git a/admin/survey/modules/mod_hierarhija/img/sort_both.png b/admin/survey/modules/mod_hierarhija/img/sort_both.png
new file mode 100644
index 0000000..af5bc7c
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/img/sort_both.png
Binary files differ
diff --git a/admin/survey/modules/mod_hierarhija/img/sort_desc.png b/admin/survey/modules/mod_hierarhija/img/sort_desc.png
new file mode 100644
index 0000000..0e156de
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/img/sort_desc.png
Binary files differ
diff --git a/admin/survey/modules/mod_hierarhija/img/sort_desc_disabled.png b/admin/survey/modules/mod_hierarhija/img/sort_desc_disabled.png
new file mode 100644
index 0000000..c9fdd8a
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/img/sort_desc_disabled.png
Binary files differ
diff --git a/admin/survey/modules/mod_hierarhija/index.php b/admin/survey/modules/mod_hierarhija/index.php
new file mode 100644
index 0000000..2881b8c
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/index.php
@@ -0,0 +1,5 @@
+<?php
+/**
+ * Avtor: Robert Šmalc
+ * Date: 1/7/16
+ */ \ No newline at end of file
diff --git a/admin/survey/modules/mod_hierarhija/js/vendor/custom-vue.js b/admin/survey/modules/mod_hierarhija/js/vendor/custom-vue.js
new file mode 100644
index 0000000..7ec31c2
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/js/vendor/custom-vue.js
@@ -0,0 +1,1545 @@
+// ker aplikacije ne sprejema JSON potem vuejs emulira json in pošlje kot navadno polje
+Vue.http.options.emulateJSON = true;
+
+// select2 direktiva
+Vue.directive('select', {
+ twoWay: true,
+ priority: 1000,
+
+ params: ['options'],
+
+ bind: function () {
+ var that = this;
+
+
+ $(this.el).select2({
+ width: '100%'
+ }).on('change', function () {
+ that.set(this.value)
+ });
+
+ },
+ update: function (value) {
+ $(this.el).val(value).trigger('change');
+ },
+ unbind: function () {
+ $(this.el).off().select2('destroy')
+ }
+});
+
+
+
+// Definiramo globalne spremenljivke za Vuejs
+var gradnjaHierarhijeApp = '';
+var hierarhijaApp = '';
+
+$(document).ready(function () {
+ if (document.querySelector('#hierarhija-app')) {
+ hierarhijaApp = new Vue({
+ el: '#hierarhija-app',
+ data: {
+ novaHierarhijaSt: 1, // številka prve ravni je vedno default 1, in pomeni da še nimamo nobenega vpisa ravni
+ inputNivo: [],
+ anketaId: $('#srv_meta_anketa_id').val(),
+ sifrant: '',
+ imeHierarhije: {
+ shrani: '',
+ aktivna: '',
+ index: '-1',
+ id: '-1',
+ urejanje: false,
+ editTitle: false
+ },
+ prikaziImeZaShranjevanje: false,
+ shranjenaHierarhija: [
+ {
+ id: 'default',
+ ime: 'Hierarhija Šolski center',
+ anketa: '',
+ stUporabnikov: 0,
+ hierarhija: [
+ {
+ st: 1,
+ ime: 'Šolski center',
+ sifranti: [
+ {ime: 'Ljubljana'},
+ {ime: 'Maribor'},
+ {ime: 'Koper'}
+ ]
+ },
+ {
+ st: 2,
+ ime: 'Šola',
+ sifranti: [
+ {ime: 'Gimnazija'},
+ {ime: 'Poklicna šola'}
+ ]
+ },
+ {
+ st: 3,
+ ime: 'Program',
+ sifranti: [
+ {ime: 'Gimnazijec'},
+ {ime: 'Fizik'}
+ ]
+ },
+ {
+ st: 4,
+ ime: 'Letnik',
+ sifranti: [
+ {ime: '1. letnik'},
+ {ime: '2. letnik'},
+ {ime: '3. letnik'},
+ {ime: '4. letnik'}
+ ]
+ },
+ {
+ st: 5,
+ ime: 'Razred',
+ sifranti: [
+ {ime: 'a'},
+ {ime: 'b'},
+ {ime: 'c'},
+ {ime: 'd'}
+ ]
+ },
+ {
+ st: 6,
+ ime: 'Predmet',
+ sifranti: [
+ {ime: 'mat'},
+ {ime: 'fiz'},
+ {ime: 'slo'},
+ {ime: 'geo'}
+ ]
+ }
+ ]
+ },
+ {
+ id: 'default',
+ ime: 'Šola',
+ anketa: '',
+ stUporabnikov: 0,
+ hierarhija: [
+ {
+ st: 1,
+ ime: 'Letnik',
+ sifranti: [
+ {ime: '1. letnik'},
+ {ime: '2. letnik'},
+ {ime: '3. letnik'},
+ {ime: '4. letnik'}
+ ]
+ },
+ {
+ st: 2,
+ ime: 'Razred',
+ sifranti: [
+ {ime: 'a'},
+ {ime: 'b'},
+ {ime: 'c'},
+ {ime: 'd'}
+ ]
+ },
+ {
+ st: 3,
+ ime: 'Predmet',
+ sifranti: [
+ {ime: 'mat'},
+ {ime: 'fiz'},
+ {ime: 'slo'},
+ {ime: 'geo'}
+ ]
+ }
+ ]
+ }
+ ],
+ defaultHierarhija: '',
+ // omogočimo predogled hierarhije
+ previewHierarhije: {
+ vklop: true,
+ input: [],
+ ime: '',
+ index: '',
+ id: '',
+ uporabniki: 0
+ },
+
+ imeNivoja: '',
+ brisanjeDropdownMenija: [], // ali je opcija za meni vklopljena ali izklopljena
+ vklopiUrejanje: true, // Vklopimo možnost urejanja preimenovanja
+ vpisanaStruktura: false, // pove nam če je vpisana struktura oz. so dodani uporabniki na hierarhijo
+ kopirajTudiUporabnike: 0, // iz seznama shranjenih hierarhij kopiramo tudi uporabnike/strukturo, če je seveda shranjena
+ },
+
+ // watch:{
+ // 'imeHierarhije.shrani':function(val, oldVal){
+ // this.imeHierarhije.aktivna = val;
+ // }
+ // },
+ ready: function () {
+ // Pridobi število nivojev
+ this.pridobiStNivojev();
+
+ var that = this;
+ // Pridobi nivoje in podatke
+ this.$http.post('ajax.php?anketa=' + this.anketaId + '&t=hierarhija-ajax&a=json_nivoji_podatki').success(function (data) {
+ if (data != 'undefined' && data.length > 0) {
+ $.each(data, function (index, value) {
+ that.inputNivo.push(value);
+ });
+ }
+ });
+
+ // Pridobimo shranjene hierarhije v bazi
+ this.$http.post('ajax.php?anketa=' + this.anketaId + '&t=hierarhija-ajax&a=json_shranjene_hierarhije').success(function (data) {
+ if (data != 'undefined' && data.length > 0) {
+ $.each(data, function (index, value) {
+ that.shranjenaHierarhija.push(value);
+ });
+ }
+ });
+
+
+ // pridobimo vse nastavitve iz baze
+ this.vseNastavitveIzBaze();
+ },
+
+ // Pridobimo trenutno število nivojev in dodamo novega
+ methods: {
+ // Omogoči možnost preimenovanja ankete
+ editTitleToogle: function () {
+ return this.imeHierarhije.editTitle = !this.imeHierarhije.editTitle;
+ },
+
+ dodajNivoHierarhije: function (st) {
+ var that = this;
+ var ime = this.imeNivoja || 'nivo';
+ var st = this.novaHierarhijaSt;
+ this.imeNivoja = '';
+
+ // POST request
+ this.$http.post('ajax.php?anketa=' + this.anketaId + '&t=hierarhija-ajax&a=post_nivoji', {
+ nivo: st,
+ ime: ime
+ }).success(function (data) {
+ // ko dobimo id od ravni potem napolnimo dom element inputNivo
+ that.inputNivo.push({
+ st: st,
+ ime: ime,
+ id: data,
+ sifranti: []
+ });
+
+ // posodobimo število nivojev
+ that.pridobiStNivojev();
+
+ });
+
+ },
+
+ odstraniNivoHierarhije: function (index, id) {
+ var st = this.inputNivo[index].st;
+
+ this.inputNivo.forEach(function (obj) {
+ if (obj.st > st)
+ obj.st = obj.st - 1;
+ });
+
+ var that = this;
+
+
+ this.$http.post('ajax.php?anketa=' + this.anketaId + '&t=hierarhija-ajax&a=brisi_nivo_hierarhija', {
+ id_nivoja: id
+ }).then(function (response) {
+ if (response.status == 200 && response.data == 0) {
+ swal({
+ title: "Napaka!",
+ text: "Omenjen nivo ni mogoče izbrisati, ker je že uporabljen pri izgradnji hierarhije.",
+ type: "warning",
+ confirmButtonText: "OK"
+ });
+ } else {
+ that.inputNivo.splice(index, 1);
+ that.novaHierarhijaSt = (that.novaHierarhijaSt - 1);
+ }
+ });
+ },
+
+ // izbrišemo vse ravni v hierarhiji, da lahko uporabnik na novo ustvarja
+ izbrisiCelotnoHierarhijo: function () {
+
+ // Prejšno hierarhijo vedno shranimo
+ if (this.inputNivo.length > 0)
+ this.shraniTrenutnoHierarhijo();
+
+ // Če uporabnik ne vpiše imena potem obstoječo ne brišemo
+ if (this.pobrisiHierarhijoInZacniNovo()) {
+ // Vse spremenljivke postavimo na 0
+ this.imeHierarhije = {
+ aktivna: '',
+ shrani: '',
+ index: '-1',
+ id: '-1'
+ };
+
+ this.previewHierarhije.vklop = false;
+ }
+ },
+
+ // PObrišemo trenutno aktivno hierarhijo in začnemo novo, ki jo tudi shranimo za kasnejši preklic
+ pobrisiHierarhijoInZacniNovo: function () {
+ var that = this;
+
+ //# V kolikor dela novo hierarhijo potem vedno prikažemo možnost za vpis imena
+ swal({
+ title: "Nova hierarhija",
+ text: "Vpišite ime nove hierarhije:",
+ type: "input",
+ animation: "slide-from-top",
+ closeOnConfirm: false,
+ closeOnCancel: true,
+ showCancelButton: true,
+ cancelButtonText: 'Prekliči',
+ allowOutsideClick: true,
+ inputPlaceholder: "Primer: Hierarhija šola"
+ }, function (inputValue) {
+ if (inputValue === false) return false;
+ if (inputValue === "") {
+ swal.showInputError("Ime hierarhije je obvezno!");
+ return false
+ }
+
+ //# Pobrišemo vse ravni in vso trenutno hierarhij v kolikor vpiše novo
+ that.$http.post('ajax.php?anketa=' + that.anketaId + '&t=hierarhija-ajax&a=izbrisi_vse_ravni');
+
+ // Ime hierarhije shranimo v vue spremenljivko
+ that.getSaveOptions('aktivna_hierarhija_ime', inputValue);
+ that.imeHierarhije.shrani = inputValue;
+
+ // Ime hierarhije shranimo tudi v srv_hierarhija_shrani, da dobimo ID vnosa, kamor potem shranjujemo json podatke z vsemi šifranti in nivoji
+ that.$http.post('ajax.php?anketa=' + that.anketaId + '&t=hierarhija-ajax&a=shrani_hierarhijo', {
+ ime: inputValue,
+ hierarhija: null
+ }).success(function (id) {
+ // shranimo tudi ID hierarhije
+ that.getSaveOptions('srv_hierarhija_shrani_id', id);
+ });
+
+
+ location.reload();
+ });
+
+
+ },
+
+ // Dodamo šifrant k ustreznemu nivoju/ravni
+ dodajSifrant: function (index, idNivoja) {
+ var text = $('[data-nivo="' + idNivoja + '"]').val();
+
+ this.$http.post('ajax.php?anketa=' + this.anketaId + '&t=hierarhija-ajax&a=post_sifranti', {
+ idNivoja: idNivoja,
+ imeSifranta: text
+ }).success(function (data) {
+ this.inputNivo[index].sifranti.push({
+ ime: text
+ });
+
+ $('[data-nivo="' + idNivoja + '"]').val('');
+
+ var opcije = '';
+ $.each(data, function (index, value) {
+ opcije += '<option value = "#">' + value + '</option>';
+ });
+
+ $('#nivo-' + idNivoja + ' td:eq( 1 )').html('<select name="nivo" data-opcije="' + idNivoja + '">' + opcije + '</select>');
+ });
+
+ },
+
+ brisiSifrant: function (idNivoja) {
+ var that = this;
+
+ // Toogle spremenljivka, ki prikaže urejanje ali drop down meni
+ if (typeof this.brisanjeDropdownMenija[idNivoja] == 'undefined')
+ this.brisanjeDropdownMenija[idNivoja] = false;
+
+ this.brisanjeDropdownMenija[idNivoja] = !this.brisanjeDropdownMenija[idNivoja];
+
+ this.$http.post('ajax.php?anketa=' + this.anketaId + '&t=hierarhija-ajax&a=brisi_sifrante', {
+ idNivoja: idNivoja,
+ }).success(function (data) {
+
+ if (that.brisanjeDropdownMenija[idNivoja]) {
+ var opcije = '<div class="sifranti-razmik"><ul>';
+ $.each(data, function (index, value) {
+ opcije += '<li class="sifranti-brisanje" data-sifrant="' + value.id + '"><span class="icon brisi-x" onclick="izbrisiSifrant(' + value.id + ')"></span>' + value.ime + '</li>';
+ });
+ opcije += '</ul></div>';
+
+ $('#nivo-' + idNivoja + ' td:eq( 1 )').html(opcije);
+ } else {
+ $('[data-nivo="' + idNivoja + '"]').val('');
+
+ var opcije = '';
+ $.each(data, function (index, value) {
+ opcije += '<option value = "#">' + value.ime + '</option>';
+ });
+
+ $('#nivo-' + idNivoja + ' td:eq( 1 )').html('<select name="nivo" data-opcije="' + idNivoja + '">' + opcije + '</select>');
+ }
+
+ });
+
+ },
+
+ posodobiUnikatnega: function (id, obj) {
+ if (obj.unikaten == 0) {
+ obj.unikaten = 1;
+ } else {
+ obj.unikaten = 0;
+ }
+
+ $.post("ajax.php?anketa=" + this.anketaId + "&t=hierarhija-ajax&a=popravi_nivo_hierarhija", {
+ id_nivoja: id,
+ unikaten: obj.unikaten
+ });
+ },
+
+ // posodobi ime labele nivoja
+ preimenujLabeloNivoja: function (id) {
+ this.$http.post("ajax.php?anketa=" + this.anketaId + "&t=hierarhija-ajax&a=popravi_nivo_hierarhija", {
+ id_nivoja: id,
+ besedilo: $('[data-labela="' + id + '"]').text()
+ });
+ },
+
+ // Pridobimo število nivojev, ki je vpisano za izbrano anketo
+ pridobiStNivojev: function () {
+ var that = this;
+ this.$http.post('ajax.php?anketa=' + this.anketaId + '&t=hierarhija-ajax&a=st_nivojev').success(function (data) {
+ that.novaHierarhijaSt = (data + 1);
+
+ if (data > 0)
+ that.previewHierarhije.vklop = false;
+
+ });
+ },
+
+ // Shranimo trenutno izdelano hierarhijo
+ shraniTrenutnoHierarhijo: function (shraniPodIstiId) {
+ // Če želimo izvesti update ali create new
+ var shraniPodIstiId = shraniPodIstiId || false;
+
+ // V kolikor samo uporabimo checkbox in je še vedno isto potem naredimo update
+ if (this.imeHierarhije.shrani == this.imeHierarhije.aktivna)
+ shraniPodIstiId = true;
+
+ // preverimo, če je shranjena struktura potem
+ this.$http.post('ajax.php?anketa=' + this.anketaId + '&t=hierarhija-ajax&a=pridobi-shranjeno-hierarhijo-bool', {
+ id: this.imeHierarhije.id,
+ polje: 'struktura',
+ }).then(function (response) {
+
+ // UPDATE se vedno zgodi, kadar gremo naprej
+ if (shraniPodIstiId && this.imeHierarhije.index > 1 && this.imeHierarhije.index != 'default') {
+ return this.$http.post('ajax.php?anketa=' + this.anketaId + '&t=hierarhija-ajax&a=update-aktivno-hierarhijo', {
+ id: this.imeHierarhije.id,
+ hierarhija: JSON.stringify(this.inputNivo)
+ }).success(function () {
+ // našo trenutno hierarhijo shranimo tudi v dom, da v kolikor uporabnik še enkrat izbere isto hierarhijo, da se mu naložijo isti elementi
+ this.shranjenaHierarhija[this.imeHierarhije.index].hierarhija = JSON.stringify(this.inputNivo);
+ });
+ }
+
+ // Hierarhijo shranimo na novo
+
+ // če hierarhije ne poimenujemo potem dobi privzeto ime Hierarhija in čas kopiranja ali pa ostoječe ime in čas kopiranja (Šola, Hierarhija Šolski center)
+ if (!this.prikaziImeZaShranjevanje) {
+ // Če je že kopija kakšne od preh hierarhije potem dobi obstoječe ime in uro
+ var time = new Date();
+ if (this.imeHierarhije.aktivna.length > 0) {
+ // ime_H:i:s"
+ var sekunde = ('0' + time.getSeconds()).slice(-2);
+ var minute = ('0' + time.getMinutes()).slice(-2);
+ var ure = ('0' + time.getHours()).slice(-2);
+
+ this.imeHierarhije.shrani = this.imeHierarhije.aktivna + '_' + ure + ':' + minute + ':' + sekunde;
+ } else {
+ // Drugače pa "Hierarhija - H:i:s"
+ this.imeHierarhije.shrani = 'Hierarhija - ' + time.getHours() + ':' + time.getMinutes() + ':' + time.getSeconds();
+ }
+ }
+
+ this.$http.post('ajax.php?anketa=' + this.anketaId + '&t=hierarhija-ajax&a=shrani_hierarhijo', {
+ ime: this.imeHierarhije.shrani,
+ hierarhija: JSON.stringify(this.inputNivo)
+ }).then(function (responseShrani) {
+ this.imeHierarhije.aktivna = this.imeHierarhije.shrani
+
+ // SHRANJENO HIERARHIJO shranimo tudi v spremenljivko za kasnejši preklic
+ this.shranjenaHierarhija.push({
+ id: responseShrani.data,
+ ime: this.imeHierarhije.shrani,
+ hierarhija: (typeof this.inputNivo == 'string' ? JSON.stringify(this.inputNivo) : this.inputNivo),
+ anketa: this.anketaId,
+ dom: true,
+ });
+
+ this.imeHierarhije.index = (this.shranjenaHierarhija.length - 1);
+
+ // shranimo tudi ID hierarhije
+ this.getSaveOptions('srv_hierarhija_shrani_id', responseShrani.data);
+ this.imeHierarhije.id = responseShrani.data;
+ });
+
+ // Ime shranjene hierarhije shranimo tudi kot aktivno hierarhijo
+ this.getSaveOptions('aktivna_hierarhija_ime', this.imeHierarhije.shrani);
+ });
+
+
+ },
+
+ /*
+ * Gumb za premikanje naprej
+ */
+ premikNaprej: function (ime) {
+
+ if (ime == 'uredi-uporabnike') {
+ this.shraniTrenutnoHierarhijo(false, true);
+
+ // Preusmerimo na urejanje uporabnikov in naredimo cel reload ter pobrišemo cache
+ window.location.replace(location.origin + location.pathname + "?anketa=" + this.anketaId + "&a=hierarhija_superadmin&m=uredi-uporabnike");
+ }
+ },
+
+ /*
+ * Uporabimo shranjeno hierarhijo iz seznama
+ */
+ uporabiShranjenoHierarhijo: function (index, id, uporabniki) {
+ var that = this;
+
+ // Tukaj moram imeti podatke še o starih stvareh
+ this.imeHierarhije.id = id;
+ this.uporabnikiZaKopijo = uporabniki || 0;
+
+ if (this.vpisanaStruktura)
+ return swal({
+ title: "Opozorilo!",
+ text: "Pri omenjeni strukturi hierarhije so že dodani uporabniki in nove hierarhije ni več mogoče izbrati, lahko samo dopolnjujete obstoječo.",
+ type: "warning",
+ confirmButtonText: "Zapri"
+ });
+
+ // Kadar še nimamo vpisane nobene ravni
+ if (this.novaHierarhijaSt == 1)
+ return that.posodobiHierarhijo(index, id);
+
+ swal({
+ title: "Kopiranje hierarhije",
+ text: "Z nadaljevanjem se bo hierarhija skopirala v novo ime, obstoječa pa se bo avtomatsko shranila pod dosedanje ime.",
+ type: "info",
+ showCancelButton: true,
+ cancelButtonText: "Ne",
+ confirmButtonText: "Da, nadaljuj."
+ }, function (shrani) {
+
+ if (shrani) {
+ // V kolikor želi uporabnik shraniti trenutno hierarhijo in pustimo index kot je
+ that.shraniTrenutnoHierarhijo(true);
+
+ setTimeout(function () {
+ Vue.nextTick(function () {
+ // Izberemo novo hierarhijo
+ that.posodobiHierarhijo(index, id);
+ });
+ }, 100);
+
+ }
+
+ });
+ },
+
+ // Preglej shranjeno hierarhijo in ne shrani v bazo
+ pregledShranjeneHierarhije: function (index, id, uporabniki) {
+ // Nastavitve trenutne strukture na katero je kliknil uporabnik shranimo v predogled, da se lahko uporabi v kolikor bi uporabnik želel uporabiti omenjeno hierarhijo
+ this.previewHierarhije = {
+ vklop: true,
+ ime: this.shranjenaHierarhija[index].ime,
+ index: index,
+ id: id,
+ uporabniki: uporabniki
+ };
+
+
+ if (typeof this.shranjenaHierarhija[index].hierarhija == 'object')
+ this.previewHierarhije.input = this.shranjenaHierarhija[index].hierarhija;
+ else
+ this.previewHierarhije.input = JSON.parse(this.shranjenaHierarhija[index].hierarhija);
+ },
+
+ // Izklopimo predogled hierarhije
+ izklopiPredogled: function () {
+ this.previewHierarhije = {
+ vklop: false,
+ ime: '',
+ index: '',
+ id: '',
+ uporabniki: 0,
+ input: []
+ };
+ },
+
+ // Uporabnik je iz predogleda izbral željeno hierarhijo, ki se bo aktivirala
+ aktivirajIzbranoHierarhijo: function () {
+ this.uporabiShranjenoHierarhijo(this.previewHierarhije.index, this.previewHierarhije.id, this.previewHierarhije.uporabniki);
+ },
+
+ posodobiHierarhijo: function (index, id) {
+ var that = this;
+
+ // dodamo active class
+ this.imeHierarhije.index = index;
+
+ // Če urejamo hierarhijo potem nič ne urejamo sql baze in klik na ime hierarhije omogoči samo preimenovanje in brisanje
+ if (this.imeHierarhije.urejanje)
+ return '';
+
+ // preimenujemo Hierarhijo
+ this.imeHierarhije.aktivna = this.shranjenaHierarhija[index].ime;
+
+ // // shranimo ime hierarhije in trenuten id izbrane hierarhije v opcije
+ // this.getSaveOptions('aktivna_hierarhija_ime', this.imeHierarhije.aktivna);
+ // this.getSaveOptions('srv_hierarhija_shrani_id', id);
+
+ // Kadar prikličemo hierarhijo, ki je prazna, smo izbrali samo ime potem nič ne vrnemo, vse postavimo na nič
+ if (this.shranjenaHierarhija[index].hierarhija == '') {
+ this.inputNivo = [];
+ this.novaHierarhijaSt = 1;
+ // naloži šifrante, ker imamo šifrante v JSON.stringfy moramo anredite revers v object in če je object potem samo zapišemo v spremenljivko, drugače pa delamo reverse
+ } else if ((index < 2 || id === 'default') && typeof this.shranjenaHierarhija[index].hierarhija == 'object') {
+ this.inputNivo = this.shranjenaHierarhija[index].hierarhija;
+ } else {
+ this.inputNivo = JSON.parse(this.shranjenaHierarhija[index].hierarhija);
+ }
+
+
+ // prevzeto ne kopira uporabnikov, samo če pote če potrdi iz seznama
+ this.kopirajTudiUporabnike = 0;
+
+ // pošljemo ravni in nivoje ter shranimo vse potrebno v
+ if (this.uporabnikiZaKopijo == 1) {
+ setTimeout(function () {
+ swal({
+ title: "Opozorilo!",
+ text: "Ali želite kopirati tudi strukturo uporabnikov?",
+ type: "info",
+ showCancelButton: true,
+ cancelButtonText: "Ne",
+ confirmButtonText: "Da, tudi uporabnike."
+ }, function (shrani) {
+
+ if (shrani)
+ that.kopirajTudiUporabnike = 1;
+
+ Vue.nextTick(function () {
+ that.$http.post('ajax.php?anketa=' + that.anketaId + '&t=hierarhija-ajax&a=obnovi-hierarhijo', {
+ hierarhija: that.inputNivo,
+ uporabniki: that.kopirajTudiUporabnike,
+ id: id
+ }).success(function (data) {
+ that.inputNivo = [];
+
+ if (data != 'undefined' && data != '' && data.length > 0)
+ $.each(data, function (index, value) {
+ that.inputNivo.push(value);
+ });
+
+ that.shraniTrenutnoHierarhijo();
+
+ // posodobimo število nivojev
+ that.pridobiStNivojev();
+
+ });
+ });
+
+ });
+ }, 100);
+ } else {
+ Vue.nextTick(function () {
+ that.$http.post('ajax.php?anketa=' + that.anketaId + '&t=hierarhija-ajax&a=obnovi-hierarhijo', {
+ hierarhija: that.inputNivo,
+ uporabniki: that.kopirajTudiUporabnike,
+ id: id
+ }).success(function (data) {
+ that.inputNivo = [];
+
+ if (data != 'undefined' && data != '' && data.length > 0)
+ $.each(data, function (index, value) {
+ that.inputNivo.push(value);
+ });
+
+ that.shraniTrenutnoHierarhijo();
+
+ // posodobimo število nivojev
+ that.pridobiStNivojev();
+
+ });
+ });
+
+ }
+
+ },
+
+ // shrani ali pridobi opcije iz baze
+ getSaveOptions: function (option, value, response) {
+ if (typeof value != 'undefined' && typeof response == 'undefined')
+ response = 'save';
+
+ if (typeof value == 'undefined' && typeof response == 'undefined')
+ response = 'get';
+
+ this.$http.post('ajax.php?anketa=' + this.anketaId + '&t=hierarhija-ajax&a=hierarhija-options&m=' + response, {
+ option_name: option || '',
+ option_value: value || ''
+ }, function (data) {
+ return data;
+ });
+ },
+
+ // ko zapustimo urejanje/preimenovanje potem spremenimo tudi dom
+ preimenujHierarhijo: function (index, id) {
+ var ime = $.trim($('.h-ime-shranjeno.editable-hierarhija').html());
+
+ //odstranimo html tag
+ var div = document.createElement('div');
+ div.innerHTML = ime;
+ ime = $.trim(div.innerText);
+
+ var ime_dom = this.shranjenaHierarhija[index].ime;
+
+ // V kolikor je bila preimenova aktivna anketa moramo tudi v bazi med opcijami preimenovati
+ if (this.imeHierarhije.aktivna == ime_dom)
+ this.getSaveOptions('aktivna_hierarhija_ime', ime);
+
+ // v kolikor je zbrisano celotno ime ponovno damo na default
+ if (id == 'default' || ime.length == 0 || this.shranjenaHierarhija[index].ime.length == 0)
+ return $('.h-ime-shranjeno.active').html(ime_dom);
+
+ this.$http.post('ajax.php?anketa=' + this.anketaId + '&t=hierarhija-ajax&a=preimenuj-hierarhijo', {
+ id: id,
+ ime: ime
+ }, function () {
+ //v kolikor smo v bazi uspešno preimenovali potem tudi v naši spremenljivki preimenujemo
+ this.shranjenaHierarhija[index].ime = ime;
+ });
+ },
+
+ izbrisiShranjenoHierarhijo: function (index, id) {
+ if (id == 'default' || id == this.imeHierarhije.id)
+ return '';
+
+ // post request, ki izbriše iz baze
+ var obvestilo = this.deleteHierarhijaShrani(id);
+
+ if (obvestilo)
+ this.shranjenaHierarhija.splice(index, 1);
+
+ },
+
+ // Uvoz in izviz hierarhije v CSV
+ uvozHierarhije: function () {
+ $('#fade').fadeTo('slow', 1);
+ $('#vrednost_edit').html('').fadeIn('slow').load('ajax.php?anketa=' + this.anketaId + '&t=hierarhija-ajax&a=uvozi-hierarhijo', function () {
+
+ //Vklopi nice input file
+ $("input[type=file]").nicefileinput({
+ label: 'Poišči datoteko...'
+ });
+
+ });
+ },
+
+ izvozHierarhije: function () {
+ this.$http.get('ajax.php?anketa=' + this.anketaId + '&t=hierarhija-ajax&a=izvoz-hierarhije');
+ },
+
+ // pridobimo vse nastavitve iz baze
+ vseNastavitveIzBaze: function () {
+ var that = this;
+
+ this.$http.post('ajax.php?anketa=' + this.anketaId + '&t=hierarhija-ajax&a=hierarhija-options&m=get').success(function (data) {
+
+ $.each(data, function (index, value) {
+ if (index == 'aktivna_hierarhija_ime') {
+ // za prikaz naslova hierarhije
+ that.imeHierarhije.aktivna = value;
+
+ // polje za shranjevanje, da shrani v enako hierarhijo
+ that.imeHierarhije.shrani = value;
+
+ // Če imamo ime hierarhije potem nimamo predogleda
+ if (value.length > 0)
+ that.previewHierarhije.vklop = false;
+
+ // that.imeHierarhije.index = (that.shranjenaHierarhija.length - 1);
+ }
+
+ if (index == 'admin_skrij_urejanje_nivojev')
+ that.vklopiUrejanje = (value == 'true' ? true : false);
+
+ if (index == 'srv_hierarhija_shrani_id') {
+ // na levi strani izbere ustrezno hierarhijo, moramo nastavit timeout, ker drugače ne pridobimo vseh hierarhij
+ setTimeout(function () {
+ Vue.nextTick(function () {
+ $.each(that.shranjenaHierarhija, function (i, val) {
+ if (val.id == value) {
+ that.imeHierarhije.index = i;
+ that.imeHierarhije.id = value;
+ }
+ });
+ });
+ }, 100);
+ }
+
+ // V kolikor imamo vpisano struktur
+ if (index == 'vpisana_struktura')
+ that.vpisanaStruktura = value;
+
+ });
+
+ });
+ },
+
+ posodobiOpcijeHierarhije: function () {
+ if (this.imeHierarhije.urejanje)
+ this.vseNastavitveIzBaze();
+ },
+
+ /**
+ * Če smo hierarhijo prvič aktivirali potem ponudi popup za vpis imena in shrani ime hierarhije v bazo
+ */
+ hierarhijoSmoAktivirali: function () {
+ var that = this;
+
+ if (this.inputNivo.length == 0 && this.imeHierarhije.aktivna == '' && this.imeHierarhije.shrani == '')
+ swal({
+ title: "Nova hierarhija",
+ text: "Vpišite ime nove hierarhije:",
+ type: "input",
+ animation: "slide-from-top",
+ closeOnConfirm: false,
+ closeOnCancel: true,
+ inputPlaceholder: "Primer: Hierarhija šola"
+ }, function (inputValue) {
+ if (inputValue === false) return false;
+
+ if (inputValue === "") {
+ swal.showInputError("Ime hierarhije je obvezno!");
+ return false
+ }
+
+ // Ime hierarhije shranimo v vue spremenljivko
+ that.getSaveOptions('aktivna_hierarhija_ime', inputValue);
+ that.imeHierarhije.shrani = inputValue;
+ that.imeHierarhije.aktivna = inputValue;
+
+ swal.close();
+ });
+ },
+
+
+ /**
+ * Pobriše shranjeno hierarhijo v tabeli srv_hierarhija_shrani
+ */
+ deleteHierarhijaShrani: function (id) {
+ var id = id || 0;
+ var obvestilo = false;
+
+ if (id == 0)
+ return console.log('brez Id-ja');
+
+ // post request, ki izbriše iz baze
+ this.$http.post('ajax.php?anketa=' + this.anketaId + '&t=hierarhija-ajax&a=izbrisi-hierarhijo', {
+ id: id
+ }).then(function (response) {
+ if (response.data == 'success')
+ obvestilo = true;
+
+ return obvestilo;
+ });
+
+ return obvestilo;
+ },
+
+ /**
+ * Dodaj komentar k hierarhiji
+ */
+ dodajKomentar: function () {
+ dodajKomentar();
+ },
+
+ /**
+ * Odpre popup za nalaganje logotipa
+ */
+ logoUpload: function () {
+ uploadLogo();
+ }
+
+ }
+
+ });
+ }
+
+
+ if (document.querySelector('#vue-gradnja-hierarhije')) {
+ gradnjaHierarhijeApp = new Vue({
+ el: '#vue-gradnja-hierarhije',
+ data: {
+ anketaId: $('#srv_meta_anketa_id').val(),
+ pageLoadComplete: false,
+ vpisanaStruktura: false, // pove nam, če je uporabnik že vpisal kakšno strukturo, da s tem zaklenemo vpis novih ravni (obstoječa struktura ne bi bila ok)
+ izbran: {
+ skrij: 1,
+ sifrant: [],
+ strukturaId: [],
+ sifrantPodatki: [],
+ parent: [],
+ },
+ // tukaj vpišemo št. nivoja, ki je key in nato sifrante
+ podatki: [],
+
+ // V kolikor uporabnik ni superadmin/admin potem podtke, ki so nad njegovim ali enake njegovemu nivoju pridobimo kot fiksne in se jih ne da spreminjati
+ fiksniPodatki: [],
+
+ // pri vpisu oseb na ustrezni nivo
+ osebe: {
+ prikazi: false,
+ nivo: 0,
+ vpisane: [], // key je številka nivoja, in potem notri imam object s podatki o osebah
+ nove: [], // key je številka nivoja in nato notri object s podatki o osebah
+ textarea: '',
+ show: [] // boolean, glede na nivo, da pokaže uporabnike pod šifranti
+ },
+
+ // podatki o uporabniku, ki ni admin
+ user: {
+ struktura: [],
+ uporabnik: [],
+ dropdown: [],
+ selected: ''
+ },
+
+ // vpis emaila preko textarea
+ email: {
+ napake: [],
+ opozorilo: false
+ },
+
+ elektronskiNaslovi: [{
+ email: "prvi@email.si",
+ ime: "Prvo Ime"
+ }, {
+ email: "drugi@email.si",
+ ime: "Drugi email"
+ }],
+
+ },
+ watch: {
+ 'user.selected': function (val) {
+
+ if (typeof val !== 'undefined' && val !== null && val.length > 0)
+ this.vpisemoUporabnikaIzDropDownMenija();
+
+ }
+ },
+ computed: {},
+
+ ready: function () {
+ var that = this;
+
+ // Pridobimo omejitve uporabnika
+ this.preveriNivoInPraviceUporabnika();
+
+ // Pridobimo vse nivoje in šifrante neglede na status uporabnika
+ this.naloziVseNivojeInSifrante();
+
+ // Ko je celoten JS in spletna stran naložena potem spremenimo select2 change event, da deluje
+ document.onreadystatechange = function () {
+
+ // Ko je stran čisto naložena izvedemo kodo
+ if (document.readyState === 'complete') {
+
+ // potrebno, ker drugače v FF in IE stvar ne deluje, da je zakasnitev 300ms in se počaka potem na naslednjo spremembo
+ setTimeout(function () {
+ Vue.nextTick(function () {
+
+ // Prikažemo prvi nivo
+ that.pageLoadComplete = true;
+
+ // Select 2 event
+ $(".select2").on('change', function () {
+
+ // uogtotovimo, kje smo spremenili podatek
+ var st = that.izbran.sifrant.length;
+ var level = $(this).attr('data-level');
+
+ that.izbran.sifrant.forEach(function (value, key) {
+ if (key > level) {
+ for (var i = key; i < st; i++) {
+ that.izbran.sifrantPodatki.$set(i, null);
+ that.izbran.sifrant[i] = "";
+ }
+ }
+ });
+
+ // Zanka po vseh nivojih, kateri so vpisani
+ that.izbran.sifrant.forEach(function (value, key) {
+ if (typeof value != 'undefined' && value.length > 0 && !isNaN(value) && that.izbran.sifrant[key].length > 0) {
+ that.preveriSifrantZaIzbranNivo(value, key)
+ }
+ });
+
+ });
+ });
+ }, 600);
+
+ // Dodamo še možnost helpa v kolikor obstaja
+ load_help();
+ }
+ }
+
+ // Pridobi, če so že vpisani šifranti
+ this.pridobiNastavitveCeJeVpisanaStruktura();
+
+ // Pridobimo uporabnikeza dropdown meni user
+ this.pridobiUporabnikeZaDropdownList();
+
+ },
+
+ methods: {
+ // Preverimo, če je uporabnik admin ali je uporabnik s pravicami na določenem nivoju
+ preveriNivoInPraviceUporabnika: function () {
+ var that = this;
+
+ // preverimo pravico in pridobimo že vpisano strukturo nad uporabikom
+ this.$http.get('ajax.php?anketa=' + this.anketaId + '&t=hierarhija-ajax&a=gradnja-hierarhije&m=get-user-level', function (data) {
+ // pridobimo polji (uporabnik, struktura), v kolikor je admin ni podatka o strukturi
+ that.user = data;
+
+ if (data.uporabnik != 1 && data.struktura) {
+ // ID strukture, ki je fiksna zapišemo v spremenljivko
+ data.struktura.forEach(function (val) {
+ that.izbran.strukturaId.$set(val.izbrani.level, val.izbrani.id);
+
+ // Že izbrano strukturo vpišemo v sifrantiPodatki, kjer se dodajajo tudi še na novo dodani podatki
+ that.izbran.sifrantPodatki.$set(val.izbrani.level, val.izbrani);
+ });
+
+ }
+ });
+ },
+
+ // Naložimo vse nivoje in pripadajoče šifrante
+ naloziVseNivojeInSifrante: function () {
+ var that = this;
+
+ // pridobi šifrante za ustrezni nivo, če ni nič izbrano potem vedno pridobi šifrante za prvi nivo
+ this.$http.get('ajax.php?anketa=' + this.anketaId + '&t=hierarhija-ajax&a=gradnja-hierarhije&m=get-sifranti', function (data) {
+ data.nivoji.forEach(function (val) {
+ val.sifranti = [];
+
+ // vpišemo nivo in pdoatke nivoja
+ that.podatki.push(val);
+
+ // pole $(this.el).on('change', )g nivoja vpišemo še podatke o šifrantih
+ data.sifranti.forEach(function (options) {
+ // tukaj zapišemo šifrante na ustrezen nivo, edino tukaj upoštevamo, da številka nivoja je za 1 manšja, ker če 0 pustimo potem pri prikazuso težave, nivo 1 je element 0
+ if (val.level == options.level)
+ that.podatki[(val.level - 1)].sifranti.push(options);
+ });
+ });
+
+ // Max število nivojev za validacije
+ that.podatki.maxLevel = data.maxLevel;
+ });
+ },
+
+ // Preveri, če je šifrant za izbran nivo že vpisan v podatkovno bazo
+ preveriSifrantZaIzbranNivo: function (sifrant, nivo) {
+ var that = this;
+ // Parent vedno vzamemo id elementa, ki je vpisan en nivo prej
+ var parent_id = (this.izbran.sifrantPodatki[nivo - 1] ? this.izbran.sifrantPodatki[nivo - 1].id : null);
+
+ Vue.nextTick(function () {
+ // var parent_id2 = (that.izbran.sifrantPodatki[nivo - 1] ? that.izbran.sifrantPodatki[nivo - 1].id : null);
+
+ that.$http.post('ajax.php?anketa=' + that.anketaId + '&t=hierarhija-ajax&a=gradnja-hierarhije&m=preveri-sifrant-za-nivo', {
+ level: nivo,
+ hierarhija_sifranti_id: sifrant,
+ parent_id: parent_id
+ }).then(function (i) {
+ if (i.data == 0) {
+ // V kolikor omenjen id šifranta še ne obstaja v strukturi potem shranimo v polje novSifrant, da ga pri sumbitu upoštevamo
+ that.izbran.sifrantPodatki.$set(nivo, {
+ id: null,
+ level: nivo,
+ hierarhija_sifranti_id: sifrant,
+ hierarhija_ravni_id: that.podatki[nivo - 1].id,
+ parent_id: parent_id
+ });
+ } else {
+ // shranimo na ključ, kjer je nivo celo polje
+ that.izbran.sifrantPodatki.$set(i.data.level, i.data);
+ }
+
+ // Preverimo, za nivo, če lahko prikažemo uporabnike
+ that.prikaziUporabnike(nivo);
+ });
+ // DOM updated
+ });
+
+ },
+
+ // Potrdimo vpis šifrantov, ki smo jih izbrali
+ submitSifrante: function () {
+ var that = this;
+
+ // Preverimo, če je bil dodan kak nov elemepridobiIdSifrantovInUporabnikent
+ var prestejNove = 0;
+ this.izbran.sifrantPodatki.forEach(function (val) {
+ if (val != null && val.id == null && !isNaN(val.id))
+ prestejNove++;
+ });
+
+ if (prestejNove == 0)
+ return swal({
+ title: "Opozorilo!",
+ text: "<div style='text-align: left;'>Vse vrstice so že prenesene v hierarhijo:" +
+ "<ul><li>Bodisi vnesite novega učitelja in njegov predmet.</li>" +
+ "<li>Bodisi zaključite z vnosom in s klikom na gumb NAPREJ (spdaj desno) aktivirajte hierarhijo.</li></ul></div>",
+ type: "error",
+ html: true
+ });
+
+ var st = this.podatki.maxLevel;
+ // Če je vnešen zadnji nivo, object ni null in ni vpisanih oseb, ker na zadnjem nivo morajo biti vpisane osebe
+ if (that.izbran.sifrantPodatki[st] != null && (typeof this.osebe.nove[st] == 'undefined' || this.osebe.nove[st].length == 0))
+ return swal({
+ title: "Opozorilo!",
+ text: "Na zadnjem nivoju morate obvezno vpisati elektronski naslov osebe.",
+ type: "error"
+ });
+
+ // Izpišemo opozorilo, če uporabnik ni vnesel zadnjega nivoja
+ if (that.izbran.sifrantPodatki[st] == null)
+ swal({
+ title: "Opozorilo!",
+ text: "Niste vpisali zadnjega nivoja.",
+ type: "warning",
+ timer: 2000
+ });
+
+ // Posredujemo podatke za shranjevanje
+ this.$http.post('ajax.php?anketa=' + this.anketaId + '&t=hierarhija-ajax&a=gradnja-hierarhije&m=post-struktura', {
+ vnos: that.izbran.sifrantPodatki,
+ osebe: that.osebe.nove
+ }).then(function () {
+ //Tukaj moramo osvežiti vse šifrante, v dataTables in JsTree, omenjeni funkciji sta v custom.js - splošni jquery
+ tabela.ajax.reload(null, false);
+ jstree_json_data(that.anketaId, 1);
+
+ // Če je bil izdan zadnji nivo od vseh mogočih potem odstranimo element izbire iz zadnjega nivoja
+ if (typeof that.izbran.sifrant[that.podatki.maxLevel] != 'undefined' && that.izbran.sifrant[that.podatki.maxLevel].length > 0) {
+ // Zadnji nivo odstranimo iz select2 izbire
+ that.izbran.sifrant.splice(that.podatki.maxLevel, 1);
+
+ // Izbrišemo tudi vse podatke o izbranem elementu iz DOM-a
+ that.izbran.sifrantPodatki.splice(that.podatki.maxLevel, 1);
+
+ //postavimo spremenljivko na true, da prikaže drugačen tekst pri navodilih
+ $('.srv_hierarchy_user_help').hide();
+ $('.srv_hierarchy_user_help_sifrant_vnesen').show();
+ }
+
+ // Osveži podatke o vseh šifrantih, ki so izbrani in so bili na novo dodani
+ that.preveriBazoZaSifrant(null, 1);
+
+ // Polje z na novo dodanimi osebami se izprazni
+ that.osebe.nove = [];
+
+ //Odstrani besedilo Uporabnik/i iz zadnjega polja, ker ga še tako odstranimo
+ that.osebe.show.$set(st, false);
+
+ // Zapišemo spremembo, da je struktura vnešena
+ that.aliJeStrukturaVnesena();
+
+ // Shanimo celotno strukturo v string in srv_hierarhija_shrani
+ that.shraniUporabnikeNaHierarhijo();
+
+ });
+ },
+
+ // Klik na ikono osebe, prikaže spodaj opcijo za vpis oseb
+ prikaziVnosOseb: function (level) {
+ // V kolikor kliknemo na isto ikono 2x potem uporabimo toggle opcijo
+ if (level == this.osebe.nivo)
+ return this.osebe.prikazi = !this.osebe.prikazi;
+
+ this.osebe.prikazi = true;
+ return this.osebe.nivo = level;
+ },
+
+ vpisemoUporabnikaIzDropDownMenija: function () {
+
+ this.osebe.nove[this.osebe.nivo] = [this.user.selected.split(',')];
+
+ // Prikažemo polje z uporabniki, ki so bili na novo dodani
+ this.prikaziUporabnike(this.osebe.nivo);
+
+ // Tekstovno polje spraznimo in ga skrijemo
+ this.user.selected = null;
+ this.osebe.prikazi = false;
+ },
+
+ vpisOsebNaNivoTextarea: function () {
+ var that = this;
+
+ // preverimo email in vrnemo napako, če obstaja
+ if (this.preveriPravilnostEmaila())
+ return this.email.opozorilo;
+
+ if (typeof this.user.selected !== 'undefined' && this.user.selected && this.user.selected.length > 0) {
+ var vpis = [this.user.selected];
+ } else {
+ // uporabnike razdelimo glede na \n in jih shranimo v polje
+ var vpis = this.osebe.textarea.split('\n');
+ }
+
+
+ this.osebe.nove.$set(that.osebe.nivo, []);
+ // ločimo še vejice
+ $.each(vpis, function (key, val) {
+ var loci = val.split(',');
+
+ // če je email večji od 4 znakov, ga shranimo kot novega drugače ne
+ if (loci[0].length > 4) {
+ that.osebe.nove[that.osebe.nivo].push(loci);
+ }
+ });
+
+ // Prikažemo polje z uporabniki, ki so bili na novo dodani
+ this.prikaziUporabnike(this.osebe.nivo);
+
+ // Tekstovno polje spraznimo in ga skrijemo
+ this.osebe.textarea = '';
+ this.osebe.prikazi = false;
+ this.user.selected = '';
+ },
+
+ // Preveri, če string ustreza pravilnemu zapis emaila
+ preveriEmail: function (email) {
+ var EMAIL_REGEX = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
+
+ return EMAIL_REGEX.test(email);
+ },
+
+ // Preverimo pravilnost vpisanega emaila in vržemo napako
+ preveriPravilnostEmaila: function () {
+ var that = this;
+
+ // uporabnike razdelimo glede na \n in jih shranimo v polje
+ var vpis = this.osebe.textarea.split('\n');
+
+ // vse napake postavimo na 0
+ this.email.napake = [];
+
+ // ločimo še vejice
+ $.each(vpis, function (key, val) {
+ var loci = val.split(',');
+
+ if (!that.preveriEmail(loci[0]) && loci[0].length > 0) {
+ that.email.napake.push({
+ naslov: loci[0],
+ vrstica: (key + 1)
+ });
+ }
+ });
+
+ // v kolikor so v poju zapisani napačni email naslovi potem prikažemo opozorilo
+ if (this.email.napake.length > 0)
+ return this.email.opozorilo = true;
+ },
+
+ // Preverimo, če uporabniki so že vpisani v bazi in jih prikažemo ali če so bili uporabniki na novo dodani
+ prikaziUporabnike: function (level) {
+ // Uporabniki so bili na novo dodani na nivo
+ if (this.osebe.nove[level] && this.osebe.nove[level].length > 0)
+ return this.osebe.show.$set(level, true);
+
+ // imamo uporabni v SQL bazi
+ if (this.izbran.sifrantPodatki[level] && this.izbran.sifrantPodatki[level].uporabniki)
+ return this.osebe.show.$set(level, true);
+
+ return this.osebe.show.$set(level, false);
+ },
+
+ // Izbriši uporabnika iz this.osebe.nove
+ izbrisiUporabnika: function (level) {
+ return this.osebe.nove.splice(level, 1);
+ },
+
+ // Izbriši uporabnika iz Sql baze, ker je že shranjen
+ izbrisiUporabnikaIzBaze: function (userId, index, level) {
+ var that = this;
+
+ this.$http.post('ajax.php?anketa=' + this.anketaId + '&t=hierarhija-ajax&a=brisi&m=uporabnika', {
+ uporabnik_id: userId,
+ struktura_id: this.izbran.sifrantPodatki[level].id
+ }).then(function () {
+ that.izbran.sifrantPodatki[level].uporabniki.splice(index, 1);
+ });
+
+ },
+
+ // Preverimo v SQL-u, da dobimo za vpisane šifrante ID in parent_id
+ // Rekurzivna funkcija, ki ob sumbitu preveri v bazi in vsem še obstoječim šifrantom doda id in parent_id
+ preveriBazoZaSifrant: function (parent_id, key) {
+ var that = this;
+
+ // Polje z omenjenim elementom mora obstajati, drugače smo prišli do konca
+ if (this.izbran.sifrantPodatki[key]) {
+
+ // V kolikor element že ima parent id, potem tega elementa ne preverjamo in gremo preverit naslednji element
+ // Prvi element vedno preverimo (key == 1)
+ if (key > 1 && this.izbran.sifrantPodatki[key] && this.izbran.sifrantPodatki[key].parent_id != 'null') {
+ var st = key + 1;
+ this.preveriBazoZaSifrant(this.izbran.sifrantPodatki[key].id, st);
+ }
+
+ // AJAX request, da preveri podatke o elementu in pridobi parent_id
+ this.$http.post('ajax.php?anketa=' + this.anketaId + '&t=hierarhija-ajax&a=gradnja-hierarhije&m=preveri-sifrant-za-nivo', {
+ level: this.izbran.sifrantPodatki[key].level,
+ hierarhija_sifranti_id: this.izbran.sifrantPodatki[key].hierarhija_sifranti_id,
+ parent_id: parent_id
+ }).then(function (i) {
+
+ // shranimo na ključ, kjer je nivo celo polje
+ that.izbran.sifrantPodatki.$set(i.data.level, i.data);
+
+ // V kolikor vsebuje podatke o uporabnikih potem te rudi prikaže
+ that.prikaziUporabnike(i.data.level);
+
+ // Pridobimo številko naslednjega elementa
+ var st = 1 + Number(i.data.level);
+
+ // Pokličemo rekurzivno funkcijo, da kjer je paren_id, id trenutnega elementa
+ that.preveriBazoZaSifrant(i.data.id, st);
+ });
+ }
+
+ return 0;
+ },
+
+ // pridobimo vse nastavitve iz baze
+ pridobiNastavitveCeJeVpisanaStruktura: function () {
+ var that = this;
+
+ this.$http.post('ajax.php?anketa=' + this.anketaId + '&t=hierarhija-ajax&a=hierarhija-options&m=get').success(function (data) {
+
+ if (data.length == 0)
+ return that.vpisanaStruktura = false;
+
+ $.each(data, function (index, value) {
+ if (index == 'vpisana_struktura')
+ that.vpisanaStruktura = value;
+ });
+ });
+ },
+
+ // Preveri, če obstaja med opcijami vpisana_struktura, drugače jo vnese
+ aliJeStrukturaVnesena: function () {
+ if (this.vpisanaStruktura)
+ return this.vpisanaStruktura;
+
+ // V kolikor gre za vpis v bazo
+ hierarhijaApp.getSaveOptions('vpisana_struktura', 1);
+ this.vpisanaStruktura = 1;
+ },
+
+ // Preverimo, je izbran element za sledeči nivo, če je nivo večje kot zadnje nivo in če na zadnjem nivoju še ni vpisanega uporabnika potem dovoli prikaz ikone za vnos uporabnikov
+ aliPrikazemIkonoZaDodajanjeUporabnikov: function (level) {
+ var level = level || false;
+
+ if (!level)
+ return false;
+
+ if (this.izbran.sifrant[level] > 0 &&
+ (level < this.podatki.maxLevel ||
+ level == this.podatki.maxLevel &&
+ this.izbran.sifrantPodatki[level] &&
+ !this.izbran.sifrantPodatki[level].hasOwnProperty('uporabniki'))
+ )
+ return true;
+
+ return false;
+ },
+
+ /*
+ * Pridobimo vse ID-je že vpisanih šifrantov skupaj z uporabniki
+ * izhajamo pa iz zadnjega ID-ja
+ */
+ pridobiIdSifrantovInUporabnike: function (idLast) {
+ var that = this;
+
+ this.$http.post('ajax.php?anketa=' + this.anketaId + '&t=hierarhija-ajax&a=gradnja-hierarhije&m=kopiranje-vrstice', {
+ id: idLast
+ }).then(function (response) {
+ // response ok in imamo objekt
+ if (response.status == 200 && response.data.length > 0) {
+ response.data.forEach(function (val) {
+ that.izbran.sifrantPodatki.$set(val.izbrani.level, val.izbrani);
+ $('option[value="' + val.izbrani.hierarhija_sifranti_id + '"]').parent().val(val.izbrani.hierarhija_sifranti_id).trigger('change');
+ });
+
+ $(window).scrollTop(0);
+ }
+ });
+
+ },
+
+ /**
+ * Shranimo celotno strukturo z uporabniki v srv_hierarhija_shrani
+ */
+ shraniUporabnikeNaHierarhijo: function () {
+
+ this.$http.post('ajax.php?anketa=' + this.anketaId + '&t=hierarhija-ajax&a=shrani-strukturo-hierarhije', {
+ id: this.anketaId,
+ shrani: 1
+ });
+ },
+
+ /**
+ * Pridobimo uporabnike, ki jih imamo shranjene v bazi za drop down list
+ */
+ pridobiUporabnikeZaDropdownList: function () {
+ var that = this;
+
+ this.$http.get('ajax.php?anketa=' + this.anketaId + '&t=hierarhija-ajax&a=gradnja-hierarhije&m=import-user&s=getAll').success(function (data) {
+ that.user.dropdown = data;
+ });
+ },
+
+
+ /**************** funkcije, ki preveri true/false **************/
+ preveriCejeEmailZeVnesenVbazoZaUcitelja: function (maxLevel) {
+ var maxLevel = maxLevel || 0;
+
+ if(maxLevel === 0 || this.izbran.sifrantPodatki[maxLevel] !== null)
+ return false;
+
+ if(this.izbran.sifrantPodatki[maxLevel] !== null && this.izbran.sifrantPodatki[maxLevel].uporabniki.length > 0)
+ return true;
+
+ return false;
+ },
+
+ prikaziJsKoSeJeCelaSpletnaStranZeNalozila: function(level){
+ var level = level || 0;
+
+ if((level == 1 && this.pageLoadComplete) || (this.izbran.sifrant[level-1] > 0 && this.izbran.sifrant[level-1].length > 0))
+ return true;
+
+ return false;
+ },
+
+ prikaziSelectZaZadnjiNivo: function(level) {
+ var level = level || 0;
+ this.osebe.nivo = level;
+
+ var prikazi = this.aliPrikazemIkonoZaDodajanjeUporabnikov(level);
+
+ if(level === this.podatki.maxLevel && this.user.dropdown && prikazi)
+ return true;
+
+ return false;
+ },
+
+ },
+ });
+ }
+
+ if (document.querySelector('#vue-custom')) {
+ new Vue({
+ el: '#vue-custom',
+ data: {
+ anketaId: $('#srv_meta_anketa_id').val(),
+ managerOznaciVse: true,
+ statusTabela: '',
+ supersifra: [],
+ },
+ methods: {
+ managerZamenjajOznaci: function () {
+ return this.managerOznaciVse = !this.managerOznaciVse;
+ },
+ emailObvestiloZaManagerje: function () {
+ event.preventDefault();
+
+ var polje = [];
+ $('[name="manager"]:checked').each(function () {
+ polje.push($(this).val());
+ });
+
+ //Poljšemo podatke
+ $.post("ajax.php?anketa=" + this.anketaId + "&t=hierarhija-ajax&a=ostalo&m=obvesti-managerje", {
+ managerji: polje
+ }).then(function (response) {
+ $('[name="manager"]:checked').each(function () {
+ $(this).hide();
+ $(this).parent().prepend('<span> - </span>');
+ });
+
+ if (response.data == 'success') {
+ swal({
+ title: "Obvestilo poslano!",
+ text: "Elektronsko sporočilo je bilo uspešno poslano.",
+ type: "success",
+ timer: 3000
+ });
+ }
+
+ });
+
+ }
+ }
+ });
+ }
+});
+
+function izbrisiSifrant(id) {
+ var anketa_id = $('#srv_meta_anketa_id').val();
+ $.post("ajax.php?anketa=" + anketa_id + "&t=hierarhija-ajax&a=izbrisi_sifrant", {
+ idSifranta: id
+ }).then(function (response) {
+ if (response == 1)
+ return swal({
+ title: "Opozorilo!",
+ text: "Šifrant je že uporabljen in ga ni mogoče izbrisati.",
+ type: "error",
+ timer: 3000
+ });
+
+ $('[data-sifrant="' + id + '"]').remove();
+ });
+}
+
+// Pobriše vrstico iz DataTables in odstrani šifrante iz vseh nivojev pri izbiri
+function pobrisiVrsticoHierarhije(id) {
+ gradnjaHierarhijeApp.$set('izbran.sifrant', []);
+ gradnjaHierarhijeApp.$set('izbran.sifrantPodatki', []);
+
+ // V kolikor gre za uporabnika na nižjem nivoju potem moramo ponovno pridobiti strukturo in vse podatke o fiksnih nivojih
+ gradnjaHierarhijeApp.preveriNivoInPraviceUporabnika();
+
+ brisiVrsticoHierarhije(id, 1);
+} \ No newline at end of file
diff --git a/admin/survey/modules/mod_hierarhija/js/vendor/custom.js b/admin/survey/modules/mod_hierarhija/js/vendor/custom.js
new file mode 100644
index 0000000..dc64b58
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/js/vendor/custom.js
@@ -0,0 +1,832 @@
+/************************************************
+ DOCUMENT READY
+ ************************************************/
+var tabela = null;
+var anketa_id = 0;
+
+$(document).ready(function () {
+ // pridobimo ID ankete, ko je dokument naložen
+ anketa_id = $('#srv_meta_anketa_id').val();
+
+ //vklopljeno iskanje za vse select box elemente
+ $('.h-selected select.hierarhija-select').chosen();
+ $('.h-selected.hierarhija-select').chosen();
+
+ //Vklopi nice input file
+ $("input[type=file]").nicefileinput({
+ label: 'Poišči datoteko...'
+ });
+
+
+ //Data Tables konfiguracija za vpis šifrantov
+ if ($('#vpis-sifrantov-admin-tabela').length > 0) {
+ tabela = $('#vpis-sifrantov-admin-tabela').DataTable({
+ "processing": true,
+ "lengthMenu": [[20, 40, 100, 200, -1], [20, 40, 100, 200, "vse"]],
+ "ajax": 'ajax.php?anketa=' + anketa_id + '&t=hierarhija-ajax&a=get-datatables-data',
+ "drawCallback": function (settings) {
+ if (tabela.page.info().recordsTotal == 0) {
+ $('#div-datatables').hide();
+ $('#hierarhija-jstree-ime').hide();
+ $('#admin_hierarhija_jstree').hide();
+ } else {
+ $('#div-datatables').show();
+ $('#hierarhija-jstree-ime').show();
+ $('#admin_hierarhija_jstree').show();
+ }
+ },
+ "createdRow": function (row, data, rowIndex) {
+ // gremo po vseh td elementih
+ $.each($('td', row), function (colIndex) {
+
+ // SQL query nam vrne objek, ki ga uporabimo za datatables vpis vrstice
+ if (data[colIndex] && data[colIndex].label) {
+ // Vsaka celica ima id strukture, ki je potreben za urejanje uporabbnikov za posamezno vrstico
+ $(this).attr('data-struktura', data[colIndex].id);
+
+ // Vsaka celica ima številko nivoja - level
+ $(this).attr('data-level', data[colIndex].level);
+
+ // Prikaz podatkov
+ $(this).html(data[colIndex].label);
+ }
+
+ });
+ },
+ "language": {
+ "url": "modules/mod_hierarhija/js/vendor/datatables-slovenian.json"
+ }
+ });
+
+
+ }
+
+
+ // datatables za prikaz že vpisanih šifrantov
+ if ($('#pregled-sifrantov-admin-tabela').length > 0) {
+ $('#pregled-sifrantov-admin-tabela').DataTable({
+ ajax: 'ajax.php?anketa=' + anketa_id + '&t=hierarhija-ajax&a=get-datatables-data&m=1&p=1',
+ "language": {
+ "url": "modules/mod_hierarhija/js/vendor/datatables-slovenian.json"
+ }
+ });
+ }
+
+
+ // Klik na ikono za komentar
+ $('.surveycomment').on('click', function () {
+ dodajKomentar();
+ });
+
+ // Klik na ikono za upload logo - naloži logotip
+ $('.logo-upload').on('click', function () {
+ uploadLogo();
+ });
+
+ // Skrivamo filtrov in vprašanj pri analizah
+ $('.znak').on('click', function (e) {
+ var razred = e.currentTarget.className;
+
+ if (razred == 'znak minus') {
+ $('#div_means_dropdowns').animate('slow').hide();
+ $('.minus').hide();
+ $('.plus').show();
+ } else {
+ $('#div_means_dropdowns').animate('slow').show();
+ $('.plus').hide();
+ $('.minus').show();
+ }
+ });
+
+ // Skrijemo error, ki se je pojavil
+ $('.error-display').delay(10000).fadeOut('slow');
+});
+// uredi vrstico
+// function urediVrsticoHierarhije(id) {
+// var anketa_id = $('#anketa_id').val();
+// var el = $('.btn-urejanje-hierarhije[data-id="' + id + '"]').parent().siblings().last();
+// var text = el.html().split(" - ");
+//
+// // pridobi vse uporabnike, ki so dodani na trenutno hierarhijo
+// var opcije = [];
+// // $.post("ajax.php?anketa=" + anketa_id + "&t=hierarhija-ajax&a=gradnja-hierarhije&m=get-uporabniki", {
+// // id: id
+// // }).success(function (data) {
+// // if (data == 0)
+// // return opcije;
+// //
+// // // vse emaili dodamo med opcije in polje, ki ga kasneje združimo v string
+// // $.each(JSON.parse(data), function (key, val) {
+// // opcije.push('<option value="' + key + '" ' + val.selected + '>' + val.uporabnik + '</option>');
+// // });
+// //
+// // el.html('Izbira: <b>' + text[0] + '</b><br/>Uporabniki:<select id="select2-email-' + id + '" multiple>' + opcije.join("") + '</seclect>');
+// // $('.btn-urejanje-hierarhije[data-id="' + id + '"]').text('Vpiši').attr('onclick', 'vpisiVrsticoHierarhije(' + id + ')');
+// //
+// // $('#select2-email-' + id).select2();
+// // });
+//
+//
+// }
+
+var vrsticaAktivnoUrejanje = {
+ html: '',
+ id: 0,
+ izbris: 0
+};
+
+function urediVrsticoHierarhije(id) {
+ // V kolikor je ponovno kliknil na urejanje, potem samo vrnemo in na ponovno neurejanje
+ if (vrsticaAktivnoUrejanje.id == id) {
+ // Vpišemo stare podatke vrstice, brez urejanja
+ $('#vpis-sifrantov-admin-tabela .aktivno-urejanje').html(vrsticaAktivnoUrejanje.html);
+
+ // Odstranimo razrede
+ $('#vpis-sifrantov-admin-tabela .h-uporabnik').remove();
+ $('#vpis-sifrantov-admin-tabela .aktivno-urejanje').removeClass();
+
+ // če je bil uporabnik izbrisan potem osvežimo celotno tabelo
+ if (vrsticaAktivnoUrejanje.izbris == 1)
+ tabela.ajax.reload(null, false);
+
+
+ // Ponastavimo globalno spremenljivko
+ return vrsticaAktivnoUrejanje = {
+ html: '',
+ id: 0,
+ izbris: 0
+ };
+ }
+
+ // V kolikor obstaja podatek cele vrstice od prej in je aktivni razred . aktivno-urejanje, potem vsebino prekopiramo
+ if (vrsticaAktivnoUrejanje.html.length > 0 && $('#vpis-sifrantov-admin-tabela .aktivno-urejanje').length > 0)
+ $('#vpis-sifrantov-admin-tabela .aktivno-urejanje').html(vrsticaAktivnoUrejanje.html);
+
+
+ // Izbriše ikonice za urejanje uprabnikov in odstrani aktivni razred urejanja
+ $('#vpis-sifrantov-admin-tabela .h-uporabnik').remove();
+ $('#vpis-sifrantov-admin-tabela .aktivno-urejanje').removeClass();
+
+
+ // Vsi elementi, ki vsebujejo ID strukture
+ var vrstica = $('[data-struktura="' + id + '"]').parent();
+ var stolpci = vrstica.children('[data-struktura]');
+
+ // Obarvamo ozadje vrstice
+ vrstica.addClass('aktivno-urejanje');
+
+ // Celotno vrstico shranimo globalno in tudi id
+ vrsticaAktivnoUrejanje = {
+ html: $('#vpis-sifrantov-admin-tabela .aktivno-urejanje').html(),
+ id: id
+ }
+
+ // Pridobimo vse TD celice in v vsaki dodamo ikono ter uporabnike za urejati
+ stolpci.each(function (key, val) {
+ var self = this;
+ var html = $(this).html().split("<br>");
+ var idStrukture = $(this).attr('data-struktura');
+ var uporabnikiHtml = '';
+
+ // Ajax request, ki pridobi vse uporabnike za vsak nivo posebej
+ $.post('ajax.php?anketa=' + anketa_id + '&t=hierarhija-ajax&a=gradnja-hierarhije&m=get-uporabniki', {
+ id: idStrukture
+ }, function (data) {
+ var urejanjeUporabnika = '';
+
+ // Ikona za pop up, kjer dodajamo še email
+ urejanjeUporabnika = '<div class="h-uporabnik"><span class="faicon users icon-as_link" onclick="odpriPopup(' + idStrukture + ')"></span></div>';
+
+ // Če imamo uporabnike na tem nivoju potem jih ustrezno dodamo
+ if (data.length > 0) {
+ var podatki = JSON.parse(data);
+
+ // V kolikor imamo uporabnika samo na zadnjem nivoju, potem ni možnosti urejanja, ker ima opcijo briši nivo in uporabnika
+ if ($(self).attr('data-level') == podatki.maxLevel) {
+
+ // Opcije za urejanje uporabnika ne potrebujemo na zadnjem nivoju
+ urejanjeUporabnika = '<div class="h-uporabnik"><span class="icon user-red" onclick="odpriPopup(' + idStrukture + ', 1)"></span></div>';
+
+ uporabnikiHtml = '<div class="h-uporabnik-prikazi">Uporabnik/i:' +
+ '<ul>';
+
+ // Dodamo vse uporabnike, ki so na tem nivoju
+ if (podatki.uporabniki) {
+ $.each(podatki.uporabniki, function (key, val) {
+ uporabnikiHtml += '<li>' + val.uporabnik + '</li>';
+ });
+ }
+
+ uporabnikiHtml += '</ul></div>';
+
+ }
+ else {
+ // Izpišemo uporabnike in možnost brisanja
+ uporabnikiHtml = '<div class="h-uporabnik-prikazi">Uporabnik/i:' +
+ '<ul>';
+
+ // Dodamo vse uporabnike, ki so na tem nivoju
+ if (podatki.uporabniki) {
+ $.each(podatki.uporabniki, function (key, val) {
+ uporabnikiHtml += '<li>' + val.uporabnik + ' <span class="icon brisi-x" data-id="' + val.id + '" onclick="izbrisiUporabnikaDataTables(' + val.id + ')"></span></li>';
+ });
+ }
+
+ uporabnikiHtml += '</ul></div>';
+ }
+
+ }
+
+ $(self).html(html[0] + urejanjeUporabnika + uporabnikiHtml);
+
+ });
+
+
+ });
+
+}
+
+/**
+ * Prikaži pop-up za uvoz vseh uporabnikov preko tekstovnega polja
+ */
+function uvoziUporabnike() {
+ $('#fade').fadeTo('slow', 1);
+ $('#vrednost_edit').html('').fadeIn('slow').load('ajax.php?anketa=' + anketa_id + '&t=hierarhija-ajax&a=gradnja-hierarhije&m=import-user&s=get');
+}
+
+function shraniVseVpisaneUporabnike() {
+ var users = $('#users-email-import').val();
+
+ if (users.length < 5)
+ return false;
+
+ $.post('ajax.php?anketa=' + anketa_id + '&t=hierarhija-ajax&a=gradnja-hierarhije&m=import-user&s=post', {
+ users: JSON.stringify(users)
+ }).then(function (response) {
+ // Pridobimoo uporabnike za select box
+ var uporabniki = JSON.parse(response);
+
+ gradnjaHierarhijeApp.user.dropdown = uporabniki;
+ gradnjaHierarhijeApp.osebe.prikazi = false;
+
+ // Zapremo Pop up
+ vrednost_cancel();
+ });
+}
+
+/**
+ * Vrstico hierarhije kopiramo v možnost za urejanje uporabnikov, pridobimo zadnji id
+ */
+function kopirajVrsticoHierarhije(id) {
+ // Poženemo funkcijo v datoteki custom-vue.js
+ gradnjaHierarhijeApp.pridobiIdSifrantovInUporabnike(id);
+}
+
+// Odpre PopUp in naloži možnost za dodajanje novega uporabnika - textarea
+function odpriPopup(id, last) {
+ var last = last || 0;
+
+ $('#fade').fadeTo('slow', 1);
+ $('#vrednost_edit').html('').fadeIn('slow').load('ajax.php?anketa=' + anketa_id + '&t=hierarhija-ajax&a=gradnja-hierarhije&m=uredi-uporabnike-v-strukturi', {
+ struktura: id,
+ last: last
+ });
+}
+
+/**
+ * Zamenjamo email uporabnika na zadnjem nivoju z novim emailom - find and replace all
+ */
+function zamenjajUporabnikaZNovim() {
+ $('#fade').fadeTo('slow', 1);
+ $('#vrednost_edit').html('').fadeIn('slow').load('ajax.php?anketa=' + anketa_id + '&t=hierarhija-ajax&a=gradnja-hierarhije&m=zamenjaj-uporabnika-v-strukturi');
+}
+
+/**
+ * Testno preverimo koliko uporabnikov se bo zamenjalo
+ */
+function testnoPreveriKolikoUporabnikovBoZamnjenihVStrukturi() {
+ var findEmail = $('#find-email').val();
+ var replaceEmail = $('#replace-email').val();
+
+
+ if (errorPreverjanjeEmailaZaZamenjavo(findEmail, replaceEmail))
+ return false;
+
+ $.post('ajax.php?anketa=' + anketa_id + '&t=hierarhija-ajax&a=gradnja-hierarhije&m=post-st-zamenjav', {
+ 'find_email': findEmail
+ }).then(function (response) {
+ var besedilo = 'Elektronski naslov <b>' + findEmail + '</b> ni bil najden med obstoječimi uporabniki in ga ni mogoče zamenjati.';
+
+ if (response > 0)
+ besedilo = 'Elektronski naslov <b>' + findEmail + '</b> bo zamenjan z naslovom <b>' + replaceEmail + '</b>.<br />Število zamenjav: <b>' + response + '</b>.';
+
+ $('#st_zamenjav_uporabnikov').html(besedilo)
+ });
+}
+
+function potriZamenjavoUporabnika() {
+ var findEmail = $('#find-email').val();
+ var replaceEmail = $('#replace-email').val();
+
+ if (errorPreverjanjeEmailaZaZamenjavo(findEmail, replaceEmail))
+ return false;
+
+ $.post('ajax.php?anketa=' + anketa_id + '&t=hierarhija-ajax&a=gradnja-hierarhije&m=post-zamenjaj-uporabnika-z-novim', {
+ 'find_email': findEmail,
+ 'replace_email': replaceEmail
+ }).then(function (response) {
+
+ tabela.ajax.reload(null, false);
+
+ // zapremo popup
+ $('#fade').fadeOut('slow');
+ $('#vrednost_edit').hide();
+ });
+}
+
+/**
+ * Preverimo, če sta emaila pravilno vpisana tist, ki ga iščemo in tisti, ki je za zamenjavo
+ * @param findEmail
+ * @param replaceEmail
+ * @returns {boolean}
+ */
+function errorPreverjanjeEmailaZaZamenjavo(findEmail, replaceEmail) {
+ // Preden preverimo odstranimo vse errorje
+ $('#find-email').siblings('.error-label').hide();
+ $('#find-email').removeClass('error');
+ $('#replace-email').siblings('.error-label').hide();
+ $('#replace-email').removeClass('error')
+
+ if (!preveriFormatEmail(findEmail)) {
+ $('#find-email').siblings('.error-label').show();
+ $('#find-email').addClass('error');
+
+ return true;
+ }
+
+ if (!preveriFormatEmail(replaceEmail)) {
+ $('#replace-email').siblings('.error-label').show();
+ $('#replace-email').addClass('error');
+
+ return true;
+ }
+
+ return false;
+};
+
+
+function preveriFormatEmail(email) {
+ var EMAIL_REGEX = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
+
+ return EMAIL_REGEX.test(email);
+}
+
+// Shranimo email vpisanih oseb pri urejanju za specifično strukturo
+function shrani_email(id, last) {
+ var emails = $('#vpis-email-popup').val().split('\n');
+ var last = last || 0;
+
+ //Loop po vseh vpisanih emailih
+ $.each(emails, function (key, val) {
+ val = val.split(',');
+
+ // V kolikor email ni pravilen ga odstranimo iz polja
+ if (!preveriPravilnoVpisanmail(val[0])) {
+ emails.splice(key, 1);
+ } else {
+ emails[key] = val;
+ }
+ });
+
+ // V kolikor ni bil vpisan email, ampak je samo klik na potrdi
+ if (typeof emails[0] == 'undefined')
+ return 'error';
+
+ // Posredujemo samo pravilne emaile
+ $.post('ajax.php?anketa=' + anketa_id + '&t=hierarhija-ajax&a=gradnja-hierarhije&m=post-dodatne-uporabnike-k-strukturi', {
+ uporabniki: JSON.stringify(emails),
+ struktura: id,
+ last: last
+ }, function () {
+
+ // osvežimo celoten DataTables
+ tabela.ajax.reload(null, false);
+
+ // Osvežimo tudi jsTree
+ jstree_json_data(anketa_id, 1);
+
+ // zapremo popup
+ $('#fade').fadeOut('slow');
+ $('#vrednost_edit').hide();
+
+ // celotno strukturo shranimo v string in srv_hierarhija_save
+ gradnjaHierarhijeApp.shraniUporabnikeNaHierarhijo();
+ });
+
+}
+
+function preveriPravilnoVpisanmail(email) {
+ var EMAIL_REGEX = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
+
+ return EMAIL_REGEX.test(email);
+}
+
+// Izbriši uporabnika iz DataTables
+function izbrisiUporabnikaDataTables(id) {
+ var str_id = $('[data-id="' + id + '"]').parents('[data-struktura]').attr('data-struktura');
+
+ $.post('ajax.php?anketa=' + anketa_id + '&t=hierarhija-ajax&a=brisi&m=uporabnika', {
+ uporabnik_id: id,
+ struktura_id: str_id
+ }).then(function () {
+ // Če je uporabnik uspešno izbrisan iz baze, potem tudi izbrišemo iz DataTables
+ $('[data-id="' + id + '"]').parent().remove();
+
+ vrsticaAktivnoUrejanje.izbris = 1;
+ });
+}
+
+// vpiši vrstico v bazo
+function vpisiVrsticoHierarhije(id) {
+ var polje = [];
+
+ // vse izbrani ID oseb
+ $('#select2-email-' + id + ' option:selected').each(function () {
+ polje.push($(this).val());
+ });
+
+ $.post("ajax.php?anketa=" + anketa_id + "&t=hierarhija-ajax&a=gradnja-hierarhije&m=post-uporabniki", {
+ uporabniki: JSON.stringify(polje),
+ struktura: id
+ }, function (data) {
+ // v kolikor ni vpisanega uporabnika potem opozorimo
+ if (data == 'uporabnik') {
+ return swal({
+ title: "Opozorilo!",
+ text: "Uporabnik mora biti določen.",
+ type: "error",
+ timer: 2000,
+ confirmButtonText: "OK"
+ });
+ }
+
+ // osvežimo tabelo, ko smo vpisali podatke
+ tabela.ajax.reload(null, false);
+ jstree_json_data(anketa_id, 1);
+ });
+
+}
+
+// datatables urejanje, brisanje
+function brisiVrsticoHierarhije(id, osveziTabelo) {
+
+ var osveziTabelo = osveziTabelo || 0;
+
+ $.post("ajax.php?anketa=" + anketa_id + "&t=hierarhija-ajax&a=brisi_element_v_hierarhiji", {
+ id: id
+ }, function (p) {
+ //Hierarhije je že zgrajena
+ if (p == 2) {
+ swal({
+ title: "Hierarhija je zaklenjena!",
+ text: "Brisanje ni več mogoče, ker je hierarhija zaklenjena za urejanje.",
+ type: "error",
+ timer: 2000,
+ confirmButtonText: "OK"
+ });
+ //ko javimo napako moramo jstree osvežiti, ker v nasprotnem primeru js še vedno izbriše omenjen element
+ jstree_json_data(anketa_id, 1);
+ }
+
+ //Hierarhije je že zgrajena
+ if (p == 'obstaja') {
+ swal({
+ title: "Brisanje ni mogoče!",
+ text: "Ne morete izbrisati omenjenega elementa, ker imate pod njem še izbrano hierarhijo.",
+ type: "error",
+ timer: 2000,
+ confirmButtonText: "OK"
+ });
+ //ko javimo napako moramo jstree osvežiti, ker v nasprotnem primeru js še vedno izbriše omenjen element
+ jstree_json_data(anketa_id, 1);
+ }
+
+
+ tabela.ajax.reload(null, false);
+ jstree_json_data(anketa_id, 1);
+
+ // celotno strukturo shranimo v string in srv_hierarhija_save
+ gradnjaHierarhijeApp.shraniUporabnikeNaHierarhijo();
+ });
+}
+
+
+//preverimo, če je obkljukano polje
+function preveriCheckDodajEmail() {
+ if ($("#dovoli-vpis-emaila").is(':checked')) {
+ $('#vpis-emaila').show();
+ }
+ else {
+ $('#vpis-emaila').val('').hide();
+ }
+}
+
+/**
+ * Opoyorimo v kolikor želi uporabni nadaljevati in ni shraniv emaila trenutnega uporabnika
+ */
+function opozoriUporabnikaKerNiPotrdilPodatkov(href) {
+ var level = gradnjaHierarhijeApp.podatki.maxLevel;
+
+ // V kolikor imamo uporabnika na zadnjem nivoju
+ if (typeof gradnjaHierarhijeApp.osebe.nove[level] === 'object') {
+ swal({
+ title: "Opozorilo!",
+ text: "Vnesli ste strukturo za dotičnega uporabnika, vendar omenjene podatke niste shranili. Ali jih želite izbrisati?",
+ type: "error",
+ showCancelButton: true,
+ confirmButtonText: "Nadaljuj",
+ cancelButtonText: "Prekliči"
+ }, function (dismiss) {
+
+ // V kolikor se uporabnik strinja,ga preusmerimo na naslednji korak
+ if (dismiss)
+ window.location.href = href;
+
+ });
+ } else {
+ window.location.href = href;
+ }
+
+}
+
+/**
+ * Shrani komentar k hierarhiji
+ */
+function shraniKomentar() {
+
+ var komentar = $('#hierarhija-komentar').val();
+ var id = $('#hierarhija-komentar').attr('data-id');
+
+ $.post("ajax.php?anketa=" + anketa_id + "&t=hierarhija-ajax&a=komentar-k-hierarhiji&m=post", {
+ id: id,
+ komentar: komentar
+ }).success(function (podatki) {
+ if (podatki == 1) {
+ // zapremo popup
+ $('#fade').fadeOut('slow');
+ $('#vrednost_edit').hide();
+ }
+ });
+}
+
+/**
+ * Predogled emaila za učitelje in managerje
+ *
+ * 1 - email za učitelje na zadnjem nivoju
+ * 2 - email za managerje na vseh ostalih nivojih
+ *
+ * @param int vrsta - za katero vrsta emaila gre
+ */
+function previewMail(vrsta) {
+
+ $('#fade').fadeTo('slow', 1);
+
+ $('#vrednost_edit').html('').fadeIn('slow').load('ajax.php?anketa=' + anketa_id + '&t=hierarhija-ajax&a=ostalo&m=preview-mail', {
+ vrsta: vrsta,
+ });
+}
+
+
+/************************************************
+ Hierarhija - jstree, bootstrap select
+ ************************************************/
+function jstree_json_data(anketa, refresh) {
+ $.ajax({
+ async: true,
+ type: "GET",
+ url: "ajax.php?anketa=" + anketa + "&t=hierarhija-ajax&a=json_jstree",
+ dataType: "json",
+ success: function (json) {
+ if (typeof refresh === 'undefined') {
+ jstree_vkljuci(json);
+ }
+ else {
+ //v kolikor imamo jsTree že postavljen samo osvežimo podatke
+ var $jstree = $('#admin_hierarhija_jstree').jstree(true);
+ $jstree.settings.core.data = json;
+ $jstree.refresh();
+ }
+ },
+ error: function (xhr, ajaxOptions, thrownError) {
+ console.log(thrownError);
+ }
+ });
+}
+
+function jstree_vkljuci(jsonData) {
+ $("#admin_hierarhija_jstree").jstree({
+ //'plugins': ['contextmenu', 'dnd', 'massload', 'sort', 'types'],
+ 'plugins': ['search', 'massload', 'contextmenu'],
+ 'contextmenu': {
+ "items": function ($node) {
+ return {
+ "Delete": {
+ "label": "Briši",
+ "action": function (data) {
+ var ref = $.jstree.reference(data.reference),
+ sel = ref.get_selected();
+ if (!sel.length) {
+ return false;
+ }
+ ref.delete_node(sel);
+
+ var url = window.location.href;
+ var par = url.match(/(?:anketa=)(\w+)/g);
+ var anketa_id = par[0].slice(7, par[0].length);
+
+ //pošljemo POST ukaz, da pobrišemo element
+ brisiVrsticoHierarhije($node.id);
+ }
+ },
+ //"Edit": {
+ // "label": "Urejanje uporabnika",
+ // 'action': function () {
+ //
+ //
+ // }
+ //}
+ }
+ }
+ },
+ 'core': {
+ "animation": 0,
+ "check_callback": true,
+ "expand_selected_onload": true,
+ "themes": {
+ "name": "proton",
+ "responsive": true
+ },
+ "data": jsonData,
+ },
+ //"types": {
+ // "#": {
+ // "max_children": 1,
+ // "max_depth": 20,
+ // "valid_children": ["root"]
+ // },
+ // "root": {
+ // "icon": "glyphicon glyphicon-home",
+ // "valid_children": ["default"]
+ // },
+ // "default": {
+ // "valid_children": ["default", "file"]
+ // },
+ // "file": {
+ // "icon": "glyphicon glyphicon-home",
+ // "valid_children": []
+ // }
+ //}
+ }).on('loaded.jstree', function () {
+ $("#admin_hierarhija_jstree").jstree('open_all');
+ }).bind("select_node.jstree", function (event, data) {
+ //V kolikor kliknemo na hierarhijo z levim miškinim klikom, potem v meniju select izberemo ustrezne vrednosti
+ // ko vrednost zberemo iz jstree je potrebno baziti, da preverimo, če je neznan event, ker v nasprotnem primeru submit sproži omenjeno skripto
+ if (event.isTrigger == 2 && (typeof data.event !== "undefined")) {
+ //Pošljemo id, kamor je bil izveden klik in nato prikažemo ustrezne select opcije
+ var url = window.location.href;
+ var par = url.match(/(?:anketa=)(\w+)/g);
+ var anketa_id = par[0].slice(7, par[0].length);
+
+ $.post("ajax.php?anketa=" + anketa_id + "&t=hierarhija-ajax&a=posodobi_sifrante", {
+ id: data.node.id
+ }).success(function (podatki) {
+ var sifrant = JSON.parse(podatki);
+ var st_naprej = 2;
+
+
+ // najprej je potrebno vsa polja skriti, da nato prikažemo samo potrebna
+ for (var st = 1; st <= sifrant.user.max_level; st++) {
+ $('.h-nivo-' + st).val('').trigger("liszt:updated"); //update chosen list -> v novejših verzijah je chosen:update
+ $('.h-level-' + st).removeClass('h-selected').hide();
+ }
+
+ //naredimo zanko po vseh nivojih
+ $.each(sifrant, function (key, val) {
+ //izluščimo samo številke,ker uporabnika ne potrebujemo
+ if ($.isNumeric(key)) {
+ $('.h-level-' + key).addClass('h-selected').show();
+ $('.h-nivo-' + key).val(val.select).chosen().trigger("liszt:updated");
+ }
+ });
+
+ // prikažemo še možnost vnos naslednjega elementa
+ var naslednjiSifrant = data.node.parents.length + 1;
+
+ // Če uporabnik ni admin, potem ime ŠOLE ne vnesemo v HIERARHIJO in zato nam prikaže en element premalo in je potrebno +1, da nam prikaže možnost vnosa tudi naslednjega elementa
+ if (sifrant.user.id_strukture != 'admin')
+ naslednjiSifrant += 1;
+
+ $('.h-level-' + naslednjiSifrant).addClass('h-selected').show();
+ $('.h-nivo-' + naslednjiSifrant).val('').chosen();
+
+
+ });
+
+ }
+ });
+
+}
+
+function dodajKomentar() {
+ $('#fade').fadeTo('slow', 1);
+ $('#vrednost_edit').wrapAll('<div class="fixed-position"></div>').html('').fadeIn('slow').load('ajax.php?anketa=' + anketa_id + '&t=hierarhija-ajax&a=komentar-k-hierarhiji&m=get');
+}
+
+/**
+ * Odpre popup za nalaganje logotipa
+ */
+function uploadLogo() {
+ $('#fade').fadeTo('slow', 1);
+ $('#vrednost_edit').wrapAll('<div class="fixed-position"></div>').html('').fadeIn('slow').load('ajax.php?anketa=' + anketa_id + '&t=hierarhija-ajax&a=upload-logo&m=get', function () {
+
+ //Vklopi nice input file
+ $("input[type=file]").nicefileinput({
+ label: 'Poišči datoteko...'
+ });
+
+ });
+}
+
+/**
+ * Izbriše logotip, ki je že naložen
+ * @param $id
+ */
+function izbrisiLogo($id) {
+ var id = $('form > input[name="id"]').val();
+
+ $.post('ajax.php?anketa=' + anketa_id + '&t=hierarhija-ajax&a=upload-logo&m=delete', {
+ id: id
+ }).success(function () {
+ $('#hierarhija-logo').remove();
+ });
+}
+/**************************** HIERARHIJA END ***************************/
+
+function printElement(ime) {
+ var divToPrint = $('.printElement');
+
+ if (ime == 'Status') {
+ var objekt = divToPrint.html();
+ divToPrint = '<table class="printTable" id="printHierarhijaStatus">' + objekt + '</table>';
+ } else if (ime == 'Analize') {
+ divToPrint = document.getElementById('div_means_data').innerHTML;
+ }
+
+ var newWin = window.open('', ime, 'scrollbars=1');
+
+ newWin.document.write('<html><head><title>Okno za tiskanje - ' + ime + '</title>');
+ newWin.document.write('<meta http-equiv="Cache-Control" content="no-store"/>');
+ newWin.document.write('<meta http-equiv="Pragma" content="no-cache"/>');
+ newWin.document.write('<meta http-equiv="Expires" content="0"/>');
+
+ newWin.document.write('<link rel="stylesheet" href="css/print.css#13042017">');
+ newWin.document.write('<link rel="stylesheet" href="css/style_print.css" media="print">');
+ newWin.document.write('</head><body class="print_analiza">');
+ newWin.document.write('<div id="printIcon">');
+ newWin.document.write('<a href="#" onclick="window.print(); return false;">Natisni</a>');
+ newWin.document.write('</div>');
+
+ newWin.document.write(divToPrint);
+ newWin.document.write('</body></html>');
+ newWin.focus();
+
+ newWin.document.close();
+
+}
+
+/**
+ * Posodobi nastavitve v bazi, za pošiljanje kod samo za učitelja ali tudi za vse
+ *
+ * @param string {vrednost}
+ */
+function posodobiPosiljanjeKod(vrednost, val) {
+ $.post('ajax.php?anketa=' + anketa_id + '&t=hierarhija-ajax&a=ostalo&m=opcije', {
+ name: vrednost,
+ value: val,
+ method: (val == 0 ? 'delete' : '')
+ }).success(function () {
+ $('#poslji-kode').val(vrednost);
+ });
+}
+
+/**
+ * POšlji obvestilo učiteljem, kateri še niso bili obveščeni
+ *
+ * @param {}
+ * @return
+ */
+function obvestiUciteljeZaResevanjeAnkete() {
+ $.post('ajax.php?anketa=' + anketa_id + '&t=hierarhija-ajax&a=ostalo&m=poslji-email-samo-uciteljem').success(function () {
+ $('#obvesti-samo-ucitelje').html('<span style="color:#fa4913;">Elektronsko sporočilo s kodo je bilo posredovano vsem učiteljem, ki so na zgornjem seznamu</span>');
+ });
+} \ No newline at end of file
diff --git a/admin/survey/modules/mod_hierarhija/js/vendor/datatables-slovenian.json b/admin/survey/modules/mod_hierarhija/js/vendor/datatables-slovenian.json
new file mode 100644
index 0000000..cf58f15
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/js/vendor/datatables-slovenian.json
@@ -0,0 +1,23 @@
+{
+ "sEmptyTable": "Nobenih podatkov ni na voljo",
+ "sInfo": "Prikazujem _START_ do _END_ od _TOTAL_ zapisov",
+ "sInfoEmpty": "Prikazujem 0 do 0 od 0 zapisov",
+ "sInfoFiltered": "(filtrirano od _MAX_ vseh zapisov)",
+ "sInfoPostFix": "",
+ "sInfoThousands": ",",
+ "sLengthMenu": "Prikaži _MENU_ zapisov",
+ "sLoadingRecords": "Nalagam...",
+ "sProcessing": "Obdelujem...",
+ "sSearch": "Išči:",
+ "sZeroRecords": "Nobeden zapis ne ustreza",
+ "oPaginate": {
+ "sFirst": "Prvi",
+ "sLast": "Zadnji",
+ "sNext": "Nasl.",
+ "sPrevious": "Pred."
+ },
+ "oAria": {
+ "sSortAscending": ": vključite za naraščujoči sort",
+ "sSortDescending": ": vključite za padajoči sort"
+ }
+} \ No newline at end of file
diff --git a/admin/survey/modules/mod_hierarhija/js/vendor/datatables.min.js b/admin/survey/modules/mod_hierarhija/js/vendor/datatables.min.js
new file mode 100644
index 0000000..8599449
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/js/vendor/datatables.min.js
@@ -0,0 +1,237 @@
+/*
+ * This combined file was created by the DataTables downloader builder:
+ * https://datatables.net/download
+ *
+ * To rebuild or modify this file with the latest versions of the included
+ * software please visit:
+ * https://datatables.net/download/#dt/dt-1.10.12,r-2.1.0,sc-1.4.2
+ *
+ * Included libraries:
+ * DataTables 1.10.12, Responsive 2.1.0, Scroller 1.4.2
+ */
+
+/*!
+ DataTables 1.10.12
+ ©2008-2015 SpryMedia Ltd - datatables.net/license
+*/
+(function(h){"function"===typeof define&&define.amd?define(["jquery"],function(D){return h(D,window,document)}):"object"===typeof exports?module.exports=function(D,I){D||(D=window);I||(I="undefined"!==typeof window?require("jquery"):require("jquery")(D));return h(I,D,D.document)}:h(jQuery,window,document)})(function(h,D,I,k){function X(a){var b,c,d={};h.each(a,function(e){if((b=e.match(/^([^A-Z]+?)([A-Z])/))&&-1!=="a aa ai ao as b fn i m o s ".indexOf(b[1]+" "))c=e.replace(b[0],b[2].toLowerCase()),
+d[c]=e,"o"===b[1]&&X(a[e])});a._hungarianMap=d}function K(a,b,c){a._hungarianMap||X(a);var d;h.each(b,function(e){d=a._hungarianMap[e];if(d!==k&&(c||b[d]===k))"o"===d.charAt(0)?(b[d]||(b[d]={}),h.extend(!0,b[d],b[e]),K(a[d],b[d],c)):b[d]=b[e]})}function Da(a){var b=m.defaults.oLanguage,c=a.sZeroRecords;!a.sEmptyTable&&(c&&"No data available in table"===b.sEmptyTable)&&E(a,a,"sZeroRecords","sEmptyTable");!a.sLoadingRecords&&(c&&"Loading..."===b.sLoadingRecords)&&E(a,a,"sZeroRecords","sLoadingRecords");
+a.sInfoThousands&&(a.sThousands=a.sInfoThousands);(a=a.sDecimal)&&db(a)}function eb(a){A(a,"ordering","bSort");A(a,"orderMulti","bSortMulti");A(a,"orderClasses","bSortClasses");A(a,"orderCellsTop","bSortCellsTop");A(a,"order","aaSorting");A(a,"orderFixed","aaSortingFixed");A(a,"paging","bPaginate");A(a,"pagingType","sPaginationType");A(a,"pageLength","iDisplayLength");A(a,"searching","bFilter");"boolean"===typeof a.sScrollX&&(a.sScrollX=a.sScrollX?"100%":"");"boolean"===typeof a.scrollX&&(a.scrollX=
+a.scrollX?"100%":"");if(a=a.aoSearchCols)for(var b=0,c=a.length;b<c;b++)a[b]&&K(m.models.oSearch,a[b])}function fb(a){A(a,"orderable","bSortable");A(a,"orderData","aDataSort");A(a,"orderSequence","asSorting");A(a,"orderDataType","sortDataType");var b=a.aDataSort;b&&!h.isArray(b)&&(a.aDataSort=[b])}function gb(a){if(!m.__browser){var b={};m.__browser=b;var c=h("<div/>").css({position:"fixed",top:0,left:0,height:1,width:1,overflow:"hidden"}).append(h("<div/>").css({position:"absolute",top:1,left:1,
+width:100,overflow:"scroll"}).append(h("<div/>").css({width:"100%",height:10}))).appendTo("body"),d=c.children(),e=d.children();b.barWidth=d[0].offsetWidth-d[0].clientWidth;b.bScrollOversize=100===e[0].offsetWidth&&100!==d[0].clientWidth;b.bScrollbarLeft=1!==Math.round(e.offset().left);b.bBounding=c[0].getBoundingClientRect().width?!0:!1;c.remove()}h.extend(a.oBrowser,m.__browser);a.oScroll.iBarWidth=m.__browser.barWidth}function hb(a,b,c,d,e,f){var g,j=!1;c!==k&&(g=c,j=!0);for(;d!==e;)a.hasOwnProperty(d)&&
+(g=j?b(g,a[d],d,a):a[d],j=!0,d+=f);return g}function Ea(a,b){var c=m.defaults.column,d=a.aoColumns.length,c=h.extend({},m.models.oColumn,c,{nTh:b?b:I.createElement("th"),sTitle:c.sTitle?c.sTitle:b?b.innerHTML:"",aDataSort:c.aDataSort?c.aDataSort:[d],mData:c.mData?c.mData:d,idx:d});a.aoColumns.push(c);c=a.aoPreSearchCols;c[d]=h.extend({},m.models.oSearch,c[d]);ja(a,d,h(b).data())}function ja(a,b,c){var b=a.aoColumns[b],d=a.oClasses,e=h(b.nTh);if(!b.sWidthOrig){b.sWidthOrig=e.attr("width")||null;var f=
+(e.attr("style")||"").match(/width:\s*(\d+[pxem%]+)/);f&&(b.sWidthOrig=f[1])}c!==k&&null!==c&&(fb(c),K(m.defaults.column,c),c.mDataProp!==k&&!c.mData&&(c.mData=c.mDataProp),c.sType&&(b._sManualType=c.sType),c.className&&!c.sClass&&(c.sClass=c.className),h.extend(b,c),E(b,c,"sWidth","sWidthOrig"),c.iDataSort!==k&&(b.aDataSort=[c.iDataSort]),E(b,c,"aDataSort"));var g=b.mData,j=Q(g),i=b.mRender?Q(b.mRender):null,c=function(a){return"string"===typeof a&&-1!==a.indexOf("@")};b._bAttrSrc=h.isPlainObject(g)&&
+(c(g.sort)||c(g.type)||c(g.filter));b._setter=null;b.fnGetData=function(a,b,c){var d=j(a,b,k,c);return i&&b?i(d,b,a,c):d};b.fnSetData=function(a,b,c){return R(g)(a,b,c)};"number"!==typeof g&&(a._rowReadObject=!0);a.oFeatures.bSort||(b.bSortable=!1,e.addClass(d.sSortableNone));a=-1!==h.inArray("asc",b.asSorting);c=-1!==h.inArray("desc",b.asSorting);!b.bSortable||!a&&!c?(b.sSortingClass=d.sSortableNone,b.sSortingClassJUI=""):a&&!c?(b.sSortingClass=d.sSortableAsc,b.sSortingClassJUI=d.sSortJUIAscAllowed):
+!a&&c?(b.sSortingClass=d.sSortableDesc,b.sSortingClassJUI=d.sSortJUIDescAllowed):(b.sSortingClass=d.sSortable,b.sSortingClassJUI=d.sSortJUI)}function Y(a){if(!1!==a.oFeatures.bAutoWidth){var b=a.aoColumns;Fa(a);for(var c=0,d=b.length;c<d;c++)b[c].nTh.style.width=b[c].sWidth}b=a.oScroll;(""!==b.sY||""!==b.sX)&&ka(a);u(a,null,"column-sizing",[a])}function Z(a,b){var c=la(a,"bVisible");return"number"===typeof c[b]?c[b]:null}function $(a,b){var c=la(a,"bVisible"),c=h.inArray(b,c);return-1!==c?c:null}
+function aa(a){var b=0;h.each(a.aoColumns,function(a,d){d.bVisible&&"none"!==h(d.nTh).css("display")&&b++});return b}function la(a,b){var c=[];h.map(a.aoColumns,function(a,e){a[b]&&c.push(e)});return c}function Ga(a){var b=a.aoColumns,c=a.aoData,d=m.ext.type.detect,e,f,g,j,i,h,l,q,t;e=0;for(f=b.length;e<f;e++)if(l=b[e],t=[],!l.sType&&l._sManualType)l.sType=l._sManualType;else if(!l.sType){g=0;for(j=d.length;g<j;g++){i=0;for(h=c.length;i<h;i++){t[i]===k&&(t[i]=B(a,i,e,"type"));q=d[g](t[i],a);if(!q&&
+g!==d.length-1)break;if("html"===q)break}if(q){l.sType=q;break}}l.sType||(l.sType="string")}}function ib(a,b,c,d){var e,f,g,j,i,n,l=a.aoColumns;if(b)for(e=b.length-1;0<=e;e--){n=b[e];var q=n.targets!==k?n.targets:n.aTargets;h.isArray(q)||(q=[q]);f=0;for(g=q.length;f<g;f++)if("number"===typeof q[f]&&0<=q[f]){for(;l.length<=q[f];)Ea(a);d(q[f],n)}else if("number"===typeof q[f]&&0>q[f])d(l.length+q[f],n);else if("string"===typeof q[f]){j=0;for(i=l.length;j<i;j++)("_all"==q[f]||h(l[j].nTh).hasClass(q[f]))&&
+d(j,n)}}if(c){e=0;for(a=c.length;e<a;e++)d(e,c[e])}}function N(a,b,c,d){var e=a.aoData.length,f=h.extend(!0,{},m.models.oRow,{src:c?"dom":"data",idx:e});f._aData=b;a.aoData.push(f);for(var g=a.aoColumns,j=0,i=g.length;j<i;j++)g[j].sType=null;a.aiDisplayMaster.push(e);b=a.rowIdFn(b);b!==k&&(a.aIds[b]=f);(c||!a.oFeatures.bDeferRender)&&Ha(a,e,c,d);return e}function ma(a,b){var c;b instanceof h||(b=h(b));return b.map(function(b,e){c=Ia(a,e);return N(a,c.data,e,c.cells)})}function B(a,b,c,d){var e=a.iDraw,
+f=a.aoColumns[c],g=a.aoData[b]._aData,j=f.sDefaultContent,i=f.fnGetData(g,d,{settings:a,row:b,col:c});if(i===k)return a.iDrawError!=e&&null===j&&(L(a,0,"Requested unknown parameter "+("function"==typeof f.mData?"{function}":"'"+f.mData+"'")+" for row "+b+", column "+c,4),a.iDrawError=e),j;if((i===g||null===i)&&null!==j&&d!==k)i=j;else if("function"===typeof i)return i.call(g);return null===i&&"display"==d?"":i}function jb(a,b,c,d){a.aoColumns[c].fnSetData(a.aoData[b]._aData,d,{settings:a,row:b,col:c})}
+function Ja(a){return h.map(a.match(/(\\.|[^\.])+/g)||[""],function(a){return a.replace(/\\./g,".")})}function Q(a){if(h.isPlainObject(a)){var b={};h.each(a,function(a,c){c&&(b[a]=Q(c))});return function(a,c,f,g){var j=b[c]||b._;return j!==k?j(a,c,f,g):a}}if(null===a)return function(a){return a};if("function"===typeof a)return function(b,c,f,g){return a(b,c,f,g)};if("string"===typeof a&&(-1!==a.indexOf(".")||-1!==a.indexOf("[")||-1!==a.indexOf("("))){var c=function(a,b,f){var g,j;if(""!==f){j=Ja(f);
+for(var i=0,n=j.length;i<n;i++){f=j[i].match(ba);g=j[i].match(U);if(f){j[i]=j[i].replace(ba,"");""!==j[i]&&(a=a[j[i]]);g=[];j.splice(0,i+1);j=j.join(".");if(h.isArray(a)){i=0;for(n=a.length;i<n;i++)g.push(c(a[i],b,j))}a=f[0].substring(1,f[0].length-1);a=""===a?g:g.join(a);break}else if(g){j[i]=j[i].replace(U,"");a=a[j[i]]();continue}if(null===a||a[j[i]]===k)return k;a=a[j[i]]}}return a};return function(b,e){return c(b,e,a)}}return function(b){return b[a]}}function R(a){if(h.isPlainObject(a))return R(a._);
+if(null===a)return function(){};if("function"===typeof a)return function(b,d,e){a(b,"set",d,e)};if("string"===typeof a&&(-1!==a.indexOf(".")||-1!==a.indexOf("[")||-1!==a.indexOf("("))){var b=function(a,d,e){var e=Ja(e),f;f=e[e.length-1];for(var g,j,i=0,n=e.length-1;i<n;i++){g=e[i].match(ba);j=e[i].match(U);if(g){e[i]=e[i].replace(ba,"");a[e[i]]=[];f=e.slice();f.splice(0,i+1);g=f.join(".");if(h.isArray(d)){j=0;for(n=d.length;j<n;j++)f={},b(f,d[j],g),a[e[i]].push(f)}else a[e[i]]=d;return}j&&(e[i]=e[i].replace(U,
+""),a=a[e[i]](d));if(null===a[e[i]]||a[e[i]]===k)a[e[i]]={};a=a[e[i]]}if(f.match(U))a[f.replace(U,"")](d);else a[f.replace(ba,"")]=d};return function(c,d){return b(c,d,a)}}return function(b,d){b[a]=d}}function Ka(a){return G(a.aoData,"_aData")}function na(a){a.aoData.length=0;a.aiDisplayMaster.length=0;a.aiDisplay.length=0;a.aIds={}}function oa(a,b,c){for(var d=-1,e=0,f=a.length;e<f;e++)a[e]==b?d=e:a[e]>b&&a[e]--; -1!=d&&c===k&&a.splice(d,1)}function ca(a,b,c,d){var e=a.aoData[b],f,g=function(c,d){for(;c.childNodes.length;)c.removeChild(c.firstChild);
+c.innerHTML=B(a,b,d,"display")};if("dom"===c||(!c||"auto"===c)&&"dom"===e.src)e._aData=Ia(a,e,d,d===k?k:e._aData).data;else{var j=e.anCells;if(j)if(d!==k)g(j[d],d);else{c=0;for(f=j.length;c<f;c++)g(j[c],c)}}e._aSortData=null;e._aFilterData=null;g=a.aoColumns;if(d!==k)g[d].sType=null;else{c=0;for(f=g.length;c<f;c++)g[c].sType=null;La(a,e)}}function Ia(a,b,c,d){var e=[],f=b.firstChild,g,j,i=0,n,l=a.aoColumns,q=a._rowReadObject,d=d!==k?d:q?{}:[],t=function(a,b){if("string"===typeof a){var c=a.indexOf("@");
+-1!==c&&(c=a.substring(c+1),R(a)(d,b.getAttribute(c)))}},S=function(a){if(c===k||c===i)j=l[i],n=h.trim(a.innerHTML),j&&j._bAttrSrc?(R(j.mData._)(d,n),t(j.mData.sort,a),t(j.mData.type,a),t(j.mData.filter,a)):q?(j._setter||(j._setter=R(j.mData)),j._setter(d,n)):d[i]=n;i++};if(f)for(;f;){g=f.nodeName.toUpperCase();if("TD"==g||"TH"==g)S(f),e.push(f);f=f.nextSibling}else{e=b.anCells;f=0;for(g=e.length;f<g;f++)S(e[f])}if(b=b.firstChild?b:b.nTr)(b=b.getAttribute("id"))&&R(a.rowId)(d,b);return{data:d,cells:e}}
+function Ha(a,b,c,d){var e=a.aoData[b],f=e._aData,g=[],j,i,n,l,q;if(null===e.nTr){j=c||I.createElement("tr");e.nTr=j;e.anCells=g;j._DT_RowIndex=b;La(a,e);l=0;for(q=a.aoColumns.length;l<q;l++){n=a.aoColumns[l];i=c?d[l]:I.createElement(n.sCellType);i._DT_CellIndex={row:b,column:l};g.push(i);if((!c||n.mRender||n.mData!==l)&&(!h.isPlainObject(n.mData)||n.mData._!==l+".display"))i.innerHTML=B(a,b,l,"display");n.sClass&&(i.className+=" "+n.sClass);n.bVisible&&!c?j.appendChild(i):!n.bVisible&&c&&i.parentNode.removeChild(i);
+n.fnCreatedCell&&n.fnCreatedCell.call(a.oInstance,i,B(a,b,l),f,b,l)}u(a,"aoRowCreatedCallback",null,[j,f,b])}e.nTr.setAttribute("role","row")}function La(a,b){var c=b.nTr,d=b._aData;if(c){var e=a.rowIdFn(d);e&&(c.id=e);d.DT_RowClass&&(e=d.DT_RowClass.split(" "),b.__rowc=b.__rowc?pa(b.__rowc.concat(e)):e,h(c).removeClass(b.__rowc.join(" ")).addClass(d.DT_RowClass));d.DT_RowAttr&&h(c).attr(d.DT_RowAttr);d.DT_RowData&&h(c).data(d.DT_RowData)}}function kb(a){var b,c,d,e,f,g=a.nTHead,j=a.nTFoot,i=0===
+h("th, td",g).length,n=a.oClasses,l=a.aoColumns;i&&(e=h("<tr/>").appendTo(g));b=0;for(c=l.length;b<c;b++)f=l[b],d=h(f.nTh).addClass(f.sClass),i&&d.appendTo(e),a.oFeatures.bSort&&(d.addClass(f.sSortingClass),!1!==f.bSortable&&(d.attr("tabindex",a.iTabIndex).attr("aria-controls",a.sTableId),Ma(a,f.nTh,b))),f.sTitle!=d[0].innerHTML&&d.html(f.sTitle),Na(a,"header")(a,d,f,n);i&&da(a.aoHeader,g);h(g).find(">tr").attr("role","row");h(g).find(">tr>th, >tr>td").addClass(n.sHeaderTH);h(j).find(">tr>th, >tr>td").addClass(n.sFooterTH);
+if(null!==j){a=a.aoFooter[0];b=0;for(c=a.length;b<c;b++)f=l[b],f.nTf=a[b].cell,f.sClass&&h(f.nTf).addClass(f.sClass)}}function ea(a,b,c){var d,e,f,g=[],j=[],i=a.aoColumns.length,n;if(b){c===k&&(c=!1);d=0;for(e=b.length;d<e;d++){g[d]=b[d].slice();g[d].nTr=b[d].nTr;for(f=i-1;0<=f;f--)!a.aoColumns[f].bVisible&&!c&&g[d].splice(f,1);j.push([])}d=0;for(e=g.length;d<e;d++){if(a=g[d].nTr)for(;f=a.firstChild;)a.removeChild(f);f=0;for(b=g[d].length;f<b;f++)if(n=i=1,j[d][f]===k){a.appendChild(g[d][f].cell);
+for(j[d][f]=1;g[d+i]!==k&&g[d][f].cell==g[d+i][f].cell;)j[d+i][f]=1,i++;for(;g[d][f+n]!==k&&g[d][f].cell==g[d][f+n].cell;){for(c=0;c<i;c++)j[d+c][f+n]=1;n++}h(g[d][f].cell).attr("rowspan",i).attr("colspan",n)}}}}function O(a){var b=u(a,"aoPreDrawCallback","preDraw",[a]);if(-1!==h.inArray(!1,b))C(a,!1);else{var b=[],c=0,d=a.asStripeClasses,e=d.length,f=a.oLanguage,g=a.iInitDisplayStart,j="ssp"==y(a),i=a.aiDisplay;a.bDrawing=!0;g!==k&&-1!==g&&(a._iDisplayStart=j?g:g>=a.fnRecordsDisplay()?0:g,a.iInitDisplayStart=
+-1);var g=a._iDisplayStart,n=a.fnDisplayEnd();if(a.bDeferLoading)a.bDeferLoading=!1,a.iDraw++,C(a,!1);else if(j){if(!a.bDestroying&&!lb(a))return}else a.iDraw++;if(0!==i.length){f=j?a.aoData.length:n;for(j=j?0:g;j<f;j++){var l=i[j],q=a.aoData[l];null===q.nTr&&Ha(a,l);l=q.nTr;if(0!==e){var t=d[c%e];q._sRowStripe!=t&&(h(l).removeClass(q._sRowStripe).addClass(t),q._sRowStripe=t)}u(a,"aoRowCallback",null,[l,q._aData,c,j]);b.push(l);c++}}else c=f.sZeroRecords,1==a.iDraw&&"ajax"==y(a)?c=f.sLoadingRecords:
+f.sEmptyTable&&0===a.fnRecordsTotal()&&(c=f.sEmptyTable),b[0]=h("<tr/>",{"class":e?d[0]:""}).append(h("<td />",{valign:"top",colSpan:aa(a),"class":a.oClasses.sRowEmpty}).html(c))[0];u(a,"aoHeaderCallback","header",[h(a.nTHead).children("tr")[0],Ka(a),g,n,i]);u(a,"aoFooterCallback","footer",[h(a.nTFoot).children("tr")[0],Ka(a),g,n,i]);d=h(a.nTBody);d.children().detach();d.append(h(b));u(a,"aoDrawCallback","draw",[a]);a.bSorted=!1;a.bFiltered=!1;a.bDrawing=!1}}function T(a,b){var c=a.oFeatures,d=c.bFilter;
+c.bSort&&mb(a);d?fa(a,a.oPreviousSearch):a.aiDisplay=a.aiDisplayMaster.slice();!0!==b&&(a._iDisplayStart=0);a._drawHold=b;O(a);a._drawHold=!1}function nb(a){var b=a.oClasses,c=h(a.nTable),c=h("<div/>").insertBefore(c),d=a.oFeatures,e=h("<div/>",{id:a.sTableId+"_wrapper","class":b.sWrapper+(a.nTFoot?"":" "+b.sNoFooter)});a.nHolding=c[0];a.nTableWrapper=e[0];a.nTableReinsertBefore=a.nTable.nextSibling;for(var f=a.sDom.split(""),g,j,i,n,l,q,t=0;t<f.length;t++){g=null;j=f[t];if("<"==j){i=h("<div/>")[0];
+n=f[t+1];if("'"==n||'"'==n){l="";for(q=2;f[t+q]!=n;)l+=f[t+q],q++;"H"==l?l=b.sJUIHeader:"F"==l&&(l=b.sJUIFooter);-1!=l.indexOf(".")?(n=l.split("."),i.id=n[0].substr(1,n[0].length-1),i.className=n[1]):"#"==l.charAt(0)?i.id=l.substr(1,l.length-1):i.className=l;t+=q}e.append(i);e=h(i)}else if(">"==j)e=e.parent();else if("l"==j&&d.bPaginate&&d.bLengthChange)g=ob(a);else if("f"==j&&d.bFilter)g=pb(a);else if("r"==j&&d.bProcessing)g=qb(a);else if("t"==j)g=rb(a);else if("i"==j&&d.bInfo)g=sb(a);else if("p"==
+j&&d.bPaginate)g=tb(a);else if(0!==m.ext.feature.length){i=m.ext.feature;q=0;for(n=i.length;q<n;q++)if(j==i[q].cFeature){g=i[q].fnInit(a);break}}g&&(i=a.aanFeatures,i[j]||(i[j]=[]),i[j].push(g),e.append(g))}c.replaceWith(e);a.nHolding=null}function da(a,b){var c=h(b).children("tr"),d,e,f,g,j,i,n,l,q,t;a.splice(0,a.length);f=0;for(i=c.length;f<i;f++)a.push([]);f=0;for(i=c.length;f<i;f++){d=c[f];for(e=d.firstChild;e;){if("TD"==e.nodeName.toUpperCase()||"TH"==e.nodeName.toUpperCase()){l=1*e.getAttribute("colspan");
+q=1*e.getAttribute("rowspan");l=!l||0===l||1===l?1:l;q=!q||0===q||1===q?1:q;g=0;for(j=a[f];j[g];)g++;n=g;t=1===l?!0:!1;for(j=0;j<l;j++)for(g=0;g<q;g++)a[f+g][n+j]={cell:e,unique:t},a[f+g].nTr=d}e=e.nextSibling}}}function qa(a,b,c){var d=[];c||(c=a.aoHeader,b&&(c=[],da(c,b)));for(var b=0,e=c.length;b<e;b++)for(var f=0,g=c[b].length;f<g;f++)if(c[b][f].unique&&(!d[f]||!a.bSortCellsTop))d[f]=c[b][f].cell;return d}function ra(a,b,c){u(a,"aoServerParams","serverParams",[b]);if(b&&h.isArray(b)){var d={},
+e=/(.*?)\[\]$/;h.each(b,function(a,b){var c=b.name.match(e);c?(c=c[0],d[c]||(d[c]=[]),d[c].push(b.value)):d[b.name]=b.value});b=d}var f,g=a.ajax,j=a.oInstance,i=function(b){u(a,null,"xhr",[a,b,a.jqXHR]);c(b)};if(h.isPlainObject(g)&&g.data){f=g.data;var n=h.isFunction(f)?f(b,a):f,b=h.isFunction(f)&&n?n:h.extend(!0,b,n);delete g.data}n={data:b,success:function(b){var c=b.error||b.sError;c&&L(a,0,c);a.json=b;i(b)},dataType:"json",cache:!1,type:a.sServerMethod,error:function(b,c){var d=u(a,null,"xhr",
+[a,null,a.jqXHR]);-1===h.inArray(!0,d)&&("parsererror"==c?L(a,0,"Invalid JSON response",1):4===b.readyState&&L(a,0,"Ajax error",7));C(a,!1)}};a.oAjaxData=b;u(a,null,"preXhr",[a,b]);a.fnServerData?a.fnServerData.call(j,a.sAjaxSource,h.map(b,function(a,b){return{name:b,value:a}}),i,a):a.sAjaxSource||"string"===typeof g?a.jqXHR=h.ajax(h.extend(n,{url:g||a.sAjaxSource})):h.isFunction(g)?a.jqXHR=g.call(j,b,i,a):(a.jqXHR=h.ajax(h.extend(n,g)),g.data=f)}function lb(a){return a.bAjaxDataGet?(a.iDraw++,C(a,
+!0),ra(a,ub(a),function(b){vb(a,b)}),!1):!0}function ub(a){var b=a.aoColumns,c=b.length,d=a.oFeatures,e=a.oPreviousSearch,f=a.aoPreSearchCols,g,j=[],i,n,l,q=V(a);g=a._iDisplayStart;i=!1!==d.bPaginate?a._iDisplayLength:-1;var k=function(a,b){j.push({name:a,value:b})};k("sEcho",a.iDraw);k("iColumns",c);k("sColumns",G(b,"sName").join(","));k("iDisplayStart",g);k("iDisplayLength",i);var S={draw:a.iDraw,columns:[],order:[],start:g,length:i,search:{value:e.sSearch,regex:e.bRegex}};for(g=0;g<c;g++)n=b[g],
+l=f[g],i="function"==typeof n.mData?"function":n.mData,S.columns.push({data:i,name:n.sName,searchable:n.bSearchable,orderable:n.bSortable,search:{value:l.sSearch,regex:l.bRegex}}),k("mDataProp_"+g,i),d.bFilter&&(k("sSearch_"+g,l.sSearch),k("bRegex_"+g,l.bRegex),k("bSearchable_"+g,n.bSearchable)),d.bSort&&k("bSortable_"+g,n.bSortable);d.bFilter&&(k("sSearch",e.sSearch),k("bRegex",e.bRegex));d.bSort&&(h.each(q,function(a,b){S.order.push({column:b.col,dir:b.dir});k("iSortCol_"+a,b.col);k("sSortDir_"+
+a,b.dir)}),k("iSortingCols",q.length));b=m.ext.legacy.ajax;return null===b?a.sAjaxSource?j:S:b?j:S}function vb(a,b){var c=sa(a,b),d=b.sEcho!==k?b.sEcho:b.draw,e=b.iTotalRecords!==k?b.iTotalRecords:b.recordsTotal,f=b.iTotalDisplayRecords!==k?b.iTotalDisplayRecords:b.recordsFiltered;if(d){if(1*d<a.iDraw)return;a.iDraw=1*d}na(a);a._iRecordsTotal=parseInt(e,10);a._iRecordsDisplay=parseInt(f,10);d=0;for(e=c.length;d<e;d++)N(a,c[d]);a.aiDisplay=a.aiDisplayMaster.slice();a.bAjaxDataGet=!1;O(a);a._bInitComplete||
+ta(a,b);a.bAjaxDataGet=!0;C(a,!1)}function sa(a,b){var c=h.isPlainObject(a.ajax)&&a.ajax.dataSrc!==k?a.ajax.dataSrc:a.sAjaxDataProp;return"data"===c?b.aaData||b[c]:""!==c?Q(c)(b):b}function pb(a){var b=a.oClasses,c=a.sTableId,d=a.oLanguage,e=a.oPreviousSearch,f=a.aanFeatures,g='<input type="search" class="'+b.sFilterInput+'"/>',j=d.sSearch,j=j.match(/_INPUT_/)?j.replace("_INPUT_",g):j+g,b=h("<div/>",{id:!f.f?c+"_filter":null,"class":b.sFilter}).append(h("<label/>").append(j)),f=function(){var b=!this.value?
+"":this.value;b!=e.sSearch&&(fa(a,{sSearch:b,bRegex:e.bRegex,bSmart:e.bSmart,bCaseInsensitive:e.bCaseInsensitive}),a._iDisplayStart=0,O(a))},g=null!==a.searchDelay?a.searchDelay:"ssp"===y(a)?400:0,i=h("input",b).val(e.sSearch).attr("placeholder",d.sSearchPlaceholder).bind("keyup.DT search.DT input.DT paste.DT cut.DT",g?Oa(f,g):f).bind("keypress.DT",function(a){if(13==a.keyCode)return!1}).attr("aria-controls",c);h(a.nTable).on("search.dt.DT",function(b,c){if(a===c)try{i[0]!==I.activeElement&&i.val(e.sSearch)}catch(d){}});
+return b[0]}function fa(a,b,c){var d=a.oPreviousSearch,e=a.aoPreSearchCols,f=function(a){d.sSearch=a.sSearch;d.bRegex=a.bRegex;d.bSmart=a.bSmart;d.bCaseInsensitive=a.bCaseInsensitive};Ga(a);if("ssp"!=y(a)){wb(a,b.sSearch,c,b.bEscapeRegex!==k?!b.bEscapeRegex:b.bRegex,b.bSmart,b.bCaseInsensitive);f(b);for(b=0;b<e.length;b++)xb(a,e[b].sSearch,b,e[b].bEscapeRegex!==k?!e[b].bEscapeRegex:e[b].bRegex,e[b].bSmart,e[b].bCaseInsensitive);yb(a)}else f(b);a.bFiltered=!0;u(a,null,"search",[a])}function yb(a){for(var b=
+m.ext.search,c=a.aiDisplay,d,e,f=0,g=b.length;f<g;f++){for(var j=[],i=0,n=c.length;i<n;i++)e=c[i],d=a.aoData[e],b[f](a,d._aFilterData,e,d._aData,i)&&j.push(e);c.length=0;h.merge(c,j)}}function xb(a,b,c,d,e,f){if(""!==b)for(var g=a.aiDisplay,d=Pa(b,d,e,f),e=g.length-1;0<=e;e--)b=a.aoData[g[e]]._aFilterData[c],d.test(b)||g.splice(e,1)}function wb(a,b,c,d,e,f){var d=Pa(b,d,e,f),e=a.oPreviousSearch.sSearch,f=a.aiDisplayMaster,g;0!==m.ext.search.length&&(c=!0);g=zb(a);if(0>=b.length)a.aiDisplay=f.slice();
+else{if(g||c||e.length>b.length||0!==b.indexOf(e)||a.bSorted)a.aiDisplay=f.slice();b=a.aiDisplay;for(c=b.length-1;0<=c;c--)d.test(a.aoData[b[c]]._sFilterRow)||b.splice(c,1)}}function Pa(a,b,c,d){a=b?a:Qa(a);c&&(a="^(?=.*?"+h.map(a.match(/"[^"]+"|[^ ]+/g)||[""],function(a){if('"'===a.charAt(0))var b=a.match(/^"(.*)"$/),a=b?b[1]:a;return a.replace('"',"")}).join(")(?=.*?")+").*$");return RegExp(a,d?"i":"")}function zb(a){var b=a.aoColumns,c,d,e,f,g,j,i,h,l=m.ext.type.search;c=!1;d=0;for(f=a.aoData.length;d<
+f;d++)if(h=a.aoData[d],!h._aFilterData){j=[];e=0;for(g=b.length;e<g;e++)c=b[e],c.bSearchable?(i=B(a,d,e,"filter"),l[c.sType]&&(i=l[c.sType](i)),null===i&&(i=""),"string"!==typeof i&&i.toString&&(i=i.toString())):i="",i.indexOf&&-1!==i.indexOf("&")&&(ua.innerHTML=i,i=Zb?ua.textContent:ua.innerText),i.replace&&(i=i.replace(/[\r\n]/g,"")),j.push(i);h._aFilterData=j;h._sFilterRow=j.join(" ");c=!0}return c}function Ab(a){return{search:a.sSearch,smart:a.bSmart,regex:a.bRegex,caseInsensitive:a.bCaseInsensitive}}
+function Bb(a){return{sSearch:a.search,bSmart:a.smart,bRegex:a.regex,bCaseInsensitive:a.caseInsensitive}}function sb(a){var b=a.sTableId,c=a.aanFeatures.i,d=h("<div/>",{"class":a.oClasses.sInfo,id:!c?b+"_info":null});c||(a.aoDrawCallback.push({fn:Cb,sName:"information"}),d.attr("role","status").attr("aria-live","polite"),h(a.nTable).attr("aria-describedby",b+"_info"));return d[0]}function Cb(a){var b=a.aanFeatures.i;if(0!==b.length){var c=a.oLanguage,d=a._iDisplayStart+1,e=a.fnDisplayEnd(),f=a.fnRecordsTotal(),
+g=a.fnRecordsDisplay(),j=g?c.sInfo:c.sInfoEmpty;g!==f&&(j+=" "+c.sInfoFiltered);j+=c.sInfoPostFix;j=Db(a,j);c=c.fnInfoCallback;null!==c&&(j=c.call(a.oInstance,a,d,e,f,g,j));h(b).html(j)}}function Db(a,b){var c=a.fnFormatNumber,d=a._iDisplayStart+1,e=a._iDisplayLength,f=a.fnRecordsDisplay(),g=-1===e;return b.replace(/_START_/g,c.call(a,d)).replace(/_END_/g,c.call(a,a.fnDisplayEnd())).replace(/_MAX_/g,c.call(a,a.fnRecordsTotal())).replace(/_TOTAL_/g,c.call(a,f)).replace(/_PAGE_/g,c.call(a,g?1:Math.ceil(d/
+e))).replace(/_PAGES_/g,c.call(a,g?1:Math.ceil(f/e)))}function ga(a){var b,c,d=a.iInitDisplayStart,e=a.aoColumns,f;c=a.oFeatures;var g=a.bDeferLoading;if(a.bInitialised){nb(a);kb(a);ea(a,a.aoHeader);ea(a,a.aoFooter);C(a,!0);c.bAutoWidth&&Fa(a);b=0;for(c=e.length;b<c;b++)f=e[b],f.sWidth&&(f.nTh.style.width=x(f.sWidth));u(a,null,"preInit",[a]);T(a);e=y(a);if("ssp"!=e||g)"ajax"==e?ra(a,[],function(c){var f=sa(a,c);for(b=0;b<f.length;b++)N(a,f[b]);a.iInitDisplayStart=d;T(a);C(a,!1);ta(a,c)},a):(C(a,!1),
+ta(a))}else setTimeout(function(){ga(a)},200)}function ta(a,b){a._bInitComplete=!0;(b||a.oInit.aaData)&&Y(a);u(a,null,"plugin-init",[a,b]);u(a,"aoInitComplete","init",[a,b])}function Ra(a,b){var c=parseInt(b,10);a._iDisplayLength=c;Sa(a);u(a,null,"length",[a,c])}function ob(a){for(var b=a.oClasses,c=a.sTableId,d=a.aLengthMenu,e=h.isArray(d[0]),f=e?d[0]:d,d=e?d[1]:d,e=h("<select/>",{name:c+"_length","aria-controls":c,"class":b.sLengthSelect}),g=0,j=f.length;g<j;g++)e[0][g]=new Option(d[g],f[g]);var i=
+h("<div><label/></div>").addClass(b.sLength);a.aanFeatures.l||(i[0].id=c+"_length");i.children().append(a.oLanguage.sLengthMenu.replace("_MENU_",e[0].outerHTML));h("select",i).val(a._iDisplayLength).bind("change.DT",function(){Ra(a,h(this).val());O(a)});h(a.nTable).bind("length.dt.DT",function(b,c,d){a===c&&h("select",i).val(d)});return i[0]}function tb(a){var b=a.sPaginationType,c=m.ext.pager[b],d="function"===typeof c,e=function(a){O(a)},b=h("<div/>").addClass(a.oClasses.sPaging+b)[0],f=a.aanFeatures;
+d||c.fnInit(a,b,e);f.p||(b.id=a.sTableId+"_paginate",a.aoDrawCallback.push({fn:function(a){if(d){var b=a._iDisplayStart,i=a._iDisplayLength,h=a.fnRecordsDisplay(),l=-1===i,b=l?0:Math.ceil(b/i),i=l?1:Math.ceil(h/i),h=c(b,i),k,l=0;for(k=f.p.length;l<k;l++)Na(a,"pageButton")(a,f.p[l],l,h,b,i)}else c.fnUpdate(a,e)},sName:"pagination"}));return b}function Ta(a,b,c){var d=a._iDisplayStart,e=a._iDisplayLength,f=a.fnRecordsDisplay();0===f||-1===e?d=0:"number"===typeof b?(d=b*e,d>f&&(d=0)):"first"==b?d=0:
+"previous"==b?(d=0<=e?d-e:0,0>d&&(d=0)):"next"==b?d+e<f&&(d+=e):"last"==b?d=Math.floor((f-1)/e)*e:L(a,0,"Unknown paging action: "+b,5);b=a._iDisplayStart!==d;a._iDisplayStart=d;b&&(u(a,null,"page",[a]),c&&O(a));return b}function qb(a){return h("<div/>",{id:!a.aanFeatures.r?a.sTableId+"_processing":null,"class":a.oClasses.sProcessing}).html(a.oLanguage.sProcessing).insertBefore(a.nTable)[0]}function C(a,b){a.oFeatures.bProcessing&&h(a.aanFeatures.r).css("display",b?"block":"none");u(a,null,"processing",
+[a,b])}function rb(a){var b=h(a.nTable);b.attr("role","grid");var c=a.oScroll;if(""===c.sX&&""===c.sY)return a.nTable;var d=c.sX,e=c.sY,f=a.oClasses,g=b.children("caption"),j=g.length?g[0]._captionSide:null,i=h(b[0].cloneNode(!1)),n=h(b[0].cloneNode(!1)),l=b.children("tfoot");l.length||(l=null);i=h("<div/>",{"class":f.sScrollWrapper}).append(h("<div/>",{"class":f.sScrollHead}).css({overflow:"hidden",position:"relative",border:0,width:d?!d?null:x(d):"100%"}).append(h("<div/>",{"class":f.sScrollHeadInner}).css({"box-sizing":"content-box",
+width:c.sXInner||"100%"}).append(i.removeAttr("id").css("margin-left",0).append("top"===j?g:null).append(b.children("thead"))))).append(h("<div/>",{"class":f.sScrollBody}).css({position:"relative",overflow:"auto",width:!d?null:x(d)}).append(b));l&&i.append(h("<div/>",{"class":f.sScrollFoot}).css({overflow:"hidden",border:0,width:d?!d?null:x(d):"100%"}).append(h("<div/>",{"class":f.sScrollFootInner}).append(n.removeAttr("id").css("margin-left",0).append("bottom"===j?g:null).append(b.children("tfoot")))));
+var b=i.children(),k=b[0],f=b[1],t=l?b[2]:null;if(d)h(f).on("scroll.DT",function(){var a=this.scrollLeft;k.scrollLeft=a;l&&(t.scrollLeft=a)});h(f).css(e&&c.bCollapse?"max-height":"height",e);a.nScrollHead=k;a.nScrollBody=f;a.nScrollFoot=t;a.aoDrawCallback.push({fn:ka,sName:"scrolling"});return i[0]}function ka(a){var b=a.oScroll,c=b.sX,d=b.sXInner,e=b.sY,b=b.iBarWidth,f=h(a.nScrollHead),g=f[0].style,j=f.children("div"),i=j[0].style,n=j.children("table"),j=a.nScrollBody,l=h(j),q=j.style,t=h(a.nScrollFoot).children("div"),
+m=t.children("table"),o=h(a.nTHead),F=h(a.nTable),p=F[0],r=p.style,u=a.nTFoot?h(a.nTFoot):null,Eb=a.oBrowser,Ua=Eb.bScrollOversize,s=G(a.aoColumns,"nTh"),P,v,w,y,z=[],A=[],B=[],C=[],D,E=function(a){a=a.style;a.paddingTop="0";a.paddingBottom="0";a.borderTopWidth="0";a.borderBottomWidth="0";a.height=0};v=j.scrollHeight>j.clientHeight;if(a.scrollBarVis!==v&&a.scrollBarVis!==k)a.scrollBarVis=v,Y(a);else{a.scrollBarVis=v;F.children("thead, tfoot").remove();u&&(w=u.clone().prependTo(F),P=u.find("tr"),w=
+w.find("tr"));y=o.clone().prependTo(F);o=o.find("tr");v=y.find("tr");y.find("th, td").removeAttr("tabindex");c||(q.width="100%",f[0].style.width="100%");h.each(qa(a,y),function(b,c){D=Z(a,b);c.style.width=a.aoColumns[D].sWidth});u&&J(function(a){a.style.width=""},w);f=F.outerWidth();if(""===c){r.width="100%";if(Ua&&(F.find("tbody").height()>j.offsetHeight||"scroll"==l.css("overflow-y")))r.width=x(F.outerWidth()-b);f=F.outerWidth()}else""!==d&&(r.width=x(d),f=F.outerWidth());J(E,v);J(function(a){B.push(a.innerHTML);
+z.push(x(h(a).css("width")))},v);J(function(a,b){if(h.inArray(a,s)!==-1)a.style.width=z[b]},o);h(v).height(0);u&&(J(E,w),J(function(a){C.push(a.innerHTML);A.push(x(h(a).css("width")))},w),J(function(a,b){a.style.width=A[b]},P),h(w).height(0));J(function(a,b){a.innerHTML='<div class="dataTables_sizing" style="height:0;overflow:hidden;">'+B[b]+"</div>";a.style.width=z[b]},v);u&&J(function(a,b){a.innerHTML='<div class="dataTables_sizing" style="height:0;overflow:hidden;">'+C[b]+"</div>";a.style.width=
+A[b]},w);if(F.outerWidth()<f){P=j.scrollHeight>j.offsetHeight||"scroll"==l.css("overflow-y")?f+b:f;if(Ua&&(j.scrollHeight>j.offsetHeight||"scroll"==l.css("overflow-y")))r.width=x(P-b);(""===c||""!==d)&&L(a,1,"Possible column misalignment",6)}else P="100%";q.width=x(P);g.width=x(P);u&&(a.nScrollFoot.style.width=x(P));!e&&Ua&&(q.height=x(p.offsetHeight+b));c=F.outerWidth();n[0].style.width=x(c);i.width=x(c);d=F.height()>j.clientHeight||"scroll"==l.css("overflow-y");e="padding"+(Eb.bScrollbarLeft?"Left":
+"Right");i[e]=d?b+"px":"0px";u&&(m[0].style.width=x(c),t[0].style.width=x(c),t[0].style[e]=d?b+"px":"0px");F.children("colgroup").insertBefore(F.children("thead"));l.scroll();if((a.bSorted||a.bFiltered)&&!a._drawHold)j.scrollTop=0}}function J(a,b,c){for(var d=0,e=0,f=b.length,g,j;e<f;){g=b[e].firstChild;for(j=c?c[e].firstChild:null;g;)1===g.nodeType&&(c?a(g,j,d):a(g,d),d++),g=g.nextSibling,j=c?j.nextSibling:null;e++}}function Fa(a){var b=a.nTable,c=a.aoColumns,d=a.oScroll,e=d.sY,f=d.sX,g=d.sXInner,
+j=c.length,i=la(a,"bVisible"),n=h("th",a.nTHead),l=b.getAttribute("width"),k=b.parentNode,t=!1,m,o,p=a.oBrowser,d=p.bScrollOversize;(m=b.style.width)&&-1!==m.indexOf("%")&&(l=m);for(m=0;m<i.length;m++)o=c[i[m]],null!==o.sWidth&&(o.sWidth=Fb(o.sWidthOrig,k),t=!0);if(d||!t&&!f&&!e&&j==aa(a)&&j==n.length)for(m=0;m<j;m++)i=Z(a,m),null!==i&&(c[i].sWidth=x(n.eq(m).width()));else{j=h(b).clone().css("visibility","hidden").removeAttr("id");j.find("tbody tr").remove();var r=h("<tr/>").appendTo(j.find("tbody"));
+j.find("thead, tfoot").remove();j.append(h(a.nTHead).clone()).append(h(a.nTFoot).clone());j.find("tfoot th, tfoot td").css("width","");n=qa(a,j.find("thead")[0]);for(m=0;m<i.length;m++)o=c[i[m]],n[m].style.width=null!==o.sWidthOrig&&""!==o.sWidthOrig?x(o.sWidthOrig):"",o.sWidthOrig&&f&&h(n[m]).append(h("<div/>").css({width:o.sWidthOrig,margin:0,padding:0,border:0,height:1}));if(a.aoData.length)for(m=0;m<i.length;m++)t=i[m],o=c[t],h(Gb(a,t)).clone(!1).append(o.sContentPadding).appendTo(r);h("[name]",
+j).removeAttr("name");o=h("<div/>").css(f||e?{position:"absolute",top:0,left:0,height:1,right:0,overflow:"hidden"}:{}).append(j).appendTo(k);f&&g?j.width(g):f?(j.css("width","auto"),j.removeAttr("width"),j.width()<k.clientWidth&&l&&j.width(k.clientWidth)):e?j.width(k.clientWidth):l&&j.width(l);for(m=e=0;m<i.length;m++)k=h(n[m]),g=k.outerWidth()-k.width(),k=p.bBounding?Math.ceil(n[m].getBoundingClientRect().width):k.outerWidth(),e+=k,c[i[m]].sWidth=x(k-g);b.style.width=x(e);o.remove()}l&&(b.style.width=
+x(l));if((l||f)&&!a._reszEvt)b=function(){h(D).bind("resize.DT-"+a.sInstance,Oa(function(){Y(a)}))},d?setTimeout(b,1E3):b(),a._reszEvt=!0}function Fb(a,b){if(!a)return 0;var c=h("<div/>").css("width",x(a)).appendTo(b||I.body),d=c[0].offsetWidth;c.remove();return d}function Gb(a,b){var c=Hb(a,b);if(0>c)return null;var d=a.aoData[c];return!d.nTr?h("<td/>").html(B(a,c,b,"display"))[0]:d.anCells[b]}function Hb(a,b){for(var c,d=-1,e=-1,f=0,g=a.aoData.length;f<g;f++)c=B(a,f,b,"display")+"",c=c.replace($b,
+""),c=c.replace(/&nbsp;/g," "),c.length>d&&(d=c.length,e=f);return e}function x(a){return null===a?"0px":"number"==typeof a?0>a?"0px":a+"px":a.match(/\d$/)?a+"px":a}function V(a){var b,c,d=[],e=a.aoColumns,f,g,j,i;b=a.aaSortingFixed;c=h.isPlainObject(b);var n=[];f=function(a){a.length&&!h.isArray(a[0])?n.push(a):h.merge(n,a)};h.isArray(b)&&f(b);c&&b.pre&&f(b.pre);f(a.aaSorting);c&&b.post&&f(b.post);for(a=0;a<n.length;a++){i=n[a][0];f=e[i].aDataSort;b=0;for(c=f.length;b<c;b++)g=f[b],j=e[g].sType||
+"string",n[a]._idx===k&&(n[a]._idx=h.inArray(n[a][1],e[g].asSorting)),d.push({src:i,col:g,dir:n[a][1],index:n[a]._idx,type:j,formatter:m.ext.type.order[j+"-pre"]})}return d}function mb(a){var b,c,d=[],e=m.ext.type.order,f=a.aoData,g=0,j,i=a.aiDisplayMaster,h;Ga(a);h=V(a);b=0;for(c=h.length;b<c;b++)j=h[b],j.formatter&&g++,Ib(a,j.col);if("ssp"!=y(a)&&0!==h.length){b=0;for(c=i.length;b<c;b++)d[i[b]]=b;g===h.length?i.sort(function(a,b){var c,e,g,j,i=h.length,k=f[a]._aSortData,m=f[b]._aSortData;for(g=
+0;g<i;g++)if(j=h[g],c=k[j.col],e=m[j.col],c=c<e?-1:c>e?1:0,0!==c)return"asc"===j.dir?c:-c;c=d[a];e=d[b];return c<e?-1:c>e?1:0}):i.sort(function(a,b){var c,g,j,i,k=h.length,m=f[a]._aSortData,p=f[b]._aSortData;for(j=0;j<k;j++)if(i=h[j],c=m[i.col],g=p[i.col],i=e[i.type+"-"+i.dir]||e["string-"+i.dir],c=i(c,g),0!==c)return c;c=d[a];g=d[b];return c<g?-1:c>g?1:0})}a.bSorted=!0}function Jb(a){for(var b,c,d=a.aoColumns,e=V(a),a=a.oLanguage.oAria,f=0,g=d.length;f<g;f++){c=d[f];var j=c.asSorting;b=c.sTitle.replace(/<.*?>/g,
+"");var i=c.nTh;i.removeAttribute("aria-sort");c.bSortable&&(0<e.length&&e[0].col==f?(i.setAttribute("aria-sort","asc"==e[0].dir?"ascending":"descending"),c=j[e[0].index+1]||j[0]):c=j[0],b+="asc"===c?a.sSortAscending:a.sSortDescending);i.setAttribute("aria-label",b)}}function Va(a,b,c,d){var e=a.aaSorting,f=a.aoColumns[b].asSorting,g=function(a,b){var c=a._idx;c===k&&(c=h.inArray(a[1],f));return c+1<f.length?c+1:b?null:0};"number"===typeof e[0]&&(e=a.aaSorting=[e]);c&&a.oFeatures.bSortMulti?(c=h.inArray(b,
+G(e,"0")),-1!==c?(b=g(e[c],!0),null===b&&1===e.length&&(b=0),null===b?e.splice(c,1):(e[c][1]=f[b],e[c]._idx=b)):(e.push([b,f[0],0]),e[e.length-1]._idx=0)):e.length&&e[0][0]==b?(b=g(e[0]),e.length=1,e[0][1]=f[b],e[0]._idx=b):(e.length=0,e.push([b,f[0]]),e[0]._idx=0);T(a);"function"==typeof d&&d(a)}function Ma(a,b,c,d){var e=a.aoColumns[c];Wa(b,{},function(b){!1!==e.bSortable&&(a.oFeatures.bProcessing?(C(a,!0),setTimeout(function(){Va(a,c,b.shiftKey,d);"ssp"!==y(a)&&C(a,!1)},0)):Va(a,c,b.shiftKey,d))})}
+function va(a){var b=a.aLastSort,c=a.oClasses.sSortColumn,d=V(a),e=a.oFeatures,f,g;if(e.bSort&&e.bSortClasses){e=0;for(f=b.length;e<f;e++)g=b[e].src,h(G(a.aoData,"anCells",g)).removeClass(c+(2>e?e+1:3));e=0;for(f=d.length;e<f;e++)g=d[e].src,h(G(a.aoData,"anCells",g)).addClass(c+(2>e?e+1:3))}a.aLastSort=d}function Ib(a,b){var c=a.aoColumns[b],d=m.ext.order[c.sSortDataType],e;d&&(e=d.call(a.oInstance,a,b,$(a,b)));for(var f,g=m.ext.type.order[c.sType+"-pre"],j=0,i=a.aoData.length;j<i;j++)if(c=a.aoData[j],
+c._aSortData||(c._aSortData=[]),!c._aSortData[b]||d)f=d?e[j]:B(a,j,b,"sort"),c._aSortData[b]=g?g(f):f}function wa(a){if(a.oFeatures.bStateSave&&!a.bDestroying){var b={time:+new Date,start:a._iDisplayStart,length:a._iDisplayLength,order:h.extend(!0,[],a.aaSorting),search:Ab(a.oPreviousSearch),columns:h.map(a.aoColumns,function(b,d){return{visible:b.bVisible,search:Ab(a.aoPreSearchCols[d])}})};u(a,"aoStateSaveParams","stateSaveParams",[a,b]);a.oSavedState=b;a.fnStateSaveCallback.call(a.oInstance,a,
+b)}}function Kb(a){var b,c,d=a.aoColumns;if(a.oFeatures.bStateSave){var e=a.fnStateLoadCallback.call(a.oInstance,a);if(e&&e.time&&(b=u(a,"aoStateLoadParams","stateLoadParams",[a,e]),-1===h.inArray(!1,b)&&(b=a.iStateDuration,!(0<b&&e.time<+new Date-1E3*b)&&d.length===e.columns.length))){a.oLoadedState=h.extend(!0,{},e);e.start!==k&&(a._iDisplayStart=e.start,a.iInitDisplayStart=e.start);e.length!==k&&(a._iDisplayLength=e.length);e.order!==k&&(a.aaSorting=[],h.each(e.order,function(b,c){a.aaSorting.push(c[0]>=
+d.length?[0,c[1]]:c)}));e.search!==k&&h.extend(a.oPreviousSearch,Bb(e.search));b=0;for(c=e.columns.length;b<c;b++){var f=e.columns[b];f.visible!==k&&(d[b].bVisible=f.visible);f.search!==k&&h.extend(a.aoPreSearchCols[b],Bb(f.search))}u(a,"aoStateLoaded","stateLoaded",[a,e])}}}function xa(a){var b=m.settings,a=h.inArray(a,G(b,"nTable"));return-1!==a?b[a]:null}function L(a,b,c,d){c="DataTables warning: "+(a?"table id="+a.sTableId+" - ":"")+c;d&&(c+=". For more information about this error, please see http://datatables.net/tn/"+
+d);if(b)D.console&&console.log&&console.log(c);else if(b=m.ext,b=b.sErrMode||b.errMode,a&&u(a,null,"error",[a,d,c]),"alert"==b)alert(c);else{if("throw"==b)throw Error(c);"function"==typeof b&&b(a,d,c)}}function E(a,b,c,d){h.isArray(c)?h.each(c,function(c,d){h.isArray(d)?E(a,b,d[0],d[1]):E(a,b,d)}):(d===k&&(d=c),b[c]!==k&&(a[d]=b[c]))}function Lb(a,b,c){var d,e;for(e in b)b.hasOwnProperty(e)&&(d=b[e],h.isPlainObject(d)?(h.isPlainObject(a[e])||(a[e]={}),h.extend(!0,a[e],d)):a[e]=c&&"data"!==e&&"aaData"!==
+e&&h.isArray(d)?d.slice():d);return a}function Wa(a,b,c){h(a).bind("click.DT",b,function(b){a.blur();c(b)}).bind("keypress.DT",b,function(a){13===a.which&&(a.preventDefault(),c(a))}).bind("selectstart.DT",function(){return!1})}function z(a,b,c,d){c&&a[b].push({fn:c,sName:d})}function u(a,b,c,d){var e=[];b&&(e=h.map(a[b].slice().reverse(),function(b){return b.fn.apply(a.oInstance,d)}));null!==c&&(b=h.Event(c+".dt"),h(a.nTable).trigger(b,d),e.push(b.result));return e}function Sa(a){var b=a._iDisplayStart,
+c=a.fnDisplayEnd(),d=a._iDisplayLength;b>=c&&(b=c-d);b-=b%d;if(-1===d||0>b)b=0;a._iDisplayStart=b}function Na(a,b){var c=a.renderer,d=m.ext.renderer[b];return h.isPlainObject(c)&&c[b]?d[c[b]]||d._:"string"===typeof c?d[c]||d._:d._}function y(a){return a.oFeatures.bServerSide?"ssp":a.ajax||a.sAjaxSource?"ajax":"dom"}function ya(a,b){var c=[],c=Mb.numbers_length,d=Math.floor(c/2);b<=c?c=W(0,b):a<=d?(c=W(0,c-2),c.push("ellipsis"),c.push(b-1)):(a>=b-1-d?c=W(b-(c-2),b):(c=W(a-d+2,a+d-1),c.push("ellipsis"),
+c.push(b-1)),c.splice(0,0,"ellipsis"),c.splice(0,0,0));c.DT_el="span";return c}function db(a){h.each({num:function(b){return za(b,a)},"num-fmt":function(b){return za(b,a,Xa)},"html-num":function(b){return za(b,a,Aa)},"html-num-fmt":function(b){return za(b,a,Aa,Xa)}},function(b,c){v.type.order[b+a+"-pre"]=c;b.match(/^html\-/)&&(v.type.search[b+a]=v.type.search.html)})}function Nb(a){return function(){var b=[xa(this[m.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return m.ext.internal[a].apply(this,
+b)}}var m=function(a){this.$=function(a,b){return this.api(!0).$(a,b)};this._=function(a,b){return this.api(!0).rows(a,b).data()};this.api=function(a){return a?new r(xa(this[v.iApiIndex])):new r(this)};this.fnAddData=function(a,b){var c=this.api(!0),d=h.isArray(a)&&(h.isArray(a[0])||h.isPlainObject(a[0]))?c.rows.add(a):c.row.add(a);(b===k||b)&&c.draw();return d.flatten().toArray()};this.fnAdjustColumnSizing=function(a){var b=this.api(!0).columns.adjust(),c=b.settings()[0],d=c.oScroll;a===k||a?b.draw(!1):
+(""!==d.sX||""!==d.sY)&&ka(c)};this.fnClearTable=function(a){var b=this.api(!0).clear();(a===k||a)&&b.draw()};this.fnClose=function(a){this.api(!0).row(a).child.hide()};this.fnDeleteRow=function(a,b,c){var d=this.api(!0),a=d.rows(a),e=a.settings()[0],h=e.aoData[a[0][0]];a.remove();b&&b.call(this,e,h);(c===k||c)&&d.draw();return h};this.fnDestroy=function(a){this.api(!0).destroy(a)};this.fnDraw=function(a){this.api(!0).draw(a)};this.fnFilter=function(a,b,c,d,e,h){e=this.api(!0);null===b||b===k?e.search(a,
+c,d,h):e.column(b).search(a,c,d,h);e.draw()};this.fnGetData=function(a,b){var c=this.api(!0);if(a!==k){var d=a.nodeName?a.nodeName.toLowerCase():"";return b!==k||"td"==d||"th"==d?c.cell(a,b).data():c.row(a).data()||null}return c.data().toArray()};this.fnGetNodes=function(a){var b=this.api(!0);return a!==k?b.row(a).node():b.rows().nodes().flatten().toArray()};this.fnGetPosition=function(a){var b=this.api(!0),c=a.nodeName.toUpperCase();return"TR"==c?b.row(a).index():"TD"==c||"TH"==c?(a=b.cell(a).index(),
+[a.row,a.columnVisible,a.column]):null};this.fnIsOpen=function(a){return this.api(!0).row(a).child.isShown()};this.fnOpen=function(a,b,c){return this.api(!0).row(a).child(b,c).show().child()[0]};this.fnPageChange=function(a,b){var c=this.api(!0).page(a);(b===k||b)&&c.draw(!1)};this.fnSetColumnVis=function(a,b,c){a=this.api(!0).column(a).visible(b);(c===k||c)&&a.columns.adjust().draw()};this.fnSettings=function(){return xa(this[v.iApiIndex])};this.fnSort=function(a){this.api(!0).order(a).draw()};this.fnSortListener=
+function(a,b,c){this.api(!0).order.listener(a,b,c)};this.fnUpdate=function(a,b,c,d,e){var h=this.api(!0);c===k||null===c?h.row(b).data(a):h.cell(b,c).data(a);(e===k||e)&&h.columns.adjust();(d===k||d)&&h.draw();return 0};this.fnVersionCheck=v.fnVersionCheck;var b=this,c=a===k,d=this.length;c&&(a={});this.oApi=this.internal=v.internal;for(var e in m.ext.internal)e&&(this[e]=Nb(e));this.each(function(){var e={},e=1<d?Lb(e,a,!0):a,g=0,j,i=this.getAttribute("id"),n=!1,l=m.defaults,q=h(this);if("table"!=
+this.nodeName.toLowerCase())L(null,0,"Non-table node initialisation ("+this.nodeName+")",2);else{eb(l);fb(l.column);K(l,l,!0);K(l.column,l.column,!0);K(l,h.extend(e,q.data()));var t=m.settings,g=0;for(j=t.length;g<j;g++){var p=t[g];if(p.nTable==this||p.nTHead.parentNode==this||p.nTFoot&&p.nTFoot.parentNode==this){g=e.bRetrieve!==k?e.bRetrieve:l.bRetrieve;if(c||g)return p.oInstance;if(e.bDestroy!==k?e.bDestroy:l.bDestroy){p.oInstance.fnDestroy();break}else{L(p,0,"Cannot reinitialise DataTable",3);
+return}}if(p.sTableId==this.id){t.splice(g,1);break}}if(null===i||""===i)this.id=i="DataTables_Table_"+m.ext._unique++;var o=h.extend(!0,{},m.models.oSettings,{sDestroyWidth:q[0].style.width,sInstance:i,sTableId:i});o.nTable=this;o.oApi=b.internal;o.oInit=e;t.push(o);o.oInstance=1===b.length?b:q.dataTable();eb(e);e.oLanguage&&Da(e.oLanguage);e.aLengthMenu&&!e.iDisplayLength&&(e.iDisplayLength=h.isArray(e.aLengthMenu[0])?e.aLengthMenu[0][0]:e.aLengthMenu[0]);e=Lb(h.extend(!0,{},l),e);E(o.oFeatures,
+e,"bPaginate bLengthChange bFilter bSort bSortMulti bInfo bProcessing bAutoWidth bSortClasses bServerSide bDeferRender".split(" "));E(o,e,["asStripeClasses","ajax","fnServerData","fnFormatNumber","sServerMethod","aaSorting","aaSortingFixed","aLengthMenu","sPaginationType","sAjaxSource","sAjaxDataProp","iStateDuration","sDom","bSortCellsTop","iTabIndex","fnStateLoadCallback","fnStateSaveCallback","renderer","searchDelay","rowId",["iCookieDuration","iStateDuration"],["oSearch","oPreviousSearch"],["aoSearchCols",
+"aoPreSearchCols"],["iDisplayLength","_iDisplayLength"],["bJQueryUI","bJUI"]]);E(o.oScroll,e,[["sScrollX","sX"],["sScrollXInner","sXInner"],["sScrollY","sY"],["bScrollCollapse","bCollapse"]]);E(o.oLanguage,e,"fnInfoCallback");z(o,"aoDrawCallback",e.fnDrawCallback,"user");z(o,"aoServerParams",e.fnServerParams,"user");z(o,"aoStateSaveParams",e.fnStateSaveParams,"user");z(o,"aoStateLoadParams",e.fnStateLoadParams,"user");z(o,"aoStateLoaded",e.fnStateLoaded,"user");z(o,"aoRowCallback",e.fnRowCallback,
+"user");z(o,"aoRowCreatedCallback",e.fnCreatedRow,"user");z(o,"aoHeaderCallback",e.fnHeaderCallback,"user");z(o,"aoFooterCallback",e.fnFooterCallback,"user");z(o,"aoInitComplete",e.fnInitComplete,"user");z(o,"aoPreDrawCallback",e.fnPreDrawCallback,"user");o.rowIdFn=Q(e.rowId);gb(o);i=o.oClasses;e.bJQueryUI?(h.extend(i,m.ext.oJUIClasses,e.oClasses),e.sDom===l.sDom&&"lfrtip"===l.sDom&&(o.sDom='<"H"lfr>t<"F"ip>'),o.renderer)?h.isPlainObject(o.renderer)&&!o.renderer.header&&(o.renderer.header="jqueryui"):
+o.renderer="jqueryui":h.extend(i,m.ext.classes,e.oClasses);q.addClass(i.sTable);o.iInitDisplayStart===k&&(o.iInitDisplayStart=e.iDisplayStart,o._iDisplayStart=e.iDisplayStart);null!==e.iDeferLoading&&(o.bDeferLoading=!0,g=h.isArray(e.iDeferLoading),o._iRecordsDisplay=g?e.iDeferLoading[0]:e.iDeferLoading,o._iRecordsTotal=g?e.iDeferLoading[1]:e.iDeferLoading);var r=o.oLanguage;h.extend(!0,r,e.oLanguage);""!==r.sUrl&&(h.ajax({dataType:"json",url:r.sUrl,success:function(a){Da(a);K(l.oLanguage,a);h.extend(true,
+r,a);ga(o)},error:function(){ga(o)}}),n=!0);null===e.asStripeClasses&&(o.asStripeClasses=[i.sStripeOdd,i.sStripeEven]);var g=o.asStripeClasses,v=q.children("tbody").find("tr").eq(0);-1!==h.inArray(!0,h.map(g,function(a){return v.hasClass(a)}))&&(h("tbody tr",this).removeClass(g.join(" ")),o.asDestroyStripes=g.slice());t=[];g=this.getElementsByTagName("thead");0!==g.length&&(da(o.aoHeader,g[0]),t=qa(o));if(null===e.aoColumns){p=[];g=0;for(j=t.length;g<j;g++)p.push(null)}else p=e.aoColumns;g=0;for(j=
+p.length;g<j;g++)Ea(o,t?t[g]:null);ib(o,e.aoColumnDefs,p,function(a,b){ja(o,a,b)});if(v.length){var s=function(a,b){return a.getAttribute("data-"+b)!==null?b:null};h(v[0]).children("th, td").each(function(a,b){var c=o.aoColumns[a];if(c.mData===a){var d=s(b,"sort")||s(b,"order"),e=s(b,"filter")||s(b,"search");if(d!==null||e!==null){c.mData={_:a+".display",sort:d!==null?a+".@data-"+d:k,type:d!==null?a+".@data-"+d:k,filter:e!==null?a+".@data-"+e:k};ja(o,a)}}})}var w=o.oFeatures;e.bStateSave&&(w.bStateSave=
+!0,Kb(o,e),z(o,"aoDrawCallback",wa,"state_save"));if(e.aaSorting===k){t=o.aaSorting;g=0;for(j=t.length;g<j;g++)t[g][1]=o.aoColumns[g].asSorting[0]}va(o);w.bSort&&z(o,"aoDrawCallback",function(){if(o.bSorted){var a=V(o),b={};h.each(a,function(a,c){b[c.src]=c.dir});u(o,null,"order",[o,a,b]);Jb(o)}});z(o,"aoDrawCallback",function(){(o.bSorted||y(o)==="ssp"||w.bDeferRender)&&va(o)},"sc");g=q.children("caption").each(function(){this._captionSide=q.css("caption-side")});j=q.children("thead");0===j.length&&
+(j=h("<thead/>").appendTo(this));o.nTHead=j[0];j=q.children("tbody");0===j.length&&(j=h("<tbody/>").appendTo(this));o.nTBody=j[0];j=q.children("tfoot");if(0===j.length&&0<g.length&&(""!==o.oScroll.sX||""!==o.oScroll.sY))j=h("<tfoot/>").appendTo(this);0===j.length||0===j.children().length?q.addClass(i.sNoFooter):0<j.length&&(o.nTFoot=j[0],da(o.aoFooter,o.nTFoot));if(e.aaData)for(g=0;g<e.aaData.length;g++)N(o,e.aaData[g]);else(o.bDeferLoading||"dom"==y(o))&&ma(o,h(o.nTBody).children("tr"));o.aiDisplay=
+o.aiDisplayMaster.slice();o.bInitialised=!0;!1===n&&ga(o)}});b=null;return this},v,r,p,s,Ya={},Ob=/[\r\n]/g,Aa=/<.*?>/g,ac=/^[\w\+\-]/,bc=/[\w\+\-]$/,cc=RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\|\\$|\\^|\\-)","g"),Xa=/[',$£€¥%\u2009\u202F\u20BD\u20a9\u20BArfk]/gi,M=function(a){return!a||!0===a||"-"===a?!0:!1},Pb=function(a){var b=parseInt(a,10);return!isNaN(b)&&isFinite(a)?b:null},Qb=function(a,b){Ya[b]||(Ya[b]=RegExp(Qa(b),"g"));return"string"===typeof a&&"."!==b?a.replace(/\./g,
+"").replace(Ya[b],"."):a},Za=function(a,b,c){var d="string"===typeof a;if(M(a))return!0;b&&d&&(a=Qb(a,b));c&&d&&(a=a.replace(Xa,""));return!isNaN(parseFloat(a))&&isFinite(a)},Rb=function(a,b,c){return M(a)?!0:!(M(a)||"string"===typeof a)?null:Za(a.replace(Aa,""),b,c)?!0:null},G=function(a,b,c){var d=[],e=0,f=a.length;if(c!==k)for(;e<f;e++)a[e]&&a[e][b]&&d.push(a[e][b][c]);else for(;e<f;e++)a[e]&&d.push(a[e][b]);return d},ha=function(a,b,c,d){var e=[],f=0,g=b.length;if(d!==k)for(;f<g;f++)a[b[f]][c]&&
+e.push(a[b[f]][c][d]);else for(;f<g;f++)e.push(a[b[f]][c]);return e},W=function(a,b){var c=[],d;b===k?(b=0,d=a):(d=b,b=a);for(var e=b;e<d;e++)c.push(e);return c},Sb=function(a){for(var b=[],c=0,d=a.length;c<d;c++)a[c]&&b.push(a[c]);return b},pa=function(a){var b=[],c,d,e=a.length,f,g=0;d=0;a:for(;d<e;d++){c=a[d];for(f=0;f<g;f++)if(b[f]===c)continue a;b.push(c);g++}return b};m.util={throttle:function(a,b){var c=b!==k?b:200,d,e;return function(){var b=this,g=+new Date,h=arguments;d&&g<d+c?(clearTimeout(e),
+e=setTimeout(function(){d=k;a.apply(b,h)},c)):(d=g,a.apply(b,h))}},escapeRegex:function(a){return a.replace(cc,"\\$1")}};var A=function(a,b,c){a[b]!==k&&(a[c]=a[b])},ba=/\[.*?\]$/,U=/\(\)$/,Qa=m.util.escapeRegex,ua=h("<div>")[0],Zb=ua.textContent!==k,$b=/<.*?>/g,Oa=m.util.throttle,Tb=[],w=Array.prototype,dc=function(a){var b,c,d=m.settings,e=h.map(d,function(a){return a.nTable});if(a){if(a.nTable&&a.oApi)return[a];if(a.nodeName&&"table"===a.nodeName.toLowerCase())return b=h.inArray(a,e),-1!==b?[d[b]]:
+null;if(a&&"function"===typeof a.settings)return a.settings().toArray();"string"===typeof a?c=h(a):a instanceof h&&(c=a)}else return[];if(c)return c.map(function(){b=h.inArray(this,e);return-1!==b?d[b]:null}).toArray()};r=function(a,b){if(!(this instanceof r))return new r(a,b);var c=[],d=function(a){(a=dc(a))&&(c=c.concat(a))};if(h.isArray(a))for(var e=0,f=a.length;e<f;e++)d(a[e]);else d(a);this.context=pa(c);b&&h.merge(this,b);this.selector={rows:null,cols:null,opts:null};r.extend(this,this,Tb)};
+m.Api=r;h.extend(r.prototype,{any:function(){return 0!==this.count()},concat:w.concat,context:[],count:function(){return this.flatten().length},each:function(a){for(var b=0,c=this.length;b<c;b++)a.call(this,this[b],b,this);return this},eq:function(a){var b=this.context;return b.length>a?new r(b[a],this[a]):null},filter:function(a){var b=[];if(w.filter)b=w.filter.call(this,a,this);else for(var c=0,d=this.length;c<d;c++)a.call(this,this[c],c,this)&&b.push(this[c]);return new r(this.context,b)},flatten:function(){var a=
+[];return new r(this.context,a.concat.apply(a,this.toArray()))},join:w.join,indexOf:w.indexOf||function(a,b){for(var c=b||0,d=this.length;c<d;c++)if(this[c]===a)return c;return-1},iterator:function(a,b,c,d){var e=[],f,g,h,i,n,l=this.context,m,t,p=this.selector;"string"===typeof a&&(d=c,c=b,b=a,a=!1);g=0;for(h=l.length;g<h;g++){var o=new r(l[g]);if("table"===b)f=c.call(o,l[g],g),f!==k&&e.push(f);else if("columns"===b||"rows"===b)f=c.call(o,l[g],this[g],g),f!==k&&e.push(f);else if("column"===b||"column-rows"===
+b||"row"===b||"cell"===b){t=this[g];"column-rows"===b&&(m=Ba(l[g],p.opts));i=0;for(n=t.length;i<n;i++)f=t[i],f="cell"===b?c.call(o,l[g],f.row,f.column,g,i):c.call(o,l[g],f,g,i,m),f!==k&&e.push(f)}}return e.length||d?(a=new r(l,a?e.concat.apply([],e):e),b=a.selector,b.rows=p.rows,b.cols=p.cols,b.opts=p.opts,a):this},lastIndexOf:w.lastIndexOf||function(a,b){return this.indexOf.apply(this.toArray.reverse(),arguments)},length:0,map:function(a){var b=[];if(w.map)b=w.map.call(this,a,this);else for(var c=
+0,d=this.length;c<d;c++)b.push(a.call(this,this[c],c));return new r(this.context,b)},pluck:function(a){return this.map(function(b){return b[a]})},pop:w.pop,push:w.push,reduce:w.reduce||function(a,b){return hb(this,a,b,0,this.length,1)},reduceRight:w.reduceRight||function(a,b){return hb(this,a,b,this.length-1,-1,-1)},reverse:w.reverse,selector:null,shift:w.shift,sort:w.sort,splice:w.splice,toArray:function(){return w.slice.call(this)},to$:function(){return h(this)},toJQuery:function(){return h(this)},
+unique:function(){return new r(this.context,pa(this))},unshift:w.unshift});r.extend=function(a,b,c){if(c.length&&b&&(b instanceof r||b.__dt_wrapper)){var d,e,f,g=function(a,b,c){return function(){var d=b.apply(a,arguments);r.extend(d,d,c.methodExt);return d}};d=0;for(e=c.length;d<e;d++)f=c[d],b[f.name]="function"===typeof f.val?g(a,f.val,f):h.isPlainObject(f.val)?{}:f.val,b[f.name].__dt_wrapper=!0,r.extend(a,b[f.name],f.propExt)}};r.register=p=function(a,b){if(h.isArray(a))for(var c=0,d=a.length;c<
+d;c++)r.register(a[c],b);else for(var e=a.split("."),f=Tb,g,j,c=0,d=e.length;c<d;c++){g=(j=-1!==e[c].indexOf("()"))?e[c].replace("()",""):e[c];var i;a:{i=0;for(var n=f.length;i<n;i++)if(f[i].name===g){i=f[i];break a}i=null}i||(i={name:g,val:{},methodExt:[],propExt:[]},f.push(i));c===d-1?i.val=b:f=j?i.methodExt:i.propExt}};r.registerPlural=s=function(a,b,c){r.register(a,c);r.register(b,function(){var a=c.apply(this,arguments);return a===this?this:a instanceof r?a.length?h.isArray(a[0])?new r(a.context,
+a[0]):a[0]:k:a})};p("tables()",function(a){var b;if(a){b=r;var c=this.context;if("number"===typeof a)a=[c[a]];else var d=h.map(c,function(a){return a.nTable}),a=h(d).filter(a).map(function(){var a=h.inArray(this,d);return c[a]}).toArray();b=new b(a)}else b=this;return b});p("table()",function(a){var a=this.tables(a),b=a.context;return b.length?new r(b[0]):a});s("tables().nodes()","table().node()",function(){return this.iterator("table",function(a){return a.nTable},1)});s("tables().body()","table().body()",
+function(){return this.iterator("table",function(a){return a.nTBody},1)});s("tables().header()","table().header()",function(){return this.iterator("table",function(a){return a.nTHead},1)});s("tables().footer()","table().footer()",function(){return this.iterator("table",function(a){return a.nTFoot},1)});s("tables().containers()","table().container()",function(){return this.iterator("table",function(a){return a.nTableWrapper},1)});p("draw()",function(a){return this.iterator("table",function(b){"page"===
+a?O(b):("string"===typeof a&&(a="full-hold"===a?!1:!0),T(b,!1===a))})});p("page()",function(a){return a===k?this.page.info().page:this.iterator("table",function(b){Ta(b,a)})});p("page.info()",function(){if(0===this.context.length)return k;var a=this.context[0],b=a._iDisplayStart,c=a.oFeatures.bPaginate?a._iDisplayLength:-1,d=a.fnRecordsDisplay(),e=-1===c;return{page:e?0:Math.floor(b/c),pages:e?1:Math.ceil(d/c),start:b,end:a.fnDisplayEnd(),length:c,recordsTotal:a.fnRecordsTotal(),recordsDisplay:d,
+serverSide:"ssp"===y(a)}});p("page.len()",function(a){return a===k?0!==this.context.length?this.context[0]._iDisplayLength:k:this.iterator("table",function(b){Ra(b,a)})});var Ub=function(a,b,c){if(c){var d=new r(a);d.one("draw",function(){c(d.ajax.json())})}if("ssp"==y(a))T(a,b);else{C(a,!0);var e=a.jqXHR;e&&4!==e.readyState&&e.abort();ra(a,[],function(c){na(a);for(var c=sa(a,c),d=0,e=c.length;d<e;d++)N(a,c[d]);T(a,b);C(a,!1)})}};p("ajax.json()",function(){var a=this.context;if(0<a.length)return a[0].json});
+p("ajax.params()",function(){var a=this.context;if(0<a.length)return a[0].oAjaxData});p("ajax.reload()",function(a,b){return this.iterator("table",function(c){Ub(c,!1===b,a)})});p("ajax.url()",function(a){var b=this.context;if(a===k){if(0===b.length)return k;b=b[0];return b.ajax?h.isPlainObject(b.ajax)?b.ajax.url:b.ajax:b.sAjaxSource}return this.iterator("table",function(b){h.isPlainObject(b.ajax)?b.ajax.url=a:b.ajax=a})});p("ajax.url().load()",function(a,b){return this.iterator("table",function(c){Ub(c,
+!1===b,a)})});var $a=function(a,b,c,d,e){var f=[],g,j,i,n,l,m;i=typeof b;if(!b||"string"===i||"function"===i||b.length===k)b=[b];i=0;for(n=b.length;i<n;i++){j=b[i]&&b[i].split?b[i].split(","):[b[i]];l=0;for(m=j.length;l<m;l++)(g=c("string"===typeof j[l]?h.trim(j[l]):j[l]))&&g.length&&(f=f.concat(g))}a=v.selector[a];if(a.length){i=0;for(n=a.length;i<n;i++)f=a[i](d,e,f)}return pa(f)},ab=function(a){a||(a={});a.filter&&a.search===k&&(a.search=a.filter);return h.extend({search:"none",order:"current",
+page:"all"},a)},bb=function(a){for(var b=0,c=a.length;b<c;b++)if(0<a[b].length)return a[0]=a[b],a[0].length=1,a.length=1,a.context=[a.context[b]],a;a.length=0;return a},Ba=function(a,b){var c,d,e,f=[],g=a.aiDisplay;c=a.aiDisplayMaster;var j=b.search;d=b.order;e=b.page;if("ssp"==y(a))return"removed"===j?[]:W(0,c.length);if("current"==e){c=a._iDisplayStart;for(d=a.fnDisplayEnd();c<d;c++)f.push(g[c])}else if("current"==d||"applied"==d)f="none"==j?c.slice():"applied"==j?g.slice():h.map(c,function(a){return-1===
+h.inArray(a,g)?a:null});else if("index"==d||"original"==d){c=0;for(d=a.aoData.length;c<d;c++)"none"==j?f.push(c):(e=h.inArray(c,g),(-1===e&&"removed"==j||0<=e&&"applied"==j)&&f.push(c))}return f};p("rows()",function(a,b){a===k?a="":h.isPlainObject(a)&&(b=a,a="");var b=ab(b),c=this.iterator("table",function(c){var e=b;return $a("row",a,function(a){var b=Pb(a);if(b!==null&&!e)return[b];var j=Ba(c,e);if(b!==null&&h.inArray(b,j)!==-1)return[b];if(!a)return j;if(typeof a==="function")return h.map(j,function(b){var e=
+c.aoData[b];return a(b,e._aData,e.nTr)?b:null});b=Sb(ha(c.aoData,j,"nTr"));if(a.nodeName){if(a._DT_RowIndex!==k)return[a._DT_RowIndex];if(a._DT_CellIndex)return[a._DT_CellIndex.row];b=h(a).closest("*[data-dt-row]");return b.length?[b.data("dt-row")]:[]}if(typeof a==="string"&&a.charAt(0)==="#"){j=c.aIds[a.replace(/^#/,"")];if(j!==k)return[j.idx]}return h(b).filter(a).map(function(){return this._DT_RowIndex}).toArray()},c,e)},1);c.selector.rows=a;c.selector.opts=b;return c});p("rows().nodes()",function(){return this.iterator("row",
+function(a,b){return a.aoData[b].nTr||k},1)});p("rows().data()",function(){return this.iterator(!0,"rows",function(a,b){return ha(a.aoData,b,"_aData")},1)});s("rows().cache()","row().cache()",function(a){return this.iterator("row",function(b,c){var d=b.aoData[c];return"search"===a?d._aFilterData:d._aSortData},1)});s("rows().invalidate()","row().invalidate()",function(a){return this.iterator("row",function(b,c){ca(b,c,a)})});s("rows().indexes()","row().index()",function(){return this.iterator("row",
+function(a,b){return b},1)});s("rows().ids()","row().id()",function(a){for(var b=[],c=this.context,d=0,e=c.length;d<e;d++)for(var f=0,g=this[d].length;f<g;f++){var h=c[d].rowIdFn(c[d].aoData[this[d][f]]._aData);b.push((!0===a?"#":"")+h)}return new r(c,b)});s("rows().remove()","row().remove()",function(){var a=this;this.iterator("row",function(b,c,d){var e=b.aoData,f=e[c],g,h,i,n,l;e.splice(c,1);g=0;for(h=e.length;g<h;g++)if(i=e[g],l=i.anCells,null!==i.nTr&&(i.nTr._DT_RowIndex=g),null!==l){i=0;for(n=
+l.length;i<n;i++)l[i]._DT_CellIndex.row=g}oa(b.aiDisplayMaster,c);oa(b.aiDisplay,c);oa(a[d],c,!1);Sa(b);c=b.rowIdFn(f._aData);c!==k&&delete b.aIds[c]});this.iterator("table",function(a){for(var c=0,d=a.aoData.length;c<d;c++)a.aoData[c].idx=c});return this});p("rows.add()",function(a){var b=this.iterator("table",function(b){var c,f,g,h=[];f=0;for(g=a.length;f<g;f++)c=a[f],c.nodeName&&"TR"===c.nodeName.toUpperCase()?h.push(ma(b,c)[0]):h.push(N(b,c));return h},1),c=this.rows(-1);c.pop();h.merge(c,b);
+return c});p("row()",function(a,b){return bb(this.rows(a,b))});p("row().data()",function(a){var b=this.context;if(a===k)return b.length&&this.length?b[0].aoData[this[0]]._aData:k;b[0].aoData[this[0]]._aData=a;ca(b[0],this[0],"data");return this});p("row().node()",function(){var a=this.context;return a.length&&this.length?a[0].aoData[this[0]].nTr||null:null});p("row.add()",function(a){a instanceof h&&a.length&&(a=a[0]);var b=this.iterator("table",function(b){return a.nodeName&&"TR"===a.nodeName.toUpperCase()?
+ma(b,a)[0]:N(b,a)});return this.row(b[0])});var cb=function(a,b){var c=a.context;if(c.length&&(c=c[0].aoData[b!==k?b:a[0]])&&c._details)c._details.remove(),c._detailsShow=k,c._details=k},Vb=function(a,b){var c=a.context;if(c.length&&a.length){var d=c[0].aoData[a[0]];if(d._details){(d._detailsShow=b)?d._details.insertAfter(d.nTr):d._details.detach();var e=c[0],f=new r(e),g=e.aoData;f.off("draw.dt.DT_details column-visibility.dt.DT_details destroy.dt.DT_details");0<G(g,"_details").length&&(f.on("draw.dt.DT_details",
+function(a,b){e===b&&f.rows({page:"current"}).eq(0).each(function(a){a=g[a];a._detailsShow&&a._details.insertAfter(a.nTr)})}),f.on("column-visibility.dt.DT_details",function(a,b){if(e===b)for(var c,d=aa(b),f=0,h=g.length;f<h;f++)c=g[f],c._details&&c._details.children("td[colspan]").attr("colspan",d)}),f.on("destroy.dt.DT_details",function(a,b){if(e===b)for(var c=0,d=g.length;c<d;c++)g[c]._details&&cb(f,c)}))}}};p("row().child()",function(a,b){var c=this.context;if(a===k)return c.length&&this.length?
+c[0].aoData[this[0]]._details:k;if(!0===a)this.child.show();else if(!1===a)cb(this);else if(c.length&&this.length){var d=c[0],c=c[0].aoData[this[0]],e=[],f=function(a,b){if(h.isArray(a)||a instanceof h)for(var c=0,k=a.length;c<k;c++)f(a[c],b);else a.nodeName&&"tr"===a.nodeName.toLowerCase()?e.push(a):(c=h("<tr><td/></tr>").addClass(b),h("td",c).addClass(b).html(a)[0].colSpan=aa(d),e.push(c[0]))};f(a,b);c._details&&c._details.remove();c._details=h(e);c._detailsShow&&c._details.insertAfter(c.nTr)}return this});
+p(["row().child.show()","row().child().show()"],function(){Vb(this,!0);return this});p(["row().child.hide()","row().child().hide()"],function(){Vb(this,!1);return this});p(["row().child.remove()","row().child().remove()"],function(){cb(this);return this});p("row().child.isShown()",function(){var a=this.context;return a.length&&this.length?a[0].aoData[this[0]]._detailsShow||!1:!1});var ec=/^(.+):(name|visIdx|visible)$/,Wb=function(a,b,c,d,e){for(var c=[],d=0,f=e.length;d<f;d++)c.push(B(a,e[d],b));
+return c};p("columns()",function(a,b){a===k?a="":h.isPlainObject(a)&&(b=a,a="");var b=ab(b),c=this.iterator("table",function(c){var e=a,f=b,g=c.aoColumns,j=G(g,"sName"),i=G(g,"nTh");return $a("column",e,function(a){var b=Pb(a);if(a==="")return W(g.length);if(b!==null)return[b>=0?b:g.length+b];if(typeof a==="function"){var e=Ba(c,f);return h.map(g,function(b,f){return a(f,Wb(c,f,0,0,e),i[f])?f:null})}var k=typeof a==="string"?a.match(ec):"";if(k)switch(k[2]){case "visIdx":case "visible":b=parseInt(k[1],
+10);if(b<0){var m=h.map(g,function(a,b){return a.bVisible?b:null});return[m[m.length+b]]}return[Z(c,b)];case "name":return h.map(j,function(a,b){return a===k[1]?b:null});default:return[]}if(a.nodeName&&a._DT_CellIndex)return[a._DT_CellIndex.column];b=h(i).filter(a).map(function(){return h.inArray(this,i)}).toArray();if(b.length||!a.nodeName)return b;b=h(a).closest("*[data-dt-column]");return b.length?[b.data("dt-column")]:[]},c,f)},1);c.selector.cols=a;c.selector.opts=b;return c});s("columns().header()",
+"column().header()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].nTh},1)});s("columns().footer()","column().footer()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].nTf},1)});s("columns().data()","column().data()",function(){return this.iterator("column-rows",Wb,1)});s("columns().dataSrc()","column().dataSrc()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].mData},1)});s("columns().cache()","column().cache()",
+function(a){return this.iterator("column-rows",function(b,c,d,e,f){return ha(b.aoData,f,"search"===a?"_aFilterData":"_aSortData",c)},1)});s("columns().nodes()","column().nodes()",function(){return this.iterator("column-rows",function(a,b,c,d,e){return ha(a.aoData,e,"anCells",b)},1)});s("columns().visible()","column().visible()",function(a,b){var c=this.iterator("column",function(b,c){if(a===k)return b.aoColumns[c].bVisible;var f=b.aoColumns,g=f[c],j=b.aoData,i,n,l;if(a!==k&&g.bVisible!==a){if(a){var m=
+h.inArray(!0,G(f,"bVisible"),c+1);i=0;for(n=j.length;i<n;i++)l=j[i].nTr,f=j[i].anCells,l&&l.insertBefore(f[c],f[m]||null)}else h(G(b.aoData,"anCells",c)).detach();g.bVisible=a;ea(b,b.aoHeader);ea(b,b.aoFooter);wa(b)}});a!==k&&(this.iterator("column",function(c,e){u(c,null,"column-visibility",[c,e,a,b])}),(b===k||b)&&this.columns.adjust());return c});s("columns().indexes()","column().index()",function(a){return this.iterator("column",function(b,c){return"visible"===a?$(b,c):c},1)});p("columns.adjust()",
+function(){return this.iterator("table",function(a){Y(a)},1)});p("column.index()",function(a,b){if(0!==this.context.length){var c=this.context[0];if("fromVisible"===a||"toData"===a)return Z(c,b);if("fromData"===a||"toVisible"===a)return $(c,b)}});p("column()",function(a,b){return bb(this.columns(a,b))});p("cells()",function(a,b,c){h.isPlainObject(a)&&(a.row===k?(c=a,a=null):(c=b,b=null));h.isPlainObject(b)&&(c=b,b=null);if(null===b||b===k)return this.iterator("table",function(b){var d=a,e=ab(c),f=
+b.aoData,g=Ba(b,e),j=Sb(ha(f,g,"anCells")),i=h([].concat.apply([],j)),l,n=b.aoColumns.length,m,p,r,u,v,s;return $a("cell",d,function(a){var c=typeof a==="function";if(a===null||a===k||c){m=[];p=0;for(r=g.length;p<r;p++){l=g[p];for(u=0;u<n;u++){v={row:l,column:u};if(c){s=f[l];a(v,B(b,l,u),s.anCells?s.anCells[u]:null)&&m.push(v)}else m.push(v)}}return m}if(h.isPlainObject(a))return[a];c=i.filter(a).map(function(a,b){return{row:b._DT_CellIndex.row,column:b._DT_CellIndex.column}}).toArray();if(c.length||
+!a.nodeName)return c;s=h(a).closest("*[data-dt-row]");return s.length?[{row:s.data("dt-row"),column:s.data("dt-column")}]:[]},b,e)});var d=this.columns(b,c),e=this.rows(a,c),f,g,j,i,n,l=this.iterator("table",function(a,b){f=[];g=0;for(j=e[b].length;g<j;g++){i=0;for(n=d[b].length;i<n;i++)f.push({row:e[b][g],column:d[b][i]})}return f},1);h.extend(l.selector,{cols:b,rows:a,opts:c});return l});s("cells().nodes()","cell().node()",function(){return this.iterator("cell",function(a,b,c){return(a=a.aoData[b])&&
+a.anCells?a.anCells[c]:k},1)});p("cells().data()",function(){return this.iterator("cell",function(a,b,c){return B(a,b,c)},1)});s("cells().cache()","cell().cache()",function(a){a="search"===a?"_aFilterData":"_aSortData";return this.iterator("cell",function(b,c,d){return b.aoData[c][a][d]},1)});s("cells().render()","cell().render()",function(a){return this.iterator("cell",function(b,c,d){return B(b,c,d,a)},1)});s("cells().indexes()","cell().index()",function(){return this.iterator("cell",function(a,
+b,c){return{row:b,column:c,columnVisible:$(a,c)}},1)});s("cells().invalidate()","cell().invalidate()",function(a){return this.iterator("cell",function(b,c,d){ca(b,c,a,d)})});p("cell()",function(a,b,c){return bb(this.cells(a,b,c))});p("cell().data()",function(a){var b=this.context,c=this[0];if(a===k)return b.length&&c.length?B(b[0],c[0].row,c[0].column):k;jb(b[0],c[0].row,c[0].column,a);ca(b[0],c[0].row,"data",c[0].column);return this});p("order()",function(a,b){var c=this.context;if(a===k)return 0!==
+c.length?c[0].aaSorting:k;"number"===typeof a?a=[[a,b]]:a.length&&!h.isArray(a[0])&&(a=Array.prototype.slice.call(arguments));return this.iterator("table",function(b){b.aaSorting=a.slice()})});p("order.listener()",function(a,b,c){return this.iterator("table",function(d){Ma(d,a,b,c)})});p("order.fixed()",function(a){if(!a){var b=this.context,b=b.length?b[0].aaSortingFixed:k;return h.isArray(b)?{pre:b}:b}return this.iterator("table",function(b){b.aaSortingFixed=h.extend(!0,{},a)})});p(["columns().order()",
+"column().order()"],function(a){var b=this;return this.iterator("table",function(c,d){var e=[];h.each(b[d],function(b,c){e.push([c,a])});c.aaSorting=e})});p("search()",function(a,b,c,d){var e=this.context;return a===k?0!==e.length?e[0].oPreviousSearch.sSearch:k:this.iterator("table",function(e){e.oFeatures.bFilter&&fa(e,h.extend({},e.oPreviousSearch,{sSearch:a+"",bRegex:null===b?!1:b,bSmart:null===c?!0:c,bCaseInsensitive:null===d?!0:d}),1)})});s("columns().search()","column().search()",function(a,
+b,c,d){return this.iterator("column",function(e,f){var g=e.aoPreSearchCols;if(a===k)return g[f].sSearch;e.oFeatures.bFilter&&(h.extend(g[f],{sSearch:a+"",bRegex:null===b?!1:b,bSmart:null===c?!0:c,bCaseInsensitive:null===d?!0:d}),fa(e,e.oPreviousSearch,1))})});p("state()",function(){return this.context.length?this.context[0].oSavedState:null});p("state.clear()",function(){return this.iterator("table",function(a){a.fnStateSaveCallback.call(a.oInstance,a,{})})});p("state.loaded()",function(){return this.context.length?
+this.context[0].oLoadedState:null});p("state.save()",function(){return this.iterator("table",function(a){wa(a)})});m.versionCheck=m.fnVersionCheck=function(a){for(var b=m.version.split("."),a=a.split("."),c,d,e=0,f=a.length;e<f;e++)if(c=parseInt(b[e],10)||0,d=parseInt(a[e],10)||0,c!==d)return c>d;return!0};m.isDataTable=m.fnIsDataTable=function(a){var b=h(a).get(0),c=!1;h.each(m.settings,function(a,e){var f=e.nScrollHead?h("table",e.nScrollHead)[0]:null,g=e.nScrollFoot?h("table",e.nScrollFoot)[0]:
+null;if(e.nTable===b||f===b||g===b)c=!0});return c};m.tables=m.fnTables=function(a){var b=!1;h.isPlainObject(a)&&(b=a.api,a=a.visible);var c=h.map(m.settings,function(b){if(!a||a&&h(b.nTable).is(":visible"))return b.nTable});return b?new r(c):c};m.camelToHungarian=K;p("$()",function(a,b){var c=this.rows(b).nodes(),c=h(c);return h([].concat(c.filter(a).toArray(),c.find(a).toArray()))});h.each(["on","one","off"],function(a,b){p(b+"()",function(){var a=Array.prototype.slice.call(arguments);a[0].match(/\.dt\b/)||
+(a[0]+=".dt");var d=h(this.tables().nodes());d[b].apply(d,a);return this})});p("clear()",function(){return this.iterator("table",function(a){na(a)})});p("settings()",function(){return new r(this.context,this.context)});p("init()",function(){var a=this.context;return a.length?a[0].oInit:null});p("data()",function(){return this.iterator("table",function(a){return G(a.aoData,"_aData")}).flatten()});p("destroy()",function(a){a=a||!1;return this.iterator("table",function(b){var c=b.nTableWrapper.parentNode,
+d=b.oClasses,e=b.nTable,f=b.nTBody,g=b.nTHead,j=b.nTFoot,i=h(e),f=h(f),k=h(b.nTableWrapper),l=h.map(b.aoData,function(a){return a.nTr}),p;b.bDestroying=!0;u(b,"aoDestroyCallback","destroy",[b]);a||(new r(b)).columns().visible(!0);k.unbind(".DT").find(":not(tbody *)").unbind(".DT");h(D).unbind(".DT-"+b.sInstance);e!=g.parentNode&&(i.children("thead").detach(),i.append(g));j&&e!=j.parentNode&&(i.children("tfoot").detach(),i.append(j));b.aaSorting=[];b.aaSortingFixed=[];va(b);h(l).removeClass(b.asStripeClasses.join(" "));
+h("th, td",g).removeClass(d.sSortable+" "+d.sSortableAsc+" "+d.sSortableDesc+" "+d.sSortableNone);b.bJUI&&(h("th span."+d.sSortIcon+", td span."+d.sSortIcon,g).detach(),h("th, td",g).each(function(){var a=h("div."+d.sSortJUIWrapper,this);h(this).append(a.contents());a.detach()}));f.children().detach();f.append(l);g=a?"remove":"detach";i[g]();k[g]();!a&&c&&(c.insertBefore(e,b.nTableReinsertBefore),i.css("width",b.sDestroyWidth).removeClass(d.sTable),(p=b.asDestroyStripes.length)&&f.children().each(function(a){h(this).addClass(b.asDestroyStripes[a%
+p])}));c=h.inArray(b,m.settings);-1!==c&&m.settings.splice(c,1)})});h.each(["column","row","cell"],function(a,b){p(b+"s().every()",function(a){var d=this.selector.opts,e=this;return this.iterator(b,function(f,g,h,i,n){a.call(e[b](g,"cell"===b?h:d,"cell"===b?d:k),g,h,i,n)})})});p("i18n()",function(a,b,c){var d=this.context[0],a=Q(a)(d.oLanguage);a===k&&(a=b);c!==k&&h.isPlainObject(a)&&(a=a[c]!==k?a[c]:a._);return a.replace("%d",c)});m.version="1.10.12";m.settings=[];m.models={};m.models.oSearch={bCaseInsensitive:!0,
+sSearch:"",bRegex:!1,bSmart:!0};m.models.oRow={nTr:null,anCells:null,_aData:[],_aSortData:null,_aFilterData:null,_sFilterRow:null,_sRowStripe:"",src:null,idx:-1};m.models.oColumn={idx:null,aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bVisible:null,_sManualType:null,_bAttrSrc:!1,fnCreatedCell:null,fnGetData:null,fnSetData:null,mData:null,mRender:null,nTh:null,nTf:null,sClass:null,sContentPadding:null,sDefaultContent:null,sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,
+sTitle:null,sType:null,sWidth:null,sWidthOrig:null};m.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:[],ajax:null,aLengthMenu:[10,25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bJQueryUI:!1,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollCollapse:!1,bServerSide:!1,bSort:!0,bSortMulti:!0,bSortCellsTop:!1,bSortClasses:!0,bStateSave:!1,fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,
+fnFormatNumber:function(a){return a.toString().replace(/\B(?=(\d{3})+(?!\d))/g,this.oLanguage.sThousands)},fnHeaderCallback:null,fnInfoCallback:null,fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnServerData:null,fnServerParams:null,fnStateLoadCallback:function(a){try{return JSON.parse((-1===a.iStateDuration?sessionStorage:localStorage).getItem("DataTables_"+a.sInstance+"_"+location.pathname))}catch(b){}},fnStateLoadParams:null,fnStateLoaded:null,fnStateSaveCallback:function(a,b){try{(-1===
+a.iStateDuration?sessionStorage:localStorage).setItem("DataTables_"+a.sInstance+"_"+location.pathname,JSON.stringify(b))}catch(c){}},fnStateSaveParams:null,iStateDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iTabIndex:0,oClasses:{},oLanguage:{oAria:{sSortAscending:": activate to sort column ascending",sSortDescending:": activate to sort column descending"},oPaginate:{sFirst:"First",sLast:"Last",sNext:"Next",sPrevious:"Previous"},sEmptyTable:"No data available in table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",
+sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sDecimal:"",sThousands:",",sLengthMenu:"Show _MENU_ entries",sLoadingRecords:"Loading...",sProcessing:"Processing...",sSearch:"Search:",sSearchPlaceholder:"",sUrl:"",sZeroRecords:"No matching records found"},oSearch:h.extend({},m.models.oSearch),sAjaxDataProp:"data",sAjaxSource:null,sDom:"lfrtip",searchDelay:null,sPaginationType:"simple_numbers",sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET",
+renderer:null,rowId:"DT_RowId"};X(m.defaults);m.defaults.column={aDataSort:null,iDataSort:-1,asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bVisible:!0,fnCreatedCell:null,mData:null,mRender:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null};X(m.defaults.column);m.models.oSettings={oFeatures:{bAutoWidth:null,bDeferRender:null,bFilter:null,bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,bServerSide:null,
+bSort:null,bSortMulti:null,bSortClasses:null,bStateSave:null},oScroll:{bCollapse:null,iBarWidth:0,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},oBrowser:{bScrollOversize:!1,bScrollbarLeft:!1,bBounding:!1,barWidth:0},ajax:null,aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aIds:{},aoColumns:[],aoHeader:[],aoFooter:[],oPreviousSearch:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:[],asStripeClasses:null,asDestroyStripes:[],sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],
+aoFooterCallback:[],aoDrawCallback:[],aoRowCreatedCallback:[],aoPreDrawCallback:[],aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,searchDelay:null,sPaginationType:"two_button",iStateDuration:0,aoStateSave:[],aoStateLoad:[],oSavedState:null,oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,bAjaxDataGet:!0,jqXHR:null,json:k,oAjaxData:k,
+fnServerData:null,aoServerParams:[],sServerMethod:null,fnFormatNumber:null,aLengthMenu:null,iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iRecordsTotal:0,_iRecordsDisplay:0,bJUI:null,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return"ssp"==y(this)?1*this._iRecordsTotal:this.aiDisplayMaster.length},fnRecordsDisplay:function(){return"ssp"==y(this)?1*this._iRecordsDisplay:this.aiDisplay.length},fnDisplayEnd:function(){var a=
+this._iDisplayLength,b=this._iDisplayStart,c=b+a,d=this.aiDisplay.length,e=this.oFeatures,f=e.bPaginate;return e.bServerSide?!1===f||-1===a?b+d:Math.min(b+a,this._iRecordsDisplay):!f||c>d||-1===a?d:c},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null,aLastSort:[],oPlugins:{},rowIdFn:null,rowId:null};m.ext=v={buttons:{},classes:{},build:"dt/dt-1.10.12,r-2.1.0,sc-1.4.2",errMode:"alert",feature:[],search:[],selector:{cell:[],column:[],row:[]},internal:{},legacy:{ajax:null},pager:{},renderer:{pageButton:{},
+header:{}},order:{},type:{detect:[],search:{},order:{}},_unique:0,fnVersionCheck:m.fnVersionCheck,iApiIndex:0,oJUIClasses:{},sVersion:m.version};h.extend(v,{afnFiltering:v.search,aTypes:v.type.detect,ofnSearch:v.type.search,oSort:v.type.order,afnSortData:v.order,aoFeatures:v.feature,oApi:v.internal,oStdClasses:v.classes,oPagination:v.pager});h.extend(m.ext.classes,{sTable:"dataTable",sNoFooter:"no-footer",sPageButton:"paginate_button",sPageButtonActive:"current",sPageButtonDisabled:"disabled",sStripeOdd:"odd",
+sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",sSortableDesc:"sorting_desc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sFilterInput:"",sLengthSelect:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",
+sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sHeaderTH:"",sFooterTH:"",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",sJUIHeader:"",sJUIFooter:""});var Ca="",Ca="",H=Ca+"ui-state-default",ia=Ca+"css_right ui-icon ui-icon-",Xb=Ca+"fg-toolbar ui-toolbar ui-widget-header ui-helper-clearfix";h.extend(m.ext.oJUIClasses,
+m.ext.classes,{sPageButton:"fg-button ui-button "+H,sPageButtonActive:"ui-state-disabled",sPageButtonDisabled:"ui-state-disabled",sPaging:"dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_",sSortAsc:H+" sorting_asc",sSortDesc:H+" sorting_desc",sSortable:H+" sorting",sSortableAsc:H+" sorting_asc_disabled",sSortableDesc:H+" sorting_desc_disabled",sSortableNone:H+" sorting_disabled",sSortJUIAsc:ia+"triangle-1-n",sSortJUIDesc:ia+"triangle-1-s",sSortJUI:ia+"carat-2-n-s",
+sSortJUIAscAllowed:ia+"carat-1-n",sSortJUIDescAllowed:ia+"carat-1-s",sSortJUIWrapper:"DataTables_sort_wrapper",sSortIcon:"DataTables_sort_icon",sScrollHead:"dataTables_scrollHead "+H,sScrollFoot:"dataTables_scrollFoot "+H,sHeaderTH:H,sFooterTH:H,sJUIHeader:Xb+" ui-corner-tl ui-corner-tr",sJUIFooter:Xb+" ui-corner-bl ui-corner-br"});var Mb=m.ext.pager;h.extend(Mb,{simple:function(){return["previous","next"]},full:function(){return["first","previous","next","last"]},numbers:function(a,b){return[ya(a,
+b)]},simple_numbers:function(a,b){return["previous",ya(a,b),"next"]},full_numbers:function(a,b){return["first","previous",ya(a,b),"next","last"]},_numbers:ya,numbers_length:7});h.extend(!0,m.ext.renderer,{pageButton:{_:function(a,b,c,d,e,f){var g=a.oClasses,j=a.oLanguage.oPaginate,i=a.oLanguage.oAria.paginate||{},k,l,m=0,p=function(b,d){var o,r,u,s,v=function(b){Ta(a,b.data.action,true)};o=0;for(r=d.length;o<r;o++){s=d[o];if(h.isArray(s)){u=h("<"+(s.DT_el||"div")+"/>").appendTo(b);p(u,s)}else{k=null;
+l="";switch(s){case "ellipsis":b.append('<span class="ellipsis">&#x2026;</span>');break;case "first":k=j.sFirst;l=s+(e>0?"":" "+g.sPageButtonDisabled);break;case "previous":k=j.sPrevious;l=s+(e>0?"":" "+g.sPageButtonDisabled);break;case "next":k=j.sNext;l=s+(e<f-1?"":" "+g.sPageButtonDisabled);break;case "last":k=j.sLast;l=s+(e<f-1?"":" "+g.sPageButtonDisabled);break;default:k=s+1;l=e===s?g.sPageButtonActive:""}if(k!==null){u=h("<a>",{"class":g.sPageButton+" "+l,"aria-controls":a.sTableId,"aria-label":i[s],
+"data-dt-idx":m,tabindex:a.iTabIndex,id:c===0&&typeof s==="string"?a.sTableId+"_"+s:null}).html(k).appendTo(b);Wa(u,{action:s},v);m++}}}},r;try{r=h(b).find(I.activeElement).data("dt-idx")}catch(o){}p(h(b).empty(),d);r&&h(b).find("[data-dt-idx="+r+"]").focus()}}});h.extend(m.ext.type.detect,[function(a,b){var c=b.oLanguage.sDecimal;return Za(a,c)?"num"+c:null},function(a){if(a&&!(a instanceof Date)&&(!ac.test(a)||!bc.test(a)))return null;var b=Date.parse(a);return null!==b&&!isNaN(b)||M(a)?"date":
+null},function(a,b){var c=b.oLanguage.sDecimal;return Za(a,c,!0)?"num-fmt"+c:null},function(a,b){var c=b.oLanguage.sDecimal;return Rb(a,c)?"html-num"+c:null},function(a,b){var c=b.oLanguage.sDecimal;return Rb(a,c,!0)?"html-num-fmt"+c:null},function(a){return M(a)||"string"===typeof a&&-1!==a.indexOf("<")?"html":null}]);h.extend(m.ext.type.search,{html:function(a){return M(a)?a:"string"===typeof a?a.replace(Ob," ").replace(Aa,""):""},string:function(a){return M(a)?a:"string"===typeof a?a.replace(Ob,
+" "):a}});var za=function(a,b,c,d){if(0!==a&&(!a||"-"===a))return-Infinity;b&&(a=Qb(a,b));a.replace&&(c&&(a=a.replace(c,"")),d&&(a=a.replace(d,"")));return 1*a};h.extend(v.type.order,{"date-pre":function(a){return Date.parse(a)||0},"html-pre":function(a){return M(a)?"":a.replace?a.replace(/<.*?>/g,"").toLowerCase():a+""},"string-pre":function(a){return M(a)?"":"string"===typeof a?a.toLowerCase():!a.toString?"":a.toString()},"string-asc":function(a,b){return a<b?-1:a>b?1:0},"string-desc":function(a,
+b){return a<b?1:a>b?-1:0}});db("");h.extend(!0,m.ext.renderer,{header:{_:function(a,b,c,d){h(a.nTable).on("order.dt.DT",function(e,f,g,h){if(a===f){e=c.idx;b.removeClass(c.sSortingClass+" "+d.sSortAsc+" "+d.sSortDesc).addClass(h[e]=="asc"?d.sSortAsc:h[e]=="desc"?d.sSortDesc:c.sSortingClass)}})},jqueryui:function(a,b,c,d){h("<div/>").addClass(d.sSortJUIWrapper).append(b.contents()).append(h("<span/>").addClass(d.sSortIcon+" "+c.sSortingClassJUI)).appendTo(b);h(a.nTable).on("order.dt.DT",function(e,
+f,g,h){if(a===f){e=c.idx;b.removeClass(d.sSortAsc+" "+d.sSortDesc).addClass(h[e]=="asc"?d.sSortAsc:h[e]=="desc"?d.sSortDesc:c.sSortingClass);b.find("span."+d.sSortIcon).removeClass(d.sSortJUIAsc+" "+d.sSortJUIDesc+" "+d.sSortJUI+" "+d.sSortJUIAscAllowed+" "+d.sSortJUIDescAllowed).addClass(h[e]=="asc"?d.sSortJUIAsc:h[e]=="desc"?d.sSortJUIDesc:c.sSortingClassJUI)}})}}});var Yb=function(a){return"string"===typeof a?a.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"):a};m.render={number:function(a,
+b,c,d,e){return{display:function(f){if("number"!==typeof f&&"string"!==typeof f)return f;var g=0>f?"-":"",h=parseFloat(f);if(isNaN(h))return Yb(f);f=Math.abs(h);h=parseInt(f,10);f=c?b+(f-h).toFixed(c).substring(2):"";return g+(d||"")+h.toString().replace(/\B(?=(\d{3})+(?!\d))/g,a)+f+(e||"")}}},text:function(){return{display:Yb}}};h.extend(m.ext.internal,{_fnExternApiFunc:Nb,_fnBuildAjax:ra,_fnAjaxUpdate:lb,_fnAjaxParameters:ub,_fnAjaxUpdateDraw:vb,_fnAjaxDataSrc:sa,_fnAddColumn:Ea,_fnColumnOptions:ja,
+_fnAdjustColumnSizing:Y,_fnVisibleToColumnIndex:Z,_fnColumnIndexToVisible:$,_fnVisbleColumns:aa,_fnGetColumns:la,_fnColumnTypes:Ga,_fnApplyColumnDefs:ib,_fnHungarianMap:X,_fnCamelToHungarian:K,_fnLanguageCompat:Da,_fnBrowserDetect:gb,_fnAddData:N,_fnAddTr:ma,_fnNodeToDataIndex:function(a,b){return b._DT_RowIndex!==k?b._DT_RowIndex:null},_fnNodeToColumnIndex:function(a,b,c){return h.inArray(c,a.aoData[b].anCells)},_fnGetCellData:B,_fnSetCellData:jb,_fnSplitObjNotation:Ja,_fnGetObjectDataFn:Q,_fnSetObjectDataFn:R,
+_fnGetDataMaster:Ka,_fnClearTable:na,_fnDeleteIndex:oa,_fnInvalidate:ca,_fnGetRowElements:Ia,_fnCreateTr:Ha,_fnBuildHead:kb,_fnDrawHead:ea,_fnDraw:O,_fnReDraw:T,_fnAddOptionsHtml:nb,_fnDetectHeader:da,_fnGetUniqueThs:qa,_fnFeatureHtmlFilter:pb,_fnFilterComplete:fa,_fnFilterCustom:yb,_fnFilterColumn:xb,_fnFilter:wb,_fnFilterCreateSearch:Pa,_fnEscapeRegex:Qa,_fnFilterData:zb,_fnFeatureHtmlInfo:sb,_fnUpdateInfo:Cb,_fnInfoMacros:Db,_fnInitialise:ga,_fnInitComplete:ta,_fnLengthChange:Ra,_fnFeatureHtmlLength:ob,
+_fnFeatureHtmlPaginate:tb,_fnPageChange:Ta,_fnFeatureHtmlProcessing:qb,_fnProcessingDisplay:C,_fnFeatureHtmlTable:rb,_fnScrollDraw:ka,_fnApplyToChildren:J,_fnCalculateColumnWidths:Fa,_fnThrottle:Oa,_fnConvertToWidth:Fb,_fnGetWidestNode:Gb,_fnGetMaxLenString:Hb,_fnStringToCss:x,_fnSortFlatten:V,_fnSort:mb,_fnSortAria:Jb,_fnSortListener:Va,_fnSortAttachListener:Ma,_fnSortingClasses:va,_fnSortData:Ib,_fnSaveState:wa,_fnLoadState:Kb,_fnSettingsFromNode:xa,_fnLog:L,_fnMap:E,_fnBindAction:Wa,_fnCallbackReg:z,
+_fnCallbackFire:u,_fnLengthOverflow:Sa,_fnRenderer:Na,_fnDataSource:y,_fnRowAttributes:La,_fnCalculateEnd:function(){}});h.fn.dataTable=m;m.$=h;h.fn.dataTableSettings=m.settings;h.fn.dataTableExt=m.ext;h.fn.DataTable=function(a){return h(this).dataTable(a).api()};h.each(m,function(a,b){h.fn.DataTable[a]=b});return h.fn.dataTable});
+
+
+/*!
+ Responsive 2.1.0
+ 2014-2016 SpryMedia Ltd - datatables.net/license
+*/
+(function(c){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(l){return c(l,window,document)}):"object"===typeof exports?module.exports=function(l,k){l||(l=window);if(!k||!k.fn.dataTable)k=require("datatables.net")(l,k).$;return c(k,l,l.document)}:c(jQuery,window,document)})(function(c,l,k,p){var m=c.fn.dataTable,j=function(a,b){if(!m.versionCheck||!m.versionCheck("1.10.3"))throw"DataTables Responsive requires DataTables 1.10.3 or newer";this.s={dt:new m.Api(a),columns:[],
+current:[]};this.s.dt.settings()[0].responsive||(b&&"string"===typeof b.details?b.details={type:b.details}:b&&!1===b.details?b.details={type:!1}:b&&!0===b.details&&(b.details={type:"inline"}),this.c=c.extend(!0,{},j.defaults,m.defaults.responsive,b),a.responsive=this,this._constructor())};c.extend(j.prototype,{_constructor:function(){var a=this,b=this.s.dt,d=b.settings()[0],e=c(l).width();b.settings()[0]._responsive=this;c(l).on("resize.dtr orientationchange.dtr",m.util.throttle(function(){var b=
+c(l).width();b!==e&&(a._resize(),e=b)}));d.oApi._fnCallbackReg(d,"aoRowCreatedCallback",function(e){-1!==c.inArray(!1,a.s.current)&&c("td, th",e).each(function(e){e=b.column.index("toData",e);!1===a.s.current[e]&&c(this).css("display","none")})});b.on("destroy.dtr",function(){b.off(".dtr");c(b.table().body()).off(".dtr");c(l).off("resize.dtr orientationchange.dtr");c.each(a.s.current,function(b,e){!1===e&&a._setColumnVis(b,!0)})});this.c.breakpoints.sort(function(a,b){return a.width<b.width?1:a.width>
+b.width?-1:0});this._classLogic();this._resizeAuto();d=this.c.details;!1!==d.type&&(a._detailsInit(),b.on("column-visibility.dtr",function(){a._classLogic();a._resizeAuto();a._resize()}),b.on("draw.dtr",function(){a._redrawChildren()}),c(b.table().node()).addClass("dtr-"+d.type));b.on("column-reorder.dtr",function(){a._classLogic();a._resizeAuto();a._resize()});b.on("column-sizing.dtr",function(){a._resizeAuto();a._resize()});b.on("init.dtr",function(){a._resizeAuto();a._resize();c.inArray(false,
+a.s.current)&&b.columns.adjust()});this._resize()},_columnsVisiblity:function(a){var b=this.s.dt,d=this.s.columns,e,f,g=d.map(function(a,b){return{columnIdx:b,priority:a.priority}}).sort(function(a,b){return a.priority!==b.priority?a.priority-b.priority:a.columnIdx-b.columnIdx}),h=c.map(d,function(b){return b.auto&&null===b.minWidth?!1:!0===b.auto?"-":-1!==c.inArray(a,b.includeIn)}),n=0;e=0;for(f=h.length;e<f;e++)!0===h[e]&&(n+=d[e].minWidth);e=b.settings()[0].oScroll;e=e.sY||e.sX?e.iBarWidth:0;b=
+b.table().container().offsetWidth-e-n;e=0;for(f=h.length;e<f;e++)d[e].control&&(b-=d[e].minWidth);n=!1;e=0;for(f=g.length;e<f;e++){var i=g[e].columnIdx;"-"===h[i]&&(!d[i].control&&d[i].minWidth)&&(n||0>b-d[i].minWidth?(n=!0,h[i]=!1):h[i]=!0,b-=d[i].minWidth)}g=!1;e=0;for(f=d.length;e<f;e++)if(!d[e].control&&!d[e].never&&!h[e]){g=!0;break}e=0;for(f=d.length;e<f;e++)d[e].control&&(h[e]=g);-1===c.inArray(!0,h)&&(h[0]=!0);return h},_classLogic:function(){var a=this,b=this.c.breakpoints,d=this.s.dt,e=
+d.columns().eq(0).map(function(a){var b=this.column(a),e=b.header().className,a=d.settings()[0].aoColumns[a].responsivePriority;a===p&&(b=c(b.header()).data("priority"),a=b!==p?1*b:1E4);return{className:e,includeIn:[],auto:!1,control:!1,never:e.match(/\bnever\b/)?!0:!1,priority:a}}),f=function(a,b){var d=e[a].includeIn;-1===c.inArray(b,d)&&d.push(b)},g=function(c,d,i,g){if(i)if("max-"===i){g=a._find(d).width;d=0;for(i=b.length;d<i;d++)b[d].width<=g&&f(c,b[d].name)}else if("min-"===i){g=a._find(d).width;
+d=0;for(i=b.length;d<i;d++)b[d].width>=g&&f(c,b[d].name)}else{if("not-"===i){d=0;for(i=b.length;d<i;d++)-1===b[d].name.indexOf(g)&&f(c,b[d].name)}}else e[c].includeIn.push(d)};e.each(function(a,e){for(var d=a.className.split(" "),f=!1,j=0,l=d.length;j<l;j++){var k=c.trim(d[j]);if("all"===k){f=!0;a.includeIn=c.map(b,function(a){return a.name});return}if("none"===k||a.never){f=!0;return}if("control"===k){f=!0;a.control=!0;return}c.each(b,function(a,b){var d=b.name.split("-"),c=k.match(RegExp("(min\\-|max\\-|not\\-)?("+
+d[0]+")(\\-[_a-zA-Z0-9])?"));c&&(f=!0,c[2]===d[0]&&c[3]==="-"+d[1]?g(e,b.name,c[1],c[2]+c[3]):c[2]===d[0]&&!c[3]&&g(e,b.name,c[1],c[2]))})}f||(a.auto=!0)});this.s.columns=e},_detailsDisplay:function(a,b){var d=this,e=this.s.dt,f=this.c.details;if(f&&!1!==f.type){var g=f.display(a,b,function(){return f.renderer(e,a[0],d._detailsObj(a[0]))});(!0===g||!1===g)&&c(e.table().node()).triggerHandler("responsive-display.dt",[e,a,g,b])}},_detailsInit:function(){var a=this,b=this.s.dt,d=this.c.details;"inline"===
+d.type&&(d.target="td:first-child, th:first-child");b.on("draw.dtr",function(){a._tabIndexes()});a._tabIndexes();c(b.table().body()).on("keyup.dtr","td, th",function(a){a.keyCode===13&&c(this).data("dtr-keyboard")&&c(this).click()});var e=d.target;c(b.table().body()).on("click.dtr mousedown.dtr mouseup.dtr","string"===typeof e?e:"td, th",function(d){if(c(b.table().node()).hasClass("collapsed")&&b.row(c(this).closest("tr")).length){if(typeof e==="number"){var g=e<0?b.columns().eq(0).length+e:e;if(b.cell(this).index().column!==
+g)return}g=b.row(c(this).closest("tr"));d.type==="click"?a._detailsDisplay(g,false):d.type==="mousedown"?c(this).css("outline","none"):d.type==="mouseup"&&c(this).blur().css("outline","")}})},_detailsObj:function(a){var b=this,d=this.s.dt;return c.map(this.s.columns,function(e,c){if(!e.never&&!e.control)return{title:d.settings()[0].aoColumns[c].sTitle,data:d.cell(a,c).render(b.c.orthogonal),hidden:d.column(c).visible()&&!b.s.current[c],columnIndex:c,rowIndex:a}})},_find:function(a){for(var b=this.c.breakpoints,
+d=0,c=b.length;d<c;d++)if(b[d].name===a)return b[d]},_redrawChildren:function(){var a=this,b=this.s.dt;b.rows({page:"current"}).iterator("row",function(c,e){b.row(e);a._detailsDisplay(b.row(e),!0)})},_resize:function(){var a=this,b=this.s.dt,d=c(l).width(),e=this.c.breakpoints,f=e[0].name,g=this.s.columns,h,j=this.s.current.slice();for(h=e.length-1;0<=h;h--)if(d<=e[h].width){f=e[h].name;break}var i=this._columnsVisiblity(f);this.s.current=i;e=!1;h=0;for(d=g.length;h<d;h++)if(!1===i[h]&&!g[h].never&&
+!g[h].control){e=!0;break}c(b.table().node()).toggleClass("collapsed",e);var k=!1;b.columns().eq(0).each(function(b,c){i[c]!==j[c]&&(k=!0,a._setColumnVis(b,i[c]))});k&&(this._redrawChildren(),c(b.table().node()).trigger("responsive-resize.dt",[b,this.s.current]))},_resizeAuto:function(){var a=this.s.dt,b=this.s.columns;if(this.c.auto&&-1!==c.inArray(!0,c.map(b,function(a){return a.auto}))){a.table().node();var d=a.table().node().cloneNode(!1),e=c(a.table().header().cloneNode(!1)).appendTo(d),f=c(a.table().body()).clone(!1,
+!1).empty().appendTo(d),g=a.columns().header().filter(function(b){return a.column(b).visible()}).to$().clone(!1).css("display","table-cell");c(f).append(c(a.rows({page:"current"}).nodes()).clone(!1)).find("th, td").css("display","");if(f=a.table().footer()){var f=c(f.cloneNode(!1)).appendTo(d),h=a.columns().footer().filter(function(b){return a.column(b).visible()}).to$().clone(!1).css("display","table-cell");c("<tr/>").append(h).appendTo(f)}c("<tr/>").append(g).appendTo(e);"inline"===this.c.details.type&&
+c(d).addClass("dtr-inline collapsed");c(d).find("[name]").removeAttr("name");d=c("<div/>").css({width:1,height:1,overflow:"hidden"}).append(d);d.insertBefore(a.table().node());g.each(function(c){c=a.column.index("fromVisible",c);b[c].minWidth=this.offsetWidth||0});d.remove()}},_setColumnVis:function(a,b){var d=this.s.dt,e=b?"":"none";c(d.column(a).header()).css("display",e);c(d.column(a).footer()).css("display",e);d.column(a).nodes().to$().css("display",e)},_tabIndexes:function(){var a=this.s.dt,
+b=a.cells({page:"current"}).nodes().to$(),d=a.settings()[0],e=this.c.details.target;b.filter("[data-dtr-keyboard]").removeData("[data-dtr-keyboard]");c("number"===typeof e?":eq("+e+")":e,a.rows({page:"current"}).nodes()).attr("tabIndex",d.iTabIndex).data("dtr-keyboard",1)}});j.breakpoints=[{name:"desktop",width:Infinity},{name:"tablet-l",width:1024},{name:"tablet-p",width:768},{name:"mobile-l",width:480},{name:"mobile-p",width:320}];j.display={childRow:function(a,b,d){if(b){if(c(a.node()).hasClass("parent"))return a.child(d(),
+"child").show(),!0}else{if(a.child.isShown())return a.child(!1),c(a.node()).removeClass("parent"),!1;a.child(d(),"child").show();c(a.node()).addClass("parent");return!0}},childRowImmediate:function(a,b,d){if(!b&&a.child.isShown()||!a.responsive.hasHidden())return a.child(!1),c(a.node()).removeClass("parent"),!1;a.child(d(),"child").show();c(a.node()).addClass("parent");return!0},modal:function(a){return function(b,d,e){if(d)c("div.dtr-modal-content").empty().append(e());else{var f=function(){g.remove();
+c(k).off("keypress.dtr")},g=c('<div class="dtr-modal"/>').append(c('<div class="dtr-modal-display"/>').append(c('<div class="dtr-modal-content"/>').append(e())).append(c('<div class="dtr-modal-close">&times;</div>').click(function(){f()}))).append(c('<div class="dtr-modal-background"/>').click(function(){f()})).appendTo("body");c(k).on("keyup.dtr",function(a){27===a.keyCode&&(a.stopPropagation(),f())})}a&&a.header&&c("div.dtr-modal-content").prepend("<h2>"+a.header(b)+"</h2>")}}};j.renderer={listHidden:function(){return function(a,
+b,d){return(a=c.map(d,function(a){return a.hidden?'<li data-dtr-index="'+a.columnIndex+'" data-dt-row="'+a.rowIndex+'" data-dt-column="'+a.columnIndex+'"><span class="dtr-title">'+a.title+'</span> <span class="dtr-data">'+a.data+"</span></li>":""}).join(""))?c('<ul data-dtr-index="'+b+'"/>').append(a):!1}},tableAll:function(a){a=c.extend({tableClass:""},a);return function(b,d,e){b=c.map(e,function(a){return'<tr data-dt-row="'+a.rowIndex+'" data-dt-column="'+a.columnIndex+'"><td>'+a.title+":</td> <td>"+
+a.data+"</td></tr>"}).join("");return c('<table class="'+a.tableClass+'" width="100%"/>').append(b)}}};j.defaults={breakpoints:j.breakpoints,auto:!0,details:{display:j.display.childRow,renderer:j.renderer.listHidden(),target:0,type:"inline"},orthogonal:"display"};var o=c.fn.dataTable.Api;o.register("responsive()",function(){return this});o.register("responsive.index()",function(a){a=c(a);return{column:a.data("dtr-index"),row:a.parent().data("dtr-index")}});o.register("responsive.rebuild()",function(){return this.iterator("table",
+function(a){a._responsive&&a._responsive._classLogic()})});o.register("responsive.recalc()",function(){return this.iterator("table",function(a){a._responsive&&(a._responsive._resizeAuto(),a._responsive._resize())})});o.register("responsive.hasHidden()",function(){var a=this.context[0];return a._responsive?-1!==c.inArray(!1,a._responsive.s.current):!1});j.version="2.1.0";c.fn.dataTable.Responsive=j;c.fn.DataTable.Responsive=j;c(k).on("preInit.dt.dtr",function(a,b){if("dt"===a.namespace&&(c(b.nTable).hasClass("responsive")||
+c(b.nTable).hasClass("dt-responsive")||b.oInit.responsive||m.defaults.responsive)){var d=b.oInit.responsive;!1!==d&&new j(b,c.isPlainObject(d)?d:{})}});return j});
+
+
+/*!
+ Scroller 1.4.2
+ ©2011-2016 SpryMedia Ltd - datatables.net/license
+*/
+(function(e){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(h){return e(h,window,document)}):"object"===typeof exports?module.exports=function(h,j){h||(h=window);if(!j||!j.fn.dataTable)j=require("datatables.net")(h,j).$;return e(j,h,h.document)}:e(jQuery,window,document)})(function(e,h,j,l){var m=e.fn.dataTable,g=function(a,b){this instanceof g?(b===l&&(b={}),this.s={dt:e.fn.dataTable.Api(a).settings()[0],tableTop:0,tableBottom:0,redrawTop:0,redrawBottom:0,autoHeight:!0,
+viewportRows:0,stateTO:null,drawTO:null,heights:{jump:null,page:null,virtual:null,scroll:null,row:null,viewport:null},topRowFloat:0,scrollDrawDiff:null,loaderVisible:!1},this.s=e.extend(this.s,g.oDefaults,b),this.s.heights.row=this.s.rowHeight,this.dom={force:j.createElement("div"),scroller:null,table:null,loader:null},this.s.dt.oScroller||(this.s.dt.oScroller=this,this._fnConstruct())):alert("Scroller warning: Scroller must be initialised with the 'new' keyword.")};e.extend(g.prototype,{fnRowToPixels:function(a,
+b,c){a=c?this._domain("virtualToPhysical",a*this.s.heights.row):this.s.baseScrollTop+(a-this.s.baseRowTop)*this.s.heights.row;return b||b===l?parseInt(a,10):a},fnPixelsToRow:function(a,b,c){var d=a-this.s.baseScrollTop,a=c?this._domain("physicalToVirtual",a)/this.s.heights.row:d/this.s.heights.row+this.s.baseRowTop;return b||b===l?parseInt(a,10):a},fnScrollToRow:function(a,b){var c=this,d=!1,f=this.fnRowToPixels(a),i=a-(this.s.displayBuffer-1)/2*this.s.viewportRows;0>i&&(i=0);if((f>this.s.redrawBottom||
+f<this.s.redrawTop)&&this.s.dt._iDisplayStart!==i)d=!0,f=this.fnRowToPixels(a,!1,!0);"undefined"==typeof b||b?(this.s.ani=d,e(this.dom.scroller).animate({scrollTop:f},function(){setTimeout(function(){c.s.ani=!1},25)})):e(this.dom.scroller).scrollTop(f)},fnMeasure:function(a){this.s.autoHeight&&this._fnCalcRowHeight();var b=this.s.heights;b.row&&(b.viewport=e(this.dom.scroller).height(),this.s.viewportRows=parseInt(b.viewport/b.row,10)+1,this.s.dt._iDisplayLength=this.s.viewportRows*this.s.displayBuffer);
+(a===l||a)&&this.s.dt.oInstance.fnDraw(!1)},fnPageInfo:function(){var a=this.dom.scroller.scrollTop,b=this.s.dt.fnRecordsDisplay(),c=Math.ceil(this.fnPixelsToRow(a+this.s.heights.viewport,!1,this.s.ani));return{start:Math.floor(this.fnPixelsToRow(a,!1,this.s.ani)),end:b<c?b-1:c-1}},_fnConstruct:function(){var a=this;if(this.s.dt.oFeatures.bPaginate){this.dom.force.style.position="relative";this.dom.force.style.top="0px";this.dom.force.style.left="0px";this.dom.force.style.width="1px";this.dom.scroller=
+e("div."+this.s.dt.oClasses.sScrollBody,this.s.dt.nTableWrapper)[0];this.dom.scroller.appendChild(this.dom.force);this.dom.scroller.style.position="relative";this.dom.table=e(">table",this.dom.scroller)[0];this.dom.table.style.position="absolute";this.dom.table.style.top="0px";this.dom.table.style.left="0px";e(this.s.dt.nTableWrapper).addClass("DTS");this.s.loadingIndicator&&(this.dom.loader=e('<div class="dataTables_processing DTS_Loading">'+this.s.dt.oLanguage.sLoadingRecords+"</div>").css("display",
+"none"),e(this.dom.scroller.parentNode).css("position","relative").append(this.dom.loader));this.s.heights.row&&"auto"!=this.s.heights.row&&(this.s.autoHeight=!1);this.fnMeasure(!1);this.s.ingnoreScroll=!0;this.s.stateSaveThrottle=this.s.dt.oApi._fnThrottle(function(){a.s.dt.oApi._fnSaveState(a.s.dt)},500);e(this.dom.scroller).on("scroll.DTS",function(){a._fnScroll.call(a)});e(this.dom.scroller).on("touchstart.DTS",function(){a._fnScroll.call(a)});this.s.dt.aoDrawCallback.push({fn:function(){a.s.dt.bInitialised&&
+a._fnDrawCallback.call(a)},sName:"Scroller"});e(h).on("resize.DTS",function(){a.fnMeasure(false);a._fnInfo()});var b=!0;this.s.dt.oApi._fnCallbackReg(this.s.dt,"aoStateSaveParams",function(c,d){if(b&&a.s.dt.oLoadedState){d.iScroller=a.s.dt.oLoadedState.iScroller;d.iScrollerTopRow=a.s.dt.oLoadedState.iScrollerTopRow;b=false}else{d.iScroller=a.dom.scroller.scrollTop;d.iScrollerTopRow=a.s.topRowFloat}},"Scroller_State");this.s.dt.oLoadedState&&(this.s.topRowFloat=this.s.dt.oLoadedState.iScrollerTopRow||
+0);e(this.s.dt.nTable).one("init.dt",function(){a.fnMeasure()});this.s.dt.aoDestroyCallback.push({sName:"Scroller",fn:function(){e(h).off("resize.DTS");e(a.dom.scroller).off("touchstart.DTS scroll.DTS");e(a.s.dt.nTableWrapper).removeClass("DTS");e("div.DTS_Loading",a.dom.scroller.parentNode).remove();e(a.s.dt.nTable).off("init.dt");a.dom.table.style.position="";a.dom.table.style.top="";a.dom.table.style.left=""}})}else this.s.dt.oApi._fnLog(this.s.dt,0,"Pagination must be enabled for Scroller")},
+_fnScroll:function(){var a=this,b=this.s.heights,c=this.dom.scroller.scrollTop,d;if(!this.s.skip&&!this.s.ingnoreScroll)if(this.s.dt.bFiltered||this.s.dt.bSorted)this.s.lastScrollTop=0;else{this._fnInfo();clearTimeout(this.s.stateTO);this.s.stateTO=setTimeout(function(){a.s.dt.oApi._fnSaveState(a.s.dt)},250);if(c<this.s.redrawTop||c>this.s.redrawBottom){var f=Math.ceil((this.s.displayBuffer-1)/2*this.s.viewportRows);Math.abs(c-this.s.lastScrollTop)>b.viewport||this.s.ani?(d=parseInt(this._domain("physicalToVirtual",
+c)/b.row,10)-f,this.s.topRowFloat=this._domain("physicalToVirtual",c)/b.row):(d=this.fnPixelsToRow(c)-f,this.s.topRowFloat=this.fnPixelsToRow(c,!1));0>=d?d=0:d+this.s.dt._iDisplayLength>this.s.dt.fnRecordsDisplay()?(d=this.s.dt.fnRecordsDisplay()-this.s.dt._iDisplayLength,0>d&&(d=0)):0!==d%2&&d++;if(d!=this.s.dt._iDisplayStart&&(this.s.tableTop=e(this.s.dt.nTable).offset().top,this.s.tableBottom=e(this.s.dt.nTable).height()+this.s.tableTop,b=function(){if(a.s.scrollDrawReq===null)a.s.scrollDrawReq=
+c;a.s.dt._iDisplayStart=d;a.s.dt.oApi._fnDraw(a.s.dt)},this.s.dt.oFeatures.bServerSide?(clearTimeout(this.s.drawTO),this.s.drawTO=setTimeout(b,this.s.serverWait)):b(),this.dom.loader&&!this.s.loaderVisible))this.dom.loader.css("display","block"),this.s.loaderVisible=!0}else this.s.topRowFloat=this._domain("physicalToVirtual",c)/b.row;this.s.lastScrollTop=c;this.s.stateSaveThrottle()}},_domain:function(a,b){var c=this.s.heights,d;if(c.virtual===c.scroll)return b;var e=(c.scroll-c.viewport)/2,i=(c.virtual-
+c.viewport)/2;d=i/(e*e);if("virtualToPhysical"===a){if(b<i)return Math.pow(b/d,0.5);b=2*i-b;return 0>b?c.scroll:2*e-Math.pow(b/d,0.5)}if("physicalToVirtual"===a){if(b<e)return b*b*d;b=2*e-b;return 0>b?c.virtual:2*i-b*b*d}},_fnDrawCallback:function(){var a=this,b=this.s.heights,c=this.dom.scroller.scrollTop,d=e(this.s.dt.nTable).height(),f=this.s.dt._iDisplayStart,i=this.s.dt._iDisplayLength,g=this.s.dt.fnRecordsDisplay();this.s.skip=!0;this._fnScrollForce();c=0===f?this.s.topRowFloat*b.row:f+i>=g?
+b.scroll-(g-this.s.topRowFloat)*b.row:this._domain("virtualToPhysical",this.s.topRowFloat*b.row);this.dom.scroller.scrollTop=c;this.s.baseScrollTop=c;this.s.baseRowTop=this.s.topRowFloat;var h=c-(this.s.topRowFloat-f)*b.row;0===f?h=0:f+i>=g&&(h=b.scroll-d);this.dom.table.style.top=h+"px";this.s.tableTop=h;this.s.tableBottom=d+this.s.tableTop;d=(c-this.s.tableTop)*this.s.boundaryScale;this.s.redrawTop=c-d;this.s.redrawBottom=c+d;this.s.skip=!1;this.s.dt.oFeatures.bStateSave&&null!==this.s.dt.oLoadedState&&
+"undefined"!=typeof this.s.dt.oLoadedState.iScroller?((c=(this.s.dt.sAjaxSource||a.s.dt.ajax)&&!this.s.dt.oFeatures.bServerSide?!0:!1)&&2==this.s.dt.iDraw||!c&&1==this.s.dt.iDraw)&&setTimeout(function(){e(a.dom.scroller).scrollTop(a.s.dt.oLoadedState.iScroller);a.s.redrawTop=a.s.dt.oLoadedState.iScroller-b.viewport/2;setTimeout(function(){a.s.ingnoreScroll=!1},0)},0):a.s.ingnoreScroll=!1;this.s.dt.oFeatures.bInfo&&setTimeout(function(){a._fnInfo.call(a)},0);this.dom.loader&&this.s.loaderVisible&&
+(this.dom.loader.css("display","none"),this.s.loaderVisible=!1)},_fnScrollForce:function(){var a=this.s.heights;a.virtual=a.row*this.s.dt.fnRecordsDisplay();a.scroll=a.virtual;1E6<a.scroll&&(a.scroll=1E6);this.dom.force.style.height=a.scroll>this.s.heights.row?a.scroll+"px":this.s.heights.row+"px"},_fnCalcRowHeight:function(){var a=this.s.dt,b=a.nTable,c=b.cloneNode(!1),d=e("<tbody/>").appendTo(c),f=e('<div class="'+a.oClasses.sWrapper+' DTS"><div class="'+a.oClasses.sScrollWrapper+'"><div class="'+
+a.oClasses.sScrollBody+'"></div></div></div>');for(e("tbody tr:lt(4)",b).clone().appendTo(d);3>e("tr",d).length;)d.append("<tr><td>&nbsp;</td></tr>");e("div."+a.oClasses.sScrollBody,f).append(c);a=this.s.dt.nHolding||b.parentNode;e(a).is(":visible")||(a="body");f.appendTo(a);this.s.heights.row=e("tr",d).eq(1).outerHeight();f.remove()},_fnInfo:function(){if(this.s.dt.oFeatures.bInfo){var a=this.s.dt,b=a.oLanguage,c=this.dom.scroller.scrollTop,d=Math.floor(this.fnPixelsToRow(c,!1,this.s.ani)+1),f=a.fnRecordsTotal(),
+i=a.fnRecordsDisplay(),c=Math.ceil(this.fnPixelsToRow(c+this.s.heights.viewport,!1,this.s.ani)),c=i<c?i:c,g=a.fnFormatNumber(d),h=a.fnFormatNumber(c),j=a.fnFormatNumber(f),k=a.fnFormatNumber(i),g=0===a.fnRecordsDisplay()&&a.fnRecordsDisplay()==a.fnRecordsTotal()?b.sInfoEmpty+b.sInfoPostFix:0===a.fnRecordsDisplay()?b.sInfoEmpty+" "+b.sInfoFiltered.replace("_MAX_",j)+b.sInfoPostFix:a.fnRecordsDisplay()==a.fnRecordsTotal()?b.sInfo.replace("_START_",g).replace("_END_",h).replace("_MAX_",j).replace("_TOTAL_",
+k)+b.sInfoPostFix:b.sInfo.replace("_START_",g).replace("_END_",h).replace("_MAX_",j).replace("_TOTAL_",k)+" "+b.sInfoFiltered.replace("_MAX_",a.fnFormatNumber(a.fnRecordsTotal()))+b.sInfoPostFix;(b=b.fnInfoCallback)&&(g=b.call(a.oInstance,a,d,c,f,i,g));d=a.aanFeatures.i;if("undefined"!=typeof d){f=0;for(i=d.length;f<i;f++)e(d[f]).html(g)}e(a.nTable).triggerHandler("info.dt")}}});g.defaults={trace:!1,rowHeight:"auto",serverWait:200,displayBuffer:9,boundaryScale:0.5,loadingIndicator:!1};g.oDefaults=
+g.defaults;g.version="1.4.2";"function"==typeof e.fn.dataTable&&"function"==typeof e.fn.dataTableExt.fnVersionCheck&&e.fn.dataTableExt.fnVersionCheck("1.10.0")?e.fn.dataTableExt.aoFeatures.push({fnInit:function(a){var b=a.oInit;new g(a,b.scroller||b.oScroller||{})},cFeature:"S",sFeature:"Scroller"}):alert("Warning: Scroller requires DataTables 1.10.0 or greater - www.datatables.net/download");e(j).on("preInit.dt.dtscroller",function(a,b){if("dt"===a.namespace){var c=b.oInit.scroller,d=m.defaults.scroller;
+if(c||d)d=e.extend({},c,d),!1!==c&&new g(b,d)}});e.fn.dataTable.Scroller=g;e.fn.DataTable.Scroller=g;var k=e.fn.dataTable.Api;k.register("scroller()",function(){return this});k.register("scroller().rowToPixels()",function(a,b,c){var d=this.context;if(d.length&&d[0].oScroller)return d[0].oScroller.fnRowToPixels(a,b,c)});k.register("scroller().pixelsToRow()",function(a,b,c){var d=this.context;if(d.length&&d[0].oScroller)return d[0].oScroller.fnPixelsToRow(a,b,c)});k.register("scroller().scrollToRow()",
+function(a,b){this.iterator("table",function(c){c.oScroller&&c.oScroller.fnScrollToRow(a,b)});return this});k.register("row().scrollTo()",function(a){var b=this;this.iterator("row",function(c,d){if(c.oScroller){var e=b.rows({order:"applied",search:"applied"}).indexes().indexOf(d);c.oScroller.fnScrollToRow(e,a)}});return this});k.register("scroller.measure()",function(a){this.iterator("table",function(b){b.oScroller&&b.oScroller.fnMeasure(a)});return this});k.register("scroller.page()",function(){var a=
+this.context;if(a.length&&a[0].oScroller)return a[0].oScroller.fnPageInfo()});return g});
+
+
diff --git a/admin/survey/modules/mod_hierarhija/js/vendor/hierarhija_analize.js b/admin/survey/modules/mod_hierarhija/js/vendor/hierarhija_analize.js
new file mode 100644
index 0000000..4bd3d75
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/js/vendor/hierarhija_analize.js
@@ -0,0 +1,363 @@
+//hierarhija means - povprečja
+function means_init() {
+}
+
+//posodobimo filter analiz
+function posodobil_filter_analiz() {
+ var filter_vrednosti = {};
+ $('.filter-analize').each(function () {
+ if ($(this).val())
+ filter_vrednosti[$(this).attr('name')] = $(this).val(); //poberemo samo vpisane podatke
+ });
+
+ //če imamo prazen objekt, ni izbranega filtra
+ if (jQuery.isEmptyObject(filter_vrednosti))
+ filter_vrednosti = 0;
+
+
+ $.post("ajax.php?t=hierarhy-means&a=change", {
+ anketa: srv_meta_anketa_id,
+ filter_vrednosti: filter_vrednosti,
+ }, function () {
+ change_hierarhy_means();
+ });
+
+
+}
+
+/**
+ * Funkcija spremeni izbiro šifrantov v kolikor gre za izbiro po šifrantih ali pa po učiteljih
+ *
+ * @param {string} vrsta
+ * @return html reload
+ */
+function posodobiPrikazHierarhije(vrsta) {
+ var vrsta = vrsta || 'filtri';
+
+
+ if (vrsta == 'ucitelji') {
+ $('#ucitelji').show();
+ $('.filtri-ucitelji').show();
+ $('.hierarhija-filtri-levi').hide();
+ $('#filter-po-ucitelju').chosen();
+ }
+
+ if (vrsta == 'filtri') {
+ $('#ucitelji').hide();
+ $('.filtri-ucitelji').hide();
+ $('#predmeti-in-ucitelji').hide();
+ $('#hierarhija-specificni-ucitelj h2').html('').hide();
+ $('.hierarhija-filtri-levi').show();
+ }
+
+ $.post("ajax.php?t=hierarhy-means&a=pobrisi-filter", {
+ anketa: srv_meta_anketa_id,
+ vrsta: vrsta
+ }, function () {
+ setTimeout(function () {
+ change_hierarhy_means();
+ }, 200)
+ });
+
+}
+
+/**
+ * Posodobimo filter prikaza rezultatov, na podlagi izbire osvežimo Izbiro ustreznega učitelja predmet
+ * - agregirano: za enega učitelja skupaj povsod kjer uči
+ * - predmetih: prikažemo rezultate samo za specifični predmet
+ * @param vrednost {string}
+ */
+function posodobiPrikazFiltraPoUciteljih(vrednost){
+ var vrednost = vrednost || 'agregirano';
+
+ if (vrednost == 'predmeti') {
+ $('#ucitelji').hide();
+ $('#predmeti-in-ucitelji').show();
+ $('#hierarhija-specificni-ucitelj h2').html('').show();
+ $('#filter-po-ucitelju-in-predmetu').chosen();
+
+ }else {
+ $('#predmeti-in-ucitelji').hide();
+ $('#ucitelji').show();
+ $('#hierarhija-specificni-ucitelj h2').html('').hide();
+ $('#filter-po-ucitelju').chosen();
+ }
+
+ $.post("ajax.php?t=hierarhy-means&a=posodobi-seznam-za-ucitelje", {
+ anketa: srv_meta_anketa_id,
+ vrsta: vrednost
+ }, function () {
+ setTimeout(function () {
+ change_hierarhy_means();
+ }, 200)
+ });
+
+}
+
+/**
+ * Prikaže seznam vseh vprašanj, ki jih imamo
+ *
+ * @param {intiger} prikaz
+ */
+function tooglePrikazVprasanja(prikazi) {
+ var prikazi = prikazi || 0;
+
+ if (prikazi == 1) {
+ $('#meansRightDropdowns').animate('slow').show();
+ $('.prikazi').hide();
+ $('.skrij').show();
+ } else {
+ $('#meansRightDropdowns').animate('slow').hide();
+ $('.skrij').hide();
+ $('.prikazi').show();
+ }
+}
+
+function posodobi_izbranega_ucitelja() {
+ var id = $('#filter-po-ucitelju').val();
+
+ $.post("ajax.php?t=hierarhy-means&a=posodobi-ucitelja", {
+ anketa: srv_meta_anketa_id,
+ user_id: id
+ }, function(response) {
+ change_hierarhy_means();
+ });
+}
+
+function posodobi_izbran_predmet() {
+ var id = $('#filter-po-ucitelju-in-predmetu').val();
+
+ $.post("ajax.php?t=hierarhy-means&a=posodobi-izbran-predmet", {
+ anketa: srv_meta_anketa_id,
+ strukutra_id: id
+ }, function(response) {
+ $('#hierarhija-specificni-ucitelj h2').html(response);
+
+ change_hierarhy_means();
+ });
+}
+
+function change_hierarhy_means(action) {
+ $("#div_means_dropdowns").fadeTo(100, 0.2);
+ $("#div_means_data").fadeTo(100, 0.2);
+
+ var sequence1 = new Array();
+ var spr1 = new Array();
+ var grid1 = new Array();
+ var sequence2 = new Array();
+ var spr2 = new Array();
+ var grid2 = new Array();
+
+ var filter_vrednosti = {};
+ $('.filter-analize').each(function () {
+ if ($(this).val())
+ filter_vrednosti[$(this).attr('name')] = $(this).val(); //poberemo samo vpisane podatke
+ });
+
+
+ if (action == 'rotate') {
+ $('select[name=means_variable_2]').each(function (index, el) {
+ sequence1.push($(el).val());
+ });
+ $('select[name=means_variable_1]').each(function (index, el) {
+ sequence2.push($(el).val());
+ });
+ $('select[name=means_variable_2] option:selected').each(function (index, el) {
+ spr1.push($(el).attr("spr_id"));
+ grid1.push($(el).attr("grd_id"));
+ });
+ $('select[name=means_variable_1] option:selected').each(function (index, el) {
+ spr2.push($(el).attr("spr_id"));
+ grid2.push($(el).attr("grd_id"));
+ });
+
+ } else {
+ // prebereomo dropdown variabli
+ $('select[name=means_variable_1]').each(function (index, el) {
+ sequence1.push($(el).val());
+ });
+ $('select[name=means_variable_2]').each(function (index, el) {
+ sequence2.push($(el).val());
+ });
+ $('select[name=means_variable_1] option:selected').each(function (index, el) {
+ spr1.push($(el).attr("spr_id"));
+ grid1.push($(el).attr("grd_id"));
+ });
+ $('select[name=means_variable_2] option:selected').each(function (index, el) {
+ spr2.push($(el).attr("spr_id"));
+ grid2.push($(el).attr("grd_id"));
+ });
+ }
+
+ // pridobimo strukturo, če obstzaja
+ var strukturaId = $('#id-strukture').val() || null;
+
+ $("#div_means_dropdowns").load("ajax.php?t=hierarhy-means&a=changeDropdown", {
+ anketa: srv_meta_anketa_id,
+ sequence1: sequence1,
+ sequence2: sequence2,
+ spr1: spr1,
+ spr2: spr2,
+ grid1: grid1,
+ grid2: grid2,
+ strukturaId: strukturaId
+ }, function () {
+ if (spr1 && spr2) {
+ $("#div_means_data").load("ajax.php?t=hierarhy-means&a=change", {
+ anketa: srv_meta_anketa_id,
+ sequence1: sequence1,
+ sequence2: sequence2,
+ spr1: spr1,
+ spr2: spr2,
+ grid1: grid1,
+ grid2: grid2,
+ strukturaId: strukturaId
+ }, function () {
+
+ $("#div_means_dropdowns").fadeTo(100, 1);
+ $("#div_means_data").fadeTo(100, 1);
+ });
+ }
+ });
+}
+
+
+function hierarhy_means_add_new_variable(which) {
+
+ var sequence = new Array();
+ var spr = new Array();
+ var grid = new Array();
+
+ if (which == '2') {
+ //$('#crossRightHolder #crosstab_add_new').hide();
+ } else {
+ //$('#crossLeftHolder #crosstab_add_new').hide();
+ }
+
+ $('select[name=means_variable_' + which + ']').each(function (index, el) {
+ sequence.push($(el).val());
+ });
+ $('select[name=means_variable_' + which + '] option:selected').each(function (index, el) {
+ spr.push($(el).attr("spr_id"));
+ grid.push($(el).attr("grd_id"));
+ });
+
+ $.post("ajax.php?t=hierarhy-means&a=add_new_variable", {
+ anketa: srv_meta_anketa_id,
+ which: which,
+ sequence: sequence,
+ spr: spr,
+ grid: grid
+ }, function (response) {
+ if (which == '2') {
+ $(response).appendTo('#meansRightDropdowns');
+ } else {
+ $(response).appendTo('#meansLeftDropdowns');
+ }
+ });
+}
+
+function hierarhy_means_remove_variable(what) {
+
+ $(what).parent().remove();
+ if ($(what).parent().find('select').val() > 0) {
+ change_hierarhy_means();
+ }
+}
+function changeHierarhyMeansSubSetting() {
+ var chkMeansSeperate = $("#chkMeansSeperate").is(':checked') ? 1 : 0;
+ var chkMeansJoinPercentage = $("#chkMeansJoinPercentage").is(':checked') ? 1 : 0;
+ if (chkMeansSeperate == 1) {
+ $("#spanMeansJoinPercentage").removeClass('displayNone');
+ } else {
+ $("#spanMeansJoinPercentage").removeClass('displayNone');
+ }
+ $.post("ajax.php?t=hierarhy-means&a=changeMeansSubSetting",
+ {
+ anketa: srv_meta_anketa_id,
+ chkMeansSeperate: chkMeansSeperate,
+ chkMeansJoinPercentage: chkMeansJoinPercentage
+ },
+ function (response) {
+ change_hierarhy_means();
+
+ }
+ );
+}
+
+function doArchiveMeans() {
+ //preverimo ali obstaja vsebina meansa
+ if ($("#div_means_data").html().length > 0) {
+ $("#fullscreen").load('ajax.php?a=doArchiveAnaliza', {
+ anketa: srv_meta_anketa_id,
+ podstran: srv_meta_podstran
+ }, function () {
+
+ $('#fade').fadeTo('slow', 1);
+ $('#fullscreen').show();
+ });
+ } else {
+ alert('Ni podatkov za arhiv! Najprej kreirajte tabele.');
+ }
+}
+function submitArchiveMeans() {
+ //preverimo ali obstaja vsebina meansa
+ if ($("#div_means_data").html().length > 0) {
+ var content = $("#div_means_data").html();
+
+ var name = $("#newAnalysisArchiveName").val();
+ var note = $("#newAnalysisArchiveNote").val();
+ var access = $("[name=newAnalysisArchiveAccess]:checked").val();
+ var duration = $("#newAnalysisArchiveDuration").val();
+ var durationType = $("[name=newAADurationType]:checked").val();
+ $("#fullscreen").load('ajax.php?a=submitArchiveAnaliza', {
+ anketa: srv_meta_anketa_id,
+ podstran: srv_meta_podstran,
+ name: name,
+ note: note,
+ access: access,
+ duration: duration,
+ durationType: durationType,
+ content: content
+ }, function () {
+ $("#fullscreen").show();
+ });
+ } else {
+ alert('Ni podatkov za arhiv! Najprej kreirajte tabele.');
+ }
+}
+
+function createArchiveMeansBeforeEmail() {
+ //preverimo ali obstaja vsebina crosstaba
+ if ($("#div_means_data").html().length > 0) {
+ var content = $("#div_means_data").html();
+ $.post('ajax.php?a=createArchiveBeforeEmail', {
+ anketa: srv_meta_anketa_id,
+ podstran: srv_meta_podstran,
+ content: content
+ }, function (response) {
+ if (parseInt(response) > 0) {
+ var aid = parseInt(response);
+ $("#fullscreen").load('ajax.php?a=emailArchiveAnaliza', {
+ anketa: srv_meta_anketa_id,
+ podstran: srv_meta_podstran,
+ aid: aid
+ }, function () {
+ $('#fullscreen').show();
+ });
+ } else {
+ if (parseInt(response) == -1) {
+ alert("Nothing to archive!" + response);
+ } else {
+ alert("Error while creating archive!" + response);
+ }
+ $('#fullscreen').hide();
+ $('#fade').fadeOut('slow');
+ }
+ });
+
+ } else {
+ alert('Ni podatkov za arhiv! Najprej kreirajte tabele.');
+ }
+};
+
diff --git a/admin/survey/modules/mod_hierarhija/js/vendor/jquery.nicefileinput.min.js b/admin/survey/modules/mod_hierarhija/js/vendor/jquery.nicefileinput.min.js
new file mode 100644
index 0000000..b3acd54
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/js/vendor/jquery.nicefileinput.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.nicefileinput=function(t){var e={label:"Browse...",fullPath:!1};return t&&a.extend(e,t),this.each(function(){var t=this;if(void 0===a(t).attr("data-styled")){var l=Math.round(1e4*Math.random()),r=new Date,i=r.getTime()+l.toString(),n=a('<input type="text" readonly="readonly">').css({display:"block","float":"left",margin:0,padding:"0 5px"}).addClass("NFI-filename NFI"+i),s=a("<div>").css({overflow:"hidden",position:"relative",display:"block","float":"left","white-space":"nowrap","text-align":"center"}).addClass("NFI-button NFI"+i).attr("disabled",a(t).attr("disabled")).html(e.label);a(t).after(n),a(t).wrap(s),a(".NFI"+i).wrapAll('<div class="NFI-wrapper" id="NFI-wrapper-'+i+'" />'),a(".NFI-wrapper").css({overflow:"auto",display:"inline-block"}),a("#NFI-wrapper-"+i).addClass(a(t).attr("class")),a(t).css({opacity:0,position:"absolute",border:"none",margin:0,padding:0,top:0,right:0,cursor:"pointer",height:"60px"}).addClass("NFI-current"),a(t).on("change",function(){var l=a(t).val();if(e.fullPath)n.val(l);else{var r=l.split(/[/\\]/);n.val(r[r.length-1])}}),a(t).attr("data-styled",!0)}})}}(jQuery); \ No newline at end of file
diff --git a/admin/survey/modules/mod_hierarhija/js/vendor/jstree.min.js b/admin/survey/modules/mod_hierarhija/js/vendor/jstree.min.js
new file mode 100644
index 0000000..36dd02e
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/js/vendor/jstree.min.js
@@ -0,0 +1,6 @@
+/*! jsTree - v3.1.1 - 2015-05-04 - (MIT) */
+!function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a,b){"use strict";if(!a.jstree){var c=0,d=!1,e=!1,f=!1,g=[],h=a("script:last").attr("src"),i=window.document,j=i.createElement("LI"),k,l;j.setAttribute("role","treeitem"),k=i.createElement("I"),k.className="jstree-icon jstree-ocl",k.setAttribute("role","presentation"),j.appendChild(k),k=i.createElement("A"),k.className="jstree-anchor",k.setAttribute("href","#"),k.setAttribute("tabindex","-1"),l=i.createElement("I"),l.className="jstree-icon jstree-themeicon",l.setAttribute("role","presentation"),k.appendChild(l),j.appendChild(k),k=l=null,a.jstree={version:"3.1.1",defaults:{plugins:[]},plugins:{},path:h&&-1!==h.indexOf("/")?h.replace(/\/[^\/]+$/,""):"",idregex:/[\\:&!^|()\[\]<>@*'+~#";.,=\- \/${}%?`]/g},a.jstree.create=function(b,d){var e=new a.jstree.core(++c),f=d;return d=a.extend(!0,{},a.jstree.defaults,d),f&&f.plugins&&(d.plugins=f.plugins),a.each(d.plugins,function(a,b){"core"!==a&&(e=e.plugin(b,d[b]))}),a(b).data("jstree",e),e.init(b,d),e},a.jstree.destroy=function(){a(".jstree:jstree").jstree("destroy"),a(i).off(".jstree")},a.jstree.core=function(a){this._id=a,this._cnt=0,this._wrk=null,this._data={core:{themes:{name:!1,dots:!1,icons:!1},selected:[],last_error:{},working:!1,worker_queue:[],focused:null}}},a.jstree.reference=function(b){var c=null,d=null;if(!b||!b.id||b.tagName&&b.nodeType||(b=b.id),!d||!d.length)try{d=a(b)}catch(e){}if(!d||!d.length)try{d=a("#"+b.replace(a.jstree.idregex,"\\$&"))}catch(e){}return d&&d.length&&(d=d.closest(".jstree")).length&&(d=d.data("jstree"))?c=d:a(".jstree").each(function(){var d=a(this).data("jstree");return d&&d._model.data[b]?(c=d,!1):void 0}),c},a.fn.jstree=function(c){var d="string"==typeof c,e=Array.prototype.slice.call(arguments,1),f=null;return c!==!0||this.length?(this.each(function(){var g=a.jstree.reference(this),h=d&&g?g[c]:null;return f=d&&h?h.apply(g,e):null,g||d||c!==b&&!a.isPlainObject(c)||a.jstree.create(this,c),(g&&!d||c===!0)&&(f=g||!1),null!==f&&f!==b?!1:void 0}),null!==f&&f!==b?f:this):!1},a.expr[":"].jstree=a.expr.createPseudo(function(c){return function(c){return a(c).hasClass("jstree")&&a(c).data("jstree")!==b}}),a.jstree.defaults.core={data:!1,strings:!1,check_callback:!1,error:a.noop,animation:200,multiple:!0,themes:{name:!1,url:!1,dir:!1,dots:!0,icons:!0,stripes:!1,variant:!1,responsive:!1},expand_selected_onload:!0,worker:!0,force_text:!1,dblclick_toggle:!0},a.jstree.core.prototype={plugin:function(b,c){var d=a.jstree.plugins[b];return d?(this._data[b]={},d.prototype=this,new d(c,this)):this},init:function(b,c){this._model={data:{"#":{id:"#",parent:null,parents:[],children:[],children_d:[],state:{loaded:!1}}},changed:[],force_full_redraw:!1,redraw_timeout:!1,default_state:{loaded:!0,opened:!1,selected:!1,disabled:!1}},this.element=a(b).addClass("jstree jstree-"+this._id),this.settings=c,this._data.core.ready=!1,this._data.core.loaded=!1,this._data.core.rtl="rtl"===this.element.css("direction"),this.element[this._data.core.rtl?"addClass":"removeClass"]("jstree-rtl"),this.element.attr("role","tree"),this.settings.core.multiple&&this.element.attr("aria-multiselectable",!0),this.element.attr("tabindex")||this.element.attr("tabindex","0"),this.bind(),this.trigger("init"),this._data.core.original_container_html=this.element.find(" > ul > li").clone(!0),this._data.core.original_container_html.find("li").addBack().contents().filter(function(){return 3===this.nodeType&&(!this.nodeValue||/^\s+$/.test(this.nodeValue))}).remove(),this.element.html("<ul class='jstree-container-ul jstree-children' role='group'><li id='j"+this._id+"_loading' class='jstree-initial-node jstree-loading jstree-leaf jstree-last' role='tree-item'><i class='jstree-icon jstree-ocl'></i><a class='jstree-anchor' href='#'><i class='jstree-icon jstree-themeicon-hidden'></i>"+this.get_string("Loading ...")+"</a></li></ul>"),this.element.attr("aria-activedescendant","j"+this._id+"_loading"),this._data.core.li_height=this.get_container_ul().children("li").first().height()||24,this.trigger("loading"),this.load_node("#")},destroy:function(a){if(this._wrk)try{window.URL.revokeObjectURL(this._wrk),this._wrk=null}catch(b){}a||this.element.empty(),this.teardown()},teardown:function(){this.unbind(),this.element.removeClass("jstree").removeData("jstree").find("[class^='jstree']").addBack().attr("class",function(){return this.className.replace(/jstree[^ ]*|$/gi,"")}),this.element=null},bind:function(){var b="",c=null,d=0;this.element.on("dblclick.jstree",function(){if(i.selection&&i.selection.empty)i.selection.empty();else if(window.getSelection){var a=window.getSelection();try{a.removeAllRanges(),a.collapse()}catch(b){}}}).on("mousedown.jstree",a.proxy(function(a){a.target===this.element[0]&&(a.preventDefault(),d=+new Date)},this)).on("mousedown.jstree",".jstree-ocl",function(a){a.preventDefault()}).on("click.jstree",".jstree-ocl",a.proxy(function(a){this.toggle_node(a.target)},this)).on("dblclick.jstree",".jstree-anchor",a.proxy(function(a){this.settings.core.dblclick_toggle&&this.toggle_node(a.target)},this)).on("click.jstree",".jstree-anchor",a.proxy(function(b){b.preventDefault(),b.currentTarget!==i.activeElement&&a(b.currentTarget).focus(),this.activate_node(b.currentTarget,b)},this)).on("keydown.jstree",".jstree-anchor",a.proxy(function(b){if("INPUT"===b.target.tagName)return!0;if(32!==b.which&&13!==b.which&&(b.shiftKey||b.ctrlKey||b.altKey||b.metaKey))return!0;var c=null;switch(this._data.core.rtl&&(37===b.which?b.which=39:39===b.which&&(b.which=37)),b.which){case 32:b.ctrlKey&&(b.type="click",a(b.currentTarget).trigger(b));break;case 13:b.type="click",a(b.currentTarget).trigger(b);break;case 37:b.preventDefault(),this.is_open(b.currentTarget)?this.close_node(b.currentTarget):(c=this.get_parent(b.currentTarget),c&&"#"!==c.id&&this.get_node(c,!0).children(".jstree-anchor").focus());break;case 38:b.preventDefault(),c=this.get_prev_dom(b.currentTarget),c&&c.length&&c.children(".jstree-anchor").focus();break;case 39:b.preventDefault(),this.is_closed(b.currentTarget)?this.open_node(b.currentTarget,function(a){this.get_node(a,!0).children(".jstree-anchor").focus()}):this.is_open(b.currentTarget)&&(c=this.get_node(b.currentTarget,!0).children(".jstree-children")[0],c&&a(this._firstChild(c)).children(".jstree-anchor").focus());break;case 40:b.preventDefault(),c=this.get_next_dom(b.currentTarget),c&&c.length&&c.children(".jstree-anchor").focus();break;case 106:this.open_all();break;case 36:b.preventDefault(),c=this._firstChild(this.get_container_ul()[0]),c&&a(c).children(".jstree-anchor").filter(":visible").focus();break;case 35:b.preventDefault(),this.element.find(".jstree-anchor").filter(":visible").last().focus()}},this)).on("load_node.jstree",a.proxy(function(b,c){c.status&&("#"!==c.node.id||this._data.core.loaded||(this._data.core.loaded=!0,this._firstChild(this.get_container_ul()[0])&&this.element.attr("aria-activedescendant",this._firstChild(this.get_container_ul()[0]).id),this.trigger("loaded")),this._data.core.ready||setTimeout(a.proxy(function(){if(this.element&&!this.get_container_ul().find(".jstree-loading").length){if(this._data.core.ready=!0,this._data.core.selected.length){if(this.settings.core.expand_selected_onload){var b=[],c,d;for(c=0,d=this._data.core.selected.length;d>c;c++)b=b.concat(this._model.data[this._data.core.selected[c]].parents);for(b=a.vakata.array_unique(b),c=0,d=b.length;d>c;c++)this.open_node(b[c],!1,0)}this.trigger("changed",{action:"ready",selected:this._data.core.selected})}this.trigger("ready")}},this),0))},this)).on("keypress.jstree",a.proxy(function(d){if("INPUT"===d.target.tagName)return!0;c&&clearTimeout(c),c=setTimeout(function(){b=""},500);var e=String.fromCharCode(d.which).toLowerCase(),f=this.element.find(".jstree-anchor").filter(":visible"),g=f.index(i.activeElement)||0,h=!1;if(b+=e,b.length>1){if(f.slice(g).each(a.proxy(function(c,d){return 0===a(d).text().toLowerCase().indexOf(b)?(a(d).focus(),h=!0,!1):void 0},this)),h)return;if(f.slice(0,g).each(a.proxy(function(c,d){return 0===a(d).text().toLowerCase().indexOf(b)?(a(d).focus(),h=!0,!1):void 0},this)),h)return}if(new RegExp("^"+e+"+$").test(b)){if(f.slice(g+1).each(a.proxy(function(b,c){return a(c).text().toLowerCase().charAt(0)===e?(a(c).focus(),h=!0,!1):void 0},this)),h)return;if(f.slice(0,g+1).each(a.proxy(function(b,c){return a(c).text().toLowerCase().charAt(0)===e?(a(c).focus(),h=!0,!1):void 0},this)),h)return}},this)).on("init.jstree",a.proxy(function(){var a=this.settings.core.themes;this._data.core.themes.dots=a.dots,this._data.core.themes.stripes=a.stripes,this._data.core.themes.icons=a.icons,this.set_theme(a.name||"default",a.url),this.set_theme_variant(a.variant)},this)).on("loading.jstree",a.proxy(function(){this[this._data.core.themes.dots?"show_dots":"hide_dots"](),this[this._data.core.themes.icons?"show_icons":"hide_icons"](),this[this._data.core.themes.stripes?"show_stripes":"hide_stripes"]()},this)).on("blur.jstree",".jstree-anchor",a.proxy(function(b){this._data.core.focused=null,a(b.currentTarget).filter(".jstree-hovered").mouseleave(),this.element.attr("tabindex","0")},this)).on("focus.jstree",".jstree-anchor",a.proxy(function(b){var c=this.get_node(b.currentTarget);c&&c.id&&(this._data.core.focused=c.id),this.element.find(".jstree-hovered").not(b.currentTarget).mouseleave(),a(b.currentTarget).mouseenter(),this.element.attr("tabindex","-1")},this)).on("focus.jstree",a.proxy(function(){if(+new Date-d>500&&!this._data.core.focused){d=0;var a=this.get_node(this.element.attr("aria-activedescendant"),!0);a&&a.find("> .jstree-anchor").focus()}},this)).on("mouseenter.jstree",".jstree-anchor",a.proxy(function(a){this.hover_node(a.currentTarget)},this)).on("mouseleave.jstree",".jstree-anchor",a.proxy(function(a){this.dehover_node(a.currentTarget)},this))},unbind:function(){this.element.off(".jstree"),a(i).off(".jstree-"+this._id)},trigger:function(a,b){b||(b={}),b.instance=this,this.element.triggerHandler(a.replace(".jstree","")+".jstree",b)},get_container:function(){return this.element},get_container_ul:function(){return this.element.children(".jstree-children").first()},get_string:function(b){var c=this.settings.core.strings;return a.isFunction(c)?c.call(this,b):c&&c[b]?c[b]:b},_firstChild:function(a){a=a?a.firstChild:null;while(null!==a&&1!==a.nodeType)a=a.nextSibling;return a},_nextSibling:function(a){a=a?a.nextSibling:null;while(null!==a&&1!==a.nodeType)a=a.nextSibling;return a},_previousSibling:function(a){a=a?a.previousSibling:null;while(null!==a&&1!==a.nodeType)a=a.previousSibling;return a},get_node:function(b,c){b&&b.id&&(b=b.id);var d;try{if(this._model.data[b])b=this._model.data[b];else if("string"==typeof b&&this._model.data[b.replace(/^#/,"")])b=this._model.data[b.replace(/^#/,"")];else if("string"==typeof b&&(d=a("#"+b.replace(a.jstree.idregex,"\\$&"),this.element)).length&&this._model.data[d.closest(".jstree-node").attr("id")])b=this._model.data[d.closest(".jstree-node").attr("id")];else if((d=a(b,this.element)).length&&this._model.data[d.closest(".jstree-node").attr("id")])b=this._model.data[d.closest(".jstree-node").attr("id")];else{if(!(d=a(b,this.element)).length||!d.hasClass("jstree"))return!1;b=this._model.data["#"]}return c&&(b="#"===b.id?this.element:a("#"+b.id.replace(a.jstree.idregex,"\\$&"),this.element)),b}catch(e){return!1}},get_path:function(a,b,c){if(a=a.parents?a:this.get_node(a),!a||"#"===a.id||!a.parents)return!1;var d,e,f=[];for(f.push(c?a.id:a.text),d=0,e=a.parents.length;e>d;d++)f.push(c?a.parents[d]:this.get_text(a.parents[d]));return f=f.reverse().slice(1),b?f.join(b):f},get_next_dom:function(b,c){var d;if(b=this.get_node(b,!0),b[0]===this.element[0]){d=this._firstChild(this.get_container_ul()[0]);while(d&&0===d.offsetHeight)d=this._nextSibling(d);return d?a(d):!1}if(!b||!b.length)return!1;if(c){d=b[0];do d=this._nextSibling(d);while(d&&0===d.offsetHeight);return d?a(d):!1}if(b.hasClass("jstree-open")){d=this._firstChild(b.children(".jstree-children")[0]);while(d&&0===d.offsetHeight)d=this._nextSibling(d);if(null!==d)return a(d)}d=b[0];do d=this._nextSibling(d);while(d&&0===d.offsetHeight);return null!==d?a(d):b.parentsUntil(".jstree",".jstree-node").nextAll(".jstree-node:visible").first()},get_prev_dom:function(b,c){var d;if(b=this.get_node(b,!0),b[0]===this.element[0]){d=this.get_container_ul()[0].lastChild;while(d&&0===d.offsetHeight)d=this._previousSibling(d);return d?a(d):!1}if(!b||!b.length)return!1;if(c){d=b[0];do d=this._previousSibling(d);while(d&&0===d.offsetHeight);return d?a(d):!1}d=b[0];do d=this._previousSibling(d);while(d&&0===d.offsetHeight);if(null!==d){b=a(d);while(b.hasClass("jstree-open"))b=b.children(".jstree-children").first().children(".jstree-node:visible:last");return b}return d=b[0].parentNode.parentNode,d&&d.className&&-1!==d.className.indexOf("jstree-node")?a(d):!1},get_parent:function(a){return a=this.get_node(a),a&&"#"!==a.id?a.parent:!1},get_children_dom:function(a){return a=this.get_node(a,!0),a[0]===this.element[0]?this.get_container_ul().children(".jstree-node"):a&&a.length?a.children(".jstree-children").children(".jstree-node"):!1},is_parent:function(a){return a=this.get_node(a),a&&(a.state.loaded===!1||a.children.length>0)},is_loaded:function(a){return a=this.get_node(a),a&&a.state.loaded},is_loading:function(a){return a=this.get_node(a),a&&a.state&&a.state.loading},is_open:function(a){return a=this.get_node(a),a&&a.state.opened},is_closed:function(a){return a=this.get_node(a),a&&this.is_parent(a)&&!a.state.opened},is_leaf:function(a){return!this.is_parent(a)},load_node:function(b,c){var d,e,f,g,h;if(a.isArray(b))return this._load_nodes(b.slice(),c),!0;if(b=this.get_node(b),!b)return c&&c.call(this,b,!1),!1;if(b.state.loaded){for(b.state.loaded=!1,d=0,e=b.children_d.length;e>d;d++){for(f=0,g=b.parents.length;g>f;f++)this._model.data[b.parents[f]].children_d=a.vakata.array_remove_item(this._model.data[b.parents[f]].children_d,b.children_d[d]);this._model.data[b.children_d[d]].state.selected&&(h=!0,this._data.core.selected=a.vakata.array_remove_item(this._data.core.selected,b.children_d[d])),delete this._model.data[b.children_d[d]]}b.children=[],b.children_d=[],h&&this.trigger("changed",{action:"load_node",node:b,selected:this._data.core.selected})}return b.state.failed=!1,b.state.loading=!0,this.get_node(b,!0).addClass("jstree-loading").attr("aria-busy",!0),this._load_node(b,a.proxy(function(a){b=this._model.data[b.id],b.state.loading=!1,b.state.loaded=a,b.state.failed=!b.state.loaded;var d=this.get_node(b,!0);b.state.loaded&&!b.children.length&&d&&d.length&&!d.hasClass("jstree-leaf")&&d.removeClass("jstree-closed jstree-open").addClass("jstree-leaf"),d.removeClass("jstree-loading").attr("aria-busy",!1),this.trigger("load_node",{node:b,status:a}),c&&c.call(this,b,a)},this)),!0},_load_nodes:function(a,b,c){var d=!0,e=function(){this._load_nodes(a,b,!0)},f=this._model.data,g,h,i=[];for(g=0,h=a.length;h>g;g++)!f[a[g]]||(f[a[g]].state.loaded||f[a[g]].state.failed)&&c||(this.is_loading(a[g])||this.load_node(a[g],e),d=!1);if(d){for(g=0,h=a.length;h>g;g++)f[a[g]]&&f[a[g]].state.loaded&&i.push(a[g]);b&&!b.done&&(b.call(this,i),b.done=!0)}},load_all:function(a,b){if(a||(a="#"),a=this.get_node(a),!a)return!1;var c=[],d=this._model.data,e=d[a.id].children_d,f,g;for(a.state&&!a.state.loaded&&c.push(a.id),f=0,g=e.length;g>f;f++)d[e[f]]&&d[e[f]].state&&!d[e[f]].state.loaded&&c.push(e[f]);c.length?this._load_nodes(c,function(){this.load_all(a,b)}):(b&&b.call(this,a),this.trigger("load_all",{node:a}))},_load_node:function(b,c){var d=this.settings.core.data,e;return d?a.isFunction(d)?d.call(this,b,a.proxy(function(d){d===!1&&c.call(this,!1),this["string"==typeof d?"_append_html_data":"_append_json_data"](b,"string"==typeof d?a(a.parseHTML(d)).filter(function(){return 3!==this.nodeType}):d,function(a){c.call(this,a)})},this)):"object"==typeof d?d.url?(d=a.extend(!0,{},d),a.isFunction(d.url)&&(d.url=d.url.call(this,b)),a.isFunction(d.data)&&(d.data=d.data.call(this,b)),a.ajax(d).done(a.proxy(function(d,e,f){var g=f.getResponseHeader("Content-Type");return g&&-1!==g.indexOf("json")||"object"==typeof d?this._append_json_data(b,d,function(a){c.call(this,a)}):g&&-1!==g.indexOf("html")||"string"==typeof d?this._append_html_data(b,a(a.parseHTML(d)).filter(function(){return 3!==this.nodeType}),function(a){c.call(this,a)}):(this._data.core.last_error={error:"ajax",plugin:"core",id:"core_04",reason:"Could not load node",data:JSON.stringify({id:b.id,xhr:f})},this.settings.core.error.call(this,this._data.core.last_error),c.call(this,!1))},this)).fail(a.proxy(function(a){c.call(this,!1),this._data.core.last_error={error:"ajax",plugin:"core",id:"core_04",reason:"Could not load node",data:JSON.stringify({id:b.id,xhr:a})},this.settings.core.error.call(this,this._data.core.last_error)},this))):(e=a.isArray(d)||a.isPlainObject(d)?JSON.parse(JSON.stringify(d)):d,"#"===b.id?this._append_json_data(b,e,function(a){c.call(this,a)}):(this._data.core.last_error={error:"nodata",plugin:"core",id:"core_05",reason:"Could not load node",data:JSON.stringify({id:b.id})},this.settings.core.error.call(this,this._data.core.last_error),c.call(this,!1))):"string"==typeof d?"#"===b.id?this._append_html_data(b,a(a.parseHTML(d)).filter(function(){return 3!==this.nodeType}),function(a){c.call(this,a)}):(this._data.core.last_error={error:"nodata",plugin:"core",id:"core_06",reason:"Could not load node",data:JSON.stringify({id:b.id})},this.settings.core.error.call(this,this._data.core.last_error),c.call(this,!1)):c.call(this,!1):"#"===b.id?this._append_html_data(b,this._data.core.original_container_html.clone(!0),function(a){c.call(this,a)}):c.call(this,!1)},_node_changed:function(a){a=this.get_node(a),a&&this._model.changed.push(a.id)},_append_html_data:function(b,c,d){b=this.get_node(b),b.children=[],b.children_d=[];var e=c.is("ul")?c.children():c,f=b.id,g=[],h=[],i=this._model.data,j=i[f],k=this._data.core.selected.length,l,m,n;for(e.each(a.proxy(function(b,c){l=this._parse_model_from_html(a(c),f,j.parents.concat()),l&&(g.push(l),h.push(l),i[l].children_d.length&&(h=h.concat(i[l].children_d)))},this)),j.children=g,j.children_d=h,m=0,n=j.parents.length;n>m;m++)i[j.parents[m]].children_d=i[j.parents[m]].children_d.concat(h);this.trigger("model",{nodes:h,parent:f}),"#"!==f?(this._node_changed(f),this.redraw()):(this.get_container_ul().children(".jstree-initial-node").remove(),this.redraw(!0)),this._data.core.selected.length!==k&&this.trigger("changed",{action:"model",selected:this._data.core.selected}),d.call(this,!0)},_append_json_data:function(b,c,d,e){if(null!==this.element){b=this.get_node(b),b.children=[],b.children_d=[],c.d&&(c=c.d,"string"==typeof c&&(c=JSON.parse(c))),a.isArray(c)||(c=[c]);var f=null,g={df:this._model.default_state,dat:c,par:b.id,m:this._model.data,t_id:this._id,t_cnt:this._cnt,sel:this._data.core.selected},h=function(a,b){a.data&&(a=a.data);var c=a.dat,d=a.par,e=[],f=[],g=[],h=a.df,i=a.t_id,j=a.t_cnt,k=a.m,l=k[d],m=a.sel,n,o,p,q,r=function(a,c,d){d=d?d.concat():[],c&&d.unshift(c);var e=a.id.toString(),f,i,j,l,m={id:e,text:a.text||"",icon:a.icon!==b?a.icon:!0,parent:c,parents:d,children:a.children||[],children_d:a.children_d||[],data:a.data,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(f in h)h.hasOwnProperty(f)&&(m.state[f]=h[f]);if(a&&a.data&&a.data.jstree&&a.data.jstree.icon&&(m.icon=a.data.jstree.icon),(m.icon===b||null===m.icon||""===m.icon)&&(m.icon=!0),a&&a.data&&(m.data=a.data,a.data.jstree))for(f in a.data.jstree)a.data.jstree.hasOwnProperty(f)&&(m.state[f]=a.data.jstree[f]);if(a&&"object"==typeof a.state)for(f in a.state)a.state.hasOwnProperty(f)&&(m.state[f]=a.state[f]);if(a&&"object"==typeof a.li_attr)for(f in a.li_attr)a.li_attr.hasOwnProperty(f)&&(m.li_attr[f]=a.li_attr[f]);if(m.li_attr.id||(m.li_attr.id=e),a&&"object"==typeof a.a_attr)for(f in a.a_attr)a.a_attr.hasOwnProperty(f)&&(m.a_attr[f]=a.a_attr[f]);for(a&&a.children&&a.children===!0&&(m.state.loaded=!1,m.children=[],m.children_d=[]),k[m.id]=m,f=0,i=m.children.length;i>f;f++)j=r(k[m.children[f]],m.id,d),l=k[j],m.children_d.push(j),l.children_d.length&&(m.children_d=m.children_d.concat(l.children_d));return delete a.data,delete a.children,k[m.id].original=a,m.state.selected&&g.push(m.id),m.id},s=function(a,c,d){d=d?d.concat():[],c&&d.unshift(c);var e=!1,f,l,m,n,o;do e="j"+i+"_"+ ++j;while(k[e]);o={id:!1,text:"string"==typeof a?a:"",icon:"object"==typeof a&&a.icon!==b?a.icon:!0,parent:c,parents:d,children:[],children_d:[],data:null,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(f in h)h.hasOwnProperty(f)&&(o.state[f]=h[f]);if(a&&a.id&&(o.id=a.id.toString()),a&&a.text&&(o.text=a.text),a&&a.data&&a.data.jstree&&a.data.jstree.icon&&(o.icon=a.data.jstree.icon),(o.icon===b||null===o.icon||""===o.icon)&&(o.icon=!0),a&&a.data&&(o.data=a.data,a.data.jstree))for(f in a.data.jstree)a.data.jstree.hasOwnProperty(f)&&(o.state[f]=a.data.jstree[f]);if(a&&"object"==typeof a.state)for(f in a.state)a.state.hasOwnProperty(f)&&(o.state[f]=a.state[f]);if(a&&"object"==typeof a.li_attr)for(f in a.li_attr)a.li_attr.hasOwnProperty(f)&&(o.li_attr[f]=a.li_attr[f]);if(o.li_attr.id&&!o.id&&(o.id=o.li_attr.id.toString()),o.id||(o.id=e),o.li_attr.id||(o.li_attr.id=o.id),a&&"object"==typeof a.a_attr)for(f in a.a_attr)a.a_attr.hasOwnProperty(f)&&(o.a_attr[f]=a.a_attr[f]);if(a&&a.children&&a.children.length){for(f=0,l=a.children.length;l>f;f++)m=s(a.children[f],o.id,d),n=k[m],o.children.push(m),n.children_d.length&&(o.children_d=o.children_d.concat(n.children_d));o.children_d=o.children_d.concat(o.children)}return a&&a.children&&a.children===!0&&(o.state.loaded=!1,o.children=[],o.children_d=[]),delete a.data,delete a.children,o.original=a,k[o.id]=o,o.state.selected&&g.push(o.id),o.id};if(c.length&&c[0].id!==b&&c[0].parent!==b){for(o=0,p=c.length;p>o;o++)c[o].children||(c[o].children=[]),k[c[o].id.toString()]=c[o];for(o=0,p=c.length;p>o;o++)k[c[o].parent.toString()].children.push(c[o].id.toString()),l.children_d.push(c[o].id.toString());for(o=0,p=l.children.length;p>o;o++)n=r(k[l.children[o]],d,l.parents.concat()),f.push(n),k[n].children_d.length&&(f=f.concat(k[n].children_d));for(o=0,p=l.parents.length;p>o;o++)k[l.parents[o]].children_d=k[l.parents[o]].children_d.concat(f);q={cnt:j,mod:k,sel:m,par:d,dpc:f,add:g}}else{for(o=0,p=c.length;p>o;o++)n=s(c[o],d,l.parents.concat()),n&&(e.push(n),f.push(n),k[n].children_d.length&&(f=f.concat(k[n].children_d)));for(l.children=e,l.children_d=f,o=0,p=l.parents.length;p>o;o++)k[l.parents[o]].children_d=k[l.parents[o]].children_d.concat(f);q={cnt:j,mod:k,sel:m,par:d,dpc:f,add:g}}return"undefined"!=typeof window&&"undefined"!=typeof window.document?q:void postMessage(q)},i=function(b,c){if(null!==this.element){if(this._cnt=b.cnt,this._model.data=b.mod,c){var e,f,g=b.add,h=b.sel,i=this._data.core.selected.slice(),j=this._model.data;if(h.length!==i.length||a.vakata.array_unique(h.concat(i)).length!==h.length){for(e=0,f=h.length;f>e;e++)-1===a.inArray(h[e],g)&&-1===a.inArray(h[e],i)&&(j[h[e]].state.selected=!1);for(e=0,f=i.length;f>e;e++)-1===a.inArray(i[e],h)&&(j[i[e]].state.selected=!0)}}b.add.length&&(this._data.core.selected=this._data.core.selected.concat(b.add)),this.trigger("model",{nodes:b.dpc,parent:b.par}),"#"!==b.par?(this._node_changed(b.par),this.redraw()):this.redraw(!0),b.add.length&&this.trigger("changed",{action:"model",selected:this._data.core.selected}),d.call(this,!0)}};if(this.settings.core.worker&&window.Blob&&window.URL&&window.Worker)try{null===this._wrk&&(this._wrk=window.URL.createObjectURL(new window.Blob(["self.onmessage = "+h.toString()],{type:"text/javascript"}))),!this._data.core.working||e?(this._data.core.working=!0,f=new window.Worker(this._wrk),f.onmessage=a.proxy(function(a){i.call(this,a.data,!0);try{f.terminate(),f=null}catch(b){}this._data.core.worker_queue.length?this._append_json_data.apply(this,this._data.core.worker_queue.shift()):this._data.core.working=!1},this),g.par?f.postMessage(g):this._data.core.worker_queue.length?this._append_json_data.apply(this,this._data.core.worker_queue.shift()):this._data.core.working=!1):this._data.core.worker_queue.push([b,c,d,!0])}catch(j){i.call(this,h(g),!1),this._data.core.worker_queue.length?this._append_json_data.apply(this,this._data.core.worker_queue.shift()):this._data.core.working=!1}else i.call(this,h(g),!1)}},_parse_model_from_html:function(c,d,e){e=e?[].concat(e):[],d&&e.unshift(d);var f,g,h=this._model.data,i={id:!1,text:!1,icon:!0,parent:d,parents:e,children:[],children_d:[],data:null,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1},j,k,l;for(j in this._model.default_state)this._model.default_state.hasOwnProperty(j)&&(i.state[j]=this._model.default_state[j]);if(k=a.vakata.attributes(c,!0),a.each(k,function(b,c){return c=a.trim(c),c.length?(i.li_attr[b]=c,void("id"===b&&(i.id=c.toString()))):!0}),k=c.children("a").first(),k.length&&(k=a.vakata.attributes(k,!0),a.each(k,function(b,c){c=a.trim(c),c.length&&(i.a_attr[b]=c)})),k=c.children("a").first().length?c.children("a").first().clone():c.clone(),k.children("ins, i, ul").remove(),k=k.html(),k=a("<div />").html(k),i.text=this.settings.core.force_text?k.text():k.html(),k=c.data(),i.data=k?a.extend(!0,{},k):null,i.state.opened=c.hasClass("jstree-open"),i.state.selected=c.children("a").hasClass("jstree-clicked"),i.state.disabled=c.children("a").hasClass("jstree-disabled"),i.data&&i.data.jstree)for(j in i.data.jstree)i.data.jstree.hasOwnProperty(j)&&(i.state[j]=i.data.jstree[j]);k=c.children("a").children(".jstree-themeicon"),k.length&&(i.icon=k.hasClass("jstree-themeicon-hidden")?!1:k.attr("rel")),i.state.icon!==b&&(i.icon=i.state.icon),(i.icon===b||null===i.icon||""===i.icon)&&(i.icon=!0),k=c.children("ul").children("li");do l="j"+this._id+"_"+ ++this._cnt;while(h[l]);return i.id=i.li_attr.id?i.li_attr.id.toString():l,k.length?(k.each(a.proxy(function(b,c){f=this._parse_model_from_html(a(c),i.id,e),g=this._model.data[f],i.children.push(f),g.children_d.length&&(i.children_d=i.children_d.concat(g.children_d))},this)),i.children_d=i.children_d.concat(i.children)):c.hasClass("jstree-closed")&&(i.state.loaded=!1),i.li_attr["class"]&&(i.li_attr["class"]=i.li_attr["class"].replace("jstree-closed","").replace("jstree-open","")),i.a_attr["class"]&&(i.a_attr["class"]=i.a_attr["class"].replace("jstree-clicked","").replace("jstree-disabled","")),h[i.id]=i,i.state.selected&&this._data.core.selected.push(i.id),i.id},_parse_model_from_flat_json:function(a,c,d){d=d?d.concat():[],c&&d.unshift(c);var e=a.id.toString(),f=this._model.data,g=this._model.default_state,h,i,j,k,l={id:e,text:a.text||"",icon:a.icon!==b?a.icon:!0,parent:c,parents:d,children:a.children||[],children_d:a.children_d||[],data:a.data,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(h in g)g.hasOwnProperty(h)&&(l.state[h]=g[h]);if(a&&a.data&&a.data.jstree&&a.data.jstree.icon&&(l.icon=a.data.jstree.icon),(l.icon===b||null===l.icon||""===l.icon)&&(l.icon=!0),a&&a.data&&(l.data=a.data,a.data.jstree))for(h in a.data.jstree)a.data.jstree.hasOwnProperty(h)&&(l.state[h]=a.data.jstree[h]);if(a&&"object"==typeof a.state)for(h in a.state)a.state.hasOwnProperty(h)&&(l.state[h]=a.state[h]);if(a&&"object"==typeof a.li_attr)for(h in a.li_attr)a.li_attr.hasOwnProperty(h)&&(l.li_attr[h]=a.li_attr[h]);if(l.li_attr.id||(l.li_attr.id=e),a&&"object"==typeof a.a_attr)for(h in a.a_attr)a.a_attr.hasOwnProperty(h)&&(l.a_attr[h]=a.a_attr[h]);for(a&&a.children&&a.children===!0&&(l.state.loaded=!1,l.children=[],l.children_d=[]),f[l.id]=l,h=0,i=l.children.length;i>h;h++)j=this._parse_model_from_flat_json(f[l.children[h]],l.id,d),k=f[j],l.children_d.push(j),k.children_d.length&&(l.children_d=l.children_d.concat(k.children_d));return delete a.data,delete a.children,f[l.id].original=a,l.state.selected&&this._data.core.selected.push(l.id),l.id},_parse_model_from_json:function(a,c,d){d=d?d.concat():[],c&&d.unshift(c);var e=!1,f,g,h,i,j=this._model.data,k=this._model.default_state,l;do e="j"+this._id+"_"+ ++this._cnt;while(j[e]);l={id:!1,text:"string"==typeof a?a:"",icon:"object"==typeof a&&a.icon!==b?a.icon:!0,parent:c,parents:d,children:[],children_d:[],data:null,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(f in k)k.hasOwnProperty(f)&&(l.state[f]=k[f]);if(a&&a.id&&(l.id=a.id.toString()),a&&a.text&&(l.text=a.text),a&&a.data&&a.data.jstree&&a.data.jstree.icon&&(l.icon=a.data.jstree.icon),(l.icon===b||null===l.icon||""===l.icon)&&(l.icon=!0),a&&a.data&&(l.data=a.data,a.data.jstree))for(f in a.data.jstree)a.data.jstree.hasOwnProperty(f)&&(l.state[f]=a.data.jstree[f]);if(a&&"object"==typeof a.state)for(f in a.state)a.state.hasOwnProperty(f)&&(l.state[f]=a.state[f]);if(a&&"object"==typeof a.li_attr)for(f in a.li_attr)a.li_attr.hasOwnProperty(f)&&(l.li_attr[f]=a.li_attr[f]);if(l.li_attr.id&&!l.id&&(l.id=l.li_attr.id.toString()),l.id||(l.id=e),l.li_attr.id||(l.li_attr.id=l.id),a&&"object"==typeof a.a_attr)for(f in a.a_attr)a.a_attr.hasOwnProperty(f)&&(l.a_attr[f]=a.a_attr[f]);if(a&&a.children&&a.children.length){for(f=0,g=a.children.length;g>f;f++)h=this._parse_model_from_json(a.children[f],l.id,d),i=j[h],l.children.push(h),i.children_d.length&&(l.children_d=l.children_d.concat(i.children_d));l.children_d=l.children_d.concat(l.children)}return a&&a.children&&a.children===!0&&(l.state.loaded=!1,l.children=[],l.children_d=[]),delete a.data,delete a.children,l.original=a,j[l.id]=l,l.state.selected&&this._data.core.selected.push(l.id),l.id},_redraw:function(){var a=this._model.force_full_redraw?this._model.data["#"].children.concat([]):this._model.changed.concat([]),b=i.createElement("UL"),c,d,e,f=this._data.core.focused;for(d=0,e=a.length;e>d;d++)c=this.redraw_node(a[d],!0,this._model.force_full_redraw),c&&this._model.force_full_redraw&&b.appendChild(c);this._model.force_full_redraw&&(b.className=this.get_container_ul()[0].className,b.setAttribute("role","group"),this.element.empty().append(b)),null!==f&&(c=this.get_node(f,!0),c&&c.length&&c.children(".jstree-anchor")[0]!==i.activeElement?c.children(".jstree-anchor").focus():this._data.core.focused=null),this._model.force_full_redraw=!1,this._model.changed=[],this.trigger("redraw",{nodes:a})},redraw:function(a){a&&(this._model.force_full_redraw=!0),this._redraw()},draw_children:function(a){var b=this.get_node(a),c=!1,d=!1,e=!1,f=i;if(!b)return!1;if("#"===b.id)return this.redraw(!0);if(a=this.get_node(a,!0),!a||!a.length)return!1;if(a.children(".jstree-children").remove(),a=a[0],b.children.length&&b.state.loaded){for(e=f.createElement("UL"),e.setAttribute("role","group"),e.className="jstree-children",c=0,d=b.children.length;d>c;c++)e.appendChild(this.redraw_node(b.children[c],!0,!0));a.appendChild(e)}},redraw_node:function(b,c,d,e){var f=this.get_node(b),g=!1,h=!1,k=!1,l=!1,m=!1,n=!1,o="",p=i,q=this._model.data,r=!1,s=!1,t=null,u=0,v=0;if(!f)return!1;if("#"===f.id)return this.redraw(!0);if(c=c||0===f.children.length,b=i.querySelector?this.element[0].querySelector("#"+(-1!=="0123456789".indexOf(f.id[0])?"\\3"+f.id[0]+" "+f.id.substr(1).replace(a.jstree.idregex,"\\$&"):f.id.replace(a.jstree.idregex,"\\$&"))):i.getElementById(f.id))b=a(b),d||(g=b.parent().parent()[0],g===this.element[0]&&(g=null),h=b.index()),c||!f.children.length||b.children(".jstree-children").length||(c=!0),c||(k=b.children(".jstree-children")[0]),r=b.children(".jstree-anchor")[0]===i.activeElement,b.remove();else if(c=!0,!d){if(g="#"!==f.parent?a("#"+f.parent.replace(a.jstree.idregex,"\\$&"),this.element)[0]:null,!(null===g||g&&q[f.parent].state.opened))return!1;h=a.inArray(f.id,null===g?q["#"].children:q[f.parent].children)}b=j.cloneNode(!0),o="jstree-node ";for(l in f.li_attr)if(f.li_attr.hasOwnProperty(l)){if("id"===l)continue;"class"!==l?b.setAttribute(l,f.li_attr[l]):o+=f.li_attr[l]}f.a_attr.id||(f.a_attr.id=f.id+"_anchor"),b.setAttribute("aria-selected",!!f.state.selected),b.setAttribute("aria-level",f.parents.length),
+b.setAttribute("aria-labelledby",f.a_attr.id),f.state.disabled&&b.setAttribute("aria-disabled",!0),f.state.loaded&&!f.children.length?o+=" jstree-leaf":(o+=f.state.opened&&f.state.loaded?" jstree-open":" jstree-closed",b.setAttribute("aria-expanded",f.state.opened&&f.state.loaded)),null!==f.parent&&q[f.parent].children[q[f.parent].children.length-1]===f.id&&(o+=" jstree-last"),b.id=f.id,b.className=o,o=(f.state.selected?" jstree-clicked":"")+(f.state.disabled?" jstree-disabled":"");for(m in f.a_attr)if(f.a_attr.hasOwnProperty(m)){if("href"===m&&"#"===f.a_attr[m])continue;"class"!==m?b.childNodes[1].setAttribute(m,f.a_attr[m]):o+=" "+f.a_attr[m]}if(o.length&&(b.childNodes[1].className="jstree-anchor "+o),(f.icon&&f.icon!==!0||f.icon===!1)&&(f.icon===!1?b.childNodes[1].childNodes[0].className+=" jstree-themeicon-hidden":-1===f.icon.indexOf("/")&&-1===f.icon.indexOf(".")?b.childNodes[1].childNodes[0].className+=" "+f.icon+" jstree-themeicon-custom":(b.childNodes[1].childNodes[0].style.backgroundImage="url("+f.icon+")",b.childNodes[1].childNodes[0].style.backgroundPosition="center center",b.childNodes[1].childNodes[0].style.backgroundSize="auto",b.childNodes[1].childNodes[0].className+=" jstree-themeicon-custom")),this.settings.core.force_text?b.childNodes[1].appendChild(p.createTextNode(f.text)):b.childNodes[1].innerHTML+=f.text,c&&f.children.length&&(f.state.opened||e)&&f.state.loaded){for(n=p.createElement("UL"),n.setAttribute("role","group"),n.className="jstree-children",l=0,m=f.children.length;m>l;l++)n.appendChild(this.redraw_node(f.children[l],c,!0));b.appendChild(n)}if(k&&b.appendChild(k),!d){for(g||(g=this.element[0]),l=0,m=g.childNodes.length;m>l;l++)if(g.childNodes[l]&&g.childNodes[l].className&&-1!==g.childNodes[l].className.indexOf("jstree-children")){t=g.childNodes[l];break}t||(t=p.createElement("UL"),t.setAttribute("role","group"),t.className="jstree-children",g.appendChild(t)),g=t,h<g.childNodes.length?g.insertBefore(b,g.childNodes[h]):g.appendChild(b),r&&(u=this.element[0].scrollTop,v=this.element[0].scrollLeft,b.childNodes[1].focus(),this.element[0].scrollTop=u,this.element[0].scrollLeft=v)}return f.state.opened&&!f.state.loaded&&(f.state.opened=!1,setTimeout(a.proxy(function(){this.open_node(f.id,!1,0)},this),0)),b},open_node:function(c,d,e){var f,g,h,i;if(a.isArray(c)){for(c=c.slice(),f=0,g=c.length;g>f;f++)this.open_node(c[f],d,e);return!0}if(c=this.get_node(c),!c||"#"===c.id)return!1;if(e=e===b?this.settings.core.animation:e,!this.is_closed(c))return d&&d.call(this,c,!1),!1;if(this.is_loaded(c))h=this.get_node(c,!0),i=this,h.length&&(e&&h.children(".jstree-children").length&&h.children(".jstree-children").stop(!0,!0),c.children.length&&!this._firstChild(h.children(".jstree-children")[0])&&this.draw_children(c),e?(this.trigger("before_open",{node:c}),h.children(".jstree-children").css("display","none").end().removeClass("jstree-closed").addClass("jstree-open").attr("aria-expanded",!0).children(".jstree-children").stop(!0,!0).slideDown(e,function(){this.style.display="",i.trigger("after_open",{node:c})})):(this.trigger("before_open",{node:c}),h[0].className=h[0].className.replace("jstree-closed","jstree-open"),h[0].setAttribute("aria-expanded",!0))),c.state.opened=!0,d&&d.call(this,c,!0),h.length||this.trigger("before_open",{node:c}),this.trigger("open_node",{node:c}),e&&h.length||this.trigger("after_open",{node:c});else{if(this.is_loading(c))return setTimeout(a.proxy(function(){this.open_node(c,d,e)},this),500);this.load_node(c,function(a,b){return b?this.open_node(a,d,e):d?d.call(this,a,!1):!1})}},_open_to:function(b){if(b=this.get_node(b),!b||"#"===b.id)return!1;var c,d,e=b.parents;for(c=0,d=e.length;d>c;c+=1)"#"!==c&&this.open_node(e[c],!1,0);return a("#"+b.id.replace(a.jstree.idregex,"\\$&"),this.element)},close_node:function(c,d){var e,f,g,h;if(a.isArray(c)){for(c=c.slice(),e=0,f=c.length;f>e;e++)this.close_node(c[e],d);return!0}return c=this.get_node(c),c&&"#"!==c.id?this.is_closed(c)?!1:(d=d===b?this.settings.core.animation:d,g=this,h=this.get_node(c,!0),h.length&&(d?h.children(".jstree-children").attr("style","display:block !important").end().removeClass("jstree-open").addClass("jstree-closed").attr("aria-expanded",!1).children(".jstree-children").stop(!0,!0).slideUp(d,function(){this.style.display="",h.children(".jstree-children").remove(),g.trigger("after_close",{node:c})}):(h[0].className=h[0].className.replace("jstree-open","jstree-closed"),h.attr("aria-expanded",!1).children(".jstree-children").remove())),c.state.opened=!1,this.trigger("close_node",{node:c}),void(d&&h.length||this.trigger("after_close",{node:c}))):!1},toggle_node:function(b){var c,d;if(a.isArray(b)){for(b=b.slice(),c=0,d=b.length;d>c;c++)this.toggle_node(b[c]);return!0}return this.is_closed(b)?this.open_node(b):this.is_open(b)?this.close_node(b):void 0},open_all:function(a,b,c){if(a||(a="#"),a=this.get_node(a),!a)return!1;var d="#"===a.id?this.get_container_ul():this.get_node(a,!0),e,f,g;if(!d.length){for(e=0,f=a.children_d.length;f>e;e++)this.is_closed(this._model.data[a.children_d[e]])&&(this._model.data[a.children_d[e]].state.opened=!0);return this.trigger("open_all",{node:a})}c=c||d,g=this,d=this.is_closed(a)?d.find(".jstree-closed").addBack():d.find(".jstree-closed"),d.each(function(){g.open_node(this,function(a,d){d&&this.is_parent(a)&&this.open_all(a,b,c)},b||0)}),0===c.find(".jstree-closed").length&&this.trigger("open_all",{node:this.get_node(c)})},close_all:function(b,c){if(b||(b="#"),b=this.get_node(b),!b)return!1;var d="#"===b.id?this.get_container_ul():this.get_node(b,!0),e=this,f,g;if(!d.length){for(f=0,g=b.children_d.length;g>f;f++)this._model.data[b.children_d[f]].state.opened=!1;return this.trigger("close_all",{node:b})}d=this.is_open(b)?d.find(".jstree-open").addBack():d.find(".jstree-open"),a(d.get().reverse()).each(function(){e.close_node(this,c||0)}),this.trigger("close_all",{node:b})},is_disabled:function(a){return a=this.get_node(a),a&&a.state&&a.state.disabled},enable_node:function(b){var c,d;if(a.isArray(b)){for(b=b.slice(),c=0,d=b.length;d>c;c++)this.enable_node(b[c]);return!0}return b=this.get_node(b),b&&"#"!==b.id?(b.state.disabled=!1,this.get_node(b,!0).children(".jstree-anchor").removeClass("jstree-disabled").attr("aria-disabled",!1),void this.trigger("enable_node",{node:b})):!1},disable_node:function(b){var c,d;if(a.isArray(b)){for(b=b.slice(),c=0,d=b.length;d>c;c++)this.disable_node(b[c]);return!0}return b=this.get_node(b),b&&"#"!==b.id?(b.state.disabled=!0,this.get_node(b,!0).children(".jstree-anchor").addClass("jstree-disabled").attr("aria-disabled",!0),void this.trigger("disable_node",{node:b})):!1},activate_node:function(a,c){if(this.is_disabled(a))return!1;if(this._data.core.last_clicked=this._data.core.last_clicked&&this._data.core.last_clicked.id!==b?this.get_node(this._data.core.last_clicked.id):null,this._data.core.last_clicked&&!this._data.core.last_clicked.state.selected&&(this._data.core.last_clicked=null),!this._data.core.last_clicked&&this._data.core.selected.length&&(this._data.core.last_clicked=this.get_node(this._data.core.selected[this._data.core.selected.length-1])),this.settings.core.multiple&&(c.metaKey||c.ctrlKey||c.shiftKey)&&(!c.shiftKey||this._data.core.last_clicked&&this.get_parent(a)&&this.get_parent(a)===this._data.core.last_clicked.parent))if(c.shiftKey){var d=this.get_node(a).id,e=this._data.core.last_clicked.id,f=this.get_node(this._data.core.last_clicked.parent).children,g=!1,h,i;for(h=0,i=f.length;i>h;h+=1)f[h]===d&&(g=!g),f[h]===e&&(g=!g),this.is_disabled(f[h])||!g&&f[h]!==d&&f[h]!==e?this.deselect_node(f[h],!0,c):this.select_node(f[h],!0,!1,c);this.trigger("changed",{action:"select_node",node:this.get_node(a),selected:this._data.core.selected,event:c})}else this.is_selected(a)?this.deselect_node(a,!1,c):this.select_node(a,!1,!1,c);else!this.settings.core.multiple&&(c.metaKey||c.ctrlKey||c.shiftKey)&&this.is_selected(a)?this.deselect_node(a,!1,c):(this.deselect_all(!0),this.select_node(a,!1,!1,c),this._data.core.last_clicked=this.get_node(a));this.trigger("activate_node",{node:this.get_node(a)})},hover_node:function(a){if(a=this.get_node(a,!0),!a||!a.length||a.children(".jstree-hovered").length)return!1;var b=this.element.find(".jstree-hovered"),c=this.element;b&&b.length&&this.dehover_node(b),a.children(".jstree-anchor").addClass("jstree-hovered"),this.trigger("hover_node",{node:this.get_node(a)}),setTimeout(function(){c.attr("aria-activedescendant",a[0].id)},0)},dehover_node:function(a){return a=this.get_node(a,!0),a&&a.length&&a.children(".jstree-hovered").length?(a.children(".jstree-anchor").removeClass("jstree-hovered"),void this.trigger("dehover_node",{node:this.get_node(a)})):!1},select_node:function(b,c,d,e){var f,g,h,i;if(a.isArray(b)){for(b=b.slice(),g=0,h=b.length;h>g;g++)this.select_node(b[g],c,d,e);return!0}return b=this.get_node(b),b&&"#"!==b.id?(f=this.get_node(b,!0),void(b.state.selected||(b.state.selected=!0,this._data.core.selected.push(b.id),d||(f=this._open_to(b)),f&&f.length&&f.attr("aria-selected",!0).children(".jstree-anchor").addClass("jstree-clicked"),this.trigger("select_node",{node:b,selected:this._data.core.selected,event:e}),c||this.trigger("changed",{action:"select_node",node:b,selected:this._data.core.selected,event:e})))):!1},deselect_node:function(b,c,d){var e,f,g;if(a.isArray(b)){for(b=b.slice(),e=0,f=b.length;f>e;e++)this.deselect_node(b[e],c,d);return!0}return b=this.get_node(b),b&&"#"!==b.id?(g=this.get_node(b,!0),void(b.state.selected&&(b.state.selected=!1,this._data.core.selected=a.vakata.array_remove_item(this._data.core.selected,b.id),g.length&&g.attr("aria-selected",!1).children(".jstree-anchor").removeClass("jstree-clicked"),this.trigger("deselect_node",{node:b,selected:this._data.core.selected,event:d}),c||this.trigger("changed",{action:"deselect_node",node:b,selected:this._data.core.selected,event:d})))):!1},select_all:function(a){var b=this._data.core.selected.concat([]),c,d;for(this._data.core.selected=this._model.data["#"].children_d.concat(),c=0,d=this._data.core.selected.length;d>c;c++)this._model.data[this._data.core.selected[c]]&&(this._model.data[this._data.core.selected[c]].state.selected=!0);this.redraw(!0),this.trigger("select_all",{selected:this._data.core.selected}),a||this.trigger("changed",{action:"select_all",selected:this._data.core.selected,old_selection:b})},deselect_all:function(a){var b=this._data.core.selected.concat([]),c,d;for(c=0,d=this._data.core.selected.length;d>c;c++)this._model.data[this._data.core.selected[c]]&&(this._model.data[this._data.core.selected[c]].state.selected=!1);this._data.core.selected=[],this.element.find(".jstree-clicked").removeClass("jstree-clicked").parent().attr("aria-selected",!1),this.trigger("deselect_all",{selected:this._data.core.selected,node:b}),a||this.trigger("changed",{action:"deselect_all",selected:this._data.core.selected,old_selection:b})},is_selected:function(a){return a=this.get_node(a),a&&"#"!==a.id?a.state.selected:!1},get_selected:function(b){return b?a.map(this._data.core.selected,a.proxy(function(a){return this.get_node(a)},this)):this._data.core.selected.slice()},get_top_selected:function(b){var c=this.get_selected(!0),d={},e,f,g,h;for(e=0,f=c.length;f>e;e++)d[c[e].id]=c[e];for(e=0,f=c.length;f>e;e++)for(g=0,h=c[e].children_d.length;h>g;g++)d[c[e].children_d[g]]&&delete d[c[e].children_d[g]];c=[];for(e in d)d.hasOwnProperty(e)&&c.push(e);return b?a.map(c,a.proxy(function(a){return this.get_node(a)},this)):c},get_bottom_selected:function(b){var c=this.get_selected(!0),d=[],e,f;for(e=0,f=c.length;f>e;e++)c[e].children.length||d.push(c[e].id);return b?a.map(d,a.proxy(function(a){return this.get_node(a)},this)):d},get_state:function(){var a={core:{open:[],scroll:{left:this.element.scrollLeft(),top:this.element.scrollTop()},selected:[]}},b;for(b in this._model.data)this._model.data.hasOwnProperty(b)&&"#"!==b&&(this._model.data[b].state.opened&&a.core.open.push(b),this._model.data[b].state.selected&&a.core.selected.push(b));return a},set_state:function(c,d){if(c){if(c.core){var e,f,g,h,i;if(c.core.open)return a.isArray(c.core.open)&&c.core.open.length?this._load_nodes(c.core.open,function(a){this.open_node(a,!1,0),delete c.core.open,this.set_state(c,d)},!0):(delete c.core.open,this.set_state(c,d)),!1;if(c.core.scroll)return c.core.scroll&&c.core.scroll.left!==b&&this.element.scrollLeft(c.core.scroll.left),c.core.scroll&&c.core.scroll.top!==b&&this.element.scrollTop(c.core.scroll.top),delete c.core.scroll,this.set_state(c,d),!1;if(c.core.selected)return h=this,this.deselect_all(),a.each(c.core.selected,function(a,b){h.select_node(b,!1,!0)}),delete c.core.selected,this.set_state(c,d),!1;for(i in c)c.hasOwnProperty(i)&&"core"!==i&&-1===a.inArray(i,this.settings.plugins)&&delete c[i];if(a.isEmptyObject(c.core))return delete c.core,this.set_state(c,d),!1}return a.isEmptyObject(c)?(c=null,d&&d.call(this),this.trigger("set_state"),!1):!0}return!1},refresh:function(b,c){this._data.core.state=c===!0?{}:this.get_state(),c&&a.isFunction(c)&&(this._data.core.state=c.call(this,this._data.core.state)),this._cnt=0,this._model.data={"#":{id:"#",parent:null,parents:[],children:[],children_d:[],state:{loaded:!1}}};var d=this.get_container_ul()[0].className;b||(this.element.html("<ul class='"+d+"' role='group'><li class='jstree-initial-node jstree-loading jstree-leaf jstree-last' role='treeitem' id='j"+this._id+"_loading'><i class='jstree-icon jstree-ocl'></i><a class='jstree-anchor' href='#'><i class='jstree-icon jstree-themeicon-hidden'></i>"+this.get_string("Loading ...")+"</a></li></ul>"),this.element.attr("aria-activedescendant","j"+this._id+"_loading")),this.load_node("#",function(b,c){c&&(this.get_container_ul()[0].className=d,this._firstChild(this.get_container_ul()[0])&&this.element.attr("aria-activedescendant",this._firstChild(this.get_container_ul()[0]).id),this.set_state(a.extend(!0,{},this._data.core.state),function(){this.trigger("refresh")})),this._data.core.state=null})},refresh_node:function(b){if(b=this.get_node(b),!b||"#"===b.id)return!1;var c=[],d=[],e=this._data.core.selected.concat([]);d.push(b.id),b.state.opened===!0&&c.push(b.id),this.get_node(b,!0).find(".jstree-open").each(function(){c.push(this.id)}),this._load_nodes(d,a.proxy(function(a){this.open_node(c,!1,0),this.select_node(this._data.core.selected),this.trigger("refresh_node",{node:b,nodes:a})},this))},set_id:function(b,c){if(b=this.get_node(b),!b||"#"===b.id)return!1;var d,e,f=this._model.data;for(c=c.toString(),f[b.parent].children[a.inArray(b.id,f[b.parent].children)]=c,d=0,e=b.parents.length;e>d;d++)f[b.parents[d]].children_d[a.inArray(b.id,f[b.parents[d]].children_d)]=c;for(d=0,e=b.children.length;e>d;d++)f[b.children[d]].parent=c;for(d=0,e=b.children_d.length;e>d;d++)f[b.children_d[d]].parents[a.inArray(b.id,f[b.children_d[d]].parents)]=c;return d=a.inArray(b.id,this._data.core.selected),-1!==d&&(this._data.core.selected[d]=c),d=this.get_node(b.id,!0),d&&(d.attr("id",c).children(".jstree-anchor").attr("id",c+"_anchor").end().attr("aria-labelledby",c+"_anchor"),this.element.attr("aria-activedescendant")===b.id&&this.element.attr("aria-activedescendant",c)),delete f[b.id],b.id=c,b.li_attr.id=c,f[c]=b,!0},get_text:function(a){return a=this.get_node(a),a&&"#"!==a.id?a.text:!1},set_text:function(b,c){var d,e;if(a.isArray(b)){for(b=b.slice(),d=0,e=b.length;e>d;d++)this.set_text(b[d],c);return!0}return b=this.get_node(b),b&&"#"!==b.id?(b.text=c,this.get_node(b,!0).length&&this.redraw_node(b.id),this.trigger("set_text",{obj:b,text:c}),!0):!1},get_json:function(b,c,d){if(b=this.get_node(b||"#"),!b)return!1;c&&c.flat&&!d&&(d=[]);var e={id:b.id,text:b.text,icon:this.get_icon(b),li_attr:a.extend(!0,{},b.li_attr),a_attr:a.extend(!0,{},b.a_attr),state:{},data:c&&c.no_data?!1:a.extend(!0,{},b.data)},f,g;if(c&&c.flat?e.parent=b.parent:e.children=[],!c||!c.no_state)for(f in b.state)b.state.hasOwnProperty(f)&&(e.state[f]=b.state[f]);if(c&&c.no_id&&(delete e.id,e.li_attr&&e.li_attr.id&&delete e.li_attr.id,e.a_attr&&e.a_attr.id&&delete e.a_attr.id),c&&c.flat&&"#"!==b.id&&d.push(e),!c||!c.no_children)for(f=0,g=b.children.length;g>f;f++)c&&c.flat?this.get_json(b.children[f],c,d):e.children.push(this.get_json(b.children[f],c));return c&&c.flat?d:"#"===b.id?e.children:e},create_node:function(c,d,e,f,g){if(null===c&&(c="#"),c=this.get_node(c),!c)return!1;if(e=e===b?"last":e,!e.toString().match(/^(before|after)$/)&&!g&&!this.is_loaded(c))return this.load_node(c,function(){this.create_node(c,d,e,f,!0)});d||(d={text:this.get_string("New node")}),"string"==typeof d&&(d={text:d}),d.text===b&&(d.text=this.get_string("New node"));var h,i,j,k;switch("#"===c.id&&("before"===e&&(e="first"),"after"===e&&(e="last")),e){case"before":h=this.get_node(c.parent),e=a.inArray(c.id,h.children),c=h;break;case"after":h=this.get_node(c.parent),e=a.inArray(c.id,h.children)+1,c=h;break;case"inside":case"first":e=0;break;case"last":e=c.children.length;break;default:e||(e=0)}if(e>c.children.length&&(e=c.children.length),d.id||(d.id=!0),!this.check("create_node",d,c,e))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(d.id===!0&&delete d.id,d=this._parse_model_from_json(d,c.id,c.parents.concat()),!d)return!1;for(h=this.get_node(d),i=[],i.push(d),i=i.concat(h.children_d),this.trigger("model",{nodes:i,parent:c.id}),c.children_d=c.children_d.concat(i),j=0,k=c.parents.length;k>j;j++)this._model.data[c.parents[j]].children_d=this._model.data[c.parents[j]].children_d.concat(i);for(d=h,h=[],j=0,k=c.children.length;k>j;j++)h[j>=e?j+1:j]=c.children[j];return h[e]=d.id,c.children=h,this.redraw_node(c,!0),f&&f.call(this,this.get_node(d)),this.trigger("create_node",{node:this.get_node(d),parent:c.id,position:e}),d.id},rename_node:function(b,c){var d,e,f;if(a.isArray(b)){for(b=b.slice(),d=0,e=b.length;e>d;d++)this.rename_node(b[d],c);return!0}return b=this.get_node(b),b&&"#"!==b.id?(f=b.text,this.check("rename_node",b,this.get_parent(b),c)?(this.set_text(b,c),this.trigger("rename_node",{node:b,text:c,old:f}),!0):(this.settings.core.error.call(this,this._data.core.last_error),!1)):!1},delete_node:function(b){var c,d,e,f,g,h,i,j,k,l;if(a.isArray(b)){for(b=b.slice(),c=0,d=b.length;d>c;c++)this.delete_node(b[c]);return!0}if(b=this.get_node(b),!b||"#"===b.id)return!1;if(e=this.get_node(b.parent),f=a.inArray(b.id,e.children),l=!1,!this.check("delete_node",b,e,f))return this.settings.core.error.call(this,this._data.core.last_error),!1;for(-1!==f&&(e.children=a.vakata.array_remove(e.children,f)),g=b.children_d.concat([]),g.push(b.id),j=0,k=g.length;k>j;j++){for(h=0,i=b.parents.length;i>h;h++)f=a.inArray(g[j],this._model.data[b.parents[h]].children_d),-1!==f&&(this._model.data[b.parents[h]].children_d=a.vakata.array_remove(this._model.data[b.parents[h]].children_d,f));this._model.data[g[j]].state.selected&&(l=!0,f=a.inArray(g[j],this._data.core.selected),-1!==f&&(this._data.core.selected=a.vakata.array_remove(this._data.core.selected,f)))}for(this.trigger("delete_node",{node:b,parent:e.id}),l&&this.trigger("changed",{action:"delete_node",node:b,selected:this._data.core.selected,parent:e.id}),j=0,k=g.length;k>j;j++)delete this._model.data[g[j]];return this.redraw_node(e,!0),!0},check:function(b,c,d,e,f){c=c&&c.id?c:this.get_node(c),d=d&&d.id?d:this.get_node(d);var g=b.match(/^move_node|copy_node|create_node$/i)?d:c,h=this.settings.core.check_callback;return"move_node"!==b&&"copy_node"!==b||f&&f.is_multi||c.id!==d.id&&a.inArray(c.id,d.children)!==e&&-1===a.inArray(d.id,c.children_d)?(g&&g.data&&(g=g.data),g&&g.functions&&(g.functions[b]===!1||g.functions[b]===!0)?(g.functions[b]===!1&&(this._data.core.last_error={error:"check",plugin:"core",id:"core_02",reason:"Node data prevents function: "+b,data:JSON.stringify({chk:b,pos:e,obj:c&&c.id?c.id:!1,par:d&&d.id?d.id:!1})}),g.functions[b]):h===!1||a.isFunction(h)&&h.call(this,b,c,d,e,f)===!1||h&&h[b]===!1?(this._data.core.last_error={error:"check",plugin:"core",id:"core_03",reason:"User config for core.check_callback prevents function: "+b,data:JSON.stringify({chk:b,pos:e,obj:c&&c.id?c.id:!1,par:d&&d.id?d.id:!1})},!1):!0):(this._data.core.last_error={error:"check",plugin:"core",id:"core_01",reason:"Moving parent inside child",data:JSON.stringify({chk:b,pos:e,obj:c&&c.id?c.id:!1,par:d&&d.id?d.id:!1})},!1)},last_error:function(){return this._data.core.last_error},move_node:function(c,d,e,f,g,h,i){var j,k,l,m,n,o,p,q,r,s,t,u,v,w;if(d=this.get_node(d),e=e===b?0:e,!d)return!1;if(!e.toString().match(/^(before|after)$/)&&!g&&!this.is_loaded(d))return this.load_node(d,function(){this.move_node(c,d,e,f,!0,!1,i)});if(a.isArray(c)){if(1!==c.length){for(j=0,k=c.length;k>j;j++)(r=this.move_node(c[j],d,e,f,g,!1,i))&&(d=r,e="after");return this.redraw(),!0}c=c[0]}if(c=c&&c.id?c:this.get_node(c),!c||"#"===c.id)return!1;if(l=(c.parent||"#").toString(),n=e.toString().match(/^(before|after)$/)&&"#"!==d.id?this.get_node(d.parent):d,o=i?i:this._model.data[c.id]?this:a.jstree.reference(c.id),p=!o||!o._id||this._id!==o._id,m=o&&o._id&&l&&o._model.data[l]&&o._model.data[l].children?a.inArray(c.id,o._model.data[l].children):-1,o&&o._id&&(c=o._model.data[c.id]),p)return(r=this.copy_node(c,d,e,f,g,!1,i))?(o&&o.delete_node(c),r):!1;switch("#"===d.id&&("before"===e&&(e="first"),"after"===e&&(e="last")),e){case"before":e=a.inArray(d.id,n.children);break;case"after":e=a.inArray(d.id,n.children)+1;break;case"inside":case"first":e=0;break;case"last":e=n.children.length;break;default:e||(e=0)}if(e>n.children.length&&(e=n.children.length),!this.check("move_node",c,n,e,{core:!0,origin:i,is_multi:o&&o._id&&o._id!==this._id,is_foreign:!o||!o._id}))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(c.parent===n.id){for(q=n.children.concat(),r=a.inArray(c.id,q),-1!==r&&(q=a.vakata.array_remove(q,r),e>r&&e--),r=[],s=0,t=q.length;t>s;s++)r[s>=e?s+1:s]=q[s];r[e]=c.id,n.children=r,this._node_changed(n.id),this.redraw("#"===n.id)}else{for(r=c.children_d.concat(),r.push(c.id),s=0,t=c.parents.length;t>s;s++){for(q=[],w=o._model.data[c.parents[s]].children_d,u=0,v=w.length;v>u;u++)-1===a.inArray(w[u],r)&&q.push(w[u]);o._model.data[c.parents[s]].children_d=q}for(o._model.data[l].children=a.vakata.array_remove_item(o._model.data[l].children,c.id),s=0,t=n.parents.length;t>s;s++)this._model.data[n.parents[s]].children_d=this._model.data[n.parents[s]].children_d.concat(r);for(q=[],s=0,t=n.children.length;t>s;s++)q[s>=e?s+1:s]=n.children[s];for(q[e]=c.id,n.children=q,n.children_d.push(c.id),n.children_d=n.children_d.concat(c.children_d),c.parent=n.id,r=n.parents.concat(),r.unshift(n.id),w=c.parents.length,c.parents=r,r=r.concat(),s=0,t=c.children_d.length;t>s;s++)this._model.data[c.children_d[s]].parents=this._model.data[c.children_d[s]].parents.slice(0,-1*w),Array.prototype.push.apply(this._model.data[c.children_d[s]].parents,r);("#"===l||"#"===n.id)&&(this._model.force_full_redraw=!0),this._model.force_full_redraw||(this._node_changed(l),this._node_changed(n.id)),h||this.redraw()}return f&&f.call(this,c,n,e),this.trigger("move_node",{node:c,parent:n.id,position:e,old_parent:l,old_position:m,is_multi:o&&o._id&&o._id!==this._id,is_foreign:!o||!o._id,old_instance:o,new_instance:this}),c.id},copy_node:function(c,d,e,f,g,h,i){var j,k,l,m,n,o,p,q,r,s,t;if(d=this.get_node(d),e=e===b?0:e,!d)return!1;if(!e.toString().match(/^(before|after)$/)&&!g&&!this.is_loaded(d))return this.load_node(d,function(){this.copy_node(c,d,e,f,!0,!1,i)});if(a.isArray(c)){if(1!==c.length){for(j=0,k=c.length;k>j;j++)(m=this.copy_node(c[j],d,e,f,g,!0,i))&&(d=m,e="after");return this.redraw(),!0}c=c[0]}if(c=c&&c.id?c:this.get_node(c),!c||"#"===c.id)return!1;switch(q=(c.parent||"#").toString(),r=e.toString().match(/^(before|after)$/)&&"#"!==d.id?this.get_node(d.parent):d,s=i?i:this._model.data[c.id]?this:a.jstree.reference(c.id),t=!s||!s._id||this._id!==s._id,s&&s._id&&(c=s._model.data[c.id]),"#"===d.id&&("before"===e&&(e="first"),"after"===e&&(e="last")),e){case"before":e=a.inArray(d.id,r.children);break;case"after":e=a.inArray(d.id,r.children)+1;break;case"inside":case"first":e=0;break;case"last":e=r.children.length;break;default:e||(e=0)}if(e>r.children.length&&(e=r.children.length),!this.check("copy_node",c,r,e,{core:!0,origin:i,is_multi:s&&s._id&&s._id!==this._id,is_foreign:!s||!s._id}))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(p=s?s.get_json(c,{no_id:!0,no_data:!0,no_state:!0}):c,!p)return!1;if(p.id===!0&&delete p.id,p=this._parse_model_from_json(p,r.id,r.parents.concat()),!p)return!1;for(m=this.get_node(p),c&&c.state&&c.state.loaded===!1&&(m.state.loaded=!1),l=[],l.push(p),l=l.concat(m.children_d),this.trigger("model",{nodes:l,parent:r.id}),n=0,o=r.parents.length;o>n;n++)this._model.data[r.parents[n]].children_d=this._model.data[r.parents[n]].children_d.concat(l);for(l=[],n=0,o=r.children.length;o>n;n++)l[n>=e?n+1:n]=r.children[n];return l[e]=m.id,r.children=l,r.children_d.push(m.id),r.children_d=r.children_d.concat(m.children_d),"#"===r.id&&(this._model.force_full_redraw=!0),this._model.force_full_redraw||this._node_changed(r.id),h||this.redraw("#"===r.id),f&&f.call(this,m,r,e),this.trigger("copy_node",{node:m,original:c,parent:r.id,position:e,old_parent:q,old_position:s&&s._id&&q&&s._model.data[q]&&s._model.data[q].children?a.inArray(c.id,s._model.data[q].children):-1,is_multi:s&&s._id&&s._id!==this._id,is_foreign:!s||!s._id,old_instance:s,new_instance:this}),m.id},cut:function(b){if(b||(b=this._data.core.selected.concat()),a.isArray(b)||(b=[b]),!b.length)return!1;var c=[],g,h,i;for(h=0,i=b.length;i>h;h++)g=this.get_node(b[h]),g&&g.id&&"#"!==g.id&&c.push(g);return c.length?(d=c,f=this,e="move_node",void this.trigger("cut",{node:b})):!1},copy:function(b){if(b||(b=this._data.core.selected.concat()),a.isArray(b)||(b=[b]),!b.length)return!1;var c=[],g,h,i;for(h=0,i=b.length;i>h;h++)g=this.get_node(b[h]),g&&g.id&&"#"!==g.id&&c.push(g);return c.length?(d=c,f=this,e="copy_node",void this.trigger("copy",{node:b})):!1},get_buffer:function(){return{mode:e,node:d,inst:f}},can_paste:function(){return e!==!1&&d!==!1},paste:function(a,b){return a=this.get_node(a),a&&e&&e.match(/^(copy_node|move_node)$/)&&d?(this[e](d,a,b,!1,!1,!1,f)&&this.trigger("paste",{parent:a.id,node:d,mode:e}),d=!1,e=!1,void(f=!1)):!1},clear_buffer:function(){d=!1,e=!1,f=!1,this.trigger("clear_buffer")},edit:function(b,c,d){var e,f,g,h,i,j,k,l,m;return(b=this.get_node(b))?this.settings.core.check_callback===!1?(this._data.core.last_error={error:"check",plugin:"core",id:"core_07",reason:"Could not edit node because of check_callback"},this.settings.core.error.call(this,this._data.core.last_error),!1):(m=b,c="string"==typeof c?c:b.text,this.set_text(b,""),b=this._open_to(b),m.text=c,e=this._data.core.rtl,f=this.element.width(),g=b.children(".jstree-anchor"),h=a("<span>"),i=c,j=a("<div />",{css:{position:"absolute",top:"-200px",left:e?"0px":"-1000px",visibility:"hidden"}}).appendTo("body"),k=a("<input />",{value:i,"class":"jstree-rename-input",css:{padding:"0",border:"1px solid silver","box-sizing":"border-box",display:"inline-block",height:this._data.core.li_height+"px",lineHeight:this._data.core.li_height+"px",width:"150px"},blur:a.proxy(function(){var c=h.children(".jstree-rename-input"),e=c.val(),f=this.settings.core.force_text,k;""===e&&(e=i),j.remove(),h.replaceWith(g),h.remove(),i=f?i:a("<div></div>").append(a.parseHTML(i)).html(),this.set_text(b,i),k=!!this.rename_node(b,f?a("<div></div>").text(e).text():a("<div></div>").append(a.parseHTML(e)).html()),k||this.set_text(b,i),d&&d.call(this,m,k)},this),keydown:function(a){var b=a.which;27===b&&(this.value=i),(27===b||13===b||37===b||38===b||39===b||40===b||32===b)&&a.stopImmediatePropagation(),(27===b||13===b)&&(a.preventDefault(),this.blur())},click:function(a){a.stopImmediatePropagation()},mousedown:function(a){a.stopImmediatePropagation()},keyup:function(a){k.width(Math.min(j.text("pW"+this.value).width(),f))},keypress:function(a){return 13===a.which?!1:void 0}}),l={fontFamily:g.css("fontFamily")||"",fontSize:g.css("fontSize")||"",fontWeight:g.css("fontWeight")||"",fontStyle:g.css("fontStyle")||"",fontStretch:g.css("fontStretch")||"",fontVariant:g.css("fontVariant")||"",letterSpacing:g.css("letterSpacing")||"",wordSpacing:g.css("wordSpacing")||""},h.attr("class",g.attr("class")).append(g.contents().clone()).append(k),g.replaceWith(h),j.css(l),void k.css(l).width(Math.min(j.text("pW"+k[0].value).width(),f))[0].select()):!1},set_theme:function(b,c){if(!b)return!1;if(c===!0){var d=this.settings.core.themes.dir;d||(d=a.jstree.path+"/themes"),c=d+"/"+b+"/style.css"}c&&-1===a.inArray(c,g)&&(a("head").append('<link rel="stylesheet" href="'+c+'" type="text/css" />'),g.push(c)),this._data.core.themes.name&&this.element.removeClass("jstree-"+this._data.core.themes.name),this._data.core.themes.name=b,this.element.addClass("jstree-"+b),this.element[this.settings.core.themes.responsive?"addClass":"removeClass"]("jstree-"+b+"-responsive"),this.trigger("set_theme",{theme:b})},get_theme:function(){return this._data.core.themes.name},set_theme_variant:function(a){this._data.core.themes.variant&&this.element.removeClass("jstree-"+this._data.core.themes.name+"-"+this._data.core.themes.variant),this._data.core.themes.variant=a,a&&this.element.addClass("jstree-"+this._data.core.themes.name+"-"+this._data.core.themes.variant)},get_theme_variant:function(){return this._data.core.themes.variant},show_stripes:function(){this._data.core.themes.stripes=!0,this.get_container_ul().addClass("jstree-striped")},hide_stripes:function(){this._data.core.themes.stripes=!1,this.get_container_ul().removeClass("jstree-striped")},toggle_stripes:function(){this._data.core.themes.stripes?this.hide_stripes():this.show_stripes()},show_dots:function(){this._data.core.themes.dots=!0,this.get_container_ul().removeClass("jstree-no-dots")},hide_dots:function(){this._data.core.themes.dots=!1,this.get_container_ul().addClass("jstree-no-dots")},toggle_dots:function(){this._data.core.themes.dots?this.hide_dots():this.show_dots()},show_icons:function(){this._data.core.themes.icons=!0,this.get_container_ul().removeClass("jstree-no-icons")},hide_icons:function(){this._data.core.themes.icons=!1,this.get_container_ul().addClass("jstree-no-icons")},toggle_icons:function(){this._data.core.themes.icons?this.hide_icons():this.show_icons()},set_icon:function(c,d){var e,f,g,h;if(a.isArray(c)){for(c=c.slice(),e=0,f=c.length;f>e;e++)this.set_icon(c[e],d);return!0}return c=this.get_node(c),c&&"#"!==c.id?(h=c.icon,c.icon=d===!0||null===d||d===b||""===d?!0:d,g=this.get_node(c,!0).children(".jstree-anchor").children(".jstree-themeicon"),d===!1?this.hide_icon(c):d===!0||null===d||d===b||""===d?(g.removeClass("jstree-themeicon-custom "+h).css("background","").removeAttr("rel"),h===!1&&this.show_icon(c)):-1===d.indexOf("/")&&-1===d.indexOf(".")?(g.removeClass(h).css("background",""),g.addClass(d+" jstree-themeicon-custom").attr("rel",d),h===!1&&this.show_icon(c)):(g.removeClass(h).css("background",""),g.addClass("jstree-themeicon-custom").css("background","url('"+d+"') center center no-repeat").attr("rel",d),h===!1&&this.show_icon(c)),!0):!1},get_icon:function(a){return a=this.get_node(a),a&&"#"!==a.id?a.icon:!1},hide_icon:function(b){var c,d;if(a.isArray(b)){for(b=b.slice(),c=0,d=b.length;d>c;c++)this.hide_icon(b[c]);return!0}return b=this.get_node(b),b&&"#"!==b?(b.icon=!1,this.get_node(b,!0).children(".jstree-anchor").children(".jstree-themeicon").addClass("jstree-themeicon-hidden"),!0):!1},show_icon:function(b){var c,d,e;if(a.isArray(b)){for(b=b.slice(),c=0,d=b.length;d>c;c++)this.show_icon(b[c]);return!0}return b=this.get_node(b),b&&"#"!==b?(e=this.get_node(b,!0),b.icon=e.length?e.children(".jstree-anchor").children(".jstree-themeicon").attr("rel"):!0,b.icon||(b.icon=!0),e.children(".jstree-anchor").children(".jstree-themeicon").removeClass("jstree-themeicon-hidden"),!0):!1}},a.vakata={},a.vakata.attributes=function(b,c){
+b=a(b)[0];var d=c?{}:[];return b&&b.attributes&&a.each(b.attributes,function(b,e){-1===a.inArray(e.name.toLowerCase(),["style","contenteditable","hasfocus","tabindex"])&&null!==e.value&&""!==a.trim(e.value)&&(c?d[e.name]=e.value:d.push(e.name))}),d},a.vakata.array_unique=function(a){var c=[],d,e,f,g={};for(d=0,f=a.length;f>d;d++)g[a[d]]===b&&(c.push(a[d]),g[a[d]]=!0);return c},a.vakata.array_remove=function(a,b,c){var d=a.slice((c||b)+1||a.length);return a.length=0>b?a.length+b:b,a.push.apply(a,d),a},a.vakata.array_remove_item=function(b,c){var d=a.inArray(c,b);return-1!==d?a.vakata.array_remove(b,d):b};var m=i.createElement("I");m.className="jstree-icon jstree-checkbox",m.setAttribute("role","presentation"),a.jstree.defaults.checkbox={visible:!0,three_state:!0,whole_node:!0,keep_selected_style:!0,cascade:"",tie_selection:!0},a.jstree.plugins.checkbox=function(c,d){this.bind=function(){d.bind.call(this),this._data.checkbox.uto=!1,this._data.checkbox.selected=[],this.settings.checkbox.three_state&&(this.settings.checkbox.cascade="up+down+undetermined"),this.element.on("init.jstree",a.proxy(function(){this._data.checkbox.visible=this.settings.checkbox.visible,this.settings.checkbox.keep_selected_style||this.element.addClass("jstree-checkbox-no-clicked"),this.settings.checkbox.tie_selection&&this.element.addClass("jstree-checkbox-selection")},this)).on("loading.jstree",a.proxy(function(){this[this._data.checkbox.visible?"show_checkboxes":"hide_checkboxes"]()},this)),-1!==this.settings.checkbox.cascade.indexOf("undetermined")&&this.element.on("changed.jstree uncheck_node.jstree check_node.jstree uncheck_all.jstree check_all.jstree move_node.jstree copy_node.jstree redraw.jstree open_node.jstree",a.proxy(function(){this._data.checkbox.uto&&clearTimeout(this._data.checkbox.uto),this._data.checkbox.uto=setTimeout(a.proxy(this._undetermined,this),50)},this)),this.settings.checkbox.tie_selection||this.element.on("model.jstree",a.proxy(function(a,b){var c=this._model.data,d=c[b.parent],e=b.nodes,f,g;for(f=0,g=e.length;g>f;f++)c[e[f]].state.checked=c[e[f]].original&&c[e[f]].original.state&&c[e[f]].original.state.checked,c[e[f]].state.checked&&this._data.checkbox.selected.push(e[f])},this)),(-1!==this.settings.checkbox.cascade.indexOf("up")||-1!==this.settings.checkbox.cascade.indexOf("down"))&&this.element.on("model.jstree",a.proxy(function(b,c){var d=this._model.data,e=d[c.parent],f=c.nodes,g=[],h,i,j,k,l,m,n=this.settings.checkbox.cascade,o=this.settings.checkbox.tie_selection;if(-1!==n.indexOf("down"))if(e.state[o?"selected":"checked"]){for(i=0,j=f.length;j>i;i++)d[f[i]].state[o?"selected":"checked"]=!0;this._data[o?"core":"checkbox"].selected=this._data[o?"core":"checkbox"].selected.concat(f)}else for(i=0,j=f.length;j>i;i++)if(d[f[i]].state[o?"selected":"checked"]){for(k=0,l=d[f[i]].children_d.length;l>k;k++)d[d[f[i]].children_d[k]].state[o?"selected":"checked"]=!0;this._data[o?"core":"checkbox"].selected=this._data[o?"core":"checkbox"].selected.concat(d[f[i]].children_d)}if(-1!==n.indexOf("up")){for(i=0,j=e.children_d.length;j>i;i++)d[e.children_d[i]].children.length||g.push(d[e.children_d[i]].parent);for(g=a.vakata.array_unique(g),k=0,l=g.length;l>k;k++){e=d[g[k]];while(e&&"#"!==e.id){for(h=0,i=0,j=e.children.length;j>i;i++)h+=d[e.children[i]].state[o?"selected":"checked"];if(h!==j)break;e.state[o?"selected":"checked"]=!0,this._data[o?"core":"checkbox"].selected.push(e.id),m=this.get_node(e,!0),m&&m.length&&m.attr("aria-selected",!0).children(".jstree-anchor").addClass(o?"jstree-clicked":"jstree-checked"),e=this.get_node(e.parent)}}}this._data[o?"core":"checkbox"].selected=a.vakata.array_unique(this._data[o?"core":"checkbox"].selected)},this)).on(this.settings.checkbox.tie_selection?"select_node.jstree":"check_node.jstree",a.proxy(function(b,c){var d=c.node,e=this._model.data,f=this.get_node(d.parent),g=this.get_node(d,!0),h,i,j,k,l=this.settings.checkbox.cascade,m=this.settings.checkbox.tie_selection;if(-1!==l.indexOf("down"))for(this._data[m?"core":"checkbox"].selected=a.vakata.array_unique(this._data[m?"core":"checkbox"].selected.concat(d.children_d)),h=0,i=d.children_d.length;i>h;h++)k=e[d.children_d[h]],k.state[m?"selected":"checked"]=!0,k&&k.original&&k.original.state&&k.original.state.undetermined&&(k.original.state.undetermined=!1);if(-1!==l.indexOf("up"))while(f&&"#"!==f.id){for(j=0,h=0,i=f.children.length;i>h;h++)j+=e[f.children[h]].state[m?"selected":"checked"];if(j!==i)break;f.state[m?"selected":"checked"]=!0,this._data[m?"core":"checkbox"].selected.push(f.id),k=this.get_node(f,!0),k&&k.length&&k.attr("aria-selected",!0).children(".jstree-anchor").addClass(m?"jstree-clicked":"jstree-checked"),f=this.get_node(f.parent)}-1!==l.indexOf("down")&&g.length&&g.find(".jstree-anchor").addClass(m?"jstree-clicked":"jstree-checked").parent().attr("aria-selected",!0)},this)).on(this.settings.checkbox.tie_selection?"deselect_all.jstree":"uncheck_all.jstree",a.proxy(function(a,b){var c=this.get_node("#"),d=this._model.data,e,f,g;for(e=0,f=c.children_d.length;f>e;e++)g=d[c.children_d[e]],g&&g.original&&g.original.state&&g.original.state.undetermined&&(g.original.state.undetermined=!1)},this)).on(this.settings.checkbox.tie_selection?"deselect_node.jstree":"uncheck_node.jstree",a.proxy(function(b,c){var d=c.node,e=this.get_node(d,!0),f,g,h,i=this.settings.checkbox.cascade,j=this.settings.checkbox.tie_selection;if(d&&d.original&&d.original.state&&d.original.state.undetermined&&(d.original.state.undetermined=!1),-1!==i.indexOf("down"))for(f=0,g=d.children_d.length;g>f;f++)h=this._model.data[d.children_d[f]],h.state[j?"selected":"checked"]=!1,h&&h.original&&h.original.state&&h.original.state.undetermined&&(h.original.state.undetermined=!1);if(-1!==i.indexOf("up"))for(f=0,g=d.parents.length;g>f;f++)h=this._model.data[d.parents[f]],h.state[j?"selected":"checked"]=!1,h&&h.original&&h.original.state&&h.original.state.undetermined&&(h.original.state.undetermined=!1),h=this.get_node(d.parents[f],!0),h&&h.length&&h.attr("aria-selected",!1).children(".jstree-anchor").removeClass(j?"jstree-clicked":"jstree-checked");for(h=[],f=0,g=this._data[j?"core":"checkbox"].selected.length;g>f;f++)-1!==i.indexOf("down")&&-1!==a.inArray(this._data[j?"core":"checkbox"].selected[f],d.children_d)||-1!==i.indexOf("up")&&-1!==a.inArray(this._data[j?"core":"checkbox"].selected[f],d.parents)||h.push(this._data[j?"core":"checkbox"].selected[f]);this._data[j?"core":"checkbox"].selected=a.vakata.array_unique(h),-1!==i.indexOf("down")&&e.length&&e.find(".jstree-anchor").removeClass(j?"jstree-clicked":"jstree-checked").parent().attr("aria-selected",!1)},this)),-1!==this.settings.checkbox.cascade.indexOf("up")&&this.element.on("delete_node.jstree",a.proxy(function(a,b){var c=this.get_node(b.parent),d=this._model.data,e,f,g,h,i=this.settings.checkbox.tie_selection;while(c&&"#"!==c.id){for(g=0,e=0,f=c.children.length;f>e;e++)g+=d[c.children[e]].state[i?"selected":"checked"];if(g!==f)break;c.state[i?"selected":"checked"]=!0,this._data[i?"core":"checkbox"].selected.push(c.id),h=this.get_node(c,!0),h&&h.length&&h.attr("aria-selected",!0).children(".jstree-anchor").addClass(i?"jstree-clicked":"jstree-checked"),c=this.get_node(c.parent)}},this)).on("move_node.jstree",a.proxy(function(b,c){var d=c.is_multi,e=c.old_parent,f=this.get_node(c.parent),g=this._model.data,h,i,j,k,l,m=this.settings.checkbox.tie_selection;if(!d){h=this.get_node(e);while(h&&"#"!==h.id){for(i=0,j=0,k=h.children.length;k>j;j++)i+=g[h.children[j]].state[m?"selected":"checked"];if(i!==k)break;h.state[m?"selected":"checked"]=!0,this._data[m?"core":"checkbox"].selected.push(h.id),l=this.get_node(h,!0),l&&l.length&&l.attr("aria-selected",!0).children(".jstree-anchor").addClass(m?"jstree-clicked":"jstree-checked"),h=this.get_node(h.parent)}}h=f;while(h&&"#"!==h.id){for(i=0,j=0,k=h.children.length;k>j;j++)i+=g[h.children[j]].state[m?"selected":"checked"];if(i===k)h.state[m?"selected":"checked"]||(h.state[m?"selected":"checked"]=!0,this._data[m?"core":"checkbox"].selected.push(h.id),l=this.get_node(h,!0),l&&l.length&&l.attr("aria-selected",!0).children(".jstree-anchor").addClass(m?"jstree-clicked":"jstree-checked"));else{if(!h.state[m?"selected":"checked"])break;h.state[m?"selected":"checked"]=!1,this._data[m?"core":"checkbox"].selected=a.vakata.array_remove_item(this._data[m?"core":"checkbox"].selected,h.id),l=this.get_node(h,!0),l&&l.length&&l.attr("aria-selected",!1).children(".jstree-anchor").removeClass(m?"jstree-clicked":"jstree-checked")}h=this.get_node(h.parent)}},this))},this._undetermined=function(){if(null!==this.element){var a,c,d,e,f={},g=this._model.data,h=this.settings.checkbox.tie_selection,i=this._data[h?"core":"checkbox"].selected,j=[],k=this;for(a=0,c=i.length;c>a;a++)if(g[i[a]]&&g[i[a]].parents)for(d=0,e=g[i[a]].parents.length;e>d;d++)f[g[i[a]].parents[d]]===b&&"#"!==g[i[a]].parents[d]&&(f[g[i[a]].parents[d]]=!0,j.push(g[i[a]].parents[d]));for(this.element.find(".jstree-closed").not(":has(.jstree-children)").each(function(){var h=k.get_node(this),i;if(h.state.loaded){for(a=0,c=h.children_d.length;c>a;a++)if(i=g[h.children_d[a]],!i.state.loaded&&i.original&&i.original.state&&i.original.state.undetermined&&i.original.state.undetermined===!0)for(f[i.id]===b&&"#"!==i.id&&(f[i.id]=!0,j.push(i.id)),d=0,e=i.parents.length;e>d;d++)f[i.parents[d]]===b&&"#"!==i.parents[d]&&(f[i.parents[d]]=!0,j.push(i.parents[d]))}else if(h.original&&h.original.state&&h.original.state.undetermined&&h.original.state.undetermined===!0)for(f[h.id]===b&&"#"!==h.id&&(f[h.id]=!0,j.push(h.id)),d=0,e=h.parents.length;e>d;d++)f[h.parents[d]]===b&&"#"!==h.parents[d]&&(f[h.parents[d]]=!0,j.push(h.parents[d]))}),this.element.find(".jstree-undetermined").removeClass("jstree-undetermined"),a=0,c=j.length;c>a;a++)g[j[a]].state[h?"selected":"checked"]||(i=this.get_node(j[a],!0),i&&i.length&&i.children(".jstree-anchor").children(".jstree-checkbox").addClass("jstree-undetermined"))}},this.redraw_node=function(b,c,e,f){if(b=d.redraw_node.apply(this,arguments)){var g,h,i=null;for(g=0,h=b.childNodes.length;h>g;g++)if(b.childNodes[g]&&b.childNodes[g].className&&-1!==b.childNodes[g].className.indexOf("jstree-anchor")){i=b.childNodes[g];break}i&&(!this.settings.checkbox.tie_selection&&this._model.data[b.id].state.checked&&(i.className+=" jstree-checked"),i.insertBefore(m.cloneNode(!1),i.childNodes[0]))}return e||-1===this.settings.checkbox.cascade.indexOf("undetermined")||(this._data.checkbox.uto&&clearTimeout(this._data.checkbox.uto),this._data.checkbox.uto=setTimeout(a.proxy(this._undetermined,this),50)),b},this.show_checkboxes=function(){this._data.core.themes.checkboxes=!0,this.get_container_ul().removeClass("jstree-no-checkboxes")},this.hide_checkboxes=function(){this._data.core.themes.checkboxes=!1,this.get_container_ul().addClass("jstree-no-checkboxes")},this.toggle_checkboxes=function(){this._data.core.themes.checkboxes?this.hide_checkboxes():this.show_checkboxes()},this.is_undetermined=function(b){b=this.get_node(b);var c=this.settings.checkbox.cascade,d,e,f=this.settings.checkbox.tie_selection,g=this._data[f?"core":"checkbox"].selected,h=this._model.data;if(!b||b.state[f?"selected":"checked"]===!0||-1===c.indexOf("undetermined")||-1===c.indexOf("down")&&-1===c.indexOf("up"))return!1;if(!b.state.loaded&&b.original.state.undetermined===!0)return!0;for(d=0,e=b.children_d.length;e>d;d++)if(-1!==a.inArray(b.children_d[d],g)||!h[b.children_d[d]].state.loaded&&h[b.children_d[d]].original.state.undetermined)return!0;return!1},this.activate_node=function(b,c){return this.settings.checkbox.tie_selection&&(this.settings.checkbox.whole_node||a(c.target).hasClass("jstree-checkbox"))&&(c.ctrlKey=!0),this.settings.checkbox.tie_selection||!this.settings.checkbox.whole_node&&!a(c.target).hasClass("jstree-checkbox")?d.activate_node.call(this,b,c):this.is_disabled(b)?!1:(this.is_checked(b)?this.uncheck_node(b,c):this.check_node(b,c),void this.trigger("activate_node",{node:this.get_node(b)}))},this.check_node=function(b,c){if(this.settings.checkbox.tie_selection)return this.select_node(b,!1,!0,c);var d,e,f,g;if(a.isArray(b)){for(b=b.slice(),e=0,f=b.length;f>e;e++)this.check_node(b[e],c);return!0}return b=this.get_node(b),b&&"#"!==b.id?(d=this.get_node(b,!0),void(b.state.checked||(b.state.checked=!0,this._data.checkbox.selected.push(b.id),d&&d.length&&d.children(".jstree-anchor").addClass("jstree-checked"),this.trigger("check_node",{node:b,selected:this._data.checkbox.selected,event:c})))):!1},this.uncheck_node=function(b,c){if(this.settings.checkbox.tie_selection)return this.deselect_node(b,!1,c);var d,e,f;if(a.isArray(b)){for(b=b.slice(),d=0,e=b.length;e>d;d++)this.uncheck_node(b[d],c);return!0}return b=this.get_node(b),b&&"#"!==b.id?(f=this.get_node(b,!0),void(b.state.checked&&(b.state.checked=!1,this._data.checkbox.selected=a.vakata.array_remove_item(this._data.checkbox.selected,b.id),f.length&&f.children(".jstree-anchor").removeClass("jstree-checked"),this.trigger("uncheck_node",{node:b,selected:this._data.checkbox.selected,event:c})))):!1},this.check_all=function(){if(this.settings.checkbox.tie_selection)return this.select_all();var a=this._data.checkbox.selected.concat([]),b,c;for(this._data.checkbox.selected=this._model.data["#"].children_d.concat(),b=0,c=this._data.checkbox.selected.length;c>b;b++)this._model.data[this._data.checkbox.selected[b]]&&(this._model.data[this._data.checkbox.selected[b]].state.checked=!0);this.redraw(!0),this.trigger("check_all",{selected:this._data.checkbox.selected})},this.uncheck_all=function(){if(this.settings.checkbox.tie_selection)return this.deselect_all();var a=this._data.checkbox.selected.concat([]),b,c;for(b=0,c=this._data.checkbox.selected.length;c>b;b++)this._model.data[this._data.checkbox.selected[b]]&&(this._model.data[this._data.checkbox.selected[b]].state.checked=!1);this._data.checkbox.selected=[],this.element.find(".jstree-checked").removeClass("jstree-checked"),this.trigger("uncheck_all",{selected:this._data.checkbox.selected,node:a})},this.is_checked=function(a){return this.settings.checkbox.tie_selection?this.is_selected(a):(a=this.get_node(a),a&&"#"!==a.id?a.state.checked:!1)},this.get_checked=function(b){return this.settings.checkbox.tie_selection?this.get_selected(b):b?a.map(this._data.checkbox.selected,a.proxy(function(a){return this.get_node(a)},this)):this._data.checkbox.selected},this.get_top_checked=function(b){if(this.settings.checkbox.tie_selection)return this.get_top_selected(b);var c=this.get_checked(!0),d={},e,f,g,h;for(e=0,f=c.length;f>e;e++)d[c[e].id]=c[e];for(e=0,f=c.length;f>e;e++)for(g=0,h=c[e].children_d.length;h>g;g++)d[c[e].children_d[g]]&&delete d[c[e].children_d[g]];c=[];for(e in d)d.hasOwnProperty(e)&&c.push(e);return b?a.map(c,a.proxy(function(a){return this.get_node(a)},this)):c},this.get_bottom_checked=function(b){if(this.settings.checkbox.tie_selection)return this.get_bottom_selected(b);var c=this.get_checked(!0),d=[],e,f;for(e=0,f=c.length;f>e;e++)c[e].children.length||d.push(c[e].id);return b?a.map(d,a.proxy(function(a){return this.get_node(a)},this)):d},this.load_node=function(b,c){var e,f,g,h,i,j;if(!a.isArray(b)&&!this.settings.checkbox.tie_selection&&(j=this.get_node(b),j&&j.state.loaded))for(e=0,f=j.children_d.length;f>e;e++)this._model.data[j.children_d[e]].state.checked&&(i=!0,this._data.checkbox.selected=a.vakata.array_remove_item(this._data.checkbox.selected,j.children_d[e]));return d.load_node.apply(this,arguments)},this.get_state=function(){var a=d.get_state.apply(this,arguments);return this.settings.checkbox.tie_selection?a:(a.checkbox=this._data.checkbox.selected.slice(),a)},this.set_state=function(b,c){var e=d.set_state.apply(this,arguments);if(e&&b.checkbox){if(!this.settings.checkbox.tie_selection){this.uncheck_all();var f=this;a.each(b.checkbox,function(a,b){f.check_node(b)})}return delete b.checkbox,this.set_state(b,c),!1}return e}},a.jstree.defaults.contextmenu={select_node:!0,show_at_node:!0,items:function(b,c){return{create:{separator_before:!1,separator_after:!0,_disabled:!1,label:"Create",action:function(b){var c=a.jstree.reference(b.reference),d=c.get_node(b.reference);c.create_node(d,{},"last",function(a){setTimeout(function(){c.edit(a)},0)})}},rename:{separator_before:!1,separator_after:!1,_disabled:!1,label:"Rename",action:function(b){var c=a.jstree.reference(b.reference),d=c.get_node(b.reference);c.edit(d)}},remove:{separator_before:!1,icon:!1,separator_after:!1,_disabled:!1,label:"Delete",action:function(b){var c=a.jstree.reference(b.reference),d=c.get_node(b.reference);c.delete_node(c.is_selected(d)?c.get_selected():d)}},ccp:{separator_before:!0,icon:!1,separator_after:!1,label:"Edit",action:!1,submenu:{cut:{separator_before:!1,separator_after:!1,label:"Cut",action:function(b){var c=a.jstree.reference(b.reference),d=c.get_node(b.reference);c.cut(c.is_selected(d)?c.get_top_selected():d)}},copy:{separator_before:!1,icon:!1,separator_after:!1,label:"Copy",action:function(b){var c=a.jstree.reference(b.reference),d=c.get_node(b.reference);c.copy(c.is_selected(d)?c.get_top_selected():d)}},paste:{separator_before:!1,icon:!1,_disabled:function(b){return!a.jstree.reference(b.reference).can_paste()},separator_after:!1,label:"Paste",action:function(b){var c=a.jstree.reference(b.reference),d=c.get_node(b.reference);c.paste(d)}}}}}}},a.jstree.plugins.contextmenu=function(c,d){this.bind=function(){d.bind.call(this);var b=0,c=null,e,f;this.element.on("contextmenu.jstree",".jstree-anchor",a.proxy(function(a,d){a.preventDefault(),b=a.ctrlKey?+new Date:0,(d||c)&&(b=+new Date+1e4),c&&clearTimeout(c),this.is_loading(a.currentTarget)||this.show_contextmenu(a.currentTarget,a.pageX,a.pageY,a)},this)).on("click.jstree",".jstree-anchor",a.proxy(function(c){this._data.contextmenu.visible&&(!b||+new Date-b>250)&&a.vakata.context.hide(),b=0},this)).on("touchstart.jstree",".jstree-anchor",function(b){b.originalEvent&&b.originalEvent.changedTouches&&b.originalEvent.changedTouches[0]&&(e=b.pageX,f=b.pageY,c=setTimeout(function(){a(b.currentTarget).trigger("contextmenu",!0)},750))}).on("touchmove.vakata.jstree",function(a){c&&a.originalEvent&&a.originalEvent.changedTouches&&a.originalEvent.changedTouches[0]&&(Math.abs(e-a.pageX)>50||Math.abs(f-a.pageY)>50)&&clearTimeout(c)}).on("touchend.vakata.jstree",function(a){c&&clearTimeout(c)}),a(i).on("context_hide.vakata.jstree",a.proxy(function(){this._data.contextmenu.visible=!1},this))},this.teardown=function(){this._data.contextmenu.visible&&a.vakata.context.hide(),d.teardown.call(this)},this.show_contextmenu=function(c,d,e,f){if(c=this.get_node(c),!c||"#"===c.id)return!1;var g=this.settings.contextmenu,h=this.get_node(c,!0),i=h.children(".jstree-anchor"),j=!1,k=!1;(g.show_at_node||d===b||e===b)&&(j=i.offset(),d=j.left,e=j.top+this._data.core.li_height),this.settings.contextmenu.select_node&&!this.is_selected(c)&&this.activate_node(c,f),k=g.items,a.isFunction(k)&&(k=k.call(this,c,a.proxy(function(a){this._show_contextmenu(c,d,e,a)},this))),a.isPlainObject(k)&&this._show_contextmenu(c,d,e,k)},this._show_contextmenu=function(b,c,d,e){var f=this.get_node(b,!0),g=f.children(".jstree-anchor");a(i).one("context_show.vakata.jstree",a.proxy(function(b,c){var d="jstree-contextmenu jstree-"+this.get_theme()+"-contextmenu";a(c.element).addClass(d)},this)),this._data.contextmenu.visible=!0,a.vakata.context.show(g,{x:c,y:d},e),this.trigger("show_contextmenu",{node:b,x:c,y:d})}},function(a){var b=!1,c={element:!1,reference:!1,position_x:0,position_y:0,items:[],html:"",is_visible:!1};a.vakata.context={settings:{hide_onmouseleave:0,icons:!0},_trigger:function(b){a(i).triggerHandler("context_"+b+".vakata",{reference:c.reference,element:c.element,position:{x:c.position_x,y:c.position_y}})},_execute:function(b){return b=c.items[b],b&&(!b._disabled||a.isFunction(b._disabled)&&!b._disabled({item:b,reference:c.reference,element:c.element}))&&b.action?b.action.call(null,{item:b,reference:c.reference,element:c.element,position:{x:c.position_x,y:c.position_y}}):!1},_parse:function(b,d){if(!b)return!1;d||(c.html="",c.items=[]);var e="",f=!1,g;return d&&(e+="<ul>"),a.each(b,function(b,d){return d?(c.items.push(d),!f&&d.separator_before&&(e+="<li class='vakata-context-separator'><a href='#' "+(a.vakata.context.settings.icons?"":'style="margin-left:0px;"')+">&#160;</a></li>"),f=!1,e+="<li class='"+(d._class||"")+(d._disabled===!0||a.isFunction(d._disabled)&&d._disabled({item:d,reference:c.reference,element:c.element})?" vakata-contextmenu-disabled ":"")+"' "+(d.shortcut?" data-shortcut='"+d.shortcut+"' ":"")+">",e+="<a href='#' rel='"+(c.items.length-1)+"'>",a.vakata.context.settings.icons&&(e+="<i ",d.icon&&(e+=-1!==d.icon.indexOf("/")||-1!==d.icon.indexOf(".")?" style='background:url(\""+d.icon+"\") center center no-repeat' ":" class='"+d.icon+"' "),e+="></i><span class='vakata-contextmenu-sep'>&#160;</span>"),e+=(a.isFunction(d.label)?d.label({item:b,reference:c.reference,element:c.element}):d.label)+(d.shortcut?' <span class="vakata-contextmenu-shortcut vakata-contextmenu-shortcut-'+d.shortcut+'">'+(d.shortcut_label||"")+"</span>":"")+"</a>",d.submenu&&(g=a.vakata.context._parse(d.submenu,!0),g&&(e+=g)),e+="</li>",void(d.separator_after&&(e+="<li class='vakata-context-separator'><a href='#' "+(a.vakata.context.settings.icons?"":'style="margin-left:0px;"')+">&#160;</a></li>",f=!0))):!0}),e=e.replace(/<li class\='vakata-context-separator'\><\/li\>$/,""),d&&(e+="</ul>"),d||(c.html=e,a.vakata.context._trigger("parse")),e.length>10?e:!1},_show_submenu:function(c){if(c=a(c),c.length&&c.children("ul").length){var d=c.children("ul"),e=c.offset().left+c.outerWidth(),f=c.offset().top,g=d.width(),h=d.height(),i=a(window).width()+a(window).scrollLeft(),j=a(window).height()+a(window).scrollTop();b?c[e-(g+10+c.outerWidth())<0?"addClass":"removeClass"]("vakata-context-left"):c[e+g+10>i?"addClass":"removeClass"]("vakata-context-right"),f+h+10>j&&d.css("bottom","-1px"),d.show()}},show:function(d,e,f){var g,h,i,j,k,l,m,n,o=!0;switch(c.element&&c.element.length&&c.element.width(""),o){case!e&&!d:return!1;case!!e&&!!d:c.reference=d,c.position_x=e.x,c.position_y=e.y;break;case!e&&!!d:c.reference=d,g=d.offset(),c.position_x=g.left+d.outerHeight(),c.position_y=g.top;break;case!!e&&!d:c.position_x=e.x,c.position_y=e.y}d&&!f&&a(d).data("vakata_contextmenu")&&(f=a(d).data("vakata_contextmenu")),a.vakata.context._parse(f)&&c.element.html(c.html),c.items.length&&(c.element.appendTo("body"),h=c.element,i=c.position_x,j=c.position_y,k=h.width(),l=h.height(),m=a(window).width()+a(window).scrollLeft(),n=a(window).height()+a(window).scrollTop(),b&&(i-=h.outerWidth()-a(d).outerWidth(),i<a(window).scrollLeft()+20&&(i=a(window).scrollLeft()+20)),i+k+20>m&&(i=m-(k+20)),j+l+20>n&&(j=n-(l+20)),c.element.css({left:i,top:j}).show().find("a").first().focus().parent().addClass("vakata-context-hover"),c.is_visible=!0,a.vakata.context._trigger("show"))},hide:function(){c.is_visible&&(c.element.hide().find("ul").hide().end().find(":focus").blur().end().detach(),c.is_visible=!1,a.vakata.context._trigger("hide"))}},a(function(){b="rtl"===a("body").css("direction");var d=!1;c.element=a("<ul class='vakata-context'></ul>"),c.element.on("mouseenter","li",function(b){b.stopImmediatePropagation(),a.contains(this,b.relatedTarget)||(d&&clearTimeout(d),c.element.find(".vakata-context-hover").removeClass("vakata-context-hover").end(),a(this).siblings().find("ul").hide().end().end().parentsUntil(".vakata-context","li").addBack().addClass("vakata-context-hover"),a.vakata.context._show_submenu(this))}).on("mouseleave","li",function(b){a.contains(this,b.relatedTarget)||a(this).find(".vakata-context-hover").addBack().removeClass("vakata-context-hover")}).on("mouseleave",function(b){a(this).find(".vakata-context-hover").removeClass("vakata-context-hover"),a.vakata.context.settings.hide_onmouseleave&&(d=setTimeout(function(b){return function(){a.vakata.context.hide()}}(this),a.vakata.context.settings.hide_onmouseleave))}).on("click","a",function(b){b.preventDefault(),a(this).blur().parent().hasClass("vakata-context-disabled")||a.vakata.context._execute(a(this).attr("rel"))===!1||a.vakata.context.hide()}).on("keydown","a",function(b){var d=null;switch(b.which){case 13:case 32:b.type="mouseup",b.preventDefault(),a(b.currentTarget).trigger(b);break;case 37:c.is_visible&&(c.element.find(".vakata-context-hover").last().closest("li").first().find("ul").hide().find(".vakata-context-hover").removeClass("vakata-context-hover").end().end().children("a").focus(),b.stopImmediatePropagation(),b.preventDefault());break;case 38:c.is_visible&&(d=c.element.find("ul:visible").addBack().last().children(".vakata-context-hover").removeClass("vakata-context-hover").prevAll("li:not(.vakata-context-separator)").first(),d.length||(d=c.element.find("ul:visible").addBack().last().children("li:not(.vakata-context-separator)").last()),d.addClass("vakata-context-hover").children("a").focus(),b.stopImmediatePropagation(),b.preventDefault());break;case 39:c.is_visible&&(c.element.find(".vakata-context-hover").last().children("ul").show().children("li:not(.vakata-context-separator)").removeClass("vakata-context-hover").first().addClass("vakata-context-hover").children("a").focus(),b.stopImmediatePropagation(),b.preventDefault());break;case 40:c.is_visible&&(d=c.element.find("ul:visible").addBack().last().children(".vakata-context-hover").removeClass("vakata-context-hover").nextAll("li:not(.vakata-context-separator)").first(),d.length||(d=c.element.find("ul:visible").addBack().last().children("li:not(.vakata-context-separator)").first()),d.addClass("vakata-context-hover").children("a").focus(),b.stopImmediatePropagation(),b.preventDefault());break;case 27:a.vakata.context.hide(),b.preventDefault()}}).on("keydown",function(a){a.preventDefault();var b=c.element.find(".vakata-contextmenu-shortcut-"+a.which).parent();b.parent().not(".vakata-context-disabled")&&b.click()}),a(i).on("mousedown.vakata.jstree",function(b){c.is_visible&&!a.contains(c.element[0],b.target)&&a.vakata.context.hide()}).on("context_show.vakata.jstree",function(a,d){c.element.find("li:has(ul)").children("a").addClass("vakata-context-parent"),b&&c.element.addClass("vakata-context-rtl").css("direction","rtl"),c.element.find("ul").hide().end()})})}(a),a.jstree.defaults.dnd={copy:!0,open_timeout:500,is_draggable:!0,check_while_dragging:!0,always_copy:!1,inside_pos:0,drag_selection:!0,touch:!0,large_drop_target:!1,large_drag_target:!1},a.jstree.plugins.dnd=function(b,c){this.bind=function(){c.bind.call(this),this.element.on("mousedown.jstree touchstart.jstree",this.settings.dnd.large_drag_target?".jstree-node":".jstree-anchor",a.proxy(function(b){if(this.settings.dnd.large_drag_target&&a(b.target).closest(".jstree-node")[0]!==b.currentTarget)return!0;if("touchstart"===b.type&&(!this.settings.dnd.touch||"selected"===this.settings.dnd.touch&&!a(b.currentTarget).closest(".jstree-node").children(".jstree-anchor").hasClass("jstree-clicked")))return!0;var c=this.get_node(b.target),d=this.is_selected(c)&&this.settings.dnd.drag_selection?this.get_top_selected().length:1,e=d>1?d+" "+this.get_string("nodes"):this.get_text(b.currentTarget);return this.settings.core.force_text&&(e=a.vakata.html.escape(e)),c&&c.id&&"#"!==c.id&&(1===b.which||"touchstart"===b.type)&&(this.settings.dnd.is_draggable===!0||a.isFunction(this.settings.dnd.is_draggable)&&this.settings.dnd.is_draggable.call(this,d>1?this.get_top_selected(!0):[c]))?(this.element.trigger("mousedown.jstree"),a.vakata.dnd.start(b,{jstree:!0,origin:this,obj:this.get_node(c,!0),nodes:d>1?this.get_top_selected():[c.id]},'<div id="jstree-dnd" class="jstree-'+this.get_theme()+" jstree-"+this.get_theme()+"-"+this.get_theme_variant()+" "+(this.settings.core.themes.responsive?" jstree-dnd-responsive":"")+'"><i class="jstree-icon jstree-er"></i>'+e+'<ins class="jstree-copy" style="display:none;">+</ins></div>')):void 0},this))}},a(function(){var b=!1,c=!1,d=!1,e=a('<div id="jstree-marker">&#160;</div>').hide();a(i).on("dnd_start.vakata.jstree",function(a,c){b=!1,c&&c.data&&c.data.jstree&&e.appendTo("body")}).on("dnd_move.vakata.jstree",function(f,g){if(d&&clearTimeout(d),g&&g.data&&g.data.jstree&&(!g.event.target.id||"jstree-marker"!==g.event.target.id)){var h=a.jstree.reference(g.event.target),i=!1,j=!1,k=!1,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;if(h&&h._data&&h._data.dnd)if(e.attr("class","jstree-"+h.get_theme()+(h.settings.core.themes.responsive?" jstree-dnd-responsive":"")),g.helper.children().attr("class","jstree-"+h.get_theme()+" jstree-"+h.get_theme()+"-"+h.get_theme_variant()+" "+(h.settings.core.themes.responsive?" jstree-dnd-responsive":"")).find(".jstree-copy").first()[g.data.origin&&(g.data.origin.settings.dnd.always_copy||g.data.origin.settings.dnd.copy&&(g.event.metaKey||g.event.ctrlKey))?"show":"hide"](),g.event.target!==h.element[0]&&g.event.target!==h.get_container_ul()[0]||0!==h.get_container_ul().children().length){if(i=h.settings.dnd.large_drop_target?a(g.event.target).closest(".jstree-node").children(".jstree-anchor"):a(g.event.target).closest(".jstree-anchor"),i&&i.length&&i.parent().is(".jstree-closed, .jstree-open, .jstree-leaf")&&(j=i.offset(),k=g.event.pageY-j.top,o=i.outerHeight(),r=o/3>k?["b","i","a"]:k>o-o/3?["a","i","b"]:k>o/2?["i","a","b"]:["i","b","a"],a.each(r,function(f,k){switch(k){case"b":m=j.left-6,n=j.top,p=h.get_parent(i),q=i.parent().index();break;case"i":y=h.settings.dnd.inside_pos,z=h.get_node(i.parent()),m=j.left-2,n=j.top+o/2+1,p=z.id,q="first"===y?0:"last"===y?z.children.length:Math.min(y,z.children.length);break;case"a":m=j.left-6,n=j.top+o,p=h.get_parent(i),q=i.parent().index()+1}for(s=!0,t=0,u=g.data.nodes.length;u>t;t++)if(v=g.data.origin&&(g.data.origin.settings.dnd.always_copy||g.data.origin.settings.dnd.copy&&(g.event.metaKey||g.event.ctrlKey))?"copy_node":"move_node",w=q,"move_node"===v&&"a"===k&&g.data.origin&&g.data.origin===h&&p===h.get_parent(g.data.nodes[t])&&(x=h.get_node(p),w>a.inArray(g.data.nodes[t],x.children)&&(w-=1)),s=s&&(h&&h.settings&&h.settings.dnd&&h.settings.dnd.check_while_dragging===!1||h.check(v,g.data.origin&&g.data.origin!==h?g.data.origin.get_node(g.data.nodes[t]):g.data.nodes[t],p,w,{dnd:!0,ref:h.get_node(i.parent()),pos:k,origin:g.data.origin,is_multi:g.data.origin&&g.data.origin!==h,is_foreign:!g.data.origin})),!s){h&&h.last_error&&(c=h.last_error());break}return"i"===k&&i.parent().is(".jstree-closed")&&h.settings.dnd.open_timeout&&(d=setTimeout(function(a,b){return function(){a.open_node(b)}}(h,i),h.settings.dnd.open_timeout)),s?(b={ins:h,par:p,pos:"i"!==k||"last"!==y||0!==q||h.is_loaded(z)?q:"last"},e.css({left:m+"px",top:n+"px"}).show(),g.helper.find(".jstree-icon").first().removeClass("jstree-er").addClass("jstree-ok"),c={},r=!0,!1):void 0}),r===!0))return}else{for(s=!0,t=0,u=g.data.nodes.length;u>t;t++)if(s=s&&h.check(g.data.origin&&(g.data.origin.settings.dnd.always_copy||g.data.origin.settings.dnd.copy&&(g.event.metaKey||g.event.ctrlKey))?"copy_node":"move_node",g.data.origin&&g.data.origin!==h?g.data.origin.get_node(g.data.nodes[t]):g.data.nodes[t],"#","last",{dnd:!0,ref:h.get_node("#"),pos:"i",origin:g.data.origin,is_multi:g.data.origin&&g.data.origin!==h,is_foreign:!g.data.origin}),!s)break;if(s)return b={ins:h,par:"#",pos:"last"},e.hide(),void g.helper.find(".jstree-icon").first().removeClass("jstree-er").addClass("jstree-ok")}b=!1,g.helper.find(".jstree-icon").removeClass("jstree-ok").addClass("jstree-er"),e.hide()}}).on("dnd_scroll.vakata.jstree",function(a,c){c&&c.data&&c.data.jstree&&(e.hide(),b=!1,c.helper.find(".jstree-icon").first().removeClass("jstree-ok").addClass("jstree-er"))}).on("dnd_stop.vakata.jstree",function(f,g){if(d&&clearTimeout(d),g&&g.data&&g.data.jstree){e.hide().detach();var h,i,j=[];if(b){for(h=0,i=g.data.nodes.length;i>h;h++)j[h]=g.data.origin?g.data.origin.get_node(g.data.nodes[h]):g.data.nodes[h];b.ins[g.data.origin&&(g.data.origin.settings.dnd.always_copy||g.data.origin.settings.dnd.copy&&(g.event.metaKey||g.event.ctrlKey))?"copy_node":"move_node"](j,b.par,b.pos,!1,!1,!1,g.data.origin);
+
+}else h=a(g.event.target).closest(".jstree"),h.length&&c&&c.error&&"check"===c.error&&(h=h.jstree(!0),h&&h.settings.core.error.call(this,c))}}).on("keyup.jstree keydown.jstree",function(b,c){c=a.vakata.dnd._get(),c&&c.data&&c.data.jstree&&c.helper.find(".jstree-copy").first()[c.data.origin&&(c.data.origin.settings.dnd.always_copy||c.data.origin.settings.dnd.copy&&(b.metaKey||b.ctrlKey))?"show":"hide"]()})}),function(a){a.vakata.html={div:a("<div />"),escape:function(b){return a.vakata.html.div.text(b).html()},strip:function(b){return a.vakata.html.div.empty().append(a.parseHTML(b)).text()}};var b={element:!1,target:!1,is_down:!1,is_drag:!1,helper:!1,helper_w:0,data:!1,init_x:0,init_y:0,scroll_l:0,scroll_t:0,scroll_e:!1,scroll_i:!1,is_touch:!1};a.vakata.dnd={settings:{scroll_speed:10,scroll_proximity:20,helper_left:5,helper_top:10,threshold:5,threshold_touch:50},_trigger:function(b,c){var d=a.vakata.dnd._get();d.event=c,a(i).triggerHandler("dnd_"+b+".vakata",d)},_get:function(){return{data:b.data,element:b.element,helper:b.helper}},_clean:function(){b.helper&&b.helper.remove(),b.scroll_i&&(clearInterval(b.scroll_i),b.scroll_i=!1),b={element:!1,target:!1,is_down:!1,is_drag:!1,helper:!1,helper_w:0,data:!1,init_x:0,init_y:0,scroll_l:0,scroll_t:0,scroll_e:!1,scroll_i:!1,is_touch:!1},a(i).off("mousemove.vakata.jstree touchmove.vakata.jstree",a.vakata.dnd.drag),a(i).off("mouseup.vakata.jstree touchend.vakata.jstree",a.vakata.dnd.stop)},_scroll:function(c){if(!b.scroll_e||!b.scroll_l&&!b.scroll_t)return b.scroll_i&&(clearInterval(b.scroll_i),b.scroll_i=!1),!1;if(!b.scroll_i)return b.scroll_i=setInterval(a.vakata.dnd._scroll,100),!1;if(c===!0)return!1;var d=b.scroll_e.scrollTop(),e=b.scroll_e.scrollLeft();b.scroll_e.scrollTop(d+b.scroll_t*a.vakata.dnd.settings.scroll_speed),b.scroll_e.scrollLeft(e+b.scroll_l*a.vakata.dnd.settings.scroll_speed),(d!==b.scroll_e.scrollTop()||e!==b.scroll_e.scrollLeft())&&a.vakata.dnd._trigger("scroll",b.scroll_e)},start:function(c,d,e){"touchstart"===c.type&&c.originalEvent&&c.originalEvent.changedTouches&&c.originalEvent.changedTouches[0]&&(c.pageX=c.originalEvent.changedTouches[0].pageX,c.pageY=c.originalEvent.changedTouches[0].pageY,c.target=i.elementFromPoint(c.originalEvent.changedTouches[0].pageX-window.pageXOffset,c.originalEvent.changedTouches[0].pageY-window.pageYOffset)),b.is_drag&&a.vakata.dnd.stop({});try{c.currentTarget.unselectable="on",c.currentTarget.onselectstart=function(){return!1},c.currentTarget.style&&(c.currentTarget.style.MozUserSelect="none")}catch(f){}return b.init_x=c.pageX,b.init_y=c.pageY,b.data=d,b.is_down=!0,b.element=c.currentTarget,b.target=c.target,b.is_touch="touchstart"===c.type,e!==!1&&(b.helper=a("<div id='vakata-dnd'></div>").html(e).css({display:"block",margin:"0",padding:"0",position:"absolute",top:"-2000px",lineHeight:"16px",zIndex:"10000"})),a(i).on("mousemove.vakata.jstree touchmove.vakata.jstree",a.vakata.dnd.drag),a(i).on("mouseup.vakata.jstree touchend.vakata.jstree",a.vakata.dnd.stop),!1},drag:function(c){if("touchmove"===c.type&&c.originalEvent&&c.originalEvent.changedTouches&&c.originalEvent.changedTouches[0]&&(c.pageX=c.originalEvent.changedTouches[0].pageX,c.pageY=c.originalEvent.changedTouches[0].pageY,c.target=i.elementFromPoint(c.originalEvent.changedTouches[0].pageX-window.pageXOffset,c.originalEvent.changedTouches[0].pageY-window.pageYOffset)),b.is_down){if(!b.is_drag){if(!(Math.abs(c.pageX-b.init_x)>(b.is_touch?a.vakata.dnd.settings.threshold_touch:a.vakata.dnd.settings.threshold)||Math.abs(c.pageY-b.init_y)>(b.is_touch?a.vakata.dnd.settings.threshold_touch:a.vakata.dnd.settings.threshold)))return;b.helper&&(b.helper.appendTo("body"),b.helper_w=b.helper.outerWidth()),b.is_drag=!0,a.vakata.dnd._trigger("start",c)}var d=!1,e=!1,f=!1,g=!1,h=!1,j=!1,k=!1,l=!1,m=!1,n=!1;return b.scroll_t=0,b.scroll_l=0,b.scroll_e=!1,a(a(c.target).parentsUntil("body").addBack().get().reverse()).filter(function(){return/^auto|scroll$/.test(a(this).css("overflow"))&&(this.scrollHeight>this.offsetHeight||this.scrollWidth>this.offsetWidth)}).each(function(){var d=a(this),e=d.offset();return this.scrollHeight>this.offsetHeight&&(e.top+d.height()-c.pageY<a.vakata.dnd.settings.scroll_proximity&&(b.scroll_t=1),c.pageY-e.top<a.vakata.dnd.settings.scroll_proximity&&(b.scroll_t=-1)),this.scrollWidth>this.offsetWidth&&(e.left+d.width()-c.pageX<a.vakata.dnd.settings.scroll_proximity&&(b.scroll_l=1),c.pageX-e.left<a.vakata.dnd.settings.scroll_proximity&&(b.scroll_l=-1)),b.scroll_t||b.scroll_l?(b.scroll_e=a(this),!1):void 0}),b.scroll_e||(d=a(i),e=a(window),f=d.height(),g=e.height(),h=d.width(),j=e.width(),k=d.scrollTop(),l=d.scrollLeft(),f>g&&c.pageY-k<a.vakata.dnd.settings.scroll_proximity&&(b.scroll_t=-1),f>g&&g-(c.pageY-k)<a.vakata.dnd.settings.scroll_proximity&&(b.scroll_t=1),h>j&&c.pageX-l<a.vakata.dnd.settings.scroll_proximity&&(b.scroll_l=-1),h>j&&j-(c.pageX-l)<a.vakata.dnd.settings.scroll_proximity&&(b.scroll_l=1),(b.scroll_t||b.scroll_l)&&(b.scroll_e=d)),b.scroll_e&&a.vakata.dnd._scroll(!0),b.helper&&(m=parseInt(c.pageY+a.vakata.dnd.settings.helper_top,10),n=parseInt(c.pageX+a.vakata.dnd.settings.helper_left,10),f&&m+25>f&&(m=f-50),h&&n+b.helper_w>h&&(n=h-(b.helper_w+2)),b.helper.css({left:n+"px",top:m+"px"})),a.vakata.dnd._trigger("move",c),!1}},stop:function(c){if("touchend"===c.type&&c.originalEvent&&c.originalEvent.changedTouches&&c.originalEvent.changedTouches[0]&&(c.pageX=c.originalEvent.changedTouches[0].pageX,c.pageY=c.originalEvent.changedTouches[0].pageY,c.target=i.elementFromPoint(c.originalEvent.changedTouches[0].pageX-window.pageXOffset,c.originalEvent.changedTouches[0].pageY-window.pageYOffset)),b.is_drag)a.vakata.dnd._trigger("stop",c);else if("touchend"===c.type&&c.target===b.target){var d=setTimeout(function(){a(c.target).click()},100);a(c.target).one("click",function(){d&&clearTimeout(d)})}return a.vakata.dnd._clean(),!1}}}(a),a.jstree.defaults.massload=null,a.jstree.plugins.massload=function(b,c){this.init=function(a,b){c.init.call(this,a,b),this._data.massload={}},this._load_nodes=function(b,d,e){var f=this.settings.massload;return e&&!a.isEmptyObject(this._data.massload)?c._load_nodes.call(this,b,d,e):a.isFunction(f)?f.call(this,b,a.proxy(function(a){if(a)for(var f in a)a.hasOwnProperty(f)&&(this._data.massload[f]=a[f]);c._load_nodes.call(this,b,d,e)},this)):"object"==typeof f&&f&&f.url?(f=a.extend(!0,{},f),a.isFunction(f.url)&&(f.url=f.url.call(this,b)),a.isFunction(f.data)&&(f.data=f.data.call(this,b)),a.ajax(f).done(a.proxy(function(a,f,g){if(a)for(var h in a)a.hasOwnProperty(h)&&(this._data.massload[h]=a[h]);c._load_nodes.call(this,b,d,e)},this)).fail(a.proxy(function(a){c._load_nodes.call(this,b,d,e)},this))):c._load_nodes.call(this,b,d,e)},this._load_node=function(b,d){var e=this._data.massload[b.id];return e?this["string"==typeof e?"_append_html_data":"_append_json_data"](b,"string"==typeof e?a(a.parseHTML(e)).filter(function(){return 3!==this.nodeType}):e,function(a){d.call(this,a),delete this._data.massload[b.id]}):c._load_node.call(this,b,d)}},a.jstree.defaults.search={ajax:!1,fuzzy:!1,case_sensitive:!1,show_only_matches:!1,show_only_matches_children:!1,close_opened_onclear:!0,search_leaves_only:!1,search_callback:!1},a.jstree.plugins.search=function(c,d){this.bind=function(){d.bind.call(this),this._data.search.str="",this._data.search.dom=a(),this._data.search.res=[],this._data.search.opn=[],this._data.search.som=!1,this._data.search.smc=!1,this.element.on("before_open.jstree",a.proxy(function(b,c){var d,e,f,g=this._data.search.res,h=[],i=a();if(g&&g.length&&(this._data.search.dom=a(this.element[0].querySelectorAll("#"+a.map(g,function(b){return-1!=="0123456789".indexOf(b[0])?"\\3"+b[0]+" "+b.substr(1).replace(a.jstree.idregex,"\\$&"):b.replace(a.jstree.idregex,"\\$&")}).join(", #"))),this._data.search.dom.children(".jstree-anchor").addClass("jstree-search"),this._data.search.som&&this._data.search.res.length)){for(d=0,e=g.length;e>d;d++)h=h.concat(this.get_node(g[d]).parents);h=a.vakata.array_remove_item(a.vakata.array_unique(h),"#"),i=h.length?a(this.element[0].querySelectorAll("#"+a.map(h,function(b){return-1!=="0123456789".indexOf(b[0])?"\\3"+b[0]+" "+b.substr(1).replace(a.jstree.idregex,"\\$&"):b.replace(a.jstree.idregex,"\\$&")}).join(", #"))):a(),this.element.find(".jstree-node").hide().filter(".jstree-last").filter(function(){return this.nextSibling}).removeClass("jstree-last"),i=i.add(this._data.search.dom),this._data.search.smc&&this._data.search.dom.children(".jstree-children").find(".jstree-node").show(),i.parentsUntil(".jstree").addBack().show().filter(".jstree-children").each(function(){a(this).children(".jstree-node:visible").eq(-1).addClass("jstree-last")})}},this)).on("search.jstree",a.proxy(function(b,c){this._data.search.som&&c.nodes.length&&(this.element.find(".jstree-node").hide().filter(".jstree-last").filter(function(){return this.nextSibling}).removeClass("jstree-last"),this._data.search.smc&&c.nodes.children(".jstree-children").find(".jstree-node").show(),c.nodes.parentsUntil(".jstree").addBack().show().filter(".jstree-children").each(function(){a(this).children(".jstree-node:visible").eq(-1).addClass("jstree-last")}))},this)).on("clear_search.jstree",a.proxy(function(a,b){this._data.search.som&&b.nodes.length&&this.element.find(".jstree-node").css("display","").filter(".jstree-last").filter(function(){return this.nextSibling}).removeClass("jstree-last")},this))},this.search=function(c,d,e,f,g,h){if(c===!1||""===a.trim(c.toString()))return this.clear_search();f=this.get_node(f),f=f&&f.id?f.id:null,c=c.toString();var i=this.settings.search,j=i.ajax?i.ajax:!1,k=this._model.data,l=null,m=[],n=[],o,p;return this._data.search.res.length&&!g&&this.clear_search(),e===b&&(e=i.show_only_matches),h===b&&(h=i.show_only_matches_children),d||j===!1?(g||(this._data.search.str=c,this._data.search.dom=a(),this._data.search.res=[],this._data.search.opn=[],this._data.search.som=e,this._data.search.smc=h),l=new a.vakata.search(c,!0,{caseSensitive:i.case_sensitive,fuzzy:i.fuzzy}),a.each(k[f?f:"#"].children_d,function(a,b){var d=k[b];d.text&&(i.search_callback&&i.search_callback.call(this,c,d)||!i.search_callback&&l.search(d.text).isMatch)&&(!i.search_leaves_only||d.state.loaded&&0===d.children.length)&&(m.push(b),n=n.concat(d.parents))}),m.length&&(n=a.vakata.array_unique(n),this._search_open(n),g?(this._data.search.dom=this._data.search.dom.add(a(this.element[0].querySelectorAll("#"+a.map(m,function(b){return-1!=="0123456789".indexOf(b[0])?"\\3"+b[0]+" "+b.substr(1).replace(a.jstree.idregex,"\\$&"):b.replace(a.jstree.idregex,"\\$&")}).join(", #")))),this._data.search.res=a.vakata.array_unique(this._data.search.res.concat(m))):(this._data.search.dom=a(this.element[0].querySelectorAll("#"+a.map(m,function(b){return-1!=="0123456789".indexOf(b[0])?"\\3"+b[0]+" "+b.substr(1).replace(a.jstree.idregex,"\\$&"):b.replace(a.jstree.idregex,"\\$&")}).join(", #"))),this._data.search.res=m),this._data.search.dom.children(".jstree-anchor").addClass("jstree-search")),void this.trigger("search",{nodes:this._data.search.dom,str:c,res:this._data.search.res,show_only_matches:e})):a.isFunction(j)?j.call(this,c,a.proxy(function(b){b&&b.d&&(b=b.d),this._load_nodes(a.isArray(b)?a.vakata.array_unique(b):[],function(){this.search(c,!0,e,f,g)},!0)},this),f):(j=a.extend({},j),j.data||(j.data={}),j.data.str=c,f&&(j.data.inside=f),a.ajax(j).fail(a.proxy(function(){this._data.core.last_error={error:"ajax",plugin:"search",id:"search_01",reason:"Could not load search parents",data:JSON.stringify(j)},this.settings.core.error.call(this,this._data.core.last_error)},this)).done(a.proxy(function(b){b&&b.d&&(b=b.d),this._load_nodes(a.isArray(b)?a.vakata.array_unique(b):[],function(){this.search(c,!0,e,f,g)},!0)},this)))},this.clear_search=function(){this._data.search.dom.children(".jstree-anchor").removeClass("jstree-search"),this.settings.search.close_opened_onclear&&this.close_node(this._data.search.opn,0),this.trigger("clear_search",{nodes:this._data.search.dom,str:this._data.search.str,res:this._data.search.res}),this._data.search.str="",this._data.search.res=[],this._data.search.opn=[],this._data.search.dom=a()},this._search_open=function(b){var c=this;a.each(b.concat([]),function(d,e){if("#"===e)return!0;try{e=a("#"+e.replace(a.jstree.idregex,"\\$&"),c.element)}catch(f){}e&&e.length&&c.is_closed(e)&&(c._data.search.opn.push(e[0].id),c.open_node(e,function(){c._search_open(b)},0))})}},function(a){a.vakata.search=function(b,c,d){d=d||{},d=a.extend({},a.vakata.search.defaults,d),d.fuzzy!==!1&&(d.fuzzy=!0),b=d.caseSensitive?b:b.toLowerCase();var e=d.location,f=d.distance,g=d.threshold,h=b.length,i,j,k,l;return h>32&&(d.fuzzy=!1),d.fuzzy&&(i=1<<h-1,j=function(){var a={},c=0;for(c=0;h>c;c++)a[b.charAt(c)]=0;for(c=0;h>c;c++)a[b.charAt(c)]|=1<<h-c-1;return a}(),k=function(a,b){var c=a/h,d=Math.abs(e-b);return f?c+d/f:d?1:c}),l=function(a){if(a=d.caseSensitive?a:a.toLowerCase(),b===a||-1!==a.indexOf(b))return{isMatch:!0,score:0};if(!d.fuzzy)return{isMatch:!1,score:1};var c,f,l=a.length,m=g,n=a.indexOf(b,e),o,p,q=h+l,r,s,t,u,v,w=1,x=[];for(-1!==n&&(m=Math.min(k(0,n),m),n=a.lastIndexOf(b,e+h),-1!==n&&(m=Math.min(k(0,n),m))),n=-1,c=0;h>c;c++){o=0,p=q;while(p>o)k(c,e+p)<=m?o=p:q=p,p=Math.floor((q-o)/2+o);for(q=p,s=Math.max(1,e-p+1),t=Math.min(e+p,l)+h,u=new Array(t+2),u[t+1]=(1<<c)-1,f=t;f>=s;f--)if(v=j[a.charAt(f-1)],u[f]=0===c?(u[f+1]<<1|1)&v:(u[f+1]<<1|1)&v|((r[f+1]|r[f])<<1|1)|r[f+1],u[f]&i&&(w=k(c,f-1),m>=w)){if(m=w,n=f-1,x.push(n),!(n>e))break;s=Math.max(1,2*e-n)}if(k(c+1,e)>m)break;r=u}return{isMatch:n>=0,score:w}},c===!0?{search:l}:l(c)},a.vakata.search.defaults={location:0,distance:100,threshold:.6,fuzzy:!1,caseSensitive:!1}}(a),a.jstree.defaults.sort=function(a,b){return this.get_text(a)>this.get_text(b)?1:-1},a.jstree.plugins.sort=function(b,c){this.bind=function(){c.bind.call(this),this.element.on("model.jstree",a.proxy(function(a,b){this.sort(b.parent,!0)},this)).on("rename_node.jstree create_node.jstree",a.proxy(function(a,b){this.sort(b.parent||b.node.parent,!1),this.redraw_node(b.parent||b.node.parent,!0)},this)).on("move_node.jstree copy_node.jstree",a.proxy(function(a,b){this.sort(b.parent,!1),this.redraw_node(b.parent,!0)},this))},this.sort=function(b,c){var d,e;if(b=this.get_node(b),b&&b.children&&b.children.length&&(b.children.sort(a.proxy(this.settings.sort,this)),c))for(d=0,e=b.children_d.length;e>d;d++)this.sort(b.children_d[d],!1)}};var n=!1;a.jstree.defaults.state={key:"jstree",events:"changed.jstree open_node.jstree close_node.jstree check_node.jstree uncheck_node.jstree",ttl:!1,filter:!1},a.jstree.plugins.state=function(b,c){this.bind=function(){c.bind.call(this);var b=a.proxy(function(){this.element.on(this.settings.state.events,a.proxy(function(){n&&clearTimeout(n),n=setTimeout(a.proxy(function(){this.save_state()},this),100)},this)),this.trigger("state_ready")},this);this.element.on("ready.jstree",a.proxy(function(a,c){this.element.one("restore_state.jstree",b),this.restore_state()||b()},this))},this.save_state=function(){var b={state:this.get_state(),ttl:this.settings.state.ttl,sec:+new Date};a.vakata.storage.set(this.settings.state.key,JSON.stringify(b))},this.restore_state=function(){var b=a.vakata.storage.get(this.settings.state.key);if(b)try{b=JSON.parse(b)}catch(c){return!1}return b&&b.ttl&&b.sec&&+new Date-b.sec>b.ttl?!1:(b&&b.state&&(b=b.state),b&&a.isFunction(this.settings.state.filter)&&(b=this.settings.state.filter.call(this,b)),b?(this.element.one("set_state.jstree",function(c,d){d.instance.trigger("restore_state",{state:a.extend(!0,{},b)})}),this.set_state(b),!0):!1)},this.clear_state=function(){return a.vakata.storage.del(this.settings.state.key)}},function(a,b){a.vakata.storage={set:function(a,b){return window.localStorage.setItem(a,b)},get:function(a){return window.localStorage.getItem(a)},del:function(a){return window.localStorage.removeItem(a)}}}(a),a.jstree.defaults.types={"#":{},"default":{}},a.jstree.plugins.types=function(c,d){this.init=function(a,c){var e,f;if(c&&c.types&&c.types["default"])for(e in c.types)if("default"!==e&&"#"!==e&&c.types.hasOwnProperty(e))for(f in c.types["default"])c.types["default"].hasOwnProperty(f)&&c.types[e][f]===b&&(c.types[e][f]=c.types["default"][f]);d.init.call(this,a,c),this._model.data["#"].type="#"},this.refresh=function(a,b){d.refresh.call(this,a,b),this._model.data["#"].type="#"},this.bind=function(){this.element.on("model.jstree",a.proxy(function(a,c){var d=this._model.data,e=c.nodes,f=this.settings.types,g,h,i="default";for(g=0,h=e.length;h>g;g++)i="default",d[e[g]].original&&d[e[g]].original.type&&f[d[e[g]].original.type]&&(i=d[e[g]].original.type),d[e[g]].data&&d[e[g]].data.jstree&&d[e[g]].data.jstree.type&&f[d[e[g]].data.jstree.type]&&(i=d[e[g]].data.jstree.type),d[e[g]].type=i,d[e[g]].icon===!0&&f[i].icon!==b&&(d[e[g]].icon=f[i].icon);d["#"].type="#"},this)),d.bind.call(this)},this.get_json=function(b,c,e){var f,g,h=this._model.data,i=c?a.extend(!0,{},c,{no_id:!1}):{},j=d.get_json.call(this,b,i,e);if(j===!1)return!1;if(a.isArray(j))for(f=0,g=j.length;g>f;f++)j[f].type=j[f].id&&h[j[f].id]&&h[j[f].id].type?h[j[f].id].type:"default",c&&c.no_id&&(delete j[f].id,j[f].li_attr&&j[f].li_attr.id&&delete j[f].li_attr.id,j[f].a_attr&&j[f].a_attr.id&&delete j[f].a_attr.id);else j.type=j.id&&h[j.id]&&h[j.id].type?h[j.id].type:"default",c&&c.no_id&&(j=this._delete_ids(j));return j},this._delete_ids=function(b){if(a.isArray(b)){for(var c=0,d=b.length;d>c;c++)b[c]=this._delete_ids(b[c]);return b}return delete b.id,b.li_attr&&b.li_attr.id&&delete b.li_attr.id,b.a_attr&&b.a_attr.id&&delete b.a_attr.id,b.children&&a.isArray(b.children)&&(b.children=this._delete_ids(b.children)),b},this.check=function(c,e,f,g,h){if(d.check.call(this,c,e,f,g,h)===!1)return!1;e=e&&e.id?e:this.get_node(e),f=f&&f.id?f:this.get_node(f);var i=e&&e.id?h&&h.origin?h.origin:a.jstree.reference(e.id):null,j,k,l,m;switch(i=i&&i._model&&i._model.data?i._model.data:null,c){case"create_node":case"move_node":case"copy_node":if("move_node"!==c||-1===a.inArray(e.id,f.children)){if(j=this.get_rules(f),j.max_children!==b&&-1!==j.max_children&&j.max_children===f.children.length)return this._data.core.last_error={error:"check",plugin:"types",id:"types_01",reason:"max_children prevents function: "+c,data:JSON.stringify({chk:c,pos:g,obj:e&&e.id?e.id:!1,par:f&&f.id?f.id:!1})},!1;if(j.valid_children!==b&&-1!==j.valid_children&&-1===a.inArray(e.type||"default",j.valid_children))return this._data.core.last_error={error:"check",plugin:"types",id:"types_02",reason:"valid_children prevents function: "+c,data:JSON.stringify({chk:c,pos:g,obj:e&&e.id?e.id:!1,par:f&&f.id?f.id:!1})},!1;if(i&&e.children_d&&e.parents){for(k=0,l=0,m=e.children_d.length;m>l;l++)k=Math.max(k,i[e.children_d[l]].parents.length);k=k-e.parents.length+1}(0>=k||k===b)&&(k=1);do{if(j.max_depth!==b&&-1!==j.max_depth&&j.max_depth<k)return this._data.core.last_error={error:"check",plugin:"types",id:"types_03",reason:"max_depth prevents function: "+c,data:JSON.stringify({chk:c,pos:g,obj:e&&e.id?e.id:!1,par:f&&f.id?f.id:!1})},!1;f=this.get_node(f.parent),j=this.get_rules(f),k++}while(f)}}return!0},this.get_rules=function(a){if(a=this.get_node(a),!a)return!1;var c=this.get_type(a,!0);return c.max_depth===b&&(c.max_depth=-1),c.max_children===b&&(c.max_children=-1),c.valid_children===b&&(c.valid_children=-1),c},this.get_type=function(b,c){return b=this.get_node(b),b?c?a.extend({type:b.type},this.settings.types[b.type]):b.type:!1},this.set_type=function(c,d){var e,f,g,h,i;if(a.isArray(c)){for(c=c.slice(),f=0,g=c.length;g>f;f++)this.set_type(c[f],d);return!0}return e=this.settings.types,c=this.get_node(c),e[d]&&c?(h=c.type,i=this.get_icon(c),c.type=d,(i===!0||e[h]&&e[h].icon!==b&&i===e[h].icon)&&this.set_icon(c,e[d].icon!==b?e[d].icon:!0),!0):!1}},a.jstree.defaults.unique={case_sensitive:!1,duplicate:function(a,b){return a+" ("+b+")"}},a.jstree.plugins.unique=function(c,d){this.check=function(b,c,e,f,g){if(d.check.call(this,b,c,e,f,g)===!1)return!1;if(c=c&&c.id?c:this.get_node(c),e=e&&e.id?e:this.get_node(e),!e||!e.children)return!0;var h="rename_node"===b?f:c.text,i=[],j=this.settings.unique.case_sensitive,k=this._model.data,l,m;for(l=0,m=e.children.length;m>l;l++)i.push(j?k[e.children[l]].text:k[e.children[l]].text.toLowerCase());switch(j||(h=h.toLowerCase()),b){case"delete_node":return!0;case"rename_node":return l=-1===a.inArray(h,i)||c.text&&c.text[j?"toString":"toLowerCase"]()===h,l||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_01",reason:"Child with name "+h+" already exists. Preventing: "+b,data:JSON.stringify({chk:b,pos:f,obj:c&&c.id?c.id:!1,par:e&&e.id?e.id:!1})}),l;case"create_node":return l=-1===a.inArray(h,i),l||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_04",reason:"Child with name "+h+" already exists. Preventing: "+b,data:JSON.stringify({chk:b,pos:f,obj:c&&c.id?c.id:!1,par:e&&e.id?e.id:!1})}),l;case"copy_node":return l=-1===a.inArray(h,i),l||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_02",reason:"Child with name "+h+" already exists. Preventing: "+b,data:JSON.stringify({chk:b,pos:f,obj:c&&c.id?c.id:!1,par:e&&e.id?e.id:!1})}),l;case"move_node":return l=c.parent===e.id&&(!g||!g.is_multi)||-1===a.inArray(h,i),l||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_03",reason:"Child with name "+h+" already exists. Preventing: "+b,data:JSON.stringify({chk:b,pos:f,obj:c&&c.id?c.id:!1,par:e&&e.id?e.id:!1})}),l}return!0},this.create_node=function(c,e,f,g,h){if(!e||e.text===b){if(null===c&&(c="#"),c=this.get_node(c),!c)return d.create_node.call(this,c,e,f,g,h);if(f=f===b?"last":f,!f.toString().match(/^(before|after)$/)&&!h&&!this.is_loaded(c))return d.create_node.call(this,c,e,f,g,h);e||(e={});var i,j,k,l,m,n=this._model.data,o=this.settings.unique.case_sensitive,p=this.settings.unique.duplicate;for(j=i=this.get_string("New node"),k=[],l=0,m=c.children.length;m>l;l++)k.push(o?n[c.children[l]].text:n[c.children[l]].text.toLowerCase());l=1;while(-1!==a.inArray(o?j:j.toLowerCase(),k))j=p.call(this,i,++l).toString();e.text=j}return d.create_node.call(this,c,e,f,g,h)}};var o=i.createElement("DIV");if(o.setAttribute("unselectable","on"),o.setAttribute("role","presentation"),o.className="jstree-wholerow",o.innerHTML="&#160;",a.jstree.plugins.wholerow=function(b,c){this.bind=function(){c.bind.call(this),this.element.on("ready.jstree set_state.jstree",a.proxy(function(){this.hide_dots()},this)).on("init.jstree loading.jstree ready.jstree",a.proxy(function(){this.get_container_ul().addClass("jstree-wholerow-ul")},this)).on("deselect_all.jstree",a.proxy(function(a,b){this.element.find(".jstree-wholerow-clicked").removeClass("jstree-wholerow-clicked")},this)).on("changed.jstree",a.proxy(function(a,b){this.element.find(".jstree-wholerow-clicked").removeClass("jstree-wholerow-clicked");var c=!1,d,e;for(d=0,e=b.selected.length;e>d;d++)c=this.get_node(b.selected[d],!0),c&&c.length&&c.children(".jstree-wholerow").addClass("jstree-wholerow-clicked")},this)).on("open_node.jstree",a.proxy(function(a,b){this.get_node(b.node,!0).find(".jstree-clicked").parent().children(".jstree-wholerow").addClass("jstree-wholerow-clicked")},this)).on("hover_node.jstree dehover_node.jstree",a.proxy(function(a,b){"hover_node"===a.type&&this.is_disabled(b.node)||this.get_node(b.node,!0).children(".jstree-wholerow")["hover_node"===a.type?"addClass":"removeClass"]("jstree-wholerow-hovered")},this)).on("contextmenu.jstree",".jstree-wholerow",a.proxy(function(b){b.preventDefault();var c=a.Event("contextmenu",{metaKey:b.metaKey,ctrlKey:b.ctrlKey,altKey:b.altKey,shiftKey:b.shiftKey,pageX:b.pageX,pageY:b.pageY});a(b.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(c)},this)).on("click.jstree",".jstree-wholerow",function(b){b.stopImmediatePropagation();var c=a.Event("click",{metaKey:b.metaKey,ctrlKey:b.ctrlKey,altKey:b.altKey,shiftKey:b.shiftKey});a(b.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(c).focus()}).on("click.jstree",".jstree-leaf > .jstree-ocl",a.proxy(function(b){b.stopImmediatePropagation();var c=a.Event("click",{metaKey:b.metaKey,ctrlKey:b.ctrlKey,altKey:b.altKey,shiftKey:b.shiftKey});a(b.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(c).focus()},this)).on("mouseover.jstree",".jstree-wholerow, .jstree-icon",a.proxy(function(a){return a.stopImmediatePropagation(),this.is_disabled(a.currentTarget)||this.hover_node(a.currentTarget),!1},this)).on("mouseleave.jstree",".jstree-node",a.proxy(function(a){this.dehover_node(a.currentTarget)},this))},this.teardown=function(){this.settings.wholerow&&this.element.find(".jstree-wholerow").remove(),c.teardown.call(this)},this.redraw_node=function(b,d,e,f){if(b=c.redraw_node.apply(this,arguments)){var g=o.cloneNode(!0);-1!==a.inArray(b.id,this._data.core.selected)&&(g.className+=" jstree-wholerow-clicked"),this._data.core.focused&&this._data.core.focused===b.id&&(g.className+=" jstree-wholerow-hovered"),b.insertBefore(g,b.childNodes[0])}return b}},i.registerElement&&Object&&Object.create){var p=Object.create(HTMLElement.prototype);p.createdCallback=function(){var b={core:{},plugins:[]},c;for(c in a.jstree.plugins)a.jstree.plugins.hasOwnProperty(c)&&this.attributes[c]&&(b.plugins.push(c),this.getAttribute(c)&&JSON.parse(this.getAttribute(c))&&(b[c]=JSON.parse(this.getAttribute(c))));for(c in a.jstree.defaults.core)a.jstree.defaults.core.hasOwnProperty(c)&&this.attributes[c]&&(b.core[c]=JSON.parse(this.getAttribute(c))||this.getAttribute(c));a(this).jstree(b)};try{i.registerElement("vakata-jstree",{prototype:p})}catch(q){}}}}); \ No newline at end of file
diff --git a/admin/survey/modules/mod_hierarhija/js/vendor/onload.js b/admin/survey/modules/mod_hierarhija/js/vendor/onload.js
new file mode 100644
index 0000000..99eda6b
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/js/vendor/onload.js
@@ -0,0 +1,16 @@
+/**
+ * Created by Robert Smalc on 24.7.2015.
+ */
+$(function() {
+ load_meta_variables(); // script.js
+ ajax_start_stop(); // script.js
+ onload_init(); // script.js
+ inline_jezik_hover(); // script.js
+
+
+ means_init(); // nastavitve v meansih
+
+ load_help(); // poskrbi, da naloži HELP/qtip js
+ //charts_init(); // nastavitve v charts
+ //creport_init();
+}); \ No newline at end of file
diff --git a/admin/survey/modules/mod_hierarhija/js/vendor/select2.min.js b/admin/survey/modules/mod_hierarhija/js/vendor/select2.min.js
new file mode 100644
index 0000000..c668840
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/js/vendor/select2.min.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){var b=function(){if(a&&a.fn&&a.fn.select2&&a.fn.select2.amd)var b=a.fn.select2.amd;var b;return function(){if(!b||!b.requirejs){b?c=b:b={};var a,c,d;!function(b){function e(a,b){return u.call(a,b)}function f(a,b){var c,d,e,f,g,h,i,j,k,l,m,n=b&&b.split("/"),o=s.map,p=o&&o["*"]||{};if(a&&"."===a.charAt(0))if(b){for(a=a.split("/"),g=a.length-1,s.nodeIdCompat&&w.test(a[g])&&(a[g]=a[g].replace(w,"")),a=n.slice(0,n.length-1).concat(a),k=0;k<a.length;k+=1)if(m=a[k],"."===m)a.splice(k,1),k-=1;else if(".."===m){if(1===k&&(".."===a[2]||".."===a[0]))break;k>0&&(a.splice(k-1,2),k-=2)}a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((n||p)&&o){for(c=a.split("/"),k=c.length;k>0;k-=1){if(d=c.slice(0,k).join("/"),n)for(l=n.length;l>0;l-=1)if(e=o[n.slice(0,l).join("/")],e&&(e=e[d])){f=e,h=k;break}if(f)break;!i&&p&&p[d]&&(i=p[d],j=k)}!f&&i&&(f=i,h=j),f&&(c.splice(0,h,f),a=c.join("/"))}return a}function g(a,c){return function(){var d=v.call(arguments,0);return"string"!=typeof d[0]&&1===d.length&&d.push(null),n.apply(b,d.concat([a,c]))}}function h(a){return function(b){return f(b,a)}}function i(a){return function(b){q[a]=b}}function j(a){if(e(r,a)){var c=r[a];delete r[a],t[a]=!0,m.apply(b,c)}if(!e(q,a)&&!e(t,a))throw new Error("No "+a);return q[a]}function k(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function l(a){return function(){return s&&s.config&&s.config[a]||{}}}var m,n,o,p,q={},r={},s={},t={},u=Object.prototype.hasOwnProperty,v=[].slice,w=/\.js$/;o=function(a,b){var c,d=k(a),e=d[0];return a=d[1],e&&(e=f(e,b),c=j(e)),e?a=c&&c.normalize?c.normalize(a,h(b)):f(a,b):(a=f(a,b),d=k(a),e=d[0],a=d[1],e&&(c=j(e))),{f:e?e+"!"+a:a,n:a,pr:e,p:c}},p={require:function(a){return g(a)},exports:function(a){var b=q[a];return"undefined"!=typeof b?b:q[a]={}},module:function(a){return{id:a,uri:"",exports:q[a],config:l(a)}}},m=function(a,c,d,f){var h,k,l,m,n,s,u=[],v=typeof d;if(f=f||a,"undefined"===v||"function"===v){for(c=!c.length&&d.length?["require","exports","module"]:c,n=0;n<c.length;n+=1)if(m=o(c[n],f),k=m.f,"require"===k)u[n]=p.require(a);else if("exports"===k)u[n]=p.exports(a),s=!0;else if("module"===k)h=u[n]=p.module(a);else if(e(q,k)||e(r,k)||e(t,k))u[n]=j(k);else{if(!m.p)throw new Error(a+" missing "+k);m.p.load(m.n,g(f,!0),i(k),{}),u[n]=q[k]}l=d?d.apply(q[a],u):void 0,a&&(h&&h.exports!==b&&h.exports!==q[a]?q[a]=h.exports:l===b&&s||(q[a]=l))}else a&&(q[a]=d)},a=c=n=function(a,c,d,e,f){if("string"==typeof a)return p[a]?p[a](c):j(o(a,c).f);if(!a.splice){if(s=a,s.deps&&n(s.deps,s.callback),!c)return;c.splice?(a=c,c=d,d=null):a=b}return c=c||function(){},"function"==typeof d&&(d=e,e=f),e?m(b,a,c,d):setTimeout(function(){m(b,a,c,d)},4),n},n.config=function(a){return n(a)},a._defined=q,d=function(a,b,c){if("string"!=typeof a)throw new Error("See almond README: incorrect module build, no module name");b.splice||(c=b,b=[]),e(q,a)||e(r,a)||(r[a]=[a,b,c])},d.amd={jQuery:!0}}(),b.requirejs=a,b.require=c,b.define=d}}(),b.define("almond",function(){}),b.define("jquery",[],function(){var b=a||$;return null==b&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),b}),b.define("select2/utils",["jquery"],function(a){function b(a){var b=a.prototype,c=[];for(var d in b){var e=b[d];"function"==typeof e&&"constructor"!==d&&c.push(d)}return c}var c={};c.Extend=function(a,b){function c(){this.constructor=a}var d={}.hasOwnProperty;for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},c.Decorate=function(a,c){function d(){var b=Array.prototype.unshift,d=c.prototype.constructor.length,e=a.prototype.constructor;d>0&&(b.call(arguments,a.prototype.constructor),e=c.prototype.constructor),e.apply(this,arguments)}function e(){this.constructor=d}var f=b(c),g=b(a);c.displayName=a.displayName,d.prototype=new e;for(var h=0;h<g.length;h++){var i=g[h];d.prototype[i]=a.prototype[i]}for(var j=(function(a){var b=function(){};a in d.prototype&&(b=d.prototype[a]);var e=c.prototype[a];return function(){var a=Array.prototype.unshift;return a.call(arguments,b),e.apply(this,arguments)}}),k=0;k<f.length;k++){var l=f[k];d.prototype[l]=j(l)}return d};var d=function(){this.listeners={}};return d.prototype.on=function(a,b){this.listeners=this.listeners||{},a in this.listeners?this.listeners[a].push(b):this.listeners[a]=[b]},d.prototype.trigger=function(a){var b=Array.prototype.slice,c=b.call(arguments,1);this.listeners=this.listeners||{},null==c&&(c=[]),0===c.length&&c.push({}),c[0]._type=a,a in this.listeners&&this.invoke(this.listeners[a],b.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},d.prototype.invoke=function(a,b){for(var c=0,d=a.length;d>c;c++)a[c].apply(this,b)},c.Observable=d,c.generateChars=function(a){for(var b="",c=0;a>c;c++){var d=Math.floor(36*Math.random());b+=d.toString(36)}return b},c.bind=function(a,b){return function(){a.apply(b,arguments)}},c._convertData=function(a){for(var b in a){var c=b.split("-"),d=a;if(1!==c.length){for(var e=0;e<c.length;e++){var f=c[e];f=f.substring(0,1).toLowerCase()+f.substring(1),f in d||(d[f]={}),e==c.length-1&&(d[f]=a[b]),d=d[f]}delete a[b]}}return a},c.hasScroll=function(b,c){var d=a(c),e=c.style.overflowX,f=c.style.overflowY;return e!==f||"hidden"!==f&&"visible"!==f?"scroll"===e||"scroll"===f?!0:d.innerHeight()<c.scrollHeight||d.innerWidth()<c.scrollWidth:!1},c.escapeMarkup=function(a){var b={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!=typeof a?a:String(a).replace(/[&<>"'\/\\]/g,function(a){return b[a]})},c.appendMany=function(b,c){if("1.7"===a.fn.jquery.substr(0,3)){var d=a();a.map(c,function(a){d=d.add(a)}),c=d}b.append(c)},c}),b.define("select2/results",["jquery","./utils"],function(a,b){function c(a,b,d){this.$element=a,this.data=d,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<ul class="select2-results__options" role="tree"></ul>');return this.options.get("multiple")&&b.attr("aria-multiselectable","true"),this.$results=b,b},c.prototype.clear=function(){this.$results.empty()},c.prototype.displayMessage=function(b){var c=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var d=a('<li role="treeitem" aria-live="assertive" class="select2-results__option"></li>'),e=this.options.get("translations").get(b.message);d.append(c(e(b.args))),d[0].className+=" select2-results__message",this.$results.append(d)},c.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},c.prototype.append=function(a){this.hideLoading();var b=[];if(null==a.results||0===a.results.length)return void(0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"}));a.results=this.sort(a.results);for(var c=0;c<a.results.length;c++){var d=a.results[c],e=this.option(d);b.push(e)}this.$results.append(b)},c.prototype.position=function(a,b){var c=b.find(".select2-results");c.append(a)},c.prototype.sort=function(a){var b=this.options.get("sorter");return b(a)},c.prototype.highlightFirstItem=function(){var a=this.$results.find(".select2-results__option[aria-selected]"),b=a.filter("[aria-selected=true]");b.length>0?b.first().trigger("mouseenter"):a.first().trigger("mouseenter"),this.ensureHighlightVisible()},c.prototype.setClasses=function(){var b=this;this.data.current(function(c){var d=a.map(c,function(a){return a.id.toString()}),e=b.$results.find(".select2-results__option[aria-selected]");e.each(function(){var b=a(this),c=a.data(this,"data"),e=""+c.id;null!=c.element&&c.element.selected||null==c.element&&a.inArray(e,d)>-1?b.attr("aria-selected","true"):b.attr("aria-selected","false")})})},c.prototype.showLoading=function(a){this.hideLoading();var b=this.options.get("translations").get("searching"),c={disabled:!0,loading:!0,text:b(a)},d=this.option(c);d.className+=" loading-results",this.$results.prepend(d)},c.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},c.prototype.option=function(b){var c=document.createElement("li");c.className="select2-results__option";var d={role:"treeitem","aria-selected":"false"};b.disabled&&(delete d["aria-selected"],d["aria-disabled"]="true"),null==b.id&&delete d["aria-selected"],null!=b._resultId&&(c.id=b._resultId),b.title&&(c.title=b.title),b.children&&(d.role="group",d["aria-label"]=b.text,delete d["aria-selected"]);for(var e in d){var f=d[e];c.setAttribute(e,f)}if(b.children){var g=a(c),h=document.createElement("strong");h.className="select2-results__group";a(h);this.template(b,h);for(var i=[],j=0;j<b.children.length;j++){var k=b.children[j],l=this.option(k);i.push(l)}var m=a("<ul></ul>",{"class":"select2-results__options select2-results__options--nested"});m.append(i),g.append(h),g.append(m)}else this.template(b,c);return a.data(c,"data",b),c},c.prototype.bind=function(b,c){var d=this,e=b.id+"-results";this.$results.attr("id",e),b.on("results:all",function(a){d.clear(),d.append(a.data),b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("results:append",function(a){d.append(a.data),b.isOpen()&&d.setClasses()}),b.on("query",function(a){d.hideMessages(),d.showLoading(a)}),b.on("select",function(){b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("unselect",function(){b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("open",function(){d.$results.attr("aria-expanded","true"),d.$results.attr("aria-hidden","false"),d.setClasses(),d.ensureHighlightVisible()}),b.on("close",function(){d.$results.attr("aria-expanded","false"),d.$results.attr("aria-hidden","true"),d.$results.removeAttr("aria-activedescendant")}),b.on("results:toggle",function(){var a=d.getHighlightedResults();0!==a.length&&a.trigger("mouseup")}),b.on("results:select",function(){var a=d.getHighlightedResults();if(0!==a.length){var b=a.data("data");"true"==a.attr("aria-selected")?d.trigger("close",{}):d.trigger("select",{data:b})}}),b.on("results:previous",function(){var a=d.getHighlightedResults(),b=d.$results.find("[aria-selected]"),c=b.index(a);if(0!==c){var e=c-1;0===a.length&&(e=0);var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top,h=f.offset().top,i=d.$results.scrollTop()+(h-g);0===e?d.$results.scrollTop(0):0>h-g&&d.$results.scrollTop(i)}}),b.on("results:next",function(){var a=d.getHighlightedResults(),b=d.$results.find("[aria-selected]"),c=b.index(a),e=c+1;if(!(e>=b.length)){var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top+d.$results.outerHeight(!1),h=f.offset().top+f.outerHeight(!1),i=d.$results.scrollTop()+h-g;0===e?d.$results.scrollTop(0):h>g&&d.$results.scrollTop(i)}}),b.on("results:focus",function(a){a.element.addClass("select2-results__option--highlighted")}),b.on("results:message",function(a){d.displayMessage(a)}),a.fn.mousewheel&&this.$results.on("mousewheel",function(a){var b=d.$results.scrollTop(),c=d.$results.get(0).scrollHeight-b+a.deltaY,e=a.deltaY>0&&b-a.deltaY<=0,f=a.deltaY<0&&c<=d.$results.height();e?(d.$results.scrollTop(0),a.preventDefault(),a.stopPropagation()):f&&(d.$results.scrollTop(d.$results.get(0).scrollHeight-d.$results.height()),a.preventDefault(),a.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(b){var c=a(this),e=c.data("data");return"true"===c.attr("aria-selected")?void(d.options.get("multiple")?d.trigger("unselect",{originalEvent:b,data:e}):d.trigger("close",{})):void d.trigger("select",{originalEvent:b,data:e})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(b){var c=a(this).data("data");d.getHighlightedResults().removeClass("select2-results__option--highlighted"),d.trigger("results:focus",{data:c,element:a(this)})})},c.prototype.getHighlightedResults=function(){var a=this.$results.find(".select2-results__option--highlighted");return a},c.prototype.destroy=function(){this.$results.remove()},c.prototype.ensureHighlightVisible=function(){var a=this.getHighlightedResults();if(0!==a.length){var b=this.$results.find("[aria-selected]"),c=b.index(a),d=this.$results.offset().top,e=a.offset().top,f=this.$results.scrollTop()+(e-d),g=e-d;f-=2*a.outerHeight(!1),2>=c?this.$results.scrollTop(0):(g>this.$results.outerHeight()||0>g)&&this.$results.scrollTop(f)}},c.prototype.template=function(b,c){var d=this.options.get("templateResult"),e=this.options.get("escapeMarkup"),f=d(b,c);null==f?c.style.display="none":"string"==typeof f?c.innerHTML=e(f):a(c).append(f)},c}),b.define("select2/keys",[],function(){var a={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46};return a}),b.define("select2/selection/base",["jquery","../utils","../keys"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,b.Observable),d.prototype.render=function(){var b=a('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),b.attr("title",this.$element.attr("title")),b.attr("tabindex",this._tabindex),this.$selection=b,b},d.prototype.bind=function(a,b){var d=this,e=(a.id+"-container",a.id+"-results");this.container=a,this.$selection.on("focus",function(a){d.trigger("focus",a)}),this.$selection.on("blur",function(a){d._handleBlur(a)}),this.$selection.on("keydown",function(a){d.trigger("keypress",a),a.which===c.SPACE&&a.preventDefault()}),a.on("results:focus",function(a){d.$selection.attr("aria-activedescendant",a.data._resultId)}),a.on("selection:update",function(a){d.update(a.data)}),a.on("open",function(){d.$selection.attr("aria-expanded","true"),d.$selection.attr("aria-owns",e),d._attachCloseHandler(a)}),a.on("close",function(){d.$selection.attr("aria-expanded","false"),d.$selection.removeAttr("aria-activedescendant"),d.$selection.removeAttr("aria-owns"),d.$selection.focus(),d._detachCloseHandler(a)}),a.on("enable",function(){d.$selection.attr("tabindex",d._tabindex)}),a.on("disable",function(){d.$selection.attr("tabindex","-1")})},d.prototype._handleBlur=function(b){var c=this;window.setTimeout(function(){document.activeElement==c.$selection[0]||a.contains(c.$selection[0],document.activeElement)||c.trigger("blur",b)},1)},d.prototype._attachCloseHandler=function(b){a(document.body).on("mousedown.select2."+b.id,function(b){var c=a(b.target),d=c.closest(".select2"),e=a(".select2.select2-container--open");e.each(function(){var b=a(this);if(this!=d[0]){var c=b.data("element");c.select2("close")}})})},d.prototype._detachCloseHandler=function(b){a(document.body).off("mousedown.select2."+b.id)},d.prototype.position=function(a,b){var c=b.find(".selection");c.append(a)},d.prototype.destroy=function(){this._detachCloseHandler(this.container)},d.prototype.update=function(a){throw new Error("The `update` method must be defined in child classes.")},d}),b.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(a,b,c,d){function e(){e.__super__.constructor.apply(this,arguments)}return c.Extend(e,b),e.prototype.render=function(){var a=e.__super__.render.call(this);return a.addClass("select2-selection--single"),a.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),a},e.prototype.bind=function(a,b){var c=this;e.__super__.bind.apply(this,arguments);var d=a.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",d),this.$selection.attr("aria-labelledby",d),this.$selection.on("mousedown",function(a){1===a.which&&c.trigger("toggle",{originalEvent:a})}),this.$selection.on("focus",function(a){}),this.$selection.on("blur",function(a){}),a.on("focus",function(b){a.isOpen()||c.$selection.focus()}),a.on("selection:update",function(a){c.update(a.data)})},e.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},e.prototype.display=function(a,b){var c=this.options.get("templateSelection"),d=this.options.get("escapeMarkup");return d(c(a,b))},e.prototype.selectionContainer=function(){return a("<span></span>")},e.prototype.update=function(a){if(0===a.length)return void this.clear();var b=a[0],c=this.$selection.find(".select2-selection__rendered"),d=this.display(b,c);c.empty().append(d),c.prop("title",b.title||b.text)},e}),b.define("select2/selection/multiple",["jquery","./base","../utils"],function(a,b,c){function d(a,b){d.__super__.constructor.apply(this,arguments)}return c.Extend(d,b),d.prototype.render=function(){var a=d.__super__.render.call(this);return a.addClass("select2-selection--multiple"),a.html('<ul class="select2-selection__rendered"></ul>'),a},d.prototype.bind=function(b,c){var e=this;d.__super__.bind.apply(this,arguments),this.$selection.on("click",function(a){e.trigger("toggle",{originalEvent:a})}),this.$selection.on("click",".select2-selection__choice__remove",function(b){if(!e.options.get("disabled")){var c=a(this),d=c.parent(),f=d.data("data");e.trigger("unselect",{originalEvent:b,data:f})}})},d.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},d.prototype.display=function(a,b){var c=this.options.get("templateSelection"),d=this.options.get("escapeMarkup");return d(c(a,b))},d.prototype.selectionContainer=function(){var b=a('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">&times;</span></li>');return b},d.prototype.update=function(a){if(this.clear(),0!==a.length){for(var b=[],d=0;d<a.length;d++){var e=a[d],f=this.selectionContainer(),g=this.display(e,f);f.append(g),f.prop("title",e.title||e.text),f.data("data",e),b.push(f)}var h=this.$selection.find(".select2-selection__rendered");c.appendMany(h,b)}},d}),b.define("select2/selection/placeholder",["../utils"],function(a){function b(a,b,c){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c)}return b.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},b.prototype.createPlaceholder=function(a,b){var c=this.selectionContainer();return c.html(this.display(b)),c.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),c},b.prototype.update=function(a,b){var c=1==b.length&&b[0].id!=this.placeholder.id,d=b.length>1;if(d||c)return a.call(this,b);this.clear();var e=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(e)},b}),b.define("select2/selection/allowClear",["jquery","../keys"],function(a,b){function c(){}return c.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(a){d._handleClear(a)}),b.on("keypress",function(a){d._handleKeyboardClear(a,b)})},c.prototype._handleClear=function(a,b){if(!this.options.get("disabled")){var c=this.$selection.find(".select2-selection__clear");if(0!==c.length){b.stopPropagation();for(var d=c.data("data"),e=0;e<d.length;e++){var f={data:d[e]};if(this.trigger("unselect",f),f.prevented)return}this.$element.val(this.placeholder.id).trigger("change"),this.trigger("toggle",{})}}},c.prototype._handleKeyboardClear=function(a,c,d){d.isOpen()||(c.which==b.DELETE||c.which==b.BACKSPACE)&&this._handleClear(c)},c.prototype.update=function(b,c){if(b.call(this,c),!(this.$selection.find(".select2-selection__placeholder").length>0||0===c.length)){var d=a('<span class="select2-selection__clear">&times;</span>');d.data("data",c),this.$selection.find(".select2-selection__rendered").prepend(d)}},c}),b.define("select2/selection/search",["jquery","../utils","../keys"],function(a,b,c){function d(a,b,c){a.call(this,b,c)}return d.prototype.render=function(b){var c=a('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>');this.$searchContainer=c,this.$search=c.find("input");var d=b.call(this);return this._transferTabIndex(),d},d.prototype.bind=function(a,b,d){var e=this;a.call(this,b,d),b.on("open",function(){e.$search.trigger("focus")}),b.on("close",function(){e.$search.val(""),e.$search.removeAttr("aria-activedescendant"),e.$search.trigger("focus")}),b.on("enable",function(){e.$search.prop("disabled",!1),e._transferTabIndex()}),b.on("disable",function(){e.$search.prop("disabled",!0)}),b.on("focus",function(a){e.$search.trigger("focus")}),b.on("results:focus",function(a){e.$search.attr("aria-activedescendant",a.id)}),this.$selection.on("focusin",".select2-search--inline",function(a){e.trigger("focus",a)}),this.$selection.on("focusout",".select2-search--inline",function(a){e._handleBlur(a)}),this.$selection.on("keydown",".select2-search--inline",function(a){a.stopPropagation(),e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented();var b=a.which;if(b===c.BACKSPACE&&""===e.$search.val()){var d=e.$searchContainer.prev(".select2-selection__choice");if(d.length>0){var f=d.data("data");e.searchRemoveChoice(f),a.preventDefault()}}});var f=document.documentMode,g=f&&11>=f;this.$selection.on("input.searchcheck",".select2-search--inline",function(a){return g?void e.$selection.off("input.search input.searchcheck"):void e.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(a){if(g&&"input"===a.type)return void e.$selection.off("input.search input.searchcheck");var b=a.which;b!=c.SHIFT&&b!=c.CTRL&&b!=c.ALT&&b!=c.TAB&&e.handleSearch(a)})},d.prototype._transferTabIndex=function(a){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},d.prototype.createPlaceholder=function(a,b){this.$search.attr("placeholder",b.text)},d.prototype.update=function(a,b){var c=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),a.call(this,b),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),c&&this.$search.focus()},d.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var a=this.$search.val();this.trigger("query",{term:a})}this._keyUpPrevented=!1},d.prototype.searchRemoveChoice=function(a,b){this.trigger("unselect",{data:b}),this.$search.val(b.text),this.handleSearch()},d.prototype.resizeSearch=function(){this.$search.css("width","25px");var a="";if(""!==this.$search.attr("placeholder"))a=this.$selection.find(".select2-selection__rendered").innerWidth();else{var b=this.$search.val().length+1;a=.75*b+"em"}this.$search.css("width",a)},d}),b.define("select2/selection/eventRelay",["jquery"],function(a){function b(){}return b.prototype.bind=function(b,c,d){var e=this,f=["open","opening","close","closing","select","selecting","unselect","unselecting"],g=["opening","closing","selecting","unselecting"];b.call(this,c,d),c.on("*",function(b,c){if(-1!==a.inArray(b,f)){c=c||{};var d=a.Event("select2:"+b,{params:c});e.$element.trigger(d),-1!==a.inArray(b,g)&&(c.prevented=d.isDefaultPrevented())}})},b}),b.define("select2/translation",["jquery","require"],function(a,b){function c(a){this.dict=a||{}}return c.prototype.all=function(){return this.dict},c.prototype.get=function(a){return this.dict[a]},c.prototype.extend=function(b){this.dict=a.extend({},b.all(),this.dict)},c._cache={},c.loadPath=function(a){if(!(a in c._cache)){var d=b(a);c._cache[a]=d}return new c(c._cache[a])},c}),b.define("select2/diacritics",[],function(){var a={"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"};return a}),b.define("select2/data/base",["../utils"],function(a){function b(a,c){b.__super__.constructor.call(this)}return a.Extend(b,a.Observable),b.prototype.current=function(a){throw new Error("The `current` method must be defined in child classes.")},b.prototype.query=function(a,b){throw new Error("The `query` method must be defined in child classes.")},b.prototype.bind=function(a,b){},b.prototype.destroy=function(){},b.prototype.generateResultId=function(b,c){var d=b.id+"-result-";return d+=a.generateChars(4),d+=null!=c.id?"-"+c.id.toString():"-"+a.generateChars(4)},b}),b.define("select2/data/select",["./base","../utils","jquery"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,a),d.prototype.current=function(a){var b=[],d=this;this.$element.find(":selected").each(function(){var a=c(this),e=d.item(a);b.push(e)}),a(b)},d.prototype.select=function(a){var b=this;if(a.selected=!0,c(a.element).is("option"))return a.element.selected=!0,void this.$element.trigger("change");
+if(this.$element.prop("multiple"))this.current(function(d){var e=[];a=[a],a.push.apply(a,d);for(var f=0;f<a.length;f++){var g=a[f].id;-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("change")});else{var d=a.id;this.$element.val(d),this.$element.trigger("change")}},d.prototype.unselect=function(a){var b=this;if(this.$element.prop("multiple"))return a.selected=!1,c(a.element).is("option")?(a.element.selected=!1,void this.$element.trigger("change")):void this.current(function(d){for(var e=[],f=0;f<d.length;f++){var g=d[f].id;g!==a.id&&-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("change")})},d.prototype.bind=function(a,b){var c=this;this.container=a,a.on("select",function(a){c.select(a.data)}),a.on("unselect",function(a){c.unselect(a.data)})},d.prototype.destroy=function(){this.$element.find("*").each(function(){c.removeData(this,"data")})},d.prototype.query=function(a,b){var d=[],e=this,f=this.$element.children();f.each(function(){var b=c(this);if(b.is("option")||b.is("optgroup")){var f=e.item(b),g=e.matches(a,f);null!==g&&d.push(g)}}),b({results:d})},d.prototype.addOptions=function(a){b.appendMany(this.$element,a)},d.prototype.option=function(a){var b;a.children?(b=document.createElement("optgroup"),b.label=a.text):(b=document.createElement("option"),void 0!==b.textContent?b.textContent=a.text:b.innerText=a.text),a.id&&(b.value=a.id),a.disabled&&(b.disabled=!0),a.selected&&(b.selected=!0),a.title&&(b.title=a.title);var d=c(b),e=this._normalizeItem(a);return e.element=b,c.data(b,"data",e),d},d.prototype.item=function(a){var b={};if(b=c.data(a[0],"data"),null!=b)return b;if(a.is("option"))b={id:a.val(),text:a.text(),disabled:a.prop("disabled"),selected:a.prop("selected"),title:a.prop("title")};else if(a.is("optgroup")){b={text:a.prop("label"),children:[],title:a.prop("title")};for(var d=a.children("option"),e=[],f=0;f<d.length;f++){var g=c(d[f]),h=this.item(g);e.push(h)}b.children=e}return b=this._normalizeItem(b),b.element=a[0],c.data(a[0],"data",b),b},d.prototype._normalizeItem=function(a){c.isPlainObject(a)||(a={id:a,text:a}),a=c.extend({},{text:""},a);var b={selected:!1,disabled:!1};return null!=a.id&&(a.id=a.id.toString()),null!=a.text&&(a.text=a.text.toString()),null==a._resultId&&a.id&&null!=this.container&&(a._resultId=this.generateResultId(this.container,a)),c.extend({},b,a)},d.prototype.matches=function(a,b){var c=this.options.get("matcher");return c(a,b)},d}),b.define("select2/data/array",["./select","../utils","jquery"],function(a,b,c){function d(a,b){var c=b.get("data")||[];d.__super__.constructor.call(this,a,b),this.addOptions(this.convertToOptions(c))}return b.Extend(d,a),d.prototype.select=function(a){var b=this.$element.find("option").filter(function(b,c){return c.value==a.id.toString()});0===b.length&&(b=this.option(a),this.addOptions(b)),d.__super__.select.call(this,a)},d.prototype.convertToOptions=function(a){function d(a){return function(){return c(this).val()==a.id}}for(var e=this,f=this.$element.find("option"),g=f.map(function(){return e.item(c(this)).id}).get(),h=[],i=0;i<a.length;i++){var j=this._normalizeItem(a[i]);if(c.inArray(j.id,g)>=0){var k=f.filter(d(j)),l=this.item(k),m=c.extend(!0,{},j,l),n=this.option(m);k.replaceWith(n)}else{var o=this.option(j);if(j.children){var p=this.convertToOptions(j.children);b.appendMany(o,p)}h.push(o)}}return h},d}),b.define("select2/data/ajax",["./array","../utils","jquery"],function(a,b,c){function d(a,b){this.ajaxOptions=this._applyDefaults(b.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),d.__super__.constructor.call(this,a,b)}return b.Extend(d,a),d.prototype._applyDefaults=function(a){var b={data:function(a){return c.extend({},a,{q:a.term})},transport:function(a,b,d){var e=c.ajax(a);return e.then(b),e.fail(d),e}};return c.extend({},b,a,!0)},d.prototype.processResults=function(a){return a},d.prototype.query=function(a,b){function d(){var d=f.transport(f,function(d){var f=e.processResults(d,a);e.options.get("debug")&&window.console&&console.error&&(f&&f.results&&c.isArray(f.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),b(f)},function(){d.status&&"0"===d.status||e.trigger("results:message",{message:"errorLoading"})});e._request=d}var e=this;null!=this._request&&(c.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var f=c.extend({type:"GET"},this.ajaxOptions);"function"==typeof f.url&&(f.url=f.url.call(this.$element,a)),"function"==typeof f.data&&(f.data=f.data.call(this.$element,a)),this.ajaxOptions.delay&&null!=a.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(d,this.ajaxOptions.delay)):d()},d}),b.define("select2/data/tags",["jquery"],function(a){function b(b,c,d){var e=d.get("tags"),f=d.get("createTag");void 0!==f&&(this.createTag=f);var g=d.get("insertTag");if(void 0!==g&&(this.insertTag=g),b.call(this,c,d),a.isArray(e))for(var h=0;h<e.length;h++){var i=e[h],j=this._normalizeItem(i),k=this.option(j);this.$element.append(k)}}return b.prototype.query=function(a,b,c){function d(a,f){for(var g=a.results,h=0;h<g.length;h++){var i=g[h],j=null!=i.children&&!d({results:i.children},!0),k=i.text===b.term;if(k||j)return f?!1:(a.data=g,void c(a))}if(f)return!0;var l=e.createTag(b);if(null!=l){var m=e.option(l);m.attr("data-select2-tag",!0),e.addOptions([m]),e.insertTag(g,l)}a.results=g,c(a)}var e=this;return this._removeOldTags(),null==b.term||null!=b.page?void a.call(this,b,c):void a.call(this,b,d)},b.prototype.createTag=function(b,c){var d=a.trim(c.term);return""===d?null:{id:d,text:d}},b.prototype.insertTag=function(a,b,c){b.unshift(c)},b.prototype._removeOldTags=function(b){var c=(this._lastTag,this.$element.find("option[data-select2-tag]"));c.each(function(){this.selected||a(this).remove()})},b}),b.define("select2/data/tokenizer",["jquery"],function(a){function b(a,b,c){var d=c.get("tokenizer");void 0!==d&&(this.tokenizer=d),a.call(this,b,c)}return b.prototype.bind=function(a,b,c){a.call(this,b,c),this.$search=b.dropdown.$search||b.selection.$search||c.find(".select2-search__field")},b.prototype.query=function(b,c,d){function e(b){var c=g._normalizeItem(b),d=g.$element.find("option").filter(function(){return a(this).val()===c.id});if(!d.length){var e=g.option(c);e.attr("data-select2-tag",!0),g._removeOldTags(),g.addOptions([e])}f(c)}function f(a){g.trigger("select",{data:a})}var g=this;c.term=c.term||"";var h=this.tokenizer(c,this.options,e);h.term!==c.term&&(this.$search.length&&(this.$search.val(h.term),this.$search.focus()),c.term=h.term),b.call(this,c,d)},b.prototype.tokenizer=function(b,c,d,e){for(var f=d.get("tokenSeparators")||[],g=c.term,h=0,i=this.createTag||function(a){return{id:a.term,text:a.term}};h<g.length;){var j=g[h];if(-1!==a.inArray(j,f)){var k=g.substr(0,h),l=a.extend({},c,{term:k}),m=i(l);null!=m?(e(m),g=g.substr(h+1)||"",h=0):h++}else h++}return{term:g}},b}),b.define("select2/data/minimumInputLength",[],function(){function a(a,b,c){this.minimumInputLength=c.get("minimumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){return b.term=b.term||"",b.term.length<this.minimumInputLength?void this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:b.term,params:b}}):void a.call(this,b,c)},a}),b.define("select2/data/maximumInputLength",[],function(){function a(a,b,c){this.maximumInputLength=c.get("maximumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){return b.term=b.term||"",this.maximumInputLength>0&&b.term.length>this.maximumInputLength?void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:b.term,params:b}}):void a.call(this,b,c)},a}),b.define("select2/data/maximumSelectionLength",[],function(){function a(a,b,c){this.maximumSelectionLength=c.get("maximumSelectionLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){var d=this;this.current(function(e){var f=null!=e?e.length:0;return d.maximumSelectionLength>0&&f>=d.maximumSelectionLength?void d.trigger("results:message",{message:"maximumSelected",args:{maximum:d.maximumSelectionLength}}):void a.call(d,b,c)})},a}),b.define("select2/dropdown",["jquery","./utils"],function(a,b){function c(a,b){this.$element=a,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<span class="select2-dropdown"><span class="select2-results"></span></span>');return b.attr("dir",this.options.get("dir")),this.$dropdown=b,b},c.prototype.bind=function(){},c.prototype.position=function(a,b){},c.prototype.destroy=function(){this.$dropdown.remove()},c}),b.define("select2/dropdown/search",["jquery","../utils"],function(a,b){function c(){}return c.prototype.render=function(b){var c=b.call(this),d=a('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" /></span>');return this.$searchContainer=d,this.$search=d.find("input"),c.prepend(d),c},c.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),this.$search.on("keydown",function(a){e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented()}),this.$search.on("input",function(b){a(this).off("keyup")}),this.$search.on("keyup input",function(a){e.handleSearch(a)}),c.on("open",function(){e.$search.attr("tabindex",0),e.$search.focus(),window.setTimeout(function(){e.$search.focus()},0)}),c.on("close",function(){e.$search.attr("tabindex",-1),e.$search.val("")}),c.on("focus",function(){c.isOpen()&&e.$search.focus()}),c.on("results:all",function(a){if(null==a.query.term||""===a.query.term){var b=e.showSearch(a);b?e.$searchContainer.removeClass("select2-search--hide"):e.$searchContainer.addClass("select2-search--hide")}})},c.prototype.handleSearch=function(a){if(!this._keyUpPrevented){var b=this.$search.val();this.trigger("query",{term:b})}this._keyUpPrevented=!1},c.prototype.showSearch=function(a,b){return!0},c}),b.define("select2/dropdown/hidePlaceholder",[],function(){function a(a,b,c,d){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c,d)}return a.prototype.append=function(a,b){b.results=this.removePlaceholder(b.results),a.call(this,b)},a.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},a.prototype.removePlaceholder=function(a,b){for(var c=b.slice(0),d=b.length-1;d>=0;d--){var e=b[d];this.placeholder.id===e.id&&c.splice(d,1)}return c},a}),b.define("select2/dropdown/infiniteScroll",["jquery"],function(a){function b(a,b,c,d){this.lastParams={},a.call(this,b,c,d),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return b.prototype.append=function(a,b){this.$loadingMore.remove(),this.loading=!1,a.call(this,b),this.showLoadingMore(b)&&this.$results.append(this.$loadingMore)},b.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),c.on("query",function(a){e.lastParams=a,e.loading=!0}),c.on("query:append",function(a){e.lastParams=a,e.loading=!0}),this.$results.on("scroll",function(){var b=a.contains(document.documentElement,e.$loadingMore[0]);if(!e.loading&&b){var c=e.$results.offset().top+e.$results.outerHeight(!1),d=e.$loadingMore.offset().top+e.$loadingMore.outerHeight(!1);c+50>=d&&e.loadMore()}})},b.prototype.loadMore=function(){this.loading=!0;var b=a.extend({},{page:1},this.lastParams);b.page++,this.trigger("query:append",b)},b.prototype.showLoadingMore=function(a,b){return b.pagination&&b.pagination.more},b.prototype.createLoadingMore=function(){var b=a('<li class="select2-results__option select2-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),c=this.options.get("translations").get("loadingMore");return b.html(c(this.lastParams)),b},b}),b.define("select2/dropdown/attachBody",["jquery","../utils"],function(a,b){function c(b,c,d){this.$dropdownParent=d.get("dropdownParent")||a(document.body),b.call(this,c,d)}return c.prototype.bind=function(a,b,c){var d=this,e=!1;a.call(this,b,c),b.on("open",function(){d._showDropdown(),d._attachPositioningHandler(b),e||(e=!0,b.on("results:all",function(){d._positionDropdown(),d._resizeDropdown()}),b.on("results:append",function(){d._positionDropdown(),d._resizeDropdown()}))}),b.on("close",function(){d._hideDropdown(),d._detachPositioningHandler(b)}),this.$dropdownContainer.on("mousedown",function(a){a.stopPropagation()})},c.prototype.destroy=function(a){a.call(this),this.$dropdownContainer.remove()},c.prototype.position=function(a,b,c){b.attr("class",c.attr("class")),b.removeClass("select2"),b.addClass("select2-container--open"),b.css({position:"absolute",top:-999999}),this.$container=c},c.prototype.render=function(b){var c=a("<span></span>"),d=b.call(this);return c.append(d),this.$dropdownContainer=c,c},c.prototype._hideDropdown=function(a){this.$dropdownContainer.detach()},c.prototype._attachPositioningHandler=function(c,d){var e=this,f="scroll.select2."+d.id,g="resize.select2."+d.id,h="orientationchange.select2."+d.id,i=this.$container.parents().filter(b.hasScroll);i.each(function(){a(this).data("select2-scroll-position",{x:a(this).scrollLeft(),y:a(this).scrollTop()})}),i.on(f,function(b){var c=a(this).data("select2-scroll-position");a(this).scrollTop(c.y)}),a(window).on(f+" "+g+" "+h,function(a){e._positionDropdown(),e._resizeDropdown()})},c.prototype._detachPositioningHandler=function(c,d){var e="scroll.select2."+d.id,f="resize.select2."+d.id,g="orientationchange.select2."+d.id,h=this.$container.parents().filter(b.hasScroll);h.off(e),a(window).off(e+" "+f+" "+g)},c.prototype._positionDropdown=function(){var b=a(window),c=this.$dropdown.hasClass("select2-dropdown--above"),d=this.$dropdown.hasClass("select2-dropdown--below"),e=null,f=this.$container.offset();f.bottom=f.top+this.$container.outerHeight(!1);var g={height:this.$container.outerHeight(!1)};g.top=f.top,g.bottom=f.top+g.height;var h={height:this.$dropdown.outerHeight(!1)},i={top:b.scrollTop(),bottom:b.scrollTop()+b.height()},j=i.top<f.top-h.height,k=i.bottom>f.bottom+h.height,l={left:f.left,top:g.bottom},m=this.$dropdownParent;"static"===m.css("position")&&(m=m.offsetParent());var n=m.offset();l.top-=n.top,l.left-=n.left,c||d||(e="below"),k||!j||c?!j&&k&&c&&(e="below"):e="above",("above"==e||c&&"below"!==e)&&(l.top=g.top-n.top-h.height),null!=e&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+e),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+e)),this.$dropdownContainer.css(l)},c.prototype._resizeDropdown=function(){var a={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(a.minWidth=a.width,a.position="relative",a.width="auto"),this.$dropdown.css(a)},c.prototype._showDropdown=function(a){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},c}),b.define("select2/dropdown/minimumResultsForSearch",[],function(){function a(b){for(var c=0,d=0;d<b.length;d++){var e=b[d];e.children?c+=a(e.children):c++}return c}function b(a,b,c,d){this.minimumResultsForSearch=c.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),a.call(this,b,c,d)}return b.prototype.showSearch=function(b,c){return a(c.data.results)<this.minimumResultsForSearch?!1:b.call(this,c)},b}),b.define("select2/dropdown/selectOnClose",[],function(){function a(){}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("close",function(a){d._handleSelectOnClose(a)})},a.prototype._handleSelectOnClose=function(a,b){if(b&&null!=b.originalSelect2Event){var c=b.originalSelect2Event;if("select"===c._type||"unselect"===c._type)return}var d=this.getHighlightedResults();if(!(d.length<1)){var e=d.data("data");null!=e.element&&e.element.selected||null==e.element&&e.selected||this.trigger("select",{data:e})}},a}),b.define("select2/dropdown/closeOnSelect",[],function(){function a(){}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("select",function(a){d._selectTriggered(a)}),b.on("unselect",function(a){d._selectTriggered(a)})},a.prototype._selectTriggered=function(a,b){var c=b.originalEvent;c&&c.ctrlKey||this.trigger("close",{originalEvent:c,originalSelect2Event:b})},a}),b.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(a){var b=a.input.length-a.maximum,c="Please delete "+b+" character";return 1!=b&&(c+="s"),c},inputTooShort:function(a){var b=a.minimum-a.input.length,c="Please enter "+b+" or more characters";return c},loadingMore:function(){return"Loading more results…"},maximumSelected:function(a){var b="You can only select "+a.maximum+" item";return 1!=a.maximum&&(b+="s"),b},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),b.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C){function D(){this.reset()}D.prototype.apply=function(l){if(l=a.extend(!0,{},this.defaults,l),null==l.dataAdapter){if(null!=l.ajax?l.dataAdapter=o:null!=l.data?l.dataAdapter=n:l.dataAdapter=m,l.minimumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,r)),l.maximumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,s)),l.maximumSelectionLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,t)),l.tags&&(l.dataAdapter=j.Decorate(l.dataAdapter,p)),(null!=l.tokenSeparators||null!=l.tokenizer)&&(l.dataAdapter=j.Decorate(l.dataAdapter,q)),null!=l.query){var C=b(l.amdBase+"compat/query");l.dataAdapter=j.Decorate(l.dataAdapter,C)}if(null!=l.initSelection){var D=b(l.amdBase+"compat/initSelection");l.dataAdapter=j.Decorate(l.dataAdapter,D)}}if(null==l.resultsAdapter&&(l.resultsAdapter=c,null!=l.ajax&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,x)),null!=l.placeholder&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,w)),l.selectOnClose&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,A))),null==l.dropdownAdapter){if(l.multiple)l.dropdownAdapter=u;else{var E=j.Decorate(u,v);l.dropdownAdapter=E}if(0!==l.minimumResultsForSearch&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,z)),l.closeOnSelect&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,B)),null!=l.dropdownCssClass||null!=l.dropdownCss||null!=l.adaptDropdownCssClass){var F=b(l.amdBase+"compat/dropdownCss");l.dropdownAdapter=j.Decorate(l.dropdownAdapter,F)}l.dropdownAdapter=j.Decorate(l.dropdownAdapter,y)}if(null==l.selectionAdapter){if(l.multiple?l.selectionAdapter=e:l.selectionAdapter=d,null!=l.placeholder&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,f)),l.allowClear&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,g)),l.multiple&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,h)),null!=l.containerCssClass||null!=l.containerCss||null!=l.adaptContainerCssClass){var G=b(l.amdBase+"compat/containerCss");l.selectionAdapter=j.Decorate(l.selectionAdapter,G)}l.selectionAdapter=j.Decorate(l.selectionAdapter,i)}if("string"==typeof l.language)if(l.language.indexOf("-")>0){var H=l.language.split("-"),I=H[0];l.language=[l.language,I]}else l.language=[l.language];if(a.isArray(l.language)){var J=new k;l.language.push("en");for(var K=l.language,L=0;L<K.length;L++){var M=K[L],N={};try{N=k.loadPath(M)}catch(O){try{M=this.defaults.amdLanguageBase+M,N=k.loadPath(M)}catch(P){l.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+M+'" could not be automatically loaded. A fallback will be used instead.');continue}}J.extend(N)}l.translations=J}else{var Q=k.loadPath(this.defaults.amdLanguageBase+"en"),R=new k(l.language);R.extend(Q),l.translations=R}return l},D.prototype.reset=function(){function b(a){function b(a){return l[a]||a}return a.replace(/[^\u0000-\u007E]/g,b)}function c(d,e){if(""===a.trim(d.term))return e;if(e.children&&e.children.length>0){for(var f=a.extend(!0,{},e),g=e.children.length-1;g>=0;g--){var h=e.children[g],i=c(d,h);null==i&&f.children.splice(g,1)}return f.children.length>0?f:c(d,f)}var j=b(e.text).toUpperCase(),k=b(d.term).toUpperCase();return j.indexOf(k)>-1?e:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:j.escapeMarkup,language:C,matcher:c,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(a){return a},templateResult:function(a){return a.text},templateSelection:function(a){return a.text},theme:"default",width:"resolve"}},D.prototype.set=function(b,c){var d=a.camelCase(b),e={};e[d]=c;var f=j._convertData(e);a.extend(this.defaults,f)};var E=new D;return E}),b.define("select2/options",["require","jquery","./defaults","./utils"],function(a,b,c,d){function e(b,e){if(this.options=b,null!=e&&this.fromElement(e),this.options=c.apply(this.options),e&&e.is("input")){var f=a(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=d.Decorate(this.options.dataAdapter,f)}}return e.prototype.fromElement=function(a){var c=["select2"];null==this.options.multiple&&(this.options.multiple=a.prop("multiple")),null==this.options.disabled&&(this.options.disabled=a.prop("disabled")),null==this.options.language&&(a.prop("lang")?this.options.language=a.prop("lang").toLowerCase():a.closest("[lang]").prop("lang")&&(this.options.language=a.closest("[lang]").prop("lang"))),null==this.options.dir&&(a.prop("dir")?this.options.dir=a.prop("dir"):a.closest("[dir]").prop("dir")?this.options.dir=a.closest("[dir]").prop("dir"):this.options.dir="ltr"),a.prop("disabled",this.options.disabled),a.prop("multiple",this.options.multiple),a.data("select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),a.data("data",a.data("select2Tags")),a.data("tags",!0)),a.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),a.attr("ajax--url",a.data("ajaxUrl")),a.data("ajax--url",a.data("ajaxUrl")));var e={};e=b.fn.jquery&&"1."==b.fn.jquery.substr(0,2)&&a[0].dataset?b.extend(!0,{},a[0].dataset,a.data()):a.data();var f=b.extend(!0,{},e);f=d._convertData(f);for(var g in f)b.inArray(g,c)>-1||(b.isPlainObject(this.options[g])?b.extend(this.options[g],f[g]):this.options[g]=f[g]);return this},e.prototype.get=function(a){return this.options[a]},e.prototype.set=function(a,b){this.options[a]=b},e}),b.define("select2/core",["jquery","./options","./utils","./keys"],function(a,b,c,d){var e=function(a,c){null!=a.data("select2")&&a.data("select2").destroy(),this.$element=a,this.id=this._generateId(a),c=c||{},this.options=new b(c,a),e.__super__.constructor.call(this);var d=a.attr("tabindex")||0;a.data("old-tabindex",d),a.attr("tabindex","-1");var f=this.options.get("dataAdapter");this.dataAdapter=new f(a,this.options);var g=this.render();this._placeContainer(g);var h=this.options.get("selectionAdapter");this.selection=new h(a,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,g);var i=this.options.get("dropdownAdapter");this.dropdown=new i(a,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,g);var j=this.options.get("resultsAdapter");this.results=new j(a,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var k=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(a){k.trigger("selection:update",{data:a})}),a.addClass("select2-hidden-accessible"),a.attr("aria-hidden","true"),this._syncAttributes(),a.data("select2",this)};return c.Extend(e,c.Observable),e.prototype._generateId=function(a){var b="";return b=null!=a.attr("id")?a.attr("id"):null!=a.attr("name")?a.attr("name")+"-"+c.generateChars(2):c.generateChars(4),b=b.replace(/(:|\.|\[|\]|,)/g,""),b="select2-"+b},e.prototype._placeContainer=function(a){a.insertAfter(this.$element);var b=this._resolveWidth(this.$element,this.options.get("width"));null!=b&&a.css("width",b)},e.prototype._resolveWidth=function(a,b){var c=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==b){var d=this._resolveWidth(a,"style");return null!=d?d:this._resolveWidth(a,"element")}if("element"==b){var e=a.outerWidth(!1);return 0>=e?"auto":e+"px"}if("style"==b){var f=a.attr("style");if("string"!=typeof f)return null;for(var g=f.split(";"),h=0,i=g.length;i>h;h+=1){var j=g[h].replace(/\s/g,""),k=j.match(c);if(null!==k&&k.length>=1)return k[1]}return null}return b},e.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},e.prototype._registerDomEvents=function(){var b=this;this.$element.on("change.select2",function(){b.dataAdapter.current(function(a){b.trigger("selection:update",{data:a})})}),this.$element.on("focus.select2",function(a){b.trigger("focus",a)}),this._syncA=c.bind(this._syncAttributes,this),this._syncS=c.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var d=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=d?(this._observer=new d(function(c){a.each(c,b._syncA),a.each(c,b._syncS)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",b._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",b._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",b._syncS,!1))},e.prototype._registerDataEvents=function(){var a=this;this.dataAdapter.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerSelectionEvents=function(){var b=this,c=["toggle","focus"];this.selection.on("toggle",function(){b.toggleDropdown()}),this.selection.on("focus",function(a){b.focus(a)}),this.selection.on("*",function(d,e){-1===a.inArray(d,c)&&b.trigger(d,e)})},e.prototype._registerDropdownEvents=function(){var a=this;this.dropdown.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerResultsEvents=function(){var a=this;this.results.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerEvents=function(){var a=this;this.on("open",function(){a.$container.addClass("select2-container--open")}),this.on("close",function(){a.$container.removeClass("select2-container--open")}),this.on("enable",function(){a.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){a.$container.addClass("select2-container--disabled")}),this.on("blur",function(){a.$container.removeClass("select2-container--focus")}),this.on("query",function(b){a.isOpen()||a.trigger("open",{}),this.dataAdapter.query(b,function(c){a.trigger("results:all",{data:c,query:b})})}),this.on("query:append",function(b){this.dataAdapter.query(b,function(c){a.trigger("results:append",{data:c,query:b})})}),this.on("keypress",function(b){var c=b.which;a.isOpen()?c===d.ESC||c===d.TAB||c===d.UP&&b.altKey?(a.close(),b.preventDefault()):c===d.ENTER?(a.trigger("results:select",{}),b.preventDefault()):c===d.SPACE&&b.ctrlKey?(a.trigger("results:toggle",{}),b.preventDefault()):c===d.UP?(a.trigger("results:previous",{}),b.preventDefault()):c===d.DOWN&&(a.trigger("results:next",{}),b.preventDefault()):(c===d.ENTER||c===d.SPACE||c===d.DOWN&&b.altKey)&&(a.open(),b.preventDefault())})},e.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},e.prototype._syncSubtree=function(a,b){var c=!1,d=this;if(!a||!a.target||"OPTION"===a.target.nodeName||"OPTGROUP"===a.target.nodeName){if(b)if(b.addedNodes&&b.addedNodes.length>0)for(var e=0;e<b.addedNodes.length;e++){var f=b.addedNodes[e];f.selected&&(c=!0)}else b.removedNodes&&b.removedNodes.length>0&&(c=!0);else c=!0;c&&this.dataAdapter.current(function(a){d.trigger("selection:update",{data:a})})}},e.prototype.trigger=function(a,b){var c=e.__super__.trigger,d={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===b&&(b={}),a in d){var f=d[a],g={prevented:!1,name:a,args:b};if(c.call(this,f,g),g.prevented)return void(b.prevented=!0)}c.call(this,a,b)},e.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},e.prototype.open=function(){this.isOpen()||this.trigger("query",{})},e.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},e.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},e.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},e.prototype.focus=function(a){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},e.prototype.enable=function(a){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),(null==a||0===a.length)&&(a=[!0]);var b=!a[0];this.$element.prop("disabled",b)},e.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var a=[];return this.dataAdapter.current(function(b){a=b}),a},e.prototype.val=function(b){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==b||0===b.length)return this.$element.val();var c=b[0];a.isArray(c)&&(c=a.map(c,function(a){return a.toString()})),this.$element.val(c).trigger("change")},e.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null;
+},e.prototype.render=function(){var b=a('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return b.attr("dir",this.options.get("dir")),this.$container=b,this.$container.addClass("select2-container--"+this.options.get("theme")),b.data("element",this.$element),b},e}),b.define("jquery-mousewheel",["jquery"],function(a){return a}),b.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults"],function(a,b,c,d){if(null==a.fn.select2){var e=["open","close","destroy"];a.fn.select2=function(b){if(b=b||{},"object"==typeof b)return this.each(function(){var d=a.extend(!0,{},b);new c(a(this),d)}),this;if("string"==typeof b){var d,f=Array.prototype.slice.call(arguments,1);return this.each(function(){var c=a(this).data("select2");null==c&&window.console&&console.error&&console.error("The select2('"+b+"') method was called on an element that is not using Select2."),d=c[b].apply(c,f)}),a.inArray(b,e)>-1?this:d}throw new Error("Invalid arguments for Select2: "+b)}}return null==a.fn.select2.defaults&&(a.fn.select2.defaults=d),c}),{define:b.define,require:b.require}}(),c=b.require("jquery.select2");return a.fn.select2.amd=b,c}); \ No newline at end of file
diff --git a/admin/survey/modules/mod_hierarhija/js/vendor/status.js b/admin/survey/modules/mod_hierarhija/js/vendor/status.js
new file mode 100644
index 0000000..be7cdce
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/js/vendor/status.js
@@ -0,0 +1,137 @@
+var tableStatus;
+var kodeKosarica = [];
+var anketa_id = 0;
+
+$(document).ready(function () {
+ // pridobimo ID ankete, ko je dokument naložen
+ anketa_id = $('#srv_meta_anketa_id').val()
+
+ if (document.querySelector('#hierarhija-status')) {
+ tableStatus = $('#hierarhija-status-admin').DataTable({
+ "language": {
+ "url": "modules/mod_hierarhija/js/vendor/datatables-slovenian.json"
+ },
+ "lengthMenu": [[50, 100, 200, 400, -1], [50, 100, 200, 400, "vse"]],
+ // Prevzeto imamo prvo vrstico skrito, ker gre za urejanje
+ "columnDefs": [
+ {"visible": false, "targets": 0}
+ ]
+ });
+
+ $.get('ajax.php?anketa=' + anketa_id + '&t=hierarhija-ajax&a=super-sifra&m=getAll').then(function (response) {
+ var tabela = JSON.parse(response);
+ sestaviTabeloSuperKodami(tabela);
+ });
+
+ }
+});
+
+/**
+ * Sestavimo tabelo s superkodo in pripadajočimi hierarhijami
+ * @param {object} objekt
+ */
+function sestaviTabeloSuperKodami(objekt) {
+ if (objekt.length == 0)
+ return null;
+
+ $('.prikaz-superkod').show();
+
+ var vrstice = '';
+
+ $.each(objekt, function (superKoda, hierarhije) {
+ vrstice += '<tr><td>' + superKoda + '</td>';
+ vrstice += '<td><ul>';
+
+ $.each(hierarhije, function (koda, hierarhija) {
+ vrstice += '<li>' + hierarhija.hierarhija + ' | <b>' + hierarhija.ucitelj + '</b></li>';
+ });
+
+
+ vrstice += '</ul></td></tr>';
+ });
+
+ $('.prikaz-superkod tbody').html(vrstice);
+}
+
+/**
+ * Prikaže možnost urejanja superkode
+ */
+function prikaziUrejanjeSuperkode() {
+ var column = tableStatus.column(0);
+
+ column.visible(!column.visible());
+
+ $('.kosarica').toggle();
+}
+
+/**
+ * Izberemo ustrezno kodo
+ *
+ * @param {string} koda
+ */
+function dodajKodoVKosarico(koda) {
+
+ if (!poisciKodo(kodeKosarica, koda))
+ kodeKosarica.push({
+ koda: koda,
+ hierarhija: $('[data-hierarhija="' + koda + '"]').text(),
+ email: $('[data-email="' + koda + '"]').text(),
+ });
+
+ generirajSeznamKod();
+}
+
+function generirajSeznamKod() {
+ $("#seznamKod").html('');
+ kodeKosarica.forEach(function (val, index) {
+ $("#seznamKod").append('<li class="ui-state-default koda" id="' + val.koda + '"><span>' + (index + 1) + '</span>. hierarhija: <b>' + val.hierarhija + ' - ' + val.email + '</b> <div class="right modra izbrisi" onclick="izbrisiSifro(\'' + val.koda + '\')"><i class="fa fa-lg fa-trash-o" aria-hidden="true"></i></div></li>');
+ });
+}
+
+function poisciKodo(kosarica, koda) {
+ for (i = 0; i < kosarica.length; i++) {
+
+ if (kosarica[i].koda == koda)
+ return kosarica.splice(i, 1);
+
+ }
+
+ return false;
+}
+
+function izbrisiSifro(koda) {
+ poisciKodo(kodeKosarica, koda);
+ generirajSeznamKod();
+
+ $('input[value="' + koda + '"]').attr('checked', false);
+}
+
+
+$(function () {
+ $("#seznamKod").sortable({
+ placeholder: "ui-state-highlight",
+ update: function (event, ui) {
+ $("#seznamKod li").each(function () {
+ $(this).children('span').html($(this).index() + 1)
+ });
+ },
+ }).disableSelection();
+
+ $('#ustvari-superkodo').on('click', function () {
+ var kode = $("#seznamKod").sortable("toArray");
+
+ $.post('ajax.php?anketa=' + anketa_id + '&t=hierarhija-ajax&a=super-sifra&m=shrani', {
+ kode: kode
+ }).then(function (response) {
+ if(response.length == 0)
+ return false;
+
+ var tabela = JSON.parse(response);
+ sestaviTabeloSuperKodami(tabela);
+
+ kodeKosarica = [];
+ $('.tabela-status input').attr('checked', false);
+ generirajSeznamKod();
+ })
+ });
+}); \ No newline at end of file
diff --git a/admin/survey/modules/mod_hierarhija/js/vendor/vue-resource.min.js b/admin/survey/modules/mod_hierarhija/js/vendor/vue-resource.min.js
new file mode 100644
index 0000000..29cdee9
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/js/vendor/vue-resource.min.js
@@ -0,0 +1,7 @@
+/**
+ * vue-resource v0.7.0
+ * https://github.com/vuejs/vue-resource
+ * Released under the MIT License.
+ */
+
+!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.VueResource=e():t.VueResource=e()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){function r(t){var e=n(1);e.config=t.config,e.warning=t.util.warn,e.nextTick=t.util.nextTick,t.url=n(2),t.http=n(8),t.resource=n(23),t.Promise=n(10),Object.defineProperties(t.prototype,{$url:{get:function(){return e.options(t.url,this,this.$options.url)}},$http:{get:function(){return e.options(t.http,this,this.$options.http)}},$resource:{get:function(){return t.resource.bind(this)}},$promise:{get:function(){return function(e){return new t.Promise(e,this)}.bind(this)}}})}window.Vue&&Vue.use(r),t.exports=r},function(t,e){function n(t,e,o){for(var i in e)o&&(r.isPlainObject(e[i])||r.isArray(e[i]))?(r.isPlainObject(e[i])&&!r.isPlainObject(t[i])&&(t[i]={}),r.isArray(e[i])&&!r.isArray(t[i])&&(t[i]=[]),n(t[i],e[i],o)):void 0!==e[i]&&(t[i]=e[i])}var r=e,o=[],i=window.console;r.warn=function(t){i&&r.warning&&(!r.config.silent||r.config.debug)&&i.warn("[VueResource warn]: "+t)},r.error=function(t){i&&i.error(t)},r.trim=function(t){return t.replace(/^\s*|\s*$/g,"")},r.toLower=function(t){return t?t.toLowerCase():""},r.isArray=Array.isArray,r.isString=function(t){return"string"==typeof t},r.isFunction=function(t){return"function"==typeof t},r.isObject=function(t){return null!==t&&"object"==typeof t},r.isPlainObject=function(t){return r.isObject(t)&&Object.getPrototypeOf(t)==Object.prototype},r.options=function(t,e,n){return n=n||{},r.isFunction(n)&&(n=n.call(e)),r.merge(t.bind({$vm:e,$options:n}),t,{$options:n})},r.each=function(t,e){var n,o;if("number"==typeof t.length)for(n=0;n<t.length;n++)e.call(t[n],t[n],n);else if(r.isObject(t))for(o in t)t.hasOwnProperty(o)&&e.call(t[o],t[o],o);return t},r.defaults=function(t,e){for(var n in e)void 0===t[n]&&(t[n]=e[n]);return t},r.extend=function(t){var e=o.slice.call(arguments,1);return e.forEach(function(e){n(t,e)}),t},r.merge=function(t){var e=o.slice.call(arguments,1);return e.forEach(function(e){n(t,e,!0)}),t}},function(t,e,n){function r(t,e){var n,i=t;return s.isString(t)&&(i={url:t,params:e}),i=s.merge({},r.options,this.$options,i),r.transforms.forEach(function(t){n=o(t,n,this.$vm)},this),n(i)}function o(t,e,n){return function(r){return t.call(n,r,e)}}function i(t,e,n){var r,o=s.isArray(e),a=s.isPlainObject(e);s.each(e,function(e,u){r=s.isObject(e)||s.isArray(e),n&&(u=n+"["+(a||r?u:"")+"]"),!n&&o?t.add(e.name,e.value):r?i(t,e,u):t.add(u,e)})}var s=n(1),a=document.documentMode,u=document.createElement("a");r.options={url:"",root:null,params:{}},r.transforms=[n(3),n(5),n(6),n(7)],r.params=function(t){var e=[],n=encodeURIComponent;return e.add=function(t,e){s.isFunction(e)&&(e=e()),null===e&&(e=""),this.push(n(t)+"="+n(e))},i(e,t),e.join("&").replace(/%20/g,"+")},r.parse=function(t){return a&&(u.href=t,t=u.href),u.href=t,{href:u.href,protocol:u.protocol?u.protocol.replace(/:$/,""):"",port:u.port,host:u.host,hostname:u.hostname,pathname:"/"===u.pathname.charAt(0)?u.pathname:"/"+u.pathname,search:u.search?u.search.replace(/^\?/,""):"",hash:u.hash?u.hash.replace(/^#/,""):""}},t.exports=s.url=r},function(t,e,n){var r=n(4);t.exports=function(t){var e=[],n=r.expand(t.url,t.params,e);return e.forEach(function(e){delete t.params[e]}),n}},function(t,e){e.expand=function(t,e,n){var r=this.parse(t),o=r.expand(e);return n&&n.push.apply(n,r.vars),o},e.parse=function(t){var n=["+","#",".","/",";","?","&"],r=[];return{vars:r,expand:function(o){return t.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g,function(t,i,s){if(i){var a=null,u=[];if(-1!==n.indexOf(i.charAt(0))&&(a=i.charAt(0),i=i.substr(1)),i.split(/,/g).forEach(function(t){var n=/([^:\*]*)(?::(\d+)|(\*))?/.exec(t);u.push.apply(u,e.getValues(o,a,n[1],n[2]||n[3])),r.push(n[1])}),a&&"+"!==a){var c=",";return"?"===a?c="&":"#"!==a&&(c=a),(0!==u.length?a:"")+u.join(c)}return u.join(",")}return e.encodeReserved(s)})}}},e.getValues=function(t,e,n,r){var o=t[n],i=[];if(this.isDefined(o)&&""!==o)if("string"==typeof o||"number"==typeof o||"boolean"==typeof o)o=o.toString(),r&&"*"!==r&&(o=o.substring(0,parseInt(r,10))),i.push(this.encodeValue(e,o,this.isKeyOperator(e)?n:null));else if("*"===r)Array.isArray(o)?o.filter(this.isDefined).forEach(function(t){i.push(this.encodeValue(e,t,this.isKeyOperator(e)?n:null))},this):Object.keys(o).forEach(function(t){this.isDefined(o[t])&&i.push(this.encodeValue(e,o[t],t))},this);else{var s=[];Array.isArray(o)?o.filter(this.isDefined).forEach(function(t){s.push(this.encodeValue(e,t))},this):Object.keys(o).forEach(function(t){this.isDefined(o[t])&&(s.push(encodeURIComponent(t)),s.push(this.encodeValue(e,o[t].toString())))},this),this.isKeyOperator(e)?i.push(encodeURIComponent(n)+"="+s.join(",")):0!==s.length&&i.push(s.join(","))}else";"===e?i.push(encodeURIComponent(n)):""!==o||"&"!==e&&"?"!==e?""===o&&i.push(""):i.push(encodeURIComponent(n)+"=");return i},e.isDefined=function(t){return void 0!==t&&null!==t},e.isKeyOperator=function(t){return";"===t||"&"===t||"?"===t},e.encodeValue=function(t,e,n){return e="+"===t||"#"===t?this.encodeReserved(e):encodeURIComponent(e),n?encodeURIComponent(n)+"="+e:e},e.encodeReserved=function(t){return t.split(/(%[0-9A-Fa-f]{2})/g).map(function(t){return/%[0-9A-Fa-f]/.test(t)||(t=encodeURI(t)),t}).join("")}},function(t,e,n){function r(t){return o(t,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function o(t,e){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,e?"%20":"+")}var i=n(1);t.exports=function(t,e){var n=[],o=e(t);return o=o.replace(/(\/?):([a-z]\w*)/gi,function(e,o,s){return i.warn("The `:"+s+"` parameter syntax has been deprecated. Use the `{"+s+"}` syntax instead."),t.params[s]?(n.push(s),o+r(t.params[s])):""}),n.forEach(function(e){delete t.params[e]}),o}},function(t,e,n){var r=n(1);t.exports=function(t,e){var n=Object.keys(r.url.options.params),o={},i=e(t);return r.each(t.params,function(t,e){-1===n.indexOf(e)&&(o[e]=t)}),o=r.url.params(o),o&&(i+=(-1==i.indexOf("?")?"?":"&")+o),i}},function(t,e,n){var r=n(1);t.exports=function(t,e){var n=e(t);return r.isString(t.root)&&!n.match(/^(https?:)?\//)&&(n=t.root+"/"+n),n}},function(t,e,n){function r(t,e){var n,u,c=i;return r.interceptors.forEach(function(t){c=a(t,this.$vm)(c)},this),e=o.isObject(t)?t:o.extend({url:t},e),n=o.merge({},r.options,this.$options,e),u=c(n).bind(this.$vm).then(function(t){return t.ok?t:s.reject(t)},function(t){return t instanceof Error&&o.error(t),s.reject(t)}),n.success&&u.success(n.success),n.error&&u.error(n.error),u}var o=n(1),i=n(9),s=n(10),a=n(13),u={"Content-Type":"application/json"};r.options={method:"get",data:"",params:{},headers:{},xhr:null,upload:null,jsonp:"callback",beforeSend:null,crossOrigin:null,emulateHTTP:!1,emulateJSON:!1,timeout:0},r.interceptors=[n(14),n(15),n(16),n(18),n(19),n(20),n(21)],r.headers={put:u,post:u,patch:u,"delete":u,common:{Accept:"application/json, text/plain, */*"},custom:{"X-Requested-With":"XMLHttpRequest"}},["get","put","post","patch","delete","jsonp"].forEach(function(t){r[t]=function(e,n,r,i){return o.isFunction(n)&&(i=r,r=n,n=void 0),o.isObject(r)&&(i=r,r=void 0),this(e,o.extend({method:t,data:n,success:r},i))}}),t.exports=o.http=r},function(t,e,n){function r(t){var e,n,r,i={};return o.isString(t)&&o.each(t.split("\n"),function(t){r=t.indexOf(":"),n=o.trim(o.toLower(t.slice(0,r))),e=o.trim(t.slice(r+1)),i[n]?o.isArray(i[n])?i[n].push(e):i[n]=[i[n],e]:i[n]=e}),i}var o=n(1),i=n(10),s=n(12);t.exports=function(t){var e=(t.client||s)(t);return i.resolve(e).then(function(t){if(t.headers){var e=r(t.headers);t.headers=function(t){return t?e[o.toLower(t)]:e}}return t.ok=t.status>=200&&t.status<300,t})}},function(t,e,n){function r(t,e){t instanceof i?this.promise=t:this.promise=new i(t.bind(e)),this.context=e}var o=n(1),i=window.Promise||n(11);r.all=function(t,e){return new r(i.all(t),e)},r.resolve=function(t,e){return new r(i.resolve(t),e)},r.reject=function(t,e){return new r(i.reject(t),e)},r.race=function(t,e){return new r(i.race(t),e)};var s=r.prototype;s.bind=function(t){return this.context=t,this},s.then=function(t,e){return t&&t.bind&&this.context&&(t=t.bind(this.context)),e&&e.bind&&this.context&&(e=e.bind(this.context)),this.promise=this.promise.then(t,e),this},s["catch"]=function(t){return t&&t.bind&&this.context&&(t=t.bind(this.context)),this.promise=this.promise["catch"](t),this},s["finally"]=function(t){return this.then(function(e){return t.call(this),e},function(e){return t.call(this),i.reject(e)})},s.success=function(t){return o.warn("The `success` method has been deprecated. Use the `then` method instead."),this.then(function(e){return t.call(this,e.data,e.status,e)||e})},s.error=function(t){return o.warn("The `error` method has been deprecated. Use the `catch` method instead."),this["catch"](function(e){return t.call(this,e.data,e.status,e)||e})},s.always=function(t){o.warn("The `always` method has been deprecated. Use the `finally` method instead.");var e=function(e){return t.call(this,e.data,e.status,e)||e};return this.then(e,e)},t.exports=r},function(t,e,n){function r(t){this.state=a,this.value=void 0,this.deferred=[];var e=this;try{t(function(t){e.resolve(t)},function(t){e.reject(t)})}catch(n){e.reject(n)}}var o=n(1),i=0,s=1,a=2;r.reject=function(t){return new r(function(e,n){n(t)})},r.resolve=function(t){return new r(function(e,n){e(t)})},r.all=function(t){return new r(function(e,n){function o(n){return function(r){s[n]=r,i+=1,i===t.length&&e(s)}}var i=0,s=[];0===t.length&&e(s);for(var a=0;a<t.length;a+=1)r.resolve(t[a]).then(o(a),n)})},r.race=function(t){return new r(function(e,n){for(var o=0;o<t.length;o+=1)r.resolve(t[o]).then(e,n)})};var u=r.prototype;u.resolve=function(t){var e=this;if(e.state===a){if(t===e)throw new TypeError("Promise settled with itself.");var n=!1;try{var r=t&&t.then;if(null!==t&&"object"==typeof t&&"function"==typeof r)return void r.call(t,function(t){n||e.resolve(t),n=!0},function(t){n||e.reject(t),n=!0})}catch(o){return void(n||e.reject(o))}e.state=i,e.value=t,e.notify()}},u.reject=function(t){var e=this;if(e.state===a){if(t===e)throw new TypeError("Promise settled with itself.");e.state=s,e.value=t,e.notify()}},u.notify=function(){var t=this;o.nextTick(function(){if(t.state!==a)for(;t.deferred.length;){var e=t.deferred.shift(),n=e[0],r=e[1],o=e[2],u=e[3];try{t.state===i?o("function"==typeof n?n.call(void 0,t.value):t.value):t.state===s&&("function"==typeof r?o(r.call(void 0,t.value)):u(t.value))}catch(c){u(c)}}})},u.then=function(t,e){var n=this;return new r(function(r,o){n.deferred.push([t,e,r,o]),n.notify()})},u["catch"]=function(t){return this.then(void 0,t)},t.exports=r},function(t,e,n){var r=n(1),o=n(10);t.exports=function(t){return new o(function(e){var n,o=new XMLHttpRequest,i={request:t};t.cancel=function(){o.abort()},o.open(t.method,r.url(t),!0),n=function(t){i.data=o.responseText,i.status=o.status,i.statusText=o.statusText,i.headers=o.getAllResponseHeaders(),e(i)},o.timeout=0,o.onload=n,o.onabort=n,o.onerror=n,o.ontimeout=function(){},o.onprogress=function(){},r.isPlainObject(t.xhr)&&r.extend(o,t.xhr),r.isPlainObject(t.upload)&&r.extend(o.upload,t.upload),r.each(t.headers||{},function(t,e){o.setRequestHeader(e,t)}),o.send(t.data)})}},function(t,e,n){function r(t,e,n){var r=i.resolve(t);return arguments.length<2?r:r.then(e,n)}var o=n(1),i=n(10);t.exports=function(t,e){return function(n){return o.isFunction(t)&&(t=t.call(e,i)),function(i){return o.isFunction(t.request)&&(i=t.request.call(e,i)),r(i,function(i){return r(n(i),function(n){return o.isFunction(t.response)&&(n=t.response.call(e,n)),n})})}}}},function(t,e,n){var r=n(1);t.exports={request:function(t){return r.isFunction(t.beforeSend)&&t.beforeSend.call(this,t),t}}},function(t,e){t.exports=function(){var t;return{request:function(e){return e.timeout&&(t=setTimeout(function(){e.cancel()},e.timeout)),e},response:function(e){return clearTimeout(t),e}}}},function(t,e,n){var r=n(17);t.exports={request:function(t){return"JSONP"==t.method&&(t.client=r),t}}},function(t,e,n){var r=n(1),o=n(10);t.exports=function(t){return new o(function(e){var n,o,i="_jsonp"+Math.random().toString(36).substr(2),s={request:t,data:null};t.params[t.jsonp]=i,t.cancel=function(){n({type:"cancel"})},o=document.createElement("script"),o.src=r.url(t),o.type="text/javascript",o.async=!0,window[i]=function(t){s.data=t},n=function(t){"load"===t.type&&null!==s.data?s.status=200:"error"===t.type?s.status=404:s.status=0,e(s),delete window[i],document.body.removeChild(o)},o.onload=n,o.onerror=n,document.body.appendChild(o)})}},function(t,e){t.exports={request:function(t){return t.emulateHTTP&&/^(PUT|PATCH|DELETE)$/i.test(t.method)&&(t.headers["X-HTTP-Method-Override"]=t.method,t.method="POST"),t}}},function(t,e,n){var r=n(1);t.exports={request:function(t){return t.emulateJSON&&r.isPlainObject(t.data)&&(t.headers["Content-Type"]="application/x-www-form-urlencoded",t.data=r.url.params(t.data)),r.isObject(t.data)&&/FormData/i.test(t.data.toString())&&delete t.headers["Content-Type"],r.isPlainObject(t.data)&&(t.data=JSON.stringify(t.data)),t},response:function(t){try{t.data=JSON.parse(t.data)}catch(e){}return t}}},function(t,e,n){var r=n(1);t.exports={request:function(t){return t.method=t.method.toUpperCase(),t.headers=r.extend({},r.http.headers.common,t.crossOrigin?{}:r.http.headers.custom,r.http.headers[t.method.toLowerCase()],t.headers),r.isPlainObject(t.data)&&/^(GET|JSONP)$/i.test(t.method)&&(r.extend(t.params,t.data),delete t.data),t}}},function(t,e,n){function r(t){var e=o.url.parse(o.url(t));return e.protocol!==a.protocol||e.host!==a.host}var o=n(1),i=n(22),s="withCredentials"in new XMLHttpRequest,a=o.url.parse(location.href);t.exports={request:function(t){return null===t.crossOrigin&&(t.crossOrigin=r(t)),t.crossOrigin&&(s||(t.client=i),t.emulateHTTP=!1),t}}},function(t,e,n){var r=n(1),o=n(10);t.exports=function(t){return new o(function(e){var n,o=new XDomainRequest,i={request:t};t.cancel=function(){o.abort()},o.open(t.method,r.url(t),!0),n=function(t){i.data=o.responseText,i.status=o.status,i.statusText=o.statusText,e(i)},o.timeout=0,o.onload=n,o.onabort=n,o.onerror=n,o.ontimeout=function(){},o.onprogress=function(){},o.send(t.data)})}},function(t,e,n){function r(t,e,n,s){var a=this,u={};return n=i.extend({},r.actions,n),i.each(n,function(n,r){n=i.merge({url:t,params:e||{}},s,n),u[r]=function(){return(a.$http||i.http)(o(n,arguments))}}),u}function o(t,e){var n,r,o,s=i.extend({},t),a={};switch(e.length){case 4:o=e[3],r=e[2];case 3:case 2:if(!i.isFunction(e[1])){a=e[0],n=e[1],r=e[2];break}if(i.isFunction(e[0])){r=e[0],o=e[1];break}r=e[1],o=e[2];case 1:i.isFunction(e[0])?r=e[0]:/^(POST|PUT|PATCH)$/i.test(s.method)?n=e[0]:a=e[0];break;case 0:break;default:throw"Expected up to 4 arguments [params, data, success, error], got "+e.length+" arguments"}return s.data=n,s.params=i.extend({},s.params,a),r&&(s.success=r),o&&(s.error=o),s}var i=n(1);r.actions={get:{method:"GET"},save:{method:"POST"},query:{method:"GET"},update:{method:"PUT"},remove:{method:"DELETE"},"delete":{method:"DELETE"}},t.exports=i.resource=r}])}); \ No newline at end of file
diff --git a/admin/survey/modules/mod_hierarhija/js/vendor/vue.min.js b/admin/survey/modules/mod_hierarhija/js/vendor/vue.min.js
new file mode 100644
index 0000000..129746e
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/js/vendor/vue.min.js
@@ -0,0 +1,9 @@
+/*!
+ * Vue.js v1.0.27
+ * (c) 2016 Evan You
+ * Released under the MIT License.
+ */
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Vue=e()}(this,function(){"use strict";function t(e,n,r){if(i(e,n))return void(e[n]=r);if(e._isVue)return void t(e._data,n,r);var s=e.__ob__;if(!s)return void(e[n]=r);if(s.convert(n,r),s.dep.notify(),s.vms)for(var o=s.vms.length;o--;){var a=s.vms[o];a._proxy(n),a._digest()}return r}function e(t,e){if(i(t,e)){delete t[e];var n=t.__ob__;if(!n)return void(t._isVue&&(delete t._data[e],t._digest()));if(n.dep.notify(),n.vms)for(var r=n.vms.length;r--;){var s=n.vms[r];s._unproxy(e),s._digest()}}}function i(t,e){return Ii.call(t,e)}function n(t){return Mi.test(t)}function r(t){var e=(t+"").charCodeAt(0);return 36===e||95===e}function s(t){return null==t?"":t.toString()}function o(t){if("string"!=typeof t)return t;var e=Number(t);return isNaN(e)?t:e}function a(t){return"true"===t||"false"!==t&&t}function h(t){var e=t.charCodeAt(0),i=t.charCodeAt(t.length-1);return e!==i||34!==e&&39!==e?t:t.slice(1,-1)}function l(t){return t.replace(Vi,c)}function c(t,e){return e?e.toUpperCase():""}function u(t){return t.replace(Wi,"$1-$2").replace(Wi,"$1-$2").toLowerCase()}function f(t){return t.replace(Bi,c)}function p(t,e){return function(i){var n=arguments.length;return n?n>1?t.apply(e,arguments):t.call(e,i):t.call(e)}}function d(t,e){e=e||0;for(var i=t.length-e,n=new Array(i);i--;)n[i]=t[i+e];return n}function v(t,e){for(var i=Object.keys(e),n=i.length;n--;)t[i[n]]=e[i[n]];return t}function m(t){return null!==t&&"object"==typeof t}function g(t){return zi.call(t)===Ui}function _(t,e,i,n){Object.defineProperty(t,e,{value:i,enumerable:!!n,writable:!0,configurable:!0})}function y(t,e){var i,n,r,s,o,a=function a(){var h=Date.now()-s;h<e&&h>=0?i=setTimeout(a,e-h):(i=null,o=t.apply(r,n),i||(r=n=null))};return function(){return r=this,n=arguments,s=Date.now(),i||(i=setTimeout(a,e)),o}}function b(t,e){for(var i=t.length;i--;)if(t[i]===e)return i;return-1}function w(t){var e=function e(){if(!e.cancelled)return t.apply(this,arguments)};return e.cancel=function(){e.cancelled=!0},e}function C(t,e){return t==e||!(!m(t)||!m(e))&&JSON.stringify(t)===JSON.stringify(e)}function $(t){this.size=0,this.limit=t,this.head=this.tail=void 0,this._keymap=Object.create(null)}function k(){return cn.charCodeAt(pn+1)}function x(){return cn.charCodeAt(++pn)}function A(){return pn>=fn}function O(){for(;k()===An;)x()}function T(t){return t===Cn||t===$n}function N(t){return On[t]}function j(t,e){return Tn[t]===e}function E(){for(var t,e=x();!A();)if(t=x(),t===xn)x();else if(t===e)break}function F(t){for(var e=0,i=t;!A();)if(t=k(),T(t))E();else if(i===t&&e++,j(i,t)&&e--,x(),0===e)break}function S(){for(var t=pn;!A();)if(dn=k(),T(dn))E();else if(N(dn))F(dn);else if(dn===kn){if(x(),dn=k(),dn!==kn){vn!==_n&&vn!==wn||(vn=yn);break}x()}else{if(dn===An&&(vn===bn||vn===wn)){O();break}vn===yn&&(vn=bn),x()}return cn.slice(t+1,pn)||null}function D(){for(var t=[];!A();)t.push(P());return t}function P(){var t,e={};return vn=yn,e.name=S().trim(),vn=wn,t=R(),t.length&&(e.args=t),e}function R(){for(var t=[];!A()&&vn!==yn;){var e=S();if(!e)break;t.push(L(e))}return t}function L(t){if(gn.test(t))return{value:o(t),dynamic:!1};var e=h(t),i=e===t;return{value:i?t:e,dynamic:i}}function H(t){var e=mn.get(t);if(e)return e;cn=t,un={},fn=cn.length,pn=-1,dn="",vn=_n;var i;return cn.indexOf("|")<0?un.expression=cn.trim():(un.expression=S().trim(),i=D(),i.length&&(un.filters=i)),mn.put(t,un),un}function I(t){return t.replace(jn,"\\$&")}function M(){var t=I(Hn.delimiters[0]),e=I(Hn.delimiters[1]),i=I(Hn.unsafeDelimiters[0]),n=I(Hn.unsafeDelimiters[1]);Fn=new RegExp(i+"((?:.|\\n)+?)"+n+"|"+t+"((?:.|\\n)+?)"+e,"g"),Sn=new RegExp("^"+i+"((?:.|\\n)+?)"+n+"$"),En=new $(1e3)}function V(t){En||M();var e=En.get(t);if(e)return e;if(!Fn.test(t))return null;for(var i,n,r,s,o,a,h=[],l=Fn.lastIndex=0;i=Fn.exec(t);)n=i.index,n>l&&h.push({value:t.slice(l,n)}),r=Sn.test(i[0]),s=r?i[1]:i[2],o=s.charCodeAt(0),a=42===o,s=a?s.slice(1):s,h.push({tag:!0,value:s.trim(),html:r,oneTime:a}),l=n+i[0].length;return l<t.length&&h.push({value:t.slice(l)}),En.put(t,h),h}function W(t,e){return t.length>1?t.map(function(t){return B(t,e)}).join("+"):B(t[0],e,!0)}function B(t,e,i){return t.tag?t.oneTime&&e?'"'+e.$eval(t.value)+'"':z(t.value,i):'"'+t.value+'"'}function z(t,e){if(Dn.test(t)){var i=H(t);return i.filters?"this._applyFilters("+i.expression+",null,"+JSON.stringify(i.filters)+",false)":"("+t+")"}return e?t:"("+t+")"}function U(t,e,i,n){Q(t,1,function(){e.appendChild(t)},i,n)}function q(t,e,i,n){Q(t,1,function(){tt(t,e)},i,n)}function J(t,e,i){Q(t,-1,function(){it(t)},e,i)}function Q(t,e,i,n,r){var s=t.__v_trans;if(!s||!s.hooks&&!en||!n._isCompiled||n.$parent&&!n.$parent._isCompiled)return i(),void(r&&r());var o=e>0?"enter":"leave";s[o](i,r)}function G(t){if("string"==typeof t){t=document.querySelector(t)}return t}function Z(t){if(!t)return!1;var e=t.ownerDocument.documentElement,i=t.parentNode;return e===t||e===i||!(!i||1!==i.nodeType||!e.contains(i))}function X(t,e){var i=t.getAttribute(e);return null!==i&&t.removeAttribute(e),i}function Y(t,e){var i=X(t,":"+e);return null===i&&(i=X(t,"v-bind:"+e)),i}function K(t,e){return t.hasAttribute(e)||t.hasAttribute(":"+e)||t.hasAttribute("v-bind:"+e)}function tt(t,e){e.parentNode.insertBefore(t,e)}function et(t,e){e.nextSibling?tt(t,e.nextSibling):e.parentNode.appendChild(t)}function it(t){t.parentNode.removeChild(t)}function nt(t,e){e.firstChild?tt(t,e.firstChild):e.appendChild(t)}function rt(t,e){var i=t.parentNode;i&&i.replaceChild(e,t)}function st(t,e,i,n){t.addEventListener(e,i,n)}function ot(t,e,i){t.removeEventListener(e,i)}function at(t){var e=t.className;return"object"==typeof e&&(e=e.baseVal||""),e}function ht(t,e){Yi&&!/svg$/.test(t.namespaceURI)?t.className=e:t.setAttribute("class",e)}function lt(t,e){if(t.classList)t.classList.add(e);else{var i=" "+at(t)+" ";i.indexOf(" "+e+" ")<0&&ht(t,(i+e).trim())}}function ct(t,e){if(t.classList)t.classList.remove(e);else{for(var i=" "+at(t)+" ",n=" "+e+" ";i.indexOf(n)>=0;)i=i.replace(n," ");ht(t,i.trim())}t.className||t.removeAttribute("class")}function ut(t,e){var i,n;if(dt(t)&&yt(t.content)&&(t=t.content),t.hasChildNodes())for(ft(t),n=e?document.createDocumentFragment():document.createElement("div");i=t.firstChild;)n.appendChild(i);return n}function ft(t){for(var e;e=t.firstChild,pt(e);)t.removeChild(e);for(;e=t.lastChild,pt(e);)t.removeChild(e)}function pt(t){return t&&(3===t.nodeType&&!t.data.trim()||8===t.nodeType)}function dt(t){return t.tagName&&"template"===t.tagName.toLowerCase()}function vt(t,e){var i=Hn.debug?document.createComment(t):document.createTextNode(e?" ":"");return i.__v_anchor=!0,i}function mt(t){if(t.hasAttributes())for(var e=t.attributes,i=0,n=e.length;i<n;i++){var r=e[i].name;if(Vn.test(r))return l(r.replace(Vn,""))}}function gt(t,e,i){for(var n;t!==e;)n=t.nextSibling,i(t),t=n;i(e)}function _t(t,e,i,n,r){function s(){if(a++,o&&a>=h.length){for(var t=0;t<h.length;t++)n.appendChild(h[t]);r&&r()}}var o=!1,a=0,h=[];gt(t,e,function(t){t===e&&(o=!0),h.push(t),J(t,i,s)})}function yt(t){return t&&11===t.nodeType}function bt(t){if(t.outerHTML)return t.outerHTML;var e=document.createElement("div");return e.appendChild(t.cloneNode(!0)),e.innerHTML}function wt(t){var e=t.node;if(t.end)for(;!e.__vue__&&e!==t.end&&e.nextSibling;)e=e.nextSibling;return e.__vue__}function Ct(t,e){var i=t.tagName.toLowerCase(),n=t.hasAttributes();if(Wn.test(i)||Bn.test(i)){if(n)return $t(t,e)}else{if(jt(e,"components",i))return{id:i};var r=n&&$t(t,e);if(r)return r}}function $t(t,e){var i=t.getAttribute("is");if(null!=i){if(jt(e,"components",i))return t.removeAttribute("is"),{id:i}}else if(i=Y(t,"is"),null!=i)return{id:i,dynamic:!0}}function kt(e,n){var r,s,o;for(r in n)s=e[r],o=n[r],i(e,r)?m(s)&&m(o)&&kt(s,o):t(e,r,o);return e}function xt(t,e){var i=Object.create(t||null);return e?v(i,Tt(e)):i}function At(t){if(t.components)for(var e,i=t.components=Tt(t.components),n=Object.keys(i),r=0,s=n.length;r<s;r++){var o=n[r];Wn.test(o)||Bn.test(o)||(e=i[o],g(e)&&(i[o]=Si.extend(e)))}}function Ot(t){var e,i,n=t.props;if(qi(n))for(t.props={},e=n.length;e--;)i=n[e],"string"==typeof i?t.props[i]=null:i.name&&(t.props[i.name]=i);else if(g(n)){var r=Object.keys(n);for(e=r.length;e--;)i=n[r[e]],"function"==typeof i&&(n[r[e]]={type:i})}}function Tt(t){if(qi(t)){for(var e,i={},n=t.length;n--;){e=t[n];var r="function"==typeof e?e.options&&e.options.name||e.id:e.name||e.id;r&&(i[r]=e)}return i}return t}function Nt(t,e,n){function r(i){var r=zn[i]||Un;o[i]=r(t[i],e[i],n,i)}At(e),Ot(e);var s,o={};if(e.extends&&(t="function"==typeof e.extends?Nt(t,e.extends.options,n):Nt(t,e.extends,n)),e.mixins)for(var a=0,h=e.mixins.length;a<h;a++){var l=e.mixins[a],c=l.prototype instanceof Si?l.options:l;t=Nt(t,c,n)}for(s in t)r(s);for(s in e)i(t,s)||r(s);return o}function jt(t,e,i,n){if("string"==typeof i){var r,s=t[e],o=s[i]||s[r=l(i)]||s[r.charAt(0).toUpperCase()+r.slice(1)];return o}}function Et(){this.id=qn++,this.subs=[]}function Ft(t){Zn=!1,t(),Zn=!0}function St(t){if(this.value=t,this.dep=new Et,_(t,"__ob__",this),qi(t)){var e=Ji?Dt:Pt;e(t,Qn,Gn),this.observeArray(t)}else this.walk(t)}function Dt(t,e){t.__proto__=e}function Pt(t,e,i){for(var n=0,r=i.length;n<r;n++){var s=i[n];_(t,s,e[s])}}function Rt(t,e){if(t&&"object"==typeof t){var n;return i(t,"__ob__")&&t.__ob__ instanceof St?n=t.__ob__:Zn&&(qi(t)||g(t))&&Object.isExtensible(t)&&!t._isVue&&(n=new St(t)),n&&e&&n.addVm(e),n}}function Lt(t,e,i){var n=new Et,r=Object.getOwnPropertyDescriptor(t,e);if(!r||r.configurable!==!1){var s=r&&r.get,o=r&&r.set,a=Rt(i);Object.defineProperty(t,e,{enumerable:!0,configurable:!0,get:function(){var e=s?s.call(t):i;if(Et.target&&(n.depend(),a&&a.dep.depend(),qi(e)))for(var r,o=0,h=e.length;o<h;o++)r=e[o],r&&r.__ob__&&r.__ob__.dep.depend();return e},set:function(e){var r=s?s.call(t):i;e!==r&&(o?o.call(t,e):i=e,a=Rt(e),n.notify())}})}}function Ht(t){t.prototype._init=function(t){t=t||{},this.$el=null,this.$parent=t.parent,this.$root=this.$parent?this.$parent.$root:this,this.$children=[],this.$refs={},this.$els={},this._watchers=[],this._directives=[],this._uid=Yn++,this._isVue=!0,this._events={},this._eventsCount={},this._isFragment=!1,this._fragment=this._fragmentStart=this._fragmentEnd=null,this._isCompiled=this._isDestroyed=this._isReady=this._isAttached=this._isBeingDestroyed=this._vForRemoving=!1,this._unlinkFn=null,this._context=t._context||this.$parent,this._scope=t._scope,this._frag=t._frag,this._frag&&this._frag.children.push(this),this.$parent&&this.$parent.$children.push(this),t=this.$options=Nt(this.constructor.options,t,this),this._updateRef(),this._data={},this._callHook("init"),this._initState(),this._initEvents(),this._callHook("created"),t.el&&this.$mount(t.el)}}function It(t){if(void 0===t)return"eof";var e=t.charCodeAt(0);switch(e){case 91:case 93:case 46:case 34:case 39:case 48:return t;case 95:case 36:return"ident";case 32:case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"ws"}return e>=97&&e<=122||e>=65&&e<=90?"ident":e>=49&&e<=57?"number":"else"}function Mt(t){var e=t.trim();return("0"!==t.charAt(0)||!isNaN(t))&&(n(e)?h(e):"*"+e)}function Vt(t){function e(){var e=t[c+1];if(u===lr&&"'"===e||u===cr&&'"'===e)return c++,n="\\"+e,p[tr](),!0}var i,n,r,s,o,a,h,l=[],c=-1,u=rr,f=0,p=[];for(p[er]=function(){void 0!==r&&(l.push(r),r=void 0)},p[tr]=function(){void 0===r?r=n:r+=n},p[ir]=function(){p[tr](),f++},p[nr]=function(){if(f>0)f--,u=hr,p[tr]();else{if(f=0,r=Mt(r),r===!1)return!1;p[er]()}};null!=u;)if(c++,i=t[c],"\\"!==i||!e()){if(s=It(i),h=pr[u],o=h[s]||h.else||fr,o===fr)return;if(u=o[0],a=p[o[1]],a&&(n=o[2],n=void 0===n?i:n,a()===!1))return;if(u===ur)return l.raw=t,l}}function Wt(t){var e=Kn.get(t);return e||(e=Vt(t),e&&Kn.put(t,e)),e}function Bt(t,e){return Yt(e).get(t)}function zt(e,i,n){var r=e;if("string"==typeof i&&(i=Vt(i)),!i||!m(e))return!1;for(var s,o,a=0,h=i.length;a<h;a++)s=e,o=i[a],"*"===o.charAt(0)&&(o=Yt(o.slice(1)).get.call(r,r)),a<h-1?(e=e[o],m(e)||(e={},t(s,o,e))):qi(e)?e.$set(o,n):o in e?e[o]=n:t(e,o,n);return!0}function Ut(){}function qt(t,e){var i=Or.length;return Or[i]=e?t.replace(wr,"\\n"):t,'"'+i+'"'}function Jt(t){var e=t.charAt(0),i=t.slice(1);return gr.test(i)?t:(i=i.indexOf('"')>-1?i.replace($r,Qt):i,e+"scope."+i)}function Qt(t,e){return Or[e]}function Gt(t){yr.test(t),Or.length=0;var e=t.replace(Cr,qt).replace(br,"");return e=(" "+e).replace(xr,Jt).replace($r,Qt),Zt(e)}function Zt(t){try{return new Function("scope","return "+t+";")}catch(t){return Ut}}function Xt(t){var e=Wt(t);if(e)return function(t,i){zt(t,e,i)}}function Yt(t,e){t=t.trim();var i=vr.get(t);if(i)return e&&!i.set&&(i.set=Xt(i.exp)),i;var n={exp:t};return n.get=Kt(t)&&t.indexOf("[")<0?Zt("scope."+t):Gt(t),e&&(n.set=Xt(t)),vr.put(t,n),n}function Kt(t){return kr.test(t)&&!Ar.test(t)&&"Math."!==t.slice(0,5)}function te(){Nr.length=0,jr.length=0,Er={},Fr={},Sr=!1}function ee(){for(var t=!0;t;)t=!1,ie(Nr),ie(jr),Nr.length?t=!0:(Gi&&Hn.devtools&&Gi.emit("flush"),te())}function ie(t){for(var e=0;e<t.length;e++){var i=t[e],n=i.id;Er[n]=null,i.run()}t.length=0}function ne(t){var e=t.id;if(null==Er[e]){var i=t.user?jr:Nr;Er[e]=i.length,i.push(t),Sr||(Sr=!0,an(ee))}}function re(t,e,i,n){n&&v(this,n);var r="function"==typeof e;if(this.vm=t,t._watchers.push(this),this.expression=e,this.cb=i,this.id=++Dr,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new hn,this.newDepIds=new hn,this.prevError=null,r)this.getter=e,this.setter=void 0;else{var s=Yt(e,this.twoWay);this.getter=s.get,this.setter=s.set}this.value=this.lazy?void 0:this.get(),this.queued=this.shallow=!1}function se(t,e){var i=void 0,n=void 0;e||(e=Pr,e.clear());var r=qi(t),s=m(t);if((r||s)&&Object.isExtensible(t)){if(t.__ob__){var o=t.__ob__.dep.id;if(e.has(o))return;e.add(o)}if(r)for(i=t.length;i--;)se(t[i],e);else if(s)for(n=Object.keys(t),i=n.length;i--;)se(t[n[i]],e)}}function oe(t){return dt(t)&&yt(t.content)}function ae(t,e){var i=e?t:t.trim(),n=Lr.get(i);if(n)return n;var r=document.createDocumentFragment(),s=t.match(Mr),o=Vr.test(t),a=Wr.test(t);if(s||o||a){var h=s&&s[1],l=Ir[h]||Ir.efault,c=l[0],u=l[1],f=l[2],p=document.createElement("div");for(p.innerHTML=u+t+f;c--;)p=p.lastChild;for(var d;d=p.firstChild;)r.appendChild(d)}else r.appendChild(document.createTextNode(t));return e||ft(r),Lr.put(i,r),r}function he(t){if(oe(t))return ae(t.innerHTML);if("SCRIPT"===t.tagName)return ae(t.textContent);for(var e,i=le(t),n=document.createDocumentFragment();e=i.firstChild;)n.appendChild(e);return ft(n),n}function le(t){if(!t.querySelectorAll)return t.cloneNode();var e,i,n,r=t.cloneNode(!0);if(Br){var s=r;if(oe(t)&&(t=t.content,s=r.content),i=t.querySelectorAll("template"),i.length)for(n=s.querySelectorAll("template"),e=n.length;e--;)n[e].parentNode.replaceChild(le(i[e]),n[e])}if(zr)if("TEXTAREA"===t.tagName)r.value=t.value;else if(i=t.querySelectorAll("textarea"),i.length)for(n=r.querySelectorAll("textarea"),e=n.length;e--;)n[e].value=i[e].value;return r}function ce(t,e,i){var n,r;return yt(t)?(ft(t),e?le(t):t):("string"==typeof t?i||"#"!==t.charAt(0)?r=ae(t,i):(r=Hr.get(t),r||(n=document.getElementById(t.slice(1)),n&&(r=he(n),Hr.put(t,r)))):t.nodeType&&(r=he(t)),r&&e?le(r):r)}function ue(t,e,i,n,r,s){this.children=[],this.childFrags=[],this.vm=e,this.scope=r,this.inserted=!1,this.parentFrag=s,s&&s.childFrags.push(this),this.unlink=t(e,i,n,r,this);var o=this.single=1===i.childNodes.length&&!i.childNodes[0].__v_anchor;o?(this.node=i.childNodes[0],this.before=fe,this.remove=pe):(this.node=vt("fragment-start"),this.end=vt("fragment-end"),this.frag=i,nt(this.node,i),i.appendChild(this.end),this.before=de,this.remove=ve),this.node.__v_frag=this}function fe(t,e){this.inserted=!0;var i=e!==!1?q:tt;i(this.node,t,this.vm),Z(this.node)&&this.callHook(me)}function pe(){this.inserted=!1;var t=Z(this.node),e=this;this.beforeRemove(),J(this.node,this.vm,function(){t&&e.callHook(ge),e.destroy()})}function de(t,e){this.inserted=!0;var i=this.vm,n=e!==!1?q:tt;gt(this.node,this.end,function(e){n(e,t,i)}),Z(this.node)&&this.callHook(me)}function ve(){this.inserted=!1;var t=this,e=Z(this.node);this.beforeRemove(),_t(this.node,this.end,this.vm,this.frag,function(){e&&t.callHook(ge),t.destroy()})}function me(t){!t._isAttached&&Z(t.$el)&&t._callHook("attached")}function ge(t){t._isAttached&&!Z(t.$el)&&t._callHook("detached")}function _e(t,e){this.vm=t;var i,n="string"==typeof e;n||dt(e)&&!e.hasAttribute("v-if")?i=ce(e,!0):(i=document.createDocumentFragment(),i.appendChild(e)),this.template=i;var r,s=t.constructor.cid;if(s>0){var o=s+(n?e:bt(e));r=Jr.get(o),r||(r=qe(i,t.$options,!0),Jr.put(o,r))}else r=qe(i,t.$options,!0);this.linker=r}function ye(t,e,i){var n=t.node.previousSibling;if(n){for(t=n.__v_frag;!(t&&t.forId===i&&t.inserted||n===e);){if(n=n.previousSibling,!n)return;t=n.__v_frag}return t}}function be(t){for(var e=-1,i=new Array(Math.floor(t));++e<t;)i[e]=e;return i}function we(t,e,i,n){return n?"$index"===n?t:n.charAt(0).match(/\w/)?Bt(i,n):i[n]:e||i}function Ce(t,e,i){for(var n,r,s,o=e?[]:null,a=0,h=t.options.length;a<h;a++)if(n=t.options[a],s=i?n.hasAttribute("selected"):n.selected){if(r=n.hasOwnProperty("_value")?n._value:n.value,!e)return r;o.push(r)}return o}function $e(t,e){for(var i=t.length;i--;)if(C(t[i],e))return i;return-1}function ke(t,e){var i=e.map(function(t){var e=t.charCodeAt(0);return e>47&&e<58?parseInt(t,10):1===t.length&&(e=t.toUpperCase().charCodeAt(0),e>64&&e<91)?e:ds[t]});return i=[].concat.apply([],i),function(e){if(i.indexOf(e.keyCode)>-1)return t.call(this,e)}}function xe(t){return function(e){return e.stopPropagation(),t.call(this,e)}}function Ae(t){return function(e){return e.preventDefault(),t.call(this,e)}}function Oe(t){return function(e){if(e.target===e.currentTarget)return t.call(this,e)}}function Te(t){if(ys[t])return ys[t];var e=Ne(t);return ys[t]=ys[e]=e,e}function Ne(t){t=u(t);var e=l(t),i=e.charAt(0).toUpperCase()+e.slice(1);bs||(bs=document.createElement("div"));var n,r=ms.length;if("filter"!==e&&e in bs.style)return{kebab:t,camel:e};for(;r--;)if(n=gs[r]+i,n in bs.style)return{kebab:ms[r]+t,camel:n}}function je(t){var e=[];if(qi(t))for(var i=0,n=t.length;i<n;i++){var r=t[i];if(r)if("string"==typeof r)e.push(r);else for(var s in r)r[s]&&e.push(s)}else if(m(t))for(var o in t)t[o]&&e.push(o);return e}function Ee(t,e,i){if(e=e.trim(),e.indexOf(" ")===-1)return void i(t,e);for(var n=e.split(/\s+/),r=0,s=n.length;r<s;r++)i(t,n[r])}function Fe(t,e,i){function n(){++s>=r?i():t[s].call(e,n)}var r=t.length,s=0;t[0].call(e,n)}function Se(t,e,i){for(var r,s,o,a,h,c,f,p=[],d=i.$options.propsData,v=Object.keys(e),m=v.length;m--;)s=v[m],r=e[s]||Rs,h=l(s),Ls.test(h)&&(f={name:s,path:h,options:r,mode:Ps.ONE_WAY,raw:null},o=u(s),null===(a=Y(t,o))&&(null!==(a=Y(t,o+".sync"))?f.mode=Ps.TWO_WAY:null!==(a=Y(t,o+".once"))&&(f.mode=Ps.ONE_TIME)),null!==a?(f.raw=a,c=H(a),a=c.expression,f.filters=c.filters,n(a)&&!c.filters?f.optimizedLiteral=!0:f.dynamic=!0,f.parentPath=a):null!==(a=X(t,o))?f.raw=a:d&&null!==(a=d[s]||d[h])&&(f.raw=a),p.push(f));return De(p)}function De(t){return function(e,n){e._props={};for(var r,s,l,c,f,p=e.$options.propsData,d=t.length;d--;)if(r=t[d],f=r.raw,s=r.path,l=r.options,e._props[s]=r,p&&i(p,s)&&Re(e,r,p[s]),null===f)Re(e,r,void 0);else if(r.dynamic)r.mode===Ps.ONE_TIME?(c=(n||e._context||e).$get(r.parentPath),Re(e,r,c)):e._context?e._bindDir({name:"prop",def:Is,prop:r},null,null,n):Re(e,r,e.$get(r.parentPath));else if(r.optimizedLiteral){var v=h(f);c=v===f?a(o(f)):v,Re(e,r,c)}else c=l.type===Boolean&&(""===f||f===u(r.name))||f,Re(e,r,c)}}function Pe(t,e,i,n){var r=e.dynamic&&Kt(e.parentPath),s=i;void 0===s&&(s=He(t,e)),s=Me(e,s,t);var o=s!==i;Ie(e,s,t)||(s=void 0),r&&!o?Ft(function(){n(s)}):n(s)}function Re(t,e,i){Pe(t,e,i,function(i){Lt(t,e.path,i)})}function Le(t,e,i){Pe(t,e,i,function(i){t[e.path]=i})}function He(t,e){var n=e.options;if(!i(n,"default"))return n.type!==Boolean&&void 0;var r=n.default;return m(r),"function"==typeof r&&n.type!==Function?r.call(t):r}function Ie(t,e,i){if(!t.options.required&&(null===t.raw||null==e))return!0;var n=t.options,r=n.type,s=!r,o=[];if(r){qi(r)||(r=[r]);for(var a=0;a<r.length&&!s;a++){var h=Ve(e,r[a]);o.push(h.expectedType),s=h.valid}}if(!s)return!1;var l=n.validator;return!(l&&!l(e))}function Me(t,e,i){var n=t.options.coerce;return n&&"function"==typeof n?n(e):e}function Ve(t,e){var i,n;return e===String?(n="string",i=typeof t===n):e===Number?(n="number",i=typeof t===n):e===Boolean?(n="boolean",i=typeof t===n):e===Function?(n="function",i=typeof t===n):e===Object?(n="object",i=g(t)):e===Array?(n="array",i=qi(t)):i=t instanceof e,{valid:i,expectedType:n}}function We(t){Ms.push(t),Vs||(Vs=!0,an(Be))}function Be(){for(var t=document.documentElement.offsetHeight,e=0;e<Ms.length;e++)Ms[e]();return Ms=[],Vs=!1,t}function ze(t,e,i,n){this.id=e,this.el=t,this.enterClass=i&&i.enterClass||e+"-enter",this.leaveClass=i&&i.leaveClass||e+"-leave",this.hooks=i,this.vm=n,this.pendingCssEvent=this.pendingCssCb=this.cancel=this.pendingJsCb=this.op=this.cb=null,this.justEntered=!1,this.entered=this.left=!1,this.typeCache={},this.type=i&&i.type;var r=this;["enterNextTick","enterDone","leaveNextTick","leaveDone"].forEach(function(t){r[t]=p(r[t],r)})}function Ue(t){if(/svg$/.test(t.namespaceURI)){var e=t.getBoundingClientRect();return!(e.width||e.height)}return!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)}function qe(t,e,i){var n=i||!e._asComponent?Ke(t,e):null,r=n&&n.terminal||mi(t)||!t.hasChildNodes()?null:si(t.childNodes,e);return function(t,e,i,s,o){var a=d(e.childNodes),h=Je(function(){n&&n(t,e,i,s,o),r&&r(t,a,i,s,o)},t);return Ge(t,h)}}function Je(t,e){e._directives=[];var i=e._directives.length;t();var n=e._directives.slice(i);Qe(n);for(var r=0,s=n.length;r<s;r++)n[r]._bind();return n}function Qe(t){if(0!==t.length){var e,i,n,r,s={};for(e=0,i=t.length;e<i;e++){var o=t[e],a=o.descriptor.def.priority||io,h=s[a];h||(h=s[a]=[]),h.push(o)}var l=0,c=Object.keys(s).sort(function(t,e){return t>e?-1:t===e?0:1});for(e=0,i=c.length;e<i;e++){var u=s[c[e]];for(n=0,r=u.length;n<r;n++)t[l++]=u[n]}}}function Ge(t,e,i,n){function r(r){Ze(t,e,r),i&&n&&Ze(i,n)}return r.dirs=e,r}function Ze(t,e,i){for(var n=e.length;n--;)e[n]._teardown()}function Xe(t,e,i,n){var r=Se(e,i,t),s=Je(function(){r(t,n)},t);return Ge(t,s)}function Ye(t,e,i){var n,r,s=e._containerAttrs,o=e._replacerAttrs;return 11!==t.nodeType&&(e._asComponent?(s&&i&&(n=fi(s,i)),o&&(r=fi(o,e))):r=fi(t.attributes,e)),e._containerAttrs=e._replacerAttrs=null,function(t,e,i){var s,o=t._context;o&&n&&(s=Je(function(){n(o,e,null,i)},o));var a=Je(function(){r&&r(t,e)},t);return Ge(t,a,o,s)}}function Ke(t,e){var i=t.nodeType;return 1!==i||mi(t)?3===i&&t.data.trim()?ei(t,e):null:ti(t,e)}function ti(t,e){if("TEXTAREA"===t.tagName){if(null!==X(t,"v-pre"))return ci;var i=V(t.value);i&&(t.setAttribute(":value",W(i)),t.value="")}var n,r=t.hasAttributes(),s=r&&d(t.attributes);return r&&(n=li(t,s,e)),n||(n=ai(t,e)),n||(n=hi(t,e)),!n&&r&&(n=fi(s,e)),n}function ei(t,e){if(t._skip)return ii;var i=V(t.wholeText);if(!i)return null;for(var n=t.nextSibling;n&&3===n.nodeType;)n._skip=!0,n=n.nextSibling;for(var r,s,o=document.createDocumentFragment(),a=0,h=i.length;a<h;a++)s=i[a],r=s.tag?ni(s,e):document.createTextNode(s.value),o.appendChild(r);return ri(i,o,e)}function ii(t,e){it(e)}function ni(t,e){function i(e){if(!t.descriptor){var i=H(t.value);t.descriptor={name:e,def:Fs[e],expression:i.expression,filters:i.filters}}}var n;return t.oneTime?n=document.createTextNode(t.value):t.html?(n=document.createComment("v-html"),i("html")):(n=document.createTextNode(" "),i("text")),n}function ri(t,e){return function(i,n,r,o){for(var a,h,l,c=e.cloneNode(!0),u=d(c.childNodes),f=0,p=t.length;f<p;f++)a=t[f],h=a.value,a.tag&&(l=u[f],a.oneTime?(h=(o||i).$eval(h),a.html?rt(l,ce(h,!0)):l.data=s(h)):i._bindDir(a.descriptor,l,r,o));rt(n,c)}}function si(t,e){for(var i,n,r,s=[],o=0,a=t.length;o<a;o++)r=t[o],i=Ke(r,e),n=i&&i.terminal||"SCRIPT"===r.tagName||!r.hasChildNodes()?null:si(r.childNodes,e),s.push(i,n);return s.length?oi(s):null}function oi(t){return function(e,i,n,r,s){for(var o,a,h,l=0,c=0,u=t.length;l<u;c++){o=i[c],a=t[l++],h=t[l++];var f=d(o.childNodes);a&&a(e,o,n,r,s),h&&h(e,f,n,r,s)}}}function ai(t,e){var i=t.tagName.toLowerCase();if(!Wn.test(i)){var n=jt(e,"elementDirectives",i);return n?ui(t,i,"",e,n):void 0}}function hi(t,e){var i=Ct(t,e);if(i){var n=mt(t),r={name:"component",ref:n,expression:i.id,def:Zs.component,modifiers:{literal:!i.dynamic}},s=function(t,e,i,s,o){n&&Lt((s||t).$refs,n,null),t._bindDir(r,e,i,s,o)};return s.terminal=!0,s}}function li(t,e,i){if(null!==X(t,"v-pre"))return ci;if(t.hasAttribute("v-else")){var n=t.previousElementSibling;if(n&&n.hasAttribute("v-if"))return ci}for(var r,s,o,a,h,l,c,u,f,p,d=0,v=e.length;d<v;d++)r=e[d],s=r.name.replace(to,""),(h=s.match(Ks))&&(f=jt(i,"directives",h[1]),f&&f.terminal&&(!p||(f.priority||no)>p.priority)&&(p=f,c=r.name,a=pi(r.name),o=r.value,l=h[1],u=h[2]));return p?ui(t,l,o,i,p,c,u,a):void 0}function ci(){}function ui(t,e,i,n,r,s,o,a){var h=H(i),l={name:e,arg:o,expression:h.expression,filters:h.filters,raw:i,attr:s,modifiers:a,def:r};"for"!==e&&"if"!==e&&"router-view"!==e||(l.ref=mt(t));var c=function(t,e,i,n,r){l.ref&&Lt((n||t).$refs,l.ref,null),t._bindDir(l,e,i,n,r)};return c.terminal=!0,c}function fi(t,e){function i(t,e,i){var n=i&&vi(i),r=!n&&H(s);v.push({name:t,attr:o,raw:a,def:e,arg:l,modifiers:c,expression:r&&r.expression,filters:r&&r.filters,interp:i,hasOneTime:n})}for(var n,r,s,o,a,h,l,c,u,f,p,d=t.length,v=[];d--;)if(n=t[d],r=o=n.name,s=a=n.value,f=V(s),l=null,c=pi(r),r=r.replace(to,""),f)s=W(f),l=r,i("bind",Fs.bind,f);else if(eo.test(r))c.literal=!Xs.test(r),i("transition",Zs.transition);else if(Ys.test(r))l=r.replace(Ys,""),i("on",Fs.on);else if(Xs.test(r))h=r.replace(Xs,""),"style"===h||"class"===h?i(h,Zs[h]):(l=h,i("bind",Fs.bind));else if(p=r.match(Ks)){if(h=p[1],l=p[2],"else"===h)continue;u=jt(e,"directives",h,!0),u&&i(h,u)}if(v.length)return di(v)}function pi(t){var e=Object.create(null),i=t.match(to);if(i)for(var n=i.length;n--;)e[i[n].slice(1)]=!0;return e}function di(t){return function(e,i,n,r,s){for(var o=t.length;o--;)e._bindDir(t[o],i,n,r,s)}}function vi(t){for(var e=t.length;e--;)if(t[e].oneTime)return!0}function mi(t){return"SCRIPT"===t.tagName&&(!t.hasAttribute("type")||"text/javascript"===t.getAttribute("type"))}function gi(t,e){return e&&(e._containerAttrs=yi(t)),dt(t)&&(t=ce(t)),e&&(e._asComponent&&!e.template&&(e.template="<slot></slot>"),e.template&&(e._content=ut(t),t=_i(t,e))),yt(t)&&(nt(vt("v-start",!0),t),t.appendChild(vt("v-end",!0))),t}function _i(t,e){var i=e.template,n=ce(i,!0);if(n){var r=n.firstChild;if(!r)return n;var s=r.tagName&&r.tagName.toLowerCase();return e.replace?(t===document.body,n.childNodes.length>1||1!==r.nodeType||"component"===s||jt(e,"components",s)||K(r,"is")||jt(e,"elementDirectives",s)||r.hasAttribute("v-for")||r.hasAttribute("v-if")?n:(e._replacerAttrs=yi(r),bi(t,r),r)):(t.appendChild(n),t)}}function yi(t){if(1===t.nodeType&&t.hasAttributes())return d(t.attributes)}function bi(t,e){for(var i,n,r=t.attributes,s=r.length;s--;)i=r[s].name,n=r[s].value,e.hasAttribute(i)||ro.test(i)?"class"===i&&!V(n)&&(n=n.trim())&&n.split(/\s+/).forEach(function(t){lt(e,t)}):e.setAttribute(i,n)}function wi(t,e){if(e){for(var i,n,r=t._slotContents=Object.create(null),s=0,o=e.children.length;s<o;s++)i=e.children[s],(n=i.getAttribute("slot"))&&(r[n]||(r[n]=[])).push(i);for(n in r)r[n]=Ci(r[n],e);if(e.hasChildNodes()){var a=e.childNodes;if(1===a.length&&3===a[0].nodeType&&!a[0].data.trim())return;r.default=Ci(e.childNodes,e)}}}function Ci(t,e){var i=document.createDocumentFragment();t=d(t);for(var n=0,r=t.length;n<r;n++){var s=t[n];!dt(s)||s.hasAttribute("v-if")||s.hasAttribute("v-for")||(e.removeChild(s),s=ce(s,!0)),i.appendChild(s)}return i}function $i(t){function e(){}function n(t,e){var i=new re(e,t,null,{lazy:!0});return function(){return i.dirty&&i.evaluate(),Et.target&&i.depend(),i.value}}Object.defineProperty(t.prototype,"$data",{get:function(){return this._data},set:function(t){t!==this._data&&this._setData(t)}}),t.prototype._initState=function(){this._initProps(),this._initMeta(),this._initMethods(),this._initData(),this._initComputed()},t.prototype._initProps=function(){var t=this.$options,e=t.el,i=t.props;e=t.el=G(e),this._propsUnlinkFn=e&&1===e.nodeType&&i?Xe(this,e,i,this._scope):null},t.prototype._initData=function(){var t=this.$options.data,e=this._data=t?t():{};g(e)||(e={});var n,r,s=this._props,o=Object.keys(e);for(n=o.length;n--;)r=o[n],s&&i(s,r)||this._proxy(r);Rt(e,this)},t.prototype._setData=function(t){t=t||{};var e=this._data;this._data=t;var n,r,s;for(n=Object.keys(e),s=n.length;s--;)r=n[s],r in t||this._unproxy(r);for(n=Object.keys(t),s=n.length;s--;)r=n[s],i(this,r)||this._proxy(r);e.__ob__.removeVm(this),Rt(t,this),this._digest()},t.prototype._proxy=function(t){if(!r(t)){var e=this;Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){return e._data[t]},set:function(i){e._data[t]=i}})}},t.prototype._unproxy=function(t){r(t)||delete this[t]},t.prototype._digest=function(){for(var t=0,e=this._watchers.length;t<e;t++)this._watchers[t].update(!0)},t.prototype._initComputed=function(){var t=this.$options.computed;if(t)for(var i in t){var r=t[i],s={enumerable:!0,configurable:!0};"function"==typeof r?(s.get=n(r,this),s.set=e):(s.get=r.get?r.cache!==!1?n(r.get,this):p(r.get,this):e,s.set=r.set?p(r.set,this):e),Object.defineProperty(this,i,s)}},t.prototype._initMethods=function(){var t=this.$options.methods;if(t)for(var e in t)this[e]=p(t[e],this)},t.prototype._initMeta=function(){var t=this.$options._meta;if(t)for(var e in t)Lt(this,e,t[e])}}function ki(t){function e(t,e){for(var i,n,r,s=e.attributes,o=0,a=s.length;o<a;o++)i=s[o].name,oo.test(i)&&(i=i.replace(oo,""),n=s[o].value,Kt(n)&&(n+=".apply(this, $arguments)"),r=(t._scope||t._context).$eval(n,!0),r._fromParent=!0,t.$on(i.replace(oo),r))}function i(t,e,i){if(i){var r,s,o,a;for(s in i)if(r=i[s],qi(r))for(o=0,a=r.length;o<a;o++)n(t,e,s,r[o]);else n(t,e,s,r)}}function n(t,e,i,r,s){var o=typeof r;if("function"===o)t[e](i,r,s);else if("string"===o){var a=t.$options.methods,h=a&&a[r];h&&t[e](i,h,s)}else r&&"object"===o&&n(t,e,i,r.handler,r)}function r(){this._isAttached||(this._isAttached=!0,this.$children.forEach(s))}function s(t){!t._isAttached&&Z(t.$el)&&t._callHook("attached")}function o(){this._isAttached&&(this._isAttached=!1,this.$children.forEach(a))}function a(t){t._isAttached&&!Z(t.$el)&&t._callHook("detached")}t.prototype._initEvents=function(){var t=this.$options;t._asComponent&&e(this,t.el),i(this,"$on",t.events),i(this,"$watch",t.watch)},t.prototype._initDOMHooks=function(){this.$on("hook:attached",r),this.$on("hook:detached",o)},t.prototype._callHook=function(t){this.$emit("pre-hook:"+t);var e=this.$options[t];if(e)for(var i=0,n=e.length;i<n;i++)e[i].call(this);this.$emit("hook:"+t)}}function xi(){}function Ai(t,e,i,n,r,s){this.vm=e,this.el=i,this.descriptor=t,this.name=t.name,this.expression=t.expression,this.arg=t.arg,this.modifiers=t.modifiers,this.filters=t.filters,this.literal=this.modifiers&&this.modifiers.literal,this._locked=!1,this._bound=!1,this._listeners=null,this._host=n,this._scope=r,this._frag=s}function Oi(t){t.prototype._updateRef=function(t){var e=this.$options._ref;if(e){var i=(this._scope||this._context).$refs;t?i[e]===this&&(i[e]=null):i[e]=this}},t.prototype._compile=function(t){var e=this.$options,i=t;if(t=gi(t,e),this._initElement(t),1!==t.nodeType||null===X(t,"v-pre")){var n=this._context&&this._context.$options,r=Ye(t,e,n);wi(this,e._content);var s,o=this.constructor;e._linkerCachable&&(s=o.linker,s||(s=o.linker=qe(t,e)));var a=r(this,t,this._scope),h=s?s(this,t):qe(t,e)(this,t);this._unlinkFn=function(){a(),h(!0)},
+e.replace&&rt(i,t),this._isCompiled=!0,this._callHook("compiled")}},t.prototype._initElement=function(t){yt(t)?(this._isFragment=!0,this.$el=this._fragmentStart=t.firstChild,this._fragmentEnd=t.lastChild,3===this._fragmentStart.nodeType&&(this._fragmentStart.data=this._fragmentEnd.data=""),this._fragment=t):this.$el=t,this.$el.__vue__=this,this._callHook("beforeCompile")},t.prototype._bindDir=function(t,e,i,n,r){this._directives.push(new Ai(t,this,e,i,n,r))},t.prototype._destroy=function(t,e){if(this._isBeingDestroyed)return void(e||this._cleanup());var i,n,r=this,s=function(){!i||n||e||r._cleanup()};t&&this.$el&&(n=!0,this.$remove(function(){n=!1,s()})),this._callHook("beforeDestroy"),this._isBeingDestroyed=!0;var o,a=this.$parent;for(a&&!a._isBeingDestroyed&&(a.$children.$remove(this),this._updateRef(!0)),o=this.$children.length;o--;)this.$children[o].$destroy();for(this._propsUnlinkFn&&this._propsUnlinkFn(),this._unlinkFn&&this._unlinkFn(),o=this._watchers.length;o--;)this._watchers[o].teardown();this.$el&&(this.$el.__vue__=null),i=!0,s()},t.prototype._cleanup=function(){this._isDestroyed||(this._frag&&this._frag.children.$remove(this),this._data&&this._data.__ob__&&this._data.__ob__.removeVm(this),this.$el=this.$parent=this.$root=this.$children=this._watchers=this._context=this._scope=this._directives=null,this._isDestroyed=!0,this._callHook("destroyed"),this.$off())}}function Ti(t){t.prototype._applyFilters=function(t,e,i,n){var r,s,o,a,h,l,c,u,f;for(l=0,c=i.length;l<c;l++)if(r=i[n?c-l-1:l],s=jt(this.$options,"filters",r.name,!0),s&&(s=n?s.write:s.read||s,"function"==typeof s)){if(o=n?[t,e]:[t],h=n?2:1,r.args)for(u=0,f=r.args.length;u<f;u++)a=r.args[u],o[u+h]=a.dynamic?this.$get(a.value):a.value;t=s.apply(this,o)}return t},t.prototype._resolveComponent=function(e,i){var n;if(n="function"==typeof e?e:jt(this.$options,"components",e,!0))if(n.options)i(n);else if(n.resolved)i(n.resolved);else if(n.requested)n.pendingCallbacks.push(i);else{n.requested=!0;var r=n.pendingCallbacks=[i];n.call(this,function(e){g(e)&&(e=t.extend(e)),n.resolved=e;for(var i=0,s=r.length;i<s;i++)r[i](e)},function(t){})}}}function Ni(t){function i(t){return JSON.parse(JSON.stringify(t))}t.prototype.$get=function(t,e){var i=Yt(t);if(i){if(e){var n=this;return function(){n.$arguments=d(arguments);var t=i.get.call(n,n);return n.$arguments=null,t}}try{return i.get.call(this,this)}catch(t){}}},t.prototype.$set=function(t,e){var i=Yt(t,!0);i&&i.set&&i.set.call(this,this,e)},t.prototype.$delete=function(t){e(this._data,t)},t.prototype.$watch=function(t,e,i){var n,r=this;"string"==typeof t&&(n=H(t),t=n.expression);var s=new re(r,t,e,{deep:i&&i.deep,sync:i&&i.sync,filters:n&&n.filters,user:!i||i.user!==!1});return i&&i.immediate&&e.call(r,s.value),function(){s.teardown()}},t.prototype.$eval=function(t,e){if(ao.test(t)){var i=H(t),n=this.$get(i.expression,e);return i.filters?this._applyFilters(n,null,i.filters):n}return this.$get(t,e)},t.prototype.$interpolate=function(t){var e=V(t),i=this;return e?1===e.length?i.$eval(e[0].value)+"":e.map(function(t){return t.tag?i.$eval(t.value):t.value}).join(""):t},t.prototype.$log=function(t){var e=t?Bt(this._data,t):this._data;if(e&&(e=i(e)),!t){var n;for(n in this.$options.computed)e[n]=i(this[n]);if(this._props)for(n in this._props)e[n]=i(this[n])}console.log(e)}}function ji(t){function e(t,e,n,r,s,o){e=i(e);var a=!Z(e),h=r===!1||a?s:o,l=!a&&!t._isAttached&&!Z(t.$el);return t._isFragment?(gt(t._fragmentStart,t._fragmentEnd,function(i){h(i,e,t)}),n&&n()):h(t.$el,e,t,n),l&&t._callHook("attached"),t}function i(t){return"string"==typeof t?document.querySelector(t):t}function n(t,e,i,n){e.appendChild(t),n&&n()}function r(t,e,i,n){tt(t,e),n&&n()}function s(t,e,i){it(t),i&&i()}t.prototype.$nextTick=function(t){an(t,this)},t.prototype.$appendTo=function(t,i,r){return e(this,t,i,r,n,U)},t.prototype.$prependTo=function(t,e,n){return t=i(t),t.hasChildNodes()?this.$before(t.firstChild,e,n):this.$appendTo(t,e,n),this},t.prototype.$before=function(t,i,n){return e(this,t,i,n,r,q)},t.prototype.$after=function(t,e,n){return t=i(t),t.nextSibling?this.$before(t.nextSibling,e,n):this.$appendTo(t.parentNode,e,n),this},t.prototype.$remove=function(t,e){if(!this.$el.parentNode)return t&&t();var i=this._isAttached&&Z(this.$el);i||(e=!1);var n=this,r=function(){i&&n._callHook("detached"),t&&t()};if(this._isFragment)_t(this._fragmentStart,this._fragmentEnd,this,this._fragment,r);else{var o=e===!1?s:J;o(this.$el,this,r)}return this}}function Ei(t){function e(t,e,n){var r=t.$parent;if(r&&n&&!i.test(e))for(;r;)r._eventsCount[e]=(r._eventsCount[e]||0)+n,r=r.$parent}t.prototype.$on=function(t,i){return(this._events[t]||(this._events[t]=[])).push(i),e(this,t,1),this},t.prototype.$once=function(t,e){function i(){n.$off(t,i),e.apply(this,arguments)}var n=this;return i.fn=e,this.$on(t,i),this},t.prototype.$off=function(t,i){var n;if(!arguments.length){if(this.$parent)for(t in this._events)n=this._events[t],n&&e(this,t,-n.length);return this._events={},this}if(n=this._events[t],!n)return this;if(1===arguments.length)return e(this,t,-n.length),this._events[t]=null,this;for(var r,s=n.length;s--;)if(r=n[s],r===i||r.fn===i){e(this,t,-1),n.splice(s,1);break}return this},t.prototype.$emit=function(t){var e="string"==typeof t;t=e?t:t.name;var i=this._events[t],n=e||!i;if(i){i=i.length>1?d(i):i;var r=e&&i.some(function(t){return t._fromParent});r&&(n=!1);for(var s=d(arguments,1),o=0,a=i.length;o<a;o++){var h=i[o],l=h.apply(this,s);l!==!0||r&&!h._fromParent||(n=!0)}}return n},t.prototype.$broadcast=function(t){var e="string"==typeof t;if(t=e?t:t.name,this._eventsCount[t]){var i=this.$children,n=d(arguments);e&&(n[0]={name:t,source:this});for(var r=0,s=i.length;r<s;r++){var o=i[r],a=o.$emit.apply(o,n);a&&o.$broadcast.apply(o,n)}return this}},t.prototype.$dispatch=function(t){var e=this.$emit.apply(this,arguments);if(e){var i=this.$parent,n=d(arguments);for(n[0]={name:t,source:this};i;)e=i.$emit.apply(i,n),i=e?i.$parent:null;return this}};var i=/^hook:/}function Fi(t){function e(){this._isAttached=!0,this._isReady=!0,this._callHook("ready")}t.prototype.$mount=function(t){if(!this._isCompiled)return t=G(t),t||(t=document.createElement("div")),this._compile(t),this._initDOMHooks(),Z(this.$el)?(this._callHook("attached"),e.call(this)):this.$once("hook:attached",e),this},t.prototype.$destroy=function(t,e){this._destroy(t,e)},t.prototype.$compile=function(t,e,i,n){return qe(t,this.$options,!0)(this,t,e,i,n)}}function Si(t){this._init(t)}function Di(t,e,i){return i=i?parseInt(i,10):0,e=o(e),"number"==typeof e?t.slice(i,i+e):t}function Pi(t,e,i){if(t=uo(t),null==e)return t;if("function"==typeof e)return t.filter(e);e=(""+e).toLowerCase();for(var n,r,s,o,a="in"===i?3:2,h=Array.prototype.concat.apply([],d(arguments,a)),l=[],c=0,u=t.length;c<u;c++)if(n=t[c],s=n&&n.$value||n,o=h.length){for(;o--;)if(r=h[o],"$key"===r&&Li(n.$key,e)||Li(Bt(s,r),e)){l.push(n);break}}else Li(n,e)&&l.push(n);return l}function Ri(t){function e(t,e,i){var r=n[i];return r&&("$key"!==r&&(m(t)&&"$value"in t&&(t=t.$value),m(e)&&"$value"in e&&(e=e.$value)),t=m(t)?Bt(t,r):t,e=m(e)?Bt(e,r):e),t===e?0:t>e?s:-s}var i=null,n=void 0;t=uo(t);var r=d(arguments,1),s=r[r.length-1];"number"==typeof s?(s=s<0?-1:1,r=r.length>1?r.slice(0,-1):r):s=1;var o=r[0];return o?("function"==typeof o?i=function(t,e){return o(t,e)*s}:(n=Array.prototype.concat.apply([],r),i=function(t,r,s){return s=s||0,s>=n.length-1?e(t,r,s):e(t,r,s)||i(t,r,s+1)}),t.slice().sort(i)):t}function Li(t,e){var i;if(g(t)){var n=Object.keys(t);for(i=n.length;i--;)if(Li(t[n[i]],e))return!0}else if(qi(t)){for(i=t.length;i--;)if(Li(t[i],e))return!0}else if(null!=t)return t.toString().toLowerCase().indexOf(e)>-1}function Hi(i){function n(t){return new Function("return function "+f(t)+" (options) { this._init(options) }")()}i.options={directives:Fs,elementDirectives:co,filters:po,transitions:{},components:{},partials:{},replace:!0},i.util=Xn,i.config=Hn,i.set=t,i.delete=e,i.nextTick=an,i.compiler=so,i.FragmentFactory=_e,i.internalDirectives=Zs,i.parsers={path:dr,text:Pn,template:Ur,directive:Nn,expression:Tr},i.cid=0;var r=1;i.extend=function(t){t=t||{};var e=this,i=0===e.cid;if(i&&t._Ctor)return t._Ctor;var s=t.name||e.options.name,o=n(s||"VueComponent");return o.prototype=Object.create(e.prototype),o.prototype.constructor=o,o.cid=r++,o.options=Nt(e.options,t),o.super=e,o.extend=e.extend,Hn._assetTypes.forEach(function(t){o[t]=e[t]}),s&&(o.options.components[s]=o),i&&(t._Ctor=o),o},i.use=function(t){if(!t.installed){var e=d(arguments,1);return e.unshift(this),"function"==typeof t.install?t.install.apply(t,e):t.apply(null,e),t.installed=!0,this}},i.mixin=function(t){i.options=Nt(i.options,t)},Hn._assetTypes.forEach(function(t){i[t]=function(e,n){return n?("component"===t&&g(n)&&(n.name||(n.name=e),n=i.extend(n)),this.options[t+"s"][e]=n,n):this.options[t+"s"][e]}}),v(i.transition,Mn)}var Ii=Object.prototype.hasOwnProperty,Mi=/^\s?(true|false|-?[\d\.]+|'[^']*'|"[^"]*")\s?$/,Vi=/-(\w)/g,Wi=/([^-])([A-Z])/g,Bi=/(?:^|[-_\/])(\w)/g,zi=Object.prototype.toString,Ui="[object Object]",qi=Array.isArray,Ji="__proto__"in{},Qi="undefined"!=typeof window&&"[object Object]"!==Object.prototype.toString.call(window),Gi=Qi&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__,Zi=Qi&&window.navigator.userAgent.toLowerCase(),Xi=Zi&&Zi.indexOf("trident")>0,Yi=Zi&&Zi.indexOf("msie 9.0")>0,Ki=Zi&&Zi.indexOf("android")>0,tn=void 0,en=void 0,nn=void 0,rn=void 0;if(Qi&&!Yi){var sn=void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend,on=void 0===window.onanimationend&&void 0!==window.onwebkitanimationend;tn=sn?"WebkitTransition":"transition",en=sn?"webkitTransitionEnd":"transitionend",nn=on?"WebkitAnimation":"animation",rn=on?"webkitAnimationEnd":"animationend"}var an=function(){function t(){n=!1;var t=i.slice(0);i=[];for(var e=0;e<t.length;e++)t[e]()}var e,i=[],n=!1;return!Qi||!window.postMessage||window.importScripts||Ki&&!window.requestAnimationFrame?e="undefined"!=typeof global&&global.setImmediate||setTimeout:!function(){var i="__vue__nextTick__";window.addEventListener("message",function(e){e.source===window&&e.data===i&&t()}),e=function(){window.postMessage(i,"*")}}(),function(r,s){var o=s?function(){r.call(s)}:r;i.push(o),n||(n=!0,e(t,0))}}(),hn=void 0;"undefined"!=typeof Set&&Set.toString().match(/native code/)?hn=Set:(hn=function(){this.set=Object.create(null)},hn.prototype.has=function(t){return void 0!==this.set[t]},hn.prototype.add=function(t){this.set[t]=1},hn.prototype.clear=function(){this.set=Object.create(null)});var ln=$.prototype;ln.put=function(t,e){var i,n=this.get(t,!0);return n||(this.size===this.limit&&(i=this.shift()),n={key:t},this._keymap[t]=n,this.tail?(this.tail.newer=n,n.older=this.tail):this.head=n,this.tail=n,this.size++),n.value=e,i},ln.shift=function(){var t=this.head;return t&&(this.head=this.head.newer,this.head.older=void 0,t.newer=t.older=void 0,this._keymap[t.key]=void 0,this.size--),t},ln.get=function(t,e){var i=this._keymap[t];if(void 0!==i)return i===this.tail?e?i:i.value:(i.newer&&(i===this.head&&(this.head=i.newer),i.newer.older=i.older),i.older&&(i.older.newer=i.newer),i.newer=void 0,i.older=this.tail,this.tail&&(this.tail.newer=i),this.tail=i,e?i:i.value)};var cn,un,fn,pn,dn,vn,mn=new $(1e3),gn=/^in$|^-?\d+/,_n=0,yn=1,bn=2,wn=3,Cn=34,$n=39,kn=124,xn=92,An=32,On={91:1,123:1,40:1},Tn={91:93,123:125,40:41},Nn=Object.freeze({parseDirective:H}),jn=/[-.*+?^${}()|[\]\/\\]/g,En=void 0,Fn=void 0,Sn=void 0,Dn=/[^|]\|[^|]/,Pn=Object.freeze({compileRegex:M,parseText:V,tokensToExp:W}),Rn=["{{","}}"],Ln=["{{{","}}}"],Hn=Object.defineProperties({debug:!1,silent:!1,async:!0,warnExpressionErrors:!0,devtools:!1,_delimitersChanged:!0,_assetTypes:["component","directive","elementDirective","filter","transition","partial"],_propBindingModes:{ONE_WAY:0,TWO_WAY:1,ONE_TIME:2},_maxUpdateCount:100},{delimiters:{get:function(){return Rn},set:function(t){Rn=t,M()},configurable:!0,enumerable:!0},unsafeDelimiters:{get:function(){return Ln},set:function(t){Ln=t,M()},configurable:!0,enumerable:!0}}),In=void 0,Mn=Object.freeze({appendWithTransition:U,beforeWithTransition:q,removeWithTransition:J,applyTransition:Q}),Vn=/^v-ref:/,Wn=/^(div|p|span|img|a|b|i|br|ul|ol|li|h1|h2|h3|h4|h5|h6|code|pre|table|th|td|tr|form|label|input|select|option|nav|article|section|header|footer)$/i,Bn=/^(slot|partial|component)$/i,zn=Hn.optionMergeStrategies=Object.create(null);zn.data=function(t,e,i){return i?t||e?function(){var n="function"==typeof e?e.call(i):e,r="function"==typeof t?t.call(i):void 0;return n?kt(n,r):r}:void 0:e?"function"!=typeof e?t:t?function(){return kt(e.call(this),t.call(this))}:e:t},zn.el=function(t,e,i){if(i||!e||"function"==typeof e){var n=e||t;return i&&"function"==typeof n?n.call(i):n}},zn.init=zn.created=zn.ready=zn.attached=zn.detached=zn.beforeCompile=zn.compiled=zn.beforeDestroy=zn.destroyed=zn.activate=function(t,e){return e?t?t.concat(e):qi(e)?e:[e]:t},Hn._assetTypes.forEach(function(t){zn[t+"s"]=xt}),zn.watch=zn.events=function(t,e){if(!e)return t;if(!t)return e;var i={};v(i,t);for(var n in e){var r=i[n],s=e[n];r&&!qi(r)&&(r=[r]),i[n]=r?r.concat(s):[s]}return i},zn.props=zn.methods=zn.computed=function(t,e){if(!e)return t;if(!t)return e;var i=Object.create(null);return v(i,t),v(i,e),i};var Un=function(t,e){return void 0===e?t:e},qn=0;Et.target=null,Et.prototype.addSub=function(t){this.subs.push(t)},Et.prototype.removeSub=function(t){this.subs.$remove(t)},Et.prototype.depend=function(){Et.target.addDep(this)},Et.prototype.notify=function(){for(var t=d(this.subs),e=0,i=t.length;e<i;e++)t[e].update()};var Jn=Array.prototype,Qn=Object.create(Jn);["push","pop","shift","unshift","splice","sort","reverse"].forEach(function(t){var e=Jn[t];_(Qn,t,function(){for(var i=arguments.length,n=new Array(i);i--;)n[i]=arguments[i];var r,s=e.apply(this,n),o=this.__ob__;switch(t){case"push":r=n;break;case"unshift":r=n;break;case"splice":r=n.slice(2)}return r&&o.observeArray(r),o.dep.notify(),s})}),_(Jn,"$set",function(t,e){return t>=this.length&&(this.length=Number(t)+1),this.splice(t,1,e)[0]}),_(Jn,"$remove",function(t){if(this.length){var e=b(this,t);return e>-1?this.splice(e,1):void 0}});var Gn=Object.getOwnPropertyNames(Qn),Zn=!0;St.prototype.walk=function(t){for(var e=Object.keys(t),i=0,n=e.length;i<n;i++)this.convert(e[i],t[e[i]])},St.prototype.observeArray=function(t){for(var e=0,i=t.length;e<i;e++)Rt(t[e])},St.prototype.convert=function(t,e){Lt(this.value,t,e)},St.prototype.addVm=function(t){(this.vms||(this.vms=[])).push(t)},St.prototype.removeVm=function(t){this.vms.$remove(t)};var Xn=Object.freeze({defineReactive:Lt,set:t,del:e,hasOwn:i,isLiteral:n,isReserved:r,_toString:s,toNumber:o,toBoolean:a,stripQuotes:h,camelize:l,hyphenate:u,classify:f,bind:p,toArray:d,extend:v,isObject:m,isPlainObject:g,def:_,debounce:y,indexOf:b,cancellable:w,looseEqual:C,isArray:qi,hasProto:Ji,inBrowser:Qi,devtools:Gi,isIE:Xi,isIE9:Yi,isAndroid:Ki,get transitionProp(){return tn},get transitionEndEvent(){return en},get animationProp(){return nn},get animationEndEvent(){return rn},nextTick:an,get _Set(){return hn},query:G,inDoc:Z,getAttr:X,getBindAttr:Y,hasBindAttr:K,before:tt,after:et,remove:it,prepend:nt,replace:rt,on:st,off:ot,setClass:ht,addClass:lt,removeClass:ct,extractContent:ut,trimNode:ft,isTemplate:dt,createAnchor:vt,findRef:mt,mapNodeRange:gt,removeNodeRange:_t,isFragment:yt,getOuterHTML:bt,findVmFromFrag:wt,mergeOptions:Nt,resolveAsset:jt,checkComponentAttr:Ct,commonTagRE:Wn,reservedTagRE:Bn,warn:In}),Yn=0,Kn=new $(1e3),tr=0,er=1,ir=2,nr=3,rr=0,sr=1,or=2,ar=3,hr=4,lr=5,cr=6,ur=7,fr=8,pr=[];pr[rr]={ws:[rr],ident:[ar,tr],"[":[hr],eof:[ur]},pr[sr]={ws:[sr],".":[or],"[":[hr],eof:[ur]},pr[or]={ws:[or],ident:[ar,tr]},pr[ar]={ident:[ar,tr],0:[ar,tr],number:[ar,tr],ws:[sr,er],".":[or,er],"[":[hr,er],eof:[ur,er]},pr[hr]={"'":[lr,tr],'"':[cr,tr],"[":[hr,ir],"]":[sr,nr],eof:fr,else:[hr,tr]},pr[lr]={"'":[hr,tr],eof:fr,else:[lr,tr]},pr[cr]={'"':[hr,tr],eof:fr,else:[cr,tr]};var dr=Object.freeze({parsePath:Wt,getPath:Bt,setPath:zt}),vr=new $(1e3),mr="Math,Date,this,true,false,null,undefined,Infinity,NaN,isNaN,isFinite,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,parseInt,parseFloat",gr=new RegExp("^("+mr.replace(/,/g,"\\b|")+"\\b)"),_r="break,case,class,catch,const,continue,debugger,default,delete,do,else,export,extends,finally,for,function,if,import,in,instanceof,let,return,super,switch,throw,try,var,while,with,yield,enum,await,implements,package,protected,static,interface,private,public",yr=new RegExp("^("+_r.replace(/,/g,"\\b|")+"\\b)"),br=/\s/g,wr=/\n/g,Cr=/[\{,]\s*[\w\$_]+\s*:|('(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*\$\{|\}(?:[^`\\"']|\\.)*`|`(?:[^`\\]|\\.)*`)|new |typeof |void /g,$r=/"(\d+)"/g,kr=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['.*?'\]|\[".*?"\]|\[\d+\]|\[[A-Za-z_$][\w$]*\])*$/,xr=/[^\w$\.](?:[A-Za-z_$][\w$]*)/g,Ar=/^(?:true|false|null|undefined|Infinity|NaN)$/,Or=[],Tr=Object.freeze({parseExpression:Yt,isSimplePath:Kt}),Nr=[],jr=[],Er={},Fr={},Sr=!1,Dr=0;re.prototype.get=function(){this.beforeGet();var t,e=this.scope||this.vm;try{t=this.getter.call(e,e)}catch(t){}return this.deep&&se(t),this.preProcess&&(t=this.preProcess(t)),this.filters&&(t=e._applyFilters(t,null,this.filters,!1)),this.postProcess&&(t=this.postProcess(t)),this.afterGet(),t},re.prototype.set=function(t){var e=this.scope||this.vm;this.filters&&(t=e._applyFilters(t,this.value,this.filters,!0));try{this.setter.call(e,e,t)}catch(t){}var i=e.$forContext;if(i&&i.alias===this.expression){if(i.filters)return;i._withLock(function(){e.$key?i.rawValue[e.$key]=t:i.rawValue.$set(e.$index,t)})}},re.prototype.beforeGet=function(){Et.target=this},re.prototype.addDep=function(t){var e=t.id;this.newDepIds.has(e)||(this.newDepIds.add(e),this.newDeps.push(t),this.depIds.has(e)||t.addSub(this))},re.prototype.afterGet=function(){Et.target=null;for(var t=this.deps.length;t--;){var e=this.deps[t];this.newDepIds.has(e.id)||e.removeSub(this)}var i=this.depIds;this.depIds=this.newDepIds,this.newDepIds=i,this.newDepIds.clear(),i=this.deps,this.deps=this.newDeps,this.newDeps=i,this.newDeps.length=0},re.prototype.update=function(t){this.lazy?this.dirty=!0:this.sync||!Hn.async?this.run():(this.shallow=this.queued?!!t&&this.shallow:!!t,this.queued=!0,ne(this))},re.prototype.run=function(){if(this.active){var t=this.get();if(t!==this.value||(m(t)||this.deep)&&!this.shallow){var e=this.value;this.value=t;this.prevError;this.cb.call(this.vm,t,e)}this.queued=this.shallow=!1}},re.prototype.evaluate=function(){var t=Et.target;this.value=this.get(),this.dirty=!1,Et.target=t},re.prototype.depend=function(){for(var t=this.deps.length;t--;)this.deps[t].depend()},re.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||this.vm._vForRemoving||this.vm._watchers.$remove(this);for(var t=this.deps.length;t--;)this.deps[t].removeSub(this);this.active=!1,this.vm=this.cb=this.value=null}};var Pr=new hn,Rr={bind:function(){this.attr=3===this.el.nodeType?"data":"textContent"},update:function(t){this.el[this.attr]=s(t)}},Lr=new $(1e3),Hr=new $(1e3),Ir={efault:[0,"",""],legend:[1,"<fieldset>","</fieldset>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]};Ir.td=Ir.th=[3,"<table><tbody><tr>","</tr></tbody></table>"],Ir.option=Ir.optgroup=[1,'<select multiple="multiple">',"</select>"],Ir.thead=Ir.tbody=Ir.colgroup=Ir.caption=Ir.tfoot=[1,"<table>","</table>"],Ir.g=Ir.defs=Ir.symbol=Ir.use=Ir.image=Ir.text=Ir.circle=Ir.ellipse=Ir.line=Ir.path=Ir.polygon=Ir.polyline=Ir.rect=[1,'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ev="http://www.w3.org/2001/xml-events"version="1.1">',"</svg>"];var Mr=/<([\w:-]+)/,Vr=/&#?\w+?;/,Wr=/<!--/,Br=function(){if(Qi){var t=document.createElement("div");return t.innerHTML="<template>1</template>",!t.cloneNode(!0).firstChild.innerHTML}return!1}(),zr=function(){if(Qi){var t=document.createElement("textarea");return t.placeholder="t","t"===t.cloneNode(!0).value}return!1}(),Ur=Object.freeze({cloneNode:le,parseTemplate:ce}),qr={bind:function(){8===this.el.nodeType&&(this.nodes=[],this.anchor=vt("v-html"),rt(this.el,this.anchor))},update:function(t){t=s(t),this.nodes?this.swap(t):this.el.innerHTML=t},swap:function(t){for(var e=this.nodes.length;e--;)it(this.nodes[e]);var i=ce(t,!0,!0);this.nodes=d(i.childNodes),tt(i,this.anchor)}};ue.prototype.callHook=function(t){var e,i;for(e=0,i=this.childFrags.length;e<i;e++)this.childFrags[e].callHook(t);for(e=0,i=this.children.length;e<i;e++)t(this.children[e])},ue.prototype.beforeRemove=function(){var t,e;for(t=0,e=this.childFrags.length;t<e;t++)this.childFrags[t].beforeRemove(!1);for(t=0,e=this.children.length;t<e;t++)this.children[t].$destroy(!1,!0);var i=this.unlink.dirs;for(t=0,e=i.length;t<e;t++)i[t]._watcher&&i[t]._watcher.teardown()},ue.prototype.destroy=function(){this.parentFrag&&this.parentFrag.childFrags.$remove(this),this.node.__v_frag=null,this.unlink()};var Jr=new $(5e3);_e.prototype.create=function(t,e,i){var n=le(this.template);return new ue(this.linker,this.vm,n,t,e,i)};var Qr=700,Gr=800,Zr=850,Xr=1100,Yr=1500,Kr=1500,ts=1750,es=2100,is=2200,ns=2300,rs=0,ss={priority:is,terminal:!0,params:["track-by","stagger","enter-stagger","leave-stagger"],bind:function(){var t=this.expression.match(/(.*) (?:in|of) (.*)/);if(t){var e=t[1].match(/\((.*),(.*)\)/);e?(this.iterator=e[1].trim(),this.alias=e[2].trim()):this.alias=t[1].trim(),this.expression=t[2]}if(this.alias){this.id="__v-for__"+ ++rs;var i=this.el.tagName;this.isOption=("OPTION"===i||"OPTGROUP"===i)&&"SELECT"===this.el.parentNode.tagName,this.start=vt("v-for-start"),this.end=vt("v-for-end"),rt(this.el,this.end),tt(this.start,this.end),this.cache=Object.create(null),this.factory=new _e(this.vm,this.el)}},update:function(t){this.diff(t),this.updateRef(),this.updateModel()},diff:function(t){var e,n,r,s,o,a,h=t[0],l=this.fromObject=m(h)&&i(h,"$key")&&i(h,"$value"),c=this.params.trackBy,u=this.frags,f=this.frags=new Array(t.length),p=this.alias,d=this.iterator,v=this.start,g=this.end,_=Z(v),y=!u;for(e=0,n=t.length;e<n;e++)h=t[e],s=l?h.$key:null,o=l?h.$value:h,a=!m(o),r=!y&&this.getCachedFrag(o,e,s),r?(r.reused=!0,r.scope.$index=e,s&&(r.scope.$key=s),d&&(r.scope[d]=null!==s?s:e),(c||l||a)&&Ft(function(){r.scope[p]=o})):(r=this.create(o,p,e,s),r.fresh=!y),f[e]=r,y&&r.before(g);if(!y){var b=0,w=u.length-f.length;for(this.vm._vForRemoving=!0,e=0,n=u.length;e<n;e++)r=u[e],r.reused||(this.deleteCachedFrag(r),this.remove(r,b++,w,_));this.vm._vForRemoving=!1,b&&(this.vm._watchers=this.vm._watchers.filter(function(t){return t.active}));var C,$,k,x=0;for(e=0,n=f.length;e<n;e++)r=f[e],C=f[e-1],$=C?C.staggerCb?C.staggerAnchor:C.end||C.node:v,r.reused&&!r.staggerCb?(k=ye(r,v,this.id),k===C||k&&ye(k,v,this.id)===C||this.move(r,$)):this.insert(r,x++,$,_),r.reused=r.fresh=!1}},create:function(t,e,i,n){var r=this._host,s=this._scope||this.vm,o=Object.create(s);o.$refs=Object.create(s.$refs),o.$els=Object.create(s.$els),o.$parent=s,o.$forContext=this,Ft(function(){Lt(o,e,t)}),Lt(o,"$index",i),n?Lt(o,"$key",n):o.$key&&_(o,"$key",null),this.iterator&&Lt(o,this.iterator,null!==n?n:i);var a=this.factory.create(r,o,this._frag);return a.forId=this.id,this.cacheFrag(t,a,i,n),a},updateRef:function(){var t=this.descriptor.ref;if(t){var e,i=(this._scope||this.vm).$refs;this.fromObject?(e={},this.frags.forEach(function(t){e[t.scope.$key]=wt(t)})):e=this.frags.map(wt),i[t]=e}},updateModel:function(){if(this.isOption){var t=this.start.parentNode,e=t&&t.__v_model;e&&e.forceUpdate()}},insert:function(t,e,i,n){t.staggerCb&&(t.staggerCb.cancel(),t.staggerCb=null);var r=this.getStagger(t,e,null,"enter");if(n&&r){var s=t.staggerAnchor;s||(s=t.staggerAnchor=vt("stagger-anchor"),s.__v_frag=t),et(s,i);var o=t.staggerCb=w(function(){t.staggerCb=null,t.before(s),it(s)});setTimeout(o,r)}else{var a=i.nextSibling;a||(et(this.end,i),a=this.end),t.before(a)}},remove:function(t,e,i,n){if(t.staggerCb)return t.staggerCb.cancel(),void(t.staggerCb=null);var r=this.getStagger(t,e,i,"leave");if(n&&r){var s=t.staggerCb=w(function(){t.staggerCb=null,t.remove()});setTimeout(s,r)}else t.remove()},move:function(t,e){e.nextSibling||this.end.parentNode.appendChild(this.end),t.before(e.nextSibling,!1)},cacheFrag:function(t,e,n,r){var s,o=this.params.trackBy,a=this.cache,h=!m(t);r||o||h?(s=we(n,r,t,o),a[s]||(a[s]=e)):(s=this.id,i(t,s)?null===t[s]&&(t[s]=e):Object.isExtensible(t)&&_(t,s,e)),e.raw=t},getCachedFrag:function(t,e,i){var n,r=this.params.trackBy,s=!m(t);if(i||r||s){var o=we(e,i,t,r);n=this.cache[o]}else n=t[this.id];return n&&(n.reused||n.fresh),n},deleteCachedFrag:function(t){var e=t.raw,n=this.params.trackBy,r=t.scope,s=r.$index,o=i(r,"$key")&&r.$key,a=!m(e);if(n||o||a){var h=we(s,o,e,n);this.cache[h]=null}else e[this.id]=null,t.raw=null},getStagger:function(t,e,i,n){n+="Stagger";var r=t.node.__v_trans,s=r&&r.hooks,o=s&&(s[n]||s.stagger);return o?o.call(t,e,i):e*parseInt(this.params[n]||this.params.stagger,10)},_preProcess:function(t){return this.rawValue=t,t},_postProcess:function(t){if(qi(t))return t;if(g(t)){for(var e,i=Object.keys(t),n=i.length,r=new Array(n);n--;)e=i[n],r[n]={$key:e,$value:t[e]};return r}return"number"!=typeof t||isNaN(t)||(t=be(t)),t||[]},unbind:function(){if(this.descriptor.ref&&((this._scope||this.vm).$refs[this.descriptor.ref]=null),this.frags)for(var t,e=this.frags.length;e--;)t=this.frags[e],this.deleteCachedFrag(t),t.destroy()}},os={priority:es,terminal:!0,bind:function(){var t=this.el;if(t.__vue__)this.invalid=!0;else{var e=t.nextElementSibling;e&&null!==X(e,"v-else")&&(it(e),this.elseEl=e),this.anchor=vt("v-if"),rt(t,this.anchor)}},update:function(t){this.invalid||(t?this.frag||(this.insert(),this.updateRef(t)):(this.updateRef(t),this.remove()))},insert:function(){this.elseFrag&&(this.elseFrag.remove(),this.elseFrag=null),this.factory||(this.factory=new _e(this.vm,this.el)),this.frag=this.factory.create(this._host,this._scope,this._frag),this.frag.before(this.anchor)},remove:function(){this.frag&&(this.frag.remove(),this.frag=null),this.elseEl&&!this.elseFrag&&(this.elseFactory||(this.elseFactory=new _e(this.elseEl._context||this.vm,this.elseEl)),this.elseFrag=this.elseFactory.create(this._host,this._scope,this._frag),this.elseFrag.before(this.anchor))},updateRef:function(t){var e=this.descriptor.ref;if(e){var i=(this.vm||this._scope).$refs,n=i[e],r=this._frag.scope.$key;n&&(t?Array.isArray(n)?n.push(wt(this._frag)):n[r]=wt(this._frag):Array.isArray(n)?n.$remove(wt(this._frag)):(n[r]=null,delete n[r]))}},unbind:function(){this.frag&&this.frag.destroy(),this.elseFrag&&this.elseFrag.destroy()}},as={bind:function(){var t=this.el.nextElementSibling;t&&null!==X(t,"v-else")&&(this.elseEl=t)},update:function(t){this.apply(this.el,t),this.elseEl&&this.apply(this.elseEl,!t)},apply:function(t,e){function i(){t.style.display=e?"":"none"}Z(t)?Q(t,e?1:-1,i,this.vm):i()}},hs={bind:function(){var t=this,e=this.el,i="range"===e.type,n=this.params.lazy,r=this.params.number,s=this.params.debounce,a=!1;if(Ki||i||(this.on("compositionstart",function(){a=!0}),this.on("compositionend",function(){a=!1,n||t.listener()})),this.focused=!1,i||n||(this.on("focus",function(){t.focused=!0}),this.on("blur",function(){t.focused=!1,t._frag&&!t._frag.inserted||t.rawListener()})),this.listener=this.rawListener=function(){if(!a&&t._bound){var n=r||i?o(e.value):e.value;t.set(n),an(function(){t._bound&&!t.focused&&t.update(t._watcher.value)})}},s&&(this.listener=y(this.listener,s)),this.hasjQuery="function"==typeof jQuery,this.hasjQuery){var h=jQuery.fn.on?"on":"bind";jQuery(e)[h]("change",this.rawListener),n||jQuery(e)[h]("input",this.listener)}else this.on("change",this.rawListener),n||this.on("input",this.listener);!n&&Yi&&(this.on("cut",function(){an(t.listener)}),this.on("keyup",function(e){46!==e.keyCode&&8!==e.keyCode||t.listener()})),(e.hasAttribute("value")||"TEXTAREA"===e.tagName&&e.value.trim())&&(this.afterBind=this.listener)},update:function(t){t=s(t),t!==this.el.value&&(this.el.value=t)},unbind:function(){var t=this.el;if(this.hasjQuery){var e=jQuery.fn.off?"off":"unbind";jQuery(t)[e]("change",this.listener),jQuery(t)[e]("input",this.listener)}}},ls={bind:function(){var t=this,e=this.el;this.getValue=function(){if(e.hasOwnProperty("_value"))return e._value;var i=e.value;return t.params.number&&(i=o(i)),i},this.listener=function(){t.set(t.getValue())},this.on("change",this.listener),e.hasAttribute("checked")&&(this.afterBind=this.listener)},update:function(t){this.el.checked=C(t,this.getValue())}},cs={bind:function(){var t=this,e=this,i=this.el;this.forceUpdate=function(){e._watcher&&e.update(e._watcher.get())};var n=this.multiple=i.hasAttribute("multiple");this.listener=function(){var t=Ce(i,n);t=e.params.number?qi(t)?t.map(o):o(t):t,e.set(t)},this.on("change",this.listener);var r=Ce(i,n,!0);(n&&r.length||!n&&null!==r)&&(this.afterBind=this.listener),this.vm.$on("hook:attached",function(){an(t.forceUpdate)}),Z(i)||an(this.forceUpdate)},update:function(t){var e=this.el;e.selectedIndex=-1;for(var i,n,r=this.multiple&&qi(t),s=e.options,o=s.length;o--;)i=s[o],n=i.hasOwnProperty("_value")?i._value:i.value,i.selected=r?$e(t,n)>-1:C(t,n)},unbind:function(){this.vm.$off("hook:attached",this.forceUpdate)}},us={bind:function(){function t(){var t=i.checked;return t&&i.hasOwnProperty("_trueValue")?i._trueValue:!t&&i.hasOwnProperty("_falseValue")?i._falseValue:t}var e=this,i=this.el;this.getValue=function(){return i.hasOwnProperty("_value")?i._value:e.params.number?o(i.value):i.value},this.listener=function(){var n=e._watcher.get();if(qi(n)){var r=e.getValue(),s=b(n,r);i.checked?s<0&&e.set(n.concat(r)):s>-1&&e.set(n.slice(0,s).concat(n.slice(s+1)))}else e.set(t())},this.on("change",this.listener),i.hasAttribute("checked")&&(this.afterBind=this.listener)},update:function(t){var e=this.el;qi(t)?e.checked=b(t,this.getValue())>-1:e.hasOwnProperty("_trueValue")?e.checked=C(t,e._trueValue):e.checked=!!t}},fs={text:hs,radio:ls,select:cs,checkbox:us},ps={priority:Gr,twoWay:!0,handlers:fs,params:["lazy","number","debounce"],bind:function(){this.checkFilters(),this.hasRead&&!this.hasWrite;var t,e=this.el,i=e.tagName;if("INPUT"===i)t=fs[e.type]||fs.text;else if("SELECT"===i)t=fs.select;else{if("TEXTAREA"!==i)return;t=fs.text}e.__v_model=this,t.bind.call(this),this.update=t.update,this._unbind=t.unbind},checkFilters:function(){var t=this.filters;if(t)for(var e=t.length;e--;){var i=jt(this.vm.$options,"filters",t[e].name);("function"==typeof i||i.read)&&(this.hasRead=!0),i.write&&(this.hasWrite=!0)}},unbind:function(){this.el.__v_model=null,this._unbind&&this._unbind()}},ds={esc:27,tab:9,enter:13,space:32,delete:[8,46],up:38,left:37,right:39,down:40},vs={priority:Qr,acceptStatement:!0,keyCodes:ds,bind:function(){if("IFRAME"===this.el.tagName&&"load"!==this.arg){var t=this;this.iframeBind=function(){st(t.el.contentWindow,t.arg,t.handler,t.modifiers.capture)},this.on("load",this.iframeBind)}},update:function(t){if(this.descriptor.raw||(t=function(){}),"function"==typeof t){this.modifiers.stop&&(t=xe(t)),this.modifiers.prevent&&(t=Ae(t)),this.modifiers.self&&(t=Oe(t));var e=Object.keys(this.modifiers).filter(function(t){return"stop"!==t&&"prevent"!==t&&"self"!==t&&"capture"!==t});e.length&&(t=ke(t,e)),this.reset(),this.handler=t,this.iframeBind?this.iframeBind():st(this.el,this.arg,this.handler,this.modifiers.capture)}},reset:function(){var t=this.iframeBind?this.el.contentWindow:this.el;this.handler&&ot(t,this.arg,this.handler)},unbind:function(){this.reset()}},ms=["-webkit-","-moz-","-ms-"],gs=["Webkit","Moz","ms"],_s=/!important;?$/,ys=Object.create(null),bs=null,ws={deep:!0,update:function(t){"string"==typeof t?this.el.style.cssText=t:qi(t)?this.handleObject(t.reduce(v,{})):this.handleObject(t||{})},handleObject:function(t){var e,i,n=this.cache||(this.cache={});for(e in n)e in t||(this.handleSingle(e,null),delete n[e]);
+for(e in t)i=t[e],i!==n[e]&&(n[e]=i,this.handleSingle(e,i))},handleSingle:function(t,e){if(t=Te(t))if(null!=e&&(e+=""),e){var i=_s.test(e)?"important":"";i?(e=e.replace(_s,"").trim(),this.el.style.setProperty(t.kebab,e,i)):this.el.style[t.camel]=e}else this.el.style[t.camel]=""}},Cs="http://www.w3.org/1999/xlink",$s=/^xlink:/,ks=/^v-|^:|^@|^(?:is|transition|transition-mode|debounce|track-by|stagger|enter-stagger|leave-stagger)$/,xs=/^(?:value|checked|selected|muted)$/,As=/^(?:draggable|contenteditable|spellcheck)$/,Os={value:"_value","true-value":"_trueValue","false-value":"_falseValue"},Ts={priority:Zr,bind:function(){var t=this.arg,e=this.el.tagName;t||(this.deep=!0);var i=this.descriptor,n=i.interp;n&&(i.hasOneTime&&(this.expression=W(n,this._scope||this.vm)),(ks.test(t)||"name"===t&&("PARTIAL"===e||"SLOT"===e))&&(this.el.removeAttribute(t),this.invalid=!0))},update:function(t){if(!this.invalid){var e=this.arg;this.arg?this.handleSingle(e,t):this.handleObject(t||{})}},handleObject:ws.handleObject,handleSingle:function(t,e){var i=this.el,n=this.descriptor.interp;if(this.modifiers.camel&&(t=l(t)),!n&&xs.test(t)&&t in i){var r="value"===t&&null==e?"":e;i[t]!==r&&(i[t]=r)}var s=Os[t];if(!n&&s){i[s]=e;var o=i.__v_model;o&&o.listener()}return"value"===t&&"TEXTAREA"===i.tagName?void i.removeAttribute(t):void(As.test(t)?i.setAttribute(t,e?"true":"false"):null!=e&&e!==!1?"class"===t?(i.__v_trans&&(e+=" "+i.__v_trans.id+"-transition"),ht(i,e)):$s.test(t)?i.setAttributeNS(Cs,t,e===!0?"":e):i.setAttribute(t,e===!0?"":e):i.removeAttribute(t))}},Ns={priority:Yr,bind:function(){if(this.arg){var t=this.id=l(this.arg),e=(this._scope||this.vm).$els;i(e,t)?e[t]=this.el:Lt(e,t,this.el)}},unbind:function(){var t=(this._scope||this.vm).$els;t[this.id]===this.el&&(t[this.id]=null)}},js={bind:function(){}},Es={bind:function(){var t=this.el;this.vm.$once("pre-hook:compiled",function(){t.removeAttribute("v-cloak")})}},Fs={text:Rr,html:qr,for:ss,if:os,show:as,model:ps,on:vs,bind:Ts,el:Ns,ref:js,cloak:Es},Ss={deep:!0,update:function(t){t?"string"==typeof t?this.setClass(t.trim().split(/\s+/)):this.setClass(je(t)):this.cleanup()},setClass:function(t){this.cleanup(t);for(var e=0,i=t.length;e<i;e++){var n=t[e];n&&Ee(this.el,n,lt)}this.prevKeys=t},cleanup:function(t){var e=this.prevKeys;if(e)for(var i=e.length;i--;){var n=e[i];(!t||t.indexOf(n)<0)&&Ee(this.el,n,ct)}}},Ds={priority:Kr,params:["keep-alive","transition-mode","inline-template"],bind:function(){this.el.__vue__||(this.keepAlive=this.params.keepAlive,this.keepAlive&&(this.cache={}),this.params.inlineTemplate&&(this.inlineTemplate=ut(this.el,!0)),this.pendingComponentCb=this.Component=null,this.pendingRemovals=0,this.pendingRemovalCb=null,this.anchor=vt("v-component"),rt(this.el,this.anchor),this.el.removeAttribute("is"),this.el.removeAttribute(":is"),this.descriptor.ref&&this.el.removeAttribute("v-ref:"+u(this.descriptor.ref)),this.literal&&this.setComponent(this.expression))},update:function(t){this.literal||this.setComponent(t)},setComponent:function(t,e){if(this.invalidatePending(),t){var i=this;this.resolveComponent(t,function(){i.mountComponent(e)})}else this.unbuild(!0),this.remove(this.childVM,e),this.childVM=null},resolveComponent:function(t,e){var i=this;this.pendingComponentCb=w(function(n){i.ComponentName=n.options.name||("string"==typeof t?t:null),i.Component=n,e()}),this.vm._resolveComponent(t,this.pendingComponentCb)},mountComponent:function(t){this.unbuild(!0);var e=this,i=this.Component.options.activate,n=this.getCached(),r=this.build();i&&!n?(this.waitingFor=r,Fe(i,r,function(){e.waitingFor===r&&(e.waitingFor=null,e.transition(r,t))})):(n&&r._updateRef(),this.transition(r,t))},invalidatePending:function(){this.pendingComponentCb&&(this.pendingComponentCb.cancel(),this.pendingComponentCb=null)},build:function(t){var e=this.getCached();if(e)return e;if(this.Component){var i={name:this.ComponentName,el:le(this.el),template:this.inlineTemplate,parent:this._host||this.vm,_linkerCachable:!this.inlineTemplate,_ref:this.descriptor.ref,_asComponent:!0,_isRouterView:this._isRouterView,_context:this.vm,_scope:this._scope,_frag:this._frag};t&&v(i,t);var n=new this.Component(i);return this.keepAlive&&(this.cache[this.Component.cid]=n),n}},getCached:function(){return this.keepAlive&&this.cache[this.Component.cid]},unbuild:function(t){this.waitingFor&&(this.keepAlive||this.waitingFor.$destroy(),this.waitingFor=null);var e=this.childVM;return!e||this.keepAlive?void(e&&(e._inactive=!0,e._updateRef(!0))):void e.$destroy(!1,t)},remove:function(t,e){var i=this.keepAlive;if(t){this.pendingRemovals++,this.pendingRemovalCb=e;var n=this;t.$remove(function(){n.pendingRemovals--,i||t._cleanup(),!n.pendingRemovals&&n.pendingRemovalCb&&(n.pendingRemovalCb(),n.pendingRemovalCb=null)})}else e&&e()},transition:function(t,e){var i=this,n=this.childVM;switch(n&&(n._inactive=!0),t._inactive=!1,this.childVM=t,i.params.transitionMode){case"in-out":t.$before(i.anchor,function(){i.remove(n,e)});break;case"out-in":i.remove(n,function(){t.$before(i.anchor,e)});break;default:i.remove(n),t.$before(i.anchor,e)}},unbind:function(){if(this.invalidatePending(),this.unbuild(),this.cache){for(var t in this.cache)this.cache[t].$destroy();this.cache=null}}},Ps=Hn._propBindingModes,Rs={},Ls=/^[$_a-zA-Z]+[\w$]*$/,Hs=Hn._propBindingModes,Is={bind:function(){var t=this.vm,e=t._context,i=this.descriptor.prop,n=i.path,r=i.parentPath,s=i.mode===Hs.TWO_WAY,o=this.parentWatcher=new re(e,r,function(e){Le(t,i,e)},{twoWay:s,filters:i.filters,scope:this._scope});if(Re(t,i,o.value),s){var a=this;t.$once("pre-hook:created",function(){a.childWatcher=new re(t,n,function(t){o.set(t)},{sync:!0})})}},unbind:function(){this.parentWatcher.teardown(),this.childWatcher&&this.childWatcher.teardown()}},Ms=[],Vs=!1,Ws="transition",Bs="animation",zs=tn+"Duration",Us=nn+"Duration",qs=Qi&&window.requestAnimationFrame,Js=qs?function(t){qs(function(){qs(t)})}:function(t){setTimeout(t,50)},Qs=ze.prototype;Qs.enter=function(t,e){this.cancelPending(),this.callHook("beforeEnter"),this.cb=e,lt(this.el,this.enterClass),t(),this.entered=!1,this.callHookWithCb("enter"),this.entered||(this.cancel=this.hooks&&this.hooks.enterCancelled,We(this.enterNextTick))},Qs.enterNextTick=function(){var t=this;this.justEntered=!0,Js(function(){t.justEntered=!1});var e=this.enterDone,i=this.getCssTransitionType(this.enterClass);this.pendingJsCb?i===Ws&&ct(this.el,this.enterClass):i===Ws?(ct(this.el,this.enterClass),this.setupCssCb(en,e)):i===Bs?this.setupCssCb(rn,e):e()},Qs.enterDone=function(){this.entered=!0,this.cancel=this.pendingJsCb=null,ct(this.el,this.enterClass),this.callHook("afterEnter"),this.cb&&this.cb()},Qs.leave=function(t,e){this.cancelPending(),this.callHook("beforeLeave"),this.op=t,this.cb=e,lt(this.el,this.leaveClass),this.left=!1,this.callHookWithCb("leave"),this.left||(this.cancel=this.hooks&&this.hooks.leaveCancelled,this.op&&!this.pendingJsCb&&(this.justEntered?this.leaveDone():We(this.leaveNextTick)))},Qs.leaveNextTick=function(){var t=this.getCssTransitionType(this.leaveClass);if(t){var e=t===Ws?en:rn;this.setupCssCb(e,this.leaveDone)}else this.leaveDone()},Qs.leaveDone=function(){this.left=!0,this.cancel=this.pendingJsCb=null,this.op(),ct(this.el,this.leaveClass),this.callHook("afterLeave"),this.cb&&this.cb(),this.op=null},Qs.cancelPending=function(){this.op=this.cb=null;var t=!1;this.pendingCssCb&&(t=!0,ot(this.el,this.pendingCssEvent,this.pendingCssCb),this.pendingCssEvent=this.pendingCssCb=null),this.pendingJsCb&&(t=!0,this.pendingJsCb.cancel(),this.pendingJsCb=null),t&&(ct(this.el,this.enterClass),ct(this.el,this.leaveClass)),this.cancel&&(this.cancel.call(this.vm,this.el),this.cancel=null)},Qs.callHook=function(t){this.hooks&&this.hooks[t]&&this.hooks[t].call(this.vm,this.el)},Qs.callHookWithCb=function(t){var e=this.hooks&&this.hooks[t];e&&(e.length>1&&(this.pendingJsCb=w(this[t+"Done"])),e.call(this.vm,this.el,this.pendingJsCb))},Qs.getCssTransitionType=function(t){if(!(!en||document.hidden||this.hooks&&this.hooks.css===!1||Ue(this.el))){var e=this.type||this.typeCache[t];if(e)return e;var i=this.el.style,n=window.getComputedStyle(this.el),r=i[zs]||n[zs];if(r&&"0s"!==r)e=Ws;else{var s=i[Us]||n[Us];s&&"0s"!==s&&(e=Bs)}return e&&(this.typeCache[t]=e),e}},Qs.setupCssCb=function(t,e){this.pendingCssEvent=t;var i=this,n=this.el,r=this.pendingCssCb=function(s){s.target===n&&(ot(n,t,r),i.pendingCssEvent=i.pendingCssCb=null,!i.pendingJsCb&&e&&e())};st(n,t,r)};var Gs={priority:Xr,update:function(t,e){var i=this.el,n=jt(this.vm.$options,"transitions",t);t=t||"v",e=e||"v",i.__v_trans=new ze(i,t,n,this.vm),ct(i,e+"-transition"),lt(i,t+"-transition")}},Zs={style:ws,class:Ss,component:Ds,prop:Is,transition:Gs},Xs=/^v-bind:|^:/,Ys=/^v-on:|^@/,Ks=/^v-([^:]+)(?:$|:(.*)$)/,to=/\.[^\.]+/g,eo=/^(v-bind:|:)?transition$/,io=1e3,no=2e3;ci.terminal=!0;var ro=/[^\w\-:\.]/,so=Object.freeze({compile:qe,compileAndLinkProps:Xe,compileRoot:Ye,transclude:gi,resolveSlots:wi}),oo=/^v-on:|^@/;Ai.prototype._bind=function(){var t=this.name,e=this.descriptor;if(("cloak"!==t||this.vm._isCompiled)&&this.el&&this.el.removeAttribute){var i=e.attr||"v-"+t;this.el.removeAttribute(i)}var n=e.def;if("function"==typeof n?this.update=n:v(this,n),this._setupParams(),this.bind&&this.bind(),this._bound=!0,this.literal)this.update&&this.update(e.raw);else if((this.expression||this.modifiers)&&(this.update||this.twoWay)&&!this._checkStatement()){var r=this;this.update?this._update=function(t,e){r._locked||r.update(t,e)}:this._update=xi;var s=this._preProcess?p(this._preProcess,this):null,o=this._postProcess?p(this._postProcess,this):null,a=this._watcher=new re(this.vm,this.expression,this._update,{filters:this.filters,twoWay:this.twoWay,deep:this.deep,preProcess:s,postProcess:o,scope:this._scope});this.afterBind?this.afterBind():this.update&&this.update(a.value)}},Ai.prototype._setupParams=function(){if(this.params){var t=this.params;this.params=Object.create(null);for(var e,i,n,r=t.length;r--;)e=u(t[r]),n=l(e),i=Y(this.el,e),null!=i?this._setupParamWatcher(n,i):(i=X(this.el,e),null!=i&&(this.params[n]=""===i||i))}},Ai.prototype._setupParamWatcher=function(t,e){var i=this,n=!1,r=(this._scope||this.vm).$watch(e,function(e,r){if(i.params[t]=e,n){var s=i.paramWatchers&&i.paramWatchers[t];s&&s.call(i,e,r)}else n=!0},{immediate:!0,user:!1});(this._paramUnwatchFns||(this._paramUnwatchFns=[])).push(r)},Ai.prototype._checkStatement=function(){var t=this.expression;if(t&&this.acceptStatement&&!Kt(t)){var e=Yt(t).get,i=this._scope||this.vm,n=function(t){i.$event=t,e.call(i,i),i.$event=null};return this.filters&&(n=i._applyFilters(n,null,this.filters)),this.update(n),!0}},Ai.prototype.set=function(t){this.twoWay&&this._withLock(function(){this._watcher.set(t)})},Ai.prototype._withLock=function(t){var e=this;e._locked=!0,t.call(e),an(function(){e._locked=!1})},Ai.prototype.on=function(t,e,i){st(this.el,t,e,i),(this._listeners||(this._listeners=[])).push([t,e])},Ai.prototype._teardown=function(){if(this._bound){this._bound=!1,this.unbind&&this.unbind(),this._watcher&&this._watcher.teardown();var t,e=this._listeners;if(e)for(t=e.length;t--;)ot(this.el,e[t][0],e[t][1]);var i=this._paramUnwatchFns;if(i)for(t=i.length;t--;)i[t]();this.vm=this.el=this._watcher=this._listeners=null}};var ao=/[^|]\|[^|]/;Ht(Si),$i(Si),ki(Si),Oi(Si),Ti(Si),Ni(Si),ji(Si),Ei(Si),Fi(Si);var ho={priority:ns,params:["name"],bind:function(){var t=this.params.name||"default",e=this.vm._slotContents&&this.vm._slotContents[t];e&&e.hasChildNodes()?this.compile(e.cloneNode(!0),this.vm._context,this.vm):this.fallback()},compile:function(t,e,i){if(t&&e){if(this.el.hasChildNodes()&&1===t.childNodes.length&&1===t.childNodes[0].nodeType&&t.childNodes[0].hasAttribute("v-if")){var n=document.createElement("template");n.setAttribute("v-else",""),n.innerHTML=this.el.innerHTML,n._context=this.vm,t.appendChild(n)}var r=i?i._scope:this._scope;this.unlink=e.$compile(t,i,r,this._frag)}t?rt(this.el,t):it(this.el)},fallback:function(){this.compile(ut(this.el,!0),this.vm)},unbind:function(){this.unlink&&this.unlink()}},lo={priority:ts,params:["name"],paramWatchers:{name:function(t){os.remove.call(this),t&&this.insert(t)}},bind:function(){this.anchor=vt("v-partial"),rt(this.el,this.anchor),this.insert(this.params.name)},insert:function(t){var e=jt(this.vm.$options,"partials",t,!0);e&&(this.factory=new _e(this.vm,e),os.insert.call(this))},unbind:function(){this.frag&&this.frag.destroy()}},co={slot:ho,partial:lo},uo=ss._postProcess,fo=/(\d{3})(?=\d)/g,po={orderBy:Ri,filterBy:Pi,limitBy:Di,json:{read:function(t,e){return"string"==typeof t?t:JSON.stringify(t,null,arguments.length>1?e:2)},write:function(t){try{return JSON.parse(t)}catch(e){return t}}},capitalize:function(t){return t||0===t?(t=t.toString(),t.charAt(0).toUpperCase()+t.slice(1)):""},uppercase:function(t){return t||0===t?t.toString().toUpperCase():""},lowercase:function(t){return t||0===t?t.toString().toLowerCase():""},currency:function(t,e,i){if(t=parseFloat(t),!isFinite(t)||!t&&0!==t)return"";e=null!=e?e:"$",i=null!=i?i:2;var n=Math.abs(t).toFixed(i),r=i?n.slice(0,-1-i):n,s=r.length%3,o=s>0?r.slice(0,s)+(r.length>3?",":""):"",a=i?n.slice(-1-i):"",h=t<0?"-":"";return h+e+o+r.slice(s).replace(fo,"$1,")+a},pluralize:function(t){var e=d(arguments,1),i=e.length;if(i>1){var n=t%10-1;return n in e?e[n]:e[i-1]}return e[0]+(1===t?"":"s")},debounce:function(t,e){if(t)return e||(e=300),y(t,e)}};return Hi(Si),Si.version="1.0.27",setTimeout(function(){Hn.devtools&&Gi&&Gi.emit("init",Si)},0),Si});
+//# sourceMappingURL=vue.min.js.map \ No newline at end of file
diff --git a/admin/survey/modules/mod_hierarhija/model/HierarhijaOnlyQuery.php b/admin/survey/modules/mod_hierarhija/model/HierarhijaOnlyQuery.php
new file mode 100644
index 0000000..42f6347
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/model/HierarhijaOnlyQuery.php
@@ -0,0 +1,328 @@
+<?php
+
+/**
+ * Avtor: Robert Šmalc
+ * Date: 8/20/15
+ */
+
+namespace Hierarhija\Model;
+
+class HierarhijaOnlyQuery
+{
+
+ protected $anketa;
+ protected $cusom;
+ protected $h_ravni_id;
+ protected $select;
+ protected $where;
+ protected $user_id;
+
+
+ /**
+ * Query hierarhija struktura - pridobimo glavno strukturo
+ *
+ * @param int $anketa - ID
+ * @param string $custom_select - SQL statement comma separated
+ * @return mysqli query
+ */
+ public function queryStruktura($anketa, $select = null, $where = null, $order = 'str.level, hs.ime ASC')
+ {
+ return sisplet_query("
+ SELECT
+ str.id AS id,
+ str.parent_id AS parent_id,
+ str.level AS level,
+ hr.anketa_id AS anketa_id,
+ hr.id AS ravni_id,
+ hr.level AS ravni_level,
+ hr.ime AS ravni_ime,
+ hs.ime AS sifrant_ime,
+ hs.id AS sifrant_id
+ $select
+ FROM
+ srv_hierarhija_struktura AS str
+ LEFT JOIN
+ srv_hierarhija_ravni AS hr ON str.hierarhija_ravni_id = hr.id
+ LEFT JOIN
+ srv_hierarhija_sifranti AS hs ON str.hierarhija_sifranti_id = hs.id
+ WHERE
+ hr.anketa_id='$anketa'
+ $where
+ ORDER BY
+ $order
+ ");
+ }
+
+ /**
+ * Query hierarhija user-jev za sledečo raven(email)
+ *
+ * @param int $anketa - ID
+ * @param string $custom_select - SQL statement comma separated
+ * @return mysqli query
+ */
+ public function queryStrukturaUsers($anketa, $user = null)
+ {
+ return sisplet_query("
+ SELECT
+ hs.id AS id,
+ users.id AS user_id,
+ users.email AS email,
+ users.name AS name,
+ users.surname AS surname,
+ hs.level AS level,
+ hs.hierarhija_sifranti_id AS sifrant_id
+ FROM
+ srv_hierarhija_struktura_users AS hu
+ LEFT JOIN
+ srv_hierarhija_struktura AS hs ON hu.hierarhija_struktura_id = hs.id
+ LEFT JOIN
+ srv_hierarhija_ravni AS hr ON hs.hierarhija_ravni_id = hr.id
+ LEFT JOIN
+ users ON users.id = hu.user_id
+ WHERE
+ hr.anketa_id='$anketa'
+ $user
+ ORDER BY id ASC
+ ");
+ }
+
+ /**
+ * Query hierarhija sledeči user na katerem nivoju je vpisan - LEVEL
+ *
+ * @param int $anketa - ID
+ * @param int $user_id
+ * @return mysqli query
+ */
+ public static function queryStrukturaUsersLevel($anketa, $user_id, $order = 'ASC', $limit = null, $selec = null)
+ {
+ if (!is_null($limit) && $limit == true)
+ $limit = 'LIMIT 0,1';
+
+ return sisplet_query("
+ SELECT
+ hs.id AS struktura_id,
+ hs.parent_id AS parent_id,
+ hr.level AS level
+ $selec
+ FROM
+ srv_hierarhija_struktura_users AS hu
+ LEFT JOIN
+ srv_hierarhija_struktura AS hs ON hu.hierarhija_struktura_id = hs.id
+ LEFT JOIN
+ srv_hierarhija_ravni AS hr ON hs.hierarhija_ravni_id = hr.id
+ LEFT JOIN
+ users ON users.id = hu.user_id
+ WHERE
+ hr.anketa_id='$anketa' AND users.id='$user_id'
+ ORDER BY
+ hr.level $order
+ $limit
+ ");
+ }
+
+ /**
+ * Vrnemo Group by users email ločenimi z vejico
+ *
+ * @param int $anketa
+ * @return SQL query
+ */
+ public function queryStrukturaUsersGroupBy($anketa, $where = null)
+ {
+ return sisplet_query("
+ SELECT
+ hs.id AS id,
+ GROUP_CONCAT(users.email) AS uporabniki,
+ hs.level AS level,
+ hu.user_id AS user_id
+ FROM
+ srv_hierarhija_struktura_users AS hu
+ LEFT JOIN
+ srv_hierarhija_struktura AS hs ON hu.hierarhija_struktura_id = hs.id
+ LEFT JOIN
+ srv_hierarhija_ravni AS hr ON hs.hierarhija_ravni_id = hr.id
+ LEFT JOIN
+ users ON users.id = hu.user_id
+ WHERE
+ hr.anketa_id = '$anketa'
+ $where
+ GROUP BY hs.id
+ ORDER BY hs.level
+ ");
+ }
+
+ /**
+ * Vrnemo strukturo z id-jem sifrantov, ravni in user-ji
+ *
+ * @param int $anketa
+ * @return SQL query
+ */
+ public function queryStrukturaUsersOnlyId($anketa, $user_id)
+ {
+ return sisplet_query("
+ SELECT
+ hs.id AS struktur_id,
+ hs.hierarhija_ravni_id AS ravni_id,
+ hs.hierarhija_sifranti_id AS sifrant_id,
+ hu.user_id AS user_id
+ FROM
+ srv_hierarhija_struktura AS hs
+ LEFT JOIN
+ srv_hierarhija_struktura_users AS hu ON hu.hierarhija_struktura_id=hs.id
+ WHERE
+ hs.anketa_id = '$anketa'
+ AND
+ hu.user_id = '$user_id'
+ ");
+ }
+
+
+ /**
+ * Pridobimo vse šifrante iz baze srv_hierarhija_sifranti
+ *
+ * @param int $h_ravni_id -> ID srv_hierarhija_ravni
+ * @return SQL results
+ */
+ public function getSamoSifrant($h_ravni_id, $id = false)
+ {
+ if ($id) {
+ $sql_sifra = sisplet_query("SELECT * FROM srv_hierarhija_sifranti WHERE id = '$h_ravni_id' ORDER BY ime");
+ } else {
+ $sql_sifra = sisplet_query("SELECT * FROM srv_hierarhija_sifranti WHERE hierarhija_ravni_id = '$h_ravni_id' ORDER BY ime");
+ }
+ $results = null;
+ if (!empty($sql_sifra) && mysqli_num_rows($sql_sifra) > 0)
+ $results = $sql_sifra;
+
+ return $results;
+ }
+
+ /**
+ * Pridobimo vse šifrante skupaj z ravnmi baze srv_hierarhija_sifranti in srv_hierarhija_ravni
+ *
+ * @param int $h_ravni_id -> ID srv_hierarhija_ravni
+ * @return SQL results
+ */
+ public function getSifrantiRavni($anketa, $select = null, $where = null)
+ {
+ $sql = sisplet_query("
+ SELECT
+ s.id AS id,
+ r.anketa_id AS anketa_id,
+ r.level AS level,
+ r.ime AS raven,
+ s.ime AS sifranti
+ $select
+ FROM
+ srv_hierarhija_ravni AS r
+ LEFT JOIN
+ srv_hierarhija_sifranti AS s
+ ON
+ s.hierarhija_ravni_id = r.id
+ WHERE
+ r.anketa_id = '$anketa'
+ $where
+ ORDER BY level
+ ");
+
+ $results = null;
+ if (!empty($sql) && $sql->num_rows > 0)
+ $results = $sql;
+
+ return $results;
+ }
+
+ /**
+ * DB Tabela hierarhija_ravni
+ *
+ * @param int $anketa
+ * @return SQL query
+ */
+ public function getRavni($anketa, $select = '*')
+ {
+ $sql = sisplet_query("
+ SELECT
+ $select
+ FROM
+ srv_hierarhija_ravni
+ WHERE
+ anketa_id = '$anketa'
+ ORDER BY
+ level ASC
+ ");
+
+ if (!empty($sql) && $sql->num_rows > 0)
+ return $sql;
+
+ return null;
+ }
+
+ /**
+ * DB hierarhija_users preverimo pravice - type
+ *
+ * @pram int $user_id
+ * @return query
+ */
+ public function queryHierarhijaUsers($user_id = null)
+ {
+ $where = 'WHERE user_id=' . (int)$user_id;
+
+ if (is_null($user_id))
+ $where = '';
+
+ return sisplet_query("
+ SELECT
+ *
+ FROM
+ srv_hierarhija_users
+ $where
+ ");
+ }
+
+ /**
+ * Pridobimo gru_id za vlogo in to uporabimo potem pri nivojih*
+ * @return (int) $gru_id
+ */
+ public static function getGrupaId($anketa, $vrstni_red = null)
+ {
+ if (empty($anketa))
+ die("Missing anketa ID");
+
+ if (is_null($vrstni_red))
+ $vrstni_red = 1;
+
+ $sql = sisplet_query("SELECT id, vrstni_red FROM `srv_grupa` WHERE ank_id='" . $anketa . "' AND vrstni_red='" . $vrstni_red . "' ORDER BY vrstni_red LIMIT 0,1", 'obj');
+
+ return $sql->id;
+ }
+
+ public static function getKodaRow($anketa, $struktura_id = null, $vloga = 'ucenec')
+ {
+
+ // V kolikor imamo specifično strukturo
+ if (!is_null($struktura_id) && is_numeric($struktura_id))
+ $struktura_id = " AND hierarhija_struktura_id='" . $struktura_id . "'";
+
+ $sql = sisplet_query("SELECT * FROM srv_hierarhija_koda WHERE anketa_id='" . $anketa . "' " . $struktura_id . " AND vloga='" . $vloga . "'");
+
+ if ($sql->num_rows > 0)
+ return $sql->fetch_object();
+
+ }
+
+ /**
+ * Check if error
+ *
+ * @param ($query) $sql
+ * @return echo error
+ */
+ protected $sql;
+
+ public function sqlError($sql)
+ {
+ if (!$sql)
+ echo mysqli_error($GLOBALS['connect_db']);
+
+ }
+
+
+} \ No newline at end of file
diff --git a/admin/survey/modules/mod_hierarhija/model/HierarhijaQuery.php b/admin/survey/modules/mod_hierarhija/model/HierarhijaQuery.php
new file mode 100644
index 0000000..49d3b50
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/model/HierarhijaQuery.php
@@ -0,0 +1,981 @@
+<?php
+
+/**
+ * Avtor: Robert Šmalc
+ * Date: 8/20/15
+ */
+
+namespace Hierarhija\Model;
+
+use Hierarhija\Hierarhija;
+use Hierarhija\HierarhijaHelper;
+
+class HierarhijaQuery
+{
+
+ /**
+ * Pridobimo vse nivoje ravno za trenutno anketo
+ *
+ * @param string $anketa - ID ankete
+ * @param string $id - izbrane ravni
+ * @return SLQ results or NULL
+ */
+ protected $anketa;
+ protected $id;
+ protected $max_struktura;
+
+ public static function getRavniAdmin($anketa, $id = null)
+ {
+
+ $sql = "SELECT * FROM srv_hierarhija_ravni WHERE anketa_id='" . $anketa . "'";
+ if (!is_null($id)) {
+ $sql .= " AND id='" . $id . "'";
+ } else {
+ $sql .= "ORDER BY level";
+ }
+ $sql1 = sisplet_query($sql);
+ $results = null;
+ if (!empty($sql1) && mysqli_num_rows($sql1) > 0)
+ $results = $sql1;
+
+ return $results;
+ }
+
+ /**
+ * Pridobimo vse sifrante za trenutno anketo
+ *
+ * @param string $anketa - ID ankete
+ * @param integer $max_struktura - do katerega nivoja je struktura že vnešena
+ * @return SLQ results or NULL
+ */
+ public function getSifrantAdmin($anketa, $max_struktura = 999, $user_level = 0)
+ {
+ $sql_ravni = sisplet_query("SELECT * FROM srv_hierarhija_ravni WHERE anketa_id='" . $anketa . "' ORDER BY level");
+ $sql_sifra = sisplet_query("
+ SELECT
+ hs.id AS id,
+ hr.level AS level,
+ hs.ime AS sifrant
+ FROM srv_hierarhija_ravni AS hr
+ LEFT JOIN
+ srv_hierarhija_sifranti AS hs ON hr.id = hs.hierarhija_ravni_id
+ WHERE anketa_id='$anketa' AND hr.level > '" . $user_level . "'
+ ORDER BY hr.level, hs.ime
+ ");
+
+ $results = null;
+ if (!empty($sql_ravni) && mysqli_num_rows($sql_ravni) > 0) {
+ while ($nivoObj = mysqli_fetch_object($sql_ravni)) {
+ //v kolikor pri izgradnji strukture še nimamo nobenega podatka potem ponudimo samo 1.nivo
+ if ($nivoObj->level <= ($max_struktura + 1) || $nivoObj->level == 1) {
+ $results['nivoji'][] = [
+ 'id' => (int)$nivoObj->id,
+ 'level' => $nivoObj->level,
+ 'ime' => $nivoObj->ime,
+ 'unikaten' => $nivoObj->unikaten
+ ];
+ }
+
+ }
+ while ($sifraObj = mysqli_fetch_object($sql_sifra)) {
+ $results['sifranti'][] = [
+ 'id' => (int)$sifraObj->id,
+ 'level' => $sifraObj->level,
+ 'sifrant' => $sifraObj->sifrant
+ ];
+ }
+ }
+
+ return $results;
+ }
+
+ /**
+ * Pridobimo ravni, šifrante in strukturo HIERARHIJE, ki jo je že vnesel uporabnik
+ *
+ * @param string $anketa
+ * @return array query
+ */
+ public function getSifrantHierarhija($anketa)
+ {
+ $results['struktura'] = (new HierarhijaOnlyQuery())->queryStruktura($anketa)->fetch_object();
+ $max_struktura = (new HierarhijaOnlyQuery())->queryStruktura($anketa, ', MAX(str.level) AS max_level')->fetch_object()->max_level;
+
+ $results = $this->getSifrantAdmin($anketa, $max_struktura);
+
+ return $results;
+ }
+
+ /**
+ * INSERT - srv_Spremenljivka in srv_branching
+ *
+ * @param (array) $spremenljivka
+ * @param (int) $anketa
+ * @return
+ */
+ protected $spremenljivka;
+ protected $sql_sifra;
+ protected $spremenljivka_id;
+
+ public function insertSpremenljivkaBranching($spremenljivka, $sql_sifra, $anketa, $vloga = null)
+ {
+ if (is_array($spremenljivka)) {
+ $st_vrednosti = (is_null($sql_sifra) ? '2' : $sql_sifra->num_rows);
+
+ // V kolikor je vloga potem je vprašanje zaklenjeno
+ $locked = (!empty($vloga) ? 1 : 0);
+
+ $this->spremenljivka_id = sisplet_query("INSERT INTO
+ srv_spremenljivka
+ (id, gru_id, naslov, variable, variable_custom, size, tip, vrstni_red, visible, sistem, locked)
+ VALUES
+ ('', '$spremenljivka[0]', '$spremenljivka[1]', '$spremenljivka[2]', '1', '$st_vrednosti', '1', '$spremenljivka[4]', '0', '1', '$locked')
+ ", "id");
+
+ }
+
+ //vstavimoe v branching vse nivoje
+ if (is_array($spremenljivka) && $anketa) {
+ $sql_branching = sisplet_query("INSERT INTO srv_branching (ank_id, parent, element_spr, element_if, vrstni_red, pagebreak) VALUES ('$anketa', 0, '" . $this->spremenljivka_id . "', 0, '$spremenljivka[4]', 0)");
+ $this->sqlError($sql_branching);
+ }
+
+ if (!empty($sql_sifra) && !empty($this->spremenljivka_id) && is_null($vloga))
+ $this->insertVrednost($sql_sifra);
+
+ if (!empty($this->spremenljivka_id) && !is_null($vloga))
+ $this->insertVrednost(null, $vloga);
+
+ }
+
+ /**
+ * INSERT - srv_vrednost odogovore za sledečo spremenljivko
+ *
+ * @param (array) $vrednost
+ * @return
+ */
+ protected $vrednost;
+
+ public function insertVrednost($vrednost, $vloga = null)
+ {
+ if (!is_null($vrednost)) {
+ $vrstni_red_sifre = 1;
+ while ($sifrant = $vrednost->fetch_object()) {
+ $vrednost_id = sisplet_query("INSERT INTO srv_vrednost (id, spr_id, naslov, variable, vrstni_red) VALUES ('', '$this->spremenljivka_id', '$sifrant->ime', '$vrstni_red_sifre', '$vrstni_red_sifre')", "id");
+
+ //vpišemo šifrante in vrednosti odgovorov v pivot tabelo za lažje generiranje URL naslovov
+ $sql_pivot = sisplet_query("INSERT INTO srv_hierarhija_sifrant_vrednost (sifrant_id, vrednost_id) VALUES ($sifrant->id, $vrednost_id)");
+ $this->sqlError($sql_pivot);
+
+ $vrstni_red_sifre++;
+ }
+ } elseif ($vloga == 1) {
+ $vrstni_red_sifre = 1;
+ $vloga = ['učenec', 'učitelj'];
+ foreach ($vloga as $row) {
+ $sql_vrednost = sisplet_query("INSERT INTO srv_vrednost (id, spr_id, naslov, variable, vrstni_red) VALUES ('', '$this->spremenljivka_id', '$row', '$vrstni_red_sifre', '$vrstni_red_sifre')");
+ $this->sqlError($sql_vrednost);
+ $vrstni_red_sifre++;
+
+ }
+ }
+
+ }
+
+ /**
+ * Vreno celotno drevesno strukturo za userja v hierarhiji
+ *
+ * @param (int) $anketa
+ * @return (array)
+ */
+
+
+ public function pridobiHierarhijoNavzgor($anketa, $odgovori = null, $user = null)
+ {
+ global $global_user_id;
+
+ if (is_null($user))
+ $user = $global_user_id;
+
+ $sql_str = (new HierarhijaOnlyQuery())->queryStrukturaUsersOnlyId($anketa, $user);
+ $this->sqlError($sql_str);
+
+ # pridobimo tudi ID strukture hierarhije, da lahko kasneje pridobimo drevesno strukturo celotnega drevesa in vsak id strukture damo v polje, ker bomo poiskali vso strukturo
+ ## V kolikor bi učitelj izvajal samoevalvacijo za dva predmeta
+ while ($obj = $sql_str->fetch_object()) {
+ $id_nivojev[] = $obj->struktur_id;
+ }
+
+ if (is_null($id_nivojev))
+ return null;
+
+ # gremo po vseh id-jih strukture in pridobimo strukturo navzgor
+ foreach ($id_nivojev as $nivo) {
+ $id = $nivo;
+
+ ## v koliko imamo ID strukture potem naredimo zanko in preverimo parent_id, ter ID strukture napolnimo v polje
+ while (!is_null($id)) {
+ $row = (new HierarhijaOnlyQuery())->queryStruktura($anketa, null, ' AND str.id=' . $id)->fetch_object();
+
+ if (!is_null($odgovori) && $odgovori == TRUE) {
+
+ $st_odgovora = sisplet_query("
+ SELECT
+ sv.vrednost_id AS vrednost_id,
+ v.variable AS variable
+ FROM
+ srv_hierarhija_sifrant_vrednost as sv
+ LEFT JOIN
+ srv_vrednost as v ON sv.vrednost_id = v.id
+ WHERE
+ sv.sifrant_id='$row->sifrant_id'
+ ");
+
+ $hiearhija[$nivo][] = [
+ 'nivo' => 'nivo' . $row->level,
+ 'id' => $row->sifrant_id,
+ 'st_odgovora' => $st_odgovora->fetch_array()['variable']
+ ];
+ } else {
+ $hiearhija[$nivo][] = [
+ 'nivo' => 'nivo' . $row->level,
+ 'id' => $row->sifrant_id
+ ];
+ }
+ $id = $row->parent_id;
+ }
+ }
+
+ return $hiearhija;
+ }
+
+ public static function posodobiSifranteVrednostiGledeNaTrenutenIdStrukture($id)
+ {
+ while (!is_null($id)) {
+ $row = sisplet_query("SELECT * FROM srv_hierarhija_struktura WHERE id='$id' ORDER BY level");
+ $row = $row->fetch_object();
+
+ $hiearhija[$row->level] = [
+ 'id' => $id,
+ 'id_sifranta' => $row->hierarhija_sifranti_id,
+ 'select' => $row->level . '-' . $row->hierarhija_sifranti_id,
+ 'hierarhija_ravni_id' => $row->hierarhija_ravni_id
+ ];
+
+ $id = $row->parent_id;
+ }
+
+ return $hiearhija;
+ }
+
+ /**
+ * Funkcija poišče v PIVOT tabeli srv_hierarhija_sifrant_vrednost vrednost_id
+ *
+ * @param (int) $sifrant_id
+ * @return (int) vrednost_id
+ */
+
+ protected $sifrant_id;
+
+ public function getVrednostIdFromPivot($sifrant_id)
+ {
+ $sql = sisplet_query("SELECT * FROM srv_hierarhija_sifrant_vrednost WHERE sifrant_id='$sifrant_id'");
+
+ if (!empty($sql))
+ return $sql->fetch_object()->vrednost_id;
+ }
+
+ /**
+ * Pridobimo ID vseh struktur, ki je pod določeno strukturi, ker bomo tudi te strukture brisali
+ *
+ * @param (int) $anketa_id
+ * @param (int) $id - strukture
+ * @return (array) $this->element
+ */
+ public function pridobiIdStruktureDoKonca($id, $anketa_id)
+ {
+
+ if (!isset($this->element) || !is_array($this->element))
+ $this->element = array();
+
+ $sql_id = sisplet_query("SELECT * FROM srv_hierarhija_struktura WHERE parent_id='$id' AND anketa_id='$anketa_id'");
+ $this->sqlError($sql_id);
+
+ if ($sql_id->num_rows > 0) {
+ while ($obj = $sql_id->fetch_object()) {
+ if (!isset($element) || !in_array($obj->id, $element)) {
+ $this->element[] = $obj->id;
+ $this->pridobiIdStruktureDoKonca($obj->id, $anketa_id);
+ }
+ }
+ }
+
+ return $this->element;
+ }
+
+ /**
+ * Shrani ali posodobi dodatno opcijo pri hierarhiji - nastavitve
+ */
+ public function saveHierarhijaOptions($anketa_id, $option, $value, $id = null)
+ {
+ if (is_null($id)) {
+ $ce_obstaja_id = $this->getRowOptions($anketa_id, $option);
+ if (!empty($ce_obstaja_id->id))
+ $id = $ce_obstaja_id->id;
+ }
+
+ if (is_null($id)) {
+ $sql = sisplet_query("INSERT INTO srv_hierarhija_options (anketa_id, option_name, option_value) VALUES ('" . $anketa_id . "', '" . $option . "', '" . $value . "')");
+ } else {
+ $sql = sisplet_query("UPDATE srv_hierarhija_options SET option_value='" . $value . "' WHERE anketa_id='" . $anketa_id . "' AND id='" . $id . "'");
+ }
+
+ $this->sqlError($sql);
+ }
+
+ /**
+ * get ali delete dodatnih opcij
+ */
+ public function getDeleteHierarhijaOptions($anketa_id, $option = null, $id = null, $delete = null, $json = true)
+ {
+ if (is_null($option) && is_null($id) && is_null($delete)) {
+ $sql = sisplet_query("SELECT * FROM srv_hierarhija_options WHERE anketa_id='" . $anketa_id . "'");
+ } elseif (is_null($delete)) {
+ if (!empty($anketa_id) && !empty($option))
+ $sql = sisplet_query("SELECT * FROM srv_hierarhija_options WHERE anketa_id='" . $anketa_id . "' AND option_name='" . $option . "'");
+
+ if (!is_null($id))
+ $sql = sisplet_query("SELECT * FROM srv_hierarhija_options WHERE id='" . $id . "'");
+
+ } else {
+ if (!empty($anketa_id) && !empty($option) && !is_null($delete))
+ $sql = sisplet_query("DELETE FROM srv_hierarhija_options WHERE anketa_id='" . $anketa_id . "' AND option_name='" . $option . "'");
+
+ if (!is_null($id) && !is_null($delete))
+ $sql = sisplet_query("DELETE FROM srv_hierarhija_options WHERE id='" . $id . "'");
+
+ $this->sqlError($sql);
+ return '';
+ }
+ $this->sqlError($sql);
+
+ $data = array();
+ if ($sql->num_rows > 0) {
+ while ($row = $sql->fetch_object()) {
+ $data[$row->option_name] = $row->option_value;
+ }
+ }
+
+ if (!$json && is_null($option)) {
+ return $data;
+ } elseif (!$json && !is_null($option)) {
+ return $data[$option];
+ }
+
+ echo json_encode($data);
+ }
+
+ /**
+ * Pridobimo opcijo, ki jo iščemo ali želimo
+ *
+ * @param (int) $anketa
+ * @param (string) $option
+ * @return string | value;
+ */
+ public static function getOptions($anketa, $option)
+ {
+ return (new HierarhijaQuery())->getDeleteHierarhijaOptions($anketa, $option, null, null, false);
+ }
+
+ /**
+ * Shranimo opcijo hierarhije - bližnica
+ *
+ * @param (int) $anketa
+ * @param (string) $option
+ * @param (string) $value
+ * @return string | value;
+ */
+ public static function saveOptions($anketa, $option, $value)
+ {
+ return (new HierarhijaQuery())->saveHierarhijaOptions($anketa, $option, $value);
+ }
+
+
+ /**
+ * Preverimo, komu vse pošljemo kode (učencem, učitelju ali nobenemu)
+ *
+ * @param int $anketa
+ * @return null || string
+ */
+
+ public static function getOptionsPosljiKode($anketa)
+ {
+ $poslji = null;
+
+ if (!empty(self::getOptions($anketa, 'ne_poslji_kode_ucencem')))
+ $poslji[] = 'ucitelju';
+
+ if (!empty(self::getOptions($anketa, 'ne_poslji_kodo_ucitelju')))
+ $poslji[] = 'ucencem';
+
+ if (is_null($poslji))
+ return 'vsem';
+
+ if (sizeof($poslji) == 1)
+ return $poslji[0];
+
+ return 'nikomur';
+ }
+
+ public function getRowOptions($anketa_id, $option, $id = null)
+ {
+ if (is_null($id))
+ $sql = sisplet_query("SELECT * FROM srv_hierarhija_options WHERE anketa_id='" . $anketa_id . "' AND option_name='" . $option . "'");
+
+ if (!is_null($id))
+ $sql = sisplet_query("SELECT * FROM srv_hierarhija_options WHERE id='" . $id . "'");
+
+ $this->sqlError($sql);
+
+ if ($sql->num_rows > 0)
+ return $sql->fetch_object();
+
+ return null;
+ }
+
+ /**
+ * Vnre polje vse strukture z imeni, ter tudi email naslove, ki so dodane določeni strukturi
+ */
+ public function json_jstree($anketa, $array = null)
+ {
+ global $global_user_id;
+ $hierarhija_type = (!empty($_SESSION['hierarhija'][$this->anketa]['type']) ? $_SESSION['hierarhija'][$this->anketa]['type'] : null);
+
+ $user_level = HierarhijaOnlyQuery::queryStrukturaUsersLevel($anketa, $global_user_id);
+
+ //vpisan kot super_admin in ima dostop do celotne hierarhije
+ if ($hierarhija_type < 5) {
+ $hierarhija = (new HierarhijaOnlyQuery())->queryStruktura($anketa);
+ } elseif ($user_level->num_rows > 0) { //preverimo, če je uporabnik že kje vpisan v hierarhiji in na kateri nivo - level
+ while ($obj = $user_level->fetch_object()) {
+ //dodamo id v array, ker le tako lahko zgradimo drevo za ustreznega uporabnika, ki nima vpogleda v celotno strukturo
+ $hierarhija_drevo[] = $obj->struktura_id;
+ $hierarhija_drevo[] = $obj->parent_id;
+
+ //pridobimo hierarhijo navzgor
+ $hierarhija_navzgor = HierarhijaQuery::posodobiSifranteVrednostiGledeNaTrenutenIdStrukture($obj->struktura_id);
+ foreach ($hierarhija_navzgor as $n) {
+ $hierarhija_drevo[] = $n['id']; //vse id,je strukture vnesemo v polje, kjer bomo nato preverjali, če obstaja
+ }
+ }
+
+ // Pridobimo celotno strukturo hierarhije tudi za elemente, ki jih kasneje ne izpišemo
+ $hierarhija = (new HierarhijaOnlyQuery())->queryStruktura($anketa, null, ' AND hr.level>1');
+
+ }
+
+ //pridobimo podate o uporabnikih - email in ne prikazujemo uporabnika, ki je višje v hierarhiji od dejansko prijavljenega uporabnika
+ $users = (new HierarhijaOnlyQuery())->queryStrukturaUsersGroupBy($anketa);
+ $user_level = null;
+ while ($row = $users->fetch_assoc()) {
+ ## Pridobimo uporabnika na največjem možnem nivoju
+ if ($global_user_id == $row['user_id'] && (is_null($user_level) || $user_level > $row['level']))
+ $user_level = $row['level'];
+
+ ## Ko imamo določen nivo uporabnika, potem pod njemu pridobimo vse ostale uporabnike, ki jih omenjen uporabnik lahko vidi
+ if (!is_null($user_level) && $row['level'] >= $user_level)
+ $hierarhija_users[] = $row;
+
+ ## V kolikor gre za administratorja ankete
+ if ($hierarhija_type < 5)
+ $hierarhija_users[] = $row;
+ }
+
+ # V kolikor imamo polje hierarhije z ID-ji pridobljenimi za hierarhijo navzgor
+ if (!is_null($hierarhija_drevo)) {
+ while ($obj = $hierarhija->fetch_object()) {
+ $up = null;
+ foreach ($hierarhija_users as $user) {
+ if ($obj->id == $user['id'])
+ $up = $user['uporabniki'];
+ }
+
+ ## Če se id strukture ujema z uporabnikovo hierarhijo
+ ## Če se trenutni nivo/level strukture ujema z uporabnikov, potem od tega nivoja naprej izpišemo celotno strukturo
+ if (in_array($obj->id, $hierarhija_drevo) || ($obj->ravni_level > $user_level && in_array($obj->parent_id, $hierarhija_drevo))) {
+ $hierarhija_drevo[] = $obj->parent_id;
+ $hierarhija_drevo[] = $obj->id;
+
+ $struktura[] = [
+ 'id' => $obj->id,
+ 'parent' => ((is_null($obj->parent_id) || $obj->ravni_level == 2) ? '#' : $obj->parent_id),
+ "text" => $obj->sifrant_ime . (!is_null($up) ? " - (" . $up . ")" : null)
+ ];
+ }
+ }
+
+ #Izpišemo celotno hierarhijo za admin uporabnika
+ } elseif ($hierarhija_type < 5) {
+ while ($obj = $hierarhija->fetch_object()) {
+ $up = null;
+
+ //preverimo, če so uporabniki v hierarhiji
+ if (!empty($hierarhija_users)) {
+ foreach ($hierarhija_users as $user) {
+ if ($obj->id == $user['id'])
+ $up = $user['uporabniki'];
+ }
+ }
+
+ $struktura[] = [
+ 'id' => $obj->id,
+ 'parent' => (is_null($obj->parent_id) ? '#' : $obj->parent_id),
+ 'text' => $obj->sifrant_ime . (!is_null($up) ? " - (" . $up . ")" : null)
+ ];
+
+ // v kolikor na gre ja jstree potem potrebujemo tudi številko levela za nadaljne operacije
+ if (!is_null($array)) {
+ end($struktura);
+ $key = key($struktura);
+ $struktura[$key]['level'] = $obj->level;
+ }
+
+ }
+ }
+ return $struktura;
+ }
+
+ /**
+ * SqL poizvedba, kjer pridobimo celotno strukturo in izdela polje, kjer nato pripravimo polje za vpis v Datatables
+ *
+ * @param $anketa
+ * @return array
+ */
+ public function hierarhijaArrayDataTables($anketa, $vpisani = null, $csv = false)
+ {
+ $this->anketa = $anketa;
+
+ $sql_vsa_hierarhija = (new HierarhijaOnlyQuery())->queryStruktura($anketa);
+
+ // Izdelamo polje iz sql poizvedbe, da bomo v nadaljevanju izdelali vgnezdeno polje
+ $struktura = [];
+ while ($obj = $sql_vsa_hierarhija->fetch_object()) {
+ // V kolikor ima strukturo že od prej vpisanih elementov, potem na tistem nivoju vpišemo samo ID strukture in vse ostale odstranimo
+ if (empty($vpisani[$obj->level - 1]) || $vpisani[$obj->level - 1]['izbrani']['id'] == $obj->id) {
+ $struktura[] = [
+ 'id' => $obj->id,
+ 'parent_id' => (is_null($obj->parent_id) ? 0 : $obj->parent_id),
+ 'name' => $obj->sifrant_ime,
+ 'level' => $obj->level
+ ];
+ }
+ }
+
+ // Pridobimo max število nivojev
+ $max_st = (new HierarhijaOnlyQuery())->getRavni($anketa, 'MAX(level) AS max_level')->fetch_object()->max_level;
+
+ return $this->izdelajVrsticeStrukture($struktura, $max_st, 0, [], $csv);
+ }
+
+ /**
+ * Iz polja celotne strukture naredimo vrstice za vpis v Datatables
+ *
+ * @param $elements - polje celotne strukture
+ * @param $parentId
+ * @param $polje - polje ene vrstice strukture, kjer elemente preneašamo napraj, da jih na koncu zapišemo kot vrstica v tabeli
+ * @param $max_st - maksimalno število nivojev, potrebno za generiranje praznih polj
+ * @return array
+ */
+
+ protected $skupno_polje = [];
+
+ protected function izdelajVrsticeStrukture(array $elements, $max_st = 1, $parentId = 0, $polje = [], $csv = false)
+ {
+ global $lang;
+
+ foreach ($elements as $key => $element) {
+ // Najprej poiščemoprvi nivo
+ if ($element['parent_id'] == $parentId) {
+ // Preveri, če obstaja uporabnik za omenjeno polje
+ $db_user = (new HierarhijaOnlyQuery())->queryStrukturaUsersGroupBy($this->anketa, ' AND hs.id="' . $element['id'] . '"');
+
+ $uporabniki = null;
+ if ($db_user->num_rows > 0)
+ $uporabniki = '<br />(' . $db_user->fetch_object()->uporabniki . ')';
+
+ $zacasno_polje = $polje;
+ array_push($zacasno_polje, array(
+ 'id' => $element['id'],
+ 'level' => $element['level'],
+ 'label' => $element['name'] . ((!$csv && !empty($uporabniki)) ? '<span style="color:#ffa608;">' . $uporabniki . '</span>' : ' ' . $uporabniki)
+ ));
+
+ // Rekurzivno gremo po vseh elementih do zadnjega, da pridobimo strukturo
+ $zadnji_element = $this->izdelajVrsticeStrukture($elements, $max_st, $element['id'], $zacasno_polje, $csv);
+
+ // V kolikor smo prišli do zadnjega elementa potem vpišemo v spremenljivko $this->skupno_polje
+ if ($zadnji_element == 0) {
+
+ // Preverimo koliko elementov smo že vpisali od vseh
+ // Kjer še niso vpisani vpišemo NULL, ker DataTables potrebuje vedeti število vseh nivojev
+ if (sizeof($zacasno_polje) < $max_st && !$csv) {
+ for ($i = sizeof($zacasno_polje); $i < ($max_st - 1); $i++) {
+ array_push($zacasno_polje, null);
+ }
+
+ // Na zadnji nivo vpišemo klicaj, v kolikor še ni dodan predmet in učitelj
+ array_push($zacasno_polje, array(
+ 'label' => '<span style="color:#fa4913; font-style: italic;">Manjka zadnji nivo</span><a href="/" id="help_srv_hierarhy_last_level_missing" lang="' . $lang['id'] . '" class="help" onclick="return false;" title_txt="' . $lang['help'] . '" style="color:#fa4913; font-weight: bold;float: right;padding: 0 30px;cursor: pointer;">
+ (!)
+ </a>'
+ ));
+ }
+
+ // Dodamo še gumbe
+ if (!$csv) {
+ $gumbi = '<span data-id="' . $element['id'] . '" class="ikona ikona-uporabniki" onclick="urediVrsticoHierarhije(' . $element['id'] . ')"></span>
+ <span data-id="' . $element['id'] . '" class="ikona ikona-kopiraj" onclick="kopirajVrsticoHierarhije(' . $element['id'] . ')"></span>
+ <span data-id="' . $element['id'] . '" class="ikona ikona-brisi" onclick="pobrisiVrsticoHierarhije(' . $element['id'] . ', 1)"></span>';
+
+ array_push($zacasno_polje, array(
+ 'label' => $gumbi
+ ));
+ }
+
+
+ $this->skupno_polje[] = $zacasno_polje;
+ }
+ }
+ }
+
+ // V kolior ni bilo nobenega elementa vpisanov $začano polje, potem smo prišli do konca drevesne strukture in vrnemo nič
+ if (is_null($zacasno_polje))
+ return 0;
+
+ return $this->skupno_polje;
+ }
+
+ /**
+ * Pridobi vse uporabnike za točno določeno strukturo in pripadajoče ID-je, da se jih lahko odstrani
+ *
+ * @param $id - struktura_id
+ * @return (array) $izbran_uporabnik
+ */
+ public function pridobiVseUporabnikeZaSpecificnoStrukturo($id)
+ {
+ $sql_izbrani_uporabniki = sisplet_query("SELECT
+ u.id as id,
+ u.email as email,
+ u.name as name,
+ u.surname as surname
+ FROM
+ srv_hierarhija_struktura_users AS stu
+ LEFT JOIN
+ users AS u ON u.id = stu.user_id
+ WHERE
+ hierarhija_struktura_id='" . $id . "'");
+
+ $izbran_uporabnik = array();
+ if ($sql_izbrani_uporabniki->num_rows > 0) {
+ while ($row = $sql_izbrani_uporabniki->fetch_object()) {
+ $uporabnik = $row->email;
+
+ // V kolikor obstaja ime in priimek potem tudi to dodamo poleg emaila
+ if ($row->email != $row->name || $row->email != $row->surname)
+ $uporabnik .= ' (' . $row->name . ' ' . $row->surname . ')';
+
+ $izbran_uporabnik[] = array(
+ 'id' => $row->id,
+ 'uporabnik' => $uporabnik
+ );
+ }
+ }
+
+ return $izbran_uporabnik;
+ }
+
+ /**
+ * Pridobi pravice uporabnika za sledečo anketo (v katerem nivoju se nahaja najvišje)
+ * @return object (level, struktura_id, parent_id)
+ */
+ public function preveriPravicoUporabnika($anketa_id)
+ {
+ global $global_user_id;
+ $hierarhija_type = (!empty($_SESSION['hierarhija'][$this->anketa]['type']) ? $_SESSION['hierarhija'][$this->anketa]['type'] : null);
+
+ // tukaj gre za admina in vrnemo samo to
+ if ($hierarhija_type < 5)
+ return ['uporabnik' => 1];
+
+ $sql_user = HierarhijaOnlyQuery::queryStrukturaUsersLevel($anketa_id, $global_user_id);
+
+ return $sql_user->fetch_object();
+ }
+
+ /**
+ * Poiščemo hierarhijo od tu navzgor in pridobimo vse ID vrednosti struktur
+ * @return array
+ */
+
+ public function poisciHierarhijoNavzgor($id, $polje = array())
+ {
+ // Ko pridemo na vrh potem sortiramo od 1. nivoja navzdol
+ if (is_null($id)) {
+ $polje = array_reverse($polje);
+ return $polje;
+ }
+
+
+ $sql_ravni = sisplet_query("SELECT id, parent_id, level, hierarhija_sifranti_id, hierarhija_ravni_id FROM srv_hierarhija_struktura WHERE id='" . $id . "'");
+ while ($row = $sql_ravni->fetch_object()) {
+ // Pridobimo še ime omenjenega šifranta
+ $ime = (new HierarhijaOnlyQuery())->getSamoSifrant($row->hierarhija_sifranti_id, true)->fetch_object()->ime;
+
+ $polje[] = [
+ 'ime' => $ime,
+ 'izbrani' => [
+ 'id' => $row->id,
+ 'level' => $row->level,
+ 'hierarhija_sifranti_id' => $row->hierarhija_sifranti_id,
+ 'hierarhija_ravni_id' => $row->hierarhija_ravni_id,
+ 'parent_id' => $row->parent_id
+ ]
+ ];
+
+ $id = $row->parent_id;
+ }
+
+ return $this->poisciHierarhijoNavzgor($id, $polje);
+ }
+
+ /**
+ * Pridobimo podate o uporabniku
+ *
+ * @param (int) $id
+ * @return object
+ */
+ public static function getUserSurvey($id = null)
+ {
+ if (is_null($id)) {
+ global $global_user_id;
+ $id = $global_user_id;
+ }
+
+ $user_db = sisplet_query("SELECT * FROM users WHERE id = '" . $id . "'", "obj");
+
+ if (!is_null($user_db))
+ return $user_db;
+
+ return null;
+ }
+
+ /**
+ * Pridobi podatek iz tabele
+ *
+ * @param (string) $table
+ * @param (string) $row - ime stolpca
+ * @return array or value
+ */
+ public static function getHierarhijaShraniRow($id, $col = false)
+ {
+ $sql = sisplet_query('SELECT * FROM srv_hierarhija_shrani WHERE id="' . $id . '"');
+ if ($sql->num_rows == 0)
+ return null;
+
+ $polje = [];
+ while ($obj = $sql->fetch_assoc()) {
+ $polje = $obj;
+ }
+
+ if ($col)
+ return $polje[$col];
+
+ return $polje;
+ }
+
+ /**
+ * Vpiši podatke v tabelo
+ *
+ * @param (array) $array
+ */
+ public function saveHierarhijaShraniRow($array)
+ {
+ $sql = sisplet_query('SELECT * FROM srv_hierarhija_shrani WHERE id="' . $id . '"');
+ if ($sql->num_rows == 0)
+ return null;
+
+ $polje = [];
+ while ($obj = $sql->fetch_assoc()) {
+ $polje = $obj;
+ }
+
+ if ($col)
+ return $polje[$col];
+
+ return $polje;
+ }
+
+ /**
+ * Prteveri branching, če imamo kako spremenljivko
+ *
+ * @param int $anketa
+ * @return string || int
+ */
+ public static function preveriBranchingCeJeKakoVprasanje($anketa)
+ {
+ $branching = sisplet_query("SELECT ank_id, element_spr FROM srv_branching WHERE ank_id='" . $anketa . "'", "obj");
+
+ // Nimamo še nobenega vprašanja
+ if (is_null($branching) || sizeof($branching) == 0)
+ return 1;
+
+ // preverimo tip vprašanja
+ if (is_array($branching)) {
+ $vsi_tipi_vprasanj = [];
+ foreach ($branching as $row) {
+ $element = sisplet_query("SELECT id, tip, variable FROM srv_spremenljivka WHERE id='" . $row->element_spr . "'", "obj");
+ // hierarhije je že bila aktivirana na obstoječi anketi
+ if ($element->variable == 'vloga')
+ return '9';
+
+ if (!in_array($element->tip, ['5', '6', '21']))
+ return 2;
+
+ // Vse tipe vprašanj dodamo v polje, da preverimo kasnje, da niso samo besedilana vprašanja
+ $vsi_tipi_vprasanj[] = $element->tip;
+ }
+
+ // Preverimo, če je samo besedilno vprašanje
+ if (!in_array('6', $vsi_tipi_vprasanj))
+ return 3;
+
+ } else {
+ $element = sisplet_query("SELECT id, tip, variable FROM srv_spremenljivka WHERE id='" . $branching->element_spr . "'", "obj");
+
+ if (!in_array($element->tip, ['6', 21]))
+ return 2;
+
+ // Imamo samo besedilo vprašanje
+ if ($element->tip == 21)
+ return 3;
+ }
+
+
+ return 'ok';
+
+ }
+
+ /**
+ * Uporabniko dodamo ali onemogočimo dostop
+ *
+ * @param integer $user_id
+ * @param string $tip - insert ali delete
+ */
+ public static function dostopZaUporabnika($anketa, $user_id, $tip = 'inset')
+ {
+
+ if ($tip == 'insert') {
+ $user_dostop = sisplet_query("SELECT ank_id, uid FROM srv_dostop WHERE ank_id='" . $anketa . "' AND uid='" . $user_id . "'");
+
+ if (mysqli_num_rows($user_dostop) == 0)
+ sisplet_query("INSERT INTO srv_dostop (ank_id, uid, aktiven, dostop) VALUES ('" . $anketa . "', '" . $user_id . "', 1, 'edit,lock,analyse')");
+ }
+
+ if ($tip == 'delete') {
+ $user_dostop = sisplet_query("SELECT ank_id, uid FROM srv_dostop WHERE ank_id='" . $anketa . "' AND uid='" . $user_id . "'");
+
+ if (mysqli_num_rows($user_dostop) > 0)
+ sisplet_query("DELETE FROM srv_dostop WHERE ank_id='" . $anketa . "' AND uid='" . $user_id . "'");
+ }
+ }
+
+
+ /**
+ * Generiraj supersifro in shrani kode
+ *
+ * @param int $anketa
+ * @param array $kode
+ */
+ public static function saveSuperSifra($anketa, $kode)
+ {
+ $kode = serialize($kode);
+
+ $vpis = false;
+ while (!$vpis) {
+ $vpis = sisplet_query("INSERT INTO srv_hierarhija_supersifra (koda, anketa_id, kode, datetime) VALUES
+ (CONCAT('s','s',SUBSTRING('abcdefghijklmnoprtuvz0123456789', RAND()*30+1, 1),
+ SUBSTRING('abcdefghijklmnoprtuvz0123456789', RAND()*30+1, 1),
+ SUBSTRING('abcdefghijklmnoprtuvz0123456789', RAND()*30+1, 1),
+ SUBSTRING('abcdefghijklmnoprtuvz0123456789', RAND()*30+1, 1),
+ SUBSTRING('abcdefghijklmnoprtuvz0123456789', RAND()*30+1, 1)), '" . $anketa . "', '" . $kode . "', NOW())");
+
+
+ }
+
+ return self::vseSuperkodeSpripadajocimiHierarhijami($anketa);
+ }
+
+ /**
+ * Pridobimo vse kode,ki pripadajo superšifri in vrnemo tudi strukturo ter email
+ *
+ * @param string $koda
+ * @param boolean $return
+ * @return array $kode or $polje - multiarray
+ */
+ public static function supersifraPridobiHierarhijo($koda, $return = false){
+ $kode = sisplet_query("SELECT kode, anketa_id FROM srv_hierarhija_supersifra WHERE koda='".$koda."'", "obj");
+ $anketa = $kode->anketa_id;
+ $kode = unserialize($kode->kode);
+
+ // Vrni samo kode
+ if($return)
+ return $kode;
+
+ $polje = [];
+ foreach($kode as $koda){
+ $struktura = sisplet_query("SELECT hierarhija_struktura_id AS id FROM srv_hierarhija_koda WHERE koda='".$koda."'", "obj");
+ $uporabnik = (new HierarhijaQuery())->pridobiVseUporabnikeZaSpecificnoStrukturo($struktura->id);
+
+ $polje[strtoupper($koda)] = [
+ 'hierarhija' => HierarhijaHelper::hierarhijaPrikazNaslovovpriUrlju($anketa, $struktura->id, $uporabnik[0]['id']),
+ 'ucitelj' => $uporabnik[0]['uporabnik']
+ ];
+ }
+
+ return $polje;
+ }
+
+
+ /**
+ * Pridobi vse superkode s pripadajočimi hierarhijami
+ *
+ * @param int $anketa
+ * @return array
+ */
+ public static function vseSuperkodeSpripadajocimiHierarhijami($anketa)
+ {
+ $super_sifre = sisplet_query("SELECT koda, kode FROM srv_hierarhija_supersifra WHERE anketa_id='".$anketa."' ORDER BY datetime", "obj");
+
+ if(is_object($super_sifre))
+ $super_sifre = [$super_sifre];
+
+ $polje = [];
+ foreach($super_sifre as $sifra){
+ $polje[strtoupper($sifra->koda)] = self::supersifraPridobiHierarhijo($sifra->koda);
+ }
+
+ return $polje;
+ }
+
+ protected
+ $sql;
+
+ public function sqlError($sql)
+ {
+ if (!$sql) {
+ echo mysqli_error($GLOBALS['connect_db']);
+ die();
+ }
+
+ }
+
+} \ No newline at end of file
diff --git a/admin/survey/modules/mod_hierarhija/porocila/R/Anketiranci.docx b/admin/survey/modules/mod_hierarhija/porocila/R/Anketiranci.docx
new file mode 100644
index 0000000..51457c1
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/porocila/R/Anketiranci.docx
Binary files differ
diff --git a/admin/survey/modules/mod_hierarhija/porocila/R/Hierarhija_1ka.R b/admin/survey/modules/mod_hierarhija/porocila/R/Hierarhija_1ka.R
new file mode 100644
index 0000000..9a2a617
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/porocila/R/Hierarhija_1ka.R
@@ -0,0 +1,358 @@
+##################
+# REPORTS IN WORD
+##################
+
+#-------------------------- PHP ----------------------------#
+# Passing arguments to an R script from command lines
+params <- commandArgs(trailingOnly=TRUE)
+# CSV name
+filename <- params[1]
+# Name of produced doc file
+fileOutputName <- params[3]
+# Name of inserted logo in doc file
+logoName <- params[4]
+## //Passing arguments// ##
+#---------------------- //PHP// ----------------------------#
+
+
+#--------------------- SLOVENE ENCODING --------------------#
+# For correct output of CZS in report
+Sys.setlocale(category = "LC_ALL", locale = "slovenian")
+#------------------- //SLOVENE ENCODING// ------------------#
+
+
+#------------------- Necessary libraries -------------------#
+libraries <- c('fmsb','car','plyr','matrixStats','ReporteRs',
+ 'magrittr','ggplot2','scales')
+lapply(libraries, FUN = function(y) {
+ do.call('require', list(y))})
+#------------------- //Necessary libraries// ---------------#
+
+
+#--------------------- CUSTOM FUNCTIONS --------------------#
+# Rounding up the value
+round2 = function(x, n) {
+ posneg = sign(x)
+ z = abs(x)*10^n
+ z = z + 0.5
+ z = trunc(z)
+ z = z/10^n
+ z*posneg
+}
+
+# Factor to numeric
+as.numeric.factor <- function(x) {as.numeric(levels(x))[x]}
+#--------------------//CUSTOM FUNCTIONS// ------------------#
+
+
+########################################
+#--------------------------------------- DATA: importing and processing --------------------------------------------#
+ #############################################
+# Import data
+Hierarhija <- read.csv2(paste0("modules/mod_hierarhija/porocila/temp/",filename),
+ sep = ";", header = T, fill = T, stringsAsFactors = FALSE)
+# Variable names (later for extracting possible comments of students or teacher)
+Hierarhija_names <- Hierarhija[1, ]
+# Omit the first row od the data base
+if (Hierarhija[1,1]==("Ustreznost") | Hierarhija[1,1]==("Relevance")) {Hierarhija <- Hierarhija[2:nrow(Hierarhija),]}
+
+
+# CREATE REPORTS ONLY IF THERE IS MORE THAN 1 ANSWER
+if (nrow(Hierarhija) > 1) {
+
+# First we need to provide that CSZ in 1KA SERVER will be outputed correctly
+Hierarhija_names[,-1] <- gsub('Č', '\u010C', as.matrix(Hierarhija_names[,-1]))
+Hierarhija_names[,-1] <- gsub('č', '\u010D', as.matrix(Hierarhija_names[,-1]))
+Hierarhija_names[,-1] <- gsub('Š', '\u0160', as.matrix(Hierarhija_names[,-1]))
+Hierarhija_names[,-1] <- gsub('š', '\u0161', as.matrix(Hierarhija_names[,-1]))
+Hierarhija_names[,-1] <- gsub('Ž', '\u017D', as.matrix(Hierarhija_names[,-1]))
+Hierarhija_names[,-1] <- gsub('ž', '\u017E', as.matrix(Hierarhija_names[,-1]))
+
+# # If these values are present in students comments we will delete them
+junk <- c("-1","-2", "-3", "-4", "-5")
+
+# Students grades/asnwers
+Hierarhija_ucenci <- subset(Hierarhija, vloga == 1)
+if(!nrow(Hierarhija_ucenci) > 0) {Hierarhija_ucenci <- NULL}
+
+# Teachers grades/asnwers (samoevalvacija)
+Hierarhija_ucitelj <- subset(Hierarhija, vloga == 2)
+if(!nrow(Hierarhija_ucitelj) > 0) {Hierarhija_ucitelj <- NULL}
+
+# Labeling hierarchy (poimenovanje hierarhije)
+nivo <- unique(Hierarhija_ucenci[grep("nivo", names(Hierarhija_ucenci), value = TRUE)])
+# Course names (ime predmeta)
+nivo.predmet <- do.call(paste0, nivo[length(nivo)])
+nivo.predmet <- paste(nivo.predmet, collapse = ', ')
+# Paste hierarchy info in one row (we will use later for writing these info in the head of word document)
+nivo <- unique(unlist(nivo))
+nivo <- paste0(nivo, collapse=', ')
+#--------------------------------------- //DATA: importing and processing// --------------------------------------------#
+
+
+#------------------------------------- START PROCESSING DATA: TABLES AND GRAPHS ----------------------------------------#
+# If there are multiple content/segment questions (Q1, Q2, ...) in the questionnaire we would like to separate them for
+# tables and ggplots
+
+###################################################################################
+# Loop and find the multiple content questions (without comments if there were any)
+###################################################################################
+# Extract segemnts (Q1, Q2, ...)
+data <- Hierarhija_ucenci[,grep("Q", colnames(Hierarhija_ucenci))]
+# Seperate this segments
+uniqueSegemnts <- unique(substr(colnames(data), 1, 2))
+# Assign values of unique segments (and colnames) to list
+uniqueSegemntsLS <- lapply(uniqueSegemnts, function(x) data[grepl(x, colnames(data))])
+
+# If there are any comments dont include them in calculating descriptive statistics form tables
+uniqueSegemntsLS <- Filter(function(x)length(x)>=2, uniqueSegemntsLS )
+#listaSklopov[names(listaSklopov)[lengths(listaSklopov) < 2]] <- NULL
+
+# Define new vaariables to which we will assign the output of our loop
+tabele <- NULL # Tables
+grafi <- NULL # GGplot
+
+##############################################################################
+#START LOOP: CALCULATING DESCRIPTIVE STATISTICS NAD CRETING TABLES AND GGPLOTS
+##############################################################################
+for (stSklopa in seq(uniqueSegemntsLS)) {
+
+ # Multiple questions part
+ indexi_sklopa <- colnames(uniqueSegemntsLS[[stSklopa]])
+
+ ########################
+ # DESCRIPTIVE STATISTICS
+ ########################
+ ocena <- sapply(Hierarhija_ucenci[,indexi_sklopa], as.numeric)
+ ocena[ocena < 0] <- 0
+
+ # Answers average
+ predM <- round2(colMeans(NA^(ocena==0)*ocena, na.rm=TRUE),1)
+
+ # MAX
+ #colMax <- function(data) apply(data, 1, min)
+ #PredMed <- colMax(predmet)
+
+ # SD
+ PredSD <- round2(colSds(NA^(ocena==0)*ocena, na.rm=TRUE),1)
+
+ # N
+ PredN <- colSums(!is.na(ocena))
+
+ ######################
+ # START CREATING TABLE
+ ######################
+ # Generating table of frequencies and percentages
+ table <- cbind.data.frame(
+ mean=predM,
+ n=PredN,
+ #median=PredMed,
+ sd=PredSD)
+
+ # Adding row of total average
+ table <- rbind(table, colMeans(table[1:ncol(table)], na.rm=TRUE))
+ table <- round2(table,1)
+
+ # Ime stolpca in Ocene u?itelja v stolpcu
+ if (nrow(Hierarhija_ucitelj[,indexi_sklopa]) > 1) {
+ nameCOL <- "Povpre\u010Dje U\u010Ditelj" # Ime stolpca
+ } else {
+ nameCOL <- "U\u010Ditelj (samoocena)" # Ime stolpca
+ }
+ if(!is.null(Hierarhija_ucitelj[,indexi_sklopa])) { # Samo ?e se je u?itelj ?e ocenil
+ if (nrow(Hierarhija_ucitelj[,indexi_sklopa]) > 1) {
+ Hierarhija_ucitelPRED <- colMeans(sapply(Hierarhija_ucitelj[,indexi_sklopa], as.numeric), na.rm = TRUE)
+ } else {
+ Hierarhija_ucitelPRED <- as.numeric(Hierarhija_ucitelj[,indexi_sklopa])
+ }
+ table <- cbind(table,c(Hierarhija_ucitelPRED,"."))
+ } else {Hierarhija_ucitelPRED <- NULL
+ nameCOL <- NULL}
+
+ # Rownames
+ rownames(table) <- c(Hierarhija_names[indexi_sklopa], "Skupaj")
+
+ # Colnames
+ colnames(table) <- c('Povpre\u010Dne ocene', '\u0160t. odgovorov',"Standardni odklon", nameCOL)
+
+ # Write multiple tables in a list
+ tabele[[stSklopa]] <- table
+
+
+ ##############################
+ ## GGPLOT: DATA PREPARATION ##
+ ##############################
+
+ vloga_ucenec <- rep("u\u010Denec", nrow(table) - 1)
+ kategorija_ucenec <- rownames(table)[rownames(table) != "Skupaj"]
+ ocena_ucenec <- table[-nrow(table), 1]
+ Vloga_Ocena_ucenec <- as.data.frame(cbind(vloga_ucenec, kategorija_ucenec, ocena_ucenec))
+ colnames(Vloga_Ocena_ucenec) <- c("Vloga", "Kategorija", "Povprecje")
+
+ if(!is.null(Hierarhija_ucitelj[,indexi_sklopa])) {
+ vloga_ucitelj <- rep("u\u010Ditelj",nrow(table) - 1)
+ kategorija_ucitelj <- rownames(table)[rownames(table) != "Skupaj"]
+ ocena_ucitelj <- table[ncol(table)]
+ ocena_ucitelj <- as.numeric(ocena_ucitelj[ocena_ucitelj != "."])
+ Vloga_Ocena_ucitelj <- as.data.frame(cbind(vloga_ucitelj, kategorija_ucitelj, ocena_ucitelj))
+ colnames(Vloga_Ocena_ucitelj) <- c("Vloga", "Kategorija", "Povprecje")
+ }else {Vloga_Ocena_ucitelj <- NULL}
+
+ Skupna_ocena <- rbind(Vloga_Ocena_ucenec, Vloga_Ocena_ucitelj)
+ # Order factor lables as same as they are in data frame
+ Skupna_ocena$Povprecje <- as.numeric.factor(Skupna_ocena$Povprecje)
+
+ # GGPLOT: text break in a certain number of characters in the graph
+ Skupna_ocena$Kategorija <- gsub('(.{1,25})(\\s|$)', '\\1\n', Skupna_ocena$Kategorija)
+
+
+ # Creating ggplot
+ bp <- ggplot(Skupna_ocena, aes(factor(Kategorija), Povprecje, fill = Vloga)) +
+ geom_bar(stat="identity", position = "dodge",width=0.7) +
+ scale_fill_brewer(palette = "Set1") + coord_flip() +
+ theme_bw() +
+ scale_y_continuous(expand=c(0,0), limits=c(1,5),oob = rescale_none) +
+ scale_x_discrete(expand=c(0,0),limits=unique(rev(Skupna_ocena$Kategorija))) +
+ theme(axis.title=element_blank(),axis.ticks.y=element_blank(),
+ axis.text.x = element_text(angle = 0,vjust = 0.4)) +
+ ggtitle("Grafikon povpre\u010Dij komponent glede na vlogo")
+
+ # Write multiple ggplots in a list
+ grafi[[stSklopa]] <- bp
+}
+#----------------------------------- //START PROCESSING DATA: TABLES AND GRAPHS// --------------------------------------#
+
+
+#------------------------------------------------ NOT USING THIS NOW ---------------------------------------------------#
+########################
+# DATA FOR RADAR CHART #
+########################
+#test <- cbind.data.frame(
+ # mean=predM)
+
+# provide the data you want to plot, and the desired range
+#radar.data <- t(test)
+#myrange <- c(1, 5)
+
+# create a data frame with the max and min as the first two rows
+#mydf <- data.frame(rbind(max=myrange[2], min=myrange[1], radar.data))
+
+# Insert colnames
+#colnames(mydf) <- c(Hierarhija_names[grep("Q1", names(Hierarhija_names), value=TRUE)])
+#--------------------------------------------- //NOT USING THIS NOW// -------------------------------------------------#
+
+
+########################################################################################################################
+
+
+################################################
+#----------------------------------------------- COMPILING WORD REPORT -----------------------------------------------#
+ #################################################
+#options("ReporteRs-default-font" = "Times New Roman")
+# Create a docx object
+doc = docx()
+# template with Head bookmark (in the head of word document we will print students info)
+template <- "modules/mod_hierarhija/porocila/R/Anketiranci.docx"
+doc = docx( template = template )
+# Header / BOOKMARK :info about students (grade, program, etc.)
+doc = addParagraph(doc, nivo, bookmark = "Anketiranci")
+# School logo
+img.file <- file.path("modules/mod_hierarhija/porocila/logo", logoName)
+# If school logo exist
+if(file.exists(img.file)){
+# Insert scool logo in word: FIRST PAGE/ TOP MARGIN
+doc <- addImage(doc,img.file, width = 2.0, height = 1.5, par.properties = parLeft() )
+}
+# add a document title
+doc = addParagraph( doc, "SAMOEVALVACIJA V \u0160OLAH", stylename = "TitleDoc" )
+
+
+#---------------------------- CREATE AND WRITE MULTIPLE TABLES AND GGPLOTS -----------------------------------#
+for (i in seq_along(tabele)) {
+# some text
+# add a slide title
+doc <- addTitle(doc, "Povpre\u010Dje komponent glede na vlogo" )
+# Boldamo ime predmeta
+nivo.predmet.bold = pot("V tabeli so prikazane opisne statistike za u\u010Ditelja pri predmetu ", textProperties(font.weight = 'normal')) +
+ pot(nivo.predmet, textProperties(font.weight = 'bold'))
+#doc <- addTitle(doc, "Oceni, kako pogosto naslednje trditve veljajo za u\u010Ditelja/-ico pri tem predmetu",level = 2)
+doc = addParagraph(doc, nivo.predmet.bold, stylename = "DocDefaults" )
+# add a table
+MyFTable = FlexTable(tabele[[i]], add.rownames = TRUE ) # Descriptive statistics for Oceni, kako pogosto naslednje trditve veljajo za u?itelja/-ico pri tem predmetu
+doc = addFlexTable(doc, MyFTable)
+# 2 line breaks after table
+doc <- addParagraph(doc, c("", ""))
+# A function for creating a box plot
+# Add an editable box plot
+doc <- addPlot(doc, function() print(grafi[[i]]) ,vector.graphic = TRUE, width = 5, height = 3.6)
+# add a page break
+doc <- addPageBreak(doc)
+}
+#--------------------------- //CREATE AND WRITE MULTIPLE TABLES AND GGPLOTS// ------------------------------#
+
+
+#------------------------------------------ COMMENTS OF STUDENTS -------------------------------------------#
+if(!is.null(Hierarhija_ucenci)) {
+ if("Ima\u0161 \u0161e kak komentar?" %in% Hierarhija_names[,1:ncol(Hierarhija_names)] | "Komentar" %in% Hierarhija_names[,1:ncol(Hierarhija_names)]) {
+ komentarji <- Hierarhija_ucenci[which(apply(Hierarhija_names, 2, function(x) any(grepl("Ima\u0161 \u0161e kak komentar?|Komentar", x))))][,1]
+ komentarji <- komentarji[!komentarji %in% junk]
+ if (identical(komentarji, character(0)) == FALSE) {
+ # Capture students comments for open ended question
+ doc <- addTitle(doc, "Komentarji u\u010Dencev na odprto vpra\u0161anje")
+ komentarji <- gsub('Č', '\u010C', komentarji)
+ komentarji<- gsub('č', '\u010D', komentarji)
+ komentarji <- gsub('Š', '\u0160', komentarji)
+ komentarji <- gsub('š', '\u0161', komentarji)
+ komentarji <- gsub('Ž', '\u017D', komentarji)
+ komentarji <- gsub('ž', '\u017E', komentarji)
+ doc <- addParagraph(doc, value= komentarji, par.properties = parProperties(list.style = 'unordered'))
+ }
+ }
+}
+#---------------------------------------- //COMMENTS OF STUDENTS// -----------------------------------------#
+
+
+#------------------------------------------ COMMENTS OF TEACHERS -------------------------------------------#
+if(!is.null(Hierarhija_ucitelj)) {
+if("Ima\u0161 \u0161e kak komentar?" %in% Hierarhija_names[,1:ncol(Hierarhija_names)] | "Komentar" %in% Hierarhija_names[,1:ncol(Hierarhija_names)]) {
+komentarji <- Hierarhija_ucitelj[which(apply(Hierarhija_names, 2, function(x) any(grepl("Ima\u0161 \u0161e kak komentar?|Komentar", x))))][,1]
+komentarji <- komentarji[!komentarji %in% junk]
+if (identical(komentarji, character(0)) == FALSE) {
+# Capture teacher comments for open ended question
+doc <- addParagraph(doc, c("", "")) # 2 line breaks
+doc <- addTitle(doc, "Komentar u\u010Ditelja na odprto vpra\u0161anje")
+komentarji <- gsub('Č', '\u010C', komentarji)
+komentarji<- gsub('č', '\u010D', komentarji)
+komentarji <- gsub('Š', '\u0160', komentarji)
+komentarji <- gsub('š', '\u0161', komentarji)
+komentarji <- gsub('Ž', '\u017D', komentarji)
+komentarji <- gsub('ž', '\u017E', komentarji)
+doc <- addParagraph(doc, value= komentarji, par.properties = parProperties(list.style = 'unordered'))
+ }
+ }
+}
+#---------------------------------------- //COMMENTS OF TEACHERS// ----------------------------------------#
+
+#NOT DOING THIS NOW Creating RADAR CHART with LEGEND
+#doc = addParagraph(doc, value = "Povpre?ne ocene komponent", stylename = "rPlotLegend")
+#doc <- addPlot(doc, function() print(c(radarchart(mydf, pcol=c("#e41a1c", "#377eb8", "#4daf4a","#984ea3"), cglcol='gray75',
+ # plwd=2, plty=1, cglwd=1, cglty=1, seg=4, axistype=1, caxislabels=c(1:5),
+ # axislabcol='gray25', centerzero=TRUE),
+ # legend('topright', legend=c("U?enci","U?itelj"),
+ # col=c("#e41a1c", "#377eb8", "#4daf4a","#984ea3"), lty=1, lwd=2, bty='n')), vector.graphic = TRUE ))
+
+#------------------------------------------ WRITE AND SAVE DOCX ------------------------------------------#
+# write the doc
+writeDoc(doc, file = paste0("modules/mod_hierarhija/porocila/results/",fileOutputName))
+# open the Word doc
+#browseURL("Samoevalvacija1.docx") # This line is not needed, is only to open the Word doc from Rstudio
+} else {
+# Create a docx object
+doc = docx()
+# add a document title
+doc = addParagraph( doc, "Zaradi premajhnega števila enot (1 ali manj) se poro\u010Dilo ni zgeneriralo.", stylename = "Normal" )
+writeDoc(doc, file = paste0("modules/mod_hierarhija/porocila/results/",fileOutputName))
+
+}
+
+#----------------------------------------------- //COMPILING WORD REPORT// -----------------------------------------------#
diff --git a/admin/survey/modules/mod_hierarhija/porocila/R/Hierarhija_1ka_pdf.R b/admin/survey/modules/mod_hierarhija/porocila/R/Hierarhija_1ka_pdf.R
new file mode 100644
index 0000000..401c854
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/porocila/R/Hierarhija_1ka_pdf.R
@@ -0,0 +1,315 @@
+##################
+# REPORTS IN WORD
+##################
+
+#-------------------------- PHP ----------------------------#
+# Passing arguments to an R script from command lines
+params <- commandArgs(trailingOnly=TRUE)
+# CSV name
+filename <- params[1]
+# Name of produced doc file
+fileOutputName <- params[3]
+# Name of inserted logo in doc file
+logoName <- params[4]
+## //Passing arguments// ##
+#---------------------- //PHP// ----------------------------#
+
+
+#--------------------- SLOVENE ENCODING --------------------#
+# For correct output of CZS in report
+Sys.setlocale(category = "LC_ALL", locale = "slovenian")
+#------------------- //SLOVENE ENCODING// ------------------#
+
+
+#------------------- Necessary libraries -------------------#
+libraries <- c('fmsb','car','plyr','matrixStats','magrittr',
+ 'ggplot2','scales','Hmisc','xtable')
+lapply(libraries, FUN = function(y) {
+ do.call('require', list(y))})
+#------------------- //Necessary libraries// ---------------#
+
+
+#--------------------- CUSTOM FUNCTIONS --------------------#
+# Rounding up the value
+round2 = function(x, n) {
+ posneg = sign(x)
+ z = abs(x)*10^n
+ z = z + 0.5
+ z = trunc(z)
+ z = z/10^n
+ z*posneg
+}
+
+# Factor to numeric
+as.numeric.factor <- function(x) {as.numeric(levels(x))[x]}
+#--------------------//CUSTOM FUNCTIONS// ------------------#
+
+
+########################################
+#--------------------------------------- DATA: importing and processing --------------------------------------------#
+ #############################################
+
+# Mapa, kjer se generira PDF slike grafov
+dir.create('modules/mod_hierarhija/porocila/results/slike', showWarnings=FALSE)
+
+# Import data # For correct output of CZS in report (boath tables and ggplot graphs) we need to omit enocoding="UTF-8" in read.csv2
+Hierarhija <- read.csv2(paste0("modules/mod_hierarhija/porocila/temp/",filename),
+ sep = ";", header = T, fill = T, stringsAsFactors = FALSE)
+
+# Variable names (later for extracting possible comments of students or teacher)
+Hierarhija_names <- Hierarhija[1, ]
+# Omit the first row od the data base
+if (Hierarhija[1,1]==("Ustreznost") | Hierarhija[1,1]==("Relevance")) {Hierarhija <- Hierarhija[2:nrow(Hierarhija),]}
+
+
+# CREATE REPORTS ONLY IF THERE IS MORE THAN 1 ANSWER
+if (nrow(Hierarhija) > 1) {
+
+ # If these values are present in students comments we will delete them
+ junk <- c("-1","-2", "-3", "-4", "-5")
+
+ # Students grades/asnwers
+ Hierarhija_ucenci <- subset(Hierarhija, vloga == 1)
+ if(!nrow(Hierarhija_ucenci) > 0) {Hierarhija_ucenci <- NULL}
+
+ # Teachers grades/asnwers (samoevalvacija)
+ Hierarhija_ucitelj <- subset(Hierarhija, vloga == 2)
+ if(!nrow(Hierarhija_ucitelj) > 0) {Hierarhija_ucitelj <- NULL}
+
+ # Labeling hierarchy (poimenovanje hierarhije)
+ nivo <- unique(Hierarhija_ucenci[grep("nivo", names(Hierarhija_ucenci), value = TRUE)])
+ # Course names (ime predmeta)
+ nivo.predmet <- as.character(nivo[length(nivo)])
+ # Paste hierarchy info in one row (we will use later for writing these info in the head of word document)
+ nivo <- paste0(nivo, collapse=', ')
+ #--------------------------------------- //DATA: importing and processing// --------------------------------------------#
+
+
+ #------------------------------------- START PROCESSING DATA: TABLES AND GRAPHS ----------------------------------------#
+ # If there are multiple content/segment questions (Q1, Q2, ...) in the questionnaire we would like to separate them for
+ # tables and ggplots
+
+ ###################################################################################
+ # Loop and find the multiple content questions (without comments if there were any)
+ ###################################################################################
+ # Extract segemnts (Q1, Q2, ...)
+ data <- Hierarhija_ucenci[,grep("Q", colnames(Hierarhija_ucenci))]
+ # Seperate this segments
+ uniqueSegemnts <- unique(substr(colnames(data), 1, 2))
+ # Assign values of unique segments (and colnames) to list
+ uniqueSegemntsLS <- lapply(uniqueSegemnts, function(x) data[grepl(x, colnames(data))])
+
+ # If there are any comments dont include them in calculating descriptive statistics form tables
+ uniqueSegemntsLS <- Filter(function(x)length(x)>=2, uniqueSegemntsLS )
+ #listaSklopov[names(listaSklopov)[lengths(listaSklopov) < 2]] <- NULL
+
+ # Define new vaariables to which we will assign the output of our loop
+ ucitelji <- NULL # Tables
+
+ ##############################################################################
+ #START LOOP: CALCULATING DESCRIPTIVE STATISTICS NAD CRETING TABLES AND GGPLOTS
+ ##############################################################################
+ for (stSklopa in seq(uniqueSegemntsLS)) {
+
+ # Multiple questions part
+ indexi_sklopa <- colnames(uniqueSegemntsLS[[stSklopa]])
+
+ ########################
+ # DESCRIPTIVE STATISTICS
+ ########################
+ ocena <- sapply(Hierarhija_ucenci[,indexi_sklopa], as.numeric)
+ ocena[ocena < 0] <- 0
+
+ # Answers average
+ predM <- round2(colMeans(NA^(ocena==0)*ocena, na.rm=TRUE),1)
+
+ # MAX
+ #colMax <- function(data) apply(data, 1, min)
+ #PredMed <- colMax(predmet)
+
+ # SD
+ PredSD <- round2(colSds(NA^(ocena==0)*ocena, na.rm=TRUE),1)
+
+ # N
+ PredN <- colSums(!is.na(ocena))
+
+ ######################
+ # START CREATING TABLE
+ ######################
+ # Generating table of frequencies and percentages
+ table <- cbind.data.frame(
+ mean=predM,
+ n=PredN,
+ #median=PredMed,
+ sd=PredSD)
+
+ # Adding row of total average
+ table <- rbind(table, colMeans(table[1:ncol(table)], na.rm=TRUE))
+ table <- round2(table,1)
+
+ # Ime stolpca in Ocene u?itelja v stolpcu
+ nameCOL <- "Učitelj" # Ime stolpca
+ digitsUcitelj <- 0 # če se je ucitelj ocenil to zapišemo v xtable pri "digits", drugače ostane NULL
+ if(!is.null(Hierarhija_ucitelj[,indexi_sklopa])) { # Samo ?e se je u?itelj ?e ocenil
+ Hierarhija_ucitelPRED <- as.numeric(Hierarhija_ucitelj[,indexi_sklopa])
+ table <- cbind(table,c(Hierarhija_ucitelPRED,"."))
+ } else {Hierarhija_ucitelPRED <- NULL
+ nameCOL <- NULL
+ digitsUcitelj <- NULL}
+
+ # Rownames
+ rownames(table) <- c(Hierarhija_names[indexi_sklopa], "Skupaj")
+
+ # Colnames
+ colnames(table) <- c(paste('Povprečje'), paste('Št. odgovorov'),"Standardni odklon",nameCOL)
+
+ # Write multiple tables in a list
+ #tabele[[stSklopa]] <- c("\\renewcommand{\\arraystretch}{0.4}", table.tex)
+
+
+ ##############################
+ ## GGPLOT: DATA PREPARATION ##
+ ##############################
+
+ vloga_ucenec <- rep("u\u010Denec", nrow(table) - 1)
+ kategorija_ucenec <- rownames(table)[rownames(table) != "Skupaj"]
+ ocena_ucenec <- table[-nrow(table), 1]
+ Vloga_Ocena_ucenec <- as.data.frame(cbind(vloga_ucenec, kategorija_ucenec, ocena_ucenec))
+ colnames(Vloga_Ocena_ucenec) <- c("Vloga", "Kategorija", "Povprecje")
+
+ if(!is.null(Hierarhija_ucitelj[,indexi_sklopa])) {
+ vloga_ucitelj <- rep("u\u010Ditelj",nrow(table) - 1)
+ kategorija_ucitelj <- rownames(table)[rownames(table) != "Skupaj"]
+ ocena_ucitelj <- table[ncol(table)]
+ ocena_ucitelj <- as.numeric(ocena_ucitelj[ocena_ucitelj != "."])
+ Vloga_Ocena_ucitelj <- as.data.frame(cbind(vloga_ucitelj, kategorija_ucitelj, ocena_ucitelj))
+ colnames(Vloga_Ocena_ucitelj) <- c("Vloga", "Kategorija", "Povprecje")
+ }else {Vloga_Ocena_ucitelj <- NULL}
+
+ Skupna_ocena <- rbind(Vloga_Ocena_ucenec, Vloga_Ocena_ucitelj)
+ # Order factor lables as same as they are in data frame
+ Skupna_ocena$Povprecje <- as.numeric.factor(Skupna_ocena$Povprecje)
+
+ # GGPLOT: text break in a certain number of characters in the graph
+ Skupna_ocena$Kategorija <- gsub('(.{1,25})(\\s|$)', '\\1\n', Skupna_ocena$Kategorija)
+ # First we need to provide that CSZ in 1KA SERVER will be outputed correctly in ggplot graphs
+ Skupna_ocena$Kategorija <- gsub('Č', '\u010C', Skupna_ocena$Kategorija)
+ Skupna_ocena$Kategorija <- gsub('č', '\u010D', Skupna_ocena$Kategorija)
+ Skupna_ocena$Kategorija <- gsub('Š', '\u0160', Skupna_ocena$Kategorija)
+ Skupna_ocena$Kategorija <- gsub('š', '\u0161', Skupna_ocena$Kategorija)
+ Skupna_ocena$Kategorija <- gsub('Ž', '\u017D', Skupna_ocena$Kategorija)
+ Skupna_ocena$Kategorija <- gsub('ž', '\u017E', Skupna_ocena$Kategorija)
+
+ # Dont forget to insert encoding in pdf() encoding = 'CP1250'
+ pdf(paste('modules/mod_hierarhija/porocila/results/slike/graf_',stSklopa,'.pdf', sep=""), pointsize=15, width=6.8, height=5.5, encoding = 'CP1250')
+ # Creating ggplot
+ bp <- ggplot(Skupna_ocena, aes(factor(Kategorija), Povprecje, fill = Vloga)) +
+ geom_bar(stat="identity", position = "dodge", width=0.5) +
+ scale_fill_brewer(palette = "Set1") + coord_flip() +
+ theme_bw() +
+ scale_y_continuous(expand=c(0,0), limits=c(1,5),oob = rescale_none) +
+ scale_x_discrete(expand=c(0,0),limits=unique(rev(Skupna_ocena$Kategorija))) +
+ theme(axis.title=element_blank(),axis.ticks.y=element_blank(),
+ axis.text.x = element_text(angle = 0, vjust = 0.4, size = 12),
+ axis.text.y = element_text(size = 12),
+ legend.text=element_text(size=12)) +
+ ggtitle("Grafikon povpre\u010Dij komponent glede na vlogo")
+
+ print(bp)
+
+ dev.off() # Save ggplot to pdf
+
+ # Write multiple tables and ggplots
+ tabele.grafi <- c(paste0("\\section{POVPREČJE KOMPONENT GLEDE NA VLOGO}"),"V tabeli so prikazane deskriptivne statistike učitelja pri predmetu ",nivo.predmet,
+ print.xtable(xtable(table, align=c('|p{3in}|',rep('c|', ncol(table))), # p{3in} text wrapping row.names
+ digits = c(0,1,0,1,digitsUcitelj)), hline.after= -1:nrow(table),
+ scalebox=0.93),
+ # GGPLOT
+ paste0(
+ "\\begin{figure}[H]",
+ #"\\caption{ \\textbf{\\large{Oddelki_podatki}}}",
+ paste0("\\centerline{\\includegraphics[width=0.6\\textwidth]{slike/graf_",stSklopa,".pdf}}"),
+ "\\end{figure}"),"\\newpage")
+
+
+ # Assign
+ ucitelji[[stSklopa]] <- tabele.grafi
+
+ }
+
+ #----------------------------------- //START PROCESSING DATA: TABLES AND GRAPHS// --------------------------------------#
+
+
+ #------------------------------------------ COMMENTS OF STUDENTS -------------------------------------------#
+ if(!is.null(Hierarhija_ucenci)) {
+ if("komentar" %in% Hierarhija_names[,1:ncol(Hierarhija_names)] | "Komentar" %in% Hierarhija_names[,1:ncol(Hierarhija_names)]) {
+ komentarji <- Hierarhija_ucenci[which(apply(Hierarhija_names, 2, function(x) any(grepl("komentar|Komentar", x))))][,1]
+ komentarji <- komentarji[!komentarji %in% junk]
+ if (identical(komentarji, character(0)) == FALSE) {
+ # Capture students comments for open ended question
+ komentarji <- reports::LL(text=Hmisc::latexTranslate(komentarji), copy2clip=FALSE, enumerate=FALSE)
+ komentarji <- c("\\section{Komentarji učencev na odprto vprašanje}", komentarji)
+ }
+ } else {komentarji <- NULL}
+ } else {komentarji <- NULL}
+ #---------------------------------------- //COMMENTS OF STUDENTS// -----------------------------------------#
+
+
+ #------------------------------------------ COMMENTS OF TEACHERS -------------------------------------------#
+ # if(!is.null(Hierarhija_ucitelj)) {
+ # if("komentar" %in% Hierarhija_names[,1:ncol(Hierarhija_names)] | "Komentar" %in% Hierarhija_names[,1:ncol(Hierarhija_names)]) {
+ #
+ # komentarji <- Hierarhija_ucitelj[which(apply(Hierarhija_names, 2, function(x) any(grepl("komentar|Komentar", x))))][,1]
+ # komentarji <- komentarji[!komentarji %in% junk]
+ # if (identical(komentarji, character(0)) == FALSE) {
+ # # Capture teacher comments for open ended question
+ # doc <- addParagraph(doc, c("", "")) # 2 line breaks
+ # doc <- addTitle(doc, "Komentar u\u010Ditelja na odprto vpra\u0161anje")
+ # #komentarji <- gsub('Č', '\u010C', komentarji)
+ # #komentarji<- gsub('č', '\u010D', komentarji)
+ # #komentarji <- gsub('Š', '\u0160', komentarji)
+ # #komentarji <- gsub('š', '\u0161', komentarji)
+ # #komentarji <- gsub('Ž', '\u017D', komentarji)
+ # #komentarji <- gsub('ž', '\u017E', komentarji)
+ # doc <- addParagraph(doc, value= komentarji, par.properties = parProperties(list.style = 'unordered'))
+ # }
+ # }
+ # }
+ #---------------------------------------- //COMMENTS OF TEACHERS// ----------------------------------------#
+
+
+ ########################################################################################################################
+
+
+ ##################
+ # Generiranje PDF
+ ##################
+ # Scan latex files where we defined structure od a document
+ # character(0) for a string ,sep="\n" separate each line, quiet=TRUE will NOT print a line, saying how many items have been read.
+ tex.glava <- scan("modules/mod_hierarhija/porocila/latexkosi/samoevalvacija_glava.tex", character(0), sep="\n", quiet=TRUE, encoding='UTF-8')
+ # Check for logo
+ img.file <- file.path("modules/mod_hierarhija/porocila/logo/", logoName)
+ # If school logo exist
+ if (file.exists(img.file)){
+ # Insert scool logo in Latex: TOP LEFT MARGIN
+ tex.glava <- gsub(pattern='!logotip!', replacement=Hmisc::latexTranslate(logoName), x=tex.glava)
+ }
+ # Podatki o u?encih v galvo dokumenta
+ tex.glava <- gsub(pattern='!glava!', replacement=Hmisc::latexTranslate(nivo), x=tex.glava)
+ # Zaklju?imo dokument z nogo
+ tex.noga <- scan("modules/mod_hierarhija/porocila/latexkosi/samoevalvacija_noga.tex", character(0), sep="\n", quiet=TRUE)
+ Rdirektorij <- getwd()
+
+
+ # Compiling file
+ tex.izbor <- c(tex.glava, ucitelji, komentarji, tex.noga)
+
+
+ # Set working directory
+ setwd(paste(Rdirektorij, "modules/mod_hierarhija/porocila/results", sep="/")) # File folder
+ #copy-paste the output to latex
+ cat(unlist(tex.izbor), file=paste0(gsub("\\.pdf", "", fileOutputName),".tex"), sep="\n")
+ # Convert latex to PDF
+ tools::texi2pdf(file=paste0(gsub("\\.pdf", "", fileOutputName),".tex"), quiet=TRUE, clean=TRUE)
+ setwd(Rdirektorij)
+} \ No newline at end of file
diff --git a/admin/survey/modules/mod_hierarhija/porocila/R/Hierarhija_1ka_streznik.R b/admin/survey/modules/mod_hierarhija/porocila/R/Hierarhija_1ka_streznik.R
new file mode 100644
index 0000000..2bd3b81
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/porocila/R/Hierarhija_1ka_streznik.R
@@ -0,0 +1,348 @@
+##################
+# REPORTS IN WORD
+##################
+
+#-------------------------- PHP ----------------------------#
+# Passing arguments to an R script from command lines
+params <- commandArgs(trailingOnly=TRUE)
+# CSV name
+filename <- params[1]
+# Name of produced doc file
+fileOutputName <- params[2]
+# Name of inserted logo in doc file
+logoName <- params[3]
+## //Passing arguments// ##
+#---------------------- //PHP// ----------------------------#
+
+
+#--------------------- SLOVENE ENCODING --------------------#
+# For correct output of CZS in report
+Sys.setlocale(category = "LC_ALL", locale = "slovenian")
+#------------------- //SLOVENE ENCODING// ------------------#
+
+
+#------------------- Necessary libraries -------------------#
+libraries <- c('fmsb','car','plyr','matrixStats','ReporteRs',
+ 'magrittr','ggplot2','scales')
+lapply(libraries, FUN = function(y) {
+ do.call('require', list(y))})
+#------------------- //Necessary libraries// ---------------#
+
+
+#--------------------- CUSTOM FUNCTIONS --------------------#
+# Rounding up the value
+round2 = function(x, n) {
+ posneg = sign(x)
+ z = abs(x)*10^n
+ z = z + 0.5
+ z = trunc(z)
+ z = z/10^n
+ z*posneg
+}
+
+# Factor to numeric
+as.numeric.factor <- function(x) {as.numeric(levels(x))[x]}
+#--------------------//CUSTOM FUNCTIONS// ------------------#
+
+
+########################################
+#--------------------------------------- DATA: importing and processing --------------------------------------------#
+ #############################################
+# Import data
+Hierarhija <- read.csv2(paste0("modules/mod_hierarhija/porocila/temp/",filename),
+ sep = ";", header = T, fill = T, stringsAsFactors = FALSE, encoding = "UTF-8")
+# Variable names (later for extracting possible comments of students or teacher)
+Hierarhija_names <- Hierarhija[1, ]
+# Omit the first row od the data base
+if (Hierarhija[1,1]==("Ustreznost") | Hierarhija[1,1]==("Relevance")) {Hierarhija <- Hierarhija[2:nrow(Hierarhija),]}
+
+
+# CREATE REPORTS ONLY IF THERE IS MORE THAN 1 ANSWER
+if (nrow(Hierarhija) > 1) {
+
+ # First we need to provide that CSZ in 1KA SERVER will be outputed correctly
+ Hierarhija_names[,-1] <- gsub('Č', '\u010C', as.matrix(Hierarhija_names[,-1]))
+ Hierarhija_names[,-1] <- gsub('č', '\u010D', as.matrix(Hierarhija_names[,-1]))
+ Hierarhija_names[,-1] <- gsub('Š', '\u0160', as.matrix(Hierarhija_names[,-1]))
+ Hierarhija_names[,-1] <- gsub('š', '\u0161', as.matrix(Hierarhija_names[,-1]))
+ Hierarhija_names[,-1] <- gsub('Ž', '\u017D', as.matrix(Hierarhija_names[,-1]))
+ Hierarhija_names[,-1] <- gsub('ž', '\u017E', as.matrix(Hierarhija_names[,-1]))
+
+ # # If these values are present in students comments we will delete them
+ junk <- c("-1","-2", "-3", "-4", "-5")
+
+ # Students grades/asnwers
+ Hierarhija_ucenci <- subset(Hierarhija, vloga == 1)
+ if(!nrow(Hierarhija_ucenci) > 0) {Hierarhija_ucenci <- NULL}
+
+ # Teachers grades/asnwers (samoevalvacija)
+ Hierarhija_ucitelj <- subset(Hierarhija, vloga == 2)
+ if(!nrow(Hierarhija_ucitelj) > 0) {Hierarhija_ucitelj <- NULL}
+
+ # Labeling hierarchy (poimenovanje hierarhije)
+ nivo <- unique(Hierarhija_ucenci[grep("nivo", names(Hierarhija_ucenci), value = TRUE)])
+ # Course names (ime predmeta)
+ nivo.predmet <- as.character(nivo[length(nivo)])
+ # Paste hierarchy info in one row (we will use later for writing these info in the head of word document)
+ nivo <- paste0(nivo, collapse=', ')
+ #--------------------------------------- //DATA: importing and processing// --------------------------------------------#
+
+
+ #------------------------------------- START PROCESSING DATA: TABLES AND GRAPHS ----------------------------------------#
+ # If there are multiple content/segment questions (Q1, Q2, ...) in the questionnaire we would like to separate them for
+ # tables and ggplots
+
+ ###################################################################################
+ # Loop and find the multiple content questions (without comments if there were any)
+ ###################################################################################
+ # Extract segemnts (Q1, Q2, ...)
+ data <- Hierarhija_ucenci[,grep("Q", colnames(Hierarhija_ucenci))]
+ # Seperate this segments
+ uniqueSegemnts <- unique(substr(colnames(data), 1, 2))
+ # Assign values of unique segments (and colnames) to list
+ uniqueSegemntsLS <- lapply(uniqueSegemnts, function(x) data[grepl(x, colnames(data))])
+
+ # If there are any comments dont include them in calculating descriptive statistics form tables
+ uniqueSegemntsLS <- Filter(function(x)length(x)>=2, uniqueSegemntsLS )
+ #listaSklopov[names(listaSklopov)[lengths(listaSklopov) < 2]] <- NULL
+
+ # Define new vaariables to which we will assign the output of our loop
+ tabele <- NULL # Tables
+ grafi <- NULL # GGplot
+
+ ##############################################################################
+ #START LOOP: CALCULATING DESCRIPTIVE STATISTICS NAD CRETING TABLES AND GGPLOTS
+ ##############################################################################
+ for (stSklopa in seq(uniqueSegemntsLS)) {
+
+ # Multiple questions part
+ indexi_sklopa <- colnames(uniqueSegemntsLS[[stSklopa]])
+
+ ########################
+ # DESCRIPTIVE STATISTICS
+ ########################
+ ocena <- sapply(Hierarhija_ucenci[,indexi_sklopa], as.numeric)
+ ocena[ocena < 0] <- 0
+
+ # Answers average
+ predM <- round2(colMeans(NA^(ocena==0)*ocena, na.rm=TRUE),1)
+
+ # MAX
+ #colMax <- function(data) apply(data, 1, min)
+ #PredMed <- colMax(predmet)
+
+ # SD
+ PredSD <- round2(colSds(NA^(ocena==0)*ocena, na.rm=TRUE),1)
+
+ # N
+ PredN <- colSums(!is.na(ocena))
+
+ ######################
+ # START CREATING TABLE
+ ######################
+ # Generating table of frequencies and percentages
+ table <- cbind.data.frame(
+ mean=predM,
+ n=PredN,
+ #median=PredMed,
+ sd=PredSD)
+
+ # Adding row of total average
+ table <- rbind(table, colMeans(table[1:ncol(table)], na.rm=TRUE))
+ table <- round2(table,1)
+
+ # Ime stolpca in Ocene u?itelja v stolpcu
+ nameCOL <- "Ucitelj (samoocena)" # Ime stolpca
+ if(!is.null(Hierarhija_ucitelj[,indexi_sklopa])) { # Samo ?e se je u?itelj ?e ocenil
+ Hierarhija_ucitelPRED <- as.numeric(Hierarhija_ucitelj[,indexi_sklopa])
+ table <- cbind(table,c(Hierarhija_ucitelPRED,"."))
+ } else {Hierarhija_ucitelPRED <- NULL
+ nameCOL <- NULL}
+
+ # Rownames
+ rownames(table) <- c(Hierarhija_names[indexi_sklopa], "Skupaj")
+
+ # Colnames
+ colnames(table) <- c("Povprecne ocene", 'St. odgovorov',"Standardni odklon",nameCOL)
+
+ # Write multiple tables in a list
+ tabele[[stSklopa]] <- table
+
+
+ ##############################
+ ## GGPLOT: DATA PREPARATION ##
+ ##############################
+
+ vloga_ucenec <- rep("u\u010Denec", nrow(table) - 1)
+ kategorija_ucenec <- rownames(table)[rownames(table) != "Skupaj"]
+ ocena_ucenec <- table[-nrow(table), 1]
+ Vloga_Ocena_ucenec <- as.data.frame(cbind(vloga_ucenec, kategorija_ucenec, ocena_ucenec))
+ colnames(Vloga_Ocena_ucenec) <- c("Vloga", "Kategorija", "Povprecje")
+
+ if(!is.null(Hierarhija_ucitelj[,indexi_sklopa])) {
+ vloga_ucitelj <- rep("u\u010Ditelj",nrow(table) - 1)
+ kategorija_ucitelj <- rownames(table)[rownames(table) != "Skupaj"]
+ ocena_ucitelj <- table[ncol(table)]
+ ocena_ucitelj <- as.numeric(ocena_ucitelj[ocena_ucitelj != "."])
+ Vloga_Ocena_ucitelj <- as.data.frame(cbind(vloga_ucitelj, kategorija_ucitelj, ocena_ucitelj))
+ colnames(Vloga_Ocena_ucitelj) <- c("Vloga", "Kategorija", "Povprecje")
+ }else {Vloga_Ocena_ucitelj <- NULL}
+
+ Skupna_ocena <- rbind(Vloga_Ocena_ucenec, Vloga_Ocena_ucitelj)
+ # Order factor lables as same as they are in data frame
+ Skupna_ocena$Povprecje <- as.numeric.factor(Skupna_ocena$Povprecje)
+
+ # GGPLOT: text break in a certain number of characters in the graph
+ Skupna_ocena$Kategorija <- gsub('(.{1,25})(\\s|$)', '\\1\n', Skupna_ocena$Kategorija)
+
+
+ # Creating ggplot
+ bp <- ggplot(Skupna_ocena, aes(factor(Kategorija), Povprecje, fill = Vloga)) +
+ geom_bar(stat="identity", position = "dodge",width=0.7) +
+ scale_fill_brewer(palette = "Set1") + coord_flip() +
+ theme_bw() +
+ scale_y_continuous(expand=c(0,0), limits=c(1,5),oob = rescale_none) +
+ scale_x_discrete(expand=c(0,0),limits=unique(rev(Skupna_ocena$Kategorija))) +
+ theme(axis.title=element_blank(),axis.ticks.y=element_blank(),
+ axis.text.x = element_text(angle = 0,vjust = 0.4)) +
+ ggtitle("Grafikon povpre\u010Dij komponent glede na vlogo")
+
+ # Write multiple ggplots in a list
+ grafi[[stSklopa]] <- bp
+ }
+ #----------------------------------- //START PROCESSING DATA: TABLES AND GRAPHS// --------------------------------------#
+
+
+ #------------------------------------------------ NOT USING THIS NOW ---------------------------------------------------#
+ ########################
+ # DATA FOR RADAR CHART #
+ ########################
+ #test <- cbind.data.frame(
+ # mean=predM)
+
+ # provide the data you want to plot, and the desired range
+ #radar.data <- t(test)
+ #myrange <- c(1, 5)
+
+ # create a data frame with the max and min as the first two rows
+ #mydf <- data.frame(rbind(max=myrange[2], min=myrange[1], radar.data))
+
+ # Insert colnames
+ #colnames(mydf) <- c(Hierarhija_names[grep("Q1", names(Hierarhija_names), value=TRUE)])
+ #--------------------------------------------- //NOT USING THIS NOW// -------------------------------------------------#
+
+
+ ########################################################################################################################
+
+
+ ################################################
+ #----------------------------------------------- COMPILING WORD REPORT -----------------------------------------------#
+ #################################################
+ #options("ReporteRs-default-font" = "Times New Roman")
+ # Create a docx object
+ doc = docx()
+ # template with Head bookmark (in the head of word document we will print students info)
+ template <- "modules/mod_hierarhija/porocila/R/Anketiranci.docx"
+ doc = docx( template = template )
+ # Header / BOOKMARK :info about students (grade, program, etc.)
+ doc = addParagraph(doc, nivo, bookmark = "Anketiranci")
+ # School logo
+ img.file <- file.path("modules/mod_hierarhija/porocila/logo", logoName)
+ # If school logo exist
+ if(file.exists(img.file)){
+ # Insert scool logo in word: FIRST PAGE/ TOP MARGIN
+ doc <- addImage(doc,img.file, width = 2.0, height = 1.5, par.properties = parLeft() )
+ }
+ # add a document title
+ doc = addParagraph( doc, "SAMOEVALVACIJA V \u0160OLAH", stylename = "TitleDoc" )
+
+
+ #---------------------------- CREATE AND WRITE MULTIPLE TABLES AND GGPLOTS -----------------------------------#
+ for (i in seq_along(tabele)) {
+ # some text
+ # add a slide title
+ doc <- addTitle(doc, "Povpre\u010Dje komponent glede na vlogo" )
+ # Boldamo ime predmeta
+ nivo.predmet.bold = pot("V tabeli so prikazane deskriptivne statistike ucitelja pri predmetu ", textProperties(font.weight = 'normal')) +
+ pot(nivo.predmet, textProperties(font.weight = 'bold'))
+ #doc <- addTitle(doc, "Oceni, kako pogosto naslednje trditve veljajo za u\u010Ditelja/-ico pri tem predmetu",level = 2)
+ doc = addParagraph(doc, nivo.predmet.bold, stylename = "DocDefaults" )
+ MyFTable = FlexTable(tabele[[i]], add.rownames = TRUE ) # Descriptive statistics for Oceni, kako pogosto naslednje trditve veljajo za u?itelja/-ico pri tem predmetu
+ doc = addFlexTable(doc, MyFTable)
+ # 2 line breaks after table
+ doc <- addParagraph(doc, c("", ""))
+ # A function for creating a box plot
+ # Add an editable box plot
+ doc <- addPlot(doc, function() print(grafi[[i]]) ,vector.graphic = TRUE, width = 5, height = 3.6)
+ # add a page break
+ doc <- addPageBreak(doc)
+ }
+ #--------------------------- //CREATE AND WRITE MULTIPLE TABLES AND GGPLOTS// ------------------------------#
+
+
+ #------------------------------------------ COMMENTS OF STUDENTS -------------------------------------------#
+ if(!is.null(Hierarhija_ucenci)) {
+ if("Ima\u0161 \u0161e kak komentar?" %in% Hierarhija_names[,1:ncol(Hierarhija_names)] | "Komentar" %in% Hierarhija_names[,1:ncol(Hierarhija_names)]) {
+ komentarji <- Hierarhija_ucenci[which(apply(Hierarhija_names, 2, function(x) any(grepl("Ima\u0161 \u0161e kak komentar?|Komentar", x))))][,1]
+ komentarji <- komentarji[!komentarji %in% junk]
+ if (identical(komentarji, character(0)) == FALSE) {
+ # Capture students comments for open ended question
+ doc <- addTitle(doc, "Komentarji u\u010Dencev na odprto vpra\u0161anje")
+ komentarji <- gsub('\u010C', 'Č', komentarji)
+ komentarji<- gsub('\u010D', 'č', komentarji)
+ komentarji <- gsub('Š', '\u0160', komentarji)
+ komentarji <- gsub('š', '\u0161', komentarji)
+ komentarji <- gsub('Ž', '\u017D', komentarji)
+ komentarji <- gsub('ž', '\u017E', komentarji)
+ doc <- addParagraph(doc, value= komentarji, par.properties = parProperties(list.style = 'unordered'))
+ }
+ }
+ }
+ #---------------------------------------- //COMMENTS OF STUDENTS// -----------------------------------------#
+
+
+ #------------------------------------------ COMMENTS OF TEACHERS -------------------------------------------#
+ if(!is.null(Hierarhija_ucitelj)) {
+ if("komentar" %in% Hierarhija_names[,1:ncol(Hierarhija_names)] | "Komentar" %in% Hierarhija_names[,1:ncol(Hierarhija_names)]) {
+
+ komentarji <- Hierarhija_ucitelj[which(apply(Hierarhija_names, 2, function(x) any(grepl("komentar|Komentar", x))))][,1]
+ komentarji <- komentarji[!komentarji %in% junk]
+ if (identical(komentarji, character(0)) == FALSE) {
+ # Capture teacher comments for open ended question
+ doc <- addParagraph(doc, c("", "")) # 2 line breaks
+ doc <- addTitle(doc, "Komentar u\u010Ditelja na odprto vpra\u0161anje")
+ komentarji <- gsub('Č', '\u010C', komentarji)
+ komentarji<- gsub('č', '\u010D', komentarji)
+ komentarji <- gsub('Š', '\u0160', komentarji)
+ komentarji <- gsub('š', '\u0161', komentarji)
+ komentarji <- gsub('Ž', '\u017D', komentarji)
+ komentarji <- gsub('ž', '\u017E', komentarji)
+ doc <- addParagraph(doc, value= komentarji, par.properties = parProperties(list.style = 'unordered'))
+ }
+ }
+ }
+ #---------------------------------------- //COMMENTS OF TEACHERS// ----------------------------------------#
+
+ #NOT DOING THIS NOW Creating RADAR CHART with LEGEND
+ #doc = addParagraph(doc, value = "Povpre?ne ocene komponent", stylename = "rPlotLegend")
+ #doc <- addPlot(doc, function() print(c(radarchart(mydf, pcol=c("#e41a1c", "#377eb8", "#4daf4a","#984ea3"), cglcol='gray75',
+ # plwd=2, plty=1, cglwd=1, cglty=1, seg=4, axistype=1, caxislabels=c(1:5),
+ # axislabcol='gray25', centerzero=TRUE),
+ # legend('topright', legend=c("U?enci","U?itelj"),
+ # col=c("#e41a1c", "#377eb8", "#4daf4a","#984ea3"), lty=1, lwd=2, bty='n')), vector.graphic = TRUE ))
+
+ #------------------------------------------ WRITE AND SAVE DOCX ------------------------------------------#
+ # write the doc
+ writeDoc(doc, file = paste0("modules/mod_hierarhija/porocila/results/",fileOutputName))
+ # open the Word doc
+ #browseURL("Samoevalvacija1.docx") # This line is not needed, is only to open the Word doc from Rstudio
+} else {
+ # Create a docx object
+ doc = docx()
+ # add a document title
+ doc = addParagraph( doc, "Zaradi premajhnega števila enot (1 ali manj) se poro\u010Dilo ni zgeneriralo.", stylename = "Normal" )
+ writeDoc(doc, file = paste0("modules/mod_hierarhija/porocila/results/",fileOutputName))
+
+}
+
+#----------------------------------------------- //COMPILING WORD REPORT// -----------------------------------------------#
diff --git a/admin/survey/modules/mod_hierarhija/porocila/R/test.tex b/admin/survey/modules/mod_hierarhija/porocila/R/test.tex
new file mode 100644
index 0000000..297d9fd
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/porocila/R/test.tex
@@ -0,0 +1 @@
+\documentclass{article} \begin{document} TESTNA STRAN \end{document}
diff --git a/admin/survey/modules/mod_hierarhija/porocila/R/test_1ka.R b/admin/survey/modules/mod_hierarhija/porocila/R/test_1ka.R
new file mode 100644
index 0000000..17e968a
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/porocila/R/test_1ka.R
@@ -0,0 +1,19 @@
+library(ReporteRs)
+Sys.setlocale(category = "LC_ALL", locale = "slovenian")
+# Create a word document to contain R outputs
+doc <- docx()
+
+test12 <- c("Testna stran ČŽŠ šš žž čč")
+
+test12<- gsub('Č', '\u010C', test12)
+test12 <- gsub('č', '\u010D', test12)
+test12 <- gsub('Š', '\u0160', test12)
+test12<- gsub('š', '\u0161', test12)
+test12 <- gsub('Ž', '\u017D', test12)
+test12 <- gsub('ž', '\u017E', test12)
+# Add a title to the document
+doc <- addTitle(doc, test12, level=1)
+
+
+# Write the Word document to a file
+writeDoc(doc, file = paste0("modules/mod_hierarhija/porocila/results/test.docx"))
diff --git a/admin/survey/modules/mod_hierarhija/porocila/R/test_1ka_pdf.R b/admin/survey/modules/mod_hierarhija/porocila/R/test_1ka_pdf.R
new file mode 100644
index 0000000..52f76dd
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/porocila/R/test_1ka_pdf.R
@@ -0,0 +1,17 @@
+
+
+test <- c(paste("\\documentclass{article}",
+ # % specifies document class (article) and point size (10pt)
+
+ "\\begin{document}", # % starts document
+
+ "TESTNA STRAN", # % specifies big, fancy title)
+
+ "\\end{document}"))
+
+
+
+
+
+cat(test, file=paste0("modules/mod_hierarhija/porocila/results/test.tex"), sep="\n")
+tools::texi2pdf(file=paste0("modules/mod_hierarhija/porocila/results/test.tex"), quiet=TRUE, clean=TRUE)
diff --git a/admin/survey/modules/mod_hierarhija/porocila/latexkosi/samoevalvacija_glava.tex b/admin/survey/modules/mod_hierarhija/porocila/latexkosi/samoevalvacija_glava.tex
new file mode 100644
index 0000000..6641525
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/porocila/latexkosi/samoevalvacija_glava.tex
@@ -0,0 +1,91 @@
+\documentclass[11pt,a4paper]{report}
+\usepackage[cm]{fullpage}
+\setlength{\headheight}{12pt}
+\usepackage[T1]{fontenc} % Za pravilen izpis SUMNIKOV (CZS) na strezniku
+\usepackage[utf8]{inputenc} % Za pravilen izpis SUMNIKOV (CZS) na strezniku
+\usepackage{babel} % Za pravilen izpis SUMNIKOV (CZS) na strezniku
+\usepackage{graphicx}
+\usepackage{xcolor}
+
+\definecolor{firebrick3}{HTML}{cd2626}
+\definecolor{dodgerblue3}{HTML}{1874cd}
+\definecolor{BrickRed}{HTML}{B6321C}
+\definecolor{OrangeRed}{HTML}{F58137}
+\definecolor{PineGreen}{HTML}{008B72}
+\definecolor{Orange}{HTML}{F58137}
+\definecolor{Green}{HTML}{00A64F}
+\definecolor{Atlantis}{HTML}{8CBA2E}
+\definecolor{Blue Stone}{HTML}{006666}
+\definecolor{Black}{HTML}{000000}
+\definecolor{Red}{HTML}{FF0006}
+\definecolor{Chateau Green}{HTML}{36BF4B}
+\definecolor{Gray}{HTML}{AAAAAA}
+\definecolor{Dusty Gray}{HTML}{999999}
+\definecolor{Dove Gray}{HTML}{696969}
+\usepackage{times}
+\usepackage{float}
+\usepackage{multirow}
+\usepackage{tikz}
+\usepackage[thmmarks]{ntheorem}
+\usepackage{setspace}
+\setcounter{secnumdepth}{3}
+
+\usepackage{titlesec}
+\titleformat{\chapter}[hang]{\LARGE\bfseries}{\thechapter{. }}{12pt}{\LARGE\bfseries}
+\titlespacing*{\chapter}{0pt}{-13pt}{10pt}
+\titleformat*{\subsubsection}{\Large\bfseries}
+\usepackage{longtable}
+\usepackage{setspace}
+\usepackage{array,calc}
+\newcolumntype{A}[1]{>{\begin{minipage}{#1}\vspace{\tabcolsep}}l<{\vspace{\tabcolsep}\end{minipage}}}
+\newenvironment{Complement}[1][0.75cm]{\hspace{#1}\begin{minipage}{\linewidth-#1}\hspace{-#1}\ignorespaces}{\end{minipage}}
+
+
+
+\usepackage{fancyhdr}
+\pagestyle{fancyplain}
+\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
+\fancyhf{}
+\renewcommand{\headrulewidth}{0.0pt}
+\renewcommand{\footrulewidth}{0.0pt}
+\fancyhead[L]{\small{!glava!} \hfill {{\nouppercase{\leftmark}}}}
+\fancyfoot[L]{\small{}}
+\fancyfoot[C]{\small{\thepage}}
+\headsep 20pt
+
+
+\setcounter{tocdepth}{1}
+\usepackage{hyperref}
+\hypersetup{
+ colorlinks=true,
+ linkcolor=black,
+ urlcolor=blue,
+ pdfstartview={XYZ null null 1},
+ pdftitle={Evalvacijsko poročilo: !naslov!}
+}
+\urlstyle{same}
+
+\setlength{\parindent}{0cm}
+\LTcapwidth=\textwidth %to keep longtable captions in one row
+\renewcommand{\thesection}{\arabic{section}}
+\titleformat{\section}
+ {\normalfont\large\bfseries}{\thesection}{1em}{}[{\titlerule[0.8pt]}]
+
+\begin{document}
+
+% Izpis Logotipa če ta obstaja
+\IfFileExists{../logo/!logotip!}
+{ % Če slika oz file obstaja Izpis naslova z logom
+\quad\includegraphics[width = 100pt, height = 100pt]{../logo/!logotip!}
+\par % blank line after logo
+\vspace{1cm} % 1cm vertical space
+}
+% Če slika oz. file ne obstaja ne naredi nič (prazno)
+{ }
+% Izpis Logotipa če ta obstaja
+
+
+\noindent\underline{\LARGE \makebox[7.1in][c]{ {\textbf{SAMOEVALVACIJA V \v{S}OLAH}}}}
+
+
+%\tableofcontents \ No newline at end of file
diff --git a/admin/survey/modules/mod_hierarhija/porocila/latexkosi/samoevalvacija_noga.tex b/admin/survey/modules/mod_hierarhija/porocila/latexkosi/samoevalvacija_noga.tex
new file mode 100644
index 0000000..815ab68
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/porocila/latexkosi/samoevalvacija_noga.tex
@@ -0,0 +1 @@
+\end{document} \ No newline at end of file
diff --git a/admin/survey/modules/mod_hierarhija/porocila/results/.gitignore b/admin/survey/modules/mod_hierarhija/porocila/results/.gitignore
new file mode 100644
index 0000000..5e6d017
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/porocila/results/.gitignore
@@ -0,0 +1,3 @@
+*
+!slike/
+!.gitignore
diff --git a/admin/survey/modules/mod_hierarhija/porocila/results/slike/.gitignore b/admin/survey/modules/mod_hierarhija/porocila/results/slike/.gitignore
new file mode 100644
index 0000000..a3a0c8b
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/porocila/results/slike/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore \ No newline at end of file
diff --git a/admin/survey/modules/mod_hierarhija/porocila/temp/.gitignore b/admin/survey/modules/mod_hierarhija/porocila/temp/.gitignore
new file mode 100644
index 0000000..a3a0c8b
--- /dev/null
+++ b/admin/survey/modules/mod_hierarhija/porocila/temp/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore \ No newline at end of file
diff --git a/admin/survey/modules/mod_json_survey_export/class.SurveyJsonSurveyData.php b/admin/survey/modules/mod_json_survey_export/class.SurveyJsonSurveyData.php
new file mode 100644
index 0000000..3c2457f
--- /dev/null
+++ b/admin/survey/modules/mod_json_survey_export/class.SurveyJsonSurveyData.php
@@ -0,0 +1,642 @@
+<?php
+
+/*
+ * Modul za pripravo podatkov, generiranje/brisanje json datoteke in prikazovanje JSON za anketo
+ *
+ */
+
+
+class SurveyJsonSurveyData {
+
+ var $anketa; # id ankete
+ protected $json; //hrani json
+ protected $grupaId; //hrani id grupe oz. strani, kjer se nahajajo vprasanja
+
+ function __construct($anketa){
+ // Ce imamo anketo
+ if ((int)$anketa > 0){
+ $this->anketa = $anketa;
+ }
+ }
+
+ public function displaySettings(){
+ global $lang;
+/* echo '<fieldset><legend>'.$lang['settings'].'</legend>';
+
+ echo '</fieldset>'; */
+
+ echo '<br />';
+
+ //Prikazemo JSON kodo za izvoz in povezavo za prenos json datoteke
+ $this->displayJsonData();
+ }
+
+ ##########################################################################################
+ //Funkcija za prikazovanje json kode in sprozenje generacije ustrezne json datoteke
+ private function displayJsonData(){
+ global $lang;
+ global $site_url;
+
+ //generiranje polja s podatki za JSON
+ $jsonArray= $this->generateJsonArray();
+
+ //pretvorba polja v JSON, kjer je json datoteka strukturirana in UTF-8
+ $this->json = json_encode($jsonArray, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE);
+
+ //ustvari json datoteko
+ $this->GenerateJsonFile();
+
+ //povezava do JSON datoteke za prenos
+ echo '<fieldset><legend>JSON file</legend>';
+ $href_json = 'izvoz.php?m=json_survey&anketa=' . $this->anketa;
+ echo ' <span class="spaceLeft"><a href="'.$href_json.'">JSON</a></span>';
+ echo '</fieldset>';
+ //povezava do JSON datoteke za prenos - konec
+
+ //prikazovanje JSON kode
+/* echo '<fieldset><legend>JSON Data</legend>';
+ echo "<pre><code>";
+ echo ($this->json)."</br>";
+ echo "</pre></code>";
+ echo '</fieldset>'; */
+ //prikazovanje JSON kode - konec
+ }
+ ######################################################################################################
+
+ ###################################################
+ //Funkcija za ustvarjanje php polja za pretvorbo v JSON
+ private function generateJsonArray(){
+
+ #spremenljivke#################################################################
+ $dolgoImeAnkete = SurveyInfo::getSurveyColumn('naslov');
+ $kratkoImeAnkete = SurveyInfo::getSurveyColumn('akronim');
+ $avtorAnkete = SurveyInfo::getSurveyEditEmail();
+ //$avtorAnkete = SurveyInfo::getUserInsertInfo('email');
+
+
+
+ #spremenljivke - konec ########################################################
+
+ //polje za pretvorbo
+ $tmpJsonArray = array(
+ "survey"=> array(
+ "id"=> (float)$this->anketa ,
+ "name"=> $dolgoImeAnkete,
+ "author_username"=> $avtorAnkete,
+ "questionnaire"=> array(
+ "pages"=> $this->pagesArray()
+ )
+ )
+ );
+ return $tmpJsonArray;
+ }
+ ###################################################
+
+
+ ###################################################
+ //Funkcija za generiranje polja za strani ankete
+ private function pagesArray(){
+ global $lang;
+
+ //pobiranje podatkov o anketi
+ $introShow = SurveyInfo::getSurveyColumn('show_intro');
+ $conclShow = SurveyInfo::getSurveyColumn('show_concl');
+ $introductionText = (SurveyInfo::getSurveyColumn('introduction'));
+ $conclusionText = (SurveyInfo::getSurveyColumn('conclusion'));
+
+ //ureditev zacetne strani #######################
+ if($introductionText == ''){
+ $introductionText = $lang['srv_intro'];
+ }
+ if($introShow){ //ce je zacetna stran prisotna
+ $introShow = true;
+ }else{
+ $introShow = false;
+ }
+
+ //dodaj v polje informacije o zacetni strani
+ $pagesArray[] = array(
+ "id"=> -1,
+ "type"=> "intro",
+ "visible"=> $introShow,
+ "text"=> $introductionText
+ );
+ //ureditev zacetne strani - konec #######################
+
+
+ //pobiranje podatkov o grupah/straneh ankete
+ $sqlGrupeString = "SELECT id FROM srv_grupa WHERE ank_id='".$this->anketa."' ORDER BY vrstni_red";
+ $sqlGrupe = sisplet_query($sqlGrupeString);
+
+ //ureditev ostalih strani
+ while ($rowGrupe = mysqli_fetch_assoc( $sqlGrupe )){ // sprehodimo se skozi grupe oz. straneh ankete brez intro in end straneh
+ $this->grupaId = $rowGrupe['id'];
+
+ $pagesArray[] = array(
+ "id"=> (float)$this->grupaId,
+ "type"=> "normal",
+ "questions"=> $this->questionsArray()
+ );
+ }
+ //ureditev ostalih strani - konec
+
+ //ureditev zakljucne strani #######################
+ if($conclusionText == ''){
+ $conclusionText = $lang['srv_end'];
+ }
+
+ //pobiranje podatkov o end_action ankete
+ $sqlEndActionString = "SELECT concl_link FROM srv_anketa WHERE id='".$this->anketa."' ";
+ $sqlEndAction = sisplet_query($sqlEndActionString);
+ $rowEndAction = mysqli_fetch_assoc($sqlEndAction);
+ $endActionNum = $rowEndAction['concl_link'];
+ //pobiranje podatkov o end_action ankete - konec
+
+ //ureditev end_action parametra
+ switch($endActionNum){
+ case 0:
+ $endAction = "close";
+ break;
+ case 1:
+ $endAction = "open_url";
+ break;
+ case 2:
+ $endAction = "restart";
+ break;
+ }
+ //ureditev end_action parametra - konec
+
+ if($conclShow){ //ce je zacetna stran prisotna
+ $conclShow = true;
+ }else{
+ $conclShow = false;
+ }
+
+ //dodaj v polje informacije o zakljucni strani
+ $pagesArray[] = array(
+ "id"=> -2,
+ "type"=> "end",
+ "visible"=> $conclShow,
+ "text"=> $conclusionText,
+ "end_action"=> $endAction
+ );
+ //ureditev zakljucne strani - konec #######################
+
+ return $pagesArray;
+ }
+ ###################################################
+
+
+ ###################################################
+ //Funkcija za generiranje polja za vprasanja ankete
+ private function questionsArray(){
+
+ $databaseRows = " id, tip, orientation, variable, naslov, info, reminder, enota, text_orientation ";
+
+ $sqlSpremenljivkeString = "SELECT ".$databaseRows." FROM srv_spremenljivka WHERE gru_id='".$this->grupaId."' AND visible='1' ORDER BY vrstni_red ASC";
+ $sqlSpremenljivke = sisplet_query($sqlSpremenljivkeString);
+ $indeksQuestions = 0;
+ while ($rowSpremenljivke = mysqli_fetch_assoc($sqlSpremenljivke)){ // sprehodimo se skozi vprasanja
+
+ $questionsArray[] = array(
+ "id"=> (float)$rowSpremenljivke['id'],
+ "type"=> $this->getQuestionType($rowSpremenljivke['tip']),
+ );
+
+ if($rowSpremenljivke['tip']!=5){
+ $questionsArray[$indeksQuestions]["input"] = $this->getQuestionInput($rowSpremenljivke['tip']);
+ }
+
+ if($this->getQuestionType($rowSpremenljivke['tip'])=='grid'){ //ce je "grid" dodaj "layout"
+ $questionsArray[$indeksQuestions]["layout"]=$this->getQuestionLayout($rowSpremenljivke['orientation']);
+ }
+
+ $questionsArray[$indeksQuestions]["name"] = $rowSpremenljivke['variable'];
+ $questionsArray[$indeksQuestions]["text"] = ($rowSpremenljivke['naslov']);
+
+ if($rowSpremenljivke['info']!=''){
+ $questionsArray[$indeksQuestions]["note"] = $rowSpremenljivke['info'];
+ }
+
+ if($rowSpremenljivke['tip']!=5){
+ $questionsArray[$indeksQuestions]["nr_check"] = $this->getQuestionNrCheck($rowSpremenljivke['reminder']);
+ }
+
+
+ if($this->getQuestionType($rowSpremenljivke['tip'])=='open'){
+ if($rowSpremenljivke['tip']==7){ //ce je stevilo
+ $questionsArray[$indeksQuestions]["item_text_layout"] = $this->getQuestionItemTextLayout($rowSpremenljivke['tip'], $rowSpremenljivke['enota']);
+ }elseif($rowSpremenljivke['tip']==21){ //ce je besedilo
+ $questionsArray[$indeksQuestions]["item_text_layout"] = $this->getQuestionItemTextLayout($rowSpremenljivke['tip'], $rowSpremenljivke['text_orientation']);
+ }
+ }
+
+ $items = $this->itemsArray($rowSpremenljivke['id'], $rowSpremenljivke['tip'], $rowSpremenljivke['variable']);
+ if(!empty($items)){ //ce so itemi v polju
+ $questionsArray[$indeksQuestions]["items"] = $items;
+ }
+
+ if ( in_array($rowSpremenljivke['tip'], array(16)) ) {
+ $questionsArray[$indeksQuestions]["col_items"] = $this->colItemsArray($rowSpremenljivke['id']);
+ }
+
+ $answers = $this->answersArray($rowSpremenljivke['id'], $rowSpremenljivke['tip'], $rowSpremenljivke['variable']);
+ if(!empty($answers)){ //ce so odgovori v polju
+ $questionsArray[$indeksQuestions]["answers"] = $answers;
+ }
+
+ $indeksQuestions++;
+ }
+
+ return $questionsArray;
+ }
+ ###################################################
+
+
+ ###################################################
+ //Funkcija za generiranje polja za items, ki se nahajajo pod "questions"
+ private function itemsArray($spr_id, $tip, $name){
+ if ( in_array($tip, array(1)) ) { //radio
+ $itemsArray[]=array(
+ "id" => (float)$spr_id,
+ "name" => $name
+ );
+ }elseif ( in_array($tip, array(2)) ) { //checkbox
+ $databaseRows = " id, variable, naslov, random, other, vrstni_red ";
+ $sqlVrednostiString = "SELECT ".$databaseRows." FROM srv_vrednost WHERE spr_id='".$spr_id."' AND other>=0 ORDER BY vrstni_red ASC";
+ $sqlVrednosti = sisplet_query($sqlVrednostiString);
+
+ $indeksItems = 0;
+
+ while ($rowVrednosti = mysqli_fetch_assoc($sqlVrednosti)){ // sprehodimo se skozi item
+ $itemsArray[$indeksItems]["id"] = (float)$rowVrednosti["id"];
+ $itemsArray[$indeksItems]["name"] = $rowVrednosti["variable"];
+ $itemsArray[$indeksItems]["text"] = ($rowVrednosti["naslov"]);
+ $itemsArray[$indeksItems]["position"] = (float)$rowVrednosti["vrstni_red"];
+ $itemsArray[$indeksItems]["sort"] = $this->getAnswerSort($rowVrednosti["random"]);
+ $itemsArray[$indeksItems]["text_field"] = $this->getAnswerTextField($rowVrednosti["other"]);
+
+ $indeksItems++;
+ }
+ }elseif ( in_array($tip, array(6)) ) { //radio grid
+ $databaseRows = " id, variable, naslov, random, other ";
+ $sqlVrednostiString = "SELECT ".$databaseRows." FROM srv_vrednost WHERE spr_id='".$spr_id."' ORDER BY vrstni_red ASC";
+ $sqlVrednosti = sisplet_query($sqlVrednostiString);
+
+ $indeksItems = 0;
+ while ($rowVrednosti = mysqli_fetch_assoc($sqlVrednosti)){ // sprehodimo se skozi item
+ $itemsArray[$indeksItems]["id"] = (float)$rowVrednosti["id"];
+ $itemsArray[$indeksItems]["name"] = $rowVrednosti["variable"];
+ $itemsArray[$indeksItems]["text"] = ($rowVrednosti["naslov"]);
+ $itemsArray[$indeksItems]["sort"] = $this->getAnswerSort($rowVrednosti["random"]);
+ $itemsArray[$indeksItems]["text_field"] = $this->getAnswerTextField($rowVrednosti["other"]);
+
+ $indeksItems++;
+ }
+ }elseif ( in_array($tip, array(5, 7, 21)) ) { //odprta vprasanja besedilo/stevilo
+ $databaseRows = " id, variable, naslov, random, other, vrstni_red ";
+ $sqlVrednostiString = "SELECT ".$databaseRows." FROM srv_vrednost WHERE spr_id='".$spr_id."' AND other>=0 ORDER BY vrstni_red ASC";
+ $sqlVrednosti = sisplet_query($sqlVrednostiString);
+
+ $indeksItems = 0;
+ while ($rowVrednosti = mysqli_fetch_assoc($sqlVrednosti)){ // sprehodimo se skozi item
+ $itemsArray[$indeksItems]["id"] = (float)$rowVrednosti["id"];
+ $itemsArray[$indeksItems]["name"] = $rowVrednosti["variable"];
+ $itemsArray[$indeksItems]["text"] = ($rowVrednosti["naslov"]);
+ $indeksItems++;
+ }
+ }elseif ( in_array($tip, array(16)) ) { //checkbox grid
+ $databaseRows = " id, variable, naslov, random, other ";
+ $sqlVrednostiString = "SELECT ".$databaseRows." FROM srv_vrednost WHERE spr_id='".$spr_id."' ORDER BY vrstni_red ASC";
+ $sqlVrednosti = sisplet_query($sqlVrednostiString);
+
+ $indeksItems = 0;
+ while ($rowVrednosti = mysqli_fetch_assoc($sqlVrednosti)){ // sprehodimo se skozi item
+ $itemsArray[$indeksItems]["id"] = (float)$rowVrednosti["id"];
+ $itemsArray[$indeksItems]["name"] = $rowVrednosti["variable"];
+ $itemsArray[$indeksItems]["text"] = ($rowVrednosti["naslov"]);
+ $itemsArray[$indeksItems]["sort"] = $this->getAnswerSort($rowVrednosti["random"]);
+ $itemsArray[$indeksItems]["text_field"] = $this->getAnswerTextField($rowVrednosti["other"]);
+
+ $indeksItems++;
+ }
+ }
+
+ return $itemsArray;
+ }
+ ###################################################
+
+
+ ###################################################
+ //Funkcija za generiranje polja za col_items, ki se nahajajo pod "questions"
+ private function colItemsArray($spr_id){
+ $databaseRows = " id, variable, naslov, other ";
+ $sqlVrednostiString = "SELECT ".$databaseRows." FROM srv_grid WHERE spr_id='".$spr_id."' AND other>=0 ORDER BY vrstni_red ASC";
+ $sqlVrednosti = sisplet_query($sqlVrednostiString);
+
+ $indekscolItems = 0;
+ while ($rowVrednosti = mysqli_fetch_assoc($sqlVrednosti)){ // sprehodimo se skozi odgovore
+ $colItemsArray[$indekscolItems]["id"] = (float)$rowVrednosti["id"];
+ $colItemsArray[$indekscolItems]["name"] = $rowVrednosti["variable"];
+ $colItemsArray[$indekscolItems]["text"] = ($rowVrednosti["naslov"]);
+
+ $indekscolItems++;
+ }
+
+ return $colItemsArray;
+ }
+ ###################################################
+
+
+ ###################################################
+ //Funkcija za generiranje polja za answers, ki se nahajajo pod "questions"
+ private function answersArray($spr_id, $tip, $name){
+ if ( in_array($tip, array(1)) ) { //radio
+ $databaseRows = " id, variable, naslov, random, other ";
+ $sqlVrednostiString = "SELECT ".$databaseRows." FROM srv_vrednost WHERE spr_id='".$spr_id."' ORDER BY vrstni_red ASC";
+ $sqlVrednosti = sisplet_query($sqlVrednostiString);
+
+ $indeksAnswers = 0;
+ while ($rowVrednosti = mysqli_fetch_assoc($sqlVrednosti)){ // sprehodimo se skozi odgovore
+ $answersArray[$indeksAnswers]["id"] = (float)$rowVrednosti["id"];
+
+ $answersArray[$indeksAnswers]["value"] = $this->getNumOrString($rowVrednosti["variable"]);
+ $answersArray[$indeksAnswers]["text"] = $this->getNumOrString($rowVrednosti["naslov"]);
+
+ $answersArray[$indeksAnswers]["sort"] = $this->getAnswerSort($rowVrednosti["random"]);
+ $answersArray[$indeksAnswers]["missing_value"] = $this->getAnswerMv($rowVrednosti["other"]);
+ $answersArray[$indeksAnswers]["text_field"] = $this->getAnswerTextField($rowVrednosti["other"]);
+ $indeksAnswers++;
+ }
+ }elseif ( in_array($tip, array(2)) ) { //checkbox
+ $databaseRows = " id, variable, naslov, random, other, vrstni_red ";
+ $sqlVrednostiString = "SELECT ".$databaseRows." FROM srv_vrednost WHERE spr_id='".$spr_id."' AND other<0 ORDER BY vrstni_red ASC";
+ $sqlVrednosti = sisplet_query($sqlVrednostiString);
+
+ $indeksAnswers = 0;
+
+ while ($rowVrednosti = mysqli_fetch_assoc($sqlVrednosti)){ // sprehodimo se skozi odgovore
+ $answersArray[$indeksAnswers]["id"] = (float)$rowVrednosti["id"];
+ $answersArray[$indeksAnswers]["value"] = $this->getNumOrString($rowVrednosti["variable"]);
+ $answersArray[$indeksAnswers]["text"] = $this->getNumOrString($rowVrednosti["naslov"]);
+ $answersArray[$indeksAnswers]["position"] = (float)$rowVrednosti["vrstni_red"];
+ $answersArray[$indeksAnswers]["sort"] = $this->getAnswerSort($rowVrednosti["random"]);
+ $answersArray[$indeksAnswers]["missing_value"] = $this->getAnswerMv($rowVrednosti["other"]);
+ $answersArray[$indeksAnswers]["text_field"] = $this->getAnswerTextField($rowVrednosti["other"]);
+ $indeksAnswers++;
+ }
+ }elseif ( in_array($tip, array(6)) ) { //radio grid
+ $databaseRows = " id, variable, naslov, other ";
+ $sqlVrednostiString = "SELECT ".$databaseRows." FROM srv_grid WHERE spr_id='".$spr_id."' ORDER BY vrstni_red ASC";
+ $sqlVrednosti = sisplet_query($sqlVrednostiString);
+
+ $indeksAnswers = 0;
+ while ($rowVrednosti = mysqli_fetch_assoc($sqlVrednosti)){ // sprehodimo se skozi odgovore
+ $answersArray[$indeksAnswers]["id"] = (float)$rowVrednosti["id"];
+ if($rowVrednosti["other"]>=0){
+ $answersArray[$indeksAnswers]["value"] = $this->getNumOrString($rowVrednosti["variable"]);
+ }else{
+ $answersArray[$indeksAnswers]["value"] = $this->getNumOrString($rowVrednosti["other"]);
+ }
+ $answersArray[$indeksAnswers]["text"] = $this->getNumOrString($rowVrednosti["naslov"]);
+ $answersArray[$indeksAnswers]["missing_value"] = $this->getAnswerMv($rowVrednosti["other"]);
+ $indeksAnswers++;
+ }
+ }elseif ( in_array($tip, array(5, 7, 21)) ) { //odprta vprasanja besedilo/stevilo
+ $databaseRows = " id, variable, naslov, random, other, vrstni_red ";
+ $sqlVrednostiString = "SELECT ".$databaseRows." FROM srv_vrednost WHERE spr_id='".$spr_id."' AND other<0 ORDER BY vrstni_red ASC";
+ $sqlVrednosti = sisplet_query($sqlVrednostiString);
+
+ $indeksAnswers = 0;
+
+ while ($rowVrednosti = mysqli_fetch_assoc($sqlVrednosti)){ // sprehodimo se skozi odgovore
+ $answersArray[$indeksAnswers]["id"] = (float)$rowVrednosti["id"];
+ $answersArray[$indeksAnswers]["value"] = $this->getNumOrString($rowVrednosti["variable"]);
+ $answersArray[$indeksAnswers]["text"] = $this->getNumOrString($rowVrednosti["naslov"]);
+ $answersArray[$indeksAnswers]["missing_value"] = $this->getAnswerMv($rowVrednosti["other"]);
+ $indeksAnswers++;
+ }
+ }elseif ( in_array($tip, array(16)) ) { //checkbox grid
+ $databaseRows = " id, variable, naslov, other ";
+ $sqlVrednostiString = "SELECT ".$databaseRows." FROM srv_grid WHERE spr_id='".$spr_id."' AND other<0 ORDER BY vrstni_red ASC";
+ $sqlVrednosti = sisplet_query($sqlVrednostiString);
+
+ $indeksAnswers = 0;
+ while ($rowVrednosti = mysqli_fetch_assoc($sqlVrednosti)){ // sprehodimo se skozi odgovore
+ $answersArray[$indeksAnswers]["id"] = (float)$rowVrednosti["id"];
+ $answersArray[$indeksAnswers]["value"] = $this->getNumOrString($rowVrednosti["other"]);
+ $answersArray[$indeksAnswers]["text"] = $this->getNumOrString($rowVrednosti["naslov"]);
+ $answersArray[$indeksAnswers]["missing_value"] = $this->getAnswerMv($rowVrednosti["other"]);
+ $indeksAnswers++;
+ }
+ }
+
+ return $answersArray;
+ }
+ ###################################################
+
+
+ ###################################################
+ //Funkcija ki skrbi za izbiro ustrezne vrednosti parametra type
+ private function getQuestionType($tip){
+ if ( in_array($tip, array(1)) ) {
+ $questionType = "single_answer";
+ }elseif ( in_array($tip, array(2)) ) {
+ $questionType = "multi_answer";
+ }elseif ( in_array($tip, array(7, 21)) ) {
+ $questionType = "open";
+ }elseif ( in_array($tip, array(6, 16)) ) {
+ $questionType = "grid";
+ }elseif ( in_array($tip, array(5)) ) {
+ $questionType = "caption";
+ }
+ return $questionType;
+ }
+ ###################################################
+
+
+ ###################################################
+ //Funkcija ki skrbi za izbiro ustrezne vrednosti parametra input
+ private function getQuestionInput($tip){
+ if ( in_array($tip, array(1, 6)) ) {
+ $questionInput = "radio";
+ }elseif ( in_array($tip, array(2, 16)) ) {
+ $questionInput = "checkbox";
+ }elseif ( in_array($tip, array(7)) ) {
+ $questionInput = "numeric";
+ }elseif ( in_array($tip, array(21, 5)) ) {
+ $questionInput = "text";
+ }
+ return $questionInput;
+ }
+ ###################################################
+
+
+ ###################################################
+ //Funkcija ki skrbi za izbiro ustrezne vrednosti parametra layout
+ private function getQuestionLayout($orientation){
+ //trenutno dodamo samo za grid in rabimo samo "standard_table"
+ $questionLayout = "standard_table";
+ return $questionLayout;
+ }
+ ###################################################
+
+
+ ###################################################
+ //Funkcija ki skrbi za izbiro ustrezne vrednosti parametra nr_check
+ private function getQuestionNrCheck($reminder){
+ switch ($reminder){
+ case 0:
+ $questionNrCheck = "none";
+ break;
+ case 1:
+ $questionNrCheck = "ask";
+ break;
+ case 2:
+ $questionNrCheck = "require";
+ break;
+ }
+ return $questionNrCheck;
+ }
+ ###################################################
+
+
+ ###################################################
+ //Funkcija ki skrbi za izbiro ustrezne vrednosti parametra item_text_layout
+ private function getQuestionItemTextLayout($tip, $textLayout){
+ if($tip == 7){ //ce je stevilo
+ switch ($textLayout){
+ case 0:
+ $questionItemTextLayout = "none";
+ break;
+ case 1:
+ $questionItemTextLayout = "left";
+ break;
+ case 2:
+ $questionItemTextLayout = "right";
+ break;
+ }
+ }elseif($tip == 21){ //ce je besedilo
+ switch ($textLayout){
+ case 0:
+ $questionItemTextLayout = "none";
+ break;
+ case 1:
+ $questionItemTextLayout = "left";
+ break;
+ case 2:
+ $questionItemTextLayout = "bottom";
+ break;
+ case 3:
+ $questionItemTextLayout = "top";
+ break;
+ }
+ }
+
+ return $questionItemTextLayout;
+ }
+ ###################################################
+
+
+ ###################################################
+ //Funkcija ki skrbi za izbiro ustrezne vrednosti parametra sort
+ private function getAnswerSort($sort){
+ switch ($sort){
+ case 0:
+ $answerSort = "list";
+ break;
+ case 1:
+ $answerSort = "random";
+ break;
+ case 2:
+ $answerSort = "ascending";
+ break;
+ case 3:
+ $answerSort = "descending";
+ break;
+ }
+ return $answerSort;
+ }
+ ###################################################
+
+ ###################################################
+ //Funkcija ki skrbi za izbiro ustrezne vrednosti parametra missing_value
+ private function getAnswerMv($mv){
+ if($mv<0){
+ $answerMV = true;
+ }else{
+ $answerMV = false;
+ }
+ return $answerMV;
+ }
+ ###################################################
+
+
+ ###################################################
+ //Funkcija ki skrbi za izbiro ustrezne vrednosti parametra text_field
+ private function getAnswerTextField($tf){
+ if($tf==1){
+ $answerTextField = true;
+ }else{
+ $answerTextField = false;
+ }
+ return $answerTextField;
+ }
+ ###################################################
+
+
+ ###################################################
+ //Funkcija ki skrbi za izbiro stevila ali besedila
+ private function getNumOrString($check){
+ if(is_numeric($check)){
+ return (float)$check;
+ }else{
+ return ($check);
+ }
+ }
+ ###################################################
+
+
+ ###################################################
+ //Funkcija za generiranje json datoteke
+ function GenerateJsonFile(){
+ global $site_path;
+
+ # generating json file
+ $filename = $site_path.'admin/survey/modules/mod_json_survey_export/temp/exported_'.$this->anketa.'.json';
+
+ $fp = fopen($filename, "w") or
+ die ("cannot generate file $filename<br>\n");
+ fwrite($fp, $this->json) or
+ die ("cannot send data to file<br>\n");
+ fclose($fp);
+ # generating json file - konec
+ }
+ ##################################################################################################
+
+
+ ###################################################
+ //Funkcija za output in brisanje json datotek
+ public function OutputJsonFile(){
+ global $site_path;
+
+ //datoteka
+ $file = $site_path.'admin/survey/modules/mod_json_survey_export/temp/exported_'.$this->anketa.'.json';
+
+ //ime datoteke
+ $filename = 'exported_'.$this->anketa.'.json';
+
+ //priprava header za json in forced download
+ header('Content-type: application/json; charset=utf-8');
+ header('Content-Disposition: attachment; filename="' . $filename . '"');
+ //priprava header za json in forced download - konec
+
+ readfile($file);
+
+ //brisanje temp json datoteke
+ unlink($file);
+ //brisanje temp json datoteke - konec
+ }
+ ##################################################################################################
+
+} \ No newline at end of file
diff --git a/admin/survey/modules/mod_json_survey_export/docs/Demo izvoza Test 1, r1-NB.json b/admin/survey/modules/mod_json_survey_export/docs/Demo izvoza Test 1, r1-NB.json
new file mode 100644
index 0000000..4cc065f
--- /dev/null
+++ b/admin/survey/modules/mod_json_survey_export/docs/Demo izvoza Test 1, r1-NB.json
@@ -0,0 +1,374 @@
+{
+ "survey": {
+ "id": 7863 ,
+ "name": "Izvoz vprašalnika Test 1",
+ "author_username": "nejc.berzelak@fdv.uni-lj.si",
+ "questionnaire": {
+ "pages": [
+ {
+ "id": -1,
+ "type": "intro",
+ "visible": true,
+ "text": "Besedilo uvodne strani."
+ },
+ {
+ "id": 56741,
+ "type": "normal",
+ "questions": [
+ {
+ "id": 871300,
+ "type": "single_answer",
+ "input": "radio",
+ "name": "Q1",
+ "text": "Besedilo vprašanja 1",
+ "note": "Opomba k vprašanju 1",
+ "nr_check": "ask",
+ "items": [
+ {
+ "id": 871300,
+ "name": "Q1"
+ }
+ ],
+ "answers": [
+ {
+ "id": 480982,
+ "value": 10,
+ "text": "Vprašanje 1 odgovor 1",
+ "sort": "list",
+ "missing_value": false,
+ "text_field": false
+ },
+ {
+ "id": 480983,
+ "value": 20,
+ "text": "Vprašanje 1 odgovor 2",
+ "sort": "random",
+ "missing_value": false,
+ "text_field": false
+ },
+ {
+ "id": 480985,
+ "value": 30,
+ "text": "Vprašanje 1 odgovor 3 + tekst",
+ "sort": "random",
+ "missing_value": false,
+ "text_field": true
+ },
+ {
+ "id": 480986,
+ "value": -99,
+ "text": "Vprašanje 1 odgovor Ne vem (m.v.)",
+ "sort": "list",
+ "missing_value": true,
+ "text_field": false
+ },
+ {
+ "id": 480987,
+ "value": -98,
+ "text": "Vprašanje 1 odgovor Ne želim odgovoriti (m.v.)",
+ "sort": "list",
+ "missing_value": true,
+ "text_field": false
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "id": 56742,
+ "type": "normal",
+ "questions": [
+ {
+ "id": 871301,
+ "type": "grid",
+ "input": "radio",
+ "layout": "standard_table",
+ "name": "QX",
+ "text": "Besedilo vprašanja X",
+ "note": "Opomba k vprašanju X",
+ "nr_check": "require",
+ "items": [
+ {
+ "id": 480988,
+ "name": "QXI",
+ "text": "Vprašanje X item I",
+ "sort": "random",
+ "text_field": false
+ },
+ {
+ "id": 480989,
+ "name": "QXII",
+ "text": "Vprašanje X item II",
+ "sort": "random",
+ "text_field": false
+ },
+ {
+ "id": 480991,
+ "name": "QXIII",
+ "text": "Vprašanje X item III + tekst",
+ "sort": "list",
+ "text_field": true
+ }
+ ],
+ "answers": [
+ {
+ "id": 1,
+ "value": 1,
+ "text": "Vprašanje X odgovor 1",
+ "missing_value": false
+ },
+ {
+ "id": 2,
+ "value": 2,
+ "text": "Vprašanje X odgovor 2",
+ "missing_value": false
+ },
+ {
+ "id": 3,
+ "value": 3,
+ "text": "Vprašanje X odgovor 3",
+ "missing_value": false
+ },
+ {
+ "id": 4,
+ "value": -99,
+ "text": "Vprašanje X odgovor Ne vem (m.v.)",
+ "missing_value": true
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "id": 56743,
+ "type": "normal",
+ "questions": [
+ {
+ "id": 871302,
+ "type": "multi_answer",
+ "input": "checkbox",
+ "name": "Q3",
+ "text": "Besedilo vprašanja 3",
+ "note": "Opomba k vprašanju 3",
+ "nr_check": "none",
+ "items": [
+ {
+ "id": 480992,
+ "name": "Q3a",
+ "text": "Vprašanje 3 item 1",
+ "position": 1,
+ "sort": "list",
+ "text_field": false
+ },
+ {
+ "id": 480993,
+ "name": "Q3b",
+ "text": "Vprašanje 3 item 2",
+ "position": 2,
+ "sort": "list",
+ "text_field": false
+ },
+ {
+ "id": 480998,
+ "name": "Q3c",
+ "text": "Vprašanje 3 item 3 + tekst",
+ "position": 5,
+ "sort": "list",
+ "text_field": false
+ }
+ ],
+ "answers": [
+ {
+ "id": 480996,
+ "value": -99,
+ "text": "Vprašanje 3 odgovor Ne vem (m.v.)",
+ "position": 3,
+ "sort": "list",
+ "missing_value": true,
+ "text_field": false
+ },
+ {
+ "id": 480997,
+ "value": -98,
+ "text": "Vprašanje 3 odgovor Ne želim odgovoriti (m.v.)",
+ "position": 4,
+ "sort": "list",
+ "missing_value": true,
+ "text_field": false
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "id": 56744,
+ "type": "normal",
+ "questions": [
+ {
+ "id": 871303,
+ "type": "open",
+ "input": "numeric",
+ "name": "Q4",
+ "text": "Besedilo vprašanja 4",
+ "item_text_layout": "right",
+ "nr_check": "none",
+ "items": [
+ {
+ "id": 480999,
+ "name": "Q4a",
+ "text": "enota polja"
+ }
+ ],
+ "answers": [
+ {
+ "id": 481000,
+ "value": -97,
+ "text": "Vprašanje 4 odgovor Se ne nanaša (m.v.)",
+ "missing_value": true
+ }
+ ]
+ },
+ {
+ "id": 871304,
+ "type": "open",
+ "input": "numeric",
+ "name": "Q5",
+ "text": "Besedilo vprašanja 5",
+ "note": "Opomba k vprašanju 5",
+ "item_text_layout": "left",
+ "nr_check": "none",
+ "items": [
+ {
+ "id": 481001,
+ "name": "Q5a",
+ "text": "enota polja 1"
+ },
+ {
+ "id": 481002,
+ "name": "Q5b",
+ "text": "enota polja 2"
+ }
+ ]
+ },
+ {
+ "id": 871305,
+ "type": "open",
+ "input": "text",
+ "name": "Q6",
+ "text": "Besedilo vprašanja 6",
+ "note": "Opomba k vprašanju 6",
+ "item_text_layout": "bottom",
+ "nr_check": "none",
+ "items": [
+ {
+ "id": 481003,
+ "name": "Q6a",
+ "text": "opis polja 1"
+ },
+ {
+ "id": 481004,
+ "name": "Q6b",
+ "text": "opis polja 2"
+ },
+ {
+ "id": 481005,
+ "name": "Q6c",
+ "text": "opis polja 3"
+ },
+ {
+ "id": 481006,
+ "name": "Q6d",
+ "text": "opis polja 4"
+ }
+ ],
+ "answers": [
+ {
+ "id": 481007,
+ "value": -99,
+ "text": "Vprašanje 6 odgovor Ne vem (m.v.)",
+ "missing_value": true
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "id": 56745,
+ "type": "normal",
+ "questions": [
+ {
+ "id": 871306,
+ "type": "grid",
+ "input": "checkbox",
+ "layout": "standard_table",
+ "name": "Q7",
+ "text": "Besedilo vprašanja 7",
+ "nr_check": "none",
+ "items": [
+ {
+ "id": 481008,
+ "name": "Q7a",
+ "text": "Vprašanje 7 item 1",
+ "sort": "random",
+ "text_field": false
+ },
+ {
+ "id": 481009,
+ "name": "Q7b",
+ "text": "Vprašanje 7 item 2",
+ "sort": "list",
+ "text_field": false
+ },
+ {
+ "id": 481011,
+ "name": "Q7c",
+ "text": "Vprašanje 7 item 3 + tekst",
+ "sort": "random",
+ "text_field": true
+ }
+ ],
+ "col_items": [
+ {
+ "id": 1,
+ "name": "1",
+ "text": "Vprašanje 7 Stolpec 1"
+ },
+ {
+ "id": 2,
+ "name": "2",
+ "text": "Vprašanje 7 Stolpec 2"
+ },
+ {
+ "id": 3,
+ "name": "3",
+ "text": "Vprašanje 7 Stolpec 3"
+ }
+ ],
+ "answers": [
+ {
+ "id": 4,
+ "value": -99,
+ "text": "Vprašanje 7 odgovor Ne vem (m.v.)",
+ "missing_value": true
+ }
+ ]
+ },
+ {
+ "id": 871307,
+ "type": "caption",
+ "name": "label1",
+ "text": "Besedilo napisa 1",
+ "note": "Opomba k napisu 1"
+ }
+ ]
+ },
+ {
+ "id": -2,
+ "type": "end",
+ "text": "Besedilo zaključne strani.",
+ "end_action": "close"
+ }
+ ]
+ }
+ }
+} \ No newline at end of file
diff --git a/admin/survey/modules/mod_json_survey_export/docs/Specifikacija izvoza, r1-NB.docx b/admin/survey/modules/mod_json_survey_export/docs/Specifikacija izvoza, r1-NB.docx
new file mode 100644
index 0000000..c7be225
--- /dev/null
+++ b/admin/survey/modules/mod_json_survey_export/docs/Specifikacija izvoza, r1-NB.docx
Binary files differ
diff --git a/admin/survey/modules/mod_kakovost/R/calc.usability.R b/admin/survey/modules/mod_kakovost/R/calc.usability.R
new file mode 100644
index 0000000..4e4bb0c
--- /dev/null
+++ b/admin/survey/modules/mod_kakovost/R/calc.usability.R
@@ -0,0 +1,72 @@
+calc.usability <- function(m.all, return.type){
+ # return.type:
+ # 1: return only absolute
+ # 2: return only %
+ # 3: return both (even rows: absolute, odd rows: %)
+
+ ## calculations
+ m.all[, Prekinitve:=v3]
+ m.all[, Neodgovori:=v1]
+ m.all[, Nevsebinski:=v96+v97+v98+v99]
+ m.all[, Izpostavljen:=allqs-(v2+v3+v4+v5)]
+ setnames(m.all, "va", "Veljavni")
+
+ m.all[, UNL:=Neodgovori/Izpostavljen]
+ m.all[is.na(UNL)==T, UNL:=0]
+ m.all[, UML:=(v3/allqs)+(1-(v3/allqs))*UNL]
+ m.all[, UCL:=1-UML]
+ m.all[, UIL:=v2/(v2+Izpostavljen)]
+ m.all[is.na(UIL)==T, UIL:=0]
+ m.all[, UAQ:=v4/allqs]
+
+ m.all[, Uporabnost:=1-UML]
+
+ #tidy up
+ setcolorder(m.all, c("recnum", "allqs", "Veljavni", "Nevsebinski", "Neodgovori",
+ "Izpostavljen", "Prekinitve", "Uporabnost",
+ "v1", "v2", "v3", "v4", "v5", "v96", "v97", "v98", "v99",
+ "UNL", "UML", "UCL", "UIL", "UAQ"))
+
+ if(return.type==1){
+ return(m.all)
+ }else{
+ m.all.p <- copy(m.all)
+
+ m.all.p[, (c("Veljavni", "Nevsebinski", "Neodgovori")) := lapply(.SD, "/", m.all.p$Izpostavljen), .SDcols=c("Veljavni", "Nevsebinski", "Neodgovori")]
+ m.all.p[, (c("Prekinitve", "v1", "v2", "v3", "v4", "v5", "v96", "v97", "v98", "v99")) := lapply(.SD, "/", m.all.p$allqs), .SDcols=c("Prekinitve", "v1", "v2", "v3", "v4", "v5", "v96", "v97", "v98", "v99")]
+ m.all.p[, Izpostavljen:=1]
+
+ if(return.type==2){
+ return(m.all.p)
+ }else{
+ m.all[, Uporabnost:=Veljavni]
+ m.all[, c("UNL", "UML", "UCL", "UIL", "UAQ"):=NA]
+ m.all <- m.all[, lapply(.SD, as.character)]
+
+ m.all.p[, allqs:=NA]
+ m.all.p[, allqs:=as.character(allqs)]
+
+ change.cols <- c("Veljavni", "Nevsebinski", "Neodgovori", "Izpostavljen", "Prekinitve", "Uporabnost",
+ "v1", "v2", "v3", "v4", "v5", "v96", "v97", "v98", "v99",
+ "UNL", "UML", "UCL", "UIL", "UAQ")
+ m.all.p[, (change.cols):=lapply(.SD, function(x){paste0(round(x*100, 0), "%")}), .SD=change.cols]
+
+ m.1ka <- data.table(matrix("", nrow=nrow(m.all)*2, ncol=ncol(m.all)))
+
+ a.rows <- as.integer(seq(1, nrow(m.1ka), by=2))
+ p.rows <- as.integer(seq(2, nrow(m.1ka), by=2))
+
+ set(m.1ka, a.rows, 1:ncol(m.1ka), value=m.all)
+ suppressWarnings(set(m.1ka, p.rows, 1:ncol(m.1ka), value=m.all.p))
+
+ setnames(m.1ka, colnames(m.all))
+ m.1ka[, Status:=NA_character_]
+ setcolorder(m.1ka, c("recnum", "allqs", "Veljavni", "Nevsebinski", "Neodgovori",
+ "Izpostavljen", "Prekinitve", "Uporabnost", "Status",
+ "v1", "v2", "v3", "v4", "v5", "v96", "v97", "v98", "v99",
+ "UNL", "UML", "UCL", "UIL", "UAQ"))
+
+ return(m.1ka)
+ }
+ }
+} \ No newline at end of file
diff --git a/admin/survey/modules/mod_kakovost/R/gen.survey.str.R b/admin/survey/modules/mod_kakovost/R/gen.survey.str.R
new file mode 100644
index 0000000..32e1f57
--- /dev/null
+++ b/admin/survey/modules/mod_kakovost/R/gen.survey.str.R
@@ -0,0 +1,71 @@
+gen.survey.str <- function(colnames.dsa, questions.file, items.file){
+ #import questions file
+ questions <- fread(questions.file, skip=1, header=F,
+ select=c(2, 5, 6, 8, 9, 10),
+ col.names=c("question.id", "variable", "tip", "size", "visible", "params"))
+
+ #create variable list from survey data file
+ #remove "recnum" and "_text" fields
+ var.data <- colnames.dsa[sapply(colnames.dsa, function(x){substr(x, nchar(x)-4, nchar(x))})!="_text"]
+
+ #create variable list from questions file
+ var.questions <- questions$variable
+
+ #generate data.table from var.data list
+ survey.str <- data.table(variable = var.data)
+
+ setkey(questions, "variable")
+ setkey(survey.str, "variable")
+
+ #if all var.data in var.questions, do the simple merge and return file
+ if(all(var.data %in% var.questions)){
+ survey.str <- questions[survey.str,]
+ return(survey.str)
+ }else{ #if not, import items file and do additional merge with it...
+ #import items file
+ items <- fread(items.file, skip=1, header=F,
+ select=c(2, 3, 4),
+ col.names=c("question.id", "item.id", "variable"))
+
+ setkey(items, "question.id")
+ setkey(questions, "question.id")
+
+ #bind variables from questions and items (for the later, only take instances with no match in the questions file...)
+ survey.str.qi <- rbindlist(list(questions[var.questions %in% var.data,],
+ items[questions[!(var.questions %in% var.data), -"variable", with=F], nomatch=0L]),
+ fill=T)
+
+ #merge questions+items with survey data...
+ setkey(survey.str.qi, "variable")
+ setkey(survey.str, "variable")
+ survey.str <- survey.str.qi[survey.str,]
+
+ #if all var.data is now matched, return the survey.str
+ if(!(any(is.na(survey.str)))){
+ return(survey.str)
+ }else{ #if not, do additional merging...
+ #create index of all NA instaces from survey.str...
+ index <- apply(cbind(survey.str[, is.na(tip)],
+ (sapply(survey.str[, variable], function(x){
+ substr(x, 1, regexpr("\\_[^\\_]*$", x)-1)
+ }) %in% survey.str.qi$variable)
+ ),
+ 1, all)
+
+ #... using regex to find matches among unmatched instances from survey.str.qi
+ add <- merge(survey.str[index, list(variable, substr(variable, 1, regexpr("\\_[^\\_]*$", variable)-1))],
+ survey.str.qi[!(variable %in% survey.str$variable),],
+ by.x="V2", by.y="variable", all.y=F)[, list(question.id, item.id, tip, visible, size, params)]
+
+ #update survey.str with new values
+ survey.str[index, c("question.id", "item.id", "tip", "visible", "size", "params") := as.list(add)]
+
+ #if there is no NAs left, return survey.str, else return msg
+ if(!(any(is.na(survey.str$tip)))){
+ return(survey.str)
+ }else{
+ return(paste("No match found for: ", survey.str[is.na(tip), variable]))
+ }
+ }
+ }
+}
diff --git a/admin/survey/modules/mod_kakovost/R/gen.usability.matrix.R b/admin/survey/modules/mod_kakovost/R/gen.usability.matrix.R
new file mode 100644
index 0000000..a2b1465
--- /dev/null
+++ b/admin/survey/modules/mod_kakovost/R/gen.usability.matrix.R
@@ -0,0 +1,181 @@
+gen.usability.matrix <- function(dsa, survey.str){
+ #define special values to detect
+ #order of this values is important:
+ # in case of conflicts @ chk.t types of questions the order sets the priporty of which values to keep
+ special.v <- c(-1, -3, -5, -96, -97, -98, -99, -4, -2)
+
+ #define which variables belong to checkbox-like* questions
+ #(* i.e.: check for special values @ ANY variable per question/item ID)
+ # 2: normal checkbox
+ # 16: multicheckbox
+ # 17: ranking
+ chkbox.t <- c(2, 16, 17)
+
+ ##all other variables belong to normal** questions
+ #(** i.e.: check for special values @ each variable per question/item ID)
+ #if there are no normal questions, create 0 matrix, otherwise...
+ if(nrow(survey.str[!(tip %in% chkbox.t),])==0){
+ m.n <- matrix(0, nrow = nrow(dsa), ncol=length(special.v)+1)
+ }else{
+ #create list of all normal questions
+ c.n <- colnames(dsa)[which(colnames(dsa) %in% survey.str[!(tip %in% chkbox.t), variable])]
+
+ #...count all non-special values for each variable
+ #... + count each special value for each variable
+ m.n <- cbind(rowSums(sapply(dsa[, c.n, with=FALSE], function(x){!(x %in% special.v)})),
+ sapply(special.v, function(x){as.integer(rowSums(dsa[, c.n, with=FALSE]==x, na.rm=TRUE))}))
+ }
+
+ ##procedure for tip:2
+ #only run if there is an at least one tip:2 variable
+ if(survey.str[, any(tip==2)]){
+ #get list of all unique tip:2 question ids
+ q.2 <- unique(survey.str[tip==2, question.id])
+ #get list of all corresponding variables for each q.2 id
+ c.2 <- lapply(q.2, function(x){colnames(dsa)[which(colnames(dsa) %in% survey.str[question.id==x & tip==2, variable])]})
+
+ #(do this for each instance in c.2):
+ #for each set of variables:
+ # check if any variable contains at least one non-special value
+ # + (for each special value) check if any variable contains at least special value
+ m.2 <- lapply(c.2, function(x){
+ cbind(apply(dsa[, x, with=FALSE], 1, function(q){any(!(q %in% special.v))}),
+ sapply(special.v, function(y){
+ apply(dsa[, x, with=FALSE], 1, function(q){any(q==y)})
+ })
+ )
+ })
+
+ # (do this for each instance in c.2)
+ # if multiple special values per respondent exist, keep only the first one
+ m.2 <- lapply(m.2, function(x){
+ if(any(rowSums(x)>1)){
+ p <- x[rowSums(x)>1,]
+ for(i in 1:nrow(p)){
+ a <- p[i,]
+ f <- TRUE
+ for(j in 1:length(a)){
+ print(j)
+ if(a[j] & f){
+ f <- FALSE
+ }else if(a[j] & !f){
+ a[j] <- FALSE
+ }
+ }
+ p[i,] <- a
+ }
+ x[rowSums(x)>1,] <- p
+ }else{x}
+ })
+
+
+ #add to m.n
+ m.n <- m.n + Reduce('+', m.2)
+ }
+
+ ##procedure for tip:16
+ #only run if there is an at least one tip:16 variable
+ if(survey.str[, any(tip==16)]){
+ #get list of all unique tip:16 item ids
+ q.16 <- unique(survey.str[tip==16, item.id])
+
+ #get list of all corresponding variables for each q.16 id
+ c.16 <- lapply(q.16, function(x){colnames(dsa)[which(colnames(dsa) %in% survey.str[item.id==x & tip==16, variable])]})
+ #(do this for each special value):
+ #for each set of variables, check if any variable contains at least one special value
+ # m.16 <- sapply(special.v, function(x){
+ # rowSums(sapply(c.16, function(y){
+ # apply(dsa[, y, with=FALSE], 1, function(q){any(q==x)})
+ # }))
+ # })
+
+ #(do this for each instance in c.16):
+ #for each set of variables:
+ # check if any variable contains at least one non-special value
+ # + (for each special value) check if any variable contains at least special value
+ m.16 <- lapply(c.16, function(x){
+ cbind(apply(dsa[, x, with=FALSE], 1, function(q){any(!(q %in% special.v))}),
+ sapply(special.v, function(y){
+ apply(dsa[, x, with=FALSE], 1, function(q){any(q==y)})
+ })
+ )
+ })
+
+ # (do this for each instance in c.16)
+ # if multiple special values per respondent exist, keep only the first one
+ m.16 <- lapply(m.16, function(x){
+ if(any(rowSums(x)>1)){
+ p <- x[rowSums(x)>1,]
+ for(i in 1:nrow(p)){
+ a <- p[i,]
+ f <- TRUE
+ for(j in 1:length(a)){
+ print(j)
+ if(a[j] & f){
+ f <- FALSE
+ }else if(a[j] & !f){
+ a[j] <- FALSE
+ }
+ }
+ p[i,] <- a
+ }
+ x[rowSums(x)>1,] <- p
+ }else{x}
+ })
+
+ m.n <- m.n + Reduce('+', m.16)
+ }
+
+ ##procedure for tip:17
+ #only run if there is an at least one tip:17 variable
+ if(survey.str[, any(tip==17)]){
+ #get list of all unique tip:17 question ids
+ q.17 <- unique(survey.str[tip==17, question.id])
+
+ #get list of all corresponding variables for each q.17 id
+ c.17 <- lapply(q.17, function(x){colnames(dsa)[which(colnames(dsa) %in% survey.str[question.id==x & tip==17, variable])]})
+
+ #similiar procedure as for tip:2 and tip:16....
+ m.17 <- lapply(c.17, function(x){
+ cbind(apply(dsa[, x, with=FALSE], 1, function(q){any(!(q %in% special.v))}),
+ sapply(special.v, function(y){
+ apply(dsa[, x, with=FALSE], 1, function(q){any(q==y)})
+ })
+ )
+ })
+
+ #... the only difference is that we are checking for all rowsums > 0, not > 1
+ m.17 <- lapply(m.17, function(x){
+ if(any(rowSums(x)>1)){
+ p <- x[rowSums(x)>0,]
+ for(i in 1:nrow(p)){
+ a <- p[i,]
+ f <- TRUE
+ for(j in 1:length(a)){
+ if(a[j] & f){
+ f <- FALSE
+ }else if(a[j] & !f){
+ a[j] <- FALSE
+ }
+ }
+ p[i,] <- a
+ }
+ x[rowSums(x)>0,] <- p
+ }else{x}
+ })
+
+ m.n <- m.n + Reduce('+', m.17)
+ }
+
+ m.n <- cbind(m.n, rowSums(m.n))
+
+ if(all(m.n[, ncol(m.n)][1]==m.n[, ncol(m.n)])){
+ m.n <- as.data.table(m.n)
+ m.n[, recnum:=dsa$recnum]
+ setnames(m.n, colnames(m.n)[-length(colnames(m.n))], c("va", "v1", "v3", "v5", "v96", "v97", "v98", "v99", "v4", "v2", "allqs"))
+ setcolorder(m.n, c("recnum", colnames(m.n)[-length(colnames(m.n))]))
+ return(m.n)
+ }else{
+ print("not all rowsums equal!")
+ }
+} \ No newline at end of file
diff --git a/admin/survey/modules/mod_kakovost/R/kakovost.R b/admin/survey/modules/mod_kakovost/R/kakovost.R
new file mode 100644
index 0000000..de05f1e
--- /dev/null
+++ b/admin/survey/modules/mod_kakovost/R/kakovost.R
@@ -0,0 +1,47 @@
+#uporabnost <- function(params){
+
+#setwd("path od mape, kjer se nahaja ta glavna datoteka, npr. C:/mapa")
+
+# Import data.table & functions ------------------------------------------------------
+require("data.table")
+source("modules/mod_uporabnost/R/gen.survey.str.R")
+source("modules/mod_uporabnost/R/gen.usability.matrix.R")
+source("modules/mod_uporabnost/R/calc.usability.R")
+
+# Input data ------------------------------------------------------
+params <- commandArgs(trailingOnly = TRUE)
+ID <- params[1]
+
+#get & import dsa: the main survey data file (containing only recnum, status, lurker and all variables relating to answers to survey questions)
+dsa.file <- paste0("modules/mod_uporabnost/temp/data_", ID, ".csv")
+dsa <- fread(dsa.file, header=T, drop=c(1:5, 7, 8))
+
+#get question and item files
+questions.file <- paste0("modules/mod_uporabnost/temp/questions_", ID, ".csv")
+items.file <- paste0("modules/mod_uporabnost/temp/items_", ID, ".csv")
+
+# Main & Output ------------------------------------------------------
+#generate survey structure
+survey.str <- gen.survey.str(colnames(dsa)[-(1)], questions.file, items.file)
+
+if(any(!(is.data.table(survey.str)), nrow(survey.str)==0)){
+ write(survey.str, paste0("modules/mod_uporabnost/results/usability_", ID, ".csv"))
+}else{
+ #delete invisible variables and types: 5, 9, 22, 23, 25
+ survey.str <- survey.str[visible==1 & !(tip %in% c(5, 9, 22, 23, 25)),]
+
+ #generate usability matrix
+ m.all <- gen.usability.matrix(dsa, survey.str)
+
+ if(any(!(is.data.table(m.all)), nrow(m.all)==0)){
+ write(m.all, paste0("modules/mod_uporabnost/results/usability_", ID, ".csv"))
+ }else{
+ #calculate usability indexes
+ m.final <- calc.usability(m.all, 3)
+
+ #write to results
+ write.csv2(m.final, paste0("modules/mod_uporabnost/results/usability_", ID, ".csv"), row.names = FALSE)
+ }
+}
+
+#} \ No newline at end of file
diff --git a/admin/survey/modules/mod_kakovost/class.SurveyKakovost.php b/admin/survey/modules/mod_kakovost/class.SurveyKakovost.php
new file mode 100644
index 0000000..711bdd7
--- /dev/null
+++ b/admin/survey/modules/mod_kakovost/class.SurveyKakovost.php
@@ -0,0 +1,906 @@
+<?php
+
+define("TEMP_FOLDER", "admin/survey/modules/mod_kakovost/temp");
+define("SCRIPT_FOLDER", "admin/survey/modules/mod_kakovost/R");
+define("RESULTS_FOLDER", "admin/survey/modules/mod_kakovost/results");
+
+class SurveyKakovost{
+
+ var $anketa; # id ankete
+ var $db_table = '';
+
+ private $displayEditIconsSettings = false; # ali prikazujemo okno s checkboxi za nastavitve tabele s podatki
+
+ private $cols_with_value = array(); # kateri stolpci imajo vrednosti
+ private $show_with_zero = false; # Ali prikazujemo stolpce z vrednostmi 0
+ private $show_details = false; # Ali prikazujemo stolpce s podrobnimi vrednostmi (-1, -2...)
+ private $show_calculations = false; # Ali prikazujemo stolpce s podrobnimi izracuni (UML, UNL...)
+ private $show_with_other = true; # Ali prikazujemo vrstice "Drugo"
+ private $show_with_text = true; # Ali prikazujemo vrstice tipa "besedilo"
+
+ public $bottom_usable_limit = 50; # Spodnja meja za usable respondente (def. 50%)
+ public $top_usable_limit = 80; # Zgornja meja za usable respondente (def. 80%) - unusable (50-), partially usable (50-80), usable(80+)
+
+ public $_HEADERS = array(); # shranimo podatke vseh variabel
+ private $headFileName = null; # pot do header fajla
+ private $dataFileName = null; # pot do data fajla
+ private $dataFileStatus = null; # status data datoteke
+ private $SDF = null; # class za inkrementalno dodajanje fajlov
+
+ public $variablesList = null; # Seznam vseh variabel nad katerimi lahko izvajamo (zakeširamo)
+
+ public $_CURRENT_STATUS_FILTER = ''; # filter po statusih, privzeto izvažamo 6 in 5
+ public $_PROFILE_ID_VARIABLE = ''; # filter po statusih, privzeto izvažamo 6 in 5
+
+ public $_HAS_TEST_DATA = false; # ali anketa vsebuje testne podatke
+
+ private $usability = array(); # array z vsemi podatki
+
+ private $sortField = 'recnum'; # Polje po katerem sortiramo tabelo
+ private $sortType = 0; # Nacin sortiranja (narascajoce/padajoce)
+
+
+ function __construct($anketa){
+ global $site_url;
+
+ // Ce imamo anketo, smo v status->ul evealvacija
+ if ((int)$anketa > 0){
+
+ $this->anketa = $anketa;
+
+ # polovimo vrsto tabel (aktivne / neaktivne)
+ SurveyInfo :: getInstance()->SurveyInit($this->anketa);
+ if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) {
+ $this->db_table = '_active';
+ }
+
+ SurveyAnalysisHelper::getInstance()->Init($this->anketa);
+
+ $this->_CURRENT_STATUS_FILTER = STATUS_FIELD.' ~ /6|5/';
+
+ Common::deletePreviewData($this->anketa);
+
+ // Poskrbimo za datoteko s podatki
+ $SDF = SurveyDataFile::get_instance();
+ $SDF->init($this->anketa);
+
+ if($generateDataFile)
+ $SDF->prepareFiles();
+
+ $this->headFileName = $SDF->getHeaderFileName();
+ $this->dataFileName = $SDF->getDataFileName();
+ $this->dataFileStatus = $SDF->getStatus();
+
+ if ( $this->dataFileStatus == FILE_STATUS_NO_DATA || $this->dataFileStatus == FILE_STATUS_SRV_DELETED) {
+ Common::noDataAlert();
+ exit();
+ }
+
+ # Inicializiramo in polovimo nastavitve missing profila
+ SurveyStatusProfiles::Init($this->anketa);
+ SurveyUserSetting::getInstance()->Init($this->anketa, $global_user_id);
+ SurveyConditionProfiles :: Init($this->anketa, $global_user_id);
+ SurveyTimeProfiles :: Init($this->anketa, $global_user_id);
+ SurveyVariablesProfiles :: Init($this->anketa, $global_user_id);
+ SurveyDataSettingProfiles :: Init($this->anketa);
+
+
+ // preberemo nastavitve iz baze (prej v sessionu)
+ SurveyUserSession::Init($this->anketa);
+ $this->sessionData = SurveyUserSession::getData();
+
+ if(isset($_SESSION['sid_'.$this->anketa]['usabilityIcons_settings']))
+ $this->displayEditIconsSettings = ($_SESSION['sid_'.$this->anketa]['usabilityIcons_settings']);
+
+ if (file_exists($this->headFileName) && $this->headFileName !== null && $this->headFileName != ''){
+ $this->_HEADERS = unserialize(file_get_contents($this->headFileName));
+ }
+
+ # nastavimo vse filtre
+ $this->setUpFilter();
+
+ # nastavimo filtre uporabnika
+ $this->setUserFilters();
+
+ # nastavimo sortiranje
+ if(isset($_GET['sortField']))
+ $this->sortField = $_GET['sortField'];
+ if(isset($_GET['sortType']))
+ $this->sortType = $_GET['sortType'];
+ }
+ }
+
+
+ // Prikažemo stran
+ public function displayKakovost(){
+ global $lang;
+
+ // Prikaz nastavitev
+ $this->displayKakovostSettings();
+
+ // Izvedemo pripravo datoteke
+ $this->prepareData();
+
+ // Napolnimo podatke v array
+ $this->fillData();
+
+ // Izrisemo tabelo
+ $this->displayKakovostTable();
+
+ // Na koncu pobrisemo zacasne datoteke
+ //$this->deleteTemp();
+ }
+
+ // Prikazemo tabelo
+ private function displayKakovostTable(){
+ global $site_path;
+ global $lang;
+ global $admin_type;
+
+ echo '<div id="usable_table">';
+
+ echo '<table id="tbl_usable_respondents">';
+
+
+ // NASLOVNE VRSTICE
+ if($this->sortType == 1){
+ $sortType = 0;
+ $arrow = ' <span class="faicon sort_ascending"></span>';
+ }
+ else{
+ $sortType = 1;
+ $arrow = ' <span class="faicon sort_descending"></span>';
+ }
+
+ if($admin_type == '0' || $admin_type == '1')
+ echo '<th class="all" rowspan="2">User ID</th>';
+
+ echo '<th class="recnum" rowspan="2" style="width:60px;"><a href="index.php?anketa='.$this->anketa.'&a=usable_resp&sortField=recnum&sortType='.$sortType.'">Recnum'./*$lang['recnum'].*/($this->sortField=='recnum' ? $arrow : '').'</a></th>';
+ echo '<th class="all" rowspan="2">'.$lang['srv_usableResp_qcount'].'</th>';
+
+ echo '<th class="data" colspan=4>'.$lang['srv_usableResp_exposed'].'</th>';
+
+ echo '<th class="data" rowspan="2"><a href="index.php?anketa='.$this->anketa.'&a=usable_resp&sortField=breakoff&sortType='.$sortType.'">'.$lang['srv_usableResp_breakoff'].($this->sortField=='breakoff' ? $arrow : '').'</th>';
+
+ echo '<th class="usable" colspan="2">'.$lang['srv_usableResp_usability'].'</th>';
+
+ // ali odstranimo vse stolpce s podrobnimi vrednostmi (-1, -2...)
+ if ($this->show_details == true) {
+ foreach ($this->_missings AS $value => $text){
+ $cnt_miss++;
+ echo "<th rowspan=\"2\" class=\"unusable\" title=\"".$lang['srv_usableResp_'.$text]."\" >{$value}<br/>(".$lang['srv_usableResp_'.$text].")</th>";
+ }
+ foreach ($this->_unsets AS $value => $text){
+ $cnt_undefined++;
+ echo "<th rowspan=\"2\" class=\"unusable\" title=\"".$lang['srv_usableResp_'.$text]."\">{$value}<br/>(".$lang['srv_usableResp_'.$text].")</th>";
+ }
+ }
+
+ // ali prikazemo podrobne izracune
+ if ($this->show_calculations == true) {
+ echo '<th class="calculation" rowspan="2">UNL</th>';
+ echo '<th class="calculation" rowspan="2">UML</th>';
+ echo '<th class="calculation" rowspan="2">UCL</th>';
+ echo '<th class="calculation" rowspan="2">UIL</th>';
+ echo '<th class="calculation" rowspan="2">UAQ</th>';
+ }
+
+ echo '</tr>';
+
+ echo '<tr>';
+ echo '<th class="data"><a href="index.php?anketa='.$this->anketa.'&a=usable_resp&sortField=valid&sortType='.$sortType.'">'.$lang['srv_anl_valid'].($this->sortField=='valid' ? $arrow : '').'</th>';
+ echo '<th class="data"><a href="index.php?anketa='.$this->anketa.'&a=usable_resp&sortField=nonsubstantive&sortType='.$sortType.'">'.$lang['srv_usableResp_nonsubstantive'].($this->sortField=='nonsubstantive' ? $arrow : '').'</th>';
+ echo '<th class="data"><a href="index.php?anketa='.$this->anketa.'&a=usable_resp&sortField=nonresponse&sortType='.$sortType.'">'.$lang['srv_usableResp_nonresponse'].($this->sortField=='nonresponse' ? $arrow : '').'</th>';
+ echo '<th class="data"><span class="bold">'.$lang['srv_anl_suma1'].'</span></th>';
+
+ echo '<th class="usable"><a href="index.php?anketa='.$this->anketa.'&a=usable_resp&sortField=usable&sortType='.$sortType.'">%'.($this->sortField=='usable' ? $arrow : '').'</a></th>';
+ echo '<th class="usable status"><a href="index.php?anketa='.$this->anketa.'&a=usable_resp&sortField=status&sortType='.$sortType.'">Status'.($this->sortField=='status' ? $arrow : '').'</a></th>';
+ echo '</tr>';
+
+
+ // VRSTICE S PODATKI
+ foreach($this->usability['data'] as $user){
+
+ // Prva vrstica z vrednostmi
+ echo '<tr class="'.$user['css'].'">';
+
+ if($admin_type == '0' || $admin_type == '1'){
+
+ $sql = sisplet_query("SELECT id FROM srv_user WHERE ank_id='".$this->anketa."' AND recnum='".$user['recnum']."'");
+ $row = mysqli_fetch_array($sql);
+
+ echo '<td rowspan="2" class="all">'.$row['id'].'</td>';
+ }
+
+
+ echo '<td rowspan="2" class="recnum">'.$user['recnum'].'</td>';
+
+ // Vsi
+ echo '<td rowspan="2" class="all">'.$user['all'].'</td>';
+
+ // Ustrezni
+ echo '<td class="data">'.$user['valid'].'</td>';
+
+ // Non-substantive
+ echo '<td class="data">'.$user['nonsubstantive'].'</td>';
+
+ // Non-response
+ echo '<td class="data">'.$user['nonresponse'].'</td>';
+
+ // Skupaj
+ echo '<td class="data sum bold">'.($user['valid']+$user['nonsubstantive']+$user['nonresponse']+$user['breakoff']).'</td>';
+
+ // Breakoffs
+ echo '<td class="data breakoff">'.$user['breakoff'].'</td>';
+
+ // Uporabni
+ echo '<td class="usable">'.$user['usable'].'</td>';
+ echo '<td class="usable status" rowspan="2">'.$user['status'].'</td>';
+
+ // ali odstranimo vse stolpce s podrobnimi vrednostmi (-1, -2...)
+ if ($this->show_details == true) {
+ echo '<td class="unusable">'.$user['-1'].'</td>';
+ echo '<td class="unusable">'.$user['-2'].'</td>';
+ echo '<td class="unusable">'.$user['-3'].'</td>';
+ echo '<td class="unusable">'.$user['-4'].'</td>';
+ echo '<td class="unusable">'.$user['-5'].'</td>';
+ echo '<td class="unusable">'.$user['-97'].'</td>';
+ echo '<td class="unusable">'.$user['-98'].'</td>';
+ echo '<td class="unusable">'.$user['-99'].'</td>';
+ }
+
+ // ali prikazemo podrobne izracune
+ if ($this->show_calculations == true) {
+ echo '<td class="calculation" rowspan="2">'.$user['UNL'].'</td>';
+ echo '<td class="calculation" rowspan="2">'.$user['UML'].'</td>';
+ echo '<td class="calculation" rowspan="2">'.$user['UCL'].'</td>';
+ echo '<td class="calculation" rowspan="2">'.$user['UIL'].'</td>';
+ echo '<td class="calculation" rowspan="2">'.$user['UAQ'].'</td>';
+ }
+
+ echo '</tr>';
+
+
+ // Druga vrstica s procenti
+ echo '<tr class="multiVariablesHeader '.$user['css'].' '.$css_usable.'">';
+
+ // Ustrezni
+ echo '<td class="data">'.$user['validPercent'].'</td>';
+
+ // Non-substantive
+ echo '<td class="data">'.$user['nonsubstantivePercent'].'</td>';
+
+ // Non-response
+ echo '<td class="data">'.$user['nonresponsePercent'].'</td>';
+
+ // Skupaj
+ echo '<td class="data sum bold">100%</td>';
+
+ // Breakoffs
+ echo '<td class="data breakoff">'.$user['breakoffPercent'].'</td>';
+
+ // Uporabni
+ echo '<td class="usable">'.$user['usablePercent'].'</td>';
+
+ // ali odstranimo vse stolpce s podrobnimi vrednostmi (-1, -2...)
+ if ($this->show_details == true) {
+ echo '<td class="unusable">'.$user['-1_percent'].'</td>';
+ echo '<td class="unusable">'.$user['-2_percent'].'</td>';
+ echo '<td class="unusable">'.$user['-3_percent'].'</td>';
+ echo '<td class="unusable">'.$user['-4_percent'].'</td>';
+ echo '<td class="unusable">'.$user['-5_percent'].'</td>';
+ echo '<td class="unusable">'.$user['-97_percent'].'</td>';
+ echo '<td class="unusable">'.$user['-98_percent'].'</td>';
+ echo '<td class="unusable">'.$user['-99_percent'].'</td>';
+ }
+
+ echo '</tr>';
+ }
+
+
+ echo '</table>';
+
+ if($this->usability['all'] > 0){
+ echo '<div class="usable_sum">';
+
+ //echo '<span class="bold">'.$lang['srv_usableResp_usability'].': </span>';
+ echo '<span class="usable_legend spaceLeft spaceRight" style="background-color:#ffffff;">'.$lang['srv_usableResp_usable_unit'].' - Status 2 ('.$this->top_usable_limit.'%-100%): <span class="bold">'.$this->usability['usable'].' ('.common::formatNumber($this->usability['usable']/$this->usability['all']*100, 0, null, '%').')</span></span>';
+ echo '<span class="usable_legend spaceLeft spaceRight" style="background-color:#ffffe3;">'.$lang['srv_usableResp_partusable_unit'].' - Status 1 ('.$this->bottom_usable_limit.'%-'.$this->top_usable_limit.'%): <span class="bold">'.$this->usability['partusable'].' ('.common::formatNumber($this->usability['partusable']/$this->usability['all']*100, 0, null, '%').')</span></span>';
+ echo '<span class="usable_legend spaceLeft" style="background-color:#ffe8e8;">'.$lang['srv_usableResp_unusable_unit'].' - Status 0 (0%-'.$this->bottom_usable_limit.'%): <span class="bold">'.$this->usability['unusable'].' ('.common::formatNumber($this->usability['unusable']/$this->usability['all']*100, 0, null, '%').')</span></span>';
+
+ echo '</div>';
+ }
+
+ echo '</div>';
+ }
+
+ private function displayKakovostSettings(){
+ global $lang;
+
+ // Div z nastavitvami ki se razpre
+ echo '<div id="dataSettingsCheckboxes" '.($this->displayEditIconsSettings ? '' : ' style="display:none;"').'>';
+ echo '<div id="toggleDataCheckboxes2" onClick="toggleDataCheckboxes(\'usability\');"><span class="faicon close icon-orange" style="padding-bottom:2px;"></span> '.$lang['srv_data_settings_checkboxes2'].'</div>';
+
+
+ echo '<div id="usable_respondents_settings">';
+
+ echo $lang['srv_usableResp_limit'].': ';
+
+ echo '<span class="spaceLeft spaceRight">'.$lang['srv_usableResp_bottom_limit'].': <input type="text" id="bottom_usable_limit" size="2" onblur="changeUsableRespSetting(this);" value="'.$this->bottom_usable_limit.'" />%</span>';
+ echo '<span class="spaceLeft spaceRight">'.$lang['srv_usableResp_top_limit'].': <input type="text" id="top_usable_limit" size="2" onblur="changeUsableRespSetting(this);" value="'.$this->top_usable_limit.'" />%</span>';
+
+ echo '<br />';
+
+ echo '<div style="margin-top:10px;">';
+ echo $lang['srv_usableResp_show'].': ';
+
+ // Prikaz neničelnih stolpcev
+ /*echo '<label class="spaceLeft spaceRight">';
+ echo '<input type="checkbox" id="show_with_zero" onclick="changeUsableRespSetting(this);" '.($this->show_with_zero == true ? ' checked="checked"' : '').' autocomplete="off">';
+ echo $lang['srv_usableResp_showZero'];
+ echo '</label>';*/
+
+ // Prikaz podrobnosti
+ echo '<label class="spaceLeft spaceRight">';
+ echo '<input type="checkbox" id="show_details" onclick="changeUsableRespSetting(this);" '.($this->show_details == true ? ' checked="checked"' : '').' autocomplete="off">';
+ echo $lang['srv_usableResp_showDetails'];
+ echo '</label>';
+
+ // Prikaz podrobnih izracunov
+ echo '<label class="spaceLeft">';
+ echo '<input type="checkbox" id="show_calculations" onclick="changeUsableRespSetting(this);" '.($this->show_calculations == true ? ' checked="checked"' : '').' autocomplete="off">';
+ echo $lang['srv_usableResp_showCalc'];
+ echo '</label>';
+ echo '</div>';
+
+ echo '</div>';
+
+
+ echo '</div>';
+ }
+
+
+ // Zgeneriramo pdf analizo
+ private function prepareData(){
+ global $site_path;
+ global $lang;
+ global $admin_type;
+
+ // Zgeneriramo zacasne csv datoteke
+ $this->prepareDataCSV();
+ $this->prepareQuestionCSV();
+ $this->prepareItemCSV();
+
+ // Poklicemo R skripto in zgeneriramo pdf
+ $script = $site_path . SCRIPT_FOLDER . '/kakovost.R';
+ $out = exec('Rscript '.$script.' '.$this->anketa.' 2>&1', $output, $return_var);
+
+ // Testiranje - izpis errorjev
+ if($admin_type == 0){
+ echo '<div style="display:none;">';
+ echo 'Rscript '.$script;
+ //echo '<br />'.$out.'<br />';
+ var_dump($output);
+ echo '</div>';
+ }
+ }
+
+ // Napolnimo podatke v array
+ private function fillData(){
+ global $site_path;
+ global $lang;
+
+ $result_folder = $site_path . RESULTS_FOLDER.'/';
+
+ if (($handle = fopen($result_folder."usability_".$this->anketa.".csv", "r")) !== FALSE) {
+
+ // Loop po vrsticah
+ $cnt = 0;
+ while (($row = fgetcsv($handle, 1000, ';')) !== FALSE) {
+
+ if($cnt == 0)
+ $row = fgetcsv($handle, 1000, ';');
+
+ // Preberemo se drugo vrstico, ker so v parih
+ $row2 = fgetcsv($handle, 1000, ';');
+
+
+ // Obarvamo vrstico glede na status (belo, rumeno, rdece)
+ if($row2[7] < (int)$this->bottom_usable_limit){
+ $css_usable = 'unusable';
+ $status = 0;
+ $this->usability['unusable']++;
+ }
+ elseif($row2[7] >= (int)$this->bottom_usable_limit && $row2[7] < (int)$this->top_usable_limit){
+ $css_usable = 'partusable';
+ $status = 1;
+ $this->usability['partusable']++;
+ }
+ else{
+ $css_usable = 'usable';
+ $status = 2;
+ $this->usability['usable']++;
+ }
+ $this->usability['all']++;
+
+
+ // Nastavimo izracunane podatke za respondenta
+ $this->usability['data'][$cnt]['recnum'] = $row[0];
+ //$this->usability['data'][$cnt]['usr_id'] = $row['usr_id'];
+ $this->usability['data'][$cnt]['css'] = $css_usable;
+ $this->usability['data'][$cnt]['status'] = $status;
+
+ $this->usability['data'][$cnt]['all'] = $row[1];
+
+ $this->usability['data'][$cnt]['valid'] = $row[2];
+ $this->usability['data'][$cnt]['nonsubstantive'] = $row[3];
+ $this->usability['data'][$cnt]['nonresponse'] = $row[4];
+
+ $this->usability['data'][$cnt]['validPercent'] = $row2[2];
+ $this->usability['data'][$cnt]['nonsubstantivePercent'] = $row2[3];
+ $this->usability['data'][$cnt]['nonresponsePercent'] = $row2[4];
+
+ $this->usability['data'][$cnt]['breakoff'] = $row[6];
+ $this->usability['data'][$cnt]['breakoffPercent'] = $row2[6];
+
+ $this->usability['data'][$cnt]['usable'] = $row[7];
+ $this->usability['data'][$cnt]['usablePercent'] = $row2[7];
+
+ $this->usability['data'][$cnt]['UNL'] = $row2[17];
+ $this->usability['data'][$cnt]['UML'] = $row2[18];
+ $this->usability['data'][$cnt]['UCL'] = $row2[19];
+ $this->usability['data'][$cnt]['UIL'] = $row2[20];
+ $this->usability['data'][$cnt]['UAQ'] = $row2[21];
+
+ $this->usability['data'][$cnt]['-1'] = $row[9];
+ $this->usability['data'][$cnt]['-1_percent'] = $row2[9];
+ $this->usability['data'][$cnt]['-2'] = $row[10];
+ $this->usability['data'][$cnt]['-2_percent'] = $row2[10];
+ $this->usability['data'][$cnt]['-3'] = $row[11];
+ $this->usability['data'][$cnt]['-3_percent'] = $row2[11];
+ $this->usability['data'][$cnt]['-4'] = $row[12];
+ $this->usability['data'][$cnt]['-4_percent'] = $row2[12];
+ $this->usability['data'][$cnt]['-5'] = $row[13];
+ $this->usability['data'][$cnt]['-5_percent'] = $row2[13];
+ $this->usability['data'][$cnt]['-97'] = $row[14];
+ $this->usability['data'][$cnt]['-97_percent'] = $row2[14];
+ $this->usability['data'][$cnt]['-98'] = $row[15];
+ $this->usability['data'][$cnt]['-98_percent'] = $row2[15];
+ $this->usability['data'][$cnt]['-99'] = $row[16];
+ $this->usability['data'][$cnt]['-99_percent'] = $row2[16];
+
+ $cnt++;
+ }
+ }
+
+ // Sortiramo podatke
+ foreach ($this->usability['data'] as $key => $row) {
+ $mid[$key] = $row[$this->sortField];
+ }
+ if($this->sortType == 0)
+ array_multisort($mid, SORT_ASC, $this->usability['data']);
+ else
+ array_multisort($mid, SORT_DESC, $this->usability['data']);
+
+
+ # ali odstranimo stolpce kateri imajo same 0
+ /*if ($this->show_with_zero == false) {
+ # odstranimo missinge brez vrednosti
+ foreach ($this->_missings AS $_key => $_missing) {
+ if (!isset($this->cols_with_value[$_key]) || $this->cols_with_value[$_key] == false) {
+ unset($this->_missings[$_key]);
+ }
+ }
+ # odstranimo neveljavne brez vrednosti
+ foreach ($this->_unsets AS $_key => $_unset) {
+ if (!isset($this->cols_with_value[$_key]) || $this->cols_with_value[$_key] == false) {
+ unset($this->_unsets[$_key]);
+ }
+ }
+ }*/
+ }
+
+
+ // Pripravi csv s podatki
+ private function prepareDataCSV(){
+ global $site_path;
+ global $lang;
+ global $admin_type;
+
+ $temp_folder = $site_path . TEMP_FOLDER.'/';
+
+ $SDF = SurveyDataFile::get_instance();
+ $SDF->init($this->anketa);
+ $_headFileName = $SDF->getHeaderFileName();
+ $_dataFileName = $SDF->getDataFileName();
+ $_fileStatus = $SDF->getStatus();
+
+ if ($_headFileName != null && $_headFileName != '') {
+ $_HEADERS = unserialize(file_get_contents($_headFileName));
+ }
+ else {
+ echo 'Error! Empty file name!';
+ }
+
+ // Zaenkrat dopuscamo samo status 6 in brez lurkerjev
+ if($admin_type == '0')
+ $status_filter = '('.STATUS_FIELD.' ~ /6|5/)&&('.LURKER_FIELD.'==0)';
+ else
+ $status_filter = '('.STATUS_FIELD.'==6)&&('.LURKER_FIELD.'==0)';
+
+ //$start_sequence = $_HEADERS['_settings']['dataSequence'];
+ $start_sequence = 2;
+ $end_sequence = $_HEADERS['_settings']['metaSequence'] + $_HEADERS['meta']['cnt_all'];
+
+ $field_delimit = ';';
+
+ // Filtriramo podatke po statusu in jih zapisemo v temp folder
+ if (IS_WINDOWS) {
+ //$command = 'awk -F"|" "BEGIN {{OFS=\",\"} {ORS=\"\n\"}} '.$status_filter.' { print $0}" '.$_dataFileName.' >> '.$temp_folder.'/temp_data_'.$this->anketa.'.dat';
+ $out = shell_exec('awk -F"|" "BEGIN {{OFS=\",\"} {ORS=\"\n\"}} '.$status_filter.'" '.$_dataFileName.' | cut -d "|" -f '.$start_sequence.'-'.$end_sequence.' >> '.$temp_folder.'/temp_data_'.$this->anketa.'.dat');
+ }
+ else {
+ //$command = 'awk -F"|" \'BEGIN {{OFS=","} {ORS="\n"}} '.$status_filter.' { print $0; }\' '.$_dataFileName.' >> '.$temp_folder.'/temp_data_'.$this->anketa.'.dat';
+ $out = shell_exec('awk -F"|" \'BEGIN {{OFS=","} {ORS="\n"}} '.$status_filter.'\' '.$_dataFileName.' | cut -d \'|\' -f '.$start_sequence.'-'.$end_sequence.' >> '.$temp_folder.'/temp_data_'.$this->anketa.'.dat');
+ }
+
+
+ // Ustvarimo koncni CSV
+ if ($fd = fopen($temp_folder.'/temp_data_'.$this->anketa.'.dat', "r")) {
+
+ $fd2 = fopen($temp_folder.'/data_'.$this->anketa.'.csv', "w");
+
+ # naredimo header row
+ foreach ($_HEADERS AS $spid => $spremenljivka) {
+ if (isset($spremenljivka['grids']) && count($spremenljivka['grids']) > 0) {
+ foreach ($spremenljivka['grids'] AS $gid => $grid) {
+ foreach ($grid['variables'] AS $vid => $variable ){
+ if (!($variable['variable'] == 'uid' && $variable['naslov'] == 'User ID')){
+ $output1 .= strip_tags($variable['variable']).$field_delimit;
+ //$output2 .= '"'.strip_tags($variable['naslov']).'"'.$field_delimit;
+ }
+ }
+ }
+ }
+ }
+
+ // Pobrisemo zadnji ; ce obstaja
+ $output1 = rtrim($output1, ";");
+
+ // Zapisemo header row
+ fwrite($fd2, $output1."\r\n");
+ //fwrite($fd2, $output2."\r\n");
+
+
+ while ($line = fgets($fd)) {
+
+ //fwrite($fd2, '="');
+ //$line = str_replace(array("\r","\n","|"), array("","",'";="'), $line);
+ $line = '"' . str_replace(array("\r","\n","\"","|"), array("","","",'";"'), $line) . '"';
+
+ // Spremenimo encoding v windows-1250
+ $line = iconv("UTF-8","Windows-1250//TRANSLIT", $line);
+ //$line = str_replace(array("č","š","ž","Č","Š","Ž"), array("\v{c}","\v{s}","\v{z}","\v{C}","\v{S}","\v{Z}"), $line);
+
+ fwrite($fd2, $line);
+ //fwrite($fd2, '"');
+ fwrite($fd2, "\r\n");
+ }
+
+ fclose($fd2);
+ }
+ fclose($fd);
+
+
+ // Na koncu pobrisemo temp datoteke
+ if (file_exists($temp_folder.'/temp_data_'.$this->anketa.'.dat')) {
+ unlink($temp_folder.'/temp_data_'.$this->anketa.'.dat');
+ }
+ }
+
+ // Pripravi csv z vprasanji
+ private function prepareQuestionCSV(){
+ global $site_path;
+ global $lang;
+ global $admin_type;
+
+ define('delimiter', ';');
+
+ $temp_folder = $site_path . TEMP_FOLDER.'/';
+
+ $fd = fopen($temp_folder.'/questions_'.$this->anketa.'.csv', "w");
+
+
+ // Prva vrstica
+ $output = 'ID SURVEY'.delimiter;
+ $output .= 'ID QUESTION'.delimiter;
+ $output .= 'ID PAGE'.delimiter;
+ $output .= 'QUESTION NUMBER'.delimiter;
+
+ $output .= 'variable'.delimiter;
+ $output .= 'tip'.delimiter;
+ $output .= 'vrstni_red'.delimiter;
+ $output .= 'size'.delimiter;
+ $output .= 'visible'.delimiter;
+ $output .= 'params'.delimiter;
+
+ $output .= 'char_count'.delimiter;
+
+ fwrite($fd, $output."\r\n");
+
+
+ // Vrstice s podatki
+ $sql = sisplet_query("SELECT s.id, s.gru_id, s.variable, s.tip, s.vrstni_red, s.size, s.visible, s.params, s.naslov
+ FROM srv_spremenljivka s, srv_grupa g
+ WHERE s.gru_id=g.id AND g.ank_id='".$this->anketa."'
+ ORDER BY g.vrstni_red, s.vrstni_red");
+ if (!$sql) echo mysqli_error($GLOBALS['connect_db']);
+ if (mysqli_num_rows($sql) > 0) {
+
+ $i = 0;
+
+ while ($row = mysqli_fetch_array($sql)) {
+
+ $i++;
+
+ $line = '';
+
+ $line .= $this->anketa.delimiter;
+ $line .= $row['id'].delimiter;
+ $line .= $row['gru_id'].delimiter;
+ $line .= $i.delimiter;
+
+ $line .= $row['variable'].delimiter;
+ $line .= $row['tip'].delimiter;
+ $line .= $row['vrstni_red'].delimiter;
+ $line .= $row['size'].delimiter;
+ $line .= $row['visible'].delimiter;
+
+ $line .= str_replace("\n", '', str_replace(delimiter, '', $row['params']) ).delimiter;
+
+ $naslov_clean = iconv("UTF-8","Windows-1250//TRANSLIT", $row['naslov']);
+ $naslov_clean = trim(strip_tags($naslov_clean));
+ $line .= strlen($naslov_clean).delimiter;
+
+ fwrite($fd, $line."\r\n");
+ }
+ }
+
+
+ fclose($fd);
+ }
+
+ // Pripravi csv z itemi
+ private function prepareItemCSV(){
+ global $site_path;
+ global $lang;
+ global $admin_type;
+
+ define('delimiter', ';');
+
+ $temp_folder = $site_path . TEMP_FOLDER.'/';
+
+ $fd = fopen($temp_folder.'/items_'.$this->anketa.'.csv', "w");
+
+
+ // Prva vrstica
+ $output = '';
+ $output .= 'ID SURVEY'.delimiter;
+ $output .= 'ID QUESTION'.delimiter;
+ $output .= 'ID ITEM'.delimiter;
+
+ $output .= 'variable'.delimiter;
+ $output .= 'variable_custom'.delimiter;
+ $output .= 'vrstni_red'.delimiter;
+
+ $output .= 'char_count'.delimiter;
+
+ fwrite($fd, $output."\r\n");
+
+ // Vrstice s podatki
+ $sql = sisplet_query("SELECT v.id, v.spr_id, v.variable, v.variable_custom, v.vrstni_red, v.naslov
+ FROM srv_vrednost v, srv_spremenljivka s, srv_grupa g
+ WHERE v.spr_id=s.id AND s.gru_id=g.id AND g.ank_id='".$this->anketa."'
+ ORDER BY g.vrstni_red, s.vrstni_red");
+ if (!$sql) echo mysqli_error($GLOBALS['connect_db']);
+ if (mysqli_num_rows($sql) > 0) {
+
+ while ($row = mysqli_fetch_array($sql)) {
+
+ $line = '';
+
+ $line .= $this->anketa.delimiter;
+ $line .= $row['spr_id'].delimiter;
+ $line .= $row['id'].delimiter;
+
+ $line .= str_replace("\n", '', str_replace(delimiter, '', $row['variable']) ).delimiter;
+ $line .= $row['variable_custom'].delimiter;
+ $line .= $row['vrstni_red'].delimiter;
+
+ $naslov_clean = iconv("UTF-8","Windows-1250//TRANSLIT", $row['naslov']);
+ $naslov_clean = trim(strip_tags($naslov_clean));
+ $line .= strlen($naslov_clean).delimiter;
+
+ fwrite($fd, $line."\r\n");
+ }
+ }
+
+
+ fclose($fd);
+ }
+
+
+ // Pobrisemo zacasne datoteke
+ private function deleteTemp(){
+ global $site_path;
+
+ $temp_folder = $site_path . TEMP_FOLDER.'/';
+ $result_folder = $site_path . RESULTS_FOLDER.'/';
+
+ // Pobrisemo zacasno CSV datoteko s podatki
+ if (file_exists($temp_folder.'/data_'.$this->anketa.'.csv')) {
+ unlink($temp_folder.'/data_'.$this->anketa.'.csv');
+ }
+
+ // Pobrisemo zacasno CSV datoteko z vprasanji
+ if (file_exists($temp_folder.'/questions_'.$this->anketa.'.csv')) {
+ unlink($temp_folder.'/questions_'.$this->anketa.'.csv');
+ }
+
+ // Pobrisemo zacasno CSV datoteko z itemi
+ if (file_exists($temp_folder.'/items_'.$this->anketa.'.csv')) {
+ unlink($temp_folder.'/items_'.$this->anketa.'.csv');
+ }
+
+ // Pobrisemo CSV datoteko z rezultati
+ if (file_exists($result_folder.'/usability_'.$this->anketa.'.csv')) {
+ unlink($result_folder.'/usability_'.$this->anketa.'.csv');
+ }
+ }
+
+
+ private function parentIf($anketa, $element) {
+ $sql = sisplet_query("SELECT tip FROM srv_if WHERE id = '$element'");
+ $row = mysqli_fetch_array($sql);
+
+ if ($row['tip'] == 0) return $element;
+
+ $sql1 = sisplet_query("SELECT parent FROM srv_branching WHERE ank_id='$anketa' AND element_if = '$element'");
+ $row1 = mysqli_fetch_array($sql1);
+
+ return parentIf($anketa, $row1['parent']);
+ }
+
+
+ /** Funkcija ki nastavi vse filtre
+ *
+ */
+ private function setUpFilter(){
+ /*if ($this->dataFileStatus == FILE_STATUS_NO_DATA
+ || $this->dataFileStatus == FILE_STATUS_NO_FILE
+ || $this->dataFileStatus == FILE_STATUS_SRV_DELETED)
+ {
+ return false;
+ }*/
+
+ # poiščemo kater profil uporablja uporabnik
+ $_currentMissingProfile = SurveyUserSetting :: getInstance()->getSettings('default_missing_profile');
+ $this->currentMissingProfile = (isset($_currentMissingProfile) ? $_currentMissingProfile : 1);
+
+ # filtriranje po statusih
+ $this->_CURRENT_STATUS_FILTER = SurveyStatusProfiles :: getStatusAsAWKString();
+
+ # filtriranje po časih
+ $_time_profile_awk = SurveyTimeProfiles :: getFilterForAWK($this->_HEADERS['unx_ins_date']['grids']['0']['variables']['0']['sequence']);
+
+ # dodamo še ife
+
+ SurveyConditionProfiles :: setHeader($this->_HEADERS);
+ $_condition_profile_AWK = SurveyConditionProfiles:: getAwkConditionString();
+
+ if (($_condition_profile_AWK != "" && $_condition_profile_AWK != null )
+ || ($_time_profile_awk != "" && $_time_profile_awk != null))
+ {
+ $this->_CURRENT_STATUS_FILTER = '('.$this->_CURRENT_STATUS_FILTER;
+ if ($_condition_profile_AWK != "" && $_condition_profile_AWK != null )
+ {
+ $this->_CURRENT_STATUS_FILTER .= ' && '.$_condition_profile_AWK;
+ }
+ if ($_time_profile_awk != "" && $_time_profile_awk != null)
+ {
+ $this->_CURRENT_STATUS_FILTER .= ' && '.$_time_profile_awk;
+ }
+ $this->_CURRENT_STATUS_FILTER .= ')';
+ }
+ $status_filter = $this->_CURRENT_STATUS_FILTER;
+
+ if ($this->dataFileStatus == FILE_STATUS_OK || $this->dataFileStatus == FILE_STATUS_OLD)
+ {
+ if (isset($this->_HEADERS['testdata']))
+ {
+ $this->_HAS_TEST_DATA = true;
+ }
+ }
+
+ $smv = new SurveyMissingValues($this->anketa);
+ $smv -> Init();
+
+ $smv_array = $smv->GetSurveyMissingValues($this->anketa);
+ if (!empty($smv_array[1])){
+ foreach ($smv_array[1] AS $_survey_missings)
+ {
+ $this->_missings[$_survey_missings['value']] = $_survey_missings['text'];
+
+ }
+ }
+ if (!empty($smv_array[2])){
+ foreach ($smv_array[2] AS $_survey_unsets)
+ {
+ $this->_unsets[$_survey_unsets['value']] = $_survey_unsets['text'];
+ }
+ }
+ }
+
+ private function setUserFilters(){
+ # Nastavimo filtre variabel
+ $dvp = SurveyUserSetting :: getInstance()->getSettings('default_variable_profile');
+ $_currentVariableProfile = SurveyVariablesProfiles :: checkDefaultProfile($dvp);
+ if ($dvp != $_currentVariableProfile) {
+ SurveyUserSetting :: getInstance()->saveSettings('default_variable_profile', $_currentVariableProfile);
+ }
+ $this->_PROFILE_ID_VARIABLE = $_currentVariableProfile;
+
+ # ali prikazujemo tudi stolpce z 0 vrednostmi
+ if (isset($this->sessionData['usable_resp']['show_with_zero'])) {
+ $this->show_with_zero = $this->sessionData['usable_resp']['show_with_zero'];
+ }
+
+ # ali prikazujemo tudi stolpce z 0 vrednostmi
+ if (isset($this->sessionData['usable_resp']['show_details'])) {
+ $this->show_details = $this->sessionData['usable_resp']['show_details'];
+ }
+
+ # ali prikazujemo tudi stolpce z izracuni
+ if (isset($this->sessionData['usable_resp']['show_calculations'])) {
+ $this->show_calculations = $this->sessionData['usable_resp']['show_calculations'];
+ }
+
+ # ali prikazujemo vrstice "Drugo"
+ $this->show_with_other = true;
+ if (isset($this->sessionData['usable_resp']['show_with_other'])) {
+ $this->show_with_other = $this->sessionData['usable_resp']['show_with_other'];
+ }
+
+ # ali prikazujemo vrstice tipa "besedilo"
+ $this->show_with_text = true;
+ if (isset($this->sessionData['usable_resp']['show_with_text'])) {
+ $this->show_with_text = $this->sessionData['usable_resp']['show_with_text'];
+ }
+
+ # Spodnja in zgornja meja za usable
+ if (isset($this->sessionData['usable_resp']['bottom_usable_limit'])) {
+ $this->bottom_usable_limit = $this->sessionData['usable_resp']['bottom_usable_limit'];
+ }
+ # ali prikazujemo tudi stolpce z 0 vrednostmi
+ if (isset($this->sessionData['usable_resp']['top_usable_limit'])) {
+ $this->top_usable_limit = $this->sessionData['usable_resp']['top_usable_limit'];
+ }
+ }
+
+ // Ali imamo zgenerirano datoteko ali ne
+ private function hasDataFile(){
+ if ($this->dataFileStatus == FILE_STATUS_NO_DATA || $this->dataFileStatus == FILE_STATUS_NO_FILE
+ || $this->dataFileStatus == FILE_STATUS_SRV_DELETED)
+ return false;
+ else
+ return true;
+ }
+
+ private function setStatusFilter($status=''){
+
+ $this->_CURRENT_STATUS_FILTER = $status;
+ }
+
+
+
+} \ No newline at end of file
diff --git a/admin/survey/modules/mod_panel/class.SurveyPanel.php b/admin/survey/modules/mod_panel/class.SurveyPanel.php
new file mode 100644
index 0000000..30113ad
--- /dev/null
+++ b/admin/survey/modules/mod_panel/class.SurveyPanel.php
@@ -0,0 +1,168 @@
+<?php
+/**
+ *
+ * Modul za povezovanje panela (npr. Valicon, GFK...) z 1ka anketo
+ *
+ */
+
+class SurveyPanel{
+
+ var $anketa; # id ankete
+ var $db_table = '';
+
+
+ function __construct($anketa){
+ global $site_url;
+
+ // Ce imamo anketo, smo v status->ul evealvacija
+ if ((int)$anketa > 0){
+ $this->anketa = $anketa;
+
+ # polovimo vrsto tabel (aktivne / neaktivne)
+ SurveyInfo :: getInstance()->SurveyInit($this->anketa);
+ if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) {
+ $this->db_table = '_active';
+ }
+ }
+ }
+
+
+ // Prikazemo nastavitve pri vklopu naprednega modula
+ public function displaySettings(){
+ global $lang;
+
+ echo '<fieldset><legend>'.$lang['settings'].'</legend>';
+
+ $rowA = SurveyInfo::getInstance()->getSurveyRow();
+ $row = $this->getPanelSettings();
+
+ // Url za preusmeritev
+ echo '<span class="nastavitveSpan1" >'.$lang['srv_panel_url'].':</span>';
+ echo '<input type="text" size="40" name="url" id="url" value="'.$rowA['url'].'" />';
+
+ echo '<br /><br />';
+
+ // Ime parametra za id respondenta
+ echo '<span class="nastavitveSpan1" >'.$lang['srv_panel_user_id_name'].':</span>';
+ echo '<input type="text" name="user_id_name" id="user_id_name" value="'.$row['user_id_name'].'" />';
+
+ echo '<br /><br />';
+
+ // Ime parametra za status
+ echo '<span class="nastavitveSpan1" >'.$lang['srv_panel_status_name'].':</span>';
+ echo '<input type="text" name="status_name" id="status_name" value="'.$row['status_name'].'" />';
+
+ echo '<br />';
+
+ // Privzeta vrednost status parametra
+ echo '<span class="nastavitveSpan1" >'.$lang['srv_panel_status_default'].':</span>';
+ echo '<input type="text" name="status_default" id="status_default" value="'.$row['status_default'].'" />';
+
+ echo '<br /><br />';
+
+ // Primer zacetnega url-ja
+ $link = SurveyInfo::getSurveyLink();
+ echo '<span class="nastavitveSpan1" >'.$lang['srv_panel_url1_example'].':</span>';
+ echo $link.'?'.$row['user_id_name'].'=RESPONDENT_PANEL_ID';
+
+ echo '<br /><br />';
+
+ // Primer končnega url-ja
+ echo '<span class="nastavitveSpan1" >'.$lang['srv_panel_url2_example'].':</span>';
+ echo $rowA['url'].'?'.$row['user_id_name'].'=RESPONDENT_PANEL_ID&'.$row['status_name'].'=PANEL_STATUS';
+
+
+ echo '</fieldset>';
+
+
+ // Gumb shrani
+ echo '<br class="clr" />';
+ echo '<span class="floatLeft spaceRight"><div class="buttonwrapper"><a class="ovalbutton ovalbutton_orange btn_savesettings" href="#" onclick="panel_save_settings(); return false;"><span>';
+ echo $lang['edit1337'] . '</span></a></div></span>';
+ echo '<div class="clr"></div>';
+ echo '<div id="success_save"></div>';
+ }
+
+ // Izvedemo vse potrebno, ko modul aktiviramo (nastavimo parametre za zakljucek, ustvarimo sistemske spremenljivke...)
+ public function activatePanel(){
+ global $lang;
+
+ // Vstavimo vrstico z nastavitvami
+ $sql1 = sisplet_query("INSERT INTO srv_panel_settings (ank_id) VALUES ('".$this->anketa."')");
+
+ // Uredimo nastavitve zakljucka
+ $sql2 = sisplet_query("UPDATE srv_anketa SET concl_link='1' WHERE id='".$this->anketa."'");
+ if (!$sql2) echo mysqli_error($GLOBALS['connect_db']);
+
+ // Ustvarimo sistemsko skrito vprasanje za panel id respondenta
+ SurveyRespondents:: getInstance()->Init($this->anketa);
+ SurveyRespondents:: checkSystemVariables($variable=array('SID'), $setUserbase=false);
+ }
+
+
+ // Vrnemo nastavitve panela
+ public function getPanelSettings($what = ''){
+
+ if($what != ''){
+ $sql = sisplet_query("SELECT ".$what." FROM srv_panel_settings WHERE ank_id='".$this->anketa."'");
+ $row = mysqli_fetch_array($sql);
+
+ return $row[$what];
+ }
+ else{
+ $sql = sisplet_query("SELECT * FROM srv_panel_settings WHERE ank_id='".$this->anketa."'");
+ $row = mysqli_fetch_array($sql);
+
+ return $row;
+ }
+ }
+
+ // Vrnemo nastavitev statusa na if-u
+ public function getPanelIf($if_id){
+
+ $sql = sisplet_query("SELECT value FROM srv_panel_if WHERE ank_id='".$this->anketa."' AND if_id='".$if_id."'");
+
+ if(mysqli_num_rows($sql) > 0){
+ $row = mysqli_fetch_array($sql);
+
+ return $row['value'];
+ }
+ else{
+ return '';
+ }
+ }
+
+
+ public function ajax() {
+
+ if(isset($_GET['a']) && $_GET['a'] == 'save_settings'){
+
+ // Dobimo staro ime parametra za user id
+ $user_id_name_old = $this->getPanelSettings($what='user_id_name');
+
+ $user_id_name = isset($_POST['user_id_name']) ? $_POST['user_id_name'] : 'SID';
+ if($user_id_name == '')
+ $user_id_name = $user_id_name_old;
+
+ $status_name = isset($_POST['status_name']) ? $_POST['status_name'] : 'status';
+ $status_default = isset($_POST['status_default']) ? $_POST['status_default'] : '0';
+ $url = isset($_POST['url']) ? $_POST['url'] : '';
+
+ $sql = sisplet_query("UPDATE srv_panel_settings SET user_id_name='".$user_id_name."', status_name='".$status_name."', status_default='".$status_default."' WHERE ank_id='".$this->anketa."'");
+ if (!$sql) echo mysqli_error($GLOBALS['connect_db']);
+
+ if($url != ''){
+ $sql2 = sisplet_query("UPDATE srv_anketa SET url='".$url."' WHERE id='".$this->anketa."'");
+ if (!$sql2) echo mysqli_error($GLOBALS['connect_db']);
+ }
+
+ // Popravimo ime sistemskega vprasanja
+ $sqlS = sisplet_query("UPDATE srv_spremenljivka s, srv_grupa g
+ SET s.variable='".$user_id_name."'
+ WHERE s.variable='".$user_id_name_old."' AND s.gru_id=g.id AND g.ank_id='".$this->anketa."'");
+
+ $this->displaySettings();
+ }
+
+ }
+} \ No newline at end of file
diff --git a/admin/survey/modules/mod_quiz/class.SurveyQuiz.php b/admin/survey/modules/mod_quiz/class.SurveyQuiz.php
new file mode 100644
index 0000000..bb28d76
--- /dev/null
+++ b/admin/survey/modules/mod_quiz/class.SurveyQuiz.php
@@ -0,0 +1,106 @@
+<?php
+
+/*
+ * Modul za kviz
+ *
+ *
+ */
+
+
+class SurveyQuiz{
+
+ var $anketa; # id ankete
+
+
+ function __construct($anketa){
+ global $site_url;
+
+ // Ce imamo anketo
+ if ((int)$anketa > 0){
+ $this->anketa = $anketa;
+ }
+ }
+
+
+ // Nastavitve kviza (prikaz rezultatov, grafa...)
+ public function displaySettings(){
+ global $lang;
+
+
+ // Posebne opcije in navodile za anketo kviz
+ /*echo '<fieldset><legend>'.$lang['srv_kviz_navodila_1'].'</legend>';
+ echo '<p>'.$lang['srv_kviz_navodila_2'].'</p>';
+ echo '<p>'.$lang['srv_kviz_navodila_3'].'</p>';
+ echo '<p>'.$lang['srv_kviz_navodila_4'].'</p>';
+ echo '<p>'.$lang['srv_kviz_navodila_6'].' '.Help::display('DataPiping').'</p>';
+ echo '<p>'.$lang['srv_kviz_navodila_7'].'</p>';
+ echo '</fieldset>';*/
+
+
+ echo '<fieldset><legend>'.$lang['settings'].'</legend>';
+
+ // Pridobimo trenutne nastavitve
+ $settings = $this->getSettings();
+
+ // Prikaz rezultatov v zakljucku
+ echo '<span class="nastavitveSpan1" >'.$lang['srv_quiz_results'].':</span>';
+ echo '<label for="quiz_results_0"><input type="radio" name="quiz_results" id="quiz_results_0" value="0" '.(($settings['results'] == 0) ? ' checked="checked" ' : '').' />'.$lang['no1'].'</label>';
+ echo '<label for="quiz_results_1"><input type="radio" name="quiz_results" id="quiz_results_1" value="1" '.(($settings['results'] == 1) ? ' checked="checked" ' : '').' />'.$lang['yes'].'</label>';
+
+ echo '<br />';
+
+ // Prikaz grafa rezultatov v zakljucku
+ echo '<span class="nastavitveSpan1" >'.$lang['srv_quiz_results_chart'].':</span>';
+ echo '<label for="quiz_results_chart_0"><input type="radio" name="quiz_results_chart" id="quiz_results_chart_0" value="0" '.(($settings['results_chart'] == 0) ? ' checked="checked" ' : '').' />'.$lang['no1'].'</label>';
+ echo '<label for="quiz_results_chart_1"><input type="radio" name="quiz_results_chart" id="quiz_results_chart_1" value="1" '.(($settings['results_chart'] == 1) ? ' checked="checked" ' : '').' />'.$lang['yes'].'</label>';
+
+ echo '<br /><br />';
+
+ echo '</fieldset>';
+
+
+ // Gumb shrani
+ echo '<br class="clr" />';
+ echo '<span class="floatLeft spaceRight"><div class="buttonwrapper"><a class="ovalbutton ovalbutton_orange btn_savesettings" href="#" onclick="quiz_save_settings(); return false;"><span>';
+ echo $lang['edit1337'] . '</span></a></div></span>';
+ echo '<div class="clr"></div>';
+ echo '<div id="success_save"></div>';
+ }
+
+
+ // Pridobimo trenutne nastavitve kviza za anketo
+ public function getSettings(){
+
+ $settings = array();
+
+ // Default vrednosti
+ $settings['results'] = '1';
+ $settings['results_chart'] = '0';
+
+ $sql = sisplet_query("SELECT * FROM srv_quiz_settings WHERE ank_id='".$this->anketa."'");
+ if(mysqli_num_rows($sql) > 0){
+ $row = mysqli_fetch_array($sql);
+
+ $settings['results'] = $row['results'];
+ $settings['results_chart'] = $row['results_chart'];
+ }
+
+ return $settings;
+ }
+
+
+ public function ajax() {
+
+ if(isset($_GET['a']) && $_GET['a'] == 'save_settings'){
+
+ $results = isset($_POST['results']) ? $_POST['results'] : '';
+ $results_chart = isset($_POST['results_chart']) ? $_POST['results_chart'] : '0';
+
+ $sql = sisplet_query("INSERT INTO srv_quiz_settings
+ (ank_id, results, results_chart) VALUES ('".$this->anketa."', '".$results."', '".$results_chart."')
+ ON DUPLICATE KEY UPDATE results='".$results."', results_chart='".$results_chart."'");
+ if (!$sql) echo mysqli_error($GLOBALS['connect_db']);
+ }
+
+ }
+} \ No newline at end of file
diff --git a/admin/survey/modules/mod_slideshow/class.SurveySlideshow.php b/admin/survey/modules/mod_slideshow/class.SurveySlideshow.php
new file mode 100644
index 0000000..1718475
--- /dev/null
+++ b/admin/survey/modules/mod_slideshow/class.SurveySlideshow.php
@@ -0,0 +1,248 @@
+<?php
+
+class SurveySlideshow {
+
+ private $sid = null;
+ private $settings = array();
+
+ public function __construct($anketa = null) {
+ if ($anketa == null) {
+ die("class.SurveySlideshow -> anketa ID missing!");
+ }
+
+ $this->sid = $anketa;
+ SurveyInfo::getInstance()->SurveyInit($anketa);
+ $this->reloadSettings();
+
+ }
+
+ public function ajax() {
+ if ($this->sid != null) {
+ switch ($_GET['a']) {
+ case 'reset_interval' :
+ $this->ResetSlideshowInterval();
+ $this->ShowSlideshowSetings();
+ break;
+ case 'save_settings' :
+ $this->SaveSlideshowSettings();
+ break;
+ default:
+ print_r("<pre>");
+ print_r($_POST);
+ print_r($_GET);
+ break;
+ }
+
+ } else {
+ die("Class Slideshow not inited!");
+ }
+ }
+
+ /** prebere nastavitve iz baze
+ *
+ */
+ public function reloadSettings() {
+ $slide_settings_qry = sisplet_query("SELECT * FROM srv_slideshow_settings WHERE ank_id='$this->sid'");
+ $slide_settings = mysqli_fetch_assoc($slide_settings_qry);
+ $this->settings = $slide_settings;
+
+ }
+
+ /** vrne vse nastavitve ali posamezno vrednost nastavitev za slideshow
+ *
+ */
+ public function getSettings($what = null) {
+ if (!is_countable($this->settings) || !count($this->settings) > 0) {
+ $this->reloadSettings();
+ }
+
+ if ($what == null) {
+ return $this->settings;
+ } else {
+ return $this->settings[$what];
+ }
+ }
+
+ /**
+ * posebne opcije in navodile za anketo slideshow
+ */
+ public function ShowSlideshowSetings () {
+ global $lang;
+
+ $row = SurveyInfo::getInstance()->getSurveyRow();
+
+ $slide_settings_qry = sisplet_query("SELECT * FROM srv_slideshow_settings WHERE ank_id='$this->sid'");
+ $slide_settings = mysqli_fetch_assoc($slide_settings_qry);
+
+ echo '<fieldset><legend>'.$lang['settings'].'</legend>';
+
+ #set timer interval
+ echo '<div class="slide_sett_option">';
+ echo '<span class="slide_sett_option_lbl" ><label for="timer" >' . $lang['srv_slideshow_set_timer'] . '&nbsp;</label></span>';
+ echo '<label for="slide_fixed_interval" >' . $lang['srv_slideshow_set_fixed'] . '&nbsp;</label>';
+ echo '<input type="checkbox" id="slide_fixed_interval" name="slide_fixed_interval" value="1"' . ($slide_settings['fixed_interval'] == 1 ? ' checked' : '') . '>&nbsp;';
+ echo '<select name="slideshow_timer" id="slideshow_timer">';
+ # od 1-15 mamo za vsako sekundo
+ for ($t = 1; $t < 15; $t += 1) {
+ echo '<option value="' . $t . '"' . (($t == $slide_settings['timer']) ? ' selected' : '') . '>';
+ echo '' . (substr(bcdiv($t, 60), 0, 4)) . '' . $lang['srv_minutes'] . ' ';
+ echo '' . (bcmod($t, 60)) . '' . $lang['srv_seconds'] . '';
+ echo '</option>';
+ }
+ #od 15 do 600 mamo na 15s
+ for ($t = 15; $t <= 600; $t += 15) {
+ echo '<option value="' . $t . '"' . (($t == $slide_settings['timer']) ? ' selected' : '') . '>';
+ echo '' . (substr(bcdiv($t, 60), 0, 4)) . '' . $lang['srv_minutes'] . ' ';
+ echo '' . (bcmod($t, 60)) . '' . $lang['srv_seconds'] . '';
+ echo '</option>';
+ }
+ echo '</select>&nbsp;';
+ echo '<span class="as_link" id="link_slideshow_reset_interval" title="' . $lang['srv_slideshow_link_reset_interval'] . '">' . $lang['srv_slideshow_link_reset_interval'] . '</span><br/>' . NEW_LINE;
+ echo '</div>'; // slide_sett_option
+
+ #save entries
+ echo '<div class="slide_sett_option">';
+ echo '<span class="slide_sett_option_lbl" ><label for="save_entries" >' . $lang['srv_slideshow_sett_save_entries_lbl'] . '&nbsp;</label></span>';
+ echo '<input type="radio" id="slide_save_entries_0" name="slide_save_entries" value="0"' . ($slide_settings['save_entries'] == 0 ? ' checked' : '') . '>&nbsp;';
+ echo '<label for="slide_save_entries_0" >' . $lang['srv_slideshow_sett_save_entries_opt_0'] . '&nbsp;</label>';
+ echo '<input type="radio" id="slide_save_entries_1" name="slide_save_entries" value="1"' . ($slide_settings['save_entries'] == 1 ? ' checked' : '') . '>&nbsp;';
+ echo '<label for="slide_save_entries_1" >' . $lang['srv_slideshow_sett_save_entries_opt_1'] . '&nbsp;</label>';
+ echo '</div>'; // slide_sett_option
+
+ #autostart
+ echo '<div class="slide_sett_option">';
+ echo '<span class="slide_sett_option_lbl" ><label for="timer" >' . $lang['srv_slideshow_sett_autostart_lbl'] . '&nbsp;</label></span>';
+ echo '<input type="radio" id="slide_autostart_0" name="slide_autostart" value="0"' . ($slide_settings['autostart'] == 0 ? ' checked' : '') . '>&nbsp;';
+ echo '<label for="slide_autostart_0" title="' . $lang['srv_slideshow_sett_autostart_opt_0'] . '">' . $lang['srv_slideshow_sett_autostart_opt_0_short'] . '&nbsp;</label>';
+ echo '<input type="radio" id="slide_autostart_1" name="slide_autostart" value="1"' . ($slide_settings['autostart'] == 1 ? ' checked' : '') . '>&nbsp;';
+ echo '<label for="slide_autostart_1" title="' . $lang['srv_slideshow_sett_autostart_opt_1'] . '">' . $lang['srv_slideshow_sett_autostart_opt_1_short'] . '&nbsp;</label>';
+ echo '<input type="radio" id="slide_autostart_2" name="slide_autostart" value="2"' . ($slide_settings['autostart'] == 2 ? ' checked' : '') . '>&nbsp;';
+ echo '<label for="slide_autostart_2" title="' . $lang['srv_slideshow_sett_autostart_opt_2'] . '">' . $lang['srv_slideshow_sett_autostart_opt_2_short'] . '&nbsp;</label>';
+ echo '<input type="radio" id="slide_autostart_3" name="slide_autostart" value="3"' . ($slide_settings['autostart'] == 3 ? ' checked' : '') . '>&nbsp;';
+ echo '<label for="slide_autostart_3" title="' . $lang['srv_slideshow_sett_autostart_opt_3'] . '">' . $lang['srv_slideshow_sett_autostart_opt_3_short'] . '&nbsp;</label>';
+ echo '</div>'; // slide_sett_option
+
+ #next button
+ echo '<div class="slide_sett_option">';
+ echo '<span class="slide_sett_option_lbl" ><label for="next" >' . $lang['srv_slideshow_sett_next_button_lbl'] . '&nbsp;</label></span>';
+ echo '<input type="radio" id="slide_next_0" name="slide_next" value="0"' . ($slide_settings['next_btn'] == 0 ? ' checked' : '') . '>&nbsp;';
+ echo '<label for="slide_next_0" >' . $lang['srv_slideshow_sett_button_opt_0'] . '&nbsp;</label>';
+ echo '<input type="radio" id="slide_next_1" name="slide_next" value="1"' . ($slide_settings['next_btn'] == 1 ? ' checked' : '') . '>&nbsp;';
+ echo '<label for="slide_next_1" >' . $lang['srv_slideshow_sett_button_opt_1'] . '&nbsp;</label>';
+ echo '</div>'; // slide_sett_option
+
+ #back button
+ echo '<div class="slide_sett_option">';
+ echo '<span class="slide_sett_option_lbl" ><label for="back" >' . $lang['srv_slideshow_sett_back_button_lbl'] . '&nbsp;</label></span>';
+ echo '<input type="radio" id="slide_back_0" name="slide_back" value="0"' . ($slide_settings['back_btn'] == 0 ? ' checked' : '') . '>&nbsp;';
+ echo '<label for="slide_back_0" >' . $lang['srv_slideshow_sett_button_opt_0'] . '&nbsp;</label>';
+ echo '<input type="radio" id="slide_back_1" name="slide_back" value="1"' . ($slide_settings['back_btn'] == 1 ? ' checked' : '') . '>&nbsp;';
+ echo '<label for="slide_back_1" >' . $lang['srv_slideshow_sett_button_opt_1'] . '&nbsp;</label>';
+ echo '</div>'; // slide_sett_option
+
+ #pause button
+ echo '<div class="slide_sett_option">';
+ echo '<span class="slide_sett_option_lbl" ><label for="pause" >' . $lang['srv_slideshow_sett_pause_button_lbl'] . '&nbsp;</label></span>';
+ echo '<input type="radio" id="slide_pause_0" name="slide_pause" value="0"' . ($slide_settings['pause_btn'] == 0 ? ' checked' : '') . '>&nbsp;';
+ echo '<label for="slide_pause_0" >' . $lang['srv_slideshow_sett_button_opt_0'] . '&nbsp;</label>';
+ echo '<input type="radio" id="slide_pause_1" name="slide_pause" value="1"' . ($slide_settings['pause_btn'] == 1 ? ' checked' : '') . '>&nbsp;';
+ echo '<label for="slide_pause_1" >' . $lang['srv_slideshow_sett_button_opt_1'] . '&nbsp;</label>';
+ echo '</div>'; // slide_sett_option
+ echo '</fieldset>';
+
+ #saving
+ echo '<br class="clr" />';
+ echo '<span class="floatLeft spaceRight"><div class="buttonwrapper"><a class="ovalbutton ovalbutton_orange btn_savesettings" href="#" onclick="slideshow_save_settings(); return false;"><span>';
+ echo $lang['edit1337'] . '</span></a></div></span>';
+ echo '<div class="clr"></div>';
+ echo '<div id="success_save"></div>';
+
+ }
+
+ function ResetSlideshowInterval() {
+ if ((int)$_POST['timer'] > 0 && $this->sid > 0) {
+ $timer = (int)$_POST['timer'];
+ $fixed_interval = (int)$_POST['fixed_interval'];
+ # shranimo v bazo
+ $sqlInsertString = "INSERT INTO srv_slideshow_settings (ank_id, fixed_interval, timer) VALUES ('$this->sid', '$fixed_interval', '$timer' ) ON DUPLICATE KEY UPDATE fixed_interval = '$fixed_interval', timer = '$timer' ";
+ $sqlInsertQry = sisplet_query($sqlInsertString);
+
+ # ponastavimo timerje pri vprašanjih
+ #zloopamo skozi vprašanja
+ $_spr_ids = array();
+ $sql = sisplet_query("SELECT s.id FROM srv_spremenljivka s, srv_grupa g WHERE s.gru_id=g.id AND g.ank_id='$this->sid'");
+ while($row = mysqli_fetch_assoc($sql)) {
+ $_spr_ids[] = $row['id'];
+ }
+
+ if (count($_spr_ids) > 0) {
+ $update_str = "UPDATE srv_spremenljivka SET timer = '".(int)$_POST['timer']."' WHERE id IN (".implode(',',$_spr_ids).")";
+ $update_qry = sisplet_query($update_str);
+
+ # spremenimo timestamp
+ Common::updateEditStamp();
+ }
+ }
+ }
+
+ /**
+ */
+ function setSlideshowSkin() {
+ global $site_path, $site_url;
+ # ko prvič nastavimo nastavitve, nastavimo skin ankete na: slideshow, če obstaja
+ $row = SurveyInfo::getInstance()->getSurveyRow();
+
+ $slide_settings_qry = sisplet_query("SELECT * FROM srv_slideshow_settings WHERE ank_id='$this->sid'");
+ if (mysqli_num_rows($slide_settings_qry) == 0 ) {
+ $prefix = '';
+ $sql_string = null;
+
+ # skin nastavimo samo prvič, če uporabnik še ni ničesar spreminjal in če fajl fizično obstaja
+ $dir = $site_path . 'main/survey/skins/';
+ $skin_name = 'Slideshow';
+
+ if (file_exists($dir.$skin_name.'.css')) {
+ $sql_string .= $prefix." skin='$skin_name'";
+ $prefix = ',';
+ }
+
+ $sql_string .= $prefix." concl_link='1', concl_back_button='0'";
+ $prefix = ',';
+
+ $sql_string .= $prefix." progressbar='0'";
+ $prefix = ',';
+
+ $sql_string .= $prefix." url = '".SurveyInfo::getSurveyLink() ."?preview=on'";
+
+ if ($sql_string != null) {
+ $sql = sisplet_query("UPDATE srv_anketa SET".$sql_string." WHERE id='$this->sid'");
+ }
+ #vstavimo še osnovni zapis v tabelo nastavitev slideshovow
+ $slide_settings_qry = sisplet_query("INSERT INTO srv_slideshow_settings (ank_id) VALUES ('$this->sid')");
+
+ }
+ }
+
+ /** shrani nastavitve prezentacije za posamezno anketo
+ *
+ * Enter description here ...
+ */
+ private function SaveSlideshowSettings() {
+
+ $timer = (int)$_POST['timer'];
+ $fixed_interval = (int)$_POST['fixed_interval'];
+ $save_entries = (int)$_POST['save_entries'];
+ $autostart = (int)$_POST['autostart'];
+ $next_btn = (int)$_POST['next_btn'];
+ $back_btn = (int)$_POST['back_btn'];
+ $pause_btn = (int)$_POST['pause_btn'];
+
+ # shranimo v bazo
+ $sqlInsertString = "INSERT INTO srv_slideshow_settings".
+ " (ank_id, fixed_interval, timer, save_entries, autostart, next_btn, back_btn, pause_btn)".
+ " VALUES ('$this->sid', '$fixed_interval', '$timer', '$save_entries', '$autostart', '$next_btn', '$back_btn', '$pause_btn' )".
+ " ON DUPLICATE KEY UPDATE fixed_interval = '$fixed_interval', timer = '$timer', save_entries = '$save_entries', autostart = '$autostart', next_btn = '$next_btn', back_btn = '$back_btn', pause_btn = '$pause_btn' ";
+
+ $sqlInsertQry = sisplet_query($sqlInsertString);
+ }
+} \ No newline at end of file
diff --git a/admin/survey/modules/mod_uporabnost/R/calc.usability.R b/admin/survey/modules/mod_uporabnost/R/calc.usability.R
new file mode 100644
index 0000000..4e4bb0c
--- /dev/null
+++ b/admin/survey/modules/mod_uporabnost/R/calc.usability.R
@@ -0,0 +1,72 @@
+calc.usability <- function(m.all, return.type){
+ # return.type:
+ # 1: return only absolute
+ # 2: return only %
+ # 3: return both (even rows: absolute, odd rows: %)
+
+ ## calculations
+ m.all[, Prekinitve:=v3]
+ m.all[, Neodgovori:=v1]
+ m.all[, Nevsebinski:=v96+v97+v98+v99]
+ m.all[, Izpostavljen:=allqs-(v2+v3+v4+v5)]
+ setnames(m.all, "va", "Veljavni")
+
+ m.all[, UNL:=Neodgovori/Izpostavljen]
+ m.all[is.na(UNL)==T, UNL:=0]
+ m.all[, UML:=(v3/allqs)+(1-(v3/allqs))*UNL]
+ m.all[, UCL:=1-UML]
+ m.all[, UIL:=v2/(v2+Izpostavljen)]
+ m.all[is.na(UIL)==T, UIL:=0]
+ m.all[, UAQ:=v4/allqs]
+
+ m.all[, Uporabnost:=1-UML]
+
+ #tidy up
+ setcolorder(m.all, c("recnum", "allqs", "Veljavni", "Nevsebinski", "Neodgovori",
+ "Izpostavljen", "Prekinitve", "Uporabnost",
+ "v1", "v2", "v3", "v4", "v5", "v96", "v97", "v98", "v99",
+ "UNL", "UML", "UCL", "UIL", "UAQ"))
+
+ if(return.type==1){
+ return(m.all)
+ }else{
+ m.all.p <- copy(m.all)
+
+ m.all.p[, (c("Veljavni", "Nevsebinski", "Neodgovori")) := lapply(.SD, "/", m.all.p$Izpostavljen), .SDcols=c("Veljavni", "Nevsebinski", "Neodgovori")]
+ m.all.p[, (c("Prekinitve", "v1", "v2", "v3", "v4", "v5", "v96", "v97", "v98", "v99")) := lapply(.SD, "/", m.all.p$allqs), .SDcols=c("Prekinitve", "v1", "v2", "v3", "v4", "v5", "v96", "v97", "v98", "v99")]
+ m.all.p[, Izpostavljen:=1]
+
+ if(return.type==2){
+ return(m.all.p)
+ }else{
+ m.all[, Uporabnost:=Veljavni]
+ m.all[, c("UNL", "UML", "UCL", "UIL", "UAQ"):=NA]
+ m.all <- m.all[, lapply(.SD, as.character)]
+
+ m.all.p[, allqs:=NA]
+ m.all.p[, allqs:=as.character(allqs)]
+
+ change.cols <- c("Veljavni", "Nevsebinski", "Neodgovori", "Izpostavljen", "Prekinitve", "Uporabnost",
+ "v1", "v2", "v3", "v4", "v5", "v96", "v97", "v98", "v99",
+ "UNL", "UML", "UCL", "UIL", "UAQ")
+ m.all.p[, (change.cols):=lapply(.SD, function(x){paste0(round(x*100, 0), "%")}), .SD=change.cols]
+
+ m.1ka <- data.table(matrix("", nrow=nrow(m.all)*2, ncol=ncol(m.all)))
+
+ a.rows <- as.integer(seq(1, nrow(m.1ka), by=2))
+ p.rows <- as.integer(seq(2, nrow(m.1ka), by=2))
+
+ set(m.1ka, a.rows, 1:ncol(m.1ka), value=m.all)
+ suppressWarnings(set(m.1ka, p.rows, 1:ncol(m.1ka), value=m.all.p))
+
+ setnames(m.1ka, colnames(m.all))
+ m.1ka[, Status:=NA_character_]
+ setcolorder(m.1ka, c("recnum", "allqs", "Veljavni", "Nevsebinski", "Neodgovori",
+ "Izpostavljen", "Prekinitve", "Uporabnost", "Status",
+ "v1", "v2", "v3", "v4", "v5", "v96", "v97", "v98", "v99",
+ "UNL", "UML", "UCL", "UIL", "UAQ"))
+
+ return(m.1ka)
+ }
+ }
+} \ No newline at end of file
diff --git a/admin/survey/modules/mod_uporabnost/R/gen.survey.str.R b/admin/survey/modules/mod_uporabnost/R/gen.survey.str.R
new file mode 100644
index 0000000..32e1f57
--- /dev/null
+++ b/admin/survey/modules/mod_uporabnost/R/gen.survey.str.R
@@ -0,0 +1,71 @@
+gen.survey.str <- function(colnames.dsa, questions.file, items.file){
+ #import questions file
+ questions <- fread(questions.file, skip=1, header=F,
+ select=c(2, 5, 6, 8, 9, 10),
+ col.names=c("question.id", "variable", "tip", "size", "visible", "params"))
+
+ #create variable list from survey data file
+ #remove "recnum" and "_text" fields
+ var.data <- colnames.dsa[sapply(colnames.dsa, function(x){substr(x, nchar(x)-4, nchar(x))})!="_text"]
+
+ #create variable list from questions file
+ var.questions <- questions$variable
+
+ #generate data.table from var.data list
+ survey.str <- data.table(variable = var.data)
+
+ setkey(questions, "variable")
+ setkey(survey.str, "variable")
+
+ #if all var.data in var.questions, do the simple merge and return file
+ if(all(var.data %in% var.questions)){
+ survey.str <- questions[survey.str,]
+ return(survey.str)
+ }else{ #if not, import items file and do additional merge with it...
+ #import items file
+ items <- fread(items.file, skip=1, header=F,
+ select=c(2, 3, 4),
+ col.names=c("question.id", "item.id", "variable"))
+
+ setkey(items, "question.id")
+ setkey(questions, "question.id")
+
+ #bind variables from questions and items (for the later, only take instances with no match in the questions file...)
+ survey.str.qi <- rbindlist(list(questions[var.questions %in% var.data,],
+ items[questions[!(var.questions %in% var.data), -"variable", with=F], nomatch=0L]),
+ fill=T)
+
+ #merge questions+items with survey data...
+ setkey(survey.str.qi, "variable")
+ setkey(survey.str, "variable")
+ survey.str <- survey.str.qi[survey.str,]
+
+ #if all var.data is now matched, return the survey.str
+ if(!(any(is.na(survey.str)))){
+ return(survey.str)
+ }else{ #if not, do additional merging...
+ #create index of all NA instaces from survey.str...
+ index <- apply(cbind(survey.str[, is.na(tip)],
+ (sapply(survey.str[, variable], function(x){
+ substr(x, 1, regexpr("\\_[^\\_]*$", x)-1)
+ }) %in% survey.str.qi$variable)
+ ),
+ 1, all)
+
+ #... using regex to find matches among unmatched instances from survey.str.qi
+ add <- merge(survey.str[index, list(variable, substr(variable, 1, regexpr("\\_[^\\_]*$", variable)-1))],
+ survey.str.qi[!(variable %in% survey.str$variable),],
+ by.x="V2", by.y="variable", all.y=F)[, list(question.id, item.id, tip, visible, size, params)]
+
+ #update survey.str with new values
+ survey.str[index, c("question.id", "item.id", "tip", "visible", "size", "params") := as.list(add)]
+
+ #if there is no NAs left, return survey.str, else return msg
+ if(!(any(is.na(survey.str$tip)))){
+ return(survey.str)
+ }else{
+ return(paste("No match found for: ", survey.str[is.na(tip), variable]))
+ }
+ }
+ }
+}
diff --git a/admin/survey/modules/mod_uporabnost/R/gen.usability.matrix.R b/admin/survey/modules/mod_uporabnost/R/gen.usability.matrix.R
new file mode 100644
index 0000000..a2b1465
--- /dev/null
+++ b/admin/survey/modules/mod_uporabnost/R/gen.usability.matrix.R
@@ -0,0 +1,181 @@
+gen.usability.matrix <- function(dsa, survey.str){
+ #define special values to detect
+ #order of this values is important:
+ # in case of conflicts @ chk.t types of questions the order sets the priporty of which values to keep
+ special.v <- c(-1, -3, -5, -96, -97, -98, -99, -4, -2)
+
+ #define which variables belong to checkbox-like* questions
+ #(* i.e.: check for special values @ ANY variable per question/item ID)
+ # 2: normal checkbox
+ # 16: multicheckbox
+ # 17: ranking
+ chkbox.t <- c(2, 16, 17)
+
+ ##all other variables belong to normal** questions
+ #(** i.e.: check for special values @ each variable per question/item ID)
+ #if there are no normal questions, create 0 matrix, otherwise...
+ if(nrow(survey.str[!(tip %in% chkbox.t),])==0){
+ m.n <- matrix(0, nrow = nrow(dsa), ncol=length(special.v)+1)
+ }else{
+ #create list of all normal questions
+ c.n <- colnames(dsa)[which(colnames(dsa) %in% survey.str[!(tip %in% chkbox.t), variable])]
+
+ #...count all non-special values for each variable
+ #... + count each special value for each variable
+ m.n <- cbind(rowSums(sapply(dsa[, c.n, with=FALSE], function(x){!(x %in% special.v)})),
+ sapply(special.v, function(x){as.integer(rowSums(dsa[, c.n, with=FALSE]==x, na.rm=TRUE))}))
+ }
+
+ ##procedure for tip:2
+ #only run if there is an at least one tip:2 variable
+ if(survey.str[, any(tip==2)]){
+ #get list of all unique tip:2 question ids
+ q.2 <- unique(survey.str[tip==2, question.id])
+ #get list of all corresponding variables for each q.2 id
+ c.2 <- lapply(q.2, function(x){colnames(dsa)[which(colnames(dsa) %in% survey.str[question.id==x & tip==2, variable])]})
+
+ #(do this for each instance in c.2):
+ #for each set of variables:
+ # check if any variable contains at least one non-special value
+ # + (for each special value) check if any variable contains at least special value
+ m.2 <- lapply(c.2, function(x){
+ cbind(apply(dsa[, x, with=FALSE], 1, function(q){any(!(q %in% special.v))}),
+ sapply(special.v, function(y){
+ apply(dsa[, x, with=FALSE], 1, function(q){any(q==y)})
+ })
+ )
+ })
+
+ # (do this for each instance in c.2)
+ # if multiple special values per respondent exist, keep only the first one
+ m.2 <- lapply(m.2, function(x){
+ if(any(rowSums(x)>1)){
+ p <- x[rowSums(x)>1,]
+ for(i in 1:nrow(p)){
+ a <- p[i,]
+ f <- TRUE
+ for(j in 1:length(a)){
+ print(j)
+ if(a[j] & f){
+ f <- FALSE
+ }else if(a[j] & !f){
+ a[j] <- FALSE
+ }
+ }
+ p[i,] <- a
+ }
+ x[rowSums(x)>1,] <- p
+ }else{x}
+ })
+
+
+ #add to m.n
+ m.n <- m.n + Reduce('+', m.2)
+ }
+
+ ##procedure for tip:16
+ #only run if there is an at least one tip:16 variable
+ if(survey.str[, any(tip==16)]){
+ #get list of all unique tip:16 item ids
+ q.16 <- unique(survey.str[tip==16, item.id])
+
+ #get list of all corresponding variables for each q.16 id
+ c.16 <- lapply(q.16, function(x){colnames(dsa)[which(colnames(dsa) %in% survey.str[item.id==x & tip==16, variable])]})
+ #(do this for each special value):
+ #for each set of variables, check if any variable contains at least one special value
+ # m.16 <- sapply(special.v, function(x){
+ # rowSums(sapply(c.16, function(y){
+ # apply(dsa[, y, with=FALSE], 1, function(q){any(q==x)})
+ # }))
+ # })
+
+ #(do this for each instance in c.16):
+ #for each set of variables:
+ # check if any variable contains at least one non-special value
+ # + (for each special value) check if any variable contains at least special value
+ m.16 <- lapply(c.16, function(x){
+ cbind(apply(dsa[, x, with=FALSE], 1, function(q){any(!(q %in% special.v))}),
+ sapply(special.v, function(y){
+ apply(dsa[, x, with=FALSE], 1, function(q){any(q==y)})
+ })
+ )
+ })
+
+ # (do this for each instance in c.16)
+ # if multiple special values per respondent exist, keep only the first one
+ m.16 <- lapply(m.16, function(x){
+ if(any(rowSums(x)>1)){
+ p <- x[rowSums(x)>1,]
+ for(i in 1:nrow(p)){
+ a <- p[i,]
+ f <- TRUE
+ for(j in 1:length(a)){
+ print(j)
+ if(a[j] & f){
+ f <- FALSE
+ }else if(a[j] & !f){
+ a[j] <- FALSE
+ }
+ }
+ p[i,] <- a
+ }
+ x[rowSums(x)>1,] <- p
+ }else{x}
+ })
+
+ m.n <- m.n + Reduce('+', m.16)
+ }
+
+ ##procedure for tip:17
+ #only run if there is an at least one tip:17 variable
+ if(survey.str[, any(tip==17)]){
+ #get list of all unique tip:17 question ids
+ q.17 <- unique(survey.str[tip==17, question.id])
+
+ #get list of all corresponding variables for each q.17 id
+ c.17 <- lapply(q.17, function(x){colnames(dsa)[which(colnames(dsa) %in% survey.str[question.id==x & tip==17, variable])]})
+
+ #similiar procedure as for tip:2 and tip:16....
+ m.17 <- lapply(c.17, function(x){
+ cbind(apply(dsa[, x, with=FALSE], 1, function(q){any(!(q %in% special.v))}),
+ sapply(special.v, function(y){
+ apply(dsa[, x, with=FALSE], 1, function(q){any(q==y)})
+ })
+ )
+ })
+
+ #... the only difference is that we are checking for all rowsums > 0, not > 1
+ m.17 <- lapply(m.17, function(x){
+ if(any(rowSums(x)>1)){
+ p <- x[rowSums(x)>0,]
+ for(i in 1:nrow(p)){
+ a <- p[i,]
+ f <- TRUE
+ for(j in 1:length(a)){
+ if(a[j] & f){
+ f <- FALSE
+ }else if(a[j] & !f){
+ a[j] <- FALSE
+ }
+ }
+ p[i,] <- a
+ }
+ x[rowSums(x)>0,] <- p
+ }else{x}
+ })
+
+ m.n <- m.n + Reduce('+', m.17)
+ }
+
+ m.n <- cbind(m.n, rowSums(m.n))
+
+ if(all(m.n[, ncol(m.n)][1]==m.n[, ncol(m.n)])){
+ m.n <- as.data.table(m.n)
+ m.n[, recnum:=dsa$recnum]
+ setnames(m.n, colnames(m.n)[-length(colnames(m.n))], c("va", "v1", "v3", "v5", "v96", "v97", "v98", "v99", "v4", "v2", "allqs"))
+ setcolorder(m.n, c("recnum", colnames(m.n)[-length(colnames(m.n))]))
+ return(m.n)
+ }else{
+ print("not all rowsums equal!")
+ }
+} \ No newline at end of file
diff --git a/admin/survey/modules/mod_uporabnost/R/uporabnost.R b/admin/survey/modules/mod_uporabnost/R/uporabnost.R
new file mode 100644
index 0000000..de05f1e
--- /dev/null
+++ b/admin/survey/modules/mod_uporabnost/R/uporabnost.R
@@ -0,0 +1,47 @@
+#uporabnost <- function(params){
+
+#setwd("path od mape, kjer se nahaja ta glavna datoteka, npr. C:/mapa")
+
+# Import data.table & functions ------------------------------------------------------
+require("data.table")
+source("modules/mod_uporabnost/R/gen.survey.str.R")
+source("modules/mod_uporabnost/R/gen.usability.matrix.R")
+source("modules/mod_uporabnost/R/calc.usability.R")
+
+# Input data ------------------------------------------------------
+params <- commandArgs(trailingOnly = TRUE)
+ID <- params[1]
+
+#get & import dsa: the main survey data file (containing only recnum, status, lurker and all variables relating to answers to survey questions)
+dsa.file <- paste0("modules/mod_uporabnost/temp/data_", ID, ".csv")
+dsa <- fread(dsa.file, header=T, drop=c(1:5, 7, 8))
+
+#get question and item files
+questions.file <- paste0("modules/mod_uporabnost/temp/questions_", ID, ".csv")
+items.file <- paste0("modules/mod_uporabnost/temp/items_", ID, ".csv")
+
+# Main & Output ------------------------------------------------------
+#generate survey structure
+survey.str <- gen.survey.str(colnames(dsa)[-(1)], questions.file, items.file)
+
+if(any(!(is.data.table(survey.str)), nrow(survey.str)==0)){
+ write(survey.str, paste0("modules/mod_uporabnost/results/usability_", ID, ".csv"))
+}else{
+ #delete invisible variables and types: 5, 9, 22, 23, 25
+ survey.str <- survey.str[visible==1 & !(tip %in% c(5, 9, 22, 23, 25)),]
+
+ #generate usability matrix
+ m.all <- gen.usability.matrix(dsa, survey.str)
+
+ if(any(!(is.data.table(m.all)), nrow(m.all)==0)){
+ write(m.all, paste0("modules/mod_uporabnost/results/usability_", ID, ".csv"))
+ }else{
+ #calculate usability indexes
+ m.final <- calc.usability(m.all, 3)
+
+ #write to results
+ write.csv2(m.final, paste0("modules/mod_uporabnost/results/usability_", ID, ".csv"), row.names = FALSE)
+ }
+}
+
+#} \ No newline at end of file
diff --git a/admin/survey/modules/mod_uporabnost/class.SurveyUporabnost.php b/admin/survey/modules/mod_uporabnost/class.SurveyUporabnost.php
new file mode 100644
index 0000000..9da5bcf
--- /dev/null
+++ b/admin/survey/modules/mod_uporabnost/class.SurveyUporabnost.php
@@ -0,0 +1,1023 @@
+<?php
+
+define("TEMP_FOLDER", "admin/survey/modules/mod_uporabnost/temp");
+define("SCRIPT_FOLDER", "admin/survey/modules/mod_uporabnost/R");
+define("RESULTS_FOLDER", "admin/survey/modules/mod_uporabnost/results");
+
+class SurveyUporabnost{
+
+ var $anketa; # id ankete
+ var $db_table = '';
+
+ private $displayEditIconsSettings = false; # ali prikazujemo okno s checkboxi za nastavitve tabele s podatki
+
+ private $cols_with_value = array(); # kateri stolpci imajo vrednosti
+ private $show_with_zero = false; # Ali prikazujemo stolpce z vrednostmi 0
+ private $show_details = false; # Ali prikazujemo stolpce s podrobnimi vrednostmi (-1, -2...)
+ private $show_calculations = false; # Ali prikazujemo stolpce s podrobnimi izracuni (UML, UNL...)
+ private $show_with_other = true; # Ali prikazujemo vrstice "Drugo"
+ private $show_with_text = true; # Ali prikazujemo vrstice tipa "besedilo"
+
+ public $bottom_usable_limit = 50; # Spodnja meja za usable respondente (def. 50%)
+ public $top_usable_limit = 80; # Zgornja meja za usable respondente (def. 80%) - unusable (50-), partially usable (50-80), usable(80+)
+
+ public $_HEADERS = array(); # shranimo podatke vseh variabel
+ private $headFileName = null; # pot do header fajla
+ private $dataFileName = null; # pot do data fajla
+ private $dataFileStatus = null; # status data datoteke
+ private $SDF = null; # class za inkrementalno dodajanje fajlov
+
+ public $variablesList = null; # Seznam vseh variabel nad katerimi lahko izvajamo (zakeširamo)
+
+ public $_CURRENT_STATUS_FILTER = ''; # filter po statusih, privzeto izvažamo 6 in 5
+ public $_PROFILE_ID_VARIABLE = ''; # filter po statusih, privzeto izvažamo 6 in 5
+
+ public $_HAS_TEST_DATA = false; # ali anketa vsebuje testne podatke
+
+ private $usability = array(); # array z vsemi podatki
+
+ private $sortField = 'recnum'; # Polje po katerem sortiramo tabelo
+ private $sortType = 0; # Nacin sortiranja (narascajoce/padajoce)
+
+
+ function __construct($anketa){
+ global $site_url;
+
+ // Ce imamo anketo, smo v status->ul evealvacija
+ if ((int)$anketa > 0){
+
+ $this->anketa = $anketa;
+
+ # polovimo vrsto tabel (aktivne / neaktivne)
+ SurveyInfo :: getInstance()->SurveyInit($this->anketa);
+ if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) {
+ $this->db_table = '_active';
+ }
+
+ SurveyAnalysisHelper::getInstance()->Init($this->anketa);
+
+ $this->_CURRENT_STATUS_FILTER = STATUS_FIELD.' ~ /6|5/';
+
+ Common::deletePreviewData($this->anketa);
+
+ // Poskrbimo za datoteko s podatki
+ $SDF = SurveyDataFile::get_instance();
+ $SDF->init($this->anketa);
+
+ if($generateDataFile)
+ $SDF->prepareFiles();
+
+ $this->headFileName = $SDF->getHeaderFileName();
+ $this->dataFileName = $SDF->getDataFileName();
+ $this->dataFileStatus = $SDF->getStatus();
+
+ if ( $this->dataFileStatus == FILE_STATUS_NO_DATA || $this->dataFileStatus == FILE_STATUS_SRV_DELETED) {
+ Common::noDataAlert();
+ exit();
+ }
+
+ # Inicializiramo in polovimo nastavitve missing profila
+ SurveyStatusProfiles::Init($this->anketa);
+ SurveyUserSetting::getInstance()->Init($this->anketa, $global_user_id);
+ SurveyConditionProfiles :: Init($this->anketa, $global_user_id);
+ SurveyTimeProfiles :: Init($this->anketa, $global_user_id);
+ SurveyVariablesProfiles :: Init($this->anketa, $global_user_id);
+ SurveyDataSettingProfiles :: Init($this->anketa);
+
+
+ // preberemo nastavitve iz baze (prej v sessionu)
+ SurveyUserSession::Init($this->anketa);
+ $this->sessionData = SurveyUserSession::getData();
+
+ if(isset($_SESSION['sid_'.$this->anketa]['usabilityIcons_settings']))
+ $this->displayEditIconsSettings = ($_SESSION['sid_'.$this->anketa]['usabilityIcons_settings']);
+
+ if (file_exists($this->headFileName) && $this->headFileName !== null && $this->headFileName != ''){
+ $this->_HEADERS = unserialize(file_get_contents($this->headFileName));
+ }
+
+ # nastavimo vse filtre
+ $this->setUpFilter();
+
+ # nastavimo filtre uporabnika
+ $this->setUserFilters();
+
+ # nastavimo sortiranje
+ if(isset($_GET['sortField']))
+ $this->sortField = $_GET['sortField'];
+ if(isset($_GET['sortType']))
+ $this->sortType = $_GET['sortType'];
+ }
+ }
+
+
+ // Prikažemo stran
+ public function displayUporabnost(){
+ global $lang;
+
+ // Prikaz nastavitev
+ $this->displayUsableSettings();
+
+ // Izvedemo pripravo datoteke
+ $this->prepareData();
+
+ // Napolnimo podatke v array
+ $this->fillData();
+
+ // Izrisemo tabelo
+ $this->displayUporabnostTable();
+
+ // Na koncu pobrisemo zacasne datoteke
+ $this->deleteTemp();
+ }
+
+ // Prikazemo tabelo
+ private function displayUporabnostTable(){
+ global $site_path;
+ global $lang;
+ global $admin_type;
+
+ echo '<div id="usable_table">';
+
+ echo '<table id="tbl_usable_respondents">';
+
+
+ // NASLOVNE VRSTICE
+ if($this->sortType == 1){
+ $sortType = 0;
+ $arrow = ' <span class="faicon sort_ascending"></span>';
+ }
+ else{
+ $sortType = 1;
+ $arrow = ' <span class="faicon sort_descending"></span>';
+ }
+
+ if($admin_type == '0' || $admin_type == '1')
+ echo '<th class="all" rowspan="2">User ID</th>';
+
+ echo '<th class="recnum" rowspan="2" style="width:60px;"><a href="index.php?anketa='.$this->anketa.'&a=usable_resp&sortField=recnum&sortType='.$sortType.'">Recnum'./*$lang['recnum'].*/($this->sortField=='recnum' ? $arrow : '').'</a></th>';
+ echo '<th class="all" rowspan="2">'.$lang['srv_usableResp_qcount'].'</th>';
+
+ echo '<th class="data" colspan=4>'.$lang['srv_usableResp_exposed'].'</th>';
+
+ echo '<th class="data" rowspan="2"><a href="index.php?anketa='.$this->anketa.'&a=usable_resp&sortField=breakoff&sortType='.$sortType.'">'.$lang['srv_usableResp_breakoff'].($this->sortField=='breakoff' ? $arrow : '').'</th>';
+
+ echo '<th class="usable" colspan="2">'.$lang['srv_usableResp_usability'].'</th>';
+
+ // ali odstranimo vse stolpce s podrobnimi vrednostmi (-1, -2...)
+ if ($this->show_details == true) {
+ foreach ($this->_missings AS $value => $text){
+ $cnt_miss++;
+ echo "<th rowspan=\"2\" class=\"unusable\" title=\"".$lang['srv_usableResp_'.$text]."\" >{$value}<br/>(".$lang['srv_usableResp_'.$text].")</th>";
+ }
+ foreach ($this->_unsets AS $value => $text){
+ $cnt_undefined++;
+ echo "<th rowspan=\"2\" class=\"unusable\" title=\"".$lang['srv_usableResp_'.$text]."\">{$value}<br/>(".$lang['srv_usableResp_'.$text].")</th>";
+ }
+ }
+
+ // ali prikazemo podrobne izracune
+ if ($this->show_calculations == true) {
+ echo '<th class="calculation" rowspan="2">UNL</th>';
+ echo '<th class="calculation" rowspan="2">UML</th>';
+ echo '<th class="calculation" rowspan="2">UCL</th>';
+ echo '<th class="calculation" rowspan="2">UIL</th>';
+ echo '<th class="calculation" rowspan="2">UAQ</th>';
+ }
+
+ echo '</tr>';
+
+ echo '<tr>';
+ echo '<th class="data"><a href="index.php?anketa='.$this->anketa.'&a=usable_resp&sortField=valid&sortType='.$sortType.'">'.$lang['srv_anl_valid'].($this->sortField=='valid' ? $arrow : '').'</th>';
+ echo '<th class="data"><a href="index.php?anketa='.$this->anketa.'&a=usable_resp&sortField=nonsubstantive&sortType='.$sortType.'">'.$lang['srv_usableResp_nonsubstantive'].($this->sortField=='nonsubstantive' ? $arrow : '').'</th>';
+ echo '<th class="data"><a href="index.php?anketa='.$this->anketa.'&a=usable_resp&sortField=nonresponse&sortType='.$sortType.'">'.$lang['srv_usableResp_nonresponse'].($this->sortField=='nonresponse' ? $arrow : '').'</th>';
+ echo '<th class="data"><span class="bold">'.$lang['srv_anl_suma1'].'</span></th>';
+
+ echo '<th class="usable"><a href="index.php?anketa='.$this->anketa.'&a=usable_resp&sortField=usable&sortType='.$sortType.'">%'.($this->sortField=='usable' ? $arrow : '').'</a></th>';
+ echo '<th class="usable status"><a href="index.php?anketa='.$this->anketa.'&a=usable_resp&sortField=status&sortType='.$sortType.'">Status'.($this->sortField=='status' ? $arrow : '').'</a></th>';
+ echo '</tr>';
+
+
+ // VRSTICE S PODATKI
+ foreach($this->usability['data'] as $user){
+
+ // Prva vrstica z vrednostmi
+ echo '<tr class="'.$user['css'].'">';
+
+ if($admin_type == '0' || $admin_type == '1'){
+
+ $sql = sisplet_query("SELECT id FROM srv_user WHERE ank_id='".$this->anketa."' AND recnum='".$user['recnum']."'");
+ $row = mysqli_fetch_array($sql);
+
+ echo '<td rowspan="2" class="all">'.$row['id'].'</td>';
+ }
+
+
+ echo '<td rowspan="2" class="recnum">'.$user['recnum'].'</td>';
+
+ // Vsi
+ echo '<td rowspan="2" class="all">'.$user['all'].'</td>';
+
+ // Ustrezni
+ echo '<td class="data">'.$user['valid'].'</td>';
+
+ // Non-substantive
+ echo '<td class="data">'.$user['nonsubstantive'].'</td>';
+
+ // Non-response
+ echo '<td class="data">'.$user['nonresponse'].'</td>';
+
+ // Skupaj
+ echo '<td class="data sum bold">'.($user['valid']+$user['nonsubstantive']+$user['nonresponse']+$user['breakoff']).'</td>';
+
+ // Breakoffs
+ echo '<td class="data breakoff">'.$user['breakoff'].'</td>';
+
+ // Uporabni
+ echo '<td class="usable">'.$user['usable'].'</td>';
+ echo '<td class="usable status" rowspan="2">'.$user['status'].'</td>';
+
+ // ali odstranimo vse stolpce s podrobnimi vrednostmi (-1, -2...)
+ if ($this->show_details == true) {
+ echo '<td class="unusable">'.$user['-1'].'</td>';
+ echo '<td class="unusable">'.$user['-2'].'</td>';
+ echo '<td class="unusable">'.$user['-3'].'</td>';
+ echo '<td class="unusable">'.$user['-4'].'</td>';
+ echo '<td class="unusable">'.$user['-5'].'</td>';
+ echo '<td class="unusable">'.$user['-97'].'</td>';
+ echo '<td class="unusable">'.$user['-98'].'</td>';
+ echo '<td class="unusable">'.$user['-99'].'</td>';
+ }
+
+ // ali prikazemo podrobne izracune
+ if ($this->show_calculations == true) {
+ echo '<td class="calculation" rowspan="2">'.$user['UNL'].'</td>';
+ echo '<td class="calculation" rowspan="2">'.$user['UML'].'</td>';
+ echo '<td class="calculation" rowspan="2">'.$user['UCL'].'</td>';
+ echo '<td class="calculation" rowspan="2">'.$user['UIL'].'</td>';
+ echo '<td class="calculation" rowspan="2">'.$user['UAQ'].'</td>';
+ }
+
+ echo '</tr>';
+
+
+ // Druga vrstica s procenti
+ echo '<tr class="multiVariablesHeader '.$user['css'].' '.$css_usable.'">';
+
+ // Ustrezni
+ echo '<td class="data">'.$user['validPercent'].'</td>';
+
+ // Non-substantive
+ echo '<td class="data">'.$user['nonsubstantivePercent'].'</td>';
+
+ // Non-response
+ echo '<td class="data">'.$user['nonresponsePercent'].'</td>';
+
+ // Skupaj
+ echo '<td class="data sum bold">100%</td>';
+
+ // Breakoffs
+ echo '<td class="data breakoff">'.$user['breakoffPercent'].'</td>';
+
+ // Uporabni
+ echo '<td class="usable">'.$user['usablePercent'].'</td>';
+
+ // ali odstranimo vse stolpce s podrobnimi vrednostmi (-1, -2...)
+ if ($this->show_details == true) {
+ echo '<td class="unusable">'.$user['-1_percent'].'</td>';
+ echo '<td class="unusable">'.$user['-2_percent'].'</td>';
+ echo '<td class="unusable">'.$user['-3_percent'].'</td>';
+ echo '<td class="unusable">'.$user['-4_percent'].'</td>';
+ echo '<td class="unusable">'.$user['-5_percent'].'</td>';
+ echo '<td class="unusable">'.$user['-97_percent'].'</td>';
+ echo '<td class="unusable">'.$user['-98_percent'].'</td>';
+ echo '<td class="unusable">'.$user['-99_percent'].'</td>';
+ }
+
+ echo '</tr>';
+ }
+
+
+ echo '</table>';
+
+ if($this->usability['all'] > 0){
+ echo '<div class="usable_sum">';
+
+ //echo '<span class="bold">'.$lang['srv_usableResp_usability'].': </span>';
+ echo '<span class="usable_legend spaceLeft spaceRight" style="background-color:#ffffff;">'.$lang['srv_usableResp_usable_unit'].' - Status 2 ('.$this->top_usable_limit.'%-100%): <span class="bold">'.$this->usability['usable'].' ('.common::formatNumber($this->usability['usable']/$this->usability['all']*100, 0, null, '%').')</span></span>';
+ echo '<span class="usable_legend spaceLeft spaceRight" style="background-color:#ffffe3;">'.$lang['srv_usableResp_partusable_unit'].' - Status 1 ('.$this->bottom_usable_limit.'%-'.$this->top_usable_limit.'%): <span class="bold">'.$this->usability['partusable'].' ('.common::formatNumber($this->usability['partusable']/$this->usability['all']*100, 0, null, '%').')</span></span>';
+ echo '<span class="usable_legend spaceLeft" style="background-color:#ffe8e8;">'.$lang['srv_usableResp_unusable_unit'].' - Status 0 (0%-'.$this->bottom_usable_limit.'%): <span class="bold">'.$this->usability['unusable'].' ('.common::formatNumber($this->usability['unusable']/$this->usability['all']*100, 0, null, '%').')</span></span>';
+
+ echo '</div>';
+ }
+
+ echo '</div>';
+ }
+
+ private function displayUsableSettings(){
+ global $lang;
+
+ // Div z nastavitvami ki se razpre
+ echo '<div id="dataSettingsCheckboxes" '.($this->displayEditIconsSettings ? '' : ' style="display:none;"').'>';
+ echo '<div id="toggleDataCheckboxes2" onClick="toggleDataCheckboxes(\'usability\');"><span class="faicon close icon-orange" style="padding-bottom:2px;"></span> '.$lang['srv_data_settings_checkboxes2'].'</div>';
+
+
+ echo '<div id="usable_respondents_settings">';
+
+ echo $lang['srv_usableResp_limit'].': ';
+
+ echo '<span class="spaceLeft spaceRight">'.$lang['srv_usableResp_bottom_limit'].': <input type="text" id="bottom_usable_limit" size="2" onblur="changeUsableRespSetting(this);" value="'.$this->bottom_usable_limit.'" />%</span>';
+ echo '<span class="spaceLeft spaceRight">'.$lang['srv_usableResp_top_limit'].': <input type="text" id="top_usable_limit" size="2" onblur="changeUsableRespSetting(this);" value="'.$this->top_usable_limit.'" />%</span>';
+
+ echo '<br />';
+
+ echo '<div style="margin-top:10px;">';
+ echo $lang['srv_usableResp_show'].': ';
+
+ // Prikaz neničelnih stolpcev
+ /*echo '<label class="spaceLeft spaceRight">';
+ echo '<input type="checkbox" id="show_with_zero" onclick="changeUsableRespSetting(this);" '.($this->show_with_zero == true ? ' checked="checked"' : '').' autocomplete="off">';
+ echo $lang['srv_usableResp_showZero'];
+ echo '</label>';*/
+
+ // Prikaz podrobnosti
+ echo '<label class="spaceLeft spaceRight">';
+ echo '<input type="checkbox" id="show_details" onclick="changeUsableRespSetting(this);" '.($this->show_details == true ? ' checked="checked"' : '').' autocomplete="off">';
+ echo $lang['srv_usableResp_showDetails'];
+ echo '</label>';
+
+ // Prikaz podrobnih izracunov
+ echo '<label class="spaceLeft">';
+ echo '<input type="checkbox" id="show_calculations" onclick="changeUsableRespSetting(this);" '.($this->show_calculations == true ? ' checked="checked"' : '').' autocomplete="off">';
+ echo $lang['srv_usableResp_showCalc'];
+ echo '</label>';
+ echo '</div>';
+
+ echo '</div>';
+
+
+ echo '</div>';
+ }
+
+
+ // Zgeneriramo pdf analizo
+ private function prepareData(){
+ global $site_path;
+ global $lang;
+ global $admin_type;
+
+ // Zgeneriramo zacasne csv datoteke
+ $this->prepareDataCSV();
+ $this->prepareQuestionCSV();
+ $this->prepareItemCSV();
+
+ // Poklicemo R skripto in zgeneriramo pdf
+ $script = $site_path . SCRIPT_FOLDER . '/uporabnost.R';
+ $out = exec('Rscript '.$script.' '.$this->anketa.' 2>&1', $output, $return_var);
+
+ // Testiranje - izpis errorjev
+ if($admin_type == 0){
+ echo '<div style="display:none;">';
+ echo 'Rscript '.$script;
+ //echo '<br />'.$out.'<br />';
+ var_dump($output);
+ echo '</div>';
+ }
+ }
+
+ // Napolnimo podatke v array
+ private function fillData(){
+ global $site_path;
+ global $lang;
+
+ $result_folder = $site_path . RESULTS_FOLDER.'/';
+
+ if (($handle = fopen($result_folder."usability_".$this->anketa.".csv", "r")) !== FALSE) {
+
+ // Loop po vrsticah
+ $cnt = 0;
+ while (($row = fgetcsv($handle, 1000, ';')) !== FALSE) {
+
+ if($cnt == 0)
+ $row = fgetcsv($handle, 1000, ';');
+
+ // Preberemo se drugo vrstico, ker so v parih
+ $row2 = fgetcsv($handle, 1000, ';');
+
+
+ // Obarvamo vrstico glede na status (belo, rumeno, rdece)
+ if($row2[7] < (int)$this->bottom_usable_limit){
+ $css_usable = 'unusable';
+ $status = 0;
+ $this->usability['unusable']++;
+ }
+ elseif($row2[7] >= (int)$this->bottom_usable_limit && $row2[7] < (int)$this->top_usable_limit){
+ $css_usable = 'partusable';
+ $status = 1;
+ $this->usability['partusable']++;
+ }
+ else{
+ $css_usable = 'usable';
+ $status = 2;
+ $this->usability['usable']++;
+ }
+ $this->usability['all']++;
+
+
+ // Nastavimo izracunane podatke za respondenta
+ $this->usability['data'][$cnt]['recnum'] = $row[0];
+ //$this->usability['data'][$cnt]['usr_id'] = $row['usr_id'];
+ $this->usability['data'][$cnt]['css'] = $css_usable;
+ $this->usability['data'][$cnt]['status'] = $status;
+
+ $this->usability['data'][$cnt]['all'] = $row[1];
+
+ $this->usability['data'][$cnt]['valid'] = $row[2];
+ $this->usability['data'][$cnt]['nonsubstantive'] = $row[3];
+ $this->usability['data'][$cnt]['nonresponse'] = $row[4];
+
+ $this->usability['data'][$cnt]['validPercent'] = $row2[2];
+ $this->usability['data'][$cnt]['nonsubstantivePercent'] = $row2[3];
+ $this->usability['data'][$cnt]['nonresponsePercent'] = $row2[4];
+
+ $this->usability['data'][$cnt]['breakoff'] = $row[6];
+ $this->usability['data'][$cnt]['breakoffPercent'] = $row2[6];
+
+ $this->usability['data'][$cnt]['usable'] = $row[7];
+ $this->usability['data'][$cnt]['usablePercent'] = $row2[7];
+
+ $this->usability['data'][$cnt]['UNL'] = $row2[17];
+ $this->usability['data'][$cnt]['UML'] = $row2[18];
+ $this->usability['data'][$cnt]['UCL'] = $row2[19];
+ $this->usability['data'][$cnt]['UIL'] = $row2[20];
+ $this->usability['data'][$cnt]['UAQ'] = $row2[21];
+
+ $this->usability['data'][$cnt]['-1'] = $row[9];
+ $this->usability['data'][$cnt]['-1_percent'] = $row2[9];
+ $this->usability['data'][$cnt]['-2'] = $row[10];
+ $this->usability['data'][$cnt]['-2_percent'] = $row2[10];
+ $this->usability['data'][$cnt]['-3'] = $row[11];
+ $this->usability['data'][$cnt]['-3_percent'] = $row2[11];
+ $this->usability['data'][$cnt]['-4'] = $row[12];
+ $this->usability['data'][$cnt]['-4_percent'] = $row2[12];
+ $this->usability['data'][$cnt]['-5'] = $row[13];
+ $this->usability['data'][$cnt]['-5_percent'] = $row2[13];
+ $this->usability['data'][$cnt]['-97'] = $row[14];
+ $this->usability['data'][$cnt]['-97_percent'] = $row2[14];
+ $this->usability['data'][$cnt]['-98'] = $row[15];
+ $this->usability['data'][$cnt]['-98_percent'] = $row2[15];
+ $this->usability['data'][$cnt]['-99'] = $row[16];
+ $this->usability['data'][$cnt]['-99_percent'] = $row2[16];
+
+ $cnt++;
+ }
+ }
+
+ // Sortiramo podatke
+ foreach ($this->usability['data'] as $key => $row) {
+ $mid[$key] = $row[$this->sortField];
+ }
+ if($this->sortType == 0)
+ array_multisort($mid, SORT_ASC, $this->usability['data']);
+ else
+ array_multisort($mid, SORT_DESC, $this->usability['data']);
+
+
+ # ali odstranimo stolpce kateri imajo same 0
+ /*if ($this->show_with_zero == false) {
+ # odstranimo missinge brez vrednosti
+ foreach ($this->_missings AS $_key => $_missing) {
+ if (!isset($this->cols_with_value[$_key]) || $this->cols_with_value[$_key] == false) {
+ unset($this->_missings[$_key]);
+ }
+ }
+ # odstranimo neveljavne brez vrednosti
+ foreach ($this->_unsets AS $_key => $_unset) {
+ if (!isset($this->cols_with_value[$_key]) || $this->cols_with_value[$_key] == false) {
+ unset($this->_unsets[$_key]);
+ }
+ }
+ }*/
+ }
+
+
+ // Pripravi csv s podatki
+ private function prepareDataCSV(){
+ global $site_path;
+ global $lang;
+ global $admin_type;
+
+ $temp_folder = $site_path . TEMP_FOLDER.'/';
+
+ $SDF = SurveyDataFile::get_instance();
+ $SDF->init($this->anketa);
+ $_headFileName = $SDF->getHeaderFileName();
+ $_dataFileName = $SDF->getDataFileName();
+ $_fileStatus = $SDF->getStatus();
+
+ if ($_headFileName != null && $_headFileName != '') {
+ $_HEADERS = unserialize(file_get_contents($_headFileName));
+ }
+ else {
+ echo 'Error! Empty file name!';
+ }
+
+ // Zaenkrat dopuscamo samo status 6 in brez lurkerjev
+ if($admin_type == '0')
+ $status_filter = '('.STATUS_FIELD.' ~ /6|5/)&&('.LURKER_FIELD.'==0)';
+ else
+ $status_filter = '('.STATUS_FIELD.'==6)&&('.LURKER_FIELD.'==0)';
+
+ //$start_sequence = $_HEADERS['_settings']['dataSequence'];
+ $start_sequence = 2;
+ $end_sequence = $_HEADERS['_settings']['metaSequence']-1;
+
+ $field_delimit = ';';
+
+ // Filtriramo podatke po statusu in jih zapisemo v temp folder
+ if (IS_WINDOWS) {
+ //$command = 'awk -F"|" "BEGIN {{OFS=\",\"} {ORS=\"\n\"}} '.$status_filter.' { print $0}" '.$_dataFileName.' >> '.$temp_folder.'/temp_data_'.$this->anketa.'.dat';
+ $out = shell_exec('awk -F"|" "BEGIN {{OFS=\",\"} {ORS=\"\n\"}} '.$status_filter.'" '.$_dataFileName.' | cut -d "|" -f '.$start_sequence.'-'.$end_sequence.' >> '.$temp_folder.'/temp_data_'.$this->anketa.'.dat');
+ }
+ else {
+ //$command = 'awk -F"|" \'BEGIN {{OFS=","} {ORS="\n"}} '.$status_filter.' { print $0; }\' '.$_dataFileName.' >> '.$temp_folder.'/temp_data_'.$this->anketa.'.dat';
+ $out = shell_exec('awk -F"|" \'BEGIN {{OFS=","} {ORS="\n"}} '.$status_filter.'\' '.$_dataFileName.' | cut -d \'|\' -f '.$start_sequence.'-'.$end_sequence.' >> '.$temp_folder.'/temp_data_'.$this->anketa.'.dat');
+ }
+
+
+ // Ustvarimo koncni CSV
+ if ($fd = fopen($temp_folder.'/temp_data_'.$this->anketa.'.dat', "r")) {
+
+ $fd2 = fopen($temp_folder.'/data_'.$this->anketa.'.csv', "w");
+
+ # naredimo header row
+ foreach ($_HEADERS AS $spid => $spremenljivka) {
+ if (isset($spremenljivka['grids']) && count($spremenljivka['grids']) > 0) {
+ foreach ($spremenljivka['grids'] AS $gid => $grid) {
+ foreach ($grid['variables'] AS $vid => $variable ){
+ if ($spremenljivka['tip'] !== 'sm' && !($variable['variable'] == 'uid' && $variable['naslov'] == 'User ID')){
+ $output1 .= strip_tags($variable['variable']).$field_delimit;
+ //$output2 .= '"'.strip_tags($variable['naslov']).'"'.$field_delimit;
+ }
+ }
+ }
+ }
+ }
+
+ // Pobrisemo zadnji ; ce obstaja
+ $output1 = rtrim($output1, ";");
+
+ // Zapisemo header row
+ fwrite($fd2, $output1."\r\n");
+ //fwrite($fd2, $output2."\r\n");
+
+
+ while ($line = fgets($fd)) {
+
+ //fwrite($fd2, '="');
+ //$line = str_replace(array("\r","\n","|"), array("","",'";="'), $line);
+ $line = '"' . str_replace(array("\r","\n","\"","|"), array("","","",'";"'), $line) . '"';
+
+ // Spremenimo encoding v windows-1250
+ $line = iconv("UTF-8","Windows-1250//TRANSLIT", $line);
+ //$line = str_replace(array("č","š","ž","Č","Š","Ž"), array("\v{c}","\v{s}","\v{z}","\v{C}","\v{S}","\v{Z}"), $line);
+
+ fwrite($fd2, $line);
+ //fwrite($fd2, '"');
+ fwrite($fd2, "\r\n");
+ }
+
+ fclose($fd2);
+ }
+ fclose($fd);
+
+
+ // Na koncu pobrisemo temp datoteke
+ if (file_exists($temp_folder.'/temp_data_'.$this->anketa.'.dat')) {
+ unlink($temp_folder.'/temp_data_'.$this->anketa.'.dat');
+ }
+ }
+
+ // Pripravi csv z vprasanji
+ private function prepareQuestionCSV(){
+ global $site_path;
+ global $lang;
+ global $admin_type;
+
+ define('delimiter', ';');
+
+ $temp_folder = $site_path . TEMP_FOLDER.'/';
+
+ $fd = fopen($temp_folder.'/questions_'.$this->anketa.'.csv', "w");
+
+
+ // Prva vrstica
+ $output = '';
+ $output .= 'ID SURVEY'.delimiter;
+ $output .= 'ID QUESTION'.delimiter;
+ $output .= 'ID PAGE'.delimiter;
+ $output .= 'QUESTION NUMBER'.delimiter;
+
+ /*$output .= 'naslov'.delimiter;
+ $output .= 'info'.delimiter;*/
+ $output .= 'variable'.delimiter;
+ /*$output .= 'variable_custom'.delimiter;
+ $output .= 'label'.delimiter;*/
+ $output .= 'tip'.delimiter;
+ $output .= 'vrstni_red'.delimiter;
+ //$output .= 'random'.delimiter;
+ $output .= 'size'.delimiter;
+ /*$output .= 'undecided'.delimiter;
+ $output .= 'rejected'.delimiter;
+ $output .= 'inappropriate'.delimiter;
+ $output .= 'stat'.delimiter;
+ $output .= 'orientation'.delimiter;
+ $output .= 'checkboxhide'.delimiter;
+ $output .= 'reminder'.delimiter;*/
+ $output .= 'visible'.delimiter;
+ /*$output .= 'textfield'.delimiter;
+ $output .= 'textfield_label'.delimiter;
+ $output .= 'cela'.delimiter;
+ $output .= 'decimalna'.delimiter;
+ $output .= 'enota'.delimiter;
+ $output .= 'timer'.delimiter;
+ $output .= 'sistem'.delimiter;
+ $output .= 'folder'.delimiter;*/
+ $output .= 'params'.delimiter;
+ /*$output .= 'antonucci'.delimiter;
+ $output .= 'design'.delimiter;
+ $output .= 'podpora'.delimiter;
+ $output .= 'grids'.delimiter;
+ $output .= 'grids_edit'.delimiter;
+ $output .= 'grid_subtitle1'.delimiter;
+ $output .= 'grid_subtitle2'.delimiter;
+ $output .= 'ranking_k'.delimiter;
+ $output .= 'vsota'.delimiter;
+ $output .= 'vsota_limit'.delimiter;
+ $output .= 'vsota_min'.delimiter;
+ $output .= 'skala'.delimiter;
+ $output .= 'vsota_reminder'.delimiter;
+ $output .= 'vsota_limittype'.delimiter;
+ $output .= 'vsota_show'.delimiter;
+ $output .= 'thread'.delimiter;
+ $output .= 'text_kosov'.delimiter;
+ $output .= 'text_orientation'.delimiter;
+ $output .= 'note'.delimiter;
+ $output .= 'upload'.delimiter;
+ $output .= 'dostop'.delimiter;
+ $output .= 'inline_edit'.delimiter;
+ $output .= 'onchange_submit'.delimiter;
+ $output .= 'hidden_default'.delimiter;
+ $output .= 'naslov_graf'.delimiter;
+ $output .= 'edit_graf'.delimiter;
+ $output .= 'wide_graf'.delimiter;
+ $output .= 'coding'.delimiter;
+ $output .= 'dynamic_mg'.delimiter;
+ $output .= 'QUESTION IF'.delimiter;*/
+
+ fwrite($fd, $output."\r\n");
+
+
+ // Vrstice s podatki
+ $sql = sisplet_query("SELECT s.id, s.gru_id, s.variable, s.tip, s.vrstni_red, s.size, s.visible, s.params
+ FROM srv_spremenljivka s, srv_grupa g
+ WHERE s.gru_id=g.id AND g.ank_id='".$this->anketa."'
+ ORDER BY g.vrstni_red, s.vrstni_red");
+ if (!$sql) echo mysqli_error($GLOBALS['connect_db']);
+ if (mysqli_num_rows($sql) > 0) {
+
+ $i = 0;
+
+ while ($row = mysqli_fetch_array($sql)) {
+
+ $i++;
+
+ $line = '';
+
+ $line .= $this->anketa.delimiter;
+ $line .= $row['id'].delimiter;
+ $line .= $row['gru_id'].delimiter;
+ $line .= $i.delimiter;
+
+ /*$line .= str_replace("\n", '', str_replace(delimiter, '', $row['naslov']) ).delimiter;
+ $line .= str_replace("\n", '', str_replace(delimiter, '', $row['info']) ).delimiter;*/
+ $line .= $row['variable'].delimiter;
+ /*$line .= $row['variable_custom'].delimiter;
+ $line .= str_replace("\n", '', str_replace(delimiter, '', $row['label']) ).delimiter;*/
+ $line .= $row['tip'].delimiter;
+ $line .= $row['vrstni_red'].delimiter;
+ //$line .= $row['random'].delimiter;
+ $line .= $row['size'].delimiter;
+ /*$line .= $row['undecided'].delimiter;
+ $line .= $row['rejected'].delimiter;
+ $line .= $row['inappropriate'].delimiter;
+ $line .= $row['stat'].delimiter;
+ $line .= $row['orientation'].delimiter;
+ $line .= $row['checkboxhide'].delimiter;
+ $line .= $row['reminder'].delimiter;*/
+ $line .= $row['visible'].delimiter;
+ /*$line .= $row['textfield'].delimiter;
+ $line .= $row['textfield_label'].delimiter;
+ $line .= $row['cela'].delimiter;
+ $line .= $row['decimalna'].delimiter;
+ $line .= $row['enota'].delimiter;
+ $line .= $row['timer'].delimiter;
+ $line .= $row['sistem'].delimiter;
+ $line .= $row['folder'].delimiter;*/
+ $line .= str_replace("\n", '', str_replace(delimiter, '', $row['params']) ).delimiter;
+ /*$line .= $row['antonucci'].delimiter;
+ $line .= $row['design'].delimiter;
+ $line .= $row['podpora'].delimiter;
+ $line .= $row['grids'].delimiter;
+ $line .= $row['grids_edit'].delimiter;
+ $line .= $row['grid_subtitle1'].delimiter;
+ $line .= $row['grid_subtitle2'].delimiter;
+ $line .= $row['ranking_k'].delimiter;
+ $line .= $row['vsota'].delimiter;
+ $line .= $row['vsota_limit'].delimiter;
+ $line .= $row['vsota_min'].delimiter;
+ $line .= $row['skala'].delimiter;
+ $line .= $row['vsota_reminder'].delimiter;
+ $line .= $row['vsota_limittype'].delimiter;
+ $line .= $row['vsota_show'].delimiter;
+ $line .= $row['thread'].delimiter;
+ $line .= $row['text_kosov'].delimiter;
+ $line .= $row['text_orientation'].delimiter;
+ $line .= str_replace("\n", '', str_replace(delimiter, '', $row['note']) ).delimiter;
+ $line .= $row['upload'].delimiter;
+ $line .= $row['dostop'].delimiter;
+ $line .= $row['inline_edit'].delimiter;
+ $line .= $row['onchange_submit'].delimiter;
+ $line .= $row['hidden_default'].delimiter;
+ $line .= str_replace("\n", '', str_replace(delimiter, '', $row['naslov_graf']) ).delimiter;
+ $line .= $row['edit_graf'].delimiter;
+ $line .= $row['wide_graf'].delimiter;
+ $line .= $row['coding'].delimiter;
+ $line .= $row['dynamic_mg'].delimiter;
+
+ $sql1 = sisplet_query("SELECT f.* FROM srv_branching b, srv_if f WHERE b.element_spr = '$row[id]' AND b.parent=f.id");
+ $row1 = mysqli_fetch_array($sql1);
+ $line .= $this->parentIf($id, $row1['id']).delimiter;*/
+
+ fwrite($fd, $line."\r\n");
+ }
+ }
+
+ fclose($fd);
+ }
+
+ // Pripravi csv z itemi
+ private function prepareItemCSV(){
+ global $site_path;
+ global $lang;
+ global $admin_type;
+
+ define('delimiter', ';');
+
+ $temp_folder = $site_path . TEMP_FOLDER.'/';
+
+ $fd = fopen($temp_folder.'/items_'.$this->anketa.'.csv', "w");
+
+ // Prva vrstica
+ $output = '';
+ $output .= 'ID SURVEY'.delimiter;
+ $output .= 'ID QUESTION'.delimiter;
+ $output .= 'ID ITEM'.delimiter;
+
+ /*$output .= 'naslov'.delimiter;
+ $output .= 'naslov2'.delimiter;*/
+ $output .= 'variable'.delimiter;
+ $output .= 'variable_custom'.delimiter;
+ $output .= 'vrstni_red'.delimiter;
+ /*$output .= 'random'.delimiter;
+ $output .= 'other'.delimiter;
+ $output .= 'if_id'.delimiter;
+ $output .= 'size'.delimiter;
+ $output .= 'naslov_graf'.delimiter;
+
+ $output .= 'grid_vrstni_red'.delimiter;
+ $output .= 'grid_variable'.delimiter;
+ $output .= 'grid_other'.delimiter;
+ $output .= 'grid_naslov'.delimiter;*/
+
+ fwrite($fd, $output."\r\n");
+
+
+ // Vrstice s podatki
+ $sql = sisplet_query("SELECT v.id, v.spr_id, v.variable, v.variable_custom, v.vrstni_red
+ FROM srv_vrednost v, srv_spremenljivka s, srv_grupa g
+ WHERE v.spr_id=s.id AND s.gru_id=g.id AND g.ank_id='".$this->anketa."'
+ ORDER BY g.vrstni_red, s.vrstni_red");
+ if (!$sql) echo mysqli_error($GLOBALS['connect_db']);
+ if (mysqli_num_rows($sql) > 0) {
+
+ while ($row = mysqli_fetch_array($sql)) {
+
+ $line = '';
+
+ $line .= $this->anketa.delimiter;
+ $line .= $row['spr_id'].delimiter;
+ $line .= $row['id'].delimiter;
+
+ /*$line .= str_replace("\n", '', str_replace(delimiter, '', $row['naslov']) ).delimiter;
+ $line .= str_replace("\n", '', str_replace(delimiter, '', $row['naslov2']) ).delimiter;*/
+ $line .= str_replace("\n", '', str_replace(delimiter, '', $row['variable']) ).delimiter;
+ $line .= $row['variable_custom'].delimiter;
+ $line .= $row['vrstni_red'].delimiter;
+ /*$line .= $row['random'].delimiter;
+ $line .= $row['other'].delimiter;
+ $line .= $row['if_id'].delimiter;
+ $line .= $row['size'].delimiter;
+ $line .= str_replace("\n", '', str_replace(delimiter, '', $row['naslov_graf']) ).delimiter;
+
+ $sql1 = sisplet_query("SELECT * FROM srv_grid WHERE spr_id = '$row[spr_id]' ORDER BY vrstni_red ASC");
+ while ($row1 = mysqli_fetch_array($sql1)) {
+
+ $line .= str_replace("\n", '', str_replace(delimiter, '', $row1['vrstni_red']) ).delimiter;
+ $line .= str_replace("\n", '', str_replace(delimiter, '', $row1['variable']) ).delimiter;
+ $line .= str_replace("\n", '', str_replace(delimiter, '', $row1['other']) ).delimiter;
+ $line .= str_replace("\n", '', str_replace(delimiter, '', $row1['naslov']) ).delimiter;
+ }*/
+
+ fwrite($fd, $line."\r\n");
+ }
+ }
+
+ fclose($fd);
+ }
+
+
+ // Pobrisemo zacasne datoteke
+ private function deleteTemp(){
+ global $site_path;
+
+ $temp_folder = $site_path . TEMP_FOLDER.'/';
+ $result_folder = $site_path . RESULTS_FOLDER.'/';
+
+ // Pobrisemo zacasno CSV datoteko s podatki
+ if (file_exists($temp_folder.'/data_'.$this->anketa.'.csv')) {
+ unlink($temp_folder.'/data_'.$this->anketa.'.csv');
+ }
+
+ // Pobrisemo zacasno CSV datoteko z vprasanji
+ if (file_exists($temp_folder.'/questions_'.$this->anketa.'.csv')) {
+ unlink($temp_folder.'/questions_'.$this->anketa.'.csv');
+ }
+
+ // Pobrisemo zacasno CSV datoteko z itemi
+ if (file_exists($temp_folder.'/items_'.$this->anketa.'.csv')) {
+ unlink($temp_folder.'/items_'.$this->anketa.'.csv');
+ }
+
+ // Pobrisemo CSV datoteko z rezultati
+ if (file_exists($result_folder.'/usability_'.$this->anketa.'.csv')) {
+ unlink($result_folder.'/usability_'.$this->anketa.'.csv');
+ }
+ }
+
+
+ private function parentIf($anketa, $element) {
+ $sql = sisplet_query("SELECT tip FROM srv_if WHERE id = '$element'");
+ $row = mysqli_fetch_array($sql);
+
+ if ($row['tip'] == 0) return $element;
+
+ $sql1 = sisplet_query("SELECT parent FROM srv_branching WHERE ank_id='$anketa' AND element_if = '$element'");
+ $row1 = mysqli_fetch_array($sql1);
+
+ return parentIf($anketa, $row1['parent']);
+ }
+
+
+ /** Funkcija ki nastavi vse filtre
+ *
+ */
+ private function setUpFilter(){
+ /*if ($this->dataFileStatus == FILE_STATUS_NO_DATA
+ || $this->dataFileStatus == FILE_STATUS_NO_FILE
+ || $this->dataFileStatus == FILE_STATUS_SRV_DELETED)
+ {
+ return false;
+ }*/
+
+ # poiščemo kater profil uporablja uporabnik
+ $_currentMissingProfile = SurveyUserSetting :: getInstance()->getSettings('default_missing_profile');
+ $this->currentMissingProfile = (isset($_currentMissingProfile) ? $_currentMissingProfile : 1);
+
+ # filtriranje po statusih
+ $this->_CURRENT_STATUS_FILTER = SurveyStatusProfiles :: getStatusAsAWKString();
+
+ # filtriranje po časih
+ $_time_profile_awk = SurveyTimeProfiles :: getFilterForAWK($this->_HEADERS['unx_ins_date']['grids']['0']['variables']['0']['sequence']);
+
+ # dodamo še ife
+
+ SurveyConditionProfiles :: setHeader($this->_HEADERS);
+ $_condition_profile_AWK = SurveyConditionProfiles:: getAwkConditionString();
+
+ if (($_condition_profile_AWK != "" && $_condition_profile_AWK != null )
+ || ($_time_profile_awk != "" && $_time_profile_awk != null))
+ {
+ $this->_CURRENT_STATUS_FILTER = '('.$this->_CURRENT_STATUS_FILTER;
+ if ($_condition_profile_AWK != "" && $_condition_profile_AWK != null )
+ {
+ $this->_CURRENT_STATUS_FILTER .= ' && '.$_condition_profile_AWK;
+ }
+ if ($_time_profile_awk != "" && $_time_profile_awk != null)
+ {
+ $this->_CURRENT_STATUS_FILTER .= ' && '.$_time_profile_awk;
+ }
+ $this->_CURRENT_STATUS_FILTER .= ')';
+ }
+ $status_filter = $this->_CURRENT_STATUS_FILTER;
+
+ if ($this->dataFileStatus == FILE_STATUS_OK || $this->dataFileStatus == FILE_STATUS_OLD)
+ {
+ if (isset($this->_HEADERS['testdata']))
+ {
+ $this->_HAS_TEST_DATA = true;
+ }
+ }
+
+ $smv = new SurveyMissingValues($this->anketa);
+ $smv -> Init();
+
+ $smv_array = $smv->GetSurveyMissingValues($this->anketa);
+ if (!empty($smv_array[1])){
+ foreach ($smv_array[1] AS $_survey_missings)
+ {
+ $this->_missings[$_survey_missings['value']] = $_survey_missings['text'];
+
+ }
+ }
+ if (!empty($smv_array[2])){
+ foreach ($smv_array[2] AS $_survey_unsets)
+ {
+ $this->_unsets[$_survey_unsets['value']] = $_survey_unsets['text'];
+ }
+ }
+ }
+
+ private function setUserFilters(){
+ # Nastavimo filtre variabel
+ $dvp = SurveyUserSetting :: getInstance()->getSettings('default_variable_profile');
+ $_currentVariableProfile = SurveyVariablesProfiles :: checkDefaultProfile($dvp);
+ if ($dvp != $_currentVariableProfile) {
+ SurveyUserSetting :: getInstance()->saveSettings('default_variable_profile', $_currentVariableProfile);
+ }
+ $this->_PROFILE_ID_VARIABLE = $_currentVariableProfile;
+
+ # ali prikazujemo tudi stolpce z 0 vrednostmi
+ if (isset($this->sessionData['usable_resp']['show_with_zero'])) {
+ $this->show_with_zero = $this->sessionData['usable_resp']['show_with_zero'];
+ }
+
+ # ali prikazujemo tudi stolpce z 0 vrednostmi
+ if (isset($this->sessionData['usable_resp']['show_details'])) {
+ $this->show_details = $this->sessionData['usable_resp']['show_details'];
+ }
+
+ # ali prikazujemo tudi stolpce z izracuni
+ if (isset($this->sessionData['usable_resp']['show_calculations'])) {
+ $this->show_calculations = $this->sessionData['usable_resp']['show_calculations'];
+ }
+
+ # ali prikazujemo vrstice "Drugo"
+ $this->show_with_other = true;
+ if (isset($this->sessionData['usable_resp']['show_with_other'])) {
+ $this->show_with_other = $this->sessionData['usable_resp']['show_with_other'];
+ }
+
+ # ali prikazujemo vrstice tipa "besedilo"
+ $this->show_with_text = true;
+ if (isset($this->sessionData['usable_resp']['show_with_text'])) {
+ $this->show_with_text = $this->sessionData['usable_resp']['show_with_text'];
+ }
+
+ # Spodnja in zgornja meja za usable
+ if (isset($this->sessionData['usable_resp']['bottom_usable_limit'])) {
+ $this->bottom_usable_limit = $this->sessionData['usable_resp']['bottom_usable_limit'];
+ }
+ # ali prikazujemo tudi stolpce z 0 vrednostmi
+ if (isset($this->sessionData['usable_resp']['top_usable_limit'])) {
+ $this->top_usable_limit = $this->sessionData['usable_resp']['top_usable_limit'];
+ }
+ }
+
+ // Ali imamo zgenerirano datoteko ali ne
+ private function hasDataFile(){
+ if ($this->dataFileStatus == FILE_STATUS_NO_DATA || $this->dataFileStatus == FILE_STATUS_NO_FILE
+ || $this->dataFileStatus == FILE_STATUS_SRV_DELETED)
+ return false;
+ else
+ return true;
+ }
+
+ private function setStatusFilter($status=''){
+
+ $this->_CURRENT_STATUS_FILTER = $status;
+ }
+
+
+
+} \ No newline at end of file
diff --git a/admin/survey/modules/mod_uporabnost/results/.gitignore b/admin/survey/modules/mod_uporabnost/results/.gitignore
new file mode 100644
index 0000000..a3a0c8b
--- /dev/null
+++ b/admin/survey/modules/mod_uporabnost/results/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore \ No newline at end of file
diff --git a/admin/survey/modules/mod_uporabnost/temp/.gitignore b/admin/survey/modules/mod_uporabnost/temp/.gitignore
new file mode 100644
index 0000000..a3a0c8b
--- /dev/null
+++ b/admin/survey/modules/mod_uporabnost/temp/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore \ No newline at end of file
diff --git a/admin/survey/modules/mod_vizualizacija/R/app/rsconnect/shinyapps.io/1kadsa/vizual.dcf b/admin/survey/modules/mod_vizualizacija/R/app/rsconnect/shinyapps.io/1kadsa/vizual.dcf
new file mode 100644
index 0000000..7607ca2
--- /dev/null
+++ b/admin/survey/modules/mod_vizualizacija/R/app/rsconnect/shinyapps.io/1kadsa/vizual.dcf
@@ -0,0 +1,10 @@
+name: vizual
+title:
+username:
+account: 1kadsa
+server: shinyapps.io
+hostUrl: https://api.shinyapps.io/v1
+appId: 1050397
+bundleId: 2263472
+url: https://1kadsa.shinyapps.io/vizual/
+when: 1564051902.65834
diff --git a/admin/survey/modules/mod_vizualizacija/R/app/vizual.R b/admin/survey/modules/mod_vizualizacija/R/app/vizual.R
new file mode 100644
index 0000000..e3c0b95
--- /dev/null
+++ b/admin/survey/modules/mod_vizualizacija/R/app/vizual.R
@@ -0,0 +1,58 @@
+#--------------- NEEDED LIBRARIES ---------------#
+# devtools::install_github("dreamRs/esquisse")
+library(shiny)
+library(esquisse)
+#------------- //NEEDED LIBRARIES// -------------#
+
+
+#-------------------------- PHP ----------------------------#
+# Passing arguments to an R script from command lines
+# params <- commandArgs(trailingOnly = TRUE)
+# # CSV name
+# filename <- params[1]
+#---------------------- //PHP// ----------------------------#
+
+
+# ---------------------- LOAD AND PREPARE DATA FOR THE APP --------------------------#
+df <-
+ read.csv2(
+ url("https://test.1ka.si/admin/survey/modules/mod_vizualizacija/temp/data.csv"),
+ header = TRUE,
+ fill = TRUE,
+ stringsAsFactors = FALSE
+ )
+
+# Omit the first row od the data base (Text questions)
+if (df[1, 1] == ("Ustreznost") |
+ df[1, 1] == ("Relevance")) {
+ df <- df[2:nrow(df), ]
+}
+# Label Missing values so the app will recognize them
+df[df < 0] <- NA
+# -------------------- //LOAD AND PREPARE DATA FOR THE APP// ------------------------#
+
+
+#------------------------------- SHINY APP -----------------------------#
+
+# CREATE USER INTERFACE (UI) #
+#============================#
+ui <- fluidPage(
+ tags$div( # needs to be in fixed height container
+ style = "position: fixed; top: 0; bottom: 0; right: 0; left: 0;",
+ esquisserUI(id = "esquisse")
+ )
+)
+
+# Define server logic required to draw plots #
+#============================================#
+server <- function(input, output, session) {
+
+ callModule(module = esquisserServer, id = "esquisse")
+
+}
+#----------------------------- //SHINY APP// ---------------------------#
+
+
+# ShinyApp function to create a Shiny app object from the
+# UI/server pair that we defined above.
+shinyApp(ui, server) \ No newline at end of file
diff --git a/admin/survey/modules/mod_vizualizacija/class.SurveyVizualizacija.php b/admin/survey/modules/mod_vizualizacija/class.SurveyVizualizacija.php
new file mode 100644
index 0000000..1c9884b
--- /dev/null
+++ b/admin/survey/modules/mod_vizualizacija/class.SurveyVizualizacija.php
@@ -0,0 +1,211 @@
+<?php
+
+include_once 'definition.php';
+
+define("TEMP_FOLDER", "admin/survey/modules/mod_vizualizacija/temp");
+define("SCRIPT_FOLDER", "admin/survey/modules/mod_vizualizacija/R/app");
+
+class SurveyVizualizacija{
+
+ var $anketa; # id ankete
+ var $db_table = '';
+
+
+ function __construct($anketa){
+ global $site_url;
+
+ // Ce imamo anketo, smo v status->ul evealvacija
+ if ((int)$anketa > 0){
+ $this->anketa = $anketa;
+
+ # polovimo vrsto tabel (aktivne / neaktivne)
+ SurveyInfo :: getInstance()->SurveyInit($this->anketa);
+ if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) {
+ $this->db_table = '_active';
+ }
+ }
+ }
+
+
+ // Prikazemo vsebino zavihka v analizah
+ public function display(){
+
+ // Zenkrat iframe aplikacije na zunanjem strezniku
+ //echo '<iframe src="https://1kadsa.shinyapps.io/vizual/" style="width:80%; height:800px; border:1px #c8e3f8 solid;"></iframe>';
+
+ echo '<div id="shiny_iframe" style="width:80%; height:800px; border:1px #c8e3f8 solid;"></div>';
+ echo '<script>
+ window.onload = function() {
+ var iframe = document.createElement(\'iframe\');
+ iframe.src = "https://1kadsa.shinyapps.io/vizual/";
+ $(\'#shiny_iframe\').html(iframe);
+
+ $(iframe).css({
+ "width": "100%",
+ "height": "100%"
+ });
+ };
+ </script>';
+
+ // Zgeneriramo zacasne csv datoteke
+ $this->prepareCSV();
+
+ //$this->execute();
+ }
+
+ // Odpremom popup z vizualizacijo
+ public function execute(){
+ global $site_path;
+ global $site_url;
+ global $lang;
+ global $admin_type;
+
+ // Zgeneriramo zacasne csv datoteke
+ $this->prepareCSV();
+
+ // Poklicemo R skripto in zgeneriramo pdf
+ $script = $site_path . SCRIPT_FOLDER . '/Visualize_df.R';
+ $file_name = 'data_'.$this->anketa.'.csv';
+
+ //$out = exec('Rscript '.$script.' '.$file_name.' 2>&1', $output, $return_var);
+
+ // Testiranje - izpis errorjev
+ /*echo '<div>';
+ echo 'Rscript '.$script;
+ //echo '<br />'.$out.'<br />';
+ var_dump($output);
+ echo '</div>';*/
+
+ // Na koncu pobrisemo zacasne datoteke
+ $this->deleteTemp();
+
+ // Ugasnemo skripto:)
+ die();
+ }
+
+ // Pripravimo zacasne datoteke
+ private function prepareCSV(){
+ global $site_path;
+
+ $temp_folder = $site_path . TEMP_FOLDER.'/';
+
+
+ // Poskrbimo za datoteko s podatki
+ $SDF = SurveyDataFile::get_instance();
+ $SDF->init($this->anketa);
+ $SDF->prepareFiles();
+
+ $_headFileName = $SDF->getHeaderFileName();
+ $_dataFileName = $SDF->getDataFileName();
+
+ if ($_headFileName != null && $_headFileName != '') {
+ $_HEADERS = unserialize(file_get_contents($_headFileName));
+ }
+ else {
+ echo 'Error! Empty file name!';
+ }
+
+ // Zaenkrat dopuscamo samo status 6 in brez lurkerjev
+ $status_filter = '('.STATUS_FIELD.' ~ /6|5/)&&('.LURKER_FIELD.'==0)';
+
+ $start_sequence = 2;
+ $end_sequence = $_HEADERS['_settings']['metaSequence']-1;
+
+ $field_delimit = ';';
+
+ // Filtriramo podatke po statusu in jih zapisemo v temp folder
+ if (IS_WINDOWS) {
+ $out = shell_exec('awk -F"|" "BEGIN {{OFS=\",\"} {ORS=\"\n\"}} '.$status_filter.'" '.$_dataFileName.' | cut -d "|" -f '.$start_sequence.'-'.$end_sequence.' >> '.$temp_folder.'/temp_data_'.$this->anketa.'.dat');
+ }
+ else {
+ $out = shell_exec('awk -F"|" \'BEGIN {{OFS=","} {ORS="\n"}} '.$status_filter.'\' '.$_dataFileName.' | cut -d \'|\' -f '.$start_sequence.'-'.$end_sequence.' >> '.$temp_folder.'/temp_data_'.$this->anketa.'.dat');
+ }
+
+
+ // Ustvarimo koncni CSV
+ if ($fd = fopen($temp_folder.'/temp_data_'.$this->anketa.'.dat', "r")) {
+
+ //$fd2 = fopen($temp_folder.'/data_'.$this->anketa.'.csv', "w");
+ $fd2 = fopen($temp_folder.'/data.csv', "w");
+
+ $convertType = 1; // kateri tip konvertiranja uporabimo
+ $convertTypes[1] = array('charSet' => 'windows-1250',
+ 'delimit' => ';',
+ 'newLine' => "\n",
+ 'BOMchar' => "\xEF\xBB\xBF");
+ # dodamo boomchar za utf-8
+ fwrite($fd2, $convertTypes[$convertType]['BOMchar']);
+
+ # naredimo header row
+ foreach ($_HEADERS AS $spid => $spremenljivka) {
+ if (count($spremenljivka['grids']) > 0) {
+ foreach ($spremenljivka['grids'] AS $gid => $grid) {
+ foreach ($grid['variables'] AS $vid => $variable ){
+ if ($spremenljivka['tip'] !== 'sm' && !($variable['variable'] == 'uid' && $variable['naslov'] == 'User ID')){
+ $output1 .= strip_tags($variable['variable']).$field_delimit;
+ $output2 .= '"'.strip_tags($variable['naslov']).'"'.$field_delimit;
+ }
+ }
+ }
+ }
+ }
+
+ fwrite($fd2, $output1."\r\n");
+ fwrite($fd2, $output2."\r\n");
+
+ while ($line = fgets($fd)) {
+
+ $temp = array();
+ $temp = explode('|', $line);
+
+ $line = '"' . str_replace(array("\r","\n","\"","|"), array("","","",'";"'), $line) . '"';
+
+ // Spremenimo encoding v windows-1250
+ //$line = iconv("UTF-8","Windows-1250//TRANSLIT", $line);
+
+ fwrite($fd2, $line);
+ fwrite($fd2, "\r\n");
+ }
+
+ fclose($fd2);
+ }
+ fclose($fd);
+
+
+ // Na koncu pobrisemo temp datoteke
+ if (file_exists($temp_folder.'/temp_data_'.$this->anketa.'.dat')) {
+ unlink($temp_folder.'/temp_data_'.$this->anketa.'.dat');
+ }
+ }
+
+ // Pobrisemo zacasne datoteke
+ private function deleteTemp(){
+ global $site_path;
+
+ $temp_folder = $site_path . TEMP_FOLDER.'/';
+
+ if (file_exists($temp_folder.'/data_'.$this->anketa.'.csv')) {
+ unlink($temp_folder.'/data_'.$this->anketa.'.csv');
+ }
+
+ // Pobrisemo zacasno CSV datoteko s podatki - UGASNEMO, KER VCASIH NE DELA:)
+ if (file_exists($temp_folder.'/evoli.csv')) {
+ unlink($temp_folder.'/evoli.csv');
+ }
+
+ // Pobrisemo pdf grafe ki so bili vstavljeni v porocilo
+ $files = glob($site_path . RESULTS_FOLDER . '/part-predmet-slike/*');
+ foreach($files as $file){
+ if(is_file($file))
+ unlink($file);
+ }
+
+ // Pobrisemo še vse ostalo v rezultatih
+ $files = glob($site_path . RESULTS_FOLDER . '/*');
+ foreach($files as $file){
+ if(is_file($file))
+ unlink($file);
+ }
+ }
+
+} \ No newline at end of file
diff --git a/admin/survey/modules/mod_voting/class.SurveyVoting.php b/admin/survey/modules/mod_voting/class.SurveyVoting.php
new file mode 100644
index 0000000..98ef5fb
--- /dev/null
+++ b/admin/survey/modules/mod_voting/class.SurveyVoting.php
@@ -0,0 +1,71 @@
+<?php
+
+/*
+ * Modul za volitve
+ */
+
+
+class SurveyVoting{
+
+ var $anketa; # id ankete
+
+
+ function __construct($anketa){
+ global $site_url;
+
+ // Ce imamo anketo
+ if ((int)$anketa > 0){
+ $this->anketa = $anketa;
+ }
+ }
+
+
+ // Izvedemo vse potrebno pri vklopu (vklopimo obvescanje, ugasnemo belezenje parapodatkov...)
+ public function turnOnVoting(){
+ global $lang;
+
+ SurveySetting::getInstance()->Init($this->anketa);
+
+ // Ugasnimo belezenje vseh parapodatkov
+ SurveySetting::getInstance()->setSurveyMiscSetting('survey_ip', '1');
+ SurveySetting::getInstance()->setSurveyMiscSetting('survey_show_ip', '0');
+ SurveySetting::getInstance()->setSurveyMiscSetting('survey_browser', '1');
+ SurveySetting::getInstance()->setSurveyMiscSetting('survey_referal', '1');
+ SurveySetting::getInstance()->setSurveyMiscSetting('survey_date', '1');
+
+ // Vklopimo email vabila
+ sisplet_query("UPDATE srv_anketa SET user_base='1', show_email='0' WHERE id='".$this->anketa."'");
+ sisplet_query("INSERT INTO srv_anketa_module (ank_id, modul) VALUES ('".$this->anketa."', 'email')");
+
+ // Ugasnemo obvescanje respondenta
+ sisplet_query("UPDATE srv_alert SET finish_respondent='0', finish_respondent_cms='0' WHERE ank_id='".$this->anketa."'");
+ }
+
+ // Nastavitve volitev
+ public function displaySettings(){
+ global $lang;
+
+ echo '<fieldset><legend>'.$lang['settings'].'</legend>';
+
+ echo '<br>';
+
+ echo $lang['srv_voting_edit1'].' <a href="index.php?anketa='.$this->anketa.'&amp;a='.A_BRANCHING.'"><span class="bold">'.$lang['srv_voting_edit2'].'</span></a>.';
+
+ echo '<br><br>';
+
+ echo $lang['srv_voting_invitations1'].' <a href="index.php?anketa='.$this->anketa.'&amp;a='.A_INVITATIONS.'"><span class="bold">'.$lang['srv_voting_invitations2'].'</span></a>.';
+
+ echo '<br><br>';
+
+ echo '</fieldset>';
+ }
+
+ // Pridobimo trenutne nastavitve volitev za anketo
+ private function getSettings(){
+
+ $settings = array();
+
+ return $settings;
+ }
+
+} \ No newline at end of file