@k-int/stripes-kint-components 2.2.0 → 2.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (274) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/es/index.js +125 -9
  3. package/es/lib/ActionList/ActionList.js +8 -33
  4. package/es/lib/ActionList/ActionListFieldArray.js +50 -49
  5. package/es/lib/ActionList/index.js +1 -5
  6. package/es/lib/CustomProperties/Config/CustomPropertiesLookup.js +1 -35
  7. package/es/lib/CustomProperties/Config/CustomPropertiesSettings.js +3 -39
  8. package/es/lib/CustomProperties/Config/CustomPropertyForm.js +1 -34
  9. package/es/lib/CustomProperties/Config/{CustomPropertiesView.js → CustomPropertyView.js} +4 -33
  10. package/es/lib/CustomProperties/Config/index.js +7 -9
  11. package/es/lib/CustomProperties/Edit/CustomPropertiesEdit.js +43 -0
  12. package/es/lib/CustomProperties/Edit/CustomPropertiesEditCtx.js +100 -0
  13. package/es/lib/CustomProperties/Edit/CustomPropertiesListField.js +243 -0
  14. package/es/lib/CustomProperties/Edit/CustomPropertyField.js +337 -0
  15. package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.js +127 -0
  16. package/es/lib/CustomProperties/Edit/index.js +47 -0
  17. package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.js +183 -0
  18. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.js +204 -0
  19. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js +126 -0
  20. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.js +90 -0
  21. package/es/lib/CustomProperties/Filter/CustomPropertiesRule.js +139 -0
  22. package/es/lib/CustomProperties/Filter/index.js +55 -0
  23. package/es/lib/CustomProperties/Filter/useOperators.js +100 -0
  24. package/es/lib/CustomProperties/Filter/useParseActiveFilterStrings.js +64 -0
  25. package/es/lib/CustomProperties/Filter/useValueProps.js +67 -0
  26. package/es/lib/CustomProperties/View/CustomPropertiesView.js +44 -0
  27. package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.js +155 -0
  28. package/es/lib/CustomProperties/View/CustomPropertyCard.js +175 -0
  29. package/es/lib/CustomProperties/View/index.js +31 -0
  30. package/es/lib/CustomProperties/index.js +121 -0
  31. package/es/lib/EditableRefdataList/EditableRefdataList.js +13 -51
  32. package/es/lib/EditableRefdataList/index.js +1 -5
  33. package/es/lib/EditableSettingsList/EditableSettingsList.js +1 -30
  34. package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.js +1 -30
  35. package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.test.js +1 -30
  36. package/es/lib/EditableSettingsList/SettingField/EditSettingValue.js +1 -34
  37. package/es/lib/EditableSettingsList/SettingField/EditSettingValue.test.js +1 -34
  38. package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.js +1 -34
  39. package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.test.js +1 -41
  40. package/es/lib/EditableSettingsList/SettingField/SettingField.js +1 -34
  41. package/es/lib/EditableSettingsList/SettingField/SettingField.test.js +1 -30
  42. package/es/lib/EditableSettingsList/SettingField/index.js +1 -5
  43. package/es/lib/EditableSettingsList/index.js +1 -5
  44. package/es/lib/FormModal/FormModal.js +21 -34
  45. package/es/lib/FormModal/index.js +1 -5
  46. package/es/lib/NoResultsMessage/NoResultsMessage.js +1 -30
  47. package/es/lib/NoResultsMessage/index.js +1 -5
  48. package/es/lib/QueryTypedown/QueryTypedown.js +9 -37
  49. package/es/lib/QueryTypedown/index.js +1 -5
  50. package/es/lib/RefdataButtons/RefdataButtons.js +1 -34
  51. package/es/lib/RefdataButtons/index.js +1 -5
  52. package/es/lib/SASQLookupComponent/SASQLookupComponent.js +1 -34
  53. package/es/lib/SASQLookupComponent/index.js +1 -5
  54. package/es/lib/SASQRoute/SASQRoute.js +1 -30
  55. package/es/lib/SASQRoute/index.js +1 -5
  56. package/es/lib/SASQViewComponent/SASQViewComponent.js +1 -34
  57. package/es/lib/SASQViewComponent/index.js +1 -5
  58. package/es/lib/SearchField/SearchField.js +1 -31
  59. package/es/lib/SearchField/index.js +1 -5
  60. package/es/lib/SettingPage/SettingPage.js +1 -34
  61. package/es/lib/SettingPage/SettingPagePane.js +1 -32
  62. package/es/lib/SettingPage/index.js +1 -5
  63. package/es/lib/Typedown/Typedown.js +1 -34
  64. package/es/lib/Typedown/index.js +1 -5
  65. package/es/lib/constants/customProperties.js +3 -37
  66. package/es/lib/constants/eventCodes.js +1 -31
  67. package/es/lib/contexts/SettingsContext.js +1 -30
  68. package/es/lib/contexts/index.js +1 -5
  69. package/es/lib/hooks/index.js +16 -4
  70. package/es/lib/hooks/settingsHooks/index.js +1 -5
  71. package/es/lib/hooks/settingsHooks/useSettingSection.js +1 -34
  72. package/es/lib/hooks/settingsHooks/useSettings.js +1 -36
  73. package/es/lib/hooks/typedownHooks/index.js +1 -5
  74. package/es/lib/hooks/typedownHooks/useTypedown.js +1 -34
  75. package/es/lib/hooks/typedownHooks/useTypedownData.js +9 -35
  76. package/es/lib/hooks/typedownHooks/useTypedownToggle.js +1 -34
  77. package/es/lib/hooks/useActiveElement.js +1 -32
  78. package/es/lib/hooks/useAvailableCustomProperties.js +73 -0
  79. package/es/lib/hooks/useCustomProperties.js +1 -34
  80. package/es/lib/hooks/useHelperApp.js +1 -34
  81. package/es/lib/hooks/useInvalidateRefdata.js +20 -0
  82. package/es/lib/hooks/useKiwtFieldArray.js +1 -34
  83. package/es/lib/hooks/useKiwtSASQuery.js +1 -35
  84. package/es/lib/hooks/useLocalStorageState.js +1 -34
  85. package/es/lib/hooks/useMutateCustomProperties.js +1 -34
  86. package/es/lib/hooks/useMutateRefdataValue.js +10 -38
  87. package/es/lib/hooks/useQIndex.js +1 -34
  88. package/es/lib/hooks/useRefdata.js +2 -37
  89. package/es/lib/hooks/useTemplates.js +1 -34
  90. package/es/lib/utils/buildUrl.js +2 -31
  91. package/es/lib/utils/generateKiwtQuery.js +1 -30
  92. package/es/lib/utils/generateKiwtQueryParams.js +1 -30
  93. package/es/lib/utils/groupCustomPropertiesByCtx.js +41 -0
  94. package/es/lib/utils/index.js +25 -5
  95. package/es/lib/utils/refdataOptions.js +1 -30
  96. package/es/lib/utils/refdataQueryKey.js +19 -0
  97. package/es/lib/utils/renderHelpText.js +1 -30
  98. package/es/lib/utils/selectorSafe.js +1 -30
  99. package/es/lib/utils/sortByLabel.js +1 -30
  100. package/es/lib/utils/toCamelCase.js +1 -30
  101. package/es/lib/utils/typedownQueryKey.js +19 -0
  102. package/es/lib/utils/validators.js +59 -31
  103. package/git_translate.sh +8 -0
  104. package/package.json +1 -1
  105. package/src/index.js +27 -3
  106. package/src/lib/ActionList/ActionList.js +5 -2
  107. package/src/lib/ActionList/ActionListFieldArray.js +31 -9
  108. package/src/lib/ActionList/README.md +23 -20
  109. package/src/lib/CustomProperties/Config/CustomPropertiesSettings.js +2 -2
  110. package/src/lib/CustomProperties/Config/{CustomPropertiesView.js → CustomPropertyView.js} +3 -3
  111. package/src/lib/CustomProperties/Config/index.js +1 -1
  112. package/src/lib/CustomProperties/Edit/CustomPropertiesEdit.js +35 -0
  113. package/src/lib/CustomProperties/Edit/CustomPropertiesEditCtx.js +85 -0
  114. package/src/lib/CustomProperties/Edit/CustomPropertiesListField.js +194 -0
  115. package/src/lib/CustomProperties/Edit/CustomPropertyField.js +299 -0
  116. package/src/lib/CustomProperties/Edit/CustomPropertyFormCard.js +131 -0
  117. package/src/lib/CustomProperties/Edit/index.js +5 -0
  118. package/src/lib/CustomProperties/Filter/CustomPropertiesFilter.js +125 -0
  119. package/src/lib/CustomProperties/Filter/CustomPropertiesFilterField.js +148 -0
  120. package/src/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js +113 -0
  121. package/src/lib/CustomProperties/Filter/CustomPropertiesFilterForm.js +74 -0
  122. package/src/lib/CustomProperties/Filter/CustomPropertiesRule.js +122 -0
  123. package/src/lib/CustomProperties/Filter/index.js +6 -0
  124. package/src/lib/CustomProperties/Filter/useOperators.js +55 -0
  125. package/src/lib/CustomProperties/Filter/useParseActiveFilterStrings.js +35 -0
  126. package/src/lib/CustomProperties/Filter/useValueProps.js +45 -0
  127. package/src/lib/CustomProperties/View/CustomPropertiesView.js +36 -0
  128. package/src/lib/CustomProperties/View/CustomPropertiesViewCtx.js +112 -0
  129. package/src/lib/CustomProperties/View/CustomPropertyCard.js +177 -0
  130. package/src/lib/CustomProperties/View/index.js +3 -0
  131. package/src/lib/CustomProperties/index.js +30 -0
  132. package/src/lib/EditableRefdataList/EditableRefdataList.js +13 -10
  133. package/src/lib/FormModal/FormModal.js +39 -17
  134. package/src/lib/QueryTypedown/QueryTypedown.js +3 -1
  135. package/src/lib/constants/customProperties.js +1 -0
  136. package/src/lib/hooks/index.js +2 -0
  137. package/src/lib/hooks/typedownHooks/useTypedownData.js +9 -3
  138. package/src/lib/hooks/useAvailableCustomProperties.js +40 -0
  139. package/src/lib/hooks/useInvalidateRefdata.js +11 -0
  140. package/src/lib/hooks/useMutateRefdataValue.js +7 -3
  141. package/src/lib/hooks/useRefdata.js +2 -3
  142. package/src/lib/utils/groupCustomPropertiesByCtx.js +13 -0
  143. package/src/lib/utils/index.js +5 -0
  144. package/src/lib/utils/refdataQueryKey.js +9 -0
  145. package/src/lib/utils/typedownQueryKey.js +9 -0
  146. package/src/lib/utils/validators.js +40 -0
  147. package/translate.sh +63 -0
  148. package/translations/stripes-kint-components/ar.json +105 -0
  149. package/translations/stripes-kint-components/ca.json +1 -0
  150. package/translations/stripes-kint-components/cs_CZ.json +105 -0
  151. package/translations/stripes-kint-components/da.json +1 -0
  152. package/translations/stripes-kint-components/de.json +105 -0
  153. package/translations/stripes-kint-components/en.json +54 -2
  154. package/translations/stripes-kint-components/es.json +105 -0
  155. package/translations/stripes-kint-components/fr.json +105 -0
  156. package/translations/stripes-kint-components/he.json +1 -0
  157. package/translations/stripes-kint-components/hi_IN.json +105 -0
  158. package/translations/stripes-kint-components/hu.json +105 -0
  159. package/translations/stripes-kint-components/it_IT.json +105 -0
  160. package/translations/stripes-kint-components/ja.json +105 -0
  161. package/translations/stripes-kint-components/ko.json +105 -0
  162. package/translations/stripes-kint-components/nb.json +1 -0
  163. package/translations/stripes-kint-components/nn.json +1 -0
  164. package/translations/stripes-kint-components/pl.json +105 -0
  165. package/translations/stripes-kint-components/pt_PT.json +105 -0
  166. package/translations/stripes-kint-components/ru.json +105 -0
  167. package/translations/stripes-kint-components/sv.json +105 -0
  168. package/translations/stripes-kint-components/ur.json +1 -0
  169. package/translations/stripes-kint-components/zh_CN.json +105 -0
  170. package/es/artifacts/coverage-jest/lcov-report/block-navigation.js +0 -109
  171. package/es/artifacts/coverage-jest/lcov-report/prettify.js +0 -998
  172. package/es/artifacts/coverage-jest/lcov-report/sorter.js +0 -238
  173. package/junit.xml +0 -79
  174. package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionList.js.html +0 -286
  175. package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionListFieldArray.js.html +0 -925
  176. package/src/artifacts/coverage-jest/lcov-report/ActionList/index.html +0 -146
  177. package/src/artifacts/coverage-jest/lcov-report/ActionList/index.js.html +0 -88
  178. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesLookup.js.html +0 -418
  179. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesSettings.js.html +0 -808
  180. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesView.js.html +0 -601
  181. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyForm.js.html +0 -1135
  182. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.html +0 -176
  183. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.js.html +0 -97
  184. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/EditableRefdataList.js.html +0 -373
  185. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.html +0 -131
  186. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.js.html +0 -88
  187. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsList.js.html +0 -223
  188. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsListFieldArray.js.html +0 -211
  189. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/EditSettingValue.js.html +0 -376
  190. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/RenderSettingValue.js.html +0 -262
  191. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/SettingField.js.html +0 -436
  192. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.html +0 -161
  193. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.js.html +0 -94
  194. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.html +0 -146
  195. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.js.html +0 -94
  196. package/src/artifacts/coverage-jest/lcov-report/FormModal/FormModal.js.html +0 -283
  197. package/src/artifacts/coverage-jest/lcov-report/FormModal/index.html +0 -131
  198. package/src/artifacts/coverage-jest/lcov-report/FormModal/index.js.html +0 -88
  199. package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/NoResultsMessage.js.html +0 -319
  200. package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.html +0 -131
  201. package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.js.html +0 -88
  202. package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/QueryTypedown.js.html +0 -184
  203. package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.html +0 -131
  204. package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.js.html +0 -88
  205. package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/RefdataButtons.js.html +0 -370
  206. package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.html +0 -131
  207. package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.js.html +0 -88
  208. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/SASQLookupComponent.js.html +0 -949
  209. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.html +0 -131
  210. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.js.html +0 -88
  211. package/src/artifacts/coverage-jest/lcov-report/SASQRoute/SASQRoute.js.html +0 -301
  212. package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.html +0 -131
  213. package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.js.html +0 -88
  214. package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/SASQViewComponent.js.html +0 -253
  215. package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.html +0 -131
  216. package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.js.html +0 -88
  217. package/src/artifacts/coverage-jest/lcov-report/SearchField/SearchField.js.html +0 -214
  218. package/src/artifacts/coverage-jest/lcov-report/SearchField/index.html +0 -131
  219. package/src/artifacts/coverage-jest/lcov-report/SearchField/index.js.html +0 -88
  220. package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPage.js.html +0 -211
  221. package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPagePane.js.html +0 -178
  222. package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.html +0 -146
  223. package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.js.html +0 -91
  224. package/src/artifacts/coverage-jest/lcov-report/Typedown/Typedown.js.html +0 -919
  225. package/src/artifacts/coverage-jest/lcov-report/Typedown/index.html +0 -131
  226. package/src/artifacts/coverage-jest/lcov-report/Typedown/index.js.html +0 -88
  227. package/src/artifacts/coverage-jest/lcov-report/base.css +0 -224
  228. package/src/artifacts/coverage-jest/lcov-report/block-navigation.js +0 -87
  229. package/src/artifacts/coverage-jest/lcov-report/constants/customProperties.js.html +0 -112
  230. package/src/artifacts/coverage-jest/lcov-report/constants/eventCodes.js.html +0 -94
  231. package/src/artifacts/coverage-jest/lcov-report/constants/index.html +0 -131
  232. package/src/artifacts/coverage-jest/lcov-report/contexts/SettingsContext.js.html +0 -97
  233. package/src/artifacts/coverage-jest/lcov-report/contexts/index.html +0 -131
  234. package/src/artifacts/coverage-jest/lcov-report/contexts/index.js.html +0 -91
  235. package/src/artifacts/coverage-jest/lcov-report/favicon.png +0 -0
  236. package/src/artifacts/coverage-jest/lcov-report/hooks/index.html +0 -281
  237. package/src/artifacts/coverage-jest/lcov-report/hooks/index.js.html +0 -121
  238. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.html +0 -146
  239. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.js.html +0 -91
  240. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettingSection.js.html +0 -163
  241. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettings.js.html +0 -403
  242. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.html +0 -161
  243. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.js.html +0 -94
  244. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedown.js.html +0 -520
  245. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownData.js.html +0 -163
  246. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownToggle.js.html +0 -163
  247. package/src/artifacts/coverage-jest/lcov-report/hooks/useActiveElement.js.html +0 -157
  248. package/src/artifacts/coverage-jest/lcov-report/hooks/useCustomProperties.js.html +0 -313
  249. package/src/artifacts/coverage-jest/lcov-report/hooks/useHelperApp.js.html +0 -283
  250. package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtFieldArray.js.html +0 -274
  251. package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtSASQuery.js.html +0 -178
  252. package/src/artifacts/coverage-jest/lcov-report/hooks/useLocalStorageState.js.html +0 -136
  253. package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateCustomProperties.js.html +0 -271
  254. package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataValue.js.html +0 -301
  255. package/src/artifacts/coverage-jest/lcov-report/hooks/useQIndex.js.html +0 -208
  256. package/src/artifacts/coverage-jest/lcov-report/hooks/useRefdata.js.html +0 -268
  257. package/src/artifacts/coverage-jest/lcov-report/hooks/useTemplates.js.html +0 -166
  258. package/src/artifacts/coverage-jest/lcov-report/index.html +0 -416
  259. package/src/artifacts/coverage-jest/lcov-report/prettify.css +0 -1
  260. package/src/artifacts/coverage-jest/lcov-report/prettify.js +0 -2
  261. package/src/artifacts/coverage-jest/lcov-report/sort-arrow-sprite.png +0 -0
  262. package/src/artifacts/coverage-jest/lcov-report/sorter.js +0 -196
  263. package/src/artifacts/coverage-jest/lcov-report/utils/buildUrl.js.html +0 -193
  264. package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQuery.js.html +0 -109
  265. package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQueryParams.js.html +0 -454
  266. package/src/artifacts/coverage-jest/lcov-report/utils/index.html +0 -251
  267. package/src/artifacts/coverage-jest/lcov-report/utils/index.js.html +0 -121
  268. package/src/artifacts/coverage-jest/lcov-report/utils/refdataOptions.js.html +0 -106
  269. package/src/artifacts/coverage-jest/lcov-report/utils/renderHelpText.js.html +0 -166
  270. package/src/artifacts/coverage-jest/lcov-report/utils/selectorSafe.js.html +0 -103
  271. package/src/artifacts/coverage-jest/lcov-report/utils/sortByLabel.js.html +0 -130
  272. package/src/artifacts/coverage-jest/lcov-report/utils/toCamelCase.js.html +0 -127
  273. package/src/artifacts/coverage-jest/lcov-report/utils/validators.js.html +0 -202
  274. package/src/artifacts/coverage-jest/lcov.info +0 -2562
@@ -1,998 +0,0 @@
1
- "use strict";
2
-
3
- var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
4
- return a;
5
- };
6
-
7
- /* eslint-disable */
8
- window.PR_SHOULD_USE_CONTINUATION = true;
9
-
10
- (function () {
11
- var h = ["break,continue,do,else,for,if,return,while"];
12
- var u = [h, "auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"];
13
- var p = [u, "catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"];
14
- var l = [p, "alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"];
15
- var x = [p, "abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"];
16
- var R = [x, "as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"];
17
- var r = "all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes";
18
- var w = [p, "debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"];
19
- var s = "caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END";
20
- var I = [h, "and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"];
21
- var f = [h, "alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"];
22
- var H = [h, "case,done,elif,esac,eval,fi,function,in,local,set,then,until"];
23
- var A = [l, R, w, s + I, f, H];
24
- var e = /^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/;
25
- var C = "str";
26
- var z = "kwd";
27
- var j = "com";
28
- var O = "typ";
29
- var G = "lit";
30
- var L = "pun";
31
- var F = "pln";
32
- var m = "tag";
33
- var E = "dec";
34
- var J = "src";
35
- var P = "atn";
36
- var n = "atv";
37
- var N = "nocode";
38
- var M = "(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|&&=|&=|\\(|\\*|\\*=|\\+=|\\,|\\-=|\\->|\\/|\\/=|:|::|\\;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\@|\\[|\\^|\\^=|\\^\\^|\\^\\^=|\\{|\\||\\|=|\\|\\||\\|\\|=|\\~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";
39
-
40
- function k(Z) {
41
- var ad = 0;
42
- var S = false;
43
- var ac = false;
44
-
45
- for (var V = 0, U = Z.length; V < U; ++V) {
46
- var ae = Z[V];
47
-
48
- if (ae.ignoreCase) {
49
- ac = true;
50
- } else {
51
- if (/[a-z]/i.test(ae.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi, ""))) {
52
- S = true;
53
- ac = false;
54
- break;
55
- }
56
- }
57
- }
58
-
59
- var Y = {
60
- b: 8,
61
- t: 9,
62
- n: 10,
63
- v: 11,
64
- f: 12,
65
- r: 13
66
- };
67
-
68
- function ab(ah) {
69
- var ag = ah.charCodeAt(0);
70
-
71
- if (ag !== 92) {
72
- return ag;
73
- }
74
-
75
- var af = ah.charAt(1);
76
- ag = Y[af];
77
-
78
- if (ag) {
79
- return ag;
80
- } else {
81
- if ("0" <= af && af <= "7") {
82
- return parseInt(ah.substring(1), 8);
83
- } else {
84
- if (af === "u" || af === "x") {
85
- return parseInt(ah.substring(2), 16);
86
- } else {
87
- return ah.charCodeAt(1);
88
- }
89
- }
90
- }
91
- }
92
-
93
- function T(af) {
94
- if (af < 32) {
95
- return (af < 16 ? "\\x0" : "\\x") + af.toString(16);
96
- }
97
-
98
- var ag = String.fromCharCode(af);
99
-
100
- if (ag === "\\" || ag === "-" || ag === "[" || ag === "]") {
101
- ag = "\\" + ag;
102
- }
103
-
104
- return ag;
105
- }
106
-
107
- function X(am) {
108
- var aq = am.substring(1, am.length - 1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]", "g"));
109
- var ak = [];
110
- var af = [];
111
- var ao = aq[0] === "^";
112
-
113
- for (var ar = ao ? 1 : 0, aj = aq.length; ar < aj; ++ar) {
114
- var ah = aq[ar];
115
-
116
- if (/\\[bdsw]/i.test(ah)) {
117
- ak.push(ah);
118
- } else {
119
- var ag = ab(ah);
120
- var al;
121
-
122
- if (ar + 2 < aj && "-" === aq[ar + 1]) {
123
- al = ab(aq[ar + 2]);
124
- ar += 2;
125
- } else {
126
- al = ag;
127
- }
128
-
129
- af.push([ag, al]);
130
-
131
- if (!(al < 65 || ag > 122)) {
132
- if (!(al < 65 || ag > 90)) {
133
- af.push([Math.max(65, ag) | 32, Math.min(al, 90) | 32]);
134
- }
135
-
136
- if (!(al < 97 || ag > 122)) {
137
- af.push([Math.max(97, ag) & ~32, Math.min(al, 122) & ~32]);
138
- }
139
- }
140
- }
141
- }
142
-
143
- af.sort(function (av, au) {
144
- return av[0] - au[0] || au[1] - av[1];
145
- });
146
- var ai = [];
147
- var ap = [NaN, NaN];
148
-
149
- for (var ar = 0; ar < af.length; ++ar) {
150
- var at = af[ar];
151
-
152
- if (at[0] <= ap[1] + 1) {
153
- ap[1] = Math.max(ap[1], at[1]);
154
- } else {
155
- ai.push(ap = at);
156
- }
157
- }
158
-
159
- var an = ["["];
160
-
161
- if (ao) {
162
- an.push("^");
163
- }
164
-
165
- an.push.apply(an, ak);
166
-
167
- for (var ar = 0; ar < ai.length; ++ar) {
168
- var at = ai[ar];
169
- an.push(T(at[0]));
170
-
171
- if (at[1] > at[0]) {
172
- if (at[1] + 1 > at[0]) {
173
- an.push("-");
174
- }
175
-
176
- an.push(T(at[1]));
177
- }
178
- }
179
-
180
- an.push("]");
181
- return an.join("");
182
- }
183
-
184
- function W(al) {
185
- var aj = al.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)", "g"));
186
- var ah = aj.length;
187
- var an = [];
188
-
189
- for (var ak = 0, am = 0; ak < ah; ++ak) {
190
- var ag = aj[ak];
191
-
192
- if (ag === "(") {
193
- ++am;
194
- } else {
195
- if ("\\" === ag.charAt(0)) {
196
- var af = +ag.substring(1);
197
-
198
- if (af && af <= am) {
199
- an[af] = -1;
200
- }
201
- }
202
- }
203
- }
204
-
205
- for (var ak = 1; ak < an.length; ++ak) {
206
- if (-1 === an[ak]) {
207
- an[ak] = ++ad;
208
- }
209
- }
210
-
211
- for (var ak = 0, am = 0; ak < ah; ++ak) {
212
- var ag = aj[ak];
213
-
214
- if (ag === "(") {
215
- ++am;
216
-
217
- if (an[am] === undefined) {
218
- aj[ak] = "(?:";
219
- }
220
- } else {
221
- if ("\\" === ag.charAt(0)) {
222
- var af = +ag.substring(1);
223
-
224
- if (af && af <= am) {
225
- aj[ak] = "\\" + an[am];
226
- }
227
- }
228
- }
229
- }
230
-
231
- for (var ak = 0, am = 0; ak < ah; ++ak) {
232
- if ("^" === aj[ak] && "^" !== aj[ak + 1]) {
233
- aj[ak] = "";
234
- }
235
- }
236
-
237
- if (al.ignoreCase && S) {
238
- for (var ak = 0; ak < ah; ++ak) {
239
- var ag = aj[ak];
240
- var ai = ag.charAt(0);
241
-
242
- if (ag.length >= 2 && ai === "[") {
243
- aj[ak] = X(ag);
244
- } else {
245
- if (ai !== "\\") {
246
- aj[ak] = ag.replace(/[a-zA-Z]/g, function (ao) {
247
- var ap = ao.charCodeAt(0);
248
- return "[" + String.fromCharCode(ap & ~32, ap | 32) + "]";
249
- });
250
- }
251
- }
252
- }
253
- }
254
-
255
- return aj.join("");
256
- }
257
-
258
- var aa = [];
259
-
260
- for (var V = 0, U = Z.length; V < U; ++V) {
261
- var ae = Z[V];
262
-
263
- if (ae.global || ae.multiline) {
264
- throw new Error("" + ae);
265
- }
266
-
267
- aa.push("(?:" + W(ae) + ")");
268
- }
269
-
270
- return new RegExp(aa.join("|"), ac ? "gi" : "g");
271
- }
272
-
273
- function a(V) {
274
- var U = /(?:^|\s)nocode(?:\s|$)/;
275
- var X = [];
276
- var T = 0;
277
- var Z = [];
278
- var W = 0;
279
- var S;
280
-
281
- if (V.currentStyle) {
282
- S = V.currentStyle.whiteSpace;
283
- } else {
284
- if (window.getComputedStyle) {
285
- S = document.defaultView.getComputedStyle(V, null).getPropertyValue("white-space");
286
- }
287
- }
288
-
289
- var Y = S && "pre" === S.substring(0, 3);
290
-
291
- function aa(ab) {
292
- switch (ab.nodeType) {
293
- case 1:
294
- if (U.test(ab.className)) {
295
- return;
296
- }
297
-
298
- for (var ae = ab.firstChild; ae; ae = ae.nextSibling) {
299
- aa(ae);
300
- }
301
-
302
- var ad = ab.nodeName;
303
-
304
- if ("BR" === ad || "LI" === ad) {
305
- X[W] = "\n";
306
- Z[W << 1] = T++;
307
- Z[W++ << 1 | 1] = ab;
308
- }
309
-
310
- break;
311
-
312
- case 3:
313
- case 4:
314
- var ac = ab.nodeValue;
315
-
316
- if (ac.length) {
317
- if (!Y) {
318
- ac = ac.replace(/[ \t\r\n]+/g, " ");
319
- } else {
320
- ac = ac.replace(/\r\n?/g, "\n");
321
- }
322
-
323
- X[W] = ac;
324
- Z[W << 1] = T;
325
- T += ac.length;
326
- Z[W++ << 1 | 1] = ab;
327
- }
328
-
329
- break;
330
- }
331
- }
332
-
333
- aa(V);
334
- return {
335
- sourceCode: X.join("").replace(/\n$/, ""),
336
- spans: Z
337
- };
338
- }
339
-
340
- function B(S, U, W, T) {
341
- if (!U) {
342
- return;
343
- }
344
-
345
- var V = {
346
- sourceCode: U,
347
- basePos: S
348
- };
349
- W(V);
350
- T.push.apply(T, V.decorations);
351
- }
352
-
353
- var v = /\S/;
354
-
355
- function o(S) {
356
- var V = undefined;
357
-
358
- for (var U = S.firstChild; U; U = U.nextSibling) {
359
- var T = U.nodeType;
360
- V = T === 1 ? V ? S : U : T === 3 ? v.test(U.nodeValue) ? S : V : V;
361
- }
362
-
363
- return V === S ? undefined : V;
364
- }
365
-
366
- function g(U, T) {
367
- var S = {};
368
- var V;
369
-
370
- (function () {
371
- var ad = U.concat(T);
372
- var ah = [];
373
- var ag = {};
374
-
375
- for (var ab = 0, Z = ad.length; ab < Z; ++ab) {
376
- var Y = ad[ab];
377
- var ac = Y[3];
378
-
379
- if (ac) {
380
- for (var ae = ac.length; --ae >= 0;) {
381
- S[ac.charAt(ae)] = Y;
382
- }
383
- }
384
-
385
- var af = Y[1];
386
- var aa = "" + af;
387
-
388
- if (!ag.hasOwnProperty(aa)) {
389
- ah.push(af);
390
- ag[aa] = null;
391
- }
392
- }
393
-
394
- ah.push(/[\0-\uffff]/);
395
- V = k(ah);
396
- })();
397
-
398
- var X = T.length;
399
-
400
- var W = function W(ah) {
401
- var Z = ah.sourceCode,
402
- Y = ah.basePos;
403
- var ad = [Y, F];
404
- var af = 0;
405
- var an = Z.match(V) || [];
406
- var aj = {};
407
-
408
- for (var ae = 0, aq = an.length; ae < aq; ++ae) {
409
- var ag = an[ae];
410
- var ap = aj[ag];
411
- var ai = void 0;
412
- var am;
413
-
414
- if (typeof ap === "string") {
415
- am = false;
416
- } else {
417
- var aa = S[ag.charAt(0)];
418
-
419
- if (aa) {
420
- ai = ag.match(aa[1]);
421
- ap = aa[0];
422
- } else {
423
- for (var ao = 0; ao < X; ++ao) {
424
- aa = T[ao];
425
- ai = ag.match(aa[1]);
426
-
427
- if (ai) {
428
- ap = aa[0];
429
- break;
430
- }
431
- }
432
-
433
- if (!ai) {
434
- ap = F;
435
- }
436
- }
437
-
438
- am = ap.length >= 5 && "lang-" === ap.substring(0, 5);
439
-
440
- if (am && !(ai && typeof ai[1] === "string")) {
441
- am = false;
442
- ap = J;
443
- }
444
-
445
- if (!am) {
446
- aj[ag] = ap;
447
- }
448
- }
449
-
450
- var ab = af;
451
- af += ag.length;
452
-
453
- if (!am) {
454
- ad.push(Y + ab, ap);
455
- } else {
456
- var al = ai[1];
457
- var ak = ag.indexOf(al);
458
- var ac = ak + al.length;
459
-
460
- if (ai[2]) {
461
- ac = ag.length - ai[2].length;
462
- ak = ac - al.length;
463
- }
464
-
465
- var ar = ap.substring(5);
466
- B(Y + ab, ag.substring(0, ak), W, ad);
467
- B(Y + ab + ak, al, q(ar, al), ad);
468
- B(Y + ab + ac, ag.substring(ac), W, ad);
469
- }
470
- }
471
-
472
- ah.decorations = ad;
473
- };
474
-
475
- return W;
476
- }
477
-
478
- function i(T) {
479
- var W = [],
480
- S = [];
481
-
482
- if (T.tripleQuotedStrings) {
483
- W.push([C, /^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/, null, "'\""]);
484
- } else {
485
- if (T.multiLineStrings) {
486
- W.push([C, /^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/, null, "'\"`"]);
487
- } else {
488
- W.push([C, /^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/, null, "\"'"]);
489
- }
490
- }
491
-
492
- if (T.verbatimStrings) {
493
- S.push([C, /^@\"(?:[^\"]|\"\")*(?:\"|$)/, null]);
494
- }
495
-
496
- var Y = T.hashComments;
497
-
498
- if (Y) {
499
- if (T.cStyleComments) {
500
- if (Y > 1) {
501
- W.push([j, /^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/, null, "#"]);
502
- } else {
503
- W.push([j, /^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/, null, "#"]);
504
- }
505
-
506
- S.push([C, /^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/, null]);
507
- } else {
508
- W.push([j, /^#[^\r\n]*/, null, "#"]);
509
- }
510
- }
511
-
512
- if (T.cStyleComments) {
513
- S.push([j, /^\/\/[^\r\n]*/, null]);
514
- S.push([j, /^\/\*[\s\S]*?(?:\*\/|$)/, null]);
515
- }
516
-
517
- if (T.regexLiterals) {
518
- var X = "/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/";
519
- S.push(["lang-regex", new RegExp("^" + M + "(" + X + ")")]);
520
- }
521
-
522
- var V = T.types;
523
-
524
- if (V) {
525
- S.push([O, V]);
526
- }
527
-
528
- var U = ("" + T.keywords).replace(/^ | $/g, "");
529
-
530
- if (U.length) {
531
- S.push([z, new RegExp("^(?:" + U.replace(/[\s,]+/g, "|") + ")\\b"), null]);
532
- }
533
-
534
- W.push([F, /^\s+/, null, " \r\n\t\xA0"]);
535
- S.push([G, /^@[a-z_$][a-z_$@0-9]*/i, null], [O, /^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/, null], [F, /^[a-z_$][a-z_$@0-9]*/i, null], [G, new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*", "i"), null, "0123456789"], [F, /^\\[\s\S]?/, null], [L, /^.[^\s\w\.$@\'\"\`\/\#\\]*/, null]);
536
- return g(W, S);
537
- }
538
-
539
- var K = i({
540
- keywords: A,
541
- hashComments: true,
542
- cStyleComments: true,
543
- multiLineStrings: true,
544
- regexLiterals: true
545
- });
546
-
547
- function Q(V, ag) {
548
- var U = /(?:^|\s)nocode(?:\s|$)/;
549
- var ab = /\r\n?|\n/;
550
- var ac = V.ownerDocument;
551
- var S;
552
-
553
- if (V.currentStyle) {
554
- S = V.currentStyle.whiteSpace;
555
- } else {
556
- if (window.getComputedStyle) {
557
- S = ac.defaultView.getComputedStyle(V, null).getPropertyValue("white-space");
558
- }
559
- }
560
-
561
- var Z = S && "pre" === S.substring(0, 3);
562
- var af = ac.createElement("LI");
563
-
564
- while (V.firstChild) {
565
- af.appendChild(V.firstChild);
566
- }
567
-
568
- var W = [af];
569
-
570
- function ae(al) {
571
- switch (al.nodeType) {
572
- case 1:
573
- if (U.test(al.className)) {
574
- break;
575
- }
576
-
577
- if ("BR" === al.nodeName) {
578
- ad(al);
579
-
580
- if (al.parentNode) {
581
- al.parentNode.removeChild(al);
582
- }
583
- } else {
584
- for (var an = al.firstChild; an; an = an.nextSibling) {
585
- ae(an);
586
- }
587
- }
588
-
589
- break;
590
-
591
- case 3:
592
- case 4:
593
- if (Z) {
594
- var am = al.nodeValue;
595
- var aj = am.match(ab);
596
-
597
- if (aj) {
598
- var ai = am.substring(0, aj.index);
599
- al.nodeValue = ai;
600
- var ah = am.substring(aj.index + aj[0].length);
601
-
602
- if (ah) {
603
- var ak = al.parentNode;
604
- ak.insertBefore(ac.createTextNode(ah), al.nextSibling);
605
- }
606
-
607
- ad(al);
608
-
609
- if (!ai) {
610
- al.parentNode.removeChild(al);
611
- }
612
- }
613
- }
614
-
615
- break;
616
- }
617
- }
618
-
619
- function ad(ak) {
620
- while (!ak.nextSibling) {
621
- ak = ak.parentNode;
622
-
623
- if (!ak) {
624
- return;
625
- }
626
- }
627
-
628
- function ai(al, ar) {
629
- var aq = ar ? al.cloneNode(false) : al;
630
- var ao = al.parentNode;
631
-
632
- if (ao) {
633
- var ap = ai(ao, 1);
634
- var an = al.nextSibling;
635
- ap.appendChild(aq);
636
-
637
- for (var am = an; am; am = an) {
638
- an = am.nextSibling;
639
- ap.appendChild(am);
640
- }
641
- }
642
-
643
- return aq;
644
- }
645
-
646
- var ah = ai(ak.nextSibling, 0);
647
-
648
- for (var aj; (aj = ah.parentNode) && aj.nodeType === 1;) {
649
- ah = aj;
650
- }
651
-
652
- W.push(ah);
653
- }
654
-
655
- for (var Y = 0; Y < W.length; ++Y) {
656
- ae(W[Y]);
657
- }
658
-
659
- if (ag === (ag | 0)) {
660
- W[0].setAttribute("value", ag);
661
- }
662
-
663
- var aa = ac.createElement("OL");
664
- aa.className = "linenums";
665
- var X = Math.max(0, ag - 1 | 0) || 0;
666
-
667
- for (var Y = 0, T = W.length; Y < T; ++Y) {
668
- af = W[Y];
669
- af.className = "L" + (Y + X) % 10;
670
-
671
- if (!af.firstChild) {
672
- af.appendChild(ac.createTextNode("\xA0"));
673
- }
674
-
675
- aa.appendChild(af);
676
- }
677
-
678
- V.appendChild(aa);
679
- }
680
-
681
- function D(ac) {
682
- var aj = /\bMSIE\b/.test(navigator.userAgent);
683
- var am = /\n/g;
684
- var al = ac.sourceCode;
685
- var an = al.length;
686
- var V = 0;
687
- var aa = ac.spans;
688
- var T = aa.length;
689
- var ah = 0;
690
- var X = ac.decorations;
691
- var Y = X.length;
692
- var Z = 0;
693
- X[Y] = an;
694
- var ar, aq;
695
-
696
- for (aq = ar = 0; aq < Y;) {
697
- if (X[aq] !== X[aq + 2]) {
698
- X[ar++] = X[aq++];
699
- X[ar++] = X[aq++];
700
- } else {
701
- aq += 2;
702
- }
703
- }
704
-
705
- Y = ar;
706
-
707
- for (aq = ar = 0; aq < Y;) {
708
- var at = X[aq];
709
- var ab = X[aq + 1];
710
- var W = aq + 2;
711
-
712
- while (W + 2 <= Y && X[W + 1] === ab) {
713
- W += 2;
714
- }
715
-
716
- X[ar++] = at;
717
- X[ar++] = ab;
718
- aq = W;
719
- }
720
-
721
- Y = X.length = ar;
722
- var ae = null;
723
-
724
- while (ah < T) {
725
- var af = aa[ah];
726
- var S = aa[ah + 2] || an;
727
- var ag = X[Z];
728
- var ap = X[Z + 2] || an;
729
- var W = Math.min(S, ap);
730
- var ak = aa[ah + 1];
731
- var U;
732
-
733
- if (ak.nodeType !== 1 && (U = al.substring(V, W))) {
734
- if (aj) {
735
- U = U.replace(am, "\r");
736
- }
737
-
738
- ak.nodeValue = U;
739
- var ai = ak.ownerDocument;
740
- var ao = ai.createElement("SPAN");
741
- ao.className = X[Z + 1];
742
- var ad = ak.parentNode;
743
- ad.replaceChild(ao, ak);
744
- ao.appendChild(ak);
745
-
746
- if (V < S) {
747
- aa[ah + 1] = ak = ai.createTextNode(al.substring(W, S));
748
- ad.insertBefore(ak, ao.nextSibling);
749
- }
750
- }
751
-
752
- V = W;
753
-
754
- if (V >= S) {
755
- ah += 2;
756
- }
757
-
758
- if (V >= ap) {
759
- Z += 2;
760
- }
761
- }
762
- }
763
-
764
- var t = {};
765
-
766
- function c(U, V) {
767
- for (var S = V.length; --S >= 0;) {
768
- var T = V[S];
769
-
770
- if (!t.hasOwnProperty(T)) {
771
- t[T] = U;
772
- } else {
773
- if (window.console) {
774
- console.warn("cannot override language handler %s", T);
775
- }
776
- }
777
- }
778
- }
779
-
780
- function q(T, S) {
781
- if (!(T && t.hasOwnProperty(T))) {
782
- T = /^\s*</.test(S) ? "default-markup" : "default-code";
783
- }
784
-
785
- return t[T];
786
- }
787
-
788
- c(K, ["default-code"]);
789
- c(g([], [[F, /^[^<?]+/], [E, /^<!\w[^>]*(?:>|$)/], [j, /^<\!--[\s\S]*?(?:-\->|$)/], ["lang-", /^<\?([\s\S]+?)(?:\?>|$)/], ["lang-", /^<%([\s\S]+?)(?:%>|$)/], [L, /^(?:<[%?]|[%?]>)/], ["lang-", /^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i], ["lang-js", /^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i], ["lang-css", /^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i], ["lang-in.tag", /^(<\/?[a-z][^<>]*>)/i]]), ["default-markup", "htm", "html", "mxml", "xhtml", "xml", "xsl"]);
790
- c(g([[F, /^[\s]+/, null, " \t\r\n"], [n, /^(?:\"[^\"]*\"?|\'[^\']*\'?)/, null, "\"'"]], [[m, /^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i], [P, /^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i], ["lang-uq.val", /^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/], [L, /^[=<>\/]+/], ["lang-js", /^on\w+\s*=\s*\"([^\"]+)\"/i], ["lang-js", /^on\w+\s*=\s*\'([^\']+)\'/i], ["lang-js", /^on\w+\s*=\s*([^\"\'>\s]+)/i], ["lang-css", /^style\s*=\s*\"([^\"]+)\"/i], ["lang-css", /^style\s*=\s*\'([^\']+)\'/i], ["lang-css", /^style\s*=\s*([^\"\'>\s]+)/i]]), ["in.tag"]);
791
- c(g([], [[n, /^[\s\S]+/]]), ["uq.val"]);
792
- c(i({
793
- keywords: l,
794
- hashComments: true,
795
- cStyleComments: true,
796
- types: e
797
- }), ["c", "cc", "cpp", "cxx", "cyc", "m"]);
798
- c(i({
799
- keywords: "null,true,false"
800
- }), ["json"]);
801
- c(i({
802
- keywords: R,
803
- hashComments: true,
804
- cStyleComments: true,
805
- verbatimStrings: true,
806
- types: e
807
- }), ["cs"]);
808
- c(i({
809
- keywords: x,
810
- cStyleComments: true
811
- }), ["java"]);
812
- c(i({
813
- keywords: H,
814
- hashComments: true,
815
- multiLineStrings: true
816
- }), ["bsh", "csh", "sh"]);
817
- c(i({
818
- keywords: I,
819
- hashComments: true,
820
- multiLineStrings: true,
821
- tripleQuotedStrings: true
822
- }), ["cv", "py"]);
823
- c(i({
824
- keywords: s,
825
- hashComments: true,
826
- multiLineStrings: true,
827
- regexLiterals: true
828
- }), ["perl", "pl", "pm"]);
829
- c(i({
830
- keywords: f,
831
- hashComments: true,
832
- multiLineStrings: true,
833
- regexLiterals: true
834
- }), ["rb"]);
835
- c(i({
836
- keywords: w,
837
- cStyleComments: true,
838
- regexLiterals: true
839
- }), ["js"]);
840
- c(i({
841
- keywords: r,
842
- hashComments: 3,
843
- cStyleComments: true,
844
- multilineStrings: true,
845
- tripleQuotedStrings: true,
846
- regexLiterals: true
847
- }), ["coffee"]);
848
- c(g([], [[C, /^[\s\S]+/]]), ["regex"]);
849
-
850
- function d(V) {
851
- var U = V.langExtension;
852
-
853
- try {
854
- var S = a(V.sourceNode);
855
- var T = S.sourceCode;
856
- V.sourceCode = T;
857
- V.spans = S.spans;
858
- V.basePos = 0;
859
- q(U, T)(V);
860
- D(V);
861
- } catch (W) {
862
- if ("console" in window) {
863
- console.log(W && W.stack ? W.stack : W);
864
- }
865
- }
866
- }
867
-
868
- function y(W, V, U) {
869
- var S = document.createElement("PRE");
870
- S.innerHTML = W;
871
-
872
- if (U) {
873
- Q(S, U);
874
- }
875
-
876
- var T = {
877
- langExtension: V,
878
- numberLines: U,
879
- sourceNode: S
880
- };
881
- d(T);
882
- return S.innerHTML;
883
- }
884
-
885
- function b(ad) {
886
- function Y(af) {
887
- return document.getElementsByTagName(af);
888
- }
889
-
890
- var ac = [Y("pre"), Y("code"), Y("xmp")];
891
- var T = [];
892
-
893
- for (var aa = 0; aa < ac.length; ++aa) {
894
- for (var Z = 0, V = ac[aa].length; Z < V; ++Z) {
895
- T.push(ac[aa][Z]);
896
- }
897
- }
898
-
899
- ac = null;
900
- var W = Date;
901
-
902
- if (!W.now) {
903
- W = {
904
- now: function now() {
905
- return +new Date();
906
- }
907
- };
908
- }
909
-
910
- var X = 0;
911
- var S;
912
- var ab = /\blang(?:uage)?-([\w.]+)(?!\S)/;
913
- var ae = /\bprettyprint\b/;
914
-
915
- function U() {
916
- var ag = window.PR_SHOULD_USE_CONTINUATION ? W.now() + 250 : Infinity;
917
-
918
- for (; X < T.length && W.now() < ag; X++) {
919
- var aj = T[X];
920
- var ai = aj.className;
921
-
922
- if (ai.indexOf("prettyprint") >= 0) {
923
- var ah = ai.match(ab);
924
- var am;
925
-
926
- if (!ah && (am = o(aj)) && "CODE" === am.tagName) {
927
- ah = am.className.match(ab);
928
- }
929
-
930
- if (ah) {
931
- ah = ah[1];
932
- }
933
-
934
- var al = false;
935
-
936
- for (var ak = aj.parentNode; ak; ak = ak.parentNode) {
937
- if ((ak.tagName === "pre" || ak.tagName === "code" || ak.tagName === "xmp") && ak.className && ak.className.indexOf("prettyprint") >= 0) {
938
- al = true;
939
- break;
940
- }
941
- }
942
-
943
- if (!al) {
944
- var af = aj.className.match(/\blinenums\b(?::(\d+))?/);
945
- af = af ? af[1] && af[1].length ? +af[1] : true : false;
946
-
947
- if (af) {
948
- Q(aj, af);
949
- }
950
-
951
- S = {
952
- langExtension: ah,
953
- sourceNode: aj,
954
- numberLines: af
955
- };
956
- d(S);
957
- }
958
- }
959
- }
960
-
961
- if (X < T.length) {
962
- setTimeout(U, 250);
963
- } else {
964
- if (ad) {
965
- ad();
966
- }
967
- }
968
- }
969
-
970
- U();
971
- }
972
-
973
- window.prettyPrintOne = y;
974
- window.prettyPrint = b;
975
- window.PR = {
976
- createSimpleLexer: g,
977
- registerLangHandler: c,
978
- sourceDecorator: i,
979
- PR_ATTRIB_NAME: P,
980
- PR_ATTRIB_VALUE: n,
981
- PR_COMMENT: j,
982
- PR_DECLARATION: E,
983
- PR_KEYWORD: z,
984
- PR_LITERAL: G,
985
- PR_NOCODE: N,
986
- PR_PLAIN: F,
987
- PR_PUNCTUATION: L,
988
- PR_SOURCE: J,
989
- PR_STRING: C,
990
- PR_TAG: m,
991
- PR_TYPE: O
992
- };
993
- })();
994
-
995
- PR.registerLangHandler(PR.createSimpleLexer([], [[PR.PR_DECLARATION, /^<!\w[^>]*(?:>|$)/], [PR.PR_COMMENT, /^<\!--[\s\S]*?(?:-\->|$)/], [PR.PR_PUNCTUATION, /^(?:<[%?]|[%?]>)/], ["lang-", /^<\?([\s\S]+?)(?:\?>|$)/], ["lang-", /^<%([\s\S]+?)(?:%>|$)/], ["lang-", /^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i], ["lang-handlebars", /^<script\b[^>]*type\s*=\s*['"]?text\/x-handlebars-template['"]?\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i], ["lang-js", /^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i], ["lang-css", /^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i], ["lang-in.tag", /^(<\/?[a-z][^<>]*>)/i], [PR.PR_DECLARATION, /^{{[#^>/]?\s*[\w.][^}]*}}/], [PR.PR_DECLARATION, /^{{&?\s*[\w.][^}]*}}/], [PR.PR_DECLARATION, /^{{{>?\s*[\w.][^}]*}}}/], [PR.PR_COMMENT, /^{{![^}]*}}/]]), ["handlebars", "hbs"]);
996
- PR.registerLangHandler(PR.createSimpleLexer([[PR.PR_PLAIN, /^[ \t\r\n\f]+/, null, " \t\r\n\f"]], [[PR.PR_STRING, /^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/, null], [PR.PR_STRING, /^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/, null], ["lang-css-str", /^url\(([^\)\"\']*)\)/i], [PR.PR_KEYWORD, /^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i, null], ["lang-css-kw", /^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i], [PR.PR_COMMENT, /^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//], [PR.PR_COMMENT, /^(?:<!--|-->)/], [PR.PR_LITERAL, /^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i], [PR.PR_LITERAL, /^#(?:[0-9a-f]{3}){1,2}/i], [PR.PR_PLAIN, /^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i], [PR.PR_PUNCTUATION, /^[^\s\w\'\"]+/]]), ["css"]);
997
- PR.registerLangHandler(PR.createSimpleLexer([], [[PR.PR_KEYWORD, /^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]]), ["css-kw"]);
998
- PR.registerLangHandler(PR.createSimpleLexer([], [[PR.PR_STRING, /^[^\)\"\']+/]]), ["css-str"]);