@macallumharvey/first-test-wet 2.0.0 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/WetButton.d.ts +1 -1
- package/dist/first-test-wet.cjs.development.js +5 -0
- package/dist/first-test-wet.cjs.development.js.map +1 -1
- package/dist/first-test-wet.cjs.production.min.js +1 -1
- package/dist/first-test-wet.cjs.production.min.js.map +1 -1
- package/dist/first-test-wet.esm.js +5 -1
- package/dist/first-test-wet.esm.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/package.json +1 -1
- package/src/WetButton.tsx +1 -1
- package/src/WetModal.tsx +1 -0
- package/src/index.tsx +1 -0
- package/src/theme-wet-boew/assets/favicon-mobile.png +0 -0
- package/src/theme-wet-boew/assets/favicon.ico +0 -0
- package/src/theme-wet-boew/assets/logo.png +0 -0
- package/src/theme-wet-boew/assets/logo.svg +14 -0
- package/src/theme-wet-boew/css/ie8-theme.css +17370 -0
- package/src/theme-wet-boew/css/ie8-theme.min.css +193 -0
- package/src/{wet-boew-cdn-4.0.81.1/js/ie8-wet-boew.js → theme-wet-boew/css/ie8-wet-boew.css} +12 -10
- package/src/{wet-boew-cdn-4.0.81.1/js/ie8-wet-boew2.min.js → theme-wet-boew/css/ie8-wet-boew.min.css} +7 -7
- package/src/theme-wet-boew/css/theme.css +11357 -0
- package/src/theme-wet-boew/css/theme.min.css +6 -0
- package/src/{wet-boew-cdn-4.0.81.1/js/ie8-wet-boew2.js → theme-wet-boew/css/wet-boew.css} +12 -10
- package/src/{wet-boew-cdn-4.0.81.1/js/ie8-wet-boew.min.js → theme-wet-boew/css/wet-boew.min.css} +6 -7
- package/src/theme-wet-boew/payload.json +66 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/assets/mediacontrols.html +32 -33
- package/src/wet-boew/assets/sprites_share.png +0 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/css/noscript.css +112 -112
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/css/noscript.min.css +5 -5
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/css/polyfills/datalist.css +32 -32
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/css/polyfills/datepicker.css +47 -47
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/css/polyfills/details.css +28 -28
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/css/polyfills/mathml.css +16 -16
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/css/polyfills/meter.css +24 -24
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/css/polyfills/progress.css +8 -8
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/css/polyfills/slider.css +229 -229
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/fonts/glyphicons-halflings-regular.svg +287 -287
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/additional-methods.js +1511 -1511
- package/src/wet-boew/js/deps/additional-methods.min.js +9 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/geomap-lib.js +3758 -3770
- package/src/wet-boew/js/deps/geomap-lib.min.js +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/jquery.dataTables.js +15345 -15733
- package/src/wet-boew/js/deps/jquery.dataTables.min.js +4 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/jquery.flot.canvas.js +345 -345
- package/src/wet-boew/js/deps/jquery.flot.canvas.min.js +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/jquery.flot.js +3168 -3168
- package/src/wet-boew/js/deps/jquery.flot.min.js +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/jquery.flot.orderBars.js +282 -282
- package/src/wet-boew/js/deps/jquery.flot.orderBars.min.js +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/jquery.flot.pie.js +820 -820
- package/src/wet-boew/js/deps/jquery.flot.pie.min.js +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/jquery.magnific-popup.js +2060 -2060
- package/src/wet-boew/js/deps/jquery.magnific-popup.min.js +4 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/jquery.validate.js +1660 -1660
- package/src/wet-boew/js/deps/jquery.validate.min.js +9 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/json-patch.js +314 -314
- package/src/wet-boew/js/deps/json-patch.min.js +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/jsonpointer.js +349 -349
- package/src/wet-boew/js/deps/jsonpointer.min.js +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-apollo.js +53 -53
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-basic.js +49 -49
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-clj.js +64 -64
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-css.js +160 -160
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-dart.js +92 -92
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-erlang.js +94 -94
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-go.js +59 -59
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-hs.js +102 -102
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-lasso.js +67 -67
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-lisp.js +95 -95
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-llvm.js +63 -63
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-logtalk.js +50 -50
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-lua.js +60 -60
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-matlab.js +183 -183
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-matlab.min.js +1 -1
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-ml.js +57 -57
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-mumps.js +140 -140
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-n.js +67 -67
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-pascal.js +49 -49
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-proto.js +37 -37
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-r.js +59 -59
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-rd.js +50 -50
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-rust.js +81 -81
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-scala.js +56 -56
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-sql.js +59 -59
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-swift.js +60 -60
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-tcl.js +63 -63
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-tex.js +49 -49
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-vb.js +67 -67
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-vhdl.js +51 -51
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-wiki.js +55 -55
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-xq.js +71 -71
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-yaml.js +45 -45
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/ol.js +1008 -1008
- package/src/wet-boew/js/deps/ol.min.js +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/prettify.js +1742 -1742
- package/src/wet-boew/js/deps/prettify.min.js +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/proj4.js +2 -2
- package/src/wet-boew/js/deps/proj4.min.js +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/run_prettify.js +1998 -1998
- package/src/wet-boew/js/deps/run_prettify.min.js +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/tableparser.js +2216 -2216
- package/src/wet-boew/js/deps/tableparser.min.js +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/unorm.js +452 -452
- package/src/wet-boew/js/deps/unorm.min.js +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/af.js +246 -254
- package/src/wet-boew/js/i18n/af.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/ar.js +284 -292
- package/src/wet-boew/js/i18n/ar.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/bg.js +284 -292
- package/src/wet-boew/js/i18n/bg.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/cs.js +285 -293
- package/src/wet-boew/js/i18n/cs.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/de.js +354 -362
- package/src/wet-boew/js/i18n/de.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/el.js +284 -292
- package/src/wet-boew/js/i18n/el.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/en.js +246 -254
- package/src/wet-boew/js/i18n/en.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/es.js +287 -295
- package/src/wet-boew/js/i18n/es.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/et.js +282 -290
- package/src/wet-boew/js/i18n/et.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/fr.js +313 -321
- package/src/wet-boew/js/i18n/fr.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/hi.js +246 -254
- package/src/wet-boew/js/i18n/hi.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/hu.js +284 -292
- package/src/wet-boew/js/i18n/hu.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/hy.js +246 -254
- package/src/wet-boew/js/i18n/hy.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/id.js +283 -291
- package/src/wet-boew/js/i18n/id.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/is.js +282 -290
- package/src/wet-boew/js/i18n/is.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/it.js +311 -319
- package/src/wet-boew/js/i18n/it.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/iu.js +246 -254
- package/src/wet-boew/js/i18n/iu.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/ja.js +285 -293
- package/src/wet-boew/js/i18n/ja.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/ko.js +284 -292
- package/src/wet-boew/js/i18n/ko.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/lt.js +284 -292
- package/src/wet-boew/js/i18n/lt.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/lv.js +284 -292
- package/src/wet-boew/js/i18n/lv.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/nl.js +318 -326
- package/src/wet-boew/js/i18n/nl.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/pl.js +287 -295
- package/src/wet-boew/js/i18n/pl.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/pt-BR.js +246 -254
- package/src/wet-boew/js/i18n/pt-BR.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/pt.js +270 -278
- package/src/wet-boew/js/i18n/pt.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/ru.js +284 -292
- package/src/wet-boew/js/i18n/ru.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/sk.js +282 -290
- package/src/wet-boew/js/i18n/sk.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/sq.js +246 -254
- package/src/wet-boew/js/i18n/sq.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/th.js +284 -292
- package/src/wet-boew/js/i18n/th.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/tr.js +286 -294
- package/src/wet-boew/js/i18n/tr.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/uk.js +284 -292
- package/src/wet-boew/js/i18n/uk.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/vi.js +284 -292
- package/src/wet-boew/js/i18n/vi.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/zh-Hans.js +246 -254
- package/src/wet-boew/js/i18n/zh-Hans.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/zh.js +285 -293
- package/src/wet-boew/js/i18n/zh.min.js +7 -0
- package/src/wet-boew/js/ie8-wet-boew.js +3992 -0
- package/src/wet-boew/js/ie8-wet-boew.min.js +7 -0
- package/src/wet-boew/js/ie8-wet-boew2.js +15294 -0
- package/src/wet-boew/js/ie8-wet-boew2.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/jquery/2.2.4/jquery.js +9814 -9814
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/jquery/2.2.4/jquery.min.js +4 -4
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/polyfills/datalist.js +423 -419
- package/src/wet-boew/js/polyfills/datalist.min.js +8 -0
- package/src/wet-boew/js/polyfills/datalist.min.js.map +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/polyfills/datalist_dynamic.js +50 -50
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/polyfills/datalist_dynamic.min.js +7 -7
- package/src/wet-boew/js/polyfills/datalist_dynamic.min.js.map +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/polyfills/datepicker.js +338 -338
- package/src/wet-boew/js/polyfills/datepicker.min.js +8 -0
- package/src/wet-boew/js/polyfills/datepicker.min.js.map +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/polyfills/details.js +126 -126
- package/src/wet-boew/js/polyfills/details.min.js +8 -0
- package/src/wet-boew/js/polyfills/details.min.js.map +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/polyfills/jawsariafixes.js +47 -47
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/polyfills/jawsariafixes.min.js +15 -15
- package/src/wet-boew/js/polyfills/jawsariafixes.min.js.map +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/polyfills/meter.js +140 -140
- package/src/wet-boew/js/polyfills/meter.min.js +8 -0
- package/src/wet-boew/js/polyfills/meter.min.js.map +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/polyfills/mobile.js +783 -784
- package/src/wet-boew/js/polyfills/mobile.min.js +8 -0
- package/src/wet-boew/js/polyfills/mobile.min.js.map +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/polyfills/progress.js +107 -107
- package/src/wet-boew/js/polyfills/progress.min.js +8 -0
- package/src/wet-boew/js/polyfills/progress.min.js.map +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/polyfills/slider.js +1343 -1343
- package/src/wet-boew/js/polyfills/slider.min.js +9 -0
- package/src/wet-boew/js/polyfills/slider.min.js.map +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/polyfills/slider_wrapper.js +73 -73
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/polyfills/slider_wrapper.min.js +7 -7
- package/src/wet-boew/js/polyfills/slider_wrapper.min.js.map +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/polyfills/svg.js +29 -29
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/polyfills/svg.min.js +7 -7
- package/src/wet-boew/js/polyfills/svg.min.js.map +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/polyfills/test.js +603 -603
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/polyfills/test.min.js +7 -7
- package/src/wet-boew/js/polyfills/test.min.js.map +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/wet-boew.js +17714 -20264
- package/src/wet-boew/js/wet-boew.min.js +9 -0
- package/src/wet-boew/js/wet-boew.min.js.map +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/payload.json +1721 -1721
- package/src/wet-boew-cdn-4.0.81.1/Licence-fr.txt +0 -1
- package/src/wet-boew-cdn-4.0.81.1/License-en.txt +0 -1
- package/src/wet-boew-cdn-4.0.81.1/assets/sprites_share.png +0 -0
- package/src/wet-boew-cdn-4.0.81.1/js/deps/additional-methods.min.js +0 -9
- package/src/wet-boew-cdn-4.0.81.1/js/deps/geomap-lib.min.js +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/deps/jquery.dataTables.min.js +0 -4
- package/src/wet-boew-cdn-4.0.81.1/js/deps/jquery.flot.canvas.min.js +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/deps/jquery.flot.min.js +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/deps/jquery.flot.orderBars.min.js +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/deps/jquery.flot.pie.min.js +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/deps/jquery.magnific-popup.min.js +0 -4
- package/src/wet-boew-cdn-4.0.81.1/js/deps/jquery.validate.min.js +0 -9
- package/src/wet-boew-cdn-4.0.81.1/js/deps/json-patch.min.js +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/deps/jsonpointer.min.js +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/deps/ol.min.js +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/deps/prettify.min.js +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/deps/proj4.min.js +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/deps/run_prettify.min.js +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/deps/tableparser.min.js +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/deps/unorm.min.js +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/af.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/ar.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/bg.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/cs.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/de.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/el.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/en.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/es.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/et.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/fr.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/hi.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/hu.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/hy.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/id.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/is.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/it.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/iu.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/ja.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/ko.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/lt.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/lv.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/nl.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/pl.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/pt-BR.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/pt.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/ru.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/sk.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/sq.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/th.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/tr.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/uk.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/vi.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/zh-Hans.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/zh.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/ie8-wet-boew.min.js.map +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/ie8-wet-boew2.min.js.map +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/polyfills/datalist.min.js +0 -8
- package/src/wet-boew-cdn-4.0.81.1/js/polyfills/datalist.min.js.map +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/polyfills/datalist_dynamic.min.js.map +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/polyfills/datepicker.min.js +0 -8
- package/src/wet-boew-cdn-4.0.81.1/js/polyfills/datepicker.min.js.map +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/polyfills/details.min.js +0 -8
- package/src/wet-boew-cdn-4.0.81.1/js/polyfills/details.min.js.map +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/polyfills/jawsariafixes.min.js.map +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/polyfills/meter.min.js +0 -8
- package/src/wet-boew-cdn-4.0.81.1/js/polyfills/meter.min.js.map +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/polyfills/mobile.min.js +0 -8
- package/src/wet-boew-cdn-4.0.81.1/js/polyfills/mobile.min.js.map +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/polyfills/progress.min.js +0 -8
- package/src/wet-boew-cdn-4.0.81.1/js/polyfills/progress.min.js.map +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/polyfills/slider.min.js +0 -9
- package/src/wet-boew-cdn-4.0.81.1/js/polyfills/slider.min.js.map +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/polyfills/slider_wrapper.min.js.map +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/polyfills/svg.min.js.map +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/polyfills/test.min.js.map +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/wet-boew.min.js +0 -9
- package/src/wet-boew-cdn-4.0.81.1/js/wet-boew.min.js.map +0 -1
- package/src/wet-boew-cdn-4.0.81.1/package.json +0 -15
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/assets/cloud-popup-relative.png +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/assets/fd-slider-sprite.png +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/assets/loading.png +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/assets/zoom-minus-mini.png +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/assets/zoom-plus-mini.png +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/assets/zoom-world-mini.png +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/css/polyfills/datalist.min.css +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/css/polyfills/datepicker.min.css +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/css/polyfills/details.min.css +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/css/polyfills/mathml.min.css +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/css/polyfills/meter.min.css +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/css/polyfills/progress.min.css +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/css/polyfills/slider.min.css +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/fonts/glyphicons-halflings-regular.eot +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/fonts/glyphicons-halflings-regular.ttf +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/fonts/glyphicons-halflings-regular.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/fonts/glyphicons-halflings-regular.woff2 +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/mml-chtml.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_AMS-Regular.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Calligraphic-Bold.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Calligraphic-Regular.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Fraktur-Bold.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Fraktur-Regular.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Main-Bold.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Main-Italic.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Main-Regular.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Math-BoldItalic.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Math-Italic.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Math-Regular.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_SansSerif-Bold.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_SansSerif-Italic.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_SansSerif-Regular.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Script-Regular.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Size1-Regular.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Size2-Regular.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Size3-Regular.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Size4-Regular.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Typewriter-Regular.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Vector-Bold.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Vector-Regular.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Zero.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-apollo.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-basic.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-clj.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-css.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-dart.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-erlang.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-go.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-hs.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-lasso.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-lisp.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-llvm.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-logtalk.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-lua.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-ml.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-mumps.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-n.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-pascal.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-proto.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-r.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-rd.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-rust.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-scala.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-sql.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-swift.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-tcl.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-tex.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-vb.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-vhdl.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-wiki.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-xq.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-yaml.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/jquery/2.2.4/jquery.min.map +0 -0
@@ -1,349 +1,349 @@
|
|
1
|
-
/**
|
2
|
-
* @author Alexey Kuzmin <alex.s.kuzmin@gmail.com>
|
3
|
-
* @fileoverview JavaScript implementation of JSON Pointer.
|
4
|
-
* @see http://tools.ietf.org/html/rfc6901
|
5
|
-
*/
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
;(function() {
|
10
|
-
'use strict';
|
11
|
-
|
12
|
-
/**
|
13
|
-
* List of special characters and their escape sequences.
|
14
|
-
* Special characters will be unescaped in order they are listed.
|
15
|
-
* Section 3 of spec.
|
16
|
-
* @type {Array.<Array.<string>>}
|
17
|
-
* @const
|
18
|
-
*/
|
19
|
-
var SPECIAL_CHARACTERS = [
|
20
|
-
['/', '~1'],
|
21
|
-
['~', '~0']
|
22
|
-
];
|
23
|
-
|
24
|
-
|
25
|
-
/**
|
26
|
-
* Tokens' separator in JSON pointer string.
|
27
|
-
* Section 3 of spec.
|
28
|
-
* @type {string}
|
29
|
-
* @const
|
30
|
-
*/
|
31
|
-
var TOKENS_SEPARATOR = '/';
|
32
|
-
|
33
|
-
|
34
|
-
/**
|
35
|
-
* Prefix for error messages.
|
36
|
-
* @type {string}
|
37
|
-
* @const
|
38
|
-
*/
|
39
|
-
var ERROR_MESSAGE_PREFIX = 'JSON Pointer: ';
|
40
|
-
|
41
|
-
|
42
|
-
/**
|
43
|
-
* Validates non-empty pointer string.
|
44
|
-
* @type {RegExp}
|
45
|
-
* @const
|
46
|
-
*/
|
47
|
-
var NON_EMPTY_POINTER_REGEXP = /(\/[^\/]*)+/;
|
48
|
-
|
49
|
-
|
50
|
-
/**
|
51
|
-
* List of error messages.
|
52
|
-
* Please keep it in alphabetical order.
|
53
|
-
* @enum {string}
|
54
|
-
*/
|
55
|
-
var ErrorMessage = {
|
56
|
-
HYPHEN_IS_NOT_SUPPORTED_IN_ARRAY_CONTEXT:
|
57
|
-
'Implementation does not support "-" token for arrays.',
|
58
|
-
INVALID_DOCUMENT: 'JSON document is not valid.',
|
59
|
-
INVALID_DOCUMENT_TYPE: 'JSON document must be a string or object.',
|
60
|
-
INVALID_POINTER: 'Pointer is not valid.',
|
61
|
-
NON_NUMBER_TOKEN_IN_ARRAY_CONTEXT:
|
62
|
-
'Non-number tokens cannot be used in array context.',
|
63
|
-
TOKEN_WITH_LEADING_ZERO_IN_ARRAY_CONTEXT:
|
64
|
-
'Token with leading zero cannot be used in array context.'
|
65
|
-
};
|
66
|
-
|
67
|
-
|
68
|
-
/**
|
69
|
-
* Returns |target| object's value pointed by |opt_pointer|, returns undefined
|
70
|
-
* if |opt_pointer| points to non-existing value.
|
71
|
-
* If pointer is not provided, validates first argument and returns
|
72
|
-
* evaluator function that takes pointer as argument.
|
73
|
-
* @param {(string|Object|Array)} target Evaluation target.
|
74
|
-
* @param {string=} opt_pointer JSON Pointer string.
|
75
|
-
* @returns {*} Some value.
|
76
|
-
*/
|
77
|
-
function getPointedValue(target, opt_pointer) {
|
78
|
-
// .get() method implementation.
|
79
|
-
|
80
|
-
// First argument must be either string or object.
|
81
|
-
if (isString(target)) {
|
82
|
-
|
83
|
-
// If string it must be valid JSON document.
|
84
|
-
try {
|
85
|
-
// Let's try to parse it as JSON.
|
86
|
-
target = JSON.parse(target);
|
87
|
-
}
|
88
|
-
catch (e) {
|
89
|
-
// If parsing failed, an exception will be thrown.
|
90
|
-
throw getError(ErrorMessage.INVALID_DOCUMENT);
|
91
|
-
}
|
92
|
-
}
|
93
|
-
else if (!isObject(target)) {
|
94
|
-
// If not object or string, an exception will be thrown.
|
95
|
-
throw getError(ErrorMessage.INVALID_DOCUMENT_TYPE);
|
96
|
-
}
|
97
|
-
|
98
|
-
// |target| is already parsed, let's create evaluator function for it.
|
99
|
-
var evaluator = createPointerEvaluator(target);
|
100
|
-
|
101
|
-
if (isUndefined(opt_pointer)) {
|
102
|
-
// If pointer was not provided, return evaluator function.
|
103
|
-
return evaluator;
|
104
|
-
}
|
105
|
-
else {
|
106
|
-
// If pointer is provided, return evaluation result.
|
107
|
-
return evaluator(opt_pointer);
|
108
|
-
}
|
109
|
-
}
|
110
|
-
|
111
|
-
|
112
|
-
/**
|
113
|
-
* Returns function that takes JSON Pointer as single argument
|
114
|
-
* and evaluates it in given |target| context.
|
115
|
-
* Returned function throws an exception if pointer is not valid
|
116
|
-
* or any error occurs during evaluation.
|
117
|
-
* @param {*} target Evaluation target.
|
118
|
-
* @returns {Function}
|
119
|
-
*/
|
120
|
-
function createPointerEvaluator(target) {
|
121
|
-
|
122
|
-
// Use cache to store already received values.
|
123
|
-
var cache = {};
|
124
|
-
|
125
|
-
return function(pointer) {
|
126
|
-
|
127
|
-
if (!isValidJSONPointer(pointer)) {
|
128
|
-
// If it's not, an exception will be thrown.
|
129
|
-
throw getError(ErrorMessage.INVALID_POINTER);
|
130
|
-
}
|
131
|
-
|
132
|
-
// First, look up in the cache.
|
133
|
-
if (cache.hasOwnProperty(pointer)) {
|
134
|
-
// If cache entry exists, return it's value.
|
135
|
-
return cache[pointer];
|
136
|
-
}
|
137
|
-
|
138
|
-
// Now, when all arguments are valid, we can start evaluation.
|
139
|
-
// First of all, let's convert JSON pointer string to tokens list.
|
140
|
-
var tokensList = parsePointer(pointer);
|
141
|
-
var token;
|
142
|
-
var value = target;
|
143
|
-
|
144
|
-
// Evaluation will be continued till tokens list is not empty
|
145
|
-
// and returned value is not an undefined.
|
146
|
-
while (!isUndefined(value) && !isUndefined(token = tokensList.pop())) {
|
147
|
-
// Let's evaluate token in current context.
|
148
|
-
// `getValue()` might throw an exception, but we won't handle it.
|
149
|
-
value = getValue(value, token);
|
150
|
-
}
|
151
|
-
|
152
|
-
// Pointer evaluation is done, save value in the cache and return it.
|
153
|
-
cache[pointer] = value;
|
154
|
-
return value;
|
155
|
-
};
|
156
|
-
}
|
157
|
-
|
158
|
-
|
159
|
-
/**
|
160
|
-
* Returns true if given |pointer| is valid, returns false otherwise.
|
161
|
-
* @param {!string} pointer
|
162
|
-
* @returns {boolean} Whether pointer is valid.
|
163
|
-
*/
|
164
|
-
function isValidJSONPointer(pointer) {
|
165
|
-
// Validates JSON pointer string.
|
166
|
-
|
167
|
-
if (!isString(pointer)) {
|
168
|
-
// If it's not a string, it obviously is not valid.
|
169
|
-
return false;
|
170
|
-
}
|
171
|
-
|
172
|
-
if ('' === pointer) {
|
173
|
-
// If it is string and is an empty string, it's valid.
|
174
|
-
return true;
|
175
|
-
}
|
176
|
-
|
177
|
-
// If it is non-empty string, it must match spec defined format.
|
178
|
-
// Check Section 3 of specification for concrete syntax.
|
179
|
-
return NON_EMPTY_POINTER_REGEXP.test(pointer);
|
180
|
-
}
|
181
|
-
|
182
|
-
|
183
|
-
/**
|
184
|
-
* Returns tokens list for given |pointer|. List is reversed, e.g.
|
185
|
-
* '/simple/path' -> ['path', 'simple']
|
186
|
-
* @param {!string} pointer JSON pointer string.
|
187
|
-
* @returns {Array} List of tokens.
|
188
|
-
*/
|
189
|
-
function parsePointer(pointer) {
|
190
|
-
// Converts JSON pointer string into tokens list.
|
191
|
-
|
192
|
-
// Let's split pointer string by tokens' separator character.
|
193
|
-
// Also we will reverse resulting array to simplify it's further usage.
|
194
|
-
var tokens = pointer.split(TOKENS_SEPARATOR).reverse();
|
195
|
-
|
196
|
-
// Last item in resulting array is always an empty string,
|
197
|
-
// we don't need it, let's remove it.
|
198
|
-
tokens.pop();
|
199
|
-
|
200
|
-
// Now tokens' array is ready to use, let's return it.
|
201
|
-
return tokens;
|
202
|
-
}
|
203
|
-
|
204
|
-
|
205
|
-
/**
|
206
|
-
* Decodes all escape sequences in given |rawReferenceToken|.
|
207
|
-
* @param {!string} rawReferenceToken
|
208
|
-
* @returns {string} Unescaped reference token.
|
209
|
-
*/
|
210
|
-
function unescapeReferenceToken(rawReferenceToken) {
|
211
|
-
// Unescapes reference token. See Section 3 of specification.
|
212
|
-
|
213
|
-
var referenceToken = rawReferenceToken;
|
214
|
-
var character;
|
215
|
-
var escapeSequence;
|
216
|
-
var pair;
|
217
|
-
var replaceRegExp;
|
218
|
-
|
219
|
-
// Order of unescaping does matter.
|
220
|
-
// That's why an array is used here and not hash.
|
221
|
-
for (var i = 0; i < SPECIAL_CHARACTERS.length; i++) {
|
222
|
-
pair = SPECIAL_CHARACTERS[i];
|
223
|
-
character = pair[0];
|
224
|
-
escapeSequence = pair[1];
|
225
|
-
replaceRegExp = new RegExp(escapeSequence, 'g');
|
226
|
-
referenceToken = referenceToken.replace(replaceRegExp, character);
|
227
|
-
}
|
228
|
-
|
229
|
-
return referenceToken;
|
230
|
-
}
|
231
|
-
|
232
|
-
|
233
|
-
/**
|
234
|
-
* Returns value pointed by |token| in evaluation |context|.
|
235
|
-
* Throws an exception if any error occurs.
|
236
|
-
* @param {*} context Current evaluation context.
|
237
|
-
* @param {!string} token Unescaped reference token.
|
238
|
-
* @returns {*} Some value or undefined if value if not found.
|
239
|
-
*/
|
240
|
-
function getValue(context, token) {
|
241
|
-
// Reference token evaluation. See Section 4 of spec.
|
242
|
-
|
243
|
-
// First of all we should unescape all special characters in token.
|
244
|
-
token = unescapeReferenceToken(token);
|
245
|
-
|
246
|
-
// Further actions depend of context of evaluation.
|
247
|
-
|
248
|
-
if (isArray(context)) {
|
249
|
-
// In array context there are more strict requirements
|
250
|
-
// for token value.
|
251
|
-
|
252
|
-
if ('-' === token) {
|
253
|
-
// Token cannot be a "-" character,
|
254
|
-
// it has no sense in current implementation.
|
255
|
-
throw getError(ErrorMessage.HYPHEN_IS_NOT_SUPPORTED_IN_ARRAY_CONTEXT);
|
256
|
-
}
|
257
|
-
if (!isNumber(token)) {
|
258
|
-
// Token cannot be non-number.
|
259
|
-
throw getError(ErrorMessage.NON_NUMBER_TOKEN_IN_ARRAY_CONTEXT);
|
260
|
-
}
|
261
|
-
if (token.length > 1 && '0' === token[0]) {
|
262
|
-
// Token cannot be non-zero number with leading zero.
|
263
|
-
throw getError(ErrorMessage.TOKEN_WITH_LEADING_ZERO_IN_ARRAY_CONTEXT);
|
264
|
-
}
|
265
|
-
// If all conditions are met, simply return element
|
266
|
-
// with token's value index.
|
267
|
-
// It might be undefined, but it's ok.
|
268
|
-
return context[token];
|
269
|
-
}
|
270
|
-
|
271
|
-
if (isObject(context)) {
|
272
|
-
// In object context we can simply return element w/ key equal to token.
|
273
|
-
// It might be undefined, but it's ok.
|
274
|
-
return context[token];
|
275
|
-
}
|
276
|
-
|
277
|
-
// If context is not an array or an object,
|
278
|
-
// token evaluation is not possible.
|
279
|
-
// This is the expected situation and so we won't throw an error,
|
280
|
-
// undefined value is perfectly suitable here.
|
281
|
-
return;
|
282
|
-
}
|
283
|
-
|
284
|
-
|
285
|
-
/**
|
286
|
-
* Returns Error instance for throwing.
|
287
|
-
* @param {string} message Error message.
|
288
|
-
* @returns {Error}
|
289
|
-
*/
|
290
|
-
function getError(message) {
|
291
|
-
return new Error(ERROR_MESSAGE_PREFIX + message);
|
292
|
-
}
|
293
|
-
|
294
|
-
|
295
|
-
function isObject(o) {
|
296
|
-
return 'object' === typeof o && null !== o;
|
297
|
-
}
|
298
|
-
|
299
|
-
|
300
|
-
function isArray(a) {
|
301
|
-
if (Array.isArray) {
|
302
|
-
return Array.isArray(a);
|
303
|
-
} else {
|
304
|
-
return Object.prototype.toString.call(a) === '[object Array]';
|
305
|
-
}
|
306
|
-
}
|
307
|
-
|
308
|
-
|
309
|
-
function isNumber(n) {
|
310
|
-
return !isNaN(Number(n));
|
311
|
-
}
|
312
|
-
|
313
|
-
|
314
|
-
function isString(s) {
|
315
|
-
return 'string' === typeof s || s instanceof String;
|
316
|
-
}
|
317
|
-
|
318
|
-
|
319
|
-
function isUndefined(v) {
|
320
|
-
return 'undefined' === typeof v;
|
321
|
-
}
|
322
|
-
|
323
|
-
|
324
|
-
// Let's expose API to the world.
|
325
|
-
|
326
|
-
var jsonpointer = {
|
327
|
-
get: getPointedValue
|
328
|
-
};
|
329
|
-
|
330
|
-
if ('object' === typeof exports) {
|
331
|
-
// If `exports` is an object, we are in Node.js context.
|
332
|
-
// We are supposed to act as Node.js package.
|
333
|
-
module.exports = jsonpointer;
|
334
|
-
} else if ('function' === typeof define && define.amd) {
|
335
|
-
// If there is global function `define()` and `define.amd` is defined,
|
336
|
-
// we are supposed to act as AMD module.
|
337
|
-
define(function() {
|
338
|
-
return jsonpointer;
|
339
|
-
});
|
340
|
-
} else {
|
341
|
-
// Last resort.
|
342
|
-
// Let's create global `jsonpointer` object.
|
343
|
-
this.jsonpointer = jsonpointer;
|
344
|
-
}
|
345
|
-
|
346
|
-
}).call((function() {
|
347
|
-
'use strict';
|
348
|
-
return (typeof window !== 'undefined' ? window : this);
|
349
|
-
})());
|
1
|
+
/**
|
2
|
+
* @author Alexey Kuzmin <alex.s.kuzmin@gmail.com>
|
3
|
+
* @fileoverview JavaScript implementation of JSON Pointer.
|
4
|
+
* @see http://tools.ietf.org/html/rfc6901
|
5
|
+
*/
|
6
|
+
|
7
|
+
|
8
|
+
|
9
|
+
;(function() {
|
10
|
+
'use strict';
|
11
|
+
|
12
|
+
/**
|
13
|
+
* List of special characters and their escape sequences.
|
14
|
+
* Special characters will be unescaped in order they are listed.
|
15
|
+
* Section 3 of spec.
|
16
|
+
* @type {Array.<Array.<string>>}
|
17
|
+
* @const
|
18
|
+
*/
|
19
|
+
var SPECIAL_CHARACTERS = [
|
20
|
+
['/', '~1'],
|
21
|
+
['~', '~0']
|
22
|
+
];
|
23
|
+
|
24
|
+
|
25
|
+
/**
|
26
|
+
* Tokens' separator in JSON pointer string.
|
27
|
+
* Section 3 of spec.
|
28
|
+
* @type {string}
|
29
|
+
* @const
|
30
|
+
*/
|
31
|
+
var TOKENS_SEPARATOR = '/';
|
32
|
+
|
33
|
+
|
34
|
+
/**
|
35
|
+
* Prefix for error messages.
|
36
|
+
* @type {string}
|
37
|
+
* @const
|
38
|
+
*/
|
39
|
+
var ERROR_MESSAGE_PREFIX = 'JSON Pointer: ';
|
40
|
+
|
41
|
+
|
42
|
+
/**
|
43
|
+
* Validates non-empty pointer string.
|
44
|
+
* @type {RegExp}
|
45
|
+
* @const
|
46
|
+
*/
|
47
|
+
var NON_EMPTY_POINTER_REGEXP = /(\/[^\/]*)+/;
|
48
|
+
|
49
|
+
|
50
|
+
/**
|
51
|
+
* List of error messages.
|
52
|
+
* Please keep it in alphabetical order.
|
53
|
+
* @enum {string}
|
54
|
+
*/
|
55
|
+
var ErrorMessage = {
|
56
|
+
HYPHEN_IS_NOT_SUPPORTED_IN_ARRAY_CONTEXT:
|
57
|
+
'Implementation does not support "-" token for arrays.',
|
58
|
+
INVALID_DOCUMENT: 'JSON document is not valid.',
|
59
|
+
INVALID_DOCUMENT_TYPE: 'JSON document must be a string or object.',
|
60
|
+
INVALID_POINTER: 'Pointer is not valid.',
|
61
|
+
NON_NUMBER_TOKEN_IN_ARRAY_CONTEXT:
|
62
|
+
'Non-number tokens cannot be used in array context.',
|
63
|
+
TOKEN_WITH_LEADING_ZERO_IN_ARRAY_CONTEXT:
|
64
|
+
'Token with leading zero cannot be used in array context.'
|
65
|
+
};
|
66
|
+
|
67
|
+
|
68
|
+
/**
|
69
|
+
* Returns |target| object's value pointed by |opt_pointer|, returns undefined
|
70
|
+
* if |opt_pointer| points to non-existing value.
|
71
|
+
* If pointer is not provided, validates first argument and returns
|
72
|
+
* evaluator function that takes pointer as argument.
|
73
|
+
* @param {(string|Object|Array)} target Evaluation target.
|
74
|
+
* @param {string=} opt_pointer JSON Pointer string.
|
75
|
+
* @returns {*} Some value.
|
76
|
+
*/
|
77
|
+
function getPointedValue(target, opt_pointer) {
|
78
|
+
// .get() method implementation.
|
79
|
+
|
80
|
+
// First argument must be either string or object.
|
81
|
+
if (isString(target)) {
|
82
|
+
|
83
|
+
// If string it must be valid JSON document.
|
84
|
+
try {
|
85
|
+
// Let's try to parse it as JSON.
|
86
|
+
target = JSON.parse(target);
|
87
|
+
}
|
88
|
+
catch (e) {
|
89
|
+
// If parsing failed, an exception will be thrown.
|
90
|
+
throw getError(ErrorMessage.INVALID_DOCUMENT);
|
91
|
+
}
|
92
|
+
}
|
93
|
+
else if (!isObject(target)) {
|
94
|
+
// If not object or string, an exception will be thrown.
|
95
|
+
throw getError(ErrorMessage.INVALID_DOCUMENT_TYPE);
|
96
|
+
}
|
97
|
+
|
98
|
+
// |target| is already parsed, let's create evaluator function for it.
|
99
|
+
var evaluator = createPointerEvaluator(target);
|
100
|
+
|
101
|
+
if (isUndefined(opt_pointer)) {
|
102
|
+
// If pointer was not provided, return evaluator function.
|
103
|
+
return evaluator;
|
104
|
+
}
|
105
|
+
else {
|
106
|
+
// If pointer is provided, return evaluation result.
|
107
|
+
return evaluator(opt_pointer);
|
108
|
+
}
|
109
|
+
}
|
110
|
+
|
111
|
+
|
112
|
+
/**
|
113
|
+
* Returns function that takes JSON Pointer as single argument
|
114
|
+
* and evaluates it in given |target| context.
|
115
|
+
* Returned function throws an exception if pointer is not valid
|
116
|
+
* or any error occurs during evaluation.
|
117
|
+
* @param {*} target Evaluation target.
|
118
|
+
* @returns {Function}
|
119
|
+
*/
|
120
|
+
function createPointerEvaluator(target) {
|
121
|
+
|
122
|
+
// Use cache to store already received values.
|
123
|
+
var cache = {};
|
124
|
+
|
125
|
+
return function(pointer) {
|
126
|
+
|
127
|
+
if (!isValidJSONPointer(pointer)) {
|
128
|
+
// If it's not, an exception will be thrown.
|
129
|
+
throw getError(ErrorMessage.INVALID_POINTER);
|
130
|
+
}
|
131
|
+
|
132
|
+
// First, look up in the cache.
|
133
|
+
if (cache.hasOwnProperty(pointer)) {
|
134
|
+
// If cache entry exists, return it's value.
|
135
|
+
return cache[pointer];
|
136
|
+
}
|
137
|
+
|
138
|
+
// Now, when all arguments are valid, we can start evaluation.
|
139
|
+
// First of all, let's convert JSON pointer string to tokens list.
|
140
|
+
var tokensList = parsePointer(pointer);
|
141
|
+
var token;
|
142
|
+
var value = target;
|
143
|
+
|
144
|
+
// Evaluation will be continued till tokens list is not empty
|
145
|
+
// and returned value is not an undefined.
|
146
|
+
while (!isUndefined(value) && !isUndefined(token = tokensList.pop())) {
|
147
|
+
// Let's evaluate token in current context.
|
148
|
+
// `getValue()` might throw an exception, but we won't handle it.
|
149
|
+
value = getValue(value, token);
|
150
|
+
}
|
151
|
+
|
152
|
+
// Pointer evaluation is done, save value in the cache and return it.
|
153
|
+
cache[pointer] = value;
|
154
|
+
return value;
|
155
|
+
};
|
156
|
+
}
|
157
|
+
|
158
|
+
|
159
|
+
/**
|
160
|
+
* Returns true if given |pointer| is valid, returns false otherwise.
|
161
|
+
* @param {!string} pointer
|
162
|
+
* @returns {boolean} Whether pointer is valid.
|
163
|
+
*/
|
164
|
+
function isValidJSONPointer(pointer) {
|
165
|
+
// Validates JSON pointer string.
|
166
|
+
|
167
|
+
if (!isString(pointer)) {
|
168
|
+
// If it's not a string, it obviously is not valid.
|
169
|
+
return false;
|
170
|
+
}
|
171
|
+
|
172
|
+
if ('' === pointer) {
|
173
|
+
// If it is string and is an empty string, it's valid.
|
174
|
+
return true;
|
175
|
+
}
|
176
|
+
|
177
|
+
// If it is non-empty string, it must match spec defined format.
|
178
|
+
// Check Section 3 of specification for concrete syntax.
|
179
|
+
return NON_EMPTY_POINTER_REGEXP.test(pointer);
|
180
|
+
}
|
181
|
+
|
182
|
+
|
183
|
+
/**
|
184
|
+
* Returns tokens list for given |pointer|. List is reversed, e.g.
|
185
|
+
* '/simple/path' -> ['path', 'simple']
|
186
|
+
* @param {!string} pointer JSON pointer string.
|
187
|
+
* @returns {Array} List of tokens.
|
188
|
+
*/
|
189
|
+
function parsePointer(pointer) {
|
190
|
+
// Converts JSON pointer string into tokens list.
|
191
|
+
|
192
|
+
// Let's split pointer string by tokens' separator character.
|
193
|
+
// Also we will reverse resulting array to simplify it's further usage.
|
194
|
+
var tokens = pointer.split(TOKENS_SEPARATOR).reverse();
|
195
|
+
|
196
|
+
// Last item in resulting array is always an empty string,
|
197
|
+
// we don't need it, let's remove it.
|
198
|
+
tokens.pop();
|
199
|
+
|
200
|
+
// Now tokens' array is ready to use, let's return it.
|
201
|
+
return tokens;
|
202
|
+
}
|
203
|
+
|
204
|
+
|
205
|
+
/**
|
206
|
+
* Decodes all escape sequences in given |rawReferenceToken|.
|
207
|
+
* @param {!string} rawReferenceToken
|
208
|
+
* @returns {string} Unescaped reference token.
|
209
|
+
*/
|
210
|
+
function unescapeReferenceToken(rawReferenceToken) {
|
211
|
+
// Unescapes reference token. See Section 3 of specification.
|
212
|
+
|
213
|
+
var referenceToken = rawReferenceToken;
|
214
|
+
var character;
|
215
|
+
var escapeSequence;
|
216
|
+
var pair;
|
217
|
+
var replaceRegExp;
|
218
|
+
|
219
|
+
// Order of unescaping does matter.
|
220
|
+
// That's why an array is used here and not hash.
|
221
|
+
for (var i = 0; i < SPECIAL_CHARACTERS.length; i++) {
|
222
|
+
pair = SPECIAL_CHARACTERS[i];
|
223
|
+
character = pair[0];
|
224
|
+
escapeSequence = pair[1];
|
225
|
+
replaceRegExp = new RegExp(escapeSequence, 'g');
|
226
|
+
referenceToken = referenceToken.replace(replaceRegExp, character);
|
227
|
+
}
|
228
|
+
|
229
|
+
return referenceToken;
|
230
|
+
}
|
231
|
+
|
232
|
+
|
233
|
+
/**
|
234
|
+
* Returns value pointed by |token| in evaluation |context|.
|
235
|
+
* Throws an exception if any error occurs.
|
236
|
+
* @param {*} context Current evaluation context.
|
237
|
+
* @param {!string} token Unescaped reference token.
|
238
|
+
* @returns {*} Some value or undefined if value if not found.
|
239
|
+
*/
|
240
|
+
function getValue(context, token) {
|
241
|
+
// Reference token evaluation. See Section 4 of spec.
|
242
|
+
|
243
|
+
// First of all we should unescape all special characters in token.
|
244
|
+
token = unescapeReferenceToken(token);
|
245
|
+
|
246
|
+
// Further actions depend of context of evaluation.
|
247
|
+
|
248
|
+
if (isArray(context)) {
|
249
|
+
// In array context there are more strict requirements
|
250
|
+
// for token value.
|
251
|
+
|
252
|
+
if ('-' === token) {
|
253
|
+
// Token cannot be a "-" character,
|
254
|
+
// it has no sense in current implementation.
|
255
|
+
throw getError(ErrorMessage.HYPHEN_IS_NOT_SUPPORTED_IN_ARRAY_CONTEXT);
|
256
|
+
}
|
257
|
+
if (!isNumber(token)) {
|
258
|
+
// Token cannot be non-number.
|
259
|
+
throw getError(ErrorMessage.NON_NUMBER_TOKEN_IN_ARRAY_CONTEXT);
|
260
|
+
}
|
261
|
+
if (token.length > 1 && '0' === token[0]) {
|
262
|
+
// Token cannot be non-zero number with leading zero.
|
263
|
+
throw getError(ErrorMessage.TOKEN_WITH_LEADING_ZERO_IN_ARRAY_CONTEXT);
|
264
|
+
}
|
265
|
+
// If all conditions are met, simply return element
|
266
|
+
// with token's value index.
|
267
|
+
// It might be undefined, but it's ok.
|
268
|
+
return context[token];
|
269
|
+
}
|
270
|
+
|
271
|
+
if (isObject(context)) {
|
272
|
+
// In object context we can simply return element w/ key equal to token.
|
273
|
+
// It might be undefined, but it's ok.
|
274
|
+
return context[token];
|
275
|
+
}
|
276
|
+
|
277
|
+
// If context is not an array or an object,
|
278
|
+
// token evaluation is not possible.
|
279
|
+
// This is the expected situation and so we won't throw an error,
|
280
|
+
// undefined value is perfectly suitable here.
|
281
|
+
return;
|
282
|
+
}
|
283
|
+
|
284
|
+
|
285
|
+
/**
|
286
|
+
* Returns Error instance for throwing.
|
287
|
+
* @param {string} message Error message.
|
288
|
+
* @returns {Error}
|
289
|
+
*/
|
290
|
+
function getError(message) {
|
291
|
+
return new Error(ERROR_MESSAGE_PREFIX + message);
|
292
|
+
}
|
293
|
+
|
294
|
+
|
295
|
+
function isObject(o) {
|
296
|
+
return 'object' === typeof o && null !== o;
|
297
|
+
}
|
298
|
+
|
299
|
+
|
300
|
+
function isArray(a) {
|
301
|
+
if (Array.isArray) {
|
302
|
+
return Array.isArray(a);
|
303
|
+
} else {
|
304
|
+
return Object.prototype.toString.call(a) === '[object Array]';
|
305
|
+
}
|
306
|
+
}
|
307
|
+
|
308
|
+
|
309
|
+
function isNumber(n) {
|
310
|
+
return !isNaN(Number(n));
|
311
|
+
}
|
312
|
+
|
313
|
+
|
314
|
+
function isString(s) {
|
315
|
+
return 'string' === typeof s || s instanceof String;
|
316
|
+
}
|
317
|
+
|
318
|
+
|
319
|
+
function isUndefined(v) {
|
320
|
+
return 'undefined' === typeof v;
|
321
|
+
}
|
322
|
+
|
323
|
+
|
324
|
+
// Let's expose API to the world.
|
325
|
+
|
326
|
+
var jsonpointer = {
|
327
|
+
get: getPointedValue
|
328
|
+
};
|
329
|
+
|
330
|
+
if ('object' === typeof exports) {
|
331
|
+
// If `exports` is an object, we are in Node.js context.
|
332
|
+
// We are supposed to act as Node.js package.
|
333
|
+
module.exports = jsonpointer;
|
334
|
+
} else if ('function' === typeof define && define.amd) {
|
335
|
+
// If there is global function `define()` and `define.amd` is defined,
|
336
|
+
// we are supposed to act as AMD module.
|
337
|
+
define(function() {
|
338
|
+
return jsonpointer;
|
339
|
+
});
|
340
|
+
} else {
|
341
|
+
// Last resort.
|
342
|
+
// Let's create global `jsonpointer` object.
|
343
|
+
this.jsonpointer = jsonpointer;
|
344
|
+
}
|
345
|
+
|
346
|
+
}).call((function() {
|
347
|
+
'use strict';
|
348
|
+
return (typeof window !== 'undefined' ? window : this);
|
349
|
+
})());
|