Loco Translate - Version 2.5.3

Version Description

  • Adds option to merge JSON translations when syncing from PO
  • Adds screen for editing file headers and sync options
  • Fix for missing responseText in failed Ajax responses
  • Fix for HTML entities returned from number_format_i18n
  • Localized number formatting in JavaScript
  • Replaced usage of date_i18n with wp_date
  • Added configurable API endpoint for DeepL
  • Bumped WordPress version to 5.7.2
Download this release

Release Info

Developer timwhitlock
Plugin Icon 128x128 Loco Translate
Version 2.5.3
Comparing to
See all releases

Code changes from version 2.5.2 to 2.5.3

Files changed (65) hide show
  1. languages/loco-translate.pot +112 -91
  2. lib/compiled/gettext.php +7 -7
  3. lib/data/locales.php +1 -1
  4. loco.php +2 -2
  5. pub/css/admin.css +1 -1
  6. pub/css/editor.css +1 -1
  7. pub/css/fileinfo.css +1 -1
  8. pub/css/podiff.css +1 -1
  9. pub/css/poview.css +1 -1
  10. pub/css/skins/blue.css +1 -1
  11. pub/css/skins/coffee.css +1 -1
  12. pub/css/skins/ectoplasm.css +1 -1
  13. pub/css/skins/light.css +1 -1
  14. pub/css/skins/midnight.css +1 -1
  15. pub/css/skins/modern.css +1 -1
  16. pub/css/skins/ocean.css +1 -1
  17. pub/css/skins/sunrise.css +1 -1
  18. pub/js/min/admin.js +4914 -196
  19. pub/js/min/config.js +32 -1
  20. pub/js/min/debug.js +31 -1
  21. pub/js/min/delete.js +4 -1
  22. pub/js/min/editor.js +354 -1
  23. pub/js/min/head.js +4 -0
  24. pub/js/min/move.js +17 -1
  25. pub/js/min/podiff.js +44 -1
  26. pub/js/min/poinit.js +85 -1
  27. pub/js/min/potinit.js +10 -1
  28. pub/js/min/poview.js +37 -1
  29. pub/js/min/setup.js +51 -1
  30. pub/js/min/upload.js +47 -1
  31. readme.txt +13 -3
  32. src/admin/config/ApisController.php +1 -0
  33. src/admin/file/DiffController.php +3 -2
  34. src/admin/file/EditController.php +7 -9
  35. src/admin/file/HeadController.php +169 -0
  36. src/admin/file/InfoController.php +14 -10
  37. src/ajax/MsginitController.php +39 -24
  38. src/ajax/SyncController.php +16 -3
  39. src/api/Providers.php +1 -0
  40. src/cli/FetchCommand.php +1 -1
  41. src/cli/SyncCommand.php +12 -7
  42. src/compat/PosixExtension.php +7 -5
  43. src/data/Settings.php +2 -0
  44. src/error/AdminNotices.php +4 -6
  45. src/error/Exception.php +34 -2
  46. src/fs/Directory.php +1 -3
  47. src/fs/File.php +4 -5
  48. src/fs/Siblings.php +5 -5
  49. src/gettext/Compiler.php +1 -1
  50. src/gettext/Data.php +4 -3
  51. src/gettext/Matcher.php +136 -1
  52. src/gettext/SyncOptions.php +100 -0
  53. src/hooks/LoadHelper.php +2 -1
  54. src/js/Strings.php +4 -0
  55. src/mvc/AdminController.php +6 -1
  56. src/mvc/AdminRouter.php +1 -0
  57. src/mvc/Controller.php +9 -0
  58. src/mvc/FileParams.php +1 -1
  59. src/mvc/ViewParams.php +19 -14
  60. src/test/WordPressTestCase.php +1 -1
  61. tpl/admin/config/apis.php +6 -0
  62. tpl/admin/file/conf.php +63 -0
  63. tpl/admin/file/head.php +39 -0
  64. tpl/admin/file/info-po.php +1 -0
  65. tpl/admin/init/init-po.php +13 -3
languages/loco-translate.pot CHANGED
@@ -1,9 +1,9 @@
1
  #, fuzzy
2
  msgid ""
3
  msgstr ""
4
- "Project-Id-Version: Loco Translate 2.5.2\n"
5
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/loco-translate/\n"
6
- "POT-Creation-Date: 2021-03-11 09:51+0000\n"
7
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
8
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
9
  "Language-Team: \n"
@@ -13,7 +13,7 @@ msgstr ""
13
  "Content-Type: text/plain; charset=UTF-8\n"
14
  "Content-Transfer-Encoding: 8bit\n"
15
  "X-Generator: Loco https://localise.biz/\n"
16
- "X-Loco-Version: 2.5.2; wp-5.7\n"
17
  "X-Domain: loco-translate"
18
 
19
  #: src/fs/FileWriter.php:214
@@ -26,7 +26,7 @@ msgid "\"Hello Dolly\" is part of the WordPress core"
26
  msgstr ""
27
 
28
  #. (1) Number of files (2) Maximum size of file that will be included (3) Size of the largest encountered
29
- #: src/ajax/SyncController.php:86
30
  #, php-format
31
  msgid ""
32
  "%1$s file has been skipped because it's %3$s. (Max is %2$s). Check all "
@@ -54,7 +54,7 @@ msgstr[0] ""
54
  msgstr[1] ""
55
 
56
  #. 1: Number of strings; 2: Service provider; e.g. "50 strings translated via Google Translate"
57
- #: src/js/Strings.php:58
58
  #, javascript-format
59
  msgid "%1$s string translated via %2$s"
60
  msgid_plural "%1$s strings translated via %2$s"
@@ -67,7 +67,7 @@ msgid "%s already exists in this folder"
67
  msgstr ""
68
 
69
  #. characters meaning individual unicode characters of source text
70
- #: src/js/Strings.php:47
71
  #, javascript-format
72
  msgid "%s characters will be sent for translation."
73
  msgstr ""
@@ -107,13 +107,13 @@ msgstr[0] ""
107
  msgstr[1] ""
108
 
109
  #. Where %s is either PO or POT
110
- #: src/gettext/Compiler.php:239
111
  #, php-format
112
  msgid "%s file saved"
113
  msgstr ""
114
 
115
  #. Shows number of fuzzy strings at top of editor
116
- #: src/js/Strings.php:91 src/gettext/Metadata.php:206
117
  #, javascript-format
118
  msgid "%s fuzzy"
119
  msgstr ""
@@ -156,7 +156,7 @@ msgstr[1] ""
156
 
157
  #. Shows total string count at top of editor
158
  #. Where %s is any number of strings
159
- #: src/js/Strings.php:83 src/gettext/Metadata.php:194
160
  #, javascript-format
161
  msgid "%s string"
162
  msgid_plural "%s strings"
@@ -171,20 +171,28 @@ msgid_plural "%s strings marked Fuzzy"
171
  msgstr[0] ""
172
  msgstr[1] ""
173
 
174
- #: src/js/Strings.php:61
175
  #, javascript-format
176
  msgid "%s string updated"
177
  msgid_plural "%s strings updated"
178
  msgstr[0] ""
179
  msgstr[1] ""
180
 
181
- #: src/js/Strings.php:43
 
 
 
 
 
 
 
 
182
  #, javascript-format
183
  msgid "%s unique source strings."
184
  msgstr ""
185
 
186
  #. Shows number of untranslated strings at top of editor
187
- #: src/js/Strings.php:95 src/gettext/Metadata.php:209
188
  #, javascript-format
189
  msgid "%s untranslated"
190
  msgstr ""
@@ -197,7 +205,7 @@ msgstr[0] ""
197
  msgstr[1] ""
198
 
199
  #. Shows percentage translated at top of editor
200
- #: src/js/Strings.php:87 src/gettext/Metadata.php:204
201
  #, javascript-format
202
  msgid "%s%% translated"
203
  msgstr ""
@@ -245,7 +253,8 @@ msgid ""
245
  "privacy notice</a>."
246
  msgstr ""
247
 
248
- #: src/admin/bundle/BaseController.php:110 tpl/admin/file/move.php:26
 
249
  msgid "Advanced"
250
  msgstr ""
251
 
@@ -289,10 +298,14 @@ msgstr ""
289
  msgid "API keys"
290
  msgstr ""
291
 
292
- #: src/admin/config/ApisController.php:66
293
  msgid "API region"
294
  msgstr ""
295
 
 
 
 
 
296
  #: tpl/admin/file/delete.php:16
297
  msgid ""
298
  "Are you sure you want to <strong>permanently</strong> delete the following "
@@ -321,7 +334,7 @@ msgid ""
321
  "editor"
322
  msgstr ""
323
 
324
- #: tpl/admin/file/info-po.php:46
325
  msgid "Binary file missing"
326
  msgstr ""
327
 
@@ -368,7 +381,7 @@ msgstr ""
368
  msgid "Check config repository"
369
  msgstr ""
370
 
371
- #: src/js/Strings.php:113
372
  msgid "Check console output for debugging information"
373
  msgstr ""
374
 
@@ -456,7 +469,7 @@ msgstr ""
456
  msgid "Copy"
457
  msgstr ""
458
 
459
- #: tpl/admin/init/init-po.php:147
460
  #, php-format
461
  msgid "Copy target translations from \"%s\""
462
  msgstr ""
@@ -525,9 +538,9 @@ msgstr ""
525
  msgid "Disallow"
526
  msgstr ""
527
 
528
- #: src/data/Settings.php:176 src/admin/file/EditController.php:164
529
  #: src/admin/bundle/LocaleController.php:130 tpl/admin/config/settings.php:234
530
- #: tpl/admin/config/apis.php:122 tpl/admin/config/prefs.php:45
531
  #: tpl/admin/common/inc-fsconn.php:16 tpl/admin/common/inc-fsconn.php:41
532
  #: tpl/admin/errors/no-backups.php:22
533
  msgid "Documentation"
@@ -572,137 +585,137 @@ msgid "Editor"
572
  msgstr ""
573
 
574
  #. Where %s is the name of the language, e.g. "French translation"
575
- #: src/js/Strings.php:127
576
  #, javascript-format
577
  msgctxt "Editor"
578
  msgid "%s translation"
579
  msgstr ""
580
 
581
  #. button for adding a new string when manually editing a POT file
582
- #: src/admin/file/EditController.php:189
583
  msgctxt "Editor"
584
  msgid "Add"
585
  msgstr ""
586
 
587
  #. Button that opens window for auto-translating
588
- #: src/admin/file/EditController.php:200
589
  msgctxt "Editor"
590
  msgid "Auto"
591
  msgstr ""
592
 
593
  #. Label for the window pane for entering translator comments
594
- #: src/js/Strings.php:133
595
  msgctxt "Editor"
596
  msgid "Comments"
597
  msgstr ""
598
 
599
  #. Label for the window pane holding message context
600
- #: src/js/Strings.php:130
601
  msgctxt "Editor"
602
  msgid "Context"
603
  msgstr ""
604
 
605
  #. Label for the context window when no translation selected
606
- #: src/js/Strings.php:157
607
  msgctxt "Editor"
608
  msgid "Context not loaded"
609
  msgstr ""
610
 
611
  #. Button for downloading a PO, MO or POT file
612
- #: src/admin/file/EditController.php:202
613
  msgctxt "Editor"
614
  msgid "Download"
615
  msgstr ""
616
 
617
  #. Label for the plural form of the original English text
618
- #: src/js/Strings.php:139
619
  msgctxt "Editor"
620
  msgid "Plural"
621
  msgstr ""
622
 
623
  #. button for removing a string when manually editing a POT file
624
- #: src/admin/file/EditController.php:191
625
  msgctxt "Editor"
626
  msgid "Remove"
627
  msgstr ""
628
 
629
  #. Button that reloads current screen
630
- #: src/admin/file/EditController.php:198
631
  msgctxt "Editor"
632
  msgid "Revert"
633
  msgstr ""
634
 
635
  #. Button that saves translations to disk
636
- #: src/admin/file/EditController.php:194
637
  msgctxt "Editor"
638
  msgid "Save"
639
  msgstr ""
640
 
641
  #. Label for the singular form of the original English text
642
- #: src/js/Strings.php:136
643
  msgctxt "Editor"
644
  msgid "Single"
645
  msgstr ""
646
 
647
  #. Label for the window pane holding the original English text
648
  #. List heading showing preview of English text for each item
649
- #: src/js/Strings.php:123 tpl/admin/file/info-pot.php:30
650
  msgctxt "Editor"
651
  msgid "Source text"
652
  msgstr ""
653
 
654
  #. Label for the source text window when no translation selected
655
- #: src/js/Strings.php:154
656
  msgctxt "Editor"
657
  msgid "Source text not loaded"
658
  msgstr ""
659
 
660
- #: src/js/Strings.php:151
661
  msgctxt "Editor"
662
  msgid "Suggest translation"
663
  msgstr ""
664
 
665
  #. Button that runs in-editor sync/operation
666
- #: src/admin/file/EditController.php:196
667
  msgctxt "Editor"
668
  msgid "Sync"
669
  msgstr ""
670
 
671
  #. Button that toggles between "code" and regular text editing modes
672
- #: src/admin/file/EditController.php:208
673
  msgctxt "Editor"
674
  msgid "Toggle code view"
675
  msgstr ""
676
 
677
- #: src/js/Strings.php:148
678
  msgctxt "Editor"
679
  msgid "Toggle Fuzzy"
680
  msgstr ""
681
 
682
  #. Button that toggles invisible characters
683
- #: src/admin/file/EditController.php:206
684
  msgctxt "Editor"
685
  msgid "Toggle invisibles"
686
  msgstr ""
687
 
688
- #: src/js/Strings.php:145
689
  msgctxt "Editor"
690
  msgid "Translated"
691
  msgstr ""
692
 
693
  #. List heading showing preview of translated text for each item
694
- #: src/js/Strings.php:163
695
  msgctxt "Editor"
696
  msgid "Translation"
697
  msgstr ""
698
 
699
  #. Label for the translation editing window when no translation selected
700
- #: src/js/Strings.php:160
701
  msgctxt "Editor"
702
  msgid "Translation not loaded"
703
  msgstr ""
704
 
705
- #: src/js/Strings.php:142
706
  msgctxt "Editor"
707
  msgid "Untranslated"
708
  msgstr ""
@@ -721,7 +734,7 @@ msgstr ""
721
  msgid "Enter a new location for this file"
722
  msgstr ""
723
 
724
- #: src/js/Strings.php:98 src/error/Exception.php:158
725
  msgid "Error"
726
  msgstr ""
727
 
@@ -800,7 +813,7 @@ msgid_plural "%u files deleted"
800
  msgstr[0] ""
801
  msgstr[1] ""
802
 
803
- #: src/admin/file/InfoController.php:167
804
  msgid "File does not have a valid header"
805
  msgstr ""
806
 
@@ -854,7 +867,7 @@ msgid "File modification is disallowed by your WordPress config"
854
  msgstr ""
855
 
856
  #: tpl/admin/file/info-mo.php:21 tpl/admin/file/info-pot.php:24
857
- #: tpl/admin/file/info-po.php:26
858
  msgid "File modified"
859
  msgstr ""
860
 
@@ -871,7 +884,7 @@ msgid "File restored"
871
  msgstr ""
872
 
873
  #: tpl/admin/file/info-mo.php:18 tpl/admin/file/info-pot.php:21
874
- #: tpl/admin/file/info-po.php:23
875
  msgid "File size"
876
  msgstr ""
877
 
@@ -895,7 +908,7 @@ msgid ""
895
  msgstr ""
896
 
897
  #. Placeholder text for text filter above editor
898
- #: src/admin/file/EditController.php:204
899
  msgid "Filter translations"
900
  msgstr ""
901
 
@@ -950,7 +963,7 @@ msgstr ""
950
  msgid "Grant access to roles"
951
  msgstr ""
952
 
953
- #: src/ajax/ApisController.php:26 src/admin/file/EditController.php:192
954
  msgid "Help"
955
  msgstr ""
956
 
@@ -986,11 +999,11 @@ msgstr ""
986
  msgid "Import config from XML"
987
  msgstr ""
988
 
989
- #: tpl/admin/config/apis.php:112
990
  msgid "Important"
991
  msgstr ""
992
 
993
- #: tpl/admin/file/info-po.php:59
994
  msgid "In sync with template"
995
  msgstr ""
996
 
@@ -1041,7 +1054,7 @@ msgstr ""
1041
  msgid "JSON compilation failed for %s"
1042
  msgstr ""
1043
 
1044
- #: tpl/admin/init/init-po.php:153
1045
  msgid "Just copy English source strings"
1046
  msgstr ""
1047
 
@@ -1050,7 +1063,7 @@ msgstr ""
1050
  msgid "Just now"
1051
  msgstr ""
1052
 
1053
- #: src/js/Strings.php:76
1054
  msgid "Keep this translation"
1055
  msgstr ""
1056
 
@@ -1058,7 +1071,7 @@ msgstr ""
1058
  msgid "Language"
1059
  msgstr ""
1060
 
1061
- #: src/admin/file/InfoController.php:174
1062
  #, php-format
1063
  msgid "Language header is \"%s\" but file name contains \"%s\""
1064
  msgstr ""
@@ -1087,7 +1100,7 @@ msgstr ""
1087
  msgid "Last modified"
1088
  msgstr ""
1089
 
1090
- #: tpl/admin/file/info-mo.php:24 tpl/admin/file/info-po.php:29
1091
  msgid "Last translation"
1092
  msgstr ""
1093
 
@@ -1095,7 +1108,7 @@ msgstr ""
1095
  msgid "Load config"
1096
  msgstr ""
1097
 
1098
- #: src/js/Strings.php:73
1099
  msgid "Loading suggestions"
1100
  msgstr ""
1101
 
@@ -1135,7 +1148,7 @@ msgstr ""
1135
  msgid "Loco Translate %s"
1136
  msgstr ""
1137
 
1138
- #: src/data/Settings.php:175
1139
  msgid "Loco Translate 2.5 adds supports for JSON language pack generation."
1140
  msgstr ""
1141
 
@@ -1163,6 +1176,10 @@ msgstr ""
1163
  msgid "Maximum line length (zero disables wrapping)"
1164
  msgstr ""
1165
 
 
 
 
 
1166
  #. Where %s is the name of the POT template file. Message appears after sync
1167
  #: src/js/Strings.php:18
1168
  #, javascript-format
@@ -1174,7 +1191,7 @@ msgstr ""
1174
  msgid "Merged from source code"
1175
  msgstr ""
1176
 
1177
- #: tpl/admin/file/info-po.php:83
1178
  msgid "Missing template"
1179
  msgstr ""
1180
 
@@ -1282,11 +1299,11 @@ msgstr ""
1282
  msgid "Nothing matches the text filter"
1283
  msgstr ""
1284
 
1285
- #: src/js/Strings.php:64
1286
  msgid "Nothing needed updating"
1287
  msgstr ""
1288
 
1289
- #: src/js/Strings.php:104 src/error/Notice.php:20
1290
  #: tpl/admin/common/inc-fsconn.php:37
1291
  msgid "Notice"
1292
  msgstr ""
@@ -1303,7 +1320,7 @@ msgstr ""
1303
  msgid "Official plugin page"
1304
  msgstr ""
1305
 
1306
- #: src/js/Strings.php:107 src/error/Success.php:19
1307
  msgid "OK"
1308
  msgstr ""
1309
 
@@ -1311,7 +1328,7 @@ msgstr ""
1311
  msgid "OK, Load this config"
1312
  msgstr ""
1313
 
1314
- #: tpl/admin/file/info-po.php:70
1315
  msgid "Out of sync with template"
1316
  msgstr ""
1317
 
@@ -1323,7 +1340,7 @@ msgstr ""
1323
  msgid "Overwrite existing translations"
1324
  msgstr ""
1325
 
1326
- #: src/mvc/AdminRouter.php:240
1327
  msgid "Page not found"
1328
  msgstr ""
1329
 
@@ -1422,7 +1439,7 @@ msgid "Zero"
1422
  msgstr ""
1423
 
1424
  #. Where %s is the name of a template file
1425
- #: tpl/admin/file/info-po.php:74
1426
  #, php-format
1427
  msgid ""
1428
  "PO file has different source strings to \"%s\". Try running Sync before "
@@ -1430,7 +1447,7 @@ msgid ""
1430
  msgstr ""
1431
 
1432
  #. Where %s is the name of a template file
1433
- #: tpl/admin/file/info-po.php:63
1434
  #, php-format
1435
  msgid "PO file has the same source strings as \"%s\""
1436
  msgstr ""
@@ -1459,7 +1476,7 @@ msgstr ""
1459
  msgid "Project name"
1460
  msgstr ""
1461
 
1462
- #: src/js/Strings.php:116
1463
  msgid "Provide the following text when reporting a problem"
1464
  msgstr ""
1465
 
@@ -1515,6 +1532,10 @@ msgstr ""
1515
  msgid "Running plugins:"
1516
  msgstr ""
1517
 
 
 
 
 
1518
  #: tpl/admin/bundle/conf.php:141
1519
  msgid "Save config"
1520
  msgstr ""
@@ -1523,7 +1544,7 @@ msgstr ""
1523
  msgid "Save credentials in session"
1524
  msgstr ""
1525
 
1526
- #: tpl/admin/config/settings.php:233 tpl/admin/config/apis.php:121
1527
  #: tpl/admin/config/prefs.php:44
1528
  msgid "Save settings"
1529
  msgstr ""
@@ -1560,12 +1581,12 @@ msgstr ""
1560
  msgid "See FAQ"
1561
  msgstr ""
1562
 
1563
- #: tpl/admin/config/apis.php:115
1564
  msgid "See full disclaimer"
1565
  msgstr ""
1566
 
1567
  #. Generic error when external process broke an Ajax request
1568
- #: src/js/Strings.php:110
1569
  msgid "Server returned invalid data"
1570
  msgstr ""
1571
 
@@ -1580,7 +1601,7 @@ msgid "Sets"
1580
  msgstr ""
1581
 
1582
  #: src/mvc/AdminRouter.php:67 src/mvc/AdminRouter.php:72
1583
- #: tpl/ajax/modal-apis-empty.php:15 src/admin/file/EditController.php:163
1584
  #: tpl/admin/common/inc-fsconn.php:18 tpl/admin/common/inc-fsconn.php:43
1585
  #: tpl/admin/errors/no-backups.php:24
1586
  msgid "Settings"
@@ -1633,18 +1654,18 @@ msgstr ""
1633
  msgid "Source files to scan:"
1634
  msgstr ""
1635
 
1636
- #: tpl/admin/init/init-po.php:173
1637
  msgid "Start translating"
1638
  msgstr ""
1639
 
1640
  #. Message appears after sync operation, where %s refers to a POT file.
1641
- #: src/js/Strings.php:37
1642
  #, javascript-format
1643
  msgid "Strings up to date with %s"
1644
  msgstr ""
1645
 
1646
  #. Message appears after sync operation.
1647
- #: src/js/Strings.php:40
1648
  msgid "Strings up to date with source code"
1649
  msgstr ""
1650
 
@@ -1652,7 +1673,7 @@ msgstr ""
1652
  msgid "Strings will be extracted to:"
1653
  msgstr ""
1654
 
1655
- #: src/js/Strings.php:70
1656
  msgid "Suggested translations"
1657
  msgstr ""
1658
 
@@ -1695,7 +1716,7 @@ msgstr ""
1695
  msgid "Template missing"
1696
  msgstr ""
1697
 
1698
- #: tpl/admin/init/init-po.php:136
1699
  msgid "Template options"
1700
  msgstr ""
1701
 
@@ -1737,7 +1758,7 @@ msgid "The namespace into which WordPress will load translated strings"
1737
  msgstr ""
1738
 
1739
  #. used when user name of web server process is unknown
1740
- #: src/compat/PosixExtension.php:109
1741
  msgid "the web server"
1742
  msgstr ""
1743
 
@@ -1756,13 +1777,13 @@ msgid ""
1756
  "These plugins have recently loaded translation files into the admin area"
1757
  msgstr ""
1758
 
1759
- #: tpl/admin/file/info-po.php:87
1760
  msgid ""
1761
  "These translations are not linked to a POT file. Sync operations will "
1762
  "extract strings directly from source code."
1763
  msgstr ""
1764
 
1765
- #: tpl/admin/config/apis.php:114
1766
  msgid ""
1767
  "Third party services are subject to their own terms of use and may incur "
1768
  "costs from the provider"
@@ -1845,7 +1866,7 @@ msgid "This information is for developers to find problems in the bundle setup"
1845
  msgstr ""
1846
 
1847
  #. Warning when POT file is opened in the file editor. It can be disabled in settings.
1848
- #: src/admin/file/EditController.php:162
1849
  msgid ""
1850
  "This is NOT a translation file. Manual editing of source strings is not "
1851
  "recommended."
@@ -1905,31 +1926,31 @@ msgstr ""
1905
  msgid "Translate themes and plugins directly in WordPress"
1906
  msgstr ""
1907
 
1908
- #: src/js/Strings.php:54
1909
  #, javascript-format
1910
  msgid "Translation job aborted with %s string remaining"
1911
  msgid_plural "Translation job aborted with %s strings remaining"
1912
  msgstr[0] ""
1913
  msgstr[1] ""
1914
 
1915
- #: tpl/admin/file/info-po.php:32 tpl/admin/bundle/inc-po-table.php:16
1916
  #: tpl/admin/bundle/locale.php:36
1917
  msgid "Translation progress"
1918
  msgstr ""
1919
 
1920
  #. %s%% is a percentage, e.g. 50%
1921
- #: src/js/Strings.php:51
1922
  #, javascript-format
1923
  msgid "Translation progress %s%%"
1924
  msgstr ""
1925
 
1926
  #. Where %s is the name of the invalid POT file
1927
- #: src/ajax/SyncController.php:68 src/admin/file/EditController.php:124
1928
  #, php-format
1929
  msgid "Translation template is invalid (%s)"
1930
  msgstr ""
1931
 
1932
- #: src/admin/file/EditController.php:119
1933
  #, php-format
1934
  msgid "Translations don't match template. Run sync to update from %s"
1935
  msgstr ""
@@ -1954,11 +1975,11 @@ msgstr ""
1954
  msgid "Unexpected file type"
1955
  msgstr ""
1956
 
1957
- #: src/package/Header.php:86 src/admin/file/InfoController.php:136
1958
  msgid "Unknown author"
1959
  msgstr ""
1960
 
1961
- #: src/js/Strings.php:119
1962
  msgid "Unknown error"
1963
  msgstr ""
1964
 
@@ -1983,11 +2004,11 @@ msgstr ""
1983
  msgid "Upload PO file"
1984
  msgstr ""
1985
 
1986
- #: tpl/admin/init/init-po.php:163
1987
  msgid "Use this file as template when running Sync"
1988
  msgstr ""
1989
 
1990
- #: src/js/Strings.php:67
1991
  msgid "Use this translation"
1992
  msgstr ""
1993
 
@@ -2034,11 +2055,11 @@ msgstr ""
2034
  msgid "Visit official site"
2035
  msgstr ""
2036
 
2037
- #: src/js/Strings.php:101 src/error/Warning.php:19
2038
  msgid "Warning"
2039
  msgstr ""
2040
 
2041
- #: tpl/admin/file/info-po.php:49
2042
  msgid "We can't find the binary MO file that belongs with these translations"
2043
  msgstr ""
2044
 
@@ -2150,7 +2171,7 @@ msgid "Your admin language is %s."
2150
  msgstr ""
2151
 
2152
  #. Warning appears when user tries to refresh or navigate away when editor work is unsaved
2153
- #: src/js/Strings.php:79
2154
  msgid "Your changes will be lost if you continue without saving"
2155
  msgstr ""
2156
 
1
  #, fuzzy
2
  msgid ""
3
  msgstr ""
4
+ "Project-Id-Version: Loco Translate 2.5.3\n"
5
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/loco-translate/\n"
6
+ "POT-Creation-Date: 2021-06-22 10:49+0000\n"
7
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
8
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
9
  "Language-Team: \n"
13
  "Content-Type: text/plain; charset=UTF-8\n"
14
  "Content-Transfer-Encoding: 8bit\n"
15
  "X-Generator: Loco https://localise.biz/\n"
16
+ "X-Loco-Version: 2.5.3; wp-5.7.2\n"
17
  "X-Domain: loco-translate"
18
 
19
  #: src/fs/FileWriter.php:214
26
  msgstr ""
27
 
28
  #. (1) Number of files (2) Maximum size of file that will be included (3) Size of the largest encountered
29
+ #: src/ajax/SyncController.php:98
30
  #, php-format
31
  msgid ""
32
  "%1$s file has been skipped because it's %3$s. (Max is %2$s). Check all "
54
  msgstr[1] ""
55
 
56
  #. 1: Number of strings; 2: Service provider; e.g. "50 strings translated via Google Translate"
57
+ #: src/js/Strings.php:62
58
  #, javascript-format
59
  msgid "%1$s string translated via %2$s"
60
  msgid_plural "%1$s strings translated via %2$s"
67
  msgstr ""
68
 
69
  #. characters meaning individual unicode characters of source text
70
+ #: src/js/Strings.php:51
71
  #, javascript-format
72
  msgid "%s characters will be sent for translation."
73
  msgstr ""
107
  msgstr[1] ""
108
 
109
  #. Where %s is either PO or POT
110
+ #: src/gettext/Compiler.php:239 src/admin/file/HeadController.php:80
111
  #, php-format
112
  msgid "%s file saved"
113
  msgstr ""
114
 
115
  #. Shows number of fuzzy strings at top of editor
116
+ #: src/js/Strings.php:95 src/gettext/Metadata.php:206
117
  #, javascript-format
118
  msgid "%s fuzzy"
119
  msgstr ""
156
 
157
  #. Shows total string count at top of editor
158
  #. Where %s is any number of strings
159
+ #: src/js/Strings.php:87 src/gettext/Metadata.php:194
160
  #, javascript-format
161
  msgid "%s string"
162
  msgid_plural "%s strings"
171
  msgstr[0] ""
172
  msgstr[1] ""
173
 
174
+ #: src/js/Strings.php:65
175
  #, javascript-format
176
  msgid "%s string updated"
177
  msgid_plural "%s strings updated"
178
  msgstr[0] ""
179
  msgstr[1] ""
180
 
181
+ #. Summary of translations copied from a PO file during Sync
182
+ #: src/js/Strings.php:37
183
+ #, javascript-format
184
+ msgid "%s translation copied"
185
+ msgid_plural "%s translations copied"
186
+ msgstr[0] ""
187
+ msgstr[1] ""
188
+
189
+ #: src/js/Strings.php:47
190
  #, javascript-format
191
  msgid "%s unique source strings."
192
  msgstr ""
193
 
194
  #. Shows number of untranslated strings at top of editor
195
+ #: src/js/Strings.php:99 src/gettext/Metadata.php:209
196
  #, javascript-format
197
  msgid "%s untranslated"
198
  msgstr ""
205
  msgstr[1] ""
206
 
207
  #. Shows percentage translated at top of editor
208
+ #: src/js/Strings.php:91 src/gettext/Metadata.php:204
209
  #, javascript-format
210
  msgid "%s%% translated"
211
  msgstr ""
253
  "privacy notice</a>."
254
  msgstr ""
255
 
256
+ #: src/admin/bundle/BaseController.php:110 tpl/admin/file/conf.php:58
257
+ #: tpl/admin/file/move.php:26
258
  msgid "Advanced"
259
  msgstr ""
260
 
298
  msgid "API keys"
299
  msgstr ""
300
 
301
+ #: src/admin/config/ApisController.php:67
302
  msgid "API region"
303
  msgstr ""
304
 
305
+ #: src/admin/config/ApisController.php:66
306
+ msgid "API URL"
307
+ msgstr ""
308
+
309
  #: tpl/admin/file/delete.php:16
310
  msgid ""
311
  "Are you sure you want to <strong>permanently</strong> delete the following "
334
  "editor"
335
  msgstr ""
336
 
337
+ #: tpl/admin/file/info-po.php:47
338
  msgid "Binary file missing"
339
  msgstr ""
340
 
381
  msgid "Check config repository"
382
  msgstr ""
383
 
384
+ #: src/js/Strings.php:117
385
  msgid "Check console output for debugging information"
386
  msgstr ""
387
 
469
  msgid "Copy"
470
  msgstr ""
471
 
472
+ #: tpl/admin/init/init-po.php:147 tpl/admin/file/conf.php:32
473
  #, php-format
474
  msgid "Copy target translations from \"%s\""
475
  msgstr ""
538
  msgid "Disallow"
539
  msgstr ""
540
 
541
+ #: src/data/Settings.php:178 src/admin/file/EditController.php:161
542
  #: src/admin/bundle/LocaleController.php:130 tpl/admin/config/settings.php:234
543
+ #: tpl/admin/config/apis.php:128 tpl/admin/config/prefs.php:45
544
  #: tpl/admin/common/inc-fsconn.php:16 tpl/admin/common/inc-fsconn.php:41
545
  #: tpl/admin/errors/no-backups.php:22
546
  msgid "Documentation"
585
  msgstr ""
586
 
587
  #. Where %s is the name of the language, e.g. "French translation"
588
+ #: src/js/Strings.php:131
589
  #, javascript-format
590
  msgctxt "Editor"
591
  msgid "%s translation"
592
  msgstr ""
593
 
594
  #. button for adding a new string when manually editing a POT file
595
+ #: src/admin/file/EditController.php:187
596
  msgctxt "Editor"
597
  msgid "Add"
598
  msgstr ""
599
 
600
  #. Button that opens window for auto-translating
601
+ #: src/admin/file/EditController.php:198
602
  msgctxt "Editor"
603
  msgid "Auto"
604
  msgstr ""
605
 
606
  #. Label for the window pane for entering translator comments
607
+ #: src/js/Strings.php:137
608
  msgctxt "Editor"
609
  msgid "Comments"
610
  msgstr ""
611
 
612
  #. Label for the window pane holding message context
613
+ #: src/js/Strings.php:134
614
  msgctxt "Editor"
615
  msgid "Context"
616
  msgstr ""
617
 
618
  #. Label for the context window when no translation selected
619
+ #: src/js/Strings.php:161
620
  msgctxt "Editor"
621
  msgid "Context not loaded"
622
  msgstr ""
623
 
624
  #. Button for downloading a PO, MO or POT file
625
+ #: src/admin/file/EditController.php:200
626
  msgctxt "Editor"
627
  msgid "Download"
628
  msgstr ""
629
 
630
  #. Label for the plural form of the original English text
631
+ #: src/js/Strings.php:143
632
  msgctxt "Editor"
633
  msgid "Plural"
634
  msgstr ""
635
 
636
  #. button for removing a string when manually editing a POT file
637
+ #: src/admin/file/EditController.php:189
638
  msgctxt "Editor"
639
  msgid "Remove"
640
  msgstr ""
641
 
642
  #. Button that reloads current screen
643
+ #: src/admin/file/EditController.php:196
644
  msgctxt "Editor"
645
  msgid "Revert"
646
  msgstr ""
647
 
648
  #. Button that saves translations to disk
649
+ #: src/admin/file/EditController.php:192
650
  msgctxt "Editor"
651
  msgid "Save"
652
  msgstr ""
653
 
654
  #. Label for the singular form of the original English text
655
+ #: src/js/Strings.php:140
656
  msgctxt "Editor"
657
  msgid "Single"
658
  msgstr ""
659
 
660
  #. Label for the window pane holding the original English text
661
  #. List heading showing preview of English text for each item
662
+ #: src/js/Strings.php:127 tpl/admin/file/info-pot.php:30
663
  msgctxt "Editor"
664
  msgid "Source text"
665
  msgstr ""
666
 
667
  #. Label for the source text window when no translation selected
668
+ #: src/js/Strings.php:158
669
  msgctxt "Editor"
670
  msgid "Source text not loaded"
671
  msgstr ""
672
 
673
+ #: src/js/Strings.php:155
674
  msgctxt "Editor"
675
  msgid "Suggest translation"
676
  msgstr ""
677
 
678
  #. Button that runs in-editor sync/operation
679
+ #: src/admin/file/EditController.php:194
680
  msgctxt "Editor"
681
  msgid "Sync"
682
  msgstr ""
683
 
684
  #. Button that toggles between "code" and regular text editing modes
685
+ #: src/admin/file/EditController.php:206
686
  msgctxt "Editor"
687
  msgid "Toggle code view"
688
  msgstr ""
689
 
690
+ #: src/js/Strings.php:152
691
  msgctxt "Editor"
692
  msgid "Toggle Fuzzy"
693
  msgstr ""
694
 
695
  #. Button that toggles invisible characters
696
+ #: src/admin/file/EditController.php:204
697
  msgctxt "Editor"
698
  msgid "Toggle invisibles"
699
  msgstr ""
700
 
701
+ #: src/js/Strings.php:149
702
  msgctxt "Editor"
703
  msgid "Translated"
704
  msgstr ""
705
 
706
  #. List heading showing preview of translated text for each item
707
+ #: src/js/Strings.php:167
708
  msgctxt "Editor"
709
  msgid "Translation"
710
  msgstr ""
711
 
712
  #. Label for the translation editing window when no translation selected
713
+ #: src/js/Strings.php:164
714
  msgctxt "Editor"
715
  msgid "Translation not loaded"
716
  msgstr ""
717
 
718
+ #: src/js/Strings.php:146
719
  msgctxt "Editor"
720
  msgid "Untranslated"
721
  msgstr ""
734
  msgid "Enter a new location for this file"
735
  msgstr ""
736
 
737
+ #: src/js/Strings.php:102 src/error/Exception.php:164
738
  msgid "Error"
739
  msgstr ""
740
 
813
  msgstr[0] ""
814
  msgstr[1] ""
815
 
816
+ #: src/admin/file/InfoController.php:170
817
  msgid "File does not have a valid header"
818
  msgstr ""
819
 
867
  msgstr ""
868
 
869
  #: tpl/admin/file/info-mo.php:21 tpl/admin/file/info-pot.php:24
870
+ #: tpl/admin/file/info-po.php:27
871
  msgid "File modified"
872
  msgstr ""
873
 
884
  msgstr ""
885
 
886
  #: tpl/admin/file/info-mo.php:18 tpl/admin/file/info-pot.php:21
887
+ #: tpl/admin/file/info-po.php:24
888
  msgid "File size"
889
  msgstr ""
890
 
908
  msgstr ""
909
 
910
  #. Placeholder text for text filter above editor
911
+ #: src/admin/file/EditController.php:202
912
  msgid "Filter translations"
913
  msgstr ""
914
 
963
  msgid "Grant access to roles"
964
  msgstr ""
965
 
966
+ #: src/ajax/ApisController.php:26 src/admin/file/EditController.php:190
967
  msgid "Help"
968
  msgstr ""
969
 
999
  msgid "Import config from XML"
1000
  msgstr ""
1001
 
1002
+ #: tpl/admin/config/apis.php:118
1003
  msgid "Important"
1004
  msgstr ""
1005
 
1006
+ #: tpl/admin/file/info-po.php:60
1007
  msgid "In sync with template"
1008
  msgstr ""
1009
 
1054
  msgid "JSON compilation failed for %s"
1055
  msgstr ""
1056
 
1057
+ #: tpl/admin/init/init-po.php:153 tpl/admin/file/conf.php:38
1058
  msgid "Just copy English source strings"
1059
  msgstr ""
1060
 
1063
  msgid "Just now"
1064
  msgstr ""
1065
 
1066
+ #: src/js/Strings.php:80
1067
  msgid "Keep this translation"
1068
  msgstr ""
1069
 
1071
  msgid "Language"
1072
  msgstr ""
1073
 
1074
+ #: src/admin/file/InfoController.php:177
1075
  #, php-format
1076
  msgid "Language header is \"%s\" but file name contains \"%s\""
1077
  msgstr ""
1100
  msgid "Last modified"
1101
  msgstr ""
1102
 
1103
+ #: tpl/admin/file/info-mo.php:24 tpl/admin/file/info-po.php:30
1104
  msgid "Last translation"
1105
  msgstr ""
1106
 
1108
  msgid "Load config"
1109
  msgstr ""
1110
 
1111
+ #: src/js/Strings.php:77
1112
  msgid "Loading suggestions"
1113
  msgstr ""
1114
 
1148
  msgid "Loco Translate %s"
1149
  msgstr ""
1150
 
1151
+ #: src/data/Settings.php:177
1152
  msgid "Loco Translate 2.5 adds supports for JSON language pack generation."
1153
  msgstr ""
1154
 
1176
  msgid "Maximum line length (zero disables wrapping)"
1177
  msgstr ""
1178
 
1179
+ #: tpl/admin/init/init-po.php:163 tpl/admin/file/conf.php:48
1180
+ msgid "Merge strings from related JSON files"
1181
+ msgstr ""
1182
+
1183
  #. Where %s is the name of the POT template file. Message appears after sync
1184
  #: src/js/Strings.php:18
1185
  #, javascript-format
1191
  msgid "Merged from source code"
1192
  msgstr ""
1193
 
1194
+ #: tpl/admin/file/info-po.php:84
1195
  msgid "Missing template"
1196
  msgstr ""
1197
 
1299
  msgid "Nothing matches the text filter"
1300
  msgstr ""
1301
 
1302
+ #: src/js/Strings.php:68
1303
  msgid "Nothing needed updating"
1304
  msgstr ""
1305
 
1306
+ #: src/js/Strings.php:108 src/error/Notice.php:20
1307
  #: tpl/admin/common/inc-fsconn.php:37
1308
  msgid "Notice"
1309
  msgstr ""
1320
  msgid "Official plugin page"
1321
  msgstr ""
1322
 
1323
+ #: src/js/Strings.php:111 src/error/Success.php:19
1324
  msgid "OK"
1325
  msgstr ""
1326
 
1328
  msgid "OK, Load this config"
1329
  msgstr ""
1330
 
1331
+ #: tpl/admin/file/info-po.php:71
1332
  msgid "Out of sync with template"
1333
  msgstr ""
1334
 
1340
  msgid "Overwrite existing translations"
1341
  msgstr ""
1342
 
1343
+ #: src/mvc/AdminRouter.php:241
1344
  msgid "Page not found"
1345
  msgstr ""
1346
 
1439
  msgstr ""
1440
 
1441
  #. Where %s is the name of a template file
1442
+ #: tpl/admin/file/info-po.php:75
1443
  #, php-format
1444
  msgid ""
1445
  "PO file has different source strings to \"%s\". Try running Sync before "
1447
  msgstr ""
1448
 
1449
  #. Where %s is the name of a template file
1450
+ #: tpl/admin/file/info-po.php:64
1451
  #, php-format
1452
  msgid "PO file has the same source strings as \"%s\""
1453
  msgstr ""
1476
  msgid "Project name"
1477
  msgstr ""
1478
 
1479
+ #: src/js/Strings.php:120
1480
  msgid "Provide the following text when reporting a problem"
1481
  msgstr ""
1482
 
1532
  msgid "Running plugins:"
1533
  msgstr ""
1534
 
1535
+ #: tpl/admin/file/conf.php:57 tpl/admin/file/head.php:34
1536
+ msgid "Save"
1537
+ msgstr ""
1538
+
1539
  #: tpl/admin/bundle/conf.php:141
1540
  msgid "Save config"
1541
  msgstr ""
1544
  msgid "Save credentials in session"
1545
  msgstr ""
1546
 
1547
+ #: tpl/admin/config/settings.php:233 tpl/admin/config/apis.php:127
1548
  #: tpl/admin/config/prefs.php:44
1549
  msgid "Save settings"
1550
  msgstr ""
1581
  msgid "See FAQ"
1582
  msgstr ""
1583
 
1584
+ #: tpl/admin/config/apis.php:121
1585
  msgid "See full disclaimer"
1586
  msgstr ""
1587
 
1588
  #. Generic error when external process broke an Ajax request
1589
+ #: src/js/Strings.php:114
1590
  msgid "Server returned invalid data"
1591
  msgstr ""
1592
 
1601
  msgstr ""
1602
 
1603
  #: src/mvc/AdminRouter.php:67 src/mvc/AdminRouter.php:72
1604
+ #: tpl/ajax/modal-apis-empty.php:15 src/admin/file/EditController.php:160
1605
  #: tpl/admin/common/inc-fsconn.php:18 tpl/admin/common/inc-fsconn.php:43
1606
  #: tpl/admin/errors/no-backups.php:24
1607
  msgid "Settings"
1654
  msgid "Source files to scan:"
1655
  msgstr ""
1656
 
1657
+ #: tpl/admin/init/init-po.php:183
1658
  msgid "Start translating"
1659
  msgstr ""
1660
 
1661
  #. Message appears after sync operation, where %s refers to a POT file.
1662
+ #: src/js/Strings.php:41
1663
  #, javascript-format
1664
  msgid "Strings up to date with %s"
1665
  msgstr ""
1666
 
1667
  #. Message appears after sync operation.
1668
+ #: src/js/Strings.php:44
1669
  msgid "Strings up to date with source code"
1670
  msgstr ""
1671
 
1673
  msgid "Strings will be extracted to:"
1674
  msgstr ""
1675
 
1676
+ #: src/js/Strings.php:74
1677
  msgid "Suggested translations"
1678
  msgstr ""
1679
 
1716
  msgid "Template missing"
1717
  msgstr ""
1718
 
1719
+ #: tpl/admin/init/init-po.php:136 tpl/admin/file/conf.php:12
1720
  msgid "Template options"
1721
  msgstr ""
1722
 
1758
  msgstr ""
1759
 
1760
  #. used when user name of web server process is unknown
1761
+ #: src/compat/PosixExtension.php:111
1762
  msgid "the web server"
1763
  msgstr ""
1764
 
1777
  "These plugins have recently loaded translation files into the admin area"
1778
  msgstr ""
1779
 
1780
+ #: tpl/admin/file/info-po.php:88
1781
  msgid ""
1782
  "These translations are not linked to a POT file. Sync operations will "
1783
  "extract strings directly from source code."
1784
  msgstr ""
1785
 
1786
+ #: tpl/admin/config/apis.php:120
1787
  msgid ""
1788
  "Third party services are subject to their own terms of use and may incur "
1789
  "costs from the provider"
1866
  msgstr ""
1867
 
1868
  #. Warning when POT file is opened in the file editor. It can be disabled in settings.
1869
+ #: src/admin/file/EditController.php:159
1870
  msgid ""
1871
  "This is NOT a translation file. Manual editing of source strings is not "
1872
  "recommended."
1926
  msgid "Translate themes and plugins directly in WordPress"
1927
  msgstr ""
1928
 
1929
+ #: src/js/Strings.php:58
1930
  #, javascript-format
1931
  msgid "Translation job aborted with %s string remaining"
1932
  msgid_plural "Translation job aborted with %s strings remaining"
1933
  msgstr[0] ""
1934
  msgstr[1] ""
1935
 
1936
+ #: tpl/admin/file/info-po.php:33 tpl/admin/bundle/inc-po-table.php:16
1937
  #: tpl/admin/bundle/locale.php:36
1938
  msgid "Translation progress"
1939
  msgstr ""
1940
 
1941
  #. %s%% is a percentage, e.g. 50%
1942
+ #: src/js/Strings.php:55
1943
  #, javascript-format
1944
  msgid "Translation progress %s%%"
1945
  msgstr ""
1946
 
1947
  #. Where %s is the name of the invalid POT file
1948
+ #: src/ajax/SyncController.php:72 src/admin/file/EditController.php:121
1949
  #, php-format
1950
  msgid "Translation template is invalid (%s)"
1951
  msgstr ""
1952
 
1953
+ #: src/admin/file/EditController.php:116
1954
  #, php-format
1955
  msgid "Translations don't match template. Run sync to update from %s"
1956
  msgstr ""
1975
  msgid "Unexpected file type"
1976
  msgstr ""
1977
 
1978
+ #: src/package/Header.php:86 src/admin/file/InfoController.php:138
1979
  msgid "Unknown author"
1980
  msgstr ""
1981
 
1982
+ #: src/js/Strings.php:123
1983
  msgid "Unknown error"
1984
  msgstr ""
1985
 
2004
  msgid "Upload PO file"
2005
  msgstr ""
2006
 
2007
+ #: tpl/admin/init/init-po.php:173
2008
  msgid "Use this file as template when running Sync"
2009
  msgstr ""
2010
 
2011
+ #: src/js/Strings.php:71
2012
  msgid "Use this translation"
2013
  msgstr ""
2014
 
2055
  msgid "Visit official site"
2056
  msgstr ""
2057
 
2058
+ #: src/js/Strings.php:105 src/error/Warning.php:19
2059
  msgid "Warning"
2060
  msgstr ""
2061
 
2062
+ #: tpl/admin/file/info-po.php:50
2063
  msgid "We can't find the binary MO file that belongs with these translations"
2064
  msgstr ""
2065
 
2171
  msgstr ""
2172
 
2173
  #. Warning appears when user tries to refresh or navigate away when editor work is unsaved
2174
+ #: src/js/Strings.php:83
2175
  msgid "Your changes will be lost if you continue without saving"
2176
  msgstr ""
2177
 
lib/compiled/gettext.php CHANGED
@@ -11,12 +11,12 @@ function loco_fix_utf8( $str ){ $fix = ''; while( is_string($str) && '' !== $st
11
  abstract class LocoGettextParser { private $head = null; private $cs = ''; abstract public function parse( $limit = -1 ); protected function setHeader( LocoPoHeaders $head ){ $this->head = $head; $cs = $head->getCharset(); if( is_string($cs) && '' !== $cs ){ if( '' === $this->cs ){ $this->setCharset($cs); } } return $head; } public function getHeader(){ return $this->head; } protected function setCharset( $cs ){ $this->cs = $cs; } protected function getCharset(){ return $this->cs; } protected function str( $str ){ if( '' !== $str ){ $str = loco_convert_utf8($str,$this->cs,false); } return $str; } }
12
  function loco_remove_bom( $s, &$c ){ $bom = substr($s,0,2); if( "\xFF\xFE" === $bom ){ $c = 'UTF-16LE'; return substr($s,2); } if( "\xFE\xFF" === $bom ){ $c = 'UTF-16BE'; return substr($s,2); } if( "\xEF\xBB" === $bom && "\xBF" === $s[2] ){ $c = 'UTF-8'; return substr($s,3); } $c = ''; return $s; }
13
  function loco_parse_reference_id( $refs, &$_id ){ if( false === ( $n = strpos($refs,'loco:') ) ){ $_id = ''; return $refs; } $_id = substr($refs, $n+5, 24 ); $refs = substr_replace( $refs, '', $n, 29 ); return trim( $refs ); }
14
- class LocoPoParser extends LocoGettextParser implements Iterator { private $lines = array(); private $i; private $k; private $m; public function __construct( $src ){ if( '' !== $src ){ $src = loco_remove_bom($src,$cs); if( $cs && 'UTF-8' !== $cs ){ $src = mb_convert_encoding( $src, 'UTF-8', $cs ); $cs = 'UTF-8'; } if( 'UTF-8' === $cs ){ $this->setCharset('UTF-8'); } $this->lines = preg_split('/(\\r\\n?|\\n)/', $src ); } } public function rewind(){ $this->i = -1; $this->k = -1; $this->next(); } public function valid(){ return is_int($this->i); } public function key(){ return $this->k; } public function current(){ return $this->m; } public function next(){ $valid = false; $entry = array( '#' => array(), 'id' => array(null), 'str' => array(null) ); $i = $this->i; while( array_key_exists(++$i,$this->lines) ){ $line = $this->lines[$i]; try { if( '' === $line ){ if( $valid ){ break; } continue; } $c = $line[0]; if( '#' === $c ){ if( $valid ){ $i--; break; } if( '#' === $line ){ continue; } $f = $line[1]; $entry['#'][$f][] = trim( substr( $line, 1+strlen($f) ), "/ \n\r\t" ); } else if( preg_match('/^msg(id(?:_plural)?|ctxt|str(?:\\[(\\d+)])?)[ \\t]*/', $line, $r ) ){ if( isset($r[2]) ){ $key = 'str'; $idx = (int) $r[2]; } else { $key = $r[1]; $idx = 0; } if( $valid && 'str' !== $key && null !== $entry['str'][0] ){ $i--; break; } $snip = strlen($r[0]); if( '"' !== substr($line,$snip,1) ){ throw new Exception('Expected " to follow msg'.$key); } $val = ''; $line = substr($line,$snip); while( true ){ if( '"' === $line || '"' !== substr($line,-1) ){ throw new Exception('Unterminated msg'.$key ); } $val .= substr( $line, 1, -1 ); $j = $i + 1; if( array_key_exists($j,$this->lines) && ( $line = $this->lines[$j] ) && '"' === $line[0] ){ $i = $j; } else { break; } } if( ! $valid ){ $valid = true; } if( 'id_plural' === $key ){ $key = 'id'; $idx = 1; } $entry[$key][$idx] = stripcslashes($val); } else if( preg_match('/^[ \\t]+$/',$line) ){ if( $valid ) { break; } } else if( '"' === $c ){ throw new Exception('String encountered without keyword'); } else { throw new Exception('Junk'); } } catch( Exception $e ){ } } if( $valid ){ ++$this->k; $this->i = $i; $this->m = $entry; } else { $this->i = null; $this->k = null; $this->m = null; } } public function parse( $limit = -1 ){ $this->rewind(); if( ! $this->valid() ){ throw new Loco_error_ParseException('Invalid PO file'); } $i = -1; $assets = array(); $entry = $this->current(); if( '' !== $entry['id'][0] || isset($entry['ctxt']) || is_null($entry['str'][0]) ){ $head = $this->setHeader( new LocoPoHeaders ); } else { $head = $this->setHeader( LocoPoHeaders::fromMsgstr($entry['str'][0]) ); } $lk = $head['X-Loco-Lookup']; while( $this->valid() ){ $entry = $this->current(); $this->next(); $msgid = $entry['id'][0]; if( is_null($msgid) ){ continue; } if( ++$i === $limit ){ return $assets; } $asset = array( 'source' => $this->str( $msgid ), 'target' => $this->str( (string) $entry['str'][0] ), 'context' => null, ); $prev_entry = null; if( isset($entry['ctxt']) ){ $asset['context'] = $this->str( $entry['ctxt'][0] ); } $cmt = $entry['#']; if( isset($cmt[' ']) ){ $asset['comment'] = $this->str( implode("\n", $cmt[' '] ) ); } if( isset($cmt['.']) ){ $asset['notes'] = $this->str( implode("\n", $cmt['.'] ) ); } if( isset($cmt[':']) ){ if( $refs = implode( ' ', $cmt[':'] ) ) { $refs = $this->str($refs); if( $refs = loco_parse_reference_id( $refs, $_id ) ){ $asset['refs'] = $refs; } if( $_id ){ $asset['_id'] = $_id; } } } if( isset($cmt[',']) ){ foreach( $cmt[','] as $flags ){ foreach( explode(',',$flags) as $flag ){ if( $flag = trim($flag," \t") ){ if( preg_match('/^((?:no-)?\w+)-format/', $flag, $r ) ){ $asset['format'] = $r[1]; } else if( 'fuzzy' === $flag ){ $asset['flag'] = 4; } } } } } if( isset($cmt['|']) ){ $p = new LocoPoParser(''); $p->lines = $cmt['|']; $p->setCharset( $this->getCharset() ); try { $prev_entry = $p->parse(); } catch( Loco_error_ParseException $e ){ } if( $prev_entry ){ $msgid = $prev_entry[0]['source']; if( $lk && 'text' !== $lk ){ $asset[$lk] = $asset['source']; $asset['source'] = $msgid; } else if( 'loco:' === substr($msgid,0,5) ){ $asset['_id'] = substr($msgid,5); } else { $asset['prev'] = $prev_entry; $prev_entry = null; } } } $assets[] = $asset; if( isset($entry['id'][1]) ){ $idx = 0; $pidx = count($assets) - 1; $num = max( 2, count($entry['str']) ); while( ++$idx < $num ){ $plural = array( 'source' => '', 'target' => isset($entry['str'][$idx]) ? $this->str($entry['str'][$idx]) : '', 'plural' => $idx, 'parent' => $pidx, ); if( 1 === $idx ){ $plural['source'] = $this->str($entry['id'][1]); if( is_array($prev_entry) && isset($prev_entry[1]) ){ if( $lk && 'text' !== $lk ){ $plural[$lk] = $plural['source']; $plural['source'] = $prev_entry[1]['source']; } } } if( isset($asset['flag']) ){ $plural['flag'] = $asset['flag']; } $assets[] = $plural; } } } if( -1 === $i ){ throw new Loco_error_ParseException('Invalid PO file'); } else if( 0 === $i && '' === $assets[0]['source'] && '' === $assets[0]['target'] ){ throw new Loco_error_ParseException('Invalid PO file' ); } return $assets; } }
15
  class LocoMoParser extends LocoGettextParser { private $bin; private $be; private $n; private $o; private $t; private $v; public function __construct( $bin ){ $this->bin = $bin; } public function getAt( $idx ){ $offset = $this->targetOffset(); $offset += ( $idx * 8 ); $len = $this->integerAt( $offset ); $idx = $this->integerAt( $offset + 4 ); $txt = $this->bytes( $idx, $len ); if( false === strpos( $txt, "\0") ){ return $txt; } return explode( "\0", $txt ); } public function parse( $limit = -1 ){ $i = -1; $r = array(); $sourceOffset = $this->sourceOffset(); $targetOffset = $this->targetOffset(); $soffset = $sourceOffset; $toffset = $targetOffset; while( $soffset < $targetOffset ){ $len = $this->integerAt( $soffset ); $idx = $this->integerAt( $soffset + 4 ); $src = $this->bytes( $idx, $len ); $eot = strpos( $src, "\x04" ); if( false === $eot ){ $context = null; } else { $context = $this->str( substr($src, 0, $eot ) ); $src = substr( $src, $eot+1 ); } $sources = explode( "\0", $src, 2 ); $len = $this->integerAt( $toffset ); $idx = $this->integerAt( $toffset + 4 ); $targets = explode( "\0", $this->bytes( $idx, $len ) ); if( -1 === $i && '' === $sources[0] && is_null($context) ){ $this->setHeader( LocoPoHeaders::fromMsgstr($targets[0]) ); } if( ++$i === $limit ){ break; } $r[$i] = array( 'source' => $this->str( $sources[0] ), 'target' => $this->str( $targets[0] ), 'context' => $context, ); if( isset($sources[1]) ){ $p = count($r) - 1; $nforms = max( 2, count($targets) ); for( $i = 1; $i < $nforms; $i++ ){ $r[] = array( 'source' => isset($sources[$i]) ? $this->str( $sources[$i] ) : sprintf('%s (plural %u)',$r[$p]['source'],$i), 'target' => isset($targets[$i]) ? $this->str( $targets[$i] ) : '', 'parent' => $p, 'plural' => $i, ); } } $soffset += 8; $toffset += 8; } return $r; } public function isBigendian(){ if( is_null($this->be) ){ $str = $this->words( 0, 1 ); if( "\xDE\x12\x04\x95" === $str ){ $this->be = false; } else if( "\x95\x04\x12\xDE" === $str ){ $this->be = true; } else { throw new Loco_error_ParseException('Invalid MO format'); } } return $this->be; } public function version(){ if( is_null($this->v) ){ $this->v = $this->integerWord(1); } return $this->v; } public function count(){ if( is_null($this->n) ){ $this->n = $this->integerWord(2); } return $this->n; } public function sourceOffset(){ if( is_null($this->o) ){ $this->o = $this->integerWord(3); } return $this->o; } public function targetOffset(){ if( is_null($this->t) ){ $this->t = $this->integerWord(4); } return $this->t; } public function getHashTable(){ $s = $this->integerWord(5); $h = $this->integerWord(6); return $this->bytes( $h, $s * 4 ); } private function bytes( $offset, $length ){ $s = substr( $this->bin, $offset, $length ); if( strlen($s) !== $length ){ throw new Loco_error_ParseException('Failed to read '.$length.' bytes at ['.$offset.']' ); } return $s; } private function words( $offset, $length ){ return $this->bytes( $offset * 4, $length * 4 ); } private function integerWord( $offset ){ return $this->integerAt( $offset * 4 ); } private function integerAt( $offset ){ $str = $this->bytes( $offset, 4 ); $fmt = $this->isBigendian() ? 'N' : 'V'; $arr = unpack( $fmt, $str ); if( ! isset($arr[1]) || ! is_int($arr[1]) ){ throw new Loco_error_ParseException('Failed to read integer at byte '.$offset); } return $arr[1]; } }
16
  abstract class LocoPo { public static function pair( $key, $text, $width = 79, $eol = "\n", $esc = '\\n' ){ if( '' === $text ){ return $key.' ""'; } $text = addcslashes( $text, "\t\x0B\x0C\x07\x08\\\"" ); if( $esc ) { $text = preg_replace('/(?:\\r\\n?|\\n)/', $esc.$eol, $text, -1, $nbr ); } else { $eol = "\n"; $text = preg_replace_callback('/(?:\\r\\n?|\\n)/',array(__CLASS__,'replace_br'), $text, -1, $nbr ); } if( $nbr ){ } else if( $width && $width < mb_strlen($text,'UTF-8') + strlen($key) + 3 ){ } else { return $key.' "'.$text.'"'; } $lines = array( $key.' "' ); if( $width ){ $width -= 2; $a = '/^.{0,'.($width-1).'}[-– \\.,:;\\?!\\)\\]\\}\\>]/u'; $b = '/^[^-– \\.,:;\\?!\\)\\]\\}\\>]+/u'; foreach( explode($eol,$text) as $unwrapped ){ $length = mb_strlen( $unwrapped, 'UTF-8' ); while( $length > $width ){ if( preg_match( $a, $unwrapped, $r ) ){ $line = $r[0]; } else if( preg_match( $b, $unwrapped, $r ) ){ $line = $r[0]; } else { throw new Exception('Wrapping error'); } $lines[] = $line; $trunc = mb_strlen($line,'UTF-8'); $length -= $trunc; $unwrapped = (string) substr( $unwrapped, strlen($line) ); if( ( '' === $unwrapped && 0 !== $length ) || ( 0 === $length && '' !== $unwrapped ) ){ throw new Exception('Truncation error'); } } if( 0 !== $length ){ $lines[] = $unwrapped; } } } else { foreach( explode($eol,$text) as $unwrapped ){ $lines[] = $unwrapped; } } return implode('"'.$eol.'"',$lines).'"'; } private static function replace_br( array $r ){ return addcslashes($r[0],"\r\n")."\n"; } public static function refs( $text, $width = 76, $eol = "\n" ){ $text = preg_replace('/\\s+/u', ' ', $text ); if( $width ){ $text = wordwrap( $text, $width, $eol.'#: ', false ); } return '#: '.$text; } public static function prefix( $text, $prefix, $eol = "\n" ){ return $prefix . implode($eol.$prefix, self::split($text) ); } public static function split( $text ){ $lines = preg_split('/\\R/u', $text ); if( false === $lines ){ if( false === preg_match('//u',$text) ){ $text = mb_convert_encoding( $text, 'UTF-8', 'cp1252' ); } $lines = preg_split('/\\r?\\n+/', $text ); } return $lines; } public static function trim( $text ){ $lines = array(); $deferred = null; foreach( explode("\n",$text) as $line ){ if( '' === $line ){ continue; } if( preg_match('/^msg[a-z]+(?:\\[\\d+])? ""/',$line) ){ $deferred = $line; continue; } if( $deferred && '"' === $line[0] ){ $lines[] = $deferred; $deferred = null; } $lines[] = $line; } return implode("\n",$lines); } }
17
  class LocoPoIndex extends ArrayIterator { public function compare( LocoPoMessage $a, LocoPoMessage $b ){ $h = $a->getHash(); if( ! isset($this[$h]) ){ return 1; } $j = $b->getHash(); if( ! isset($this[$j]) ){ return -1; } return $this[$h] > $this[$j] ? 1 : -1; } }
18
- class LocoPoMessage extends ArrayObject { public function __construct( array $r ){ $r['key'] = $r['source']; parent::__construct($r); } public function __get( $prop ){ return $this->offsetExists($prop) ? $this->offsetGet($prop) : null; } private function _getFlags(){ $flags = array(); $plurals = $this->__get('plurals'); if( 4 === $this->__get('flag') ){ $flags[] = 'fuzzy'; } else if( $plurals ){ foreach( $plurals as $child ){ if( 4 === $child->__get('flag') ){ $flags[] = 'fuzzy'; break; } } } if( $f = $this->__get('format') ){ $flags[] = $f.'-format'; } else if( isset($plurals[0]) && ( $f = $plurals[0]->format ) ){ $flags[] = $f.'-format'; } return $flags; } public function getHash(){ $hash = $this->getKey(); if( $this->offsetExists('plurals') ){ foreach( $this['plurals'] as $p ){ $hash .= "\0".$p->getHash(); break; } } return $hash; } public function getKey(){ $msgid = (string) $this['source']; $msgctxt = (string) $this->__get('context'); if( '' !== $msgctxt ){ if( '' === $msgid ){ $msgid = '('.$msgctxt.')'; } $msgid = $msgctxt."\4".$msgid; } return $msgid; } public function exportSerial(){ $a = array( $this['target'] ); if( $this->offsetExists('plurals') ){ $plurals = $this->offsetGet('plurals'); if( is_array($plurals) ){ foreach( $plurals as $i => $p ){ $a[] = $p['target']; } } } return $a; } public function __toString(){ return $this->render( 79, 76 ); } public function render( $width, $ref_width ){ $s = array(); try { if( $text = $this->__get('comment') ) { $s[] = LocoPo::prefix( $text, '# '); } if( $text = $this->__get('notes') ) { $s[] = LocoPo::prefix( $text, '#. '); } if( $text = $this->__get('refs') ){ $s[] = LocoPo::refs( $text, $ref_width ); } if( $texts = $this->_getFlags() ){ $s[] = '#, '.implode(', ',$texts); } $prev = $this->__get('prev'); if( is_array($prev) && $prev ){ foreach( new LocoPoIterator($prev) as $p ){ $text = $p->render( max(0,$width-3), 0 ); $s[] = LocoPo::prefix( LocoPo::trim($text),'#| '); break; } } $text = $this->__get('context'); if( is_string($text) && '' !== $text ){ $s[] = LocoPo::pair('msgctxt', $text, $width ); } $s[] = LocoPo::pair( 'msgid', $this['source'], $width ); $target = $this['target']; $plurals = $this->__get('plurals'); if( is_array($plurals) ){ if( $plurals ){ foreach( $plurals as $i => $p ){ if( 0 === $i ){ $s[] = LocoPo::pair('msgid_plural', $p['source'], $width ); $s[] = LocoPo::pair('msgstr[0]', $target, $width ); } $s[] = LocoPo::pair('msgstr['.(++$i).']', $p['target'], $width ); } } else if( isset($this['plural_key']) ){ $s[] = LocoPo::pair('msgid_plural', $this['plural_key'], $width ); $s[] = LocoPo::pair('msgstr[0]', $target, $width ); } else { trigger_error('Missing plural_key in zero plural export'); $s[] = LocoPo::pair('msgstr', $target, $width ); } } else { $s[] = LocoPo::pair('msgstr', $target, $width ); } } catch( Exception $e ){ trigger_error( $e->getMessage(), E_USER_WARNING ); } return implode("\n",$s)."\n"; } public function merge( LocoPoMessage $def, $translate = false ){ if( $def->getHash() !== $this->getHash() ){ $prev = array( 'source' => '', 'target' => '' ); $prev = $this->diff('source',$def,$prev); $prev = $this->diff('context',$def,$prev); $this['flag'] = 4; $this['prev'] = array( $prev ); $defPlural = $def->getPlural(0); $ourPlural = $this->getPlural(0); if( $defPlural && $ourPlural ) { $ourPlural->merge($defPlural); if( $ourPlural->offsetExists('prev') ) { $this['prev'][] = $ourPlural->prev[0]+array('parent'=>0,'plural'=>1); $ourPlural->offsetUnset('prev'); } } else if( $defPlural ){ $this['plurals'] = array( clone $defPlural ); } else if( $ourPlural ){ $this['prev'][] = $ourPlural->exportBasic() + array('parent'=>0,'plural'=>1); $this->offsetUnset('plurals'); } } foreach( array('notes','refs') as $f ){ if( $def->offsetExists($f) ){ $this->offsetSet($f,$def->offsetGet($f)); } else if( $this->offsetExists($f) ){ $this->offsetUnset($f); } } if( $translate && '' === $this['target'] && '' !== $def['target'] ){ $this['target'] = $def['target']; if( $def->offsetExists('comment') ) { $this['comment'] = $def['comment']; } if( $this->offsetExists('plurals') ){ foreach( $this['plurals'] as $i => $ourPlural ){ if( '' === $ourPlural['target'] ){ $defPlural = $def->getPlural($i); if( $defPlural ){ $ourPlural['target'] = $defPlural['target']; } } } } } } private function diff( $key, LocoPoMessage $def, array $prev ){ $old = $this->__get($key); $new = $def->__get($key); if( $new !== $old ){ $this->offsetSet($key,$new); if( is_string($old) && '' !== $old ){ $prev[$key] = $old; } } return $prev; } private function getPlural( $i ){ if( $this->offsetExists('plurals') ){ $plurals = $this->offsetGet('plurals'); if( is_array($plurals) && array_key_exists($i,$plurals) ){ return $plurals[$i]; } } return null; } private function exportBasic(){ return array( 'source' => $this['source'], 'context' => $this->context, 'target' => '', ); } public function export(){ $a = $this->getArrayCopy(); unset($a['key']); return $a; } public function countForms(){ $len = 1; if( $this->offsetExists('plurals') ){ $plurals = $this->offsetGet('plurals'); $len += count($plurals); } return $len; } public function strip(){ $this['target'] = ''; $plurals = $this->plurals; if( is_array($plurals) ){ foreach( $plurals as $p ){ $p->strip(); } } return $this; } public function translated(){ return '' !== (string) $this['target']; } }
19
- class LocoPoIterator implements Iterator, Countable { private $po; private $headers = null; private $i; private $t; private $j; private $z = 0; private $w = 79; public function __construct( $po ){ if( is_array($po) ){ $this->po = $po; } else if( $po instanceof Traversable ){ $this->po = iterator_to_array($po,false); } else { throw new InvalidArgumentException('PO data must be array or iterator'); } $this->t = count($po); if( 0 === $this->t ){ throw new InvalidArgumentException('Empty PO data'); } $h = $po[0]; if( '' !== $h['source'] || ( isset($h['context']) && '' !== $h['context'] ) || ( isset($po[1]['parent']) && 0 === $po[1]['parent'] ) ){ $this->z = -1; } } public function push( LocoPoMessage $p ){ $raw = $p->export(); $plurals = $p->plurals; unset($raw['plurals']); $i = count($this->po); $this->po[$i] = $raw; $this->t++; if( is_array($plurals) ) { $j = 0; foreach( $plurals as $p ) { $raw = $p->export(); $raw['parent'] = $i; $raw['plural'] = ++$j; $this->po[] = $raw; $this->t++; } } } public function concat( LocoPoIterator $more ){ foreach( $more as $message ){ $this->push($message); } return $this; } public function __clone(){ if( $this->headers ){ $this->headers = new LocoPoHeaders( $this->headers->getArrayCopy() ); } } public function count(){ return $this->t - ( $this->z + 1 ); } public function wrap( $width ){ $width = (int) $width; if( $width > 0 ){ $this->w = max( 15, $width ); } else { $this->w = 0; } return $this; } public function rewind(){ $this->i = $this->z; $this->j = -1; $this->next(); } public function key(){ return $this->j; } public function valid(){ return is_int($this->i); } public function next(){ $i = $this->i; while( ++$i < $this->t ){ if( array_key_exists('parent',$this->po[$i]) ){ continue; } $this->j++; $this->i = $i; return; } $this->i = null; $this->j = null; } public function current(){ $i = $this->i; $po = $this->po; $parent = new LocoPoMessage( $po[$i] ); $plurals = array(); $nonseq = $parent->offsetExists('child'); $j = $nonseq ? $parent['child'] : $i+1; while( isset($po[$j]['parent']) && $i === $po[$j]['parent'] ){ $plurals[] = new LocoPoMessage($po[$j++]); } if( $plurals ){ $parent['plurals'] = $plurals; } return $parent; } public function getArrayCopy(){ $po = $this->po; if( 0 === $this->z ){ $po[0]['target'] = (string) $this->getHeaders(); } return $po; } public function clear(){ if( 0 === $this->z ){ $this->po = array( $this->po[0] ); $this->t = 1; } else { $this->po = array(); $this->t = 0; } } public function getHeaders(){ if( is_null($this->headers) ){ $header = $this->po[0]; if( 0 === $this->z ){ $this->headers = LocoPoHeaders::fromMsgstr( $header['target'] ); } else { $this->headers = new LocoPoHeaders; } } return $this->headers; } public function initPo(){ if( 0 === $this->z ){ unset( $this->po[0]['flag'] ); } return $this; } public function initPot(){ if( 0 === $this->z ){ $this->po[0]['flag'] = 4; } return $this; } public function strip(){ $po = $this->po; $i = count($po); $z = $this->z; while( --$i > $z ){ $po[$i]['target'] = ''; } $this->po = $po; return $this; } public function __toString(){ try { return $this->render(); } catch( Exception $e ){ trigger_error( $e->getMessage(), E_USER_WARNING ); return ''; } } public function render( $sorter = null ){ $width = $this->w; $ref_width = max( 0, $width - 3 ); $h = $this->exportHeader(); $msg = new LocoPoMessage( $h ); $s = $msg->render( $width, $ref_width ); if( $sorter ){ if( ! is_callable($sorter) ){ throw new InvalidArgumentException('Bad callback'); } $msgs = array(); foreach( $this as $msg ){ $msgs[] = $msg; } usort( $msgs, $sorter ); } else { $msgs = $this; } foreach( $msgs as $msg ){ $s .= "\n".$msg->render( $width, $ref_width ); } return $s; } public function exportJed(){ $head = $this->getHeaders(); $a = array( '' => array( 'domain' => $head['domain'], 'lang' => $head['language'], 'plural-forms' => $head['plural-forms'], ) ); foreach( $this as $message ){ if( $message->translated() ){ $a[ $message->getKey() ] = $message->exportSerial(); } } return $a; } private function exportHeader(){ if( 0 === $this->z ){ $h = $this->po[0]; } else { $h = array( 'source' => '', 'target' => '' ); } if( $this->headers ){ $h['target'] = (string) $this->headers; } return $h; } public function exportRefs( $grep = '' ){ $a = array(); if( '' === $grep ) { $grep = '/(\\S+):\\d+/'; } else { $grep = '/(\\S*'.$grep.'):\\d+/'; } $self = get_class($this); $base = array( $this->exportHeader() ); foreach( $this as $message ){ if( preg_match_all( $grep, (string) $message->refs, $r ) ){ foreach( $r[1] as $ref ) { if( array_key_exists($ref,$a) ){ $po = $a[$ref]; } else { $po = new $self($base); $a[$ref] = $po; } $po->push($message); } } } return $a; } public function splitRefs( array $map = null ){ $a = array(); $self = get_class($this); $base = array( $this->exportHeader() ); if( is_array($map) ){ $grep = implode('|',array_keys($map)); } else { $grep = '[a-z]+'; } foreach( $this as $message ){ $refs = ltrim( (string) $message->refs ); if( '' !== $refs ){ if( preg_match_all('/\\S+\\.('.$grep.'):\\d+/', $refs, $r, PREG_SET_ORDER ) ){ $tmp = array(); foreach( $r as $rr ) { list( $ref, $ext ) = $rr; $tmp[$ext][$ref] = true; } foreach( $tmp as $ext => $refs ){ if( is_array($map) ){ $ext = $map[$ext]; } if( array_key_exists($ext,$a) ){ $po = $a[$ext]; } else { $po = new $self($base); $a[$ext] = $po; } $message = clone $message; $message['refs'] = implode(' ',array_keys($refs) ); $po->push($message); } } } } return $a; } public function getHashes(){ $a = array(); foreach( $this as $msg ){ $a[] = $msg->getHash(); } sort( $a, SORT_STRING ); return $a; } public function equalSource( LocoPoIterator $that ){ $a = $this->getHashes(); $b = $that->getHashes(); if( count($a) !== count($b) ){ return false; } foreach( $a as $i => $hash ){ if( $hash !== $b[$i] ){ return false; } } return true; } public function equal( LocoPoIterator $that ){ if( $this->t !== $that->t ){ return false; } $i = $this->z; $fields = array( 'source', 'context', 'notes', 'refs', 'target', 'comment', 'flag', 'parent', 'plural' ); while( ++$i < $this->t ){ $a = $this->po[$i]; $b = $that->po[$i]; foreach( $fields as $f ){ $af = isset($a[$f]) ? $a[$f] : ''; $bf = isset($b[$f]) ? $b[$f] : ''; if( $af !== $bf ){ return false; } } } return true; } public function sort( $func = null ){ $order = array(); foreach( $this as $msg ){ $order[] = $msg; } if( is_null($func) ){ $func = array( __CLASS__, 'compare' ); } else if( ! is_callable($func) ){ throw new InvalidArgumentException('Bad callback'); } usort( $order, $func ); $this->clear(); foreach( $order as $p ){ $this->push($p); } return $this; } public static function compare( LocoPoMessage $a, LocoPoMessage $b ){ $h = $a->getHash(); $j = $b->getHash(); $n = strcasecmp( $h, $j ); if( 0 === $n ){ $n = strcmp( $h, $j ); if( 0 === $n ){ return 0; } } return $n > 0 ? 1 : -1; } public function createSorter(){ $index = array(); foreach( $this as $i => $msg ){ $index[ $msg->getHash() ] = $i; } $obj = new LocoPoIndex( $index ); return array( $obj, 'compare' ); } }
20
  class LocoMoTable { private $size = 0; private $bin = ''; private $map; public function __construct( $data = null ){ if( is_array($data) ){ $this->compile( $data ); } else if( $data ){ $this->parse( $data ); } } public function count(){ if( ! isset($this->size) ){ if( $this->bin ){ $this->size = (int) ( strlen( $this->bin ) / 4 ); } else if( is_array($this->map) ){ $this->size = count($this->map); } else { return 0; } if( ! self::is_prime($this->size) || $this->size < 3 ){ throw new Exception('Size expected to be prime number above 2, got '.$this->size); } } return $this->size; } public function bytes(){ return $this->count() * 4; } public function __toString(){ return $this->bin; } public function export(){ if( ! is_array($this->map) ){ $this->parse( $this->bin ); } return $this->map; } private function reset( $length ){ $this->size = max( 3, self::next_prime ( $length * 4 / 3 ) ); $this->bin = null; $this->map = array(); return $this->size; } public function compile( array $msgids ){ $hash_tab_size = $this->reset( count($msgids) ); $packed = array_fill( 0, $hash_tab_size, "\0\0\0\0" ); $j = 0; foreach( $msgids as $msgid ){ $hash_val = self::hashpjw( $msgid ); $idx = $hash_val % $hash_tab_size; if( array_key_exists($idx, $this->map) ){ $incr = 1 + ( $hash_val % ( $hash_tab_size - 2 ) ); do { $idx += $incr; if( $hash_val === $idx ){ throw new Exception('Unable to find empty slot in hash table'); } $idx %= $hash_tab_size; } while( array_key_exists($idx, $this->map ) ); } $this->map[$idx] = $j; $packed[$idx] = pack('V', ++$j ); } return $this->bin = implode('',$packed); } public function lookup( $msgid, array $msgids ){ $hash_val = self::hashpjw( $msgid ); $idx = $hash_val % $this->size; $incr = 1 + ( $hash_val % ( $this->size - 2 ) ); while( true ){ if( ! array_key_exists($idx, $this->map) ){ break; } $j = $this->map[$idx]; if( isset($msgids[$j]) && $msgid === $msgids[$j] ){ return $j; } $idx += $incr; if( $idx === $hash_val ){ break; } $idx %= $this->size; } return -1; } public function parse( $bin ){ $this->bin = (string) $bin; $this->size = null; $hash_tab_size = $this->count(); $this->map = array(); $idx = -1; $byte = 0; while( ++$idx < $hash_tab_size ){ $word = substr( $this->bin, $byte, 4 ); if( "\0\0\0\0" !== $word ){ list(,$j) = unpack('V', $word ); $this->map[$idx] = $j - 1; } $byte += 4; } return $this->map; } public static function hashpjw( $str ){ $i = -1; $hval = 0; $len = strlen($str); while( ++$i < $len ){ $ord = ord( substr($str,$i,1) ); $hval = ( $hval << 4 ) + $ord; $g = $hval & 0xf0000000; if( $g !== 0 ){ $hval ^= $g >> 24; $hval ^= $g; } } return $hval; } private static function next_prime( $seed ){ $seed |= 1; while ( ! self::is_prime($seed) ){ $seed += 2; } return $seed; } private static function is_prime( $num ) { if ($num === 1 ){ return false; } if( $num === 2 ){ return true; } if( $num % 2 == 0 ) { return false; } for( $i = 3; $i <= ceil(sqrt($num)); $i = $i + 2) { if($num % $i == 0 ){ return false; } } return true; } }
21
  class LocoMo { private $bin; private $msgs; private $head; private $hash; private $use_fuzzy = false; private $cs; public function __construct( Iterator $export, LocoPoHeaders $head = null ){ if( $head ){ $this->head = $head; } else { $this->head = new LocoPoHeaders; $this->setHeader('Project-Id-Version','Loco'); } $this->msgs = $export; $this->bin = ''; } public function setCharset( $cs ){ $cs = $this->head->setCharset($cs); $this->cs = 'UTF-8' === $cs ? null : $cs; } public function enableHash(){ return $this->hash = new LocoMoTable; } public function useFuzzy(){ $this->use_fuzzy = true; } public function setHeader( $key, $val ){ $this->head->add($key, $val); return $this; } private function str( $s ){ $s = (string) $s; if( $cs = $this->cs ){ $s = mb_convert_encoding($s,$cs,array('UTF-8')); } return $s; } public function compile(){ $table = array(''); $sources = array(''); $targets = array( (string) $this->head ); $fuzzy_flag = 4; $skip_fuzzy = ! $this->use_fuzzy; foreach( $this->msgs as $r ){ if( $skip_fuzzy && isset($r['flag']) && $fuzzy_flag === $r['flag'] ){ continue; } $msgid = $this->str( $r['key'] ); if( isset($r['context']) ){ $msgctxt = $this->str( $r['context'] ); if( '' !== $msgctxt ){ if( '' === $msgid ){ $msgid = '('.$msgctxt.')'; } $msgid = $msgctxt."\x04".$msgid; } } if( '' === $msgid ){ continue; } $msgstr = $this->str( $r['target'] ); if( '' === $msgstr ){ continue; } $table[] = $msgid; if( isset($r['plurals']) ){ foreach( $r['plurals'] as $i => $p ){ if( $i === 0 ){ $msgid .= "\0".$p['key']; } $msgstr .= "\0".$p['target']; } } $sources[] = $msgid; $targets[] = $msgstr; } asort( $sources, SORT_STRING ); $this->bin = "\xDE\x12\x04\x95\x00\x00\x00\x00"; $n = count($sources); $this->writeInteger( $n ); $offset = 28; $this->writeInteger( $offset ); $offset += $n * 8; $this->writeInteger( $offset ); if( $this->hash ){ sort( $table, SORT_STRING ); $this->hash->compile( $table ); $s = $this->hash->count(); } else { $s = 0; } $this->writeInteger( $s ); $offset += $n * 8; $this->writeInteger( $offset ); if( $s ){ $offset += $s * 4; } $source = ''; foreach( $sources as $i => $str ){ $source .= $str."\0"; $this->writeInteger( $strlen = strlen($str) ); $this->writeInteger( $offset ); $offset += $strlen + 1; } $target = ''; foreach( array_keys($sources) as $i ){ $str = $targets[$i]; $target .= $str."\0"; $this->writeInteger( $strlen = strlen($str) ); $this->writeInteger( $offset ); $offset += $strlen + 1; } if( $this->hash ){ $this->bin .= $this->hash->__toString(); } $this->bin .= $source; $this->bin .= $target; return $this->bin; } private function writeInteger( $num ){ $this->bin .= pack( 'V', $num ); return $this; } }
22
  interface LocoTokensInterface extends Iterator { public function advance(); public function ignore( array $a ); }
@@ -24,16 +24,16 @@ class LocoTokenizer implements LocoTokensInterface { const T_LITERAL = 0; const
24
  function loco_utf8_chr( $u ){ if( $u < 0x80 ){ if( $u < 0 ){ throw new RangeException( sprintf('%d is out of Unicode range', $u ) ); } return chr($u); } if( $u < 0x800 ) { return chr( ($u>>6) & 0x1F | 0xC0 ).chr( $u & 0x3F | 0x80 ); } if( $u < 0x10000 ) { return chr( $u>>12 & 15 | 0xE0 ).chr( $u>>6 & 0x3F | 0x80 ).chr( $u & 0x3F | 0x80 ); } if( $u < 0x110000 ) { return chr( $u>>18 & 7 | 0xF0 ).chr( $u>>12 & 0x3F | 0x80 ).chr( $u>>6 & 0x3F | 0x80 ).chr( $u & 0x3F | 0x80 ); } throw new RangeException( sprintf('\\x%X is out of Unicode range', $u ) ); }
25
  function loco_resolve_surrogates( $s ){ return preg_replace_callback('/\\xED([\\xA0-\\xAF])([\\x80-\\xBF])\\xED([\\xB0-\\xBF])([\\x80-\\xBF])/', '_loco_resolve_surrogates', $s ); }
26
  function _loco_resolve_surrogates( array $r ){ return loco_utf8_chr ( ( ( ( ( 832 | ( ord($r[1]) & 0x3F ) ) << 6 ) | ( ord($r[2]) & 0x3F ) ) - 0xD800 ) * 0x400 + ( ( ( ( 832 | ( ord($r[3]) & 0x3F ) ) << 6 ) | ( ord($r[4]) & 0x3F ) ) - 0xDC00 ) + 0x10000 ); }
27
- class LocoEscapeParser { private $map; private $grep; public function __construct( array $map = array() ){ $this->map = $map; $rules = array('\\\\'); if( $map ){ $rules[] = '['.implode(array_keys($map)).']'; } if( ! isset($map['U']) ) { $rules[] = 'U[0-9A-Fa-f]{5,8}'; } if( ! isset($map['u']) ) { $rules[] = 'u(?:\\{[0-9A-Fa-f]+\\}|[0-9A-Fa-f]{1,4})(?:\\\\u(?:\\{[0-9A-Fa-f]+\\}|[0-9A-Fa-f]{1,4}))*'; } $this->grep = '/\\\\('.implode('|',$rules).')/'; } public function unescape( $s ){ if( '' !== $s ) { return $this->stripSlashes( preg_replace_callback($this->grep, array($this, 'unescapeMatch'), $s) ); } return ''; } public function unescapeMatch( array $r ){ $s = $r[0]; $c = $s[1]; if( isset($this->map[$c]) ){ return $this->map[$c]; } if( 'u' === $c ){ $str = ''; $surrogates = false; foreach( explode('\\u',$s) as $i => $h ){ if( '' !== $h ){ $h = ltrim( trim($h,'{}'),'0'); $u = intval($h,16); $str.= loco_utf8_chr($u); if( ! $surrogates ){ $surrogates = $u >= 0xD800 && $u <= 0xDBFF; } } } if( $surrogates ){ $str = loco_resolve_surrogates($str); } return $str; } if( 'U' === $c ){ return loco_utf8_chr( intval(substr($s,2),16) ); } if( 'x' === $c ){ return chr( intval(substr($s,2),16) ); } if( ctype_digit($c) ){ return chr( intval(substr($s,1),8) ); } return $s; } protected function stripSlashes( $s ){ return stripcslashes($s); } }
28
  class LocoJsTokens extends LocoTokenizer { const T_KWORD = 1; const T_REGEX = 2; private static $lex; protected static $words = array( 'true' => 1, 'false' => 1, 'null' => 1, 'break' => T_BREAK, 'else' => T_ELSE, 'new' => T_NEW, 'var' => 1, 'case' => T_CASE, 'finally' => T_FINALLY, 'return' => T_RETURN, 'void' => 1, 'catch' => T_CATCH, 'for' => T_FOR, 'switch' => T_SWITCH, 'while' => T_WHILE, 'continue' => T_CONTINUE, 'function' => T_FUNCTION, 'this' => T_STRING, 'with' => 1, 'default' => T_DEFAULT, 'if' => T_IF, 'throw' => T_THROW, 'delete' => 1, 'in' => 1, 'try' => T_TRY, 'do' => T_DO, 'instanceof' => 1, 'typeof' => 1, ); public static function decapse( $encapsed ){ $s = substr($encapsed,1,-1); $l = self::$lex; if( is_null($l) ){ $l = new LocoEscapeParser( array( 'U' => 'U', 'a' => 'a', ) ); self::$lex = $l; } return $l->unescape($s); } public function __construct( $src = '' ){ $this->define('/^(?:\\\\u[0-9A-F]{4,4}|[$_\\pL\\p{Nl}])(?:\\\\u[0-9A-F]{4}|[$_\\pL\\pN\\p{Mn}\\p{Mc}\\p{Pc}])*/ui', array($this,'matchWord') ); $this->define('/^\\s+/u', T_WHITESPACE ); $this->define('!^//.*!', T_COMMENT ); $this->define('!^/\\*.*\\*/!Us', array($this,'matchComment') ); $this->define('/^"(?:\\\\.|[^\\r\\n\\p{Zl}\\p{Zp}"\\\\])*"/u', T_CONSTANT_ENCAPSED_STRING ); $this->define('/^\'(?:\\\\.|[^\\r\\n\\p{Zl}\\p{Zp}\'\\\\])*\'/u', T_CONSTANT_ENCAPSED_STRING ); $this->define('/^[-+;,<>.=:|&^!?*%~(){}[\\]]/'); parent::__construct($src); } public function matchWord( $s ){ if( array_key_exists($s,self::$words) ){ return self::$words[$s]; } return T_STRING; } public function matchComment( $s ){ if( '/**' === substr($s,0,3) ){ return T_DOC_COMMENT; } return T_COMMENT; } }
29
  class LocoExtracted implements Countable { private $exp = array(); private $reg = array(); private $dom = array(); private $dflt = ''; public function extractSource( LocoExtractor $ext, $src, $fileref = '' ){ $ext->extract( $this, $ext->tokenize($src), $fileref ); return $this; } public function export(){ return $this->exp; } public function count(){ return count( $this->exp ); } public function getDomainCounts(){ return $this->dom; } public function setDomain( $default ){ $this->dflt = (string) $default; return $this; } public function getDomain(){ return $this->dflt; } private function key( array $entry ){ $key = (string) $entry['source']; foreach( array('context','domain') as $i => $prop ){ if( array_key_exists($prop,$entry) ) { $add = (string) $entry[$prop]; if( '' !== $add ){ $key .= ord($i).$add; } } } return $key; } public function pushMeta( $source, $notes, $domain = '' ){ if( '' === $domain || '*' === $domain ){ $domain = $this->dflt; } return $this->pushEntry( array( 'source' => $source, 'notes' => $notes, ), $domain ); } public function pushEntry( array $entry, $domain = '' ){ $entry['id'] = ''; $entry['target'] = ''; $entry['domain'] = $domain; $key = $this->key($entry); if( isset($this->reg[$key]) ){ $index = $this->reg[$key]; $clash = $this->exp[$index]; if( $value = $this->mergeField( $clash, $entry, 'refs', ' ') ){ $this->exp[$index]['refs'] = $value; } if( $value = $this->mergeField( $clash, $entry, 'notes', "\n") ){ $this->exp[$index]['notes'] = $value; } } else { $index = count($this->exp); $this->reg[$key] = $index; $this->exp[$index] = $entry; if( isset($this->dom[$domain]) ){ $this->dom[$domain]++; } else { $this->dom[$domain] = 1; } } return $index; } public function pushPlural( array $entry, $sindex ){ $parent = $this->exp[$sindex]; $domain = $parent['domain']; $pkey = $this->key($parent)."\2"; if( ! array_key_exists($pkey,$this->reg) ){ $pindex = count($this->exp); $this->reg[$pkey] = $pindex; $entry += array( 'id' => '', 'target' => '', 'plural' => 1, 'parent' => $sindex, 'domain' => $domain, ); $this->exp[$pindex] = $entry; if( isset($entry['format']) && ! isset( $parent['format']) ) { $this->exp[$sindex]['format'] = $entry['format']; } if( $pindex !== $sindex + $entry['plural']) { $this->exp[$sindex]['child'] = $pindex; } } } public function mergeField( array $old, array $new, $field, $glue ){ $prev = isset($old[$field]) ? $old[$field] : ''; if( isset($new[$field]) ){ $text = $new[$field]; if( '' !== $prev && $prev !== $text ){ if( 'notes' === $field && preg_match( '/^'.preg_quote( rtrim($text,'. '),'/').'[. ]*$/mu', $prev ) ) { $text = $prev; } else { $text = $prev.$glue.$text; } } return $text; } return $prev; } public function filter( $domain ){ $map = array(); $newOffset = 1; $matchAll = '*' === $domain; $raw = array( array( 'id' => '', 'source' => '', 'target' => '', 'domain' => $matchAll ? '' : $domain, ) ); foreach( $this->exp as $oldOffset => $r ){ if( isset($r['parent']) ){ if( isset($map[$r['parent']]) ){ $r['parent'] = $map[ $r['parent'] ]; $raw[ $newOffset++ ] = $r; } } else { if( $matchAll ){ $match = true; } else if( isset($r['domain']) ){ $match = $domain === $r['domain']; } else { $match = $domain === ''; } if( $match ){ $map[ $oldOffset ] = $newOffset; $raw[ $newOffset++ ] = $r; } } } return $raw; } }
30
  abstract class LocoExtractor { private $rules; private $wp = array(); private $domain = ''; abstract public function tokenize( $src ); abstract public function extract( LocoExtracted $strings, LocoTokensInterface $tokens, $fileref = '' ); abstract protected function fsniff( $str ); abstract protected function decapse( $raw ); abstract protected function comment( $comment ); public function __construct( array $rules ){ $this->rules = $rules; } public function setDomain( $default ){ $this->domain = $default; return $this; } public function headerize( array $tags, $domain = '' ){ if( isset($this->wp[$domain]) ){ $this->wp[$domain] += $tags; } else { $this->wp[$domain] = $tags; } return $this; } protected function getHeaders(){ return $this->wp; } final public function extractSource( $src, $fileref ){ $strings = new LocoExtracted; $this->extract( $strings, $this->tokenize($src), $fileref ); return $strings; } public function rule( $s ){ return isset($this->rules[$s]) ? $this->rules[$s] : ''; } protected function push( LocoExtracted $strings, $rule, array $args, $comment = '', $ref = '' ){ $s = strpos( $rule, 's'); $p = strpos( $rule, 'p'); $c = strpos( $rule, 'c'); $d = strpos( $rule, 'd'); if( false === $s || ! isset($args[$s]) ){ return null; } $msgid = $args[$s]; if( ! is_string($msgid) ){ return null; } $entry = array( 'source' => $msgid, ); if( is_int($c) && isset($args[$c]) ){ $entry['context'] = $args[$c]; } else if( '' === $msgid ){ return null; } if( $ref ){ $entry['refs'] = $ref; } if( is_int($d) && array_key_exists($d,$args) ){ $domain = $args[$d]; if( is_null($domain) ){ $domain = ''; } } else if( '' === $this->domain ) { $domain = $strings->getDomain(); } else { $domain = $this->domain; } $parse_printf = true; if( $comment = $this->comment($comment) ){ if( preg_match('/^xgettext:\\s*([-a-z]+)-format\\s*/mi', $comment, $r, PREG_OFFSET_CAPTURE ) ){ $entry['format'] = $r[1][0]; $comment = trim( substr_replace( $comment,'', $r[0][1], strlen($r[0][0]) ) ); $parse_printf = ( 'no-' === substr($entry['format'],0,3) ) ? false : null; } if( preg_match('/^references?:( *.+:\\d+)*\\s*/mi', $comment, $r, PREG_OFFSET_CAPTURE ) ){ $entry['refs'] = trim($r[1][0],' '); $comment = trim( substr_replace( $comment, '', $r[0][1], strlen($r[0][0]) ) ); } $entry['notes'] = $comment; } if( $parse_printf && ( $format = $this->fsniff($msgid) ) ){ $entry['format'] = $format; } $index = $strings->pushEntry($entry,$domain); if( is_int($p) && isset($args[$p]) ){ $msgid_plural = $args[$p]; $entry = array( 'source' => $msgid_plural, ); if( false !== $parse_printf && ( $format = $this->fsniff($msgid_plural) ) ){ $entry['format'] = $format; } $strings->pushPlural($entry,$index); } return $index; } protected function utf8( $str ){ if( false === preg_match('//u',$str) ){ $str = mb_convert_encoding( $str, 'UTF-8', 'cp1252' ); } return $str; } }
31
  class LocoPHPTokens implements LocoTokensInterface, Countable { private $i; private $tokens; private $skip_tokens = array(); private $literal_tokens = array(); public function __construct( array $tokens ){ $this->tokens = $tokens; $this->rewind(); } public function literal( array $a ){ foreach( $a as $t ){ $this->literal_tokens[ $t ] = 1; } return $this; } public function ignore( array $a ){ foreach( $a as $t ){ $this->skip_tokens[$t] = true; } return $this; } public function export(){ $arr = array(); $this->rewind(); while( $tok = $this->advance() ){ $arr[] = $tok; } return $arr; } public function advance(){ $tok = $this->current(); $this->next(); return $tok; } public function rewind(){ $this->i = ( false === reset($this->tokens) ? null : key($this->tokens) ); } public function valid(){ while( isset($this->i) ){ $tok = $this->tokens[$this->i]; if( array_key_exists( is_array($tok) ? $tok[0] : $tok, $this->skip_tokens ) ){ $this->next(); } else { return true; } } return false; } public function key(){ return $this->i; } public function next(){ $this->i = ( false === next($this->tokens) ? null : key($this->tokens) ); } public function current(){ if( ! $this->valid() ){ return false; } $tok = $this->tokens[$this->i]; if( is_array($tok) && isset($this->literal_tokens[$tok[0]]) ){ return $tok[1]; } return $tok; } public function __toString(){ $s = array(); foreach( $this as $token ){ $s[] = is_array($token) ? $token[1] : $token; } return implode('',$s); } public function count(){ return count($this->tokens); } }
32
- class LocoPHPEscapeParser extends LocoEscapeParser { public function __construct(){ parent::__construct( array( 'n' => "\n", 'r' => "\r", 't' => "\t", 'v' => "\x0B", 'f' => "\x0C", 'e' => "\x1B", '$' => '$', '\\' => '\\', '"' => '"', ) ); } protected function stripSlashes( $s ){ return preg_replace_callback('/\\\\(x[0-9A-Fa-f]{1,2}|[0-3]?[0-7]{1,2})/', array($this,'unescapeMatch'), $s, -1, $n ); } }
33
  function loco_unescape_php_string( $s ){ static $l; if( is_null($l) ) { $l = new LocoPHPEscapeParser; } return $l->unescape($s); }
34
  function loco_decapse_php_string( $s ){ if( ! $s ){ return (string) $s; } $q = $s[0]; if( "'" === $q ){ return str_replace( array('\\'.$q, '\\\\'), array($q, '\\'), substr( $s, 1, -1 ) ); } if( '"' !== $q ){ return $s; } return loco_unescape_php_string( substr($s,1,-1) ); }
35
  function loco_parse_php_comment($comment){ $comment = trim( $comment,"/ \n\r\t" ); if( '' !== $comment && '*' === $comment[0] ){ $lines = array(); $junk = "\r\t/ *"; foreach( explode("\n",$comment) as $line ){ $line = trim($line,$junk); if( '' !== $line ){ $lines[] = $line; } } $comment = implode("\n", $lines); } return $comment; }
36
- function loco_parse_wp_comment( $block ){ $header = array(); if( '*' === $block[1] ){ $junk = "\r\t/ *"; foreach( explode("\n", $block) as $line ){ if( false !== ( $i = strpos($line,':') ) ){ $key = substr($line,0,$i); $val = substr($line,++$i); $header[ trim($key,$junk) ] = trim($val,$junk); } } } return $header; }
37
  function loco_sniff_printf( $s, $p, $limit = 0, $offset = 0 ){ $n = 0; while( is_string($s) && '' !== $s && false !== ( $i = strpos($s,'%',$offset) ) ){ if( 0 !== $i ){ $s = substr( $s, $i ); } if( preg_match( $p, $s, $r ) ){ $match = $r[0]; if( 0 < $n && isset($r[1]) && '' === $r[1] && '%' !== substr($match,-1) ){ return 0; } if( ++$n === $limit ){ break; } $offset = strlen($match); } else { return 0; } } return $n; }
38
  function loco_sniff_php_printf( $s, $limit = 0 ){ return loco_sniff_printf( $s, '/^%(?:[1-9]\\d*\\$)?(?:\'.|[-+0 ])*\\d*(?:\\.\\d+)?[suxXbcdeEfFgGo%]/', $limit ); }
39
  class LocoPHPExtractor extends LocoExtractor { private $defs = array(); public function tokenize( $src ){ return new LocoPHPTokens( token_get_all($src) ); } public function decapse( $raw ){ return loco_decapse_php_string( $raw ); } public function fsniff( $str ){ return loco_sniff_php_printf($str) ? 'php' : ''; } protected function comment( $comment ){ $comment = loco_parse_php_comment($comment); $comment = preg_replace('/^translators:\\s+/mi', '', $comment ); return $comment; } public function define( $name, $value ){ if( is_string($value) ){ $this->defs[$name] = $value; } return $this; } public function extract( LocoExtracted $strings, LocoTokensInterface $tokens, $fileref = '' ){ $tokens->ignore( array(T_WHITESPACE) ); $n = 0; $depth = 0; $comment = ''; $narg = 0; $args = array(); $ref = ''; $rule = ''; $wp = $this->getHeaders(); $tokens->rewind(); while( $tok = $tokens->advance() ){ if( is_string($tok) ){ $s = $tok; $t = null; } else { $t = $tok[0]; $s = $tok[1]; } if( $depth ){ if( ')' === $s || ']' === $s ){ if( 0 === --$depth ){ if( $this->push( $strings, $rule, $args, $comment, $ref ) ){ $n++; } $comment = ''; } } else if( '(' === $s || '[' === $s ){ $depth++; $args[$narg] = null; } else if( 1 === $depth ){ if( ',' === $s ){ $narg++; } else if( T_CONSTANT_ENCAPSED_STRING === $t ){ $s = self::utf8($s); $args[$narg] = $this->decapse($s); } else if( T_STRING === $t && array_key_exists($s,$this->defs) ){ $args[$narg] = $this->defs[$s]; } else { $args[$narg] = null; } } } else if( T_COMMENT === $t || T_DOC_COMMENT === $t ){ $was_header = false; $s = self::utf8($s); if( 0 === $n ){ if( false !== strpos($s,'* @package') ){ $was_header = true; } if( $wp && ( $header = loco_parse_wp_comment($s) ) ){ foreach( $wp as $domain => $tags ){ foreach( array_intersect_key($header,$tags) as $tag => $source ){ $strings->pushMeta( $source, $tags[$tag], (string) $domain ); $was_header = true; } } } } if( ! $was_header ) { $comment = $s; } } else if( T_STRING === $t && '(' === $tokens->advance() && ( $rule = $this->rule($s) ) ){ $ref = $fileref ? $fileref.':'.$tok[2]: ''; $depth = 1; $args = array(); $narg = 0; } else if( $comment ){ if( false === stripos($comment, 'translators:') && false === strpos($comment, 'xgettext:') ){ $comment = ''; } } } return $this; } }
@@ -44,5 +44,5 @@ function loco_wp_extractor( $type = 'php' ){ static $rules = array( '__' => 'sd
44
  function loco_print_percent( $n, $t ){ $s = loco_string_percent( (int) $n, (int) $t ); echo $s,'%'; return ''; }
45
  function loco_print_progress( $translated, $untranslated, $flagged ){ $total = $translated + $untranslated; $complete = loco_string_percent( $translated - $flagged, $total ); $class = 'progress'; if( ! $translated && ! $flagged ){ $class .= ' empty'; } else if( '100' === $complete ){ $class .= ' done'; } echo '<div class="',$class,'"><div class="t">'; if( $flagged ){ $s = loco_string_percent( $flagged, $total ); echo '<div class="bar f" style="width:',$s,'%">&nbsp;</div>'; } if( '0' === $complete ){ echo '&nbsp;'; } else { $class = 'bar p'; $p = (int) $complete; $class .= sprintf(' p-%u', 10*floor($p/10) ); $style = 'width:'.$complete.'%'; if( $flagged ){ $remain = 100.0 - (float) $s; $style .= '; max-width: '.sprintf('%s',$remain).'%'; } echo '<div class="',$class,'" style="'.$style.'">&nbsp;</div>'; } echo '</div><div class="l">',$complete,'%</div></div>'; return ''; }
46
  function loco_string_percent( $n, $t ){ if( ! $t || ! $n ){ $s = '0'; } else if( $t === $n ){ $s = '100'; } else { $dp = 0; $n = 100 * $n / $t; if( $n > 99 ){ $s = number_format( min( $n, 99.9 ), ++$dp ); } else if( $n < 0.5 ){ $n = max( $n, 0.0001 ); do { $s = number_format( $n, ++$dp ); } while( preg_match('/^0\\.0+$/',$s) && $dp < 4 ); $s = substr($s,1); } else { $s = number_format( $n, $dp ); } } return $s; }
47
- class LocoFuzzyMatcher implements Countable { private $pot = array(); private $po = array(); private $diff = array(); private $dmax = .20; public function count(){ return count($this->pot); } public function unmatched(){ return array_values($this->pot); } public function redundant(){ return array_values($this->po); } public function setFuzziness( $s ){ if( $this->po ){ throw new LogicException('Cannot setFuzziness() after calling match()'); } $this->dmax = (float) max( 0, min( (int) $s, 100 ) ) / 100; } public function add( $a ){ $source = isset($a['source']) ? (string) $a['source'] : ''; $context = isset($a['context']) ? (string) $a['context'] : ''; $this->pot[$source."\4".$context] = $a; } public function match( $a ) { $source = isset($a['source']) ? (string) $a['source'] : ''; $context = isset($a['context']) ? (string) $a['context'] : ''; $old = $source."\4".$context; if( isset($this->pot[$old]) ){ $new = $this->pot[$old]; unset($this->pot[$old]); return $new; } $this->po[$old] = $a; $target = isset($a['target']) ? (string) $a['target'] : ''; $comment = isset($a['comment']) ? (string) $a['comment'] : ''; if( '' === $target && '' === $comment ){ return null; } if( 0 < $this->dmax ){ foreach( $this->pot as $new => $_ ){ $dist = $this->distance($old,$new); if( -1 !== $dist ){ $this->diff[] = array( $old, $new, $dist ); } } } return null; } private function distance( $a, $b ){ $a = strtolower($a); $b = strtolower($b); if( $a === $b ){ return 0; } $lenA = strlen($a); $lenB = strlen($b); $lenDiff = abs($lenA-$lenB); $max = min($lenA,$lenB) + $lenDiff; $max = (int) ceil( $this->dmax * $max ); if( $max < $lenDiff ) { return -1; } $len = max($lenA,$lenB); if( $len < 256 ){ $d = levenshtein($a,$b); return $d > $max ? -1 : $d; } $d = 0; for( $i = 0; $i < $len; $i+=$max ){ $aa = substr($a,$i,$max); $bb = substr($b,$i,$max); $d += levenshtein($aa,$bb); if( $d > $max ){ return -1; } } return $d; } public function getFuzzyMatches(){ $pairs = array(); usort( $this->diff, array(__CLASS__,'compareDistance') ); foreach( $this->diff as $pair ){ list($old,$new) = $pair; if( ! array_key_exists($new,$this->pot) || ! array_key_exists($old,$this->po) ){ continue; } $pairs[] = array( $this->po[$old], $this->pot[$new], ); unset($this->po[$old]); unset($this->pot[$new]); if( ! $this->po || ! $this->pot ){ break; } } $this->diff = array(); return $pairs; } private static function compareDistance( array $a, array $b ){ return $a[2] - $b[2]; } }
48
  defined('T_FINALLY') || define('T_FINALLY',500); loco_check_extension('mbstring');
11
  abstract class LocoGettextParser { private $head = null; private $cs = ''; abstract public function parse( $limit = -1 ); protected function setHeader( LocoPoHeaders $head ){ $this->head = $head; $cs = $head->getCharset(); if( is_string($cs) && '' !== $cs ){ if( '' === $this->cs ){ $this->setCharset($cs); } } return $head; } public function getHeader(){ return $this->head; } protected function setCharset( $cs ){ $this->cs = $cs; } protected function getCharset(){ return $this->cs; } protected function str( $str ){ if( '' !== $str ){ $str = loco_convert_utf8($str,$this->cs,false); } return $str; } }
12
  function loco_remove_bom( $s, &$c ){ $bom = substr($s,0,2); if( "\xFF\xFE" === $bom ){ $c = 'UTF-16LE'; return substr($s,2); } if( "\xFE\xFF" === $bom ){ $c = 'UTF-16BE'; return substr($s,2); } if( "\xEF\xBB" === $bom && "\xBF" === $s[2] ){ $c = 'UTF-8'; return substr($s,3); } $c = ''; return $s; }
13
  function loco_parse_reference_id( $refs, &$_id ){ if( false === ( $n = strpos($refs,'loco:') ) ){ $_id = ''; return $refs; } $_id = substr($refs, $n+5, 24 ); $refs = substr_replace( $refs, '', $n, 29 ); return trim( $refs ); }
14
+ class LocoPoParser extends LocoGettextParser implements Iterator { private $lines = array(); private $i; private $k; private $m; public function __construct( $src ){ if( '' !== $src ){ $src = loco_remove_bom($src,$cs); if( $cs && 'UTF-8' !== $cs ){ $src = mb_convert_encoding( $src, 'UTF-8', $cs ); $cs = 'UTF-8'; } if( 'UTF-8' === $cs ){ $this->setCharset('UTF-8'); } $this->lines = preg_split('/(\\r\\n?|\\n)/', $src ); } } public function rewind(){ $this->i = -1; $this->k = -1; $this->next(); } public function valid(){ return is_int($this->i); } public function key(){ return $this->k; } public function current(){ return $this->m; } public function next(){ $valid = false; $entry = array( '#' => array(), 'id' => array(null), 'str' => array(null) ); $i = $this->i; while( array_key_exists(++$i,$this->lines) ){ $line = $this->lines[$i]; try { if( '' === $line ){ if( $valid ){ break; } continue; } $c = $line[0]; if( '#' === $c ){ if( $valid ){ $i--; break; } if( '#' === $line ){ continue; } $f = $line[1]; $entry['#'][$f][] = trim( substr( $line, 1+strlen($f) ), "/ \n\r\t" ); } else if( preg_match('/^msg(id(?:_plural)?|ctxt|str(?:\\[(\\d+)])?)[ \\t]*/', $line, $r ) ){ if( isset($r[2]) ){ $key = 'str'; $idx = (int) $r[2]; } else { $key = $r[1]; $idx = 0; } if( $valid && 'str' !== $key && null !== $entry['str'][0] ){ $i--; break; } $snip = strlen($r[0]); if( '"' !== substr($line,$snip,1) ){ throw new Exception('Expected " to follow msg'.$key); } $val = ''; $line = substr($line,$snip); while( true ){ if( '"' === $line || '"' !== substr($line,-1) ){ throw new Exception('Unterminated msg'.$key ); } $val .= substr( $line, 1, -1 ); $j = $i + 1; if( array_key_exists($j,$this->lines) && ( $line = $this->lines[$j] ) && '"' === $line[0] ){ $i = $j; } else { break; } } if( ! $valid ){ $valid = true; } if( 'id_plural' === $key ){ $key = 'id'; $idx = 1; } $entry[$key][$idx] = stripcslashes($val); } else if( preg_match('/^[ \\t]+$/',$line) ){ if( $valid ) { break; } } else if( '"' === $c ){ throw new Exception('String encountered without keyword'); } else { throw new Exception('Junk'); } } catch( Exception $e ){ } } if( $valid ){ ++$this->k; $this->i = $i; $this->m = $entry; } else { $this->i = null; $this->k = null; $this->m = null; } } public function parse( $limit = -1 ){ $this->rewind(); if( ! $this->valid() ){ throw new Loco_error_ParseException('Invalid PO file'); } $entry = $this->current(); if( '' !== $entry['id'][0] || isset($entry['ctxt']) || is_null($entry['str'][0]) ){ $head = $this->setHeader( new LocoPoHeaders ); } else { $head = $this->setHeader( LocoPoHeaders::fromMsgstr($entry['str'][0]) ); } if( 0 === $limit ){ return array(); } $i = -1; $assets = array(); $lk = $head['X-Loco-Lookup']; while( $this->valid() ){ $entry = $this->current(); $msgid = $entry['id'][0]; if( is_null($msgid) ){ $this->next(); continue; } if( ++$i === $limit ){ return $assets; } $asset = array( 'source' => $this->str( $msgid ), 'target' => $this->str( (string) $entry['str'][0] ), 'context' => null, ); $prev_entry = null; if( isset($entry['ctxt']) ){ $asset['context'] = $this->str( $entry['ctxt'][0] ); } $cmt = $entry['#']; if( isset($cmt[' ']) ){ $asset['comment'] = $this->str( implode("\n", $cmt[' '] ) ); } if( isset($cmt['.']) ){ $asset['notes'] = $this->str( implode("\n", $cmt['.'] ) ); } if( isset($cmt[':']) ){ if( $refs = implode( ' ', $cmt[':'] ) ) { $refs = $this->str($refs); if( $refs = loco_parse_reference_id( $refs, $_id ) ){ $asset['refs'] = $refs; } if( $_id ){ $asset['_id'] = $_id; } } } if( isset($cmt[',']) ){ foreach( $cmt[','] as $flags ){ foreach( explode(',',$flags) as $flag ){ if( $flag = trim($flag," \t") ){ if( preg_match('/^((?:no-)?\w+)-format/', $flag, $r ) ){ $asset['format'] = $r[1]; } else if( 'fuzzy' === $flag ){ $asset['flag'] = 4; } } } } } if( isset($cmt['|']) ){ $p = new LocoPoParser(''); $p->lines = $cmt['|']; $p->setCharset( $this->getCharset() ); try { $prev_entry = $p->parse(); } catch( Loco_error_ParseException $e ){ } if( $prev_entry ){ $msgid = $prev_entry[0]['source']; if( $lk && 'text' !== $lk ){ $asset[$lk] = $asset['source']; $asset['source'] = $msgid; } else if( 'loco:' === substr($msgid,0,5) ){ $asset['_id'] = substr($msgid,5); } else { $asset['prev'] = $prev_entry; $prev_entry = null; } } } $assets[] = $asset; if( isset($entry['id'][1]) ){ $idx = 0; $pidx = count($assets) - 1; $num = max( 2, count($entry['str']) ); while( ++$idx < $num ){ $plural = array( 'source' => '', 'target' => isset($entry['str'][$idx]) ? $this->str($entry['str'][$idx]) : '', 'plural' => $idx, 'parent' => $pidx, ); if( 1 === $idx ){ $plural['source'] = $this->str($entry['id'][1]); if( is_array($prev_entry) && isset($prev_entry[1]) ){ if( $lk && 'text' !== $lk ){ $plural[$lk] = $plural['source']; $plural['source'] = $prev_entry[1]['source']; } } } if( isset($asset['flag']) ){ $plural['flag'] = $asset['flag']; } $assets[] = $plural; } } $this->next(); } if( -1 === $i ){ throw new Loco_error_ParseException('Invalid PO file'); } else if( 0 === $i && '' === $assets[0]['source'] && '' === $assets[0]['target'] ){ throw new Loco_error_ParseException('Invalid PO file' ); } return $assets; } }
15
  class LocoMoParser extends LocoGettextParser { private $bin; private $be; private $n; private $o; private $t; private $v; public function __construct( $bin ){ $this->bin = $bin; } public function getAt( $idx ){ $offset = $this->targetOffset(); $offset += ( $idx * 8 ); $len = $this->integerAt( $offset ); $idx = $this->integerAt( $offset + 4 ); $txt = $this->bytes( $idx, $len ); if( false === strpos( $txt, "\0") ){ return $txt; } return explode( "\0", $txt ); } public function parse( $limit = -1 ){ $i = -1; $r = array(); $sourceOffset = $this->sourceOffset(); $targetOffset = $this->targetOffset(); $soffset = $sourceOffset; $toffset = $targetOffset; while( $soffset < $targetOffset ){ $len = $this->integerAt( $soffset ); $idx = $this->integerAt( $soffset + 4 ); $src = $this->bytes( $idx, $len ); $eot = strpos( $src, "\x04" ); if( false === $eot ){ $context = null; } else { $context = $this->str( substr($src, 0, $eot ) ); $src = substr( $src, $eot+1 ); } $sources = explode( "\0", $src, 2 ); $len = $this->integerAt( $toffset ); $idx = $this->integerAt( $toffset + 4 ); $targets = explode( "\0", $this->bytes( $idx, $len ) ); if( -1 === $i && '' === $sources[0] && is_null($context) ){ $this->setHeader( LocoPoHeaders::fromMsgstr($targets[0]) ); } if( ++$i === $limit ){ break; } $r[$i] = array( 'source' => $this->str( $sources[0] ), 'target' => $this->str( $targets[0] ), 'context' => $context, ); if( isset($sources[1]) ){ $p = count($r) - 1; $nforms = max( 2, count($targets) ); for( $i = 1; $i < $nforms; $i++ ){ $r[] = array( 'source' => isset($sources[$i]) ? $this->str( $sources[$i] ) : sprintf('%s (plural %u)',$r[$p]['source'],$i), 'target' => isset($targets[$i]) ? $this->str( $targets[$i] ) : '', 'parent' => $p, 'plural' => $i, ); } } $soffset += 8; $toffset += 8; } return $r; } public function isBigendian(){ if( is_null($this->be) ){ $str = $this->words( 0, 1 ); if( "\xDE\x12\x04\x95" === $str ){ $this->be = false; } else if( "\x95\x04\x12\xDE" === $str ){ $this->be = true; } else { throw new Loco_error_ParseException('Invalid MO format'); } } return $this->be; } public function version(){ if( is_null($this->v) ){ $this->v = $this->integerWord(1); } return $this->v; } public function count(){ if( is_null($this->n) ){ $this->n = $this->integerWord(2); } return $this->n; } public function sourceOffset(){ if( is_null($this->o) ){ $this->o = $this->integerWord(3); } return $this->o; } public function targetOffset(){ if( is_null($this->t) ){ $this->t = $this->integerWord(4); } return $this->t; } public function getHashTable(){ $s = $this->integerWord(5); $h = $this->integerWord(6); return $this->bytes( $h, $s * 4 ); } private function bytes( $offset, $length ){ $s = substr( $this->bin, $offset, $length ); if( strlen($s) !== $length ){ throw new Loco_error_ParseException('Failed to read '.$length.' bytes at ['.$offset.']' ); } return $s; } private function words( $offset, $length ){ return $this->bytes( $offset * 4, $length * 4 ); } private function integerWord( $offset ){ return $this->integerAt( $offset * 4 ); } private function integerAt( $offset ){ $str = $this->bytes( $offset, 4 ); $fmt = $this->isBigendian() ? 'N' : 'V'; $arr = unpack( $fmt, $str ); if( ! isset($arr[1]) || ! is_int($arr[1]) ){ throw new Loco_error_ParseException('Failed to read integer at byte '.$offset); } return $arr[1]; } }
16
  abstract class LocoPo { public static function pair( $key, $text, $width = 79, $eol = "\n", $esc = '\\n' ){ if( '' === $text ){ return $key.' ""'; } $text = addcslashes( $text, "\t\x0B\x0C\x07\x08\\\"" ); if( $esc ) { $text = preg_replace('/(?:\\r\\n?|\\n)/', $esc.$eol, $text, -1, $nbr ); } else { $eol = "\n"; $text = preg_replace_callback('/(?:\\r\\n?|\\n)/',array(__CLASS__,'replace_br'), $text, -1, $nbr ); } if( $nbr ){ } else if( $width && $width < mb_strlen($text,'UTF-8') + strlen($key) + 3 ){ } else { return $key.' "'.$text.'"'; } $lines = array( $key.' "' ); if( $width ){ $width -= 2; $a = '/^.{0,'.($width-1).'}[-– \\.,:;\\?!\\)\\]\\}\\>]/u'; $b = '/^[^-– \\.,:;\\?!\\)\\]\\}\\>]+/u'; foreach( explode($eol,$text) as $unwrapped ){ $length = mb_strlen( $unwrapped, 'UTF-8' ); while( $length > $width ){ if( preg_match( $a, $unwrapped, $r ) ){ $line = $r[0]; } else if( preg_match( $b, $unwrapped, $r ) ){ $line = $r[0]; } else { throw new Exception('Wrapping error'); } $lines[] = $line; $trunc = mb_strlen($line,'UTF-8'); $length -= $trunc; $unwrapped = (string) substr( $unwrapped, strlen($line) ); if( ( '' === $unwrapped && 0 !== $length ) || ( 0 === $length && '' !== $unwrapped ) ){ throw new Exception('Truncation error'); } } if( 0 !== $length ){ $lines[] = $unwrapped; } } } else { foreach( explode($eol,$text) as $unwrapped ){ $lines[] = $unwrapped; } } return implode('"'.$eol.'"',$lines).'"'; } private static function replace_br( array $r ){ return addcslashes($r[0],"\r\n")."\n"; } public static function refs( $text, $width = 76, $eol = "\n" ){ $text = preg_replace('/\\s+/u', ' ', $text ); if( $width ){ $text = wordwrap( $text, $width, $eol.'#: ', false ); } return '#: '.$text; } public static function prefix( $text, $prefix, $eol = "\n" ){ return $prefix . implode($eol.$prefix, self::split($text) ); } public static function split( $text ){ $lines = preg_split('/\\R/u', $text ); if( false === $lines ){ if( false === preg_match('//u',$text) ){ $text = mb_convert_encoding( $text, 'UTF-8', 'cp1252' ); } $lines = preg_split('/\\r?\\n+/', $text ); } return $lines; } public static function trim( $text ){ $lines = array(); $deferred = null; foreach( explode("\n",$text) as $line ){ if( '' === $line ){ continue; } if( preg_match('/^msg[a-z]+(?:\\[\\d+])? ""/',$line) ){ $deferred = $line; continue; } if( $deferred && '"' === $line[0] ){ $lines[] = $deferred; $deferred = null; } $lines[] = $line; } return implode("\n",$lines); } }
17
  class LocoPoIndex extends ArrayIterator { public function compare( LocoPoMessage $a, LocoPoMessage $b ){ $h = $a->getHash(); if( ! isset($this[$h]) ){ return 1; } $j = $b->getHash(); if( ! isset($this[$j]) ){ return -1; } return $this[$h] > $this[$j] ? 1 : -1; } }
18
+ class LocoPoMessage extends ArrayObject { public function __construct( array $r ){ $r['key'] = $r['source']; parent::__construct($r); } public function __get( $prop ){ return $this->offsetExists($prop) ? $this->offsetGet($prop) : null; } private function _getFlags(){ $flags = array(); $plurals = $this->__get('plurals'); if( 4 === $this->__get('flag') ){ $flags[] = 'fuzzy'; } else if( $plurals ){ foreach( $plurals as $child ){ if( 4 === $child->__get('flag') ){ $flags[] = 'fuzzy'; break; } } } if( $f = $this->__get('format') ){ $flags[] = $f.'-format'; } else if( isset($plurals[0]) && ( $f = $plurals[0]->format ) ){ $flags[] = $f.'-format'; } return $flags; } public function getHash(){ $hash = $this->getKey(); if( $this->offsetExists('plurals') ){ foreach( $this->offsetGet('plurals') as $p ){ $hash .= "\0".$p->getHash(); break; } } return $hash; } public function getKey(){ $msgid = (string) $this['source']; $msgctxt = (string) $this->__get('context'); if( '' !== $msgctxt ){ if( '' === $msgid ){ $msgid = '('.$msgctxt.')'; } $msgid = $msgctxt."\4".$msgid; } return $msgid; } public function exportSerial(){ $a = array( $this['target'] ); if( $this->offsetExists('plurals') ){ $plurals = $this->offsetGet('plurals'); if( is_array($plurals) ){ foreach( $plurals as $i => $p ){ $a[] = $p['target']; } } } return $a; } public function __toString(){ return $this->render( 79, 76 ); } public function render( $width, $ref_width ){ $s = array(); try { if( $text = $this->__get('comment') ) { $s[] = LocoPo::prefix( $text, '# '); } if( $text = $this->__get('notes') ) { $s[] = LocoPo::prefix( $text, '#. '); } if( $text = $this->__get('refs') ){ $s[] = LocoPo::refs( $text, $ref_width ); } if( $texts = $this->_getFlags() ){ $s[] = '#, '.implode(', ',$texts); } $prev = $this->__get('prev'); if( is_array($prev) && $prev ){ foreach( new LocoPoIterator($prev) as $p ){ $text = $p->render( max(0,$width-3), 0 ); $s[] = LocoPo::prefix( LocoPo::trim($text),'#| '); break; } } $text = $this->__get('context'); if( is_string($text) && '' !== $text ){ $s[] = LocoPo::pair('msgctxt', $text, $width ); } $s[] = LocoPo::pair( 'msgid', $this['source'], $width ); $target = $this['target']; $plurals = $this->__get('plurals'); if( is_array($plurals) ){ if( $plurals ){ foreach( $plurals as $i => $p ){ if( 0 === $i ){ $s[] = LocoPo::pair('msgid_plural', $p['source'], $width ); $s[] = LocoPo::pair('msgstr[0]', $target, $width ); } $s[] = LocoPo::pair('msgstr['.(++$i).']', $p['target'], $width ); } } else if( isset($this['plural_key']) ){ $s[] = LocoPo::pair('msgid_plural', $this['plural_key'], $width ); $s[] = LocoPo::pair('msgstr[0]', $target, $width ); } else { trigger_error('Missing plural_key in zero plural export'); $s[] = LocoPo::pair('msgstr', $target, $width ); } } else { $s[] = LocoPo::pair('msgstr', $target, $width ); } } catch( Exception $e ){ trigger_error( $e->getMessage(), E_USER_WARNING ); } return implode("\n",$s)."\n"; } public function merge( LocoPoMessage $def, $translate = false ){ if( $def->getHash() !== $this->getHash() ){ $prev = array( 'source' => '', 'target' => '' ); $prev = $this->diff('source',$def,$prev); $prev = $this->diff('context',$def,$prev); $this['flag'] = 4; $this['prev'] = array( $prev ); $defPlural = $def->getPlural(0); $ourPlural = $this->getPlural(0); if( $defPlural && $ourPlural ) { $ourPlural->merge($defPlural); if( $ourPlural->offsetExists('prev') ) { $this['prev'][] = $ourPlural->prev[0]+array('parent'=>0,'plural'=>1); $ourPlural->offsetUnset('prev'); } } else if( $defPlural ){ $this['plurals'] = array( clone $defPlural ); } else if( $ourPlural ){ $this['prev'][] = $ourPlural->exportBasic() + array('parent'=>0,'plural'=>1); $this->offsetUnset('plurals'); } } foreach( array('notes','refs') as $f ){ if( $def->offsetExists($f) ){ $this->offsetSet($f,$def->offsetGet($f)); } else if( $this->offsetExists($f) ){ $this->offsetUnset($f); } } if( $translate && '' === $this['target'] && '' !== $def['target'] ){ $this['target'] = $def['target']; if( $def->offsetExists('comment') ) { $this['comment'] = $def['comment']; } if( $this->offsetExists('plurals') ){ foreach( $this['plurals'] as $i => $ourPlural ){ if( '' === $ourPlural['target'] ){ $defPlural = $def->getPlural($i); if( $defPlural ){ $ourPlural['target'] = $defPlural['target']; } } } } } } private function diff( $key, LocoPoMessage $def, array $prev ){ $old = $this->__get($key); $new = $def->__get($key); if( $new !== $old ){ $this->offsetSet($key,$new); if( is_string($old) && '' !== $old ){ $prev[$key] = $old; } } return $prev; } private function getPlural( $i ){ if( $this->offsetExists('plurals') ){ $plurals = $this->offsetGet('plurals'); if( is_array($plurals) && array_key_exists($i,$plurals) ){ return $plurals[$i]; } } return null; } private function exportBasic(){ return array( 'source' => $this['source'], 'context' => $this->context, 'target' => '', ); } public function export(){ $a = $this->getArrayCopy(); unset($a['key']); if( array_key_exists('plurals',$a) ){ foreach( $a['plurals'] as $i => $p ){ if( $p instanceof ArrayObject ){ $a['plurals'][$i] = $p->getArrayCopy(); } } } return $a; } public function countForms(){ $len = 1; if( $this->offsetExists('plurals') ){ $plurals = $this->offsetGet('plurals'); $len += count($plurals); } return $len; } public function strip(){ $this['target'] = ''; $plurals = $this->plurals; if( is_array($plurals) ){ foreach( $plurals as $p ){ $p->strip(); } } return $this; } public function translated(){ $n = 0; if( '' !== (string) $this['target'] ){ $n++; } if( $this->offsetExists('plurals') ){ foreach( $this->offsetGet('plurals') as $plural ) { if( '' !== (string) $plural['target']) { $n++; } } } return $n; } }
19
+ class LocoPoIterator implements Iterator, Countable { private $po; private $headers = null; private $i; private $t; private $j; private $z = 0; private $w = 79; public function __construct( $po ){ if( is_array($po) ){ $this->po = $po; } else if( $po instanceof Traversable ){ $this->po = iterator_to_array($po,false); } else { throw new InvalidArgumentException('PO data must be array or iterator'); } $this->t = count($po); if( 0 === $this->t ){ throw new InvalidArgumentException('Empty PO data'); } $h = $po[0]; if( '' !== $h['source'] || ( isset($h['context']) && '' !== $h['context'] ) || ( isset($po[1]['parent']) && 0 === $po[1]['parent'] ) ){ $this->z = -1; } } public function push( LocoPoMessage $p ){ $raw = $p->export(); $plurals = $p->plurals; unset($raw['plurals']); $i = count($this->po); $this->po[$i] = $raw; $this->t++; if( is_array($plurals) ) { $j = 0; foreach( $plurals as $p ) { $raw = $p->export(); $raw['parent'] = $i; $raw['plural'] = ++$j; $this->po[] = $raw; $this->t++; } } } public function concat( LocoPoIterator $more ){ foreach( $more as $message ){ $this->push($message); } return $this; } public function __clone(){ if( $this->headers ){ $this->headers = new LocoPoHeaders( $this->headers->getArrayCopy() ); } } public function count(){ return $this->t - ( $this->z + 1 ); } public function wrap( $width ){ $width = (int) $width; if( $width > 0 ){ $this->w = max( 15, $width ); } else { $this->w = 0; } return $this; } public function rewind(){ $this->i = $this->z; $this->j = -1; $this->next(); } public function key(){ return $this->j; } public function valid(){ return is_int($this->i); } public function next(){ $i = $this->i; while( ++$i < $this->t ){ if( array_key_exists('parent',$this->po[$i]) ){ continue; } $this->j++; $this->i = $i; return; } $this->i = null; $this->j = null; } public function current(){ $i = $this->i; $po = $this->po; $parent = new LocoPoMessage( $po[$i] ); $plurals = array(); $nonseq = $parent->offsetExists('child'); $j = $nonseq ? $parent['child'] : $i+1; while( isset($po[$j]['parent']) && $i === $po[$j]['parent'] ){ $plurals[] = new LocoPoMessage($po[$j++]); } if( $plurals ){ $parent['plurals'] = $plurals; } return $parent; } public function getArrayCopy(){ $po = $this->po; if( 0 === $this->z ){ $po[0]['target'] = (string) $this->getHeaders(); } return $po; } public function clear(){ if( 0 === $this->z ){ $this->po = array( $this->po[0] ); $this->t = 1; } else { $this->po = array(); $this->t = 0; } } public function getHeaders(){ if( is_null($this->headers) ){ $header = $this->po[0]; if( 0 === $this->z ){ $this->headers = LocoPoHeaders::fromMsgstr( $header['target'] ); } else { $this->headers = new LocoPoHeaders; } } return $this->headers; } public function setHeaders( LocoPoHeaders $head ){ $this->headers = $head; if( 0 === $this->z ){ $this->po[0]['target'] = null; } return $this; } public function initPo(){ if( 0 === $this->z ){ unset( $this->po[0]['flag'] ); } return $this; } public function initPot(){ if( 0 === $this->z ){ $this->po[0]['flag'] = 4; } return $this; } public function strip(){ $po = $this->po; $i = count($po); $z = $this->z; while( --$i > $z ){ $po[$i]['target'] = ''; } $this->po = $po; return $this; } public function __toString(){ try { return $this->render(); } catch( Exception $e ){ trigger_error( $e->getMessage(), E_USER_WARNING ); return ''; } } public function render( $sorter = null ){ $width = $this->w; $ref_width = max( 0, $width - 3 ); $h = $this->exportHeader(); $msg = new LocoPoMessage( $h ); $s = $msg->render( $width, $ref_width ); if( $sorter ){ if( ! is_callable($sorter) ){ throw new InvalidArgumentException('Bad callback'); } $msgs = array(); foreach( $this as $msg ){ $msgs[] = $msg; } usort( $msgs, $sorter ); } else { $msgs = $this; } foreach( $msgs as $msg ){ $s .= "\n".$msg->render( $width, $ref_width ); } return $s; } public function exportJed(){ $head = $this->getHeaders(); $a = array( '' => array( 'domain' => $head['domain'], 'lang' => $head['language'], 'plural-forms' => $head['plural-forms'], ) ); foreach( $this as $message ){ if( $message->translated() ){ $a[ $message->getKey() ] = $message->exportSerial(); } } return $a; } private function exportHeader(){ if( 0 === $this->z ){ $h = $this->po[0]; } else { $h = array( 'source' => '', 'target' => '' ); } if( $this->headers ){ $h['target'] = (string) $this->headers; } return $h; } public function exportRefs( $grep = '' ){ $a = array(); if( '' === $grep ) { $grep = '/(\\S+):\\d+/'; } else { $grep = '/(\\S*'.$grep.'):\\d+/'; } $self = get_class($this); $base = array( $this->exportHeader() ); foreach( $this as $message ){ if( preg_match_all( $grep, (string) $message->refs, $r ) ){ foreach( $r[1] as $ref ) { if( array_key_exists($ref,$a) ){ $po = $a[$ref]; } else { $po = new $self($base); $a[$ref] = $po; } $po->push($message); } } } return $a; } public function splitRefs( array $map = null ){ $a = array(); $self = get_class($this); $base = array( $this->exportHeader() ); if( is_array($map) ){ $grep = implode('|',array_keys($map)); } else { $grep = '[a-z]+'; } foreach( $this as $message ){ $refs = ltrim( (string) $message->refs ); if( '' !== $refs ){ if( preg_match_all('/\\S+\\.('.$grep.'):\\d+/', $refs, $r, PREG_SET_ORDER ) ){ $tmp = array(); foreach( $r as $rr ) { list( $ref, $ext ) = $rr; $tmp[$ext][$ref] = true; } foreach( $tmp as $ext => $refs ){ if( is_array($map) ){ $ext = $map[$ext]; } if( array_key_exists($ext,$a) ){ $po = $a[$ext]; } else { $po = new $self($base); $a[$ext] = $po; } $message = clone $message; $message['refs'] = implode(' ',array_keys($refs) ); $po->push($message); } } } } return $a; } public function getHashes(){ $a = array(); foreach( $this as $msg ){ $a[] = $msg->getHash(); } sort( $a, SORT_STRING ); return $a; } public function equalSource( LocoPoIterator $that ){ $a = $this->getHashes(); $b = $that->getHashes(); if( count($a) !== count($b) ){ return false; } foreach( $a as $i => $hash ){ if( $hash !== $b[$i] ){ return false; } } return true; } public function equal( LocoPoIterator $that ){ if( $this->t !== $that->t ){ return false; } $i = $this->z; $fields = array( 'source', 'context', 'notes', 'refs', 'target', 'comment', 'flag', 'parent', 'plural' ); while( ++$i < $this->t ){ $a = $this->po[$i]; $b = $that->po[$i]; foreach( $fields as $f ){ $af = isset($a[$f]) ? $a[$f] : ''; $bf = isset($b[$f]) ? $b[$f] : ''; if( $af !== $bf ){ return false; } } } return true; } public function sort( $func = null ){ $order = array(); foreach( $this as $msg ){ $order[] = $msg; } if( is_null($func) ){ $func = array( __CLASS__, 'compare' ); } else if( ! is_callable($func) ){ throw new InvalidArgumentException('Bad callback'); } usort( $order, $func ); $this->clear(); foreach( $order as $p ){ $this->push($p); } return $this; } public static function compare( LocoPoMessage $a, LocoPoMessage $b ){ $h = $a->getHash(); $j = $b->getHash(); $n = strcasecmp( $h, $j ); if( 0 === $n ){ $n = strcmp( $h, $j ); if( 0 === $n ){ return 0; } } return $n > 0 ? 1 : -1; } public function createSorter(){ $index = array(); foreach( $this as $i => $msg ){ $index[ $msg->getHash() ] = $i; } $obj = new LocoPoIndex( $index ); return array( $obj, 'compare' ); } }
20
  class LocoMoTable { private $size = 0; private $bin = ''; private $map; public function __construct( $data = null ){ if( is_array($data) ){ $this->compile( $data ); } else if( $data ){ $this->parse( $data ); } } public function count(){ if( ! isset($this->size) ){ if( $this->bin ){ $this->size = (int) ( strlen( $this->bin ) / 4 ); } else if( is_array($this->map) ){ $this->size = count($this->map); } else { return 0; } if( ! self::is_prime($this->size) || $this->size < 3 ){ throw new Exception('Size expected to be prime number above 2, got '.$this->size); } } return $this->size; } public function bytes(){ return $this->count() * 4; } public function __toString(){ return $this->bin; } public function export(){ if( ! is_array($this->map) ){ $this->parse( $this->bin ); } return $this->map; } private function reset( $length ){ $this->size = max( 3, self::next_prime ( $length * 4 / 3 ) ); $this->bin = null; $this->map = array(); return $this->size; } public function compile( array $msgids ){ $hash_tab_size = $this->reset( count($msgids) ); $packed = array_fill( 0, $hash_tab_size, "\0\0\0\0" ); $j = 0; foreach( $msgids as $msgid ){ $hash_val = self::hashpjw( $msgid ); $idx = $hash_val % $hash_tab_size; if( array_key_exists($idx, $this->map) ){ $incr = 1 + ( $hash_val % ( $hash_tab_size - 2 ) ); do { $idx += $incr; if( $hash_val === $idx ){ throw new Exception('Unable to find empty slot in hash table'); } $idx %= $hash_tab_size; } while( array_key_exists($idx, $this->map ) ); } $this->map[$idx] = $j; $packed[$idx] = pack('V', ++$j ); } return $this->bin = implode('',$packed); } public function lookup( $msgid, array $msgids ){ $hash_val = self::hashpjw( $msgid ); $idx = $hash_val % $this->size; $incr = 1 + ( $hash_val % ( $this->size - 2 ) ); while( true ){ if( ! array_key_exists($idx, $this->map) ){ break; } $j = $this->map[$idx]; if( isset($msgids[$j]) && $msgid === $msgids[$j] ){ return $j; } $idx += $incr; if( $idx === $hash_val ){ break; } $idx %= $this->size; } return -1; } public function parse( $bin ){ $this->bin = (string) $bin; $this->size = null; $hash_tab_size = $this->count(); $this->map = array(); $idx = -1; $byte = 0; while( ++$idx < $hash_tab_size ){ $word = substr( $this->bin, $byte, 4 ); if( "\0\0\0\0" !== $word ){ list(,$j) = unpack('V', $word ); $this->map[$idx] = $j - 1; } $byte += 4; } return $this->map; } public static function hashpjw( $str ){ $i = -1; $hval = 0; $len = strlen($str); while( ++$i < $len ){ $ord = ord( substr($str,$i,1) ); $hval = ( $hval << 4 ) + $ord; $g = $hval & 0xf0000000; if( $g !== 0 ){ $hval ^= $g >> 24; $hval ^= $g; } } return $hval; } private static function next_prime( $seed ){ $seed |= 1; while ( ! self::is_prime($seed) ){ $seed += 2; } return $seed; } private static function is_prime( $num ) { if ($num === 1 ){ return false; } if( $num === 2 ){ return true; } if( $num % 2 == 0 ) { return false; } for( $i = 3; $i <= ceil(sqrt($num)); $i = $i + 2) { if($num % $i == 0 ){ return false; } } return true; } }
21
  class LocoMo { private $bin; private $msgs; private $head; private $hash; private $use_fuzzy = false; private $cs; public function __construct( Iterator $export, LocoPoHeaders $head = null ){ if( $head ){ $this->head = $head; } else { $this->head = new LocoPoHeaders; $this->setHeader('Project-Id-Version','Loco'); } $this->msgs = $export; $this->bin = ''; } public function setCharset( $cs ){ $cs = $this->head->setCharset($cs); $this->cs = 'UTF-8' === $cs ? null : $cs; } public function enableHash(){ return $this->hash = new LocoMoTable; } public function useFuzzy(){ $this->use_fuzzy = true; } public function setHeader( $key, $val ){ $this->head->add($key, $val); return $this; } private function str( $s ){ $s = (string) $s; if( $cs = $this->cs ){ $s = mb_convert_encoding($s,$cs,array('UTF-8')); } return $s; } public function compile(){ $table = array(''); $sources = array(''); $targets = array( (string) $this->head ); $fuzzy_flag = 4; $skip_fuzzy = ! $this->use_fuzzy; foreach( $this->msgs as $r ){ if( $skip_fuzzy && isset($r['flag']) && $fuzzy_flag === $r['flag'] ){ continue; } $msgid = $this->str( $r['key'] ); if( isset($r['context']) ){ $msgctxt = $this->str( $r['context'] ); if( '' !== $msgctxt ){ if( '' === $msgid ){ $msgid = '('.$msgctxt.')'; } $msgid = $msgctxt."\x04".$msgid; } } if( '' === $msgid ){ continue; } $msgstr = $this->str( $r['target'] ); if( '' === $msgstr ){ continue; } $table[] = $msgid; if( isset($r['plurals']) ){ foreach( $r['plurals'] as $i => $p ){ if( $i === 0 ){ $msgid .= "\0".$p['key']; } $msgstr .= "\0".$p['target']; } } $sources[] = $msgid; $targets[] = $msgstr; } asort( $sources, SORT_STRING ); $this->bin = "\xDE\x12\x04\x95\x00\x00\x00\x00"; $n = count($sources); $this->writeInteger( $n ); $offset = 28; $this->writeInteger( $offset ); $offset += $n * 8; $this->writeInteger( $offset ); if( $this->hash ){ sort( $table, SORT_STRING ); $this->hash->compile( $table ); $s = $this->hash->count(); } else { $s = 0; } $this->writeInteger( $s ); $offset += $n * 8; $this->writeInteger( $offset ); if( $s ){ $offset += $s * 4; } $source = ''; foreach( $sources as $i => $str ){ $source .= $str."\0"; $this->writeInteger( $strlen = strlen($str) ); $this->writeInteger( $offset ); $offset += $strlen + 1; } $target = ''; foreach( array_keys($sources) as $i ){ $str = $targets[$i]; $target .= $str."\0"; $this->writeInteger( $strlen = strlen($str) ); $this->writeInteger( $offset ); $offset += $strlen + 1; } if( $this->hash ){ $this->bin .= $this->hash->__toString(); } $this->bin .= $source; $this->bin .= $target; return $this->bin; } private function writeInteger( $num ){ $this->bin .= pack( 'V', $num ); return $this; } }
22
  interface LocoTokensInterface extends Iterator { public function advance(); public function ignore( array $a ); }
24
  function loco_utf8_chr( $u ){ if( $u < 0x80 ){ if( $u < 0 ){ throw new RangeException( sprintf('%d is out of Unicode range', $u ) ); } return chr($u); } if( $u < 0x800 ) { return chr( ($u>>6) & 0x1F | 0xC0 ).chr( $u & 0x3F | 0x80 ); } if( $u < 0x10000 ) { return chr( $u>>12 & 15 | 0xE0 ).chr( $u>>6 & 0x3F | 0x80 ).chr( $u & 0x3F | 0x80 ); } if( $u < 0x110000 ) { return chr( $u>>18 & 7 | 0xF0 ).chr( $u>>12 & 0x3F | 0x80 ).chr( $u>>6 & 0x3F | 0x80 ).chr( $u & 0x3F | 0x80 ); } throw new RangeException( sprintf('\\x%X is out of Unicode range', $u ) ); }
25
  function loco_resolve_surrogates( $s ){ return preg_replace_callback('/\\xED([\\xA0-\\xAF])([\\x80-\\xBF])\\xED([\\xB0-\\xBF])([\\x80-\\xBF])/', '_loco_resolve_surrogates', $s ); }
26
  function _loco_resolve_surrogates( array $r ){ return loco_utf8_chr ( ( ( ( ( 832 | ( ord($r[1]) & 0x3F ) ) << 6 ) | ( ord($r[2]) & 0x3F ) ) - 0xD800 ) * 0x400 + ( ( ( ( 832 | ( ord($r[3]) & 0x3F ) ) << 6 ) | ( ord($r[4]) & 0x3F ) ) - 0xDC00 ) + 0x10000 ); }
27
+ class LocoEscapeParser { private $map; private $grep; public function __construct( array $map = array() ){ $this->map = $map; $rules = array('\\\\'); if( $map ){ $rules[] = '['.implode(array_keys($map)).']'; } if( ! isset($map['U']) ) { $rules[] = 'U[0-9A-Fa-f]{5,8}'; } if( ! isset($map['u']) ) { $rules[] = 'u(?:\\{[0-9A-Fa-f]+\\}|[0-9A-Fa-f]{1,4})(?:\\\\u(?:\\{[0-9A-Fa-f]+\\}|[0-9A-Fa-f]{1,4}))*'; } $this->grep = '/\\\\('.implode('|',$rules).')/'; } final public function unescape( $s ) { if( '' !== $s ) { return $this->stripSlashes( preg_replace_callback($this->grep, array($this, 'unescapeMatch'), $s) ); } return ''; } final public function unescapeMatch( array $r ) { $s = $r[0]; $c = $s[1]; if( isset($this->map[$c]) ){ return $this->map[$c]; } if( 'u' === $c ){ $str = ''; $surrogates = false; foreach( explode('\\u',$s) as $i => $h ){ if( '' !== $h ){ $h = ltrim( trim($h,'{}'),'0'); $u = intval($h,16); $str.= loco_utf8_chr($u); if( ! $surrogates ){ $surrogates = $u >= 0xD800 && $u <= 0xDBFF; } } } if( $surrogates ){ $str = loco_resolve_surrogates($str); } return $str; } if( 'U' === $c ){ return loco_utf8_chr( intval(substr($s,2),16) ); } if( 'x' === $c ){ return chr( intval(substr($s,2),16) ); } if( ctype_digit($c) ){ return chr( intval(substr($s,1),8) ); } return $s; } protected function stripSlashes( $s ) { return stripcslashes($s); } }
28
  class LocoJsTokens extends LocoTokenizer { const T_KWORD = 1; const T_REGEX = 2; private static $lex; protected static $words = array( 'true' => 1, 'false' => 1, 'null' => 1, 'break' => T_BREAK, 'else' => T_ELSE, 'new' => T_NEW, 'var' => 1, 'case' => T_CASE, 'finally' => T_FINALLY, 'return' => T_RETURN, 'void' => 1, 'catch' => T_CATCH, 'for' => T_FOR, 'switch' => T_SWITCH, 'while' => T_WHILE, 'continue' => T_CONTINUE, 'function' => T_FUNCTION, 'this' => T_STRING, 'with' => 1, 'default' => T_DEFAULT, 'if' => T_IF, 'throw' => T_THROW, 'delete' => 1, 'in' => 1, 'try' => T_TRY, 'do' => T_DO, 'instanceof' => 1, 'typeof' => 1, ); public static function decapse( $encapsed ){ $s = substr($encapsed,1,-1); $l = self::$lex; if( is_null($l) ){ $l = new LocoEscapeParser( array( 'U' => 'U', 'a' => 'a', ) ); self::$lex = $l; } return $l->unescape($s); } public function __construct( $src = '' ){ $this->define('/^(?:\\\\u[0-9A-F]{4,4}|[$_\\pL\\p{Nl}])(?:\\\\u[0-9A-F]{4}|[$_\\pL\\pN\\p{Mn}\\p{Mc}\\p{Pc}])*/ui', array($this,'matchWord') ); $this->define('/^\\s+/u', T_WHITESPACE ); $this->define('!^//.*!', T_COMMENT ); $this->define('!^/\\*.*\\*/!Us', array($this,'matchComment') ); $this->define('/^"(?:\\\\.|[^\\r\\n\\p{Zl}\\p{Zp}"\\\\])*"/u', T_CONSTANT_ENCAPSED_STRING ); $this->define('/^\'(?:\\\\.|[^\\r\\n\\p{Zl}\\p{Zp}\'\\\\])*\'/u', T_CONSTANT_ENCAPSED_STRING ); $this->define('/^[-+;,<>.=:|&^!?*%~(){}[\\]]/'); parent::__construct($src); } public function matchWord( $s ){ if( array_key_exists($s,self::$words) ){ return self::$words[$s]; } return T_STRING; } public function matchComment( $s ){ if( '/**' === substr($s,0,3) ){ return T_DOC_COMMENT; } return T_COMMENT; } }
29
  class LocoExtracted implements Countable { private $exp = array(); private $reg = array(); private $dom = array(); private $dflt = ''; public function extractSource( LocoExtractor $ext, $src, $fileref = '' ){ $ext->extract( $this, $ext->tokenize($src), $fileref ); return $this; } public function export(){ return $this->exp; } public function count(){ return count( $this->exp ); } public function getDomainCounts(){ return $this->dom; } public function setDomain( $default ){ $this->dflt = (string) $default; return $this; } public function getDomain(){ return $this->dflt; } private function key( array $entry ){ $key = (string) $entry['source']; foreach( array('context','domain') as $i => $prop ){ if( array_key_exists($prop,$entry) ) { $add = (string) $entry[$prop]; if( '' !== $add ){ $key .= ord($i).$add; } } } return $key; } public function pushMeta( $source, $notes, $domain = '' ){ if( '' === $domain || '*' === $domain ){ $domain = $this->dflt; } return $this->pushEntry( array( 'source' => $source, 'notes' => $notes, ), $domain ); } public function pushEntry( array $entry, $domain = '' ){ $entry['id'] = ''; $entry['target'] = ''; $entry['domain'] = $domain; $key = $this->key($entry); if( isset($this->reg[$key]) ){ $index = $this->reg[$key]; $clash = $this->exp[$index]; if( $value = $this->mergeField( $clash, $entry, 'refs', ' ') ){ $this->exp[$index]['refs'] = $value; } if( $value = $this->mergeField( $clash, $entry, 'notes', "\n") ){ $this->exp[$index]['notes'] = $value; } } else { $index = count($this->exp); $this->reg[$key] = $index; $this->exp[$index] = $entry; if( isset($this->dom[$domain]) ){ $this->dom[$domain]++; } else { $this->dom[$domain] = 1; } } return $index; } public function pushPlural( array $entry, $sindex ){ $parent = $this->exp[$sindex]; $domain = $parent['domain']; $pkey = $this->key($parent)."\2"; if( ! array_key_exists($pkey,$this->reg) ){ $pindex = count($this->exp); $this->reg[$pkey] = $pindex; $entry += array( 'id' => '', 'target' => '', 'plural' => 1, 'parent' => $sindex, 'domain' => $domain, ); $this->exp[$pindex] = $entry; if( isset($entry['format']) && ! isset( $parent['format']) ) { $this->exp[$sindex]['format'] = $entry['format']; } if( $pindex !== $sindex + $entry['plural']) { $this->exp[$sindex]['child'] = $pindex; } } } public function mergeField( array $old, array $new, $field, $glue ){ $prev = isset($old[$field]) ? $old[$field] : ''; if( isset($new[$field]) ){ $text = $new[$field]; if( '' !== $prev && $prev !== $text ){ if( 'notes' === $field && preg_match( '/^'.preg_quote( rtrim($text,'. '),'/').'[. ]*$/mu', $prev ) ) { $text = $prev; } else { $text = $prev.$glue.$text; } } return $text; } return $prev; } public function filter( $domain ){ $map = array(); $newOffset = 1; $matchAll = '*' === $domain; $raw = array( array( 'id' => '', 'source' => '', 'target' => '', 'domain' => $matchAll ? '' : $domain, ) ); foreach( $this->exp as $oldOffset => $r ){ if( isset($r['parent']) ){ if( isset($map[$r['parent']]) ){ $r['parent'] = $map[ $r['parent'] ]; $raw[ $newOffset++ ] = $r; } } else { if( $matchAll ){ $match = true; } else if( isset($r['domain']) ){ $match = $domain === $r['domain']; } else { $match = $domain === ''; } if( $match ){ $map[ $oldOffset ] = $newOffset; $raw[ $newOffset++ ] = $r; } } } return $raw; } }
30
  abstract class LocoExtractor { private $rules; private $wp = array(); private $domain = ''; abstract public function tokenize( $src ); abstract public function extract( LocoExtracted $strings, LocoTokensInterface $tokens, $fileref = '' ); abstract protected function fsniff( $str ); abstract protected function decapse( $raw ); abstract protected function comment( $comment ); public function __construct( array $rules ){ $this->rules = $rules; } public function setDomain( $default ){ $this->domain = $default; return $this; } public function headerize( array $tags, $domain = '' ){ if( isset($this->wp[$domain]) ){ $this->wp[$domain] += $tags; } else { $this->wp[$domain] = $tags; } return $this; } protected function getHeaders(){ return $this->wp; } final public function extractSource( $src, $fileref ){ $strings = new LocoExtracted; $this->extract( $strings, $this->tokenize($src), $fileref ); return $strings; } public function rule( $s ){ return isset($this->rules[$s]) ? $this->rules[$s] : ''; } protected function push( LocoExtracted $strings, $rule, array $args, $comment = '', $ref = '' ){ $s = strpos( $rule, 's'); $p = strpos( $rule, 'p'); $c = strpos( $rule, 'c'); $d = strpos( $rule, 'd'); if( false === $s || ! isset($args[$s]) ){ return null; } $msgid = $args[$s]; if( ! is_string($msgid) ){ return null; } $entry = array( 'source' => $msgid, ); if( is_int($c) && isset($args[$c]) ){ $entry['context'] = $args[$c]; } else if( '' === $msgid ){ return null; } if( $ref ){ $entry['refs'] = $ref; } if( is_int($d) && array_key_exists($d,$args) ){ $domain = $args[$d]; if( is_null($domain) ){ $domain = ''; } } else if( '' === $this->domain ) { $domain = $strings->getDomain(); } else { $domain = $this->domain; } $parse_printf = true; if( $comment = $this->comment($comment) ){ if( preg_match('/^xgettext:\\s*([-a-z]+)-format\\s*/mi', $comment, $r, PREG_OFFSET_CAPTURE ) ){ $entry['format'] = $r[1][0]; $comment = trim( substr_replace( $comment,'', $r[0][1], strlen($r[0][0]) ) ); $parse_printf = ( 'no-' === substr($entry['format'],0,3) ) ? false : null; } if( preg_match('/^references?:( *.+:\\d+)*\\s*/mi', $comment, $r, PREG_OFFSET_CAPTURE ) ){ $entry['refs'] = trim($r[1][0],' '); $comment = trim( substr_replace( $comment, '', $r[0][1], strlen($r[0][0]) ) ); } $entry['notes'] = $comment; } if( $parse_printf && ( $format = $this->fsniff($msgid) ) ){ $entry['format'] = $format; } $index = $strings->pushEntry($entry,$domain); if( is_int($p) && isset($args[$p]) ){ $msgid_plural = $args[$p]; $entry = array( 'source' => $msgid_plural, ); if( false !== $parse_printf && ( $format = $this->fsniff($msgid_plural) ) ){ $entry['format'] = $format; } $strings->pushPlural($entry,$index); } return $index; } protected function utf8( $str ){ if( false === preg_match('//u',$str) ){ $str = mb_convert_encoding( $str, 'UTF-8', 'cp1252' ); } return $str; } }
31
  class LocoPHPTokens implements LocoTokensInterface, Countable { private $i; private $tokens; private $skip_tokens = array(); private $literal_tokens = array(); public function __construct( array $tokens ){ $this->tokens = $tokens; $this->rewind(); } public function literal( array $a ){ foreach( $a as $t ){ $this->literal_tokens[ $t ] = 1; } return $this; } public function ignore( array $a ){ foreach( $a as $t ){ $this->skip_tokens[$t] = true; } return $this; } public function export(){ $arr = array(); $this->rewind(); while( $tok = $this->advance() ){ $arr[] = $tok; } return $arr; } public function advance(){ $tok = $this->current(); $this->next(); return $tok; } public function rewind(){ $this->i = ( false === reset($this->tokens) ? null : key($this->tokens) ); } public function valid(){ while( isset($this->i) ){ $tok = $this->tokens[$this->i]; if( array_key_exists( is_array($tok) ? $tok[0] : $tok, $this->skip_tokens ) ){ $this->next(); } else { return true; } } return false; } public function key(){ return $this->i; } public function next(){ $this->i = ( false === next($this->tokens) ? null : key($this->tokens) ); } public function current(){ if( ! $this->valid() ){ return false; } $tok = $this->tokens[$this->i]; if( is_array($tok) && isset($this->literal_tokens[$tok[0]]) ){ return $tok[1]; } return $tok; } public function __toString(){ $s = array(); foreach( $this as $token ){ $s[] = is_array($token) ? $token[1] : $token; } return implode('',$s); } public function count(){ return count($this->tokens); } }
32
+ class LocoPHPEscapeParser extends LocoEscapeParser { public function __construct(){ parent::__construct( array( 'n' => "\n", 'r' => "\r", 't' => "\t", 'v' => "\x0B", 'f' => "\x0C", 'e' => "\x1B", '$' => '$', '\\' => '\\', '"' => '"', ) ); } protected function stripSlashes( $s ) { return preg_replace_callback('/\\\\(x[0-9A-Fa-f]{1,2}|[0-3]?[0-7]{1,2})/', array($this,'unescapeMatch'), $s, -1, $n ); } }
33
  function loco_unescape_php_string( $s ){ static $l; if( is_null($l) ) { $l = new LocoPHPEscapeParser; } return $l->unescape($s); }
34
  function loco_decapse_php_string( $s ){ if( ! $s ){ return (string) $s; } $q = $s[0]; if( "'" === $q ){ return str_replace( array('\\'.$q, '\\\\'), array($q, '\\'), substr( $s, 1, -1 ) ); } if( '"' !== $q ){ return $s; } return loco_unescape_php_string( substr($s,1,-1) ); }
35
  function loco_parse_php_comment($comment){ $comment = trim( $comment,"/ \n\r\t" ); if( '' !== $comment && '*' === $comment[0] ){ $lines = array(); $junk = "\r\t/ *"; foreach( explode("\n",$comment) as $line ){ $line = trim($line,$junk); if( '' !== $line ){ $lines[] = $line; } } $comment = implode("\n", $lines); } return $comment; }
36
+ function loco_parse_wp_comment( $block ){ $header = array(); if( '/*' === substr($block,0,2) ){ $junk = "\r\t/ *"; foreach( explode("\n", $block) as $line ){ if( false !== ( $i = strpos($line,':') ) ){ $key = substr($line,0,$i); $val = substr($line,++$i); $header[ trim($key,$junk) ] = trim($val,$junk); } } } return $header; }
37
  function loco_sniff_printf( $s, $p, $limit = 0, $offset = 0 ){ $n = 0; while( is_string($s) && '' !== $s && false !== ( $i = strpos($s,'%',$offset) ) ){ if( 0 !== $i ){ $s = substr( $s, $i ); } if( preg_match( $p, $s, $r ) ){ $match = $r[0]; if( 0 < $n && isset($r[1]) && '' === $r[1] && '%' !== substr($match,-1) ){ return 0; } if( ++$n === $limit ){ break; } $offset = strlen($match); } else { return 0; } } return $n; }
38
  function loco_sniff_php_printf( $s, $limit = 0 ){ return loco_sniff_printf( $s, '/^%(?:[1-9]\\d*\\$)?(?:\'.|[-+0 ])*\\d*(?:\\.\\d+)?[suxXbcdeEfFgGo%]/', $limit ); }
39
  class LocoPHPExtractor extends LocoExtractor { private $defs = array(); public function tokenize( $src ){ return new LocoPHPTokens( token_get_all($src) ); } public function decapse( $raw ){ return loco_decapse_php_string( $raw ); } public function fsniff( $str ){ return loco_sniff_php_printf($str) ? 'php' : ''; } protected function comment( $comment ){ $comment = loco_parse_php_comment($comment); $comment = preg_replace('/^translators:\\s+/mi', '', $comment ); return $comment; } public function define( $name, $value ){ if( is_string($value) ){ $this->defs[$name] = $value; } return $this; } public function extract( LocoExtracted $strings, LocoTokensInterface $tokens, $fileref = '' ){ $tokens->ignore( array(T_WHITESPACE) ); $n = 0; $depth = 0; $comment = ''; $narg = 0; $args = array(); $ref = ''; $rule = ''; $wp = $this->getHeaders(); $tokens->rewind(); while( $tok = $tokens->advance() ){ if( is_string($tok) ){ $s = $tok; $t = null; } else { $t = $tok[0]; $s = $tok[1]; } if( $depth ){ if( ')' === $s || ']' === $s ){ if( 0 === --$depth ){ if( $this->push( $strings, $rule, $args, $comment, $ref ) ){ $n++; } $comment = ''; } } else if( '(' === $s || '[' === $s ){ $depth++; $args[$narg] = null; } else if( 1 === $depth ){ if( ',' === $s ){ $narg++; } else if( T_CONSTANT_ENCAPSED_STRING === $t ){ $s = self::utf8($s); $args[$narg] = $this->decapse($s); } else if( T_STRING === $t && array_key_exists($s,$this->defs) ){ $args[$narg] = $this->defs[$s]; } else { $args[$narg] = null; } } } else if( T_COMMENT === $t || T_DOC_COMMENT === $t ){ $was_header = false; $s = self::utf8($s); if( 0 === $n ){ if( false !== strpos($s,'* @package') ){ $was_header = true; } if( $wp && ( $header = loco_parse_wp_comment($s) ) ){ foreach( $wp as $domain => $tags ){ foreach( array_intersect_key($header,$tags) as $tag => $source ){ $strings->pushMeta( $source, $tags[$tag], (string) $domain ); $was_header = true; } } } } if( ! $was_header ) { $comment = $s; } } else if( T_STRING === $t && '(' === $tokens->advance() && ( $rule = $this->rule($s) ) ){ $ref = $fileref ? $fileref.':'.$tok[2]: ''; $depth = 1; $args = array(); $narg = 0; } else if( $comment ){ if( false === stripos($comment, 'translators:') && false === strpos($comment, 'xgettext:') ){ $comment = ''; } } } return $this; } }
44
  function loco_print_percent( $n, $t ){ $s = loco_string_percent( (int) $n, (int) $t ); echo $s,'%'; return ''; }
45
  function loco_print_progress( $translated, $untranslated, $flagged ){ $total = $translated + $untranslated; $complete = loco_string_percent( $translated - $flagged, $total ); $class = 'progress'; if( ! $translated && ! $flagged ){ $class .= ' empty'; } else if( '100' === $complete ){ $class .= ' done'; } echo '<div class="',$class,'"><div class="t">'; if( $flagged ){ $s = loco_string_percent( $flagged, $total ); echo '<div class="bar f" style="width:',$s,'%">&nbsp;</div>'; } if( '0' === $complete ){ echo '&nbsp;'; } else { $class = 'bar p'; $p = (int) $complete; $class .= sprintf(' p-%u', 10*floor($p/10) ); $style = 'width:'.$complete.'%'; if( $flagged ){ $remain = 100.0 - (float) $s; $style .= '; max-width: '.sprintf('%s',$remain).'%'; } echo '<div class="',$class,'" style="'.$style.'">&nbsp;</div>'; } echo '</div><div class="l">',$complete,'%</div></div>'; return ''; }
46
  function loco_string_percent( $n, $t ){ if( ! $t || ! $n ){ $s = '0'; } else if( $t === $n ){ $s = '100'; } else { $dp = 0; $n = 100 * $n / $t; if( $n > 99 ){ $s = number_format( min( $n, 99.9 ), ++$dp ); } else if( $n < 0.5 ){ $n = max( $n, 0.0001 ); do { $s = number_format( $n, ++$dp ); } while( preg_match('/^0\\.0+$/',$s) && $dp < 4 ); $s = substr($s,1); } else { $s = number_format( $n, $dp ); } } return $s; }
47
+ class LocoFuzzyMatcher implements Countable { private $pot = array(); private $po = array(); private $diff = array(); private $dmax = .20; public function count(){ return count($this->pot); } public function unmatched(){ return array_values($this->pot); } public function redundant(){ return array_values($this->po); } public function setFuzziness( $s ){ if( $this->po ){ throw new LogicException('Cannot setFuzziness() after calling match()'); } $this->dmax = (float) max( 0, min( (int) $s, 100 ) ) / 100; } public function add( $a ){ $source = isset($a['source']) ? (string) $a['source'] : ''; $context = isset($a['context']) ? (string) $a['context'] : ''; $key = $source."\4".$context; $this->pot[$key] = $a; } private function key( $a ){ $source = isset($a['source']) ? (string) $a['source'] : ''; $context = isset($a['context']) ? (string) $a['context'] : ''; return $source."\4".$context; } protected function getRef( $a ){ $key = $this->key($a); return array_key_exists($key,$this->pot) ? $this->pot[$key] : null; } public function match( $a ) { $old = $this->key($a); if( isset($this->pot[$old]) ){ $new = $this->pot[$old]; unset($this->pot[$old]); return $new; } $this->po[$old] = $a; $target = isset($a['target']) ? (string) $a['target'] : ''; $comment = isset($a['comment']) ? (string) $a['comment'] : ''; if( '' === $target && '' === $comment ){ return null; } if( 0 < $this->dmax ){ foreach( $this->pot as $new => $_ ){ $dist = $this->distance($old,$new); if( -1 !== $dist ){ $this->diff[] = array( $old, $new, $dist ); } } } return null; } private function distance( $a, $b ){ $a = strtolower($a); $b = strtolower($b); if( $a === $b ){ return 0; } $lenA = strlen($a); $lenB = strlen($b); $lenDiff = abs($lenA-$lenB); $max = min($lenA,$lenB) + $lenDiff; $max = (int) ceil( $this->dmax * $max ); if( $max < $lenDiff ) { return -1; } $len = max($lenA,$lenB); if( $len < 256 ){ $d = levenshtein($a,$b); return $d > $max ? -1 : $d; } $d = 0; for( $i = 0; $i < $len; $i+=$max ){ $aa = substr($a,$i,$max); $bb = substr($b,$i,$max); $d += levenshtein($aa,$bb); if( $d > $max ){ return -1; } } return $d; } public function getFuzzyMatches(){ $pairs = array(); usort( $this->diff, array(__CLASS__,'compareDistance') ); foreach( $this->diff as $pair ){ list($old,$new) = $pair; if( ! array_key_exists($new,$this->pot) || ! array_key_exists($old,$this->po) ){ continue; } $pairs[] = array( $this->po[$old], $this->pot[$new], ); unset($this->po[$old]); unset($this->pot[$new]); if( ! $this->po || ! $this->pot ){ break; } } $this->diff = array(); return $pairs; } private static function compareDistance( array $a, array $b ){ return $a[2] - $b[2]; } }
48
  defined('T_FINALLY') || define('T_FINALLY',500); loco_check_extension('mbstring');
lib/data/locales.php CHANGED
@@ -2,4 +2,4 @@
2
  /**
3
  * Compiled data. Do not edit.
4
  */
5
- return array('af'=>array(0=>'Afrikaans',1=>'Afrikaans'),'ar'=>array(0=>'Arabic',1=>'العربية'),'ary'=>array(0=>'Moroccan Arabic',1=>'العربية المغربية'),'as'=>array(0=>'Assamese',1=>'অসমীয়া'),'az'=>array(0=>'Azerbaijani',1=>'Azərbaycan dili'),'azb'=>array(0=>'South Azerbaijani',1=>'گؤنئی آذربایجان'),'bel'=>array(0=>'Belarusian',1=>'Беларуская мова'),'bg_BG'=>array(0=>'Bulgarian',1=>'Български'),'bn_BD'=>array(0=>'Bengali (Bangladesh)',1=>'বাংলা'),'bo'=>array(0=>'Tibetan',1=>'བོད་ཡིག'),'bs_BA'=>array(0=>'Bosnian',1=>'Bosanski'),'ca'=>array(0=>'Catalan',1=>'Català'),'ceb'=>array(0=>'Cebuano',1=>'Cebuano'),'cs_CZ'=>array(0=>'Czech',1=>'Čeština'),'cy'=>array(0=>'Welsh',1=>'Cymraeg'),'da_DK'=>array(0=>'Danish',1=>'Dansk'),'de_CH_informal'=>array(0=>'German (Switzerland, Informal)',1=>'Deutsch (Schweiz, Du)'),'de_CH'=>array(0=>'German (Switzerland)',1=>'Deutsch (Schweiz)'),'de_DE_formal'=>array(0=>'German (Formal)',1=>'Deutsch (Sie)'),'de_DE'=>array(0=>'German',1=>'Deutsch'),'de_AT'=>array(0=>'German (Austria)',1=>'Deutsch (Österreich)'),'dsb'=>array(0=>'Lower Sorbian',1=>'Dolnoserbšćina'),'dzo'=>array(0=>'Dzongkha',1=>'རྫོང་ཁ'),'el'=>array(0=>'Greek',1=>'Ελληνικά'),'en_NZ'=>array(0=>'English (New Zealand)',1=>'English (New Zealand)'),'en_ZA'=>array(0=>'English (South Africa)',1=>'English (South Africa)'),'en_GB'=>array(0=>'English (UK)',1=>'English (UK)'),'en_AU'=>array(0=>'English (Australia)',1=>'English (Australia)'),'en_CA'=>array(0=>'English (Canada)',1=>'English (Canada)'),'eo'=>array(0=>'Esperanto',1=>'Esperanto'),'es_CO'=>array(0=>'Spanish (Colombia)',1=>'Español de Colombia'),'es_CR'=>array(0=>'Spanish (Costa Rica)',1=>'Español de Costa Rica'),'es_VE'=>array(0=>'Spanish (Venezuela)',1=>'Español de Venezuela'),'es_ES'=>array(0=>'Spanish (Spain)',1=>'Español'),'es_MX'=>array(0=>'Spanish (Mexico)',1=>'Español de México'),'es_EC'=>array(0=>'Spanish (Ecuador)',1=>'Español de Ecuador'),'es_AR'=>array(0=>'Spanish (Argentina)',1=>'Español de Argentina'),'es_CL'=>array(0=>'Spanish (Chile)',1=>'Español de Chile'),'es_PE'=>array(0=>'Spanish (Peru)',1=>'Español de Perú'),'es_PR'=>array(0=>'Spanish (Puerto Rico)',1=>'Español de Puerto Rico'),'es_UY'=>array(0=>'Spanish (Uruguay)',1=>'Español de Uruguay'),'es_GT'=>array(0=>'Spanish (Guatemala)',1=>'Español de Guatemala'),'et'=>array(0=>'Estonian',1=>'Eesti'),'eu'=>array(0=>'Basque',1=>'Euskara'),'fa_AF'=>array(0=>'Persian (Afghanistan)',1=>'(فارسی (افغانستان'),'fa_IR'=>array(0=>'Persian',1=>'فارسی'),'fi'=>array(0=>'Finnish',1=>'Suomi'),'fr_BE'=>array(0=>'French (Belgium)',1=>'Français de Belgique'),'fr_FR'=>array(0=>'French (France)',1=>'Français'),'fr_CA'=>array(0=>'French (Canada)',1=>'Français du Canada'),'fur'=>array(0=>'Friulian',1=>'Friulian'),'gd'=>array(0=>'Scottish Gaelic',1=>'Gàidhlig'),'gl_ES'=>array(0=>'Galician',1=>'Galego'),'gu'=>array(0=>'Gujarati',1=>'ગુજરાતી'),'haz'=>array(0=>'Hazaragi',1=>'هزاره گی'),'he_IL'=>array(0=>'Hebrew',1=>'עִבְרִית'),'hi_IN'=>array(0=>'Hindi',1=>'हिन्दी'),'hr'=>array(0=>'Croatian',1=>'Hrvatski'),'hsb'=>array(0=>'Upper Sorbian',1=>'Hornjoserbšćina'),'hu_HU'=>array(0=>'Hungarian',1=>'Magyar'),'hy'=>array(0=>'Armenian',1=>'Հայերեն'),'id_ID'=>array(0=>'Indonesian',1=>'Bahasa Indonesia'),'is_IS'=>array(0=>'Icelandic',1=>'Íslenska'),'it_IT'=>array(0=>'Italian',1=>'Italiano'),'ja'=>array(0=>'Japanese',1=>'日本語'),'jv_ID'=>array(0=>'Javanese',1=>'Basa Jawa'),'ka_GE'=>array(0=>'Georgian',1=>'ქართული'),'kab'=>array(0=>'Kabyle',1=>'Taqbaylit'),'kk'=>array(0=>'Kazakh',1=>'Қазақ тілі'),'km'=>array(0=>'Khmer',1=>'ភាសាខ្មែរ'),'kn'=>array(0=>'Kannada',1=>'ಕನ್ನಡ'),'ko_KR'=>array(0=>'Korean',1=>'한국어'),'ckb'=>array(0=>'Kurdish (Sorani)',1=>'كوردی‎'),'lo'=>array(0=>'Lao',1=>'ພາສາລາວ'),'lt_LT'=>array(0=>'Lithuanian',1=>'Lietuvių kalba'),'lv'=>array(0=>'Latvian',1=>'Latviešu valoda'),'mk_MK'=>array(0=>'Macedonian',1=>'Македонски јазик'),'ml_IN'=>array(0=>'Malayalam',1=>'മലയാളം'),'mn'=>array(0=>'Mongolian',1=>'Монгол'),'mr'=>array(0=>'Marathi',1=>'मराठी'),'ms_MY'=>array(0=>'Malay',1=>'Bahasa Melayu'),'my_MM'=>array(0=>'Myanmar (Burmese)',1=>'ဗမာစာ'),'nb_NO'=>array(0=>'Norwegian (Bokmål)',1=>'Norsk bokmål'),'ne_NP'=>array(0=>'Nepali',1=>'नेपाली'),'nl_BE'=>array(0=>'Dutch (Belgium)',1=>'Nederlands (België)'),'nl_NL'=>array(0=>'Dutch',1=>'Nederlands'),'nl_NL_formal'=>array(0=>'Dutch (Formal)',1=>'Nederlands (Formeel)'),'nn_NO'=>array(0=>'Norwegian (Nynorsk)',1=>'Norsk nynorsk'),'oci'=>array(0=>'Occitan',1=>'Occitan'),'pa_IN'=>array(0=>'Punjabi',1=>'ਪੰਜਾਬੀ'),'pl_PL'=>array(0=>'Polish',1=>'Polski'),'ps'=>array(0=>'Pashto',1=>'پښتو'),'pt_PT'=>array(0=>'Portuguese (Portugal)',1=>'Português'),'pt_BR'=>array(0=>'Portuguese (Brazil)',1=>'Português do Brasil'),'pt_PT_ao90'=>array(0=>'Portuguese (Portugal, AO90)',1=>'Português (AO90)'),'pt_AO'=>array(0=>'Portuguese (Angola)',1=>'Português de Angola'),'rhg'=>array(0=>'Rohingya',1=>'Ruáinga'),'ro_RO'=>array(0=>'Romanian',1=>'Română'),'ru_RU'=>array(0=>'Russian',1=>'Русский'),'sah'=>array(0=>'Sakha',1=>'Сахалыы'),'snd'=>array(0=>'Sindhi',1=>'سنڌي'),'si_LK'=>array(0=>'Sinhala',1=>'සිංහල'),'sk_SK'=>array(0=>'Slovak',1=>'Slovenčina'),'skr'=>array(0=>'Saraiki',1=>'سرائیکی'),'sl_SI'=>array(0=>'Slovenian',1=>'Slovenščina'),'sq'=>array(0=>'Albanian',1=>'Shqip'),'sr_RS'=>array(0=>'Serbian',1=>'Српски језик'),'sv_SE'=>array(0=>'Swedish',1=>'Svenska'),'sw'=>array(0=>'Swahili',1=>'Kiswahili'),'szl'=>array(0=>'Silesian',1=>'Ślōnskŏ gŏdka'),'ta_IN'=>array(0=>'Tamil',1=>'தமிழ்'),'ta_LK'=>array(0=>'Tamil (Sri Lanka)',1=>'தமிழ்'),'te'=>array(0=>'Telugu',1=>'తెలుగు'),'th'=>array(0=>'Thai',1=>'ไทย'),'tl'=>array(0=>'Tagalog',1=>'Tagalog'),'tr_TR'=>array(0=>'Turkish',1=>'Türkçe'),'tt_RU'=>array(0=>'Tatar',1=>'Татар теле'),'tah'=>array(0=>'Tahitian',1=>'Reo Tahiti'),'ug_CN'=>array(0=>'Uighur',1=>'ئۇيغۇرچە'),'uk'=>array(0=>'Ukrainian',1=>'Українська'),'ur'=>array(0=>'Urdu',1=>'اردو'),'uz_UZ'=>array(0=>'Uzbek',1=>'O‘zbekcha'),'vi'=>array(0=>'Vietnamese',1=>'Tiếng Việt'),'zh_HK'=>array(0=>'Chinese (Hong Kong)',1=>'香港中文版 '),'zh_TW'=>array(0=>'Chinese (Taiwan)',1=>'繁體中文'),'zh_CN'=>array(0=>'Chinese (China)',1=>'简体中文'));
2
  /**
3
  * Compiled data. Do not edit.
4
  */
5
+ return array('af'=>array(0=>'Afrikaans',1=>'Afrikaans'),'ar'=>array(0=>'Arabic',1=>'العربية'),'ary'=>array(0=>'Moroccan Arabic',1=>'العربية المغربية'),'as'=>array(0=>'Assamese',1=>'অসমীয়া'),'az'=>array(0=>'Azerbaijani',1=>'Azərbaycan dili'),'azb'=>array(0=>'South Azerbaijani',1=>'گؤنئی آذربایجان'),'bel'=>array(0=>'Belarusian',1=>'Беларуская мова'),'bg_BG'=>array(0=>'Bulgarian',1=>'Български'),'bn_BD'=>array(0=>'Bengali (Bangladesh)',1=>'বাংলা'),'bo'=>array(0=>'Tibetan',1=>'བོད་ཡིག'),'bs_BA'=>array(0=>'Bosnian',1=>'Bosanski'),'ca'=>array(0=>'Catalan',1=>'Català'),'ceb'=>array(0=>'Cebuano',1=>'Cebuano'),'cs_CZ'=>array(0=>'Czech',1=>'Čeština'),'cy'=>array(0=>'Welsh',1=>'Cymraeg'),'da_DK'=>array(0=>'Danish',1=>'Dansk'),'de_CH'=>array(0=>'German (Switzerland)',1=>'Deutsch (Schweiz)'),'de_CH_informal'=>array(0=>'German (Switzerland, Informal)',1=>'Deutsch (Schweiz, Du)'),'de_AT'=>array(0=>'German (Austria)',1=>'Deutsch (Österreich)'),'de_DE_formal'=>array(0=>'German (Formal)',1=>'Deutsch (Sie)'),'de_DE'=>array(0=>'German',1=>'Deutsch'),'dsb'=>array(0=>'Lower Sorbian',1=>'Dolnoserbšćina'),'dzo'=>array(0=>'Dzongkha',1=>'རྫོང་ཁ'),'el'=>array(0=>'Greek',1=>'Ελληνικά'),'en_ZA'=>array(0=>'English (South Africa)',1=>'English (South Africa)'),'en_AU'=>array(0=>'English (Australia)',1=>'English (Australia)'),'en_NZ'=>array(0=>'English (New Zealand)',1=>'English (New Zealand)'),'en_GB'=>array(0=>'English (UK)',1=>'English (UK)'),'en_CA'=>array(0=>'English (Canada)',1=>'English (Canada)'),'eo'=>array(0=>'Esperanto',1=>'Esperanto'),'es_UY'=>array(0=>'Spanish (Uruguay)',1=>'Español de Uruguay'),'es_CR'=>array(0=>'Spanish (Costa Rica)',1=>'Español de Costa Rica'),'es_ES'=>array(0=>'Spanish (Spain)',1=>'Español'),'es_VE'=>array(0=>'Spanish (Venezuela)',1=>'Español de Venezuela'),'es_CL'=>array(0=>'Spanish (Chile)',1=>'Español de Chile'),'es_PE'=>array(0=>'Spanish (Peru)',1=>'Español de Perú'),'es_PR'=>array(0=>'Spanish (Puerto Rico)',1=>'Español de Puerto Rico'),'es_GT'=>array(0=>'Spanish (Guatemala)',1=>'Español de Guatemala'),'es_AR'=>array(0=>'Spanish (Argentina)',1=>'Español de Argentina'),'es_EC'=>array(0=>'Spanish (Ecuador)',1=>'Español de Ecuador'),'es_MX'=>array(0=>'Spanish (Mexico)',1=>'Español de México'),'es_CO'=>array(0=>'Spanish (Colombia)',1=>'Español de Colombia'),'et'=>array(0=>'Estonian',1=>'Eesti'),'eu'=>array(0=>'Basque',1=>'Euskara'),'fa_IR'=>array(0=>'Persian',1=>'فارسی'),'fa_AF'=>array(0=>'Persian (Afghanistan)',1=>'(فارسی (افغانستان'),'fi'=>array(0=>'Finnish',1=>'Suomi'),'fr_CA'=>array(0=>'French (Canada)',1=>'Français du Canada'),'fr_BE'=>array(0=>'French (Belgium)',1=>'Français de Belgique'),'fr_FR'=>array(0=>'French (France)',1=>'Français'),'fur'=>array(0=>'Friulian',1=>'Friulian'),'gd'=>array(0=>'Scottish Gaelic',1=>'Gàidhlig'),'gl_ES'=>array(0=>'Galician',1=>'Galego'),'gu'=>array(0=>'Gujarati',1=>'ગુજરાતી'),'haz'=>array(0=>'Hazaragi',1=>'هزاره گی'),'he_IL'=>array(0=>'Hebrew',1=>'עִבְרִית'),'hi_IN'=>array(0=>'Hindi',1=>'हिन्दी'),'hr'=>array(0=>'Croatian',1=>'Hrvatski'),'hsb'=>array(0=>'Upper Sorbian',1=>'Hornjoserbšćina'),'hu_HU'=>array(0=>'Hungarian',1=>'Magyar'),'hy'=>array(0=>'Armenian',1=>'Հայերեն'),'id_ID'=>array(0=>'Indonesian',1=>'Bahasa Indonesia'),'is_IS'=>array(0=>'Icelandic',1=>'Íslenska'),'it_IT'=>array(0=>'Italian',1=>'Italiano'),'ja'=>array(0=>'Japanese',1=>'日本語'),'jv_ID'=>array(0=>'Javanese',1=>'Basa Jawa'),'ka_GE'=>array(0=>'Georgian',1=>'ქართული'),'kab'=>array(0=>'Kabyle',1=>'Taqbaylit'),'kk'=>array(0=>'Kazakh',1=>'Қазақ тілі'),'km'=>array(0=>'Khmer',1=>'ភាសាខ្មែរ'),'kn'=>array(0=>'Kannada',1=>'ಕನ್ನಡ'),'ko_KR'=>array(0=>'Korean',1=>'한국어'),'ckb'=>array(0=>'Kurdish (Sorani)',1=>'كوردی‎'),'lo'=>array(0=>'Lao',1=>'ພາສາລາວ'),'lt_LT'=>array(0=>'Lithuanian',1=>'Lietuvių kalba'),'lv'=>array(0=>'Latvian',1=>'Latviešu valoda'),'mk_MK'=>array(0=>'Macedonian',1=>'Македонски јазик'),'ml_IN'=>array(0=>'Malayalam',1=>'മലയാളം'),'mn'=>array(0=>'Mongolian',1=>'Монгол'),'mr'=>array(0=>'Marathi',1=>'मराठी'),'ms_MY'=>array(0=>'Malay',1=>'Bahasa Melayu'),'my_MM'=>array(0=>'Myanmar (Burmese)',1=>'ဗမာစာ'),'nb_NO'=>array(0=>'Norwegian (Bokmål)',1=>'Norsk bokmål'),'ne_NP'=>array(0=>'Nepali',1=>'नेपाली'),'nl_NL_formal'=>array(0=>'Dutch (Formal)',1=>'Nederlands (Formeel)'),'nl_BE'=>array(0=>'Dutch (Belgium)',1=>'Nederlands (België)'),'nl_NL'=>array(0=>'Dutch',1=>'Nederlands'),'nn_NO'=>array(0=>'Norwegian (Nynorsk)',1=>'Norsk nynorsk'),'oci'=>array(0=>'Occitan',1=>'Occitan'),'pa_IN'=>array(0=>'Punjabi',1=>'ਪੰਜਾਬੀ'),'pl_PL'=>array(0=>'Polish',1=>'Polski'),'ps'=>array(0=>'Pashto',1=>'پښتو'),'pt_BR'=>array(0=>'Portuguese (Brazil)',1=>'Português do Brasil'),'pt_PT_ao90'=>array(0=>'Portuguese (Portugal, AO90)',1=>'Português (AO90)'),'pt_AO'=>array(0=>'Portuguese (Angola)',1=>'Português de Angola'),'pt_PT'=>array(0=>'Portuguese (Portugal)',1=>'Português'),'rhg'=>array(0=>'Rohingya',1=>'Ruáinga'),'ro_RO'=>array(0=>'Romanian',1=>'Română'),'ru_RU'=>array(0=>'Russian',1=>'Русский'),'sah'=>array(0=>'Sakha',1=>'Сахалыы'),'snd'=>array(0=>'Sindhi',1=>'سنڌي'),'si_LK'=>array(0=>'Sinhala',1=>'සිංහල'),'sk_SK'=>array(0=>'Slovak',1=>'Slovenčina'),'skr'=>array(0=>'Saraiki',1=>'سرائیکی'),'sl_SI'=>array(0=>'Slovenian',1=>'Slovenščina'),'sq'=>array(0=>'Albanian',1=>'Shqip'),'sr_RS'=>array(0=>'Serbian',1=>'Српски језик'),'sv_SE'=>array(0=>'Swedish',1=>'Svenska'),'sw'=>array(0=>'Swahili',1=>'Kiswahili'),'szl'=>array(0=>'Silesian',1=>'Ślōnskŏ gŏdka'),'ta_IN'=>array(0=>'Tamil',1=>'தமிழ்'),'ta_LK'=>array(0=>'Tamil (Sri Lanka)',1=>'தமிழ்'),'te'=>array(0=>'Telugu',1=>'తెలుగు'),'th'=>array(0=>'Thai',1=>'ไทย'),'tl'=>array(0=>'Tagalog',1=>'Tagalog'),'tr_TR'=>array(0=>'Turkish',1=>'Türkçe'),'tt_RU'=>array(0=>'Tatar',1=>'Татар теле'),'tah'=>array(0=>'Tahitian',1=>'Reo Tahiti'),'ug_CN'=>array(0=>'Uighur',1=>'ئۇيغۇرچە'),'uk'=>array(0=>'Ukrainian',1=>'Українська'),'ur'=>array(0=>'Urdu',1=>'اردو'),'uz_UZ'=>array(0=>'Uzbek',1=>'O‘zbekcha'),'vi'=>array(0=>'Vietnamese',1=>'Tiếng Việt'),'zh_HK'=>array(0=>'Chinese (Hong Kong)',1=>'香港中文版 '),'zh_CN'=>array(0=>'Chinese (China)',1=>'简体中文'),'zh_TW'=>array(0=>'Chinese (Taiwan)',1=>'繁體中文'));
loco.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Loco Translate
4
  Plugin URI: https://wordpress.org/plugins/loco-translate/
5
  Description: Translate themes and plugins directly in WordPress
6
  Author: Tim Whitlock
7
- Version: 2.5.2
8
  Requires at least: 4.1
9
  Tested up to: 5.7
10
  Requires PHP: 5.2.4
@@ -33,7 +33,7 @@ function loco_plugin_file(){
33
  * @return string
34
  */
35
  function loco_plugin_version(){
36
- return '2.5.2';
37
  }
38
 
39
 
4
  Plugin URI: https://wordpress.org/plugins/loco-translate/
5
  Description: Translate themes and plugins directly in WordPress
6
  Author: Tim Whitlock
7
+ Version: 2.5.3
8
  Requires at least: 4.1
9
  Tested up to: 5.7
10
  Requires PHP: 5.2.4
33
  * @return string
34
  */
35
  function loco_plugin_version(){
36
+ return '2.5.3';
37
  }
38
 
39
 
pub/css/admin.css CHANGED
@@ -1 +1 @@
1
- ._ajax_loader_f2{background-image:url(../img/ajax-loader-f2.gif?v=2.5.2);background-repeat:no-repeat;min-height:16px}._ajax_loader_f2x4{background:transparent url(../img/ajax-loader-f2-x4.gif?v=2.5.2) 0 0 no-repeat;min-height:75px}._ajax_loader_cc{background-image:url(../img/ajax-loader-cc.gif?v=2.5.2);background-repeat:no-repeat;min-height:16px}@media only screen and (-webkit-min-device-pixel-ratio: 2),only screen and (min--moz-device-pixel-ratio: 2),only screen and (-o-min-device-pixel-ratio: 2/1),only screen and (min-device-pixel-ratio: 2),only screen and (min-resolution: 192dpi),only screen and (min-resolution: 2dppx){._ajax_loader_f2{background-image:url(../img/ajax-loader-f2-x2.gif?v=2.5.2);background-size:16px}._ajax_loader_cc{background-image:url(../img/ajax-loader-cc-x2.gif?v=2.5.2);background-size:16px}}._green_glow_inner{-webkit-box-shadow:inset 0 0 10px 0 #3db63d;-moz-box-shadow:inset 0 0 10px 0 #3db63d;box-shadow:inset 0 0 10px 0 #3db63d}._green_glow_outer{-webkit-box-shadow:0 0 .5em 0 #3db63d;-moz-box-shadow:0 0 .5em 0 #3db63d;box-shadow:0 0 .5em 0 #3db63d}.loco-font,#loco-admin.wrap .wp-list-table th.loco-sort.loco-asc:after,#loco-admin.wrap .wp-list-table th.loco-sort.loco-desc:after,#loco-admin.wrap .icon,#loco-admin.wrap .has-icon:before{font-family:"loco";speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@font-face{font-family:"loco";src:url("../font/loco.eot?v=2.5.2");src:url("../font/loco.eot?v=2.5.2?#iefix") format("embedded-opentype"),url("../font/loco.woff?v=2.5.2") format("woff"),url("../font/loco.ttf?v=2.5.2") format("truetype"),url("../font/loco.svg?v=2.5.2#loco") format("svg");font-weight:normal;font-style:normal}.tipsy{font-size:11px;position:absolute;padding:5px;z-index:500001;opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.tipsy.in{opacity:1}.tipsy-inner{background-color:#000;color:#fff;white-space:nowrap;padding:6px 8px;line-height:1.3em;text-align:center;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px;-webkit-font-smoothing:subpixel-antialiased}.tipsy-arrow{position:absolute;width:0;height:0;line-height:0;border:5px dashed #000}.tipsy-n .tipsy-arrow{top:0px;left:50%;margin-left:-5px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.tipsy-nw .tipsy-arrow{top:0;left:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.tipsy-ne .tipsy-arrow{top:0;right:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.tipsy-s .tipsy-arrow{bottom:0;left:50%;margin-left:-5px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.tipsy-sw .tipsy-arrow{bottom:0;left:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.tipsy-se .tipsy-arrow{bottom:0;right:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.tipsy-e .tipsy-arrow{right:0;top:50%;margin-top:-5px;border-left-style:solid;border-right:none;border-top-color:transparent;border-bottom-color:transparent}.tipsy-w .tipsy-arrow{left:0;top:50%;margin-top:-5px;border-right-style:solid;border-left:none;border-top-color:transparent;border-bottom-color:transparent}#loco-admin.wrap .selector li,#loco-admin.wrap .selector .handle,#loco-admin.wrap .selectoradd a,#loco-admin.wrap .selectorsep:before,#loco-admin.wrap .selectorsep span{padding:.3em .75em}#loco-admin.wrap .selector{text-align:left;display:inline-block;white-space:nowrap}#loco-admin.wrap .selectoradd a,#loco-admin.wrap .selector .handle{cursor:default;display:block;position:relative;border-top:solid 1px #fff;border-right:solid 1px #ddd;border-bottom:solid 1px #ddd;border-left:solid 1px #fff;color:#666;height:1.3em;overflow:hidden;white-space:normal}#loco-admin.wrap .selectorsep{display:inline-block;border:solid 1px transparent}#loco-admin.wrap .selectorsep:before{display:block;position:relative;color:#999;height:1.3em;overflow:hidden}#loco-admin.wrap .selectorsep>*{display:block;line-height:1em;color:#666;height:1.3em;overflow:hidden}#loco-admin.wrap .selector .handle{outline:none;white-space:nowrap;padding-right:2.3em;max-width:250px;text-overflow:ellipsis}#loco-admin.wrap .selector .handle .prefix{padding-right:.6ex}#loco-admin.wrap .selector .handle:after{font-family:loco;font-size:1.3em;color:#ccc;display:block;position:absolute;top:.25em;right:.6em;content:"▼"}#loco-admin.wrap .selector .handle:focus:after,#loco-admin.wrap .selector .handle:hover:after{color:#666}#loco-admin.wrap .selector.no-caret .handle{padding-right:.75em}#loco-admin.wrap .selector.no-caret .handle:after{display:none}#loco-admin.wrap .selector.no-title .handle{padding-left:.5em;padding-right:.5em}#loco-admin.wrap .selector.no-title .handle .label{display:none}#loco-admin.wrap .selector.no-title .handle .icon{margin-right:0px}#loco-admin.wrap .selector.dummy .handle{border-color:transparent}#loco-admin.wrap .selector.dummy .handle:after{display:none}#loco-admin.wrap .selectoradd{position:relative}#loco-admin.wrap .selectoradd>*{display:block;float:left;clear:none}#loco-admin.wrap .selectoradd>a.has-icon{width:1.3em}#loco-admin.wrap .selectoradd>a.has-icon:before{color:#999;display:inline;padding-left:0;padding-right:0;line-height:1.4em}#loco-admin.wrap .selectoradd>a.has-icon:hover:after{color:#2e892e}#loco-admin.wrap .selectorsep{display:inline-block}#loco-admin.wrap .selectorsep span{color:#666;height:1.3em}#loco-admin.wrap .selector ul{padding:0}#loco-admin.wrap .selector ul,#loco-admin.wrap .selector li{display:block;position:relative;cursor:default;margin:0}#loco-admin.wrap .selector ul{z-index:5;position:absolute;left:0;top:0;background:#f5f5f5;box-shadow:0 10px 5px rgba(0,0,0,.2);border:solid 1px #ccc;overflow:auto}#loco-admin.wrap .selector.up ul{margin-top:0}#loco-admin.wrap .selector.multi li input{display:none}#loco-admin.wrap .selector.multi li.checked{background:#e5e5e5}#loco-admin.wrap .selector li.active{background:#e5e5e5 !important}#loco-admin.wrap .selector li.over{background:#ccc !important;color:#fff;text-shadow:1px 1px #aaa}#loco-admin.wrap .selector li.over .label{color:#fff}#loco-admin.wrap .selector .label{font:inherit;color:inherit}#loco-admin.wrap .selector .icon{display:inline-block;min-width:1.2em;text-align:center;font-size:14px}#loco-admin.wrap .selector .icon.no-icon{display:none}#loco-admin.wrap .selector .icon:before{color:#666}#loco-admin.wrap .selector .avtr{width:18px;height:18px;background-size:18px;background-repeat:no-repeat}#loco-admin.wrap .selector .label{line-height:1}#loco-admin.wrap .selector .icon,#loco-admin.wrap .selector .icon-16{vertical-align:bottom}#loco-admin.wrap .selector .icon,#loco-admin.wrap .selector .lang,#loco-admin.wrap .selector .icon-16{margin-right:5px}#loco-admin.wrap .selector .region,#loco-admin.wrap .selector .variant-wales,#loco-admin.wrap .selector .region-gb.lang-cy,#loco-admin.wrap .selector .variant-scotland,#loco-admin.wrap .selector .region-gb.lang-gd,#loco-admin.wrap .selector .variant-valencia,#loco-admin.wrap .selector .region-es.variant-valencia,#loco-admin.wrap .selector .lang-ca,#loco-admin.wrap .selector .region-es.lang-ca,#loco-admin.wrap .selector .lang-eo,#loco-admin.wrap .selector .lang-eu{margin-left:2px;margin-right:7px}#loco-admin.wrap .selector.ticked .icon.no-icon{font-size:12px;display:inline-block}#loco-admin.wrap .selector.ticked .active .icon.no-icon:before{content:"✓"}#loco-admin.wrap .selectoradd a:hover,#loco-admin.wrap .selector a.handle:focus,#loco-admin.wrap .selector a.handle:hover{color:#000;border-color:#999}#loco-admin.wrap .selector.active .handle{border-color:#999;background-color:#eee;color:#999}#loco-admin.wrap .selector.active .handle:after{color:#999;content:"▲"}#loco-admin.wrap .selector.disabled{cursor:default;cursor:no-drop;cursor:not-allowed}#loco-admin.wrap .selector.disabled .handle{pointer-events:none;border-top:solid 1px #fff;border-right:solid 1px #ddd;border-bottom:solid 1px #ddd;border-left:solid 1px #fff;color:#999;padding-right:1em}#loco-admin.wrap .selector.disabled .handle:after{display:none}#loco-admin.wrap .selector.disabled .handle span.icon{color:#999 !important}#loco-admin.wrap .selector li.disabled,#loco-admin.wrap .selector li.disabled.over{color:#aaa;text-shadow:1px 1px #fff;pointer-events:none}#loco-admin.wrap .selector li.disabled *{cursor:text}#loco-admin.wrap .selector li.disabled .icon:before{color:#aaa}#loco-admin.wrap .selector li.disabled .flag,#loco-admin.wrap .selector li.disabled .icon-16{opacity:.4}#loco-admin.wrap .selector.lefty ul{left:auto;right:0}#loco-admin.wrap .selector.lefty ul .icon,#loco-admin.wrap .selector.lefty ul .icon-32{display:block;float:right;clear:none}#loco-admin.wrap .selector.lefty ul .label{padding-right:32px;padding-left:0}#loco-admin.wrap .selector ul>form{margin:0;display:block}#loco-admin.wrap .selector ul>form input{margin:0;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0}#loco-admin.wrap .selector ul>form input:focus{-webkit-box-shadow:inset 0 0 5px 0 #3db63d;-moz-box-shadow:inset 0 0 5px 0 #3db63d;box-shadow:inset 0 0 5px 0 #3db63d}#loco-admin.wrap .selector ul>form input.error{border-color:#c00;-webkit-box-shadow:inset 0 0 5px 0 rgba(153,0,0,.5);-moz-box-shadow:inset 0 0 5px 0 rgba(153,0,0,.5);box-shadow:inset 0 0 5px 0 rgba(153,0,0,.5)}#loco-admin.wrap .selector ul>form a.clear{margin:0;border:none}#loco-admin.wrap .selector ul>form ::placeholder{color:gray;font-size:16px;font-family:"loco";text-align:right;display:block}#loco-admin.wrap .selector ul>form ::-webkit-input-placeholder{color:gray;font-size:16px;font-family:"loco";text-align:right;display:block}#loco-admin.wrap .selector ul>form :-moz-placeholder{color:gray;font-size:16px;font-family:"loco";text-align:right;display:block;opacity:1}#loco-admin.wrap .selector ul>form ::-moz-placeholder{color:gray;font-size:16px;font-family:"loco";text-align:right;display:block;opacity:1}#loco-admin.wrap .selector ul>form :-ms-input-placeholder{color:gray;font-size:16px;font-family:"loco";text-align:right;display:block}#loco-admin.wrap .selector ul>form .ielt10 .placeheld{color:gray;font-size:16px;font-family:"loco";text-align:right;display:block}#loco-admin.wrap div.auto-comp-wrap{width:100%}#loco-admin.wrap div.auto-comp-wrap input{display:inline-block}#loco-admin.wrap div.auto-comp-wrap.loading input{background:transparent url(../img/ajax-loader.gif?v=2.5.2) right 2px no-repeat}#loco-admin.wrap div.auto-comp-drop{color:#333;background:#fff;border-top:none;position:absolute;width:auto;top:0;left:0;z-index:99;-webkit-box-shadow:0 5px 5px rgba(0,0,0,.4);-moz-box-shadow:0 5px 5px rgba(0,0,0,.4);box-shadow:0 5px 5px rgba(0,0,0,.4)}#loco-admin.wrap div.auto-comp-result{padding:5px 10px;cursor:pointer;background:#f0f0f0;border-top:solid 1px #fff;border-bottom:solid 1px #ddd;white-space:nowrap}#loco-admin.wrap div.auto-comp-result:first-child{border-top:solid 1px #ddd}#loco-admin.wrap div.auto-comp-result>*{display:inline-block;vertical-align:middle;line-height:normal}#loco-admin.wrap div.auto-comp-result .icon:before{padding-right:5px}#loco-admin.wrap div.auto-comp-result:hover{background:#a8a8a8;color:#fff;border-top-color:#a8a8a8;border-bottom-color:#999}#loco-admin.wrap div.auto-comp-result.selected{background:#666 !important;color:#fff;border-top-color:#666;border-bottom-color:#666}#loco-admin.wrap div.auto-comp-result .lang,#loco-admin.wrap div.auto-comp-result .region,#loco-admin.wrap div.auto-comp-result .variant-wales,#loco-admin.wrap div.auto-comp-result .region-gb.lang-cy,#loco-admin.wrap div.auto-comp-result .variant-scotland,#loco-admin.wrap div.auto-comp-result .region-gb.lang-gd,#loco-admin.wrap div.auto-comp-result .variant-valencia,#loco-admin.wrap div.auto-comp-result .region-es.variant-valencia,#loco-admin.wrap div.auto-comp-result .lang-ca,#loco-admin.wrap div.auto-comp-result .region-es.lang-ca,#loco-admin.wrap div.auto-comp-result .lang-eo,#loco-admin.wrap div.auto-comp-result .lang-eu,#loco-admin.wrap div.auto-comp-result .avtr{margin-right:5px}#loco-admin.wrap div.auto-comp-wrap.error a.icon.clear:before{color:#c00;opacity:1}#loco-admin.wrap div.auto-comp-wrap.error input[type=text]{border-color:#c00;color:#c00}#loco-admin.wrap div.auto-comp-wrap.error input[type=text]:focus{-webkit-box-shadow:0 0 .5em 0 rgba(153,0,0,.5);-moz-box-shadow:0 0 .5em 0 rgba(153,0,0,.5);box-shadow:0 0 .5em 0 rgba(153,0,0,.5)}#loco-admin.wrap ._ajax_loader_f2{background-image:url(../img/ajax-loader-f2.gif?v=2.5.2);background-repeat:no-repeat;min-height:16px}#loco-admin.wrap ._ajax_loader_f2x4{background:transparent url(../img/ajax-loader-f2-x4.gif?v=2.5.2) 0 0 no-repeat;min-height:75px}#loco-admin.wrap ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc.gif?v=2.5.2);background-repeat:no-repeat;min-height:16px}@media only screen and (-webkit-min-device-pixel-ratio: 2),only screen and (min--moz-device-pixel-ratio: 2),only screen and (-o-min-device-pixel-ratio: 2/1),only screen and (min-device-pixel-ratio: 2),only screen and (min-resolution: 192dpi),only screen and (min-resolution: 2dppx){#loco-admin.wrap ._ajax_loader_f2{background-image:url(../img/ajax-loader-f2-x2.gif?v=2.5.2);background-size:16px}#loco-admin.wrap ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc-x2.gif?v=2.5.2);background-size:16px}}#loco-admin.wrap ._green_glow_inner{-webkit-box-shadow:inset 0 0 10px 0 #3db63d;-moz-box-shadow:inset 0 0 10px 0 #3db63d;box-shadow:inset 0 0 10px 0 #3db63d}#loco-admin.wrap ._green_glow_outer{-webkit-box-shadow:0 0 .5em 0 #3db63d;-moz-box-shadow:0 0 .5em 0 #3db63d;box-shadow:0 0 .5em 0 #3db63d}#loco-admin.wrap .loco-font,#loco-admin.wrap .wp-list-table th.loco-sort.loco-asc:after,#loco-admin.wrap .wp-list-table th.loco-sort.loco-desc:after,#loco-admin.wrap .icon,#loco-admin.wrap .has-icon:before{font-family:"loco";speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#loco-admin.wrap .has-icon:before{display:inline-block;padding-right:.3em}#loco-admin.wrap a.icon-help{cursor:help}#loco-admin.wrap a.icon-help span{display:none}#loco-admin.wrap .icon-notag:before{content:""}#loco-admin.wrap .icon-magnify:before{content:"🔍"}#loco-admin.wrap .icon-python:before{content:"🐍"}#loco-admin.wrap .icon-unicode:before{content:"u"}#loco-admin.wrap .icon-json:before{content:"{"}#loco-admin.wrap .icon-bullist:before{content:""}#loco-admin.wrap .icon-numlist:before{content:""}#loco-admin.wrap .icon-indent:before{content:""}#loco-admin.wrap .icon-outdent:before{content:""}#loco-admin.wrap .icon-link:before{content:""}#loco-admin.wrap .icon-unlink:before{content:""}#loco-admin.wrap .icon-bold:before{content:"B"}#loco-admin.wrap .icon-italic:before{content:"I"}#loco-admin.wrap .icon-translate:before{content:""}#loco-admin.wrap .icon-proj:before{content:""}#loco-admin.wrap .icon-plural:before{content:"᛬"}#loco-admin.wrap .icon-max:before,#loco-admin.wrap .icon-full-screen:before{content:""}#loco-admin.wrap .icon-min:before{content:""}#loco-admin.wrap .icon-sort:before{content:""}#loco-admin.wrap .icon-ok:before,#loco-admin.wrap .notice-success>.has-icon:before,#loco-admin.wrap .notice-success p>strong.has-icon:before{content:"✓"}#loco-admin.wrap .icon-ok-empty:before{content:"🗌"}#loco-admin.wrap .icon-checkbox-checked:before,#loco-admin.wrap .selector.multi li.checked .icon-checkbox:before{content:"☑"}#loco-admin.wrap .icon-checkbox-unchecked:before{content:"☐"}#loco-admin.wrap .icon-checkbox-partial:before{content:"☉"}#loco-admin.wrap .icon-radio-checked:before{content:"⚫"}#loco-admin.wrap .icon-radio-unchecked:before{content:"⚪"}#loco-admin.wrap .icon-ext:before{content:"⬈"}#loco-admin.wrap .icon-share:before{content:""}#loco-admin.wrap .icon-star:before{content:""}#loco-admin.wrap .icon-user:before{content:""}#loco-admin.wrap .icon-remove:before,#loco-admin.wrap a.icon.close:before{content:"×"}#loco-admin.wrap .icon-cog:before{content:""}#loco-admin.wrap .icon-trash:before{content:""}#loco-admin.wrap .icon-time:before,#loco-admin.wrap .icon-history:before{content:""}#loco-admin.wrap .icon-download:before{content:""}#loco-admin.wrap .icon-revert:before{content:""}#loco-admin.wrap .icon-sync:before{content:""}#loco-admin.wrap .icon-lock:before,#loco-admin.wrap .notice-locked>.has-icon:before,#loco-admin.wrap .notice-locked p>strong.has-icon:before{content:""}#loco-admin.wrap .icon-flag:before{content:""}#loco-admin.wrap .icon-tag:before{content:""}#loco-admin.wrap .icon-tags:before{content:""}#loco-admin.wrap .icon-print:before{content:""}#loco-admin.wrap .icon-camera:before{content:""}#loco-admin.wrap .icon-pencil:before{content:""}#loco-admin.wrap .icon-add:before{content:""}#loco-admin.wrap .icon-del:before{content:""}#loco-admin.wrap .icon-clear:before,#loco-admin.wrap a.icon.clear:before{content:""}#loco-admin.wrap .icon-ok-sign:before{content:"✔"}#loco-admin.wrap .icon-help:before{content:"?"}#loco-admin.wrap .icon-info:before,#loco-admin.wrap .notice-info>.has-icon:before,#loco-admin.wrap .notice-info p>strong.has-icon:before{content:"ℹ"}#loco-admin.wrap .icon-cancel:before{content:""}#loco-admin.wrap .icon-warn:before,#loco-admin.wrap .notice-error>.has-icon:before,#loco-admin.wrap .notice-error p>strong.has-icon:before,#loco-admin.wrap .notice-warning>.has-icon:before,#loco-admin.wrap .notice-warning p>strong.has-icon:before{content:""}#loco-admin.wrap .icon-comment:before{content:""}#loco-admin.wrap .icon-bar-chart:before{content:""}#loco-admin.wrap .icon-key:before{content:""}#loco-admin.wrap .icon-cogs:before{content:""}#loco-admin.wrap .icon-comments:before{content:""}#loco-admin.wrap .icon-signout:before{content:""}#loco-admin.wrap .icon-signin:before{content:""}#loco-admin.wrap .icon-upload:before{content:""}#loco-admin.wrap .icon-twitter:before{content:"🐦"}#loco-admin.wrap .icon-facebook:before{content:""}#loco-admin.wrap .icon-github:before{content:""}#loco-admin.wrap .icon-feed:before{content:""}#loco-admin.wrap .icon-globe:before{content:""}#loco-admin.wrap .icon-wrench:before,#loco-admin.wrap .notice-debug>.has-icon:before,#loco-admin.wrap .notice-debug p>strong.has-icon:before{content:""}#loco-admin.wrap .icon-group:before{content:""}#loco-admin.wrap .icon-cloud:before{content:""}#loco-admin.wrap .icon-copy:before{content:""}#loco-admin.wrap .icon-save:before{content:""}#loco-admin.wrap .icon-menu:before{content:""}#loco-admin.wrap .icon-table:before{content:""}#loco-admin.wrap .icon-caret-down:before{content:"▼"}#loco-admin.wrap .icon-caret-up:before{content:"▲"}#loco-admin.wrap .icon-caret-right:before{content:"▶"}#loco-admin.wrap .icon-mail:before{content:""}#loco-admin.wrap .icon-cloud-upload:before{content:""}#loco-admin.wrap .icon-file:before{content:""}#loco-admin.wrap .icon-circle-white:before{content:"⚬"}#loco-admin.wrap .icon-circle-black:before{content:"●"}#loco-admin.wrap .icon-eraser:before{content:""}#loco-admin.wrap .icon-unlock:before{content:""}#loco-admin.wrap .icon-apple:before{content:""}#loco-admin.wrap .icon-android:before{content:""}#loco-admin.wrap .icon-robot:before{content:"🤖"}#loco-admin.wrap .icon-back:before{content:"⬅"}#loco-admin.wrap .icon-next:before{content:"➔"}#loco-admin.wrap .icon-arrow-up:before{content:""}#loco-admin.wrap .icon-ccard:before{content:""}#loco-admin.wrap .icon-caret-left:before{content:"◀"}#loco-admin.wrap .icon-pro:before{content:"⚡"}#loco-admin.wrap .icon-bell:before{content:""}#loco-admin.wrap .icon-code:before{content:""}#loco-admin.wrap .icon-privacy:before{content:"🛡"}#loco-admin.wrap .icon-hellip:before{content:"…"}#loco-admin.wrap .icon-vellip:before{content:"⁞"}#loco-admin.wrap .icon-collapse:before{content:""}#loco-admin.wrap .icon-expand:before{content:""}#loco-admin.wrap .icon-wordpress:before{content:""}#loco-admin.wrap .icon-database:before{content:""}#loco-admin.wrap .icon-restore:before{content:""}#loco-admin.wrap .icon-pilcrow:before{content:"¶"}#loco-admin.wrap .icon-status.is-translated:before,#loco-admin.wrap .is-translated>header>.icon-status:before{color:#2e892e;content:"✓";text-align:center}#loco-admin.wrap .icon-status.is-untranslated:before,#loco-admin.wrap .is-untranslated>header>.icon-status:before{color:#aaa;content:"×";text-align:center;font-size:1.1em}#loco-admin.wrap .icon-status.is-flagged:before,#loco-admin.wrap .is-flagged>header>.icon-status:before{color:#bd2c00;content:"";text-align:center}#loco-admin.wrap .icon-status.is-translated.is-blank:before,#loco-admin.wrap .icon-status.is-translated.is-inherit:before,#loco-admin.wrap .is-translated.is-blank>header>.icon-status:before,#loco-admin.wrap .is-translated.is-inherit>header>.icon-status:before{content:"🗌"}#loco-admin.wrap .icon-status.is-fuzzy:before,#loco-admin.wrap .is-fuzzy>header>.icon-status:before{color:#666;content:""}#loco-admin.wrap .lang,#loco-admin.wrap .region,#loco-admin.wrap .variant-wales,#loco-admin.wrap .region-gb.lang-cy,#loco-admin.wrap .variant-scotland,#loco-admin.wrap .region-gb.lang-gd,#loco-admin.wrap .variant-valencia,#loco-admin.wrap .region-es.variant-valencia,#loco-admin.wrap .lang-ca,#loco-admin.wrap .region-es.lang-ca,#loco-admin.wrap .lang-eo,#loco-admin.wrap .lang-eu{color:#fff;background:#2e892e;display:inline-block;text-transform:uppercase;overflow:hidden;font-family:Verdana,Arial,sans-serif;font-size:9px;font-weight:normal;font-style:normal;line-height:12px;text-align:center;white-space:normal;text-shadow:none}#loco-admin.wrap .lang{width:20px;height:12px;line-height:12px;vertical-align:middle}#loco-admin.wrap .lang:before{content:attr(lang);vertical-align:baseline}#loco-admin.wrap .no-lang{width:18px;height:10px;border:solid 1px #2e892e;background:transparent}#loco-admin.wrap .lang-el{background-color:#1d48a3}#loco-admin.wrap .lang-el:before{content:"Ελ"}#loco-admin.wrap .region,#loco-admin.wrap .variant-wales,#loco-admin.wrap .region-gb.lang-cy,#loco-admin.wrap .variant-scotland,#loco-admin.wrap .region-gb.lang-gd,#loco-admin.wrap .variant-valencia,#loco-admin.wrap .region-es.variant-valencia,#loco-admin.wrap .lang-ca,#loco-admin.wrap .region-es.lang-ca,#loco-admin.wrap .lang-eo,#loco-admin.wrap .lang-eu{width:16px;height:12px;margin:0 2px;background-image:url(../img/flags.png?v=2.5.2);background-repeat:no-repeat;background-color:transparent}#loco-admin.wrap .region:before,#loco-admin.wrap .variant-wales:before,#loco-admin.wrap .region-gb.lang-cy:before,#loco-admin.wrap .variant-scotland:before,#loco-admin.wrap .region-gb.lang-gd:before,#loco-admin.wrap .variant-valencia:before,#loco-admin.wrap .region-es.variant-valencia:before,#loco-admin.wrap .lang-ca:before,#loco-admin.wrap .region-es.lang-ca:before,#loco-admin.wrap .lang-eo:before,#loco-admin.wrap .lang-eu:before{visibility:hidden}#loco-admin.wrap .lang-zh{background-color:#b90000}#loco-admin.wrap .lang-zh.script-hans:before{content:"中国"}#loco-admin.wrap .lang-zh.script-hant:before{content:"中國"}#loco-admin.wrap .__{background-position:0 0}#loco-admin.wrap .lang-eo{background-position:0 -12px}#loco-admin.wrap .lang-eu{background-position:0 -24px}#loco-admin.wrap .lang-ca,#loco-admin.wrap .region-es.lang-ca{background-position:0 -36px}#loco-admin.wrap .region-tg{background-position:0 -48px}#loco-admin.wrap .region-me{background-position:0 -60px}#loco-admin.wrap .region-la{background-position:0 -73px}#loco-admin.wrap .region-mr{background-position:0 -85px}#loco-admin.wrap .region-ni{background-position:0 -97px}#loco-admin.wrap .region-lv{background-position:0 -109px}#loco-admin.wrap .region-om{background-position:0 -121px}#loco-admin.wrap .region-af{background-position:0 -133px}#loco-admin.wrap .region-cy{background-position:0 -145px}#loco-admin.wrap .region-bj{background-position:0 -157px}#loco-admin.wrap .region-aq{background-position:0 -169px}#loco-admin.wrap .region-cn{background-position:0 -186px}#loco-admin.wrap .region-co{background-position:0 -198px}#loco-admin.wrap .region-cx{background-position:0 -210px}#loco-admin.wrap .region-ag{background-position:0 -222px}#loco-admin.wrap .region-ms{background-position:0 -234px}#loco-admin.wrap .region-md{background-position:0 -246px}#loco-admin.wrap .region-zm{background-position:0 -258px}#loco-admin.wrap .region-vn{background-position:0 -270px}#loco-admin.wrap .region-tf{background-position:0 -282px}#loco-admin.wrap .region-td{background-position:0 -294px}#loco-admin.wrap .region-yt{background-position:0 -306px}#loco-admin.wrap .region-lb{background-position:0 -318px}#loco-admin.wrap .region-mf{background-position:0 -330px}#loco-admin.wrap .region-lu{background-position:0 -347px}#loco-admin.wrap .region-mq{background-position:0 -359px}#loco-admin.wrap .region-cz{background-position:0 -371px}#loco-admin.wrap .region-ae{background-position:0 -383px}#loco-admin.wrap .region-cm{background-position:0 -395px}#loco-admin.wrap .region-bi{background-position:0 -407px}#loco-admin.wrap .region-ar{background-position:0 -419px}#loco-admin.wrap .region-as{background-position:0 -431px}#loco-admin.wrap .region-bh{background-position:0 -443px}#loco-admin.wrap .region-cl{background-position:0 -455px}#loco-admin.wrap .region-ad{background-position:0 -467px}#loco-admin.wrap .region-mp{background-position:0 -479px}#loco-admin.wrap .region-lt{background-position:0 -491px}#loco-admin.wrap .region-mg{background-position:0 -503px}#loco-admin.wrap .region-lc{background-position:0 -515px}#loco-admin.wrap .region-tr{background-position:0 -527px}#loco-admin.wrap .region-ua{background-position:0 -539px}#loco-admin.wrap .region-tv{background-position:0 -551px}#loco-admin.wrap .region-vi{background-position:0 -563px}#loco-admin.wrap .region-mt{background-position:0 -575px}#loco-admin.wrap .region-no{background-position:0 -587px}#loco-admin.wrap .region-mc{background-position:0 -599px}#loco-admin.wrap .region-ch{background-position:0 -611px}#loco-admin.wrap .region-bl{background-position:0 -623px}#loco-admin.wrap .region-aw{background-position:0 -640px}#loco-admin.wrap .region-bz{background-position:0 -652px}#loco-admin.wrap .region-bm{background-position:0 -664px}#loco-admin.wrap .region-ci{background-position:0 -676px}#loco-admin.wrap .region-mu{background-position:0 -688px}#loco-admin.wrap .region-us{background-position:0 -700px}#loco-admin.wrap .region-tw{background-position:0 -712px}#loco-admin.wrap .region-ye{background-position:0 -724px}#loco-admin.wrap .region-mw{background-position:0 -736px}#loco-admin.wrap .region-nl{background-position:0 -748px}#loco-admin.wrap .region-ls{background-position:0 -760px}#loco-admin.wrap .region-bo{background-position:0 -772px}#loco-admin.wrap .region-at{background-position:0 -784px}#loco-admin.wrap .region-ck{background-position:0 -796px}#loco-admin.wrap .region-by{background-position:0 -808px}#loco-admin.wrap .region-au{background-position:0 -820px}#loco-admin.wrap .region-bn{background-position:0 -832px}#loco-admin.wrap .region-ma{background-position:0 -844px}#loco-admin.wrap .region-nz{background-position:0 -856px}#loco-admin.wrap .region-lr{background-position:0 -868px}#loco-admin.wrap .region-mv{background-position:0 -880px}#loco-admin.wrap .region-tc{background-position:0 -892px}#loco-admin.wrap .region-ug{background-position:0 -904px}#loco-admin.wrap .region-tt{background-position:0 -916px}#loco-admin.wrap .region-pl{background-position:0 -928px}#loco-admin.wrap .region-rs{background-position:0 -940px}#loco-admin.wrap .region-in{background-position:0 -952px}#loco-admin.wrap .region-ge{background-position:0 -964px}#loco-admin.wrap .region-gr{background-position:0 -976px}#loco-admin.wrap .region-gs{background-position:0 -988px}#loco-admin.wrap .region-gd{background-position:0 -1000px}#loco-admin.wrap .region-io{background-position:0 -1012px}#loco-admin.wrap .region-hk{background-position:0 -1024px}#loco-admin.wrap .region-kp{background-position:0 -1036px}#loco-admin.wrap .region-kg{background-position:0 -1048px}#loco-admin.wrap .region-pm{background-position:0 -1060px}#loco-admin.wrap .region-sv{background-position:0 -1072px}#loco-admin.wrap .region-re{background-position:0 -1084px}#loco-admin.wrap .region-sa{background-position:0 -1096px}#loco-admin.wrap .region-sc{background-position:0 -1108px}#loco-admin.wrap .region-st{background-position:0 -1120px}#loco-admin.wrap .region-ke{background-position:0 -1132px}#loco-admin.wrap .region-im{background-position:0 -1144px}#loco-admin.wrap .region-kr{background-position:0 -1161px}#loco-admin.wrap .region-gf{background-position:0 -1173px}#loco-admin.wrap .region-dj{background-position:0 -1185px}#loco-admin.wrap .region-gq{background-position:0 -1197px}#loco-admin.wrap .region-gp{background-position:0 -1209px}#loco-admin.wrap .region-dk{background-position:0 -1221px}#loco-admin.wrap .region-gg{background-position:0 -1233px}#loco-admin.wrap .region-il{background-position:0 -1250px}#loco-admin.wrap .region-pn{background-position:0 -1262px}#loco-admin.wrap .region-sb{background-position:0 -1274px}#loco-admin.wrap .region-py{background-position:0 -1286px}#loco-admin.wrap .region-ru{background-position:0 -1298px}#loco-admin.wrap .region-kw{background-position:0 -1310px}#loco-admin.wrap .region-do{background-position:0 -1322px}#loco-admin.wrap .region-gt{background-position:0 -1334px}#loco-admin.wrap .region-gb{background-position:0 -1346px}#loco-admin.wrap .region-gu{background-position:0 -1358px}#loco-admin.wrap .region-je{background-position:0 -1370px}#loco-admin.wrap .region-hm{background-position:0 -1387px}#loco-admin.wrap .region-sg{background-position:0 -1399px}#loco-admin.wrap .region-pk{background-position:0 -1411px}#loco-admin.wrap .region-sr{background-position:0 -1423px}#loco-admin.wrap .region-se{background-position:0 -1435px}#loco-admin.wrap .region-jp{background-position:0 -1447px}#loco-admin.wrap .region-gw{background-position:0 -1459px}#loco-admin.wrap .region-eh{background-position:0 -1471px}#loco-admin.wrap .region-dz{background-position:0 -1483px}#loco-admin.wrap .region-ga{background-position:0 -1495px}#loco-admin.wrap .region-fr{background-position:0 -1507px}#loco-admin.wrap .region-dm{background-position:0 -1519px}#loco-admin.wrap .region-hn{background-position:0 -1531px}#loco-admin.wrap .region-sd{background-position:0 -1543px}#loco-admin.wrap .region-rw{background-position:0 -1555px}#loco-admin.wrap .region-ph{background-position:0 -1567px}#loco-admin.wrap .region-ss{background-position:0 -1579px}#loco-admin.wrap .region-qa{background-position:0 -1596px}#loco-admin.wrap .region-pe{background-position:0 -1608px}#loco-admin.wrap .region-pr{background-position:0 -1620px}#loco-admin.wrap .region-si{background-position:0 -1632px}#loco-admin.wrap .region-ht{background-position:0 -1644px}#loco-admin.wrap .region-es{background-position:0 -1656px}#loco-admin.wrap .region-gl{background-position:0 -1668px}#loco-admin.wrap .region-gm{background-position:0 -1680px}#loco-admin.wrap .region-er{background-position:0 -1692px}#loco-admin.wrap .region-fi{background-position:0 -1704px}#loco-admin.wrap .region-ee{background-position:0 -1716px}#loco-admin.wrap .region-kn{background-position:0 -1728px}#loco-admin.wrap .region-hu{background-position:0 -1740px}#loco-admin.wrap .region-iq{background-position:0 -1752px}#loco-admin.wrap .region-ky{background-position:0 -1764px}#loco-admin.wrap .region-sh{background-position:0 -1776px}#loco-admin.wrap .region-ps{background-position:0 -1788px}#loco-admin.wrap .region-pf{background-position:0 -1800px}#loco-admin.wrap .region-sj{background-position:0 -1812px}#loco-admin.wrap .region-id{background-position:0 -1824px}#loco-admin.wrap .region-is{background-position:0 -1836px}#loco-admin.wrap .region-eg{background-position:0 -1848px}#loco-admin.wrap .region-fk{background-position:0 -1860px}#loco-admin.wrap .region-fj{background-position:0 -1872px}#loco-admin.wrap .region-gn{background-position:0 -1884px}#loco-admin.wrap .region-gy{background-position:0 -1896px}#loco-admin.wrap .region-ir{background-position:0 -1908px}#loco-admin.wrap .region-km{background-position:0 -1920px}#loco-admin.wrap .region-ie{background-position:0 -1932px}#loco-admin.wrap .region-kz{background-position:0 -1944px}#loco-admin.wrap .region-ro{background-position:0 -1956px}#loco-admin.wrap .region-sk{background-position:0 -1968px}#loco-admin.wrap .region-pg{background-position:0 -1980px}#loco-admin.wrap .region-pt{background-position:0 -1992px}#loco-admin.wrap .region-so{background-position:0 -2004px}#loco-admin.wrap .region-sx{background-position:0 -2016px}#loco-admin.wrap .region-hr{background-position:0 -2033px}#loco-admin.wrap .region-ki{background-position:0 -2045px}#loco-admin.wrap .region-jm{background-position:0 -2057px}#loco-admin.wrap .region-ec{background-position:0 -2069px}#loco-admin.wrap .region-et{background-position:0 -2081px}#loco-admin.wrap .region-fo{background-position:0 -2093px}#loco-admin.wrap .region-kh{background-position:0 -2105px}#loco-admin.wrap .region-sy{background-position:0 -2117px}#loco-admin.wrap .region-sn{background-position:0 -2129px}#loco-admin.wrap .region-pw{background-position:0 -2141px}#loco-admin.wrap .region-sl{background-position:0 -2153px}#loco-admin.wrap .region-fm{background-position:0 -2165px}#loco-admin.wrap .region-gi{background-position:0 -2177px}#loco-admin.wrap .region-de{background-position:0 -2189px}#loco-admin.wrap .region-gh{background-position:0 -2201px}#loco-admin.wrap .region-jo{background-position:0 -2213px}#loco-admin.wrap .region-it{background-position:0 -2225px}#loco-admin.wrap .region-pa{background-position:0 -2237px}#loco-admin.wrap .region-sz{background-position:0 -2249px}#loco-admin.wrap .region-sm{background-position:0 -2261px}#loco-admin.wrap .region-tn{background-position:0 -2273px}#loco-admin.wrap .region-ml{background-position:0 -2285px}#loco-admin.wrap .region-cg{background-position:0 -2297px}#loco-admin.wrap .region-ax{background-position:0 -2309px}#loco-admin.wrap .region-ao{background-position:0 -2321px}#loco-admin.wrap .region-bt{background-position:0 -2333px}#loco-admin.wrap .region-an{background-position:0 -2345px}#loco-admin.wrap .region-bb{background-position:0 -2357px}#loco-admin.wrap .region-cf{background-position:0 -2369px}#loco-admin.wrap .region-mm{background-position:0 -2381px}#loco-admin.wrap .region-li{background-position:0 -2393px}#loco-admin.wrap .region-na{background-position:0 -2405px}#loco-admin.wrap .region-mz{background-position:0 -2417px}#loco-admin.wrap .region-to{background-position:0 -2429px}#loco-admin.wrap .region-vg{background-position:0 -2441px}#loco-admin.wrap .region-ve{background-position:0 -2453px}#loco-admin.wrap .region-tz{background-position:0 -2465px}#loco-admin.wrap .region-tm{background-position:0 -2477px}#loco-admin.wrap .region-mx{background-position:0 -2489px}#loco-admin.wrap .region-nc{background-position:0 -2501px}#loco-admin.wrap .region-mo{background-position:0 -2513px}#loco-admin.wrap .region-lk{background-position:0 -2525px}#loco-admin.wrap .region-cd{background-position:0 -2537px}#loco-admin.wrap .region-al{background-position:0 -2549px}#loco-admin.wrap .region-bw{background-position:0 -2561px}#loco-admin.wrap .region-cs{background-position:0 -2573px}#loco-admin.wrap .region-cr{background-position:0 -2585px}#loco-admin.wrap .region-bv{background-position:0 -2597px}#loco-admin.wrap .region-am{background-position:0 -2609px}#loco-admin.wrap .region-az{background-position:0 -2621px}#loco-admin.wrap .region-ba{background-position:0 -2633px}#loco-admin.wrap .region-mn{background-position:0 -2645px}#loco-admin.wrap .region-nu{background-position:0 -2657px}#loco-admin.wrap .region-my{background-position:0 -2669px}#loco-admin.wrap .region-tl{background-position:0 -2681px}#loco-admin.wrap .region-ws{background-position:0 -2693px}#loco-admin.wrap .region-th{background-position:0 -2705px}#loco-admin.wrap .region-nf{background-position:0 -2717px}#loco-admin.wrap .region-ly{background-position:0 -2729px}#loco-admin.wrap .region-ai{background-position:0 -2741px}#loco-admin.wrap .region-br{background-position:0 -2753px}#loco-admin.wrap .region-cv{background-position:0 -2765px}#loco-admin.wrap .region-be{background-position:0 -2777px}#loco-admin.wrap .region-ca{background-position:0 -2789px}#loco-admin.wrap .region-bd{background-position:0 -2801px}#loco-admin.wrap .region-cw{background-position:0 -2813px}#loco-admin.wrap .region-bs{background-position:0 -2830px}#loco-admin.wrap .region-ng{background-position:0 -2842px}#loco-admin.wrap .region-mk{background-position:0 -2854px}#loco-admin.wrap .region-np{background-position:0 -2866px}#loco-admin.wrap .region-va{background-position:0 -2878px}#loco-admin.wrap .region-uz{background-position:0 -2890px}#loco-admin.wrap .region-um{background-position:0 -2902px}#loco-admin.wrap .region-tk{background-position:0 -2914px}#loco-admin.wrap .region-vc{background-position:0 -2926px}#loco-admin.wrap .region-zw{background-position:0 -2938px}#loco-admin.wrap .region-nr{background-position:0 -2950px}#loco-admin.wrap .region-ne{background-position:0 -2962px}#loco-admin.wrap .region-cu{background-position:0 -2974px}#loco-admin.wrap .region-bq{background-position:0 -2986px}#loco-admin.wrap .region-bf{background-position:0 -2998px}#loco-admin.wrap .region-bg{background-position:0 -3010px}#loco-admin.wrap .region-cc{background-position:0 -3022px}#loco-admin.wrap .region-mh{background-position:0 -3034px}#loco-admin.wrap .region-za{background-position:0 -3046px}#loco-admin.wrap .region-uy{background-position:0 -3058px}#loco-admin.wrap .region-wf{background-position:0 -3070px}#loco-admin.wrap .region-vu{background-position:0 -3082px}#loco-admin.wrap .region-tj{background-position:0 -3094px}#loco-admin.wrap .variant-scotland,#loco-admin.wrap .region-gb.lang-gd{background-position:0 -3106px}#loco-admin.wrap .variant-valencia,#loco-admin.wrap .region-es.variant-valencia{background-position:0 -3118px}#loco-admin.wrap .variant-wales,#loco-admin.wrap .region-gb.lang-cy{background-position:0 -3130px}#loco-admin.wrap .x-eu{background-position:0 -3142px}#loco-admin.wrap span.lang code{display:none}#loco-admin.wrap .icon-notag:before{content:""}#loco-admin.wrap .icon-magnify:before{content:"🔍"}#loco-admin.wrap .icon-python:before{content:"🐍"}#loco-admin.wrap .icon-unicode:before{content:"u"}#loco-admin.wrap .icon-json:before{content:"{"}#loco-admin.wrap .icon-bullist:before{content:""}#loco-admin.wrap .icon-numlist:before{content:""}#loco-admin.wrap .icon-indent:before{content:""}#loco-admin.wrap .icon-outdent:before{content:""}#loco-admin.wrap .icon-link:before{content:""}#loco-admin.wrap .icon-unlink:before{content:""}#loco-admin.wrap .icon-bold:before{content:"B"}#loco-admin.wrap .icon-italic:before{content:"I"}#loco-admin.wrap .icon-translate:before{content:""}#loco-admin.wrap .icon-proj:before{content:""}#loco-admin.wrap .icon-plural:before{content:"᛬"}#loco-admin.wrap .icon-max:before,#loco-admin.wrap .icon-full-screen:before{content:""}#loco-admin.wrap .icon-min:before{content:""}#loco-admin.wrap .icon-sort:before{content:""}#loco-admin.wrap .icon-ok:before,#loco-admin.wrap .notice-success>.has-icon:before,#loco-admin.wrap .notice-success p>strong.has-icon:before{content:"✓"}#loco-admin.wrap .icon-ok-empty:before{content:"🗌"}#loco-admin.wrap .icon-checkbox-checked:before,#loco-admin.wrap .selector.multi li.checked .icon-checkbox:before{content:"☑"}#loco-admin.wrap .icon-checkbox-unchecked:before{content:"☐"}#loco-admin.wrap .icon-checkbox-partial:before{content:"☉"}#loco-admin.wrap .icon-radio-checked:before{content:"⚫"}#loco-admin.wrap .icon-radio-unchecked:before{content:"⚪"}#loco-admin.wrap .icon-ext:before{content:"⬈"}#loco-admin.wrap .icon-share:before{content:""}#loco-admin.wrap .icon-star:before{content:""}#loco-admin.wrap .icon-user:before{content:""}#loco-admin.wrap .icon-remove:before,#loco-admin.wrap a.icon.close:before{content:"×"}#loco-admin.wrap .icon-cog:before{content:""}#loco-admin.wrap .icon-trash:before{content:""}#loco-admin.wrap .icon-time:before,#loco-admin.wrap .icon-history:before{content:""}#loco-admin.wrap .icon-download:before{content:""}#loco-admin.wrap .icon-revert:before{content:""}#loco-admin.wrap .icon-sync:before{content:""}#loco-admin.wrap .icon-lock:before,#loco-admin.wrap .notice-locked>.has-icon:before,#loco-admin.wrap .notice-locked p>strong.has-icon:before{content:""}#loco-admin.wrap .icon-flag:before{content:""}#loco-admin.wrap .icon-tag:before{content:""}#loco-admin.wrap .icon-tags:before{content:""}#loco-admin.wrap .icon-print:before{content:""}#loco-admin.wrap .icon-camera:before{content:""}#loco-admin.wrap .icon-pencil:before{content:""}#loco-admin.wrap .icon-add:before{content:""}#loco-admin.wrap .icon-del:before{content:""}#loco-admin.wrap .icon-clear:before,#loco-admin.wrap a.icon.clear:before{content:""}#loco-admin.wrap .icon-ok-sign:before{content:"✔"}#loco-admin.wrap .icon-help:before{content:"?"}#loco-admin.wrap .icon-info:before,#loco-admin.wrap .notice-info>.has-icon:before,#loco-admin.wrap .notice-info p>strong.has-icon:before{content:"ℹ"}#loco-admin.wrap .icon-cancel:before{content:""}#loco-admin.wrap .icon-warn:before,#loco-admin.wrap .notice-error>.has-icon:before,#loco-admin.wrap .notice-error p>strong.has-icon:before,#loco-admin.wrap .notice-warning>.has-icon:before,#loco-admin.wrap .notice-warning p>strong.has-icon:before{content:""}#loco-admin.wrap .icon-comment:before{content:""}#loco-admin.wrap .icon-bar-chart:before{content:""}#loco-admin.wrap .icon-key:before{content:""}#loco-admin.wrap .icon-cogs:before{content:""}#loco-admin.wrap .icon-comments:before{content:""}#loco-admin.wrap .icon-signout:before{content:""}#loco-admin.wrap .icon-signin:before{content:""}#loco-admin.wrap .icon-upload:before{content:""}#loco-admin.wrap .icon-twitter:before{content:"🐦"}#loco-admin.wrap .icon-facebook:before{content:""}#loco-admin.wrap .icon-github:before{content:""}#loco-admin.wrap .icon-feed:before{content:""}#loco-admin.wrap .icon-globe:before{content:""}#loco-admin.wrap .icon-wrench:before,#loco-admin.wrap .notice-debug>.has-icon:before,#loco-admin.wrap .notice-debug p>strong.has-icon:before{content:""}#loco-admin.wrap .icon-group:before{content:""}#loco-admin.wrap .icon-cloud:before{content:""}#loco-admin.wrap .icon-copy:before{content:""}#loco-admin.wrap .icon-save:before{content:""}#loco-admin.wrap .icon-menu:before{content:""}#loco-admin.wrap .icon-table:before{content:""}#loco-admin.wrap .icon-caret-down:before{content:"▼"}#loco-admin.wrap .icon-caret-up:before{content:"▲"}#loco-admin.wrap .icon-caret-right:before{content:"▶"}#loco-admin.wrap .icon-mail:before{content:""}#loco-admin.wrap .icon-cloud-upload:before{content:""}#loco-admin.wrap .icon-file:before{content:""}#loco-admin.wrap .icon-circle-white:before{content:"⚬"}#loco-admin.wrap .icon-circle-black:before{content:"●"}#loco-admin.wrap .icon-eraser:before{content:""}#loco-admin.wrap .icon-unlock:before{content:""}#loco-admin.wrap .icon-apple:before{content:""}#loco-admin.wrap .icon-android:before{content:""}#loco-admin.wrap .icon-robot:before{content:"🤖"}#loco-admin.wrap .icon-back:before{content:"⬅"}#loco-admin.wrap .icon-next:before{content:"➔"}#loco-admin.wrap .icon-arrow-up:before{content:""}#loco-admin.wrap .icon-ccard:before{content:""}#loco-admin.wrap .icon-caret-left:before{content:"◀"}#loco-admin.wrap .icon-pro:before{content:"⚡"}#loco-admin.wrap .icon-bell:before{content:""}#loco-admin.wrap .icon-code:before{content:""}#loco-admin.wrap .icon-privacy:before{content:"🛡"}#loco-admin.wrap .icon-hellip:before{content:"…"}#loco-admin.wrap .icon-vellip:before{content:"⁞"}#loco-admin.wrap .icon-collapse:before{content:""}#loco-admin.wrap .icon-expand:before{content:""}#loco-admin.wrap .icon-wordpress:before{content:""}#loco-admin.wrap .icon-database:before{content:""}#loco-admin.wrap .icon-restore:before{content:""}#loco-admin.wrap .icon-pilcrow:before{content:"¶"}#loco-admin.wrap .icon,#loco-admin.wrap .has-icon:before,#loco-admin.wrap .has-dashicon:before{speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#loco-admin.wrap .icon,#loco-admin.wrap .has-icon:before{font-family:"loco"}#loco-admin.wrap .has-dashicon:before{font-family:"dashicons";font-size:1.4em}#loco-admin.wrap .has-icon:before,#loco-admin.wrap .has-dashicon:before,#loco-admin.wrap .has-icon>span{display:inline-block;vertical-align:middle}#loco-admin.wrap .only-icon{text-align:center}#loco-admin.wrap .only-icon:before{text-align:center;padding:0}#loco-admin.wrap .only-icon span{display:none}#loco-admin.wrap a,#loco-admin.wrap .wp-core-ui .button-link{text-decoration:none}#loco-admin.wrap h3:hover>a.loco-anchor{color:#ccc}#loco-admin.wrap h3:hover>a.loco-anchor:before{content:"¶"}#loco-admin.wrap .has-lang>span{display:inline-block;vertical-align:middle}#loco-admin.wrap a.has-lang:hover>span:last-child{text-decoration:underline}#loco-admin.wrap h1 ul,#loco-admin.wrap h1 li{margin:0;padding:0}#loco-admin.wrap h1 li{display:inline-block}#loco-admin.wrap h1 li:after{content:"/";color:#999;text-shadow:none;display:inline-block}#loco-admin.wrap h1 li:last-child:after{content:""}#loco-admin.wrap h1 li:last-child a{color:inherit;pointer-events:none;cursor:auto}#loco-admin.wrap h2 span{color:#999;font-weight:normal}#loco-admin.wrap h2 .loco-meta,#loco-admin.wrap h3 .loco-meta{color:inherit;font-size:14px;font-weight:normal;vertical-align:middle}#loco-admin.wrap .wp-list-table td:first-child .icon{width:16px;display:inline-block;text-align:center}#loco-admin.wrap .wp-list-table td{white-space:nowrap}#loco-admin.wrap .wp-list-table td>a,#loco-admin.wrap .wp-list-table td>time{display:inline-block;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;-o-text-overflow:ellipsis;-ms-text-overflow:ellipsis}#loco-admin.wrap .wp-list-table th.loco-sort{cursor:pointer}#loco-admin.wrap .wp-list-table th.loco-sort:hover{color:#000}#loco-admin.wrap .wp-list-table th.loco-sort.loco-asc:after,#loco-admin.wrap .wp-list-table th.loco-sort.loco-desc:after{padding:0 0 0 4px;color:#999}#loco-admin.wrap .wp-list-table th.loco-sort.loco-desc:after{content:"▼"}#loco-admin.wrap .wp-list-table th.loco-sort.loco-asc:after{content:"▲"}#loco-admin.wrap .wp-list-table td.has-row-actions{overflow:visible}#loco-admin.wrap form.loco-filter{display:block;margin-bottom:5px}#loco-admin.wrap form.loco-filter .icon-filter{color:#999}#loco-admin.wrap nav.above-list-table{margin-bottom:1em}#loco-admin.wrap nav.above-list-table a{display:inline-block;margin-right:1em}#loco-admin.wrap .wp-core-ui button.inverted,#loco-admin.wrap .wp-core-ui button.inverted:hover,#loco-admin.wrap .po-fuzzy button.icon-cloud{background:-moz-linear-gradient(top, #cccccc 0%, #e0e0e0 30%, #fefefe 100%);background:-webkit-linear-gradient(top, #cccccc 0%, #e0e0e0 30%, #fefefe 100%);background:linear-gradient(to bottom, #cccccc 0%, #e0e0e0 30%, #fefefe 100%);-webkit-box-shadow:0 1px 0 #fff;-moz-box-shadow:0 1px 0 #fff;box-shadow:0 1px 0 #fff;border-color:gray}#loco-admin.wrap .wp-core-ui button:active,#loco-admin.wrap .wp-core-ui button.inverted:active{border-color:#5b9dd9}#loco-admin.wrap .loco-clearable{display:inline-block;vertical-align:middle;position:relative}#loco-admin.wrap .loco-clearable a.clear,#loco-admin.wrap .auto-comp-wrap a.clear{top:0;right:0;outline:none;margin:0;border:solid 1px transparent;padding:5px 5px;position:absolute;font-size:1em;line-height:normal}#loco-admin.wrap .loco-clearable a.clear:before,#loco-admin.wrap .auto-comp-wrap a.clear:before{vertical-align:middle;padding:0;color:#999}#loco-admin.wrap .loco-clearable a.clear:hover:before,#loco-admin.wrap .auto-comp-wrap a.clear:hover:before{color:#333}#loco-admin.wrap .loco-clearable a.clear span,#loco-admin.wrap .auto-comp-wrap a.clear span{display:none}#loco-admin.wrap .loco-clearable ::-ms-clear,#loco-admin.wrap .auto-comp-wrap ::-ms-clear{display:none}#loco-admin.wrap div.progress{color:#000;background:transparent !important}#loco-admin.wrap div.progress *{height:100%;overflow:hidden;white-space:nowrap}#loco-admin.wrap div.progress .t{background-color:#ddd;border:1px solid #ccc}#loco-admin.wrap div.progress .t .bar{float:left;clear:none;background-color:#3db63d}#loco-admin.wrap div.progress .t .bar.f{background-color:#bd2c00}#loco-admin.wrap div.progress .l{display:block}#loco-admin.wrap td div.progress .t{border:none}#loco-admin.wrap td div.progress .l{display:none}#loco-admin.wrap code.path{color:#333;margin:0;padding:0;display:inline;background:transparent}#loco-admin.wrap .loco-danger{color:#d54e21}#loco-admin.wrap .notice,#loco-admin.wrap .panel{background:#fff;position:relative;margin:1em 0;padding:1px 12px}#loco-admin.wrap .notice-generic{border-color:#ddd}#loco-admin.wrap .notice-success>.has-icon,#loco-admin.wrap .notice-success p>strong.has-icon{color:#000}#loco-admin.wrap .notice-warning{border-color:orange}#loco-admin.wrap .notice-error{border-color:#dc3232}#loco-admin.wrap .notice-debug{border-color:#00a0d2}#loco-admin.wrap .notice-danger{border-color:#dc3232}#loco-admin.wrap .notice-locked{border-color:orange}#loco-admin.wrap .notice>.has-icon:before,#loco-admin.wrap .notice p>strong.has-icon:before{padding-right:6px}#loco-admin.wrap .notice>p>a.button.has-icon:before{width:1.2em}#loco-admin.wrap .notice>p>em{color:#d54e21;font-style:normal}#loco-admin.wrap .notice>p>em a{color:inherit}#loco-admin.wrap .notice>p a:hover,#loco-admin.wrap .notice>nav a:hover{text-decoration:underline}#loco-admin.wrap .notice>p a.button,#loco-admin.wrap .notice>nav a.button{text-decoration:inherit}#loco-admin.wrap .notice.has-nav{display:flex;flex-direction:row}#loco-admin.wrap .notice.has-nav p,#loco-admin.wrap .notice.has-nav nav{line-height:22px;flex-grow:1}#loco-admin.wrap .notice.has-nav nav{text-align:right;padding:2px;margin:.5em 0}#loco-admin.wrap .notice.has-nav.is-dismissible{padding-right:38px}#loco-admin.wrap .notice.has-nav a{white-space:nowrap}#loco-admin.wrap .notice.has-nav nav>span{color:#666}#loco-admin.wrap .notice>h3>span{display:inline-block;vertical-align:middle}#loco-admin.wrap ul.problems li{font-style:italic}#loco-admin.wrap label{position:relative}#loco-admin.wrap label.for-disabled,#loco-admin.wrap label.for-disabled>input{cursor:default !important}#loco-admin.wrap input.regular-text,#loco-admin.wrap textarea.regular-text{width:25em}#loco-admin.wrap .button-link{padding:0 10px 1px}#loco-admin.wrap .button-danger{background:#ba0000;border-color:#900 #600 #600;-webkit-box-shadow:0 1px 0 #600;-moz-box-shadow:0 1px 0 #600;box-shadow:0 1px 0 #600;color:#fff;text-shadow:0 -1px 1px #600,1px 0 1px #600,0 1px 1px #600,-1px 0 1px #600}#loco-admin.wrap .button-success{background:#00b500;border-color:#090 #2e892e #2e892e;-webkit-box-shadow:0 1px 0 #2e892e;-moz-box-shadow:0 1px 0 #2e892e;box-shadow:0 1px 0 #2e892e;color:#fff;text-shadow:0 -1px 1px #2e892e,1px 0 1px #2e892e,0 1px 1px #2e892e,-1px 0 1px #2e892e}#loco-admin.wrap .button-success:hover{background:#3db63d}#loco-admin.wrap .button-danger[disabled],#loco-admin.wrap .button-success[disabled]{text-shadow:none !important}#loco-admin.wrap form button.loco-loading.button-large{padding-left:0}#loco-admin.wrap form button.loco-loading.button-large:before{width:16px;height:16px;margin:0 4px;content:" ";font-size:16px;line-height:1;display:inline-block;vertical-align:sub}#loco-admin.wrap ::placeholder{color:#ccc}#loco-admin.wrap ::-webkit-input-placeholder{color:#ccc}#loco-admin.wrap :-moz-placeholder{color:#ccc;opacity:1}#loco-admin.wrap ::-moz-placeholder{color:#ccc;opacity:1}#loco-admin.wrap :-ms-input-placeholder{color:#ccc}#loco-admin.wrap .ielt10 .placeheld{color:#ccc}#loco-admin.wrap a.has-raquo:after{content:" »"}#loco-admin.wrap a.has-laquo:before{content:"« "}#loco-admin.wrap span.inline-spinner{display:inline-block;min-width:16px;min-height:16px;background:transparent url(../img/spin-modal.gif?v=2.5.2) 0 0 no-repeat}.js #wpbody-content>.notice{display:none}.js #wpbody-content>.notice.inline{display:block}.js #loco-admin.wrap .jshide,.no-js #loco-admin.wrap .jsonly{display:none !important}#loco-admin.wrap .invis{visibility:hidden}.form-table tr td{vertical-align:top}.form-table tr.compact td{padding-top:0}.form-table tr th a.icon-help{display:none}.loco-modal{min-width:50%;min-height:100px}.loco-modal-wide{min-width:90% !important}.loco-modal-no-close .ui-dialog-titlebar-close{display:none}.loco-modal .ui-dialog-titlebar-close{overflow:hidden}.loco-modal.request-filesystem-credentials-dialog{top:15% !important;max-height:85% !important}.loco-modal.request-filesystem-credentials-dialog>.ui-dialog-content{background:inherit}.loco-modal.request-filesystem-credentials-dialog .ftp-password>label>em:last-child{display:none}.ui-dialog-content>div.loco-loading{height:100%;background:transparent url(../img/spin-modal.gif?v=2.5.2) center 20px no-repeat}#loco-po-ref ol li{color:#aaa;margin:0;white-space:pre;padding:0 0 0 1em;font:normal 12px/17px Consolas,Monaco,monospace;background:transparent;border-left:1px solid #eee}#loco-po-ref ol li code{margin:0;padding:0;display:inline;background:inherit}#loco-po-ref ol li.highlighted{color:#666;background-color:#f8eec7}#loco-po-ref ol li.highlighted code.T_CONSTANT_ENCAPSED_STRING{color:#c931c7}#loco-credit>*{vertical-align:middle}#loco-credit>a{display:inline-block;position:relative;overflow:hidden;background:transparent url(../img/logo-foot.gif?v=2.5.2) 0 0 no-repeat;height:30px;width:100px;text-indent:200px;-webkit-transition-duration:0s;transition-duration:0s}#loco-credit>a:hover{background-position:0 -35px}#loco-content{position:relative}#footer-upgrade span:before{color:#ccc;content:" | ";display:inline;padding-left:.5em;padding-right:.5em}#footer-upgrade span:first-child:before{content:"";display:none}.loco-clearfix:after{content:".";display:block;clear:both;visibility:hidden;line-height:0;height:0}dl.debug dt{font-weight:bold}dl.debug dt,dl.debug dd{white-space:pre}.wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(0,115,170,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#0073aa;foo:#0073aa}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#66c6e4 !important;background:#008ec2 !important;border-color:#008ec2 !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../img/skins/fresh/spin-primary-button.gif?v=2.5.2) 0 0 no-repeat !important}
1
+ ._ajax_loader_f2{background-image:url(../img/ajax-loader-f2.gif?v=2.5.3);background-repeat:no-repeat;min-height:16px}._ajax_loader_f2x4{background:transparent url(../img/ajax-loader-f2-x4.gif?v=2.5.3) 0 0 no-repeat;min-height:75px}._ajax_loader_cc{background-image:url(../img/ajax-loader-cc.gif?v=2.5.3);background-repeat:no-repeat;min-height:16px}@media only screen and (-webkit-min-device-pixel-ratio: 2),only screen and (min--moz-device-pixel-ratio: 2),only screen and (-o-min-device-pixel-ratio: 2/1),only screen and (min-device-pixel-ratio: 2),only screen and (min-resolution: 192dpi),only screen and (min-resolution: 2dppx){._ajax_loader_f2{background-image:url(../img/ajax-loader-f2-x2.gif?v=2.5.3);background-size:16px}._ajax_loader_cc{background-image:url(../img/ajax-loader-cc-x2.gif?v=2.5.3);background-size:16px}}._green_glow_inner{-webkit-box-shadow:inset 0 0 10px 0 #3db63d;-moz-box-shadow:inset 0 0 10px 0 #3db63d;box-shadow:inset 0 0 10px 0 #3db63d}._green_glow_outer{-webkit-box-shadow:0 0 .5em 0 #3db63d;-moz-box-shadow:0 0 .5em 0 #3db63d;box-shadow:0 0 .5em 0 #3db63d}.loco-font,#loco-admin.wrap .wp-list-table th.loco-sort.loco-asc:after,#loco-admin.wrap .wp-list-table th.loco-sort.loco-desc:after,#loco-admin.wrap .icon,#loco-admin.wrap .has-icon:before{font-family:"loco";speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@font-face{font-family:"loco";src:url("../font/loco.eot?v=2.5.3");src:url("../font/loco.eot?v=2.5.3?#iefix") format("embedded-opentype"),url("../font/loco.woff?v=2.5.3") format("woff"),url("../font/loco.ttf?v=2.5.3") format("truetype"),url("../font/loco.svg?v=2.5.3#loco") format("svg");font-weight:normal;font-style:normal}.tipsy{font-size:11px;position:absolute;padding:5px;z-index:500001;opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.tipsy.in{opacity:1}.tipsy-inner{background-color:#000;color:#fff;white-space:nowrap;padding:6px 8px;line-height:1.3em;text-align:center;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px;-webkit-font-smoothing:subpixel-antialiased}.tipsy-arrow{position:absolute;width:0;height:0;line-height:0;border:5px dashed #000}.tipsy-n .tipsy-arrow{top:0px;left:50%;margin-left:-5px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.tipsy-nw .tipsy-arrow{top:0;left:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.tipsy-ne .tipsy-arrow{top:0;right:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.tipsy-s .tipsy-arrow{bottom:0;left:50%;margin-left:-5px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.tipsy-sw .tipsy-arrow{bottom:0;left:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.tipsy-se .tipsy-arrow{bottom:0;right:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.tipsy-e .tipsy-arrow{right:0;top:50%;margin-top:-5px;border-left-style:solid;border-right:none;border-top-color:transparent;border-bottom-color:transparent}.tipsy-w .tipsy-arrow{left:0;top:50%;margin-top:-5px;border-right-style:solid;border-left:none;border-top-color:transparent;border-bottom-color:transparent}#loco-admin.wrap .selector li,#loco-admin.wrap .selector .handle,#loco-admin.wrap .selectoradd a,#loco-admin.wrap .selectorsep:before,#loco-admin.wrap .selectorsep span{padding:.3em .75em}#loco-admin.wrap .selector{text-align:left;display:inline-block;white-space:nowrap}#loco-admin.wrap .selectoradd a,#loco-admin.wrap .selector .handle{cursor:default;display:block;position:relative;border-top:solid 1px #fff;border-right:solid 1px #ddd;border-bottom:solid 1px #ddd;border-left:solid 1px #fff;color:#666;height:1.3em;overflow:hidden;white-space:normal}#loco-admin.wrap .selectorsep{display:inline-block;border:solid 1px transparent}#loco-admin.wrap .selectorsep:before{display:block;position:relative;color:#999;height:1.3em;overflow:hidden}#loco-admin.wrap .selectorsep>*{display:block;line-height:1em;color:#666;height:1.3em;overflow:hidden}#loco-admin.wrap .selector .handle{outline:none;white-space:nowrap;padding-right:2.3em;max-width:250px;text-overflow:ellipsis}#loco-admin.wrap .selector .handle .prefix{padding-right:.6ex}#loco-admin.wrap .selector .handle:after{font-family:loco;font-size:1.3em;color:#ccc;display:block;position:absolute;top:.25em;right:.6em;content:"▼"}#loco-admin.wrap .selector .handle:focus:after,#loco-admin.wrap .selector .handle:hover:after{color:#666}#loco-admin.wrap .selector.no-caret .handle{padding-right:.75em}#loco-admin.wrap .selector.no-caret .handle:after{display:none}#loco-admin.wrap .selector.no-title .handle{padding-left:.5em;padding-right:.5em}#loco-admin.wrap .selector.no-title .handle .label{display:none}#loco-admin.wrap .selector.no-title .handle .icon{margin-right:0px}#loco-admin.wrap .selector.dummy .handle{border-color:transparent}#loco-admin.wrap .selector.dummy .handle:after{display:none}#loco-admin.wrap .selectoradd{position:relative}#loco-admin.wrap .selectoradd>*{display:block;float:left;clear:none}#loco-admin.wrap .selectoradd>a.has-icon{width:1.3em}#loco-admin.wrap .selectoradd>a.has-icon:before{color:#999;display:inline;padding-left:0;padding-right:0;line-height:1.4em}#loco-admin.wrap .selectoradd>a.has-icon:hover:after{color:#2e892e}#loco-admin.wrap .selectorsep{display:inline-block}#loco-admin.wrap .selectorsep span{color:#666;height:1.3em}#loco-admin.wrap .selector ul{padding:0}#loco-admin.wrap .selector ul,#loco-admin.wrap .selector li{display:block;position:relative;cursor:default;margin:0}#loco-admin.wrap .selector ul{z-index:5;position:absolute;left:0;top:0;background:#f5f5f5;box-shadow:0 10px 5px rgba(0,0,0,.2);border:solid 1px #ccc;overflow:auto}#loco-admin.wrap .selector.up ul{margin-top:0}#loco-admin.wrap .selector.multi li input{display:none}#loco-admin.wrap .selector.multi li.checked{background:#e5e5e5}#loco-admin.wrap .selector li.active{background:#e5e5e5 !important}#loco-admin.wrap .selector li.over{background:#ccc !important;color:#fff;text-shadow:1px 1px #aaa}#loco-admin.wrap .selector li.over .label{color:#fff}#loco-admin.wrap .selector .label{font:inherit;color:inherit}#loco-admin.wrap .selector .icon{display:inline-block;min-width:1.2em;text-align:center;font-size:14px}#loco-admin.wrap .selector .icon.no-icon{display:none}#loco-admin.wrap .selector .icon:before{color:#666}#loco-admin.wrap .selector .avtr{width:18px;height:18px;background-size:18px;background-repeat:no-repeat}#loco-admin.wrap .selector .label{line-height:1}#loco-admin.wrap .selector .icon,#loco-admin.wrap .selector .icon-16{vertical-align:bottom}#loco-admin.wrap .selector .icon,#loco-admin.wrap .selector .lang,#loco-admin.wrap .selector .icon-16{margin-right:5px}#loco-admin.wrap .selector .region,#loco-admin.wrap .selector .variant-wales,#loco-admin.wrap .selector .region-gb.lang-cy,#loco-admin.wrap .selector .variant-scotland,#loco-admin.wrap .selector .region-gb.lang-gd,#loco-admin.wrap .selector .variant-valencia,#loco-admin.wrap .selector .region-es.variant-valencia,#loco-admin.wrap .selector .lang-ca,#loco-admin.wrap .selector .region-es.lang-ca,#loco-admin.wrap .selector .lang-eo,#loco-admin.wrap .selector .lang-eu{margin-left:2px;margin-right:7px}#loco-admin.wrap .selector.ticked .icon.no-icon{font-size:12px;display:inline-block}#loco-admin.wrap .selector.ticked .active .icon.no-icon:before{content:"✓"}#loco-admin.wrap .selectoradd a:hover,#loco-admin.wrap .selector a.handle:focus,#loco-admin.wrap .selector a.handle:hover{color:#000;border-color:#999}#loco-admin.wrap .selector.active .handle{border-color:#999;background-color:#eee;color:#999}#loco-admin.wrap .selector.active .handle:after{color:#999;content:"▲"}#loco-admin.wrap .selector.disabled{cursor:default;cursor:no-drop;cursor:not-allowed}#loco-admin.wrap .selector.disabled .handle{pointer-events:none;border-top:solid 1px #fff;border-right:solid 1px #ddd;border-bottom:solid 1px #ddd;border-left:solid 1px #fff;color:#999;padding-right:1em}#loco-admin.wrap .selector.disabled .handle:after{display:none}#loco-admin.wrap .selector.disabled .handle span.icon{color:#999 !important}#loco-admin.wrap .selector li.disabled,#loco-admin.wrap .selector li.disabled.over{color:#aaa;text-shadow:1px 1px #fff;pointer-events:none}#loco-admin.wrap .selector li.disabled *{cursor:text}#loco-admin.wrap .selector li.disabled .icon:before{color:#aaa}#loco-admin.wrap .selector li.disabled .flag,#loco-admin.wrap .selector li.disabled .icon-16{opacity:.4}#loco-admin.wrap .selector.lefty ul{left:auto;right:0}#loco-admin.wrap .selector.lefty ul .icon,#loco-admin.wrap .selector.lefty ul .icon-32{display:block;float:right;clear:none}#loco-admin.wrap .selector.lefty ul .label{padding-right:32px;padding-left:0}#loco-admin.wrap .selector ul>form{margin:0;display:block}#loco-admin.wrap .selector ul>form input{margin:0;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0}#loco-admin.wrap .selector ul>form input:focus{-webkit-box-shadow:inset 0 0 5px 0 #3db63d;-moz-box-shadow:inset 0 0 5px 0 #3db63d;box-shadow:inset 0 0 5px 0 #3db63d}#loco-admin.wrap .selector ul>form input.error{border-color:#c00;-webkit-box-shadow:inset 0 0 5px 0 rgba(153,0,0,.5);-moz-box-shadow:inset 0 0 5px 0 rgba(153,0,0,.5);box-shadow:inset 0 0 5px 0 rgba(153,0,0,.5)}#loco-admin.wrap .selector ul>form a.clear{margin:0;border:none}#loco-admin.wrap .selector ul>form ::placeholder{color:gray;font-size:16px;font-family:"loco";text-align:right;display:block}#loco-admin.wrap .selector ul>form ::-webkit-input-placeholder{color:gray;font-size:16px;font-family:"loco";text-align:right;display:block}#loco-admin.wrap .selector ul>form :-moz-placeholder{color:gray;font-size:16px;font-family:"loco";text-align:right;display:block;opacity:1}#loco-admin.wrap .selector ul>form ::-moz-placeholder{color:gray;font-size:16px;font-family:"loco";text-align:right;display:block;opacity:1}#loco-admin.wrap .selector ul>form :-ms-input-placeholder{color:gray;font-size:16px;font-family:"loco";text-align:right;display:block}#loco-admin.wrap .selector ul>form .ielt10 .placeheld{color:gray;font-size:16px;font-family:"loco";text-align:right;display:block}#loco-admin.wrap div.auto-comp-wrap{width:100%}#loco-admin.wrap div.auto-comp-wrap input{display:inline-block}#loco-admin.wrap div.auto-comp-wrap.loading input{background:transparent url(../img/ajax-loader.gif?v=2.5.3) right 2px no-repeat}#loco-admin.wrap div.auto-comp-drop{color:#333;background:#fff;border-top:none;position:absolute;width:auto;top:0;left:0;z-index:99;-webkit-box-shadow:0 5px 5px rgba(0,0,0,.4);-moz-box-shadow:0 5px 5px rgba(0,0,0,.4);box-shadow:0 5px 5px rgba(0,0,0,.4)}#loco-admin.wrap div.auto-comp-result{padding:5px 10px;cursor:pointer;background:#f0f0f0;border-top:solid 1px #fff;border-bottom:solid 1px #ddd;white-space:nowrap}#loco-admin.wrap div.auto-comp-result:first-child{border-top:solid 1px #ddd}#loco-admin.wrap div.auto-comp-result>*{display:inline-block;vertical-align:middle;line-height:normal}#loco-admin.wrap div.auto-comp-result .icon:before{padding-right:5px}#loco-admin.wrap div.auto-comp-result:hover{background:#a8a8a8;color:#fff;border-top-color:#a8a8a8;border-bottom-color:#999}#loco-admin.wrap div.auto-comp-result.selected{background:#666 !important;color:#fff;border-top-color:#666;border-bottom-color:#666}#loco-admin.wrap div.auto-comp-result .lang,#loco-admin.wrap div.auto-comp-result .region,#loco-admin.wrap div.auto-comp-result .variant-wales,#loco-admin.wrap div.auto-comp-result .region-gb.lang-cy,#loco-admin.wrap div.auto-comp-result .variant-scotland,#loco-admin.wrap div.auto-comp-result .region-gb.lang-gd,#loco-admin.wrap div.auto-comp-result .variant-valencia,#loco-admin.wrap div.auto-comp-result .region-es.variant-valencia,#loco-admin.wrap div.auto-comp-result .lang-ca,#loco-admin.wrap div.auto-comp-result .region-es.lang-ca,#loco-admin.wrap div.auto-comp-result .lang-eo,#loco-admin.wrap div.auto-comp-result .lang-eu,#loco-admin.wrap div.auto-comp-result .avtr{margin-right:5px}#loco-admin.wrap div.auto-comp-wrap.error a.icon.clear:before{color:#c00;opacity:1}#loco-admin.wrap div.auto-comp-wrap.error input[type=text]{border-color:#c00;color:#c00}#loco-admin.wrap div.auto-comp-wrap.error input[type=text]:focus{-webkit-box-shadow:0 0 .5em 0 rgba(153,0,0,.5);-moz-box-shadow:0 0 .5em 0 rgba(153,0,0,.5);box-shadow:0 0 .5em 0 rgba(153,0,0,.5)}#loco-admin.wrap ._ajax_loader_f2{background-image:url(../img/ajax-loader-f2.gif?v=2.5.3);background-repeat:no-repeat;min-height:16px}#loco-admin.wrap ._ajax_loader_f2x4{background:transparent url(../img/ajax-loader-f2-x4.gif?v=2.5.3) 0 0 no-repeat;min-height:75px}#loco-admin.wrap ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc.gif?v=2.5.3);background-repeat:no-repeat;min-height:16px}@media only screen and (-webkit-min-device-pixel-ratio: 2),only screen and (min--moz-device-pixel-ratio: 2),only screen and (-o-min-device-pixel-ratio: 2/1),only screen and (min-device-pixel-ratio: 2),only screen and (min-resolution: 192dpi),only screen and (min-resolution: 2dppx){#loco-admin.wrap ._ajax_loader_f2{background-image:url(../img/ajax-loader-f2-x2.gif?v=2.5.3);background-size:16px}#loco-admin.wrap ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc-x2.gif?v=2.5.3);background-size:16px}}#loco-admin.wrap ._green_glow_inner{-webkit-box-shadow:inset 0 0 10px 0 #3db63d;-moz-box-shadow:inset 0 0 10px 0 #3db63d;box-shadow:inset 0 0 10px 0 #3db63d}#loco-admin.wrap ._green_glow_outer{-webkit-box-shadow:0 0 .5em 0 #3db63d;-moz-box-shadow:0 0 .5em 0 #3db63d;box-shadow:0 0 .5em 0 #3db63d}#loco-admin.wrap .loco-font,#loco-admin.wrap .wp-list-table th.loco-sort.loco-asc:after,#loco-admin.wrap .wp-list-table th.loco-sort.loco-desc:after,#loco-admin.wrap .icon,#loco-admin.wrap .has-icon:before{font-family:"loco";speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#loco-admin.wrap .has-icon:before{display:inline-block;padding-right:.3em}#loco-admin.wrap a.icon-help{cursor:help}#loco-admin.wrap a.icon-help span{display:none}#loco-admin.wrap .icon-notag:before{content:""}#loco-admin.wrap .icon-magnify:before{content:"🔍"}#loco-admin.wrap .icon-python:before{content:"🐍"}#loco-admin.wrap .icon-unicode:before{content:"u"}#loco-admin.wrap .icon-json:before{content:"{"}#loco-admin.wrap .icon-bullist:before{content:""}#loco-admin.wrap .icon-numlist:before{content:""}#loco-admin.wrap .icon-indent:before{content:""}#loco-admin.wrap .icon-outdent:before{content:""}#loco-admin.wrap .icon-link:before{content:""}#loco-admin.wrap .icon-unlink:before{content:""}#loco-admin.wrap .icon-bold:before{content:"B"}#loco-admin.wrap .icon-italic:before{content:"I"}#loco-admin.wrap .icon-translate:before{content:""}#loco-admin.wrap .icon-proj:before{content:""}#loco-admin.wrap .icon-plural:before{content:"᛬"}#loco-admin.wrap .icon-max:before,#loco-admin.wrap .icon-full-screen:before{content:""}#loco-admin.wrap .icon-min:before{content:""}#loco-admin.wrap .icon-sort:before{content:""}#loco-admin.wrap .icon-ok:before,#loco-admin.wrap .notice-success>.has-icon:before,#loco-admin.wrap .notice-success p>strong.has-icon:before{content:"✓"}#loco-admin.wrap .icon-ok-empty:before{content:"🗌"}#loco-admin.wrap .icon-checkbox-checked:before,#loco-admin.wrap .selector.multi li.checked .icon-checkbox:before{content:"☑"}#loco-admin.wrap .icon-checkbox-unchecked:before{content:"☐"}#loco-admin.wrap .icon-checkbox-partial:before{content:"☉"}#loco-admin.wrap .icon-radio-checked:before{content:"⚫"}#loco-admin.wrap .icon-radio-unchecked:before{content:"⚪"}#loco-admin.wrap .icon-ext:before{content:"⬈"}#loco-admin.wrap .icon-share:before{content:""}#loco-admin.wrap .icon-star:before{content:""}#loco-admin.wrap .icon-user:before{content:""}#loco-admin.wrap .icon-remove:before,#loco-admin.wrap a.icon.close:before{content:"×"}#loco-admin.wrap .icon-cog:before{content:""}#loco-admin.wrap .icon-trash:before{content:""}#loco-admin.wrap .icon-time:before,#loco-admin.wrap .icon-history:before{content:""}#loco-admin.wrap .icon-download:before{content:""}#loco-admin.wrap .icon-revert:before{content:""}#loco-admin.wrap .icon-sync:before{content:""}#loco-admin.wrap .icon-lock:before,#loco-admin.wrap .notice-locked>.has-icon:before,#loco-admin.wrap .notice-locked p>strong.has-icon:before{content:""}#loco-admin.wrap .icon-flag:before{content:""}#loco-admin.wrap .icon-tag:before{content:""}#loco-admin.wrap .icon-tags:before{content:""}#loco-admin.wrap .icon-print:before{content:""}#loco-admin.wrap .icon-camera:before{content:""}#loco-admin.wrap .icon-pencil:before{content:""}#loco-admin.wrap .icon-add:before{content:""}#loco-admin.wrap .icon-del:before{content:""}#loco-admin.wrap .icon-clear:before,#loco-admin.wrap a.icon.clear:before{content:""}#loco-admin.wrap .icon-ok-sign:before{content:"✔"}#loco-admin.wrap .icon-help:before{content:"?"}#loco-admin.wrap .icon-info:before,#loco-admin.wrap .notice-info>.has-icon:before,#loco-admin.wrap .notice-info p>strong.has-icon:before{content:"ℹ"}#loco-admin.wrap .icon-cancel:before{content:""}#loco-admin.wrap .icon-warn:before,#loco-admin.wrap .notice-error>.has-icon:before,#loco-admin.wrap .notice-error p>strong.has-icon:before,#loco-admin.wrap .notice-warning>.has-icon:before,#loco-admin.wrap .notice-warning p>strong.has-icon:before{content:""}#loco-admin.wrap .icon-comment:before{content:""}#loco-admin.wrap .icon-bar-chart:before{content:""}#loco-admin.wrap .icon-key:before{content:""}#loco-admin.wrap .icon-cogs:before{content:""}#loco-admin.wrap .icon-comments:before{content:""}#loco-admin.wrap .icon-signout:before{content:""}#loco-admin.wrap .icon-signin:before{content:""}#loco-admin.wrap .icon-upload:before{content:""}#loco-admin.wrap .icon-twitter:before{content:"🐦"}#loco-admin.wrap .icon-facebook:before{content:""}#loco-admin.wrap .icon-github:before{content:""}#loco-admin.wrap .icon-feed:before{content:""}#loco-admin.wrap .icon-globe:before{content:""}#loco-admin.wrap .icon-wrench:before,#loco-admin.wrap .notice-debug>.has-icon:before,#loco-admin.wrap .notice-debug p>strong.has-icon:before{content:""}#loco-admin.wrap .icon-group:before{content:""}#loco-admin.wrap .icon-cloud:before{content:""}#loco-admin.wrap .icon-copy:before{content:""}#loco-admin.wrap .icon-save:before{content:""}#loco-admin.wrap .icon-menu:before{content:""}#loco-admin.wrap .icon-table:before{content:""}#loco-admin.wrap .icon-caret-down:before{content:"▼"}#loco-admin.wrap .icon-caret-up:before{content:"▲"}#loco-admin.wrap .icon-caret-right:before{content:"▶"}#loco-admin.wrap .icon-mail:before{content:""}#loco-admin.wrap .icon-cloud-upload:before{content:""}#loco-admin.wrap .icon-file:before{content:""}#loco-admin.wrap .icon-circle-white:before{content:"⚬"}#loco-admin.wrap .icon-circle-black:before{content:"●"}#loco-admin.wrap .icon-eraser:before{content:""}#loco-admin.wrap .icon-unlock:before{content:""}#loco-admin.wrap .icon-apple:before{content:""}#loco-admin.wrap .icon-android:before{content:""}#loco-admin.wrap .icon-robot:before{content:"🤖"}#loco-admin.wrap .icon-back:before{content:"⬅"}#loco-admin.wrap .icon-next:before{content:"➔"}#loco-admin.wrap .icon-arrow-up:before{content:""}#loco-admin.wrap .icon-ccard:before{content:""}#loco-admin.wrap .icon-caret-left:before{content:"◀"}#loco-admin.wrap .icon-pro:before{content:"⚡"}#loco-admin.wrap .icon-bell:before{content:""}#loco-admin.wrap .icon-code:before{content:""}#loco-admin.wrap .icon-privacy:before{content:"🛡"}#loco-admin.wrap .icon-hellip:before{content:"…"}#loco-admin.wrap .icon-vellip:before{content:"⁞"}#loco-admin.wrap .icon-collapse:before{content:""}#loco-admin.wrap .icon-expand:before{content:""}#loco-admin.wrap .icon-wordpress:before{content:""}#loco-admin.wrap .icon-database:before{content:""}#loco-admin.wrap .icon-restore:before{content:""}#loco-admin.wrap .icon-pilcrow:before{content:"¶"}#loco-admin.wrap .icon-status.is-translated:before,#loco-admin.wrap .is-translated>header>.icon-status:before{color:#2e892e;content:"✓";text-align:center}#loco-admin.wrap .icon-status.is-untranslated:before,#loco-admin.wrap .is-untranslated>header>.icon-status:before{color:#aaa;content:"×";text-align:center;font-size:1.1em}#loco-admin.wrap .icon-status.is-flagged:before,#loco-admin.wrap .is-flagged>header>.icon-status:before{color:#bd2c00;content:"";text-align:center}#loco-admin.wrap .icon-status.is-translated.is-blank:before,#loco-admin.wrap .icon-status.is-translated.is-inherit:before,#loco-admin.wrap .is-translated.is-blank>header>.icon-status:before,#loco-admin.wrap .is-translated.is-inherit>header>.icon-status:before{content:"🗌"}#loco-admin.wrap .icon-status.is-fuzzy:before,#loco-admin.wrap .is-fuzzy>header>.icon-status:before{color:#666;content:""}#loco-admin.wrap .lang,#loco-admin.wrap .region,#loco-admin.wrap .variant-wales,#loco-admin.wrap .region-gb.lang-cy,#loco-admin.wrap .variant-scotland,#loco-admin.wrap .region-gb.lang-gd,#loco-admin.wrap .variant-valencia,#loco-admin.wrap .region-es.variant-valencia,#loco-admin.wrap .lang-ca,#loco-admin.wrap .region-es.lang-ca,#loco-admin.wrap .lang-eo,#loco-admin.wrap .lang-eu{color:#fff;background:#2e892e;display:inline-block;text-transform:uppercase;overflow:hidden;font-family:Verdana,Arial,sans-serif;font-size:9px;font-weight:normal;font-style:normal;line-height:12px;text-align:center;white-space:normal;text-shadow:none}#loco-admin.wrap .lang{width:20px;height:12px;line-height:12px;vertical-align:middle}#loco-admin.wrap .lang:before{content:attr(lang);vertical-align:baseline}#loco-admin.wrap .no-lang{width:18px;height:10px;border:solid 1px #2e892e;background:transparent}#loco-admin.wrap .lang-el{background-color:#1d48a3}#loco-admin.wrap .lang-el:before{content:"Ελ"}#loco-admin.wrap .region,#loco-admin.wrap .variant-wales,#loco-admin.wrap .region-gb.lang-cy,#loco-admin.wrap .variant-scotland,#loco-admin.wrap .region-gb.lang-gd,#loco-admin.wrap .variant-valencia,#loco-admin.wrap .region-es.variant-valencia,#loco-admin.wrap .lang-ca,#loco-admin.wrap .region-es.lang-ca,#loco-admin.wrap .lang-eo,#loco-admin.wrap .lang-eu{width:16px;height:12px;margin:0 2px;background-image:url(../img/flags.png?v=2.5.3);background-repeat:no-repeat;background-color:transparent}#loco-admin.wrap .region:before,#loco-admin.wrap .variant-wales:before,#loco-admin.wrap .region-gb.lang-cy:before,#loco-admin.wrap .variant-scotland:before,#loco-admin.wrap .region-gb.lang-gd:before,#loco-admin.wrap .variant-valencia:before,#loco-admin.wrap .region-es.variant-valencia:before,#loco-admin.wrap .lang-ca:before,#loco-admin.wrap .region-es.lang-ca:before,#loco-admin.wrap .lang-eo:before,#loco-admin.wrap .lang-eu:before{visibility:hidden}#loco-admin.wrap .lang-zh{background-color:#b90000}#loco-admin.wrap .lang-zh.script-hans:before{content:"中国"}#loco-admin.wrap .lang-zh.script-hant:before{content:"中國"}#loco-admin.wrap .__{background-position:0 0}#loco-admin.wrap .lang-eo{background-position:0 -12px}#loco-admin.wrap .lang-eu{background-position:0 -24px}#loco-admin.wrap .lang-ca,#loco-admin.wrap .region-es.lang-ca{background-position:0 -36px}#loco-admin.wrap .region-tg{background-position:0 -48px}#loco-admin.wrap .region-me{background-position:0 -60px}#loco-admin.wrap .region-la{background-position:0 -73px}#loco-admin.wrap .region-mr{background-position:0 -85px}#loco-admin.wrap .region-ni{background-position:0 -97px}#loco-admin.wrap .region-lv{background-position:0 -109px}#loco-admin.wrap .region-om{background-position:0 -121px}#loco-admin.wrap .region-af{background-position:0 -133px}#loco-admin.wrap .region-cy{background-position:0 -145px}#loco-admin.wrap .region-bj{background-position:0 -157px}#loco-admin.wrap .region-aq{background-position:0 -169px}#loco-admin.wrap .region-cn{background-position:0 -186px}#loco-admin.wrap .region-co{background-position:0 -198px}#loco-admin.wrap .region-cx{background-position:0 -210px}#loco-admin.wrap .region-ag{background-position:0 -222px}#loco-admin.wrap .region-ms{background-position:0 -234px}#loco-admin.wrap .region-md{background-position:0 -246px}#loco-admin.wrap .region-zm{background-position:0 -258px}#loco-admin.wrap .region-vn{background-position:0 -270px}#loco-admin.wrap .region-tf{background-position:0 -282px}#loco-admin.wrap .region-td{background-position:0 -294px}#loco-admin.wrap .region-yt{background-position:0 -306px}#loco-admin.wrap .region-lb{background-position:0 -318px}#loco-admin.wrap .region-mf{background-position:0 -330px}#loco-admin.wrap .region-lu{background-position:0 -347px}#loco-admin.wrap .region-mq{background-position:0 -359px}#loco-admin.wrap .region-cz{background-position:0 -371px}#loco-admin.wrap .region-ae{background-position:0 -383px}#loco-admin.wrap .region-cm{background-position:0 -395px}#loco-admin.wrap .region-bi{background-position:0 -407px}#loco-admin.wrap .region-ar{background-position:0 -419px}#loco-admin.wrap .region-as{background-position:0 -431px}#loco-admin.wrap .region-bh{background-position:0 -443px}#loco-admin.wrap .region-cl{background-position:0 -455px}#loco-admin.wrap .region-ad{background-position:0 -467px}#loco-admin.wrap .region-mp{background-position:0 -479px}#loco-admin.wrap .region-lt{background-position:0 -491px}#loco-admin.wrap .region-mg{background-position:0 -503px}#loco-admin.wrap .region-lc{background-position:0 -515px}#loco-admin.wrap .region-tr{background-position:0 -527px}#loco-admin.wrap .region-ua{background-position:0 -539px}#loco-admin.wrap .region-tv{background-position:0 -551px}#loco-admin.wrap .region-vi{background-position:0 -563px}#loco-admin.wrap .region-mt{background-position:0 -575px}#loco-admin.wrap .region-no{background-position:0 -587px}#loco-admin.wrap .region-mc{background-position:0 -599px}#loco-admin.wrap .region-ch{background-position:0 -611px}#loco-admin.wrap .region-bl{background-position:0 -623px}#loco-admin.wrap .region-aw{background-position:0 -640px}#loco-admin.wrap .region-bz{background-position:0 -652px}#loco-admin.wrap .region-bm{background-position:0 -664px}#loco-admin.wrap .region-ci{background-position:0 -676px}#loco-admin.wrap .region-mu{background-position:0 -688px}#loco-admin.wrap .region-us{background-position:0 -700px}#loco-admin.wrap .region-tw{background-position:0 -712px}#loco-admin.wrap .region-ye{background-position:0 -724px}#loco-admin.wrap .region-mw{background-position:0 -736px}#loco-admin.wrap .region-nl{background-position:0 -748px}#loco-admin.wrap .region-ls{background-position:0 -760px}#loco-admin.wrap .region-bo{background-position:0 -772px}#loco-admin.wrap .region-at{background-position:0 -784px}#loco-admin.wrap .region-ck{background-position:0 -796px}#loco-admin.wrap .region-by{background-position:0 -808px}#loco-admin.wrap .region-au{background-position:0 -820px}#loco-admin.wrap .region-bn{background-position:0 -832px}#loco-admin.wrap .region-ma{background-position:0 -844px}#loco-admin.wrap .region-nz{background-position:0 -856px}#loco-admin.wrap .region-lr{background-position:0 -868px}#loco-admin.wrap .region-mv{background-position:0 -880px}#loco-admin.wrap .region-tc{background-position:0 -892px}#loco-admin.wrap .region-ug{background-position:0 -904px}#loco-admin.wrap .region-tt{background-position:0 -916px}#loco-admin.wrap .region-pl{background-position:0 -928px}#loco-admin.wrap .region-rs{background-position:0 -940px}#loco-admin.wrap .region-in{background-position:0 -952px}#loco-admin.wrap .region-ge{background-position:0 -964px}#loco-admin.wrap .region-gr{background-position:0 -976px}#loco-admin.wrap .region-gs{background-position:0 -988px}#loco-admin.wrap .region-gd{background-position:0 -1000px}#loco-admin.wrap .region-io{background-position:0 -1012px}#loco-admin.wrap .region-hk{background-position:0 -1024px}#loco-admin.wrap .region-kp{background-position:0 -1036px}#loco-admin.wrap .region-kg{background-position:0 -1048px}#loco-admin.wrap .region-pm{background-position:0 -1060px}#loco-admin.wrap .region-sv{background-position:0 -1072px}#loco-admin.wrap .region-re{background-position:0 -1084px}#loco-admin.wrap .region-sa{background-position:0 -1096px}#loco-admin.wrap .region-sc{background-position:0 -1108px}#loco-admin.wrap .region-st{background-position:0 -1120px}#loco-admin.wrap .region-ke{background-position:0 -1132px}#loco-admin.wrap .region-im{background-position:0 -1144px}#loco-admin.wrap .region-kr{background-position:0 -1161px}#loco-admin.wrap .region-gf{background-position:0 -1173px}#loco-admin.wrap .region-dj{background-position:0 -1185px}#loco-admin.wrap .region-gq{background-position:0 -1197px}#loco-admin.wrap .region-gp{background-position:0 -1209px}#loco-admin.wrap .region-dk{background-position:0 -1221px}#loco-admin.wrap .region-gg{background-position:0 -1233px}#loco-admin.wrap .region-il{background-position:0 -1250px}#loco-admin.wrap .region-pn{background-position:0 -1262px}#loco-admin.wrap .region-sb{background-position:0 -1274px}#loco-admin.wrap .region-py{background-position:0 -1286px}#loco-admin.wrap .region-ru{background-position:0 -1298px}#loco-admin.wrap .region-kw{background-position:0 -1310px}#loco-admin.wrap .region-do{background-position:0 -1322px}#loco-admin.wrap .region-gt{background-position:0 -1334px}#loco-admin.wrap .region-gb{background-position:0 -1346px}#loco-admin.wrap .region-gu{background-position:0 -1358px}#loco-admin.wrap .region-je{background-position:0 -1370px}#loco-admin.wrap .region-hm{background-position:0 -1387px}#loco-admin.wrap .region-sg{background-position:0 -1399px}#loco-admin.wrap .region-pk{background-position:0 -1411px}#loco-admin.wrap .region-sr{background-position:0 -1423px}#loco-admin.wrap .region-se{background-position:0 -1435px}#loco-admin.wrap .region-jp{background-position:0 -1447px}#loco-admin.wrap .region-gw{background-position:0 -1459px}#loco-admin.wrap .region-eh{background-position:0 -1471px}#loco-admin.wrap .region-dz{background-position:0 -1483px}#loco-admin.wrap .region-ga{background-position:0 -1495px}#loco-admin.wrap .region-fr{background-position:0 -1507px}#loco-admin.wrap .region-dm{background-position:0 -1519px}#loco-admin.wrap .region-hn{background-position:0 -1531px}#loco-admin.wrap .region-sd{background-position:0 -1543px}#loco-admin.wrap .region-rw{background-position:0 -1555px}#loco-admin.wrap .region-ph{background-position:0 -1567px}#loco-admin.wrap .region-ss{background-position:0 -1579px}#loco-admin.wrap .region-qa{background-position:0 -1596px}#loco-admin.wrap .region-pe{background-position:0 -1608px}#loco-admin.wrap .region-pr{background-position:0 -1620px}#loco-admin.wrap .region-si{background-position:0 -1632px}#loco-admin.wrap .region-ht{background-position:0 -1644px}#loco-admin.wrap .region-es{background-position:0 -1656px}#loco-admin.wrap .region-gl{background-position:0 -1668px}#loco-admin.wrap .region-gm{background-position:0 -1680px}#loco-admin.wrap .region-er{background-position:0 -1692px}#loco-admin.wrap .region-fi{background-position:0 -1704px}#loco-admin.wrap .region-ee{background-position:0 -1716px}#loco-admin.wrap .region-kn{background-position:0 -1728px}#loco-admin.wrap .region-hu{background-position:0 -1740px}#loco-admin.wrap .region-iq{background-position:0 -1752px}#loco-admin.wrap .region-ky{background-position:0 -1764px}#loco-admin.wrap .region-sh{background-position:0 -1776px}#loco-admin.wrap .region-ps{background-position:0 -1788px}#loco-admin.wrap .region-pf{background-position:0 -1800px}#loco-admin.wrap .region-sj{background-position:0 -1812px}#loco-admin.wrap .region-id{background-position:0 -1824px}#loco-admin.wrap .region-is{background-position:0 -1836px}#loco-admin.wrap .region-eg{background-position:0 -1848px}#loco-admin.wrap .region-fk{background-position:0 -1860px}#loco-admin.wrap .region-fj{background-position:0 -1872px}#loco-admin.wrap .region-gn{background-position:0 -1884px}#loco-admin.wrap .region-gy{background-position:0 -1896px}#loco-admin.wrap .region-ir{background-position:0 -1908px}#loco-admin.wrap .region-km{background-position:0 -1920px}#loco-admin.wrap .region-ie{background-position:0 -1932px}#loco-admin.wrap .region-kz{background-position:0 -1944px}#loco-admin.wrap .region-ro{background-position:0 -1956px}#loco-admin.wrap .region-sk{background-position:0 -1968px}#loco-admin.wrap .region-pg{background-position:0 -1980px}#loco-admin.wrap .region-pt{background-position:0 -1992px}#loco-admin.wrap .region-so{background-position:0 -2004px}#loco-admin.wrap .region-sx{background-position:0 -2016px}#loco-admin.wrap .region-hr{background-position:0 -2033px}#loco-admin.wrap .region-ki{background-position:0 -2045px}#loco-admin.wrap .region-jm{background-position:0 -2057px}#loco-admin.wrap .region-ec{background-position:0 -2069px}#loco-admin.wrap .region-et{background-position:0 -2081px}#loco-admin.wrap .region-fo{background-position:0 -2093px}#loco-admin.wrap .region-kh{background-position:0 -2105px}#loco-admin.wrap .region-sy{background-position:0 -2117px}#loco-admin.wrap .region-sn{background-position:0 -2129px}#loco-admin.wrap .region-pw{background-position:0 -2141px}#loco-admin.wrap .region-sl{background-position:0 -2153px}#loco-admin.wrap .region-fm{background-position:0 -2165px}#loco-admin.wrap .region-gi{background-position:0 -2177px}#loco-admin.wrap .region-de{background-position:0 -2189px}#loco-admin.wrap .region-gh{background-position:0 -2201px}#loco-admin.wrap .region-jo{background-position:0 -2213px}#loco-admin.wrap .region-it{background-position:0 -2225px}#loco-admin.wrap .region-pa{background-position:0 -2237px}#loco-admin.wrap .region-sz{background-position:0 -2249px}#loco-admin.wrap .region-sm{background-position:0 -2261px}#loco-admin.wrap .region-tn{background-position:0 -2273px}#loco-admin.wrap .region-ml{background-position:0 -2285px}#loco-admin.wrap .region-cg{background-position:0 -2297px}#loco-admin.wrap .region-ax{background-position:0 -2309px}#loco-admin.wrap .region-ao{background-position:0 -2321px}#loco-admin.wrap .region-bt{background-position:0 -2333px}#loco-admin.wrap .region-an{background-position:0 -2345px}#loco-admin.wrap .region-bb{background-position:0 -2357px}#loco-admin.wrap .region-cf{background-position:0 -2369px}#loco-admin.wrap .region-mm{background-position:0 -2381px}#loco-admin.wrap .region-li{background-position:0 -2393px}#loco-admin.wrap .region-na{background-position:0 -2405px}#loco-admin.wrap .region-mz{background-position:0 -2417px}#loco-admin.wrap .region-to{background-position:0 -2429px}#loco-admin.wrap .region-vg{background-position:0 -2441px}#loco-admin.wrap .region-ve{background-position:0 -2453px}#loco-admin.wrap .region-tz{background-position:0 -2465px}#loco-admin.wrap .region-tm{background-position:0 -2477px}#loco-admin.wrap .region-mx{background-position:0 -2489px}#loco-admin.wrap .region-nc{background-position:0 -2501px}#loco-admin.wrap .region-mo{background-position:0 -2513px}#loco-admin.wrap .region-lk{background-position:0 -2525px}#loco-admin.wrap .region-cd{background-position:0 -2537px}#loco-admin.wrap .region-al{background-position:0 -2549px}#loco-admin.wrap .region-bw{background-position:0 -2561px}#loco-admin.wrap .region-cs{background-position:0 -2573px}#loco-admin.wrap .region-cr{background-position:0 -2585px}#loco-admin.wrap .region-bv{background-position:0 -2597px}#loco-admin.wrap .region-am{background-position:0 -2609px}#loco-admin.wrap .region-az{background-position:0 -2621px}#loco-admin.wrap .region-ba{background-position:0 -2633px}#loco-admin.wrap .region-mn{background-position:0 -2645px}#loco-admin.wrap .region-nu{background-position:0 -2657px}#loco-admin.wrap .region-my{background-position:0 -2669px}#loco-admin.wrap .region-tl{background-position:0 -2681px}#loco-admin.wrap .region-ws{background-position:0 -2693px}#loco-admin.wrap .region-th{background-position:0 -2705px}#loco-admin.wrap .region-nf{background-position:0 -2717px}#loco-admin.wrap .region-ly{background-position:0 -2729px}#loco-admin.wrap .region-ai{background-position:0 -2741px}#loco-admin.wrap .region-br{background-position:0 -2753px}#loco-admin.wrap .region-cv{background-position:0 -2765px}#loco-admin.wrap .region-be{background-position:0 -2777px}#loco-admin.wrap .region-ca{background-position:0 -2789px}#loco-admin.wrap .region-bd{background-position:0 -2801px}#loco-admin.wrap .region-cw{background-position:0 -2813px}#loco-admin.wrap .region-bs{background-position:0 -2830px}#loco-admin.wrap .region-ng{background-position:0 -2842px}#loco-admin.wrap .region-mk{background-position:0 -2854px}#loco-admin.wrap .region-np{background-position:0 -2866px}#loco-admin.wrap .region-va{background-position:0 -2878px}#loco-admin.wrap .region-uz{background-position:0 -2890px}#loco-admin.wrap .region-um{background-position:0 -2902px}#loco-admin.wrap .region-tk{background-position:0 -2914px}#loco-admin.wrap .region-vc{background-position:0 -2926px}#loco-admin.wrap .region-zw{background-position:0 -2938px}#loco-admin.wrap .region-nr{background-position:0 -2950px}#loco-admin.wrap .region-ne{background-position:0 -2962px}#loco-admin.wrap .region-cu{background-position:0 -2974px}#loco-admin.wrap .region-bq{background-position:0 -2986px}#loco-admin.wrap .region-bf{background-position:0 -2998px}#loco-admin.wrap .region-bg{background-position:0 -3010px}#loco-admin.wrap .region-cc{background-position:0 -3022px}#loco-admin.wrap .region-mh{background-position:0 -3034px}#loco-admin.wrap .region-za{background-position:0 -3046px}#loco-admin.wrap .region-uy{background-position:0 -3058px}#loco-admin.wrap .region-wf{background-position:0 -3070px}#loco-admin.wrap .region-vu{background-position:0 -3082px}#loco-admin.wrap .region-tj{background-position:0 -3094px}#loco-admin.wrap .variant-scotland,#loco-admin.wrap .region-gb.lang-gd{background-position:0 -3106px}#loco-admin.wrap .variant-valencia,#loco-admin.wrap .region-es.variant-valencia{background-position:0 -3118px}#loco-admin.wrap .variant-wales,#loco-admin.wrap .region-gb.lang-cy{background-position:0 -3130px}#loco-admin.wrap .x-eu{background-position:0 -3142px}#loco-admin.wrap span.lang code{display:none}#loco-admin.wrap .icon-notag:before{content:""}#loco-admin.wrap .icon-magnify:before{content:"🔍"}#loco-admin.wrap .icon-python:before{content:"🐍"}#loco-admin.wrap .icon-unicode:before{content:"u"}#loco-admin.wrap .icon-json:before{content:"{"}#loco-admin.wrap .icon-bullist:before{content:""}#loco-admin.wrap .icon-numlist:before{content:""}#loco-admin.wrap .icon-indent:before{content:""}#loco-admin.wrap .icon-outdent:before{content:""}#loco-admin.wrap .icon-link:before{content:""}#loco-admin.wrap .icon-unlink:before{content:""}#loco-admin.wrap .icon-bold:before{content:"B"}#loco-admin.wrap .icon-italic:before{content:"I"}#loco-admin.wrap .icon-translate:before{content:""}#loco-admin.wrap .icon-proj:before{content:""}#loco-admin.wrap .icon-plural:before{content:"᛬"}#loco-admin.wrap .icon-max:before,#loco-admin.wrap .icon-full-screen:before{content:""}#loco-admin.wrap .icon-min:before{content:""}#loco-admin.wrap .icon-sort:before{content:""}#loco-admin.wrap .icon-ok:before,#loco-admin.wrap .notice-success>.has-icon:before,#loco-admin.wrap .notice-success p>strong.has-icon:before{content:"✓"}#loco-admin.wrap .icon-ok-empty:before{content:"🗌"}#loco-admin.wrap .icon-checkbox-checked:before,#loco-admin.wrap .selector.multi li.checked .icon-checkbox:before{content:"☑"}#loco-admin.wrap .icon-checkbox-unchecked:before{content:"☐"}#loco-admin.wrap .icon-checkbox-partial:before{content:"☉"}#loco-admin.wrap .icon-radio-checked:before{content:"⚫"}#loco-admin.wrap .icon-radio-unchecked:before{content:"⚪"}#loco-admin.wrap .icon-ext:before{content:"⬈"}#loco-admin.wrap .icon-share:before{content:""}#loco-admin.wrap .icon-star:before{content:""}#loco-admin.wrap .icon-user:before{content:""}#loco-admin.wrap .icon-remove:before,#loco-admin.wrap a.icon.close:before{content:"×"}#loco-admin.wrap .icon-cog:before{content:""}#loco-admin.wrap .icon-trash:before{content:""}#loco-admin.wrap .icon-time:before,#loco-admin.wrap .icon-history:before{content:""}#loco-admin.wrap .icon-download:before{content:""}#loco-admin.wrap .icon-revert:before{content:""}#loco-admin.wrap .icon-sync:before{content:""}#loco-admin.wrap .icon-lock:before,#loco-admin.wrap .notice-locked>.has-icon:before,#loco-admin.wrap .notice-locked p>strong.has-icon:before{content:""}#loco-admin.wrap .icon-flag:before{content:""}#loco-admin.wrap .icon-tag:before{content:""}#loco-admin.wrap .icon-tags:before{content:""}#loco-admin.wrap .icon-print:before{content:""}#loco-admin.wrap .icon-camera:before{content:""}#loco-admin.wrap .icon-pencil:before{content:""}#loco-admin.wrap .icon-add:before{content:""}#loco-admin.wrap .icon-del:before{content:""}#loco-admin.wrap .icon-clear:before,#loco-admin.wrap a.icon.clear:before{content:""}#loco-admin.wrap .icon-ok-sign:before{content:"✔"}#loco-admin.wrap .icon-help:before{content:"?"}#loco-admin.wrap .icon-info:before,#loco-admin.wrap .notice-info>.has-icon:before,#loco-admin.wrap .notice-info p>strong.has-icon:before{content:"ℹ"}#loco-admin.wrap .icon-cancel:before{content:""}#loco-admin.wrap .icon-warn:before,#loco-admin.wrap .notice-error>.has-icon:before,#loco-admin.wrap .notice-error p>strong.has-icon:before,#loco-admin.wrap .notice-warning>.has-icon:before,#loco-admin.wrap .notice-warning p>strong.has-icon:before{content:""}#loco-admin.wrap .icon-comment:before{content:""}#loco-admin.wrap .icon-bar-chart:before{content:""}#loco-admin.wrap .icon-key:before{content:""}#loco-admin.wrap .icon-cogs:before{content:""}#loco-admin.wrap .icon-comments:before{content:""}#loco-admin.wrap .icon-signout:before{content:""}#loco-admin.wrap .icon-signin:before{content:""}#loco-admin.wrap .icon-upload:before{content:""}#loco-admin.wrap .icon-twitter:before{content:"🐦"}#loco-admin.wrap .icon-facebook:before{content:""}#loco-admin.wrap .icon-github:before{content:""}#loco-admin.wrap .icon-feed:before{content:""}#loco-admin.wrap .icon-globe:before{content:""}#loco-admin.wrap .icon-wrench:before,#loco-admin.wrap .notice-debug>.has-icon:before,#loco-admin.wrap .notice-debug p>strong.has-icon:before{content:""}#loco-admin.wrap .icon-group:before{content:""}#loco-admin.wrap .icon-cloud:before{content:""}#loco-admin.wrap .icon-copy:before{content:""}#loco-admin.wrap .icon-save:before{content:""}#loco-admin.wrap .icon-menu:before{content:""}#loco-admin.wrap .icon-table:before{content:""}#loco-admin.wrap .icon-caret-down:before{content:"▼"}#loco-admin.wrap .icon-caret-up:before{content:"▲"}#loco-admin.wrap .icon-caret-right:before{content:"▶"}#loco-admin.wrap .icon-mail:before{content:""}#loco-admin.wrap .icon-cloud-upload:before{content:""}#loco-admin.wrap .icon-file:before{content:""}#loco-admin.wrap .icon-circle-white:before{content:"⚬"}#loco-admin.wrap .icon-circle-black:before{content:"●"}#loco-admin.wrap .icon-eraser:before{content:""}#loco-admin.wrap .icon-unlock:before{content:""}#loco-admin.wrap .icon-apple:before{content:""}#loco-admin.wrap .icon-android:before{content:""}#loco-admin.wrap .icon-robot:before{content:"🤖"}#loco-admin.wrap .icon-back:before{content:"⬅"}#loco-admin.wrap .icon-next:before{content:"➔"}#loco-admin.wrap .icon-arrow-up:before{content:""}#loco-admin.wrap .icon-ccard:before{content:""}#loco-admin.wrap .icon-caret-left:before{content:"◀"}#loco-admin.wrap .icon-pro:before{content:"⚡"}#loco-admin.wrap .icon-bell:before{content:""}#loco-admin.wrap .icon-code:before{content:""}#loco-admin.wrap .icon-privacy:before{content:"🛡"}#loco-admin.wrap .icon-hellip:before{content:"…"}#loco-admin.wrap .icon-vellip:before{content:"⁞"}#loco-admin.wrap .icon-collapse:before{content:""}#loco-admin.wrap .icon-expand:before{content:""}#loco-admin.wrap .icon-wordpress:before{content:""}#loco-admin.wrap .icon-database:before{content:""}#loco-admin.wrap .icon-restore:before{content:""}#loco-admin.wrap .icon-pilcrow:before{content:"¶"}#loco-admin.wrap .icon,#loco-admin.wrap .has-icon:before,#loco-admin.wrap .has-dashicon:before{speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#loco-admin.wrap .icon,#loco-admin.wrap .has-icon:before{font-family:"loco"}#loco-admin.wrap .has-dashicon:before{font-family:"dashicons";font-size:1.4em}#loco-admin.wrap .has-icon:before,#loco-admin.wrap .has-dashicon:before,#loco-admin.wrap .has-icon>span{display:inline-block;vertical-align:middle}#loco-admin.wrap .only-icon{text-align:center}#loco-admin.wrap .only-icon:before{text-align:center;padding:0}#loco-admin.wrap .only-icon span{display:none}#loco-admin.wrap a,#loco-admin.wrap .wp-core-ui .button-link{text-decoration:none}#loco-admin.wrap h3:hover>a.loco-anchor{color:#ccc}#loco-admin.wrap h3:hover>a.loco-anchor:before{content:"¶"}#loco-admin.wrap .has-lang>span{display:inline-block;vertical-align:middle}#loco-admin.wrap a.has-lang:hover>span:last-child{text-decoration:underline}#loco-admin.wrap h1 ul,#loco-admin.wrap h1 li{margin:0;padding:0}#loco-admin.wrap h1 li{display:inline-block}#loco-admin.wrap h1 li:after{content:"/";color:#999;text-shadow:none;display:inline-block}#loco-admin.wrap h1 li:last-child:after{content:""}#loco-admin.wrap h1 li:last-child a{color:inherit;pointer-events:none;cursor:auto}#loco-admin.wrap h2 span{color:#999;font-weight:normal}#loco-admin.wrap h2 .loco-meta,#loco-admin.wrap h3 .loco-meta{color:inherit;font-size:14px;font-weight:normal;vertical-align:middle}#loco-admin.wrap .wp-list-table td:first-child .icon{width:16px;display:inline-block;text-align:center}#loco-admin.wrap .wp-list-table td{white-space:nowrap}#loco-admin.wrap .wp-list-table td>a,#loco-admin.wrap .wp-list-table td>time{display:inline-block;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;-o-text-overflow:ellipsis;-ms-text-overflow:ellipsis}#loco-admin.wrap .wp-list-table th.loco-sort{cursor:pointer}#loco-admin.wrap .wp-list-table th.loco-sort:hover{color:#000}#loco-admin.wrap .wp-list-table th.loco-sort.loco-asc:after,#loco-admin.wrap .wp-list-table th.loco-sort.loco-desc:after{padding:0 0 0 4px;color:#999}#loco-admin.wrap .wp-list-table th.loco-sort.loco-desc:after{content:"▼"}#loco-admin.wrap .wp-list-table th.loco-sort.loco-asc:after{content:"▲"}#loco-admin.wrap .wp-list-table td.has-row-actions{overflow:visible}#loco-admin.wrap form.loco-filter{display:block;margin-bottom:5px}#loco-admin.wrap form.loco-filter .icon-filter{color:#999}#loco-admin.wrap nav.above-list-table{margin-bottom:1em}#loco-admin.wrap nav.above-list-table a{display:inline-block;margin-right:1em}#loco-admin.wrap .wp-core-ui button.inverted,#loco-admin.wrap .wp-core-ui button.inverted:hover,#loco-admin.wrap .po-fuzzy button.icon-cloud{background:-moz-linear-gradient(top, #cccccc 0%, #e0e0e0 30%, #fefefe 100%);background:-webkit-linear-gradient(top, #cccccc 0%, #e0e0e0 30%, #fefefe 100%);background:linear-gradient(to bottom, #cccccc 0%, #e0e0e0 30%, #fefefe 100%);-webkit-box-shadow:0 1px 0 #fff;-moz-box-shadow:0 1px 0 #fff;box-shadow:0 1px 0 #fff;border-color:gray}#loco-admin.wrap .wp-core-ui button:active,#loco-admin.wrap .wp-core-ui button.inverted:active{border-color:#5b9dd9}#loco-admin.wrap .loco-clearable{display:inline-block;vertical-align:middle;position:relative}#loco-admin.wrap .loco-clearable a.clear,#loco-admin.wrap .auto-comp-wrap a.clear{top:0;right:0;outline:none;margin:0;border:solid 1px transparent;padding:5px 5px;position:absolute;font-size:1em;line-height:normal}#loco-admin.wrap .loco-clearable a.clear:before,#loco-admin.wrap .auto-comp-wrap a.clear:before{vertical-align:middle;padding:0;color:#999}#loco-admin.wrap .loco-clearable a.clear:hover:before,#loco-admin.wrap .auto-comp-wrap a.clear:hover:before{color:#333}#loco-admin.wrap .loco-clearable a.clear span,#loco-admin.wrap .auto-comp-wrap a.clear span{display:none}#loco-admin.wrap .loco-clearable ::-ms-clear,#loco-admin.wrap .auto-comp-wrap ::-ms-clear{display:none}#loco-admin.wrap div.progress{color:#000;background:transparent !important}#loco-admin.wrap div.progress *{height:100%;overflow:hidden;white-space:nowrap}#loco-admin.wrap div.progress .t{background-color:#ddd;border:1px solid #ccc}#loco-admin.wrap div.progress .t .bar{float:left;clear:none;background-color:#3db63d}#loco-admin.wrap div.progress .t .bar.f{background-color:#bd2c00}#loco-admin.wrap div.progress .l{display:block}#loco-admin.wrap td div.progress .t{border:none}#loco-admin.wrap td div.progress .l{display:none}#loco-admin.wrap code.path{color:#333;margin:0;padding:0;display:inline;background:transparent}#loco-admin.wrap .loco-danger{color:#d54e21}#loco-admin.wrap .notice,#loco-admin.wrap .panel{background:#fff;position:relative;margin:1em 0;padding:1px 12px}#loco-admin.wrap .notice-generic{border-color:#ddd}#loco-admin.wrap .notice-success>.has-icon,#loco-admin.wrap .notice-success p>strong.has-icon{color:#000}#loco-admin.wrap .notice-warning{border-color:orange}#loco-admin.wrap .notice-error{border-color:#dc3232}#loco-admin.wrap .notice-debug{border-color:#00a0d2}#loco-admin.wrap .notice-danger{border-color:#dc3232}#loco-admin.wrap .notice-locked{border-color:orange}#loco-admin.wrap .notice>.has-icon:before,#loco-admin.wrap .notice p>strong.has-icon:before{padding-right:6px}#loco-admin.wrap .notice>p>a.button.has-icon:before{width:1.2em}#loco-admin.wrap .notice>p>em{color:#d54e21;font-style:normal}#loco-admin.wrap .notice>p>em a{color:inherit}#loco-admin.wrap .notice>p a:hover,#loco-admin.wrap .notice>nav a:hover{text-decoration:underline}#loco-admin.wrap .notice>p a.button,#loco-admin.wrap .notice>nav a.button{text-decoration:inherit}#loco-admin.wrap .notice.has-nav{display:flex;flex-direction:row}#loco-admin.wrap .notice.has-nav p,#loco-admin.wrap .notice.has-nav nav{line-height:22px;flex-grow:1}#loco-admin.wrap .notice.has-nav nav{text-align:right;padding:2px;margin:.5em 0}#loco-admin.wrap .notice.has-nav.is-dismissible{padding-right:38px}#loco-admin.wrap .notice.has-nav a{white-space:nowrap}#loco-admin.wrap .notice.has-nav nav>span{color:#666}#loco-admin.wrap .notice>h3>span{display:inline-block;vertical-align:middle}#loco-admin.wrap ul.problems li{font-style:italic}#loco-admin.wrap label{position:relative}#loco-admin.wrap label.for-disabled,#loco-admin.wrap label.for-disabled>input{cursor:default !important}#loco-admin.wrap input.regular-text,#loco-admin.wrap textarea.regular-text{width:25em}#loco-admin.wrap .button-link{padding:0 10px 1px}#loco-admin.wrap .button-danger{background:#ba0000;border-color:#900 #600 #600;-webkit-box-shadow:0 1px 0 #600;-moz-box-shadow:0 1px 0 #600;box-shadow:0 1px 0 #600;color:#fff;text-shadow:0 -1px 1px #600,1px 0 1px #600,0 1px 1px #600,-1px 0 1px #600}#loco-admin.wrap .button-success{background:#00b500;border-color:#090 #2e892e #2e892e;-webkit-box-shadow:0 1px 0 #2e892e;-moz-box-shadow:0 1px 0 #2e892e;box-shadow:0 1px 0 #2e892e;color:#fff;text-shadow:0 -1px 1px #2e892e,1px 0 1px #2e892e,0 1px 1px #2e892e,-1px 0 1px #2e892e}#loco-admin.wrap .button-success:hover{background:#3db63d}#loco-admin.wrap .button-danger[disabled],#loco-admin.wrap .button-success[disabled]{text-shadow:none !important}#loco-admin.wrap form button.loco-loading.button-large{padding-left:0}#loco-admin.wrap form button.loco-loading.button-large:before{width:16px;height:16px;margin:0 4px;content:" ";font-size:16px;line-height:1;display:inline-block;vertical-align:sub}#loco-admin.wrap ::placeholder{color:#ccc}#loco-admin.wrap ::-webkit-input-placeholder{color:#ccc}#loco-admin.wrap :-moz-placeholder{color:#ccc;opacity:1}#loco-admin.wrap ::-moz-placeholder{color:#ccc;opacity:1}#loco-admin.wrap :-ms-input-placeholder{color:#ccc}#loco-admin.wrap .ielt10 .placeheld{color:#ccc}#loco-admin.wrap a.has-raquo:after{content:" »"}#loco-admin.wrap a.has-laquo:before{content:"« "}#loco-admin.wrap span.inline-spinner{display:inline-block;min-width:16px;min-height:16px;background:transparent url(../img/spin-modal.gif?v=2.5.3) 0 0 no-repeat}.js #wpbody-content>.notice{display:none}.js #wpbody-content>.notice.inline{display:block}.js #loco-admin.wrap .jshide,.no-js #loco-admin.wrap .jsonly{display:none !important}#loco-admin.wrap .invis{visibility:hidden}.form-table tr td{vertical-align:top}.form-table tr.compact td{padding-top:0}.form-table tr th a.icon-help{display:none}.loco-modal{min-width:50%;min-height:100px}.loco-modal-wide{min-width:90% !important}.loco-modal-no-close .ui-dialog-titlebar-close{display:none}.loco-modal .ui-dialog-titlebar-close{overflow:hidden}.loco-modal.request-filesystem-credentials-dialog{top:15% !important;max-height:85% !important}.loco-modal.request-filesystem-credentials-dialog>.ui-dialog-content{background:inherit}.loco-modal.request-filesystem-credentials-dialog .ftp-password>label>em:last-child{display:none}.ui-dialog-content>div.loco-loading{height:100%;background:transparent url(../img/spin-modal.gif?v=2.5.3) center 20px no-repeat}#loco-po-ref ol li{color:#aaa;margin:0;white-space:pre;padding:0 0 0 1em;font:normal 12px/17px Consolas,Monaco,monospace;background:transparent;border-left:1px solid #eee}#loco-po-ref ol li code{margin:0;padding:0;display:inline;background:inherit}#loco-po-ref ol li.highlighted{color:#666;background-color:#f8eec7}#loco-po-ref ol li.highlighted code.T_CONSTANT_ENCAPSED_STRING{color:#c931c7}#loco-credit>*{vertical-align:middle}#loco-credit>a{display:inline-block;position:relative;overflow:hidden;background:transparent url(../img/logo-foot.gif?v=2.5.3) 0 0 no-repeat;height:30px;width:100px;text-indent:200px;-webkit-transition-duration:0s;transition-duration:0s}#loco-credit>a:hover{background-position:0 -35px}#loco-content{position:relative}#footer-upgrade span:before{color:#ccc;content:" | ";display:inline;padding-left:.5em;padding-right:.5em}#footer-upgrade span:first-child:before{content:"";display:none}.loco-clearfix:after{content:".";display:block;clear:both;visibility:hidden;line-height:0;height:0}dl.debug dt{font-weight:bold}dl.debug dt,dl.debug dd{white-space:pre}.wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(0,115,170,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#0073aa;foo:#0073aa}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#66c6e4 !important;background:#008ec2 !important;border-color:#008ec2 !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../img/skins/fresh/spin-primary-button.gif?v=2.5.3) 0 0 no-repeat !important}
pub/css/editor.css CHANGED
@@ -1 +1 @@
1
- #loco-editor{border:solid 1px #ccc}#loco-editor ._ajax_loader_f2{background-image:url(../img/ajax-loader-f2.gif?v=2.5.2);background-repeat:no-repeat;min-height:16px}#loco-editor ._ajax_loader_f2x4{background:transparent url(../img/ajax-loader-f2-x4.gif?v=2.5.2) 0 0 no-repeat;min-height:75px}#loco-editor ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc.gif?v=2.5.2);background-repeat:no-repeat;min-height:16px}@media only screen and (-webkit-min-device-pixel-ratio: 2),only screen and (min--moz-device-pixel-ratio: 2),only screen and (-o-min-device-pixel-ratio: 2/1),only screen and (min-device-pixel-ratio: 2),only screen and (min-resolution: 192dpi),only screen and (min-resolution: 2dppx){#loco-editor ._ajax_loader_f2{background-image:url(../img/ajax-loader-f2-x2.gif?v=2.5.2);background-size:16px}#loco-editor ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc-x2.gif?v=2.5.2);background-size:16px}}#loco-editor ._green_glow_inner,#loco-editor .is-editable>.wg-content>textarea:focus,#loco-editor .is-editable>.wg-content.has-focus .ace_scroller,#loco-editor .is-editable>.wg-content.has-focus .wysihtml-editor,#loco-editor .is-editable>.wg-content.has-focus .mce-content-body{-webkit-box-shadow:inset 0 0 10px 0 #3db63d;-moz-box-shadow:inset 0 0 10px 0 #3db63d;box-shadow:inset 0 0 10px 0 #3db63d}#loco-editor ._green_glow_outer{-webkit-box-shadow:0 0 .5em 0 #3db63d;-moz-box-shadow:0 0 .5em 0 #3db63d;box-shadow:0 0 .5em 0 #3db63d}#loco-editor .loco-font,#loco-editor .is-table .wg-thead .wg-sortable>header:after{font-family:"loco";speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#loco-editor div.ta-mirror{position:absolute;top:0;border:solid 1px transparent;color:transparent;padding:.4em .6em;pointer-events:none}#loco-editor div.ta-mirror span{position:relative}#loco-editor div.ta-mirror span:after{color:#ccc;white-space:pre;display:inline-block;position:absolute;top:0;line-height:normal}#loco-editor div.ta-mirror .crlf:after{content:"¬"}#loco-editor div.ta-mirror .eof:after{content:"¶"}#loco-editor div.ta-mirror .x20:after{content:"·";color:#aaa}#loco-editor div.ta-mirror .x9:after{content:"⟶"}#loco-editor div.ta-mirror,#loco-editor .has-mirror textarea{white-space:pre-wrap;word-wrap:break-word;word-spacing:0px}#loco-editor .has-mirror ::placeholder{color:transparent}#loco-editor .has-mirror ::-webkit-input-placeholder{color:transparent}#loco-editor .has-mirror :-moz-placeholder{color:transparent;opacity:1}#loco-editor .has-mirror ::-moz-placeholder{color:transparent;opacity:1}#loco-editor .has-mirror :-ms-input-placeholder{color:transparent}#loco-editor .has-mirror .ielt10 .placeheld{color:transparent}#loco-editor div.ta-mirror{left:0;text-align:left}#loco-editor div.ta-mirror span:after{left:0}#loco-editor div.ta-mirror .eol:after{padding-left:.2em}#loco-editor [dir=RTL] div.ta-mirror{left:auto;right:0;text-align:right}#loco-editor [dir=RTL] div.ta-mirror span:after{right:0}#loco-editor [dir=RTL] div.ta-mirror .eol:after{padding-left:0;padding-right:.2em}#loco-editor .has-proxy>textarea{display:none !important}#loco-editor .has-proxy .ace_editor{height:100%;font-size:13px !important;line-height:1.4 !important}#loco-editor .has-proxy .ace_editor .ace_marker-layer .ace_bracket{display:none}#loco-editor .has-proxy .ace_print-margin{display:none}#loco-editor .ace_printf{color:#b90690;background-color:#edf1be}#loco-editor .ace_locked{color:gray}#loco-editor .ace_icu-quoted{color:gray}#loco-editor .ace_icu{color:#697eb9}#loco-editor .ace_icu.ace_name{color:#b90600}#loco-editor .resizer{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0 0 6px 0;background:#f0f0f0 url(../img/wg/splity.png?v=2.5.2) center bottom no-repeat;border:1px solid #ddd;overflow:hidden;cursor:move;cursor:row-resize;cursor:s-resize}#loco-editor .resizer>*{height:100%;border:none}#loco-editor ._ajax_loader_f2{background-image:url(../img/ajax-loader-f2.gif?v=2.5.2);background-repeat:no-repeat;min-height:16px}#loco-editor ._ajax_loader_f2x4{background:transparent url(../img/ajax-loader-f2-x4.gif?v=2.5.2) 0 0 no-repeat;min-height:75px}#loco-editor ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc.gif?v=2.5.2);background-repeat:no-repeat;min-height:16px}@media only screen and (-webkit-min-device-pixel-ratio: 2),only screen and (min--moz-device-pixel-ratio: 2),only screen and (-o-min-device-pixel-ratio: 2/1),only screen and (min-device-pixel-ratio: 2),only screen and (min-resolution: 192dpi),only screen and (min-resolution: 2dppx){#loco-editor ._ajax_loader_f2{background-image:url(../img/ajax-loader-f2-x2.gif?v=2.5.2);background-size:16px}#loco-editor ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc-x2.gif?v=2.5.2);background-size:16px}}#loco-editor ._green_glow_inner,#loco-editor .is-editable>.wg-content>textarea:focus,#loco-editor .is-editable>.wg-content.has-focus .ace_scroller,#loco-editor .is-editable>.wg-content.has-focus .wysihtml-editor,#loco-editor .is-editable>.wg-content.has-focus .mce-content-body{-webkit-box-shadow:inset 0 0 10px 0 #3db63d;-moz-box-shadow:inset 0 0 10px 0 #3db63d;box-shadow:inset 0 0 10px 0 #3db63d}#loco-editor ._green_glow_outer{-webkit-box-shadow:0 0 .5em 0 #3db63d;-moz-box-shadow:0 0 .5em 0 #3db63d;box-shadow:0 0 .5em 0 #3db63d}#loco-editor .loco-font,#loco-editor .is-table .wg-thead .wg-sortable>header:after{font-family:"loco";speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#loco-editor .wg-cell,#loco-editor .wg-cell>div{clear:both;position:relative;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;outline:none}#loco-editor .wg-cell{left:0;top:0;padding:0;margin:0;overflow:hidden}#loco-editor .wg-split{background:#eee}#loco-editor .wg-body:after{content:".";display:block;clear:both;visibility:hidden;line-height:0;height:0}#loco-editor .wg-split-x>div>.not-first>*{margin-left:6px}#loco-editor .wg-split-y>div>.not-first>*{margin-top:6px}#loco-editor .wg-split>div>.has-title .wg-content{margin-top:0}#loco-editor .wg-split-x>div>.wg-cell{float:left;clear:none;height:100%}#loco-editor .wg-split-x>div{cursor:move;cursor:ew-resize;cursor:col-resize}#loco-editor .wg-split>div>.not-first:before{display:block;position:absolute;overflow:hidden;content:" "}#loco-editor .wg-split-x>div>.not-first:before{width:6px;height:100%;background:transparent url(../img/wg/splitx.png?v=2.5.2) center center no-repeat}#loco-editor .wg-split-y>div{cursor:move;cursor:ns-resize;cursor:row-resize}#loco-editor .wg-split-y>div>.not-first:before{height:6px;width:100%;background:transparent url(../img/wg/splity.png?v=2.5.2) center center no-repeat}#loco-editor .wg-split>div.locked{cursor:default}#loco-editor .wg-split-x>div.locked>.not-first>*{margin-left:0px}#loco-editor .wg-split-y>div.locked>.not-first>*{margin-top:0px}#loco-editor .wg-split>div.locked>.not-first:before{display:none}#loco-editor .has-title>header{background:#e2e2e2;cursor:default !important;margin:0;white-space:nowrap}#loco-editor .wg-content{background:#fff;cursor:default;padding:4px 6px;overflow:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#loco-editor .wg-toolbar{top:0;right:0;margin-top:6px;position:absolute}#loco-editor .wg-toolbar>span{color:#fff;background:#000;display:block;padding:0 6px;cursor:default !important}#loco-editor .wg-toolbar>span:active{color:#000;background-color:#fff}#loco-editor .wg-content,#loco-editor .wg-tbody>div{overflow:scroll;overflow-x:hidden;overflow-y:auto}#loco-editor .is-table{background-color:#fff}#loco-editor .is-table .wg-thead .has-title>header{font-weight:normal;background:transparent;padding:4px 0;margin:0 0 0 10px}#loco-editor .is-table .wg-thead>div>.not-first:before{background-position:center center}#loco-editor .is-table .wg-thead{background:#e2e2e2;border-bottom:solid 1px #ccc}#loco-editor .is-table .wg-tbody{background-image:url(data:image/gif;base64,R0lGODlhAQAsAIABAPz8/P///yH5BAEAAAEALAAAAAABACwAAAIIjI+pAe0PIygAOw==);position:relative}#loco-editor .is-table .wg-cols>div{float:left;clear:none}#loco-editor .is-table .wg-cols>div>div{white-space:nowrap;line-height:1.7em;padding-left:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;-o-text-overflow:ellipsis;-ms-text-overflow:ellipsis;background-color:#fff}#loco-editor .is-table .wg-cols>div>div:nth-child(even){background-color:#f7f7f7}#loco-editor .is-table .wg-cols>div>div.selected{background-color:#3db63d;color:#fff}#loco-editor .is-table .wg-cols>div>div.selected::selection{background-color:#fff;color:#000}#loco-editor .is-table .wg-cols>div:first-child>div{padding-left:4px}#loco-editor .is-table .wg-dead{clear:both}#loco-editor .is-table .wg-thead .wg-sortable>header{cursor:pointer !important}#loco-editor .is-table .wg-thead .wg-sortable>header:after{padding:0 0 0 5px;color:#999}#loco-editor .is-table .wg-thead .wg-sortable.wg-asc>header:after{content:"▲"}#loco-editor .is-table .wg-thead .wg-sortable.wg-desc>header:after{content:"▼"}#loco-editor .is-table .wg-thead .wg-sortable:hover>header:after{color:#000}#loco-editor .is-field>.wg-content{cursor:text;padding:0;line-height:normal;overflow:hidden;overflow-y:hidden}#loco-editor .is-field>.wg-content>div,#loco-editor .is-field>.wg-content>textarea{font-size:14px;line-height:1.4;border:1px solid #ddd;width:100%;height:100%;padding:8px 10px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0}#loco-editor .is-field>.wg-content textarea{resize:none;overflow:auto;display:block}#loco-editor .is-field>.wg-content>.ace_editor{padding:0;border-width:0}#loco-editor .is-field>.wg-content>div[contenteditable]{overflow:scroll;overflow-x:hidden;overflow-y:auto}#loco-editor .is-readonly>.wg-content{cursor:default}#loco-editor .is-readonly>.wg-content>div,#loco-editor .is-readonly>.wg-content>textarea,#loco-editor .is-readonly>.wg-content>textarea[readonly]{background:#f8f8f8;text-shadow:0 1px #fff;color:inherit}#loco-editor .is-readonly>.wg-content .ace_scroller{cursor:default;background:#f8f8f8}#loco-editor .is-readonly>.wg-content .ace_cursor-layer{display:none}#loco-editor .is-readonly>.wg-content>textarea[readonly]{cursor:default}#loco-editor .is-editable>.wg-content[dir=RTL] .ace_editor .ace_line{direction:ltr;unicode-bidi:bidi-override}#loco-editor .wg-split-x>nav.wg-tabs{white-space:nowrap;text-align:center;cursor:default}#loco-editor .wg-split-x>nav.wg-tabs>a{display:inline-block;padding:.5em 1em;margin-top:.2em;color:#000;text-decoration:none;-webkit-border-radius:.2em .2em 0 0;-moz-border-radius:.2em .2em 0 0;-ms-border-radius:.2em .2em 0 0;-o-border-radius:.2em .2em 0 0;border-radius:.2em .2em 0 0;background-color:#f3f7fd}#loco-editor .wg-split-x>nav.wg-tabs>a:hover{background-color:#fff}#loco-editor .wg-split-x>nav.wg-tabs>a.active{background-color:#3db63d;color:#fff}#loco-editor .wg-split>div>.has-nav>.wg-body{margin-top:0px}#loco-editor .wg-dead{visibility:hidden}@media all and (max-width: 768px){#loco-editor .wg-split-x>div>.not-first>*{margin-left:20px}#loco-editor .wg-split-y>div>.not-first>*{margin-top:20px}#loco-editor .wg-split-x>div>.not-first:before{width:20px}#loco-editor .wg-split-y>div>.not-first:before{height:20px}#loco-editor .is-table .wg-thead header{padding-left:20px}}#loco-editor .is-table .po-fuzzy{color:#b59829;font-weight:bold}#loco-editor .is-table .po-empty{color:#1f507a;font-weight:bold}#loco-editor .is-table .po-flagged{color:#bd2c00}#loco-editor .is-table .wg-cols>div:first-child>div:before{font-family:loco;vertical-align:inherit;display:inline-block;content:" ";width:1.3em;line-height:1}#loco-editor .is-table .wg-cols>div:first-child>div.po-fuzzy:before{content:""}#loco-editor .is-table .wg-cols>div:first-child>div.po-flagged:before{content:""}#loco-editor .is-table .wg-cols>div:first-child>div.po-comment:before{content:"";color:#999}#loco-editor .is-table .wg-cols>div:first-child>div.po-unsaved:before{content:"";color:#f1d040}#loco-editor .is-table .wg-cols>div:first-child>div.selected:before{color:#fff !important}#loco-editor .wg-cell>.meta{color:#333;margin:0 !important;padding:6px 10px;font-weight:normal;font-size:13px;line-height:1.4em;cursor:default !important}#loco-editor .wg-cell>.meta>*{display:inline-block;margin-top:3px;margin-bottom:3px}#loco-editor .wg-cell>.meta>span{border:1px solid transparent;border-left:none}#loco-editor .wg-cell>.meta>mark{color:#fff;border-radius:2px;background-color:silver;border:1px solid silver;padding:0 .3em}#loco-editor .wg-cell>.meta>mark.tag{color:#999;background-color:#eee}#loco-editor .wg-cell>.meta>p{display:block;white-space:pre-line}#loco-editor .wg-cell>.meta .icon-warn{color:#c00}#loco-editor .wg-cell>.meta .has-icon:before{padding-right:0;width:17px}#loco-editor .wg-cell>.meta code{font-size:12px}#loco-editor .is-table .wg-cols>div>div>mark{display:inline-block;vertical-align:text-bottom;font:inherit;font-weight:normal;color:#fff;border-radius:2px;font-size:90%;line-height:1;padding:.2em .3em;background-color:rgba(0,0,0,.25)}#loco-editor .is-table .wg-cols>div>div.selected.po-flagged{background-color:#bd2c00}#loco-editor .is-table .wg-cols>div>div.selected.po-fuzzy{background-color:#b59829}#loco-editor .is-table .wg-cols>div>div.selected.po-empty{background-color:#999}#loco-editor #po-target header nav{display:block;position:absolute;right:0px;top:0px;padding:2px}#loco-editor #po-target header nav button{margin-left:5px}#loco-editor #po-target header nav.po-empty .icon-cloud{display:none !important}#loco-editor #po-list .wg-content{padding:0}#loco-editor #po-source>.wg-body>.has-title>header{background:transparent;font-weight:normal;float:left;clear:none;min-width:3.4em}#loco-editor #po-source>.wg-body>.has-title>.wg-content{clear:none}#loco-editor .has-title>header{line-height:normal;padding:6px}#loco-editor .has-title>header .lang{margin-right:6px;margin-bottom:1px}#loco-editor .trg-rtl #po-list-tbody .wg-cols>div[for=po-list-col-target]>div,#loco-editor .src-rtl #po-list-tbody .wg-cols>div[for=po-list-col-source]>div{direction:rtl;padding-left:0;padding-right:10px;text-align:right}#loco-editor #po-source>.wg-body>.has-title>h2{min-width:4.5em}#loco-editor .is-table .wg-td{font-size:13px}#loco-editor header,#loco-editor nav{display:block;position:relative}#loco-editor-inner{min-height:600px;font-size:14px;clear:both}#loco-editor-inner>div.loco-loading{height:100px;background:transparent url(../img/spin-editor-button.gif?v=2.5.2) center 20px no-repeat}#loco-editor-inner h2{color:#000;line-height:1}#loco-editor-inner .wg-cell>.meta code{padding:0;color:#0073aa;background:inherit;cursor:pointer}#loco-editor-inner .wg-cell>.meta code:hover{text-decoration:underline}#loco-admin.wrap #loco-editor>nav{font-size:14px;height:50px}#loco-admin.wrap #loco-editor>nav form{display:block;float:left;clear:none;padding:0;margin:0}#loco-admin.wrap #loco-editor>nav form.aux{float:right;margin-right:5px}#loco-admin.wrap #loco-editor>nav fieldset{display:block;position:relative;float:left;clear:none}#loco-admin.wrap #loco-editor>nav button,#loco-admin.wrap #loco-editor>nav input[type=text]{display:block;position:relative;float:left;clear:none;margin:5px 0 0 5px;height:36px;text-align:left;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#loco-admin.wrap #loco-editor>nav input[type=text]{padding:0 10px;font-size:14px;line-height:normal}#loco-admin.wrap #loco-editor>nav .invalid input[type=text]:focus{border-color:#c00;-webkit-box-shadow:0 0 2px rgba(153,0,0,.5);-moz-box-shadow:0 0 2px rgba(153,0,0,.5);box-shadow:0 0 2px rgba(153,0,0,.5)}#loco-admin.wrap #loco-editor>nav .loco-clearable{padding:0 20px}#loco-admin.wrap #loco-editor>nav .loco-clearable.invalid a.clear:before{color:#c00}#loco-admin.wrap #loco-editor>nav .loco-clearable a.clear{right:25px;line-height:2}#loco-admin.wrap #loco-editor>nav .loco-clearable a.clear:focus{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}#loco-admin.wrap #loco-editor>nav .loco-clearable a.clear:hover:before{color:#c00}#loco-admin.wrap #loco-editor>nav .loco-clearable a.clear:active:before{color:#000}#loco-admin.wrap #loco-editor>nav button.only-icon{width:40px}#loco-admin.wrap button.has-icon:before{width:16px;padding:0}#loco-admin.wrap button.has-icon.loco-loading:before{content:" ";height:16px;background:transparent url(../img/spin-editor-button.gif?v=2.5.2) 0 0 no-repeat}#loco-admin.wrap .button,#loco-admin.wrap .button-link,#loco-admin.wrap input[type=text]{border-color:#aaa;color:#444}#loco-admin.wrap .button:hover,#loco-admin.wrap .button-link:hover{color:#000}#loco-admin.wrap .button-primary,#loco-admin.wrap .button-primary:hover{color:#fff}#loco-admin.wrap button.icon-translate:before{font-size:16px}.loco-modal .loco-api{position:relative;padding:10px;background:#f7f7f7;border:solid 1px #eee;font-size:14px;margin-bottom:16px}.loco-modal .loco-api p{padding:0;margin:0;font-size:inherit}.loco-modal .loco-api blockquote{font-weight:bold;margin:0;padding:10px 0}.loco-modal .loco-api a.loco-api-credit{padding:0;display:block;position:absolute;right:10px;bottom:10px;text-decoration:none;white-space:nowrap;overflow:hidden;font-size:12px}.loco-modal .loco-api a.loco-api-credit:hover{text-decoration:underline}.loco-modal .loco-api-loading{text-indent:20px;background:transparent url(../img/spin-modal.gif?v=2.5.2) 10px center no-repeat}.loco-modal .loco-alert p{margin-bottom:2em;font-size:14px}.loco-modal .loco-alert nav{display:block;position:relative;margin:1em 0}.loco-modal .loco-alert nav a{display:inline-block;margin-right:1em;padding:10px}#loco-auto{display:none;min-width:50%;min-height:300px;position:relative}#loco-auto form blockquote{margin:0;padding:1em 0;font-size:14px}.loco-api a.loco-api-credit{color:inherit}.loco-api-yandex a.loco-api-credit:before{content:"Powered by "}.loco-api-google a.loco-api-credit{text-indent:200px;width:122px;height:16px;background:transparent url(../img/api/google.png?v=2.5.2) 0 0 no-repeat}.loco-api-microsoft a.loco-api-credit{text-indent:200px;width:152px;height:16px;background:transparent url(../img/api/microsoft.png?v=2.5.2) 0 0 no-repeat}.loco-api-deepl a.loco-api-credit{text-indent:200px;width:122px;height:16px;background:transparent url(../img/api/deepl.png?v=2.5.2) 0 0 no-repeat}
1
+ #loco-editor{border:solid 1px #ccc}#loco-editor ._ajax_loader_f2{background-image:url(../img/ajax-loader-f2.gif?v=2.5.3);background-repeat:no-repeat;min-height:16px}#loco-editor ._ajax_loader_f2x4{background:transparent url(../img/ajax-loader-f2-x4.gif?v=2.5.3) 0 0 no-repeat;min-height:75px}#loco-editor ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc.gif?v=2.5.3);background-repeat:no-repeat;min-height:16px}@media only screen and (-webkit-min-device-pixel-ratio: 2),only screen and (min--moz-device-pixel-ratio: 2),only screen and (-o-min-device-pixel-ratio: 2/1),only screen and (min-device-pixel-ratio: 2),only screen and (min-resolution: 192dpi),only screen and (min-resolution: 2dppx){#loco-editor ._ajax_loader_f2{background-image:url(../img/ajax-loader-f2-x2.gif?v=2.5.3);background-size:16px}#loco-editor ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc-x2.gif?v=2.5.3);background-size:16px}}#loco-editor ._green_glow_inner,#loco-editor .is-editable>.wg-content>textarea:focus,#loco-editor .is-editable>.wg-content.has-focus .ace_scroller,#loco-editor .is-editable>.wg-content.has-focus .wysihtml-editor,#loco-editor .is-editable>.wg-content.has-focus .mce-content-body{-webkit-box-shadow:inset 0 0 10px 0 #3db63d;-moz-box-shadow:inset 0 0 10px 0 #3db63d;box-shadow:inset 0 0 10px 0 #3db63d}#loco-editor ._green_glow_outer{-webkit-box-shadow:0 0 .5em 0 #3db63d;-moz-box-shadow:0 0 .5em 0 #3db63d;box-shadow:0 0 .5em 0 #3db63d}#loco-editor .loco-font,#loco-editor .is-table .wg-thead .wg-sortable>header:after{font-family:"loco";speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#loco-editor div.ta-mirror{position:absolute;top:0;border:solid 1px transparent;color:transparent;padding:.4em .6em;pointer-events:none}#loco-editor div.ta-mirror span{position:relative}#loco-editor div.ta-mirror span:after{color:#ccc;white-space:pre;display:inline-block;position:absolute;top:0;line-height:normal}#loco-editor div.ta-mirror .crlf:after{content:"¬"}#loco-editor div.ta-mirror .eof:after{content:"¶"}#loco-editor div.ta-mirror .x20:after{content:"·";color:#aaa}#loco-editor div.ta-mirror .x9:after{content:"⟶"}#loco-editor div.ta-mirror,#loco-editor .has-mirror textarea{white-space:pre-wrap;word-wrap:break-word;word-spacing:0px}#loco-editor .has-mirror ::placeholder{color:transparent}#loco-editor .has-mirror ::-webkit-input-placeholder{color:transparent}#loco-editor .has-mirror :-moz-placeholder{color:transparent;opacity:1}#loco-editor .has-mirror ::-moz-placeholder{color:transparent;opacity:1}#loco-editor .has-mirror :-ms-input-placeholder{color:transparent}#loco-editor .has-mirror .ielt10 .placeheld{color:transparent}#loco-editor div.ta-mirror{left:0;text-align:left}#loco-editor div.ta-mirror span:after{left:0}#loco-editor div.ta-mirror .eol:after{padding-left:.2em}#loco-editor [dir=RTL] div.ta-mirror{left:auto;right:0;text-align:right}#loco-editor [dir=RTL] div.ta-mirror span:after{right:0}#loco-editor [dir=RTL] div.ta-mirror .eol:after{padding-left:0;padding-right:.2em}#loco-editor .has-proxy>textarea{display:none !important}#loco-editor .has-proxy .ace_editor{height:100%;font-size:13px !important;line-height:1.4 !important}#loco-editor .has-proxy .ace_editor .ace_marker-layer .ace_bracket{display:none}#loco-editor .has-proxy .ace_print-margin{display:none}#loco-editor .ace_printf{color:#b90690;background-color:#edf1be}#loco-editor .ace_locked{color:gray}#loco-editor .ace_icu-quoted{color:gray}#loco-editor .ace_icu{color:#697eb9}#loco-editor .ace_icu.ace_name{color:#b90600}#loco-editor .resizer{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0 0 6px 0;background:#f0f0f0 url(../img/wg/splity.png?v=2.5.3) center bottom no-repeat;border:1px solid #ddd;overflow:hidden;cursor:move;cursor:row-resize;cursor:s-resize}#loco-editor .resizer>*{height:100%;border:none}#loco-editor ._ajax_loader_f2{background-image:url(../img/ajax-loader-f2.gif?v=2.5.3);background-repeat:no-repeat;min-height:16px}#loco-editor ._ajax_loader_f2x4{background:transparent url(../img/ajax-loader-f2-x4.gif?v=2.5.3) 0 0 no-repeat;min-height:75px}#loco-editor ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc.gif?v=2.5.3);background-repeat:no-repeat;min-height:16px}@media only screen and (-webkit-min-device-pixel-ratio: 2),only screen and (min--moz-device-pixel-ratio: 2),only screen and (-o-min-device-pixel-ratio: 2/1),only screen and (min-device-pixel-ratio: 2),only screen and (min-resolution: 192dpi),only screen and (min-resolution: 2dppx){#loco-editor ._ajax_loader_f2{background-image:url(../img/ajax-loader-f2-x2.gif?v=2.5.3);background-size:16px}#loco-editor ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc-x2.gif?v=2.5.3);background-size:16px}}#loco-editor ._green_glow_inner,#loco-editor .is-editable>.wg-content>textarea:focus,#loco-editor .is-editable>.wg-content.has-focus .ace_scroller,#loco-editor .is-editable>.wg-content.has-focus .wysihtml-editor,#loco-editor .is-editable>.wg-content.has-focus .mce-content-body{-webkit-box-shadow:inset 0 0 10px 0 #3db63d;-moz-box-shadow:inset 0 0 10px 0 #3db63d;box-shadow:inset 0 0 10px 0 #3db63d}#loco-editor ._green_glow_outer{-webkit-box-shadow:0 0 .5em 0 #3db63d;-moz-box-shadow:0 0 .5em 0 #3db63d;box-shadow:0 0 .5em 0 #3db63d}#loco-editor .loco-font,#loco-editor .is-table .wg-thead .wg-sortable>header:after{font-family:"loco";speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#loco-editor .wg-cell,#loco-editor .wg-cell>div{clear:both;position:relative;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;outline:none}#loco-editor .wg-cell{left:0;top:0;padding:0;margin:0;overflow:hidden}#loco-editor .wg-split{background:#eee}#loco-editor .wg-body:after{content:".";display:block;clear:both;visibility:hidden;line-height:0;height:0}#loco-editor .wg-split-x>div>.not-first>*{margin-left:6px}#loco-editor .wg-split-y>div>.not-first>*{margin-top:6px}#loco-editor .wg-split>div>.has-title .wg-content{margin-top:0}#loco-editor .wg-split-x>div>.wg-cell{float:left;clear:none;height:100%}#loco-editor .wg-split-x>div{cursor:move;cursor:ew-resize;cursor:col-resize}#loco-editor .wg-split>div>.not-first:before{display:block;position:absolute;overflow:hidden;content:" "}#loco-editor .wg-split-x>div>.not-first:before{width:6px;height:100%;background:transparent url(../img/wg/splitx.png?v=2.5.3) center center no-repeat}#loco-editor .wg-split-y>div{cursor:move;cursor:ns-resize;cursor:row-resize}#loco-editor .wg-split-y>div>.not-first:before{height:6px;width:100%;background:transparent url(../img/wg/splity.png?v=2.5.3) center center no-repeat}#loco-editor .wg-split>div.locked{cursor:default}#loco-editor .wg-split-x>div.locked>.not-first>*{margin-left:0px}#loco-editor .wg-split-y>div.locked>.not-first>*{margin-top:0px}#loco-editor .wg-split>div.locked>.not-first:before{display:none}#loco-editor .has-title>header{background:#e2e2e2;cursor:default !important;margin:0;white-space:nowrap}#loco-editor .wg-content{background:#fff;cursor:default;padding:4px 6px;overflow:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#loco-editor .wg-toolbar{top:0;right:0;margin-top:6px;position:absolute}#loco-editor .wg-toolbar>span{color:#fff;background:#000;display:block;padding:0 6px;cursor:default !important}#loco-editor .wg-toolbar>span:active{color:#000;background-color:#fff}#loco-editor .wg-content,#loco-editor .wg-tbody>div{overflow:scroll;overflow-x:hidden;overflow-y:auto}#loco-editor .is-table{background-color:#fff}#loco-editor .is-table .wg-thead .has-title>header{font-weight:normal;background:transparent;padding:4px 0;margin:0 0 0 10px}#loco-editor .is-table .wg-thead>div>.not-first:before{background-position:center center}#loco-editor .is-table .wg-thead{background:#e2e2e2;border-bottom:solid 1px #ccc}#loco-editor .is-table .wg-tbody{background-image:url(data:image/gif;base64,R0lGODlhAQAsAIABAPz8/P///yH5BAEAAAEALAAAAAABACwAAAIIjI+pAe0PIygAOw==);position:relative}#loco-editor .is-table .wg-cols>div{float:left;clear:none}#loco-editor .is-table .wg-cols>div>div{white-space:nowrap;line-height:1.7em;padding-left:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;-o-text-overflow:ellipsis;-ms-text-overflow:ellipsis;background-color:#fff}#loco-editor .is-table .wg-cols>div>div:nth-child(even){background-color:#f7f7f7}#loco-editor .is-table .wg-cols>div>div.selected{background-color:#3db63d;color:#fff}#loco-editor .is-table .wg-cols>div>div.selected::selection{background-color:#fff;color:#000}#loco-editor .is-table .wg-cols>div:first-child>div{padding-left:4px}#loco-editor .is-table .wg-dead{clear:both}#loco-editor .is-table .wg-thead .wg-sortable>header{cursor:pointer !important}#loco-editor .is-table .wg-thead .wg-sortable>header:after{padding:0 0 0 5px;color:#999}#loco-editor .is-table .wg-thead .wg-sortable.wg-asc>header:after{content:"▲"}#loco-editor .is-table .wg-thead .wg-sortable.wg-desc>header:after{content:"▼"}#loco-editor .is-table .wg-thead .wg-sortable:hover>header:after{color:#000}#loco-editor .is-field>.wg-content{cursor:text;padding:0;line-height:normal;overflow:hidden;overflow-y:hidden}#loco-editor .is-field>.wg-content>div,#loco-editor .is-field>.wg-content>textarea{font-size:14px;line-height:1.4;border:1px solid #ddd;width:100%;height:100%;padding:8px 10px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0}#loco-editor .is-field>.wg-content textarea{resize:none;overflow:auto;display:block}#loco-editor .is-field>.wg-content>.ace_editor{padding:0;border-width:0}#loco-editor .is-field>.wg-content>div[contenteditable]{overflow:scroll;overflow-x:hidden;overflow-y:auto}#loco-editor .is-readonly>.wg-content{cursor:default}#loco-editor .is-readonly>.wg-content>div,#loco-editor .is-readonly>.wg-content>textarea,#loco-editor .is-readonly>.wg-content>textarea[readonly]{background:#f8f8f8;text-shadow:0 1px #fff;color:inherit}#loco-editor .is-readonly>.wg-content .ace_scroller{cursor:default;background:#f8f8f8}#loco-editor .is-readonly>.wg-content .ace_cursor-layer{display:none}#loco-editor .is-readonly>.wg-content>textarea[readonly]{cursor:default}#loco-editor .is-editable>.wg-content[dir=RTL] .ace_editor .ace_line{direction:ltr;unicode-bidi:bidi-override}#loco-editor .wg-split-x>nav.wg-tabs{white-space:nowrap;text-align:center;cursor:default}#loco-editor .wg-split-x>nav.wg-tabs>a{display:inline-block;padding:.5em 1em;margin-top:.2em;color:#000;text-decoration:none;-webkit-border-radius:.2em .2em 0 0;-moz-border-radius:.2em .2em 0 0;-ms-border-radius:.2em .2em 0 0;-o-border-radius:.2em .2em 0 0;border-radius:.2em .2em 0 0;background-color:#f3f7fd}#loco-editor .wg-split-x>nav.wg-tabs>a:hover{background-color:#fff}#loco-editor .wg-split-x>nav.wg-tabs>a.active{background-color:#3db63d;color:#fff}#loco-editor .wg-split>div>.has-nav>.wg-body{margin-top:0px}#loco-editor .wg-dead{visibility:hidden}@media all and (max-width: 768px){#loco-editor .wg-split-x>div>.not-first>*{margin-left:20px}#loco-editor .wg-split-y>div>.not-first>*{margin-top:20px}#loco-editor .wg-split-x>div>.not-first:before{width:20px}#loco-editor .wg-split-y>div>.not-first:before{height:20px}#loco-editor .is-table .wg-thead header{padding-left:20px}}#loco-editor .is-table .po-fuzzy{color:#b59829;font-weight:bold}#loco-editor .is-table .po-empty{color:#1f507a;font-weight:bold}#loco-editor .is-table .po-flagged{color:#bd2c00}#loco-editor .is-table .wg-cols>div:first-child>div:before{font-family:loco;vertical-align:inherit;display:inline-block;content:" ";width:1.3em;line-height:1}#loco-editor .is-table .wg-cols>div:first-child>div.po-fuzzy:before{content:""}#loco-editor .is-table .wg-cols>div:first-child>div.po-flagged:before{content:""}#loco-editor .is-table .wg-cols>div:first-child>div.po-comment:before{content:"";color:#999}#loco-editor .is-table .wg-cols>div:first-child>div.po-unsaved:before{content:"";color:#f1d040}#loco-editor .is-table .wg-cols>div:first-child>div.selected:before{color:#fff !important}#loco-editor .wg-cell>.meta{color:#333;margin:0 !important;padding:6px 10px;font-weight:normal;font-size:13px;line-height:1.4em;cursor:default !important}#loco-editor .wg-cell>.meta>*{display:inline-block;margin-top:3px;margin-bottom:3px}#loco-editor .wg-cell>.meta>span{border:1px solid transparent;border-left:none}#loco-editor .wg-cell>.meta>mark{color:#fff;border-radius:2px;background-color:silver;border:1px solid silver;padding:0 .3em}#loco-editor .wg-cell>.meta>mark.tag{color:#999;background-color:#eee}#loco-editor .wg-cell>.meta>p{display:block;white-space:pre-line}#loco-editor .wg-cell>.meta .icon-warn{color:#c00}#loco-editor .wg-cell>.meta .has-icon:before{padding-right:0;width:17px}#loco-editor .wg-cell>.meta code{font-size:12px}#loco-editor .is-table .wg-cols>div>div>mark{display:inline-block;vertical-align:text-bottom;font:inherit;font-weight:normal;color:#fff;border-radius:2px;font-size:90%;line-height:1;padding:.2em .3em;background-color:rgba(0,0,0,.25)}#loco-editor .is-table .wg-cols>div>div.selected.po-flagged{background-color:#bd2c00}#loco-editor .is-table .wg-cols>div>div.selected.po-fuzzy{background-color:#b59829}#loco-editor .is-table .wg-cols>div>div.selected.po-empty{background-color:#999}#loco-editor #po-target header nav{display:block;position:absolute;right:0px;top:0px;padding:2px}#loco-editor #po-target header nav button{margin-left:5px}#loco-editor #po-target header nav.po-empty .icon-cloud{display:none !important}#loco-editor #po-list .wg-content{padding:0}#loco-editor #po-source>.wg-body>.has-title>header{background:transparent;font-weight:normal;float:left;clear:none;min-width:3.4em}#loco-editor #po-source>.wg-body>.has-title>.wg-content{clear:none}#loco-editor .has-title>header{line-height:normal;padding:6px}#loco-editor .has-title>header .lang{margin-right:6px;margin-bottom:1px}#loco-editor .trg-rtl #po-list-tbody .wg-cols>div[for=po-list-col-target]>div,#loco-editor .src-rtl #po-list-tbody .wg-cols>div[for=po-list-col-source]>div{direction:rtl;padding-left:0;padding-right:10px;text-align:right}#loco-editor #po-source>.wg-body>.has-title>h2{min-width:4.5em}#loco-editor .is-table .wg-td{font-size:13px}#loco-editor header,#loco-editor nav{display:block;position:relative}#loco-editor-inner{min-height:600px;font-size:14px;clear:both}#loco-editor-inner>div.loco-loading{height:100px;background:transparent url(../img/spin-editor-button.gif?v=2.5.3) center 20px no-repeat}#loco-editor-inner h2{color:#000;line-height:1}#loco-editor-inner .wg-cell>.meta code{padding:0;color:#0073aa;background:inherit;cursor:pointer}#loco-editor-inner .wg-cell>.meta code:hover{text-decoration:underline}#loco-admin.wrap #loco-editor>nav{font-size:14px;height:50px}#loco-admin.wrap #loco-editor>nav form{display:block;float:left;clear:none;padding:0;margin:0}#loco-admin.wrap #loco-editor>nav form.aux{float:right;margin-right:5px}#loco-admin.wrap #loco-editor>nav fieldset{display:block;position:relative;float:left;clear:none}#loco-admin.wrap #loco-editor>nav button,#loco-admin.wrap #loco-editor>nav input[type=text]{display:block;position:relative;float:left;clear:none;margin:5px 0 0 5px;height:36px;text-align:left;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#loco-admin.wrap #loco-editor>nav input[type=text]{padding:0 10px;font-size:14px;line-height:normal}#loco-admin.wrap #loco-editor>nav .invalid input[type=text]:focus{border-color:#c00;-webkit-box-shadow:0 0 2px rgba(153,0,0,.5);-moz-box-shadow:0 0 2px rgba(153,0,0,.5);box-shadow:0 0 2px rgba(153,0,0,.5)}#loco-admin.wrap #loco-editor>nav .loco-clearable{padding:0 20px}#loco-admin.wrap #loco-editor>nav .loco-clearable.invalid a.clear:before{color:#c00}#loco-admin.wrap #loco-editor>nav .loco-clearable a.clear{right:25px;line-height:2}#loco-admin.wrap #loco-editor>nav .loco-clearable a.clear:focus{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}#loco-admin.wrap #loco-editor>nav .loco-clearable a.clear:hover:before{color:#c00}#loco-admin.wrap #loco-editor>nav .loco-clearable a.clear:active:before{color:#000}#loco-admin.wrap #loco-editor>nav button.only-icon{width:40px}#loco-admin.wrap button.has-icon:before{width:16px;padding:0}#loco-admin.wrap button.has-icon.loco-loading:before{content:" ";height:16px;background:transparent url(../img/spin-editor-button.gif?v=2.5.3) 0 0 no-repeat}#loco-admin.wrap .button,#loco-admin.wrap .button-link,#loco-admin.wrap input[type=text]{border-color:#aaa;color:#444}#loco-admin.wrap .button:hover,#loco-admin.wrap .button-link:hover{color:#000}#loco-admin.wrap .button-primary,#loco-admin.wrap .button-primary:hover{color:#fff}#loco-admin.wrap button.icon-translate:before{font-size:16px}.loco-modal .loco-api{position:relative;padding:10px;background:#f7f7f7;border:solid 1px #eee;font-size:14px;margin-bottom:16px}.loco-modal .loco-api p{padding:0;margin:0;font-size:inherit}.loco-modal .loco-api blockquote{font-weight:bold;margin:0;padding:10px 0}.loco-modal .loco-api a.loco-api-credit{padding:0;display:block;position:absolute;right:10px;bottom:10px;text-decoration:none;white-space:nowrap;overflow:hidden;font-size:12px}.loco-modal .loco-api a.loco-api-credit:hover{text-decoration:underline}.loco-modal .loco-api-loading{text-indent:20px;background:transparent url(../img/spin-modal.gif?v=2.5.3) 10px center no-repeat}.loco-modal .loco-alert p{margin-bottom:2em;font-size:14px}.loco-modal .loco-alert nav{display:block;position:relative;margin:1em 0}.loco-modal .loco-alert nav a{display:inline-block;margin-right:1em;padding:10px}#loco-auto{display:none;min-width:50%;min-height:300px;position:relative}#loco-auto form blockquote{margin:0;padding:1em 0;font-size:14px}.loco-api a.loco-api-credit{color:inherit}.loco-api-yandex a.loco-api-credit:before{content:"Powered by "}.loco-api-google a.loco-api-credit{text-indent:200px;width:122px;height:16px;background:transparent url(../img/api/google.png?v=2.5.3) 0 0 no-repeat}.loco-api-microsoft a.loco-api-credit{text-indent:200px;width:152px;height:16px;background:transparent url(../img/api/microsoft.png?v=2.5.3) 0 0 no-repeat}.loco-api-deepl a.loco-api-credit{text-indent:200px;width:122px;height:16px;background:transparent url(../img/api/deepl.png?v=2.5.3) 0 0 no-repeat}
pub/css/fileinfo.css CHANGED
@@ -1 +1 @@
1
- #loco-admin.wrap .notice-info nav{display:block;position:absolute;right:0;top:0;font-size:1.3em;padding:1em}#loco-admin.wrap .notice-info nav a{color:#666}#loco-admin.wrap .notice-info nav a:hover{color:#000;text-decoration:none}#loco-admin.wrap .notice-info dl{margin-top:0;display:inline-block}#loco-admin.wrap .notice-info dl dt,#loco-admin.wrap .notice-info dl dd{line-height:1.4em}#loco-admin.wrap .notice-info dl dt{font-weight:bold;color:#555}#loco-admin.wrap .notice-info dl dd{margin-left:0;margin-bottom:.8em}#loco-admin.wrap .notice-info dl div.progress .l{display:none}
1
+ #loco-admin.wrap .notice-info nav{display:block;position:absolute;right:0;top:0;font-size:1.3em;padding:1em}#loco-admin.wrap .notice-info nav a{color:#666;margin-left:10px}#loco-admin.wrap .notice-info nav a:hover{color:#000;text-decoration:none}#loco-admin.wrap .notice-info dl{margin-top:0;display:inline-block}#loco-admin.wrap .notice-info dl dt,#loco-admin.wrap .notice-info dl dd{line-height:1.4em}#loco-admin.wrap .notice-info dl dt{font-weight:bold;color:#555}#loco-admin.wrap .notice-info dl dd{margin-left:0;margin-bottom:.8em}#loco-admin.wrap .notice-info dl div.progress .l{display:none}
pub/css/podiff.css CHANGED
@@ -1 +1 @@
1
- #loco-admin.wrap .revisions-diff{padding:10px;min-height:20px}#loco-admin.wrap table.diff{border-collapse:collapse}#loco-admin.wrap table.diff td{white-space:nowrap;overflow:hidden;font:normal 12px/17px "Monaco","Menlo","Ubuntu Mono","Consolas","source-code-pro",monospace;padding:2px}#loco-admin.wrap table.diff td>span{color:#aaa}#loco-admin.wrap table.diff td>span:after{content:". "}#loco-admin.wrap table.diff tbody{border-top:1px dashed #ccc}#loco-admin.wrap table.diff tbody:first-child{border-top:none}#loco-admin.wrap .revisions.loading .diff-meta{color:#eee}#loco-admin.wrap .revisions.loading .loading-indicator span.spinner{visibility:visible;background:#fff url(../img/spin-modal.gif?v=2.5.2) center center no-repeat}#loco-admin.wrap .revisions-meta{clear:both;padding:10px 12px;margin:0;position:relative;top:10px}#loco-admin.wrap .revisions-meta .diff-meta{clear:none;float:left;width:50%;padding:0;min-height:auto}#loco-admin.wrap .revisions-meta .diff-meta button{margin-top:5px}#loco-admin.wrap .revisions-meta .diff-meta-current{float:right;text-align:right}#loco-admin.wrap .revisions-meta time{color:#72777c}#loco-admin.wrap .revisions-control-frame{margin:10px 0}#loco-admin.wrap .revisions-diff-frame{margin-top:20px}
1
+ #loco-admin.wrap .revisions-diff{padding:10px;min-height:20px}#loco-admin.wrap table.diff{border-collapse:collapse}#loco-admin.wrap table.diff td{white-space:nowrap;overflow:hidden;font:normal 12px/17px "Monaco","Menlo","Ubuntu Mono","Consolas","source-code-pro",monospace;padding:2px}#loco-admin.wrap table.diff td>span{color:#aaa}#loco-admin.wrap table.diff td>span:after{content:". "}#loco-admin.wrap table.diff tbody{border-top:1px dashed #ccc}#loco-admin.wrap table.diff tbody:first-child{border-top:none}#loco-admin.wrap .revisions.loading .diff-meta{color:#eee}#loco-admin.wrap .revisions.loading .loading-indicator span.spinner{visibility:visible;background:#fff url(../img/spin-modal.gif?v=2.5.3) center center no-repeat}#loco-admin.wrap .revisions-meta{clear:both;padding:10px 12px;margin:0;position:relative;top:10px}#loco-admin.wrap .revisions-meta .diff-meta{clear:none;float:left;width:50%;padding:0;min-height:auto}#loco-admin.wrap .revisions-meta .diff-meta button{margin-top:5px}#loco-admin.wrap .revisions-meta .diff-meta-current{float:right;text-align:right}#loco-admin.wrap .revisions-meta time{color:#72777c}#loco-admin.wrap .revisions-control-frame{margin:10px 0}#loco-admin.wrap .revisions-diff-frame{margin-top:20px}
pub/css/poview.css CHANGED
@@ -1 +1 @@
1
- .js #loco-admin.wrap .loco-loading{min-height:100px;background:#fff url(../img/spin-modal.gif?v=2.5.2) center center no-repeat}.js #loco-admin.wrap .loco-loading ol.msgcat{display:none}#loco-admin.wrap #loco-po{padding-right:0;overflow:auto}#loco-admin.wrap ol.msgcat{margin-left:3em;padding-top:1em;border-top:1px dashed #ccc}#loco-admin.wrap ol.msgcat:first-child{padding-top:0;border-top:none}#loco-admin.wrap ol.msgcat li{color:#aaa;margin:0;padding:0 0 0 1em;font:normal 12px/17px "Monaco","Menlo","Ubuntu Mono","Consolas","source-code-pro",monospace;border-left:1px solid #eee}#loco-admin.wrap ol.msgcat li>*{color:#333;white-space:pre}#loco-admin.wrap ol.msgcat li>.po-comment{color:#3cc200}#loco-admin.wrap ol.msgcat li>.po-refs{color:#0073aa}#loco-admin.wrap ol.msgcat li>.po-refs a{color:inherit;text-decoration:none}#loco-admin.wrap ol.msgcat li>.po-refs a:hover{text-decoration:underline}#loco-admin.wrap ol.msgcat li>.po-flags{color:#77904a}#loco-admin.wrap ol.msgcat li>.po-flags em{font-style:normal}#loco-admin.wrap ol.msgcat li>.po-word{color:#000}#loco-admin.wrap ol.msgcat li>.po-junk{font-style:italic;color:#ccc}#loco-admin.wrap ol.msgcat li>.po-string>span{color:#c931c7}#loco-admin.wrap form.loco-filter{top:0;right:0;position:absolute}#loco-admin.wrap .loco-invalid form.loco-filter input[type=text]:focus{border-color:#c00;-webkit-box-shadow:0 0 2px rgba(153,0,0,.5);-moz-box-shadow:0 0 2px rgba(153,0,0,.5);box-shadow:0 0 2px rgba(153,0,0,.5)}#loco-admin.wrap .loco-invalid ol.msgcat{list-style-type:none}#loco-admin.wrap .loco-invalid ol.msgcat li{color:#000}
1
+ .js #loco-admin.wrap .loco-loading{min-height:100px;background:#fff url(../img/spin-modal.gif?v=2.5.3) center center no-repeat}.js #loco-admin.wrap .loco-loading ol.msgcat{display:none}#loco-admin.wrap #loco-po{padding-right:0;overflow:auto}#loco-admin.wrap ol.msgcat{margin-left:3em;padding-top:1em;border-top:1px dashed #ccc}#loco-admin.wrap ol.msgcat:first-child{padding-top:0;border-top:none}#loco-admin.wrap ol.msgcat li{color:#aaa;margin:0;padding:0 0 0 1em;font:normal 12px/17px "Monaco","Menlo","Ubuntu Mono","Consolas","source-code-pro",monospace;border-left:1px solid #eee}#loco-admin.wrap ol.msgcat li>*{color:#333;white-space:pre}#loco-admin.wrap ol.msgcat li>.po-comment{color:#3cc200}#loco-admin.wrap ol.msgcat li>.po-refs{color:#0073aa}#loco-admin.wrap ol.msgcat li>.po-refs a{color:inherit;text-decoration:none}#loco-admin.wrap ol.msgcat li>.po-refs a:hover{text-decoration:underline}#loco-admin.wrap ol.msgcat li>.po-flags{color:#77904a}#loco-admin.wrap ol.msgcat li>.po-flags em{font-style:normal}#loco-admin.wrap ol.msgcat li>.po-word{color:#000}#loco-admin.wrap ol.msgcat li>.po-junk{font-style:italic;color:#ccc}#loco-admin.wrap ol.msgcat li>.po-string>span{color:#c931c7}#loco-admin.wrap form.loco-filter{top:0;right:0;position:absolute}#loco-admin.wrap .loco-invalid form.loco-filter input[type=text]:focus{border-color:#c00;-webkit-box-shadow:0 0 2px rgba(153,0,0,.5);-moz-box-shadow:0 0 2px rgba(153,0,0,.5);box-shadow:0 0 2px rgba(153,0,0,.5)}#loco-admin.wrap .loco-invalid ol.msgcat{list-style-type:none}#loco-admin.wrap .loco-invalid ol.msgcat li{color:#000}
pub/css/skins/blue.css CHANGED
@@ -1 +1 @@
1
- .wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(9,100,132,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#096484;foo:#096484}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#d1cdc7 !important;background:#db9925 !important;border-color:#db9925 !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/blue/spin-primary-button.gif?v=2.5.2) 0 0 no-repeat !important}
1
+ .wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(9,100,132,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#096484;foo:#096484}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#d1cdc7 !important;background:#db9925 !important;border-color:#db9925 !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/blue/spin-primary-button.gif?v=2.5.3) 0 0 no-repeat !important}
pub/css/skins/coffee.css CHANGED
@@ -1 +1 @@
1
- .wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(199,165,137,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#c7a589;foo:#c7a589}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#d1ccc7 !important;background:#ba906d !important;border-color:#ba906d !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/coffee/spin-primary-button.gif?v=2.5.2) 0 0 no-repeat !important}
1
+ .wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(199,165,137,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#c7a589;foo:#c7a589}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#d1ccc7 !important;background:#ba906d !important;border-color:#ba906d !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/coffee/spin-primary-button.gif?v=2.5.3) 0 0 no-repeat !important}
pub/css/skins/ectoplasm.css CHANGED
@@ -1 +1 @@
1
- .wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(163,183,69,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#a3b745;foo:#a3b745}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#cfd1c7 !important;background:#89993a !important;border-color:#89993a !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/ectoplasm/spin-primary-button.gif?v=2.5.2) 0 0 no-repeat !important}
1
+ .wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(163,183,69,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#a3b745;foo:#a3b745}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#cfd1c7 !important;background:#89993a !important;border-color:#89993a !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/ectoplasm/spin-primary-button.gif?v=2.5.3) 0 0 no-repeat !important}
pub/css/skins/light.css CHANGED
@@ -1 +1 @@
1
- .wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(136,136,136,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#888;foo:#04a4cc}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#c7cfd1 !important;background:#0384a4 !important;border-color:#0384a4 !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/light/spin-primary-button.gif?v=2.5.2) 0 0 no-repeat !important}
1
+ .wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(136,136,136,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#888;foo:#04a4cc}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#c7cfd1 !important;background:#0384a4 !important;border-color:#0384a4 !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/light/spin-primary-button.gif?v=2.5.3) 0 0 no-repeat !important}
pub/css/skins/midnight.css CHANGED
@@ -1 +1 @@
1
- .wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(225,77,67,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#e14d43;foo:#e14d43}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#d1c8c7 !important;background:#d92e23 !important;border-color:#d92e23 !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/midnight/spin-primary-button.gif?v=2.5.2) 0 0 no-repeat !important}
1
+ .wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(225,77,67,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#e14d43;foo:#e14d43}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#d1c8c7 !important;background:#d92e23 !important;border-color:#d92e23 !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/midnight/spin-primary-button.gif?v=2.5.3) 0 0 no-repeat !important}
pub/css/skins/modern.css CHANGED
@@ -1 +1 @@
1
- .wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(56,88,233,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#3858e9;foo:#3858e9}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#c7c9d1 !important;background:#193ddf !important;border-color:#193ddf !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/modern/spin-primary-button.gif?v=2.5.2) 0 0 no-repeat !important}
1
+ .wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(56,88,233,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#3858e9;foo:#3858e9}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#c7c9d1 !important;background:#193ddf !important;border-color:#193ddf !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/modern/spin-primary-button.gif?v=2.5.3) 0 0 no-repeat !important}
pub/css/skins/ocean.css CHANGED
@@ -1 +1 @@
1
- .wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(158,186,160,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#9ebaa0;foo:#9ebaa0}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#c7d1c8 !important;background:#86a989 !important;border-color:#86a989 !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/ocean/spin-primary-button.gif?v=2.5.2) 0 0 no-repeat !important}
1
+ .wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(158,186,160,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#9ebaa0;foo:#9ebaa0}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#c7d1c8 !important;background:#86a989 !important;border-color:#86a989 !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/ocean/spin-primary-button.gif?v=2.5.3) 0 0 no-repeat !important}
pub/css/skins/sunrise.css CHANGED
@@ -1 +1 @@
1
- .wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(221,130,59,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#dd823b;foo:#dd823b}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#d1cbc7 !important;background:#cc6d23 !important;border-color:#cc6d23 !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/sunrise/spin-primary-button.gif?v=2.5.2) 0 0 no-repeat !important}
1
+ .wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(221,130,59,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#dd823b;foo:#dd823b}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#d1cbc7 !important;background:#cc6d23 !important;border-color:#cc6d23 !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/sunrise/spin-primary-button.gif?v=2.5.3) 0 0 no-repeat !important}
pub/js/min/admin.js CHANGED
@@ -1,196 +1,4914 @@
1
- (function(v,w,h,J){var m=function(){function f(d){throw Error("Failed to require "+d);}var d={};return{register:function(f,l){d[f]=l},require:function(h,l){return d[h]||f(l)},include:function(h,l,g){return d[h]||(g?f(l):null)}}}();m.register("$1",function(f,d,h){function l(g){var c=typeof g;if("string"===c)if(/[^ <>!=()%^&|?:n0-9]/.test(g))console.error("Invalid plural: "+g);else return new Function("n","return "+g);"function"!==c&&(g=function(b){return 1!=b});return g}f.init=function(g){function c(a,
2
- b,e){return(a=p[a])&&a[e]?a[e]:b||""}function b(a){return c(a,a,0)}function a(a,b){return c(b+"\u0004"+a,a,0)}function e(a,b,e){e=Number(g(e));isNaN(e)&&(e=0);return c(a,e?b:a,e)}g=l(g);var p={};return{__:b,_x:a,_n:e,_:b,x:a,n:e,load:function(a){p=a||{};return this},pluraleq:function(a){g=l(a);return this}}};return f}({},v,w));m.register("$2",function(f,d,h){f.ie=function(){var l=!1,g=0;d.attachEvent&&d.navigator&&/MSIE (\d+)\./.exec(String(navigator.appVersion))&&(g=Number(RegExp.$1),l=11>g);return function(){return l}}();
3
- f.init=function(){return f};return f}({},v,w));m.register("$3",function(f,d,h){Number.prototype.format=function(d){d=Math.pow(10,d||0);var g=Math.round(d*this)/d;d=[];var g=String(g),c=g.split("."),g=c[0],c=c[1],b=g.length;do d.unshift(g.substring(b-3,b));while(0<(b-=3));g=d.join(",");if(d=c){d=c;for(var a,c=d.length;"0"===d.charAt(--c);)a=c;a&&(d=d.substring(0,a));d=c=d}d&&(g+="."+c);return g};Number.prototype.percent=function(d){var g=0,c=this&&d?100*(this/d):0;if(0===c)return"0";if(100===c)return"100";
4
- if(99<c)c=Math.min(c,99.9),d=c.format(++g);else if(0.5>c){c=Math.max(c,1E-4);do d=c.format(++g);while("0"===d&&4>g);d=d.substr(1)}else d=c.format(0);return d};return f}({},v,w));m.register("$4",function(f,d,h){Array.prototype.indexOf||(Array.prototype.indexOf=function(d){if(null==this)throw new TypeError;var g,c=Object(this),b=c.length>>>0;if(0===b)return-1;g=0;1<arguments.length&&(g=Number(arguments[1]),g!=g?g=0:0!=g&&Infinity!=g&&-Infinity!=g&&(g=(0<g||-1)*Math.floor(Math.abs(g))));if(g>=b)return-1;
5
- for(g=0<=g?g:Math.max(b-Math.abs(g),0);g<b;g++)if(g in c&&c[g]===d)return g;return-1});return f}({},v,w));m.register("$5",function(f,d,m){d.JSON||(d.JSON={parse:h.parseJSON,stringify:null});return f=d.JSON}({},v,w));m.register("$6",function(f,d,h){f.trim=function(d,g){for(g||(g=" \n");d&&-1!==g.indexOf(d.substr(0,1));)d=d.substr(1);for(;d&&-1!==g.indexOf(d.substr(-1));)d=d.substr(0,d.length-1);return d};f.sprintf=function(d){var g=0,c=[].slice.call(arguments,1);return d.replace(/%(?:([1-9][0-9]*)\$)?([sud%])/g,
6
- function(b,a,e){return"%"===e?"%":(a?c[Number(a)-1]:c[g++])||""})};return f}({},v,w));m.register("$21",function(f,d,h){function l(g){return function(c,b){for(var a=c[g]||0;(c=c.offsetParent)&&c!==(b||h.body);)a+=c[g]||0;return a}}f.top=l("offsetTop");f.left=l("offsetLeft");f.el=function(g,c){var b=h.createElement(g||"div");c&&(b.className=c);return b};f.txt=function(g){return h.createTextNode(g||"")};return f}({},v,w));m.register("$7",function(f,d,E){function l(a,b,e){function r(){c();x=setTimeout(b,
7
- e)}function c(){x&&clearTimeout(x);x=null}var x;r();h(a).on("mouseenter",c).on("mouseleave",r);return{die:function(){c();h(a).off("mouseenter mouseleave")}}}function g(a,b){a.fadeTo(b,0,function(){a.slideUp(b,function(){a.remove();h(d).triggerHandler("resize")})});return a}function c(a,b){function e(b){n[x]=null;g(h(a),250);c&&c.die();var r;if(r=b)b.stopPropagation(),b.preventDefault(),r=!1;return r}function r(b){c&&c.die();return c=l(a,e,b)}var c,x,p,k=h(a),q=k.find("button");0===q.length&&(k.addClass("is-dismissible"),
8
- q=h('<button type="button" class="notice-dismiss"> </a>').appendTo(k));q.off("click").on("click",e);h(d).triggerHandler("resize");y();x=n.length;n.push(e);b&&(c=r(b));return{link:function(b,x){var e=x||b,r=h(a).find("nav"),e=h("<nav></nav>").append(h("<a></a>").attr("href",b).text(e));p?(p.push(e.html()),r.html(p.join("<span> | </span>"))):(p=[e.html()],h(a).addClass("has-nav").append(e));return this},stick:function(){c&&c.die();c=null;n[x]=null;return this},slow:function(a){r(a||1E4);return this}}}
9
- function b(a,b,e){var r=m.require("$21","dom.js").el;a=h('<div class="notice notice-'+a+' loco-notice inline"></div>').prependTo(h("#loco-notices"));var c=h(r("p"));e=h(r("span")).text(e);b=h(r("strong","has-icon")).text(b+": ");c.append(b).append(e).appendTo(a);return a}function a(a,e,r,p){a=b(r,e,a).css("opacity","0").fadeTo(500,1);h(d).triggerHandler("resize");return c(a,p)}function e(b){return a(b,q,"warning")}function p(){h("#loco-notices").find("div.notice").each(function(a,b){if(-1===b.className.indexOf("jshide")){var e=
10
- -1===b.className.indexOf("notice-success")?null:5E3;c(b,e)}})}var n=[],k=d.console||{log:function(){}},y=Date.now||function(){return(new Date).getTime()},z,q,r,D;f.error=function(b){return a(b,z,"error")};f.warn=e;f.info=function(b){return a(b,r,"info")};f.success=function(b){return a(b,D,"success",5E3)};f.warning=e;f.log=function(){k.log.apply(k,arguments)};f.debug=function(){(k.debug||k.log).apply(k,arguments)};f.clear=function(){for(var a=-1,b,e=n,r=e.length;++a<r;)(b=e[a])&&b.call&&b();n=[];return f};
11
- f.create=b;f.raise=function(a){(f[a.type]||f.error).call(f,a.message)};f.convert=c;f.init=function(a){z=a._("Error");q=a._("Warning");r=a._("Notice");D=a._("OK");setTimeout(p,1E3);return f};return f}({},v,w));m.register("$8",function(f,d,E){function l(a){var b=h("<pre>"+a+"</pre>").text();b&&(b=b.replace(/[\r\n]+/g,"\n").replace(/(^|\n)\s+/g,"$1").replace(/\s+$/,""));b||(b=a)||(b="Blank response from server");return b}function g(a){return(a=a.split(/[\r\n]/)[0])?(a=a.replace(/ +in +\S+ on line \d+/,
12
- ""),a=a.replace(/^[()! ]+Fatal error:\s*/,"")):t._("Server returned invalid data")}function c(a){d.console&&console.error&&console.error('No nonce for "'+a+'"');return""}function b(a,b,e){a[b]=e}function a(a,b,e){a.push({name:b,value:e})}function e(a,b,e){a.append(b,e)}function p(a,b,e,c){function p(b,c,x){if("abort"!==c){var r=k||{_:function(a){return a}},A=b.status||0,d=b.responseText,s=l(d),f=b.getResponseHeader("Content-Type")||"Unknown type",z=b.getResponseHeader("Content-Length")||d.length;
13
- "success"===c&&x?n.error(x):(n.error(g(s)+".\n"+r._("Check console output for debugging information")),n.log("Ajax failure for "+a,{status:A,error:c,message:x,output:d}),"parsererror"===c&&(x="Response not JSON"),n.log([r._("Provide the following text when reporting a problem")+":","----","Status "+A+' "'+(x||r._("Unknown error"))+'" ('+f+" "+z+" bytes)",s,"===="].join("\n")));e&&e.call&&e(b,c,x);y=b}}c.url=z;c.dataType="json";var n=m.require("$7","notices.js").clear();y=null;return h.ajax(c).fail(p).done(function(a,
14
- e,x){var c=a&&a.data,k=a&&a.notices,y=k&&k.length,g=-1;for(!c||a.error?p(x,e,a&&a.error&&a.error.message):b&&b(c,e,x);++g<y;)n.raise(k[g])})}var n={},k,y,z=d.ajaxurl||"/wp-admin/admin-ajax.php";f.init=function(a){n=a.nonces||n;return f};f.localise=function(a){k=a;return f};f.xhr=function(){return y};f.strip=l;f.parse=g;f.submit=function(a,b,e){function c(a,b){b.disabled?b.setAttribute("data-was-disabled","true"):b.disabled=!0}function k(a,b){b.getAttribute("data-was-disabled")||(b.disabled=!1)}function n(a){a.find(".button-primary").removeClass("loading");
15
- a.find("button").each(k);a.find("input").each(k);a.find("select").each(k);a.find("textarea").each(k);a.removeClass("disabled loading")}var y=h(a),g=y.serialize();(function(a){a.find(".button-primary").addClass("loading");a.find("button").each(c);a.find("input").each(c);a.find("select").each(c);a.find("textarea").each(c);a.addClass("disabled loading")})(y);return p(a.route.value,function(a,e,c){n(y);b&&b(a,e,c)},function(a,b,c){n(y);e&&e(a,b,c)},{type:a.method,data:g})};f.post=function(k,r,y,g){var A=
16
- !0,G=r||{},B=n[k]||c(k);d.FormData&&G instanceof FormData?(A=!1,r=e):r=Array.isArray(G)?a:b;r(G,"action","loco_json");r(G,"route",k);r(G,"loco-nonce",B);return p(k,y,g,{type:"post",data:G,processData:A,contentType:A?"application/x-www-form-urlencoded; charset=UTF-8":!1})};f.get=function(a,b,e,k){b=b||{};var y=n[a]||c(a);b.action="loco_json";b.route=a;b["loco-nonce"]=y;return p(a,e,k,{type:"get",data:b})};f.setNonce=function(a,b){n[a]=b;return f};return f}({},v,w));m.register("$22",{arab:1,aran:1,
17
- hebr:1,nkoo:1,syrc:1,syrn:1,syrj:1,syre:1,samr:1,mand:1,mend:1,thaa:1,adlm:1,cprt:1,phnx:1,armi:1,prti:1,phli:1,phlp:1,phlv:1,avst:1,mani:1,khar:1,orkh:1,ital:1,lydi:1,ar:1,ary:1,ckb:1,dv:1,fa:1,he:1,nqo:1,ps:1,ur:1,yi:1});m.register("$9",function(f,d,h){function l(){}var g,c=m.require("$22","rtl.json");f.init=function(){return new l};f.cast=function(b){return b instanceof l?b:"string"===typeof b?f.parse(b):f.clone(b)};f.clone=function(b){var a,e=new l;for(a in b)e[a]=b[a];return e};f.parse=function(b){if(!(g||
18
- (g=/^([a-z]{2,3})(?:[-_]([a-z]{2}))?(?:[-_]([a-z0-9]{3,8}))?$/i)).exec(b))return null;var a=new l;a.lang=RegExp.$1.toLowerCase();if(b=RegExp.$2)a.region=b.toUpperCase();if(b=RegExp.$3)a.variant=b.toLowerCase();return a};d=l.prototype;d.isValid=function(){return!!this.lang};d.isKnown=function(){var b=this.lang;return!(!b||"zxx"===b)};d.toString=function(b){b=b||"_";var a,e=this.lang||"zxx";if(a=this.region)e+=b+a;if(a=this.variant)e+=b+a;return e};d.getIcon=function(){for(var b=3,a,e,c=["variant",
19
- "region","lang"],n=[];0!==b--;)if(a=c[b],e=this[a])n.push(a),n.push(a+"-"+e.toLowerCase());return n.join(" ")};d.isRTL=function(){return!!c[String(this.lang).toLowerCase()]};d=null;return f}({},v,w));m.register("$23",{"\u00e1":"a","\u00e0":"a","\u0103":"a","\u1eaf":"a","\u1eb1":"a","\u1eb5":"a","\u1eb3":"a","\u00e2":"a","\u1ea5":"a","\u1ea7":"a","\u1eab":"a","\u1ea9":"a","\u01ce":"a","\u00e5":"a","\u01fb":"a","\u00e4":"a","\u01df":"a","\u00e3":"a","\u0227":"a","\u01e1":"a","\u0105":"a","\u0101":"a",
20
- "\u1ea3":"a","\u0201":"a","\u0203":"a","\u1ea1":"a","\u1eb7":"a","\u1ead":"a","\u1e01":"a","\u01fd":"\u00e6","\u01e3":"\u00e6","\u1e03":"b","\u1e05":"b","\u1e07":"b","\u0107":"c","\u0109":"c","\u010d":"c","\u010b":"c","\u00e7":"c","\u1e09":"c","\u010f":"d","\u1e0b":"d","\u1e11":"d","\u0111":"d","\u1e0d":"d","\u1e13":"d","\u1e0f":"d","\u00f0":"d","\ua77a":"d","\u01c6":"\u01f3","\u00e9":"e","\u00e8":"e","\u0115":"e","\u00ea":"e","\u1ebf":"e","\u1ec1":"e","\u1ec5":"e","\u1ec3":"e","\u011b":"e","\u00eb":"e",
21
- "\u1ebd":"e","\u0117":"e","\u0229":"e","\u1e1d":"e","\u0119":"e","\u0113":"e","\u1e17":"e","\u1e15":"e","\u1ebb":"e","\u0205":"e","\u0207":"e","\u1eb9":"e","\u1ec7":"e","\u1e19":"e","\u1e1b":"e","\u1e1f":"f","\ua77c":"f","\u01f5":"g","\u011f":"g","\u011d":"g","\u01e7":"g","\u0121":"g","\u0123":"g","\u1e21":"g","\ua7a1":"g","\u1d79":"g","\u0125":"h","\u021f":"h","\u1e27":"h","\u1e23":"h","\u1e29":"h","\u0127":"h","\u210f":"h","\u1e25":"h","\u1e2b":"h","\u1e96":"h","\u00ed":"i","\u00ec":"i","\u012d":"i",
22
- "\u00ee":"i","\u01d0":"i","\u00ef":"i","\u1e2f":"i","\u0129":"i","\u012f":"i","\u012b":"i","\u1ec9":"i","\u0209":"i","\u020b":"i","\u1ecb":"i","\u1e2d":"i","\u0135":"j","\u01f0":"j","\u1e31":"k","\u01e9":"k","\u0137":"k","\ua7a3":"k","\u1e33":"k","\u1e35":"k","\u013a":"l","\u013e":"l","\u013c":"l","\u0142":"l","\u1e37":"l","\u1e39":"l","\u1e3d":"l","\u1e3b":"l","\u0140":"l","\u1e3f":"m","\u1e41":"m","\u1e43":"m","\u0144":"n","\u01f9":"n","\u0148":"n","\u00f1":"n","\u1e45":"n","\u0146":"n","\ua7a5":"n",
23
- "\u1e47":"n","\u1e4b":"n","\u1e49":"n","\u00f3":"o","\u00f2":"o","\u014f":"o","\u00f4":"o","\u1ed1":"o","\u1ed3":"o","\u1ed7":"o","\u1ed5":"o","\u01d2":"o","\u00f6":"o","\u022b":"o","\u0151":"o","\u00f5":"o","\u1e4d":"o","\u1e4f":"o","\u022d":"o","\u022f":"o","\u0231":"o","\u00f8":"o","\u01ff":"o","\u01eb":"o","\u01ed":"o","\u014d":"o","\u1e53":"o","\u1e51":"o","\u1ecf":"o","\u020d":"o","\u020f":"o","\u01a1":"o","\u1edb":"o","\u1edd":"o","\u1ee1":"o","\u1edf":"o","\u1ee3":"o","\u1ecd":"o","\u1ed9":"o",
24
- "\u1e55":"p","\u1e57":"p","\u0155":"r","\u0159":"r","\u1e59":"r","\u0157":"r","\ua7a7":"r","\u0211":"r","\u0213":"r","\u1e5b":"r","\u1e5d":"r","\u1e5f":"r","\ua783":"r","\u015b":"s","\u1e65":"s","\u015d":"s","\u0161":"s","\u1e67":"s","\u1e61":"s","\u015f":"s","\ua7a9":"s","\u1e63":"s","\u1e69":"s","\u0219":"s","\u017f":"s","\ua785":"s","\u1e9b":"s","\u0165":"t","\u1e97":"t","\u1e6b":"t","\u0163":"t","\u1e6d":"t","\u021b":"t","\u1e71":"t","\u1e6f":"t","\ua787":"t","\u00fa":"u","\u00f9":"u","\u016d":"u",
25
- "\u00fb":"u","\u01d4":"u","\u016f":"u","\u00fc":"u","\u01d8":"u","\u01dc":"u","\u01da":"u","\u01d6":"u","\u0171":"u","\u0169":"u","\u1e79":"u","\u0173":"u","\u016b":"u","\u1e7b":"u","\u1ee7":"u","\u0215":"u","\u0217":"u","\u01b0":"u","\u1ee9":"u","\u1eeb":"u","\u1eef":"u","\u1eed":"u","\u1ef1":"u","\u1ee5":"u","\u1e73":"u","\u1e77":"u","\u1e75":"u","\u1e7d":"v","\u1e7f":"v","\u1e83":"w","\u1e81":"w","\u0175":"w","\u1e98":"w","\u1e85":"w","\u1e87":"w","\u1e89":"w","\u1e8d":"x","\u1e8b":"x","\u00fd":"y",
26
- "\u1ef3":"y","\u0177":"y","\u1e99":"y","\u00ff":"y","\u1ef9":"y","\u1e8f":"y","\u0233":"y","\u1ef7":"y","\u1ef5":"y","\u017a":"z","\u1e91":"z","\u017e":"z","\u017c":"z","\u1e93":"z","\u1e95":"z","\u01ef":"\u0292","\u1f00":"\u03b1","\u1f04":"\u03b1","\u1f84":"\u03b1","\u1f02":"\u03b1","\u1f82":"\u03b1","\u1f06":"\u03b1","\u1f86":"\u03b1","\u1f80":"\u03b1","\u1f01":"\u03b1","\u1f05":"\u03b1","\u1f85":"\u03b1","\u1f03":"\u03b1","\u1f83":"\u03b1","\u1f07":"\u03b1","\u1f87":"\u03b1","\u1f81":"\u03b1",
27
- "\u03ac":"\u03b1","\u1f71":"\u03b1","\u1fb4":"\u03b1","\u1f70":"\u03b1","\u1fb2":"\u03b1","\u1fb0":"\u03b1","\u1fb6":"\u03b1","\u1fb7":"\u03b1","\u1fb1":"\u03b1","\u1fb3":"\u03b1","\u1f10":"\u03b5","\u1f14":"\u03b5","\u1f12":"\u03b5","\u1f11":"\u03b5","\u1f15":"\u03b5","\u1f13":"\u03b5","\u03ad":"\u03b5","\u1f73":"\u03b5","\u1f72":"\u03b5","\u1f20":"\u03b7","\u1f24":"\u03b7","\u1f94":"\u03b7","\u1f22":"\u03b7","\u1f92":"\u03b7","\u1f26":"\u03b7","\u1f96":"\u03b7","\u1f90":"\u03b7","\u1f21":"\u03b7",
28
- "\u1f25":"\u03b7","\u1f95":"\u03b7","\u1f23":"\u03b7","\u1f93":"\u03b7","\u1f27":"\u03b7","\u1f97":"\u03b7","\u1f91":"\u03b7","\u03ae":"\u03b7","\u1f75":"\u03b7","\u1fc4":"\u03b7","\u1f74":"\u03b7","\u1fc2":"\u03b7","\u1fc6":"\u03b7","\u1fc7":"\u03b7","\u1fc3":"\u03b7","\u1f30":"\u03b9","\u1f34":"\u03b9","\u1f32":"\u03b9","\u1f36":"\u03b9","\u1f31":"\u03b9","\u1f35":"\u03b9","\u1f33":"\u03b9","\u1f37":"\u03b9","\u03af":"\u03b9","\u1f77":"\u03b9","\u1f76":"\u03b9","\u1fd0":"\u03b9","\u1fd6":"\u03b9",
29
- "\u03ca":"\u03b9","\u0390":"\u03b9","\u1fd3":"\u03b9","\u1fd2":"\u03b9","\u1fd7":"\u03b9","\u1fd1":"\u03b9","\u1f40":"\u03bf","\u1f44":"\u03bf","\u1f42":"\u03bf","\u1f41":"\u03bf","\u1f45":"\u03bf","\u1f43":"\u03bf","\u03cc":"\u03bf","\u1f79":"\u03bf","\u1f78":"\u03bf","\u1fe4":"\u03c1","\u1fe5":"\u03c1","\u1f50":"\u03c5","\u1f54":"\u03c5","\u1f52":"\u03c5","\u1f56":"\u03c5","\u1f51":"\u03c5","\u1f55":"\u03c5","\u1f53":"\u03c5","\u1f57":"\u03c5","\u03cd":"\u03c5","\u1f7b":"\u03c5","\u1f7a":"\u03c5",
30
- "\u1fe0":"\u03c5","\u1fe6":"\u03c5","\u03cb":"\u03c5","\u03b0":"\u03c5","\u1fe3":"\u03c5","\u1fe2":"\u03c5","\u1fe7":"\u03c5","\u1fe1":"\u03c5","\u1f60":"\u03c9","\u1f64":"\u03c9","\u1fa4":"\u03c9","\u1f62":"\u03c9","\u1fa2":"\u03c9","\u1f66":"\u03c9","\u1fa6":"\u03c9","\u1fa0":"\u03c9","\u1f61":"\u03c9","\u1f65":"\u03c9","\u1fa5":"\u03c9","\u1f63":"\u03c9","\u1fa3":"\u03c9","\u1f67":"\u03c9","\u1fa7":"\u03c9","\u1fa1":"\u03c9","\u03ce":"\u03c9","\u1f7d":"\u03c9","\u1ff4":"\u03c9","\u1f7c":"\u03c9",
31
- "\u1ff2":"\u03c9","\u1ff6":"\u03c9","\u1ff7":"\u03c9","\u1ff3":"\u03c9","\u0491":"\u0433","\u0450":"\u0435","\u0451":"\u0435","\u04c2":"\u0436","\u045d":"\u0438","\u04e3":"\u0438","\u04ef":"\u0443"});m.register("$10",function(f,d,h){f.init=function(){function d(a){return k[a]||a}function g(a,b,e,c){b=a.split(b);for(var p=b.length;0!==p--;)(a=b[p])&&null==c[a]&&(e.push(a),c[a]=!0);return e}function c(a){return g(String(a||"").toLowerCase().replace(p,d),n,[],{})}function b(a,b){for(var c=[],r={},k,
32
- s=b.length,A=n;0!==s--;)(k=b[s])&&g(String(k||"").toLowerCase().replace(p,d),A,c,r);e[a]=c}function a(a,b){var c=[],r=-1,p=e,k=p.length,n,g,d,u,x,F,f=a.length,l=b?!0:!1;a:for(;++r<k;)if(d=p[r],null!=d&&(u=d.length)){x=0;b:for(;x<f;x++){F=a[x];for(n=0;n<u;n++)if(g=d[n],0===g.indexOf(F))continue b;continue a}c.push(l?b[r]:r)}return c}var e=[],p=/[^a-z0-9]/g,n=/[\-_\s.?!;:,*^+=~`"(){}<>\[\]\/\\\u00a0\u1680\u180e\u2000-\u206f\u2e00-\u2e7f\u3000-\u303f]+/,k=m.require("$23","flatten.json");return{split:c,
33
- pull:function(b,e){return a(b,e)},find:function(b,e){return a(c(b),e)},add:function(a,b){e[a]=c(b)},push:function(a){b(e.length,a)},index:function(a,e){b(a,e)},size:function(){return e.length},clear:function(){e=[]},remove:function(a){e[a]=null}}};return f}({},v,w));m.register("$11",function(f,d,m){f.listen=function(f,g){function c(){q[p?"show":"hide"]()}function b(a){z&&f.setAttribute("size",2+a.length);p=a;c();return a}function a(){n=null;g(p)}function e(){var e=f.value;y&&e===y&&(e="");e!==p&&
34
- (n&&clearTimeout(n),b(e),k?n=setTimeout(a,k):a())}f instanceof jQuery&&(f=f[0]);var p,n,k=150,y=d.attachEvent&&f.getAttribute("placeholder"),z=1===Number(f.size),q=h('<a href="#clear" tabindex="-1" class="icon clear"><span>clear</span></a>').on("click",function(){f.value="";e();return!1});b(f.value);h(f).on("input blur focus",function(){e();return!0}).after(q);c();return{delay:function(a){k=a},ping:function(c){c?(n&&clearTimeout(n),c=f.value,y&&c===y&&(c=""),b(c),a(),c=void 0):c=e();return c},val:function(a){if(null==
35
- a)return p;n&&clearTimeout(n);f.value=b(a);c()},el:function(){return f},blur:function(a){return h(f).on("blur",a)},destroy:function(){n&&clearTimeout(n)}}};return f}({},v,w));m.register("$12",function(f,d,m){function l(b,a){this.$element=h(b);this.options=a;this.enabled=!0;this.fixTitle()}f.init=function(b,a){var e={fade:!0,offset:5,delayIn:g,delayOut:c,anchor:b.attr("data-anchor"),gravity:b.attr("data-gravity")||"s"};a&&(e=h.extend({},e,a));b.tipsy(e)};f.delays=function(b,a){g=b||150;c=a||100};f.kill=
36
- function(){h("div.tipsy").remove()};f.text=function(b,a){a.data("tipsy").setTitle(b)};var g,c;f.delays();h(m.body).on("overlayOpened overlayClosing",function(b){f.kill();return!0});l.prototype={show:function(){var b=this.getTitle();if(b&&this.enabled){var a=this.tip();a.find(".tipsy-inner")[this.options.html?"html":"text"](b);a[0].className="tipsy";a.remove().css({top:0,left:0}).prependTo(m.body);var b=(b=this.options.anchor)?this.$element.find(b):this.$element,b=h.extend({},b.offset(),{width:b[0].offsetWidth,
37
- height:b[0].offsetHeight}),e=a[0].offsetWidth,c=a[0].offsetHeight,n="function"==typeof this.options.gravity?this.options.gravity.call(this.$element[0]):this.options.gravity,k;switch(n.charAt(0)){case "n":k={top:b.top+b.height+this.options.offset,left:b.left+b.width/2-e/2};break;case "s":k={top:b.top-c-this.options.offset,left:b.left+b.width/2-e/2};break;case "e":k={top:b.top+b.height/2-c/2,left:b.left-e-this.options.offset};break;case "w":k={top:b.top+b.height/2-c/2,left:b.left+b.width+this.options.offset}}2==
38
- n.length&&("w"==n.charAt(1)?k.left=b.left+b.width/2-15:k.left=b.left+b.width/2-e+15);a.css(k).addClass("tipsy-"+n);a.find(".tipsy-arrow")[0].className="tipsy-arrow tipsy-arrow-"+n.charAt(0);this.options.className&&a.addClass("function"==typeof this.options.className?this.options.className.call(this.$element[0]):this.options.className);a.addClass("in")}},hide:function(){this.tip().remove()},fixTitle:function(){var b=this.$element,a=b.attr("title")||"";(a||"string"!==typeof b.attr("original-title"))&&
39
- b.attr("original-title",a).removeAttr("title")},getTitle:function(){var b,a=this.$element,e=this.options;this.fixTitle();"string"==typeof e.title?b=a.attr("title"==e.title?"original-title":e.title):"function"==typeof e.title&&(b=e.title.call(a[0]));return(b=(""+b).replace(/(^\s*|\s*$)/,""))||e.fallback},setTitle:function(b){var a=this.$element;a.attr("default-title")||a.attr("default-title",this.getTitle());null==b&&(b=a.attr("default-title")||this.getTitle());a.attr("original-title",b);if(this.$tip)this.$tip.find(".tipsy-inner")[this.options.html?
40
- "html":"text"](b)},tip:function(){this.$tip||(this.$tip=h('<div class="tipsy"></div>').html('<div class="tipsy-arrow"></div><div class="tipsy-inner"></div>'),this.$tip.data("tipsy-pointee",this.$element[0]));return this.$tip},validate:function(){this.$element[0].parentNode||(this.hide(),this.options=this.$element=null)},enable:function(){this.enabled=!0},disable:function(){this.hide();this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled}};h.fn.tipsy=function(b){function a(a){var e=
41
- h.data(a,"tipsy");e||(e=new l(a,h.fn.tipsy.elementOptions(a,b)),h.data(a,"tipsy",e));return e}function e(){var e=a(this),c=b.delayIn;e.hoverState="in";0==c?e.show():(e.fixTitle(),setTimeout(function(){"in"==e.hoverState&&e.show()},c))}function c(){var e=a(this),p=b.delayOut;e.hoverState="out";0==p?e.hide():(e.tip().removeClass("in"),setTimeout(function(){"out"==e.hoverState&&e.hide()},p))}b=h.extend({},h.fn.tipsy.defaults,b);b.live||this.each(function(){a(this)});if("manual"!=b.trigger){var n=b.live?
42
- "live":"bind",k="hover"==b.trigger?"mouseleave":"blur";this[n]("hover"==b.trigger?"mouseenter":"focus",e)[n](k,c)}return this};h.fn.tipsy.defaults={className:null,delayIn:0,delayOut:0,fade:!1,fallback:"",gravity:"n",html:!1,live:!1,offset:0,opacity:0.8,title:"title",trigger:"hover",anchor:null};h.fn.tipsy.elementOptions=function(b,a){return h.metadata?h.extend({},a,h(b).metadata()):a};h.fn.tipsy.autoNS=function(){return h(this).offset().top>h(m).scrollTop()+h(d).height()/2?"s":"n"};h.fn.tipsy.autoWE=
43
- function(){return h(this).offset().left>h(m).scrollLeft()+h(d).width()/2?"e":"w"};h.fn.tipsy.autoBounds=function(b,a){return function(){var e=a[0],c=1<a.length?a[1]:!1,n=h(m).scrollTop()+b,k=h(m).scrollLeft()+b,g=h(this);g.offset().top<n&&(e="n");g.offset().left<k&&(c="w");h(d).width()+h(m).scrollLeft()-g.offset().left<b&&(c="e");h(d).height()+h(m).scrollTop()-g.offset().top<b&&(e="s");return e+(c?c:"")}};return f}({},v,w));m.register("$35",function(f,d,h){"".localeCompare||(String.prototype.localeCompare=
44
- function(){return 0});"".trim||(String.prototype.trim=function(){return m.require("$6","string.js").trim(this," \n\r\t")});f.html=function(){function d(){b=/[<>&]/g;a=/(\r\n|\n|\r)/g;e=/(?:https?):\/\/(\S+)/ig;p=location.hostname;d=null}function g(a){return"&#"+a.charCodeAt(0)+";"}function c(a,b){return'<a href="'+a+'" target="'+(b.indexOf(p)?"_blank":"_top")+'">'+b+"</a>"}var b,a,e,p;return function(p,k){d&&d();var y=p.replace(b,g);k&&(y=y.replace(e,c).replace(a,"<br />"));return y}}();return f}({},
45
- v,w));m.register("$36",function(f,d,h){function l(){}var g,c,b=m.require("$22","rtl.json");f.init=function(){return new l};f.cast=function(a){return a instanceof l?a:"string"===typeof a?f.parse(a):f.clone(a)};f.clone=function(a){var b,c=new l;for(b in a)c[b]=a[b];return c};f.parse=function(a){g||(c=/[-_+]/,g=/^([a-z]{2,3})(?:-([a-z]{4}))?(?:-([a-z]{2}|[0-9]{3}))?(?:-([0-9][a-z0-9]{3,8}|[a-z0-9]{5,8}))?(?:-([a-z]-[-a-z]+))?$/i);a=String(a).split(c).join("-");if(!g.exec(a))return null;var b=new l;b.lang=
46
- RegExp.$1.toLowerCase();if(a=RegExp.$2)b.script=a.charAt(0).toUpperCase()+a.substr(1).toLowerCase();if(a=RegExp.$3)b.region=a.toUpperCase();if(a=RegExp.$4)b.variant=a.toLowerCase();if(a=RegExp.$5)b.extension=a;return b};d=l.prototype;d.isValid=function(){return!!this.lang};d.isKnown=function(){var a=this.lang;return!(!a||"zxx"===a)};d.toString=function(a){a=a||"-";var b,c=this.lang||"zxx";if(b=this.script)c+=a+b;if(b=this.region)c+=a+b;if(b=this.variant)c+=a+b;if(b=this.extension)c+=a+b;return c};
47
- d.getIcon=function(){for(var a=4,b,c,n=["variant","region","script","lang"],k=[];0!==a--;)if(b=n[a],c=this[b])c.join&&(c=c.join("-")),1===a&&3===c.length?k.push("region-m49"):k=k.concat([b,b+"-"+c.toLowerCase()]);return k.join(" ")};d.isRTL=function(){return!!b[String(this.script||this.lang).toLowerCase()]};d=null;return f}({},v,w));m.register("$37",function(f,d,h){function l(a){d.console&&console.error&&console.error(a)}function g(){l("Method not implemented")}function c(){}function b(a){}c.prototype.toString=
48
- function(){return"[Undefined]"};b.prototype._validate=function(a){var b,p,n=!0;for(b in this)p=this[b],p===g?(l(a+"."+b+"() must be implemented"),n=!1):p instanceof c&&(l(a+"."+b+" must be defined"),n=!1);return n};f.init=function(a,e){var p,n=new b;if(a)for(p=a.length;0!==p--;)n[a[p]]=g;if(e)for(p=e.length;0!==p--;)n[e[p]]=new c;return n};f.validate=function(a){var b=/function (\w+)\(/.exec(a.toString())?RegExp.$1:"";a.prototype._validate(b||"Object")};return f}({},v,w));m.register("$48",function(f,
49
- d,h){var l=d.requestAnimationFrame,g=d.cancelAnimationFrame,c=0;if(!l||!g)for(var b in{ms:1,moz:1,webkit:1,o:1})if(l=d[b+"RequestAnimationFrame"])if(g=d[b+"CancelAnimationFrame"]||d[b+"CancelRequestAnimationFrame"])break;l&&g||(l=function(b){var p=a();timeToCall=Math.max(0,16-(p-c));nextTime=p+timeToCall;timerId=d.setTimeout(function(){b(nextTime)},timeToCall);c=nextTime;return timerId},g=function(a){clearTimeout(a)});var a=Date.now||function(){return(new Date).getTime()};f.loop=function(a,b){function c(){d=
50
- l(c,b);a(k++)}var k=0,d;c();return{stop:function(){d&&g(d);d=null}}};return f}({},v,w));m.register("$45",function(f,d,h){function l(a,c,e,r){if(b){var k=e;e=function(a){if((a.MSPOINTER_TYPE_TOUCH||"touch")===a.pointerType)return k(a)}}a.addEventListener(c,e,r);return{unbind:function(){a.removeEventListener(c,e,r)}}}function g(a){a.preventDefault();a.stopPropagation();return!1}var c,b=!!d.navigator.msPointerEnabled,a=b?"MSPointerDown":"touchstart",e=b?"MSPointerMove":"touchmove",p=b?"MSPointerUp":
51
- "touchend";f.ok=function(a){null==c&&(c="function"===typeof h.body.addEventListener);c&&a&&a(f);return c};f.ms=function(){return b};f.dragger=function(b,c){function k(a){b.addEventListener(a,d[a],!1)}function r(a){b.removeEventListener(a,d[a],!1)}var d={};d[a]=function(b){n(b,function(e,k){k.type=a;c(b,k,f)});k(e);k(p);return!0};d[p]=function(a){r(e);r(p);n(a,function(b,e){e.type=p;c(a,e,f)});return!0};d[e]=function(a){n(a,function(b,k){k.type=e;c(a,k,f)});return g(a)};k(a);var f={kill:function(){r(a);
52
- r(e);r(p);b=f=c=null}};return f};f.swiper=function(c,d,f){function r(a){c.addEventListener(a,u[a],!1)}function D(a){c.removeEventListener(a,u[a],!1)}function s(){A&&A.stop();A=null}var A,G,B,u={},x=[],F=[],h=[];u[a]=function(a){G=!1;s();var b=k();n(a,function(a,c){x[a]=b;F[a]=c.clientX;h[a]=c.clientY});B=c.scrollLeft;return!0};u[p]=function(a){n(a,function(a,b){var c=k()-x[a],e=F[a]-b.clientX,c=Math.abs(e)/c;d(c,e?0>e?-1:1:0)});B=null;return!0};u[e]=function(a){var b,e;null==B||n(a,function(a,c){b=
53
- F[a]-c.clientX;e=h[a]-c.clientY});if(e&&Math.abs(e)>Math.abs(b))return G=!0;b&&(G=!0,c.scrollLeft=Math.max(0,B+b));return g(a)};if(!b||f)r(a),r(e),r(p),b&&(c.className+=" mstouch");return{kill:function(){D(a);D(e);D(p);s()},swiped:function(){return G},ms:function(){return b},snap:function(a){b&&!f&&(c.style["-ms-scroll-snap-points-x"]="snapInterval(0px,"+a+"px)",c.style["-ms-scroll-snap-type"]="mandatory",c.style["-ms-scroll-chaining"]="none")},scroll:function(a,b,e){s();var x=c.scrollLeft,k=a>x?
54
- 1:-1,r=Math[1===k?"min":"max"],d=Math.round(16*b*k);return A=m.require("$48","fps.js").loop(function(b){b&&(x=Math.max(0,r(a,x+d)),c.scrollLeft=x,a===x&&(s(),e&&e(x)))},c)}}};f.start=function(b,c){return l(b,a,c,!1)};f.move=function(a,b){return l(a,e,b,!1)};f.end=function(a,b){return l(a,p,b,!1)};var n=f.each=function(a,c){if(b)(a.MSPOINTER_TYPE_TOUCH||"touch")===a.pointerType&&c(0,a);else for(var e=-1,k=(a.originalEvent||a).changedTouches||[];++e<k.length;)c(e,k[e])},k=Date.now||function(){return(new Date).getTime()};
55
- return f}({},v,w));m.register("$49",function(f,d,m){f.init=function(d){function g(){e.style.top=String(-d.scrollTop)+"px";return!0}function c(){var a=e;a.textContent=d.value;a.innerHTML=a.innerHTML.replace(/[ \t]/g,b).split(/(?:\n|\r\n?)/).join('<span class="eol crlf"></span>\r\n')+'<span class="eol eof"></span>';return!0}function b(a){return'<span class="x'+a.charCodeAt(0).toString(16)+'">'+a+"</span>"}var a=d.parentNode,e=a.insertBefore(m.createElement("div"),d);h(d).on("input",c).on("scroll",g);
56
- h(a).addClass("has-mirror");e.className="ta-mirror";var p=d.offsetWidth-d.clientWidth;2<p&&(e.style.marginRight=String(p-2)+"px");c();g();return{kill:function(){h(d).off("input",c).off("scroll",g);a.removeChild(e);e=null;h(a).removeClass("has-mirror")}}};return f}({},v,w));m.register("$29",function(f,d,h){function l(b,a){for(var c=0,p=-1,n=a&&d[a],k=g[b]||[],f=k.length;++p<f;)callback=k[p],"function"===typeof callback&&(callback(n),c++);return c}var g={},c;f.load=function(b,a,c){function p(){f&&(clearTimeout(f),
57
- f=null);z&&(z.onreadystatechange=null,z=z=z.onload=null);b&&(delete g[b],b=null)}function n(a,k){var d=z&&z.readyState;if(k||!d||"loaded"===d||"complete"===d)k||l(b,c),p()}function k(){if(0===l(b))throw Error('Failed to load "'+(c||b)+'"');p()}if(c&&d[c])"function"===typeof a&&a(d[c]);else if(null!=g[b])g[b].push(a);else{g[b]=[a];var f=setTimeout(k,4E3),z=h.createElement("script");z.setAttribute("src",b);z.setAttribute("async","true");z.onreadystatechange=n;z.onload=n;z.onerror=k;z.onabort=p;h.getElementsByTagName("head")[0].appendChild(z)}};
58
- f.stat=function(b){var a;if(!(a=c)){for(var e,d,g=h.getElementsByTagName("script"),k=-1,f=g.length;++k<f;)if(a=g[k].getAttribute("src"))if(e=a.indexOf("/lib/vendor"),-1!==e){d=a.substr(0,e);break}a=c=d||"/static"}return a+b};return f}({},v,w));m.register("$16",function(f,d,E){function l(a,b){a.setReadOnly(!1);a.on("change",function(a,c){return b.val(c.getValue())});a.on("focus",function(){return b.focus()});a.on("blur",function(){return b.blur()})}function g(a){a.off("change");a.off("focus");a.off("blur")}
59
- function c(a){g(a);a.setReadOnly(!0);a.setHighlightGutterLine(!1);a.setHighlightActiveLine(!1)}function b(b,c){function e(){this.HighlightRules=d}var d=a(c),r=b.require,g=r("ace/lib/oop");g.inherits(d,r("ace/mode/text_highlight_rules").TextHighlightRules);g.inherits(e,r("ace/mode/text").Mode);return new e}function a(a){return function(){var b={start:[{token:"empty_line",regex:/^$/},{token:"constant.language",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"},{token:"constant.language",
60
- regex:/<!\[CDATA\[/},{token:"constant.language",regex:/\]\]>/},{token:"locked",regex:/<(?:xliff:)?(?:g|ph)[^>]*>[^<]*<\/(?:xliff:)?(?:g|ph)>/},{token:"locked",regex:/<(?:xliff:)?(bx|ex|x)[^\/>]*\/>/},{token:"constant.language",regex:/<\/?[:a-z]+[^>]*>/}]},c=e(a);"icu"===a?b={start:b.start.concat([{token:"icu-quoted",regex:/'([{}][^']*)?'/},{token:"printf",regex:"{[^!-/:-@\\[-^{-~\u00a1\u00a2\u00a3\u00a4\u00a5\u00a6\u00a7\u00a9\u00ab\u00ac\u00ae\u00b0\u00b1\u00b6\u00bb\u00bf\u00d7\u00f7\\u2010-\\u2027\\u2030-\\u203E\\u2041-\\u2053\\u2055-\\u205E\\u2190-\\u245F\\u2500-\\u2775\\u2794-\\u2BFF\\u2E00-\\u2E7F\\u3001-\\u3003\\u3008-\\u3020\\u3030\\uFD3E\\uFD3F\\uFE45\\uFE46]+(,[\\s\\u0085\\u200E\\u200F\\u2028\\u2029]*(?:number|date|time|spellout|ordinal|duration)[\\s\\u0085\\u200E\\u200F\\u2028\\u2029]*(,[\\s\\u0085\\u200E\\u200F\\u2028\\u2029]*[^{}]+)?)?}"},
61
- {token:"icu",regex:/{/,next:"icuName"},{token:"icu",regex:/}/,next:"icuType"}]),icuName:[{token:"icu",regex:"[\\s\\u0085\\u200E\\u200F\\u2028\\u2029]+"},{token:"icu.name",regex:"[^\\s\\u0085\\u200E\\u200F\\u2028\\u2029!-/:-@\\[-^{-~\u00a1\u00a2\u00a3\u00a4\u00a5\u00a6\u00a7\u00a9\u00ab\u00ac\u00ae\u00b0\u00b1\u00b6\u00bb\u00bf\u00d7\u00f7\\u2010-\\u2027\\u2030-\\u203E\\u2041-\\u2053\\u2055-\\u205E\\u2190-\\u245F\\u2500-\\u2775\\u2794-\\u2BFF\\u2E00-\\u2E7F\\u3001-\\u3003\\u3008-\\u3020\\u3030\\uFD3E\\uFD3F\\uFE45\\uFE46]+",
62
- next:"icuType"},{defaultToken:"icu",next:"icuType"}],icuType:[{token:"icu",regex:/[{}]/,next:"start"},{defaultToken:"icu"}]}:c&&b.start.push({token:"printf",regex:c});this.$rules=b}}function e(a){switch(a){case "objc":return/%(?:\d+\$)?[-+'0# ]*\d*(?:\.\d+|\.\*(?:\d+\$)?)?(?:hh?|ll?|[qjzTL])?[sScCdDioOuUxXfFeEgGaAp%@]/;case "java":return/%(?:\d+\$)?[-+,(0# ]*\d*(?:\.\d+)?(?:[bBhHsScCdoxXeEfgGaA%n]|[tT][HIklMSLNpzZsQBbhAaCYyjmdeRTrDFc])/;case "php":return/%(?:\d+\$)?(?:'.|[-+0 ])*\d*(?:\.\d+)?[suxXbcdeEfFgGo%]/;
63
- case "python":return/%(?:\([a-z]+\))?[-+0# ]*(?:\d+|\*)?(?:\.\d+|\.\*)?(?:[hlL])?[sdiouxXeEfFgGcra%]/;case "javascript":return/%(?:[1-9]\d*\$)?\+?(?:0|'[^$])?-?\d*(?:\.\d+)?[b-gijostTuvxX%]/;case "auto":return/%(?:\d+\$|\([a-z]+\))?(?:[-+0]?\d*(\.\d+)?[duxoefgaDUXOEFGA]|[@scSC%])/;case n:return p||"%%"}}var p,n="auto";f.init=function(a,e,p){var f,r=!1,D=p||n,s=a.parentNode,A=s.appendChild(E.createElement("div"));h(s).addClass("has-proxy has-ace");m.require("$29","remote.js").load("https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.1/ace.js",
64
- function(d){if(A){if(!d)throw Error("Failed to load code editor");f=d.edit(A);var g=f.session,p=f.renderer;f.$blockScrolling=Infinity;f.setShowInvisibles(r);f.setWrapBehavioursEnabled(!1);f.setBehavioursEnabled(!1);f.setHighlightActiveLine(!1);g.setUseSoftTabs(!1);p.setShowGutter(!0);p.setPadding(10);p.setScrollMargin(8);g.setMode(b(d,D));f.setValue(a.value,-1);g.setUseWrapMode(!0);e?l(f,e):c(f)}},"ace");return{kill:function(){f&&(g(f),f.destroy(),f=null);A&&(s.removeChild(A),h(s).removeClass("has-proxy has-ace"),
65
- A=null);return this},disable:function(){f&&c(f);e=null;return this},enable:function(a){e=a;f&&l(f,a);return this},resize:function(){f&&f.resize();return this},val:function(a){f&&a!==f.getValue()&&f.setValue(a,-1);return this},invs:function(a){a=a||!1;r!==a&&(r=a,f&&f.setShowInvisibles(a));return this},strf:function(a){a=a||n;a!==D&&(D=a,f&&f.session.setMode(b(d.ace,a)));return this},focus:function(){return this}}};f.strf=function(a,b){n=a;p=b;return f};return f}({},v,w));m.register("$50",function(f,
66
- d,E){function l(a,b){function c(){return b.val(a.getContent())}a.on("input",c);a.on("change",c);a.on("focus",function(){return b.focus()});a.on("blur",function(){return b.blur()});a.setMode("design")}function g(a){a.off("input");a.off("change");a.off("focus");a.off("blur")}function c(a){g(a);a.setMode("readonly")}var b=0;f.load=function(a){var b=m.require("$29","remote.js");b.load(b.stat("/lib/tinymce.min.js"),a,"tinymce");return f};f.init=function(a,e){function d(a){z=a;q="<p>"===a.substr(0,3)&&
67
- "</p>"===a.substr(-4);return a.replace(/(<\/?)script/ig,"$1loco:script")}function n(a){k=a;a._getContent=a.getContent;a.getContent=function(a){a=this._getContent(a);a=a.replace(/(<\/?)loco:script/ig,"$1script");if(!q&&"<p>"===a.substr(0,3)&&"</p>"===a.substr(-4)){var b=a.substr(3,a.length-7);if(b===z||-1===b.indexOf("</p>"))a=b}return a};a._setContent=a.setContent;a.setContent=function(a,b){return this._setContent(d(a),b)};e?(l(a,e),e.reset()):c(a);h(s).removeClass("loading")}var k,y=!1,z="",q=!1,
68
- r=a.parentNode,D=r.parentNode,s=r.appendChild(E.createElement("div")),A=D.insertBefore(E.createElement("nav"),r);A.id="_tb"+String(++b);h(r).addClass("has-proxy has-mce");h(s).addClass("mce-content-body loading").html(d(a.value));f.load(function(a){if(!a)throw Error("Failed to load HTML editor");s&&a.init({inline:!0,target:s,hidden_input:!1,theme:"modern",skin:!1,plugins:"link lists",browser_spellcheck:!0,menubar:!1,fixed_toolbar_container:"#"+A.id,toolbar:"formatselect | bold italic link unlink | bullist numlist outdent indent",
69
- block_formats:"Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h4;Heading 4=h4;Heading 5=h5;Heading 6=h6;",forced_root_block:"p",relative_urls:!1,convert_urls:!1,remove_script_host:!1,document_base_url:"",allow_script_urls:!1,formats:{alignleft:{classes:"alignleft"},alignright:{selector:"p,h1,h2,h3,h4,span,strong,em,a",classes:"alignright"},aligncenter:{selector:"p,h1,h2,h3,h4,span,strong,em,a",classes:"aligncenter"},strikethrough:{inline:"del"}},fix_list_elements:!0,extended_valid_elements:"span,b,i,u,loco:script",
70
- entities:"38,amp,60,lt,62,gt,160,nbsp",entity_encoding:"named",keep_styles:!1,init_instance_callback:n})});return{val:function(b){b=d(b);null==k?(a.value=b,h(s).html(b)):k.getContent()!==b&&k.setContent(b);e&&e.val(b);return this},kill:function(){k&&(e&&e.val(k.getContent()),g(k),k.destroy(),k=null);s&&(r.removeChild(s),h(r).removeClass("has-proxy has-mce"),s=null);A&&(D.removeChild(A),A=null);return this},enable:function(a){e=a;k&&l(k,a);return this},disable:function(){k&&c(k);e=null;return this},
71
- focus:function(){k&&e&&k.focus();return this},invs:function(a){a=a||!1;y!==a&&(y=a,h(r)[a?"addClass":"removeClass"]("show-invs"));return this}}};return f}({},v,w));m.register("$46",function(f,d,E){function l(b){function a(){f&&(z.off("input",e),f=!1)}function e(){var a=b.value;a!==r&&(z.trigger("changing",[a,r]),r=a)}function d(){e();f&&D!==r&&z.trigger("changed",[r])}function g(){c=b;D=r;f||(z.on("input",e),f=!0);z.trigger("editFocus");q.addClass("has-focus");return!0}function k(){c===b&&(c=null);
72
- z.trigger("editBlur");q.removeClass("has-focus");f&&(d(),a());return!0}var f=!1,z=h(b),q=h(b.parentNode),r=b.value,D;z.on("blur",k).on("focus",g);return{val:function(a){r!==a&&(b.value=a,z.triggerHandler("input"),r=a);return!0},kill:function(){a();z.off("blur",k).off("focus",g)},fire:function(){r=null;e()},ping:d,blur:k,focus:g,reset:function(){D=r=b.value}}}function g(b){this.e=b}var c;f._new=function(b){return new g(b)};f.init=function(b){var a=new g(b);b.disabled?(b.removeAttribute("disabled"),
73
- a.disable()):b.readOnly?a.disable():a.enable();return a};TextAreaPrototype=g.prototype;TextAreaPrototype.destroy=function(){this.unlisten();var b=this.p;b&&(b.kill(),this.p=null);this.e=null};TextAreaPrototype.reload=function(b,a){var c=this.l;c&&!a&&(this.disable(),c=null);this.val(b||"");a&&!c&&this.enable();return this};TextAreaPrototype.val=function(b){var a=this.e;if(null==b)return a.value;var c=this.l,d=this.p;d&&d.val(b);c&&c.val(b);c||a.value===b||(a.value=b,h(a).triggerHandler("input"));
74
- return this};TextAreaPrototype.fire=function(){this.l&&this.l.fire();return this};TextAreaPrototype.ping=function(){this.l&&this.l.ping();return this};TextAreaPrototype.focus=function(){var b=this.p;b?b.focus():h(this.e).focus()};TextAreaPrototype.focused=function(){return c&&c===this.el};TextAreaPrototype.parent=function(){return this.e.parentNode};TextAreaPrototype.attr=function(b,a){var c=this.e;if(1===arguments.length)return c.getAttribute(b);null==a?c.removeAttribute(b):c.setAttribute(b,a);return this};
75
- TextAreaPrototype.editable=function(){return!!this.l};TextAreaPrototype.enable=function(){var b=this.p;this.e.removeAttribute("readonly");this.listen();b&&b.enable&&b.enable(this.l);return this};TextAreaPrototype.disable=function(){var b=this.p;this.e.setAttribute("readonly",!0);this.unlisten();b&&b.disable&&b.disable();return this};TextAreaPrototype.listen=function(){var b=this.l;b&&b.kill();this.l=l(this.e);return this};TextAreaPrototype.unlisten=function(){var b=this.l;b&&(b.kill(),this.l=null);
76
- return this};TextAreaPrototype.setInvs=function(b,a){var c=this.i||!1;if(a||c!==b)this._i&&(this._i.kill(),delete this._i),(c=this.p)?c.invs&&c.invs(b):b&&(this._i=m.require("$49","mirror.js").init(this.e)),this.i=b;return this};TextAreaPrototype.getInvs=function(){return this.i||!1};TextAreaPrototype.setMode=function(b){var a=this.p,e=this.i||!1;b!==(this.m||"")&&(this.m=b,a&&a.kill(),this.p=a="code"===b?m.require("$16","ace.js").init(this.e,this.l,this["%"]):"html"===b?m.require("$50","mce.js").init(this.e,
77
- this.l):null,this.setInvs(e,!0),c&&this.focus());return this};TextAreaPrototype.setStrf=function(b){this["%"]=b;"code"===this.m&&this.p.strf(b);return this};TextAreaPrototype.name=function(b){this.e.setAttribute("name",b);return this};TextAreaPrototype.placeholder=function(b){this.e.setAttribute("placeholder",b);return this};TextAreaPrototype.redraw=function(){var b=this.p;b&&b.resize&&b.resize()};TextAreaPrototype=null;return f}({},v,w));m.register("$47",function(f,d,m){function l(a){var b=d.console;
78
- b&&b.error&&b.error(a)}function g(a){var b=m.createElement("div");a&&b.setAttribute("class",a);return b}function c(a){return function(){a.resize();return this}}function b(a){return function(b){for(var c=b.target,e=c.$index;null==e&&"DIV"!==c.nodeName&&(c=c.parentElement);)e=c.$index;null!=e&&(b.stopImmediatePropagation(),a.select(e));return!0}}function a(a){return function(){a.redrawDirty()&&a.redraw();return!0}}function e(a){return function(b){var c;c=b.keyCode;if(40===c)c=1;else if(38===c)c=-1;
79
- else return!0;if(b.shiftKey||b.ctrlKey||b.metaKey||b.altKey)return!0;a.selectNext(c);b.stopPropagation();b.preventDefault();return!1}}function p(a,b,c){function e(a){l("row["+a+"] disappeared");return{cellVal:function(){return""}}}return function(d){var g=b||0,k=c?-1:1,x=a.rows||[];d.sort(function(a,b){return k*(x[a]||e(a)).cellVal(g).localeCompare((x[b]||e(b)).cellVal(g))})}}function n(a){this.w=a}function k(a){this.t=a;this.length=0}function y(a,b,c){var e=m.createElement("div");e.className=c||
80
- "";this._=e;this.d=b||[];this.i=a||0;this.length=b.length}function z(a){this.live=a;this.rows=[]}f.create=function(a){return new n(a)};var q=n.prototype;q.init=function(d){var k=this.w,p=k.id,n=k.splity(p+"-thead",p+"-tbody"),f=n[0],n=n[1],B=[],u=[],x=[],F=[];if(d)this.ds=d,this.idxs=u,this._idxs=null;else if(!(d=this.ds))throw Error("No datasource");f.css.push("wg-thead");n.css.push("wg-tbody");d.eachCol(function(a,b,c){x[a]=p+"-col-"+b;F[a]=c||b});for(var N=g(),q=-1,z=x.length,l=g("wg-cols"),m=
81
- f.splitx.apply(f,x);++q<z;)m[q].header(F[q]),l.appendChild(N.cloneNode(!1)).setAttribute("for",x[q]);d.eachRow(function(a,b,c){B[a]=new y(a,b,c);u[a]=a});this.rows=B;this.cols=l;this.ww=null;this.root=N=n.body;this.head=f;f.redraw=c(this);f=n.fixed=m[0].bodyY()||20;k.lock().resize(f,n);k.css.push("is-table");k.restyle();this.sc?this._re_sort(z):d.sort&&d.sort(u);this.redrawDirty();this.render();h(N).attr("tabindex","-1").on("keydown",e(this)).on("mousedown",b(this)).on("scroll",a(this));return this};
82
- q.clear=function(){for(var a=this.pages||[],b=a.length;0!==b--;)a[b].destroy();this.pages=[];this.sy=this.mx=this.mn=this.vh=null;void 0;return this};q.render=function(){for(var a,b,c=[],e=this.rows||[],d=-1,k,g=this.idxs,x=g.length,p=this.idxr={},n=this.r,f=this._r,h=this.root,y=this.cols;++d<x;){0===d%100&&(a=y.cloneNode(!0),b=new z(a),b.h=2200,b.insert(h),c.push(b));k=g[d];p[k]=d;a=e[k];if(null==a)throw Error("Render error, no data at ["+k+"]");a.page=b;b.rows.push(a)}b&&100!==b.size()&&b.sleepH(22);
83
- this.pages=c;this.mx=this.mn=null;this.redrawDirty();this.redraw();null==n?null!=f&&(a=e[f])&&a.page&&(delete this._r,this.select(f,!0)):(a=e[n])&&a.page?this.select(n,!0):(this.deselect(),this._r=n);return this};q.resize=function(){var a=-1,b=this.ww||(this.ww=[]),c=this.w,e=c.cells[0],d=e.body.childNodes,k=d.length,g=this.pages||[],x=g.length;for(c.redraw.call(e);++a<k;)b[a]=d[a].style.width;if(x){c=this.mx;for(a=this.mn;a<=c;a++)g[a].widths(b);this.redrawDirty()&&this.redraw()}};q.redrawDirty=
84
- function(){var a=!1,b=this.root,c=b.scrollTop,b=b.clientHeight;this.sy!==c&&(a=!0,this.sy=c);this.vh!==b&&(a=!0,this.vh=b);return a};q.redraw=function(){for(var a=0,b=-1,c=null,e=null,d=this.ww,k=this.sy,g=this.vh,x=this.mn,n=this.mx,p=Math.max(0,k-100),k=g+k+100,f=this.pages||[],h=f.length;++b<h&&!(a>k);)g=f[b],a+=g.height(),a<p||(null===c&&(c=b),e=b,g.rendered||g.render(d));if(x!==c){if(null!==x&&c>x)for(b=x;b<c;b++){g=f[b];if(!g)throw Error("Shit!");g.rendered&&g.sleep()}this.mn=c}if(n!==e){if(null!==
85
- n&&e<n)for(b=n;b>e;b--)g=f[b],g.rendered&&g.sleep();this.mx=e}};q.selected=function(){return this.r};q.thead=function(){return this.w.cells[0]};q.tbody=function(){return this.w.cells[1]};q.tr=function(a){return(a=this.row(a))?a.cells():[]};q.row=function(a){return this.rows[a]};q.td=function(a,b){return this.tr(a)[b]};q.next=function(a,b,c){null==c&&(c=this.r||0);var e=this.idxs,d=e.length,g=(this.idxr||{})[c];for(c=g;c!==(g+=a)&&!(0<=g&&d>g);)if(b&&d)g=1===a?-1:d,b=!1;else return null;c=e[g];return null==
86
- c||null==this.rows[c]?(l("Bad next: ["+g+"] does not map to data row"),null):c};q.selectNext=function(a,b,c){a=this.next(a,b);null!=a&&this.r!==a&&this.select(a,c);return this};q.deselect=function(a){var b=this.r;null!=b&&(this.r=null,h(this.tr(b)).removeClass("selected"),this.w.fire("wgRowDeselect",[b,a]));return this};q.selectRow=function(a,b){return this.select(this.idxs[a])};q.select=function(a,b){var c=this.rows[a],e=c&&c.page;if(!e)return this.deselect(!1),l("Row is filtered out"),this;this.deselect(!0);
87
- var d,g=this.w.cells[1];e.rendered||(d=e.top(),g.scrollY(d),this.redrawDirty()&&this.redraw());if(!c.rendered)return e.rendered||l("Failed to render page"),l("Row ["+c.i+"] not rendered"),this;e=c.cells();h(e).addClass("selected");this.r=a;b||(d=g.scrollY(),h(this.root).focus(),d!==g.scrollY()&&g.scrollY(d));g.scrollTo(e[0],!0);this.w.fire("wgRowSelect",[a,c.data()]);return this};q.unfilter=function(){this._idxs&&(this.idxs=this._sort(this._idxs),this._idxs=null,this.clear().render());return this};
88
- q.filter=function(a){this._idxs||(this._idxs=this.idxs);this.idxs=this._sort(a);return this.clear().render()};q.each=function(a){for(var b,c=-1,e=this.rows||[],d=this.idxs||[],g=d.length;++c<g;)b=d[c],a(e[b],c,b);return this};q.sortable=function(a){var b=this.sc||(this.sc=new k(this));b.has(a)||b.add(a);return this};q._re_sort=function(a){var b=-1,c=this.sc,e=c.active;for(this.sc=c=new k(this);++b<a;)c.add(b);e&&(b=this.head.indexOf(e.id),-1===b&&(b=Math.min(e.idx,a-1)),this.sort(b,e.desc));return this};
89
- q._sort=function(a,b){b?(this.s=b,b(a)):(b=this.s)&&b(a);return a};q.sort=function(a,b){this._sort(this.idxs,p(this,a,b));this.sc.activate(a,b);return this};q=null;q=k.prototype;q.has=function(a){return null!=this[a]};q.add=function(a){var b=this,c=b.t.head.cells[a];b[a]={desc:null,idx:a,id:c.id};b.length++;c.addClass("wg-sortable").on("click",function(c){if("header"===c.target.nodeName.toLowerCase())return c.stopImmediatePropagation(),b.toggle(a),!1});return b};q.toggle=function(a){this.t.sort(a,
90
- !this[a].desc).clear().render();return this};q.activate=function(a,b){var c,e;c=this.active;var d=this[a],g=this.t.head.cells;c&&(e=g[c.idx])&&(e.removeClass(c.css),c!==d&&e.restyle());(e=g[a])?(d.desc=b,this.active=d,c="wg-"+(b?"desc":"asc"),e.addClass(c).restyle(),d.css=c):this.active=null;return this};q=null;q=y.prototype;q.render=function(a){var b,c=[],e=this._,d=this.length;if(e){for(this.c=c;0!==d--;)b=e.cloneNode(!1),c[d]=this.update(d,b),b.$index=this.i,a[d].appendChild(b);this._=null}else for(c=
91
- this.c;0!==d--;)a[d].appendChild(c[d]);this.rendered=!0;return this};q.update=function(a,b){var c=b||this.c[a]||{},e=(this.d[a]||function(){})()||"\u00a0";null==e.innerHTML?c.textContent=e:c.innerHTML=e.innerHTML;return c};q.cells=function(){return this.c||[this._]};q.data=function(){for(var a=-1,b=[],c=this.length;++a<c;)b[a]=this.cellVal(a);return b};q.destroy=function(){this.page=null;this.rendered=!1};q.cellVal=function(a){a=this.d[a]()||"";return String(a.textContent||a)};q=null;q=z.prototype;
92
- q.size=function(){return this.rows.length};q.insert=function(a){var b=this.h,c=g("wg-dead");c.style.height=String(b)+"px";a.appendChild(c);return this.dead=c};q.top=function(){return(this.rendered?this.live:this.dead).offsetTop};q.height=function(){var a=this.h;null==a&&(this.h=a=this.rendered?this.live.firstChild.offsetHeight:this.dead.offsetHight);a||l("row has zero height");return a};q.render=function(a){for(var b,c=-1,e=this.rows,d=e.length,g=this.dead,k=this.live,x=k.childNodes;++c<d;)b=e[c],
93
- b.rendered||b.render(x);d=a.length;for(c=0;c<d;c++)x[c].style.width=a[c];g.parentNode.replaceChild(k,g);this.rendered=!0;this.h=null;return this};q.sleep=function(){var a=this.height(),b=this.live,c=this.dead;c.style.height=String(a)+"px";b.parentNode.replaceChild(c,b);this.rendered=!1;this.h=a;return this};q.sleepH=function(a){a*=this.rows.length;var b=this.dead;b&&(b.style.height=String(a)+"px");this.rendered||(this.h=a);return this};q.widths=function(a){for(var b=this.live.childNodes,c=a.length;0!==
94
- c--;)b[c].style.width=a[c];return this};q.destroy=function(){var a=this.rendered?this.live:this.dead,b=this.rows,c=b.length;for(a.parentNode.removeChild(a);0!==c--;)b[c].destroy()};q=null;return f}({},v,w));m.register("$38",function(f,d,E){function l(a,b){var c=a.id,e=c&&r[c],d=e&&e.parent();if(!e||!d)return null;var g=d.dir===q,c=g?"X":"Y",k="page"+c,g=g?z:y,n=g(d.el),c=b["offset"+c],p=d.el,f=p.className;null==c&&(c=b[k]-g(a));c&&(n+=c);p.className=f+" is-resizing";return{done:function(){p.className=
95
- f},move:function(a){d.resize(a[k]-n,e);return!0}}}function g(a,c){function e(){h(E).off("mousemove",d);s&&(s.done(),s=null);return!0}function d(a){s?s.move(a):e();return!0}if(s)return!0;s=l(a.target,a);if(!s)return!0;h(E).one("mouseup",e).on("mousemove",d);return b(a)}function c(a,b){var c=b.type;"touchmove"===c?s&&s.move(b):"touchstart"===c?s=l(a.target,b):"touchend"===c&&s&&(s.done(),s=null)}function b(a){a.stopPropagation();a.preventDefault();return!1}function a(a){var b=D;b&&b.redraw();a&&a.redraw();
96
- return D=a}function e(b,c){var e=h(c).on("editFocus",function(){e.trigger("wgFocus",[a(b)])}).on("editBlur",function(){e.trigger("wgBlur",[a(null)])})}function p(a){var b=a.id,c=a.className;this.id=b;this.el=a;this.pos=this.index=0;this.css=[c||"wg-root","wg-cell"];this._cn=c;r[b]=this;this.clear()}var n=m.include("$44","html.js")||m.include("$2","html.js",!0),k=m.require("$21","dom.js"),y=k.top,z=k.left,q=1,r={},D,s=!1;f.init=function(a){var b=new p(a);b.redraw();m.require("$45","touch.js").ok(function(b){b.dragger(a,
97
- c)});h(a).on("mousedown",g);return b};d=p.prototype;d.fire=function(a,b){var c=h.Event(a);c.cell=this;h(this.el).trigger(c,b);return this};d.each=function(a){for(var b=-1,c=this.cells,e=c.length;++b<e;)a(c[b],b);return this};d.indexOf=function(a){return(a=r[a.id||String(a)])&&a.pid===this.id?a.index:-1};d.on=function(){return this.$("on",arguments)};d.off=function(){return this.$("off",arguments)};d.find=function(a){return h(this.el).find(a)};d.$=function(a,b){h.fn[a].apply(h(this.el),b);return this};
98
- d.addClass=function(a){this.css.push(a);return this};d.removeClass=function(a){a=this.css.indexOf(a);-1!==a&&this.css.splice(a,1);return this};d.parent=function(){return this.pid&&r[this.pid]};d.splitx=function(){return this._split(q,arguments)};d.splity=function(){return this._split(2,arguments)};d._split=function(a,b){(this.length||this.field)&&this.clear();for(var c=-1,e,d=b.length,g=1/d,n=0;++c<d;){e=k.el();this.body.appendChild(e);for(var f=e,h=b[c],y=h,q=1;r[h];)h=y+"-"+ ++q;f.id=h;e=new p(e);
99
- e.index=c;e.pid=this.id;e._locale(this.lang,this.rtl);e.pos=n;n+=g;this.cells.push(e);this.length++}this.dir=a;this.redraw();return this.cells};d.destroy=function(){this.clear();delete r[this.id];var a=this.el;a.innerHTML="";this.body=null;a.className=this._cn||"";h(a).off();return this};d.exists=function(){return this===r[this.id]};d.clear=function(){for(var a=this.el,b=this.cells,c=this.field,e=this.body,d=this.nav,g=this.length||0;0!==g--;)delete r[b[g].destroy().id];this.cells=[];this.length=
100
- 0;d&&(a.removeChild(d),this.nav=null);e&&(c&&(n.ie()&&h(e).triggerHandler("blur"),c.destroy(),this.field=null),this.table&&(this.table=null),a===e.parentNode&&a.removeChild(e));this.body=a.appendChild(k.el("","wg-body"));this._h=null;return this};d.resize=function(a,b){if(!b&&(b=this.cells[1],!b))return;var c=b.index,e=this.cells,d=h(this.el)[this.dir===q?"width":"height"](),g=e[c+1],c=e[c-1];pad=(b.body||b.el.firstChild).offsetTop||0;max=(g?g.pos*d:d)-pad;min=c?c.pos*d:0;b.pos=Math.min(max,Math.max(min,
101
- a))/d;this.redraw();return this};d.distribute=function(a){for(var b=-1,c=0,e,d=this.cells,g=a.length;++b<g&&(e=d[++c]);)e.pos=Math.max(0,Math.min(1,a[b]));this.redraw();return this};d.distribution=function(){for(var a=[],b=0,c=this.cells,e=c.length-1;b<e;)a[b]=c[++b].pos;return a};d.restyle=function(){var a=this.css.concat();0===this.index?a.push("first"):a.push("not-first");this.dir&&(a.push("wg-split"),2===this.dir?a.push("wg-split-y"):a.push("wg-split-x"));this.t&&a.push("has-title");this.nav&&
102
- a.push("has-nav");this.field&&(a.push("is-field"),this.field.editable()?a.push("is-editable"):a.push("is-readonly"));a=a.join(" ");a!==this._css&&(this._css=a,this.el.className=a);return this};d.redraw=function(a){this.restyle();var b=this.el,c=this.body,e=this.field;if(c){var d,g=b.clientWidth||0,k=b.clientHeight||0,n=c.offsetTop||0,k=n>k?0:k-n;this._h!==k&&(this._h=k,c.style.height=String(k)+"px",d=e);this._w!==g&&(this._w=g,d=e);d&&d.redraw()}c=this.length;g=1;k=this.nav;for(n=2===this.dir?"height":
103
- "width";0!==c--;)e=this.cells[c],k?d=1:(e.fixed&&(e.pos=e.fixed/h(b)[n]()),d=g-e.pos,g=e.pos),e.el.style[n]=String(100*d)+"%",e.redraw(a);return this};d.contents=function(a,b){var c=this.el,e=this.body;if(null==a)return e.innerHTML;this.length?this.clear():e&&(c.removeChild(e),e=null);e||(this.body=e=c.appendChild(k.el("",b||"wg-content")),this._h=null,(c=this.lang)&&this._locale(c,this.rtl,!0));"string"===typeof a?h(e)._html(a):a&&this.append(a);this.redraw();return this};d.textarea=function(a,b){var c=
104
- this.field;if(c){var d=c.editable();c.reload(a,b);d!==b&&this.restyle()}else this.length&&this.clear(),d=k.el("textarea"),d.setAttribute("wrap","virtual"),d.value=a,this.contents(d),c=m.require("$46","field.js")._new(d)[b?"enable":"disable"](),e(this,d),this.field=c,this.restyle();this.lang||this.locale("en");return c};d.locale=function(a){a=m.require("$36","locale.js").cast(a);return this._locale(String(a),a.isRTL())};d._locale=function(a,b,c){var e=this.body;if(c||a!==this.lang)this.lang=a,e&&e.setAttribute("lang",
105
- a);if(c||b!==this.rtl)this.rtl=b,e&&e.setAttribute("dir",b?"RTL":"LTR");return this};d.editable=function(){var a=this.field;if(a)return a.editable()?a:null;var b=this.cells,c=b.length,e=this.navigated();if(null!=e)return b[e].editable();for(;++e<c;){for(e=0;e<c;c++);if(a=b[e].editable())return a}};d.eachTextarea=function(a){var b=this.field;b?a(b):this.each(function(b){b.eachTextarea(a)});return this};d.append=function(a){a&&(a.nodeType?n.init(this.body.appendChild(a)):n.init(h(a).appendTo(this.body)));
106
- return this};d.prepend=function(a){var b=this.body;if(a.nodeType){var c=b.firstChild;n.init(c?b.insertBefore(a,c):b.appendChild(a))}else n.init(h(a).prependTo(b));return this};d.before=function(a){var b=this.body;a.nodeType?n.init(this.el.insertBefore(a,b)):n.init(h(a).insertBefore(b));return this};d.header=function(a,b){if(null==a&&null==b)return this.el.getElementsByTagName("header")[0];this.t=k.txt(a||"");this.el.insertBefore(k.el("header",b),this.body).appendChild(this.t);this.redraw();return this};
107
- d.title=function(a){var b=this.t;if(b)return b.nodeValue=a||"",b;this.header(a);return this.t};d.titled=function(){var a=this.t;return a&&a.nodeValue};d.bodyY=function(){return y(this.body,this.el)};d.scrollY=function(a){if(J===a)return this.body.scrollTop;this.body.scrollTop=a};d.tabulate=function(a){var b=this.table;b?b.clear():b=m.require("$47","wgtable.js").create(this);b.init(a);return this.table=b};d.lock=function(){this.body.className+=" locked";return this};d.scrollTo=function(a,b){var c,
108
- e=this.body;c=e.scrollTop;var d=y(a,e);if(c>d)c=d;else{var g=e.clientHeight,d=d+h(a).outerHeight();if(g+c<d)c=d-g;else return}b?e.scrollTop=c:h(e).stop(!0).animate({scrollTop:c},250)};d.navigize=function(a,c){function e(a){var b=g[a],c=f[a],d=h(b.el).show();c.addClass("active");p=a;y.data("idx",a);b.fire("wgTabSelect",[a]);return d}var d=this,g=d.cells,n=d.nav,p,f=[];n&&d.el.removeChild(n);var n=d.nav=d.el.insertBefore(k.el("nav","wg-tabs"),d.body),y=h(n).on("click",function(a){var c=h(a.target).data("idx");
109
- if(null==c)return!0;if(null!=p){var k=f[p];h(g[p].el).hide();k.removeClass("active")}e(c);d.redraw();return b(a)});null==c&&(c=y.data("idx")||0);d.each(function(b,c){f[c]=h('<a href="#'+b.id+'"></a>').data("idx",c).text(a[c]).appendTo(y);b.pos=0;h(b.el).hide()});e(g[c]?c:0);d.lock();d.redraw();return d};d.navigated=function(){var a=this.nav;if(a)return h(a).data("idx")};d=null;return f}({},v,w));m.register("$24",function(f,d,E){function l(a){var b=[];a&&(a.saved()||b.push("po-unsaved"),a.fuzzy()?
110
- b.push("po-fuzzy"):a.flagged()&&b.push("po-flagged"),a.translation()||b.push("po-empty"),a.comment()&&b.push("po-comment"));return b.join(" ")}function g(a,b,c){b=h(a.title(b).parentNode);var e=b.find("span.lang");c?(c=m.require("$36","locale.js").cast(c),e.length||(e=h("<span></span>").prependTo(b)),e.attr("lang",c.lang).attr("class",c.getIcon()||"lang region region-"+(c.region||"zz").toLowerCase())):(e.remove(),c="en");a.locale(c);return b}function c(a,b,c){b.on("click",function(b){var e=a.fire(c,
111
- [b.target]);e||b.preventDefault();return e})}function b(){this.dirty=0}m.require("$3","number.js");var a="poUpdate",e="changing",p="changed",n=0,k=1,y=2,z=3,q=4,r=5,D,s,A=m.require("$35","string.js").html,v=m.require("$6","string.js").sprintf;f.extend=function(a){return a.prototype=new b};f.localise=function(a){s=a;return f};var B=function(){var a=E.createElement("p");return function(b){a.innerHTML=b.replace("src=","x=");return a.textContent.trim()||b.trim()}}(),u=b.prototype=m.require("$37","abstract.js").init(["getListColumns",
112
- "getListHeadings","getListEntry"],["editable","t"]);u.init=function(){this.localise();this.editable={source:!0,target:!0};this.mode="";this.html=!1;return this};u.localise=function(a){a||(a=s||m.require("$1","t.js").init());var b=[];b[n]=a._x("Source text","Editor")+":";b[z]=a._x("%s translation","Editor")+":";b[q]=a._x("Context","Editor")+":";b[r]=a._x("Comments","Editor")+":";b[k]=a._x("Single","Editor")+":";b[y]=a._x("Plural","Editor")+":";b[6]=a._x("Untranslated","Editor");b[7]=a._x("Translated",
113
- "Editor");b[8]=a._x("Toggle Fuzzy","Editor");b[9]=a._x("Suggest translation","Editor");this.labels=b;this.t=a;return this};u.setRootCell=function(a){function b(a){c.redraw(!0,a);return!0}var c=m.require("$38","wingrid.js").init(a);h(d).on("resize",b);this.redraw=b;h(a).on("wgFocus wgBlur",function(a,b){a.stopPropagation();D=b});this.destroy=function(){c.destroy();h(d).off("resize",b)};this.rootDiv=a;return c};u.$=function(){return h(this.rootDiv)};u.setListCell=function(a){var b=this;b.listCell=a;
114
- a.on("wgRowSelect",function(a,c){b.loadMessage(b.po.row(c));return!0}).on("wgRowDeselect",function(a,c,e){e||b.loadNothing();return!0})};u.setSourceCell=function(a){this.sourceCell=a};u.setTargetCell=function(a){this.targetCell=a};u.next=function(a,b,c){for(var e=this.listTable,d=e.selected(),g=d,k,n=this.po;null!=(d=e.next(a,c,d));){if(g===d){d=null;break}if(b&&(k=n.row(d),k.translated(0)))continue;break}null!=d&&e.select(d,!0);return d};u.current=function(a){var b=this.active;if(null==a)return b;
115
- a?a.is(b)?this.reloadMessage(a):this.loadMessage(a):this.unloadActive();return this};u.getTargetOffset=function(){if(this.active)return this.targetCell&&this.targetCell.navigated()||0};u.getTargetEditable=function(){return this.editable.target&&this.targetCell&&this.targetCell.editable()};u.getSourceEditable=function(){return this.editable.source&&this.sourceCell&&this.sourceCell.editable()};u.getContextEditable=function(){return this.editable.context&&this.contextCell&&this.contextCell.editable()};
116
- u.getFirstEditable=function(){return this.getTargetEditable()||this.getSourceEditable()||this.getContextEditable()};u.searchable=function(a){a&&(this.dict=a,this.po&&this.rebuildSearch());return this.dict&&!0};u.rebuildSearch=function(){var a=-1,b=this.po.rows,c=b.length,e=this.dict;for(e.clear();++a<c;)e.add(a,b[a].toText())};u.filtered=function(){return this.lastSearch||""};u.filter=function(a,b){var c,e=this.listTable,d=this.lastFound,g=this.lastSearch;if(a){if(g===a)return d||0;if(g&&!d&&0===
117
- a.indexOf(g))return 0;c=this.dict.find(a)}this.lastSearch=g=a;this.lastFound=d=c?c.length:this.po.length;c?e.filter(c):e.unfilter();b||this.fire("poFilter",[g,d]);return d};u.countFiltered=function(){return this.lastSearch?this.lastFound:this.po.length};u.unsave=function(a,b){var c=!1;if(a){if(c=a.saved(b))this.dirty++,a.unsave(b),this.fire("poUnsaved",[a,b]);this.markUnsaved(a)}return c};u.markUnsaved=function(a){var b=this.po.indexOf(a);if((b=this.listTable.tr(b))&&b.length){var c=b[0].className;
118
- a=c.replace(/(?:^| +)po-[a-z]+/g,"")+" "+l(a);a!==c&&h(b).attr("class",a)}};u.save=function(a){var b=this.po;if(this.dirty||a)b.each(function(a,b){b.save()}),this.listCell.find("div.po-unsaved").removeClass("po-unsaved"),this.dirty=0,this.fire("poSave");return b};u.fire=function(a,b){var c=this.handle;if(c&&c[a]&&(c=c[a].apply(this,b||[]),!1===c))return!1;c=h.Event(a);this.$().trigger(c,b);return!c.isDefaultPrevented()};u.on=function(a,b){this.$().on(a,b);return this};u.getSorter=function(){return null};
119
- u.reload=function(){var a=this,b,c=a.listCell,e=a.listTable,d=a.po,g=d&&d.locale(),k=g&&g.isRTL(),n=d&&d.length||0;if(!d||!d.row)return c&&c.clear().header("Error").contents("Invalid messages list"),!1;a.targetLocale=g;a.lastSearch&&(a.lastSearch="",a.lastFound=n,a.fire("poFilter",["",n]));e&&(b=e.thead().distribution());a.listTable=e=c.tabulate({eachCol:function(b){var c,e,d=a.getListColumns(),g=a.getListHeadings();for(e in d)c=d[e],b(c,e,g[c])},eachRow:function(b){d.each(function(c,e){b(e.idx,a.getListEntry(e),
120
- l(e))})},sort:a.getSorter()});var p,c=a.getListColumns();for(p in c)e.sortable(c[p]);b&&e.thead().distribute(b);e.tbody().$(k?"addClass":"removeClass",["is-rtl"]);a.fire("poLoad");return!!n};u.load=function(a,b){this.po=a;this.dict&&this.rebuildSearch();this.reload()&&(-1!==b?this.listTable.selectRow(b||0):this.active&&this.unloadActive())};u.pasteMessage=function(a){var b,c=0;this.active===a&&((b=this.sourceCell)&&b.eachTextarea(function(b){b.val(a.source(null,c++))}),(b=this.contextCell)&&b.eachTextarea(function(b){b.val(a.context())}),
121
- b=this.targetCell)&&(c=0,b.eachTextarea(function(b){b.val(a.translation(c++))}));this.updateListCell(a,"source");this.updateListCell(a,"target");return this};u.reloadMessage=function(a){var b=this.sourceCell,c=this.targetCell,e;this.pasteMessage(a);b&&this.setSrcMeta(a,b)&&b.redraw();c&&(e=c.navigated()||0,e=this.setTrgMeta(a,e,c),!b&&this.setSrcMeta(a,c)&&(e=!0),e&&c.redraw());return this};u.setStatus=function(){return null};u.setSrcMeta=function(a,b){var e=[],d,g=!1,k=this.$smeta,n=this.labels,
122
- p=[],f=a.tags(),y=f&&f.length;if(d=a.context())p.push("<span>"+A(n[q])+"</span>"),p.push("<mark>"+A(d)+"</mark>");if(y&&this.getTag)for(p.push("<span>Tagged:</span>");0<=--y;)(d=this.getTag(f[y]))&&p.push('<mark class="tag">'+A(d.mod_name)+"</mark>");p.length&&e.push(p.join(" "));if(this.getMono()&&(d=a.refs())&&(f=d.split(/\s/),y=f.length)){for(p=[];0<=--y;)d=f[y],p.push("<code>"+A(d)+"</code>");e.push('<p class="has-icon icon-file">'+p.join(" ")+"</p>")}(d=a.notes())&&e.push('<p class="has-icon icon-info">'+
123
- A(d,!0)+"</p>");e.length?(k||(k=b.find("div.meta"),k.length||(k=h('<div class="meta"></div>').insertAfter(b.header())),c(this,k,"poMeta"),this.$smeta=k),k.html(e.join("\n")).show(),g=!0):k&&k.text()&&(k.text("").hide(),g=!0);return g};u.setTrgMeta=function(a,b,c){var e=[],d=!1,g=this.$tmeta;b=(a=a.errors(b))&&a.length;var k;if(b)for(k=0;k<b;k++)e.push('<p class="has-icon icon-warn">'+A(a[k],!0)+".</p>");e.length?(g||(g=c.find("div.meta"),g.length||(g=h('<div class="meta"></div>').insertAfter(c.header())),
124
- this.$tmeta=g),g.html(e.join("\n")).show(),d=!0):g&&g.text()&&(g.text("").hide(),d=!0);return d};u.loadMessage=function(b){function c(a,b){var e=b?a.split(" "):a.split(" ",1);a=e[0];"="===a.charAt(0)&&(a=a.substr(1),a=["zero","one","two"][Number(a)]||a);e[0]=a.charAt(0).toUpperCase()+a.substr(1).toLowerCase();return e.join(" ")}function d(a,e){var p=J,h=L[n];a.off();a.titled()!==h&&g(a,h,e||"en");h=!1;s.setSrcMeta(b,a)&&(h=!0);if(b.plural()){var h=-1,q=[],r=[],l=a.id+"-",z=b.sourceForms()||e&&e.plurals||
125
- ["One","Other"],m=z.length;if(2!==m||"="===z[0].charAt(0)&&"=1"!==z[0])for(;++h<m;)q[h]=l+String(h),r[h]=c(z[h])+":";else q=[l+"-0",l+"-1"],r=[L[k],L[y]];a.splity.apply(a,q);a.each(function(a,c){a.header(r[c]).textarea(b.source(null,c),p).setStrf(C).setMode(A).setInvs(B)});a.lock();p&&a.each(function(a,b){f(a,b)})}else h&&a.redraw(),a.textarea(b.source(),p).setStrf(C).setMode(A).setInvs(B),p&&f(a,0)}function f(c,d){c.on(e,function(a,c){b.source(c,d);0===d&&s.updateListCell(b,"source");s.unsave(b,
126
- d)}).on(p,function(){0===d&&s.po.reIndex(b);s.dict&&s.rebuildSearch();s.fire(a,[b])})}function h(a,e,d){M&&a.eachTextarea(function(a){a.ping()});a.off();var k=e.isKnown()&&e.label||"Target",k=v(L[z],k);a.titled()!==k&&g(a,k,e);k=!1;!this.sourceCell&&s.setSrcMeta(b,a)&&(k=!0);s.setTrgMeta(b,d,a)&&(k=!0);s.setStatus(b,d);if(b.pluralized()){var n=[],p=[],f=a.id+"-",y=b.targetForms()||e.plurals||["One","Other"],k=y.length,q=function(a){var b=y[a];p.push(b?c(b,!0):"Form "+a);n.push(f+String(a))};for(b.each(q);(e=
127
- n.length)<k;)q(e);a.splitx.apply(a,n);a.each(function(a,c){var e=M&&!b.disabled(c);a.textarea(b.translation(c),e).setStrf(C).setMode(A).setInvs(B);M&&l(a,c)});a.navigize(p,d||null).on("wgTabSelect",function(c,e){var d=M&&c.cell.editable();d&&d.focus();s.setTrgMeta(b,e,a);s.setStatus(b,e);s.fire("poTab",[e])})}else k&&a.redraw(),a.textarea(b.translation(),M&&!b.disabled(0)).setStrf(C).setMode(A).setInvs(B),M&&l(a,0)}function l(c,d){c.on(e,function(a,c,e){b.translate(c,d);0===d&&s.updateListCell(b,
128
- "target");b.fuzzy(d)?s.fuzzy(!1,b,d):s.unsave(b,d);""===c?(s.fire("poEmpty",[!0,b,d]),s.setStatus(b,d)):""===e&&(s.fire("poEmpty",[!1,b,d]),s.setStatus(b,d))}).on(p,function(){s.dict&&s.rebuildSearch();s.fire(a,[b])})}function m(c){c.off();var d=L[q];c.titled()!==d&&(g(c,d),s.setStatus(null));c.textarea(b.context(),!0).setMode(A).setInvs(B);X&&c.on(e,function(a,c){b.context(c);s.updateListCell(b,"source");s.unsave(b,O)}).on(p,function(){s.po.reIndex(b);s.dict&&s.rebuildSearch();s.fire(a,[b])})}function u(a){var c=
129
- L[r];a.titled()!==c&&g(a,c);a.off().on(e,function(a,c){b.comment(c);s.fire("poComment",[b,c]);s.unsave(b,O)}).textarea(b.comment(),!0)}var s=this,A=s.mode,E=b.isHTML(),B=s.inv||!1,w=this.fmt||null,C=b.format()||null,I=b.is(s.active),O=0,T=s.sourceCell,S=s.targetCell,U=s.contextCell,V=s.commentCell,M=s.editable.target,J=s.editable.source,X=s.editable.context,P=D,Y=s.sourceLocale,W=s.targetLocale,L=s.labels;s.html!==E&&(s.html=E,"code"!==s.mode&&(A=E?"html":"",s.setMode(A)));s.active=b;T&&d(T,Y);U&&
130
- m(U);S&&W&&(O=S.navigated()||0,h(S,W,O));V&&u(V);P&&(P.exists()||(P=P.parent()),(E=P.editable())&&E.focus());w!==C&&(this.fmt=C);I||s.fire("poSelected",[b,O])};u.unloadActive=function(){function a(b){b&&b.text("").hide()}function b(a){a&&a.off().clear()}a(this.$smeta);a(this.$tmeta);b(this.sourceCell);b(this.contextCell);b(this.targetCell);this.commentCell&&this.commentCell.off();this.active&&(this.fire("poDeselected",[this.active]),this.active=null);return this};u.loadNothing=function(){var a,b=
131
- this.t,c=this.mode||"",e=this.inv||!1,d=this.fmt;this.unloadActive();this.setStatus(null);(a=this.commentCell)&&a.textarea("",!1);if(a=this.sourceCell)a.textarea("",!1).setStrf(d).setMode(c).setInvs(e),a.title(b._x("Source text not loaded","Editor")+":");if(a=this.contextCell)a.textarea("",!1).setMode(c).setInvs(e),a.title(b._x("Context not loaded","Editor")+":");if(a=this.targetCell)a.textarea("",!1).setStrf(d).setMode(c).setInvs(e),a.title(b._x("Translation not loaded","Editor")+":");this.fire("poSelected",
132
- [null])};u.updateListCell=function(a,b){var c=this.getListColumns()[b],e=this.po.indexOf(a);(e=this.listTable.row(e))&&e.rendered&&e.update(c)};u.cellText=function(a){return(a=-1!==a.indexOf("<")||-1!==a.indexOf("&")?B(a):a.trim())||"\u00a0"};u.fuzzy=function(a,b,c){b=b||this.active;var e=b.fuzzy(c);!0!==a||e?!1===a&&e&&this.flag(0,b,c)&&this.fire("poFuzzy",[b,!1,c]):this.flag(4,b,c)&&this.fire("poFuzzy",[b,!0,c]);return e};u.flag=function(b,c,e){if(!c){c=this.active;e=this.getTargetOffset();if(null==
133
- e)return null;e&&c.targetForms()&&(e=0)}var d=c.flagged(e);if(null==b)return d;if(d===b||b&&!c.translated(e)||!this.fire("poFlag",[b,d,c,e]))return!1;c.flag(b,e);this.fire(a,[c])&&this.unsave(c,e);this.setStatus(c,e);return!0};u.add=function(b,c){var e,d=this.po.get(b,c);d?e=this.po.indexOf(d):(e=this.po.length,d=this.po.add(b,c),this.load(this.po,-1),this.fire("poAdd",[d]),this.fire(a,[d]));this.lastSearch&&this.filter("");this.listTable.select(e);return d};u.del=function(b){if(b=b||this.active){var c=
134
- this.lastSearch,e=this.po.del(b);null!=e&&(this.unsave(b),this.fire("poDel",[b]),this.fire(a,[b]),this.reload(),this.dict&&this.rebuildSearch(),this.active&&this.active.equals(b)&&this.unloadActive(),this.po.length&&(c&&this.filter(c),this.active||(e=Math.min(e,this.po.length-1),this.listTable.select(e))))}};u.setMono=function(a){return this.setMode(a?"code":this.html?"html":"")};u.setMode=function(a){if(this.mode!==a){this.mode=a;this.callTextareas(function(b){b.setMode(a)});var b=this.active,c=
135
- this.sourceCell;b&&b.refs()&&c&&this.setSrcMeta(b,c)&&c.redraw()}return this};u.getMono=function(){return"code"===this.mode};u.setInvs=function(a){(this.inv||!1)!==a&&(this.inv=a,this.callTextareas(function(b){b.setInvs(a)}),this.fire("poInvs",[a]));return this};u.getInvs=function(){return this.inv||!1};u.callTextareas=function(a){var b=this.targetCell;b&&b.eachTextarea(a);(b=this.contextCell)&&b.eachTextarea(a);(b=this.sourceCell)&&b.eachTextarea(a);return this};u.focus=function(){var a=this.getTargetEditable();
136
- a&&a.focus();return this};u=null;return f}({},v,w));m.register("$13",function(f,d,E){function l(){this.init()._validate();this.sourceLocale={lang:"en",label:"English",plurals:["One","Other"]}}function g(a){a=h('<button type="button" class="button button-small icon icon-'+a+' hastip"></button>');m.require("$12","tooltip.js").init(a);return a}function c(a){return g("cloud").attr("title",a.labels[8]+" (Ctrl-U)").on("click",function(b){b.preventDefault();a.focus().fuzzy(!a.fuzzy())})}function b(a){return g("robot").attr("title",
137
- a.labels[9]+" (Ctrl-J)").on("click",function(b){b.preventDefault();a.fire("poHint")})}d=m.require("$24","base.js");f.init=function(a){var b=new l;a=b.setRootCell(a);var c=a.splity("po-list","po-edit"),d=c[0],g=c[1],c=g.splitx("po-trans","po-comment"),f=c[0],h=c[1].header("Loading.."),c=f.splity("po-source","po-target"),f=c[0].header("Loading.."),c=c[1].header("Loading..");a.distribute([0.34]);g.distribute([0.8]);b.setListCell(d);b.setSourceCell(f);b.setTargetCell(c);b.commentCell=h;b.editable.source=
138
- !1;return b};d=l.prototype=d.extend(l);d.getListHeadings=function(){var a=this.t||{_x:function(a){return a}},b=[a._x("Source text","Editor")];this.targetLocale&&(b[1]=a._x("Translation","Editor"));return b};d.getListColumns=function(){var a={source:0};this.targetLocale&&(a.target=1);return a};d.getListEntry=function(a){var b=this.cellText,c=[function(){var c,d=b(a.source()||""),g=a.context();return g?(c=E.createElement("p"),c.appendChild(E.createElement("mark")).innerText=g,c.appendChild(E.createTextNode("\u00a0"+
139
- d)),c):d}];this.targetLocale&&(c[1]=function(){return b(a.translation()||"")});return c};d.stats=function(){var a=this.po,b=a.length,c=0,d=0,g=0;a.each(function(a,b){b.fuzzy()?g++:b.translated()?c++:d++});return{t:b,p:c.percent(b)+"%",f:g,u:d}};d.unlock=function(){var a=this.targetLocale;this._unlocked||(this.editable={source:!0,context:!0,target:!1},this.po&&this.po.unlock(),this.contextCell=this.targetCell,delete this.targetCell,a&&(this._unlocked=a,delete this.targetLocale,this.reload(),this.fire("poLock",
140
- [!1])),this.active&&this.loadMessage(this.active))};d.lock=function(){var a=this._unlocked;a&&(this.targetLocale=a,delete this._unlocked,this.po&&this.po.lock(a),this.editable={source:!1,context:!1,target:!0},this.targetCell=this.contextCell,delete this.contextCell,this.reload(),this.fire("poLock",[!0,a]),this.active&&this.loadMessage(this.active))};d.locked=function(){return!this._unlocked};d.setStatus=function(a){var e=this.$tnav;if(null==a)e&&(e.remove(),this.$tnav=null);else{e||(this.$tnav=e=
141
- h("<nav></nav>").append(c(this)).append(b(this)).appendTo(this.targetCell.header()));var d=[];a.translated()?a.fuzzy()&&d.push("po-fuzzy"):d.push("po-empty");e.attr("class",d.join(" "))}};d.getSorter=function(){function a(a,c){var d=a.weight(),g=c.weight();return d===g?b(a,c):d>g?-1:1}function b(a,c){return a.hash().localeCompare(c.hash())}var c=this;return function(d){var g=c.po,f=c.locked()?a:b;d.sort(function(a,b){return f(g.row(a),g.row(b))})}};return f}({},v,w));m.register("$14",function(f,d,
142
- m){var l={copy:66,clear:75,save:83,fuzzy:85,next:40,prev:38,enter:13,invis:73,hint:74},g={38:!0,40:!0,73:!0},c={66:function(b,a){var c=a.current();c&&(c.normalize(),a.focus().pasteMessage(c))},75:function(b,a){var c=a.current();c&&(c.untranslate(),a.focus().pasteMessage(c))},85:function(b,a){a.focus().fuzzy(!a.fuzzy())},13:function(b,a){a.getFirstEditable()&&a.next(1,!0,!0)},40:function(b,a){var c=b.shiftKey;a.next(1,c,c)},38:function(b,a){var c=b.shiftKey;a.next(-1,c,c)},73:function(b,a){if(!b.shiftKey)return!1;
143
- a.setInvs(!a.getInvs())}};f.init=function(b,a){function e(a){if(a.isDefaultPrevented()||!a.metaKey&&!a.ctrlKey)return!0;var e=a.which;if(!f[e])return!0;var d=c[e];if(!d)throw Error("command undefined #"+e);if(a.altKey||a.shiftKey&&!g[e]||!1===d(a,b))return!0;a.stopPropagation();a.preventDefault();return!1}var f={};h(a||d).on("keydown",e);return{add:function(a,b){c[l[a]]=b;return this},enable:function(){var a,b;for(b in arguments)a=l[arguments[b]],f[a]=!0;return this},disable:function(){h(a||d).off("keydown",
144
- e);b=a=f=null}}};return f}({},v,w));m.register("$25",function(f,d,h){function l(){this.reIndex([])}f.init=function(){return new l};d=l.prototype;d.reIndex=function(d){for(var c={},b=-1,a=d.length;++b<a;)c[d[b]]=b;this.keys=d;this.length=b;this.ords=c};d.key=function(d,c){if(null==c)return this.keys[d];var b=this.keys[d],a=this.ords[c];if(c!==b){if(null!=a)throw Error("Clash with item at ["+a+"]");this.keys[d]=c;delete this.ords[b];this.ords[c]=d}return d};d.indexOf=function(d){d=this.ords[d];return null==
145
- d?-1:d};d.add=function(d,c){var b=this.ords[d];null==b&&(this.keys[this.length]=d,b=this.ords[d]=this.length++);this[b]=c;return b};d.get=function(d){return this[this.ords[d]]};d.has=function(d){return null!=this.ords[d]};d.del=function(d){this.cut(this.ords[d],1)};d.cut=function(d,c){c=c||1;var b=[].splice.call(this,d,c);this.keys.splice(d,c);this.reIndex(this.keys);return b};d.each=function(d){for(var c=-1,b=this.keys,a=this.length;++c<a;)d(b[c],this[c],c);return this};d.sort=function(d){for(var c=
146
- -1,b=this.length,a,e=this.keys,f=this.ords,n=[];++c<b;)n[c]=[this[c],e[c]];n.sort(function(a,b){return d(a[0],b[0])});for(c=0;c<b;c++)a=n[c],this[c]=a[0],a=a[1],e[c]=a,f[a]=c;return this};d.join=function(d){return[].join.call(this,d)};d=null;return f}({},v,w));m.register("$26",function(f,d,h){function l(d,c){var b=RegExp("^.{0,"+(d-1)+"}["+c+"]"),a=RegExp("^[^"+c+"]+");return function(c,f){for(var n=c.length,k;n>d;){k=b.exec(c)||a.exec(c);if(null==k)break;k=k[0];f.push(k);k=k.length;n-=k;c=c.substr(k)}0!==
147
- n&&f.push(c);return f}}f.create=function(d){function c(a){return k[a]||"\\"+a}var b,a,e=/(?:\r\n|[\r\n\v\f\u2028\u2029])/g,f=/[ \r\n]+/g,n=/[\t\v\f\x07\x08\\\"]/g,k={"\t":"\\t","\v":"\\v","\f":"\\f","\u0007":"\\a","\b":"\\b"};if(null==d||isNaN(d=Number(d)))d=79;0<d&&(b=l(d-3," "),a=l(d-2,"-\u2013 \\.,:;\\?!\\)\\]\\}\\>"));return{pair:function(b,k){if(!k)return b+' ""';k=k.replace(n,c);var f=0;k=k.replace(e,function(){f++;return"\\n\n"});if(!(f||d&&d<k.length+b.length+3))return b+' "'+k+'"';var p=
148
- [b+' "'],h=k.split("\n");if(a)for(var l=-1,m=h.length;++l<m;)a(h[l],p);else p=p.concat(h);return p.join('"\n"')+'"'},prefix:function(a,b){var c=a.split(e);return b+c.join("\n"+b)},refs:function(a){a=a.replace(f," ",a);b&&(a=b(a,[]).join("\n#: "));return"#: "+a}}};return f}({},v,w));m.register("$39",function(f,d,h){function l(){this.length=0}f.init=function(){return new l};d=l.prototype;d.push=function(d){this[this.length++]=d;return this};d.sort=function(d){[].sort.call(this,d);return this};d.each=
149
- function(d){for(var c=-1,b=this.length;++c<b;)d(c,this[c]);return this};return f}({},v,w));m.register("$27",function(f,d,h){function l(){}f.extend=function(d){return d.prototype=new l};d=l.prototype=m.require("$37","abstract.js").init(["add","load"]);d.row=function(d){return this.rows[d]};d.lock=function(d){return this.locale(d||{lang:"zxx",label:"Unknown",nplurals:1,pluraleq:"n!=1"})};d.unlock=function(){var d=this.loc;this.loc=null;return d};d.locale=function(d){null==d?d=this.loc:this.loc=d=m.require("$36",
150
- "locale.js").cast(d);return d};d.each=function(d){this.rows.each(d);return this};d.indexOf=function(d){"object"!==typeof d&&(d=this.get(d));if(!d)return-1;null==d.idx&&(d.idx=this.rows.indexOf(d.hash()));return d.idx};d.get=function(d){return this.rows&&this.rows.get(d)};d.has=function(d){return this.rows&&this.rows.has(d)};d.del=function(d){d=this.indexOf(d);if(-1!==d){var c=this.rows.cut(d,1);if(c&&c.length)return this.length=this.rows.length,this.rows.each(function(b,a,c){a.idx=c}),d}};d.reIndex=
151
- function(d,c){var b=this.indexOf(d),a=d.hash(),e=this.rows.indexOf(a);return e===b?b:-1!==e?(c=(c||0)+1,d.source("Error, duplicate "+String(c)+": "+d.source()),this.reIndex(d,c)):this.rows.key(b,a)};d.sort=function(d){this.rows.sort(d);return this};d["export"]=function(){for(var d=-1,c=this.rows,b=c.length,a=m.require("$39","list.js").init();++d<b;)a.push(c[d]);return a};d=null;return f}({},v,w));m.register("$28",function(f,d,h){function l(c,b,a){if(null==a)return c[b]||"";c[b]=a||"";return c}function g(){this._id=
152
- this.id=""}f.extend=function(c){return c.prototype=new g};d=g.prototype;d.flag=function(c,b){var a=this.flg||(this.flg=[]);if(null!=b)a[b]=c;else for(var d=Math.max(a.length,this.src.length,this.msg.length);0!==d--;)a[d]=c;return this};d.flagged=function(c){var b=this.flg||[];if(null!=c)return b[c]||0;for(c=b.length;0!==c--;)if(b[c])return!0;return!1};d.flags=function(){for(var c,b={},a=[],d=this.flg||[],f=d.length;0!==f--;)c=d[f],b[c]||(b[c]=!0,a.push(c));return a};d.flaggedAs=function(c,b){var a=
153
- this.flg||[];if(null!=b)return c===a[b]||0;for(var d=a.length;0!==d--;)if(a[d]===c)return!0;return!1};d.fuzzy=function(c,b){var a=this.flaggedAs(4,c);null!=b&&this.flag(b?4:0,c);return a};d.source=function(c,b){if(null==c)return this.src[b||0]||"";this.src[b||0]=c;return this};d.plural=function(c,b){if(null==c)return this.src[b||1]||"";this.src[b||1]=c||"";return this};d.sourceForms=function(){return this.srcF};d.targetForms=function(){return this.msgF};d.each=function(c){for(var b=-1,a=this.src,
154
- d=this.msg,f=Math.max(a.length,d.length);++b<f;)c(b,a[b],d[b]);return this};d.count=function(){return Math.max(this.src.length,this.msg.length)};d.pluralized=function(){return 1<this.src.length||1<this.msg.length};d.translate=function(c,b){this.msg[b||0]=c||"";return this};d.untranslate=function(c){if(null!=c)this.msg[c]="";else{var b=this.msg,a=b.length;for(c=0;c<a;c++)b[c]=""}return this};d.translation=function(c){return this.msg[c||0]||""};d.errors=function(c){return this.err&&this.err[c||0]||
155
- []};d.translated=function(c){if(null!=c)return!!this.msg[c];var b=this.msg,a=b.length;for(c=0;c<a;c++)if(!b[c])return!1;return!0};d.untranslated=function(c){if(null!=c)return!this.msg[c];var b=this.msg,a=b.length;for(c=0;c<a;c++)if(b[c])return!1;return!0};d.comment=function(c){return l(this,"cmt",c)};d.notes=function(c){return l(this,"xcmt",c)};d.refs=function(c){return l(this,"rf",c)};d.format=function(c){return l(this,"fmt",c)};d.context=function(c){return l(this,"ctx",c)};d.tags=function(){return this.tg};
156
- d.toString=d.toText=function(){return this.src.concat(this.msg,this.id,this.ctx).join(" ")};d.weight=function(){var c=0;this.translation()||(c+=2);this.fuzzy()&&(c+=1);return c};d.equals=function(c){return this===c||this.hash()===c.hash()};d.hash=function(){return this.id};d.normalize=function(){for(var c=this.msg.length;0!==c--;)this.msg[c]=this.src[c]||""};d.disabled=function(c){return!!(this.lck||[])[c||0]};d.disable=function(c){(this.lck||(this.lck=[]))[c||0]=!0;return this};d.saved=function(c){var b=
157
- this.drt;if(null==b)return!0;if(null!=c)return!b[c];for(c=b.length;0!==c--;)if(b[c])return!1;return!0};d.unsave=function(c){(this.drt||(this.drt=[]))[c||0]=!0;return this};d.save=function(c){null==c?this.drt=null:(this.drt||(this.drt=[]))[c]=!1;return this};d.is=function(c){return c&&(c===this||c.idx===this.idx)};d.isHTML=function(c){if(null==c)return this.htm||!1;this.htm=c};d=null;return f}({},v,w));m.register("$15",function(f,d,h){function l(a){return{"Project-Id-Version":"PACKAGE VERSION","Report-Msgid-Bugs-To":"",
158
- "POT-Creation-Date":a||"","PO-Revision-Date":a||"","Last-Translator":"","Language-Team":"",Language:"","Plural-Forms":"","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit"}}function g(a,b){var c=a||"";b&&(c+="\x00"+b);return c}function c(a){var b=d.console;b&&b.error&&b.error(a.message||String(a))}function b(a){return m.require("$26","format.js").create(a)}function a(a){this.locale(a);this.clear();this.head=l(this.now())}function e(a,b){this.src=[a||
159
- ""];this.msg=[b||""]}f.create=function(b){return new a(b)};h=m.require("$27","messages.js").extend(a);h.clear=function(){this.rows=m.require("$25","collection.js").init();this.length=0;return this};h.now=function(){function a(b,c){for(var d=String(b);d.length<c;)d="0"+d;return d}var b=new Date,c=b.getUTCFullYear(),d=b.getUTCMonth()+1,e=b.getUTCDate(),f=b.getUTCHours(),b=b.getUTCMinutes();return a(c,4)+"-"+a(d,2)+"-"+a(e,2)+" "+a(f,2)+":"+a(b,2)+"+0000"};h.header=function(a,b){var c=this.head||(this.head=
160
- {});if(null==b)return this.headers()[a]||"";c[a]=b||"";return this};h.headers=function(a){var b,c=this.now(),d=this.head||(this.head=l(c));if(null!=a){for(b in a)d[b]=a[b];return this}var e=this.locale();a={};for(b in d)a[b]=String(d[b]);e?(a.Language=String(e)||"zxx",a["Language-Team"]=e.label||a.Language,a["Plural-Forms"]="nplurals="+(e.nplurals||"2")+"; plural="+(e.pluraleq||"n!=1")+";",b="PO-Revision-Date"):(a.Language="",a["Plural-Forms"]="nplurals=INTEGER; plural=EXPRESSION;",a["PO-Revision-Date"]=
161
- "YEAR-MO-DA HO:MI+ZONE",b="POT-Creation-Date");a[b]||(a[b]=c);a["X-Generator"]="Loco https://localise.biz/";return a};h.get=function(a,b){var c=g(a,b);return this.rows.get(c)};h.add=function(a,b){a instanceof e||(a=new e(a));b&&a.context(b);var d=a.hash();this.rows.get(d)?c("Duplicate message at index "+this.indexOf(a)):(a.idx=this.rows.add(d,a),this.length=this.rows.length);return a};h.load=function(a){for(var b=-1,d,f,g,h,l,m,s=(g=this.locale())&&g.nplurals||2,A=[];++b<a.length;)d=a[b],null==d.parent?
162
- (f=d.source||d.id,g=d.target||"",h=d.context,f||h?(l=new e(f,g),l._id=d._id,h&&l.context(h),d.flag&&l.flag(d.flag,0),d.comment&&l.comment(d.comment),d.notes&&l.notes(d.notes),d.refs&&l.refs(d.refs),l.format(d.format),d.message=l,this.add(l),d.prev&&d.prev[0]&&(l.prev(d.prev[0].source,d.prev[0].context),d.prev[1]&&l._src.push(d.prev[1].source||""))):0===b&&"object"===typeof g&&(this.head=g,this.headcmt=d.comment)):A.push(d);for(b=-1;++b<A.length;)try{d=A[b];f=d.source||d.id;l=a[d.parent]&&a[d.parent].message;
163
- if(!l)throw Error("parent missing for plural "+f);m=d.plural;1===m&&l.plural(f);m>=s||(d.flag&&l.flag(d.flag,m),l.translate(d.target||"",m),d.format&&!l.format()&&l.format(d.format))}catch(v){c(v)}return this};h.wrap=function(a){this.fmtr=b(a);return this};h.toString=function(){var a,c=this.locale(),d=[],f=[],g=this.headers(),h=!c,l=c&&c.nplurals||2,m=this.fmtr||b();g[c?"PO-Revision-Date":"POT-Creation-Date"]=this.now();for(a in g)f.push(a+": "+g[a]);f=new e("",f.join("\n"));f.comment(this.headcmt||
164
- "");h&&f.fuzzy(0,!0);d.push(f.toString());d.push("");this.rows.each(function(a,b){a&&(d.push(b.cat(m,h,l)),d.push(""))});return d.join("\n")};h=m.require("$28","message.js").extend(e);h.prev=function(a,b){this._src=[a||""];this._ctx=b};h.hash=function(){return g(this.source(),this.context())};h.toString=function(){return this.cat(b())};h.cat=function(a,b,c){var d,e=[],f;(f=this.cmt)&&e.push(a.prefix(f,"# "));(f=this.xcmt)&&e.push(a.prefix(f,"#. "));d=this.rf;if(f=this._id)d+=(d?" ":"")+"loco:"+f;
165
- d&&/\S/.test(d)&&e.push(a.refs(d));!b&&this.fuzzy()&&e.push("#, fuzzy");(f=this.fmt)&&e.push("#, "+f+"-format");(f=this._ctx)&&e.push(a.prefix(a.pair("msgctxt",f),"#| "));if(f=this._src)f[0]&&e.push(a.prefix(a.pair("msgid",f[0]),"#| ")),f[1]&&e.push(a.prefix(a.pair("msgid_plural",f[1]),"#| "));(f=this.ctx)&&e.push(a.pair("msgctxt",f));e.push(a.pair("msgid",this.src[0]));if(null==this.src[1])e.push(a.pair("msgstr",b?"":this.msg[0]));else for(d=-1,e.push(a.pair("msgid_plural",this.src[1])),f=this.msg||
166
- ["",""],c=c||f.length;++d<c;)e.push(a.pair("msgstr["+d+"]",b?"":f[d]||""));return e.join("\n")};h.compare=function(a,b){var c=this.weight(),d=a.weight();if(c>d)return 1;if(c<d)return-1;if(b){c=this.hash().toLowerCase();d=a.hash().toLowerCase();if(c<d)return 1;if(c>d)return-1}return 0};h.copy=function(){var a=new e,b,c;for(b in this)this.hasOwnProperty(b)&&((c=this[b])&&c.concat&&(c=c.concat()),a[b]=c);return a};h=h=null;return f}({},v,w));m.register("$17",function(f,d,m){f.init=function(d,f){function c(){return p||
167
- (p=h('<div id="loco-po-ref"></div>').dialog({dialogClass:"loco-modal loco-modal-wide",modal:!0,autoOpen:!1,closeOnEscape:!0,resizable:!1,height:500}))}function b(a,b,d){a=h("<p></p>").text(d);c().dialog("close").html("").dialog("option","title","Error").append(a).dialog("open")}function a(a){var b=a&&a.code;if(b){for(var d=-1,e=b.length,f=h("<ol></ol>").attr("class",a.type);++d<e;)h("<li></li>").html(b[d]).appendTo(f);f.find("li").eq(a.line-1).attr("class","highlighted");c().dialog("close").html("").dialog("option",
168
- "title",a.path+":"+a.line).append(f).dialog("open")}}function e(a){a=a.target;var b=h(a).find("li.highlighted")[0],b=Math.max(0,(b&&b.offsetTop||0)-Math.floor(a.clientHeight/2));a.scrollTop=b}var p;return{load:function(n){c().html('<div class="loco-loading"></div>').dialog("option","title","Loading..").off("dialogopen").dialog("open").on("dialogopen",e);n=h.extend({ref:n,path:f.popath},f.project||{});d.ajax.post("fsReference",n,a,b)}}};return f}({},v,w));m.register("$30",function(f,d,h){function l(d){this.api=
169
- d;this.chars=0}f.create=function(d){return new l(d)};d=l.prototype;d.init=function(d,c){function b(a){var b={length:0,html:a.html,sources:[]};q.push(b);return r[a.html?1:0]=b}function a(a,d){var g=a.source(null,d);if(g&&(a.untranslated(d)||c)){var q=m[g];if(q)q.push(a);else{var q=g.length,B=e.isHtml(g),B=r[B?1:0],u=B.sources;if(B.length+q>l||u.length===k)B=b(B),u=B.sources;u.push(g);m[g]=[a];B.length+=q;f+=q;h+=1}}}var e=this.api,f=0,h=0,k=50,l=5E3,m={},q=[],r=[];b({html:!1});b({html:!0});d.each(function(b,
170
- c){a(c,0);a(c,1)});r=null;this.map=m;this.chars=f;this.length=h;this.batches=q;this.locale=d.locale()};d.abort=function(){this.state="abort";return this};d.dispatch=function(){function d(a,b){function e(c,d,g){b!==g&&(a===d||1<c&&f.source(null,1)===a)&&(f.translate(b,c),l++,A++);return l}if(!c())return!1;if(!b)return!0;var f,g=m[a]||[],k=g.length,p=-1,l;for(v++;++p<k;)if(f=g[p])l=0,f.each(e),l&&h("each",[f]);return!0}function c(){return"abort"===k.state?(l&&(l.abort(),f()),!1):!0}function b(){var b=
171
- q.shift(),c;b?(c=b.sources)&&c.length?l.batch(c,r,b.html,d).fail(a).always(e):e():f()}function a(){k.abort();f()}function e(){s++;h("prog",[s,B]);c()&&b()}function f(){l=q=null;h("done")}function h(a,b){for(var c=u[a]||[],d=c.length;0<=--d;)c[d].apply(null,b)}var k=this,l=k.api,m=k.map,q=k.batches||[],r=k.locale,v=0,s=0,A=0,w=k.length,B=q.length,u={done:[],each:[],prog:[]};k.state="";b();return{done:function(a){u.done.push(a);return this},each:function(a){u.each.push(a);return this},prog:function(a){u.prog.push(a);
172
- return this},stat:function(){return{todo:function(){return Math.max(w-v,0)},did:function(){return v}}}}};return f}({},v,w));m.register("$40",{nn:["no"]});m.register("$31",function(f,d,h){function l(){}function g(c){c.parseError=function(b){return b&&b.code&&200!==b.code&&b.message?"Error "+b.code+": "+b.message:""};c.batch=function(b,a,d,f){function g(c){for(var d=b.length,e=-1;++e<d&&!1!==f(b[e],c[e]||"",a););}d=d?"html":"plain";var k=this.toLang(a);return c._call({url:"https://translate.yandex.net/api/v1.5/tr.json/translate?format="+
173
- d+"&lang=en-"+k,method:"POST",traditional:!0,data:{key:c.key(),text:b}}).done(function(a,b,d){a&&200===a.code?g(a.text||[]):(c.stderr(c.parseError(a)||c.httpError(d)),g([]))}).fail(function(){g([])})}}f.create=function(c){var b=l.prototype=new c;b.toString=function(){return"Yandex.Translate"};b.getId=function(){return"yandex"};b.getUrl=function(){return"https://translate.yandex.com/"};b.init=function(a){c.prototype.init.call(this,a);/^trnsl\./.test(this.key())&&g(this)};b.toLang=function(a){return this.mapLang(a,
174
- m.require("$40","yandex.json"))};return new l};return f}({},v,w));m.register("$41",{zh:["zh","zh-CN","zh-TW"],he:["iw"],jv:["jw"]});m.register("$32",function(f,d,h){function l(){}f.create=function(d){d=l.prototype=new d;d.toString=function(){return"Google Translate"};d.getId=function(){return"google"};d.getUrl=function(){return"https://translate.google.com/"};d.parseError=function(c){if(c.error){for(var b=[],a=c.error.errors||[],d=a.length,f=-1;++f<d;)b.push(a[f].message||"");return"Error "+c.error.code+
175
- ": "+b.join(";")}return""};d.batch=function(c,b,a,d){function f(a){for(var g=c.length,k=-1,h;++k<g&&(h=a[k]||{},!1!==d(c[k],h.translatedText||"",b)););}var g=this;a=a?"html":"text";var k=g.mapLang(b,m.require("$41","google.json"));return g._call({url:"https://translation.googleapis.com/language/translate/v2?source=en&target="+k+"&format="+a,method:"POST",traditional:!0,data:{key:g.key(),q:c}}).done(function(a,b,c){a.data?f(a.data.translations||[]):(g.stderr(g.parseError(a)||g.httpError(c)),f([]))}).fail(function(){f([])})};
176
- return new l};return f}({},v,w));m.register("$42",{nn:["no"],pt:["pt","pt-pt"],sr:["sr-Cyrl","sr-Latn"],sr_RS:["sr-Cyrl"],tlh:["tlh-Latn","tlh-Piqd"],zh:["zh-Hans","zh-Hant"],zh_CN:["zh-Hans"],zh_HK:["zh-Hans"],zh_SG:["zh-Hans"],zh_TW:["zh-Hant"]});m.register("$33",function(f,d,h){function l(){}f.create=function(d){d=l.prototype=new d;d.toString=function(){return"Microsoft Translator text API"};d.getId=function(){return"microsoft"};d.getUrl=function(){return"https://aka.ms/MicrosoftTranslatorAttribution"};
177
- d.parseError=function(c){return c&&c.error?c.error.message:""};d.batch=function(c,b,a,d){function f(a){for(var g=-1,k;++g<h&&(k=a[g]||{},k=k.translations||[],k=k[0]||{},!1!==d(c[g],k.text||"",b)););}var g=this,k=[],h=c.length,l=-1;a=a?"html":"plain";for(var q=g.mapLang(b,m.require("$42","ms.json"));++l<h;)k.push({text:c[l]});return g._call({url:"https://api.cognitive.microsofttranslator.com/translate?api-version=3.0&from=en&to="+q+"&textType="+a,method:"POST",data:JSON.stringify(k),headers:{"Content-Type":"application/json; charset=UTF-8",
178
- "Ocp-Apim-Subscription-Key":this.key(),"Ocp-Apim-Subscription-Region":g.param("region")||"global"}}).done(function(a,b,c){a&&a.length?f(a):(g.stderr(g.parseError(a)||g.httpError(c)),f([]))}).fail(function(){f([])})};return new l};return f}({},v,w));m.register("$43",{pt:["pt-PT","pt-BR"]});m.register("$34",function(f,d,h){function l(){}f.create=function(d){d=l.prototype=new d;d.toString=function(){return"DeepL Translator"};d.getId=function(){return"deepl"};d.getUrl=function(){return"https://www.deepl.com/translator"};
179
- d.parseError=function(c){return c.message};d.batch=function(c,b,a,d){function f(a){for(var g=c.length,k=-1,h;++k<g&&(h=a[k]||{},!1!==d(c[k],h.text||"",b)););}var g=this;a=g.mapLang(b,m.require("$43","deepl.json"));var k=b.tone,h="default";null==k&&(k=String(b.variant||"").toLowerCase());"formal"===k?h="more":"informal"===k&&(h="less");return g._call({url:"https://api.deepl.com/v2/translate",method:"POST",traditional:!0,data:{source_lang:"EN",target_lang:a.toUpperCase(),formality:h,preserve_formatting:"1",
180
- auth_key:g.key(),text:c}}).done(function(a,b,c){a.translations?f(a.translations):(g.stderr(g.parseError(a)||g.httpError(c)),f([]))}).fail(function(){f([])})};return new l};return f}({},v,w));m.register("$18",function(f,d,v){function l(){this.inf={}}function g(){var a=v.createElement("p"),b=/&(#\d+|#x[0-9a-f]|[a-z]+);/i,c=/<[a-z]+\s/i,d,f;return{sniff:function(g){if(g===d)return f;d=g;if(b.test(g)||c.test(g))if(a.innerHTML=g,a.textContent!==g)return f=!0;return f=!1}}}var c=l.prototype;c.init=function(a){this.inf=
181
- a||{}};c.param=function(a){return this.inf[a]||""};c.key=function(){return this.param("key")};c.getId=function(){return this.param("id")||"none"};c.getUrl=function(){return this.param("url")||"#"};c.toString=function(){return this.param("name")||this.getId()};c.stderr=function(a){var b=(d.loco||{}).notices||d.console;b&&b.error&&b.error(String(this)+": "+String(a))};c.httpError=function(a){return(a=a&&a.status)&&200!==a?"Responded status "+a:"Unknown error"};c.parseError=function(){return""};c.mapLang=
182
- function(a,b){var c=String(a).replace("-","_"),d=a.lang,f=b[c]||b[d]||[],g=f.length;if(0===g)return d;if(1<g)for(var c=c.toLowerCase(),d=-1,h;++d<g;)if(h=f[d],h.toLowerCase().replace("-","_")===c)return h;return f[0]};c.toLang=function(a){return String(a)};c.translate=function(a,b,c){return this.batch([a],b,this.isHtml(a),c)};c._call=function(a){var b=this;b.state=null;a.cache=!0;a.dataType="json";a.error=function(a,c,d){try{var f=a.responseText,g=f&&m.require("$5","json.js").parse(f);d=g&&b.parseError(g)||
183
- d}catch(h){}b.stderr(d||b.httpError(a))};return b.abortable(h.ajax(a))};c.abortable=function(a){var b=this;a.always(function(){b.$r===a&&(b.$r=null)});return b.$r=a};c.abort=function(){var a=this.$r;a&&a.abort()};c.isHtml=function(a){return(b||(b=g())).sniff(a)};c.createJob=function(){return m.require("$30","job.js").create(this)};c.batch=function(a,b,c,f){function g(c){for(var d=a.length,k=-1;++k<d&&!1!==f(a[k],c[k],b););}var l=d.loco.ajax;c={hook:this.getId(),type:c?"html":"text",locale:this.toLang(b),
184
- sources:a};var m=h.Deferred();this.abortable(l.post("apis",c,function(a){g(a&&a.targets||[]);m.resolve()},function(){g([]);m.reject()}));return m.promise()};f.create=function(a){var b;b=a.id;b="yandex"===b?m.require("$31","yandex.js").create(l):"google"===b?m.require("$32","google.js").create(l):"microsoft"===b?m.require("$33","ms.js").create(l):"deepl"===b?m.require("$34","deepl.js").create(l):new l;b.init(a);return b};f.suggest=function(a,b,c,d){var f,g,h=a.length;for(f=0;f<h;f++)g=a[f],g.translate(b,
185
- c,d)};var b;return f}({},v,w));m.register("$19",function(f,d,m){f.init=function(f){function g(){H||(I.on("click",k),H=h('<div id="loco-fs-creds"></div>').dialog({dialogClass:"request-filesystem-credentials-dialog loco-modal",minWidth:580,modal:!0,autoOpen:!1,closeOnEscape:!0}).on("change",'input[name="connection_type"]',function(){this.checked&&h("#ssh-keys").toggleClass("hidden","ssh"!==h(this).val())}));return H}function c(){R&&(b(h(s)),R=!1);if(B&&J){var a=J,c=h(Q);c.find("span.loco-msg").text(a);
186
- K||(c.removeClass("jshide").hide().fadeIn(500),K=!0)}else K&&(b(h(Q)),K=!1)}function b(a){a.slideUp(250).fadeOut(250,function(){h(this).addClass("jshide")})}function a(){if(B)return H&&H.dialog("close"),c(),h(f).find('button[type="submit"]').attr("disabled",!1),h(d).triggerHandler("resize"),w&&w(!0),!0;x&&H?(R||(h(s).removeClass("jshide").hide().fadeIn(500),R=!0),K&&(b(h(Q)),K=!1)):c();h(f).find('input[type="submit"]').attr("disabled",!0);w&&w(!1);return!1}function e(a){var b,c,d=r||{};for(b in d)d.hasOwnProperty(b)&&
187
- (c=d[b],a[b]?a[b].value=c:h('<input type="hidden" />').attr("name",b).appendTo(a).val(c))}function p(a){a.preventDefault();a=h(a.target).serializeArray();q(a);C=!0;return!1}function n(a){a.preventDefault();H.dialog("close");return!1}function k(a){a.preventDefault();H.dialog("open").find('input[name="connection_type"]').change();return!1}function y(b){B=b.authed;A=b.method;h(s).find("span.loco-msg").text(b.message||"Something went wrong.");J=b.warning||"";b.notice&&u.notices.info(b.notice);if(B)"direct"!==
188
- A&&(r=b.creds,e(f),C&&b.success&&u.notices.success(b.success)),a();else if(b.reason)u.notices.info(b.reason);else if(b=b.prompt){var c=g();c.html(b).find("form").on("submit",p);c.dialog("option","title",c.find("h2").remove().text());c.find("button.cancel-button").show().on("click",n);c.find('input[type="submit"]').addClass("button-primary");a();h(d).triggerHandler("resize")}else u.notices.error("Server didn't return credentials, nor a prompt for credentials")}function v(){a()}function q(a){C=!1;u.ajax.setNonce("fsConnect",
189
- N).post("fsConnect",a,y,v);return a}var r,w,s=f,A=null,C=!1,B=!1,u=d.loco,x=f.path.value,F=f.auth.value,N=f["loco-nonce"].value,I=h(s).find("button.button-primary"),Q=m.getElementById(s.id+"-warn"),R=!1,K=!1,J="",H;u.notices.convert(Q).stick();f.connection_type?(r={},r.connection_type=f.connection_type.value,B=!0):x&&F&&q({path:x,auth:F});a();return{applyCreds:function(a){if(a.nodeType)e(a);else{var b,c=r||{};for(b in c)c.hasOwnProperty(b)&&(a[b]=c[b])}return this},setForm:function(b){f=b;a();e(b);
190
- return this},connect:function(){x=f.path.value;F=f.auth.value;q(h(f).serializeArray());return this},listen:function(a){w=a;B&&a(!0);return this},authed:function(){return B}}};return f}({},v,w));m.register("$20",function(f,d,v){function l(d,f,h,k){f="n"===h?c(f):b(f);k&&(f=a(f));return g([].sort,[f])(d)}function g(a,b){return function(c){a.apply(c,b);return c}}function c(a){return function(b,c){var d=b&&b[a]||0,f=c&&c[a]||0;return d===f?0:d>f?1:-1}}function b(a){return function(b,c){return(b&&b[a]||
191
- "").localeCompare(c&&c[a]||"")}}function a(a){return function(b,c){return-1*a(b,c)}}f.init=function(a){function b(a){var c=-1,d=a.length;for(h("tr",s).remove();++c<d;)s.appendChild(a[c].$)}function c(a){q=a?C.find(a,d):d.slice(0);v&&(a=f[v],q=l(q,v,a.type,a.desc));b(q)}var d=[],f=[],g=0,q,r,v,s=a.getElementsByTagName("tbody")[0],w=a.getElementsByTagName("thead")[0],C=m.require("$10","fulltext.js").init();w&&s&&(h("th",w).each(function(a,c){var e=c.getAttribute("data-sort-type");e&&(a=g,h(c).addClass("loco-sort").on("click",
192
- function(c){c.preventDefault();c=a;var e=f[c],g=e.type,m=!(e.desc=!e.desc);q=l(q||d.slice(0),c,g,m);b(q);r&&r.removeClass("loco-desc loco-asc");r=h(e.$).addClass(m?"loco-desc":"loco-asc").removeClass(m?"loco-asc":"loco-desc");v=c;return!1}),f[g]={$:c,type:e});c.hasAttribute("colspan")?g+=Number(c.getAttribute("colspan")):g++}),h("tr",s).each(function(a,b){var c,e,g,h=[],l={_:a,$:b},m=b.getElementsByTagName("td");for(e in f){c=m[e];(g=c.textContent.replace(/(^\s+|\s+$)/g,""))&&h.push(g);c.hasAttribute("data-sort-value")&&
193
- (g=c.getAttribute("data-sort-value"));switch(f[e].type){case "n":g=Number(g)}l[e]=g}d[a]=l;C.index(a,h)}),a=h('form.loco-filter input[type="text"]',a.parentNode),a.length&&(a=a[0],w=h(a.form),1<d.length?m.require("$11","LocoTextListener.js").listen(a,c):w.hide(),w.on("submit",function(a){a.preventDefault();return!1})))};return f}({},v,w));var C=v.loco||{},I=C.conf||{$v:[0,0]};v=m.require("$1","t.js").init();w=I.wplang;C.version=function(f){return I.$v[f||0]};m.require("$2","html.js");m.require("$3",
194
- "number.js");m.require("$4","array.js");m.require("$5","json.js");C.l10n=v;v.load(I.wpl10n);w&&v.pluraleq(w.pluraleq);C.string=m.require("$6","string.js");C.notices=m.require("$7","notices.js").init(v);C.ajax=m.require("$8","ajax.js").init(I).localise(v);C.locale=m.require("$9","wplocale.js");C.fulltext=m.require("$10","fulltext.js");C.watchtext=m.require("$11","LocoTextListener.js").listen;C.tooltip=m.require("$12","tooltip.js");C.po={ed:m.require("$13","poedit.js"),kbd:m.require("$14","hotkeys.js"),
195
- init:m.require("$15","po.js").create,ace:m.require("$16","ace.js").strf("php"),ref:m.require("$17","refs.js")};C.apis=m.require("$18","apis.js");C.fs=m.require("$19","fsconn.js");h("#loco-admin.wrap table.wp-list-table").each(function(f,d){m.require("$20","tables.js").init(d)});C.validate=function(f){return"2.5.2"!==(/^\d+\.\d+\.\d+/.exec(f&&f[0]||"")&&RegExp.lastMatch)?(C.notices.warn("admin.js is the wrong version (2.5.2). Please empty all relevant caches and reload this page."),!1):!0}})(window,
196
- document,window.jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function(v, w, h, J) {
2
+ var n = function() {
3
+ function f(d) {
4
+ throw Error("Failed to require " + d);
5
+ }
6
+ var d = {};
7
+ return {
8
+ register: function(f, m) {
9
+ d[f] = m;
10
+ },
11
+ require: function(h, m) {
12
+ return d[h] || f(m);
13
+ },
14
+ include: function(h, m, k) {
15
+ return d[h] || (k ? f(m) : null);
16
+ }
17
+ };
18
+ }();
19
+ n.register("$1", function(f, d, h) {
20
+ function m(k) {
21
+ var c = typeof k;
22
+ if ("string" === c) if (/[^ <>!=()%^&|?:n0-9]/.test(k)) console.error("Invalid plural: " + k); else return new Function("n", "return " + k);
23
+ "function" !== c && (k = function(b) {
24
+ return 1 != b;
25
+ });
26
+ return k;
27
+ }
28
+ f.init = function(k) {
29
+ function c(a, b, e) {
30
+ return (a = p[a]) && a[e] ? a[e] : b || "";
31
+ }
32
+ function b(a) {
33
+ return c(a, a, 0);
34
+ }
35
+ function a(a, b) {
36
+ return c(b + "" + a, a, 0);
37
+ }
38
+ function e(a, b, e) {
39
+ e = Number(k(e));
40
+ isNaN(e) && (e = 0);
41
+ return c(a, e ? b : a, e);
42
+ }
43
+ k = m(k);
44
+ var p = {};
45
+ return {
46
+ __: b,
47
+ _x: a,
48
+ _n: e,
49
+ _: b,
50
+ x: a,
51
+ n: e,
52
+ load: function(a) {
53
+ p = a || {};
54
+ return this;
55
+ },
56
+ pluraleq: function(a) {
57
+ k = m(a);
58
+ return this;
59
+ }
60
+ };
61
+ };
62
+ return f;
63
+ }({}, v, w));
64
+ n.register("$2", function(f, d, h) {
65
+ f.ie = function() {
66
+ var m = !1, k = 0;
67
+ d.attachEvent && d.navigator && /MSIE (\d+)\./.exec(String(navigator.appVersion)) && (k = Number(RegExp.$1),
68
+ m = 11 > k);
69
+ return function() {
70
+ return m;
71
+ };
72
+ }();
73
+ f.init = function() {
74
+ return f;
75
+ };
76
+ return f;
77
+ }({}, v, w));
78
+ n.register("$3", function(f, d, h) {
79
+ Number.prototype.format = function(d, k, c) {
80
+ d = Math.pow(10, d || 0);
81
+ var b = Math.round(d * this) / d;
82
+ d = [];
83
+ var b = String(b), a = b.split("."), b = a[0], a = a[1], e = b.length;
84
+ do {
85
+ d.unshift(b.substring(e - 3, e));
86
+ } while (0 < (e -= 3));
87
+ b = d.join(c || ",");
88
+ if (a) {
89
+ c = a;
90
+ var p;
91
+ for (d = c.length; "0" === c.charAt(--d); ) p = d;
92
+ p && (c = c.substring(0, p));
93
+ (a = c) && (b += (k || ".") + a);
94
+ }
95
+ return b;
96
+ };
97
+ Number.prototype.percent = function(d) {
98
+ var k = 0, c = this && d ? 100 * (this / d) : 0;
99
+ if (0 === c) return "0";
100
+ if (100 === c) return "100";
101
+ if (99 < c) c = Math.min(c, 99.9), d = c.format(++k); else if (.5 > c) {
102
+ c = Math.max(c, 1e-4);
103
+ do {
104
+ d = c.format(++k);
105
+ } while ("0" === d && 4 > k);
106
+ d = d.substr(1);
107
+ } else d = c.format(0);
108
+ return d;
109
+ };
110
+ return f;
111
+ }({}, v, w));
112
+ n.register("$4", function(f, d, h) {
113
+ Array.prototype.indexOf || (Array.prototype.indexOf = function(d) {
114
+ if (null == this) throw new TypeError();
115
+ var k, c = Object(this), b = c.length >>> 0;
116
+ if (0 === b) return -1;
117
+ k = 0;
118
+ 1 < arguments.length && (k = Number(arguments[1]), k != k ? k = 0 : 0 != k && Infinity != k && -Infinity != k && (k = (0 < k || -1) * Math.floor(Math.abs(k))));
119
+ if (k >= b) return -1;
120
+ for (k = 0 <= k ? k : Math.max(b - Math.abs(k), 0); k < b; k++) if (k in c && c[k] === d) return k;
121
+ return -1;
122
+ });
123
+ return f;
124
+ }({}, v, w));
125
+ n.register("$5", function(f, d, n) {
126
+ d.JSON || (d.JSON = {
127
+ parse: h.parseJSON,
128
+ stringify: null
129
+ });
130
+ return f = d.JSON;
131
+ }({}, v, w));
132
+ n.register("$6", function(f, d, h) {
133
+ f.trim = function(d, k) {
134
+ for (k || (k = " \n"); d && -1 !== k.indexOf(d.substr(0, 1)); ) d = d.substr(1);
135
+ for (;d && -1 !== k.indexOf(d.substr(-1)); ) d = d.substr(0, d.length - 1);
136
+ return d;
137
+ };
138
+ f.sprintf = function(d) {
139
+ var k = 0, c = [].slice.call(arguments, 1);
140
+ return d.replace(/%(?:([1-9][0-9]*)\$)?([sud%])/g, function(b, a, e) {
141
+ return "%" === e ? "%" : (a ? c[Number(a) - 1] : c[k++]) || "";
142
+ });
143
+ };
144
+ return f;
145
+ }({}, v, w));
146
+ n.register("$21", function(f, d, h) {
147
+ function m(k) {
148
+ return function(c, b) {
149
+ for (var a = c[k] || 0; (c = c.offsetParent) && c !== (b || h.body); ) a += c[k] || 0;
150
+ return a;
151
+ };
152
+ }
153
+ f.top = m("offsetTop");
154
+ f.left = m("offsetLeft");
155
+ f.el = function(k, c) {
156
+ var b = h.createElement(k || "div");
157
+ c && (b.className = c);
158
+ return b;
159
+ };
160
+ f.txt = function(k) {
161
+ return h.createTextNode(k || "");
162
+ };
163
+ return f;
164
+ }({}, v, w));
165
+ n.register("$7", function(f, d, E) {
166
+ function m(a, b, e) {
167
+ function q() {
168
+ c();
169
+ x = setTimeout(b, e);
170
+ }
171
+ function c() {
172
+ x && clearTimeout(x);
173
+ x = null;
174
+ }
175
+ var x;
176
+ q();
177
+ h(a).on("mouseenter", c).on("mouseleave", q);
178
+ return {
179
+ die: function() {
180
+ c();
181
+ h(a).off("mouseenter mouseleave");
182
+ }
183
+ };
184
+ }
185
+ function k(a, b) {
186
+ a.fadeTo(b, 0, function() {
187
+ a.slideUp(b, function() {
188
+ a.remove();
189
+ h(d).triggerHandler("resize");
190
+ });
191
+ });
192
+ return a;
193
+ }
194
+ function c(a, b) {
195
+ function e(b) {
196
+ g[x] = null;
197
+ k(h(a), 250);
198
+ c && c.die();
199
+ var q;
200
+ if (q = b) b.stopPropagation(), b.preventDefault(), q = !1;
201
+ return q;
202
+ }
203
+ function q(b) {
204
+ c && c.die();
205
+ return c = m(a, e, b);
206
+ }
207
+ var c, x, p, l = h(a), s = l.find("button");
208
+ 0 === s.length && (l.addClass("is-dismissible"), s = h('<button type="button" class="notice-dismiss"> </a>').appendTo(l));
209
+ s.off("click").on("click", e);
210
+ h(d).triggerHandler("resize");
211
+ y();
212
+ x = g.length;
213
+ g.push(e);
214
+ b && (c = q(b));
215
+ return {
216
+ link: function(b, x) {
217
+ var e = x || b, q = h(a).find("nav"), e = h("<nav></nav>").append(h("<a></a>").attr("href", b).text(e));
218
+ p ? (p.push(e.html()), q.html(p.join("<span> | </span>"))) : (p = [ e.html() ],
219
+ h(a).addClass("has-nav").append(e));
220
+ return this;
221
+ },
222
+ stick: function() {
223
+ c && c.die();
224
+ c = null;
225
+ g[x] = null;
226
+ return this;
227
+ },
228
+ slow: function(a) {
229
+ q(a || 1e4);
230
+ return this;
231
+ }
232
+ };
233
+ }
234
+ function b(a, b, e) {
235
+ var q = n.require("$21", "dom.js").el;
236
+ a = h('<div class="notice notice-' + a + ' loco-notice inline"></div>').prependTo(h("#loco-notices"));
237
+ var c = h(q("p"));
238
+ e = h(q("span")).text(e);
239
+ b = h(q("strong", "has-icon")).text(b + ": ");
240
+ c.append(b).append(e).appendTo(a);
241
+ return a;
242
+ }
243
+ function a(a, e, q, p) {
244
+ a = b(q, e, a).css("opacity", "0").fadeTo(500, 1);
245
+ h(d).triggerHandler("resize");
246
+ return c(a, p);
247
+ }
248
+ function e(b) {
249
+ return a(b, s, "warning");
250
+ }
251
+ function p() {
252
+ h("#loco-notices").find("div.notice").each(function(a, b) {
253
+ if (-1 === b.className.indexOf("jshide")) {
254
+ var e = -1 === b.className.indexOf("notice-success") ? null : 5e3;
255
+ c(b, e);
256
+ }
257
+ });
258
+ }
259
+ var g = [], l = d.console || {
260
+ log: function() {}
261
+ }, y = Date.now || function() {
262
+ return new Date().getTime();
263
+ }, A, s, q, D;
264
+ f.error = function(b) {
265
+ return a(b, A, "error");
266
+ };
267
+ f.warn = e;
268
+ f.info = function(b) {
269
+ return a(b, q, "info");
270
+ };
271
+ f.success = function(b) {
272
+ return a(b, D, "success", 5e3);
273
+ };
274
+ f.warning = e;
275
+ f.log = function() {
276
+ l.log.apply(l, arguments);
277
+ };
278
+ f.debug = function() {
279
+ (l.debug || l.log).apply(l, arguments);
280
+ };
281
+ f.clear = function() {
282
+ for (var a = -1, b, e = g, q = e.length; ++a < q; ) (b = e[a]) && b.call && b();
283
+ g = [];
284
+ return f;
285
+ };
286
+ f.create = b;
287
+ f.raise = function(a) {
288
+ (f[a.type] || f.error).call(f, a.message);
289
+ };
290
+ f.convert = c;
291
+ f.init = function(a) {
292
+ A = a._("Error");
293
+ s = a._("Warning");
294
+ q = a._("Notice");
295
+ D = a._("OK");
296
+ setTimeout(p, 1e3);
297
+ return f;
298
+ };
299
+ return f;
300
+ }({}, v, w));
301
+ n.register("$8", function(f, d, E) {
302
+ function m(a) {
303
+ var b = h("<pre>" + a + "</pre>").text();
304
+ b && (b = b.replace(/[\r\n]+/g, "\n").replace(/(^|\n)\s+/g, "$1").replace(/\s+$/, ""));
305
+ b || (b = a) || (b = "Blank response from server");
306
+ return b;
307
+ }
308
+ function k(a) {
309
+ return (a = a.split(/[\r\n]/)[0]) ? (a = a.replace(/ +in +\S+ on line \d+/, ""),
310
+ a = a.replace(/^[()! ]+Fatal error:\s*/, "")) : t._("Server returned invalid data");
311
+ }
312
+ function c(a) {
313
+ d.console && console.error && console.error('No nonce for "' + a + '"');
314
+ return "";
315
+ }
316
+ function b(a, b, e) {
317
+ a[b] = e;
318
+ }
319
+ function a(a, b, e) {
320
+ a.push({
321
+ name: b,
322
+ value: e
323
+ });
324
+ }
325
+ function e(a, b, e) {
326
+ a.append(b, e);
327
+ }
328
+ function p(a, b, e, c) {
329
+ function p(b, c, x) {
330
+ if ("abort" !== c) {
331
+ var q = l || {
332
+ _: function(a) {
333
+ return a;
334
+ }
335
+ }, z = b.status || 0, d = b.responseText || "", r = m(d), f = b.getResponseHeader("Content-Type") || "Unknown type", A = b.getResponseHeader("Content-Length") || d.length;
336
+ "success" === c && x ? g.error(x) : (g.error(k(r) + ".\n" + q._("Check console output for debugging information")),
337
+ g.log("Ajax failure for " + a, {
338
+ status: z,
339
+ error: c,
340
+ message: x,
341
+ output: d
342
+ }), "parsererror" === c && (x = "Response not JSON"), g.log([ q._("Provide the following text when reporting a problem") + ":", "----", "Status " + z + ' "' + (x || q._("Unknown error")) + '" (' + f + " " + A + " bytes)", r, "====" ].join("\n")));
343
+ e && e.call && e(b, c, x);
344
+ y = b;
345
+ }
346
+ }
347
+ c.url = A;
348
+ c.dataType = "json";
349
+ var g = n.require("$7", "notices.js").clear();
350
+ y = null;
351
+ return h.ajax(c).fail(p).done(function(a, e, x) {
352
+ var c = a && a.data, l = a && a.notices, y = l && l.length, k = -1;
353
+ for (!c || a.error ? p(x, e, a && a.error && a.error.message) : b && b(c, e, x); ++k < y; ) g.raise(l[k]);
354
+ });
355
+ }
356
+ var g = {}, l, y, A = d.ajaxurl || "/wp-admin/admin-ajax.php";
357
+ f.init = function(a) {
358
+ g = a.nonces || g;
359
+ return f;
360
+ };
361
+ f.localise = function(a) {
362
+ l = a;
363
+ return f;
364
+ };
365
+ f.xhr = function() {
366
+ return y;
367
+ };
368
+ f.strip = m;
369
+ f.parse = k;
370
+ f.submit = function(a, b, e) {
371
+ function c(a, b) {
372
+ b.disabled ? b.setAttribute("data-was-disabled", "true") : b.disabled = !0;
373
+ }
374
+ function g(a, b) {
375
+ b.getAttribute("data-was-disabled") || (b.disabled = !1);
376
+ }
377
+ function l(a) {
378
+ a.find(".button-primary").removeClass("loading");
379
+ a.find("button").each(g);
380
+ a.find("input").each(g);
381
+ a.find("select").each(g);
382
+ a.find("textarea").each(g);
383
+ a.removeClass("disabled loading");
384
+ }
385
+ var y = h(a), k = y.serialize();
386
+ (function(a) {
387
+ a.find(".button-primary").addClass("loading");
388
+ a.find("button").each(c);
389
+ a.find("input").each(c);
390
+ a.find("select").each(c);
391
+ a.find("textarea").each(c);
392
+ a.addClass("disabled loading");
393
+ })(y);
394
+ return p(a.route.value, function(a, e, c) {
395
+ l(y);
396
+ b && b(a, e, c);
397
+ }, function(a, b, c) {
398
+ l(y);
399
+ e && e(a, b, c);
400
+ }, {
401
+ type: a.method,
402
+ data: k
403
+ });
404
+ };
405
+ f.post = function(l, q, y, k) {
406
+ var z = !0, G = q || {}, C = g[l] || c(l);
407
+ d.FormData && G instanceof FormData ? (z = !1, q = e) : q = Array.isArray(G) ? a : b;
408
+ q(G, "action", "loco_json");
409
+ q(G, "route", l);
410
+ q(G, "loco-nonce", C);
411
+ return p(l, y, k, {
412
+ type: "post",
413
+ data: G,
414
+ processData: z,
415
+ contentType: z ? "application/x-www-form-urlencoded; charset=UTF-8" : !1
416
+ });
417
+ };
418
+ f.get = function(a, b, e, l) {
419
+ b = b || {};
420
+ var y = g[a] || c(a);
421
+ b.action = "loco_json";
422
+ b.route = a;
423
+ b["loco-nonce"] = y;
424
+ return p(a, e, l, {
425
+ type: "get",
426
+ data: b
427
+ });
428
+ };
429
+ f.setNonce = function(a, b) {
430
+ g[a] = b;
431
+ return f;
432
+ };
433
+ return f;
434
+ }({}, v, w));
435
+ n.register("$22", {
436
+ arab: 1,
437
+ aran: 1,
438
+ hebr: 1,
439
+ nkoo: 1,
440
+ syrc: 1,
441
+ syrn: 1,
442
+ syrj: 1,
443
+ syre: 1,
444
+ samr: 1,
445
+ mand: 1,
446
+ mend: 1,
447
+ thaa: 1,
448
+ adlm: 1,
449
+ cprt: 1,
450
+ phnx: 1,
451
+ armi: 1,
452
+ prti: 1,
453
+ phli: 1,
454
+ phlp: 1,
455
+ phlv: 1,
456
+ avst: 1,
457
+ mani: 1,
458
+ khar: 1,
459
+ orkh: 1,
460
+ ital: 1,
461
+ lydi: 1,
462
+ ar: 1,
463
+ ary: 1,
464
+ ckb: 1,
465
+ dv: 1,
466
+ fa: 1,
467
+ he: 1,
468
+ nqo: 1,
469
+ ps: 1,
470
+ ur: 1,
471
+ yi: 1
472
+ });
473
+ n.register("$9", function(f, d, h) {
474
+ function m() {}
475
+ var k, c = n.require("$22", "rtl.json");
476
+ f.init = function() {
477
+ return new m();
478
+ };
479
+ f.cast = function(b) {
480
+ return b instanceof m ? b : "string" === typeof b ? f.parse(b) : f.clone(b);
481
+ };
482
+ f.clone = function(b) {
483
+ var a, e = new m();
484
+ for (a in b) e[a] = b[a];
485
+ return e;
486
+ };
487
+ f.parse = function(b) {
488
+ if (!(k || (k = /^([a-z]{2,3})(?:[-_]([a-z]{2}))?(?:[-_]([a-z0-9]{3,8}))?$/i)).exec(b)) return null;
489
+ var a = new m();
490
+ a.lang = RegExp.$1.toLowerCase();
491
+ if (b = RegExp.$2) a.region = b.toUpperCase();
492
+ if (b = RegExp.$3) a.variant = b.toLowerCase();
493
+ return a;
494
+ };
495
+ d = m.prototype;
496
+ d.isValid = function() {
497
+ return !!this.lang;
498
+ };
499
+ d.isKnown = function() {
500
+ var b = this.lang;
501
+ return !(!b || "zxx" === b);
502
+ };
503
+ d.toString = function(b) {
504
+ b = b || "_";
505
+ var a, e = this.lang || "zxx";
506
+ if (a = this.region) e += b + a;
507
+ if (a = this.variant) e += b + a;
508
+ return e;
509
+ };
510
+ d.getIcon = function() {
511
+ for (var b = 3, a, e, c = [ "variant", "region", "lang" ], g = []; 0 !== b--; ) if (a = c[b],
512
+ e = this[a]) g.push(a), g.push(a + "-" + e.toLowerCase());
513
+ return g.join(" ");
514
+ };
515
+ d.isRTL = function() {
516
+ return !!c[String(this.lang).toLowerCase()];
517
+ };
518
+ d = null;
519
+ return f;
520
+ }({}, v, w));
521
+ n.register("$23", {
522
+ "á": "a",
523
+ "à": "a",
524
+ "ă": "a",
525
+ "ắ": "a",
526
+ "ằ": "a",
527
+ "ẵ": "a",
528
+ "ẳ": "a",
529
+ "â": "a",
530
+ "ấ": "a",
531
+ "ầ": "a",
532
+ "ẫ": "a",
533
+ "ẩ": "a",
534
+ "ǎ": "a",
535
+ "å": "a",
536
+ "ǻ": "a",
537
+ "ä": "a",
538
+ "ǟ": "a",
539
+ "ã": "a",
540
+ "ȧ": "a",
541
+ "ǡ": "a",
542
+ "ą": "a",
543
+ "ā": "a",
544
+ "ả": "a",
545
+ "ȁ": "a",
546
+ "ȃ": "a",
547
+ "ạ": "a",
548
+ "ặ": "a",
549
+ "ậ": "a",
550
+ "ḁ": "a",
551
+ "ǽ": "æ",
552
+ "ǣ": "æ",
553
+ "ḃ": "b",
554
+ "ḅ": "b",
555
+ "ḇ": "b",
556
+ "ć": "c",
557
+ "ĉ": "c",
558
+ "č": "c",
559
+ "ċ": "c",
560
+ "ç": "c",
561
+ "ḉ": "c",
562
+ "ď": "d",
563
+ "ḋ": "d",
564
+ "ḑ": "d",
565
+ "đ": "d",
566
+ "ḍ": "d",
567
+ "ḓ": "d",
568
+ "ḏ": "d",
569
+ "ð": "d",
570
+ "ꝺ": "d",
571
+ "dž": "dz",
572
+ "é": "e",
573
+ "è": "e",
574
+ "ĕ": "e",
575
+ "ê": "e",
576
+ "ế": "e",
577
+ "ề": "e",
578
+ "ễ": "e",
579
+ "ể": "e",
580
+ "ě": "e",
581
+ "ë": "e",
582
+ "ẽ": "e",
583
+ "ė": "e",
584
+ "ȩ": "e",
585
+ "ḝ": "e",
586
+ "ę": "e",
587
+ "ē": "e",
588
+ "ḗ": "e",
589
+ "ḕ": "e",
590
+ "ẻ": "e",
591
+ "ȅ": "e",
592
+ "ȇ": "e",
593
+ "ẹ": "e",
594
+ "ệ": "e",
595
+ "ḙ": "e",
596
+ "ḛ": "e",
597
+ "ḟ": "f",
598
+ "ꝼ": "f",
599
+ "ǵ": "g",
600
+ "ğ": "g",
601
+ "ĝ": "g",
602
+ "ǧ": "g",
603
+ "ġ": "g",
604
+ "ģ": "g",
605
+ "ḡ": "g",
606
+ "ꞡ": "g",
607
+ "ᵹ": "g",
608
+ "ĥ": "h",
609
+ "ȟ": "h",
610
+ "ḧ": "h",
611
+ "ḣ": "h",
612
+ "ḩ": "h",
613
+ "ħ": "h",
614
+ "ℏ": "h",
615
+ "ḥ": "h",
616
+ "ḫ": "h",
617
+ "ẖ": "h",
618
+ "í": "i",
619
+ "ì": "i",
620
+ "ĭ": "i",
621
+ "î": "i",
622
+ "ǐ": "i",
623
+ "ï": "i",
624
+ "ḯ": "i",
625
+ "ĩ": "i",
626
+ "į": "i",
627
+ "ī": "i",
628
+ "ỉ": "i",
629
+ "ȉ": "i",
630
+ "ȋ": "i",
631
+ "ị": "i",
632
+ "ḭ": "i",
633
+ "ĵ": "j",
634
+ "ǰ": "j",
635
+ "ḱ": "k",
636
+ "ǩ": "k",
637
+ "ķ": "k",
638
+ "ꞣ": "k",
639
+ "ḳ": "k",
640
+ "ḵ": "k",
641
+ "ĺ": "l",
642
+ "ľ": "l",
643
+ "ļ": "l",
644
+ "ł": "l",
645
+ "ḷ": "l",
646
+ "ḹ": "l",
647
+ "ḽ": "l",
648
+ "ḻ": "l",
649
+ "ŀ": "l",
650
+ "ḿ": "m",
651
+ "ṁ": "m",
652
+ "ṃ": "m",
653
+ "ń": "n",
654
+ "ǹ": "n",
655
+ "ň": "n",
656
+ "ñ": "n",
657
+ "ṅ": "n",
658
+ "ņ": "n",
659
+ "ꞥ": "n",
660
+ "ṇ": "n",
661
+ "ṋ": "n",
662
+ "ṉ": "n",
663
+ "ó": "o",
664
+ "ò": "o",
665
+ "ŏ": "o",
666
+ "ô": "o",
667
+ "ố": "o",
668
+ "ồ": "o",
669
+ "ỗ": "o",
670
+ "ổ": "o",
671
+ "ǒ": "o",
672
+ "ö": "o",
673
+ "ȫ": "o",
674
+ "ő": "o",
675
+ "õ": "o",
676
+ "ṍ": "o",
677
+ "ṏ": "o",
678
+ "ȭ": "o",
679
+ "ȯ": "o",
680
+ "ȱ": "o",
681
+ "ø": "o",
682
+ "ǿ": "o",
683
+ "ǫ": "o",
684
+ "ǭ": "o",
685
+ "ō": "o",
686
+ "ṓ": "o",
687
+ "ṑ": "o",
688
+ "ỏ": "o",
689
+ "ȍ": "o",
690
+ "ȏ": "o",
691
+ "ơ": "o",
692
+ "ớ": "o",
693
+ "ờ": "o",
694
+ "ỡ": "o",
695
+ "ở": "o",
696
+ "ợ": "o",
697
+ "ọ": "o",
698
+ "ộ": "o",
699
+ "ṕ": "p",
700
+ "ṗ": "p",
701
+ "ŕ": "r",
702
+ "ř": "r",
703
+ "ṙ": "r",
704
+ "ŗ": "r",
705
+ "ꞧ": "r",
706
+ "ȑ": "r",
707
+ "ȓ": "r",
708
+ "ṛ": "r",
709
+ "ṝ": "r",
710
+ "ṟ": "r",
711
+ "ꞃ": "r",
712
+ "ś": "s",
713
+ "ṥ": "s",
714
+ "ŝ": "s",
715
+ "š": "s",
716
+ "ṧ": "s",
717
+ "ṡ": "s",
718
+ "ş": "s",
719
+ "ꞩ": "s",
720
+ "ṣ": "s",
721
+ "ṩ": "s",
722
+ "ș": "s",
723
+ "ſ": "s",
724
+ "ꞅ": "s",
725
+ "ẛ": "s",
726
+ "ť": "t",
727
+ "ẗ": "t",
728
+ "ṫ": "t",
729
+ "ţ": "t",
730
+ "ṭ": "t",
731
+ "ț": "t",
732
+ "ṱ": "t",
733
+ "ṯ": "t",
734
+ "ꞇ": "t",
735
+ "ú": "u",
736
+ "ù": "u",
737
+ "ŭ": "u",
738
+ "û": "u",
739
+ "ǔ": "u",
740
+ "ů": "u",
741
+ "ü": "u",
742
+ "ǘ": "u",
743
+ "ǜ": "u",
744
+ "ǚ": "u",
745
+ "ǖ": "u",
746
+ "ű": "u",
747
+ "ũ": "u",
748
+ "ṹ": "u",
749
+ "ų": "u",
750
+ "ū": "u",
751
+ "ṻ": "u",
752
+ "ủ": "u",
753
+ "ȕ": "u",
754
+ "ȗ": "u",
755
+ "ư": "u",
756
+ "ứ": "u",
757
+ "ừ": "u",
758
+ "ữ": "u",
759
+ "ử": "u",
760
+ "ự": "u",
761
+ "ụ": "u",
762
+ "ṳ": "u",
763
+ "ṷ": "u",
764
+ "ṵ": "u",
765
+ "ṽ": "v",
766
+ "ṿ": "v",
767
+ "ẃ": "w",
768
+ "ẁ": "w",
769
+ "ŵ": "w",
770
+ "ẘ": "w",
771
+ "ẅ": "w",
772
+ "ẇ": "w",
773
+ "ẉ": "w",
774
+ "ẍ": "x",
775
+ "ẋ": "x",
776
+ "ý": "y",
777
+ "ỳ": "y",
778
+ "ŷ": "y",
779
+ "ẙ": "y",
780
+ "ÿ": "y",
781
+ "ỹ": "y",
782
+ "ẏ": "y",
783
+ "ȳ": "y",
784
+ "ỷ": "y",
785
+ "ỵ": "y",
786
+ "ź": "z",
787
+ "ẑ": "z",
788
+ "ž": "z",
789
+ "ż": "z",
790
+ "ẓ": "z",
791
+ "ẕ": "z",
792
+ "ǯ": "ʒ",
793
+ "ἀ": "α",
794
+ "ἄ": "α",
795
+ "ᾄ": "α",
796
+ "ἂ": "α",
797
+ "ᾂ": "α",
798
+ "ἆ": "α",
799
+ "ᾆ": "α",
800
+ "ᾀ": "α",
801
+ "ἁ": "α",
802
+ "ἅ": "α",
803
+ "ᾅ": "α",
804
+ "ἃ": "α",
805
+ "ᾃ": "α",
806
+ "ἇ": "α",
807
+ "ᾇ": "α",
808
+ "ᾁ": "α",
809
+ "ά": "α",
810
+ "ά": "α",
811
+ "ᾴ": "α",
812
+ "ὰ": "α",
813
+ "ᾲ": "α",
814
+ "ᾰ": "α",
815
+ "ᾶ": "α",
816
+ "ᾷ": "α",
817
+ "ᾱ": "α",
818
+ "ᾳ": "α",
819
+ "ἐ": "ε",
820
+ "ἔ": "ε",
821
+ "ἒ": "ε",
822
+ "ἑ": "ε",
823
+ "ἕ": "ε",
824
+ "ἓ": "ε",
825
+ "έ": "ε",
826
+ "έ": "ε",
827
+ "ὲ": "ε",
828
+ "ἠ": "η",
829
+ "ἤ": "η",
830
+ "ᾔ": "η",
831
+ "ἢ": "η",
832
+ "ᾒ": "η",
833
+ "ἦ": "η",
834
+ "ᾖ": "η",
835
+ "ᾐ": "η",
836
+ "ἡ": "η",
837
+ "ἥ": "η",
838
+ "ᾕ": "η",
839
+ "ἣ": "η",
840
+ "ᾓ": "η",
841
+ "ἧ": "η",
842
+ "ᾗ": "η",
843
+ "ᾑ": "η",
844
+ "ή": "η",
845
+ "ή": "η",
846
+ "ῄ": "η",
847
+ "ὴ": "η",
848
+ "ῂ": "η",
849
+ "ῆ": "η",
850
+ "ῇ": "η",
851
+ "ῃ": "η",
852
+ "ἰ": "ι",
853
+ "ἴ": "ι",
854
+ "ἲ": "ι",
855
+ "ἶ": "ι",
856
+ "ἱ": "ι",
857
+ "ἵ": "ι",
858
+ "ἳ": "ι",
859
+ "ἷ": "ι",
860
+ "ί": "ι",
861
+ "ί": "ι",
862
+ "ὶ": "ι",
863
+ "ῐ": "ι",
864
+ "ῖ": "ι",
865
+ "ϊ": "ι",
866
+ "ΐ": "ι",
867
+ "ΐ": "ι",
868
+ "ῒ": "ι",
869
+ "ῗ": "ι",
870
+ "ῑ": "ι",
871
+ "ὀ": "ο",
872
+ "ὄ": "ο",
873
+ "ὂ": "ο",
874
+ "ὁ": "ο",
875
+ "ὅ": "ο",
876
+ "ὃ": "ο",
877
+ "ό": "ο",
878
+ "ό": "ο",
879
+ "ὸ": "ο",
880
+ "ῤ": "ρ",
881
+ "ῥ": "ρ",
882
+ "ὐ": "υ",
883
+ "ὔ": "υ",
884
+ "ὒ": "υ",
885
+ "ὖ": "υ",
886
+ "ὑ": "υ",
887
+ "ὕ": "υ",
888
+ "ὓ": "υ",
889
+ "ὗ": "υ",
890
+ "ύ": "υ",
891
+ "ύ": "υ",
892
+ "ὺ": "υ",
893
+ "ῠ": "υ",
894
+ "ῦ": "υ",
895
+ "ϋ": "υ",
896
+ "ΰ": "υ",
897
+ "ΰ": "υ",
898
+ "ῢ": "υ",
899
+ "ῧ": "υ",
900
+ "ῡ": "υ",
901
+ "ὠ": "ω",
902
+ "ὤ": "ω",
903
+ "ᾤ": "ω",
904
+ "ὢ": "ω",
905
+ "ᾢ": "ω",
906
+ "ὦ": "ω",
907
+ "ᾦ": "ω",
908
+ "ᾠ": "ω",
909
+ "ὡ": "ω",
910
+ "ὥ": "ω",
911
+ "ᾥ": "ω",
912
+ "ὣ": "ω",
913
+ "ᾣ": "ω",
914
+ "ὧ": "ω",
915
+ "ᾧ": "ω",
916
+ "ᾡ": "ω",
917
+ "ώ": "ω",
918
+ "ώ": "ω",
919
+ "ῴ": "ω",
920
+ "ὼ": "ω",
921
+ "ῲ": "ω",
922
+ "ῶ": "ω",
923
+ "ῷ": "ω",
924
+ "ῳ": "ω",
925
+ "ґ": "г",
926
+ "ѐ": "е",
927
+ "ё": "е",
928
+ "ӂ": "ж",
929
+ "ѝ": "и",
930
+ "ӣ": "и",
931
+ "ӯ": "у"
932
+ });
933
+ n.register("$10", function(f, d, h) {
934
+ f.init = function() {
935
+ function d(a) {
936
+ return l[a] || a;
937
+ }
938
+ function k(a, b, e, c) {
939
+ b = a.split(b);
940
+ for (var p = b.length; 0 !== p--; ) (a = b[p]) && null == c[a] && (e.push(a), c[a] = !0);
941
+ return e;
942
+ }
943
+ function c(a) {
944
+ return k(String(a || "").toLowerCase().replace(p, d), g, [], {});
945
+ }
946
+ function b(a, b) {
947
+ for (var c = [], q = {}, l, r = b.length, z = g; 0 !== r--; ) (l = b[r]) && k(String(l || "").toLowerCase().replace(p, d), z, c, q);
948
+ e[a] = c;
949
+ }
950
+ function a(a, b) {
951
+ var c = [], q = -1, p = e, l = p.length, g, k, d, u, x, F, f = a.length, m = b ? !0 : !1;
952
+ a: for (;++q < l; ) if (d = p[q], null != d && (u = d.length)) {
953
+ x = 0;
954
+ b: for (;x < f; x++) {
955
+ F = a[x];
956
+ for (g = 0; g < u; g++) if (k = d[g], 0 === k.indexOf(F)) continue b;
957
+ continue a;
958
+ }
959
+ c.push(m ? b[q] : q);
960
+ }
961
+ return c;
962
+ }
963
+ var e = [], p = /[^a-z0-9]/g, g = /[\-_\s.?!;:,*^+=~`"(){}<>\[\]\/\\\u00a0\u1680\u180e\u2000-\u206f\u2e00-\u2e7f\u3000-\u303f]+/, l = n.require("$23", "flatten.json");
964
+ return {
965
+ split: c,
966
+ pull: function(b, e) {
967
+ return a(b, e);
968
+ },
969
+ find: function(b, e) {
970
+ return a(c(b), e);
971
+ },
972
+ add: function(a, b) {
973
+ e[a] = c(b);
974
+ },
975
+ push: function(a) {
976
+ b(e.length, a);
977
+ },
978
+ index: function(a, e) {
979
+ b(a, e);
980
+ },
981
+ size: function() {
982
+ return e.length;
983
+ },
984
+ clear: function() {
985
+ e = [];
986
+ },
987
+ remove: function(a) {
988
+ e[a] = null;
989
+ }
990
+ };
991
+ };
992
+ return f;
993
+ }({}, v, w));
994
+ n.register("$11", function(f, d, n) {
995
+ f.listen = function(f, k) {
996
+ function c() {
997
+ s[p ? "show" : "hide"]();
998
+ }
999
+ function b(a) {
1000
+ A && f.setAttribute("size", 2 + a.length);
1001
+ p = a;
1002
+ c();
1003
+ return a;
1004
+ }
1005
+ function a() {
1006
+ g = null;
1007
+ k(p);
1008
+ }
1009
+ function e() {
1010
+ var e = f.value;
1011
+ y && e === y && (e = "");
1012
+ e !== p && (g && clearTimeout(g), b(e), l ? g = setTimeout(a, l) : a());
1013
+ }
1014
+ f instanceof jQuery && (f = f[0]);
1015
+ var p, g, l = 150, y = d.attachEvent && f.getAttribute("placeholder"), A = 1 === Number(f.size), s = h('<a href="#clear" tabindex="-1" class="icon clear"><span>clear</span></a>').on("click", function() {
1016
+ f.value = "";
1017
+ e();
1018
+ return !1;
1019
+ });
1020
+ b(f.value);
1021
+ h(f).on("input blur focus", function() {
1022
+ e();
1023
+ return !0;
1024
+ }).after(s);
1025
+ c();
1026
+ return {
1027
+ delay: function(a) {
1028
+ l = a;
1029
+ },
1030
+ ping: function(c) {
1031
+ c ? (g && clearTimeout(g), c = f.value, y && c === y && (c = ""), b(c), a(), c = void 0) : c = e();
1032
+ return c;
1033
+ },
1034
+ val: function(a) {
1035
+ if (null == a) return p;
1036
+ g && clearTimeout(g);
1037
+ f.value = b(a);
1038
+ c();
1039
+ },
1040
+ el: function() {
1041
+ return f;
1042
+ },
1043
+ blur: function(a) {
1044
+ return h(f).on("blur", a);
1045
+ },
1046
+ destroy: function() {
1047
+ g && clearTimeout(g);
1048
+ }
1049
+ };
1050
+ };
1051
+ return f;
1052
+ }({}, v, w));
1053
+ n.register("$12", function(f, d, n) {
1054
+ function m(b, a) {
1055
+ this.$element = h(b);
1056
+ this.options = a;
1057
+ this.enabled = !0;
1058
+ this.fixTitle();
1059
+ }
1060
+ f.init = function(b, a) {
1061
+ var e = {
1062
+ fade: !0,
1063
+ offset: 5,
1064
+ delayIn: k,
1065
+ delayOut: c,
1066
+ anchor: b.attr("data-anchor"),
1067
+ gravity: b.attr("data-gravity") || "s"
1068
+ };
1069
+ a && (e = h.extend({}, e, a));
1070
+ b.tipsy(e);
1071
+ };
1072
+ f.delays = function(b, a) {
1073
+ k = b || 150;
1074
+ c = a || 100;
1075
+ };
1076
+ f.kill = function() {
1077
+ h("div.tipsy").remove();
1078
+ };
1079
+ f.text = function(b, a) {
1080
+ a.data("tipsy").setTitle(b);
1081
+ };
1082
+ var k, c;
1083
+ f.delays();
1084
+ h(n.body).on("overlayOpened overlayClosing", function(b) {
1085
+ f.kill();
1086
+ return !0;
1087
+ });
1088
+ m.prototype = {
1089
+ show: function() {
1090
+ var b = this.getTitle();
1091
+ if (b && this.enabled) {
1092
+ var a = this.tip();
1093
+ a.find(".tipsy-inner")[this.options.html ? "html" : "text"](b);
1094
+ a[0].className = "tipsy";
1095
+ a.remove().css({
1096
+ top: 0,
1097
+ left: 0
1098
+ }).prependTo(n.body);
1099
+ var b = (b = this.options.anchor) ? this.$element.find(b) : this.$element, b = h.extend({}, b.offset(), {
1100
+ width: b[0].offsetWidth,
1101
+ height: b[0].offsetHeight
1102
+ }), e = a[0].offsetWidth, c = a[0].offsetHeight, g = "function" == typeof this.options.gravity ? this.options.gravity.call(this.$element[0]) : this.options.gravity, l;
1103
+ switch (g.charAt(0)) {
1104
+ case "n":
1105
+ l = {
1106
+ top: b.top + b.height + this.options.offset,
1107
+ left: b.left + b.width / 2 - e / 2
1108
+ };
1109
+ break;
1110
+
1111
+ case "s":
1112
+ l = {
1113
+ top: b.top - c - this.options.offset,
1114
+ left: b.left + b.width / 2 - e / 2
1115
+ };
1116
+ break;
1117
+
1118
+ case "e":
1119
+ l = {
1120
+ top: b.top + b.height / 2 - c / 2,
1121
+ left: b.left - e - this.options.offset
1122
+ };
1123
+ break;
1124
+
1125
+ case "w":
1126
+ l = {
1127
+ top: b.top + b.height / 2 - c / 2,
1128
+ left: b.left + b.width + this.options.offset
1129
+ };
1130
+ }
1131
+ 2 == g.length && ("w" == g.charAt(1) ? l.left = b.left + b.width / 2 - 15 : l.left = b.left + b.width / 2 - e + 15);
1132
+ a.css(l).addClass("tipsy-" + g);
1133
+ a.find(".tipsy-arrow")[0].className = "tipsy-arrow tipsy-arrow-" + g.charAt(0);
1134
+ this.options.className && a.addClass("function" == typeof this.options.className ? this.options.className.call(this.$element[0]) : this.options.className);
1135
+ a.addClass("in");
1136
+ }
1137
+ },
1138
+ hide: function() {
1139
+ this.tip().remove();
1140
+ },
1141
+ fixTitle: function() {
1142
+ var b = this.$element, a = b.attr("title") || "";
1143
+ (a || "string" !== typeof b.attr("original-title")) && b.attr("original-title", a).removeAttr("title");
1144
+ },
1145
+ getTitle: function() {
1146
+ var b, a = this.$element, e = this.options;
1147
+ this.fixTitle();
1148
+ "string" == typeof e.title ? b = a.attr("title" == e.title ? "original-title" : e.title) : "function" == typeof e.title && (b = e.title.call(a[0]));
1149
+ return (b = ("" + b).replace(/(^\s*|\s*$)/, "")) || e.fallback;
1150
+ },
1151
+ setTitle: function(b) {
1152
+ var a = this.$element;
1153
+ a.attr("default-title") || a.attr("default-title", this.getTitle());
1154
+ null == b && (b = a.attr("default-title") || this.getTitle());
1155
+ a.attr("original-title", b);
1156
+ if (this.$tip) this.$tip.find(".tipsy-inner")[this.options.html ? "html" : "text"](b);
1157
+ },
1158
+ tip: function() {
1159
+ this.$tip || (this.$tip = h('<div class="tipsy"></div>').html('<div class="tipsy-arrow"></div><div class="tipsy-inner"></div>'),
1160
+ this.$tip.data("tipsy-pointee", this.$element[0]));
1161
+ return this.$tip;
1162
+ },
1163
+ validate: function() {
1164
+ this.$element[0].parentNode || (this.hide(), this.options = this.$element = null);
1165
+ },
1166
+ enable: function() {
1167
+ this.enabled = !0;
1168
+ },
1169
+ disable: function() {
1170
+ this.hide();
1171
+ this.enabled = !1;
1172
+ },
1173
+ toggleEnabled: function() {
1174
+ this.enabled = !this.enabled;
1175
+ }
1176
+ };
1177
+ h.fn.tipsy = function(b) {
1178
+ function a(a) {
1179
+ var e = h.data(a, "tipsy");
1180
+ e || (e = new m(a, h.fn.tipsy.elementOptions(a, b)), h.data(a, "tipsy", e));
1181
+ return e;
1182
+ }
1183
+ function e() {
1184
+ var e = a(this), c = b.delayIn;
1185
+ e.hoverState = "in";
1186
+ 0 == c ? e.show() : (e.fixTitle(), setTimeout(function() {
1187
+ "in" == e.hoverState && e.show();
1188
+ }, c));
1189
+ }
1190
+ function c() {
1191
+ var e = a(this), p = b.delayOut;
1192
+ e.hoverState = "out";
1193
+ 0 == p ? e.hide() : (e.tip().removeClass("in"), setTimeout(function() {
1194
+ "out" == e.hoverState && e.hide();
1195
+ }, p));
1196
+ }
1197
+ b = h.extend({}, h.fn.tipsy.defaults, b);
1198
+ b.live || this.each(function() {
1199
+ a(this);
1200
+ });
1201
+ if ("manual" != b.trigger) {
1202
+ var g = b.live ? "live" : "bind", l = "hover" == b.trigger ? "mouseleave" : "blur";
1203
+ this[g]("hover" == b.trigger ? "mouseenter" : "focus", e)[g](l, c);
1204
+ }
1205
+ return this;
1206
+ };
1207
+ h.fn.tipsy.defaults = {
1208
+ className: null,
1209
+ delayIn: 0,
1210
+ delayOut: 0,
1211
+ fade: !1,
1212
+ fallback: "",
1213
+ gravity: "n",
1214
+ html: !1,
1215
+ live: !1,
1216
+ offset: 0,
1217
+ opacity: .8,
1218
+ title: "title",
1219
+ trigger: "hover",
1220
+ anchor: null
1221
+ };
1222
+ h.fn.tipsy.elementOptions = function(b, a) {
1223
+ return h.metadata ? h.extend({}, a, h(b).metadata()) : a;
1224
+ };
1225
+ h.fn.tipsy.autoNS = function() {
1226
+ return h(this).offset().top > h(n).scrollTop() + h(d).height() / 2 ? "s" : "n";
1227
+ };
1228
+ h.fn.tipsy.autoWE = function() {
1229
+ return h(this).offset().left > h(n).scrollLeft() + h(d).width() / 2 ? "e" : "w";
1230
+ };
1231
+ h.fn.tipsy.autoBounds = function(b, a) {
1232
+ return function() {
1233
+ var e = a[0], c = 1 < a.length ? a[1] : !1, g = h(n).scrollTop() + b, l = h(n).scrollLeft() + b, k = h(this);
1234
+ k.offset().top < g && (e = "n");
1235
+ k.offset().left < l && (c = "w");
1236
+ h(d).width() + h(n).scrollLeft() - k.offset().left < b && (c = "e");
1237
+ h(d).height() + h(n).scrollTop() - k.offset().top < b && (e = "s");
1238
+ return e + (c ? c : "");
1239
+ };
1240
+ };
1241
+ return f;
1242
+ }({}, v, w));
1243
+ n.register("$35", function(f, d, h) {
1244
+ "".localeCompare || (String.prototype.localeCompare = function() {
1245
+ return 0;
1246
+ });
1247
+ "".trim || (String.prototype.trim = function() {
1248
+ return n.require("$6", "string.js").trim(this, " \n\r\t");
1249
+ });
1250
+ f.html = function() {
1251
+ function d() {
1252
+ b = /[<>&]/g;
1253
+ a = /(\r\n|\n|\r)/g;
1254
+ e = /(?:https?):\/\/(\S+)/gi;
1255
+ p = location.hostname;
1256
+ d = null;
1257
+ }
1258
+ function k(a) {
1259
+ return "&#" + a.charCodeAt(0) + ";";
1260
+ }
1261
+ function c(a, b) {
1262
+ return '<a href="' + a + '" target="' + (b.indexOf(p) ? "_blank" : "_top") + '">' + b + "</a>";
1263
+ }
1264
+ var b, a, e, p;
1265
+ return function(p, l) {
1266
+ d && d();
1267
+ var y = p.replace(b, k);
1268
+ l && (y = y.replace(e, c).replace(a, "<br />"));
1269
+ return y;
1270
+ };
1271
+ }();
1272
+ return f;
1273
+ }({}, v, w));
1274
+ n.register("$36", function(f, d, h) {
1275
+ function m() {}
1276
+ var k, c, b = n.require("$22", "rtl.json");
1277
+ f.init = function() {
1278
+ return new m();
1279
+ };
1280
+ f.cast = function(a) {
1281
+ return a instanceof m ? a : "string" === typeof a ? f.parse(a) : f.clone(a);
1282
+ };
1283
+ f.clone = function(a) {
1284
+ var b, c = new m();
1285
+ for (b in a) c[b] = a[b];
1286
+ return c;
1287
+ };
1288
+ f.parse = function(a) {
1289
+ k || (c = /[-_+]/, k = /^([a-z]{2,3})(?:-([a-z]{4}))?(?:-([a-z]{2}|[0-9]{3}))?(?:-([0-9][a-z0-9]{3,8}|[a-z0-9]{5,8}))?(?:-([a-z]-[-a-z]+))?$/i);
1290
+ a = String(a).split(c).join("-");
1291
+ if (!k.exec(a)) return null;
1292
+ var b = new m();
1293
+ b.lang = RegExp.$1.toLowerCase();
1294
+ if (a = RegExp.$2) b.script = a.charAt(0).toUpperCase() + a.substr(1).toLowerCase();
1295
+ if (a = RegExp.$3) b.region = a.toUpperCase();
1296
+ if (a = RegExp.$4) b.variant = a.toLowerCase();
1297
+ if (a = RegExp.$5) b.extension = a;
1298
+ return b;
1299
+ };
1300
+ d = m.prototype;
1301
+ d.isValid = function() {
1302
+ return !!this.lang;
1303
+ };
1304
+ d.isKnown = function() {
1305
+ var a = this.lang;
1306
+ return !(!a || "zxx" === a);
1307
+ };
1308
+ d.toString = function(a) {
1309
+ a = a || "-";
1310
+ var b, c = this.lang || "zxx";
1311
+ if (b = this.script) c += a + b;
1312
+ if (b = this.region) c += a + b;
1313
+ if (b = this.variant) c += a + b;
1314
+ if (b = this.extension) c += a + b;
1315
+ return c;
1316
+ };
1317
+ d.getIcon = function() {
1318
+ for (var a = 4, b, c, g = [ "variant", "region", "script", "lang" ], l = []; 0 !== a--; ) if (b = g[a],
1319
+ c = this[b]) c.join && (c = c.join("-")), 1 === a && 3 === c.length ? l.push("region-m49") : l = l.concat([ b, b + "-" + c.toLowerCase() ]);
1320
+ return l.join(" ");
1321
+ };
1322
+ d.isRTL = function() {
1323
+ return !!b[String(this.script || this.lang).toLowerCase()];
1324
+ };
1325
+ d = null;
1326
+ return f;
1327
+ }({}, v, w));
1328
+ n.register("$37", function(f, d, h) {
1329
+ function m(a) {
1330
+ d.console && console.error && console.error(a);
1331
+ }
1332
+ function k() {
1333
+ m("Method not implemented");
1334
+ }
1335
+ function c() {}
1336
+ function b(a) {}
1337
+ c.prototype.toString = function() {
1338
+ return "[Undefined]";
1339
+ };
1340
+ b.prototype._validate = function(a) {
1341
+ var b, p, g = !0;
1342
+ for (b in this) p = this[b], p === k ? (m(a + "." + b + "() must be implemented"),
1343
+ g = !1) : p instanceof c && (m(a + "." + b + " must be defined"), g = !1);
1344
+ return g;
1345
+ };
1346
+ f.init = function(a, e) {
1347
+ var p, g = new b();
1348
+ if (a) for (p = a.length; 0 !== p--; ) g[a[p]] = k;
1349
+ if (e) for (p = e.length; 0 !== p--; ) g[e[p]] = new c();
1350
+ return g;
1351
+ };
1352
+ f.validate = function(a) {
1353
+ var b = /function (\w+)\(/.exec(a.toString()) ? RegExp.$1 : "";
1354
+ a.prototype._validate(b || "Object");
1355
+ };
1356
+ return f;
1357
+ }({}, v, w));
1358
+ n.register("$48", function(f, d, h) {
1359
+ var m = d.requestAnimationFrame, k = d.cancelAnimationFrame, c = 0;
1360
+ if (!m || !k) for (var b in {
1361
+ ms: 1,
1362
+ moz: 1,
1363
+ webkit: 1,
1364
+ o: 1
1365
+ }) if (m = d[b + "RequestAnimationFrame"]) if (k = d[b + "CancelAnimationFrame"] || d[b + "CancelRequestAnimationFrame"]) break;
1366
+ m && k || (m = function(b) {
1367
+ var p = a();
1368
+ timeToCall = Math.max(0, 16 - (p - c));
1369
+ nextTime = p + timeToCall;
1370
+ timerId = d.setTimeout(function() {
1371
+ b(nextTime);
1372
+ }, timeToCall);
1373
+ c = nextTime;
1374
+ return timerId;
1375
+ }, k = function(a) {
1376
+ clearTimeout(a);
1377
+ });
1378
+ var a = Date.now || function() {
1379
+ return new Date().getTime();
1380
+ };
1381
+ f.loop = function(a, b) {
1382
+ function c() {
1383
+ d = m(c, b);
1384
+ a(l++);
1385
+ }
1386
+ var l = 0, d;
1387
+ c();
1388
+ return {
1389
+ stop: function() {
1390
+ d && k(d);
1391
+ d = null;
1392
+ }
1393
+ };
1394
+ };
1395
+ return f;
1396
+ }({}, v, w));
1397
+ n.register("$45", function(f, d, h) {
1398
+ function m(a, c, e, q) {
1399
+ if (b) {
1400
+ var l = e;
1401
+ e = function(a) {
1402
+ if ((a.MSPOINTER_TYPE_TOUCH || "touch") === a.pointerType) return l(a);
1403
+ };
1404
+ }
1405
+ a.addEventListener(c, e, q);
1406
+ return {
1407
+ unbind: function() {
1408
+ a.removeEventListener(c, e, q);
1409
+ }
1410
+ };
1411
+ }
1412
+ function k(a) {
1413
+ a.preventDefault();
1414
+ a.stopPropagation();
1415
+ return !1;
1416
+ }
1417
+ var c, b = !!d.navigator.msPointerEnabled, a = b ? "MSPointerDown" : "touchstart", e = b ? "MSPointerMove" : "touchmove", p = b ? "MSPointerUp" : "touchend";
1418
+ f.ok = function(a) {
1419
+ null == c && (c = "function" === typeof h.body.addEventListener);
1420
+ c && a && a(f);
1421
+ return c;
1422
+ };
1423
+ f.ms = function() {
1424
+ return b;
1425
+ };
1426
+ f.dragger = function(b, c) {
1427
+ function l(a) {
1428
+ b.addEventListener(a, d[a], !1);
1429
+ }
1430
+ function q(a) {
1431
+ b.removeEventListener(a, d[a], !1);
1432
+ }
1433
+ var d = {};
1434
+ d[a] = function(b) {
1435
+ g(b, function(e, l) {
1436
+ l.type = a;
1437
+ c(b, l, f);
1438
+ });
1439
+ l(e);
1440
+ l(p);
1441
+ return !0;
1442
+ };
1443
+ d[p] = function(a) {
1444
+ q(e);
1445
+ q(p);
1446
+ g(a, function(b, e) {
1447
+ e.type = p;
1448
+ c(a, e, f);
1449
+ });
1450
+ return !0;
1451
+ };
1452
+ d[e] = function(a) {
1453
+ g(a, function(b, l) {
1454
+ l.type = e;
1455
+ c(a, l, f);
1456
+ });
1457
+ return k(a);
1458
+ };
1459
+ l(a);
1460
+ var f = {
1461
+ kill: function() {
1462
+ q(a);
1463
+ q(e);
1464
+ q(p);
1465
+ b = f = c = null;
1466
+ }
1467
+ };
1468
+ return f;
1469
+ };
1470
+ f.swiper = function(c, d, f) {
1471
+ function q(a) {
1472
+ c.addEventListener(a, u[a], !1);
1473
+ }
1474
+ function D(a) {
1475
+ c.removeEventListener(a, u[a], !1);
1476
+ }
1477
+ function r() {
1478
+ z && z.stop();
1479
+ z = null;
1480
+ }
1481
+ var z, G, C, u = {}, x = [], F = [], h = [];
1482
+ u[a] = function(a) {
1483
+ G = !1;
1484
+ r();
1485
+ var b = l();
1486
+ g(a, function(a, c) {
1487
+ x[a] = b;
1488
+ F[a] = c.clientX;
1489
+ h[a] = c.clientY;
1490
+ });
1491
+ C = c.scrollLeft;
1492
+ return !0;
1493
+ };
1494
+ u[p] = function(a) {
1495
+ g(a, function(a, b) {
1496
+ var c = l() - x[a], e = F[a] - b.clientX, c = Math.abs(e) / c;
1497
+ d(c, e ? 0 > e ? -1 : 1 : 0);
1498
+ });
1499
+ C = null;
1500
+ return !0;
1501
+ };
1502
+ u[e] = function(a) {
1503
+ var b, e;
1504
+ null == C || g(a, function(a, c) {
1505
+ b = F[a] - c.clientX;
1506
+ e = h[a] - c.clientY;
1507
+ });
1508
+ if (e && Math.abs(e) > Math.abs(b)) return G = !0;
1509
+ b && (G = !0, c.scrollLeft = Math.max(0, C + b));
1510
+ return k(a);
1511
+ };
1512
+ if (!b || f) q(a), q(e), q(p), b && (c.className += " mstouch");
1513
+ return {
1514
+ kill: function() {
1515
+ D(a);
1516
+ D(e);
1517
+ D(p);
1518
+ r();
1519
+ },
1520
+ swiped: function() {
1521
+ return G;
1522
+ },
1523
+ ms: function() {
1524
+ return b;
1525
+ },
1526
+ snap: function(a) {
1527
+ b && !f && (c.style["-ms-scroll-snap-points-x"] = "snapInterval(0px," + a + "px)",
1528
+ c.style["-ms-scroll-snap-type"] = "mandatory", c.style["-ms-scroll-chaining"] = "none");
1529
+ },
1530
+ scroll: function(a, b, e) {
1531
+ r();
1532
+ var x = c.scrollLeft, l = a > x ? 1 : -1, q = Math[1 === l ? "min" : "max"], p = Math.round(16 * b * l);
1533
+ return z = n.require("$48", "fps.js").loop(function(b) {
1534
+ b && (x = Math.max(0, q(a, x + p)), c.scrollLeft = x, a === x && (r(), e && e(x)));
1535
+ }, c);
1536
+ }
1537
+ };
1538
+ };
1539
+ f.start = function(b, c) {
1540
+ return m(b, a, c, !1);
1541
+ };
1542
+ f.move = function(a, b) {
1543
+ return m(a, e, b, !1);
1544
+ };
1545
+ f.end = function(a, b) {
1546
+ return m(a, p, b, !1);
1547
+ };
1548
+ var g = f.each = function(a, c) {
1549
+ if (b) (a.MSPOINTER_TYPE_TOUCH || "touch") === a.pointerType && c(0, a); else for (var e = -1, l = (a.originalEvent || a).changedTouches || []; ++e < l.length; ) c(e, l[e]);
1550
+ }, l = Date.now || function() {
1551
+ return new Date().getTime();
1552
+ };
1553
+ return f;
1554
+ }({}, v, w));
1555
+ n.register("$49", function(f, d, n) {
1556
+ f.init = function(d) {
1557
+ function k() {
1558
+ e.style.top = String(-d.scrollTop) + "px";
1559
+ return !0;
1560
+ }
1561
+ function c() {
1562
+ var a = e;
1563
+ a.textContent = d.value;
1564
+ a.innerHTML = a.innerHTML.replace(/[ \t]/g, b).split(/(?:\n|\r\n?)/).join('<span class="eol crlf"></span>\r\n') + '<span class="eol eof"></span>';
1565
+ return !0;
1566
+ }
1567
+ function b(a) {
1568
+ return '<span class="x' + a.charCodeAt(0).toString(16) + '">' + a + "</span>";
1569
+ }
1570
+ var a = d.parentNode, e = a.insertBefore(n.createElement("div"), d);
1571
+ h(d).on("input", c).on("scroll", k);
1572
+ h(a).addClass("has-mirror");
1573
+ e.className = "ta-mirror";
1574
+ var p = d.offsetWidth - d.clientWidth;
1575
+ 2 < p && (e.style.marginRight = String(p - 2) + "px");
1576
+ c();
1577
+ k();
1578
+ return {
1579
+ kill: function() {
1580
+ h(d).off("input", c).off("scroll", k);
1581
+ a.removeChild(e);
1582
+ e = null;
1583
+ h(a).removeClass("has-mirror");
1584
+ }
1585
+ };
1586
+ };
1587
+ return f;
1588
+ }({}, v, w));
1589
+ n.register("$29", function(f, d, h) {
1590
+ function m(b, a) {
1591
+ for (var c = 0, p = -1, g = a && d[a], l = k[b] || [], f = l.length; ++p < f; ) callback = l[p],
1592
+ "function" === typeof callback && (callback(g), c++);
1593
+ return c;
1594
+ }
1595
+ var k = {}, c;
1596
+ f.load = function(b, a, c) {
1597
+ function p() {
1598
+ f && (clearTimeout(f), f = null);
1599
+ A && (A.onreadystatechange = null, A = A = A.onload = null);
1600
+ b && (delete k[b], b = null);
1601
+ }
1602
+ function g(a, l) {
1603
+ var d = A && A.readyState;
1604
+ if (l || !d || "loaded" === d || "complete" === d) l || m(b, c), p();
1605
+ }
1606
+ function l() {
1607
+ if (0 === m(b)) throw Error('Failed to load "' + (c || b) + '"');
1608
+ p();
1609
+ }
1610
+ if (c && d[c]) "function" === typeof a && a(d[c]); else if (null != k[b]) k[b].push(a); else {
1611
+ k[b] = [ a ];
1612
+ var f = setTimeout(l, 4e3), A = h.createElement("script");
1613
+ A.setAttribute("src", b);
1614
+ A.setAttribute("async", "true");
1615
+ A.onreadystatechange = g;
1616
+ A.onload = g;
1617
+ A.onerror = l;
1618
+ A.onabort = p;
1619
+ h.getElementsByTagName("head")[0].appendChild(A);
1620
+ }
1621
+ };
1622
+ f.stat = function(b) {
1623
+ var a;
1624
+ if (!(a = c)) {
1625
+ for (var e, d, g = h.getElementsByTagName("script"), l = -1, k = g.length; ++l < k; ) if (a = g[l].getAttribute("src")) if (e = a.indexOf("/lib/vendor"),
1626
+ -1 !== e) {
1627
+ d = a.substr(0, e);
1628
+ break;
1629
+ }
1630
+ a = c = d || "/static";
1631
+ }
1632
+ return a + b;
1633
+ };
1634
+ return f;
1635
+ }({}, v, w));
1636
+ n.register("$16", function(f, d, E) {
1637
+ function m(a, b) {
1638
+ a.setReadOnly(!1);
1639
+ a.on("change", function(a, c) {
1640
+ return b.val(c.getValue());
1641
+ });
1642
+ a.on("focus", function() {
1643
+ return b.focus();
1644
+ });
1645
+ a.on("blur", function() {
1646
+ return b.blur();
1647
+ });
1648
+ }
1649
+ function k(a) {
1650
+ a.off("change");
1651
+ a.off("focus");
1652
+ a.off("blur");
1653
+ }
1654
+ function c(a) {
1655
+ k(a);
1656
+ a.setReadOnly(!0);
1657
+ a.setHighlightGutterLine(!1);
1658
+ a.setHighlightActiveLine(!1);
1659
+ }
1660
+ function b(b, c) {
1661
+ function e() {
1662
+ this.HighlightRules = d;
1663
+ }
1664
+ var d = a(c), q = b.require, p = q("ace/lib/oop");
1665
+ p.inherits(d, q("ace/mode/text_highlight_rules").TextHighlightRules);
1666
+ p.inherits(e, q("ace/mode/text").Mode);
1667
+ return new e();
1668
+ }
1669
+ function a(a) {
1670
+ return function() {
1671
+ var b = {
1672
+ start: [ {
1673
+ token: "empty_line",
1674
+ regex: /^$/
1675
+ }, {
1676
+ token: "constant.language",
1677
+ regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
1678
+ }, {
1679
+ token: "constant.language",
1680
+ regex: /<!\[CDATA\[/
1681
+ }, {
1682
+ token: "constant.language",
1683
+ regex: /\]\]>/
1684
+ }, {
1685
+ token: "locked",
1686
+ regex: /<(?:xliff:)?(?:g|ph)[^>]*>[^<]*<\/(?:xliff:)?(?:g|ph)>/
1687
+ }, {
1688
+ token: "locked",
1689
+ regex: /<(?:xliff:)?(bx|ex|x)[^\/>]*\/>/
1690
+ }, {
1691
+ token: "constant.language",
1692
+ regex: /<\/?[:a-z]+[^>]*>/
1693
+ } ]
1694
+ }, c = e(a);
1695
+ "icu" === a ? b = {
1696
+ start: b.start.concat([ {
1697
+ token: "icu-quoted",
1698
+ regex: /'([{}][^']*)?'/
1699
+ }, {
1700
+ token: "printf",
1701
+ regex: "{[^!-/:-@\\[-^{-~¡¢£¤¥¦§©«¬®°±¶»¿×÷\\u2010-\\u2027\\u2030-\\u203E\\u2041-\\u2053\\u2055-\\u205E\\u2190-\\u245F\\u2500-\\u2775\\u2794-\\u2BFF\\u2E00-\\u2E7F\\u3001-\\u3003\\u3008-\\u3020\\u3030\\uFD3E\\uFD3F\\uFE45\\uFE46]+(,[\\s\\u0085\\u200E\\u200F\\u2028\\u2029]*(?:number|date|time|spellout|ordinal|duration)[\\s\\u0085\\u200E\\u200F\\u2028\\u2029]*(,[\\s\\u0085\\u200E\\u200F\\u2028\\u2029]*[^{}]+)?)?}"
1702
+ }, {
1703
+ token: "icu",
1704
+ regex: /{/,
1705
+ next: "icuName"
1706
+ }, {
1707
+ token: "icu",
1708
+ regex: /}/,
1709
+ next: "icuType"
1710
+ } ]),
1711
+ icuName: [ {
1712
+ token: "icu",
1713
+ regex: "[\\s\\u0085\\u200E\\u200F\\u2028\\u2029]+"
1714
+ }, {
1715
+ token: "icu.name",
1716
+ regex: "[^\\s\\u0085\\u200E\\u200F\\u2028\\u2029!-/:-@\\[-^{-~¡¢£¤¥¦§©«¬®°±¶»¿×÷\\u2010-\\u2027\\u2030-\\u203E\\u2041-\\u2053\\u2055-\\u205E\\u2190-\\u245F\\u2500-\\u2775\\u2794-\\u2BFF\\u2E00-\\u2E7F\\u3001-\\u3003\\u3008-\\u3020\\u3030\\uFD3E\\uFD3F\\uFE45\\uFE46]+",
1717
+ next: "icuType"
1718
+ }, {
1719
+ defaultToken: "icu",
1720
+ next: "icuType"
1721
+ } ],
1722
+ icuType: [ {
1723
+ token: "icu",
1724
+ regex: /[{}]/,
1725
+ next: "start"
1726
+ }, {
1727
+ defaultToken: "icu"
1728
+ } ]
1729
+ } : c && b.start.push({
1730
+ token: "printf",
1731
+ regex: c
1732
+ });
1733
+ this.$rules = b;
1734
+ };
1735
+ }
1736
+ function e(a) {
1737
+ switch (a) {
1738
+ case "objc":
1739
+ return /%(?:\d+\$)?[-+'0# ]*\d*(?:\.\d+|\.\*(?:\d+\$)?)?(?:hh?|ll?|[qjzTL])?[sScCdDioOuUxXfFeEgGaAp%@]/;
1740
+
1741
+ case "java":
1742
+ return /%(?:\d+\$)?[-+,(0# ]*\d*(?:\.\d+)?(?:[bBhHsScCdoxXeEfgGaA%n]|[tT][HIklMSLNpzZsQBbhAaCYyjmdeRTrDFc])/;
1743
+
1744
+ case "php":
1745
+ return /%(?:\d+\$)?(?:'.|[-+0 ])*\d*(?:\.\d+)?[suxXbcdeEfFgGo%]/;
1746
+
1747
+ case "python":
1748
+ return /%(?:\([_A-Za-z][_A-Za-z0-9]*\))?[-+0# ]*(?:\d+|\*)?(?:\.\d+|\.\*)?(?:[hlL])?[sdiouxXeEfFgGcra%]/;
1749
+
1750
+ case "javascript":
1751
+ return /%(?:[1-9]\d*\$)?\+?(?:0|'[^$])?-?\d*(?:\.\d+)?[b-gijostTuvxX%]/;
1752
+
1753
+ case "auto":
1754
+ return /%(?:\d+\$|\([_A-Za-z][_A-Za-z0-9]*\))?(?:[-+0]?\d*(\.\d+)?[duxoefgaDUXOEFGA]|[@scSC%])/;
1755
+
1756
+ case g:
1757
+ return p || "%%";
1758
+ }
1759
+ }
1760
+ var p, g = "auto";
1761
+ f.init = function(a, e, p) {
1762
+ var f, q = !1, D = p || g, r = a.parentNode, z = r.appendChild(E.createElement("div"));
1763
+ h(r).addClass("has-proxy has-ace");
1764
+ n.require("$29", "remote.js").load("https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.1/ace.js", function(d) {
1765
+ if (z) {
1766
+ if (!d) throw Error("Failed to load code editor");
1767
+ f = d.edit(z);
1768
+ var p = f.session, g = f.renderer;
1769
+ f.$blockScrolling = Infinity;
1770
+ f.setShowInvisibles(q);
1771
+ f.setWrapBehavioursEnabled(!1);
1772
+ f.setBehavioursEnabled(!1);
1773
+ f.setHighlightActiveLine(!1);
1774
+ p.setUseSoftTabs(!1);
1775
+ g.setShowGutter(!0);
1776
+ g.setPadding(10);
1777
+ g.setScrollMargin(8);
1778
+ p.setMode(b(d, D));
1779
+ f.setValue(a.value, -1);
1780
+ p.setUseWrapMode(!0);
1781
+ e ? m(f, e) : c(f);
1782
+ }
1783
+ }, "ace");
1784
+ return {
1785
+ kill: function() {
1786
+ f && (k(f), f.destroy(), f = null);
1787
+ z && (r.removeChild(z), h(r).removeClass("has-proxy has-ace"), z = null);
1788
+ return this;
1789
+ },
1790
+ disable: function() {
1791
+ f && c(f);
1792
+ e = null;
1793
+ return this;
1794
+ },
1795
+ enable: function(a) {
1796
+ e = a;
1797
+ f && m(f, a);
1798
+ return this;
1799
+ },
1800
+ resize: function() {
1801
+ f && f.resize();
1802
+ return this;
1803
+ },
1804
+ val: function(a) {
1805
+ f && a !== f.getValue() && f.setValue(a, -1);
1806
+ return this;
1807
+ },
1808
+ invs: function(a) {
1809
+ a = a || !1;
1810
+ q !== a && (q = a, f && f.setShowInvisibles(a));
1811
+ return this;
1812
+ },
1813
+ strf: function(a) {
1814
+ a = a || g;
1815
+ a !== D && (D = a, f && f.session.setMode(b(d.ace, a)));
1816
+ return this;
1817
+ },
1818
+ focus: function() {
1819
+ return this;
1820
+ }
1821
+ };
1822
+ };
1823
+ f.strf = function(a, b) {
1824
+ g = a;
1825
+ p = b;
1826
+ return f;
1827
+ };
1828
+ return f;
1829
+ }({}, v, w));
1830
+ n.register("$50", function(f, d, E) {
1831
+ function m(a, b) {
1832
+ function c() {
1833
+ return b.val(a.getContent());
1834
+ }
1835
+ a.on("input", c);
1836
+ a.on("change", c);
1837
+ a.on("focus", function() {
1838
+ return b.focus();
1839
+ });
1840
+ a.on("blur", function() {
1841
+ return b.blur();
1842
+ });
1843
+ a.setMode("design");
1844
+ }
1845
+ function k(a) {
1846
+ a.off("input");
1847
+ a.off("change");
1848
+ a.off("focus");
1849
+ a.off("blur");
1850
+ }
1851
+ function c(a) {
1852
+ k(a);
1853
+ a.setMode("readonly");
1854
+ }
1855
+ var b = 0;
1856
+ f.load = function(a) {
1857
+ var b = n.require("$29", "remote.js");
1858
+ b.load(b.stat("/lib/tinymce.min.js"), a, "tinymce");
1859
+ return f;
1860
+ };
1861
+ f.init = function(a, e) {
1862
+ function d(a) {
1863
+ A = a;
1864
+ s = "<p>" === a.substr(0, 3) && "</p>" === a.substr(-4);
1865
+ return a.replace(/(<\/?)script/gi, "$1loco:script");
1866
+ }
1867
+ function g(a) {
1868
+ l = a;
1869
+ a._getContent = a.getContent;
1870
+ a.getContent = function(a) {
1871
+ a = this._getContent(a);
1872
+ a = a.replace(/(<\/?)loco:script/gi, "$1script");
1873
+ if (!s && "<p>" === a.substr(0, 3) && "</p>" === a.substr(-4)) {
1874
+ var b = a.substr(3, a.length - 7);
1875
+ if (b === A || -1 === b.indexOf("</p>")) a = b;
1876
+ }
1877
+ return a;
1878
+ };
1879
+ a._setContent = a.setContent;
1880
+ a.setContent = function(a, b) {
1881
+ return this._setContent(d(a), b);
1882
+ };
1883
+ e ? (m(a, e), e.reset()) : c(a);
1884
+ h(r).removeClass("loading");
1885
+ }
1886
+ var l, y = !1, A = "", s = !1, q = a.parentNode, D = q.parentNode, r = q.appendChild(E.createElement("div")), z = D.insertBefore(E.createElement("nav"), q);
1887
+ z.id = "_tb" + String(++b);
1888
+ h(q).addClass("has-proxy has-mce");
1889
+ h(r).addClass("mce-content-body loading").html(d(a.value));
1890
+ f.load(function(a) {
1891
+ if (!a) throw Error("Failed to load HTML editor");
1892
+ r && a.init({
1893
+ inline: !0,
1894
+ target: r,
1895
+ hidden_input: !1,
1896
+ theme: "modern",
1897
+ skin: !1,
1898
+ plugins: "link lists",
1899
+ browser_spellcheck: !0,
1900
+ menubar: !1,
1901
+ fixed_toolbar_container: "#" + z.id,
1902
+ toolbar: "formatselect | bold italic link unlink | bullist numlist outdent indent",
1903
+ block_formats: "Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h4;Heading 4=h4;Heading 5=h5;Heading 6=h6;",
1904
+ forced_root_block: "p",
1905
+ relative_urls: !1,
1906
+ convert_urls: !1,
1907
+ remove_script_host: !1,
1908
+ document_base_url: "",
1909
+ allow_script_urls: !1,
1910
+ formats: {
1911
+ alignleft: {
1912
+ classes: "alignleft"
1913
+ },
1914
+ alignright: {
1915
+ selector: "p,h1,h2,h3,h4,span,strong,em,a",
1916
+ classes: "alignright"
1917
+ },
1918
+ aligncenter: {
1919
+ selector: "p,h1,h2,h3,h4,span,strong,em,a",
1920
+ classes: "aligncenter"
1921
+ },
1922
+ strikethrough: {
1923
+ inline: "del"
1924
+ }
1925
+ },
1926
+ fix_list_elements: !0,
1927
+ extended_valid_elements: "span,b,i,u,loco:script",
1928
+ entities: "38,amp,60,lt,62,gt,160,nbsp",
1929
+ entity_encoding: "named",
1930
+ keep_styles: !1,
1931
+ init_instance_callback: g
1932
+ });
1933
+ });
1934
+ return {
1935
+ val: function(b) {
1936
+ b = d(b);
1937
+ null == l ? (a.value = b, h(r).html(b)) : l.getContent() !== b && l.setContent(b);
1938
+ e && e.val(b);
1939
+ return this;
1940
+ },
1941
+ kill: function() {
1942
+ l && (e && e.val(l.getContent()), k(l), l.destroy(), l = null);
1943
+ r && (q.removeChild(r), h(q).removeClass("has-proxy has-mce"), r = null);
1944
+ z && (D.removeChild(z), z = null);
1945
+ return this;
1946
+ },
1947
+ enable: function(a) {
1948
+ e = a;
1949
+ l && m(l, a);
1950
+ return this;
1951
+ },
1952
+ disable: function() {
1953
+ l && c(l);
1954
+ e = null;
1955
+ return this;
1956
+ },
1957
+ focus: function() {
1958
+ l && e && l.focus();
1959
+ return this;
1960
+ },
1961
+ invs: function(a) {
1962
+ a = a || !1;
1963
+ y !== a && (y = a, h(q)[a ? "addClass" : "removeClass"]("show-invs"));
1964
+ return this;
1965
+ }
1966
+ };
1967
+ };
1968
+ return f;
1969
+ }({}, v, w));
1970
+ n.register("$46", function(f, d, E) {
1971
+ function m(b) {
1972
+ function a() {
1973
+ k && (f.off("input", e), k = !1);
1974
+ }
1975
+ function e() {
1976
+ var a = b.value;
1977
+ a !== q && (f.trigger("changing", [ a, q ]), q = a);
1978
+ }
1979
+ function d() {
1980
+ e();
1981
+ k && D !== q && f.trigger("changed", [ q ]);
1982
+ }
1983
+ function g() {
1984
+ c = b;
1985
+ D = q;
1986
+ k || (f.on("input", e), k = !0);
1987
+ f.trigger("editFocus");
1988
+ s.addClass("has-focus");
1989
+ return !0;
1990
+ }
1991
+ function l() {
1992
+ c === b && (c = null);
1993
+ f.trigger("editBlur");
1994
+ s.removeClass("has-focus");
1995
+ k && (d(), a());
1996
+ return !0;
1997
+ }
1998
+ var k = !1, f = h(b), s = h(b.parentNode), q = b.value, D;
1999
+ f.on("blur", l).on("focus", g);
2000
+ return {
2001
+ val: function(a) {
2002
+ q !== a && (b.value = a, f.triggerHandler("input"), q = a);
2003
+ return !0;
2004
+ },
2005
+ kill: function() {
2006
+ a();
2007
+ f.off("blur", l).off("focus", g);
2008
+ },
2009
+ fire: function() {
2010
+ q = null;
2011
+ e();
2012
+ },
2013
+ ping: d,
2014
+ blur: l,
2015
+ focus: g,
2016
+ reset: function() {
2017
+ D = q = b.value;
2018
+ }
2019
+ };
2020
+ }
2021
+ function k(b) {
2022
+ this.e = b;
2023
+ }
2024
+ var c;
2025
+ f._new = function(b) {
2026
+ return new k(b);
2027
+ };
2028
+ f.init = function(b) {
2029
+ var a = new k(b);
2030
+ b.disabled ? (b.removeAttribute("disabled"), a.disable()) : b.readOnly ? a.disable() : a.enable();
2031
+ return a;
2032
+ };
2033
+ TextAreaPrototype = k.prototype;
2034
+ TextAreaPrototype.destroy = function() {
2035
+ this.unlisten();
2036
+ var b = this.p;
2037
+ b && (b.kill(), this.p = null);
2038
+ this.e = null;
2039
+ };
2040
+ TextAreaPrototype.reload = function(b, a) {
2041
+ var c = this.l;
2042
+ c && !a && (this.disable(), c = null);
2043
+ this.val(b || "");
2044
+ a && !c && this.enable();
2045
+ return this;
2046
+ };
2047
+ TextAreaPrototype.val = function(b) {
2048
+ var a = this.e;
2049
+ if (null == b) return a.value;
2050
+ var c = this.l, d = this.p;
2051
+ d && d.val(b);
2052
+ c && c.val(b);
2053
+ c || a.value === b || (a.value = b, h(a).triggerHandler("input"));
2054
+ return this;
2055
+ };
2056
+ TextAreaPrototype.fire = function() {
2057
+ this.l && this.l.fire();
2058
+ return this;
2059
+ };
2060
+ TextAreaPrototype.ping = function() {
2061
+ this.l && this.l.ping();
2062
+ return this;
2063
+ };
2064
+ TextAreaPrototype.focus = function() {
2065
+ var b = this.p;
2066
+ b ? b.focus() : h(this.e).focus();
2067
+ };
2068
+ TextAreaPrototype.focused = function() {
2069
+ return c && c === this.el;
2070
+ };
2071
+ TextAreaPrototype.parent = function() {
2072
+ return this.e.parentNode;
2073
+ };
2074
+ TextAreaPrototype.attr = function(b, a) {
2075
+ var c = this.e;
2076
+ if (1 === arguments.length) return c.getAttribute(b);
2077
+ null == a ? c.removeAttribute(b) : c.setAttribute(b, a);
2078
+ return this;
2079
+ };
2080
+ TextAreaPrototype.editable = function() {
2081
+ return !!this.l;
2082
+ };
2083
+ TextAreaPrototype.enable = function() {
2084
+ var b = this.p;
2085
+ this.e.removeAttribute("readonly");
2086
+ this.listen();
2087
+ b && b.enable && b.enable(this.l);
2088
+ return this;
2089
+ };
2090
+ TextAreaPrototype.disable = function() {
2091
+ var b = this.p;
2092
+ this.e.setAttribute("readonly", !0);
2093
+ this.unlisten();
2094
+ b && b.disable && b.disable();
2095
+ return this;
2096
+ };
2097
+ TextAreaPrototype.listen = function() {
2098
+ var b = this.l;
2099
+ b && b.kill();
2100
+ this.l = m(this.e);
2101
+ return this;
2102
+ };
2103
+ TextAreaPrototype.unlisten = function() {
2104
+ var b = this.l;
2105
+ b && (b.kill(), this.l = null);
2106
+ return this;
2107
+ };
2108
+ TextAreaPrototype.setInvs = function(b, a) {
2109
+ var c = this.i || !1;
2110
+ if (a || c !== b) this._i && (this._i.kill(), delete this._i), (c = this.p) ? c.invs && c.invs(b) : b && (this._i = n.require("$49", "mirror.js").init(this.e)),
2111
+ this.i = b;
2112
+ return this;
2113
+ };
2114
+ TextAreaPrototype.getInvs = function() {
2115
+ return this.i || !1;
2116
+ };
2117
+ TextAreaPrototype.setMode = function(b) {
2118
+ var a = this.p, e = this.i || !1;
2119
+ b !== (this.m || "") && (this.m = b, a && a.kill(), this.p = a = "code" === b ? n.require("$16", "ace.js").init(this.e, this.l, this["%"]) : "html" === b ? n.require("$50", "mce.js").init(this.e, this.l) : null,
2120
+ this.setInvs(e, !0), c && this.focus());
2121
+ return this;
2122
+ };
2123
+ TextAreaPrototype.setStrf = function(b) {
2124
+ this["%"] = b;
2125
+ "code" === this.m && this.p.strf(b);
2126
+ return this;
2127
+ };
2128
+ TextAreaPrototype.name = function(b) {
2129
+ this.e.setAttribute("name", b);
2130
+ return this;
2131
+ };
2132
+ TextAreaPrototype.placeholder = function(b) {
2133
+ this.e.setAttribute("placeholder", b);
2134
+ return this;
2135
+ };
2136
+ TextAreaPrototype.redraw = function() {
2137
+ var b = this.p;
2138
+ b && b.resize && b.resize();
2139
+ };
2140
+ TextAreaPrototype = null;
2141
+ return f;
2142
+ }({}, v, w));
2143
+ n.register("$47", function(f, d, n) {
2144
+ function m(a) {
2145
+ var b = d.console;
2146
+ b && b.error && b.error(a);
2147
+ }
2148
+ function k(a) {
2149
+ var b = n.createElement("div");
2150
+ a && b.setAttribute("class", a);
2151
+ return b;
2152
+ }
2153
+ function c(a) {
2154
+ return function() {
2155
+ a.resize();
2156
+ return this;
2157
+ };
2158
+ }
2159
+ function b(a) {
2160
+ return function(b) {
2161
+ for (var c = b.target, e = c.$index; null == e && "DIV" !== c.nodeName && (c = c.parentElement); ) e = c.$index;
2162
+ null != e && (b.stopImmediatePropagation(), a.select(e));
2163
+ return !0;
2164
+ };
2165
+ }
2166
+ function a(a) {
2167
+ return function() {
2168
+ a.redrawDirty() && a.redraw();
2169
+ return !0;
2170
+ };
2171
+ }
2172
+ function e(a) {
2173
+ return function(b) {
2174
+ var c;
2175
+ c = b.keyCode;
2176
+ if (40 === c) c = 1; else if (38 === c) c = -1; else return !0;
2177
+ if (b.shiftKey || b.ctrlKey || b.metaKey || b.altKey) return !0;
2178
+ a.selectNext(c);
2179
+ b.stopPropagation();
2180
+ b.preventDefault();
2181
+ return !1;
2182
+ };
2183
+ }
2184
+ function p(a, b, c) {
2185
+ function e(a) {
2186
+ m("row[" + a + "] disappeared");
2187
+ return {
2188
+ cellVal: function() {
2189
+ return "";
2190
+ }
2191
+ };
2192
+ }
2193
+ return function(d) {
2194
+ var l = b || 0, k = c ? -1 : 1, x = a.rows || [];
2195
+ d.sort(function(a, b) {
2196
+ return k * (x[a] || e(a)).cellVal(l).localeCompare((x[b] || e(b)).cellVal(l));
2197
+ });
2198
+ };
2199
+ }
2200
+ function g(a) {
2201
+ this.w = a;
2202
+ }
2203
+ function l(a) {
2204
+ this.t = a;
2205
+ this.length = 0;
2206
+ }
2207
+ function y(a, b, c) {
2208
+ var e = n.createElement("div");
2209
+ e.className = c || "";
2210
+ this._ = e;
2211
+ this.d = b || [];
2212
+ this.i = a || 0;
2213
+ this.length = b.length;
2214
+ }
2215
+ function A(a) {
2216
+ this.live = a;
2217
+ this.rows = [];
2218
+ }
2219
+ f.create = function(a) {
2220
+ return new g(a);
2221
+ };
2222
+ var s = g.prototype;
2223
+ s.init = function(d) {
2224
+ var l = this.w, p = l.id, g = l.splity(p + "-thead", p + "-tbody"), f = g[0], g = g[1], C = [], u = [], x = [], F = [];
2225
+ if (d) this.ds = d, this.idxs = u, this._idxs = null; else if (!(d = this.ds)) throw Error("No datasource");
2226
+ f.css.push("wg-thead");
2227
+ g.css.push("wg-tbody");
2228
+ d.eachCol(function(a, b, c) {
2229
+ x[a] = p + "-col-" + b;
2230
+ F[a] = c || b;
2231
+ });
2232
+ for (var N = k(), s = -1, m = x.length, n = k("wg-cols"), A = f.splitx.apply(f, x); ++s < m; ) A[s].header(F[s]),
2233
+ n.appendChild(N.cloneNode(!1)).setAttribute("for", x[s]);
2234
+ d.eachRow(function(a, b, c) {
2235
+ C[a] = new y(a, b, c);
2236
+ u[a] = a;
2237
+ });
2238
+ this.rows = C;
2239
+ this.cols = n;
2240
+ this.ww = null;
2241
+ this.root = N = g.body;
2242
+ this.head = f;
2243
+ f.redraw = c(this);
2244
+ f = g.fixed = A[0].bodyY() || 20;
2245
+ l.lock().resize(f, g);
2246
+ l.css.push("is-table");
2247
+ l.restyle();
2248
+ this.sc ? this._re_sort(m) : d.sort && d.sort(u);
2249
+ this.redrawDirty();
2250
+ this.render();
2251
+ h(N).attr("tabindex", "-1").on("keydown", e(this)).on("mousedown", b(this)).on("scroll", a(this));
2252
+ return this;
2253
+ };
2254
+ s.clear = function() {
2255
+ for (var a = this.pages || [], b = a.length; 0 !== b--; ) a[b].destroy();
2256
+ this.pages = [];
2257
+ this.sy = this.mx = this.mn = this.vh = null;
2258
+ void 0;
2259
+ return this;
2260
+ };
2261
+ s.render = function() {
2262
+ for (var a, b, c = [], e = this.rows || [], d = -1, l, g = this.idxs, x = g.length, p = this.idxr = {}, k = this.r, f = this._r, h = this.root, y = this.cols; ++d < x; ) {
2263
+ 0 === d % 100 && (a = y.cloneNode(!0), b = new A(a), b.h = 2200, b.insert(h), c.push(b));
2264
+ l = g[d];
2265
+ p[l] = d;
2266
+ a = e[l];
2267
+ if (null == a) throw Error("Render error, no data at [" + l + "]");
2268
+ a.page = b;
2269
+ b.rows.push(a);
2270
+ }
2271
+ b && 100 !== b.size() && b.sleepH(22);
2272
+ this.pages = c;
2273
+ this.mx = this.mn = null;
2274
+ this.redrawDirty();
2275
+ this.redraw();
2276
+ null == k ? null != f && (a = e[f]) && a.page && (delete this._r, this.select(f, !0)) : (a = e[k]) && a.page ? this.select(k, !0) : (this.deselect(),
2277
+ this._r = k);
2278
+ return this;
2279
+ };
2280
+ s.resize = function() {
2281
+ var a = -1, b = this.ww || (this.ww = []), c = this.w, e = c.cells[0], d = e.body.childNodes, l = d.length, g = this.pages || [], x = g.length;
2282
+ for (c.redraw.call(e); ++a < l; ) b[a] = d[a].style.width;
2283
+ if (x) {
2284
+ c = this.mx;
2285
+ for (a = this.mn; a <= c; a++) g[a].widths(b);
2286
+ this.redrawDirty() && this.redraw();
2287
+ }
2288
+ };
2289
+ s.redrawDirty = function() {
2290
+ var a = !1, b = this.root, c = b.scrollTop, b = b.clientHeight;
2291
+ this.sy !== c && (a = !0, this.sy = c);
2292
+ this.vh !== b && (a = !0, this.vh = b);
2293
+ return a;
2294
+ };
2295
+ s.redraw = function() {
2296
+ for (var a = 0, b = -1, c = null, e = null, d = this.ww, l = this.sy, g = this.vh, x = this.mn, k = this.mx, p = Math.max(0, l - 100), l = g + l + 100, f = this.pages || [], h = f.length; ++b < h && !(a > l); ) g = f[b],
2297
+ a += g.height(), a < p || (null === c && (c = b), e = b, g.rendered || g.render(d));
2298
+ if (x !== c) {
2299
+ if (null !== x && c > x) for (b = x; b < c; b++) {
2300
+ g = f[b];
2301
+ if (!g) throw Error("Shit!");
2302
+ g.rendered && g.sleep();
2303
+ }
2304
+ this.mn = c;
2305
+ }
2306
+ if (k !== e) {
2307
+ if (null !== k && e < k) for (b = k; b > e; b--) g = f[b], g.rendered && g.sleep();
2308
+ this.mx = e;
2309
+ }
2310
+ };
2311
+ s.selected = function() {
2312
+ return this.r;
2313
+ };
2314
+ s.thead = function() {
2315
+ return this.w.cells[0];
2316
+ };
2317
+ s.tbody = function() {
2318
+ return this.w.cells[1];
2319
+ };
2320
+ s.tr = function(a) {
2321
+ return (a = this.row(a)) ? a.cells() : [];
2322
+ };
2323
+ s.row = function(a) {
2324
+ return this.rows[a];
2325
+ };
2326
+ s.td = function(a, b) {
2327
+ return this.tr(a)[b];
2328
+ };
2329
+ s.next = function(a, b, c) {
2330
+ null == c && (c = this.r || 0);
2331
+ var e = this.idxs, d = e.length, g = (this.idxr || {})[c];
2332
+ for (c = g; c !== (g += a) && !(0 <= g && d > g); ) if (b && d) g = 1 === a ? -1 : d,
2333
+ b = !1; else return null;
2334
+ c = e[g];
2335
+ return null == c || null == this.rows[c] ? (m("Bad next: [" + g + "] does not map to data row"),
2336
+ null) : c;
2337
+ };
2338
+ s.selectNext = function(a, b, c) {
2339
+ a = this.next(a, b);
2340
+ null != a && this.r !== a && this.select(a, c);
2341
+ return this;
2342
+ };
2343
+ s.deselect = function(a) {
2344
+ var b = this.r;
2345
+ null != b && (this.r = null, h(this.tr(b)).removeClass("selected"), this.w.fire("wgRowDeselect", [ b, a ]));
2346
+ return this;
2347
+ };
2348
+ s.selectRow = function(a, b) {
2349
+ return this.select(this.idxs[a]);
2350
+ };
2351
+ s.select = function(a, b) {
2352
+ var c = this.rows[a], e = c && c.page;
2353
+ if (!e) return this.deselect(!1), m("Row is filtered out"), this;
2354
+ this.deselect(!0);
2355
+ var d, g = this.w.cells[1];
2356
+ e.rendered || (d = e.top(), g.scrollY(d), this.redrawDirty() && this.redraw());
2357
+ if (!c.rendered) return e.rendered || m("Failed to render page"), m("Row [" + c.i + "] not rendered"),
2358
+ this;
2359
+ e = c.cells();
2360
+ h(e).addClass("selected");
2361
+ this.r = a;
2362
+ b || (d = g.scrollY(), h(this.root).focus(), d !== g.scrollY() && g.scrollY(d));
2363
+ g.scrollTo(e[0], !0);
2364
+ this.w.fire("wgRowSelect", [ a, c.data() ]);
2365
+ return this;
2366
+ };
2367
+ s.unfilter = function() {
2368
+ this._idxs && (this.idxs = this._sort(this._idxs), this._idxs = null, this.clear().render());
2369
+ return this;
2370
+ };
2371
+ s.filter = function(a) {
2372
+ this._idxs || (this._idxs = this.idxs);
2373
+ this.idxs = this._sort(a);
2374
+ return this.clear().render();
2375
+ };
2376
+ s.each = function(a) {
2377
+ for (var b, c = -1, e = this.rows || [], d = this.idxs || [], g = d.length; ++c < g; ) b = d[c],
2378
+ a(e[b], c, b);
2379
+ return this;
2380
+ };
2381
+ s.sortable = function(a) {
2382
+ var b = this.sc || (this.sc = new l(this));
2383
+ b.has(a) || b.add(a);
2384
+ return this;
2385
+ };
2386
+ s._re_sort = function(a) {
2387
+ var b = -1, c = this.sc, e = c.active;
2388
+ for (this.sc = c = new l(this); ++b < a; ) c.add(b);
2389
+ e && (b = this.head.indexOf(e.id), -1 === b && (b = Math.min(e.idx, a - 1)), this.sort(b, e.desc));
2390
+ return this;
2391
+ };
2392
+ s._sort = function(a, b) {
2393
+ b ? (this.s = b, b(a)) : (b = this.s) && b(a);
2394
+ return a;
2395
+ };
2396
+ s.sort = function(a, b) {
2397
+ this._sort(this.idxs, p(this, a, b));
2398
+ this.sc.activate(a, b);
2399
+ return this;
2400
+ };
2401
+ s = null;
2402
+ s = l.prototype;
2403
+ s.has = function(a) {
2404
+ return null != this[a];
2405
+ };
2406
+ s.add = function(a) {
2407
+ var b = this, c = b.t.head.cells[a];
2408
+ b[a] = {
2409
+ desc: null,
2410
+ idx: a,
2411
+ id: c.id
2412
+ };
2413
+ b.length++;
2414
+ c.addClass("wg-sortable").on("click", function(c) {
2415
+ if ("header" === c.target.nodeName.toLowerCase()) return c.stopImmediatePropagation(),
2416
+ b.toggle(a), !1;
2417
+ });
2418
+ return b;
2419
+ };
2420
+ s.toggle = function(a) {
2421
+ this.t.sort(a, !this[a].desc).clear().render();
2422
+ return this;
2423
+ };
2424
+ s.activate = function(a, b) {
2425
+ var c, e;
2426
+ c = this.active;
2427
+ var d = this[a], g = this.t.head.cells;
2428
+ c && (e = g[c.idx]) && (e.removeClass(c.css), c !== d && e.restyle());
2429
+ (e = g[a]) ? (d.desc = b, this.active = d, c = "wg-" + (b ? "desc" : "asc"), e.addClass(c).restyle(),
2430
+ d.css = c) : this.active = null;
2431
+ return this;
2432
+ };
2433
+ s = null;
2434
+ s = y.prototype;
2435
+ s.render = function(a) {
2436
+ var b, c = [], e = this._, d = this.length;
2437
+ if (e) {
2438
+ for (this.c = c; 0 !== d--; ) b = e.cloneNode(!1), c[d] = this.update(d, b), b.$index = this.i,
2439
+ a[d].appendChild(b);
2440
+ this._ = null;
2441
+ } else for (c = this.c; 0 !== d--; ) a[d].appendChild(c[d]);
2442
+ this.rendered = !0;
2443
+ return this;
2444
+ };
2445
+ s.update = function(a, b) {
2446
+ var c = b || this.c[a] || {}, e = (this.d[a] || function() {})() || " ";
2447
+ null == e.innerHTML ? c.textContent = e : c.innerHTML = e.innerHTML;
2448
+ return c;
2449
+ };
2450
+ s.cells = function() {
2451
+ return this.c || [ this._ ];
2452
+ };
2453
+ s.data = function() {
2454
+ for (var a = -1, b = [], c = this.length; ++a < c; ) b[a] = this.cellVal(a);
2455
+ return b;
2456
+ };
2457
+ s.destroy = function() {
2458
+ this.page = null;
2459
+ this.rendered = !1;
2460
+ };
2461
+ s.cellVal = function(a) {
2462
+ a = this.d[a]() || "";
2463
+ return String(a.textContent || a);
2464
+ };
2465
+ s = null;
2466
+ s = A.prototype;
2467
+ s.size = function() {
2468
+ return this.rows.length;
2469
+ };
2470
+ s.insert = function(a) {
2471
+ var b = this.h, c = k("wg-dead");
2472
+ c.style.height = String(b) + "px";
2473
+ a.appendChild(c);
2474
+ return this.dead = c;
2475
+ };
2476
+ s.top = function() {
2477
+ return (this.rendered ? this.live : this.dead).offsetTop;
2478
+ };
2479
+ s.height = function() {
2480
+ var a = this.h;
2481
+ null == a && (this.h = a = this.rendered ? this.live.firstChild.offsetHeight : this.dead.offsetHight);
2482
+ a || m("row has zero height");
2483
+ return a;
2484
+ };
2485
+ s.render = function(a) {
2486
+ for (var b, c = -1, e = this.rows, d = e.length, g = this.dead, l = this.live, x = l.childNodes; ++c < d; ) b = e[c],
2487
+ b.rendered || b.render(x);
2488
+ d = a.length;
2489
+ for (c = 0; c < d; c++) x[c].style.width = a[c];
2490
+ g.parentNode.replaceChild(l, g);
2491
+ this.rendered = !0;
2492
+ this.h = null;
2493
+ return this;
2494
+ };
2495
+ s.sleep = function() {
2496
+ var a = this.height(), b = this.live, c = this.dead;
2497
+ c.style.height = String(a) + "px";
2498
+ b.parentNode.replaceChild(c, b);
2499
+ this.rendered = !1;
2500
+ this.h = a;
2501
+ return this;
2502
+ };
2503
+ s.sleepH = function(a) {
2504
+ a *= this.rows.length;
2505
+ var b = this.dead;
2506
+ b && (b.style.height = String(a) + "px");
2507
+ this.rendered || (this.h = a);
2508
+ return this;
2509
+ };
2510
+ s.widths = function(a) {
2511
+ for (var b = this.live.childNodes, c = a.length; 0 !== c--; ) b[c].style.width = a[c];
2512
+ return this;
2513
+ };
2514
+ s.destroy = function() {
2515
+ var a = this.rendered ? this.live : this.dead, b = this.rows, c = b.length;
2516
+ for (a.parentNode.removeChild(a); 0 !== c--; ) b[c].destroy();
2517
+ };
2518
+ s = null;
2519
+ return f;
2520
+ }({}, v, w));
2521
+ n.register("$38", function(f, d, E) {
2522
+ function m(a, b) {
2523
+ var c = a.id, e = c && q[c], d = e && e.parent();
2524
+ if (!e || !d) return null;
2525
+ var g = d.dir === s, c = g ? "X" : "Y", l = "page" + c, g = g ? A : y, k = g(d.el), c = b["offset" + c], p = d.el, f = p.className;
2526
+ null == c && (c = b[l] - g(a));
2527
+ c && (k += c);
2528
+ p.className = f + " is-resizing";
2529
+ return {
2530
+ done: function() {
2531
+ p.className = f;
2532
+ },
2533
+ move: function(a) {
2534
+ d.resize(a[l] - k, e);
2535
+ return !0;
2536
+ }
2537
+ };
2538
+ }
2539
+ function k(a, c) {
2540
+ function e() {
2541
+ h(E).off("mousemove", d);
2542
+ r && (r.done(), r = null);
2543
+ return !0;
2544
+ }
2545
+ function d(a) {
2546
+ r ? r.move(a) : e();
2547
+ return !0;
2548
+ }
2549
+ if (r) return !0;
2550
+ r = m(a.target, a);
2551
+ if (!r) return !0;
2552
+ h(E).one("mouseup", e).on("mousemove", d);
2553
+ return b(a);
2554
+ }
2555
+ function c(a, b) {
2556
+ var c = b.type;
2557
+ "touchmove" === c ? r && r.move(b) : "touchstart" === c ? r = m(a.target, b) : "touchend" === c && r && (r.done(),
2558
+ r = null);
2559
+ }
2560
+ function b(a) {
2561
+ a.stopPropagation();
2562
+ a.preventDefault();
2563
+ return !1;
2564
+ }
2565
+ function a(a) {
2566
+ var b = D;
2567
+ b && b.redraw();
2568
+ a && a.redraw();
2569
+ return D = a;
2570
+ }
2571
+ function e(b, c) {
2572
+ var e = h(c).on("editFocus", function() {
2573
+ e.trigger("wgFocus", [ a(b) ]);
2574
+ }).on("editBlur", function() {
2575
+ e.trigger("wgBlur", [ a(null) ]);
2576
+ });
2577
+ }
2578
+ function p(a) {
2579
+ var b = a.id, c = a.className;
2580
+ this.id = b;
2581
+ this.el = a;
2582
+ this.pos = this.index = 0;
2583
+ this.css = [ c || "wg-root", "wg-cell" ];
2584
+ this._cn = c;
2585
+ q[b] = this;
2586
+ this.clear();
2587
+ }
2588
+ var g = n.include("$44", "html.js") || n.include("$2", "html.js", !0), l = n.require("$21", "dom.js"), y = l.top, A = l.left, s = 1, q = {}, D, r = !1;
2589
+ f.init = function(a) {
2590
+ var b = new p(a);
2591
+ b.redraw();
2592
+ n.require("$45", "touch.js").ok(function(b) {
2593
+ b.dragger(a, c);
2594
+ });
2595
+ h(a).on("mousedown", k);
2596
+ return b;
2597
+ };
2598
+ d = p.prototype;
2599
+ d.fire = function(a, b) {
2600
+ var c = h.Event(a);
2601
+ c.cell = this;
2602
+ h(this.el).trigger(c, b);
2603
+ return this;
2604
+ };
2605
+ d.each = function(a) {
2606
+ for (var b = -1, c = this.cells, e = c.length; ++b < e; ) a(c[b], b);
2607
+ return this;
2608
+ };
2609
+ d.indexOf = function(a) {
2610
+ return (a = q[a.id || String(a)]) && a.pid === this.id ? a.index : -1;
2611
+ };
2612
+ d.on = function() {
2613
+ return this.$("on", arguments);
2614
+ };
2615
+ d.off = function() {
2616
+ return this.$("off", arguments);
2617
+ };
2618
+ d.find = function(a) {
2619
+ return h(this.el).find(a);
2620
+ };
2621
+ d.$ = function(a, b) {
2622
+ h.fn[a].apply(h(this.el), b);
2623
+ return this;
2624
+ };
2625
+ d.addClass = function(a) {
2626
+ this.css.push(a);
2627
+ return this;
2628
+ };
2629
+ d.removeClass = function(a) {
2630
+ a = this.css.indexOf(a);
2631
+ -1 !== a && this.css.splice(a, 1);
2632
+ return this;
2633
+ };
2634
+ d.parent = function() {
2635
+ return this.pid && q[this.pid];
2636
+ };
2637
+ d.splitx = function() {
2638
+ return this._split(s, arguments);
2639
+ };
2640
+ d.splity = function() {
2641
+ return this._split(2, arguments);
2642
+ };
2643
+ d._split = function(a, b) {
2644
+ (this.length || this.field) && this.clear();
2645
+ for (var c = -1, e, d = b.length, g = 1 / d, k = 0; ++c < d; ) {
2646
+ e = l.el();
2647
+ this.body.appendChild(e);
2648
+ for (var f = e, h = b[c], y = h, s = 1; q[h]; ) h = y + "-" + ++s;
2649
+ f.id = h;
2650
+ e = new p(e);
2651
+ e.index = c;
2652
+ e.pid = this.id;
2653
+ e._locale(this.lang, this.rtl);
2654
+ e.pos = k;
2655
+ k += g;
2656
+ this.cells.push(e);
2657
+ this.length++;
2658
+ }
2659
+ this.dir = a;
2660
+ this.redraw();
2661
+ return this.cells;
2662
+ };
2663
+ d.destroy = function() {
2664
+ this.clear();
2665
+ delete q[this.id];
2666
+ var a = this.el;
2667
+ a.innerHTML = "";
2668
+ this.body = null;
2669
+ a.className = this._cn || "";
2670
+ h(a).off();
2671
+ return this;
2672
+ };
2673
+ d.exists = function() {
2674
+ return this === q[this.id];
2675
+ };
2676
+ d.clear = function() {
2677
+ for (var a = this.el, b = this.cells, c = this.field, e = this.body, d = this.nav, k = this.length || 0; 0 !== k--; ) delete q[b[k].destroy().id];
2678
+ this.cells = [];
2679
+ this.length = 0;
2680
+ d && (a.removeChild(d), this.nav = null);
2681
+ e && (c && (g.ie() && h(e).triggerHandler("blur"), c.destroy(), this.field = null),
2682
+ this.table && (this.table = null), a === e.parentNode && a.removeChild(e));
2683
+ this.body = a.appendChild(l.el("", "wg-body"));
2684
+ this._h = null;
2685
+ return this;
2686
+ };
2687
+ d.resize = function(a, b) {
2688
+ if (!b && (b = this.cells[1], !b)) return;
2689
+ var c = b.index, e = this.cells, d = h(this.el)[this.dir === s ? "width" : "height"](), g = e[c + 1], c = e[c - 1];
2690
+ pad = (b.body || b.el.firstChild).offsetTop || 0;
2691
+ max = (g ? g.pos * d : d) - pad;
2692
+ min = c ? c.pos * d : 0;
2693
+ b.pos = Math.min(max, Math.max(min, a)) / d;
2694
+ this.redraw();
2695
+ return this;
2696
+ };
2697
+ d.distribute = function(a) {
2698
+ for (var b = -1, c = 0, e, d = this.cells, g = a.length; ++b < g && (e = d[++c]); ) e.pos = Math.max(0, Math.min(1, a[b]));
2699
+ this.redraw();
2700
+ return this;
2701
+ };
2702
+ d.distribution = function() {
2703
+ for (var a = [], b = 0, c = this.cells, e = c.length - 1; b < e; ) a[b] = c[++b].pos;
2704
+ return a;
2705
+ };
2706
+ d.restyle = function() {
2707
+ var a = this.css.concat();
2708
+ 0 === this.index ? a.push("first") : a.push("not-first");
2709
+ this.dir && (a.push("wg-split"), 2 === this.dir ? a.push("wg-split-y") : a.push("wg-split-x"));
2710
+ this.t && a.push("has-title");
2711
+ this.nav && a.push("has-nav");
2712
+ this.field && (a.push("is-field"), this.field.editable() ? a.push("is-editable") : a.push("is-readonly"));
2713
+ a = a.join(" ");
2714
+ a !== this._css && (this._css = a, this.el.className = a);
2715
+ return this;
2716
+ };
2717
+ d.redraw = function(a) {
2718
+ this.restyle();
2719
+ var b = this.el, c = this.body, e = this.field;
2720
+ if (c) {
2721
+ var d, g = b.clientWidth || 0, l = b.clientHeight || 0, k = c.offsetTop || 0, l = k > l ? 0 : l - k;
2722
+ this._h !== l && (this._h = l, c.style.height = String(l) + "px", d = e);
2723
+ this._w !== g && (this._w = g, d = e);
2724
+ d && d.redraw();
2725
+ }
2726
+ c = this.length;
2727
+ g = 1;
2728
+ l = this.nav;
2729
+ for (k = 2 === this.dir ? "height" : "width"; 0 !== c--; ) e = this.cells[c], l ? d = 1 : (e.fixed && (e.pos = e.fixed / h(b)[k]()),
2730
+ d = g - e.pos, g = e.pos), e.el.style[k] = String(100 * d) + "%", e.redraw(a);
2731
+ return this;
2732
+ };
2733
+ d.contents = function(a, b) {
2734
+ var c = this.el, e = this.body;
2735
+ if (null == a) return e.innerHTML;
2736
+ this.length ? this.clear() : e && (c.removeChild(e), e = null);
2737
+ e || (this.body = e = c.appendChild(l.el("", b || "wg-content")), this._h = null,
2738
+ (c = this.lang) && this._locale(c, this.rtl, !0));
2739
+ "string" === typeof a ? h(e)._html(a) : a && this.append(a);
2740
+ this.redraw();
2741
+ return this;
2742
+ };
2743
+ d.textarea = function(a, b) {
2744
+ var c = this.field;
2745
+ if (c) {
2746
+ var d = c.editable();
2747
+ c.reload(a, b);
2748
+ d !== b && this.restyle();
2749
+ } else this.length && this.clear(), d = l.el("textarea"), d.setAttribute("wrap", "virtual"),
2750
+ d.value = a, this.contents(d), c = n.require("$46", "field.js")._new(d)[b ? "enable" : "disable"](),
2751
+ e(this, d), this.field = c, this.restyle();
2752
+ this.lang || this.locale("en");
2753
+ return c;
2754
+ };
2755
+ d.locale = function(a) {
2756
+ a = n.require("$36", "locale.js").cast(a);
2757
+ return this._locale(String(a), a.isRTL());
2758
+ };
2759
+ d._locale = function(a, b, c) {
2760
+ var e = this.body;
2761
+ if (c || a !== this.lang) this.lang = a, e && e.setAttribute("lang", a);
2762
+ if (c || b !== this.rtl) this.rtl = b, e && e.setAttribute("dir", b ? "RTL" : "LTR");
2763
+ return this;
2764
+ };
2765
+ d.editable = function() {
2766
+ var a = this.field;
2767
+ if (a) return a.editable() ? a : null;
2768
+ var b = this.cells, c = b.length, e = this.navigated();
2769
+ if (null != e) return b[e].editable();
2770
+ for (;++e < c; ) {
2771
+ for (e = 0; e < c; c++) ;
2772
+ if (a = b[e].editable()) return a;
2773
+ }
2774
+ };
2775
+ d.eachTextarea = function(a) {
2776
+ var b = this.field;
2777
+ b ? a(b) : this.each(function(b) {
2778
+ b.eachTextarea(a);
2779
+ });
2780
+ return this;
2781
+ };
2782
+ d.append = function(a) {
2783
+ a && (a.nodeType ? g.init(this.body.appendChild(a)) : g.init(h(a).appendTo(this.body)));
2784
+ return this;
2785
+ };
2786
+ d.prepend = function(a) {
2787
+ var b = this.body;
2788
+ if (a.nodeType) {
2789
+ var c = b.firstChild;
2790
+ g.init(c ? b.insertBefore(a, c) : b.appendChild(a));
2791
+ } else g.init(h(a).prependTo(b));
2792
+ return this;
2793
+ };
2794
+ d.before = function(a) {
2795
+ var b = this.body;
2796
+ a.nodeType ? g.init(this.el.insertBefore(a, b)) : g.init(h(a).insertBefore(b));
2797
+ return this;
2798
+ };
2799
+ d.header = function(a, b) {
2800
+ if (null == a && null == b) return this.el.getElementsByTagName("header")[0];
2801
+ this.t = l.txt(a || "");
2802
+ this.el.insertBefore(l.el("header", b), this.body).appendChild(this.t);
2803
+ this.redraw();
2804
+ return this;
2805
+ };
2806
+ d.title = function(a) {
2807
+ var b = this.t;
2808
+ if (b) return b.nodeValue = a || "", b;
2809
+ this.header(a);
2810
+ return this.t;
2811
+ };
2812
+ d.titled = function() {
2813
+ var a = this.t;
2814
+ return a && a.nodeValue;
2815
+ };
2816
+ d.bodyY = function() {
2817
+ return y(this.body, this.el);
2818
+ };
2819
+ d.scrollY = function(a) {
2820
+ if (J === a) return this.body.scrollTop;
2821
+ this.body.scrollTop = a;
2822
+ };
2823
+ d.tabulate = function(a) {
2824
+ var b = this.table;
2825
+ b ? b.clear() : b = n.require("$47", "wgtable.js").create(this);
2826
+ b.init(a);
2827
+ return this.table = b;
2828
+ };
2829
+ d.lock = function() {
2830
+ this.body.className += " locked";
2831
+ return this;
2832
+ };
2833
+ d.scrollTo = function(a, b) {
2834
+ var c, e = this.body;
2835
+ c = e.scrollTop;
2836
+ var d = y(a, e);
2837
+ if (c > d) c = d; else {
2838
+ var g = e.clientHeight, d = d + h(a).outerHeight();
2839
+ if (g + c < d) c = d - g; else return;
2840
+ }
2841
+ b ? e.scrollTop = c : h(e).stop(!0).animate({
2842
+ scrollTop: c
2843
+ }, 250);
2844
+ };
2845
+ d.navigize = function(a, c) {
2846
+ function e(a) {
2847
+ var b = g[a], c = f[a], d = h(b.el).show();
2848
+ c.addClass("active");
2849
+ p = a;
2850
+ y.data("idx", a);
2851
+ b.fire("wgTabSelect", [ a ]);
2852
+ return d;
2853
+ }
2854
+ var d = this, g = d.cells, k = d.nav, p, f = [];
2855
+ k && d.el.removeChild(k);
2856
+ var k = d.nav = d.el.insertBefore(l.el("nav", "wg-tabs"), d.body), y = h(k).on("click", function(a) {
2857
+ var c = h(a.target).data("idx");
2858
+ if (null == c) return !0;
2859
+ if (null != p) {
2860
+ var l = f[p];
2861
+ h(g[p].el).hide();
2862
+ l.removeClass("active");
2863
+ }
2864
+ e(c);
2865
+ d.redraw();
2866
+ return b(a);
2867
+ });
2868
+ null == c && (c = y.data("idx") || 0);
2869
+ d.each(function(b, c) {
2870
+ f[c] = h('<a href="#' + b.id + '"></a>').data("idx", c).text(a[c]).appendTo(y);
2871
+ b.pos = 0;
2872
+ h(b.el).hide();
2873
+ });
2874
+ e(g[c] ? c : 0);
2875
+ d.lock();
2876
+ d.redraw();
2877
+ return d;
2878
+ };
2879
+ d.navigated = function() {
2880
+ var a = this.nav;
2881
+ if (a) return h(a).data("idx");
2882
+ };
2883
+ d = null;
2884
+ return f;
2885
+ }({}, v, w));
2886
+ n.register("$24", function(f, d, E) {
2887
+ function m(a) {
2888
+ var b = [];
2889
+ a && (a.saved() || b.push("po-unsaved"), a.fuzzy() ? b.push("po-fuzzy") : a.flagged() && b.push("po-flagged"),
2890
+ a.translation() || b.push("po-empty"), a.comment() && b.push("po-comment"));
2891
+ return b.join(" ");
2892
+ }
2893
+ function k(a, b, c) {
2894
+ b = h(a.title(b).parentNode);
2895
+ var e = b.find("span.lang");
2896
+ c ? (c = n.require("$36", "locale.js").cast(c), e.length || (e = h("<span></span>").prependTo(b)),
2897
+ e.attr("lang", c.lang).attr("class", c.getIcon() || "lang region region-" + (c.region || "zz").toLowerCase())) : (e.remove(),
2898
+ c = "en");
2899
+ a.locale(c);
2900
+ return b;
2901
+ }
2902
+ function c(a, b, c) {
2903
+ b.on("click", function(b) {
2904
+ var e = a.fire(c, [ b.target ]);
2905
+ e || b.preventDefault();
2906
+ return e;
2907
+ });
2908
+ }
2909
+ function b() {
2910
+ this.dirty = 0;
2911
+ }
2912
+ n.require("$3", "number.js");
2913
+ var a = "poUpdate", e = "changing", p = "changed", g = 0, l = 1, y = 2, A = 3, s = 4, q = 5, D, r, z = n.require("$35", "string.js").html, v = n.require("$6", "string.js").sprintf;
2914
+ f.extend = function(a) {
2915
+ return a.prototype = new b();
2916
+ };
2917
+ f.localise = function(a) {
2918
+ r = a;
2919
+ return f;
2920
+ };
2921
+ var C = function() {
2922
+ var a = E.createElement("p");
2923
+ return function(b) {
2924
+ a.innerHTML = b.replace("src=", "x=");
2925
+ return a.textContent.trim() || b.trim();
2926
+ };
2927
+ }(), u = b.prototype = n.require("$37", "abstract.js").init([ "getListColumns", "getListHeadings", "getListEntry" ], [ "editable", "t" ]);
2928
+ u.init = function() {
2929
+ this.localise();
2930
+ this.editable = {
2931
+ source: !0,
2932
+ target: !0
2933
+ };
2934
+ this.mode = "";
2935
+ this.html = !1;
2936
+ return this;
2937
+ };
2938
+ u.localise = function(a) {
2939
+ a || (a = r || n.require("$1", "t.js").init());
2940
+ var b = [];
2941
+ b[g] = a._x("Source text", "Editor") + ":";
2942
+ b[A] = a._x("%s translation", "Editor") + ":";
2943
+ b[s] = a._x("Context", "Editor") + ":";
2944
+ b[q] = a._x("Comments", "Editor") + ":";
2945
+ b[l] = a._x("Single", "Editor") + ":";
2946
+ b[y] = a._x("Plural", "Editor") + ":";
2947
+ b[6] = a._x("Untranslated", "Editor");
2948
+ b[7] = a._x("Translated", "Editor");
2949
+ b[8] = a._x("Toggle Fuzzy", "Editor");
2950
+ b[9] = a._x("Suggest translation", "Editor");
2951
+ this.labels = b;
2952
+ this.t = a;
2953
+ return this;
2954
+ };
2955
+ u.setRootCell = function(a) {
2956
+ function b(a) {
2957
+ c.redraw(!0, a);
2958
+ return !0;
2959
+ }
2960
+ var c = n.require("$38", "wingrid.js").init(a);
2961
+ h(d).on("resize", b);
2962
+ this.redraw = b;
2963
+ h(a).on("wgFocus wgBlur", function(a, b) {
2964
+ a.stopPropagation();
2965
+ D = b;
2966
+ });
2967
+ this.destroy = function() {
2968
+ c.destroy();
2969
+ h(d).off("resize", b);
2970
+ };
2971
+ this.rootDiv = a;
2972
+ return c;
2973
+ };
2974
+ u.$ = function() {
2975
+ return h(this.rootDiv);
2976
+ };
2977
+ u.setListCell = function(a) {
2978
+ var b = this;
2979
+ b.listCell = a;
2980
+ a.on("wgRowSelect", function(a, c) {
2981
+ b.loadMessage(b.po.row(c));
2982
+ return !0;
2983
+ }).on("wgRowDeselect", function(a, c, e) {
2984
+ e || b.loadNothing();
2985
+ return !0;
2986
+ });
2987
+ };
2988
+ u.setSourceCell = function(a) {
2989
+ this.sourceCell = a;
2990
+ };
2991
+ u.setTargetCell = function(a) {
2992
+ this.targetCell = a;
2993
+ };
2994
+ u.next = function(a, b, c) {
2995
+ for (var e = this.listTable, d = e.selected(), g = d, l, k = this.po; null != (d = e.next(a, c, d)); ) {
2996
+ if (g === d) {
2997
+ d = null;
2998
+ break;
2999
+ }
3000
+ if (b && (l = k.row(d), l.translated(0))) continue;
3001
+ break;
3002
+ }
3003
+ null != d && e.select(d, !0);
3004
+ return d;
3005
+ };
3006
+ u.current = function(a) {
3007
+ var b = this.active;
3008
+ if (null == a) return b;
3009
+ a ? a.is(b) ? this.reloadMessage(a) : this.loadMessage(a) : this.unloadActive();
3010
+ return this;
3011
+ };
3012
+ u.getTargetOffset = function() {
3013
+ if (this.active) return this.targetCell && this.targetCell.navigated() || 0;
3014
+ };
3015
+ u.getTargetEditable = function() {
3016
+ return this.editable.target && this.targetCell && this.targetCell.editable();
3017
+ };
3018
+ u.getSourceEditable = function() {
3019
+ return this.editable.source && this.sourceCell && this.sourceCell.editable();
3020
+ };
3021
+ u.getContextEditable = function() {
3022
+ return this.editable.context && this.contextCell && this.contextCell.editable();
3023
+ };
3024
+ u.getFirstEditable = function() {
3025
+ return this.getTargetEditable() || this.getSourceEditable() || this.getContextEditable();
3026
+ };
3027
+ u.searchable = function(a) {
3028
+ a && (this.dict = a, this.po && this.rebuildSearch());
3029
+ return this.dict && !0;
3030
+ };
3031
+ u.rebuildSearch = function() {
3032
+ var a = -1, b = this.po.rows, c = b.length, e = this.dict;
3033
+ for (e.clear(); ++a < c; ) e.add(a, b[a].toText());
3034
+ };
3035
+ u.filtered = function() {
3036
+ return this.lastSearch || "";
3037
+ };
3038
+ u.filter = function(a, b) {
3039
+ var c, e = this.listTable, d = this.lastFound, g = this.lastSearch;
3040
+ if (a) {
3041
+ if (g === a) return d || 0;
3042
+ if (g && !d && 0 === a.indexOf(g)) return 0;
3043
+ c = this.dict.find(a);
3044
+ }
3045
+ this.lastSearch = g = a;
3046
+ this.lastFound = d = c ? c.length : this.po.length;
3047
+ c ? e.filter(c) : e.unfilter();
3048
+ b || this.fire("poFilter", [ g, d ]);
3049
+ return d;
3050
+ };
3051
+ u.countFiltered = function() {
3052
+ return this.lastSearch ? this.lastFound : this.po.length;
3053
+ };
3054
+ u.unsave = function(a, b) {
3055
+ var c = !1;
3056
+ if (a) {
3057
+ if (c = a.saved(b)) this.dirty++, a.unsave(b), this.fire("poUnsaved", [ a, b ]);
3058
+ this.markUnsaved(a);
3059
+ }
3060
+ return c;
3061
+ };
3062
+ u.markUnsaved = function(a) {
3063
+ var b = this.po.indexOf(a);
3064
+ if ((b = this.listTable.tr(b)) && b.length) {
3065
+ var c = b[0].className;
3066
+ a = c.replace(/(?:^| +)po-[a-z]+/g, "") + " " + m(a);
3067
+ a !== c && h(b).attr("class", a);
3068
+ }
3069
+ };
3070
+ u.save = function(a) {
3071
+ var b = this.po;
3072
+ if (this.dirty || a) b.each(function(a, b) {
3073
+ b.save();
3074
+ }), this.listCell.find("div.po-unsaved").removeClass("po-unsaved"), this.dirty = 0,
3075
+ this.fire("poSave");
3076
+ return b;
3077
+ };
3078
+ u.fire = function(a, b) {
3079
+ var c = this.handle;
3080
+ if (c && c[a] && (c = c[a].apply(this, b || []), !1 === c)) return !1;
3081
+ c = h.Event(a);
3082
+ this.$().trigger(c, b);
3083
+ return !c.isDefaultPrevented();
3084
+ };
3085
+ u.on = function(a, b) {
3086
+ this.$().on(a, b);
3087
+ return this;
3088
+ };
3089
+ u.getSorter = function() {
3090
+ return null;
3091
+ };
3092
+ u.reload = function() {
3093
+ var a = this, b, c = a.listCell, e = a.listTable, d = a.po, g = d && d.locale(), l = g && g.isRTL(), k = d && d.length || 0;
3094
+ if (!d || !d.row) return c && c.clear().header("Error").contents("Invalid messages list"),
3095
+ !1;
3096
+ a.targetLocale = g;
3097
+ a.lastSearch && (a.lastSearch = "", a.lastFound = k, a.fire("poFilter", [ "", k ]));
3098
+ e && (b = e.thead().distribution());
3099
+ a.listTable = e = c.tabulate({
3100
+ eachCol: function(b) {
3101
+ var c, e, d = a.getListColumns(), g = a.getListHeadings();
3102
+ for (e in d) c = d[e], b(c, e, g[c]);
3103
+ },
3104
+ eachRow: function(b) {
3105
+ d.each(function(c, e) {
3106
+ b(e.idx, a.getListEntry(e), m(e));
3107
+ });
3108
+ },
3109
+ sort: a.getSorter()
3110
+ });
3111
+ var p, c = a.getListColumns();
3112
+ for (p in c) e.sortable(c[p]);
3113
+ b && e.thead().distribute(b);
3114
+ e.tbody().$(l ? "addClass" : "removeClass", [ "is-rtl" ]);
3115
+ a.fire("poLoad");
3116
+ return !!k;
3117
+ };
3118
+ u.load = function(a, b) {
3119
+ this.po = a;
3120
+ this.dict && this.rebuildSearch();
3121
+ this.reload() && (-1 !== b ? this.listTable.selectRow(b || 0) : this.active && this.unloadActive());
3122
+ };
3123
+ u.pasteMessage = function(a) {
3124
+ var b, c = 0;
3125
+ this.active === a && ((b = this.sourceCell) && b.eachTextarea(function(b) {
3126
+ b.val(a.source(null, c++));
3127
+ }), (b = this.contextCell) && b.eachTextarea(function(b) {
3128
+ b.val(a.context());
3129
+ }), b = this.targetCell) && (c = 0, b.eachTextarea(function(b) {
3130
+ b.val(a.translation(c++));
3131
+ }));
3132
+ this.updateListCell(a, "source");
3133
+ this.updateListCell(a, "target");
3134
+ return this;
3135
+ };
3136
+ u.reloadMessage = function(a) {
3137
+ var b = this.sourceCell, c = this.targetCell, e;
3138
+ this.pasteMessage(a);
3139
+ b && this.setSrcMeta(a, b) && b.redraw();
3140
+ c && (e = c.navigated() || 0, e = this.setTrgMeta(a, e, c), !b && this.setSrcMeta(a, c) && (e = !0),
3141
+ e && c.redraw());
3142
+ return this;
3143
+ };
3144
+ u.setStatus = function() {
3145
+ return null;
3146
+ };
3147
+ u.setSrcMeta = function(a, b) {
3148
+ var e = [], d, g = !1, l = this.$smeta, k = this.labels, p = [], f = a.tags(), y = f && f.length;
3149
+ if (d = a.context()) p.push("<span>" + z(k[s]) + "</span>"), p.push("<mark>" + z(d) + "</mark>");
3150
+ if (y && this.getTag) for (p.push("<span>Tagged:</span>"); 0 <= --y; ) (d = this.getTag(f[y])) && p.push('<mark class="tag">' + z(d.mod_name) + "</mark>");
3151
+ p.length && e.push(p.join(" "));
3152
+ if (this.getMono() && (d = a.refs()) && (f = d.split(/\s/), y = f.length)) {
3153
+ for (p = []; 0 <= --y; ) d = f[y], p.push("<code>" + z(d) + "</code>");
3154
+ e.push('<p class="has-icon icon-file">' + p.join(" ") + "</p>");
3155
+ }
3156
+ (d = a.notes()) && e.push('<p class="has-icon icon-info">' + z(d, !0) + "</p>");
3157
+ e.length ? (l || (l = b.find("div.meta"), l.length || (l = h('<div class="meta"></div>').insertAfter(b.header())),
3158
+ c(this, l, "poMeta"), this.$smeta = l), l.html(e.join("\n")).show(), g = !0) : l && l.text() && (l.text("").hide(),
3159
+ g = !0);
3160
+ return g;
3161
+ };
3162
+ u.setTrgMeta = function(a, b, c) {
3163
+ var e = [], d = !1, g = this.$tmeta;
3164
+ b = (a = a.errors(b)) && a.length;
3165
+ var l;
3166
+ if (b) for (l = 0; l < b; l++) e.push('<p class="has-icon icon-warn">' + z(a[l], !0) + ".</p>");
3167
+ e.length ? (g || (g = c.find("div.meta"), g.length || (g = h('<div class="meta"></div>').insertAfter(c.header())),
3168
+ this.$tmeta = g), g.html(e.join("\n")).show(), d = !0) : g && g.text() && (g.text("").hide(),
3169
+ d = !0);
3170
+ return d;
3171
+ };
3172
+ u.loadMessage = function(b) {
3173
+ function c(a, b) {
3174
+ var e = b ? a.split(" ") : a.split(" ", 1);
3175
+ a = e[0];
3176
+ "=" === a.charAt(0) && (a = a.substr(1), a = [ "zero", "one", "two" ][Number(a)] || a);
3177
+ e[0] = a.charAt(0).toUpperCase() + a.substr(1).toLowerCase();
3178
+ return e.join(" ");
3179
+ }
3180
+ function d(a, e) {
3181
+ var p = J, h = L[g];
3182
+ a.off();
3183
+ a.titled() !== h && k(a, h, e || "en");
3184
+ h = !1;
3185
+ r.setSrcMeta(b, a) && (h = !0);
3186
+ if (b.plural()) {
3187
+ var h = -1, s = [], q = [], m = a.id + "-", n = b.sourceForms() || e && e.plurals || [ "One", "Other" ], A = n.length;
3188
+ if (2 !== A || "=" === n[0].charAt(0) && "=1" !== n[0]) for (;++h < A; ) s[h] = m + String(h),
3189
+ q[h] = c(n[h]) + ":"; else s = [ m + "-0", m + "-1" ], q = [ L[l], L[y] ];
3190
+ a.splity.apply(a, s);
3191
+ a.each(function(a, c) {
3192
+ a.header(q[c]).textarea(b.source(null, c), p).setStrf(B).setMode(z).setInvs(C);
3193
+ });
3194
+ a.lock();
3195
+ p && a.each(function(a, b) {
3196
+ f(a, b);
3197
+ });
3198
+ } else h && a.redraw(), a.textarea(b.source(), p).setStrf(B).setMode(z).setInvs(C),
3199
+ p && f(a, 0);
3200
+ }
3201
+ function f(c, d) {
3202
+ c.on(e, function(a, c) {
3203
+ b.source(c, d);
3204
+ 0 === d && r.updateListCell(b, "source");
3205
+ r.unsave(b, d);
3206
+ }).on(p, function() {
3207
+ 0 === d && r.po.reIndex(b);
3208
+ r.dict && r.rebuildSearch();
3209
+ r.fire(a, [ b ]);
3210
+ });
3211
+ }
3212
+ function h(a, e, d) {
3213
+ M && a.eachTextarea(function(a) {
3214
+ a.ping();
3215
+ });
3216
+ a.off();
3217
+ var g = e.isKnown() && e.label || "Target", g = v(L[A], g);
3218
+ a.titled() !== g && k(a, g, e);
3219
+ g = !1;
3220
+ !this.sourceCell && r.setSrcMeta(b, a) && (g = !0);
3221
+ r.setTrgMeta(b, d, a) && (g = !0);
3222
+ r.setStatus(b, d);
3223
+ if (b.pluralized()) {
3224
+ var l = [], p = [], f = a.id + "-", y = b.targetForms() || e.plurals || [ "One", "Other" ], g = y.length, s = function(a) {
3225
+ var b = y[a];
3226
+ p.push(b ? c(b, !0) : "Form " + a);
3227
+ l.push(f + String(a));
3228
+ };
3229
+ for (b.each(s); (e = l.length) < g; ) s(e);
3230
+ a.splitx.apply(a, l);
3231
+ a.each(function(a, c) {
3232
+ var e = M && !b.disabled(c);
3233
+ a.textarea(b.translation(c), e).setStrf(B).setMode(z).setInvs(C);
3234
+ M && m(a, c);
3235
+ });
3236
+ a.navigize(p, d || null).on("wgTabSelect", function(c, e) {
3237
+ var d = M && c.cell.editable();
3238
+ d && d.focus();
3239
+ r.setTrgMeta(b, e, a);
3240
+ r.setStatus(b, e);
3241
+ r.fire("poTab", [ e ]);
3242
+ });
3243
+ } else g && a.redraw(), a.textarea(b.translation(), M && !b.disabled(0)).setStrf(B).setMode(z).setInvs(C),
3244
+ M && m(a, 0);
3245
+ }
3246
+ function m(c, d) {
3247
+ c.on(e, function(a, c, e) {
3248
+ b.translate(c, d);
3249
+ 0 === d && r.updateListCell(b, "target");
3250
+ b.fuzzy(d) ? r.fuzzy(!1, b, d) : r.unsave(b, d);
3251
+ "" === c ? (r.fire("poEmpty", [ !0, b, d ]), r.setStatus(b, d)) : "" === e && (r.fire("poEmpty", [ !1, b, d ]),
3252
+ r.setStatus(b, d));
3253
+ }).on(p, function() {
3254
+ r.dict && r.rebuildSearch();
3255
+ r.fire(a, [ b ]);
3256
+ });
3257
+ }
3258
+ function n(c) {
3259
+ c.off();
3260
+ var d = L[s];
3261
+ c.titled() !== d && (k(c, d), r.setStatus(null));
3262
+ c.textarea(b.context(), !0).setMode(z).setInvs(C);
3263
+ X && c.on(e, function(a, c) {
3264
+ b.context(c);
3265
+ r.updateListCell(b, "source");
3266
+ r.unsave(b, O);
3267
+ }).on(p, function() {
3268
+ r.po.reIndex(b);
3269
+ r.dict && r.rebuildSearch();
3270
+ r.fire(a, [ b ]);
3271
+ });
3272
+ }
3273
+ function u(a) {
3274
+ var c = L[q];
3275
+ a.titled() !== c && k(a, c);
3276
+ a.off().on(e, function(a, c) {
3277
+ b.comment(c);
3278
+ r.fire("poComment", [ b, c ]);
3279
+ r.unsave(b, O);
3280
+ }).textarea(b.comment(), !0);
3281
+ }
3282
+ var r = this, z = r.mode, E = b.isHTML(), C = r.inv || !1, w = this.fmt || null, B = b.format() || null, I = b.is(r.active), O = 0, T = r.sourceCell, S = r.targetCell, U = r.contextCell, V = r.commentCell, M = r.editable.target, J = r.editable.source, X = r.editable.context, P = D, Y = r.sourceLocale, W = r.targetLocale, L = r.labels;
3283
+ r.html !== E && (r.html = E, "code" !== r.mode && (z = E ? "html" : "", r.setMode(z)));
3284
+ r.active = b;
3285
+ T && d(T, Y);
3286
+ U && n(U);
3287
+ S && W && (O = S.navigated() || 0, h(S, W, O));
3288
+ V && u(V);
3289
+ P && (P.exists() || (P = P.parent()), (E = P.editable()) && E.focus());
3290
+ w !== B && (this.fmt = B);
3291
+ I || r.fire("poSelected", [ b, O ]);
3292
+ };
3293
+ u.unloadActive = function() {
3294
+ function a(b) {
3295
+ b && b.text("").hide();
3296
+ }
3297
+ function b(a) {
3298
+ a && a.off().clear();
3299
+ }
3300
+ a(this.$smeta);
3301
+ a(this.$tmeta);
3302
+ b(this.sourceCell);
3303
+ b(this.contextCell);
3304
+ b(this.targetCell);
3305
+ this.commentCell && this.commentCell.off();
3306
+ this.active && (this.fire("poDeselected", [ this.active ]), this.active = null);
3307
+ return this;
3308
+ };
3309
+ u.loadNothing = function() {
3310
+ var a, b = this.t, c = this.mode || "", e = this.inv || !1, d = this.fmt;
3311
+ this.unloadActive();
3312
+ this.setStatus(null);
3313
+ (a = this.commentCell) && a.textarea("", !1);
3314
+ if (a = this.sourceCell) a.textarea("", !1).setStrf(d).setMode(c).setInvs(e), a.title(b._x("Source text not loaded", "Editor") + ":");
3315
+ if (a = this.contextCell) a.textarea("", !1).setMode(c).setInvs(e), a.title(b._x("Context not loaded", "Editor") + ":");
3316
+ if (a = this.targetCell) a.textarea("", !1).setStrf(d).setMode(c).setInvs(e), a.title(b._x("Translation not loaded", "Editor") + ":");
3317
+ this.fire("poSelected", [ null ]);
3318
+ };
3319
+ u.updateListCell = function(a, b) {
3320
+ var c = this.getListColumns()[b], e = this.po.indexOf(a);
3321
+ (e = this.listTable.row(e)) && e.rendered && e.update(c);
3322
+ };
3323
+ u.cellText = function(a) {
3324
+ return (a = -1 !== a.indexOf("<") || -1 !== a.indexOf("&") ? C(a) : a.trim()) || " ";
3325
+ };
3326
+ u.fuzzy = function(a, b, c) {
3327
+ b = b || this.active;
3328
+ var e = b.fuzzy(c);
3329
+ !0 !== a || e ? !1 === a && e && this.flag(0, b, c) && this.fire("poFuzzy", [ b, !1, c ]) : this.flag(4, b, c) && this.fire("poFuzzy", [ b, !0, c ]);
3330
+ return e;
3331
+ };
3332
+ u.flag = function(b, c, e) {
3333
+ if (!c) {
3334
+ c = this.active;
3335
+ e = this.getTargetOffset();
3336
+ if (null == e) return null;
3337
+ e && c.targetForms() && (e = 0);
3338
+ }
3339
+ var d = c.flagged(e);
3340
+ if (null == b) return d;
3341
+ if (d === b || b && !c.translated(e) || !this.fire("poFlag", [ b, d, c, e ])) return !1;
3342
+ c.flag(b, e);
3343
+ this.fire(a, [ c ]) && this.unsave(c, e);
3344
+ this.setStatus(c, e);
3345
+ return !0;
3346
+ };
3347
+ u.add = function(b, c) {
3348
+ var e, d = this.po.get(b, c);
3349
+ d ? e = this.po.indexOf(d) : (e = this.po.length, d = this.po.add(b, c), this.load(this.po, -1),
3350
+ this.fire("poAdd", [ d ]), this.fire(a, [ d ]));
3351
+ this.lastSearch && this.filter("");
3352
+ this.listTable.select(e);
3353
+ return d;
3354
+ };
3355
+ u.del = function(b) {
3356
+ if (b = b || this.active) {
3357
+ var c = this.lastSearch, e = this.po.del(b);
3358
+ null != e && (this.unsave(b), this.fire("poDel", [ b ]), this.fire(a, [ b ]), this.reload(),
3359
+ this.dict && this.rebuildSearch(), this.active && this.active.equals(b) && this.unloadActive(),
3360
+ this.po.length && (c && this.filter(c), this.active || (e = Math.min(e, this.po.length - 1),
3361
+ this.listTable.select(e))));
3362
+ }
3363
+ };
3364
+ u.setMono = function(a) {
3365
+ return this.setMode(a ? "code" : this.html ? "html" : "");
3366
+ };
3367
+ u.setMode = function(a) {
3368
+ if (this.mode !== a) {
3369
+ this.mode = a;
3370
+ this.callTextareas(function(b) {
3371
+ b.setMode(a);
3372
+ });
3373
+ var b = this.active, c = this.sourceCell;
3374
+ b && b.refs() && c && this.setSrcMeta(b, c) && c.redraw();
3375
+ }
3376
+ return this;
3377
+ };
3378
+ u.getMono = function() {
3379
+ return "code" === this.mode;
3380
+ };
3381
+ u.setInvs = function(a) {
3382
+ (this.inv || !1) !== a && (this.inv = a, this.callTextareas(function(b) {
3383
+ b.setInvs(a);
3384
+ }), this.fire("poInvs", [ a ]));
3385
+ return this;
3386
+ };
3387
+ u.getInvs = function() {
3388
+ return this.inv || !1;
3389
+ };
3390
+ u.callTextareas = function(a) {
3391
+ var b = this.targetCell;
3392
+ b && b.eachTextarea(a);
3393
+ (b = this.contextCell) && b.eachTextarea(a);
3394
+ (b = this.sourceCell) && b.eachTextarea(a);
3395
+ return this;
3396
+ };
3397
+ u.focus = function() {
3398
+ var a = this.getTargetEditable();
3399
+ a && a.focus();
3400
+ return this;
3401
+ };
3402
+ u = null;
3403
+ return f;
3404
+ }({}, v, w));
3405
+ n.register("$13", function(f, d, E) {
3406
+ function m() {
3407
+ this.init()._validate();
3408
+ this.sourceLocale = {
3409
+ lang: "en",
3410
+ label: "English",
3411
+ plurals: [ "One", "Other" ]
3412
+ };
3413
+ }
3414
+ function k(a) {
3415
+ a = h('<button type="button" class="button button-small icon icon-' + a + ' hastip"></button>');
3416
+ n.require("$12", "tooltip.js").init(a);
3417
+ return a;
3418
+ }
3419
+ function c(a) {
3420
+ return k("cloud").attr("title", a.labels[8] + " (Ctrl-U)").on("click", function(b) {
3421
+ b.preventDefault();
3422
+ a.focus().fuzzy(!a.fuzzy());
3423
+ });
3424
+ }
3425
+ function b(a) {
3426
+ return k("robot").attr("title", a.labels[9] + " (Ctrl-J)").on("click", function(b) {
3427
+ b.preventDefault();
3428
+ a.fire("poHint");
3429
+ });
3430
+ }
3431
+ d = n.require("$24", "base.js");
3432
+ f.init = function(a) {
3433
+ var b = new m();
3434
+ a = b.setRootCell(a);
3435
+ var c = a.splity("po-list", "po-edit"), d = c[0], l = c[1], c = l.splitx("po-trans", "po-comment"), k = c[0], f = c[1].header("Loading.."), c = k.splity("po-source", "po-target"), k = c[0].header("Loading.."), c = c[1].header("Loading..");
3436
+ a.distribute([ .34 ]);
3437
+ l.distribute([ .8 ]);
3438
+ b.setListCell(d);
3439
+ b.setSourceCell(k);
3440
+ b.setTargetCell(c);
3441
+ b.commentCell = f;
3442
+ b.editable.source = !1;
3443
+ return b;
3444
+ };
3445
+ d = m.prototype = d.extend(m);
3446
+ d.getListHeadings = function() {
3447
+ var a = this.t || {
3448
+ _x: function(a) {
3449
+ return a;
3450
+ }
3451
+ }, b = [ a._x("Source text", "Editor") ];
3452
+ this.targetLocale && (b[1] = a._x("Translation", "Editor"));
3453
+ return b;
3454
+ };
3455
+ d.getListColumns = function() {
3456
+ var a = {
3457
+ source: 0
3458
+ };
3459
+ this.targetLocale && (a.target = 1);
3460
+ return a;
3461
+ };
3462
+ d.getListEntry = function(a) {
3463
+ var b = this.cellText, c = [ function() {
3464
+ var c, d = b(a.source() || ""), k = a.context();
3465
+ return k ? (c = E.createElement("p"), c.appendChild(E.createElement("mark")).innerText = k,
3466
+ c.appendChild(E.createTextNode(" " + d)), c) : d;
3467
+ } ];
3468
+ this.targetLocale && (c[1] = function() {
3469
+ return b(a.translation() || "");
3470
+ });
3471
+ return c;
3472
+ };
3473
+ d.stats = function() {
3474
+ var a = this.po, b = a.length, c = 0, d = 0, l = 0;
3475
+ a.each(function(a, b) {
3476
+ b.fuzzy() ? l++ : b.translated() ? c++ : d++;
3477
+ });
3478
+ return {
3479
+ t: b,
3480
+ p: c.percent(b) + "%",
3481
+ f: l,
3482
+ u: d
3483
+ };
3484
+ };
3485
+ d.unlock = function() {
3486
+ var a = this.targetLocale;
3487
+ this._unlocked || (this.editable = {
3488
+ source: !0,
3489
+ context: !0,
3490
+ target: !1
3491
+ }, this.po && this.po.unlock(), this.contextCell = this.targetCell, delete this.targetCell,
3492
+ a && (this._unlocked = a, delete this.targetLocale, this.reload(), this.fire("poLock", [ !1 ])),
3493
+ this.active && this.loadMessage(this.active));
3494
+ };
3495
+ d.lock = function() {
3496
+ var a = this._unlocked;
3497
+ a && (this.targetLocale = a, delete this._unlocked, this.po && this.po.lock(a),
3498
+ this.editable = {
3499
+ source: !1,
3500
+ context: !1,
3501
+ target: !0
3502
+ }, this.targetCell = this.contextCell, delete this.contextCell, this.reload(), this.fire("poLock", [ !0, a ]),
3503
+ this.active && this.loadMessage(this.active));
3504
+ };
3505
+ d.locked = function() {
3506
+ return !this._unlocked;
3507
+ };
3508
+ d.setStatus = function(a) {
3509
+ var e = this.$tnav;
3510
+ if (null == a) e && (e.remove(), this.$tnav = null); else {
3511
+ e || (this.$tnav = e = h("<nav></nav>").append(c(this)).append(b(this)).appendTo(this.targetCell.header()));
3512
+ var d = [];
3513
+ a.translated() ? a.fuzzy() && d.push("po-fuzzy") : d.push("po-empty");
3514
+ e.attr("class", d.join(" "));
3515
+ }
3516
+ };
3517
+ d.getSorter = function() {
3518
+ function a(a, c) {
3519
+ var d = a.weight(), k = c.weight();
3520
+ return d === k ? b(a, c) : d > k ? -1 : 1;
3521
+ }
3522
+ function b(a, c) {
3523
+ return a.hash().localeCompare(c.hash());
3524
+ }
3525
+ var c = this;
3526
+ return function(d) {
3527
+ var l = c.po, k = c.locked() ? a : b;
3528
+ d.sort(function(a, b) {
3529
+ return k(l.row(a), l.row(b));
3530
+ });
3531
+ };
3532
+ };
3533
+ return f;
3534
+ }({}, v, w));
3535
+ n.register("$14", function(f, d, n) {
3536
+ var m = {
3537
+ copy: 66,
3538
+ clear: 75,
3539
+ save: 83,
3540
+ fuzzy: 85,
3541
+ next: 40,
3542
+ prev: 38,
3543
+ enter: 13,
3544
+ invis: 73,
3545
+ hint: 74
3546
+ }, k = {
3547
+ 38: !0,
3548
+ 40: !0,
3549
+ 73: !0
3550
+ }, c = {
3551
+ 66: function(b, a) {
3552
+ var c = a.current();
3553
+ c && (c.normalize(), a.focus().pasteMessage(c));
3554
+ },
3555
+ 75: function(b, a) {
3556
+ var c = a.current();
3557
+ c && (c.untranslate(), a.focus().pasteMessage(c));
3558
+ },
3559
+ 85: function(b, a) {
3560
+ a.focus().fuzzy(!a.fuzzy());
3561
+ },
3562
+ 13: function(b, a) {
3563
+ a.getFirstEditable() && a.next(1, !0, !0);
3564
+ },
3565
+ 40: function(b, a) {
3566
+ var c = b.shiftKey;
3567
+ a.next(1, c, c);
3568
+ },
3569
+ 38: function(b, a) {
3570
+ var c = b.shiftKey;
3571
+ a.next(-1, c, c);
3572
+ },
3573
+ 73: function(b, a) {
3574
+ if (!b.shiftKey) return !1;
3575
+ a.setInvs(!a.getInvs());
3576
+ }
3577
+ };
3578
+ f.init = function(b, a) {
3579
+ function e(a) {
3580
+ if (a.isDefaultPrevented() || !a.metaKey && !a.ctrlKey) return !0;
3581
+ var e = a.which;
3582
+ if (!f[e]) return !0;
3583
+ var d = c[e];
3584
+ if (!d) throw Error("command undefined #" + e);
3585
+ if (a.altKey || a.shiftKey && !k[e] || !1 === d(a, b)) return !0;
3586
+ a.stopPropagation();
3587
+ a.preventDefault();
3588
+ return !1;
3589
+ }
3590
+ var f = {};
3591
+ h(a || d).on("keydown", e);
3592
+ return {
3593
+ add: function(a, b) {
3594
+ c[m[a]] = b;
3595
+ return this;
3596
+ },
3597
+ enable: function() {
3598
+ var a, b;
3599
+ for (b in arguments) a = m[arguments[b]], f[a] = !0;
3600
+ return this;
3601
+ },
3602
+ disable: function() {
3603
+ h(a || d).off("keydown", e);
3604
+ b = a = f = null;
3605
+ }
3606
+ };
3607
+ };
3608
+ return f;
3609
+ }({}, v, w));
3610
+ n.register("$25", function(f, d, h) {
3611
+ function m() {
3612
+ this.reIndex([]);
3613
+ }
3614
+ f.init = function() {
3615
+ return new m();
3616
+ };
3617
+ d = m.prototype;
3618
+ d.reIndex = function(d) {
3619
+ for (var c = {}, b = -1, a = d.length; ++b < a; ) c[d[b]] = b;
3620
+ this.keys = d;
3621
+ this.length = b;
3622
+ this.ords = c;
3623
+ };
3624
+ d.key = function(d, c) {
3625
+ if (null == c) return this.keys[d];
3626
+ var b = this.keys[d], a = this.ords[c];
3627
+ if (c !== b) {
3628
+ if (null != a) throw Error("Clash with item at [" + a + "]");
3629
+ this.keys[d] = c;
3630
+ delete this.ords[b];
3631
+ this.ords[c] = d;
3632
+ }
3633
+ return d;
3634
+ };
3635
+ d.indexOf = function(d) {
3636
+ d = this.ords[d];
3637
+ return null == d ? -1 : d;
3638
+ };
3639
+ d.add = function(d, c) {
3640
+ var b = this.ords[d];
3641
+ null == b && (this.keys[this.length] = d, b = this.ords[d] = this.length++);
3642
+ this[b] = c;
3643
+ return b;
3644
+ };
3645
+ d.get = function(d) {
3646
+ return this[this.ords[d]];
3647
+ };
3648
+ d.has = function(d) {
3649
+ return null != this.ords[d];
3650
+ };
3651
+ d.del = function(d) {
3652
+ this.cut(this.ords[d], 1);
3653
+ };
3654
+ d.cut = function(d, c) {
3655
+ c = c || 1;
3656
+ var b = [].splice.call(this, d, c);
3657
+ this.keys.splice(d, c);
3658
+ this.reIndex(this.keys);
3659
+ return b;
3660
+ };
3661
+ d.each = function(d) {
3662
+ for (var c = -1, b = this.keys, a = this.length; ++c < a; ) d(b[c], this[c], c);
3663
+ return this;
3664
+ };
3665
+ d.sort = function(d) {
3666
+ for (var c = -1, b = this.length, a, e = this.keys, f = this.ords, g = []; ++c < b; ) g[c] = [ this[c], e[c] ];
3667
+ g.sort(function(a, b) {
3668
+ return d(a[0], b[0]);
3669
+ });
3670
+ for (c = 0; c < b; c++) a = g[c], this[c] = a[0], a = a[1], e[c] = a, f[a] = c;
3671
+ return this;
3672
+ };
3673
+ d.join = function(d) {
3674
+ return [].join.call(this, d);
3675
+ };
3676
+ d = null;
3677
+ return f;
3678
+ }({}, v, w));
3679
+ n.register("$26", function(f, d, h) {
3680
+ function m(d, c) {
3681
+ var b = RegExp("^.{0," + (d - 1) + "}[" + c + "]"), a = RegExp("^[^" + c + "]+");
3682
+ return function(c, f) {
3683
+ for (var g = c.length, l; g > d; ) {
3684
+ l = b.exec(c) || a.exec(c);
3685
+ if (null == l) break;
3686
+ l = l[0];
3687
+ f.push(l);
3688
+ l = l.length;
3689
+ g -= l;
3690
+ c = c.substr(l);
3691
+ }
3692
+ 0 !== g && f.push(c);
3693
+ return f;
3694
+ };
3695
+ }
3696
+ f.create = function(d) {
3697
+ function c(a) {
3698
+ return l[a] || "\\" + a;
3699
+ }
3700
+ var b, a, e = /(?:\r\n|[\r\n\v\f\u2028\u2029])/g, f = /[ \r\n]+/g, g = /[\t\v\f\x07\x08\\\"]/g, l = {
3701
+ "\t": "\\t",
3702
+ "\v": "\\v",
3703
+ "\f": "\\f",
3704
+ "": "\\a",
3705
+ "\b": "\\b"
3706
+ };
3707
+ if (null == d || isNaN(d = Number(d))) d = 79;
3708
+ 0 < d && (b = m(d - 3, " "), a = m(d - 2, "-– \\.,:;\\?!\\)\\]\\}\\>"));
3709
+ return {
3710
+ pair: function(b, l) {
3711
+ if (!l) return b + ' ""';
3712
+ l = l.replace(g, c);
3713
+ var f = 0;
3714
+ l = l.replace(e, function() {
3715
+ f++;
3716
+ return "\\n\n";
3717
+ });
3718
+ if (!(f || d && d < l.length + b.length + 3)) return b + ' "' + l + '"';
3719
+ var p = [ b + ' "' ], h = l.split("\n");
3720
+ if (a) for (var m = -1, n = h.length; ++m < n; ) a(h[m], p); else p = p.concat(h);
3721
+ return p.join('"\n"') + '"';
3722
+ },
3723
+ prefix: function(a, b) {
3724
+ var c = a.split(e);
3725
+ return b + c.join("\n" + b);
3726
+ },
3727
+ refs: function(a) {
3728
+ a = a.replace(f, " ", a);
3729
+ b && (a = b(a, []).join("\n#: "));
3730
+ return "#: " + a;
3731
+ }
3732
+ };
3733
+ };
3734
+ return f;
3735
+ }({}, v, w));
3736
+ n.register("$39", function(f, d, h) {
3737
+ function m() {
3738
+ this.length = 0;
3739
+ }
3740
+ f.init = function() {
3741
+ return new m();
3742
+ };
3743
+ d = m.prototype;
3744
+ d.push = function(d) {
3745
+ this[this.length++] = d;
3746
+ return this;
3747
+ };
3748
+ d.sort = function(d) {
3749
+ [].sort.call(this, d);
3750
+ return this;
3751
+ };
3752
+ d.each = function(d) {
3753
+ for (var c = -1, b = this.length; ++c < b; ) d(c, this[c]);
3754
+ return this;
3755
+ };
3756
+ return f;
3757
+ }({}, v, w));
3758
+ n.register("$27", function(f, d, h) {
3759
+ function m() {}
3760
+ f.extend = function(d) {
3761
+ return d.prototype = new m();
3762
+ };
3763
+ d = m.prototype = n.require("$37", "abstract.js").init([ "add", "load" ]);
3764
+ d.row = function(d) {
3765
+ return this.rows[d];
3766
+ };
3767
+ d.lock = function(d) {
3768
+ return this.locale(d || {
3769
+ lang: "zxx",
3770
+ label: "Unknown",
3771
+ nplurals: 1,
3772
+ pluraleq: "n!=1"
3773
+ });
3774
+ };
3775
+ d.unlock = function() {
3776
+ var d = this.loc;
3777
+ this.loc = null;
3778
+ return d;
3779
+ };
3780
+ d.locale = function(d) {
3781
+ null == d ? d = this.loc : this.loc = d = n.require("$36", "locale.js").cast(d);
3782
+ return d;
3783
+ };
3784
+ d.each = function(d) {
3785
+ this.rows.each(d);
3786
+ return this;
3787
+ };
3788
+ d.indexOf = function(d) {
3789
+ "object" !== typeof d && (d = this.get(d));
3790
+ if (!d) return -1;
3791
+ null == d.idx && (d.idx = this.rows.indexOf(d.hash()));
3792
+ return d.idx;
3793
+ };
3794
+ d.get = function(d) {
3795
+ return this.rows && this.rows.get(d);
3796
+ };
3797
+ d.has = function(d) {
3798
+ return this.rows && this.rows.has(d);
3799
+ };
3800
+ d.del = function(d) {
3801
+ d = this.indexOf(d);
3802
+ if (-1 !== d) {
3803
+ var c = this.rows.cut(d, 1);
3804
+ if (c && c.length) return this.length = this.rows.length, this.rows.each(function(b, a, c) {
3805
+ a.idx = c;
3806
+ }), d;
3807
+ }
3808
+ };
3809
+ d.reIndex = function(d, c) {
3810
+ var b = this.indexOf(d), a = d.hash(), e = this.rows.indexOf(a);
3811
+ return e === b ? b : -1 !== e ? (c = (c || 0) + 1, d.source("Error, duplicate " + String(c) + ": " + d.source()),
3812
+ this.reIndex(d, c)) : this.rows.key(b, a);
3813
+ };
3814
+ d.sort = function(d) {
3815
+ this.rows.sort(d);
3816
+ return this;
3817
+ };
3818
+ d["export"] = function() {
3819
+ for (var d = -1, c = this.rows, b = c.length, a = n.require("$39", "list.js").init(); ++d < b; ) a.push(c[d]);
3820
+ return a;
3821
+ };
3822
+ d = null;
3823
+ return f;
3824
+ }({}, v, w));
3825
+ n.register("$28", function(f, d, h) {
3826
+ function m(c, b, a) {
3827
+ if (null == a) return c[b] || "";
3828
+ c[b] = a || "";
3829
+ return c;
3830
+ }
3831
+ function k() {
3832
+ this._id = this.id = "";
3833
+ }
3834
+ f.extend = function(c) {
3835
+ return c.prototype = new k();
3836
+ };
3837
+ d = k.prototype;
3838
+ d.flag = function(c, b) {
3839
+ var a = this.flg || (this.flg = []);
3840
+ if (null != b) a[b] = c; else for (var d = Math.max(a.length, this.src.length, this.msg.length); 0 !== d--; ) a[d] = c;
3841
+ return this;
3842
+ };
3843
+ d.flagged = function(c) {
3844
+ var b = this.flg || [];
3845
+ if (null != c) return b[c] || 0;
3846
+ for (c = b.length; 0 !== c--; ) if (b[c]) return !0;
3847
+ return !1;
3848
+ };
3849
+ d.flags = function() {
3850
+ for (var c, b = {}, a = [], d = this.flg || [], f = d.length; 0 !== f--; ) c = d[f],
3851
+ b[c] || (b[c] = !0, a.push(c));
3852
+ return a;
3853
+ };
3854
+ d.flaggedAs = function(c, b) {
3855
+ var a = this.flg || [];
3856
+ if (null != b) return c === a[b] || 0;
3857
+ for (var d = a.length; 0 !== d--; ) if (a[d] === c) return !0;
3858
+ return !1;
3859
+ };
3860
+ d.fuzzy = function(c, b) {
3861
+ var a = this.flaggedAs(4, c);
3862
+ null != b && this.flag(b ? 4 : 0, c);
3863
+ return a;
3864
+ };
3865
+ d.source = function(c, b) {
3866
+ if (null == c) return this.src[b || 0] || "";
3867
+ this.src[b || 0] = c;
3868
+ return this;
3869
+ };
3870
+ d.plural = function(c, b) {
3871
+ if (null == c) return this.src[b || 1] || "";
3872
+ this.src[b || 1] = c || "";
3873
+ return this;
3874
+ };
3875
+ d.sourceForms = function() {
3876
+ return this.srcF;
3877
+ };
3878
+ d.targetForms = function() {
3879
+ return this.msgF;
3880
+ };
3881
+ d.each = function(c) {
3882
+ for (var b = -1, a = this.src, d = this.msg, f = Math.max(a.length, d.length); ++b < f; ) c(b, a[b], d[b]);
3883
+ return this;
3884
+ };
3885
+ d.count = function() {
3886
+ return Math.max(this.src.length, this.msg.length);
3887
+ };
3888
+ d.pluralized = function() {
3889
+ return 1 < this.src.length || 1 < this.msg.length;
3890
+ };
3891
+ d.translate = function(c, b) {
3892
+ this.msg[b || 0] = c || "";
3893
+ return this;
3894
+ };
3895
+ d.untranslate = function(c) {
3896
+ if (null != c) this.msg[c] = ""; else {
3897
+ var b = this.msg, a = b.length;
3898
+ for (c = 0; c < a; c++) b[c] = "";
3899
+ }
3900
+ return this;
3901
+ };
3902
+ d.translation = function(c) {
3903
+ return this.msg[c || 0] || "";
3904
+ };
3905
+ d.errors = function(c) {
3906
+ return this.err && this.err[c || 0] || [];
3907
+ };
3908
+ d.translated = function(c) {
3909
+ if (null != c) return !!this.msg[c];
3910
+ var b = this.msg, a = b.length;
3911
+ for (c = 0; c < a; c++) if (!b[c]) return !1;
3912
+ return !0;
3913
+ };
3914
+ d.untranslated = function(c) {
3915
+ if (null != c) return !this.msg[c];
3916
+ var b = this.msg, a = b.length;
3917
+ for (c = 0; c < a; c++) if (b[c]) return !1;
3918
+ return !0;
3919
+ };
3920
+ d.comment = function(c) {
3921
+ return m(this, "cmt", c);
3922
+ };
3923
+ d.notes = function(c) {
3924
+ return m(this, "xcmt", c);
3925
+ };
3926
+ d.refs = function(c) {
3927
+ return m(this, "rf", c);
3928
+ };
3929
+ d.format = function(c) {
3930
+ return m(this, "fmt", c);
3931
+ };
3932
+ d.context = function(c) {
3933
+ return m(this, "ctx", c);
3934
+ };
3935
+ d.tags = function() {
3936
+ return this.tg;
3937
+ };
3938
+ d.toString = d.toText = function() {
3939
+ return this.src.concat(this.msg, this.id, this.ctx).join(" ");
3940
+ };
3941
+ d.weight = function() {
3942
+ var c = 0;
3943
+ this.translation() || (c += 2);
3944
+ this.fuzzy() && (c += 1);
3945
+ return c;
3946
+ };
3947
+ d.equals = function(c) {
3948
+ return this === c || this.hash() === c.hash();
3949
+ };
3950
+ d.hash = function() {
3951
+ return this.id;
3952
+ };
3953
+ d.normalize = function() {
3954
+ for (var c = this.msg.length; 0 !== c--; ) this.msg[c] = this.src[c] || "";
3955
+ };
3956
+ d.disabled = function(c) {
3957
+ return !!(this.lck || [])[c || 0];
3958
+ };
3959
+ d.disable = function(c) {
3960
+ (this.lck || (this.lck = []))[c || 0] = !0;
3961
+ return this;
3962
+ };
3963
+ d.saved = function(c) {
3964
+ var b = this.drt;
3965
+ if (null == b) return !0;
3966
+ if (null != c) return !b[c];
3967
+ for (c = b.length; 0 !== c--; ) if (b[c]) return !1;
3968
+ return !0;
3969
+ };
3970
+ d.unsave = function(c) {
3971
+ (this.drt || (this.drt = []))[c || 0] = !0;
3972
+ return this;
3973
+ };
3974
+ d.save = function(c) {
3975
+ null == c ? this.drt = null : (this.drt || (this.drt = []))[c] = !1;
3976
+ return this;
3977
+ };
3978
+ d.is = function(c) {
3979
+ return c && (c === this || c.idx === this.idx);
3980
+ };
3981
+ d.isHTML = function(c) {
3982
+ if (null == c) return this.htm || !1;
3983
+ this.htm = c;
3984
+ };
3985
+ d = null;
3986
+ return f;
3987
+ }({}, v, w));
3988
+ n.register("$15", function(f, d, h) {
3989
+ function m(a) {
3990
+ return {
3991
+ "Project-Id-Version": "PACKAGE VERSION",
3992
+ "Report-Msgid-Bugs-To": "",
3993
+ "POT-Creation-Date": a || "",
3994
+ "PO-Revision-Date": a || "",
3995
+ "Last-Translator": "",
3996
+ "Language-Team": "",
3997
+ Language: "",
3998
+ "Plural-Forms": "",
3999
+ "MIME-Version": "1.0",
4000
+ "Content-Type": "text/plain; charset=UTF-8",
4001
+ "Content-Transfer-Encoding": "8bit"
4002
+ };
4003
+ }
4004
+ function k(a, b) {
4005
+ var c = a || "";
4006
+ b && (c += "\0" + b);
4007
+ return c;
4008
+ }
4009
+ function c(a) {
4010
+ var b = d.console;
4011
+ b && b.error && b.error(a.message || String(a));
4012
+ }
4013
+ function b(a) {
4014
+ return n.require("$26", "format.js").create(a);
4015
+ }
4016
+ function a(a) {
4017
+ this.locale(a);
4018
+ this.clear();
4019
+ this.head = m(this.now());
4020
+ }
4021
+ function e(a, b) {
4022
+ this.src = [ a || "" ];
4023
+ this.msg = [ b || "" ];
4024
+ }
4025
+ f.create = function(b) {
4026
+ return new a(b);
4027
+ };
4028
+ h = n.require("$27", "messages.js").extend(a);
4029
+ h.clear = function() {
4030
+ this.rows = n.require("$25", "collection.js").init();
4031
+ this.length = 0;
4032
+ return this;
4033
+ };
4034
+ h.now = function() {
4035
+ function a(b, c) {
4036
+ for (var d = String(b); d.length < c; ) d = "0" + d;
4037
+ return d;
4038
+ }
4039
+ var b = new Date(), c = b.getUTCFullYear(), d = b.getUTCMonth() + 1, e = b.getUTCDate(), f = b.getUTCHours(), b = b.getUTCMinutes();
4040
+ return a(c, 4) + "-" + a(d, 2) + "-" + a(e, 2) + " " + a(f, 2) + ":" + a(b, 2) + "+0000";
4041
+ };
4042
+ h.header = function(a, b) {
4043
+ var c = this.head || (this.head = {});
4044
+ if (null == b) return this.headers()[a] || "";
4045
+ c[a] = b || "";
4046
+ return this;
4047
+ };
4048
+ h.headers = function(a) {
4049
+ var b, c = this.now(), d = this.head || (this.head = m(c));
4050
+ if (null != a) {
4051
+ for (b in a) d[b] = a[b];
4052
+ return this;
4053
+ }
4054
+ var e = this.locale();
4055
+ a = {};
4056
+ for (b in d) a[b] = String(d[b]);
4057
+ e ? (a.Language = String(e) || "zxx", a["Language-Team"] = e.label || a.Language,
4058
+ a["Plural-Forms"] = "nplurals=" + (e.nplurals || "2") + "; plural=" + (e.pluraleq || "n!=1") + ";",
4059
+ b = "PO-Revision-Date") : (a.Language = "", a["Plural-Forms"] = "nplurals=INTEGER; plural=EXPRESSION;",
4060
+ a["PO-Revision-Date"] = "YEAR-MO-DA HO:MI+ZONE", b = "POT-Creation-Date");
4061
+ a[b] || (a[b] = c);
4062
+ a["X-Generator"] = "Loco https://localise.biz/";
4063
+ return a;
4064
+ };
4065
+ h.get = function(a, b) {
4066
+ var c = k(a, b);
4067
+ return this.rows.get(c);
4068
+ };
4069
+ h.add = function(a, b) {
4070
+ a instanceof e || (a = new e(a));
4071
+ b && a.context(b);
4072
+ var d = a.hash();
4073
+ this.rows.get(d) ? c("Duplicate message at index " + this.indexOf(a)) : (a.idx = this.rows.add(d, a),
4074
+ this.length = this.rows.length);
4075
+ return a;
4076
+ };
4077
+ h.load = function(a) {
4078
+ for (var b = -1, d, f, k, h, m, n, r = (k = this.locale()) && k.nplurals || 2, z = []; ++b < a.length; ) d = a[b],
4079
+ null == d.parent ? (f = d.source || d.id, k = d.target || "", h = d.context, f || h ? (m = new e(f, k),
4080
+ m._id = d._id, h && m.context(h), d.flag && m.flag(d.flag, 0), d.comment && m.comment(d.comment),
4081
+ d.notes && m.notes(d.notes), d.refs && m.refs(d.refs), m.format(d.format), d.message = m,
4082
+ this.add(m), d.prev && d.prev[0] && (m.prev(d.prev[0].source, d.prev[0].context),
4083
+ d.prev[1] && m._src.push(d.prev[1].source || ""))) : 0 === b && "object" === typeof k && (this.head = k,
4084
+ this.headcmt = d.comment)) : z.push(d);
4085
+ for (b = -1; ++b < z.length; ) try {
4086
+ d = z[b];
4087
+ f = d.source || d.id;
4088
+ m = a[d.parent] && a[d.parent].message;
4089
+ if (!m) throw Error("parent missing for plural " + f);
4090
+ n = d.plural;
4091
+ 1 === n && m.plural(f);
4092
+ n >= r || (d.flag && m.flag(d.flag, n), m.translate(d.target || "", n), d.format && !m.format() && m.format(d.format));
4093
+ } catch (v) {
4094
+ c(v);
4095
+ }
4096
+ return this;
4097
+ };
4098
+ h.wrap = function(a) {
4099
+ this.fmtr = b(a);
4100
+ return this;
4101
+ };
4102
+ h.toString = function() {
4103
+ var a, c = this.locale(), d = [], f = [], k = this.headers(), h = !c, m = c && c.nplurals || 2, n = this.fmtr || b();
4104
+ k[c ? "PO-Revision-Date" : "POT-Creation-Date"] = this.now();
4105
+ for (a in k) f.push(a + ": " + k[a]);
4106
+ f = new e("", f.join("\n"));
4107
+ f.comment(this.headcmt || "");
4108
+ h && f.fuzzy(0, !0);
4109
+ d.push(f.toString());
4110
+ d.push("");
4111
+ this.rows.each(function(a, b) {
4112
+ a && (d.push(b.cat(n, h, m)), d.push(""));
4113
+ });
4114
+ return d.join("\n");
4115
+ };
4116
+ h = n.require("$28", "message.js").extend(e);
4117
+ h.prev = function(a, b) {
4118
+ this._src = [ a || "" ];
4119
+ this._ctx = b;
4120
+ };
4121
+ h.hash = function() {
4122
+ return k(this.source(), this.context());
4123
+ };
4124
+ h.toString = function() {
4125
+ return this.cat(b());
4126
+ };
4127
+ h.cat = function(a, b, c) {
4128
+ var d, e = [], f;
4129
+ (f = this.cmt) && e.push(a.prefix(f, "# "));
4130
+ (f = this.xcmt) && e.push(a.prefix(f, "#. "));
4131
+ d = this.rf;
4132
+ if (f = this._id) d += (d ? " " : "") + "loco:" + f;
4133
+ d && /\S/.test(d) && e.push(a.refs(d));
4134
+ !b && this.fuzzy() && e.push("#, fuzzy");
4135
+ (f = this.fmt) && e.push("#, " + f + "-format");
4136
+ (f = this._ctx) && e.push(a.prefix(a.pair("msgctxt", f), "#| "));
4137
+ if (f = this._src) f[0] && e.push(a.prefix(a.pair("msgid", f[0]), "#| ")), f[1] && e.push(a.prefix(a.pair("msgid_plural", f[1]), "#| "));
4138
+ (f = this.ctx) && e.push(a.pair("msgctxt", f));
4139
+ e.push(a.pair("msgid", this.src[0]));
4140
+ if (null == this.src[1]) e.push(a.pair("msgstr", b ? "" : this.msg[0])); else for (d = -1,
4141
+ e.push(a.pair("msgid_plural", this.src[1])), f = this.msg || [ "", "" ], c = c || f.length; ++d < c; ) e.push(a.pair("msgstr[" + d + "]", b ? "" : f[d] || ""));
4142
+ return e.join("\n");
4143
+ };
4144
+ h.compare = function(a, b) {
4145
+ var c = this.weight(), d = a.weight();
4146
+ if (c > d) return 1;
4147
+ if (c < d) return -1;
4148
+ if (b) {
4149
+ c = this.hash().toLowerCase();
4150
+ d = a.hash().toLowerCase();
4151
+ if (c < d) return 1;
4152
+ if (c > d) return -1;
4153
+ }
4154
+ return 0;
4155
+ };
4156
+ h.copy = function() {
4157
+ var a = new e(), b, c;
4158
+ for (b in this) this.hasOwnProperty(b) && ((c = this[b]) && c.concat && (c = c.concat()),
4159
+ a[b] = c);
4160
+ return a;
4161
+ };
4162
+ h = h = null;
4163
+ return f;
4164
+ }({}, v, w));
4165
+ n.register("$17", function(f, d, n) {
4166
+ f.init = function(d, f) {
4167
+ function c() {
4168
+ return p || (p = h('<div id="loco-po-ref"></div>').dialog({
4169
+ dialogClass: "loco-modal loco-modal-wide",
4170
+ modal: !0,
4171
+ autoOpen: !1,
4172
+ closeOnEscape: !0,
4173
+ resizable: !1,
4174
+ height: 500
4175
+ }));
4176
+ }
4177
+ function b(a, b, d) {
4178
+ a = h("<p></p>").text(d);
4179
+ c().dialog("close").html("").dialog("option", "title", "Error").append(a).dialog("open");
4180
+ }
4181
+ function a(a) {
4182
+ var b = a && a.code;
4183
+ if (b) {
4184
+ for (var d = -1, e = b.length, f = h("<ol></ol>").attr("class", a.type); ++d < e; ) h("<li></li>").html(b[d]).appendTo(f);
4185
+ f.find("li").eq(a.line - 1).attr("class", "highlighted");
4186
+ c().dialog("close").html("").dialog("option", "title", a.path + ":" + a.line).append(f).dialog("open");
4187
+ }
4188
+ }
4189
+ function e(a) {
4190
+ a = a.target;
4191
+ var b = h(a).find("li.highlighted")[0], b = Math.max(0, (b && b.offsetTop || 0) - Math.floor(a.clientHeight / 2));
4192
+ a.scrollTop = b;
4193
+ }
4194
+ var p;
4195
+ return {
4196
+ load: function(g) {
4197
+ c().html('<div class="loco-loading"></div>').dialog("option", "title", "Loading..").off("dialogopen").dialog("open").on("dialogopen", e);
4198
+ g = h.extend({
4199
+ ref: g,
4200
+ path: f.popath
4201
+ }, f.project || {});
4202
+ d.ajax.post("fsReference", g, a, b);
4203
+ }
4204
+ };
4205
+ };
4206
+ return f;
4207
+ }({}, v, w));
4208
+ n.register("$30", function(f, d, h) {
4209
+ function m(d) {
4210
+ this.api = d;
4211
+ this.chars = 0;
4212
+ }
4213
+ f.create = function(d) {
4214
+ return new m(d);
4215
+ };
4216
+ d = m.prototype;
4217
+ d.init = function(d, c) {
4218
+ function b(a) {
4219
+ var b = {
4220
+ length: 0,
4221
+ html: a.html,
4222
+ sources: []
4223
+ };
4224
+ n.push(b);
4225
+ return q[a.html ? 1 : 0] = b;
4226
+ }
4227
+ function a(a, d) {
4228
+ var k = a.source(null, d);
4229
+ if (k && (a.untranslated(d) || c)) {
4230
+ var n = m[k];
4231
+ if (n) n.push(a); else {
4232
+ var n = k.length, s = e.isHtml(k), s = q[s ? 1 : 0], u = s.sources;
4233
+ if (s.length + n > h || u.length === l) s = b(s), u = s.sources;
4234
+ u.push(k);
4235
+ m[k] = [ a ];
4236
+ s.length += n;
4237
+ f += n;
4238
+ g += 1;
4239
+ }
4240
+ }
4241
+ }
4242
+ var e = this.api, f = 0, g = 0, l = 50, h = 5e3, m = {}, n = [], q = [];
4243
+ b({
4244
+ html: !1
4245
+ });
4246
+ b({
4247
+ html: !0
4248
+ });
4249
+ d.each(function(b, c) {
4250
+ a(c, 0);
4251
+ a(c, 1);
4252
+ });
4253
+ q = null;
4254
+ this.map = m;
4255
+ this.chars = f;
4256
+ this.length = g;
4257
+ this.batches = n;
4258
+ this.locale = d.locale();
4259
+ };
4260
+ d.abort = function() {
4261
+ this.state = "abort";
4262
+ return this;
4263
+ };
4264
+ d.dispatch = function() {
4265
+ function d(a, b) {
4266
+ function e(c, d, g) {
4267
+ b !== g && (a === d || 1 < c && f.source(null, 1) === a) && (f.translate(b, c),
4268
+ p++, z++);
4269
+ return p;
4270
+ }
4271
+ if (!c()) return !1;
4272
+ if (!b) return !0;
4273
+ var f, l = m[a] || [], k = l.length, h = -1, p;
4274
+ for (v++; ++h < k; ) if (f = l[h]) p = 0, f.each(e), p && g("each", [ f ]);
4275
+ return !0;
4276
+ }
4277
+ function c() {
4278
+ return "abort" === l.state ? (h && (h.abort(), f()), !1) : !0;
4279
+ }
4280
+ function b() {
4281
+ var b = n.shift(), c;
4282
+ b ? (c = b.sources) && c.length ? h.batch(c, q, b.html, d).fail(a).always(e) : e() : f();
4283
+ }
4284
+ function a() {
4285
+ l.abort();
4286
+ f();
4287
+ }
4288
+ function e() {
4289
+ r++;
4290
+ g("prog", [ r, C ]);
4291
+ c() && b();
4292
+ }
4293
+ function f() {
4294
+ h = n = null;
4295
+ g("done");
4296
+ }
4297
+ function g(a, b) {
4298
+ for (var c = u[a] || [], d = c.length; 0 <= --d; ) c[d].apply(null, b);
4299
+ }
4300
+ var l = this, h = l.api, m = l.map, n = l.batches || [], q = l.locale, v = 0, r = 0, z = 0, w = l.length, C = n.length, u = {
4301
+ done: [],
4302
+ each: [],
4303
+ prog: []
4304
+ };
4305
+ l.state = "";
4306
+ b();
4307
+ return {
4308
+ done: function(a) {
4309
+ u.done.push(a);
4310
+ return this;
4311
+ },
4312
+ each: function(a) {
4313
+ u.each.push(a);
4314
+ return this;
4315
+ },
4316
+ prog: function(a) {
4317
+ u.prog.push(a);
4318
+ return this;
4319
+ },
4320
+ stat: function() {
4321
+ return {
4322
+ todo: function() {
4323
+ return Math.max(w - v, 0);
4324
+ },
4325
+ did: function() {
4326
+ return v;
4327
+ }
4328
+ };
4329
+ }
4330
+ };
4331
+ };
4332
+ return f;
4333
+ }({}, v, w));
4334
+ n.register("$40", {
4335
+ nn: [ "no" ]
4336
+ });
4337
+ n.register("$31", function(f, d, h) {
4338
+ function m() {}
4339
+ function k(c) {
4340
+ c.parseError = function(b) {
4341
+ return b && b.code && 200 !== b.code && b.message ? "Error " + b.code + ": " + b.message : "";
4342
+ };
4343
+ c.batch = function(b, a, d, f) {
4344
+ function g(c) {
4345
+ for (var d = b.length, e = -1; ++e < d && !1 !== f(b[e], c[e] || "", a); ) ;
4346
+ }
4347
+ d = d ? "html" : "plain";
4348
+ var l = this.toLang(a);
4349
+ return c._call({
4350
+ url: "https://translate.yandex.net/api/v1.5/tr.json/translate?format=" + d + "&lang=en-" + l,
4351
+ method: "POST",
4352
+ traditional: !0,
4353
+ data: {
4354
+ key: c.key(),
4355
+ text: b
4356
+ }
4357
+ }).done(function(a, b, d) {
4358
+ a && 200 === a.code ? g(a.text || []) : (c.stderr(c.parseError(a) || c.httpError(d)),
4359
+ g([]));
4360
+ }).fail(function() {
4361
+ g([]);
4362
+ });
4363
+ };
4364
+ }
4365
+ f.create = function(c) {
4366
+ var b = m.prototype = new c();
4367
+ b.toString = function() {
4368
+ return "Yandex.Translate";
4369
+ };
4370
+ b.getId = function() {
4371
+ return "yandex";
4372
+ };
4373
+ b.getUrl = function() {
4374
+ return "https://translate.yandex.com/";
4375
+ };
4376
+ b.init = function(a) {
4377
+ c.prototype.init.call(this, a);
4378
+ /^trnsl\./.test(this.key()) && k(this);
4379
+ };
4380
+ b.toLang = function(a) {
4381
+ return this.mapLang(a, n.require("$40", "yandex.json"));
4382
+ };
4383
+ return new m();
4384
+ };
4385
+ return f;
4386
+ }({}, v, w));
4387
+ n.register("$41", {
4388
+ zh: [ "zh", "zh-CN", "zh-TW" ],
4389
+ he: [ "iw" ],
4390
+ jv: [ "jw" ]
4391
+ });
4392
+ n.register("$32", function(f, d, h) {
4393
+ function m() {}
4394
+ f.create = function(d) {
4395
+ d = m.prototype = new d();
4396
+ d.toString = function() {
4397
+ return "Google Translate";
4398
+ };
4399
+ d.getId = function() {
4400
+ return "google";
4401
+ };
4402
+ d.getUrl = function() {
4403
+ return "https://translate.google.com/";
4404
+ };
4405
+ d.parseError = function(c) {
4406
+ if (c.error) {
4407
+ for (var b = [], a = c.error.errors || [], d = a.length, f = -1; ++f < d; ) b.push(a[f].message || "");
4408
+ return "Error " + c.error.code + ": " + b.join(";");
4409
+ }
4410
+ return "";
4411
+ };
4412
+ d.batch = function(c, b, a, d) {
4413
+ function f(a) {
4414
+ for (var g = c.length, l = -1, k; ++l < g && (k = a[l] || {}, !1 !== d(c[l], k.translatedText || "", b)); ) ;
4415
+ }
4416
+ var g = this;
4417
+ a = a ? "html" : "text";
4418
+ var l = g.mapLang(b, n.require("$41", "google.json"));
4419
+ return g._call({
4420
+ url: "https://translation.googleapis.com/language/translate/v2?source=en&target=" + l + "&format=" + a,
4421
+ method: "POST",
4422
+ traditional: !0,
4423
+ data: {
4424
+ key: g.key(),
4425
+ q: c
4426
+ }
4427
+ }).done(function(a, b, c) {
4428
+ a.data ? f(a.data.translations || []) : (g.stderr(g.parseError(a) || g.httpError(c)),
4429
+ f([]));
4430
+ }).fail(function() {
4431
+ f([]);
4432
+ });
4433
+ };
4434
+ return new m();
4435
+ };
4436
+ return f;
4437
+ }({}, v, w));
4438
+ n.register("$42", {
4439
+ nn: [ "no" ],
4440
+ pt: [ "pt", "pt-pt" ],
4441
+ sr: [ "sr-Cyrl", "sr-Latn" ],
4442
+ sr_RS: [ "sr-Cyrl" ],
4443
+ tlh: [ "tlh-Latn", "tlh-Piqd" ],
4444
+ zh: [ "zh-Hans", "zh-Hant" ],
4445
+ zh_CN: [ "zh-Hans" ],
4446
+ zh_HK: [ "zh-Hans" ],
4447
+ zh_SG: [ "zh-Hans" ],
4448
+ zh_TW: [ "zh-Hant" ]
4449
+ });
4450
+ n.register("$33", function(f, d, h) {
4451
+ function m() {}
4452
+ f.create = function(d) {
4453
+ d = m.prototype = new d();
4454
+ d.toString = function() {
4455
+ return "Microsoft Translator text API";
4456
+ };
4457
+ d.getId = function() {
4458
+ return "microsoft";
4459
+ };
4460
+ d.getUrl = function() {
4461
+ return "https://aka.ms/MicrosoftTranslatorAttribution";
4462
+ };
4463
+ d.parseError = function(c) {
4464
+ return c && c.error ? c.error.message : "";
4465
+ };
4466
+ d.batch = function(c, b, a, d) {
4467
+ function f(a) {
4468
+ for (var g = -1, l; ++g < h && (l = a[g] || {}, l = l.translations || [], l = l[0] || {},
4469
+ !1 !== d(c[g], l.text || "", b)); ) ;
4470
+ }
4471
+ var g = this, l = [], h = c.length, k = -1;
4472
+ a = a ? "html" : "plain";
4473
+ for (var m = g.mapLang(b, n.require("$42", "ms.json")); ++k < h; ) l.push({
4474
+ text: c[k]
4475
+ });
4476
+ return g._call({
4477
+ url: "https://api.cognitive.microsofttranslator.com/translate?api-version=3.0&from=en&to=" + m + "&textType=" + a,
4478
+ method: "POST",
4479
+ data: JSON.stringify(l),
4480
+ headers: {
4481
+ "Content-Type": "application/json; charset=UTF-8",
4482
+ "Ocp-Apim-Subscription-Key": this.key(),
4483
+ "Ocp-Apim-Subscription-Region": g.param("region") || "global"
4484
+ }
4485
+ }).done(function(a, b, c) {
4486
+ a && a.length ? f(a) : (g.stderr(g.parseError(a) || g.httpError(c)), f([]));
4487
+ }).fail(function() {
4488
+ f([]);
4489
+ });
4490
+ };
4491
+ return new m();
4492
+ };
4493
+ return f;
4494
+ }({}, v, w));
4495
+ n.register("$43", {
4496
+ pt: [ "pt-PT", "pt-BR" ]
4497
+ });
4498
+ n.register("$34", function(f, d, h) {
4499
+ function m() {}
4500
+ f.create = function(d) {
4501
+ d = m.prototype = new d();
4502
+ d.toString = function() {
4503
+ return "DeepL Translator";
4504
+ };
4505
+ d.getId = function() {
4506
+ return "deepl";
4507
+ };
4508
+ d.getUrl = function() {
4509
+ return "https://www.deepl.com/translator";
4510
+ };
4511
+ d.parseError = function(c) {
4512
+ return c.message;
4513
+ };
4514
+ d.batch = function(c, b, a, d) {
4515
+ function f(a) {
4516
+ for (var g = c.length, l = -1, h; ++l < g && (h = a[l] || {}, !1 !== d(c[l], h.text || "", b)); ) ;
4517
+ }
4518
+ var g = this;
4519
+ a = g.param("url") || "https://api.deepl.com";
4520
+ var l = g.mapLang(b, n.require("$43", "deepl.json")), h = b.tone, k = "default";
4521
+ null == h && (h = String(b.variant || "").toLowerCase());
4522
+ "formal" === h ? k = "more" : "informal" === h && (k = "less");
4523
+ return g._call({
4524
+ url: g.fixURL(a + "/v2/translate"),
4525
+ method: "POST",
4526
+ traditional: !0,
4527
+ data: {
4528
+ source_lang: "EN",
4529
+ target_lang: l.toUpperCase(),
4530
+ formality: k,
4531
+ preserve_formatting: "1",
4532
+ auth_key: g.key(),
4533
+ text: c
4534
+ }
4535
+ }).done(function(a, b, c) {
4536
+ a.translations ? f(a.translations) : (g.stderr(g.parseError(a) || g.httpError(c)),
4537
+ f([]));
4538
+ }).fail(function() {
4539
+ f([]);
4540
+ });
4541
+ };
4542
+ d.fixURL = function(c) {
4543
+ c = c.split("://", 2);
4544
+ 1 === c.length && c.unshift("https");
4545
+ return c[0] + "://" + c[1].replace(/\/{2,}/g, "/");
4546
+ };
4547
+ return new m();
4548
+ };
4549
+ return f;
4550
+ }({}, v, w));
4551
+ n.register("$18", function(f, d, v) {
4552
+ function m() {
4553
+ this.inf = {};
4554
+ }
4555
+ function k() {
4556
+ var a = v.createElement("p"), b = /&(#\d+|#x[0-9a-f]|[a-z]+);/i, c = /<[a-z]+\s/i, d, f;
4557
+ return {
4558
+ sniff: function(h) {
4559
+ if (h === d) return f;
4560
+ d = h;
4561
+ if (b.test(h) || c.test(h)) if (a.innerHTML = h, a.textContent !== h) return f = !0;
4562
+ return f = !1;
4563
+ }
4564
+ };
4565
+ }
4566
+ var c = m.prototype;
4567
+ c.init = function(a) {
4568
+ this.inf = a || {};
4569
+ };
4570
+ c.param = function(a) {
4571
+ return this.inf[a] || "";
4572
+ };
4573
+ c.key = function() {
4574
+ return this.param("key");
4575
+ };
4576
+ c.getId = function() {
4577
+ return this.param("id") || "none";
4578
+ };
4579
+ c.getUrl = function() {
4580
+ return this.param("url") || "#";
4581
+ };
4582
+ c.toString = function() {
4583
+ return this.param("name") || this.getId();
4584
+ };
4585
+ c.stderr = function(a) {
4586
+ var b = (d.loco || {}).notices || d.console;
4587
+ b && b.error && b.error(String(this) + ": " + String(a));
4588
+ };
4589
+ c.httpError = function(a) {
4590
+ return (a = a && a.status) && 200 !== a ? "Responded status " + a : "Unknown error";
4591
+ };
4592
+ c.parseError = function() {
4593
+ return "";
4594
+ };
4595
+ c.mapLang = function(a, b) {
4596
+ var c = String(a).replace("-", "_"), d = a.lang, f = b[c] || b[d] || [], h = f.length;
4597
+ if (0 === h) return d;
4598
+ if (1 < h) for (var c = c.toLowerCase(), d = -1, k; ++d < h; ) if (k = f[d], k.toLowerCase().replace("-", "_") === c) return k;
4599
+ return f[0];
4600
+ };
4601
+ c.toLang = function(a) {
4602
+ return String(a);
4603
+ };
4604
+ c.translate = function(a, b, c) {
4605
+ return this.batch([ a ], b, this.isHtml(a), c);
4606
+ };
4607
+ c._call = function(a) {
4608
+ var b = this;
4609
+ b.state = null;
4610
+ a.cache = !0;
4611
+ a.dataType = "json";
4612
+ a.error = function(a, c, d) {
4613
+ try {
4614
+ var f = a.responseText, h = f && n.require("$5", "json.js").parse(f);
4615
+ d = h && b.parseError(h) || d;
4616
+ } catch (k) {}
4617
+ b.stderr(d || b.httpError(a));
4618
+ };
4619
+ return b.abortable(h.ajax(a));
4620
+ };
4621
+ c.abortable = function(a) {
4622
+ var b = this;
4623
+ a.always(function() {
4624
+ b.$r === a && (b.$r = null);
4625
+ });
4626
+ return b.$r = a;
4627
+ };
4628
+ c.abort = function() {
4629
+ var a = this.$r;
4630
+ a && a.abort();
4631
+ };
4632
+ c.isHtml = function(a) {
4633
+ return (b || (b = k())).sniff(a);
4634
+ };
4635
+ c.createJob = function() {
4636
+ return n.require("$30", "job.js").create(this);
4637
+ };
4638
+ c.batch = function(a, b, c, f) {
4639
+ function l(c) {
4640
+ for (var d = a.length, h = -1; ++h < d && !1 !== f(a[h], c[h], b); ) ;
4641
+ }
4642
+ var k = d.loco.ajax;
4643
+ c = {
4644
+ hook: this.getId(),
4645
+ type: c ? "html" : "text",
4646
+ locale: this.toLang(b),
4647
+ sources: a
4648
+ };
4649
+ var m = h.Deferred();
4650
+ this.abortable(k.post("apis", c, function(a) {
4651
+ l(a && a.targets || []);
4652
+ m.resolve();
4653
+ }, function() {
4654
+ l([]);
4655
+ m.reject();
4656
+ }));
4657
+ return m.promise();
4658
+ };
4659
+ f.create = function(a) {
4660
+ var b;
4661
+ b = a.id;
4662
+ b = "yandex" === b ? n.require("$31", "yandex.js").create(m) : "google" === b ? n.require("$32", "google.js").create(m) : "microsoft" === b ? n.require("$33", "ms.js").create(m) : "deepl" === b ? n.require("$34", "deepl.js").create(m) : new m();
4663
+ b.init(a);
4664
+ return b;
4665
+ };
4666
+ f.suggest = function(a, b, c, d) {
4667
+ var f, h, k = a.length;
4668
+ for (f = 0; f < k; f++) h = a[f], h.translate(b, c, d);
4669
+ };
4670
+ var b;
4671
+ return f;
4672
+ }({}, v, w));
4673
+ n.register("$19", function(f, d, n) {
4674
+ f.init = function(f) {
4675
+ function k() {
4676
+ H || (I.on("click", l), H = h('<div id="loco-fs-creds"></div>').dialog({
4677
+ dialogClass: "request-filesystem-credentials-dialog loco-modal",
4678
+ minWidth: 580,
4679
+ modal: !0,
4680
+ autoOpen: !1,
4681
+ closeOnEscape: !0
4682
+ }).on("change", 'input[name="connection_type"]', function() {
4683
+ this.checked && h("#ssh-keys").toggleClass("hidden", "ssh" !== h(this).val());
4684
+ }));
4685
+ return H;
4686
+ }
4687
+ function c() {
4688
+ R && (b(h(r)), R = !1);
4689
+ if (C && J) {
4690
+ var a = J, c = h(Q);
4691
+ c.find("span.loco-msg").text(a);
4692
+ K || (c.removeClass("jshide").hide().fadeIn(500), K = !0);
4693
+ } else K && (b(h(Q)), K = !1);
4694
+ }
4695
+ function b(a) {
4696
+ a.slideUp(250).fadeOut(250, function() {
4697
+ h(this).addClass("jshide");
4698
+ });
4699
+ }
4700
+ function a() {
4701
+ if (C) return H && H.dialog("close"), c(), h(f).find('button[type="submit"]').attr("disabled", !1),
4702
+ h(d).triggerHandler("resize"), w && w(!0), !0;
4703
+ x && H ? (R || (h(r).removeClass("jshide").hide().fadeIn(500), R = !0), K && (b(h(Q)),
4704
+ K = !1)) : c();
4705
+ h(f).find('input[type="submit"]').attr("disabled", !0);
4706
+ w && w(!1);
4707
+ return !1;
4708
+ }
4709
+ function e(a) {
4710
+ var b, c, d = q || {};
4711
+ for (b in d) d.hasOwnProperty(b) && (c = d[b], a[b] ? a[b].value = c : h('<input type="hidden" />').attr("name", b).appendTo(a).val(c));
4712
+ }
4713
+ function p(a) {
4714
+ a.preventDefault();
4715
+ a = h(a.target).serializeArray();
4716
+ s(a);
4717
+ B = !0;
4718
+ return !1;
4719
+ }
4720
+ function g(a) {
4721
+ a.preventDefault();
4722
+ H.dialog("close");
4723
+ return !1;
4724
+ }
4725
+ function l(a) {
4726
+ a.preventDefault();
4727
+ H.dialog("open").find('input[name="connection_type"]').change();
4728
+ return !1;
4729
+ }
4730
+ function y(b) {
4731
+ C = b.authed;
4732
+ z = b.method;
4733
+ h(r).find("span.loco-msg").text(b.message || "Something went wrong.");
4734
+ J = b.warning || "";
4735
+ b.notice && u.notices.info(b.notice);
4736
+ if (C) "direct" !== z && (q = b.creds, e(f), B && b.success && u.notices.success(b.success)),
4737
+ a(); else if (b.reason) u.notices.info(b.reason); else if (b = b.prompt) {
4738
+ var c = k();
4739
+ c.html(b).find("form").on("submit", p);
4740
+ c.dialog("option", "title", c.find("h2").remove().text());
4741
+ c.find("button.cancel-button").show().on("click", g);
4742
+ c.find('input[type="submit"]').addClass("button-primary");
4743
+ a();
4744
+ h(d).triggerHandler("resize");
4745
+ } else u.notices.error("Server didn't return credentials, nor a prompt for credentials");
4746
+ }
4747
+ function v() {
4748
+ a();
4749
+ }
4750
+ function s(a) {
4751
+ B = !1;
4752
+ u.ajax.setNonce("fsConnect", N).post("fsConnect", a, y, v);
4753
+ return a;
4754
+ }
4755
+ var q, w, r = f, z = null, B = !1, C = !1, u = d.loco, x = f.path.value, F = f.auth.value, N = f["loco-nonce"].value, I = h(r).find("button.button-primary"), Q = n.getElementById(r.id + "-warn"), R = !1, K = !1, J = "", H;
4756
+ u.notices.convert(Q).stick();
4757
+ f.connection_type ? (q = {}, q.connection_type = f.connection_type.value, C = !0) : x && F && s({
4758
+ path: x,
4759
+ auth: F
4760
+ });
4761
+ a();
4762
+ return {
4763
+ applyCreds: function(a) {
4764
+ if (a.nodeType) e(a); else {
4765
+ var b, c = q || {};
4766
+ for (b in c) c.hasOwnProperty(b) && (a[b] = c[b]);
4767
+ }
4768
+ return this;
4769
+ },
4770
+ setForm: function(b) {
4771
+ f = b;
4772
+ a();
4773
+ e(b);
4774
+ return this;
4775
+ },
4776
+ connect: function() {
4777
+ x = f.path.value;
4778
+ F = f.auth.value;
4779
+ s(h(f).serializeArray());
4780
+ return this;
4781
+ },
4782
+ listen: function(a) {
4783
+ w = a;
4784
+ C && a(!0);
4785
+ return this;
4786
+ },
4787
+ authed: function() {
4788
+ return C;
4789
+ }
4790
+ };
4791
+ };
4792
+ return f;
4793
+ }({}, v, w));
4794
+ n.register("$20", function(f, d, v) {
4795
+ function m(d, f, g, h) {
4796
+ f = "n" === g ? c(f) : b(f);
4797
+ h && (f = a(f));
4798
+ return k([].sort, [ f ])(d);
4799
+ }
4800
+ function k(a, b) {
4801
+ return function(c) {
4802
+ a.apply(c, b);
4803
+ return c;
4804
+ };
4805
+ }
4806
+ function c(a) {
4807
+ return function(b, c) {
4808
+ var d = b && b[a] || 0, f = c && c[a] || 0;
4809
+ return d === f ? 0 : d > f ? 1 : -1;
4810
+ };
4811
+ }
4812
+ function b(a) {
4813
+ return function(b, c) {
4814
+ return (b && b[a] || "").localeCompare(c && c[a] || "");
4815
+ };
4816
+ }
4817
+ function a(a) {
4818
+ return function(b, c) {
4819
+ return -1 * a(b, c);
4820
+ };
4821
+ }
4822
+ f.init = function(a) {
4823
+ function b(a) {
4824
+ var c = -1, d = a.length;
4825
+ for (h("tr", r).remove(); ++c < d; ) r.appendChild(a[c].$);
4826
+ }
4827
+ function c(a) {
4828
+ s = a ? B.find(a, d) : d.slice(0);
4829
+ v && (a = f[v], s = m(s, v, a.type, a.desc));
4830
+ b(s);
4831
+ }
4832
+ var d = [], f = [], k = 0, s, q, v, r = a.getElementsByTagName("tbody")[0], w = a.getElementsByTagName("thead")[0], B = n.require("$10", "fulltext.js").init();
4833
+ w && r && (h("th", w).each(function(a, c) {
4834
+ var e = c.getAttribute("data-sort-type");
4835
+ e && (a = k, h(c).addClass("loco-sort").on("click", function(c) {
4836
+ c.preventDefault();
4837
+ c = a;
4838
+ var e = f[c], g = e.type, k = !(e.desc = !e.desc);
4839
+ s = m(s || d.slice(0), c, g, k);
4840
+ b(s);
4841
+ q && q.removeClass("loco-desc loco-asc");
4842
+ q = h(e.$).addClass(k ? "loco-desc" : "loco-asc").removeClass(k ? "loco-asc" : "loco-desc");
4843
+ v = c;
4844
+ return !1;
4845
+ }), f[k] = {
4846
+ $: c,
4847
+ type: e
4848
+ });
4849
+ c.hasAttribute("colspan") ? k += Number(c.getAttribute("colspan")) : k++;
4850
+ }), h("tr", r).each(function(a, b) {
4851
+ var c, e, g, h = [], k = {
4852
+ _: a,
4853
+ $: b
4854
+ }, m = b.getElementsByTagName("td");
4855
+ for (e in f) {
4856
+ c = m[e];
4857
+ (g = c.textContent.replace(/(^\s+|\s+$)/g, "")) && h.push(g);
4858
+ c.hasAttribute("data-sort-value") && (g = c.getAttribute("data-sort-value"));
4859
+ switch (f[e].type) {
4860
+ case "n":
4861
+ g = Number(g);
4862
+ }
4863
+ k[e] = g;
4864
+ }
4865
+ d[a] = k;
4866
+ B.index(a, h);
4867
+ }), a = h('form.loco-filter input[type="text"]', a.parentNode), a.length && (a = a[0],
4868
+ w = h(a.form), 1 < d.length ? n.require("$11", "LocoTextListener.js").listen(a, c) : w.hide(),
4869
+ w.on("submit", function(a) {
4870
+ a.preventDefault();
4871
+ return !1;
4872
+ })));
4873
+ };
4874
+ return f;
4875
+ }({}, v, w));
4876
+ var B = v.loco || {}, I = B.conf || {
4877
+ $v: [ 0, 0 ]
4878
+ };
4879
+ v = n.require("$1", "t.js").init();
4880
+ w = I.wplang;
4881
+ B.version = function(f) {
4882
+ return I.$v[f || 0];
4883
+ };
4884
+ n.require("$2", "html.js");
4885
+ n.require("$3", "number.js");
4886
+ n.require("$4", "array.js");
4887
+ n.require("$5", "json.js");
4888
+ B.l10n = v;
4889
+ v.load(I.wpl10n);
4890
+ w && v.pluraleq(w.pluraleq);
4891
+ B.string = n.require("$6", "string.js");
4892
+ B.notices = n.require("$7", "notices.js").init(v);
4893
+ B.ajax = n.require("$8", "ajax.js").init(I).localise(v);
4894
+ B.locale = n.require("$9", "wplocale.js");
4895
+ B.fulltext = n.require("$10", "fulltext.js");
4896
+ B.watchtext = n.require("$11", "LocoTextListener.js").listen;
4897
+ B.tooltip = n.require("$12", "tooltip.js");
4898
+ B.po = {
4899
+ ed: n.require("$13", "poedit.js"),
4900
+ kbd: n.require("$14", "hotkeys.js"),
4901
+ init: n.require("$15", "po.js").create,
4902
+ ace: n.require("$16", "ace.js").strf("php"),
4903
+ ref: n.require("$17", "refs.js")
4904
+ };
4905
+ B.apis = n.require("$18", "apis.js");
4906
+ B.fs = n.require("$19", "fsconn.js");
4907
+ h("#loco-admin.wrap table.wp-list-table").each(function(f, d) {
4908
+ n.require("$20", "tables.js").init(d);
4909
+ });
4910
+ B.validate = function(f) {
4911
+ return "2.5.3" !== (/^\d+\.\d+\.\d+/.exec(f && f[0] || "") && RegExp.lastMatch) ? (B.notices.warn("admin.js is the wrong version (2.5.3). Please empty all relevant caches and reload this page."),
4912
+ !1) : !0;
4913
+ };
4914
+ })(window, document, window.jQuery);
pub/js/min/config.js CHANGED
@@ -1 +1,32 @@
1
- !function(n,o,c){function e(){var n=c("#loco-conf > div"),o=n.eq(0).clone(),e=n.length,t="["+e+"]";function i(n,o){var e=o.name.replace("[0]",t);c(o).attr("name",e).val("")}o.attr("id","loco-conf-"+e),o.find("input").each(i),o.find("textarea").each(i),o.find("h2").eq(0).html("New set <span>(untitled)</span>"),o.insertBefore("#loco-form-foot"),f(o.find("a.icon-del"),e),o.hide().slideDown(500),c("html, body").animate({scrollTop:function(n,o){for(var e=n.offsetTop;(n=n.offsetParent)&&n!==o;)e+=n.offsetTop;return e}(o[0])},500)}function f(n,o){return n.on("click",function(n){return n.preventDefault(),function(n){var o=c("#loco-conf-"+n);o.find('input[name="conf['+n+'][removed]"]').val("1"),o.slideUp(500,function(){c(this).hide().find("table").remove()})}(o),!1})}c("#loco-conf > div").each(function(n,o){f(c(o).find("a.icon-del"),n)}),c("#loco-add-butt").attr("disabled",!1).on("click",function(n){return n.preventDefault(),e(),!1})}(window,document,jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ !function(n, o, c) {
2
+ function e() {
3
+ var n = c("#loco-conf > div"), o = n.eq(0).clone(), e = n.length, t = "[" + e + "]";
4
+ function i(n, o) {
5
+ var e = o.name.replace("[0]", t);
6
+ c(o).attr("name", e).val("");
7
+ }
8
+ o.attr("id", "loco-conf-" + e), o.find("input").each(i), o.find("textarea").each(i),
9
+ o.find("h2").eq(0).html("New set <span>(untitled)</span>"), o.insertBefore("#loco-form-foot"),
10
+ f(o.find("a.icon-del"), e), o.hide().slideDown(500), c("html, body").animate({
11
+ scrollTop: function(n, o) {
12
+ for (var e = n.offsetTop; (n = n.offsetParent) && n !== o; ) e += n.offsetTop;
13
+ return e;
14
+ }(o[0])
15
+ }, 500);
16
+ }
17
+ function f(n, o) {
18
+ return n.on("click", function(n) {
19
+ return n.preventDefault(), function(n) {
20
+ var o = c("#loco-conf-" + n);
21
+ o.find('input[name="conf[' + n + '][removed]"]').val("1"), o.slideUp(500, function() {
22
+ c(this).hide().find("table").remove();
23
+ });
24
+ }(o), !1;
25
+ });
26
+ }
27
+ c("#loco-conf > div").each(function(n, o) {
28
+ f(c(o).find("a.icon-del"), n);
29
+ }), c("#loco-add-butt").attr("disabled", !1).on("click", function(n) {
30
+ return n.preventDefault(), e(), !1;
31
+ });
32
+ }(window, document, jQuery);
pub/js/min/debug.js CHANGED
@@ -1 +1,31 @@
1
- !function(a,r){var e=a.conf,o=r("#loco-utf8-check")[0].textContent;function t(e,o,n){"success"!==o&&(n=a.ajax.parse(a.ajax.strip(e.responseText))),r("#loco-ajax-check").text("FAILED: "+n).addClass("loco-danger")}1===o.length&&10003===o.charCodeAt(0)||a.notices.warn("This page has a problem rendering UTF-8").stick(),window.ajaxurl&&r("#loco-ajax-url").text(window.ajaxurl),r("#loco-vers-jquery").text([r.fn&&r.fn.jquery||"unknown","ui/"+(r.ui&&r.ui.version||"none"),"migrate/"+(r.migrateVersion||"none")].join("; ")),a.ajax.post("ping",{echo:"ΟΚ ✓"},function(e,o,n){e&&e.ping?r("#loco-ajax-check").text(e.ping):t(n,o,e&&e.error&&e.error.message)},t);var n,i=e.apis,c=i.length,s=-1,l=a.locale.parse("fr");function u(e,o){return r("#loco-api-"+e).text(o)}function d(e){var n=e.getId();e.key()?e.translate("OK",l,function(e,o){o?u(n,"OK ✓"):u(n,"FAILED").addClass("loco-danger")}):u(n,"No API key")}if(a.apis)for(;++s<c;){n=i[s];try{d(a.apis.create(n))}catch(e){u(n.id,String(e))}}else a.notices.error("admin.js is out of date. Please empty your browser cache.")}(window.loco,window.jQuery,window.wp);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ !function(a, r) {
2
+ var e = a.conf, o = r("#loco-utf8-check")[0].textContent;
3
+ function t(e, o, n) {
4
+ "success" !== o && (n = a.ajax.parse(a.ajax.strip(e.responseText))), r("#loco-ajax-check").text("FAILED: " + n).addClass("loco-danger");
5
+ }
6
+ 1 === o.length && 10003 === o.charCodeAt(0) || a.notices.warn("This page has a problem rendering UTF-8").stick(),
7
+ window.ajaxurl && r("#loco-ajax-url").text(window.ajaxurl), r("#loco-vers-jquery").text([ r.fn && r.fn.jquery || "unknown", "ui/" + (r.ui && r.ui.version || "none"), "migrate/" + (r.migrateVersion || "none") ].join("; ")),
8
+ a.ajax.post("ping", {
9
+ echo: "ΟΚ ✓"
10
+ }, function(e, o, n) {
11
+ e && e.ping ? r("#loco-ajax-check").text(e.ping) : t(n, o, e && e.error && e.error.message);
12
+ }, t);
13
+ var n, i = e.apis, c = i.length, s = -1, l = a.locale.parse("fr");
14
+ function u(e, o) {
15
+ return r("#loco-api-" + e).text(o);
16
+ }
17
+ function d(e) {
18
+ var n = e.getId();
19
+ e.key() ? e.translate("OK", l, function(e, o) {
20
+ o ? u(n, "OK ✓") : u(n, "FAILED").addClass("loco-danger");
21
+ }) : u(n, "No API key");
22
+ }
23
+ if (a.apis) for (;++s < c; ) {
24
+ n = i[s];
25
+ try {
26
+ d(a.apis.create(n));
27
+ } catch (e) {
28
+ u(n.id, String(e));
29
+ }
30
+ } else a.notices.error("admin.js is out of date. Please empty your browser cache.");
31
+ }(window.loco, window.jQuery, window.wp);
pub/js/min/delete.js CHANGED
@@ -1 +1,4 @@
1
- !function(o,e){var n=e.getElementById("loco-fs"),t=e.getElementById("loco-del");n&&t&&o.loco.fs.init(n).setForm(t)}(window,document,window.jQuery);
 
 
 
1
+ !function(o, e) {
2
+ var n = e.getElementById("loco-fs"), t = e.getElementById("loco-del");
3
+ n && t && o.loco.fs.init(n).setForm(t);
4
+ }(window, document, window.jQuery);
pub/js/min/editor.js CHANGED
@@ -1 +1,354 @@
1
- !function(S,k){var C=S.loco,i=C&&C.conf,c=document.getElementById("loco-editor-inner");if(C&&i&&c){var D,r,n,z,m,a,u=!!i.WP_DEBUG,l=C.po.ref&&C.po.ref.init(C,i),d=null,s=null,o=i.multipart,t=C.l10n,h=C.string.sprintf,T=i.locale,b=C.po.init(T).wrap(i.powrap),p=!T,e=document.getElementById("loco-actions"),f=i.popath,g=i.potpath,v=String(i.syncmode).toLowerCase(),y=document.getElementById("loco-fs"),w=y&&C.fs.init(y),x=i.readonly,I=!x,j={},M=0,L={my:"top",at:"top",of:"#loco-content"};!o||S.FormData&&S.Blob||(o=!1,C.notices.warn("Your browser doesn't support Ajax file uploads. Falling back to standard postdata")),l||C.notices.warn("admin.js is out of date. Please empty your browser cache and reload the page.");var E,U,P=(U=parseInt(k(c).css("min-height")||0),function(){var n=function(n,t){for(var o=n.offsetTop||0;(n=n.offsetParent)&&n!==t;)o+=n.offsetTop||0;return o}(c,document.body),t=S.innerHeight,o=Math.max(U,t-n-20);E!==o&&(c.style.height=String(o)+"px",E=o)});P(),k(S).resize(P),c.innerHTML="",D=C.po.ed.init(c).localise(t),C.po.kbd.init(D).add("save",I?function(){D.dirty&&W()}:J).add("hint",T&&I&&R||J).enable("copy","clear","enter","next","prev","fuzzy","save","invis","hint");var q={save:I&&function(t){function o(){t.disabled=!0}function n(){t.disabled=!1}function e(){n(),k(t).removeClass("loco-loading")}return t,D.on("poUnsaved",function(){n(),k(t).addClass("button-primary")}).on("poSave",function(){o(),k(t).removeClass("button-primary")}),s=k.extend({path:f},i.project||{}),k(t).on("click",function(n){return n.preventDefault(),o(),k(t).addClass("loco-loading"),W(e),!1}),!0},sync:I&&function(t){var n=i.project;if(n){function o(){t.disabled=!0}function e(){t.disabled=!1}function a(){e(),k(t).removeClass("loco-loading")}D.on("poUnsaved",function(){o()}).on("poSave",function(){e()}),d={bundle:n.bundle,domain:n.domain,type:p?"pot":"po",path:f||"",sync:g||"",strip:"pot"===v?"1":""},k(t).on("click",function(n){return n.preventDefault(),o(),k(t).addClass("loco-loading"),O(a),!1}),e()}return!0},revert:function(n){return D.on("poUnsaved",function(){n.disabled=!1}).on("poSave",function(){n.disabled=!0}),k(n).on("click",function(n){return n.preventDefault(),location.reload(),!1}),!0},invs:function(n){var o=k(n);return n.disabled=!1,D.on("poInvs",function(n,t){o[t?"addClass":"removeClass"]("inverted")}),o.on("click",function(n){return n.preventDefault(),D.setInvs(!D.getInvs()),!1}),C.tooltip.init(o),!0},code:function(n){var o=k(n);return n.disabled=!1,o.on("click",function(n){n.preventDefault();var t=!D.getMono();return o[t?"addClass":"removeClass"]("inverted"),D.setMono(t),!1}),C.tooltip.init(o),!0},source:G,binary:p?null:G};p?(q.add=I&&function(n){return n.disabled=!1,k(n).on("click",function(n){n.preventDefault();var t,o=1,e=/(\d+)$/;for(t="New message";b.get(t);)o=e.exec(t)?Math.max(o,Number(RegExp.$1)):o,t="New message "+ ++o;return D.add(t),!1}),!0},q.del=I&&function(n){return n.disabled=!1,k(n).on("click",function(n){return n.preventDefault(),D.del(),!1}),!0}):q.auto=function(n){function t(){n.disabled=!1}return D.on("poUnsaved",function(){n.disabled=!0}).on("poSave poAuto",function(){t()}),k(n).on("click",H),t(),!0},k("#loco-editor > nav .button").each(function(n,t){var o=t.getAttribute("data-loco"),e=q[o];e&&e(t,o)||k(t).addClass("loco-noop")}),k(e).on("submit",J),function(t){function e(n){k(t.parentNode)[n||null==n?"removeClass":"addClass"]("invalid")}D.searchable(C.fulltext.init()),t.disabled=!1;var a=t.value="",i=C.watchtext(t,function(n){e(D.filter(n,!0))});D.on("poFilter",function(n,t,o){a=i.val(),i.val(t||""),e(o)}).on("poMerge",function(){a&&D.filter(a)})}(document.getElementById("loco-search")),D.on("poUnsaved",function(){S.onbeforeunload=Y}).on("poSave",function(){K(),S.onbeforeunload=null}).on("poHint",R).on("poUpdate",K).on("poMeta",function(n,t){var o,e,a=(e="CODE",(o=t).tagName===e?o:o.getElementsByTagName(e)[0]);return!a||!l||(l.load(a.textContent),n.preventDefault(),!1)}),b.load(i.podata),D.load(b),(T=D.targetLocale)?T.isRTL()&&k(c).addClass("trg-rtl"):D.unlock(),K(),delete C.conf,i=q=null}function B(n){return C.l10n._(n)}function N(n,t,o){return C.l10n.n(n,t,o)}function O(s){C.ajax.post("sync",d,function(n){var t=[],o=n.pot,e=n.po,a=n.done||{add:[],del:[],fuz:[]},i=a.add.length,r=a.del.length,l=a.fuz.length;b.clear().load(e),D.load(b),i||r||l?(o?t.push(h(B("Merged from %s"),o)):t.push(B("Merged from source code")),i&&t.push(h(N("%s new string added","%s new strings added",i),i.format(0))),r&&t.push(h(N("%s obsolete string removed","%s obsolete strings removed",r),r.format(0))),l&&t.push(h(N("%s string marked Fuzzy","%s strings marked Fuzzy",l),l.format(0))),k(c).trigger("poUnsaved",[]),K(),u&&S.console&&function(n,t){var o=-1,e=t.add.length;for(;++o<e;)n.log(" + "+String(t.add[o]));for(e=t.del.length,o=0;o<e;o++)n.log(" - "+String(t.del[o]));for(e=t.fuz.length,o=0;o<e;o++)n.log(" ~ "+String(t.fuz[o]))}(console,a)):o?t.push(h(B("Strings up to date with %s"),o)):t.push(B("Strings up to date with source code")),C.notices.success(t.join(". ")),k(c).trigger("poMerge",[n]),s&&s()},s)}function A(){return n=n||function(){for(var n,t=-1,o=[],e=r,a=e.length;++t<a;)try{n=e[t],o.push(C.apis.create(n))}catch(n){C.notices.error(String(n))}return o}()}function F(t){var o;function e(){return(new Date).getTime()}p||x?C.notices.error("Logic error. APIs not available in current mode"):null==r||0===r.length||10<Math.round((e()-M)/1e3)?(a&&a.remove(),a=null,m&&m.remove(),m=null,z&&z.remove(),r=z=null,o=k('<div><div class="loco-loading"></div></div>').dialog({dialogClass:"loco-modal loco-modal-no-close",appendTo:"#loco-admin.wrap",title:"Loading..",modal:!0,autoOpen:!0,closeOnEscape:!1,resizable:!1,draggable:!1,position:L,height:200}),C.ajax.get("apis",{locale:String(T)},function(n){M=e(),0===(r=n&&n.apis||[]).length?a=$("loco-apis-empty",n.html):m=$("loco-apis-batch",n.html),o.remove(),t(r)})):(M=e(),t(r))}function $(n,t){var o=k(t);return o.attr("id",n),o.dialog({dialogClass:"loco-modal",appendTo:"#loco-admin.wrap",title:o.attr("title"),modal:!0,autoOpen:!1,closeOnEscape:!0,resizable:!1,draggable:!1,position:L}),o}function R(){F(function(n){n.length?function(){var n=D.current(),t=D.getTargetOffset(),o=n&&n.source(null,t),p='lang="'+String(T)+'" dir="'+(T.isRTL()?"RTL":"LTR")+'"',f=99;if(!o)return;function e(n){return!n.isDefaultPrevented()&&(!(0<=(t=n.which-49)&&t<10&&(o=v&&v.find("button.button-primary").eq(t))&&1===o.length)||(n.preventDefault(),n.stopPropagation(),o.click(),!1));var t,o}function a(n,t,o,e){var a=e.getId(),i=w[a],r=String(i+1),l=e.getUrl(),s=B("Use this translation"),c=String(e),u=b&&b[a],d=k('<button class="button button-primary"></button>').attr("tabindex",String(1+f+i)).on("click",function(e,a){return function(n){n.preventDefault(),n.stopPropagation(),g();var t=D.current(),o=D.getTargetOffset();t&&t.source(null,o)===e?(t.translate(a,o),D.focus().reloadMessage(t)):C.notices.warn("Source changed since suggestion")}}(n,t));d.attr("accesskey",r),1<m.length&&(s+=" ("+r+")"),d.text(s),u&&u.replaceWith(k('<div class="loco-api loco-api-'+a+'"></div>').append(k('<a class="loco-api-credit" target="_blank" tabindex="-1"></a>').attr("href",l).text(c)).append(k("<blockquote "+p+"></blockquote>").text(t||"FAILED")).append(d)),++y===h&&(v&&v.dialog("option","title",B("Suggested translations")+" — "+o.label),f+=y),0===i&&d.focus()}function g(n){v&&null==n&&v.dialog("close"),b=v=null,k(S).off("keydown",e)}function i(e){return function(n,t,o){a(n,u[e.getId()]=t,o,e)}}var v=(z=z||$("loco-apis-hint","<div></div>")).html("").append(k('<div class="loco-api"><p>Source text:</p></div>').append(k('<blockquote lang="en"></blockquote>').text(o))).dialog("option","title",B("Loading suggestions")+"...").off("dialogclose").on("dialogclose",g).dialog("open"),r=n.translation(t);r&&k('<div class="loco-api"><p>Current translation:</p></div>').append(k("<blockquote "+p+"></blockquote>").text(r)).append(k('<button class="button"></button>').attr("tabindex",String(++f)).text(B("Keep this translation")).on("click",function(n){n.preventDefault(),g()})).appendTo(v);var l,s,m=A(),h=m.length,c=-1,u=j[o]||(j[o]={}),b={},y=0,w={};for(;++c<h;)l=m[c],v.append((d=l,void 0,x=k('<div class="loco-api loco-api-loading"></div>').text("Calling "+d+" ..."),b[d.getId()]=x)),s=l.getId(),w[s]=c,u[s]?a(o,u[s],T,l):l.translate(o,T,i(l));var d,x;k(S).on("keydown",e)}():_()})}function H(n){return n.preventDefault(),F(function(n){n.length?function(){var e,a,i,r=0,t=!1,l=m.dialog("open"),n=l.find("form"),s=n.find("button.button-primary"),o=k("#loco-job-progress");function c(){s[0].disabled=!0}function u(){s.removeClass("loco-loading")}function d(n){o.text(n)}function p(n){var t=function(n){for(var t,o=A(),e=o.length,a=-1;++a<e;)if((t=o[a]).getId()===n)return t;C.notices.error("No "+n+" client")}(k(n.api).val()),o=n.existing.checked;d("Calculating...."),(e=t.createJob()).init(b,o),a=t.toString(),d(h(B("%s unique source strings."),e.length.format(0))+" "+h(B("%s characters will be sent for translation."),e.chars.format(0))),e.length?s[0].disabled=!1:c(),i=null}function f(n){e&&(t&&n.fuzzy(0,!0),D.pasteMessage(n),n===D.active&&D.setStatus(n),D.unsave(n,0),r++)}function g(n,t){var o=t?100*n/t:0;d(h(B("Translation progress %s%%"),o.format(0)))}function v(){if(u(),e&&i){var n=i.todo();n&&C.notices.warn(h(N("Translation job aborted with %s string remaining","Translation job aborted with %s strings remaining",n),n.format(0))).slow();var t=[],o=i.did();o&&t.push(h(N("%1$s string translated via %2$s","%1$s strings translated via %2$s",o),o.format(0),a)),r?t.push(h(N("%s string updated","%s strings updated",r),r.format(0))):t.push(B("Nothing needed updating")),C.notices.success(t.join(". ")).slow(),i=e=null}r&&(K(),D.rebuildSearch()),l&&(l.off("dialogclose").dialog("close"),l=null),D.fire("poAuto")}u(),c(),C.notices.clear(),n.off("submit change"),p(n[0]),n.on("change",function(n){var t=n.target,o=t.name;return"api"!==o&&"existing"!==o||p(t.form),!0}).on("submit",function(n){n.preventDefault(),s.addClass("loco-loading"),c(),g(r=0),t=n.target.fuzzy.checked,i=e.dispatch().done(v).each(f).prog(g).stat()}),l.off("dialogclose").on("dialogclose",function(){e.abort(),l=null,v()})}():_()}),!1}function _(){a?a.dialog("open"):C.notices.error("Logic error. Unconfigured API modal missing")}function W(t){var n=k.extend({locale:String(b.locale()||"")},s||{});w&&w.applyCreds(n),o?(n=function(n){var t,o=new FormData;for(t in n)n.hasOwnProperty(t)&&o.append(t,n[t]);return o}(n)).append("po",new Blob([String(b)],{type:"application/x-gettext"}),String(n.path).split("/").pop()||"untitled.po"):n.data=String(b),C.ajax.post("save",n,function(n){t&&t(),D.save(!0),k("#loco-po-modified").text(n.datetime||"[datetime error]")},t)}function Y(){return B("Your changes will be lost if you continue without saving")}function G(o,e){return o.disabled=!1,k(o).on("click",function(){var n=o.form,t=f;return"binary"===e&&(t=t.replace(/\.po$/,".mo")),n.path.value=t,n.source.value=b.toString(),!0}),!0}function J(n){return n.preventDefault(),!1}function K(){var n=D.stats(),t=n.t,o=n.f,e=n.u,a=h(N("%s string","%s strings",t),t.format(0)),i=[];T&&(a=h(B("%s%% translated"),n.p.replace("%",""))+", "+a,o&&i.push(h(B("%s fuzzy"),o.format(0))),e&&i.push(h(B("%s untranslated"),e.format(0))),i.length&&(a+=" ("+i.join(", ")+")")),k("#loco-po-status").text(a)}}(window,window.jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ !function(k, S) {
2
+ var C = k.loco, i = C && C.conf, u = document.getElementById("loco-editor-inner");
3
+ if (C && i && u) {
4
+ var D, r, n, z, h, a, d = !!i.WP_DEBUG, l = C.po.ref && C.po.ref.init(C, i), s = null, c = null, o = i.multipart, t = C.l10n, m = C.string.sprintf, e = i.wpnum && i.wpnum.thousands_sep || ",", T = i.locale, b = C.po.init(T).wrap(i.powrap), p = !T, f = document.getElementById("loco-actions"), g = i.popath, v = i.potpath, y = i.syncmode, w = document.getElementById("loco-fs"), x = w && C.fs.init(w), I = i.readonly, j = !I, M = {}, E = 0, L = {
5
+ my: "top",
6
+ at: "top",
7
+ of: "#loco-content"
8
+ };
9
+ !o || k.FormData && k.Blob || (o = !1, C.notices.warn("Your browser doesn't support Ajax file uploads. Falling back to standard postdata")),
10
+ l || C.notices.warn("admin.js is out of date. Please empty your browser cache and reload the page.");
11
+ var U, P, q = (P = parseInt(S(u).css("min-height") || 0), function() {
12
+ var n = function(n, t) {
13
+ for (var o = n.offsetTop || 0; (n = n.offsetParent) && n !== t; ) o += n.offsetTop || 0;
14
+ return o;
15
+ }(u, document.body), t = k.innerHeight, o = Math.max(P, t - n - 20);
16
+ U !== o && (u.style.height = String(o) + "px", U = o);
17
+ });
18
+ q(), S(k).resize(q), u.innerHTML = "", D = C.po.ed.init(u).localise(t), C.po.kbd.init(D).add("save", j ? function() {
19
+ D.dirty && G();
20
+ } : Q).add("hint", T && j && H || Q).enable("copy", "clear", "enter", "next", "prev", "fuzzy", "save", "invis", "hint");
21
+ var B = {
22
+ save: j && function(t) {
23
+ function o() {
24
+ t.disabled = !0;
25
+ }
26
+ function n() {
27
+ t.disabled = !1;
28
+ }
29
+ function e() {
30
+ n(), S(t).removeClass("loco-loading");
31
+ }
32
+ return t, D.on("poUnsaved", function() {
33
+ n(), S(t).addClass("button-primary");
34
+ }).on("poSave", function() {
35
+ o(), S(t).removeClass("button-primary");
36
+ }), c = S.extend({
37
+ path: g
38
+ }, i.project || {}), S(t).on("click", function(n) {
39
+ return n.preventDefault(), o(), S(t).addClass("loco-loading"), G(e), !1;
40
+ }), !0;
41
+ },
42
+ sync: j && function(t) {
43
+ var n = i.project;
44
+ if (n) {
45
+ function o() {
46
+ t.disabled = !0;
47
+ }
48
+ function e() {
49
+ t.disabled = !1;
50
+ }
51
+ function a() {
52
+ e(), S(t).removeClass("loco-loading");
53
+ }
54
+ D.on("poUnsaved", function() {
55
+ o();
56
+ }).on("poSave", function() {
57
+ e();
58
+ }), s = {
59
+ bundle: n.bundle,
60
+ domain: n.domain,
61
+ type: p ? "pot" : "po",
62
+ path: g || "",
63
+ sync: v || "",
64
+ mode: y || ""
65
+ }, S(t).on("click", function(n) {
66
+ return n.preventDefault(), o(), S(t).addClass("loco-loading"), F(a), !1;
67
+ }), e();
68
+ }
69
+ return !0;
70
+ },
71
+ revert: function(n) {
72
+ return D.on("poUnsaved", function() {
73
+ n.disabled = !1;
74
+ }).on("poSave", function() {
75
+ n.disabled = !0;
76
+ }), S(n).on("click", function(n) {
77
+ return n.preventDefault(), location.reload(), !1;
78
+ }), !0;
79
+ },
80
+ invs: function(n) {
81
+ var o = S(n);
82
+ return n.disabled = !1, D.on("poInvs", function(n, t) {
83
+ o[t ? "addClass" : "removeClass"]("inverted");
84
+ }), o.on("click", function(n) {
85
+ return n.preventDefault(), D.setInvs(!D.getInvs()), !1;
86
+ }), C.tooltip.init(o), !0;
87
+ },
88
+ code: function(n) {
89
+ var o = S(n);
90
+ return n.disabled = !1, o.on("click", function(n) {
91
+ n.preventDefault();
92
+ var t = !D.getMono();
93
+ return o[t ? "addClass" : "removeClass"]("inverted"), D.setMono(t), !1;
94
+ }), C.tooltip.init(o), !0;
95
+ },
96
+ source: K,
97
+ binary: p ? null : K
98
+ };
99
+ p ? (B.add = j && function(n) {
100
+ return n.disabled = !1, S(n).on("click", function(n) {
101
+ n.preventDefault();
102
+ var t, o = 1, e = /(\d+)$/;
103
+ for (t = "New message"; b.get(t); ) o = e.exec(t) ? Math.max(o, Number(RegExp.$1)) : o,
104
+ t = "New message " + ++o;
105
+ return D.add(t), !1;
106
+ }), !0;
107
+ }, B.del = j && function(n) {
108
+ return n.disabled = !1, S(n).on("click", function(n) {
109
+ return n.preventDefault(), D.del(), !1;
110
+ }), !0;
111
+ }) : B.auto = function(n) {
112
+ function t() {
113
+ n.disabled = !1;
114
+ }
115
+ return D.on("poUnsaved", function() {
116
+ n.disabled = !0;
117
+ }).on("poSave poAuto", function() {
118
+ t();
119
+ }), S(n).on("click", W), t(), !0;
120
+ }, S("#loco-editor > nav .button").each(function(n, t) {
121
+ var o = t.getAttribute("data-loco"), e = B[o];
122
+ e && e(t, o) || S(t).addClass("loco-noop");
123
+ }), S(f).on("submit", Q), function(t) {
124
+ function e(n) {
125
+ S(t.parentNode)[n || null == n ? "removeClass" : "addClass"]("invalid");
126
+ }
127
+ D.searchable(C.fulltext.init()), t.disabled = !1;
128
+ var a = t.value = "", i = C.watchtext(t, function(n) {
129
+ e(D.filter(n, !0));
130
+ });
131
+ D.on("poFilter", function(n, t, o) {
132
+ a = i.val(), i.val(t || ""), e(o);
133
+ }).on("poMerge", function() {
134
+ a && D.filter(a);
135
+ });
136
+ }(document.getElementById("loco-search")), D.on("poUnsaved", function() {
137
+ k.onbeforeunload = J;
138
+ }).on("poSave", function() {
139
+ V(), k.onbeforeunload = null;
140
+ }).on("poHint", H).on("poUpdate", V).on("poMeta", function(n, t) {
141
+ var o, e, a = (e = "CODE", (o = t).tagName === e ? o : o.getElementsByTagName(e)[0]);
142
+ return !a || !l || (l.load(a.textContent), n.preventDefault(), !1);
143
+ }), b.load(i.podata), D.load(b), (T = D.targetLocale) ? T.isRTL() && S(u).addClass("trg-rtl") : D.unlock(),
144
+ V(), delete C.conf, i = B = null;
145
+ }
146
+ function N(n) {
147
+ return C.l10n._(n);
148
+ }
149
+ function O(n, t, o) {
150
+ return C.l10n.n(n, t, o);
151
+ }
152
+ function A(n) {
153
+ return n.format(0, ".", e);
154
+ }
155
+ function F(c) {
156
+ C.ajax.post("sync", s, function(n) {
157
+ var t = [], o = n.pot, e = n.po, a = n.done || {
158
+ add: [],
159
+ del: [],
160
+ fuz: []
161
+ }, i = a.add.length, r = a.del.length, l = a.fuz.length, s = a.trn || 0;
162
+ b.clear().load(e), D.load(b), i || r || l || s ? (o ? t.push(m(N("Merged from %s"), o)) : t.push(N("Merged from source code")),
163
+ i && t.push(m(O("%s new string added", "%s new strings added", i), A(i))), r && t.push(m(O("%s obsolete string removed", "%s obsolete strings removed", r), A(r))),
164
+ l && t.push(m(O("%s string marked Fuzzy", "%s strings marked Fuzzy", l), A(l))),
165
+ s && t.push(m(O("%s translation copied", "%s translations copied", s), A(s))), S(u).trigger("poUnsaved", []),
166
+ V(), d && k.console && function(n, t) {
167
+ var o = -1, e = t.add.length;
168
+ for (;++o < e; ) n.log(" + " + String(t.add[o]));
169
+ for (e = t.del.length, o = 0; o < e; o++) n.log(" - " + String(t.del[o]));
170
+ for (e = t.fuz.length, o = 0; o < e; o++) n.log(" ~ " + String(t.fuz[o]));
171
+ }(console, a)) : o ? t.push(m(N("Strings up to date with %s"), o)) : t.push(N("Strings up to date with source code")),
172
+ C.notices.success(t.join(". ")), S(u).trigger("poMerge", [ n ]), c && c();
173
+ }, c);
174
+ }
175
+ function $() {
176
+ return n = n || function() {
177
+ for (var n, t = -1, o = [], e = r, a = e.length; ++t < a; ) try {
178
+ n = e[t], o.push(C.apis.create(n));
179
+ } catch (n) {
180
+ C.notices.error(String(n));
181
+ }
182
+ return o;
183
+ }();
184
+ }
185
+ function R(t) {
186
+ var o;
187
+ function e() {
188
+ return new Date().getTime();
189
+ }
190
+ p || I ? C.notices.error("Logic error. APIs not available in current mode") : null == r || 0 === r.length || 10 < Math.round((e() - E) / 1e3) ? (a && a.remove(),
191
+ a = null, h && h.remove(), h = null, z && z.remove(), r = z = null, o = S('<div><div class="loco-loading"></div></div>').dialog({
192
+ dialogClass: "loco-modal loco-modal-no-close",
193
+ appendTo: "#loco-admin.wrap",
194
+ title: "Loading..",
195
+ modal: !0,
196
+ autoOpen: !0,
197
+ closeOnEscape: !1,
198
+ resizable: !1,
199
+ draggable: !1,
200
+ position: L,
201
+ height: 200
202
+ }), C.ajax.get("apis", {
203
+ locale: String(T)
204
+ }, function(n) {
205
+ E = e(), 0 === (r = n && n.apis || []).length ? a = _("loco-apis-empty", n.html) : h = _("loco-apis-batch", n.html),
206
+ o.remove(), t(r);
207
+ })) : (E = e(), t(r));
208
+ }
209
+ function _(n, t) {
210
+ var o = S(t);
211
+ return o.attr("id", n), o.dialog({
212
+ dialogClass: "loco-modal",
213
+ appendTo: "#loco-admin.wrap",
214
+ title: o.attr("title"),
215
+ modal: !0,
216
+ autoOpen: !1,
217
+ closeOnEscape: !0,
218
+ resizable: !1,
219
+ draggable: !1,
220
+ position: L
221
+ }), o;
222
+ }
223
+ function H() {
224
+ R(function(n) {
225
+ n.length ? function() {
226
+ var n = D.current(), t = D.getTargetOffset(), o = n && n.source(null, t), p = 'lang="' + String(T) + '" dir="' + (T.isRTL() ? "RTL" : "LTR") + '"', f = 99;
227
+ if (!o) return;
228
+ function e(n) {
229
+ return !n.isDefaultPrevented() && (!(0 <= (t = n.which - 49) && t < 10 && (o = v && v.find("button.button-primary").eq(t)) && 1 === o.length) || (n.preventDefault(),
230
+ n.stopPropagation(), o.click(), !1));
231
+ var t, o;
232
+ }
233
+ function a(n, t, o, e) {
234
+ var a = e.getId(), i = w[a], r = String(i + 1), l = e.getUrl(), s = N("Use this translation"), c = String(e), u = b && b[a], d = S('<button class="button button-primary"></button>').attr("tabindex", String(1 + f + i)).on("click", function(e, a) {
235
+ return function(n) {
236
+ n.preventDefault(), n.stopPropagation(), g();
237
+ var t = D.current(), o = D.getTargetOffset();
238
+ t && t.source(null, o) === e ? (t.translate(a, o), D.focus().reloadMessage(t)) : C.notices.warn("Source changed since suggestion");
239
+ };
240
+ }(n, t));
241
+ d.attr("accesskey", r), 1 < h.length && (s += " (" + r + ")"), d.text(s), u && u.replaceWith(S('<div class="loco-api loco-api-' + a + '"></div>').append(S('<a class="loco-api-credit" target="_blank" tabindex="-1"></a>').attr("href", l).text(c)).append(S("<blockquote " + p + "></blockquote>").text(t || "FAILED")).append(d)),
242
+ ++y === m && (v && v.dialog("option", "title", N("Suggested translations") + " — " + o.label),
243
+ f += y), 0 === i && d.focus();
244
+ }
245
+ function g(n) {
246
+ v && null == n && v.dialog("close"), b = v = null, S(k).off("keydown", e);
247
+ }
248
+ function i(e) {
249
+ return function(n, t, o) {
250
+ a(n, u[e.getId()] = t, o, e);
251
+ };
252
+ }
253
+ var v = (z = z || _("loco-apis-hint", "<div></div>")).html("").append(S('<div class="loco-api"><p>Source text:</p></div>').append(S('<blockquote lang="en"></blockquote>').text(o))).dialog("option", "title", N("Loading suggestions") + "...").off("dialogclose").on("dialogclose", g).dialog("open"), r = n.translation(t);
254
+ r && S('<div class="loco-api"><p>Current translation:</p></div>').append(S("<blockquote " + p + "></blockquote>").text(r)).append(S('<button class="button"></button>').attr("tabindex", String(++f)).text(N("Keep this translation")).on("click", function(n) {
255
+ n.preventDefault(), g();
256
+ })).appendTo(v);
257
+ var l, s, h = $(), m = h.length, c = -1, u = M[o] || (M[o] = {}), b = {}, y = 0, w = {};
258
+ for (;++c < m; ) l = h[c], v.append((d = l, void 0, x = S('<div class="loco-api loco-api-loading"></div>').text("Calling " + d + " ..."),
259
+ b[d.getId()] = x)), s = l.getId(), w[s] = c, u[s] ? a(o, u[s], T, l) : l.translate(o, T, i(l));
260
+ var d, x;
261
+ S(k).on("keydown", e);
262
+ }() : Y();
263
+ });
264
+ }
265
+ function W(n) {
266
+ return n.preventDefault(), R(function(n) {
267
+ n.length ? function() {
268
+ var e, a, i, r = 0, t = !1, l = h.dialog("open"), n = l.find("form"), s = n.find("button.button-primary"), o = S("#loco-job-progress");
269
+ function c() {
270
+ s[0].disabled = !0;
271
+ }
272
+ function u() {
273
+ s.removeClass("loco-loading");
274
+ }
275
+ function d(n) {
276
+ o.text(n);
277
+ }
278
+ function p(n) {
279
+ var t = function(n) {
280
+ for (var t, o = $(), e = o.length, a = -1; ++a < e; ) if ((t = o[a]).getId() === n) return t;
281
+ C.notices.error("No " + n + " client");
282
+ }(S(n.api).val()), o = n.existing.checked;
283
+ d("Calculating...."), (e = t.createJob()).init(b, o), a = t.toString(), d(m(N("%s unique source strings."), A(e.length)) + " " + m(N("%s characters will be sent for translation."), A(e.chars))),
284
+ e.length ? s[0].disabled = !1 : c(), i = null;
285
+ }
286
+ function f(n) {
287
+ e && (t && n.fuzzy(0, !0), D.pasteMessage(n), n === D.active && D.setStatus(n),
288
+ D.unsave(n, 0), r++);
289
+ }
290
+ function g(n, t) {
291
+ var o = t ? 100 * n / t : 0;
292
+ d(m(N("Translation progress %s%%"), A(o)));
293
+ }
294
+ function v() {
295
+ if (u(), e && i) {
296
+ var n = i.todo();
297
+ n && C.notices.warn(m(O("Translation job aborted with %s string remaining", "Translation job aborted with %s strings remaining", n), A(n))).slow();
298
+ var t = [], o = i.did();
299
+ o && t.push(m(O("%1$s string translated via %2$s", "%1$s strings translated via %2$s", o), A(o), a)),
300
+ r ? t.push(m(O("%s string updated", "%s strings updated", r), A(r))) : t.push(N("Nothing needed updating")),
301
+ C.notices.success(t.join(". ")).slow(), i = e = null;
302
+ }
303
+ r && (V(), D.rebuildSearch()), l && (l.off("dialogclose").dialog("close"), l = null),
304
+ D.fire("poAuto");
305
+ }
306
+ u(), c(), C.notices.clear(), n.off("submit change"), p(n[0]), n.on("change", function(n) {
307
+ var t = n.target, o = t.name;
308
+ return "api" !== o && "existing" !== o || p(t.form), !0;
309
+ }).on("submit", function(n) {
310
+ n.preventDefault(), s.addClass("loco-loading"), c(), g(r = 0), t = n.target.fuzzy.checked,
311
+ i = e.dispatch().done(v).each(f).prog(g).stat();
312
+ }), l.off("dialogclose").on("dialogclose", function() {
313
+ e.abort(), l = null, v();
314
+ });
315
+ }() : Y();
316
+ }), !1;
317
+ }
318
+ function Y() {
319
+ a ? a.dialog("open") : C.notices.error("Logic error. Unconfigured API modal missing");
320
+ }
321
+ function G(t) {
322
+ var n = S.extend({
323
+ locale: String(b.locale() || "")
324
+ }, c || {});
325
+ x && x.applyCreds(n), o ? (n = function(n) {
326
+ var t, o = new FormData();
327
+ for (t in n) n.hasOwnProperty(t) && o.append(t, n[t]);
328
+ return o;
329
+ }(n)).append("po", new Blob([ String(b) ], {
330
+ type: "application/x-gettext"
331
+ }), String(n.path).split("/").pop() || "untitled.po") : n.data = String(b), C.ajax.post("save", n, function(n) {
332
+ t && t(), D.save(!0), S("#loco-po-modified").text(n.datetime || "[datetime error]");
333
+ }, t);
334
+ }
335
+ function J() {
336
+ return N("Your changes will be lost if you continue without saving");
337
+ }
338
+ function K(o, e) {
339
+ return o.disabled = !1, S(o).on("click", function() {
340
+ var n = o.form, t = g;
341
+ return "binary" === e && (t = t.replace(/\.po$/, ".mo")), n.path.value = t, n.source.value = b.toString(),
342
+ !0;
343
+ }), !0;
344
+ }
345
+ function Q(n) {
346
+ return n.preventDefault(), !1;
347
+ }
348
+ function V() {
349
+ var n = D.stats(), t = n.t, o = n.f, e = n.u, a = m(O("%s string", "%s strings", t), A(t)), i = [];
350
+ T && (a = m(N("%s%% translated"), n.p.replace("%", "")) + ", " + a, o && i.push(m(N("%s fuzzy"), A(o))),
351
+ e && i.push(m(N("%s untranslated"), A(e))), i.length && (a += " (" + i.join(", ") + ")")),
352
+ S("#loco-po-status").text(a);
353
+ }
354
+ }(window, window.jQuery);
pub/js/min/head.js ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ !function(o, e) {
2
+ var n = e.getElementById("loco-fs"), t = e.getElementById("loco-main");
3
+ n && t && o.loco.fs.init(n).setForm(t);
4
+ }(window, document, window.jQuery);
pub/js/min/move.js CHANGED
@@ -1 +1,17 @@
1
- !function(t,e,o){var c,i,u=e.getElementById("loco-fs"),a=e.getElementById("loco-main"),d=a.path.value;function l(n){o(a).find("button.button-primary").each(function(t,e){e.disabled=n})}u&&a&&(c=t.loco.fs.init(u).setForm(a).listen(function(t){l(!(t&&i))}),o(a).change(function(t){var e,n=t.target||{};"dest"!==n.name||!n.checked&&"text"!==n.type||(e=n.value)&&e!==i&&(i=e,l(!0),d!==e&&(u.dest.value=e,c.connect()))}).submit(function(t){return!!i||(t.preventDefault(),!1)}))}(window,document,window.jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ !function(t, e, o) {
2
+ var c, i, u = e.getElementById("loco-fs"), a = e.getElementById("loco-main"), d = a.path.value;
3
+ function l(n) {
4
+ o(a).find("button.button-primary").each(function(t, e) {
5
+ e.disabled = n;
6
+ });
7
+ }
8
+ u && a && (c = t.loco.fs.init(u).setForm(a).listen(function(t) {
9
+ l(!(t && i));
10
+ }), o(a).change(function(t) {
11
+ var e, n = t.target || {};
12
+ "dest" !== n.name || !n.checked && "text" !== n.type || (e = n.value) && e !== i && (i = e,
13
+ l(!0), d !== e && (u.dest.value = e, c.connect()));
14
+ }).submit(function(t) {
15
+ return !!i || (t.preventDefault(), !1);
16
+ }));
17
+ }(window, document, window.jQuery);
pub/js/min/podiff.js CHANGED
@@ -1 +1,44 @@
1
- !function(e,t,u){var i,o=[],n=e.loco,s=n.conf,a=0,r=s.paths.length-2,d=t.getElementById("loco-ui"),f=t.getElementById("loco-fs"),l=d.getElementsByTagName("form").item(0),m=d.getElementsByTagName("button"),c=u(d).find("div.diff-meta"),g=m.item(0),p=m.item(1);function h(){return u(d).removeClass("loading")}function v(e){return u(d).find("div.diff").html(e)}function C(e){return h(),u('<p class="error"></p>').text(e).appendTo(v(""))}function y(e,t){var n,a=t.getElementsByTagName("tr"),r=a.length,i=t.getAttribute("data-diff").split(/\D+/),o=i[0],s=i[1],d=i[2],f=i[3];function l(e,t,n){t<=n&&u("<span></span>").text(String(t)).prependTo(e)}for(e=0;e<r;e++)l((n=a[e].getElementsByTagName("td"))[0],o++,s),l(n[2],d++,f)}function j(a){i&&i.abort();var r=o[a];if(null!=r)return v(r),void h();v(""),u(d).addClass("loading"),i=n.ajax.post("diff",{lhs:s.paths[a],rhs:s.paths[a+1]},function(e,t,n){n===i&&((r=e&&e.html)?(v(o[a]=r).find("tbody").each(y),h()):C(e&&e.error||"Unknown error"))},function(e,t,n){e===i&&(i=null,C("Failed to generate diff"))})}function b(e){0<=e&&e<=r&&(j(a=e),function(){var e=a,t=e+1;g.disabled=r<=e,p.disabled=e<=0,c.addClass("jshide").removeClass("diff-meta-current"),c.eq(e).removeClass("jshide").addClass("diff-meta-current"),c.eq(t).removeClass("jshide")}())}f&&l&&n.fs.init(f).setForm(l),r&&(u(g).on("click",function(e){return e.preventDefault(),b(a+1),!1}).parent().removeClass("jshide"),u(p).on("click",function(e){return e.preventDefault(),b(a-1),!1}).parent().removeClass("jshide")),b(0)}(window,document,jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ !function(e, t, u) {
2
+ var i, o = [], n = e.loco, s = n.conf, a = 0, r = s.paths.length - 2, d = t.getElementById("loco-ui"), f = t.getElementById("loco-fs"), l = d.getElementsByTagName("form").item(0), m = d.getElementsByTagName("button"), c = u(d).find("div.diff-meta"), g = m.item(0), p = m.item(1);
3
+ function h() {
4
+ return u(d).removeClass("loading");
5
+ }
6
+ function v(e) {
7
+ return u(d).find("div.diff").html(e);
8
+ }
9
+ function C(e) {
10
+ return h(), u('<p class="error"></p>').text(e).appendTo(v(""));
11
+ }
12
+ function y(e, t) {
13
+ var n, a = t.getElementsByTagName("tr"), r = a.length, i = t.getAttribute("data-diff").split(/\D+/), o = i[0], s = i[1], d = i[2], f = i[3];
14
+ function l(e, t, n) {
15
+ t <= n && u("<span></span>").text(String(t)).prependTo(e);
16
+ }
17
+ for (e = 0; e < r; e++) l((n = a[e].getElementsByTagName("td"))[0], o++, s), l(n[2], d++, f);
18
+ }
19
+ function j(a) {
20
+ i && i.abort();
21
+ var r = o[a];
22
+ if (null != r) return v(r), void h();
23
+ v(""), u(d).addClass("loading"), i = n.ajax.post("diff", {
24
+ lhs: s.paths[a],
25
+ rhs: s.paths[a + 1]
26
+ }, function(e, t, n) {
27
+ n === i && ((r = e && e.html) ? (v(o[a] = r).find("tbody").each(y), h()) : C(e && e.error || "Unknown error"));
28
+ }, function(e, t, n) {
29
+ e === i && (i = null, C("Failed to generate diff"));
30
+ });
31
+ }
32
+ function b(e) {
33
+ 0 <= e && e <= r && (j(a = e), function() {
34
+ var e = a, t = e + 1;
35
+ g.disabled = r <= e, p.disabled = e <= 0, c.addClass("jshide").removeClass("diff-meta-current"),
36
+ c.eq(e).removeClass("jshide").addClass("diff-meta-current"), c.eq(t).removeClass("jshide");
37
+ }());
38
+ }
39
+ f && l && n.fs.init(f).setForm(l), r && (u(g).on("click", function(e) {
40
+ return e.preventDefault(), b(a + 1), !1;
41
+ }).parent().removeClass("jshide"), u(p).on("click", function(e) {
42
+ return e.preventDefault(), b(a - 1), !1;
43
+ }).parent().removeClass("jshide")), b(0);
44
+ }(window, document, jQuery);
pub/js/min/poinit.js CHANGED
@@ -1 +1,85 @@
1
- !function(n,t,c){var i,e,a,l,o,r,u,s=n.loco,f=t.getElementById("loco-fs"),d=t.getElementById("loco-poinit"),v=f&&s.fs.init(f),g=(a=(e=d)["select-locale"],l=e["custom-locale"],o=e["use-selector"],r=c(a).on("focus",p).closest("fieldset").on("click",p)[0],u=c(l).on("focus",x).closest("fieldset").on("click",x)[0],c(o).change(m),m(),s.watchtext(l,function(n){c(l.form).triggerHandler("change")}),{val:function(){var n=b();return n?s.locale.parse(n):s.locale.clone({lang:"zxx"})}});function h(){return o[0].checked}function p(){y(o[0].checked=!0)}function x(){l.value||(l.value=b()),y(!(o[1].checked=!0))}function b(){var n=c(h()?a:l).serializeArray();return n[0]&&n[0].value||""}function m(){return y(h()),!0}function y(n){l.disabled=n,a.disabled=!n,u.className=n?"disabled":"active",r.className=n?"active":"disabled",I()}var z,A=(z=d["select-path"],{val:function(){var n=k("path");return n&&n.value},txt:function(){var n=k("path");return n&&c(n.parentNode).find("code.path").text()}});function k(n){var t=function(){var n=c(z).serializeArray()[0];return n&&n.value||null}();return t&&d[n+"["+t+"]"]}function w(e){c(d).find("button.button-primary").each(function(n,t){t.disabled=e})}function I(){var n=g&&g.val(),t=n&&n.isValid()&&"zxx"!==n.lang,e=A&&A.val(),a=t&&e;if(j(n),w(!0),a){var c=A.txt();c!==i?(i=c,f.path.value=i,v.listen(N).connect()):w(!1)}}function N(n){w(!n)}function j(e){var n=c(d),t=e&&e.toString("_")||"",a=t?"zxx"===t?"{locale}":t:"{invalid}";n.find("code.path span").each(function(n,t){t.textContent=a}),n.find("span.lang").each(function(n,t){!function(n,t){t&&"zxx"!==t.lang?(n.setAttribute("lang",t.lang),n.setAttribute("class",t.getIcon())):(n.setAttribute("lang",""),n.setAttribute("class","lang nolang"))}(t,e)})}function B(n){var t=n&&n.redirect;t&&location.assign(t)}c(d).on("change",I).on("submit",function(n){return n.preventDefault(),v.applyCreds(d),s.ajax.submit(n.target,B),!1}),j(g.val())}(window,document,jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ !function(n, t, c) {
2
+ var i, e, a, l, o, r, u, s = n.loco, f = t.getElementById("loco-fs"), d = t.getElementById("loco-poinit"), v = f && s.fs.init(f), g = (a = (e = d)["select-locale"],
3
+ l = e["custom-locale"], o = e["use-selector"], r = c(a).on("focus", p).closest("fieldset").on("click", p)[0],
4
+ u = c(l).on("focus", x).closest("fieldset").on("click", x)[0], c(o).change(m), m(),
5
+ s.watchtext(l, function(n) {
6
+ c(l.form).triggerHandler("change");
7
+ }), {
8
+ val: function() {
9
+ var n = b();
10
+ return n ? s.locale.parse(n) : s.locale.clone({
11
+ lang: "zxx"
12
+ });
13
+ }
14
+ });
15
+ function h() {
16
+ return o[0].checked;
17
+ }
18
+ function p() {
19
+ y(o[0].checked = !0);
20
+ }
21
+ function x() {
22
+ l.value || (l.value = b()), y(!(o[1].checked = !0));
23
+ }
24
+ function b() {
25
+ var n = c(h() ? a : l).serializeArray();
26
+ return n[0] && n[0].value || "";
27
+ }
28
+ function m() {
29
+ return y(h()), !0;
30
+ }
31
+ function y(n) {
32
+ l.disabled = n, a.disabled = !n, u.className = n ? "disabled" : "active", r.className = n ? "active" : "disabled",
33
+ I();
34
+ }
35
+ var z, A = (z = d["select-path"], {
36
+ val: function() {
37
+ var n = k("path");
38
+ return n && n.value;
39
+ },
40
+ txt: function() {
41
+ var n = k("path");
42
+ return n && c(n.parentNode).find("code.path").text();
43
+ }
44
+ });
45
+ function k(n) {
46
+ var t = function() {
47
+ var n = c(z).serializeArray()[0];
48
+ return n && n.value || null;
49
+ }();
50
+ return t && d[n + "[" + t + "]"];
51
+ }
52
+ function w(e) {
53
+ c(d).find("button.button-primary").each(function(n, t) {
54
+ t.disabled = e;
55
+ });
56
+ }
57
+ function I() {
58
+ var n = g && g.val(), t = n && n.isValid() && "zxx" !== n.lang, e = A && A.val(), a = t && e;
59
+ if (j(n), w(!0), a) {
60
+ var c = A.txt();
61
+ c !== i ? (i = c, f.path.value = i, v.listen(N).connect()) : w(!1);
62
+ }
63
+ }
64
+ function N(n) {
65
+ w(!n);
66
+ }
67
+ function j(e) {
68
+ var n = c(d), t = e && e.toString("_") || "", a = t ? "zxx" === t ? "{locale}" : t : "{invalid}";
69
+ n.find("code.path span").each(function(n, t) {
70
+ t.textContent = a;
71
+ }), n.find("span.lang").each(function(n, t) {
72
+ !function(n, t) {
73
+ t && "zxx" !== t.lang ? (n.setAttribute("lang", t.lang), n.setAttribute("class", t.getIcon())) : (n.setAttribute("lang", ""),
74
+ n.setAttribute("class", "lang nolang"));
75
+ }(t, e);
76
+ });
77
+ }
78
+ function B(n) {
79
+ var t = n && n.redirect;
80
+ t && location.assign(t);
81
+ }
82
+ c(d).on("change", I).on("submit", function(n) {
83
+ return n.preventDefault(), v.applyCreds(d), s.ajax.submit(n.target, B), !1;
84
+ }), j(g.val());
85
+ }(window, document, jQuery);
pub/js/min/potinit.js CHANGED
@@ -1 +1,10 @@
1
- !function(t,n,e){var o=t.loco,i=n.getElementById("loco-fs"),r=n.getElementById("loco-potinit");function c(t){var n=t&&t.redirect;n&&location.assign(n)}e(r).on("submit",function(t){return t.preventDefault(),o.ajax.submit(t.target,c),!1}),i&&o.fs.init(i).setForm(r)}(window,document,jQuery);
 
 
 
 
 
 
 
 
 
1
+ !function(t, n, e) {
2
+ var o = t.loco, i = n.getElementById("loco-fs"), r = n.getElementById("loco-potinit");
3
+ function c(t) {
4
+ var n = t && t.redirect;
5
+ n && location.assign(n);
6
+ }
7
+ e(r).on("submit", function(t) {
8
+ return t.preventDefault(), o.ajax.submit(t.target, c), !1;
9
+ }), i && o.fs.init(i).setForm(r);
10
+ }(window, document, jQuery);
pub/js/min/poview.js CHANGED
@@ -1 +1,37 @@
1
- !function(e,o,f){var a,c,i,l,r,p,n,s,u,d=e.loco,t=d.conf,h=d.po.ref.init(d,t),v=o.getElementById("loco-po");function g(){r.length&&(p.push([i,l]),c.push(r),r=[]),i=null}function m(t){return f('<ol class="msgcat"></ol>').attr("start",t).appendTo(a)}function x(t){n!==t&&(f("#loco-content")[t?"removeClass":"addClass"]("loco-invalid"),n=t)}a=v,c=d.fulltext.init(),r=[],p=[],s=!(n=!0),(u=f(a).find("li")).each(function(t,n){var e,o=f(n);o.find("span.po-none").length?g():(l=t,null==i&&(i=t),(e=o.find(".po-text").text())&&(r=r.concat(e.replace(/\\[ntvfab\\"]/g," ").split(" "))))}),g(),d.watchtext(f(a.parentNode).find("form.loco-filter")[0].q,function(t){t?function(t){var n,e,o,i=c.find(t),l=-1,r=i.length;if(f("ol",a).remove(),r){for(;++l<r;)for(o=m((n=(e=p[i[l]])[0])+1);n<=e[1];n++)o.append(u[n]);x(!0)}else x(!1),m(0).append(f("<li></li>").text(d.l10n._("Nothing matches the text filter")));s=!0,C()}(t):s&&(x(!0),s=!1,f("ol",a).remove(),m(1).append(u),C())}),f(v).removeClass("loco-loading");var w,y,C=(y=v.clientHeight-2,function(){var t=function(t,n){for(var e=t.offsetTop||0;(t=t.offsetParent)&&t!==n;)e+=t.offsetTop||0;return e}(v,o.body),n=e.innerHeight-t-20;w!==n&&(v.style.height=n<y?String(n)+"px":"",w=n)});C(),f(e).resize(C),f(v).on("click",function(t){var n=t.target;if(n.hasAttribute("href"))return t.preventDefault(),h.load(n.textContent),!1})}(window,document,window.jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ !function(e, o, f) {
2
+ var a, c, i, l, r, p, n, s, u, d = e.loco, t = d.conf, h = d.po.ref.init(d, t), v = o.getElementById("loco-po");
3
+ function g() {
4
+ r.length && (p.push([ i, l ]), c.push(r), r = []), i = null;
5
+ }
6
+ function m(t) {
7
+ return f('<ol class="msgcat"></ol>').attr("start", t).appendTo(a);
8
+ }
9
+ function x(t) {
10
+ n !== t && (f("#loco-content")[t ? "removeClass" : "addClass"]("loco-invalid"),
11
+ n = t);
12
+ }
13
+ a = v, c = d.fulltext.init(), r = [], p = [], s = !(n = !0), (u = f(a).find("li")).each(function(t, n) {
14
+ var e, o = f(n);
15
+ o.find("span.po-none").length ? g() : (l = t, null == i && (i = t), (e = o.find(".po-text").text()) && (r = r.concat(e.replace(/\\[ntvfab\\"]/g, " ").split(" "))));
16
+ }), g(), d.watchtext(f(a.parentNode).find("form.loco-filter")[0].q, function(t) {
17
+ t ? function(t) {
18
+ var n, e, o, i = c.find(t), l = -1, r = i.length;
19
+ if (f("ol", a).remove(), r) {
20
+ for (;++l < r; ) for (o = m((n = (e = p[i[l]])[0]) + 1); n <= e[1]; n++) o.append(u[n]);
21
+ x(!0);
22
+ } else x(!1), m(0).append(f("<li></li>").text(d.l10n._("Nothing matches the text filter")));
23
+ s = !0, C();
24
+ }(t) : s && (x(!0), s = !1, f("ol", a).remove(), m(1).append(u), C());
25
+ }), f(v).removeClass("loco-loading");
26
+ var w, y, C = (y = v.clientHeight - 2, function() {
27
+ var t = function(t, n) {
28
+ for (var e = t.offsetTop || 0; (t = t.offsetParent) && t !== n; ) e += t.offsetTop || 0;
29
+ return e;
30
+ }(v, o.body), n = e.innerHeight - t - 20;
31
+ w !== n && (v.style.height = n < y ? String(n) + "px" : "", w = n);
32
+ });
33
+ C(), f(e).resize(C), f(v).on("click", function(t) {
34
+ var n = t.target;
35
+ if (n.hasAttribute("href")) return t.preventDefault(), h.load(n.textContent), !1;
36
+ });
37
+ }(window, document, window.jQuery);
pub/js/min/setup.js CHANGED
@@ -1 +1,51 @@
1
- !function(e,o,a){function n(e,o,n){function r(){i("Failed to contact remote API"),c=null}function u(){c&&(clearTimeout(c),c=null)}var c=setTimeout(r,3e3);return i(""),a.ajax({url:s.apiUrl+"/"+e+"/"+o+".jsonp?version="+encodeURIComponent(n),dataType:"jsonp",success:function(e,o,n){if(c){u();var t=e&&e.exact;o=e&&e.status;t?function(e){d["json-content"].value=e,a("#loco-remote-empty").hide(),a("#loco-remote-found").show()}(t):404===o?i("Sorry, we don't know a bundle by this name"):(l.notices.error(e.error||"Unknown server error"),r())}},error:function(){c&&(u(),r())},cache:!0}),{abort:u}}function i(e){d["json-content"].value="",a("#loco-remote-empty").show().find("span").text(e),a("#loco-remote-found").hide().removeClass("jshide")}var t,l=e.loco,s=l.conf||{},d=o.getElementById("loco-remote");a(d).find('button[type="button"]').on("click",function(e){return e.preventDefault(),t&&t.abort(),t=n(d.vendor.value,d.slug.value,d.version.value),!1}),a(d).find('input[type="reset"]').on("click",function(e){return e.preventDefault(),i(""),!1}),a.ajax({url:s.apiUrl+"/vendors.jsonp",dataType:"jsonp",success:function(e){for(var o,n,t=-1,r=e.length,u=a(d.vendor).html("");++t<r;)o=e[t][0],n=e[t][1],u.append(a("<option></option>").attr("value",o).text(n))},cache:!0})}(window,document,jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ !function(e, o, a) {
2
+ function n(e, o, n) {
3
+ function r() {
4
+ i("Failed to contact remote API"), c = null;
5
+ }
6
+ function u() {
7
+ c && (clearTimeout(c), c = null);
8
+ }
9
+ var c = setTimeout(r, 3e3);
10
+ return i(""), a.ajax({
11
+ url: s.apiUrl + "/" + e + "/" + o + ".jsonp?version=" + encodeURIComponent(n),
12
+ dataType: "jsonp",
13
+ success: function(e, o, n) {
14
+ if (c) {
15
+ u();
16
+ var t = e && e.exact;
17
+ o = e && e.status;
18
+ t ? function(e) {
19
+ d["json-content"].value = e, a("#loco-remote-empty").hide(), a("#loco-remote-found").show();
20
+ }(t) : 404 === o ? i("Sorry, we don't know a bundle by this name") : (l.notices.error(e.error || "Unknown server error"),
21
+ r());
22
+ }
23
+ },
24
+ error: function() {
25
+ c && (u(), r());
26
+ },
27
+ cache: !0
28
+ }), {
29
+ abort: u
30
+ };
31
+ }
32
+ function i(e) {
33
+ d["json-content"].value = "", a("#loco-remote-empty").show().find("span").text(e),
34
+ a("#loco-remote-found").hide().removeClass("jshide");
35
+ }
36
+ var t, l = e.loco, s = l.conf || {}, d = o.getElementById("loco-remote");
37
+ a(d).find('button[type="button"]').on("click", function(e) {
38
+ return e.preventDefault(), t && t.abort(), t = n(d.vendor.value, d.slug.value, d.version.value),
39
+ !1;
40
+ }), a(d).find('input[type="reset"]').on("click", function(e) {
41
+ return e.preventDefault(), i(""), !1;
42
+ }), a.ajax({
43
+ url: s.apiUrl + "/vendors.jsonp",
44
+ dataType: "jsonp",
45
+ success: function(e) {
46
+ for (var o, n, t = -1, r = e.length, u = a(d.vendor).html(""); ++t < r; ) o = e[t][0],
47
+ n = e[t][1], u.append(a("<option></option>").attr("value", o).text(n));
48
+ },
49
+ cache: !0
50
+ });
51
+ }(window, document, jQuery);
pub/js/min/upload.js CHANGED
@@ -1 +1,47 @@
1
- !function(o,n,t){var e,i,r,a=o.loco,u=(a&&a.conf||{}).multipart&&o.FormData&&o.Blob,c=n.getElementById("loco-fs"),f=n.getElementById("loco-main");function l(e){var n=t(f).find("button.button-primary");return n.each(function(n,t){t.disabled=e}),n}function d(){l(!0).addClass("loco-loading")}function s(n){l(n).removeClass("loco-loading")}function m(){f.path.value=i+"/"+r,d(),e.connect()}function v(){return i&&r&&e.authed()}function p(n,t,e){n.redirect?(s(!0),o.location.assign(n.redirect)):s(!1)}function g(){s(!1)}c&&f&&(e=o.loco.fs.init(c).setForm(f).listen(function(n){s(!(n&&i&&r))}),t(f).change(function(n){r=String(f.f.value).split(/[\\\/]/).pop();var t,e=n.target||{};if("dir"===e.name&&e.checked){if((t=e.value)&&t!==i&&(i=t,r))return void m()}else if("f"===e.name&&i)return void m();l(!v())}).submit(function(n){if(v()){if(u){n.preventDefault();var t=new FormData(f);return d(),a.ajax.post("upload",t,p,g),!1}return!0}return n.preventDefault(),!1}))}(window,document,window.jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ !function(o, n, t) {
2
+ var e, i, r, a = o.loco, u = (a && a.conf || {}).multipart && o.FormData && o.Blob, c = n.getElementById("loco-fs"), f = n.getElementById("loco-main");
3
+ function l(e) {
4
+ var n = t(f).find("button.button-primary");
5
+ return n.each(function(n, t) {
6
+ t.disabled = e;
7
+ }), n;
8
+ }
9
+ function d() {
10
+ l(!0).addClass("loco-loading");
11
+ }
12
+ function s(n) {
13
+ l(n).removeClass("loco-loading");
14
+ }
15
+ function m() {
16
+ f.path.value = i + "/" + r, d(), e.connect();
17
+ }
18
+ function v() {
19
+ return i && r && e.authed();
20
+ }
21
+ function p(n, t, e) {
22
+ n.redirect ? (s(!0), o.location.assign(n.redirect)) : s(!1);
23
+ }
24
+ function g() {
25
+ s(!1);
26
+ }
27
+ c && f && (e = o.loco.fs.init(c).setForm(f).listen(function(n) {
28
+ s(!(n && i && r));
29
+ }), t(f).change(function(n) {
30
+ r = String(f.f.value).split(/[\\\/]/).pop();
31
+ var t, e = n.target || {};
32
+ if ("dir" === e.name && e.checked) {
33
+ if ((t = e.value) && t !== i && (i = t, r)) return void m();
34
+ } else if ("f" === e.name && i) return void m();
35
+ l(!v());
36
+ }).submit(function(n) {
37
+ if (v()) {
38
+ if (u) {
39
+ n.preventDefault();
40
+ var t = new FormData(f);
41
+ return d(), a.ajax.post("upload", t, p, g), !1;
42
+ }
43
+ return !0;
44
+ }
45
+ return n.preventDefault(), !1;
46
+ }));
47
+ }(window, document, window.jQuery);
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: timwhitlock
3
  Tags: translation, translators, localization, localisation, l10n, i18n, Gettext, PO, MO, productivity, multilingual, internationalization
4
  Requires at least: 4.1
5
  Requires PHP: 5.2.4
6
- Tested up to: 5.7
7
- Stable tag: 2.5.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -100,6 +100,16 @@ We don't collect your data or snoop on you. See the [plugin privacy notice](http
100
 
101
  == Changelog ==
102
 
 
 
 
 
 
 
 
 
 
 
103
  = 2.5.2 =
104
  * Added implied formality and loco_locale_formality filter
105
  * Added cli fetch command (experimental)
@@ -412,7 +422,7 @@ We don't collect your data or snoop on you. See the [plugin privacy notice](http
412
 
413
  == Upgrade Notice ==
414
 
415
- = 2.5.2 =
416
  * Various improvements and bugfixes
417
 
418
 
3
  Tags: translation, translators, localization, localisation, l10n, i18n, Gettext, PO, MO, productivity, multilingual, internationalization
4
  Requires at least: 4.1
5
  Requires PHP: 5.2.4
6
+ Tested up to: 5.7.1
7
+ Stable tag: 2.5.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
100
 
101
  == Changelog ==
102
 
103
+ = 2.5.3 =
104
+ * Adds option to merge JSON translations when syncing from PO
105
+ * Adds screen for editing file headers and sync options
106
+ * Fix for missing responseText in failed Ajax responses
107
+ * Fix for HTML entities returned from `number_format_i18n`
108
+ * Localized number formatting in JavaScript
109
+ * Replaced usage of date_i18n with wp_date
110
+ * Added configurable API endpoint for DeepL
111
+ * Bumped WordPress version to 5.7.2
112
+
113
  = 2.5.2 =
114
  * Added implied formality and loco_locale_formality filter
115
  * Added cli fetch command (experimental)
422
 
423
  == Upgrade Notice ==
424
 
425
+ = 2.5.3 =
426
  * Various improvements and bugfixes
427
 
428
 
src/admin/config/ApisController.php CHANGED
@@ -63,6 +63,7 @@ class Loco_admin_config_ApisController extends Loco_admin_config_BaseController
63
  // common ui elements / labels
64
  $this->set( 'ui', new Loco_mvc_ViewParams( array(
65
  'api_key' => __('API key','loco-translate'),
 
66
  'api_region' => __('API region','loco-translate'),
67
  ) ) );
68
 
63
  // common ui elements / labels
64
  $this->set( 'ui', new Loco_mvc_ViewParams( array(
65
  'api_key' => __('API key','loco-translate'),
66
+ 'api_url' => __('API URL','loco-translate'),
67
  'api_region' => __('API region','loco-translate'),
68
  ) ) );
69
 
src/admin/file/DiffController.php CHANGED
@@ -92,8 +92,9 @@ class Loco_admin_file_DiffController extends Loco_admin_file_BaseController {
92
  // $info['mtime'] = $backups->getTimestamp($path);
93
  // pull "real" update time, meaning when the revision was last updated as current version
94
  try {
95
- $head = Loco_gettext_Data::head($tmp)->getHeaders();
96
- if( $value = $head->trimmed($podate) ){
 
97
  $info['potime'] = Loco_gettext_Data::parseDate($value);
98
  }
99
  else {
92
  // $info['mtime'] = $backups->getTimestamp($path);
93
  // pull "real" update time, meaning when the revision was last updated as current version
94
  try {
95
+ $head = Loco_gettext_Data::head($tmp);
96
+ $value = $head->trimmed($podate);
97
+ if( '' !== $value ){
98
  $info['potime'] = Loco_gettext_Data::parseDate($value);
99
  }
100
  else {
src/admin/file/EditController.php CHANGED
@@ -90,15 +90,12 @@ class Loco_admin_file_EditController extends Loco_admin_file_BaseController {
90
  $syncmode = null;
91
  $locale = $this->getLocale();
92
  if( $locale instanceof Loco_Locale ){
93
- // alternative POT file may be forced by PO headers
94
- if( $head->has('X-Loco-Template') ){
95
- $potfile = new Loco_fs_File( $head['X-Loco-Template'] );
 
 
96
  $potfile->normalize( $bundle->getDirectoryPath() );
97
- // sync mode permits copying of translations since 2.4.3
98
- // legacy sync behaviour was copy msgstr fields when they exist (no strip)
99
- if( $head->has('X-Loco-Template-Mode') ){
100
- $syncmode = $head['X-Loco-Template-Mode'];
101
- }
102
  }
103
  // else use project-configured template, assuming there is one
104
  // no way to get configured POT if invalid project
@@ -161,7 +158,8 @@ class Loco_admin_file_EditController extends Loco_admin_file_BaseController {
161
  else if( 1 === $settings->pot_protect ){
162
  Loco_error_AdminNotices::warn( __("This is NOT a translation file. Manual editing of source strings is not recommended.",'loco-translate') )
163
  ->addLink( Loco_mvc_AdminRouter::generate('config').'#loco--pot-protect', __('Settings','loco-translate') )
164
- ->addLink( apply_filters('loco_external','https://localise.biz/wordpress/plugin/manual/templates'), __('Documentation','loco-translate') );
 
165
  }
166
  }
167
 
90
  $syncmode = null;
91
  $locale = $this->getLocale();
92
  if( $locale instanceof Loco_Locale ){
93
+ // alternative POT file may be forced by sync options
94
+ $sync = new Loco_gettext_SyncOptions($head);
95
+ $syncmode = $sync->getSyncMode();
96
+ if( $sync->hasTemplate() ){
97
+ $potfile = $sync->getTemplate();
98
  $potfile->normalize( $bundle->getDirectoryPath() );
 
 
 
 
 
99
  }
100
  // else use project-configured template, assuming there is one
101
  // no way to get configured POT if invalid project
158
  else if( 1 === $settings->pot_protect ){
159
  Loco_error_AdminNotices::warn( __("This is NOT a translation file. Manual editing of source strings is not recommended.",'loco-translate') )
160
  ->addLink( Loco_mvc_AdminRouter::generate('config').'#loco--pot-protect', __('Settings','loco-translate') )
161
+ ->addLink( apply_filters('loco_external','https://localise.biz/wordpress/plugin/manual/templates'), __('Documentation','loco-translate') )
162
+ ->noLog();
163
  }
164
  }
165
 
src/admin/file/HeadController.php ADDED
@@ -0,0 +1,169 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Controller to edit PO file header values and sync settings
4
+ */
5
+ class Loco_admin_file_HeadController extends Loco_admin_file_BaseController {
6
+
7
+
8
+ /**
9
+ * {@inheritdoc}
10
+ */
11
+ public function init(){
12
+ parent::init();
13
+ $file = $this->get('file');
14
+ /* @var Loco_fs_File $file */
15
+ if( $file->exists() && ! $file->isDirectory() ){
16
+ // nonce action will be specific to file for extra security
17
+ $path = $file->getPath();
18
+ $action = 'head:'.$path;
19
+ // set up view now in case of late failure
20
+ $fields = new Loco_mvc_HiddenFields( array() );
21
+ $fields->setNonce( $action );
22
+ $fields['auth'] = 'update';
23
+ $fields['path'] = $this->get('path');
24
+ $this->set('hidden',$fields );
25
+ // attempt update if valid nonce posted back
26
+ while( $this->checkNonce($action) ) {
27
+ $data = Loco_gettext_Data::load($file);
28
+ // check some headers prior ro updating
29
+ $head = $data->getHeaders();
30
+ $plurals = $head['Plural-Forms'];
31
+ // in advanced mode we will set all headers from form as-is.
32
+ $post = Loco_mvc_PostParams::get();
33
+ if( $post->has('headers') ){
34
+ $raw = (array) $post->headers;
35
+ $head = new LocoPoHeaders($raw);
36
+ $data->setHeaders($head);
37
+ // modifying character encoding is not currently supported
38
+ if( 'UTF-8' !== $head->getCharset() ){
39
+ Loco_error_AdminNotices::warn('Loco Translate only supports UTF-8 encoded files');
40
+ $head['Content-Type'] = 'text/plain; charset=UTF-8';
41
+ }
42
+ }
43
+ // in basic mode we save PO sync settings only
44
+ else if( 'po' !== $file->extension() ){
45
+ throw new Exception( 'Sync settings apply to PO files only' );
46
+ }
47
+ else if( ! $post->has('conf') ){
48
+ throw new Exception( 'Unexpected post data' );
49
+ }
50
+ else {
51
+ $conf = new Loco_gettext_SyncOptions($head);
52
+ $raw = (array) $post->conf;
53
+ $conf->setTemplate( $raw['template'] );
54
+ $mode = isset($raw['mode']) ? $raw['mode'] : 'pot';
55
+ if( isset($raw['json']) ){
56
+ $mode .= ',json';
57
+ }
58
+ $conf->setSyncMode($mode);
59
+ }
60
+ // Validate and remove redundant headers
61
+ $conf = new Loco_gettext_SyncOptions($head);
62
+ $head = $conf->getHeaders();
63
+ // Render PO without modifying sort order
64
+ if( $file instanceof Loco_fs_LocaleFile && $file->getLocale()->isValid() ){
65
+ $compiler = new Loco_gettext_Compiler($file);
66
+ $compiler->writePo($data);
67
+ // If we save the PO we should recompile MO, but only actually required if plural forms have changed
68
+ if( $head['Plural-Forms'] !== $plurals ){
69
+ $compiler->writeMo($data);
70
+ }
71
+ }
72
+ // else save just the actual file. Probably .pot, or wrongly named .po file.
73
+ else {
74
+ $api = new Loco_api_WordPressFileSystem;
75
+ $api->authorizeUpdate($file);
76
+ $file->putContents( $data->msgcat() );
77
+ }
78
+ // flash message for display after redirect
79
+ try {
80
+ Loco_data_Session::get()->flash('success',sprintf( __('%s file saved','loco-translate'), strtoupper($file->extension()) ));
81
+ Loco_data_Session::close();
82
+ }
83
+ catch( Exception $e ){
84
+ // tolerate session failure
85
+ }
86
+ if( wp_redirect($_SERVER['REQUEST_URI']) ){
87
+ exit;
88
+ }
89
+ break;
90
+ }
91
+
92
+ }
93
+
94
+ $bundle = $this->getBundle();
95
+ $this->set('title', 'Configure '.$file->basename().' &lsaquo; '.$bundle->getName() );
96
+ }
97
+
98
+
99
+
100
+
101
+ /**
102
+ * {@inheritdoc}
103
+ */
104
+ public function render(){
105
+
106
+ $file = $this->get('file');
107
+ $fail = $this->getFileError($file);
108
+ if( is_string($fail) && '' !== $fail ){
109
+ return $fail;
110
+ }
111
+
112
+ // parse PO header
113
+ $head = Loco_gettext_Data::head($file);
114
+ $this->set('head',$head);
115
+
116
+ // Remote file system required if file is not directly writable
117
+ $this->prepareFsConnect( 'update', $this->get('path') );
118
+ $this->enqueueScript('head');
119
+
120
+ // set simpler title for breadcrumb
121
+ $this->set('title', $file->basename() );
122
+
123
+ // localized files only can have sync settings
124
+ $localized = $file instanceof Loco_fs_LocaleFile && $file->getLocale()->isValid();
125
+
126
+ // Advanced mode shows all headers in one form
127
+ if( $this->get('advanced') || ! $localized ){
128
+ return $this->view('admin/file/head');
129
+ }
130
+
131
+ // link to advanced mode and display sync settings form (PO only)
132
+ $this->set('advanced', $_SERVER['REQUEST_URI'].'&advanced=1' );
133
+
134
+ $conf = new Loco_gettext_SyncOptions($head);
135
+ $this->set('conf', $conf );
136
+
137
+ // perform some basic validation of sync mode
138
+ if( $conf->hasTemplate() ){
139
+ $potfile = $conf->getTemplate();
140
+ }
141
+ else {
142
+ $potfile = new Loco_fs_LocaleFile( (string) $this->getProject()->getPot() );
143
+ }
144
+ if( $conf->mergeMsgstr() && 'po' !== $potfile->extension() ){
145
+ Loco_error_AdminNotices::warn('Copying translations requires template is a PO file');
146
+ }
147
+ if( $conf->mergeJson() && ! $potfile->getLocale()->isValid() ){
148
+ Loco_error_AdminNotices::warn('Merging JSON files requires template has a localized file path');
149
+ }
150
+
151
+ // may or may not already have a custom template with a known locale
152
+ $this->set('potName','--');
153
+ if( $conf->hasTemplate() ){
154
+ $file = $conf->getTemplate();
155
+ $file->normalize( $this->getBundle()->getDirectoryPath() );
156
+ if( ! $file->exists() ){
157
+ Loco_error_AdminNotices::warn('Configured template does not currently exist');
158
+ }
159
+ $this->set('potName', $file->basename() );
160
+ }
161
+ // force basic POT mode for unconfigured templates
162
+ else if( '' === $conf->getSyncMode() ){
163
+ $conf->setSyncMode('pot');
164
+ }
165
+
166
+ return $this->view('admin/file/conf');
167
+ }
168
+
169
+ }
src/admin/file/InfoController.php CHANGED
@@ -32,7 +32,7 @@ class Loco_admin_file_InfoController extends Loco_admin_file_BaseController {
32
  * {@inheritdoc}
33
  */
34
  public function render(){
35
- /* @var Loco_fs_File $file */
36
  $file = $this->get('file');
37
  $name = $file->basename();
38
  $this->set('title', $name );
@@ -76,7 +76,10 @@ class Loco_admin_file_InfoController extends Loco_admin_file_BaseController {
76
  ) );
77
  $args->setNonce('download');
78
  $finfo['download'] = $args->getHref( admin_url('admin-ajax.php','relative') );
79
-
 
 
 
80
  // collect note worthy problems with file headers
81
  $debugging = loco_debugging();
82
  $debug = array();
@@ -110,7 +113,6 @@ class Loco_admin_file_InfoController extends Loco_admin_file_BaseController {
110
  // don't attempt to pull locale of template file
111
  if( 'pot' !== $ext && ! $isTemplate ){
112
  $locale = $file->getLocale();
113
- $code = (string) $locale;
114
  if( $locale->isValid() ){
115
  // find PO/MO counter parts
116
  if( 'po' === $ext ){
@@ -143,8 +145,9 @@ class Loco_admin_file_InfoController extends Loco_admin_file_BaseController {
143
  $meta = Loco_gettext_Metadata::create($file,$data);
144
  $this->set( 'meta', $meta );
145
  // allow PO header to specify alternative template for sync
146
- if( $head->has('X-Loco-Template') ){
147
- $altpot = new Loco_fs_File($head['X-Loco-Template']);
 
148
  $altpot->normalize( $this->getBundle()->getDirectoryPath() );
149
  if( $altpot->exists() && ( ! $template || ! $template->equal($altpot) ) ){
150
  $template = $altpot;
@@ -168,13 +171,14 @@ class Loco_admin_file_InfoController extends Loco_admin_file_BaseController {
168
  }
169
  // Language header sanity checks, raising developer (debug) warnings
170
  if( $locale ){
171
- if( $value = $head['Language'] ){
172
- $check = (string) Loco_Locale::parse($value);
173
- if( $check !== $code ){
174
- $debug[]= sprintf( __('Language header is "%s" but file name contains "%s"','loco-translate'), $value, $code );
175
  }
176
  }
177
- if( $value = $head['Plural-Forms'] ){
 
178
  try {
179
  $locale->setPluralFormsHeader($value);
180
  }
32
  * {@inheritdoc}
33
  */
34
  public function render(){
35
+ /* @var Loco_fs_LocaleFile $file */
36
  $file = $this->get('file');
37
  $name = $file->basename();
38
  $this->set('title', $name );
76
  ) );
77
  $args->setNonce('download');
78
  $finfo['download'] = $args->getHref( admin_url('admin-ajax.php','relative') );
79
+
80
+ // allow link to modify headers/settings
81
+ $finfo['configure'] = str_replace('file-info','file-head',$_SERVER['REQUEST_URI']);
82
+
83
  // collect note worthy problems with file headers
84
  $debugging = loco_debugging();
85
  $debug = array();
113
  // don't attempt to pull locale of template file
114
  if( 'pot' !== $ext && ! $isTemplate ){
115
  $locale = $file->getLocale();
 
116
  if( $locale->isValid() ){
117
  // find PO/MO counter parts
118
  if( 'po' === $ext ){
145
  $meta = Loco_gettext_Metadata::create($file,$data);
146
  $this->set( 'meta', $meta );
147
  // allow PO header to specify alternative template for sync
148
+ $opts = new Loco_gettext_SyncOptions($head);
149
+ if( $opts->hasTemplate() ){
150
+ $altpot = $opts->getTemplate();
151
  $altpot->normalize( $this->getBundle()->getDirectoryPath() );
152
  if( $altpot->exists() && ( ! $template || ! $template->equal($altpot) ) ){
153
  $template = $altpot;
171
  }
172
  // Language header sanity checks, raising developer (debug) warnings
173
  if( $locale ){
174
+ $value = $head->trimmed('Language');
175
+ if( '' !== $value ){
176
+ if( Loco_Locale::parse($value)->__toString() !== $locale->__toString() ){
177
+ $debug[]= sprintf( __('Language header is "%s" but file name contains "%s"','loco-translate'), $value, $locale );
178
  }
179
  }
180
+ $value = $head->trimmed('Plural-Forms');
181
+ if( '' !== $value ){
182
  try {
183
  $locale->setPluralFormsHeader($value);
184
  }
src/ajax/MsginitController.php CHANGED
@@ -59,27 +59,36 @@ class Loco_ajax_MsginitController extends Loco_ajax_common_BundleController {
59
  if( $mofile->exists() ){
60
  throw new Loco_error_Exception( __('MO file exists for this language already. Delete it first','loco-translate') );
61
  }
62
-
63
- /*/ Same for JSON file, but WordPress >= only 5
64
- $jsfile = function_exists('wp_set_script_translations') ? $pofile->cloneExtension('json') : null;
65
- if( $jsfile && $jsfile->exists() ){
66
- throw new Loco_error_Exception( __('JSON file exists for this language already. Delete it first','loco-translate') );
67
- }*/
68
 
69
  // Permit forcing of any parsable file as strings template
70
  $source = (string) $post->source;
71
  $compile = false;
 
72
  if( '' !== $source ){
 
 
73
  $potfile = new Loco_fs_LocaleFile( $source );
74
  $potfile->normalize( $base );
75
  $data = Loco_gettext_Data::load($potfile);
76
- // Remove target strings when copying PO
77
- if( $post->strip ){
78
- $data->strip();
 
 
 
 
 
 
 
 
 
 
 
 
79
  }
80
- // else we're copying target translations from given file
81
- else {
82
- $compile = true;
83
  }
84
  }
85
  // else parse POT file if project defines one that exists
@@ -102,25 +111,31 @@ class Loco_ajax_MsginitController extends Loco_ajax_common_BundleController {
102
  if( ! $vers || 'PACKAGE VERSION' === $vers ){
103
  $headers['Project-Id-Version'] = $project->getName();
104
  }
105
- // relative path from bundle root to the template/source this file was created from
106
- if( $potfile && $post->link ){
107
- $headers['X-Loco-Template'] = $potfile->getRelativePath( $bundle->getDirectoryPath() );
108
- // legacy behaviour was to sync source AND target strings in the absence of the following
109
- if( $post->strip ){
110
- $headers['X-Loco-Template-Mode'] = 'POT';
111
- }
112
- // without strip argument we need to remember the source PO is effectively a fallback locale
113
- else {
114
- $fallback = $potfile instanceof Loco_fs_LocaleFile ? $potfile->getLocale() : $locale;
115
  $headers['X-Loco-Fallback'] = (string) $fallback;
116
- $headers['X-Loco-Template-Mode'] = 'PO';
117
  }
118
  }
119
-
120
  // finalize PO data ready to write to new file
121
  $locale->ensureName( new Loco_api_WordPressTranslations );
122
  $data->localize( $locale, $headers );
123
 
 
 
 
 
 
 
 
 
 
 
 
 
 
124
  // compile all files in this set when copying target translation
125
  $compiler = new Loco_gettext_Compiler($pofile);
126
  if( $compile ){
59
  if( $mofile->exists() ){
60
  throw new Loco_error_Exception( __('MO file exists for this language already. Delete it first','loco-translate') );
61
  }
 
 
 
 
 
 
62
 
63
  // Permit forcing of any parsable file as strings template
64
  $source = (string) $post->source;
65
  $compile = false;
66
+ $mergejson = false;
67
  if( '' !== $source ){
68
+ $translate = ! $post->strip;
69
+ $compile = $translate;
70
  $potfile = new Loco_fs_LocaleFile( $source );
71
  $potfile->normalize( $base );
72
  $data = Loco_gettext_Data::load($potfile);
73
+ // When copying a PO file we may need to augment with JSON strings
74
+ if( $post->json ){
75
+ $mergejson = true;
76
+ $siblings = new Loco_fs_Siblings($potfile);
77
+ $jsons = $siblings->getJsons();
78
+ if( $jsons ){
79
+ $refs = clone $data;
80
+ $merge = new Loco_gettext_Matcher();
81
+ $merge->loadRefs($refs,$translate);
82
+ $merge->loadJsons($jsons);
83
+ // resolve faux merge into empty instance
84
+ $data->clear();
85
+ $merge->mergeValid($refs,$data);
86
+ $merge->mergeAdded($data);
87
+ }
88
  }
89
+ // Remove target strings when copying PO without msgstr fields
90
+ if( ! $translate && 'pot' !== $potfile->extension() ){
91
+ $data->strip();
92
  }
93
  }
94
  // else parse POT file if project defines one that exists
111
  if( ! $vers || 'PACKAGE VERSION' === $vers ){
112
  $headers['Project-Id-Version'] = $project->getName();
113
  }
114
+ // fallback header not actually used, but keeping for informational purposes
115
+ if( $potfile instanceof Loco_fs_LocaleFile && $post->link ){
116
+ $fallback = $potfile->getLocale();
117
+ if( $fallback->isValid() ){
 
 
 
 
 
 
118
  $headers['X-Loco-Fallback'] = (string) $fallback;
 
119
  }
120
  }
121
+
122
  // finalize PO data ready to write to new file
123
  $locale->ensureName( new Loco_api_WordPressTranslations );
124
  $data->localize( $locale, $headers );
125
 
126
+ // save sync options in PO headers if linked to a custom template.
127
+ if( $potfile && $post->link ){
128
+ $opts = new Loco_gettext_SyncOptions( $data->getHeaders() );
129
+ $opts->setTemplate( $potfile->getRelativePath( $bundle->getDirectoryPath() ) );
130
+ // legacy behaviour was to sync source AND target strings in the absence of the following
131
+ $mode = $post->strip ? 'POT' : 'PO';
132
+ // even if no JSONs were merged we need to keep this option in case JSONs are added in future.
133
+ if( $mergejson ){
134
+ $mode.= ',JSON';
135
+ }
136
+ $opts->setSyncMode($mode);
137
+ }
138
+
139
  // compile all files in this set when copying target translation
140
  $compiler = new Loco_gettext_Compiler($pofile);
141
  if( $compile ){
src/ajax/SyncController.php CHANGED
@@ -57,6 +57,10 @@ class Loco_ajax_SyncController extends Loco_mvc_AjaxController {
57
  $potfile = null;
58
  }
59
 
 
 
 
 
60
  // Parse existing POT for source
61
  if( $potfile ){
62
  $this->set('pot', $potfile->basename() );
@@ -68,8 +72,16 @@ class Loco_ajax_SyncController extends Loco_mvc_AjaxController {
68
  throw new Loco_error_ParseException( sprintf( __('Translation template is invalid (%s)','loco-translate'), $potfile->basename() ) );
69
  }
70
  // Only copy msgstr fields from source if it's a user-defined PO template and "copy translations" was selected.
71
- $strip = (bool) $post->strip;
72
- $translate = 'pot' !== $potfile->extension() && ! $strip;
 
 
 
 
 
 
 
 
73
  }
74
  // else extract POT from source code
75
  else {
@@ -90,12 +102,13 @@ class Loco_ajax_SyncController extends Loco_mvc_AjaxController {
90
  }
91
  // Have source strings. These cannot contain any translations.
92
  $source = $extr->includeMeta()->getTemplate($domain);
93
- $translate = false;
94
  }
95
 
96
  // establish on back end what strings will be added, removed, and which could be fuzzy-matches
97
  $matcher = new Loco_gettext_Matcher;
98
  $matcher->loadRefs($source,$translate);
 
 
99
  // Fuzzy matching only applies to syncing PO files. POT files will always do hard sync (add/remove)
100
  if( 'po' === $type ){
101
  $fuzziness = Loco_data_Settings::get()->fuzziness;
57
  $potfile = null;
58
  }
59
 
60
+ // defaults: no msgstr and no json
61
+ $translate = false;
62
+ $syncjsons = array();
63
+
64
  // Parse existing POT for source
65
  if( $potfile ){
66
  $this->set('pot', $potfile->basename() );
72
  throw new Loco_error_ParseException( sprintf( __('Translation template is invalid (%s)','loco-translate'), $potfile->basename() ) );
73
  }
74
  // Only copy msgstr fields from source if it's a user-defined PO template and "copy translations" was selected.
75
+ $opts = new Loco_gettext_SyncOptions( new LocoPoHeaders );
76
+ $opts->setSyncMode( $post->mode );
77
+ if( 'pot' !== $potfile->extension() ){
78
+ $translate = $opts->mergeMsgstr();
79
+ }
80
+ // related JSONs will only wor if source is a localized PO.
81
+ if( $opts->mergeJson() ){
82
+ $siblings = new Loco_fs_Siblings($potfile);
83
+ $syncjsons = $siblings->getJsons();
84
+ }
85
  }
86
  // else extract POT from source code
87
  else {
102
  }
103
  // Have source strings. These cannot contain any translations.
104
  $source = $extr->includeMeta()->getTemplate($domain);
 
105
  }
106
 
107
  // establish on back end what strings will be added, removed, and which could be fuzzy-matches
108
  $matcher = new Loco_gettext_Matcher;
109
  $matcher->loadRefs($source,$translate);
110
+ // merging JSONs must be done before fuzzy matching as it may add source strings
111
+ $matcher->loadJsons($syncjsons);
112
  // Fuzzy matching only applies to syncing PO files. POT files will always do hard sync (add/remove)
113
  if( 'po' === $type ){
114
  $fuzziness = Loco_data_Settings::get()->fuzziness;
src/api/Providers.php CHANGED
@@ -24,6 +24,7 @@ abstract class Loco_api_Providers {
24
  'id' => 'deepl',
25
  'name' => 'DeepL Translator',
26
  'key' => $settings->offsetGet('deepl_api_key'),
 
27
  ),
28
  array (
29
  'id' => 'google',
24
  'id' => 'deepl',
25
  'name' => 'DeepL Translator',
26
  'key' => $settings->offsetGet('deepl_api_key'),
27
+ 'url' => $settings->offsetGet('deepl_api_url'),
28
  ),
29
  array (
30
  'id' => 'google',
src/cli/FetchCommand.php CHANGED
@@ -158,7 +158,7 @@ abstract class Loco_cli_FetchCommand {
158
  $podata->clear();
159
  $stats = $matcher->merge($original,$podata);
160
  $original = null;
161
- if( ! $stats['add'] && ! $stats['del'] && ! $stats['fuz'] ){
162
  WP_CLI::log( sprintf('%s unchanged in "%s". Skipping %s', $project,$locale,$info->relpath) );
163
  continue;
164
  }
158
  $podata->clear();
159
  $stats = $matcher->merge($original,$podata);
160
  $original = null;
161
+ if( ! $stats['add'] && ! $stats['del'] && ! $stats['fuz'] && ! $stats['str'] ){
162
  WP_CLI::log( sprintf('%s unchanged in "%s". Skipping %s', $project,$locale,$info->relpath) );
163
  continue;
164
  }
src/cli/SyncCommand.php CHANGED
@@ -68,20 +68,17 @@ abstract class Loco_cli_SyncCommand {
68
  }
69
  // Check if PO defines alternative template (reference)
70
  $ref = $pot;
71
- $translate = true;
72
  $head = $def->getHeaders();
73
- if( $head->has('X-Loco-Template') ){
 
 
74
  $ref = null;
75
- $potfile = new Loco_fs_File( $head['X-Loco-Template'] );
76
  $potfile->normalize( $base_dir );
77
  if( $potfile->exists() ){
78
  try {
79
  Loco_cli_Utils::debug('> Parsing alternative template: %s',$potfile->getRelativePath($content_dir) );
80
  $ref = Loco_gettext_Data::fromSource( $potfile->getContents() );
81
- // Default sync behaviour is to copy msgstr fields unless in POT mode
82
- if( $head->has('X-Loco-Template-Mode') && 'POT' === $head['X-Loco-Template-Mode'] ){
83
- $translate = false;
84
- }
85
  }
86
  catch( Loco_error_ParseException $e ){
87
  WP_CLI::error( $e->getMessage().' in '.$potfile->getRelativePath($content_dir), false );
@@ -99,6 +96,14 @@ abstract class Loco_cli_SyncCommand {
99
  Loco_cli_Utils::debug('Merging %s <- %s', $pofile->basename(), $potfile->basename() );
100
  $matcher = new Loco_gettext_Matcher;
101
  $matcher->loadRefs($ref,$translate );
 
 
 
 
 
 
 
 
102
  // Get fuzzy matching tolerance from plugin settings, can be set temporarily in command line
103
  $fuzziness = Loco_data_Settings::get()->fuzziness;
104
  $matcher->setFuzziness( (string) $fuzziness );
68
  }
69
  // Check if PO defines alternative template (reference)
70
  $ref = $pot;
 
71
  $head = $def->getHeaders();
72
+ $opts = new Loco_gettext_SyncOptions($head);
73
+ $translate = $opts->mergeMsgstr();
74
+ if( $opts->hasTemplate() ){
75
  $ref = null;
76
+ $potfile = $opts->getTemplate();
77
  $potfile->normalize( $base_dir );
78
  if( $potfile->exists() ){
79
  try {
80
  Loco_cli_Utils::debug('> Parsing alternative template: %s',$potfile->getRelativePath($content_dir) );
81
  $ref = Loco_gettext_Data::fromSource( $potfile->getContents() );
 
 
 
 
82
  }
83
  catch( Loco_error_ParseException $e ){
84
  WP_CLI::error( $e->getMessage().' in '.$potfile->getRelativePath($content_dir), false );
96
  Loco_cli_Utils::debug('Merging %s <- %s', $pofile->basename(), $potfile->basename() );
97
  $matcher = new Loco_gettext_Matcher;
98
  $matcher->loadRefs($ref,$translate );
99
+ // Merge jsons if configured and available
100
+ if( $opts->mergeJson() ){
101
+ $siblings = new Loco_fs_Siblings($potfile);
102
+ $njson = $matcher->loadJsons( $siblings->getJsons() );
103
+ if( 0 !== $njson ){
104
+ Loco_cli_Utils::debug('> merged json files:%u', $njson );
105
+ }
106
+ }
107
  // Get fuzzy matching tolerance from plugin settings, can be set temporarily in command line
108
  $fuzziness = Loco_data_Settings::get()->fuzziness;
109
  $matcher->setFuzziness( (string) $fuzziness );
src/compat/PosixExtension.php CHANGED
@@ -59,7 +59,7 @@ abstract class Loco_compat_PosixExtension {
59
  public static function getuidViaTempDir(){
60
  $dir = get_temp_dir();
61
  if( 04000 & fileperms($dir) ){
62
- trigger_error( sprintf('%s directory has setuid bit, getuid may not be accurate'), E_USER_NOTICE );
63
  }
64
  $path = wp_tempnam( 'loco-sniff-'.time(), $dir );
65
  $uid = fileowner($path);
@@ -76,7 +76,7 @@ abstract class Loco_compat_PosixExtension {
76
  public static function getgidViaTempDir(){
77
  $dir = get_temp_dir();
78
  if( 02000 & fileperms($dir) ){
79
- trigger_error( sprintf('%s directory has setgid bit, getgid may not be accurate'), E_USER_NOTICE );
80
  }
81
  $path = wp_tempnam( 'loco-sniff-'.time(), $dir );
82
  $gid = filegroup($path);
@@ -92,9 +92,11 @@ abstract class Loco_compat_PosixExtension {
92
  * @return string
93
  */
94
  public static function getHttpdUser(){
95
- if( function_exists('posix_geteuid') ){
96
- $info = posix_getpwuid( posix_geteuid() );
97
- return $info['name'];
 
 
98
  }
99
  // @codeCoverageIgnoreStart
100
  foreach( array('apache','nginx') as $name ){
59
  public static function getuidViaTempDir(){
60
  $dir = get_temp_dir();
61
  if( 04000 & fileperms($dir) ){
62
+ trigger_error( sprintf('%s directory has setuid bit, getuid may not be accurate',basename($dir) ), E_USER_NOTICE );
63
  }
64
  $path = wp_tempnam( 'loco-sniff-'.time(), $dir );
65
  $uid = fileowner($path);
76
  public static function getgidViaTempDir(){
77
  $dir = get_temp_dir();
78
  if( 02000 & fileperms($dir) ){
79
+ trigger_error( sprintf('%s directory has setgid bit, getgid may not be accurate',basename($dir) ), E_USER_NOTICE );
80
  }
81
  $path = wp_tempnam( 'loco-sniff-'.time(), $dir );
82
  $gid = filegroup($path);
92
  * @return string
93
  */
94
  public static function getHttpdUser(){
95
+ if( function_exists('posix_getpwuid') ){
96
+ $info = posix_getpwuid( self::getuid() );
97
+ if( isset($info['name']) ){
98
+ return $info['name'];
99
+ }
100
  }
101
  // @codeCoverageIgnoreStart
102
  foreach( array('apache','nginx') as $name ){
src/data/Settings.php CHANGED
@@ -22,6 +22,7 @@
22
  * @property bool $ajax_files Whether to submit PO data as concrete files (requires Blob support in Ajax)
23
  *
24
  * @property string $deepl_api_key API key for DeepL Translator
 
25
  * @property string $google_api_key API key for Google Translate
26
  * @property string $yandex_api_key API key for Yandex.Translate
27
  * @property string $microsoft_api_key API key for Microsoft Translator text API
@@ -61,6 +62,7 @@ class Loco_data_Settings extends Loco_data_Serializable {
61
  'jed_clean' => false,
62
  'ajax_files' => true,
63
  'deepl_api_key' => '',
 
64
  'google_api_key' => '',
65
  'yandex_api_key' => '',
66
  'microsoft_api_key' => '',
22
  * @property bool $ajax_files Whether to submit PO data as concrete files (requires Blob support in Ajax)
23
  *
24
  * @property string $deepl_api_key API key for DeepL Translator
25
+ * @property string $deepl_api_url Base URL for DeepL Translator version
26
  * @property string $google_api_key API key for Google Translate
27
  * @property string $yandex_api_key API key for Yandex.Translate
28
  * @property string $microsoft_api_key API key for Microsoft Translator text API
62
  'jed_clean' => false,
63
  'ajax_files' => true,
64
  'deepl_api_key' => '',
65
+ 'deepl_api_url' => '',
66
  'google_api_key' => '',
67
  'yandex_api_key' => '',
68
  'microsoft_api_key' => '',
src/error/AdminNotices.php CHANGED
@@ -35,10 +35,10 @@ class Loco_error_AdminNotices extends Loco_hooks_Hookable {
35
  public static function add( Loco_error_Exception $error ){
36
  $notices = self::get();
37
  // if exception wasn't thrown we have to do some work to establish where it was invoked
38
- if( __FILE__ === $error->getFile() ){
39
  $error->setCallee(1);
40
  }
41
- // write error immediately under WP_CLIT
42
  if( 'cli' === PHP_SAPI && class_exists('WP_CLI',false) ){
43
  $error->logCli();
44
  return $error;
@@ -52,10 +52,8 @@ class Loco_error_AdminNotices extends Loco_hooks_Hookable {
52
  if( did_action('admin_notices') ){
53
  $notices->on_admin_notices();
54
  }
55
- // Log messages of minimum priority and up, depending on debug mode
56
- // note that non-debug level is in line with error_reporting set by WordPress (notices ignored)
57
- $priority = loco_debugging() ? Loco_error_Exception::LEVEL_DEBUG : Loco_error_Exception::LEVEL_WARNING;
58
- if( $error->getLevel() <= $priority ){
59
  $error->log();
60
  }
61
  return $error;
35
  public static function add( Loco_error_Exception $error ){
36
  $notices = self::get();
37
  // if exception wasn't thrown we have to do some work to establish where it was invoked
38
+ if( __FILE__ === $error->getRealFile() ){
39
  $error->setCallee(1);
40
  }
41
+ // write error immediately under WP_CLI
42
  if( 'cli' === PHP_SAPI && class_exists('WP_CLI',false) ){
43
  $error->logCli();
44
  return $error;
52
  if( did_action('admin_notices') ){
53
  $notices->on_admin_notices();
54
  }
55
+ // Log message automatically if enabled
56
+ if( $error->loggable() ){
 
 
57
  $error->log();
58
  }
59
  return $error;
src/error/Exception.php CHANGED
@@ -28,6 +28,12 @@ class Loco_error_Exception extends Exception implements JsonSerializable {
28
  */
29
  private $_line;
30
 
 
 
 
 
 
 
31
  /**
32
  * {@inheritdoc}
33
  */
@@ -65,7 +71,7 @@ class Loco_error_Exception extends Exception implements JsonSerializable {
65
  */
66
  public function getRealLine(){
67
  if( $this->_line ){
68
- return $this->getLine();
69
  }
70
  return $this->getRootException()->getLine();
71
  }
@@ -205,6 +211,32 @@ class Loco_error_Exception extends Exception implements JsonSerializable {
205
  return $e;
206
  }
207
  return new Loco_error_Exception( $e->getMessage(), $e->getCode(), $e );
208
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
209
 
210
  }
28
  */
29
  private $_line;
30
 
31
+ /**
32
+ * Whether log file writing is enabled
33
+ * @var bool
34
+ */
35
+ private $_log = true;
36
+
37
  /**
38
  * {@inheritdoc}
39
  */
71
  */
72
  public function getRealLine(){
73
  if( $this->_line ){
74
+ return $this->_line;
75
  }
76
  return $this->getRootException()->getLine();
77
  }
211
  return $e;
212
  }
213
  return new Loco_error_Exception( $e->getMessage(), $e->getCode(), $e );
214
+ }
215
+
216
+
217
+ /**
218
+ * Test if this error should be automatically logged
219
+ * @return bool
220
+ */
221
+ public function loggable(){
222
+ if( $this->_log ){
223
+ // Log messages of minimum priority and up, depending on debug mode
224
+ // note that non-debug level is in line with error_reporting set by WordPress (notices ignored)
225
+ $priority = loco_debugging() ? Loco_error_Exception::LEVEL_DEBUG : Loco_error_Exception::LEVEL_WARNING;
226
+ return $this->getLevel() <= $priority;
227
+ }
228
+ return false;
229
+ }
230
+
231
+
232
+ /**
233
+ * Suppress logging for this error. e.g if you want to warn in UI but don't want to pollute log files.
234
+ * @return self
235
+ */
236
+ public function noLog(){
237
+ $this->_log = false;
238
+ return $this;
239
+ }
240
+
241
 
242
  }
src/fs/Directory.php CHANGED
@@ -45,9 +45,7 @@ class Loco_fs_Directory extends Loco_fs_File {
45
  * @return Loco_fs_Directory
46
  */
47
  public function mkdir(){
48
- if( ! $this->exists() ){
49
- $this->getWriteContext()->mkdir();
50
- }
51
  return $this;
52
  }
53
 
45
  * @return Loco_fs_Directory
46
  */
47
  public function mkdir(){
48
+ $this->getWriteContext()->mkdir();
 
 
49
  return $this;
50
  }
51
 
src/fs/File.php CHANGED
@@ -618,13 +618,12 @@ class Loco_fs_File {
618
 
619
  /**
620
  * Ensure full parent directory tree exists
621
- * @return Loco_fs_Directory
622
  */
623
  public function createParent(){
624
- if( $dir = $this->getParent() ){
625
- if( ! $dir->exists() ){
626
- $dir->mkdir();
627
- }
628
  }
629
  return $dir;
630
  }
618
 
619
  /**
620
  * Ensure full parent directory tree exists
621
+ * @return Loco_fs_Directory|null
622
  */
623
  public function createParent(){
624
+ $dir = $this->getParent();
625
+ if( $dir instanceof Loco_fs_Directory && ! $dir->exists() ){
626
+ $dir->mkdir();
 
627
  }
628
  return $dir;
629
  }
src/fs/Siblings.php CHANGED
@@ -80,7 +80,7 @@ class Loco_fs_Siblings {
80
  * @return Loco_fs_File[]
81
  */
82
  public function getJsons(){
83
- $jsons = array();
84
  $name = $this->po->filename();
85
  $finder = new Loco_fs_FileFinder( $this->po->dirname() );
86
  // match .json files with same name as .po, plus hashed names
@@ -90,17 +90,17 @@ class Loco_fs_Siblings {
90
  foreach( $files as $file ){
91
  $match = $file->filename();
92
  if( $match === $name || preg_match($regex,$match) ) {
93
- $jsons[] = $file;
94
  }
95
  }
96
  }
97
  // append single json using our filter
98
  $path = apply_filters('loco_compile_single_json', '', $this->po->getPath() );
99
- if( is_string($path) && '' !== $path && file_exists($path) && ! in_array($path,$jsons) ){
100
- $jsons[] = $path;
101
  }
102
 
103
- return $jsons;
104
  }
105
 
106
  }
80
  * @return Loco_fs_File[]
81
  */
82
  public function getJsons(){
83
+ $list = new Loco_fs_FileList;
84
  $name = $this->po->filename();
85
  $finder = new Loco_fs_FileFinder( $this->po->dirname() );
86
  // match .json files with same name as .po, plus hashed names
90
  foreach( $files as $file ){
91
  $match = $file->filename();
92
  if( $match === $name || preg_match($regex,$match) ) {
93
+ $list->add($file);
94
  }
95
  }
96
  }
97
  // append single json using our filter
98
  $path = apply_filters('loco_compile_single_json', '', $this->po->getPath() );
99
+ if( is_string($path) && '' !== $path && file_exists($path) ){
100
+ $list->add( new Loco_fs_File($path) );
101
  }
102
 
103
+ return $list->getArrayCopy();
104
  }
105
 
106
  }
src/gettext/Compiler.php CHANGED
@@ -182,7 +182,7 @@ class Loco_gettext_Compiler {
182
  Loco_error_AdminNotices::debug( sprintf('Skipping JSON for %s; script not found in bundle',$ref) );
183
  }
184
  }
185
- // write all buffered fragments to their calculated JSON paths
186
  foreach( $buffer as $ref => $fragment ) {
187
  $jsonfile = $pofile->cloneJson($ref);
188
  try {
182
  Loco_error_AdminNotices::debug( sprintf('Skipping JSON for %s; script not found in bundle',$ref) );
183
  }
184
  }
185
+ // write all buffered fragments to their computed JSON paths
186
  foreach( $buffer as $ref => $fragment ) {
187
  $jsonfile = $pofile->cloneJson($ref);
188
  try {
src/gettext/Data.php CHANGED
@@ -50,15 +50,16 @@ class Loco_gettext_Data extends LocoPoIterator implements JsonSerializable {
50
  /**
51
  * Like load but just pulls header, saving a full parse. PO only
52
  * @param Loco_fs_File
53
- * @return Loco_gettext_Data
54
  * @throws InvalidArgumentException
55
  */
56
  public static function head( Loco_fs_File $file ){
57
  if( 'mo' === self::ext($file) ){
58
  throw new InvalidArgumentException('PO only');
59
  }
60
- $po = new LocoPoParser( $file->getContents() );
61
- return new Loco_gettext_Data( $po->parse(1) );
 
62
  }
63
 
64
 
50
  /**
51
  * Like load but just pulls header, saving a full parse. PO only
52
  * @param Loco_fs_File
53
+ * @return LocoPoHeaders
54
  * @throws InvalidArgumentException
55
  */
56
  public static function head( Loco_fs_File $file ){
57
  if( 'mo' === self::ext($file) ){
58
  throw new InvalidArgumentException('PO only');
59
  }
60
+ $p = new LocoPoParser( $file->getContents() );
61
+ $p->parse(0);
62
+ return $p->getHeader();
63
  }
64
 
65
 
src/gettext/Matcher.php CHANGED
@@ -8,7 +8,13 @@ class Loco_gettext_Matcher extends LocoFuzzyMatcher {
8
  * Whether copying translation from source references (normally for a POT we won't)
9
  * @var bool
10
  */
11
- private $translate = false;
 
 
 
 
 
 
12
 
13
 
14
  /**
@@ -20,6 +26,7 @@ class Loco_gettext_Matcher extends LocoFuzzyMatcher {
20
  public function loadRefs( Loco_gettext_Data $pot, $translate = false ){
21
  $ntotal = 0;
22
  $this->translate = (bool) $translate;
 
23
  /* @var LocoPoMessage $new */
24
  foreach( $pot as $new ){
25
  $ntotal++;
@@ -29,6 +36,113 @@ class Loco_gettext_Matcher extends LocoFuzzyMatcher {
29
  }
30
 
31
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  /**
33
  * Update still-valid sources, deferring unmatched (new strings) for deferred fuzzy match
34
  * @param LocoPoIterator Existing definitions
@@ -47,6 +161,10 @@ class Loco_gettext_Matcher extends LocoFuzzyMatcher {
47
  $p->merge($new,$translate);
48
  $merged->push($p);
49
  $valid[] = $p->getKey();
 
 
 
 
50
  }
51
  }
52
  return $valid;
@@ -113,7 +231,24 @@ class Loco_gettext_Matcher extends LocoFuzzyMatcher {
113
  'add' => $added,
114
  'fuz' => $fuzzy,
115
  'del' => $dropped,
 
116
  );
117
  }
118
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
119
  }
8
  * Whether copying translation from source references (normally for a POT we won't)
9
  * @var bool
10
  */
11
+ private $translate;
12
+
13
+ /**
14
+ * Number of translations pulled from source (when source is PO)
15
+ * @var int
16
+ */
17
+ private $translated;
18
 
19
 
20
  /**
26
  public function loadRefs( Loco_gettext_Data $pot, $translate = false ){
27
  $ntotal = 0;
28
  $this->translate = (bool) $translate;
29
+ $this->translated = 0;
30
  /* @var LocoPoMessage $new */
31
  foreach( $pot as $new ){
32
  $ntotal++;
36
  }
37
 
38
 
39
+ /**
40
+ * Add further source strings from JSON/JED file
41
+ * @param Loco_fs_File json file
42
+ * @return int
43
+ */
44
+ public function loadJson( Loco_fs_File $file ){
45
+ $unique = 0;
46
+ $jed = json_decode( $file->getContents(), true );
47
+ if( ! is_array($jed) || ! array_key_exists('locale_data',$jed) || ! is_array($jed['locale_data']) ){
48
+ throw new Loco_error_Debug( $file->basename().' is not JED formatted');
49
+ }
50
+ // Without a file reference strings will never be compiled back to the correct JSON.
51
+ // JSON files will not contain full line references, but we may know the file at least
52
+ if( ! array_key_exists('source',$jed) || ! $jed['source'] ){
53
+ throw new Loco_error_Debug( $file->basename().' has no "source" key');
54
+ }
55
+ $ref = $jed['source'];
56
+ // not checking domain key. Should be valid if passed here and should only be one.
57
+ foreach( $jed['locale_data'] as $domain => $keys ){
58
+ foreach( $keys as $msgid => $arr ){
59
+ if( '' === $msgid || ! is_array($arr) || ! isset($arr[0]) ){
60
+ continue;
61
+ }
62
+ $msgctxt = '';
63
+ // Unglue "msgctxt\4msgid" unique key
64
+ $parts = explode("\4",$msgid,2);
65
+ if( array_key_exists(1,$parts) ){
66
+ list($msgctxt,$msgid) = $parts;
67
+ // TODO handle empty msgid case that uses weird "msgctxt\4(msgctxt)" format?
68
+ }
69
+ // string may exist in original template, and also in multiple JSONs.
70
+ $new = array('source'=>$msgid,'context'=>$msgctxt,'refs'=>$ref );
71
+ $old = $this->getArrayRef($new);
72
+ if( $old ){
73
+ $refs = array_key_exists('refs',$old) ? (string) $old['refs'] : '';
74
+ if( '' === $refs ){
75
+ $old['refs'] = $ref;
76
+ }
77
+ else if( 0 === preg_match('/\\b'.preg_quote($ref,'/').'\\b/',$refs) ){
78
+ $old['refs'].= ' '.$ref;
79
+ }
80
+ $new = $old;
81
+ }
82
+ else {
83
+ $unique++;
84
+ }
85
+ // Add translation from JSON only if not present in merged PO already
86
+ if( $this->translate && ( ! array_key_exists('target',$new) || '' === $new['target'] ) ){
87
+ $new['target'] = $arr[0];
88
+ }
89
+ $message = new LocoPoMessage($new);
90
+ $this->add($message);
91
+ // handle plurals, noting that msgid_plural is not stored in JED structure
92
+ if( 1 < count($arr) ){
93
+ $index = 0;
94
+ $plurals = $old && array_key_exists('plurals',$old) ? $old['plurals'] : array();
95
+ while( array_key_exists(++$index,$arr) ){
96
+ if( array_key_exists($index,$plurals) ){
97
+ $raw = $plurals[$index];
98
+ if( $raw instanceof ArrayObject ){
99
+ $raw = $raw->getArrayCopy();
100
+ }
101
+ }
102
+ else {
103
+ $raw = array('source'=>'','target'=>'');
104
+ }
105
+ if( $this->translate && ( ! array_key_exists('target',$raw) || '' === $raw['target'] ) ){
106
+ $raw['target'] = $arr[$index];
107
+ }
108
+ // use translation as missing msgid_plural only if msgid matches msgstr (English file)
109
+ if( 1 === $index && '' === $raw['source'] ){
110
+ if( $arr[0] === $msgid ){
111
+ $raw['source'] = $arr[1];
112
+ }
113
+ /*else {
114
+ Loco_error_AdminNotices::debug('msgid_plural missing for msgid '.json_encode($msgid) );
115
+ }*/
116
+ }
117
+ $plurals[$index] = new LocoPoMessage($raw);
118
+ }
119
+ $message['plurals'] = $plurals;
120
+ }
121
+ }
122
+ }
123
+ return $unique;
124
+ }
125
+
126
+
127
+ /**
128
+ * Shortcut for loading multiple jsons with error tolerance
129
+ * @param Loco_fs_File[]
130
+ * @return int
131
+ */
132
+ public function loadJsons( array $jsons ){
133
+ $n = 0;
134
+ foreach( $jsons as $jsonfile ){
135
+ try {
136
+ $n += $this->loadJson($jsonfile);
137
+ }
138
+ catch( Loco_error_Exception $e ){
139
+ Loco_error_AdminNotices::add($e);
140
+ }
141
+ }
142
+ return $n;
143
+ }
144
+
145
+
146
  /**
147
  * Update still-valid sources, deferring unmatched (new strings) for deferred fuzzy match
148
  * @param LocoPoIterator Existing definitions
161
  $p->merge($new,$translate);
162
  $merged->push($p);
163
  $valid[] = $p->getKey();
164
+ // increment counter if translation was merged
165
+ if( $translate && ! $old->translated() ){
166
+ $this->translated += $new->translated();
167
+ }
168
  }
169
  }
170
  return $valid;
231
  'add' => $added,
232
  'fuz' => $fuzzy,
233
  'del' => $dropped,
234
+ 'trn' => $this->translated,
235
  );
236
  }
237
 
238
+
239
+ /**
240
+ * @param array
241
+ * @return array
242
+ */
243
+ private function getArrayRef( array $a ){
244
+ $r = $this->getRef($a);
245
+ if( is_null($r) ){
246
+ return array();
247
+ }
248
+ if( $r instanceof ArrayObject ){
249
+ return $r->getArrayCopy();
250
+ }
251
+ throw new Exception( (is_object($r)?get_class($r):gettype($r) ).' returned from '.get_class($this).'::getRef');
252
+ }
253
+
254
  }
src/gettext/SyncOptions.php ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Abstracts PO sync options held in custom headers
4
+ */
5
+ class Loco_gettext_SyncOptions {
6
+
7
+ /**
8
+ * @var LocoPoHeaders
9
+ */
10
+ private $head;
11
+
12
+
13
+ public function __construct( LocoPoHeaders $head ){
14
+ $this->head = $head;
15
+ }
16
+
17
+
18
+ /**
19
+ * Test if PO file has alternative template path
20
+ * @return bool
21
+ */
22
+ public function hasTemplate(){
23
+ return '' !== $this->head->trimmed('X-Loco-Template');
24
+ }
25
+
26
+
27
+ /**
28
+ * Get *relative* path to alternative template path.
29
+ * @return Loco_fs_LocaleFile
30
+ */
31
+ public function getTemplate(){
32
+ return new Loco_fs_LocaleFile( $this->head['X-Loco-Template'] );
33
+ }
34
+
35
+
36
+ /**
37
+ * Set *relative* path to alternative template path.
38
+ * @param string
39
+ */
40
+ public function setTemplate( $path ){
41
+ $this->head['X-Loco-Template'] = (string) $path;
42
+ }
43
+
44
+
45
+ /**
46
+ * Test if translations (msgstr fields) are to be merged.
47
+ *
48
+ * @return bool
49
+ */
50
+ public function mergeMsgstr(){
51
+ return 0 === preg_match( '/\\bpot\\b/', $this->getSyncMode() );
52
+ }
53
+
54
+
55
+ /**
56
+ * Test if JSON files are to be merged.
57
+ * @return bool
58
+ */
59
+ public function mergeJson(){
60
+ return 1 === preg_match( '/\\bjson\\b/', $this->getSyncMode() );
61
+ }
62
+
63
+
64
+ /**
65
+ * @return string
66
+ */
67
+ public function getSyncMode(){
68
+ $mode = strtolower( $this->head->trimmed('X-Loco-Template-Mode') );
69
+ // Default sync mode when undefined is to honour the type of source.
70
+ // i.e. for legacy compatibility, copy msgstr fields if source is a PO file.
71
+ if( '' === $mode ){
72
+ $mode = $this->hasTemplate() ? strtolower( $this->getTemplate()->extension() ) : 'pot';
73
+ }
74
+ return $mode;
75
+ }
76
+
77
+
78
+ /**
79
+ * @param string
80
+ */
81
+ public function setSyncMode( $mode ){
82
+ $this->head['X-Loco-Template-Mode'] = (string) $mode;
83
+ }
84
+
85
+
86
+ /**
87
+ * Remove redundant headers
88
+ * @return LocoPoHeaders
89
+ */
90
+ public function getHeaders(){
91
+ if( ! $this->hasTemplate() ){
92
+ $this->head->offsetUnset('X-Loco-Template');
93
+ if( 'pot' === $this->getSyncMode() ){
94
+ $this->head->offsetUnset('X-Loco-Template-Mode');
95
+ }
96
+ }
97
+ return $this->head;
98
+ }
99
+
100
+ }
src/hooks/LoadHelper.php CHANGED
@@ -1,4 +1,4 @@
1
- <?php /** @noinspection PhpUnusedParameterInspection */
2
 
3
  /**
4
  * Text Domain loading helper.
@@ -206,6 +206,7 @@ class Loco_hooks_LoadHelper extends Loco_hooks_Hookable {
206
  * @param string path relating to given JSON (not used here)
207
  * @param string script handle for registered merge
208
  * @return string final JSON translations
 
209
  */
210
  public function filter_load_script_translations( $json = '', $path = '', $handle = '' ){
211
  if( array_key_exists($handle,$this->json) ){
1
+ <?php
2
 
3
  /**
4
  * Text Domain loading helper.
206
  * @param string path relating to given JSON (not used here)
207
  * @param string script handle for registered merge
208
  * @return string final JSON translations
209
+ * @noinspection PhpUnusedParameterInspection
210
  */
211
  public function filter_load_script_translations( $json = '', $path = '', $handle = '' ){
212
  if( array_key_exists($handle,$this->json) ){
src/js/Strings.php CHANGED
@@ -32,6 +32,10 @@ class Loco_js_Strings extends Loco_hooks_TranslateBuffer {
32
  * xgettext: javascript-format */
33
  _n("%s string marked Fuzzy","%s strings marked Fuzzy",0,'loco-translate');
34
 
 
 
 
 
35
  /* Message appears after sync operation, where %s refers to a POT file.
36
  * xgettext: javascript-format */
37
  __("Strings up to date with %s",'loco-translate');
32
  * xgettext: javascript-format */
33
  _n("%s string marked Fuzzy","%s strings marked Fuzzy",0,'loco-translate');
34
 
35
+ /* Summary of translations copied from a PO file during Sync
36
+ * xgettext: javascript-format */
37
+ _n("%s translation copied","%s translations copied",0,'loco-translate');
38
+
39
  /* Message appears after sync operation, where %s refers to a POT file.
40
  * xgettext: javascript-format */
41
  __("Strings up to date with %s",'loco-translate');
src/mvc/AdminController.php CHANGED
@@ -119,7 +119,7 @@ abstract class Loco_mvc_AdminController extends Loco_mvc_Controller {
119
  /**
120
  * "update_footer" filter, prints Loco version number in admin footer
121
  */
122
- public function filter_update_footer( $text ){
123
  $html = sprintf( '<span>v%s</span>', loco_plugin_version() );
124
  if( $this->bench && ( $info = $this->get('_debug') ) ){
125
  $html .= sprintf('<span>%ss</span>', number_format_i18n($info['time'],2) );
@@ -219,6 +219,11 @@ abstract class Loco_mvc_AdminController extends Loco_mvc_Controller {
219
  $tag = apply_filters( 'plugin_locale', get_locale(), 'loco-translate' );
220
  $jsConf->offsetSet('wplang', Loco_Locale::parse($tag) );
221
  }
 
 
 
 
 
222
  }
223
  // take benchmark for debugger to be rendered in footer
224
  if( $this->bench ){
119
  /**
120
  * "update_footer" filter, prints Loco version number in admin footer
121
  */
122
+ public function filter_update_footer( /*$text*/ ){
123
  $html = sprintf( '<span>v%s</span>', loco_plugin_version() );
124
  if( $this->bench && ( $info = $this->get('_debug') ) ){
125
  $html .= sprintf('<span>%ss</span>', number_format_i18n($info['time'],2) );
219
  $tag = apply_filters( 'plugin_locale', get_locale(), 'loco-translate' );
220
  $jsConf->offsetSet('wplang', Loco_Locale::parse($tag) );
221
  }
222
+ // localized formatting from core translations
223
+ global $wp_locale;
224
+ if( is_object($wp_locale) && property_exists($wp_locale,'number_format') ){
225
+ $jsConf->offsetSet('wpnum', array_map(array($this,'filter_number_format_i18n'),$wp_locale->number_format) );
226
+ }
227
  }
228
  // take benchmark for debugger to be rendered in footer
229
  if( $this->bench ){
src/mvc/AdminRouter.php CHANGED
@@ -201,6 +201,7 @@ class Loco_mvc_AdminRouter extends Loco_hooks_Hookable {
201
  '{type}-file-view' => 'file_View',
202
  '{type}-file-edit' => 'file_Edit',
203
  '{type}-file-info' => 'file_Info',
 
204
  '{type}-file-diff' => 'file_Diff',
205
  '{type}-file-move' => 'file_Move',
206
  '{type}-file-delete' => 'file_Delete',
201
  '{type}-file-view' => 'file_View',
202
  '{type}-file-edit' => 'file_Edit',
203
  '{type}-file-info' => 'file_Info',
204
+ '{type}-file-head' => 'file_Head',
205
  '{type}-file-diff' => 'file_Diff',
206
  '{type}-file-move' => 'file_Move',
207
  '{type}-file-delete' => 'file_Delete',
src/mvc/Controller.php CHANGED
@@ -114,4 +114,13 @@ abstract class Loco_mvc_Controller extends Loco_hooks_Hookable {
114
  }
115
 
116
 
 
 
 
 
 
 
 
 
 
117
  }
114
  }
115
 
116
 
117
+ /**
118
+ * number_format_i18n filter callback because our admin screens assume number_format_i18n() returns unescaped text, not HTML.
119
+ * @param string
120
+ * @return string
121
+ */
122
+ public function filter_number_format_i18n( $formatted = '' ){
123
+ return html_entity_decode($formatted,ENT_NOQUOTES,'UTF-8');
124
+ }
125
+
126
  }
src/mvc/FileParams.php CHANGED
@@ -142,7 +142,7 @@ class Loco_mvc_FileParams extends Loco_mvc_ViewParams {
142
  $time_diff = time() - $time;
143
  // use same time format as posts listing when in future or more than a day ago
144
  if( $time_diff < 0 || $time_diff >= 86400 ){
145
- return date_i18n( __('Y/m/d','default'), $time );
146
  }
147
  if( $time_diff < 30 ){
148
  // translators: relative time when something happened in the last 30 seconds
142
  $time_diff = time() - $time;
143
  // use same time format as posts listing when in future or more than a day ago
144
  if( $time_diff < 0 || $time_diff >= 86400 ){
145
+ return Loco_mvc_ViewParams::date_i18n( $time, __('Y/m/d','default') );
146
  }
147
  if( $time_diff < 30 ){
148
  // translators: relative time when something happened in the last 30 seconds
src/mvc/ViewParams.php CHANGED
@@ -17,27 +17,35 @@ class Loco_mvc_ViewParams extends ArrayObject implements JsonSerializable {
17
  /**
18
  * format integer as string date, including time according to user settings
19
  * @param int unix timestamp
20
- * @param string date format
21
  * @return string
22
  */
23
  public static function date_i18n( $u, $f = null ){
24
  static $tf, $df, $tz;
25
  if( is_null($f) ){
26
- if( ! $tf ){
27
  $tf = get_option('time_format') or $tf = 'g:i A';
28
  $df = get_option('date_format') or $df= 'M jS Y';
29
  }
30
  $f = $df.' '.$tf;
31
  }
32
- // Fix Wordpress's broken timezone implementation
 
 
 
 
33
  if( is_null($tz) ){
34
- $tz = date_default_timezone_get() or $tz = 'UTC';
35
- $wp = get_option('timezone_string') or $wp = $tz;
36
- if( $tz !== $wp ){
37
- date_default_timezone_set( $wp );
 
 
38
  }
39
  }
40
- return date_i18n( $f, $u );
 
 
41
  }
42
 
43
 
@@ -85,13 +93,10 @@ class Loco_mvc_ViewParams extends ArrayObject implements JsonSerializable {
85
  * @return string empty string
86
  */
87
  public function date( $p, $f = null ){
88
- if( $u = $this->__get($p) ){
89
- $s = self::date_i18n( $u, $f );
90
- }
91
- else {
92
- $s = '';
93
  }
94
- echo $this->escape($s);
95
  return '';
96
  }
97
 
17
  /**
18
  * format integer as string date, including time according to user settings
19
  * @param int unix timestamp
20
+ * @param string|null date format
21
  * @return string
22
  */
23
  public static function date_i18n( $u, $f = null ){
24
  static $tf, $df, $tz;
25
  if( is_null($f) ){
26
+ if( is_null($tf) ){
27
  $tf = get_option('time_format') or $tf = 'g:i A';
28
  $df = get_option('date_format') or $df= 'M jS Y';
29
  }
30
  $f = $df.' '.$tf;
31
  }
32
+ // date_i18n was replaced with wp_date in WP 5.3
33
+ if( function_exists('wp_date') ){
34
+ return wp_date($f,$u);
35
+ }
36
+ // date_i18n expects timestamp to include offset
37
  if( is_null($tz) ){
38
+ try {
39
+ $wp = get_option('timezone_string') or $wp = date_default_timezone_get();
40
+ $tz = new DateTimeZone($wp);
41
+ }
42
+ catch( Exception $e ){
43
+ $tz = new DateTimeZone('UTC');
44
  }
45
  }
46
+ $d = new DateTime(null,$tz);
47
+ $d->setTimestamp($u);
48
+ return date_i18n( $f, $u + $d->getOffset() );
49
  }
50
 
51
 
93
  * @return string empty string
94
  */
95
  public function date( $p, $f = null ){
96
+ $u = (int) $this->__get($p);
97
+ if( $u > 0 ){
98
+ echo $this->escape( self::date_i18n($u,$f) );
 
 
99
  }
 
100
  return '';
101
  }
102
 
src/test/WordPressTestCase.php CHANGED
@@ -433,7 +433,7 @@ abstract class Loco_test_WordPressTestCase extends WP_UnitTestCase {
433
 
434
  public static function filter_allows_fake_plugins_to_exist( array $data, $handle ){
435
  $file = LOCO_TEST_DATA_ROOT.'/plugins/'.$handle;
436
- if( file_exists($file) ) {
437
  $data = get_plugin_data($file);
438
  $snip = -strlen($handle);
439
  $data['basedir'] = substr($file,0,--$snip);
433
 
434
  public static function filter_allows_fake_plugins_to_exist( array $data, $handle ){
435
  $file = LOCO_TEST_DATA_ROOT.'/plugins/'.$handle;
436
+ if( file_exists($file) && is_file($file) ) {
437
  $data = get_plugin_data($file);
438
  $snip = -strlen($handle);
439
  $data['basedir'] = substr($file,0,--$snip);
tpl/admin/config/apis.php CHANGED
@@ -29,6 +29,12 @@ $help = apply_filters('loco_external','https://localise.biz/wordpress/plugin/man
29
  </label>
30
  <input type="text" size="50" name="api[deepl][key]" id="loco--deepl_api_key" value="<?php $api->e('key')?>" spellcheck="false" />
31
  </p>
 
 
 
 
 
 
32
  <p>
33
  <span class="description"><a href="https://www.deepl.com/translator" target="_blank" tabindex="-1">https://www.deepl.com/translator</a></span>
34
  </p>
29
  </label>
30
  <input type="text" size="50" name="api[deepl][key]" id="loco--deepl_api_key" value="<?php $api->e('key')?>" spellcheck="false" />
31
  </p>
32
+ <p>
33
+ <label for="loco--deepl_api_url">
34
+ <?php $ui->e('api_url')?>:
35
+ </label>
36
+ <input type="text" size="50" name="api[deepl][url]" id="loco--deepl_api_url" value="<?php $api->e('url')?>" spellcheck="false" placeholder="https://api.deepl.com" />
37
+ </p>
38
  <p>
39
  <span class="description"><a href="https://www.deepl.com/translator" target="_blank" tabindex="-1">https://www.deepl.com/translator</a></span>
40
  </p>
tpl/admin/file/conf.php ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * PO file options form
4
+ */
5
+ $this->extend('../layout');
6
+ /* @var Loco_gettext_SyncOptions $conf */
7
+ /* @var Loco_mvc_ViewParams $params */
8
+ ?>
9
+
10
+ <div class="panel">
11
+ <h3>
12
+ <?php esc_html_e('Template options','loco-translate')?>
13
+ </h3>
14
+
15
+ <form action="" method="post" enctype="application/x-www-form-urlencoded" id="loco-main"><?php
16
+ /* @var Loco_mvc_HiddenFields $hidden */
17
+ $hidden->_e();?>
18
+
19
+ <table class="form-table">
20
+ <tbody>
21
+ <tr valign="top" class="compact">
22
+ <td>
23
+ <label for="loco-conf-template">Relative path to template file:</label><br />
24
+ <input type="text" name="conf[template]" value="<?php self::e( (string) $conf->getTemplate() )?>" size="100" id="loco-conf-template" />
25
+ </td>
26
+ </tr>
27
+ <tr valign="top" class="compact">
28
+ <td>
29
+ <p>
30
+ <label>
31
+ <input type="radio" name="conf[mode]" value="po" <?php echo $conf->mergeMsgstr()?'checked ':''?>/>
32
+ <?php $params->f('potName', __('Copy target translations from "%s"','loco-translate') )?>
33
+ </label>
34
+ </p>
35
+ <p>
36
+ <label>
37
+ <input type="radio" name="conf[mode]" value="pot" <?php echo $conf->mergeMsgstr()?'':'checked '?>/>
38
+ <?php esc_html_e('Just copy English source strings','loco-translate')?>
39
+ </label>
40
+ </p>
41
+ </td>
42
+ </tr>
43
+ <tr valign="top" class="compact">
44
+ <td>
45
+ <p>
46
+ <label>
47
+ <input type="checkbox" name="conf[json]" value="1" <?php echo $conf->mergeJson()?'checked ':''?>/>
48
+ <?php esc_html_e('Merge strings from related JSON files','loco-translate')?>
49
+ </label>
50
+ </p>
51
+ </td>
52
+ </tr>
53
+ </tbody>
54
+ </table>
55
+
56
+ <p class="submit">
57
+ <button type="submit" class="button button-primary" disabled><?php esc_html_e('Save','loco-translate')?></button>
58
+ <a href="<?php $params->e('advanced')?>" class="button button-link"><?php esc_html_e('Advanced','loco-translate')?></a>
59
+ </p>
60
+
61
+ </form>
62
+
63
+ </div>
tpl/admin/file/head.php ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * PO/POT headers form
4
+ */
5
+ $this->extend('../layout');
6
+ ?>
7
+
8
+ <div class="panel">
9
+ <h3>
10
+ Edit file headers:
11
+ </h3>
12
+
13
+ <form action="" method="post" enctype="application/x-www-form-urlencoded" id="loco-main"><?php
14
+ /* @var Loco_mvc_HiddenFields $hidden */
15
+ $hidden->_e();?>
16
+
17
+ <table class="form-table">
18
+ <tbody><?php
19
+ /* @var LocoPoHeaders $head */
20
+ foreach( $head as $key => $value ): if( preg_match('/^[-A-Za-z]+$/',$key) ):?>
21
+ <tr>
22
+ <th scope="row">
23
+ <label for="loco-header-<?php echo $key?>"><?php echo $key?></label>
24
+ </th>
25
+ <td>
26
+ <input type="text" name="headers[<?php echo $key?>]" value="<?php self::e($value) ?>" size="100" id="loco-header-<?php echo $key?>" />
27
+ </td>
28
+ </tr><?php
29
+ endif; endforeach;?>
30
+ </tbody>
31
+ </table>
32
+
33
+ <p class="submit">
34
+ <button type="submit" class="button button-primary" disabled><?php esc_html_e('Save','loco-translate')?></button>
35
+ </p>
36
+
37
+ </form>
38
+
39
+ </div>
tpl/admin/file/info-po.php CHANGED
@@ -11,6 +11,7 @@ $this->start('header');
11
 
12
  <div class="notice inline notice-info">
13
  <nav>
 
14
  <a class="icon only-icon icon-download" title="Download" href="<?php $file->e('download')?>"><span>download</span></a>
15
  </nav>
16
  <h3>
11
 
12
  <div class="notice inline notice-info">
13
  <nav>
14
+ <a class="icon only-icon icon-cog" title="Configure" href="<?php $file->e('configure')?>"><span>configure</span></a>
15
  <a class="icon only-icon icon-download" title="Download" href="<?php $file->e('download')?>"><span>download</span></a>
16
  </nav>
17
  <h3>
tpl/admin/init/init-po.php CHANGED
@@ -132,7 +132,7 @@ $this->extend('../layout');
132
  if( $params->has('sourceLocale') ):?>
133
  <tbody>
134
  <tr valign="top">
135
- <th scope="row" rowspan="3">
136
  3. <?php esc_html_e('Template options','loco-translate')?>:
137
  </th>
138
  <td>
@@ -154,13 +154,23 @@ $this->extend('../layout');
154
  </label>
155
  </p>
156
  </td>
157
- </tr>
 
 
 
 
 
 
 
 
 
 
158
  <tr valign="top" class="compact">
159
  <td>
160
  <p>
161
  <label>
162
  <input type="checkbox" name="link" value="1" />
163
- <?php esc_html_e('Use this file as template when running Sync','loco-translate')?>
164
  </label>
165
  </p>
166
  </td>
132
  if( $params->has('sourceLocale') ):?>
133
  <tbody>
134
  <tr valign="top">
135
+ <th scope="row" rowspan="4">
136
  3. <?php esc_html_e('Template options','loco-translate')?>:
137
  </th>
138
  <td>
154
  </label>
155
  </p>
156
  </td>
157
+ </tr>
158
+ <tr valign="top" class="compact">
159
+ <td>
160
+ <p>
161
+ <label>
162
+ <input type="checkbox" name="json" value="1" />
163
+ <?php esc_html_e('Merge strings from related JSON files','loco-translate')?>
164
+ </label>
165
+ </p>
166
+ </td>
167
+ </tr>
168
  <tr valign="top" class="compact">
169
  <td>
170
  <p>
171
  <label>
172
  <input type="checkbox" name="link" value="1" />
173
+ <?php esc_html_e('Use this file as template when running Sync','loco-translate')?>
174
  </label>
175
  </p>
176
  </td>