graphdb-workbench 2.4.0-TR4 → 2.4.0-TR6
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.
- package/dist/0.8ddd97ebdd99df8df81c.bundle.js +81 -0
- package/dist/{1.5490c97be3b4fcdeda8e.bundle.js → 1.788bc67c9bb59104ff62.bundle.js} +1 -1
- package/dist/10.466ca8f186ed70c9f258.bundle.js +1 -0
- package/dist/{107.dcf2deff2bea7461baff.bundle.js → 100.d1f50070bbd9e2ca9717.bundle.js} +1 -1
- package/dist/{108.140387e05337d7fcc385.bundle.js → 101.dce1874acf9b14ac92a3.bundle.js} +1 -1
- package/dist/{109.587427dc2670108ae00e.bundle.js → 102.320c5170d6ac075a20bf.bundle.js} +1 -1
- package/dist/{110.4bb6138774e3fa6763cc.bundle.js → 103.5b0be90b20c938d60fca.bundle.js} +1 -1
- package/dist/{111.f5410b71e84ec5dbf4ef.bundle.js → 104.daa5fb04e2903309827f.bundle.js} +1 -1
- package/dist/{112.b34561f7ea2596b8251b.bundle.js → 105.a31cd7dbe765eec42ffb.bundle.js} +1 -1
- package/dist/{113.74f840fa42007312c724.bundle.js → 106.1f15f198e61c7a0e016a.bundle.js} +1 -1
- package/dist/{114.18344d3deecc4a8a3ab6.bundle.js → 107.e37a7541303c623703f2.bundle.js} +1 -1
- package/dist/{115.1f3f4a8c25b37cd8dd94.bundle.js → 108.292777bda47add950d91.bundle.js} +1 -1
- package/dist/{116.d7ac1980f513764c09d1.bundle.js → 109.207bea1b28d973de7b72.bundle.js} +1 -1
- package/dist/11.f80bfefe49f63ee0afd4.bundle.js +1 -0
- package/dist/{117.7a751b484fcd429ceb35.bundle.js → 110.8f9c535af680bbe81fe4.bundle.js} +1 -1
- package/dist/111.aaa1936165632f1ff5f4.bundle.js +1 -0
- package/dist/112.da096677e596acda77a1.bundle.js +1 -0
- package/dist/113.f2d8e14b09f10bc81531.bundle.js +1 -0
- package/dist/{163.7fdea96cd4fe3f28b086.bundle.js → 114.1695304a7d7201bb6015.bundle.js} +1 -1
- package/dist/{164.3c498b802f81f0df4fa9.bundle.js → 115.6d98a9036ff687a3c5cf.bundle.js} +1 -1
- package/dist/{165.5f3bc039160b62f6dee1.bundle.js → 116.eed71e80beb253f31d22.bundle.js} +1 -1
- package/dist/{166.9c1d04d264f8cf07d0be.bundle.js → 117.dc697a1774be0dbbfa86.bundle.js} +1 -1
- package/dist/{167.6aa44f17a62078f88300.bundle.js → 118.1db6db0c2e82ab364c08.bundle.js} +1 -1
- package/dist/{168.0a879909ce9fb3368dc4.bundle.js → 119.f6080120ae51823d3fcc.bundle.js} +1 -1
- package/dist/12.abd88b6dd16809f1360c.bundle.js +29 -0
- package/dist/{169.b99b2f46e3d0760be9f6.bundle.js → 120.34771451a3a967e8d4ea.bundle.js} +1 -1
- package/dist/{170.19f3141fe2c0bac4a2a8.bundle.js → 121.dc9ca7fcd86c0275d97f.bundle.js} +1 -1
- package/dist/{171.8a2caa26155a1010549c.bundle.js → 122.fff86db7c571d5933e7d.bundle.js} +1 -1
- package/dist/{172.58a2dd1febcfd031c813.bundle.js → 123.4a8d2745e61bcf6b8376.bundle.js} +1 -1
- package/dist/{173.fea87e00432d7b909c98.bundle.js → 124.bb7085c3f4a0ca711c11.bundle.js} +1 -1
- package/dist/125.31eef06987be5b247dca.bundle.js +1 -0
- package/dist/{174.923d98f660676a3c46e6.bundle.js → 126.09bde16a483808cac6d6.bundle.js} +1 -1
- package/dist/{175.1a5d8ab662799bb2bcc9.bundle.js → 127.52ce6f6262cda93b95fb.bundle.js} +1 -1
- package/dist/{176.2412f6e9fbfd59797561.bundle.js → 128.9e03a36ee2244c503e0c.bundle.js} +1 -1
- package/dist/{177.a0387fa9858cdf31969b.bundle.js → 129.d3302f07abc1a195dc7e.bundle.js} +1 -1
- package/dist/13.57e6a84ab4b15f6fa83e.bundle.js +1 -0
- package/dist/{178.99c251e0080b2eee9d02.bundle.js → 130.7c0ba469f1dfaa46c93f.bundle.js} +1 -1
- package/dist/{179.ac87a020367466a3067f.bundle.js → 131.746418fd788b03b2337d.bundle.js} +1 -1
- package/dist/132.ee2ec6213caf7d1c7c64.bundle.js +1 -0
- package/dist/133.0365648ed9d08d57f1f2.bundle.js +1 -0
- package/dist/{182.7768992968f4cf8b1247.bundle.js → 134.b9c52b126ff27b4f2868.bundle.js} +1 -1
- package/dist/{183.50280ba8c4594920aefc.bundle.js → 135.8287e1b359ae965ab3bf.bundle.js} +1 -1
- package/dist/136.3448f7632d60ed44da7b.bundle.js +1 -0
- package/dist/{185.b469979cd0a46499b86a.bundle.js → 137.56f1db3f5a7e86f2c627.bundle.js} +1 -1
- package/dist/{186.6ab3f139233151a6c7ec.bundle.js → 138.24bedc399388e949b616.bundle.js} +1 -1
- package/dist/{187.416fb1e591ffb72b0637.bundle.js → 139.a337c9cddccb8b614976.bundle.js} +1 -1
- package/dist/14.94cb73aa00dc13c4a0be.bundle.js +1 -0
- package/dist/140.a0188771cbe1b352c27a.bundle.js +1 -0
- package/dist/{189.f6ae8eaf3307266830bc.bundle.js → 141.937c958d0bdfbe0f2b7b.bundle.js} +1 -1
- package/dist/142.4b69a649376691324200.bundle.js +1 -0
- package/dist/{190.11c1974420443b489bcf.bundle.js → 143.0fcbbd37c95de51dbf30.bundle.js} +1 -1
- package/dist/{193.17028b0acbf28eca4484.bundle.js → 144.5062defbb47045e6ac91.bundle.js} +1 -1
- package/dist/145.d71273ca27c549d97fa3.bundle.js +1 -0
- package/dist/{194.96c134d364d52b73f0f6.bundle.js → 146.fb7bd44dddb196950583.bundle.js} +1 -1
- package/dist/{195.75ef7cb3d3627934c2dd.bundle.js → 147.c2c9783a76584264ae89.bundle.js} +1 -1
- package/dist/{196.d6ff070ee7a4ba287eb5.bundle.js → 148.55236c58048d485ffb6d.bundle.js} +1 -1
- package/dist/{197.e87fc1c14bd3d23e5a5d.bundle.js → 149.4e08a8db4dc3eba1e894.bundle.js} +1 -1
- package/dist/15.21ca7a85eb36ebe27f72.bundle.js +1 -0
- package/dist/{198.360fdcf75ea5c252739c.bundle.js → 150.72c61d8259836d583203.bundle.js} +1 -1
- package/dist/{201.cd2a7345a1428f5293a8.bundle.js → 151.a34be3c9984511a7f943.bundle.js} +1 -1
- package/dist/{211.a8757783488758eba1c1.bundle.js → 155.600d39e392fce0d666fc.bundle.js} +1 -1
- package/dist/156.75aa64bfbc5c671bdb57.bundle.js +1 -0
- package/dist/157.5f948947f529a7691417.bundle.js +1 -0
- package/dist/158.8c6a298d4d5207ff571d.bundle.js +1 -0
- package/dist/{212.2d954e29ca5af8c97baa.bundle.js → 159.b9f1cb2283804c718aed.bundle.js} +1 -1
- package/dist/16.f07dded111446ddd865b.bundle.js +1 -0
- package/dist/{213.fed7ec4dc0f53ec0a07e.bundle.js → 160.79ab804885fea73e5b98.bundle.js} +1 -1
- package/dist/{214.50082e4dbec1b1d9d577.bundle.js → 161.6af5b00838d74c8a1e21.bundle.js} +1 -1
- package/dist/{215.52bace054717a769d4f9.bundle.js → 162.f8c861f98692b9f77bea.bundle.js} +1 -1
- package/dist/{216.219dd2d4d2d8072ae5f8.bundle.js → 163.cba352a16d5cca4c4adb.bundle.js} +1 -1
- package/dist/{217.97823054da3b379ee7f0.bundle.js → 164.79e1dc77644b33bce251.bundle.js} +1 -1
- package/dist/165.27a343a0f99604edfab1.bundle.js +1 -0
- package/dist/{219.e15036da04d7dffe92c4.bundle.js → 166.759409e5b8fea632c554.bundle.js} +1 -1
- package/dist/{220.da2fb225d703c2316b66.bundle.js → 167.12d19772c39be42975f5.bundle.js} +1 -1
- package/dist/{222.1ce51ed4070bdeb0b1d6.bundle.js → 168.ee38e8c76a9d00858119.bundle.js} +1 -1
- package/dist/{223.4c4cccf072cae2dc5ebd.bundle.js → 169.3c1591846673bf11ca74.bundle.js} +1 -1
- package/dist/17.67f6c412175241f7837f.bundle.js +1 -0
- package/dist/{224.4d9246047f0123fa9435.bundle.js → 170.5eddf6934c88e4a9b7dc.bundle.js} +1 -1
- package/dist/{225.a38ca2c632fcddaf2623.bundle.js → 171.41297edf4dfa05443ffe.bundle.js} +1 -1
- package/dist/{226.4ee913b04ecb29790e94.bundle.js → 172.016de31e50fd283d5469.bundle.js} +1 -1
- package/dist/{227.c87d7edaafc2daf536d8.bundle.js → 173.0d2a781a7ee61a63dafb.bundle.js} +1 -1
- package/dist/{228.3b8c944c043de1a866b5.bundle.js → 174.15b0e00c6a0fb42f5d04.bundle.js} +1 -1
- package/dist/{229.1725502d851b770caada.bundle.js → 175.2ab05ac001c415174470.bundle.js} +1 -1
- package/dist/{230.503537d2f10dc7b60429.bundle.js → 176.e7cc55baf3980231487f.bundle.js} +1 -1
- package/dist/{231.a57b1cbc714778f48726.bundle.js → 177.2066747f21c5e062fd17.bundle.js} +1 -1
- package/dist/{232.ea7beb5999855d08d950.bundle.js → 178.80f48e411a003d519c4e.bundle.js} +1 -1
- package/dist/{233.e674e9f39ed5f158139c.bundle.js → 179.476d2bfbb2317af7b5e7.bundle.js} +1 -1
- package/dist/18.9e3f718ec0a6471519a8.bundle.js +2 -0
- package/dist/{234.9efb9061e2a179bfab6b.bundle.js → 180.763562250a46346b8d86.bundle.js} +1 -1
- package/dist/{235.21d4f7f044972671aa00.bundle.js → 181.9fe025b3479ffefba1d9.bundle.js} +1 -1
- package/dist/{236.b2ed6b46b35579b4114e.bundle.js → 182.009c241449a1eb2ac29f.bundle.js} +1 -1
- package/dist/{237.505b2532de0a49a2df10.bundle.js → 183.8a96a0ec8aa4620d1e0d.bundle.js} +1 -1
- package/dist/{238.704bb9b8d2f9e0ee00f3.bundle.js → 184.7c705cabe8d04b3b06e8.bundle.js} +1 -1
- package/dist/{239.373deec8d2179e51dbff.bundle.js → 185.a1cf0348919245c53cd1.bundle.js} +1 -1
- package/dist/{240.ed9eeaa8432771f37a04.bundle.js → 186.ded6e1a098dcc569332d.bundle.js} +1 -1
- package/dist/{241.5a49bd4cf83a74efbd2c.bundle.js → 187.ea7bc48b80d548f51bca.bundle.js} +1 -1
- package/dist/{242.b35febbf2edf5b952f47.bundle.js → 188.451262ceb982ea31581c.bundle.js} +1 -1
- package/dist/{243.a2b527f074bd93c1e5c6.bundle.js → 189.0f846d70111ae52775f0.bundle.js} +1 -1
- package/dist/{34.62a1f3e816d94bb4d2ee.bundle.js → 19.04988a07edd3b44f80d8.bundle.js} +2 -2
- package/dist/{244.783e6bd3b079d027ee5b.bundle.js → 190.9a3e6964afd6b02feb6f.bundle.js} +1 -1
- package/dist/{245.452d7d356d9cfb54cdb2.bundle.js → 191.3d248926185dcbec4042.bundle.js} +1 -1
- package/dist/{246.9157c1205858b23ca1e3.bundle.js → 192.6b0ebcfe8146ffc42474.bundle.js} +1 -1
- package/dist/{247.357da7858cf91a20d3f4.bundle.js → 193.a3bd93c9e479c84af5ad.bundle.js} +1 -1
- package/dist/{248.c5669b3579dc09d0b18a.bundle.js → 194.67102dcb75802f1b14e4.bundle.js} +1 -1
- package/dist/{249.933643fb85f54f31d6f8.bundle.js → 195.cede8d957f57c7fa54ea.bundle.js} +1 -1
- package/dist/{250.0445cc589351276a8a70.bundle.js → 196.1972b5b29818dfe7a59f.bundle.js} +1 -1
- package/dist/{251.74b688d20e2104421167.bundle.js → 197.95bba07c104227cb0cda.bundle.js} +1 -1
- package/dist/{252.c04831837bdb1aa50d56.bundle.js → 198.060c209cca20cd599592.bundle.js} +1 -1
- package/dist/{253.8c932b1663eeba95e515.bundle.js → 199.6307a1f9e1388b175798.bundle.js} +1 -1
- package/dist/2.2ae372f689ea4e7a0143.bundle.js +27 -0
- package/dist/20.549ce5d2772e27af25ae.bundle.js +1 -0
- package/dist/{254.80d97907b07288cc7e22.bundle.js → 200.00d35982c8649bae7021.bundle.js} +1 -1
- package/dist/{255.c3b19d5ae694e459d929.bundle.js → 201.7bf198e921451d294889.bundle.js} +1 -1
- package/dist/{256.83f941b2673fe5bdbf53.bundle.js → 202.6d00b7de6cce7aaff157.bundle.js} +1 -1
- package/dist/{257.a4c04e45dd2f9eaebcfe.bundle.js → 203.a6132d6376e1af66632b.bundle.js} +1 -1
- package/dist/{258.7b43971fc9ad205cdb19.bundle.js → 204.1605970c9a739a99b76b.bundle.js} +1 -1
- package/dist/205.33b4d23ec94a45e50cb5.bundle.js +1 -0
- package/dist/206.e44c67d61567df35e846.bundle.js +1 -0
- package/dist/21.6b9b348c39efeb89a3ae.bundle.js +3 -0
- package/dist/22.5aca20db0715699f3eea.bundle.js +1 -0
- package/dist/23.c1970f9e889ddb11a9c3.bundle.js +1 -0
- package/dist/24.ca282d4efab61a311ee6.bundle.js +1 -0
- package/dist/25.4bd2e60f18cae575696d.bundle.js +1 -0
- package/dist/26.4e5669b006c8e7c41709.bundle.js +1 -0
- package/dist/{36.620669bc6ae21144c6b6.bundle.js → 27.19d795337c8532536b60.bundle.js} +1 -1
- package/dist/28.e4c54f39a27eb7184dff.bundle.js +1 -0
- package/dist/29.5a92c5b2ccc6d50aa3f5.bundle.js +1 -0
- package/dist/{3.f96eb75c9551d6972f39.bundle.js → 3.81f30404e6dfbb8dda88.bundle.js} +1 -1
- package/dist/{39.245e616f38a2ce5f7f05.bundle.js → 30.667623ebdc7ef9ca677d.bundle.js} +1 -1
- package/dist/{40.b3b99af21212ace032de.bundle.js → 31.db83dddc0849990e1b54.bundle.js} +1 -1
- package/dist/32.033a00a9b2165aaac8cc.bundle.js +1 -0
- package/dist/33.e80e4d4c91b3eafc4eac.bundle.js +1 -0
- package/dist/{43.29c86c706e3a17a00c0a.bundle.js → 34.45920768d6336ad59e03.bundle.js} +1 -1
- package/dist/35.320552dc69ff603399f6.bundle.js +1 -0
- package/dist/36.1394662855ec82ef2f45.bundle.js +1 -0
- package/dist/{49.7ffa2f30a5f4cd0949e4.bundle.js → 37.355a41ab12bf0e8fc9a5.bundle.js} +1 -1
- package/dist/{50.3aa669e21e0610c3bc4e.bundle.js → 38.2274252e7422eae866a4.bundle.js} +1 -1
- package/dist/39.29a34cc3491f4689833c.bundle.js +1 -0
- package/dist/4.f0be2e057de5d159cd0f.bundle.js +1 -0
- package/dist/40.f4e721cdc46f28cb9e31.bundle.js +1 -0
- package/dist/41.0591302803fd6e8a8d55.bundle.js +1 -0
- package/dist/42.098871e72b2e21ebde2e.bundle.js +1 -0
- package/dist/43.9d47a890b90649414c7a.bundle.js +1 -0
- package/dist/{52.97bf9f43782f609a0294.bundle.js → 44.a4b749d353fa949f5dba.bundle.js} +1 -1
- package/dist/45.7965270c9e42606966f7.bundle.js +1 -0
- package/dist/{56.cb189ff4761812abffbc.bundle.js → 46.d9646335c1912fd6107f.bundle.js} +1 -1
- package/dist/47.07ccb0fe7aad8cb89d01.bundle.js +1 -0
- package/dist/{57.0eda7532bcd6a0b0eab7.bundle.js → 48.9c29c700716373bd7e12.bundle.js} +1 -1
- package/dist/49.8e242a7279fb7195ba15.bundle.js +1 -0
- package/dist/5.7aa48011f5824ef38a62.bundle.js +1 -0
- package/dist/{62.571cdb63328e91464d43.bundle.js → 50.e987705a320f4906c58d.bundle.js} +1 -1
- package/dist/{63.f600bbbb70cc400de555.bundle.js → 51.ff92f9f239f8f97048b6.bundle.js} +1 -1
- package/dist/{64.6d72b611367d6b560330.bundle.js → 52.07dd1a48ace7e9ab9ead.bundle.js} +1 -1
- package/dist/{65.a7b2213bbd40280df0a5.bundle.js → 53.400a1fcf39baa2fc59d9.bundle.js} +1 -1
- package/dist/{66.3e466dfc0a69453f865b.bundle.js → 54.dd5a8677dcc9a06caa2c.bundle.js} +1 -1
- package/dist/{67.cf82b67b00194847514a.bundle.js → 55.8e57a18734f32fa6cb56.bundle.js} +1 -1
- package/dist/{68.5a051010c038b2802987.bundle.js → 56.d6fb73479e2cdd438e3d.bundle.js} +1 -1
- package/dist/{69.ddc71f4b9f1e7da4eeef.bundle.js → 57.07b2c0fed662cdb0aea0.bundle.js} +1 -1
- package/dist/{70.f1de136807c1e4103893.bundle.js → 58.bfc20b852e83ebafdde0.bundle.js} +1 -1
- package/dist/{71.57c0e62af7603cc2d115.bundle.js → 59.dac44beb033c271559d4.bundle.js} +1 -1
- package/dist/{10.667be134b951b879fa9b.bundle.js → 6.5a35fd9ea9dbb6193769.bundle.js} +1 -1
- package/dist/{72.9e18c6a23a73783c1fb8.bundle.js → 60.82fd54ad428cdb193411.bundle.js} +1 -1
- package/dist/61.d6c75bcf4a08bb125eea.bundle.js +1 -0
- package/dist/62.75b49cf1e2f3e4fb2301.bundle.js +1 -0
- package/dist/63.3fbaaafa418074b935d1.bundle.js +1 -0
- package/dist/64.80f49b8969c06b9c8d79.bundle.js +1 -0
- package/dist/65.29ec911dbcea8052adbe.bundle.js +1 -0
- package/dist/66.d6d8b1a2811dc5c28971.bundle.js +1 -0
- package/dist/{76.1cbb2a99d9651e61abbb.bundle.js → 67.f747b9cb5203299f8509.bundle.js} +1 -1
- package/dist/68.7b81d7e159629e51c8d9.bundle.js +1 -0
- package/dist/69.9fc1ef9b41b3472b2acc.bundle.js +1 -0
- package/dist/7.918d17ad8ca7542a1c29.bundle.js +2 -0
- package/dist/70.5253ad601afb3af88612.bundle.js +1 -0
- package/dist/71.894a48c6ca57deff0153.bundle.js +1 -0
- package/dist/72.47e2cbd379ffb23c3379.bundle.js +1 -0
- package/dist/{78.69d7a8add1a4b2f8b8c9.bundle.js → 73.a754c426ac942d226bef.bundle.js} +1 -1
- package/dist/74.bafb03e3f72970b87f1f.bundle.js +1 -0
- package/dist/{80.534fb2c4a2b5f1dc6997.bundle.js → 75.5ba36f13f932ff9c4682.bundle.js} +1 -1
- package/dist/76.708d37acf7417360bab1.bundle.js +1 -0
- package/dist/{82.b203c76c1989c0a959c7.bundle.js → 77.3d4970ae6ddbb222d996.bundle.js} +1 -1
- package/dist/{84.76f56de0939780670185.bundle.js → 78.8c662cd468fed2674055.bundle.js} +1 -1
- package/dist/79.1a8671467b23048416d4.bundle.js +1 -0
- package/dist/{9.c4a524e5fb28477dbd56.bundle.js → 8.70aa21e579935d712d44.bundle.js} +1 -1
- package/dist/{87.3cb84816914cbd678d52.bundle.js → 80.70e1e6cb26781cc128a8.bundle.js} +1 -1
- package/dist/81.e02fff14227340d25c75.bundle.js +1 -0
- package/dist/{89.c1b18b7607b3636357de.bundle.js → 82.4d8ebf82ff4dfca7ba4c.bundle.js} +1 -1
- package/dist/83.d40d864022257c2f50b8.bundle.js +1 -0
- package/dist/{91.c71cd8de72bbe52d501f.bundle.js → 84.7f1f1612f123c4a925c3.bundle.js} +1 -1
- package/dist/85.2e9d7484bb1227ae2490.bundle.js +1 -0
- package/dist/86.e218f57ad67e6b17a698.bundle.js +1 -0
- package/dist/87.b7a6b7052bbe2796edff.bundle.js +1 -0
- package/dist/{95.243b5167ccf35cacd498.bundle.js → 88.229f7abefce508120f4e.bundle.js} +1 -1
- package/dist/89.f7757ded76f75ff174b0.bundle.js +1 -0
- package/dist/9.a6453f68f21d6fcca1c5.bundle.js +1 -0
- package/dist/{97.a1c8b58aa7bcdf532e70.bundle.js → 90.a1c5d63ddae6f436541a.bundle.js} +1 -1
- package/dist/91.4a872d70e5836c0e600a.bundle.js +1 -0
- package/dist/{99.30c647069ee9f24fbfa6.bundle.js → 92.cdafe712be2f6d923801.bundle.js} +1 -1
- package/dist/93.4e2c507b78da4804cf8f.bundle.js +1 -0
- package/dist/94.b31b27322fac75f8d3df.bundle.js +1 -0
- package/dist/95.fab888cea20cd57ebcce.bundle.js +1 -0
- package/dist/96.43b06f89af3169593df1.bundle.js +1 -0
- package/dist/97.650edb9476cafb157f96.bundle.js +1 -0
- package/dist/98.8cfaded668a83888b06c.bundle.js +1 -0
- package/dist/99.1c23c02d0b709ed38b6c.bundle.js +1 -0
- package/dist/bundle.65115def965cebd33048.bundle.js +91 -0
- package/dist/css/aclmanagement.css +27 -0
- package/dist/css/backup-and-restore.css +7 -0
- package/dist/css/bootstrap-graphdb-theme-dark-auto.css +1 -40
- package/dist/css/bootstrap-graphdb-theme.css +26 -21
- package/dist/css/clustermanagement.css +13 -6
- package/dist/css/explore.css +3 -0
- package/dist/css/graphs-config.css +3 -8
- package/dist/css/jdbc.css +3 -0
- package/dist/css/similarity.css +8 -0
- package/dist/i18n/locale-en.json +81 -16
- package/dist/i18n/locale-fr.json +81 -18
- package/dist/img/{graphdb-logo-sq.c868fdcaf0b1430c4f27ab196b8c4f53.svg → graphdb-logo-sq.3a5fb4b3f1e0e248dc308da1bf4de9f8.svg} +2 -2
- package/dist/img/{graphdb-logo.9ab420f9c6aa15ec68948e14c054a9df.svg → graphdb-logo.741abf3e3881e1566e4504c9f00b91c0.svg} +2 -3
- package/dist/index.html +12 -7
- package/dist/js/angular/chatgpt/templates/chat.html +113 -0
- package/dist/js/angular/chatgpt/templates/chatInfo.html +11 -0
- package/dist/js/angular/chatgpt/templates/modal/settings.html +61 -0
- package/dist/js/angular/core/directives/queryeditor/templates/query-editor.html +0 -3
- package/dist/js/angular/core/directives/rdfresourcesearch/templates/rdfResourceSearchTemplate.html +1 -1
- package/dist/js/angular/core/templates/modal/modal-warning.html +1 -1
- package/dist/js/angular/import/templates/urlImport.html +2 -0
- package/dist/js/angular/security/templates/user.html +3 -2
- package/dist/license-checker.json +6 -54
- package/dist/main.080106ec44e3da446ec9.bundle.js +1 -0
- package/dist/main.c98e458ad4fe3aaa6d2f.css +1 -0
- package/dist/pages/aclmanagement.html +92 -0
- package/dist/pages/autocomplete.html +1 -1
- package/dist/pages/choose-repository-type.html +1 -1
- package/dist/pages/cluster-management/clusterInfo.html +3 -3
- package/dist/pages/connectorsInfo.html +9 -8
- package/dist/pages/create-index.html +170 -243
- package/dist/pages/dependencies.html +1 -1
- package/dist/pages/domainRangeInfo.html +2 -2
- package/dist/pages/edit.html +17 -26
- package/dist/pages/explore.html +50 -79
- package/dist/pages/export.html +1 -1
- package/dist/pages/find.html +1 -1
- package/dist/pages/graph-config/saveGraphConfig.html +284 -218
- package/dist/pages/graphs-visualizations.html +11 -10
- package/dist/pages/guides.html +1 -1
- package/dist/pages/import.html +1 -1
- package/dist/pages/jdbc-create.html +126 -180
- package/dist/pages/monitor/backup-and-restore.html +74 -0
- package/dist/pages/monitor/queries.html +1 -1
- package/dist/pages/monitor/resources.html +2 -2
- package/dist/pages/namespaces.html +2 -2
- package/dist/pages/plugins.html +1 -1
- package/dist/pages/rdfClassHierarchyInfo.html +7 -7
- package/dist/pages/rdfrank.html +2 -2
- package/dist/pages/repositories.html +2 -2
- package/dist/pages/repository.html +2 -2
- package/dist/pages/similarity-indexes.html +100 -68
- package/dist/pages/sparql-template-create.html +30 -45
- package/dist/pages/sparql-templates.html +1 -1
- package/dist/pages/sparql.html +3 -3
- package/dist/pages/webapi.html +2 -2
- package/dist/plugins.js +218 -62
- package/dist/res/swagger/index.html +27 -27
- package/dist/{vendor.4a6b544e02cdd53b6b37.bundle.js → vendor.9aafdc625d495802a4a4.bundle.js} +7 -7
- package/package.json +1 -3
- package/dist/0.56a5a06efe7885dc6849.bundle.js +0 -1
- package/dist/100.88679416e7cc60edd7bc.bundle.js +0 -1
- package/dist/101.39716a722f5f9bb2fd8b.bundle.js +0 -1
- package/dist/102.f41747ae2cc1c89cbb20.bundle.js +0 -1
- package/dist/103.d7a8f61c8f072c83830c.bundle.js +0 -1
- package/dist/104.5d41d8e75e71dacefabd.bundle.js +0 -1
- package/dist/105.f56039194c8e875f74e3.bundle.js +0 -1
- package/dist/106.30105f5cfe4ece278ebe.bundle.js +0 -1
- package/dist/11.1c3e79a8c7e229487072.bundle.js +0 -1
- package/dist/118.aa8bf4ecb2029e143e0c.bundle.js +0 -1
- package/dist/119.3676c108a482ffd881e7.bundle.js +0 -1
- package/dist/12.99348f02deec7b1e3d1a.bundle.js +0 -1
- package/dist/120.7dcf4f0e66083e34b1dd.bundle.js +0 -1
- package/dist/121.2d3cca8a66275effb988.bundle.js +0 -1
- package/dist/122.3e982ba2df6e9b39d94d.bundle.js +0 -1
- package/dist/123.f325bad2781420e21084.bundle.js +0 -1
- package/dist/124.8b55a79b1fe16bd8f2a0.bundle.js +0 -1
- package/dist/125.980e1ffd96fc8c25e16a.bundle.js +0 -1
- package/dist/126.e7e7ab45a49d51099b41.bundle.js +0 -1
- package/dist/127.d515b8b57bdd04e68691.bundle.js +0 -1
- package/dist/128.a864c5c9fde05155330b.bundle.js +0 -1
- package/dist/129.3a22ce95bce64279d896.bundle.js +0 -1
- package/dist/13.b74b0069d2304fd3e980.bundle.js +0 -110
- package/dist/130.ab8f76b719145fa27c38.bundle.js +0 -1
- package/dist/131.c7d49f81105312df82d2.bundle.js +0 -1
- package/dist/132.def893f33a3310096b26.bundle.js +0 -1
- package/dist/133.8c113a99d6bb55a3520c.bundle.js +0 -1
- package/dist/134.90b6cc3dbd4339a2a3e4.bundle.js +0 -1
- package/dist/135.d97dc48a65547d243610.bundle.js +0 -1
- package/dist/136.b7c5a8bfb9fe93efb7f1.bundle.js +0 -1
- package/dist/137.b9443862bb2c8b3a7f89.bundle.js +0 -1
- package/dist/138.2437e8ef36e77aab8c98.bundle.js +0 -1
- package/dist/139.fb9749354d4db5dd4806.bundle.js +0 -1
- package/dist/14.c9a9dae592bac00f2984.bundle.js +0 -107
- package/dist/140.fd28680530fa83558206.bundle.js +0 -1
- package/dist/141.8eb54ac5cf6e9b464f9c.bundle.js +0 -1
- package/dist/142.19c5e8483c0f7554343c.bundle.js +0 -1
- package/dist/143.0ea6739025ff0d66206c.bundle.js +0 -1
- package/dist/144.c6bd2911317424e5a3a6.bundle.js +0 -1
- package/dist/145.1fb10fe5070b0fae6a73.bundle.js +0 -1
- package/dist/146.742ab720c7960b942f49.bundle.js +0 -1
- package/dist/147.1a6b07d237ee5fa97b9e.bundle.js +0 -1
- package/dist/148.93176b251987fbe08682.bundle.js +0 -1
- package/dist/149.05e426e2830316c1ae37.bundle.js +0 -1
- package/dist/15.7d72bebfb380d57a5d7f.bundle.js +0 -107
- package/dist/150.ddfe9a3673a52ede6070.bundle.js +0 -1
- package/dist/151.4f1a8b08a5ab0c765bb3.bundle.js +0 -1
- package/dist/152.402a35b706d1576322d8.bundle.js +0 -1
- package/dist/153.05f27db96abe2a41442e.bundle.js +0 -1
- package/dist/154.5419c8676479c4711979.bundle.js +0 -1
- package/dist/155.eeff3bc64cb14d2dbda6.bundle.js +0 -1
- package/dist/156.d3fb5de1ef57130b3f80.bundle.js +0 -1
- package/dist/157.3ce564c4f60cc303bf85.bundle.js +0 -1
- package/dist/158.79a8b3810fb6a1a5f9f2.bundle.js +0 -1
- package/dist/159.9b2cc554ea869a5fa730.bundle.js +0 -1
- package/dist/16.b638b2864acaeb21d888.bundle.js +0 -2
- package/dist/160.d804fbb4d174d5c83215.bundle.js +0 -1
- package/dist/161.31e6161991246f867388.bundle.js +0 -1
- package/dist/162.24a908e666fadb04f515.bundle.js +0 -1
- package/dist/17.6c0a91860d711ee3dd5a.bundle.js +0 -1
- package/dist/18.0b1e03a7fdc24911c447.bundle.js +0 -1
- package/dist/180.e848547da1995e2fb239.bundle.js +0 -1
- package/dist/181.ccff11dcebfeaed00e12.bundle.js +0 -1
- package/dist/184.eee2ff2db2bf14cac74a.bundle.js +0 -1
- package/dist/188.1c4b91144b9663d0b1b7.bundle.js +0 -1
- package/dist/19.63362213e1d3111c9e6d.bundle.js +0 -3
- package/dist/191.75b55f49a694f37601ff.bundle.js +0 -1
- package/dist/192.5552d2ddc99535175c89.bundle.js +0 -1
- package/dist/199.ddd3fbb4044e4df7d32d.bundle.js +0 -1
- package/dist/2.9b647092808d8ee8e1d3.bundle.js +0 -2
- package/dist/20.ec630f91b928f6eccc63.bundle.js +0 -2
- package/dist/200.0f243bd061418b8473fd.bundle.js +0 -1
- package/dist/207.38b86372cdec62c01a77.bundle.js +0 -1
- package/dist/208.9a40aaa6219459a4e16b.bundle.js +0 -1
- package/dist/209.c7eb527c086544fb3df8.bundle.js +0 -1
- package/dist/21.cefb98d7eae7a769cb76.bundle.js +0 -1
- package/dist/210.1f965f0b4262d24d033e.bundle.js +0 -1
- package/dist/218.3ac3058f787922734e91.bundle.js +0 -1
- package/dist/22.235d28b12cb5722c349b.bundle.js +0 -1
- package/dist/221.03b9a55b4132fc85e678.bundle.js +0 -1
- package/dist/23.907ac63108048f0b172f.bundle.js +0 -1
- package/dist/24.14fb2f3fd7ba5f69f29e.bundle.js +0 -1
- package/dist/25.2749579cbcd910709739.bundle.js +0 -1
- package/dist/259.21acfb9fb0aaf51f2e20.bundle.js +0 -1
- package/dist/26.364a0e93ee93e82b4564.bundle.js +0 -2
- package/dist/260.a31ce7c290a1ae5d6ecb.bundle.js +0 -1
- package/dist/261.2ced6ca77dcf5d501eb5.bundle.js +0 -1
- package/dist/262.afed51447318f0355284.bundle.js +0 -1
- package/dist/27.45820dea570ef07fb9a2.bundle.js +0 -1
- package/dist/28.a3cd1ecd576eb294c54b.bundle.js +0 -1
- package/dist/29.5dbf08caa20f3ec48aca.bundle.js +0 -1
- package/dist/30.31d8c29ee0fcd50fb21d.bundle.js +0 -1
- package/dist/31.89d2d2d3c999c8773a0e.bundle.js +0 -1
- package/dist/32.79005d5fb812da7d3d74.bundle.js +0 -1
- package/dist/33.6c2fabd07ae474179afd.bundle.js +0 -1
- package/dist/35.57e050a5b6be87f3ad82.bundle.js +0 -1
- package/dist/37.f8960409b8d14bcfa3c4.bundle.js +0 -1
- package/dist/38.870ab16714c3566bbdce.bundle.js +0 -1
- package/dist/4.cdb9a24532e9be533c60.bundle.js +0 -1
- package/dist/41.efa3146f107de7a56a9b.bundle.js +0 -2
- package/dist/42.1a8f1b2324ee2ef2ef44.bundle.js +0 -1
- package/dist/44.a8c6035371fb99e9dcef.bundle.js +0 -1
- package/dist/45.41e5e22424aa4522e3dd.bundle.js +0 -1
- package/dist/46.5dbe1d853e0ef036334b.bundle.js +0 -1
- package/dist/47.7346e18681050eb3a661.bundle.js +0 -1
- package/dist/48.c35763b11693032dae0a.bundle.js +0 -1
- package/dist/5.e717c0eac0b40dc43c17.bundle.js +0 -1
- package/dist/51.953f69a28da65cad2e47.bundle.js +0 -1
- package/dist/53.a722cf06d6344736ea2f.bundle.js +0 -1
- package/dist/54.48a8d7fdc58c921c34ad.bundle.js +0 -1
- package/dist/55.6994b1b7484906455fe6.bundle.js +0 -1
- package/dist/58.a55aa82af6b0d110d343.bundle.js +0 -1
- package/dist/59.6bb90390d543d7351383.bundle.js +0 -1
- package/dist/6.3bf59eb64c1480f114c5.bundle.js +0 -1
- package/dist/60.2e4ae13444d7d66e47a1.bundle.js +0 -1
- package/dist/61.206f717e356f00d4fa9f.bundle.js +0 -1
- package/dist/7.fb15ff39d722a7df9b77.bundle.js +0 -107
- package/dist/73.58563d0d631c92e5e24b.bundle.js +0 -1
- package/dist/74.ebc22a5906eab6dedf80.bundle.js +0 -1
- package/dist/75.bc39e0b34dd1ea1401e5.bundle.js +0 -1
- package/dist/77.80b0d2dbf388e84c053b.bundle.js +0 -1
- package/dist/79.944c1eafa2fd65bde3e5.bundle.js +0 -1
- package/dist/8.8331e3d22fc3944ba205.bundle.js +0 -1
- package/dist/81.83a2441b2e2a5eeb62da.bundle.js +0 -1
- package/dist/83.14c84fc42c5747ce0999.bundle.js +0 -1
- package/dist/85.801406790f1b10d55ee5.bundle.js +0 -1
- package/dist/86.cc918f7d655da56642fe.bundle.js +0 -1
- package/dist/88.587d6b39875f9b4f3420.bundle.js +0 -1
- package/dist/90.6cc272debf51320b2540.bundle.js +0 -1
- package/dist/92.3bde0b268814ffb3f6f7.bundle.js +0 -1
- package/dist/93.e1f2b10711d8f09537ef.bundle.js +0 -1
- package/dist/94.e412652fa21174a2826c.bundle.js +0 -1
- package/dist/96.a7802afaf47a9f432463.bundle.js +0 -1
- package/dist/98.d5379e249faf32951849.bundle.js +0 -1
- package/dist/bundle.996e09635f3049bf6763.bundle.js +0 -92
- package/dist/css/create-similarity-index.css +0 -8
- package/dist/css/jdbc-create.css +0 -4
- package/dist/css/lib/ontotext-yasgui-web-component.css +0 -214
- package/dist/css/sparql-editor.css +0 -42
- package/dist/js/angular/core/directives/yasgui-component/templates/yasgui-component.html +0 -17
- package/dist/main.00dfc8bbff986e664ea1.bundle.js +0 -1
- package/dist/main.2adeda79845acbacf545.css +0 -1
- package/dist/pages/sparql-editor.html +0 -17
- package/dist/polyfills-dom.46bb91eaee707b3d376f.bundle.js +0 -19
- package/dist/vendors~polyfills-core-js.18d20222cd8c2a1f7502.bundle.js +0 -1
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[14,7,18,49,56,64,65,66,67,68,69,70,71,72,81,82,121,122,123,141,142,160,176,178,179,182,198,201],{100:function(e,t,n){"use strict";n.r(t);n(4),n(10),n(13),n(349),n(56);var r=n(77),i=n(49),o=n(78),a=n(79),s=n(80),l=n(81),u=n(82),c=n(83),d=n(84),p=n(85);angular.module("graphdb.framework.jmx.resources.controllers",["ui.bootstrap","graphdb.framework.core.services.repositories","graphdb.framework.rest.monitoring.service","graphdb.framework.rest.cluster.service"]).controller("ResourcesCtrl",["$scope","$rootScope","$timeout","MonitoringRestService","$translate","$repositories","$q","ClusterRestService","$filter",function(e,t,n,f,h,g,m,v,y){e.AVAILABLE_TABS=Object.freeze({RESOURCE_MONITOR:"resource",PERFORMANCE_MONITOR:"performance",CLUSTER_HEALTH:"cluster"});const x=window.location.hash.slice(1),b=Object.keys(e.AVAILABLE_TABS).find(t=>e.AVAILABLE_TABS[t]===x);e.activeTab=e.AVAILABLE_TABS[b]||e.AVAILABLE_TABS.RESOURCE_MONITOR,t.$on("$translateChangeSuccess",(function(t,n){[e.resourceMonitorData,e.performanceMonitorData,e.structuresMonitorData,e.clusterHealthData].forEach(e=>{Object.values(e.charts).forEach(e=>e.refresh())})})),e.resourceMonitorData={error:{hasError:!1,message:"",retries:0},charts:{cpuLoad:new a.CpuLoadChart(h),fileDescriptors:new r.FileDescriptorsChart(h,y),heapMemory:new i.HeapMemoryChart(h),offHeapMemory:new o.NonHeapMemoryChart(h),diskStorage:new s.DiskStorageChart(h)}},e.performanceMonitorData={error:{hasError:!1,message:"",retries:0},charts:{connectionsChart:new c.ConnectionsChart(h),epoolChart:new p.EpoolChart(h),queriesChart:new l.QueriesChart(h)}},e.structuresMonitorData={error:{hasError:!1,message:"",retries:0},charts:{globalCacheChart:new u.GlobalCacheChart(h,y)}},e.clusterHealthData={error:{hasError:!1,message:"",retries:0},charts:{clusterHealthChart:new d.ClusterHealthChart(h)}},e.hasCluster=!1;e.loader=!0,e.switchTab=t=>{e.activeTab=t,window.location.hash=t},e.getActiveRepository=function(){return g.getActiveRepository()};const E=function(e){return f.monitorQueryTransactionStatistics(e).then((function(e){return e.data}))},C=function(e){return f.monitorQuery(e).then((function(e){return e.data}))},T=function(){return f.monitorCluster()},S=e=>{if(e.chartsHolder.error.hasError){if(3===e.chartsHolder.error.retries)return e.poll&&n.cancel(e.poll),Promise.resolve();e.chartsHolder.error.retries++}return e.fetchFn().then((function(t){w(t,e)})).then(()=>{A(e)}).catch(t=>{L(e,t)}).finally(()=>{e.poll&&n.cancel(e.poll),e.poll=n(()=>S(e),2e3)})},w=(e,t,n)=>{const r=e.data;r&&N(r,t,n)},N=(e,t,n)=>{const r=new Date;n?n(r,e):Object.values(t.chartsHolder.charts).forEach(t=>{t.addData(r,e)})},L=(e,t)=>{e.chartsHolder.error.hasError=!!t,e.chartsHolder.error.hasError&&(e.chartsHolder.error.message=getError(t))},A=e=>{e.chartsHolder.error.hasError=!1,e.chartsHolder.error.message=""};e.monitors=[],e.monitors.push({chartsHolder:e.resourceMonitorData,error:{hasError:!1,message:"",retries:0},fetchFn:function(){return f.monitorResources()},poll:null}),e.monitors.push({chartsHolder:e.structuresMonitorData,error:{hasError:!1,message:"",retries:0},fetchFn:function(){const t=e.getActiveRepository();return t?f.monitorStructures(t):Promise.resolve()},poll:null}),e.monitors.push({chartsHolder:e.performanceMonitorData,error:{hasError:!1,message:"",retries:0},fetchFn:function(){const t=e.getActiveRepository();return t?m.all([E(t),C(t)]).then(e=>{const[t,n]=e;return{data:{performanceData:t,activeQueryData:n}}}):Promise.resolve()},poll:null}),v.getNodeStatus().then(()=>{e.hasCluster=!0;const t={chartsHolder:e.clusterHealthData,fetchFn:T,poll:null};e.monitors.push(t),S(t)}).catch(()=>{e.hasCluster=!1});let I=null;m.all(e.monitors.map(e=>S(e))).finally(()=>{e.loader&&(I&&n.cancel(I),I=n((function(){e.loader=!1}),500))}),e.$on("$destroy",(function(){I&&n.cancel(I);for(const t of e.monitors)t.poll&&n.cancel(t.poll)}))}])},108:function(e,t,n){"use strict";n.r(t),n.d(t,"DEFAULT_SPARQL_QUERY",(function(){return r})),n.d(t,"JdbcConfigurationInfo",(function(){return i}));const r="PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\n\n# Selects two variables to use as columns\nSELECT ?id ?label {\n ?id rdfs:label ?label\n # The following placeholder must be present in the query\n #!filter\n}";class i{constructor(e=r,t=!0,n){this.query=e,this.jdbcConfigurationName=n,this.isNewJdbcConfiguration=t,this.isValidQuery=!0,this.isValidQueryType=!0,this.hasUndefinedColumns=!1,this.isColumnsEmpty=!1,this.columns=[]}}},109:function(e,t,n){"use strict";n.r(t),n.d(t,"JdbcConfigurationError",(function(){return r}));class r extends Error{constructor(e,t){super(e),this.jdbcConfigurationInfo=t}}},110:function(e,t,n){"use strict";n.r(t),n.d(t,"JdbcColumn",(function(){return r})),n.d(t,"toJDBCColumns",(function(){return i})),n.d(t,"updateColumn",(function(){return o}));class r{constructor(){this.column_name="",this.column_type="",this.sparql_type="",this.nullable=!0}}const i=(e=[],t)=>e.map(e=>({column_name:e,column_type:t[e].column_type,nullable:!0,sparql_type:t[e].sparql_type})),o=(e,t)=>{e.column_type=t[e.column_name].column_type,e.sparql_type=t[e.column_name].sparql_type}},149:function(e,t,n){"use strict";n.r(t);n(10),n(13),n(47),n(4),n(17);var r=n(108),i=n(48),o=n(109),a=n(45),s=n(110),l=n(44);function u(e,t,n,r,i,o){e.getSqlConfigurations=function(){!t.getActiveRepository()||t.isActiveRepoOntopType()||t.isActiveRepoFedXType()?e.jdbcConfigurations=[]:n.getJdbcConfigurations().success((function(t){e.jdbcConfigurations=t})).error((function(e){const t=getError(e);r.error(t,o.instant("jdbc.not.get.SQL.msg"))}))},e.$watch((function(){return t.getActiveRepository()}),(function(){e.getSqlConfigurations()})),e.deleteConfiguration=function(t){i.openSimpleModal({title:o.instant("common.warning"),message:o.instant("jdbc.delete.sql.table.warning.msg",{name:t}),warning:!0}).result.then((function(){n.deleteJdbcConfiguration(t).success((function(){e.getSqlConfigurations()})).error((function(e){r.error(getError(e),o.instant("jdbc.not.delete.sql.msg"))}))}))}}function c(e,t,n,u,c,d,p,f,h,g,m,v,y,x,b,E){t.emptySparqlResponse='{"head": {"vars": []},"results": {"bindings": []}}',t.getSuggestionSqlType="",t.sqlTypes=[],t.activeTab=1,t.jdbcConfigurationInfo=new r.JdbcConfigurationInfo,t.jdbcConfigurationInfo.jdbcConfigurationName=u.search().name||"",t.saveOrUpdateExecuted=!1,t.jdbcConfigurationInfo.isNewJdbcConfiguration=!t.jdbcConfigurationInfo.jdbcConfigurationName,t.language=b.getLanguage(),t.isDirty=!1,t.prefixes=[],t.isLoading=!1,t.isQueryRunning=!1,t.canEditActiveRepo=!1,t.saveJdbcConfiguration=()=>{if(t.saveOrUpdateExecuted=!0,!t.jdbcConfigurationInfo.jdbcConfigurationName)return;if(!t.isDirty)return void W();const e=t.jdbcConfigurationInfo.isNewJdbcConfiguration?N:L;R(t.jdbcConfigurationInfo).then(k).then(_).then(F).then(e).catch(e=>{if(!(e instanceof o.JdbcConfigurationError)){const t=getError(e);c.error(t,x.instant("jdbc.not.saved.configuration"))}})},t.getPreview=()=>{t.activeTab=1,G(!0,x.instant("jdbc.preview.first.rows",{name:t.jdbcConfigurationInfo.jdbcConfigurationName})),R(t.jdbcConfigurationInfo).then(k).then(_).then(F).then(e=>(A({render:a.RenderingMode.YASQE,initialQuery:e.query}),e)).then(T).then(([e,t])=>{const n=e&&e.results.bindings&&e.results.bindings.length>0;let r=a.RenderingMode.YASGUI;n||(r=a.RenderingMode.YASQE,c.info(x.instant("jdbc.table.definition"),x.instant("jdbc.preview.sql"))),A({render:r,sparqlResponse:e,initialQuery:t.query})}).catch(e=>{e instanceof o.JdbcConfigurationError?e.jdbcConfigurationInfo&&(e.jdbcConfigurationInfo.isColumnsEmpty||e.jdbcConfigurationInfo.hasUndefinedColumns)&&(O(),t.activeTab=2):c.error(getError(e,0,100),x.instant("jdbc.not.show.preview"))}).finally(()=>{G(!1)})},t.setActiveTab=e=>{t.activeTab=e;const n=t.jdbcConfigurationInfo.columns;2!==t.activeTab||n&&0!==n.length||R(t.jdbcConfigurationInfo).then(k).then(()=>{t.getColumnsSuggestions()})},t.setDirty=()=>{t.isDirty=!0},t.getTypeLabel=e=>{switch(e){case"iri":return"VARCHAR: IRI";case"string":return"VARCHAR: String";default:return e.indexOf(" ")>0?e:e.toUpperCase()}},t.selectColumnType=(e,n)=>{t.setDirty();const r=t.jdbcConfigurationInfo.columns.find(t=>t.column_name===e);r.column_type===t.getSuggestionSqlType&&F(t.jdbcConfigurationInfo).then(t=>g.getColumnsTypeSuggestion(t.query,[e])).then(e=>e.data).then(e=>{Object(s.updateColumn)(r,e),S(r.column_type,n)}).catch(e=>{c.error(getError(e),x.instant("jdbc.not.suggest.column.type"))})},t.deleteColumn=function(e,n){y.openSimpleModal({title:x.instant("common.warning"),message:x.instant("jdbc.warning.delete.column.msg",{columnName:e}),warning:!0}).result.then((function(){t.jdbcConfigurationInfo.columns.splice(n,1),t.setDirty()}))},t.getColumnsSuggestions=()=>{t.jdbcConfigurationInfo.columns&&t.jdbcConfigurationInfo.columns.length>0?y.openSimpleModal({title:x.instant("common.warning"),message:x.instant("jdbc.warning.column.type.msg"),warning:!0}).result.then((function(){O()})):O()},t.hasPrecision=e=>"iri"===e||"string"===e||"decimal"===e,t.containsColumnsWithPrecision=e=>e&&e.some(e=>t.hasPrecision(e.column_type)),t.containsColumnsWithScale=e=>e&&e.some(e=>j(e.column_type)),t.isLiteral=e=>"iri"!==e&&"unknown"!==e,t.containsNonLiteralColumnsOnly=e=>e&&e.every(e=>!t.isLiteral(e.column_type));const C=(e,n)=>{t.isLoading=e,t.loaderMessage=t.isLoading?n:""},T=e=>{if(t.canWriteActiveRepo){const n=JSON.stringify({name:t.jdbcConfigurationInfo.jdbcConfigurationName,query:t.jdbcConfigurationInfo.query,columns:t.jdbcConfigurationInfo.columns||[]});return Promise.all([g.getNewSqlTablePreview(n),Promise.resolve(e)])}return Promise.all([g.getExistingSqlTablePreview(t.jdbcConfigurationInfo.jdbcConfigurationName),Promise.resolve(e)])},S=(e,t)=>{e===t?c.info(x.instant("jdbc.same.suggested.sql.type",{type:e}),x.instant("jdbc.suggest.sql.type"),{allowHtml:!0}):c.success(x.instant("jdbc.suggested.sql.type",{type:e}),x.instant("jdbc.suggest.sql.type"),{allowHtml:!0})},w=(e,n=new r.JdbcConfigurationInfo)=>{t.jdbcConfigurationInfo.columns=n.columns,t.jdbcConfigurationInfo.query=n.query,t.jdbcConfigurationInfo.jdbcConfigurationName=u.search().name||"",t.jdbcConfigurationInfo.isNewJdbcConfiguration=!t.jdbcConfigurationInfo.jdbcConfigurationName,t.prefixes=e,A(),U()},N=e=>{const n={name:e.jdbcConfigurationName,query:e.query,columns:e.columns};return g.createNewJdbcConfiguration(n).then(()=>{t.isDirty=!1,t.jdbcConfigurationInfo.isNewConfiguration=!1,c.success(x.instant("jdbc.saved.configuration")),V()})},L=e=>{const n={name:e.jdbcConfigurationName,query:e.query,columns:e.columns};g.updateJdbcConfiguration(n).then(()=>{t.isDirty=!1,t.jdbcConfigurationInfo.isNewConfiguration=!1,c.success(x.instant("jdbc.configuration.updated")),V()})},A=(e={})=>{const n={};angular.extend(n,t.yasguiConfig||I(),e),t.yasguiConfig=n},I=()=>({showEditorTabs:!1,showToolbar:!1,showResultTabs:!1,showQueryButton:!1,showResultInfo:!1,downloadAsOn:!1,initialQuery:t.jdbcConfigurationInfo.query,componentId:"jdbc-component",prefixes:t.prefixes,maxPersistentResponseSize:0,render:a.RenderingMode.YASQE,getCellContent:B,sparqlResponse:t.emptySparqlResponse,yasqeMode:t.canEditActiveRepo?i.YasqeMode.WRITE:i.YasqeMode.PROTECTED}),R=e=>P().getQueryType().then(t=>(e.isValidQueryType="SELECT"===t,e.isValidQueryType?e:Promise.reject(new o.JdbcConfigurationError("Query type is not valid.")))),k=e=>P().isQueryValid().then(t=>(e.isValidQuery=t,e.isValidQuery?e:Promise.reject(new o.JdbcConfigurationError("Invalid query.")))),_=e=>{if(!e.columns||0===e.columns.length)return e.isColumnsEmpty=!0,c.error(x.instant("jdbc.warning.one.column.msg")),Promise.reject(new o.JdbcConfigurationError("There are not defined columns.",e));return t.jdbcConfigurationInfo.columns&&t.jdbcConfigurationInfo.columns.find(e=>"unknown"===e.column_type)?(e.hasUndefinedColumns=!0,Promise.reject(new o.JdbcConfigurationError("There are columns without defined type.",e))):Promise.resolve(e)},O=()=>{R(t.jdbcConfigurationInfo).then(k).then(F).then(D).then(M).then(e=>t.jdbcConfigurationInfo=e).catch(e=>{console.log(e)})},D=e=>g.getColumnNames(e.query).then(t=>[e,t.data]).catch((function(e){c.error(getError(e),x.instant("jdbc.not.suggest.column.names"))})),M=([e,n])=>g.getColumnsTypeSuggestion(e.query,n).then((function(r){return e.columns=Object(s.toJDBCColumns)(n,r.data),e.isColumnsEmpty=e.columns.length,t.setDirty(),e})).catch((function(e){c.error(getError(e),x.instant("jdbc.not.suggest.column.types"))})),P=()=>l.YasguiComponentDirectiveUtil.getOntotextYasguiElement("#query-editor"),F=e=>P().getQuery().then(t=>(e.query=t,e)),j=e=>"decimal"===e,B=(e,t)=>{let n=e.value;n=n.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");return"<div class = 'literal-cell'>"+("<p class='nonUri' style='border: none; background-color: transparent; padding: 0; margin: 0'>"+n+"</p>")+"</div>"},H=(e,t,n,r)=>{y.openSimpleModal({title:e,message:t,warning:!0}).result.then((function(){angular.isFunction(n)&&n()}),(function(){angular.isFunction(r)&&r()}))},G=(e,n)=>{t.isQueryRunning=e,t.queryRunningMessage=n,t.isQueryRunning?$(".yasr_results").addClass("hidden"):$(".yasr_results").removeClass("hidden")},U=()=>{t.getSuggestionSqlType=x.instant("view.jdbc.create.get_suggestion_sql_type"),t.sqlTypes=["string","iri","boolean","byte","short","int","long","float","double","decimal","date","time","timestamp",t.getSuggestionSqlType]},V=()=>{setTimeout((function(){W()}),1e3)},W=()=>{u.url("/jdbc")},q=e=>{t.isDirty&&(e.returnValue=!0)},z=()=>{window.removeEventListener("beforeunload",q),X.forEach(e=>e())},X=[];X.push(n.$on("$translateChangeSuccess",()=>{t.language=b.getLanguage(),U()})),X.push(t.$on("$locationChangeStart",(e,n)=>{if(t.isDirty){e.preventDefault();const t=x.instant("common.confirm"),r=x.instant("jdbc.warning.unsaved.changes");H(t,r,()=>{z();const e=u.absUrl().length-u.url().length,t=n.substring(e);u.path(t)})}else z()})),X.push(E.subscribe("repositoryWillChangeEvent",e=>new Promise((function(n){if(t.jdbcConfigurationInfo.isNewJdbcConfiguration)return void n(e);const r=()=>{t.isDirty=!1,W(),n(e)};if(t.isDirty){const t=()=>{e.cancel=!0,n(e)},i=x.instant("common.confirm"),o=x.instant("jdbc.warning.unsaved.changes");H(i,o,r,t)}else r()})))),X.push(t.$on("$destroy",z)),window.addEventListener("beforeunload",q),X.push(t.$watch(t.getActiveRepositoryObject,e=>{e&&(t.canEditActiveRepo=t.canWriteActiveRepo(),(()=>{const e=`${x.instant("common.refreshing.namespaces")}. ${x.instant("common.extra.message")}`;C(!0,e);const n=d.getActiveRepository();t.jdbcConfigurationInfo.jdbcConfigurationName?Promise.all([d.getPrefixes(n),g.getJdbcConfiguration(t.jdbcConfigurationInfo.jdbcConfigurationName)]).then(([e,t])=>{w(e,t.data)}).finally(()=>C(!1)):d.getPrefixes(n).then(e=>w(e)).finally(()=>C(!1))})())}))}angular.module("graphdb.framework.jdbc.controllers",["ui.bootstrap","graphdb.framework.core.services.repositories","graphdb.framework.rest.monitoring.service","toastr","graphdb.framework.utils.event-emitter-service"],["graphdb.framework.utils.notifications"]).controller("JdbcListCtrl",u).controller("JdbcCreateCtrl",c),u.$inject=["$scope","$repositories","JdbcRestService","toastr","ModalService","$translate"],c.$inject=["$q","$scope","$rootScope","$location","toastr","$repositories","$window","$timeout","$interval","JdbcRestService","RDF4JRepositoriesRestService","SparqlRestService","ModalService","$translate","$languageService","EventEmitterService"]},150:function(e,t){angular.module("graphdb.framework.rest.jdbc.service",[]).factory("JdbcRestService",n),n.$inject=["$http","$repositories","$translate"];function n(e,t){return{getJdbcConfigurations:function(){return e.get("rest/sql-views/tables")},getJdbcConfiguration:function(t){return e.get("rest/sql-views/tables/"+t)},createNewJdbcConfiguration:function(e){return n("POST","",e)},updateJdbcConfiguration:function(e){return n("PUT",e.name,e)},deleteJdbcConfiguration:function(t){return e.delete("rest/sql-views/tables/"+t)},getColumnNames:function(t){return e.post("rest/sql-views/columns",t,{headers:{Accept:"application/json","Content-Type":"text/plain"}})},getColumnsTypeSuggestion:function(n,r){if(!Array.isArray(r))throw new Error(t.instant("jdbc.column.names.constraint"));return e({method:"POST",url:"rest/sql-views/types",data:{query:n,column_names:r}})},getExistingSqlTablePreview:function(e,t){return $.ajax({method:"GET",url:"rest/sql-views/preview/"+e,params:{limit:t}})},getNewSqlTablePreview:function(e,t){return $.ajax({method:"POST",url:"rest/sql-views/preview",contentType:"application/json; charset=utf-8",dataType:"json",data:e,params:{limit:t},headers:{Accept:"application/sparql-results+json"}})}};function n(t,n,r){return e({method:t,url:"rest/sql-views/tables/"+n,noCancelOnRouteChange:!0,data:{name:r.name,query:r.query,columns:r.columns||[]}})}}},200:function(e,t,n){"use strict";n.r(t);n(4),n(11),n(100),n(10),n(149),n(150),n(91),n(62),n(88),n(65);angular.module("graphdb.framework.jdbc",["toastr","ui.bootstrap","graphdb.framework.jdbc.controllers","graphdb.framework.core.services.repositories","graphdb.framework.core.directives","graphdb.framework.rest.jdbc.service","graphdb.framework.core.directives.queryeditor.controllers","graphdb.framework.core.directives.queryeditor.sparqltab","graphdb.framework.core.directives.queryeditor.queryeditor","graphdb.framework.core.directives.yasgui-component"])},345:function(module,exports,__webpack_require__){(function(global){var require,require,f;f=function(){var define,module,exports;return function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){if(!s&&"function"==typeof require&&require)return require(a,!0);if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[a]={exports:{}};t[a][0].call(u.exports,(function(e){return i(t[a][1][e]||e)}),u,u.exports,e,t,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(e,t,n){"use strict";var r=e("jquery");r.deparam=function(e,t){var n={},i={true:!0,false:!1,null:null};return r.each(e.replace(/\+/g," ").split("&"),(function(e,o){var a,s=o.split("="),l=decodeURIComponent(s[0]),u=n,c=0,d=l.split("]["),p=d.length-1;if(/\[/.test(d[0])&&/\]$/.test(d[p])?(d[p]=d[p].replace(/\]$/,""),p=(d=d.shift().split("[").concat(d)).length-1):p=0,2===s.length)if(a=decodeURIComponent(s[1]),t&&(a=a&&!isNaN(a)?+a:"undefined"===a?void 0:void 0!==i[a]?i[a]:a),p)for(;c<=p;c++)u=u[l=""===d[c]?u.length:d[c]]=c<p?u[l]||(d[c+1]&&isNaN(d[c+1])?{}:[]):a;else r.isArray(n[l])?n[l].push(a):void 0!==n[l]?n[l]=[n[l],a]:n[l]=a;else l&&(n[l]=t?void 0:"")})),n}},{jquery:16}],2:[function(e,t,n){t.exports={table:{"*[&&,valueLogical]":{"&&":["[&&,valueLogical]","*[&&,valueLogical]"],AS:[],")":[],",":[],"||":[],";":[]},"*[,,expression]":{",":["[,,expression]","*[,,expression]"],")":[]},"*[,,objectPath]":{",":["[,,objectPath]","*[,,objectPath]"],".":[],";":[],"]":[],"{":[],OPTIONAL:[],MINUS:[],GRAPH:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[],"}":[]},"*[,,object]":{",":["[,,object]","*[,,object]"],".":[],";":[],"]":[],"}":[],GRAPH:[],"{":[],OPTIONAL:[],MINUS:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[]},"*[/,pathEltOrInverse]":{"/":["[/,pathEltOrInverse]","*[/,pathEltOrInverse]"],"|":[],")":[],"(":[],"[":[],VAR1:[],VAR2:[],NIL:[],IRI_REF:[],TRUE:[],FALSE:[],BLANK_NODE_LABEL:[],ANON:[],"<<":[],PNAME_LN:[],PNAME_NS:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[]},"*[;,?[or([verbPath,verbSimple]),objectList]]":{";":["[;,?[or([verbPath,verbSimple]),objectList]]","*[;,?[or([verbPath,verbSimple]),objectList]]"],".":[],"]":[],"}":[],GRAPH:[],"{":[],OPTIONAL:[],MINUS:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[]},"*[UNION,groupGraphPattern]":{UNION:["[UNION,groupGraphPattern]","*[UNION,groupGraphPattern]"],VAR1:[],VAR2:[],NIL:[],"(":[],"[":[],IRI_REF:[],TRUE:[],FALSE:[],BLANK_NODE_LABEL:[],ANON:[],"<<":[],PNAME_LN:[],PNAME_NS:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[],".":[],"{":[],OPTIONAL:[],MINUS:[],GRAPH:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[],"}":[]},"*[graphPatternNotTriples,?.,?triplesBlock]":{"{":["[graphPatternNotTriples,?.,?triplesBlock]","*[graphPatternNotTriples,?.,?triplesBlock]"],OPTIONAL:["[graphPatternNotTriples,?.,?triplesBlock]","*[graphPatternNotTriples,?.,?triplesBlock]"],MINUS:["[graphPatternNotTriples,?.,?triplesBlock]","*[graphPatternNotTriples,?.,?triplesBlock]"],GRAPH:["[graphPatternNotTriples,?.,?triplesBlock]","*[graphPatternNotTriples,?.,?triplesBlock]"],SERVICE:["[graphPatternNotTriples,?.,?triplesBlock]","*[graphPatternNotTriples,?.,?triplesBlock]"],FILTER:["[graphPatternNotTriples,?.,?triplesBlock]","*[graphPatternNotTriples,?.,?triplesBlock]"],BIND:["[graphPatternNotTriples,?.,?triplesBlock]","*[graphPatternNotTriples,?.,?triplesBlock]"],VALUES:["[graphPatternNotTriples,?.,?triplesBlock]","*[graphPatternNotTriples,?.,?triplesBlock]"],"}":[]},"*[quadsNotTriples,?.,?triplesTemplate]":{GRAPH:["[quadsNotTriples,?.,?triplesTemplate]","*[quadsNotTriples,?.,?triplesTemplate]"],"}":[]},"*[|,pathOneInPropertySet]":{"|":["[|,pathOneInPropertySet]","*[|,pathOneInPropertySet]"],")":[]},"*[|,pathSequence]":{"|":["[|,pathSequence]","*[|,pathSequence]"],")":[],"(":[],"[":[],VAR1:[],VAR2:[],NIL:[],IRI_REF:[],TRUE:[],FALSE:[],BLANK_NODE_LABEL:[],ANON:[],"<<":[],PNAME_LN:[],PNAME_NS:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[]},"*[||,conditionalAndExpression]":{"||":["[||,conditionalAndExpression]","*[||,conditionalAndExpression]"],AS:[],")":[],",":[],";":[]},"*dataBlockValue":{UNDEF:["dataBlockValue","*dataBlockValue"],IRI_REF:["dataBlockValue","*dataBlockValue"],TRUE:["dataBlockValue","*dataBlockValue"],FALSE:["dataBlockValue","*dataBlockValue"],"<<":["dataBlockValue","*dataBlockValue"],PNAME_LN:["dataBlockValue","*dataBlockValue"],PNAME_NS:["dataBlockValue","*dataBlockValue"],STRING_LITERAL1:["dataBlockValue","*dataBlockValue"],STRING_LITERAL2:["dataBlockValue","*dataBlockValue"],STRING_LITERAL_LONG1:["dataBlockValue","*dataBlockValue"],STRING_LITERAL_LONG2:["dataBlockValue","*dataBlockValue"],INTEGER:["dataBlockValue","*dataBlockValue"],DECIMAL:["dataBlockValue","*dataBlockValue"],DOUBLE:["dataBlockValue","*dataBlockValue"],INTEGER_POSITIVE:["dataBlockValue","*dataBlockValue"],DECIMAL_POSITIVE:["dataBlockValue","*dataBlockValue"],DOUBLE_POSITIVE:["dataBlockValue","*dataBlockValue"],INTEGER_NEGATIVE:["dataBlockValue","*dataBlockValue"],DECIMAL_NEGATIVE:["dataBlockValue","*dataBlockValue"],DOUBLE_NEGATIVE:["dataBlockValue","*dataBlockValue"],"}":[],")":[]},"*datasetClause":{FROM:["datasetClause","*datasetClause"],WHERE:[],"{":[]},"*describeDatasetClause":{FROM:["describeDatasetClause","*describeDatasetClause"],ORDER:[],HAVING:[],GROUP:[],LIMIT:[],OFFSET:[],WHERE:[],"{":[],VALUES:[],$:[]},"*graphNode":{"(":["graphNode","*graphNode"],"[":["graphNode","*graphNode"],VAR1:["graphNode","*graphNode"],VAR2:["graphNode","*graphNode"],NIL:["graphNode","*graphNode"],IRI_REF:["graphNode","*graphNode"],TRUE:["graphNode","*graphNode"],FALSE:["graphNode","*graphNode"],BLANK_NODE_LABEL:["graphNode","*graphNode"],ANON:["graphNode","*graphNode"],"<<":["graphNode","*graphNode"],PNAME_LN:["graphNode","*graphNode"],PNAME_NS:["graphNode","*graphNode"],STRING_LITERAL1:["graphNode","*graphNode"],STRING_LITERAL2:["graphNode","*graphNode"],STRING_LITERAL_LONG1:["graphNode","*graphNode"],STRING_LITERAL_LONG2:["graphNode","*graphNode"],INTEGER:["graphNode","*graphNode"],DECIMAL:["graphNode","*graphNode"],DOUBLE:["graphNode","*graphNode"],INTEGER_POSITIVE:["graphNode","*graphNode"],DECIMAL_POSITIVE:["graphNode","*graphNode"],DOUBLE_POSITIVE:["graphNode","*graphNode"],INTEGER_NEGATIVE:["graphNode","*graphNode"],DECIMAL_NEGATIVE:["graphNode","*graphNode"],DOUBLE_NEGATIVE:["graphNode","*graphNode"],")":[]},"*graphNodePath":{"(":["graphNodePath","*graphNodePath"],"[":["graphNodePath","*graphNodePath"],VAR1:["graphNodePath","*graphNodePath"],VAR2:["graphNodePath","*graphNodePath"],NIL:["graphNodePath","*graphNodePath"],IRI_REF:["graphNodePath","*graphNodePath"],TRUE:["graphNodePath","*graphNodePath"],FALSE:["graphNodePath","*graphNodePath"],BLANK_NODE_LABEL:["graphNodePath","*graphNodePath"],ANON:["graphNodePath","*graphNodePath"],"<<":["graphNodePath","*graphNodePath"],PNAME_LN:["graphNodePath","*graphNodePath"],PNAME_NS:["graphNodePath","*graphNodePath"],STRING_LITERAL1:["graphNodePath","*graphNodePath"],STRING_LITERAL2:["graphNodePath","*graphNodePath"],STRING_LITERAL_LONG1:["graphNodePath","*graphNodePath"],STRING_LITERAL_LONG2:["graphNodePath","*graphNodePath"],INTEGER:["graphNodePath","*graphNodePath"],DECIMAL:["graphNodePath","*graphNodePath"],DOUBLE:["graphNodePath","*graphNodePath"],INTEGER_POSITIVE:["graphNodePath","*graphNodePath"],DECIMAL_POSITIVE:["graphNodePath","*graphNodePath"],DOUBLE_POSITIVE:["graphNodePath","*graphNodePath"],INTEGER_NEGATIVE:["graphNodePath","*graphNodePath"],DECIMAL_NEGATIVE:["graphNodePath","*graphNodePath"],DOUBLE_NEGATIVE:["graphNodePath","*graphNodePath"],")":[]},"*groupCondition":{"(":["groupCondition","*groupCondition"],STR:["groupCondition","*groupCondition"],LANG:["groupCondition","*groupCondition"],LANGMATCHES:["groupCondition","*groupCondition"],DATATYPE:["groupCondition","*groupCondition"],BOUND:["groupCondition","*groupCondition"],IRI:["groupCondition","*groupCondition"],URI:["groupCondition","*groupCondition"],BNODE:["groupCondition","*groupCondition"],RAND:["groupCondition","*groupCondition"],ABS:["groupCondition","*groupCondition"],CEIL:["groupCondition","*groupCondition"],FLOOR:["groupCondition","*groupCondition"],ROUND:["groupCondition","*groupCondition"],CONCAT:["groupCondition","*groupCondition"],STRLEN:["groupCondition","*groupCondition"],UCASE:["groupCondition","*groupCondition"],LCASE:["groupCondition","*groupCondition"],ENCODE_FOR_URI:["groupCondition","*groupCondition"],CONTAINS:["groupCondition","*groupCondition"],STRSTARTS:["groupCondition","*groupCondition"],STRENDS:["groupCondition","*groupCondition"],STRBEFORE:["groupCondition","*groupCondition"],STRAFTER:["groupCondition","*groupCondition"],YEAR:["groupCondition","*groupCondition"],MONTH:["groupCondition","*groupCondition"],DAY:["groupCondition","*groupCondition"],HOURS:["groupCondition","*groupCondition"],MINUTES:["groupCondition","*groupCondition"],SECONDS:["groupCondition","*groupCondition"],TIMEZONE:["groupCondition","*groupCondition"],TZ:["groupCondition","*groupCondition"],NOW:["groupCondition","*groupCondition"],UUID:["groupCondition","*groupCondition"],STRUUID:["groupCondition","*groupCondition"],MD5:["groupCondition","*groupCondition"],SHA1:["groupCondition","*groupCondition"],SHA256:["groupCondition","*groupCondition"],SHA384:["groupCondition","*groupCondition"],SHA512:["groupCondition","*groupCondition"],COALESCE:["groupCondition","*groupCondition"],IF:["groupCondition","*groupCondition"],STRLANG:["groupCondition","*groupCondition"],STRDT:["groupCondition","*groupCondition"],SAMETERM:["groupCondition","*groupCondition"],ISIRI:["groupCondition","*groupCondition"],ISURI:["groupCondition","*groupCondition"],ISBLANK:["groupCondition","*groupCondition"],ISLITERAL:["groupCondition","*groupCondition"],ISNUMERIC:["groupCondition","*groupCondition"],VAR1:["groupCondition","*groupCondition"],VAR2:["groupCondition","*groupCondition"],SUBSTR:["groupCondition","*groupCondition"],REPLACE:["groupCondition","*groupCondition"],REGEX:["groupCondition","*groupCondition"],EXISTS:["groupCondition","*groupCondition"],NOT:["groupCondition","*groupCondition"],IRI_REF:["groupCondition","*groupCondition"],PNAME_LN:["groupCondition","*groupCondition"],PNAME_NS:["groupCondition","*groupCondition"],VALUES:[],LIMIT:[],OFFSET:[],ORDER:[],HAVING:[],$:[],"}":[]},"*havingCondition":{"(":["havingCondition","*havingCondition"],STR:["havingCondition","*havingCondition"],LANG:["havingCondition","*havingCondition"],LANGMATCHES:["havingCondition","*havingCondition"],DATATYPE:["havingCondition","*havingCondition"],BOUND:["havingCondition","*havingCondition"],IRI:["havingCondition","*havingCondition"],URI:["havingCondition","*havingCondition"],BNODE:["havingCondition","*havingCondition"],RAND:["havingCondition","*havingCondition"],ABS:["havingCondition","*havingCondition"],CEIL:["havingCondition","*havingCondition"],FLOOR:["havingCondition","*havingCondition"],ROUND:["havingCondition","*havingCondition"],CONCAT:["havingCondition","*havingCondition"],STRLEN:["havingCondition","*havingCondition"],UCASE:["havingCondition","*havingCondition"],LCASE:["havingCondition","*havingCondition"],ENCODE_FOR_URI:["havingCondition","*havingCondition"],CONTAINS:["havingCondition","*havingCondition"],STRSTARTS:["havingCondition","*havingCondition"],STRENDS:["havingCondition","*havingCondition"],STRBEFORE:["havingCondition","*havingCondition"],STRAFTER:["havingCondition","*havingCondition"],YEAR:["havingCondition","*havingCondition"],MONTH:["havingCondition","*havingCondition"],DAY:["havingCondition","*havingCondition"],HOURS:["havingCondition","*havingCondition"],MINUTES:["havingCondition","*havingCondition"],SECONDS:["havingCondition","*havingCondition"],TIMEZONE:["havingCondition","*havingCondition"],TZ:["havingCondition","*havingCondition"],NOW:["havingCondition","*havingCondition"],UUID:["havingCondition","*havingCondition"],STRUUID:["havingCondition","*havingCondition"],MD5:["havingCondition","*havingCondition"],SHA1:["havingCondition","*havingCondition"],SHA256:["havingCondition","*havingCondition"],SHA384:["havingCondition","*havingCondition"],SHA512:["havingCondition","*havingCondition"],COALESCE:["havingCondition","*havingCondition"],IF:["havingCondition","*havingCondition"],STRLANG:["havingCondition","*havingCondition"],STRDT:["havingCondition","*havingCondition"],SAMETERM:["havingCondition","*havingCondition"],ISIRI:["havingCondition","*havingCondition"],ISURI:["havingCondition","*havingCondition"],ISBLANK:["havingCondition","*havingCondition"],ISLITERAL:["havingCondition","*havingCondition"],ISNUMERIC:["havingCondition","*havingCondition"],SUBSTR:["havingCondition","*havingCondition"],REPLACE:["havingCondition","*havingCondition"],REGEX:["havingCondition","*havingCondition"],EXISTS:["havingCondition","*havingCondition"],NOT:["havingCondition","*havingCondition"],IRI_REF:["havingCondition","*havingCondition"],PNAME_LN:["havingCondition","*havingCondition"],PNAME_NS:["havingCondition","*havingCondition"],VALUES:[],LIMIT:[],OFFSET:[],ORDER:[],$:[],"}":[]},"*or([[(,*dataBlockValue,)],NIL])":{"(":["or([[(,*dataBlockValue,)],NIL])","*or([[(,*dataBlockValue,)],NIL])"],NIL:["or([[(,*dataBlockValue,)],NIL])","*or([[(,*dataBlockValue,)],NIL])"],"}":[]},"*or([[*,unaryExpression],[/,unaryExpression]])":{"*":["or([[*,unaryExpression],[/,unaryExpression]])","*or([[*,unaryExpression],[/,unaryExpression]])"],"/":["or([[*,unaryExpression],[/,unaryExpression]])","*or([[*,unaryExpression],[/,unaryExpression]])"],AS:[],")":[],",":[],"||":[],"&&":[],"=":[],"!=":[],"<":[],">":[],"<=":[],">=":[],IN:[],NOT:[],"+":[],"-":[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[],";":[]},"*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])":{"+":["or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],"-":["or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],INTEGER_POSITIVE:["or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DECIMAL_POSITIVE:["or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DOUBLE_POSITIVE:["or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],INTEGER_NEGATIVE:["or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DECIMAL_NEGATIVE:["or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DOUBLE_NEGATIVE:["or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],AS:[],")":[],",":[],"||":[],"&&":[],"=":[],"!=":[],"<":[],">":[],"<=":[],">=":[],IN:[],NOT:[],";":[]},"*or([baseDecl,prefixDecl])":{BASE:["or([baseDecl,prefixDecl])","*or([baseDecl,prefixDecl])"],PREFIX:["or([baseDecl,prefixDecl])","*or([baseDecl,prefixDecl])"],$:[],CONSTRUCT:[],DESCRIBE:[],ASK:[],INSERT:[],DELETE:[],SELECT:[],LOAD:[],CLEAR:[],DROP:[],ADD:[],MOVE:[],COPY:[],CREATE:[],WITH:[]},"*or([var,[(,expression,AS,var,)]])":{"(":["or([var,[(,expression,AS,var,)]])","*or([var,[(,expression,AS,var,)]])"],VAR1:["or([var,[(,expression,AS,var,)]])","*or([var,[(,expression,AS,var,)]])"],VAR2:["or([var,[(,expression,AS,var,)]])","*or([var,[(,expression,AS,var,)]])"],WHERE:[],"{":[],FROM:[]},"*or([varOrIRIref,embeddedTriple])":{"<<":["or([varOrIRIref,embeddedTriple])","*or([varOrIRIref,embeddedTriple])"],VAR1:["or([varOrIRIref,embeddedTriple])","*or([varOrIRIref,embeddedTriple])"],VAR2:["or([varOrIRIref,embeddedTriple])","*or([varOrIRIref,embeddedTriple])"],IRI_REF:["or([varOrIRIref,embeddedTriple])","*or([varOrIRIref,embeddedTriple])"],PNAME_LN:["or([varOrIRIref,embeddedTriple])","*or([varOrIRIref,embeddedTriple])"],PNAME_NS:["or([varOrIRIref,embeddedTriple])","*or([varOrIRIref,embeddedTriple])"],ORDER:[],HAVING:[],GROUP:[],LIMIT:[],OFFSET:[],WHERE:[],"{":[],FROM:[],VALUES:[],$:[]},"*orderCondition":{ASC:["orderCondition","*orderCondition"],DESC:["orderCondition","*orderCondition"],VAR1:["orderCondition","*orderCondition"],VAR2:["orderCondition","*orderCondition"],"(":["orderCondition","*orderCondition"],STR:["orderCondition","*orderCondition"],LANG:["orderCondition","*orderCondition"],LANGMATCHES:["orderCondition","*orderCondition"],DATATYPE:["orderCondition","*orderCondition"],BOUND:["orderCondition","*orderCondition"],IRI:["orderCondition","*orderCondition"],URI:["orderCondition","*orderCondition"],BNODE:["orderCondition","*orderCondition"],RAND:["orderCondition","*orderCondition"],ABS:["orderCondition","*orderCondition"],CEIL:["orderCondition","*orderCondition"],FLOOR:["orderCondition","*orderCondition"],ROUND:["orderCondition","*orderCondition"],CONCAT:["orderCondition","*orderCondition"],STRLEN:["orderCondition","*orderCondition"],UCASE:["orderCondition","*orderCondition"],LCASE:["orderCondition","*orderCondition"],ENCODE_FOR_URI:["orderCondition","*orderCondition"],CONTAINS:["orderCondition","*orderCondition"],STRSTARTS:["orderCondition","*orderCondition"],STRENDS:["orderCondition","*orderCondition"],STRBEFORE:["orderCondition","*orderCondition"],STRAFTER:["orderCondition","*orderCondition"],YEAR:["orderCondition","*orderCondition"],MONTH:["orderCondition","*orderCondition"],DAY:["orderCondition","*orderCondition"],HOURS:["orderCondition","*orderCondition"],MINUTES:["orderCondition","*orderCondition"],SECONDS:["orderCondition","*orderCondition"],TIMEZONE:["orderCondition","*orderCondition"],TZ:["orderCondition","*orderCondition"],NOW:["orderCondition","*orderCondition"],UUID:["orderCondition","*orderCondition"],STRUUID:["orderCondition","*orderCondition"],MD5:["orderCondition","*orderCondition"],SHA1:["orderCondition","*orderCondition"],SHA256:["orderCondition","*orderCondition"],SHA384:["orderCondition","*orderCondition"],SHA512:["orderCondition","*orderCondition"],COALESCE:["orderCondition","*orderCondition"],IF:["orderCondition","*orderCondition"],STRLANG:["orderCondition","*orderCondition"],STRDT:["orderCondition","*orderCondition"],SAMETERM:["orderCondition","*orderCondition"],ISIRI:["orderCondition","*orderCondition"],ISURI:["orderCondition","*orderCondition"],ISBLANK:["orderCondition","*orderCondition"],ISLITERAL:["orderCondition","*orderCondition"],ISNUMERIC:["orderCondition","*orderCondition"],SUBSTR:["orderCondition","*orderCondition"],REPLACE:["orderCondition","*orderCondition"],REGEX:["orderCondition","*orderCondition"],EXISTS:["orderCondition","*orderCondition"],NOT:["orderCondition","*orderCondition"],IRI_REF:["orderCondition","*orderCondition"],PNAME_LN:["orderCondition","*orderCondition"],PNAME_NS:["orderCondition","*orderCondition"],VALUES:[],LIMIT:[],OFFSET:[],$:[],"}":[]},"*usingClause":{USING:["usingClause","*usingClause"],WHERE:[]},"*var":{VAR1:["var","*var"],VAR2:["var","*var"],")":[]},"+graphNode":{"(":["graphNode","*graphNode"],"[":["graphNode","*graphNode"],VAR1:["graphNode","*graphNode"],VAR2:["graphNode","*graphNode"],NIL:["graphNode","*graphNode"],IRI_REF:["graphNode","*graphNode"],TRUE:["graphNode","*graphNode"],FALSE:["graphNode","*graphNode"],BLANK_NODE_LABEL:["graphNode","*graphNode"],ANON:["graphNode","*graphNode"],"<<":["graphNode","*graphNode"],PNAME_LN:["graphNode","*graphNode"],PNAME_NS:["graphNode","*graphNode"],STRING_LITERAL1:["graphNode","*graphNode"],STRING_LITERAL2:["graphNode","*graphNode"],STRING_LITERAL_LONG1:["graphNode","*graphNode"],STRING_LITERAL_LONG2:["graphNode","*graphNode"],INTEGER:["graphNode","*graphNode"],DECIMAL:["graphNode","*graphNode"],DOUBLE:["graphNode","*graphNode"],INTEGER_POSITIVE:["graphNode","*graphNode"],DECIMAL_POSITIVE:["graphNode","*graphNode"],DOUBLE_POSITIVE:["graphNode","*graphNode"],INTEGER_NEGATIVE:["graphNode","*graphNode"],DECIMAL_NEGATIVE:["graphNode","*graphNode"],DOUBLE_NEGATIVE:["graphNode","*graphNode"]},"+graphNodePath":{"(":["graphNodePath","*graphNodePath"],"[":["graphNodePath","*graphNodePath"],VAR1:["graphNodePath","*graphNodePath"],VAR2:["graphNodePath","*graphNodePath"],NIL:["graphNodePath","*graphNodePath"],IRI_REF:["graphNodePath","*graphNodePath"],TRUE:["graphNodePath","*graphNodePath"],FALSE:["graphNodePath","*graphNodePath"],BLANK_NODE_LABEL:["graphNodePath","*graphNodePath"],ANON:["graphNodePath","*graphNodePath"],"<<":["graphNodePath","*graphNodePath"],PNAME_LN:["graphNodePath","*graphNodePath"],PNAME_NS:["graphNodePath","*graphNodePath"],STRING_LITERAL1:["graphNodePath","*graphNodePath"],STRING_LITERAL2:["graphNodePath","*graphNodePath"],STRING_LITERAL_LONG1:["graphNodePath","*graphNodePath"],STRING_LITERAL_LONG2:["graphNodePath","*graphNodePath"],INTEGER:["graphNodePath","*graphNodePath"],DECIMAL:["graphNodePath","*graphNodePath"],DOUBLE:["graphNodePath","*graphNodePath"],INTEGER_POSITIVE:["graphNodePath","*graphNodePath"],DECIMAL_POSITIVE:["graphNodePath","*graphNodePath"],DOUBLE_POSITIVE:["graphNodePath","*graphNodePath"],INTEGER_NEGATIVE:["graphNodePath","*graphNodePath"],DECIMAL_NEGATIVE:["graphNodePath","*graphNodePath"],DOUBLE_NEGATIVE:["graphNodePath","*graphNodePath"]},"+groupCondition":{"(":["groupCondition","*groupCondition"],STR:["groupCondition","*groupCondition"],LANG:["groupCondition","*groupCondition"],LANGMATCHES:["groupCondition","*groupCondition"],DATATYPE:["groupCondition","*groupCondition"],BOUND:["groupCondition","*groupCondition"],IRI:["groupCondition","*groupCondition"],URI:["groupCondition","*groupCondition"],BNODE:["groupCondition","*groupCondition"],RAND:["groupCondition","*groupCondition"],ABS:["groupCondition","*groupCondition"],CEIL:["groupCondition","*groupCondition"],FLOOR:["groupCondition","*groupCondition"],ROUND:["groupCondition","*groupCondition"],CONCAT:["groupCondition","*groupCondition"],STRLEN:["groupCondition","*groupCondition"],UCASE:["groupCondition","*groupCondition"],LCASE:["groupCondition","*groupCondition"],ENCODE_FOR_URI:["groupCondition","*groupCondition"],CONTAINS:["groupCondition","*groupCondition"],STRSTARTS:["groupCondition","*groupCondition"],STRENDS:["groupCondition","*groupCondition"],STRBEFORE:["groupCondition","*groupCondition"],STRAFTER:["groupCondition","*groupCondition"],YEAR:["groupCondition","*groupCondition"],MONTH:["groupCondition","*groupCondition"],DAY:["groupCondition","*groupCondition"],HOURS:["groupCondition","*groupCondition"],MINUTES:["groupCondition","*groupCondition"],SECONDS:["groupCondition","*groupCondition"],TIMEZONE:["groupCondition","*groupCondition"],TZ:["groupCondition","*groupCondition"],NOW:["groupCondition","*groupCondition"],UUID:["groupCondition","*groupCondition"],STRUUID:["groupCondition","*groupCondition"],MD5:["groupCondition","*groupCondition"],SHA1:["groupCondition","*groupCondition"],SHA256:["groupCondition","*groupCondition"],SHA384:["groupCondition","*groupCondition"],SHA512:["groupCondition","*groupCondition"],COALESCE:["groupCondition","*groupCondition"],IF:["groupCondition","*groupCondition"],STRLANG:["groupCondition","*groupCondition"],STRDT:["groupCondition","*groupCondition"],SAMETERM:["groupCondition","*groupCondition"],ISIRI:["groupCondition","*groupCondition"],ISURI:["groupCondition","*groupCondition"],ISBLANK:["groupCondition","*groupCondition"],ISLITERAL:["groupCondition","*groupCondition"],ISNUMERIC:["groupCondition","*groupCondition"],VAR1:["groupCondition","*groupCondition"],VAR2:["groupCondition","*groupCondition"],SUBSTR:["groupCondition","*groupCondition"],REPLACE:["groupCondition","*groupCondition"],REGEX:["groupCondition","*groupCondition"],EXISTS:["groupCondition","*groupCondition"],NOT:["groupCondition","*groupCondition"],IRI_REF:["groupCondition","*groupCondition"],PNAME_LN:["groupCondition","*groupCondition"],PNAME_NS:["groupCondition","*groupCondition"]},"+havingCondition":{"(":["havingCondition","*havingCondition"],STR:["havingCondition","*havingCondition"],LANG:["havingCondition","*havingCondition"],LANGMATCHES:["havingCondition","*havingCondition"],DATATYPE:["havingCondition","*havingCondition"],BOUND:["havingCondition","*havingCondition"],IRI:["havingCondition","*havingCondition"],URI:["havingCondition","*havingCondition"],BNODE:["havingCondition","*havingCondition"],RAND:["havingCondition","*havingCondition"],ABS:["havingCondition","*havingCondition"],CEIL:["havingCondition","*havingCondition"],FLOOR:["havingCondition","*havingCondition"],ROUND:["havingCondition","*havingCondition"],CONCAT:["havingCondition","*havingCondition"],STRLEN:["havingCondition","*havingCondition"],UCASE:["havingCondition","*havingCondition"],LCASE:["havingCondition","*havingCondition"],ENCODE_FOR_URI:["havingCondition","*havingCondition"],CONTAINS:["havingCondition","*havingCondition"],STRSTARTS:["havingCondition","*havingCondition"],STRENDS:["havingCondition","*havingCondition"],STRBEFORE:["havingCondition","*havingCondition"],STRAFTER:["havingCondition","*havingCondition"],YEAR:["havingCondition","*havingCondition"],MONTH:["havingCondition","*havingCondition"],DAY:["havingCondition","*havingCondition"],HOURS:["havingCondition","*havingCondition"],MINUTES:["havingCondition","*havingCondition"],SECONDS:["havingCondition","*havingCondition"],TIMEZONE:["havingCondition","*havingCondition"],TZ:["havingCondition","*havingCondition"],NOW:["havingCondition","*havingCondition"],UUID:["havingCondition","*havingCondition"],STRUUID:["havingCondition","*havingCondition"],MD5:["havingCondition","*havingCondition"],SHA1:["havingCondition","*havingCondition"],SHA256:["havingCondition","*havingCondition"],SHA384:["havingCondition","*havingCondition"],SHA512:["havingCondition","*havingCondition"],COALESCE:["havingCondition","*havingCondition"],IF:["havingCondition","*havingCondition"],STRLANG:["havingCondition","*havingCondition"],STRDT:["havingCondition","*havingCondition"],SAMETERM:["havingCondition","*havingCondition"],ISIRI:["havingCondition","*havingCondition"],ISURI:["havingCondition","*havingCondition"],ISBLANK:["havingCondition","*havingCondition"],ISLITERAL:["havingCondition","*havingCondition"],ISNUMERIC:["havingCondition","*havingCondition"],SUBSTR:["havingCondition","*havingCondition"],REPLACE:["havingCondition","*havingCondition"],REGEX:["havingCondition","*havingCondition"],EXISTS:["havingCondition","*havingCondition"],NOT:["havingCondition","*havingCondition"],IRI_REF:["havingCondition","*havingCondition"],PNAME_LN:["havingCondition","*havingCondition"],PNAME_NS:["havingCondition","*havingCondition"]},"+or([var,[(,expression,AS,var,)]])":{"(":["or([var,[(,expression,AS,var,)]])","*or([var,[(,expression,AS,var,)]])"],VAR1:["or([var,[(,expression,AS,var,)]])","*or([var,[(,expression,AS,var,)]])"],VAR2:["or([var,[(,expression,AS,var,)]])","*or([var,[(,expression,AS,var,)]])"]},"+or([varOrIRIref,embeddedTriple])":{"<<":["or([varOrIRIref,embeddedTriple])","*or([varOrIRIref,embeddedTriple])"],VAR1:["or([varOrIRIref,embeddedTriple])","*or([varOrIRIref,embeddedTriple])"],VAR2:["or([varOrIRIref,embeddedTriple])","*or([varOrIRIref,embeddedTriple])"],IRI_REF:["or([varOrIRIref,embeddedTriple])","*or([varOrIRIref,embeddedTriple])"],PNAME_LN:["or([varOrIRIref,embeddedTriple])","*or([varOrIRIref,embeddedTriple])"],PNAME_NS:["or([varOrIRIref,embeddedTriple])","*or([varOrIRIref,embeddedTriple])"]},"+orderCondition":{ASC:["orderCondition","*orderCondition"],DESC:["orderCondition","*orderCondition"],VAR1:["orderCondition","*orderCondition"],VAR2:["orderCondition","*orderCondition"],"(":["orderCondition","*orderCondition"],STR:["orderCondition","*orderCondition"],LANG:["orderCondition","*orderCondition"],LANGMATCHES:["orderCondition","*orderCondition"],DATATYPE:["orderCondition","*orderCondition"],BOUND:["orderCondition","*orderCondition"],IRI:["orderCondition","*orderCondition"],URI:["orderCondition","*orderCondition"],BNODE:["orderCondition","*orderCondition"],RAND:["orderCondition","*orderCondition"],ABS:["orderCondition","*orderCondition"],CEIL:["orderCondition","*orderCondition"],FLOOR:["orderCondition","*orderCondition"],ROUND:["orderCondition","*orderCondition"],CONCAT:["orderCondition","*orderCondition"],STRLEN:["orderCondition","*orderCondition"],UCASE:["orderCondition","*orderCondition"],LCASE:["orderCondition","*orderCondition"],ENCODE_FOR_URI:["orderCondition","*orderCondition"],CONTAINS:["orderCondition","*orderCondition"],STRSTARTS:["orderCondition","*orderCondition"],STRENDS:["orderCondition","*orderCondition"],STRBEFORE:["orderCondition","*orderCondition"],STRAFTER:["orderCondition","*orderCondition"],YEAR:["orderCondition","*orderCondition"],MONTH:["orderCondition","*orderCondition"],DAY:["orderCondition","*orderCondition"],HOURS:["orderCondition","*orderCondition"],MINUTES:["orderCondition","*orderCondition"],SECONDS:["orderCondition","*orderCondition"],TIMEZONE:["orderCondition","*orderCondition"],TZ:["orderCondition","*orderCondition"],NOW:["orderCondition","*orderCondition"],UUID:["orderCondition","*orderCondition"],STRUUID:["orderCondition","*orderCondition"],MD5:["orderCondition","*orderCondition"],SHA1:["orderCondition","*orderCondition"],SHA256:["orderCondition","*orderCondition"],SHA384:["orderCondition","*orderCondition"],SHA512:["orderCondition","*orderCondition"],COALESCE:["orderCondition","*orderCondition"],IF:["orderCondition","*orderCondition"],STRLANG:["orderCondition","*orderCondition"],STRDT:["orderCondition","*orderCondition"],SAMETERM:["orderCondition","*orderCondition"],ISIRI:["orderCondition","*orderCondition"],ISURI:["orderCondition","*orderCondition"],ISBLANK:["orderCondition","*orderCondition"],ISLITERAL:["orderCondition","*orderCondition"],ISNUMERIC:["orderCondition","*orderCondition"],SUBSTR:["orderCondition","*orderCondition"],REPLACE:["orderCondition","*orderCondition"],REGEX:["orderCondition","*orderCondition"],EXISTS:["orderCondition","*orderCondition"],NOT:["orderCondition","*orderCondition"],IRI_REF:["orderCondition","*orderCondition"],PNAME_LN:["orderCondition","*orderCondition"],PNAME_NS:["orderCondition","*orderCondition"]},"?.":{".":["."],VAR1:[],VAR2:[],NIL:[],"(":[],"[":[],IRI_REF:[],TRUE:[],FALSE:[],BLANK_NODE_LABEL:[],ANON:[],"<<":[],PNAME_LN:[],PNAME_NS:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[],GRAPH:[],"{":[],OPTIONAL:[],MINUS:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[],"}":[]},"?DISTINCT":{DISTINCT:["DISTINCT"],"!":[],"+":[],"-":[],VAR1:[],VAR2:[],"(":[],STR:[],LANG:[],LANGMATCHES:[],DATATYPE:[],BOUND:[],IRI:[],URI:[],BNODE:[],RAND:[],ABS:[],CEIL:[],FLOOR:[],ROUND:[],CONCAT:[],STRLEN:[],UCASE:[],LCASE:[],ENCODE_FOR_URI:[],CONTAINS:[],STRSTARTS:[],STRENDS:[],STRBEFORE:[],STRAFTER:[],YEAR:[],MONTH:[],DAY:[],HOURS:[],MINUTES:[],SECONDS:[],TIMEZONE:[],TZ:[],NOW:[],UUID:[],STRUUID:[],MD5:[],SHA1:[],SHA256:[],SHA384:[],SHA512:[],COALESCE:[],IF:[],STRLANG:[],STRDT:[],SAMETERM:[],ISIRI:[],ISURI:[],ISBLANK:[],ISLITERAL:[],ISNUMERIC:[],TRUE:[],FALSE:[],"<<":[],COUNT:[],SUM:[],MIN:[],MAX:[],AVG:[],SAMPLE:[],GROUP_CONCAT:[],SUBSTR:[],REPLACE:[],REGEX:[],EXISTS:[],NOT:[],IRI_REF:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[],PNAME_LN:[],PNAME_NS:[],"*":[]},"?GRAPH":{GRAPH:["GRAPH"],IRI_REF:[],PNAME_LN:[],PNAME_NS:[]},"?SILENT":{SILENT:["SILENT"],VAR1:[],VAR2:[],IRI_REF:[],PNAME_LN:[],PNAME_NS:[]},"?SILENT_1":{SILENT:["SILENT"],IRI_REF:[],PNAME_LN:[],PNAME_NS:[]},"?SILENT_2":{SILENT:["SILENT"],GRAPH:[],DEFAULT:[],NAMED:[],ALL:[]},"?SILENT_3":{SILENT:["SILENT"],GRAPH:[]},"?SILENT_4":{SILENT:["SILENT"],DEFAULT:[],GRAPH:[],IRI_REF:[],PNAME_LN:[],PNAME_NS:[]},"?WHERE":{WHERE:["WHERE"],"{":[]},"?[,,expression]":{",":["[,,expression]"],")":[]},"?[.,?constructTriples]":{".":["[.,?constructTriples]"],"}":[]},"?[.,?triplesBlock]":{".":["[.,?triplesBlock]"],"{":[],OPTIONAL:[],MINUS:[],GRAPH:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[],"}":[]},"?[.,?triplesTemplate]":{".":["[.,?triplesTemplate]"],"}":[],GRAPH:[]},"?[;,SEPARATOR,=,string]":{";":["[;,SEPARATOR,=,string]"],")":[]},"?[;,update]":{";":["[;,update]"],$:[]},"?[AS,var]":{AS:["[AS,var]"],")":[]},"?[INTO,graphRef]":{INTO:["[INTO,graphRef]"],";":[],$:[]},"?[or([verbPath,verbSimple]),objectList]":{VAR1:["[or([verbPath,verbSimple]),objectList]"],VAR2:["[or([verbPath,verbSimple]),objectList]"],"^":["[or([verbPath,verbSimple]),objectList]"],a:["[or([verbPath,verbSimple]),objectList]"],"!":["[or([verbPath,verbSimple]),objectList]"],"(":["[or([verbPath,verbSimple]),objectList]"],IRI_REF:["[or([verbPath,verbSimple]),objectList]"],PNAME_LN:["[or([verbPath,verbSimple]),objectList]"],PNAME_NS:["[or([verbPath,verbSimple]),objectList]"],";":[],".":[],"]":[],"}":[],GRAPH:[],"{":[],OPTIONAL:[],MINUS:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[]},"?[pathOneInPropertySet,*[|,pathOneInPropertySet]]":{a:["[pathOneInPropertySet,*[|,pathOneInPropertySet]]"],"^":["[pathOneInPropertySet,*[|,pathOneInPropertySet]]"],IRI_REF:["[pathOneInPropertySet,*[|,pathOneInPropertySet]]"],PNAME_LN:["[pathOneInPropertySet,*[|,pathOneInPropertySet]]"],PNAME_NS:["[pathOneInPropertySet,*[|,pathOneInPropertySet]]"],")":[]},"?[update1,?[;,update]]":{INSERT:["[update1,?[;,update]]"],DELETE:["[update1,?[;,update]]"],LOAD:["[update1,?[;,update]]"],CLEAR:["[update1,?[;,update]]"],DROP:["[update1,?[;,update]]"],ADD:["[update1,?[;,update]]"],MOVE:["[update1,?[;,update]]"],COPY:["[update1,?[;,update]]"],CREATE:["[update1,?[;,update]]"],WITH:["[update1,?[;,update]]"],$:[]},"?argList":{NIL:["argList"],"(":["argList"],AS:[],")":[],",":[],"||":[],"&&":[],"=":[],"!=":[],"<":[],">":[],"<=":[],">=":[],IN:[],NOT:[],"+":[],"-":[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[],"*":[],"/":[],";":[]},"?constructTriples":{VAR1:["constructTriples"],VAR2:["constructTriples"],NIL:["constructTriples"],"(":["constructTriples"],"[":["constructTriples"],IRI_REF:["constructTriples"],TRUE:["constructTriples"],FALSE:["constructTriples"],BLANK_NODE_LABEL:["constructTriples"],ANON:["constructTriples"],"<<":["constructTriples"],PNAME_LN:["constructTriples"],PNAME_NS:["constructTriples"],STRING_LITERAL1:["constructTriples"],STRING_LITERAL2:["constructTriples"],STRING_LITERAL_LONG1:["constructTriples"],STRING_LITERAL_LONG2:["constructTriples"],INTEGER:["constructTriples"],DECIMAL:["constructTriples"],DOUBLE:["constructTriples"],INTEGER_POSITIVE:["constructTriples"],DECIMAL_POSITIVE:["constructTriples"],DOUBLE_POSITIVE:["constructTriples"],INTEGER_NEGATIVE:["constructTriples"],DECIMAL_NEGATIVE:["constructTriples"],DOUBLE_NEGATIVE:["constructTriples"],"}":[]},"?groupClause":{GROUP:["groupClause"],VALUES:[],LIMIT:[],OFFSET:[],ORDER:[],HAVING:[],$:[],"}":[]},"?havingClause":{HAVING:["havingClause"],VALUES:[],LIMIT:[],OFFSET:[],ORDER:[],$:[],"}":[]},"?insertClause":{INSERT:["insertClause"],WHERE:[],USING:[]},"?limitClause":{LIMIT:["limitClause"],VALUES:[],$:[],"}":[]},"?limitOffsetClauses":{LIMIT:["limitOffsetClauses"],OFFSET:["limitOffsetClauses"],VALUES:[],$:[],"}":[]},"?offsetClause":{OFFSET:["offsetClause"],VALUES:[],$:[],"}":[]},"?or([DISTINCT,REDUCED])":{DISTINCT:["or([DISTINCT,REDUCED])"],REDUCED:["or([DISTINCT,REDUCED])"],"*":[],"(":[],VAR1:[],VAR2:[]},"?or([LANGTAG,[^^,iriRef]])":{LANGTAG:["or([LANGTAG,[^^,iriRef]])"],"^^":["or([LANGTAG,[^^,iriRef]])"],UNDEF:[],IRI_REF:[],TRUE:[],FALSE:[],"<<":[],PNAME_LN:[],PNAME_NS:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[],VAR1:[],VAR2:[],"^":[],a:[],"!":[],"(":[],".":[],";":[],",":[],AS:[],")":[],"||":[],"&&":[],"=":[],"!=":[],"<":[],">":[],"<=":[],">=":[],IN:[],NOT:[],"+":[],"-":[],"*":[],"/":[],"}":[],">>":[],"[":[],NIL:[],BLANK_NODE_LABEL:[],ANON:[],"]":[],GRAPH:[],"{":[],OPTIONAL:[],MINUS:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[]},"?or([[*,unaryExpression],[/,unaryExpression]])":{"*":["or([[*,unaryExpression],[/,unaryExpression]])"],"/":["or([[*,unaryExpression],[/,unaryExpression]])"],"+":[],"-":[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[],AS:[],")":[],",":[],"||":[],"&&":[],"=":[],"!=":[],"<":[],">":[],"<=":[],">=":[],IN:[],NOT:[],";":[]},"?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])":{"=":["or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],"!=":["or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],"<":["or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],">":["or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],"<=":["or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],">=":["or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],IN:["or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],NOT:["or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],AS:[],")":[],",":[],"||":[],"&&":[],";":[]},"?orderClause":{ORDER:["orderClause"],VALUES:[],LIMIT:[],OFFSET:[],$:[],"}":[]},"?pathMod":{"*":["pathMod"],"?":["pathMod"],"+":["pathMod"],"{":["pathMod"],"|":[],"/":[],")":[],"(":[],"[":[],VAR1:[],VAR2:[],NIL:[],IRI_REF:[],TRUE:[],FALSE:[],BLANK_NODE_LABEL:[],ANON:[],"<<":[],PNAME_LN:[],PNAME_NS:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[]},"?triplesBlock":{VAR1:["triplesBlock"],VAR2:["triplesBlock"],NIL:["triplesBlock"],"(":["triplesBlock"],"[":["triplesBlock"],IRI_REF:["triplesBlock"],TRUE:["triplesBlock"],FALSE:["triplesBlock"],BLANK_NODE_LABEL:["triplesBlock"],ANON:["triplesBlock"],"<<":["triplesBlock"],PNAME_LN:["triplesBlock"],PNAME_NS:["triplesBlock"],STRING_LITERAL1:["triplesBlock"],STRING_LITERAL2:["triplesBlock"],STRING_LITERAL_LONG1:["triplesBlock"],STRING_LITERAL_LONG2:["triplesBlock"],INTEGER:["triplesBlock"],DECIMAL:["triplesBlock"],DOUBLE:["triplesBlock"],INTEGER_POSITIVE:["triplesBlock"],DECIMAL_POSITIVE:["triplesBlock"],DOUBLE_POSITIVE:["triplesBlock"],INTEGER_NEGATIVE:["triplesBlock"],DECIMAL_NEGATIVE:["triplesBlock"],DOUBLE_NEGATIVE:["triplesBlock"],"{":[],OPTIONAL:[],MINUS:[],GRAPH:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[],"}":[]},"?triplesTemplate":{VAR1:["triplesTemplate"],VAR2:["triplesTemplate"],NIL:["triplesTemplate"],"(":["triplesTemplate"],"[":["triplesTemplate"],IRI_REF:["triplesTemplate"],TRUE:["triplesTemplate"],FALSE:["triplesTemplate"],BLANK_NODE_LABEL:["triplesTemplate"],ANON:["triplesTemplate"],"<<":["triplesTemplate"],PNAME_LN:["triplesTemplate"],PNAME_NS:["triplesTemplate"],STRING_LITERAL1:["triplesTemplate"],STRING_LITERAL2:["triplesTemplate"],STRING_LITERAL_LONG1:["triplesTemplate"],STRING_LITERAL_LONG2:["triplesTemplate"],INTEGER:["triplesTemplate"],DECIMAL:["triplesTemplate"],DOUBLE:["triplesTemplate"],INTEGER_POSITIVE:["triplesTemplate"],DECIMAL_POSITIVE:["triplesTemplate"],DOUBLE_POSITIVE:["triplesTemplate"],INTEGER_NEGATIVE:["triplesTemplate"],DECIMAL_NEGATIVE:["triplesTemplate"],DOUBLE_NEGATIVE:["triplesTemplate"],"}":[],GRAPH:[]},"?whereClause":{WHERE:["whereClause"],"{":["whereClause"],ORDER:[],HAVING:[],GROUP:[],LIMIT:[],OFFSET:[],VALUES:[],$:[]},"[!=,numericExpression]":{"!=":["!=","numericExpression"]},"[&&,valueLogical]":{"&&":["&&","valueLogical"]},"[(,*dataBlockValue,)]":{"(":["(","*dataBlockValue",")"]},"[(,*var,)]":{"(":["(","*var",")"]},"[(,expression,)]":{"(":["(","expression",")"]},"[(,expression,AS,var,)]":{"(":["(","expression","AS","var",")"]},"[*,unaryExpression]":{"*":["*","unaryExpression"]},"[*datasetClause,WHERE,{,?triplesTemplate,},solutionModifier]":{WHERE:["*datasetClause","WHERE","{","?triplesTemplate","}","solutionModifier"],FROM:["*datasetClause","WHERE","{","?triplesTemplate","}","solutionModifier"]},"[+,multiplicativeExpression]":{"+":["+","multiplicativeExpression"]},"[,,expression]":{",":[",","expression"]},"[,,integer,}]":{",":[",","integer","}"]},"[,,objectPath]":{",":[",","objectPath"]},"[,,object]":{",":[",","object"]},"[,,or([},[integer,}]])]":{",":[",","or([},[integer,}]])"]},"[-,multiplicativeExpression]":{"-":["-","multiplicativeExpression"]},"[.,?constructTriples]":{".":[".","?constructTriples"]},"[.,?triplesBlock]":{".":[".","?triplesBlock"]},"[.,?triplesTemplate]":{".":[".","?triplesTemplate"]},"[/,pathEltOrInverse]":{"/":["/","pathEltOrInverse"]},"[/,unaryExpression]":{"/":["/","unaryExpression"]},"[;,?[or([verbPath,verbSimple]),objectList]]":{";":[";","?[or([verbPath,verbSimple]),objectList]"]},"[;,SEPARATOR,=,string]":{";":[";","SEPARATOR","=","string"]},"[;,update]":{";":[";","update"]},"[<,numericExpression]":{"<":["<","numericExpression"]},"[<=,numericExpression]":{"<=":["<=","numericExpression"]},"[=,numericExpression]":{"=":["=","numericExpression"]},"[>,numericExpression]":{">":[">","numericExpression"]},"[>=,numericExpression]":{">=":[">=","numericExpression"]},"[AS,var]":{AS:["AS","var"]},"[IN,expressionList]":{IN:["IN","expressionList"]},"[INTO,graphRef]":{INTO:["INTO","graphRef"]},"[NAMED,iriRef]":{NAMED:["NAMED","iriRef"]},"[NOT,IN,expressionList]":{NOT:["NOT","IN","expressionList"]},"[UNION,groupGraphPattern]":{UNION:["UNION","groupGraphPattern"]},"[^^,iriRef]":{"^^":["^^","iriRef"]},"[constructTemplate,*datasetClause,whereClause,solutionModifier]":{"{":["constructTemplate","*datasetClause","whereClause","solutionModifier"]},"[deleteClause,?insertClause]":{DELETE:["deleteClause","?insertClause"]},"[graphPatternNotTriples,?.,?triplesBlock]":{"{":["graphPatternNotTriples","?.","?triplesBlock"],OPTIONAL:["graphPatternNotTriples","?.","?triplesBlock"],MINUS:["graphPatternNotTriples","?.","?triplesBlock"],GRAPH:["graphPatternNotTriples","?.","?triplesBlock"],SERVICE:["graphPatternNotTriples","?.","?triplesBlock"],FILTER:["graphPatternNotTriples","?.","?triplesBlock"],BIND:["graphPatternNotTriples","?.","?triplesBlock"],VALUES:["graphPatternNotTriples","?.","?triplesBlock"]},"[integer,or([[,,or([},[integer,}]])],}])]":{INTEGER:["integer","or([[,,or([},[integer,}]])],}])"]},"[integer,}]":{INTEGER:["integer","}"]},"[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]":{INTEGER_POSITIVE:["or([numericLiteralPositive,numericLiteralNegative])","?or([[*,unaryExpression],[/,unaryExpression]])"],DECIMAL_POSITIVE:["or([numericLiteralPositive,numericLiteralNegative])","?or([[*,unaryExpression],[/,unaryExpression]])"],DOUBLE_POSITIVE:["or([numericLiteralPositive,numericLiteralNegative])","?or([[*,unaryExpression],[/,unaryExpression]])"],INTEGER_NEGATIVE:["or([numericLiteralPositive,numericLiteralNegative])","?or([[*,unaryExpression],[/,unaryExpression]])"],DECIMAL_NEGATIVE:["or([numericLiteralPositive,numericLiteralNegative])","?or([[*,unaryExpression],[/,unaryExpression]])"],DOUBLE_NEGATIVE:["or([numericLiteralPositive,numericLiteralNegative])","?or([[*,unaryExpression],[/,unaryExpression]])"]},"[or([verbPath,verbSimple]),objectList]":{VAR1:["or([verbPath,verbSimple])","objectList"],VAR2:["or([verbPath,verbSimple])","objectList"],"^":["or([verbPath,verbSimple])","objectList"],a:["or([verbPath,verbSimple])","objectList"],"!":["or([verbPath,verbSimple])","objectList"],"(":["or([verbPath,verbSimple])","objectList"],IRI_REF:["or([verbPath,verbSimple])","objectList"],PNAME_LN:["or([verbPath,verbSimple])","objectList"],PNAME_NS:["or([verbPath,verbSimple])","objectList"]},"[pathOneInPropertySet,*[|,pathOneInPropertySet]]":{a:["pathOneInPropertySet","*[|,pathOneInPropertySet]"],"^":["pathOneInPropertySet","*[|,pathOneInPropertySet]"],IRI_REF:["pathOneInPropertySet","*[|,pathOneInPropertySet]"],PNAME_LN:["pathOneInPropertySet","*[|,pathOneInPropertySet]"],PNAME_NS:["pathOneInPropertySet","*[|,pathOneInPropertySet]"]},"[quadsNotTriples,?.,?triplesTemplate]":{GRAPH:["quadsNotTriples","?.","?triplesTemplate"]},"[update1,?[;,update]]":{INSERT:["update1","?[;,update]"],DELETE:["update1","?[;,update]"],LOAD:["update1","?[;,update]"],CLEAR:["update1","?[;,update]"],DROP:["update1","?[;,update]"],ADD:["update1","?[;,update]"],MOVE:["update1","?[;,update]"],COPY:["update1","?[;,update]"],CREATE:["update1","?[;,update]"],WITH:["update1","?[;,update]"]},"[|,pathOneInPropertySet]":{"|":["|","pathOneInPropertySet"]},"[|,pathSequence]":{"|":["|","pathSequence"]},"[||,conditionalAndExpression]":{"||":["||","conditionalAndExpression"]},add:{ADD:["ADD","?SILENT_4","graphOrDefault","TO","graphOrDefault"]},additiveExpression:{"!":["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],"+":["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],"-":["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],VAR1:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],VAR2:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],"(":["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STR:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],LANG:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],LANGMATCHES:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DATATYPE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],BOUND:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],IRI:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],URI:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],BNODE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],RAND:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],ABS:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],CEIL:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],FLOOR:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],ROUND:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],CONCAT:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRLEN:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],UCASE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],LCASE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],ENCODE_FOR_URI:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],CONTAINS:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRSTARTS:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRENDS:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRBEFORE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRAFTER:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],YEAR:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],MONTH:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DAY:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],HOURS:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],MINUTES:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SECONDS:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],TIMEZONE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],TZ:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],NOW:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],UUID:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRUUID:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],MD5:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SHA1:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SHA256:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SHA384:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SHA512:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],COALESCE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],IF:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRLANG:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRDT:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SAMETERM:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],ISIRI:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],ISURI:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],ISBLANK:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],ISLITERAL:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],ISNUMERIC:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],TRUE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],FALSE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],"<<":["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],COUNT:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SUM:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],MIN:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],MAX:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],AVG:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SAMPLE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],GROUP_CONCAT:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SUBSTR:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],REPLACE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],REGEX:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],EXISTS:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],NOT:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],IRI_REF:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRING_LITERAL1:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRING_LITERAL2:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRING_LITERAL_LONG1:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRING_LITERAL_LONG2:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],INTEGER:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DECIMAL:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DOUBLE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],INTEGER_POSITIVE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DECIMAL_POSITIVE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DOUBLE_POSITIVE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],INTEGER_NEGATIVE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DECIMAL_NEGATIVE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DOUBLE_NEGATIVE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],PNAME_LN:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],PNAME_NS:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"]},aggregate:{COUNT:["COUNT","(","?DISTINCT","or([*,expression])",")"],SUM:["SUM","(","?DISTINCT","expression",")"],MIN:["MIN","(","?DISTINCT","expression",")"],MAX:["MAX","(","?DISTINCT","expression",")"],AVG:["AVG","(","?DISTINCT","expression",")"],SAMPLE:["SAMPLE","(","?DISTINCT","expression",")"],GROUP_CONCAT:["GROUP_CONCAT","(","?DISTINCT","expression","?[;,SEPARATOR,=,string]",")"]},allowBnodes:{"}":[]},allowVars:{"}":[],UNDEF:[],IRI_REF:[],TRUE:[],FALSE:[],"<<":[],PNAME_LN:[],PNAME_NS:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[],")":[]},argList:{NIL:["NIL"],"(":["(","?DISTINCT","expression","*[,,expression]",")"]},askQuery:{ASK:["ASK","*datasetClause","whereClause","solutionModifier"]},baseDecl:{BASE:["BASE","IRI_REF"]},bind:{BIND:["BIND","(","expression","AS","var",")"]},blankNode:{BLANK_NODE_LABEL:["BLANK_NODE_LABEL"],ANON:["ANON"]},blankNodePropertyList:{"[":["[","propertyListNotEmpty","]"]},blankNodePropertyListPath:{"[":["[","propertyListPathNotEmpty","]"]},booleanLiteral:{TRUE:["TRUE"],FALSE:["FALSE"]},brackettedExpression:{"(":["(","expression",")"]},builtInCall:{STR:["STR","(","expression",")"],LANG:["LANG","(","expression",")"],LANGMATCHES:["LANGMATCHES","(","expression",",","expression",")"],DATATYPE:["DATATYPE","(","expression",")"],BOUND:["BOUND","(","var",")"],IRI:["IRI","(","expression",")"],URI:["URI","(","expression",")"],BNODE:["BNODE","or([[(,expression,)],NIL])"],RAND:["RAND","NIL"],ABS:["ABS","(","expression",")"],CEIL:["CEIL","(","expression",")"],FLOOR:["FLOOR","(","expression",")"],ROUND:["ROUND","(","expression",")"],CONCAT:["CONCAT","expressionList"],SUBSTR:["substringExpression"],STRLEN:["STRLEN","(","expression",")"],REPLACE:["strReplaceExpression"],UCASE:["UCASE","(","expression",")"],LCASE:["LCASE","(","expression",")"],ENCODE_FOR_URI:["ENCODE_FOR_URI","(","expression",")"],CONTAINS:["CONTAINS","(","expression",",","expression",")"],STRSTARTS:["STRSTARTS","(","expression",",","expression",")"],STRENDS:["STRENDS","(","expression",",","expression",")"],STRBEFORE:["STRBEFORE","(","expression",",","expression",")"],STRAFTER:["STRAFTER","(","expression",",","expression",")"],YEAR:["YEAR","(","expression",")"],MONTH:["MONTH","(","expression",")"],DAY:["DAY","(","expression",")"],HOURS:["HOURS","(","expression",")"],MINUTES:["MINUTES","(","expression",")"],SECONDS:["SECONDS","(","expression",")"],TIMEZONE:["TIMEZONE","(","expression",")"],TZ:["TZ","(","expression",")"],NOW:["NOW","NIL"],UUID:["UUID","NIL"],STRUUID:["STRUUID","NIL"],MD5:["MD5","(","expression",")"],SHA1:["SHA1","(","expression",")"],SHA256:["SHA256","(","expression",")"],SHA384:["SHA384","(","expression",")"],SHA512:["SHA512","(","expression",")"],COALESCE:["COALESCE","expressionList"],IF:["IF","(","expression",",","expression",",","expression",")"],STRLANG:["STRLANG","(","expression",",","expression",")"],STRDT:["STRDT","(","expression",",","expression",")"],SAMETERM:["SAMETERM","(","expression",",","expression",")"],ISIRI:["ISIRI","(","expression",")"],ISURI:["ISURI","(","expression",")"],ISBLANK:["ISBLANK","(","expression",")"],ISLITERAL:["ISLITERAL","(","expression",")"],ISNUMERIC:["ISNUMERIC","(","expression",")"],REGEX:["regexExpression"],EXISTS:["existsFunc"],NOT:["notExistsFunc"]},clear:{CLEAR:["CLEAR","?SILENT_2","graphRefAll"]},collection:{"(":["(","+graphNode",")"]},collectionPath:{"(":["(","+graphNodePath",")"]},conditionalAndExpression:{"!":["valueLogical","*[&&,valueLogical]"],"+":["valueLogical","*[&&,valueLogical]"],"-":["valueLogical","*[&&,valueLogical]"],VAR1:["valueLogical","*[&&,valueLogical]"],VAR2:["valueLogical","*[&&,valueLogical]"],"(":["valueLogical","*[&&,valueLogical]"],STR:["valueLogical","*[&&,valueLogical]"],LANG:["valueLogical","*[&&,valueLogical]"],LANGMATCHES:["valueLogical","*[&&,valueLogical]"],DATATYPE:["valueLogical","*[&&,valueLogical]"],BOUND:["valueLogical","*[&&,valueLogical]"],IRI:["valueLogical","*[&&,valueLogical]"],URI:["valueLogical","*[&&,valueLogical]"],BNODE:["valueLogical","*[&&,valueLogical]"],RAND:["valueLogical","*[&&,valueLogical]"],ABS:["valueLogical","*[&&,valueLogical]"],CEIL:["valueLogical","*[&&,valueLogical]"],FLOOR:["valueLogical","*[&&,valueLogical]"],ROUND:["valueLogical","*[&&,valueLogical]"],CONCAT:["valueLogical","*[&&,valueLogical]"],STRLEN:["valueLogical","*[&&,valueLogical]"],UCASE:["valueLogical","*[&&,valueLogical]"],LCASE:["valueLogical","*[&&,valueLogical]"],ENCODE_FOR_URI:["valueLogical","*[&&,valueLogical]"],CONTAINS:["valueLogical","*[&&,valueLogical]"],STRSTARTS:["valueLogical","*[&&,valueLogical]"],STRENDS:["valueLogical","*[&&,valueLogical]"],STRBEFORE:["valueLogical","*[&&,valueLogical]"],STRAFTER:["valueLogical","*[&&,valueLogical]"],YEAR:["valueLogical","*[&&,valueLogical]"],MONTH:["valueLogical","*[&&,valueLogical]"],DAY:["valueLogical","*[&&,valueLogical]"],HOURS:["valueLogical","*[&&,valueLogical]"],MINUTES:["valueLogical","*[&&,valueLogical]"],SECONDS:["valueLogical","*[&&,valueLogical]"],TIMEZONE:["valueLogical","*[&&,valueLogical]"],TZ:["valueLogical","*[&&,valueLogical]"],NOW:["valueLogical","*[&&,valueLogical]"],UUID:["valueLogical","*[&&,valueLogical]"],STRUUID:["valueLogical","*[&&,valueLogical]"],MD5:["valueLogical","*[&&,valueLogical]"],SHA1:["valueLogical","*[&&,valueLogical]"],SHA256:["valueLogical","*[&&,valueLogical]"],SHA384:["valueLogical","*[&&,valueLogical]"],SHA512:["valueLogical","*[&&,valueLogical]"],COALESCE:["valueLogical","*[&&,valueLogical]"],IF:["valueLogical","*[&&,valueLogical]"],STRLANG:["valueLogical","*[&&,valueLogical]"],STRDT:["valueLogical","*[&&,valueLogical]"],SAMETERM:["valueLogical","*[&&,valueLogical]"],ISIRI:["valueLogical","*[&&,valueLogical]"],ISURI:["valueLogical","*[&&,valueLogical]"],ISBLANK:["valueLogical","*[&&,valueLogical]"],ISLITERAL:["valueLogical","*[&&,valueLogical]"],ISNUMERIC:["valueLogical","*[&&,valueLogical]"],TRUE:["valueLogical","*[&&,valueLogical]"],FALSE:["valueLogical","*[&&,valueLogical]"],"<<":["valueLogical","*[&&,valueLogical]"],COUNT:["valueLogical","*[&&,valueLogical]"],SUM:["valueLogical","*[&&,valueLogical]"],MIN:["valueLogical","*[&&,valueLogical]"],MAX:["valueLogical","*[&&,valueLogical]"],AVG:["valueLogical","*[&&,valueLogical]"],SAMPLE:["valueLogical","*[&&,valueLogical]"],GROUP_CONCAT:["valueLogical","*[&&,valueLogical]"],SUBSTR:["valueLogical","*[&&,valueLogical]"],REPLACE:["valueLogical","*[&&,valueLogical]"],REGEX:["valueLogical","*[&&,valueLogical]"],EXISTS:["valueLogical","*[&&,valueLogical]"],NOT:["valueLogical","*[&&,valueLogical]"],IRI_REF:["valueLogical","*[&&,valueLogical]"],STRING_LITERAL1:["valueLogical","*[&&,valueLogical]"],STRING_LITERAL2:["valueLogical","*[&&,valueLogical]"],STRING_LITERAL_LONG1:["valueLogical","*[&&,valueLogical]"],STRING_LITERAL_LONG2:["valueLogical","*[&&,valueLogical]"],INTEGER:["valueLogical","*[&&,valueLogical]"],DECIMAL:["valueLogical","*[&&,valueLogical]"],DOUBLE:["valueLogical","*[&&,valueLogical]"],INTEGER_POSITIVE:["valueLogical","*[&&,valueLogical]"],DECIMAL_POSITIVE:["valueLogical","*[&&,valueLogical]"],DOUBLE_POSITIVE:["valueLogical","*[&&,valueLogical]"],INTEGER_NEGATIVE:["valueLogical","*[&&,valueLogical]"],DECIMAL_NEGATIVE:["valueLogical","*[&&,valueLogical]"],DOUBLE_NEGATIVE:["valueLogical","*[&&,valueLogical]"],PNAME_LN:["valueLogical","*[&&,valueLogical]"],PNAME_NS:["valueLogical","*[&&,valueLogical]"]},conditionalOrExpression:{"!":["conditionalAndExpression","*[||,conditionalAndExpression]"],"+":["conditionalAndExpression","*[||,conditionalAndExpression]"],"-":["conditionalAndExpression","*[||,conditionalAndExpression]"],VAR1:["conditionalAndExpression","*[||,conditionalAndExpression]"],VAR2:["conditionalAndExpression","*[||,conditionalAndExpression]"],"(":["conditionalAndExpression","*[||,conditionalAndExpression]"],STR:["conditionalAndExpression","*[||,conditionalAndExpression]"],LANG:["conditionalAndExpression","*[||,conditionalAndExpression]"],LANGMATCHES:["conditionalAndExpression","*[||,conditionalAndExpression]"],DATATYPE:["conditionalAndExpression","*[||,conditionalAndExpression]"],BOUND:["conditionalAndExpression","*[||,conditionalAndExpression]"],IRI:["conditionalAndExpression","*[||,conditionalAndExpression]"],URI:["conditionalAndExpression","*[||,conditionalAndExpression]"],BNODE:["conditionalAndExpression","*[||,conditionalAndExpression]"],RAND:["conditionalAndExpression","*[||,conditionalAndExpression]"],ABS:["conditionalAndExpression","*[||,conditionalAndExpression]"],CEIL:["conditionalAndExpression","*[||,conditionalAndExpression]"],FLOOR:["conditionalAndExpression","*[||,conditionalAndExpression]"],ROUND:["conditionalAndExpression","*[||,conditionalAndExpression]"],CONCAT:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRLEN:["conditionalAndExpression","*[||,conditionalAndExpression]"],UCASE:["conditionalAndExpression","*[||,conditionalAndExpression]"],LCASE:["conditionalAndExpression","*[||,conditionalAndExpression]"],ENCODE_FOR_URI:["conditionalAndExpression","*[||,conditionalAndExpression]"],CONTAINS:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRSTARTS:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRENDS:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRBEFORE:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRAFTER:["conditionalAndExpression","*[||,conditionalAndExpression]"],YEAR:["conditionalAndExpression","*[||,conditionalAndExpression]"],MONTH:["conditionalAndExpression","*[||,conditionalAndExpression]"],DAY:["conditionalAndExpression","*[||,conditionalAndExpression]"],HOURS:["conditionalAndExpression","*[||,conditionalAndExpression]"],MINUTES:["conditionalAndExpression","*[||,conditionalAndExpression]"],SECONDS:["conditionalAndExpression","*[||,conditionalAndExpression]"],TIMEZONE:["conditionalAndExpression","*[||,conditionalAndExpression]"],TZ:["conditionalAndExpression","*[||,conditionalAndExpression]"],NOW:["conditionalAndExpression","*[||,conditionalAndExpression]"],UUID:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRUUID:["conditionalAndExpression","*[||,conditionalAndExpression]"],MD5:["conditionalAndExpression","*[||,conditionalAndExpression]"],SHA1:["conditionalAndExpression","*[||,conditionalAndExpression]"],SHA256:["conditionalAndExpression","*[||,conditionalAndExpression]"],SHA384:["conditionalAndExpression","*[||,conditionalAndExpression]"],SHA512:["conditionalAndExpression","*[||,conditionalAndExpression]"],COALESCE:["conditionalAndExpression","*[||,conditionalAndExpression]"],IF:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRLANG:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRDT:["conditionalAndExpression","*[||,conditionalAndExpression]"],SAMETERM:["conditionalAndExpression","*[||,conditionalAndExpression]"],ISIRI:["conditionalAndExpression","*[||,conditionalAndExpression]"],ISURI:["conditionalAndExpression","*[||,conditionalAndExpression]"],ISBLANK:["conditionalAndExpression","*[||,conditionalAndExpression]"],ISLITERAL:["conditionalAndExpression","*[||,conditionalAndExpression]"],ISNUMERIC:["conditionalAndExpression","*[||,conditionalAndExpression]"],TRUE:["conditionalAndExpression","*[||,conditionalAndExpression]"],FALSE:["conditionalAndExpression","*[||,conditionalAndExpression]"],"<<":["conditionalAndExpression","*[||,conditionalAndExpression]"],COUNT:["conditionalAndExpression","*[||,conditionalAndExpression]"],SUM:["conditionalAndExpression","*[||,conditionalAndExpression]"],MIN:["conditionalAndExpression","*[||,conditionalAndExpression]"],MAX:["conditionalAndExpression","*[||,conditionalAndExpression]"],AVG:["conditionalAndExpression","*[||,conditionalAndExpression]"],SAMPLE:["conditionalAndExpression","*[||,conditionalAndExpression]"],GROUP_CONCAT:["conditionalAndExpression","*[||,conditionalAndExpression]"],SUBSTR:["conditionalAndExpression","*[||,conditionalAndExpression]"],REPLACE:["conditionalAndExpression","*[||,conditionalAndExpression]"],REGEX:["conditionalAndExpression","*[||,conditionalAndExpression]"],EXISTS:["conditionalAndExpression","*[||,conditionalAndExpression]"],NOT:["conditionalAndExpression","*[||,conditionalAndExpression]"],IRI_REF:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRING_LITERAL1:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRING_LITERAL2:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRING_LITERAL_LONG1:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRING_LITERAL_LONG2:["conditionalAndExpression","*[||,conditionalAndExpression]"],INTEGER:["conditionalAndExpression","*[||,conditionalAndExpression]"],DECIMAL:["conditionalAndExpression","*[||,conditionalAndExpression]"],DOUBLE:["conditionalAndExpression","*[||,conditionalAndExpression]"],INTEGER_POSITIVE:["conditionalAndExpression","*[||,conditionalAndExpression]"],DECIMAL_POSITIVE:["conditionalAndExpression","*[||,conditionalAndExpression]"],DOUBLE_POSITIVE:["conditionalAndExpression","*[||,conditionalAndExpression]"],INTEGER_NEGATIVE:["conditionalAndExpression","*[||,conditionalAndExpression]"],DECIMAL_NEGATIVE:["conditionalAndExpression","*[||,conditionalAndExpression]"],DOUBLE_NEGATIVE:["conditionalAndExpression","*[||,conditionalAndExpression]"],PNAME_LN:["conditionalAndExpression","*[||,conditionalAndExpression]"],PNAME_NS:["conditionalAndExpression","*[||,conditionalAndExpression]"]},constraint:{"(":["brackettedExpression"],STR:["builtInCall"],LANG:["builtInCall"],LANGMATCHES:["builtInCall"],DATATYPE:["builtInCall"],BOUND:["builtInCall"],IRI:["builtInCall"],URI:["builtInCall"],BNODE:["builtInCall"],RAND:["builtInCall"],ABS:["builtInCall"],CEIL:["builtInCall"],FLOOR:["builtInCall"],ROUND:["builtInCall"],CONCAT:["builtInCall"],STRLEN:["builtInCall"],UCASE:["builtInCall"],LCASE:["builtInCall"],ENCODE_FOR_URI:["builtInCall"],CONTAINS:["builtInCall"],STRSTARTS:["builtInCall"],STRENDS:["builtInCall"],STRBEFORE:["builtInCall"],STRAFTER:["builtInCall"],YEAR:["builtInCall"],MONTH:["builtInCall"],DAY:["builtInCall"],HOURS:["builtInCall"],MINUTES:["builtInCall"],SECONDS:["builtInCall"],TIMEZONE:["builtInCall"],TZ:["builtInCall"],NOW:["builtInCall"],UUID:["builtInCall"],STRUUID:["builtInCall"],MD5:["builtInCall"],SHA1:["builtInCall"],SHA256:["builtInCall"],SHA384:["builtInCall"],SHA512:["builtInCall"],COALESCE:["builtInCall"],IF:["builtInCall"],STRLANG:["builtInCall"],STRDT:["builtInCall"],SAMETERM:["builtInCall"],ISIRI:["builtInCall"],ISURI:["builtInCall"],ISBLANK:["builtInCall"],ISLITERAL:["builtInCall"],ISNUMERIC:["builtInCall"],SUBSTR:["builtInCall"],REPLACE:["builtInCall"],REGEX:["builtInCall"],EXISTS:["builtInCall"],NOT:["builtInCall"],IRI_REF:["functionCall"],PNAME_LN:["functionCall"],PNAME_NS:["functionCall"]},constructQuery:{CONSTRUCT:["CONSTRUCT","or([[constructTemplate,*datasetClause,whereClause,solutionModifier],[*datasetClause,WHERE,{,?triplesTemplate,},solutionModifier]])"]},constructTemplate:{"{":["{","?constructTriples","}"]},constructTriples:{VAR1:["triplesSameSubject","?[.,?constructTriples]"],VAR2:["triplesSameSubject","?[.,?constructTriples]"],NIL:["triplesSameSubject","?[.,?constructTriples]"],"(":["triplesSameSubject","?[.,?constructTriples]"],"[":["triplesSameSubject","?[.,?constructTriples]"],IRI_REF:["triplesSameSubject","?[.,?constructTriples]"],TRUE:["triplesSameSubject","?[.,?constructTriples]"],FALSE:["triplesSameSubject","?[.,?constructTriples]"],BLANK_NODE_LABEL:["triplesSameSubject","?[.,?constructTriples]"],ANON:["triplesSameSubject","?[.,?constructTriples]"],"<<":["triplesSameSubject","?[.,?constructTriples]"],PNAME_LN:["triplesSameSubject","?[.,?constructTriples]"],PNAME_NS:["triplesSameSubject","?[.,?constructTriples]"],STRING_LITERAL1:["triplesSameSubject","?[.,?constructTriples]"],STRING_LITERAL2:["triplesSameSubject","?[.,?constructTriples]"],STRING_LITERAL_LONG1:["triplesSameSubject","?[.,?constructTriples]"],STRING_LITERAL_LONG2:["triplesSameSubject","?[.,?constructTriples]"],INTEGER:["triplesSameSubject","?[.,?constructTriples]"],DECIMAL:["triplesSameSubject","?[.,?constructTriples]"],DOUBLE:["triplesSameSubject","?[.,?constructTriples]"],INTEGER_POSITIVE:["triplesSameSubject","?[.,?constructTriples]"],DECIMAL_POSITIVE:["triplesSameSubject","?[.,?constructTriples]"],DOUBLE_POSITIVE:["triplesSameSubject","?[.,?constructTriples]"],INTEGER_NEGATIVE:["triplesSameSubject","?[.,?constructTriples]"],DECIMAL_NEGATIVE:["triplesSameSubject","?[.,?constructTriples]"],DOUBLE_NEGATIVE:["triplesSameSubject","?[.,?constructTriples]"]},copy:{COPY:["COPY","?SILENT_4","graphOrDefault","TO","graphOrDefault"]},create:{CREATE:["CREATE","?SILENT_3","graphRef"]},dataBlock:{NIL:["or([inlineDataOneVar,inlineDataFull])"],"(":["or([inlineDataOneVar,inlineDataFull])"],VAR1:["or([inlineDataOneVar,inlineDataFull])"],VAR2:["or([inlineDataOneVar,inlineDataFull])"]},dataBlockValue:{IRI_REF:["iriRef"],PNAME_LN:["iriRef"],PNAME_NS:["iriRef"],STRING_LITERAL1:["rdfLiteral"],STRING_LITERAL2:["rdfLiteral"],STRING_LITERAL_LONG1:["rdfLiteral"],STRING_LITERAL_LONG2:["rdfLiteral"],INTEGER:["numericLiteral"],DECIMAL:["numericLiteral"],DOUBLE:["numericLiteral"],INTEGER_POSITIVE:["numericLiteral"],DECIMAL_POSITIVE:["numericLiteral"],DOUBLE_POSITIVE:["numericLiteral"],INTEGER_NEGATIVE:["numericLiteral"],DECIMAL_NEGATIVE:["numericLiteral"],DOUBLE_NEGATIVE:["numericLiteral"],TRUE:["booleanLiteral"],FALSE:["booleanLiteral"],"<<":["disallowVars","embeddedTriple","allowVars"],UNDEF:["UNDEF"]},datasetClause:{FROM:["FROM","or([defaultGraphClause,namedGraphClause])"]},defaultGraphClause:{IRI_REF:["sourceSelector"],PNAME_LN:["sourceSelector"],PNAME_NS:["sourceSelector"]},delete1:{DATA:["DATA","quadDataNoBnodes"],WHERE:["WHERE","quadPatternNoBnodes"],"{":["quadPatternNoBnodes","?insertClause","*usingClause","WHERE","groupGraphPattern"]},deleteClause:{DELETE:["DELETE","quadPattern"]},describeDatasetClause:{FROM:["FROM","or([defaultGraphClause,namedGraphClause])"]},describeQuery:{DESCRIBE:["DESCRIBE","or([+or([varOrIRIref,embeddedTriple]),*])","*describeDatasetClause","?whereClause","solutionModifier"]},disallowBnodes:{"}":[],GRAPH:[],VAR1:[],VAR2:[],NIL:[],"(":[],"[":[],IRI_REF:[],TRUE:[],FALSE:[],BLANK_NODE_LABEL:[],ANON:[],"<<":[],PNAME_LN:[],PNAME_NS:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[]},disallowVars:{"}":[],GRAPH:[],VAR1:[],VAR2:[],NIL:[],"(":[],"[":[],IRI_REF:[],TRUE:[],FALSE:[],BLANK_NODE_LABEL:[],ANON:[],"<<":[],PNAME_LN:[],PNAME_NS:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[]},drop:{DROP:["DROP","?SILENT_2","graphRefAll"]},embeddedTriple:{"<<":["<<","varOrTerm","verb","varOrTerm",">>"]},existsFunc:{EXISTS:["EXISTS","groupGraphPattern"]},expression:{"!":["conditionalOrExpression"],"+":["conditionalOrExpression"],"-":["conditionalOrExpression"],VAR1:["conditionalOrExpression"],VAR2:["conditionalOrExpression"],"(":["conditionalOrExpression"],STR:["conditionalOrExpression"],LANG:["conditionalOrExpression"],LANGMATCHES:["conditionalOrExpression"],DATATYPE:["conditionalOrExpression"],BOUND:["conditionalOrExpression"],IRI:["conditionalOrExpression"],URI:["conditionalOrExpression"],BNODE:["conditionalOrExpression"],RAND:["conditionalOrExpression"],ABS:["conditionalOrExpression"],CEIL:["conditionalOrExpression"],FLOOR:["conditionalOrExpression"],ROUND:["conditionalOrExpression"],CONCAT:["conditionalOrExpression"],STRLEN:["conditionalOrExpression"],UCASE:["conditionalOrExpression"],LCASE:["conditionalOrExpression"],ENCODE_FOR_URI:["conditionalOrExpression"],CONTAINS:["conditionalOrExpression"],STRSTARTS:["conditionalOrExpression"],STRENDS:["conditionalOrExpression"],STRBEFORE:["conditionalOrExpression"],STRAFTER:["conditionalOrExpression"],YEAR:["conditionalOrExpression"],MONTH:["conditionalOrExpression"],DAY:["conditionalOrExpression"],HOURS:["conditionalOrExpression"],MINUTES:["conditionalOrExpression"],SECONDS:["conditionalOrExpression"],TIMEZONE:["conditionalOrExpression"],TZ:["conditionalOrExpression"],NOW:["conditionalOrExpression"],UUID:["conditionalOrExpression"],STRUUID:["conditionalOrExpression"],MD5:["conditionalOrExpression"],SHA1:["conditionalOrExpression"],SHA256:["conditionalOrExpression"],SHA384:["conditionalOrExpression"],SHA512:["conditionalOrExpression"],COALESCE:["conditionalOrExpression"],IF:["conditionalOrExpression"],STRLANG:["conditionalOrExpression"],STRDT:["conditionalOrExpression"],SAMETERM:["conditionalOrExpression"],ISIRI:["conditionalOrExpression"],ISURI:["conditionalOrExpression"],ISBLANK:["conditionalOrExpression"],ISLITERAL:["conditionalOrExpression"],ISNUMERIC:["conditionalOrExpression"],TRUE:["conditionalOrExpression"],FALSE:["conditionalOrExpression"],"<<":["conditionalOrExpression"],COUNT:["conditionalOrExpression"],SUM:["conditionalOrExpression"],MIN:["conditionalOrExpression"],MAX:["conditionalOrExpression"],AVG:["conditionalOrExpression"],SAMPLE:["conditionalOrExpression"],GROUP_CONCAT:["conditionalOrExpression"],SUBSTR:["conditionalOrExpression"],REPLACE:["conditionalOrExpression"],REGEX:["conditionalOrExpression"],EXISTS:["conditionalOrExpression"],NOT:["conditionalOrExpression"],IRI_REF:["conditionalOrExpression"],STRING_LITERAL1:["conditionalOrExpression"],STRING_LITERAL2:["conditionalOrExpression"],STRING_LITERAL_LONG1:["conditionalOrExpression"],STRING_LITERAL_LONG2:["conditionalOrExpression"],INTEGER:["conditionalOrExpression"],DECIMAL:["conditionalOrExpression"],DOUBLE:["conditionalOrExpression"],INTEGER_POSITIVE:["conditionalOrExpression"],DECIMAL_POSITIVE:["conditionalOrExpression"],DOUBLE_POSITIVE:["conditionalOrExpression"],INTEGER_NEGATIVE:["conditionalOrExpression"],DECIMAL_NEGATIVE:["conditionalOrExpression"],DOUBLE_NEGATIVE:["conditionalOrExpression"],PNAME_LN:["conditionalOrExpression"],PNAME_NS:["conditionalOrExpression"]},expressionList:{NIL:["NIL"],"(":["(","expression","*[,,expression]",")"]},filter:{FILTER:["FILTER","constraint"]},functionCall:{IRI_REF:["iriRef","argList"],PNAME_LN:["iriRef","argList"],PNAME_NS:["iriRef","argList"]},graphGraphPattern:{GRAPH:["GRAPH","varOrIRIref","groupGraphPattern"]},graphNode:{VAR1:["varOrTerm"],VAR2:["varOrTerm"],NIL:["varOrTerm"],IRI_REF:["varOrTerm"],TRUE:["varOrTerm"],FALSE:["varOrTerm"],BLANK_NODE_LABEL:["varOrTerm"],ANON:["varOrTerm"],"<<":["varOrTerm"],PNAME_LN:["varOrTerm"],PNAME_NS:["varOrTerm"],STRING_LITERAL1:["varOrTerm"],STRING_LITERAL2:["varOrTerm"],STRING_LITERAL_LONG1:["varOrTerm"],STRING_LITERAL_LONG2:["varOrTerm"],INTEGER:["varOrTerm"],DECIMAL:["varOrTerm"],DOUBLE:["varOrTerm"],INTEGER_POSITIVE:["varOrTerm"],DECIMAL_POSITIVE:["varOrTerm"],DOUBLE_POSITIVE:["varOrTerm"],INTEGER_NEGATIVE:["varOrTerm"],DECIMAL_NEGATIVE:["varOrTerm"],DOUBLE_NEGATIVE:["varOrTerm"],"(":["triplesNode"],"[":["triplesNode"]},graphNodePath:{VAR1:["varOrTerm"],VAR2:["varOrTerm"],NIL:["varOrTerm"],IRI_REF:["varOrTerm"],TRUE:["varOrTerm"],FALSE:["varOrTerm"],BLANK_NODE_LABEL:["varOrTerm"],ANON:["varOrTerm"],"<<":["varOrTerm"],PNAME_LN:["varOrTerm"],PNAME_NS:["varOrTerm"],STRING_LITERAL1:["varOrTerm"],STRING_LITERAL2:["varOrTerm"],STRING_LITERAL_LONG1:["varOrTerm"],STRING_LITERAL_LONG2:["varOrTerm"],INTEGER:["varOrTerm"],DECIMAL:["varOrTerm"],DOUBLE:["varOrTerm"],INTEGER_POSITIVE:["varOrTerm"],DECIMAL_POSITIVE:["varOrTerm"],DOUBLE_POSITIVE:["varOrTerm"],INTEGER_NEGATIVE:["varOrTerm"],DECIMAL_NEGATIVE:["varOrTerm"],DOUBLE_NEGATIVE:["varOrTerm"],"(":["triplesNodePath"],"[":["triplesNodePath"]},graphOrDefault:{DEFAULT:["DEFAULT"],IRI_REF:["?GRAPH","iriRef"],PNAME_LN:["?GRAPH","iriRef"],PNAME_NS:["?GRAPH","iriRef"],GRAPH:["?GRAPH","iriRef"]},graphPatternNotTriples:{"{":["groupOrUnionGraphPattern"],OPTIONAL:["optionalGraphPattern"],MINUS:["minusGraphPattern"],GRAPH:["graphGraphPattern"],SERVICE:["serviceGraphPattern"],FILTER:["filter"],BIND:["bind"],VALUES:["inlineData"]},graphRef:{GRAPH:["GRAPH","iriRef"]},graphRefAll:{GRAPH:["graphRef"],DEFAULT:["DEFAULT"],NAMED:["NAMED"],ALL:["ALL"]},graphTerm:{IRI_REF:["iriRef"],PNAME_LN:["iriRef"],PNAME_NS:["iriRef"],STRING_LITERAL1:["rdfLiteral"],STRING_LITERAL2:["rdfLiteral"],STRING_LITERAL_LONG1:["rdfLiteral"],STRING_LITERAL_LONG2:["rdfLiteral"],INTEGER:["numericLiteral"],DECIMAL:["numericLiteral"],DOUBLE:["numericLiteral"],INTEGER_POSITIVE:["numericLiteral"],DECIMAL_POSITIVE:["numericLiteral"],DOUBLE_POSITIVE:["numericLiteral"],INTEGER_NEGATIVE:["numericLiteral"],DECIMAL_NEGATIVE:["numericLiteral"],DOUBLE_NEGATIVE:["numericLiteral"],TRUE:["booleanLiteral"],FALSE:["booleanLiteral"],BLANK_NODE_LABEL:["blankNode"],ANON:["blankNode"],"<<":["embeddedTriple"],NIL:["NIL"]},groupClause:{GROUP:["GROUP","BY","+groupCondition"]},groupCondition:{STR:["builtInCall"],LANG:["builtInCall"],LANGMATCHES:["builtInCall"],DATATYPE:["builtInCall"],BOUND:["builtInCall"],IRI:["builtInCall"],URI:["builtInCall"],BNODE:["builtInCall"],RAND:["builtInCall"],ABS:["builtInCall"],CEIL:["builtInCall"],FLOOR:["builtInCall"],ROUND:["builtInCall"],CONCAT:["builtInCall"],STRLEN:["builtInCall"],UCASE:["builtInCall"],LCASE:["builtInCall"],ENCODE_FOR_URI:["builtInCall"],CONTAINS:["builtInCall"],STRSTARTS:["builtInCall"],STRENDS:["builtInCall"],STRBEFORE:["builtInCall"],STRAFTER:["builtInCall"],YEAR:["builtInCall"],MONTH:["builtInCall"],DAY:["builtInCall"],HOURS:["builtInCall"],MINUTES:["builtInCall"],SECONDS:["builtInCall"],TIMEZONE:["builtInCall"],TZ:["builtInCall"],NOW:["builtInCall"],UUID:["builtInCall"],STRUUID:["builtInCall"],MD5:["builtInCall"],SHA1:["builtInCall"],SHA256:["builtInCall"],SHA384:["builtInCall"],SHA512:["builtInCall"],COALESCE:["builtInCall"],IF:["builtInCall"],STRLANG:["builtInCall"],STRDT:["builtInCall"],SAMETERM:["builtInCall"],ISIRI:["builtInCall"],ISURI:["builtInCall"],ISBLANK:["builtInCall"],ISLITERAL:["builtInCall"],ISNUMERIC:["builtInCall"],SUBSTR:["builtInCall"],REPLACE:["builtInCall"],REGEX:["builtInCall"],EXISTS:["builtInCall"],NOT:["builtInCall"],IRI_REF:["functionCall"],PNAME_LN:["functionCall"],PNAME_NS:["functionCall"],"(":["(","expression","?[AS,var]",")"],VAR1:["var"],VAR2:["var"]},groupGraphPattern:{"{":["{","or([subSelect,groupGraphPatternSub])","}"]},groupGraphPatternSub:{"{":["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],OPTIONAL:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],MINUS:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],GRAPH:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],SERVICE:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],FILTER:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],BIND:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],VALUES:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],VAR1:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],VAR2:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],NIL:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],"(":["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],"[":["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],IRI_REF:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],TRUE:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],FALSE:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],BLANK_NODE_LABEL:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],ANON:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],"<<":["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],PNAME_LN:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],PNAME_NS:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],STRING_LITERAL1:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],STRING_LITERAL2:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],STRING_LITERAL_LONG1:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],STRING_LITERAL_LONG2:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],INTEGER:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],DECIMAL:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],DOUBLE:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],INTEGER_POSITIVE:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],DECIMAL_POSITIVE:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],DOUBLE_POSITIVE:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],INTEGER_NEGATIVE:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],DECIMAL_NEGATIVE:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],DOUBLE_NEGATIVE:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],"}":["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"]},groupOrUnionGraphPattern:{"{":["groupGraphPattern","*[UNION,groupGraphPattern]"]},havingClause:{HAVING:["HAVING","+havingCondition"]},havingCondition:{"(":["constraint"],STR:["constraint"],LANG:["constraint"],LANGMATCHES:["constraint"],DATATYPE:["constraint"],BOUND:["constraint"],IRI:["constraint"],URI:["constraint"],BNODE:["constraint"],RAND:["constraint"],ABS:["constraint"],CEIL:["constraint"],FLOOR:["constraint"],ROUND:["constraint"],CONCAT:["constraint"],STRLEN:["constraint"],UCASE:["constraint"],LCASE:["constraint"],ENCODE_FOR_URI:["constraint"],CONTAINS:["constraint"],STRSTARTS:["constraint"],STRENDS:["constraint"],STRBEFORE:["constraint"],STRAFTER:["constraint"],YEAR:["constraint"],MONTH:["constraint"],DAY:["constraint"],HOURS:["constraint"],MINUTES:["constraint"],SECONDS:["constraint"],TIMEZONE:["constraint"],TZ:["constraint"],NOW:["constraint"],UUID:["constraint"],STRUUID:["constraint"],MD5:["constraint"],SHA1:["constraint"],SHA256:["constraint"],SHA384:["constraint"],SHA512:["constraint"],COALESCE:["constraint"],IF:["constraint"],STRLANG:["constraint"],STRDT:["constraint"],SAMETERM:["constraint"],ISIRI:["constraint"],ISURI:["constraint"],ISBLANK:["constraint"],ISLITERAL:["constraint"],ISNUMERIC:["constraint"],SUBSTR:["constraint"],REPLACE:["constraint"],REGEX:["constraint"],EXISTS:["constraint"],NOT:["constraint"],IRI_REF:["constraint"],PNAME_LN:["constraint"],PNAME_NS:["constraint"]},inlineData:{VALUES:["VALUES","dataBlock"]},inlineDataFull:{NIL:["or([NIL,[(,*var,)]])","{","*or([[(,*dataBlockValue,)],NIL])","}"],"(":["or([NIL,[(,*var,)]])","{","*or([[(,*dataBlockValue,)],NIL])","}"]},inlineDataOneVar:{VAR1:["var","{","*dataBlockValue","}"],VAR2:["var","{","*dataBlockValue","}"]},insert1:{DATA:["DATA","quadData"],"{":["quadPattern","*usingClause","WHERE","groupGraphPattern"]},insertClause:{INSERT:["INSERT","quadPattern"]},integer:{INTEGER:["INTEGER"]},iriRef:{IRI_REF:["IRI_REF"],PNAME_LN:["prefixedName"],PNAME_NS:["prefixedName"]},iriRefOrFunction:{IRI_REF:["iriRef","?argList"],PNAME_LN:["iriRef","?argList"],PNAME_NS:["iriRef","?argList"]},limitClause:{LIMIT:["LIMIT","INTEGER"]},limitOffsetClauses:{LIMIT:["limitClause","?offsetClause"],OFFSET:["offsetClause","?limitClause"]},load:{LOAD:["LOAD","?SILENT_1","iriRef","?[INTO,graphRef]"]},minusGraphPattern:{MINUS:["MINUS","groupGraphPattern"]},modify:{WITH:["WITH","iriRef","or([[deleteClause,?insertClause],insertClause])","*usingClause","WHERE","groupGraphPattern"]},move:{MOVE:["MOVE","?SILENT_4","graphOrDefault","TO","graphOrDefault"]},multiplicativeExpression:{"!":["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],"+":["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],"-":["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],VAR1:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],VAR2:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],"(":["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STR:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],LANG:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],LANGMATCHES:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],DATATYPE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],BOUND:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],IRI:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],URI:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],BNODE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],RAND:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],ABS:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],CEIL:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],FLOOR:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],ROUND:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],CONCAT:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRLEN:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],UCASE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],LCASE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],ENCODE_FOR_URI:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],CONTAINS:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRSTARTS:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRENDS:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRBEFORE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRAFTER:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],YEAR:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],MONTH:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],DAY:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],HOURS:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],MINUTES:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],SECONDS:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],TIMEZONE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],TZ:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],NOW:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],UUID:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRUUID:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],MD5:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],SHA1:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],SHA256:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],SHA384:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],SHA512:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],COALESCE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],IF:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRLANG:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRDT:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],SAMETERM:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],ISIRI:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],ISURI:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],ISBLANK:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],ISLITERAL:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],ISNUMERIC:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],TRUE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],FALSE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],"<<":["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],COUNT:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],SUM:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],MIN:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],MAX:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],AVG:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],SAMPLE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],GROUP_CONCAT:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],SUBSTR:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],REPLACE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],REGEX:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],EXISTS:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],NOT:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],IRI_REF:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRING_LITERAL1:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRING_LITERAL2:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRING_LITERAL_LONG1:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRING_LITERAL_LONG2:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],INTEGER:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],DECIMAL:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],DOUBLE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],INTEGER_POSITIVE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],DECIMAL_POSITIVE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],DOUBLE_POSITIVE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],INTEGER_NEGATIVE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],DECIMAL_NEGATIVE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],DOUBLE_NEGATIVE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],PNAME_LN:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],PNAME_NS:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"]},namedGraphClause:{NAMED:["NAMED","sourceSelector"]},notExistsFunc:{NOT:["NOT","EXISTS","groupGraphPattern"]},numericExpression:{"!":["additiveExpression"],"+":["additiveExpression"],"-":["additiveExpression"],VAR1:["additiveExpression"],VAR2:["additiveExpression"],"(":["additiveExpression"],STR:["additiveExpression"],LANG:["additiveExpression"],LANGMATCHES:["additiveExpression"],DATATYPE:["additiveExpression"],BOUND:["additiveExpression"],IRI:["additiveExpression"],URI:["additiveExpression"],BNODE:["additiveExpression"],RAND:["additiveExpression"],ABS:["additiveExpression"],CEIL:["additiveExpression"],FLOOR:["additiveExpression"],ROUND:["additiveExpression"],CONCAT:["additiveExpression"],STRLEN:["additiveExpression"],UCASE:["additiveExpression"],LCASE:["additiveExpression"],ENCODE_FOR_URI:["additiveExpression"],CONTAINS:["additiveExpression"],STRSTARTS:["additiveExpression"],STRENDS:["additiveExpression"],STRBEFORE:["additiveExpression"],STRAFTER:["additiveExpression"],YEAR:["additiveExpression"],MONTH:["additiveExpression"],DAY:["additiveExpression"],HOURS:["additiveExpression"],MINUTES:["additiveExpression"],SECONDS:["additiveExpression"],TIMEZONE:["additiveExpression"],TZ:["additiveExpression"],NOW:["additiveExpression"],UUID:["additiveExpression"],STRUUID:["additiveExpression"],MD5:["additiveExpression"],SHA1:["additiveExpression"],SHA256:["additiveExpression"],SHA384:["additiveExpression"],SHA512:["additiveExpression"],COALESCE:["additiveExpression"],IF:["additiveExpression"],STRLANG:["additiveExpression"],STRDT:["additiveExpression"],SAMETERM:["additiveExpression"],ISIRI:["additiveExpression"],ISURI:["additiveExpression"],ISBLANK:["additiveExpression"],ISLITERAL:["additiveExpression"],ISNUMERIC:["additiveExpression"],TRUE:["additiveExpression"],FALSE:["additiveExpression"],"<<":["additiveExpression"],COUNT:["additiveExpression"],SUM:["additiveExpression"],MIN:["additiveExpression"],MAX:["additiveExpression"],AVG:["additiveExpression"],SAMPLE:["additiveExpression"],GROUP_CONCAT:["additiveExpression"],SUBSTR:["additiveExpression"],REPLACE:["additiveExpression"],REGEX:["additiveExpression"],EXISTS:["additiveExpression"],NOT:["additiveExpression"],IRI_REF:["additiveExpression"],STRING_LITERAL1:["additiveExpression"],STRING_LITERAL2:["additiveExpression"],STRING_LITERAL_LONG1:["additiveExpression"],STRING_LITERAL_LONG2:["additiveExpression"],INTEGER:["additiveExpression"],DECIMAL:["additiveExpression"],DOUBLE:["additiveExpression"],INTEGER_POSITIVE:["additiveExpression"],DECIMAL_POSITIVE:["additiveExpression"],DOUBLE_POSITIVE:["additiveExpression"],INTEGER_NEGATIVE:["additiveExpression"],DECIMAL_NEGATIVE:["additiveExpression"],DOUBLE_NEGATIVE:["additiveExpression"],PNAME_LN:["additiveExpression"],PNAME_NS:["additiveExpression"]},numericLiteral:{INTEGER:["numericLiteralUnsigned"],DECIMAL:["numericLiteralUnsigned"],DOUBLE:["numericLiteralUnsigned"],INTEGER_POSITIVE:["numericLiteralPositive"],DECIMAL_POSITIVE:["numericLiteralPositive"],DOUBLE_POSITIVE:["numericLiteralPositive"],INTEGER_NEGATIVE:["numericLiteralNegative"],DECIMAL_NEGATIVE:["numericLiteralNegative"],DOUBLE_NEGATIVE:["numericLiteralNegative"]},numericLiteralNegative:{INTEGER_NEGATIVE:["INTEGER_NEGATIVE"],DECIMAL_NEGATIVE:["DECIMAL_NEGATIVE"],DOUBLE_NEGATIVE:["DOUBLE_NEGATIVE"]},numericLiteralPositive:{INTEGER_POSITIVE:["INTEGER_POSITIVE"],DECIMAL_POSITIVE:["DECIMAL_POSITIVE"],DOUBLE_POSITIVE:["DOUBLE_POSITIVE"]},numericLiteralUnsigned:{INTEGER:["INTEGER"],DECIMAL:["DECIMAL"],DOUBLE:["DOUBLE"]},object:{"(":["graphNode"],"[":["graphNode"],VAR1:["graphNode"],VAR2:["graphNode"],NIL:["graphNode"],IRI_REF:["graphNode"],TRUE:["graphNode"],FALSE:["graphNode"],BLANK_NODE_LABEL:["graphNode"],ANON:["graphNode"],"<<":["graphNode"],PNAME_LN:["graphNode"],PNAME_NS:["graphNode"],STRING_LITERAL1:["graphNode"],STRING_LITERAL2:["graphNode"],STRING_LITERAL_LONG1:["graphNode"],STRING_LITERAL_LONG2:["graphNode"],INTEGER:["graphNode"],DECIMAL:["graphNode"],DOUBLE:["graphNode"],INTEGER_POSITIVE:["graphNode"],DECIMAL_POSITIVE:["graphNode"],DOUBLE_POSITIVE:["graphNode"],INTEGER_NEGATIVE:["graphNode"],DECIMAL_NEGATIVE:["graphNode"],DOUBLE_NEGATIVE:["graphNode"]},objectList:{"(":["object","*[,,object]"],"[":["object","*[,,object]"],VAR1:["object","*[,,object]"],VAR2:["object","*[,,object]"],NIL:["object","*[,,object]"],IRI_REF:["object","*[,,object]"],TRUE:["object","*[,,object]"],FALSE:["object","*[,,object]"],BLANK_NODE_LABEL:["object","*[,,object]"],ANON:["object","*[,,object]"],"<<":["object","*[,,object]"],PNAME_LN:["object","*[,,object]"],PNAME_NS:["object","*[,,object]"],STRING_LITERAL1:["object","*[,,object]"],STRING_LITERAL2:["object","*[,,object]"],STRING_LITERAL_LONG1:["object","*[,,object]"],STRING_LITERAL_LONG2:["object","*[,,object]"],INTEGER:["object","*[,,object]"],DECIMAL:["object","*[,,object]"],DOUBLE:["object","*[,,object]"],INTEGER_POSITIVE:["object","*[,,object]"],DECIMAL_POSITIVE:["object","*[,,object]"],DOUBLE_POSITIVE:["object","*[,,object]"],INTEGER_NEGATIVE:["object","*[,,object]"],DECIMAL_NEGATIVE:["object","*[,,object]"],DOUBLE_NEGATIVE:["object","*[,,object]"]},objectListPath:{"(":["objectPath","*[,,objectPath]"],"[":["objectPath","*[,,objectPath]"],VAR1:["objectPath","*[,,objectPath]"],VAR2:["objectPath","*[,,objectPath]"],NIL:["objectPath","*[,,objectPath]"],IRI_REF:["objectPath","*[,,objectPath]"],TRUE:["objectPath","*[,,objectPath]"],FALSE:["objectPath","*[,,objectPath]"],BLANK_NODE_LABEL:["objectPath","*[,,objectPath]"],ANON:["objectPath","*[,,objectPath]"],"<<":["objectPath","*[,,objectPath]"],PNAME_LN:["objectPath","*[,,objectPath]"],PNAME_NS:["objectPath","*[,,objectPath]"],STRING_LITERAL1:["objectPath","*[,,objectPath]"],STRING_LITERAL2:["objectPath","*[,,objectPath]"],STRING_LITERAL_LONG1:["objectPath","*[,,objectPath]"],STRING_LITERAL_LONG2:["objectPath","*[,,objectPath]"],INTEGER:["objectPath","*[,,objectPath]"],DECIMAL:["objectPath","*[,,objectPath]"],DOUBLE:["objectPath","*[,,objectPath]"],INTEGER_POSITIVE:["objectPath","*[,,objectPath]"],DECIMAL_POSITIVE:["objectPath","*[,,objectPath]"],DOUBLE_POSITIVE:["objectPath","*[,,objectPath]"],INTEGER_NEGATIVE:["objectPath","*[,,objectPath]"],DECIMAL_NEGATIVE:["objectPath","*[,,objectPath]"],DOUBLE_NEGATIVE:["objectPath","*[,,objectPath]"]},objectPath:{"(":["graphNodePath"],"[":["graphNodePath"],VAR1:["graphNodePath"],VAR2:["graphNodePath"],NIL:["graphNodePath"],IRI_REF:["graphNodePath"],TRUE:["graphNodePath"],FALSE:["graphNodePath"],BLANK_NODE_LABEL:["graphNodePath"],ANON:["graphNodePath"],"<<":["graphNodePath"],PNAME_LN:["graphNodePath"],PNAME_NS:["graphNodePath"],STRING_LITERAL1:["graphNodePath"],STRING_LITERAL2:["graphNodePath"],STRING_LITERAL_LONG1:["graphNodePath"],STRING_LITERAL_LONG2:["graphNodePath"],INTEGER:["graphNodePath"],DECIMAL:["graphNodePath"],DOUBLE:["graphNodePath"],INTEGER_POSITIVE:["graphNodePath"],DECIMAL_POSITIVE:["graphNodePath"],DOUBLE_POSITIVE:["graphNodePath"],INTEGER_NEGATIVE:["graphNodePath"],DECIMAL_NEGATIVE:["graphNodePath"],DOUBLE_NEGATIVE:["graphNodePath"]},offsetClause:{OFFSET:["OFFSET","INTEGER"]},optionalGraphPattern:{OPTIONAL:["OPTIONAL","groupGraphPattern"]},"or([*,expression])":{"*":["*"],"!":["expression"],"+":["expression"],"-":["expression"],VAR1:["expression"],VAR2:["expression"],"(":["expression"],STR:["expression"],LANG:["expression"],LANGMATCHES:["expression"],DATATYPE:["expression"],BOUND:["expression"],IRI:["expression"],URI:["expression"],BNODE:["expression"],RAND:["expression"],ABS:["expression"],CEIL:["expression"],FLOOR:["expression"],ROUND:["expression"],CONCAT:["expression"],STRLEN:["expression"],UCASE:["expression"],LCASE:["expression"],ENCODE_FOR_URI:["expression"],CONTAINS:["expression"],STRSTARTS:["expression"],STRENDS:["expression"],STRBEFORE:["expression"],STRAFTER:["expression"],YEAR:["expression"],MONTH:["expression"],DAY:["expression"],HOURS:["expression"],MINUTES:["expression"],SECONDS:["expression"],TIMEZONE:["expression"],TZ:["expression"],NOW:["expression"],UUID:["expression"],STRUUID:["expression"],MD5:["expression"],SHA1:["expression"],SHA256:["expression"],SHA384:["expression"],SHA512:["expression"],COALESCE:["expression"],IF:["expression"],STRLANG:["expression"],STRDT:["expression"],SAMETERM:["expression"],ISIRI:["expression"],ISURI:["expression"],ISBLANK:["expression"],ISLITERAL:["expression"],ISNUMERIC:["expression"],TRUE:["expression"],FALSE:["expression"],"<<":["expression"],COUNT:["expression"],SUM:["expression"],MIN:["expression"],MAX:["expression"],AVG:["expression"],SAMPLE:["expression"],GROUP_CONCAT:["expression"],SUBSTR:["expression"],REPLACE:["expression"],REGEX:["expression"],EXISTS:["expression"],NOT:["expression"],IRI_REF:["expression"],STRING_LITERAL1:["expression"],STRING_LITERAL2:["expression"],STRING_LITERAL_LONG1:["expression"],STRING_LITERAL_LONG2:["expression"],INTEGER:["expression"],DECIMAL:["expression"],DOUBLE:["expression"],INTEGER_POSITIVE:["expression"],DECIMAL_POSITIVE:["expression"],DOUBLE_POSITIVE:["expression"],INTEGER_NEGATIVE:["expression"],DECIMAL_NEGATIVE:["expression"],DOUBLE_NEGATIVE:["expression"],PNAME_LN:["expression"],PNAME_NS:["expression"]},"or([+or([var,[(,expression,AS,var,)]]),*])":{"(":["+or([var,[(,expression,AS,var,)]])"],VAR1:["+or([var,[(,expression,AS,var,)]])"],VAR2:["+or([var,[(,expression,AS,var,)]])"],"*":["*"]},"or([+or([varOrIRIref,embeddedTriple]),*])":{"<<":["+or([varOrIRIref,embeddedTriple])"],VAR1:["+or([varOrIRIref,embeddedTriple])"],VAR2:["+or([varOrIRIref,embeddedTriple])"],IRI_REF:["+or([varOrIRIref,embeddedTriple])"],PNAME_LN:["+or([varOrIRIref,embeddedTriple])"],PNAME_NS:["+or([varOrIRIref,embeddedTriple])"],"*":["*"]},"or([ASC,DESC])":{ASC:["ASC"],DESC:["DESC"]},"or([DISTINCT,REDUCED])":{DISTINCT:["DISTINCT"],REDUCED:["REDUCED"]},"or([LANGTAG,[^^,iriRef]])":{LANGTAG:["LANGTAG"],"^^":["[^^,iriRef]"]},"or([NIL,[(,*var,)]])":{NIL:["NIL"],"(":["[(,*var,)]"]},"or([[(,*dataBlockValue,)],NIL])":{"(":["[(,*dataBlockValue,)]"],NIL:["NIL"]},"or([[(,expression,)],NIL])":{"(":["[(,expression,)]"],NIL:["NIL"]},"or([[*,unaryExpression],[/,unaryExpression]])":{"*":["[*,unaryExpression]"],"/":["[/,unaryExpression]"]},"or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])":{"+":["[+,multiplicativeExpression]"],"-":["[-,multiplicativeExpression]"],INTEGER_POSITIVE:["[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]"],DECIMAL_POSITIVE:["[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]"],DOUBLE_POSITIVE:["[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]"],INTEGER_NEGATIVE:["[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]"],DECIMAL_NEGATIVE:["[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]"],DOUBLE_NEGATIVE:["[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]"]},"or([[,,or([},[integer,}]])],}])":{",":["[,,or([},[integer,}]])]"],"}":["}"]},"or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])":{"=":["[=,numericExpression]"],"!=":["[!=,numericExpression]"],"<":["[<,numericExpression]"],">":["[>,numericExpression]"],"<=":["[<=,numericExpression]"],">=":["[>=,numericExpression]"],IN:["[IN,expressionList]"],NOT:["[NOT,IN,expressionList]"]},"or([[constructTemplate,*datasetClause,whereClause,solutionModifier],[*datasetClause,WHERE,{,?triplesTemplate,},solutionModifier]])":{"{":["[constructTemplate,*datasetClause,whereClause,solutionModifier]"],WHERE:["[*datasetClause,WHERE,{,?triplesTemplate,},solutionModifier]"],FROM:["[*datasetClause,WHERE,{,?triplesTemplate,},solutionModifier]"]},"or([[deleteClause,?insertClause],insertClause])":{DELETE:["[deleteClause,?insertClause]"],INSERT:["insertClause"]},"or([[integer,or([[,,or([},[integer,}]])],}])],[,,integer,}]])":{INTEGER:["[integer,or([[,,or([},[integer,}]])],}])]"],",":["[,,integer,}]"]},"or([baseDecl,prefixDecl])":{BASE:["baseDecl"],PREFIX:["prefixDecl"]},"or([defaultGraphClause,namedGraphClause])":{IRI_REF:["defaultGraphClause"],PNAME_LN:["defaultGraphClause"],PNAME_NS:["defaultGraphClause"],NAMED:["namedGraphClause"]},"or([inlineDataOneVar,inlineDataFull])":{VAR1:["inlineDataOneVar"],VAR2:["inlineDataOneVar"],NIL:["inlineDataFull"],"(":["inlineDataFull"]},"or([iriRef,[NAMED,iriRef]])":{IRI_REF:["iriRef"],PNAME_LN:["iriRef"],PNAME_NS:["iriRef"],NAMED:["[NAMED,iriRef]"]},"or([iriRef,a])":{IRI_REF:["iriRef"],PNAME_LN:["iriRef"],PNAME_NS:["iriRef"],a:["a"]},"or([numericLiteralPositive,numericLiteralNegative])":{INTEGER_POSITIVE:["numericLiteralPositive"],DECIMAL_POSITIVE:["numericLiteralPositive"],DOUBLE_POSITIVE:["numericLiteralPositive"],INTEGER_NEGATIVE:["numericLiteralNegative"],DECIMAL_NEGATIVE:["numericLiteralNegative"],DOUBLE_NEGATIVE:["numericLiteralNegative"]},"or([queryAll,updateAll])":{CONSTRUCT:["queryAll"],DESCRIBE:["queryAll"],ASK:["queryAll"],SELECT:["queryAll"],INSERT:["updateAll"],DELETE:["updateAll"],LOAD:["updateAll"],CLEAR:["updateAll"],DROP:["updateAll"],ADD:["updateAll"],MOVE:["updateAll"],COPY:["updateAll"],CREATE:["updateAll"],WITH:["updateAll"],$:["updateAll"]},"or([selectQuery,constructQuery,describeQuery,askQuery])":{SELECT:["selectQuery"],CONSTRUCT:["constructQuery"],DESCRIBE:["describeQuery"],ASK:["askQuery"]},"or([subSelect,groupGraphPatternSub])":{SELECT:["subSelect"],"{":["groupGraphPatternSub"],OPTIONAL:["groupGraphPatternSub"],MINUS:["groupGraphPatternSub"],GRAPH:["groupGraphPatternSub"],SERVICE:["groupGraphPatternSub"],FILTER:["groupGraphPatternSub"],BIND:["groupGraphPatternSub"],VALUES:["groupGraphPatternSub"],VAR1:["groupGraphPatternSub"],VAR2:["groupGraphPatternSub"],NIL:["groupGraphPatternSub"],"(":["groupGraphPatternSub"],"[":["groupGraphPatternSub"],IRI_REF:["groupGraphPatternSub"],TRUE:["groupGraphPatternSub"],FALSE:["groupGraphPatternSub"],BLANK_NODE_LABEL:["groupGraphPatternSub"],ANON:["groupGraphPatternSub"],"<<":["groupGraphPatternSub"],PNAME_LN:["groupGraphPatternSub"],PNAME_NS:["groupGraphPatternSub"],STRING_LITERAL1:["groupGraphPatternSub"],STRING_LITERAL2:["groupGraphPatternSub"],STRING_LITERAL_LONG1:["groupGraphPatternSub"],STRING_LITERAL_LONG2:["groupGraphPatternSub"],INTEGER:["groupGraphPatternSub"],DECIMAL:["groupGraphPatternSub"],DOUBLE:["groupGraphPatternSub"],INTEGER_POSITIVE:["groupGraphPatternSub"],DECIMAL_POSITIVE:["groupGraphPatternSub"],DOUBLE_POSITIVE:["groupGraphPatternSub"],INTEGER_NEGATIVE:["groupGraphPatternSub"],DECIMAL_NEGATIVE:["groupGraphPatternSub"],DOUBLE_NEGATIVE:["groupGraphPatternSub"],"}":["groupGraphPatternSub"]},"or([var,[(,expression,AS,var,)]])":{VAR1:["var"],VAR2:["var"],"(":["[(,expression,AS,var,)]"]},"or([varOrIRIref,embeddedTriple])":{VAR1:["varOrIRIref"],VAR2:["varOrIRIref"],IRI_REF:["varOrIRIref"],PNAME_LN:["varOrIRIref"],PNAME_NS:["varOrIRIref"],"<<":["embeddedTriple"]},"or([verbPath,verbSimple])":{"^":["verbPath"],a:["verbPath"],"!":["verbPath"],"(":["verbPath"],IRI_REF:["verbPath"],PNAME_LN:["verbPath"],PNAME_NS:["verbPath"],VAR1:["verbSimple"],VAR2:["verbSimple"]},"or([},[integer,}]])":{"}":["}"],INTEGER:["[integer,}]"]},orderClause:{ORDER:["ORDER","BY","+orderCondition"]},orderCondition:{ASC:["or([ASC,DESC])","brackettedExpression"],DESC:["or([ASC,DESC])","brackettedExpression"],"(":["constraint"],STR:["constraint"],LANG:["constraint"],LANGMATCHES:["constraint"],DATATYPE:["constraint"],BOUND:["constraint"],IRI:["constraint"],URI:["constraint"],BNODE:["constraint"],RAND:["constraint"],ABS:["constraint"],CEIL:["constraint"],FLOOR:["constraint"],ROUND:["constraint"],CONCAT:["constraint"],STRLEN:["constraint"],UCASE:["constraint"],LCASE:["constraint"],ENCODE_FOR_URI:["constraint"],CONTAINS:["constraint"],STRSTARTS:["constraint"],STRENDS:["constraint"],STRBEFORE:["constraint"],STRAFTER:["constraint"],YEAR:["constraint"],MONTH:["constraint"],DAY:["constraint"],HOURS:["constraint"],MINUTES:["constraint"],SECONDS:["constraint"],TIMEZONE:["constraint"],TZ:["constraint"],NOW:["constraint"],UUID:["constraint"],STRUUID:["constraint"],MD5:["constraint"],SHA1:["constraint"],SHA256:["constraint"],SHA384:["constraint"],SHA512:["constraint"],COALESCE:["constraint"],IF:["constraint"],STRLANG:["constraint"],STRDT:["constraint"],SAMETERM:["constraint"],ISIRI:["constraint"],ISURI:["constraint"],ISBLANK:["constraint"],ISLITERAL:["constraint"],ISNUMERIC:["constraint"],SUBSTR:["constraint"],REPLACE:["constraint"],REGEX:["constraint"],EXISTS:["constraint"],NOT:["constraint"],IRI_REF:["constraint"],PNAME_LN:["constraint"],PNAME_NS:["constraint"],VAR1:["var"],VAR2:["var"]},path:{"^":["pathAlternative"],a:["pathAlternative"],"!":["pathAlternative"],"(":["pathAlternative"],IRI_REF:["pathAlternative"],PNAME_LN:["pathAlternative"],PNAME_NS:["pathAlternative"]},pathAlternative:{"^":["pathSequence","*[|,pathSequence]"],a:["pathSequence","*[|,pathSequence]"],"!":["pathSequence","*[|,pathSequence]"],"(":["pathSequence","*[|,pathSequence]"],IRI_REF:["pathSequence","*[|,pathSequence]"],PNAME_LN:["pathSequence","*[|,pathSequence]"],PNAME_NS:["pathSequence","*[|,pathSequence]"]},pathElt:{a:["pathPrimary","?pathMod"],"!":["pathPrimary","?pathMod"],"(":["pathPrimary","?pathMod"],IRI_REF:["pathPrimary","?pathMod"],PNAME_LN:["pathPrimary","?pathMod"],PNAME_NS:["pathPrimary","?pathMod"]},pathEltOrInverse:{a:["pathElt"],"!":["pathElt"],"(":["pathElt"],IRI_REF:["pathElt"],PNAME_LN:["pathElt"],PNAME_NS:["pathElt"],"^":["^","pathElt"]},pathMod:{"*":["*"],"?":["?"],"+":["+"],"{":["{","or([[integer,or([[,,or([},[integer,}]])],}])],[,,integer,}]])"]},pathNegatedPropertySet:{a:["pathOneInPropertySet"],"^":["pathOneInPropertySet"],IRI_REF:["pathOneInPropertySet"],PNAME_LN:["pathOneInPropertySet"],PNAME_NS:["pathOneInPropertySet"],"(":["(","?[pathOneInPropertySet,*[|,pathOneInPropertySet]]",")"]},pathOneInPropertySet:{IRI_REF:["iriRef"],PNAME_LN:["iriRef"],PNAME_NS:["iriRef"],a:["a"],"^":["^","or([iriRef,a])"]},pathPrimary:{IRI_REF:["storeProperty","iriRef"],PNAME_LN:["storeProperty","iriRef"],PNAME_NS:["storeProperty","iriRef"],a:["storeProperty","a"],"!":["!","pathNegatedPropertySet"],"(":["(","path",")"]},pathSequence:{"^":["pathEltOrInverse","*[/,pathEltOrInverse]"],a:["pathEltOrInverse","*[/,pathEltOrInverse]"],"!":["pathEltOrInverse","*[/,pathEltOrInverse]"],"(":["pathEltOrInverse","*[/,pathEltOrInverse]"],IRI_REF:["pathEltOrInverse","*[/,pathEltOrInverse]"],PNAME_LN:["pathEltOrInverse","*[/,pathEltOrInverse]"],PNAME_NS:["pathEltOrInverse","*[/,pathEltOrInverse]"]},prefixDecl:{PREFIX:["PREFIX","PNAME_NS","IRI_REF"]},prefixedName:{PNAME_LN:["PNAME_LN"],PNAME_NS:["PNAME_NS"]},primaryExpression:{"(":["brackettedExpression"],STR:["builtInCall"],LANG:["builtInCall"],LANGMATCHES:["builtInCall"],DATATYPE:["builtInCall"],BOUND:["builtInCall"],IRI:["builtInCall"],URI:["builtInCall"],BNODE:["builtInCall"],RAND:["builtInCall"],ABS:["builtInCall"],CEIL:["builtInCall"],FLOOR:["builtInCall"],ROUND:["builtInCall"],CONCAT:["builtInCall"],STRLEN:["builtInCall"],UCASE:["builtInCall"],LCASE:["builtInCall"],ENCODE_FOR_URI:["builtInCall"],CONTAINS:["builtInCall"],STRSTARTS:["builtInCall"],STRENDS:["builtInCall"],STRBEFORE:["builtInCall"],STRAFTER:["builtInCall"],YEAR:["builtInCall"],MONTH:["builtInCall"],DAY:["builtInCall"],HOURS:["builtInCall"],MINUTES:["builtInCall"],SECONDS:["builtInCall"],TIMEZONE:["builtInCall"],TZ:["builtInCall"],NOW:["builtInCall"],UUID:["builtInCall"],STRUUID:["builtInCall"],MD5:["builtInCall"],SHA1:["builtInCall"],SHA256:["builtInCall"],SHA384:["builtInCall"],SHA512:["builtInCall"],COALESCE:["builtInCall"],IF:["builtInCall"],STRLANG:["builtInCall"],STRDT:["builtInCall"],SAMETERM:["builtInCall"],ISIRI:["builtInCall"],ISURI:["builtInCall"],ISBLANK:["builtInCall"],ISLITERAL:["builtInCall"],ISNUMERIC:["builtInCall"],SUBSTR:["builtInCall"],REPLACE:["builtInCall"],REGEX:["builtInCall"],EXISTS:["builtInCall"],NOT:["builtInCall"],IRI_REF:["iriRefOrFunction"],PNAME_LN:["iriRefOrFunction"],PNAME_NS:["iriRefOrFunction"],STRING_LITERAL1:["rdfLiteral"],STRING_LITERAL2:["rdfLiteral"],STRING_LITERAL_LONG1:["rdfLiteral"],STRING_LITERAL_LONG2:["rdfLiteral"],INTEGER:["numericLiteral"],DECIMAL:["numericLiteral"],DOUBLE:["numericLiteral"],INTEGER_POSITIVE:["numericLiteral"],DECIMAL_POSITIVE:["numericLiteral"],DOUBLE_POSITIVE:["numericLiteral"],INTEGER_NEGATIVE:["numericLiteral"],DECIMAL_NEGATIVE:["numericLiteral"],DOUBLE_NEGATIVE:["numericLiteral"],TRUE:["booleanLiteral"],FALSE:["booleanLiteral"],"<<":["embeddedTriple"],VAR1:["var"],VAR2:["var"],COUNT:["aggregate"],SUM:["aggregate"],MIN:["aggregate"],MAX:["aggregate"],AVG:["aggregate"],SAMPLE:["aggregate"],GROUP_CONCAT:["aggregate"]},prologue:{BASE:["*or([baseDecl,prefixDecl])"],PREFIX:["*or([baseDecl,prefixDecl])"],$:["*or([baseDecl,prefixDecl])"],CONSTRUCT:["*or([baseDecl,prefixDecl])"],DESCRIBE:["*or([baseDecl,prefixDecl])"],ASK:["*or([baseDecl,prefixDecl])"],INSERT:["*or([baseDecl,prefixDecl])"],DELETE:["*or([baseDecl,prefixDecl])"],SELECT:["*or([baseDecl,prefixDecl])"],LOAD:["*or([baseDecl,prefixDecl])"],CLEAR:["*or([baseDecl,prefixDecl])"],DROP:["*or([baseDecl,prefixDecl])"],ADD:["*or([baseDecl,prefixDecl])"],MOVE:["*or([baseDecl,prefixDecl])"],COPY:["*or([baseDecl,prefixDecl])"],CREATE:["*or([baseDecl,prefixDecl])"],WITH:["*or([baseDecl,prefixDecl])"]},propertyList:{VAR1:["propertyListNotEmpty"],VAR2:["propertyListNotEmpty"],"^":["propertyListNotEmpty"],a:["propertyListNotEmpty"],"!":["propertyListNotEmpty"],"(":["propertyListNotEmpty"],IRI_REF:["propertyListNotEmpty"],PNAME_LN:["propertyListNotEmpty"],PNAME_NS:["propertyListNotEmpty"],".":[],"}":[],GRAPH:[]},propertyListNotEmpty:{VAR1:["or([verbPath,verbSimple])","objectList","*[;,?[or([verbPath,verbSimple]),objectList]]"],VAR2:["or([verbPath,verbSimple])","objectList","*[;,?[or([verbPath,verbSimple]),objectList]]"],"^":["or([verbPath,verbSimple])","objectList","*[;,?[or([verbPath,verbSimple]),objectList]]"],a:["or([verbPath,verbSimple])","objectList","*[;,?[or([verbPath,verbSimple]),objectList]]"],"!":["or([verbPath,verbSimple])","objectList","*[;,?[or([verbPath,verbSimple]),objectList]]"],"(":["or([verbPath,verbSimple])","objectList","*[;,?[or([verbPath,verbSimple]),objectList]]"],IRI_REF:["or([verbPath,verbSimple])","objectList","*[;,?[or([verbPath,verbSimple]),objectList]]"],PNAME_LN:["or([verbPath,verbSimple])","objectList","*[;,?[or([verbPath,verbSimple]),objectList]]"],PNAME_NS:["or([verbPath,verbSimple])","objectList","*[;,?[or([verbPath,verbSimple]),objectList]]"]},propertyListPath:{VAR1:["propertyListNotEmpty"],VAR2:["propertyListNotEmpty"],"^":["propertyListNotEmpty"],a:["propertyListNotEmpty"],"!":["propertyListNotEmpty"],"(":["propertyListNotEmpty"],IRI_REF:["propertyListNotEmpty"],PNAME_LN:["propertyListNotEmpty"],PNAME_NS:["propertyListNotEmpty"],".":[],"{":[],OPTIONAL:[],MINUS:[],GRAPH:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[],"}":[]},propertyListPathNotEmpty:{VAR1:["or([verbPath,verbSimple])","objectListPath","*[;,?[or([verbPath,verbSimple]),objectList]]"],VAR2:["or([verbPath,verbSimple])","objectListPath","*[;,?[or([verbPath,verbSimple]),objectList]]"],"^":["or([verbPath,verbSimple])","objectListPath","*[;,?[or([verbPath,verbSimple]),objectList]]"],a:["or([verbPath,verbSimple])","objectListPath","*[;,?[or([verbPath,verbSimple]),objectList]]"],"!":["or([verbPath,verbSimple])","objectListPath","*[;,?[or([verbPath,verbSimple]),objectList]]"],"(":["or([verbPath,verbSimple])","objectListPath","*[;,?[or([verbPath,verbSimple]),objectList]]"],IRI_REF:["or([verbPath,verbSimple])","objectListPath","*[;,?[or([verbPath,verbSimple]),objectList]]"],PNAME_LN:["or([verbPath,verbSimple])","objectListPath","*[;,?[or([verbPath,verbSimple]),objectList]]"],PNAME_NS:["or([verbPath,verbSimple])","objectListPath","*[;,?[or([verbPath,verbSimple]),objectList]]"]},quadData:{"{":["{","disallowVars","quads","allowVars","}"]},quadDataNoBnodes:{"{":["{","disallowBnodes","disallowVars","quads","allowVars","allowBnodes","}"]},quadPattern:{"{":["{","quads","}"]},quadPatternNoBnodes:{"{":["{","disallowBnodes","quads","allowBnodes","}"]},quads:{GRAPH:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],VAR1:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],VAR2:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],NIL:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],"(":["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],"[":["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],IRI_REF:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],TRUE:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],FALSE:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],BLANK_NODE_LABEL:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],ANON:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],"<<":["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],PNAME_LN:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],PNAME_NS:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],STRING_LITERAL1:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],STRING_LITERAL2:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],STRING_LITERAL_LONG1:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],STRING_LITERAL_LONG2:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],INTEGER:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],DECIMAL:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],DOUBLE:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],INTEGER_POSITIVE:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],DECIMAL_POSITIVE:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],DOUBLE_POSITIVE:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],INTEGER_NEGATIVE:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],DECIMAL_NEGATIVE:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],DOUBLE_NEGATIVE:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],"}":["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"]},quadsNotTriples:{GRAPH:["GRAPH","varOrIRIref","{","?triplesTemplate","}"]},queryAll:{CONSTRUCT:["or([selectQuery,constructQuery,describeQuery,askQuery])","valuesClause"],DESCRIBE:["or([selectQuery,constructQuery,describeQuery,askQuery])","valuesClause"],ASK:["or([selectQuery,constructQuery,describeQuery,askQuery])","valuesClause"],SELECT:["or([selectQuery,constructQuery,describeQuery,askQuery])","valuesClause"]},rdfLiteral:{STRING_LITERAL1:["string","?or([LANGTAG,[^^,iriRef]])"],STRING_LITERAL2:["string","?or([LANGTAG,[^^,iriRef]])"],STRING_LITERAL_LONG1:["string","?or([LANGTAG,[^^,iriRef]])"],STRING_LITERAL_LONG2:["string","?or([LANGTAG,[^^,iriRef]])"]},regexExpression:{REGEX:["REGEX","(","expression",",","expression","?[,,expression]",")"]},relationalExpression:{"!":["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],"+":["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],"-":["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],VAR1:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],VAR2:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],"(":["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STR:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],LANG:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],LANGMATCHES:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],DATATYPE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],BOUND:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],IRI:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],URI:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],BNODE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],RAND:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],ABS:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],CEIL:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],FLOOR:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],ROUND:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],CONCAT:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRLEN:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],UCASE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],LCASE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],ENCODE_FOR_URI:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],CONTAINS:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRSTARTS:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRENDS:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRBEFORE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRAFTER:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],YEAR:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],MONTH:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],DAY:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],HOURS:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],MINUTES:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],SECONDS:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],TIMEZONE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],TZ:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],NOW:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],UUID:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRUUID:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],MD5:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],SHA1:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],SHA256:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],SHA384:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],SHA512:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],COALESCE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],IF:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRLANG:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRDT:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],SAMETERM:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],ISIRI:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],ISURI:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],ISBLANK:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],ISLITERAL:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],ISNUMERIC:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],TRUE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],FALSE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],"<<":["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],COUNT:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],SUM:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],MIN:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],MAX:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],AVG:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],SAMPLE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],GROUP_CONCAT:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],SUBSTR:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],REPLACE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],REGEX:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],EXISTS:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],NOT:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],IRI_REF:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRING_LITERAL1:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRING_LITERAL2:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRING_LITERAL_LONG1:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRING_LITERAL_LONG2:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],INTEGER:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],DECIMAL:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],DOUBLE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],INTEGER_POSITIVE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],DECIMAL_POSITIVE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],DOUBLE_POSITIVE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],INTEGER_NEGATIVE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],DECIMAL_NEGATIVE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],DOUBLE_NEGATIVE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],PNAME_LN:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],PNAME_NS:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"]},selectClause:{SELECT:["SELECT","?or([DISTINCT,REDUCED])","or([+or([var,[(,expression,AS,var,)]]),*])"]},selectQuery:{SELECT:["selectClause","*datasetClause","whereClause","solutionModifier"]},serviceGraphPattern:{SERVICE:["SERVICE","?SILENT","varOrIRIref","groupGraphPattern"]},solutionModifier:{LIMIT:["?groupClause","?havingClause","?orderClause","?limitOffsetClauses"],OFFSET:["?groupClause","?havingClause","?orderClause","?limitOffsetClauses"],ORDER:["?groupClause","?havingClause","?orderClause","?limitOffsetClauses"],HAVING:["?groupClause","?havingClause","?orderClause","?limitOffsetClauses"],GROUP:["?groupClause","?havingClause","?orderClause","?limitOffsetClauses"],VALUES:["?groupClause","?havingClause","?orderClause","?limitOffsetClauses"],$:["?groupClause","?havingClause","?orderClause","?limitOffsetClauses"],"}":["?groupClause","?havingClause","?orderClause","?limitOffsetClauses"]},sourceSelector:{IRI_REF:["iriRef"],PNAME_LN:["iriRef"],PNAME_NS:["iriRef"]},sparql11:{$:["prologue","or([queryAll,updateAll])","$"],CONSTRUCT:["prologue","or([queryAll,updateAll])","$"],DESCRIBE:["prologue","or([queryAll,updateAll])","$"],ASK:["prologue","or([queryAll,updateAll])","$"],INSERT:["prologue","or([queryAll,updateAll])","$"],DELETE:["prologue","or([queryAll,updateAll])","$"],SELECT:["prologue","or([queryAll,updateAll])","$"],LOAD:["prologue","or([queryAll,updateAll])","$"],CLEAR:["prologue","or([queryAll,updateAll])","$"],DROP:["prologue","or([queryAll,updateAll])","$"],ADD:["prologue","or([queryAll,updateAll])","$"],MOVE:["prologue","or([queryAll,updateAll])","$"],COPY:["prologue","or([queryAll,updateAll])","$"],CREATE:["prologue","or([queryAll,updateAll])","$"],WITH:["prologue","or([queryAll,updateAll])","$"],BASE:["prologue","or([queryAll,updateAll])","$"],PREFIX:["prologue","or([queryAll,updateAll])","$"]},storeProperty:{VAR1:[],VAR2:[],IRI_REF:[],PNAME_LN:[],PNAME_NS:[],a:[]},strReplaceExpression:{REPLACE:["REPLACE","(","expression",",","expression",",","expression","?[,,expression]",")"]},string:{STRING_LITERAL1:["STRING_LITERAL1"],STRING_LITERAL2:["STRING_LITERAL2"],STRING_LITERAL_LONG1:["STRING_LITERAL_LONG1"],STRING_LITERAL_LONG2:["STRING_LITERAL_LONG2"]},subSelect:{SELECT:["selectClause","whereClause","solutionModifier","valuesClause"]},substringExpression:{SUBSTR:["SUBSTR","(","expression",",","expression","?[,,expression]",")"]},triplesBlock:{VAR1:["triplesSameSubjectPath","?[.,?triplesBlock]"],VAR2:["triplesSameSubjectPath","?[.,?triplesBlock]"],NIL:["triplesSameSubjectPath","?[.,?triplesBlock]"],"(":["triplesSameSubjectPath","?[.,?triplesBlock]"],"[":["triplesSameSubjectPath","?[.,?triplesBlock]"],IRI_REF:["triplesSameSubjectPath","?[.,?triplesBlock]"],TRUE:["triplesSameSubjectPath","?[.,?triplesBlock]"],FALSE:["triplesSameSubjectPath","?[.,?triplesBlock]"],BLANK_NODE_LABEL:["triplesSameSubjectPath","?[.,?triplesBlock]"],ANON:["triplesSameSubjectPath","?[.,?triplesBlock]"],"<<":["triplesSameSubjectPath","?[.,?triplesBlock]"],PNAME_LN:["triplesSameSubjectPath","?[.,?triplesBlock]"],PNAME_NS:["triplesSameSubjectPath","?[.,?triplesBlock]"],STRING_LITERAL1:["triplesSameSubjectPath","?[.,?triplesBlock]"],STRING_LITERAL2:["triplesSameSubjectPath","?[.,?triplesBlock]"],STRING_LITERAL_LONG1:["triplesSameSubjectPath","?[.,?triplesBlock]"],STRING_LITERAL_LONG2:["triplesSameSubjectPath","?[.,?triplesBlock]"],INTEGER:["triplesSameSubjectPath","?[.,?triplesBlock]"],DECIMAL:["triplesSameSubjectPath","?[.,?triplesBlock]"],DOUBLE:["triplesSameSubjectPath","?[.,?triplesBlock]"],INTEGER_POSITIVE:["triplesSameSubjectPath","?[.,?triplesBlock]"],DECIMAL_POSITIVE:["triplesSameSubjectPath","?[.,?triplesBlock]"],DOUBLE_POSITIVE:["triplesSameSubjectPath","?[.,?triplesBlock]"],INTEGER_NEGATIVE:["triplesSameSubjectPath","?[.,?triplesBlock]"],DECIMAL_NEGATIVE:["triplesSameSubjectPath","?[.,?triplesBlock]"],DOUBLE_NEGATIVE:["triplesSameSubjectPath","?[.,?triplesBlock]"]},triplesNode:{"(":["collection"],"[":["blankNodePropertyList"]},triplesNodePath:{"(":["collectionPath"],"[":["blankNodePropertyListPath"]},triplesSameSubject:{VAR1:["varOrTerm","propertyListNotEmpty"],VAR2:["varOrTerm","propertyListNotEmpty"],NIL:["varOrTerm","propertyListNotEmpty"],IRI_REF:["varOrTerm","propertyListNotEmpty"],TRUE:["varOrTerm","propertyListNotEmpty"],FALSE:["varOrTerm","propertyListNotEmpty"],BLANK_NODE_LABEL:["varOrTerm","propertyListNotEmpty"],ANON:["varOrTerm","propertyListNotEmpty"],"<<":["varOrTerm","propertyListNotEmpty"],PNAME_LN:["varOrTerm","propertyListNotEmpty"],PNAME_NS:["varOrTerm","propertyListNotEmpty"],STRING_LITERAL1:["varOrTerm","propertyListNotEmpty"],STRING_LITERAL2:["varOrTerm","propertyListNotEmpty"],STRING_LITERAL_LONG1:["varOrTerm","propertyListNotEmpty"],STRING_LITERAL_LONG2:["varOrTerm","propertyListNotEmpty"],INTEGER:["varOrTerm","propertyListNotEmpty"],DECIMAL:["varOrTerm","propertyListNotEmpty"],DOUBLE:["varOrTerm","propertyListNotEmpty"],INTEGER_POSITIVE:["varOrTerm","propertyListNotEmpty"],DECIMAL_POSITIVE:["varOrTerm","propertyListNotEmpty"],DOUBLE_POSITIVE:["varOrTerm","propertyListNotEmpty"],INTEGER_NEGATIVE:["varOrTerm","propertyListNotEmpty"],DECIMAL_NEGATIVE:["varOrTerm","propertyListNotEmpty"],DOUBLE_NEGATIVE:["varOrTerm","propertyListNotEmpty"],"(":["triplesNode","propertyList"],"[":["triplesNode","propertyList"]},triplesSameSubjectPath:{VAR1:["varOrTerm","propertyListPathNotEmpty"],VAR2:["varOrTerm","propertyListPathNotEmpty"],NIL:["varOrTerm","propertyListPathNotEmpty"],IRI_REF:["varOrTerm","propertyListPathNotEmpty"],TRUE:["varOrTerm","propertyListPathNotEmpty"],FALSE:["varOrTerm","propertyListPathNotEmpty"],BLANK_NODE_LABEL:["varOrTerm","propertyListPathNotEmpty"],ANON:["varOrTerm","propertyListPathNotEmpty"],"<<":["varOrTerm","propertyListPathNotEmpty"],PNAME_LN:["varOrTerm","propertyListPathNotEmpty"],PNAME_NS:["varOrTerm","propertyListPathNotEmpty"],STRING_LITERAL1:["varOrTerm","propertyListPathNotEmpty"],STRING_LITERAL2:["varOrTerm","propertyListPathNotEmpty"],STRING_LITERAL_LONG1:["varOrTerm","propertyListPathNotEmpty"],STRING_LITERAL_LONG2:["varOrTerm","propertyListPathNotEmpty"],INTEGER:["varOrTerm","propertyListPathNotEmpty"],DECIMAL:["varOrTerm","propertyListPathNotEmpty"],DOUBLE:["varOrTerm","propertyListPathNotEmpty"],INTEGER_POSITIVE:["varOrTerm","propertyListPathNotEmpty"],DECIMAL_POSITIVE:["varOrTerm","propertyListPathNotEmpty"],DOUBLE_POSITIVE:["varOrTerm","propertyListPathNotEmpty"],INTEGER_NEGATIVE:["varOrTerm","propertyListPathNotEmpty"],DECIMAL_NEGATIVE:["varOrTerm","propertyListPathNotEmpty"],DOUBLE_NEGATIVE:["varOrTerm","propertyListPathNotEmpty"],"(":["triplesNodePath","propertyListPath"],"[":["triplesNodePath","propertyListPath"]},triplesTemplate:{VAR1:["triplesSameSubject","?[.,?triplesTemplate]"],VAR2:["triplesSameSubject","?[.,?triplesTemplate]"],NIL:["triplesSameSubject","?[.,?triplesTemplate]"],"(":["triplesSameSubject","?[.,?triplesTemplate]"],"[":["triplesSameSubject","?[.,?triplesTemplate]"],IRI_REF:["triplesSameSubject","?[.,?triplesTemplate]"],TRUE:["triplesSameSubject","?[.,?triplesTemplate]"],FALSE:["triplesSameSubject","?[.,?triplesTemplate]"],BLANK_NODE_LABEL:["triplesSameSubject","?[.,?triplesTemplate]"],ANON:["triplesSameSubject","?[.,?triplesTemplate]"],"<<":["triplesSameSubject","?[.,?triplesTemplate]"],PNAME_LN:["triplesSameSubject","?[.,?triplesTemplate]"],PNAME_NS:["triplesSameSubject","?[.,?triplesTemplate]"],STRING_LITERAL1:["triplesSameSubject","?[.,?triplesTemplate]"],STRING_LITERAL2:["triplesSameSubject","?[.,?triplesTemplate]"],STRING_LITERAL_LONG1:["triplesSameSubject","?[.,?triplesTemplate]"],STRING_LITERAL_LONG2:["triplesSameSubject","?[.,?triplesTemplate]"],INTEGER:["triplesSameSubject","?[.,?triplesTemplate]"],DECIMAL:["triplesSameSubject","?[.,?triplesTemplate]"],DOUBLE:["triplesSameSubject","?[.,?triplesTemplate]"],INTEGER_POSITIVE:["triplesSameSubject","?[.,?triplesTemplate]"],DECIMAL_POSITIVE:["triplesSameSubject","?[.,?triplesTemplate]"],DOUBLE_POSITIVE:["triplesSameSubject","?[.,?triplesTemplate]"],INTEGER_NEGATIVE:["triplesSameSubject","?[.,?triplesTemplate]"],DECIMAL_NEGATIVE:["triplesSameSubject","?[.,?triplesTemplate]"],DOUBLE_NEGATIVE:["triplesSameSubject","?[.,?triplesTemplate]"]},unaryExpression:{"!":["!","primaryExpression"],"+":["+","primaryExpression"],"-":["-","primaryExpression"],VAR1:["primaryExpression"],VAR2:["primaryExpression"],"(":["primaryExpression"],STR:["primaryExpression"],LANG:["primaryExpression"],LANGMATCHES:["primaryExpression"],DATATYPE:["primaryExpression"],BOUND:["primaryExpression"],IRI:["primaryExpression"],URI:["primaryExpression"],BNODE:["primaryExpression"],RAND:["primaryExpression"],ABS:["primaryExpression"],CEIL:["primaryExpression"],FLOOR:["primaryExpression"],ROUND:["primaryExpression"],CONCAT:["primaryExpression"],STRLEN:["primaryExpression"],UCASE:["primaryExpression"],LCASE:["primaryExpression"],ENCODE_FOR_URI:["primaryExpression"],CONTAINS:["primaryExpression"],STRSTARTS:["primaryExpression"],STRENDS:["primaryExpression"],STRBEFORE:["primaryExpression"],STRAFTER:["primaryExpression"],YEAR:["primaryExpression"],MONTH:["primaryExpression"],DAY:["primaryExpression"],HOURS:["primaryExpression"],MINUTES:["primaryExpression"],SECONDS:["primaryExpression"],TIMEZONE:["primaryExpression"],TZ:["primaryExpression"],NOW:["primaryExpression"],UUID:["primaryExpression"],STRUUID:["primaryExpression"],MD5:["primaryExpression"],SHA1:["primaryExpression"],SHA256:["primaryExpression"],SHA384:["primaryExpression"],SHA512:["primaryExpression"],COALESCE:["primaryExpression"],IF:["primaryExpression"],STRLANG:["primaryExpression"],STRDT:["primaryExpression"],SAMETERM:["primaryExpression"],ISIRI:["primaryExpression"],ISURI:["primaryExpression"],ISBLANK:["primaryExpression"],ISLITERAL:["primaryExpression"],ISNUMERIC:["primaryExpression"],TRUE:["primaryExpression"],FALSE:["primaryExpression"],"<<":["primaryExpression"],COUNT:["primaryExpression"],SUM:["primaryExpression"],MIN:["primaryExpression"],MAX:["primaryExpression"],AVG:["primaryExpression"],SAMPLE:["primaryExpression"],GROUP_CONCAT:["primaryExpression"],SUBSTR:["primaryExpression"],REPLACE:["primaryExpression"],REGEX:["primaryExpression"],EXISTS:["primaryExpression"],NOT:["primaryExpression"],IRI_REF:["primaryExpression"],STRING_LITERAL1:["primaryExpression"],STRING_LITERAL2:["primaryExpression"],STRING_LITERAL_LONG1:["primaryExpression"],STRING_LITERAL_LONG2:["primaryExpression"],INTEGER:["primaryExpression"],DECIMAL:["primaryExpression"],DOUBLE:["primaryExpression"],INTEGER_POSITIVE:["primaryExpression"],DECIMAL_POSITIVE:["primaryExpression"],DOUBLE_POSITIVE:["primaryExpression"],INTEGER_NEGATIVE:["primaryExpression"],DECIMAL_NEGATIVE:["primaryExpression"],DOUBLE_NEGATIVE:["primaryExpression"],PNAME_LN:["primaryExpression"],PNAME_NS:["primaryExpression"]},update:{INSERT:["prologue","?[update1,?[;,update]]"],DELETE:["prologue","?[update1,?[;,update]]"],LOAD:["prologue","?[update1,?[;,update]]"],CLEAR:["prologue","?[update1,?[;,update]]"],DROP:["prologue","?[update1,?[;,update]]"],ADD:["prologue","?[update1,?[;,update]]"],MOVE:["prologue","?[update1,?[;,update]]"],COPY:["prologue","?[update1,?[;,update]]"],CREATE:["prologue","?[update1,?[;,update]]"],WITH:["prologue","?[update1,?[;,update]]"],BASE:["prologue","?[update1,?[;,update]]"],PREFIX:["prologue","?[update1,?[;,update]]"],$:["prologue","?[update1,?[;,update]]"]},update1:{LOAD:["load"],CLEAR:["clear"],DROP:["drop"],ADD:["add"],MOVE:["move"],COPY:["copy"],CREATE:["create"],INSERT:["INSERT","insert1"],DELETE:["DELETE","delete1"],WITH:["modify"]},updateAll:{INSERT:["?[update1,?[;,update]]"],DELETE:["?[update1,?[;,update]]"],LOAD:["?[update1,?[;,update]]"],CLEAR:["?[update1,?[;,update]]"],DROP:["?[update1,?[;,update]]"],ADD:["?[update1,?[;,update]]"],MOVE:["?[update1,?[;,update]]"],COPY:["?[update1,?[;,update]]"],CREATE:["?[update1,?[;,update]]"],WITH:["?[update1,?[;,update]]"],$:["?[update1,?[;,update]]"]},usingClause:{USING:["USING","or([iriRef,[NAMED,iriRef]])"]},valueLogical:{"!":["relationalExpression"],"+":["relationalExpression"],"-":["relationalExpression"],VAR1:["relationalExpression"],VAR2:["relationalExpression"],"(":["relationalExpression"],STR:["relationalExpression"],LANG:["relationalExpression"],LANGMATCHES:["relationalExpression"],DATATYPE:["relationalExpression"],BOUND:["relationalExpression"],IRI:["relationalExpression"],URI:["relationalExpression"],BNODE:["relationalExpression"],RAND:["relationalExpression"],ABS:["relationalExpression"],CEIL:["relationalExpression"],FLOOR:["relationalExpression"],ROUND:["relationalExpression"],CONCAT:["relationalExpression"],STRLEN:["relationalExpression"],UCASE:["relationalExpression"],LCASE:["relationalExpression"],ENCODE_FOR_URI:["relationalExpression"],CONTAINS:["relationalExpression"],STRSTARTS:["relationalExpression"],STRENDS:["relationalExpression"],STRBEFORE:["relationalExpression"],STRAFTER:["relationalExpression"],YEAR:["relationalExpression"],MONTH:["relationalExpression"],DAY:["relationalExpression"],HOURS:["relationalExpression"],MINUTES:["relationalExpression"],SECONDS:["relationalExpression"],TIMEZONE:["relationalExpression"],TZ:["relationalExpression"],NOW:["relationalExpression"],UUID:["relationalExpression"],STRUUID:["relationalExpression"],MD5:["relationalExpression"],SHA1:["relationalExpression"],SHA256:["relationalExpression"],SHA384:["relationalExpression"],SHA512:["relationalExpression"],COALESCE:["relationalExpression"],IF:["relationalExpression"],STRLANG:["relationalExpression"],STRDT:["relationalExpression"],SAMETERM:["relationalExpression"],ISIRI:["relationalExpression"],ISURI:["relationalExpression"],ISBLANK:["relationalExpression"],ISLITERAL:["relationalExpression"],ISNUMERIC:["relationalExpression"],TRUE:["relationalExpression"],FALSE:["relationalExpression"],"<<":["relationalExpression"],COUNT:["relationalExpression"],SUM:["relationalExpression"],MIN:["relationalExpression"],MAX:["relationalExpression"],AVG:["relationalExpression"],SAMPLE:["relationalExpression"],GROUP_CONCAT:["relationalExpression"],SUBSTR:["relationalExpression"],REPLACE:["relationalExpression"],REGEX:["relationalExpression"],EXISTS:["relationalExpression"],NOT:["relationalExpression"],IRI_REF:["relationalExpression"],STRING_LITERAL1:["relationalExpression"],STRING_LITERAL2:["relationalExpression"],STRING_LITERAL_LONG1:["relationalExpression"],STRING_LITERAL_LONG2:["relationalExpression"],INTEGER:["relationalExpression"],DECIMAL:["relationalExpression"],DOUBLE:["relationalExpression"],INTEGER_POSITIVE:["relationalExpression"],DECIMAL_POSITIVE:["relationalExpression"],DOUBLE_POSITIVE:["relationalExpression"],INTEGER_NEGATIVE:["relationalExpression"],DECIMAL_NEGATIVE:["relationalExpression"],DOUBLE_NEGATIVE:["relationalExpression"],PNAME_LN:["relationalExpression"],PNAME_NS:["relationalExpression"]},valuesClause:{VALUES:["VALUES","dataBlock"],$:[],"}":[]},var:{VAR1:["VAR1"],VAR2:["VAR2"]},varOrIRIref:{VAR1:["var"],VAR2:["var"],IRI_REF:["iriRef"],PNAME_LN:["iriRef"],PNAME_NS:["iriRef"]},varOrTerm:{VAR1:["var"],VAR2:["var"],NIL:["graphTerm"],IRI_REF:["graphTerm"],TRUE:["graphTerm"],FALSE:["graphTerm"],BLANK_NODE_LABEL:["graphTerm"],ANON:["graphTerm"],"<<":["graphTerm"],PNAME_LN:["graphTerm"],PNAME_NS:["graphTerm"],STRING_LITERAL1:["graphTerm"],STRING_LITERAL2:["graphTerm"],STRING_LITERAL_LONG1:["graphTerm"],STRING_LITERAL_LONG2:["graphTerm"],INTEGER:["graphTerm"],DECIMAL:["graphTerm"],DOUBLE:["graphTerm"],INTEGER_POSITIVE:["graphTerm"],DECIMAL_POSITIVE:["graphTerm"],DOUBLE_POSITIVE:["graphTerm"],INTEGER_NEGATIVE:["graphTerm"],DECIMAL_NEGATIVE:["graphTerm"],DOUBLE_NEGATIVE:["graphTerm"]},verb:{VAR1:["storeProperty","varOrIRIref"],VAR2:["storeProperty","varOrIRIref"],IRI_REF:["storeProperty","varOrIRIref"],PNAME_LN:["storeProperty","varOrIRIref"],PNAME_NS:["storeProperty","varOrIRIref"],a:["storeProperty","a"]},verbPath:{"^":["path"],a:["path"],"!":["path"],"(":["path"],IRI_REF:["path"],PNAME_LN:["path"],PNAME_NS:["path"]},verbSimple:{VAR1:["var"],VAR2:["var"]},whereClause:{"{":["?WHERE","groupGraphPattern"],WHERE:["?WHERE","groupGraphPattern"]}},keywords:/^(GROUP_CONCAT|DATATYPE|BASE|PREFIX|SELECT|CONSTRUCT|DESCRIBE|ASK|FROM|NAMED|ORDER|BY|LIMIT|ASC|DESC|OFFSET|DISTINCT|REDUCED|WHERE|GRAPH|OPTIONAL|UNION|FILTER|GROUP|HAVING|AS|VALUES|LOAD|CLEAR|DROP|CREATE|MOVE|COPY|SILENT|INSERT|DELETE|DATA|WITH|TO|USING|NAMED|MINUS|BIND|LANGMATCHES|LANG|BOUND|SAMETERM|ISIRI|ISURI|ISBLANK|ISLITERAL|REGEX|TRUE|FALSE|UNDEF|ADD|DEFAULT|ALL|SERVICE|INTO|IN|NOT|IRI|URI|BNODE|RAND|ABS|CEIL|FLOOR|ROUND|CONCAT|STRLEN|UCASE|LCASE|ENCODE_FOR_URI|CONTAINS|STRSTARTS|STRENDS|STRBEFORE|STRAFTER|YEAR|MONTH|DAY|HOURS|MINUTES|SECONDS|TIMEZONE|TZ|NOW|UUID|STRUUID|MD5|SHA1|SHA256|SHA384|SHA512|COALESCE|IF|STRLANG|STRDT|ISNUMERIC|SUBSTR|REPLACE|EXISTS|COUNT|SUM|MIN|MAX|AVG|SAMPLE|SEPARATOR|STR|<<|>>)/i,punct:/^(\*|a|\.|\{|\}|,|\(|\)|;|\[|\]|\|\||&&|=|!=|!|<=|>=|<|>|\+|-|\/|\^\^|\?|\||\^)/,startSymbol:"sparql11",acceptEmpty:!0}},{}],3:[function(e,t,n){"use strict";var r=e("codemirror");r.defineMode("sparql11",(function(t,n){t.indentUnit;var r=e("./_tokenizer-table.js"),i=r.table,o="[0-9A-Fa-f]",a="(([A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD])(((([A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]|_|-|[0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]))|\\.)*(([A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]|_|-|[0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040])))?)?:",s="[eE][\\+-]?[0-9]+",l="(([0-9]+\\.[0-9]*)|(\\.[0-9]+))",u="(([0-9]+\\.[0-9]*"+s+")|(\\.[0-9]+"+s+")|([0-9]+"+s+"))",c="\\\\[tbnrf\\\\\"']",d=o+"{4}",p="(\\\\u"+d+"|\\\\U00(10|0"+o+")"+d+")",f={SINGLE:{CAT:"STRING_LITERAL_LONG1",QUOTES:"'''",CONTENTS:"(('|'')?([^'\\\\]|"+c+"|"+p+"))*"},DOUBLE:{CAT:"STRING_LITERAL_LONG2",QUOTES:'"""',CONTENTS:'(("|"")?([^"\\\\]|'+c+"|"+p+"))*"}};for(var h in f)f[h].COMPLETE=f[h].QUOTES+f[h].CONTENTS+f[h].QUOTES;var g={};for(var h in f)g[h]={complete:{name:"STRING_LITERAL_LONG_"+h,regex:new RegExp("^"+f[h].COMPLETE),style:"string"},contents:{name:"STRING_LITERAL_LONG_"+h,regex:new RegExp("^"+f[h].CONTENTS),style:"string"},closing:{name:"STRING_LITERAL_LONG_"+h,regex:new RegExp("^"+f[h].CONTENTS+f[h].QUOTES),style:"string"},quotes:{name:"STRING_LITERAL_LONG_QUOTES_"+h,regex:new RegExp("^"+f[h].QUOTES),style:"string"}};var m="[\\x20\\x09\\x0D\\x0A]",v="#([^\\n\\r]*[\\n\\r]|[^\\n\\r]*$)",y=[{name:"WS",regex:new RegExp("^"+m+"+"),style:"ws"},{name:"COMMENT",regex:new RegExp("^"+v),style:"comment"},{name:"IRI_REF",regex:new RegExp("^<[^<>\"'|{}^\\\0- ]*>"),style:"variable-3"},{name:"VAR1",regex:new RegExp("^\\?([A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]|_|[0-9])([A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]|_|[0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040])*"),style:"atom"},{name:"VAR2",regex:new RegExp("^\\$([A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]|_|[0-9])([A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]|_|[0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040])*"),style:"atom"},{name:"LANGTAG",regex:new RegExp("^@[a-zA-Z]+(-[a-zA-Z0-9]+)*"),style:"meta"},{name:"DOUBLE",regex:new RegExp("^"+u),style:"number"},{name:"DECIMAL",regex:new RegExp("^"+l),style:"number"},{name:"INTEGER",regex:new RegExp("^[0-9]+"),style:"number"},{name:"DOUBLE_POSITIVE",regex:new RegExp("^\\+(([0-9]+\\.[0-9]*[eE][\\+-]?[0-9]+)|(\\.[0-9]+[eE][\\+-]?[0-9]+)|([0-9]+[eE][\\+-]?[0-9]+))"),style:"number"},{name:"DECIMAL_POSITIVE",regex:new RegExp("^\\+(([0-9]+\\.[0-9]*)|(\\.[0-9]+))"),style:"number"},{name:"INTEGER_POSITIVE",regex:new RegExp("^\\+[0-9]+"),style:"number"},{name:"DOUBLE_NEGATIVE",regex:new RegExp("^-(([0-9]+\\.[0-9]*[eE][\\+-]?[0-9]+)|(\\.[0-9]+[eE][\\+-]?[0-9]+)|([0-9]+[eE][\\+-]?[0-9]+))"),style:"number"},{name:"DECIMAL_NEGATIVE",regex:new RegExp("^-(([0-9]+\\.[0-9]*)|(\\.[0-9]+))"),style:"number"},{name:"INTEGER_NEGATIVE",regex:new RegExp("^-[0-9]+"),style:"number"},{name:"STRING_LITERAL1",regex:new RegExp("^'(([^\\x27\\x5C\\x0A\\x0D])|\\\\[tbnrf\\\\\"']|(\\\\u[0-9A-Fa-f]{4}|\\\\U00(10|0[0-9A-Fa-f])[0-9A-Fa-f]{4}))*'"),style:"string"},{name:"STRING_LITERAL2",regex:new RegExp('^"(([^\\x22\\x5C\\x0A\\x0D])|\\\\[tbnrf\\\\"\']|(\\\\u[0-9A-Fa-f]{4}|\\\\U00(10|0[0-9A-Fa-f])[0-9A-Fa-f]{4}))*"'),style:"string"},{name:"NIL",regex:new RegExp("^\\(([\\x20\\x09\\x0D\\x0A]|(#([^\\n\\r]*[\\n\\r]|[^\\n\\r]*$)))*\\)"),style:"punc"},{name:"ANON",regex:new RegExp("^\\[([\\x20\\x09\\x0D\\x0A]|(#([^\\n\\r]*[\\n\\r]|[^\\n\\r]*$)))*\\]"),style:"punc"},{name:"PNAME_LN",regex:new RegExp("^(([A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD])(((([A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]|_|-|[0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]))|\\.)*(([A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]|_|-|[0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040])))?)?:([A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]|_|:|[0-9]|((%[0-9A-Fa-f][0-9A-Fa-f])|(\\\\[_~\\.\\-!\\$&'\\(\\)\\*\\+,;=/\\?#@%])))((([A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]|_|-|[0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040])|\\.|:|((%[0-9A-Fa-f][0-9A-Fa-f])|(\\\\[_~\\.\\-!\\$&'\\(\\)\\*\\+,;=/\\?#@%])))*(([A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]|_|-|[0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040])|:|((%[0-9A-Fa-f][0-9A-Fa-f])|(\\\\[_~\\.\\-!\\$&'\\(\\)\\*\\+,;=/\\?#@%]))))?"),style:"string-2"},{name:"PNAME_NS",regex:new RegExp("^"+a),style:"string-2"},{name:"BLANK_NODE_LABEL",regex:new RegExp("^_:([A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]|_|[0-9])((([A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]|_|-|[0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040])|\\.)*([A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]|_|-|[0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]))?"),style:"string-2"}];function x(e){var t=[],n=i[e];if(null!=n)for(var r in n)t.push(r.toString());else t.push(e);return t}function b(e,t){function n(){var n=e.column();t.errorStartPos=n,t.errorEndPos=n+s.text.length}function o(e){"disallowVars"==e?t.allowVars=!1:"allowVars"==e?t.allowVars=!0:"disallowBnodes"==e?t.allowBnodes=!1:"allowBnodes"==e?t.allowBnodes=!0:"storeProperty"==e&&(t.storeProperty=!0)}function a(e){return(t.allowVars||"var"!=e)&&(t.allowBnodes||"blankNode"!=e&&"blankNodePropertyList"!=e&&"blankNodePropertyListPath"!=e)}0==e.pos&&(t.possibleCurrent=t.possibleNext);var s=function(){var n=null;if(t.inLiteral){var i=!1;if((n=e.match(g[t.inLiteral].contents.regex,!0,!1))&&0==n[0].length&&(n=e.match(g[t.inLiteral].closing.regex,!0,!1),i=!0),n&&n[0].length>0){var o={quotePos:i?"end":"content",cat:f[t.inLiteral].CAT,style:g[t.inLiteral].complete.style,text:n[0],start:e.start};return i&&(t.inLiteral=!1),o}}for(var a in g){var s;if(n=e.match(g[a].quotes.regex,!0,!1))return t.inLiteral?(t.inLiteral=!1,s="end"):(t.inLiteral=a,s="start"),{cat:f[a].CAT,style:g[a].quotes.style,text:n[0],quotePos:s,start:e.start}}for(var l=0;l<y.length;++l)if(n=e.match(y[l].regex,!0,!1))return{cat:y[l].name,style:y[l].style,text:n[0],start:e.start};return(n=e.match(r.keywords,!0,!1))?{cat:e.current().toUpperCase(),style:"keyword",text:n[0],start:e.start}:(n=e.match(r.punct,!0,!1))?{cat:e.current(),style:"punc",text:n[0],start:e.start}:{cat:"<invalid_token>",style:"error",text:(n=e.match(/^.[A-Za-z0-9]*/,!0,!1))[0],start:e.start}}();if("<invalid_token>"==s.cat)return 1==t.OK&&(t.OK=!1,n()),t.complete=!1,s.style;if("WS"==s.cat||"COMMENT"==s.cat||s.quotePos&&"end"!=s.quotePos)return t.possibleCurrent=t.possibleNext,s.style;var l,u,c=!1,d=s.cat;if(!s.quotePos||"end"==s.quotePos)for(;t.stack.length>0&&d&&t.OK&&!c;)if(l=t.stack.pop(),i[l]){var p=i[l][d];if(null!=p&&a(l)){for(var h=p.length-1;h>=0;--h)t.stack.push(p[h]);o(l)}else t.OK=!1,t.complete=!1,n(),t.stack.push(l)}else if(l==d){c=!0,u=l,null==t.queryType&&("SELECT"!=u&&"CONSTRUCT"!=u&&"ASK"!=u&&"DESCRIBE"!=u&&"INSERT"!=u&&"DELETE"!=u&&"LOAD"!=u&&"CLEAR"!=u&&"CREATE"!=u&&"DROP"!=u&&"COPY"!=u&&"MOVE"!=u&&"ADD"!=u||(t.queryType=u));for(var m=!0,v=t.stack.length;v>0;--v){var b=i[t.stack[v-1]];b&&b.$||(m=!1)}t.complete=m,t.storeProperty&&"punc"!=d.cat&&(t.lastProperty=s.text,t.storeProperty=!1)}else t.OK=!1,t.complete=!1,n();return!c&&t.OK&&(t.OK=!1,t.complete=!1,n()),t.possibleCurrent.indexOf("a")>=0&&(t.lastPredicateOffset=s.start),t.possibleCurrent=t.possibleNext,t.possibleNext=x(t.stack[t.stack.length-1]),s.style}var E={"*[,, object]":3,"*[(,),object]":3,"*[(,),objectPath]":3,"*[/,pathEltOrInverse]":2,object:2,objectPath:2,objectList:2,objectListPath:2,storeProperty:2,pathMod:2,"?pathMod":2,propertyListNotEmpty:1,propertyList:1,propertyListPath:1,propertyListPathNotEmpty:1,"?[verb,objectList]":1},C={"}":1,"]":0,")":1,"{":-1,"(":-1};return{token:b,startState:function(e){return{tokenize:b,OK:!0,complete:r.acceptEmpty,errorStartPos:null,errorEndPos:null,queryType:null,possibleCurrent:x(r.startSymbol),possibleNext:x(r.startSymbol),allowVars:!0,allowBnodes:!0,storeProperty:!1,lastProperty:"",inLiteral:!1,stack:[r.startSymbol],lastPredicateOffset:t.indentUnit}},indent:function(e,n){if(e.inLiteral)return 0;if(e.stack.length&&"?[or([verbPath,verbSimple]),objectList]"==e.stack[e.stack.length-1])return e.lastPredicateOffset;var r=0,i=e.stack.length-1;if(/^[\}\]\)]/.test(n)){for(var o=n.substr(0,1);i>=0;--i)if(e.stack[i]==o){--i;break}}else(a=E[e.stack[i]])&&(r+=a,--i);for(;i>=0;--i){var a;(a=C[e.stack[i]])&&(r+=a)}return r*t.indentUnit},electricChars:"}])"}})),r.defineMIME("application/x-sparql-query","sparql11")},{"./_tokenizer-table.js":2,codemirror:15}],4:[function(e,t,n){var r=t.exports=function(){this.words=0,this.prefixes=0,this.children=[]};r.prototype={insert:function(e,t){if(0!=e.length){var n,i=this;void 0===t&&(t=0),t!==e.length?(i.prefixes++,n=e[t],void 0===i.children[n]&&(i.children[n]=new r),i.children[n].insert(e,t+1)):i.words++}},remove:function(e,t){if(0!=e.length){var n,r=this;void 0===t&&(t=0),void 0!==r&&(t!==e.length?(r.prefixes--,n=e[t],r.children[n].remove(e,t+1)):r.words--)}},update:function(e,t){0!=e.length&&0!=t.length&&(this.remove(e),this.insert(t))},countWord:function(e,t){if(0==e.length)return 0;var n,r,i=0;return void 0===t&&(t=0),t===e.length?this.words:(n=e[t],void 0!==(r=this.children[n])&&(i=r.countWord(e,t+1)),i)},countPrefix:function(e,t){if(0==e.length)return 0;var n,r=0;if(void 0===t&&(t=0),t===e.length)return this.prefixes;var i=e[t];return void 0!==(n=this.children[i])&&(r=n.countPrefix(e,t+1)),r},find:function(e){return 0!=e.length&&this.countWord(e)>0},getAllWords:function(e){var t,n,r=this,i=[];if(void 0===e&&(e=""),void 0===r)return[];for(t in r.words>0&&i.push(e),r.children)n=r.children[t],i=i.concat(n.getAllWords(e+t));return i},autoComplete:function(e,t){var n,r;return 0==e.length?void 0===t?this.getAllWords(e):[]:(void 0===t&&(t=0),n=e[t],void 0===(r=this.children[n])?[]:t===e.length-1?r.getAllWords(e):r.autoComplete(e,t+1))}}},{}],5:[function(e,t,n){var r;r=function(e){"use strict";e.defineOption("fullScreen",!1,(function(t,n,r){r==e.Init&&(r=!1),!r!=!n&&(n?function(e){var t=e.getWrapperElement();e.state.fullScreenRestore={scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,width:t.style.width,height:t.style.height},t.style.width="",t.style.height="auto",t.className+=" CodeMirror-fullscreen",document.documentElement.style.overflow="hidden",e.refresh()}(t):function(e){var t=e.getWrapperElement();t.className=t.className.replace(/\s*CodeMirror-fullscreen\b/,""),document.documentElement.style.overflow="";var n=e.state.fullScreenRestore;t.style.width=n.width,t.style.height=n.height,window.scrollTo(n.scrollLeft,n.scrollTop),e.refresh()}(t))}))},"object"==typeof n&&"object"==typeof t?r(e("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],r):r(CodeMirror)},{"../../lib/codemirror":15}],6:[function(e,t,n){var r;r=function(e){var t={pairs:"()[]{}''\"\"",triples:"",explode:"[]{}"},n=e.Pos;function r(e,n){return"pairs"==n&&"string"==typeof e?e:"object"==typeof e&&null!=e[n]?e[n]:t[n]}e.defineOption("autoCloseBrackets",!1,(function(t,n,r){r&&r!=e.Init&&(t.removeKeyMap(o),t.state.closeBrackets=null),n&&(t.state.closeBrackets=n,t.addKeyMap(o))}));for(var i=t.pairs+"`",o={Backspace:function(t){var i=l(t);if(!i||t.getOption("disableInput"))return e.Pass;for(var o=r(i,"pairs"),a=t.listSelections(),s=0;s<a.length;s++){if(!a[s].empty())return e.Pass;var u=c(t,a[s].head);if(!u||o.indexOf(u)%2!=0)return e.Pass}for(s=a.length-1;s>=0;s--){var d=a[s].head;t.replaceRange("",n(d.line,d.ch-1),n(d.line,d.ch+1),"+delete")}},Enter:function(t){var n=l(t),i=n&&r(n,"explode");if(!i||t.getOption("disableInput"))return e.Pass;for(var o=t.listSelections(),a=0;a<o.length;a++){if(!o[a].empty())return e.Pass;var s=c(t,o[a].head);if(!s||i.indexOf(s)%2!=0)return e.Pass}t.operation((function(){t.replaceSelection("\n\n",null),t.execCommand("goCharLeft"),o=t.listSelections();for(var e=0;e<o.length;e++){var n=o[e].head.line;t.indentLine(n,null,!0),t.indentLine(n+1,null,!0)}}))}},a=0;a<i.length;a++)o["'"+i.charAt(a)+"'"]=s(i.charAt(a));function s(t){return function(i){return function(t,i){var o=l(t);if(!o||t.getOption("disableInput"))return e.Pass;var a=r(o,"pairs"),s=a.indexOf(i);if(-1==s)return e.Pass;for(var c,p=r(o,"triples"),f=a.charAt(s+1)==i,h=t.listSelections(),g=s%2==0,m=0;m<h.length;m++){var v,y=h[m],x=y.head,b=t.getRange(x,n(x.line,x.ch+1));if(g&&!y.empty())v="surround";else if(!f&&g||b!=i)if(f&&x.ch>1&&p.indexOf(i)>=0&&t.getRange(n(x.line,x.ch-2),x)==i+i&&(x.ch<=2||t.getRange(n(x.line,x.ch-3),n(x.line,x.ch-2))!=i))v="addFour";else if(f){if(e.isWordChar(b)||!d(t,x,i))return e.Pass;v="both"}else{if(!g||t.getLine(x.line).length!=x.ch&&!u(b,a)&&!/\s/.test(b))return e.Pass;v="both"}else v=p.indexOf(i)>=0&&t.getRange(x,n(x.line,x.ch+3))==i+i+i?"skipThree":"skip";if(c){if(c!=v)return e.Pass}else c=v}var E=s%2?a.charAt(s-1):i,C=s%2?i:a.charAt(s+1);t.operation((function(){if("skip"==c)t.execCommand("goCharRight");else if("skipThree"==c)for(var r=0;r<3;r++)t.execCommand("goCharRight");else if("surround"==c){var i=t.getSelections();for(r=0;r<i.length;r++)i[r]=E+i[r]+C;for(t.replaceSelections(i,"around"),i=t.listSelections().slice(),r=0;r<i.length;r++)i[r]=(o=i[r],a=void 0,a=e.cmpPos(o.anchor,o.head)>0,{anchor:new n(o.anchor.line,o.anchor.ch+(a?-1:1)),head:new n(o.head.line,o.head.ch+(a?1:-1))});t.setSelections(i)}else"both"==c?(t.replaceSelection(E+C,null),t.triggerElectric(E+C),t.execCommand("goCharLeft")):"addFour"==c&&(t.replaceSelection(E+E+E+E,"before"),t.execCommand("goCharRight"));var o,a}))}(i,t)}}function l(e){var t=e.state.closeBrackets;return t?e.getModeAt(e.getCursor()).closeBrackets||t:null}function u(e,t){var n=t.lastIndexOf(e);return n>-1&&n%2==1}function c(e,t){var r=e.getRange(n(t.line,t.ch-1),n(t.line,t.ch+1));return 2==r.length?r:null}function d(t,n,r){var i=t.getLine(n.line),o=t.getTokenAt(n);if(/\bstring2?\b/.test(o.type))return!1;var a=new e.StringStream(i.slice(0,n.ch)+r+i.slice(n.ch),4);for(a.pos=a.start=o.start;;){var s=t.getMode().token(a,o.state);if(a.pos>=n.ch+1)return/\bstring2?\b/.test(s);a.start=a.pos}}},"object"==typeof n&&"object"==typeof t?r(e("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],r):r(CodeMirror)},{"../../lib/codemirror":15}],7:[function(e,t,n){var r;r=function(e){var t=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),n=e.Pos,r={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"};function i(e,t,i,a){var s=e.getLineHandle(t.line),l=t.ch-1,u=l>=0&&r[s.text.charAt(l)]||r[s.text.charAt(++l)];if(!u)return null;var c=">"==u.charAt(1)?1:-1;if(i&&c>0!=(l==t.ch))return null;var d=e.getTokenTypeAt(n(t.line,l+1)),p=o(e,n(t.line,l+(c>0?1:0)),c,d||null,a);return null==p?null:{from:n(t.line,l),to:p&&p.pos,match:p&&p.ch==u.charAt(0),forward:c>0}}function o(e,t,i,o,a){for(var s=a&&a.maxScanLineLength||1e4,l=a&&a.maxScanLines||1e3,u=[],c=a&&a.bracketRegex?a.bracketRegex:/[(){}[\]]/,d=i>0?Math.min(t.line+l,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-l),p=t.line;p!=d;p+=i){var f=e.getLine(p);if(f){var h=i>0?0:f.length-1,g=i>0?f.length:-1;if(!(f.length>s))for(p==t.line&&(h=t.ch-(i<0?1:0));h!=g;h+=i){var m=f.charAt(h);if(c.test(m)&&(void 0===o||e.getTokenTypeAt(n(p,h+1))==o))if(">"==r[m].charAt(1)==i>0)u.push(m);else{if(!u.length)return{pos:n(p,h),ch:m};u.pop()}}}}return p-i!=(i>0?e.lastLine():e.firstLine())&&null}function a(e,r,o){for(var a=e.state.matchBrackets.maxHighlightLineLength||1e3,s=[],l=e.listSelections(),u=0;u<l.length;u++){var c=l[u].empty()&&i(e,l[u].head,!1,o);if(c&&e.getLine(c.from.line).length<=a){var d=c.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";s.push(e.markText(c.from,n(c.from.line,c.from.ch+1),{className:d})),c.to&&e.getLine(c.to.line).length<=a&&s.push(e.markText(c.to,n(c.to.line,c.to.ch+1),{className:d}))}}if(s.length){t&&e.state.focused&&e.focus();var p=function(){e.operation((function(){for(var e=0;e<s.length;e++)s[e].clear()}))};if(!r)return p;setTimeout(p,800)}}var s=null;function l(e){e.operation((function(){s&&(s(),s=null),s=a(e,!1,e.state.matchBrackets)}))}e.defineOption("matchBrackets",!1,(function(t,n,r){r&&r!=e.Init&&t.off("cursorActivity",l),n&&(t.state.matchBrackets="object"==typeof n?n:{},t.on("cursorActivity",l))})),e.defineExtension("matchBrackets",(function(){a(this,!0)})),e.defineExtension("findMatchingBracket",(function(e,t,n){return i(this,e,t,n)})),e.defineExtension("scanForBracket",(function(e,t,n,r){return o(this,e,t,n,r)}))},"object"==typeof n&&"object"==typeof t?r(e("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],r):r(CodeMirror)},{"../../lib/codemirror":15}],8:[function(e,t,n){var r;r=function(e){"use strict";e.registerHelper("fold","brace",(function(t,n){var r,i=n.line,o=t.getLine(i);function a(a){for(var s=n.ch,l=0;;){var u=s<=0?-1:o.lastIndexOf(a,s-1);if(-1!=u){if(1==l&&u<n.ch)break;if(r=t.getTokenTypeAt(e.Pos(i,u+1)),!/^(comment|string)/.test(r))return u+1;s=u-1}else{if(1==l)break;l=1,s=o.length}}}var s="{",l="}",u=a("{");if(null==u&&(s="[",l="]",u=a("[")),null!=u){var c,d,p=1,f=t.lastLine();e:for(var h=i;h<=f;++h)for(var g=t.getLine(h),m=h==i?u:0;;){var v=g.indexOf(s,m),y=g.indexOf(l,m);if(v<0&&(v=g.length),y<0&&(y=g.length),(m=Math.min(v,y))==g.length)break;if(t.getTokenTypeAt(e.Pos(h,m+1))==r)if(m==v)++p;else if(!--p){c=h,d=m;break e}++m}if(null!=c&&(i!=c||d!=u))return{from:e.Pos(i,u),to:e.Pos(c,d)}}})),e.registerHelper("fold","import",(function(t,n){function r(n){if(n<t.firstLine()||n>t.lastLine())return null;var r=t.getTokenAt(e.Pos(n,1));if(/\S/.test(r.string)||(r=t.getTokenAt(e.Pos(n,r.end+1))),"keyword"!=r.type||"import"!=r.string)return null;for(var i=n,o=Math.min(t.lastLine(),n+10);i<=o;++i){var a=t.getLine(i).indexOf(";");if(-1!=a)return{startCh:r.end,end:e.Pos(i,a)}}}var i,o=n.line,a=r(o);if(!a||r(o-1)||(i=r(o-2))&&i.end.line==o-1)return null;for(var s=a.end;;){var l=r(s.line+1);if(null==l)break;s=l.end}return{from:t.clipPos(e.Pos(o,a.startCh+1)),to:s}})),e.registerHelper("fold","include",(function(t,n){function r(n){if(n<t.firstLine()||n>t.lastLine())return null;var r=t.getTokenAt(e.Pos(n,1));return/\S/.test(r.string)||(r=t.getTokenAt(e.Pos(n,r.end+1))),"meta"==r.type&&"#include"==r.string.slice(0,8)?r.start+8:void 0}var i=n.line,o=r(i);if(null==o||null!=r(i-1))return null;for(var a=i;null!=r(a+1);)++a;return{from:e.Pos(i,o+1),to:t.clipPos(e.Pos(a))}}))},"object"==typeof n&&"object"==typeof t?r(e("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],r):r(CodeMirror)},{"../../lib/codemirror":15}],9:[function(e,t,n){var r;r=function(e){"use strict";function t(t,n,i,o){if(i&&i.call){var a=i;i=null}else a=r(t,i,"rangeFinder");"number"==typeof n&&(n=e.Pos(n,0));var s=r(t,i,"minFoldSize");function l(e){var r=a(t,n);if(!r||r.to.line-r.from.line<s)return null;for(var i=t.findMarksAt(r.from),l=0;l<i.length;++l)if(i[l].__isFold&&"fold"!==o){if(!e)return null;r.cleared=!0,i[l].clear()}return r}var u=l(!0);if(r(t,i,"scanUp"))for(;!u&&n.line>t.firstLine();)n=e.Pos(n.line-1,0),u=l(!1);if(u&&!u.cleared&&"unfold"!==o){var c=function(e,t){var n=r(e,t,"widget");if("string"==typeof n){var i=document.createTextNode(n);(n=document.createElement("span")).appendChild(i),n.className="CodeMirror-foldmarker"}return n}(t,i);e.on(c,"mousedown",(function(t){d.clear(),e.e_preventDefault(t)}));var d=t.markText(u.from,u.to,{replacedWith:c,clearOnEnter:r(t,i,"clearOnEnter"),__isFold:!0});d.on("clear",(function(n,r){e.signal(t,"unfold",t,n,r)})),e.signal(t,"fold",t,u.from,u.to)}}e.newFoldFunction=function(e,n){return function(r,i){t(r,i,{rangeFinder:e,widget:n})}},e.defineExtension("foldCode",(function(e,n,r){t(this,e,n,r)})),e.defineExtension("isFolded",(function(e){for(var t=this.findMarksAt(e),n=0;n<t.length;++n)if(t[n].__isFold)return!0})),e.commands.toggleFold=function(e){e.foldCode(e.getCursor())},e.commands.fold=function(e){e.foldCode(e.getCursor(),null,"fold")},e.commands.unfold=function(e){e.foldCode(e.getCursor(),null,"unfold")},e.commands.foldAll=function(t){t.operation((function(){for(var n=t.firstLine(),r=t.lastLine();n<=r;n++)t.foldCode(e.Pos(n,0),null,"fold")}))},e.commands.unfoldAll=function(t){t.operation((function(){for(var n=t.firstLine(),r=t.lastLine();n<=r;n++)t.foldCode(e.Pos(n,0),null,"unfold")}))},e.registerHelper("fold","combine",(function(){var e=Array.prototype.slice.call(arguments,0);return function(t,n){for(var r=0;r<e.length;++r){var i=e[r](t,n);if(i)return i}}})),e.registerHelper("fold","auto",(function(e,t){for(var n=e.getHelpers(t,"fold"),r=0;r<n.length;r++){var i=n[r](e,t);if(i)return i}}));var n={rangeFinder:e.fold.auto,widget:"↔",minFoldSize:0,scanUp:!1,clearOnEnter:!0};function r(e,t,r){if(t&&void 0!==t[r])return t[r];var i=e.options.foldOptions;return i&&void 0!==i[r]?i[r]:n[r]}e.defineOption("foldOptions",null),e.defineExtension("foldOption",(function(e,t){return r(this,e,t)}))},"object"==typeof n&&"object"==typeof t?r(e("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],r):r(CodeMirror)},{"../../lib/codemirror":15}],10:[function(e,t,n){var r;r=function(e){"use strict";e.defineOption("foldGutter",!1,(function(t,r,i){var o;i&&i!=e.Init&&(t.clearGutter(t.state.foldGutter.options.gutter),t.state.foldGutter=null,t.off("gutterClick",s),t.off("change",l),t.off("viewportChange",u),t.off("fold",c),t.off("unfold",c),t.off("swapDoc",l)),r&&(t.state.foldGutter=new n((!0===(o=r)&&(o={}),null==o.gutter&&(o.gutter="CodeMirror-foldgutter"),null==o.indicatorOpen&&(o.indicatorOpen="CodeMirror-foldgutter-open"),null==o.indicatorFolded&&(o.indicatorFolded="CodeMirror-foldgutter-folded"),o)),a(t),t.on("gutterClick",s),t.on("change",l),t.on("viewportChange",u),t.on("fold",c),t.on("unfold",c),t.on("swapDoc",l))}));var t=e.Pos;function n(e){this.options=e,this.from=this.to=0}function r(e,n){for(var r=e.findMarks(t(n,0),t(n+1,0)),i=0;i<r.length;++i)if(r[i].__isFold&&r[i].find().from.line==n)return r[i]}function i(e){if("string"==typeof e){var t=document.createElement("div");return t.className=e+" CodeMirror-guttermarker-subtle",t}return e.cloneNode(!0)}function o(e,n,o){var a=e.state.foldGutter.options,s=n,l=e.foldOption(a,"minFoldSize"),u=e.foldOption(a,"rangeFinder");e.eachLine(n,o,(function(n){var o=null;if(r(e,s))o=i(a.indicatorFolded);else{var c=t(s,0),d=u&&u(e,c);d&&d.to.line-d.from.line>=l&&(o=i(a.indicatorOpen))}e.setGutterMarker(n,a.gutter,o),++s}))}function a(e){var t=e.getViewport(),n=e.state.foldGutter;n&&(e.operation((function(){o(e,t.from,t.to)})),n.from=t.from,n.to=t.to)}function s(e,n,i){var o=e.state.foldGutter;if(o){var a=o.options;if(i==a.gutter){var s=r(e,n);s?s.clear():e.foldCode(t(n,0),a.rangeFinder)}}}function l(e){var t=e.state.foldGutter;if(t){var n=t.options;t.from=t.to=0,clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout((function(){a(e)}),n.foldOnChangeTimeSpan||600)}}function u(e){var t=e.state.foldGutter;if(t){var n=t.options;clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout((function(){var n=e.getViewport();t.from==t.to||n.from-t.to>20||t.from-n.to>20?a(e):e.operation((function(){n.from<t.from&&(o(e,n.from,t.from),t.from=n.from),n.to>t.to&&(o(e,t.to,n.to),t.to=n.to)}))}),n.updateViewportTimeSpan||400)}}function c(e,t){var n=e.state.foldGutter;if(n){var r=t.line;r>=n.from&&r<n.to&&o(e,r,r+1)}}},"object"==typeof n&&"object"==typeof t?r(e("../../lib/codemirror"),e("./foldcode")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./foldcode"],r):r(CodeMirror)},{"../../lib/codemirror":15,"./foldcode":9}],11:[function(e,t,n){var r;r=function(e){"use strict";var t=e.Pos,n="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",r=new RegExp("<(/?)(["+n+"][A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*)","g");function i(e,t,n,r){this.line=t,this.ch=n,this.cm=e,this.text=e.getLine(t),this.min=r?r.from:e.firstLine(),this.max=r?r.to-1:e.lastLine()}function o(e,n){var r=e.cm.getTokenTypeAt(t(e.line,n));return r&&/\btag\b/.test(r)}function a(e){if(!(e.line>=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function s(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function l(e){for(;;){var t=e.text.indexOf(">",e.ch);if(-1==t){if(a(e))continue;return}if(o(e,t+1)){var n=e.text.lastIndexOf("/",t),r=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,r?"selfClose":"regular"}e.ch=t+1}}function u(e){for(;;){var t=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(-1==t){if(s(e))continue;return}if(o(e,t+1)){r.lastIndex=t,e.ch=t;var n=r.exec(e.text);if(n&&n.index==t)return n}else e.ch=t}}function c(e){for(;;){r.lastIndex=e.ch;var t=r.exec(e.text);if(!t){if(a(e))continue;return}if(o(e,t.index+1))return e.ch=t.index+t[0].length,t;e.ch=t.index+1}}function d(e){for(;;){var t=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(-1==t){if(s(e))continue;return}if(o(e,t+1)){var n=e.text.lastIndexOf("/",t),r=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,r?"selfClose":"regular"}e.ch=t}}function p(e,n){for(var r=[];;){var i,o=c(e),a=e.line,s=e.ch-(o?o[0].length:0);if(!o||!(i=l(e)))return;if("selfClose"!=i)if(o[1]){for(var u=r.length-1;u>=0;--u)if(r[u]==o[2]){r.length=u;break}if(u<0&&(!n||n==o[2]))return{tag:o[2],from:t(a,s),to:t(e.line,e.ch)}}else r.push(o[2])}}function f(e,n){for(var r=[];;){var i=d(e);if(!i)return;if("selfClose"!=i){var o=e.line,a=e.ch,s=u(e);if(!s)return;if(s[1])r.push(s[2]);else{for(var l=r.length-1;l>=0;--l)if(r[l]==s[2]){r.length=l;break}if(l<0&&(!n||n==s[2]))return{tag:s[2],from:t(e.line,e.ch),to:t(o,a)}}}else u(e)}}e.registerHelper("fold","xml",(function(e,n){for(var r=new i(e,n.line,0);;){var o,a=c(r);if(!a||r.line!=n.line||!(o=l(r)))return;if(!a[1]&&"selfClose"!=o){var s=t(r.line,r.ch),u=p(r,a[2]);return u&&{from:s,to:u.from}}}})),e.findMatchingTag=function(e,n,r){var o=new i(e,n.line,n.ch,r);if(-1!=o.text.indexOf(">")||-1!=o.text.indexOf("<")){var a=l(o),s=a&&t(o.line,o.ch),c=a&&u(o);if(a&&c&&(h=n,!(((d=o).line-h.line||d.ch-h.ch)>0))){var d,h,g={from:t(o.line,o.ch),to:s,tag:c[2]};return"selfClose"==a?{open:g,close:null,at:"open"}:c[1]?{open:f(o,c[2]),close:g,at:"close"}:{open:g,close:p(o=new i(e,s.line,s.ch,r),c[2]),at:"open"}}}},e.findEnclosingTag=function(e,t,n){for(var r=new i(e,t.line,t.ch,n);;){var o=f(r);if(!o)break;var a=p(new i(e,t.line,t.ch,n),o.tag);if(a)return{open:o,close:a}}},e.scanForClosingTag=function(e,t,n,r){return p(new i(e,t.line,t.ch,r?{from:0,to:r}:null),n)}},"object"==typeof n&&"object"==typeof t?r(e("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],r):r(CodeMirror)},{"../../lib/codemirror":15}],12:[function(e,t,n){var r;r=function(e){"use strict";function t(e,t){this.cm=e,this.options=t,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length;var n=this;e.on("cursorActivity",this.activityFunc=function(){n.cursorActivity()})}e.showHint=function(e,t,n){if(!t)return e.showHint(n);n&&n.async&&(t.async=!0);var r={hint:t};if(n)for(var i in n)r[i]=n[i];return e.showHint(r)},e.defineExtension("showHint",(function(n){n=function(e,t,n){var r=e.options.hintOptions,i={};for(var o in l)i[o]=l[o];if(r)for(var o in r)void 0!==r[o]&&(i[o]=r[o]);if(n)for(var o in n)void 0!==n[o]&&(i[o]=n[o]);return i.hint.resolve&&(i.hint=i.hint.resolve(e,t)),i}(this,this.getCursor("start"),n);var r=this.listSelections();if(!(r.length>1)){if(this.somethingSelected()){if(!n.hint.supportsSelection)return;for(var i=0;i<r.length;i++)if(r[i].head.line!=r[i].anchor.line)return}this.state.completionActive&&this.state.completionActive.close();var o=this.state.completionActive=new t(this,n);o.options.hint&&(e.signal(this,"startCompletion",this),o.update(!0))}}));var n=window.requestAnimationFrame||function(e){return setTimeout(e,1e3/60)},r=window.cancelAnimationFrame||clearTimeout;function i(e){return"string"==typeof e?e:e.text}function o(e,t){for(;t&&t!=e;){if("LI"===t.nodeName.toUpperCase()&&t.parentNode==e)return t;t=t.parentNode}}function a(t,n){this.completion=t,this.data=n,this.picked=!1;var r=this,a=t.cm,s=this.hints=document.createElement("ul");s.className="CodeMirror-hints",this.selectedHint=n.selectedHint||0;for(var l=n.list,u=0;u<l.length;++u){var c=s.appendChild(document.createElement("li")),d=l[u],p="CodeMirror-hint"+(u!=this.selectedHint?"":" CodeMirror-hint-active");null!=d.className&&(p=d.className+" "+p),c.className=p,d.render?d.render(c,n,d):c.appendChild(document.createTextNode(d.displayText||i(d))),c.hintId=u}var f=a.cursorCoords(t.options.alignWithWord?n.from:null),h=f.left,g=f.bottom,m=!0;s.style.left=h+"px",s.style.top=g+"px";var v=window.innerWidth||Math.max(document.body.offsetWidth,document.documentElement.offsetWidth),y=window.innerHeight||Math.max(document.body.offsetHeight,document.documentElement.offsetHeight);(t.options.container||document.body).appendChild(s);var x=s.getBoundingClientRect(),b=x.bottom-y,E=s.scrollHeight>s.clientHeight+1,C=a.getScrollInfo();if(b>0){var T=x.bottom-x.top;if(f.top-(f.bottom-x.top)-T>0)s.style.top=(g=f.top-T)+"px",m=!1;else if(T>y){s.style.height=y-5+"px",s.style.top=(g=f.bottom-x.top)+"px";var S=a.getCursor();n.from.ch!=S.ch&&(f=a.cursorCoords(S),s.style.left=(h=f.left)+"px",x=s.getBoundingClientRect())}}var w,N=x.right-v;if(N>0&&(x.right-x.left>v&&(s.style.width=v-5+"px",N-=x.right-x.left-v),s.style.left=(h=f.left-N)+"px"),E)for(var L=s.firstChild;L;L=L.nextSibling)L.style.paddingRight=a.display.nativeBarWidth+"px";return a.addKeyMap(this.keyMap=function(e,t){var n={Up:function(){t.moveFocus(-1)},Down:function(){t.moveFocus(1)},PageUp:function(){t.moveFocus(1-t.menuSize(),!0)},PageDown:function(){t.moveFocus(t.menuSize()-1,!0)},Home:function(){t.setFocus(0)},End:function(){t.setFocus(t.length-1)},Enter:t.pick,Tab:t.pick,Esc:t.close},r=e.options.customKeys,i=r?{}:n;function o(e,r){var o;o="string"!=typeof r?function(e){return r(e,t)}:n.hasOwnProperty(r)?n[r]:r,i[e]=o}if(r)for(var a in r)r.hasOwnProperty(a)&&o(a,r[a]);var s=e.options.extraKeys;if(s)for(var a in s)s.hasOwnProperty(a)&&o(a,s[a]);return i}(t,{moveFocus:function(e,t){r.changeActive(r.selectedHint+e,t)},setFocus:function(e){r.changeActive(e)},menuSize:function(){return r.screenAmount()},length:l.length,close:function(){t.close()},pick:function(){r.pick()},data:n})),t.options.closeOnUnfocus&&(a.on("blur",this.onBlur=function(){w=setTimeout((function(){t.close()}),100)}),a.on("focus",this.onFocus=function(){clearTimeout(w)})),a.on("scroll",this.onScroll=function(){var e=a.getScrollInfo(),n=a.getWrapperElement().getBoundingClientRect(),r=g+C.top-e.top,i=r-(window.pageYOffset||(document.documentElement||document.body).scrollTop);if(m||(i+=s.offsetHeight),i<=n.top||i>=n.bottom)return t.close();s.style.top=r+"px",s.style.left=h+C.left-e.left+"px"}),e.on(s,"dblclick",(function(e){var t=o(s,e.target||e.srcElement);t&&null!=t.hintId&&(r.changeActive(t.hintId),r.pick())})),e.on(s,"click",(function(e){var n=o(s,e.target||e.srcElement);n&&null!=n.hintId&&(r.changeActive(n.hintId),t.options.completeOnSingleClick&&r.pick())})),e.on(s,"mousedown",(function(){setTimeout((function(){a.focus()}),20)})),e.signal(n,"select",l[0],s.firstChild),!0}function s(e,t,n,r){if(e.async)e(t,r,n);else{var i=e(t,n);i&&i.then?i.then(r):r(i)}}t.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&e.signal(this.data,"close"),this.widget&&this.widget.close(),e.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(t,n){var r=t.list[n];r.hint?r.hint(this.cm,t,r):this.cm.replaceRange(i(r),r.from||t.from,r.to||t.to,"complete"),e.signal(t,"pick",r),this.close()},cursorActivity:function(){this.debounce&&(r(this.debounce),this.debounce=0);var e=this.cm.getCursor(),t=this.cm.getLine(e.line);if(e.line!=this.startPos.line||t.length-e.ch!=this.startLen-this.startPos.ch||e.ch<this.startPos.ch||this.cm.somethingSelected()||e.ch&&this.options.closeCharacters.test(t.charAt(e.ch-1)))this.close();else{var i=this;this.debounce=n((function(){i.update()})),this.widget&&this.widget.disable()}},update:function(e){if(null!=this.tick){var t=this,n=++this.tick;s(this.options.hint,this.cm,this.options,(function(r){t.tick==n&&t.finishUpdate(r,e)}))}},finishUpdate:function(t,n){this.data&&e.signal(this.data,"update");var r,i,o=this.widget&&this.widget.picked||n&&this.options.completeSingle;this.widget&&this.widget.close(),t&&this.data&&(r=this.data,i=t,e.cmpPos(i.from,r.from)>0&&r.to.ch-r.from.ch!=i.to.ch-i.from.ch)||(this.data=t,t&&t.list.length&&(o&&1==t.list.length?this.pick(t,0):(this.widget=new a(this,t),e.signal(t,"shown"))))}},a.prototype={close:function(){if(this.completion.widget==this){this.completion.widget=null,this.hints.parentNode.removeChild(this.hints),this.completion.cm.removeKeyMap(this.keyMap);var e=this.completion.cm;this.completion.options.closeOnUnfocus&&(e.off("blur",this.onBlur),e.off("focus",this.onFocus)),e.off("scroll",this.onScroll)}},disable:function(){this.completion.cm.removeKeyMap(this.keyMap);var e=this;this.keyMap={Enter:function(){e.picked=!0}},this.completion.cm.addKeyMap(this.keyMap)},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(t,n){if(t>=this.data.list.length?t=n?this.data.list.length-1:0:t<0&&(t=n?0:this.data.list.length-1),this.selectedHint!=t){var r=this.hints.childNodes[this.selectedHint];r.className=r.className.replace(" CodeMirror-hint-active",""),(r=this.hints.childNodes[this.selectedHint=t]).className+=" CodeMirror-hint-active",r.offsetTop<this.hints.scrollTop?this.hints.scrollTop=r.offsetTop-3:r.offsetTop+r.offsetHeight>this.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=r.offsetTop+r.offsetHeight-this.hints.clientHeight+3),e.signal(this.data,"select",this.data.list[this.selectedHint],r)}},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1}},e.registerHelper("hint","auto",{resolve:function(t,n){var r,i=t.getHelpers(n,"hint");if(i.length){var o=function(e,t,n){var r=function(e,t){if(!e.somethingSelected())return t;for(var n=[],r=0;r<t.length;r++)t[r].supportsSelection&&n.push(t[r]);return n}(e,i);!function i(o){if(o==r.length)return t(null);s(r[o],e,n,(function(e){e&&e.list.length>0?t(e):i(o+1)}))}(0)};return o.async=!0,o.supportsSelection=!0,o}return(r=t.getHelper(t.getCursor(),"hintWords"))?function(t){return e.hint.fromList(t,{words:r})}:e.hint.anyword?function(t,n){return e.hint.anyword(t,n)}:function(){}}}),e.registerHelper("hint","fromList",(function(t,n){var r=t.getCursor(),i=t.getTokenAt(r),o=e.Pos(r.line,i.end);if(i.string&&/\w/.test(i.string[i.string.length-1]))var a=i.string,s=e.Pos(r.line,i.start);else a="",s=o;for(var l=[],u=0;u<n.words.length;u++){var c=n.words[u];c.slice(0,a.length)==a&&l.push(c)}if(l.length)return{list:l,from:s,to:o}})),e.commands.autocomplete=e.showHint;var l={hint:e.hint.auto,completeSingle:!0,alignWithWord:!0,closeCharacters:/[\s()\[\]{};:>,]/,closeOnUnfocus:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null};e.defineOption("hintOptions",null)},"object"==typeof n&&"object"==typeof t?r(e("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],r):r(CodeMirror)},{"../../lib/codemirror":15}],13:[function(e,t,n){var r;r=function(e){"use strict";e.runMode=function(t,n,r,i){var o=e.getMode(e.defaults,n),a=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<9);if(r.appendChild){var s=i&&i.tabSize||e.defaults.tabSize,l=r,u=0;l.innerHTML="",r=function(e,t){if("\n"==e)return l.appendChild(document.createTextNode(a?"\r":e)),void(u=0);for(var n="",r=0;;){var i=e.indexOf("\t",r);if(-1==i){n+=e.slice(r),u+=e.length-r;break}u+=i-r,n+=e.slice(r,i);var o=s-u%s;u+=o;for(var c=0;c<o;++c)n+=" ";r=i+1}if(t){var d=l.appendChild(document.createElement("span"));d.className="cm-"+t.replace(/ +/g," cm-"),d.appendChild(document.createTextNode(n))}else l.appendChild(document.createTextNode(n))}}for(var c=e.splitLines(t),d=i&&i.state||e.startState(o),p=0,f=c.length;p<f;++p){p&&r("\n");var h=new e.StringStream(c[p]);for(!h.string&&o.blankLine&&o.blankLine(d);!h.eol();){var g=o.token(h,d);r(h.current(),g,p,h.start,d),h.start=h.pos}}}},"object"==typeof n&&"object"==typeof t?r(e("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],r):r(CodeMirror)},{"../../lib/codemirror":15}],14:[function(e,t,n){var r;r=function(e){"use strict";var t=e.Pos;function n(e,n,i,o){if(this.atOccurrence=!1,this.doc=e,null==o&&"string"==typeof n&&(o=!1),i=i?e.clipPos(i):t(0,0),this.pos={from:i,to:i},"string"!=typeof n)n.global||(n=new RegExp(n.source,n.ignoreCase?"ig":"g")),this.matches=function(r,i){if(r){n.lastIndex=0;for(var o=e.getLine(i.line).slice(0,i.ch),a=0;;){n.lastIndex=a;var s=n.exec(o);if(!s)break;if(u=(l=s).index,(a=l.index+(l[0].length||1))==o.length)break}(c=l&&l[0].length||0)||(0==u&&0==o.length?l=void 0:u!=e.getLine(i.line).length&&c++)}else{n.lastIndex=i.ch,o=e.getLine(i.line);var l,u,c=(l=n.exec(o))&&l[0].length||0;(u=l&&l.index)+c==o.length||c||(c=1)}if(l&&c)return{from:t(i.line,u),to:t(i.line,u+c),match:l}};else{var a=n;o&&(n=n.toLowerCase());var s=o?function(e){return e.toLowerCase()}:function(e){return e},l=n.split("\n");if(1==l.length)n.length?this.matches=function(i,o){if(i){var l=e.getLine(o.line).slice(0,o.ch);if((c=(u=s(l)).lastIndexOf(n))>-1)return c=r(l,u,c),{from:t(o.line,c),to:t(o.line,c+a.length)}}else{var u,c;if(l=e.getLine(o.line).slice(o.ch),(c=(u=s(l)).indexOf(n))>-1)return c=r(l,u,c)+o.ch,{from:t(o.line,c),to:t(o.line,c+a.length)}}}:this.matches=function(){};else{var u=a.split("\n");this.matches=function(n,r){var i,o=l.length-1;if(n){if(r.line-(l.length-1)<e.firstLine())return;if(s(e.getLine(r.line).slice(0,u[o].length))!=l[l.length-1])return;for(var a=t(r.line,u[o].length),c=r.line-1,d=o-1;d>=1;--d,--c)if(l[d]!=s(e.getLine(c)))return;var p=(i=e.getLine(c)).length-u[0].length;if(s(i.slice(p))!=l[0])return;return{from:t(c,p),to:a}}if(!(r.line+(l.length-1)>e.lastLine())&&(p=(i=e.getLine(r.line)).length-u[0].length,s(i.slice(p))==l[0])){var f=t(r.line,p);for(c=r.line+1,d=1;d<o;++d,++c)if(l[d]!=s(e.getLine(c)))return;if(s(e.getLine(c).slice(0,u[o].length))==l[o])return{from:f,to:t(c,u[o].length)}}}}}}function r(e,t,n){if(e.length==t.length)return n;for(var r=Math.min(n,e.length);;){var i=e.slice(0,r).toLowerCase().length;if(i<n)++r;else{if(!(i>n))return r;--r}}}n.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(e){var n=this,r=this.doc.clipPos(e?this.pos.from:this.pos.to);function i(e){var r=t(e,0);return n.pos={from:r,to:r},n.atOccurrence=!1,!1}for(;;){if(this.pos=this.matches(e,r))return this.atOccurrence=!0,this.pos.match||!0;if(e){if(!r.line)return i(0);r=t(r.line-1,this.doc.getLine(r.line-1).length)}else{var o=this.doc.lineCount();if(r.line==o-1)return i(o);r=t(r.line+1,0)}}},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(n,r){if(this.atOccurrence){var i=e.splitLines(n);this.doc.replaceRange(i,this.pos.from,this.pos.to,r),this.pos.to=t(this.pos.from.line+i.length-1,i[i.length-1].length+(1==i.length?this.pos.from.ch:0))}}},e.defineExtension("getSearchCursor",(function(e,t,r){return new n(this.doc,e,t,r)})),e.defineDocExtension("getSearchCursor",(function(e,t,r){return new n(this,e,t,r)})),e.defineExtension("selectMatches",(function(t,n){for(var r=[],i=this.getSearchCursor(t,this.getCursor("from"),n);i.findNext()&&!(e.cmpPos(i.to(),this.getCursor("to"))>0);)r.push({anchor:i.from(),head:i.to()});r.length&&this.setSelections(r,0)}))},"object"==typeof n&&"object"==typeof t?r(e("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],r):r(CodeMirror)},{"../../lib/codemirror":15}],15:[function(e,t,n){!function(e){if("object"==typeof n&&"object"==typeof t)t.exports=e();else{if("function"==typeof define&&define.amd)return define([],e);(this||window).CodeMirror=e()}}((function(){"use strict";var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),r=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),o=r||i,a=o&&(r?document.documentMode||6:i[1]),s=/WebKit\//.test(e),l=s&&/Qt\/\d+\.\d+/.test(e),u=/Chrome\//.test(e),c=/Opera\//.test(e),d=/Apple Computer/.test(navigator.vendor),p=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),f=/PhantomJS/.test(e),h=/AppleWebKit/.test(e)&&/Mobile\/\w+/.test(e),g=h||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),m=h||/Mac/.test(t),v=/\bCrOS\b/.test(e),y=/win/i.test(t),x=c&&e.match(/Version\/(\d*\.\d*)/);x&&(x=Number(x[1])),x&&x>=15&&(c=!1,s=!0);var b=m&&(l||c&&(null==x||x<12.11)),E=n||o&&a>=9,C=!1,T=!1;function S(e,t){if(!(this instanceof S))return new S(e,t);this.options=t=t?Co(t):{},Co(er,t,!1),P(t);var n=t.value;"string"==typeof n&&(n=new vi(n,t.mode,null,t.lineSeparator)),this.doc=n;var r=new S.inputStyles[t.inputStyle](this),i=this.display=new w(e,n,r);i.wrapper.CodeMirror=this,_(this),R(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),t.autofocus&&!g&&i.input.focus(),H(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,selectingText:!1,draggingText:!1,highlight:new co,keySeq:null,specialChars:null};var l=this;for(var u in o&&a<11&&setTimeout((function(){l.display.input.reset(!0)}),20),function(e){var t=e.display;$i(t.scroller,"mousedown",Yt(e,dn)),$i(t.scroller,"dblclick",o&&a<11?Yt(e,(function(t){if(!to(e,t)){var n=cn(e,t);if(n&&!fn(e,t)&&!un(e.display,t)){Gi(t);var r=e.findWordAt(n);Ge(e.doc,r.anchor,r.head)}}})):function(t){to(e,t)||Gi(t)}),E||$i(t.scroller,"contextmenu",(function(t){On(e,t)}));var n,r={end:0};function i(){t.activeTouch&&(n=setTimeout((function(){t.activeTouch=null}),1e3),(r=t.activeTouch).end=+new Date)}function s(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>400}$i(t.scroller,"touchstart",(function(i){if(!to(e,i)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(i)){clearTimeout(n);var o=+new Date;t.activeTouch={start:o,moved:!1,prev:o-r.end<=300?r:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}})),$i(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),$i(t.scroller,"touchend",(function(n){var r=t.activeTouch;if(r&&!un(t,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var o,a=e.coordsChar(t.activeTouch,"page");o=!r.prev||s(r,r.prev)?new Oe(a,a):!r.prev.prev||s(r,r.prev.prev)?e.findWordAt(a):new Oe(fe(a.line,0),Fe(e.doc,fe(a.line+1,0))),e.setSelection(o.anchor,o.head),e.focus(),Gi(n)}i()})),$i(t.scroller,"touchcancel",i),$i(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(vn(e,t.scroller.scrollTop),yn(e,t.scroller.scrollLeft,!0),Ki(e,"scroll",e))})),$i(t.scroller,"mousewheel",(function(t){Cn(e,t)})),$i(t.scroller,"DOMMouseScroll",(function(t){Cn(e,t)})),$i(t.wrapper,"scroll",(function(){t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){to(e,t)||Wi(t)},over:function(t){to(e,t)||(function(e,t){var n=cn(e,t);if(n){var r=document.createDocumentFragment();nt(e,n,r),e.display.dragCursor||(e.display.dragCursor=ko("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),Oo(e.display.dragCursor,r)}}(e,t),Wi(t))},start:function(t){!function(e,t){if(o&&(!e.state.draggingText||+new Date-hn<100))Wi(t);else if(!to(e,t)&&!un(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!d)){var n=ko("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",c&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),c&&n.parentNode.removeChild(n)}}(e,t)},drop:Yt(e,gn),leave:function(t){to(e,t)||mn(e)}};var l=t.input.getField();$i(l,"keyup",(function(t){In.call(e,t)})),$i(l,"keydown",Yt(e,An)),$i(l,"keypress",Yt(e,Rn)),$i(l,"focus",To(kn,e)),$i(l,"blur",To(_n,e))}(this),function(){var e;Vo||($i(window,"resize",(function(){null==e&&(e=setTimeout((function(){e=null,Ho(ln)}),100))})),$i(window,"blur",(function(){Ho(_n)})),Vo=!0)}(),Ut(this),this.curOp.forceUpdate=!0,Ei(this,n),t.autofocus&&!g||l.hasFocus()?setTimeout(To(kn,this),20):_n(this),tr)tr.hasOwnProperty(u)&&tr[u](this,t[u],rr);q(this),t.finishInit&&t.finishInit(this);for(var p=0;p<sr.length;++p)sr[p](this);Vt(this),s&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(i.lineDiv).textRendering&&(i.lineDiv.style.textRendering="auto")}function w(e,t,r){var i=this;this.input=r,i.scrollbarFiller=ko("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=ko("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=ko("div",null,"CodeMirror-code"),i.selectionDiv=ko("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=ko("div",null,"CodeMirror-cursors"),i.measure=ko("div",null,"CodeMirror-measure"),i.lineMeasure=ko("div",null,"CodeMirror-measure"),i.lineSpace=ko("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none"),i.mover=ko("div",[ko("div",[i.lineSpace],"CodeMirror-lines")],null,"position: relative"),i.sizer=ko("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=ko("div",null,null,"position: absolute; height: "+oo+"px; width: 1px;"),i.gutters=ko("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=ko("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=ko("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),o&&a<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),s||n&&g||(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,r.init(i)}function N(e){e.doc.mode=S.getMode(e.options,e.doc.modeOption),L(e)}function L(e){e.doc.iter((function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)})),e.doc.frontier=e.doc.first,ot(e,100),e.state.modeGen++,e.curOp&&tn(e)}function A(e){var t=Pt(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/Ft(e.display)-3);return function(i){if(Vr(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a<i.widgets.length;a++)i.widgets[a].height&&(o+=i.widgets[a].height);return n?o+(Math.ceil(i.text.length/r)||1)*t:o+t}}function I(e){var t=e.doc,n=A(e);t.iter((function(e){var t=n(e);t!=e.height&&wi(e,t)}))}function R(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),wt(e)}function k(e){_(e),tn(e),setTimeout((function(){W(e)}),20)}function _(e){var t=e.display.gutters,n=e.options.gutters;_o(t);for(var r=0;r<n.length;++r){var i=n[r],o=t.appendChild(ko("div",null,"CodeMirror-gutter "+i));"CodeMirror-linenumbers"==i&&(e.display.lineGutter=o,o.style.width=(e.display.lineNumWidth||1)+"px")}t.style.display=r?"":"none",O(e)}function O(e){var t=e.display.gutters.offsetWidth;e.display.sizer.style.marginLeft=t+"px"}function D(e){if(0==e.height)return 0;for(var t,n=e.text.length,r=e;t=Fr(r);)r=(i=t.find(0,!0)).from.line,n+=i.from.ch-i.to.ch;for(r=e;t=jr(r);){var i=t.find(0,!0);n-=r.text.length-i.from.ch,n+=(r=i.to.line).text.length-i.to.ch}return n}function M(e){var t=e.display,n=e.doc;t.maxLine=Ci(n,n.first),t.maxLineLength=D(t.maxLine),t.maxLineChanged=!0,n.iter((function(e){var n=D(e);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}function P(e){var t=yo(e.gutters,"CodeMirror-linenumbers");-1==t&&e.lineNumbers?e.gutters=e.gutters.concat(["CodeMirror-linenumbers"]):t>-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}function F(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+ut(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+dt(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}function j(e,t,n){this.cm=n;var r=this.vert=ko("div",[ko("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=ko("div",[ko("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");e(r),e(i),$i(r,"scroll",(function(){r.clientHeight&&t(r.scrollTop,"vertical")})),$i(i,"scroll",(function(){i.clientWidth&&t(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,o&&a<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")}function B(){}function H(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&Fo(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new S.scrollbarModel[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),$i(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,n){"horizontal"==n?yn(e,t):vn(e,t)}),e),e.display.scrollbars.addClass&&jo(e.display.wrapper,e.display.scrollbars.addClass)}function G(e,t){t||(t=F(e));var n=e.display.barWidth,r=e.display.barHeight;U(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&Z(e),U(e,F(e)),n=e.display.barWidth,r=e.display.barHeight}function U(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}function V(e,t,n){var r=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-lt(e));var i=n&&null!=n.bottom?n.bottom:r+e.wrapper.clientHeight,o=Li(t,r),a=Li(t,i);if(n&&n.ensure){var s=n.ensure.from.line,l=n.ensure.to.line;s<o?(o=s,a=Li(t,Ai(Ci(t,s))+e.wrapper.clientHeight)):Math.min(l,t.lastLine())>=a&&(o=Li(t,Ai(Ci(t,l))-e.wrapper.clientHeight),a=l)}return{from:o,to:Math.max(a,o+1)}}function W(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=$(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",a=0;a<n.length;a++)if(!n[a].hidden){e.options.fixedGutter&&n[a].gutter&&(n[a].gutter.style.left=o);var s=n[a].alignable;if(s)for(var l=0;l<s.length;l++)s[l].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=r+i+"px")}}function q(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=z(e.options,t.first+t.size-1),r=e.display;if(n.length!=r.lineNumChars){var i=r.measure.appendChild(ko("div",[ko("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,a=i.offsetWidth-o;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(o,r.lineGutter.offsetWidth-a)+1,r.lineNumWidth=r.lineNumInnerWidth+a,r.lineNumChars=r.lineNumInnerWidth?n.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",O(e),!0}return!1}function z(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function $(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function X(e,t,n){var r=e.display;this.viewport=t,this.visible=V(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=pt(e),this.force=n,this.dims=te(e),this.events=[]}function Q(e,t){var n=e.display,r=e.doc;if(t.editorIsHidden)return rn(e),!1;if(!t.force&&t.visible.from>=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==sn(e))return!1;q(e)&&(rn(e),t.dims=te(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFrom<o&&o-n.viewFrom<20&&(o=Math.max(r.first,n.viewFrom)),n.viewTo>a&&n.viewTo-a<20&&(a=Math.min(i,n.viewTo)),T&&(o=Gr(e.doc,o),a=Ur(e.doc,a));var l=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;!function(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=en(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=en(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(on(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(en(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,on(e,n)))),r.viewTo=n}(e,o,a),n.viewOffset=Ai(Ci(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var u=sn(e);if(!l&&0==u&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var c=Mo();return u>4&&(n.lineDiv.style.display="none"),function(e,t,n){var r=e.display,i=e.options.lineNumbers,o=r.lineDiv,a=o.firstChild;function l(t){var n=t.nextSibling;return s&&m&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var u=r.view,c=r.viewFrom,d=0;d<u.length;d++){var p=u[d];if(p.hidden);else if(p.node&&p.node.parentNode==o){for(;a!=p.node;)a=l(a);var f=i&&null!=t&&t<=c&&p.lineNumber;p.changes&&(yo(p.changes,"gutter")>-1&&(f=!1),ne(e,p,c,n)),f&&(_o(p.lineNumber),p.lineNumber.appendChild(document.createTextNode(z(e.options,c)))),a=p.node.nextSibling}else{var h=ue(e,p,c,n);o.insertBefore(h,a)}c+=p.size}for(;a;)a=l(a)}(e,n.updateLineNumbers,t.dims),u>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,c&&Mo()!=c&&c.offsetHeight&&c.focus(),_o(n.cursorDiv),_o(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,l&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,ot(e,400)),n.updateLineNumbers=null,!0}function Y(e,t){for(var n=t.viewport,r=!0;(r&&e.options.lineWrapping&&t.oldDisplayWidth!=pt(e)||(n&&null!=n.top&&(n={top:Math.min(e.doc.height+ut(e.display)-ft(e),n.top)}),t.visible=V(e.display,e.doc,n),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&Q(e,t);r=!1){Z(e);var i=F(e);et(e),G(e,i),J(e,i)}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function K(e,t){var n=new X(e,t);if(Q(e,n)){Z(e),Y(e,n);var r=F(e);et(e),G(e,r),J(e,r),n.finish()}}function J(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+dt(e)+"px"}function Z(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r<t.view.length;r++){var i,s=t.view[r];if(!s.hidden){if(o&&a<8){var l=s.node.offsetTop+s.node.offsetHeight;i=l-n,n=l}else{var u=s.node.getBoundingClientRect();i=u.bottom-u.top}var c=s.line.height-i;if(i<2&&(i=Pt(t)),(c>.001||c<-.001)&&(wi(s.line,i),ee(s.line),s.rest))for(var d=0;d<s.rest.length;d++)ee(s.rest[d])}}}function ee(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t)e.widgets[t].height=e.widgets[t].node.parentNode.offsetHeight}function te(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a)n[e.options.gutters[a]]=o.offsetLeft+o.clientLeft+i,r[e.options.gutters[a]]=o.clientWidth;return{fixedPos:$(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function ne(e,t,n,r){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?oe(e,t):"gutter"==o?se(e,t,n,r):"class"==o?ae(t):"widget"==o&&le(e,t,r)}t.changes=null}function re(e){return e.node==e.text&&(e.node=ko("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),o&&a<8&&(e.node.style.zIndex=2)),e.node}function ie(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):si(e,t)}function oe(e,t){var n=t.text.className,r=ie(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,ae(t)):n&&(t.text.className=n)}function ae(e){!function(e){var t=e.bgClass?e.bgClass+" "+(e.line.bgClass||""):e.line.bgClass;if(t&&(t+=" CodeMirror-linebackground"),e.background)t?e.background.className=t:(e.background.parentNode.removeChild(e.background),e.background=null);else if(t){var n=re(e);e.background=n.insertBefore(ko("div",null,t),n.firstChild)}}(e),e.line.wrapClass?re(e).className=e.line.wrapClass:e.node!=e.text&&(e.node.className="");var t=e.textClass?e.textClass+" "+(e.line.textClass||""):e.line.textClass;e.text.className=t||""}function se(e,t,n,r){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=re(t);t.gutterBackground=ko("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),i.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){i=re(t);var a=t.gutter=ko("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(e.display.input.setUneditable(a),i.insertBefore(a,t.text),t.line.gutterClass&&(a.className+=" "+t.line.gutterClass),!e.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(t.lineNumber=a.appendChild(ko("div",z(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var s=0;s<e.options.gutters.length;++s){var l=e.options.gutters[s],u=o.hasOwnProperty(l)&&o[l];u&&a.appendChild(ko("div",[u],"CodeMirror-gutter-elt","left: "+r.gutterLeft[l]+"px; width: "+r.gutterWidth[l]+"px"))}}}function le(e,t,n){t.alignable&&(t.alignable=null);for(var r=t.node.firstChild;r;r=i){var i=r.nextSibling;"CodeMirror-linewidget"==r.className&&t.node.removeChild(r)}ce(e,t,n)}function ue(e,t,n,r){var i=ie(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),ae(t),se(e,t,n,r),ce(e,t,r),t.node}function ce(e,t,n){if(de(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)de(e,t.rest[r],t,n,!1)}function de(e,t,n,r,i){if(t.widgets)for(var o=re(n),a=0,s=t.widgets;a<s.length;++a){var l=s[a],u=ko("div",[l.node],"CodeMirror-linewidget");l.handleMouseEvents||u.setAttribute("cm-ignore-events","true"),pe(l,u,n,r),e.display.input.setUneditable(u),i&&l.above?o.insertBefore(u,n.gutter||n.text):o.appendChild(u),Zi(l,"redraw")}}function pe(e,t,n,r){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var i=r.wrapperWidth;t.style.left=r.fixedPos+"px",e.coverGutter||(i-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+"px"))}j.prototype=Co({update:function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=e.scrollWidth-e.clientWidth+o+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},setScrollLeft:function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz)},setScrollTop:function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert)},zeroWidthHack:function(){var e=m&&!p?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new co,this.disableVert=new co},enableZeroWidthBar:function(e,t){e.style.pointerEvents="auto",t.set(1e3,(function n(){var r=e.getBoundingClientRect();document.elementFromPoint(r.left+1,r.bottom-1)!=e?e.style.pointerEvents="none":t.set(1e3,n)}))},clear:function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)}},j.prototype),B.prototype=Co({update:function(){return{bottom:0,right:0}},setScrollLeft:function(){},setScrollTop:function(){},clear:function(){}},B.prototype),S.scrollbarModel={native:j,null:B},X.prototype.signal=function(e,t){ro(e,t)&&this.events.push(arguments)},X.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Ki.apply(null,this.events[e])};var fe=S.Pos=function(e,t){if(!(this instanceof fe))return new fe(e,t);this.line=e,this.ch=t},he=S.cmpPos=function(e,t){return e.line-t.line||e.ch-t.ch};function ge(e){return fe(e.line,e.ch)}function me(e,t){return he(e,t)<0?t:e}function ve(e,t){return he(e,t)<0?e:t}function ye(e){e.state.focused||(e.display.input.focus(),kn(e))}var xe=null;function be(e,t,n,r,i){var o=e.doc;e.display.shift=!1,r||(r=o.sel);var a=e.state.pasteIncoming||"paste"==i,s=o.splitLines(t),l=null;if(a&&r.ranges.length>1)if(xe&&xe.text.join("\n")==t){if(r.ranges.length%xe.text.length==0){l=[];for(var u=0;u<xe.text.length;u++)l.push(o.splitLines(xe.text[u]))}}else s.length==r.ranges.length&&(l=xo(s,(function(e){return[e]})));for(u=r.ranges.length-1;u>=0;u--){var c=r.ranges[u],d=c.from(),p=c.to();c.empty()&&(n&&n>0?d=fe(d.line,d.ch-n):e.state.overwrite&&!a?p=fe(p.line,Math.min(Ci(o,p.line).text.length,p.ch+mo(s).length)):xe&&xe.lineWise&&xe.text.join("\n")==t&&(d=p=fe(d.line,0)));var f=e.curOp.updateInput,h={from:d,to:p,text:l?l[u%l.length]:s,origin:i||(a?"paste":e.state.cutIncoming?"cut":"+input")};Bn(e.doc,h),Zi(e,"inputRead",e,h)}t&&!a&&Ce(e,t),$n(e),e.curOp.updateInput=f,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function Ee(e,t){var n=e.clipboardData&&e.clipboardData.getData("text/plain");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Qt(t,(function(){be(t,n,0,null,"paste")})),!0}function Ce(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var s=0;s<o.electricChars.length;s++)if(t.indexOf(o.electricChars.charAt(s))>-1){a=Qn(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Ci(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Qn(e,i.head.line,"smart"));a&&Zi(e,"electricInput",e,i.head.line)}}}function Te(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var i=e.doc.sel.ranges[r].head.line,o={anchor:fe(i,0),head:fe(i+1,0)};n.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:n}}function Se(e){e.setAttribute("autocorrect","off"),e.setAttribute("autocapitalize","off"),e.setAttribute("spellcheck","false")}function we(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new co,this.inaccurateSelection=!1,this.hasSelection=!1,this.composing=null}function Ne(){var e=ko("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=ko("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return s?e.style.width="1000px":e.setAttribute("wrap","off"),h&&(e.style.border="1px solid black"),Se(e),t}function Le(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new co,this.gracePeriod=!1}function Ae(e,t){var n=mt(e,t.line);if(!n||n.hidden)return null;var r=Ci(e.doc,t.line),i=ht(n,r,t.line),o=Ii(r),a="left";o&&(a=sa(o,t.ch)%2?"right":"left");var s=Et(i.map,t.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function Ie(e,t){return t&&(e.bad=!0),e}function Re(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return Ie(e.clipPos(fe(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var o=e.display.view[i];if(o.node==r)return ke(o,t,n)}}function ke(e,t,n){var r=e.text.firstChild,i=!1;if(!t||!Do(r,t))return Ie(fe(Ni(e.line),0),!0);if(t==r&&(i=!0,t=r.childNodes[n],n=0,!t)){var o=e.rest?mo(e.rest):e.line;return Ie(fe(Ni(o),o.text.length),i)}var a=3==t.nodeType?t:null,s=t;for(a||1!=t.childNodes.length||3!=t.firstChild.nodeType||(a=t.firstChild,n&&(n=a.nodeValue.length));s.parentNode!=r;)s=s.parentNode;var l=e.measure,u=l.maps;function c(t,n,r){for(var i=-1;i<(u?u.length:0);i++)for(var o=i<0?l.map:u[i],a=0;a<o.length;a+=3){var s=o[a+2];if(s==t||s==n){var c=Ni(i<0?e.line:e.rest[i]),d=o[a]+r;return(r<0||s!=t)&&(d=o[a+(r?1:0)]),fe(c,d)}}}var d=c(a,s,n);if(d)return Ie(d,i);for(var p=s.nextSibling,f=a?a.nodeValue.length-n:0;p;p=p.nextSibling){if(d=c(p,p.firstChild,0))return Ie(fe(d.line,d.ch-f),i);f+=p.textContent.length}var h=s.previousSibling;for(f=n;h;h=h.previousSibling){if(d=c(h,h.firstChild,-1))return Ie(fe(d.line,d.ch+f),i);f+=p.textContent.length}}function _e(e,t){this.ranges=e,this.primIndex=t}function Oe(e,t){this.anchor=e,this.head=t}function De(e,t){var n=e[t];e.sort((function(e,t){return he(e.from(),t.from())})),t=yo(e,n);for(var r=1;r<e.length;r++){var i=e[r],o=e[r-1];if(he(o.to(),i.from())>=0){var a=ve(o.from(),i.from()),s=me(o.to(),i.to()),l=o.empty()?i.from()==i.head:o.from()==o.head;r<=t&&--t,e.splice(--r,2,new Oe(l?s:a,l?a:s))}}return new _e(e,t)}function Me(e,t){return new _e([new Oe(e,t||e)],0)}function Pe(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function Fe(e,t){if(t.line<e.first)return fe(e.first,0);var n=e.first+e.size-1;return t.line>n?fe(n,Ci(e,n).text.length):function(e,t){var n=e.ch;return null==n||n>t?fe(e.line,t):n<0?fe(e.line,0):e}(t,Ci(e,t.line).text.length)}function je(e,t){return t>=e.first&&t<e.first+e.size}function Be(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=Fe(e,t[r]);return n}function He(e,t,n,r){if(e.cm&&e.cm.display.shift||e.extend){var i=t.anchor;if(r){var o=he(n,i)<0;o!=he(r,i)<0?(i=n,n=r):o!=he(n,r)<0&&(n=r)}return new Oe(i,n)}return new Oe(r||n,n)}function Ge(e,t,n,r){ze(e,new _e([He(e,e.sel.primary(),t,n)],0),r)}function Ue(e,t,n){for(var r=[],i=0;i<e.sel.ranges.length;i++)r[i]=He(e,e.sel.ranges[i],t[i],null);ze(e,De(r,e.sel.primIndex),n)}function Ve(e,t,n,r){var i=e.sel.ranges.slice(0);i[t]=n,ze(e,De(i,e.sel.primIndex),r)}function We(e,t,n,r){ze(e,Me(t,n),r)}function qe(e,t,n){var r=e.history.done,i=mo(r);i&&i.ranges?(r[r.length-1]=t,$e(e,t,n)):ze(e,t,n)}function ze(e,t,n){$e(e,t,n),function(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||function(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,o,mo(i.done),t))?i.done[i.done.length-1]=t:Di(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&_i(i.undone)}(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function $e(e,t,n){(ro(e,"beforeSelectionChange")||e.cm&&ro(e.cm,"beforeSelectionChange"))&&(t=function(e,t,n){var r={ranges:t.ranges,update:function(t){this.ranges=[];for(var n=0;n<t.length;n++)this.ranges[n]=new Oe(Fe(e,t[n].anchor),Fe(e,t[n].head))},origin:n&&n.origin};return Ki(e,"beforeSelectionChange",e,r),e.cm&&Ki(e.cm,"beforeSelectionChange",e.cm,r),r.ranges!=t.ranges?De(r.ranges,r.ranges.length-1):t}(e,t,n));var r=n&&n.bias||(he(t.primary().head,e.sel.primary().head)<0?-1:1);Xe(e,Ye(e,t,r,!0)),n&&!1===n.scroll||!e.cm||$n(e.cm)}function Xe(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=e.cm.curOp.selectionChanged=!0,no(e.cm)),Zi(e,"cursorActivity",e))}function Qe(e){Xe(e,Ye(e,e.sel,null,!1))}function Ye(e,t,n,r){for(var i,o=0;o<t.ranges.length;o++){var a=t.ranges[o],s=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],l=Je(e,a.anchor,s&&s.anchor,n,r),u=Je(e,a.head,s&&s.head,n,r);(i||l!=a.anchor||u!=a.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new Oe(l,u))}return i?De(i,t.primIndex):t}function Ke(e,t,n,r,i){var o=Ci(e,t.line);if(o.markedSpans)for(var a=0;a<o.markedSpans.length;++a){var s=o.markedSpans[a],l=s.marker;if((null==s.from||(l.inclusiveLeft?s.from<=t.ch:s.from<t.ch))&&(null==s.to||(l.inclusiveRight?s.to>=t.ch:s.to>t.ch))){if(i&&(Ki(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!l.atomic)continue;if(n){var u,c=l.find(r<0?1:-1);if((r<0?l.inclusiveRight:l.inclusiveLeft)&&(c=Ze(e,c,-r,c&&c.line==t.line?o:null)),c&&c.line==t.line&&(u=he(c,n))&&(r<0?u<0:u>0))return Ke(e,c,t,r,i)}var d=l.find(r<0?-1:1);return(r<0?l.inclusiveLeft:l.inclusiveRight)&&(d=Ze(e,d,r,d.line==t.line?o:null)),d?Ke(e,d,t,r,i):null}}return t}function Je(e,t,n,r,i){var o=r||1,a=Ke(e,t,n,o,i)||!i&&Ke(e,t,n,o,!0)||Ke(e,t,n,-o,i)||!i&&Ke(e,t,n,-o,!0);return a||(e.cantEdit=!0,fe(e.first,0))}function Ze(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?Fe(e,fe(t.line-1)):null:n>0&&t.ch==(r||Ci(e,t.line)).text.length?t.line<e.first+e.size-1?fe(t.line+1,0):null:new fe(t.line,t.ch+n)}function et(e){e.display.input.showSelection(e.display.input.prepareSelection())}function tt(e,t){for(var n=e.doc,r={},i=r.cursors=document.createDocumentFragment(),o=r.selection=document.createDocumentFragment(),a=0;a<n.sel.ranges.length;a++)if(!1!==t||a!=n.sel.primIndex){var s=n.sel.ranges[a];if(!(s.from().line>=e.display.viewTo||s.to().line<e.display.viewFrom)){var l=s.empty();(l||e.options.showCursorWhenSelecting)&&nt(e,s.head,i),l||rt(e,s,o)}}return r}function nt(e,t,n){var r=kt(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=n.appendChild(ko("div"," ","CodeMirror-cursor"));if(i.style.left=r.left+"px",i.style.top=r.top+"px",i.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+"px",r.other){var o=n.appendChild(ko("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));o.style.display="",o.style.left=r.other.left+"px",o.style.top=r.other.top+"px",o.style.height=.85*(r.other.bottom-r.other.top)+"px"}}function rt(e,t,n){var r=e.display,i=e.doc,o=document.createDocumentFragment(),a=ct(e.display),s=a.left,l=Math.max(r.sizerWidth,pt(e)-r.sizer.offsetLeft)-a.right;function u(e,t,n,r){t<0&&(t=0),t=Math.round(t),r=Math.round(r),o.appendChild(ko("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px; top: "+t+"px; width: "+(null==n?l-e:n)+"px; height: "+(r-t)+"px"))}function c(t,n,r){var o,a,c=Ci(i,t),d=c.text.length;function p(n,r){return Rt(e,fe(t,n),"div",c,r)}return function(e,t,n,r){if(!e)return r(t,n,"ltr");for(var i=!1,o=0;o<e.length;++o){var a=e[o];(a.from<n&&a.to>t||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr"),i=!0)}i||r(t,n,"ltr")}(Ii(c),n||0,null==r?d:r,(function(e,t,i){var c,f,h,g=p(e,"left");if(e==t)c=g,f=h=g.left;else{if(c=p(t-1,"right"),"rtl"==i){var m=g;g=c,c=m}f=g.left,h=c.right}null==n&&0==e&&(f=s),c.top-g.top>3&&(u(f,g.top,null,g.bottom),f=s,g.bottom<c.top&&u(f,g.bottom,null,c.top)),null==r&&t==d&&(h=l),(!o||g.top<o.top||g.top==o.top&&g.left<o.left)&&(o=g),(!a||c.bottom>a.bottom||c.bottom==a.bottom&&c.right>a.right)&&(a=c),f<s+1&&(f=s),u(f,c.top,h-f,c.bottom)})),{start:o,end:a}}var d=t.from(),p=t.to();if(d.line==p.line)c(d.line,d.ch,p.ch);else{var f=Ci(i,d.line),h=Ci(i,p.line),g=Hr(f)==Hr(h),m=c(d.line,d.ch,g?f.text.length+1:null).end,v=c(p.line,g?0:null,p.ch).start;g&&(m.top<v.top-2?(u(m.right,m.top,null,m.bottom),u(s,v.top,v.left,v.bottom)):u(m.right,m.top,v.left-m.right,m.bottom)),m.bottom<v.top&&u(s,m.bottom,null,v.top)}n.appendChild(o)}function it(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval((function(){t.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function ot(e,t){e.doc.mode.startState&&e.doc.frontier<e.display.viewTo&&e.state.highlight.set(t,To(at,e))}function at(e){var t=e.doc;if(t.frontier<t.first&&(t.frontier=t.first),!(t.frontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,r=ur(t.mode,st(e,t.frontier)),i=[];t.iter(t.frontier,Math.min(t.first+t.size,e.display.viewTo+500),(function(o){if(t.frontier>=e.display.viewFrom){var a=o.styles,s=o.text.length>e.options.maxHighlightLength,l=ti(e,o,s?ur(t.mode,r):r,!0);o.styles=l.styles;var u=o.styleClasses,c=l.classes;c?o.styleClasses=c:u&&(o.styleClasses=null);for(var d=!a||a.length!=o.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),p=0;!d&&p<a.length;++p)d=a[p]!=o.styles[p];d&&i.push(t.frontier),o.stateAfter=s?r:ur(t.mode,r)}else o.text.length<=e.options.maxHighlightLength&&ri(e,o.text,r),o.stateAfter=t.frontier%5==0?ur(t.mode,r):null;if(++t.frontier,+new Date>n)return ot(e,e.options.workDelay),!0})),i.length&&Qt(e,(function(){for(var t=0;t<i.length;t++)nn(e,i[t],"text")}))}}function st(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return!0;var o=function(e,t,n){for(var r,i,o=e.doc,a=n?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>a;--s){if(s<=o.first)return o.first;var l=Ci(o,s-1);if(l.stateAfter&&(!n||s<=o.frontier))return s;var u=po(l.text,null,e.options.tabSize);(null==i||r>u)&&(i=s-1,r=u)}return i}(e,t,n),a=o>r.first&&Ci(r,o-1).stateAfter;return a=a?ur(r.mode,a):cr(r.mode),r.iter(o,t,(function(n){ri(e,n.text,a);var s=o==t-1||o%5==0||o>=i.viewFrom&&o<i.viewTo;n.stateAfter=s?ur(r.mode,a):null,++o})),n&&(r.frontier=o),a}function lt(e){return e.lineSpace.offsetTop}function ut(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function ct(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=Oo(e.measure,ko("pre","x")),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return isNaN(r.left)||isNaN(r.right)||(e.cachedPaddingH=r),r}function dt(e){return oo-e.display.nativeBarWidth}function pt(e){return e.display.scroller.clientWidth-dt(e)-e.display.barWidth}function ft(e){return e.display.scroller.clientHeight-dt(e)-e.display.barHeight}function ht(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;r<e.rest.length;r++)if(e.rest[r]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(r=0;r<e.rest.length;r++)if(Ni(e.rest[r])>n)return{map:e.measure.maps[r],cache:e.measure.caches[r],before:!0}}function gt(e,t,n,r){return yt(e,vt(e,t),n,r)}function mt(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[on(e,t)];var n=e.display.externalMeasured;return n&&t>=n.lineN&&t<n.lineN+n.size?n:void 0}function vt(e,t){var n=Ni(t),r=mt(e,n);r&&!r.text?r=null:r&&r.changes&&(ne(e,r,n,te(e)),e.curOp.forceUpdate=!0),r||(r=function(e,t){var n=Ni(t=Hr(t)),r=e.display.externalMeasured=new Zt(e.doc,t,n);r.lineN=n;var i=r.built=si(e,r);return r.text=i.pre,Oo(e.display.lineMeasure,i.pre),r}(e,t));var i=ht(r,t,n);return{line:t,view:r,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function yt(e,t,n,r,i){t.before&&(n=-1);var s,l=n+(r||"");return t.cache.hasOwnProperty(l)?s=t.cache[l]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(function(e,t,n){var r=e.options.lineWrapping,i=r&&pt(e);if(!t.measure.heights||r&&t.measure.width!=i){var o=t.measure.heights=[];if(r){t.measure.width=i;for(var a=t.text.firstChild.getClientRects(),s=0;s<a.length-1;s++){var l=a[s],u=a[s+1];Math.abs(l.bottom-u.bottom)>2&&o.push((l.bottom+u.top)/2-n.top)}}o.push(n.bottom-n.top)}}(e,t.view,t.rect),t.hasHeights=!0),(s=function(e,t,n,r){var i,s=Et(t.map,n,r),l=s.node,u=s.start,c=s.end,d=s.collapse;if(3==l.nodeType){for(var p=0;p<4;p++){for(;u&&Ro(t.line.text.charAt(s.coverStart+u));)--u;for(;s.coverStart+c<s.coverEnd&&Ro(t.line.text.charAt(s.coverStart+c));)++c;if((i=o&&a<9&&0==u&&c==s.coverEnd-s.coverStart?l.parentNode.getBoundingClientRect():Ct(Ao(l,u,c).getClientRects(),r)).left||i.right||0==u)break;c=u,u-=1,d="right"}o&&a<11&&(i=function(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!function(e){if(null!=Jo)return Jo;var t=Oo(e,ko("span","x")),n=t.getBoundingClientRect(),r=Ao(t,0,1).getBoundingClientRect();return Jo=Math.abs(n.left-r.left)>1}(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}(e.display.measure,i))}else{var f;u>0&&(d=r="right"),i=e.options.lineWrapping&&(f=l.getClientRects()).length>1?f["right"==r?f.length-1:0]:l.getBoundingClientRect()}if(o&&a<9&&!u&&(!i||!i.left&&!i.right)){var h=l.parentNode.getClientRects()[0];i=h?{left:h.left,right:h.left+Ft(e.display),top:h.top,bottom:h.bottom}:bt}var g=i.top-t.rect.top,m=i.bottom-t.rect.top,v=(g+m)/2,y=t.view.measure.heights;for(p=0;p<y.length-1&&!(v<y[p]);p++);var x=p?y[p-1]:0,b=y[p],E={left:("right"==d?i.right:i.left)-t.rect.left,right:("left"==d?i.left:i.right)-t.rect.left,top:x,bottom:b};return i.left||i.right||(E.bogus=!0),e.options.singleCursorHeightPerLine||(E.rtop=g,E.rbottom=m),E}(e,t,n,r)).bogus||(t.cache[l]=s)),{left:s.left,right:s.right,top:i?s.rtop:s.top,bottom:i?s.rbottom:s.bottom}}we.prototype=Co({init:function(e){var t=this,n=this.cm,r=this.wrapper=Ne(),i=this.textarea=r.firstChild;function s(e){if(!to(n,e)){if(n.somethingSelected())xe={lineWise:!1,text:n.getSelections()},t.inaccurateSelection&&(t.prevInput="",t.inaccurateSelection=!1,i.value=xe.text.join("\n"),vo(i));else{if(!n.options.lineWiseCopyCut)return;var r=Te(n);xe={lineWise:!0,text:r.text},"cut"==e.type?n.setSelections(r.ranges,null,so):(t.prevInput="",i.value=r.text.join("\n"),vo(i))}"cut"==e.type&&(n.state.cutIncoming=!0)}}e.wrapper.insertBefore(r,e.wrapper.firstChild),h&&(i.style.width="0px"),$i(i,"input",(function(){o&&a>=9&&t.hasSelection&&(t.hasSelection=null),t.poll()})),$i(i,"paste",(function(e){to(n,e)||Ee(e,n)||(n.state.pasteIncoming=!0,t.fastPoll())})),$i(i,"cut",s),$i(i,"copy",s),$i(e.scroller,"paste",(function(r){un(e,r)||to(n,r)||(n.state.pasteIncoming=!0,t.focus())})),$i(e.lineSpace,"selectstart",(function(t){un(e,t)||Gi(t)})),$i(i,"compositionstart",(function(){var e=n.getCursor("from");t.composing&&t.composing.range.clear(),t.composing={start:e,range:n.markText(e,n.getCursor("to"),{className:"CodeMirror-composing"})}})),$i(i,"compositionend",(function(){t.composing&&(t.poll(),t.composing.range.clear(),t.composing=null)}))},prepareSelection:function(){var e=this.cm,t=e.display,n=e.doc,r=tt(e);if(e.options.moveInputWithCursor){var i=kt(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return r},showSelection:function(e){var t=this.cm.display;Oo(t.cursorDiv,e.cursors),Oo(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},reset:function(e){if(!this.contextMenuPending){var t,n,r=this.cm,i=r.doc;if(r.somethingSelected()){this.prevInput="";var s=i.sel.primary(),l=(t=Ko&&(s.to().line-s.from().line>100||(n=r.getSelection()).length>1e3))?"-":n||r.getSelection();this.textarea.value=l,r.state.focused&&vo(this.textarea),o&&a>=9&&(this.hasSelection=l)}else e||(this.prevInput=this.textarea.value="",o&&a>=9&&(this.hasSelection=null));this.inaccurateSelection=t}},getField:function(){return this.textarea},supportsTouch:function(){return!1},focus:function(){if("nocursor"!=this.cm.options.readOnly&&(!g||Mo()!=this.textarea))try{this.textarea.focus()}catch(e){}},blur:function(){this.textarea.blur()},resetPosition:function(){this.wrapper.style.top=this.wrapper.style.left=0},receivedFocus:function(){this.slowPoll()},slowPoll:function(){var e=this;e.pollingFast||e.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},fastPoll:function(){var e=!1,t=this;t.pollingFast=!0,t.polling.set(20,(function n(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))}))},poll:function(){var e=this.cm,t=this.textarea,n=this.prevInput;if(this.contextMenuPending||!e.state.focused||Yo(t)&&!n&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var r=t.value;if(r==n&&!e.somethingSelected())return!1;if(o&&a>=9&&this.hasSelection===r||m&&/[\uf700-\uf7ff]/.test(r))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var i=r.charCodeAt(0);if(8203!=i||n||(n=""),8666==i)return this.reset(),this.cm.execCommand("undo")}for(var s=0,l=Math.min(n.length,r.length);s<l&&n.charCodeAt(s)==r.charCodeAt(s);)++s;var u=this;return Qt(e,(function(){be(e,r.slice(s),n.length-s,null,u.composing?"*compose":null),r.length>1e3||r.indexOf("\n")>-1?t.value=u.prevInput="":u.prevInput=r,u.composing&&(u.composing.range.clear(),u.composing.range=e.markText(u.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},ensurePolled:function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},onKeyPress:function(){o&&a>=9&&(this.hasSelection=null),this.fastPoll()},onContextMenu:function(e){var t=this,n=t.cm,r=n.display,i=t.textarea,l=cn(n,e),u=r.scroller.scrollTop;if(l&&!c){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(l)&&Yt(n,ze)(n.doc,Me(l),so);var d=i.style.cssText,p=t.wrapper.style.cssText;t.wrapper.style.cssText="position: absolute";var f=t.wrapper.getBoundingClientRect();if(i.style.cssText="position: absolute; width: 30px; height: 30px; top: "+(e.clientY-f.top-5)+"px; left: "+(e.clientX-f.left-5)+"px; z-index: 1000; background: "+(o?"rgba(255, 255, 255, .05)":"transparent")+"; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",s)var h=window.scrollY;if(r.input.focus(),s&&window.scrollTo(null,h),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=!0,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),o&&a>=9&&m(),E){Wi(e);var g=function(){Yi(window,"mouseup",g),setTimeout(v,20)};$i(window,"mouseup",g)}else setTimeout(v,50)}function m(){if(null!=i.selectionStart){var e=n.somethingSelected(),o=""+(e?i.value:"");i.value="⇚",i.value=o,t.prevInput=e?"":"",i.selectionStart=1,i.selectionEnd=o.length,r.selForContextMenu=n.doc.sel}}function v(){if(t.contextMenuPending=!1,t.wrapper.style.cssText=p,i.style.cssText=d,o&&a<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=u),null!=i.selectionStart){(!o||o&&a<9)&&m();var e=0,s=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&""==t.prevInput?Yt(n,dr.selectAll)(n):e++<10?r.detectingSelectAll=setTimeout(s,500):r.input.reset()};r.detectingSelectAll=setTimeout(s,200)}}},readOnlyChanged:function(e){e||this.reset()},setUneditable:bo,needsContentAttribute:!1},we.prototype),Le.prototype=Co({init:function(e){var t=this,n=t.cm,r=t.div=e.lineDiv;function i(e){if(!to(n,e)){if(n.somethingSelected())xe={lineWise:!1,text:n.getSelections()},"cut"==e.type&&n.replaceSelection("",null,"cut");else{if(!n.options.lineWiseCopyCut)return;var t=Te(n);xe={lineWise:!0,text:t.text},"cut"==e.type&&n.operation((function(){n.setSelections(t.ranges,0,so),n.replaceSelection("",null,"cut")}))}if(e.clipboardData&&!h)e.preventDefault(),e.clipboardData.clearData(),e.clipboardData.setData("text/plain",xe.text.join("\n"));else{var r=Ne(),i=r.firstChild;n.display.lineSpace.insertBefore(r,n.display.lineSpace.firstChild),i.value=xe.text.join("\n");var o=document.activeElement;vo(i),setTimeout((function(){n.display.lineSpace.removeChild(r),o.focus()}),50)}}}Se(r),$i(r,"paste",(function(e){to(n,e)||Ee(e,n)})),$i(r,"compositionstart",(function(e){var r=e.data;if(t.composing={sel:n.doc.sel,data:r,startData:r},r){var i=n.doc.sel.primary(),o=n.getLine(i.head.line).indexOf(r,Math.max(0,i.head.ch-r.length));o>-1&&o<=i.head.ch&&(t.composing.sel=Me(fe(i.head.line,o),fe(i.head.line,o+r.length)))}})),$i(r,"compositionupdate",(function(e){t.composing.data=e.data})),$i(r,"compositionend",(function(e){var n=t.composing;n&&(e.data==n.startData||/\u200b/.test(e.data)||(n.data=e.data),setTimeout((function(){n.handled||t.applyComposition(n),t.composing==n&&(t.composing=null)}),50))})),$i(r,"touchstart",(function(){t.forceCompositionEnd()})),$i(r,"input",(function(){t.composing||!n.isReadOnly()&&t.pollContent()||Qt(t.cm,(function(){tn(n)}))})),$i(r,"copy",i),$i(r,"cut",i)},prepareSelection:function(){var e=tt(this.cm,!1);return e.focus=this.cm.state.focused,e},showSelection:function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},showPrimarySelection:function(){var e=window.getSelection(),t=this.cm.doc.sel.primary(),r=Re(this.cm,e.anchorNode,e.anchorOffset),i=Re(this.cm,e.focusNode,e.focusOffset);if(!r||r.bad||!i||i.bad||0!=he(ve(r,i),t.from())||0!=he(me(r,i),t.to())){var o=Ae(this.cm,t.from()),a=Ae(this.cm,t.to());if(o||a){var s=this.cm.display.view,l=e.rangeCount&&e.getRangeAt(0);if(o){if(!a){var u=s[s.length-1].measure,c=u.maps?u.maps[u.maps.length-1]:u.map;a={node:c[c.length-1],offset:c[c.length-2]-c[c.length-3]}}}else o={node:s[0].measure.map[2],offset:0};try{var d=Ao(o.node,o.offset,a.offset,a.node)}catch(e){}d&&(!n&&this.cm.state.focused?(e.collapse(o.node,o.offset),d.collapsed||e.addRange(d)):(e.removeAllRanges(),e.addRange(d)),l&&null==e.anchorNode?e.addRange(l):n&&this.startGracePeriod()),this.rememberSelection()}}},startGracePeriod:function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout((function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation((function(){e.cm.curOp.selectionChanged=!0}))}),20)},showMultipleSelections:function(e){Oo(this.cm.display.cursorDiv,e.cursors),Oo(this.cm.display.selectionDiv,e.selection)},rememberSelection:function(){var e=window.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},selectionInEditor:function(){var e=window.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return Do(this.div,t)},focus:function(){"nocursor"!=this.cm.options.readOnly&&this.div.focus()},blur:function(){this.div.blur()},getField:function(){return this.div},supportsTouch:function(){return!0},receivedFocus:function(){var e=this;this.selectionInEditor()?this.pollSelection():Qt(this.cm,(function(){e.cm.curOp.selectionChanged=!0})),this.polling.set(this.cm.options.pollInterval,(function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))}))},selectionChanged:function(){var e=window.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},pollSelection:function(){if(!this.composing&&!this.gracePeriod&&this.selectionChanged()){var e=window.getSelection(),t=this.cm;this.rememberSelection();var n=Re(t,e.anchorNode,e.anchorOffset),r=Re(t,e.focusNode,e.focusOffset);n&&r&&Qt(t,(function(){ze(t.doc,Me(n,r),so),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)}))}},pollContent:function(){var e,t=this.cm,n=t.display,r=t.doc.sel.primary(),i=r.from(),o=r.to();if(i.line<n.viewFrom||o.line>n.viewTo-1)return!1;if(i.line==n.viewFrom||0==(e=on(t,i.line)))var a=Ni(n.view[0].line),s=n.view[0].node;else a=Ni(n.view[e].line),s=n.view[e-1].node.nextSibling;var l=on(t,o.line);if(l==n.view.length-1)var u=n.viewTo-1,c=n.lineDiv.lastChild;else u=Ni(n.view[l+1].line)-1,c=n.view[l+1].node.previousSibling;for(var d=t.doc.splitLines(function(e,t,n,r,i){var o="",a=!1,s=e.doc.lineSeparator();function l(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(null!=n)return""==n&&(n=t.textContent.replace(/\u200b/g,"")),void(o+=n);var u,c=t.getAttribute("cm-marker");if(c){var d=e.findMarks(fe(r,0),fe(i+1,0),(h=+c,function(e){return e.id==h}));return void(d.length&&(u=d[0].find())&&(o+=Ti(e.doc,u.from,u.to).join(s)))}if("false"==t.getAttribute("contenteditable"))return;for(var p=0;p<t.childNodes.length;p++)l(t.childNodes[p]);/^(pre|div|p)$/i.test(t.nodeName)&&(a=!0)}else if(3==t.nodeType){var f=t.nodeValue;if(!f)return;a&&(o+=s,a=!1),o+=f}var h}for(;l(t),t!=n;)t=t.nextSibling;return o}(t,s,c,a,u)),p=Ti(t.doc,fe(a,0),fe(u,Ci(t.doc,u).text.length));d.length>1&&p.length>1;)if(mo(d)==mo(p))d.pop(),p.pop(),u--;else{if(d[0]!=p[0])break;d.shift(),p.shift(),a++}for(var f=0,h=0,g=d[0],m=p[0],v=Math.min(g.length,m.length);f<v&&g.charCodeAt(f)==m.charCodeAt(f);)++f;for(var y=mo(d),x=mo(p),b=Math.min(y.length-(1==d.length?f:0),x.length-(1==p.length?f:0));h<b&&y.charCodeAt(y.length-h-1)==x.charCodeAt(x.length-h-1);)++h;d[d.length-1]=y.slice(0,y.length-h),d[0]=d[0].slice(f);var E=fe(a,f),C=fe(u,p.length?mo(p).length-h:0);return d.length>1||d[0]||he(E,C)?(Wn(t.doc,d,E,C,"+input"),!0):void 0},ensurePolled:function(){this.forceCompositionEnd()},reset:function(){this.forceCompositionEnd()},forceCompositionEnd:function(){this.composing&&!this.composing.handled&&(this.applyComposition(this.composing),this.composing.handled=!0,this.div.blur(),this.div.focus())},applyComposition:function(e){this.cm.isReadOnly()?Yt(this.cm,tn)(this.cm):e.data&&e.data!=e.startData&&Yt(this.cm,be)(this.cm,e.data,0,e.sel)},setUneditable:function(e){e.contentEditable="false"},onKeyPress:function(e){e.preventDefault(),this.cm.isReadOnly()||Yt(this.cm,be)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0)},readOnlyChanged:function(e){this.div.contentEditable=String("nocursor"!=e)},onContextMenu:bo,resetPosition:bo,needsContentAttribute:!0},Le.prototype),S.inputStyles={textarea:we,contenteditable:Le},_e.prototype={primary:function(){return this.ranges[this.primIndex]},equals:function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var n=this.ranges[t],r=e.ranges[t];if(0!=he(n.anchor,r.anchor)||0!=he(n.head,r.head))return!1}return!0},deepCopy:function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Oe(ge(this.ranges[t].anchor),ge(this.ranges[t].head));return new _e(e,this.primIndex)},somethingSelected:function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},contains:function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(he(t,r.from())>=0&&he(e,r.to())<=0)return n}return-1}},Oe.prototype={from:function(){return ve(this.anchor,this.head)},to:function(){return me(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}};var xt,bt={left:0,right:0,top:0,bottom:0};function Et(e,t,n){for(var r,i,o,a,s=0;s<e.length;s+=3){var l=e[s],u=e[s+1];if(t<l?(i=0,o=1,a="left"):t<u?o=1+(i=t-l):(s==e.length-3||t==u&&e[s+3]>t)&&(i=(o=u-l)-1,t>=u&&(a="right")),null!=i){if(r=e[s+2],l==u&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==i)for(;s&&e[s-2]==e[s-3]&&e[s-1].insertLeft;)r=e[2+(s-=3)],a="left";if("right"==n&&i==u-l)for(;s<e.length-3&&e[s+3]==e[s+4]&&!e[s+5].insertLeft;)r=e[(s+=3)+2],a="right";break}}return{node:r,start:i,end:o,collapse:a,coverStart:l,coverEnd:u}}function Ct(e,t){var n=bt;if("left"==t)for(var r=0;r<e.length&&(n=e[r]).left==n.right;r++);else for(r=e.length-1;r>=0&&(n=e[r]).left==n.right;r--);return n}function Tt(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function St(e){e.display.externalMeasure=null,_o(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Tt(e.display.view[t])}function wt(e){St(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Nt(){return window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Lt(){return window.pageYOffset||(document.documentElement||document.body).scrollTop}function At(e,t,n,r){if(t.widgets)for(var i=0;i<t.widgets.length;++i)if(t.widgets[i].above){var o=$r(t.widgets[i]);n.top+=o,n.bottom+=o}if("line"==r)return n;r||(r="local");var a=Ai(t);if("local"==r?a+=lt(e.display):a-=e.display.viewOffset,"page"==r||"window"==r){var s=e.display.lineSpace.getBoundingClientRect();a+=s.top+("window"==r?0:Lt());var l=s.left+("window"==r?0:Nt());n.left+=l,n.right+=l}return n.top+=a,n.bottom+=a,n}function It(e,t,n){if("div"==n)return t;var r=t.left,i=t.top;if("page"==n)r-=Nt(),i-=Lt();else if("local"==n||!n){var o=e.display.sizer.getBoundingClientRect();r+=o.left,i+=o.top}var a=e.display.lineSpace.getBoundingClientRect();return{left:r-a.left,top:i-a.top}}function Rt(e,t,n,r,i){return r||(r=Ci(e.doc,t.line)),At(e,r,gt(e,r,t.ch,i),n)}function kt(e,t,n,r,i,o){function a(t,a){var s=yt(e,i,t,a?"right":"left",o);return a?s.left=s.right:s.right=s.left,At(e,r,s,n)}function s(e,t){var n=l[t],r=n.level%2;return e==ea(n)&&t&&n.level<l[t-1].level?(e=ta(n=l[--t])-(n.level%2?0:1),r=!0):e==ta(n)&&t<l.length-1&&n.level<l[t+1].level&&(e=ea(n=l[++t])-n.level%2,r=!1),r&&e==n.to&&e>n.from?a(e-1):a(e,r)}r=r||Ci(e.doc,t.line),i||(i=vt(e,r));var l=Ii(r),u=t.ch;if(!l)return a(u);var c=s(u,sa(l,u));return null!=Xo&&(c.other=s(u,Xo)),c}function _t(e,t){var n=0;t=Fe(e.doc,t),e.options.lineWrapping||(n=Ft(e.display)*t.ch);var r=Ci(e.doc,t.line),i=Ai(r)+lt(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Ot(e,t,n,r){var i=fe(e,t);return i.xRel=r,n&&(i.outside=!0),i}function Dt(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return Ot(r.first,0,!0,-1);var i=Li(r,n),o=r.first+r.size-1;if(i>o)return Ot(r.first+r.size-1,Ci(r,o).text.length,!0,1);t<0&&(t=0);for(var a=Ci(r,i);;){var s=Mt(e,a,i,t,n),l=jr(a),u=l&&l.find(0,!0);if(!l||!(s.ch>u.from.ch||s.ch==u.from.ch&&s.xRel>0))return s;i=Ni(a=u.to.line)}}function Mt(e,t,n,r,i){var o=i-Ai(t),a=!1,s=2*e.display.wrapper.clientWidth,l=vt(e,t);function u(r){var i=kt(e,fe(n,r),"line",t,l);return a=!0,o>i.bottom?i.left-s:o<i.top?i.left+s:(a=!1,i.left)}var c=Ii(t),d=t.text.length,p=na(t),f=ra(t),h=u(p),g=a,m=u(f),v=a;if(r>m)return Ot(n,f,v,1);for(;;){if(c?f==p||f==ua(t,p,1):f-p<=1){var y=r<h||r-h<=m-r?p:f,x=y==p?g:v,b=r-(y==p?h:m);if(v&&!c&&!/\s/.test(t.text.charAt(y))&&b>0&&y<t.text.length&&l.view.measure.heights.length>1){var E=yt(e,l,y,"right");o<=E.bottom&&o>=E.top&&Math.abs(r-E.right)<b&&(x=!1,y++,b=r-E.right)}for(;Ro(t.text.charAt(y));)++y;return Ot(n,y,x,b<-1?-1:b>1?1:0)}var C=Math.ceil(d/2),T=p+C;if(c){T=p;for(var S=0;S<C;++S)T=ua(t,T,1)}var w=u(T);w>r?(f=T,m=w,(v=a)&&(m+=1e3),d=C):(p=T,h=w,g=a,d-=C)}}function Pt(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==xt){xt=ko("pre");for(var t=0;t<49;++t)xt.appendChild(document.createTextNode("x")),xt.appendChild(ko("br"));xt.appendChild(document.createTextNode("x"))}Oo(e.measure,xt);var n=xt.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),_o(e.measure),n||1}function Ft(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=ko("span","xxxxxxxxxx"),n=ko("pre",[t]);Oo(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}var jt,Bt,Ht=null,Gt=0;function Ut(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Gt},Ht?Ht.ops.push(e.curOp):e.curOp.ownsGroup=Ht={ops:[e.curOp],delayedCallbacks:[]}}function Vt(e){var t=e.curOp.ownsGroup;if(t)try{!function(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var r=0;r<e.ops.length;r++){var i=e.ops[r];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(n<t.length)}(t)}finally{Ht=null;for(var n=0;n<t.ops.length;n++)t.ops[n].cm.curOp=null;!function(e){for(var t=e.ops,n=0;n<t.length;n++)Wt(t[n]);for(n=0;n<t.length;n++)qt(t[n]);for(n=0;n<t.length;n++)zt(t[n]);for(n=0;n<t.length;n++)$t(t[n]);for(n=0;n<t.length;n++)Xt(t[n])}(t)}}function Wt(e){var t=e.cm,n=t.display;!function(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=dt(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=dt(e)+"px",t.scrollbarsClipped=!0)}(t),e.updateMaxLine&&M(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new X(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function qt(e){e.updatedDisplay=e.mustUpdate&&Q(e.cm,e.update)}function zt(e){var t=e.cm,n=t.display;e.updatedDisplay&&Z(t),e.barMeasure=F(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=gt(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+dt(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-pt(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection(e.focus))}function $t(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&yn(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==Mo()&&(!document.hasFocus||document.hasFocus());e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&G(t,e.barMeasure),e.updatedDisplay&&J(t,e.barMeasure),e.selectionChanged&&it(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&ye(e.cm)}function Xt(e){var t=e.cm,n=t.display,r=t.doc;if(e.updatedDisplay&&Y(t,e.update),null==n.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(n.wheelStartX=n.wheelStartY=null),null==e.scrollTop||n.scroller.scrollTop==e.scrollTop&&!e.forceScroll||(r.scrollTop=Math.max(0,Math.min(n.scroller.scrollHeight-n.scroller.clientHeight,e.scrollTop)),n.scrollbars.setScrollTop(r.scrollTop),n.scroller.scrollTop=r.scrollTop),null==e.scrollLeft||n.scroller.scrollLeft==e.scrollLeft&&!e.forceScroll||(r.scrollLeft=Math.max(0,Math.min(n.scroller.scrollWidth-n.scroller.clientWidth,e.scrollLeft)),n.scrollbars.setScrollLeft(r.scrollLeft),n.scroller.scrollLeft=r.scrollLeft,W(t)),e.scrollToPos){var i=function(e,t,n,r){null==r&&(r=0);for(var i=0;i<5;i++){var o=!1,a=kt(e,t),s=n&&n!=t?kt(e,n):a,l=qn(e,Math.min(a.left,s.left),Math.min(a.top,s.top)-r,Math.max(a.left,s.left),Math.max(a.bottom,s.bottom)+r),u=e.doc.scrollTop,c=e.doc.scrollLeft;if(null!=l.scrollTop&&(vn(e,l.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(o=!0)),null!=l.scrollLeft&&(yn(e,l.scrollLeft),Math.abs(e.doc.scrollLeft-c)>1&&(o=!0)),!o)break}return a}(t,Fe(r,e.scrollToPos.from),Fe(r,e.scrollToPos.to),e.scrollToPos.margin);e.scrollToPos.isCursor&&t.state.focused&&function(e,t){if(!to(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null;if(t.top+r.top<0?i=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!f){var o=ko("div","",null,"position: absolute; top: "+(t.top-n.viewOffset-lt(e.display))+"px; height: "+(t.bottom-t.top+dt(e)+n.barHeight)+"px; left: "+t.left+"px; width: 2px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}(t,i)}var o=e.maybeHiddenMarkers,a=e.maybeUnhiddenMarkers;if(o)for(var s=0;s<o.length;++s)o[s].lines.length||Ki(o[s],"hide");if(a)for(s=0;s<a.length;++s)a[s].lines.length&&Ki(a[s],"unhide");n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Ki(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Qt(e,t){if(e.curOp)return t();Ut(e);try{return t()}finally{Vt(e)}}function Yt(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Ut(e);try{return t.apply(e,arguments)}finally{Vt(e)}}}function Kt(e){return function(){if(this.curOp)return e.apply(this,arguments);Ut(this);try{return e.apply(this,arguments)}finally{Vt(this)}}}function Jt(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Ut(t);try{return e.apply(this,arguments)}finally{Vt(t)}}}function Zt(e,t,n){this.line=t,this.rest=function(e){for(var t,n;t=jr(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}(t),this.size=this.rest?Ni(mo(this.rest))-n+1:1,this.node=this.text=null,this.hidden=Vr(e,t)}function en(e,t,n){for(var r,i=[],o=t;o<n;o=r){var a=new Zt(e.doc,Ci(e.doc,o),o);r=o+a.size,i.push(a)}return i}function tn(e,t,n,r){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),r||(r=0);var i=e.display;if(r&&n<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)T&&Gr(e.doc,t)<i.viewTo&&rn(e);else if(n<=i.viewFrom)T&&Ur(e.doc,n+r)>i.viewFrom?rn(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)rn(e);else if(t<=i.viewFrom)(o=an(e,n,n+r,1))?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):rn(e);else if(n>=i.viewTo){var o;(o=an(e,t,t,-1))?(i.view=i.view.slice(0,o.index),i.viewTo=o.lineN):rn(e)}else{var a=an(e,t,t,-1),s=an(e,n,n+r,1);a&&s?(i.view=i.view.slice(0,a.index).concat(en(e,a.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=r):rn(e)}var l=i.externalMeasured;l&&(n<l.lineN?l.lineN+=r:t<l.lineN+l.size&&(i.externalMeasured=null))}function nn(e,t,n){e.curOp.viewChanged=!0;var r=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(r.externalMeasured=null),!(t<r.viewFrom||t>=r.viewTo)){var o=r.view[on(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==yo(a,n)&&a.push(n)}}}function rn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function on(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;r<n.length;r++)if((t-=n[r].size)<0)return r}function an(e,t,n,r){var i,o=on(e,t),a=e.display.view;if(!T||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var s=0,l=e.display.viewFrom;s<o;s++)l+=a[s].size;if(l!=t){if(r>0){if(o==a.length-1)return null;i=l+a[o].size-t,o++}else i=l-t;t+=i,n+=i}for(;Gr(e.doc,n)!=n;){if(o==(r<0?0:a.length-1))return null;n+=r*a[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function sn(e){for(var t=e.display.view,n=0,r=0;r<t.length;r++){var i=t[r];i.hidden||i.node&&!i.changes||++n}return n}function ln(e){var t=e.display;t.lastWrapHeight==t.wrapper.clientHeight&&t.lastWrapWidth==t.wrapper.clientWidth||(t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize())}function un(e,t){for(var n=qi(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function cn(e,t,n,r){var i=e.display;if(!n&&"true"==qi(t).getAttribute("cm-not-content"))return null;var o,a,s=i.lineSpace.getBoundingClientRect();try{o=t.clientX-s.left,a=t.clientY-s.top}catch(t){return null}var l,u=Dt(e,o,a);if(r&&1==u.xRel&&(l=Ci(e.doc,u.line).text).length==u.ch){var c=po(l,l.length,e.options.tabSize)-l.length;u=fe(u.line,Math.max(0,Math.round((o-ct(e.display).left)/Ft(e.display))-c))}return u}function dn(e){var t=this,n=t.display;if(!(to(t,e)||n.activeTouch&&n.input.supportsTouch()))if(n.shift=e.shiftKey,un(n,e))s||(n.scroller.draggable=!1,setTimeout((function(){n.scroller.draggable=!0}),100));else if(!fn(t,e)){var r=cn(t,e);switch(window.focus(),zi(e)){case 1:t.state.selectingText?t.state.selectingText(e):r?function(e,t,n){o?setTimeout(To(ye,e),0):e.curOp.focus=Mo();var r,i=+new Date;Bt&&Bt.time>i-400&&0==he(Bt.pos,n)?r="triple":jt&&jt.time>i-400&&0==he(jt.pos,n)?(r="double",Bt={time:i,pos:n}):(r="single",jt={time:i,pos:n});var l,u=e.doc.sel,c=m?t.metaKey:t.ctrlKey;e.options.dragDrop&&Wo&&!e.isReadOnly()&&"single"==r&&(l=u.contains(n))>-1&&(he((l=u.ranges[l]).from(),n)<0||n.xRel>0)&&(he(l.to(),n)>0||n.xRel<0)?function(e,t,n,r){var i=e.display,l=+new Date,u=Yt(e,(function(c){s&&(i.scroller.draggable=!1),e.state.draggingText=!1,Yi(document,"mouseup",u),Yi(i.scroller,"drop",u),Math.abs(t.clientX-c.clientX)+Math.abs(t.clientY-c.clientY)<10&&(Gi(c),!r&&+new Date-200<l&&Ge(e.doc,n),s||o&&9==a?setTimeout((function(){document.body.focus(),i.input.focus()}),20):i.input.focus())}));s&&(i.scroller.draggable=!0),e.state.draggingText=u,u.copy=m?t.altKey:t.ctrlKey,i.scroller.dragDrop&&i.scroller.dragDrop(),$i(document,"mouseup",u),$i(i.scroller,"drop",u)}(e,t,n,c):function(e,t,n,r,i){var o=e.display,a=e.doc;Gi(t);var s,l,u=a.sel,c=u.ranges;if(i&&!t.shiftKey?(l=a.sel.contains(n),s=l>-1?c[l]:new Oe(n,n)):(s=a.sel.primary(),l=a.sel.primIndex),v?t.shiftKey&&t.metaKey:t.altKey)r="rect",i||(s=new Oe(n,n)),n=cn(e,t,!0,!0),l=-1;else if("double"==r){var d=e.findWordAt(n);s=e.display.shift||a.extend?He(a,s,d.anchor,d.head):d}else if("triple"==r){var p=new Oe(fe(n.line,0),Fe(a,fe(n.line+1,0)));s=e.display.shift||a.extend?He(a,s,p.anchor,p.head):p}else s=He(a,s,n);i?-1==l?(l=c.length,ze(a,De(c.concat([s]),l),{scroll:!1,origin:"*mouse"})):c.length>1&&c[l].empty()&&"single"==r&&!t.shiftKey?(ze(a,De(c.slice(0,l).concat(c.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),u=a.sel):Ve(a,l,s,lo):(l=0,ze(a,new _e([s],0),lo),u=a.sel);var f=n,h=o.wrapper.getBoundingClientRect(),g=0;function m(t){var i=++g,c=cn(e,t,!0,"rect"==r);if(c)if(0!=he(c,f)){e.curOp.focus=Mo(),function(t){if(0!=he(f,t))if(f=t,"rect"==r){for(var i=[],o=e.options.tabSize,c=po(Ci(a,n.line).text,n.ch,o),d=po(Ci(a,t.line).text,t.ch,o),p=Math.min(c,d),h=Math.max(c,d),g=Math.min(n.line,t.line),m=Math.min(e.lastLine(),Math.max(n.line,t.line));g<=m;g++){var v=Ci(a,g).text,y=fo(v,p,o);p==h?i.push(new Oe(fe(g,y),fe(g,y))):v.length>y&&i.push(new Oe(fe(g,y),fe(g,fo(v,h,o))))}i.length||i.push(new Oe(n,n)),ze(a,De(u.ranges.slice(0,l).concat(i),l),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var x=s,b=x.anchor,E=t;if("single"!=r){if("double"==r)var C=e.findWordAt(t);else C=new Oe(fe(t.line,0),Fe(a,fe(t.line+1,0)));he(C.anchor,b)>0?(E=C.head,b=ve(x.from(),C.anchor)):(E=C.anchor,b=me(x.to(),C.head))}(i=u.ranges.slice(0))[l]=new Oe(Fe(a,b),E),ze(a,De(i,l),lo)}}(c);var d=V(o,a);(c.line>=d.to||c.line<d.from)&&setTimeout(Yt(e,(function(){g==i&&m(t)})),150)}else{var p=t.clientY<h.top?-20:t.clientY>h.bottom?20:0;p&&setTimeout(Yt(e,(function(){g==i&&(o.scroller.scrollTop+=p,m(t))})),50)}}function y(t){e.state.selectingText=!1,g=1/0,Gi(t),o.input.focus(),Yi(document,"mousemove",x),Yi(document,"mouseup",b),a.history.lastSelOrigin=null}var x=Yt(e,(function(e){zi(e)?m(e):y(e)})),b=Yt(e,y);e.state.selectingText=b,$i(document,"mousemove",x),$i(document,"mouseup",b)}(e,t,n,r,c)}(t,e,r):qi(e)==n.scroller&&Gi(e);break;case 2:s&&(t.state.lastMiddleDown=+new Date),r&&Ge(t.doc,r),setTimeout((function(){n.input.focus()}),20),Gi(e);break;case 3:E?On(t,e):function(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,_n(e))}),100)}(t)}}}function pn(e,t,n,r){try{var i=t.clientX,o=t.clientY}catch(t){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&Gi(t);var a=e.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!ro(e,n))return Vi(t);o-=s.top-a.viewOffset;for(var l=0;l<e.options.gutters.length;++l){var u=a.gutters.childNodes[l];if(u&&u.getBoundingClientRect().right>=i){var c=Li(e.doc,o),d=e.options.gutters[l];return Ki(e,n,e,c,d,t),Vi(t)}}}function fn(e,t){return pn(e,t,"gutterClick",!0)}var hn=0;function gn(e){var t=this;if(mn(t),!to(t,e)&&!un(t.display,e)){Gi(e),o&&(hn=+new Date);var n=cn(t,e,!0),r=e.dataTransfer.files;if(n&&!t.isReadOnly())if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,a=Array(i),s=0,l=function(e,r){if(!t.options.allowDropFileTypes||-1!=yo(t.options.allowDropFileTypes,e.type)){var o=new FileReader;o.onload=Yt(t,(function(){var e=o.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(e)&&(e=""),a[r]=e,++s==i){var l={from:n=Fe(t.doc,n),to:n,text:t.doc.splitLines(a.join(t.doc.lineSeparator())),origin:"paste"};Bn(t.doc,l),qe(t.doc,Me(n,Dn(l)))}})),o.readAsText(e)}},u=0;u<i;++u)l(r[u],u);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1)return t.state.draggingText(e),void setTimeout((function(){t.display.input.focus()}),20);try{if(a=e.dataTransfer.getData("Text")){if(t.state.draggingText&&!t.state.draggingText.copy)var c=t.listSelections();if($e(t.doc,Me(n,n)),c)for(u=0;u<c.length;++u)Wn(t.doc,"",c[u].anchor,c[u].head,"drag");t.replaceSelection(a,"around","paste"),t.display.input.focus()}}catch(e){}}}}function mn(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function vn(e,t){Math.abs(e.doc.scrollTop-t)<2||(e.doc.scrollTop=t,n||K(e,{top:t}),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t),e.display.scrollbars.setScrollTop(t),n&&K(e),ot(e,100))}function yn(e,t,n){(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)||(t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),e.doc.scrollLeft=t,W(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}var xn=0,bn=null;o?bn=-.53:n?bn=15:u?bn=-.7:d&&(bn=-1/3);var En=function(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}};function Cn(e,t){var r=En(t),i=r.x,o=r.y,a=e.display,l=a.scroller,u=l.scrollWidth>l.clientWidth,d=l.scrollHeight>l.clientHeight;if(i&&u||o&&d){if(o&&m&&s)e:for(var p=t.target,f=a.view;p!=l;p=p.parentNode)for(var h=0;h<f.length;h++)if(f[h].node==p){e.display.currentWheelTarget=p;break e}if(i&&!n&&!c&&null!=bn)return o&&d&&vn(e,Math.max(0,Math.min(l.scrollTop+o*bn,l.scrollHeight-l.clientHeight))),yn(e,Math.max(0,Math.min(l.scrollLeft+i*bn,l.scrollWidth-l.clientWidth))),(!o||o&&d)&&Gi(t),void(a.wheelStartX=null);if(o&&null!=bn){var g=o*bn,v=e.doc.scrollTop,y=v+a.wrapper.clientHeight;g<0?v=Math.max(0,v+g-50):y=Math.min(e.doc.height,y+g+50),K(e,{top:v,bottom:y})}xn<20&&(null==a.wheelStartX?(a.wheelStartX=l.scrollLeft,a.wheelStartY=l.scrollTop,a.wheelDX=i,a.wheelDY=o,setTimeout((function(){if(null!=a.wheelStartX){var e=l.scrollLeft-a.wheelStartX,t=l.scrollTop-a.wheelStartY,n=t&&a.wheelDY&&t/a.wheelDY||e&&a.wheelDX&&e/a.wheelDX;a.wheelStartX=a.wheelStartY=null,n&&(bn=(bn*xn+n)/(xn+1),++xn)}}),200)):(a.wheelDX+=i,a.wheelDY+=o))}}function Tn(e,t,n){if("string"==typeof t&&!(t=dr[t]))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=ao}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}S.wheelEventPixels=function(e){var t=En(e);return t.x*=bn,t.y*=bn,t};var Sn=new co;function wn(e,t,n,r){var i=e.state.keySeq;if(i){if(gr(t))return"handled";Sn.set(50,(function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())})),t=i+" "+t}var o=function(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var i=hr(t,e.state.keyMaps[r],n,e);if(i)return i}return e.options.extraKeys&&hr(t,e.options.extraKeys,n,e)||hr(t,e.options.keyMap,n,e)}(e,t,r);return"multi"==o&&(e.state.keySeq=t),"handled"==o&&Zi(e,"keyHandled",e,t,n),"handled"!=o&&"multi"!=o||(Gi(n),it(e)),i&&!o&&/\'$/.test(t)?(Gi(n),!0):!!o}function Nn(e,t){var n=mr(t,!0);return!!n&&(t.shiftKey&&!e.state.keySeq?wn(e,"Shift-"+n,t,(function(t){return Tn(e,t,!0)}))||wn(e,n,t,(function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return Tn(e,t)})):wn(e,n,t,(function(t){return Tn(e,t)})))}var Ln=null;function An(e){var t=this;if(t.curOp.focus=Mo(),!to(t,e)){o&&a<11&&27==e.keyCode&&(e.returnValue=!1);var n=e.keyCode;t.display.shift=16==n||e.shiftKey;var r=Nn(t,e);c&&(Ln=r?n:null,r||88!=n||Ko||!(m?e.metaKey:e.ctrlKey)||t.replaceSelection("",null,"cut")),18!=n||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||function(e){var t=e.display.lineDiv;function n(e){18!=e.keyCode&&e.altKey||(Fo(t,"CodeMirror-crosshair"),Yi(document,"keyup",n),Yi(document,"mouseover",n))}jo(t,"CodeMirror-crosshair"),$i(document,"keyup",n),$i(document,"mouseover",n)}(t)}}function In(e){16==e.keyCode&&(this.doc.sel.shift=!1),to(this,e)}function Rn(e){var t=this;if(!(un(t.display,e)||to(t,e)||e.ctrlKey&&!e.altKey||m&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(c&&n==Ln)return Ln=null,void Gi(e);c&&(!e.which||e.which<10)&&Nn(t,e)||function(e,t,n){return wn(e,"'"+n+"'",t,(function(t){return Tn(e,t,!0)}))}(t,e,String.fromCharCode(null==r?n:r))||t.display.input.onKeyPress(e)}}function kn(e){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(Ki(e,"focus",e),e.state.focused=!0,jo(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),s&&setTimeout((function(){e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),it(e))}function _n(e){e.state.delayingBlurEvent||(e.state.focused&&(Ki(e,"blur",e),e.state.focused=!1,Fo(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function On(e,t){un(e.display,t)||function(e,t){return!!ro(e,"gutterContextMenu")&&pn(e,t,"gutterContextMenu",!1)}(e,t)||to(e,t,"contextmenu")||e.display.input.onContextMenu(t)}var Dn=S.changeEnd=function(e){return e.text?fe(e.from.line+e.text.length-1,mo(e.text).length+(1==e.text.length?e.from.ch:0)):e.to};function Mn(e,t){if(he(e,t.from)<0)return e;if(he(e,t.to)<=0)return Dn(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=Dn(t).ch-t.to.ch),fe(n,r)}function Pn(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var i=e.sel.ranges[r];n.push(new Oe(Mn(i.anchor,t),Mn(i.head,t)))}return De(n,e.sel.primIndex)}function Fn(e,t,n){return e.line==t.line?fe(n.line,e.ch-t.ch+n.ch):fe(n.line+(e.line-t.line),e.ch)}function jn(e,t,n){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){this.canceled=!0}};return n&&(r.update=function(t,n,r,i){t&&(this.from=Fe(e,t)),n&&(this.to=Fe(e,n)),r&&(this.text=r),void 0!==i&&(this.origin=i)}),Ki(e,"beforeChange",e,r),e.cm&&Ki(e.cm,"beforeChange",e.cm,r),r.canceled?null:{from:r.from,to:r.to,text:r.text,origin:r.origin}}function Bn(e,t,n){if(e.cm){if(!e.cm.curOp)return Yt(e.cm,Bn)(e,t,n);if(e.cm.state.suppressEdits)return}if(!(ro(e,"beforeChange")||e.cm&&ro(e.cm,"beforeChange"))||(t=jn(e,t,!0))){var r=C&&!n&&function(e,t,n){var r=null;if(e.iter(t.line,n.line+1,(function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var n=e.markedSpans[t].marker;!n.readOnly||r&&-1!=yo(r,n)||(r||(r=[])).push(n)}})),!r)return null;for(var i=[{from:t,to:n}],o=0;o<r.length;++o)for(var a=r[o],s=a.find(0),l=0;l<i.length;++l){var u=i[l];if(!(he(u.to,s.from)<0||he(u.from,s.to)>0)){var c=[l,1],d=he(u.from,s.from),p=he(u.to,s.to);(d<0||!a.inclusiveLeft&&!d)&&c.push({from:u.from,to:s.from}),(p>0||!a.inclusiveRight&&!p)&&c.push({from:s.to,to:u.to}),i.splice.apply(i,c),l+=c.length-1}}return i}(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)Hn(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text});else Hn(e,t)}}function Hn(e,t){if(1!=t.text.length||""!=t.text[0]||0!=he(t.from,t.to)){var n=Pn(e,t);Oi(e,t,n,e.cm?e.cm.curOp.id:NaN),Vn(e,t,n,Ar(e,t));var r=[];bi(e,(function(e,n){n||-1!=yo(r,e.history)||(Hi(e.history,t),r.push(e.history)),Vn(e,t,null,Ar(e,t))}))}}function Gn(e,t,n){if(!e.cm||!e.cm.state.suppressEdits||n){for(var r,i=e.history,o=e.sel,a="undo"==t?i.done:i.undone,s="undo"==t?i.undone:i.done,l=0;l<a.length&&(r=a[l],n?!r.ranges||r.equals(e.sel):r.ranges);l++);if(l!=a.length){for(i.lastOrigin=i.lastSelOrigin=null;(r=a.pop()).ranges;){if(Di(r,s),n&&!r.equals(e.sel))return void ze(e,r,{clearRedo:!1});o=r}var u=[];Di(o,s),s.push({changes:u,generation:i.generation}),i.generation=r.generation||++i.maxGeneration;var c=ro(e,"beforeChange")||e.cm&&ro(e.cm,"beforeChange");for(l=r.changes.length-1;l>=0;--l){var d=r.changes[l];if(d.origin=t,c&&!jn(e,d,!1))return void(a.length=0);u.push(ki(e,d));var p=l?Pn(e,d):mo(a);Vn(e,d,p,Rr(e,d)),!l&&e.cm&&e.cm.scrollIntoView({from:d.from,to:Dn(d)});var f=[];bi(e,(function(e,t){t||-1!=yo(f,e.history)||(Hi(e.history,d),f.push(e.history)),Vn(e,d,null,Rr(e,d))}))}}}}function Un(e,t){if(0!=t&&(e.first+=t,e.sel=new _e(xo(e.sel.ranges,(function(e){return new Oe(fe(e.anchor.line+t,e.anchor.ch),fe(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){tn(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)nn(e.cm,r,"gutter")}}function Vn(e,t,n,r){if(e.cm&&!e.cm.curOp)return Yt(e.cm,Vn)(e,t,n,r);if(t.to.line<e.first)Un(e,t.text.length-1-(t.to.line-t.from.line));else if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);Un(e,i),t={from:fe(e.first,0),to:fe(t.to.line+i,t.to.ch),text:[mo(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:fe(o,Ci(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Ti(e,t.from,t.to),n||(n=Pn(e,t)),e.cm?function(e,t,n){var r=e.doc,i=e.display,o=t.from,a=t.to,s=!1,l=o.line;e.options.lineWrapping||(l=Ni(Hr(Ci(r,o.line))),r.iter(l,a.line+1,(function(e){if(e==i.maxLine)return s=!0,!0}))),r.sel.contains(t.from,t.to)>-1&&no(e),fi(r,t,n,A(e)),e.options.lineWrapping||(r.iter(l,o.line+t.text.length,(function(e){var t=D(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)})),s&&(e.curOp.updateMaxLine=!0)),r.frontier=Math.min(r.frontier,o.line),ot(e,400);var u=t.text.length-(a.line-o.line)-1;t.full?tn(e):o.line!=a.line||1!=t.text.length||pi(e.doc,t)?tn(e,o.line,a.line+1,u):nn(e,o.line,"text");var c=ro(e,"changes"),d=ro(e,"change");if(d||c){var p={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};d&&Zi(e,"change",e,p),c&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(p)}e.display.selForContextMenu=null}(e.cm,t,r):fi(e,t,r),$e(e,n,so)}}function Wn(e,t,n,r,i){if(r||(r=n),he(r,n)<0){var o=r;r=n,n=o}"string"==typeof t&&(t=e.splitLines(t)),Bn(e,{from:n,to:r,text:t,origin:i})}function qn(e,t,n,r,i){var o=e.display,a=Pt(e.display);n<0&&(n=0);var s=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:o.scroller.scrollTop,l=ft(e),u={};i-n>l&&(i=n+l);var c=e.doc.height+ut(o),d=n<a,p=i>c-a;if(n<s)u.scrollTop=d?0:n;else if(i>s+l){var f=Math.min(n,(p?c:i)-l);f!=s&&(u.scrollTop=f)}var h=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:o.scroller.scrollLeft,g=pt(e)-(e.options.fixedGutter?o.gutters.offsetWidth:0),m=r-t>g;return m&&(r=t+g),t<10?u.scrollLeft=0:t<h?u.scrollLeft=Math.max(0,t-(m?0:10)):r>g+h-3&&(u.scrollLeft=r+(m?0:10)-g),u}function zn(e,t,n){null==t&&null==n||Xn(e),null!=t&&(e.curOp.scrollLeft=(null==e.curOp.scrollLeft?e.doc.scrollLeft:e.curOp.scrollLeft)+t),null!=n&&(e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+n)}function $n(e){Xn(e);var t=e.getCursor(),n=t,r=t;e.options.lineWrapping||(n=t.ch?fe(t.line,t.ch-1):t,r=fe(t.line,t.ch+1)),e.curOp.scrollToPos={from:n,to:r,margin:e.options.cursorScrollMargin,isCursor:!0}}function Xn(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=_t(e,t.from),r=_t(e,t.to),i=qn(e,Math.min(n.left,r.left),Math.min(n.top,r.top)-t.margin,Math.max(n.right,r.right),Math.max(n.bottom,r.bottom)+t.margin);e.scrollTo(i.scrollLeft,i.scrollTop)}}function Qn(e,t,n,r){var i,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?i=st(e,t):n="prev");var a=e.options.tabSize,s=Ci(o,t),l=po(s.text,null,a);s.stateAfter&&(s.stateAfter=null);var u,c=s.text.match(/^\s*/)[0];if(r||/\S/.test(s.text)){if("smart"==n&&((u=o.mode.indent(i,s.text.slice(c.length),s.text))==ao||u>150)){if(!r)return;n="prev"}}else u=0,n="not";"prev"==n?u=t>o.first?po(Ci(o,t-1).text,null,a):0:"add"==n?u=l+e.options.indentUnit:"subtract"==n?u=l-e.options.indentUnit:"number"==typeof n&&(u=l+n),u=Math.max(0,u);var d="",p=0;if(e.options.indentWithTabs)for(var f=Math.floor(u/a);f;--f)p+=a,d+="\t";if(p<u&&(d+=go(u-p)),d!=c)return Wn(o,d,fe(t,0),fe(t,c.length),"+input"),s.stateAfter=null,!0;for(f=0;f<o.sel.ranges.length;f++){var h=o.sel.ranges[f];if(h.head.line==t&&h.head.ch<c.length){Ve(o,f,new Oe(p=fe(t,c.length),p));break}}}function Yn(e,t,n,r){var i=t,o=t;return"number"==typeof t?o=Ci(e,Pe(e,t)):i=Ni(t),null==i?null:(r(o,i)&&e.cm&&nn(e.cm,i,n),o)}function Kn(e,t){for(var n=e.doc.sel.ranges,r=[],i=0;i<n.length;i++){for(var o=t(n[i]);r.length&&he(o.from,mo(r).to)<=0;){var a=r.pop();if(he(a.from,o.from)<0){o.from=a.from;break}}r.push(o)}Qt(e,(function(){for(var t=r.length-1;t>=0;t--)Wn(e.doc,"",r[t].from,r[t].to,"+delete");$n(e)}))}function Jn(e,t,n,r,i){var o=t.line,a=t.ch,s=n,l=Ci(e,o);function u(t){var r,s=(i?ua:ca)(l,a,n,!0);if(null==s){if(t||(r=o+n)<e.first||r>=e.first+e.size||(o=r,!(l=Ci(e,r))))return!1;a=i?(n<0?ra:na)(l):n<0?l.text.length:0}else a=s;return!0}if("char"==r)u();else if("column"==r)u(!0);else if("word"==r||"group"==r)for(var c=null,d="group"==r,p=e.cm&&e.cm.getHelper(t,"wordChars"),f=!0;!(n<0)||u(!f);f=!1){var h=l.text.charAt(a)||"\n",g=No(h,p)?"w":d&&"\n"==h?"n":!d||/\s/.test(h)?null:"p";if(!d||f||g||(g="s"),c&&c!=g){n<0&&(n=1,u());break}if(g&&(c=g),n>0&&!u(!f))break}var m=Je(e,fe(o,a),t,s,!0);return he(t,m)||(m.hitSide=!0),m}function Zn(e,t,n,r){var i,o=e.doc,a=t.left;if("page"==r){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);i=t.top+n*(s-(n<0?1.5:.5)*Pt(e.display))}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;;){var l=Dt(e,a,i);if(!l.outside)break;if(n<0?i<=0:i>=o.height){l.hitSide=!0;break}i+=5*n}return l}S.prototype={constructor:S,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,t){var n=this.options,r=n[e];n[e]==t&&"mode"!=e||(n[e]=t,tr.hasOwnProperty(e)&&Yt(this,tr[e])(this,t,r))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](vr(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;n<t.length;++n)if(t[n]==e||t[n].name==e)return t.splice(n,1),!0},addOverlay:Kt((function(e,t){var n=e.token?e:S.getMode(this.options,e);if(n.startState)throw new Error("Overlays may not be stateful.");this.state.overlays.push({mode:n,modeSpec:e,opaque:t&&t.opaque}),this.state.modeGen++,tn(this)})),removeOverlay:Kt((function(e){for(var t=this.state.overlays,n=0;n<t.length;++n){var r=t[n].modeSpec;if(r==e||"string"==typeof e&&r.name==e)return t.splice(n,1),this.state.modeGen++,void tn(this)}})),indentLine:Kt((function(e,t,n){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),je(this.doc,e)&&Qn(this,e,t,n)})),indentSelection:Kt((function(e){for(var t=this.doc.sel.ranges,n=-1,r=0;r<t.length;r++){var i=t[r];if(i.empty())i.head.line>n&&(Qn(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&$n(this));else{var o=i.from(),a=i.to(),s=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var l=s;l<n;++l)Qn(this,l,e);var u=this.doc.sel.ranges;0==o.ch&&t.length==u.length&&u[r].from().ch>0&&Ve(this.doc,r,new Oe(o,u[r].to()),so)}}})),getTokenAt:function(e,t){return Zr(this,e,t)},getLineTokens:function(e,t){return Zr(this,fe(e),t,!0)},getTokenTypeAt:function(e){e=Fe(this.doc,e);var t,n=ni(this,Ci(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var a=r+i>>1;if((a?n[2*a-1]:0)>=o)i=a;else{if(!(n[2*a+1]<o)){t=n[2*a+2];break}r=a+1}}var s=t?t.indexOf("cm-overlay "):-1;return s<0?t:0==s?null:t.slice(0,s-1)},getModeAt:function(e){var t=this.doc.mode;return t.innerMode?S.innerMode(t,this.getTokenAt(e).state).mode:t},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var n=[];if(!lr.hasOwnProperty(t))return n;var r=lr[t],i=this.getModeAt(e);if("string"==typeof i[t])r[i[t]]&&n.push(r[i[t]]);else if(i[t])for(var o=0;o<i[t].length;o++){var a=r[i[t][o]];a&&n.push(a)}else i.helperType&&r[i.helperType]?n.push(r[i.helperType]):r[i.name]&&n.push(r[i.name]);for(o=0;o<r._global.length;o++){var s=r._global[o];s.pred(i,this)&&-1==yo(n,s.val)&&n.push(s.val)}return n},getStateAfter:function(e,t){var n=this.doc;return st(this,(e=Pe(n,null==e?n.first+n.size-1:e))+1,t)},cursorCoords:function(e,t){var n=this.doc.sel.primary();return kt(this,null==e?n.head:"object"==typeof e?Fe(this.doc,e):e?n.from():n.to(),t||"page")},charCoords:function(e,t){return Rt(this,Fe(this.doc,e),t||"page")},coordsChar:function(e,t){return Dt(this,(e=It(this,e,t||"page")).left,e.top)},lineAtHeight:function(e,t){return e=It(this,{top:e,left:0},t||"page").top,Li(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t){var n,r=!1;if("number"==typeof e){var i=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>i&&(e=i,r=!0),n=Ci(this.doc,e)}else n=e;return At(this,n,{top:0,left:0},t||"page").top+(r?this.doc.height-Ai(n):0)},defaultTextHeight:function(){return Pt(this.display)},defaultCharWidth:function(){return Ft(this.display)},setGutterMarker:Kt((function(e,t,n){return Yn(this.doc,e,"gutter",(function(e){var r=e.gutterMarkers||(e.gutterMarkers={});return r[t]=n,!n&&Lo(r)&&(e.gutterMarkers=null),!0}))})),clearGutter:Kt((function(e){var t=this,n=t.doc,r=n.first;n.iter((function(n){n.gutterMarkers&&n.gutterMarkers[e]&&(n.gutterMarkers[e]=null,nn(t,r,"gutter"),Lo(n.gutterMarkers)&&(n.gutterMarkers=null)),++r}))})),lineInfo:function(e){if("number"==typeof e){if(!je(this.doc,e))return null;var t=e;if(!(e=Ci(this.doc,e)))return null}else if(null==(t=Ni(e)))return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o,a,s,l,u,c,d=this.display,p=(e=kt(this,Fe(this.doc,e))).bottom,f=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),d.sizer.appendChild(t),"over"==r)p=e.top;else if("above"==r||"near"==r){var h=Math.max(d.wrapper.clientHeight,this.doc.height),g=Math.max(d.sizer.clientWidth,d.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>h)&&e.top>t.offsetHeight?p=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=h&&(p=e.bottom),f+t.offsetWidth>g&&(f=g-t.offsetWidth)}t.style.top=p+"px",t.style.left=t.style.right="","right"==i?(f=d.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?f=0:"middle"==i&&(f=(d.sizer.clientWidth-t.offsetWidth)/2),t.style.left=f+"px"),n&&(o=this,a=f,s=p,l=f+t.offsetWidth,u=p+t.offsetHeight,null!=(c=qn(o,a,s,l,u)).scrollTop&&vn(o,c.scrollTop),null!=c.scrollLeft&&yn(o,c.scrollLeft))},triggerOnKeyDown:Kt(An),triggerOnKeyPress:Kt(Rn),triggerOnKeyUp:In,execCommand:function(e){if(dr.hasOwnProperty(e))return dr[e].call(null,this)},triggerElectric:Kt((function(e){Ce(this,e)})),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var o=0,a=Fe(this.doc,e);o<t&&!(a=Jn(this.doc,a,i,n,r)).hitSide;++o);return a},moveH:Kt((function(e,t){var n=this;n.extendSelectionsBy((function(r){return n.display.shift||n.doc.extend||r.empty()?Jn(n.doc,r.head,e,t,n.options.rtlMoveVisually):e<0?r.from():r.to()}),uo)})),deleteH:Kt((function(e,t){var n=this.doc.sel,r=this.doc;n.somethingSelected()?r.replaceSelection("",null,"+delete"):Kn(this,(function(n){var i=Jn(r,n.head,e,t,!1);return e<0?{from:i,to:n.head}:{from:n.head,to:i}}))})),findPosV:function(e,t,n,r){var i=1,o=r;t<0&&(i=-1,t=-t);for(var a=0,s=Fe(this.doc,e);a<t;++a){var l=kt(this,s,"div");if(null==o?o=l.left:l.left=o,(s=Zn(this,l,i,n)).hitSide)break}return s},moveV:Kt((function(e,t){var n=this,r=this.doc,i=[],o=!n.display.shift&&!r.extend&&r.sel.somethingSelected();if(r.extendSelectionsBy((function(a){if(o)return e<0?a.from():a.to();var s=kt(n,a.head,"div");null!=a.goalColumn&&(s.left=a.goalColumn),i.push(s.left);var l=Zn(n,s,e,t);return"page"==t&&a==r.sel.primary()&&zn(n,null,Rt(n,l,"div").top-s.top),l}),uo),i.length)for(var a=0;a<r.sel.ranges.length;a++)r.sel.ranges[a].goalColumn=i[a]})),findWordAt:function(e){var t=Ci(this.doc,e.line).text,n=e.ch,r=e.ch;if(t){var i=this.getHelper(e,"wordChars");(e.xRel<0||r==t.length)&&n?--n:++r;for(var o=t.charAt(n),a=No(o,i)?function(e){return No(e,i)}:/\s/.test(o)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!No(e)};n>0&&a(t.charAt(n-1));)--n;for(;r<t.length&&a(t.charAt(r));)++r}return new Oe(fe(e.line,n),fe(e.line,r))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?jo(this.display.cursorDiv,"CodeMirror-overwrite"):Fo(this.display.cursorDiv,"CodeMirror-overwrite"),Ki(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Mo()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:Kt((function(e,t){null==e&&null==t||Xn(this),null!=e&&(this.curOp.scrollLeft=e),null!=t&&(this.curOp.scrollTop=t)})),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-dt(this)-this.display.barHeight,width:e.scrollWidth-dt(this)-this.display.barWidth,clientHeight:ft(this),clientWidth:pt(this)}},scrollIntoView:Kt((function(e,t){if(null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:fe(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line)Xn(this),this.curOp.scrollToPos=e;else{var n=qn(this,Math.min(e.from.left,e.to.left),Math.min(e.from.top,e.to.top)-e.margin,Math.max(e.from.right,e.to.right),Math.max(e.from.bottom,e.to.bottom)+e.margin);this.scrollTo(n.scrollLeft,n.scrollTop)}})),setSize:Kt((function(e,t){var n=this;function r(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e}null!=e&&(n.display.wrapper.style.width=r(e)),null!=t&&(n.display.wrapper.style.height=r(t)),n.options.lineWrapping&&St(this);var i=n.display.viewFrom;n.doc.iter(i,n.display.viewTo,(function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){nn(n,i,"widget");break}++i})),n.curOp.forceUpdate=!0,Ki(n,"refresh",this)})),operation:function(e){return Qt(this,e)},refresh:Kt((function(){var e=this.display.cachedTextHeight;tn(this),this.curOp.forceUpdate=!0,wt(this),this.scrollTo(this.doc.scrollLeft,this.doc.scrollTop),O(this),(null==e||Math.abs(e-Pt(this.display))>.5)&&I(this),Ki(this,"refresh",this)})),swapDoc:Kt((function(e){var t=this.doc;return t.cm=null,Ei(this,e),wt(this),this.display.input.reset(),this.scrollTo(e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,Zi(this,"swapDoc",this,t),t})),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},io(S);var er=S.defaults={},tr=S.optionHandlers={};function nr(e,t,n,r){S.defaults[e]=t,n&&(tr[e]=r?function(e,t,r){r!=rr&&n(e,t,r)}:n)}var rr=S.Init={toString:function(){return"CodeMirror.Init"}};nr("value","",(function(e,t){e.setValue(t)}),!0),nr("mode",null,(function(e,t){e.doc.modeOption=t,N(e)}),!0),nr("indentUnit",2,N,!0),nr("indentWithTabs",!1),nr("smartIndent",!0),nr("tabSize",4,(function(e){L(e),wt(e),tn(e)}),!0),nr("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter((function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,n.push(fe(r,o))}r++}));for(var i=n.length-1;i>=0;i--)Wn(e.doc,t,n[i],fe(n[i].line,n[i].ch+t.length))}})),nr("specialChars",/[\u0000-\u001f\u007f\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g,(function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=S.Init&&e.refresh()})),nr("specialCharPlaceholder",(function(e){var t=ko("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}),(function(e){e.refresh()}),!0),nr("electricChars",!0),nr("inputStyle",g?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),nr("rtlMoveVisually",!y),nr("wholeLineUpdateBefore",!0),nr("theme","default",(function(e){R(e),k(e)}),!0),nr("keyMap","default",(function(e,t,n){var r=vr(t),i=n!=S.Init&&vr(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)})),nr("extraKeys",null),nr("lineWrapping",!1,(function(e){e.options.lineWrapping?(jo(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Fo(e.display.wrapper,"CodeMirror-wrap"),M(e)),I(e),tn(e),wt(e),setTimeout((function(){G(e)}),100)}),!0),nr("gutters",[],(function(e){P(e.options),k(e)}),!0),nr("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?$(e.display)+"px":"0",e.refresh()}),!0),nr("coverGutterNextToScrollbar",!1,(function(e){G(e)}),!0),nr("scrollbarStyle","native",(function(e){H(e),G(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),nr("lineNumbers",!1,(function(e){P(e.options),k(e)}),!0),nr("firstLineNumber",1,k,!0),nr("lineNumberFormatter",(function(e){return e}),k,!0),nr("showCursorWhenSelecting",!1,et,!0),nr("resetSelectionOnContextMenu",!0),nr("lineWiseCopyCut",!0),nr("readOnly",!1,(function(e,t){"nocursor"==t?(_n(e),e.display.input.blur(),e.display.disabled=!0):e.display.disabled=!1,e.display.input.readOnlyChanged(t)})),nr("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),nr("dragDrop",!0,(function(e,t,n){if(!t!=!(n&&n!=S.Init)){var r=e.display.dragFunctions,i=t?$i:Yi;i(e.display.scroller,"dragstart",r.start),i(e.display.scroller,"dragenter",r.enter),i(e.display.scroller,"dragover",r.over),i(e.display.scroller,"dragleave",r.leave),i(e.display.scroller,"drop",r.drop)}})),nr("allowDropFileTypes",null),nr("cursorBlinkRate",530),nr("cursorScrollMargin",0),nr("cursorHeight",1,et,!0),nr("singleCursorHeightPerLine",!0,et,!0),nr("workTime",100),nr("workDelay",100),nr("flattenSpans",!0,L,!0),nr("addModeClass",!1,L,!0),nr("pollInterval",100),nr("undoDepth",200,(function(e,t){e.doc.history.undoDepth=t})),nr("historyEventDelay",1250),nr("viewportMargin",10,(function(e){e.refresh()}),!0),nr("maxHighlightLength",1e4,L,!0),nr("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),nr("tabindex",null,(function(e,t){e.display.input.getField().tabIndex=t||""})),nr("autofocus",null);var ir=S.modes={},or=S.mimeModes={};S.defineMode=function(e,t){S.defaults.mode||"null"==e||(S.defaults.mode=e),arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),ir[e]=t},S.defineMIME=function(e,t){or[e]=t},S.resolveMode=function(e){if("string"==typeof e&&or.hasOwnProperty(e))e=or[e];else if(e&&"string"==typeof e.name&&or.hasOwnProperty(e.name)){var t=or[e.name];"string"==typeof t&&(t={name:t}),(e=Eo(t,e)).name=t.name}else if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return S.resolveMode("application/xml");return"string"==typeof e?{name:e}:e||{name:"null"}},S.getMode=function(e,t){t=S.resolveMode(t);var n=ir[t.name];if(!n)return S.getMode(e,"text/plain");var r=n(e,t);if(ar.hasOwnProperty(t.name)){var i=ar[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var o in t.modeProps)r[o]=t.modeProps[o];return r},S.defineMode("null",(function(){return{token:function(e){e.skipToEnd()}}})),S.defineMIME("text/plain","null");var ar=S.modeExtensions={};S.extendMode=function(e,t){Co(t,ar.hasOwnProperty(e)?ar[e]:ar[e]={})},S.defineExtension=function(e,t){S.prototype[e]=t},S.defineDocExtension=function(e,t){vi.prototype[e]=t},S.defineOption=nr;var sr=[];S.defineInitHook=function(e){sr.push(e)};var lr=S.helpers={};S.registerHelper=function(e,t,n){lr.hasOwnProperty(e)||(lr[e]=S[e]={_global:[]}),lr[e][t]=n},S.registerGlobalHelper=function(e,t,n,r){S.registerHelper(e,t,r),lr[e]._global.push({pred:n,val:r})};var ur=S.copyState=function(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n},cr=S.startState=function(e,t,n){return!e.startState||e.startState(t,n)};S.innerMode=function(e,t){for(;e.innerMode;){var n=e.innerMode(t);if(!n||n.mode==e)break;t=n.state,e=n.mode}return n||{mode:e,state:t}};var dr=S.commands={selectAll:function(e){e.setSelection(fe(e.firstLine(),0),fe(e.lastLine()),so)},singleSelection:function(e){e.setSelection(e.getCursor("anchor"),e.getCursor("head"),so)},killLine:function(e){Kn(e,(function(t){if(t.empty()){var n=Ci(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:fe(t.head.line+1,0)}:{from:t.head,to:fe(t.head.line,n)}}return{from:t.from(),to:t.to()}}))},deleteLine:function(e){Kn(e,(function(t){return{from:fe(t.from().line,0),to:Fe(e.doc,fe(t.to().line+1,0))}}))},delLineLeft:function(e){Kn(e,(function(e){return{from:fe(e.from().line,0),to:e.from()}}))},delWrappedLineLeft:function(e){Kn(e,(function(t){var n=e.charCoords(t.head,"div").top+5;return{from:e.coordsChar({left:0,top:n},"div"),to:t.from()}}))},delWrappedLineRight:function(e){Kn(e,(function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div");return{from:t.from(),to:r}}))},undo:function(e){e.undo()},redo:function(e){e.redo()},undoSelection:function(e){e.undoSelection()},redoSelection:function(e){e.redoSelection()},goDocStart:function(e){e.extendSelection(fe(e.firstLine(),0))},goDocEnd:function(e){e.extendSelection(fe(e.lastLine()))},goLineStart:function(e){e.extendSelectionsBy((function(t){return ia(e,t.head.line)}),{origin:"+move",bias:1})},goLineStartSmart:function(e){e.extendSelectionsBy((function(t){return oa(e,t.head)}),{origin:"+move",bias:1})},goLineEnd:function(e){e.extendSelectionsBy((function(t){return function(e,t){for(var n,r=Ci(e.doc,t);n=jr(r);)r=n.find(1,!0).line,t=null;var i=Ii(r),o=i?i[0].level%2?na(r):ra(r):r.text.length;return fe(null==t?Ni(r):t,o)}(e,t.head.line)}),{origin:"+move",bias:-1})},goLineRight:function(e){e.extendSelectionsBy((function(t){var n=e.charCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div")}),uo)},goLineLeft:function(e){e.extendSelectionsBy((function(t){var n=e.charCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:n},"div")}),uo)},goLineLeftSmart:function(e){e.extendSelectionsBy((function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return r.ch<e.getLine(r.line).search(/\S/)?oa(e,t.head):r}),uo)},goLineUp:function(e){e.moveV(-1,"line")},goLineDown:function(e){e.moveV(1,"line")},goPageUp:function(e){e.moveV(-1,"page")},goPageDown:function(e){e.moveV(1,"page")},goCharLeft:function(e){e.moveH(-1,"char")},goCharRight:function(e){e.moveH(1,"char")},goColumnLeft:function(e){e.moveH(-1,"column")},goColumnRight:function(e){e.moveH(1,"column")},goWordLeft:function(e){e.moveH(-1,"word")},goGroupRight:function(e){e.moveH(1,"group")},goGroupLeft:function(e){e.moveH(-1,"group")},goWordRight:function(e){e.moveH(1,"word")},delCharBefore:function(e){e.deleteH(-1,"char")},delCharAfter:function(e){e.deleteH(1,"char")},delWordBefore:function(e){e.deleteH(-1,"word")},delWordAfter:function(e){e.deleteH(1,"word")},delGroupBefore:function(e){e.deleteH(-1,"group")},delGroupAfter:function(e){e.deleteH(1,"group")},indentAuto:function(e){e.indentSelection("smart")},indentMore:function(e){e.indentSelection("add")},indentLess:function(e){e.indentSelection("subtract")},insertTab:function(e){e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],n=e.listSelections(),r=e.options.tabSize,i=0;i<n.length;i++){var o=n[i].from(),a=po(e.getLine(o.line),o.ch,r);t.push(go(r-a%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){Qt(e,(function(){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++){var i=t[r].head,o=Ci(e.doc,i.line).text;if(o)if(i.ch==o.length&&(i=new fe(i.line,i.ch-1)),i.ch>0)i=new fe(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),fe(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=Ci(e.doc,i.line-1).text;a&&e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),fe(i.line-1,a.length-1),fe(i.line,1),"+transpose")}n.push(new Oe(i,i))}e.setSelections(n)}))},newlineAndIndent:function(e){Qt(e,(function(){for(var t=e.listSelections().length,n=0;n<t;n++){var r=e.listSelections()[n];e.replaceRange(e.doc.lineSeparator(),r.anchor,r.head,"+input"),e.indentLine(r.from().line+1,null,!0)}$n(e)}))},openLine:function(e){e.replaceSelection("\n","start")},toggleOverwrite:function(e){e.toggleOverwrite()}},pr=S.keyMap={};function fr(e){for(var t,n,r,i,o=e.split(/-(?!$)/),a=(e=o[o.length-1],0);a<o.length-1;a++){var s=o[a];if(/^(cmd|meta|m)$/i.test(s))i=!0;else if(/^a(lt)?$/i.test(s))t=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else{if(!/^s(hift)$/i.test(s))throw new Error("Unrecognized modifier name: "+s);r=!0}}return t&&(e="Alt-"+e),n&&(e="Ctrl-"+e),i&&(e="Cmd-"+e),r&&(e="Shift-"+e),e}pr.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},pr.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},pr.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},pr.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},pr.default=m?pr.macDefault:pr.pcDefault,S.normalizeKeyMap=function(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==r){delete e[n];continue}for(var i=xo(n.split(" "),fr),o=0;o<i.length;o++){var a,s;o==i.length-1?(s=i.join(" "),a=r):(s=i.slice(0,o+1).join(" "),a="...");var l=t[s];if(l){if(l!=a)throw new Error("Inconsistent bindings for "+s)}else t[s]=a}delete e[n]}for(var u in t)e[u]=t[u];return e};var hr=S.lookupKey=function(e,t,n,r){var i=(t=vr(t)).call?t.call(e,r):t[e];if(!1===i)return"nothing";if("..."===i)return"multi";if(null!=i&&n(i))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return hr(e,t.fallthrough,n,r);for(var o=0;o<t.fallthrough.length;o++){var a=hr(e,t.fallthrough[o],n,r);if(a)return a}}},gr=S.isModifierKey=function(e){var t="string"==typeof e?e:Zo[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t},mr=S.keyName=function(e,t){if(c&&34==e.keyCode&&e.char)return!1;var n=Zo[e.keyCode],r=n;return null!=r&&!e.altGraphKey&&(e.altKey&&"Alt"!=n&&(r="Alt-"+r),(b?e.metaKey:e.ctrlKey)&&"Ctrl"!=n&&(r="Ctrl-"+r),(b?e.ctrlKey:e.metaKey)&&"Cmd"!=n&&(r="Cmd-"+r),!t&&e.shiftKey&&"Shift"!=n&&(r="Shift-"+r),r)};function vr(e){return"string"==typeof e?pr[e]:e}S.fromTextArea=function(e,t){if((t=t?Co(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=Mo();t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function r(){e.value=s.getValue()}if(e.form&&($i(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var i=e.form,o=i.submit;try{var a=i.submit=function(){r(),i.submit=o,i.submit(),i.submit=a}}catch(e){}}t.finishInit=function(t){t.save=r,t.getTextArea=function(){return e},t.toTextArea=function(){t.toTextArea=isNaN,r(),e.parentNode.removeChild(t.getWrapperElement()),e.style.display="",e.form&&(Yi(e.form,"submit",r),"function"==typeof e.form.submit&&(e.form.submit=o))}},e.style.display="none";var s=S((function(t){e.parentNode.insertBefore(t,e.nextSibling)}),t);return s};var yr=S.StringStream=function(e,t){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};yr.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},eat:function(e){var t=this.string.charAt(this.pos);if("string"==typeof e)var n=t==e;else n=t&&(e.test?e.test(t):e(t));if(n)return++this.pos,t},eatWhile:function(e){for(var t=this.pos;this.eat(e););return this.pos>t},eatSpace:function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},skipToEnd:function(){this.pos=this.string.length},skipTo:function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},backUp:function(e){this.pos-=e},column:function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=po(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?po(this.string,this.lineStart,this.tabSize):0)},indentation:function(){return po(this.string,null,this.tabSize)-(this.lineStart?po(this.string,this.lineStart,this.tabSize):0)},match:function(e,t,n){if("string"!=typeof e){var r=this.string.slice(this.pos).match(e);return r&&r.index>0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}}};var xr=0,br=S.TextMarker=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++xr};function Er(e,t,n,r,i){if(r&&r.shared)return function(e,t,n,r,i){(r=Co(r)).shared=!1;var o=[Er(e,t,n,r,i)],a=o[0],s=r.widgetNode;return bi(e,(function(e){s&&(r.widgetNode=s.cloneNode(!0)),o.push(Er(e,Fe(e,t),Fe(e,n),r,i));for(var l=0;l<e.linked.length;++l)if(e.linked[l].isParent)return;a=mo(o)})),new Cr(o,a)}(e,t,n,r,i);if(e.cm&&!e.cm.curOp)return Yt(e.cm,Er)(e,t,n,r,i);var o=new br(e,i),a=he(t,n);if(r&&Co(r,o,!1),a>0||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=ko("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Br(e,t.line,t,n,o)||t.line!=n.line&&Br(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");T=!0}o.addToHistory&&Oi(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var s,l=t.line,u=e.cm;if(e.iter(l,n.line+1,(function(e){u&&o.collapsed&&!u.options.lineWrapping&&Hr(e)==u.display.maxLine&&(s=!0),o.collapsed&&l!=t.line&&wi(e,0),function(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}(e,new wr(o,l==t.line?t.ch:null,l==n.line?n.ch:null)),++l})),o.collapsed&&e.iter(t.line,n.line+1,(function(t){Vr(e,t)&&wi(t,0)})),o.clearOnEnter&&$i(o,"beforeCursorEnter",(function(){o.clear()})),o.readOnly&&(C=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++xr,o.atomic=!0),u){if(s&&(u.curOp.updateMaxLine=!0),o.collapsed)tn(u,t.line,n.line+1);else if(o.className||o.title||o.startStyle||o.endStyle||o.css)for(var c=t.line;c<=n.line;c++)nn(u,c,"text");o.atomic&&Qe(u.doc),Zi(u,"markerAdded",u,o)}return o}io(br),br.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Ut(e),ro(this,"clear")){var n=this.find();n&&Zi(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;o<this.lines.length;++o){var a=this.lines[o],s=Nr(a.markedSpans,this);e&&!this.collapsed?nn(e,Ni(a),"text"):e&&(null!=s.to&&(i=Ni(a)),null!=s.from&&(r=Ni(a))),a.markedSpans=Lr(a.markedSpans,s),null==s.from&&this.collapsed&&!Vr(this.doc,a)&&e&&wi(a,Pt(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(o=0;o<this.lines.length;++o){var l=Hr(this.lines[o]),u=D(l);u>e.display.maxLineLength&&(e.display.maxLine=l,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&tn(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Qe(e.doc)),e&&Zi(e,"markerCleared",e,this),t&&Vt(e),this.parent&&this.parent.clear()}},br.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i<this.lines.length;++i){var o=this.lines[i],a=Nr(o.markedSpans,this);if(null!=a.from&&(n=fe(t?o:Ni(o),a.from),-1==e))return n;if(null!=a.to&&(r=fe(t?o:Ni(o),a.to),1==e))return r}return n&&{from:n,to:r}},br.prototype.changed=function(){var e=this.find(-1,!0),t=this,n=this.doc.cm;e&&n&&Qt(n,(function(){var r=e.line,i=Ni(e.line),o=mt(n,i);if(o&&(Tt(o),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!Vr(t.doc,r)&&null!=t.height){var a=t.height;t.height=null;var s=$r(t)-a;s&&wi(r,r.height+s)}}))},br.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=yo(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},br.prototype.detachLine=function(e){if(this.lines.splice(yo(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},xr=0;var Cr=S.SharedTextMarker=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};function Tr(e){return e.findMarks(fe(e.first,0),e.clipPos(fe(e.lastLine())),(function(e){return e.parent}))}function Sr(e){for(var t=0;t<e.length;t++){var n=e[t],r=[n.primary.doc];bi(n.primary.doc,(function(e){r.push(e)}));for(var i=0;i<n.markers.length;i++){var o=n.markers[i];-1==yo(r,o.doc)&&(o.parent=null,n.markers.splice(i--,1))}}}function wr(e,t,n){this.marker=e,this.from=t,this.to=n}function Nr(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function Lr(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function Ar(e,t){if(t.full)return null;var n=je(e,t.from.line)&&Ci(e,t.from.line).markedSpans,r=je(e,t.to.line)&&Ci(e,t.to.line).markedSpans;if(!n&&!r)return null;var i=t.from.ch,o=t.to.ch,a=0==he(t.from,t.to),s=function(e,t,n){if(e)for(var r,i=0;i<e.length;++i){var o=e[i],a=o.marker;if(null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t)||o.from==t&&"bookmark"==a.type&&(!n||!o.marker.insertLeft)){var s=null==o.to||(a.inclusiveRight?o.to>=t:o.to>t);(r||(r=[])).push(new wr(a,o.from,s?null:o.to))}}return r}(n,i,a),l=function(e,t,n){if(e)for(var r,i=0;i<e.length;++i){var o=e[i],a=o.marker;if(null==o.to||(a.inclusiveRight?o.to>=t:o.to>t)||o.from==t&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var s=null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t);(r||(r=[])).push(new wr(a,s?null:o.from-t,null==o.to?null:o.to-t))}}return r}(r,o,a),u=1==t.text.length,c=mo(t.text).length+(u?i:0);if(s)for(var d=0;d<s.length;++d)null==(p=s[d]).to&&((f=Nr(l,p.marker))?u&&(p.to=null==f.to?null:f.to+c):p.to=i);if(l)for(d=0;d<l.length;++d){var p,f;null!=(p=l[d]).to&&(p.to+=c),null==p.from?(f=Nr(s,p.marker))||(p.from=c,u&&(s||(s=[])).push(p)):(p.from+=c,u&&(s||(s=[])).push(p))}s&&(s=Ir(s)),l&&l!=s&&(l=Ir(l));var h=[s];if(!u){var g,m=t.text.length-2;if(m>0&&s)for(d=0;d<s.length;++d)null==s[d].to&&(g||(g=[])).push(new wr(s[d].marker,null,null));for(d=0;d<m;++d)h.push(g);h.push(l)}return h}function Ir(e){for(var t=0;t<e.length;++t){var n=e[t];null!=n.from&&n.from==n.to&&!1!==n.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function Rr(e,t){var n=function(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var r=0,i=[];r<t.text.length;++r)i.push(Pi(n[r]));return i}(e,t),r=Ar(e,t);if(!n)return r;if(!r)return n;for(var i=0;i<n.length;++i){var o=n[i],a=r[i];if(o&&a)e:for(var s=0;s<a.length;++s){for(var l=a[s],u=0;u<o.length;++u)if(o[u].marker==l.marker)continue e;o.push(l)}else a&&(n[i]=a)}return n}function kr(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function _r(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function Or(e){return e.inclusiveLeft?-1:0}function Dr(e){return e.inclusiveRight?1:0}function Mr(e,t){var n=e.lines.length-t.lines.length;if(0!=n)return n;var r=e.find(),i=t.find(),o=he(r.from,i.from)||Or(e)-Or(t);if(o)return-o;var a=he(r.to,i.to)||Dr(e)-Dr(t);return a||t.id-e.id}function Pr(e,t){var n,r=T&&e.markedSpans;if(r)for(var i,o=0;o<r.length;++o)(i=r[o]).marker.collapsed&&null==(t?i.from:i.to)&&(!n||Mr(n,i.marker)<0)&&(n=i.marker);return n}function Fr(e){return Pr(e,!0)}function jr(e){return Pr(e,!1)}function Br(e,t,n,r,i){var o=Ci(e,t),a=T&&o.markedSpans;if(a)for(var s=0;s<a.length;++s){var l=a[s];if(l.marker.collapsed){var u=l.marker.find(0),c=he(u.from,n)||Or(l.marker)-Or(i),d=he(u.to,r)||Dr(l.marker)-Dr(i);if(!(c>=0&&d<=0||c<=0&&d>=0)&&(c<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?he(u.to,n)>=0:he(u.to,n)>0)||c>=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?he(u.from,r)<=0:he(u.from,r)<0)))return!0}}}function Hr(e){for(var t;t=Fr(e);)e=t.find(-1,!0).line;return e}function Gr(e,t){var n=Ci(e,t),r=Hr(n);return n==r?t:Ni(r)}function Ur(e,t){if(t>e.lastLine())return t;var n,r=Ci(e,t);if(!Vr(e,r))return t;for(;n=jr(r);)r=n.find(1,!0).line;return Ni(r)+1}function Vr(e,t){var n=T&&t.markedSpans;if(n)for(var r,i=0;i<n.length;++i)if((r=n[i]).marker.collapsed){if(null==r.from)return!0;if(!r.marker.widgetNode&&0==r.from&&r.marker.inclusiveLeft&&Wr(e,t,r))return!0}}function Wr(e,t,n){if(null==n.to){var r=n.marker.find(1,!0);return Wr(e,r.line,Nr(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var i,o=0;o<t.markedSpans.length;++o)if((i=t.markedSpans[o]).marker.collapsed&&!i.marker.widgetNode&&i.from==n.to&&(null==i.to||i.to!=n.from)&&(i.marker.inclusiveLeft||n.marker.inclusiveRight)&&Wr(e,t,i))return!0}io(Cr),Cr.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Zi(this,"clear")}},Cr.prototype.find=function(e,t){return this.primary.find(e,t)};var qr=S.LineWidget=function(e,t,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.doc=e,this.node=t};function zr(e,t,n){Ai(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&zn(e,null,n)}function $r(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!Do(document.body,e.node)){var n="position: relative;";e.coverGutter&&(n+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(n+="width: "+t.display.wrapper.clientWidth+"px;"),Oo(t.display.measure,ko("div",[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}io(qr),qr.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,r=Ni(n);if(null!=r&&t){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(n.widgets=null);var o=$r(this);wi(n,Math.max(0,n.height-o)),e&&Qt(e,(function(){zr(e,n,-o),nn(e,r,"widget")}))}},qr.prototype.changed=function(){var e=this.height,t=this.doc.cm,n=this.line;this.height=null;var r=$r(this)-e;r&&(wi(n,n.height+r),t&&Qt(t,(function(){t.curOp.forceUpdate=!0,zr(t,n,r)})))};var Xr=S.Line=function(e,t,n){this.text=e,_r(this,t),this.height=n?n(this):1};function Qr(e){e.parent=null,kr(e)}function Yr(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var r=n[1]?"bgClass":"textClass";null==t[r]?t[r]=n[2]:new RegExp("(?:^|s)"+n[2]+"(?:$|s)").test(t[r])||(t[r]+=" "+n[2])}return e}function Kr(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=S.innerMode(e,t);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function Jr(e,t,n,r){for(var i=0;i<10;i++){r&&(r[0]=S.innerMode(e,n).mode);var o=e.token(t,n);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}function Zr(e,t,n,r){function i(e){return{start:d.start,end:d.pos,string:d.current(),type:o||null,state:e?ur(a.mode,c):c}}var o,a=e.doc,s=a.mode;t=Fe(a,t);var l,u=Ci(a,t.line),c=st(e,t.line,n),d=new yr(u.text,e.options.tabSize);for(r&&(l=[]);(r||d.pos<t.ch)&&!d.eol();)d.start=d.pos,o=Jr(s,d,c),r&&l.push(i(!0));return r?l:i()}function ei(e,t,n,r,i,o,a){var s=n.flattenSpans;null==s&&(s=e.options.flattenSpans);var l,u=0,c=null,d=new yr(t,e.options.tabSize),p=e.options.addModeClass&&[null];for(""==t&&Yr(Kr(n,r),o);!d.eol();){if(d.pos>e.options.maxHighlightLength?(s=!1,a&&ri(e,t,r,d.pos),d.pos=t.length,l=null):l=Yr(Jr(n,d,r,p),o),p){var f=p[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!s||c!=l){for(;u<d.start;)i(u=Math.min(d.start,u+5e4),c);c=l}d.start=d.pos}for(;u<d.pos;){var h=Math.min(d.pos,u+5e4);i(h,c),u=h}}function ti(e,t,n,r){var i=[e.state.modeGen],o={};ei(e,t.text,e.doc.mode,n,(function(e,t){i.push(e,t)}),o,r);for(var a=0;a<e.state.overlays.length;++a){var s=e.state.overlays[a],l=1,u=0;ei(e,t.text,s.mode,!0,(function(e,t){for(var n=l;u<e;){var r=i[l];r>e&&i.splice(l,1,e,i[l+1],r),l+=2,u=Math.min(e,r)}if(t)if(s.opaque)i.splice(n,l-n,e,"cm-overlay "+t),l=n+2;else for(;n<l;n+=2){var o=i[n+1];i[n+1]=(o?o+" ":"")+"cm-overlay "+t}}),o)}return{styles:i,classes:o.bgClass||o.textClass?o:null}}function ni(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=st(e,Ni(t)),i=ti(e,t,t.text.length>e.options.maxHighlightLength?ur(e.doc.mode,r):r);t.stateAfter=r,t.styles=i.styles,i.classes?t.styleClasses=i.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.frontier&&e.doc.frontier++}return t.styles}function ri(e,t,n,r){var i=e.doc.mode,o=new yr(t,e.options.tabSize);for(o.start=o.pos=r||0,""==t&&Kr(i,n);!o.eol();)Jr(i,o,n),o.start=o.pos}io(Xr),Xr.prototype.lineNo=function(){return Ni(this)};var ii={},oi={};function ai(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?oi:ii;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function si(e,t){var n=ko("span",null,null,s?"padding-right: .1px":null),r={pre:ko("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:(o||s)&&e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var a,l=i?t.rest[i-1]:t.line;r.pos=0,r.addToken=li,zo(e.display.measure)&&(a=Ii(l))&&(r.addToken=ui(r.addToken,a)),r.map=[],di(l,r,ni(e,l,t!=e.display.externalMeasured&&Ni(l))),l.styleClasses&&(l.styleClasses.bgClass&&(r.bgClass=Bo(l.styleClasses.bgClass,r.bgClass||"")),l.styleClasses.textClass&&(r.textClass=Bo(l.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(qo(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(s){var u=r.content.lastChild;(/\bcm-tab\b/.test(u.className)||u.querySelector&&u.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return Ki(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=Bo(r.pre.className,r.textClass||"")),r}function li(e,t,n,r,i,s,l){if(t){var u=e.splitSpaces?function(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;i<e.length;i++){var o=e.charAt(i);" "!=o||!n||i!=e.length-1&&32!=e.charCodeAt(i+1)||(o=" "),r+=o,n=" "==o}return r}(t,e.trailingSpace):t,c=e.cm.state.specialChars,d=!1;if(c.test(t)){y=document.createDocumentFragment();for(var p=0;;){c.lastIndex=p;var f=c.exec(t),h=f?f.index-p:t.length-p;if(h){var g=document.createTextNode(u.slice(p,p+h));o&&a<9?y.appendChild(ko("span",[g])):y.appendChild(g),e.map.push(e.pos,e.pos+h,g),e.col+=h,e.pos+=h}if(!f)break;if(p+=h+1,"\t"==f[0]){var m=e.cm.options.tabSize,v=m-e.col%m;(g=y.appendChild(ko("span",go(v),"cm-tab"))).setAttribute("role","presentation"),g.setAttribute("cm-text","\t"),e.col+=v}else"\r"==f[0]||"\n"==f[0]?((g=y.appendChild(ko("span","\r"==f[0]?"␍":"","cm-invalidchar"))).setAttribute("cm-text",f[0]),e.col+=1):((g=e.cm.options.specialCharPlaceholder(f[0])).setAttribute("cm-text",f[0]),o&&a<9?y.appendChild(ko("span",[g])):y.appendChild(g),e.col+=1);e.map.push(e.pos,e.pos+1,g),e.pos++}}else{e.col+=t.length;var y=document.createTextNode(u);e.map.push(e.pos,e.pos+t.length,y),o&&a<9&&(d=!0),e.pos+=t.length}if(e.trailingSpace=32==u.charCodeAt(t.length-1),n||r||i||d||l){var x=n||"";r&&(x+=r),i&&(x+=i);var b=ko("span",[y],x,l);return s&&(b.title=s),e.content.appendChild(b)}e.content.appendChild(y)}}function ui(e,t){return function(n,r,i,o,a,s,l){i=i?i+" cm-force-border":"cm-force-border";for(var u=n.pos,c=u+r.length;;){for(var d=0;d<t.length;d++){var p=t[d];if(p.to>u&&p.from<=u)break}if(p.to>=c)return e(n,r,i,o,a,s,l);e(n,r.slice(0,p.to-u),i,o,null,s,l),o=null,r=r.slice(p.to-u),u=p.to}}}function ci(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function di(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var a,s,l,u,c,d,p,f=i.length,h=0,g=(w=1,""),m=0;;){if(m==h){l=u=c=d=s="",p=null,m=1/0;for(var v,y=[],x=0;x<r.length;++x){var b=r[x],E=b.marker;"bookmark"==E.type&&b.from==h&&E.widgetNode?y.push(E):b.from<=h&&(null==b.to||b.to>h||E.collapsed&&b.to==h&&b.from==h)?(null!=b.to&&b.to!=h&&m>b.to&&(m=b.to,u=""),E.className&&(l+=" "+E.className),E.css&&(s=(s?s+";":"")+E.css),E.startStyle&&b.from==h&&(c+=" "+E.startStyle),E.endStyle&&b.to==m&&(v||(v=[])).push(E.endStyle,b.to),E.title&&!d&&(d=E.title),E.collapsed&&(!p||Mr(p.marker,E)<0)&&(p=b)):b.from>h&&m>b.from&&(m=b.from)}if(v)for(x=0;x<v.length;x+=2)v[x+1]==m&&(u+=" "+v[x]);if(!p||p.from==h)for(x=0;x<y.length;++x)ci(t,0,y[x]);if(p&&(p.from||0)==h){if(ci(t,(null==p.to?f+1:p.to)-h,p.marker,null==p.from),null==p.to)return;p.to==h&&(p=!1)}}if(h>=f)break;for(var C=Math.min(f,m);;){if(g){var T=h+g.length;if(!p){var S=T>C?g.slice(0,C-h):g;t.addToken(t,S,a?a+l:l,c,h+S.length==m?u:"",d,s)}if(T>=C){g=g.slice(C-h),h=C;break}h=T,c=""}g=i.slice(o,o=n[w++]),a=ai(n[w++],t.cm.options)}}else for(var w=1;w<n.length;w+=2)t.addToken(t,i.slice(o,o=n[w]),ai(n[w+1],t.cm.options))}function pi(e,t){return 0==t.from.ch&&0==t.to.ch&&""==mo(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function fi(e,t,n,r){function i(e){return n?n[e]:null}function o(e,n,i){!function(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),kr(e),_r(e,n);var i=r?r(e):1;i!=e.height&&wi(e,i)}(e,n,i,r),Zi(e,"change",e,t)}function a(e,t){for(var n=e,o=[];n<t;++n)o.push(new Xr(u[n],i(n),r));return o}var s=t.from,l=t.to,u=t.text,c=Ci(e,s.line),d=Ci(e,l.line),p=mo(u),f=i(u.length-1),h=l.line-s.line;if(t.full)e.insert(0,a(0,u.length)),e.remove(u.length,e.size-u.length);else if(pi(e,t)){var g=a(0,u.length-1);o(d,d.text,f),h&&e.remove(s.line,h),g.length&&e.insert(s.line,g)}else c==d?1==u.length?o(c,c.text.slice(0,s.ch)+p+c.text.slice(l.ch),f):((g=a(1,u.length-1)).push(new Xr(p+c.text.slice(l.ch),f,r)),o(c,c.text.slice(0,s.ch)+u[0],i(0)),e.insert(s.line+1,g)):1==u.length?(o(c,c.text.slice(0,s.ch)+u[0]+d.text.slice(l.ch),i(0)),e.remove(s.line+1,h)):(o(c,c.text.slice(0,s.ch)+u[0],i(0)),o(d,p+d.text.slice(l.ch),f),g=a(1,u.length-1),h>1&&e.remove(s.line+1,h-1),e.insert(s.line+1,g));Zi(e,"change",e,t)}function hi(e){this.lines=e,this.parent=null;for(var t=0,n=0;t<e.length;++t)e[t].parent=this,n+=e[t].height;this.height=n}function gi(e){this.children=e;for(var t=0,n=0,r=0;r<e.length;++r){var i=e[r];t+=i.chunkSize(),n+=i.height,i.parent=this}this.size=t,this.height=n,this.parent=null}hi.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=e,r=e+t;n<r;++n){var i=this.lines[n];this.height-=i.height,Qr(i),Zi(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;r<t.length;++r)t[r].parent=this},iterN:function(e,t,n){for(var r=e+t;e<r;++e)if(n(this.lines[e]))return!0}},gi.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var r=this.children[n],i=r.chunkSize();if(e<i){var o=Math.min(t,i-e),a=r.height;if(r.removeInner(e,o),this.height-=a-r.height,i==o&&(this.children.splice(n--,1),r.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof hi))){var s=[];this.collapse(s),this.children=[new hi(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,n){this.size+=t.length,this.height+=n;for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<=o){if(i.insertInner(e,t,n),i.lines&&i.lines.length>50){for(var a=i.lines.length%25+25,s=a;s<i.lines.length;){var l=new hi(i.lines.slice(s,s+=25));i.height-=l.height,this.children.splice(++r,0,l),l.parent=this}i.lines=i.lines.slice(0,a),this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=new gi(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var n=yo(e.parent.children,e);e.parent.children.splice(n+1,0,t)}else{var r=new gi(e.children);r.parent=e,e.children=[r,t],e=r}t.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<o){var a=Math.min(t,o-e);if(i.iterN(e,a,n))return!0;if(0==(t-=a))break;e=0}else e-=o}}};var mi=0,vi=S.Doc=function(e,t,n,r){if(!(this instanceof vi))return new vi(e,t,n,r);null==n&&(n=0),gi.call(this,[new hi([new Xr("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.frontier=n;var i=fe(n,0);this.sel=Me(i),this.history=new Ri(null),this.id=++mi,this.modeOption=t,this.lineSep=r,this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),fi(this,{from:i,to:i,text:e}),ze(this,Me(i),so)};vi.prototype=Eo(gi.prototype,{constructor:vi,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r<t.length;++r)n+=t[r].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=Si(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:Jt((function(e){var t=fe(this.first,0),n=this.first+this.size-1;Bn(this,{from:t,to:fe(n,Ci(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),ze(this,Me(t))})),replaceRange:function(e,t,n,r){Wn(this,e,t=Fe(this,t),n=n?Fe(this,n):t,r)},getRange:function(e,t,n){var r=Ti(this,Fe(this,e),Fe(this,t));return!1===n?r:r.join(n||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(je(this,e))return Ci(this,e)},getLineNumber:function(e){return Ni(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=Ci(this,e)),Hr(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return Fe(this,e)},getCursor:function(e){var t=this.sel.primary();return null==e||"head"==e?t.head:"anchor"==e?t.anchor:"end"==e||"to"==e||!1===e?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Jt((function(e,t,n){We(this,Fe(this,"number"==typeof e?fe(e,t||0):e),null,n)})),setSelection:Jt((function(e,t,n){We(this,Fe(this,e),Fe(this,t||e),n)})),extendSelection:Jt((function(e,t,n){Ge(this,Fe(this,e),t&&Fe(this,t),n)})),extendSelections:Jt((function(e,t){Ue(this,Be(this,e),t)})),extendSelectionsBy:Jt((function(e,t){Ue(this,Be(this,xo(this.sel.ranges,e)),t)})),setSelections:Jt((function(e,t,n){if(e.length){for(var r=0,i=[];r<e.length;r++)i[r]=new Oe(Fe(this,e[r].anchor),Fe(this,e[r].head));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),ze(this,De(i,t),n)}})),addSelection:Jt((function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new Oe(Fe(this,e),Fe(this,t||e))),ze(this,De(r,r.length-1),n)})),getSelection:function(e){for(var t,n=this.sel.ranges,r=0;r<n.length;r++){var i=Ti(this,n[r].from(),n[r].to());t=t?t.concat(i):i}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],n=this.sel.ranges,r=0;r<n.length;r++){var i=Ti(this,n[r].from(),n[r].to());!1!==e&&(i=i.join(e||this.lineSeparator())),t[r]=i}return t},replaceSelection:function(e,t,n){for(var r=[],i=0;i<this.sel.ranges.length;i++)r[i]=e;this.replaceSelections(r,t,n||"+input")},replaceSelections:Jt((function(e,t,n){for(var r=[],i=this.sel,o=0;o<i.ranges.length;o++){var a=i.ranges[o];r[o]={from:a.from(),to:a.to(),text:this.splitLines(e[o]),origin:n}}var s=t&&"end"!=t&&function(e,t,n){for(var r=[],i=fe(e.first,0),o=i,a=0;a<t.length;a++){var s=t[a],l=Fn(s.from,i,o),u=Fn(Dn(s),i,o);if(i=s.to,o=u,"around"==n){var c=e.sel.ranges[a],d=he(c.head,c.anchor)<0;r[a]=new Oe(d?u:l,d?l:u)}else r[a]=new Oe(l,l)}return new _e(r,e.sel.primIndex)}(this,r,t);for(o=r.length-1;o>=0;o--)Bn(this,r[o]);s?qe(this,s):this.cm&&$n(this.cm)})),undo:Jt((function(){Gn(this,"undo")})),redo:Jt((function(){Gn(this,"redo")})),undoSelection:Jt((function(){Gn(this,"undo",!0)})),redoSelection:Jt((function(){Gn(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r<e.done.length;r++)e.done[r].ranges||++t;for(r=0;r<e.undone.length;r++)e.undone[r].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){this.history=new Ri(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Fi(this.history.done),undone:Fi(this.history.undone)}},setHistory:function(e){var t=this.history=new Ri(this.history.maxGeneration);t.done=Fi(e.done.slice(0),null,!0),t.undone=Fi(e.undone.slice(0),null,!0)},addLineClass:Jt((function(e,t,n){return Yn(this,e,"gutter"==t?"gutter":"class",(function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[r]){if(Po(n).test(e[r]))return!1;e[r]+=" "+n}else e[r]=n;return!0}))})),removeLineClass:Jt((function(e,t,n){return Yn(this,e,"gutter"==t?"gutter":"class",(function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",i=e[r];if(!i)return!1;if(null==n)e[r]=null;else{var o=i.match(Po(n));if(!o)return!1;var a=o.index+o[0].length;e[r]=i.slice(0,o.index)+(o.index&&a!=i.length?" ":"")+i.slice(a)||null}return!0}))})),addLineWidget:Jt((function(e,t,n){return function(e,t,n,r){var i=new qr(e,n,r),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),Yn(e,t,"widget",(function(t){var n=t.widgets||(t.widgets=[]);if(null==i.insertAt?n.push(i):n.splice(Math.min(n.length-1,Math.max(0,i.insertAt)),0,i),i.line=t,o&&!Vr(e,t)){var r=Ai(t)<e.scrollTop;wi(t,t.height+$r(i)),r&&zn(o,null,i.height),o.curOp.forceUpdate=!0}return!0})),i}(this,e,t,n)})),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return Er(this,Fe(this,e),Fe(this,t),n,n&&n.type||"range")},setBookmark:function(e,t){var n={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return Er(this,e=Fe(this,e),e,n,"bookmark")},findMarksAt:function(e){var t=[],n=Ci(this,(e=Fe(this,e)).line).markedSpans;if(n)for(var r=0;r<n.length;++r){var i=n[r];(null==i.from||i.from<=e.ch)&&(null==i.to||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=Fe(this,e),t=Fe(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,(function(o){var a=o.markedSpans;if(a)for(var s=0;s<a.length;s++){var l=a[s];null!=l.to&&i==e.line&&e.ch>=l.to||null==l.from&&i!=e.line||null!=l.from&&i==t.line&&l.from>=t.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++i})),r},getAllMarks:function(){var e=[];return this.iter((function(t){var n=t.markedSpans;if(n)for(var r=0;r<n.length;++r)null!=n[r].from&&e.push(n[r].marker)})),e},posFromIndex:function(e){var t,n=this.first,r=this.lineSeparator().length;return this.iter((function(i){var o=i.text.length+r;if(o>e)return t=e,!0;e-=o,++n})),Fe(this,fe(n,t))},indexFromPos:function(e){var t=(e=Fe(this,e)).ch;if(e.line<this.first||e.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,e.line,(function(e){t+=e.text.length+n})),t},copy:function(e){var t=new vi(Si(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,n=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<n&&(n=e.to);var r=new vi(Si(this,t,n),e.mode||this.modeOption,t,this.lineSep);return e.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:e.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.find(),o=e.clipPos(i.from),a=e.clipPos(i.to);if(he(o,a)){var s=Er(e,o,a,r.primary,r.primary.type);r.markers.push(s),s.parent=r}}}(r,Tr(this)),r},unlinkDoc:function(e){if(e instanceof S&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t)if(this.linked[t].doc==e){this.linked.splice(t,1),e.unlinkDoc(this),Sr(Tr(this));break}if(e.history==this.history){var n=[e.id];bi(e,(function(e){n.push(e.id)}),!0),e.history=new Ri(null),e.history.done=Fi(this.history.done,n),e.history.undone=Fi(this.history.undone,n)}},iterLinkedDocs:function(e){bi(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Qo(e)},lineSeparator:function(){return this.lineSep||"\n"}}),vi.prototype.eachLine=vi.prototype.iter;var yi="iter insert remove copy getEditor constructor".split(" ");for(var xi in vi.prototype)vi.prototype.hasOwnProperty(xi)&&yo(yi,xi)<0&&(S.prototype[xi]=function(e){return function(){return e.apply(this.doc,arguments)}}(vi.prototype[xi]));function bi(e,t,n){!function e(r,i,o){if(r.linked)for(var a=0;a<r.linked.length;++a){var s=r.linked[a];if(s.doc!=i){var l=o&&s.sharedHist;n&&!l||(t(s.doc,l),e(s.doc,r,l))}}}(e,null,!0)}function Ei(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,I(e),N(e),e.options.lineWrapping||M(e),e.options.mode=t.modeOption,tn(e)}function Ci(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t<o){n=i;break}t-=o}return n.lines[t]}function Ti(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,(function(e){var o=e.text;i==n.line&&(o=o.slice(0,n.ch)),i==t.line&&(o=o.slice(t.ch)),r.push(o),++i})),r}function Si(e,t,n){var r=[];return e.iter(t,n,(function(e){r.push(e.text)})),r}function wi(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function Ni(e){if(null==e.parent)return null;for(var t=e.parent,n=yo(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function Li(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var i=e.children[r],o=i.height;if(t<o){e=i;continue e}t-=o,n+=i.chunkSize()}return n}while(!e.lines);for(r=0;r<e.lines.length;++r){var a=e.lines[r].height;if(t<a)break;t-=a}return n+r}function Ai(e){for(var t=0,n=(e=Hr(e)).parent,r=0;r<n.lines.length;++r){var i=n.lines[r];if(i==e)break;t+=i.height}for(var o=n.parent;o;o=(n=o).parent)for(r=0;r<o.children.length;++r){var a=o.children[r];if(a==n)break;t+=a.height}return t}function Ii(e){var t=e.order;return null==t&&(t=e.order=da(e.text)),t}function Ri(e){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function ki(e,t){var n={from:ge(t.from),to:Dn(t),text:Ti(e,t.from,t.to)};return Mi(e,n,t.from.line,t.to.line+1),bi(e,(function(e){Mi(e,n,t.from.line,t.to.line+1)}),!0),n}function _i(e){for(;e.length&&mo(e).ranges;)e.pop()}function Oi(e,t,n,r){var i=e.history;i.undone.length=0;var o,a=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&e.cm&&i.lastModTime>a-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(o=function(e,t){return t?(_i(e.done),mo(e.done)):e.done.length&&!mo(e.done).ranges?mo(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),mo(e.done)):void 0}(i,i.lastOp==r))){var s=mo(o.changes);0==he(t.from,t.to)&&0==he(t.from,s.to)?s.to=Dn(t):o.changes.push(ki(e,t))}else{var l=mo(i.done);for(l&&l.ranges||Di(e.sel,i.done),o={changes:[ki(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=a,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,s||Ki(e,"historyAdded")}function Di(e,t){var n=mo(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Mi(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),(function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=n.markedSpans),++o}))}function Pi(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||(t=e.slice(0,n)):t&&t.push(e[n]);return t?t.length?t:null:e}function Fi(e,t,n){for(var r=0,i=[];r<e.length;++r){var o=e[r];if(o.ranges)i.push(n?_e.prototype.deepCopy.call(o):o);else{var a=o.changes,s=[];i.push({changes:s});for(var l=0;l<a.length;++l){var u,c=a[l];if(s.push({from:c.from,to:c.to,text:c.text}),t)for(var d in c)(u=d.match(/^spans_(\d+)$/))&&yo(t,Number(u[1]))>-1&&(mo(s)[d]=c[d],delete c[d])}}}return i}function ji(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function Bi(e,t,n,r){for(var i=0;i<e.length;++i){var o=e[i],a=!0;if(o.ranges){o.copied||((o=e[i]=o.deepCopy()).copied=!0);for(var s=0;s<o.ranges.length;s++)ji(o.ranges[s].anchor,t,n,r),ji(o.ranges[s].head,t,n,r)}else{for(s=0;s<o.changes.length;++s){var l=o.changes[s];if(n<l.from.line)l.from=fe(l.from.line+r,l.from.ch),l.to=fe(l.to.line+r,l.to.ch);else if(t<=l.to.line){a=!1;break}}a||(e.splice(0,i+1),i=0)}}}function Hi(e,t){var n=t.from.line,r=t.to.line,i=t.text.length-(r-n)-1;Bi(e.done,n,r,i),Bi(e.undone,n,r,i)}io(vi);var Gi=S.e_preventDefault=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1},Ui=S.e_stopPropagation=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0};function Vi(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}var Wi=S.e_stop=function(e){Gi(e),Ui(e)};function qi(e){return e.target||e.srcElement}function zi(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),m&&e.ctrlKey&&1==t&&(t=3),t}var $i=S.on=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var r=e._handlers||(e._handlers={});(r[t]||(r[t]=[])).push(n)}},Xi=[];function Qi(e,t,n){var r=e._handlers&&e._handlers[t];return n?r&&r.length>0?r.slice():Xi:r||Xi}var Yi=S.off=function(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else for(var r=Qi(e,t,!1),i=0;i<r.length;++i)if(r[i]==n){r.splice(i,1);break}},Ki=S.signal=function(e,t){var n=Qi(e,t,!0);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i<n.length;++i)n[i].apply(null,r)},Ji=null;function Zi(e,t){var n=Qi(e,t,!1);if(n.length){var r,i=Array.prototype.slice.call(arguments,2);Ht?r=Ht.delayedCallbacks:Ji?r=Ji:(r=Ji=[],setTimeout(eo,0));for(var o=0;o<n.length;++o)r.push(a(n[o]))}function a(e){return function(){e.apply(null,i)}}}function eo(){var e=Ji;Ji=null;for(var t=0;t<e.length;++t)e[t]()}function to(e,t,n){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Ki(e,n||t.type,e,t),Vi(t)||t.codemirrorIgnore}function no(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)-1==yo(n,t[r])&&n.push(t[r])}function ro(e,t){return Qi(e,t).length>0}function io(e){e.prototype.on=function(e,t){$i(this,e,t)},e.prototype.off=function(e,t){Yi(this,e,t)}}var oo=30,ao=S.Pass={toString:function(){return"CodeMirror.Pass"}},so={scroll:!1},lo={origin:"*mouse"},uo={origin:"+move"};function co(){this.id=null}co.prototype.set=function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)};var po=S.countColumn=function(e,t,n,r,i){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var o=r||0,a=i||0;;){var s=e.indexOf("\t",o);if(s<0||s>=t)return a+(t-o);a+=s-o,a+=n-a%n,o=s+1}},fo=S.findColumn=function(e,t,n){for(var r=0,i=0;;){var o=e.indexOf("\t",r);-1==o&&(o=e.length);var a=o-r;if(o==e.length||i+a>=t)return r+Math.min(a,t-i);if(i+=o-r,r=o+1,(i+=n-i%n)>=t)return r}},ho=[""];function go(e){for(;ho.length<=e;)ho.push(mo(ho)+" ");return ho[e]}function mo(e){return e[e.length-1]}var vo=function(e){e.select()};function yo(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}function xo(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function bo(){}function Eo(e,t){var n;return Object.create?n=Object.create(e):(bo.prototype=e,n=new bo),t&&Co(t,n),n}function Co(e,t,n){for(var r in t||(t={}),e)!e.hasOwnProperty(r)||!1===n&&t.hasOwnProperty(r)||(t[r]=e[r]);return t}function To(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}h?vo=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:o&&(vo=function(e){try{e.select()}catch(e){}});var So=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,wo=S.isWordChar=function(e){return/\w/.test(e)||e>""&&(e.toUpperCase()!=e.toLowerCase()||So.test(e))};function No(e,t){return t?!!(t.source.indexOf("\\w")>-1&&wo(e))||t.test(e):wo(e)}function Lo(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var Ao,Io=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function Ro(e){return e.charCodeAt(0)>=768&&Io.test(e)}function ko(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function _o(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function Oo(e,t){return _o(e).appendChild(t)}Ao=document.createRange?function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(e){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var Do=S.contains=function(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)};function Mo(){for(var e=document.activeElement;e&&e.root&&e.root.activeElement;)e=e.root.activeElement;return e}function Po(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}o&&a<11&&(Mo=function(){try{return document.activeElement}catch(e){return document.body}});var Fo=S.rmClass=function(e,t){var n=e.className,r=Po(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}},jo=S.addClass=function(e,t){var n=e.className;Po(t).test(n)||(e.className+=(n?" ":"")+t)};function Bo(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!Po(n[r]).test(t)&&(t+=" "+n[r]);return t}function Ho(e){if(document.body.getElementsByClassName)for(var t=document.body.getElementsByClassName("CodeMirror"),n=0;n<t.length;n++){var r=t[n].CodeMirror;r&&e(r)}}var Go,Uo,Vo=!1,Wo=function(){if(o&&a<9)return!1;var e=ko("div");return"draggable"in e||"dragDrop"in e}();function qo(e){if(null==Go){var t=ko("span","");Oo(e,ko("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Go=t.offsetWidth<=1&&t.offsetHeight>2&&!(o&&a<8))}var n=Go?ko("span",""):ko("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function zo(e){if(null!=Uo)return Uo;var t=Oo(e,document.createTextNode("AخA")),n=Ao(t,0,1).getBoundingClientRect(),r=Ao(t,1,2).getBoundingClientRect();return _o(e),!(!n||n.left==n.right)&&(Uo=r.right-n.right<3)}var $o,Xo,Qo=S.splitLines=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),t+=a+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Yo=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){try{var t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Ko="oncopy"in($o=ko("div"))||($o.setAttribute("oncopy","return;"),"function"==typeof $o.oncopy),Jo=null,Zo=S.keyNames={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"};function ea(e){return e.level%2?e.to:e.from}function ta(e){return e.level%2?e.from:e.to}function na(e){var t=Ii(e);return t?ea(t[0]):0}function ra(e){var t=Ii(e);return t?ta(mo(t)):e.text.length}function ia(e,t){var n=Ci(e.doc,t),r=Hr(n);r!=n&&(t=Ni(r));var i=Ii(r),o=i?i[0].level%2?ra(r):na(r):0;return fe(t,o)}function oa(e,t){var n=ia(e,t.line),r=Ci(e.doc,n.line),i=Ii(r);if(!i||0==i[0].level){var o=Math.max(0,r.text.search(/\S/)),a=t.line==n.line&&t.ch<=o&&t.ch;return fe(n.line,a?0:o)}return n}function aa(e,t,n){var r=e[0].level;return t==r||n!=r&&t<n}function sa(e,t){Xo=null;for(var n,r=0;r<e.length;++r){var i=e[r];if(i.from<t&&i.to>t)return r;if(i.from==t||i.to==t){if(null!=n)return aa(e,i.level,e[n].level)?(i.from!=i.to&&(Xo=n),r):(i.from!=i.to&&(Xo=r),n);n=r}}return n}function la(e,t,n,r){if(!r)return t+n;do{t+=n}while(t>0&&Ro(e.text.charAt(t)));return t}function ua(e,t,n,r){var i=Ii(e);if(!i)return ca(e,t,n,r);for(var o=sa(i,t),a=i[o],s=la(e,t,a.level%2?-n:n,r);;){if(s>a.from&&s<a.to)return s;if(s==a.from||s==a.to)return sa(i,s)==o?s:n>0==(a=i[o+=n]).level%2?a.to:a.from;if(!(a=i[o+=n]))return null;s=n>0==a.level%2?la(e,a.to,-1,r):la(e,a.from,1,r)}}function ca(e,t,n,r){var i=t+n;if(r)for(;i>0&&Ro(e.text.charAt(i));)i+=n;return i<0||i>e.text.length?null:i}!function(){for(var e=0;e<10;e++)Zo[e+48]=Zo[e+96]=String(e);for(e=65;e<=90;e++)Zo[e]=String.fromCharCode(e);for(e=1;e<=12;e++)Zo[e+111]=Zo[e+63235]="F"+e}();var da=function(){var e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,t=/[stwN]/,n=/[LRr]/,r=/[Lb1n]/,i=/[1n]/;function o(e,t,n){this.level=e,this.from=t,this.to=n}return function(a){if(!e.test(a))return!1;for(var s,l=a.length,u=[],c=0;c<l;++c)u.push(m=(s=a.charCodeAt(c))<=247?"bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN".charAt(s):1424<=s&&s<=1524?"R":1536<=s&&s<=1773?"rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm".charAt(s-1536):1774<=s&&s<=2220?"r":8192<=s&&s<=8203?"w":8204==s?"b":"L");c=0;for(var d="L";c<l;++c)"m"==(m=u[c])?u[c]=d:d=m;c=0;for(var p="L";c<l;++c)"1"==(m=u[c])&&"r"==p?u[c]="n":n.test(m)&&(p=m,"r"==m&&(u[c]="R"));for(c=1,d=u[0];c<l-1;++c)"+"==(m=u[c])&&"1"==d&&"1"==u[c+1]?u[c]="1":","!=m||d!=u[c+1]||"1"!=d&&"n"!=d||(u[c]=d),d=m;for(c=0;c<l;++c)if(","==(m=u[c]))u[c]="N";else if("%"==m){for(var f=c+1;f<l&&"%"==u[f];++f);for(var h=c&&"!"==u[c-1]||f<l&&"1"==u[f]?"1":"N",g=c;g<f;++g)u[g]=h;c=f-1}for(c=0,p="L";c<l;++c){var m=u[c];"L"==p&&"1"==m?u[c]="L":n.test(m)&&(p=m)}for(c=0;c<l;++c)if(t.test(u[c])){for(f=c+1;f<l&&t.test(u[f]);++f);var v="L"==(c?u[c-1]:"L"),y="L"==(f<l?u[f]:"L");for(h=v||y?"L":"R",g=c;g<f;++g)u[g]=h;c=f-1}var x,b=[];for(c=0;c<l;)if(r.test(u[c])){var E=c;for(++c;c<l&&r.test(u[c]);++c);b.push(new o(0,E,c))}else{var C=c,T=b.length;for(++c;c<l&&"L"!=u[c];++c);for(g=C;g<c;)if(i.test(u[g])){C<g&&b.splice(T,0,new o(1,C,g));var S=g;for(++g;g<c&&i.test(u[g]);++g);b.splice(T,0,new o(2,S,g)),C=g}else++g;C<c&&b.splice(T,0,new o(1,C,c))}return 1==b[0].level&&(x=a.match(/^\s+/))&&(b[0].from=x[0].length,b.unshift(new o(0,0,x[0].length))),1==mo(b).level&&(x=a.match(/\s+$/))&&(mo(b).to-=x[0].length,b.push(new o(0,l-x[0].length,l))),2==b[0].level&&b.unshift(new o(1,b[0].to,b[0].to)),b[0].level!=mo(b).level&&b.push(new o(b[0].level,l,l)),b}}();return S.version="5.17.0",S}))},{}],16:[function(e,t,n){
|
|
2
|
-
/*!
|
|
3
|
-
* jQuery JavaScript Library v2.2.4
|
|
4
|
-
* http://jquery.com/
|
|
5
|
-
*
|
|
6
|
-
* Includes Sizzle.js
|
|
7
|
-
* http://sizzlejs.com/
|
|
8
|
-
*
|
|
9
|
-
* Copyright jQuery Foundation and other contributors
|
|
10
|
-
* Released under the MIT license
|
|
11
|
-
* http://jquery.org/license
|
|
12
|
-
*
|
|
13
|
-
* Date: 2016-05-20T17:23Z
|
|
14
|
-
*/
|
|
15
|
-
!function(e,n){"object"==typeof t&&"object"==typeof t.exports?t.exports=e.document?n(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(e)}("undefined"!=typeof window?window:this,(function(e,t){var n=[],r=e.document,i=n.slice,o=n.concat,a=n.push,s=n.indexOf,l={},u=l.toString,c=l.hasOwnProperty,d={},p=function(e,t){return new p.fn.init(e,t)},f=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,h=/^-ms-/,g=/-([\da-z])/gi,m=function(e,t){return t.toUpperCase()};function v(e){var t=!!e&&"length"in e&&e.length,n=p.type(e);return"function"!==n&&!p.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}p.fn=p.prototype={jquery:"2.2.4",constructor:p,selector:"",length:0,toArray:function(){return i.call(this)},get:function(e){return null!=e?e<0?this[e+this.length]:this[e]:i.call(this)},pushStack:function(e){var t=p.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e){return p.each(this,e)},map:function(e){return this.pushStack(p.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(i.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:a,sort:n.sort,splice:n.splice},p.extend=p.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,l=arguments.length,u=!1;for("boolean"==typeof a&&(u=a,a=arguments[s]||{},s++),"object"==typeof a||p.isFunction(a)||(a={}),s===l&&(a=this,s--);s<l;s++)if(null!=(e=arguments[s]))for(t in e)n=a[t],a!==(r=e[t])&&(u&&r&&(p.isPlainObject(r)||(i=p.isArray(r)))?(i?(i=!1,o=n&&p.isArray(n)?n:[]):o=n&&p.isPlainObject(n)?n:{},a[t]=p.extend(u,o,r)):void 0!==r&&(a[t]=r));return a},p.extend({expando:"jQuery"+("2.2.4"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===p.type(e)},isArray:Array.isArray,isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){var t=e&&e.toString();return!p.isArray(e)&&t-parseFloat(t)+1>=0},isPlainObject:function(e){var t;if("object"!==p.type(e)||e.nodeType||p.isWindow(e))return!1;if(e.constructor&&!c.call(e,"constructor")&&!c.call(e.constructor.prototype||{},"isPrototypeOf"))return!1;for(t in e);return void 0===t||c.call(e,t)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[u.call(e)]||"object":typeof e},globalEval:function(e){var t,n=eval;(e=p.trim(e))&&(1===e.indexOf("use strict")?((t=r.createElement("script")).text=e,r.head.appendChild(t).parentNode.removeChild(t)):n(e))},camelCase:function(e){return e.replace(h,"ms-").replace(g,m)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var n,r=0;if(v(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:function(e){return null==e?"":(e+"").replace(f,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(v(Object(e))?p.merge(n,"string"==typeof e?[e]:e):a.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:s.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,a=0,s=[];if(v(e))for(r=e.length;a<r;a++)null!=(i=t(e[a],a,n))&&s.push(i);else for(a in e)null!=(i=t(e[a],a,n))&&s.push(i);return o.apply([],s)},guid:1,proxy:function(e,t){var n,r,o;if("string"==typeof t&&(n=e[t],t=e,e=n),p.isFunction(e))return r=i.call(arguments,2),(o=function(){return e.apply(t||this,r.concat(i.call(arguments)))}).guid=e.guid=e.guid||p.guid++,o},now:Date.now,support:d}),"function"==typeof Symbol&&(p.fn[Symbol.iterator]=n[Symbol.iterator]),p.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(e,t){l["[object "+t+"]"]=t.toLowerCase()}));var y=
|
|
16
|
-
/*!
|
|
17
|
-
* Sizzle CSS Selector Engine v2.2.1
|
|
18
|
-
* http://sizzlejs.com/
|
|
19
|
-
*
|
|
20
|
-
* Copyright jQuery Foundation and other contributors
|
|
21
|
-
* Released under the MIT license
|
|
22
|
-
* http://jquery.org/license
|
|
23
|
-
*
|
|
24
|
-
* Date: 2015-10-17
|
|
25
|
-
*/
|
|
26
|
-
function(e){var t,n,r,i,o,a,s,l,u,c,d,p,f,h,g,m,v,y,x,b="sizzle"+1*new Date,E=e.document,C=0,T=0,S=ie(),w=ie(),N=ie(),L=function(e,t){return e===t&&(d=!0),0},A={}.hasOwnProperty,I=[],R=I.pop,k=I.push,_=I.push,O=I.slice,D=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},M="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",P="[\\x20\\t\\r\\n\\f]",F="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",j="\\["+P+"*("+F+")(?:"+P+"*([*^$|!~]?=)"+P+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+F+"))|)"+P+"*\\]",B=":("+F+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+j+")*)|.*)\\)|)",H=new RegExp(P+"+","g"),G=new RegExp("^"+P+"+|((?:^|[^\\\\])(?:\\\\.)*)"+P+"+$","g"),U=new RegExp("^"+P+"*,"+P+"*"),V=new RegExp("^"+P+"*([>+~]|"+P+")"+P+"*"),W=new RegExp("="+P+"*([^\\]'\"]*?)"+P+"*\\]","g"),q=new RegExp(B),z=new RegExp("^"+F+"$"),$={ID:new RegExp("^#("+F+")"),CLASS:new RegExp("^\\.("+F+")"),TAG:new RegExp("^("+F+"|[*])"),ATTR:new RegExp("^"+j),PSEUDO:new RegExp("^"+B),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:new RegExp("^(?:"+M+")$","i"),needsContext:new RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},X=/^(?:input|select|textarea|button)$/i,Q=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,K=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,J=/[+~]/,Z=/'|\\/g,ee=new RegExp("\\\\([\\da-f]{1,6}"+P+"?|("+P+")|.)","ig"),te=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},ne=function(){p()};try{_.apply(I=O.call(E.childNodes),E.childNodes),I[E.childNodes.length].nodeType}catch(e){_={apply:I.length?function(e,t){k.apply(e,O.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function re(e,t,r,i){var o,s,u,c,d,h,v,y,C=t&&t.ownerDocument,T=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==T&&9!==T&&11!==T)return r;if(!i&&((t?t.ownerDocument||t:E)!==f&&p(t),t=t||f,g)){if(11!==T&&(h=K.exec(e)))if(o=h[1]){if(9===T){if(!(u=t.getElementById(o)))return r;if(u.id===o)return r.push(u),r}else if(C&&(u=C.getElementById(o))&&x(t,u)&&u.id===o)return r.push(u),r}else{if(h[2])return _.apply(r,t.getElementsByTagName(e)),r;if((o=h[3])&&n.getElementsByClassName&&t.getElementsByClassName)return _.apply(r,t.getElementsByClassName(o)),r}if(n.qsa&&!N[e+" "]&&(!m||!m.test(e))){if(1!==T)C=t,y=e;else if("object"!==t.nodeName.toLowerCase()){for((c=t.getAttribute("id"))?c=c.replace(Z,"\\$&"):t.setAttribute("id",c=b),s=(v=a(e)).length,d=z.test(c)?"#"+c:"[id='"+c+"']";s--;)v[s]=d+" "+he(v[s]);y=v.join(","),C=J.test(e)&&pe(t.parentNode)||t}if(y)try{return _.apply(r,C.querySelectorAll(y)),r}catch(e){}finally{c===b&&t.removeAttribute("id")}}}return l(e.replace(G,"$1"),t,r,i)}function ie(){var e=[];return function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}}function oe(e){return e[b]=!0,e}function ae(e){var t=f.createElement("div");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function se(e,t){for(var n=e.split("|"),i=n.length;i--;)r.attrHandle[n[i]]=t}function le(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||1<<31)-(~e.sourceIndex||1<<31);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function ue(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function ce(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function de(e){return oe((function(t){return t=+t,oe((function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))}))}))}function pe(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=re.support={},o=re.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},p=re.setDocument=function(e){var t,i,a=e?e.ownerDocument||e:E;return a!==f&&9===a.nodeType&&a.documentElement?(h=(f=a).documentElement,g=!o(f),(i=f.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",ne,!1):i.attachEvent&&i.attachEvent("onunload",ne)),n.attributes=ae((function(e){return e.className="i",!e.getAttribute("className")})),n.getElementsByTagName=ae((function(e){return e.appendChild(f.createComment("")),!e.getElementsByTagName("*").length})),n.getElementsByClassName=Y.test(f.getElementsByClassName),n.getById=ae((function(e){return h.appendChild(e).id=b,!f.getElementsByName||!f.getElementsByName(b).length})),n.getById?(r.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n=t.getElementById(e);return n?[n]:[]}},r.filter.ID=function(e){var t=e.replace(ee,te);return function(e){return e.getAttribute("id")===t}}):(delete r.find.ID,r.filter.ID=function(e){var t=e.replace(ee,te);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}),r.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&g)return t.getElementsByClassName(e)},v=[],m=[],(n.qsa=Y.test(f.querySelectorAll))&&(ae((function(e){h.appendChild(e).innerHTML="<a id='"+b+"'></a><select id='"+b+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]="+P+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||m.push("\\["+P+"*(?:value|"+M+")"),e.querySelectorAll("[id~="+b+"-]").length||m.push("~="),e.querySelectorAll(":checked").length||m.push(":checked"),e.querySelectorAll("a#"+b+"+*").length||m.push(".#.+[+~]")})),ae((function(e){var t=f.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&m.push("name"+P+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||m.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),m.push(",.*:")}))),(n.matchesSelector=Y.test(y=h.matches||h.webkitMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&ae((function(e){n.disconnectedMatch=y.call(e,"div"),y.call(e,"[s!='']:x"),v.push("!=",B)})),m=m.length&&new RegExp(m.join("|")),v=v.length&&new RegExp(v.join("|")),t=Y.test(h.compareDocumentPosition),x=t||Y.test(h.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},L=t?function(e,t){if(e===t)return d=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e===f||e.ownerDocument===E&&x(E,e)?-1:t===f||t.ownerDocument===E&&x(E,t)?1:c?D(c,e)-D(c,t):0:4&r?-1:1)}:function(e,t){if(e===t)return d=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===f?-1:t===f?1:i?-1:o?1:c?D(c,e)-D(c,t):0;if(i===o)return le(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;a[r]===s[r];)r++;return r?le(a[r],s[r]):a[r]===E?-1:s[r]===E?1:0},f):f},re.matches=function(e,t){return re(e,null,null,t)},re.matchesSelector=function(e,t){if((e.ownerDocument||e)!==f&&p(e),t=t.replace(W,"='$1']"),n.matchesSelector&&g&&!N[t+" "]&&(!v||!v.test(t))&&(!m||!m.test(t)))try{var r=y.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return re(t,f,null,[e]).length>0},re.contains=function(e,t){return(e.ownerDocument||e)!==f&&p(e),x(e,t)},re.attr=function(e,t){(e.ownerDocument||e)!==f&&p(e);var i=r.attrHandle[t.toLowerCase()],o=i&&A.call(r.attrHandle,t.toLowerCase())?i(e,t,!g):void 0;return void 0!==o?o:n.attributes||!g?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},re.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},re.uniqueSort=function(e){var t,r=[],i=0,o=0;if(d=!n.detectDuplicates,c=!n.sortStable&&e.slice(0),e.sort(L),d){for(;t=e[o++];)t===e[o]&&(i=r.push(o));for(;i--;)e.splice(r[i],1)}return c=null,e},i=re.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r++];)n+=i(t);return n},(r=re.selectors={cacheLength:50,createPseudo:oe,match:$,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(ee,te),e[3]=(e[3]||e[4]||e[5]||"").replace(ee,te),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||re.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&re.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return $.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&q.test(n)&&(t=a(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(ee,te).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=S[e+" "];return t||(t=new RegExp("(^|"+P+")"+e+"("+P+"|$)"))&&S(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(r){var i=re.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace(H," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var u,c,d,p,f,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,v=s&&t.nodeName.toLowerCase(),y=!l&&!s,x=!1;if(m){if(o){for(;g;){for(p=t;p=p[g];)if(s?p.nodeName.toLowerCase()===v:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&y){for(x=(f=(u=(c=(d=(p=m)[b]||(p[b]={}))[p.uniqueID]||(d[p.uniqueID]={}))[e]||[])[0]===C&&u[1])&&u[2],p=f&&m.childNodes[f];p=++f&&p&&p[g]||(x=f=0)||h.pop();)if(1===p.nodeType&&++x&&p===t){c[e]=[C,f,x];break}}else if(y&&(x=f=(u=(c=(d=(p=t)[b]||(p[b]={}))[p.uniqueID]||(d[p.uniqueID]={}))[e]||[])[0]===C&&u[1]),!1===x)for(;(p=++f&&p&&p[g]||(x=f=0)||h.pop())&&((s?p.nodeName.toLowerCase()!==v:1!==p.nodeType)||!++x||(y&&((c=(d=p[b]||(p[b]={}))[p.uniqueID]||(d[p.uniqueID]={}))[e]=[C,x]),p!==t)););return(x-=i)===r||x%r==0&&x/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||re.error("unsupported pseudo: "+e);return i[b]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?oe((function(e,n){for(var r,o=i(e,t),a=o.length;a--;)e[r=D(e,o[a])]=!(n[r]=o[a])})):function(e){return i(e,0,n)}):i}},pseudos:{not:oe((function(e){var t=[],n=[],r=s(e.replace(G,"$1"));return r[b]?oe((function(e,t,n,i){for(var o,a=r(e,null,i,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))})):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}})),has:oe((function(e){return function(t){return re(e,t).length>0}})),contains:oe((function(e){return e=e.replace(ee,te),function(t){return(t.textContent||t.innerText||i(t)).indexOf(e)>-1}})),lang:oe((function(e){return z.test(e||"")||re.error("unsupported lang: "+e),e=e.replace(ee,te).toLowerCase(),function(t){var n;do{if(n=g?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===h},focus:function(e){return e===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return!1===e.disabled},disabled:function(e){return!0===e.disabled},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return Q.test(e.nodeName)},input:function(e){return X.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:de((function(){return[0]})),last:de((function(e,t){return[t-1]})),eq:de((function(e,t,n){return[n<0?n+t:n]})),even:de((function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e})),odd:de((function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e})),lt:de((function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e})),gt:de((function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e}))}}).pseudos.nth=r.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[t]=ue(t);for(t in{submit:!0,reset:!0})r.pseudos[t]=ce(t);function fe(){}function he(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function ge(e,t,n){var r=t.dir,i=n&&"parentNode"===r,o=T++;return t.first?function(t,n,o){for(;t=t[r];)if(1===t.nodeType||i)return e(t,n,o)}:function(t,n,a){var s,l,u,c=[C,o];if(a){for(;t=t[r];)if((1===t.nodeType||i)&&e(t,n,a))return!0}else for(;t=t[r];)if(1===t.nodeType||i){if((s=(l=(u=t[b]||(t[b]={}))[t.uniqueID]||(u[t.uniqueID]={}))[r])&&s[0]===C&&s[1]===o)return c[2]=s[2];if(l[r]=c,c[2]=e(t,n,a))return!0}}}function me(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function ve(e,t,n,r,i){for(var o,a=[],s=0,l=e.length,u=null!=t;s<l;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),u&&t.push(s)));return a}function ye(e,t,n,r,i,o){return r&&!r[b]&&(r=ye(r)),i&&!i[b]&&(i=ye(i,o)),oe((function(o,a,s,l){var u,c,d,p=[],f=[],h=a.length,g=o||function(e,t,n){for(var r=0,i=t.length;r<i;r++)re(e,t[r],n);return n}(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:ve(g,p,e,s,l),v=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,v,s,l),r)for(u=ve(v,f),r(u,[],s,l),c=u.length;c--;)(d=u[c])&&(v[f[c]]=!(m[f[c]]=d));if(o){if(i||e){if(i){for(u=[],c=v.length;c--;)(d=v[c])&&u.push(m[c]=d);i(null,v=[],u,l)}for(c=v.length;c--;)(d=v[c])&&(u=i?D(o,d):p[c])>-1&&(o[u]=!(a[u]=d))}}else v=ve(v===a?v.splice(h,v.length):v),i?i(null,a,v,l):_.apply(a,v)}))}function xe(e){for(var t,n,i,o=e.length,a=r.relative[e[0].type],s=a||r.relative[" "],l=a?1:0,c=ge((function(e){return e===t}),s,!0),d=ge((function(e){return D(t,e)>-1}),s,!0),p=[function(e,n,r){var i=!a&&(r||n!==u)||((t=n).nodeType?c(e,n,r):d(e,n,r));return t=null,i}];l<o;l++)if(n=r.relative[e[l].type])p=[ge(me(p),n)];else{if((n=r.filter[e[l].type].apply(null,e[l].matches))[b]){for(i=++l;i<o&&!r.relative[e[i].type];i++);return ye(l>1&&me(p),l>1&&he(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(G,"$1"),n,l<i&&xe(e.slice(l,i)),i<o&&xe(e=e.slice(i)),i<o&&he(e))}p.push(n)}return me(p)}return fe.prototype=r.filters=r.pseudos,r.setFilters=new fe,a=re.tokenize=function(e,t){var n,i,o,a,s,l,u,c=w[e+" "];if(c)return t?0:c.slice(0);for(s=e,l=[],u=r.preFilter;s;){for(a in n&&!(i=U.exec(s))||(i&&(s=s.slice(i[0].length)||s),l.push(o=[])),n=!1,(i=V.exec(s))&&(n=i.shift(),o.push({value:n,type:i[0].replace(G," ")}),s=s.slice(n.length)),r.filter)!(i=$[a].exec(s))||u[a]&&!(i=u[a](i))||(n=i.shift(),o.push({value:n,type:a,matches:i}),s=s.slice(n.length));if(!n)break}return t?s.length:s?re.error(e):w(e,l).slice(0)},s=re.compile=function(e,t){var n,i=[],o=[],s=N[e+" "];if(!s){for(t||(t=a(e)),n=t.length;n--;)(s=xe(t[n]))[b]?i.push(s):o.push(s);(s=N(e,function(e,t){var n=t.length>0,i=e.length>0,o=function(o,a,s,l,c){var d,h,m,v=0,y="0",x=o&&[],b=[],E=u,T=o||i&&r.find.TAG("*",c),S=C+=null==E?1:Math.random()||.1,w=T.length;for(c&&(u=a===f||a||c);y!==w&&null!=(d=T[y]);y++){if(i&&d){for(h=0,a||d.ownerDocument===f||(p(d),s=!g);m=e[h++];)if(m(d,a||f,s)){l.push(d);break}c&&(C=S)}n&&((d=!m&&d)&&v--,o&&x.push(d))}if(v+=y,n&&y!==v){for(h=0;m=t[h++];)m(x,b,a,s);if(o){if(v>0)for(;y--;)x[y]||b[y]||(b[y]=R.call(l));b=ve(b)}_.apply(l,b),c&&!o&&b.length>0&&v+t.length>1&&re.uniqueSort(l)}return c&&(C=S,u=E),x};return n?oe(o):o}(o,i))).selector=e}return s},l=re.select=function(e,t,i,o){var l,u,c,d,p,f="function"==typeof e&&e,h=!o&&a(e=f.selector||e);if(i=i||[],1===h.length){if((u=h[0]=h[0].slice(0)).length>2&&"ID"===(c=u[0]).type&&n.getById&&9===t.nodeType&&g&&r.relative[u[1].type]){if(!(t=(r.find.ID(c.matches[0].replace(ee,te),t)||[])[0]))return i;f&&(t=t.parentNode),e=e.slice(u.shift().value.length)}for(l=$.needsContext.test(e)?0:u.length;l--&&(c=u[l],!r.relative[d=c.type]);)if((p=r.find[d])&&(o=p(c.matches[0].replace(ee,te),J.test(u[0].type)&&pe(t.parentNode)||t))){if(u.splice(l,1),!(e=o.length&&he(u)))return _.apply(i,o),i;break}}return(f||s(e,h))(o,t,!g,i,!t||J.test(e)&&pe(t.parentNode)||t),i},n.sortStable=b.split("").sort(L).join("")===b,n.detectDuplicates=!!d,p(),n.sortDetached=ae((function(e){return 1&e.compareDocumentPosition(f.createElement("div"))})),ae((function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")}))||se("type|href|height|width",(function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)})),n.attributes&&ae((function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}))||se("value",(function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue})),ae((function(e){return null==e.getAttribute("disabled")}))||se(M,(function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null})),re}(e);p.find=y,p.expr=y.selectors,p.expr[":"]=p.expr.pseudos,p.uniqueSort=p.unique=y.uniqueSort,p.text=y.getText,p.isXMLDoc=y.isXML,p.contains=y.contains;var x=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&p(e).is(n))break;r.push(e)}return r},b=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},E=p.expr.match.needsContext,C=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,T=/^.[^:#\[\.,]*$/;function S(e,t,n){if(p.isFunction(t))return p.grep(e,(function(e,r){return!!t.call(e,r,e)!==n}));if(t.nodeType)return p.grep(e,(function(e){return e===t!==n}));if("string"==typeof t){if(T.test(t))return p.filter(t,e,n);t=p.filter(t,e)}return p.grep(e,(function(e){return s.call(t,e)>-1!==n}))}p.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?p.find.matchesSelector(r,e)?[r]:[]:p.find.matches(e,p.grep(t,(function(e){return 1===e.nodeType})))},p.fn.extend({find:function(e){var t,n=this.length,r=[],i=this;if("string"!=typeof e)return this.pushStack(p(e).filter((function(){for(t=0;t<n;t++)if(p.contains(i[t],this))return!0})));for(t=0;t<n;t++)p.find(e,i[t],r);return(r=this.pushStack(n>1?p.unique(r):r)).selector=this.selector?this.selector+" "+e:e,r},filter:function(e){return this.pushStack(S(this,e||[],!1))},not:function(e){return this.pushStack(S(this,e||[],!0))},is:function(e){return!!S(this,"string"==typeof e&&E.test(e)?p(e):e||[],!1).length}});var w,N=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;(p.fn.init=function(e,t,n){var i,o;if(!e)return this;if(n=n||w,"string"==typeof e){if(!(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:N.exec(e))||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof p?t[0]:t,p.merge(this,p.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:r,!0)),C.test(i[1])&&p.isPlainObject(t))for(i in t)p.isFunction(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return(o=r.getElementById(i[2]))&&o.parentNode&&(this.length=1,this[0]=o),this.context=r,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):p.isFunction(e)?void 0!==n.ready?n.ready(e):e(p):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),p.makeArray(e,this))}).prototype=p.fn,w=p(r);var L=/^(?:parents|prev(?:Until|All))/,A={children:!0,contents:!0,next:!0,prev:!0};function I(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}p.fn.extend({has:function(e){var t=p(e,this),n=t.length;return this.filter((function(){for(var e=0;e<n;e++)if(p.contains(this,t[e]))return!0}))},closest:function(e,t){for(var n,r=0,i=this.length,o=[],a=E.test(e)||"string"!=typeof e?p(e,t||this.context):0;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&p.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?p.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?s.call(p(e),this[0]):s.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(p.uniqueSort(p.merge(this.get(),p(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),p.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return x(e,"parentNode")},parentsUntil:function(e,t,n){return x(e,"parentNode",n)},next:function(e){return I(e,"nextSibling")},prev:function(e){return I(e,"previousSibling")},nextAll:function(e){return x(e,"nextSibling")},prevAll:function(e){return x(e,"previousSibling")},nextUntil:function(e,t,n){return x(e,"nextSibling",n)},prevUntil:function(e,t,n){return x(e,"previousSibling",n)},siblings:function(e){return b((e.parentNode||{}).firstChild,e)},children:function(e){return b(e.firstChild)},contents:function(e){return e.contentDocument||p.merge([],e.childNodes)}},(function(e,t){p.fn[e]=function(n,r){var i=p.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=p.filter(r,i)),this.length>1&&(A[e]||p.uniqueSort(i),L.test(e)&&i.reverse()),this.pushStack(i)}}));var R,k=/\S+/g;function _(){r.removeEventListener("DOMContentLoaded",_),e.removeEventListener("load",_),p.ready()}p.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return p.each(e.match(k)||[],(function(e,n){t[n]=!0})),t}(e):p.extend({},e);var t,n,r,i,o=[],a=[],s=-1,l=function(){for(i=e.once,r=t=!0;a.length;s=-1)for(n=a.shift();++s<o.length;)!1===o[s].apply(n[0],n[1])&&e.stopOnFalse&&(s=o.length,n=!1);e.memory||(n=!1),t=!1,i&&(o=n?[]:"")},u={add:function(){return o&&(n&&!t&&(s=o.length-1,a.push(n)),function t(n){p.each(n,(function(n,r){p.isFunction(r)?e.unique&&u.has(r)||o.push(r):r&&r.length&&"string"!==p.type(r)&&t(r)}))}(arguments),n&&!t&&l()),this},remove:function(){return p.each(arguments,(function(e,t){for(var n;(n=p.inArray(t,o,n))>-1;)o.splice(n,1),n<=s&&s--})),this},has:function(e){return e?p.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],a.push(n),t||l()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!r}};return u},p.extend({Deferred:function(e){var t=[["resolve","done",p.Callbacks("once memory"),"resolved"],["reject","fail",p.Callbacks("once memory"),"rejected"],["notify","progress",p.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return p.Deferred((function(n){p.each(t,(function(t,o){var a=p.isFunction(e[t])&&e[t];i[o[1]]((function(){var e=a&&a.apply(this,arguments);e&&p.isFunction(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[o[0]+"With"](this===r?n.promise():this,a?[e]:arguments)}))})),e=null})).promise()},promise:function(e){return null!=e?p.extend(e,r):r}},i={};return r.pipe=r.then,p.each(t,(function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add((function(){n=s}),t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith})),r.promise(i),e&&e.call(i,i),i},when:function(e){var t,n,r,o=0,a=i.call(arguments),s=a.length,l=1!==s||e&&p.isFunction(e.promise)?s:0,u=1===l?e:p.Deferred(),c=function(e,n,r){return function(o){n[e]=this,r[e]=arguments.length>1?i.call(arguments):o,r===t?u.notifyWith(n,r):--l||u.resolveWith(n,r)}};if(s>1)for(t=new Array(s),n=new Array(s),r=new Array(s);o<s;o++)a[o]&&p.isFunction(a[o].promise)?a[o].promise().progress(c(o,n,t)).done(c(o,r,a)).fail(u.reject):--l;return l||u.resolveWith(r,a),u.promise()}}),p.fn.ready=function(e){return p.ready.promise().done(e),this},p.extend({isReady:!1,readyWait:1,holdReady:function(e){e?p.readyWait++:p.ready(!0)},ready:function(e){(!0===e?--p.readyWait:p.isReady)||(p.isReady=!0,!0!==e&&--p.readyWait>0||(R.resolveWith(r,[p]),p.fn.triggerHandler&&(p(r).triggerHandler("ready"),p(r).off("ready"))))}}),p.ready.promise=function(t){return R||(R=p.Deferred(),"complete"===r.readyState||"loading"!==r.readyState&&!r.documentElement.doScroll?e.setTimeout(p.ready):(r.addEventListener("DOMContentLoaded",_),e.addEventListener("load",_))),R.promise(t)},p.ready.promise();var O=function(e,t,n,r,i,o,a){var s=0,l=e.length,u=null==n;if("object"===p.type(n))for(s in i=!0,n)O(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,p.isFunction(r)||(a=!0),u&&(a?(t.call(e,r),t=null):(u=t,t=function(e,t,n){return u.call(p(e),n)})),t))for(;s<l;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:u?t.call(e):l?t(e[0],n):o},D=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function M(){this.expando=p.expando+M.uid++}M.uid=1,M.prototype={register:function(e,t){var n=t||{};return e.nodeType?e[this.expando]=n:Object.defineProperty(e,this.expando,{value:n,writable:!0,configurable:!0}),e[this.expando]},cache:function(e){if(!D(e))return{};var t=e[this.expando];return t||(t={},D(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[t]=n;else for(r in t)i[r]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][t]},access:function(e,t,n){var r;return void 0===t||t&&"string"==typeof t&&void 0===n?void 0!==(r=this.get(e,t))?r:this.get(e,p.camelCase(t)):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r,i,o=e[this.expando];if(void 0!==o){if(void 0===t)this.register(e);else{p.isArray(t)?r=t.concat(t.map(p.camelCase)):(i=p.camelCase(t),r=t in o?[t,i]:(r=i)in o?[r]:r.match(k)||[]),n=r.length;for(;n--;)delete o[r[n]]}(void 0===t||p.isEmptyObject(o))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!p.isEmptyObject(t)}};var P=new M,F=new M,j=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,B=/[A-Z]/g;function H(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(B,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:j.test(n)?p.parseJSON(n):n)}catch(e){}F.set(e,t,n)}else n=void 0;return n}p.extend({hasData:function(e){return F.hasData(e)||P.hasData(e)},data:function(e,t,n){return F.access(e,t,n)},removeData:function(e,t){F.remove(e,t)},_data:function(e,t,n){return P.access(e,t,n)},_removeData:function(e,t){P.remove(e,t)}}),p.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=F.get(o),1===o.nodeType&&!P.get(o,"hasDataAttrs"))){for(n=a.length;n--;)a[n]&&0===(r=a[n].name).indexOf("data-")&&(r=p.camelCase(r.slice(5)),H(o,r,i[r]));P.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each((function(){F.set(this,e)})):O(this,(function(t){var n,r;if(o&&void 0===t)return void 0!==(n=F.get(o,e)||F.get(o,e.replace(B,"-$&").toLowerCase()))?n:(r=p.camelCase(e),void 0!==(n=F.get(o,r))||void 0!==(n=H(o,r,void 0))?n:void 0);r=p.camelCase(e),this.each((function(){var n=F.get(this,r);F.set(this,r,t),e.indexOf("-")>-1&&void 0!==n&&F.set(this,e,t)}))}),null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each((function(){F.remove(this,e)}))}}),p.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=P.get(e,t),n&&(!r||p.isArray(n)?r=P.access(e,t,p.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=p.queue(e,t),r=n.length,i=n.shift(),o=p._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,(function(){p.dequeue(e,t)}),o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return P.get(e,n)||P.access(e,n,{empty:p.Callbacks("once memory").add((function(){P.remove(e,[t+"queue",n])}))})}}),p.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?p.queue(this[0],e):void 0===t?this:this.each((function(){var n=p.queue(this,e,t);p._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&p.dequeue(this,e)}))},dequeue:function(e){return this.each((function(){p.dequeue(this,e)}))},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=p.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)(n=P.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var G=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,U=new RegExp("^(?:([+-])=|)("+G+")([a-z%]*)$","i"),V=["Top","Right","Bottom","Left"],W=function(e,t){return e=t||e,"none"===p.css(e,"display")||!p.contains(e.ownerDocument,e)};function q(e,t,n,r){var i,o=1,a=20,s=r?function(){return r.cur()}:function(){return p.css(e,t,"")},l=s(),u=n&&n[3]||(p.cssNumber[t]?"":"px"),c=(p.cssNumber[t]||"px"!==u&&+l)&&U.exec(p.css(e,t));if(c&&c[3]!==u){u=u||c[3],n=n||[],c=+l||1;do{c/=o=o||".5",p.style(e,t,c+u)}while(o!==(o=s()/l)&&1!==o&&--a)}return n&&(c=+c||+l||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=u,r.start=c,r.end=i)),i}var z=/^(?:checkbox|radio)$/i,$=/<([\w:-]+)/,X=/^$|\/(?:java|ecma)script/i,Q={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function Y(e,t){var n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&p.nodeName(e,t)?p.merge([e],n):n}function K(e,t){for(var n=0,r=e.length;n<r;n++)P.set(e[n],"globalEval",!t||P.get(t[n],"globalEval"))}Q.optgroup=Q.option,Q.tbody=Q.tfoot=Q.colgroup=Q.caption=Q.thead,Q.th=Q.td;var J,Z,ee=/<|&#?\w+;/;function te(e,t,n,r,i){for(var o,a,s,l,u,c,d=t.createDocumentFragment(),f=[],h=0,g=e.length;h<g;h++)if((o=e[h])||0===o)if("object"===p.type(o))p.merge(f,o.nodeType?[o]:o);else if(ee.test(o)){for(a=a||d.appendChild(t.createElement("div")),s=($.exec(o)||["",""])[1].toLowerCase(),l=Q[s]||Q._default,a.innerHTML=l[1]+p.htmlPrefilter(o)+l[2],c=l[0];c--;)a=a.lastChild;p.merge(f,a.childNodes),(a=d.firstChild).textContent=""}else f.push(t.createTextNode(o));for(d.textContent="",h=0;o=f[h++];)if(r&&p.inArray(o,r)>-1)i&&i.push(o);else if(u=p.contains(o.ownerDocument,o),a=Y(d.appendChild(o),"script"),u&&K(a),n)for(c=0;o=a[c++];)X.test(o.type||"")&&n.push(o);return d}J=r.createDocumentFragment().appendChild(r.createElement("div")),(Z=r.createElement("input")).setAttribute("type","radio"),Z.setAttribute("checked","checked"),Z.setAttribute("name","t"),J.appendChild(Z),d.checkClone=J.cloneNode(!0).cloneNode(!0).lastChild.checked,J.innerHTML="<textarea>x</textarea>",d.noCloneChecked=!!J.cloneNode(!0).lastChild.defaultValue;var ne=/^key/,re=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ie=/^([^.]*)(?:\.(.+)|)/;function oe(){return!0}function ae(){return!1}function se(){try{return r.activeElement}catch(e){}}function le(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)le(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=ae;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return p().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=p.guid++)),e.each((function(){p.event.add(this,t,i,r,n)}))}p.event={global:{},add:function(e,t,n,r,i){var o,a,s,l,u,c,d,f,h,g,m,v=P.get(e);if(v)for(n.handler&&(n=(o=n).handler,i=o.selector),n.guid||(n.guid=p.guid++),(l=v.events)||(l=v.events={}),(a=v.handle)||(a=v.handle=function(t){return void 0!==p&&p.event.triggered!==t.type?p.event.dispatch.apply(e,arguments):void 0}),u=(t=(t||"").match(k)||[""]).length;u--;)h=m=(s=ie.exec(t[u])||[])[1],g=(s[2]||"").split(".").sort(),h&&(d=p.event.special[h]||{},h=(i?d.delegateType:d.bindType)||h,d=p.event.special[h]||{},c=p.extend({type:h,origType:m,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&p.expr.match.needsContext.test(i),namespace:g.join(".")},o),(f=l[h])||((f=l[h]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(e,r,g,a)||e.addEventListener&&e.addEventListener(h,a)),d.add&&(d.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?f.splice(f.delegateCount++,0,c):f.push(c),p.event.global[h]=!0)},remove:function(e,t,n,r,i){var o,a,s,l,u,c,d,f,h,g,m,v=P.hasData(e)&&P.get(e);if(v&&(l=v.events)){for(u=(t=(t||"").match(k)||[""]).length;u--;)if(h=m=(s=ie.exec(t[u])||[])[1],g=(s[2]||"").split(".").sort(),h){for(d=p.event.special[h]||{},f=l[h=(r?d.delegateType:d.bindType)||h]||[],s=s[2]&&new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=f.length;o--;)c=f[o],!i&&m!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(f.splice(o,1),c.selector&&f.delegateCount--,d.remove&&d.remove.call(e,c));a&&!f.length&&(d.teardown&&!1!==d.teardown.call(e,g,v.handle)||p.removeEvent(e,h,v.handle),delete l[h])}else for(h in l)p.event.remove(e,h+t[u],n,r,!0);p.isEmptyObject(l)&&P.remove(e,"handle events")}},dispatch:function(e){e=p.event.fix(e);var t,n,r,o,a,s=[],l=i.call(arguments),u=(P.get(this,"events")||{})[e.type]||[],c=p.event.special[e.type]||{};if(l[0]=e,e.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,e)){for(s=p.event.handlers.call(this,e,u),t=0;(o=s[t++])&&!e.isPropagationStopped();)for(e.currentTarget=o.elem,n=0;(a=o.handlers[n++])&&!e.isImmediatePropagationStopped();)e.rnamespace&&!e.rnamespace.test(a.namespace)||(e.handleObj=a,e.data=a.data,void 0!==(r=((p.event.special[a.origType]||{}).handle||a.handler).apply(o.elem,l))&&!1===(e.result=r)&&(e.preventDefault(),e.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,i,o,a=[],s=t.delegateCount,l=e.target;if(s&&l.nodeType&&("click"!==e.type||isNaN(e.button)||e.button<1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&(!0!==l.disabled||"click"!==e.type)){for(r=[],n=0;n<s;n++)void 0===r[i=(o=t[n]).selector+" "]&&(r[i]=o.needsContext?p(i,this).index(l)>-1:p.find(i,this,null,[l]).length),r[i]&&r.push(o);r.length&&a.push({elem:l,handlers:r})}return s<t.length&&a.push({elem:this,handlers:t.slice(s)}),a},props:"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,i,o,a=t.button;return null==e.pageX&&null!=t.clientX&&(i=(n=e.target.ownerDocument||r).documentElement,o=n.body,e.pageX=t.clientX+(i&&i.scrollLeft||o&&o.scrollLeft||0)-(i&&i.clientLeft||o&&o.clientLeft||0),e.pageY=t.clientY+(i&&i.scrollTop||o&&o.scrollTop||0)-(i&&i.clientTop||o&&o.clientTop||0)),e.which||void 0===a||(e.which=1&a?1:2&a?3:4&a?2:0),e}},fix:function(e){if(e[p.expando])return e;var t,n,i,o=e.type,a=e,s=this.fixHooks[o];for(s||(this.fixHooks[o]=s=re.test(o)?this.mouseHooks:ne.test(o)?this.keyHooks:{}),i=s.props?this.props.concat(s.props):this.props,e=new p.Event(a),t=i.length;t--;)e[n=i[t]]=a[n];return e.target||(e.target=r),3===e.target.nodeType&&(e.target=e.target.parentNode),s.filter?s.filter(e,a):e},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==se()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===se()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&p.nodeName(this,"input"))return this.click(),!1},_default:function(e){return p.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},p.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},p.Event=function(e,t){if(!(this instanceof p.Event))return new p.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?oe:ae):this.type=e,t&&p.extend(this,t),this.timeStamp=e&&e.timeStamp||p.now(),this[p.expando]=!0},p.Event.prototype={constructor:p.Event,isDefaultPrevented:ae,isPropagationStopped:ae,isImmediatePropagationStopped:ae,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=oe,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=oe,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=oe,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},p.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(e,t){p.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return i&&(i===r||p.contains(r,i))||(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}})),p.fn.extend({on:function(e,t,n,r){return le(this,e,t,n,r)},one:function(e,t,n,r){return le(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,p(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=ae),this.each((function(){p.event.remove(this,e,n,t)}))}});var ue=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,ce=/<script|<style|<link/i,de=/checked\s*(?:[^=]|=\s*.checked.)/i,pe=/^true\/(.*)/,fe=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function he(e,t){return p.nodeName(e,"table")&&p.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function ge(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function me(e){var t=pe.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function ve(e,t){var n,r,i,o,a,s,l,u;if(1===t.nodeType){if(P.hasData(e)&&(o=P.access(e),a=P.set(t,o),u=o.events))for(i in delete a.handle,a.events={},u)for(n=0,r=u[i].length;n<r;n++)p.event.add(t,i,u[i][n]);F.hasData(e)&&(s=F.access(e),l=p.extend({},s),F.set(t,l))}}function ye(e,t,n,r){t=o.apply([],t);var i,a,s,l,u,c,f=0,h=e.length,g=h-1,m=t[0],v=p.isFunction(m);if(v||h>1&&"string"==typeof m&&!d.checkClone&&de.test(m))return e.each((function(i){var o=e.eq(i);v&&(t[0]=m.call(this,i,o.html())),ye(o,t,n,r)}));if(h&&(a=(i=te(t,e[0].ownerDocument,!1,e,r)).firstChild,1===i.childNodes.length&&(i=a),a||r)){for(l=(s=p.map(Y(i,"script"),ge)).length;f<h;f++)u=i,f!==g&&(u=p.clone(u,!0,!0),l&&p.merge(s,Y(u,"script"))),n.call(e[f],u,f);if(l)for(c=s[s.length-1].ownerDocument,p.map(s,me),f=0;f<l;f++)u=s[f],X.test(u.type||"")&&!P.access(u,"globalEval")&&p.contains(c,u)&&(u.src?p._evalUrl&&p._evalUrl(u.src):p.globalEval(u.textContent.replace(fe,"")))}return e}function xe(e,t,n){for(var r,i=t?p.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||p.cleanData(Y(r)),r.parentNode&&(n&&p.contains(r.ownerDocument,r)&&K(Y(r,"script")),r.parentNode.removeChild(r));return e}p.extend({htmlPrefilter:function(e){return e.replace(ue,"<$1></$2>")},clone:function(e,t,n){var r,i,o,a,s,l,u,c=e.cloneNode(!0),f=p.contains(e.ownerDocument,e);if(!(d.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||p.isXMLDoc(e)))for(a=Y(c),r=0,i=(o=Y(e)).length;r<i;r++)s=o[r],l=a[r],u=void 0,"input"===(u=l.nodeName.toLowerCase())&&z.test(s.type)?l.checked=s.checked:"input"!==u&&"textarea"!==u||(l.defaultValue=s.defaultValue);if(t)if(n)for(o=o||Y(e),a=a||Y(c),r=0,i=o.length;r<i;r++)ve(o[r],a[r]);else ve(e,c);return(a=Y(c,"script")).length>0&&K(a,!f&&Y(e,"script")),c},cleanData:function(e){for(var t,n,r,i=p.event.special,o=0;void 0!==(n=e[o]);o++)if(D(n)){if(t=n[P.expando]){if(t.events)for(r in t.events)i[r]?p.event.remove(n,r):p.removeEvent(n,r,t.handle);n[P.expando]=void 0}n[F.expando]&&(n[F.expando]=void 0)}}}),p.fn.extend({domManip:ye,detach:function(e){return xe(this,e,!0)},remove:function(e){return xe(this,e)},text:function(e){return O(this,(function(e){return void 0===e?p.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return ye(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||he(this,e).appendChild(e)}))},prepend:function(){return ye(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=he(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return ye(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return ye(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(p.cleanData(Y(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return p.clone(this,e,t)}))},html:function(e){return O(this,(function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!ce.test(e)&&!Q[($.exec(e)||["",""])[1].toLowerCase()]){e=p.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(p.cleanData(Y(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)}),null,e,arguments.length)},replaceWith:function(){var e=[];return ye(this,arguments,(function(t){var n=this.parentNode;p.inArray(this,e)<0&&(p.cleanData(Y(this)),n&&n.replaceChild(t,this))}),e)}}),p.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(e,t){p.fn[e]=function(e){for(var n,r=[],i=p(e),o=i.length-1,s=0;s<=o;s++)n=s===o?this:this.clone(!0),p(i[s])[t](n),a.apply(r,n.get());return this.pushStack(r)}}));var be,Ee={HTML:"block",BODY:"block"};function Ce(e,t){var n=p(t.createElement(e)).appendTo(t.body),r=p.css(n[0],"display");return n.detach(),r}function Te(e){var t=r,n=Ee[e];return n||("none"!==(n=Ce(e,t))&&n||((t=(be=(be||p("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement))[0].contentDocument).write(),t.close(),n=Ce(e,t),be.detach()),Ee[e]=n),n}var Se=/^margin/,we=new RegExp("^("+G+")(?!px)[a-z%]+$","i"),Ne=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},Le=function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];for(o in i=n.apply(e,r||[]),t)e.style[o]=a[o];return i},Ae=r.documentElement;function Ie(e,t,n){var r,i,o,a,s=e.style;return""!==(a=(n=n||Ne(e))?n.getPropertyValue(t)||n[t]:void 0)&&void 0!==a||p.contains(e.ownerDocument,e)||(a=p.style(e,t)),n&&!d.pixelMarginRight()&&we.test(a)&&Se.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o),void 0!==a?a+"":a}function Re(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){var t,n,i,o,a=r.createElement("div"),s=r.createElement("div");function l(){s.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",s.innerHTML="",Ae.appendChild(a);var r=e.getComputedStyle(s);t="1%"!==r.top,o="2px"===r.marginLeft,n="4px"===r.width,s.style.marginRight="50%",i="4px"===r.marginRight,Ae.removeChild(a)}s.style&&(s.style.backgroundClip="content-box",s.cloneNode(!0).style.backgroundClip="",d.clearCloneStyle="content-box"===s.style.backgroundClip,a.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",a.appendChild(s),p.extend(d,{pixelPosition:function(){return l(),t},boxSizingReliable:function(){return null==n&&l(),n},pixelMarginRight:function(){return null==n&&l(),i},reliableMarginLeft:function(){return null==n&&l(),o},reliableMarginRight:function(){var t,n=s.appendChild(r.createElement("div"));return n.style.cssText=s.style.cssText="-webkit-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",n.style.marginRight=n.style.width="0",s.style.width="1px",Ae.appendChild(a),t=!parseFloat(e.getComputedStyle(n).marginRight),Ae.removeChild(a),s.removeChild(n),t}}))}();var ke=/^(none|table(?!-c[ea]).+)/,_e={position:"absolute",visibility:"hidden",display:"block"},Oe={letterSpacing:"0",fontWeight:"400"},De=["Webkit","O","Moz","ms"],Me=r.createElement("div").style;function Pe(e){if(e in Me)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=De.length;n--;)if((e=De[n]+t)in Me)return e}function Fe(e,t,n){var r=U.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function je(e,t,n,r,i){for(var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;o<4;o+=2)"margin"===n&&(a+=p.css(e,n+V[o],!0,i)),r?("content"===n&&(a-=p.css(e,"padding"+V[o],!0,i)),"margin"!==n&&(a-=p.css(e,"border"+V[o]+"Width",!0,i))):(a+=p.css(e,"padding"+V[o],!0,i),"padding"!==n&&(a+=p.css(e,"border"+V[o]+"Width",!0,i)));return a}function Be(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Ne(e),a="border-box"===p.css(e,"boxSizing",!1,o);if(i<=0||null==i){if(((i=Ie(e,t,o))<0||null==i)&&(i=e.style[t]),we.test(i))return i;r=a&&(d.boxSizingReliable()||i===e.style[t]),i=parseFloat(i)||0}return i+je(e,t,n||(a?"border":"content"),r,o)+"px"}function He(e,t){for(var n,r,i,o=[],a=0,s=e.length;a<s;a++)(r=e[a]).style&&(o[a]=P.get(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&W(r)&&(o[a]=P.access(r,"olddisplay",Te(r.nodeName)))):(i=W(r),"none"===n&&i||P.set(r,"olddisplay",i?n:p.css(r,"display"))));for(a=0;a<s;a++)(r=e[a]).style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}function Ge(e,t,n,r,i){return new Ge.prototype.init(e,t,n,r,i)}p.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ie(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:"cssFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=p.camelCase(t),l=e.style;if(t=p.cssProps[s]||(p.cssProps[s]=Pe(s)||s),a=p.cssHooks[t]||p.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"==(o=typeof n)&&(i=U.exec(n))&&i[1]&&(n=q(e,t,i),o="number"),null!=n&&n==n&&("number"===o&&(n+=i&&i[3]||(p.cssNumber[s]?"":"px")),d.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=p.camelCase(t);return t=p.cssProps[s]||(p.cssProps[s]=Pe(s)||s),(a=p.cssHooks[t]||p.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Ie(e,t,r)),"normal"===i&&t in Oe&&(i=Oe[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),p.each(["height","width"],(function(e,t){p.cssHooks[t]={get:function(e,n,r){if(n)return ke.test(p.css(e,"display"))&&0===e.offsetWidth?Le(e,_e,(function(){return Be(e,t,r)})):Be(e,t,r)},set:function(e,n,r){var i,o=r&&Ne(e),a=r&&je(e,t,r,"border-box"===p.css(e,"boxSizing",!1,o),o);return a&&(i=U.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=p.css(e,t)),Fe(0,n,a)}}})),p.cssHooks.marginLeft=Re(d.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(Ie(e,"marginLeft"))||e.getBoundingClientRect().left-Le(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),p.cssHooks.marginRight=Re(d.reliableMarginRight,(function(e,t){if(t)return Le(e,{display:"inline-block"},Ie,[e,"marginRight"])})),p.each({margin:"",padding:"",border:"Width"},(function(e,t){p.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+V[r]+t]=o[r]||o[r-2]||o[0];return i}},Se.test(e)||(p.cssHooks[e+t].set=Fe)})),p.fn.extend({css:function(e,t){return O(this,(function(e,t,n){var r,i,o={},a=0;if(p.isArray(t)){for(r=Ne(e),i=t.length;a<i;a++)o[t[a]]=p.css(e,t[a],!1,r);return o}return void 0!==n?p.style(e,t,n):p.css(e,t)}),e,t,arguments.length>1)},show:function(){return He(this,!0)},hide:function(){return He(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each((function(){W(this)?p(this).show():p(this).hide()}))}}),p.Tween=Ge,Ge.prototype={constructor:Ge,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||p.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(p.cssNumber[n]?"":"px")},cur:function(){var e=Ge.propHooks[this.prop];return e&&e.get?e.get(this):Ge.propHooks._default.get(this)},run:function(e){var t,n=Ge.propHooks[this.prop];return this.options.duration?this.pos=t=p.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Ge.propHooks._default.set(this),this}},Ge.prototype.init.prototype=Ge.prototype,Ge.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=p.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){p.fx.step[e.prop]?p.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[p.cssProps[e.prop]]&&!p.cssHooks[e.prop]?e.elem[e.prop]=e.now:p.style(e.elem,e.prop,e.now+e.unit)}}},Ge.propHooks.scrollTop=Ge.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},p.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},p.fx=Ge.prototype.init,p.fx.step={};var Ue,Ve,We=/^(?:toggle|show|hide)$/,qe=/queueHooks$/;function ze(){return e.setTimeout((function(){Ue=void 0})),Ue=p.now()}function $e(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=V[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function Xe(e,t,n){for(var r,i=(Qe.tweeners[t]||[]).concat(Qe.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function Qe(e,t,n){var r,i,o=0,a=Qe.prefilters.length,s=p.Deferred().always((function(){delete l.elem})),l=function(){if(i)return!1;for(var t=Ue||ze(),n=Math.max(0,u.startTime+u.duration-t),r=1-(n/u.duration||0),o=0,a=u.tweens.length;o<a;o++)u.tweens[o].run(r);return s.notifyWith(e,[u,r,n]),r<1&&a?n:(s.resolveWith(e,[u]),!1)},u=s.promise({elem:e,props:p.extend({},t),opts:p.extend(!0,{specialEasing:{},easing:p.easing._default},n),originalProperties:t,originalOptions:n,startTime:Ue||ze(),duration:n.duration,tweens:[],createTween:function(t,n){var r=p.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(r),r},stop:function(t){var n=0,r=t?u.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)u.tweens[n].run(1);return t?(s.notifyWith(e,[u,1,0]),s.resolveWith(e,[u,t])):s.rejectWith(e,[u,t]),this}}),c=u.props;for(function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=p.camelCase(n)],o=e[n],p.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=p.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,u.opts.specialEasing);o<a;o++)if(r=Qe.prefilters[o].call(u,e,c,u.opts))return p.isFunction(r.stop)&&(p._queueHooks(u.elem,u.opts.queue).stop=p.proxy(r.stop,r)),r;return p.map(c,Xe,u),p.isFunction(u.opts.start)&&u.opts.start.call(e,u),p.fx.timer(p.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}p.Animation=p.extend(Qe,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return q(n.elem,e,U.exec(t),n),n}]},tweener:function(e,t){p.isFunction(e)?(t=e,e=["*"]):e=e.match(k);for(var n,r=0,i=e.length;r<i;r++)n=e[r],Qe.tweeners[n]=Qe.tweeners[n]||[],Qe.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,l,u,c=this,d={},f=e.style,h=e.nodeType&&W(e),g=P.get(e,"fxshow");for(r in n.queue||(null==(s=p._queueHooks(e,"fx")).unqueued&&(s.unqueued=0,l=s.empty.fire,s.empty.fire=function(){s.unqueued||l()}),s.unqueued++,c.always((function(){c.always((function(){s.unqueued--,p.queue(e,"fx").length||s.empty.fire()}))}))),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[f.overflow,f.overflowX,f.overflowY],"inline"===("none"===(u=p.css(e,"display"))?P.get(e,"olddisplay")||Te(e.nodeName):u)&&"none"===p.css(e,"float")&&(f.display="inline-block")),n.overflow&&(f.overflow="hidden",c.always((function(){f.overflow=n.overflow[0],f.overflowX=n.overflow[1],f.overflowY=n.overflow[2]}))),t)if(i=t[r],We.exec(i)){if(delete t[r],o=o||"toggle"===i,i===(h?"hide":"show")){if("show"!==i||!g||void 0===g[r])continue;h=!0}d[r]=g&&g[r]||p.style(e,r)}else u=void 0;if(p.isEmptyObject(d))"inline"===("none"===u?Te(e.nodeName):u)&&(f.display=u);else for(r in g?"hidden"in g&&(h=g.hidden):g=P.access(e,"fxshow",{}),o&&(g.hidden=!h),h?p(e).show():c.done((function(){p(e).hide()})),c.done((function(){var t;for(t in P.remove(e,"fxshow"),d)p.style(e,t,d[t])})),d)a=Xe(h?g[r]:0,r,c),r in g||(g[r]=a.start,h&&(a.end=a.start,a.start="width"===r||"height"===r?1:0))}],prefilter:function(e,t){t?Qe.prefilters.unshift(e):Qe.prefilters.push(e)}}),p.speed=function(e,t,n){var r=e&&"object"==typeof e?p.extend({},e):{complete:n||!n&&t||p.isFunction(e)&&e,duration:e,easing:n&&t||t&&!p.isFunction(t)&&t};return r.duration=p.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in p.fx.speeds?p.fx.speeds[r.duration]:p.fx.speeds._default,null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){p.isFunction(r.old)&&r.old.call(this),r.queue&&p.dequeue(this,r.queue)},r},p.fn.extend({fadeTo:function(e,t,n,r){return this.filter(W).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=p.isEmptyObject(e),o=p.speed(t,n,r),a=function(){var t=Qe(this,p.extend({},e),o);(i||P.get(this,"finish"))&&t.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&!1!==e&&this.queue(e||"fx",[]),this.each((function(){var t=!0,i=null!=e&&e+"queueHooks",o=p.timers,a=P.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&qe.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));!t&&n||p.dequeue(this,e)}))},finish:function(e){return!1!==e&&(e=e||"fx"),this.each((function(){var t,n=P.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=p.timers,a=r?r.length:0;for(n.finish=!0,p.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<a;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish}))}}),p.each(["toggle","show","hide"],(function(e,t){var n=p.fn[t];p.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate($e(t,!0),e,r,i)}})),p.each({slideDown:$e("show"),slideUp:$e("hide"),slideToggle:$e("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(e,t){p.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}})),p.timers=[],p.fx.tick=function(){var e,t=0,n=p.timers;for(Ue=p.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||p.fx.stop(),Ue=void 0},p.fx.timer=function(e){p.timers.push(e),e()?p.fx.start():p.timers.pop()},p.fx.interval=13,p.fx.start=function(){Ve||(Ve=e.setInterval(p.fx.tick,p.fx.interval))},p.fx.stop=function(){e.clearInterval(Ve),Ve=null},p.fx.speeds={slow:600,fast:200,_default:400},p.fn.delay=function(t,n){return t=p.fx&&p.fx.speeds[t]||t,n=n||"fx",this.queue(n,(function(n,r){var i=e.setTimeout(n,t);r.stop=function(){e.clearTimeout(i)}}))},function(){var e=r.createElement("input"),t=r.createElement("select"),n=t.appendChild(r.createElement("option"));e.type="checkbox",d.checkOn=""!==e.value,d.optSelected=n.selected,t.disabled=!0,d.optDisabled=!n.disabled,(e=r.createElement("input")).value="t",e.type="radio",d.radioValue="t"===e.value}();var Ye,Ke=p.expr.attrHandle;p.fn.extend({attr:function(e,t){return O(this,p.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each((function(){p.removeAttr(this,e)}))}}),p.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?p.prop(e,t,n):(1===o&&p.isXMLDoc(e)||(t=t.toLowerCase(),i=p.attrHooks[t]||(p.expr.match.bool.test(t)?Ye:void 0)),void 0!==n?null===n?void p.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=p.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!d.radioValue&&"radio"===t&&p.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(k);if(o&&1===e.nodeType)for(;n=o[i++];)r=p.propFix[n]||n,p.expr.match.bool.test(n)&&(e[r]=!1),e.removeAttribute(n)}}),Ye={set:function(e,t,n){return!1===t?p.removeAttr(e,n):e.setAttribute(n,n),n}},p.each(p.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=Ke[t]||p.find.attr;Ke[t]=function(e,t,r){var i,o;return r||(o=Ke[t],Ke[t]=i,i=null!=n(e,t,r)?t.toLowerCase():null,Ke[t]=o),i}}));var Je=/^(?:input|select|textarea|button)$/i,Ze=/^(?:a|area)$/i;p.fn.extend({prop:function(e,t){return O(this,p.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[p.propFix[e]||e]}))}}),p.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&p.isXMLDoc(e)||(t=p.propFix[t]||t,i=p.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=p.find.attr(e,"tabindex");return t?parseInt(t,10):Je.test(e.nodeName)||Ze.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),d.optSelected||(p.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),p.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){p.propFix[this.toLowerCase()]=this}));var et=/[\t\r\n\f]/g;function tt(e){return e.getAttribute&&e.getAttribute("class")||""}p.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,l=0;if(p.isFunction(e))return this.each((function(t){p(this).addClass(e.call(this,t,tt(this)))}));if("string"==typeof e&&e)for(t=e.match(k)||[];n=this[l++];)if(i=tt(n),r=1===n.nodeType&&(" "+i+" ").replace(et," ")){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=p.trim(r))&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,l=0;if(p.isFunction(e))return this.each((function(t){p(this).removeClass(e.call(this,t,tt(this)))}));if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(k)||[];n=this[l++];)if(i=tt(n),r=1===n.nodeType&&(" "+i+" ").replace(et," ")){for(a=0;o=t[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");i!==(s=p.trim(r))&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):p.isFunction(e)?this.each((function(n){p(this).toggleClass(e.call(this,n,tt(this),t),t)})):this.each((function(){var t,r,i,o;if("string"===n)for(r=0,i=p(this),o=e.match(k)||[];t=o[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else void 0!==e&&"boolean"!==n||((t=tt(this))&&P.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":P.get(this,"__className__")||""))}))},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+tt(n)+" ").replace(et," ").indexOf(t)>-1)return!0;return!1}});var nt=/\r/g,rt=/[\x20\t\r\n\f]+/g;p.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=p.isFunction(e),this.each((function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,p(this).val()):e)?i="":"number"==typeof i?i+="":p.isArray(i)&&(i=p.map(i,(function(e){return null==e?"":e+""}))),(t=p.valHooks[this.type]||p.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))}))):i?(t=p.valHooks[i.type]||p.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(nt,""):null==n?"":n:void 0}}),p.extend({valHooks:{option:{get:function(e){var t=p.find.attr(e,"value");return null!=t?t:p.trim(p.text(e)).replace(rt," ")}},select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||i<0,a=o?null:[],s=o?i+1:r.length,l=i<0?s:o?i:0;l<s;l++)if(((n=r[l]).selected||l===i)&&(d.optDisabled?!n.disabled:null===n.getAttribute("disabled"))&&(!n.parentNode.disabled||!p.nodeName(n.parentNode,"optgroup"))){if(t=p(n).val(),o)return t;a.push(t)}return a},set:function(e,t){for(var n,r,i=e.options,o=p.makeArray(t),a=i.length;a--;)((r=i[a]).selected=p.inArray(p.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),p.each(["radio","checkbox"],(function(){p.valHooks[this]={set:function(e,t){if(p.isArray(t))return e.checked=p.inArray(p(e).val(),t)>-1}},d.checkOn||(p.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}));var it=/^(?:focusinfocus|focusoutblur)$/;p.extend(p.event,{trigger:function(t,n,i,o){var a,s,l,u,d,f,h,g=[i||r],m=c.call(t,"type")?t.type:t,v=c.call(t,"namespace")?t.namespace.split("."):[];if(s=l=i=i||r,3!==i.nodeType&&8!==i.nodeType&&!it.test(m+p.event.triggered)&&(m.indexOf(".")>-1&&(v=m.split("."),m=v.shift(),v.sort()),d=m.indexOf(":")<0&&"on"+m,(t=t[p.expando]?t:new p.Event(m,"object"==typeof t&&t)).isTrigger=o?2:3,t.namespace=v.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+v.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),n=null==n?[t]:p.makeArray(n,[t]),h=p.event.special[m]||{},o||!h.trigger||!1!==h.trigger.apply(i,n))){if(!o&&!h.noBubble&&!p.isWindow(i)){for(u=h.delegateType||m,it.test(u+m)||(s=s.parentNode);s;s=s.parentNode)g.push(s),l=s;l===(i.ownerDocument||r)&&g.push(l.defaultView||l.parentWindow||e)}for(a=0;(s=g[a++])&&!t.isPropagationStopped();)t.type=a>1?u:h.bindType||m,(f=(P.get(s,"events")||{})[t.type]&&P.get(s,"handle"))&&f.apply(s,n),(f=d&&s[d])&&f.apply&&D(s)&&(t.result=f.apply(s,n),!1===t.result&&t.preventDefault());return t.type=m,o||t.isDefaultPrevented()||h._default&&!1!==h._default.apply(g.pop(),n)||!D(i)||d&&p.isFunction(i[m])&&!p.isWindow(i)&&((l=i[d])&&(i[d]=null),p.event.triggered=m,i[m](),p.event.triggered=void 0,l&&(i[d]=l)),t.result}},simulate:function(e,t,n){var r=p.extend(new p.Event,n,{type:e,isSimulated:!0});p.event.trigger(r,null,t)}}),p.fn.extend({trigger:function(e,t){return this.each((function(){p.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return p.event.trigger(e,t,n,!0)}}),p.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),(function(e,t){p.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}})),p.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),d.focusin="onfocusin"in e,d.focusin||p.each({focus:"focusin",blur:"focusout"},(function(e,t){var n=function(e){p.event.simulate(t,e.target,p.event.fix(e))};p.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=P.access(r,t);i||r.addEventListener(e,n,!0),P.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=P.access(r,t)-1;i?P.access(r,t,i):(r.removeEventListener(e,n,!0),P.remove(r,t))}}}));var ot=e.location,at=p.now(),st=/\?/;p.parseJSON=function(e){return JSON.parse(e+"")},p.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(e){n=void 0}return n&&!n.getElementsByTagName("parsererror").length||p.error("Invalid XML: "+t),n};var lt=/#.*$/,ut=/([?&])_=[^&]*/,ct=/^(.*?):[ \t]*([^\r\n]*)$/gm,dt=/^(?:GET|HEAD)$/,pt=/^\/\//,ft={},ht={},gt="*/".concat("*"),mt=r.createElement("a");function vt(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(k)||[];if(p.isFunction(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function yt(e,t,n,r){var i={},o=e===ht;function a(s){var l;return i[s]=!0,p.each(e[s]||[],(function(e,s){var u=s(t,n,r);return"string"!=typeof u||o||i[u]?o?!(l=u):void 0:(t.dataTypes.unshift(u),a(u),!1)})),l}return a(t.dataTypes[0])||!i["*"]&&a("*")}function xt(e,t){var n,r,i=p.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&p.extend(!0,e,r),e}mt.href=ot.href,p.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ot.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(ot.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":gt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":p.parseJSON,"text xml":p.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?xt(xt(e,p.ajaxSettings),t):xt(p.ajaxSettings,e)},ajaxPrefilter:vt(ft),ajaxTransport:vt(ht),ajax:function(t,n){"object"==typeof t&&(n=t,t=void 0),n=n||{};var i,o,a,s,l,u,c,d,f=p.ajaxSetup({},n),h=f.context||f,g=f.context&&(h.nodeType||h.jquery)?p(h):p.event,m=p.Deferred(),v=p.Callbacks("once memory"),y=f.statusCode||{},x={},b={},E=0,C="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(2===E){if(!s)for(s={};t=ct.exec(a);)s[t[1].toLowerCase()]=t[2];t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===E?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return E||(e=b[n]=b[n]||e,x[e]=t),this},overrideMimeType:function(e){return E||(f.mimeType=e),this},statusCode:function(e){var t;if(e)if(E<2)for(t in e)y[t]=[y[t],e[t]];else T.always(e[T.status]);return this},abort:function(e){var t=e||C;return i&&i.abort(t),S(0,t),this}};if(m.promise(T).complete=v.add,T.success=T.done,T.error=T.fail,f.url=((t||f.url||ot.href)+"").replace(lt,"").replace(pt,ot.protocol+"//"),f.type=n.method||n.type||f.method||f.type,f.dataTypes=p.trim(f.dataType||"*").toLowerCase().match(k)||[""],null==f.crossDomain){u=r.createElement("a");try{u.href=f.url,u.href=u.href,f.crossDomain=mt.protocol+"//"+mt.host!=u.protocol+"//"+u.host}catch(e){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=p.param(f.data,f.traditional)),yt(ft,f,n,T),2===E)return T;for(d in(c=p.event&&f.global)&&0==p.active++&&p.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!dt.test(f.type),o=f.url,f.hasContent||(f.data&&(o=f.url+=(st.test(o)?"&":"?")+f.data,delete f.data),!1===f.cache&&(f.url=ut.test(o)?o.replace(ut,"$1_="+at++):o+(st.test(o)?"&":"?")+"_="+at++)),f.ifModified&&(p.lastModified[o]&&T.setRequestHeader("If-Modified-Since",p.lastModified[o]),p.etag[o]&&T.setRequestHeader("If-None-Match",p.etag[o])),(f.data&&f.hasContent&&!1!==f.contentType||n.contentType)&&T.setRequestHeader("Content-Type",f.contentType),T.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+gt+"; q=0.01":""):f.accepts["*"]),f.headers)T.setRequestHeader(d,f.headers[d]);if(f.beforeSend&&(!1===f.beforeSend.call(h,T,f)||2===E))return T.abort();for(d in C="abort",{success:1,error:1,complete:1})T[d](f[d]);if(i=yt(ht,f,n,T)){if(T.readyState=1,c&&g.trigger("ajaxSend",[T,f]),2===E)return T;f.async&&f.timeout>0&&(l=e.setTimeout((function(){T.abort("timeout")}),f.timeout));try{E=1,i.send(x,S)}catch(e){if(!(E<2))throw e;S(-1,e)}}else S(-1,"No Transport");function S(t,n,r,s){var u,d,x,b,C,S=n;2!==E&&(E=2,l&&e.clearTimeout(l),i=void 0,a=s||"",T.readyState=t>0?4:0,u=t>=200&&t<300||304===t,r&&(b=function(e,t,n){for(var r,i,o,a,s=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){l.unshift(i);break}if(l[0]in n)o=l[0];else{for(i in n){if(!l[0]||e.converters[i+" "+l[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==l[0]&&l.unshift(o),n[o]}(f,T,r)),b=function(e,t,n,r){var i,o,a,s,l,u={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(!(a=u[l+" "+o]||u["* "+o]))for(i in u)if((s=i.split(" "))[1]===o&&(a=u[l+" "+s[0]]||u["* "+s[0]])){!0===a?a=u[i]:!0!==u[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}(f,b,T,u),u?(f.ifModified&&((C=T.getResponseHeader("Last-Modified"))&&(p.lastModified[o]=C),(C=T.getResponseHeader("etag"))&&(p.etag[o]=C)),204===t||"HEAD"===f.type?S="nocontent":304===t?S="notmodified":(S=b.state,d=b.data,u=!(x=b.error))):(x=S,!t&&S||(S="error",t<0&&(t=0))),T.status=t,T.statusText=(n||S)+"",u?m.resolveWith(h,[d,S,T]):m.rejectWith(h,[T,S,x]),T.statusCode(y),y=void 0,c&&g.trigger(u?"ajaxSuccess":"ajaxError",[T,f,u?d:x]),v.fireWith(h,[T,S]),c&&(g.trigger("ajaxComplete",[T,f]),--p.active||p.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return p.get(e,t,n,"json")},getScript:function(e,t){return p.get(e,void 0,t,"script")}}),p.each(["get","post"],(function(e,t){p[t]=function(e,n,r,i){return p.isFunction(n)&&(i=i||r,r=n,n=void 0),p.ajax(p.extend({url:e,type:t,dataType:i,data:n,success:r},p.isPlainObject(e)&&e))}})),p._evalUrl=function(e){return p.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})},p.fn.extend({wrapAll:function(e){var t;return p.isFunction(e)?this.each((function(t){p(this).wrapAll(e.call(this,t))})):(this[0]&&(t=p(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this)},wrapInner:function(e){return p.isFunction(e)?this.each((function(t){p(this).wrapInner(e.call(this,t))})):this.each((function(){var t=p(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=p.isFunction(e);return this.each((function(n){p(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(){return this.parent().each((function(){p.nodeName(this,"body")||p(this).replaceWith(this.childNodes)})).end()}}),p.expr.filters.hidden=function(e){return!p.expr.filters.visible(e)},p.expr.filters.visible=function(e){return e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0};var bt=/%20/g,Et=/\[\]$/,Ct=/\r?\n/g,Tt=/^(?:submit|button|image|reset|file)$/i,St=/^(?:input|select|textarea|keygen)/i;function wt(e,t,n,r){var i;if(p.isArray(t))p.each(t,(function(t,i){n||Et.test(e)?r(e,i):wt(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)}));else if(n||"object"!==p.type(t))r(e,t);else for(i in t)wt(e+"["+i+"]",t[i],n,r)}p.param=function(e,t){var n,r=[],i=function(e,t){t=p.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=p.ajaxSettings&&p.ajaxSettings.traditional),p.isArray(e)||e.jquery&&!p.isPlainObject(e))p.each(e,(function(){i(this.name,this.value)}));else for(n in e)wt(n,e[n],t,i);return r.join("&").replace(bt,"+")},p.fn.extend({serialize:function(){return p.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=p.prop(this,"elements");return e?p.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!p(this).is(":disabled")&&St.test(this.nodeName)&&!Tt.test(e)&&(this.checked||!z.test(e))})).map((function(e,t){var n=p(this).val();return null==n?null:p.isArray(n)?p.map(n,(function(e){return{name:t.name,value:e.replace(Ct,"\r\n")}})):{name:t.name,value:n.replace(Ct,"\r\n")}})).get()}}),p.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var Nt={0:200,1223:204},Lt=p.ajaxSettings.xhr();d.cors=!!Lt&&"withCredentials"in Lt,d.ajax=Lt=!!Lt,p.ajaxTransport((function(t){var n,r;if(d.cors||Lt&&!t.crossDomain)return{send:function(i,o){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];for(a in t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)s.setRequestHeader(a,i[a]);n=function(e){return function(){n&&(n=r=s.onload=s.onerror=s.onabort=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(Nt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=n(),r=s.onerror=n("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&e.setTimeout((function(){n&&r()}))},n=n("abort");try{s.send(t.hasContent&&t.data||null)}catch(e){if(n)throw e}},abort:function(){n&&n()}}})),p.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return p.globalEval(e),e}}}),p.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),p.ajaxTransport("script",(function(e){var t,n;if(e.crossDomain)return{send:function(i,o){t=p("<script>").prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&o("error"===e.type?404:200,e.type)}),r.head.appendChild(t[0])},abort:function(){n&&n()}}}));var At=[],It=/(=)\?(?=&|$)|\?\?/;p.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=At.pop()||p.expando+"_"+at++;return this[e]=!0,e}}),p.ajaxPrefilter("json jsonp",(function(t,n,r){var i,o,a,s=!1!==t.jsonp&&(It.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&It.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=p.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(It,"$1"+i):!1!==t.jsonp&&(t.url+=(st.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||p.error(i+" was not called"),a[0]},t.dataTypes[0]="json",o=e[i],e[i]=function(){a=arguments},r.always((function(){void 0===o?p(e).removeProp(i):e[i]=o,t[i]&&(t.jsonpCallback=n.jsonpCallback,At.push(i)),a&&p.isFunction(o)&&o(a[0]),a=o=void 0})),"script"})),p.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||r;var i=C.exec(e),o=!n&&[];return i?[t.createElement(i[1])]:(i=te([e],t,o),o&&o.length&&p(o).remove(),p.merge([],i.childNodes))};var Rt=p.fn.load;function kt(e){return p.isWindow(e)?e:9===e.nodeType&&e.defaultView}p.fn.load=function(e,t,n){if("string"!=typeof e&&Rt)return Rt.apply(this,arguments);var r,i,o,a=this,s=e.indexOf(" ");return s>-1&&(r=p.trim(e.slice(s)),e=e.slice(0,s)),p.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),a.length>0&&p.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done((function(e){o=arguments,a.html(r?p("<div>").append(p.parseHTML(e)).find(r):e)})).always(n&&function(e,t){a.each((function(){n.apply(this,o||[e.responseText,t,e])}))}),this},p.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(e,t){p.fn[t]=function(e){return this.on(t,e)}})),p.expr.filters.animated=function(e){return p.grep(p.timers,(function(t){return e===t.elem})).length},p.offset={setOffset:function(e,t,n){var r,i,o,a,s,l,u=p.css(e,"position"),c=p(e),d={};"static"===u&&(e.style.position="relative"),s=c.offset(),o=p.css(e,"top"),l=p.css(e,"left"),("absolute"===u||"fixed"===u)&&(o+l).indexOf("auto")>-1?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(l)||0),p.isFunction(t)&&(t=t.call(e,n,p.extend({},s))),null!=t.top&&(d.top=t.top-s.top+a),null!=t.left&&(d.left=t.left-s.left+i),"using"in t?t.using.call(e,d):c.css(d)}},p.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each((function(t){p.offset.setOffset(this,e,t)}));var t,n,r=this[0],i={top:0,left:0},o=r&&r.ownerDocument;return o?(t=o.documentElement,p.contains(t,r)?(i=r.getBoundingClientRect(),n=kt(o),{top:i.top+n.pageYOffset-t.clientTop,left:i.left+n.pageXOffset-t.clientLeft}):i):void 0},position:function(){if(this[0]){var e,t,n=this[0],r={top:0,left:0};return"fixed"===p.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),p.nodeName(e[0],"html")||(r=e.offset()),r.top+=p.css(e[0],"borderTopWidth",!0),r.left+=p.css(e[0],"borderLeftWidth",!0)),{top:t.top-r.top-p.css(n,"marginTop",!0),left:t.left-r.left-p.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent;e&&"static"===p.css(e,"position");)e=e.offsetParent;return e||Ae}))}}),p.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(e,t){var n="pageYOffset"===t;p.fn[e]=function(r){return O(this,(function(e,r,i){var o=kt(e);if(void 0===i)return o?o[t]:e[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):e[r]=i}),e,r,arguments.length)}})),p.each(["top","left"],(function(e,t){p.cssHooks[t]=Re(d.pixelPosition,(function(e,n){if(n)return n=Ie(e,t),we.test(n)?p(e).position()[t]+"px":n}))})),p.each({Height:"height",Width:"width"},(function(e,t){p.each({padding:"inner"+e,content:t,"":"outer"+e},(function(n,r){p.fn[r]=function(r,i){var o=arguments.length&&(n||"boolean"!=typeof r),a=n||(!0===r||!0===i?"margin":"border");return O(this,(function(t,n,r){var i;return p.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(i=t.documentElement,Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])):void 0===r?p.css(t,n,a):p.style(t,n,r,a)}),t,o?r:void 0,o,null)}}))})),p.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},size:function(){return this.length}}),p.fn.andSelf=p.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],(function(){return p}));var _t=e.jQuery,Ot=e.$;return p.noConflict=function(t){return e.$===p&&(e.$=Ot),t&&e.jQuery===p&&(e.jQuery=_t),p},t||(e.jQuery=e.$=p),p}))},{}],17:[function(e,t,n){var r=e("../src/store-engine"),i=e("../storages/all"),o=[e("../plugins/json2")];t.exports=r.createStore(i,o)},{"../plugins/json2":18,"../src/store-engine":20,"../storages/all":22}],18:[function(e,t,n){t.exports=function(){return e("./lib/json2"),{}}},{"./lib/json2":19}],19:[function(require,module,exports){"object"!=typeof JSON&&(JSON={}),function(){"use strict";var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta,rep;function f(e){return e<10?"0"+e:e}function this_value(){return this.valueOf()}function quote(e){return rx_escapable.lastIndex=0,rx_escapable.test(e)?'"'+e.replace(rx_escapable,(function(e){var t=meta[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+e+'"'}function str(e,t){var n,r,i,o,a,s=gap,l=t[e];switch(l&&"object"==typeof l&&"function"==typeof l.toJSON&&(l=l.toJSON(e)),"function"==typeof rep&&(l=rep.call(t,e,l)),typeof l){case"string":return quote(l);case"number":return isFinite(l)?String(l):"null";case"boolean":case"null":return String(l);case"object":if(!l)return"null";if(gap+=indent,a=[],"[object Array]"===Object.prototype.toString.apply(l)){for(o=l.length,n=0;n<o;n+=1)a[n]=str(n,l)||"null";return i=0===a.length?"[]":gap?"[\n"+gap+a.join(",\n"+gap)+"\n"+s+"]":"["+a.join(",")+"]",gap=s,i}if(rep&&"object"==typeof rep)for(o=rep.length,n=0;n<o;n+=1)"string"==typeof rep[n]&&(i=str(r=rep[n],l))&&a.push(quote(r)+(gap?": ":":")+i);else for(r in l)Object.prototype.hasOwnProperty.call(l,r)&&(i=str(r,l))&&a.push(quote(r)+(gap?": ":":")+i);return i=0===a.length?"{}":gap?"{\n"+gap+a.join(",\n"+gap)+"\n"+s+"}":"{"+a.join(",")+"}",gap=s,i}}"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value),"function"!=typeof JSON.stringify&&(meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(e,t,n){var r;if(gap="",indent="","number"==typeof n)for(r=0;r<n;r+=1)indent+=" ";else"string"==typeof n&&(indent=n);if(rep=t,t&&"function"!=typeof t&&("object"!=typeof t||"number"!=typeof t.length))throw new Error("JSON.stringify");return str("",{"":e})}),"function"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){var j;function walk(e,t){var n,r,i=e[t];if(i&&"object"==typeof i)for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(void 0!==(r=walk(i,n))?i[n]=r:delete i[n]);return reviver.call(e,t,i)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,(function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))),rx_one.test(text.replace(rx_two,"@").replace(rx_three,"]").replace(rx_four,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}()},{}],20:[function(e,t,n){var r=e("./util"),i=r.slice,o=r.pluck,a=r.each,s=r.bind,l=r.create,u=r.isList,c=r.isFunction,d=r.isObject;t.exports={createStore:f};var p={version:"2.0.12",enabled:!1,get:function(e,t){var n=this.storage.read(this._namespacePrefix+e);return this._deserialize(n,t)},set:function(e,t){return void 0===t?this.remove(e):(this.storage.write(this._namespacePrefix+e,this._serialize(t)),t)},remove:function(e){this.storage.remove(this._namespacePrefix+e)},each:function(e){var t=this;this.storage.each((function(n,r){e.call(t,t._deserialize(n),(r||"").replace(t._namespaceRegexp,""))}))},clearAll:function(){this.storage.clearAll()},hasNamespace:function(e){return this._namespacePrefix=="__storejs_"+e+"_"},createStore:function(){return f.apply(this,arguments)},addPlugin:function(e){this._addPlugin(e)},namespace:function(e){return f(this.storage,this.plugins,e)}};function f(e,t,n){n||(n=""),e&&!u(e)&&(e=[e]),t&&!u(t)&&(t=[t]);var r=n?"__storejs_"+n+"_":"",f=n?new RegExp("^"+r):null;if(!/^[a-zA-Z0-9_\-]*$/.test(n))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var h=l({_namespacePrefix:r,_namespaceRegexp:f,_testStorage:function(e){try{var t="__storejs__test__";e.write(t,t);var n=e.read(t)===t;return e.remove(t),n}catch(e){return!1}},_assignPluginFnProp:function(e,t){var n=this[t];this[t]=function(){var t=i(arguments,0),r=this;function o(){if(n)return a(arguments,(function(e,n){t[n]=e})),n.apply(r,t)}var s=[o].concat(t);return e.apply(r,s)}},_serialize:function(e){return JSON.stringify(e)},_deserialize:function(e,t){if(!e)return t;var n="";try{n=JSON.parse(e)}catch(t){n=e}return void 0!==n?n:t},_addStorage:function(e){this.enabled||this._testStorage(e)&&(this.storage=e,this.enabled=!0)},_addPlugin:function(e){var t=this;if(u(e))a(e,(function(e){t._addPlugin(e)}));else if(!o(this.plugins,(function(t){return e===t}))){if(this.plugins.push(e),!c(e))throw new Error("Plugins must be function values that return objects");var n=e.call(this);if(!d(n))throw new Error("Plugins must return an object of function properties");a(n,(function(n,r){if(!c(n))throw new Error("Bad plugin property: "+r+" from plugin "+e.name+". Plugins should only return functions.");t._assignPluginFnProp(n,r)}))}},addStorage:function(e){!function(){var e="undefined"==typeof console?null:console;if(e){var t=e.warn?e.warn:e.log;t.apply(e,arguments)}}("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(e)}},p,{plugins:[]});return h.raw={},a(h,(function(e,t){c(e)&&(h.raw[t]=s(h,e))})),a(e,(function(e){h._addStorage(e)})),a(t,(function(e){h._addPlugin(e)})),h}},{"./util":21}],21:[function(e,t,n){(function(e){(function(){var n=Object.assign?Object.assign:function(e,t,n,r){for(var i=1;i<arguments.length;i++)s(Object(arguments[i]),(function(t,n){e[n]=t}));return e},r=function(){if(Object.create)return function(e,t,r,i){var o=a(arguments,1);return n.apply(this,[Object.create(e)].concat(o))};{function e(){}return function(t,r,i,o){var s=a(arguments,1);return e.prototype=t,n.apply(this,[new e].concat(s))}}}(),i=String.prototype.trim?function(e){return String.prototype.trim.call(e)}:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},o="undefined"!=typeof window?window:e;function a(e,t){return Array.prototype.slice.call(e,t||0)}function s(e,t){l(e,(function(e,n){return t(e,n),!1}))}function l(e,t){if(u(e)){for(var n=0;n<e.length;n++)if(t(e[n],n))return e[n]}else for(var r in e)if(e.hasOwnProperty(r)&&t(e[r],r))return e[r]}function u(e){return null!=e&&"function"!=typeof e&&"number"==typeof e.length}t.exports={assign:n,create:r,trim:i,bind:function(e,t){return function(){return t.apply(e,Array.prototype.slice.call(arguments,0))}},slice:a,each:s,map:function(e,t){var n=u(e)?[]:{};return l(e,(function(e,r){return n[r]=t(e,r),!1})),n},pluck:l,isList:u,isFunction:function(e){return e&&"[object Function]"==={}.toString.call(e)},isObject:function(e){return e&&"[object Object]"==={}.toString.call(e)},Global:o}}).call(this)}).call(this,void 0!==global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],22:[function(e,t,n){t.exports=[e("./localStorage"),e("./oldFF-globalStorage"),e("./oldIE-userDataStorage"),e("./cookieStorage"),e("./sessionStorage"),e("./memoryStorage")]},{"./cookieStorage":23,"./localStorage":24,"./memoryStorage":25,"./oldFF-globalStorage":26,"./oldIE-userDataStorage":27,"./sessionStorage":28}],23:[function(e,t,n){var r=e("../src/util"),i=r.Global,o=r.trim;t.exports={name:"cookieStorage",read:function(e){if(!e||!u(e))return null;var t="(?:^|.*;\\s*)"+escape(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(a.cookie.replace(new RegExp(t),"$1"))},write:function(e,t){e&&(a.cookie=escape(e)+"="+escape(t)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/")},each:s,remove:l,clearAll:function(){s((function(e,t){l(t)}))}};var a=i.document;function s(e){for(var t=a.cookie.split(/; ?/g),n=t.length-1;n>=0;n--)if(o(t[n])){var r=t[n].split("="),i=unescape(r[0]);e(unescape(r[1]),i)}}function l(e){e&&u(e)&&(a.cookie=escape(e)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/")}function u(e){return new RegExp("(?:^|;\\s*)"+escape(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(a.cookie)}},{"../src/util":21}],24:[function(e,t,n){var r=e("../src/util").Global;function i(){return r.localStorage}function o(e){return i().getItem(e)}t.exports={name:"localStorage",read:o,write:function(e,t){return i().setItem(e,t)},each:function(e){for(var t=i().length-1;t>=0;t--){var n=i().key(t);e(o(n),n)}},remove:function(e){return i().removeItem(e)},clearAll:function(){return i().clear()}}},{"../src/util":21}],25:[function(e,t,n){t.exports={name:"memoryStorage",read:function(e){return r[e]},write:function(e,t){r[e]=t},each:function(e){for(var t in r)r.hasOwnProperty(t)&&e(r[t],t)},remove:function(e){delete r[e]},clearAll:function(e){r={}}};var r={}},{}],26:[function(e,t,n){var r=e("../src/util").Global;t.exports={name:"oldFF-globalStorage",read:function(e){return i[e]},write:function(e,t){i[e]=t},each:o,remove:function(e){return i.removeItem(e)},clearAll:function(){o((function(e,t){delete i[e]}))}};var i=r.globalStorage;function o(e){for(var t=i.length-1;t>=0;t--){var n=i.key(t);e(i[n],n)}}},{"../src/util":21}],27:[function(e,t,n){var r=e("../src/util").Global;t.exports={name:"oldIE-userDataStorage",write:function(e,t){if(!a){var n=l(e);o((function(e){e.setAttribute(n,t),e.save("storejs")}))}},read:function(e){if(!a){var t=l(e),n=null;return o((function(e){n=e.getAttribute(t)})),n}},each:function(e){o((function(t){for(var n=t.XMLDocument.documentElement.attributes,r=n.length-1;r>=0;r--){var i=n[r];e(t.getAttribute(i.name),i.name)}}))},remove:function(e){var t=l(e);o((function(e){e.removeAttribute(t),e.save("storejs")}))},clearAll:function(){o((function(e){var t=e.XMLDocument.documentElement.attributes;e.load("storejs");for(var n=t.length-1;n>=0;n--)e.removeAttribute(t[n].name);e.save("storejs")}))}};var i=r.document,o=function(){if(!i||!i.documentElement||!i.documentElement.addBehavior)return null;var e,t,n;try{(t=new ActiveXObject("htmlfile")).open(),t.write('<script>document.w=window<\/script><iframe src="/favicon.ico"></iframe>'),t.close(),e=t.w.frames[0].document,n=e.createElement("div")}catch(t){n=i.createElement("div"),e=i.body}return function(t){var r=[].slice.call(arguments,0);r.unshift(n),e.appendChild(n),n.addBehavior("#default#userData"),n.load("storejs"),t.apply(this,r),e.removeChild(n)}}(),a=(r.navigator?r.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./),s=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function l(e){return e.replace(/^\d/,"___$&").replace(s,"___")}},{"../src/util":21}],28:[function(e,t,n){var r=e("../src/util").Global;function i(){return r.sessionStorage}function o(e){return i().getItem(e)}t.exports={name:"sessionStorage",read:o,write:function(e,t){return i().setItem(e,t)},each:function(e){for(var t=i().length-1;t>=0;t--){var n=i().key(t);e(o(n),n)}},remove:function(e){return i().removeItem(e)},clearAll:function(){return i().clear()}}},{"../src/util":21}],29:[function(e,t,n){t.exports={_args:[[{raw:"yasgui-utils@^1.6.0",scope:null,escapedName:"yasgui-utils",name:"yasgui-utils",rawSpec:"^1.6.0",spec:">=1.6.0 <2.0.0",type:"range"},"/home/sava/IntellijProjects/YASQE-Ontotext"]],_from:"yasgui-utils@>=1.6.0 <2.0.0",_id:"yasgui-utils@1.6.7",_inCache:!0,_location:"/yasgui-utils",_nodeVersion:"7.10.0",_npmOperationalInternal:{host:"s3://npm-registry-packages",tmp:"tmp/yasgui-utils-1.6.7.tgz_1495459781202_0.06725964159704745"},_npmUser:{name:"laurens.rietveld",email:"laurens.rietveld@gmail.com"},_npmVersion:"4.2.0",_phantomChildren:{},_requested:{raw:"yasgui-utils@^1.6.0",scope:null,escapedName:"yasgui-utils",name:"yasgui-utils",rawSpec:"^1.6.0",spec:">=1.6.0 <2.0.0",type:"range"},_requiredBy:["/"],_resolved:"https://registry.npmjs.org/yasgui-utils/-/yasgui-utils-1.6.7.tgz",_shasum:"2bcfc5a315688de3ae6057883d9ae342b205f267",_shrinkwrap:null,_spec:"yasgui-utils@^1.6.0",_where:"/home/sava/IntellijProjects/YASQE-Ontotext",author:{name:"Laurens Rietveld"},bugs:{url:"https://github.com/YASGUI/Utils/issues"},dependencies:{store:"^2.0.4"},description:"Utils for YASGUI libs",devDependencies:{},directories:{},dist:{shasum:"2bcfc5a315688de3ae6057883d9ae342b205f267",tarball:"https://registry.npmjs.org/yasgui-utils/-/yasgui-utils-1.6.7.tgz"},gitHead:"6031b1cb732d390b29cd5376dceb9a9d665bbd11",homepage:"https://github.com/YASGUI/Utils",licenses:[{type:"MIT",url:"http://yasgui.github.io/license.txt"}],main:"src/main.js",maintainers:[{name:"laurens.rietveld",email:"laurens.rietveld@gmail.com"}],name:"yasgui-utils",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{type:"git",url:"git://github.com/YASGUI/Utils.git"},scripts:{},version:"1.6.7"}},{}],30:[function(e,t,n){window.console=window.console||{log:function(){}},t.exports={storage:e("./storage.js"),svg:e("./svg.js"),version:{"yasgui-utils":e("../package.json").version},nestedExists:function(e){for(var t=Array.prototype.slice.call(arguments,1),n=0;n<t.length;n++){if(!e||!e.hasOwnProperty(t[n]))return!1;e=e[t[n]]}return!0}}},{"../package.json":29,"./storage.js":31,"./svg.js":32}],31:[function(e,t,n){var r=e("store"),i={day:function(){return 864e5},month:function(){i.day()},year:function(){i.month()}},o=t.exports={set:function(e,t,n,o){if(r.enabled&&e&&void 0!==t){"string"==typeof n&&(n=i[n]()),t.documentElement&&(t=(new XMLSerializer).serializeToString(t.documentElement));try{r.set(e,{val:t,exp:n,time:(new Date).getTime()})}catch(e){if(e.quotaExceeded=function(e){var t=!1;if(e)if(e.code)switch(e.code){case 22:t=!0;break;case 1014:"NS_ERROR_DOM_QUOTA_REACHED"===e.name&&(t=!0)}else-2147024882===e.number&&(t=!0);return t}(e),!e.quotaExceeded||!o)throw e;o(e)}}},remove:function(e){r.enabled&&e&&r.remove(e)},removeAll:function(e){r.enabled&&(e?"function"==typeof e&&r.each((function(t,n){e(n,t)&&o.remove(n)})):r.clearAll())},get:function(e){if(!r.enabled)return null;if(e){var t=r.get(e);return t?t.exp&&(new Date).getTime()-t.time>t.exp?null:t.val:null}return null}}},{store:17}],32:[function(e,t,n){t.exports={draw:function(e,n){if(e){var r=t.exports.getElement(n);r&&(e.append?e.append(r):e.appendChild(r))}},getElement:function(e){if(e&&0==e.indexOf("<svg")){var t=(new DOMParser).parseFromString(e,"text/xml").documentElement,n=document.createElement("div");return n.className="svgImg",n.appendChild(t),n}return!1}}},{}],33:[function(e,t,n){t.exports={name:"yasgui-yasqe",description:"Yet Another SPARQL Query Editor",version:"2.10.5",main:"src/main.js",license:"MIT",author:"Laurens Rietveld",homepage:"http://yasqe.yasgui.org",scripts:{dev:"gulp serve",build:"gulp",patch:"gulp patch",minor:"gulp minor",major:"gulp major"},devDependencies:{"gulp-bump":"^2.2.0","gulp-connect":"^4.2.0","gulp-embedlr":"^0.5.2","gulp-git":"^1.10.0","gulp-livereload":"^3.8.1","gulp-tag-version":"^1.3.0",watchify:"^3.7.0"},bugs:"https://github.com/YASGUI/YASQE/issues/",keywords:["JavaScript","SPARQL","Editor","Semantic Web","Linked Data"],maintainers:[{name:"Laurens Rietveld",email:"laurens.rietveld@gmail.com",web:"http://laurensrietveld.nl"}],repository:{type:"git",url:"https://github.com/YASGUI/YASQE.git"},dependencies:{"bootstrap-sass":"~3.3.1",browserify:"^13.1.0","browserify-transform-tools":"^1.6.0",codemirror:"5.17.0",exorcist:"^0.4.0",gulp:"~3.9.0","gulp-autoprefixer":"^3.1.0","gulp-concat":"^2.6.0","gulp-cssimport":"^3.1.0","gulp-cssnano":"^2.1.2","gulp-filter":"^4.0.0","gulp-jsvalidate":"^2.1.0","gulp-notify":"^2.2.0","gulp-rename":"^1.2.2","gulp-sass":"^2.2.0","gulp-sourcemaps":"^1.6.0","gulp-streamify":"1.0.2","gulp-uglify":"~0.2.1",jquery:"^2.2.4","require-dir":"^0.3.0","run-sequence":"^1.2.2","vinyl-buffer":"^1.0.0","vinyl-source-stream":"~1.1.0","vinyl-transform":"1.0.0","yasgui-utils":"^1.6.0"},optionalShim:{codemirror:{require:"codemirror",global:"CodeMirror"},jquery:{require:"jquery",global:"jQuery"},"../../lib/codemirror":{require:"codemirror",global:"CodeMirror"}}}},{}],34:[function(e,t,n){"use strict";var r=e("jquery"),i=e("../utils.js"),o=e("yasgui-utils"),a=e("../../lib/trie.js");e("../main.js"),t.exports=function(t,n){var l={},u={},c={},d=!1;n.translate=e("../translate.js")(n),n.on("cursorActivity",(function(e,t){p(!0)})),n.on("keyHandled",(function(e,t,n){"Esc"===t&&(d=!1)})),n.on("change",(function(e,t,n){void 0!==n&&" "==n.text&&(d=!1);var i=[];for(var o in l)l[o].is(":visible")&&i.push(l[o]);if(i.length>0){var a=r(e.getWrapperElement()).find(".CodeMirror-vscrollbar"),s=0;a.is(":visible")&&(s=a.outerWidth()),i.forEach((function(e){e.css("right",s)}))}}));var p=function(e){if(!n.somethingSelected()){n.fromAutoShow=e;var i=function(r){if(e&&!d)return!1;if(e&&!r.autoShow)return!1;e||(d=!0);var i={closeCharacters:/(?=a)b/,completeSingle:!1};return!r.bulk&&r.async&&(i.async=!0),t.showHint(n,(function(e,t){return f(r,t)}),i),!0};for(var o in u)if(-1!=r.inArray(o,n.options.autocompleters)){var a=u[o];if(a.isValidCompletionPosition)if(a.isValidCompletionPosition()){if((!a.callbacks||!a.callbacks.validPosition||!1!==a.callbacks.validPosition(n,a))&&i(a))break}else a.callbacks&&a.callbacks.invalidPosition&&a.callbacks.invalidPosition(n,a)}}},f=function(e,t){var r=n.getCompleteToken();if(e.preProcessToken&&(r=e.preProcessToken(r)),r){if(e.bulk||!e.async)return function(t){var n=t.autocompletionString||t.string,r=[];if(c[e.name])r=c[e.name].autoComplete(n);else if("function"==typeof e.get&&0==e.async)r=e.get(n);else if("object"==typeof e.get)for(var i=n.length,o=0;o<e.get.length;o++){var a=e.get[o];a.slice(0,i)==n&&r.push(a)}return g(r,e,t)}(r);e.get(r,(function(n){t(g(n,e,r))}))}},h=function(e,t,n){return e.replace(new RegExp(t,"g"),n)},g=function(e,i,o){for(var a,l=[],u=0;u<e.length;u++){var c=e[u];if(c.value){var p=c.value,f=c.description;if("prefix"===c.type?p+=":":i.postProcessToken&&(p=i.postProcessToken(o,p)),(!p.startsWith("<")||!p.endsWith(">"))&&p.indexOf(":")>0){var g=p.indexOf(":");p=p.substring(0,g+1)+((a=p.substring(g+1)).trim().startsWith("<")&&a.trim().endsWith(">")?a:(a=encodeURIComponent(a),a=h(a,"[*]","%2a"),a=h(a,"[!]","%21"),a=h(a,"[(]","%28"),a=h(a,"[)]","%29"),a=h(a,"[~]","%7e"),a=h(a,"[']","%27")))}l.push({text:p,displayText:f,hint:function(e,t,n){d=!1,s(e,t,n)},render:function(e,t,n){r(e).append(n.displayText)}})}}var m=n.getCursor(),v={completionToken:o.string,list:l,from:{line:m.line,ch:o.start},to:{line:m.line,ch:o.end}};if(i.callbacks)for(var y in i.callbacks)i.callbacks[y]&&t.on(v,y,i.callbacks[y]);return v};return{init:function(e,t){var r=u[e]=new t(n,e);if(r.name=e,r.bulk){var s=function(e){e&&e instanceof Array&&e.length>0&&function(e,t){c[e.name]=new a;for(var r=0;r<t.length;r++)c[e.name].insert(t[r]);var s=i.getPersistencyId(n,e.persistent);s&&o.storage.set(s,t,"month")}(r,e)};if(r.get instanceof Array)s(r.get);else{var l=null,d=i.getPersistencyId(n,r.persistent);d&&(l=o.storage.get(d)),l&&l.length>0?s(l):r.get instanceof Function&&(r.async?r.get(null,s):s(r.get()))}}},completers:u,notifications:{getEl:function(e){return r(l[e.name])},show:function(e,t){t.autoshow||(l[t.name]||(l[t.name]=r("<div class='completionNotification'></div>")),r("#keyboardShortcuts").hide(),l[t.name].show().text(e.translate("yasqe.autocompleterBase.message")).appendTo(r(e.getWrapperElement())))},hide:function(e,t){l[t.name]&&(l[t.name].hide(),r("#keyboardShortcuts").show())}},autoComplete:p,getTrie:function(e){return"string"==typeof e?c[e]:c[e.name]}}};var s=function(e,t,n){n.text!=e.getTokenAt(e.getCursor()).string&&e.replaceRange(n.text,t.from,t.to)}},{"../../lib/trie.js":4,"../main.js":48,"../translate.js":54,"../utils.js":55,jquery:16,"yasgui-utils":30}],35:[function(e,t,n){"use strict";e("jquery"),t.exports=function(n,r){return{isValidCompletionPosition:function(){return t.exports.isValidCompletionPosition(n)},get:function(t,r){return e("./utils").fetchFromLov(n,this,t,r)},preProcessToken:function(e){return t.exports.preProcessToken(n,e)},postProcessToken:function(e,r){return t.exports.postProcessToken(n,e,r)},async:!0,bulk:!1,autoShow:!1,persistent:r,callbacks:{validPosition:n.autocompleters.notifications.show,invalidPosition:n.autocompleters.notifications.hide}}},t.exports.isValidCompletionPosition=function(e){var t=e.getCompleteToken();if(0==t.string.indexOf("?"))return!1;var n=e.getCursor(),r=e.getPreviousNonWsToken(n.line,t);return"a"==r.string||"rdf:type"==r.string||"rdfs:domain"==r.string||"rdfs:range"==r.string},t.exports.preProcessToken=function(t,n){return e("./utils.js").preprocessResourceTokenForCompletion(t,n)},t.exports.postProcessToken=function(t,n,r){return e("./utils.js").postprocessResourceTokenForCompletion(t,n,r)}},{"./utils":40,"./utils.js":40,jquery:16}],36:[function(e,t,n){"use strict";var r,i,o=e("jquery");t.exports=function(e,n){return e.on("repositoryOrAuthorizationChanged",(function(e,t){i=e,r=t})),{isValidCompletionPosition:function(){return t.exports.isValidCompletionPosition(e)},get:function(n,r){return t.exports.fetchAutocomplete(e,n,r)},preProcessToken:function(n){return t.exports.preProcessToken(e,n)},postProcessToken:function(n,r){return t.exports.postProcessToken(e,n,r)},async:!0,bulk:!1,autoShow:!0,persistent:n,callbacks:{validPosition:e.autocompleters.notifications.show,invalidPosition:e.autocompleters.notifications.hide}}},t.exports.fetchAutocomplete=function(e,t,n){if(i&&"SYSTEM"!==i){if(!t||!t.string||0===t.string.trim().length)return!1;var a;a=t.tokenPrefix?t.tokenPrefixUri+";"+t.string.substring(t.tokenPrefix.length):t.autocompletionString.startsWith("http://")?t.autocompletionString+";":t.autocompletionString;var s={"X-GraphDB-Repository":i};r&&(s.Authorization=r),o.get({url:"rest/autocomplete/query",data:{q:a},success:function(t,r,i){204!==i.status||e.fromAutoShow?t&&n(t.suggestions):e.toastBuildIndex()},dataType:"json",headers:s}).fail((function(t){e.fromAutoShow||e.toastError(t)}))}},t.exports.isValidCompletionPosition=function(e){var t=e.getCursor();if(e.getTokenAt(t),0==e.getLine(t.line).toUpperCase().trim().indexOf("PREFIX"))return!1;var n=e.getCompleteToken();return-1!=o.inArray("IRI_REF",n.state.possibleCurrent)&&0!=n.string.length&&0!=n.string.indexOf("?")},t.exports.preProcessToken=function(t,n){return e("./utils.js").preprocessResourceTokenForCompletion(t,n)},t.exports.postProcessToken=function(t,n,r){return e("./utils.js").postprocessResourceTokenForCompletion(t,n,r)}},{"./utils.js":40,jquery:16}],37:[function(e,t,n){"use strict";var r=e("jquery");t.exports=function(n,r){return{isValidCompletionPosition:function(){return t.exports.isValidCompletionPosition(n)},get:function(t,r){return e("./utils").fetchFromLov(n,this,t,r)},preProcessToken:function(e){return t.exports.preProcessToken(n,e)},postProcessToken:function(e,r){return t.exports.postProcessToken(n,e,r)},async:!0,bulk:!1,autoShow:!1,persistent:r,callbacks:{validPosition:n.autocompleters.notifications.show,invalidPosition:n.autocompleters.notifications.hide}}},t.exports.isValidCompletionPosition=function(e){var t=e.getCompleteToken();if(0==t.string.length)return!1;if(0==t.string.indexOf("?"))return!1;if(r.inArray("a",t.state.possibleCurrent)>=0)return!0;var n=e.getCursor();return"rdfs:subPropertyOf"==e.getPreviousNonWsToken(n.line,t).string},t.exports.preProcessToken=function(t,n){return e("./utils.js").preprocessResourceTokenForCompletion(t,n)},t.exports.postProcessToken=function(t,n,r){return e("./utils.js").postprocessResourceTokenForCompletion(t,n,r)}},{"./utils":40,"./utils.js":40,jquery:16}],38:[function(e,t,n){"use strict";var r,i=e("jquery"),o=(e("./utils"),{"string-2":"prefixed",atom:"var"});t.exports=function(e,n){return e.on("change",(function(){t.exports.appendPrefixIfNeeded(e,n)})),e.on("namespacesChanged",(function(n){t.exports.updateNamespaces(e,n)})),{isValidCompletionPosition:function(){return t.exports.isValidCompletionPosition(e)},get:function(e,t){r=t},preProcessToken:function(n){return t.exports.preprocessPrefixTokenForCompletion(e,n)},async:!0,bulk:!0,autoShow:!0,persistent:null}},t.exports.isValidCompletionPosition=function(e){var t=e.getCursor(),n=e.getTokenAt(t);if(e.getLine(t.line).length>t.ch)return!1;if("ws"!=n.type&&(n=e.getCompleteToken()),0==!n.string.indexOf("a")&&-1==i.inArray("PNAME_NS",n.state.possibleCurrent))return!1;var r=e.getPreviousNonWsToken(t.line,n);return!(!r||"PREFIX"!=r.string.toUpperCase())},t.exports.preprocessPrefixTokenForCompletion=function(e,t){var n=e.getPreviousNonWsToken(e.getCursor().line,t);return n&&n.string&&":"==n.string.slice(-1)&&(t={start:n.start,end:t.end,string:n.string+" "+t.string,state:t.state}),t},t.exports.appendPrefixIfNeeded=function(e,t){if(e.autocompleters.getTrie(t)&&e.options.autocompleters&&-1!=e.options.autocompleters.indexOf(t)){var n=e.getCursor(),r=e.getTokenAt(n);if("prefixed"==o[r.type]){var i=r.string.indexOf(":");if(-1!==i){var a=e.getPreviousNonWsToken(n.line,r).string.toUpperCase(),s=e.getTokenAt({line:n.line,ch:r.start});if("PREFIX"!=a&&("ws"==s.type||null==s.type)){var l=r.string.substring(0,i+1);if(null==e.getPrefixesFromQuery()[l.slice(0,-1)]){var u=e.autocompleters.getTrie(t).autoComplete(l);u.length>0&&e.addPrefixes(u[0])}}}}}},t.exports.updateNamespaces=function(e,t){var n=!1,o=i.map(t,(function(e,t){return"onto"===t&&(n=!0),t+": <"+e+">"}));n||o.push("onto: <http://www.ontotext.com/>"),o.sort(),r(o)}},{"./utils":40,jquery:16}],39:[function(e,t,n){t.exports=function(e,t){return{isValidCompletionPosition:function(){var t=e.getTokenAt(e.getCursor());return"ws"!=t.type&&(t=e.getCompleteToken()).string.length>1},get:function(e,t){for(var n=["COUNT","SUM","MIN","MAX","AVG","SAMPLE","STR","LANG","LANGMATCHES","DATATYPE","BOUND","IRI","URI","BNODE","RAND","ABS","CEIL","FLOOR","ROUND","CONCAT","SUBSTR","STRLEN","REPLACE","UCASE","LCASE","ENCODE_FOR_URI","CONTAINS","STRSTARTS","STRENDS","STRBEFORE","STRAFTER","YEAR","MONTH","DAY","HOURS","MINUTES","SECONDS","TIMEZONE","TZ","NOW","UUID","STRUUID","MD5","SHA1","SHA256","SHA384","SHA512","COALESCE","IF","STRLANG","STRDT","sameTerm","isIRI","isURI","isBLANK","isLITERAL","isNUMERIC","REGEX","EXISTS","FILTER"],r=[],i=0;i<n.length;i++){var o=n[i],a=o.toLowerCase(),s=e.toLowerCase();0===a.indexOf(s)&&r.push(o+"(")}return r.sort(),r},preProcessToken:null,postProcessToken:null,async:!1,bulk:!1,autoShow:!0,persistent:null,handlers:{validPosition:null,invalidPosition:null,shown:null,select:null,pick:null,close:null}}}},{}],40:[function(e,t,n){"use strict";var r=e("jquery"),i=(e("./utils.js"),e("yasgui-utils")),o=0===window.location.protocol.indexOf("http")?"//":"http://";t.exports={fetchFromLov:function(t,n,a,s){if(!a||!a.string||0==a.string.trim().length)return t.autocompleters.notifications.getEl(n).empty().append(t.translate("yasqe.utils.message1")),!1;var l={q:a.autocompletionString,page:1};"classes"==n.name?l.type="class":l.type="property";var u=[],c="",d=function(){c=o+"lov.okfn.org/dataset/lov/api/v2/autocomplete/terms?"+r.param(l)};d();var p=function(){r.get(c,(function(e){for(var i=0;i<e.results.length;i++)r.isArray(e.results[i].uri)&&e.results[i].uri.length>0?u.push(e.results[i].uri[0]):u.push(e.results[i].uri);u.length<e.total_results&&u.length<50?(l.page++,d(),p()):(u.length>0?t.autocompleters.notifications.hide(t,n):t.autocompleters.notifications.getEl(n).text(t.translate("yasqe.utils.message2")),s(u))})).fail((function(e,r,i){t.autocompleters.notifications.getEl(n).empty().append(t.translate("yasqe.utils.message3"))}))};t.autocompleters.notifications.getEl(n).empty().append(r("<span>Fetchting autocompletions </span>")).append(r(i.svg.getElement(e("../imgs.js").loader)).addClass("notificationLoader")),p()},preprocessResourceTokenForCompletion:function(t,n){var r=t.getPrefixesFromQuery();if(0==!n.string.indexOf("<")&&(n.tokenPrefix=n.string.substring(0,n.string.indexOf(":")+1),null!=r[n.tokenPrefix.slice(0,-1)]&&(n.tokenPrefixUri=r[n.tokenPrefix.slice(0,-1)])),t.translate=e("../translate.js")(t),n.autocompletionString=n.string.trim(),0==!n.string.indexOf("<")&&n.string.indexOf(":")>-1)for(var i in r)if(0==n.string.indexOf(i)){n.autocompletionString=r[i],n.autocompletionString+=n.string.substring(i.length+1);break}return 0==n.autocompletionString.indexOf("<")&&(n.autocompletionString=n.autocompletionString.substring(1)),-1!==n.autocompletionString.indexOf(">",n.length-1)&&(n.autocompletionString=n.autocompletionString.substring(0,n.autocompletionString.length-1)),n},postprocessResourceTokenForCompletion:function(e,t,n){if(t.tokenPrefix&&t.autocompletionString&&t.tokenPrefixUri)n=t.tokenPrefix+n.substring(t.tokenPrefixUri.length);else{var r=e.getPrefixesFromQuery(),i=_.filter(_.values(r),(function(e){return n.startsWith(e)}));if(i.length>0){var o=_.findKey(r,(function(e){return e===i[0]}));n=o+":"+n.substring(r[o].length)}else{if(0===n.indexOf("<b>"+t.string))return n;if(n.startsWith("<<")&&n.endsWith(">>"))return n;n="<"+n+">"}}return n}}},{"../imgs.js":47,"../translate.js":54,"./utils.js":40,jquery:16,"yasgui-utils":30}],41:[function(e,t,n){"use strict";var r=e("jquery");t.exports=function(e){return{isValidCompletionPosition:function(){var t=e.getTokenAt(e.getCursor());return!("ws"==t.type||!(t=e.getCompleteToken(t))||0!=t.string.indexOf("?"))},get:function(t){if(0==t.trim().length)return[];var n={};r(e.getWrapperElement()).find(".cm-atom").each((function(){var e=this.innerHTML;if(0==e.indexOf("?")){var i=r(this).next();if(i.attr("class")&&i.attr("class").indexOf("cm-atom")>=0&&(e+=i.text()),e.length<=1)return;if(0!==e.indexOf(t))return;if(e==t)return;n[e]=!0}}));var i=[];for(var o in n)i.push(o);return i.sort(),i},async:!1,bulk:!1,autoShow:!0}}},{jquery:16}],42:[function(e,t,n){var r=e("./sparql.js"),i=e("jquery"),o=function(e){return"'"+e+"'"};t.exports={createCurlString:function(e,t){var n=r.getAjaxConfig(e,t),a=n.url;0!==n.url.indexOf("http")&&(a=window.location.protocol+"//"+window.location.host,0===n.url.indexOf("/")?a+=n.url:a+=window.location.pathname+n.url);var s=["curl",a,"-X",e.options.sparql.requestMethod];for(var l in"POST"==e.options.sparql.requestMethod&&s.push("--data "+o(i.param(n.data))),n.headers)s.push("-H "+o(l+": "+n.headers[l]));return s.join(" ")}}},{"./sparql.js":51,jquery:16}],43:[function(e,t,n){var r=e("jquery"),i=e("./main.js");i.defaults=r.extend(!0,{},i.defaults,{mode:"sparql11",value:"PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\nPREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\nSELECT * WHERE {\n ?sub ?pred ?obj .\n} \nLIMIT 10",highlightSelectionMatches:{showToken:/\w/},tabMode:"indent",autoCloseBrackets:!0,lineNumbers:!0,lineWrapping:!0,backdrop:!1,foldGutter:{rangeFinder:new i.fold.combine(i.fold.brace,i.fold.prefix)},collapsePrefixesOnLoad:!1,gutters:["gutterErrorBar","CodeMirror-linenumbers","CodeMirror-foldgutter"],matchBrackets:!0,fixedGutter:!0,syntaxErrorCheck:!0,extraKeys:{"Alt-Enter":i.autoComplete,"Ctrl-Space":i.autoComplete,"Cmd-Space":i.autoComplete,"Ctrl-D":i.deleteLine,"Ctrl-K":i.deleteLine,"Cmd-D":i.deleteLine,"Cmd-K":i.deleteLine,"Ctrl-/":i.commentLines,"Cmd-/":i.commentLines,"Ctrl-Alt-Down":i.copyLineDown,"Ctrl-Alt-Up":i.copyLineUp,"Cmd-Alt-Down":i.copyLineDown,"Cmd-Alt-Up":i.copyLineUp,"Shift-Ctrl-F":i.doAutoFormat,"Shift-Cmd-F":i.doAutoFormat,"Ctrl-]":i.indentMore,"Cmd-]":i.indentMore,"Ctrl-[":i.indentLess,"Cmd-[":i.indentLess,"Ctrl-S":i.storeQuery,"Cmd-S":i.storeQuery,"Ctrl-Enter":i.executeQuery,"Cmd-Enter":i.executeQuery,F11:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){e.getOption("fullScreen")&&e.setOption("fullScreen",!1)}},cursorHeight:.9,createShareLink:i.createShareLink,createShortLink:null,consumeShareLink:i.consumeShareLink,persistent:function(e){return"yasqe_"+r(e.getWrapperElement()).closest("[id]").attr("id")+"_queryVal"},sparql:{queryName:function(e){return e.getQueryMode()},showQueryButton:!1,endpoint:"http://dbpedia.org/sparql",requestMethod:"POST",acceptHeaderGraph:"text/turtle,*/*;q=0.9",acceptHeaderSelect:"application/sparql-results+json,*/*;q=0.9",acceptHeaderUpdate:"text/plain,*/*;q=0.9",namedGraphs:[],defaultGraphs:[],args:[],headers:{},getQueryForAjax:null,callbacks:{beforeSend:null,complete:null,error:null,success:null},handlers:{}}})},{"./main.js":48,jquery:16}],44:[function(e,t,n){t.exports=e("./main.js")},{"./main.js":48}],45:[function(e,t,n){t.exports={"yasqe.invalid.line":"This line is invalid. Expected: ","yasqe.btn.title.fullscreen":"Set editor full screen","yasqe.btn.title.normalsize":"Set editor to normal size","yasqe.btn.title.share":"Share your query","yasqe.btn.lbl.curl":"CURL","yasqe.btn.lbl.shorten":"Shorten","yasqe.autocompleterBase.message":"Press Alt+Enter to autocomplete","yasqe.utils.message1":"Nothing to autocomplete yet!","yasqe.utils.message2":"0 matches found...","yasqe.utils.message3":"Failed fetching suggestions.."}},{}],46:[function(e,t,n){t.exports={"yasqe.invalid.line":"Cette ligne n'est pas valide. Attendu:","yasqe.btn.title.fullscreen":"Configurer l'éditeur en plein écran","yasqe.btn.title.normalsize":"Configurer l'éditeur à la taille normale","yasqe.btn.title.share":"Partagez votre requête","yasqe.btn.lbl.curl":"CURL","yasqe.btn.lbl.shorten":"Raccourcir","yasqe.autocompleterBase.message":"Appuyez sur Alt+Enter pour l'autocomplétion.","yasqe.utils.message1":"Rien à autocompléter encore !","yasqe.utils.message2":"0 correspondances trouvées ...","yasqe.utils.message3":"Échec de la récupération des suggestions..."}},{}],47:[function(e,t,n){"use strict";t.exports={query:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" width="100%" height="100%" viewBox="0 0 80 80" enable-background="new 0 0 80 80" xml:space="preserve"><g ></g><g >\t<path d="M64.622,2.411H14.995c-6.627,0-12,5.373-12,12v49.897c0,6.627,5.373,12,12,12h49.627c6.627,0,12-5.373,12-12V14.411 C76.622,7.783,71.249,2.411,64.622,2.411z M24.125,63.906V15.093L61,39.168L24.125,63.906z"/></g></svg>',queryInvalid:'<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" x="0px" y="0px" width="100%" height="100%" viewBox="0 0 73.627 73.897" enable-background="new 0 0 80 80" xml:space="preserve" inkscape:version="0.48.4 r9939" sodipodi:docname="warning.svg"><metadata ><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs /><sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="1855" inkscape:window-height="1056" showgrid="false" inkscape:zoom="3.1936344" inkscape:cx="36.8135" inkscape:cy="36.9485" inkscape:window-x="2625" inkscape:window-y="24" inkscape:window-maximized="1" inkscape:current-layer="svg2" /><g transform="translate(-2.995,-2.411)" /><g transform="translate(-2.995,-2.411)" ><path d="M 64.622,2.411 H 14.995 c -6.627,0 -12,5.373 -12,12 v 49.897 c 0,6.627 5.373,12 12,12 h 49.627 c 6.627,0 12,-5.373 12,-12 V 14.411 c 0,-6.628 -5.373,-12 -12,-12 z M 24.125,63.906 V 15.093 L 61,39.168 24.125,63.906 z" inkscape:connector-curvature="0" /></g><path d="M 66.129381,65.903784 H 49.769875 c -1.64721,0 -2.889385,-0.581146 -3.498678,-1.63595 -0.609293,-1.055608 -0.491079,-2.422161 0.332391,-3.848223 l 8.179753,-14.167069 c 0.822934,-1.42633 1.9477,-2.211737 3.166018,-2.211737 1.218319,0 2.343086,0.785407 3.166019,2.211737 l 8.179751,14.167069 c 0.823472,1.426062 0.941686,2.792615 0.33239,3.848223 -0.609023,1.054804 -1.851197,1.63595 -3.498138,1.63595 z M 59.618815,60.91766 c 0,-0.850276 -0.68944,-1.539719 -1.539717,-1.539719 -0.850276,0 -1.539718,0.689443 -1.539718,1.539719 0,0.850277 0.689442,1.539718 1.539718,1.539718 0.850277,0 1.539717,-0.689441 1.539717,-1.539718 z m 0.04155,-9.265919 c 0,-0.873061 -0.707939,-1.580998 -1.580999,-1.580998 -0.873061,0 -1.580999,0.707937 -1.580999,1.580998 l 0.373403,5.610965 h 0.0051 c 0.05415,0.619747 0.568548,1.10761 1.202504,1.10761 0.586239,0 1.075443,-0.415756 1.188563,-0.968489 0.0092,-0.04476 0.0099,-0.09248 0.01392,-0.138854 h 0.01072 l 0.367776,-5.611232 z" inkscape:connector-curvature="0" style="fill:#aa8800" /></svg>',download:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="tiny" x="0px" y="0px" width="100%" height="100%" viewBox="0 0 100 100" xml:space="preserve"><g ></g><g >\t<path fill-rule="evenodd" fill="#000000" d="M88,84v-2c0-2.961-0.859-4-4-4H16c-2.961,0-4,0.98-4,4v2c0,3.102,1.039,4,4,4h68 C87.02,88,88,87.039,88,84z M58,12H42c-5,0-6,0.941-6,6v22H16l34,34l34-34H64V18C64,12.941,62.939,12,58,12z"/></g></svg>',share:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" width="100%" height="100%" viewBox="0 0 100 100" style="enable-background:new 0 0 100 100;" xml:space="preserve"><path d="M36.764,50c0,0.308-0.07,0.598-0.088,0.905l32.247,16.119c2.76-2.338,6.293-3.797,10.195-3.797 C87.89,63.228,95,70.338,95,79.109C95,87.89,87.89,95,79.118,95c-8.78,0-15.882-7.11-15.882-15.891c0-0.316,0.07-0.598,0.088-0.905 L31.077,62.085c-2.769,2.329-6.293,3.788-10.195,3.788C12.11,65.873,5,58.771,5,50c0-8.78,7.11-15.891,15.882-15.891 c3.902,0,7.427,1.468,10.195,3.797l32.247-16.119c-0.018-0.308-0.088-0.598-0.088-0.914C63.236,12.11,70.338,5,79.118,5 C87.89,5,95,12.11,95,20.873c0,8.78-7.11,15.891-15.882,15.891c-3.911,0-7.436-1.468-10.195-3.806L36.676,49.086 C36.693,49.394,36.764,49.684,36.764,50z"/></svg>',warning:'<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" x="0px" y="0px" viewBox="0 0 66.399998 66.399998" enable-background="new 0 0 69.3 69.3" xml:space="preserve" height="100%" width="100%" inkscape:version="0.48.4 r9939" ><g transform="translate(-1.5,-1.5)" style="fill:#ff0000"><path d="M 34.7,1.5 C 16.4,1.5 1.5,16.4 1.5,34.7 1.5,53 16.4,67.9 34.7,67.9 53,67.9 67.9,53 67.9,34.7 67.9,16.4 53,1.5 34.7,1.5 z m 0,59.4 C 20.2,60.9 8.5,49.1 8.5,34.7 8.5,20.2 20.3,8.5 34.7,8.5 c 14.4,0 26.2,11.8 26.2,26.2 0,14.4 -11.8,26.2 -26.2,26.2 z" inkscape:connector-curvature="0" style="fill:#ff0000" /><path d="m 34.6,47.1 c -1.4,0 -2.5,0.5 -3.5,1.5 -0.9,1 -1.4,2.2 -1.4,3.6 0,1.6 0.5,2.8 1.5,3.8 1,0.9 2.1,1.3 3.4,1.3 1.3,0 2.4,-0.5 3.4,-1.4 1,-0.9 1.5,-2.2 1.5,-3.7 0,-1.4 -0.5,-2.6 -1.4,-3.6 -0.9,-1 -2.1,-1.5 -3.5,-1.5 z" inkscape:connector-curvature="0" style="fill:#ff0000" /><path d="m 34.8,13.9 c -1.5,0 -2.8,0.5 -3.7,1.6 -0.9,1 -1.4,2.4 -1.4,4.2 0,1.1 0.1,2.9 0.2,5.6 l 0.8,13.1 c 0.2,1.8 0.4,3.2 0.9,4.1 0.5,1.2 1.5,1.8 2.9,1.8 1.3,0 2.3,-0.7 2.9,-1.9 0.5,-1 0.7,-2.3 0.9,-4 L 39.4,25 c 0.1,-1.3 0.2,-2.5 0.2,-3.8 0,-2.2 -0.3,-3.9 -0.8,-5.1 -0.5,-1 -1.6,-2.2 -4,-2.2 z" inkscape:connector-curvature="0" style="fill:#ff0000" /></g></svg>',fullscreen:'<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" x="0px" y="0px" width="100%" height="100%" viewBox="5 -10 74.074074 100" enable-background="new 0 0 100 100" xml:space="preserve" inkscape:version="0.48.4 r9939" sodipodi:docname="noun_2186_cc.svg"><metadata ><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs /><sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="640" inkscape:window-height="480" showgrid="false" fit-margin-top="0" fit-margin-left="0" fit-margin-right="0" fit-margin-bottom="0" inkscape:zoom="2.36" inkscape:cx="44.101509" inkscape:cy="31.481481" inkscape:window-x="65" inkscape:window-y="24" inkscape:window-maximized="0" inkscape:current-layer="Layer_1" /><path d="m -7.962963,-10 v 38.889 l 16.667,-16.667 16.667,16.667 5.555,-5.555 -16.667,-16.667 16.667,-16.667 h -38.889 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="m 92.037037,-10 v 38.889 l -16.667,-16.667 -16.666,16.667 -5.556,-5.555 16.666,-16.667 -16.666,-16.667 h 38.889 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="M -7.962963,90 V 51.111 l 16.667,16.666 16.667,-16.666 5.555,5.556 -16.667,16.666 16.667,16.667 h -38.889 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="M 92.037037,90 V 51.111 l -16.667,16.666 -16.666,-16.666 -5.556,5.556 16.666,16.666 -16.666,16.667 h 38.889 z" inkscape:connector-curvature="0" style="fill:#010101" /></svg>',smallscreen:'<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" x="0px" y="0px" width="100%" height="100%" viewBox="5 -10 74.074074 100" enable-background="new 0 0 100 100" xml:space="preserve" inkscape:version="0.48.4 r9939" sodipodi:docname="noun_2186_cc.svg"><metadata ><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs /><sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="1855" inkscape:window-height="1056" showgrid="false" fit-margin-top="0" fit-margin-left="0" fit-margin-right="0" fit-margin-bottom="0" inkscape:zoom="2.36" inkscape:cx="44.101509" inkscape:cy="31.481481" inkscape:window-x="65" inkscape:window-y="24" inkscape:window-maximized="1" inkscape:current-layer="Layer_1" /><path d="m 30.926037,28.889 0,-38.889 -16.667,16.667 -16.667,-16.667 -5.555,5.555 16.667,16.667 -16.667,16.667 38.889,0 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="m 53.148037,28.889 0,-38.889 16.667,16.667 16.666,-16.667 5.556,5.555 -16.666,16.667 16.666,16.667 -38.889,0 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="m 30.926037,51.111 0,38.889 -16.667,-16.666 -16.667,16.666 -5.555,-5.556 16.667,-16.666 -16.667,-16.667 38.889,0 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="m 53.148037,51.111 0,38.889 16.667,-16.666 16.666,16.666 5.556,-5.556 -16.666,-16.666 16.666,-16.667 -38.889,0 z" inkscape:connector-curvature="0" style="fill:#010101" /></svg>'}},{}],48:[function(e,t,n){"use strict";window.console=window.console||{log:function(){}};var r=e("jquery"),i=e("codemirror"),o=e("./utils.js"),a=e("yasgui-utils"),s=e("./imgs.js");e("../lib/deparam.js"),e("codemirror/addon/fold/foldcode.js"),e("codemirror/addon/fold/foldgutter.js"),e("codemirror/addon/fold/xml-fold.js"),e("codemirror/addon/fold/brace-fold.js"),e("./prefixFold.js"),e("codemirror/addon/hint/show-hint.js"),e("codemirror/addon/search/searchcursor.js"),e("codemirror/addon/edit/matchbrackets.js"),e("codemirror/addon/runmode/runmode.js"),e("codemirror/addon/display/fullscreen.js"),e("../lib/grammar/tokenizer.js"),e("codemirror/addon/edit/closebrackets.js");var l=t.exports=function(e,t){var n=r("<div>",{class:"yasqe"}).appendTo(r(e));t=u(t);var o=c(i(n[0],t));return f(o),o},u=function(e){return r.extend(!0,{},l.defaults,e)},c=function(t){t.translate=e("./translate.js")(t),t.autocompleters=e("./autocompleters/autocompleterBase.js")(l,t),t.options.autocompleters&&t.options.autocompleters.forEach((function(e){l.Autocompleters[e]&&t.autocompleters.init(e,l.Autocompleters[e])})),t.lastQueryDuration=null,t.getCompleteToken=function(n,r){return e("./tokenUtils.js").getCompleteToken(t,n,r)},t.getPreviousNonWsToken=function(n,r){return e("./tokenUtils.js").getPreviousNonWsToken(t,n,r)},t.getNextNonWsToken=function(n,r){return e("./tokenUtils.js").getNextNonWsToken(t,n,r)},t.collapsePrefixes=function(n){void 0===n&&(n=!0),t.foldCode(e("./prefixFold.js").findFirstPrefixLine(t),l.fold.prefix,n?"fold":"unfold")};var n=null,i=null;return t.setBackdrop=function(e){(t.options.backdrop||0===t.options.backdrop||"0"===t.options.backdrop)&&(null===i&&1==(i=+t.options.backdrop)&&(i=400),n||(n=r("<div>",{class:"backdrop"}).click((function(){r(this).hide()})).insertAfter(r(t.getWrapperElement()))),e?n.show(i):n.hide(i))},t.query=function(e){l.executeQuery(t,e)},t.getUrlArguments=function(e){return l.getUrlArguments(t,e)},t.getPrefixesFromQuery=function(){return e("./prefixUtils.js").getPrefixesFromQuery(t)},t.addPrefixes=function(n){return e("./prefixUtils.js").addPrefixes(t,n)},t.removePrefixes=function(n){return e("./prefixUtils.js").removePrefixes(t,n)},t.getValueWithoutComments=function(){var e="";return l.runMode(t.getValue(),"sparql11",(function(t,n){"comment"!=n&&(e+=t)})),e},t.getQueryType=function(){return t.queryType},t.getQueryMode=function(){var e=t.getQueryType();return"INSERT"==e||"DELETE"==e||"LOAD"==e||"CLEAR"==e||"CREATE"==e||"DROP"==e||"COPY"==e||"MOVE"==e||"ADD"==e?"update":"query"},t.setCheckSyntaxErrors=function(e){t.options.syntaxErrorCheck=e,m(t)},t.enableCompleter=function(e){d(t.options,e),l.Autocompleters[e]&&t.autocompleters.init(e,l.Autocompleters[e])},t.disableCompleter=function(e){p(t.options,e)},t},d=function(e,t){e.autocompleters||(e.autocompleters=[]),e.autocompleters.push(t)},p=function(e,t){if("object"==typeof e.autocompleters){var n=r.inArray(t,e.autocompleters);n>=0&&(e.autocompleters.splice(n,1),p(e,t))}},f=function(e){var t=o.getPersistencyId(e,e.options.persistent);if(t){var n=a.storage.get(t);n&&e.setValue(n)}l.drawButtons(e),e.on("blur",(function(e,t){l.storeQuery(e)})),e.on("change",(function(e,t){m(e),l.updateQueryButton(e),l.positionButtons(e)})),e.on("changes",(function(){m(e),l.updateQueryButton(e),l.positionButtons(e)})),e.on("language-changed",(function(){m(e),l.drawButtons(e),l.autoComplete(e)})),e.on("cursorActivity",(function(e,t){g(e)})),e.prevQueryValid=!1,m(e),l.positionButtons(e),r(e.getWrapperElement()).on("mouseenter",".cm-atom",(function(){var t=r(this).text();r(e.getWrapperElement()).find(".cm-atom").filter((function(){return r(this).text()===t})).addClass("matchingVar")})).on("mouseleave",".cm-atom",(function(){r(e.getWrapperElement()).find(".matchingVar").removeClass("matchingVar")})),e.options.consumeShareLink&&(e.options.consumeShareLink(e,h()),window.addEventListener("hashchange",(function(){e.options.consumeShareLink(e,h())}))),e.options.collapsePrefixesOnLoad&&e.collapsePrefixes(!0)},h=function(){var e=null;return window.location.hash.length>1&&(e=r.deparam(location.href.split("#")[1])),e&&"query"in e||!(window.location.search.length>1)||(e=r.deparam(window.location.search.substring(1))),e},g=function(e){e.cursor=r(".CodeMirror-cursor"),e.buttons&&e.buttons.is(":visible")&&e.cursor.length>0&&(o.elementsOverlap(e.cursor,e.buttons)?e.buttons.find("svg").attr("opacity","0.2"):e.buttons.find("svg").attr("opacity","1.0"))},m=function(t,n){t.queryValid=!0,t.clearGutter("gutterErrorBar");for(var i=null,o=0;o<t.lineCount();++o){var l=!1;if(t.prevQueryValid||(l=!0),i=t.getTokenAt({line:o,ch:t.getLine(o).length},l).state,t.queryType=i.queryType,0==i.OK){if(!t.options.syntaxErrorCheck)return void r(t.getWrapperElement).find(".sp-error").css("color","black");var u=a.svg.getElement(s.warning);i.possibleCurrent&&i.possibleCurrent.length>0&&e("./tooltip")(t,u,(function(){var e=[];return i.possibleCurrent.forEach((function(t){e.push("<strong style='text-decoration:underline'>"+r("<div/>").text(t).html()+"</strong>")})),t.translate("yasqe.invalid.line")+e.join(", ")})),u.style.marginTop="2px",u.style.marginLeft="2px",u.className="parseErrorIcon",t.setGutterMarker(o,"gutterErrorBar",u),t.queryValid=!1;break}}if(t.prevQueryValid=t.queryValid,n&&null!=i&&null!=i.stack){var c=i.stack,d=i.stack.length;(d>1||1==d&&"solutionModifier"!=c[0]&&"?limitOffsetClauses"!=c[0]&&"?offsetClause"!=c[0])&&(t.queryValid=!1)}};r.extend(l,i),l.Autocompleters={},l.registerAutocompleter=function(e,t){l.Autocompleters[e]=t,d(l.defaults,e)},l.autoComplete=function(e){e.autocompleters.autoComplete(!1)},l.registerAutocompleter("sesame-prefixes",e("./autocompleters/sesame-prefixes.js")),l.registerAutocompleter("localNames",e("./autocompleters/localNames.js")),l.registerAutocompleter("properties",e("./autocompleters/properties.js")),l.registerAutocompleter("classes",e("./autocompleters/classes.js")),l.registerAutocompleter("standard",e("./autocompleters/standard.js")),l.registerAutocompleter("variables",e("./autocompleters/variables.js")),l.positionButtons=function(e){var t=r(e.getWrapperElement()).find(".CodeMirror-vscrollbar"),n=0;t.is(":visible")&&(n=t.outerWidth()),e.buttons.is(":visible")&&e.buttons.css("right",n+4)},l.createShareLink=function(e){var t={};return window.location.hash.length>1&&(t=r.deparam(window.location.hash.substring(1))),t.query=e.getValue(),t},l.getAsCurl=function(t,n){return e("./curl.js").createCurlString(t,n)},l.consumeShareLink=function(e,t){t&&t.query&&e.setValue(t.query)},l.drawButtons=function(e){if(e.buttons=r("<div class='yasqe_buttons'></div>").appendTo(r(e.getWrapperElement())),e.options.createShareLink){var t=r(a.svg.getElement(s.share));t.click((function(n){n.stopPropagation();var i=r("<div class='yasqe_sharePopup'></div>").appendTo(e.buttons);r("html").click((function(){i&&i.remove()})),i.click((function(e){e.stopPropagation()}));var o=r("<input>").val(location.protocol+"//"+location.host+location.pathname+location.search+"#"+r.param(e.options.createShareLink(e)));if(o.focus((function(){var e=r(this);e.select(),e.mouseup((function(){return e.unbind("mouseup"),!1}))})),i.empty().append(r("<div>",{class:"inputWrapper"}).append(o)),e.options.createShortLink){i.addClass("enableShort");const t=e.translate("yasqe.btn.lbl.shorten");r("<button>"+t+"</button>").addClass("yasqe_btn yasqe_btn-sm yasqe_btn-primary").click((function(){r(this).parent().find("button").attr("disabled","disabled"),e.options.createShortLink(o.val(),(function(e,t){e?(o.remove(),i.find(".inputWrapper").append(r("<span>",{class:"shortlinkErr"}).text(e))):o.val(t).focus()}))})).appendTo(i)}const a=e.translate("yasqe.btn.lbl.curl");r("<button>"+a+"</button>").addClass("yasqe_btn yasqe_btn-sm yasqe_btn-primary").click((function(){r(this).parent().find("button").attr("disabled","disabled"),o.val(l.getAsCurl(e)).focus()})).appendTo(i);var s=t.position();i.css("top",s.top+t.outerHeight()+parseInt(i.css("padding-top"))+"px").css("left",s.left+t.outerWidth()-i.outerWidth()+"px"),o.focus()})).addClass("yasqe_share").attr("title",e.translate("yasqe.btn.title.share")).appendTo(e.buttons)}var n=r("<div>",{class:"fullscreenToggleBtns"}).append(r(a.svg.getElement(s.fullscreen)).addClass("yasqe_fullscreenBtn").attr("title",e.translate("yasqe.btn.title.fullscreen")).click((function(){e.setOption("fullScreen",!0)}))).append(r(a.svg.getElement(s.smallscreen)).addClass("yasqe_smallscreenBtn").attr("title",e.translate("yasqe.btn.title.normalsize")).click((function(){e.setOption("fullScreen",!1)})));e.buttons.append(n),e.options.sparql.showQueryButton&&(r("<div>",{class:"yasqe_queryButton"}).click((function(){r(this).hasClass("query_busy")?(e.xhr&&e.xhr.abort(),l.updateQueryButton(e)):e.query()})).appendTo(e.buttons),l.updateQueryButton(e))};var v={busy:"loader",valid:"query",error:"queryInvalid"};l.updateQueryButton=function(e,t){var n=r(e.getWrapperElement()).find(".yasqe_queryButton");0!=n.length&&(t||(t="valid",!1===e.queryValid&&(t="error")),t!=e.queryStatus&&(n.empty().removeClass((function(e,t){return t.split(" ").filter((function(e){return 0==e.indexOf("query_")})).join(" ")})),"busy"==t?(n.append(r("<div>",{class:"loader"})),e.queryStatus=t):"valid"!=t&&"error"!=t||(n.addClass("query_"+t),a.svg.draw(n,s[v[t]]),e.queryStatus=t)))},l.fromTextArea=function(e,t){t=u(t),r("<div>",{class:"yasqe"}).insertBefore(r(e)).append(r(e));var n=c(i.fromTextArea(e,t));return f(n),n},l.storeQuery=function(e){var t=o.getPersistencyId(e,e.options.persistent);t&&a.storage.set(t,e.getValue(),"month")},l.commentLines=function(e){for(var t=e.getCursor(!0).line,n=e.getCursor(!1).line,r=Math.min(t,n),i=Math.max(t,n),o=!0,a=r;a<=i;a++){var s=e.getLine(a);if(0==s.length||"#"!=s.substring(0,1)){o=!1;break}}for(a=r;a<=i;a++)o?e.replaceRange("",{line:a,ch:0},{line:a,ch:1}):e.replaceRange("#",{line:a,ch:0})},l.copyLineUp=function(e){var t=e.getCursor(),n=e.lineCount();e.replaceRange("\n",{line:n-1,ch:e.getLine(n-1).length});for(var r=n;r>t.line;r--){var i=e.getLine(r-1);e.replaceRange(i,{line:r,ch:0},{line:r,ch:e.getLine(r).length})}},l.copyLineDown=function(e){l.copyLineUp(e);var t=e.getCursor();t.line++,e.setCursor(t)},l.doAutoFormat=function(e){if(e.somethingSelected()){var t={line:e.getCursor(!1).line,ch:e.getSelection().length};y(e,e.getCursor(!0),t)}else{var n=e.lineCount(),r=e.getTextArea().value.length;y(e,{line:0,ch:0},{line:n,ch:r})}};var y=function(e,t,n){var r=e.indexFromPos(t),i=e.indexFromPos(n),o=x(e.getValue(),r,i);e.operation((function(){e.replaceRange(o,t,n);for(var i=e.posFromIndex(r).line,a=e.posFromIndex(r+o.length).line,s=i;s<=a;s++)e.indentLine(s,"smart")}))},x=function(e,t,n){e=e.substring(t,n);var o=[["keyword","ws","prefixed","ws","uri"],["keyword","ws","uri"]],a=["{",".",";"],s=["}"],l="",u="",c=[];return i.runMode(e,"sparql11",(function(e,t){c.push(t);var n=function(e,t){for(var n=0;n<o.length;n++)if(c.valueOf().toString()==o[n].valueOf().toString())return 1;for(n=0;n<a.length;n++)if(e==a[n])return 1;for(n=0;n<s.length;n++)if(""!=r.trim(u)&&e==s[n])return-1;return 0}(e);0!=n?(1==n?(l+=e+"\n",u=""):(l+="\n"+e,u=e),c=[]):(u+=e,l+=e),1==c.length&&"sp-ws"==c[0]&&(c=[])})),r.trim(l.replace(/\n\s*\n/g,"\n"))};e("./sparql.js"),e("./defaults.js"),l.$=r,l.version={CodeMirror:i.version,YASQE:e("../package.json").version,jquery:r.fn.jquery,"yasgui-utils":a.version}},{"../lib/deparam.js":1,"../lib/grammar/tokenizer.js":3,"../package.json":33,"./autocompleters/autocompleterBase.js":34,"./autocompleters/classes.js":35,"./autocompleters/localNames.js":36,"./autocompleters/properties.js":37,"./autocompleters/sesame-prefixes.js":38,"./autocompleters/standard.js":39,"./autocompleters/variables.js":41,"./curl.js":42,"./defaults.js":43,"./imgs.js":47,"./prefixFold.js":49,"./prefixUtils.js":50,"./sparql.js":51,"./tokenUtils.js":52,"./tooltip":53,"./translate.js":54,"./utils.js":55,codemirror:15,"codemirror/addon/display/fullscreen.js":5,"codemirror/addon/edit/closebrackets.js":6,"codemirror/addon/edit/matchbrackets.js":7,"codemirror/addon/fold/brace-fold.js":8,"codemirror/addon/fold/foldcode.js":9,"codemirror/addon/fold/foldgutter.js":10,"codemirror/addon/fold/xml-fold.js":11,"codemirror/addon/hint/show-hint.js":12,"codemirror/addon/runmode/runmode.js":13,"codemirror/addon/search/searchcursor.js":14,jquery:16,"yasgui-utils":30}],49:[function(e,t,n){var r=e("codemirror"),i=e("./tokenUtils.js");function o(e,t,n,i){if(!i||!("#"===i.charAt(0)||i.startsWith('"')&&i.endsWith('"'))){n||(n=0),i||(i=e.getLine(t));for(var o=(i=i.toUpperCase()).length+1,a=n,s=0;;){var l=i.indexOf("PREFIX",a);if(l===o)return;if(o=l,-1!=l){if(1==s&&l<n)break;if(i.length-l>"PREFIX".length&&":"===i.charAt(l+"PREFIX".length))return;if(l>0&&":"===i.charAt(l-1))return;var u=e.getTokenTypeAt(r.Pos(t,l+1));if(!/^(comment|string)/.test(u))return l+1;a=l-1}else{if(1==s)break;s=1,a=i.length}}}}t.exports={findFirstPrefixLine:function(e){for(var t=e.lastLine(),n=0;n<=t;++n)if(o(e,n)>=0)return n}},r.registerHelper("fold","prefix",(function(e,t){if(t){var n=t.line,a=e.getLine(n),s=function(t,n){var o=e.getTokenAt(r.Pos(t,n+1));if(!o||"keyword"!=o.type)return-1;var a=i.getNextNonWsToken(e,t,o.end+1);if(!a||"string-2"!=a.type)return-1;var s=i.getNextNonWsToken(e,t,a.end+1);return s&&"variable-3"==s.type?s.end:-1};if(!function(){for(var t=!1,r=n-1;r>=0;r--)if(e.getLine(r).toUpperCase().indexOf("PREFIX")>=0){t=!0;break}return t}()){var l=o(e,n,t.ch,a);if(null!=l){for(var u,c=!1,d=e.lastLine(),p=s(n,l),f=n,h=n;h<=d&&!c;++h)for(var g=e.getLine(h),m=h==n?l+1:0;;){!c&&g.indexOf("{")>=0&&(c=!0);var v=g.toUpperCase().indexOf("PREFIX",m);if(!(v>=0))break;(u=s(h,v))>0&&(f=h,m=p=u),m++}return{from:r.Pos(n,l+"PREFIX".length),to:r.Pos(f,p)}}}}}))},{"./tokenUtils.js":52,codemirror:15}],50:[function(e,t,n){"use strict";var r=function(e,t){for(var n=null,r=0,o=e.lineCount(),a=0;a<o;a++){var s=e.getNextNonWsToken(a);null==s||"PREFIX"!=s.string&&"BASE"!=s.string||(n=s,r=a)}if(null==n)e.replaceRange("PREFIX "+t+"\n",{line:0,ch:0});else{var l=i(e,r);e.replaceRange("\n"+l+"PREFIX "+t,{line:r})}e.collapsePrefixes(!1)},i=function(e,t,n){null==n&&(n=1);var r=e.getTokenAt({line:t,ch:n});return null==r||null==r||"ws"!=r.type?"":r.string+i(e,t,r.end+1)};t.exports={addPrefixes:function(e,t){var n=e.getPrefixesFromQuery();if("string"==typeof t)r(e,t);else for(var i in t)i in n||r(e,i+": <"+t[i]+">");e.collapsePrefixes(!1)},getPrefixesFromQuery:function(e){for(var t={},n=!0,r=function(i,a){if(n){a||(a=1);var s=e.getNextNonWsToken(o,a);if(s)if(-1==s.state.possibleCurrent.indexOf("PREFIX")&&-1==s.state.possibleNext.indexOf("PREFIX")&&(n=!1),"PREFIX"==s.string.toUpperCase()){var l=e.getNextNonWsToken(o,s.end+1);if(l){var u=e.getNextNonWsToken(o,l.end+1);if(u){var c=u.string;0==c.indexOf("<")&&(c=c.substring(1)),">"==c.slice(-1)&&(c=c.substring(0,c.length-1)),t[l.string.slice(0,-1)]=c,r(i,u.end+1)}else r(i,l.end+1)}else r(i,s.end+1)}else r(i,s.end+1)}},i=e.lineCount(),o=0;o<i&&n;o++)r(o);return t},removePrefixes:function(e,t){for(var n in t)e.setValue(e.getValue().replace(new RegExp("PREFIX\\s*"+n+":\\s*"+("<"+t[n]+">").replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+"\\s*","ig"),""));e.collapsePrefixes(!1)}}},{}],51:[function(e,t,n){"use strict";var r=e("jquery"),i=e("./utils.js"),o=e("./main.js");o.getAjaxConfig=function(t,n){var i="function"==typeof n?n:null,s="object"==typeof n?n:{};if(t.options.sparql&&(s=r.extend({},t.options.sparql,s)),s.handlers&&r.extend(!0,s.callbacks,s.handlers),s.endpoint&&0!=s.endpoint.length){var l={url:"function"==typeof s.endpoint?s.endpoint(t):s.endpoint,type:"function"==typeof s.requestMethod?s.requestMethod(t):s.requestMethod,headers:{Accept:a(t,s)}};s.xhrFields&&(l.xhrFields=s.xhrFields);var u=!1;if(s.callbacks)for(var c in s.callbacks)s.callbacks[c]&&(u=!0,l[c]=s.callbacks[c]);if("GET"===l.type){var d=!0;r.each(t.getUrlArguments(s),(function(e,t){l.url+=(d?"?":"&")+t.name+"="+encodeURIComponent(t.value),d=!1}))}else l.data=t.getUrlArguments(s),s.setQueryLimit&&"function"==typeof s.setQueryLimit&&l.data.forEach((function(e){"query"==e.name&&(e.value=s.setQueryLimit(e.value))}));if(u||i){i&&(l.complete=i),s.headers&&!r.isEmptyObject(s.headers)&&r.extend(l.headers,s.headers);var p=new Date,f=[function(){e("./main.js").signal(t,"queryFinish",arguments)},function(){t.lastQueryDuration=new Date-p,o.updateQueryButton(t),t.setBackdrop(!1)}];return l.complete&&(f.push(l.complete),f.push((function(e,t,n){var i={};r.extend(!0,i,l),"update"===window.editor.getQueryMode()&&"ASK"===window.editor.getQueryType()||s.callbacks.countCallback&&"function"==typeof s.callbacks.countCallback&&(i.data=i.data.filter((function(e){return"offset"!==e.name&&"limit"!==e.name})),i.data.push({name:"count",value:"1"}),i.complete=s.callbacks.countCallback),window.editor&&200===e.status&&r.ajax(i)}))),l.complete=f,l}}},o.executeQuery=function(e,t){o.signal(e,"query",e,t),o.updateQueryButton(e,"busy"),e.setBackdrop(!0),e.xhr=r.ajax(o.getAjaxConfig(e,t))},o.getUrlArguments=function(e,t){var n=e.getQueryMode(),o=[{name:i.getString(e,e.options.sparql.queryName),value:t.getQueryForAjax?t.getQueryForAjax(e):e.getValue()}];if(t.namedGraphs&&t.namedGraphs.length>0)for(var a="query"==n?"named-graph-uri":"using-named-graph-uri ",s=0;s<t.namedGraphs.length;s++)o.push({name:a,value:t.namedGraphs[s]});if(t.defaultGraphs&&t.defaultGraphs.length>0)for(a="query"==n?"default-graph-uri":"using-graph-uri ",s=0;s<t.defaultGraphs.length;s++)o.push({name:a,value:t.defaultGraphs[s]});return t.args&&t.args.length>0&&r.merge(o,t.args),o};var a=function(e,t){var n=null;if(!t.acceptHeader||t.acceptHeaderGraph||t.acceptHeaderSelect||t.acceptHeaderUpdate)if("update"==e.getQueryMode())n="function"==typeof t.acceptHeader?t.acceptHeaderUpdate(e):t.acceptHeaderUpdate;else{var r=e.getQueryType();n="DESCRIBE"==r||"CONSTRUCT"==r?"function"==typeof t.acceptHeaderGraph?t.acceptHeaderGraph(e):t.acceptHeaderGraph:"function"==typeof t.acceptHeaderSelect?t.acceptHeaderSelect(e):t.acceptHeaderSelect}else n="function"==typeof t.acceptHeader?t.acceptHeader(e):t.acceptHeader;return n};t.exports={getAjaxConfig:o.getAjaxConfig}},{"./main.js":48,"./utils.js":55,jquery:16}],52:[function(e,t,n){"use strict";var r=function(e,t,n){n||(n=e.getCursor()),t||(t=e.getTokenAt(n));var i=e.getTokenAt({line:n.line,ch:t.start});return null!=i.type&&"ws"!=i.type&&"punc"!=i.type&&null!=t.type&&"ws"!=t.type?(t.start=i.start,t.string=i.string+t.string,r(e,t,{line:n.line,ch:i.start})):null!=t.type&&"ws"==t.type?(t.start=t.start+1,t.string=t.string.substring(1),t):t},i=function(e,t,n){var r=e.getTokenAt({line:t,ch:n.start});return null!=r&&"ws"==r.type&&(r=i(e,t,r)),r},o=function(e,t,n){null==n&&(n=1);var r=e.getTokenAt({line:t,ch:n});return null==r||null==r||r.end<n?null:"ws"==r.type?o(e,t,r.end+1):r};t.exports={getPreviousNonWsToken:i,getCompleteToken:r,getNextNonWsToken:o}},{}],53:[function(e,t,n){"use strict";var r=e("jquery");e("./utils.js"),t.exports=function(e,t,n){var i;(t=r(t)).hover((function(){"function"==typeof n&&(n=n()),i=r("<div>").addClass("yasqe_tooltip").html(n).appendTo(t),o()}),(function(){r(".yasqe_tooltip").remove()}));var o=function(){r(e.getWrapperElement()).offset().top>=i.offset().top&&(i.css("bottom","auto"),i.css("top","26px"))}}},{"./utils.js":55,jquery:16}],54:[function(e,t,n){const r={en:e("./i18n/locale-en"),fr:e("./i18n/locale-fr")};var i="en",o=function(e){const t=i;if(!r||!r[t])return console.warn("Missing locale file for ["+t+"]"),e;let n=r[t][e];return n||(n=r.en[e]),n};t.exports=function(e){return e.on("language-changed",(function(){i=e.options.locale})),e.options.locale&&(i=e.options.locale),o}},{"./i18n/locale-en":45,"./i18n/locale-fr":46}],55:[function(e,t,n){"use strict";var r=e("jquery"),i=function(){function e(e){var t,n,i;return t=r(e).offset(),n=r(e).width(),i=r(e).height(),[[t.left,t.left+n],[t.top,t.top+i]]}function t(e,t){var n,r;return n=e[0]<t[0]?e:t,r=e[0]<t[0]?t:e,n[1]>r[0]||n[0]===r[0]}return function(n,r){var i=e(n),o=e(r);return t(i[0],o[0])&&t(i[1],o[1])}}();t.exports={keyExists:function(e,t){var n=!1;try{void 0!==e[t]&&(n=!0)}catch(e){}return n},getPersistencyId:function(e,t){var n=null;return t&&(n="string"==typeof t?t:t(e)),n},elementsOverlap:i,getString:function(e,t){return"function"==typeof t?t(e):t}}},{jquery:16}]},{},[44])(44)},module.exports=f()}).call(this,__webpack_require__(6))},346:function(module,exports,__webpack_require__){(function(global){var require,require,e;e=function(){var define,module,exports;return function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){if(!s&&"function"==typeof require&&require)return require(a,!0);if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[a]={exports:{}};t[a][0].call(u.exports,(function(e){var n=t[a][1][e];return i(n||e)}),u,u.exports,e,t,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(e,t,n){t.exports=e("./main.js")},{"./main.js":54}],2:[function(e,t,n){
|
|
27
|
-
/*! DataTables 1.10.2
|
|
28
|
-
* ©2008-2014 SpryMedia Ltd - datatables.net/license
|
|
29
|
-
*/
|
|
30
|
-
!function(t,r,i){!function(t){"use strict";"function"==typeof define&&define.amd?define("datatables",["jquery"],t):"object"==typeof n?t(e("jquery")):jQuery&&!jQuery.fn.dataTable&&t(jQuery)}((function(e){"use strict";var n,i,o,a,s,l={},u=/[\r\n]/g,c=/<.*?>/g,d=/^[\w\+\-]/,p=/[\w\+\-]$/,f=new RegExp("(\\"+["/",".","*","+","?","|","(",")","[","]","{","}","\\","$","^","-"].join("|\\")+")","g"),h=/[',$£€¥%\u2009\u202F]/g,g=function(e){return!e||!0===e||"-"===e},m=function(e){var t=parseInt(e,10);return!isNaN(t)&&isFinite(e)?t:null},v=function(e,t){return l[t]||(l[t]=new RegExp(Ce(t),"g")),"string"==typeof e?e.replace(/\./g,"").replace(l[t],"."):e},y=function(e,t,n){var r="string"==typeof e;return t&&r&&(e=v(e,t)),n&&r&&(e=e.replace(h,"")),g(e)||!isNaN(parseFloat(e))&&isFinite(e)},x=function(e,t,n){return!!g(e)||function(e){return g(e)||"string"==typeof e}(e)&&!!y(T(e),t,n)||null},b=function(e,t,n){var r=[],i=0,o=e.length;if(void 0!==n)for(;i<o;i++)e[i]&&e[i][t]&&r.push(e[i][t][n]);else for(;i<o;i++)e[i]&&r.push(e[i][t]);return r},E=function(e,t,n,r){var i=[],o=0,a=t.length;if(void 0!==r)for(;o<a;o++)i.push(e[t[o]][n][r]);else for(;o<a;o++)i.push(e[t[o]][n]);return i},C=function(e,t){var n,r=[];void 0===t?(t=0,n=e):(n=t,t=e);for(var i=t;i<n;i++)r.push(i);return r},T=function(e){return e.replace(c,"")},S=function(e){var t,n,r,i=[],o=e.length,a=0;e:for(n=0;n<o;n++){for(t=e[n],r=0;r<a;r++)if(i[r]===t)continue e;i.push(t),a++}return i};function w(t){var n,r,i={};e.each(t,(function(e,o){(n=e.match(/^([^A-Z]+?)([A-Z])/))&&-1!=="a aa ai ao as b fn i m o s ".indexOf(n[1]+" ")&&(r=e.replace(n[0],n[2].toLowerCase()),i[r]=e,"o"===n[1]&&w(t[e]))})),t._hungarianMap=i}function N(t,n,r){var i;t._hungarianMap||w(t),e.each(n,(function(o,a){void 0===(i=t._hungarianMap[o])||!r&&void 0!==n[i]||("o"===i.charAt(0)?(n[i]||(n[i]={}),e.extend(!0,n[i],n[o]),N(t[i],n[i],r)):n[i]=n[o])}))}function L(e){var t=n.defaults.oLanguage,r=e.sZeroRecords;!e.sEmptyTable&&r&&"yasr.empty.table"===t.sEmptyTable&&dt(e,e,"sZeroRecords","sEmptyTable"),!e.sLoadingRecords&&r&&"yasr.loading.label"===t.sLoadingRecords&&dt(e,e,"sZeroRecords","sLoadingRecords"),e.sInfoThousands&&(e.sThousands=e.sInfoThousands);var i=e.sDecimal;i&&Pt(i)}var A=function(e,t,n){void 0!==e[t]&&(e[n]=e[t])};function I(e){A(e,"ordering","bSort"),A(e,"orderMulti","bSortMulti"),A(e,"orderClasses","bSortClasses"),A(e,"orderCellsTop","bSortCellsTop"),A(e,"order","aaSorting"),A(e,"orderFixed","aaSortingFixed"),A(e,"paging","bPaginate"),A(e,"pagingType","sPaginationType"),A(e,"pageLength","iDisplayLength"),A(e,"searching","bFilter");var t=e.aoSearchCols;if(t)for(var r=0,i=t.length;r<i;r++)t[r]&&N(n.models.oSearch,t[r])}function R(e){A(e,"orderable","bSortable"),A(e,"orderData","aDataSort"),A(e,"orderSequence","asSorting"),A(e,"orderDataType","sortDataType")}function k(t){var n=t.oBrowser,r=e("<div/>").css({position:"absolute",top:0,left:0,height:1,width:1,overflow:"hidden"}).append(e("<div/>").css({position:"absolute",top:1,left:1,width:100,overflow:"scroll"}).append(e('<div class="test"/>').css({width:"100%",height:10}))).appendTo("body"),i=r.find(".test");n.bScrollOversize=100===i[0].offsetWidth,n.bScrollbarLeft=1!==i.offset().left,r.remove()}function _(e,t,n,r,i,o){var a,s=r,l=!1;for(void 0!==n&&(a=n,l=!0);s!==i;)e.hasOwnProperty(s)&&(a=l?t(a,e[s],s,e):e[s],l=!0,s+=o);return a}function O(t,i){var o=n.defaults.column,a=t.aoColumns.length,s=e.extend({},n.models.oColumn,o,{nTh:i||r.createElement("th"),sTitle:o.sTitle?o.sTitle:i?i.innerHTML:"",aDataSort:o.aDataSort?o.aDataSort:[a],mData:o.mData?o.mData:a,idx:a});t.aoColumns.push(s);var l=t.aoPreSearchCols;l[a]=e.extend({},n.models.oSearch,l[a]),D(t,a,null)}function D(t,r,i){var o=t.aoColumns[r],a=t.oClasses,s=e(o.nTh);if(!o.sWidthOrig){o.sWidthOrig=s.attr("width")||null;var l=(s.attr("style")||"").match(/width:\s*(\d+[pxem%]+)/);l&&(o.sWidthOrig=l[1])}null!=i&&(R(i),N(n.defaults.column,i),void 0===i.mDataProp||i.mData||(i.mData=i.mDataProp),i.sType&&(o._sManualType=i.sType),i.className&&!i.sClass&&(i.sClass=i.className),e.extend(o,i),dt(o,i,"sWidth","sWidthOrig"),"number"==typeof i.iDataSort&&(o.aDataSort=[i.iDataSort]),dt(o,i,"aDataSort"));var u=o.mData,c=Q(u),d=o.mRender?Q(o.mRender):null,p=function(e){return"string"==typeof e&&-1!==e.indexOf("@")};o._bAttrSrc=e.isPlainObject(u)&&(p(u.sort)||p(u.type)||p(u.filter)),o.fnGetData=function(e,t,n){var r=c(e,t,void 0,n);return d&&t?d(r,t,e,n):r},o.fnSetData=function(e,t,n){return Y(u)(e,t,n)},t.oFeatures.bSort||(o.bSortable=!1,s.addClass(a.sSortableNone));var f=-1!==e.inArray("asc",o.asSorting),h=-1!==e.inArray("desc",o.asSorting);o.bSortable&&(f||h)?f&&!h?(o.sSortingClass=a.sSortableAsc,o.sSortingClassJUI=a.sSortJUIAscAllowed):!f&&h?(o.sSortingClass=a.sSortableDesc,o.sSortingClassJUI=a.sSortJUIDescAllowed):(o.sSortingClass=a.sSortable,o.sSortingClassJUI=a.sSortJUI):(o.sSortingClass=a.sSortableNone,o.sSortingClassJUI="")}function M(e){if(!1!==e.oFeatures.bAutoWidth){var t=e.aoColumns;Ve(e);for(var n=0,r=t.length;n<r;n++)t[n].nTh.style.width=t[n].sWidth}var i=e.oScroll;""===i.sY&&""===i.sX||He(e),gt(e,null,"column-sizing",[e])}function P(e,t){var n=B(e,"bVisible");return"number"==typeof n[t]?n[t]:null}function F(t,n){var r=B(t,"bVisible"),i=e.inArray(n,r);return-1!==i?i:null}function j(e){return B(e,"bVisible").length}function B(t,n){var r=[];return e.map(t.aoColumns,(function(e,t){e[n]&&r.push(t)})),r}function H(e){var t,r,i,o,a,s,l,u,c,d=e.aoColumns,p=e.aoData,f=n.ext.type.detect;for(t=0,r=d.length;t<r;t++)if(c=[],!(l=d[t]).sType&&l._sManualType)l.sType=l._sManualType;else if(!l.sType){for(i=0,o=f.length;i<o;i++){for(a=0,s=p.length;a<s&&(void 0===c[a]&&(c[a]=W(e,a,t,"type")),(u=f[i](c[a],e))&&"html"!==u);a++);if(u){l.sType=u;break}}l.sType||(l.sType="string")}}function G(t,n,r,i){var o,a,s,l,u,c,d,p=t.aoColumns;if(n)for(o=n.length-1;o>=0;o--){var f=void 0!==(d=n[o]).targets?d.targets:d.aTargets;for(e.isArray(f)||(f=[f]),s=0,l=f.length;s<l;s++)if("number"==typeof f[s]&&f[s]>=0){for(;p.length<=f[s];)O(t);i(f[s],d)}else if("number"==typeof f[s]&&f[s]<0)i(p.length+f[s],d);else if("string"==typeof f[s])for(u=0,c=p.length;u<c;u++)("_all"==f[s]||e(p[u].nTh).hasClass(f[s]))&&i(u,d)}if(r)for(o=0,a=r.length;o<a;o++)i(o,r[o])}function U(t,r,i,o){var a=t.aoData.length,s=e.extend(!0,{},n.models.oRow,{src:i?"dom":"data"});s._aData=r,t.aoData.push(s);for(var l=t.aoColumns,u=0,c=l.length;u<c;u++)i&&q(t,a,u,W(t,a,u)),l[u].sType=null;return t.aiDisplayMaster.push(a),!i&&t.oFeatures.bDeferRender||ne(t,a,i,o),a}function V(t,n){var r;return n instanceof e||(n=e(n)),n.map((function(e,n){return r=te(t,n),U(t,r.data,n,r.cells)}))}function W(e,t,n,r){var i=e.iDraw,o=e.aoColumns[n],a=e.aoData[t]._aData,s=o.sDefaultContent,l=o.fnGetData(a,r,{settings:e,row:t,col:n});if(void 0===l)return e.iDrawError!=i&&null===s&&(ct(e,0,"Requested unknown parameter "+("function"==typeof o.mData?"{function}":"'"+o.mData+"'")+" for row "+t,4),e.iDrawError=i),s;if(l!==a&&null!==l||null===s){if("function"==typeof l)return l.call(a)}else l=s;return null===l&&"display"==r?"":l}function q(e,t,n,r){var i=e.aoColumns[n],o=e.aoData[t]._aData;i.fnSetData(o,r,{settings:e,row:t,col:n})}var z=/\[.*?\]$/,$=/\(\)$/;function X(t){return e.map(t.match(/(\\.|[^\.])+/g),(function(e){return e.replace(/\\./g,".")}))}function Q(t){if(e.isPlainObject(t)){var n={};return e.each(t,(function(e,t){t&&(n[e]=Q(t))})),function(e,t,r,i){var o=n[t]||n._;return void 0!==o?o(e,t,r,i):e}}if(null===t)return function(e){return e};if("function"==typeof t)return function(e,n,r,i){return t(e,n,r,i)};if("string"!=typeof t||-1===t.indexOf(".")&&-1===t.indexOf("[")&&-1===t.indexOf("("))return function(e,n){return e[t]};var r=function(e,t,n){var i,o,a,s;if(""!==n)for(var l=X(n),u=0,c=l.length;u<c;u++){if(i=l[u].match(z),o=l[u].match($),i){l[u]=l[u].replace(z,""),""!==l[u]&&(e=e[l[u]]),a=[],l.splice(0,u+1),s=l.join(".");for(var d=0,p=e.length;d<p;d++)a.push(r(e[d],t,s));var f=i[0].substring(1,i[0].length-1);e=""===f?a:a.join(f);break}if(o)l[u]=l[u].replace($,""),e=e[l[u]]();else{if(null===e||void 0===e[l[u]])return;e=e[l[u]]}}return e};return function(e,n){return r(e,n,t)}}function Y(t){if(e.isPlainObject(t))return Y(t._);if(null===t)return function(){};if("function"==typeof t)return function(e,n,r){t(e,"set",n,r)};if("string"!=typeof t||-1===t.indexOf(".")&&-1===t.indexOf("[")&&-1===t.indexOf("("))return function(e,n){e[t]=n};var n=function(e,t,r){for(var i,o,a,s,l,u=X(r),c=u[u.length-1],d=0,p=u.length-1;d<p;d++){if(o=u[d].match(z),a=u[d].match($),o){u[d]=u[d].replace(z,""),e[u[d]]=[],(i=u.slice()).splice(0,d+1),l=i.join(".");for(var f=0,h=t.length;f<h;f++)n(s={},t[f],l),e[u[d]].push(s);return}a&&(u[d]=u[d].replace($,""),e=e[u[d]](t)),null!==e[u[d]]&&void 0!==e[u[d]]||(e[u[d]]={}),e=e[u[d]]}c.match($)?e=e[c.replace($,"")](t):e[c.replace(z,"")]=t};return function(e,r){return n(e,r,t)}}function K(e){return b(e.aoData,"_aData")}function J(e){e.aoData.length=0,e.aiDisplayMaster.length=0,e.aiDisplay.length=0}function Z(e,t,n){for(var r=-1,i=0,o=e.length;i<o;i++)e[i]==t?r=i:e[i]>t&&e[i]--;-1!=r&&void 0===n&&e.splice(r,1)}function ee(e,t,n,r){var i,o,a=e.aoData[t];if("dom"!==n&&(n&&"auto"!==n||"dom"!==a.src)){var s,l=a.anCells;if(l)for(i=0,o=l.length;i<o;i++){for(s=l[i];s.childNodes.length;)s.removeChild(s.firstChild);l[i].innerHTML=W(e,t,i,"display")}}else a._aData=te(e,a).data;a._aSortData=null,a._aFilterData=null;var u=e.aoColumns;if(void 0!==r)u[r].sType=null;else for(i=0,o=u.length;i<o;i++)u[i].sType=null;re(a)}function te(t,n){var r,i,o,a,s=[],l=[],u=n.firstChild,c=0,d=t.aoColumns,p=function(e,t,n){if("string"==typeof e){var r=e.indexOf("@");if(-1!==r){var i=e.substring(r+1);o["@"+i]=n.getAttribute(i)}}},f=function(t){i=d[c],a=e.trim(t.innerHTML),i&&i._bAttrSrc?(o={display:a},p(i.mData.sort,0,t),p(i.mData.type,0,t),p(i.mData.filter,0,t),s.push(o)):s.push(a),c++};if(u)for(;u;)"TD"!=(r=u.nodeName.toUpperCase())&&"TH"!=r||(f(u),l.push(u)),u=u.nextSibling;else for(var h=0,g=(l=n.anCells).length;h<g;h++)f(l[h]);return{data:s,cells:l}}function ne(e,t,n,i){var o,a,s,l,u,c=e.aoData[t],d=c._aData,p=[];if(null===c.nTr){for(o=n||r.createElement("tr"),c.nTr=o,c.anCells=p,o._DT_RowIndex=t,re(c),l=0,u=e.aoColumns.length;l<u;l++)s=e.aoColumns[l],a=n?i[l]:r.createElement(s.sCellType),p.push(a),n&&!s.mRender&&s.mData===l||(a.innerHTML=W(e,t,l,"display")),s.sClass&&(a.className+=" "+s.sClass),s.bVisible&&!n?o.appendChild(a):!s.bVisible&&n&&a.parentNode.removeChild(a),s.fnCreatedCell&&s.fnCreatedCell.call(e.oInstance,a,W(e,t,l),d,t,l);gt(e,"aoRowCreatedCallback",null,[o,d,t])}c.nTr.setAttribute("role","row")}function re(t){var n=t.nTr,r=t._aData;if(n){if(r.DT_RowId&&(n.id=r.DT_RowId),r.DT_RowClass){var i=r.DT_RowClass.split(" ");t.__rowc=t.__rowc?S(t.__rowc.concat(i)):i,e(n).removeClass(t.__rowc.join(" ")).addClass(r.DT_RowClass)}r.DT_RowData&&e(n).data(r.DT_RowData)}}function ie(t){var n,r,i,o,a,s=t.nTHead,l=t.nTFoot,u=0===e("th, td",s).length,c=t.oClasses,d=t.aoColumns;for(u&&(o=e("<tr/>").appendTo(s)),n=0,r=d.length;n<r;n++)a=d[n],i=e(a.nTh).addClass(a.sClass),u&&i.appendTo(o),t.oFeatures.bSort&&(i.addClass(a.sSortingClass),!1!==a.bSortable&&(i.attr("tabindex",t.iTabIndex).attr("aria-controls",t.sTableId),it(t,a.nTh,n))),a.sTitle!=i.html()&&i.html(a.sTitle),vt(t,"header")(t,i,a,c);if(u&&ue(t.aoHeader,s),e(s).find(">tr").attr("role","row"),e(s).find(">tr>th, >tr>td").addClass(c.sHeaderTH),e(l).find(">tr>th, >tr>td").addClass(c.sFooterTH),null!==l){var p=t.aoFooter[0];for(n=0,r=p.length;n<r;n++)(a=d[n]).nTf=p[n].cell,a.sClass&&e(a.nTf).addClass(a.sClass)}}function oe(t,n,r){var i,o,a,s,l,u,c,d,p,f=[],h=[],g=t.aoColumns.length;if(n){for(void 0===r&&(r=!1),i=0,o=n.length;i<o;i++){for(f[i]=n[i].slice(),f[i].nTr=n[i].nTr,a=g-1;a>=0;a--)t.aoColumns[a].bVisible||r||f[i].splice(a,1);h.push([])}for(i=0,o=f.length;i<o;i++){if(c=f[i].nTr)for(;u=c.firstChild;)c.removeChild(u);for(a=0,s=f[i].length;a<s;a++)if(d=1,p=1,void 0===h[i][a]){for(c.appendChild(f[i][a].cell),h[i][a]=1;void 0!==f[i+d]&&f[i][a].cell==f[i+d][a].cell;)h[i+d][a]=1,d++;for(;void 0!==f[i][a+p]&&f[i][a].cell==f[i][a+p].cell;){for(l=0;l<d;l++)h[i+l][a+p]=1;p++}e(f[i][a].cell).attr("rowspan",d).attr("colspan",p)}}}}function ae(t){var n=gt(t,"aoPreDrawCallback","preDraw",[t]);if(-1===e.inArray(!1,n)){var r=[],i=0,o=t.asStripeClasses,a=o.length,s=(t.aoOpenRows.length,t.oLanguage),l=t.iInitDisplayStart,u="ssp"==yt(t),c=t.aiDisplay;t.bDrawing=!0,void 0!==l&&-1!==l&&(t._iDisplayStart=u?l:l>=t.fnRecordsDisplay()?0:l,t.iInitDisplayStart=-1);var d=t._iDisplayStart,p=t.fnDisplayEnd();if(t.bDeferLoading)t.bDeferLoading=!1,t.iDraw++,je(t,!1);else if(u){if(!t.bDestroying&&!pe(t))return}else t.iDraw++;if(0!==c.length)for(var f=u?0:d,h=u?t.aoData.length:p,g=f;g<h;g++){var m=c[g],v=t.aoData[m];null===v.nTr&&ne(t,m);var y=v.nTr;if(0!==a){var x=o[i%a];v._sRowStripe!=x&&(e(y).removeClass(v._sRowStripe).addClass(x),v._sRowStripe=x)}gt(t,"aoRowCallback",null,[y,v._aData,i,g]),r.push(y),i++}else{var b=s.sZeroRecords;1==t.iDraw&&"ajax"==yt(t)?b=s.sLoadingRecords:s.sEmptyTable&&0===t.fnRecordsTotal()&&(b=s.sEmptyTable),r[0]=e("<tr/>",{class:a?o[0]:""}).append(e("<td />",{valign:"top",colSpan:j(t),class:t.oClasses.sRowEmpty}).html(t.translate(b)))[0]}gt(t,"aoHeaderCallback","header",[e(t.nTHead).children("tr")[0],K(t),d,p,c]),gt(t,"aoFooterCallback","footer",[e(t.nTFoot).children("tr")[0],K(t),d,p,c]);var E=e(t.nTBody);E.children().detach(),E.append(e(r)),gt(t,"aoDrawCallback","draw",[t]),t.bSorted=!1,t.bFiltered=!1,t.bDrawing=!1}else je(t,!1)}function se(e,t){var n=e.oFeatures,r=n.bSort,i=n.bFilter;r&&Je(e),i?ve(e,e.oPreviousSearch):e.aiDisplay=e.aiDisplayMaster.slice(),!0!==t&&(e._iDisplayStart=0),e._drawHold=t,ae(e),e._drawHold=!1}function le(t){var r=t.oClasses,i=e(t.nTable),o=e("<div/>").insertBefore(i),a=t.oFeatures,s=e("<div/>",{id:t.sTableId+"_wrapper",class:r.sWrapper+(t.nTFoot?"":" "+r.sNoFooter)});t.nHolding=o[0],t.nTableWrapper=s[0],t.nTableReinsertBefore=t.nTable.nextSibling;for(var l,u,c,d,p,f,h=t.sDom.split(""),g=0;g<h.length;g++){if(l=null,"<"==(u=h[g])){if(c=e("<div/>")[0],"'"==(d=h[g+1])||'"'==d){for(p="",f=2;h[g+f]!=d;)p+=h[g+f],f++;if("H"==p?p=r.sJUIHeader:"F"==p&&(p=r.sJUIFooter),-1!=p.indexOf(".")){var m=p.split(".");c.id=m[0].substr(1,m[0].length-1),c.className=m[1]}else"#"==p.charAt(0)?c.id=p.substr(1,p.length-1):c.className=p;g+=f}s.append(c),s=e(c)}else if(">"==u)s=s.parent();else if("l"==u&&a.bPaginate&&a.bLengthChange)l=De(t);else if("f"==u&&a.bFilter)l=me(t);else if("r"==u&&a.bProcessing)l=Fe(t);else if("t"==u)l=Be(t);else if("i"==u&&a.bInfo)l=Ae(t);else if("p"==u&&a.bPaginate)l=Me(t);else if(0!==n.ext.feature.length)for(var v=n.ext.feature,y=0,x=v.length;y<x;y++)if(u==v[y].cFeature){l=v[y].fnInit(t);break}if(l){var b=t.aanFeatures;b[u]||(b[u]=[]),b[u].push(l),s.append(l)}}o.replaceWith(s)}function ue(t,n){var r,i,o,a,s,l,u,c,d,p,f=e(n).children("tr"),h=function(e,t,n){for(var r=e[t];r[n];)n++;return n};for(t.splice(0,t.length),o=0,l=f.length;o<l;o++)t.push([]);for(o=0,l=f.length;o<l;o++)for(i=(r=f[o]).firstChild;i;){if("TD"==i.nodeName.toUpperCase()||"TH"==i.nodeName.toUpperCase())for(c=(c=1*i.getAttribute("colspan"))&&0!==c&&1!==c?c:1,d=(d=1*i.getAttribute("rowspan"))&&0!==d&&1!==d?d:1,u=h(t,o,0),p=1===c,s=0;s<c;s++)for(a=0;a<d;a++)t[o+a][u+s]={cell:i,unique:p},t[o+a].nTr=r;i=i.nextSibling}}function ce(e,t,n){var r=[];n||(n=e.aoHeader,t&&ue(n=[],t));for(var i=0,o=n.length;i<o;i++)for(var a=0,s=n[i].length;a<s;a++)!n[i][a].unique||r[a]&&e.bSortCellsTop||(r[a]=n[i][a].cell);return r}function de(t,n,r){if(gt(t,"aoServerParams","serverParams",[n]),n&&e.isArray(n)){var i={},o=/(.*?)\[\]$/;e.each(n,(function(e,t){var n=t.name.match(o);if(n){var r=n[0];i[r]||(i[r]=[]),i[r].push(t.value)}else i[t.name]=t.value})),n=i}var a,s=t.ajax,l=t.oInstance;if(e.isPlainObject(s)&&s.data){a=s.data;var u=e.isFunction(a)?a(n):a;n=e.isFunction(a)&&u?u:e.extend(!0,n,u),delete s.data}var c={data:n,success:function(e){var n=e.error||e.sError;n&&t.oApi._fnLog(t,0,n),t.json=e,gt(t,null,"xhr",[t,e]),r(e)},dataType:"json",cache:!1,type:t.sServerMethod,error:function(e,n,r){var i=t.oApi._fnLog;"parsererror"==n?i(t,0,"Invalid JSON response",1):4===e.readyState&&i(t,0,"Ajax error",7),je(t,!1)}};t.oAjaxData=n,gt(t,null,"preXhr",[t,n]),t.fnServerData?t.fnServerData.call(l,t.sAjaxSource,e.map(n,(function(e,t){return{name:t,value:e}})),r,t):t.sAjaxSource||"string"==typeof s?t.jqXHR=e.ajax(e.extend(c,{url:s||t.sAjaxSource})):e.isFunction(s)?t.jqXHR=s.call(l,n,r,t):(t.jqXHR=e.ajax(e.extend(c,s)),s.data=a)}function pe(e){return!e.bAjaxDataGet||(e.iDraw++,je(e,!0),de(e,fe(e),(function(t){he(e,t)})),!1)}function fe(t){var r,i,o,a,s=t.aoColumns,l=s.length,u=t.oFeatures,c=t.oPreviousSearch,d=t.aoPreSearchCols,p=[],f=Ke(t),h=t._iDisplayStart,g=!1!==u.bPaginate?t._iDisplayLength:-1,m=function(e,t){p.push({name:e,value:t})};m("sEcho",t.iDraw),m("iColumns",l),m("sColumns",b(s,"sName").join(",")),m("iDisplayStart",h),m("iDisplayLength",g);var v={draw:t.iDraw,columns:[],order:[],start:h,length:g,search:{value:c.sSearch,regex:c.bRegex}};for(r=0;r<l;r++)o=s[r],a=d[r],i="function"==typeof o.mData?"function":o.mData,v.columns.push({data:i,name:o.sName,searchable:o.bSearchable,orderable:o.bSortable,search:{value:a.sSearch,regex:a.bRegex}}),m("mDataProp_"+r,i),u.bFilter&&(m("sSearch_"+r,a.sSearch),m("bRegex_"+r,a.bRegex),m("bSearchable_"+r,o.bSearchable)),u.bSort&&m("bSortable_"+r,o.bSortable);u.bFilter&&(m("sSearch",c.sSearch),m("bRegex",c.bRegex)),u.bSort&&(e.each(f,(function(e,t){v.order.push({column:t.col,dir:t.dir}),m("iSortCol_"+e,t.col),m("sSortDir_"+e,t.dir)})),m("iSortingCols",f.length));var y=n.ext.legacy.ajax;return null===y?t.sAjaxSource?p:v:y?p:v}function he(e,t){var n=function(e,n){return void 0!==t[e]?t[e]:t[n]},r=n("sEcho","draw"),i=n("iTotalRecords","recordsTotal"),o=n("iTotalDisplayRecords","recordsFiltered");if(r){if(1*r<e.iDraw)return;e.iDraw=1*r}J(e),e._iRecordsTotal=parseInt(i,10),e._iRecordsDisplay=parseInt(o,10);for(var a=ge(e,t),s=0,l=a.length;s<l;s++)U(e,a[s]);e.aiDisplay=e.aiDisplayMaster.slice(),e.bAjaxDataGet=!1,ae(e),e._bInitComplete||_e(e,t),e.bAjaxDataGet=!0,je(e,!1)}function ge(t,n){var r=e.isPlainObject(t.ajax)&&void 0!==t.ajax.dataSrc?t.ajax.dataSrc:t.sAjaxDataProp;return"data"===r?n.aaData||n[r]:""!==r?Q(r)(n):n}function me(t){var n=t.oClasses,i=t.sTableId,o=t.oLanguage,a=t.oPreviousSearch,s=t.aanFeatures,l='<input type="search" class="'+n.sFilterInput+'"/>',u=o.sSearch;u=u.match(/_INPUT_/)?u.replace("_INPUT_",l):u+l;var c=e("<div/>",{id:s.f?null:i+"_filter",class:n.sFilter}).append(e("<label/>").append(u)),d=function(){s.f;var e=this.value?this.value:"";e!=a.sSearch&&(ve(t,{sSearch:e,bRegex:a.bRegex,bSmart:a.bSmart,bCaseInsensitive:a.bCaseInsensitive}),t._iDisplayStart=0,ae(t))},p=e("input",c).val(a.sSearch).attr("placeholder",o.sSearchPlaceholder).bind("keyup.DT search.DT input.DT paste.DT cut.DT","ssp"===yt(t)?We(d,400):d).bind("keypress.DT",(function(e){if(13==e.keyCode)return!1})).attr("aria-controls",i);return e(t.nTable).on("search.dt.DT",(function(e,n){if(t===n)try{p[0]!==r.activeElement&&p.val(a.sSearch)}catch(e){}})),c[0]}function ve(e,t,n){var r=e.oPreviousSearch,i=e.aoPreSearchCols,o=function(e){r.sSearch=e.sSearch,r.bRegex=e.bRegex,r.bSmart=e.bSmart,r.bCaseInsensitive=e.bCaseInsensitive},a=function(e){return void 0!==e.bEscapeRegex?!e.bEscapeRegex:e.bRegex};if(H(e),"ssp"!=yt(e)){be(e,t.sSearch,n,a(t),t.bSmart,t.bCaseInsensitive),o(t);for(var s=0;s<i.length;s++)xe(e,i[s].sSearch,s,a(i[s]),i[s].bSmart,i[s].bCaseInsensitive);ye(e)}else o(t);e.bFiltered=!0,gt(e,null,"search",[e])}function ye(e){for(var t,r,i=n.ext.search,o=e.aiDisplay,a=0,s=i.length;a<s;a++){for(var l=[],u=0,c=o.length;u<c;u++)r=o[u],t=e.aoData[r],i[a](e,t._aFilterData,r,t._aData,u)&&l.push(r);o.length=0,o.push.apply(o,l)}}function xe(e,t,n,r,i,o){if(""!==t)for(var a,s=e.aiDisplay,l=Ee(t,r,i,o),u=s.length-1;u>=0;u--)a=e.aoData[s[u]]._aFilterData[n],l.test(a)||s.splice(u,1)}function be(e,t,r,i,o,a){var s,l,u,c=Ee(t,i,o,a),d=e.oPreviousSearch.sSearch,p=e.aiDisplayMaster;if(0!==n.ext.search.length&&(r=!0),l=we(e),t.length<=0)e.aiDisplay=p.slice();else for((l||r||d.length>t.length||0!==t.indexOf(d)||e.bSorted)&&(e.aiDisplay=p.slice()),u=(s=e.aiDisplay).length-1;u>=0;u--)c.test(e.aoData[s[u]]._sFilterRow)||s.splice(u,1)}function Ee(t,n,r,i){if(t=n?t:Ce(t),r){var o=e.map(t.match(/"[^"]+"|[^ ]+/g)||"",(function(e){return'"'===e.charAt(0)?e.match(/^"(.*)"$/)[1]:e}));t="^(?=.*?"+o.join(")(?=.*?")+").*$"}return new RegExp(t,i?"i":"")}function Ce(e){return e.replace(f,"\\$1")}var Te=e("<div>")[0],Se=void 0!==Te.textContent;function we(e){var t,r,i,o,a,s,l,u,c=e.aoColumns,d=n.ext.type.search,p=!1;for(r=0,o=e.aoData.length;r<o;r++)if(!(u=e.aoData[r])._aFilterData){for(s=[],i=0,a=c.length;i<a;i++)(t=c[i]).bSearchable?(l=W(e,r,i,"filter"),d[t.sType]&&(l=d[t.sType](l)),null===l&&(l=""),"string"!=typeof l&&l.toString&&(l=l.toString())):l="",l.indexOf&&-1!==l.indexOf("&")&&(Te.innerHTML=l,l=Se?Te.textContent:Te.innerText),l.replace&&(l=l.replace(/[\r\n]/g,"")),s.push(l);u._aFilterData=s,u._sFilterRow=s.join(" "),p=!0}return p}function Ne(e){return{search:e.sSearch,smart:e.bSmart,regex:e.bRegex,caseInsensitive:e.bCaseInsensitive}}function Le(e){return{sSearch:e.search,bSmart:e.smart,bRegex:e.regex,bCaseInsensitive:e.caseInsensitive}}function Ae(t){var n=t.sTableId,r=t.aanFeatures.i,i=e("<div/>",{class:t.oClasses.sInfo,id:r?null:n+"_info"});return r||(t.aoDrawCallback.push({fn:Ie,sName:"information"}),i.attr("role","status").attr("aria-live","polite"),e(t.nTable).attr("aria-describedby",n+"_info")),i[0]}function Ie(t){var n=t.aanFeatures.i;if(0!==n.length){var r=t.oLanguage,i=t._iDisplayStart+1,o=t.fnDisplayEnd(),a=t.fnRecordsTotal(),s=t.fnRecordsDisplay(),l=s?r.sInfo:r.sInfoEmpty;s!==a&&(l+=" "+r.sInfoFiltered),l=Re(t,l+=r.sInfoPostFix);var u=r.fnInfoCallback;null!==u&&(l=u.call(t.oInstance,t,i,o,a,s,l)),e(n).html(l)}}function Re(e,t){var n=e.fnFormatNumber,r=e._iDisplayStart+1,i=e._iDisplayLength,o=e.fnRecordsDisplay(),a=-1===i;return t.replace(/_START_/g,n.call(e,r)).replace(/_END_/g,n.call(e,e.fnDisplayEnd())).replace(/_MAX_/g,n.call(e,e.fnRecordsTotal())).replace(/_TOTAL_/g,n.call(e,o)).replace(/_PAGE_/g,n.call(e,a?1:Math.ceil(r/i))).replace(/_PAGES_/g,n.call(e,a?1:Math.ceil(o/i)))}function ke(e){var t,n,r,i=e.iInitDisplayStart,o=e.aoColumns,a=e.oFeatures;if(e.bInitialised){for(le(e),ie(e),oe(e,e.aoHeader),oe(e,e.aoFooter),je(e,!0),a.bAutoWidth&&Ve(e),t=0,n=o.length;t<n;t++)(r=o[t]).sWidth&&(r.nTh.style.width=Qe(r.sWidth));se(e);var s=yt(e);"ssp"!=s&&("ajax"==s?de(e,[],(function(n){var r=ge(e,n);for(t=0;t<r.length;t++)U(e,r[t]);e.iInitDisplayStart=i,se(e),je(e,!1),_e(e,n)})):(je(e,!1),_e(e)))}else setTimeout((function(){ke(e)}),200)}function _e(e,t){e._bInitComplete=!0,t&&M(e),gt(e,"aoInitComplete","init",[e,t])}function Oe(e,t){var n=parseInt(t,10);e._iDisplayLength=n,mt(e),gt(e,null,"length",[e,n])}function De(t){for(var n=t.oClasses,r=t.sTableId,i=t.aLengthMenu,o=e.isArray(i[0]),a=o?i[0]:i,s=o?i[1]:i,l=e("<select/>",{name:r+"_length","aria-controls":r,class:n.sLengthSelect}),u=0,c=a.length;u<c;u++)l[0][u]=new Option(s[u],a[u]);var d=e("<div><label/></div>").addClass(n.sLength);return t.aanFeatures.l||(d[0].id=r+"_length"),d.children().append(t.oLanguage.sLengthMenu.replace("_MENU_",l[0].outerHTML)),e("select",d).val(t._iDisplayLength).bind("change.DT",(function(n){Oe(t,e(this).val()),ae(t)})),e(t.nTable).bind("length.dt.DT",(function(n,r,i){t===r&&e("select",d).val(i)})),d[0]}function Me(t){var r=t.sPaginationType,i=n.ext.pager[r],o="function"==typeof i,a=function(e){ae(e)},s=e("<div/>").addClass(t.oClasses.sPaging+r)[0],l=t.aanFeatures;return o||i.fnInit(t,s,a),l.p||(s.id=t.sTableId+"_paginate",t.aoDrawCallback.push({fn:function(e){if(o){var t,n,r=e._iDisplayStart,s=e._iDisplayLength,u=e.fnRecordsDisplay(),c=-1===s,d=c?0:Math.ceil(r/s),p=c?1:Math.ceil(u/s),f=i(d,p);for(t=0,n=l.p.length;t<n;t++)vt(e,"pageButton")(e,l.p[t],t,f,d,p)}else i.fnUpdate(e,a)},sName:"pagination"})),s}function Pe(e,t,n){var r=e._iDisplayStart,i=e._iDisplayLength,o=e.fnRecordsDisplay();0===o||-1===i?r=0:"number"==typeof t?(r=t*i)>o&&(r=0):"first"==t?r=0:"previous"==t?(r=i>=0?r-i:0)<0&&(r=0):"next"==t?r+i<o&&(r+=i):"last"==t?r=Math.floor((o-1)/i)*i:ct(e,0,"Unknown paging action: "+t,5);var a=e._iDisplayStart!==r;return e._iDisplayStart=r,a&&(gt(e,null,"page",[e]),n&&ae(e)),a}function Fe(t){return e("<div/>",{id:t.aanFeatures.r?null:t.sTableId+"_processing",class:t.oClasses.sProcessing}).html(t.oLanguage.sProcessing).insertBefore(t.nTable)[0]}function je(t,n){t.oFeatures.bProcessing&&e(t.aanFeatures.r).css("display",n?"block":"none"),gt(t,null,"processing",[t,n])}function Be(t){var n=e(t.nTable);n.attr("role","grid");var r=t.oScroll;if(""===r.sX&&""===r.sY)return t.nTable;var i=r.sX,o=r.sY,a=t.oClasses,s=n.children("caption"),l=s.length?s[0]._captionSide:null,u=e(n[0].cloneNode(!1)),c=e(n[0].cloneNode(!1)),d=n.children("tfoot"),p="<div/>",f=function(e){return e?Qe(e):null};r.sX&&"100%"===n.attr("width")&&n.removeAttr("width"),d.length||(d=null);var h=e(p,{class:a.sScrollWrapper}).append(e(p,{class:a.sScrollHead}).css({overflow:"hidden",position:"relative",border:0,width:i?f(i):"100%"}).append(e(p,{class:a.sScrollHeadInner}).css({"box-sizing":"content-box",width:r.sXInner||"100%"}).append(u.removeAttr("id").css("margin-left",0).append(n.children("thead")))).append("top"===l?s:null)).append(e(p,{class:a.sScrollBody}).css({overflow:"auto",height:f(o),width:f(i)}).append(n));d&&h.append(e(p,{class:a.sScrollFoot}).css({overflow:"hidden",border:0,width:i?f(i):"100%"}).append(e(p,{class:a.sScrollFootInner}).append(c.removeAttr("id").css("margin-left",0).append(n.children("tfoot")))).append("bottom"===l?s:null));var g=h.children(),m=g[0],v=g[1],y=d?g[2]:null;return i&&e(v).scroll((function(e){var t=this.scrollLeft;m.scrollLeft=t,d&&(y.scrollLeft=t)})),t.nScrollHead=m,t.nScrollBody=v,t.nScrollFoot=y,t.aoDrawCallback.push({fn:He,sName:"scrolling"}),h[0]}function He(t){var n,r,i,o,a,s,l,u,c,d=t.oScroll,p=d.sX,f=d.sXInner,h=d.sY,g=d.iBarWidth,m=e(t.nScrollHead),v=m[0].style,y=m.children("div"),x=y[0].style,b=y.children("table"),E=t.nScrollBody,C=e(E),T=E.style,S=e(t.nScrollFoot).children("div"),w=S.children("table"),N=e(t.nTHead),L=e(t.nTable),A=L[0],I=A.style,R=t.nTFoot?e(t.nTFoot):null,k=t.oBrowser,_=k.bScrollOversize,O=[],D=[],M=[],F=function(e){var t=e.style;t.paddingTop="0",t.paddingBottom="0",t.borderTopWidth="0",t.borderBottomWidth="0",t.height=0};if(L.children("thead, tfoot").remove(),a=N.clone().prependTo(L),n=N.find("tr"),i=a.find("tr"),a.find("th, td").removeAttr("tabindex"),R&&(s=R.clone().prependTo(L),r=R.find("tr"),o=s.find("tr")),p||(T.width="100%",m[0].style.width="100%"),e.each(ce(t,a),(function(e,n){l=P(t,e),n.style.width=t.aoColumns[l].sWidth})),R&&Ge((function(e){e.style.width=""}),o),d.bCollapse&&""!==h&&(T.height=C[0].offsetHeight+N[0].offsetHeight+"px"),c=L.outerWidth(),""===p?(I.width="100%",_&&(L.find("tbody").height()>E.offsetHeight||"scroll"==C.css("overflow-y"))&&(I.width=Qe(L.outerWidth()-g))):""!==f?I.width=Qe(f):c==C.width()&&C.height()<L.height()?(I.width=Qe(c-g),L.outerWidth()>c-g&&(I.width=Qe(c))):I.width=Qe(c),c=L.outerWidth(),Ge(F,i),Ge((function(t){M.push(t.innerHTML),O.push(Qe(e(t).css("width")))}),i),Ge((function(e,t){e.style.width=O[t]}),n),e(i).height(0),R&&(Ge(F,o),Ge((function(t){D.push(Qe(e(t).css("width")))}),o),Ge((function(e,t){e.style.width=D[t]}),r),e(o).height(0)),Ge((function(e,t){e.innerHTML='<div class="dataTables_sizing" style="height:0;overflow:hidden;">'+M[t]+"</div>",e.style.width=O[t]}),i),R&&Ge((function(e,t){e.innerHTML="",e.style.width=D[t]}),o),L.outerWidth()<c?(u=E.scrollHeight>E.offsetHeight||"scroll"==C.css("overflow-y")?c+g:c,_&&(E.scrollHeight>E.offsetHeight||"scroll"==C.css("overflow-y"))&&(I.width=Qe(u-g)),""!==p&&""===f||ct(t,1,"Possible column misalignment",6)):u="100%",T.width=Qe(u),v.width=Qe(u),R&&(t.nScrollFoot.style.width=Qe(u)),h||_&&(T.height=Qe(A.offsetHeight+g)),h&&d.bCollapse){T.height=Qe(h);var j=p&&A.offsetWidth>E.offsetWidth?g:0;A.offsetHeight<E.offsetHeight&&(T.height=Qe(A.offsetHeight+j))}var B=L.outerWidth();b[0].style.width=Qe(B),x.width=Qe(B);var H=L.height()>E.clientHeight||"scroll"==C.css("overflow-y"),G="padding"+(k.bScrollbarLeft?"Left":"Right");x[G]=H?g+"px":"0px",R&&(w[0].style.width=Qe(B),S[0].style.width=Qe(B),S[0].style[G]=H?g+"px":"0px"),C.scroll(),!t.bSorted&&!t.bFiltered||t._drawHold||(E.scrollTop=0)}function Ge(e,t,n){for(var r,i,o=0,a=0,s=t.length;a<s;){for(r=t[a].firstChild,i=n?n[a].firstChild:null;r;)1===r.nodeType&&(n?e(r,i,o):e(r,o),o++),r=r.nextSibling,i=n?i.nextSibling:null;a++}}var Ue=/<.*?>/g;function Ve(n){var r,i,o,a,s,l=n.nTable,u=n.aoColumns,c=n.oScroll,d=c.sY,p=c.sX,f=c.sXInner,h=u.length,g=B(n,"bVisible"),m=e("th",n.nTHead),v=l.getAttribute("width"),y=l.parentNode,x=!1;for(r=0;r<g.length;r++)null!==(i=u[g[r]]).sWidth&&(i.sWidth=qe(i.sWidthOrig,y),x=!0);if(x||p||d||h!=j(n)||h!=m.length){var b=e(l).clone().empty().css("visibility","hidden").removeAttr("id").append(e(n.nTHead).clone(!1)).append(e(n.nTFoot).clone(!1)).append(e("<tbody><tr/></tbody>"));b.find("tfoot th, tfoot td").css("width","");var E=b.find("tbody tr");for(m=ce(n,b.find("thead")[0]),r=0;r<g.length;r++)i=u[g[r]],m[r].style.width=null!==i.sWidthOrig&&""!==i.sWidthOrig?Qe(i.sWidthOrig):"";if(n.aoData.length)for(r=0;r<g.length;r++)i=u[o=g[r]],e($e(n,o)).clone(!1).append(i.sContentPadding).appendTo(E);if(b.appendTo(y),p&&f?b.width(f):p?(b.css("width","auto"),b.width()<y.offsetWidth&&b.width(y.offsetWidth)):d?b.width(y.offsetWidth):v&&b.width(v),ze(n,b[0]),p){var C=0;for(r=0;r<g.length;r++)i=u[g[r]],s=e(m[r]).outerWidth(),C+=null===i.sWidthOrig?s:parseInt(i.sWidth,10)+s-e(m[r]).width();b.width(Qe(C)),l.style.width=Qe(C)}for(r=0;r<g.length;r++)i=u[g[r]],(a=e(m[r]).width())&&(i.sWidth=Qe(a));l.style.width=Qe(b.css("width")),b.remove()}else for(r=0;r<h;r++)u[r].sWidth=Qe(m.eq(r).width());v&&(l.style.width=Qe(v)),!v&&!p||n._reszEvt||(e(t).bind("resize.DT-"+n.sInstance,We((function(){M(n)}))),n._reszEvt=!0)}function We(e,t){var n,r,i=t||200;return function(){var t=this,o=+new Date,a=arguments;n&&o<n+i?(clearTimeout(r),r=setTimeout((function(){n=void 0,e.apply(t,a)}),i)):n?(n=o,e.apply(t,a)):n=o}}function qe(t,n){if(!t)return 0;var i=e("<div/>").css("width",Qe(t)).appendTo(n||r.body),o=i[0].offsetWidth;return i.remove(),o}function ze(t,n){var r=t.oScroll;if(r.sX||r.sY){var i=r.sX?0:r.iBarWidth;n.style.width=Qe(e(n).outerWidth()-i)}}function $e(t,n){var r=Xe(t,n);if(r<0)return null;var i=t.aoData[r];return i.nTr?i.anCells[n]:e("<td/>").html(W(t,r,n,"display"))[0]}function Xe(e,t){for(var n,r=-1,i=-1,o=0,a=e.aoData.length;o<a;o++)(n=(n=W(e,o,t,"display")+"").replace(Ue,"")).length>r&&(r=n.length,i=o);return i}function Qe(e){return null===e?"0px":"number"==typeof e?e<0?"0px":e+"px":e.match(/\d$/)?e+"px":e}function Ye(){if(!n.__scrollbarWidth){var t=e("<p/>").css({width:"100%",height:200,padding:0})[0],r=e("<div/>").css({position:"absolute",top:0,left:0,width:200,height:150,padding:0,overflow:"hidden",visibility:"hidden"}).append(t).appendTo("body"),i=t.offsetWidth;r.css("overflow","scroll");var o=t.offsetWidth;i===o&&(o=r[0].clientWidth),r.remove(),n.__scrollbarWidth=i-o}return n.__scrollbarWidth}function Ke(t){var r,i,o,a,s,l,u,c=[],d=t.aoColumns,p=t.aaSortingFixed,f=e.isPlainObject(p),h=[],g=function(t){t.length&&!e.isArray(t[0])?h.push(t):h.push.apply(h,t)};for(e.isArray(p)&&g(p),f&&p.pre&&g(p.pre),g(t.aaSorting),f&&p.post&&g(p.post),r=0;r<h.length;r++)for(i=0,o=(a=d[u=h[r][0]].aDataSort).length;i<o;i++)l=d[s=a[i]].sType||"string",c.push({src:u,col:s,dir:h[r][1],index:h[r][2],type:l,formatter:n.ext.type.order[l+"-pre"]});return c}function Je(e){var t,r,i,o,a,s=[],l=n.ext.type.order,u=e.aoData,c=(e.aoColumns,0),d=e.aiDisplayMaster;for(H(e),t=0,r=(a=Ke(e)).length;t<r;t++)(o=a[t]).formatter&&c++,at(e,o.col);if("ssp"!=yt(e)&&0!==a.length){for(t=0,i=d.length;t<i;t++)s[d[t]]=t;c===a.length?d.sort((function(e,t){var n,r,i,o,l,c,d,p,f,h=a.length,g=u[e]._aSortData,m=u[t]._aSortData;for(i=0;i<h;i++)if(n=g[(l=a[i]).col],r=m[l.col],c=u[e].anCells[l.col].firstChild.firstChild.className,d=u[t].anCells[l.col].firstChild.firstChild.className,p=u[e].anCells[l.col].firstChild.firstChild.lastChild.innerHTML,f=u[t].anCells[l.col].firstChild.firstChild.lastChild.innerHTML,0!==(o="uri"!==c&&void 0!==p&&"uri"!==d&&void 0!==f?et(Ze(p),Ze(f),tt(n),tt(r)):n<r?-1:n>r?1:0))return"asc"===l.dir?o:-o;return(n=s[e])<(r=s[t])?-1:n>r?1:0})):d.sort((function(e,t){var n,r,i,o,c,d=a.length,p=u[e]._aSortData,f=u[t]._aSortData;for(i=0;i<d;i++)if(n=p[(c=a[i]).col],r=f[c.col],0!==(o=(l[c.type+"-"+c.dir]||l["string-"+c.dir])(n,r)))return o;return(n=s[e])<(r=s[t])?-1:n>r?1:0}))}e.bSorted=!0}function Ze(e){switch(e){case"^^xsd:float":case"^^xsd:double":case"^^xsd:byte":case"^^xsd:short":case"^^xsd:int":case"^^xsd:integer":case"^^xsd:long":case"^^xsd:decimal":case"^^xsd:unsignedByte":case"^^xsd:unsignedInt":case"^^xsd:unsignedLong":case"^^xsd:unsignedShort":case"^^xsd:negativeInteger":case"^^xsd:nonNegativeInteger":case"^^xsd:positiveInteger":case"^^xsd:nonPositiveInteger":case"^^xsd:gDay":case"^^xsd:gMonth":case"^^xsd:gMonthDay":case"^^xsd:gYear":case"^^xsd:gYearMonth":return"num";case"^^xsd:date":case"^^xsd:dateTime":case"^^xsd:time":return"date";default:return"str"}}function et(e,t,n,r){switch(e.concat(t)){case"numnum":var i=new Number(n),o=new Number(r);return i<o?-1:i>o?1:0;case"datedate":var a=new Date(n),s=new Date(r);return a<s?-1:a>s?1:0;case"strnum":return 1;case"numstr":return-1;case"datenum":return 1;case"numdate":case"datestr":return-1;case"strdate":return 1;case"strstr":return n<r?-1:n>r?1:0}}function tt(e){return e.slice(1,e.lastIndexOf('"'))}function nt(e){for(var t,n,r=e.aoColumns,i=Ke(e),o=e.oLanguage.oAria,a=0,s=r.length;a<s;a++){var l=r[a],u=l.asSorting,c=l.sTitle.replace(/<.*?>/g,""),d=l.nTh;d.removeAttribute("aria-sort"),l.bSortable?(i.length>0&&i[0].col==a?(d.setAttribute("aria-sort","asc"==i[0].dir?"ascending":"descending"),n=u[i[0].index+1]||u[0]):n=u[0],t=c+("asc"===n?o.sSortAscending:o.sSortDescending)):t=c,d.setAttribute("aria-label",t)}}function rt(t,n,r,i){var o,a=t.aoColumns[n],s=t.aaSorting,l=a.asSorting,u=function(t){var n=t._idx;return void 0===n&&(n=e.inArray(t[1],l)),n+1>=l.length?0:n+1};if("number"==typeof s[0]&&(s=t.aaSorting=[s]),r&&t.oFeatures.bSortMulti){var c=e.inArray(n,b(s,"0"));-1!==c?(o=u(s[c]),s[c][1]=l[o],s[c]._idx=o):(s.push([n,l[0],0]),s[s.length-1]._idx=0)}else s.length&&s[0][0]==n?(o=u(s[0]),s.length=1,s[0][1]=l[o],s[0]._idx=o):(s.length=0,s.push([n,l[0]]),s[0]._idx=0);se(t),"function"==typeof i&&i(t)}function it(e,t,n,r){var i=e.aoColumns[n];ft(t,{},(function(t){!1!==i.bSortable&&(e.oFeatures.bProcessing?(je(e,!0),setTimeout((function(){rt(e,n,t.shiftKey,r),"ssp"!==yt(e)&&je(e,!1)}),0)):rt(e,n,t.shiftKey,r))}))}function ot(t){var n,r,i,o=t.aLastSort,a=t.oClasses.sSortColumn,s=Ke(t),l=t.oFeatures;if(l.bSort&&l.bSortClasses){for(n=0,r=o.length;n<r;n++)i=o[n].src,e(b(t.aoData,"anCells",i)).removeClass(a+(n<2?n+1:3));for(n=0,r=s.length;n<r;n++)i=s[n].src,e(b(t.aoData,"anCells",i)).addClass(a+(n<2?n+1:3))}t.aLastSort=s}function at(e,t){var r,i,o,a=e.aoColumns[t],s=n.ext.order[a.sSortDataType];s&&(r=s.call(e.oInstance,e,t,F(e,t)));for(var l=n.ext.type.order[a.sType+"-pre"],u=0,c=e.aoData.length;u<c;u++)(i=e.aoData[u])._aSortData||(i._aSortData=[]),i._aSortData[t]&&!s||(o=s?r[u]:W(e,u,t,"sort"),i._aSortData[t]=l?l(o):o)}function st(t){if(t.oFeatures.bStateSave&&!t.bDestroying){var n={time:+new Date,start:t._iDisplayStart,length:t._iDisplayLength,order:e.extend(!0,[],t.aaSorting),search:Ne(t.oPreviousSearch),columns:e.map(t.aoColumns,(function(e,n){return{visible:e.bVisible,search:Ne(t.aoPreSearchCols[n])}}))};gt(t,"aoStateSaveParams","stateSaveParams",[t,n]),t.oSavedState=n,t.fnStateSaveCallback.call(t.oInstance,t,n)}}function lt(t,n){var r,i,o=t.aoColumns;if(t.oFeatures.bStateSave){var a=t.fnStateLoadCallback.call(t.oInstance,t);if(a&&a.time){var s=gt(t,"aoStateLoadParams","stateLoadParams",[t,a]);if(-1===e.inArray(!1,s)){var l=t.iStateDuration;if(!(l>0&&a.time<+new Date-1e3*l)&&o.length===a.columns.length){for(t.oLoadedState=e.extend(!0,{},a),t._iDisplayStart=a.start,t.iInitDisplayStart=a.start,t._iDisplayLength=a.length,t.aaSorting=[],e.each(a.order,(function(e,n){t.aaSorting.push(n[0]>=o.length?[0,n[1]]:n)})),e.extend(t.oPreviousSearch,Le(a.search)),r=0,i=a.columns.length;r<i;r++){var u=a.columns[r];o[r].bVisible=u.visible,e.extend(t.aoPreSearchCols[r],Le(u.search))}gt(t,"aoStateLoaded","stateLoaded",[t,a])}}}}}function ut(t){var r=n.settings,i=e.inArray(t,b(r,"nTable"));return-1!==i?r[i]:null}function ct(e,r,i,o){if(i="DataTables warning: "+(null!==e?"table id="+e.sTableId+" - ":"")+i,o&&(i+=". For more information about this error, please see http://datatables.net/tn/"+o),r)t.console&&console.log&&console.log(i);else{var a=n.ext;if("alert"!=(a.sErrMode||a.errMode))throw new Error(i);alert(i)}}function dt(t,n,r,i){e.isArray(r)?e.each(r,(function(r,i){e.isArray(i)?dt(t,n,i[0],i[1]):dt(t,n,i)})):(void 0===i&&(i=r),void 0!==n[r]&&(t[i]=n[r]))}function pt(t,n,r){var i;for(var o in n)n.hasOwnProperty(o)&&(i=n[o],e.isPlainObject(i)?(e.isPlainObject(t[o])||(t[o]={}),e.extend(!0,t[o],i)):r&&"data"!==o&&"aaData"!==o&&e.isArray(i)?t[o]=i.slice():t[o]=i);return t}function ft(t,n,r){e(t).bind("click.DT",n,(function(e){t.blur(),r(e)})).bind("keypress.DT",n,(function(e){13===e.which&&(e.preventDefault(),r(e))})).bind("selectstart.DT",(function(){return!1}))}function ht(e,t,n,r){n&&e[t].push({fn:n,sName:r})}function gt(t,n,r,i){var o=[];return n&&(o=e.map(t[n].slice().reverse(),(function(e,n){return e.fn.apply(t.oInstance,i)}))),null!==r&&e(t.nTable).trigger(r+".dt",i),o}function mt(e){var t=e._iDisplayStart,n=e.fnDisplayEnd(),r=e._iDisplayLength;n===e.fnRecordsDisplay()&&(t=n-r),(-1===r||t<0)&&(t=0),e._iDisplayStart=t}function vt(t,r){var i=t.renderer,o=n.ext.renderer[r];return e.isPlainObject(i)&&i[r]?o[i[r]]||o._:"string"==typeof i&&o[i]||o._}function yt(e){return e.oFeatures.bServerSide?"ssp":e.ajax||e.sAjaxSource?"ajax":"dom"}n=function(t){this.$=function(e,t){return this.api(!0).$(e,t)},this._=function(e,t){return this.api(!0).rows(e,t).data()},this.api=function(e){return new o(e?ut(this[i.iApiIndex]):this)},this.fnAddData=function(t,n){var r=this.api(!0),i=e.isArray(t)&&(e.isArray(t[0])||e.isPlainObject(t[0]))?r.rows.add(t):r.row.add(t);return(void 0===n||n)&&r.draw(),i.flatten().toArray()},this.fnAdjustColumnSizing=function(e){var t=this.api(!0).columns.adjust(),n=t.settings()[0],r=n.oScroll;void 0===e||e?t.draw(!1):""===r.sX&&""===r.sY||He(n)},this.fnClearTable=function(e){var t=this.api(!0).clear();(void 0===e||e)&&t.draw()},this.fnClose=function(e){this.api(!0).row(e).child.hide()},this.fnDeleteRow=function(e,t,n){var r=this.api(!0),i=r.rows(e),o=i.settings()[0],a=o.aoData[i[0][0]];return i.remove(),t&&t.call(this,o,a),(void 0===n||n)&&r.draw(),a},this.fnDestroy=function(e){this.api(!0).destroy(e)},this.fnDraw=function(e){this.api(!0).draw(!e)},this.fnFilter=function(e,t,n,r,i,o){var a=this.api(!0);null==t?a.search(e,n,r,o):a.column(t).search(e,n,r,o),a.draw()},this.fnGetData=function(e,t){var n=this.api(!0);if(void 0!==e){var r=e.nodeName?e.nodeName.toLowerCase():"";return void 0!==t||"td"==r||"th"==r?n.cell(e,t).data():n.row(e).data()||null}return n.data().toArray()},this.fnGetNodes=function(e){var t=this.api(!0);return void 0!==e?t.row(e).node():t.rows().nodes().flatten().toArray()},this.fnGetPosition=function(e){var t=this.api(!0),n=e.nodeName.toUpperCase();if("TR"==n)return t.row(e).index();if("TD"==n||"TH"==n){var r=t.cell(e).index();return[r.row,r.columnVisible,r.column]}return null},this.fnIsOpen=function(e){return this.api(!0).row(e).child.isShown()},this.fnOpen=function(e,t,n){return this.api(!0).row(e).child(t,n).show().child()[0]},this.fnPageChange=function(e,t){var n=this.api(!0).page(e);(void 0===t||t)&&n.draw(!1)},this.fnSetColumnVis=function(e,t,n){var r=this.api(!0).column(e).visible(t);(void 0===n||n)&&r.columns.adjust().draw()},this.fnSettings=function(){return ut(this[i.iApiIndex])},this.fnSort=function(e){this.api(!0).order(e).draw()},this.fnSortListener=function(e,t,n){this.api(!0).order.listener(e,t,n)},this.fnUpdate=function(e,t,n,r,i){var o=this.api(!0);return null==n?o.row(t).data(e):o.cell(t,n).data(e),(void 0===i||i)&&o.columns.adjust(),(void 0===r||r)&&o.draw(),0},this.fnVersionCheck=i.fnVersionCheck;var r=this,a=void 0===t,s=this.length;for(var l in a&&(t={}),this.oApi=this.internal=i.internal,n.ext.internal)l&&(this[l]=Ft(l));return this.each((function(){var i,o=s>1?pt({},t,!0):t,l=0,u=this.getAttribute("id"),c=!1,d=n.defaults;if("table"==this.nodeName.toLowerCase()){I(d),R(d.column),N(d,d,!0),N(d.column,d.column,!0),N(d,o);var p=n.settings;for(l=0,i=p.length;l<i;l++){if(p[l].nTable==this){var f=void 0!==o.bRetrieve?o.bRetrieve:d.bRetrieve,h=void 0!==o.bDestroy?o.bDestroy:d.bDestroy;if(a||f)return p[l].oInstance;if(h){p[l].oInstance.fnDestroy();break}return void ct(p[l],0,"Cannot reinitialise DataTable",3)}if(p[l].sTableId==this.id){p.splice(l,1);break}}null!==u&&""!==u||(u="DataTables_Table_"+n.ext._unique++,this.id=u);var g=e.extend(!0,{},n.models.oSettings,{nTable:this,oApi:r.internal,oInit:o,sDestroyWidth:e(this)[0].style.width,sInstance:u,sTableId:u});p.push(g),g.oInstance=1===r.length?r:e(this).dataTable(),I(o),o.oLanguage&&L(o.oLanguage),o.aLengthMenu&&!o.iDisplayLength&&(o.iDisplayLength=e.isArray(o.aLengthMenu[0])?o.aLengthMenu[0][0]:o.aLengthMenu[0]),o=pt(e.extend(!0,{},d),o),dt(g.oFeatures,o,["bPaginate","bLengthChange","bFilter","bSort","bSortMulti","bInfo","bProcessing","bAutoWidth","bSortClasses","bServerSide","bDeferRender"]),dt(g,o,["asStripeClasses","ajax","fnServerData","fnFormatNumber","sServerMethod","aaSorting","aaSortingFixed","aLengthMenu","sPaginationType","sAjaxSource","sAjaxDataProp","iStateDuration","sDom","bSortCellsTop","iTabIndex","fnStateLoadCallback","fnStateSaveCallback","renderer",["iCookieDuration","iStateDuration"],["oSearch","oPreviousSearch"],["aoSearchCols","aoPreSearchCols"],["iDisplayLength","_iDisplayLength"],["bJQueryUI","bJUI"]]),dt(g.oScroll,o,[["sScrollX","sX"],["sScrollXInner","sXInner"],["sScrollY","sY"],["bScrollCollapse","bCollapse"]]),dt(g.oLanguage,o,"fnInfoCallback"),ht(g,"aoDrawCallback",o.fnDrawCallback,"user"),ht(g,"aoServerParams",o.fnServerParams,"user"),ht(g,"aoStateSaveParams",o.fnStateSaveParams,"user"),ht(g,"aoStateLoadParams",o.fnStateLoadParams,"user"),ht(g,"aoStateLoaded",o.fnStateLoaded,"user"),ht(g,"aoRowCallback",o.fnRowCallback,"user"),ht(g,"aoRowCreatedCallback",o.fnCreatedRow,"user"),ht(g,"aoHeaderCallback",o.fnHeaderCallback,"user"),ht(g,"aoFooterCallback",o.fnFooterCallback,"user"),ht(g,"aoInitComplete",o.fnInitComplete,"user"),ht(g,"aoPreDrawCallback",o.fnPreDrawCallback,"user");var m=g.oClasses;if(g.translate=t.translate,o.bJQueryUI?(e.extend(m,n.ext.oJUIClasses,o.oClasses),o.sDom===d.sDom&&"lfrtip"===d.sDom&&(g.sDom='<"H"lfr>t<"F"ip>'),g.renderer?e.isPlainObject(g.renderer)&&!g.renderer.header&&(g.renderer.header="jqueryui"):g.renderer="jqueryui"):e.extend(m,n.ext.classes,o.oClasses),e(this).addClass(m.sTable),""===g.oScroll.sX&&""===g.oScroll.sY||(g.oScroll.iBarWidth=Ye()),!0===g.oScroll.sX&&(g.oScroll.sX="100%"),void 0===g.iInitDisplayStart&&(g.iInitDisplayStart=o.iDisplayStart,g._iDisplayStart=o.iDisplayStart),null!==o.iDeferLoading){g.bDeferLoading=!0;var v=e.isArray(o.iDeferLoading);g._iRecordsDisplay=v?o.iDeferLoading[0]:o.iDeferLoading,g._iRecordsTotal=v?o.iDeferLoading[1]:o.iDeferLoading}""!==o.oLanguage.sUrl?(g.oLanguage.sUrl=o.oLanguage.sUrl,e.getJSON(g.oLanguage.sUrl,null,(function(t){L(t),N(d.oLanguage,t),e.extend(!0,g.oLanguage,o.oLanguage,t),ke(g)})),c=!0):e.extend(!0,g.oLanguage,o.oLanguage),null===o.asStripeClasses&&(g.asStripeClasses=[m.sStripeOdd,m.sStripeEven]);var y=g.asStripeClasses,x=e("tbody tr:eq(0)",this);-1!==e.inArray(!0,e.map(y,(function(e,t){return x.hasClass(e)})))&&(e("tbody tr",this).removeClass(y.join(" ")),g.asDestroyStripes=y.slice());var b,E=[],C=this.getElementsByTagName("thead");if(0!==C.length&&(ue(g.aoHeader,C[0]),E=ce(g)),null===o.aoColumns)for(b=[],l=0,i=E.length;l<i;l++)b.push(null);else b=o.aoColumns;for(l=0,i=b.length;l<i;l++)O(g,E?E[l]:null);if(G(g,o.aoColumnDefs,b,(function(e,t){D(g,e,t)})),x.length){var T=function(e,t){return e.getAttribute("data-"+t)?t:null};e.each(te(g,x[0]).cells,(function(e,t){var n=g.aoColumns[e];if(n.mData===e){var r=T(t,"sort")||T(t,"order"),i=T(t,"filter")||T(t,"search");null===r&&null===i||(n.mData={_:e+".display",sort:null!==r?e+".@data-"+r:void 0,type:null!==r?e+".@data-"+r:void 0,filter:null!==i?e+".@data-"+i:void 0},D(g,e))}}))}var S=g.oFeatures;if(o.bStateSave&&(S.bStateSave=!0,lt(g),ht(g,"aoDrawCallback",st,"state_save")),void 0===o.aaSorting){var w=g.aaSorting;for(l=0,i=w.length;l<i;l++)w[l][1]=g.aoColumns[l].asSorting[0]}ot(g),S.bSort&&ht(g,"aoDrawCallback",(function(){if(g.bSorted){var t=Ke(g),n={};e.each(t,(function(e,t){n[t.src]=t.dir})),gt(g,null,"order",[g,t,n]),nt(g)}})),ht(g,"aoDrawCallback",(function(){(g.bSorted||"ssp"===yt(g)||S.bDeferRender)&&ot(g)}),"sc"),k(g);var A=e(this).children("caption").each((function(){this._captionSide=e(this).css("caption-side")})),_=e(this).children("thead");0===_.length&&(_=e("<thead/>").appendTo(this)),g.nTHead=_[0];var M=e(this).children("tbody");0===M.length&&(M=e("<tbody/>").appendTo(this)),g.nTBody=M[0];var P=e(this).children("tfoot");if(0===P.length&&A.length>0&&(""!==g.oScroll.sX||""!==g.oScroll.sY)&&(P=e("<tfoot/>").appendTo(this)),0===P.length||0===P.children().length?e(this).addClass(m.sNoFooter):P.length>0&&(g.nTFoot=P[0],ue(g.aoFooter,g.nTFoot)),o.aaData)for(l=0;l<o.aaData.length;l++)U(g,o.aaData[l]);else(g.bDeferLoading||"dom"==yt(g))&&V(g,e(g.nTBody).children("tr"));g.aiDisplay=g.aiDisplayMaster.slice(),g.bInitialised=!0,!1===c&&ke(g)}else ct(null,0,"Non-table node initialisation ("+this.nodeName+")",2)})),r=null,this};var xt=[],bt=Array.prototype;o=function(t,r){if(!this instanceof o)throw"DT API must be constructed as a new object";var i=[],a=function(t){var r=function(t){var r,i,o=n.settings,a=e.map(o,(function(e,t){return e.nTable}));return t?t.nTable&&t.oApi?[t]:t.nodeName&&"table"===t.nodeName.toLowerCase()?-1!==(r=e.inArray(t,a))?[o[r]]:null:t&&"function"==typeof t.settings?t.settings().toArray():("string"==typeof t?i=e(t):t instanceof e&&(i=t),i?i.map((function(t){return-1!==(r=e.inArray(this,a))?o[r]:null})).toArray():void 0):[]}(t);r&&i.push.apply(i,r)};if(e.isArray(t))for(var s=0,l=t.length;s<l;s++)a(t[s]);else a(t);this.context=S(i),r&&this.push.apply(this,r.toArray?r.toArray():r),this.selector={rows:null,cols:null,opts:null},o.extend(this,this,xt)},n.Api=o,o.prototype={concat:bt.concat,context:[],each:function(e){for(var t=0,n=this.length;t<n;t++)e.call(this,this[t],t,this);return this},eq:function(e){var t=this.context;return t.length>e?new o(t[e],this[e]):null},filter:function(e){var t=[];if(bt.filter)t=bt.filter.call(this,e,this);else for(var n=0,r=this.length;n<r;n++)e.call(this,this[n],n,this)&&t.push(this[n]);return new o(this.context,t)},flatten:function(){var e=[];return new o(this.context,e.concat.apply(e,this.toArray()))},join:bt.join,indexOf:bt.indexOf||function(e,t){for(var n=t||0,r=this.length;n<r;n++)if(this[n]===e)return n;return-1},iterator:function(e,t,n){var r,i,a,s,l,u,c,d,p=[],f=this.context,h=this.selector;for("string"==typeof e&&(n=t,t=e,e=!1),i=0,a=f.length;i<a;i++)if("table"===t)void 0!==(r=n(f[i],i))&&p.push(r);else if("columns"===t||"rows"===t)void 0!==(r=n(f[i],this[i],i))&&p.push(r);else if("column"===t||"column-rows"===t||"row"===t||"cell"===t)for(c=this[i],"column-rows"===t&&(u=wt(f[i],h.opts)),s=0,l=c.length;s<l;s++)d=c[s],void 0!==(r="cell"===t?n(f[i],d.row,d.column,i,s):n(f[i],d,i,s,u))&&p.push(r);if(p.length){var g=new o(f,e?p.concat.apply([],p):p),m=g.selector;return m.rows=h.rows,m.cols=h.cols,m.opts=h.opts,g}return this},lastIndexOf:bt.lastIndexOf||function(e,t){return this.indexOf.apply(this.toArray.reverse(),arguments)},length:0,map:function(e){var t=[];if(bt.map)t=bt.map.call(this,e,this);else for(var n=0,r=this.length;n<r;n++)t.push(e.call(this,this[n],n));return new o(this.context,t)},pluck:function(e){return this.map((function(t){return t[e]}))},pop:bt.pop,push:bt.push,reduce:bt.reduce||function(e,t){return _(this,e,t,0,this.length,1)},reduceRight:bt.reduceRight||function(e,t){return _(this,e,t,this.length-1,-1,-1)},reverse:bt.reverse,selector:null,shift:bt.shift,sort:bt.sort,splice:bt.splice,toArray:function(){return bt.slice.call(this)},to$:function(){return e(this)},toJQuery:function(){return e(this)},unique:function(){return new o(this.context,S(this))},unshift:bt.unshift},o.extend=function(t,n,r){if(n&&(n instanceof o||n.__dt_wrapper)){var i,a,s,l=function(e,t,n){return function(){var r=t.apply(e,arguments);return o.extend(r,r,n.methodExt),r}};for(i=0,a=r.length;i<a;i++)n[(s=r[i]).name]="function"==typeof s.val?l(t,s.val,s):e.isPlainObject(s.val)?{}:s.val,n[s.name].__dt_wrapper=!0,o.extend(t,n[s.name],s.propExt)}},o.register=a=function(t,n){if(e.isArray(t))for(var r=0,i=t.length;r<i;r++)o.register(t[r],n);else{var a,s,l,u,c=t.split("."),d=xt,p=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n].name===t)return e[n];return null};for(a=0,s=c.length;a<s;a++){var f=p(d,l=(u=-1!==c[a].indexOf("()"))?c[a].replace("()",""):c[a]);f||(f={name:l,val:{},methodExt:[],propExt:[]},d.push(f)),a===s-1?f.val=n:d=u?f.methodExt:f.propExt}}},o.registerPlural=s=function(t,n,r){o.register(t,r),o.register(n,(function(){var t=r.apply(this,arguments);return t===this?this:t instanceof o?t.length?e.isArray(t[0])?new o(t.context,t[0]):t[0]:void 0:t}))},a("tables()",(function(t){return t?new o(function(t,n){if("number"==typeof t)return[n[t]];var r=e.map(n,(function(e,t){return e.nTable}));return e(r).filter(t).map((function(t){var i=e.inArray(this,r);return n[i]})).toArray()}(t,this.context)):this})),a("table()",(function(e){var t=this.tables(e),n=t.context;return n.length?new o(n[0]):t})),s("tables().nodes()","table().node()",(function(){return this.iterator("table",(function(e){return e.nTable}))})),s("tables().body()","table().body()",(function(){return this.iterator("table",(function(e){return e.nTBody}))})),s("tables().header()","table().header()",(function(){return this.iterator("table",(function(e){return e.nTHead}))})),s("tables().footer()","table().footer()",(function(){return this.iterator("table",(function(e){return e.nTFoot}))})),s("tables().containers()","table().container()",(function(){return this.iterator("table",(function(e){return e.nTableWrapper}))})),a("draw()",(function(e){return this.iterator("table",(function(t){se(t,!1===e)}))})),a("page()",(function(e){return void 0===e?this.page.info().page:this.iterator("table",(function(t){Pe(t,e)}))})),a("page.info()",(function(e){if(0!==this.context.length){var t=this.context[0],n=t._iDisplayStart,r=t._iDisplayLength,i=t.fnRecordsDisplay(),o=-1===r;return{page:o?0:Math.floor(n/r),pages:o?1:Math.ceil(i/r),start:n,end:t.fnDisplayEnd(),length:r,recordsTotal:t.fnRecordsTotal(),recordsDisplay:i}}})),a("page.len()",(function(e){return void 0===e?0!==this.context.length?this.context[0]._iDisplayLength:void 0:this.iterator("table",(function(t){Oe(t,e)}))}));var Et=function(e,t,n){if("ssp"==yt(e)?se(e,t):(je(e,!0),de(e,[],(function(n){J(e);for(var r=ge(e,n),i=0,o=r.length;i<o;i++)U(e,r[i]);se(e,t),je(e,!1)}))),n){var r=new o(e);r.one("draw",(function(){n(r.ajax.json())}))}};a("ajax.json()",(function(){var e=this.context;if(e.length>0)return e[0].json})),a("ajax.params()",(function(){var e=this.context;if(e.length>0)return e[0].oAjaxData})),a("ajax.reload()",(function(e,t){return this.iterator("table",(function(n){Et(n,!1===t,e)}))})),a("ajax.url()",(function(t){var n=this.context;if(void 0===t){if(0===n.length)return;return(n=n[0]).ajax?e.isPlainObject(n.ajax)?n.ajax.url:n.ajax:n.sAjaxSource}return this.iterator("table",(function(n){e.isPlainObject(n.ajax)?n.ajax.url=t:n.ajax=t}))})),a("ajax.url().load()",(function(e,t){return this.iterator("table",(function(n){Et(n,!1===t,e)}))}));var Ct=function(t,n){var r,i,o,a,s,l,u=[];for(t&&"string"!=typeof t&&void 0!==t.length||(t=[t]),o=0,a=t.length;o<a;o++)for(s=0,l=(i=t[o]&&t[o].split?t[o].split(","):[t[o]]).length;s<l;s++)(r=n("string"==typeof i[s]?e.trim(i[s]):i[s]))&&r.length&&u.push.apply(u,r);return u},Tt=function(e){return e||(e={}),e.filter&&!e.search&&(e.search=e.filter),{search:e.search||"none",order:e.order||"current",page:e.page||"all"}},St=function(e){for(var t=0,n=e.length;t<n;t++)if(e[t].length>0)return e[0]=e[t],e.length=1,e.context=[e.context[t]],e;return e.length=0,e},wt=function(t,n){var r,i,o,a=[],s=t.aiDisplay,l=t.aiDisplayMaster,u=n.search,c=n.order,d=n.page;if("ssp"==yt(t))return"removed"===u?[]:C(0,l.length);if("current"==d)for(r=t._iDisplayStart,i=t.fnDisplayEnd();r<i;r++)a.push(s[r]);else if("current"==c||"applied"==c)a="none"==u?l.slice():"applied"==u?s.slice():e.map(l,(function(t,n){return-1===e.inArray(t,s)?t:null}));else if("index"==c||"original"==c)for(r=0,i=t.aoData.length;r<i;r++)("none"==u||-1===(o=e.inArray(r,s))&&"removed"==u||o>=0&&"applied"==u)&&a.push(r);return a};a("rows()",(function(t,n){void 0===t?t="":e.isPlainObject(t)&&(n=t,t=""),n=Tt(n);var r=this.iterator("table",(function(r){return function(t,n,r){return Ct(n,(function(n){var i=m(n);if(null!==i&&!r)return[i];var o=wt(t,r);if(null!==i&&-1!==e.inArray(i,o))return[i];if(!n)return o;for(var a=[],s=0,l=o.length;s<l;s++)a.push(t.aoData[o[s]].nTr);return n.nodeName&&-1!==e.inArray(n,a)?[n._DT_RowIndex]:e(a).filter(n).map((function(){return this._DT_RowIndex})).toArray()}))}(r,t,n)}));return r.selector.rows=t,r.selector.opts=n,r})),a("rows().nodes()",(function(){return this.iterator("row",(function(e,t){return e.aoData[t].nTr||void 0}))})),a("rows().data()",(function(){return this.iterator(!0,"rows",(function(e,t){return E(e.aoData,t,"_aData")}))})),s("rows().cache()","row().cache()",(function(e){return this.iterator("row",(function(t,n){var r=t.aoData[n];return"search"===e?r._aFilterData:r._aSortData}))})),s("rows().invalidate()","row().invalidate()",(function(e){return this.iterator("row",(function(t,n){ee(t,n,e)}))})),s("rows().indexes()","row().index()",(function(){return this.iterator("row",(function(e,t){return t}))})),s("rows().remove()","row().remove()",(function(){var t=this;return this.iterator("row",(function(n,r,i){var o=n.aoData;o.splice(r,1);for(var a=0,s=o.length;a<s;a++)null!==o[a].nTr&&(o[a].nTr._DT_RowIndex=a);e.inArray(r,n.aiDisplay),Z(n.aiDisplayMaster,r),Z(n.aiDisplay,r),Z(t[i],r,!1),mt(n)}))})),a("rows.add()",(function(e){var t=this.iterator("table",(function(t){var n,r,i,o=[];for(r=0,i=e.length;r<i;r++)(n=e[r]).nodeName&&"TR"===n.nodeName.toUpperCase()?o.push(V(t,n)[0]):o.push(U(t,n));return o})),n=this.rows(-1);return n.pop(),n.push.apply(n,t.toArray()),n})),a("row()",(function(e,t){return St(this.rows(e,t))})),a("row().data()",(function(e){var t=this.context;return void 0===e?t.length&&this.length?t[0].aoData[this[0]]._aData:void 0:(t[0].aoData[this[0]]._aData=e,ee(t[0],this[0],"data"),this)})),a("row().node()",(function(){var e=this.context;return e.length&&this.length&&e[0].aoData[this[0]].nTr||null})),a("row.add()",(function(t){t instanceof e&&t.length&&(t=t[0]);var n=this.iterator("table",(function(e){return t.nodeName&&"TR"===t.nodeName.toUpperCase()?V(e,t)[0]:U(e,t)}));return this.row(n[0])}));var Nt=function(e){var t=e.context;if(t.length&&e.length){var n=t[0].aoData[e[0]];n._details&&(n._details.remove(),n._detailsShow=void 0,n._details=void 0)}},Lt=function(e,t){var n=e.context;if(n.length&&e.length){var r=n[0].aoData[e[0]];r._details&&(r._detailsShow=t,t?r._details.insertAfter(r.nTr):r._details.detach(),At(n[0]))}},At=function(e){var t=new o(e),n=e.aoData;t.off("draw.dt.DT_details column-visibility.dt.DT_details destroy.dt.DT_details"),b(n,"_details").length>0&&(t.on("draw.dt.DT_details",(function(r,i){e===i&&t.rows({page:"current"}).eq(0).each((function(e){var t=n[e];t._detailsShow&&t._details.insertAfter(t.nTr)}))})),t.on("column-visibility.dt.DT_details",(function(t,r,i,o){if(e===r)for(var a,s=j(r),l=0,u=n.length;l<u;l++)(a=n[l])._details&&a._details.children("td[colspan]").attr("colspan",s)})),t.on("destroy.dt.DT_details",(function(t,r){if(e===r)for(var i=0,o=n.length;i<o;i++)n[i]._details&&Nt(n[i])})))};a("row().child()",(function(t,n){var r=this.context;return void 0===t?r.length&&this.length?r[0].aoData[this[0]]._details:void 0:(!0===t?this.child.show():!1===t?Nt(this):r.length&&this.length&&function(t,n,r,i){var o=[],a=function(n,r){if(n.nodeName&&"tr"===n.nodeName.toLowerCase())o.push(n);else{var i=e("<tr><td/></tr>").addClass(r);e("td",i).addClass(r).html(n)[0].colSpan=j(t),o.push(i[0])}};if(e.isArray(r)||r instanceof e)for(var s=0,l=r.length;s<l;s++)a(r[s],i);else a(r,i);n._details&&n._details.remove(),n._details=e(o),n._detailsShow&&n._details.insertAfter(n.nTr)}(r[0],r[0].aoData[this[0]],t,n),this)})),a(["row().child.show()","row().child().show()"],(function(e){return Lt(this,!0),this})),a(["row().child.hide()","row().child().hide()"],(function(){return Lt(this,!1),this})),a(["row().child.remove()","row().child().remove()"],(function(){return Nt(this),this})),a("row().child.isShown()",(function(){var e=this.context;return e.length&&this.length&&e[0].aoData[this[0]]._detailsShow||!1}));var It,Rt,kt,_t=/^(.+):(name|visIdx|visible)$/;a("columns()",(function(t,n){void 0===t?t="":e.isPlainObject(t)&&(n=t,t=""),n=Tt(n);var r=this.iterator("table",(function(n){return function(t,n,r){var i=t.aoColumns,o=b(i,"sName"),a=b(i,"nTh");return Ct(n,(function(n){var r=m(n);if(""===n)return C(i.length);if(null!==r)return[r>=0?r:i.length+r];var s="string"==typeof n?n.match(_t):"";if(!s)return e(a).filter(n).map((function(){return e.inArray(this,a)})).toArray();switch(s[2]){case"visIdx":case"visible":var l=parseInt(s[1],10);if(l<0){var u=e.map(i,(function(e,t){return e.bVisible?t:null}));return[u[u.length+l]]}return[P(t,l)];case"name":return e.map(o,(function(e,t){return e===s[1]?t:null}))}}))}(n,t)}));return r.selector.cols=t,r.selector.opts=n,r})),s("columns().header()","column().header()",(function(e,t){return this.iterator("column",(function(e,t){return e.aoColumns[t].nTh}))})),s("columns().footer()","column().footer()",(function(e,t){return this.iterator("column",(function(e,t){return e.aoColumns[t].nTf}))})),s("columns().data()","column().data()",(function(){return this.iterator("column-rows",(function(e,t,n,r,i){for(var o=[],a=0,s=i.length;a<s;a++)o.push(W(e,i[a],t,""));return o}))})),s("columns().cache()","column().cache()",(function(e){return this.iterator("column-rows",(function(t,n,r,i,o){return E(t.aoData,o,"search"===e?"_aFilterData":"_aSortData",n)}))})),s("columns().nodes()","column().nodes()",(function(){return this.iterator("column-rows",(function(e,t,n,r,i){return E(e.aoData,i,"anCells",t)}))})),s("columns().visible()","column().visible()",(function(t,n){return this.iterator("column",(function(r,i){return void 0===t?r.aoColumns[i].bVisible:function(t,n,r,i){var o,a,s,l,u=t.aoColumns,c=u[n],d=t.aoData;if(void 0===r)return c.bVisible;if(c.bVisible!==r){if(r){var p=e.inArray(!0,b(u,"bVisible"),n+1);for(a=0,s=d.length;a<s;a++)l=d[a].nTr,o=d[a].anCells,l&&l.insertBefore(o[n],o[p]||null)}else e(b(t.aoData,"anCells",n)).detach();c.bVisible=r,oe(t,t.aoHeader),oe(t,t.aoFooter),(void 0===i||i)&&(M(t),(t.oScroll.sX||t.oScroll.sY)&&He(t)),gt(t,null,"column-visibility",[t,n,r]),st(t)}}(r,i,t,n)}))})),s("columns().indexes()","column().index()",(function(e){return this.iterator("column",(function(t,n){return"visible"===e?F(t,n):n}))})),a("columns.adjust()",(function(){return this.iterator("table",(function(e){M(e)}))})),a("column.index()",(function(e,t){if(0!==this.context.length){var n=this.context[0];if("fromVisible"===e||"toData"===e)return P(n,t);if("fromData"===e||"toVisible"===e)return F(n,t)}})),a("column()",(function(e,t){return St(this.columns(e,t))})),a("cells()",(function(t,n,r){if(e.isPlainObject(t)&&(void 0!==typeof t.row?(r=n,n=null):(r=t,t=null)),e.isPlainObject(n)&&(r=n,n=null),null==n)return this.iterator("table",(function(n){return function(t,n,r){var i,o,a,s,l,u=t.aoData,c=wt(t,r),d=E(u,c,"anCells"),p=e([].concat.apply([],d)),f=t.aoColumns.length;return Ct(n,(function(t){if(null==t){for(o=[],a=0,s=c.length;a<s;a++)for(i=c[a],l=0;l<f;l++)o.push({row:i,column:l});return o}return e.isPlainObject(t)?[t]:p.filter(t).map((function(t,n){return{row:i=n.parentNode._DT_RowIndex,column:e.inArray(n,u[i].anCells)}})).toArray()}))}(n,t,Tt(r))}));var i,o,a,s,l,u=this.columns(n,r),c=this.rows(t,r),d=this.iterator("table",(function(e,t){for(i=[],o=0,a=c[t].length;o<a;o++)for(s=0,l=u[t].length;s<l;s++)i.push({row:c[t][o],column:u[t][s]});return i}));return e.extend(d.selector,{cols:n,rows:t,opts:r}),d})),s("cells().nodes()","cell().node()",(function(){return this.iterator("cell",(function(e,t,n){return e.aoData[t].anCells[n]}))})),a("cells().data()",(function(){return this.iterator("cell",(function(e,t,n){return W(e,t,n)}))})),s("cells().cache()","cell().cache()",(function(e){return e="search"===e?"_aFilterData":"_aSortData",this.iterator("cell",(function(t,n,r){return t.aoData[n][e][r]}))})),s("cells().indexes()","cell().index()",(function(){return this.iterator("cell",(function(e,t,n){return{row:t,column:n,columnVisible:F(e,n)}}))})),a(["cells().invalidate()","cell().invalidate()"],(function(e){var t=this.selector;return this.rows(t.rows,t.opts).invalidate(e),this})),a("cell()",(function(e,t,n){return St(this.cells(e,t,n))})),a("cell().data()",(function(e){var t=this.context,n=this[0];return void 0===e?t.length&&n.length?W(t[0],n[0].row,n[0].column):void 0:(q(t[0],n[0].row,n[0].column,e),ee(t[0],n[0].row,"data",n[0].column),this)})),a("order()",(function(t,n){var r=this.context;return void 0===t?0!==r.length?r[0].aaSorting:void 0:("number"==typeof t?t=[[t,n]]:e.isArray(t[0])||(t=Array.prototype.slice.call(arguments)),this.iterator("table",(function(e){e.aaSorting=t.slice()})))})),a("order.listener()",(function(e,t,n){return this.iterator("table",(function(r){it(r,e,t,n)}))})),a(["columns().order()","column().order()"],(function(t){var n=this;return this.iterator("table",(function(r,i){var o=[];e.each(n[i],(function(e,n){o.push([n,t])})),r.aaSorting=o}))})),a("search()",(function(t,n,r,i){var o=this.context;return void 0===t?0!==o.length?o[0].oPreviousSearch.sSearch:void 0:this.iterator("table",(function(o){o.oFeatures.bFilter&&ve(o,e.extend({},o.oPreviousSearch,{sSearch:t+"",bRegex:null!==n&&n,bSmart:null===r||r,bCaseInsensitive:null===i||i}),1)}))})),s("columns().search()","column().search()",(function(t,n,r,i){return this.iterator("column",(function(o,a){var s=o.aoPreSearchCols;if(void 0===t)return s[a].sSearch;o.oFeatures.bFilter&&(e.extend(s[a],{sSearch:t+"",bRegex:null!==n&&n,bSmart:null===r||r,bCaseInsensitive:null===i||i}),ve(o,o.oPreviousSearch,1))}))})),a("state()",(function(){return this.context.length?this.context[0].oSavedState:null})),a("state.clear()",(function(){return this.iterator("table",(function(e){e.fnStateSaveCallback.call(e.oInstance,e,{})}))})),a("state.loaded()",(function(){return this.context.length?this.context[0].oLoadedState:null})),a("state.save()",(function(){return this.iterator("table",(function(e){st(e)}))})),n.versionCheck=n.fnVersionCheck=function(e){for(var t,r,i=n.version.split("."),o=e.split("."),a=0,s=o.length;a<s;a++)if((t=parseInt(i[a],10)||0)!==(r=parseInt(o[a],10)||0))return t>r;return!0},n.isDataTable=n.fnIsDataTable=function(t){var r=e(t).get(0),i=!1;return e.each(n.settings,(function(e,t){t.nTable!==r&&t.nScrollHead!==r&&t.nScrollFoot!==r||(i=!0)})),i},n.tables=n.fnTables=function(t){return jQuery.map(n.settings,(function(n){if(!t||t&&e(n.nTable).is(":visible"))return n.nTable}))},n.camelToHungarian=N,a("$()",(function(t,n){var r=this.rows(n).nodes(),i=e(r);return e([].concat(i.filter(t).toArray(),i.find(t).toArray()))})),e.each(["on","one","off"],(function(t,n){a(n+"()",(function(){var t=Array.prototype.slice.call(arguments);t[0].match(/\.dt\b/)||(t[0]+=".dt");var r=e(this.tables().nodes());return r[n].apply(r,t),this}))})),a("clear()",(function(){return this.iterator("table",(function(e){J(e)}))})),a("settings()",(function(){return new o(this.context,this.context)})),a("data()",(function(){return this.iterator("table",(function(e){return b(e.aoData,"_aData")})).flatten()})),a("destroy()",(function(r){return r=r||!1,this.iterator("table",(function(i){var a,s=i.nTableWrapper.parentNode,l=i.oClasses,u=i.nTable,c=i.nTBody,d=i.nTHead,p=i.nTFoot,f=e(u),h=e(c),g=e(i.nTableWrapper),m=e.map(i.aoData,(function(e){return e.nTr}));i.bDestroying=!0,gt(i,"aoDestroyCallback","destroy",[i]),r||new o(i).columns().visible(!0),g.unbind(".DT").find(":not(tbody *)").unbind(".DT"),e(t).unbind(".DT-"+i.sInstance),u!=d.parentNode&&(f.children("thead").detach(),f.append(d)),p&&u!=p.parentNode&&(f.children("tfoot").detach(),f.append(p)),f.detach(),g.detach(),i.aaSorting=[],i.aaSortingFixed=[],ot(i),e(m).removeClass(i.asStripeClasses.join(" ")),e("th, td",d).removeClass(l.sSortable+" "+l.sSortableAsc+" "+l.sSortableDesc+" "+l.sSortableNone),i.bJUI&&(e("th span."+l.sSortIcon+", td span."+l.sSortIcon,d).detach(),e("th, td",d).each((function(){var t=e("div."+l.sSortJUIWrapper,this);e(this).append(t.contents()),t.detach()}))),!r&&s&&s.insertBefore(u,i.nTableReinsertBefore),h.children().detach(),h.append(m),f.css("width",i.sDestroyWidth).removeClass(l.sTable),(a=i.asDestroyStripes.length)&&h.children().each((function(t){e(this).addClass(i.asDestroyStripes[t%a])}));var v=e.inArray(i,n.settings);-1!==v&&n.settings.splice(v,1)}))})),n.version="1.10.2",n.settings=[],n.models={},n.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0},n.models.oRow={nTr:null,anCells:null,_aData:[],_aSortData:null,_aFilterData:null,_sFilterRow:null,_sRowStripe:"",src:null},n.models.oColumn={idx:null,aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bVisible:null,_sManualType:null,_bAttrSrc:!1,fnCreatedCell:null,fnGetData:null,fnSetData:null,mData:null,mRender:null,nTh:null,nTf:null,sClass:null,sContentPadding:null,sDefaultContent:null,sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,sWidthOrig:null},n.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:[],ajax:null,aLengthMenu:[10,25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bJQueryUI:!1,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollCollapse:!1,bServerSide:!1,bSort:!0,bSortMulti:!0,bSortCellsTop:!1,bSortClasses:!0,bStateSave:!1,fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,this.oLanguage.sThousands)},fnHeaderCallback:null,fnInfoCallback:null,fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnServerData:null,fnServerParams:null,fnStateLoadCallback:function(e){try{return JSON.parse((-1===e.iStateDuration?sessionStorage:localStorage).getItem("DataTables_"+e.sInstance+"_"+location.pathname))}catch(e){}},fnStateLoadParams:null,fnStateLoaded:null,fnStateSaveCallback:function(e,t){try{(-1===e.iStateDuration?sessionStorage:localStorage).setItem("DataTables_"+e.sInstance+"_"+location.pathname,JSON.stringify(t))}catch(e){}},fnStateSaveParams:null,iStateDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iTabIndex:0,oClasses:{},oLanguage:{oAria:{sSortAscending:": activate to sort column ascending",sSortDescending:": activate to sort column descending"},oPaginate:{sFirst:"First",sLast:"Last",sNext:"Next",sPrevious:"Previous"},sEmptyTable:"yasr.empty.table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sDecimal:"",sThousands:",",sLengthMenu:"Show _MENU_ entries",sLoadingRecords:"yasr.loading.label",sProcessing:"Processing...",sSearch:"Search:",sSearchPlaceholder:"",sUrl:"",sZeroRecords:"No matching records found"},oSearch:e.extend({},n.models.oSearch),sAjaxDataProp:"data",sAjaxSource:null,sDom:"lfrtip",sPaginationType:"simple_numbers",sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET",renderer:null},w(n.defaults),n.defaults.column={aDataSort:null,iDataSort:-1,asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bVisible:!0,fnCreatedCell:null,mData:null,mRender:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null},w(n.defaults.column),n.models.oSettings={oFeatures:{bAutoWidth:null,bDeferRender:null,bFilter:null,bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,bServerSide:null,bSort:null,bSortMulti:null,bSortClasses:null,bStateSave:null},oScroll:{bCollapse:null,iBarWidth:0,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},oBrowser:{bScrollOversize:!1,bScrollbarLeft:!1},ajax:null,aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aoColumns:[],aoHeader:[],aoFooter:[],oPreviousSearch:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:[],asStripeClasses:null,asDestroyStripes:[],sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],aoFooterCallback:[],aoDrawCallback:[],aoRowCreatedCallback:[],aoPreDrawCallback:[],aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,sPaginationType:"two_button",iStateDuration:0,aoStateSave:[],aoStateLoad:[],oSavedState:null,oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,bAjaxDataGet:!0,jqXHR:null,json:void 0,oAjaxData:void 0,fnServerData:null,aoServerParams:[],sServerMethod:null,fnFormatNumber:null,aLengthMenu:null,iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iRecordsTotal:0,_iRecordsDisplay:0,bJUI:null,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return"ssp"==yt(this)?1*this._iRecordsTotal:this.aiDisplayMaster.length},fnRecordsDisplay:function(){return"ssp"==yt(this)?1*this._iRecordsDisplay:this.aiDisplay.length},fnDisplayEnd:function(){var e=this._iDisplayLength,t=this._iDisplayStart,n=t+e,r=this.aiDisplay.length,i=this.oFeatures,o=i.bPaginate;return i.bServerSide?!1===o||-1===e?t+r:Math.min(t+e,this._iRecordsDisplay):!o||n>r||-1===e?r:n},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null,aLastSort:[],oPlugins:{}},n.ext=i={classes:{},errMode:"alert",feature:[],search:[],internal:{},legacy:{ajax:null},pager:{},renderer:{pageButton:{},header:{}},order:{},type:{detect:[],search:{},order:{}},_unique:0,fnVersionCheck:n.fnVersionCheck,iApiIndex:0,oJUIClasses:{},sVersion:n.version},e.extend(i,{afnFiltering:i.search,aTypes:i.type.detect,ofnSearch:i.type.search,oSort:i.type.order,afnSortData:i.order,aoFeatures:i.feature,oApi:i.internal,oStdClasses:i.classes,oPagination:i.pager}),e.extend(n.ext.classes,{sTable:"dataTable",sNoFooter:"no-footer",sPageButton:"paginate_button",sPageButtonActive:"current",sPageButtonDisabled:"disabled",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",sSortableDesc:"sorting_desc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sFilterInput:"",sLengthSelect:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sHeaderTH:"",sFooterTH:"",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",sJUIHeader:"",sJUIFooter:""}),It="ui-state-default",Rt="css_right ui-icon ui-icon-",kt="fg-toolbar ui-toolbar ui-widget-header ui-helper-clearfix",e.extend(n.ext.oJUIClasses,n.ext.classes,{sPageButton:"fg-button ui-button "+It,sPageButtonActive:"ui-state-disabled",sPageButtonDisabled:"ui-state-disabled",sPaging:"dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_",sSortAsc:It+" sorting_asc",sSortDesc:It+" sorting_desc",sSortable:It+" sorting",sSortableAsc:It+" sorting_asc_disabled",sSortableDesc:It+" sorting_desc_disabled",sSortableNone:It+" sorting_disabled",sSortJUIAsc:Rt+"triangle-1-n",sSortJUIDesc:Rt+"triangle-1-s",sSortJUI:Rt+"carat-2-n-s",sSortJUIAscAllowed:Rt+"carat-1-n",sSortJUIDescAllowed:Rt+"carat-1-s",sSortJUIWrapper:"DataTables_sort_wrapper",sSortIcon:"DataTables_sort_icon",sScrollHead:"dataTables_scrollHead "+It,sScrollFoot:"dataTables_scrollFoot "+It,sHeaderTH:It,sFooterTH:It,sJUIHeader:kt+" ui-corner-tl ui-corner-tr",sJUIFooter:kt+" ui-corner-bl ui-corner-br"});var Ot=n.ext.pager;function Dt(e,t){var n=[],r=Ot.numbers_length,i=Math.floor(r/2);return t<=r?n=C(0,t):e<=i?((n=C(0,r-2)).push("ellipsis"),n.push(t-1)):e>=t-1-i?((n=C(t-(r-2),t)).splice(0,0,"ellipsis"),n.splice(0,0,0)):((n=C(e-1,e+2)).push("ellipsis"),n.push(t-1),n.splice(0,0,"ellipsis"),n.splice(0,0,0)),n.DT_el="span",n}e.extend(Ot,{simple:function(e,t){return["previous","next"]},full:function(e,t){return["first","previous","next","last"]},simple_numbers:function(e,t){return["previous",Dt(e,t),"next"]},full_numbers:function(e,t){return["first","previous",Dt(e,t),"next","last"]},_numbers:Dt,numbers_length:7}),e.extend(!0,n.ext.renderer,{pageButton:{_:function(t,n,i,o,a,s){var l,u,c=t.oClasses,d=t.oLanguage.oPaginate,p=0,f=function(n,r){var o,h,g,m=function(e){Pe(t,e.data.action,!0)};for(o=0,h=r.length;o<h;o++)if(g=r[o],e.isArray(g)){var v=e("<"+(g.DT_el||"div")+"/>").appendTo(n);f(v,g)}else{switch(l="",u="",g){case"ellipsis":n.append("<span>…</span>");break;case"first":l=d.sFirst,u=g+(a>0?"":" "+c.sPageButtonDisabled);break;case"previous":l=d.sPrevious,u=g+(a>0?"":" "+c.sPageButtonDisabled);break;case"next":l=d.sNext,u=g+(a<s-1?"":" "+c.sPageButtonDisabled);break;case"last":l=d.sLast,u=g+(a<s-1?"":" "+c.sPageButtonDisabled);break;default:l=g+1,u=a===g?c.sPageButtonActive:""}l&&(ft(e("<a>",{class:c.sPageButton+" "+u,"aria-controls":t.sTableId,"data-dt-idx":p,tabindex:t.iTabIndex,id:0===i&&"string"==typeof g?t.sTableId+"_"+g:null}).html(l).appendTo(n),{action:g},m),p++)}};try{var h=e(r.activeElement).data("dt-idx");f(e(n).empty(),o),null!==h&&e(n).find("[data-dt-idx="+h+"]").focus()}catch(e){}}}});var Mt=function(e,t,n,r){return e&&"-"!==e?(t&&(e=v(e,t)),e.replace&&(n&&(e=e.replace(n,"")),r&&(e=e.replace(r,""))),1*e):-1/0};function Pt(t){e.each({num:function(e){return Mt(e,t)},"num-fmt":function(e){return Mt(e,t,h)},"html-num":function(e){return Mt(e,t,c)},"html-num-fmt":function(e){return Mt(e,t,c,h)}},(function(e,n){i.type.order[e+t+"-pre"]=n}))}function Ft(e){return function(){var t=[ut(this[n.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return n.ext.internal[e].apply(this,t)}}return e.extend(i.type.order,{"date-pre":function(e){return Date.parse(e)||0},"html-pre":function(e){return g(e)?"":e.replace?e.replace(/<.*?>/g,"").toLowerCase():e+""},"string-pre":function(e){return g(e)?"":"string"==typeof e?e.toLowerCase():e.toString?e.toString():""},"string-asc":function(e,t){return e<t?-1:e>t?1:0},"string-desc":function(e,t){return e<t?1:e>t?-1:0}}),Pt(""),e.extend(n.ext.type.detect,[function(e,t){var n=t.oLanguage.sDecimal;return y(e,n)?"num"+n:null},function(e,t){if(e&&(!d.test(e)||!p.test(e)))return null;var n=Date.parse(e);return null!==n&&!isNaN(n)||g(e)?"date":null},function(e,t){var n=t.oLanguage.sDecimal;return y(e,n,!0)?"num-fmt"+n:null},function(e,t){var n=t.oLanguage.sDecimal;return x(e,n)?"html-num"+n:null},function(e,t){var n=t.oLanguage.sDecimal;return x(e,n,!0)?"html-num-fmt"+n:null},function(e,t){return g(e)||"string"==typeof e&&-1!==e.indexOf("<")?"html":null}]),e.extend(n.ext.type.search,{html:function(e){return g(e)?e:"string"==typeof e?e.replace(u," ").replace(c,""):""},string:function(e){return g(e)?e:"string"==typeof e?e.replace(u," "):e}}),e.extend(!0,n.ext.renderer,{header:{_:function(t,n,r,i){e(t.nTable).on("order.dt.DT",(function(e,o,a,s){if(t===o){var l=r.idx;n.removeClass(r.sSortingClass+" "+i.sSortAsc+" "+i.sSortDesc).addClass("asc"==s[l]?i.sSortAsc:"desc"==s[l]?i.sSortDesc:r.sSortingClass)}}))},jqueryui:function(t,n,r,i){var o=r.idx;e("<div/>").addClass(i.sSortJUIWrapper).append(n.contents()).append(e("<span/>").addClass(i.sSortIcon+" "+r.sSortingClassJUI)).appendTo(n),e(t.nTable).on("order.dt.DT",(function(e,a,s,l){t===a&&(n.removeClass(i.sSortAsc+" "+i.sSortDesc).addClass("asc"==l[o]?i.sSortAsc:"desc"==l[o]?i.sSortDesc:r.sSortingClass),n.find("span."+i.sSortIcon).removeClass(i.sSortJUIAsc+" "+i.sSortJUIDesc+" "+i.sSortJUI+" "+i.sSortJUIAscAllowed+" "+i.sSortJUIDescAllowed).addClass("asc"==l[o]?i.sSortJUIAsc:"desc"==l[o]?i.sSortJUIDesc:r.sSortingClassJUI))}))}}}),n.render={number:function(e,t,n,r){return{display:function(i){var o=i<0?"-":"";i=Math.abs(parseFloat(i));var a=parseInt(i,10),s=n?t+(i-a).toFixed(n).substring(2):"";return o+(r||"")+a.toString().replace(/\B(?=(\d{3})+(?!\d))/g,e)+s}}}},e.extend(n.ext.internal,{_fnExternApiFunc:Ft,_fnBuildAjax:de,_fnAjaxUpdate:pe,_fnAjaxParameters:fe,_fnAjaxUpdateDraw:he,_fnAjaxDataSrc:ge,_fnAddColumn:O,_fnColumnOptions:D,_fnAdjustColumnSizing:M,_fnVisibleToColumnIndex:P,_fnColumnIndexToVisible:F,_fnVisbleColumns:j,_fnGetColumns:B,_fnColumnTypes:H,_fnApplyColumnDefs:G,_fnHungarianMap:w,_fnCamelToHungarian:N,_fnLanguageCompat:L,_fnBrowserDetect:k,_fnAddData:U,_fnAddTr:V,_fnNodeToDataIndex:function(e,t){return void 0!==t._DT_RowIndex?t._DT_RowIndex:null},_fnNodeToColumnIndex:function(t,n,r){return e.inArray(r,t.aoData[n].anCells)},_fnGetCellData:W,_fnSetCellData:q,_fnSplitObjNotation:X,_fnGetObjectDataFn:Q,_fnSetObjectDataFn:Y,_fnGetDataMaster:K,_fnClearTable:J,_fnDeleteIndex:Z,_fnInvalidateRow:ee,_fnGetRowElements:te,_fnCreateTr:ne,_fnBuildHead:ie,_fnDrawHead:oe,_fnDraw:ae,_fnReDraw:se,_fnAddOptionsHtml:le,_fnDetectHeader:ue,_fnGetUniqueThs:ce,_fnFeatureHtmlFilter:me,_fnFilterComplete:ve,_fnFilterCustom:ye,_fnFilterColumn:xe,_fnFilter:be,_fnFilterCreateSearch:Ee,_fnEscapeRegex:Ce,_fnFilterData:we,_fnFeatureHtmlInfo:Ae,_fnUpdateInfo:Ie,_fnInfoMacros:Re,_fnInitialise:ke,_fnInitComplete:_e,_fnLengthChange:Oe,_fnFeatureHtmlLength:De,_fnFeatureHtmlPaginate:Me,_fnPageChange:Pe,_fnFeatureHtmlProcessing:Fe,_fnProcessingDisplay:je,_fnFeatureHtmlTable:Be,_fnScrollDraw:He,_fnApplyToChildren:Ge,_fnCalculateColumnWidths:Ve,_fnThrottle:We,_fnConvertToWidth:qe,_fnScrollingWidthAdjust:ze,_fnGetWidestNode:$e,_fnGetMaxLenString:Xe,_fnStringToCss:Qe,_fnScrollBarWidth:Ye,_fnSortFlatten:Ke,_fnSort:Je,_fnSortAria:nt,_fnSortListener:rt,_fnSortAttachListener:it,_fnSortingClasses:ot,_fnSortData:at,_fnSaveState:st,_fnLoadState:lt,_fnSettingsFromNode:ut,_fnLog:ct,_fnMap:dt,_fnBindAction:ft,_fnCallbackReg:ht,_fnCallbackFire:gt,_fnLengthOverflow:mt,_fnRenderer:vt,_fnDataSource:yt,_fnRowAttributes:re,_fnCalculateEnd:function(){}}),e.fn.dataTable=n,e.fn.dataTableSettings=n.settings,e.fn.dataTableExt=n.ext,e.fn.DataTable=function(t){return e(this).dataTable(t).api()},e.each(n,(function(t,n){e.fn.DataTable[t]=n})),e.fn.dataTable}))}(window,document)},{jquery:18}],3:[function(e,t,n){var r,i=e("jquery"),o=i(document),a=i("head"),s=null,l=[],u=0,c="px",d="JColResizer",p=parseInt,f=Math,h=navigator.userAgent.indexOf("Trident/4.0")>0;try{r=sessionStorage}catch(e){}a.append("<style type='text/css'> .JColResizer{table-layout:fixed;} .JColResizer td, .JColResizer th{overflow:hidden;padding-left:0!important; padding-right:0!important;} .JCLRgrips{ height:0px; position:relative;} .JCLRgrip{margin-left:-5px; position:absolute; z-index:5; } .JCLRgrip .JColResizer{position:absolute;background-color:red;filter:alpha(opacity=1);opacity:0;width:10px;height:100%;top:0px} .JCLRLastGrip{position:absolute; width:1px; } .JCLRgripDrag{ border-left:1px dotted black;\t}</style>");var g=function(e){var t=e.attr("id");(e=l[t])&&e.is("table")&&(e.removeClass(d).gc.remove(),delete l[t])},m=function(e){var t=e.find(">thead>tr>th,>thead>tr>td");t.length||(t=e.find(">tbody>tr:first>th,>tr:first>th,>tbody>tr:first>td, >tr:first>td")),e.cg=e.find("col"),e.ln=t.length,e.p&&r&&r[e.id]&&v(e,t),t.each((function(t){var n=i(this),r=i(e.gc.append('<div class="JCLRgrip"></div>')[0].lastChild);r.t=e,r.i=t,r.c=n,n.w=n.width(),e.g.push(r),e.c.push(n),t<e.ln-1?r.bind("touchstart mousedown",C).append(e.opt.gripInnerHtml).append('<div class="'+d+'" style="cursor:'+e.opt.hoverCursor+'"></div>'):r.addClass("JCLRLastGrip").removeClass("JCLRgrip"),r.data(d,{i:t,t:e.attr("id")})})),e.cg.removeAttr("width"),y(e),e.find("td, th").not(t).not("table th, table td").each((function(){i(this).removeAttr("width")}))},v=function(e,t){var n,i=0,o=0,a=[];if(t){if(e.cg.removeAttr("width"),e.opt.flush)return void(r[e.id]="");for(n=r[e.id].split(";");o<e.ln;o++)a.push(100*n[o]/n[e.ln]+"%"),t.eq(o).css("width",a[o]);for(o=0;o<e.ln;o++)e.cg.eq(o).css("width",a[o])}else{for(r[e.id]="";o<e.c.length;o++)n=e.c[o].width(),r[e.id]+=n+";",i+=n;r[e.id]+=i}},y=function(e){e.gc.width(e.w);for(var t=0;t<e.ln;t++){var n=e.c[t];e.g[t].css({left:n.offset().left-e.offset().left+n.outerWidth(!1)+e.cs/2+c,height:e.opt.headerOnly?e.c[0].outerHeight(!1):e.outerHeight(!1)})}},x=function(e,t,n){var r=s.x-s.l,i=e.c[t],o=e.c[t+1],a=i.w+r,l=o.w-r;i.width(a+c),o.width(l+c),e.cg.eq(t).width(a+c),e.cg.eq(t+1).width(l+c),n&&(i.w=a,o.w=l)},b=function(e){if(s){var t=s.t;if(e.originalEvent.touches)var n=e.originalEvent.touches[0].pageX-s.ox+s.l;else n=e.pageX-s.ox+s.l;var r=t.opt.minWidth,i=s.i,o=1.5*t.cs+r+t.b,a=i==t.ln-1?t.w-o:t.g[i+1].position().left-t.cs-r,l=i?t.g[i-1].position().left+t.cs+r:o;if(n=f.max(l,f.min(a,n)),s.x=n,s.css("left",n+c),t.opt.liveDrag){x(t,i),y(t);var u=t.opt.onDrag;u&&(e.currentTarget=t[0],u(e))}return!1}},E=function(e){if(o.unbind("touchend."+d+" mouseup."+d).unbind("touchmove."+d+" mousemove."+d),i("head :last-child").remove(),s){s.removeClass(s.t.opt.draggingClass);var t=s.t,n=t.opt.onResize;s.x&&(x(t,s.i,!0),y(t),n&&(e.currentTarget=t[0],n(e))),t.p&&r&&v(t),s=null}},C=function(e){var t=i(this).data(d),n=l[t.t],r=n.g[t.i];if(e.originalEvent.touches?r.ox=e.originalEvent.touches[0].pageX:r.ox=e.pageX,r.l=r.position().left,o.bind("touchmove."+d+" mousemove."+d,b).bind("touchend."+d+" mouseup."+d,E),a.append("<style type='text/css'>*{cursor:"+n.opt.dragCursor+"!important}</style>"),r.addClass(n.opt.draggingClass),s=r,n.c[t.i].l)for(var u,c=0;c<n.ln;c++)(u=n.c[c]).l=!1,u.w=u.width();return!1};i(window).bind("resize."+d,(function(){for(e in l){var e=l[e];e.removeClass(d),e.w!=e.width()&&(e.w=e.width()),y(e.addClass(d))}})),i.fn.extend({colResizable:function(e){return e=i.extend({draggingClass:"JCLRgripDrag",gripInnerHtml:"",liveDrag:!1,minWidth:15,headerOnly:!1,hoverCursor:"e-resize",dragCursor:"e-resize",postbackSafe:!1,flush:!1,marginLeft:null,marginRight:null,disable:!1,onDrag:null,onResize:null},e),this.each((function(){!function(e,t){var n=i(e);if(t.disable)return g(n);var r=n.id=n.attr("id")||d+u++;n.p=t.postbackSafe,n.is("table")&&!l[r]&&(n.addClass(d).attr("id",r).before('<div class="JCLRgrips"/>'),n.opt=t,n.g=[],n.c=[],n.w=n.width(),n.gc=n.prev(),t.marginLeft&&n.gc.css("marginLeft",t.marginLeft),t.marginRight&&n.gc.css("marginRight",t.marginRight),n.cs=p(h?e.cellSpacing||e.currentStyle.borderSpacing:n.css("border-spacing"))||2,n.b=p(h?e.border||e.currentStyle.borderLeftWidth:n.css("border-left-width"))||1,l[r]=n,setTimeout((function(){n.w=n.width(),m(n)}),0))}(this,e)}))}})},{jquery:18}],4:[function(e,t,n){RegExp.escape=function(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")};var r=e("jquery");r.csv={defaults:{separator:",",delimiter:'"',headers:!0},hooks:{castToScalar:function(e,t){if(isNaN(e))return e;if(/\./.test(e))return parseFloat(e);var n=parseInt(e);return isNaN(n)?null:n}},parsers:{parse:function(e,t){var n=t.separator,r=t.delimiter;t.state.rowNum||(t.state.rowNum=1),t.state.colNum||(t.state.colNum=1);var i=[],o=[],a=0,s="",l=!1;function u(){if(a=0,s="",t.start&&t.state.rowNum<t.start)return o=[],t.state.rowNum++,void(t.state.colNum=1);if(void 0===t.onParseEntry)i.push(o);else{var e=t.onParseEntry(o,t.state);!1!==e&&i.push(e)}o=[],t.end&&t.state.rowNum>=t.end&&(l=!0),t.state.rowNum++,t.state.colNum=1}function c(){if(void 0===t.onParseValue)o.push(s);else{var e=t.onParseValue(s,t.state);!1!==e&&o.push(e)}s="",a=0,t.state.colNum++}var d=RegExp.escape(n),p=RegExp.escape(r),f=/(D|S|\n|\r|[^DS\r\n]+)/,h=f.source;return h=(h=h.replace(/S/g,d)).replace(/D/g,p),f=RegExp(h,"gm"),e.replace(f,(function(e){if(!l)switch(a){case 0:if(e===n){s+="",c();break}if(e===r){a=1;break}if("\n"===e){c(),u();break}if(/^\r$/.test(e))break;s+=e,a=3;break;case 1:if(e===r){a=2;break}s+=e,a=1;break;case 2:if(e===r){s+=e,a=1;break}if(e===n){c();break}if("\n"===e){c(),u();break}if(/^\r$/.test(e))break;throw new Error("CSVDataError: Illegal State [Row:"+t.state.rowNum+"][Col:"+t.state.colNum+"]");case 3:if(e===n){c();break}if("\n"===e){c(),u();break}if(/^\r$/.test(e))break;if(e===r)throw new Error("CSVDataError: Illegal Quote [Row:"+t.state.rowNum+"][Col:"+t.state.colNum+"]");throw new Error("CSVDataError: Illegal Data [Row:"+t.state.rowNum+"][Col:"+t.state.colNum+"]");default:throw new Error("CSVDataError: Unknown State [Row:"+t.state.rowNum+"][Col:"+t.state.colNum+"]")}})),0!==o.length&&(c(),u()),i},splitLines:function(e,t){var n=t.separator,r=t.delimiter;t.state.rowNum||(t.state.rowNum=1);var i=[],o=0,a="",s=!1;function l(){if(o=0,t.start&&t.state.rowNum<t.start)return a="",void t.state.rowNum++;if(void 0===t.onParseEntry)i.push(a);else{var e=t.onParseEntry(a,t.state);!1!==e&&i.push(e)}a="",t.end&&t.state.rowNum>=t.end&&(s=!0),t.state.rowNum++}var u=RegExp.escape(n),c=RegExp.escape(r),d=/(D|S|\n|\r|[^DS\r\n]+)/,p=d.source;return p=(p=p.replace(/S/g,u)).replace(/D/g,c),d=RegExp(p,"gm"),e.replace(d,(function(e){if(!s)switch(o){case 0:if(e===n){a+=e,o=0;break}if(e===r){a+=e,o=1;break}if("\n"===e){l();break}if(/^\r$/.test(e))break;a+=e,o=3;break;case 1:if(e===r){a+=e,o=2;break}a+=e,o=1;break;case 2:var i=a.substr(a.length-1);if(e===r&&i===r){a+=e,o=1;break}if(e===n){a+=e,o=0;break}if("\n"===e){l();break}if("\r"===e)break;throw new Error("CSVDataError: Illegal state [Row:"+t.state.rowNum+"]");case 3:if(e===n){a+=e,o=0;break}if("\n"===e){l();break}if("\r"===e)break;if(e===r)throw new Error("CSVDataError: Illegal quote [Row:"+t.state.rowNum+"]");throw new Error("CSVDataError: Illegal state [Row:"+t.state.rowNum+"]");default:throw new Error("CSVDataError: Unknown state [Row:"+t.state.rowNum+"]")}})),""!==a&&l(),i},parseEntry:function(e,t){var n=t.separator,r=t.delimiter;t.state.rowNum||(t.state.rowNum=1),t.state.colNum||(t.state.colNum=1);var i=[],o=0,a="";function s(){if(void 0===t.onParseValue)i.push(a);else{var e=t.onParseValue(a,t.state);!1!==e&&i.push(e)}a="",o=0,t.state.colNum++}if(!t.match){var l=RegExp.escape(n),u=RegExp.escape(r),c=/(D|S|\n|\r|[^DS\r\n]+)/.source;c=(c=c.replace(/S/g,l)).replace(/D/g,u),t.match=RegExp(c,"gm")}return e.replace(t.match,(function(e){switch(o){case 0:if(e===n){a+="",s();break}if(e===r){o=1;break}if("\n"===e||"\r"===e)break;a+=e,o=3;break;case 1:if(e===r){o=2;break}a+=e,o=1;break;case 2:if(e===r){a+=e,o=1;break}if(e===n){s();break}if("\n"===e||"\r"===e)break;throw new Error("CSVDataError: Illegal State [Row:"+t.state.rowNum+"][Col:"+t.state.colNum+"]");case 3:if(e===n){s();break}if("\n"===e||"\r"===e)break;if(e===r)throw new Error("CSVDataError: Illegal Quote [Row:"+t.state.rowNum+"][Col:"+t.state.colNum+"]");throw new Error("CSVDataError: Illegal Data [Row:"+t.state.rowNum+"][Col:"+t.state.colNum+"]");default:throw new Error("CSVDataError: Unknown State [Row:"+t.state.rowNum+"][Col:"+t.state.colNum+"]")}})),s(),i}},toArray:function(e,t,n){t=void 0!==t?t:{};var i={};i.callback=void 0!==n&&"function"==typeof n&&n,i.separator="separator"in t?t.separator:r.csv.defaults.separator,i.delimiter="delimiter"in t?t.delimiter:r.csv.defaults.delimiter;var o=void 0!==t.state?t.state:{},a=(t={delimiter:i.delimiter,separator:i.separator,onParseEntry:t.onParseEntry,onParseValue:t.onParseValue,state:o},r.csv.parsers.parseEntry(e,t));if(!i.callback)return a;i.callback("",a)},toArrays:function(e,t,n){t=void 0!==t?t:{};var i,o={};if(o.callback=void 0!==n&&"function"==typeof n&&n,o.separator="separator"in t?t.separator:r.csv.defaults.separator,o.delimiter="delimiter"in t?t.delimiter:r.csv.defaults.delimiter,t={delimiter:o.delimiter,separator:o.separator,onParseEntry:t.onParseEntry,onParseValue:t.onParseValue,start:t.start,end:t.end,state:{rowNum:1,colNum:1}},i=r.csv.parsers.parse(e,t),!o.callback)return i;o.callback("",i)},toObjects:function(e,t,n){t=void 0!==t?t:{};var i={};i.callback=void 0!==n&&"function"==typeof n&&n,i.separator="separator"in t?t.separator:r.csv.defaults.separator,i.delimiter="delimiter"in t?t.delimiter:r.csv.defaults.delimiter,i.headers="headers"in t?t.headers:r.csv.defaults.headers,t.start="start"in t?t.start:1,i.headers&&t.start++,t.end&&i.headers&&t.end++;var o=[],a=(t={delimiter:i.delimiter,separator:i.separator,onParseEntry:t.onParseEntry,onParseValue:t.onParseValue,start:t.start,end:t.end,state:{rowNum:1,colNum:1},match:!1},{delimiter:i.delimiter,separator:i.separator,start:1,end:1,state:{rowNum:1,colNum:1}}),s=r.csv.parsers.splitLines(e,a),l=r.csv.toArray(s[0],t),u=r.csv.parsers.splitLines(e,t);t.state.colNum=1,t.state.rowNum=l?2:1;for(var c=0,d=u.length;c<d;c++){var p=r.csv.toArray(u[c],t),f={};for(var h in l)f[l[h]]=p[h];o.push(f),t.state.rowNum++}if(!i.callback)return o;i.callback("",o)},fromArrays:function(e,t,n){t=void 0!==t?t:{};var o={};if(o.callback=void 0!==n&&"function"==typeof n&&n,o.separator="separator"in t?t.separator:r.csv.defaults.separator,o.delimiter="delimiter"in t?t.delimiter:r.csv.defaults.delimiter,o.escaper="escaper"in t?t.escaper:r.csv.defaults.escaper,o.experimental="experimental"in t&&t.experimental,!o.experimental)throw new Error("not implemented");var a=[];for(i in e)a.push(e[i]);if(!o.callback)return a;o.callback("",a)},fromObjects2CSV:function(e,t,n){t=void 0!==t?t:{};var o={};if(o.callback=void 0!==n&&"function"==typeof n&&n,o.separator="separator"in t?t.separator:r.csv.defaults.separator,o.delimiter="delimiter"in t?t.delimiter:r.csv.defaults.delimiter,o.experimental="experimental"in t&&t.experimental,!o.experimental)throw new Error("not implemented");var a=[];for(i in e)a.push(arrays[i]);if(!o.callback)return a;o.callback("",a)}},r.csvEntry2Array=r.csv.toArray,r.csv2Array=r.csv.toArrays,r.csv2Dictionary=r.csv.toObjects},{jquery:18}],5:[function(e,t,n){var r;r=function(e){var t=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),n=e.Pos,r={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"};function i(e,t,i,a){var s=e.getLineHandle(t.line),l=t.ch-1,u=l>=0&&r[s.text.charAt(l)]||r[s.text.charAt(++l)];if(!u)return null;var c=">"==u.charAt(1)?1:-1;if(i&&c>0!=(l==t.ch))return null;var d=e.getTokenTypeAt(n(t.line,l+1)),p=o(e,n(t.line,l+(c>0?1:0)),c,d||null,a);return null==p?null:{from:n(t.line,l),to:p&&p.pos,match:p&&p.ch==u.charAt(0),forward:c>0}}function o(e,t,i,o,a){for(var s=a&&a.maxScanLineLength||1e4,l=a&&a.maxScanLines||1e3,u=[],c=a&&a.bracketRegex?a.bracketRegex:/[(){}[\]]/,d=i>0?Math.min(t.line+l,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-l),p=t.line;p!=d;p+=i){var f=e.getLine(p);if(f){var h=i>0?0:f.length-1,g=i>0?f.length:-1;if(!(f.length>s))for(p==t.line&&(h=t.ch-(i<0?1:0));h!=g;h+=i){var m=f.charAt(h);if(c.test(m)&&(void 0===o||e.getTokenTypeAt(n(p,h+1))==o))if(">"==r[m].charAt(1)==i>0)u.push(m);else{if(!u.length)return{pos:n(p,h),ch:m};u.pop()}}}}return p-i!=(i>0?e.lastLine():e.firstLine())&&null}function a(e,r,o){for(var a=e.state.matchBrackets.maxHighlightLineLength||1e3,s=[],l=e.listSelections(),u=0;u<l.length;u++){var c=l[u].empty()&&i(e,l[u].head,!1,o);if(c&&e.getLine(c.from.line).length<=a){var d=c.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";s.push(e.markText(c.from,n(c.from.line,c.from.ch+1),{className:d})),c.to&&e.getLine(c.to.line).length<=a&&s.push(e.markText(c.to,n(c.to.line,c.to.ch+1),{className:d}))}}if(s.length){t&&e.state.focused&&e.display.input.focus();var p=function(){e.operation((function(){for(var e=0;e<s.length;e++)s[e].clear()}))};if(!r)return p;setTimeout(p,800)}}var s=null;function l(e){e.operation((function(){s&&(s(),s=null),s=a(e,!1,e.state.matchBrackets)}))}e.defineOption("matchBrackets",!1,(function(t,n,r){r&&r!=e.Init&&t.off("cursorActivity",l),n&&(t.state.matchBrackets="object"==typeof n?n:{},t.on("cursorActivity",l))})),e.defineExtension("matchBrackets",(function(){a(this,!0)})),e.defineExtension("findMatchingBracket",(function(e,t,n){return i(this,e,t,n)})),e.defineExtension("scanForBracket",(function(e,t,n,r){return o(this,e,t,n,r)}))},"object"==typeof n&&"object"==typeof t?r(e("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],r):r(CodeMirror)},{"../../lib/codemirror":10}],6:[function(e,t,n){var r;r=function(e){"use strict";e.registerHelper("fold","brace",(function(t,n){var r,i=n.line,o=t.getLine(i);function a(a){for(var s=n.ch,l=0;;){var u=s<=0?-1:o.lastIndexOf(a,s-1);if(-1!=u){if(1==l&&u<n.ch)break;if(r=t.getTokenTypeAt(e.Pos(i,u+1)),!/^(comment|string)/.test(r))return u+1;s=u-1}else{if(1==l)break;l=1,s=o.length}}}var s,l="{",u="}";if(null==(s=a("{"))&&(l="[",u="]",s=a("[")),null!=s){var c,d,p=1,f=t.lastLine();e:for(var h=i;h<=f;++h)for(var g=t.getLine(h),m=h==i?s:0;;){var v=g.indexOf(l,m),y=g.indexOf(u,m);if(v<0&&(v=g.length),y<0&&(y=g.length),(m=Math.min(v,y))==g.length)break;if(t.getTokenTypeAt(e.Pos(h,m+1))==r)if(m==v)++p;else if(!--p){c=h,d=m;break e}++m}if(null!=c&&(i!=c||d!=s))return{from:e.Pos(i,s),to:e.Pos(c,d)}}})),e.registerHelper("fold","import",(function(t,n){function r(n){if(n<t.firstLine()||n>t.lastLine())return null;var r=t.getTokenAt(e.Pos(n,1));if(/\S/.test(r.string)||(r=t.getTokenAt(e.Pos(n,r.end+1))),"keyword"!=r.type||"import"!=r.string)return null;for(var i=n,o=Math.min(t.lastLine(),n+10);i<=o;++i){var a=t.getLine(i).indexOf(";");if(-1!=a)return{startCh:r.end,end:e.Pos(i,a)}}}var i,o=r(n=n.line);if(!o||r(n-1)||(i=r(n-2))&&i.end.line==n-1)return null;for(var a=o.end;;){var s=r(a.line+1);if(null==s)break;a=s.end}return{from:t.clipPos(e.Pos(n,o.startCh+1)),to:a}})),e.registerHelper("fold","include",(function(t,n){function r(n){if(n<t.firstLine()||n>t.lastLine())return null;var r=t.getTokenAt(e.Pos(n,1));return/\S/.test(r.string)||(r=t.getTokenAt(e.Pos(n,r.end+1))),"meta"==r.type&&"#include"==r.string.slice(0,8)?r.start+8:void 0}var i=r(n=n.line);if(null==i||null!=r(n-1))return null;for(var o=n;null!=r(o+1);)++o;return{from:e.Pos(n,i+1),to:t.clipPos(e.Pos(o))}}))},"object"==typeof n&&"object"==typeof t?r(e("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],r):r(CodeMirror)},{"../../lib/codemirror":10}],7:[function(e,t,n){var r;r=function(e){"use strict";function t(t,n,i,o){if(i&&i.call){var a=i;i=null}else a=r(t,i,"rangeFinder");"number"==typeof n&&(n=e.Pos(n,0));var s=r(t,i,"minFoldSize");function l(e){var r=a(t,n);if(!r||r.to.line-r.from.line<s)return null;for(var i=t.findMarksAt(r.from),l=0;l<i.length;++l)if(i[l].__isFold&&"fold"!==o){if(!e)return null;r.cleared=!0,i[l].clear()}return r}var u=l(!0);if(r(t,i,"scanUp"))for(;!u&&n.line>t.firstLine();)n=e.Pos(n.line-1,0),u=l(!1);if(u&&!u.cleared&&"unfold"!==o){var c=function(e,t){var n=r(e,t,"widget");if("string"==typeof n){var i=document.createTextNode(n);(n=document.createElement("span")).appendChild(i),n.className="CodeMirror-foldmarker"}return n}(t,i);e.on(c,"mousedown",(function(t){d.clear(),e.e_preventDefault(t)}));var d=t.markText(u.from,u.to,{replacedWith:c,clearOnEnter:!0,__isFold:!0});d.on("clear",(function(n,r){e.signal(t,"unfold",t,n,r)})),e.signal(t,"fold",t,u.from,u.to)}}e.newFoldFunction=function(e,n){return function(r,i){t(r,i,{rangeFinder:e,widget:n})}},e.defineExtension("foldCode",(function(e,n,r){t(this,e,n,r)})),e.defineExtension("isFolded",(function(e){for(var t=this.findMarksAt(e),n=0;n<t.length;++n)if(t[n].__isFold)return!0})),e.commands.toggleFold=function(e){e.foldCode(e.getCursor())},e.commands.fold=function(e){e.foldCode(e.getCursor(),null,"fold")},e.commands.unfold=function(e){e.foldCode(e.getCursor(),null,"unfold")},e.commands.foldAll=function(t){t.operation((function(){for(var n=t.firstLine(),r=t.lastLine();n<=r;n++)t.foldCode(e.Pos(n,0),null,"fold")}))},e.commands.unfoldAll=function(t){t.operation((function(){for(var n=t.firstLine(),r=t.lastLine();n<=r;n++)t.foldCode(e.Pos(n,0),null,"unfold")}))},e.registerHelper("fold","combine",(function(){var e=Array.prototype.slice.call(arguments,0);return function(t,n){for(var r=0;r<e.length;++r){var i=e[r](t,n);if(i)return i}}})),e.registerHelper("fold","auto",(function(e,t){for(var n=e.getHelpers(t,"fold"),r=0;r<n.length;r++){var i=n[r](e,t);if(i)return i}}));var n={rangeFinder:e.fold.auto,widget:"↔",minFoldSize:0,scanUp:!1};function r(e,t,r){if(t&&void 0!==t[r])return t[r];var i=e.options.foldOptions;return i&&void 0!==i[r]?i[r]:n[r]}e.defineOption("foldOptions",null),e.defineExtension("foldOption",(function(e,t){return r(this,e,t)}))},"object"==typeof n&&"object"==typeof t?r(e("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],r):r(CodeMirror)},{"../../lib/codemirror":10}],8:[function(e,t,n){var r;r=function(e){"use strict";e.defineOption("foldGutter",!1,(function(t,r,i){var c;i&&i!=e.Init&&(t.clearGutter(t.state.foldGutter.options.gutter),t.state.foldGutter=null,t.off("gutterClick",a),t.off("change",s),t.off("viewportChange",l),t.off("fold",u),t.off("unfold",u),t.off("swapDoc",o)),r&&(t.state.foldGutter=new n((!0===(c=r)&&(c={}),null==c.gutter&&(c.gutter="CodeMirror-foldgutter"),null==c.indicatorOpen&&(c.indicatorOpen="CodeMirror-foldgutter-open"),null==c.indicatorFolded&&(c.indicatorFolded="CodeMirror-foldgutter-folded"),c)),o(t),t.on("gutterClick",a),t.on("change",s),t.on("viewportChange",l),t.on("fold",u),t.on("unfold",u),t.on("swapDoc",o))}));var t=e.Pos;function n(e){this.options=e,this.from=this.to=0}function r(e){if("string"==typeof e){var t=document.createElement("div");return t.className=e+" CodeMirror-guttermarker-subtle",t}return e.cloneNode(!0)}function i(e,n,i){var o=e.state.foldGutter.options,a=n,s=e.foldOption(o,"minFoldSize"),l=e.foldOption(o,"rangeFinder");e.eachLine(n,i,(function(n){var i=null;if(function(e,n){for(var r=e.findMarksAt(t(n)),i=0;i<r.length;++i)if(r[i].__isFold&&r[i].find().from.line==n)return!0}(e,a))i=r(o.indicatorFolded);else{var u=t(a,0),c=l&&l(e,u);c&&c.to.line-c.from.line>=s&&(i=r(o.indicatorOpen))}e.setGutterMarker(n,o.gutter,i),++a}))}function o(e){var t=e.getViewport(),n=e.state.foldGutter;n&&(e.operation((function(){i(e,t.from,t.to)})),n.from=t.from,n.to=t.to)}function a(e,n,r){var i=e.state.foldGutter;if(i){var o=i.options;r==o.gutter&&e.foldCode(t(n,0),o.rangeFinder)}}function s(e){var t=e.state.foldGutter;if(t){var n=t.options;t.from=t.to=0,clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout((function(){o(e)}),n.foldOnChangeTimeSpan||600)}}function l(e){var t=e.state.foldGutter;if(t){var n=t.options;clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout((function(){var n=e.getViewport();t.from==t.to||n.from-t.to>20||t.from-n.to>20?o(e):e.operation((function(){n.from<t.from&&(i(e,n.from,t.from),t.from=n.from),n.to>t.to&&(i(e,t.to,n.to),t.to=n.to)}))}),n.updateViewportTimeSpan||400)}}function u(e,t){var n=e.state.foldGutter;if(n){var r=t.line;r>=n.from&&r<n.to&&i(e,r,r+1)}}},"object"==typeof n&&"object"==typeof t?r(e("../../lib/codemirror"),e("./foldcode")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./foldcode"],r):r(CodeMirror)},{"../../lib/codemirror":10,"./foldcode":7}],9:[function(e,t,n){var r;r=function(e){"use strict";var t=e.Pos,n="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",r=new RegExp("<(/?)(["+n+"][A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*)","g");function i(e,t,n,r){this.line=t,this.ch=n,this.cm=e,this.text=e.getLine(t),this.min=r?r.from:e.firstLine(),this.max=r?r.to-1:e.lastLine()}function o(e,n){var r=e.cm.getTokenTypeAt(t(e.line,n));return r&&/\btag\b/.test(r)}function a(e){if(!(e.line>=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function s(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function l(e){for(;;){var t=e.text.indexOf(">",e.ch);if(-1==t){if(a(e))continue;return}if(o(e,t+1)){var n=e.text.lastIndexOf("/",t),r=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,r?"selfClose":"regular"}e.ch=t+1}}function u(e){for(;;){var t=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(-1==t){if(s(e))continue;return}if(o(e,t+1)){r.lastIndex=t,e.ch=t;var n=r.exec(e.text);if(n&&n.index==t)return n}else e.ch=t}}function c(e){for(;;){r.lastIndex=e.ch;var t=r.exec(e.text);if(!t){if(a(e))continue;return}if(o(e,t.index+1))return e.ch=t.index+t[0].length,t;e.ch=t.index+1}}function d(e){for(;;){var t=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(-1==t){if(s(e))continue;return}if(o(e,t+1)){var n=e.text.lastIndexOf("/",t),r=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,r?"selfClose":"regular"}e.ch=t}}function p(e,n){for(var r=[];;){var i,o=c(e),a=e.line,s=e.ch-(o?o[0].length:0);if(!o||!(i=l(e)))return;if("selfClose"!=i)if(o[1]){for(var u=r.length-1;u>=0;--u)if(r[u]==o[2]){r.length=u;break}if(u<0&&(!n||n==o[2]))return{tag:o[2],from:t(a,s),to:t(e.line,e.ch)}}else r.push(o[2])}}function f(e,n){for(var r=[];;){var i=d(e);if(!i)return;if("selfClose"!=i){var o=e.line,a=e.ch,s=u(e);if(!s)return;if(s[1])r.push(s[2]);else{for(var l=r.length-1;l>=0;--l)if(r[l]==s[2]){r.length=l;break}if(l<0&&(!n||n==s[2]))return{tag:s[2],from:t(e.line,e.ch),to:t(o,a)}}}else u(e)}}e.registerHelper("fold","xml",(function(e,n){for(var r=new i(e,n.line,0);;){var o,a=c(r);if(!a||r.line!=n.line||!(o=l(r)))return;if(!a[1]&&"selfClose"!=o){n=t(r.line,r.ch);var s=p(r,a[2]);return s&&{from:n,to:s.from}}}})),e.findMatchingTag=function(e,n,r){var o=new i(e,n.line,n.ch,r);if(-1!=o.text.indexOf(">")||-1!=o.text.indexOf("<")){var a=l(o),s=a&&t(o.line,o.ch),c=a&&u(o);if(a&&c&&(h=n,!(((d=o).line-h.line||d.ch-h.ch)>0))){var d,h,g={from:t(o.line,o.ch),to:s,tag:c[2]};return"selfClose"==a?{open:g,close:null,at:"open"}:c[1]?{open:f(o,c[2]),close:g,at:"close"}:{open:g,close:p(o=new i(e,s.line,s.ch,r),c[2]),at:"open"}}}},e.findEnclosingTag=function(e,t,n){for(var r=new i(e,t.line,t.ch,n);;){var o=f(r);if(!o)break;var a=p(new i(e,t.line,t.ch,n),o.tag);if(a)return{open:o,close:a}}},e.scanForClosingTag=function(e,t,n,r){return p(new i(e,t.line,t.ch,r?{from:0,to:r}:null),n)}},"object"==typeof n&&"object"==typeof t?r(e("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],r):r(CodeMirror)},{"../../lib/codemirror":10}],10:[function(e,t,n){!function(e){if("object"==typeof n&&"object"==typeof t)t.exports=e();else{if("function"==typeof define&&define.amd)return define([],e);this.CodeMirror=e()}}((function(){"use strict";var e=/gecko\/\d/i.test(navigator.userAgent),t=/MSIE \d/.test(navigator.userAgent),n=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),r=t||n,i=r&&(t?document.documentMode||6:n[1]),o=/WebKit\//.test(navigator.userAgent),a=o&&/Qt\/\d+\.\d+/.test(navigator.userAgent),s=/Chrome\//.test(navigator.userAgent),l=/Opera\//.test(navigator.userAgent),u=/Apple Computer/.test(navigator.vendor),c=/KHTML\//.test(navigator.userAgent),d=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent),p=/PhantomJS/.test(navigator.userAgent),f=/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent),h=f||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent),g=f||/Mac/.test(navigator.platform),m=/win/i.test(navigator.platform),v=l&&navigator.userAgent.match(/Version\/(\d*\.\d*)/);v&&(v=Number(v[1])),v&&v>=15&&(l=!1,o=!0);var y=g&&(a||l&&(null==v||v<12.11)),x=e||r&&i>=9,b=!1,E=!1;function C(e,t){if(!(this instanceof C))return new C(e,t);this.options=t=t?oo(t):{},oo(Hn,t,!1),D(t);var n=t.value;"string"==typeof n&&(n=new ii(n,t.mode)),this.doc=n;var a=this.display=new T(e,n);for(var s in a.wrapper.CodeMirror=this,R(this),A(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),t.autofocus&&!h&&qt(this),j(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,draggingText:!1,highlight:new Qi,keySeq:null},r&&i<11&&setTimeout(ao(Wt,this,!0),20),function(e){var t=e.display;function n(t){Hi(e,t)||ki(t)}function a(n){if(e.somethingSelected())Ut=e.getSelections(),t.inaccurateSelection&&(t.prevInput="",t.inaccurateSelection=!1,t.input.value=Ut.join("\n"),to(t.input));else{for(var r=[],i=[],o=0;o<e.doc.sel.ranges.length;o++){var a=e.doc.sel.ranges[o].head.line,s={anchor:de(a,0),head:de(a+1,0)};i.push(s),r.push(e.getRange(s.anchor,s.head))}"cut"==n.type?e.setSelections(i,null,zi):(t.prevInput="",t.input.value=r.join("\n"),to(t.input)),Ut=r}"cut"==n.type&&(e.state.cutIncoming=!0)}Di(t.scroller,"mousedown",Lt(e,Kt)),Di(t.scroller,"dblclick",r&&i<11?Lt(e,(function(t){if(!Hi(e,t)){var n=Yt(e,t);if(n&&!Zt(e,t)&&!Qt(e.display,t)){Ai(t);var r=e.findWordAt(n);Se(e.doc,r.anchor,r.head)}}})):function(t){Hi(e,t)||Ai(t)}),Di(t.lineSpace,"selectstart",(function(e){Qt(t,e)||Ai(e)})),x||Di(t.scroller,"contextmenu",(function(t){xn(e,t)})),Di(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(nn(e,t.scroller.scrollTop),rn(e,t.scroller.scrollLeft,!0),Pi(e,"scroll",e))})),Di(t.scroller,"mousewheel",(function(t){ln(e,t)})),Di(t.scroller,"DOMMouseScroll",(function(t){ln(e,t)})),Di(t.wrapper,"scroll",(function(){t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),Di(t.input,"keyup",(function(t){gn.call(e,t)})),Di(t.input,"input",(function(){r&&i>=9&&e.display.inputHasSelection&&(e.display.inputHasSelection=null),Vt(e)})),Di(t.input,"keydown",Lt(e,hn)),Di(t.input,"keypress",Lt(e,mn)),Di(t.input,"focus",ao(vn,e)),Di(t.input,"blur",ao(yn,e)),e.options.dragDrop&&(Di(t.scroller,"dragstart",(function(t){!function(e,t){if(r&&(!e.state.draggingText||+new Date-en<100))ki(t);else if(!Hi(e,t)&&!Qt(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.setDragImage&&!u)){var n=go("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",l&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),l&&n.parentNode.removeChild(n)}}(e,t)})),Di(t.scroller,"dragenter",n),Di(t.scroller,"dragover",n),Di(t.scroller,"drop",Lt(e,tn))),Di(t.scroller,"paste",(function(n){Qt(t,n)||(e.state.pasteIncoming=!0,qt(e),Bt(e))})),Di(t.input,"paste",(function(){if(o&&!e.state.fakedLastChar&&!(new Date-e.state.lastMiddleDown<200)){var n=t.input.selectionStart,r=t.input.selectionEnd;t.input.value+="$",t.input.selectionEnd=r,t.input.selectionStart=n,e.state.fakedLastChar=!0}e.state.pasteIncoming=!0,Bt(e)})),Di(t.input,"cut",a),Di(t.input,"copy",a),c&&Di(t.sizer,"mouseup",(function(){xo()==t.input&&t.input.blur(),qt(e)}))}(this),function(){var e;Lo||(Di(window,"resize",(function(){null==e&&(e=setTimeout((function(){e=null,So(Xt)}),100))})),Di(window,"blur",(function(){So(yn)})),Lo=!0)}(),xt(this),this.curOp.forceUpdate=!0,li(this,n),t.autofocus&&!h||xo()==a.input?setTimeout(ao(vn,this),20):yn(this),Gn)Gn.hasOwnProperty(s)&&Gn[s](this,t[s],Vn);V(this),t.finishInit&&t.finishInit(this);for(var d=0;d<$n.length;++d)$n[d](this);bt(this),o&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(a.lineDiv).textRendering&&(a.lineDiv.style.textRendering="auto")}function T(e,t){var n=this,a=n.input=go("textarea",null,null,"position: absolute; padding: 0; width: 1px; height: 1em; outline: none");o?a.style.width="1000px":a.setAttribute("wrap","off"),f&&(a.style.border="1px solid black"),a.setAttribute("autocorrect","off"),a.setAttribute("autocapitalize","off"),a.setAttribute("spellcheck","false"),n.inputDiv=go("div",[a],null,"overflow: hidden; position: relative; width: 3px; height: 0px;"),n.scrollbarFiller=go("div",null,"CodeMirror-scrollbar-filler"),n.scrollbarFiller.setAttribute("not-content","true"),n.gutterFiller=go("div",null,"CodeMirror-gutter-filler"),n.gutterFiller.setAttribute("not-content","true"),n.lineDiv=go("div",null,"CodeMirror-code"),n.selectionDiv=go("div",null,null,"position: relative; z-index: 1"),n.cursorDiv=go("div",null,"CodeMirror-cursors"),n.measure=go("div",null,"CodeMirror-measure"),n.lineMeasure=go("div",null,"CodeMirror-measure"),n.lineSpace=go("div",[n.measure,n.lineMeasure,n.selectionDiv,n.cursorDiv,n.lineDiv],null,"position: relative; outline: none"),n.mover=go("div",[go("div",[n.lineSpace],"CodeMirror-lines")],null,"position: relative"),n.sizer=go("div",[n.mover],"CodeMirror-sizer"),n.sizerWidth=null,n.heightForcer=go("div",null,null,"position: absolute; height: "+Wi+"px; width: 1px;"),n.gutters=go("div",null,"CodeMirror-gutters"),n.lineGutter=null,n.scroller=go("div",[n.sizer,n.heightForcer,n.gutters],"CodeMirror-scroll"),n.scroller.setAttribute("tabIndex","-1"),n.wrapper=go("div",[n.inputDiv,n.scrollbarFiller,n.gutterFiller,n.scroller],"CodeMirror"),r&&i<8&&(n.gutters.style.zIndex=-1,n.scroller.style.paddingRight=0),f&&(a.style.width="0px"),o||(n.scroller.draggable=!0),c&&(n.inputDiv.style.height="1px",n.inputDiv.style.position="absolute"),e&&(e.appendChild?e.appendChild(n.wrapper):e(n.wrapper)),n.viewFrom=n.viewTo=t.first,n.reportedViewFrom=n.reportedViewTo=t.first,n.view=[],n.renderedView=null,n.externalMeasured=null,n.viewOffset=0,n.lastWrapHeight=n.lastWrapWidth=0,n.updateLineNumbers=null,n.nativeBarWidth=n.barHeight=n.barWidth=0,n.scrollbarsClipped=!1,n.lineNumWidth=n.lineNumInnerWidth=n.lineNumChars=null,n.prevInput="",n.alignWidgets=!1,n.pollingFast=!1,n.poll=new Qi,n.cachedCharWidth=n.cachedTextHeight=n.cachedPaddingH=null,n.inaccurateSelection=!1,n.maxLine=null,n.maxLineLength=0,n.maxLineChanged=!1,n.wheelDX=n.wheelDY=n.wheelStartX=n.wheelStartY=null,n.shift=!1,n.selForContextMenu=null}function S(e){e.doc.mode=C.getMode(e.options,e.doc.modeOption),w(e)}function w(e){e.doc.iter((function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)})),e.doc.frontier=e.doc.first,Ge(e,100),e.state.modeGen++,e.curOp&&_t(e)}function N(e){var t=gt(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/mt(e.display)-3);return function(i){if(Ir(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a<i.widgets.length;a++)i.widgets[a].height&&(o+=i.widgets[a].height);return n?o+(Math.ceil(i.text.length/r)||1)*t:o+t}}function L(e){var t=e.doc,n=N(e);t.iter((function(e){var t=n(e);t!=e.height&&pi(e,t)}))}function A(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),it(e)}function I(e){R(e),_t(e),setTimeout((function(){U(e)}),20)}function R(e){var t=e.display.gutters,n=e.options.gutters;mo(t);for(var r=0;r<n.length;++r){var i=n[r],o=t.appendChild(go("div",null,"CodeMirror-gutter "+i));"CodeMirror-linenumbers"==i&&(e.display.lineGutter=o,o.style.width=(e.display.lineNumWidth||1)+"px")}t.style.display=r?"":"none",k(e)}function k(e){var t=e.display.gutters.offsetWidth;e.display.sizer.style.marginLeft=t+"px"}function _(e){if(0==e.height)return 0;for(var t,n=e.text.length,r=e;t=Tr(r);)r=(i=t.find(0,!0)).from.line,n+=i.from.ch-i.to.ch;for(r=e;t=Sr(r);){var i=t.find(0,!0);n-=r.text.length-i.from.ch,n+=(r=i.to.line).text.length-i.to.ch}return n}function O(e){var t=e.display,n=e.doc;t.maxLine=ui(n,n.first),t.maxLineLength=_(t.maxLine),t.maxLineChanged=!0,n.iter((function(e){var n=_(e);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}function D(e){var t=no(e.gutters,"CodeMirror-linenumbers");-1==t&&e.lineNumbers?e.gutters=e.gutters.concat(["CodeMirror-linenumbers"]):t>-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}function M(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+qe(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+$e(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}function P(e,t,n){this.cm=n;var o=this.vert=go("div",[go("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),a=this.horiz=go("div",[go("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");e(o),e(a),Di(o,"scroll",(function(){o.clientHeight&&t(o.scrollTop,"vertical")})),Di(a,"scroll",(function(){a.clientWidth&&t(a.scrollLeft,"horizontal")})),this.checkedOverlay=!1,r&&i<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")}function F(){}function j(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&Eo(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new C.scrollbarModel[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),Di(t,"mousedown",(function(){e.state.focused&&setTimeout(ao(qt,e),0)})),t.setAttribute("not-content","true")}),(function(t,n){"horizontal"==n?rn(e,t):nn(e,t)}),e),e.display.scrollbars.addClass&&Co(e.display.wrapper,e.display.scrollbars.addClass)}function B(e,t){t||(t=M(e));var n=e.display.barWidth,r=e.display.barHeight;H(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&K(e),H(e,M(e)),n=e.display.barWidth,r=e.display.barHeight}function H(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}function G(e,t,n){var r=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-We(e));var i=n&&null!=n.bottom?n.bottom:r+e.wrapper.clientHeight,o=hi(t,r),a=hi(t,i);if(n&&n.ensure){var s=n.ensure.from.line,l=n.ensure.to.line;s<o?(o=s,a=hi(t,gi(ui(t,s))+e.wrapper.clientHeight)):Math.min(l,t.lastLine())>=a&&(o=hi(t,gi(ui(t,l))-e.wrapper.clientHeight),a=l)}return{from:o,to:Math.max(a,o+1)}}function U(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=q(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",a=0;a<n.length;a++)if(!n[a].hidden){e.options.fixedGutter&&n[a].gutter&&(n[a].gutter.style.left=o);var s=n[a].alignable;if(s)for(var l=0;l<s.length;l++)s[l].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=r+i+"px")}}function V(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=W(e.options,t.first+t.size-1),r=e.display;if(n.length!=r.lineNumChars){var i=r.measure.appendChild(go("div",[go("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,a=i.offsetWidth-o;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(o,r.lineGutter.offsetWidth-a),r.lineNumWidth=r.lineNumInnerWidth+a,r.lineNumChars=r.lineNumInnerWidth?n.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",k(e),!0}return!1}function W(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function q(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function z(e,t,n){var r=e.display;this.viewport=t,this.visible=G(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=Xe(e),this.force=n,this.dims=Z(e),this.events=[]}function $(e,t){var n=e.display,r=e.doc;if(t.editorIsHidden)return Dt(e),!1;if(!t.force&&t.visible.from>=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==Ft(e))return!1;V(e)&&(Dt(e),t.dims=Z(e));var i=r.first+r.size,a=Math.max(t.visible.from-e.options.viewportMargin,r.first),s=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFrom<a&&a-n.viewFrom<20&&(a=Math.max(r.first,n.viewFrom)),n.viewTo>s&&n.viewTo-s<20&&(s=Math.min(i,n.viewTo)),E&&(a=Lr(e.doc,a),s=Ar(e.doc,s));var l=a!=n.viewFrom||s!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;!function(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=kt(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=kt(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(Mt(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(kt(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,Mt(e,n)))),r.viewTo=n}(e,a,s),n.viewOffset=gi(ui(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var u=Ft(e);if(!l&&0==u&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var c=xo();return u>4&&(n.lineDiv.style.display="none"),function(e,t,n){var r=e.display,i=e.options.lineNumbers,a=r.lineDiv,s=a.firstChild;function l(t){var n=t.nextSibling;return o&&g&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var u=r.view,c=r.viewFrom,d=0;d<u.length;d++){var p=u[d];if(p.hidden);else if(p.node){for(;s!=p.node;)s=l(s);var f=i&&null!=t&&t<=c&&p.lineNumber;p.changes&&(no(p.changes,"gutter")>-1&&(f=!1),ee(e,p,c,n)),f&&(mo(p.lineNumber),p.lineNumber.appendChild(document.createTextNode(W(e.options,c)))),s=p.node.nextSibling}else{var h=se(e,p,c,n);a.insertBefore(h,s)}c+=p.size}for(;s;)s=l(s)}(e,n.updateLineNumbers,t.dims),u>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,c&&xo()!=c&&c.offsetHeight&&c.focus(),mo(n.cursorDiv),mo(n.selectionDiv),n.gutters.style.height=0,l&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,Ge(e,400)),n.updateLineNumbers=null,!0}function X(e,t){t.force;for(var n=t.viewport,r=!0;;r=!1){if(r&&e.options.lineWrapping&&t.oldDisplayWidth!=Xe(e));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+qe(e.display)-Qe(e),n.top)}),t.visible=G(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!$(e,t))break;K(e);var i=M(e);Fe(e),Y(e,i),B(e,i)}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Q(e,t){var n=new z(e,t);if($(e,n)){K(e),X(e,n);var r=M(e);Fe(e),Y(e,r),B(e,r),n.finish()}}function Y(e,t){e.display.sizer.style.minHeight=t.docHeight+"px";var n=t.docHeight+e.display.barHeight;e.display.heightForcer.style.top=n+"px",e.display.gutters.style.height=Math.max(n+$e(e),t.clientHeight)+"px"}function K(e){for(var t=e.display,n=t.lineDiv.offsetTop,o=0;o<t.view.length;o++){var a,s=t.view[o];if(!s.hidden){if(r&&i<8){var l=s.node.offsetTop+s.node.offsetHeight;a=l-n,n=l}else{var u=s.node.getBoundingClientRect();a=u.bottom-u.top}var c=s.line.height-a;if(a<2&&(a=gt(t)),(c>.001||c<-.001)&&(pi(s.line,a),J(s.line),s.rest))for(var d=0;d<s.rest.length;d++)J(s.rest[d])}}}function J(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t)e.widgets[t].height=e.widgets[t].node.offsetHeight}function Z(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a)n[e.options.gutters[a]]=o.offsetLeft+o.clientLeft+i,r[e.options.gutters[a]]=o.clientWidth;return{fixedPos:q(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function ee(e,t,n,r){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?re(e,t):"gutter"==o?oe(e,t,n,r):"class"==o?ie(t):"widget"==o&&ae(t,r)}t.changes=null}function te(e){return e.node==e.text&&(e.node=go("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),r&&i<8&&(e.node.style.zIndex=2)),e.node}function ne(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):$r(e,t)}function re(e,t){var n=t.text.className,r=ne(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,ie(t)):n&&(t.text.className=n)}function ie(e){!function(e){var t=e.bgClass?e.bgClass+" "+(e.line.bgClass||""):e.line.bgClass;if(t&&(t+=" CodeMirror-linebackground"),e.background)t?e.background.className=t:(e.background.parentNode.removeChild(e.background),e.background=null);else if(t){var n=te(e);e.background=n.insertBefore(go("div",null,t),n.firstChild)}}(e),e.line.wrapClass?te(e).className=e.line.wrapClass:e.node!=e.text&&(e.node.className="");var t=e.textClass?e.textClass+" "+(e.line.textClass||""):e.line.textClass;e.text.className=t||""}function oe(e,t,n,r){t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null);var i=t.line.gutterMarkers;if(e.options.lineNumbers||i){var o=te(t),a=t.gutter=o.insertBefore(go("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),t.text);if(t.line.gutterClass&&(a.className+=" "+t.line.gutterClass),!e.options.lineNumbers||i&&i["CodeMirror-linenumbers"]||(t.lineNumber=a.appendChild(go("div",W(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),i)for(var s=0;s<e.options.gutters.length;++s){var l=e.options.gutters[s],u=i.hasOwnProperty(l)&&i[l];u&&a.appendChild(go("div",[u],"CodeMirror-gutter-elt","left: "+r.gutterLeft[l]+"px; width: "+r.gutterWidth[l]+"px"))}}}function ae(e,t){e.alignable&&(e.alignable=null);for(var n=e.node.firstChild;n;n=r){var r=n.nextSibling;"CodeMirror-linewidget"==n.className&&e.node.removeChild(n)}le(e,t)}function se(e,t,n,r){var i=ne(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),ie(t),oe(e,t,n,r),le(t,r),t.node}function le(e,t){if(ue(e.line,e,t,!0),e.rest)for(var n=0;n<e.rest.length;n++)ue(e.rest[n],e,t,!1)}function ue(e,t,n,r){if(e.widgets)for(var i=te(t),o=0,a=e.widgets;o<a.length;++o){var s=a[o],l=go("div",[s.node],"CodeMirror-linewidget");s.handleMouseEvents||l.setAttribute("cm-ignore-events","true"),ce(s,l,t,n),r&&s.above?i.insertBefore(l,t.gutter||t.text):i.appendChild(l),ji(s,"redraw")}}function ce(e,t,n,r){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var i=r.wrapperWidth;t.style.left=r.fixedPos+"px",e.coverGutter||(i-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+"px"))}P.prototype=oo({update:function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=e.scrollWidth-e.clientWidth+o+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedOverlay&&e.clientHeight>0&&(0==r&&this.overlayHack(),this.checkedOverlay=!0),{right:n?r:0,bottom:t?r:0}},setScrollLeft:function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e)},setScrollTop:function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e)},overlayHack:function(){var e=g&&!d?"12px":"18px";this.horiz.style.minHeight=this.vert.style.minWidth=e;var t=this,n=function(e){_i(e)!=t.vert&&_i(e)!=t.horiz&&Lt(t.cm,Kt)(e)};Di(this.vert,"mousedown",n),Di(this.horiz,"mousedown",n)},clear:function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)}},P.prototype),F.prototype=oo({update:function(){return{bottom:0,right:0}},setScrollLeft:function(){},setScrollTop:function(){},clear:function(){}},F.prototype),C.scrollbarModel={native:P,null:F},z.prototype.signal=function(e,t){Ui(e,t)&&this.events.push(arguments)},z.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Pi.apply(null,this.events[e])};var de=C.Pos=function(e,t){if(!(this instanceof de))return new de(e,t);this.line=e,this.ch=t},pe=C.cmpPos=function(e,t){return e.line-t.line||e.ch-t.ch};function fe(e){return de(e.line,e.ch)}function he(e,t){return pe(e,t)<0?t:e}function ge(e,t){return pe(e,t)<0?e:t}function me(e,t){this.ranges=e,this.primIndex=t}function ve(e,t){this.anchor=e,this.head=t}function ye(e,t){var n=e[t];e.sort((function(e,t){return pe(e.from(),t.from())})),t=no(e,n);for(var r=1;r<e.length;r++){var i=e[r],o=e[r-1];if(pe(o.to(),i.from())>=0){var a=ge(o.from(),i.from()),s=he(o.to(),i.to()),l=o.empty()?i.from()==i.head:o.from()==o.head;r<=t&&--t,e.splice(--r,2,new ve(l?s:a,l?a:s))}}return new me(e,t)}function xe(e,t){return new me([new ve(e,t||e)],0)}function be(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function Ee(e,t){if(t.line<e.first)return de(e.first,0);var n=e.first+e.size-1;return t.line>n?de(n,ui(e,n).text.length):function(e,t){var n=e.ch;return null==n||n>t?de(e.line,t):n<0?de(e.line,0):e}(t,ui(e,t.line).text.length)}function Ce(e,t){return t>=e.first&&t<e.first+e.size}function Te(e,t,n,r){if(e.cm&&e.cm.display.shift||e.extend){var i=t.anchor;if(r){var o=pe(n,i)<0;o!=pe(r,i)<0?(i=n,n=r):o!=pe(n,r)<0&&(n=r)}return new ve(i,n)}return new ve(r||n,n)}function Se(e,t,n,r){Ie(e,new me([Te(e,e.sel.primary(),t,n)],0),r)}function we(e,t,n){for(var r=[],i=0;i<e.sel.ranges.length;i++)r[i]=Te(e,e.sel.ranges[i],t[i],null);Ie(e,ye(r,e.sel.primIndex),n)}function Ne(e,t,n,r){var i=e.sel.ranges.slice(0);i[t]=n,Ie(e,ye(i,e.sel.primIndex),r)}function Le(e,t,n,r){Ie(e,xe(t,n),r)}function Ae(e,t,n){var r=e.history.done,i=eo(r);i&&i.ranges?(r[r.length-1]=t,Re(e,t,n)):Ie(e,t,n)}function Ie(e,t,n){Re(e,t,n),function(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||function(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,o,eo(i.done),t))?i.done[i.done.length-1]=t:Ei(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&xi(i.undone)}(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function Re(e,t,n){(Ui(e,"beforeSelectionChange")||e.cm&&Ui(e.cm,"beforeSelectionChange"))&&(t=function(e,t){var n={ranges:t.ranges,update:function(t){this.ranges=[];for(var n=0;n<t.length;n++)this.ranges[n]=new ve(Ee(e,t[n].anchor),Ee(e,t[n].head))}};return Pi(e,"beforeSelectionChange",e,n),e.cm&&Pi(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?ye(n.ranges,n.ranges.length-1):t}(e,t));var r=n&&n.bias||(pe(t.primary().head,e.sel.primary().head)<0?-1:1);ke(e,Oe(e,t,r,!0)),n&&!1===n.scroll||!e.cm||On(e.cm)}function ke(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=e.cm.curOp.selectionChanged=!0,Gi(e.cm)),ji(e,"cursorActivity",e))}function _e(e){ke(e,Oe(e,e.sel,null,!1))}function Oe(e,t,n,r){for(var i,o=0;o<t.ranges.length;o++){var a=t.ranges[o],s=De(e,a.anchor,n,r),l=De(e,a.head,n,r);(i||s!=a.anchor||l!=a.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new ve(s,l))}return i?ye(i,t.primIndex):t}function De(e,t,n,r){var i=!1,o=t,a=n||1;e.cantEdit=!1;e:for(;;){var s=ui(e,o.line);if(s.markedSpans)for(var l=0;l<s.markedSpans.length;++l){var u=s.markedSpans[l],c=u.marker;if((null==u.from||(c.inclusiveLeft?u.from<=o.ch:u.from<o.ch))&&(null==u.to||(c.inclusiveRight?u.to>=o.ch:u.to>o.ch))){if(r&&(Pi(c,"beforeCursorEnter"),c.explicitlyCleared)){if(s.markedSpans){--l;continue}break}if(!c.atomic)continue;var d=c.find(a<0?-1:1);if(0==pe(d,o)&&(d.ch+=a,d.ch<0?d=d.line>e.first?Ee(e,de(d.line-1)):null:d.ch>s.text.length&&(d=d.line<e.first+e.size-1?de(d.line+1,0):null),!d)){if(i)return r?(e.cantEdit=!0,de(e.first,0)):De(e,t,n,!0);i=!0,d=t,a=-a}o=d;continue e}}return o}}function Me(e){for(var t=e.display,n=e.doc,r={},i=r.cursors=document.createDocumentFragment(),o=r.selection=document.createDocumentFragment(),a=0;a<n.sel.ranges.length;a++){var s=n.sel.ranges[a],l=s.empty();(l||e.options.showCursorWhenSelecting)&&je(e,s,i),l||Be(e,s,o)}if(e.options.moveInputWithCursor){var u=ct(e,n.sel.primary().head,"div"),c=t.wrapper.getBoundingClientRect(),d=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,u.top+d.top-c.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,u.left+d.left-c.left))}return r}function Pe(e,t){vo(e.display.cursorDiv,t.cursors),vo(e.display.selectionDiv,t.selection),null!=t.teTop&&(e.display.inputDiv.style.top=t.teTop+"px",e.display.inputDiv.style.left=t.teLeft+"px")}function Fe(e){Pe(e,Me(e))}function je(e,t,n){var r=ct(e,t.head,"div",null,null,!e.options.singleCursorHeightPerLine),i=n.appendChild(go("div"," ","CodeMirror-cursor"));if(i.style.left=r.left+"px",i.style.top=r.top+"px",i.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+"px",r.other){var o=n.appendChild(go("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));o.style.display="",o.style.left=r.other.left+"px",o.style.top=r.other.top+"px",o.style.height=.85*(r.other.bottom-r.other.top)+"px"}}function Be(e,t,n){var r=e.display,i=e.doc,o=document.createDocumentFragment(),a=ze(e.display),s=a.left,l=Math.max(r.sizerWidth,Xe(e)-r.sizer.offsetLeft)-a.right;function u(e,t,n,r){t<0&&(t=0),t=Math.round(t),r=Math.round(r),o.appendChild(go("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px; top: "+t+"px; width: "+(null==n?l-e:n)+"px; height: "+(r-t)+"px"))}function c(t,n,r){var o,a,c=ui(i,t),d=c.text.length;function p(n,r){return ut(e,de(t,n),"div",c,r)}return function(e,t,n,r){if(!e)return r(t,n,"ltr");for(var i=!1,o=0;o<e.length;++o){var a=e[o];(a.from<n&&a.to>t||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr"),i=!0)}i||r(t,n,"ltr")}(mi(c),n||0,null==r?d:r,(function(e,t,i){var c,f,h,g=p(e,"left");if(e==t)c=g,f=h=g.left;else{if(c=p(t-1,"right"),"rtl"==i){var m=g;g=c,c=m}f=g.left,h=c.right}null==n&&0==e&&(f=s),c.top-g.top>3&&(u(f,g.top,null,g.bottom),f=s,g.bottom<c.top&&u(f,g.bottom,null,c.top)),null==r&&t==d&&(h=l),(!o||g.top<o.top||g.top==o.top&&g.left<o.left)&&(o=g),(!a||c.bottom>a.bottom||c.bottom==a.bottom&&c.right>a.right)&&(a=c),f<s+1&&(f=s),u(f,c.top,h-f,c.bottom)})),{start:o,end:a}}var d=t.from(),p=t.to();if(d.line==p.line)c(d.line,d.ch,p.ch);else{var f=ui(i,d.line),h=ui(i,p.line),g=Nr(f)==Nr(h),m=c(d.line,d.ch,g?f.text.length+1:null).end,v=c(p.line,g?0:null,p.ch).start;g&&(m.top<v.top-2?(u(m.right,m.top,null,m.bottom),u(s,v.top,v.left,v.bottom)):u(m.right,m.top,v.left-m.right,m.bottom)),m.bottom<v.top&&u(s,m.bottom,null,v.top)}n.appendChild(o)}function He(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval((function(){t.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Ge(e,t){e.doc.mode.startState&&e.doc.frontier<e.display.viewTo&&e.state.highlight.set(t,ao(Ue,e))}function Ue(e){var t=e.doc;if(t.frontier<t.first&&(t.frontier=t.first),!(t.frontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,r=Qn(t.mode,Ve(e,t.frontier)),i=[];t.iter(t.frontier,Math.min(t.first+t.size,e.display.viewTo+500),(function(o){if(t.frontier>=e.display.viewFrom){var a=o.styles,s=Gr(e,o,r,!0);o.styles=s.styles;var l=o.styleClasses,u=s.classes;u?o.styleClasses=u:l&&(o.styleClasses=null);for(var c=!a||a.length!=o.styles.length||l!=u&&(!l||!u||l.bgClass!=u.bgClass||l.textClass!=u.textClass),d=0;!c&&d<a.length;++d)c=a[d]!=o.styles[d];c&&i.push(t.frontier),o.stateAfter=Qn(t.mode,r)}else Vr(e,o.text,r),o.stateAfter=t.frontier%5==0?Qn(t.mode,r):null;if(++t.frontier,+new Date>n)return Ge(e,e.options.workDelay),!0})),i.length&&Nt(e,(function(){for(var t=0;t<i.length;t++)Ot(e,i[t],"text")}))}}function Ve(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return!0;var o=function(e,t,n){for(var r,i,o=e.doc,a=n?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>a;--s){if(s<=o.first)return o.first;var l=ui(o,s-1);if(l.stateAfter&&(!n||s<=o.frontier))return s;var u=Yi(l.text,null,e.options.tabSize);(null==i||r>u)&&(i=s-1,r=u)}return i}(e,t,n),a=o>r.first&&ui(r,o-1).stateAfter;return a=a?Qn(r.mode,a):Yn(r.mode),r.iter(o,t,(function(n){Vr(e,n.text,a);var s=o==t-1||o%5==0||o>=i.viewFrom&&o<i.viewTo;n.stateAfter=s?Qn(r.mode,a):null,++o})),n&&(r.frontier=o),a}function We(e){return e.lineSpace.offsetTop}function qe(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function ze(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=vo(e.measure,go("pre","x")),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return isNaN(r.left)||isNaN(r.right)||(e.cachedPaddingH=r),r}function $e(e){return Wi-e.display.nativeBarWidth}function Xe(e){return e.display.scroller.clientWidth-$e(e)-e.display.barWidth}function Qe(e){return e.display.scroller.clientHeight-$e(e)-e.display.barHeight}function Ye(e,t,n,r){return Ze(e,Je(e,t),n,r)}function Ke(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[Mt(e,t)];var n=e.display.externalMeasured;return n&&t>=n.lineN&&t<n.lineN+n.size?n:void 0}function Je(e,t){var n=fi(t),r=Ke(e,n);r&&!r.text?r=null:r&&r.changes&&ee(e,r,n,Z(e)),r||(r=function(e,t){var n=fi(t=Nr(t)),r=e.display.externalMeasured=new Rt(e.doc,t,n);r.lineN=n;var i=r.built=$r(e,r);return r.text=i.pre,vo(e.display.lineMeasure,i.pre),r}(e,t));var i=function(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;r<e.rest.length;r++)if(e.rest[r]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(r=0;r<e.rest.length;r++)if(fi(e.rest[r])>n)return{map:e.measure.maps[r],cache:e.measure.caches[r],before:!0}}(r,t,n);return{line:t,view:r,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function Ze(e,t,n,o,a){t.before&&(n=-1);var s,l=n+(o||"");return t.cache.hasOwnProperty(l)?s=t.cache[l]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(function(e,t,n){var r=e.options.lineWrapping,i=r&&Xe(e);if(!t.measure.heights||r&&t.measure.width!=i){var o=t.measure.heights=[];if(r){t.measure.width=i;for(var a=t.text.firstChild.getClientRects(),s=0;s<a.length-1;s++){var l=a[s],u=a[s+1];Math.abs(l.bottom-u.bottom)>2&&o.push((l.bottom+u.top)/2-n.top)}}o.push(n.bottom-n.top)}}(e,t.view,t.rect),t.hasHeights=!0),(s=function(e,t,n,o){for(var a,s,l,u,c,d=t.map,p=0;p<d.length;p+=3){var f=d[p],h=d[p+1];if(n<f?(s=0,l=1,u="left"):n<h?l=1+(s=n-f):(p==d.length-3||n==h&&d[p+3]>n)&&(s=(l=h-f)-1,n>=h&&(u="right")),null!=s){if(a=d[p+2],f==h&&o==(a.insertLeft?"left":"right")&&(u=o),"left"==o&&0==s)for(;p&&d[p-2]==d[p-3]&&d[p-1].insertLeft;)a=d[2+(p-=3)],u="left";if("right"==o&&s==h-f)for(;p<d.length-3&&d[p+3]==d[p+4]&&!d[p+5].insertLeft;)a=d[(p+=3)+2],u="right";break}}if(3==a.nodeType){for(p=0;p<4;p++){for(;s&&ho(t.line.text.charAt(f+s));)--s;for(;f+l<h&&ho(t.line.text.charAt(f+l));)++l;if(r&&i<9&&0==s&&l==h-f)c=a.parentNode.getBoundingClientRect();else if(r&&e.options.lineWrapping){var g=po(a,s,l).getClientRects();c=g.length?g["right"==o?g.length-1:0]:tt}else c=po(a,s,l).getBoundingClientRect()||tt;if(c.left||c.right||0==s)break;l=s,s-=1,u="right"}r&&i<11&&(c=function(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!function(e){if(null!=Po)return Po;var t=vo(e,go("span","x")),n=t.getBoundingClientRect(),r=po(t,0,1).getBoundingClientRect();return Po=Math.abs(n.left-r.left)>1}(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}(e.display.measure,c))}else s>0&&(u=o="right"),c=e.options.lineWrapping&&(g=a.getClientRects()).length>1?g["right"==o?g.length-1:0]:a.getBoundingClientRect();if(r&&i<9&&!s&&(!c||!c.left&&!c.right)){var m=a.parentNode.getClientRects()[0];c=m?{left:m.left,right:m.left+mt(e.display),top:m.top,bottom:m.bottom}:tt}var v=c.top-t.rect.top,y=c.bottom-t.rect.top,x=(v+y)/2,b=t.view.measure.heights;for(p=0;p<b.length-1&&!(x<b[p]);p++);var E=p?b[p-1]:0,C=b[p],T={left:("right"==u?c.right:c.left)-t.rect.left,right:("left"==u?c.left:c.right)-t.rect.left,top:E,bottom:C};return c.left||c.right||(T.bogus=!0),e.options.singleCursorHeightPerLine||(T.rtop=v,T.rbottom=y),T}(e,t,n,o)).bogus||(t.cache[l]=s)),{left:s.left,right:s.right,top:a?s.rtop:s.top,bottom:a?s.rbottom:s.bottom}}me.prototype={primary:function(){return this.ranges[this.primIndex]},equals:function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var n=this.ranges[t],r=e.ranges[t];if(0!=pe(n.anchor,r.anchor)||0!=pe(n.head,r.head))return!1}return!0},deepCopy:function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new ve(fe(this.ranges[t].anchor),fe(this.ranges[t].head));return new me(e,this.primIndex)},somethingSelected:function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},contains:function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(pe(t,r.from())>=0&&pe(e,r.to())<=0)return n}return-1}},ve.prototype={from:function(){return ge(this.anchor,this.head)},to:function(){return he(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}};var et,tt={left:0,right:0,top:0,bottom:0};function nt(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function rt(e){e.display.externalMeasure=null,mo(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)nt(e.display.view[t])}function it(e){rt(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function ot(){return window.pageXOffset||(document.documentElement||document.body).scrollLeft}function at(){return window.pageYOffset||(document.documentElement||document.body).scrollTop}function st(e,t,n,r){if(t.widgets)for(var i=0;i<t.widgets.length;++i)if(t.widgets[i].above){var o=Or(t.widgets[i]);n.top+=o,n.bottom+=o}if("line"==r)return n;r||(r="local");var a=gi(t);if("local"==r?a+=We(e.display):a-=e.display.viewOffset,"page"==r||"window"==r){var s=e.display.lineSpace.getBoundingClientRect();a+=s.top+("window"==r?0:at());var l=s.left+("window"==r?0:ot());n.left+=l,n.right+=l}return n.top+=a,n.bottom+=a,n}function lt(e,t,n){if("div"==n)return t;var r=t.left,i=t.top;if("page"==n)r-=ot(),i-=at();else if("local"==n||!n){var o=e.display.sizer.getBoundingClientRect();r+=o.left,i+=o.top}var a=e.display.lineSpace.getBoundingClientRect();return{left:r-a.left,top:i-a.top}}function ut(e,t,n,r,i){return r||(r=ui(e.doc,t.line)),st(e,r,Ye(e,r,t.ch,i),n)}function ct(e,t,n,r,i,o){function a(t,a){var s=Ze(e,i,t,a?"right":"left",o);return a?s.left=s.right:s.right=s.left,st(e,r,s,n)}function s(e,t){var n=l[t],r=n.level%2;return e==jo(n)&&t&&n.level<l[t-1].level?(e=Bo(n=l[--t])-(n.level%2?0:1),r=!0):e==Bo(n)&&t<l.length-1&&n.level<l[t+1].level&&(e=jo(n=l[++t])-n.level%2,r=!1),r&&e==n.to&&e>n.from?a(e-1):a(e,r)}r=r||ui(e.doc,t.line),i||(i=Je(e,r));var l=mi(r),u=t.ch;if(!l)return a(u);var c=s(u,qo(l,u));return null!=_o&&(c.other=s(u,_o)),c}function dt(e,t){var n=0;t=Ee(e.doc,t),e.options.lineWrapping||(n=mt(e.display)*t.ch);var r=ui(e.doc,t.line),i=gi(r)+We(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function pt(e,t,n,r){var i=de(e,t);return i.xRel=r,n&&(i.outside=!0),i}function ft(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return pt(r.first,0,!0,-1);var i=hi(r,n),o=r.first+r.size-1;if(i>o)return pt(r.first+r.size-1,ui(r,o).text.length,!0,1);t<0&&(t=0);for(var a=ui(r,i);;){var s=ht(e,a,i,t,n),l=Sr(a),u=l&&l.find(0,!0);if(!l||!(s.ch>u.from.ch||s.ch==u.from.ch&&s.xRel>0))return s;i=fi(a=u.to.line)}}function ht(e,t,n,r,i){var o=i-gi(t),a=!1,s=2*e.display.wrapper.clientWidth,l=Je(e,t);function u(r){var i=ct(e,de(n,r),"line",t,l);return a=!0,o>i.bottom?i.left-s:o<i.top?i.left+s:(a=!1,i.left)}var c=mi(t),d=t.text.length,p=Ho(t),f=Go(t),h=u(p),g=a,m=u(f),v=a;if(r>m)return pt(n,f,v,1);for(;;){if(c?f==p||f==$o(t,p,1):f-p<=1){for(var y=r<h||r-h<=m-r?p:f,x=r-(y==p?h:m);ho(t.text.charAt(y));)++y;return pt(n,y,y==p?g:v,x<-1?-1:x>1?1:0)}var b=Math.ceil(d/2),E=p+b;if(c){E=p;for(var C=0;C<b;++C)E=$o(t,E,1)}var T=u(E);T>r?(f=E,m=T,(v=a)&&(m+=1e3),d=b):(p=E,h=T,g=a,d-=b)}}function gt(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==et){et=go("pre");for(var t=0;t<49;++t)et.appendChild(document.createTextNode("x")),et.appendChild(go("br"));et.appendChild(document.createTextNode("x"))}vo(e.measure,et);var n=et.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),mo(e.measure),n||1}function mt(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=go("span","xxxxxxxxxx"),n=go("pre",[t]);vo(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}var vt=null,yt=0;function xt(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,id:++yt},vt?vt.ops.push(e.curOp):e.curOp.ownsGroup=vt={ops:[e.curOp],delayedCallbacks:[]}}function bt(e){var t=e.curOp.ownsGroup;if(t)try{!function(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n]();for(var r=0;r<e.ops.length;r++){var i=e.ops[r];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++](i.cm)}}while(n<t.length)}(t)}finally{vt=null;for(var n=0;n<t.ops.length;n++)t.ops[n].cm.curOp=null;!function(e){for(var t=e.ops,n=0;n<t.length;n++)Et(t[n]);for(n=0;n<t.length;n++)Ct(t[n]);for(n=0;n<t.length;n++)Tt(t[n]);for(n=0;n<t.length;n++)St(t[n]);for(n=0;n<t.length;n++)wt(t[n])}(t)}}function Et(e){var t=e.cm,n=t.display;!function(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=$e(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=$e(e)+"px",t.scrollbarsClipped=!0)}(t),e.updateMaxLine&&O(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new z(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Ct(e){e.updatedDisplay=e.mustUpdate&&$(e.cm,e.update)}function Tt(e){var t=e.cm,n=t.display;e.updatedDisplay&&K(t),e.barMeasure=M(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Ye(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+$e(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Xe(t))),(e.updatedDisplay||e.selectionChanged)&&(e.newSelectionNodes=Me(t))}function St(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&rn(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1),e.newSelectionNodes&&Pe(t,e.newSelectionNodes),e.updatedDisplay&&Y(t,e.barMeasure),(e.updatedDisplay||e.startHeight!=t.doc.height)&&B(t,e.barMeasure),e.selectionChanged&&He(t),t.state.focused&&e.updateInput&&Wt(t,e.typing)}function wt(e){var t=e.cm,n=t.display,r=t.doc;if(e.updatedDisplay&&X(t,e.update),null==n.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(n.wheelStartX=n.wheelStartY=null),null==e.scrollTop||n.scroller.scrollTop==e.scrollTop&&!e.forceScroll||(r.scrollTop=Math.max(0,Math.min(n.scroller.scrollHeight-n.scroller.clientHeight,e.scrollTop)),n.scrollbars.setScrollTop(r.scrollTop),n.scroller.scrollTop=r.scrollTop),null==e.scrollLeft||n.scroller.scrollLeft==e.scrollLeft&&!e.forceScroll||(r.scrollLeft=Math.max(0,Math.min(n.scroller.scrollWidth-Xe(t),e.scrollLeft)),n.scrollbars.setScrollLeft(r.scrollLeft),n.scroller.scrollLeft=r.scrollLeft,U(t)),e.scrollToPos){var i=function(e,t,n,r){null==r&&(r=0);for(var i=0;i<5;i++){var o=!1,a=ct(e,t),s=n&&n!=t?ct(e,n):a,l=kn(e,Math.min(a.left,s.left),Math.min(a.top,s.top)-r,Math.max(a.left,s.left),Math.max(a.bottom,s.bottom)+r),u=e.doc.scrollTop,c=e.doc.scrollLeft;if(null!=l.scrollTop&&(nn(e,l.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(o=!0)),null!=l.scrollLeft&&(rn(e,l.scrollLeft),Math.abs(e.doc.scrollLeft-c)>1&&(o=!0)),!o)break}return a}(t,Ee(r,e.scrollToPos.from),Ee(r,e.scrollToPos.to),e.scrollToPos.margin);e.scrollToPos.isCursor&&t.state.focused&&function(e,t){if(!Hi(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null;if(t.top+r.top<0?i=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!p){var o=go("div","",null,"position: absolute; top: "+(t.top-n.viewOffset-We(e.display))+"px; height: "+(t.bottom-t.top+$e(e)+n.barHeight)+"px; left: "+t.left+"px; width: 2px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}(t,i)}var o=e.maybeHiddenMarkers,a=e.maybeUnhiddenMarkers;if(o)for(var s=0;s<o.length;++s)o[s].lines.length||Pi(o[s],"hide");if(a)for(s=0;s<a.length;++s)a[s].lines.length&&Pi(a[s],"unhide");n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Pi(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Nt(e,t){if(e.curOp)return t();xt(e);try{return t()}finally{bt(e)}}function Lt(e,t){return function(){if(e.curOp)return t.apply(e,arguments);xt(e);try{return t.apply(e,arguments)}finally{bt(e)}}}function At(e){return function(){if(this.curOp)return e.apply(this,arguments);xt(this);try{return e.apply(this,arguments)}finally{bt(this)}}}function It(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);xt(t);try{return e.apply(this,arguments)}finally{bt(t)}}}function Rt(e,t,n){this.line=t,this.rest=function(e){for(var t,n;t=Sr(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}(t),this.size=this.rest?fi(eo(this.rest))-n+1:1,this.node=this.text=null,this.hidden=Ir(e,t)}function kt(e,t,n){for(var r,i=[],o=t;o<n;o=r){var a=new Rt(e.doc,ui(e.doc,o),o);r=o+a.size,i.push(a)}return i}function _t(e,t,n,r){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),r||(r=0);var i=e.display;if(r&&n<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)E&&Lr(e.doc,t)<i.viewTo&&Dt(e);else if(n<=i.viewFrom)E&&Ar(e.doc,n+r)>i.viewFrom?Dt(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)Dt(e);else if(t<=i.viewFrom)(o=Pt(e,n,n+r,1))?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):Dt(e);else if(n>=i.viewTo){var o;(o=Pt(e,t,t,-1))?(i.view=i.view.slice(0,o.index),i.viewTo=o.lineN):Dt(e)}else{var a=Pt(e,t,t,-1),s=Pt(e,n,n+r,1);a&&s?(i.view=i.view.slice(0,a.index).concat(kt(e,a.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=r):Dt(e)}var l=i.externalMeasured;l&&(n<l.lineN?l.lineN+=r:t<l.lineN+l.size&&(i.externalMeasured=null))}function Ot(e,t,n){e.curOp.viewChanged=!0;var r=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(r.externalMeasured=null),!(t<r.viewFrom||t>=r.viewTo)){var o=r.view[Mt(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==no(a,n)&&a.push(n)}}}function Dt(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Mt(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;r<n.length;r++)if((t-=n[r].size)<0)return r}function Pt(e,t,n,r){var i,o=Mt(e,t),a=e.display.view;if(!E||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var s=0,l=e.display.viewFrom;s<o;s++)l+=a[s].size;if(l!=t){if(r>0){if(o==a.length-1)return null;i=l+a[o].size-t,o++}else i=l-t;t+=i,n+=i}for(;Lr(e.doc,n)!=n;){if(o==(r<0?0:a.length-1))return null;n+=r*a[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function Ft(e){for(var t=e.display.view,n=0,r=0;r<t.length;r++){var i=t[r];i.hidden||i.node&&!i.changes||++n}return n}function jt(e){e.display.pollingFast||e.display.poll.set(e.options.pollInterval,(function(){Vt(e),e.state.focused&&jt(e)}))}function Bt(e){var t=!1;e.display.pollingFast=!0,e.display.poll.set(20,(function n(){Vt(e)||t?(e.display.pollingFast=!1,jt(e)):(t=!0,e.display.poll.set(60,n))}))}var Ht,Gt,Ut=null;function Vt(e){var t=e.display.input,n=e.display.prevInput,o=e.doc;if(!e.state.focused||Do(t)&&!n||$t(e)||e.options.disableInput||e.state.keySeq)return!1;e.state.pasteIncoming&&e.state.fakedLastChar&&(t.value=t.value.substring(0,t.value.length-1),e.state.fakedLastChar=!1);var a=t.value;if(a==n&&!e.somethingSelected())return!1;if(r&&i>=9&&e.display.inputHasSelection===a||g&&/[\uf700-\uf7ff]/.test(a))return Wt(e),!1;var s=!e.curOp;s&&xt(e),e.display.shift=!1,8203!=a.charCodeAt(0)||o.sel!=e.display.selForContextMenu||n||(n="");for(var l=0,u=Math.min(n.length,a.length);l<u&&n.charCodeAt(l)==a.charCodeAt(l);)++l;var c=a.slice(l),d=Oo(c),p=null;e.state.pasteIncoming&&o.sel.ranges.length>1&&(Ut&&Ut.join("\n")==c?p=o.sel.ranges.length%Ut.length==0&&ro(Ut,Oo):d.length==o.sel.ranges.length&&(p=ro(d,(function(e){return[e]}))));for(var f=o.sel.ranges.length-1;f>=0;f--){var h=o.sel.ranges[f],m=h.from(),v=h.to();l<n.length?m=de(m.line,m.ch-(n.length-l)):e.state.overwrite&&h.empty()&&!e.state.pasteIncoming&&(v=de(v.line,Math.min(ui(o,v.line).text.length,v.ch+eo(d).length)));var y=e.curOp.updateInput,x={from:m,to:v,text:p?p[f%p.length]:d,origin:e.state.pasteIncoming?"paste":e.state.cutIncoming?"cut":"+input"};if(wn(e.doc,x),ji(e,"inputRead",e,x),c&&!e.state.pasteIncoming&&e.options.electricChars&&e.options.smartIndent&&h.head.ch<100&&(!f||o.sel.ranges[f-1].head.line!=h.head.line)){var b=e.getModeAt(h.head),E=bn(x);if(b.electricChars){for(var C=0;C<b.electricChars.length;C++)if(c.indexOf(b.electricChars.charAt(C))>-1){Mn(e,E.line,"smart");break}}else b.electricInput&&b.electricInput.test(ui(o,E.line).text.slice(0,E.ch))&&Mn(e,E.line,"smart")}}return On(e),e.curOp.updateInput=y,e.curOp.typing=!0,a.length>1e3||a.indexOf("\n")>-1?t.value=e.display.prevInput="":e.display.prevInput=a,s&&bt(e),e.state.pasteIncoming=e.state.cutIncoming=!1,!0}function Wt(e,t){if(!e.display.contextMenuPending){var n,o,a=e.doc;if(e.somethingSelected()){e.display.prevInput="";var s=a.sel.primary(),l=(n=Mo&&(s.to().line-s.from().line>100||(o=e.getSelection()).length>1e3))?"-":o||e.getSelection();e.display.input.value=l,e.state.focused&&to(e.display.input),r&&i>=9&&(e.display.inputHasSelection=l)}else t||(e.display.prevInput=e.display.input.value="",r&&i>=9&&(e.display.inputHasSelection=null));e.display.inaccurateSelection=n}}function qt(e){if("nocursor"!=e.options.readOnly&&(!h||xo()!=e.display.input))try{e.display.input.focus()}catch(e){}}function zt(e){e.state.focused||(qt(e),vn(e))}function $t(e){return e.options.readOnly||e.doc.cantEdit}function Xt(e){var t=e.display;t.lastWrapHeight==t.wrapper.clientHeight&&t.lastWrapWidth==t.wrapper.clientWidth||(t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize())}function Qt(e,t){for(var n=_i(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function Yt(e,t,n,r){var i=e.display;if(!n&&"true"==_i(t).getAttribute("not-content"))return null;var o,a,s=i.lineSpace.getBoundingClientRect();try{o=t.clientX-s.left,a=t.clientY-s.top}catch(t){return null}var l,u=ft(e,o,a);if(r&&1==u.xRel&&(l=ui(e.doc,u.line).text).length==u.ch){var c=Yi(l,l.length,e.options.tabSize)-l.length;u=de(u.line,Math.max(0,Math.round((o-ze(e.display).left)/mt(e.display))-c))}return u}function Kt(e){if(!Hi(this,e)){var t=this,n=t.display;if(n.shift=e.shiftKey,Qt(n,e))o||(n.scroller.draggable=!1,setTimeout((function(){n.scroller.draggable=!0}),100));else if(!Zt(t,e)){var a=Yt(t,e);switch(window.focus(),Oi(e)){case 1:a?function(e,t,n){setTimeout(ao(zt,e),0);var a,s=+new Date;Gt&&Gt.time>s-400&&0==pe(Gt.pos,n)?a="triple":Ht&&Ht.time>s-400&&0==pe(Ht.pos,n)?(a="double",Gt={time:s,pos:n}):(a="single",Ht={time:s,pos:n});var l,u=e.doc.sel,c=g?t.metaKey:t.ctrlKey;e.options.dragDrop&&Ao&&!$t(e)&&"single"==a&&(l=u.contains(n))>-1&&!u.ranges[l].empty()?function(e,t,n,a){var s=e.display,l=Lt(e,(function(u){o&&(s.scroller.draggable=!1),e.state.draggingText=!1,Mi(document,"mouseup",l),Mi(s.scroller,"drop",l),Math.abs(t.clientX-u.clientX)+Math.abs(t.clientY-u.clientY)<10&&(Ai(u),a||Se(e.doc,n),qt(e),r&&9==i&&setTimeout((function(){document.body.focus(),qt(e)}),20))}));o&&(s.scroller.draggable=!0),e.state.draggingText=l,s.scroller.dragDrop&&s.scroller.dragDrop(),Di(document,"mouseup",l),Di(s.scroller,"drop",l)}(e,t,n,c):function(e,t,n,r,i){var o=e.display,a=e.doc;Ai(t);var s,l,u=a.sel,c=u.ranges;if(i&&!t.shiftKey?(l=a.sel.contains(n),s=l>-1?c[l]:new ve(n,n)):s=a.sel.primary(),t.altKey)r="rect",i||(s=new ve(n,n)),n=Yt(e,t,!0,!0),l=-1;else if("double"==r){var d=e.findWordAt(n);s=e.display.shift||a.extend?Te(a,s,d.anchor,d.head):d}else if("triple"==r){var p=new ve(de(n.line,0),Ee(a,de(n.line+1,0)));s=e.display.shift||a.extend?Te(a,s,p.anchor,p.head):p}else s=Te(a,s,n);i?-1==l?(l=c.length,Ie(a,ye(c.concat([s]),l),{scroll:!1,origin:"*mouse"})):c.length>1&&c[l].empty()&&"single"==r?(Ie(a,ye(c.slice(0,l).concat(c.slice(l+1)),0)),u=a.sel):Ne(a,l,s,$i):(l=0,Ie(a,new me([s],0),$i),u=a.sel);var f=n,h=o.wrapper.getBoundingClientRect(),g=0;function m(t){var i=++g,c=Yt(e,t,!0,"rect"==r);if(c)if(0!=pe(c,f)){zt(e),function(t){if(0!=pe(f,t))if(f=t,"rect"==r){for(var i=[],o=e.options.tabSize,c=Yi(ui(a,n.line).text,n.ch,o),d=Yi(ui(a,t.line).text,t.ch,o),p=Math.min(c,d),h=Math.max(c,d),g=Math.min(n.line,t.line),m=Math.min(e.lastLine(),Math.max(n.line,t.line));g<=m;g++){var v=ui(a,g).text,y=Ki(v,p,o);p==h?i.push(new ve(de(g,y),de(g,y))):v.length>y&&i.push(new ve(de(g,y),de(g,Ki(v,h,o))))}i.length||i.push(new ve(n,n)),Ie(a,ye(u.ranges.slice(0,l).concat(i),l),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var x=s,b=x.anchor,E=t;if("single"!=r){if("double"==r)var C=e.findWordAt(t);else C=new ve(de(t.line,0),Ee(a,de(t.line+1,0)));pe(C.anchor,b)>0?(E=C.head,b=ge(x.from(),C.anchor)):(E=C.anchor,b=he(x.to(),C.head))}(i=u.ranges.slice(0))[l]=new ve(Ee(a,b),E),Ie(a,ye(i,l),$i)}}(c);var d=G(o,a);(c.line>=d.to||c.line<d.from)&&setTimeout(Lt(e,(function(){g==i&&m(t)})),150)}else{var p=t.clientY<h.top?-20:t.clientY>h.bottom?20:0;p&&setTimeout(Lt(e,(function(){g==i&&(o.scroller.scrollTop+=p,m(t))})),50)}}function v(t){g=1/0,Ai(t),qt(e),Mi(document,"mousemove",y),Mi(document,"mouseup",x),a.history.lastSelOrigin=null}var y=Lt(e,(function(e){Oi(e)?m(e):v(e)})),x=Lt(e,v);Di(document,"mousemove",y),Di(document,"mouseup",x)}(e,t,n,a,c)}(t,e,a):_i(e)==n.scroller&&Ai(e);break;case 2:o&&(t.state.lastMiddleDown=+new Date),a&&Se(t.doc,a),setTimeout(ao(qt,t),20),Ai(e);break;case 3:x&&xn(t,e)}}}}function Jt(e,t,n,r,i){try{var o=t.clientX,a=t.clientY}catch(t){return!1}if(o>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&Ai(t);var s=e.display,l=s.lineDiv.getBoundingClientRect();if(a>l.bottom||!Ui(e,n))return Ri(t);a-=l.top-s.viewOffset;for(var u=0;u<e.options.gutters.length;++u){var c=s.gutters.childNodes[u];if(c&&c.getBoundingClientRect().right>=o)return i(e,n,e,hi(e.doc,a),e.options.gutters[u],t),Ri(t)}}function Zt(e,t){return Jt(e,t,"gutterClick",!0,ji)}var en=0;function tn(e){var t=this;if(!Hi(t,e)&&!Qt(t.display,e)){Ai(e),r&&(en=+new Date);var n=Yt(t,e,!0),i=e.dataTransfer.files;if(n&&!$t(t))if(i&&i.length&&window.FileReader&&window.File)for(var o=i.length,a=Array(o),s=0,l=function(e,r){var i=new FileReader;i.onload=Lt(t,(function(){if(a[r]=i.result,++s==o){var e={from:n=Ee(t.doc,n),to:n,text:Oo(a.join("\n")),origin:"paste"};wn(t.doc,e),Ae(t.doc,xe(n,bn(e)))}})),i.readAsText(e)},u=0;u<o;++u)l(i[u],u);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1)return t.state.draggingText(e),void setTimeout(ao(qt,t),20);try{if(a=e.dataTransfer.getData("Text")){if(t.state.draggingText&&!(g?e.metaKey:e.ctrlKey))var c=t.listSelections();if(Re(t.doc,xe(n,n)),c)for(u=0;u<c.length;++u)Rn(t.doc,"",c[u].anchor,c[u].head,"drag");t.replaceSelection(a,"around","paste"),qt(t)}}catch(e){}}}}function nn(t,n){Math.abs(t.doc.scrollTop-n)<2||(t.doc.scrollTop=n,e||Q(t,{top:n}),t.display.scroller.scrollTop!=n&&(t.display.scroller.scrollTop=n),t.display.scrollbars.setScrollTop(n),e&&Q(t),Ge(t,100))}function rn(e,t,n){(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)||(t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),e.doc.scrollLeft=t,U(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}var on=0,an=null;r?an=-.53:e?an=15:s?an=-.7:u&&(an=-1/3);var sn=function(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}};function ln(t,n){var r=sn(n),i=r.x,a=r.y,s=t.display,u=s.scroller;if(i&&u.scrollWidth>u.clientWidth||a&&u.scrollHeight>u.clientHeight){if(a&&g&&o)e:for(var c=n.target,d=s.view;c!=u;c=c.parentNode)for(var p=0;p<d.length;p++)if(d[p].node==c){t.display.currentWheelTarget=c;break e}if(i&&!e&&!l&&null!=an)return a&&nn(t,Math.max(0,Math.min(u.scrollTop+a*an,u.scrollHeight-u.clientHeight))),rn(t,Math.max(0,Math.min(u.scrollLeft+i*an,u.scrollWidth-u.clientWidth))),Ai(n),void(s.wheelStartX=null);if(a&&null!=an){var f=a*an,h=t.doc.scrollTop,m=h+s.wrapper.clientHeight;f<0?h=Math.max(0,h+f-50):m=Math.min(t.doc.height,m+f+50),Q(t,{top:h,bottom:m})}on<20&&(null==s.wheelStartX?(s.wheelStartX=u.scrollLeft,s.wheelStartY=u.scrollTop,s.wheelDX=i,s.wheelDY=a,setTimeout((function(){if(null!=s.wheelStartX){var e=u.scrollLeft-s.wheelStartX,t=u.scrollTop-s.wheelStartY,n=t&&s.wheelDY&&t/s.wheelDY||e&&s.wheelDX&&e/s.wheelDX;s.wheelStartX=s.wheelStartY=null,n&&(an=(an*on+n)/(on+1),++on)}}),200)):(s.wheelDX+=i,s.wheelDY+=a))}}function un(e,t,n){if("string"==typeof t&&!(t=Kn[t]))return!1;e.display.pollingFast&&Vt(e)&&(e.display.pollingFast=!1);var r=e.display.shift,i=!1;try{$t(e)&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=qi}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}C.wheelEventPixels=function(e){var t=sn(e);return t.x*=an,t.y*=an,t};var cn=new Qi;function dn(e,t,n,r){var i=e.state.keySeq;if(i){if(tr(t))return"handled";cn.set(50,(function(){e.state.keySeq==i&&(e.state.keySeq=null,Wt(e))})),t=i+" "+t}var o=function(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var i=er(t,e.state.keyMaps[r],n,e);if(i)return i}return e.options.extraKeys&&er(t,e.options.extraKeys,n,e)||er(t,e.options.keyMap,n,e)}(e,t,r);return"multi"==o&&(e.state.keySeq=t),"handled"==o&&ji(e,"keyHandled",e,t,n),"handled"!=o&&"multi"!=o||(Ai(n),He(e)),i&&!o&&/\'$/.test(t)?(Ai(n),!0):!!o}function pn(e,t){var n=nr(t,!0);return!!n&&(t.shiftKey&&!e.state.keySeq?dn(e,"Shift-"+n,t,(function(t){return un(e,t,!0)}))||dn(e,n,t,(function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return un(e,t)})):dn(e,n,t,(function(t){return un(e,t)})))}var fn=null;function hn(e){var t=this;if(zt(t),!Hi(t,e)){r&&i<11&&27==e.keyCode&&(e.returnValue=!1);var n=e.keyCode;t.display.shift=16==n||e.shiftKey;var o=pn(t,e);l&&(fn=o?n:null,o||88!=n||Mo||!(g?e.metaKey:e.ctrlKey)||t.replaceSelection("",null,"cut")),18!=n||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||function(e){var t=e.display.lineDiv;function n(e){18!=e.keyCode&&e.altKey||(Eo(t,"CodeMirror-crosshair"),Mi(document,"keyup",n),Mi(document,"mouseover",n))}Co(t,"CodeMirror-crosshair"),Di(document,"keyup",n),Di(document,"mouseover",n)}(t)}}function gn(e){16==e.keyCode&&(this.doc.sel.shift=!1),Hi(this,e)}function mn(e){var t=this;if(!(Hi(t,e)||e.ctrlKey&&!e.altKey||g&&e.metaKey)){var n=e.keyCode,o=e.charCode;if(l&&n==fn)return fn=null,void Ai(e);(l&&(!e.which||e.which<10)||c)&&pn(t,e)||function(e,t,n){return dn(e,"'"+n+"'",t,(function(t){return un(e,t,!0)}))}(t,e,String.fromCharCode(null==o?n:o))||(r&&i>=9&&(t.display.inputHasSelection=null),Bt(t))}}function vn(e){"nocursor"!=e.options.readOnly&&(e.state.focused||(Pi(e,"focus",e),e.state.focused=!0,Co(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(Wt(e),o&&setTimeout(ao(Wt,e,!0),0))),jt(e),He(e))}function yn(e){e.state.focused&&(Pi(e,"blur",e),e.state.focused=!1,Eo(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150)}function xn(e,t){if(!Hi(e,t,"contextmenu")){var n=e.display;if(!Qt(n,t)&&!function(e,t){return!!Ui(e,"gutterContextMenu")&&Jt(e,t,"gutterContextMenu",!1,Pi)}(e,t)){var a=Yt(e,t),s=n.scroller.scrollTop;if(a&&!l){e.options.resetSelectionOnContextMenu&&-1==e.doc.sel.contains(a)&&Lt(e,Ie)(e.doc,xe(a),zi);var u=n.input.style.cssText;if(n.inputDiv.style.position="absolute",n.input.style.cssText="position: fixed; width: 30px; height: 30px; top: "+(t.clientY-5)+"px; left: "+(t.clientX-5)+"px; z-index: 1000; background: "+(r?"rgba(255, 255, 255, .05)":"transparent")+"; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",o)var c=window.scrollY;if(qt(e),o&&window.scrollTo(null,c),Wt(e),e.somethingSelected()||(n.input.value=n.prevInput=" "),n.contextMenuPending=!0,n.selForContextMenu=e.doc.sel,clearTimeout(n.detectingSelectAll),r&&i>=9&&p(),x){ki(t);var d=function(){Mi(window,"mouseup",d),setTimeout(f,20)};Di(window,"mouseup",d)}else setTimeout(f,50)}}}function p(){if(null!=n.input.selectionStart){var t=e.somethingSelected(),r=n.input.value=""+(t?n.input.value:"");n.prevInput=t?"":"",n.input.selectionStart=1,n.input.selectionEnd=r.length,n.selForContextMenu=e.doc.sel}}function f(){if(n.contextMenuPending=!1,n.inputDiv.style.position="relative",n.input.style.cssText=u,r&&i<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=s),jt(e),null!=n.input.selectionStart){(!r||r&&i<9)&&p();var t=0,o=function(){n.selForContextMenu==e.doc.sel&&0==n.input.selectionStart?Lt(e,Kn.selectAll)(e):t++<10?n.detectingSelectAll=setTimeout(o,500):Wt(e)};n.detectingSelectAll=setTimeout(o,200)}}}var bn=C.changeEnd=function(e){return e.text?de(e.from.line+e.text.length-1,eo(e.text).length+(1==e.text.length?e.from.ch:0)):e.to};function En(e,t){if(pe(e,t.from)<0)return e;if(pe(e,t.to)<=0)return bn(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=bn(t).ch-t.to.ch),de(n,r)}function Cn(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var i=e.sel.ranges[r];n.push(new ve(En(i.anchor,t),En(i.head,t)))}return ye(n,e.sel.primIndex)}function Tn(e,t,n){return e.line==t.line?de(n.line,e.ch-t.ch+n.ch):de(n.line+(e.line-t.line),e.ch)}function Sn(e,t,n){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){this.canceled=!0}};return n&&(r.update=function(t,n,r,i){t&&(this.from=Ee(e,t)),n&&(this.to=Ee(e,n)),r&&(this.text=r),void 0!==i&&(this.origin=i)}),Pi(e,"beforeChange",e,r),e.cm&&Pi(e.cm,"beforeChange",e.cm,r),r.canceled?null:{from:r.from,to:r.to,text:r.text,origin:r.origin}}function wn(e,t,n){if(e.cm){if(!e.cm.curOp)return Lt(e.cm,wn)(e,t,n);if(e.cm.state.suppressEdits)return}if(!(Ui(e,"beforeChange")||e.cm&&Ui(e.cm,"beforeChange"))||(t=Sn(e,t,!0))){var r=b&&!n&&function(e,t,n){var r=null;if(e.iter(t.line,n.line+1,(function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var n=e.markedSpans[t].marker;!n.readOnly||r&&-1!=no(r,n)||(r||(r=[])).push(n)}})),!r)return null;for(var i=[{from:t,to:n}],o=0;o<r.length;++o)for(var a=r[o],s=a.find(0),l=0;l<i.length;++l){var u=i[l];if(!(pe(u.to,s.from)<0||pe(u.from,s.to)>0)){var c=[l,1],d=pe(u.from,s.from),p=pe(u.to,s.to);(d<0||!a.inclusiveLeft&&!d)&&c.push({from:u.from,to:s.from}),(p>0||!a.inclusiveRight&&!p)&&c.push({from:s.to,to:u.to}),i.splice.apply(i,c),l+=c.length-1}}return i}(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)Nn(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text});else Nn(e,t)}}function Nn(e,t){if(1!=t.text.length||""!=t.text[0]||0!=pe(t.from,t.to)){var n=Cn(e,t);bi(e,t,n,e.cm?e.cm.curOp.id:NaN),In(e,t,n,hr(e,t));var r=[];si(e,(function(e,n){n||-1!=no(r,e.history)||(Li(e.history,t),r.push(e.history)),In(e,t,null,hr(e,t))}))}}function Ln(e,t,n){if(!e.cm||!e.cm.state.suppressEdits){for(var r,i=e.history,o=e.sel,a="undo"==t?i.done:i.undone,s="undo"==t?i.undone:i.done,l=0;l<a.length&&(r=a[l],n?!r.ranges||r.equals(e.sel):r.ranges);l++);if(l!=a.length){for(i.lastOrigin=i.lastSelOrigin=null;(r=a.pop()).ranges;){if(Ei(r,s),n&&!r.equals(e.sel))return void Ie(e,r,{clearRedo:!1});o=r}var u=[];Ei(o,s),s.push({changes:u,generation:i.generation}),i.generation=r.generation||++i.maxGeneration;var c=Ui(e,"beforeChange")||e.cm&&Ui(e.cm,"beforeChange");for(l=r.changes.length-1;l>=0;--l){var d=r.changes[l];if(d.origin=t,c&&!Sn(e,d,!1))return void(a.length=0);u.push(yi(e,d));var p=l?Cn(e,d):eo(a);In(e,d,p,mr(e,d)),!l&&e.cm&&e.cm.scrollIntoView({from:d.from,to:bn(d)});var f=[];si(e,(function(e,t){t||-1!=no(f,e.history)||(Li(e.history,d),f.push(e.history)),In(e,d,null,mr(e,d))}))}}}}function An(e,t){if(0!=t&&(e.first+=t,e.sel=new me(ro(e.sel.ranges,(function(e){return new ve(de(e.anchor.line+t,e.anchor.ch),de(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){_t(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)Ot(e.cm,r,"gutter")}}function In(e,t,n,r){if(e.cm&&!e.cm.curOp)return Lt(e.cm,In)(e,t,n,r);if(t.to.line<e.first)An(e,t.text.length-1-(t.to.line-t.from.line));else if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);An(e,i),t={from:de(e.first,0),to:de(t.to.line+i,t.to.ch),text:[eo(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:de(o,ui(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=ci(e,t.from,t.to),n||(n=Cn(e,t)),e.cm?function(e,t,n){var r=e.doc,i=e.display,o=t.from,a=t.to,s=!1,l=o.line;e.options.lineWrapping||(l=fi(Nr(ui(r,o.line))),r.iter(l,a.line+1,(function(e){if(e==i.maxLine)return s=!0,!0}))),r.sel.contains(t.from,t.to)>-1&&Gi(e),ei(r,t,n,N(e)),e.options.lineWrapping||(r.iter(l,o.line+t.text.length,(function(e){var t=_(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)})),s&&(e.curOp.updateMaxLine=!0)),r.frontier=Math.min(r.frontier,o.line),Ge(e,400);var u=t.text.length-(a.line-o.line)-1;t.full?_t(e):o.line!=a.line||1!=t.text.length||Zr(e.doc,t)?_t(e,o.line,a.line+1,u):Ot(e,o.line,"text");var c=Ui(e,"changes"),d=Ui(e,"change");if(d||c){var p={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};d&&ji(e,"change",e,p),c&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(p)}e.display.selForContextMenu=null}(e.cm,t,r):ei(e,t,r),Re(e,n,zi)}}function Rn(e,t,n,r,i){if(r||(r=n),pe(r,n)<0){var o=r;r=n,n=o}"string"==typeof t&&(t=Oo(t)),wn(e,{from:n,to:r,text:t,origin:i})}function kn(e,t,n,r,i){var o=e.display,a=gt(e.display);n<0&&(n=0);var s=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:o.scroller.scrollTop,l=Qe(e),u={};i-n>l&&(i=n+l);var c=e.doc.height+qe(o),d=n<a,p=i>c-a;if(n<s)u.scrollTop=d?0:n;else if(i>s+l){var f=Math.min(n,(p?c:i)-l);f!=s&&(u.scrollTop=f)}var h=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:o.scroller.scrollLeft,g=Xe(e)-(e.options.fixedGutter?o.gutters.offsetWidth:0),m=r-t>g;return m&&(r=t+g),t<10?u.scrollLeft=0:t<h?u.scrollLeft=Math.max(0,t-(m?0:10)):r>g+h-3&&(u.scrollLeft=r+(m?0:10)-g),u}function _n(e,t,n){null==t&&null==n||Dn(e),null!=t&&(e.curOp.scrollLeft=(null==e.curOp.scrollLeft?e.doc.scrollLeft:e.curOp.scrollLeft)+t),null!=n&&(e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+n)}function On(e){Dn(e);var t=e.getCursor(),n=t,r=t;e.options.lineWrapping||(n=t.ch?de(t.line,t.ch-1):t,r=de(t.line,t.ch+1)),e.curOp.scrollToPos={from:n,to:r,margin:e.options.cursorScrollMargin,isCursor:!0}}function Dn(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=dt(e,t.from),r=dt(e,t.to),i=kn(e,Math.min(n.left,r.left),Math.min(n.top,r.top)-t.margin,Math.max(n.right,r.right),Math.max(n.bottom,r.bottom)+t.margin);e.scrollTo(i.scrollLeft,i.scrollTop)}}function Mn(e,t,n,r){var i,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?i=Ve(e,t):n="prev");var a=e.options.tabSize,s=ui(o,t),l=Yi(s.text,null,a);s.stateAfter&&(s.stateAfter=null);var u,c=s.text.match(/^\s*/)[0];if(r||/\S/.test(s.text)){if("smart"==n&&((u=o.mode.indent(i,s.text.slice(c.length),s.text))==qi||u>150)){if(!r)return;n="prev"}}else u=0,n="not";"prev"==n?u=t>o.first?Yi(ui(o,t-1).text,null,a):0:"add"==n?u=l+e.options.indentUnit:"subtract"==n?u=l-e.options.indentUnit:"number"==typeof n&&(u=l+n),u=Math.max(0,u);var d="",p=0;if(e.options.indentWithTabs)for(var f=Math.floor(u/a);f;--f)p+=a,d+="\t";if(p<u&&(d+=Zi(u-p)),d!=c)Rn(o,d,de(t,0),de(t,c.length),"+input");else for(f=0;f<o.sel.ranges.length;f++){var h=o.sel.ranges[f];if(h.head.line==t&&h.head.ch<c.length){Ne(o,f,new ve(p=de(t,c.length),p));break}}s.stateAfter=null}function Pn(e,t,n,r){var i=t,o=t;return"number"==typeof t?o=ui(e,be(e,t)):i=fi(t),null==i?null:(r(o,i)&&e.cm&&Ot(e.cm,i,n),o)}function Fn(e,t){for(var n=e.doc.sel.ranges,r=[],i=0;i<n.length;i++){for(var o=t(n[i]);r.length&&pe(o.from,eo(r).to)<=0;){var a=r.pop();if(pe(a.from,o.from)<0){o.from=a.from;break}}r.push(o)}Nt(e,(function(){for(var t=r.length-1;t>=0;t--)Rn(e.doc,"",r[t].from,r[t].to,"+delete");On(e)}))}function jn(e,t,n,r,i){var o=t.line,a=t.ch,s=n,l=ui(e,o),u=!0;function c(t){var r,s=(i?$o:Xo)(l,a,n,!0);if(null==s){if(t||!((r=o+n)<e.first||r>=e.first+e.size?u=!1:(o=r,l=ui(e,r))))return u=!1;a=i?(n<0?Go:Ho)(l):n<0?l.text.length:0}else a=s;return!0}if("char"==r)c();else if("column"==r)c(!0);else if("word"==r||"group"==r)for(var d=null,p="group"==r,f=e.cm&&e.cm.getHelper(t,"wordChars"),h=!0;!(n<0)||c(!h);h=!1){var g=l.text.charAt(a)||"\n",m=uo(g,f)?"w":p&&"\n"==g?"n":!p||/\s/.test(g)?null:"p";if(!p||h||m||(m="s"),d&&d!=m){n<0&&(n=1,c());break}if(m&&(d=m),n>0&&!c(!h))break}var v=De(e,de(o,a),s,!0);return u||(v.hitSide=!0),v}function Bn(e,t,n,r){var i,o=e.doc,a=t.left;if("page"==r){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);i=t.top+n*(s-(n<0?1.5:.5)*gt(e.display))}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;;){var l=ft(e,a,i);if(!l.outside)break;if(n<0?i<=0:i>=o.height){l.hitSide=!0;break}i+=5*n}return l}C.prototype={constructor:C,focus:function(){window.focus(),qt(this),Bt(this)},setOption:function(e,t){var n=this.options,r=n[e];n[e]==t&&"mode"!=e||(n[e]=t,Gn.hasOwnProperty(e)&&Lt(this,Gn[e])(this,t,r))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](rr(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;n<t.length;++n)if(t[n]==e||t[n].name==e)return t.splice(n,1),!0},addOverlay:At((function(e,t){var n=e.token?e:C.getMode(this.options,e);if(n.startState)throw new Error("Overlays may not be stateful.");this.state.overlays.push({mode:n,modeSpec:e,opaque:t&&t.opaque}),this.state.modeGen++,_t(this)})),removeOverlay:At((function(e){for(var t=this.state.overlays,n=0;n<t.length;++n){var r=t[n].modeSpec;if(r==e||"string"==typeof e&&r.name==e)return t.splice(n,1),this.state.modeGen++,void _t(this)}})),indentLine:At((function(e,t,n){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),Ce(this.doc,e)&&Mn(this,e,t,n)})),indentSelection:At((function(e){for(var t=this.doc.sel.ranges,n=-1,r=0;r<t.length;r++){var i=t[r];if(i.empty())i.head.line>n&&(Mn(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&On(this));else{var o=i.from(),a=i.to(),s=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var l=s;l<n;++l)Mn(this,l,e);var u=this.doc.sel.ranges;0==o.ch&&t.length==u.length&&u[r].from().ch>0&&Ne(this.doc,r,new ve(o,u[r].to()),zi)}}})),getTokenAt:function(e,t){return Br(this,e,t)},getLineTokens:function(e,t){return Br(this,de(e),t,!0)},getTokenTypeAt:function(e){e=Ee(this.doc,e);var t,n=Ur(this,ui(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var a=r+i>>1;if((a?n[2*a-1]:0)>=o)i=a;else{if(!(n[2*a+1]<o)){t=n[2*a+2];break}r=a+1}}var s=t?t.indexOf("cm-overlay "):-1;return s<0?t:0==s?null:t.slice(0,s-1)},getModeAt:function(e){var t=this.doc.mode;return t.innerMode?C.innerMode(t,this.getTokenAt(e).state).mode:t},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var n=[];if(!Xn.hasOwnProperty(t))return Xn;var r=Xn[t],i=this.getModeAt(e);if("string"==typeof i[t])r[i[t]]&&n.push(r[i[t]]);else if(i[t])for(var o=0;o<i[t].length;o++){var a=r[i[t][o]];a&&n.push(a)}else i.helperType&&r[i.helperType]?n.push(r[i.helperType]):r[i.name]&&n.push(r[i.name]);for(o=0;o<r._global.length;o++){var s=r._global[o];s.pred(i,this)&&-1==no(n,s.val)&&n.push(s.val)}return n},getStateAfter:function(e,t){var n=this.doc;return Ve(this,(e=be(n,null==e?n.first+n.size-1:e))+1,t)},cursorCoords:function(e,t){var n=this.doc.sel.primary();return ct(this,null==e?n.head:"object"==typeof e?Ee(this.doc,e):e?n.from():n.to(),t||"page")},charCoords:function(e,t){return ut(this,Ee(this.doc,e),t||"page")},coordsChar:function(e,t){return ft(this,(e=lt(this,e,t||"page")).left,e.top)},lineAtHeight:function(e,t){return e=lt(this,{top:e,left:0},t||"page").top,hi(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t){var n=!1,r=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>r&&(e=r,n=!0);var i=ui(this.doc,e);return st(this,i,{top:0,left:0},t||"page").top+(n?this.doc.height-gi(i):0)},defaultTextHeight:function(){return gt(this.display)},defaultCharWidth:function(){return mt(this.display)},setGutterMarker:At((function(e,t,n){return Pn(this.doc,e,"gutter",(function(e){var r=e.gutterMarkers||(e.gutterMarkers={});return r[t]=n,!n&&co(r)&&(e.gutterMarkers=null),!0}))})),clearGutter:At((function(e){var t=this,n=t.doc,r=n.first;n.iter((function(n){n.gutterMarkers&&n.gutterMarkers[e]&&(n.gutterMarkers[e]=null,Ot(t,r,"gutter"),co(n.gutterMarkers)&&(n.gutterMarkers=null)),++r}))})),addLineWidget:At((function(e,t,n){return function(e,t,n,r){var i=new kr(e,n,r);return i.noHScroll&&(e.display.alignWidgets=!0),Pn(e.doc,t,"widget",(function(t){var n=t.widgets||(t.widgets=[]);if(null==i.insertAt?n.push(i):n.splice(Math.min(n.length-1,Math.max(0,i.insertAt)),0,i),i.line=t,!Ir(e.doc,t)){var r=gi(t)<e.doc.scrollTop;pi(t,t.height+Or(i)),r&&_n(e,null,i.height),e.curOp.forceUpdate=!0}return!0})),i}(this,e,t,n)})),removeLineWidget:function(e){e.clear()},lineInfo:function(e){if("number"==typeof e){if(!Ce(this.doc,e))return null;var t=e;if(!(e=ui(this.doc,e)))return null}else if(null==(t=fi(e)))return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o,a,s,l,u,c,d=this.display,p=(e=ct(this,Ee(this.doc,e))).bottom,f=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),d.sizer.appendChild(t),"over"==r)p=e.top;else if("above"==r||"near"==r){var h=Math.max(d.wrapper.clientHeight,this.doc.height),g=Math.max(d.sizer.clientWidth,d.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>h)&&e.top>t.offsetHeight?p=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=h&&(p=e.bottom),f+t.offsetWidth>g&&(f=g-t.offsetWidth)}t.style.top=p+"px",t.style.left=t.style.right="","right"==i?(f=d.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?f=0:"middle"==i&&(f=(d.sizer.clientWidth-t.offsetWidth)/2),t.style.left=f+"px"),n&&(o=this,a=f,s=p,l=f+t.offsetWidth,u=p+t.offsetHeight,null!=(c=kn(o,a,s,l,u)).scrollTop&&nn(o,c.scrollTop),null!=c.scrollLeft&&rn(o,c.scrollLeft))},triggerOnKeyDown:At(hn),triggerOnKeyPress:At(mn),triggerOnKeyUp:gn,execCommand:function(e){if(Kn.hasOwnProperty(e))return Kn[e](this)},findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var o=0,a=Ee(this.doc,e);o<t&&!(a=jn(this.doc,a,i,n,r)).hitSide;++o);return a},moveH:At((function(e,t){var n=this;n.extendSelectionsBy((function(r){return n.display.shift||n.doc.extend||r.empty()?jn(n.doc,r.head,e,t,n.options.rtlMoveVisually):e<0?r.from():r.to()}),Xi)})),deleteH:At((function(e,t){var n=this.doc.sel,r=this.doc;n.somethingSelected()?r.replaceSelection("",null,"+delete"):Fn(this,(function(n){var i=jn(r,n.head,e,t,!1);return e<0?{from:i,to:n.head}:{from:n.head,to:i}}))})),findPosV:function(e,t,n,r){var i=1,o=r;t<0&&(i=-1,t=-t);for(var a=0,s=Ee(this.doc,e);a<t;++a){var l=ct(this,s,"div");if(null==o?o=l.left:l.left=o,(s=Bn(this,l,i,n)).hitSide)break}return s},moveV:At((function(e,t){var n=this,r=this.doc,i=[],o=!n.display.shift&&!r.extend&&r.sel.somethingSelected();if(r.extendSelectionsBy((function(a){if(o)return e<0?a.from():a.to();var s=ct(n,a.head,"div");null!=a.goalColumn&&(s.left=a.goalColumn),i.push(s.left);var l=Bn(n,s,e,t);return"page"==t&&a==r.sel.primary()&&_n(n,null,ut(n,l,"div").top-s.top),l}),Xi),i.length)for(var a=0;a<r.sel.ranges.length;a++)r.sel.ranges[a].goalColumn=i[a]})),findWordAt:function(e){var t=ui(this.doc,e.line).text,n=e.ch,r=e.ch;if(t){var i=this.getHelper(e,"wordChars");(e.xRel<0||r==t.length)&&n?--n:++r;for(var o=t.charAt(n),a=uo(o,i)?function(e){return uo(e,i)}:/\s/.test(o)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!uo(e)};n>0&&a(t.charAt(n-1));)--n;for(;r<t.length&&a(t.charAt(r));)++r}return new ve(de(e.line,n),de(e.line,r))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Co(this.display.cursorDiv,"CodeMirror-overwrite"):Eo(this.display.cursorDiv,"CodeMirror-overwrite"),Pi(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return xo()==this.display.input},scrollTo:At((function(e,t){null==e&&null==t||Dn(this),null!=e&&(this.curOp.scrollLeft=e),null!=t&&(this.curOp.scrollTop=t)})),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-$e(this)-this.display.barHeight,width:e.scrollWidth-$e(this)-this.display.barWidth,clientHeight:Qe(this),clientWidth:Xe(this)}},scrollIntoView:At((function(e,t){if(null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:de(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line)Dn(this),this.curOp.scrollToPos=e;else{var n=kn(this,Math.min(e.from.left,e.to.left),Math.min(e.from.top,e.to.top)-e.margin,Math.max(e.from.right,e.to.right),Math.max(e.from.bottom,e.to.bottom)+e.margin);this.scrollTo(n.scrollLeft,n.scrollTop)}})),setSize:At((function(e,t){var n=this;function r(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e}null!=e&&(n.display.wrapper.style.width=r(e)),null!=t&&(n.display.wrapper.style.height=r(t)),n.options.lineWrapping&&rt(this);var i=n.display.viewFrom;n.doc.iter(i,n.display.viewTo,(function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){Ot(n,i,"widget");break}++i})),n.curOp.forceUpdate=!0,Pi(n,"refresh",this)})),operation:function(e){return Nt(this,e)},refresh:At((function(){var e=this.display.cachedTextHeight;_t(this),this.curOp.forceUpdate=!0,it(this),this.scrollTo(this.doc.scrollLeft,this.doc.scrollTop),k(this),(null==e||Math.abs(e-gt(this.display))>.5)&&L(this),Pi(this,"refresh",this)})),swapDoc:At((function(e){var t=this.doc;return t.cm=null,li(this,e),it(this),Wt(this),this.scrollTo(e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,ji(this,"swapDoc",this,t),t})),getInputField:function(){return this.display.input},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Vi(C);var Hn=C.defaults={},Gn=C.optionHandlers={};function Un(e,t,n,r){C.defaults[e]=t,n&&(Gn[e]=r?function(e,t,r){r!=Vn&&n(e,t,r)}:n)}var Vn=C.Init={toString:function(){return"CodeMirror.Init"}};Un("value","",(function(e,t){e.setValue(t)}),!0),Un("mode",null,(function(e,t){e.doc.modeOption=t,S(e)}),!0),Un("indentUnit",2,S,!0),Un("indentWithTabs",!1),Un("smartIndent",!0),Un("tabSize",4,(function(e){w(e),it(e),_t(e)}),!0),Un("specialChars",/[\t\u0000-\u0019\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g,(function(e,t){e.options.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),e.refresh()}),!0),Un("specialCharPlaceholder",(function(e){var t=go("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}),(function(e){e.refresh()}),!0),Un("electricChars",!0),Un("rtlMoveVisually",!m),Un("wholeLineUpdateBefore",!0),Un("theme","default",(function(e){A(e),I(e)}),!0),Un("keyMap","default",(function(e,t,n){var r=rr(t),i=n!=C.Init&&rr(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)})),Un("extraKeys",null),Un("lineWrapping",!1,(function(e){e.options.lineWrapping?(Co(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Eo(e.display.wrapper,"CodeMirror-wrap"),O(e)),L(e),_t(e),it(e),setTimeout((function(){B(e)}),100)}),!0),Un("gutters",[],(function(e){D(e.options),I(e)}),!0),Un("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?q(e.display)+"px":"0",e.refresh()}),!0),Un("coverGutterNextToScrollbar",!1,(function(e){B(e)}),!0),Un("scrollbarStyle","native",(function(e){j(e),B(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),Un("lineNumbers",!1,(function(e){D(e.options),I(e)}),!0),Un("firstLineNumber",1,I,!0),Un("lineNumberFormatter",(function(e){return e}),I,!0),Un("showCursorWhenSelecting",!1,Fe,!0),Un("resetSelectionOnContextMenu",!0),Un("readOnly",!1,(function(e,t){"nocursor"==t?(yn(e),e.display.input.blur(),e.display.disabled=!0):(e.display.disabled=!1,t||Wt(e))})),Un("disableInput",!1,(function(e,t){t||Wt(e)}),!0),Un("dragDrop",!0),Un("cursorBlinkRate",530),Un("cursorScrollMargin",0),Un("cursorHeight",1,Fe,!0),Un("singleCursorHeightPerLine",!0,Fe,!0),Un("workTime",100),Un("workDelay",100),Un("flattenSpans",!0,w,!0),Un("addModeClass",!1,w,!0),Un("pollInterval",100),Un("undoDepth",200,(function(e,t){e.doc.history.undoDepth=t})),Un("historyEventDelay",1250),Un("viewportMargin",10,(function(e){e.refresh()}),!0),Un("maxHighlightLength",1e4,w,!0),Un("moveInputWithCursor",!0,(function(e,t){t||(e.display.inputDiv.style.top=e.display.inputDiv.style.left=0)})),Un("tabindex",null,(function(e,t){e.display.input.tabIndex=t||""})),Un("autofocus",null);var Wn=C.modes={},qn=C.mimeModes={};C.defineMode=function(e,t){C.defaults.mode||"null"==e||(C.defaults.mode=e),arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Wn[e]=t},C.defineMIME=function(e,t){qn[e]=t},C.resolveMode=function(e){if("string"==typeof e&&qn.hasOwnProperty(e))e=qn[e];else if(e&&"string"==typeof e.name&&qn.hasOwnProperty(e.name)){var t=qn[e.name];"string"==typeof t&&(t={name:t}),(e=io(t,e)).name=t.name}else if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return C.resolveMode("application/xml");return"string"==typeof e?{name:e}:e||{name:"null"}},C.getMode=function(e,t){t=C.resolveMode(t);var n=Wn[t.name];if(!n)return C.getMode(e,"text/plain");var r=n(e,t);if(zn.hasOwnProperty(t.name)){var i=zn[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var o in t.modeProps)r[o]=t.modeProps[o];return r},C.defineMode("null",(function(){return{token:function(e){e.skipToEnd()}}})),C.defineMIME("text/plain","null");var zn=C.modeExtensions={};C.extendMode=function(e,t){oo(t,zn.hasOwnProperty(e)?zn[e]:zn[e]={})},C.defineExtension=function(e,t){C.prototype[e]=t},C.defineDocExtension=function(e,t){ii.prototype[e]=t},C.defineOption=Un;var $n=[];C.defineInitHook=function(e){$n.push(e)};var Xn=C.helpers={};C.registerHelper=function(e,t,n){Xn.hasOwnProperty(e)||(Xn[e]=C[e]={_global:[]}),Xn[e][t]=n},C.registerGlobalHelper=function(e,t,n,r){C.registerHelper(e,t,r),Xn[e]._global.push({pred:n,val:r})};var Qn=C.copyState=function(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n},Yn=C.startState=function(e,t,n){return!e.startState||e.startState(t,n)};C.innerMode=function(e,t){for(;e.innerMode;){var n=e.innerMode(t);if(!n||n.mode==e)break;t=n.state,e=n.mode}return n||{mode:e,state:t}};var Kn=C.commands={selectAll:function(e){e.setSelection(de(e.firstLine(),0),de(e.lastLine()),zi)},singleSelection:function(e){e.setSelection(e.getCursor("anchor"),e.getCursor("head"),zi)},killLine:function(e){Fn(e,(function(t){if(t.empty()){var n=ui(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:de(t.head.line+1,0)}:{from:t.head,to:de(t.head.line,n)}}return{from:t.from(),to:t.to()}}))},deleteLine:function(e){Fn(e,(function(t){return{from:de(t.from().line,0),to:Ee(e.doc,de(t.to().line+1,0))}}))},delLineLeft:function(e){Fn(e,(function(e){return{from:de(e.from().line,0),to:e.from()}}))},delWrappedLineLeft:function(e){Fn(e,(function(t){var n=e.charCoords(t.head,"div").top+5;return{from:e.coordsChar({left:0,top:n},"div"),to:t.from()}}))},delWrappedLineRight:function(e){Fn(e,(function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div");return{from:t.from(),to:r}}))},undo:function(e){e.undo()},redo:function(e){e.redo()},undoSelection:function(e){e.undoSelection()},redoSelection:function(e){e.redoSelection()},goDocStart:function(e){e.extendSelection(de(e.firstLine(),0))},goDocEnd:function(e){e.extendSelection(de(e.lastLine()))},goLineStart:function(e){e.extendSelectionsBy((function(t){return Uo(e,t.head.line)}),{origin:"+move",bias:1})},goLineStartSmart:function(e){e.extendSelectionsBy((function(t){return Vo(e,t.head)}),{origin:"+move",bias:1})},goLineEnd:function(e){e.extendSelectionsBy((function(t){return function(e,t){for(var n,r=ui(e.doc,t);n=Sr(r);)r=n.find(1,!0).line,t=null;var i=mi(r),o=i?i[0].level%2?Ho(r):Go(r):r.text.length;return de(null==t?fi(r):t,o)}(e,t.head.line)}),{origin:"+move",bias:-1})},goLineRight:function(e){e.extendSelectionsBy((function(t){var n=e.charCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div")}),Xi)},goLineLeft:function(e){e.extendSelectionsBy((function(t){var n=e.charCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:n},"div")}),Xi)},goLineLeftSmart:function(e){e.extendSelectionsBy((function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return r.ch<e.getLine(r.line).search(/\S/)?Vo(e,t.head):r}),Xi)},goLineUp:function(e){e.moveV(-1,"line")},goLineDown:function(e){e.moveV(1,"line")},goPageUp:function(e){e.moveV(-1,"page")},goPageDown:function(e){e.moveV(1,"page")},goCharLeft:function(e){e.moveH(-1,"char")},goCharRight:function(e){e.moveH(1,"char")},goColumnLeft:function(e){e.moveH(-1,"column")},goColumnRight:function(e){e.moveH(1,"column")},goWordLeft:function(e){e.moveH(-1,"word")},goGroupRight:function(e){e.moveH(1,"group")},goGroupLeft:function(e){e.moveH(-1,"group")},goWordRight:function(e){e.moveH(1,"word")},delCharBefore:function(e){e.deleteH(-1,"char")},delCharAfter:function(e){e.deleteH(1,"char")},delWordBefore:function(e){e.deleteH(-1,"word")},delWordAfter:function(e){e.deleteH(1,"word")},delGroupBefore:function(e){e.deleteH(-1,"group")},delGroupAfter:function(e){e.deleteH(1,"group")},indentAuto:function(e){e.indentSelection("smart")},indentMore:function(e){e.indentSelection("add")},indentLess:function(e){e.indentSelection("subtract")},insertTab:function(e){e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],n=e.listSelections(),r=e.options.tabSize,i=0;i<n.length;i++){var o=n[i].from(),a=Yi(e.getLine(o.line),o.ch,r);t.push(new Array(r-a%r+1).join(" "))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){Nt(e,(function(){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++){var i=t[r].head,o=ui(e.doc,i.line).text;if(o)if(i.ch==o.length&&(i=new de(i.line,i.ch-1)),i.ch>0)i=new de(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),de(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=ui(e.doc,i.line-1).text;a&&e.replaceRange(o.charAt(0)+"\n"+a.charAt(a.length-1),de(i.line-1,a.length-1),de(i.line,1),"+transpose")}n.push(new ve(i,i))}e.setSelections(n)}))},newlineAndIndent:function(e){Nt(e,(function(){for(var t=e.listSelections().length,n=0;n<t;n++){var r=e.listSelections()[n];e.replaceRange("\n",r.anchor,r.head,"+input"),e.indentLine(r.from().line+1,null,!0),On(e)}}))},toggleOverwrite:function(e){e.toggleOverwrite()}},Jn=C.keyMap={};function Zn(e){for(var t,n,r,i,o=e.split(/-(?!$)/),a=(e=o[o.length-1],0);a<o.length-1;a++){var s=o[a];if(/^(cmd|meta|m)$/i.test(s))i=!0;else if(/^a(lt)?$/i.test(s))t=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else{if(!/^s(hift)$/i.test(s))throw new Error("Unrecognized modifier name: "+s);r=!0}}return t&&(e="Alt-"+e),n&&(e="Ctrl-"+e),i&&(e="Cmd-"+e),r&&(e="Shift-"+e),e}Jn.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Jn.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Jn.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars"},Jn.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Jn.default=g?Jn.macDefault:Jn.pcDefault,C.normalizeKeyMap=function(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==r){delete e[n];continue}for(var i=ro(n.split(" "),Zn),o=0;o<i.length;o++){var a,s;o==i.length-1?(s=n,a=r):(s=i.slice(0,o+1).join(" "),a="...");var l=t[s];if(l){if(l!=a)throw new Error("Inconsistent bindings for "+s)}else t[s]=a}delete e[n]}for(var u in t)e[u]=t[u];return e};var er=C.lookupKey=function(e,t,n,r){var i=(t=rr(t)).call?t.call(e,r):t[e];if(!1===i)return"nothing";if("..."===i)return"multi";if(null!=i&&n(i))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return er(e,t.fallthrough,n,r);for(var o=0;o<t.fallthrough.length;o++){var a=er(e,t.fallthrough[o],n,r);if(a)return a}}},tr=C.isModifierKey=function(e){var t="string"==typeof e?e:Fo[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t},nr=C.keyName=function(e,t){if(l&&34==e.keyCode&&e.char)return!1;var n=Fo[e.keyCode],r=n;return null!=r&&!e.altGraphKey&&(e.altKey&&"Alt"!=n&&(r="Alt-"+r),(y?e.metaKey:e.ctrlKey)&&"Ctrl"!=n&&(r="Ctrl-"+r),(y?e.ctrlKey:e.metaKey)&&"Cmd"!=n&&(r="Cmd-"+r),!t&&e.shiftKey&&"Shift"!=n&&(r="Shift-"+r),r)};function rr(e){return"string"==typeof e?Jn[e]:e}C.fromTextArea=function(e,t){if((t=t?oo(t):{}).value=e.value,!t.tabindex&&e.tabindex&&(t.tabindex=e.tabindex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=xo();t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function r(){e.value=s.getValue()}if(e.form&&(Di(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var i=e.form,o=i.submit;try{var a=i.submit=function(){r(),i.submit=o,i.submit(),i.submit=a}}catch(e){}}t.finishInit=function(t){t.save=r,t.getTextArea=function(){return e},t.toTextArea=function(){t.toTextArea=isNaN,r(),e.parentNode.removeChild(t.getWrapperElement()),e.style.display="",e.form&&(Mi(e.form,"submit",r),"function"==typeof e.form.submit&&(e.form.submit=o))}},e.style.display="none";var s=C((function(t){e.parentNode.insertBefore(t,e.nextSibling)}),t);return s};var ir=C.StringStream=function(e,t){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};ir.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},eat:function(e){var t=this.string.charAt(this.pos);if("string"==typeof e)var n=t==e;else n=t&&(e.test?e.test(t):e(t));if(n)return++this.pos,t},eatWhile:function(e){for(var t=this.pos;this.eat(e););return this.pos>t},eatSpace:function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},skipToEnd:function(){this.pos=this.string.length},skipTo:function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},backUp:function(e){this.pos-=e},column:function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Yi(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Yi(this.string,this.lineStart,this.tabSize):0)},indentation:function(){return Yi(this.string,null,this.tabSize)-(this.lineStart?Yi(this.string,this.lineStart,this.tabSize):0)},match:function(e,t,n){if("string"!=typeof e){var r=this.string.slice(this.pos).match(e);return r&&r.index>0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}}};var or=C.TextMarker=function(e,t){this.lines=[],this.type=t,this.doc=e};Vi(or),or.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&xt(e),Ui(this,"clear")){var n=this.find();n&&ji(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;o<this.lines.length;++o){var a=this.lines[o],s=pr(a.markedSpans,this);e&&!this.collapsed?Ot(e,fi(a),"text"):e&&(null!=s.to&&(i=fi(a)),null!=s.from&&(r=fi(a))),a.markedSpans=fr(a.markedSpans,s),null==s.from&&this.collapsed&&!Ir(this.doc,a)&&e&&pi(a,gt(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(o=0;o<this.lines.length;++o){var l=Nr(this.lines[o]),u=_(l);u>e.display.maxLineLength&&(e.display.maxLine=l,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&_t(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&_e(e.doc)),e&&ji(e,"markerCleared",e,this),t&&bt(e),this.parent&&this.parent.clear()}},or.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i<this.lines.length;++i){var o=this.lines[i],a=pr(o.markedSpans,this);if(null!=a.from&&(n=de(t?o:fi(o),a.from),-1==e))return n;if(null!=a.to&&(r=de(t?o:fi(o),a.to),1==e))return r}return n&&{from:n,to:r}},or.prototype.changed=function(){var e=this.find(-1,!0),t=this,n=this.doc.cm;e&&n&&Nt(n,(function(){var r=e.line,i=fi(e.line),o=Ke(n,i);if(o&&(nt(o),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!Ir(t.doc,r)&&null!=t.height){var a=t.height;t.height=null;var s=Or(t)-a;s&&pi(r,r.height+s)}}))},or.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=no(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},or.prototype.detachLine=function(e){if(this.lines.splice(no(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}};var ar=0;function sr(e,t,n,r,i){if(r&&r.shared)return function(e,t,n,r,i){(r=oo(r)).shared=!1;var o=[sr(e,t,n,r,i)],a=o[0],s=r.widgetNode;return si(e,(function(e){s&&(r.widgetNode=s.cloneNode(!0)),o.push(sr(e,Ee(e,t),Ee(e,n),r,i));for(var l=0;l<e.linked.length;++l)if(e.linked[l].isParent)return;a=eo(o)})),new lr(o,a)}(e,t,n,r,i);if(e.cm&&!e.cm.curOp)return Lt(e.cm,sr)(e,t,n,r,i);var o=new or(e,i),a=pe(t,n);if(r&&oo(r,o,!1),a>0||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=go("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(wr(e,t.line,t,n,o)||t.line!=n.line&&wr(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");E=!0}o.addToHistory&&bi(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var s,l=t.line,u=e.cm;if(e.iter(l,n.line+1,(function(e){u&&o.collapsed&&!u.options.lineWrapping&&Nr(e)==u.display.maxLine&&(s=!0),o.collapsed&&l!=t.line&&pi(e,0),function(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}(e,new dr(o,l==t.line?t.ch:null,l==n.line?n.ch:null)),++l})),o.collapsed&&e.iter(t.line,n.line+1,(function(t){Ir(e,t)&&pi(t,0)})),o.clearOnEnter&&Di(o,"beforeCursorEnter",(function(){o.clear()})),o.readOnly&&(b=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++ar,o.atomic=!0),u){if(s&&(u.curOp.updateMaxLine=!0),o.collapsed)_t(u,t.line,n.line+1);else if(o.className||o.title||o.startStyle||o.endStyle||o.css)for(var c=t.line;c<=n.line;c++)Ot(u,c,"text");o.atomic&&_e(u.doc),ji(u,"markerAdded",u,o)}return o}var lr=C.SharedTextMarker=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};function ur(e){return e.findMarks(de(e.first,0),e.clipPos(de(e.lastLine())),(function(e){return e.parent}))}function cr(e){for(var t=0;t<e.length;t++){var n=e[t],r=[n.primary.doc];si(n.primary.doc,(function(e){r.push(e)}));for(var i=0;i<n.markers.length;i++){var o=n.markers[i];-1==no(r,o.doc)&&(o.parent=null,n.markers.splice(i--,1))}}}function dr(e,t,n){this.marker=e,this.from=t,this.to=n}function pr(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function fr(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function hr(e,t){if(t.full)return null;var n=Ce(e,t.from.line)&&ui(e,t.from.line).markedSpans,r=Ce(e,t.to.line)&&ui(e,t.to.line).markedSpans;if(!n&&!r)return null;var i=t.from.ch,o=t.to.ch,a=0==pe(t.from,t.to),s=function(e,t,n){if(e)for(var r,i=0;i<e.length;++i){var o=e[i],a=o.marker;if(null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t)||o.from==t&&"bookmark"==a.type&&(!n||!o.marker.insertLeft)){var s=null==o.to||(a.inclusiveRight?o.to>=t:o.to>t);(r||(r=[])).push(new dr(a,o.from,s?null:o.to))}}return r}(n,i,a),l=function(e,t,n){if(e)for(var r,i=0;i<e.length;++i){var o=e[i],a=o.marker;if(null==o.to||(a.inclusiveRight?o.to>=t:o.to>t)||o.from==t&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var s=null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t);(r||(r=[])).push(new dr(a,s?null:o.from-t,null==o.to?null:o.to-t))}}return r}(r,o,a),u=1==t.text.length,c=eo(t.text).length+(u?i:0);if(s)for(var d=0;d<s.length;++d)null==(p=s[d]).to&&((f=pr(l,p.marker))?u&&(p.to=null==f.to?null:f.to+c):p.to=i);if(l)for(d=0;d<l.length;++d){var p,f;null!=(p=l[d]).to&&(p.to+=c),null==p.from?(f=pr(s,p.marker))||(p.from=c,u&&(s||(s=[])).push(p)):(p.from+=c,u&&(s||(s=[])).push(p))}s&&(s=gr(s)),l&&l!=s&&(l=gr(l));var h=[s];if(!u){var g,m=t.text.length-2;if(m>0&&s)for(d=0;d<s.length;++d)null==s[d].to&&(g||(g=[])).push(new dr(s[d].marker,null,null));for(d=0;d<m;++d)h.push(g);h.push(l)}return h}function gr(e){for(var t=0;t<e.length;++t){var n=e[t];null!=n.from&&n.from==n.to&&!1!==n.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function mr(e,t){var n=function(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var r=0,i=[];r<t.text.length;++r)i.push(Ti(n[r]));return i}(e,t),r=hr(e,t);if(!n)return r;if(!r)return n;for(var i=0;i<n.length;++i){var o=n[i],a=r[i];if(o&&a)e:for(var s=0;s<a.length;++s){for(var l=a[s],u=0;u<o.length;++u)if(o[u].marker==l.marker)continue e;o.push(l)}else a&&(n[i]=a)}return n}function vr(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function yr(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function xr(e){return e.inclusiveLeft?-1:0}function br(e){return e.inclusiveRight?1:0}function Er(e,t){var n=e.lines.length-t.lines.length;if(0!=n)return n;var r=e.find(),i=t.find(),o=pe(r.from,i.from)||xr(e)-xr(t);if(o)return-o;var a=pe(r.to,i.to)||br(e)-br(t);return a||t.id-e.id}function Cr(e,t){var n,r=E&&e.markedSpans;if(r)for(var i,o=0;o<r.length;++o)(i=r[o]).marker.collapsed&&null==(t?i.from:i.to)&&(!n||Er(n,i.marker)<0)&&(n=i.marker);return n}function Tr(e){return Cr(e,!0)}function Sr(e){return Cr(e,!1)}function wr(e,t,n,r,i){var o=ui(e,t),a=E&&o.markedSpans;if(a)for(var s=0;s<a.length;++s){var l=a[s];if(l.marker.collapsed){var u=l.marker.find(0),c=pe(u.from,n)||xr(l.marker)-xr(i),d=pe(u.to,r)||br(l.marker)-br(i);if(!(c>=0&&d<=0||c<=0&&d>=0)&&(c<=0&&(pe(u.to,n)>0||l.marker.inclusiveRight&&i.inclusiveLeft)||c>=0&&(pe(u.from,r)<0||l.marker.inclusiveLeft&&i.inclusiveRight)))return!0}}}function Nr(e){for(var t;t=Tr(e);)e=t.find(-1,!0).line;return e}function Lr(e,t){var n=ui(e,t),r=Nr(n);return n==r?t:fi(r)}function Ar(e,t){if(t>e.lastLine())return t;var n,r=ui(e,t);if(!Ir(e,r))return t;for(;n=Sr(r);)r=n.find(1,!0).line;return fi(r)+1}function Ir(e,t){var n=E&&t.markedSpans;if(n)for(var r,i=0;i<n.length;++i)if((r=n[i]).marker.collapsed){if(null==r.from)return!0;if(!r.marker.widgetNode&&0==r.from&&r.marker.inclusiveLeft&&Rr(e,t,r))return!0}}function Rr(e,t,n){if(null==n.to){var r=n.marker.find(1,!0);return Rr(e,r.line,pr(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var i,o=0;o<t.markedSpans.length;++o)if((i=t.markedSpans[o]).marker.collapsed&&!i.marker.widgetNode&&i.from==n.to&&(null==i.to||i.to!=n.from)&&(i.marker.inclusiveLeft||n.marker.inclusiveRight)&&Rr(e,t,i))return!0}Vi(lr),lr.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();ji(this,"clear")}},lr.prototype.find=function(e,t){return this.primary.find(e,t)};var kr=C.LineWidget=function(e,t,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.cm=e,this.node=t};function _r(e,t,n){gi(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&_n(e,null,n)}function Or(e){if(null!=e.height)return e.height;if(!yo(document.body,e.node)){var t="position: relative;";e.coverGutter&&(t+="margin-left: -"+e.cm.display.gutters.offsetWidth+"px;"),e.noHScroll&&(t+="width: "+e.cm.display.wrapper.clientWidth+"px;"),vo(e.cm.display.measure,go("div",[e.node],null,t))}return e.height=e.node.offsetHeight}Vi(kr),kr.prototype.clear=function(){var e=this.cm,t=this.line.widgets,n=this.line,r=fi(n);if(null!=r&&t){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(n.widgets=null);var o=Or(this);Nt(e,(function(){_r(e,n,-o),Ot(e,r,"widget"),pi(n,Math.max(0,n.height-o))}))}},kr.prototype.changed=function(){var e=this.height,t=this.cm,n=this.line;this.height=null;var r=Or(this)-e;r&&Nt(t,(function(){t.curOp.forceUpdate=!0,_r(t,n,r),pi(n,n.height+r)}))};var Dr=C.Line=function(e,t,n){this.text=e,yr(this,t),this.height=n?n(this):1};function Mr(e){e.parent=null,vr(e)}function Pr(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var r=n[1]?"bgClass":"textClass";null==t[r]?t[r]=n[2]:new RegExp("(?:^|s)"+n[2]+"(?:$|s)").test(t[r])||(t[r]+=" "+n[2])}return e}function Fr(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=C.innerMode(e,t);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function jr(e,t,n,r){for(var i=0;i<10;i++){r&&(r[0]=C.innerMode(e,n).mode);var o=e.token(t,n);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}function Br(e,t,n,r){function i(e){return{start:d.start,end:d.pos,string:d.current(),type:o||null,state:e?Qn(a.mode,c):c}}var o,a=e.doc,s=a.mode;t=Ee(a,t);var l,u=ui(a,t.line),c=Ve(e,t.line,n),d=new ir(u.text,e.options.tabSize);for(r&&(l=[]);(r||d.pos<t.ch)&&!d.eol();)d.start=d.pos,o=jr(s,d,c),r&&l.push(i(!0));return r?l:i()}function Hr(e,t,n,r,i,o,a){var s=n.flattenSpans;null==s&&(s=e.options.flattenSpans);var l,u=0,c=null,d=new ir(t,e.options.tabSize),p=e.options.addModeClass&&[null];for(""==t&&Pr(Fr(n,r),o);!d.eol();){if(d.pos>e.options.maxHighlightLength?(s=!1,a&&Vr(e,t,r,d.pos),d.pos=t.length,l=null):l=Pr(jr(n,d,r,p),o),p){var f=p[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!s||c!=l){for(;u<d.start;)i(u=Math.min(d.start,u+5e4),c);c=l}d.start=d.pos}for(;u<d.pos;){var h=Math.min(d.pos,u+5e4);i(h,c),u=h}}function Gr(e,t,n,r){var i=[e.state.modeGen],o={};Hr(e,t.text,e.doc.mode,n,(function(e,t){i.push(e,t)}),o,r);for(var a=0;a<e.state.overlays.length;++a){var s=e.state.overlays[a],l=1,u=0;Hr(e,t.text,s.mode,!0,(function(e,t){for(var n=l;u<e;){var r=i[l];r>e&&i.splice(l,1,e,i[l+1],r),l+=2,u=Math.min(e,r)}if(t)if(s.opaque)i.splice(n,l-n,e,"cm-overlay "+t),l=n+2;else for(;n<l;n+=2){var o=i[n+1];i[n+1]=(o?o+" ":"")+"cm-overlay "+t}}),o)}return{styles:i,classes:o.bgClass||o.textClass?o:null}}function Ur(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=Gr(e,t,t.stateAfter=Ve(e,fi(t)));t.styles=r.styles,r.classes?t.styleClasses=r.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.frontier&&e.doc.frontier++}return t.styles}function Vr(e,t,n,r){var i=e.doc.mode,o=new ir(t,e.options.tabSize);for(o.start=o.pos=r||0,""==t&&Fr(i,n);!o.eol()&&o.pos<=e.options.maxHighlightLength;)jr(i,o,n),o.start=o.pos}Vi(Dr),Dr.prototype.lineNo=function(){return fi(this)};var Wr={},qr={};function zr(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?qr:Wr;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function $r(e,t){var n=go("span",null,null,o?"padding-right: .1px":null),i={pre:go("pre",[n]),content:n,col:0,pos:0,cm:e};t.measure={};for(var a=0;a<=(t.rest?t.rest.length:0);a++){var s,l=a?t.rest[a-1]:t.line;i.pos=0,i.addToken=Xr,(r||o)&&e.getOption("lineWrapping")&&(i.addToken=Qr(i.addToken)),Ro(e.display.measure)&&(s=mi(l))&&(i.addToken=Yr(i.addToken,s)),i.map=[],Jr(l,i,Ur(e,l,t!=e.display.externalMeasured&&fi(l))),l.styleClasses&&(l.styleClasses.bgClass&&(i.bgClass=To(l.styleClasses.bgClass,i.bgClass||"")),l.styleClasses.textClass&&(i.textClass=To(l.styleClasses.textClass,i.textClass||""))),0==i.map.length&&i.map.push(0,0,i.content.appendChild(Io(e.display.measure))),0==a?(t.measure.map=i.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(i.map),(t.measure.caches||(t.measure.caches=[])).push({}))}return o&&/\bcm-tab\b/.test(i.content.lastChild.className)&&(i.content.className="cm-tab-wrap-hack"),Pi(e,"renderLine",e,t.line,i.pre),i.pre.className&&(i.textClass=To(i.pre.className,i.textClass||"")),i}function Xr(e,t,n,o,a,s,l){if(t){var u=e.cm.options.specialChars,c=!1;if(u.test(t)){v=document.createDocumentFragment();for(var d=0;;){u.lastIndex=d;var p=u.exec(t),f=p?p.index-d:t.length-d;if(f){var h=document.createTextNode(t.slice(d,d+f));r&&i<9?v.appendChild(go("span",[h])):v.appendChild(h),e.map.push(e.pos,e.pos+f,h),e.col+=f,e.pos+=f}if(!p)break;if(d+=f+1,"\t"==p[0]){var g=e.cm.options.tabSize,m=g-e.col%g;(h=v.appendChild(go("span",Zi(m),"cm-tab"))).setAttribute("role","presentation"),e.col+=m}else h=e.cm.options.specialCharPlaceholder(p[0]),r&&i<9?v.appendChild(go("span",[h])):v.appendChild(h),e.col+=1;e.map.push(e.pos,e.pos+1,h),e.pos++}}else{e.col+=t.length;var v=document.createTextNode(t);e.map.push(e.pos,e.pos+t.length,v),r&&i<9&&(c=!0),e.pos+=t.length}if(n||o||a||c||l){var y=n||"";o&&(y+=o),a&&(y+=a);var x=go("span",[v],y,l);return s&&(x.title=s),e.content.appendChild(x)}e.content.appendChild(v)}}function Qr(e){function t(e){for(var t=" ",n=0;n<e.length-2;++n)t+=n%2?" ":" ";return t+=" "}return function(n,r,i,o,a,s){e(n,r.replace(/ {3,}/g,t),i,o,a,s)}}function Yr(e,t){return function(n,r,i,o,a,s){i=i?i+" cm-force-border":"cm-force-border";for(var l=n.pos,u=l+r.length;;){for(var c=0;c<t.length;c++){var d=t[c];if(d.to>l&&d.from<=l)break}if(d.to>=u)return e(n,r,i,o,a,s);e(n,r.slice(0,d.to-l),i,o,null,s),o=null,r=r.slice(d.to-l),l=d.to}}}function Kr(e,t,n,r){var i=!r&&n.widgetNode;i&&(e.map.push(e.pos,e.pos+t,i),e.content.appendChild(i)),e.pos+=t}function Jr(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var a,s,l,u,c,d,p,f=i.length,h=0,g=(S=1,""),m=0;;){if(m==h){l=u=c=d=s="",p=null,m=1/0;for(var v=[],y=0;y<r.length;++y){var x=r[y],b=x.marker;x.from<=h&&(null==x.to||x.to>h)?(null!=x.to&&m>x.to&&(m=x.to,u=""),b.className&&(l+=" "+b.className),b.css&&(s=b.css),b.startStyle&&x.from==h&&(c+=" "+b.startStyle),b.endStyle&&x.to==m&&(u+=" "+b.endStyle),b.title&&!d&&(d=b.title),b.collapsed&&(!p||Er(p.marker,b)<0)&&(p=x)):x.from>h&&m>x.from&&(m=x.from),"bookmark"==b.type&&x.from==h&&b.widgetNode&&v.push(b)}if(p&&(p.from||0)==h&&(Kr(t,(null==p.to?f+1:p.to)-h,p.marker,null==p.from),null==p.to))return;if(!p&&v.length)for(y=0;y<v.length;++y)Kr(t,0,v[y])}if(h>=f)break;for(var E=Math.min(f,m);;){if(g){var C=h+g.length;if(!p){var T=C>E?g.slice(0,E-h):g;t.addToken(t,T,a?a+l:l,c,h+T.length==m?u:"",d,s)}if(C>=E){g=g.slice(E-h),h=E;break}h=C,c=""}g=i.slice(o,o=n[S++]),a=zr(n[S++],t.cm.options)}}else for(var S=1;S<n.length;S+=2)t.addToken(t,i.slice(o,o=n[S]),zr(n[S+1],t.cm.options))}function Zr(e,t){return 0==t.from.ch&&0==t.to.ch&&""==eo(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function ei(e,t,n,r){function i(e){return n?n[e]:null}function o(e,n,i){!function(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),vr(e),yr(e,n);var i=r?r(e):1;i!=e.height&&pi(e,i)}(e,n,i,r),ji(e,"change",e,t)}function a(e,t){for(var n=e,o=[];n<t;++n)o.push(new Dr(u[n],i(n),r));return o}var s=t.from,l=t.to,u=t.text,c=ui(e,s.line),d=ui(e,l.line),p=eo(u),f=i(u.length-1),h=l.line-s.line;if(t.full)e.insert(0,a(0,u.length)),e.remove(u.length,e.size-u.length);else if(Zr(e,t)){var g=a(0,u.length-1);o(d,d.text,f),h&&e.remove(s.line,h),g.length&&e.insert(s.line,g)}else c==d?1==u.length?o(c,c.text.slice(0,s.ch)+p+c.text.slice(l.ch),f):((g=a(1,u.length-1)).push(new Dr(p+c.text.slice(l.ch),f,r)),o(c,c.text.slice(0,s.ch)+u[0],i(0)),e.insert(s.line+1,g)):1==u.length?(o(c,c.text.slice(0,s.ch)+u[0]+d.text.slice(l.ch),i(0)),e.remove(s.line+1,h)):(o(c,c.text.slice(0,s.ch)+u[0],i(0)),o(d,p+d.text.slice(l.ch),f),g=a(1,u.length-1),h>1&&e.remove(s.line+1,h-1),e.insert(s.line+1,g));ji(e,"change",e,t)}function ti(e){this.lines=e,this.parent=null;for(var t=0,n=0;t<e.length;++t)e[t].parent=this,n+=e[t].height;this.height=n}function ni(e){this.children=e;for(var t=0,n=0,r=0;r<e.length;++r){var i=e[r];t+=i.chunkSize(),n+=i.height,i.parent=this}this.size=t,this.height=n,this.parent=null}ti.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=e,r=e+t;n<r;++n){var i=this.lines[n];this.height-=i.height,Mr(i),ji(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;r<t.length;++r)t[r].parent=this},iterN:function(e,t,n){for(var r=e+t;e<r;++e)if(n(this.lines[e]))return!0}},ni.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var r=this.children[n],i=r.chunkSize();if(e<i){var o=Math.min(t,i-e),a=r.height;if(r.removeInner(e,o),this.height-=a-r.height,i==o&&(this.children.splice(n--,1),r.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof ti))){var s=[];this.collapse(s),this.children=[new ti(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,n){this.size+=t.length,this.height+=n;for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<=o){if(i.insertInner(e,t,n),i.lines&&i.lines.length>50){for(;i.lines.length>50;){var a=new ti(i.lines.splice(i.lines.length-25,25));i.height-=a.height,this.children.splice(r+1,0,a),a.parent=this}this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=new ni(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var n=no(e.parent.children,e);e.parent.children.splice(n+1,0,t)}else{var r=new ni(e.children);r.parent=e,e.children=[r,t],e=r}t.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<o){var a=Math.min(t,o-e);if(i.iterN(e,a,n))return!0;if(0==(t-=a))break;e=0}else e-=o}}};var ri=0,ii=C.Doc=function(e,t,n){if(!(this instanceof ii))return new ii(e,t,n);null==n&&(n=0),ni.call(this,[new ti([new Dr("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.frontier=n;var r=de(n,0);this.sel=xe(r),this.history=new vi(null),this.id=++ri,this.modeOption=t,"string"==typeof e&&(e=Oo(e)),ei(this,{from:r,to:r,text:e}),Ie(this,xe(r),zi)};ii.prototype=io(ni.prototype,{constructor:ii,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r<t.length;++r)n+=t[r].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=di(this,this.first,this.first+this.size);return!1===e?t:t.join(e||"\n")},setValue:It((function(e){var t=de(this.first,0),n=this.first+this.size-1;wn(this,{from:t,to:de(n,ui(this,n).text.length),text:Oo(e),origin:"setValue",full:!0},!0),Ie(this,xe(t))})),replaceRange:function(e,t,n,r){Rn(this,e,t=Ee(this,t),n=n?Ee(this,n):t,r)},getRange:function(e,t,n){var r=ci(this,Ee(this,e),Ee(this,t));return!1===n?r:r.join(n||"\n")},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(Ce(this,e))return ui(this,e)},getLineNumber:function(e){return fi(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=ui(this,e)),Nr(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return Ee(this,e)},getCursor:function(e){var t=this.sel.primary();return null==e||"head"==e?t.head:"anchor"==e?t.anchor:"end"==e||"to"==e||!1===e?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:It((function(e,t,n){Le(this,Ee(this,"number"==typeof e?de(e,t||0):e),null,n)})),setSelection:It((function(e,t,n){Le(this,Ee(this,e),Ee(this,t||e),n)})),extendSelection:It((function(e,t,n){Se(this,Ee(this,e),t&&Ee(this,t),n)})),extendSelections:It((function(e,t){we(this,function(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=Ee(e,t[r]);return n}(this,e))})),extendSelectionsBy:It((function(e,t){we(this,ro(this.sel.ranges,e),t)})),setSelections:It((function(e,t,n){if(e.length){for(var r=0,i=[];r<e.length;r++)i[r]=new ve(Ee(this,e[r].anchor),Ee(this,e[r].head));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),Ie(this,ye(i,t),n)}})),addSelection:It((function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new ve(Ee(this,e),Ee(this,t||e))),Ie(this,ye(r,r.length-1),n)})),getSelection:function(e){for(var t,n=this.sel.ranges,r=0;r<n.length;r++){var i=ci(this,n[r].from(),n[r].to());t=t?t.concat(i):i}return!1===e?t:t.join(e||"\n")},getSelections:function(e){for(var t=[],n=this.sel.ranges,r=0;r<n.length;r++){var i=ci(this,n[r].from(),n[r].to());!1!==e&&(i=i.join(e||"\n")),t[r]=i}return t},replaceSelection:function(e,t,n){for(var r=[],i=0;i<this.sel.ranges.length;i++)r[i]=e;this.replaceSelections(r,t,n||"+input")},replaceSelections:It((function(e,t,n){for(var r=[],i=this.sel,o=0;o<i.ranges.length;o++){var a=i.ranges[o];r[o]={from:a.from(),to:a.to(),text:Oo(e[o]),origin:n}}var s=t&&"end"!=t&&function(e,t,n){for(var r=[],i=de(e.first,0),o=i,a=0;a<t.length;a++){var s=t[a],l=Tn(s.from,i,o),u=Tn(bn(s),i,o);if(i=s.to,o=u,"around"==n){var c=e.sel.ranges[a],d=pe(c.head,c.anchor)<0;r[a]=new ve(d?u:l,d?l:u)}else r[a]=new ve(l,l)}return new me(r,e.sel.primIndex)}(this,r,t);for(o=r.length-1;o>=0;o--)wn(this,r[o]);s?Ae(this,s):this.cm&&On(this.cm)})),undo:It((function(){Ln(this,"undo")})),redo:It((function(){Ln(this,"redo")})),undoSelection:It((function(){Ln(this,"undo",!0)})),redoSelection:It((function(){Ln(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r<e.done.length;r++)e.done[r].ranges||++t;for(r=0;r<e.undone.length;r++)e.undone[r].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){this.history=new vi(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Si(this.history.done),undone:Si(this.history.undone)}},setHistory:function(e){var t=this.history=new vi(this.history.maxGeneration);t.done=Si(e.done.slice(0),null,!0),t.undone=Si(e.undone.slice(0),null,!0)},addLineClass:It((function(e,t,n){return Pn(this,e,"gutter"==t?"gutter":"class",(function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[r]){if(bo(n).test(e[r]))return!1;e[r]+=" "+n}else e[r]=n;return!0}))})),removeLineClass:It((function(e,t,n){return Pn(this,e,"gutter"==t?"gutter":"class",(function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",i=e[r];if(!i)return!1;if(null==n)e[r]=null;else{var o=i.match(bo(n));if(!o)return!1;var a=o.index+o[0].length;e[r]=i.slice(0,o.index)+(o.index&&a!=i.length?" ":"")+i.slice(a)||null}return!0}))})),markText:function(e,t,n){return sr(this,Ee(this,e),Ee(this,t),n,"range")},setBookmark:function(e,t){var n={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared};return sr(this,e=Ee(this,e),e,n,"bookmark")},findMarksAt:function(e){var t=[],n=ui(this,(e=Ee(this,e)).line).markedSpans;if(n)for(var r=0;r<n.length;++r){var i=n[r];(null==i.from||i.from<=e.ch)&&(null==i.to||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=Ee(this,e),t=Ee(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,(function(o){var a=o.markedSpans;if(a)for(var s=0;s<a.length;s++){var l=a[s];i==e.line&&e.ch>l.to||null==l.from&&i!=e.line||i==t.line&&l.from>t.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++i})),r},getAllMarks:function(){var e=[];return this.iter((function(t){var n=t.markedSpans;if(n)for(var r=0;r<n.length;++r)null!=n[r].from&&e.push(n[r].marker)})),e},posFromIndex:function(e){var t,n=this.first;return this.iter((function(r){var i=r.text.length+1;if(i>e)return t=e,!0;e-=i,++n})),Ee(this,de(n,t))},indexFromPos:function(e){var t=(e=Ee(this,e)).ch;return e.line<this.first||e.ch<0?0:(this.iter(this.first,e.line,(function(e){t+=e.text.length+1})),t)},copy:function(e){var t=new ii(di(this,this.first,this.first+this.size),this.modeOption,this.first);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,n=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<n&&(n=e.to);var r=new ii(di(this,t,n),e.mode||this.modeOption,t);return e.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:e.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.find(),o=e.clipPos(i.from),a=e.clipPos(i.to);if(pe(o,a)){var s=sr(e,o,a,r.primary,r.primary.type);r.markers.push(s),s.parent=r}}}(r,ur(this)),r},unlinkDoc:function(e){if(e instanceof C&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t)if(this.linked[t].doc==e){this.linked.splice(t,1),e.unlinkDoc(this),cr(ur(this));break}if(e.history==this.history){var n=[e.id];si(e,(function(e){n.push(e.id)}),!0),e.history=new vi(null),e.history.done=Si(this.history.done,n),e.history.undone=Si(this.history.undone,n)}},iterLinkedDocs:function(e){si(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm}}),ii.prototype.eachLine=ii.prototype.iter;var oi="iter insert remove copy getEditor".split(" ");for(var ai in ii.prototype)ii.prototype.hasOwnProperty(ai)&&no(oi,ai)<0&&(C.prototype[ai]=function(e){return function(){return e.apply(this.doc,arguments)}}(ii.prototype[ai]));function si(e,t,n){!function e(r,i,o){if(r.linked)for(var a=0;a<r.linked.length;++a){var s=r.linked[a];if(s.doc!=i){var l=o&&s.sharedHist;n&&!l||(t(s.doc,l),e(s.doc,r,l))}}}(e,null,!0)}function li(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,L(e),S(e),e.options.lineWrapping||O(e),e.options.mode=t.modeOption,_t(e)}function ui(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t<o){n=i;break}t-=o}return n.lines[t]}function ci(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,(function(e){var o=e.text;i==n.line&&(o=o.slice(0,n.ch)),i==t.line&&(o=o.slice(t.ch)),r.push(o),++i})),r}function di(e,t,n){var r=[];return e.iter(t,n,(function(e){r.push(e.text)})),r}function pi(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function fi(e){if(null==e.parent)return null;for(var t=e.parent,n=no(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function hi(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var i=e.children[r],o=i.height;if(t<o){e=i;continue e}t-=o,n+=i.chunkSize()}return n}while(!e.lines);for(r=0;r<e.lines.length;++r){var a=e.lines[r].height;if(t<a)break;t-=a}return n+r}function gi(e){for(var t=0,n=(e=Nr(e)).parent,r=0;r<n.lines.length;++r){var i=n.lines[r];if(i==e)break;t+=i.height}for(var o=n.parent;o;o=(n=o).parent)for(r=0;r<o.children.length;++r){var a=o.children[r];if(a==n)break;t+=a.height}return t}function mi(e){var t=e.order;return null==t&&(t=e.order=Qo(e.text)),t}function vi(e){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function yi(e,t){var n={from:fe(t.from),to:bn(t),text:ci(e,t.from,t.to)};return Ci(e,n,t.from.line,t.to.line+1),si(e,(function(e){Ci(e,n,t.from.line,t.to.line+1)}),!0),n}function xi(e){for(;e.length&&eo(e).ranges;)e.pop()}function bi(e,t,n,r){var i=e.history;i.undone.length=0;var o,a=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&e.cm&&i.lastModTime>a-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(o=function(e,t){return t?(xi(e.done),eo(e.done)):e.done.length&&!eo(e.done).ranges?eo(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),eo(e.done)):void 0}(i,i.lastOp==r))){var s=eo(o.changes);0==pe(t.from,t.to)&&0==pe(t.from,s.to)?s.to=bn(t):o.changes.push(yi(e,t))}else{var l=eo(i.done);for(l&&l.ranges||Ei(e.sel,i.done),o={changes:[yi(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=a,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,s||Pi(e,"historyAdded")}function Ei(e,t){var n=eo(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Ci(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),(function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=n.markedSpans),++o}))}function Ti(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||(t=e.slice(0,n)):t&&t.push(e[n]);return t?t.length?t:null:e}function Si(e,t,n){for(var r=0,i=[];r<e.length;++r){var o=e[r];if(o.ranges)i.push(n?me.prototype.deepCopy.call(o):o);else{var a=o.changes,s=[];i.push({changes:s});for(var l=0;l<a.length;++l){var u,c=a[l];if(s.push({from:c.from,to:c.to,text:c.text}),t)for(var d in c)(u=d.match(/^spans_(\d+)$/))&&no(t,Number(u[1]))>-1&&(eo(s)[d]=c[d],delete c[d])}}}return i}function wi(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function Ni(e,t,n,r){for(var i=0;i<e.length;++i){var o=e[i],a=!0;if(o.ranges){o.copied||((o=e[i]=o.deepCopy()).copied=!0);for(var s=0;s<o.ranges.length;s++)wi(o.ranges[s].anchor,t,n,r),wi(o.ranges[s].head,t,n,r)}else{for(s=0;s<o.changes.length;++s){var l=o.changes[s];if(n<l.from.line)l.from=de(l.from.line+r,l.from.ch),l.to=de(l.to.line+r,l.to.ch);else if(t<=l.to.line){a=!1;break}}a||(e.splice(0,i+1),i=0)}}}function Li(e,t){var n=t.from.line,r=t.to.line,i=t.text.length-(r-n)-1;Ni(e.done,n,r,i),Ni(e.undone,n,r,i)}Vi(ii);var Ai=C.e_preventDefault=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1},Ii=C.e_stopPropagation=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0};function Ri(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}var ki=C.e_stop=function(e){Ai(e),Ii(e)};function _i(e){return e.target||e.srcElement}function Oi(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),g&&e.ctrlKey&&1==t&&(t=3),t}var Di=C.on=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var r=e._handlers||(e._handlers={});(r[t]||(r[t]=[])).push(n)}},Mi=C.off=function(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers&&e._handlers[t];if(!r)return;for(var i=0;i<r.length;++i)if(r[i]==n){r.splice(i,1);break}}},Pi=C.signal=function(e,t){var n=e._handlers&&e._handlers[t];if(n)for(var r=Array.prototype.slice.call(arguments,2),i=0;i<n.length;++i)n[i].apply(null,r)},Fi=null;function ji(e,t){var n=e._handlers&&e._handlers[t];if(n){var r,i=Array.prototype.slice.call(arguments,2);vt?r=vt.delayedCallbacks:Fi?r=Fi:(r=Fi=[],setTimeout(Bi,0));for(var o=0;o<n.length;++o)r.push(a(n[o]))}function a(e){return function(){e.apply(null,i)}}}function Bi(){var e=Fi;Fi=null;for(var t=0;t<e.length;++t)e[t]()}function Hi(e,t,n){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Pi(e,n||t.type,e,t),Ri(t)||t.codemirrorIgnore}function Gi(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)-1==no(n,t[r])&&n.push(t[r])}function Ui(e,t){var n=e._handlers&&e._handlers[t];return n&&n.length>0}function Vi(e){e.prototype.on=function(e,t){Di(this,e,t)},e.prototype.off=function(e,t){Mi(this,e,t)}}var Wi=30,qi=C.Pass={toString:function(){return"CodeMirror.Pass"}},zi={scroll:!1},$i={origin:"*mouse"},Xi={origin:"+move"};function Qi(){this.id=null}Qi.prototype.set=function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)};var Yi=C.countColumn=function(e,t,n,r,i){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var o=r||0,a=i||0;;){var s=e.indexOf("\t",o);if(s<0||s>=t)return a+(t-o);a+=s-o,a+=n-a%n,o=s+1}};function Ki(e,t,n){for(var r=0,i=0;;){var o=e.indexOf("\t",r);-1==o&&(o=e.length);var a=o-r;if(o==e.length||i+a>=t)return r+Math.min(a,t-i);if(i+=o-r,r=o+1,(i+=n-i%n)>=t)return r}}var Ji=[""];function Zi(e){for(;Ji.length<=e;)Ji.push(eo(Ji)+" ");return Ji[e]}function eo(e){return e[e.length-1]}var to=function(e){e.select()};function no(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}function ro(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function io(e,t){var n;if(Object.create)n=Object.create(e);else{var r=function(){};r.prototype=e,n=new r}return t&&oo(t,n),n}function oo(e,t,n){for(var r in t||(t={}),e)!e.hasOwnProperty(r)||!1===n&&t.hasOwnProperty(r)||(t[r]=e[r]);return t}function ao(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}f?to=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:r&&(to=function(e){try{e.select()}catch(e){}});var so=/[\u00df\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,lo=C.isWordChar=function(e){return/\w/.test(e)||e>""&&(e.toUpperCase()!=e.toLowerCase()||so.test(e))};function uo(e,t){return t?!!(t.source.indexOf("\\w")>-1&&lo(e))||t.test(e):lo(e)}function co(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var po,fo=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function ho(e){return e.charCodeAt(0)>=768&&fo.test(e)}function go(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function mo(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function vo(e,t){return mo(e).appendChild(t)}po=document.createRange?function(e,t,n){var r=document.createRange();return r.setEnd(e,n),r.setStart(e,t),r}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(e){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var yo=C.contains=function(e,t){if(e.contains)return e.contains(t);for(;t=t.parentNode;)if(11==t.nodeType&&(t=t.host),t==e)return!0};function xo(){return document.activeElement}function bo(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}r&&i<11&&(xo=function(){try{return document.activeElement}catch(e){return document.body}});var Eo=C.rmClass=function(e,t){var n=e.className,r=bo(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}},Co=C.addClass=function(e,t){var n=e.className;bo(t).test(n)||(e.className+=(n?" ":"")+t)};function To(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!bo(n[r]).test(t)&&(t+=" "+n[r]);return t}function So(e){if(document.body.getElementsByClassName)for(var t=document.body.getElementsByClassName("CodeMirror"),n=0;n<t.length;n++){var r=t[n].CodeMirror;r&&e(r)}}var wo,No,Lo=!1,Ao=function(){if(r&&i<9)return!1;var e=go("div");return"draggable"in e||"dragDrop"in e}();function Io(e){if(null==wo){var t=go("span","");vo(e,go("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(wo=t.offsetWidth<=1&&t.offsetHeight>2&&!(r&&i<8))}return wo?go("span",""):go("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px")}function Ro(e){if(null!=No)return No;var t=vo(e,document.createTextNode("AخA")),n=po(t,0,1).getBoundingClientRect();if(!n||n.left==n.right)return!1;var r=po(t,1,2).getBoundingClientRect();return No=r.right-n.right<3}var ko,_o,Oo=C.splitLines=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),t+=a+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Do=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){try{var t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Mo="oncopy"in(ko=go("div"))||(ko.setAttribute("oncopy","return;"),"function"==typeof ko.oncopy),Po=null,Fo={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",107:"=",109:"-",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"};function jo(e){return e.level%2?e.to:e.from}function Bo(e){return e.level%2?e.from:e.to}function Ho(e){var t=mi(e);return t?jo(t[0]):0}function Go(e){var t=mi(e);return t?Bo(eo(t)):e.text.length}function Uo(e,t){var n=ui(e.doc,t),r=Nr(n);r!=n&&(t=fi(r));var i=mi(r),o=i?i[0].level%2?Go(r):Ho(r):0;return de(t,o)}function Vo(e,t){var n=Uo(e,t.line),r=ui(e.doc,n.line),i=mi(r);if(!i||0==i[0].level){var o=Math.max(0,r.text.search(/\S/)),a=t.line==n.line&&t.ch<=o&&t.ch;return de(n.line,a?0:o)}return n}function Wo(e,t,n){var r=e[0].level;return t==r||n!=r&&t<n}function qo(e,t){_o=null;for(var n,r=0;r<e.length;++r){var i=e[r];if(i.from<t&&i.to>t)return r;if(i.from==t||i.to==t){if(null!=n)return Wo(e,i.level,e[n].level)?(i.from!=i.to&&(_o=n),r):(i.from!=i.to&&(_o=r),n);n=r}}return n}function zo(e,t,n,r){if(!r)return t+n;do{t+=n}while(t>0&&ho(e.text.charAt(t)));return t}function $o(e,t,n,r){var i=mi(e);if(!i)return Xo(e,t,n,r);for(var o=qo(i,t),a=i[o],s=zo(e,t,a.level%2?-n:n,r);;){if(s>a.from&&s<a.to)return s;if(s==a.from||s==a.to)return qo(i,s)==o?s:n>0==(a=i[o+=n]).level%2?a.to:a.from;if(!(a=i[o+=n]))return null;s=n>0==a.level%2?zo(e,a.to,-1,r):zo(e,a.from,1,r)}}function Xo(e,t,n,r){var i=t+n;if(r)for(;i>0&&ho(e.text.charAt(i));)i+=n;return i<0||i>e.text.length?null:i}C.keyNames=Fo,function(){for(var e=0;e<10;e++)Fo[e+48]=Fo[e+96]=String(e);for(e=65;e<=90;e++)Fo[e]=String.fromCharCode(e);for(e=1;e<=12;e++)Fo[e+111]=Fo[e+63235]="F"+e}();var Qo=function(){var e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,t=/[stwN]/,n=/[LRr]/,r=/[Lb1n]/,i=/[1n]/;function o(e,t,n){this.level=e,this.from=t,this.to=n}return function(a){if(!e.test(a))return!1;for(var s,l=a.length,u=[],c=0;c<l;++c)u.push(m=(s=a.charCodeAt(c))<=247?"bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN".charAt(s):1424<=s&&s<=1524?"R":1536<=s&&s<=1773?"rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm".charAt(s-1536):1774<=s&&s<=2220?"r":8192<=s&&s<=8203?"w":8204==s?"b":"L");c=0;for(var d="L";c<l;++c)"m"==(m=u[c])?u[c]=d:d=m;c=0;for(var p="L";c<l;++c)"1"==(m=u[c])&&"r"==p?u[c]="n":n.test(m)&&(p=m,"r"==m&&(u[c]="R"));for(c=1,d=u[0];c<l-1;++c)"+"==(m=u[c])&&"1"==d&&"1"==u[c+1]?u[c]="1":","!=m||d!=u[c+1]||"1"!=d&&"n"!=d||(u[c]=d),d=m;for(c=0;c<l;++c)if(","==(m=u[c]))u[c]="N";else if("%"==m){for(var f=c+1;f<l&&"%"==u[f];++f);for(var h=c&&"!"==u[c-1]||f<l&&"1"==u[f]?"1":"N",g=c;g<f;++g)u[g]=h;c=f-1}for(c=0,p="L";c<l;++c){var m=u[c];"L"==p&&"1"==m?u[c]="L":n.test(m)&&(p=m)}for(c=0;c<l;++c)if(t.test(u[c])){for(f=c+1;f<l&&t.test(u[f]);++f);var v="L"==(c?u[c-1]:"L"),y="L"==(f<l?u[f]:"L");for(h=v||y?"L":"R",g=c;g<f;++g)u[g]=h;c=f-1}var x,b=[];for(c=0;c<l;)if(r.test(u[c])){var E=c;for(++c;c<l&&r.test(u[c]);++c);b.push(new o(0,E,c))}else{var C=c,T=b.length;for(++c;c<l&&"L"!=u[c];++c);for(g=C;g<c;)if(i.test(u[g])){C<g&&b.splice(T,0,new o(1,C,g));var S=g;for(++g;g<c&&i.test(u[g]);++g);b.splice(T,0,new o(2,S,g)),C=g}else++g;C<c&&b.splice(T,0,new o(1,C,c))}return 1==b[0].level&&(x=a.match(/^\s+/))&&(b[0].from=x[0].length,b.unshift(new o(0,0,x[0].length))),1==eo(b).level&&(x=a.match(/\s+$/))&&(eo(b).to-=x[0].length,b.push(new o(0,l-x[0].length,l))),b[0].level!=eo(b).level&&b.push(new o(b[0].level,l,l)),b}}();return C.version="4.13.0",C}))},{}],11:[function(e,t,n){var r;r=function(e){"use strict";e.defineMode("javascript",(function(t,n){var r,i,o=t.indentUnit,a=n.statementIndent,s=n.jsonld,l=n.json||s,u=n.typescript,c=n.wordCharacters||/[\w$\xa1-\uffff]/,d=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),n=e("keyword b"),r=e("keyword c"),i=e("operator"),o={type:"atom",style:"atom"},a={if:e("if"),while:t,with:t,else:n,do:n,try:n,finally:n,return:r,break:r,continue:r,new:r,delete:r,throw:r,debugger:r,var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:i,typeof:i,instanceof:i,true:o,false:o,null:o,undefined:o,NaN:o,Infinity:o,this:e("this"),module:e("module"),class:e("class"),super:e("atom"),yield:r,export:e("export"),import:e("import"),extends:r};if(u){var s={type:"variable",style:"variable-3"},l={interface:e("interface"),extends:e("extends"),constructor:e("constructor"),public:e("public"),private:e("private"),protected:e("protected"),static:e("static"),string:s,number:s,bool:s,any:s};for(var c in l)a[c]=l[c]}return a}(),p=/[+\-*&%=<>!?|~^]/,f=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function h(e,t,n){return r=e,i=n,t}function g(e,t){var n,r=e.next();if('"'==r||"'"==r)return t.tokenize=(n=r,function(e,t){var r,i=!1;if(s&&"@"==e.peek()&&e.match(f))return t.tokenize=g,h("jsonld-keyword","meta");for(;null!=(r=e.next())&&(r!=n||i);)i=!i&&"\\"==r;return i||(t.tokenize=g),h("string","string")}),t.tokenize(e,t);if("."==r&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return h("number","number");if("."==r&&e.match(".."))return h("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return h(r);if("="==r&&e.eat(">"))return h("=>","operator");if("0"==r&&e.eat(/x/i))return e.eatWhile(/[\da-f]/i),h("number","number");if(/\d/.test(r))return e.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),h("number","number");if("/"==r)return e.eat("*")?(t.tokenize=m,m(e,t)):e.eat("/")?(e.skipToEnd(),h("comment","comment")):"operator"==t.lastType||"keyword c"==t.lastType||"sof"==t.lastType||/^[\[{}\(,;:]$/.test(t.lastType)?(function(e){for(var t,n=!1,r=!1;null!=(t=e.next());){if(!n){if("/"==t&&!r)return;"["==t?r=!0:r&&"]"==t&&(r=!1)}n=!n&&"\\"==t}}(e),e.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),h("regexp","string-2")):(e.eatWhile(p),h("operator","operator",e.current()));if("`"==r)return t.tokenize=v,v(e,t);if("#"==r)return e.skipToEnd(),h("error","error");if(p.test(r))return e.eatWhile(p),h("operator","operator",e.current());if(c.test(r)){e.eatWhile(c);var i=e.current(),o=d.propertyIsEnumerable(i)&&d[i];return o&&"."!=t.lastType?h(o.type,o.style,i):h("variable","variable",i)}}function m(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=g;break}r="*"==n}return h("comment","comment")}function v(e,t){for(var n,r=!1;null!=(n=e.next());){if(!r&&("`"==n||"$"==n&&e.eat("{"))){t.tokenize=g;break}r=!r&&"\\"==n}return h("quasi","string-2",e.current())}function y(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var n=e.string.indexOf("=>",e.start);if(!(n<0)){for(var r=0,i=!1,o=n-1;o>=0;--o){var a=e.string.charAt(o),s="([{}])".indexOf(a);if(s>=0&&s<3){if(!r){++o;break}if(0==--r)break}else if(s>=3&&s<6)++r;else if(c.test(a))i=!0;else{if(/["'\/]/.test(a))return;if(i&&!r){++o;break}}}i&&!r&&(t.fatArrowAt=o)}}var x={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0};function b(e,t,n,r,i,o){this.indented=e,this.column=t,this.type=n,this.prev=i,this.info=o,null!=r&&(this.align=r)}function E(e,t){for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0;for(var r=e.context;r;r=r.prev)for(n=r.vars;n;n=n.next)if(n.name==t)return!0}var C={state:null,column:null,marked:null,cc:null};function T(){for(var e=arguments.length-1;e>=0;e--)C.cc.push(arguments[e])}function S(){return T.apply(null,arguments),!0}function w(e){function t(t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}var r=C.state;if(r.context){if(C.marked="def",t(r.localVars))return;r.localVars={name:e,next:r.localVars}}else{if(t(r.globalVars))return;n.globalVars&&(r.globalVars={name:e,next:r.globalVars})}}var N={name:"this",next:{name:"arguments"}};function L(){C.state.context={prev:C.state.context,vars:C.state.localVars},C.state.localVars=N}function A(){C.state.localVars=C.state.context.vars,C.state.context=C.state.context.prev}function I(e,t){var n=function(){var n=C.state,r=n.indented;if("stat"==n.lexical.type)r=n.lexical.indented;else for(var i=n.lexical;i&&")"==i.type&&i.align;i=i.prev)r=i.indented;n.lexical=new b(r,C.stream.column(),e,null,n.lexical,t)};return n.lex=!0,n}function R(){var e=C.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function k(e){return function t(n){return n==e?S():";"==e?T():S(t)}}function _(e,t){return"var"==e?S(I("vardef",t.length),ee,k(";"),R):"keyword a"==e?S(I("form"),O,_,R):"keyword b"==e?S(I("form"),_,R):"{"==e?S(I("}"),K,R):";"==e?S():"if"==e?("else"==C.state.lexical.info&&C.state.cc[C.state.cc.length-1]==R&&C.state.cc.pop()(),S(I("form"),O,_,R,oe)):"function"==e?S(de):"for"==e?S(I("form"),ae,_,R):"variable"==e?S(I("stat"),W):"switch"==e?S(I("form"),O,I("}","switch"),k("{"),K,R,R):"case"==e?S(O,k(":")):"default"==e?S(k(":")):"catch"==e?S(I("form"),L,k("("),pe,k(")"),_,R,A):"module"==e?S(I("form"),L,ve,A,R):"class"==e?S(I("form"),fe,R):"export"==e?S(I("form"),ye,R):"import"==e?S(I("form"),xe,R):T(I("stat"),O,k(";"),R)}function O(e){return M(e,!1)}function D(e){return M(e,!0)}function M(e,t){if(C.state.fatArrowAt==C.stream.start){var n=t?V:U;if("("==e)return S(L,I(")"),Q(te,")"),R,k("=>"),n,A);if("variable"==e)return T(L,te,k("=>"),n,A)}var r=t?B:j;return x.hasOwnProperty(e)?S(r):"function"==e?S(de,r):"keyword c"==e?S(t?F:P):"("==e?S(I(")"),P,Se,k(")"),R,r):"operator"==e||"spread"==e?S(t?D:O):"["==e?S(I("]"),Ce,R,r):"{"==e?Y(z,"}",null,r):"quasi"==e?T(H,r):S()}function P(e){return e.match(/[;\}\)\],]/)?T():T(O)}function F(e){return e.match(/[;\}\)\],]/)?T():T(D)}function j(e,t){return","==e?S(O):B(e,t,!1)}function B(e,t,n){var r=0==n?j:B,i=0==n?O:D;return"=>"==e?S(L,n?V:U,A):"operator"==e?/\+\+|--/.test(t)?S(r):"?"==t?S(O,k(":"),i):S(i):"quasi"==e?T(H,r):";"!=e?"("==e?Y(D,")","call",r):"."==e?S(q,r):"["==e?S(I("]"),P,k("]"),R,r):void 0:void 0}function H(e,t){return"quasi"!=e?T():"${"!=t.slice(t.length-2)?S(H):S(O,G)}function G(e){if("}"==e)return C.marked="string-2",C.state.tokenize=v,S(H)}function U(e){return y(C.stream,C.state),T("{"==e?_:O)}function V(e){return y(C.stream,C.state),T("{"==e?_:D)}function W(e){return":"==e?S(R,_):T(j,k(";"),R)}function q(e){if("variable"==e)return C.marked="property",S()}function z(e,t){return"variable"==e||"keyword"==C.style?(C.marked="property",S("get"==t||"set"==t?$:X)):"number"==e||"string"==e?(C.marked=s?"property":C.style+" property",S(X)):"jsonld-keyword"==e?S(X):"["==e?S(O,k("]"),X):void 0}function $(e){return"variable"!=e?T(X):(C.marked="property",S(de))}function X(e){return":"==e?S(D):"("==e?T(de):void 0}function Q(e,t){function n(r){if(","==r){var i=C.state.lexical;return"call"==i.info&&(i.pos=(i.pos||0)+1),S(e,n)}return r==t?S():S(k(t))}return function(r){return r==t?S():T(e,n)}}function Y(e,t,n){for(var r=3;r<arguments.length;r++)C.cc.push(arguments[r]);return S(I(t,n),Q(e,t),R)}function K(e){return"}"==e?S():T(_,K)}function J(e){if(u&&":"==e)return S(Z)}function Z(e){if("variable"==e)return C.marked="variable-3",S()}function ee(){return T(te,J,re,ie)}function te(e,t){return"variable"==e?(w(t),S()):"["==e?Y(te,"]"):"{"==e?Y(ne,"}"):void 0}function ne(e,t){return"variable"!=e||C.stream.match(/^\s*:/,!1)?("variable"==e&&(C.marked="property"),S(k(":"),te,re)):(w(t),S(re))}function re(e,t){if("="==t)return S(D)}function ie(e){if(","==e)return S(ee)}function oe(e,t){if("keyword b"==e&&"else"==t)return S(I("form","else"),_,R)}function ae(e){if("("==e)return S(I(")"),se,k(")"),R)}function se(e){return"var"==e?S(ee,k(";"),ue):";"==e?S(ue):"variable"==e?S(le):T(O,k(";"),ue)}function le(e,t){return"in"==t||"of"==t?(C.marked="keyword",S(O)):S(j,ue)}function ue(e,t){return";"==e?S(ce):"in"==t||"of"==t?(C.marked="keyword",S(O)):T(O,k(";"),ce)}function ce(e){")"!=e&&S(O)}function de(e,t){return"*"==t?(C.marked="keyword",S(de)):"variable"==e?(w(t),S(de)):"("==e?S(L,I(")"),Q(pe,")"),R,_,A):void 0}function pe(e){return"spread"==e?S(pe):T(te,J)}function fe(e,t){if("variable"==e)return w(t),S(he)}function he(e,t){return"extends"==t?S(O,he):"{"==e?S(I("}"),ge,R):void 0}function ge(e,t){return"variable"==e||"keyword"==C.style?(C.marked="property","get"==t||"set"==t?S(me,de,ge):S(de,ge)):"*"==t?(C.marked="keyword",S(ge)):";"==e?S(ge):"}"==e?S():void 0}function me(e){return"variable"!=e?T():(C.marked="property",S())}function ve(e,t){return"string"==e?S(_):"variable"==e?(w(t),S(Ee)):void 0}function ye(e,t){return"*"==t?(C.marked="keyword",S(Ee,k(";"))):"default"==t?(C.marked="keyword",S(O,k(";"))):T(_)}function xe(e){return"string"==e?S():T(be,Ee)}function be(e,t){return"{"==e?Y(be,"}"):("variable"==e&&w(t),S())}function Ee(e,t){if("from"==t)return C.marked="keyword",S(O)}function Ce(e){return"]"==e?S():T(D,Te)}function Te(e){return"for"==e?T(Se,k("]")):","==e?S(Q(F,"]")):T(Q(D,"]"))}function Se(e){return"for"==e?S(ae,Se):"if"==e?S(O,Se):void 0}return R.lex=!0,{startState:function(e){var t={tokenize:g,lastType:"sof",cc:[],lexical:new b((e||0)-o,0,"block",!1),localVars:n.localVars,context:n.localVars&&{vars:n.localVars},indented:0};return n.globalVars&&"object"==typeof n.globalVars&&(t.globalVars=n.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),y(e,t)),t.tokenize!=m&&e.eatSpace())return null;var n=t.tokenize(e,t);return"comment"==r?n:(t.lastType="operator"!=r||"++"!=i&&"--"!=i?r:"incdec",function(e,t,n,r,i){var o=e.cc;for(C.state=e,C.stream=i,C.marked=null,C.cc=o,C.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;)if((o.length?o.pop():l?O:_)(n,r)){for(;o.length&&o[o.length-1].lex;)o.pop()();return C.marked?C.marked:"variable"==n&&E(e,r)?"variable-2":t}}(t,n,r,i,e))},indent:function(t,r){if(t.tokenize==m)return e.Pass;if(t.tokenize!=g)return 0;var i=r&&r.charAt(0),s=t.lexical;if(!/^\s*else\b/.test(r))for(var l=t.cc.length-1;l>=0;--l){var u=t.cc[l];if(u==R)s=s.prev;else if(u!=oe)break}"stat"==s.type&&"}"==i&&(s=s.prev),a&&")"==s.type&&"stat"==s.prev.type&&(s=s.prev);var c=s.type,d=i==c;return"vardef"==c?s.indented+("operator"==t.lastType||","==t.lastType?s.info+1:0):"form"==c&&"{"==i?s.indented:"form"==c?s.indented+o:"stat"==c?s.indented+(function(e,t){return"operator"==e.lastType||","==e.lastType||p.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}(t,r)?a||o:0):"switch"!=s.info||d||0==n.doubleIndentSwitch?s.align?s.column+(d?0:1):s.indented+(d?0:o):s.indented+(/^(?:case|default)\b/.test(r)?o:2*o)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:l?null:"/*",blockCommentEnd:l?null:"*/",lineComment:l?null:"//",fold:"brace",helperType:l?"json":"javascript",jsonldMode:s,jsonMode:l}})),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})},"object"==typeof n&&"object"==typeof t?r(e("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],r):r(CodeMirror)},{"../../lib/codemirror":10}],12:[function(e,t,n){var r;r=function(e){"use strict";e.defineMode("xml",(function(t,n){var r=t.indentUnit,i=n.multilineTagIndentFactor||1,o=n.multilineTagIndentPastTag;null==o&&(o=!0);var a,s,l=n.htmlMode?{autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0}:{autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,caseFold:!1},u=n.alignCDATA;function c(e,t){function n(n){return t.tokenize=n,n(e,t)}var r=e.next();return"<"==r?e.eat("!")?e.eat("[")?e.match("CDATA[")?n(p("atom","]]>")):null:e.match("--")?n(p("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(function e(t){return function(n,r){for(var i;null!=(i=n.next());){if("<"==i)return r.tokenize=e(t+1),r.tokenize(n,r);if(">"==i){if(1==t){r.tokenize=c;break}return r.tokenize=e(t-1),r.tokenize(n,r)}}return"meta"}}(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=p("meta","?>"),"meta"):(a=e.eat("/")?"closeTag":"openTag",t.tokenize=d,"tag bracket"):"&"==r?(e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"))?"atom":"error":(e.eatWhile(/[^&<]/),null)}function d(e,t){var n,r,i=e.next();if(">"==i||"/"==i&&e.eat(">"))return t.tokenize=c,a=">"==i?"endTag":"selfcloseTag","tag bracket";if("="==i)return a="equals",null;if("<"==i){t.tokenize=c,t.state=m,t.tagName=t.tagStart=null;var o=t.tokenize(e,t);return o?o+" tag error":"tag error"}return/[\'\"]/.test(i)?(t.tokenize=(n=i,(r=function(e,t){for(;!e.eol();)if(e.next()==n){t.tokenize=d;break}return"string"}).isInAttribute=!0,r),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function p(e,t){return function(n,r){for(;!n.eol();){if(n.match(t)){r.tokenize=c;break}n.next()}return e}}function f(e,t,n){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=n,(l.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function h(e){e.context&&(e.context=e.context.prev)}function g(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!l.contextGrabbers.hasOwnProperty(n)||!l.contextGrabbers[n].hasOwnProperty(t))return;h(e)}}function m(e,t,n){return"openTag"==e?(n.tagStart=t.column(),v):"closeTag"==e?y:m}function v(e,t,n){return"word"==e?(n.tagName=t.current(),s="tag",E):(s="error",v)}function y(e,t,n){if("word"==e){var r=t.current();return n.context&&n.context.tagName!=r&&l.implicitlyClosed.hasOwnProperty(n.context.tagName)&&h(n),n.context&&n.context.tagName==r?(s="tag",x):(s="tag error",b)}return s="error",b}function x(e,t,n){return"endTag"!=e?(s="error",x):(h(n),m)}function b(e,t,n){return s="error",x(e,0,n)}function E(e,t,n){if("word"==e)return s="attribute",C;if("endTag"==e||"selfcloseTag"==e){var r=n.tagName,i=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||l.autoSelfClosers.hasOwnProperty(r)?g(n,r):(g(n,r),n.context=new f(n,r,i==n.indented)),m}return s="error",E}function C(e,t,n){return"equals"==e?T:(l.allowMissing||(s="error"),E(e,0,n))}function T(e,t,n){return"string"==e?S:"word"==e&&l.allowUnquoted?(s="string",E):(s="error",E(e,0,n))}function S(e,t,n){return"string"==e?S:E(e,0,n)}return{startState:function(){return{tokenize:c,state:m,indented:0,tagName:null,tagStart:null,context:null}},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;a=null;var n=t.tokenize(e,t);return(n||a)&&"comment"!=n&&(s=null,t.state=t.state(a||n,e,t),s&&(n="error"==s?n+" error":s)),n},indent:function(t,n,a){var s=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+r;if(s&&s.noIndent)return e.Pass;if(t.tokenize!=d&&t.tokenize!=c)return a?a.match(/^(\s*)/)[0].length:0;if(t.tagName)return o?t.tagStart+t.tagName.length+2:t.tagStart+r*i;if(u&&/<!\[CDATA\[/.test(n))return 0;var p=n&&/^<(\/)?([\w_:\.-]*)/.exec(n);if(p&&p[1])for(;s;){if(s.tagName==p[2]){s=s.prev;break}if(!l.implicitlyClosed.hasOwnProperty(s.tagName))break;s=s.prev}else if(p)for(;s;){var f=l.contextGrabbers[s.tagName];if(!f||!f.hasOwnProperty(p[2]))break;s=s.prev}for(;s&&!s.startOfLine;)s=s.prev;return s?s.indent+r:0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:n.htmlMode?"html":"xml",helperType:n.htmlMode?"html":"xml"}})),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})},"object"==typeof n&&"object"==typeof t?r(e("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],r):r(CodeMirror)},{"../../lib/codemirror":10}],13:[function(e,t,n){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(e){return"function"==typeof e}function o(e){return"object"==typeof e&&null!==e}function a(e){return void 0===e}t.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,n,r,s,l,u;if(this._events||(this._events={}),"error"===e&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;throw TypeError('Uncaught, unspecified "error" event.')}if(a(n=this._events[e]))return!1;if(i(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(r=arguments.length,s=new Array(r-1),l=1;l<r;l++)s[l-1]=arguments[l];n.apply(this,s)}else if(o(n)){for(r=arguments.length,s=new Array(r-1),l=1;l<r;l++)s[l-1]=arguments[l];for(r=(u=n.slice()).length,l=0;l<r;l++)u[l].apply(this,s)}return!0},r.prototype.addListener=function(e,t){var n;if(!i(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,i(t.listener)?t.listener:t),this._events[e]?o(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,o(this._events[e])&&!this._events[e].warned&&(n=a(this._maxListeners)?r.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(e,t){if(!i(t))throw TypeError("listener must be a function");var n=!1;function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}return r.listener=t,this.on(e,r),this},r.prototype.removeListener=function(e,t){var n,r,a,s;if(!i(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(a=(n=this._events[e]).length,r=-1,n===t||i(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(o(n)){for(s=a;s-- >0;)if(n[s]===t||n[s].listener&&n[s].listener===t){r=s;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(i(n=this._events[e]))this.removeListener(e,n);else for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){return this._events&&this._events[e]?i(this._events[e])?[this._events[e]]:this._events[e].slice():[]},r.listenerCount=function(e,t){return e._events&&e._events[t]?i(e._events[t])?1:e._events[t].length:0}},{}],14:[function(e,t,n){
|
|
31
|
-
/*!
|
|
32
|
-
* jQuery UI Core 1.10.4
|
|
33
|
-
* http://jqueryui.com
|
|
34
|
-
*
|
|
35
|
-
* Copyright 2014 jQuery Foundation and other contributors
|
|
36
|
-
* Released under the MIT license.
|
|
37
|
-
* http://jquery.org/license
|
|
38
|
-
*
|
|
39
|
-
* http://api.jqueryui.com/category/ui-core/
|
|
40
|
-
*/
|
|
41
|
-
!function(e,t){var n,r,i=0,o=/^ui-id-\d+$/;function a(t,n){var r,i,o,a=t.nodeName.toLowerCase();return"area"===a?(i=(r=t.parentNode).name,!(!t.href||!i||"map"!==r.nodeName.toLowerCase())&&!!(o=e("img[usemap=#"+i+"]")[0])&&s(o)):(/input|select|textarea|button|object/.test(a)?!t.disabled:"a"===a&&t.href||n)&&s(t)}function s(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter((function(){return"hidden"===e.css(this,"visibility")})).length}e.ui=e.ui||{},e.extend(e.ui,{version:"1.10.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({focus:(n=e.fn.focus,function(t,r){return"number"==typeof t?this.each((function(){var n=this;setTimeout((function(){e(n).focus(),r&&r.call(n)}),t)})):n.apply(this,arguments)}),scrollParent:function(){var t;return t=e.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter((function(){return/(relative|absolute|fixed)/.test(e.css(this,"position"))&&/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))})).eq(0):this.parents().filter((function(){return/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))})).eq(0),/fixed/.test(this.css("position"))||!t.length?e(document):t},zIndex:function(t){if(void 0!==t)return this.css("zIndex",t);if(this.length)for(var n,r,i=e(this[0]);i.length&&i[0]!==document;){if(("absolute"===(n=i.css("position"))||"relative"===n||"fixed"===n)&&(r=parseInt(i.css("zIndex"),10),!isNaN(r)&&0!==r))return r;i=i.parent()}return 0},uniqueId:function(){return this.each((function(){this.id||(this.id="ui-id-"+ ++i)}))},removeUniqueId:function(){return this.each((function(){o.test(this.id)&&e(this).removeAttr("id")}))}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo((function(t){return function(n){return!!e.data(n,t)}})):function(t,n,r){return!!e.data(t,r[3])},focusable:function(t){return a(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var n=e.attr(t,"tabindex"),r=isNaN(n);return(r||n>=0)&&a(t,!r)}}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],(function(t,n){var r="Width"===n?["Left","Right"]:["Top","Bottom"],i=n.toLowerCase(),o={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};function a(t,n,i,o){return e.each(r,(function(){n-=parseFloat(e.css(t,"padding"+this))||0,i&&(n-=parseFloat(e.css(t,"border"+this+"Width"))||0),o&&(n-=parseFloat(e.css(t,"margin"+this))||0)})),n}e.fn["inner"+n]=function(t){return void 0===t?o["inner"+n].call(this):this.each((function(){e(this).css(i,a(this,t)+"px")}))},e.fn["outer"+n]=function(t,r){return"number"!=typeof t?o["outer"+n].call(this,t):this.each((function(){e(this).css(i,a(this,t,!0,r)+"px")}))}})),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=(r=e.fn.removeData,function(t){return arguments.length?r.call(this,e.camelCase(t)):r.call(this)})),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.support.selectstart="onselectstart"in document.createElement("div"),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",(function(e){e.preventDefault()}))},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),e.extend(e.ui,{plugin:{add:function(t,n,r){var i,o=e.ui[t].prototype;for(i in r)o.plugins[i]=o.plugins[i]||[],o.plugins[i].push([n,r[i]])},call:function(e,t,n){var r,i=e.plugins[t];if(i&&e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType)for(r=0;r<i.length;r++)e.options[i[r][0]]&&i[r][1].apply(e.element,n)}},hasScroll:function(t,n){if("hidden"===e(t).css("overflow"))return!1;var r,i=n&&"left"===n?"scrollLeft":"scrollTop";return t[i]>0||(t[i]=1,r=t[i]>0,t[i]=0,r)}})}(e("jquery"))},{jquery:18}],15:[function(e,t,n){var r=e("jquery");e("./widget"),
|
|
42
|
-
/*!
|
|
43
|
-
* jQuery UI Mouse 1.10.4
|
|
44
|
-
* http://jqueryui.com
|
|
45
|
-
*
|
|
46
|
-
* Copyright 2014 jQuery Foundation and other contributors
|
|
47
|
-
* Released under the MIT license.
|
|
48
|
-
* http://jquery.org/license
|
|
49
|
-
*
|
|
50
|
-
* http://api.jqueryui.com/mouse/
|
|
51
|
-
*
|
|
52
|
-
* Depends:
|
|
53
|
-
* jquery.ui.widget.js
|
|
54
|
-
*/
|
|
55
|
-
function(e,t){var n=!1;e(document).mouseup((function(){n=!1})),e.widget("ui.mouse",{version:"1.10.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,(function(e){return t._mouseDown(e)})).bind("click."+this.widgetName,(function(n){if(!0===e.data(n.target,t.widgetName+".preventClickEvent"))return e.removeData(n.target,t.widgetName+".preventClickEvent"),n.stopImmediatePropagation(),!1})),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){if(!n){this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var r=this,i=1===t.which,o=!("string"!=typeof this.options.cancel||!t.target.nodeName)&&e(t.target).closest(this.options.cancel).length;return!(i&&!o&&this._mouseCapture(t)&&(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout((function(){r.mouseDelayMet=!0}),this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(t),!this._mouseStarted)?(t.preventDefault(),0):(!0===e.data(t.target,this.widgetName+".preventClickEvent")&&e.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return r._mouseMove(e)},this._mouseUpDelegate=function(e){return r._mouseUp(e)},e(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),n=!0,0)))}},_mouseMove:function(t){return e.ui.ie&&(!document.documentMode||document.documentMode<9)&&!t.button?this._mouseUp(t):this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,t),this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){return e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})}(r)},{"./widget":17,jquery:18}],16:[function(e,t,n){var r=e("jquery");e("./core"),e("./mouse"),e("./widget"),
|
|
56
|
-
/*!
|
|
57
|
-
* jQuery UI Sortable 1.10.4
|
|
58
|
-
* http://jqueryui.com
|
|
59
|
-
*
|
|
60
|
-
* Copyright 2014 jQuery Foundation and other contributors
|
|
61
|
-
* Released under the MIT license.
|
|
62
|
-
* http://jquery.org/license
|
|
63
|
-
*
|
|
64
|
-
* http://api.jqueryui.com/sortable/
|
|
65
|
-
*
|
|
66
|
-
* Depends:
|
|
67
|
-
* jquery.ui.core.js
|
|
68
|
-
* jquery.ui.mouse.js
|
|
69
|
-
* jquery.ui.widget.js
|
|
70
|
-
*/
|
|
71
|
-
function(e,t){function n(e,t,n){return e>t&&e<t+n}function r(e){return/left|right/.test(e.css("float"))||/inline|table-cell/.test(e.css("display"))}e.widget("ui.sortable",e.ui.mouse,{version:"1.10.4",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_create:function(){var e=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=!!this.items.length&&("x"===e.axis||r(this.items[0].item)),this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var e=this.items.length-1;e>=0;e--)this.items[e].item.removeData(this.widgetName+"-item");return this},_setOption:function(t,n){"disabled"===t?(this.options[t]=n,this.widget().toggleClass("ui-sortable-disabled",!!n)):e.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(t,n){var r=null,i=!1,o=this;return!(this.reverting||this.options.disabled||"static"===this.options.type||(this._refreshItems(t),e(t.target).parents().each((function(){if(e.data(this,o.widgetName+"-item")===o)return r=e(this),!1})),e.data(t.target,o.widgetName+"-item")===o&&(r=e(t.target)),!r||this.options.handle&&!n&&(e(this.options.handle,r).find("*").addBack().each((function(){this===t.target&&(i=!0)})),!i)||(this.currentItem=r,this._removeCurrentsFromItems(),0)))},_mouseStart:function(t,n,r){var i,o,a=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,a.cursorAt&&this._adjustOffsetFromHelper(a.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),a.containment&&this._setContainment(),a.cursor&&"auto"!==a.cursor&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("cursor",a.cursor),this.storedStylesheet=e("<style>*{ cursor: "+a.cursor+" !important; }</style>").appendTo(o)),a.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",a.opacity)),a.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",a.zIndex)),this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!r)for(i=this.containers.length-1;i>=0;i--)this.containers[i]._trigger("activate",t,this._uiHash(this));return e.ui.ddmanager&&(e.ui.ddmanager.current=this),e.ui.ddmanager&&!a.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(t),!0},_mouseDrag:function(t){var n,r,i,o,a=this.options,s=!1;for(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<a.scrollSensitivity?this.scrollParent[0].scrollTop=s=this.scrollParent[0].scrollTop+a.scrollSpeed:t.pageY-this.overflowOffset.top<a.scrollSensitivity&&(this.scrollParent[0].scrollTop=s=this.scrollParent[0].scrollTop-a.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<a.scrollSensitivity?this.scrollParent[0].scrollLeft=s=this.scrollParent[0].scrollLeft+a.scrollSpeed:t.pageX-this.overflowOffset.left<a.scrollSensitivity&&(this.scrollParent[0].scrollLeft=s=this.scrollParent[0].scrollLeft-a.scrollSpeed)):(t.pageY-e(document).scrollTop()<a.scrollSensitivity?s=e(document).scrollTop(e(document).scrollTop()-a.scrollSpeed):e(window).height()-(t.pageY-e(document).scrollTop())<a.scrollSensitivity&&(s=e(document).scrollTop(e(document).scrollTop()+a.scrollSpeed)),t.pageX-e(document).scrollLeft()<a.scrollSensitivity?s=e(document).scrollLeft(e(document).scrollLeft()-a.scrollSpeed):e(window).width()-(t.pageX-e(document).scrollLeft())<a.scrollSensitivity&&(s=e(document).scrollLeft(e(document).scrollLeft()+a.scrollSpeed))),!1!==s&&e.ui.ddmanager&&!a.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),n=this.items.length-1;n>=0;n--)if(i=(r=this.items[n]).item[0],(o=this._intersectsWithPointer(r))&&r.instance===this.currentContainer&&!(i===this.currentItem[0]||this.placeholder[1===o?"next":"prev"]()[0]===i||e.contains(this.placeholder[0],i)||"semi-dynamic"===this.options.type&&e.contains(this.element[0],i))){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(r))break;this._rearrange(t,r),this._trigger("change",t,this._uiHash());break}return this._contactContainers(t),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,n){if(t){if(e.ui.ddmanager&&!this.options.dropBehaviour&&e.ui.ddmanager.drop(this,t),this.options.revert){var r=this,i=this.placeholder.offset(),o=this.options.axis,a={};o&&"x"!==o||(a.left=i.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(a.top=i.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,e(this.helper).animate(a,parseInt(this.options.revert,10)||500,(function(){r._clear(t)}))}else this._clear(t,n);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var t=this.containers.length-1;t>=0;t--)this.containers[t]._trigger("deactivate",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,this._uiHash(this)),this.containers[t].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),e.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?e(this.domPosition.prev).after(this.currentItem):e(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(t){var n=this._getItemsAsjQuery(t&&t.connected),r=[];return t=t||{},e(n).each((function(){var n=(e(t.item||this).attr(t.attribute||"id")||"").match(t.expression||/(.+)[\-=_](.+)/);n&&r.push((t.key||n[1]+"[]")+"="+(t.key&&t.expression?n[1]:n[2]))})),!r.length&&t.key&&r.push(t.key+"="),r.join("&")},toArray:function(t){var n=this._getItemsAsjQuery(t&&t.connected),r=[];return t=t||{},n.each((function(){r.push(e(t.item||this).attr(t.attribute||"id")||"")})),r},_intersectsWith:function(e){var t=this.positionAbs.left,n=t+this.helperProportions.width,r=this.positionAbs.top,i=r+this.helperProportions.height,o=e.left,a=o+e.width,s=e.top,l=s+e.height,u=this.offset.click.top,c=this.offset.click.left,d="x"===this.options.axis||r+u>s&&r+u<l,p="y"===this.options.axis||t+c>o&&t+c<a,f=d&&p;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>e[this.floating?"width":"height"]?f:o<t+this.helperProportions.width/2&&n-this.helperProportions.width/2<a&&s<r+this.helperProportions.height/2&&i-this.helperProportions.height/2<l},_intersectsWithPointer:function(e){var t="x"===this.options.axis||n(this.positionAbs.top+this.offset.click.top,e.top,e.height),r="y"===this.options.axis||n(this.positionAbs.left+this.offset.click.left,e.left,e.width),i=t&&r,o=this._getDragVerticalDirection(),a=this._getDragHorizontalDirection();return!!i&&(this.floating?a&&"right"===a||"down"===o?2:1:o&&("down"===o?2:1))},_intersectsWithSides:function(e){var t=n(this.positionAbs.top+this.offset.click.top,e.top+e.height/2,e.height),r=n(this.positionAbs.left+this.offset.click.left,e.left+e.width/2,e.width),i=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return this.floating&&o?"right"===o&&r||"left"===o&&!r:i&&("down"===i&&t||"up"===i&&!t)},_getDragVerticalDirection:function(){var e=this.positionAbs.top-this.lastPositionAbs.top;return 0!==e&&(e>0?"down":"up")},_getDragHorizontalDirection:function(){var e=this.positionAbs.left-this.lastPositionAbs.left;return 0!==e&&(e>0?"right":"left")},refresh:function(e){return this._refreshItems(e),this.refreshPositions(),this},_connectWith:function(){var e=this.options;return e.connectWith.constructor===String?[e.connectWith]:e.connectWith},_getItemsAsjQuery:function(t){var n,r,i,o,a=[],s=[],l=this._connectWith();if(l&&t)for(n=l.length-1;n>=0;n--)for(r=(i=e(l[n])).length-1;r>=0;r--)(o=e.data(i[r],this.widgetFullName))&&o!==this&&!o.options.disabled&&s.push([e.isFunction(o.options.items)?o.options.items.call(o.element):e(o.options.items,o.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),o]);function u(){a.push(this)}for(s.push([e.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):e(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),n=s.length-1;n>=0;n--)s[n][0].each(u);return e(a)},_removeCurrentsFromItems:function(){var t=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=e.grep(this.items,(function(e){for(var n=0;n<t.length;n++)if(t[n]===e.item[0])return!1;return!0}))},_refreshItems:function(t){this.items=[],this.containers=[this];var n,r,i,o,a,s,l,u,c=this.items,d=[[e.isFunction(this.options.items)?this.options.items.call(this.element[0],t,{item:this.currentItem}):e(this.options.items,this.element),this]],p=this._connectWith();if(p&&this.ready)for(n=p.length-1;n>=0;n--)for(r=(i=e(p[n])).length-1;r>=0;r--)(o=e.data(i[r],this.widgetFullName))&&o!==this&&!o.options.disabled&&(d.push([e.isFunction(o.options.items)?o.options.items.call(o.element[0],t,{item:this.currentItem}):e(o.options.items,o.element),o]),this.containers.push(o));for(n=d.length-1;n>=0;n--)for(a=d[n][1],r=0,u=(s=d[n][0]).length;r<u;r++)(l=e(s[r])).data(this.widgetName+"-item",a),c.push({item:l,instance:a,width:0,height:0,left:0,top:0})},refreshPositions:function(t){var n,r,i,o;for(this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset()),n=this.items.length-1;n>=0;n--)(r=this.items[n]).instance!==this.currentContainer&&this.currentContainer&&r.item[0]!==this.currentItem[0]||(i=this.options.toleranceElement?e(this.options.toleranceElement,r.item):r.item,t||(r.width=i.outerWidth(),r.height=i.outerHeight()),o=i.offset(),r.left=o.left,r.top=o.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(n=this.containers.length-1;n>=0;n--)o=this.containers[n].element.offset(),this.containers[n].containerCache.left=o.left,this.containers[n].containerCache.top=o.top,this.containers[n].containerCache.width=this.containers[n].element.outerWidth(),this.containers[n].containerCache.height=this.containers[n].element.outerHeight();return this},_createPlaceholder:function(t){var n,r=(t=t||this).options;r.placeholder&&r.placeholder.constructor!==String||(n=r.placeholder,r.placeholder={element:function(){var r=t.currentItem[0].nodeName.toLowerCase(),i=e("<"+r+">",t.document[0]).addClass(n||t.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tr"===r?t.currentItem.children().each((function(){e("<td> </td>",t.document[0]).attr("colspan",e(this).attr("colspan")||1).appendTo(i)})):"img"===r&&i.attr("src",t.currentItem.attr("src")),n||i.css("visibility","hidden"),i},update:function(e,i){n&&!r.forcePlaceholderSize||(i.height()||i.height(t.currentItem.innerHeight()-parseInt(t.currentItem.css("paddingTop")||0,10)-parseInt(t.currentItem.css("paddingBottom")||0,10)),i.width()||i.width(t.currentItem.innerWidth()-parseInt(t.currentItem.css("paddingLeft")||0,10)-parseInt(t.currentItem.css("paddingRight")||0,10)))}}),t.placeholder=e(r.placeholder.element.call(t.element,t.currentItem)),t.currentItem.after(t.placeholder),r.placeholder.update(t,t.placeholder)},_contactContainers:function(t){var i,o,a,s,l,u,c,d,p,f,h=null,g=null;for(i=this.containers.length-1;i>=0;i--)if(!e.contains(this.currentItem[0],this.containers[i].element[0]))if(this._intersectsWith(this.containers[i].containerCache)){if(h&&e.contains(this.containers[i].element[0],h.element[0]))continue;h=this.containers[i],g=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",t,this._uiHash(this)),this.containers[i].containerCache.over=0);if(h)if(1===this.containers.length)this.containers[g].containerCache.over||(this.containers[g]._trigger("over",t,this._uiHash(this)),this.containers[g].containerCache.over=1);else{for(a=1e4,s=null,l=(f=h.floating||r(this.currentItem))?"left":"top",u=f?"width":"height",c=this.positionAbs[l]+this.offset.click[l],o=this.items.length-1;o>=0;o--)e.contains(this.containers[g].element[0],this.items[o].item[0])&&this.items[o].item[0]!==this.currentItem[0]&&(f&&!n(this.positionAbs.top+this.offset.click.top,this.items[o].top,this.items[o].height)||(d=this.items[o].item.offset()[l],p=!1,Math.abs(d-c)>Math.abs(d+this.items[o][u]-c)&&(p=!0,d+=this.items[o][u]),Math.abs(d-c)<a&&(a=Math.abs(d-c),s=this.items[o],this.direction=p?"up":"down")));if(!s&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[g])return;s?this._rearrange(t,s,null,!0):this._rearrange(t,null,this.containers[g].element,!0),this._trigger("change",t,this._uiHash()),this.containers[g]._trigger("change",t,this._uiHash(this)),this.currentContainer=this.containers[g],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[g]._trigger("over",t,this._uiHash(this)),this.containers[g].containerCache.over=1}},_createHelper:function(t){var n=this.options,r=e.isFunction(n.helper)?e(n.helper.apply(this.element[0],[t,this.currentItem])):"clone"===n.helper?this.currentItem.clone():this.currentItem;return r.parents("body").length||e("parent"!==n.appendTo?n.appendTo:this.currentItem[0].parentNode)[0].appendChild(r[0]),r[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),r[0].style.width&&!n.forceHelperSize||r.width(this.currentItem.width()),r[0].style.height&&!n.forceHelperSize||r.height(this.currentItem.height()),r},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&e.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var e=this.currentItem.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,n,r,i=this.options;"parent"===i.containment&&(i.containment=this.helper[0].parentNode),"document"!==i.containment&&"window"!==i.containment||(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,e("document"===i.containment?document:window).width()-this.helperProportions.width-this.margins.left,(e("document"===i.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(i.containment)||(t=e(i.containment)[0],n=e(i.containment).offset(),r="hidden"!==e(t).css("overflow"),this.containment=[n.left+(parseInt(e(t).css("borderLeftWidth"),10)||0)+(parseInt(e(t).css("paddingLeft"),10)||0)-this.margins.left,n.top+(parseInt(e(t).css("borderTopWidth"),10)||0)+(parseInt(e(t).css("paddingTop"),10)||0)-this.margins.top,n.left+(r?Math.max(t.scrollWidth,t.offsetWidth):t.offsetWidth)-(parseInt(e(t).css("borderLeftWidth"),10)||0)-(parseInt(e(t).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,n.top+(r?Math.max(t.scrollHeight,t.offsetHeight):t.offsetHeight)-(parseInt(e(t).css("borderTopWidth"),10)||0)-(parseInt(e(t).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(t,n){n||(n=this.position);var r="absolute"===t?1:-1,i="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(i[0].tagName);return{top:n.top+this.offset.relative.top*r+this.offset.parent.top*r-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:i.scrollTop())*r,left:n.left+this.offset.relative.left*r+this.offset.parent.left*r-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:i.scrollLeft())*r}},_generatePosition:function(t){var n,r,i=this.options,o=t.pageX,a=t.pageY,s="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=/(html|body)/i.test(s[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==document&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(t.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left),t.pageY-this.offset.click.top<this.containment[1]&&(a=this.containment[1]+this.offset.click.top),t.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(a=this.containment[3]+this.offset.click.top)),i.grid&&(n=this.originalPageY+Math.round((a-this.originalPageY)/i.grid[1])*i.grid[1],a=this.containment?n-this.offset.click.top>=this.containment[1]&&n-this.offset.click.top<=this.containment[3]?n:n-this.offset.click.top>=this.containment[1]?n-i.grid[1]:n+i.grid[1]:n,r=this.originalPageX+Math.round((o-this.originalPageX)/i.grid[0])*i.grid[0],o=this.containment?r-this.offset.click.left>=this.containment[0]&&r-this.offset.click.left<=this.containment[2]?r:r-this.offset.click.left>=this.containment[0]?r-i.grid[0]:r+i.grid[0]:r)),{top:a-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():l?0:s.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():l?0:s.scrollLeft())}},_rearrange:function(e,t,n,r){n?n[0].appendChild(this.placeholder[0]):t.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?t.item[0]:t.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var i=this.counter;this._delay((function(){i===this.counter&&this.refreshPositions(!r)}))},_clear:function(e,t){this.reverting=!1;var n,r=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(n in this._storedCSS)"auto"!==this._storedCSS[n]&&"static"!==this._storedCSS[n]||(this._storedCSS[n]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();function i(e,t,n){return function(r){n._trigger(e,r,t._uiHash(t))}}for(this.fromOutside&&!t&&r.push((function(e){this._trigger("receive",e,this._uiHash(this.fromOutside))})),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||t||r.push((function(e){this._trigger("update",e,this._uiHash())})),this!==this.currentContainer&&(t||(r.push((function(e){this._trigger("remove",e,this._uiHash())})),r.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),r.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer)))),n=this.containers.length-1;n>=0;n--)t||r.push(i("deactivate",this,this.containers[n])),this.containers[n].containerCache.over&&(r.push(i("out",this,this.containers[n])),this.containers[n].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,this.cancelHelperRemoval){if(!t){for(this._trigger("beforeStop",e,this._uiHash()),n=0;n<r.length;n++)r[n].call(this,e);this._trigger("stop",e,this._uiHash())}return this.fromOutside=!1,!1}if(t||this._trigger("beforeStop",e,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null,!t){for(n=0;n<r.length;n++)r[n].call(this,e);this._trigger("stop",e,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){!1===e.Widget.prototype._trigger.apply(this,arguments)&&this.cancel()},_uiHash:function(t){var n=t||this;return{helper:n.helper,placeholder:n.placeholder||e([]),position:n.position,originalPosition:n.originalPosition,offset:n.positionAbs,item:n.currentItem,sender:t?t.element:null}}})}(r)},{"./core":14,"./mouse":15,"./widget":17,jquery:18}],17:[function(e,t,n){
|
|
72
|
-
/*!
|
|
73
|
-
* jQuery UI Widget 1.10.4
|
|
74
|
-
* http://jqueryui.com
|
|
75
|
-
*
|
|
76
|
-
* Copyright 2014 jQuery Foundation and other contributors
|
|
77
|
-
* Released under the MIT license.
|
|
78
|
-
* http://jquery.org/license
|
|
79
|
-
*
|
|
80
|
-
* http://api.jqueryui.com/jQuery.widget/
|
|
81
|
-
*/
|
|
82
|
-
!function(e,t){var n=0,r=Array.prototype.slice,i=e.cleanData;e.cleanData=function(t){for(var n,r=0;null!=(n=t[r]);r++)try{e(n).triggerHandler("remove")}catch(e){}i(t)},e.widget=function(t,n,r){var i,o,a,s,l={},u=t.split(".")[0];t=t.split(".")[1],i=u+"-"+t,r||(r=n,n=e.Widget),e.expr[":"][i.toLowerCase()]=function(t){return!!e.data(t,i)},e[u]=e[u]||{},o=e[u][t],a=e[u][t]=function(e,t){if(!this._createWidget)return new a(e,t);arguments.length&&this._createWidget(e,t)},e.extend(a,o,{version:r.version,_proto:e.extend({},r),_childConstructors:[]}),(s=new n).options=e.widget.extend({},s.options),e.each(r,(function(t,r){var i,o;e.isFunction(r)?l[t]=(i=function(){return n.prototype[t].apply(this,arguments)},o=function(e){return n.prototype[t].apply(this,e)},function(){var e,t=this._super,n=this._superApply;return this._super=i,this._superApply=o,e=r.apply(this,arguments),this._super=t,this._superApply=n,e}):l[t]=r})),a.prototype=e.widget.extend(s,{widgetEventPrefix:o&&s.widgetEventPrefix||t},l,{constructor:a,namespace:u,widgetName:t,widgetFullName:i}),o?(e.each(o._childConstructors,(function(t,n){var r=n.prototype;e.widget(r.namespace+"."+r.widgetName,a,n._proto)})),delete o._childConstructors):n._childConstructors.push(a),e.widget.bridge(t,a)},e.widget.extend=function(t){for(var n,i,o=r.call(arguments,1),a=0,s=o.length;a<s;a++)for(n in o[a])i=o[a][n],o[a].hasOwnProperty(n)&&void 0!==i&&(e.isPlainObject(i)?t[n]=e.isPlainObject(t[n])?e.widget.extend({},t[n],i):e.widget.extend({},i):t[n]=i);return t},e.widget.bridge=function(t,n){var i=n.prototype.widgetFullName||t;e.fn[t]=function(o){var a="string"==typeof o,s=r.call(arguments,1),l=this;return o=!a&&s.length?e.widget.extend.apply(null,[o].concat(s)):o,a?this.each((function(){var n,r=e.data(this,i);return r?e.isFunction(r[o])&&"_"!==o.charAt(0)?(n=r[o].apply(r,s))!==r&&void 0!==n?(l=n&&n.jquery?l.pushStack(n.get()):n,!1):void 0:e.error("no such method '"+o+"' for "+t+" widget instance"):e.error("cannot call methods on "+t+" prior to initialization; attempted to call method '"+o+"'")})):this.each((function(){var t=e.data(this,i);t?t.option(o||{})._init():e.data(this,i,new n(o,this))})),l}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,r){r=e(r||this.defaultElement||this)[0],this.element=e(r),this.uuid=n++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=e(),this.hoverable=e(),this.focusable=e(),r!==this&&(e.data(r,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===r&&this.destroy()}}),this.document=e(r.style?r.ownerDocument:r.document||r),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(t,n){var r,i,o,a=t;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof t)if(a={},r=t.split("."),t=r.shift(),r.length){for(i=a[t]=e.widget.extend({},this.options[t]),o=0;o<r.length-1;o++)i[r[o]]=i[r[o]]||{},i=i[r[o]];if(t=r.pop(),1===arguments.length)return void 0===i[t]?null:i[t];i[t]=n}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];a[t]=n}return this._setOptions(a),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!t).attr("aria-disabled",t),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(t,n,r){var i,o=this;"boolean"!=typeof t&&(r=n,n=t,t=!1),r?(n=i=e(n),this.bindings=this.bindings.add(n)):(r=n,n=this.element,i=this.widget()),e.each(r,(function(r,a){function s(){if(t||!0!==o.options.disabled&&!e(this).hasClass("ui-state-disabled"))return("string"==typeof a?o[a]:a).apply(o,arguments)}"string"!=typeof a&&(s.guid=a.guid=a.guid||s.guid||e.guid++);var l=r.match(/^(\w+)\s*(.*)$/),u=l[1]+o.eventNamespace,c=l[2];c?i.delegate(c,u,s):n.bind(u,s)}))},_off:function(e,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(t).undelegate(t)},_delay:function(e,t){var n=this;return setTimeout((function(){return("string"==typeof e?n[e]:e).apply(n,arguments)}),t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,n,r){var i,o,a=this.options[t];if(r=r||{},(n=e.Event(n)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),n.target=this.element[0],o=n.originalEvent)for(i in o)i in n||(n[i]=o[i]);return this.element.trigger(n,r),!(e.isFunction(a)&&!1===a.apply(this.element[0],[n].concat(r))||n.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},(function(t,n){e.Widget.prototype["_"+t]=function(r,i,o){"string"==typeof i&&(i={effect:i});var a,s=i?!0===i||"number"==typeof i?n:i.effect||n:t;"number"==typeof(i=i||{})&&(i={duration:i}),a=!e.isEmptyObject(i),i.complete=o,i.delay&&r.delay(i.delay),a&&e.effects&&e.effects.effect[s]?r[t](i):s!==t&&r[s]?r[s](i.duration,i.easing,o):r.queue((function(n){e(this)[t](),o&&o.call(r[0]),n()}))}}))}(e("jquery"))},{jquery:18}],18:[function(e,t,n){
|
|
83
|
-
/*!
|
|
84
|
-
* jQuery JavaScript Library v1.11.0
|
|
85
|
-
* http://jquery.com/
|
|
86
|
-
*
|
|
87
|
-
* Includes Sizzle.js
|
|
88
|
-
* http://sizzlejs.com/
|
|
89
|
-
*
|
|
90
|
-
* Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors
|
|
91
|
-
* Released under the MIT license
|
|
92
|
-
* http://jquery.org/license
|
|
93
|
-
*
|
|
94
|
-
* Date: 2014-01-23T21:02Z
|
|
95
|
-
*/
|
|
96
|
-
!function(e,n){"object"==typeof t&&"object"==typeof t.exports?t.exports=e.document?n(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(e)}("undefined"!=typeof window?window:this,(function(e,t){var n=[],r=n.slice,i=n.concat,o=n.push,a=n.indexOf,s={},l=s.toString,u=s.hasOwnProperty,c="".trim,d={},p=function(e,t){return new p.fn.init(e,t)},f=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,h=/^-ms-/,g=/-([\da-z])/gi,m=function(e,t){return t.toUpperCase()};function v(e){var t=e.length,n=p.type(e);return"function"!==n&&!p.isWindow(e)&&(!(1!==e.nodeType||!t)||"array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}p.fn=p.prototype={jquery:"1.11.0",constructor:p,selector:"",length:0,toArray:function(){return r.call(this)},get:function(e){return null!=e?e<0?this[e+this.length]:this[e]:r.call(this)},pushStack:function(e){var t=p.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return p.each(this,e,t)},map:function(e){return this.pushStack(p.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(r.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:o,sort:n.sort,splice:n.splice},p.extend=p.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,l=arguments.length,u=!1;for("boolean"==typeof a&&(u=a,a=arguments[s]||{},s++),"object"==typeof a||p.isFunction(a)||(a={}),s===l&&(a=this,s--);s<l;s++)if(null!=(i=arguments[s]))for(r in i)e=a[r],a!==(n=i[r])&&(u&&n&&(p.isPlainObject(n)||(t=p.isArray(n)))?(t?(t=!1,o=e&&p.isArray(e)?e:[]):o=e&&p.isPlainObject(e)?e:{},a[r]=p.extend(u,o,n)):void 0!==n&&(a[r]=n));return a},p.extend({expando:"jQuery"+("1.11.0"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===p.type(e)},isArray:Array.isArray||function(e){return"array"===p.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return e-parseFloat(e)>=0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},isPlainObject:function(e){var t;if(!e||"object"!==p.type(e)||e.nodeType||p.isWindow(e))return!1;try{if(e.constructor&&!u.call(e,"constructor")&&!u.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(e){return!1}if(d.ownLast)for(t in e)return u.call(e,t);for(t in e);return void 0===t||u.call(e,t)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?s[l.call(e)]||"object":typeof e},globalEval:function(t){t&&p.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(h,"ms-").replace(g,m)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r=0,i=e.length,o=v(e);if(n){if(o)for(;r<i&&!1!==t.apply(e[r],n);r++);else for(r in e)if(!1===t.apply(e[r],n))break}else if(o)for(;r<i&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:c&&!c.call("\ufeff ")?function(e){return null==e?"":c.call(e)}:function(e){return null==e?"":(e+"").replace(f,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(v(Object(e))?p.merge(n,"string"==typeof e?[e]:e):o.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(a)return a.call(t,e,n);for(r=t.length,n=n?n<0?Math.max(0,r+n):n:0;n<r;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;)e[i++]=t[r++];if(n!=n)for(;void 0!==t[r];)e[i++]=t[r++];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,o=0,a=e.length,s=[];if(v(e))for(;o<a;o++)null!=(r=t(e[o],o,n))&&s.push(r);else for(o in e)null!=(r=t(e[o],o,n))&&s.push(r);return i.apply([],s)},guid:1,proxy:function(e,t){var n,i,o;if("string"==typeof t&&(o=e[t],t=e,e=o),p.isFunction(e))return n=r.call(arguments,2),(i=function(){return e.apply(t||this,n.concat(r.call(arguments)))}).guid=e.guid=e.guid||p.guid++,i},now:function(){return+new Date},support:d}),p.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),(function(e,t){s["[object "+t+"]"]=t.toLowerCase()}));var y=
|
|
97
|
-
/*!
|
|
98
|
-
* Sizzle CSS Selector Engine v1.10.16
|
|
99
|
-
* http://sizzlejs.com/
|
|
100
|
-
*
|
|
101
|
-
* Copyright 2013 jQuery Foundation, Inc. and other contributors
|
|
102
|
-
* Released under the MIT license
|
|
103
|
-
* http://jquery.org/license
|
|
104
|
-
*
|
|
105
|
-
* Date: 2014-01-13
|
|
106
|
-
*/
|
|
107
|
-
function(e){var t,n,r,i,o,a,s,l,u,c,d,p,f,h,g,m,v,y="sizzle"+-new Date,x=e.document,b=0,E=0,C=te(),T=te(),S=te(),w=function(e,t){return e===t&&(u=!0),0},N={}.hasOwnProperty,L=[],A=L.pop,I=L.push,R=L.push,k=L.slice,_=L.indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(this[t]===e)return t;return-1},O="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",D="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",P=M.replace("w","w#"),F="\\["+D+"*("+M+")"+D+"*(?:([*^$|!~]?=)"+D+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+P+")|)|)"+D+"*\\]",j=":("+M+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+F.replace(3,8)+")*)|.*)\\)|)",B=new RegExp("^"+D+"+|((?:^|[^\\\\])(?:\\\\.)*)"+D+"+$","g"),H=new RegExp("^"+D+"*,"+D+"*"),G=new RegExp("^"+D+"*([>+~]|"+D+")"+D+"*"),U=new RegExp("="+D+"*([^\\]'\"]*?)"+D+"*\\]","g"),V=new RegExp(j),W=new RegExp("^"+P+"$"),q={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+F),PSEUDO:new RegExp("^"+j),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+D+"*(even|odd|(([+-]|)(\\d*)n|)"+D+"*(?:([+-]|)"+D+"*(\\d+)|))"+D+"*\\)|)","i"),bool:new RegExp("^(?:"+O+")$","i"),needsContext:new RegExp("^"+D+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+D+"*((?:-\\d)?\\d*)"+D+"*\\)|)(?=[^-]|$)","i")},z=/^(?:input|select|textarea|button)$/i,$=/^h\d$/i,X=/^[^{]+\{\s*\[native \w/,Q=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Y=/[+~]/,K=/'|\\/g,J=new RegExp("\\\\([\\da-f]{1,6}"+D+"?|("+D+")|.)","ig"),Z=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)};try{R.apply(L=k.call(x.childNodes),x.childNodes),L[x.childNodes.length].nodeType}catch(e){R={apply:L.length?function(e,t){I.apply(e,k.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function ee(e,t,i,o){var s,l,u,p,g,m,b,E,C,T;if((t?t.ownerDocument||t:x)!==d&&c(t),i=i||[],!e||"string"!=typeof e)return i;if(1!==(p=(t=t||d).nodeType)&&9!==p)return[];if(f&&!o){if(s=Q.exec(e))if(u=s[1]){if(9===p){if(!(l=t.getElementById(u))||!l.parentNode)return i;if(l.id===u)return i.push(l),i}else if(t.ownerDocument&&(l=t.ownerDocument.getElementById(u))&&v(t,l)&&l.id===u)return i.push(l),i}else{if(s[2])return R.apply(i,t.getElementsByTagName(e)),i;if((u=s[3])&&n.getElementsByClassName&&t.getElementsByClassName)return R.apply(i,t.getElementsByClassName(u)),i}if(n.qsa&&(!h||!h.test(e))){if(E=b=y,C=t,T=9===p&&e,1===p&&"object"!==t.nodeName.toLowerCase()){for(m=de(e),(b=t.getAttribute("id"))?E=b.replace(K,"\\$&"):t.setAttribute("id",E),E="[id='"+E+"'] ",g=m.length;g--;)m[g]=E+pe(m[g]);C=Y.test(e)&&ue(t.parentNode)||t,T=m.join(",")}if(T)try{return R.apply(i,C.querySelectorAll(T)),i}catch(e){}finally{b||t.removeAttribute("id")}}}return function(e,t,i,o){var s,l,u,c,d,p=de(e);if(!o&&1===p.length){if((l=p[0]=p[0].slice(0)).length>2&&"ID"===(u=l[0]).type&&n.getById&&9===t.nodeType&&f&&r.relative[l[1].type]){if(!(t=(r.find.ID(u.matches[0].replace(J,Z),t)||[])[0]))return i;e=e.slice(l.shift().value.length)}for(s=q.needsContext.test(e)?0:l.length;s--&&(u=l[s],!r.relative[c=u.type]);)if((d=r.find[c])&&(o=d(u.matches[0].replace(J,Z),Y.test(l[0].type)&&ue(t.parentNode)||t))){if(l.splice(s,1),!(e=o.length&&pe(l)))return R.apply(i,o),i;break}}return a(e,p)(o,t,!f,i,Y.test(e)&&ue(t.parentNode)||t),i}(e.replace(B,"$1"),t,i,o)}function te(){var e=[];return function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}}function ne(e){return e[y]=!0,e}function re(e){var t=d.createElement("div");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ie(e,t){for(var n=e.split("|"),i=e.length;i--;)r.attrHandle[n[i]]=t}function oe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||1<<31)-(~e.sourceIndex||1<<31);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function ae(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function se(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function le(e){return ne((function(t){return t=+t,ne((function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))}))}))}function ue(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=ee.support={},o=ee.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},c=ee.setDocument=function(e){var t,i=e?e.ownerDocument||e:x,a=i.defaultView;return i!==d&&9===i.nodeType&&i.documentElement?(d=i,p=i.documentElement,f=!o(i),a&&a!==a.top&&(a.addEventListener?a.addEventListener("unload",(function(){c()}),!1):a.attachEvent&&a.attachEvent("onunload",(function(){c()}))),n.attributes=re((function(e){return e.className="i",!e.getAttribute("className")})),n.getElementsByTagName=re((function(e){return e.appendChild(i.createComment("")),!e.getElementsByTagName("*").length})),n.getElementsByClassName=X.test(i.getElementsByClassName)&&re((function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length})),n.getById=re((function(e){return p.appendChild(e).id=y,!i.getElementsByName||!i.getElementsByName(y).length})),n.getById?(r.find.ID=function(e,t){if(void 0!==t.getElementById&&f){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},r.filter.ID=function(e){var t=e.replace(J,Z);return function(e){return e.getAttribute("id")===t}}):(delete r.find.ID,r.filter.ID=function(e){var t=e.replace(J,Z);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}),r.find.TAG=n.getElementsByTagName?function(e,t){if(void 0!==t.getElementsByTagName)return t.getElementsByTagName(e)}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&f)return t.getElementsByClassName(e)},g=[],h=[],(n.qsa=X.test(i.querySelectorAll))&&(re((function(e){e.innerHTML="<select t=''><option selected=''></option></select>",e.querySelectorAll("[t^='']").length&&h.push("[*^$]="+D+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||h.push("\\["+D+"*(?:value|"+O+")"),e.querySelectorAll(":checked").length||h.push(":checked")})),re((function(e){var t=i.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&h.push("name"+D+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||h.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),h.push(",.*:")}))),(n.matchesSelector=X.test(m=p.webkitMatchesSelector||p.mozMatchesSelector||p.oMatchesSelector||p.msMatchesSelector))&&re((function(e){n.disconnectedMatch=m.call(e,"div"),m.call(e,"[s!='']:x"),g.push("!=",j)})),h=h.length&&new RegExp(h.join("|")),g=g.length&&new RegExp(g.join("|")),t=X.test(p.compareDocumentPosition),v=t||X.test(p.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},w=t?function(e,t){if(e===t)return u=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e===i||e.ownerDocument===x&&v(x,e)?-1:t===i||t.ownerDocument===x&&v(x,t)?1:l?_.call(l,e)-_.call(l,t):0:4&r?-1:1)}:function(e,t){if(e===t)return u=!0,0;var n,r=0,o=e.parentNode,a=t.parentNode,s=[e],c=[t];if(!o||!a)return e===i?-1:t===i?1:o?-1:a?1:l?_.call(l,e)-_.call(l,t):0;if(o===a)return oe(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)c.unshift(n);for(;s[r]===c[r];)r++;return r?oe(s[r],c[r]):s[r]===x?-1:c[r]===x?1:0},i):d},ee.matches=function(e,t){return ee(e,null,null,t)},ee.matchesSelector=function(e,t){if((e.ownerDocument||e)!==d&&c(e),t=t.replace(U,"='$1']"),n.matchesSelector&&f&&(!g||!g.test(t))&&(!h||!h.test(t)))try{var r=m.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return ee(t,d,null,[e]).length>0},ee.contains=function(e,t){return(e.ownerDocument||e)!==d&&c(e),v(e,t)},ee.attr=function(e,t){(e.ownerDocument||e)!==d&&c(e);var i=r.attrHandle[t.toLowerCase()],o=i&&N.call(r.attrHandle,t.toLowerCase())?i(e,t,!f):void 0;return void 0!==o?o:n.attributes||!f?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},ee.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},ee.uniqueSort=function(e){var t,r=[],i=0,o=0;if(u=!n.detectDuplicates,l=!n.sortStable&&e.slice(0),e.sort(w),u){for(;t=e[o++];)t===e[o]&&(i=r.push(o));for(;i--;)e.splice(r[i],1)}return l=null,e},i=ee.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r++];)n+=i(t);return n},(r=ee.selectors={cacheLength:50,createPseudo:ne,match:q,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(J,Z),e[3]=(e[4]||e[5]||"").replace(J,Z),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||ee.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&ee.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return q.CHILD.test(e[0])?null:(e[3]&&void 0!==e[4]?e[2]=e[4]:n&&V.test(n)&&(t=de(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(J,Z).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=C[e+" "];return t||(t=new RegExp("(^|"+D+")"+e+"("+D+"|$)"))&&C(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(r){var i=ee.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var u,c,d,p,f,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,v=s&&t.nodeName.toLowerCase(),x=!l&&!s;if(m){if(o){for(;g;){for(d=t;d=d[g];)if(s?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&x){for(f=(u=(c=m[y]||(m[y]={}))[e]||[])[0]===b&&u[1],p=u[0]===b&&u[2],d=f&&m.childNodes[f];d=++f&&d&&d[g]||(p=f=0)||h.pop();)if(1===d.nodeType&&++p&&d===t){c[e]=[b,f,p];break}}else if(x&&(u=(t[y]||(t[y]={}))[e])&&u[0]===b)p=u[1];else for(;(d=++f&&d&&d[g]||(p=f=0)||h.pop())&&((s?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++p||(x&&((d[y]||(d[y]={}))[e]=[b,p]),d!==t)););return(p-=i)===r||p%r==0&&p/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||ee.error("unsupported pseudo: "+e);return i[y]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?ne((function(e,n){for(var r,o=i(e,t),a=o.length;a--;)e[r=_.call(e,o[a])]=!(n[r]=o[a])})):function(e){return i(e,0,n)}):i}},pseudos:{not:ne((function(e){var t=[],n=[],r=a(e.replace(B,"$1"));return r[y]?ne((function(e,t,n,i){for(var o,a=r(e,null,i,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))})):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}})),has:ne((function(e){return function(t){return ee(e,t).length>0}})),contains:ne((function(e){return function(t){return(t.textContent||t.innerText||i(t)).indexOf(e)>-1}})),lang:ne((function(e){return W.test(e||"")||ee.error("unsupported lang: "+e),e=e.replace(J,Z).toLowerCase(),function(t){var n;do{if(n=f?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===p},focus:function(e){return e===d.activeElement&&(!d.hasFocus||d.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return!1===e.disabled},disabled:function(e){return!0===e.disabled},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return $.test(e.nodeName)},input:function(e){return z.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:le((function(){return[0]})),last:le((function(e,t){return[t-1]})),eq:le((function(e,t,n){return[n<0?n+t:n]})),even:le((function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e})),odd:le((function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e})),lt:le((function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e})),gt:le((function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e}))}}).pseudos.nth=r.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[t]=ae(t);for(t in{submit:!0,reset:!0})r.pseudos[t]=se(t);function ce(){}function de(e,t){var n,i,o,a,s,l,u,c=T[e+" "];if(c)return t?0:c.slice(0);for(s=e,l=[],u=r.preFilter;s;){for(a in n&&!(i=H.exec(s))||(i&&(s=s.slice(i[0].length)||s),l.push(o=[])),n=!1,(i=G.exec(s))&&(n=i.shift(),o.push({value:n,type:i[0].replace(B," ")}),s=s.slice(n.length)),r.filter)!(i=q[a].exec(s))||u[a]&&!(i=u[a](i))||(n=i.shift(),o.push({value:n,type:a,matches:i}),s=s.slice(n.length));if(!n)break}return t?s.length:s?ee.error(e):T(e,l).slice(0)}function pe(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function fe(e,t,n){var r=t.dir,i=n&&"parentNode"===r,o=E++;return t.first?function(t,n,o){for(;t=t[r];)if(1===t.nodeType||i)return e(t,n,o)}:function(t,n,a){var s,l,u=[b,o];if(a){for(;t=t[r];)if((1===t.nodeType||i)&&e(t,n,a))return!0}else for(;t=t[r];)if(1===t.nodeType||i){if((s=(l=t[y]||(t[y]={}))[r])&&s[0]===b&&s[1]===o)return u[2]=s[2];if(l[r]=u,u[2]=e(t,n,a))return!0}}}function he(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function ge(e,t,n,r,i){for(var o,a=[],s=0,l=e.length,u=null!=t;s<l;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),u&&t.push(s)));return a}function me(e,t,n,r,i,o){return r&&!r[y]&&(r=me(r)),i&&!i[y]&&(i=me(i,o)),ne((function(o,a,s,l){var u,c,d,p=[],f=[],h=a.length,g=o||function(e,t,n){for(var r=0,i=t.length;r<i;r++)ee(e,t[r],n);return n}(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:ge(g,p,e,s,l),v=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,v,s,l),r)for(u=ge(v,f),r(u,[],s,l),c=u.length;c--;)(d=u[c])&&(v[f[c]]=!(m[f[c]]=d));if(o){if(i||e){if(i){for(u=[],c=v.length;c--;)(d=v[c])&&u.push(m[c]=d);i(null,v=[],u,l)}for(c=v.length;c--;)(d=v[c])&&(u=i?_.call(o,d):p[c])>-1&&(o[u]=!(a[u]=d))}}else v=ge(v===a?v.splice(h,v.length):v),i?i(null,a,v,l):R.apply(a,v)}))}function ve(e){for(var t,n,i,o=e.length,a=r.relative[e[0].type],l=a||r.relative[" "],u=a?1:0,c=fe((function(e){return e===t}),l,!0),d=fe((function(e){return _.call(t,e)>-1}),l,!0),p=[function(e,n,r){return!a&&(r||n!==s)||((t=n).nodeType?c(e,n,r):d(e,n,r))}];u<o;u++)if(n=r.relative[e[u].type])p=[fe(he(p),n)];else{if((n=r.filter[e[u].type].apply(null,e[u].matches))[y]){for(i=++u;i<o&&!r.relative[e[i].type];i++);return me(u>1&&he(p),u>1&&pe(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(B,"$1"),n,u<i&&ve(e.slice(u,i)),i<o&&ve(e=e.slice(i)),i<o&&pe(e))}p.push(n)}return he(p)}return ce.prototype=r.filters=r.pseudos,r.setFilters=new ce,a=ee.compile=function(e,t){var n,i=[],o=[],a=S[e+" "];if(!a){for(t||(t=de(e)),n=t.length;n--;)(a=ve(t[n]))[y]?i.push(a):o.push(a);a=S(e,function(e,t){var n=t.length>0,i=e.length>0,o=function(o,a,l,u,c){var p,f,h,g=0,m="0",v=o&&[],y=[],x=s,E=o||i&&r.find.TAG("*",c),C=b+=null==x?1:Math.random()||.1,T=E.length;for(c&&(s=a!==d&&a);m!==T&&null!=(p=E[m]);m++){if(i&&p){for(f=0;h=e[f++];)if(h(p,a,l)){u.push(p);break}c&&(b=C)}n&&((p=!h&&p)&&g--,o&&v.push(p))}if(g+=m,n&&m!==g){for(f=0;h=t[f++];)h(v,y,a,l);if(o){if(g>0)for(;m--;)v[m]||y[m]||(y[m]=A.call(u));y=ge(y)}R.apply(u,y),c&&!o&&y.length>0&&g+t.length>1&&ee.uniqueSort(u)}return c&&(b=C,s=x),v};return n?ne(o):o}(o,i))}return a},n.sortStable=y.split("").sort(w).join("")===y,n.detectDuplicates=!!u,c(),n.sortDetached=re((function(e){return 1&e.compareDocumentPosition(d.createElement("div"))})),re((function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")}))||ie("type|href|height|width",(function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)})),n.attributes&&re((function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}))||ie("value",(function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue})),re((function(e){return null==e.getAttribute("disabled")}))||ie(O,(function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null})),ee}(e);p.find=y,p.expr=y.selectors,p.expr[":"]=p.expr.pseudos,p.unique=y.uniqueSort,p.text=y.getText,p.isXMLDoc=y.isXML,p.contains=y.contains;var x=p.expr.match.needsContext,b=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,E=/^.[^:#\[\.,]*$/;function C(e,t,n){if(p.isFunction(t))return p.grep(e,(function(e,r){return!!t.call(e,r,e)!==n}));if(t.nodeType)return p.grep(e,(function(e){return e===t!==n}));if("string"==typeof t){if(E.test(t))return p.filter(t,e,n);t=p.filter(t,e)}return p.grep(e,(function(e){return p.inArray(e,t)>=0!==n}))}p.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?p.find.matchesSelector(r,e)?[r]:[]:p.find.matches(e,p.grep(t,(function(e){return 1===e.nodeType})))},p.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(p(e).filter((function(){for(t=0;t<i;t++)if(p.contains(r[t],this))return!0})));for(t=0;t<i;t++)p.find(e,r[t],n);return(n=this.pushStack(i>1?p.unique(n):n)).selector=this.selector?this.selector+" "+e:e,n},filter:function(e){return this.pushStack(C(this,e||[],!1))},not:function(e){return this.pushStack(C(this,e||[],!0))},is:function(e){return!!C(this,"string"==typeof e&&x.test(e)?p(e):e||[],!1).length}});var T,S=e.document,w=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;(p.fn.init=function(e,t){var n,r;if(!e)return this;if("string"==typeof e){if(!(n="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:w.exec(e))||!n[1]&&t)return!t||t.jquery?(t||T).find(e):this.constructor(t).find(e);if(n[1]){if(t=t instanceof p?t[0]:t,p.merge(this,p.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:S,!0)),b.test(n[1])&&p.isPlainObject(t))for(n in t)p.isFunction(this[n])?this[n](t[n]):this.attr(n,t[n]);return this}if((r=S.getElementById(n[2]))&&r.parentNode){if(r.id!==n[2])return T.find(e);this.length=1,this[0]=r}return this.context=S,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):p.isFunction(e)?void 0!==T.ready?T.ready(e):e(p):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),p.makeArray(e,this))}).prototype=p.fn,T=p(S);var N=/^(?:parents|prev(?:Until|All))/,L={children:!0,contents:!0,next:!0,prev:!0};function A(e,t){do{e=e[t]}while(e&&1!==e.nodeType);return e}p.extend({dir:function(e,t,n){for(var r=[],i=e[t];i&&9!==i.nodeType&&(void 0===n||1!==i.nodeType||!p(i).is(n));)1===i.nodeType&&r.push(i),i=i[t];return r},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}}),p.fn.extend({has:function(e){var t,n=p(e,this),r=n.length;return this.filter((function(){for(t=0;t<r;t++)if(p.contains(this,n[t]))return!0}))},closest:function(e,t){for(var n,r=0,i=this.length,o=[],a=x.test(e)||"string"!=typeof e?p(e,t||this.context):0;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&p.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?p.unique(o):o)},index:function(e){return e?"string"==typeof e?p.inArray(this[0],p(e)):p.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(p.unique(p.merge(this.get(),p(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),p.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return p.dir(e,"parentNode")},parentsUntil:function(e,t,n){return p.dir(e,"parentNode",n)},next:function(e){return A(e,"nextSibling")},prev:function(e){return A(e,"previousSibling")},nextAll:function(e){return p.dir(e,"nextSibling")},prevAll:function(e){return p.dir(e,"previousSibling")},nextUntil:function(e,t,n){return p.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return p.dir(e,"previousSibling",n)},siblings:function(e){return p.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return p.sibling(e.firstChild)},contents:function(e){return p.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:p.merge([],e.childNodes)}},(function(e,t){p.fn[e]=function(n,r){var i=p.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=p.filter(r,i)),this.length>1&&(L[e]||(i=p.unique(i)),N.test(e)&&(i=i.reverse())),this.pushStack(i)}}));var I,R,k=/\S+/g,_={};function O(){S.addEventListener?(S.removeEventListener("DOMContentLoaded",D,!1),e.removeEventListener("load",D,!1)):(S.detachEvent("onreadystatechange",D),e.detachEvent("onload",D))}function D(){(S.addEventListener||"load"===event.type||"complete"===S.readyState)&&(O(),p.ready())}for(R in p.Callbacks=function(e){e="string"==typeof e?_[e]||function(e){var t=_[e]={};return p.each(e.match(k)||[],(function(e,n){t[n]=!0})),t}(e):p.extend({},e);var t,n,r,i,o,a,s=[],l=!e.once&&[],u=function(d){for(n=e.memory&&d,r=!0,o=a||0,a=0,i=s.length,t=!0;s&&o<i;o++)if(!1===s[o].apply(d[0],d[1])&&e.stopOnFalse){n=!1;break}t=!1,s&&(l?l.length&&u(l.shift()):n?s=[]:c.disable())},c={add:function(){if(s){var r=s.length;!function t(n){p.each(n,(function(n,r){var i=p.type(r);"function"===i?e.unique&&c.has(r)||s.push(r):r&&r.length&&"string"!==i&&t(r)}))}(arguments),t?i=s.length:n&&(a=r,u(n))}return this},remove:function(){return s&&p.each(arguments,(function(e,n){for(var r;(r=p.inArray(n,s,r))>-1;)s.splice(r,1),t&&(r<=i&&i--,r<=o&&o--)})),this},has:function(e){return e?p.inArray(e,s)>-1:!(!s||!s.length)},empty:function(){return s=[],i=0,this},disable:function(){return s=l=n=void 0,this},disabled:function(){return!s},lock:function(){return l=void 0,n||c.disable(),this},locked:function(){return!l},fireWith:function(e,n){return!s||r&&!l||(n=[e,(n=n||[]).slice?n.slice():n],t?l.push(n):u(n)),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},p.extend({Deferred:function(e){var t=[["resolve","done",p.Callbacks("once memory"),"resolved"],["reject","fail",p.Callbacks("once memory"),"rejected"],["notify","progress",p.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return p.Deferred((function(n){p.each(t,(function(t,o){var a=p.isFunction(e[t])&&e[t];i[o[1]]((function(){var e=a&&a.apply(this,arguments);e&&p.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[o[0]+"With"](this===r?n.promise():this,a?[e]:arguments)}))})),e=null})).promise()},promise:function(e){return null!=e?p.extend(e,r):r}},i={};return r.pipe=r.then,p.each(t,(function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add((function(){n=s}),t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith})),r.promise(i),e&&e.call(i,i),i},when:function(e){var t,n,i,o=0,a=r.call(arguments),s=a.length,l=1!==s||e&&p.isFunction(e.promise)?s:0,u=1===l?e:p.Deferred(),c=function(e,n,i){return function(o){n[e]=this,i[e]=arguments.length>1?r.call(arguments):o,i===t?u.notifyWith(n,i):--l||u.resolveWith(n,i)}};if(s>1)for(t=new Array(s),n=new Array(s),i=new Array(s);o<s;o++)a[o]&&p.isFunction(a[o].promise)?a[o].promise().done(c(o,i,a)).fail(u.reject).progress(c(o,n,t)):--l;return l||u.resolveWith(i,a),u.promise()}}),p.fn.ready=function(e){return p.ready.promise().done(e),this},p.extend({isReady:!1,readyWait:1,holdReady:function(e){e?p.readyWait++:p.ready(!0)},ready:function(e){if(!(!0===e?--p.readyWait:p.isReady)){if(!S.body)return setTimeout(p.ready);p.isReady=!0,!0!==e&&--p.readyWait>0||(I.resolveWith(S,[p]),p.fn.trigger&&p(S).trigger("ready").off("ready"))}}}),p.ready.promise=function(t){if(!I)if(I=p.Deferred(),"complete"===S.readyState)setTimeout(p.ready);else if(S.addEventListener)S.addEventListener("DOMContentLoaded",D,!1),e.addEventListener("load",D,!1);else{S.attachEvent("onreadystatechange",D),e.attachEvent("onload",D);var n=!1;try{n=null==e.frameElement&&S.documentElement}catch(e){}n&&n.doScroll&&function e(){if(!p.isReady){try{n.doScroll("left")}catch(t){return setTimeout(e,50)}O(),p.ready()}}()}return I.promise(t)},p(d))break;d.ownLast="0"!==R,d.inlineBlockNeedsLayout=!1,p((function(){var e,t,n=S.getElementsByTagName("body")[0];n&&((e=S.createElement("div")).style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",t=S.createElement("div"),n.appendChild(e).appendChild(t),void 0!==t.style.zoom&&(t.style.cssText="border:0;margin:0;width:1px;padding:1px;display:inline;zoom:1",(d.inlineBlockNeedsLayout=3===t.offsetWidth)&&(n.style.zoom=1)),n.removeChild(e),e=t=null)})),function(){var e=S.createElement("div");if(null==d.deleteExpando){d.deleteExpando=!0;try{delete e.test}catch(e){d.deleteExpando=!1}}e=null}(),p.acceptData=function(e){var t=p.noData[(e.nodeName+" ").toLowerCase()],n=+e.nodeType||1;return(1===n||9===n)&&(!t||!0!==t&&e.getAttribute("classid")===t)};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,P=/([A-Z])/g;function F(e,t,n){if(void 0===n&&1===e.nodeType){var r="data-"+t.replace(P,"-$1").toLowerCase();if("string"==typeof(n=e.getAttribute(r))){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:M.test(n)?p.parseJSON(n):n)}catch(e){}p.data(e,t,n)}else n=void 0}return n}function j(e){var t;for(t in e)if(("data"!==t||!p.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function B(e,t,r,i){if(p.acceptData(e)){var o,a,s=p.expando,l=e.nodeType,u=l?p.cache:e,c=l?e[s]:e[s]&&s;if(c&&u[c]&&(i||u[c].data)||void 0!==r||"string"!=typeof t)return c||(c=l?e[s]=n.pop()||p.guid++:s),u[c]||(u[c]=l?{}:{toJSON:p.noop}),"object"!=typeof t&&"function"!=typeof t||(i?u[c]=p.extend(u[c],t):u[c].data=p.extend(u[c].data,t)),a=u[c],i||(a.data||(a.data={}),a=a.data),void 0!==r&&(a[p.camelCase(t)]=r),"string"==typeof t?null==(o=a[t])&&(o=a[p.camelCase(t)]):o=a,o}}function H(e,t,n){if(p.acceptData(e)){var r,i,o=e.nodeType,a=o?p.cache:e,s=o?e[p.expando]:p.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){i=(t=p.isArray(t)?t.concat(p.map(t,p.camelCase)):t in r||(t=p.camelCase(t))in r?[t]:t.split(" ")).length;for(;i--;)delete r[t[i]];if(n?!j(r):!p.isEmptyObject(r))return}(n||(delete a[s].data,j(a[s])))&&(o?p.cleanData([e],!0):d.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}p.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return!!(e=e.nodeType?p.cache[e[p.expando]]:e[p.expando])&&!j(e)},data:function(e,t,n){return B(e,t,n)},removeData:function(e,t){return H(e,t)},_data:function(e,t,n){return B(e,t,n,!0)},_removeData:function(e,t){return H(e,t,!0)}}),p.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=p.data(o),1===o.nodeType&&!p._data(o,"parsedAttrs"))){for(n=a.length;n--;)0===(r=a[n].name).indexOf("data-")&&F(o,r=p.camelCase(r.slice(5)),i[r]);p._data(o,"parsedAttrs",!0)}return i}return"object"==typeof e?this.each((function(){p.data(this,e)})):arguments.length>1?this.each((function(){p.data(this,e,t)})):o?F(o,e,p.data(o,e)):void 0},removeData:function(e){return this.each((function(){p.removeData(this,e)}))}}),p.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=p._data(e,t),n&&(!r||p.isArray(n)?r=p._data(e,t,p.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=p.queue(e,t),r=n.length,i=n.shift(),o=p._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,(function(){p.dequeue(e,t)}),o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return p._data(e,n)||p._data(e,n,{empty:p.Callbacks("once memory").add((function(){p._removeData(e,t+"queue"),p._removeData(e,n)}))})}}),p.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?p.queue(this[0],e):void 0===t?this:this.each((function(){var n=p.queue(this,e,t);p._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&p.dequeue(this,e)}))},dequeue:function(e){return this.each((function(){p.dequeue(this,e)}))},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=p.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)(n=p._data(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var G=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,U=["Top","Right","Bottom","Left"],V=function(e,t){return e=t||e,"none"===p.css(e,"display")||!p.contains(e.ownerDocument,e)},W=p.access=function(e,t,n,r,i,o,a){var s=0,l=e.length,u=null==n;if("object"===p.type(n))for(s in i=!0,n)p.access(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,p.isFunction(r)||(a=!0),u&&(a?(t.call(e,r),t=null):(u=t,t=function(e,t,n){return u.call(p(e),n)})),t))for(;s<l;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:u?t.call(e):l?t(e[0],n):o},q=/^(?:checkbox|radio)$/i;!function(){var e=S.createDocumentFragment(),t=S.createElement("div"),n=S.createElement("input");if(t.setAttribute("className","t"),t.innerHTML=" <link/><table></table><a href='/a'>a</a>",d.leadingWhitespace=3===t.firstChild.nodeType,d.tbody=!t.getElementsByTagName("tbody").length,d.htmlSerialize=!!t.getElementsByTagName("link").length,d.html5Clone="<:nav></:nav>"!==S.createElement("nav").cloneNode(!0).outerHTML,n.type="checkbox",n.checked=!0,e.appendChild(n),d.appendChecked=n.checked,t.innerHTML="<textarea>x</textarea>",d.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue,e.appendChild(t),t.innerHTML="<input type='radio' checked='checked' name='t'/>",d.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,d.noCloneEvent=!0,t.attachEvent&&(t.attachEvent("onclick",(function(){d.noCloneEvent=!1})),t.cloneNode(!0).click()),null==d.deleteExpando){d.deleteExpando=!0;try{delete t.test}catch(e){d.deleteExpando=!1}}e=t=n=null}(),function(){var t,n,r=S.createElement("div");for(t in{submit:!0,change:!0,focusin:!0})n="on"+t,(d[t+"Bubbles"]=n in e)||(r.setAttribute(n,"t"),d[t+"Bubbles"]=!1===r.attributes[n].expando);r=null}();var z=/^(?:input|select|textarea)$/i,$=/^key/,X=/^(?:mouse|contextmenu)|click/,Q=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;function K(){return!0}function J(){return!1}function Z(){try{return S.activeElement}catch(e){}}function ee(e){var t=te.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}p.event={global:{},add:function(e,t,n,r,i){var o,a,s,l,u,c,d,f,h,g,m,v=p._data(e);if(v){for(n.handler&&(n=(l=n).handler,i=l.selector),n.guid||(n.guid=p.guid++),(a=v.events)||(a=v.events={}),(c=v.handle)||((c=v.handle=function(e){return void 0===p||e&&p.event.triggered===e.type?void 0:p.event.dispatch.apply(c.elem,arguments)}).elem=e),s=(t=(t||"").match(k)||[""]).length;s--;)h=m=(o=Y.exec(t[s])||[])[1],g=(o[2]||"").split(".").sort(),h&&(u=p.event.special[h]||{},h=(i?u.delegateType:u.bindType)||h,u=p.event.special[h]||{},d=p.extend({type:h,origType:m,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&p.expr.match.needsContext.test(i),namespace:g.join(".")},l),(f=a[h])||((f=a[h]=[]).delegateCount=0,u.setup&&!1!==u.setup.call(e,r,g,c)||(e.addEventListener?e.addEventListener(h,c,!1):e.attachEvent&&e.attachEvent("on"+h,c))),u.add&&(u.add.call(e,d),d.handler.guid||(d.handler.guid=n.guid)),i?f.splice(f.delegateCount++,0,d):f.push(d),p.event.global[h]=!0);e=null}},remove:function(e,t,n,r,i){var o,a,s,l,u,c,d,f,h,g,m,v=p.hasData(e)&&p._data(e);if(v&&(c=v.events)){for(u=(t=(t||"").match(k)||[""]).length;u--;)if(h=m=(s=Y.exec(t[u])||[])[1],g=(s[2]||"").split(".").sort(),h){for(d=p.event.special[h]||{},f=c[h=(r?d.delegateType:d.bindType)||h]||[],s=s[2]&&new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=f.length;o--;)a=f[o],!i&&m!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,d.remove&&d.remove.call(e,a));l&&!f.length&&(d.teardown&&!1!==d.teardown.call(e,g,v.handle)||p.removeEvent(e,h,v.handle),delete c[h])}else for(h in c)p.event.remove(e,h+t[u],n,r,!0);p.isEmptyObject(c)&&(delete v.handle,p._removeData(e,"events"))}},trigger:function(t,n,r,i){var o,a,s,l,c,d,f,h=[r||S],g=u.call(t,"type")?t.type:t,m=u.call(t,"namespace")?t.namespace.split("."):[];if(s=d=r=r||S,3!==r.nodeType&&8!==r.nodeType&&!Q.test(g+p.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),a=g.indexOf(":")<0&&"on"+g,(t=t[p.expando]?t:new p.Event(g,"object"==typeof t&&t)).isTrigger=i?2:3,t.namespace=m.join("."),t.namespace_re=t.namespace?new RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:p.makeArray(n,[t]),c=p.event.special[g]||{},i||!c.trigger||!1!==c.trigger.apply(r,n))){if(!i&&!c.noBubble&&!p.isWindow(r)){for(l=c.delegateType||g,Q.test(l+g)||(s=s.parentNode);s;s=s.parentNode)h.push(s),d=s;d===(r.ownerDocument||S)&&h.push(d.defaultView||d.parentWindow||e)}for(f=0;(s=h[f++])&&!t.isPropagationStopped();)t.type=f>1?l:c.bindType||g,(o=(p._data(s,"events")||{})[t.type]&&p._data(s,"handle"))&&o.apply(s,n),(o=a&&s[a])&&o.apply&&p.acceptData(s)&&(t.result=o.apply(s,n),!1===t.result&&t.preventDefault());if(t.type=g,!i&&!t.isDefaultPrevented()&&(!c._default||!1===c._default.apply(h.pop(),n))&&p.acceptData(r)&&a&&r[g]&&!p.isWindow(r)){(d=r[a])&&(r[a]=null),p.event.triggered=g;try{r[g]()}catch(e){}p.event.triggered=void 0,d&&(r[a]=d)}return t.result}},dispatch:function(e){e=p.event.fix(e);var t,n,i,o,a,s=[],l=r.call(arguments),u=(p._data(this,"events")||{})[e.type]||[],c=p.event.special[e.type]||{};if(l[0]=e,e.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,e)){for(s=p.event.handlers.call(this,e,u),t=0;(o=s[t++])&&!e.isPropagationStopped();)for(e.currentTarget=o.elem,a=0;(i=o.handlers[a++])&&!e.isImmediatePropagationStopped();)e.namespace_re&&!e.namespace_re.test(i.namespace)||(e.handleObj=i,e.data=i.data,void 0!==(n=((p.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,l))&&!1===(e.result=n)&&(e.preventDefault(),e.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,i,o,a=[],s=t.delegateCount,l=e.target;if(s&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(!0!==l.disabled||"click"!==e.type)){for(i=[],o=0;o<s;o++)void 0===i[n=(r=t[o]).selector+" "]&&(i[n]=r.needsContext?p(n,this).index(l)>=0:p.find(n,this,null,[l]).length),i[n]&&i.push(r);i.length&&a.push({elem:l,handlers:i})}return s<t.length&&a.push({elem:this,handlers:t.slice(s)}),a},fix:function(e){if(e[p.expando])return e;var t,n,r,i=e.type,o=e,a=this.fixHooks[i];for(a||(this.fixHooks[i]=a=X.test(i)?this.mouseHooks:$.test(i)?this.keyHooks:{}),r=a.props?this.props.concat(a.props):this.props,e=new p.Event(o),t=r.length;t--;)e[n=r[t]]=o[n];return e.target||(e.target=o.srcElement||S),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,a.filter?a.filter(e,o):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,r,i,o=t.button,a=t.fromElement;return null==e.pageX&&null!=t.clientX&&(i=(r=e.target.ownerDocument||S).documentElement,n=r.body,e.pageX=t.clientX+(i&&i.scrollLeft||n&&n.scrollLeft||0)-(i&&i.clientLeft||n&&n.clientLeft||0),e.pageY=t.clientY+(i&&i.scrollTop||n&&n.scrollTop||0)-(i&&i.clientTop||n&&n.clientTop||0)),!e.relatedTarget&&a&&(e.relatedTarget=a===e.target?t.toElement:a),e.which||void 0===o||(e.which=1&o?1:2&o?3:4&o?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==Z()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){if(this===Z()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if(p.nodeName(this,"input")&&"checkbox"===this.type&&this.click)return this.click(),!1},_default:function(e){return p.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=p.extend(new p.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?p.event.trigger(i,null,t):p.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},p.removeEvent=S.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(void 0===e[r]&&(e[r]=null),e.detachEvent(r,n))},p.Event=function(e,t){if(!(this instanceof p.Event))return new p.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&(!1===e.returnValue||e.getPreventDefault&&e.getPreventDefault())?K:J):this.type=e,t&&p.extend(this,t),this.timeStamp=e&&e.timeStamp||p.now(),this[p.expando]=!0},p.Event.prototype={isDefaultPrevented:J,isPropagationStopped:J,isImmediatePropagationStopped:J,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=K,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=K,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=K,this.stopPropagation()}},p.each({mouseenter:"mouseover",mouseleave:"mouseout"},(function(e,t){p.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return i&&(i===r||p.contains(r,i))||(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}})),d.submitBubbles||(p.event.special.submit={setup:function(){if(p.nodeName(this,"form"))return!1;p.event.add(this,"click._submit keypress._submit",(function(e){var t=e.target,n=p.nodeName(t,"input")||p.nodeName(t,"button")?t.form:void 0;n&&!p._data(n,"submitBubbles")&&(p.event.add(n,"submit._submit",(function(e){e._submit_bubble=!0})),p._data(n,"submitBubbles",!0))}))},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&p.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){if(p.nodeName(this,"form"))return!1;p.event.remove(this,"._submit")}}),d.changeBubbles||(p.event.special.change={setup:function(){if(z.test(this.nodeName))return"checkbox"!==this.type&&"radio"!==this.type||(p.event.add(this,"propertychange._change",(function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)})),p.event.add(this,"click._change",(function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),p.event.simulate("change",this,e,!0)}))),!1;p.event.add(this,"beforeactivate._change",(function(e){var t=e.target;z.test(t.nodeName)&&!p._data(t,"changeBubbles")&&(p.event.add(t,"change._change",(function(e){!this.parentNode||e.isSimulated||e.isTrigger||p.event.simulate("change",this.parentNode,e,!0)})),p._data(t,"changeBubbles",!0))}))},handle:function(e){var t=e.target;if(this!==t||e.isSimulated||e.isTrigger||"radio"!==t.type&&"checkbox"!==t.type)return e.handleObj.handler.apply(this,arguments)},teardown:function(){return p.event.remove(this,"._change"),!z.test(this.nodeName)}}),d.focusinBubbles||p.each({focus:"focusin",blur:"focusout"},(function(e,t){var n=function(e){p.event.simulate(t,e.target,p.event.fix(e),!0)};p.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=p._data(r,t);i||r.addEventListener(e,n,!0),p._data(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=p._data(r,t)-1;i?p._data(r,t,i):(r.removeEventListener(e,n,!0),p._removeData(r,t))}}})),p.fn.extend({on:function(e,t,n,r,i){var o,a;if("object"==typeof e){for(o in"string"!=typeof t&&(n=n||t,t=void 0),e)this.on(o,t,n,e[o],i);return this}if(null==n&&null==r?(r=t,n=t=void 0):null==r&&("string"==typeof t?(r=n,n=void 0):(r=n,n=t,t=void 0)),!1===r)r=J;else if(!r)return this;return 1===i&&(a=r,(r=function(e){return p().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=p.guid++)),this.each((function(){p.event.add(this,e,r,n,t)}))},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,p(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=J),this.each((function(){p.event.remove(this,e,n,t)}))},trigger:function(e,t){return this.each((function(){p.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return p.event.trigger(e,t,n,!0)}});var te="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ne=/ jQuery\d+="(?:null|\d+)"/g,re=new RegExp("<(?:"+te+")[\\s/>]","i"),ie=/^\s+/,oe=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ae=/<([\w:]+)/,se=/<tbody/i,le=/<|&#?\w+;/,ue=/<(?:script|style|link)/i,ce=/checked\s*(?:[^=]|=\s*.checked.)/i,de=/^$|\/(?:java|ecma)script/i,pe=/^true\/(.*)/,fe=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,he={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:d.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},ge=ee(S).appendChild(S.createElement("div"));function me(e,t){var n,r,i=0,o=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):void 0;if(!o)for(o=[],n=e.childNodes||e;null!=(r=n[i]);i++)!t||p.nodeName(r,t)?o.push(r):p.merge(o,me(r,t));return void 0===t||t&&p.nodeName(e,t)?p.merge([e],o):o}function ve(e){q.test(e.type)&&(e.defaultChecked=e.checked)}function ye(e,t){return p.nodeName(e,"table")&&p.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function xe(e){return e.type=(null!==p.find.attr(e,"type"))+"/"+e.type,e}function be(e){var t=pe.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function Ee(e,t){for(var n,r=0;null!=(n=e[r]);r++)p._data(n,"globalEval",!t||p._data(t[r],"globalEval"))}function Ce(e,t){if(1===t.nodeType&&p.hasData(e)){var n,r,i,o=p._data(e),a=p._data(t,o),s=o.events;if(s)for(n in delete a.handle,a.events={},s)for(r=0,i=s[n].length;r<i;r++)p.event.add(t,n,s[n][r]);a.data&&(a.data=p.extend({},a.data))}}function Te(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!d.noCloneEvent&&t[p.expando]){for(r in(i=p._data(t)).events)p.removeEvent(t,r,i.handle);t.removeAttribute(p.expando)}"script"===n&&t.text!==e.text?(xe(t).text=e.text,be(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),d.html5Clone&&e.innerHTML&&!p.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&q.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}}he.optgroup=he.option,he.tbody=he.tfoot=he.colgroup=he.caption=he.thead,he.th=he.td,p.extend({clone:function(e,t,n){var r,i,o,a,s,l=p.contains(e.ownerDocument,e);if(d.html5Clone||p.isXMLDoc(e)||!re.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(ge.innerHTML=e.outerHTML,ge.removeChild(o=ge.firstChild)),!(d.noCloneEvent&&d.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||p.isXMLDoc(e)))for(r=me(o),s=me(e),a=0;null!=(i=s[a]);++a)r[a]&&Te(i,r[a]);if(t)if(n)for(s=s||me(e),r=r||me(o),a=0;null!=(i=s[a]);a++)Ce(i,r[a]);else Ce(e,o);return(r=me(o,"script")).length>0&&Ee(r,!l&&me(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){for(var i,o,a,s,l,u,c,f=e.length,h=ee(t),g=[],m=0;m<f;m++)if((o=e[m])||0===o)if("object"===p.type(o))p.merge(g,o.nodeType?[o]:o);else if(le.test(o)){for(s=s||h.appendChild(t.createElement("div")),l=(ae.exec(o)||["",""])[1].toLowerCase(),c=he[l]||he._default,s.innerHTML=c[1]+o.replace(oe,"<$1></$2>")+c[2],i=c[0];i--;)s=s.lastChild;if(!d.leadingWhitespace&&ie.test(o)&&g.push(t.createTextNode(ie.exec(o)[0])),!d.tbody)for(i=(o="table"!==l||se.test(o)?"<table>"!==c[1]||se.test(o)?0:s:s.firstChild)&&o.childNodes.length;i--;)p.nodeName(u=o.childNodes[i],"tbody")&&!u.childNodes.length&&o.removeChild(u);for(p.merge(g,s.childNodes),s.textContent="";s.firstChild;)s.removeChild(s.firstChild);s=h.lastChild}else g.push(t.createTextNode(o));for(s&&h.removeChild(s),d.appendChecked||p.grep(me(g,"input"),ve),m=0;o=g[m++];)if((!r||-1===p.inArray(o,r))&&(a=p.contains(o.ownerDocument,o),s=me(h.appendChild(o),"script"),a&&Ee(s),n))for(i=0;o=s[i++];)de.test(o.type||"")&&n.push(o);return s=null,h},cleanData:function(e,t){for(var r,i,o,a,s=0,l=p.expando,u=p.cache,c=d.deleteExpando,f=p.event.special;null!=(r=e[s]);s++)if((t||p.acceptData(r))&&(a=(o=r[l])&&u[o])){if(a.events)for(i in a.events)f[i]?p.event.remove(r,i):p.removeEvent(r,i,a.handle);u[o]&&(delete u[o],c?delete r[l]:void 0!==r.removeAttribute?r.removeAttribute(l):r[l]=null,n.push(o))}}}),p.fn.extend({text:function(e){return W(this,(function(e){return void 0===e?p.text(this):this.empty().append((this[0]&&this[0].ownerDocument||S).createTextNode(e))}),null,e,arguments.length)},append:function(){return this.domManip(arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||ye(this,e).appendChild(e)}))},prepend:function(){return this.domManip(arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=ye(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return this.domManip(arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return this.domManip(arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},remove:function(e,t){for(var n,r=e?p.filter(e,this):this,i=0;null!=(n=r[i]);i++)t||1!==n.nodeType||p.cleanData(me(n)),n.parentNode&&(t&&p.contains(n.ownerDocument,n)&&Ee(me(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&p.cleanData(me(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&p.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return p.clone(this,e,t)}))},html:function(e){return W(this,(function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e)return 1===t.nodeType?t.innerHTML.replace(ne,""):void 0;if("string"==typeof e&&!ue.test(e)&&(d.htmlSerialize||!re.test(e))&&(d.leadingWhitespace||!ie.test(e))&&!he[(ae.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(oe,"<$1></$2>");try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(p.cleanData(me(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)}),null,e,arguments.length)},replaceWith:function(){var e=arguments[0];return this.domManip(arguments,(function(t){e=this.parentNode,p.cleanData(me(this)),e&&e.replaceChild(t,this)})),e&&(e.length||e.nodeType)?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t){e=i.apply([],e);var n,r,o,a,s,l,u=0,c=this.length,f=this,h=c-1,g=e[0],m=p.isFunction(g);if(m||c>1&&"string"==typeof g&&!d.checkClone&&ce.test(g))return this.each((function(n){var r=f.eq(n);m&&(e[0]=g.call(this,n,r.html())),r.domManip(e,t)}));if(c&&(n=(l=p.buildFragment(e,this[0].ownerDocument,!1,this)).firstChild,1===l.childNodes.length&&(l=n),n)){for(o=(a=p.map(me(l,"script"),xe)).length;u<c;u++)r=l,u!==h&&(r=p.clone(r,!0,!0),o&&p.merge(a,me(r,"script"))),t.call(this[u],r,u);if(o)for(s=a[a.length-1].ownerDocument,p.map(a,be),u=0;u<o;u++)r=a[u],de.test(r.type||"")&&!p._data(r,"globalEval")&&p.contains(s,r)&&(r.src?p._evalUrl&&p._evalUrl(r.src):p.globalEval((r.text||r.textContent||r.innerHTML||"").replace(fe,"")));l=n=null}return this}}),p.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(e,t){p.fn[e]=function(e){for(var n,r=0,i=[],a=p(e),s=a.length-1;r<=s;r++)n=r===s?this:this.clone(!0),p(a[r])[t](n),o.apply(i,n.get());return this.pushStack(i)}}));var Se,we,Ne,Le,Ae={};function Ie(t,n){var r=p(n.createElement(t)).appendTo(n.body),i=e.getDefaultComputedStyle?e.getDefaultComputedStyle(r[0]).display:p.css(r[0],"display");return r.detach(),i}function Re(e){var t=S,n=Ae[e];return n||("none"!==(n=Ie(e,t))&&n||((t=((Se=(Se||p("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement))[0].contentWindow||Se[0].contentDocument).document).write(),t.close(),n=Ie(e,t),Se.detach()),Ae[e]=n),n}(Le=S.createElement("div")).innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",(we=Le.getElementsByTagName("a")[0]).style.cssText="float:left;opacity:.5",d.opacity=/^0.5/.test(we.style.opacity),d.cssFloat=!!we.style.cssFloat,Le.style.backgroundClip="content-box",Le.cloneNode(!0).style.backgroundClip="",d.clearCloneStyle="content-box"===Le.style.backgroundClip,we=Le=null,d.shrinkWrapBlocks=function(){var e,t,n;if(null==Ne){if(!(e=S.getElementsByTagName("body")[0]))return;t=S.createElement("div"),n=S.createElement("div"),e.appendChild(t).appendChild(n),Ne=!1,void 0!==n.style.zoom&&(n.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0;width:1px;padding:1px;zoom:1",n.innerHTML="<div></div>",n.firstChild.style.width="5px",Ne=3!==n.offsetWidth),e.removeChild(t),e=t=n=null}return Ne};var ke,_e,Oe=/^margin/,De=new RegExp("^("+G+")(?!px)[a-z%]+$","i"),Me=/^(top|right|bottom|left)$/;function Pe(e,t){return{get:function(){var n=e();if(null!=n){if(!n)return(this.get=t).apply(this,arguments);delete this.get}}}}e.getComputedStyle?(ke=function(e){return e.ownerDocument.defaultView.getComputedStyle(e,null)},_e=function(e,t,n){var r,i,o,a,s=e.style;return a=(n=n||ke(e))?n.getPropertyValue(t)||n[t]:void 0,n&&(""!==a||p.contains(e.ownerDocument,e)||(a=p.style(e,t)),De.test(a)&&Oe.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0===a?a:a+""}):S.documentElement.currentStyle&&(ke=function(e){return e.currentStyle},_e=function(e,t,n){var r,i,o,a,s=e.style;return null==(a=(n=n||ke(e))?n[t]:void 0)&&s&&s[t]&&(a=s[t]),De.test(a)&&!Me.test(t)&&(r=s.left,(o=(i=e.runtimeStyle)&&i.left)&&(i.left=e.currentStyle.left),s.left="fontSize"===t?"1em":a,a=s.pixelLeft+"px",s.left=r,o&&(i.left=o)),void 0===a?a:a+""||"auto"}),function(){var t,n,r,i,o,a,s=S.createElement("div"),l="border:0;width:0;height:0;position:absolute;top:0;left:-9999px";function u(){var t,n,s=S.getElementsByTagName("body")[0];s&&(t=S.createElement("div"),n=S.createElement("div"),t.style.cssText=l,s.appendChild(t).appendChild(n),n.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;display:block;padding:1px;border:1px;width:4px;margin-top:1%;top:1%",p.swap(s,null!=s.style.zoom?{zoom:1}:{},(function(){r=4===n.offsetWidth})),i=!0,o=!1,a=!0,e.getComputedStyle&&(o="1%"!==(e.getComputedStyle(n,null)||{}).top,i="4px"===(e.getComputedStyle(n,null)||{width:"4px"}).width),s.removeChild(t),n=s=null)}s.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",(t=s.getElementsByTagName("a")[0]).style.cssText="float:left;opacity:.5",d.opacity=/^0.5/.test(t.style.opacity),d.cssFloat=!!t.style.cssFloat,s.style.backgroundClip="content-box",s.cloneNode(!0).style.backgroundClip="",d.clearCloneStyle="content-box"===s.style.backgroundClip,t=s=null,p.extend(d,{reliableHiddenOffsets:function(){if(null!=n)return n;var e,t,r,i=S.createElement("div"),o=S.getElementsByTagName("body")[0];return o?(i.setAttribute("className","t"),i.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",(e=S.createElement("div")).style.cssText=l,o.appendChild(e).appendChild(i),i.innerHTML="<table><tr><td></td><td>t</td></tr></table>",(t=i.getElementsByTagName("td"))[0].style.cssText="padding:0;margin:0;border:0;display:none",r=0===t[0].offsetHeight,t[0].style.display="",t[1].style.display="none",n=r&&0===t[0].offsetHeight,o.removeChild(e),i=o=null,n):void 0},boxSizing:function(){return null==r&&u(),r},boxSizingReliable:function(){return null==i&&u(),i},pixelPosition:function(){return null==o&&u(),o},reliableMarginRight:function(){var t,n,r,i;if(null==a&&e.getComputedStyle){if(!(t=S.getElementsByTagName("body")[0]))return;n=S.createElement("div"),r=S.createElement("div"),n.style.cssText=l,t.appendChild(n).appendChild(r),(i=r.appendChild(S.createElement("div"))).style.cssText=r.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0",i.style.marginRight=i.style.width="0",r.style.width="1px",a=!parseFloat((e.getComputedStyle(i,null)||{}).marginRight),t.removeChild(n)}return a}})}(),p.swap=function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];for(o in i=n.apply(e,r||[]),t)e.style[o]=a[o];return i};var Fe=/alpha\([^)]*\)/i,je=/opacity\s*=\s*([^)]*)/,Be=/^(none|table(?!-c[ea]).+)/,He=new RegExp("^("+G+")(.*)$","i"),Ge=new RegExp("^([+-])=("+G+")","i"),Ue={position:"absolute",visibility:"hidden",display:"block"},Ve={letterSpacing:0,fontWeight:400},We=["Webkit","O","Moz","ms"];function qe(e,t){if(t in e)return t;for(var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=We.length;i--;)if((t=We[i]+n)in e)return t;return r}function ze(e,t){for(var n,r,i,o=[],a=0,s=e.length;a<s;a++)(r=e[a]).style&&(o[a]=p._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&V(r)&&(o[a]=p._data(r,"olddisplay",Re(r.nodeName)))):o[a]||(i=V(r),(n&&"none"!==n||!i)&&p._data(r,"olddisplay",i?n:p.css(r,"display"))));for(a=0;a<s;a++)(r=e[a]).style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}function $e(e,t,n){var r=He.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function Xe(e,t,n,r,i){for(var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;o<4;o+=2)"margin"===n&&(a+=p.css(e,n+U[o],!0,i)),r?("content"===n&&(a-=p.css(e,"padding"+U[o],!0,i)),"margin"!==n&&(a-=p.css(e,"border"+U[o]+"Width",!0,i))):(a+=p.css(e,"padding"+U[o],!0,i),"padding"!==n&&(a+=p.css(e,"border"+U[o]+"Width",!0,i)));return a}function Qe(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=ke(e),a=d.boxSizing()&&"border-box"===p.css(e,"boxSizing",!1,o);if(i<=0||null==i){if(((i=_e(e,t,o))<0||null==i)&&(i=e.style[t]),De.test(i))return i;r=a&&(d.boxSizingReliable()||i===e.style[t]),i=parseFloat(i)||0}return i+Xe(e,t,n||(a?"border":"content"),r,o)+"px"}function Ye(e,t,n,r,i){return new Ye.prototype.init(e,t,n,r,i)}p.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=_e(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:d.cssFloat?"cssFloat":"styleFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=p.camelCase(t),l=e.style;if(t=p.cssProps[s]||(p.cssProps[s]=qe(l,s)),a=p.cssHooks[t]||p.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];if("string"==(o=typeof n)&&(i=Ge.exec(n))&&(n=(i[1]+1)*i[2]+parseFloat(p.css(e,t)),o="number"),null!=n&&n==n&&("number"!==o||p.cssNumber[s]||(n+="px"),d.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),!a||!("set"in a)||void 0!==(n=a.set(e,n,r))))try{l[t]="",l[t]=n}catch(e){}}},css:function(e,t,n,r){var i,o,a,s=p.camelCase(t);return t=p.cssProps[s]||(p.cssProps[s]=qe(e.style,s)),(a=p.cssHooks[t]||p.cssHooks[s])&&"get"in a&&(o=a.get(e,!0,n)),void 0===o&&(o=_e(e,t,r)),"normal"===o&&t in Ve&&(o=Ve[t]),""===n||n?(i=parseFloat(o),!0===n||p.isNumeric(i)?i||0:o):o}}),p.each(["height","width"],(function(e,t){p.cssHooks[t]={get:function(e,n,r){if(n)return 0===e.offsetWidth&&Be.test(p.css(e,"display"))?p.swap(e,Ue,(function(){return Qe(e,t,r)})):Qe(e,t,r)},set:function(e,n,r){var i=r&&ke(e);return $e(0,n,r?Xe(e,t,r,d.boxSizing()&&"border-box"===p.css(e,"boxSizing",!1,i),i):0)}}})),d.opacity||(p.cssHooks.opacity={get:function(e,t){return je.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=p.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===p.trim(o.replace(Fe,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=Fe.test(o)?o.replace(Fe,i):o+" "+i)}}),p.cssHooks.marginRight=Pe(d.reliableMarginRight,(function(e,t){if(t)return p.swap(e,{display:"inline-block"},_e,[e,"marginRight"])})),p.each({margin:"",padding:"",border:"Width"},(function(e,t){p.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+U[r]+t]=o[r]||o[r-2]||o[0];return i}},Oe.test(e)||(p.cssHooks[e+t].set=$e)})),p.fn.extend({css:function(e,t){return W(this,(function(e,t,n){var r,i,o={},a=0;if(p.isArray(t)){for(r=ke(e),i=t.length;a<i;a++)o[t[a]]=p.css(e,t[a],!1,r);return o}return void 0!==n?p.style(e,t,n):p.css(e,t)}),e,t,arguments.length>1)},show:function(){return ze(this,!0)},hide:function(){return ze(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each((function(){V(this)?p(this).show():p(this).hide()}))}}),p.Tween=Ye,Ye.prototype={constructor:Ye,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(p.cssNumber[n]?"":"px")},cur:function(){var e=Ye.propHooks[this.prop];return e&&e.get?e.get(this):Ye.propHooks._default.get(this)},run:function(e){var t,n=Ye.propHooks[this.prop];return this.options.duration?this.pos=t=p.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Ye.propHooks._default.set(this),this}},Ye.prototype.init.prototype=Ye.prototype,Ye.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=p.css(e.elem,e.prop,""))&&"auto"!==t?t:0:e.elem[e.prop]},set:function(e){p.fx.step[e.prop]?p.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[p.cssProps[e.prop]]||p.cssHooks[e.prop])?p.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},Ye.propHooks.scrollTop=Ye.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},p.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},p.fx=Ye.prototype.init,p.fx.step={};var Ke,Je,Ze=/^(?:toggle|show|hide)$/,et=new RegExp("^(?:([+-])=|)("+G+")([a-z%]*)$","i"),tt=/queueHooks$/,nt=[function(e,t,n){var r,i,o,a,s,l,u,c,f=this,h={},g=e.style,m=e.nodeType&&V(e),v=p._data(e,"fxshow");for(r in n.queue||(null==(s=p._queueHooks(e,"fx")).unqueued&&(s.unqueued=0,l=s.empty.fire,s.empty.fire=function(){s.unqueued||l()}),s.unqueued++,f.always((function(){f.always((function(){s.unqueued--,p.queue(e,"fx").length||s.empty.fire()}))}))),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[g.overflow,g.overflowX,g.overflowY],u=p.css(e,"display"),c=Re(e.nodeName),"none"===u&&(u=c),"inline"===u&&"none"===p.css(e,"float")&&(d.inlineBlockNeedsLayout&&"inline"!==c?g.zoom=1:g.display="inline-block")),n.overflow&&(g.overflow="hidden",d.shrinkWrapBlocks()||f.always((function(){g.overflow=n.overflow[0],g.overflowX=n.overflow[1],g.overflowY=n.overflow[2]}))),t)if(i=t[r],Ze.exec(i)){if(delete t[r],o=o||"toggle"===i,i===(m?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;m=!0}h[r]=v&&v[r]||p.style(e,r)}if(!p.isEmptyObject(h))for(r in v?"hidden"in v&&(m=v.hidden):v=p._data(e,"fxshow",{}),o&&(v.hidden=!m),m?p(e).show():f.done((function(){p(e).hide()})),f.done((function(){var t;for(t in p._removeData(e,"fxshow"),h)p.style(e,t,h[t])})),h)a=at(m?v[r]:0,r,f),r in v||(v[r]=a.start,m&&(a.end=a.start,a.start="width"===r||"height"===r?1:0))}],rt={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=et.exec(t),o=i&&i[3]||(p.cssNumber[e]?"":"px"),a=(p.cssNumber[e]||"px"!==o&&+r)&&et.exec(p.css(n.elem,e)),s=1,l=20;if(a&&a[3]!==o){o=o||a[3],i=i||[],a=+r||1;do{a/=s=s||".5",p.style(n.elem,e,a+o)}while(s!==(s=n.cur()/r)&&1!==s&&--l)}return i&&(a=n.start=+a||+r||0,n.unit=o,n.end=i[1]?a+(i[1]+1)*i[2]:+i[2]),n}]};function it(){return setTimeout((function(){Ke=void 0})),Ke=p.now()}function ot(e,t){var n,r={height:e},i=0;for(t=t?1:0;i<4;i+=2-t)r["margin"+(n=U[i])]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function at(e,t,n){for(var r,i=(rt[t]||[]).concat(rt["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function st(e,t,n){var r,i,o=0,a=nt.length,s=p.Deferred().always((function(){delete l.elem})),l=function(){if(i)return!1;for(var t=Ke||it(),n=Math.max(0,u.startTime+u.duration-t),r=1-(n/u.duration||0),o=0,a=u.tweens.length;o<a;o++)u.tweens[o].run(r);return s.notifyWith(e,[u,r,n]),r<1&&a?n:(s.resolveWith(e,[u]),!1)},u=s.promise({elem:e,props:p.extend({},t),opts:p.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Ke||it(),duration:n.duration,tweens:[],createTween:function(t,n){var r=p.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(r),r},stop:function(t){var n=0,r=t?u.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)u.tweens[n].run(1);return t?s.resolveWith(e,[u,t]):s.rejectWith(e,[u,t]),this}}),c=u.props;for(function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=p.camelCase(n)],o=e[n],p.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=p.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,u.opts.specialEasing);o<a;o++)if(r=nt[o].call(u,e,c,u.opts))return r;return p.map(c,at,u),p.isFunction(u.opts.start)&&u.opts.start.call(e,u),p.fx.timer(p.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}p.Animation=p.extend(st,{tweener:function(e,t){p.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var n,r=0,i=e.length;r<i;r++)n=e[r],rt[n]=rt[n]||[],rt[n].unshift(t)},prefilter:function(e,t){t?nt.unshift(e):nt.push(e)}}),p.speed=function(e,t,n){var r=e&&"object"==typeof e?p.extend({},e):{complete:n||!n&&t||p.isFunction(e)&&e,duration:e,easing:n&&t||t&&!p.isFunction(t)&&t};return r.duration=p.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in p.fx.speeds?p.fx.speeds[r.duration]:p.fx.speeds._default,null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){p.isFunction(r.old)&&r.old.call(this),r.queue&&p.dequeue(this,r.queue)},r},p.fn.extend({fadeTo:function(e,t,n,r){return this.filter(V).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=p.isEmptyObject(e),o=p.speed(t,n,r),a=function(){var t=st(this,p.extend({},e),o);(i||p._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&!1!==e&&this.queue(e||"fx",[]),this.each((function(){var t=!0,i=null!=e&&e+"queueHooks",o=p.timers,a=p._data(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&tt.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));!t&&n||p.dequeue(this,e)}))},finish:function(e){return!1!==e&&(e=e||"fx"),this.each((function(){var t,n=p._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=p.timers,a=r?r.length:0;for(n.finish=!0,p.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<a;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish}))}}),p.each(["toggle","show","hide"],(function(e,t){var n=p.fn[t];p.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ot(t,!0),e,r,i)}})),p.each({slideDown:ot("show"),slideUp:ot("hide"),slideToggle:ot("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(e,t){p.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}})),p.timers=[],p.fx.tick=function(){var e,t=p.timers,n=0;for(Ke=p.now();n<t.length;n++)(e=t[n])()||t[n]!==e||t.splice(n--,1);t.length||p.fx.stop(),Ke=void 0},p.fx.timer=function(e){p.timers.push(e),e()?p.fx.start():p.timers.pop()},p.fx.interval=13,p.fx.start=function(){Je||(Je=setInterval(p.fx.tick,p.fx.interval))},p.fx.stop=function(){clearInterval(Je),Je=null},p.fx.speeds={slow:600,fast:200,_default:400},p.fn.delay=function(e,t){return e=p.fx&&p.fx.speeds[e]||e,t=t||"fx",this.queue(t,(function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}}))},function(){var e,t,n,r,i=S.createElement("div");i.setAttribute("className","t"),i.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",e=i.getElementsByTagName("a")[0],r=(n=S.createElement("select")).appendChild(S.createElement("option")),t=i.getElementsByTagName("input")[0],e.style.cssText="top:1px",d.getSetAttribute="t"!==i.className,d.style=/top/.test(e.getAttribute("style")),d.hrefNormalized="/a"===e.getAttribute("href"),d.checkOn=!!t.value,d.optSelected=r.selected,d.enctype=!!S.createElement("form").enctype,n.disabled=!0,d.optDisabled=!r.disabled,(t=S.createElement("input")).setAttribute("value",""),d.input=""===t.getAttribute("value"),t.value="t",t.setAttribute("type","radio"),d.radioValue="t"===t.value,e=t=n=r=i=null}();var lt=/\r/g;p.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=p.isFunction(e),this.each((function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,p(this).val()):e)?i="":"number"==typeof i?i+="":p.isArray(i)&&(i=p.map(i,(function(e){return null==e?"":e+""}))),(t=p.valHooks[this.type]||p.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))}))):i?(t=p.valHooks[i.type]||p.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(lt,""):null==n?"":n:void 0}}),p.extend({valHooks:{option:{get:function(e){var t=p.find.attr(e,"value");return null!=t?t:p.text(e)}},select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||i<0,a=o?null:[],s=o?i+1:r.length,l=i<0?s:o?i:0;l<s;l++)if(((n=r[l]).selected||l===i)&&(d.optDisabled?!n.disabled:null===n.getAttribute("disabled"))&&(!n.parentNode.disabled||!p.nodeName(n.parentNode,"optgroup"))){if(t=p(n).val(),o)return t;a.push(t)}return a},set:function(e,t){for(var n,r,i=e.options,o=p.makeArray(t),a=i.length;a--;)if(r=i[a],p.inArray(p.valHooks.option.get(r),o)>=0)try{r.selected=n=!0}catch(e){r.scrollHeight}else r.selected=!1;return n||(e.selectedIndex=-1),i}}}}),p.each(["radio","checkbox"],(function(){p.valHooks[this]={set:function(e,t){if(p.isArray(t))return e.checked=p.inArray(p(e).val(),t)>=0}},d.checkOn||(p.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}));var ut,ct,dt=p.expr.attrHandle,pt=/^(?:checked|selected)$/i,ft=d.getSetAttribute,ht=d.input;p.fn.extend({attr:function(e,t){return W(this,p.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each((function(){p.removeAttr(this,e)}))}}),p.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(e&&3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?p.prop(e,t,n):(1===o&&p.isXMLDoc(e)||(t=t.toLowerCase(),r=p.attrHooks[t]||(p.expr.match.bool.test(t)?ct:ut)),void 0===n?r&&"get"in r&&null!==(i=r.get(e,t))?i:null==(i=p.find.attr(e,t))?void 0:i:null!==n?r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:(e.setAttribute(t,n+""),n):void p.removeAttr(e,t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(k);if(o&&1===e.nodeType)for(;n=o[i++];)r=p.propFix[n]||n,p.expr.match.bool.test(n)?ht&&ft||!pt.test(n)?e[r]=!1:e[p.camelCase("default-"+n)]=e[r]=!1:p.attr(e,n,""),e.removeAttribute(ft?n:r)},attrHooks:{type:{set:function(e,t){if(!d.radioValue&&"radio"===t&&p.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}}}),ct={set:function(e,t,n){return!1===t?p.removeAttr(e,n):ht&&ft||!pt.test(n)?e.setAttribute(!ft&&p.propFix[n]||n,n):e[p.camelCase("default-"+n)]=e[n]=!0,n}},p.each(p.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=dt[t]||p.find.attr;dt[t]=ht&&ft||!pt.test(t)?function(e,t,r){var i,o;return r||(o=dt[t],dt[t]=i,i=null!=n(e,t,r)?t.toLowerCase():null,dt[t]=o),i}:function(e,t,n){if(!n)return e[p.camelCase("default-"+t)]?t.toLowerCase():null}})),ht&&ft||(p.attrHooks.value={set:function(e,t,n){if(!p.nodeName(e,"input"))return ut&&ut.set(e,t,n);e.defaultValue=t}}),ft||(ut={set:function(e,t,n){var r=e.getAttributeNode(n);if(r||e.setAttributeNode(r=e.ownerDocument.createAttribute(n)),r.value=t+="","value"===n||t===e.getAttribute(n))return t}},dt.id=dt.name=dt.coords=function(e,t,n){var r;if(!n)return(r=e.getAttributeNode(t))&&""!==r.value?r.value:null},p.valHooks.button={get:function(e,t){var n=e.getAttributeNode(t);if(n&&n.specified)return n.value},set:ut.set},p.attrHooks.contenteditable={set:function(e,t,n){ut.set(e,""!==t&&t,n)}},p.each(["width","height"],(function(e,t){p.attrHooks[t]={set:function(e,n){if(""===n)return e.setAttribute(t,"auto"),n}}}))),d.style||(p.attrHooks.style={get:function(e){return e.style.cssText||void 0},set:function(e,t){return e.style.cssText=t+""}});var gt=/^(?:input|select|textarea|button|object)$/i,mt=/^(?:a|area)$/i;p.fn.extend({prop:function(e,t){return W(this,p.prop,e,t,arguments.length>1)},removeProp:function(e){return e=p.propFix[e]||e,this.each((function(){try{this[e]=void 0,delete this[e]}catch(e){}}))}}),p.extend({propFix:{for:"htmlFor",class:"className"},prop:function(e,t,n){var r,i,o=e.nodeType;if(e&&3!==o&&8!==o&&2!==o)return(1!==o||!p.isXMLDoc(e))&&(t=p.propFix[t]||t,i=p.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=p.find.attr(e,"tabindex");return t?parseInt(t,10):gt.test(e.nodeName)||mt.test(e.nodeName)&&e.href?0:-1}}}}),d.hrefNormalized||p.each(["href","src"],(function(e,t){p.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}})),d.optSelected||(p.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),p.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){p.propFix[this.toLowerCase()]=this})),d.enctype||(p.propFix.enctype="encoding");var vt=/[\t\r\n\f]/g;p.fn.extend({addClass:function(e){var t,n,r,i,o,a,s=0,l=this.length,u="string"==typeof e&&e;if(p.isFunction(e))return this.each((function(t){p(this).addClass(e.call(this,t,this.className))}));if(u)for(t=(e||"").match(k)||[];s<l;s++)if(r=1===(n=this[s]).nodeType&&(n.className?(" "+n.className+" ").replace(vt," "):" ")){for(o=0;i=t[o++];)r.indexOf(" "+i+" ")<0&&(r+=i+" ");a=p.trim(r),n.className!==a&&(n.className=a)}return this},removeClass:function(e){var t,n,r,i,o,a,s=0,l=this.length,u=0===arguments.length||"string"==typeof e&&e;if(p.isFunction(e))return this.each((function(t){p(this).removeClass(e.call(this,t,this.className))}));if(u)for(t=(e||"").match(k)||[];s<l;s++)if(r=1===(n=this[s]).nodeType&&(n.className?(" "+n.className+" ").replace(vt," "):"")){for(o=0;i=t[o++];)for(;r.indexOf(" "+i+" ")>=0;)r=r.replace(" "+i+" "," ");a=e?p.trim(r):"",n.className!==a&&(n.className=a)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):p.isFunction(e)?this.each((function(n){p(this).toggleClass(e.call(this,n,this.className,t),t)})):this.each((function(){if("string"===n)for(var t,r=0,i=p(this),o=e.match(k)||[];t=o[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else"undefined"!==n&&"boolean"!==n||(this.className&&p._data(this,"__className__",this.className),this.className=this.className||!1===e?"":p._data(this,"__className__")||"")}))},hasClass:function(e){for(var t=" "+e+" ",n=0,r=this.length;n<r;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(vt," ").indexOf(t)>=0)return!0;return!1}}),p.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),(function(e,t){p.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}})),p.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var yt=p.now(),xt=/\?/,bt=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;p.parseJSON=function(t){if(e.JSON&&e.JSON.parse)return e.JSON.parse(t+"");var n,r=null,i=p.trim(t+"");return i&&!p.trim(i.replace(bt,(function(e,t,i,o){return n&&t&&(r=0),0===r?e:(n=i||t,r+=!o-!i,"")})))?Function("return "+i)():p.error("Invalid JSON: "+t)},p.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{e.DOMParser?n=(new DOMParser).parseFromString(t,"text/xml"):((n=new ActiveXObject("Microsoft.XMLDOM")).async="false",n.loadXML(t))}catch(e){n=void 0}return n&&n.documentElement&&!n.getElementsByTagName("parsererror").length||p.error("Invalid XML: "+t),n};var Et,Ct,Tt=/#.*$/,St=/([?&])_=[^&]*/,wt=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Nt=/^(?:GET|HEAD)$/,Lt=/^\/\//,At=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,It={},Rt={},kt="*/".concat("*");try{Ct=location.href}catch(e){(Ct=S.createElement("a")).href="",Ct=Ct.href}function _t(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(k)||[];if(p.isFunction(n))for(;r=o[i++];)"+"===r.charAt(0)?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function Ot(e,t,n,r){var i={},o=e===Rt;function a(s){var l;return i[s]=!0,p.each(e[s]||[],(function(e,s){var u=s(t,n,r);return"string"!=typeof u||o||i[u]?o?!(l=u):void 0:(t.dataTypes.unshift(u),a(u),!1)})),l}return a(t.dataTypes[0])||!i["*"]&&a("*")}function Dt(e,t){var n,r,i=p.ajaxSettings.flatOptions||{};for(r in t)void 0!==t[r]&&((i[r]?e:n||(n={}))[r]=t[r]);return n&&p.extend(!0,e,n),e}Et=At.exec(Ct.toLowerCase())||[],p.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ct,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Et[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":kt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":p.parseJSON,"text xml":p.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Dt(Dt(e,p.ajaxSettings),t):Dt(p.ajaxSettings,e)},ajaxPrefilter:_t(It),ajaxTransport:_t(Rt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var n,r,i,o,a,s,l,u,c=p.ajaxSetup({},t),d=c.context||c,f=c.context&&(d.nodeType||d.jquery)?p(d):p.event,h=p.Deferred(),g=p.Callbacks("once memory"),m=c.statusCode||{},v={},y={},x=0,b="canceled",E={readyState:0,getResponseHeader:function(e){var t;if(2===x){if(!u)for(u={};t=wt.exec(o);)u[t[1].toLowerCase()]=t[2];t=u[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===x?o:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return x||(e=y[n]=y[n]||e,v[e]=t),this},overrideMimeType:function(e){return x||(c.mimeType=e),this},statusCode:function(e){var t;if(e)if(x<2)for(t in e)m[t]=[m[t],e[t]];else E.always(e[E.status]);return this},abort:function(e){var t=e||b;return l&&l.abort(t),C(0,t),this}};if(h.promise(E).complete=g.add,E.success=E.done,E.error=E.fail,c.url=((e||c.url||Ct)+"").replace(Tt,"").replace(Lt,Et[1]+"//"),c.type=t.method||t.type||c.method||c.type,c.dataTypes=p.trim(c.dataType||"*").toLowerCase().match(k)||[""],null==c.crossDomain&&(n=At.exec(c.url.toLowerCase()),c.crossDomain=!(!n||n[1]===Et[1]&&n[2]===Et[2]&&(n[3]||("http:"===n[1]?"80":"443"))===(Et[3]||("http:"===Et[1]?"80":"443")))),c.data&&c.processData&&"string"!=typeof c.data&&(c.data=p.param(c.data,c.traditional)),Ot(It,c,t,E),2===x)return E;for(r in(s=c.global)&&0==p.active++&&p.event.trigger("ajaxStart"),c.type=c.type.toUpperCase(),c.hasContent=!Nt.test(c.type),i=c.url,c.hasContent||(c.data&&(i=c.url+=(xt.test(i)?"&":"?")+c.data,delete c.data),!1===c.cache&&(c.url=St.test(i)?i.replace(St,"$1_="+yt++):i+(xt.test(i)?"&":"?")+"_="+yt++)),c.ifModified&&(p.lastModified[i]&&E.setRequestHeader("If-Modified-Since",p.lastModified[i]),p.etag[i]&&E.setRequestHeader("If-None-Match",p.etag[i])),(c.data&&c.hasContent&&!1!==c.contentType||t.contentType)&&E.setRequestHeader("Content-Type",c.contentType),E.setRequestHeader("Accept",c.dataTypes[0]&&c.accepts[c.dataTypes[0]]?c.accepts[c.dataTypes[0]]+("*"!==c.dataTypes[0]?", "+kt+"; q=0.01":""):c.accepts["*"]),c.headers)E.setRequestHeader(r,c.headers[r]);if(c.beforeSend&&(!1===c.beforeSend.call(d,E,c)||2===x))return E.abort();for(r in b="abort",{success:1,error:1,complete:1})E[r](c[r]);if(l=Ot(Rt,c,t,E)){E.readyState=1,s&&f.trigger("ajaxSend",[E,c]),c.async&&c.timeout>0&&(a=setTimeout((function(){E.abort("timeout")}),c.timeout));try{x=1,l.send(v,C)}catch(e){if(!(x<2))throw e;C(-1,e)}}else C(-1,"No Transport");function C(e,t,n,r){var u,v,y,b,C,T=t;2!==x&&(x=2,a&&clearTimeout(a),l=void 0,o=r||"",E.readyState=e>0?4:0,u=e>=200&&e<300||304===e,n&&(b=function(e,t,n){for(var r,i,o,a,s=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===i&&(i=e.mimeType||t.getResponseHeader("Content-Type"));if(i)for(a in s)if(s[a]&&s[a].test(i)){l.unshift(a);break}if(l[0]in n)o=l[0];else{for(a in n){if(!l[0]||e.converters[a+" "+l[0]]){o=a;break}r||(r=a)}o=o||r}if(o)return o!==l[0]&&l.unshift(o),n[o]}(c,E,n)),b=function(e,t,n,r){var i,o,a,s,l,u={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(!(a=u[l+" "+o]||u["* "+o]))for(i in u)if((s=i.split(" "))[1]===o&&(a=u[l+" "+s[0]]||u["* "+s[0]])){!0===a?a=u[i]:!0!==u[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}(c,b,E,u),u?(c.ifModified&&((C=E.getResponseHeader("Last-Modified"))&&(p.lastModified[i]=C),(C=E.getResponseHeader("etag"))&&(p.etag[i]=C)),204===e||"HEAD"===c.type?T="nocontent":304===e?T="notmodified":(T=b.state,v=b.data,u=!(y=b.error))):(y=T,!e&&T||(T="error",e<0&&(e=0))),E.status=e,E.statusText=(t||T)+"",u?h.resolveWith(d,[v,T,E]):h.rejectWith(d,[E,T,y]),E.statusCode(m),m=void 0,s&&f.trigger(u?"ajaxSuccess":"ajaxError",[E,c,u?v:y]),g.fireWith(d,[E,T]),s&&(f.trigger("ajaxComplete",[E,c]),--p.active||p.event.trigger("ajaxStop")))}return E},getJSON:function(e,t,n){return p.get(e,t,n,"json")},getScript:function(e,t){return p.get(e,void 0,t,"script")}}),p.each(["get","post"],(function(e,t){p[t]=function(e,n,r,i){return p.isFunction(n)&&(i=i||r,r=n,n=void 0),p.ajax({url:e,type:t,dataType:i,data:n,success:r})}})),p.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(e,t){p.fn[t]=function(e){return this.on(t,e)}})),p._evalUrl=function(e){return p.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})},p.fn.extend({wrapAll:function(e){if(p.isFunction(e))return this.each((function(t){p(this).wrapAll(e.call(this,t))}));if(this[0]){var t=p(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e})).append(this)}return this},wrapInner:function(e){return p.isFunction(e)?this.each((function(t){p(this).wrapInner(e.call(this,t))})):this.each((function(){var t=p(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=p.isFunction(e);return this.each((function(n){p(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(){return this.parent().each((function(){p.nodeName(this,"body")||p(this).replaceWith(this.childNodes)})).end()}}),p.expr.filters.hidden=function(e){return e.offsetWidth<=0&&e.offsetHeight<=0||!d.reliableHiddenOffsets()&&"none"===(e.style&&e.style.display||p.css(e,"display"))},p.expr.filters.visible=function(e){return!p.expr.filters.hidden(e)};var Mt=/%20/g,Pt=/\[\]$/,Ft=/\r?\n/g,jt=/^(?:submit|button|image|reset|file)$/i,Bt=/^(?:input|select|textarea|keygen)/i;function Ht(e,t,n,r){var i;if(p.isArray(t))p.each(t,(function(t,i){n||Pt.test(e)?r(e,i):Ht(e+"["+("object"==typeof i?t:"")+"]",i,n,r)}));else if(n||"object"!==p.type(t))r(e,t);else for(i in t)Ht(e+"["+i+"]",t[i],n,r)}p.param=function(e,t){var n,r=[],i=function(e,t){t=p.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=p.ajaxSettings&&p.ajaxSettings.traditional),p.isArray(e)||e.jquery&&!p.isPlainObject(e))p.each(e,(function(){i(this.name,this.value)}));else for(n in e)Ht(n,e[n],t,i);return r.join("&").replace(Mt,"+")},p.fn.extend({serialize:function(){return p.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=p.prop(this,"elements");return e?p.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!p(this).is(":disabled")&&Bt.test(this.nodeName)&&!jt.test(e)&&(this.checked||!q.test(e))})).map((function(e,t){var n=p(this).val();return null==n?null:p.isArray(n)?p.map(n,(function(e){return{name:t.name,value:e.replace(Ft,"\r\n")}})):{name:t.name,value:n.replace(Ft,"\r\n")}})).get()}}),p.ajaxSettings.xhr=void 0!==e.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&Wt()||function(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(e){}}()}:Wt;var Gt=0,Ut={},Vt=p.ajaxSettings.xhr();function Wt(){try{return new e.XMLHttpRequest}catch(e){}}e.ActiveXObject&&p(e).on("unload",(function(){for(var e in Ut)Ut[e](void 0,!0)})),d.cors=!!Vt&&"withCredentials"in Vt,(Vt=d.ajax=!!Vt)&&p.ajaxTransport((function(e){var t;if(!e.crossDomain||d.cors)return{send:function(n,r){var i,o=e.xhr(),a=++Gt;if(o.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(i in e.xhrFields)o[i]=e.xhrFields[i];for(i in e.mimeType&&o.overrideMimeType&&o.overrideMimeType(e.mimeType),e.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest"),n)void 0!==n[i]&&o.setRequestHeader(i,n[i]+"");o.send(e.hasContent&&e.data||null),t=function(n,i){var s,l,u;if(t&&(i||4===o.readyState))if(delete Ut[a],t=void 0,o.onreadystatechange=p.noop,i)4!==o.readyState&&o.abort();else{u={},s=o.status,"string"==typeof o.responseText&&(u.text=o.responseText);try{l=o.statusText}catch(e){l=""}s||!e.isLocal||e.crossDomain?1223===s&&(s=204):s=u.text?200:404}u&&r(s,l,u,o.getAllResponseHeaders())},e.async?4===o.readyState?setTimeout(t):o.onreadystatechange=Ut[a]=t:t()},abort:function(){t&&t(void 0,!0)}}})),p.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return p.globalEval(e),e}}}),p.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)})),p.ajaxTransport("script",(function(e){if(e.crossDomain){var t,n=S.head||p("head")[0]||S.documentElement;return{send:function(r,i){(t=S.createElement("script")).async=!0,e.scriptCharset&&(t.charset=e.scriptCharset),t.src=e.url,t.onload=t.onreadystatechange=function(e,n){(n||!t.readyState||/loaded|complete/.test(t.readyState))&&(t.onload=t.onreadystatechange=null,t.parentNode&&t.parentNode.removeChild(t),t=null,n||i(200,"success"))},n.insertBefore(t,n.firstChild)},abort:function(){t&&t.onload(void 0,!0)}}}}));var qt=[],zt=/(=)\?(?=&|$)|\?\?/;p.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=qt.pop()||p.expando+"_"+yt++;return this[e]=!0,e}}),p.ajaxPrefilter("json jsonp",(function(t,n,r){var i,o,a,s=!1!==t.jsonp&&(zt.test(t.url)?"url":"string"==typeof t.data&&!(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&zt.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=p.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(zt,"$1"+i):!1!==t.jsonp&&(t.url+=(xt.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||p.error(i+" was not called"),a[0]},t.dataTypes[0]="json",o=e[i],e[i]=function(){a=arguments},r.always((function(){e[i]=o,t[i]&&(t.jsonpCallback=n.jsonpCallback,qt.push(i)),a&&p.isFunction(o)&&o(a[0]),a=o=void 0})),"script"})),p.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||S;var r=b.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=p.buildFragment([e],t,i),i&&i.length&&p(i).remove(),p.merge([],r.childNodes))};var $t=p.fn.load;p.fn.load=function(e,t,n){if("string"!=typeof e&&$t)return $t.apply(this,arguments);var r,i,o,a=this,s=e.indexOf(" ");return s>=0&&(r=e.slice(s,e.length),e=e.slice(0,s)),p.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(o="POST"),a.length>0&&p.ajax({url:e,type:o,dataType:"html",data:t}).done((function(e){i=arguments,a.html(r?p("<div>").append(p.parseHTML(e)).find(r):e)})).complete(n&&function(e,t){a.each(n,i||[e.responseText,t,e])}),this},p.expr.filters.animated=function(e){return p.grep(p.timers,(function(t){return e===t.elem})).length};var Xt=e.document.documentElement;function Qt(e){return p.isWindow(e)?e:9===e.nodeType&&(e.defaultView||e.parentWindow)}p.offset={setOffset:function(e,t,n){var r,i,o,a,s,l,u=p.css(e,"position"),c=p(e),d={};"static"===u&&(e.style.position="relative"),s=c.offset(),o=p.css(e,"top"),l=p.css(e,"left"),("absolute"===u||"fixed"===u)&&p.inArray("auto",[o,l])>-1?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(l)||0),p.isFunction(t)&&(t=t.call(e,n,s)),null!=t.top&&(d.top=t.top-s.top+a),null!=t.left&&(d.left=t.left-s.left+i),"using"in t?t.using.call(e,d):c.css(d)}},p.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each((function(t){p.offset.setOffset(this,e,t)}));var t,n,r={top:0,left:0},i=this[0],o=i&&i.ownerDocument;return o?(t=o.documentElement,p.contains(t,i)?(void 0!==i.getBoundingClientRect&&(r=i.getBoundingClientRect()),n=Qt(o),{top:r.top+(n.pageYOffset||t.scrollTop)-(t.clientTop||0),left:r.left+(n.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}):r):void 0},position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===p.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),p.nodeName(e[0],"html")||(n=e.offset()),n.top+=p.css(e[0],"borderTopWidth",!0),n.left+=p.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-p.css(r,"marginTop",!0),left:t.left-n.left-p.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent||Xt;e&&!p.nodeName(e,"html")&&"static"===p.css(e,"position");)e=e.offsetParent;return e||Xt}))}}),p.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(e,t){var n=/Y/.test(t);p.fn[e]=function(r){return W(this,(function(e,r,i){var o=Qt(e);if(void 0===i)return o?t in o?o[t]:o.document.documentElement[r]:e[r];o?o.scrollTo(n?p(o).scrollLeft():i,n?i:p(o).scrollTop()):e[r]=i}),e,r,arguments.length,null)}})),p.each(["top","left"],(function(e,t){p.cssHooks[t]=Pe(d.pixelPosition,(function(e,n){if(n)return n=_e(e,t),De.test(n)?p(e).position()[t]+"px":n}))})),p.each({Height:"height",Width:"width"},(function(e,t){p.each({padding:"inner"+e,content:t,"":"outer"+e},(function(n,r){p.fn[r]=function(r,i){var o=arguments.length&&(n||"boolean"!=typeof r),a=n||(!0===r||!0===i?"margin":"border");return W(this,(function(t,n,r){var i;return p.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(i=t.documentElement,Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])):void 0===r?p.css(t,n,a):p.style(t,n,r,a)}),t,o?r:void 0,o,null)}}))})),p.fn.size=function(){return this.length},p.fn.andSelf=p.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],(function(){return p}));var Yt=e.jQuery,Kt=e.$;return p.noConflict=function(t){return e.$===p&&(e.$=Kt),t&&e.jQuery===p&&(e.jQuery=Yt),p},void 0===t&&(e.jQuery=e.$=p),p}))},{}],19:[function(e,t,n){(function(e){(function(){var r,i,o="Expected a function",a="__lodash_placeholder__",s="[object Arguments]",l="[object Array]",u="[object Boolean]",c="[object Date]",d="[object Error]",p="[object Function]",f="[object Number]",h="[object Object]",g="[object RegExp]",m="[object String]",v="[object Float32Array]",y="[object Float64Array]",x="[object Int8Array]",b="[object Int16Array]",E="[object Int32Array]",C="[object Uint8Array]",T="[object Uint16Array]",S="[object Uint32Array]",w=/\b__p \+= '';/g,N=/\b(__p \+=) '' \+/g,L=/(__e\(.*?\)|\b__t\)) \+\n'';/g,A=/&(?:amp|lt|gt|quot|#39|#96);/g,I=/[&<>"'`]/g,R=RegExp(A.source),k=RegExp(I.source),_=/<%-([\s\S]+?)%>/g,O=/<%([\s\S]+?)%>/g,D=/<%=([\s\S]+?)%>/g,M=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,P=/^\w*$/,F=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,j=/^[:!,]|[\\^$.*+?()[\]{}|\/]|(^[0-9a-fA-Fnrtuvx])|([\n\r\u2028\u2029])/g,B=RegExp(j.source),H=/[\u0300-\u036f\ufe20-\ufe23]/g,G=/\\(\\)?/g,U=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,V=/\w*$/,W=/^0[xX]/,q=/^\[object .+?Constructor\]$/,z=/^\d+$/,$=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,X=/($^)/,Q=/['\n\r\u2028\u2029\\]/g,Y=(r="[A-Z\\xc0-\\xd6\\xd8-\\xde]",i="[a-z\\xdf-\\xf6\\xf8-\\xff]+",RegExp(r+"+(?="+r+i+")|"+r+"?"+i+"|"+r+"+|[0-9]+","g")),K=["Array","ArrayBuffer","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Math","Number","Object","RegExp","Set","String","_","clearTimeout","isFinite","parseFloat","parseInt","setTimeout","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap"],J=-1,Z={};Z[v]=Z[y]=Z[x]=Z[b]=Z[E]=Z[C]=Z["[object Uint8ClampedArray]"]=Z[T]=Z[S]=!0,Z[s]=Z[l]=Z["[object ArrayBuffer]"]=Z[u]=Z[c]=Z[d]=Z[p]=Z["[object Map]"]=Z[f]=Z[h]=Z[g]=Z["[object Set]"]=Z[m]=Z["[object WeakMap]"]=!1;var ee={};ee[s]=ee[l]=ee["[object ArrayBuffer]"]=ee[u]=ee[c]=ee[v]=ee[y]=ee[x]=ee[b]=ee[E]=ee[f]=ee[h]=ee[g]=ee[m]=ee[C]=ee["[object Uint8ClampedArray]"]=ee[T]=ee[S]=!0,ee[d]=ee[p]=ee["[object Map]"]=ee["[object Set]"]=ee["[object WeakMap]"]=!1;var te={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss"},ne={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},re={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},ie={function:!0,object:!0},oe={0:"x30",1:"x31",2:"x32",3:"x33",4:"x34",5:"x35",6:"x36",7:"x37",8:"x38",9:"x39",A:"x41",B:"x42",C:"x43",D:"x44",E:"x45",F:"x46",a:"x61",b:"x62",c:"x63",d:"x64",e:"x65",f:"x66",n:"x6e",r:"x72",t:"x74",u:"x75",v:"x76",x:"x78"},ae={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},se=ie[typeof n]&&n&&!n.nodeType&&n,le=ie[typeof t]&&t&&!t.nodeType&&t,ue=se&&le&&"object"==typeof e&&e&&e.Object&&e,ce=ie[typeof self]&&self&&self.Object&&self,de=ie[typeof window]&&window&&window.Object&&window,pe=le&&le.exports===se&&se,fe=ue||de!==(this&&this.window)&&de||ce||this;function he(e,t){if(e!==t){var n=null===e,r=void 0===e,i=e==e,o=null===t,a=void 0===t,s=t==t;if(e>t&&!o||!i||n&&!a&&s||r&&s)return 1;if(e<t&&!n||!s||o&&!r&&i||a&&i)return-1}return 0}function ge(e,t,n){for(var r=e.length,i=n?r:-1;n?i--:++i<r;)if(t(e[i],i,e))return i;return-1}function me(e,t,n){if(t!=t)return Ne(e,n);for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function ve(e){return"function"==typeof e||!1}function ye(e){return null==e?"":e+""}function xe(e,t){for(var n=-1,r=e.length;++n<r&&t.indexOf(e.charAt(n))>-1;);return n}function be(e,t){for(var n=e.length;n--&&t.indexOf(e.charAt(n))>-1;);return n}function Ee(e,t){return he(e.criteria,t.criteria)||e.index-t.index}function Ce(e){return te[e]}function Te(e){return ne[e]}function Se(e,t,n){return t?e=oe[e]:n&&(e=ae[e]),"\\"+e}function we(e){return"\\"+ae[e]}function Ne(e,t,n){for(var r=e.length,i=t+(n?0:-1);n?i--:++i<r;){var o=e[i];if(o!=o)return i}return-1}function Le(e){return!!e&&"object"==typeof e}function Ae(e){return e<=160&&e>=9&&e<=13||32==e||160==e||5760==e||6158==e||e>=8192&&(e<=8202||8232==e||8233==e||8239==e||8287==e||12288==e||65279==e)}function Ie(e,t){for(var n=-1,r=e.length,i=-1,o=[];++n<r;)e[n]===t&&(e[n]=a,o[++i]=n);return o}function Re(e){for(var t=-1,n=e.length;++t<n&&Ae(e.charCodeAt(t)););return t}function ke(e){for(var t=e.length;t--&&Ae(e.charCodeAt(t)););return t}function _e(e){return re[e]}var Oe=function e(t){var n=(t=t?Oe.defaults(fe.Object(),t,Oe.pick(fe,K)):fe).Array,r=t.Date,i=t.Error,te=t.Function,ne=t.Math,re=t.Number,ie=t.Object,oe=t.RegExp,ae=t.String,se=t.TypeError,le=n.prototype,ue=ie.prototype,ce=ae.prototype,de=te.prototype.toString,pe=ue.hasOwnProperty,Ae=0,De=ue.toString,Me=fe._,Pe=oe("^"+de.call(pe).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Fe=t.ArrayBuffer,je=t.clearTimeout,Be=t.parseFloat,He=ne.pow,Ge=ue.propertyIsEnumerable,Ue=Jn(t,"Set"),Ve=t.setTimeout,We=le.splice,qe=t.Uint8Array,ze=Jn(t,"WeakMap"),$e=ne.ceil,Xe=Jn(ie,"create"),Qe=ne.floor,Ye=Jn(n,"isArray"),Ke=t.isFinite,Je=Jn(ie,"keys"),Ze=ne.max,et=ne.min,tt=Jn(r,"now"),nt=t.parseInt,rt=ne.random,it=re.NEGATIVE_INFINITY,ot=re.POSITIVE_INFINITY,at=ze&&new ze,st={};function lt(e){if(Le(e)&&!Li(e)&&!(e instanceof dt)){if(e instanceof ct)return e;if(pe.call(e,"__chain__")&&pe.call(e,"__wrapped__"))return vr(e)}return new ct(e)}function ut(){}function ct(e,t,n){this.__wrapped__=e,this.__actions__=n||[],this.__chain__=!!t}function dt(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ot,this.__views__=[]}function pt(){this.__data__={}}function ft(e){var t=e?e.length:0;for(this.data={hash:Xe(null),set:new Ue};t--;)this.push(e[t])}function ht(e,t){var n=e.data;return("string"==typeof t||ki(t)?n.set.has(t):n.hash[t])?0:-1}function gt(e,t){var r=-1,i=e.length;for(t||(t=n(i));++r<i;)t[r]=e[r];return t}function mt(e,t){for(var n=-1,r=e.length;++n<r&&!1!==t(e[n],n,e););return e}function vt(e,t){for(var n=-1,r=e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function yt(e,t){for(var n=-1,r=e.length,i=-1,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[++i]=a)}return o}function xt(e,t){for(var r=-1,i=e.length,o=n(i);++r<i;)o[r]=t(e[r],r,e);return o}function bt(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function Et(e,t,n,r){var i=-1,o=e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function Ct(e,t){for(var n=-1,r=e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function Tt(e,t,n,r){return void 0!==e&&pe.call(r,n)?e:t}function St(e,t,n){for(var r=-1,i=Ji(t),o=i.length;++r<o;){var a=i[r],s=e[a],l=n(s,t[a],a,e,t);((l==l?l!==s:s==s)||void 0===s&&!(a in e))&&(e[a]=l)}return e}function wt(e,t){return null==t?e:Lt(t,Ji(t),e)}function Nt(e,t){for(var r=-1,i=null==e,o=!i&&er(e),a=o?e.length:0,s=t.length,l=n(s);++r<s;){var u=t[r];l[r]=o?tr(u,a)?e[u]:void 0:i?void 0:e[u]}return l}function Lt(e,t,n){n||(n={});for(var r=-1,i=t.length;++r<i;){var o=t[r];n[o]=e[o]}return n}function At(e,t,n){var r=typeof e;return"function"==r?void 0===t?e:fn(e,t,n):null==e?xo:"object"==r?Qt(e):void 0===t?wo(e):Yt(e,t)}function It(e,t,n,r,i,o,a){var l;if(n&&(l=i?n(e,r,i):n(e)),void 0!==l)return l;if(!ki(e))return e;var d=Li(e);if(d){if(l=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&pe.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!t)return gt(e,l)}else{var w=De.call(e),N=w==p;if(w!=h&&w!=s&&(!N||i))return ee[w]?function(e,t,n){var r=e.constructor;switch(t){case"[object ArrayBuffer]":return hn(e);case u:case c:return new r(+e);case v:case y:case x:case b:case E:case C:case"[object Uint8ClampedArray]":case T:case S:var i=e.buffer;return new r(n?hn(i):i,e.byteOffset,e.length);case f:case m:return new r(e);case g:var o=new r(e.source,V.exec(e));o.lastIndex=e.lastIndex}return o}(e,w,t):i?e:{};if(l=function(e){var t=e.constructor;return"function"==typeof t&&t instanceof t||(t=ie),new t}(N?{}:e),!t)return wt(l,e)}o||(o=[]),a||(a=[]);for(var L=o.length;L--;)if(o[L]==e)return a[L];return o.push(e),a.push(l),(d?mt:Ut)(e,(function(r,i){l[i]=It(r,t,n,i,e,o,a)})),l}lt.support={},lt.templateSettings={escape:_,evaluate:O,interpolate:D,variable:"",imports:{_:lt}};var Rt=function(){function e(){}return function(t){if(ki(t)){e.prototype=t;var n=new e;e.prototype=void 0}return n||{}}}();function kt(e,t,n){if("function"!=typeof e)throw new se(o);return Ve((function(){e.apply(void 0,n)}),t)}function _t(e,t){var n=e?e.length:0,r=[];if(!n)return r;var i=-1,o=Qn(),a=o==me,s=a&&t.length>=200?En(t):null,l=t.length;s&&(o=ht,a=!1,t=s);e:for(;++i<n;){var u=e[i];if(a&&u==u){for(var c=l;c--;)if(t[c]===u)continue e;r.push(u)}else o(t,u,0)<0&&r.push(u)}return r}var Ot=xn(Ut),Dt=xn(Vt,!0);function Mt(e,t){var n=!0;return Ot(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function Pt(e,t){var n=[];return Ot(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function Ft(e,t,n,r){var i;return n(e,(function(e,n,o){if(t(e,n,o))return i=r?n:e,!1})),i}function jt(e,t,n,r){r||(r=[]);for(var i=-1,o=e.length;++i<o;){var a=e[i];Le(a)&&er(a)&&(n||Li(a)||Ni(a))?t?jt(a,t,n,r):bt(r,a):n||(r[r.length]=a)}return r}var Bt=bn(),Ht=bn(!0);function Gt(e,t){return Bt(e,t,Zi)}function Ut(e,t){return Bt(e,t,Ji)}function Vt(e,t){return Ht(e,t,Ji)}function Wt(e,t){for(var n=-1,r=t.length,i=-1,o=[];++n<r;){var a=t[n];Ri(e[a])&&(o[++i]=a)}return o}function qt(e,t,n){if(null!=e){void 0!==n&&n in gr(e)&&(t=[n]);for(var r=0,i=t.length;null!=e&&r<i;)e=e[t[r++]];return r&&r==i?e:void 0}}function zt(e,t,n,r,i,o){return e===t||(null==e||null==t||!ki(e)&&!Le(t)?e!=e&&t!=t:function(e,t,n,r,i,o,a){var p=Li(e),v=Li(t),y=l,x=l;p||((y=De.call(e))==s?y=h:y!=h&&(p=Fi(e))),v||((x=De.call(t))==s?x=h:x!=h&&(v=Fi(t)));var b=y==h,E=x==h,C=y==x;if(C&&!p&&!b)return function(e,t,n){switch(n){case u:case c:return+e==+t;case d:return e.name==t.name&&e.message==t.message;case f:return e!=+e?t!=+t:e==+t;case g:case m:return e==t+""}return!1}(e,t,y);if(!i){var T=b&&pe.call(e,"__wrapped__"),S=E&&pe.call(t,"__wrapped__");if(T||S)return n(T?e.value():e,S?t.value():t,r,i,o,a)}if(!C)return!1;o||(o=[]),a||(a=[]);for(var w=o.length;w--;)if(o[w]==e)return a[w]==t;o.push(e),a.push(t);var N=(p?Wn:qn)(e,t,n,r,i,o,a);return o.pop(),a.pop(),N}(e,t,zt,n,r,i,o))}function $t(e,t,n){var r=t.length,i=r,o=!n;if(null==e)return!i;for(e=gr(e);r--;){var a=t[r];if(o&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++r<i;){var s=(a=t[r])[0],l=e[s],u=a[1];if(o&&a[2]){if(void 0===l&&!(s in e))return!1}else{var c=n?n(l,u,s):void 0;if(!(void 0===c?zt(u,l,n,!0):c))return!1}}return!0}function Xt(e,t){var r=-1,i=er(e)?n(e.length):[];return Ot(e,(function(e,n,o){i[++r]=t(e,n,o)})),i}function Qt(e){var t=Kn(e);if(1==t.length&&t[0][2]){var n=t[0][0],r=t[0][1];return function(e){return null!=e&&e[n]===r&&(void 0!==r||n in gr(e))}}return function(e){return $t(e,t)}}function Yt(e,t){var n=Li(e),r=rr(e)&&ar(t),i=e+"";return e=mr(e),function(o){if(null==o)return!1;var a=i;if(o=gr(o),(n||!r)&&!(a in o)){if(null==(o=1==e.length?o:qt(o,nn(e,0,-1))))return!1;a=Nr(e),o=gr(o)}return o[a]===t?void 0!==t||a in o:zt(t,o[a],void 0,!0)}}function Kt(e){return function(t){return null==t?void 0:t[e]}}function Jt(e,t){for(var n=e?t.length:0;n--;){var r=t[n];if(r!=i&&tr(r)){var i=r;We.call(e,r,1)}}return e}function Zt(e,t){return e+Qe(rt()*(t-e+1))}function en(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n}var tn=at?function(e,t){return at.set(e,t),e}:xo;function nn(e,t,r){var i=-1,o=e.length;(t=null==t?0:+t||0)<0&&(t=-t>o?0:o+t),(r=void 0===r||r>o?o:+r||0)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var a=n(o);++i<o;)a[i]=e[i+t];return a}function rn(e,t){var n;return Ot(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function on(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}function an(e,t,n){var r=zn(),i=-1;return t=xt(t,(function(e){return r(e)})),on(Xt(e,(function(e){return{criteria:xt(t,(function(t){return t(e)})),index:++i,value:e}})),(function(e,t){return function(e,t,n){for(var r=-1,i=e.criteria,o=t.criteria,a=i.length,s=n.length;++r<a;){var l=he(i[r],o[r]);if(l){if(r>=s)return l;var u=n[r];return l*("asc"===u||!0===u?1:-1)}}return e.index-t.index}(e,t,n)}))}function sn(e,t){var n=-1,r=Qn(),i=e.length,o=r==me,a=o&&i>=200,s=a?En():null,l=[];s?(r=ht,o=!1):(a=!1,s=t?[]:l);e:for(;++n<i;){var u=e[n],c=t?t(u,n,e):u;if(o&&u==u){for(var d=s.length;d--;)if(s[d]===c)continue e;t&&s.push(c),l.push(u)}else r(s,c,0)<0&&((t||a)&&s.push(c),l.push(u))}return l}function ln(e,t){for(var r=-1,i=t.length,o=n(i);++r<i;)o[r]=e[t[r]];return o}function un(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?nn(e,r?0:o,r?o+1:i):nn(e,r?o+1:0,r?i:o)}function cn(e,t){var n=e;n instanceof dt&&(n=n.value());for(var r=-1,i=t.length;++r<i;){var o=t[r];n=o.func.apply(o.thisArg,bt([n],o.args))}return n}function dn(e,t,n){var r=0,i=e?e.length:r;if("number"==typeof t&&t==t&&i<=2147483647){for(;r<i;){var o=r+i>>>1,a=e[o];(n?a<=t:a<t)&&null!==a?r=o+1:i=o}return i}return pn(e,t,xo,n)}function pn(e,t,n,r){t=n(t);for(var i=0,o=e?e.length:0,a=t!=t,s=null===t,l=void 0===t;i<o;){var u=Qe((i+o)/2),c=n(e[u]),d=void 0!==c,p=c==c;if(a)var f=p||r;else f=s?p&&d&&(r||null!=c):l?p&&(r||d):null!=c&&(r?c<=t:c<t);f?i=u+1:o=u}return et(o,4294967294)}function fn(e,t,n){if("function"!=typeof e)return xo;if(void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,r,i){return e.call(t,n,r,i)};case 4:return function(n,r,i,o){return e.call(t,n,r,i,o)};case 5:return function(n,r,i,o,a){return e.call(t,n,r,i,o,a)}}return function(){return e.apply(t,arguments)}}function hn(e){var t=new Fe(e.byteLength);return new qe(t).set(new qe(e)),t}function gn(e,t,r){for(var i=r.length,o=-1,a=Ze(e.length-i,0),s=-1,l=t.length,u=n(l+a);++s<l;)u[s]=t[s];for(;++o<i;)u[r[o]]=e[o];for(;a--;)u[s++]=e[o++];return u}function mn(e,t,r){for(var i=-1,o=r.length,a=-1,s=Ze(e.length-o,0),l=-1,u=t.length,c=n(s+u);++a<s;)c[a]=e[a];for(var d=a;++l<u;)c[d+l]=t[l];for(;++i<o;)c[d+r[i]]=e[a++];return c}function vn(e,t){return function(n,r,i){var o=t?t():{};if(r=zn(r,i,3),Li(n))for(var a=-1,s=n.length;++a<s;){var l=n[a];e(o,l,r(l,a,n),n)}else Ot(n,(function(t,n,i){e(o,t,r(t,n,i),i)}));return o}}function yn(e){return Si((function(t,n){var r=-1,i=null==t?0:n.length,o=i>2?n[i-2]:void 0,a=i>2?n[2]:void 0,s=i>1?n[i-1]:void 0;for("function"==typeof o?(o=fn(o,s,5),i-=2):i-=(o="function"==typeof s?s:void 0)?1:0,a&&nr(n[0],n[1],a)&&(o=i<3?void 0:o,i=1);++r<i;){var l=n[r];l&&e(t,l,o)}return t}))}function xn(e,t){return function(n,r){var i=n?Yn(n):0;if(!or(i))return e(n,r);for(var o=t?i:-1,a=gr(n);(t?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function bn(e){return function(t,n,r){for(var i=gr(t),o=r(t),a=o.length,s=e?a:-1;e?s--:++s<a;){var l=o[s];if(!1===n(i[l],l,i))break}return t}}function En(e){return Xe&&Ue?new ft(e):null}function Cn(e){return function(t){for(var n=-1,r=mo(so(t)),i=r.length,o="";++n<i;)o=e(o,r[n],n);return o}}function Tn(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Rt(e.prototype),r=e.apply(n,t);return ki(r)?r:n}}function Sn(e){return function t(n,r,i){i&&nr(n,r,i)&&(r=void 0);var o=Vn(n,e,void 0,void 0,void 0,void 0,void 0,r);return o.placeholder=t.placeholder,o}}function wn(e,t){return Si((function(n){var r=n[0];return null==r?r:(n.push(t),e.apply(void 0,n))}))}function Nn(e,t){return function(n,r,i){if(i&&nr(n,r,i)&&(r=void 0),1==(r=zn(r,i,3)).length){var o=function(e,t,n,r){for(var i=-1,o=e.length,a=r,s=a;++i<o;){var l=e[i],u=+t(l);n(u,a)&&(a=u,s=l)}return s}(n=Li(n)?n:hr(n),r,e,t);if(!n.length||o!==t)return o}return function(e,t,n,r){var i=r,o=i;return Ot(e,(function(e,a,s){var l=+t(e,a,s);(n(l,i)||l===r&&l===o)&&(i=l,o=e)})),o}(n,r,e,t)}}function Ln(e,t){return function(n,r,i){if(r=zn(r,i,3),Li(n)){var o=ge(n,r,t);return o>-1?n[o]:void 0}return Ft(n,r,e)}}function An(e){return function(t,n,r){return t&&t.length?ge(t,n=zn(n,r,3),e):-1}}function In(e){return function(t,n,r){return Ft(t,n=zn(n,r,3),e,!0)}}function Rn(e){return function(){for(var t,r=arguments.length,i=e?r:-1,a=0,s=n(r);e?i--:++i<r;){var l=s[a++]=arguments[i];if("function"!=typeof l)throw new se(o);!t&&ct.prototype.thru&&"wrapper"==Xn(l)&&(t=new ct([],!0))}for(i=t?-1:r;++i<r;){var u=Xn(l=s[i]),c="wrapper"==u?$n(l):void 0;t=c&&ir(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?t[Xn(c[0])].apply(t,c[3]):1==l.length&&ir(l)?t[u]():t.thru(l)}return function(){var e=arguments,n=e[0];if(t&&1==e.length&&Li(n)&&n.length>=200)return t.plant(n).value();for(var i=0,o=r?s[i].apply(this,e):n;++i<r;)o=s[i].call(this,o);return o}}}function kn(e,t){return function(n,r,i){return"function"==typeof r&&void 0===i&&Li(n)?e(n,r):t(n,fn(r,i,3))}}function _n(e){return function(t,n,r){return"function"==typeof n&&void 0===r||(n=fn(n,r,3)),e(t,n,Zi)}}function On(e){return function(t,n,r){return"function"==typeof n&&void 0===r||(n=fn(n,r,3)),e(t,n)}}function Dn(e){return function(t,n,r){var i={};return n=zn(n,r,3),Ut(t,(function(t,r,o){var a=n(t,r,o);t=e?t:a,i[r=e?a:r]=t})),i}}function Mn(e){return function(t,n,r){return t=ye(t),(e?t:"")+Bn(t,n,r)+(e?"":t)}}function Pn(e){var t=Si((function(n,r){var i=Ie(r,t.placeholder);return Vn(n,e,void 0,r,i)}));return t}function Fn(e,t){return function(n,r,i,o){var a=arguments.length<3;return"function"==typeof r&&void 0===o&&Li(n)?e(n,r,i,a):en(n,zn(r,o,4),i,a,t)}}function jn(e,t,r,i,o,a,s,l,u,c){var d=128&t,p=1&t,f=2&t,h=8&t,g=4&t,m=16&t,v=f?void 0:Tn(e);return function y(){for(var x=arguments.length,b=x,E=n(x);b--;)E[b]=arguments[b];if(i&&(E=gn(E,i,o)),a&&(E=mn(E,a,s)),h||m){var C=y.placeholder,T=Ie(E,C);if((x-=T.length)<c){var S=l?gt(l):void 0,w=Ze(c-x,0),N=h?T:void 0,L=h?void 0:T,A=h?E:void 0,I=h?void 0:E;t|=h?32:64,t&=~(h?64:32),g||(t&=-4);var R=[e,t,r,A,N,I,L,S,u,w],k=jn.apply(void 0,R);return ir(e)&&pr(k,R),k.placeholder=C,k}}var _=p?r:this,O=f?_[e]:e;return l&&(E=ur(E,l)),d&&u<E.length&&(E.length=u),this&&this!==fe&&this instanceof y&&(O=v||Tn(e)),O.apply(_,E)}}function Bn(e,t,n){var r=e.length;if(r>=(t=+t)||!Ke(t))return"";var i=t-r;return po(n=null==n?" ":n+"",$e(i/n.length)).slice(0,i)}function Hn(e,t,r,i){var o=1&t,a=Tn(e);return function t(){for(var s=-1,l=arguments.length,u=-1,c=i.length,d=n(c+l);++u<c;)d[u]=i[u];for(;l--;)d[u++]=arguments[++s];var p=this&&this!==fe&&this instanceof t?a:e;return p.apply(o?r:this,d)}}function Gn(e){var t=ne[e];return function(e,n){return(n=void 0===n?0:+n||0)?(n=He(10,n),t(e*n)/n):t(e)}}function Un(e){return function(t,n,r,i){var o=zn(r);return null==r&&o===At?dn(t,n,e):pn(t,n,o(r,i,1),e)}}function Vn(e,t,n,r,i,s,l,u){var c=2&t;if(!c&&"function"!=typeof e)throw new se(o);var d=r?r.length:0;if(d||(t&=-97,r=i=void 0),d-=i?i.length:0,64&t){var p=r,f=i;r=i=void 0}var h=c?void 0:$n(e),g=[e,t,n,r,i,p,f,s,l,u];if(h&&(function(e,t){var n=e[1],r=t[1],i=n|r,o=i<128,s=128==r&&8==n||128==r&&256==n&&e[7].length<=t[8]||384==r&&8==n;if(!o&&!s)return e;1&r&&(e[2]=t[2],i|=1&n?0:4);var l=t[3];if(l){var u=e[3];e[3]=u?gn(u,l,t[4]):gt(l),e[4]=u?Ie(e[3],a):gt(t[4])}(l=t[5])&&(u=e[5],e[5]=u?mn(u,l,t[6]):gt(l),e[6]=u?Ie(e[5],a):gt(t[6])),(l=t[7])&&(e[7]=gt(l)),128&r&&(e[8]=null==e[8]?t[8]:et(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i}(g,h),t=g[1],u=g[9]),g[9]=null==u?c?0:e.length:Ze(u-d,0)||0,1==t)var m=function(e,t){var n=Tn(e);return function r(){var i=this&&this!==fe&&this instanceof r?n:e;return i.apply(t,arguments)}}(g[0],g[2]);else m=32!=t&&33!=t||g[4].length?jn.apply(void 0,g):Hn.apply(void 0,g);return(h?tn:pr)(m,g)}function Wn(e,t,n,r,i,o,a){var s=-1,l=e.length,u=t.length;if(l!=u&&!(i&&u>l))return!1;for(;++s<l;){var c=e[s],d=t[s],p=r?r(i?d:c,i?c:d,s):void 0;if(void 0!==p){if(p)continue;return!1}if(i){if(!Ct(t,(function(e){return c===e||n(c,e,r,i,o,a)})))return!1}else if(c!==d&&!n(c,d,r,i,o,a))return!1}return!0}function qn(e,t,n,r,i,o,a){var s=Ji(e),l=s.length;if(l!=Ji(t).length&&!i)return!1;for(var u=l;u--;){var c=s[u];if(!(i?c in t:pe.call(t,c)))return!1}for(var d=i;++u<l;){var p=e[c=s[u]],f=t[c],h=r?r(i?f:p,i?p:f,c):void 0;if(!(void 0===h?n(p,f,r,i,o,a):h))return!1;d||(d="constructor"==c)}if(!d){var g=e.constructor,m=t.constructor;if(g!=m&&"constructor"in e&&"constructor"in t&&!("function"==typeof g&&g instanceof g&&"function"==typeof m&&m instanceof m))return!1}return!0}function zn(e,t,n){var r=lt.callback||yo;return r=r===yo?At:r,n?r(e,t,n):r}var $n=at?function(e){return at.get(e)}:So;function Xn(e){for(var t=e.name,n=st[t],r=n?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function Qn(e,t,n){var r=lt.indexOf||Sr;return r=r===Sr?me:r,e?r(e,t,n):r}var Yn=Kt("length");function Kn(e){for(var t=ro(e),n=t.length;n--;)t[n][2]=ar(t[n][1]);return t}function Jn(e,t){var n=null==e?void 0:e[t];return _i(n)?n:void 0}function Zn(e,t,n){null==e||rr(t,e)||(e=1==(t=mr(t)).length?e:qt(e,nn(t,0,-1)),t=Nr(t));var r=null==e?e:e[t];return null==r?void 0:r.apply(e,n)}function er(e){return null!=e&&or(Yn(e))}function tr(e,t){return t=null==t?9007199254740991:t,(e="number"==typeof e||z.test(e)?+e:-1)>-1&&e%1==0&&e<t}function nr(e,t,n){if(!ki(n))return!1;var r=typeof t;if("number"==r?er(n)&&tr(t,n.length):"string"==r&&t in n){var i=n[t];return e==e?e===i:i!=i}return!1}function rr(e,t){var n=typeof e;return!!("string"==n&&P.test(e)||"number"==n)||!Li(e)&&(!M.test(e)||null!=t&&e in gr(t))}function ir(e){var t=Xn(e);if(!(t in dt.prototype))return!1;var n=lt[t];if(e===n)return!0;var r=$n(n);return!!r&&e===r[0]}function or(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function ar(e){return e==e&&!ki(e)}function sr(e,t){e=gr(e);for(var n=-1,r=t.length,i={};++n<r;){var o=t[n];o in e&&(i[o]=e[o])}return i}function lr(e,t){var n={};return Gt(e,(function(e,r,i){t(e,r,i)&&(n[r]=e)})),n}function ur(e,t){for(var n=e.length,r=et(t.length,n),i=gt(e);r--;){var o=t[r];e[r]=tr(o,n)?i[o]:void 0}return e}var cr,dr,pr=(cr=0,dr=0,function(e,t){var n=si(),r=16-(n-dr);if(dr=n,r>0){if(++cr>=150)return e}else cr=0;return tn(e,t)});function fr(e){for(var t=Zi(e),n=t.length,r=n&&e.length,i=!!r&&or(r)&&(Li(e)||Ni(e)),o=-1,a=[];++o<n;){var s=t[o];(i&&tr(s,r)||pe.call(e,s))&&a.push(s)}return a}function hr(e){return null==e?[]:er(e)?ki(e)?e:ie(e):oo(e)}function gr(e){return ki(e)?e:ie(e)}function mr(e){if(Li(e))return e;var t=[];return ye(e).replace(F,(function(e,n,r,i){t.push(r?i.replace(G,"$1"):n||e)})),t}function vr(e){return e instanceof dt?e.clone():new ct(e.__wrapped__,e.__chain__,gt(e.__actions__))}var yr=Si((function(e,t){return Le(e)&&er(e)?_t(e,jt(t,!1,!0)):[]}));function xr(e,t,n){return e&&e.length?((n?nr(e,t,n):null==t)&&(t=1),nn(e,t<0?0:t)):[]}function br(e,t,n){var r=e?e.length:0;return r?((n?nr(e,t,n):null==t)&&(t=1),nn(e,0,(t=r-(+t||0))<0?0:t)):[]}var Er=An(),Cr=An(!0);function Tr(e){return e?e[0]:void 0}function Sr(e,t,n){var r=e?e.length:0;if(!r)return-1;if("number"==typeof n)n=n<0?Ze(r+n,0):n;else if(n){var i=dn(e,t);return i<r&&(t==t?t===e[i]:e[i]!=e[i])?i:-1}return me(e,t,n||0)}var wr=Si((function(e){for(var t=e.length,r=t,i=n(d),o=Qn(),a=o==me,s=[];r--;){var l=e[r]=er(l=e[r])?l:[];i[r]=a&&l.length>=120?En(r&&l):null}var u=e[0],c=-1,d=u?u.length:0,p=i[0];e:for(;++c<d;)if(l=u[c],(p?ht(p,l):o(s,l,0))<0){for(r=t;--r;){var f=i[r];if((f?ht(f,l):o(e[r],l,0))<0)continue e}p&&p.push(l),s.push(l)}return s}));function Nr(e){var t=e?e.length:0;return t?e[t-1]:void 0}var Lr=Si((function(e,t){var n=Nt(e,t=jt(t));return Jt(e,t.sort(he)),n}));function Ar(e){return xr(e,1)}var Ir=Un(),Rr=Un(!0),kr=Si((function(e){return sn(jt(e,!1,!0))}));function _r(e,t,n,r){if(!e||!e.length)return[];null!=t&&"boolean"!=typeof t&&(n=nr(e,t,r=n)?void 0:t,t=!1);var i=zn();return null==n&&i===At||(n=i(n,r,3)),t&&Qn()==me?function(e,t){for(var n,r=-1,i=e.length,o=-1,a=[];++r<i;){var s=e[r],l=t?t(s,r,e):s;r&&n===l||(n=l,a[++o]=s)}return a}(e,n):sn(e,n)}function Or(e){if(!e||!e.length)return[];var t=-1,r=0;e=yt(e,(function(e){if(er(e))return r=Ze(e.length,r),!0}));for(var i=n(r);++t<r;)i[t]=xt(e,Kt(t));return i}function Dr(e,t,n){if(!e||!e.length)return[];var r=Or(e);return null==t?r:(t=fn(t,n,4),xt(r,(function(e){return Et(e,t,void 0,!0)})))}var Mr=Si((function(e,t){return er(e)?_t(e,t):[]})),Pr=Si(Or);function Fr(e,t){var n=-1,r=e?e.length:0,i={};for(!r||t||Li(e[0])||(t=[]);++n<r;){var o=e[n];t?i[o]=t[n]:o&&(i[o[0]]=o[1])}return i}var jr=Si((function(e){var t=e.length,n=t>2?e[t-2]:void 0,r=t>1?e[t-1]:void 0;return t>2&&"function"==typeof n?t-=2:(n=t>1&&"function"==typeof r?(--t,r):void 0,r=void 0),e.length=t,Dr(e,n,r)}));function Br(e){var t=lt(e);return t.__chain__=!0,t}function Hr(e,t,n){return t.call(n,e)}var Gr=Si((function(e){return e=jt(e),this.thru((function(t){return function(e,t){for(var r=-1,i=e.length,o=-1,a=t.length,s=n(i+a);++r<i;)s[r]=e[r];for(;++o<a;)s[r++]=t[o];return s}(Li(t)?t:[gr(t)],e)}))})),Ur=Si((function(e,t){return Nt(e,jt(t))})),Vr=vn((function(e,t,n){pe.call(e,n)?++e[n]:e[n]=1}));function Wr(e,t,n){var r=Li(e)?vt:Mt;return n&&nr(e,t,n)&&(t=void 0),"function"==typeof t&&void 0===n||(t=zn(t,n,3)),r(e,t)}function qr(e,t,n){return(Li(e)?yt:Pt)(e,t=zn(t,n,3))}var zr=Ln(Ot),$r=Ln(Dt,!0),Xr=kn(mt,Ot),Qr=kn((function(e,t){for(var n=e.length;n--&&!1!==t(e[n],n,e););return e}),Dt),Yr=vn((function(e,t,n){pe.call(e,n)?e[n].push(t):e[n]=[t]}));function Kr(e,t,n,r){var i=e?Yn(e):0;return or(i)||(i=(e=oo(e)).length),n="number"!=typeof n||r&&nr(t,n,r)?0:n<0?Ze(i+n,0):n||0,"string"==typeof e||!Li(e)&&Pi(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Qn(e,t,n)>-1}var Jr=vn((function(e,t,n){e[n]=t})),Zr=Si((function(e,t,r){var i=-1,o="function"==typeof t,a=rr(t),s=er(e)?n(e.length):[];return Ot(e,(function(e){var n=o?t:a&&null!=e?e[t]:void 0;s[++i]=n?n.apply(e,r):Zn(e,t,r)})),s}));function ei(e,t,n){return(Li(e)?xt:Xt)(e,t=zn(t,n,3))}var ti=vn((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),ni=Fn(Et,Ot),ri=Fn((function(e,t,n,r){var i=e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}),Dt);function ii(e,t,n){if(n?nr(e,t,n):null==t)return(r=(e=hr(e)).length)>0?e[Zt(0,r-1)]:void 0;var r,i=-1,o=Bi(e),a=(r=o.length)-1;for(t=et(t<0?0:+t||0,r);++i<t;){var s=Zt(i,a),l=o[s];o[s]=o[i],o[i]=l}return o.length=t,o}function oi(e,t,n){var r=Li(e)?Ct:rn;return n&&nr(e,t,n)&&(t=void 0),"function"==typeof t&&void 0===n||(t=zn(t,n,3)),r(e,t)}var ai=Si((function(e,t){if(null==e)return[];var n=t[2];return n&&nr(t[0],t[1],n)&&(t.length=1),an(e,jt(t),[])})),si=tt||function(){return(new r).getTime()};function li(e,t){var n;if("function"!=typeof t){if("function"!=typeof e)throw new se(o);var r=e;e=t,t=r}return function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=void 0),n}}var ui=Si((function(e,t,n){var r=1;if(n.length){var i=Ie(n,ui.placeholder);r|=32}return Vn(e,r,t,n,i)})),ci=Si((function(e,t){for(var n=-1,r=(t=t.length?jt(t):Ki(e)).length;++n<r;){var i=t[n];e[i]=Vn(e[i],1,e)}return e})),di=Si((function(e,t,n){var r=3;if(n.length){var i=Ie(n,di.placeholder);r|=32}return Vn(t,r,e,n,i)})),pi=Sn(8),fi=Sn(16);function hi(e,t,n){var r,i,a,s,l,u,c,d=0,p=!1,f=!0;if("function"!=typeof e)throw new se(o);if(t=t<0?0:+t||0,!0===n){var h=!0;f=!1}else ki(n)&&(h=!!n.leading,p="maxWait"in n&&Ze(+n.maxWait||0,t),f="trailing"in n?!!n.trailing:f);function g(t,n){n&&je(n),i=u=c=void 0,t&&(d=si(),a=e.apply(l,r),u||i||(r=l=void 0))}function m(){var e=t-(si()-s);e<=0||e>t?g(c,i):u=Ve(m,e)}function v(){g(f,u)}function y(){if(r=arguments,s=si(),l=this,c=f&&(u||!h),!1===p)var n=h&&!u;else{i||h||(d=s);var o=p-(s-d),g=o<=0||o>p;g?(i&&(i=je(i)),d=s,a=e.apply(l,r)):i||(i=Ve(v,o))}return g&&u?u=je(u):u||t===p||(u=Ve(m,t)),n&&(g=!0,a=e.apply(l,r)),!g||u||i||(r=l=void 0),a}return y.cancel=function(){u&&je(u),i&&je(i),d=0,i=u=c=void 0},y}var gi=Si((function(e,t){return kt(e,1,t)})),mi=Si((function(e,t,n){return kt(e,t,n)})),vi=Rn(),yi=Rn(!0);function xi(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new se(o);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a),a};return n.cache=new xi.Cache,n}var bi=Si((function(e,t){if(t=jt(t),"function"!=typeof e||!vt(t,ve))throw new se(o);var n=t.length;return Si((function(r){for(var i=et(r.length,n);i--;)r[i]=t[i](r[i]);return e.apply(this,r)}))})),Ei=Pn(32),Ci=Pn(64),Ti=Si((function(e,t){return Vn(e,256,void 0,void 0,void 0,jt(t))}));function Si(e,t){if("function"!=typeof e)throw new se(o);return t=Ze(void 0===t?e.length-1:+t||0,0),function(){for(var r=arguments,i=-1,o=Ze(r.length-t,0),a=n(o);++i<o;)a[i]=r[t+i];switch(t){case 0:return e.call(this,a);case 1:return e.call(this,r[0],a);case 2:return e.call(this,r[0],r[1],a)}var s=n(t+1);for(i=-1;++i<t;)s[i]=r[i];return s[t]=a,e.apply(this,s)}}function wi(e,t){return e>t}function Ni(e){return Le(e)&&er(e)&&pe.call(e,"callee")&&!Ge.call(e,"callee")}var Li=Ye||function(e){return Le(e)&&or(e.length)&&De.call(e)==l};function Ai(e,t,n,r){var i=(n="function"==typeof n?fn(n,r,3):void 0)?n(e,t):void 0;return void 0===i?zt(e,t,n):!!i}function Ii(e){return Le(e)&&"string"==typeof e.message&&De.call(e)==d}function Ri(e){return ki(e)&&De.call(e)==p}function ki(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function _i(e){return null!=e&&(Ri(e)?Pe.test(de.call(e)):Le(e)&&q.test(e))}function Oi(e){return"number"==typeof e||Le(e)&&De.call(e)==f}function Di(e){var t,n;return!(!Le(e)||De.call(e)!=h||Ni(e)||!(pe.call(e,"constructor")||"function"!=typeof(t=e.constructor)||t instanceof t))&&(Gt(e,(function(e,t){n=t})),void 0===n||pe.call(e,n))}function Mi(e){return ki(e)&&De.call(e)==g}function Pi(e){return"string"==typeof e||Le(e)&&De.call(e)==m}function Fi(e){return Le(e)&&or(e.length)&&!!Z[De.call(e)]}function ji(e,t){return e<t}function Bi(e){var t=e?Yn(e):0;return or(t)?t?gt(e):[]:oo(e)}function Hi(e){return Lt(e,Zi(e))}var Gi=yn((function e(t,n,r,i,o){if(!ki(t))return t;var a=er(n)&&(Li(n)||Fi(n)),s=a?void 0:Ji(n);return mt(s||n,(function(l,u){if(s&&(l=n[u=l]),Le(l))i||(i=[]),o||(o=[]),function(e,t,n,r,i,o,a){for(var s=o.length,l=t[n];s--;)if(o[s]==l)return void(e[n]=a[s]);var u=e[n],c=i?i(u,l,n,e,t):void 0,d=void 0===c;d&&(c=l,er(l)&&(Li(l)||Fi(l))?c=Li(u)?u:er(u)?gt(u):[]:Di(l)||Ni(l)?c=Ni(u)?Hi(u):Di(u)?u:{}:d=!1),o.push(l),a.push(c),d?e[n]=r(c,l,i,o,a):(c==c?c!==u:u==u)&&(e[n]=c)}(t,n,u,e,r,i,o);else{var c=t[u],d=r?r(c,l,u,t,n):void 0,p=void 0===d;p&&(d=l),void 0===d&&(!a||u in t)||!p&&(d==d?d===c:c!=c)||(t[u]=d)}})),t})),Ui=yn((function(e,t,n){return n?St(e,t,n):wt(e,t)})),Vi=wn(Ui,(function(e,t){return void 0===e?t:e})),Wi=wn(Gi,(function e(t,n){return void 0===t?n:Gi(t,n,e)})),qi=In(Ut),zi=In(Vt),$i=_n(Bt),Xi=_n(Ht),Qi=On(Ut),Yi=On(Vt);function Ki(e){return Wt(e,Zi(e))}var Ji=Je?function(e){var t=null==e?void 0:e.constructor;return"function"==typeof t&&t.prototype===e||"function"!=typeof e&&er(e)?fr(e):ki(e)?Je(e):[]}:fr;function Zi(e){if(null==e)return[];ki(e)||(e=ie(e));var t=e.length;t=t&&or(t)&&(Li(e)||Ni(e))&&t||0;for(var r=e.constructor,i=-1,o="function"==typeof r&&r.prototype===e,a=n(t),s=t>0;++i<t;)a[i]=i+"";for(var l in e)s&&tr(l,t)||"constructor"==l&&(o||!pe.call(e,l))||a.push(l);return a}var eo=Dn(!0),to=Dn(),no=Si((function(e,t){if(null==e)return{};if("function"!=typeof t[0])return t=xt(jt(t),ae),sr(e,_t(Zi(e),t));var n=fn(t[0],t[1],3);return lr(e,(function(e,t,r){return!n(e,t,r)}))}));function ro(e){e=gr(e);for(var t=-1,r=Ji(e),i=r.length,o=n(i);++t<i;){var a=r[t];o[t]=[a,e[a]]}return o}var io=Si((function(e,t){return null==e?{}:"function"==typeof t[0]?lr(e,fn(t[0],t[1],3)):sr(e,jt(t))}));function oo(e){return ln(e,Ji(e))}var ao=Cn((function(e,t,n){return t=t.toLowerCase(),e+(n?t.charAt(0).toUpperCase()+t.slice(1):t)}));function so(e){return(e=ye(e))&&e.replace($,Ce).replace(H,"")}var lo=Cn((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),uo=Mn(),co=Mn(!0);function po(e,t){var n="";if(e=ye(e),(t=+t)<1||!e||!Ke(t))return n;do{t%2&&(n+=e),t=Qe(t/2),e+=e}while(t);return n}var fo=Cn((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),ho=Cn((function(e,t,n){return e+(n?" ":"")+(t.charAt(0).toUpperCase()+t.slice(1))}));function go(e,t,n){var r=e;return(e=ye(e))?(n?nr(r,t,n):null==t)?e.slice(Re(e),ke(e)+1):(t+="",e.slice(xe(e,t),be(e,t)+1)):e}function mo(e,t,n){return n&&nr(e,t,n)&&(t=void 0),(e=ye(e)).match(t||Y)||[]}var vo=Si((function(e,t){try{return e.apply(void 0,t)}catch(e){return Ii(e)?e:new i(e)}}));function yo(e,t,n){return n&&nr(e,t,n)&&(t=void 0),Le(e)?bo(e):At(e,t)}function xo(e){return e}function bo(e){return Qt(It(e,!0))}var Eo=Si((function(e,t){return function(n){return Zn(n,e,t)}})),Co=Si((function(e,t){return function(n){return Zn(e,n,t)}}));function To(e,t,n){if(null==n){var r=ki(t),i=r?Ji(t):void 0,o=i&&i.length?Wt(t,i):void 0;(o?o.length:r)||(o=!1,n=t,t=e,e=this)}o||(o=Wt(t,Ji(t)));var a=!0,s=-1,l=Ri(e),u=o.length;!1===n?a=!1:ki(n)&&"chain"in n&&(a=n.chain);for(;++s<u;){var c=o[s],d=t[c];e[c]=d,l&&(e.prototype[c]=function(t){return function(){var n=this.__chain__;if(a||n){var r=e(this.__wrapped__),i=r.__actions__=gt(this.__actions__);return i.push({func:t,args:arguments,thisArg:e}),r.__chain__=n,r}return t.apply(e,bt([this.value()],arguments))}}(d))}return e}function So(){}function wo(e){return rr(e)?Kt(e):function(e){var t=e+"";return e=mr(e),function(n){return qt(n,e,t)}}(e)}var No,Lo=Gn("ceil"),Ao=Gn("floor"),Io=Nn(wi,it),Ro=Nn(ji,ot),ko=Gn("round");return lt.prototype=ut.prototype,ct.prototype=Rt(ut.prototype),ct.prototype.constructor=ct,dt.prototype=Rt(ut.prototype),dt.prototype.constructor=dt,pt.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},pt.prototype.get=function(e){return"__proto__"==e?void 0:this.__data__[e]},pt.prototype.has=function(e){return"__proto__"!=e&&pe.call(this.__data__,e)},pt.prototype.set=function(e,t){return"__proto__"!=e&&(this.__data__[e]=t),this},ft.prototype.push=function(e){var t=this.data;"string"==typeof e||ki(e)?t.set.add(e):t.hash[e]=!0},xi.Cache=pt,lt.after=function(e,t){if("function"!=typeof t){if("function"!=typeof e)throw new se(o);var n=e;e=t,t=n}return e=Ke(e=+e)?e:0,function(){if(--e<1)return t.apply(this,arguments)}},lt.ary=function(e,t,n){return n&&nr(e,t,n)&&(t=void 0),Vn(e,128,void 0,void 0,void 0,void 0,t=e&&null==t?e.length:Ze(+t||0,0))},lt.assign=Ui,lt.at=Ur,lt.before=li,lt.bind=ui,lt.bindAll=ci,lt.bindKey=di,lt.callback=yo,lt.chain=Br,lt.chunk=function(e,t,r){t=(r?nr(e,t,r):null==t)?1:Ze(Qe(t)||1,1);for(var i=0,o=e?e.length:0,a=-1,s=n($e(o/t));i<o;)s[++a]=nn(e,i,i+=t);return s},lt.compact=function(e){for(var t=-1,n=e?e.length:0,r=-1,i=[];++t<n;){var o=e[t];o&&(i[++r]=o)}return i},lt.constant=function(e){return function(){return e}},lt.countBy=Vr,lt.create=function(e,t,n){var r=Rt(e);return n&&nr(e,t,n)&&(t=void 0),t?wt(r,t):r},lt.curry=pi,lt.curryRight=fi,lt.debounce=hi,lt.defaults=Vi,lt.defaultsDeep=Wi,lt.defer=gi,lt.delay=mi,lt.difference=yr,lt.drop=xr,lt.dropRight=br,lt.dropRightWhile=function(e,t,n){return e&&e.length?un(e,zn(t,n,3),!0,!0):[]},lt.dropWhile=function(e,t,n){return e&&e.length?un(e,zn(t,n,3),!0):[]},lt.fill=function(e,t,n,r){var i=e?e.length:0;return i?(n&&"number"!=typeof n&&nr(e,t,n)&&(n=0,r=i),function(e,t,n,r){var i=e.length;for((n=null==n?0:+n||0)<0&&(n=-n>i?0:i+n),(r=void 0===r||r>i?i:+r||0)<0&&(r+=i),i=n>r?0:r>>>0,n>>>=0;n<i;)e[n++]=t;return e}(e,t,n,r)):[]},lt.filter=qr,lt.flatten=function(e,t,n){var r=e?e.length:0;return n&&nr(e,t,n)&&(t=!1),r?jt(e,t):[]},lt.flattenDeep=function(e){return e&&e.length?jt(e,!0):[]},lt.flow=vi,lt.flowRight=yi,lt.forEach=Xr,lt.forEachRight=Qr,lt.forIn=$i,lt.forInRight=Xi,lt.forOwn=Qi,lt.forOwnRight=Yi,lt.functions=Ki,lt.groupBy=Yr,lt.indexBy=Jr,lt.initial=function(e){return br(e,1)},lt.intersection=wr,lt.invert=function(e,t,n){n&&nr(e,t,n)&&(t=void 0);for(var r=-1,i=Ji(e),o=i.length,a={};++r<o;){var s=i[r],l=e[s];t?pe.call(a,l)?a[l].push(s):a[l]=[s]:a[l]=s}return a},lt.invoke=Zr,lt.keys=Ji,lt.keysIn=Zi,lt.map=ei,lt.mapKeys=eo,lt.mapValues=to,lt.matches=bo,lt.matchesProperty=function(e,t){return Yt(e,It(t,!0))},lt.memoize=xi,lt.merge=Gi,lt.method=Eo,lt.methodOf=Co,lt.mixin=To,lt.modArgs=bi,lt.negate=function(e){if("function"!=typeof e)throw new se(o);return function(){return!e.apply(this,arguments)}},lt.omit=no,lt.once=function(e){return li(2,e)},lt.pairs=ro,lt.partial=Ei,lt.partialRight=Ci,lt.partition=ti,lt.pick=io,lt.pluck=function(e,t){return ei(e,wo(t))},lt.property=wo,lt.propertyOf=function(e){return function(t){return qt(e,mr(t),t+"")}},lt.pull=function(){var e=arguments,t=e[0];if(!t||!t.length)return t;for(var n=0,r=Qn(),i=e.length;++n<i;)for(var o=0,a=e[n];(o=r(t,a,o))>-1;)We.call(t,o,1);return t},lt.pullAt=Lr,lt.range=function(e,t,r){r&&nr(e,t,r)&&(t=r=void 0),e=+e||0,null==t?(t=e,e=0):t=+t||0;for(var i=-1,o=Ze($e((t-e)/((r=null==r?1:+r||0)||1)),0),a=n(o);++i<o;)a[i]=e,e+=r;return a},lt.rearg=Ti,lt.reject=function(e,t,n){var r=Li(e)?yt:Pt;return t=zn(t,n,3),r(e,(function(e,n,r){return!t(e,n,r)}))},lt.remove=function(e,t,n){var r=[];if(!e||!e.length)return r;var i=-1,o=[],a=e.length;for(t=zn(t,n,3);++i<a;){var s=e[i];t(s,i,e)&&(r.push(s),o.push(i))}return Jt(e,o),r},lt.rest=Ar,lt.restParam=Si,lt.set=function(e,t,n){if(null==e)return e;for(var r=t+"",i=-1,o=(t=null!=e[r]||rr(t,e)?[r]:mr(t)).length,a=o-1,s=e;null!=s&&++i<o;){var l=t[i];ki(s)&&(i==a?s[l]=n:null==s[l]&&(s[l]=tr(t[i+1])?[]:{})),s=s[l]}return e},lt.shuffle=function(e){return ii(e,ot)},lt.slice=function(e,t,n){var r=e?e.length:0;return r?(n&&"number"!=typeof n&&nr(e,t,n)&&(t=0,n=r),nn(e,t,n)):[]},lt.sortBy=function(e,t,n){if(null==e)return[];n&&nr(e,t,n)&&(t=void 0);var r=-1;return t=zn(t,n,3),on(Xt(e,(function(e,n,i){return{criteria:t(e,n,i),index:++r,value:e}})),Ee)},lt.sortByAll=ai,lt.sortByOrder=function(e,t,n,r){return null==e?[]:(r&&nr(t,n,r)&&(n=void 0),Li(t)||(t=null==t?[]:[t]),Li(n)||(n=null==n?[]:[n]),an(e,t,n))},lt.spread=function(e){if("function"!=typeof e)throw new se(o);return function(t){return e.apply(this,t)}},lt.take=function(e,t,n){return e&&e.length?((n?nr(e,t,n):null==t)&&(t=1),nn(e,0,t<0?0:t)):[]},lt.takeRight=function(e,t,n){var r=e?e.length:0;return r?((n?nr(e,t,n):null==t)&&(t=1),nn(e,(t=r-(+t||0))<0?0:t)):[]},lt.takeRightWhile=function(e,t,n){return e&&e.length?un(e,zn(t,n,3),!1,!0):[]},lt.takeWhile=function(e,t,n){return e&&e.length?un(e,zn(t,n,3)):[]},lt.tap=function(e,t,n){return t.call(n,e),e},lt.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new se(o);return!1===n?r=!1:ki(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),hi(e,t,{leading:r,maxWait:+t,trailing:i})},lt.thru=Hr,lt.times=function(e,t,r){if((e=Qe(e))<1||!Ke(e))return[];var i=-1,o=n(et(e,4294967295));for(t=fn(t,r,1);++i<e;)i<4294967295?o[i]=t(i):t(i);return o},lt.toArray=Bi,lt.toPlainObject=Hi,lt.transform=function(e,t,n,r){var i=Li(e)||Fi(e);if(t=zn(t,r,4),null==n)if(i||ki(e)){var o=e.constructor;n=i?Li(e)?new o:[]:Rt(Ri(o)?o.prototype:void 0)}else n={};return(i?mt:Ut)(e,(function(e,r,i){return t(n,e,r,i)})),n},lt.union=kr,lt.uniq=_r,lt.unzip=Or,lt.unzipWith=Dr,lt.values=oo,lt.valuesIn=function(e){return ln(e,Zi(e))},lt.where=function(e,t){return qr(e,Qt(t))},lt.without=Mr,lt.wrap=function(e,t){return Vn(t=null==t?xo:t,32,void 0,[e],[])},lt.xor=function(){for(var e=-1,t=arguments.length;++e<t;){var n=arguments[e];if(er(n))var r=r?bt(_t(r,n),_t(n,r)):n}return r?sn(r):[]},lt.zip=Pr,lt.zipObject=Fr,lt.zipWith=jr,lt.backflow=yi,lt.collect=ei,lt.compose=yi,lt.each=Xr,lt.eachRight=Qr,lt.extend=Ui,lt.iteratee=yo,lt.methods=Ki,lt.object=Fr,lt.select=qr,lt.tail=Ar,lt.unique=_r,To(lt,lt),lt.add=function(e,t){return(+e||0)+(+t||0)},lt.attempt=vo,lt.camelCase=ao,lt.capitalize=function(e){return(e=ye(e))&&e.charAt(0).toUpperCase()+e.slice(1)},lt.ceil=Lo,lt.clone=function(e,t,n,r){return t&&"boolean"!=typeof t&&nr(e,t,n)?t=!1:"function"==typeof t&&(r=n,n=t,t=!1),"function"==typeof n?It(e,t,fn(n,r,1)):It(e,t)},lt.cloneDeep=function(e,t,n){return"function"==typeof t?It(e,!0,fn(t,n,1)):It(e,!0)},lt.deburr=so,lt.endsWith=function(e,t,n){t+="";var r=(e=ye(e)).length;return n=void 0===n?r:et(n<0?0:+n||0,r),(n-=t.length)>=0&&e.indexOf(t,n)==n},lt.escape=function(e){return(e=ye(e))&&k.test(e)?e.replace(I,Te):e},lt.escapeRegExp=function(e){return(e=ye(e))&&B.test(e)?e.replace(j,Se):e||"(?:)"},lt.every=Wr,lt.find=zr,lt.findIndex=Er,lt.findKey=qi,lt.findLast=$r,lt.findLastIndex=Cr,lt.findLastKey=zi,lt.findWhere=function(e,t){return zr(e,Qt(t))},lt.first=Tr,lt.floor=Ao,lt.get=function(e,t,n){var r=null==e?void 0:qt(e,mr(t),t+"");return void 0===r?n:r},lt.gt=wi,lt.gte=function(e,t){return e>=t},lt.has=function(e,t){if(null==e)return!1;var n=pe.call(e,t);if(!n&&!rr(t)){if(null==(e=1==(t=mr(t)).length?e:qt(e,nn(t,0,-1))))return!1;t=Nr(t),n=pe.call(e,t)}return n||or(e.length)&&tr(t,e.length)&&(Li(e)||Ni(e))},lt.identity=xo,lt.includes=Kr,lt.indexOf=Sr,lt.inRange=function(e,t,n){return t=+t||0,void 0===n?(n=t,t=0):n=+n||0,e>=et(t,n)&&e<Ze(t,n)},lt.isArguments=Ni,lt.isArray=Li,lt.isBoolean=function(e){return!0===e||!1===e||Le(e)&&De.call(e)==u},lt.isDate=function(e){return Le(e)&&De.call(e)==c},lt.isElement=function(e){return!!e&&1===e.nodeType&&Le(e)&&!Di(e)},lt.isEmpty=function(e){return null==e||(er(e)&&(Li(e)||Pi(e)||Ni(e)||Le(e)&&Ri(e.splice))?!e.length:!Ji(e).length)},lt.isEqual=Ai,lt.isError=Ii,lt.isFinite=function(e){return"number"==typeof e&&Ke(e)},lt.isFunction=Ri,lt.isMatch=function(e,t,n,r){return n="function"==typeof n?fn(n,r,3):void 0,$t(e,Kn(t),n)},lt.isNaN=function(e){return Oi(e)&&e!=+e},lt.isNative=_i,lt.isNull=function(e){return null===e},lt.isNumber=Oi,lt.isObject=ki,lt.isPlainObject=Di,lt.isRegExp=Mi,lt.isString=Pi,lt.isTypedArray=Fi,lt.isUndefined=function(e){return void 0===e},lt.kebabCase=lo,lt.last=Nr,lt.lastIndexOf=function(e,t,n){var r=e?e.length:0;if(!r)return-1;var i=r;if("number"==typeof n)i=(n<0?Ze(r+n,0):et(n||0,r-1))+1;else if(n){var o=e[i=dn(e,t,!0)-1];return(t==t?t===o:o!=o)?i:-1}if(t!=t)return Ne(e,i,!0);for(;i--;)if(e[i]===t)return i;return-1},lt.lt=ji,lt.lte=function(e,t){return e<=t},lt.max=Io,lt.min=Ro,lt.noConflict=function(){return fe._=Me,this},lt.noop=So,lt.now=si,lt.pad=function(e,t,n){t=+t;var r=(e=ye(e)).length;if(r>=t||!Ke(t))return e;var i=(t-r)/2,o=Qe(i);return(n=Bn("",$e(i),n)).slice(0,o)+e+n},lt.padLeft=uo,lt.padRight=co,lt.parseInt=function(e,t,n){return(n?nr(e,t,n):null==t)?t=0:t&&(t=+t),e=go(e),nt(e,t||(W.test(e)?16:10))},lt.random=function(e,t,n){n&&nr(e,t,n)&&(t=n=void 0);var r=null==e,i=null==t;if(null==n&&(i&&"boolean"==typeof e?(n=e,e=1):"boolean"==typeof t&&(n=t,i=!0)),r&&i&&(t=1,i=!1),e=+e||0,i?(t=e,e=0):t=+t||0,n||e%1||t%1){var o=rt();return et(e+o*(t-e+Be("1e-"+((o+"").length-1))),t)}return Zt(e,t)},lt.reduce=ni,lt.reduceRight=ri,lt.repeat=po,lt.result=function(e,t,n){var r=null==e?void 0:e[t];return void 0===r&&(null==e||rr(t,e)||(r=null==(e=1==(t=mr(t)).length?e:qt(e,nn(t,0,-1)))?void 0:e[Nr(t)]),r=void 0===r?n:r),Ri(r)?r.call(e):r},lt.round=ko,lt.runInContext=e,lt.size=function(e){var t=e?Yn(e):0;return or(t)?t:Ji(e).length},lt.snakeCase=fo,lt.some=oi,lt.sortedIndex=Ir,lt.sortedLastIndex=Rr,lt.startCase=ho,lt.startsWith=function(e,t,n){return e=ye(e),n=null==n?0:et(n<0?0:+n||0,e.length),e.lastIndexOf(t,n)==n},lt.sum=function(e,t,n){return n&&nr(e,t,n)&&(t=void 0),1==(t=zn(t,n,3)).length?function(e,t){for(var n=e.length,r=0;n--;)r+=+t(e[n])||0;return r}(Li(e)?e:hr(e),t):function(e,t){var n=0;return Ot(e,(function(e,r,i){n+=+t(e,r,i)||0})),n}(e,t)},lt.template=function(e,t,n){var r=lt.templateSettings;n&&nr(e,t,n)&&(t=n=void 0),e=ye(e),t=St(wt({},n||t),r,Tt);var i,o,a=St(wt({},t.imports),r.imports,Tt),s=Ji(a),l=ln(a,s),u=0,c=t.interpolate||X,d="__p += '",p=oe((t.escape||X).source+"|"+c.source+"|"+(c===D?U:X).source+"|"+(t.evaluate||X).source+"|$","g"),f="//# sourceURL="+("sourceURL"in t?t.sourceURL:"lodash.templateSources["+ ++J+"]")+"\n";e.replace(p,(function(t,n,r,a,s,l){return r||(r=a),d+=e.slice(u,l).replace(Q,we),n&&(i=!0,d+="' +\n__e("+n+") +\n'"),s&&(o=!0,d+="';\n"+s+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),u=l+t.length,t})),d+="';\n";var h=t.variable;h||(d="with (obj) {\n"+d+"\n}\n"),d=(o?d.replace(w,""):d).replace(N,"$1").replace(L,"$1;"),d="function("+(h||"obj")+") {\n"+(h?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var g=vo((function(){return te(s,f+"return "+d).apply(void 0,l)}));if(g.source=d,Ii(g))throw g;return g},lt.trim=go,lt.trimLeft=function(e,t,n){var r=e;return(e=ye(e))?(n?nr(r,t,n):null==t)?e.slice(Re(e)):e.slice(xe(e,t+"")):e},lt.trimRight=function(e,t,n){var r=e;return(e=ye(e))?(n?nr(r,t,n):null==t)?e.slice(0,ke(e)+1):e.slice(0,be(e,t+"")+1):e},lt.trunc=function(e,t,n){n&&nr(e,t,n)&&(t=void 0);var r=30,i="...";if(null!=t)if(ki(t)){var o="separator"in t?t.separator:o;r="length"in t?+t.length||0:r,i="omission"in t?ye(t.omission):i}else r=+t||0;if(r>=(e=ye(e)).length)return e;var a=r-i.length;if(a<1)return i;var s=e.slice(0,a);if(null==o)return s+i;if(Mi(o)){if(e.slice(a).search(o)){var l,u,c=e.slice(0,a);for(o.global||(o=oe(o.source,(V.exec(o)||"")+"g")),o.lastIndex=0;l=o.exec(c);)u=l.index;s=s.slice(0,null==u?a:u)}}else if(e.indexOf(o,a)!=a){var d=s.lastIndexOf(o);d>-1&&(s=s.slice(0,d))}return s+i},lt.unescape=function(e){return(e=ye(e))&&R.test(e)?e.replace(A,_e):e},lt.uniqueId=function(e){var t=++Ae;return ye(e)+t},lt.words=mo,lt.all=Wr,lt.any=oi,lt.contains=Kr,lt.eq=Ai,lt.detect=zr,lt.foldl=ni,lt.foldr=ri,lt.head=Tr,lt.include=Kr,lt.inject=ni,To(lt,(No={},Ut(lt,(function(e,t){lt.prototype[t]||(No[t]=e)})),No),!1),lt.sample=ii,lt.prototype.sample=function(e){return this.__chain__||null!=e?this.thru((function(t){return ii(t,e)})):ii(this.value())},lt.VERSION="3.10.1",mt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){lt[e].placeholder=lt})),mt(["drop","take"],(function(e,t){dt.prototype[e]=function(n){var r=this.__filtered__;if(r&&!t)return new dt(this);n=null==n?1:Ze(Qe(n)||0,0);var i=this.clone();return r?i.__takeCount__=et(i.__takeCount__,n):i.__views__.push({size:n,type:e+(i.__dir__<0?"Right":"")}),i},dt.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),mt(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=2!=n;dt.prototype[e]=function(e,t){var i=this.clone();return i.__iteratees__.push({iteratee:zn(e,t,1),type:n}),i.__filtered__=i.__filtered__||r,i}})),mt(["first","last"],(function(e,t){var n="take"+(t?"Right":"");dt.prototype[e]=function(){return this[n](1).value()[0]}})),mt(["initial","rest"],(function(e,t){var n="drop"+(t?"":"Right");dt.prototype[e]=function(){return this.__filtered__?new dt(this):this[n](1)}})),mt(["pluck","where"],(function(e,t){var n=t?"filter":"map",r=t?Qt:wo;dt.prototype[e]=function(e){return this[n](r(e))}})),dt.prototype.compact=function(){return this.filter(xo)},dt.prototype.reject=function(e,t){return e=zn(e,t,1),this.filter((function(t){return!e(t)}))},dt.prototype.slice=function(e,t){e=null==e?0:+e||0;var n=this;return n.__filtered__&&(e>0||t<0)?new dt(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),void 0!==t&&(n=(t=+t||0)<0?n.dropRight(-t):n.take(t-e)),n)},dt.prototype.takeRightWhile=function(e,t){return this.reverse().takeWhile(e,t).reverse()},dt.prototype.toArray=function(){return this.take(ot)},Ut(dt.prototype,(function(e,t){var n=/^(?:filter|map|reject)|While$/.test(t),r=/^(?:first|last)$/.test(t),i=lt[r?"take"+("last"==t?"Right":""):t];i&&(lt.prototype[t]=function(){var t=r?[1]:arguments,o=this.__chain__,a=this.__wrapped__,s=!!this.__actions__.length,l=a instanceof dt,u=t[0],c=l||Li(a);c&&n&&"function"==typeof u&&1!=u.length&&(l=c=!1);var d=function(e){return r&&o?i(e,1)[0]:i.apply(void 0,bt([e],t))},p={func:Hr,args:[d],thisArg:void 0},f=l&&!s;if(r&&!o)return f?((a=a.clone()).__actions__.push(p),e.call(a)):i.call(void 0,this.value())[0];if(!r&&c){a=f?a:new dt(this);var h=e.apply(a,t);return h.__actions__.push(p),new ct(h,o)}return this.thru(d)})})),mt(["join","pop","push","replace","shift","sort","splice","split","unshift"],(function(e){var t=(/^(?:replace|split)$/.test(e)?ce:le)[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:join|pop|replace|shift)$/.test(e);lt.prototype[e]=function(){var e=arguments;return r&&!this.__chain__?t.apply(this.value(),e):this[n]((function(n){return t.apply(n,e)}))}})),Ut(dt.prototype,(function(e,t){var n=lt[t];if(n){var r=n.name;(st[r]||(st[r]=[])).push({name:t,func:n})}})),st[jn(void 0,2).name]=[{name:"wrapper",func:void 0}],dt.prototype.clone=function(){var e=new dt(this.__wrapped__);return e.__actions__=gt(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=gt(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=gt(this.__views__),e},dt.prototype.reverse=function(){if(this.__filtered__){var e=new dt(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},dt.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Li(e),r=t<0,i=n?e.length:0,o=function(e,t,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=et(t,e+a);break;case"takeRight":e=Ze(e,t-a)}}return{start:e,end:t}}(0,i,this.__views__),a=o.start,s=o.end,l=s-a,u=r?s:a-1,c=this.__iteratees__,d=c.length,p=0,f=et(l,this.__takeCount__);if(!n||i<200||i==l&&f==l)return cn(r&&n?e.reverse():e,this.__actions__);var h=[];e:for(;l--&&p<f;){for(var g=-1,m=e[u+=t];++g<d;){var v=c[g],y=v.iteratee,x=v.type,b=y(m);if(2==x)m=b;else if(!b){if(1==x)continue e;break e}}h[p++]=m}return h},lt.prototype.chain=function(){return Br(this)},lt.prototype.commit=function(){return new ct(this.value(),this.__chain__)},lt.prototype.concat=Gr,lt.prototype.plant=function(e){for(var t,n=this;n instanceof ut;){var r=vr(n);t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t},lt.prototype.reverse=function(){var e=this.__wrapped__,t=function(e){return n&&n.__dir__<0?e:e.reverse()};if(e instanceof dt){var n=e;return this.__actions__.length&&(n=new dt(this)),(n=n.reverse()).__actions__.push({func:Hr,args:[t],thisArg:void 0}),new ct(n,this.__chain__)}return this.thru(t)},lt.prototype.toString=function(){return this.value()+""},lt.prototype.run=lt.prototype.toJSON=lt.prototype.valueOf=lt.prototype.value=function(){return cn(this.__wrapped__,this.__actions__)},lt.prototype.collect=lt.prototype.map,lt.prototype.head=lt.prototype.first,lt.prototype.select=lt.prototype.filter,lt.prototype.tail=lt.prototype.rest,lt}();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(fe._=Oe,define((function(){return Oe}))):se&&le?pe?(le.exports=Oe)._=Oe:se._=Oe:fe._=Oe}).call(this)}).call(this,void 0!==global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],20:[function(e,t,n){(function(){var r;r=function(e){return e.pivotUtilities.d3_renderers={Treemap:function(t,n){var r,i,o,a,s,l,u,c,d,p,f,h,g;for(o={localeStrings:{},d3:{width:function(){return e(window).width()/1.4},height:function(){return e(window).height()/1.4}}},n=e.extend(o,n),c=e("<div>").css({width:"100%",height:"100%"}),p={name:"All",children:[]},r=function(e,t,n){var i,o,a,s,l,u;if(0!==t.length){for(null==e.children&&(e.children=[]),u=t.shift(),o=0,a=(l=e.children).length;o<a;o++)if((i=l[o]).name===u)return void r(i,t,n);return r(s={name:u},t,n),e.children.push(s)}e.value=n},s=0,l=(u=t.getRowKeys()).length;s<l;s++)d=u[s],null!=(h=t.getAggregator(d,[]).value())&&r(p,d,h);return i=d3.scale.category10(),g=n.d3.width(),a=n.d3.height(),f=d3.layout.treemap().size([g,a]).sticky(!0).value((function(e){return e.size})),d3.select(c[0]).append("div").style("position","relative").style("width",g+"px").style("height",a+"px").datum(p).selectAll(".node").data(f.padding([15,0,0,0]).value((function(e){return e.value})).nodes).enter().append("div").attr("class","node").style("background",(function(e){return null!=e.children?"lightgrey":i(e.name)})).text((function(e){return e.name})).call((function(){this.style("left",(function(e){return e.x+"px"})).style("top",(function(e){return e.y+"px"})).style("width",(function(e){return Math.max(0,e.dx-1)+"px"})).style("height",(function(e){return Math.max(0,e.dy-1)+"px"}))})),c}}},"object"==typeof n&&"object"==typeof t?r(e("jquery")):"function"==typeof define&&define.amd?define(["jquery"],r):r(jQuery)}).call(this)},{jquery:18}],21:[function(e,t,n){(function(){var r;r=function(e){var t;return t=function(t,n){return function(r,i){var o,a,s,l,u,c,d,p,f,h,g,m,v,y,x,b,E,C,T,S,w,N,L,A,I,R,k,_,O,D,M;if(p={localeStrings:{vs:"vs",by:"by"},gchart:{}},null==(a=(i=e.extend(!0,p,i)).gchart).width&&(a.width=window.innerWidth/1.4),null==(s=i.gchart).height&&(s.height=window.innerHeight/1.4),0===(A=r.getRowKeys()).length&&A.push([]),0===(u=r.getColKeys()).length&&u.push([]),f=r.aggregatorName,r.valAttrs.length&&(f+="("+r.valAttrs.join(", ")+")"),(v=function(){var e,t,n;for(n=[],e=0,t=A.length;e<t;e++)g=A[e],n.push(g.join("-"));return n}()).unshift(""),C=0,"ScatterChart"===t){for(M in c=[],S=r.tree)for(D in R=S[M])o=R[D],c.push([parseFloat(D),parseFloat(M),f+": \n"+o.format(o.value())]);(d=new google.visualization.DataTable).addColumn("number",r.colAttrs.join("-")),d.addColumn("number",r.rowAttrs.join("-")),d.addColumn({type:"string",role:"tooltip"}),d.addRows(c),m=r.colAttrs.join("-"),k=r.rowAttrs.join("-"),I=""}else{for(c=[v],y=0,b=u.length;y<b;y++){for(C+=(N=[(l=u[y]).join("-")])[0].length,x=0,E=A.length;x<E;x++)L=A[x],null!=(o=r.getAggregator(L,l)).value()?(_=o.value(),e.isNumeric(_)?_<1?N.push(parseFloat(_.toPrecision(3))):N.push(parseFloat(_.toFixed(3))):N.push(_)):N.push(null);c.push(N)}d=google.visualization.arrayToDataTable(c),I=k=f,""!==(m=r.colAttrs.join("-"))&&(I+=" "+i.localeStrings.vs+" "+m),""!==(h=r.rowAttrs.join("-"))&&(I+=" "+i.localeStrings.by+" "+h)}return T={title:I,hAxis:{title:m,slantedText:C>50},vAxis:{title:k},tooltip:{textStyle:{fontName:"Arial",fontSize:12}}},"ColumnChart"===t&&(T.vAxis.minValue=0),"ScatterChart"===t?(T.legend={position:"none"},T.chartArea={width:"80%",height:"80%"}):2===c[0].length&&""===c[0][1]&&(T.legend={position:"none"}),e.extend(T,i.gchart,n),w=e("<div>").css({width:"100%",height:"100%"}),(O=new google.visualization.ChartWrapper({dataTable:d,chartType:t,options:T})).draw(w[0]),w.bind("dblclick",(function(){var e;return e=new google.visualization.ChartEditor,google.visualization.events.addListener(e,"ok",(function(){return e.getChartWrapper().draw(w[0])})),e.openDialog(O)})),w}},e.pivotUtilities.gchart_renderers={"Line Chart":t("LineChart"),"Bar Chart":t("ColumnChart"),"Stacked Bar Chart":t("ColumnChart",{isStacked:!0}),"Area Chart":t("AreaChart",{isStacked:!0}),"Scatter Chart":t("ScatterChart")}},"object"==typeof n&&"object"==typeof t?r(e("jquery")):"function"==typeof define&&define.amd?define(["jquery"],r):r(jQuery)}).call(this)},{jquery:18}],22:[function(e,t,n){(function(){var r,i=[].indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(t in this&&this[t]===e)return t;return-1},o=[].slice,a=function(e,t){return function(){return e.apply(t,arguments)}},s={}.hasOwnProperty;r=function(e){var t,n,r,l,u,c,d,p,f,h,g,m,v,y,x,b,E,C,T;return n=function(e,t,n){var r,i,o,a;for(o=(i=(e+="").split("."))[0],a=i.length>1?n+i[1]:"",r=/(\d+)(\d{3})/;r.test(o);)o=o.replace(r,"$1"+t+"$2");return o+a},x=(g=function(t){var r;return r={digitsAfterDecimal:2,scaler:1,thousandsSep:",",decimalSep:".",prefix:"",suffix:"",showZero:!1},t=e.extend(r,t),function(e){var r;return isNaN(e)||!isFinite(e)?"":0!==e||t.showZero?(r=n((t.scaler*e).toFixed(t.digitsAfterDecimal),t.thousandsSep,t.decimalSep),""+t.prefix+r+t.suffix):""}})(),b=g({digitsAfterDecimal:0}),E=g({digitsAfterDecimal:1,scaler:100,suffix:"%"}),l={Count:(T=r={count:function(e){return null==e&&(e=b),function(){return function(t,n,r){return{count:0,push:function(){return this.count++},value:function(){return this.count},format:e}}}},countUnique:function(e){return null==e&&(e=b),function(t){var n;return n=t[0],function(t,r,o){return{uniq:[],push:function(e){var t;if(t=e[n],i.call(this.uniq,t)<0)return this.uniq.push(e[n])},value:function(){return this.uniq.length},format:e,numInputs:null!=n?0:1}}}},listUnique:function(e){return function(t){var n;return n=t[0],function(t,r,o){return{uniq:[],push:function(e){var t;if(t=e[n],i.call(this.uniq,t)<0)return this.uniq.push(e[n])},value:function(){return this.uniq.join(e)},format:function(e){return e},numInputs:null!=n?0:1}}}},sum:function(e){return null==e&&(e=x),function(t){var n;return n=t[0],function(t,r,i){return{sum:0,push:function(e){if(!isNaN(parseFloat(e[n])))return this.sum+=parseFloat(e[n])},value:function(){return this.sum},format:e,numInputs:null!=n?0:1}}}},min:function(e){return null==e&&(e=x),function(t){var n;return n=t[0],function(t,r,i){return{val:null,push:function(e){var t,r;if(r=parseFloat(e[n]),!isNaN(r))return this.val=Math.min(r,null!=(t=this.val)?t:r)},value:function(){return this.val},format:e,numInputs:null!=n?0:1}}}},max:function(e){return null==e&&(e=x),function(t){var n;return n=t[0],function(t,r,i){return{val:null,push:function(e){var t,r;if(r=parseFloat(e[n]),!isNaN(r))return this.val=Math.max(r,null!=(t=this.val)?t:r)},value:function(){return this.val},format:e,numInputs:null!=n?0:1}}}},average:function(e){return null==e&&(e=x),function(t){var n;return n=t[0],function(t,r,i){return{sum:0,len:0,push:function(e){if(!isNaN(parseFloat(e[n])))return this.sum+=parseFloat(e[n]),this.len++},value:function(){return this.sum/this.len},format:e,numInputs:null!=n?0:1}}}},sumOverSum:function(e){return null==e&&(e=x),function(t){var n,r;return r=t[0],n=t[1],function(t,i,o){return{sumNum:0,sumDenom:0,push:function(e){if(isNaN(parseFloat(e[r]))||(this.sumNum+=parseFloat(e[r])),!isNaN(parseFloat(e[n])))return this.sumDenom+=parseFloat(e[n])},value:function(){return this.sumNum/this.sumDenom},format:e,numInputs:null!=r&&null!=n?0:2}}}},sumOverSumBound80:function(e,t){return null==e&&(e=!0),null==t&&(t=x),function(n){var r,i;return i=n[0],r=n[1],function(n,o,a){return{sumNum:0,sumDenom:0,push:function(e){if(isNaN(parseFloat(e[i]))||(this.sumNum+=parseFloat(e[i])),!isNaN(parseFloat(e[r])))return this.sumDenom+=parseFloat(e[r])},value:function(){var t;return t=e?1:-1,(.821187207574908/this.sumDenom+this.sumNum/this.sumDenom+1.2815515655446004*t*Math.sqrt(.410593603787454/(this.sumDenom*this.sumDenom)+this.sumNum*(1-this.sumNum/this.sumDenom)/(this.sumDenom*this.sumDenom)))/(1+1.642374415149816/this.sumDenom)},format:t,numInputs:null!=i&&null!=r?0:2}}}},fractionOf:function(e,t,n){return null==t&&(t="total"),null==n&&(n=E),function(){var r;return r=1<=arguments.length?o.call(arguments,0):[],function(i,o,a){return{selector:{total:[[],[]],row:[o,[]],col:[[],a]}[t],inner:e.apply(null,r)(i,o,a),push:function(e){return this.inner.push(e)},format:n,value:function(){return this.inner.value()/i.getAggregator.apply(i,this.selector).inner.value()},numInputs:e.apply(null,r)().numInputs}}}}}).count(b),"Count Unique Values":T.countUnique(b),"List Unique Values":T.listUnique(", "),Sum:T.sum(x),"Integer Sum":T.sum(b),Average:T.average(x),Minimum:T.min(x),Maximum:T.max(x),"Sum over Sum":T.sumOverSum(x),"80% Upper Bound":T.sumOverSumBound80(!0,x),"80% Lower Bound":T.sumOverSumBound80(!1,x),"Sum as Fraction of Total":T.fractionOf(T.sum(),"total",E),"Sum as Fraction of Rows":T.fractionOf(T.sum(),"row",E),"Sum as Fraction of Columns":T.fractionOf(T.sum(),"col",E),"Count as Fraction of Total":T.fractionOf(T.count(),"total",E),"Count as Fraction of Rows":T.fractionOf(T.count(),"row",E),"Count as Fraction of Columns":T.fractionOf(T.count(),"col",E)},p={en:{aggregators:l,renderers:v={Table:function(e,t){return m(e,t)},"Table Barchart":function(t,n){return e(m(t,n)).barchart()},Heatmap:function(t,n){return e(m(t,n)).heatmap()},"Row Heatmap":function(t,n){return e(m(t,n)).heatmap("rowheatmap")},"Col Heatmap":function(t,n){return e(m(t,n)).heatmap("colheatmap")}},localeStrings:{renderError:"An error occurred rendering the PivotTable results.",computeError:"An error occurred computing the PivotTable results.",uiRenderError:"An error occurred rendering the PivotTable UI.",selectAll:"Select All",selectNone:"Select None",tooMany:"(too many to list)",filterResults:"Filter results",totals:"Totals",vs:"vs",by:"by"}}},f=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],u=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],C=function(e){return("0"+e).substr(-2,2)},c={bin:function(e,t){return function(n){return n[e]-n[e]%t}},dateFormat:function(e,t,n,r,i){var o;return null==n&&(n=!1),null==r&&(r=f),null==i&&(i=u),o=n?"UTC":"",function(n){var a;return a=new Date(Date.parse(n[e])),isNaN(a)?"":t.replace(/%(.)/g,(function(e,t){switch(t){case"y":return a["get"+o+"FullYear"]();case"m":return C(a["get"+o+"Month"]()+1);case"n":return r[a["get"+o+"Month"]()];case"d":return C(a["get"+o+"Date"]());case"w":return i[a["get"+o+"Day"]()];case"x":return a["get"+o+"Day"]();case"H":return C(a["get"+o+"Hours"]());case"M":return C(a["get"+o+"Minutes"]());case"S":return C(a["get"+o+"Seconds"]());default:return"%"+t}}))}}},h=function(e,t){var n,r,i,o,a,s,l;if(s=/(\d+)|(\D+)/g,a=/\d/,l=/^0/,"number"==typeof e||"number"==typeof t)return isNaN(e)?1:isNaN(t)?-1:e-t;if((n=String(e).toLowerCase())===(i=String(t).toLowerCase()))return 0;if(!a.test(n)||!a.test(i))return n>i?1:-1;for(n=n.match(s),i=i.match(s);n.length&&i.length;)if((r=n.shift())!==(o=i.shift()))return a.test(r)&&a.test(o)?r.replace(l,".0")-o.replace(l,".0"):r>o?1:-1;return n.length-i.length},y=function(e){var t,n,r;for(t in n={},e)r=e[t],n[r]=t;return function(e,t){return null!=n[e]&&null!=n[t]?n[e]-n[t]:null!=n[e]?-1:null!=n[t]?1:h(e,t)}},d=function(t,n){var r;return r=t(n),e.isFunction(r)?r:h},e.pivotUtilities={aggregatorTemplates:r,aggregators:l,renderers:v,derivers:c,locales:p,naturalSort:h,numberFormat:g,sortAs:y},t=function(){function t(e,n){var r;this.getAggregator=a(this.getAggregator,this),this.getRowKeys=a(this.getRowKeys,this),this.getColKeys=a(this.getColKeys,this),this.sortKeys=a(this.sortKeys,this),this.arrSort=a(this.arrSort,this),this.aggregator=n.aggregator,this.aggregatorName=n.aggregatorName,this.colAttrs=n.cols,this.rowAttrs=n.rows,this.valAttrs=n.vals,this.sorters=n.sorters,this.tree={},this.rowKeys=[],this.colKeys=[],this.rowTotals={},this.colTotals={},this.allTotal=this.aggregator(this,[],[]),this.sorted=!1,t.forEachRecord(e,n.derivedAttributes,(r=this,function(e){if(n.filter(e))return r.processRecord(e)}))}return t.forEachRecord=function(t,n,r){var i,o,a,l,u,c,d,p,f,h,g,m;if(i=e.isEmptyObject(n)?r:function(e){var t,i,o;for(t in n)o=n[t],e[t]=null!=(i=o(e))?i:e[t];return r(e)},e.isFunction(t))return t(i);if(e.isArray(t)){if(e.isArray(t[0])){for(a in h=[],t)if(s.call(t,a)&&(o=t[a],a>0)){for(l in p={},f=t[0])s.call(f,l)&&(u=f[l],p[u]=o[l]);h.push(i(p))}return h}for(g=[],c=0,d=t.length;c<d;c++)p=t[c],g.push(i(p));return g}if(t instanceof jQuery)return m=[],e("thead > tr > th",t).each((function(t){return m.push(e(this).text())})),e("tbody > tr",t).each((function(t){return p={},e("td",this).each((function(t){return p[m[t]]=e(this).html()})),i(p)}));throw new Error("unknown input format")},t.convertToArray=function(e){var n;return n=[],t.forEachRecord(e,{},(function(e){return n.push(e)})),n},t.prototype.arrSort=function(e){var t,n;return n=function(){var n,r,i;for(i=[],n=0,r=e.length;n<r;n++)t=e[n],i.push(d(this.sorters,t));return i}.call(this),function(e,t){var r,i;for(i in n)if(0!==(r=(0,n[i])(e[i],t[i])))return r;return 0}},t.prototype.sortKeys=function(){if(!this.sorted)return this.sorted=!0,this.rowKeys.sort(this.arrSort(this.rowAttrs)),this.colKeys.sort(this.arrSort(this.colAttrs))},t.prototype.getColKeys=function(){return this.sortKeys(),this.colKeys},t.prototype.getRowKeys=function(){return this.sortKeys(),this.rowKeys},t.prototype.processRecord=function(e){var t,n,r,i,o,a,s,l,u,c,d,p,f;for(t=[],p=[],i=0,o=(l=this.colAttrs).length;i<o;i++)f=l[i],t.push(null!=(u=e[f])?u:"null");for(s=0,a=(c=this.rowAttrs).length;s<a;s++)f=c[s],p.push(null!=(d=e[f])?d:"null");if(r=p.join(String.fromCharCode(0)),n=t.join(String.fromCharCode(0)),this.allTotal.push(e),0!==p.length&&(this.rowTotals[r]||(this.rowKeys.push(p),this.rowTotals[r]=this.aggregator(this,p,[])),this.rowTotals[r].push(e)),0!==t.length&&(this.colTotals[n]||(this.colKeys.push(t),this.colTotals[n]=this.aggregator(this,[],t)),this.colTotals[n].push(e)),0!==t.length&&0!==p.length)return this.tree[r]||(this.tree[r]={}),this.tree[r][n]||(this.tree[r][n]=this.aggregator(this,p,t)),this.tree[r][n].push(e)},t.prototype.getAggregator=function(e,t){var n,r,i;return i=e.join(String.fromCharCode(0)),r=t.join(String.fromCharCode(0)),null!=(n=0===e.length&&0===t.length?this.allTotal:0===e.length?this.colTotals[r]:0===t.length?this.rowTotals[i]:this.tree[i][r])?n:{value:function(){return null},format:function(){return""}}},t}(),m=function(t,n){var r,i,o,a,l,u,c,d,p,f,h,g,m,v,y,x,b,E,C,T,S;for(d in u={localeStrings:{totals:"Totals"}},n=e.extend(u,n),o=t.colAttrs,h=t.rowAttrs,m=t.getRowKeys(),l=t.getColKeys(),(f=document.createElement("table")).className="pvtTable",v=function(e,t,n){var r,i,o,a,s,l,u,c;if(0!==t){for(a=!0,c=r=0,s=n;0<=s?r<=s:r>=s;c=0<=s?++r:--r)e[t-1][c]!==e[t][c]&&(a=!1);if(a)return-1}for(i=0;t+i<e.length;){for(u=!1,c=o=0,l=n;0<=l?o<=l:o>=l;c=0<=l?++o:--o)e[t][c]!==e[t+i][c]&&(u=!0);if(u)break;i++}return i},o)if(s.call(o,d)){for(c in i=o[d],E=document.createElement("tr"),0===parseInt(d)&&0!==h.length&&((x=document.createElement("th")).setAttribute("colspan",h.length),x.setAttribute("rowspan",o.length),E.appendChild(x)),(x=document.createElement("th")).className="pvtAxisLabel",x.innerHTML=i,E.appendChild(x),l)s.call(l,c)&&(a=l[c],-1!==(S=v(l,parseInt(c),parseInt(d)))&&((x=document.createElement("th")).className="pvtColLabel",x.innerHTML=a[d],x.setAttribute("colspan",S),parseInt(d)===o.length-1&&0!==h.length&&x.setAttribute("rowspan",2),E.appendChild(x)));0===parseInt(d)&&((x=document.createElement("th")).className="pvtTotalLabel",x.innerHTML=n.localeStrings.totals,x.setAttribute("rowspan",o.length+(0===h.length?0:1)),E.appendChild(x)),f.appendChild(E)}if(0!==h.length){for(c in E=document.createElement("tr"),h)s.call(h,c)&&(p=h[c],(x=document.createElement("th")).className="pvtAxisLabel",x.innerHTML=p,E.appendChild(x));x=document.createElement("th"),0===o.length&&(x.className="pvtTotalLabel",x.innerHTML=n.localeStrings.totals),E.appendChild(x),f.appendChild(E)}for(c in m)if(s.call(m,c)){for(d in g=m[c],E=document.createElement("tr"),g)s.call(g,d)&&(C=g[d],-1!==(S=v(m,parseInt(c),parseInt(d)))&&((x=document.createElement("th")).className="pvtRowLabel",x.innerHTML=C,x.setAttribute("rowspan",S),parseInt(d)===h.length-1&&0!==o.length&&x.setAttribute("colspan",2),E.appendChild(x)));for(d in l)s.call(l,d)&&(a=l[d],T=(r=t.getAggregator(g,a)).value(),(y=document.createElement("td")).className="pvtVal row"+c+" col"+d,y.innerHTML=r.format(T),y.setAttribute("data-value",T),E.appendChild(y));T=(b=t.getAggregator(g,[])).value(),(y=document.createElement("td")).className="pvtTotal rowTotal",y.innerHTML=b.format(T),y.setAttribute("data-value",T),y.setAttribute("data-for","row"+c),E.appendChild(y),f.appendChild(E)}for(d in E=document.createElement("tr"),(x=document.createElement("th")).className="pvtTotalLabel",x.innerHTML=n.localeStrings.totals,x.setAttribute("colspan",h.length+(0===o.length?0:1)),E.appendChild(x),l)s.call(l,d)&&(a=l[d],T=(b=t.getAggregator([],a)).value(),(y=document.createElement("td")).className="pvtTotal colTotal",y.innerHTML=b.format(T),y.setAttribute("data-value",T),y.setAttribute("data-for","col"+d),E.appendChild(y));return T=(b=t.getAggregator([],[])).value(),(y=document.createElement("td")).className="pvtGrandTotal",y.innerHTML=b.format(T),y.setAttribute("data-value",T),E.appendChild(y),f.appendChild(E),f.setAttribute("data-numrows",m.length),f.setAttribute("data-numcols",l.length),f},e.fn.pivot=function(n,i){var o,a,s,l,u;o={cols:[],rows:[],vals:[],filter:function(){return!0},aggregator:r.count()(),aggregatorName:"Count",sorters:function(){},derivedAttributes:{},renderer:m,rendererOptions:null,localeStrings:p.en.localeStrings},i=e.extend(o,i),l=null;try{s=new t(n,i);try{l=i.renderer(s,i.rendererOptions)}catch(t){a=t,"undefined"!=typeof console&&null!==console&&console.error(a.stack),l=e("<span>").html(i.localeStrings.renderError)}}catch(t){a=t,"undefined"!=typeof console&&null!==console&&console.error(a.stack),l=e("<span>").html(i.localeStrings.computeError)}for(u=this[0];u.hasChildNodes();)u.removeChild(u.lastChild);return this.append(l)},e.fn.pivotUI=function(n,r,o,a){var l,u,c,f,g,m,v,y,x,b,E,C,T,S,w,N,L,A,I,R,k,_,O,D,M,P,F,j,B,H,G,U,V,W,q,z,$,X,Q,Y;null==o&&(o=!1),null==a&&(a="en"),null==p[a]&&(a="en"),m={derivedAttributes:{},aggregators:p[a].aggregators,renderers:p[a].renderers,hiddenAttributes:[],menuLimit:200,cols:[],rows:[],vals:[],exclusions:{},inclusions:{},unusedAttrsVertical:85,autoSortUnusedAttrs:!1,rendererOptions:{localeStrings:p[a].localeStrings},onRefresh:null,filter:function(){return!0},sorters:function(){},localeStrings:p[a].localeStrings},y=this.data("pivotUIOptions"),R=null==y||o?e.extend(m,r):y;try{for(f in n=t.convertToArray(n),V=function(){var e,t;for(C in t=[],e=n[0])s.call(e,C)&&t.push(C);return t}(),O=R.derivedAttributes)s.call(O,f)&&i.call(V,f)<0&&V.push(f);for(c={},T=0,S=V.length;T<S;T++)Q=V[T],c[Q]={};for(Q in t.forEachRecord(n,R.derivedAttributes,(function(e){var t,n,r;for(C in n=[],e)s.call(e,C)&&(r=e[C],R.filter(e)&&(null==r&&(r="null"),null==(t=c[C])[r]&&(t[r]=0),n.push(c[C][r]++)));return n})),z=e("<table>",{class:"pvtUi"}).attr("cellpadding",5),G=e("<td>"),H=e("<select>").addClass("pvtRenderer").appendTo(G).bind("change",(function(){return j()})),D=R.renderers)s.call(D,Q)&&e("<option>").val(Q).html(Q).appendTo(H);if(g=e("<td>").addClass("pvtAxisContainer pvtUnused"),U=function(){var e,t,n;for(n=[],t=0,e=V.length;t<e;t++)f=V[t],i.call(R.hiddenAttributes,f)<0&&n.push(f);return n}(),X=!1,$="auto"===R.unusedAttrsVertical?120:parseInt(R.unusedAttrsVertical),!isNaN($)){for(u=0,A=0,w=U.length;A<w;A++)u+=U[A].length;X=u>$}for(b in!0===R.unusedAttrsVertical||X?g.addClass("pvtVertList"):g.addClass("pvtHorizList"),x=function(t){var n,r,o,a,s,l,u,p,f,h,m,v,y,x,E;if(u=function(){var e;for(C in e=[],c[t])e.push(C);return e}(),l=!1,(E=e("<div>").addClass("pvtFilterBox").hide()).append(e("<h4>").text(t+" ("+u.length+")")),u.length>R.menuLimit)E.append(e("<p>").html(R.localeStrings.tooMany));else for((r=e("<p>").appendTo(E)).append(e("<button>",{type:"button"}).html(R.localeStrings.selectAll).bind("click",(function(){return E.find("input:visible").prop("checked",!0)}))),r.append(e("<button>",{type:"button"}).html(R.localeStrings.selectNone).bind("click",(function(){return E.find("input:visible").prop("checked",!1)}))),r.append(e("<br>")),r.append(e("<input>",{type:"text",placeholder:R.localeStrings.filterResults,class:"pvtSearch"}).bind("keyup",(function(){var t;return t=e(this).val().toLowerCase(),E.find(".pvtCheckContainer p").each((function(){return-1!==e(this).text().toLowerCase().indexOf(t)?e(this).show():e(this).hide()}))}))),o=e("<div>").addClass("pvtCheckContainer").appendTo(E),f=0,p=(h=u.sort(d(R.sorters,t))).length;f<p;f++)C=h[f],x=c[t][C],a=e("<label>"),s=!1,R.inclusions[t]?s=i.call(R.inclusions[t],C)<0:R.exclusions[t]&&(s=i.call(R.exclusions[t],C)>=0),l||(l=s),e("<input>").attr("type","checkbox").addClass("pvtFilter").attr("checked",!s).data("filter",[t,C]).appendTo(a),a.append(e("<span>").html(C)),a.append(e("<span>").text(" ("+x+")")),o.append(e("<p>").append(a));return y=function(){return E.find("[type='checkbox']").length-E.find("[type='checkbox']:checked").length>0?n.addClass("pvtFilteredAttribute"):n.removeClass("pvtFilteredAttribute"),u.length>R.menuLimit?E.toggle():E.toggle(0,j)},e("<p>").appendTo(E).append(e("<button>",{type:"button"}).text("OK").bind("click",y)),m=function(t){var n,r,i;return n=(i=e(t.currentTarget).position()).left,r=i.top,E.css({left:n+10,top:r+10}).toggle(),E.find(".pvtSearch").val(""),E.find(".pvtCheckContainer p").show()},v=e("<span>").addClass("pvtTriangle").html(" ▾").bind("click",m),n=e("<li>").addClass("axis_"+b).append(e("<span>").addClass("pvtAttr").text(t).data("attrName",t).append(v)),l&&n.addClass("pvtFilteredAttribute"),g.append(n).append(E),n.bind("dblclick",m)},U)s.call(U,b)&&x(f=U[b]);for(Q in W=e("<tr>").appendTo(z),l=e("<select>").addClass("pvtAggregator").bind("change",(function(){return j()})),M=R.aggregators)s.call(M,Q)&&l.append(e("<option>").val(Q).html(Q));for(e("<td>").addClass("pvtVals").appendTo(W).append(l).append(e("<br>")),e("<td>").addClass("pvtAxisContainer pvtHorizList pvtCols").appendTo(W),(q=e("<tr>").appendTo(z)).append(e("<td>").addClass("pvtAxisContainer pvtRows").attr("valign","top")),k=e("<td>").attr("valign","top").addClass("pvtRendererArea").appendTo(q),!0===R.unusedAttrsVertical||X?(z.find("tr:nth-child(1)").prepend(G),z.find("tr:nth-child(2)").prepend(g)):z.prepend(e("<tr>").append(G).append(g)),this.html(z),P=R.cols,I=0,N=P.length;I<N;I++)Q=P[I],this.find(".pvtCols").append(this.find(".axis_"+e.inArray(Q,U)));for(F=R.rows,_=0,L=F.length;_<L;_++)Q=F[_],this.find(".pvtRows").append(this.find(".axis_"+e.inArray(Q,U)));null!=R.aggregatorName&&this.find(".pvtAggregator").val(R.aggregatorName),null!=R.rendererName&&this.find(".pvtRenderer").val(R.rendererName),E=!0,Y=this,B=function(){var t,r,o,a,s,u,c,d,p,f,g,m,v,y,x;if(m={derivedAttributes:R.derivedAttributes,localeStrings:R.localeStrings,rendererOptions:R.rendererOptions,sorters:R.sorters,cols:[],rows:[]},u=null!=(p=R.aggregators[l.val()]([])().numInputs)?p:0,x=[],Y.find(".pvtRows li span.pvtAttr").each((function(){return m.rows.push(e(this).data("attrName"))})),Y.find(".pvtCols li span.pvtAttr").each((function(){return m.cols.push(e(this).data("attrName"))})),Y.find(".pvtVals select.pvtAttrDropdown").each((function(){return 0===u?e(this).remove():(u--,""!==e(this).val()?x.push(e(this).val()):void 0)})),0!==u)for(d=Y.find(".pvtVals"),Q=g=0,f=u;0<=f?g<f:g>f;Q=0<=f?++g:--g){for(s=e("<select>").addClass("pvtAttrDropdown").append(e("<option>")).bind("change",(function(){return j()})),v=0,a=U.length;v<a;v++)t=U[v],s.append(e("<option>").val(t).text(t));d.append(s)}if(E&&(x=R.vals,b=0,Y.find(".pvtVals select.pvtAttrDropdown").each((function(){return e(this).val(x[b]),b++})),E=!1),m.aggregatorName=l.val(),m.vals=x,m.aggregator=R.aggregators[l.val()](x),m.renderer=R.renderers[H.val()],r={},Y.find("input.pvtFilter").not(":checked").each((function(){var t;return t=e(this).data("filter"),null!=r[t[0]]?r[t[0]].push(t[1]):r[t[0]]=[t[1]]})),o={},Y.find("input.pvtFilter:checked").each((function(){var t;if(t=e(this).data("filter"),null!=r[t[0]])return null!=o[t[0]]?o[t[0]].push(t[1]):o[t[0]]=[t[1]]})),m.filter=function(e){var t,n;if(!R.filter(e))return!1;for(C in r)if(t=r[C],n=""+e[C],i.call(t,n)>=0)return!1;return!0},k.pivot(n,m),c=e.extend(R,{cols:m.cols,rows:m.rows,vals:x,exclusions:r,inclusions:o,inclusionsInfo:o,aggregatorName:l.val(),rendererName:H.val()}),Y.data("pivotUIOptions",c),R.autoSortUnusedAttrs&&(y=Y.find("td.pvtUnused.pvtAxisContainer"),e(y).children("li").sort((function(t,n){return h(e(t).text(),e(n).text())})).appendTo(y)),k.css("opacity",1),null!=R.onRefresh)return R.onRefresh(c)},(j=function(){return k.css("opacity",.5),setTimeout(B,10)})(),this.find(".pvtAxisContainer").sortable({update:function(e,t){if(null==t.sender)return j()},connectWith:this.find(".pvtAxisContainer"),items:"li",placeholder:"pvtPlaceholder"})}catch(e){v=e,"undefined"!=typeof console&&null!==console&&console.error(v.stack),this.html(R.localeStrings.uiRenderError)}return this},e.fn.heatmap=function(t){var n,r,i,o,a,s,l,u,c,d,p;switch(null==t&&(t="heatmap"),u=this.data("numrows"),l=this.data("numcols"),n=function(e,t,n){var r;return r=function(){switch(e){case"red":return function(e){return"ff"+e+e};case"green":return function(e){return e+"ff"+e};case"blue":return function(e){return""+e+e+"ff"}}}(),function(e){var i;return 1===(i=(255-Math.round(255*(e-t)/(n-t))).toString(16).split(".")[0]).length&&(i=0+i),r(i)}},p=this,r=function(t,r){var i,o,a;return a=[],(o=function(n){return p.find(t).each((function(){var t;if(null!=(t=e(this).data("value"))&&isFinite(t))return n(t,e(this))}))})((function(e){return a.push(e)})),i=n(r,Math.min.apply(Math,a),Math.max.apply(Math,a)),o((function(e,t){return t.css("background-color","#"+i(e))}))},t){case"heatmap":r(".pvtVal","red");break;case"rowheatmap":for(i=a=0,c=u;0<=c?a<c:a>c;i=0<=c?++a:--a)r(".pvtVal.row"+i,"red");break;case"colheatmap":for(o=s=0,d=l;0<=d?s<d:s>d;o=0<=d?++s:--s)r(".pvtVal.col"+o,"red")}return r(".pvtTotal.rowTotal","red"),r(".pvtTotal.colTotal","red"),this},e.fn.barchart=function(){var t,n,r,i,o,a;for(i=this.data("numrows"),this.data("numcols"),a=this,t=function(t){var n,r,i,o;return o=[],(n=function(n){return a.find(t).each((function(){var t;if(null!=(t=e(this).data("value"))&&isFinite(t))return n(t,e(this))}))})((function(e){return o.push(e)})),r=Math.max.apply(Math,o),i=function(e){return 100*e/(1.4*r)},n((function(t,n){var r,o;return r=n.text(),(o=e("<div>").css({position:"relative",height:"55px"})).append(e("<div>").css({position:"absolute",bottom:0,left:0,right:0,height:i(t)+"%","background-color":"gray"})),o.append(e("<div>").text(r).css({position:"relative","padding-left":"5px","padding-right":"5px"})),n.css({padding:0,"padding-top":"5px","text-align":"center"}).html(o)}))},n=r=0,o=i;0<=o?r<o:r>o;n=0<=o?++r:--r)t(".pvtVal.row"+n);return t(".pvtTotal.colTotal"),this}},"object"==typeof n&&"object"==typeof t?r(e("jquery")):"function"==typeof define&&define.amd?define(["jquery"],r):r(jQuery)}).call(this)},{jquery:18}],23:[function(e,t,n){var r=e("../src/store-engine"),i=e("../storages/all"),o=[e("../plugins/json2")];t.exports=r.createStore(i,o)},{"../plugins/json2":24,"../src/store-engine":26,"../storages/all":28}],24:[function(e,t,n){t.exports=function(){return e("./lib/json2"),{}}},{"./lib/json2":25}],25:[function(require,module,exports){"object"!=typeof JSON&&(JSON={}),function(){"use strict";var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta,rep;function f(e){return e<10?"0"+e:e}function this_value(){return this.valueOf()}function quote(e){return rx_escapable.lastIndex=0,rx_escapable.test(e)?'"'+e.replace(rx_escapable,(function(e){var t=meta[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+e+'"'}function str(e,t){var n,r,i,o,a,s=gap,l=t[e];switch(l&&"object"==typeof l&&"function"==typeof l.toJSON&&(l=l.toJSON(e)),"function"==typeof rep&&(l=rep.call(t,e,l)),typeof l){case"string":return quote(l);case"number":return isFinite(l)?String(l):"null";case"boolean":case"null":return String(l);case"object":if(!l)return"null";if(gap+=indent,a=[],"[object Array]"===Object.prototype.toString.apply(l)){for(o=l.length,n=0;n<o;n+=1)a[n]=str(n,l)||"null";return i=0===a.length?"[]":gap?"[\n"+gap+a.join(",\n"+gap)+"\n"+s+"]":"["+a.join(",")+"]",gap=s,i}if(rep&&"object"==typeof rep)for(o=rep.length,n=0;n<o;n+=1)"string"==typeof rep[n]&&(i=str(r=rep[n],l))&&a.push(quote(r)+(gap?": ":":")+i);else for(r in l)Object.prototype.hasOwnProperty.call(l,r)&&(i=str(r,l))&&a.push(quote(r)+(gap?": ":":")+i);return i=0===a.length?"{}":gap?"{\n"+gap+a.join(",\n"+gap)+"\n"+s+"}":"{"+a.join(",")+"}",gap=s,i}}"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value),"function"!=typeof JSON.stringify&&(meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(e,t,n){var r;if(gap="",indent="","number"==typeof n)for(r=0;r<n;r+=1)indent+=" ";else"string"==typeof n&&(indent=n);if(rep=t,t&&"function"!=typeof t&&("object"!=typeof t||"number"!=typeof t.length))throw new Error("JSON.stringify");return str("",{"":e})}),"function"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){var j;function walk(e,t){var n,r,i=e[t];if(i&&"object"==typeof i)for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(void 0!==(r=walk(i,n))?i[n]=r:delete i[n]);return reviver.call(e,t,i)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,(function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))),rx_one.test(text.replace(rx_two,"@").replace(rx_three,"]").replace(rx_four,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}()},{}],26:[function(e,t,n){var r=e("./util"),i=r.slice,o=r.pluck,a=r.each,s=r.bind,l=r.create,u=r.isList,c=r.isFunction,d=r.isObject;t.exports={createStore:f};var p={version:"2.0.12",enabled:!1,get:function(e,t){var n=this.storage.read(this._namespacePrefix+e);return this._deserialize(n,t)},set:function(e,t){return void 0===t?this.remove(e):(this.storage.write(this._namespacePrefix+e,this._serialize(t)),t)},remove:function(e){this.storage.remove(this._namespacePrefix+e)},each:function(e){var t=this;this.storage.each((function(n,r){e.call(t,t._deserialize(n),(r||"").replace(t._namespaceRegexp,""))}))},clearAll:function(){this.storage.clearAll()},hasNamespace:function(e){return this._namespacePrefix=="__storejs_"+e+"_"},createStore:function(){return f.apply(this,arguments)},addPlugin:function(e){this._addPlugin(e)},namespace:function(e){return f(this.storage,this.plugins,e)}};function f(e,t,n){n||(n=""),e&&!u(e)&&(e=[e]),t&&!u(t)&&(t=[t]);var r=n?"__storejs_"+n+"_":"",f=n?new RegExp("^"+r):null;if(!/^[a-zA-Z0-9_\-]*$/.test(n))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var h=l({_namespacePrefix:r,_namespaceRegexp:f,_testStorage:function(e){try{var t="__storejs__test__";e.write(t,t);var n=e.read(t)===t;return e.remove(t),n}catch(e){return!1}},_assignPluginFnProp:function(e,t){var n=this[t];this[t]=function(){var t=i(arguments,0),r=this;function o(){if(n)return a(arguments,(function(e,n){t[n]=e})),n.apply(r,t)}var s=[o].concat(t);return e.apply(r,s)}},_serialize:function(e){return JSON.stringify(e)},_deserialize:function(e,t){if(!e)return t;var n="";try{n=JSON.parse(e)}catch(t){n=e}return void 0!==n?n:t},_addStorage:function(e){this.enabled||this._testStorage(e)&&(this.storage=e,this.enabled=!0)},_addPlugin:function(e){var t=this;if(u(e))a(e,(function(e){t._addPlugin(e)}));else if(!o(this.plugins,(function(t){return e===t}))){if(this.plugins.push(e),!c(e))throw new Error("Plugins must be function values that return objects");var n=e.call(this);if(!d(n))throw new Error("Plugins must return an object of function properties");a(n,(function(n,r){if(!c(n))throw new Error("Bad plugin property: "+r+" from plugin "+e.name+". Plugins should only return functions.");t._assignPluginFnProp(n,r)}))}},addStorage:function(e){!function(){var e="undefined"==typeof console?null:console;if(e){var t=e.warn?e.warn:e.log;t.apply(e,arguments)}}("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(e)}},p,{plugins:[]});return h.raw={},a(h,(function(e,t){c(e)&&(h.raw[t]=s(h,e))})),a(e,(function(e){h._addStorage(e)})),a(t,(function(e){h._addPlugin(e)})),h}},{"./util":27}],27:[function(e,t,n){(function(e){var n=Object.assign?Object.assign:function(e,t,n,r){for(var i=1;i<arguments.length;i++)s(Object(arguments[i]),(function(t,n){e[n]=t}));return e},r=function(){if(Object.create)return function(e,t,r,i){var o=a(arguments,1);return n.apply(this,[Object.create(e)].concat(o))};{function e(){}return function(t,r,i,o){var s=a(arguments,1);return e.prototype=t,n.apply(this,[new e].concat(s))}}}(),i=String.prototype.trim?function(e){return String.prototype.trim.call(e)}:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},o="undefined"!=typeof window?window:e;function a(e,t){return Array.prototype.slice.call(e,t||0)}function s(e,t){l(e,(function(e,n){return t(e,n),!1}))}function l(e,t){if(u(e)){for(var n=0;n<e.length;n++)if(t(e[n],n))return e[n]}else for(var r in e)if(e.hasOwnProperty(r)&&t(e[r],r))return e[r]}function u(e){return null!=e&&"function"!=typeof e&&"number"==typeof e.length}t.exports={assign:n,create:r,trim:i,bind:function(e,t){return function(){return t.apply(e,Array.prototype.slice.call(arguments,0))}},slice:a,each:s,map:function(e,t){var n=u(e)?[]:{};return l(e,(function(e,r){return n[r]=t(e,r),!1})),n},pluck:l,isList:u,isFunction:function(e){return e&&"[object Function]"==={}.toString.call(e)},isObject:function(e){return e&&"[object Object]"==={}.toString.call(e)},Global:o}}).call(this,void 0!==global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],28:[function(e,t,n){t.exports=[e("./localStorage"),e("./oldFF-globalStorage"),e("./oldIE-userDataStorage"),e("./cookieStorage"),e("./sessionStorage"),e("./memoryStorage")]},{"./cookieStorage":29,"./localStorage":30,"./memoryStorage":31,"./oldFF-globalStorage":32,"./oldIE-userDataStorage":33,"./sessionStorage":34}],29:[function(e,t,n){var r=e("../src/util"),i=r.Global,o=r.trim;t.exports={name:"cookieStorage",read:function(e){if(!e||!u(e))return null;var t="(?:^|.*;\\s*)"+escape(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(a.cookie.replace(new RegExp(t),"$1"))},write:function(e,t){e&&(a.cookie=escape(e)+"="+escape(t)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/")},each:s,remove:l,clearAll:function(){s((function(e,t){l(t)}))}};var a=i.document;function s(e){for(var t=a.cookie.split(/; ?/g),n=t.length-1;n>=0;n--)if(o(t[n])){var r=t[n].split("="),i=unescape(r[0]);e(unescape(r[1]),i)}}function l(e){e&&u(e)&&(a.cookie=escape(e)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/")}function u(e){return new RegExp("(?:^|;\\s*)"+escape(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(a.cookie)}},{"../src/util":27}],30:[function(e,t,n){var r=e("../src/util").Global;function i(){return r.localStorage}function o(e){return i().getItem(e)}t.exports={name:"localStorage",read:o,write:function(e,t){return i().setItem(e,t)},each:function(e){for(var t=i().length-1;t>=0;t--){var n=i().key(t);e(o(n),n)}},remove:function(e){return i().removeItem(e)},clearAll:function(){return i().clear()}}},{"../src/util":27}],31:[function(e,t,n){t.exports={name:"memoryStorage",read:function(e){return r[e]},write:function(e,t){r[e]=t},each:function(e){for(var t in r)r.hasOwnProperty(t)&&e(r[t],t)},remove:function(e){delete r[e]},clearAll:function(e){r={}}};var r={}},{}],32:[function(e,t,n){var r=e("../src/util").Global;t.exports={name:"oldFF-globalStorage",read:function(e){return i[e]},write:function(e,t){i[e]=t},each:o,remove:function(e){return i.removeItem(e)},clearAll:function(){o((function(e,t){delete i[e]}))}};var i=r.globalStorage;function o(e){for(var t=i.length-1;t>=0;t--){var n=i.key(t);e(i[n],n)}}},{"../src/util":27}],33:[function(e,t,n){var r=e("../src/util").Global;t.exports={name:"oldIE-userDataStorage",write:function(e,t){if(!a){var n=l(e);o((function(e){e.setAttribute(n,t),e.save("storejs")}))}},read:function(e){if(!a){var t=l(e),n=null;return o((function(e){n=e.getAttribute(t)})),n}},each:function(e){o((function(t){for(var n=t.XMLDocument.documentElement.attributes,r=n.length-1;r>=0;r--){var i=n[r];e(t.getAttribute(i.name),i.name)}}))},remove:function(e){var t=l(e);o((function(e){e.removeAttribute(t),e.save("storejs")}))},clearAll:function(){o((function(e){var t=e.XMLDocument.documentElement.attributes;e.load("storejs");for(var n=t.length-1;n>=0;n--)e.removeAttribute(t[n].name);e.save("storejs")}))}};var i=r.document,o=function(){if(!i||!i.documentElement||!i.documentElement.addBehavior)return null;var e,t,n;try{(t=new ActiveXObject("htmlfile")).open(),t.write('<script>document.w=window<\/script><iframe src="/favicon.ico"></iframe>'),t.close(),e=t.w.frames[0].document,n=e.createElement("div")}catch(t){n=i.createElement("div"),e=i.body}return function(t){var r=[].slice.call(arguments,0);r.unshift(n),e.appendChild(n),n.addBehavior("#default#userData"),n.load("storejs"),t.apply(this,r),e.removeChild(n)}}(),a=(r.navigator?r.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./),s=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function l(e){return e.replace(/^\d/,"___$&").replace(s,"___")}},{"../src/util":27}],34:[function(e,t,n){var r=e("../src/util").Global;function i(){return r.sessionStorage}function o(e){return i().getItem(e)}t.exports={name:"sessionStorage",read:o,write:function(e,t){return i().setItem(e,t)},each:function(e){for(var t=i().length-1;t>=0;t--){var n=i().key(t);e(o(n),n)}},remove:function(e){return i().removeItem(e)},clearAll:function(){return i().clear()}}},{"../src/util":27}],35:[function(e,t,n){t.exports={_args:[[{raw:"yasgui-utils@^1.4.1",scope:null,escapedName:"yasgui-utils",name:"yasgui-utils",rawSpec:"^1.4.1",spec:">=1.4.1 <2.0.0",type:"range"},"/home/boyan/Git/YASR-Ontotext"]],_from:"yasgui-utils@>=1.4.1 <2.0.0",_id:"yasgui-utils@1.6.7",_inCache:!0,_location:"/yasgui-utils",_nodeVersion:"7.10.0",_npmOperationalInternal:{host:"s3://npm-registry-packages",tmp:"tmp/yasgui-utils-1.6.7.tgz_1495459781202_0.06725964159704745"},_npmUser:{name:"laurens.rietveld",email:"laurens.rietveld@gmail.com"},_npmVersion:"4.2.0",_phantomChildren:{},_requested:{raw:"yasgui-utils@^1.4.1",scope:null,escapedName:"yasgui-utils",name:"yasgui-utils",rawSpec:"^1.4.1",spec:">=1.4.1 <2.0.0",type:"range"},_requiredBy:["/"],_resolved:"https://registry.npmjs.org/yasgui-utils/-/yasgui-utils-1.6.7.tgz",_shasum:"2bcfc5a315688de3ae6057883d9ae342b205f267",_shrinkwrap:null,_spec:"yasgui-utils@^1.4.1",_where:"/home/boyan/Git/YASR-Ontotext",author:{name:"Laurens Rietveld"},bugs:{url:"https://github.com/YASGUI/Utils/issues"},dependencies:{store:"^2.0.4"},deprecated:"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.",description:"Utils for YASGUI libs",devDependencies:{},directories:{},dist:{shasum:"2bcfc5a315688de3ae6057883d9ae342b205f267",tarball:"https://registry.npmjs.org/yasgui-utils/-/yasgui-utils-1.6.7.tgz",integrity:"sha512-w9BnalJg330lZhljHn0j6Ta6jyQTJL8nbhjyeDj4Z9PrX7GLrgcwq7CO7uP6Keq86L1XjpUgUU6JAmTlmkXj6w==",signatures:[{keyid:"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",sig:"MEUCIQChXn8SW+Xzp3hIj8sCOEzZO7ohF5kxjzHo5OmcJ1XO/wIgcBFbqGmN4Iyiw9ptQjoCz57rpREAGaXlYIf2o+zj68I="}]},gitHead:"6031b1cb732d390b29cd5376dceb9a9d665bbd11",homepage:"https://github.com/YASGUI/Utils",licenses:[{type:"MIT",url:"http://yasgui.github.io/license.txt"}],main:"src/main.js",maintainers:[{name:"laurens.rietveld",email:"laurens.rietveld@gmail.com"}],name:"yasgui-utils",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{type:"git",url:"git://github.com/YASGUI/Utils.git"},scripts:{},version:"1.6.7"}},{}],36:[function(e,t,n){window.console=window.console||{log:function(){}},t.exports={storage:e("./storage.js"),svg:e("./svg.js"),version:{"yasgui-utils":e("../package.json").version},nestedExists:function(e){for(var t=Array.prototype.slice.call(arguments,1),n=0;n<t.length;n++){if(!e||!e.hasOwnProperty(t[n]))return!1;e=e[t[n]]}return!0}}},{"../package.json":35,"./storage.js":37,"./svg.js":38}],37:[function(e,t,n){var r=e("store"),i={day:function(){return 864e5},month:function(){i.day()},year:function(){i.month()}},o=t.exports={set:function(e,t,n,o){if(r.enabled&&e&&void 0!==t){"string"==typeof n&&(n=i[n]()),t.documentElement&&(t=(new XMLSerializer).serializeToString(t.documentElement));try{r.set(e,{val:t,exp:n,time:(new Date).getTime()})}catch(e){if(e.quotaExceeded=function(e){var t=!1;if(e)if(e.code)switch(e.code){case 22:t=!0;break;case 1014:"NS_ERROR_DOM_QUOTA_REACHED"===e.name&&(t=!0)}else-2147024882===e.number&&(t=!0);return t}(e),!e.quotaExceeded||!o)throw e;o(e)}}},remove:function(e){r.enabled&&e&&r.remove(e)},removeAll:function(e){r.enabled&&(e?"function"==typeof e&&r.each((function(t,n){e(n,t)&&o.remove(n)})):r.clearAll())},get:function(e){if(!r.enabled)return null;if(e){var t=r.get(e);return t?t.exp&&(new Date).getTime()-t.time>t.exp?null:t.val:null}return null}}},{store:23}],38:[function(e,t,n){t.exports={draw:function(e,n){if(e){var r=t.exports.getElement(n);r&&(e.append?e.append(r):e.appendChild(r))}},getElement:function(e){if(e&&0==e.indexOf("<svg")){var t=(new DOMParser).parseFromString(e,"text/xml").documentElement,n=document.createElement("div");return n.className="svgImg",n.appendChild(t),n}return!1}}},{}],39:[function(e,t,n){t.exports={name:"yasgui-yasr",description:"Yet Another SPARQL Resultset GUI",version:"2.4.12",main:"src/main.js",scripts:{dev:"gulp serve",build:"gulp"},licenses:[{type:"MIT",url:"http://yasr.yasgui.org/license.txt"}],author:"Laurens Rietveld",homepage:"http://yasr.yasgui.org",devDependencies:{browserify:"^6.1.0",gulp:"~3.9.0","gulp-bump":"^0.1.11","gulp-concat":"^2.4.1","gulp-connect":"^2.0.5","gulp-embedlr":"^0.5.2","gulp-filter":"^1.0.2","gulp-git":"^0.5.2","gulp-jsvalidate":"^0.2.0","gulp-livereload":"^1.3.1","gulp-minify-css":"0.3.11","gulp-notify":"^2.0.1","gulp-rename":"^1.2.0","gulp-streamify":"0.0.5","gulp-tag-version":"^1.1.0","gulp-uglify":"~0.2.1","require-dir":"^0.1.0","run-sequence":"^1.0.1","vinyl-buffer":"^1.0.0","vinyl-source-stream":"~0.1.1",watchify:"^0.6.4","gulp-sourcemaps":"^1.2.8",exorcist:"^0.1.6","vinyl-transform":"0.0.1","gulp-sass":"^2.2.0","bootstrap-sass":"~3.3.1","browserify-transform-tools":"^1.2.1","gulp-cssimport":"^1.3.1","gulp-html-replace":"^1.4.1","browserify-shim":"^3.8.1"},bugs:"https://github.com/YASGUI/YASR/issues/",keywords:["JavaScript","SPARQL","Editor","Semantic Web","Linked Data"],maintainers:[{name:"Laurens Rietveld",email:"laurens.rietveld@gmail.com",web:"http://laurensrietveld.nl"}],repository:{type:"git",url:"https://github.com/YASGUI/YASR.git"},dependencies:{jquery:"1.11.0",codemirror:"^4.7.0","yasgui-utils":"^1.4.1",pivottable:"^1.2.2","jquery-ui":"1.10.5",cytoscape:"^2.3.11",lodash:"^3.6.0"},"browserify-shim":{google:"global:google"},browserify:{transform:["browserify-shim"]},optionalShim:{codemirror:{require:"codemirror",global:"CodeMirror"},jquery:{require:"jquery",global:"jQuery"},"../../lib/codemirror":{require:"codemirror",global:"CodeMirror"},"../lib/DataTables/media/js/jquery.dataTables.js":{require:"datatables",global:"jQuery"},datatables:{require:"datatables",global:"jQuery"},"jquery-ui/sortable":{require:"jquery-ui/sortable",global:"jQuery"},pivottable:{require:"pivottable",global:"jQuery"}}}},{}],40:[function(e,t,n){"use strict";t.exports=function(e){var t=e.head.vars,n=e.results.bindings,r=function(e){for(var n=0;n<t.length;n++){var r=t[n];e.hasOwnProperty(r)?i(e[r].value):i("")}},i=function(e){e.replace('"','""'),o(e)&&(e='"'+e+'"'),a+=" "+e+" ,"},o=function(e){var t=!1;return e.match('[\\w|,|"]')&&(t=!0),t},a="";return function(){for(var e=0;e<t.length;e++)i(t[e]);a+="\n"}(),function(){for(var e=0;e<n.length;e++)r(n[e]),a+="\n"}(),a}},{}],41:[function(e,t,n){"use strict";var r=e("jquery");(t.exports=function(t){t.translate=e("./translate.js").translate;var n=r("<div class='booleanResult'></div>"),i={id:"boolean",name:null,hideFromSelection:!0,getPriority:1};return i.options=r.extend(!0,{},t.options.pluginsOptions?t.options.pluginsOptions[i.id]:{}),i.draw=function(){n.empty().appendTo(t.resultsContainer);var i=t.results.getBoolean(),o=null,a=null;!0===i?(o="check",a=t.translate("yasr.boolean.true")):!1===i?(o="cross",a=t.translate("yasr.boolean.false")):(n.width("140"),a=t.translate("yasr.boolean.no_boolean")),o&&e("yasgui-utils").svg.draw(n,e("./imgs.js")[o]),r("<span></span>").text(a).appendTo(n)},i.canHandleResults=function(){return t.results.getBoolean&&(!0===t.results.getBoolean()||0==t.results.getBoolean())},i}).version={"YASR-boolean":e("../package.json").version,jquery:r.fn.jquery}},{"../package.json":39,"./imgs.js":51,"./translate.js":65,jquery:18,"yasgui-utils":36}],42:[function(e,t,n){"use strict";var r=e("jquery");(t.exports=function(t){t.translate=e("./translate.js").translate;var n=r("<div class='booleanBootResult'></div>");const i={id:"booleanBootstrap",name:null,hideFromSelection:!0,getPriority:3};return i.options=r.extend(!0,{},t.options.pluginsOptions?t.options.pluginsOptions[i.id]:{}),i.draw=function(){n.empty().appendTo(t.resultsContainer);var e=t.results.getBoolean(),i=null;!0===e?i=r("<div class='boolRes alert alert-success no-icon'><span class='boolResTex'>"+t.translate("yasr.boolean.alert.yes")+"</span></div>"):!1===e?i=r("<div class='boolRes alert alert-danger no-icon'><span class='boolResTex'>"+t.translate("yasr.boolean.alert.no")+"</span></div>"):(n.width("140"),textVal=t.translate("yasr.boolean.no_boolean")),i.appendTo(n)},i.canHandleResults=function(){return t.results.getBoolean&&(!0===t.results.getBoolean()||0==t.results.getBoolean())},i}).version={"YASR-boolean":e("../package.json").version,jquery:r.fn.jquery}},{"../package.json":39,"./translate.js":65,jquery:18}],43:[function(e,t,n){"use strict";var r=e("jquery");t.exports={output:"table",useGoogleCharts:!0,outputPlugins:["table","error","boolean","rawResponse"],drawOutputSelector:!0,drawDownloadIcon:!0,getUsedPrefixes:null,persistency:{prefix:function(e){return"yasr_"+r(e.container).closest("[id]").attr("id")+"_"},outputSelector:function(e){return"selector"},results:{id:function(e){return"results_"+r(e.container).closest("[id]").attr("id")},key:"results",maxSize:1e5},translateHeaders:!1}}},{jquery:18}],44:[function(e,t,n){"use strict";var r=e("jquery"),i=t.exports=function(t){t.translate=e("./translate.js").translate;var n=r("<div class='errorResult'></div>");const o={id:"error",name:null,getPriority:20,hideFromSelection:!0},a=t.options.pluginsOptions?t.options.pluginsOptions[o.id]:{};var s=o.options=r.extend(!0,{},i.defaults,a),l=function(){var e=null;if(s.tryQueryLink){var n=s.tryQueryLink();e=r("<button>",{class:"yasr_btn yasr_tryQuery"}).text(t.translate("yasr.error.new_window")).click((function(){window.open(n,"_blank"),r(this).blur()}))}return e};return o.draw=function(){var e=t.results.getException();n.empty().appendTo(t.resultsContainer);var i=r("<div>",{class:"errorHeader"}).appendTo(n);if(0!==e.status){var o="Error";e.statusText&&e.statusText.length<100&&(o=e.statusText),o+=" (#"+e.status+")",i.append(r("<span>",{class:"exception"}).text(o)).append(l());var a=null;e.responseText?a=e.responseText:"string"==typeof e&&(a=e),a&&n.append(r("<pre>").text(a))}else i.append(l()),n.append(r("<div>",{class:"corsMessage"}).append(s.corsMessage))},o.canHandleResults=function(e){return e.results.getException()||!1},o};i.defaults={corsMessage:yasr.translate("yasr.error.no_response"),tryQueryLink:null}},{"./translate.js":65,jquery:18}],45:[function(e,t,n){t.exports={GoogleTypeException:function(t,n){let r=e("./translate.js").translate;this.foundTypes=t,this.varName=n,this.toString=function(){return r("yasr.exceptions.conflict",{key:"varName",value:this.varName})},this.toHtml=function(){return r("yasr.exceptions.conflict_render",{key:"varName",value:"<i>"+this.varName+"</i>"})}}}},{"./translate.js":65}],46:[function(e,t,n){"use strict";const{translate:r}=e("./translate");function i(){return r("yasr.download.as.label")}t.exports={getSelectSaveAsDropDown:function(){return'<div class="saveAsDropDown btn-group pull-right"><button id="saveAsBtn" class="btn btn-primary btn-sm dropdown-toggle" data-toggle="dropdown" type="button">'+i()+' </button><ul class="dropdown-menu" role="menu"><li><a class="format dropdown-item" data-accepts="application/sparql-results+json" href="#">JSON</a></li><li><a class="format dropdown-item" data-accepts="application/x-sparqlstar-results+json" href="#">JSON*</a></li><li><a class="format dropdown-item" data-accepts="application/sparql-results+xml" href="#">XML</a></li><li><a class="format dropdown-item" data-accepts="application/x-sparqlstar-results+xml" href="#">XML*</a></li><li><a class="format dropdown-item" data-accepts="text/csv" href="#">CSV</a></li><li><a class="format dropdown-item " data-accepts="text/tab-separated-values" href="#">TSV</a></li><li><a class="format dropdown-item " data-accepts="text/x-tab-separated-values-star" href="#">TSV*</a></li><li><a class="format dropdown-item" data-accepts="application/x-binary-rdf-results-table" href="#">Binary RDF Results</a></li></ul></div>'},getGraphSaveAsDropDown:function(){return'<div class="saveAsDropDown btn-group pull-right"><button id="saveAsBtn" class="btn btn-primary btn-sm dropdown-toggle" data-toggle="dropdown" type="button">'+i()+' </button><ul class="dropdown-menu" role="menu"><li><a class="format dropdown-item" data-accepts="application/rdf+json" href="#">JSON</a></li><li><a class="format dropdown-item" data-accepts="application/ld+json" href="#">JSON-LD</a></li><li><a class="format dropdown-item" data-accepts="application/rdf+xml" href="#">RDF-XML</a></li><li><a class="format dropdown-item" data-accepts="text/rdf+n3" href="#">N3</a></li><li><a class="format dropdown-item" data-accepts="text/plain" href="#">N-Triples</a></li><li><a class="format dropdown-item" data-accepts="text/x-nquads" href="#">N-Quads</a></li><li><a class="format dropdown-item" data-accepts="text/turtle" href="#">Turtle</a></li><li><a class="format dropdown-item" data-accepts="application/x-turtlestar" href="#">Turtle*</a></li><li><a class="format dropdown-item" data-accepts="application/trix" href="#">TriX</a></li><li><a class="format dropdown-item" data-accepts="application/x-trig" href="#">TriG</a></li><li><a class="format dropdown-item" data-accepts="application/x-trigstar" href="#">TriG*</a></li><li><a class="format dropdown-item" data-accepts="application/x-binary-rdf" href="#">Binary RDF</a></li></ul></div>'}}},{"./translate":65}],47:[function(e,t,n){(function(n){var r=e("events").EventEmitter,i=(e("jquery"),!1),o=!1,a=function(){let t=e("./translate.js").translate;r.call(this);var a=this;this.init=function(){if(o||("undefined"!=typeof window?window.google:void 0!==n&&n.google)||i)("undefined"!=typeof window?window.google:void 0!==n&&n.google)?a.emit("initDone"):o&&a.emit("initError");else{i=!0,s("https://google.com/jsapi",(function(){i=!1,a.emit("initDone")}));var e=+new Date,t=function(){("undefined"!=typeof window?window.google:void 0!==n&&n.google)||(+new Date-e>6e3?(o=!0,i=!1,a.emit("initError")):setTimeout(t,100))};t()}},this.googleLoad=function(){var e=function(){("undefined"!=typeof window?window.google:void 0!==n?n.google:null).load("visualization","1",{packages:["corechart","charteditor"],callback:function(){a.emit("done")}})};i?(a.once("initDone",e),a.once("initError",(function(){a.emit("error",t("yasr.gchartLoader.unable_to_load"))}))):("undefined"!=typeof window?window.google:void 0!==n&&n.google)?e():o?a.emit("error",t("yasr.gchartLoader.unable_to_load")):(a.once("initDone",e),a.once("initError",(function(){a.emit("error",t("yasr.gchartLoader.unable_to_load"))})))}},s=function(e,t){var n=document.createElement("script");n.type="text/javascript",n.readyState?n.onreadystatechange=function(){"loaded"!=n.readyState&&"complete"!=n.readyState||(n.onreadystatechange=null,t())}:n.onload=function(){t()},n.src=e,document.body.appendChild(n)};a.prototype=new r,t.exports=new a}).call(this,void 0!==global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./translate.js":65,events:13,jquery:18}],48:[function(e,t,n){(function(n){"use strict";var r=e("jquery"),i=e("./utils.js"),o=e("yasgui-utils"),a=t.exports=function(t){t.translate=e("./translate.js").translate;var s=r.extend(!0,{},a.defaults),l=t.container.closest("[id]").attr("id");null==t.options.gchart&&(t.options.gchart={});var u=t.getPersistencyId("motionchart"),c=t.getPersistencyId("chartConfig");null==t.options.gchart.motionChartState&&(t.options.gchart.motionChartState=o.storage.get(u)),null==t.options.gchart.chartConfig&&(t.options.gchart.chartConfig=o.storage.get(c));var d=null,p=function(e){var r="undefined"!=typeof window?window.google:void 0!==n?n.google:null;d=new r.visualization.ChartEditor,r.visualization.events.addListener(d,"ok",(function(){var e,n;(function(e,t,n){var r={}.toString,i={}.hasOwnProperty,o=function(e,t){return i.call(e,t)},a=!0;return function e(t,i,s){var l,u,c,d,p,f,h,g;if(null==t||null==i)return t===i;if(t.__placeholder__||i.__placeholder__)return!0;if(t===i)return 0!==t||1/t==1/i;if(l=r.call(t),r.call(i)!=l)return!1;switch(l){case"[object String]":return t==String(i);case"[object Number]":return t!=+t?i!=+i:0==t?1/t==1/i:t==+i;case"[object Date]":case"[object Boolean]":return+t==+i;case"[object RegExp]":return t.source==i.source&&t.global==i.global&&t.multiline==i.multiline&&t.ignoreCase==i.ignoreCase}if("object"!=typeof t||"object"!=typeof i)return!1;for(u=s.length;u--;)if(s[u]==t)return!0;if(s.push(t),c=0,d=!0,"[object Array]"==l){if(p=t.length,f=i.length,a){switch(n){case"===":d=p===f;break;case"<==":d=p<=f;break;case"<<=":d=p<f}c=p,a=!1}else d=p===f,c=p;if(d)for(;c--&&(d=c in t==c in i&&e(t[c],i[c],s)););}else{if("constructor"in t!="constructor"in i||t.constructor!=i.constructor)return!1;for(h in t)if(o(t,h)&&(c++,!(d=o(i,h)&&e(t[h],i[h],s))))break;if(d){for(h in g=0,i)o(i,h)&&++g;a?d="<<="===n?c<g:"<=="===n?c<=g:c===g:(a=!1,d=c===g)}}return s.pop(),d}(e,t,[])})((e=d.getChartWrapper()).getChartType,"MotionChart","===")||(t.options.gchart.motionChartState=e.n,o.storage.set(u,t.options.gchart.motionChartState),e.setOption("state",t.options.gchart.motionChartState),r.visualization.events.addListener(e,"ready",(function(){var n;n=e.getChart(),r.visualization.events.addListener(n,"statechange",(function(){t.options.gchart.motionChartState=n.getState(),o.storage.set(u,t.options.gchart.motionChartState)}))}))),n=e.getDataTable(),e.setDataTable(null),t.options.gchart.chartConfig=e.toJSON(),o.storage.set(c,t.options.gchart.chartConfig),e.setDataTable(n),e.setOption("width",s.width),e.setOption("height",s.height),e.draw(),t.updateHeader()})),e&&e()};return{name:"Google Chart",nameLabel:"yasr.gchart.chart_name",hideFromSelection:!1,priority:7,canHandleResults:function(e){var t,n;return null!=(t=e.results)&&(n=t.getVariables())&&n.length>0},getDownloadInfo:function(){if(!t.results)return null;var e=t.resultsContainer.find("svg");if(e.length>0)return{getContent:function(){return e[0].outerHTML?e[0].outerHTML:r("<div>").append(e.clone()).html()},filename:"queryResults.svg",contentType:"image/svg+xml",buttonTitle:t.translate("yasr.btn.title.svg")};var n=t.resultsContainer.find(".google-visualization-table-table");return n.length>0?{getContent:function(){return n.tableToCsv()},filename:"queryResults.csv",contentType:"text/csv",buttonTitle:t.translate("yasr.btn.title.csv")}:void 0},getEmbedHtml:function(){if(!t.results)return null;var e=t.resultsContainer.find("svg").clone().css("height","").css("width","");if(0==e.length)return null;var n=e[0].outerHTML;return n||(n=r("<div>").append(e.clone()).html()),'<div style="width: 800px; height: 600px;">\n'+n+"\n</div>"},draw:function(){var c=function(){if(t.resultsContainer=r(".yasr_results"),t.resultsContainer.empty(),t.options.output==a.defaults.persistencyId){var n=l+"_gchartWrapper",c=null;t.resultsContainer.append(r("<button>",{class:"openGchartBtn yasr_btn"}).text(t.translate("yasr.chart.config")).click((function(){d.openDialog(c)}))).append(r("<div>",{id:n,class:"gchartWrapper"}));var p=new google.visualization.DataTable,f=t.results.getAsJson();f.head.vars.forEach((function(n){var r="string";try{r=i.getGoogleTypeForBindings(f.results.bindings,n)}catch(n){if(!(n instanceof e("./exceptions.js").GoogleTypeException))throw n;t.warn(n.toHtml())}p.addColumn(r,n)}));var h=null;t.options.getUsedPrefixes&&(h="function"==typeof t.options.getUsedPrefixes?t.options.getUsedPrefixes(t):t.options.getUsedPrefixes),f.results.bindings.forEach((function(e){var t=[];f.head.vars.forEach((function(n,r){t.push(i.castGoogleType(e[n],h,p.getColumnType(r)))})),p.addRow(t)})),t.options.gchart.chartConfig?("MotionChart"===(c=new google.visualization.ChartWrapper(t.options.gchart.chartConfig)).getChartType()&&null!=t.options.gchart.motionChartState&&(c.setOption("state",t.options.gchart.motionChartState),google.visualization.events.addListener(c,"ready",(function(){var e;e=c.getChart(),google.visualization.events.addListener(e,"statechange",(function(){t.options.gchart.motionChartState=e.getState(),o.storage.set(u,t.options.gchart.motionChartState)}))}))),c.setDataTable(p)):c=new google.visualization.ChartWrapper({chartType:"Table",dataTable:p,containerId:n}),c.setOption("width",s.width),c.setOption("height",s.height),c.draw(),t.updateHeader()}};("undefined"!=typeof window?window.google:void 0!==n&&n.google)&&("undefined"!=typeof window?window.google:void 0!==n?n.google:null).visualization&&d?c():e("./gChartLoader.js").on("done",(function(){p(),c()})).on("error",(function(){console.log("errorrr")})).googleLoad()}}};a.defaults={height:"600px",width:"100%",persistencyId:"gchart"}}).call(this,void 0!==global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./exceptions.js":45,"./gChartLoader.js":47,"./translate.js":65,"./utils.js":66,jquery:18,"yasgui-utils":36}],49:[function(e,t,n){t.exports={"yasr.table.filter":"Filter query results","yasr.table":"Table","yasr.graph.beta":"Graph(beta)","yasr.pivot.pivot_table":"Pivot Table","yasr.name.raw_response":"Raw Response","yasr.headers.columns":"Columns","yasr.headers.rows":"Rows","yasr.headers.variables":"Available Variables","yasr.headers.cells":"Cells","yasr.headers.labels.subject":"subject","yasr.headers.labels.object":"object","yasr.headers.labels.predicate":"predicate","yasr.headers.labels.context":"context","yasr.gchartLoader.unable_to_load":"Could not load google loader","yasr.gchart.chart_name":"Google Chart","yasr.exceptions.conflict":'Conflicting data types found for variable {{varName}}. Assuming all values of this variable are "string". To avoid this issue, cast the values in your SPARQL query to the intended xsd datatype',"yasr.exceptions.conflict_render":'Conflicting data types found for variable {{varName}}. Assuming all values of this variable are "string". As a result, several Google Charts will not render values of this particular variable. To avoid this issue, cast the values in your SPARQL query to the intended xsd datatype',"yasr.error.no_response":"Unable to get response from endpoint","yasr.error.new_window":"Try query in new browser window","yasr.boolean.alert.yes":"YES","yasr.boolean.alert.no":"NO","yasr.boolean.true":"True","yasr.boolean.false":"False","yasr.boolean.no_boolean":"Could not find boolean value in response","yasr.http.403":"You don't have permission to execute this query. Ask your admin for support.","yasr.btn.title.unsupported_download":"Download not supported for this result representation","yasr.btn.title.embed":"Save","yasr.btn.label.save":"Get HTML snippet to embed results on a web page","yasr.download.as.label":"Download as","yasr.btn.title.svg":"Download SVG Image","yasr.btn.title.csv":"Download as CSV","yasr.btn.title.raw":"Download raw response","yasr.copy.to.clipboard":"Copy to Clipboard","yasr.chart.config":"Chart Config","yasr.empty.table":"No data available in table","yasr.loading.label":"Loading..."}},{}],50:[function(e,t,n){t.exports={"yasr.table.filter":"Filtrer les résultats des requêtes","yasr.table":"Tableau","yasr.graph.beta":"Graphe(beta)","yasr.pivot.pivot_table":"Table de pivotement","yasr.name.raw_response":"Réponse brute","yasr.headers.columns":"Colonnes","yasr.headers.rows":"Lignes","yasr.headers.variables":"Variables disponibles","yasr.headers.cells":"Cellules","yasr.headers.labels.subject":"sujet","yasr.headers.labels.object":"objet","yasr.headers.labels.predicate":"prédicat","yasr.headers.labels.context":"contexte","yasr.gchartLoader.unable_to_load":"Impossible de charger le loader de google","yasr.gchart.chart_name":"Graphique Google","yasr.exceptions.conflict":'Des types de données contradictoires ont été trouvés pour la variable {{varName}}. On suppose que toutes les valeurs de cette variable sont "string". Pour éviter ce problème, convertissez les valeurs de votre requête SPARQL dans le type de données xsd prévu.',"yasr.exceptions.conflict_render":'Des types de données contradictoires ont été trouvés pour la variable {{varName}}. On suppose que toutes les valeurs de cette variable sont "string". Par conséquent, plusieurs graphiques Google ne rendent pas les valeurs de cette variable particulière. Pour éviter ce problème, convertissez les valeurs de votre requête SPARQL dans le type de données xsd prévu.',"yasr.error.no_response":"Impossible d'obtenir une réponse du point de terminaison","yasr.error.new_window":"Essayez la requête dans une nouvelle fenêtre du navigateur","yasr.boolean.alert.yes":"OUI","yasr.boolean.alert.no":"NON","yasr.boolean.true":"Vrai","yasr.boolean.false":"Faux","yasr.boolean.no_boolean":"Impossible de trouver une valeur booléenne en réponse","yasr.http.403":"Vous n'avez pas la permission d'exécuter cette requête. Demandez de l'aide à votre administrateur.","yasr.btn.title.unsupported_download":"Le téléchargement n'est pas pris en charge pour cette représentation de résultat","yasr.btn.title.embed":"Sauvegarder","yasr.btn.label.save":"Obtenir un extrait HTML pour intégrer les résultats dans une page web","yasr.download.as.label":"Téléchargement","yasr.btn.title.svg":"Télécharger l'image SVG","yasr.btn.title.csv":"Télécharger comme CSV","yasr.btn.title.raw":"Télécharger la réponse brute","yasr.copy.to.clipboard":"Copier dans le presse-papiers","yasr.chart.config":"Configuration du graphique","yasr.empty.table":"Aucune donnée disponible dans le tableau","yasr.loading.label":"Chargement..."}},{}],51:[function(e,t,n){"use strict";t.exports={cross:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" width="30px" height="30px" viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve"><g>\t<path d="M83.288,88.13c-2.114,2.112-5.575,2.112-7.689,0L53.659,66.188c-2.114-2.112-5.573-2.112-7.687,0L24.251,87.907 c-2.113,2.114-5.571,2.114-7.686,0l-4.693-4.691c-2.114-2.114-2.114-5.573,0-7.688l21.719-21.721c2.113-2.114,2.113-5.573,0-7.686 L11.872,24.4c-2.114-2.113-2.114-5.571,0-7.686l4.842-4.842c2.113-2.114,5.571-2.114,7.686,0L46.12,33.591 c2.114,2.114,5.572,2.114,7.688,0l21.721-21.719c2.114-2.114,5.573-2.114,7.687,0l4.695,4.695c2.111,2.113,2.111,5.571-0.003,7.686 L66.188,45.973c-2.112,2.114-2.112,5.573,0,7.686L88.13,75.602c2.112,2.111,2.112,5.572,0,7.687L83.288,88.13z"/></g></svg>',check:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" width="30px" height="30px" viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve"><path fill="#000000" d="M14.301,49.982l22.606,17.047L84.361,4.903c2.614-3.733,7.76-4.64,11.493-2.026l0.627,0.462 c3.732,2.614,4.64,7.758,2.025,11.492l-51.783,79.77c-1.955,2.791-3.896,3.762-7.301,3.988c-3.405,0.225-5.464-1.039-7.508-3.084 L2.447,61.814c-3.263-3.262-3.263-8.553,0-11.814l0.041-0.019C5.75,46.718,11.039,46.718,14.301,49.982z"/></svg>',unsorted:'<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" id="Layer_1" x="0px" y="0px" width="100%" height="100%" viewBox="0 0 54.552711 113.78478" enable-background="new 0 0 100 100" xml:space="preserve"><g id="g5" transform="matrix(-0.70522156,-0.70898699,-0.70898699,0.70522156,97.988199,55.081205)"><path style="fill:#000000" inkscape:connector-curvature="0" id="path7" d="M 57.911,66.915 45.808,55.063 42.904,52.238 31.661,41.25 31.435,41.083 31.131,40.775 30.794,40.523 30.486,40.3 30.069,40.05 29.815,39.911 29.285,39.659 29.089,39.576 28.474,39.326 28.363,39.297 H 28.336 L 27.665,39.128 27.526,39.1 26.94,38.99 26.714,38.961 26.212,38.934 h -0.31 -0.444 l -0.339,0.027 c -1.45,0.139 -2.876,0.671 -4.11,1.564 l -0.223,0.141 -0.279,0.25 -0.335,0.308 -0.054,0.029 -0.171,0.194 -0.334,0.364 -0.224,0.279 -0.25,0.336 -0.225,0.362 -0.192,0.308 -0.197,0.421 -0.142,0.279 -0.193,0.477 -0.084,0.222 -12.441,38.414 c -0.814,2.458 -0.313,5.029 1.115,6.988 v 0.026 l 0.418,0.532 0.17,0.165 0.251,0.281 0.084,0.079 0.283,0.281 0.25,0.194 0.474,0.367 0.083,0.053 c 2.015,1.371 4.641,1.874 7.131,1.094 L 55.228,80.776 c 4.303,-1.342 6.679,-5.814 5.308,-10.006 -0.387,-1.259 -1.086,-2.35 -1.979,-3.215 l -0.368,-0.337 -0.278,-0.303 z m -6.318,5.896 0.079,0.114 -37.369,11.57 11.854,-36.538 10.565,10.317 2.876,2.825 11.995,11.712 z" /></g><path style="fill:#000000" inkscape:connector-curvature="0" id="path7-9" d="m 8.8748339,52.571766 16.9382111,-0.222584 4.050851,-0.06665 15.719154,-0.222166 0.27778,-0.04246 0.43276,0.0017 0.41632,-0.06121 0.37532,-0.0611 0.47132,-0.119342 0.27767,-0.08206 0.55244,-0.198047 0.19707,-0.08043 0.61095,-0.259721 0.0988,-0.05825 0.019,-0.01914 0.59303,-0.356548 0.11787,-0.0788 0.49125,-0.337892 0.17994,-0.139779 0.37317,-0.336871 0.21862,-0.219786 0.31311,-0.31479 0.21993,-0.259387 c 0.92402,-1.126057 1.55249,-2.512251 1.78961,-4.016904 l 0.0573,-0.25754 0.0195,-0.374113 0.0179,-0.454719 0.0175,-0.05874 -0.0169,-0.258049 -0.0225,-0.493503 -0.0398,-0.355569 -0.0619,-0.414201 -0.098,-0.414812 -0.083,-0.353334 L 53.23955,41.1484 53.14185,40.850967 52.93977,40.377742 52.84157,40.161628 34.38021,4.2507375 C 33.211567,1.9401875 31.035446,0.48226552 28.639484,0.11316952 l -0.01843,-0.01834 -0.671963,-0.07882 -0.236871,0.0042 L 27.335984,-4.7826577e-7 27.220736,0.00379952 l -0.398804,0.0025 -0.313848,0.04043 -0.594474,0.07724 -0.09611,0.02147 C 23.424549,0.60716252 21.216017,2.1142355 20.013025,4.4296865 L 0.93967491,40.894479 c -2.08310801,3.997178 -0.588125,8.835482 3.35080799,10.819749 1.165535,0.613495 2.43199,0.88731 3.675026,0.864202 l 0.49845,-0.02325 0.410875,0.01658 z M 9.1502369,43.934401 9.0136999,43.910011 27.164145,9.2564625 44.70942,43.42818 l -14.765289,0.214677 -4.031106,0.0468 -16.7627881,0.244744 z" /></svg>',sortDesc:'<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" id="Layer_1" x="0px" y="0px" width="100%" height="100%" viewBox="0 0 54.552711 113.78478" enable-background="new 0 0 100 100" xml:space="preserve"><g id="g5" transform="matrix(-0.70522156,-0.70898699,-0.70898699,0.70522156,97.988199,55.081205)"><path style="fill:#000000" inkscape:connector-curvature="0" id="path7" d="M 57.911,66.915 45.808,55.063 42.904,52.238 31.661,41.25 31.435,41.083 31.131,40.775 30.794,40.523 30.486,40.3 30.069,40.05 29.815,39.911 29.285,39.659 29.089,39.576 28.474,39.326 28.363,39.297 H 28.336 L 27.665,39.128 27.526,39.1 26.94,38.99 26.714,38.961 26.212,38.934 h -0.31 -0.444 l -0.339,0.027 c -1.45,0.139 -2.876,0.671 -4.11,1.564 l -0.223,0.141 -0.279,0.25 -0.335,0.308 -0.054,0.029 -0.171,0.194 -0.334,0.364 -0.224,0.279 -0.25,0.336 -0.225,0.362 -0.192,0.308 -0.197,0.421 -0.142,0.279 -0.193,0.477 -0.084,0.222 -12.441,38.414 c -0.814,2.458 -0.313,5.029 1.115,6.988 v 0.026 l 0.418,0.532 0.17,0.165 0.251,0.281 0.084,0.079 0.283,0.281 0.25,0.194 0.474,0.367 0.083,0.053 c 2.015,1.371 4.641,1.874 7.131,1.094 L 55.228,80.776 c 4.303,-1.342 6.679,-5.814 5.308,-10.006 -0.387,-1.259 -1.086,-2.35 -1.979,-3.215 l -0.368,-0.337 -0.278,-0.303 z m -6.318,5.896 0.079,0.114 -37.369,11.57 11.854,-36.538 10.565,10.317 2.876,2.825 11.995,11.712 z" /></g><path style="fill:#000000" inkscape:connector-curvature="0" id="path9" d="m 27.813273,0.12823506 0.09753,0.02006 c 2.39093,0.458209 4.599455,1.96811104 5.80244,4.28639004 L 52.785897,40.894525 c 2.088044,4.002139 0.590949,8.836902 -3.348692,10.821875 -1.329078,0.688721 -2.766603,0.943695 -4.133174,0.841768 l -0.454018,0.02 L 27.910392,52.354171 23.855313,52.281851 8.14393,52.061827 7.862608,52.021477 7.429856,52.021738 7.014241,51.959818 6.638216,51.900838 6.164776,51.779369 5.889216,51.699439 5.338907,51.500691 5.139719,51.419551 4.545064,51.145023 4.430618,51.105123 4.410168,51.084563 3.817138,50.730843 3.693615,50.647783 3.207314,50.310611 3.028071,50.174369 2.652795,49.833957 2.433471,49.613462 2.140099,49.318523 1.901127,49.041407 C 0.97781,47.916059 0.347935,46.528448 0.11153,45.021676 L 0.05352,44.766255 0.05172,44.371683 0.01894,43.936017 0,43.877277 0.01836,43.62206 0.03666,43.122889 0.0765,42.765905 0.13912,42.352413 0.23568,41.940425 0.32288,41.588517 0.481021,41.151945 0.579391,40.853806 0.77369,40.381268 0.876097,40.162336 19.338869,4.2542801 c 1.172169,-2.308419 3.34759,-3.76846504 5.740829,-4.17716604 l 0.01975,0.01985 0.69605,-0.09573 0.218437,0.0225 0.490791,-0.02132 0.39809,0.0046 0.315972,0.03973 0.594462,0.08149 z" /></svg>',sortAsc:'<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" id="Layer_1" x="0px" y="0px" width="100%" height="100%" viewBox="0 0 54.552711 113.78478" enable-background="new 0 0 100 100" xml:space="preserve"><g id="g5" transform="matrix(-0.70522156,0.70898699,-0.70898699,-0.70522156,97.988199,58.704807)"><path style="fill:#000000" inkscape:connector-curvature="0" id="path7" d="M 57.911,66.915 45.808,55.063 42.904,52.238 31.661,41.25 31.435,41.083 31.131,40.775 30.794,40.523 30.486,40.3 30.069,40.05 29.815,39.911 29.285,39.659 29.089,39.576 28.474,39.326 28.363,39.297 H 28.336 L 27.665,39.128 27.526,39.1 26.94,38.99 26.714,38.961 26.212,38.934 h -0.31 -0.444 l -0.339,0.027 c -1.45,0.139 -2.876,0.671 -4.11,1.564 l -0.223,0.141 -0.279,0.25 -0.335,0.308 -0.054,0.029 -0.171,0.194 -0.334,0.364 -0.224,0.279 -0.25,0.336 -0.225,0.362 -0.192,0.308 -0.197,0.421 -0.142,0.279 -0.193,0.477 -0.084,0.222 -12.441,38.414 c -0.814,2.458 -0.313,5.029 1.115,6.988 v 0.026 l 0.418,0.532 0.17,0.165 0.251,0.281 0.084,0.079 0.283,0.281 0.25,0.194 0.474,0.367 0.083,0.053 c 2.015,1.371 4.641,1.874 7.131,1.094 L 55.228,80.776 c 4.303,-1.342 6.679,-5.814 5.308,-10.006 -0.387,-1.259 -1.086,-2.35 -1.979,-3.215 l -0.368,-0.337 -0.278,-0.303 z m -6.318,5.896 0.079,0.114 -37.369,11.57 11.854,-36.538 10.565,10.317 2.876,2.825 11.995,11.712 z" /></g><path style="fill:#000000" inkscape:connector-curvature="0" id="path9" d="m 27.813273,113.65778 0.09753,-0.0201 c 2.39093,-0.45821 4.599455,-1.96811 5.80244,-4.28639 L 52.785897,72.891487 c 2.088044,-4.002139 0.590949,-8.836902 -3.348692,-10.821875 -1.329078,-0.688721 -2.766603,-0.943695 -4.133174,-0.841768 l -0.454018,-0.02 -16.939621,0.223997 -4.055079,0.07232 -15.711383,0.220024 -0.281322,0.04035 -0.432752,-2.61e-4 -0.415615,0.06192 -0.376025,0.05898 -0.47344,0.121469 -0.27556,0.07993 -0.550309,0.198748 -0.199188,0.08114 -0.594655,0.274528 -0.114446,0.0399 -0.02045,0.02056 -0.59303,0.35372 -0.123523,0.08306 -0.486301,0.337172 -0.179243,0.136242 -0.375276,0.340412 -0.219324,0.220495 -0.293372,0.294939 -0.238972,0.277116 C 0.97781,65.869953 0.347935,67.257564 0.11153,68.764336 L 0.05352,69.019757 0.05172,69.414329 0.01894,69.849995 0,69.908735 l 0.01836,0.255217 0.0183,0.499171 0.03984,0.356984 0.06262,0.413492 0.09656,0.411988 0.0872,0.351908 0.158141,0.436572 0.09837,0.298139 0.194299,0.472538 0.102407,0.218932 18.462772,35.908054 c 1.172169,2.30842 3.34759,3.76847 5.740829,4.17717 l 0.01975,-0.0199 0.69605,0.0957 0.218437,-0.0225 0.490791,0.0213 0.39809,-0.005 0.315972,-0.0397 0.594462,-0.0815 z" /></svg>',download:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="tiny" x="0px" y="0px" width="100%" height="100%" viewBox="0 0 100 100" xml:space="preserve"><g id="Captions"></g><g id="Your_Icon">\t<path fill-rule="evenodd" fill="#000000" d="M88,84v-2c0-2.961-0.859-4-4-4H16c-2.961,0-4,0.98-4,4v2c0,3.102,1.039,4,4,4h68 C87.02,88,88,87.039,88,84z M58,12H42c-5,0-6,0.941-6,6v22H16l34,34l34-34H64V18C64,12.941,62.939,12,58,12z"/></g></svg>',move:'<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" id="Layer_1" x="0px" y="0px" width="100%" height="100%" viewBox="5 -10 74.074074 100" enable-background="new 0 0 100 100" xml:space="preserve" inkscape:version="0.48.4 r9939" sodipodi:docname="noun_11656_cc.svg"><metadata ><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs /><sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="753" inkscape:window-height="480" showgrid="false" fit-margin-top="0" fit-margin-left="0" fit-margin-right="0" fit-margin-bottom="0" inkscape:zoom="2.36" inkscape:cx="44.101509" inkscape:cy="31.481481" inkscape:window-x="287" inkscape:window-y="249" inkscape:window-maximized="0" inkscape:current-layer="Layer_1" /><polygon points="33,83 50,100 67,83 54,83 54,17 67,17 50,0 33,17 46,17 46,83 " transform="translate(-7.962963,-10)" /><polygon points="83,67 100,50 83,33 83,46 17,46 17,33 0,50 17,67 17,54 83,54 " transform="translate(-7.962963,-10)" /></svg>',fullscreen:'<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" x="0px" y="0px" width="100%" height="100%" viewBox="5 -10 74.074074 100" enable-background="new 0 0 100 100" xml:space="preserve" inkscape:version="0.48.4 r9939" sodipodi:docname="noun_2186_cc.svg"><metadata ><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs /><sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="640" inkscape:window-height="480" showgrid="false" fit-margin-top="0" fit-margin-left="0" fit-margin-right="0" fit-margin-bottom="0" inkscape:zoom="2.36" inkscape:cx="44.101509" inkscape:cy="31.481481" inkscape:window-x="65" inkscape:window-y="24" inkscape:window-maximized="0" inkscape:current-layer="Layer_1" /><path d="m -7.962963,-10 v 38.889 l 16.667,-16.667 16.667,16.667 5.555,-5.555 -16.667,-16.667 16.667,-16.667 h -38.889 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="m 92.037037,-10 v 38.889 l -16.667,-16.667 -16.666,16.667 -5.556,-5.555 16.666,-16.667 -16.666,-16.667 h 38.889 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="M -7.962963,90 V 51.111 l 16.667,16.666 16.667,-16.666 5.555,5.556 -16.667,16.666 16.667,16.667 h -38.889 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="M 92.037037,90 V 51.111 l -16.667,16.666 -16.666,-16.666 -5.556,5.556 16.666,16.666 -16.666,16.667 h 38.889 z" inkscape:connector-curvature="0" style="fill:#010101" /></svg>',smallscreen:'<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" x="0px" y="0px" width="100%" height="100%" viewBox="5 -10 74.074074 100" enable-background="new 0 0 100 100" xml:space="preserve" inkscape:version="0.48.4 r9939" sodipodi:docname="noun_2186_cc.svg"><metadata ><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs /><sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="1855" inkscape:window-height="1056" showgrid="false" fit-margin-top="0" fit-margin-left="0" fit-margin-right="0" fit-margin-bottom="0" inkscape:zoom="2.36" inkscape:cx="44.101509" inkscape:cy="31.481481" inkscape:window-x="65" inkscape:window-y="24" inkscape:window-maximized="1" inkscape:current-layer="Layer_1" /><path d="m 30.926037,28.889 0,-38.889 -16.667,16.667 -16.667,-16.667 -5.555,5.555 16.667,16.667 -16.667,16.667 38.889,0 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="m 53.148037,28.889 0,-38.889 16.667,16.667 16.666,-16.667 5.556,5.555 -16.666,16.667 16.666,16.667 -38.889,0 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="m 30.926037,51.111 0,38.889 -16.667,-16.666 -16.667,16.666 -5.555,-5.556 16.667,-16.666 -16.667,-16.667 38.889,0 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="m 53.148037,51.111 0,38.889 16.667,-16.666 16.666,16.666 5.556,-5.556 -16.666,-16.666 16.666,-16.667 -38.889,0 z" inkscape:connector-curvature="0" style="fill:#010101" /></svg>'}},{}],52:[function(e,t,n){e("./tableToCsv.js")},{"./tableToCsv.js":53}],53:[function(e,t,n){"use strict";var r=e("jquery");r.fn.tableToCsv=function(e){var t="";e=r.extend({quote:'"',delimiter:",",lineBreak:"\n"},e);var n=function(n){n.replace(e.quote,e.quote+e.quote),function(t){var n=!1;return t.match("[\\w|"+e.delimiter+"|"+e.quote+"]")&&(n=!0),n}(n)&&(n=e.quote+n+e.quote),t+=" "+n+" "+e.delimiter},i=r(this),o={},a=0;return i.find("tr:first *").each((function(){r(this).attr("colspan")?a+=+r(this).attr("colspan"):a++})),i.find("tr").each((function(i,s){for(var l=r(s),u=[],c=0,d=0;d+c<a;d++)if(o[d])u.push(o[d].text),o[d].rowSpan--,o[d].rowSpan||delete o[d];else{var p=l.find(":nth-child("+(d+1)+")");console.log(p);var f=p.attr("colspan"),h=p.attr("rowspan");if(f&&!isNaN(f)){for(var g=0;g<f;g++)u.push(p.text());c+=f-1}else h&&!isNaN(h)?(o[d+c]={rowSpan:h-1,text:p.text()},u.push(p.text()),c++):u.push(p.text())}!function(r){r.forEach((function(e){n(e)})),t+=e.lineBreak}(u)})),t}},{jquery:18}],54:[function(e,t,n){"use strict";var r=e("jquery"),i=e("yasgui-utils");console=console||{log:function(){}},e("./jquery/extendJquery.js");var o=t.exports=function(t,n,a){var s={};s.options=r.extend(!0,{},o.defaults,n),s.container=r(t).find(".yasr"),s.header=r(t).find(".yasr_header"),s.resultsContainer=r(t).find(".yasr_results"),s.storage=i.storage,s.translationService=e("./translate.js"),s.translationService.setLanguage(s.options.locale),s.translate=s.translationService.translate,s.changeLanguage=function(e){s.translationService.setLanguage(e);let t=document.getElementById("saveAsBtn");t&&(t.innerText=s.translate("yasr.download.as.label"));let n=document.getElementById("yasrBtnGroup"),r=document.getElementById("yasrDownloadIcon");n&&n.remove(),r&&r.remove(),s.options.hideHeader||g(s),s.draw()};var l=null;for(var u in s.getPersistencyId=function(e){return null===l&&(l=!(!s.options.persistency||!s.options.persistency.prefix)&&("string"==typeof s.options.persistency.prefix?s.options.persistency.prefix:s.options.persistency.prefix(s))),l&&e?l+("string"==typeof e?e:e(s)):null},s.options.useGoogleCharts&&e("./gChartLoader.js").once("initError",(function(){s.options.useGoogleCharts=!1})).init(),s.plugins={},o.plugins)(s.options.useGoogleCharts||"gchart"!=u)&&(s.plugins[u]=new o.plugins[u](s));s.updateHeader=function(){var e=s.header.find(".yasr_downloadIcon").removeAttr("title"),t=s.header.find(".saveAsDropDown"),n=s.header.find(".yasr_embedBtn"),r=s.plugins[s.options.output];if(r){"Table"==r.name?(e.hide(),t.removeAttr("style")):(t.hide(),e.show());var i=r.getDownloadInfo?r.getDownloadInfo():null;i?(i.buttonTitle&&e.attr("title",i.buttonTitle),e.prop("disabled",!1),e.find("path").each((function(){this.style.fill="black"}))):(e.prop("disabled",!0).prop("title",s.translate("yasr.btn.title.unsupported_download")),e.find("path").each((function(){this.style.fill="gray"})));var o=null;r.getEmbedHtml&&(o=r.getEmbedHtml()),o&&o.length>0?n.show():n.hide()}},s.draw=function(e){if(s.updateHeader(),!s.results)return!1;e||(e=s.options.output);var t=null,n=-1,r=[];for(var i in s.plugins)if(s.plugins[i].canHandleResults(s)){var o=s.plugins[i].getPriority;"function"==typeof o&&(o=o(s)),null!=o&&null!=o&&o>n&&(n=o,t=i)}else r.push(i);return d(r),"table"==t&&s.plugins[t].canHandleResults(s)&&t!=e&&angular.isUndefined(e)?c(t):e in s.plugins&&s.plugins[e].canHandleResults(s)&&"booleanBootstrap"!=t?c(e):!!t&&c(t)};var c=function(e){return s.header.find(".yasr_btnGroup").find("li.active").removeClass("active"),r(s.resultsContainer).empty(),s.plugins[e].draw(),s.header.find(".yasr_btnGroup .select_"+e).parent().addClass("active"),!0},d=function(e){s.header.find(".yasr_btnGroup li").removeClass("disabled"),e.forEach((function(e){s.header.find(".yasr_btnGroup .select_"+e).parent().addClass("disabled")}))};s.somethingDrawn=function(){return!s.resultsContainer.is(":empty")},s.updateDownloadDropdown=function(){var t;if(window.editor){s.header.find(".saveAsDropDown").remove();var n=window.editor.getQueryType();"SELECT"==n&&(t=r(e("./extensions.js").getSelectSaveAsDropDown())),"CONSTRUCT"!=n&&"DESCRIBE"!=n||(t=r(e("./extensions.js").getGraphSaveAsDropDown())),t&&(t.find(".format").click((function(){s.getQueryResultsAsFormat(r(this).data("accepts"))})),s.header.append(t))}},s.setResultsCount=function(e,t,n){if(0==e.responseJSON&&(s.allCount=-1),(e.responseJSON||0==e.responseJSON)&&(s.allCount=-1,e.responseJSON["http://www.ontotext.com/"]&&(s.allCount=e.responseJSON["http://www.ontotext.com/"]["http://www.ontotext.com/"][0].value),r.isNumeric(e.responseJSON)&&(s.allCount=e.responseJSON),e.responseJSON.results&&e.responseJSON.results.bindings)){var i=e.responseJSON.results.bindings[0],o=e.responseJSON.head.vars,a=Object.keys(i).filter((function(e){return o.indexOf(e)>-1&&r.isNumeric(i[e].value)}));a.length>0&&(s.allCount=i[a[0]].value)}},s.setResponse=function(t,n,r){try{s.results=e("./parsers/wrapper.js")(t,n,r)}catch(e){s.results={getException:function(){return e}}}if(s.results.getAsJson().results&&(s.resultsCount=s.results.getAsJson().results.bindings.length),s.results.getAsJson()&&!s.options.hideHeader&&(s.header.show(),s.updateDownloadDropdown()),403==t.status&&(s.results.getException=function(){return{status:403,statusText:"Forbidden",responseText:s.translate("yasr.http.403")}}),s.draw(),s.options.persistency){var o=s.getPersistencyId(s.options.persistency.results.key);o&&(s.results.getOriginalResponseAsString&&s.results.getOriginalResponseAsString().length<s.options.persistency.results.maxSize?i.storage.set(o,s.results.getAsStoreObject(),"month"):i.storage.remove(o))}};var p=null,f=null;s.warn=function(e){p||(p=r("<div>",{class:"toggableWarning"}).prependTo(s.container).hide(),r("<span>",{class:"toggleWarning"}).html("×").click((function(){p.hide(400)})).appendTo(p),f=r("<span>",{class:"toggableMsg"}).appendTo(p)),f.empty(),e instanceof r?f.append(e):f.html(e),p.show(400)};var h=null,g=function(t){var n,o,a;t.options.drawOutputSelector&&(n=r('<ul id="yasrBtnGroup" class="yasr_btnGroup nav nav-tabs"></ul>'),r.each(t.plugins,(function(e,o){if(!o.hideFromSelection){var a=o.nameLabel?t.translate(o.nameLabel):e,s=r("<li class='nav-item'></li>");r("<a class='nav-link'></a>").text(a).addClass("select_"+e).click((function(){if(!r(this).parent().hasClass("disabled")){n.find("li.active").removeClass("active"),s.addClass("active"),t.options.output=e;var o=t.getPersistencyId(t.options.persistency.outputSelector);o&&i.storage.set(o,t.options.output,"month"),p&&p.hide(400),t.draw(e),t.updateHeader()}})).appendTo(s),s.appendTo(n),t.options.output==e&&s.addClass("active")}})),n.children().length>1&&t.header.append(n)),t.options.drawDownloadIcon&&function(){if(null===h){var e=window.URL||window.webkitURL||window.mozURL||window.msURL;h=e&&Blob}return h}()&&(o=t.translate("yasr.btn.label.save"),a=r("<button id='yasrDownloadIcon' class='btn btn-primary btn-sm yasr_downloadIcon pull-right'>"+o+"</button>").click((function(){var n=t.plugins[t.options.output];if(n&&n.getDownloadInfo){var i=n.getDownloadInfo(),o=function(e,t){var n=null,r=window.URL||window.webkitURL||window.mozURL||window.msURL;if(r&&Blob){var i=new Blob([e],{type:t});n=r.createObjectURL(i)}return n}(i.getContent(),i.contentType?i.contentType:"text/plain"),a=r("<a></a>",{href:o,download:i.filename});e("./utils.js").fireClick(a)}})),t.header.append(a))},m=s.getPersistencyId(s.options.persistency.outputSelector);if(m){var v=i.storage.get(m);v&&(s.options.output=v)}if(s.options.hideHeader||g(s),!a&&s.options.persistency&&s.options.persistency.results){var y,x=s.getPersistencyId(s.options.persistency.results.key);if(x&&(y=i.storage.get(x)),!y&&s.options.persistency.results.id){var b="string"==typeof s.options.persistency.results.id?s.options.persistency.results.id:s.options.persistency.results.id(s);b&&(y=i.storage.get(b))&&i.storage.remove(b)}y&&(r.isArray(y)?s.setResponse.apply(this,y):s.setResponse(y))}a&&s.setResponse(a),s.updateHeader();const E="resize."+(new Date).getTime();return r(window).on(E,s.draw),s.destroy=function(){r(window).off(E);for(const e in s.plugins)r.isFunction(e.destroy)&&e.destroy()},s};o.plugins={},o.registerOutput=function(e,t){o.plugins[e]=t},o.defaults=e("./defaults.js"),o.version={YASR:e("../package.json").version,jquery:r.fn.jquery,"yasgui-utils":e("yasgui-utils").version},o.utils=e("./utils.js"),o.$=r;try{o.registerOutput("boolean",e("./boolean.js"))}catch(e){}try{o.registerOutput("booleanBootstrap",e("./booleanBootstrap.js"))}catch(e){}try{o.registerOutput("table",e("./table.js"))}catch(e){}try{o.registerOutput("rawResponse",e("./rawResponse.js"))}catch(e){}try{o.registerOutput("error",e("./error.js"))}catch(e){}try{o.registerOutput("pivot",e("./pivot.js"))}catch(e){}try{o.registerOutput("gchart",e("./gchart.js"))}catch(e){}},{"../package.json":39,"./boolean.js":41,"./booleanBootstrap.js":42,"./defaults.js":43,"./error.js":44,"./extensions.js":46,"./gChartLoader.js":47,"./gchart.js":48,"./imgs.js":51,"./jquery/extendJquery.js":52,"./parsers/wrapper.js":60,"./pivot.js":62,"./rawResponse.js":63,"./table.js":64,"./translate.js":65,"./utils.js":66,jquery:18,"yasgui-utils":36}],55:[function(e,t,n){"use strict";e("jquery"),t.exports=function(t){return e("./dlv.js")(t,",")}},{"./dlv.js":56,jquery:18}],56:[function(e,t,n){"use strict";var r=e("jquery");e("../../lib/jquery.csv-0.71.js"),t.exports=function(e,t){var n={},i=r.csv.toArrays(e,{separator:t}),o=function(e){return 0==e.indexOf("http")?"uri":null};return 2==i.length&&1==i[0].length&&1==i[1].length&&"boolean"==i[0][0]&&("1"==i[1][0]||"0"==i[1][0])&&(n.boolean="1"==i[1][0],1)||i.length>0&&i[0].length>0&&(n.head={vars:i[0]},1)&&function(){if(i.length>1){n.results={bindings:[]};for(var e=1;e<i.length;e++){for(var t={},r=0;r<i[e].length;r++){var a=n.head.vars[r];if(a){var s=i[e][r],l=o(s);t[a]={value:s},l&&(t[a].type=l)}}n.results.bindings.push(t)}n.head={vars:i[0]}}}(),n}},{"../../lib/jquery.csv-0.71.js":4,jquery:18}],57:[function(e,t,n){"use strict";e("jquery");var r=e("lodash"),i=function(e){return"object"==typeof e?("bnode"==e.type&&(e.value=e.value.slice(2)),e):0==e.indexOf("_:")?{type:"bnode",value:e.slice(2)}:-1==e.indexOf(":")?{type:"bnode",value:e}:{type:"uri",value:e}};t.exports=function(e){if(e){var t,n="RESOURCE"==window.editor.getQueryType(),o=r.map(e,(function(e,t){return r.map(e,(function(e,o){return r.map(e,(function(e){return e.graphs?(n=!0,r.map(e.graphs,(function(n){return[i(t),i(o),i(e),i(n)]}))):[i(t),i(o),i(e)]}))}))})),a=r.reduce(o,(function(e,t){return e.concat(t)}),[]);return a=r.reduce(a,(function(e,t){return e.concat(t)}),[]),t=n?(a=r.reduce(a,(function(e,t){return e.concat(t)}),[])).map((function(e){return{subject:e[0],predicate:e[1],object:e[2],context:e[3]}})):a.map((function(e){return{subject:e[0],predicate:e[1],object:e[2]}})),{head:{vars:n?["subject","predicate","object","context"]:["subject","predicate","object"]},results:{bindings:t}}}return!1}},{jquery:18,lodash:19}],58:[function(e,t,n){"use strict";e("jquery"),t.exports=function(e){if("string"==typeof e)try{return JSON.parse(e)}catch(e){return!1}return"object"==typeof e&&e.constructor==={}.constructor&&e}},{jquery:18}],59:[function(e,t,n){"use strict";e("jquery"),t.exports=function(t){return e("./dlv.js")(t,"\t")}},{"./dlv.js":56,jquery:18}],60:[function(e,t,n){"use strict";e("jquery");var r=e("lodash");t.exports=function(t,n,i){var o={xml:e("./xml.js"),json:e("./json.js"),tsv:e("./tsv.js"),csv:e("./csv.js"),graphJson:e("./graphJson.js")},a=null,s=null,l=null,u=null,c=null,d=null,p=function(){return u?(l||(l=u),u):!1!==u&&!d&&(function(){if(a)if(a.indexOf("json")>-1){try{u=o.json(s,window.editor.getQueryType()),l=u,a.indexOf("application/rdf+json")>-1&&(u=o.graphJson(l))}catch(e){d=e}c="json"}else if(a.indexOf("xml")>-1){try{u=o.xml(s)}catch(e){d=e}c="xml"}else if(a.indexOf("csv")>-1){try{u=o.csv(s)}catch(e){d=e}c="csv"}else if(a.indexOf("tab-separated")>-1){try{u=o.tsv(s)}catch(e){d=e}c="tsv"}}(),u||function(){if(u=o.json(s))c="json";else try{(u=o.xml(s))&&(c="xml")}catch(e){}}(),u||(u=!1),u)},f=function(e){if(l.results&&l.results.bindings&&l.results.bindings.length>e){var t=jQuery.extend(!0,{},l);t.results.bindings=l.results.bindings.slice(0,e)}else{var n=r.keys(l).slice(0,e);t=r.pick(l,(function(e,t){return n.indexOf(t)>=0}))}return t},h=function(){var e="";return"string"==typeof s?e=s:"json"==c?e=JSON.stringify(s,void 0,2):"xml"==c&&(e=(new XMLSerializer).serializeToString(s)),e};return function(){if("object"==typeof t){if(t.exception?d=t.exception:null!=t.status&&(t.status>=300||0===t.status)&&(d={status:t.status},"string"==typeof i&&(d.errorString=i),t.responseText&&(d.responseText=t.responseText),t.statusText&&(d.statusText=t.statusText)),t.contentType)a=t.contentType.toLowerCase();else if(t.getResponseHeader&&t.getResponseHeader("content-type")){var e=t.getResponseHeader("content-type").trim().toLowerCase();e.length>0&&(a=e)}t.response?s=t.response:n||i||(s=t)}d||s||(s=t.responseText?t.responseText:t)}(),u=p(),{getAsStoreObject:function(){var e={};t.status?(e.status=t.status,e.responseText=t.responseText,e.statusText=t.statusText,e.contentType=a):e=t;var r=void 0;return"string"==typeof i&&(r=i),[e,n,r]},getRawJson:function(){return l},getAsJson:p,getOriginalResponse:function(){return s},getShortOriginalResponse:function(e){if("json"==c){var t=f(e);return JSON.stringify(t,void 0,2)}return h().slice(0,e)},getShortOriginalResponseAsJSON:f,getOriginalResponseAsString:h,getOriginalContentType:function(){return a},getVariables:function(){var e=p();return e&&"head"in e?e.head.vars:null},getBindings:function(){var e=p();return e&&"results"in e?e.results.bindings:null},getBoolean:function(){var e=p();return e&&"boolean"in e?e.boolean:null},getType:function(){return null==c&&p(),c},getException:function(){return d}}}},{"./csv.js":55,"./graphJson.js":57,"./json.js":58,"./tsv.js":59,"./xml.js":61,jquery:18,lodash:19}],61:[function(e,t,n){"use strict";var r=e("jquery");t.exports=function(e){var t=function(e){a.head={};for(var t=0;t<e.childNodes.length;t++){var n=e.childNodes[t];if("variable"==n.nodeName){a.head.vars||(a.head.vars=[]);var r=n.getAttribute("name");r&&a.head.vars.push(r)}}},n=function(e){a.results={},a.results.bindings=[];for(var t=0;t<e.childNodes.length;t++){for(var n=e.childNodes[t],r=null,i=0;i<n.childNodes.length;i++){var o=n.childNodes[i];if("binding"==o.nodeName){var s=o.getAttribute("name");if(s){(r=r||{})[s]={};for(var l=0;l<o.childNodes.length;l++){var u=o.childNodes[l],c=u.nodeName;if("#text"!=c){r[s].type=c,r[s].value=u.innerHTML;var d=u.getAttribute("datatype");d&&(r[s].datatype=d)}}}}}r&&a.results.bindings.push(r)}},i=function(e){"true"==e.innerHTML?a.boolean=!0:a.boolean=!1},o=null;if("string"==typeof e?o=r.parseXML(e):r.isXMLDoc(e)&&(o=e),e=null,!(o.childNodes.length>0))return null;e=o.childNodes[0];for(var a={},s=0;s<e.childNodes.length;s++){var l=e.childNodes[s];"head"==l.nodeName&&t(l),"results"==l.nodeName&&n(l),"boolean"==l.nodeName&&i(l)}return a}},{jquery:18}],62:[function(e,t,n){"use strict";var r=e("jquery"),i=e("./utils.js"),o=e("yasgui-utils"),a=e("./imgs.js");if(e("jquery-ui/sortable"),e("pivottable"),!r.fn.pivotUI)throw new Error("Pivot lib not loaded");var s=t.exports=function(t){t.translate=e("./translate.js").translate;var n={id:"pivot",name:"Pivot Table",nameLabel:"yasr.pivot.pivot_table",getPriority:4};const l=t.options.pluginsOptions?t.options.pluginsOptions[n.id]:{};var u,c=n.options=r.extend(!0,{},s.defaults,l);if(c.useD3Chart){try{d3&&e("../node_modules/pivottable/dist/d3_renderers.js")}catch(e){}r.pivotUtilities.d3_renderers&&r.extend(!0,r.pivotUtilities.renderers,r.pivotUtilities.d3_renderers)}var d=null,p=function(e){var n=function(){var e=t.results.getVariables();if(!c.mergeLabelsWithUris)return e;var n=[];return d="string"==typeof c.mergeLabelsWithUris?c.mergeLabelsWithUris:"Label",e.forEach((function(t){-1!==t.indexOf(d,t.length-d.length)&&e.indexOf(t.substring(0,t.length-d.length))>=0||n.push(t)})),n}(),r=null;t.options.getUsedPrefixes&&(r="function"==typeof t.options.getUsedPrefixes?t.options.getUsedPrefixes(t):t.options.getUsedPrefixes),t.results.getBindings().forEach((function(t){var o={};n.forEach((function(e){if(e in t){var n=t[e].value;d&&t[e+d]?n=t[e+d].value:"uri"==t[e].type&&(n=i.uriToPrefixed(r,n)),o[e]=n}else o[e]=null})),e(o)}))},f=t.getPersistencyId(c.persistencyId);return n.draw=function(){var n=function(){var e=r("<button>",{class:"openPivotGchart yasr_btn"}).text(t.translate("yasr.chart.config")).click((function(){u.find('div[dir="ltr"]').dblclick()})).appendTo(t.resultsContainer);u=r("<div>",{class:"pivotTable"}).appendTo(r(t.resultsContainer));var n,i=r.extend(!0,{},function(){var e=o.storage.get(f);if(e){var n=t.results.getVariables(),i=!0;e.cols.forEach((function(e){n.indexOf(e)<0&&(i=!1)})),i&&e.rows.forEach((function(e){n.indexOf(e)<0&&(i=!1)})),i||(e.cols=[],e.rows=[]),r.pivotUtilities.renderers[e.rendererName]||delete e.rendererName}else e={};return e}(),s.defaults.pivotTable);i.onRefresh=(n=i.onRefresh,function(r){!function(n){if(f){var r={cols:n.cols,rows:n.rows,rendererName:n.rendererName,aggregatorName:n.aggregatorName,vals:n.vals};o.storage.set(f,r,"month")}n.rendererName.toLowerCase().indexOf(" chart")>=0?e.show():e.hide(),t.updateHeader()}(r),n&&n(r)}),window.pivot=u.pivotUI(p,i);var l=r(o.svg.getElement(a.move));u.find(".pvtTriangle").replaceWith(l),r(".pvtCols").prepend(r("<div>",{class:"containerHeader"}).text(t.translate("yasr.headers.columns"))),r(".pvtRows").prepend(r("<div>",{class:"containerHeader"}).text(t.translate("yasr.headers.rows"))),r(".pvtUnused").prepend(r("<div>",{class:"containerHeader"}).text(t.translate("yasr.headers.variables"))),r(".pvtVals").prepend(r("<div>",{class:"containerHeader"}).text(t.translate("yasr.headers.cells"))),setTimeout(t.updateHeader,400)};t.options.useGoogleCharts&&c.useGoogleCharts&&!r.pivotUtilities.gchart_renderers?e("./gChartLoader.js").on("done",(function(){try{e("../node_modules/pivottable/dist/gchart_renderers.js"),r.extend(!0,r.pivotUtilities.renderers,r.pivotUtilities.gchart_renderers)}catch(e){c.useGoogleCharts=!1}n()})).on("error",(function(){console.log("could not load gchart"),c.useGoogleCharts=!1,n()})).googleLoad():n()},n.canHandleResults=function(){return t.results&&t.results.getVariables&&t.results.getVariables()&&t.results.getVariables().length>0},n.getDownloadInfo=function(){if(!t.results)return null;var e=t.resultsContainer.find(".pvtRendererArea svg");if(e.length>0)return{getContent:function(){return e[0].outerHTML?e[0].outerHTML:r("<div>").append(e.clone()).html()},filename:"queryResults.svg",contentType:"image/svg+xml",buttonTitle:t.translate("yasr.btn.title.svg")};var n=t.resultsContainer.find(".pvtRendererArea table");return n.length>0?{getContent:function(){return n.tableToCsv()},filename:"queryResults.csv",contentType:"text/csv",buttonTitle:t.translate("yasr.btn.title.csv")}:void 0},n.getEmbedHtml=function(){if(!t.results)return null;var e=t.resultsContainer.find(".pvtRendererArea svg").clone().css("height","").css("width","");if(0==e.length)return null;var n=e[0].outerHTML;return n||(n=r("<div>").append(e.clone()).html()),'<div style="width: 800px; height: 600px;">\n'+n+"\n</div>"},n};s.defaults={mergeLabelsWithUris:!1,useGoogleCharts:!0,useD3Chart:!0,persistencyId:"pivot",pivotTable:{}},s.version={"YASR-rawResponse":e("../package.json").version,jquery:r.fn.jquery}},{"../node_modules/pivottable/dist/d3_renderers.js":20,"../node_modules/pivottable/dist/gchart_renderers.js":21,"../package.json":39,"./gChartLoader.js":47,"./imgs.js":51,"./translate.js":65,"./utils.js":66,jquery:18,"jquery-ui/sortable":16,pivottable:22,"yasgui-utils":36}],63:[function(e,t,n){"use strict";var r=e("jquery"),i=e("codemirror");e("codemirror/addon/fold/foldcode.js"),e("codemirror/addon/fold/foldgutter.js"),e("codemirror/addon/fold/xml-fold.js"),e("codemirror/addon/fold/brace-fold.js"),e("codemirror/addon/edit/matchbrackets.js"),e("codemirror/mode/xml/xml.js"),e("codemirror/mode/javascript/javascript.js");var o=t.exports=function(t){t.translate=e("./translate.js").translate;const n={id:"rawResponse",name:"Raw Response",nameLabel:"yasr.name.raw_response",getPriority:2},a=t.options.pluginsOptions?t.options.pluginsOptions[n.id]:{};var s=n.options=r.extend(!0,{},o.defaults,a),l=null;return n.draw=function(){var e=s.CodeMirror;e.value=t.results.getShortOriginalResponse(s.limit);var n=t.results.getType();n&&("json"===n&&(n={name:"javascript",json:!0}),e.mode=n),(l=i(t.resultsContainer.get()[0],e)).on("fold",(function(){l.refresh()})),l.on("unfold",(function(){l.refresh()}))},n.canHandleResults=function(){if(!t.results)return!1;if(!t.results.getOriginalResponseAsString)return!1;var e=t.results.getOriginalResponseAsString();return!((!e||0===e.length)&&t.results.getException())},n.getDownloadInfo=function(){if(!t.results)return null;var e=t.results.getOriginalContentType(),n=t.results.getType();return{getContent:function(){return t.results.getOriginalResponseAsString()},filename:"queryResults"+(n?"."+n:""),contentType:e||"text/plain",buttonTitle:t.translate("yasr.btn.title.raw")}},n};o.defaults={CodeMirror:{readOnly:!0,lineNumbers:!0,lineWrapping:!0,foldGutter:!0,gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"]},limit:1e3},o.version={"YASR-rawResponse":e("../package.json").version,jquery:r.fn.jquery,CodeMirror:i.version}},{"../package.json":39,"./translate.js":65,codemirror:10,"codemirror/addon/edit/matchbrackets.js":5,"codemirror/addon/fold/brace-fold.js":6,"codemirror/addon/fold/foldcode.js":7,"codemirror/addon/fold/foldgutter.js":8,"codemirror/addon/fold/xml-fold.js":9,"codemirror/mode/javascript/javascript.js":11,"codemirror/mode/xml/xml.js":12,jquery:18}],64:[function(e,t,n){"use strict";var r=e("jquery"),i=e("yasgui-utils"),o=e("./utils.js"),a=(e("./imgs.js"),e("lodash"));e("../lib/DataTables/media/js/jquery.dataTables.js"),e("../lib/colResizable-1.4.js");var s=t.exports=function(t){t.translate=e("./translate.js").translate;var n=null,o={id:"table",name:"Table",nameLabel:"yasr.table",getPriority:10};const l=t.options.pluginsOptions?t.options.pluginsOptions[o.id]:{};var u=o.options=r.extend(!0,{},s.defaults,l),c=u.persistency?t.getPersistencyId(u.persistency.tableLength):null;t.getPersistencyId("eventId")||r(t.container).closest("[id]").attr("id");o.draw=function(){n=r('<table cellpadding="0" cellspacing="0" border="0" class="resultsTable table stripe hover table-bordered fixedCellWidth"></table>'),r(t.resultsContainer).html(n);var s=u.datatable;s.data=function(){var e=[],n=t.results.getBindings(),r=t.results.getVariables(),i=null;t.options.getUsedPrefixes&&(i="function"==typeof t.options.getUsedPrefixes?t.options.getUsedPrefixes(t):t.options.getUsedPrefixes),i=a.invert(i);for(var s=0;s<n.length;s++){var l=[];l.push("");for(var c=n[s],d=0;d<r.length;d++){var p=r[d];p in c&&u.getCellContent?l.push(u.getCellContent(t,o,c,p,{rowId:s,colId:d,usedPrefixes:i})):l.push("")}e.push(l)}return e}(),s.columns=u.getColumns(t,o);var l=i.storage.get(c);l&&(s.pageLength=l),s.translate=e("./translate.js").translate,n.DataTable(r.extend(!0,{},s)),d(),(!u.enableColumnResizingOnWindowWidth||u.enableColumnResizingOnWindowWidth<=r(window).width())&&((t.getPersistencyId("eventId")||r(t.container).closest("[id]").attr("id"),function(){var e;n.on("order.dt",(function(){d()})),c&&n.on("length.dt",(function(e,t,n){i.storage.set(c,n,"month")})),r.extend(!0,u.callbacks,u.handlers),n.delegate("td","click",(function(e){if(u.callbacks&&u.callbacks.onCellClick&&!1===u.callbacks.onCellClick(this,e))return!1})).delegate("td","mouseenter",(function(e){u.callbacks&&u.callbacks.onCellMouseEnter&&u.callbacks.onCellMouseEnter(this,e);var t=r(this);u.fetchTitlesFromPreflabel&&void 0===t.attr("title")&&0==t.text().trim().indexOf("http")&&p(t)})).delegate("td","mouseleave",(function(e){u.callbacks&&u.callbacks.onCellMouseLeave&&u.callbacks.onCellMouseLeave(this,e)})),e=angular.element(r("#yasr")[0]).scope(),r("td div .fa-link").on("click",(function(){var t=this.dataset.clipboardText;e.copyToClipboardResult(t)}))})(),n.colResizable()),n.find("thead").outerHeight(),r(t.resultsContainer).find(".JCLRgrip").height(n.find("thead").outerHeight()),t.header.outerHeight();var f=t.resultsContainer.find(".dataTables_filter label");r(f.contents().get(0)).remove(),f.find("input[type=search]").attr("placeholder",t.translate("yasr.table.filter")).addClass("form-control"),u.highlightLiteralCellResult()};var d=function(){for(var e in n.find(".sortIcons").remove(),{sorting:"unsorted",sorting_asc:"sortAsc",sorting_desc:"sortDesc"}){var t=r("<div class='sortIcons'></div>");"sorting"==e?t.append("<a class='fa fa-sort'></a>"):"sorting_asc"==e?t.append("<a class='fa fa-sort-alpha-asc'></a>"):"sorting_desc"==e&&t.append("<a class='fa fa-sort-alpha-desc'></a>"),n.find("th."+e).append(t)}};return o.canHandleResults=function(){return t.results&&t.results.getVariables&&t.results.getVariables()&&t.results.getVariables().length>0},o.getDownloadInfo=function(){return t.results?{getContent:function(){return e("./bindingsToCsv.js")(t.results.getAsJson())},filename:"queryResults.csv",contentType:"text/csv",buttonTitle:t.translate("yasr.btn.title.csv")}:null},o},l=function(e){return e.replace(/([_:](?![_:/-]))/g,"$1<wbr>").replace(/((?<!<)[/](?![_:/-]))/g,"$1<wbr>").replace(/((?<!@\p{L}*)[-](?![_:/-]))/gu,"$1<wbr>")},u=function(e,t,n,r){var i="",s=null;let p=r.translate("yasr.copy.to.clipboard");if("uri"===e.type){var f=null,h=e.value,g=h;if(t.usedPrefixes){var m=o.uriToPrefixWithLocalName(t.usedPrefixes,g);if(m){var v=m.localName;g=m.prefix+":"+v}}var y=window.location.origin+"/resource/";E=0===h.indexOf(y)&&h.length>y.length?h:"resource?uri="+encodeURIComponent(h),null!=n&&!0===n&&(E+="&context="+encodeURIComponent("http://rdf4j.org/schema/rdf4j#SHACLShapeGraph")),E=E.replace(/'/g,"'"),s="<a title='"+(h=h.replace(/'/g,"'"))+"' class='uri' href='"+E+"'>"+(C=a.escape(g),l(C)+"</a> <a class='fa fa-link share-result' data-clipboard-text='")+h+"' title='"+p+"' href='#'></a>",i=" class = 'uri-cell'"}else if("triple"===e.type){var x="<ul class='triple-list'><li>"+u(e.value.s,t,n,r)+"</li><li>"+u(e.value.p,t,n,r)+"</li><li>"+u(e.value.o,t,n,r)+"</li></ul>",b=c(r,e,!1),E="resource?triple="+encodeURIComponent(b).replace(/'/g,"'");s="<a title='"+(f=a.escape(b))+"' class='triple-link' href='"+E+"'>"+a.escape("<<")+"</a>"+x+"<a title='"+f+"' class='triple-link triple-link-end' href='"+E+"'>"+a.escape(">>")+"</a><a class='fa fa-link share-result' data-clipboard-text='"+b+"' title='"+p+"' href='#'></a>",i=" class = 'triple-cell'"}else s="<p class='nonUri' style='border: none; background-color: transparent; padding: 0; margin: 0'>"+d(r,e,!0)+"</p>",i=" class = 'literal-cell'";var C,T,S;return`<div ${i} lang="${T=e,S="xx",T["xml:lang"]?T["xml:lang"]:T.lang?T.lang:S}">${s}</div>`},c=function(e,t,n){return"uri"===t.type?"<"+t.value+">":"triple"===t.type?"<<"+c(e,t.value.s,n)+" "+c(e,t.value.p,n)+" "+c(e,t.value.o,n)+">>":d(e,t,n)},d=function(e,t,n){var r=o.escapeHtmlEntities(t.value),i="http://www.w3.org/2001/XMLSchema#";if("bnode"===t.type)return"_:"+r;if(t["xml:lang"])r='"'+r+(n?'"<sup>':'"')+"@"+t["xml:lang"]+(n?"</sup>":"");else if(t.lang)r='"'+r+(n?'"<sup>':'"@')+t.lang+(n?"</sup>":"");else if(t.datatype&&t.datatype!==i+"string"){var a=t.datatype;r='"'+r+(n?'"<sup>':'"')+"^^"+(a=0===a.indexOf(i)&&n?"xsd:"+a.substring(i.length):n?"<"+a+">":"<"+a+">")+(n?"</sup>":"")}return function(e){const t=function(e){return e.replace(/(\^\^)/g,"<wbr>$1")}(e);return l(t)}(0===r.indexOf('"')?r:'"'+r+'"')},p=function(e){var t=function(){e.attr("title","")};r.get("http://preflabel.org/api/v1/label/"+encodeURIComponent(e.text())+"?silent=true").success((function(n){"object"==typeof n&&n.label?e.attr("title",n.label):"string"==typeof n&&n.length>0?e.attr("title",n):t()})).fail(t)};s.defaults={getCellContent:function(e,t,n,r,i){var o=n[r],a=e.header.context.ownerDocument.URL.includes("http:%2F%2Frdf4j.org%2Fschema%2Frdf4j%23SHACLShapeGraph");return u(o,i,a,e)},highlightLiteralCellResult:function(){},persistency:{tableLength:"tableLength"},getColumns:function(e,t){var n=function(n){if(!t.options.mergeLabelsWithUris)return!0;var r="string"==typeof t.options.mergeLabelsWithUris?t.options.mergeLabelsWithUris:"Label";return!(-1!==n.indexOf(r,n.length-r.length)&&e.results.getVariables().indexOf(n.substring(0,n.length-r.length))>=0)},r=[];return r.push({title:""}),e.results.getVariables().forEach((function(t){var i=e.options.translateHeaders?e.translate("yasr.headers.labels."+t):t;r.push({title:"<span>"+i+"</span>",visible:n(t)})})),r},fetchTitlesFromPreflabel:!0,mergeLabelsWithUris:!1,callbacks:{onCellMouseEnter:null,onCellMouseLeave:null,onCellClick:null},datatable:{paginate:!1,info:!1,autoWidth:!1,order:[],pageLength:50,lengthMenu:[[10,50,100,1e3,-1],[10,50,100,1e3,"All"]],lengthChange:!0,drawCallback:function(e){for(var t=0;t<e.aiDisplay.length;t++)r("td:eq(0)",e.aoData[e.aiDisplay[t]].nTr).html(t+1);var n=!1;r(e.nTableWrapper).find(".paginate_button").each((function(){-1==r(this).attr("class").indexOf("current")&&-1==r(this).attr("class").indexOf("disabled")&&(n=!0)})),n?r(e.nTableWrapper).find(".dataTables_paginate").show():r(e.nTableWrapper).find(".dataTables_paginate").hide()},columnDefs:[{width:"32px",orderable:!1,targets:0}]}},s.version={"YASR-table":e("../package.json").version,jquery:r.fn.jquery,"jquery-datatables":r.fn.DataTable.version}},{"../lib/DataTables/media/js/jquery.dataTables.js":2,"../lib/colResizable-1.4.js":3,"../package.json":39,"./bindingsToCsv.js":40,"./imgs.js":51,"./translate.js":65,"./utils.js":66,jquery:18,lodash:19,"yasgui-utils":36}],65:[function(e,t,n){const r={en:e("./i18n/locale-en"),fr:e("./i18n/locale-fr")};var i="en";t.exports={setLanguage:function(e){i=e},translate:function(e,t){const n=i;if(!r||!r[n])return console.warn("Missing locale file for ["+n+"]"),e;let o=r[n][e];return o||(o=r.en[e]),t&&(o=o.replace(`{{${t.key}}}`,t.value)),o||(console.warn("Missing translation for ["+e+"] key in ["+n+"] locale"),e)}}},{"./i18n/locale-en":49,"./i18n/locale-fr":50}],66:[function(e,t,n){"use strict";var r=e("jquery"),i=(e("lodash"),e("./exceptions.js").GoogleTypeException);t.exports={escapeHtmlEntities:function(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")},uriToPrefixed:function(e,t){if(e)for(var n in e)if(0==t.indexOf(e[n])){t=n+":"+t.substring(e[n].length);break}return t},uriToPrefixWithLocalName:function(e,t){var n=Object.keys(e).filter((function(e){return 0==t.indexOf(e)}));if(n.length>0){var r=(n=n.sort((function(e,t){return e.length<t.length})))[0];return{prefix:e[r],localName:t.substring(r.length)}}return null},getGoogleTypeForBinding:function(e){if(null==e)return null;if(null==e.type||"typed-literal"!==e.type&&"literal"!==e.type)return"string";switch(e.datatype){case"http://www.w3.org/2001/XMLSchema#float":case"http://www.w3.org/2001/XMLSchema#decimal":case"http://www.w3.org/2001/XMLSchema#int":case"http://www.w3.org/2001/XMLSchema#integer":case"http://www.w3.org/2001/XMLSchema#long":case"http://www.w3.org/2001/XMLSchema#gYearMonth":case"http://www.w3.org/2001/XMLSchema#gYear":case"http://www.w3.org/2001/XMLSchema#gMonthDay":case"http://www.w3.org/2001/XMLSchema#gDay":case"http://www.w3.org/2001/XMLSchema#gMonth":return"number";case"http://www.w3.org/2001/XMLSchema#date":return"date";case"http://www.w3.org/2001/XMLSchema#dateTime":return"datetime";case"http://www.w3.org/2001/XMLSchema#time":return"timeofday";default:return"string"}},getGoogleTypeForBindings:function(e,n){var r={},o=0;if(e.forEach((function(e){var i=t.exports.getGoogleTypeForBinding(e[n]);null!=i&&(i in r||(r[i]=0,o++),r[i]++)})),0==o)return"string";if(1!=o)throw new i(r,n);for(var a in r)return a},castGoogleType:function(e,n,r){if(null==e)return null;if("string"==r||null==e.type||"typed-literal"!==e.type&&"literal"!==e.type)return"uri"==e.type?t.exports.uriToPrefixed(n,e.value):e.value;switch(e.datatype){case"http://www.w3.org/2001/XMLSchema#float":case"http://www.w3.org/2001/XMLSchema#decimal":case"http://www.w3.org/2001/XMLSchema#int":case"http://www.w3.org/2001/XMLSchema#integer":case"http://www.w3.org/2001/XMLSchema#long":case"http://www.w3.org/2001/XMLSchema#gYearMonth":case"http://www.w3.org/2001/XMLSchema#gYear":case"http://www.w3.org/2001/XMLSchema#gMonthDay":case"http://www.w3.org/2001/XMLSchema#gDay":case"http://www.w3.org/2001/XMLSchema#gMonth":return Number(e.value);case"http://www.w3.org/2001/XMLSchema#date":var i=o(e.value);if(i)return i;case"http://www.w3.org/2001/XMLSchema#dateTime":case"http://www.w3.org/2001/XMLSchema#time":return new Date(e.value);default:return e.value}},fireClick:function(e){e&&e.each((function(e,t){var n=r(t);if(document.dispatchEvent){var i=document.createEvent("MouseEvents");i.initMouseEvent("click",!0,!0,window,1,1,1,1,1,!1,!1,!1,!1,0,n[0]),n[0].dispatchEvent(i)}else document.fireEvent&&n[0].click()}))}};var o=function(e){var t=new Date(e.replace(/(\d)([\+-]\d{2}:\d{2})/,"$1Z$2"));return isNaN(t)?null:t}},{"./exceptions.js":45,jquery:18,lodash:19}]},{},[1])(1)},module.exports=e()}).call(this,__webpack_require__(6))},349:function(e,t,n){var r,i;r=[n(344)],void 0===(i=function(){var t;return(t={dev:!1}).tooltip=t.tooltip||{},t.utils=t.utils||{},t.models=t.models||{},t.charts={},t.logs={},t.dom={},"undefined"==typeof d3&&(d3=n(340)),t.dispatch=d3.dispatch("render_start","render_end"),Function.prototype.bind||(Function.prototype.bind=function(e){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var t=Array.prototype.slice.call(arguments,1),n=this,r=function(){},i=function(){return n.apply(this instanceof r&&e?this:e,t.concat(Array.prototype.slice.call(arguments)))};return r.prototype=this.prototype,i.prototype=new r,i}),t.dev&&(t.dispatch.on("render_start",(function(e){t.logs.startTime=+new Date})),t.dispatch.on("render_end",(function(e){t.logs.endTime=+new Date,t.logs.totalTime=t.logs.endTime-t.logs.startTime,t.log("total",t.logs.totalTime)}))),t.log=function(){if(t.dev&&window.console&&console.log&&console.log.apply)console.log.apply(console,arguments);else if(t.dev&&window.console&&"function"==typeof console.log&&Function.prototype.bind){var e=Function.prototype.bind.call(console.log,console);e.apply(console,arguments)}return arguments[arguments.length-1]},t.deprecated=function(e,t){console&&console.warn&&console.warn("nvd3 warning: `"+e+"` has been deprecated. ",t||"")},t.render=function(e){e=e||1,t.render.active=!0,t.dispatch.render_start();var n=function(){for(var r,i,o=0;o<e&&(i=t.render.queue[o]);o++)r=i.generate(),typeof i.callback==typeof Function&&i.callback(r);t.render.queue.splice(0,o),t.render.queue.length?setTimeout(n):(t.dispatch.render_end(),t.render.active=!1)};setTimeout(n)},t.render.active=!1,t.render.queue=[],t.addGraph=function(e){typeof arguments[0]==typeof Function&&(e={generate:arguments[0],callback:arguments[1]}),t.render.queue.push(e),t.render.active||t.render()},e.exports=t,"undefined"!=typeof window&&(window.nv=t),t.dom.write=function(e){return void 0!==window.fastdom?fastdom.mutate(e):e()},t.dom.read=function(e){return void 0!==window.fastdom?fastdom.measure(e):e()},t.interactiveGuideline=function(){"use strict";var e={left:0,top:0},n=null,r=null,i=d3.scale.linear(),o=d3.dispatch("elementMousemove","elementMouseout","elementClick","elementDblclick","elementMouseDown","elementMouseUp"),a=!0,s=null,l=t.models.tooltip(),u=window.ActiveXObject;function c(d){d.each((function(d){var p=d3.select(this),f=n||960,h=r||400,g=p.selectAll("g.nv-wrap.nv-interactiveLineLayer").data([d]);function m(){var t=d3.event.clientX-this.getBoundingClientRect().left,n=d3.event.clientY-this.getBoundingClientRect().top,r=!0,a=!1;if(u&&(t=d3.event.offsetX,n=d3.event.offsetY,"svg"!==d3.event.target.tagName&&(r=!1),d3.event.target.className.baseVal.match("nv-legend")&&(a=!0)),r&&(t-=e.left,n-=e.top),"mouseout"===d3.event.type||t<0||n<0||t>f||n>h||d3.event.relatedTarget&&void 0===d3.event.relatedTarget.ownerSVGElement||a){if(u&&d3.event.relatedTarget&&void 0===d3.event.relatedTarget.ownerSVGElement&&(void 0===d3.event.relatedTarget.className||d3.event.relatedTarget.className.match(l.nvPointerEventsClass)))return;return o.elementMouseout({mouseX:t,mouseY:n}),c.renderGuideLine(null),void l.hidden(!0)}l.hidden(!1);var s=void 0;if("function"==typeof i.rangeBands){var d=d3.bisect(i.range(),t)-1;if(!(i.range()[d]+i.rangeBand()>=t))return o.elementMouseout({mouseX:t,mouseY:n}),c.renderGuideLine(null),void l.hidden(!0);s=i.domain()[d3.bisect(i.range(),t)-1]}else s=i.invert(t);o.elementMousemove({mouseX:t,mouseY:n,pointXValue:s}),"dblclick"===d3.event.type&&o.elementDblclick({mouseX:t,mouseY:n,pointXValue:s}),"click"===d3.event.type&&o.elementClick({mouseX:t,mouseY:n,pointXValue:s}),"mousedown"===d3.event.type&&o.elementMouseDown({mouseX:t,mouseY:n,pointXValue:s}),"mouseup"===d3.event.type&&o.elementMouseUp({mouseX:t,mouseY:n,pointXValue:s})}g.enter().append("g").attr("class"," nv-wrap nv-interactiveLineLayer").append("g").attr("class","nv-interactiveGuideLine"),s&&(s.on("touchmove",m).on("mousemove",m,!0).on("mouseout",m,!0).on("mousedown",m,!0).on("mouseup",m,!0).on("dblclick",m).on("click",m),c.guideLine=null,c.renderGuideLine=function(e){a&&(c.guideLine&&c.guideLine.attr("x1")===e||t.dom.write((function(){var n=g.select(".nv-interactiveGuideLine").selectAll("line").data(null!=e?[t.utils.NaNtoZero(e)]:[],String);n.enter().append("line").attr("class","nv-guideline").attr("x1",(function(e){return e})).attr("x2",(function(e){return e})).attr("y1",h).attr("y2",0),n.exit().remove()})))})}))}return l.duration(0).hideDelay(0).hidden(!1),c.dispatch=o,c.tooltip=l,c.margin=function(t){return arguments.length?(e.top=void 0!==t.top?t.top:e.top,e.left=void 0!==t.left?t.left:e.left,c):e},c.width=function(e){return arguments.length?(n=e,c):n},c.height=function(e){return arguments.length?(r=e,c):r},c.xScale=function(e){return arguments.length?(i=e,c):i},c.showGuideLine=function(e){return arguments.length?(a=e,c):a},c.svgContainer=function(e){return arguments.length?(s=e,c):s},c},t.interactiveBisect=function(e,t,n){"use strict";if(!(e instanceof Array))return null;var r;r="function"!=typeof n?function(e){return e.x}:n;var i=d3.bisector((function(e,t){return r(e)-t})).left,o=d3.max([0,i(e,t)-1]),a=r(e[o]);if(void 0===a&&(a=o),a===t)return o;var s=d3.min([o+1,e.length-1]),l=r(e[s]);return void 0===l&&(l=s),Math.abs(l-t)>=Math.abs(a-t)?o:s},t.nearestValueIndex=function(e,t,n){"use strict";var r=1/0,i=null;return e.forEach((function(e,o){var a=Math.abs(t-e);null!=e&&a<=r&&a<n&&(r=a,i=o)})),i},t.models.tooltip=function(){"use strict";var e="nvtooltip-"+Math.floor(1e5*Math.random()),n=null,r="w",i=25,o=0,a=null,s=!0,l=200,u=null,c={left:null,top:null},d=!0,p=100,f=!0,h=function(e,t,n){return e},g=function(e){return e},m=function(e,t){return e},v=function(e,t){if(null===e)return"";var n=d3.select(document.createElement("table"));f&&n.selectAll("thead").data([e]).enter().append("thead").append("tr").append("td").attr("colspan",3).append("strong").classed("x-value",!0).html(g(e.value));var r=n.selectAll("tbody").data([e]).enter().append("tbody").selectAll("tr").data((function(e){return e.series})).enter().append("tr").classed("highlight",(function(e){return e.highlight}));r.append("td").classed("legend-color-guide",!0).append("div").style("background-color",(function(e){return e.color})),r.append("td").classed("key",!0).classed("total",(function(e){return!!e.total})).html((function(e,t){return m(e.key,t)})),r.append("td").classed("value",!0).html((function(e,t){return h(e.value,t,e)})),r.filter((function(e,t){return void 0!==e.percent})).append("td").classed("percent",!0).html((function(e,t){return"("+d3.format("%")(e.percent)+")"})),r.selectAll("td").each((function(e){if(e.highlight){var t=d3.scale.linear().domain([0,1]).range(["#fff",e.color]);d3.select(this).style("border-bottom-color",t(.6)).style("border-top-color",t(.6))}}));var i=n.node().outerHTML;return void 0!==e.footer&&(i+="<div class='footer'>"+e.footer+"</div>"),i},y=function(){var e={left:null!==d3.event?d3.event.clientX:0,top:null!==d3.event?d3.event.clientY:0};if("none"!=getComputedStyle(document.body).transform){var t=document.body.getBoundingClientRect();e.left-=t.left,e.top-=t.top}return e},x=function(){t.dom.read((function(){var e=y(),t=function(e){var t,n,o,a=u.node().offsetHeight,s=u.node().offsetWidth,l=document.documentElement.clientWidth,c=document.documentElement.clientHeight;switch(r){case"e":t=-s-i,n=-a/2,e.left+t<0&&(t=i),(o=e.top+n)<0&&(n-=o),(o=e.top+n+a)>c&&(n-=o-c);break;case"w":t=i,n=-a/2,e.left+t+s>l&&(t=-s-i),(o=e.top+n)<0&&(n-=o),(o=e.top+n+a)>c&&(n-=o-c);break;case"n":t=-s/2-5,n=i,e.top+n+a>c&&(n=-a-i),(o=e.left+t)<0&&(t-=o),(o=e.left+t+s)>l&&(t-=o-l);break;case"s":t=-s/2,n=-a-i,e.top+n<0&&(n=i),(o=e.left+t)<0&&(t-=o),(o=e.left+t+s)>l&&(t-=o-l);break;case"center":t=-s/2,n=-a/2;break;default:t=0,n=0}return{left:t,top:n}}(e),n=e.left+t.left,o=e.top+t.top;if(s)u.interrupt().transition().delay(l).duration(0).style("opacity",0);else{var a="translate("+c.left+"px, "+c.top+"px)",d="translate("+Math.round(n)+"px, "+Math.round(o)+"px)",f=d3.interpolateString(a,d),h=u.style("opacity")<.1;u.interrupt().transition().duration(h?0:p).styleTween("transform",(function(e){return f}),"important").styleTween("-webkit-transform",(function(e){return f})).style("-ms-transform",d).style("opacity",1)}c.left=n,c.top=o}))};function b(){if(d&&function(e){if(e&&e.series){if(t.utils.isArray(e.series))return!0;if(t.utils.isObject(e.series))return e.series=[e.series],!0}return!1}(n))return t.dom.write((function(){u&&u.node()||((u=d3.select(document.body).select("#"+e).data([1])).enter().append("div").attr("class","nvtooltip "+(a||"xy-tooltip")).attr("id",e).style("top",0).style("left",0).style("opacity",0).style("position","fixed").selectAll("div, table, td, tr").classed("nv-pointer-events-none",!0).classed("nv-pointer-events-none",!0),u.exit().remove());var t=v(n,u.node());t&&(u.node().innerHTML=t),x()})),b}return b.nvPointerEventsClass="nv-pointer-events-none",b.options=t.utils.optionsFunc.bind(b),b._options=Object.create({},{duration:{get:function(){return p},set:function(e){p=e}},gravity:{get:function(){return r},set:function(e){r=e}},distance:{get:function(){return i},set:function(e){i=e}},snapDistance:{get:function(){return o},set:function(e){o=e}},classes:{get:function(){return a},set:function(e){a=e}},enabled:{get:function(){return d},set:function(e){d=e}},hideDelay:{get:function(){return l},set:function(e){l=e}},contentGenerator:{get:function(){return v},set:function(e){v=e}},valueFormatter:{get:function(){return h},set:function(e){h=e}},headerFormatter:{get:function(){return g},set:function(e){g=e}},keyFormatter:{get:function(){return m},set:function(e){m=e}},headerEnabled:{get:function(){return f},set:function(e){f=e}},position:{get:function(){return y},set:function(e){y=e}},chartContainer:{get:function(){return document.body},set:function(e){t.deprecated("chartContainer","feature removed after 1.8.3")}},fixedTop:{get:function(){return null},set:function(e){t.deprecated("fixedTop","feature removed after 1.8.1")}},offset:{get:function(){return{left:0,top:0}},set:function(e){t.deprecated("offset","use chart.tooltip.distance() instead")}},hidden:{get:function(){return s},set:function(e){s!=e&&(s=!!e,b())}},data:{get:function(){return n},set:function(e){e.point&&(e.value=e.point.x,e.series=e.series||{},e.series.value=e.point.y,e.series.color=e.point.color||e.series.color),n=e}},node:{get:function(){return u.node()},set:function(e){}},id:{get:function(){return e},set:function(e){}}}),t.utils.initOptions(b),b},t.utils.windowSize=function(){var e={width:640,height:480};return window.innerWidth&&window.innerHeight?(e.width=window.innerWidth,e.height=window.innerHeight,e):"CSS1Compat"==document.compatMode&&document.documentElement&&document.documentElement.offsetWidth?(e.width=document.documentElement.offsetWidth,e.height=document.documentElement.offsetHeight,e):document.body&&document.body.offsetWidth?(e.width=document.body.offsetWidth,e.height=document.body.offsetHeight,e):e},t.utils.isArray=Array.isArray,t.utils.isObject=function(e){return null!==e&&"object"==typeof e},t.utils.isFunction=function(e){return"function"==typeof e},t.utils.isDate=function(e){return"[object Date]"===toString.call(e)},t.utils.isNumber=function(e){return!isNaN(e)&&"number"==typeof e},t.utils.windowResize=function(e){return window.addEventListener?window.addEventListener("resize",e):t.log("ERROR: Failed to bind to window.resize with: ",e),{callback:e,clear:function(){window.removeEventListener("resize",e)}}},t.utils.getColor=function(e){if(void 0===e)return t.utils.defaultColor();if(t.utils.isArray(e)){var n=d3.scale.ordinal().range(e);return function(e,t){var r=void 0===t?e:t;return e.color||n(r)}}return e},t.utils.defaultColor=function(){return t.utils.getColor(d3.scale.category20().range())},t.utils.customTheme=function(e,n,r){n=n||function(e){return e.key};var i=(r=r||d3.scale.category20().range()).length;return function(o,a){var s=n(o);return t.utils.isFunction(e[s])?e[s]():void 0!==e[s]?e[s]:(i||(i=r.length),r[i-=1])}},t.utils.pjax=function(e,n){var r=function(r){d3.html(r,(function(r){var i=d3.select(n).node();i.parentNode.replaceChild(d3.select(r).select(n).node(),i),t.utils.pjax(e,n)}))};d3.selectAll(e).on("click",(function(){history.pushState(this.href,this.textContent,this.href),r(this.href),d3.event.preventDefault()})),d3.select(window).on("popstate",(function(){d3.event.state&&r(d3.event.state)}))},t.utils.calcApproxTextWidth=function(e){if(t.utils.isFunction(e.style)&&t.utils.isFunction(e.text)){var n=parseInt(e.style("font-size").replace("px",""),10),r=e.text().length;return t.utils.NaNtoZero(r*n*.5)}return 0},t.utils.NaNtoZero=function(e){return!t.utils.isNumber(e)||isNaN(e)||null===e||e===1/0||e===-1/0?0:e},d3.selection.prototype.watchTransition=function(e){var t=[this].concat([].slice.call(arguments,1));return e.transition.apply(e,t)},t.utils.renderWatch=function(e,n){if(!(this instanceof t.utils.renderWatch))return new t.utils.renderWatch(e,n);var r=void 0!==n?n:250,i=[],o=this;this.models=function(e){return(e=[].slice.call(arguments,0)).forEach((function(e){var t;e.__rendered=!1,(t=e).dispatch.on("renderEnd",(function(e){t.__rendered=!0,o.renderEnd("model")})),i.indexOf(e)<0&&i.push(e)})),this},this.reset=function(e){void 0!==e&&(r=e),i=[]},this.transition=function(e,t,n){if(n=(t=arguments.length>1?[].slice.call(arguments,1):[]).length>1?t.pop():void 0!==r?r:250,e.__rendered=!1,i.indexOf(e)<0&&i.push(e),0===n)return e.__rendered=!0,e.delay=function(){return this},e.duration=function(){return this},e;0===e.length||e.every((function(e){return!e.length}))?e.__rendered=!0:e.__rendered=!1;var a=0;return e.transition().duration(n).each((function(){++a})).each("end",(function(n,r){0==--a&&(e.__rendered=!0,o.renderEnd.apply(this,t))}))},this.renderEnd=function(){i.every((function(e){return e.__rendered}))&&(i.forEach((function(e){e.__rendered=!1})),e.renderEnd.apply(this,arguments))}},t.utils.deepExtend=function(e){var n=arguments.length>1?[].slice.call(arguments,1):[];n.forEach((function(n){for(var r in n){var i=t.utils.isArray(e[r]),o=t.utils.isObject(e[r]),a=t.utils.isObject(n[r]);o&&!i&&a?t.utils.deepExtend(e[r],n[r]):e[r]=n[r]}}))},t.utils.state=function(){if(!(this instanceof t.utils.state))return new t.utils.state;var e={},n=function(){},r=function(){return{}},i=null;this.dispatch=d3.dispatch("change","set"),this.dispatch.on("set",(function(e){n(e,!0)})),this.getter=function(e){return r=e,this},this.setter=function(e,t){return t||(t=function(){}),n=function(n,r){e(n),r&&t()},this},this.init=function(e){i=i||{},t.utils.deepExtend(i,e)};var o=function(){var t=r();if(JSON.stringify(t)===JSON.stringify(e))return!1;for(var n in t)void 0===e[n]&&(e[n]={}),e[n]=t[n];return!0};this.update=function(){i&&(n(i,!1),i=null),o.call(this)&&this.dispatch.change(e)}},t.utils.optionsFunc=function(e){return e&&d3.map(e).forEach(function(e,n){t.utils.isFunction(this[e])&&this[e](n)}.bind(this)),this},t.utils.calcTicksX=function(e,n){for(var r=1,i=0;i<n.length;i+=1){var o=n[i]&&n[i].values?n[i].values.length:0;r=o>r?o:r}return t.log("Requested number of ticks: ",e),t.log("Calculated max values to be: ",r),e=(e=e>r?e=r-1:e)<1?1:e,e=Math.floor(e),t.log("Calculating tick count as: ",e),e},t.utils.calcTicksY=function(e,n){return t.utils.calcTicksX(e,n)},t.utils.initOption=function(e,t){e._calls&&e._calls[t]?e[t]=e._calls[t]:(e[t]=function(n){return arguments.length?(e._overrides[t]=!0,e._options[t]=n,e):e._options[t]},e["_"+t]=function(n){return arguments.length?(e._overrides[t]||(e._options[t]=n),e):e._options[t]})},t.utils.initOptions=function(e){e._overrides=e._overrides||{};var n=Object.getOwnPropertyNames(e._options||{}),r=Object.getOwnPropertyNames(e._calls||{});for(var i in n=n.concat(r))t.utils.initOption(e,n[i])},t.utils.inheritOptionsD3=function(e,t,n){e._d3options=n.concat(e._d3options||[]),e._d3options=(e._d3options||[]).filter((function(e,t,n){return n.indexOf(e)===t})),n.unshift(t),n.unshift(e),d3.rebind.apply(this,n)},t.utils.arrayUnique=function(e){return e.sort().filter((function(t,n){return!n||t!=e[n-1]}))},t.utils.symbolMap=d3.map(),t.utils.symbol=function(){var e,n=64;function r(r,i){var o=e.call(this,r,i),a=n.call(this,r,i);return-1!==d3.svg.symbolTypes.indexOf(o)?d3.svg.symbol().type(o).size(a)():t.utils.symbolMap.get(o)(a)}return r.type=function(t){return arguments.length?(e=d3.functor(t),r):e},r.size=function(e){return arguments.length?(n=d3.functor(e),r):n},r},t.utils.inheritOptions=function(e,n){var r=Object.getOwnPropertyNames(n._options||{}),i=Object.getOwnPropertyNames(n._calls||{}),o=n._inherited||[],a=n._d3options||[],s=r.concat(i).concat(o).concat(a);s.unshift(n),s.unshift(e),d3.rebind.apply(this,s),e._inherited=t.utils.arrayUnique(r.concat(i).concat(o).concat(r).concat(e._inherited||[])),e._d3options=t.utils.arrayUnique(a.concat(e._d3options||[]))},t.utils.initSVG=function(e){e.classed({"nvd3-svg":!0})},t.utils.sanitizeHeight=function(e,t){return e||parseInt(t.style("height"),10)||400},t.utils.sanitizeWidth=function(e,t){return e||parseInt(t.style("width"),10)||960},t.utils.availableHeight=function(e,n,r){return Math.max(0,t.utils.sanitizeHeight(e,n)-r.top-r.bottom)},t.utils.availableWidth=function(e,n,r){return Math.max(0,t.utils.sanitizeWidth(e,n)-r.left-r.right)},t.utils.noData=function(e,n){var r=e.options(),i=r.margin(),o=r.noData(),a=null==o?["No Data Available."]:[o],s=t.utils.availableHeight(null,n,i),l=t.utils.availableWidth(null,n,i),u=i.left+l/2,c=i.top+s/2;n.selectAll("g").remove();var d=n.selectAll(".nv-noData").data(a);d.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),d.attr("x",u).attr("y",c).text((function(e){return e}))},t.utils.wrapTicks=function(e,t){e.each((function(){for(var e,n=d3.select(this),r=n.text().split(/\s+/).reverse(),i=[],o=0,a=n.attr("y"),s=parseFloat(n.attr("dy")),l=n.text(null).append("tspan").attr("x",0).attr("y",a).attr("dy",s+"em");e=r.pop();)i.push(e),l.text(i.join(" ")),l.node().getComputedTextLength()>t&&(i.pop(),l.text(i.join(" ")),i=[e],l=n.append("tspan").attr("x",0).attr("y",a).attr("dy",1.1*++o+s+"em").text(e))}))},t.utils.arrayEquals=function(e,n){if(e===n)return!0;if(!e||!n)return!1;if(e.length!=n.length)return!1;for(var r=0,i=e.length;r<i;r++)if(e[r]instanceof Array&&n[r]instanceof Array){if(!t.arrayEquals(e[r],n[r]))return!1}else if(e[r]!=n[r])return!1;return!0},t.utils.pointIsInArc=function(e,t,n){var r=n.innerRadius()(t),i=n.outerRadius()(t),o=n.startAngle()(t),a=n.endAngle()(t),s=e.x*e.x+e.y*e.y,l=Math.atan2(e.x,-e.y);return l=l<0?l+2*Math.PI:l,r*r<=s&&s<=i*i&&o<=l&&l<=a},t.models.axis=function(){"use strict";var e,n,r=d3.svg.axis(),i=d3.scale.linear(),o={top:0,right:0,bottom:0,left:0},a=75,s=60,l=null,u=!0,c=0,d=!0,p=!1,f=!1,h=null,g=0,m=void 0,v=250,y=d3.dispatch("renderEnd");r.scale(i).orient("bottom").tickFormat((function(e){return e}));var x=t.utils.renderWatch(y,v);function b(s){return x.reset(),s.each((function(s){var v=d3.select(this);t.utils.initSVG(v);var y=v.selectAll("g.nv-wrap.nv-axis").data([s]),b=(y.enter().append("g").attr("class","nvd3 nv-wrap nv-axis").append("g"),y.select("g"));null!==h?r.ticks(h):"top"!=r.orient()&&"bottom"!=r.orient()||r.ticks(Math.abs(i.range()[1]-i.range()[0])/100),b.watchTransition(x,"axis").call(r),n=n||r.scale();var E=r.tickFormat();null==E&&(E=n.tickFormat());var C,T,S,w=b.selectAll("text.nv-axislabel").data([l||null]);switch(w.exit().remove(),void 0!==m&&b.selectAll("g").select("text").style("font-size",m),r.orient()){case"top":w.enter().append("text").attr("class","nv-axislabel"),S=0,1===i.range().length?S=f?2*i.range()[0]+i.rangeBand():0:2===i.range().length?S=f?i.range()[0]+i.range()[1]+i.rangeBand():i.range()[1]:i.range().length>2&&(S=i.range()[i.range().length-1]+(i.range()[1]-i.range()[0])),w.attr("text-anchor","middle").attr("y",0).attr("x",S/2),u&&((T=y.selectAll("g.nv-axisMaxMin").data(i.domain())).enter().append("g").attr("class",(function(e,t){return["nv-axisMaxMin","nv-axisMaxMin-x",0==t?"nv-axisMin-x":"nv-axisMax-x"].join(" ")})).append("text"),T.exit().remove(),T.attr("transform",(function(e,n){return"translate("+t.utils.NaNtoZero(i(e))+",0)"})).select("text").attr("dy","-0.5em").attr("y",-r.tickPadding()).attr("text-anchor","middle").text((function(t,n){var r=(e||E)(t);return(""+r).match("NaN")?"":r})),T.watchTransition(x,"min-max top").attr("transform",(function(e,n){return"translate("+t.utils.NaNtoZero(i.range()[n])+",0)"})));break;case"bottom":C=g+36;var N=30,L=0,A=b.selectAll("g").select("text"),I="";if(c%360){A.attr("transform",""),A.each((function(e,t){var n=this.getBoundingClientRect(),r=n.width;L=n.height,r>N&&(N=r)})),I="rotate("+c+" 0,"+(L/2+r.tickPadding())+")";var R=Math.abs(Math.sin(c*Math.PI/180));C=(R?R*N:N)+30,A.attr("transform",I).style("text-anchor",c%360>0?"start":"end")}else p?A.attr("transform",(function(e,t){return"translate(0,"+(t%2==0?"0":"12")+")"})):A.attr("transform","translate(0,0)");w.enter().append("text").attr("class","nv-axislabel"),S=0,1===i.range().length?S=f?2*i.range()[0]+i.rangeBand():0:2===i.range().length?S=f?i.range()[0]+i.range()[1]+i.rangeBand():i.range()[1]:i.range().length>2&&(S=i.range()[i.range().length-1]+(i.range()[1]-i.range()[0])),w.attr("text-anchor","middle").attr("y",C).attr("x",S/2),u&&((T=y.selectAll("g.nv-axisMaxMin").data([i.domain()[0],i.domain()[i.domain().length-1]])).enter().append("g").attr("class",(function(e,t){return["nv-axisMaxMin","nv-axisMaxMin-x",0==t?"nv-axisMin-x":"nv-axisMax-x"].join(" ")})).append("text"),T.exit().remove(),T.attr("transform",(function(e,n){return"translate("+t.utils.NaNtoZero(i(e)+(f?i.rangeBand()/2:0))+",0)"})).select("text").attr("dy",".71em").attr("y",r.tickPadding()).attr("transform",I).style("text-anchor",c?c%360>0?"start":"end":"middle").text((function(t,n){var r=(e||E)(t);return(""+r).match("NaN")?"":r})),T.watchTransition(x,"min-max bottom").attr("transform",(function(e,n){return"translate("+t.utils.NaNtoZero(i(e)+(f?i.rangeBand()/2:0))+",0)"})));break;case"right":w.enter().append("text").attr("class","nv-axislabel"),w.style("text-anchor",d?"middle":"begin").attr("transform",d?"rotate(90)":"").attr("y",d?12-Math.max(o.right,a)-(g||0):-10).attr("x",d?d3.max(i.range())/2:r.tickPadding()),u&&((T=y.selectAll("g.nv-axisMaxMin").data(i.domain())).enter().append("g").attr("class",(function(e,t){return["nv-axisMaxMin","nv-axisMaxMin-y",0==t?"nv-axisMin-y":"nv-axisMax-y"].join(" ")})).append("text").style("opacity",0),T.exit().remove(),T.attr("transform",(function(e,n){return"translate(0,"+t.utils.NaNtoZero(i(e))+")"})).select("text").attr("dy",".32em").attr("y",0).attr("x",r.tickPadding()).style("text-anchor","start").text((function(t,n){var r=(e||E)(t);return(""+r).match("NaN")?"":r})),T.watchTransition(x,"min-max right").attr("transform",(function(e,n){return"translate(0,"+t.utils.NaNtoZero(i.range()[n])+")"})).select("text").style("opacity",1));break;case"left":w.enter().append("text").attr("class","nv-axislabel"),w.style("text-anchor",d?"middle":"end").attr("transform",d?"rotate(-90)":"").attr("y",d?25-Math.max(o.left,a)-(g||0):-10).attr("x",d?-d3.max(i.range())/2:-r.tickPadding()),u&&((T=y.selectAll("g.nv-axisMaxMin").data(i.domain())).enter().append("g").attr("class",(function(e,t){return["nv-axisMaxMin","nv-axisMaxMin-y",0==t?"nv-axisMin-y":"nv-axisMax-y"].join(" ")})).append("text").style("opacity",0),T.exit().remove(),T.attr("transform",(function(e,r){return"translate(0,"+t.utils.NaNtoZero(n(e))+")"})).select("text").attr("dy",".32em").attr("y",0).attr("x",-r.tickPadding()).attr("text-anchor","end").text((function(t,n){var r=(e||E)(t);return(""+r).match("NaN")?"":r})),T.watchTransition(x,"min-max right").attr("transform",(function(e,n){return"translate(0,"+t.utils.NaNtoZero(i.range()[n])+")"})).select("text").style("opacity",1))}if(w.text((function(e){return e})),!u||"left"!==r.orient()&&"right"!==r.orient()||(b.selectAll("g").each((function(e,t){d3.select(this).select("text").attr("opacity",1),(i(e)<i.range()[1]+10||i(e)>i.range()[0]-10)&&((e>1e-10||e<-1e-10)&&d3.select(this).attr("opacity",0),d3.select(this).select("text").attr("opacity",0))})),i.domain()[0]==i.domain()[1]&&0==i.domain()[0]&&y.selectAll("g.nv-axisMaxMin").style("opacity",(function(e,t){return t?0:1}))),u&&("top"===r.orient()||"bottom"===r.orient())){var k=[];y.selectAll("g.nv-axisMaxMin").each((function(e,t){try{t?k.push(i(e)-this.getBoundingClientRect().width-4):k.push(i(e)+this.getBoundingClientRect().width+4)}catch(n){t?k.push(i(e)-4):k.push(i(e)+4)}})),b.selectAll("g").each((function(e,t){(i(e)<k[0]||i(e)>k[1])&&(e>1e-10||e<-1e-10?d3.select(this).remove():d3.select(this).select("text").remove())}))}b.selectAll(".tick").filter((function(e){return!parseFloat(Math.round(1e5*e)/1e6)&&void 0!==e})).classed("zero",!0),n=i.copy()})),x.renderEnd("axis immediate"),b}return b.axis=r,b.dispatch=y,b.options=t.utils.optionsFunc.bind(b),b._options=Object.create({},{axisLabelDistance:{get:function(){return g},set:function(e){g=e}},staggerLabels:{get:function(){return p},set:function(e){p=e}},rotateLabels:{get:function(){return c},set:function(e){c=e}},rotateYLabel:{get:function(){return d},set:function(e){d=e}},showMaxMin:{get:function(){return u},set:function(e){u=e}},axisLabel:{get:function(){return l},set:function(e){l=e}},height:{get:function(){return s},set:function(e){s=e}},ticks:{get:function(){return h},set:function(e){h=e}},width:{get:function(){return a},set:function(e){a=e}},fontSize:{get:function(){return m},set:function(e){m=e}},tickFormatMaxMin:{get:function(){return e},set:function(t){e=t}},margin:{get:function(){return o},set:function(e){o.top=void 0!==e.top?e.top:o.top,o.right=void 0!==e.right?e.right:o.right,o.bottom=void 0!==e.bottom?e.bottom:o.bottom,o.left=void 0!==e.left?e.left:o.left}},duration:{get:function(){return v},set:function(e){v=e,x.reset(v)}},scale:{get:function(){return i},set:function(e){i=e,r.scale(i),f="function"==typeof i.rangeBands,t.utils.inheritOptionsD3(b,i,["domain","range","rangeBand","rangeBands"])}}}),t.utils.initOptions(b),t.utils.inheritOptionsD3(b,r,["orient","tickValues","tickSubdivide","tickSize","tickPadding","tickFormat"]),t.utils.inheritOptionsD3(b,i,["domain","range","rangeBand","rangeBands"]),b},t.models.boxPlot=function(){"use strict";var e,n,r,i,o,a,s={top:0,right:0,bottom:0,left:0},l=960,u=500,c=Math.floor(1e4*Math.random()),d=d3.scale.ordinal(),p=d3.scale.linear(),f=function(e){return e.label},h=function(e){return e.values.Q1},g=function(e){return e.values.Q2},m=function(e){return e.values.Q3},v=function(e){return e.values.whisker_low},y=function(e){return e.values.whisker_high},x=function(e){return e.color},b=function(e){return e.values.outliers},E=function(e,t,n){return e},C=function(e,t,n){return e},T=function(e,t,n){},S=t.utils.defaultColor(),w=null,N=d3.dispatch("elementMouseover","elementMouseout","elementMousemove","renderEnd"),L=250,A=null,I=t.utils.renderWatch(N,L);function R(c){return I.reset(),c.each((function(c){var R=l-s.left-s.right,k=u-s.top-s.bottom;w=d3.select(this),t.utils.initSVG(w),d.domain(e||c.map((function(e,t){return f(e,t)}))).rangeBands(n||[0,R],.1);var _=[];if(!r){var O=[];c.forEach((function(e,t){var n=h(e),r=m(e),i=v(e),o=y(e),a=b(e);a&&a.forEach((function(e,t){O.push(E(e,t,void 0))})),i&&O.push(i),n&&O.push(n),r&&O.push(r),o&&O.push(o)})),_=[d3.min(O),d3.max(O)]}p.domain(r||_),p.range(i||[k,0]),o=o||d,a=a||p.copy().range([p(0),p(0)]);var D=w.selectAll("g.nv-wrap").data([c]);D.enter().append("g").attr("class","nvd3 nv-wrap"),D.attr("transform","translate("+s.left+","+s.top+")");var M=D.selectAll(".nv-boxplot").data((function(e){return e})),P=M.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6);M.attr("class","nv-boxplot").attr("transform",(function(e,t,n){return"translate("+(d(f(e,t))+.05*d.rangeBand())+", 0)"})).classed("hover",(function(e){return e.hover})),M.watchTransition(I,"nv-boxplot: boxplots").style("stroke-opacity",1).style("fill-opacity",.75).delay((function(e,t){return t*L/c.length})).attr("transform",(function(e,t){return"translate("+(d(f(e,t))+.05*d.rangeBand())+", 0)"})),M.exit().remove(),P.each((function(e,t){var n=d3.select(this);[v,y].forEach((function(r){if(void 0!==r(e)&&null!==r(e)){var i=r===v?"low":"high";n.append("line").style("stroke",x(e)||S(e,t)).attr("class","nv-boxplot-whisker nv-boxplot-"+i),n.append("line").style("stroke",x(e)||S(e,t)).attr("class","nv-boxplot-tick nv-boxplot-"+i)}}))}));var F=function(){return null===A?.9*d.rangeBand():Math.min(75,.9*d.rangeBand())},j=function(){return.45*d.rangeBand()-F()/2},B=function(){return.45*d.rangeBand()+F()/2};[v,y].forEach((function(e){var t=e===v?"low":"high",n=e===v?h:m;M.select("line.nv-boxplot-whisker.nv-boxplot-"+t).watchTransition(I,"nv-boxplot: boxplots").attr("x1",.45*d.rangeBand()).attr("y1",(function(t,n){return p(e(t))})).attr("x2",.45*d.rangeBand()).attr("y2",(function(e,t){return p(n(e))})),M.select("line.nv-boxplot-tick.nv-boxplot-"+t).watchTransition(I,"nv-boxplot: boxplots").attr("x1",j).attr("y1",(function(t,n){return p(e(t))})).attr("x2",B).attr("y2",(function(t,n){return p(e(t))}))})),[v,y].forEach((function(e){var t=e===v?"low":"high";P.selectAll(".nv-boxplot-"+t).on("mouseover",(function(t,n,r){d3.select(this).classed("hover",!0),N.elementMouseover({series:{key:e(t),color:x(t)||S(t,r)},e:d3.event})})).on("mouseout",(function(t,n,r){d3.select(this).classed("hover",!1),N.elementMouseout({series:{key:e(t),color:x(t)||S(t,r)},e:d3.event})})).on("mousemove",(function(e,t){N.elementMousemove({e:d3.event})}))})),P.append("rect").attr("class","nv-boxplot-box").on("mouseover",(function(e,t){d3.select(this).classed("hover",!0),N.elementMouseover({key:f(e),value:f(e),series:[{key:"Q3",value:m(e),color:x(e)||S(e,t)},{key:"Q2",value:g(e),color:x(e)||S(e,t)},{key:"Q1",value:h(e),color:x(e)||S(e,t)}],data:e,index:t,e:d3.event})})).on("mouseout",(function(e,t){d3.select(this).classed("hover",!1),N.elementMouseout({key:f(e),value:f(e),series:[{key:"Q3",value:m(e),color:x(e)||S(e,t)},{key:"Q2",value:g(e),color:x(e)||S(e,t)},{key:"Q1",value:h(e),color:x(e)||S(e,t)}],data:e,index:t,e:d3.event})})).on("mousemove",(function(e,t){N.elementMousemove({e:d3.event})})),M.select("rect.nv-boxplot-box").watchTransition(I,"nv-boxplot: boxes").attr("y",(function(e,t){return p(m(e))})).attr("width",F).attr("x",j).attr("height",(function(e,t){return Math.abs(p(m(e))-p(h(e)))||1})).style("fill",(function(e,t){return x(e)||S(e,t)})).style("stroke",(function(e,t){return x(e)||S(e,t)})),P.append("line").attr("class","nv-boxplot-median"),M.select("line.nv-boxplot-median").watchTransition(I,"nv-boxplot: boxplots line").attr("x1",j).attr("y1",(function(e,t){return p(g(e))})).attr("x2",B).attr("y2",(function(e,t){return p(g(e))}));var H=M.selectAll(".nv-boxplot-outlier").data((function(e){return b(e)||[]}));H.enter().append("circle").style("fill",(function(e,t,n){return T(e,t,n)||S(e,n)})).style("stroke",(function(e,t,n){return T(e,t,n)||S(e,n)})).style("z-index",9e3).on("mouseover",(function(e,t,n){d3.select(this).classed("hover",!0),N.elementMouseover({series:{key:C(e,t,n),color:T(e,t,n)||S(e,n)},e:d3.event})})).on("mouseout",(function(e,t,n){d3.select(this).classed("hover",!1),N.elementMouseout({series:{key:C(e,t,n),color:T(e,t,n)||S(e,n)},e:d3.event})})).on("mousemove",(function(e,t){N.elementMousemove({e:d3.event})})),H.attr("class","nv-boxplot-outlier"),H.watchTransition(I,"nv-boxplot: nv-boxplot-outlier").attr("cx",.45*d.rangeBand()).attr("cy",(function(e,t,n){return p(E(e,t,n))})).attr("r","3"),H.exit().remove(),o=d.copy(),a=p.copy()})),I.renderEnd("nv-boxplot immediate"),R}return R.dispatch=N,R.options=t.utils.optionsFunc.bind(R),R._options=Object.create({},{width:{get:function(){return l},set:function(e){l=e}},height:{get:function(){return u},set:function(e){u=e}},maxBoxWidth:{get:function(){return A},set:function(e){A=e}},x:{get:function(){return f},set:function(e){f=e}},q1:{get:function(){return h},set:function(e){h=e}},q2:{get:function(){return g},set:function(e){g=e}},q3:{get:function(){return m},set:function(e){m=e}},wl:{get:function(){return v},set:function(e){v=e}},wh:{get:function(){return y},set:function(e){y=e}},itemColor:{get:function(){return x},set:function(e){x=e}},outliers:{get:function(){return b},set:function(e){b=e}},outlierValue:{get:function(){return E},set:function(e){E=e}},outlierLabel:{get:function(){return C},set:function(e){C=e}},outlierColor:{get:function(){return T},set:function(e){T=e}},xScale:{get:function(){return d},set:function(e){d=e}},yScale:{get:function(){return p},set:function(e){p=e}},xDomain:{get:function(){return e},set:function(t){e=t}},yDomain:{get:function(){return r},set:function(e){r=e}},xRange:{get:function(){return n},set:function(e){n=e}},yRange:{get:function(){return i},set:function(e){i=e}},id:{get:function(){return c},set:function(e){c=e}},y:{get:function(){return console.warn("BoxPlot 'y' chart option is deprecated. Please use model overrides instead."),{}},set:function(e){console.warn("BoxPlot 'y' chart option is deprecated. Please use model overrides instead.")}},margin:{get:function(){return s},set:function(e){s.top=void 0!==e.top?e.top:s.top,s.right=void 0!==e.right?e.right:s.right,s.bottom=void 0!==e.bottom?e.bottom:s.bottom,s.left=void 0!==e.left?e.left:s.left}},color:{get:function(){return S},set:function(e){S=t.utils.getColor(e)}},duration:{get:function(){return L},set:function(e){L=e,I.reset(L)}}}),t.utils.initOptions(R),R},t.models.boxPlotChart=function(){"use strict";var e,n,r=t.models.boxPlot(),i=t.models.axis(),o=t.models.axis(),a={top:15,right:10,bottom:50,left:60},s=null,l=null,u=t.utils.getColor(),c=!0,d=!0,p=!1,f=!1,h=t.models.tooltip(),g="No Data Available.",m=d3.dispatch("beforeUpdate","renderEnd"),v=250;i.orient("bottom").showMaxMin(!1).tickFormat((function(e){return e})),o.orient(p?"right":"left").tickFormat(d3.format(",.1f")),h.duration(0);var y=t.utils.renderWatch(m,v);function x(u){return y.reset(),y.models(r),c&&y.models(i),d&&y.models(o),u.each((function(u){var h=d3.select(this);t.utils.initSVG(h);var y=(s||parseInt(h.style("width"))||960)-a.left-a.right,b=(l||parseInt(h.style("height"))||400)-a.top-a.bottom;if(x.update=function(){m.beforeUpdate(),h.transition().duration(v).call(x)},x.container=this,!u||!u.length){var E=h.selectAll(".nv-noData").data([g]);return E.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),E.attr("x",a.left+y/2).attr("y",a.top+b/2).text((function(e){return e})),x}h.selectAll(".nv-noData").remove(),e=r.xScale(),n=r.yScale().clamp(!0);var C=h.selectAll("g.nv-wrap.nv-boxPlotWithAxes").data([u]),T=C.enter().append("g").attr("class","nvd3 nv-wrap nv-boxPlotWithAxes").append("g"),S=T.append("defs"),w=C.select("g");if(T.append("g").attr("class","nv-x nv-axis"),T.append("g").attr("class","nv-y nv-axis").append("g").attr("class","nv-zeroLine").append("line"),T.append("g").attr("class","nv-barsWrap"),w.attr("transform","translate("+a.left+","+a.top+")"),p&&w.select(".nv-y.nv-axis").attr("transform","translate("+y+",0)"),r.width(y).height(b),w.select(".nv-barsWrap").datum(u.filter((function(e){return!e.disabled}))).transition().call(r),S.append("clipPath").attr("id","nv-x-label-clip-"+r.id()).append("rect"),w.select("#nv-x-label-clip-"+r.id()+" rect").attr("width",e.rangeBand()*(f?2:1)).attr("height",16).attr("x",-e.rangeBand()/(f?1:2)),c){i.scale(e).ticks(t.utils.calcTicksX(y/100,u)).tickSize(-b,0),w.select(".nv-x.nv-axis").attr("transform","translate(0,"+n.range()[0]+")"),w.select(".nv-x.nv-axis").call(i);var N=w.select(".nv-x.nv-axis").selectAll("g");f&&N.selectAll("text").attr("transform",(function(e,t,n){return"translate(0,"+(n%2==0?"5":"17")+")"}))}d&&(o.scale(n).ticks(Math.floor(b/36)).tickSize(-y,0),w.select(".nv-y.nv-axis").call(o)),w.select(".nv-zeroLine line").attr("x1",0).attr("x2",y).attr("y1",n(0)).attr("y2",n(0))})),y.renderEnd("nv-boxplot chart immediate"),x}return r.dispatch.on("elementMouseover.tooltip",(function(e){h.data(e).hidden(!1)})),r.dispatch.on("elementMouseout.tooltip",(function(e){h.data(e).hidden(!0)})),r.dispatch.on("elementMousemove.tooltip",(function(e){h()})),x.dispatch=m,x.boxplot=r,x.xAxis=i,x.yAxis=o,x.tooltip=h,x.options=t.utils.optionsFunc.bind(x),x._options=Object.create({},{width:{get:function(){return s},set:function(e){s=e}},height:{get:function(){return l},set:function(e){l=e}},staggerLabels:{get:function(){return f},set:function(e){f=e}},showXAxis:{get:function(){return c},set:function(e){c=e}},showYAxis:{get:function(){return d},set:function(e){d=e}},tooltipContent:{get:function(){return h},set:function(e){h=e}},noData:{get:function(){return g},set:function(e){g=e}},margin:{get:function(){return a},set:function(e){a.top=void 0!==e.top?e.top:a.top,a.right=void 0!==e.right?e.right:a.right,a.bottom=void 0!==e.bottom?e.bottom:a.bottom,a.left=void 0!==e.left?e.left:a.left}},duration:{get:function(){return v},set:function(e){v=e,y.reset(v),r.duration(v),i.duration(v),o.duration(v)}},color:{get:function(){return u},set:function(e){u=t.utils.getColor(e),r.color(u)}},rightAlignYAxis:{get:function(){return p},set:function(e){p=e,o.orient(e?"right":"left")}}}),t.utils.inheritOptions(x,r),t.utils.initOptions(x),x},t.models.bullet=function(){"use strict";var e={top:0,right:0,bottom:0,left:0},n="left",r=!1,i=function(e){return e.ranges},o=function(e){return e.markers?e.markers:[]},a=function(e){return e.markerLines?e.markerLines:[0]},s=function(e){return e.measures},l=function(e){return e.rangeLabels?e.rangeLabels:[]},u=function(e){return e.markerLabels?e.markerLabels:[]},c=function(e){return e.markerLineLabels?e.markerLineLabels:[]},d=function(e){return e.measureLabels?e.measureLabels:[]},p=[0],f=380,h=30,g=null,m=null,v=t.utils.getColor(["#1f77b4"]),y=d3.dispatch("elementMouseover","elementMouseout","elementMousemove"),x=["Maximum","Mean","Minimum"],b=["Max","Avg","Min"],E=1e3;function C(e,t){var n=e.slice();e.sort((function(e,r){var i=n.indexOf(e),o=n.indexOf(r);return d3.descending(t[i],t[o])}))}function T(n){return n.each((function(n,m){var T=f-e.left-e.right,S=h-e.top-e.bottom;g=d3.select(this),t.utils.initSVG(g);var w=i.call(this,n,m).slice(),N=o.call(this,n,m).slice(),L=a.call(this,n,m).slice(),A=s.call(this,n,m).slice(),I=l.call(this,n,m).slice(),R=u.call(this,n,m).slice(),k=c.call(this,n,m).slice(),_=d.call(this,n,m).slice();C(I,w),C(R,N),C(k,L),C(_,A),w.sort(d3.descending),N.sort(d3.descending),L.sort(d3.descending),A.sort(d3.descending);var O=d3.scale.linear().domain(d3.extent(d3.merge([p,w]))).range(r?[T,0]:[0,T]);this.__chart__||d3.scale.linear().domain([0,1/0]).range(O.range()),this.__chart__=O,d3.min(w),d3.max(w),w[1];for(var D=g.selectAll("g.nv-wrap.nv-bullet").data([n]),M=D.enter().append("g").attr("class","nvd3 nv-wrap nv-bullet").append("g"),P=D.select("g"),F=(m=0,w.length);m<F;m++){var j="nv-range nv-range"+m;m<=2&&(j=j+" nv-range"+b[m]),M.append("rect").attr("class",j)}M.append("rect").attr("class","nv-measure"),D.attr("transform","translate("+e.left+","+e.top+")");var B=function(e){return Math.abs(O(e)-O(0))},H=function(e){return O(e<0?e:0)};for(m=0,F=w.length;m<F;m++){var G=w[m];P.select("rect.nv-range"+m).datum(G).attr("height",S).transition().duration(E).attr("width",B(G)).attr("x",H(G))}P.select("rect.nv-measure").style("fill",v).attr("height",S/3).attr("y",S/3).on("mouseover",(function(){y.elementMouseover({value:A[0],label:_[0]||"Current",color:d3.select(this).style("fill")})})).on("mousemove",(function(){y.elementMousemove({value:A[0],label:_[0]||"Current",color:d3.select(this).style("fill")})})).on("mouseout",(function(){y.elementMouseout({value:A[0],label:_[0]||"Current",color:d3.select(this).style("fill")})})).transition().duration(E).attr("width",A<0?O(0)-O(A[0]):O(A[0])-O(0)).attr("x",H(A));var U=S/6,V=N.map((function(e,t){return{value:e,label:R[t]}}));M.selectAll("path.nv-markerTriangle").data(V).enter().append("path").attr("class","nv-markerTriangle").attr("d","M0,"+U+"L"+U+","+-U+" "+-U+","+-U+"Z").on("mouseover",(function(e){y.elementMouseover({value:e.value,label:e.label||"Previous",color:d3.select(this).style("fill"),pos:[O(e.value),S/2]})})).on("mousemove",(function(e){y.elementMousemove({value:e.value,label:e.label||"Previous",color:d3.select(this).style("fill")})})).on("mouseout",(function(e,t){y.elementMouseout({value:e.value,label:e.label||"Previous",color:d3.select(this).style("fill")})})),P.selectAll("path.nv-markerTriangle").data(V).transition().duration(E).attr("transform",(function(e){return"translate("+O(e.value)+","+S/2+")"}));var W=L.map((function(e,t){return{value:e,label:k[t]}}));M.selectAll("line.nv-markerLine").data(W).enter().append("line").attr("cursor","").attr("class","nv-markerLine").attr("x1",(function(e){return O(e.value)})).attr("y1","2").attr("x2",(function(e){return O(e.value)})).attr("y2",S-2).on("mouseover",(function(e){y.elementMouseover({value:e.value,label:e.label||"Previous",color:d3.select(this).style("fill"),pos:[O(e.value),S/2]})})).on("mousemove",(function(e){y.elementMousemove({value:e.value,label:e.label||"Previous",color:d3.select(this).style("fill")})})).on("mouseout",(function(e,t){y.elementMouseout({value:e.value,label:e.label||"Previous",color:d3.select(this).style("fill")})})),P.selectAll("line.nv-markerLine").data(W).transition().duration(E).attr("x1",(function(e){return O(e.value)})).attr("x2",(function(e){return O(e.value)})),D.selectAll(".nv-range").on("mouseover",(function(e,t){var n=I[t]||x[t];y.elementMouseover({value:e,label:n,color:d3.select(this).style("fill")})})).on("mousemove",(function(){y.elementMousemove({value:A[0],label:_[0]||"Previous",color:d3.select(this).style("fill")})})).on("mouseout",(function(e,t){var n=I[t]||x[t];y.elementMouseout({value:e,label:n,color:d3.select(this).style("fill")})}))})),T}return T.dispatch=y,T.options=t.utils.optionsFunc.bind(T),T._options=Object.create({},{ranges:{get:function(){return i},set:function(e){i=e}},markers:{get:function(){return o},set:function(e){o=e}},measures:{get:function(){return s},set:function(e){s=e}},forceX:{get:function(){return p},set:function(e){p=e}},width:{get:function(){return f},set:function(e){f=e}},height:{get:function(){return h},set:function(e){h=e}},tickFormat:{get:function(){return m},set:function(e){m=e}},duration:{get:function(){return E},set:function(e){E=e}},margin:{get:function(){return e},set:function(t){e.top=void 0!==t.top?t.top:e.top,e.right=void 0!==t.right?t.right:e.right,e.bottom=void 0!==t.bottom?t.bottom:e.bottom,e.left=void 0!==t.left?t.left:e.left}},orient:{get:function(){return n},set:function(e){r="right"==(n=e)||"bottom"==n}},color:{get:function(){return v},set:function(e){v=t.utils.getColor(e)}}}),t.utils.initOptions(T),T},t.models.bulletChart=function(){"use strict";var e=t.models.bullet(),n=t.models.tooltip(),r="left",i=!1,o={top:5,right:40,bottom:20,left:120},a=function(e){return e.ranges},s=function(e){return e.markers?e.markers:[]},l=function(e){return e.measures},u=null,c=55,d=null,p=null,f=null,h=d3.dispatch();function g(n){return n.each((function(r,f){var h=d3.select(this);t.utils.initSVG(h);var m=t.utils.availableWidth(u,h,o),v=c-o.top-o.bottom;if(g.update=function(){g(n)},g.container=this,!r||!a.call(this,r,f))return t.utils.noData(g,h),g;h.selectAll(".nv-noData").remove();var y=a.call(this,r,f).slice().sort(d3.descending),x=s.call(this,r,f).slice().sort(d3.descending),b=l.call(this,r,f).slice().sort(d3.descending),E=h.selectAll("g.nv-wrap.nv-bulletChart").data([r]),C=E.enter().append("g").attr("class","nvd3 nv-wrap nv-bulletChart").append("g"),T=E.select("g");C.append("g").attr("class","nv-bulletWrap"),C.append("g").attr("class","nv-titles"),E.attr("transform","translate("+o.left+","+o.top+")");var S=d3.scale.linear().domain([0,Math.max(y[0],x[0]||0,b[0])]).range(i?[m,0]:[0,m]),w=this.__chart__||d3.scale.linear().domain([0,1/0]).range(S.range());this.__chart__=S;var N=C.select(".nv-titles").append("g").attr("text-anchor","end").attr("transform","translate(-6,"+(c-o.top-o.bottom)/2+")");N.append("text").attr("class","nv-title").text((function(e){return e.title})),N.append("text").attr("class","nv-subtitle").attr("dy","1em").text((function(e){return e.subtitle})),e.width(m).height(v);var L=T.select(".nv-bulletWrap");d3.transition(L).call(e);var A=d||S.tickFormat(m/100),I=T.selectAll("g.nv-tick").data(S.ticks(p||m/50),(function(e){return this.textContent||A(e)})),R=I.enter().append("g").attr("class","nv-tick").attr("transform",(function(e){return"translate("+w(e)+",0)"})).style("opacity",1e-6);R.append("line").attr("y1",v).attr("y2",7*v/6),R.append("text").attr("text-anchor","middle").attr("dy","1em").attr("y",7*v/6).text(A);var k=d3.transition(I).transition().duration(e.duration()).attr("transform",(function(e){return"translate("+S(e)+",0)"})).style("opacity",1);k.select("line").attr("y1",v).attr("y2",7*v/6),k.select("text").attr("y",7*v/6),d3.transition(I.exit()).transition().duration(e.duration()).attr("transform",(function(e){return"translate("+S(e)+",0)"})).style("opacity",1e-6).remove()})),d3.timer.flush(),g}return n.duration(0).headerEnabled(!1),e.dispatch.on("elementMouseover.tooltip",(function(e){e.series={key:e.label,value:e.value,color:e.color},n.data(e).hidden(!1)})),e.dispatch.on("elementMouseout.tooltip",(function(e){n.hidden(!0)})),e.dispatch.on("elementMousemove.tooltip",(function(e){n()})),g.bullet=e,g.dispatch=h,g.tooltip=n,g.options=t.utils.optionsFunc.bind(g),g._options=Object.create({},{ranges:{get:function(){return a},set:function(e){a=e}},markers:{get:function(){return s},set:function(e){s=e}},measures:{get:function(){return l},set:function(e){l=e}},width:{get:function(){return u},set:function(e){u=e}},height:{get:function(){return c},set:function(e){c=e}},tickFormat:{get:function(){return d},set:function(e){d=e}},ticks:{get:function(){return p},set:function(e){p=e}},noData:{get:function(){return f},set:function(e){f=e}},margin:{get:function(){return o},set:function(e){o.top=void 0!==e.top?e.top:o.top,o.right=void 0!==e.right?e.right:o.right,o.bottom=void 0!==e.bottom?e.bottom:o.bottom,o.left=void 0!==e.left?e.left:o.left}},orient:{get:function(){return r},set:function(e){i="right"==(r=e)||"bottom"==r}}}),t.utils.inheritOptions(g,e),t.utils.initOptions(g),g},t.models.candlestickBar=function(){"use strict";var e,n,r,i,o,a={top:0,right:0,bottom:0,left:0},s=null,l=null,u=Math.floor(1e4*Math.random()),c=d3.scale.linear(),d=d3.scale.linear(),p=function(e){return e.x},f=function(e){return e.y},h=function(e){return e.open},g=function(e){return e.close},m=function(e){return e.high},v=function(e){return e.low},y=[],x=[],b=!1,E=!0,C=t.utils.defaultColor(),T=!1,S=d3.dispatch("stateChange","changeState","renderEnd","chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout","elementMousemove");function w(C){return C.each((function(C){e=d3.select(this);var T=t.utils.availableWidth(s,e,a),w=t.utils.availableHeight(l,e,a);t.utils.initSVG(e);var N=T/C[0].values.length*.45;c.domain(n||d3.extent(C[0].values.map(p).concat(y))),b?c.range(i||[.5*T/C[0].values.length,T*(C[0].values.length-.5)/C[0].values.length]):c.range(i||[5+N/2,T-N/2-5]),d.domain(r||[d3.min(C[0].values.map(v).concat(x)),d3.max(C[0].values.map(m).concat(x))]).range(o||[w,0]),c.domain()[0]===c.domain()[1]&&(c.domain()[0]?c.domain([c.domain()[0]-.01*c.domain()[0],c.domain()[1]+.01*c.domain()[1]]):c.domain([-1,1])),d.domain()[0]===d.domain()[1]&&(d.domain()[0]?d.domain([d.domain()[0]+.01*d.domain()[0],d.domain()[1]-.01*d.domain()[1]]):d.domain([-1,1]));var L=d3.select(this).selectAll("g.nv-wrap.nv-candlestickBar").data([C[0].values]),A=L.enter().append("g").attr("class","nvd3 nv-wrap nv-candlestickBar"),I=A.append("defs"),R=A.append("g"),k=L.select("g");R.append("g").attr("class","nv-ticks"),L.attr("transform","translate("+a.left+","+a.top+")"),e.on("click",(function(e,t){S.chartClick({data:e,index:t,pos:d3.event,id:u})})),I.append("clipPath").attr("id","nv-chart-clip-path-"+u).append("rect"),L.select("#nv-chart-clip-path-"+u+" rect").attr("width",T).attr("height",w),k.attr("clip-path",E?"url(#nv-chart-clip-path-"+u+")":"");var _=L.select(".nv-ticks").selectAll(".nv-tick").data((function(e){return e}));_.exit().remove();var O=_.enter().append("g");_.attr("class",(function(e,t,n){return(h(e,t)>g(e,t)?"nv-tick negative":"nv-tick positive")+" nv-tick-"+n+"-"+t})),O.append("line").attr("class","nv-candlestick-lines").attr("transform",(function(e,t){return"translate("+c(p(e,t))+",0)"})).attr("x1",0).attr("y1",(function(e,t){return d(m(e,t))})).attr("x2",0).attr("y2",(function(e,t){return d(v(e,t))})),O.append("rect").attr("class","nv-candlestick-rects nv-bars").attr("transform",(function(e,t){return"translate("+(c(p(e,t))-N/2)+","+(d(f(e,t))-(h(e,t)>g(e,t)?d(g(e,t))-d(h(e,t)):0))+")"})).attr("x",0).attr("y",0).attr("width",N).attr("height",(function(e,t){var n=h(e,t),r=g(e,t);return n>r?d(r)-d(n):d(n)-d(r)})),_.select(".nv-candlestick-lines").transition().attr("transform",(function(e,t){return"translate("+c(p(e,t))+",0)"})).attr("x1",0).attr("y1",(function(e,t){return d(m(e,t))})).attr("x2",0).attr("y2",(function(e,t){return d(v(e,t))})),_.select(".nv-candlestick-rects").transition().attr("transform",(function(e,t){return"translate("+(c(p(e,t))-N/2)+","+(d(f(e,t))-(h(e,t)>g(e,t)?d(g(e,t))-d(h(e,t)):0))+")"})).attr("x",0).attr("y",0).attr("width",N).attr("height",(function(e,t){var n=h(e,t),r=g(e,t);return n>r?d(r)-d(n):d(n)-d(r)}))})),w}return w.highlightPoint=function(t,n){w.clearHighlights(),e.select(".nv-candlestickBar .nv-tick-0-"+t).classed("hover",n)},w.clearHighlights=function(){e.select(".nv-candlestickBar .nv-tick.hover").classed("hover",!1)},w.dispatch=S,w.options=t.utils.optionsFunc.bind(w),w._options=Object.create({},{width:{get:function(){return s},set:function(e){s=e}},height:{get:function(){return l},set:function(e){l=e}},xScale:{get:function(){return c},set:function(e){c=e}},yScale:{get:function(){return d},set:function(e){d=e}},xDomain:{get:function(){return n},set:function(e){n=e}},yDomain:{get:function(){return r},set:function(e){r=e}},xRange:{get:function(){return i},set:function(e){i=e}},yRange:{get:function(){return o},set:function(e){o=e}},forceX:{get:function(){return y},set:function(e){y=e}},forceY:{get:function(){return x},set:function(e){x=e}},padData:{get:function(){return b},set:function(e){b=e}},clipEdge:{get:function(){return E},set:function(e){E=e}},id:{get:function(){return u},set:function(e){u=e}},interactive:{get:function(){return T},set:function(e){T=e}},x:{get:function(){return p},set:function(e){p=e}},y:{get:function(){return f},set:function(e){f=e}},open:{get:function(){return h()},set:function(e){h=e}},close:{get:function(){return g()},set:function(e){g=e}},high:{get:function(){return m},set:function(e){m=e}},low:{get:function(){return v},set:function(e){v=e}},margin:{get:function(){return a},set:function(e){a.top=null!=e.top?e.top:a.top,a.right=null!=e.right?e.right:a.right,a.bottom=null!=e.bottom?e.bottom:a.bottom,a.left=null!=e.left?e.left:a.left}},color:{get:function(){return C},set:function(e){C=t.utils.getColor(e)}}}),t.utils.initOptions(w),w},t.models.cumulativeLineChart=function(){"use strict";var e,n,r=t.models.line(),i=t.models.axis(),o=t.models.axis(),a=t.models.legend(),s=t.models.legend(),l=t.interactiveGuideline(),u=t.models.tooltip(),c={top:30,right:30,bottom:50,left:60},d=null,p=t.utils.defaultColor(),f=null,h=null,g=!0,m=!0,v=!0,y=!1,x=!0,b=!1,E=!0,C=r.id(),T=t.utils.state(),S=null,w=null,N=function(e){return e.average},L=d3.dispatch("stateChange","changeState","renderEnd"),A=250,I=!1;T.index=0,T.rescaleY=E,i.orient("bottom").tickPadding(7),o.orient(y?"right":"left"),u.valueFormatter((function(e,t){return o.tickFormat()(e,t)})).headerFormatter((function(e,t){return i.tickFormat()(e,t)})),s.updateState(!1);var R,k=d3.scale.linear(),_={i:0,x:0},O=t.utils.renderWatch(L,A);function D(u){return O.reset(),O.models(r),m&&O.models(i),v&&O.models(o),u.each((function(u){var w=d3.select(this);t.utils.initSVG(w),w.classed("nv-chart-"+C,!0);var O,F=t.utils.availableWidth(f,w,c),j=t.utils.availableHeight(h,w,c);if(D.update=function(){0===A?w.call(D):w.transition().duration(A).call(D)},D.container=this,T.setter(function(e){return function(t){void 0!==t.index&&(_.i=t.index),void 0!==t.rescaleY&&(E=t.rescaleY),void 0!==t.active&&e.forEach((function(e,n){e.disabled=!t.active[n]}))}}(u),D.update).getter(function(e){return function(){return{active:e.map((function(e){return!e.disabled})),index:_.i,rescaleY:E}}}(u)).update(),T.disabled=u.map((function(e){return!!e.disabled})),!S)for(O in S={},T)T[O]instanceof Array?S[O]=T[O].slice(0):S[O]=T[O];var B=d3.behavior.drag().on("dragstart",(function(e,t){d3.select(D.container).style("cursor","ew-resize")})).on("drag",(function(e,t){_.x=d3.event.x,_.i=Math.round(k.invert(_.x)),K()})).on("dragend",(function(e,t){d3.select(D.container).style("cursor","auto"),T.index=_.i,L.stateChange(T)}));if(!(u&&u.length&&u.filter((function(e){return e.values.length})).length))return t.utils.noData(D,w),D;w.selectAll(".nv-noData").remove(),e=r.xScale(),n=r.yScale(),k.domain([0,u[0].values.length-1]).range([0,F]).clamp(!0),u=function(e,t){return M||(M=r.y()),t.map((function(t,n){if(!t.values)return t;var r=t.values[e];if(null==r)return t;var i=M(r,e);return Math.abs(i)<1e-5&&!I?(t.tempDisabled=!0,t):(t.tempDisabled=!1,t.values=t.values.map((function(e,t){return e.display={y:(M(e,t)-i)/i},e})),t)}))}(_.i,u),void 0===R&&(R=P(u)),E?r.yDomain(null):(r.yDomain(R),r.clipEdge(!0));var H=b?"none":"all",G=w.selectAll("g.nv-wrap.nv-cumulativeLine").data([u]),U=G.enter().append("g").attr("class","nvd3 nv-wrap nv-cumulativeLine").append("g"),V=G.select("g");if(U.append("g").attr("class","nv-interactive"),U.append("g").attr("class","nv-x nv-axis").style("pointer-events","none"),U.append("g").attr("class","nv-y nv-axis"),U.append("g").attr("class","nv-background"),U.append("g").attr("class","nv-linesWrap").style("pointer-events",H),U.append("g").attr("class","nv-avgLinesWrap").style("pointer-events","none"),U.append("g").attr("class","nv-legendWrap"),U.append("g").attr("class","nv-controlsWrap"),g?(a.width(F),V.select(".nv-legendWrap").datum(u).call(a),d||a.height()===c.top||(c.top=a.height(),j=t.utils.availableHeight(h,w,c)),V.select(".nv-legendWrap").attr("transform","translate(0,"+-c.top+")")):V.select(".nv-legendWrap").selectAll("*").remove(),x){var W=[{key:"Re-scale y-axis",disabled:!E}];s.width(140).color(["#444","#444","#444"]).rightAlign(!1).margin({top:5,right:0,bottom:5,left:20}),V.select(".nv-controlsWrap").datum(W).attr("transform","translate(0,"+-c.top+")").call(s)}else V.select(".nv-controlsWrap").selectAll("*").remove();G.attr("transform","translate("+c.left+","+c.top+")"),y&&V.select(".nv-y.nv-axis").attr("transform","translate("+F+",0)");var q=u.filter((function(e){return e.tempDisabled}));G.select(".tempDisabled").remove(),q.length&&G.append("text").attr("class","tempDisabled").attr("x",F/2).attr("y","-.71em").style("text-anchor","end").text(q.map((function(e){return e.key})).join(", ")+" values cannot be calculated for this time period."),b&&(l.width(F).height(j).margin({left:c.left,top:c.top}).svgContainer(w).xScale(e),G.select(".nv-interactive").call(l)),U.select(".nv-background").append("rect"),V.select(".nv-background rect").attr("width",F).attr("height",j),r.y((function(e){return e.display.y})).width(F).height(j).color(u.map((function(e,t){return e.color||p(e,t)})).filter((function(e,t){return!u[t].disabled&&!u[t].tempDisabled})));var z=V.select(".nv-linesWrap").datum(u.filter((function(e){return!e.disabled&&!e.tempDisabled})));z.call(r),u.forEach((function(e,t){e.seriesIndex=t}));var $=u.filter((function(e){return!e.disabled&&!!N(e)})),X=V.select(".nv-avgLinesWrap").selectAll("line").data($,(function(e){return e.key})),Q=function(e){var t=n(N(e));return t<0?0:t>j?j:t};X.enter().append("line").style("stroke-width",2).style("stroke-dasharray","10,10").style("stroke",(function(e,t){return r.color()(e,e.seriesIndex)})).attr("x1",0).attr("x2",F).attr("y1",Q).attr("y2",Q),X.style("stroke-opacity",(function(e){var t=n(N(e));return t<0||t>j?0:1})).attr("x1",0).attr("x2",F).attr("y1",Q).attr("y2",Q),X.exit().remove();var Y=z.selectAll(".nv-indexLine").data([_]);function K(){Y.data([_]);var e=D.duration();D.duration(0),D.update(),D.duration(e)}Y.enter().append("rect").attr("class","nv-indexLine").attr("width",3).attr("x",-2).attr("fill","red").attr("fill-opacity",.5).style("pointer-events","all").call(B),Y.attr("transform",(function(e){return"translate("+k(e.i)+",0)"})).attr("height",j),m&&(i.scale(e)._ticks(t.utils.calcTicksX(F/70,u)).tickSize(-j,0),V.select(".nv-x.nv-axis").attr("transform","translate(0,"+n.range()[0]+")"),V.select(".nv-x.nv-axis").call(i)),v&&(o.scale(n)._ticks(t.utils.calcTicksY(j/36,u)).tickSize(-F,0),V.select(".nv-y.nv-axis").call(o)),V.select(".nv-background rect").on("click",(function(){_.x=d3.mouse(this)[0],_.i=Math.round(k.invert(_.x)),T.index=_.i,L.stateChange(T),K()})),r.dispatch.on("elementClick",(function(e){_.i=e.pointIndex,_.x=k(_.i),T.index=_.i,L.stateChange(T),K()})),s.dispatch.on("legendClick",(function(e,t){e.disabled=!e.disabled,E=!e.disabled,T.rescaleY=E,E||(R=P(u)),L.stateChange(T),D.update()})),a.dispatch.on("stateChange",(function(e){for(var t in e)T[t]=e[t];L.stateChange(T),D.update()})),l.dispatch.on("elementMousemove",(function(e){r.clearHighlights();var n,a,s,c=[];if(u.filter((function(e,t){return e.seriesIndex=t,!(e.disabled||e.tempDisabled)})).forEach((function(i,o){a=t.interactiveBisect(i.values,e.pointXValue,D.x()),r.highlightPoint(o,a,!0);var l=i.values[a];void 0!==l&&(void 0===n&&(n=l),void 0===s&&(s=D.xScale()(D.x()(l,a))),c.push({key:i.key,value:D.y()(l,a),color:p(i,i.seriesIndex)}))})),c.length>2){var d=D.yScale().invert(e.mouseY),f=.03*Math.abs(D.yScale().domain()[0]-D.yScale().domain()[1]),h=t.nearestValueIndex(c.map((function(e){return e.value})),d,f);null!==h&&(c[h].highlight=!0)}var g=i.tickFormat()(D.x()(n,a),a);l.tooltip.valueFormatter((function(e,t){return o.tickFormat()(e)})).data({value:g,series:c})(),l.renderGuideLine(s)})),l.dispatch.on("elementMouseout",(function(e){r.clearHighlights()})),L.on("changeState",(function(e){void 0!==e.disabled&&(u.forEach((function(t,n){t.disabled=e.disabled[n]})),T.disabled=e.disabled),void 0!==e.index&&(_.i=e.index,_.x=k(_.i),T.index=e.index,Y.data([_])),void 0!==e.rescaleY&&(E=e.rescaleY),D.update()}))})),O.renderEnd("cumulativeLineChart immediate"),D}r.dispatch.on("elementMouseover.tooltip",(function(e){var t={x:D.x()(e.point),y:D.y()(e.point),color:e.point.color};e.point=t,u.data(e).hidden(!1)})),r.dispatch.on("elementMouseout.tooltip",(function(e){u.hidden(!0)}));var M=null;function P(e){var t=e.filter((function(e){return!(e.disabled||e.tempDisabled)})).map((function(e,t){return d3.extent(e.values,(function(e){return e.display.y}))}));return[d3.min(t,(function(e){return e[0]})),d3.max(t,(function(e){return e[1]}))]}return D.dispatch=L,D.lines=r,D.legend=a,D.controls=s,D.xAxis=i,D.yAxis=o,D.interactiveLayer=l,D.state=T,D.tooltip=u,D.options=t.utils.optionsFunc.bind(D),D._options=Object.create({},{width:{get:function(){return f},set:function(e){f=e}},height:{get:function(){return h},set:function(e){h=e}},showControls:{get:function(){return x},set:function(e){x=e}},showLegend:{get:function(){return g},set:function(e){g=e}},average:{get:function(){return N},set:function(e){N=e}},defaultState:{get:function(){return S},set:function(e){S=e}},noData:{get:function(){return w},set:function(e){w=e}},showXAxis:{get:function(){return m},set:function(e){m=e}},showYAxis:{get:function(){return v},set:function(e){v=e}},noErrorCheck:{get:function(){return I},set:function(e){I=e}},rescaleY:{get:function(){return E},set:function(e){E=e,D.state.rescaleY=e}},margin:{get:function(){return c},set:function(e){void 0!==e.top&&(c.top=e.top,d=e.top),c.right=void 0!==e.right?e.right:c.right,c.bottom=void 0!==e.bottom?e.bottom:c.bottom,c.left=void 0!==e.left?e.left:c.left}},color:{get:function(){return p},set:function(e){p=t.utils.getColor(e),a.color(p)}},useInteractiveGuideline:{get:function(){return b},set:function(e){b=e,!0===e&&(D.interactive(!1),D.useVoronoi(!1))}},rightAlignYAxis:{get:function(){return y},set:function(e){y=e,o.orient(e?"right":"left")}},duration:{get:function(){return A},set:function(e){A=e,r.duration(A),i.duration(A),o.duration(A),O.reset(A)}}}),t.utils.inheritOptions(D,r),t.utils.initOptions(D),D},t.models.discreteBar=function(){"use strict";var e,n,r,i,o,a,s,l={top:0,right:0,bottom:0,left:0},u=960,c=500,d=Math.floor(1e4*Math.random()),p=d3.scale.ordinal(),f=d3.scale.linear(),h=function(e){return e.x},g=function(e){return e.y},m=[0],v=t.utils.defaultColor(),y=!1,x=d3.format(",.2f"),b=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout","elementMousemove","renderEnd"),E="discreteBar",C=250,T=t.utils.renderWatch(b,C);function S(d){return T.reset(),d.each((function(d){var C=u-l.left-l.right,S=c-l.top-l.bottom;e=d3.select(this),t.utils.initSVG(e),d.forEach((function(e,t){e.values.forEach((function(e){e.series=t}))}));var w=n&&r?[]:d.map((function(e){return e.values.map((function(e,t){return{x:h(e,t),y:g(e,t),y0:e.y0}}))}));p.domain(n||d3.merge(w).map((function(e){return e.x}))).rangeBands(i||[0,C],.1),f.domain(r||d3.extent(d3.merge(w).map((function(e){return e.y})).concat(m))),y?f.range(o||[S-(f.domain()[0]<0?12:0),f.domain()[1]>0?12:0]):f.range(o||[S,0]),a=a||p,s=s||f.copy().range([f(0),f(0)]);var N=e.selectAll("g.nv-wrap.nv-discretebar").data([d]),L=N.enter().append("g").attr("class","nvd3 nv-wrap nv-discretebar").append("g");N.select("g"),L.append("g").attr("class","nv-groups"),N.attr("transform","translate("+l.left+","+l.top+")");var A=N.select(".nv-groups").selectAll(".nv-group").data((function(e){return e}),(function(e){return e.key}));A.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6),A.exit().watchTransition(T,"discreteBar: exit groups").style("stroke-opacity",1e-6).style("fill-opacity",1e-6).remove(),A.attr("class",(function(e,t){return"nv-group nv-series-"+t})).classed("hover",(function(e){return e.hover})),A.watchTransition(T,"discreteBar: groups").style("stroke-opacity",1).style("fill-opacity",.75);var I=A.selectAll("g.nv-bar").data((function(e){return e.values}));I.exit().remove();var R=I.enter().append("g").attr("transform",(function(e,t,n){return"translate("+(p(h(e,t))+.05*p.rangeBand())+", "+f(0)+")"})).on("mouseover",(function(e,t){d3.select(this).classed("hover",!0),b.elementMouseover({data:e,index:t,color:d3.select(this).style("fill")})})).on("mouseout",(function(e,t){d3.select(this).classed("hover",!1),b.elementMouseout({data:e,index:t,color:d3.select(this).style("fill")})})).on("mousemove",(function(e,t){b.elementMousemove({data:e,index:t,color:d3.select(this).style("fill")})})).on("click",(function(e,t){b.elementClick({data:e,index:t,color:d3.select(this).style("fill"),event:d3.event,element:this}),d3.event.stopPropagation()})).on("dblclick",(function(e,t){b.elementDblClick({data:e,index:t,color:d3.select(this).style("fill")}),d3.event.stopPropagation()}));R.append("rect").attr("height",0).attr("width",.9*p.rangeBand()/d.length),y?(R.append("text").attr("text-anchor","middle"),I.select("text").text((function(e,t){return x(g(e,t))})).watchTransition(T,"discreteBar: bars text").attr("x",.9*p.rangeBand()/2).attr("y",(function(e,t){return g(e,t)<0?f(g(e,t))-f(0)+12:-4}))):I.selectAll("text").remove(),I.attr("class",(function(e,t){return g(e,t)<0?"nv-bar negative":"nv-bar positive"})).style("fill",(function(e,t){return e.color||v(e,t)})).style("stroke",(function(e,t){return e.color||v(e,t)})).select("rect").attr("class",E).watchTransition(T,"discreteBar: bars rect").attr("width",.9*p.rangeBand()/d.length),I.watchTransition(T,"discreteBar: bars").attr("transform",(function(e,t){return"translate("+(p(h(e,t))+.05*p.rangeBand())+", "+(g(e,t)<0?f(0):f(0)-f(g(e,t))<1?f(0)-1:f(g(e,t)))+")"})).select("rect").attr("height",(function(e,t){return Math.max(Math.abs(f(g(e,t))-f(0)),1)})),a=p.copy(),s=f.copy()})),T.renderEnd("discreteBar immediate"),S}return S.dispatch=b,S.options=t.utils.optionsFunc.bind(S),S._options=Object.create({},{width:{get:function(){return u},set:function(e){u=e}},height:{get:function(){return c},set:function(e){c=e}},forceY:{get:function(){return m},set:function(e){m=e}},showValues:{get:function(){return y},set:function(e){y=e}},x:{get:function(){return h},set:function(e){h=e}},y:{get:function(){return g},set:function(e){g=e}},xScale:{get:function(){return p},set:function(e){p=e}},yScale:{get:function(){return f},set:function(e){f=e}},xDomain:{get:function(){return n},set:function(e){n=e}},yDomain:{get:function(){return r},set:function(e){r=e}},xRange:{get:function(){return i},set:function(e){i=e}},yRange:{get:function(){return o},set:function(e){o=e}},valueFormat:{get:function(){return x},set:function(e){x=e}},id:{get:function(){return d},set:function(e){d=e}},rectClass:{get:function(){return E},set:function(e){E=e}},margin:{get:function(){return l},set:function(e){l.top=void 0!==e.top?e.top:l.top,l.right=void 0!==e.right?e.right:l.right,l.bottom=void 0!==e.bottom?e.bottom:l.bottom,l.left=void 0!==e.left?e.left:l.left}},color:{get:function(){return v},set:function(e){v=t.utils.getColor(e)}},duration:{get:function(){return C},set:function(e){C=e,T.reset(C)}}}),t.utils.initOptions(S),S},t.models.discreteBarChart=function(){"use strict";var e,n,r=t.models.discreteBar(),i=t.models.axis(),o=t.models.axis(),a=t.models.legend(),s=t.models.tooltip(),l={top:15,right:10,bottom:50,left:60},u=null,c=null,d=null,p=t.utils.getColor(),f=!1,h=!0,g=!0,m=!1,v=!1,y=!1,x=0,b=null,E=d3.dispatch("beforeUpdate","renderEnd"),C=250;i.orient("bottom").showMaxMin(!1).tickFormat((function(e){return e})),o.orient(m?"right":"left").tickFormat(d3.format(",.1f")),s.duration(0).headerEnabled(!1).valueFormatter((function(e,t){return o.tickFormat()(e,t)})).keyFormatter((function(e,t){return i.tickFormat()(e,t)}));var T=t.utils.renderWatch(E,C);function S(s){return T.reset(),T.models(r),h&&T.models(i),g&&T.models(o),s.each((function(s){var p=d3.select(this);t.utils.initSVG(p);var b=t.utils.availableWidth(c,p,l),T=t.utils.availableHeight(d,p,l);if(S.update=function(){E.beforeUpdate(),p.transition().duration(C).call(S)},S.container=this,!(s&&s.length&&s.filter((function(e){return e.values.length})).length))return t.utils.noData(S,p),S;p.selectAll(".nv-noData").remove(),e=r.xScale(),n=r.yScale().clamp(!0);var w=p.selectAll("g.nv-wrap.nv-discreteBarWithAxes").data([s]),N=w.enter().append("g").attr("class","nvd3 nv-wrap nv-discreteBarWithAxes").append("g"),L=N.append("defs"),A=w.select("g");if(N.append("g").attr("class","nv-x nv-axis"),N.append("g").attr("class","nv-y nv-axis").append("g").attr("class","nv-zeroLine").append("line"),N.append("g").attr("class","nv-barsWrap"),N.append("g").attr("class","nv-legendWrap"),A.attr("transform","translate("+l.left+","+l.top+")"),f?(a.width(b),A.select(".nv-legendWrap").datum(s).call(a),u||a.height()===l.top||(l.top=a.height(),T=t.utils.availableHeight(d,p,l)),w.select(".nv-legendWrap").attr("transform","translate(0,"+-l.top+")")):A.select(".nv-legendWrap").selectAll("*").remove(),m&&A.select(".nv-y.nv-axis").attr("transform","translate("+b+",0)"),r.width(b).height(T),A.select(".nv-barsWrap").datum(s.filter((function(e){return!e.disabled}))).transition().call(r),L.append("clipPath").attr("id","nv-x-label-clip-"+r.id()).append("rect"),A.select("#nv-x-label-clip-"+r.id()+" rect").attr("width",e.rangeBand()*(v?2:1)).attr("height",16).attr("x",-e.rangeBand()/(v?1:2)),h){i.scale(e)._ticks(t.utils.calcTicksX(b/100,s)).tickSize(-T,0),A.select(".nv-x.nv-axis").attr("transform","translate(0,"+(n.range()[0]+(r.showValues()&&n.domain()[0]<0?16:0))+")"),A.select(".nv-x.nv-axis").call(i);var I=A.select(".nv-x.nv-axis").selectAll("g");v&&I.selectAll("text").attr("transform",(function(e,t,n){return"translate(0,"+(n%2==0?"5":"17")+")"})),x&&I.selectAll(".tick text").attr("transform","rotate("+x+" 0,0)").style("text-anchor",x>0?"start":"end"),y&&A.selectAll(".tick text").call(t.utils.wrapTicks,S.xAxis.rangeBand())}g&&(o.scale(n)._ticks(t.utils.calcTicksY(T/36,s)).tickSize(-b,0),A.select(".nv-y.nv-axis").call(o)),A.select(".nv-zeroLine line").attr("x1",0).attr("x2",m?-b:b).attr("y1",n(0)).attr("y2",n(0))})),T.renderEnd("discreteBar chart immediate"),S}return r.dispatch.on("elementMouseover.tooltip",(function(e){e.series={key:S.x()(e.data),value:S.y()(e.data),color:e.color},s.data(e).hidden(!1)})),r.dispatch.on("elementMouseout.tooltip",(function(e){s.hidden(!0)})),r.dispatch.on("elementMousemove.tooltip",(function(e){s()})),S.dispatch=E,S.discretebar=r,S.legend=a,S.xAxis=i,S.yAxis=o,S.tooltip=s,S.options=t.utils.optionsFunc.bind(S),S._options=Object.create({},{width:{get:function(){return c},set:function(e){c=e}},height:{get:function(){return d},set:function(e){d=e}},showLegend:{get:function(){return f},set:function(e){f=e}},staggerLabels:{get:function(){return v},set:function(e){v=e}},rotateLabels:{get:function(){return x},set:function(e){x=e}},wrapLabels:{get:function(){return y},set:function(e){y=!!e}},showXAxis:{get:function(){return h},set:function(e){h=e}},showYAxis:{get:function(){return g},set:function(e){g=e}},noData:{get:function(){return b},set:function(e){b=e}},margin:{get:function(){return l},set:function(e){void 0!==e.top&&(l.top=e.top,u=e.top),l.right=void 0!==e.right?e.right:l.right,l.bottom=void 0!==e.bottom?e.bottom:l.bottom,l.left=void 0!==e.left?e.left:l.left}},duration:{get:function(){return C},set:function(e){C=e,T.reset(C),r.duration(C),i.duration(C),o.duration(C)}},color:{get:function(){return p},set:function(e){p=t.utils.getColor(e),r.color(p),a.color(p)}},rightAlignYAxis:{get:function(){return m},set:function(e){m=e,o.orient(e?"right":"left")}}}),t.utils.inheritOptions(S,r),t.utils.initOptions(S),S},t.models.distribution=function(){"use strict";var e,n={top:0,right:0,bottom:0,left:0},r=400,i=8,o="x",a=function(e){return e[o]},s=t.utils.defaultColor(),l=d3.scale.linear(),u=250,c=d3.dispatch("renderEnd"),d=t.utils.renderWatch(c,u);function p(r){return d.reset(),r.each((function(r){"x"===o?(n.left,n.right):(n.top,n.bottom);var u="x"==o?"y":"x",c=d3.select(this);t.utils.initSVG(c),e=e||l;var p=c.selectAll("g.nv-distribution").data([r]),f=(p.enter().append("g").attr("class","nvd3 nv-distribution").append("g"),p.select("g"));p.attr("transform","translate("+n.left+","+n.top+")");var h=f.selectAll("g.nv-dist").data((function(e){return e}),(function(e){return e.key}));h.enter().append("g"),h.attr("class",(function(e,t){return"nv-dist nv-series-"+t})).style("stroke",(function(e,t){return s(e,t)}));var g=h.selectAll("line.nv-dist"+o).data((function(e){return e.values}));g.enter().append("line").attr(o+"1",(function(t,n){return e(a(t,n))})).attr(o+"2",(function(t,n){return e(a(t,n))})),d.transition(h.exit().selectAll("line.nv-dist"+o),"dist exit").attr(o+"1",(function(e,t){return l(a(e,t))})).attr(o+"2",(function(e,t){return l(a(e,t))})).style("stroke-opacity",0).remove(),g.attr("class",(function(e,t){return"nv-dist"+o+" nv-dist"+o+"-"+t})).attr(u+"1",0).attr(u+"2",i),d.transition(g,"dist").attr(o+"1",(function(e,t){return l(a(e,t))})).attr(o+"2",(function(e,t){return l(a(e,t))})),e=l.copy()})),d.renderEnd("distribution immediate"),p}return p.options=t.utils.optionsFunc.bind(p),p.dispatch=c,p.margin=function(e){return arguments.length?(n.top=void 0!==e.top?e.top:n.top,n.right=void 0!==e.right?e.right:n.right,n.bottom=void 0!==e.bottom?e.bottom:n.bottom,n.left=void 0!==e.left?e.left:n.left,p):n},p.width=function(e){return arguments.length?(r=e,p):r},p.axis=function(e){return arguments.length?(o=e,p):o},p.size=function(e){return arguments.length?(i=e,p):i},p.getData=function(e){return arguments.length?(a=d3.functor(e),p):a},p.scale=function(e){return arguments.length?(l=e,p):l},p.color=function(e){return arguments.length?(s=t.utils.getColor(e),p):s},p.duration=function(e){return arguments.length?(u=e,d.reset(u),p):u},p},t.models.focus=function(e){"use strict";e=e||t.models.line();var n,r,i=t.models.axis(),o=t.models.axis(),a=d3.svg.brush(),s={top:10,right:0,bottom:30,left:0},l=t.utils.defaultColor(),u=null,c=70,d=!0,p=!1,f=!1,h=null,g=250,m=d3.dispatch("brush","onBrush","renderEnd"),v=!0;e.interactive(!1),e.pointActive((function(e){return!1}));var y=t.utils.renderWatch(m,g);function x(b){return y.reset(),y.models(e),d&&y.models(i),p&&y.models(o),b.each((function(y){var b=d3.select(this);t.utils.initSVG(b);var E=t.utils.availableWidth(u,b,s),C=c-s.top-s.bottom;x.update=function(){0===g?b.call(x):b.transition().duration(g).call(x)},x.container=this,n=e.xScale(),r=e.yScale();var T=b.selectAll("g.nv-focus").data([y]),S=T.enter().append("g").attr("class","nvd3 nv-focus").append("g"),w=T.select("g");T.attr("transform","translate("+s.left+","+s.top+")"),S.append("g").attr("class","nv-background").append("rect"),S.append("g").attr("class","nv-x nv-axis"),S.append("g").attr("class","nv-y nv-axis"),S.append("g").attr("class","nv-contentWrap"),S.append("g").attr("class","nv-brushBackground"),S.append("g").attr("class","nv-x nv-brush"),f&&w.select(".nv-y.nv-axis").attr("transform","translate("+E+",0)"),w.select(".nv-background rect").attr("width",E).attr("height",C),e.width(E).height(C).color(y.map((function(e,t){return e.color||l(e,t)})).filter((function(e,t){return!y[t].disabled})));var N=w.select(".nv-contentWrap").datum(y.filter((function(e){return!e.disabled})));d3.transition(N).call(e),a.x(n).on("brush",(function(){R(v)})),a.on("brushend",(function(){v||m.onBrush(a.empty()?n.domain():a.extent())})),h&&a.extent(h);var L=w.select(".nv-brushBackground").selectAll("g").data([h||a.extent()]),A=L.enter().append("g");A.append("rect").attr("class","left").attr("x",0).attr("y",0).attr("height",C),A.append("rect").attr("class","right").attr("x",0).attr("y",0).attr("height",C);var I=w.select(".nv-x.nv-brush").call(a);function R(e){h=a.empty()?null:a.extent();var t=a.empty()?n.domain():a.extent();m.brush({extent:t,brush:a}),a.empty()||a.extent(h),L.data([a.empty()?n.domain():h]).each((function(e,t){var r=n(e[0])-n.range()[0],i=E-n(e[1]);d3.select(this).select(".left").attr("width",r<0?0:r),d3.select(this).select(".right").attr("x",n(e[1])).attr("width",i<0?0:i)})),e&&m.onBrush(t)}I.selectAll("rect").attr("height",C),I.selectAll(".resize").append("path").attr("d",(function(e){var t=+("e"==e),n=t?1:-1,r=C/3;return"M"+.5*n+","+r+"A6,6 0 0 "+t+" "+6.5*n+","+(r+6)+"V"+(2*r-6)+"A6,6 0 0 "+t+" "+.5*n+","+2*r+"ZM"+2.5*n+","+(r+8)+"V"+(2*r-8)+"M"+4.5*n+","+(r+8)+"V"+(2*r-8)})),R(!0),w.select(".nv-background rect").attr("width",E).attr("height",C),d&&(i.scale(n)._ticks(t.utils.calcTicksX(E/100,y)).tickSize(-C,0),w.select(".nv-x.nv-axis").attr("transform","translate(0,"+r.range()[0]+")"),d3.transition(w.select(".nv-x.nv-axis")).call(i)),p&&(o.scale(r)._ticks(t.utils.calcTicksY(C/36,y)).tickSize(-E,0),d3.transition(w.select(".nv-y.nv-axis")).call(o)),w.select(".nv-x.nv-axis").attr("transform","translate(0,"+r.range()[0]+")")})),y.renderEnd("focus immediate"),x}return x.dispatch=m,x.content=e,x.brush=a,x.xAxis=i,x.yAxis=o,x.options=t.utils.optionsFunc.bind(x),x._options=Object.create({},{width:{get:function(){return u},set:function(e){u=e}},height:{get:function(){return c},set:function(e){c=e}},showXAxis:{get:function(){return d},set:function(e){d=e}},showYAxis:{get:function(){return p},set:function(e){p=e}},brushExtent:{get:function(){return h},set:function(e){h=e}},syncBrushing:{get:function(){return v},set:function(e){v=e}},margin:{get:function(){return s},set:function(e){s.top=void 0!==e.top?e.top:s.top,s.right=void 0!==e.right?e.right:s.right,s.bottom=void 0!==e.bottom?e.bottom:s.bottom,s.left=void 0!==e.left?e.left:s.left}},duration:{get:function(){return g},set:function(t){g=t,y.reset(g),e.duration(g),i.duration(g),o.duration(g)}},color:{get:function(){return l},set:function(n){l=t.utils.getColor(n),e.color(l)}},interpolate:{get:function(){return e.interpolate()},set:function(t){e.interpolate(t)}},xTickFormat:{get:function(){return i.tickFormat()},set:function(e){i.tickFormat(e)}},yTickFormat:{get:function(){return o.tickFormat()},set:function(e){o.tickFormat(e)}},x:{get:function(){return e.x()},set:function(t){e.x(t)}},y:{get:function(){return e.y()},set:function(t){e.y(t)}},rightAlignYAxis:{get:function(){return f},set:function(e){f=e,o.orient(f?"right":"left")}}}),t.utils.inheritOptions(x,e),t.utils.initOptions(x),x},t.models.forceDirectedGraph=function(){"use strict";var e={top:2,right:0,bottom:2,left:0},n=400,r=32,i=null,o=d3.dispatch("renderEnd"),a=t.utils.getColor(["#000"]),s=t.models.tooltip(),l=null,u=.1,c=.9,d=30,p=-120,f=.1,h=.8,g=.1,m=5,v=function(e){},y=function(e){},x=d3.functor(0),b=d3.functor(0),E=t.utils.renderWatch(o);function C(o){return E.reset(),o.each((function(o){i=d3.select(this),t.utils.initSVG(i);var l=t.utils.availableWidth(n,i,e),x=t.utils.availableHeight(r,i,e);if(i.attr("width",l).attr("height",x),!(o&&o.links&&o.nodes))return t.utils.noData(C,i),C;i.selectAll(".nv-noData").remove(),i.selectAll("*").remove();var b=new Set;o.nodes.forEach((function(e){Object.keys(e).forEach((function(e){b.add(e)}))}));var E=d3.layout.force().nodes(o.nodes).links(o.links).size([l,x]).linkStrength(u).friction(c).linkDistance(d).charge(p).gravity(f).theta(h).alpha(g).start(),T=i.selectAll(".link").data(o.links).enter().append("line").attr("class","nv-force-link").style("stroke-width",(function(e){return Math.sqrt(e.value)})),S=i.selectAll(".node").data(o.nodes).enter().append("g").attr("class","nv-force-node").call(E.drag);S.append("circle").attr("r",m).style("fill",(function(e){return a(e)})).on("mouseover",(function(e){i.select(".nv-series-"+e.seriesIndex+" .nv-distx-"+e.pointIndex).attr("y1",e.py),i.select(".nv-series-"+e.seriesIndex+" .nv-disty-"+e.pointIndex).attr("x2",e.px);var t=a(e);e.series=[],b.forEach((function(n){e.series.push({color:t,key:n,value:e[n]})})),s.data(e).hidden(!1)})).on("mouseout",(function(e){s.hidden(!0)})),s.headerFormatter((function(e){return"Node"})),y(T),v(S),E.on("tick",(function(){T.attr("x1",(function(e){return e.source.x})).attr("y1",(function(e){return e.source.y})).attr("x2",(function(e){return e.target.x})).attr("y2",(function(e){return e.target.y})),S.attr("transform",(function(e){return"translate("+e.x+", "+e.y+")"}))}))})),C}return C.options=t.utils.optionsFunc.bind(C),C._options=Object.create({},{width:{get:function(){return n},set:function(e){n=e}},height:{get:function(){return r},set:function(e){r=e}},linkStrength:{get:function(){return u},set:function(e){u=e}},friction:{get:function(){return c},set:function(e){c=e}},linkDist:{get:function(){return d},set:function(e){d=e}},charge:{get:function(){return p},set:function(e){p=e}},gravity:{get:function(){return f},set:function(e){f=e}},theta:{get:function(){return h},set:function(e){h=e}},alpha:{get:function(){return g},set:function(e){g=e}},radius:{get:function(){return m},set:function(e){m=e}},x:{get:function(){return x},set:function(e){x=d3.functor(e)}},y:{get:function(){return b},set:function(e){b=d3.functor(e)}},margin:{get:function(){return e},set:function(t){e.top=void 0!==t.top?t.top:e.top,e.right=void 0!==t.right?t.right:e.right,e.bottom=void 0!==t.bottom?t.bottom:e.bottom,e.left=void 0!==t.left?t.left:e.left}},color:{get:function(){return a},set:function(e){a=t.utils.getColor(e)}},noData:{get:function(){return l},set:function(e){l=e}},nodeExtras:{get:function(){return v},set:function(e){v=e}},linkExtras:{get:function(){return y},set:function(e){y=e}}}),C.dispatch=o,C.tooltip=s,t.utils.initOptions(C),C},t.models.furiousLegend=function(){"use strict";var e={top:5,right:0,bottom:5,left:0},n=400,r=20,i=function(e){return e.key},o=function(e){return e},a=t.utils.getColor(),s=20,l=!0,u=28,c=!0,d=!0,p=!1,f=!1,h=d3.dispatch("legendClick","legendDblclick","legendMouseover","legendMouseout","stateChange"),g="classic";function m(v){function y(e,t){return"furious"!=g?"#000":f?e.disengaged?a(e,t):"#fff":f?void 0:e.disabled?a(e,t):"#fff"}function x(e,t){return f&&"furious"==g?e.disengaged?"#fff":a(e,t):e.disabled?"#fff":a(e,t)}return v.each((function(m){var v=n-e.left-e.right,b=d3.select(this);t.utils.initSVG(b);var E=b.selectAll("g.nv-legend").data([m]),C=(E.enter().append("g").attr("class","nvd3 nv-legend").append("g"),E.select("g"));E.attr("transform","translate("+e.left+","+e.top+")");var T,S=C.selectAll(".nv-series").data((function(e){return"furious"!=g?e:e.filter((function(e){return!!f||!e.disengaged}))})),w=S.enter().append("g").attr("class","nv-series");"classic"==g?(w.append("circle").style("stroke-width",2).attr("class","nv-legend-symbol").attr("r",5),T=S.select("circle")):"furious"==g&&(w.append("rect").style("stroke-width",2).attr("class","nv-legend-symbol").attr("rx",3).attr("ry",3),T=S.select("rect"),w.append("g").attr("class","nv-check-box").property("innerHTML",'<path d="M0.5,5 L22.5,5 L22.5,26.5 L0.5,26.5 L0.5,5 Z" class="nv-box"></path><path d="M5.5,12.8618467 L11.9185089,19.2803556 L31,0.198864511" class="nv-check"></path>').attr("transform","translate(-10,-8)scale(0.5)"),S.select(".nv-check-box").each((function(e,t){d3.select(this).selectAll("path").attr("stroke",y(e,t))}))),w.append("text").attr("text-anchor","start").attr("class","nv-legend-text").attr("dy",".32em").attr("dx","8");var N,L=S.select("text.nv-legend-text");switch(S.on("mouseover",(function(e,t){h.legendMouseover(e,t)})).on("mouseout",(function(e,t){h.legendMouseout(e,t)})).on("click",(function(e,t){h.legendClick(e,t);var n=S.data();d&&("classic"==g?p?(n.forEach((function(e){e.disabled=!0})),e.disabled=!1):(e.disabled=!e.disabled,n.every((function(e){return e.disabled}))&&n.forEach((function(e){e.disabled=!1}))):"furious"==g&&(f?(e.disengaged=!e.disengaged,e.userDisabled=null==e.userDisabled?!!e.disabled:e.userDisabled,e.disabled=e.disengaged||e.userDisabled):f||(e.disabled=!e.disabled,e.userDisabled=e.disabled,n.filter((function(e){return!e.disengaged})).every((function(e){return e.userDisabled}))&&n.forEach((function(e){e.disabled=e.userDisabled=!1})))),h.stateChange({disabled:n.map((function(e){return!!e.disabled})),disengaged:n.map((function(e){return!!e.disengaged}))}))})).on("dblclick",(function(e,t){if(("furious"!=g||!f)&&(h.legendDblclick(e,t),d)){var n=S.data();n.forEach((function(e){e.disabled=!0,"furious"==g&&(e.userDisabled=e.disabled)})),e.disabled=!1,"furious"==g&&(e.userDisabled=e.disabled),h.stateChange({disabled:n.map((function(e){return!!e.disabled}))})}})),S.classed("nv-disabled",(function(e){return e.userDisabled})),S.exit().remove(),L.attr("fill",y).text((function(e){return o(i(e))})),g){case"furious":N=23;break;case"classic":N=20}if(l){var A=[];S.each((function(e,n){var r,a;if(o(i(e))&&o(i(e)).length>s){var l=o(i(e)).substring(0,s);r=d3.select(this).select("text").text(l+"..."),d3.select(this).append("svg:title").text(o(i(e)))}else r=d3.select(this).select("text");try{if((a=r.node().getComputedTextLength())<=0)throw Error()}catch(e){a=t.utils.calcApproxTextWidth(r)}A.push(a+u)}));for(var I=0,R=0,k=[];R<v&&I<A.length;)k[I]=A[I],R+=A[I++];for(0===I&&(I=1);R>v&&I>1;){k=[],I--;for(var _=0;_<A.length;_++)A[_]>(k[_%I]||0)&&(k[_%I]=A[_]);R=k.reduce((function(e,t,n,r){return e+t}))}for(var O=[],D=0,M=0;D<I;D++)O[D]=M,M+=k[D];S.attr("transform",(function(e,t){return"translate("+O[t%I]+","+(5+Math.floor(t/I)*N)+")"})),c?C.attr("transform","translate("+(n-e.right-R)+","+e.top+")"):C.attr("transform","translate(0,"+e.top+")"),r=e.top+e.bottom+Math.ceil(A.length/I)*N}else{var P,F=5,j=5,B=0;S.attr("transform",(function(t,r){var i=d3.select(this).select("text").node().getComputedTextLength()+u;return P=j,n<e.left+e.right+P+i&&(j=P=5,F+=N),(j+=i)>B&&(B=j),"translate("+P+","+F+")"})),C.attr("transform","translate("+(n-e.right-B)+","+e.top+")"),r=e.top+e.bottom+F+15}"furious"==g&&T.attr("width",(function(e,t){return L[0][t].getComputedTextLength()+27})).attr("height",18).attr("y",-9).attr("x",-15),T.style("fill",x).style("stroke",(function(e,t){return e.color||a(e,t)}))})),m}return m.dispatch=h,m.options=t.utils.optionsFunc.bind(m),m._options=Object.create({},{width:{get:function(){return n},set:function(e){n=e}},height:{get:function(){return r},set:function(e){r=e}},key:{get:function(){return i},set:function(e){i=e}},keyFormatter:{get:function(){return o},set:function(e){o=e}},align:{get:function(){return l},set:function(e){l=e}},rightAlign:{get:function(){return c},set:function(e){c=e}},maxKeyLength:{get:function(){return s},set:function(e){s=e}},padding:{get:function(){return u},set:function(e){u=e}},updateState:{get:function(){return d},set:function(e){d=e}},radioButtonMode:{get:function(){return p},set:function(e){p=e}},expanded:{get:function(){return f},set:function(e){f=e}},vers:{get:function(){return g},set:function(e){g=e}},margin:{get:function(){return e},set:function(t){e.top=void 0!==t.top?t.top:e.top,e.right=void 0!==t.right?t.right:e.right,e.bottom=void 0!==t.bottom?t.bottom:e.bottom,e.left=void 0!==t.left?t.left:e.left}},color:{get:function(){return a},set:function(e){a=t.utils.getColor(e)}}}),t.utils.initOptions(m),m},t.models.historicalBar=function(){"use strict";var e,n,r,i,o={top:0,right:0,bottom:0,left:0},a=null,s=null,l=Math.floor(1e4*Math.random()),u=null,c=d3.scale.linear(),d=d3.scale.linear(),p=function(e){return e.x},f=function(e){return e.y},h=[],g=[0],m=!1,v=!0,y=t.utils.defaultColor(),x=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout","elementMousemove","renderEnd"),b=!0,E=t.utils.renderWatch(x,0);function C(T){return T.each((function(C){E.reset(),u=d3.select(this);var T=t.utils.availableWidth(a,u,o),S=t.utils.availableHeight(s,u,o);t.utils.initSVG(u),c.domain(e||d3.extent(C[0].values.map(p).concat(h))),m?c.range(r||[.5*T/C[0].values.length,T*(C[0].values.length-.5)/C[0].values.length]):c.range(r||[0,T]),d.domain(n||d3.extent(C[0].values.map(f).concat(g))).range(i||[S,0]),c.domain()[0]===c.domain()[1]&&(c.domain()[0]?c.domain([c.domain()[0]-.01*c.domain()[0],c.domain()[1]+.01*c.domain()[1]]):c.domain([-1,1])),d.domain()[0]===d.domain()[1]&&(d.domain()[0]?d.domain([d.domain()[0]+.01*d.domain()[0],d.domain()[1]-.01*d.domain()[1]]):d.domain([-1,1]));var w=u.selectAll("g.nv-wrap.nv-historicalBar-"+l).data([C[0].values]),N=w.enter().append("g").attr("class","nvd3 nv-wrap nv-historicalBar-"+l),L=N.append("defs"),A=N.append("g"),I=w.select("g");A.append("g").attr("class","nv-bars"),w.attr("transform","translate("+o.left+","+o.top+")"),u.on("click",(function(e,t){x.chartClick({data:e,index:t,pos:d3.event,id:l})})),L.append("clipPath").attr("id","nv-chart-clip-path-"+l).append("rect"),w.select("#nv-chart-clip-path-"+l+" rect").attr("width",T).attr("height",S),I.attr("clip-path",v?"url(#nv-chart-clip-path-"+l+")":"");var R=w.select(".nv-bars").selectAll(".nv-bar").data((function(e){return e}),(function(e,t){return p(e,t)}));R.exit().remove(),R.enter().append("rect").attr("x",0).attr("y",(function(e,n){return t.utils.NaNtoZero(d(Math.max(0,f(e,n))))})).attr("height",(function(e,n){return t.utils.NaNtoZero(Math.abs(d(f(e,n))-d(0)))})).attr("transform",(function(e,t){return"translate("+(c(p(e,t))-T/C[0].values.length*.45)+",0)"})).on("mouseover",(function(e,t){b&&(d3.select(this).classed("hover",!0),x.elementMouseover({data:e,index:t,color:d3.select(this).style("fill")}))})).on("mouseout",(function(e,t){b&&(d3.select(this).classed("hover",!1),x.elementMouseout({data:e,index:t,color:d3.select(this).style("fill")}))})).on("mousemove",(function(e,t){b&&x.elementMousemove({data:e,index:t,color:d3.select(this).style("fill")})})).on("click",(function(e,t){b&&(x.elementClick({data:e,index:t,color:d3.select(this).style("fill"),event:d3.event,element:this}),d3.event.stopPropagation())})).on("dblclick",(function(e,t){b&&(x.elementDblClick({data:e,index:t,color:d3.select(this).style("fill")}),d3.event.stopPropagation())})),R.attr("fill",(function(e,t){return y(e,t)})).attr("class",(function(e,t,n){return(f(e,t)<0?"nv-bar negative":"nv-bar positive")+" nv-bar-"+n+"-"+t})).watchTransition(E,"bars").attr("transform",(function(e,t){return"translate("+(c(p(e,t))-T/C[0].values.length*.45)+",0)"})).attr("width",T/C[0].values.length*.9),R.watchTransition(E,"bars").attr("y",(function(e,n){var r=f(e,n)<0?d(0):d(0)-d(f(e,n))<1?d(0)-1:d(f(e,n));return t.utils.NaNtoZero(r)})).attr("height",(function(e,n){return t.utils.NaNtoZero(Math.max(Math.abs(d(f(e,n))-d(0)),1))}))})),E.renderEnd("historicalBar immediate"),C}return C.highlightPoint=function(e,t){u.select(".nv-bars .nv-bar-0-"+e).classed("hover",t)},C.clearHighlights=function(){u.select(".nv-bars .nv-bar.hover").classed("hover",!1)},C.dispatch=x,C.options=t.utils.optionsFunc.bind(C),C._options=Object.create({},{width:{get:function(){return a},set:function(e){a=e}},height:{get:function(){return s},set:function(e){s=e}},forceX:{get:function(){return h},set:function(e){h=e}},forceY:{get:function(){return g},set:function(e){g=e}},padData:{get:function(){return m},set:function(e){m=e}},x:{get:function(){return p},set:function(e){p=e}},y:{get:function(){return f},set:function(e){f=e}},xScale:{get:function(){return c},set:function(e){c=e}},yScale:{get:function(){return d},set:function(e){d=e}},xDomain:{get:function(){return e},set:function(t){e=t}},yDomain:{get:function(){return n},set:function(e){n=e}},xRange:{get:function(){return r},set:function(e){r=e}},yRange:{get:function(){return i},set:function(e){i=e}},clipEdge:{get:function(){return v},set:function(e){v=e}},id:{get:function(){return l},set:function(e){l=e}},interactive:{get:function(){return b},set:function(e){b=e}},margin:{get:function(){return o},set:function(e){o.top=void 0!==e.top?e.top:o.top,o.right=void 0!==e.right?e.right:o.right,o.bottom=void 0!==e.bottom?e.bottom:o.bottom,o.left=void 0!==e.left?e.left:o.left}},color:{get:function(){return y},set:function(e){y=t.utils.getColor(e)}}}),t.utils.initOptions(C),C},t.models.historicalBarChart=function(e){"use strict";var n,r,i=e||t.models.historicalBar(),o=t.models.axis(),a=t.models.axis(),s=t.models.legend(),l=t.interactiveGuideline(),u=t.models.tooltip(),c={top:30,right:90,bottom:50,left:90},d=null,p=t.utils.defaultColor(),f=null,h=null,g=!1,m=!0,v=!0,y=!1,x=!1,b={},E=null,C=null,T=d3.dispatch("tooltipHide","stateChange","changeState","renderEnd"),S=250;o.orient("bottom").tickPadding(7),a.orient(y?"right":"left"),u.duration(0).headerEnabled(!1).valueFormatter((function(e,t){return a.tickFormat()(e,t)})).headerFormatter((function(e,t){return o.tickFormat()(e,t)}));var w=t.utils.renderWatch(T,0);function N(e){return e.each((function(u){w.reset(),w.models(i),m&&w.models(o),v&&w.models(a);var C=d3.select(this);t.utils.initSVG(C);var L,A=t.utils.availableWidth(f,C,c),I=t.utils.availableHeight(h,C,c);if(N.update=function(){C.transition().duration(S).call(N)},N.container=this,b.disabled=u.map((function(e){return!!e.disabled})),!E)for(L in E={},b)b[L]instanceof Array?E[L]=b[L].slice(0):E[L]=b[L];if(!(u&&u.length&&u.filter((function(e){return e.values.length})).length))return t.utils.noData(N,C),N;C.selectAll(".nv-noData").remove(),n=i.xScale(),r=i.yScale();var R=C.selectAll("g.nv-wrap.nv-historicalBarChart").data([u]),k=R.enter().append("g").attr("class","nvd3 nv-wrap nv-historicalBarChart").append("g"),_=R.select("g");k.append("g").attr("class","nv-x nv-axis"),k.append("g").attr("class","nv-y nv-axis"),k.append("g").attr("class","nv-barsWrap"),k.append("g").attr("class","nv-legendWrap"),k.append("g").attr("class","nv-interactive"),g?(s.width(A),_.select(".nv-legendWrap").datum(u).call(s),d||s.height()===c.top||(c.top=s.height(),I=t.utils.availableHeight(h,C,c)),R.select(".nv-legendWrap").attr("transform","translate(0,"+-c.top+")")):_.select(".nv-legendWrap").selectAll("*").remove(),R.attr("transform","translate("+c.left+","+c.top+")"),y&&_.select(".nv-y.nv-axis").attr("transform","translate("+A+",0)"),x&&(l.width(A).height(I).margin({left:c.left,top:c.top}).svgContainer(C).xScale(n),R.select(".nv-interactive").call(l)),i.width(A).height(I).color(u.map((function(e,t){return e.color||p(e,t)})).filter((function(e,t){return!u[t].disabled}))),_.select(".nv-barsWrap").datum(u.filter((function(e){return!e.disabled}))).transition().call(i),m&&(o.scale(n)._ticks(t.utils.calcTicksX(A/100,u)).tickSize(-I,0),_.select(".nv-x.nv-axis").attr("transform","translate(0,"+r.range()[0]+")"),_.select(".nv-x.nv-axis").transition().call(o)),v&&(a.scale(r)._ticks(t.utils.calcTicksY(I/36,u)).tickSize(-A,0),_.select(".nv-y.nv-axis").transition().call(a)),l.dispatch.on("elementMousemove",(function(e){i.clearHighlights();var n,r,s,c=[];u.filter((function(e,t){return e.seriesIndex=t,!e.disabled})).forEach((function(o,a){r=t.interactiveBisect(o.values,e.pointXValue,N.x()),i.highlightPoint(r,!0);var l=o.values[r];void 0!==l&&(void 0===n&&(n=l),void 0===s&&(s=N.xScale()(N.x()(l,r))),c.push({key:o.key,value:N.y()(l,r),color:p(o,o.seriesIndex),data:o.values[r]}))}));var d=o.tickFormat()(N.x()(n,r));l.tooltip.valueFormatter((function(e,t){return a.tickFormat()(e)})).data({value:d,index:r,series:c})(),l.renderGuideLine(s)})),l.dispatch.on("elementMouseout",(function(e){T.tooltipHide(),i.clearHighlights()})),s.dispatch.on("legendClick",(function(t,n){t.disabled=!t.disabled,u.filter((function(e){return!e.disabled})).length||u.map((function(e){return e.disabled=!1,R.selectAll(".nv-series").classed("disabled",!1),e})),b.disabled=u.map((function(e){return!!e.disabled})),T.stateChange(b),e.transition().call(N)})),s.dispatch.on("legendDblclick",(function(e){u.forEach((function(e){e.disabled=!0})),e.disabled=!1,b.disabled=u.map((function(e){return!!e.disabled})),T.stateChange(b),N.update()})),T.on("changeState",(function(e){void 0!==e.disabled&&(u.forEach((function(t,n){t.disabled=e.disabled[n]})),b.disabled=e.disabled),N.update()}))})),w.renderEnd("historicalBarChart immediate"),N}return i.dispatch.on("elementMouseover.tooltip",(function(e){e.series={key:N.x()(e.data),value:N.y()(e.data),color:e.color},u.data(e).hidden(!1)})),i.dispatch.on("elementMouseout.tooltip",(function(e){u.hidden(!0)})),i.dispatch.on("elementMousemove.tooltip",(function(e){u()})),N.dispatch=T,N.bars=i,N.legend=s,N.xAxis=o,N.yAxis=a,N.interactiveLayer=l,N.tooltip=u,N.options=t.utils.optionsFunc.bind(N),N._options=Object.create({},{width:{get:function(){return f},set:function(e){f=e}},height:{get:function(){return h},set:function(e){h=e}},showLegend:{get:function(){return g},set:function(e){g=e}},showXAxis:{get:function(){return m},set:function(e){m=e}},showYAxis:{get:function(){return v},set:function(e){v=e}},defaultState:{get:function(){return E},set:function(e){E=e}},noData:{get:function(){return C},set:function(e){C=e}},margin:{get:function(){return c},set:function(e){void 0!==e.top&&(c.top=e.top,d=e.top),c.right=void 0!==e.right?e.right:c.right,c.bottom=void 0!==e.bottom?e.bottom:c.bottom,c.left=void 0!==e.left?e.left:c.left}},color:{get:function(){return p},set:function(e){p=t.utils.getColor(e),s.color(p),i.color(p)}},duration:{get:function(){return S},set:function(e){S=e,w.reset(S),a.duration(S),o.duration(S)}},rightAlignYAxis:{get:function(){return y},set:function(e){y=e,a.orient(e?"right":"left")}},useInteractiveGuideline:{get:function(){return x},set:function(e){x=e,!0===e&&N.interactive(!1)}}}),t.utils.inheritOptions(N,i),t.utils.initOptions(N),N},t.models.ohlcBarChart=function(){var e=t.models.historicalBarChart(t.models.ohlcBar());return e.useInteractiveGuideline(!0),e.interactiveLayer.tooltip.contentGenerator((function(t){var n=t.series[0].data;return'<h3 style="color: #'+(n.open<n.close?"2ca02c":"d62728")+'">'+t.value+"</h3><table><tr><td>open:</td><td>"+e.yAxis.tickFormat()(n.open)+"</td></tr><tr><td>close:</td><td>"+e.yAxis.tickFormat()(n.close)+"</td></tr><tr><td>high</td><td>"+e.yAxis.tickFormat()(n.high)+"</td></tr><tr><td>low:</td><td>"+e.yAxis.tickFormat()(n.low)+"</td></tr></table>"})),e},t.models.candlestickBarChart=function(){var e=t.models.historicalBarChart(t.models.candlestickBar());return e.useInteractiveGuideline(!0),e.interactiveLayer.tooltip.contentGenerator((function(t){var n=t.series[0].data;return'<h3 style="color: #'+(n.open<n.close?"2ca02c":"d62728")+'">'+t.value+"</h3><table><tr><td>open:</td><td>"+e.yAxis.tickFormat()(n.open)+"</td></tr><tr><td>close:</td><td>"+e.yAxis.tickFormat()(n.close)+"</td></tr><tr><td>high</td><td>"+e.yAxis.tickFormat()(n.high)+"</td></tr><tr><td>low:</td><td>"+e.yAxis.tickFormat()(n.low)+"</td></tr></table>"})),e},t.models.legend=function(){"use strict";var e={top:5,right:0,bottom:5,left:0},n=400,r=20,i=function(e){return e.key},o=function(e){return e},a=t.utils.getColor(),s=20,l=!0,u=32,c=!0,d=!0,p=!0,f=!1,h=!1,g=d3.dispatch("legendClick","legendDblclick","legendMouseover","legendMouseout","stateChange"),m="classic";function v(y){function x(e,t){return"furious"!=m?"#000":h?e.disengaged?"#000":"#fff":h?void 0:(e.color||(e.color=a(e,t)),e.disabled?e.color:"#fff")}function b(e,t){return h&&"furious"==m&&e.disengaged?"#eee":e.color||a(e,t)}function E(e,t){return h&&"furious"==m?1:e.disabled?0:1}return y.each((function(a){var v=n-e.left-e.right,y=d3.select(this);t.utils.initSVG(y);var C=y.selectAll("g.nv-legend").data([a]),T=C.enter().append("g").attr("class","nvd3 nv-legend").append("g"),S=C.select("g");c?C.attr("transform","translate("+-e.right+","+e.top+")"):C.attr("transform","translate("+e.left+","+e.top+")");var w,N,L=S.selectAll(".nv-series").data((function(e){return"furious"!=m?e:e.filter((function(e){return!!h||!e.disengaged}))})),A=L.enter().append("g").attr("class","nv-series");switch(m){case"furious":N=23;break;case"classic":N=20}"classic"==m?(A.append("circle").style("stroke-width",2).attr("class","nv-legend-symbol").attr("r",5),w=L.select(".nv-legend-symbol")):"furious"==m&&(A.append("rect").style("stroke-width",2).attr("class","nv-legend-symbol").attr("rx",3).attr("ry",3),w=L.select(".nv-legend-symbol"),A.append("g").attr("class","nv-check-box").property("innerHTML",'<path d="M0.5,5 L22.5,5 L22.5,26.5 L0.5,26.5 L0.5,5 Z" class="nv-box"></path><path d="M5.5,12.8618467 L11.9185089,19.2803556 L31,0.198864511" class="nv-check"></path>').attr("transform","translate(-10,-8)scale(0.5)"),L.select(".nv-check-box").each((function(e,t){d3.select(this).selectAll("path").attr("stroke",x(e,t))}))),A.append("text").attr("text-anchor","start").attr("class","nv-legend-text").attr("dy",".32em").attr("dx","8");var I=L.select("text.nv-legend-text");L.on("mouseover",(function(e,t){g.legendMouseover(e,t)})).on("mouseout",(function(e,t){g.legendMouseout(e,t)})).on("click",(function(e,t){g.legendClick(e,t);var n=L.data();d&&("classic"==m?f?(n.forEach((function(e){e.disabled=!0})),e.disabled=!1):(e.disabled=!e.disabled,n.every((function(e){return e.disabled}))&&n.forEach((function(e){e.disabled=!1}))):"furious"==m&&(h?(e.disengaged=!e.disengaged,e.userDisabled=null==e.userDisabled?!!e.disabled:e.userDisabled,e.disabled=e.disengaged||e.userDisabled):h||(e.disabled=!e.disabled,e.userDisabled=e.disabled,n.filter((function(e){return!e.disengaged})).every((function(e){return e.userDisabled}))&&n.forEach((function(e){e.disabled=e.userDisabled=!1})))),g.stateChange({disabled:n.map((function(e){return!!e.disabled})),disengaged:n.map((function(e){return!!e.disengaged}))}))})).on("dblclick",(function(e,t){if(p){if("furious"==m&&h)return;if(g.legendDblclick(e,t),d){var n=L.data();n.forEach((function(e){e.disabled=!0,"furious"==m&&(e.userDisabled=e.disabled)})),e.disabled=!1,"furious"==m&&(e.userDisabled=e.disabled),g.stateChange({disabled:n.map((function(e){return!!e.disabled}))})}}})),L.classed("nv-disabled",(function(e){return e.userDisabled})),L.exit().remove(),I.attr("fill",x).text((function(e){return o(i(e))}));var R=0;if(l){var k=[];L.each((function(e,n){var r,a;if(o(i(e))&&o(i(e)).length>s){var l=o(i(e)).substring(0,s);r=d3.select(this).select("text").text(l+"..."),d3.select(this).append("svg:title").text(o(i(e)))}else r=d3.select(this).select("text");try{if((a=r.node().getComputedTextLength())<=0)throw Error()}catch(e){a=t.utils.calcApproxTextWidth(r)}k.push(a+u)}));var _=0,O=[];for(R=0;R<v&&_<k.length;)O[_]=k[_],R+=k[_++];for(0===_&&(_=1);R>v&&_>1;){O=[],_--;for(var D=0;D<k.length;D++)k[D]>(O[D%_]||0)&&(O[D%_]=k[D]);R=O.reduce((function(e,t,n,r){return e+t}))}for(var M=[],P=0,F=0;P<_;P++)M[P]=F,F+=O[P];L.attr("transform",(function(e,t){return"translate("+M[t%_]+","+(5+Math.floor(t/_)*N)+")"})),c?S.attr("transform","translate("+(n-e.right-R)+","+e.top+")"):S.attr("transform","translate(0,"+e.top+")"),r=e.top+e.bottom+Math.ceil(k.length/_)*N}else{var j,B=5,H=5,G=0;L.attr("transform",(function(t,r){var i=d3.select(this).select("text").node().getComputedTextLength()+u;return j=H,n<e.left+e.right+j+i&&(H=j=5,B+=N),(H+=i)>G&&(G=H),R<j+G&&(R=j+G),"translate("+j+","+B+")"})),S.attr("transform","translate("+(n-e.right-G)+","+e.top+")"),r=e.top+e.bottom+B+15}"furious"==m&&(w.attr("width",(function(e,t){return I[0][t].getComputedTextLength()+27})).attr("height",18).attr("y",-9).attr("x",-15),T.insert("rect",":first-child").attr("class","nv-legend-bg").attr("fill","#eee").attr("opacity",0),S.select(".nv-legend-bg").transition().duration(300).attr("x",-N).attr("width",R+N-12).attr("height",r+10).attr("y",-e.top-10).attr("opacity",h?1:0)),w.style("fill",b).style("fill-opacity",E).style("stroke",b)})),v}return v.dispatch=g,v.options=t.utils.optionsFunc.bind(v),v._options=Object.create({},{width:{get:function(){return n},set:function(e){n=e}},height:{get:function(){return r},set:function(e){r=e}},key:{get:function(){return i},set:function(e){i=e}},keyFormatter:{get:function(){return o},set:function(e){o=e}},align:{get:function(){return l},set:function(e){l=e}},maxKeyLength:{get:function(){return s},set:function(e){s=e}},rightAlign:{get:function(){return c},set:function(e){c=e}},padding:{get:function(){return u},set:function(e){u=e}},updateState:{get:function(){return d},set:function(e){d=e}},enableDoubleClick:{get:function(){return p},set:function(e){p=e}},radioButtonMode:{get:function(){return f},set:function(e){f=e}},expanded:{get:function(){return h},set:function(e){h=e}},vers:{get:function(){return m},set:function(e){m=e}},margin:{get:function(){return e},set:function(t){e.top=void 0!==t.top?t.top:e.top,e.right=void 0!==t.right?t.right:e.right,e.bottom=void 0!==t.bottom?t.bottom:e.bottom,e.left=void 0!==t.left?t.left:e.left}},color:{get:function(){return a},set:function(e){a=t.utils.getColor(e)}}}),t.utils.initOptions(v),v},t.models.line=function(){"use strict";var e,n,r=t.models.scatter(),i={top:0,right:0,bottom:0,left:0},o=960,a=500,s=null,l=t.utils.defaultColor(),u=function(e){return e.x},c=function(e){return e.y},d=function(e,t){return!isNaN(c(e,t))&&null!==c(e,t)},p=function(e){return e.area},f=!1,h="linear",g=250,m=d3.dispatch("elementClick","elementMouseover","elementMouseout","renderEnd");r.pointSize(16).pointDomain([16,256]);var v,y,x=t.utils.renderWatch(m,g);function b(g){return x.reset(),x.models(r),g.each((function(g){s=d3.select(this);var m=t.utils.availableWidth(o,s,i),b=t.utils.availableHeight(a,s,i);t.utils.initSVG(s),e=r.xScale(),n=r.yScale(),v=v||e,y=y||n;var E=s.selectAll("g.nv-wrap.nv-line").data([g]),C=E.enter().append("g").attr("class","nvd3 nv-wrap nv-line"),T=C.append("defs"),S=C.append("g"),w=E.select("g");S.append("g").attr("class","nv-groups"),S.append("g").attr("class","nv-scatterWrap"),E.attr("transform","translate("+i.left+","+i.top+")"),r.width(m).height(b);var N=E.select(".nv-scatterWrap");N.call(r),T.append("clipPath").attr("id","nv-edge-clip-"+r.id()).append("rect"),E.select("#nv-edge-clip-"+r.id()+" rect").attr("width",m).attr("height",b>0?b:0),w.attr("clip-path",f?"url(#nv-edge-clip-"+r.id()+")":""),N.attr("clip-path",f?"url(#nv-edge-clip-"+r.id()+")":"");var L=E.select(".nv-groups").selectAll(".nv-group").data((function(e){return e}),(function(e){return e.key}));L.enter().append("g").style("stroke-opacity",1e-6).style("stroke-width",(function(e){return e.strokeWidth||1.5})).style("fill-opacity",1e-6),L.exit().remove(),L.attr("class",(function(e,t){return(e.classed||"")+" nv-group nv-series-"+t})).classed("hover",(function(e){return e.hover})).style("fill",(function(e,t){return l(e,t)})).style("stroke",(function(e,t){return l(e,t)})),L.watchTransition(x,"line: groups").style("stroke-opacity",1).style("fill-opacity",(function(e){return e.fillOpacity||.5}));var A=L.selectAll("path.nv-area").data((function(e){return p(e)?[e]:[]}));A.enter().append("path").attr("class","nv-area").attr("d",(function(e){return d3.svg.area().interpolate(h).defined(d).x((function(e,n){return t.utils.NaNtoZero(v(u(e,n)))})).y0((function(e,n){return t.utils.NaNtoZero(y(c(e,n)))})).y1((function(e,t){return y(n.domain()[0]<=0?n.domain()[1]>=0?0:n.domain()[1]:n.domain()[0])})).apply(this,[e.values])})),L.exit().selectAll("path.nv-area").remove(),A.watchTransition(x,"line: areaPaths").attr("d",(function(r){return d3.svg.area().interpolate(h).defined(d).x((function(n,r){return t.utils.NaNtoZero(e(u(n,r)))})).y0((function(e,r){return t.utils.NaNtoZero(n(c(e,r)))})).y1((function(e,t){return n(n.domain()[0]<=0?n.domain()[1]>=0?0:n.domain()[1]:n.domain()[0])})).apply(this,[r.values])}));var I=L.selectAll("path.nv-line").data((function(e){return[e.values]}));I.enter().append("path").attr("class","nv-line").attr("d",d3.svg.line().interpolate(h).defined(d).x((function(e,n){return t.utils.NaNtoZero(v(u(e,n)))})).y((function(e,n){return t.utils.NaNtoZero(y(c(e,n)))}))),I.watchTransition(x,"line: linePaths").attr("d",d3.svg.line().interpolate(h).defined(d).x((function(n,r){return t.utils.NaNtoZero(e(u(n,r)))})).y((function(e,r){return t.utils.NaNtoZero(n(c(e,r)))}))),v=e.copy(),y=n.copy()})),x.renderEnd("line immediate"),b}return b.dispatch=m,b.scatter=r,r.dispatch.on("elementClick",(function(){m.elementClick.apply(this,arguments)})),r.dispatch.on("elementMouseover",(function(){m.elementMouseover.apply(this,arguments)})),r.dispatch.on("elementMouseout",(function(){m.elementMouseout.apply(this,arguments)})),b.options=t.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return o},set:function(e){o=e}},height:{get:function(){return a},set:function(e){a=e}},defined:{get:function(){return d},set:function(e){d=e}},interpolate:{get:function(){return h},set:function(e){h=e}},clipEdge:{get:function(){return f},set:function(e){f=e}},margin:{get:function(){return i},set:function(e){i.top=void 0!==e.top?e.top:i.top,i.right=void 0!==e.right?e.right:i.right,i.bottom=void 0!==e.bottom?e.bottom:i.bottom,i.left=void 0!==e.left?e.left:i.left}},duration:{get:function(){return g},set:function(e){g=e,x.reset(g),r.duration(g)}},isArea:{get:function(){return p},set:function(e){p=d3.functor(e)}},x:{get:function(){return u},set:function(e){u=e,r.x(e)}},y:{get:function(){return c},set:function(e){c=e,r.y(e)}},color:{get:function(){return l},set:function(e){l=t.utils.getColor(e),r.color(l)}}}),t.utils.inheritOptions(b,r),t.utils.initOptions(b),b},t.models.lineChart=function(){"use strict";var e,n,r=t.models.line(),i=t.models.axis(),o=t.models.axis(),a=t.models.legend(),s=t.interactiveGuideline(),l=t.models.tooltip(),u=t.models.focus(t.models.line()),c={top:30,right:20,bottom:50,left:60},d=null,p=t.utils.defaultColor(),f=null,h=null,g=!0,m="top",v=!0,y=!0,x=!1,b=!1,E=!1,C=t.utils.state(),T=null,S=null,w=d3.dispatch("stateChange","changeState","renderEnd"),N=250;i.orient("bottom").tickPadding(7),o.orient(x?"right":"left"),r.clipEdge(!0).duration(0),l.valueFormatter((function(e,t){return o.tickFormat()(e,t)})).headerFormatter((function(e,t){return i.tickFormat()(e,t)})),s.tooltip.valueFormatter((function(e,t){return o.tickFormat()(e,t)})).headerFormatter((function(e,t){return i.tickFormat()(e,t)}));var L=t.utils.renderWatch(w,N);function A(l){return L.reset(),L.models(r),v&&L.models(i),y&&L.models(o),l.each((function(l){var S=d3.select(this);t.utils.initSVG(S);var L,I=t.utils.availableWidth(f,S,c),R=t.utils.availableHeight(h,S,c)-(E?u.height():0);if(A.update=function(){0===N?S.call(A):S.transition().duration(N).call(A)},A.container=this,C.setter(function(e){return function(t){void 0!==t.active&&e.forEach((function(e,n){e.disabled=!t.active[n]}))}}(l),A.update).getter(function(e){return function(){return{active:e.map((function(e){return!e.disabled}))}}}(l)).update(),C.disabled=l.map((function(e){return!!e.disabled})),!T)for(L in T={},C)C[L]instanceof Array?T[L]=C[L].slice(0):T[L]=C[L];if(!(l&&l.length&&l.filter((function(e){return e.values.length})).length))return t.utils.noData(A,S),A;S.selectAll(".nv-noData").remove(),u.dispatch.on("onBrush",(function(e){B(e)})),e=r.xScale(),n=r.yScale();var k=S.selectAll("g.nv-wrap.nv-lineChart").data([l]),_=k.enter().append("g").attr("class","nvd3 nv-wrap nv-lineChart").append("g"),O=k.select("g");_.append("g").attr("class","nv-legendWrap");var D=_.append("g").attr("class","nv-focus");D.append("g").attr("class","nv-background").append("rect"),D.append("g").attr("class","nv-x nv-axis"),D.append("g").attr("class","nv-y nv-axis"),D.append("g").attr("class","nv-linesWrap"),D.append("g").attr("class","nv-interactive"),_.append("g").attr("class","nv-focusWrap"),g?(a.width(I),O.select(".nv-legendWrap").datum(l).call(a),"bottom"===m?(c.bottom=i.height()+a.height(),R=t.utils.availableHeight(h,S,c),O.select(".nv-legendWrap").attr("transform","translate(0,"+(R+i.height())+")")):"top"===m&&(d||a.height()===c.top||(c.top=a.height(),R=t.utils.availableHeight(h,S,c)-(E?u.height():0)),k.select(".nv-legendWrap").attr("transform","translate(0,"+-c.top+")"))):O.select(".nv-legendWrap").selectAll("*").remove(),k.attr("transform","translate("+c.left+","+c.top+")"),x&&O.select(".nv-y.nv-axis").attr("transform","translate("+I+",0)"),b&&(s.width(I).height(R).margin({left:c.left,top:c.top}).svgContainer(S).xScale(e),k.select(".nv-interactive").call(s)),O.select(".nv-focus .nv-background rect").attr("width",I).attr("height",R),r.width(I).height(R).color(l.map((function(e,t){return e.color||p(e,t)})).filter((function(e,t){return!l[t].disabled})));var M=O.select(".nv-linesWrap").datum(l.filter((function(e){return!e.disabled})));function P(){v&&O.select(".nv-focus .nv-x.nv-axis").transition().duration(N).call(i)}function F(){y&&O.select(".nv-focus .nv-y.nv-axis").transition().duration(N).call(o)}if(v&&i.scale(e)._ticks(t.utils.calcTicksX(I/100,l)).tickSize(-R,0),y&&o.scale(n)._ticks(t.utils.calcTicksY(R/36,l)).tickSize(-I,0),O.select(".nv-focus .nv-x.nv-axis").attr("transform","translate(0,"+R+")"),E||null!==u.brush.extent()){u.width(I),O.select(".nv-focusWrap").style("display",E?"initial":"none").attr("transform","translate(0,"+(R+c.bottom+u.margin().top)+")").call(u);var j=u.brush.empty()?u.xDomain():u.brush.extent();null!==j&&B(j)}else M.call(r),P(),F();function B(e){O.select(".nv-focus .nv-linesWrap").datum(l.filter((function(e){return!e.disabled})).map((function(t,n){return{key:t.key,area:t.area,classed:t.classed,values:t.values.filter((function(t,n){return r.x()(t,n)>=e[0]&&r.x()(t,n)<=e[1]})),disableTooltip:t.disableTooltip}}))).transition().duration(N).call(r),P(),F()}a.dispatch.on("stateChange",(function(e){for(var t in e)C[t]=e[t];w.stateChange(C),A.update()})),s.dispatch.on("elementMousemove",(function(n){r.clearHighlights();var i,a,c,d=[];if(l.filter((function(e,t){return e.seriesIndex=t,!e.disabled&&!e.disableTooltip})).forEach((function(o,s){var l=null!==u.brush.extent()?u.brush.empty()?u.xScale().domain():u.brush.extent():e.domain(),f=o.values.filter((function(e,t){return l[0]<=l[1]?r.x()(e,t)>=l[0]&&r.x()(e,t)<=l[1]:r.x()(e,t)>=l[1]&&r.x()(e,t)<=l[0]})),h=f[a=t.interactiveBisect(f,n.pointXValue,r.x())],g=A.y()(h,a);null!==g&&r.highlightPoint(s,a,!0),void 0!==h&&(void 0===i&&(i=h),void 0===c&&(c=A.xScale()(A.x()(h,a))),d.push({key:o.key,value:g,color:p(o,o.seriesIndex),data:h}))})),d.length>2){var f=A.yScale().invert(n.mouseY),h=.03*Math.abs(A.yScale().domain()[0]-A.yScale().domain()[1]),g=t.nearestValueIndex(d.map((function(e){return e.value})),f,h);null!==g&&(d[g].highlight=!0)}s.tooltip.valueFormatter(s.tooltip.valueFormatter()||function(e,t){return null==e?"N/A":o.tickFormat()(e)}).data({value:A.x()(i,a),index:a,series:d})(),s.renderGuideLine(c)})),s.dispatch.on("elementClick",(function(e){var n,i=[];l.filter((function(e,t){return e.seriesIndex=t,!e.disabled})).forEach((function(r){var o=t.interactiveBisect(r.values,e.pointXValue,A.x()),a=r.values[o];if(void 0!==a){void 0===n&&(n=A.xScale()(A.x()(a,o)));var s=A.yScale()(A.y()(a,o));i.push({point:a,pointIndex:o,pos:[n,s],seriesIndex:r.seriesIndex,series:r})}})),r.dispatch.elementClick(i)})),s.dispatch.on("elementMouseout",(function(e){r.clearHighlights()})),w.on("changeState",(function(e){void 0!==e.disabled&&l.length===e.disabled.length&&(l.forEach((function(t,n){t.disabled=e.disabled[n]})),C.disabled=e.disabled),A.update()}))})),L.renderEnd("lineChart immediate"),A}return r.dispatch.on("elementMouseover.tooltip",(function(e){e.series.disableTooltip||l.data(e).hidden(!1)})),r.dispatch.on("elementMouseout.tooltip",(function(e){l.hidden(!0)})),A.dispatch=w,A.lines=r,A.legend=a,A.focus=u,A.xAxis=i,A.x2Axis=u.xAxis,A.yAxis=o,A.y2Axis=u.yAxis,A.interactiveLayer=s,A.tooltip=l,A.state=C,A.dispatch=w,A.options=t.utils.optionsFunc.bind(A),A._options=Object.create({},{width:{get:function(){return f},set:function(e){f=e}},height:{get:function(){return h},set:function(e){h=e}},showLegend:{get:function(){return g},set:function(e){g=e}},legendPosition:{get:function(){return m},set:function(e){m=e}},showXAxis:{get:function(){return v},set:function(e){v=e}},showYAxis:{get:function(){return y},set:function(e){y=e}},defaultState:{get:function(){return T},set:function(e){T=e}},noData:{get:function(){return S},set:function(e){S=e}},focusEnable:{get:function(){return E},set:function(e){E=e}},focusHeight:{get:function(){return u.height()},set:function(e){u.height(e)}},focusShowAxisX:{get:function(){return u.showXAxis()},set:function(e){u.showXAxis(e)}},focusShowAxisY:{get:function(){return u.showYAxis()},set:function(e){u.showYAxis(e)}},brushExtent:{get:function(){return u.brushExtent()},set:function(e){u.brushExtent(e)}},focusMargin:{get:function(){return u.margin},set:function(e){void 0!==e.top&&(c.top=e.top,d=e.top),u.margin.right=void 0!==e.right?e.right:u.margin.right,u.margin.bottom=void 0!==e.bottom?e.bottom:u.margin.bottom,u.margin.left=void 0!==e.left?e.left:u.margin.left}},margin:{get:function(){return c},set:function(e){c.top=void 0!==e.top?e.top:c.top,c.right=void 0!==e.right?e.right:c.right,c.bottom=void 0!==e.bottom?e.bottom:c.bottom,c.left=void 0!==e.left?e.left:c.left}},duration:{get:function(){return N},set:function(e){N=e,L.reset(N),r.duration(N),u.duration(N),i.duration(N),o.duration(N)}},color:{get:function(){return p},set:function(e){p=t.utils.getColor(e),a.color(p),r.color(p),u.color(p)}},interpolate:{get:function(){return r.interpolate()},set:function(e){r.interpolate(e),u.interpolate(e)}},xTickFormat:{get:function(){return i.tickFormat()},set:function(e){i.tickFormat(e),u.xTickFormat(e)}},yTickFormat:{get:function(){return o.tickFormat()},set:function(e){o.tickFormat(e),u.yTickFormat(e)}},x:{get:function(){return r.x()},set:function(e){r.x(e),u.x(e)}},y:{get:function(){return r.y()},set:function(e){r.y(e),u.y(e)}},rightAlignYAxis:{get:function(){return x},set:function(e){x=e,o.orient(x?"right":"left")}},useInteractiveGuideline:{get:function(){return b},set:function(e){(b=e)&&(r.interactive(!1),r.useVoronoi(!1))}}}),t.utils.inheritOptions(A,r),t.utils.initOptions(A),A},t.models.lineWithFocusChart=function(){return t.models.lineChart().margin({bottom:30}).focusEnable(!0)},t.models.linePlusBarChart=function(){"use strict";var e,n,r,i,o,a,s,l=t.models.line(),u=t.models.line(),c=t.models.historicalBar(),d=t.models.historicalBar(),p=t.models.axis(),f=t.models.axis(),h=t.models.axis(),g=t.models.axis(),m=t.models.axis(),v=t.models.axis(),y=t.models.legend(),x=d3.svg.brush(),b=t.models.tooltip(),E={top:30,right:30,bottom:30,left:60},C=null,T={top:0,right:30,bottom:20,left:60},S=null,w=null,N=function(e){return e.x},L=function(e){return e.y},A=t.utils.defaultColor(),I=!0,R=!0,k=!1,_=!0,O=50,D=null,M=null,P=d3.dispatch("brush","stateChange","changeState"),F=0,j=t.utils.state(),B=null,H=" (left axis)",G=" (right axis)",U=!1;l.clipEdge(!0),u.interactive(!1),u.pointActive((function(e){return!1})),p.orient("bottom").tickPadding(5),h.orient("left"),g.orient("right"),f.orient("bottom").tickPadding(5),m.orient("left"),v.orient("right"),b.headerEnabled(!0).headerFormatter((function(e,t){return p.tickFormat()(e,t)}));var V=function(e){return e.every((function(e){return e.disabled}))};function W(b){return b.each((function(b){var M=d3.select(this);t.utils.initSVG(M);var q,z=t.utils.availableWidth(S,M,E),$=t.utils.availableHeight(w,M,E)-(R?O:0),X=O-T.top-T.bottom;if(W.update=function(){M.transition().duration(F).call(W)},W.container=this,j.setter(function(e){return function(t){void 0!==t.active&&e.forEach((function(e,n){e.disabled=!t.active[n]}))}}(b),W.update).getter(function(e){return function(){return{active:e.map((function(e){return!e.disabled}))}}}(b)).update(),j.disabled=b.map((function(e){return!!e.disabled})),!B)for(q in B={},j)j[q]instanceof Array?B[q]=j[q].slice(0):B[q]=j[q];if(!(b&&b.length&&b.filter((function(e){return e.values.length})).length))return t.utils.noData(W,M),W;M.selectAll(".nv-noData").remove();var Q=b.filter((function(e){return!e.disabled&&e.bar})),Y=b.filter((function(e){return!e.bar}));n=Q.length&&!U?c.xScale():l.xScale(),r=f.scale(),i=U?l.yScale():c.yScale(),o=U?c.yScale():l.yScale(),a=U?u.yScale():d.yScale(),s=U?d.yScale():u.yScale();var K=b.filter((function(e){return!e.disabled&&(U?!e.bar:e.bar)})).map((function(e){return e.values.map((function(e,t){return{x:N(e,t),y:L(e,t)}}))})),J=b.filter((function(e){return!e.disabled&&(U?e.bar:!e.bar)})).map((function(e){return e.values.map((function(e,t){return{x:N(e,t),y:L(e,t)}}))}));n.range([0,z]),r.domain(d3.extent(d3.merge(K.concat(J)),(function(e){return e.x}))).range([0,z]);var Z=M.selectAll("g.nv-wrap.nv-linePlusBar").data([b]),ee=Z.enter().append("g").attr("class","nvd3 nv-wrap nv-linePlusBar").append("g"),te=Z.select("g");ee.append("g").attr("class","nv-legendWrap");var ne=ee.append("g").attr("class","nv-focus");ne.append("g").attr("class","nv-x nv-axis"),ne.append("g").attr("class","nv-y1 nv-axis"),ne.append("g").attr("class","nv-y2 nv-axis"),ne.append("g").attr("class","nv-barsWrap"),ne.append("g").attr("class","nv-linesWrap");var re=ee.append("g").attr("class","nv-context");if(re.append("g").attr("class","nv-x nv-axis"),re.append("g").attr("class","nv-y1 nv-axis"),re.append("g").attr("class","nv-y2 nv-axis"),re.append("g").attr("class","nv-barsWrap"),re.append("g").attr("class","nv-linesWrap"),re.append("g").attr("class","nv-brushBackground"),re.append("g").attr("class","nv-x nv-brush"),I){var ie=y.align()?z/2:z,oe=y.align()?ie:0;y.width(ie),te.select(".nv-legendWrap").datum(b.map((function(e){return e.originalKey=void 0===e.originalKey?e.key:e.originalKey,e.key=U?e.originalKey+(e.bar?G:H):e.originalKey+(e.bar?H:G),e}))).call(y),C||y.height()===E.top||(E.top=y.height(),$=t.utils.availableHeight(w,M,E)-O),te.select(".nv-legendWrap").attr("transform","translate("+oe+","+-E.top+")")}else te.select(".nv-legendWrap").selectAll("*").remove();Z.attr("transform","translate("+E.left+","+E.top+")"),te.select(".nv-context").style("display",R?"initial":"none"),d.width(z).height(X).color(b.map((function(e,t){return e.color||A(e,t)})).filter((function(e,t){return!b[t].disabled&&b[t].bar}))),u.width(z).height(X).color(b.map((function(e,t){return e.color||A(e,t)})).filter((function(e,t){return!b[t].disabled&&!b[t].bar})));var ae=te.select(".nv-context .nv-barsWrap").datum(Q.length?Q:[{values:[]}]),se=te.select(".nv-context .nv-linesWrap").datum(V(Y)?[{values:[]}]:Y.filter((function(e){return!e.disabled})));te.select(".nv-context").attr("transform","translate(0,"+($+E.bottom+T.top)+")"),ae.transition().call(d),se.transition().call(u),_&&(f._ticks(t.utils.calcTicksX(z/100,b)).tickSize(-X,0),te.select(".nv-context .nv-x.nv-axis").attr("transform","translate(0,"+a.range()[0]+")"),te.select(".nv-context .nv-x.nv-axis").transition().call(f)),k&&(m.scale(a)._ticks(X/36).tickSize(-z,0),v.scale(s)._ticks(X/36).tickSize(Q.length?0:-z,0),te.select(".nv-context .nv-y3.nv-axis").style("opacity",Q.length?1:0).attr("transform","translate(0,"+r.range()[0]+")"),te.select(".nv-context .nv-y2.nv-axis").style("opacity",Y.length?1:0).attr("transform","translate("+r.range()[1]+",0)"),te.select(".nv-context .nv-y1.nv-axis").transition().call(m),te.select(".nv-context .nv-y2.nv-axis").transition().call(v)),x.x(r).on("brush",de),D&&x.extent(D);var le=te.select(".nv-brushBackground").selectAll("g").data([D||x.extent()]),ue=le.enter().append("g");ue.append("rect").attr("class","left").attr("x",0).attr("y",0).attr("height",X),ue.append("rect").attr("class","right").attr("x",0).attr("y",0).attr("height",X);var ce=te.select(".nv-x.nv-brush").call(x);function de(){D=x.empty()?null:x.extent(),e=x.empty()?r.domain():x.extent(),P.brush({extent:e,brush:x}),x.empty()||x.extent(D),le.data([x.empty()?r.domain():D]).each((function(e,t){var n=r(e[0])-r.range()[0],i=r.range()[1]-r(e[1]);d3.select(this).select(".left").attr("width",n<0?0:n),d3.select(this).select(".right").attr("x",r(e[1])).attr("width",i<0?0:i)})),c.width(z).height($).color(b.map((function(e,t){return e.color||A(e,t)})).filter((function(e,t){return!b[t].disabled&&b[t].bar}))),l.width(z).height($).color(b.map((function(e,t){return e.color||A(e,t)})).filter((function(e,t){return!b[t].disabled&&!b[t].bar})));var a=te.select(".nv-focus .nv-barsWrap").datum(Q.length?Q.map((function(t,n){return{key:t.key,values:t.values.filter((function(t,n){return c.x()(t,n)>=e[0]&&c.x()(t,n)<=e[1]}))}})):[{values:[]}]),s=te.select(".nv-focus .nv-linesWrap").datum(V(Y)?[{values:[]}]:Y.filter((function(e){return!e.disabled})).map((function(t,n){return{area:t.area,fillOpacity:t.fillOpacity,strokeWidth:t.strokeWidth,key:t.key,values:t.values.filter((function(t,n){return l.x()(t,n)>=e[0]&&l.x()(t,n)<=e[1]}))}})));n=Q.length&&!U?c.xScale():l.xScale(),p.scale(n)._ticks(t.utils.calcTicksX(z/100,b)).tickSize(-$,0),p.domain([Math.ceil(e[0]),Math.floor(e[1])]),te.select(".nv-x.nv-axis").transition().duration(F).call(p),a.transition().duration(F).call(c),s.transition().duration(F).call(l),te.select(".nv-focus .nv-x.nv-axis").attr("transform","translate(0,"+i.range()[0]+")"),h.scale(i)._ticks(t.utils.calcTicksY($/36,b)).tickSize(-z,0),g.scale(o)._ticks(t.utils.calcTicksY($/36,b)),U?g.tickSize(Y.length?0:-z,0):g.tickSize(Q.length?0:-z,0);var u=Q.length?1:0,d=Y.length&&!V(Y)?1:0,f=U?d:u,m=U?u:d;te.select(".nv-focus .nv-y1.nv-axis").style("opacity",f),te.select(".nv-focus .nv-y2.nv-axis").style("opacity",m).attr("transform","translate("+n.range()[1]+",0)"),te.select(".nv-focus .nv-y1.nv-axis").transition().duration(F).call(h),te.select(".nv-focus .nv-y2.nv-axis").transition().duration(F).call(g)}ce.selectAll("rect").attr("height",X),ce.selectAll(".resize").append("path").attr("d",(function(e){var t=+("e"==e),n=t?1:-1,r=X/3;return"M"+.5*n+","+r+"A6,6 0 0 "+t+" "+6.5*n+","+(r+6)+"V"+(2*r-6)+"A6,6 0 0 "+t+" "+.5*n+","+2*r+"ZM"+2.5*n+","+(r+8)+"V"+(2*r-8)+"M"+4.5*n+","+(r+8)+"V"+(2*r-8)})),y.dispatch.on("stateChange",(function(e){for(var t in e)j[t]=e[t];P.stateChange(j),W.update()})),P.on("changeState",(function(e){void 0!==e.disabled&&(b.forEach((function(t,n){t.disabled=e.disabled[n]})),j.disabled=e.disabled),W.update()})),de()})),W}return l.dispatch.on("elementMouseover.tooltip",(function(e){b.duration(100).valueFormatter((function(e,t){return(U?{main:h,focus:m}:{main:g,focus:v}).main.tickFormat()(e,t)})).data(e).hidden(!1)})),l.dispatch.on("elementMouseout.tooltip",(function(e){b.hidden(!0)})),c.dispatch.on("elementMouseover.tooltip",(function(e){e.value=W.x()(e.data),e.series={value:W.y()(e.data),color:e.color},b.duration(0).valueFormatter((function(e,t){return(U?{main:g,focus:v}:{main:h,focus:m}).main.tickFormat()(e,t)})).data(e).hidden(!1)})),c.dispatch.on("elementMouseout.tooltip",(function(e){b.hidden(!0)})),c.dispatch.on("elementMousemove.tooltip",(function(e){b()})),W.dispatch=P,W.legend=y,W.lines=l,W.lines2=u,W.bars=c,W.bars2=d,W.xAxis=p,W.x2Axis=f,W.y1Axis=h,W.y2Axis=g,W.y3Axis=m,W.y4Axis=v,W.tooltip=b,W.options=t.utils.optionsFunc.bind(W),W._options=Object.create({},{width:{get:function(){return S},set:function(e){S=e}},height:{get:function(){return w},set:function(e){w=e}},showLegend:{get:function(){return I},set:function(e){I=e}},brushExtent:{get:function(){return D},set:function(e){D=e}},noData:{get:function(){return M},set:function(e){M=e}},focusEnable:{get:function(){return R},set:function(e){R=e}},focusHeight:{get:function(){return O},set:function(e){O=e}},focusShowAxisX:{get:function(){return _},set:function(e){_=e}},focusShowAxisY:{get:function(){return k},set:function(e){k=e}},legendLeftAxisHint:{get:function(){return H},set:function(e){H=e}},legendRightAxisHint:{get:function(){return G},set:function(e){G=e}},margin:{get:function(){return E},set:function(e){void 0!==e.top&&(E.top=e.top,C=e.top),E.right=void 0!==e.right?e.right:E.right,E.bottom=void 0!==e.bottom?e.bottom:E.bottom,E.left=void 0!==e.left?e.left:E.left}},focusMargin:{get:function(){return T},set:function(e){T.top=void 0!==e.top?e.top:T.top,T.right=void 0!==e.right?e.right:T.right,T.bottom=void 0!==e.bottom?e.bottom:T.bottom,T.left=void 0!==e.left?e.left:T.left}},duration:{get:function(){return F},set:function(e){F=e}},color:{get:function(){return A},set:function(e){A=t.utils.getColor(e),y.color(A)}},x:{get:function(){return N},set:function(e){N=e,l.x(e),u.x(e),c.x(e),d.x(e)}},y:{get:function(){return L},set:function(e){L=e,l.y(e),u.y(e),c.y(e),d.y(e)}},switchYAxisOrder:{get:function(){return U},set:function(e){if(U!==e){var t=h;h=g,g=t;var n=m;m=v,v=n}U=e,h.orient("left"),g.orient("right"),m.orient("left"),v.orient("right")}}}),t.utils.inheritOptions(W,l),t.utils.initOptions(W),W},t.models.multiBar=function(){"use strict";var e,n,r,i,o,a,s,l={top:0,right:0,bottom:0,left:0},u=960,c=500,d=d3.scale.ordinal(),p=d3.scale.linear(),f=Math.floor(1e4*Math.random()),h=null,g=function(e){return e.x},m=function(e){return e.y},v=[0],y=!0,x=!1,b="zero",E=t.utils.defaultColor(),C=!1,T=null,S=500,w=.1,N=.75,L=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout","elementMousemove","renderEnd"),A=t.utils.renderWatch(L,S),I=0;function R(k){return A.reset(),k.each((function(R){var k=u-l.left-l.right,_=c-l.top-l.bottom;h=d3.select(this),t.utils.initSVG(h);var O=0;if(C&&R.length&&(C=[{values:R[0].values.map((function(e){return{x:e.x,y:0,series:e.series,size:.01}}))}]),x){var D=d3.layout.stack().offset(b).values((function(e){return e.values})).y(m)(!R.length&&C?C:R);D.forEach((function(e,t){e.nonStackable?(R[t].nonStackableSeries=O++,D[t]=R[t]):t>0&&D[t-1].nonStackable&&D[t].values.map((function(e,n){e.y0-=D[t-1].values[n].y,e.y1=e.y0+e.y}))})),R=D}R.forEach((function(e,t){e.values.forEach((function(n){n.series=t,n.key=e.key}))})),x&&R.length>0&&R[0].values.map((function(e,t){var n=0,r=0;R.map((function(e,i){if(!R[i].nonStackable){var o=e.values[t];o.size=Math.abs(o.y),o.y<0?(o.y1=r,r-=o.size):(o.y1=o.size+n,n+=o.size)}}))}));var M=n&&r?[]:R.map((function(e,t){return e.values.map((function(e,n){return{x:g(e,n),y:m(e,n),y0:e.y0,y1:e.y1,idx:t}}))}));d.domain(n||d3.merge(M).map((function(e){return e.x}))).rangeBands(i||[0,k],w),p.domain(r||d3.extent(d3.merge(M).map((function(e){var t=e.y;return x&&!R[e.idx].nonStackable&&(t=e.y>0?e.y1:e.y1+e.y),t})).concat(v))).range(o||[_,0]),d.domain()[0]===d.domain()[1]&&(d.domain()[0]?d.domain([d.domain()[0]-.01*d.domain()[0],d.domain()[1]+.01*d.domain()[1]]):d.domain([-1,1])),p.domain()[0]===p.domain()[1]&&(p.domain()[0]?p.domain([p.domain()[0]+.01*p.domain()[0],p.domain()[1]-.01*p.domain()[1]]):p.domain([-1,1])),a=a||d,s=s||p;var P=h.selectAll("g.nv-wrap.nv-multibar").data([R]),F=P.enter().append("g").attr("class","nvd3 nv-wrap nv-multibar"),j=F.append("defs"),B=F.append("g"),H=P.select("g");B.append("g").attr("class","nv-groups"),P.attr("transform","translate("+l.left+","+l.top+")"),j.append("clipPath").attr("id","nv-edge-clip-"+f).append("rect"),P.select("#nv-edge-clip-"+f+" rect").attr("width",k).attr("height",_),H.attr("clip-path",y?"url(#nv-edge-clip-"+f+")":"");var G=P.select(".nv-groups").selectAll(".nv-group").data((function(e){return e}),(function(e,t){return t}));G.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6);var U=A.transition(G.exit().selectAll("rect.nv-bar"),"multibarExit",Math.min(100,S)).attr("y",(function(e,t,n){var r=s(0)||0;return x&&R[e.series]&&!R[e.series].nonStackable&&(r=s(e.y0)),r})).attr("height",0).remove();U.delay&&U.delay((function(e,t){return t*(S/(I+1))-t})),G.attr("class",(function(e,t){return"nv-group nv-series-"+t})).classed("hover",(function(e){return e.hover})).style("fill",(function(e,t){return E(e,t)})).style("stroke",(function(e,t){return E(e,t)})),G.style("stroke-opacity",1).style("fill-opacity",N);var V=G.selectAll("rect.nv-bar").data((function(e){return C&&!R.length?C.values:e.values}));V.exit().remove(),V.enter().append("rect").attr("class",(function(e,t){return m(e,t)<0?"nv-bar negative":"nv-bar positive"})).attr("x",(function(e,t,n){return x&&!R[n].nonStackable?0:n*d.rangeBand()/R.length})).attr("y",(function(e,t,n){return s(x&&!R[n].nonStackable?e.y0:0)||0})).attr("height",0).attr("width",(function(e,t,n){return d.rangeBand()/(x&&!R[n].nonStackable?1:R.length)})).attr("transform",(function(e,t){return"translate("+d(g(e,t))+",0)"})),V.style("fill",(function(e,t,n){return E(e,n,t)})).style("stroke",(function(e,t,n){return E(e,n,t)})).on("mouseover",(function(e,t,n){d3.select(this).classed("hover",!0),L.elementMouseover({data:e,index:t,series:R[n],color:d3.select(this).style("fill")})})).on("mouseout",(function(e,t,n){d3.select(this).classed("hover",!1),L.elementMouseout({data:e,index:t,series:R[n],color:d3.select(this).style("fill")})})).on("mousemove",(function(e,t,n){L.elementMousemove({data:e,index:t,series:R[n],color:d3.select(this).style("fill")})})).on("click",(function(e,t,n){L.elementClick({data:e,index:t,series:R[n],color:d3.select(this).style("fill"),event:d3.event,element:this}),d3.event.stopPropagation()})).on("dblclick",(function(e,t,n){L.elementDblClick({data:e,index:t,series:R[n],color:d3.select(this).style("fill")}),d3.event.stopPropagation()})),V.attr("class",(function(e,t){return m(e,t)<0?"nv-bar negative":"nv-bar positive"})).attr("transform",(function(e,t){return"translate("+d(g(e,t))+",0)"})),T&&(e||(e=R.map((function(){return!0}))),V.style("fill",(function(t,n,r){return d3.rgb(T(t,n)).darker(e.map((function(e,t){return t})).filter((function(t,n){return!e[n]}))[r]).toString()})).style("stroke",(function(t,n,r){return d3.rgb(T(t,n)).darker(e.map((function(e,t){return t})).filter((function(t,n){return!e[n]}))[r]).toString()})));var W=V.watchTransition(A,"multibar",Math.min(250,S)).delay((function(e,t){return t*S/R[0].values.length}));x?W.attr("y",(function(e,t,n){return R[n].nonStackable?m(e,t)<0?p(0):p(0)-p(m(e,t))<-1?p(0)-1:p(m(e,t))||0:p(e.y1)})).attr("height",(function(e,t,n){return R[n].nonStackable?Math.max(Math.abs(p(m(e,t))-p(0)),0)||0:Math.max(Math.abs(p(e.y+e.y0)-p(e.y0)),0)})).attr("x",(function(e,t,n){var r=0;return R[n].nonStackable&&(r=e.series*d.rangeBand()/R.length,R.length!==O&&(r=R[n].nonStackableSeries*d.rangeBand()/(2*O))),r})).attr("width",(function(e,t,n){if(R[n].nonStackable){var r=d.rangeBand()/O;return R.length!==O&&(r=d.rangeBand()/(2*O)),r}return d.rangeBand()})):W.attr("x",(function(e,t){return e.series*d.rangeBand()/R.length})).attr("width",d.rangeBand()/R.length).attr("y",(function(e,t){return m(e,t)<0?p(0):p(0)-p(m(e,t))<1?p(0)-1:p(m(e,t))||0})).attr("height",(function(e,t){return Math.max(Math.abs(p(m(e,t))-p(0)),1)||0})),a=d.copy(),s=p.copy(),R[0]&&R[0].values&&(I=R[0].values.length)})),A.renderEnd("multibar immediate"),R}return R.dispatch=L,R.options=t.utils.optionsFunc.bind(R),R._options=Object.create({},{width:{get:function(){return u},set:function(e){u=e}},height:{get:function(){return c},set:function(e){c=e}},x:{get:function(){return g},set:function(e){g=e}},y:{get:function(){return m},set:function(e){m=e}},xScale:{get:function(){return d},set:function(e){d=e}},yScale:{get:function(){return p},set:function(e){p=e}},xDomain:{get:function(){return n},set:function(e){n=e}},yDomain:{get:function(){return r},set:function(e){r=e}},xRange:{get:function(){return i},set:function(e){i=e}},yRange:{get:function(){return o},set:function(e){o=e}},forceY:{get:function(){return v},set:function(e){v=e}},stacked:{get:function(){return x},set:function(e){x=e}},stackOffset:{get:function(){return b},set:function(e){b=e}},clipEdge:{get:function(){return y},set:function(e){y=e}},disabled:{get:function(){return e},set:function(t){e=t}},id:{get:function(){return f},set:function(e){f=e}},hideable:{get:function(){return C},set:function(e){C=e}},groupSpacing:{get:function(){return w},set:function(e){w=e}},fillOpacity:{get:function(){return N},set:function(e){N=e}},margin:{get:function(){return l},set:function(e){l.top=void 0!==e.top?e.top:l.top,l.right=void 0!==e.right?e.right:l.right,l.bottom=void 0!==e.bottom?e.bottom:l.bottom,l.left=void 0!==e.left?e.left:l.left}},duration:{get:function(){return S},set:function(e){S=e,A.reset(S)}},color:{get:function(){return E},set:function(e){E=t.utils.getColor(e)}},barColor:{get:function(){return T},set:function(e){T=e?t.utils.getColor(e):null}}}),t.utils.initOptions(R),R},t.models.multiBarChart=function(){"use strict";var e,n,r=t.models.multiBar(),i=t.models.axis(),o=t.models.axis(),a=t.interactiveGuideline(),s=t.models.legend(),l=t.models.legend(),u=t.models.tooltip(),c={top:30,right:20,bottom:50,left:60},d=null,p=null,f=null,h=t.utils.defaultColor(),g=!0,m={},v=!0,y=null,x=!0,b=!0,E=!1,C=!0,T=!1,S=!1,w=0,N=t.utils.state(),L=null,A=null,I=d3.dispatch("stateChange","changeState","renderEnd"),R=function(){return g?180:0},k=250,_=!1;N.stacked=!1,r.stacked(!1),i.orient("bottom").tickPadding(7).showMaxMin(!1).tickFormat((function(e){return e})),o.orient(E?"right":"left").tickFormat(d3.format(",.1f")),u.duration(0).valueFormatter((function(e,t){return o.tickFormat()(e,t)})).headerFormatter((function(e,t){return i.tickFormat()(e,t)})),a.tooltip.valueFormatter((function(e,t){return null==e?"N/A":o.tickFormat()(e,t)})).headerFormatter((function(e,t){return i.tickFormat()(e,t)})),a.tooltip.valueFormatter((function(e,t){return null==e?"N/A":o.tickFormat()(e,t)})).headerFormatter((function(e,t){return i.tickFormat()(e,t)})),a.tooltip.duration(0).valueFormatter((function(e,t){return o.tickFormat()(e,t)})).headerFormatter((function(e,t){return i.tickFormat()(e,t)})),l.updateState(!1);var O=t.utils.renderWatch(I),D=!1;function M(A){return O.reset(),O.models(r),x&&O.models(i),b&&O.models(o),A.each((function(A){var O=d3.select(this);t.utils.initSVG(O);var P,F=t.utils.availableWidth(p,O,c),j=t.utils.availableHeight(f,O,c);if(M.update=function(){0===k?O.call(M):O.transition().duration(k).call(M)},M.container=this,N.setter(function(e){return function(t){void 0!==t.stacked&&(D=t.stacked),void 0!==t.active&&e.forEach((function(e,n){e.disabled=!t.active[n]}))}}(A),M.update).getter(function(e){return function(){return{active:e.map((function(e){return!e.disabled})),stacked:D}}}(A)).update(),N.disabled=A.map((function(e){return!!e.disabled})),!L)for(P in L={},N)N[P]instanceof Array?L[P]=N[P].slice(0):L[P]=N[P];if(!(A&&A.length&&A.filter((function(e){return e.values.length})).length))return t.utils.noData(M,O),M;O.selectAll(".nv-noData").remove(),e=r.xScale(),n=r.yScale();var B=O.selectAll("g.nv-wrap.nv-multiBarWithLegend").data([A]),H=B.enter().append("g").attr("class","nvd3 nv-wrap nv-multiBarWithLegend").append("g"),G=B.select("g");if(H.append("g").attr("class","nv-x nv-axis"),H.append("g").attr("class","nv-y nv-axis"),H.append("g").attr("class","nv-barsWrap"),H.append("g").attr("class","nv-legendWrap"),H.append("g").attr("class","nv-controlsWrap"),H.append("g").attr("class","nv-interactive"),v?"bottom"===y?(s.width(F-c.right),G.select(".nv-legendWrap").datum(A).call(s),c.bottom=i.height()+s.height(),j=t.utils.availableHeight(f,O,c),G.select(".nv-legendWrap").attr("transform","translate(0,"+(j+i.height())+")")):(s.width(F-R()),G.select(".nv-legendWrap").datum(A).call(s),d||s.height()===c.top||(c.top=s.height(),j=t.utils.availableHeight(f,O,c)),G.select(".nv-legendWrap").attr("transform","translate("+R()+","+-c.top+")")):G.select(".nv-legendWrap").selectAll("*").remove(),g){var U=[{key:m.grouped||"Grouped",disabled:r.stacked()},{key:m.stacked||"Stacked",disabled:!r.stacked()}];l.width(R()).color(["#444","#444","#444"]),G.select(".nv-controlsWrap").datum(U).attr("transform","translate(0,"+-c.top+")").call(l)}else G.select(".nv-controlsWrap").selectAll("*").remove();if(B.attr("transform","translate("+c.left+","+c.top+")"),E&&G.select(".nv-y.nv-axis").attr("transform","translate("+F+",0)"),r.disabled(A.map((function(e){return e.disabled}))).width(F).height(j).color(A.map((function(e,t){return e.color||h(e,t)})).filter((function(e,t){return!A[t].disabled}))),G.select(".nv-barsWrap").datum(A.filter((function(e){return!e.disabled}))).call(r),x){i.scale(e)._ticks(t.utils.calcTicksX(F/100,A)).tickSize(-j,0),G.select(".nv-x.nv-axis").attr("transform","translate(0,"+n.range()[0]+")"),G.select(".nv-x.nv-axis").call(i);var V=G.select(".nv-x.nv-axis > g").selectAll("g");if(V.selectAll("line, text").style("opacity",1),T){var W=function(e,t){return"translate("+e+","+t+")"};V.selectAll("text").attr("transform",(function(e,t,n){return W(0,n%2==0?5:17)}));var q=d3.selectAll(".nv-x.nv-axis .nv-wrap g g text")[0].length;G.selectAll(".nv-x.nv-axis .nv-axisMaxMin text").attr("transform",(function(e,t){return W(0,0===t||q%2!=0?17:5)}))}S&&G.selectAll(".tick text").call(t.utils.wrapTicks,M.xAxis.rangeBand()),C&&V.filter((function(e,t){return t%Math.ceil(A[0].values.length/(F/100))!=0})).selectAll("text, line").style("opacity",0),w&&V.selectAll(".tick text").attr("transform","rotate("+w+" 0,0)").style("text-anchor",w>0?"start":"end"),G.select(".nv-x.nv-axis").selectAll("g.nv-axisMaxMin text").style("opacity",1)}b&&(o.scale(n)._ticks(t.utils.calcTicksY(j/36,A)).tickSize(-F,0),G.select(".nv-y.nv-axis").call(o)),_&&(a.width(F).height(j).margin({left:c.left,top:c.top}).svgContainer(O).xScale(e),B.select(".nv-interactive").call(a)),s.dispatch.on("stateChange",(function(e){for(var t in e)N[t]=e[t];I.stateChange(N),M.update()})),l.dispatch.on("legendClick",(function(e,t){if(e.disabled){switch(U=U.map((function(e){return e.disabled=!0,e})),e.disabled=!1,e.key){case"Grouped":case m.grouped:r.stacked(!1);break;case"Stacked":case m.stacked:r.stacked(!0)}N.stacked=r.stacked(),I.stateChange(N),M.update()}})),I.on("changeState",(function(e){void 0!==e.disabled&&(A.forEach((function(t,n){t.disabled=e.disabled[n]})),N.disabled=e.disabled),void 0!==e.stacked&&(r.stacked(e.stacked),N.stacked=e.stacked,D=e.stacked),M.update()})),_?(a.dispatch.on("elementMousemove",(function(t){if(null!=t.pointXValue){var n,r,i,o,s=[];A.filter((function(e,t){return e.seriesIndex=t,!e.disabled})).forEach((function(a,l){r=e.domain().indexOf(t.pointXValue);var u=a.values[r];void 0!==u&&(o=u.x,void 0===n&&(n=u),void 0===i&&(i=t.mouseX),s.push({key:a.key,value:M.y()(u,r),color:h(a,a.seriesIndex),data:a.values[r]}))})),a.tooltip.data({value:o,index:r,series:s})(),a.renderGuideLine(i)}})),a.dispatch.on("elementMouseout",(function(e){a.tooltip.hidden(!0)}))):(r.dispatch.on("elementMouseover.tooltip",(function(e){e.value=M.x()(e.data),e.series={key:e.data.key,value:M.y()(e.data),color:e.color},u.data(e).hidden(!1)})),r.dispatch.on("elementMouseout.tooltip",(function(e){u.hidden(!0)})),r.dispatch.on("elementMousemove.tooltip",(function(e){u()})))})),O.renderEnd("multibarchart immediate"),M}return M.dispatch=I,M.multibar=r,M.legend=s,M.controls=l,M.xAxis=i,M.yAxis=o,M.state=N,M.tooltip=u,M.interactiveLayer=a,M.options=t.utils.optionsFunc.bind(M),M._options=Object.create({},{width:{get:function(){return p},set:function(e){p=e}},height:{get:function(){return f},set:function(e){f=e}},showLegend:{get:function(){return v},set:function(e){v=e}},legendPosition:{get:function(){return y},set:function(e){y=e}},showControls:{get:function(){return g},set:function(e){g=e}},controlLabels:{get:function(){return m},set:function(e){m=e}},showXAxis:{get:function(){return x},set:function(e){x=e}},showYAxis:{get:function(){return b},set:function(e){b=e}},defaultState:{get:function(){return L},set:function(e){L=e}},noData:{get:function(){return A},set:function(e){A=e}},reduceXTicks:{get:function(){return C},set:function(e){C=e}},rotateLabels:{get:function(){return w},set:function(e){w=e}},staggerLabels:{get:function(){return T},set:function(e){T=e}},wrapLabels:{get:function(){return S},set:function(e){S=!!e}},margin:{get:function(){return c},set:function(e){void 0!==e.top&&(c.top=e.top,d=e.top),c.right=void 0!==e.right?e.right:c.right,c.bottom=void 0!==e.bottom?e.bottom:c.bottom,c.left=void 0!==e.left?e.left:c.left}},duration:{get:function(){return k},set:function(e){k=e,r.duration(k),i.duration(k),o.duration(k),O.reset(k)}},color:{get:function(){return h},set:function(e){h=t.utils.getColor(e),s.color(h)}},rightAlignYAxis:{get:function(){return E},set:function(e){E=e,o.orient(E?"right":"left")}},useInteractiveGuideline:{get:function(){return _},set:function(e){_=e}},barColor:{get:function(){return r.barColor},set:function(e){r.barColor(e),s.color((function(e,t){return d3.rgb("#ccc").darker(1.5*t).toString()}))}}}),t.utils.inheritOptions(M,r),t.utils.initOptions(M),M},t.models.multiBarHorizontal=function(){"use strict";var e,n,r,i,o,a,s,l={top:0,right:0,bottom:0,left:0},u=960,c=500,d=Math.floor(1e4*Math.random()),p=null,f=d3.scale.ordinal(),h=d3.scale.linear(),g=function(e){return e.x},m=function(e){return e.y},v=function(e){return e.yErr},y=[0],x=t.utils.defaultColor(),b=null,E=!1,C=!1,T=60,S=.1,w=.75,N=d3.format(",.2f"),L=250,A=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout","elementMousemove","renderEnd"),I=t.utils.renderWatch(A,L);function R(d){return I.reset(),d.each((function(d){var L=u-l.left-l.right,R=c-l.top-l.bottom;p=d3.select(this),t.utils.initSVG(p),E&&(d=d3.layout.stack().offset("zero").values((function(e){return e.values})).y(m)(d)),d.forEach((function(e,t){e.values.forEach((function(n){n.series=t,n.key=e.key}))})),E&&d[0].values.map((function(e,t){var n=0,r=0;d.map((function(e){var i=e.values[t];i.size=Math.abs(i.y),i.y<0?(i.y1=r-i.size,r-=i.size):(i.y1=n,n+=i.size)}))}));var k=n&&r?[]:d.map((function(e){return e.values.map((function(e,t){return{x:g(e,t),y:m(e,t),y0:e.y0,y1:e.y1}}))}));f.domain(n||d3.merge(k).map((function(e){return e.x}))).rangeBands(i||[0,R],S),h.domain(r||d3.extent(d3.merge(k).map((function(e){return E?e.y>0?e.y1+e.y:e.y1:e.y})).concat(y))),C&&!E?h.range(o||[h.domain()[0]<0?T:0,L-(h.domain()[1]>0?T:0)]):h.range(o||[0,L]),a=a||f,s=s||d3.scale.linear().domain(h.domain()).range([h(0),h(0)]);var _=d3.select(this).selectAll("g.nv-wrap.nv-multibarHorizontal").data([d]),O=_.enter().append("g").attr("class","nvd3 nv-wrap nv-multibarHorizontal"),D=(O.append("defs"),O.append("g"));_.select("g"),D.append("g").attr("class","nv-groups"),_.attr("transform","translate("+l.left+","+l.top+")");var M=_.select(".nv-groups").selectAll(".nv-group").data((function(e){return e}),(function(e,t){return t}));M.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6),M.exit().watchTransition(I,"multibarhorizontal: exit groups").style("stroke-opacity",1e-6).style("fill-opacity",1e-6).remove(),M.attr("class",(function(e,t){return"nv-group nv-series-"+t})).classed("hover",(function(e){return e.hover})).style("fill",(function(e,t){return x(e,t)})).style("stroke",(function(e,t){return x(e,t)})),M.watchTransition(I,"multibarhorizontal: groups").style("stroke-opacity",1).style("fill-opacity",w);var P=M.selectAll("g.nv-bar").data((function(e){return e.values}));P.exit().remove();var F=P.enter().append("g").attr("transform",(function(e,t,n){return"translate("+s(E?e.y0:0)+","+(E?0:n*f.rangeBand()/d.length+f(g(e,t)))+")"}));F.append("rect").attr("width",0).attr("height",f.rangeBand()/(E?1:d.length)),P.on("mouseover",(function(e,t){d3.select(this).classed("hover",!0),A.elementMouseover({data:e,index:t,color:d3.select(this).style("fill")})})).on("mouseout",(function(e,t){d3.select(this).classed("hover",!1),A.elementMouseout({data:e,index:t,color:d3.select(this).style("fill")})})).on("mouseout",(function(e,t){A.elementMouseout({data:e,index:t,color:d3.select(this).style("fill")})})).on("mousemove",(function(e,t){A.elementMousemove({data:e,index:t,color:d3.select(this).style("fill")})})).on("click",(function(e,t){A.elementClick({data:e,index:t,color:d3.select(this).style("fill"),event:d3.event,element:this}),d3.event.stopPropagation()})).on("dblclick",(function(e,t){A.elementDblClick({data:e,index:t,color:d3.select(this).style("fill")}),d3.event.stopPropagation()})),v(d[0],0)&&(F.append("polyline"),P.select("polyline").attr("fill","none").attr("points",(function(e,t){var n=v(e,t),r=.8*f.rangeBand()/(2*(E?1:d.length));return[[(n=(n=n.length?n:[-Math.abs(n),Math.abs(n)]).map((function(n){return h(n+(m(e,t)<0?0:m(e,t)))-h(0)})))[0],-r],[n[0],r],[n[0],0],[n[1],0],[n[1],-r],[n[1],r]].map((function(e){return e.join(",")})).join(" ")})).attr("transform",(function(e,t){return"translate(0, "+f.rangeBand()/(2*(E?1:d.length))+")"}))),F.append("text"),C&&!E?(P.select("text").attr("text-anchor",(function(e,t){return m(e,t)<0?"end":"start"})).attr("y",f.rangeBand()/(2*d.length)).attr("dy",".32em").text((function(e,t){var n=N(m(e,t)),r=v(e,t);return void 0===r?n:r.length?n+"+"+N(Math.abs(r[1]))+"-"+N(Math.abs(r[0])):n+"±"+N(Math.abs(r))})),P.watchTransition(I,"multibarhorizontal: bars").select("text").attr("x",(function(e,t){return m(e,t)<0?-4:h(m(e,t))-h(0)+4}))):P.selectAll("text").text(""),P.selectAll("text.nv-bar-label").text(""),P.attr("class",(function(e,t){return m(e,t)<0?"nv-bar negative":"nv-bar positive"})),b&&(e||(e=d.map((function(){return!0}))),P.style("fill",(function(t,n,r){return d3.rgb(b(t,n)).darker(e.map((function(e,t){return t})).filter((function(t,n){return!e[n]}))[r]).toString()})).style("stroke",(function(t,n,r){return d3.rgb(b(t,n)).darker(e.map((function(e,t){return t})).filter((function(t,n){return!e[n]}))[r]).toString()}))),E?P.watchTransition(I,"multibarhorizontal: bars").attr("transform",(function(e,t){return"translate("+h(e.y1)+","+f(g(e,t))+")"})).select("rect").attr("width",(function(e,t){return Math.abs(h(m(e,t)+e.y0)-h(e.y0))||0})).attr("height",f.rangeBand()):P.watchTransition(I,"multibarhorizontal: bars").attr("transform",(function(e,t){return"translate("+(m(e,t)<0?h(m(e,t)):h(0))+","+(e.series*f.rangeBand()/d.length+f(g(e,t)))+")"})).select("rect").attr("height",f.rangeBand()/d.length).attr("width",(function(e,t){return Math.max(Math.abs(h(m(e,t))-h(0)),1)||0})),a=f.copy(),s=h.copy()})),I.renderEnd("multibarHorizontal immediate"),R}return R.dispatch=A,R.options=t.utils.optionsFunc.bind(R),R._options=Object.create({},{width:{get:function(){return u},set:function(e){u=e}},height:{get:function(){return c},set:function(e){c=e}},x:{get:function(){return g},set:function(e){g=e}},y:{get:function(){return m},set:function(e){m=e}},yErr:{get:function(){return v},set:function(e){v=e}},xScale:{get:function(){return f},set:function(e){f=e}},yScale:{get:function(){return h},set:function(e){h=e}},xDomain:{get:function(){return n},set:function(e){n=e}},yDomain:{get:function(){return r},set:function(e){r=e}},xRange:{get:function(){return i},set:function(e){i=e}},yRange:{get:function(){return o},set:function(e){o=e}},forceY:{get:function(){return y},set:function(e){y=e}},stacked:{get:function(){return E},set:function(e){E=e}},showValues:{get:function(){return C},set:function(e){C=e}},disabled:{get:function(){return e},set:function(t){e=t}},id:{get:function(){return d},set:function(e){d=e}},valueFormat:{get:function(){return N},set:function(e){N=e}},valuePadding:{get:function(){return T},set:function(e){T=e}},groupSpacing:{get:function(){return S},set:function(e){S=e}},fillOpacity:{get:function(){return w},set:function(e){w=e}},margin:{get:function(){return l},set:function(e){l.top=void 0!==e.top?e.top:l.top,l.right=void 0!==e.right?e.right:l.right,l.bottom=void 0!==e.bottom?e.bottom:l.bottom,l.left=void 0!==e.left?e.left:l.left}},duration:{get:function(){return L},set:function(e){L=e,I.reset(L)}},color:{get:function(){return x},set:function(e){x=t.utils.getColor(e)}},barColor:{get:function(){return b},set:function(e){b=e?t.utils.getColor(e):null}}}),t.utils.initOptions(R),R},t.models.multiBarHorizontalChart=function(){"use strict";var e,n,r=t.models.multiBarHorizontal(),i=t.models.axis(),o=t.models.axis(),a=t.models.legend().height(30),s=t.models.legend().height(30),l=t.models.tooltip(),u={top:30,right:20,bottom:50,left:60},c=null,d=null,p=null,f=t.utils.defaultColor(),h=!0,g="top",m={},v=!0,y="top",x=!0,b=!0,E=!1,C=t.utils.state(),T=null,S=null,w=d3.dispatch("stateChange","changeState","renderEnd"),N=function(){return h?180:0},L=250;C.stacked=!1,r.stacked(E),i.orient("left").tickPadding(5).showMaxMin(!1).tickFormat((function(e){return e})),o.orient("bottom").tickFormat(d3.format(",.1f")),l.duration(0).valueFormatter((function(e,t){return o.tickFormat()(e,t)})).headerFormatter((function(e,t){return i.tickFormat()(e,t)})),s.updateState(!1);var A=t.utils.renderWatch(w,L);function I(l){return A.reset(),A.models(r),x&&A.models(i),b&&A.models(o),l.each((function(l){var S=d3.select(this);t.utils.initSVG(S);var A,R=t.utils.availableWidth(d,S,u),k=t.utils.availableHeight(p,S,u);if(I.update=function(){S.transition().duration(L).call(I)},I.container=this,E=r.stacked(),C.setter(function(e){return function(t){void 0!==t.stacked&&(E=t.stacked),void 0!==t.active&&e.forEach((function(e,n){e.disabled=!t.active[n]}))}}(l),I.update).getter(function(e){return function(){return{active:e.map((function(e){return!e.disabled})),stacked:E}}}(l)).update(),C.disabled=l.map((function(e){return!!e.disabled})),!T)for(A in T={},C)C[A]instanceof Array?T[A]=C[A].slice(0):T[A]=C[A];if(!(l&&l.length&&l.filter((function(e){return e.values.length})).length))return t.utils.noData(I,S),I;S.selectAll(".nv-noData").remove(),e=r.xScale(),n=r.yScale().clamp(!0);var _=S.selectAll("g.nv-wrap.nv-multiBarHorizontalChart").data([l]),O=_.enter().append("g").attr("class","nvd3 nv-wrap nv-multiBarHorizontalChart").append("g"),D=_.select("g");if(O.append("g").attr("class","nv-x nv-axis"),O.append("g").attr("class","nv-y nv-axis").append("g").attr("class","nv-zeroLine").append("line"),O.append("g").attr("class","nv-barsWrap"),O.append("g").attr("class","nv-legendWrap"),O.append("g").attr("class","nv-controlsWrap"),v?(a.width(R-N()),D.select(".nv-legendWrap").datum(l).call(a),"bottom"===y?(u.bottom=i.height()+a.height(),k=t.utils.availableHeight(p,S,u),D.select(".nv-legendWrap").attr("transform","translate("+N()+","+(k+i.height())+")")):"top"===y&&(c||a.height()===u.top||(u.top=a.height(),k=t.utils.availableHeight(p,S,u)),D.select(".nv-legendWrap").attr("transform","translate("+N()+","+-u.top+")"))):D.select(".nv-legendWrap").selectAll("*").remove(),h){var M=[{key:m.grouped||"Grouped",disabled:r.stacked()},{key:m.stacked||"Stacked",disabled:!r.stacked()}];s.width(N()).color(["#444","#444","#444"]),"bottom"===g?(u.bottom=i.height()+a.height(),k=t.utils.availableHeight(p,S,u),D.select(".nv-controlsWrap").datum(M).attr("transform","translate(0,"+(k+i.height())+")").call(s)):"top"===g&&D.select(".nv-controlsWrap").datum(M).attr("transform","translate(0,"+-u.top+")").call(s)}else D.select(".nv-controlsWrap").selectAll("*").remove();_.attr("transform","translate("+u.left+","+u.top+")"),r.disabled(l.map((function(e){return e.disabled}))).width(R).height(k).color(l.map((function(e,t){return e.color||f(e,t)})).filter((function(e,t){return!l[t].disabled}))),D.select(".nv-barsWrap").datum(l.filter((function(e){return!e.disabled}))).transition().call(r),x&&(i.scale(e)._ticks(t.utils.calcTicksY(k/24,l)).tickSize(-R,0),D.select(".nv-x.nv-axis").call(i),D.select(".nv-x.nv-axis").selectAll("g").selectAll("line, text")),b&&(o.scale(n)._ticks(t.utils.calcTicksX(R/100,l)).tickSize(-k,0),D.select(".nv-y.nv-axis").attr("transform","translate(0,"+k+")"),D.select(".nv-y.nv-axis").call(o)),D.select(".nv-zeroLine line").attr("x1",n(0)).attr("x2",n(0)).attr("y1",0).attr("y2",-k),a.dispatch.on("stateChange",(function(e){for(var t in e)C[t]=e[t];w.stateChange(C),I.update()})),s.dispatch.on("legendClick",(function(e,t){if(e.disabled){switch(M=M.map((function(e){return e.disabled=!0,e})),e.disabled=!1,e.key){case"Grouped":case m.grouped:r.stacked(!1);break;case"Stacked":case m.stacked:r.stacked(!0)}C.stacked=r.stacked(),w.stateChange(C),E=r.stacked(),I.update()}})),w.on("changeState",(function(e){void 0!==e.disabled&&(l.forEach((function(t,n){t.disabled=e.disabled[n]})),C.disabled=e.disabled),void 0!==e.stacked&&(r.stacked(e.stacked),C.stacked=e.stacked,E=e.stacked),I.update()}))})),A.renderEnd("multibar horizontal chart immediate"),I}return r.dispatch.on("elementMouseover.tooltip",(function(e){e.value=I.x()(e.data),e.series={key:e.data.key,value:I.y()(e.data),color:e.color},l.data(e).hidden(!1)})),r.dispatch.on("elementMouseout.tooltip",(function(e){l.hidden(!0)})),r.dispatch.on("elementMousemove.tooltip",(function(e){l()})),I.dispatch=w,I.multibar=r,I.legend=a,I.controls=s,I.xAxis=i,I.yAxis=o,I.state=C,I.tooltip=l,I.options=t.utils.optionsFunc.bind(I),I._options=Object.create({},{width:{get:function(){return d},set:function(e){d=e}},height:{get:function(){return p},set:function(e){p=e}},showLegend:{get:function(){return v},set:function(e){v=e}},legendPosition:{get:function(){return y},set:function(e){y=e}},controlsPosition:{get:function(){return g},set:function(e){g=e}},showControls:{get:function(){return h},set:function(e){h=e}},controlLabels:{get:function(){return m},set:function(e){m=e}},showXAxis:{get:function(){return x},set:function(e){x=e}},showYAxis:{get:function(){return b},set:function(e){b=e}},defaultState:{get:function(){return T},set:function(e){T=e}},noData:{get:function(){return S},set:function(e){S=e}},margin:{get:function(){return u},set:function(e){void 0!==e.top&&(u.top=e.top,c=e.top),u.right=void 0!==e.right?e.right:u.right,u.bottom=void 0!==e.bottom?e.bottom:u.bottom,u.left=void 0!==e.left?e.left:u.left}},duration:{get:function(){return L},set:function(e){L=e,A.reset(L),r.duration(L),i.duration(L),o.duration(L)}},color:{get:function(){return f},set:function(e){f=t.utils.getColor(e),a.color(f)}},barColor:{get:function(){return r.barColor},set:function(e){r.barColor(e),a.color((function(e,t){return d3.rgb("#ccc").darker(1.5*t).toString()}))}}}),t.utils.inheritOptions(I,r),t.utils.initOptions(I),I},t.models.multiChart=function(){"use strict";var e,n,r={top:30,right:20,bottom:50,left:60},i=null,o=t.utils.defaultColor(),a=null,s=null,l=!0,u=null,c=function(e){return e.x},d=function(e){return e.y},p="linear",f=!0,h=t.interactiveGuideline(),g=!1,m=" (right axis)",v=250,y=d3.scale.linear(),x=d3.scale.linear(),b=d3.scale.linear(),E=t.models.line().yScale(x).duration(v),C=t.models.line().yScale(b).duration(v),T=t.models.scatter().yScale(x).duration(v),S=t.models.scatter().yScale(b).duration(v),w=t.models.multiBar().stacked(!1).yScale(x).duration(v),N=t.models.multiBar().stacked(!1).yScale(b).duration(v),L=t.models.stackedArea().yScale(x).duration(v),A=t.models.stackedArea().yScale(b).duration(v),I=t.models.axis().scale(y).orient("bottom").tickPadding(5).duration(v),R=t.models.axis().scale(x).orient("left").duration(v),k=t.models.axis().scale(b).orient("right").duration(v),_=t.models.legend().height(30),O=t.models.tooltip(),D=d3.dispatch(),M=[E,C,T,S,w,N,L,A];function P(u){return u.each((function(u){var f=d3.select(this);t.utils.initSVG(f),P.update=function(){f.transition().call(P)},P.container=this;var v=t.utils.availableWidth(a,f,r),D=t.utils.availableHeight(s,f,r),F=u.filter((function(e){return"line"==e.type&&1==e.yAxis})),j=u.filter((function(e){return"line"==e.type&&2==e.yAxis})),B=u.filter((function(e){return"scatter"==e.type&&1==e.yAxis})),H=u.filter((function(e){return"scatter"==e.type&&2==e.yAxis})),G=u.filter((function(e){return"bar"==e.type&&1==e.yAxis})),U=u.filter((function(e){return"bar"==e.type&&2==e.yAxis})),V=u.filter((function(e){return"area"==e.type&&1==e.yAxis})),W=u.filter((function(e){return"area"==e.type&&2==e.yAxis}));if(!(u&&u.length&&u.filter((function(e){return e.values.length})).length))return t.utils.noData(P,f),P;f.selectAll(".nv-noData").remove();var q=u.filter((function(e){return!e.disabled&&1==e.yAxis})).map((function(e){return e.values.map((function(e,t){return{x:c(e),y:d(e)}}))})),z=u.filter((function(e){return!e.disabled&&2==e.yAxis})).map((function(e){return e.values.map((function(e,t){return{x:c(e),y:d(e)}}))}));y.domain(d3.extent(d3.merge(q.concat(z)),(function(e){return e.x}))).range([0,v]);var $=f.selectAll("g.wrap.multiChart").data([u]),X=$.enter().append("g").attr("class","wrap nvd3 multiChart").append("g");X.append("g").attr("class","nv-x nv-axis"),X.append("g").attr("class","nv-y1 nv-axis"),X.append("g").attr("class","nv-y2 nv-axis"),X.append("g").attr("class","stack1Wrap"),X.append("g").attr("class","stack2Wrap"),X.append("g").attr("class","bars1Wrap"),X.append("g").attr("class","bars2Wrap"),X.append("g").attr("class","scatters1Wrap"),X.append("g").attr("class","scatters2Wrap"),X.append("g").attr("class","lines1Wrap"),X.append("g").attr("class","lines2Wrap"),X.append("g").attr("class","legendWrap"),X.append("g").attr("class","nv-interactive");var Q=$.select("g"),Y=u.map((function(e,t){return u[t].color||o(e,t)}));if(l){var K=_.align()?v/2:v,J=_.align()?K:0;_.width(K),_.color(Y),Q.select(".legendWrap").datum(u.map((function(e){return e.originalKey=void 0===e.originalKey?e.key:e.originalKey,e.key=e.originalKey+(1==e.yAxis?"":m),e}))).call(_),i||_.height()===r.top||(r.top=_.height(),D=t.utils.availableHeight(s,f,r)),Q.select(".legendWrap").attr("transform","translate("+J+","+-r.top+")")}else Q.select(".legendWrap").selectAll("*").remove();E.width(v).height(D).interpolate(p).color(Y.filter((function(e,t){return!u[t].disabled&&1==u[t].yAxis&&"line"==u[t].type}))),C.width(v).height(D).interpolate(p).color(Y.filter((function(e,t){return!u[t].disabled&&2==u[t].yAxis&&"line"==u[t].type}))),T.width(v).height(D).color(Y.filter((function(e,t){return!u[t].disabled&&1==u[t].yAxis&&"scatter"==u[t].type}))),S.width(v).height(D).color(Y.filter((function(e,t){return!u[t].disabled&&2==u[t].yAxis&&"scatter"==u[t].type}))),w.width(v).height(D).color(Y.filter((function(e,t){return!u[t].disabled&&1==u[t].yAxis&&"bar"==u[t].type}))),N.width(v).height(D).color(Y.filter((function(e,t){return!u[t].disabled&&2==u[t].yAxis&&"bar"==u[t].type}))),L.width(v).height(D).interpolate(p).color(Y.filter((function(e,t){return!u[t].disabled&&1==u[t].yAxis&&"area"==u[t].type}))),A.width(v).height(D).interpolate(p).color(Y.filter((function(e,t){return!u[t].disabled&&2==u[t].yAxis&&"area"==u[t].type}))),Q.attr("transform","translate("+r.left+","+r.top+")");var Z=Q.select(".lines1Wrap").datum(F.filter((function(e){return!e.disabled}))),ee=Q.select(".scatters1Wrap").datum(B.filter((function(e){return!e.disabled}))),te=Q.select(".bars1Wrap").datum(G.filter((function(e){return!e.disabled}))),ne=Q.select(".stack1Wrap").datum(V.filter((function(e){return!e.disabled}))),re=Q.select(".lines2Wrap").datum(j.filter((function(e){return!e.disabled}))),ie=Q.select(".scatters2Wrap").datum(H.filter((function(e){return!e.disabled}))),oe=Q.select(".bars2Wrap").datum(U.filter((function(e){return!e.disabled}))),ae=Q.select(".stack2Wrap").datum(W.filter((function(e){return!e.disabled}))),se=[];w.stacked()&&G.length&&(se=G.filter((function(e){return!e.disabled})).map((function(e){return e.values}))).length>0&&(se=se.reduce((function(e,t){return e.map((function(e,n){return{x:e.x,y:e.y+t[n].y}}))}))),G.length&&se.push({x:0,y:0});var le=[];function ue(e){var t=2===e.series.yAxis?k:R;e.value=e.point.x,e.series={value:e.point.y,color:e.point.color,key:e.series.key},O.duration(0).headerFormatter((function(e,t){return I.tickFormat()(e,t)})).valueFormatter((function(e,n){return t.tickFormat()(e,n)})).data(e).hidden(!1)}function ce(e){var t=2===e.series.yAxis?k:R;e.value=e.point.x,e.series={value:e.point.y,color:e.point.color,key:e.series.key},O.duration(100).headerFormatter((function(e,t){return I.tickFormat()(e,t)})).valueFormatter((function(e,n){return t.tickFormat()(e,n)})).data(e).hidden(!1)}function de(e){var t=2===e.series.yAxis?k:R;e.point.x=L.x()(e.point),e.point.y=L.y()(e.point),O.duration(0).headerFormatter((function(e,t){return I.tickFormat()(e,t)})).valueFormatter((function(e,n){return t.tickFormat()(e,n)})).data(e).hidden(!1)}function pe(e){var t=2===e.series.yAxis?k:R;e.value=w.x()(e.data),e.series={value:w.y()(e.data),color:e.color,key:e.data.key},O.duration(0).headerFormatter((function(e,t){return I.tickFormat()(e,t)})).valueFormatter((function(e,n){return t.tickFormat()(e,n)})).data(e).hidden(!1)}function fe(){for(var e=0,t=M.length;e<t;e++){var n=M[e];try{n.clearHighlights()}catch(e){}}}N.stacked()&&U.length&&(le=U.filter((function(e){return!e.disabled})).map((function(e){return e.values}))).length>0&&(le=le.reduce((function(e,t){return e.map((function(e,n){return{x:e.x,y:e.y+t[n].y}}))}))),U.length&&le.push({x:0,y:0}),x.domain(e||d3.extent(d3.merge(q).concat(se),(function(e){return e.y}))).range([0,D]),b.domain(n||d3.extent(d3.merge(z).concat(le),(function(e){return e.y}))).range([0,D]),E.yDomain(x.domain()),T.yDomain(x.domain()),w.yDomain(x.domain()),L.yDomain(x.domain()),C.yDomain(b.domain()),S.yDomain(b.domain()),N.yDomain(b.domain()),A.yDomain(b.domain()),V.length&&d3.transition(ne).call(L),W.length&&d3.transition(ae).call(A),G.length&&d3.transition(te).call(w),U.length&&d3.transition(oe).call(N),F.length&&d3.transition(Z).call(E),j.length&&d3.transition(re).call(C),B.length&&d3.transition(ee).call(T),H.length&&d3.transition(ie).call(S),I._ticks(t.utils.calcTicksX(v/100,u)).tickSize(-D,0),Q.select(".nv-x.nv-axis").attr("transform","translate(0,"+D+")"),d3.transition(Q.select(".nv-x.nv-axis")).call(I),R._ticks(t.utils.calcTicksY(D/36,u)).tickSize(-v,0),d3.transition(Q.select(".nv-y1.nv-axis")).call(R),k._ticks(t.utils.calcTicksY(D/36,u)).tickSize(-v,0),d3.transition(Q.select(".nv-y2.nv-axis")).call(k),Q.select(".nv-y1.nv-axis").classed("nv-disabled",!q.length).attr("transform","translate("+y.range()[0]+",0)"),Q.select(".nv-y2.nv-axis").classed("nv-disabled",!z.length).attr("transform","translate("+y.range()[1]+",0)"),_.dispatch.on("stateChange",(function(e){P.update()})),g&&(h.width(v).height(D).margin({left:r.left,top:r.top}).svgContainer(f).xScale(y),$.select(".nv-interactive").call(h)),g?(h.dispatch.on("elementMousemove",(function(e){fe();var n,r,i,a=[];u.filter((function(e,t){return e.seriesIndex=t,!e.disabled})).forEach((function(s,l){var u=y.domain(),c=s.values.filter((function(e,t){return P.x()(e,t)>=u[0]&&P.x()(e,t)<=u[1]})),d=c[r=t.interactiveBisect(c,e.pointXValue,P.x())],p=P.y()(d,r);null!==p&&function(e,t,n){for(var r=0,i=M.length;r<i;r++){var o=M[r];try{o.highlightPoint(e,t,n)}catch(e){}}}(l,r,!0),void 0!==d&&(void 0===n&&(n=d),void 0===i&&(i=y(P.x()(d,r))),a.push({key:s.key,value:p,color:o(s,s.seriesIndex),data:d,yAxis:2==s.yAxis?k:R}))})),h.tooltip.headerFormatter((function(e,t){return I.tickFormat()(e,t)})).valueFormatter(h.tooltip.valueFormatter()||function(e,t){var n=a[t].yAxis;return null==e?"N/A":n.tickFormat()(e)}).data({value:P.x()(n,r),index:r,series:a})(),h.renderGuideLine(i)})),h.dispatch.on("elementMouseout",(function(e){fe()}))):(E.dispatch.on("elementMouseover.tooltip",ue),C.dispatch.on("elementMouseover.tooltip",ue),E.dispatch.on("elementMouseout.tooltip",(function(e){O.hidden(!0)})),C.dispatch.on("elementMouseout.tooltip",(function(e){O.hidden(!0)})),T.dispatch.on("elementMouseover.tooltip",ce),S.dispatch.on("elementMouseover.tooltip",ce),T.dispatch.on("elementMouseout.tooltip",(function(e){O.hidden(!0)})),S.dispatch.on("elementMouseout.tooltip",(function(e){O.hidden(!0)})),L.dispatch.on("elementMouseover.tooltip",de),A.dispatch.on("elementMouseover.tooltip",de),L.dispatch.on("elementMouseout.tooltip",(function(e){O.hidden(!0)})),A.dispatch.on("elementMouseout.tooltip",(function(e){O.hidden(!0)})),w.dispatch.on("elementMouseover.tooltip",pe),N.dispatch.on("elementMouseover.tooltip",pe),w.dispatch.on("elementMouseout.tooltip",(function(e){O.hidden(!0)})),N.dispatch.on("elementMouseout.tooltip",(function(e){O.hidden(!0)})),w.dispatch.on("elementMousemove.tooltip",(function(e){O()})),N.dispatch.on("elementMousemove.tooltip",(function(e){O()})))})),P}return P.dispatch=D,P.legend=_,P.lines1=E,P.lines2=C,P.scatters1=T,P.scatters2=S,P.bars1=w,P.bars2=N,P.stack1=L,P.stack2=A,P.xAxis=I,P.yAxis1=R,P.yAxis2=k,P.tooltip=O,P.interactiveLayer=h,P.options=t.utils.optionsFunc.bind(P),P._options=Object.create({},{width:{get:function(){return a},set:function(e){a=e}},height:{get:function(){return s},set:function(e){s=e}},showLegend:{get:function(){return l},set:function(e){l=e}},yDomain1:{get:function(){return e},set:function(t){e=t}},yDomain2:{get:function(){return n},set:function(e){n=e}},noData:{get:function(){return u},set:function(e){u=e}},interpolate:{get:function(){return p},set:function(e){p=e}},legendRightAxisHint:{get:function(){return m},set:function(e){m=e}},margin:{get:function(){return r},set:function(e){void 0!==e.top&&(r.top=e.top,i=e.top),r.right=void 0!==e.right?e.right:r.right,r.bottom=void 0!==e.bottom?e.bottom:r.bottom,r.left=void 0!==e.left?e.left:r.left}},color:{get:function(){return o},set:function(e){o=t.utils.getColor(e)}},x:{get:function(){return c},set:function(e){c=e,E.x(e),C.x(e),T.x(e),S.x(e),w.x(e),N.x(e),L.x(e),A.x(e)}},y:{get:function(){return d},set:function(e){d=e,E.y(e),C.y(e),T.y(e),S.y(e),L.y(e),A.y(e),w.y(e),N.y(e)}},useVoronoi:{get:function(){return f},set:function(e){f=e,E.useVoronoi(e),C.useVoronoi(e),L.useVoronoi(e),A.useVoronoi(e)}},useInteractiveGuideline:{get:function(){return g},set:function(e){(g=e)&&(E.interactive(!1),E.useVoronoi(!1),C.interactive(!1),C.useVoronoi(!1),L.interactive(!1),L.useVoronoi(!1),A.interactive(!1),A.useVoronoi(!1),T.interactive(!1),S.interactive(!1))}},duration:{get:function(){return v},set:function(e){v=e,[E,C,L,A,T,S,I,R,k].forEach((function(e){e.duration(v)}))}}}),t.utils.initOptions(P),P},t.models.ohlcBar=function(){"use strict";var e,n,r,i,o={top:0,right:0,bottom:0,left:0},a=null,s=null,l=Math.floor(1e4*Math.random()),u=null,c=d3.scale.linear(),d=d3.scale.linear(),p=function(e){return e.x},f=function(e){return e.y},h=function(e){return e.open},g=function(e){return e.close},m=function(e){return e.high},v=function(e){return e.low},y=[],x=[],b=!1,E=!0,C=t.utils.defaultColor(),T=!1,S=d3.dispatch("stateChange","changeState","renderEnd","chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout","elementMousemove");function w(T){return T.each((function(T){u=d3.select(this);var w=t.utils.availableWidth(a,u,o),N=t.utils.availableHeight(s,u,o);t.utils.initSVG(u);var L=w/T[0].values.length*.9;c.domain(e||d3.extent(T[0].values.map(p).concat(y))),b?c.range(r||[.5*w/T[0].values.length,w*(T[0].values.length-.5)/T[0].values.length]):c.range(r||[5+L/2,w-L/2-5]),d.domain(n||[d3.min(T[0].values.map(v).concat(x)),d3.max(T[0].values.map(m).concat(x))]).range(i||[N,0]),c.domain()[0]===c.domain()[1]&&(c.domain()[0]?c.domain([c.domain()[0]-.01*c.domain()[0],c.domain()[1]+.01*c.domain()[1]]):c.domain([-1,1])),d.domain()[0]===d.domain()[1]&&(d.domain()[0]?d.domain([d.domain()[0]+.01*d.domain()[0],d.domain()[1]-.01*d.domain()[1]]):d.domain([-1,1]));var A=d3.select(this).selectAll("g.nv-wrap.nv-ohlcBar").data([T[0].values]),I=A.enter().append("g").attr("class","nvd3 nv-wrap nv-ohlcBar"),R=I.append("defs"),k=I.append("g"),_=A.select("g");k.append("g").attr("class","nv-ticks"),A.attr("transform","translate("+o.left+","+o.top+")"),u.on("click",(function(e,t){S.chartClick({data:e,index:t,pos:d3.event,id:l})})),R.append("clipPath").attr("id","nv-chart-clip-path-"+l).append("rect"),A.select("#nv-chart-clip-path-"+l+" rect").attr("width",w).attr("height",N),_.attr("clip-path",E?"url(#nv-chart-clip-path-"+l+")":"");var O=A.select(".nv-ticks").selectAll(".nv-tick").data((function(e){return e}));O.exit().remove(),O.enter().append("path").attr("class",(function(e,t,n){return(h(e,t)>g(e,t)?"nv-tick negative":"nv-tick positive")+" nv-tick-"+n+"-"+t})).attr("d",(function(e,t){return"m0,0l0,"+(d(h(e,t))-d(m(e,t)))+"l"+-L/2+",0l"+L/2+",0l0,"+(d(v(e,t))-d(h(e,t)))+"l0,"+(d(g(e,t))-d(v(e,t)))+"l"+L/2+",0l"+-L/2+",0z"})).attr("transform",(function(e,t){return"translate("+c(p(e,t))+","+d(m(e,t))+")"})).attr("fill",(function(e,t){return C[0]})).attr("stroke",(function(e,t){return C[0]})).attr("x",0).attr("y",(function(e,t){return d(Math.max(0,f(e,t)))})).attr("height",(function(e,t){return Math.abs(d(f(e,t))-d(0))})),O.attr("class",(function(e,t,n){return(h(e,t)>g(e,t)?"nv-tick negative":"nv-tick positive")+" nv-tick-"+n+"-"+t})),d3.transition(O).attr("transform",(function(e,t){return"translate("+c(p(e,t))+","+d(m(e,t))+")"})).attr("d",(function(e,t){var n=w/T[0].values.length*.9;return"m0,0l0,"+(d(h(e,t))-d(m(e,t)))+"l"+-n/2+",0l"+n/2+",0l0,"+(d(v(e,t))-d(h(e,t)))+"l0,"+(d(g(e,t))-d(v(e,t)))+"l"+n/2+",0l"+-n/2+",0z"}))})),w}return w.highlightPoint=function(e,t){w.clearHighlights(),u.select(".nv-ohlcBar .nv-tick-0-"+e).classed("hover",t)},w.clearHighlights=function(){u.select(".nv-ohlcBar .nv-tick.hover").classed("hover",!1)},w.dispatch=S,w.options=t.utils.optionsFunc.bind(w),w._options=Object.create({},{width:{get:function(){return a},set:function(e){a=e}},height:{get:function(){return s},set:function(e){s=e}},xScale:{get:function(){return c},set:function(e){c=e}},yScale:{get:function(){return d},set:function(e){d=e}},xDomain:{get:function(){return e},set:function(t){e=t}},yDomain:{get:function(){return n},set:function(e){n=e}},xRange:{get:function(){return r},set:function(e){r=e}},yRange:{get:function(){return i},set:function(e){i=e}},forceX:{get:function(){return y},set:function(e){y=e}},forceY:{get:function(){return x},set:function(e){x=e}},padData:{get:function(){return b},set:function(e){b=e}},clipEdge:{get:function(){return E},set:function(e){E=e}},id:{get:function(){return l},set:function(e){l=e}},interactive:{get:function(){return T},set:function(e){T=e}},x:{get:function(){return p},set:function(e){p=e}},y:{get:function(){return f},set:function(e){f=e}},open:{get:function(){return h()},set:function(e){h=e}},close:{get:function(){return g()},set:function(e){g=e}},high:{get:function(){return m},set:function(e){m=e}},low:{get:function(){return v},set:function(e){v=e}},margin:{get:function(){return o},set:function(e){o.top=null!=e.top?e.top:o.top,o.right=null!=e.right?e.right:o.right,o.bottom=null!=e.bottom?e.bottom:o.bottom,o.left=null!=e.left?e.left:o.left}},color:{get:function(){return C},set:function(e){C=t.utils.getColor(e)}}}),t.utils.initOptions(w),w},t.models.parallelCoordinates=function(){"use strict";var e,n,r,i={top:30,right:0,bottom:10,left:0},o=null,a=null,s=null,l=null,u=d3.scale.ordinal(),c={},d="undefined values",p=[],f=[],h=[],g=!0,m=t.utils.defaultColor(),v=[],y=[],x=[],b=[],E=1,C=d3.svg.line(),T=d3.svg.axis(),S=d3.dispatch("brushstart","brush","brushEnd","dimensionsOrder","stateChange","elementClick","elementMouseover","elementMouseout","elementMousemove","renderEnd","activeChanged"),w=t.utils.renderWatch(S);function N(L){return w.reset(),L.each((function(w){var N=d3.select(this);if(s=t.utils.availableWidth(o,N,i),l=t.utils.availableHeight(a,N,i),t.utils.initSVG(N),void 0===w[0].values){var L=[];w.forEach((function(e){var t={};Object.keys(e).forEach((function(n){"name"!==n&&(t[n]=e[n])})),L.push({key:e.name,values:t})})),w=L}var A=w.map((function(e){return e.values}));0===y.length&&(y=w),h=p.sort((function(e,t){return e.currentPosition-t.currentPosition})).map((function(e){return e.key})),f=p.filter((function(e){return!e.disabled})),u.rangePoints([0,s],1).domain(f.map((function(e){return e.key})));var I={},R=!1,k=[];h.forEach((function(e){var t=d3.extent(A,(function(t){return+t[e]})),n=t[0],r=t[1],i=!1;(isNaN(n)||isNaN(r))&&(i=!0,n=0,r=0),n===r&&(n-=1,r+=1);var o=v.filter((function(t){return t.dimension==e}));0!==o.length&&(i?(n=c[e].domain()[0],r=c[e].domain()[1]):!o[0].hasOnlyNaN&&g?(n=n>o[0].extent[0]?o[0].extent[0]:n,r=r<o[0].extent[1]?o[0].extent[1]:r):o[0].hasNaN&&(r=r<o[0].extent[1]?o[0].extent[1]:r,I[e]=c[e].domain()[1],R=!0)),c[e]=d3.scale.linear().domain([n,r]).range([.9*(l-12),0]),b=[],c[e].brush=d3.svg.brush().y(c[e]).on("brushstart",z).on("brush",$).on("brushend",X)}));var _=N.selectAll("g.nv-wrap.nv-parallelCoordinates").data([w]),O=_.enter().append("g").attr("class","nvd3 nv-wrap nv-parallelCoordinates").append("g"),D=_.select("g");O.append("g").attr("class","nv-parallelCoordinates background"),O.append("g").attr("class","nv-parallelCoordinates foreground"),O.append("g").attr("class","nv-parallelCoordinates missingValuesline"),_.attr("transform","translate("+i.left+","+i.top+")"),C.interpolate("cardinal").tension(E),T.orient("left");var M,P,F=d3.behavior.drag().on("dragstart",(function(e){x[e.key]=this.parentNode.__origin__=u(e.key),n.attr("visibility","hidden")})).on("drag",(function(t){x[t.key]=Math.min(s,Math.max(0,this.parentNode.__origin__+=d3.event.x)),e.attr("d",W),f.sort((function(e,t){return Y(e.key)-Y(t.key)})),f.forEach((function(e,t){return e.currentPosition=t})),u.domain(f.map((function(e){return e.key}))),r.attr("transform",(function(e){return"translate("+Y(e.key)+")"}))})).on("dragend",(function(t,r){delete this.parentNode.__origin__,delete x[t.key],d3.select(this.parentNode).attr("transform","translate("+u(t.key)+")"),e.attr("d",W),n.attr("d",W).attr("visibility",null),S.dimensionsOrder(f)})),j=u.range()[1]-u.range()[0];if(j=isNaN(j)?u.range()[0]:j,!isNaN(j)){var B=[0+j/2,l-12,s-j/2,l-12];(M=_.select(".missingValuesline").selectAll("line").data([B])).enter().append("line"),M.exit().remove(),M.attr("x1",(function(e){return e[0]})).attr("y1",(function(e){return e[1]})).attr("x2",(function(e){return e[2]})).attr("y2",(function(e){return e[3]})),(P=_.select(".missingValuesline").selectAll("text").data([d])).append("text").data([d]),P.enter().append("text"),P.exit().remove(),P.attr("y",l).attr("x",s-92-j/2).text((function(e){return e}))}(n=_.select(".background").selectAll("path").data(w)).enter().append("path"),n.exit().remove(),n.attr("d",W),(e=_.select(".foreground").selectAll("path").data(w)).enter().append("path"),e.exit().remove(),e.attr("d",W).style("stroke-width",(function(e,t){return isNaN(e.strokeWidth)&&(e.strokeWidth=1),e.strokeWidth})).attr("stroke",(function(e,t){return e.color||m(e,t)})),e.on("mouseover",(function(e,t){d3.select(this).classed("hover",!0).style("stroke-width",e.strokeWidth+2+"px").style("stroke-opacity",1),S.elementMouseover({label:e.name,color:e.color||m(e,t),values:e.values,dimensions:f})})),e.on("mouseout",(function(e,t){d3.select(this).classed("hover",!1).style("stroke-width",e.strokeWidth+"px").style("stroke-opacity",.7),S.elementMouseout({label:e.name,index:t})})),e.on("mousemove",(function(e,t){S.elementMousemove()})),e.on("click",(function(e){S.elementClick({id:e.id})}));var H=(r=D.selectAll(".dimension").data(f)).enter().append("g").attr("class","nv-parallelCoordinates dimension");r.attr("transform",(function(e){return"translate("+u(e.key)+",0)"})),H.append("g").attr("class","nv-axis"),H.append("text").attr("class","nv-label").style("cursor","move").attr("dy","-1em").attr("text-anchor","middle").on("mouseover",(function(e,t){S.elementMouseover({label:e.tooltip||e.key,color:e.color})})).on("mouseout",(function(e,t){S.elementMouseout({label:e.tooltip})})).on("mousemove",(function(e,t){S.elementMousemove()})).call(F),H.append("g").attr("class","nv-brushBackground"),r.exit().remove(),r.select(".nv-label").text((function(e){return e.key})),q(g);var G=h.filter((function(e){return!c[e].brush.empty()})),U=G.map((function(e){return c[e].brush.extent()})),V=y.slice(0);function W(e){return C(f.map((function(t){if(isNaN(e.values[t.key])||isNaN(parseFloat(e.values[t.key]))||R){var n=c[t.key].domain(),r=c[t.key].range(),i=n[0]-(n[1]-n[0])/9;if(b.indexOf(t.key)<0){var o=d3.scale.linear().domain([i,n[1]]).range([l-12,r[1]]);c[t.key].brush.y(o),b.push(t.key)}if(isNaN(e.values[t.key])||isNaN(parseFloat(e.values[t.key])))return[u(t.key),c[t.key](i)]}return void 0!==M&&(b.length>0||R?(M.style("display","inline"),P.style("display","inline")):(M.style("display","none"),P.style("display","none"))),[u(t.key),c[t.key](e.values[t.key])]})))}function q(e){v.forEach((function(t){var n=c[t.dimension].brush.y().domain();t.hasOnlyNaN&&(t.extent[1]=(c[t.dimension].domain()[1]-n[0])*(t.extent[1]-t.extent[0])/(I[t.dimension]-t.extent[0])+n[0]),t.hasNaN&&(t.extent[0]=n[0]),e&&c[t.dimension].brush.extent(t.extent)})),r.select(".nv-brushBackground").each((function(e){d3.select(this).call(c[e.key].brush)})).selectAll("rect").attr("x",-8).attr("width",16),Q()}function z(){!1===g&&(g=!0,q(!0))}function $(){G=h.filter((function(e){return!c[e].brush.empty()})),U=G.map((function(e){return c[e].brush.extent()})),v=[],G.forEach((function(e,t){v[t]={dimension:e,extent:U[t],hasNaN:!1,hasOnlyNaN:!1}})),y=[],e.style("display",(function(e){var t=G.every((function(t,n){return!(!isNaN(e.values[t])&&!isNaN(parseFloat(e.values[t]))||U[n][0]!=c[t].brush.y().domain()[0])||U[n][0]<=e.values[t]&&e.values[t]<=U[n][1]&&!isNaN(parseFloat(e.values[t]))}));return t&&y.push(e),t?null:"none"})),Q(),S.brush({filters:v,active:y})}function X(){var e=G.length>0;v.forEach((function(e){e.extent[0]===c[e.dimension].brush.y().domain()[0]&&b.indexOf(e.dimension)>=0&&(e.hasNaN=!0),e.extent[1]<c[e.dimension].domain()[0]&&(e.hasOnlyNaN=!0)})),S.brushEnd(y,e)}function Q(){r.select(".nv-axis").each((function(e,t){var n=v.filter((function(t){return t.dimension==e.key}));k[e.key]=c[e.key].domain(),0!=n.length&&g&&(k[e.key]=[],n[0].extent[1]>c[e.key].domain()[0]&&(k[e.key]=[n[0].extent[1]]),n[0].extent[0]>=c[e.key].domain()[0]&&k[e.key].push(n[0].extent[0])),d3.select(this).call(T.scale(c[e.key]).tickFormat(e.format).tickValues(k[e.key]))}))}function Y(e){var t=x[e];return null==t?u(e):t}y=[],e.style("display",(function(e){var t=G.every((function(t,n){return!(!isNaN(e.values[t])&&!isNaN(parseFloat(e.values[t]))||U[n][0]!=c[t].brush.y().domain()[0])||U[n][0]<=e.values[t]&&e.values[t]<=U[n][1]&&!isNaN(parseFloat(e.values[t]))}));return t&&y.push(e),t?null:"none"})),(v.length>0||!t.utils.arrayEquals(y,V))&&S.activeChanged(y)})),N}return N.dispatch=S,N.options=t.utils.optionsFunc.bind(N),N._options=Object.create({},{width:{get:function(){return o},set:function(e){o=e}},height:{get:function(){return a},set:function(e){a=e}},dimensionData:{get:function(){return p},set:function(e){p=e}},displayBrush:{get:function(){return g},set:function(e){g=e}},filters:{get:function(){return v},set:function(e){v=e}},active:{get:function(){return y},set:function(e){y=e}},lineTension:{get:function(){return E},set:function(e){E=e}},undefinedValuesLabel:{get:function(){return d},set:function(e){d=e}},dimensions:{get:function(){return p.map((function(e){return e.key}))},set:function(e){t.deprecated("dimensions","use dimensionData instead"),0===p.length?e.forEach((function(e){p.push({key:e})})):e.forEach((function(e,t){p[t].key=e}))}},dimensionNames:{get:function(){return p.map((function(e){return e.key}))},set:function(e){t.deprecated("dimensionNames","use dimensionData instead"),h=[],0===p.length?e.forEach((function(e){p.push({key:e})})):e.forEach((function(e,t){p[t].key=e}))}},dimensionFormats:{get:function(){return p.map((function(e){return e.format}))},set:function(e){t.deprecated("dimensionFormats","use dimensionData instead"),0===p.length?e.forEach((function(e){p.push({format:e})})):e.forEach((function(e,t){p[t].format=e}))}},margin:{get:function(){return i},set:function(e){i.top=void 0!==e.top?e.top:i.top,i.right=void 0!==e.right?e.right:i.right,i.bottom=void 0!==e.bottom?e.bottom:i.bottom,i.left=void 0!==e.left?e.left:i.left}},color:{get:function(){return m},set:function(e){m=t.utils.getColor(e)}}}),t.utils.initOptions(N),N},t.models.parallelCoordinatesChart=function(){"use strict";var e=t.models.parallelCoordinates(),n=t.models.legend(),r=t.models.tooltip(),i=(t.models.tooltip(),{top:0,right:0,bottom:0,left:0}),o=null,a=null,s=null,l=!0,u=t.utils.defaultColor(),c=t.utils.state(),d=[],p=!0,f=null,h=null,g="undefined",m=d3.dispatch("dimensionsOrder","brushEnd","stateChange","changeState","renderEnd"),v=t.utils.renderWatch(m);function y(r){return v.reset(),v.models(e),r.each((function(r){var u=d3.select(this);t.utils.initSVG(u);var h,g=t.utils.availableWidth(a,u,i),v=t.utils.availableHeight(s,u,i);if(y.update=function(){u.call(y)},y.container=this,c.setter(function(e){return function(t){void 0!==t.active&&e.forEach((function(e,n){e.disabled=!t.active[n]}))}}(d),y.update).getter(function(e){return function(){return{active:e.map((function(e){return!e.disabled}))}}}(d)).update(),c.disabled=d.map((function(e){return!!e.disabled})),(d=d.map((function(e){return e.disabled=!!e.disabled,e}))).forEach((function(e,t){e.originalPosition=isNaN(e.originalPosition)?t:e.originalPosition,e.currentPosition=isNaN(e.currentPosition)?t:e.currentPosition})),!f)for(h in f={},c)c[h]instanceof Array?f[h]=c[h].slice(0):f[h]=c[h];if(!r||!r.length)return t.utils.noData(y,u),y;u.selectAll(".nv-noData").remove();var x=u.selectAll("g.nv-wrap.nv-parallelCoordinatesChart").data([r]),b=x.enter().append("g").attr("class","nvd3 nv-wrap nv-parallelCoordinatesChart").append("g"),E=x.select("g");b.append("g").attr("class","nv-parallelCoordinatesWrap"),b.append("g").attr("class","nv-legendWrap"),E.select("rect").attr("width",g).attr("height",v>0?v:0),l?(n.width(g).color((function(e){return"rgb(188,190,192)"})),E.select(".nv-legendWrap").datum(d.sort((function(e,t){return e.originalPosition-t.originalPosition}))).call(n),o||n.height()===i.top||(i.top=n.height(),v=t.utils.availableHeight(s,u,i)),x.select(".nv-legendWrap").attr("transform","translate( 0 ,"+-i.top+")")):E.select(".nv-legendWrap").selectAll("*").remove(),x.attr("transform","translate("+i.left+","+i.top+")"),e.width(g).height(v).dimensionData(d).displayBrush(p),E.select(".nv-parallelCoordinatesWrap ").datum(r).transition().call(e),e.dispatch.on("brushEnd",(function(e,t){t?(p=!0,m.brushEnd(e)):p=!1})),n.dispatch.on("stateChange",(function(e){for(var t in e)c[t]=e[t];m.stateChange(c),y.update()})),e.dispatch.on("dimensionsOrder",(function(e){d.sort((function(e,t){return e.currentPosition-t.currentPosition}));var t=!1;d.forEach((function(e,n){e.currentPosition=n,e.currentPosition!==e.originalPosition&&(t=!0)})),m.dimensionsOrder(d,t)})),m.on("changeState",(function(e){void 0!==e.disabled&&(d.forEach((function(t,n){t.disabled=e.disabled[n]})),c.disabled=e.disabled),y.update()}))})),v.renderEnd("parraleleCoordinateChart immediate"),y}return r.contentGenerator((function(e){var t='<table><thead><tr><td class="legend-color-guide"><div style="background-color:'+e.color+'"></div></td><td><strong>'+e.key+"</strong></td></tr></thead>";return 0!==e.series.length&&(t+='<tbody><tr><td height ="10px"></td></tr>',e.series.forEach((function(e){t=t+'<tr><td class="legend-color-guide"><div style="background-color:'+e.color+'"></div></td><td class="key">'+e.key+'</td><td class="value">'+e.value+"</td></tr>"})),t+="</tbody>"),t+="</table>"})),e.dispatch.on("elementMouseover.tooltip",(function(e){var t={key:e.label,color:e.color,series:[]};e.values&&(Object.keys(e.values).forEach((function(n){var r,i=e.dimensions.filter((function(e){return e.key===n}))[0];i&&(r=isNaN(e.values[n])||isNaN(parseFloat(e.values[n]))?g:i.format(e.values[n]),t.series.push({idx:i.currentPosition,key:n,value:r,color:i.color}))})),t.series.sort((function(e,t){return e.idx-t.idx}))),r.data(t).hidden(!1)})),e.dispatch.on("elementMouseout.tooltip",(function(e){r.hidden(!0)})),e.dispatch.on("elementMousemove.tooltip",(function(){r()})),y.dispatch=m,y.parallelCoordinates=e,y.legend=n,y.tooltip=r,y.options=t.utils.optionsFunc.bind(y),y._options=Object.create({},{width:{get:function(){return a},set:function(e){a=e}},height:{get:function(){return s},set:function(e){s=e}},showLegend:{get:function(){return l},set:function(e){l=e}},defaultState:{get:function(){return f},set:function(e){f=e}},dimensionData:{get:function(){return d},set:function(e){d=e}},displayBrush:{get:function(){return p},set:function(e){p=e}},noData:{get:function(){return h},set:function(e){h=e}},nanValue:{get:function(){return g},set:function(e){g=e}},margin:{get:function(){return i},set:function(e){void 0!==e.top&&(i.top=e.top,o=e.top),i.right=void 0!==e.right?e.right:i.right,i.bottom=void 0!==e.bottom?e.bottom:i.bottom,i.left=void 0!==e.left?e.left:i.left}},color:{get:function(){return u},set:function(r){u=t.utils.getColor(r),n.color(u),e.color(u)}}}),t.utils.inheritOptions(y,e),t.utils.initOptions(y),y},t.models.pie=function(){"use strict";var e={top:0,right:0,bottom:0,left:0},n=500,r=500,i=function(e){return e.x},o=function(e){return e.y},a=Math.floor(1e4*Math.random()),s=null,l=t.utils.defaultColor(),u=d3.format(",.2f"),c=!0,d=!1,p="key",f=.02,h=!1,g=!1,m=!1,v=!0,y=0,x=!1,b=!1,E=!1,C=!1,T=0,S=.5,w=250,N=[],L=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout","elementMousemove","renderEnd"),A=[],I=[],R=t.utils.renderWatch(L);function k(_){return R.reset(),_.each((function(k){var _=n-e.left-e.right,O=r-e.top-e.bottom,D=Math.min(_,O)/2,M=[],P=[];if(s=d3.select(this),0===N.length)for(var F=D-D/10,j=S*D,B=0;B<k[0].length;B++)M.push(F),P.push(j);else v?(M=N.map((function(e){return(e.outer-e.outer/10)*D})),P=N.map((function(e){return(e.inner-e.inner/10)*D})),S=d3.min(N.map((function(e){return e.inner-e.inner/10})))):(M=N.map((function(e){return e.outer*D})),P=N.map((function(e){return e.inner*D})),S=d3.min(N.map((function(e){return e.inner}))));t.utils.initSVG(s);var H=s.selectAll(".nv-wrap.nv-pie").data(k),G=H.enter().append("g").attr("class","nvd3 nv-wrap nv-pie nv-chart-"+a).append("g"),U=H.select("g"),V=G.append("g").attr("class","nv-pie");for(G.append("g").attr("class","nv-pieLabels"),H.attr("transform","translate("+e.left+","+e.top+")"),U.select(".nv-pie").attr("transform","translate("+_/2+","+O/2+")"),U.select(".nv-pieLabels").attr("transform","translate("+_/2+","+O/2+")"),s.on("click",(function(e,t){L.chartClick({data:e,index:t,pos:d3.event,id:a})})),A=[],I=[],B=0;B<k[0].length;B++){var W=d3.svg.arc().outerRadius(M[B]),q=d3.svg.arc().outerRadius(M[B]+5);!1!==b&&(W.startAngle(b),q.startAngle(b)),!1!==C&&(W.endAngle(C),q.endAngle(C)),g&&(W.innerRadius(P[B]),q.innerRadius(P[B])),W.cornerRadius&&T&&(W.cornerRadius(T),q.cornerRadius(T)),A.push(W),I.push(q)}var z=d3.layout.pie().sort(null).value((function(e){return e.disabled?0:o(e)}));z.padAngle&&E&&z.padAngle(E),g&&m&&(V.append("text").attr("class","nv-pie-title"),H.select(".nv-pie-title").style("text-anchor","middle").text((function(e){return m})).style("font-size",Math.min(_,O)*S*2/(m.length+2)+"px").attr("dy","0.35em").attr("transform",(function(e,t){return"translate(0, "+y+")"})));var $=H.select(".nv-pie").selectAll(".nv-slice").data(z),X=H.select(".nv-pieLabels").selectAll(".nv-label").data(z);$.exit().remove(),X.exit().remove();var Q=$.enter().append("g");if(Q.attr("class","nv-slice"),Q.on("mouseover",(function(e,t){d3.select(this).classed("hover",!0),v&&d3.select(this).select("path").transition().duration(70).attr("d",I[t]),L.elementMouseover({data:e.data,index:t,color:d3.select(this).style("fill"),percent:(e.endAngle-e.startAngle)/(2*Math.PI)})})),Q.on("mouseout",(function(e,t){d3.select(this).classed("hover",!1),v&&d3.select(this).select("path").transition().duration(50).attr("d",A[t]),L.elementMouseout({data:e.data,index:t})})),Q.on("mousemove",(function(e,t){L.elementMousemove({data:e.data,index:t})})),Q.on("click",(function(e,t){L.elementClick({data:e.data,index:t,color:d3.select(this).style("fill"),event:d3.event,element:this})})),Q.on("dblclick",(function(e,t){L.elementDblClick({data:e.data,index:t,color:d3.select(this).style("fill")})})),$.attr("fill",(function(e,t){return l(e.data,t)})),$.attr("stroke",(function(e,t){return l(e.data,t)})),Q.append("path").each((function(e){this._current=e})),$.select("path").transition().duration(w).attr("d",(function(e,t){return A[t](e)})).attrTween("d",(function(e,t){e.endAngle=isNaN(e.endAngle)?0:e.endAngle,e.startAngle=isNaN(e.startAngle)?0:e.startAngle,g||(e.innerRadius=0);var n=d3.interpolate(this._current,e);return this._current=n(0),function(e){return A[t](n(e))}})),c){var Y=[];for(B=0;B<k[0].length;B++)Y.push(A[B]),d?g&&(Y[B]=d3.svg.arc().outerRadius(A[B].outerRadius()),!1!==b&&Y[B].startAngle(b),!1!==C&&Y[B].endAngle(C)):g||Y[B].innerRadius(0);X.enter().append("g").classed("nv-label",!0).each((function(e,t){var n=d3.select(this);n.attr("transform",(function(e,t){if(x){e.outerRadius=M[t]+10,e.innerRadius=M[t]+15;var n=(e.startAngle+e.endAngle)/2*(180/Math.PI);return(e.startAngle+e.endAngle)/2<Math.PI?n-=90:n+=90,"translate("+Y[t].centroid(e)+") rotate("+n+")"}return e.outerRadius=D+10,e.innerRadius=D+15,"translate("+Y[t].centroid(e)+")"})),n.append("rect").style("stroke","#fff").style("fill","#fff").attr("rx",3).attr("ry",3),n.append("text").style("text-anchor",x?(e.startAngle+e.endAngle)/2<Math.PI?"start":"end":"middle").style("fill","#000")}));var K={},J=function(e){return 140*Math.floor(e[0]/140)+","+14*Math.floor(e[1]/14)},Z=function(e){return(e.endAngle-e.startAngle)/(2*Math.PI)};X.watchTransition(R,"pie labels").attr("transform",(function(e,t){if(x){e.outerRadius=M[t]+10,e.innerRadius=M[t]+15;var n=(e.startAngle+e.endAngle)/2*(180/Math.PI);return(e.startAngle+e.endAngle)/2<Math.PI?n-=90:n+=90,"translate("+Y[t].centroid(e)+") rotate("+n+")"}e.outerRadius=D+10,e.innerRadius=D+15;var r=Y[t].centroid(e),i=Z(e);if(e.value&&i>=f){var o=J(r);K[o]&&(r[1]-=14),K[J(r)]=!0}return"translate("+r+")"})),X.select(".nv-label text").style("text-anchor",(function(e,t){return x?(e.startAngle+e.endAngle)/2<Math.PI?"start":"end":"middle"})).text((function(e,t){var n=Z(e),r="";if(!e.value||n<f)return"";if("function"==typeof p)r=p(e,t,{key:i(e.data),value:o(e.data),percent:u(n)});else switch(p){case"key":r=i(e.data);break;case"value":r=u(o(e.data));break;case"percent":r=d3.format("%")(n)}return r})),h&&X.each((function(e,n){if(this.getBBox){var r=this.getBBox(),i=Y[n].centroid(e),o={x:i[0]+r.x,y:i[1]+r.y},a={x:o.x+r.width,y:o.y},s={x:o.x,y:o.y+r.height},l={x:o.x+r.width,y:o.y+r.height};e.visible=t.utils.pointIsInArc(o,e,W)&&t.utils.pointIsInArc(a,e,W)&&t.utils.pointIsInArc(s,e,W)&&t.utils.pointIsInArc(l,e,W)}})).style("display",(function(e){return e.visible?null:"none"}))}})),R.renderEnd("pie immediate"),k}return k.dispatch=L,k.options=t.utils.optionsFunc.bind(k),k._options=Object.create({},{arcsRadius:{get:function(){return N},set:function(e){N=e}},width:{get:function(){return n},set:function(e){n=e}},height:{get:function(){return r},set:function(e){r=e}},showLabels:{get:function(){return c},set:function(e){c=e}},title:{get:function(){return m},set:function(e){m=e}},titleOffset:{get:function(){return y},set:function(e){y=e}},labelThreshold:{get:function(){return f},set:function(e){f=e}},hideOverlapLabels:{get:function(){return h},set:function(e){h=e}},valueFormat:{get:function(){return u},set:function(e){u=e}},x:{get:function(){return i},set:function(e){i=e}},id:{get:function(){return a},set:function(e){a=e}},endAngle:{get:function(){return C},set:function(e){C=e}},startAngle:{get:function(){return b},set:function(e){b=e}},padAngle:{get:function(){return E},set:function(e){E=e}},cornerRadius:{get:function(){return T},set:function(e){T=e}},donutRatio:{get:function(){return S},set:function(e){S=e}},labelsOutside:{get:function(){return d},set:function(e){d=e}},labelSunbeamLayout:{get:function(){return x},set:function(e){x=e}},donut:{get:function(){return g},set:function(e){g=e}},growOnHover:{get:function(){return v},set:function(e){v=e}},pieLabelsOutside:{get:function(){return d},set:function(e){d=e,t.deprecated("pieLabelsOutside","use labelsOutside instead")}},donutLabelsOutside:{get:function(){return d},set:function(e){d=e,t.deprecated("donutLabelsOutside","use labelsOutside instead")}},labelFormat:{get:function(){return u},set:function(e){u=e,t.deprecated("labelFormat","use valueFormat instead")}},margin:{get:function(){return e},set:function(t){e.top=void 0!==t.top?t.top:e.top,e.right=void 0!==t.right?t.right:e.right,e.bottom=void 0!==t.bottom?t.bottom:e.bottom,e.left=void 0!==t.left?t.left:e.left}},duration:{get:function(){return w},set:function(e){w=e,R.reset(w)}},y:{get:function(){return o},set:function(e){o=d3.functor(e)}},color:{get:function(){return l},set:function(e){l=t.utils.getColor(e)}},labelType:{get:function(){return p},set:function(e){p=e||"key"}}}),t.utils.initOptions(k),k},t.models.pieChart=function(){"use strict";var e=t.models.pie(),n=t.models.legend(),r=t.models.tooltip(),i={top:30,right:20,bottom:20,left:20},o=null,a=null,s=null,l=!1,u=!0,c="top",d=t.utils.defaultColor(),p=t.utils.state(),f=null,h=null,g=250,m=d3.dispatch("stateChange","changeState","renderEnd");r.duration(0).headerEnabled(!1).valueFormatter((function(t,n){return e.valueFormat()(t,n)}));var v=t.utils.renderWatch(m);function y(r){return v.reset(),v.models(e),r.each((function(r){var l=d3.select(this);t.utils.initSVG(l);var d,h=t.utils.availableWidth(a,l,i),g=t.utils.availableHeight(s,l,i);if(y.update=function(){l.transition().call(y)},y.container=this,p.setter(function(e){return function(t){void 0!==t.active&&e.forEach((function(e,n){e.disabled=!t.active[n]}))}}(r),y.update).getter(function(e){return function(){return{active:e.map((function(e){return!e.disabled}))}}}(r)).update(),p.disabled=r.map((function(e){return!!e.disabled})),!f)for(d in f={},p)p[d]instanceof Array?f[d]=p[d].slice(0):f[d]=p[d];if(!r||!r.length)return t.utils.noData(y,l),y;l.selectAll(".nv-noData").remove();var v=l.selectAll("g.nv-wrap.nv-pieChart").data([r]),x=v.enter().append("g").attr("class","nvd3 nv-wrap nv-pieChart").append("g"),b=v.select("g");if(x.append("g").attr("class","nv-pieWrap"),x.append("g").attr("class","nv-legendWrap"),u)if("top"===c)n.width(h).key(e.x()),v.select(".nv-legendWrap").datum(r).call(n),o||n.height()===i.top||(i.top=n.height(),g=t.utils.availableHeight(s,l,i)),v.select(".nv-legendWrap").attr("transform","translate(0,"+-i.top+")");else if("right"===c){var E=t.models.legend().width();h/2<E&&(E=h/2),n.height(g).key(e.x()),n.width(E),h-=n.width(),v.select(".nv-legendWrap").datum(r).call(n).attr("transform","translate("+h+",0)")}else"bottom"===c&&(n.width(h).key(e.x()),v.select(".nv-legendWrap").datum(r).call(n),i.bottom=n.height(),g=t.utils.availableHeight(s,l,i),v.select(".nv-legendWrap").attr("transform","translate(0,"+g+")"));else b.select(".nv-legendWrap").selectAll("*").remove();v.attr("transform","translate("+i.left+","+i.top+")"),e.width(h).height(g);var C=b.select(".nv-pieWrap").datum([r]);d3.transition(C).call(e),n.dispatch.on("stateChange",(function(e){for(var t in e)p[t]=e[t];m.stateChange(p),y.update()})),m.on("changeState",(function(e){void 0!==e.disabled&&(r.forEach((function(t,n){t.disabled=e.disabled[n]})),p.disabled=e.disabled),y.update()}))})),v.renderEnd("pieChart immediate"),y}return e.dispatch.on("elementMouseover.tooltip",(function(e){e.series={key:y.x()(e.data),value:y.y()(e.data),color:e.color,percent:e.percent},l||(delete e.percent,delete e.series.percent),r.data(e).hidden(!1)})),e.dispatch.on("elementMouseout.tooltip",(function(e){r.hidden(!0)})),e.dispatch.on("elementMousemove.tooltip",(function(e){r()})),y.legend=n,y.dispatch=m,y.pie=e,y.tooltip=r,y.options=t.utils.optionsFunc.bind(y),y._options=Object.create({},{width:{get:function(){return a},set:function(e){a=e}},height:{get:function(){return s},set:function(e){s=e}},noData:{get:function(){return h},set:function(e){h=e}},showTooltipPercent:{get:function(){return l},set:function(e){l=e}},showLegend:{get:function(){return u},set:function(e){u=e}},legendPosition:{get:function(){return c},set:function(e){c=e}},defaultState:{get:function(){return f},set:function(e){f=e}},color:{get:function(){return d},set:function(t){d=t,n.color(d),e.color(d)}},duration:{get:function(){return g},set:function(t){g=t,v.reset(g),e.duration(g)}},margin:{get:function(){return i},set:function(e){void 0!==e.top&&(i.top=e.top,o=e.top),i.right=void 0!==e.right?e.right:i.right,i.bottom=void 0!==e.bottom?e.bottom:i.bottom,i.left=void 0!==e.left?e.left:i.left}}}),t.utils.inheritOptions(y,e),t.utils.initOptions(y),y},t.models.sankey=function(){"use strict";var e={},n=24,r=8,i=[1,1],o=[],a=[],s=!0,l=function(e){o.forEach((function(e){e.sourceLinks=[],e.targetLinks=[]})),a.forEach((function(e){var t=e.source,n=e.target;"number"==typeof t&&(t=e.source=o[e.source]),"number"==typeof n&&(n=e.target=o[e.target]),t.sourceLinks.push(e),n.targetLinks.push(e)})),o.forEach((function(e){e.value=Math.max(d3.sum(e.sourceLinks,p),d3.sum(e.targetLinks,p))})),function(){for(var e,t,r=o,a=0;r.length&&a<o.length;)e=[],r.forEach((function(t){t.x=a,t.dx=n,t.sourceLinks.forEach((function(t){e.indexOf(t.target)<0&&e.push(t.target)}))})),r=e,++a;s&&function(e){o.forEach((function(t){t.sourceLinks.length||(t.x=e-1)}))}(a),t=(i[0]-n)/(a-1),o.forEach((function(e){e.x*=t}))}(),function(e){var t,n=d3.nest().key((function(e){return e.x})).sortKeys(d3.ascending).entries(o).map((function(e){return e.values}));t=d3.min(n,(function(e){return(i[1]-(e.length-1)*r)/d3.sum(e,p)})),n.forEach((function(e){e.forEach((function(e,n){e.y=n,e.dy=e.value*t}))})),a.forEach((function(e){e.dy=e.value*t})),f(),d();for(var s=1;e>0;--e)u(s*=.99),f(),d(),l(s),f(),d();function l(e){function t(e){return(e.source.y+e.sy+e.dy/2)*e.value}n.forEach((function(n,r){n.forEach((function(n){if(n.targetLinks.length){var r=d3.sum(n.targetLinks,t)/d3.sum(n.targetLinks,p);n.y+=(r-c(n))*e}}))}))}function u(e){function t(e){return(e.target.y+e.ty+e.dy/2)*e.value}n.slice().reverse().forEach((function(n){n.forEach((function(n){if(n.sourceLinks.length){var r=d3.sum(n.sourceLinks,t)/d3.sum(n.sourceLinks,p);n.y+=(r-c(n))*e}}))}))}function f(){n.forEach((function(e){var t,n,o,a=0,s=e.length;for(e.sort(h),o=0;o<s;++o)(n=a-(t=e[o]).y)>0&&(t.y+=n),a=t.y+t.dy+r;if((n=a-r-i[1])>0)for(a=t.y-=n,o=s-2;o>=0;--o)(n=(t=e[o]).y+t.dy+r-a)>0&&(t.y-=n),a=t.y}))}function h(e,t){return e.y-t.y}}(e)},u=function(){var e=.5;function t(t){var n=t.source.x+t.source.dx,r=t.target.x,i=d3.interpolateNumber(n,r),o=i(e),a=i(1-e),s=t.source.y+t.sy+t.dy/2,l=t.target.y+t.ty+t.dy/2;return"M"+n+","+s+"C"+o+","+s+" "+a+","+l+" "+r+","+l}return t.curvature=function(n){return arguments.length?(e=+n,t):e},t},c=function(e){return e.y+e.dy/2};function d(){function e(e,t){return e.source.y-t.source.y}function t(e,t){return e.target.y-t.target.y}o.forEach((function(n){n.sourceLinks.sort(t),n.targetLinks.sort(e)})),o.forEach((function(e){var t=0,n=0;e.sourceLinks.forEach((function(e){e.sy=t,t+=e.dy})),e.targetLinks.forEach((function(e){e.ty=n,n+=e.dy}))}))}function p(e){return e.value}return e.options=t.utils.optionsFunc.bind(e),e._options=Object.create({},{nodeWidth:{get:function(){return n},set:function(e){n=+e}},nodePadding:{get:function(){return r},set:function(e){r=e}},nodes:{get:function(){return o},set:function(e){o=e}},links:{get:function(){return a},set:function(e){a=e}},size:{get:function(){return i},set:function(e){i=e}},sinksRight:{get:function(){return s},set:function(e){s=e}},layout:{get:function(){l(32)},set:function(e){l(e)}},relayout:{get:function(){d()},set:function(e){}},center:{get:function(){return c()},set:function(e){"function"==typeof e&&(c=e)}},link:{get:function(){return u()},set:function(e){return"function"==typeof e&&(u=e),u()}}}),t.utils.initOptions(e),e},t.models.sankeyChart=function(){"use strict";var e={top:5,right:0,bottom:5,left:0},n=t.models.sankey(),r=600,i=400,o=36,a=40,s="units",l=void 0,u=d3.format(",.0f"),c=function(e){return u(e)+" "+s},d=d3.scale.category20(),p=function(e){return e.source.name+" → "+e.target.name+"\n"+c(e.value)},f=function(e){return e.color=d(e.name.replace(/ .*/,""))},h=function(e){return d3.rgb(e.color).darker(2)},g=function(e){return e.name+"\n"+c(e.value)},m=function(e,t){e.append("text").attr("x",0).attr("y",0).attr("class","nvd3-sankey-chart-error").attr("text-anchor","middle").text(t)};function v(e){return e.each((function(t){var s={nodes:[{node:1,name:"Test 1"},{node:2,name:"Test 2"},{node:3,name:"Test 3"},{node:4,name:"Test 4"},{node:5,name:"Test 5"},{node:6,name:"Test 6"}],links:[{source:0,target:1,value:2295},{source:0,target:5,value:1199},{source:1,target:2,value:1119},{source:1,target:5,value:1176},{source:2,target:3,value:487},{source:2,target:5,value:632},{source:3,target:4,value:301},{source:3,target:5,value:186}]},u=!1,c=!1;if(("object"==typeof t.nodes&&t.nodes.length)>=0&&("object"==typeof t.links&&t.links.length)>=0&&(u=!0),t.nodes&&t.nodes.length>0&&t.links&&t.links.length>0&&(c=!0),!u)return console.error("NVD3 Sankey chart error:","invalid data format for",t),console.info("Valid data format is: ",s,JSON.stringify(s)),m(e,"Error loading chart, data is invalid"),!1;if(!c)return m(e,"No data available"),!1;var d=e.append("svg").attr("width",r).attr("height",i).append("g").attr("class","nvd3 nv-wrap nv-sankeyChart");n.nodeWidth(o).nodePadding(a).size([r,i]);var v=n.link();n.nodes(t.nodes).links(t.links).layout(32).center(l);var y=d.append("g").selectAll(".link").data(t.links).enter().append("path").attr("class","link").attr("d",v).style("stroke-width",(function(e){return Math.max(1,e.dy)})).sort((function(e,t){return t.dy-e.dy}));y.append("title").text(p);var x=d.append("g").selectAll(".node").data(t.nodes).enter().append("g").attr("class","node").attr("transform",(function(e){return"translate("+e.x+","+e.y+")"})).call(d3.behavior.drag().origin((function(e){return e})).on("dragstart",(function(){this.parentNode.appendChild(this)})).on("drag",(function(e){d3.select(this).attr("transform","translate("+e.x+","+(e.y=Math.max(0,Math.min(i-e.dy,d3.event.y)))+")"),n.relayout(),y.attr("d",v)})));x.append("rect").attr("height",(function(e){return e.dy})).attr("width",n.nodeWidth()).style("fill",f).style("stroke",h).append("title").text(g),x.append("text").attr("x",-6).attr("y",(function(e){return e.dy/2})).attr("dy",".35em").attr("text-anchor","end").attr("transform",null).text((function(e){return e.name})).filter((function(e){return e.x<r/2})).attr("x",6+n.nodeWidth()).attr("text-anchor","start")})),v}return v.options=t.utils.optionsFunc.bind(v),v._options=Object.create({},{units:{get:function(){return s},set:function(e){s=e}},width:{get:function(){return r},set:function(e){r=e}},height:{get:function(){return i},set:function(e){i=e}},format:{get:function(){return c},set:function(e){c=e}},linkTitle:{get:function(){return p},set:function(e){p=e}},nodeWidth:{get:function(){return o},set:function(e){o=e}},nodePadding:{get:function(){return a},set:function(e){a=e}},center:{get:function(){return l},set:function(e){l=e}},margin:{get:function(){return e},set:function(t){e.top=void 0!==t.top?t.top:e.top,e.right=void 0!==t.right?t.right:e.right,e.bottom=void 0!==t.bottom?t.bottom:e.bottom,e.left=void 0!==t.left?t.left:e.left}},nodeStyle:{get:function(){return{}},set:function(e){f=void 0!==e.fillColor?e.fillColor:f,h=void 0!==e.strokeColor?e.strokeColor:h,g=void 0!==e.title?e.title:g}}}),t.utils.initOptions(v),v},t.models.scatter=function(){"use strict";var e,n,r,i,o,a,s,l,u={top:0,right:0,bottom:0,left:0},c=null,d=null,p=t.utils.defaultColor(),f=null,h=Math.floor(1e5*Math.random()),g=null,m=d3.scale.linear(),v=d3.scale.linear(),y=d3.scale.linear(),x=function(e){return e.x},b=function(e){return e.y},E=function(e){return e.size||1},C=function(e){return e.shape||"circle"},T=[],S=[],w=[],N=!0,L=function(e){return!e.notActive},A=!1,I=.1,R=!1,k=!0,_=!1,O=function(){return 25},D=null,M=null,P=null,F=null,j=null,B=null,H=!1,G=d3.dispatch("elementClick","elementDblClick","elementMouseover","elementMouseout","renderEnd"),U=!0,V=250,W=300,q=!1,z=!1,$=t.utils.renderWatch(G,V),X=[16,256],Q={};function Y(e){var t;return t=e[0].series+":"+e[1],Q[t]=Q[t]||{}}function K(e){var t;t=e[0].series+":"+e[1],delete Q[t]}function J(e){var t,n,r,i=Y(e),o=!1;for(t=1;t<arguments.length;t+=2)n=arguments[t],r=arguments[t+1](e[0],e[1]),i[n]===r&&i.hasOwnProperty(n)||(i[n]=r,o=!0);return o}function Z(V){return $.reset(),V.each((function(V){g=d3.select(this);var Q=t.utils.availableWidth(c,g,u),Y=t.utils.availableHeight(d,g,u);t.utils.initSVG(g),V.forEach((function(e,t){e.values.forEach((function(e){e.series=t}))}));var ee="function"==typeof Z.yScale().base,te=D&&M&&j?[]:d3.merge(V.map((function(e){return e.values.map((function(e,t){return{x:x(e,t),y:b(e,t),size:E(e,t)}}))})));if(m.domain(D||d3.extent(te.map((function(e){return e.x})).concat(T))),A&&V[0]?m.range(P||[(Q*I+Q)/(2*V[0].values.length),Q-Q*(1+I)/(2*V[0].values.length)]):m.range(P||[0,Q]),ee){var ne=d3.min(te.map((function(e){if(0!==e.y)return e.y})));v.clamp(!0).domain(M||d3.extent(te.map((function(e){return 0!==e.y?e.y:.1*ne})).concat(S))).range(F||[Y,0])}else v.domain(M||d3.extent(te.map((function(e){return e.y})).concat(S))).range(F||[Y,0]);y.domain(j||d3.extent(te.map((function(e){return e.size})).concat(w))).range(B||X),H=m.domain()[0]===m.domain()[1]||v.domain()[0]===v.domain()[1],m.domain()[0]===m.domain()[1]&&(m.domain()[0]?m.domain([m.domain()[0]-.01*m.domain()[0],m.domain()[1]+.01*m.domain()[1]]):m.domain([-1,1])),v.domain()[0]===v.domain()[1]&&(v.domain()[0]?v.domain([v.domain()[0]-.01*v.domain()[0],v.domain()[1]+.01*v.domain()[1]]):v.domain([-1,1])),isNaN(m.domain()[0])&&m.domain([-1,1]),isNaN(v.domain()[0])&&v.domain([-1,1]),e=e||m,n=n||v,r=r||y;var re=m(1)!==e(1)||v(1)!==n(1)||y(1)!==r(1);s=s||d;var ie=(a=a||c)!==c||s!==d,oe=(i=i||[])[0]!==m.domain()[0]||i[1]!==m.domain()[1];i=m.domain(),o=o||[],oe=oe||o[0]!==v.domain()[0]||o[1]!==v.domain()[1],o=v.domain();var ae=g.selectAll("g.nv-wrap.nv-scatter").data([V]),se=ae.enter().append("g").attr("class","nvd3 nv-wrap nv-scatter nv-chart-"+h),le=se.append("defs"),ue=se.append("g"),ce=ae.select("g");function de(){if(z=!1,!N)return!1;if(!0===U){ae.select(".nv-point-paths").selectAll("path").remove();var e=d3.merge(V.map((function(e,n){return e.values.map((function(e,r){var i=x(e,r),o=b(e,r);return[t.utils.NaNtoZero(m(i))+1e-4*Math.random(),t.utils.NaNtoZero(v(o))+1e-4*Math.random(),n,r,e]})).filter((function(e,t){return L(e[4],t)}))})));if(0==e.length)return!1;e.length<3&&(e.push([m.range()[0]-20,v.range()[0]-20,null,null]),e.push([m.range()[1]+20,v.range()[1]+20,null,null]),e.push([m.range()[0]-20,v.range()[0]+20,null,null]),e.push([m.range()[1]+20,v.range()[1]-20,null,null]));var n=d3.geom.polygon([[-10,-10],[-10,d+10],[c+10,d+10],[c+10,-10]]);e=e.sort((function(e,t){return e[0]-t[0]||e[1]-t[1]}));for(var r=0;r<e.length-1;)Math.abs(e[r][0]-e[r+1][0])<1e-4&&Math.abs(e[r][1]-e[r+1][1])<1e-4?e.splice(r+1,1):r++;var i=d3.geom.voronoi(e).map((function(t,r){return{data:n.clip(t),series:e[r][2],point:e[r][3]}})),o=ae.select(".nv-point-paths").selectAll("path").data(i),a=o.enter().append("svg:path").attr("d",(function(e){return e&&e.data&&0!==e.data.length?"M"+e.data.join(",")+"Z":"M 0 0"})).attr("id",(function(e,t){return"nv-path-"+t})).attr("clip-path",(function(e,t){return"url(#nv-clip-"+h+"-"+t+")"}));_&&a.style("fill",d3.rgb(230,230,230)).style("fill-opacity",.4).style("stroke-opacity",1).style("stroke",d3.rgb(200,200,200)),k&&(ae.select(".nv-point-clips").selectAll("*").remove(),ae.select(".nv-point-clips").selectAll("clipPath").data(e).enter().append("svg:clipPath").attr("id",(function(e,t){return"nv-clip-"+h+"-"+t})).append("svg:circle").attr("cx",(function(e){return e[0]})).attr("cy",(function(e){return e[1]})).attr("r",O));var s=function(e,t,n){if(z)return 0;var r=V[t.series];if(void 0!==r){var i=r.values[t.point];i.color=p(r,t.series),i.x=x(i),i.y=b(i);var o=g.node().getBoundingClientRect(),a=window.pageYOffset||document.documentElement.scrollTop,s=window.pageXOffset||document.documentElement.scrollLeft;n({point:i,series:r,pos:{left:m(x(i,t.point))+o.left+s+u.left+10,top:v(b(i,t.point))+o.top+a+u.top+10},relativePos:[m(x(i,t.point))+u.left,v(b(i,t.point))+u.top],seriesIndex:t.series,pointIndex:t.point,event:d3.event,element:e})}};o.on("click",(function(e){s(this,e,G.elementClick)})).on("dblclick",(function(e){s(this,e,G.elementDblClick)})).on("mouseover",(function(e){s(this,e,G.elementMouseover)})).on("mouseout",(function(e,t){s(this,e,G.elementMouseout)}))}else ae.select(".nv-groups").selectAll(".nv-group").selectAll(".nv-point").on("click",(function(e,t){if(z||!V[e.series])return 0;var n=V[e.series],r=n.values[t];G.elementClick({point:r,series:n,pos:[m(x(r,t))+u.left,v(b(r,t))+u.top],relativePos:[m(x(r,t))+u.left,v(b(r,t))+u.top],seriesIndex:e.series,pointIndex:t,event:d3.event,element:this})})).on("dblclick",(function(e,t){if(z||!V[e.series])return 0;var n=V[e.series],r=n.values[t];G.elementDblClick({point:r,series:n,pos:[m(x(r,t))+u.left,v(b(r,t))+u.top],relativePos:[m(x(r,t))+u.left,v(b(r,t))+u.top],seriesIndex:e.series,pointIndex:t})})).on("mouseover",(function(e,t){if(z||!V[e.series])return 0;var n=V[e.series],r=n.values[t];G.elementMouseover({point:r,series:n,pos:[m(x(r,t))+u.left,v(b(r,t))+u.top],relativePos:[m(x(r,t))+u.left,v(b(r,t))+u.top],seriesIndex:e.series,pointIndex:t,color:p(e,t)})})).on("mouseout",(function(e,t){if(z||!V[e.series])return 0;var n=V[e.series],r=n.values[t];G.elementMouseout({point:r,series:n,pos:[m(x(r,t))+u.left,v(b(r,t))+u.top],relativePos:[m(x(r,t))+u.left,v(b(r,t))+u.top],seriesIndex:e.series,pointIndex:t,color:p(e,t)})}))}ae.classed("nv-single-point",H),ue.append("g").attr("class","nv-groups"),ue.append("g").attr("class","nv-point-paths"),se.append("g").attr("class","nv-point-clips"),ae.attr("transform","translate("+u.left+","+u.top+")"),le.append("clipPath").attr("id","nv-edge-clip-"+h).append("rect").attr("transform","translate( -10, -10)"),ae.select("#nv-edge-clip-"+h+" rect").attr("width",Q+20).attr("height",Y>0?Y+20:0),ce.attr("clip-path",R?"url(#nv-edge-clip-"+h+")":""),z=!0;var pe=ae.select(".nv-groups").selectAll(".nv-group").data((function(e){return e}),(function(e){return e.key}));pe.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6),pe.exit().remove(),pe.attr("class",(function(e,t){return(e.classed||"")+" nv-group nv-series-"+t})).classed("nv-noninteractive",!N).classed("hover",(function(e){return e.hover})),pe.watchTransition($,"scatter: groups").style("fill",(function(e,t){return p(e,t)})).style("stroke",(function(e,t){return e.pointBorderColor||f||p(e,t)})).style("stroke-opacity",1).style("fill-opacity",.5);var fe=pe.selectAll("path.nv-point").data((function(e){return e.values.map((function(e,t){return[e,t]})).filter((function(e,t){return L(e[0],t)}))}));if(fe.enter().append("path").attr("class",(function(e){return"nv-point nv-point-"+e[1]})).style("fill",(function(e){return e.color})).style("stroke",(function(e){return e.color})).attr("transform",(function(r){return"translate("+t.utils.NaNtoZero(e(x(r[0],r[1])))+","+t.utils.NaNtoZero(n(b(r[0],r[1])))+")"})).attr("d",t.utils.symbol().type((function(e){return C(e[0])})).size((function(e){return y(E(e[0],e[1]))}))),fe.exit().each(K).remove(),pe.exit().selectAll("path.nv-point").watchTransition($,"scatter exit").attr("transform",(function(e){return"translate("+t.utils.NaNtoZero(m(x(e[0],e[1])))+","+t.utils.NaNtoZero(v(b(e[0],e[1])))+")"})).remove(),fe.filter((function(e){return J(e,"x",x,"y",b)||re||ie||oe})).watchTransition($,"scatter points").attr("transform",(function(e){return"translate("+t.utils.NaNtoZero(m(x(e[0],e[1])))+","+t.utils.NaNtoZero(v(b(e[0],e[1])))+")"})),fe.filter((function(e){return J(e,"shape",C,"size",E)||re||ie||oe})).watchTransition($,"scatter points").attr("d",t.utils.symbol().type((function(e){return C(e[0])})).size((function(e){return y(E(e[0],e[1]))}))),q){var he=pe.selectAll(".nv-label").data((function(e){return e.values.map((function(e,t){return[e,t]})).filter((function(e,t){return L(e[0],t)}))}));he.enter().append("text").style("fill",(function(e,t){return e.color})).style("stroke-opacity",0).style("fill-opacity",1).attr("transform",(function(r){return"translate("+(t.utils.NaNtoZero(e(x(r[0],r[1])))+Math.sqrt(y(E(r[0],r[1]))/Math.PI)+2)+","+t.utils.NaNtoZero(n(b(r[0],r[1])))+")"})).text((function(e,t){return e[0].label})),he.exit().remove(),pe.exit().selectAll("path.nv-label").watchTransition($,"scatter exit").attr("transform",(function(e){return"translate("+(t.utils.NaNtoZero(m(x(e[0],e[1])))+Math.sqrt(y(E(e[0],e[1]))/Math.PI)+2)+","+t.utils.NaNtoZero(v(b(e[0],e[1])))+")"})).remove(),he.each((function(e){d3.select(this).classed("nv-label",!0).classed("nv-label-"+e[1],!1).classed("hover",!1)})),he.watchTransition($,"scatter labels").attr("transform",(function(e){return"translate("+(t.utils.NaNtoZero(m(x(e[0],e[1])))+Math.sqrt(y(E(e[0],e[1]))/Math.PI)+2)+","+t.utils.NaNtoZero(v(b(e[0],e[1])))+")"}))}W?(clearTimeout(l),l=setTimeout(de,W)):de(),e=m.copy(),n=v.copy(),r=y.copy(),a=c,s=d})),$.renderEnd("scatter immediate"),Z}return Z.dispatch=G,Z.options=t.utils.optionsFunc.bind(Z),Z._calls=new function(){this.clearHighlights=function(){return t.dom.write((function(){g.selectAll(".nv-point.hover").classed("hover",!1)})),null},this.highlightPoint=function(e,n,r){t.dom.write((function(){g.select(".nv-groups").selectAll(".nv-series-"+e).selectAll(".nv-point-"+n).classed("hover",r)}))}},G.on("elementMouseover.point",(function(e){N&&Z._calls.highlightPoint(e.seriesIndex,e.pointIndex,!0)})),G.on("elementMouseout.point",(function(e){N&&Z._calls.highlightPoint(e.seriesIndex,e.pointIndex,!1)})),Z._options=Object.create({},{width:{get:function(){return c},set:function(e){c=e}},height:{get:function(){return d},set:function(e){d=e}},xScale:{get:function(){return m},set:function(e){m=e}},yScale:{get:function(){return v},set:function(e){v=e}},pointScale:{get:function(){return y},set:function(e){y=e}},xDomain:{get:function(){return D},set:function(e){D=e}},yDomain:{get:function(){return M},set:function(e){M=e}},pointDomain:{get:function(){return j},set:function(e){j=e}},xRange:{get:function(){return P},set:function(e){P=e}},yRange:{get:function(){return F},set:function(e){F=e}},pointRange:{get:function(){return B},set:function(e){B=e}},forceX:{get:function(){return T},set:function(e){T=e}},forceY:{get:function(){return S},set:function(e){S=e}},forcePoint:{get:function(){return w},set:function(e){w=e}},interactive:{get:function(){return N},set:function(e){N=e}},pointActive:{get:function(){return L},set:function(e){L=e}},padDataOuter:{get:function(){return I},set:function(e){I=e}},padData:{get:function(){return A},set:function(e){A=e}},clipEdge:{get:function(){return R},set:function(e){R=e}},clipVoronoi:{get:function(){return k},set:function(e){k=e}},clipRadius:{get:function(){return O},set:function(e){O=e}},showVoronoi:{get:function(){return _},set:function(e){_=e}},id:{get:function(){return h},set:function(e){h=e}},interactiveUpdateDelay:{get:function(){return W},set:function(e){W=e}},showLabels:{get:function(){return q},set:function(e){q=e}},pointBorderColor:{get:function(){return f},set:function(e){f=e}},x:{get:function(){return x},set:function(e){x=d3.functor(e)}},y:{get:function(){return b},set:function(e){b=d3.functor(e)}},pointSize:{get:function(){return E},set:function(e){E=d3.functor(e)}},pointShape:{get:function(){return C},set:function(e){C=d3.functor(e)}},margin:{get:function(){return u},set:function(e){u.top=void 0!==e.top?e.top:u.top,u.right=void 0!==e.right?e.right:u.right,u.bottom=void 0!==e.bottom?e.bottom:u.bottom,u.left=void 0!==e.left?e.left:u.left}},duration:{get:function(){return V},set:function(e){V=e,$.reset(V)}},color:{get:function(){return p},set:function(e){p=t.utils.getColor(e)}},useVoronoi:{get:function(){return U},set:function(e){!1===(U=e)&&(k=!1)}}}),t.utils.initOptions(Z),Z},t.models.scatterChart=function(){"use strict";var e=t.models.scatter(),n=t.models.axis(),r=t.models.axis(),i=t.models.legend(),o=t.models.distribution(),a=t.models.distribution(),s=t.models.tooltip(),l={top:30,right:20,bottom:50,left:75},u=null,c=null,d=null,p=null,f=t.utils.defaultColor(),h=e.xScale(),g=e.yScale(),m=!1,v=!1,y=!0,x=!0,b=!0,E=!1,C=t.utils.state(),T=null,S=d3.dispatch("stateChange","changeState","renderEnd"),w=null,N=250,L=!1;e.xScale(h).yScale(g),n.orient("bottom").tickPadding(10),r.orient(E?"right":"left").tickPadding(10),o.axis("x"),a.axis("y"),s.headerFormatter((function(e,t){return n.tickFormat()(e,t)})).valueFormatter((function(e,t){return r.tickFormat()(e,t)}));var A=t.utils.renderWatch(S,N);function I(w){return A.reset(),A.models(e),x&&A.models(n),b&&A.models(r),m&&A.models(o),v&&A.models(a),w.each((function(w){p=d3.select(this),t.utils.initSVG(p);var R,k=t.utils.availableWidth(c,p,l),_=t.utils.availableHeight(d,p,l);if(I.update=function(){0===N?p.call(I):p.transition().duration(N).call(I)},I.container=this,C.setter(function(e){return function(t){void 0!==t.active&&e.forEach((function(e,n){e.disabled=!t.active[n]}))}}(w),I.update).getter(function(e){return function(){return{active:e.map((function(e){return!e.disabled}))}}}(w)).update(),C.disabled=w.map((function(e){return!!e.disabled})),!T)for(R in T={},C)C[R]instanceof Array?T[R]=C[R].slice(0):T[R]=C[R];if(!(w&&w.length&&w.filter((function(e){return e.values.length})).length))return t.utils.noData(I,p),A.renderEnd("scatter immediate"),I;p.selectAll(".nv-noData").remove(),h=e.xScale(),g=e.yScale();var O=p.selectAll("g.nv-wrap.nv-scatterChart").data([w]),D=O.enter().append("g").attr("class","nvd3 nv-wrap nv-scatterChart nv-chart-"+e.id()).append("g"),M=O.select("g");if(D.append("rect").attr("class","nvd3 nv-background").style("pointer-events","none"),D.append("g").attr("class","nv-x nv-axis"),D.append("g").attr("class","nv-y nv-axis"),D.append("g").attr("class","nv-scatterWrap"),D.append("g").attr("class","nv-regressionLinesWrap"),D.append("g").attr("class","nv-distWrap"),D.append("g").attr("class","nv-legendWrap"),E&&M.select(".nv-y.nv-axis").attr("transform","translate("+k+",0)"),y){var P=k;i.width(P),O.select(".nv-legendWrap").datum(w).call(i),u||i.height()===l.top||(l.top=i.height(),_=t.utils.availableHeight(d,p,l)),O.select(".nv-legendWrap").attr("transform","translate(0,"+-l.top+")")}else M.select(".nv-legendWrap").selectAll("*").remove();O.attr("transform","translate("+l.left+","+l.top+")"),e.width(k).height(_).color(w.map((function(e,t){return e.color=e.color||f(e,t),e.color})).filter((function(e,t){return!w[t].disabled}))).showLabels(L),O.select(".nv-scatterWrap").datum(w.filter((function(e){return!e.disabled}))).call(e),O.select(".nv-regressionLinesWrap").attr("clip-path","url(#nv-edge-clip-"+e.id()+")");var F=O.select(".nv-regressionLinesWrap").selectAll(".nv-regLines").data((function(e){return e}));F.enter().append("g").attr("class","nv-regLines");var j=F.selectAll(".nv-regLine").data((function(e){return[e]}));j.enter().append("line").attr("class","nv-regLine").style("stroke-opacity",0),j.filter((function(e){return e.intercept&&e.slope})).watchTransition(A,"scatterPlusLineChart: regline").attr("x1",h.range()[0]).attr("x2",h.range()[1]).attr("y1",(function(e,t){return g(h.domain()[0]*e.slope+e.intercept)})).attr("y2",(function(e,t){return g(h.domain()[1]*e.slope+e.intercept)})).style("stroke",(function(e,t,n){return f(e,n)})).style("stroke-opacity",(function(e,t){return e.disabled||void 0===e.slope||void 0===e.intercept?0:1})),x&&(n.scale(h)._ticks(t.utils.calcTicksX(k/100,w)).tickSize(-_,0),M.select(".nv-x.nv-axis").attr("transform","translate(0,"+g.range()[0]+")").call(n)),b&&(r.scale(g)._ticks(t.utils.calcTicksY(_/36,w)).tickSize(-k,0),M.select(".nv-y.nv-axis").call(r)),m&&(o.getData(e.x()).scale(h).width(k).color(w.map((function(e,t){return e.color||f(e,t)})).filter((function(e,t){return!w[t].disabled}))),D.select(".nv-distWrap").append("g").attr("class","nv-distributionX"),M.select(".nv-distributionX").attr("transform","translate(0,"+g.range()[0]+")").datum(w.filter((function(e){return!e.disabled}))).call(o)),v&&(a.getData(e.y()).scale(g).width(_).color(w.map((function(e,t){return e.color||f(e,t)})).filter((function(e,t){return!w[t].disabled}))),D.select(".nv-distWrap").append("g").attr("class","nv-distributionY"),M.select(".nv-distributionY").attr("transform","translate("+(E?k:-a.size())+",0)").datum(w.filter((function(e){return!e.disabled}))).call(a)),i.dispatch.on("stateChange",(function(e){for(var t in e)C[t]=e[t];S.stateChange(C),I.update()})),S.on("changeState",(function(e){void 0!==e.disabled&&(w.forEach((function(t,n){t.disabled=e.disabled[n]})),C.disabled=e.disabled),I.update()})),e.dispatch.on("elementMouseout.tooltip",(function(t){s.hidden(!0),p.select(".nv-chart-"+e.id()+" .nv-series-"+t.seriesIndex+" .nv-distx-"+t.pointIndex).attr("y1",0),p.select(".nv-chart-"+e.id()+" .nv-series-"+t.seriesIndex+" .nv-disty-"+t.pointIndex).attr("x2",a.size())})),e.dispatch.on("elementMouseover.tooltip",(function(e){p.select(".nv-series-"+e.seriesIndex+" .nv-distx-"+e.pointIndex).attr("y1",e.relativePos[1]-_),p.select(".nv-series-"+e.seriesIndex+" .nv-disty-"+e.pointIndex).attr("x2",e.relativePos[0]+o.size()),s.data(e).hidden(!1)})),h.copy(),g.copy()})),A.renderEnd("scatter with line immediate"),I}return I.dispatch=S,I.scatter=e,I.legend=i,I.xAxis=n,I.yAxis=r,I.distX=o,I.distY=a,I.tooltip=s,I.options=t.utils.optionsFunc.bind(I),I._options=Object.create({},{width:{get:function(){return c},set:function(e){c=e}},height:{get:function(){return d},set:function(e){d=e}},container:{get:function(){return p},set:function(e){p=e}},showDistX:{get:function(){return m},set:function(e){m=e}},showDistY:{get:function(){return v},set:function(e){v=e}},showLegend:{get:function(){return y},set:function(e){y=e}},showXAxis:{get:function(){return x},set:function(e){x=e}},showYAxis:{get:function(){return b},set:function(e){b=e}},defaultState:{get:function(){return T},set:function(e){T=e}},noData:{get:function(){return w},set:function(e){w=e}},duration:{get:function(){return N},set:function(e){N=e}},showLabels:{get:function(){return L},set:function(e){L=e}},margin:{get:function(){return l},set:function(e){void 0!==e.top&&(l.top=e.top,u=e.top),l.right=void 0!==e.right?e.right:l.right,l.bottom=void 0!==e.bottom?e.bottom:l.bottom,l.left=void 0!==e.left?e.left:l.left}},rightAlignYAxis:{get:function(){return E},set:function(e){E=e,r.orient(e?"right":"left")}},color:{get:function(){return f},set:function(e){f=t.utils.getColor(e),i.color(f),o.color(f),a.color(f)}}}),t.utils.inheritOptions(I,e),t.utils.initOptions(I),I},t.models.sparkline=function(){"use strict";var e,n,r,i,o={top:2,right:0,bottom:2,left:0},a=400,s=32,l=null,u=!0,c=d3.scale.linear(),d=d3.scale.linear(),p=function(e){return e.x},f=function(e){return e.y},h=t.utils.getColor(["#000"]),g=!0,m=!0,v=d3.dispatch("renderEnd"),y=t.utils.renderWatch(v);function x(u){return y.reset(),u.each((function(u){var v=a-o.left-o.right,y=s-o.top-o.bottom;l=d3.select(this),t.utils.initSVG(l),c.domain(e||d3.extent(u,p)).range(r||[0,v]),d.domain(n||d3.extent(u,f)).range(i||[y,0]);var x=l.selectAll("g.nv-wrap.nv-sparkline").data([u]);x.enter().append("g").attr("class","nvd3 nv-wrap nv-sparkline").append("g"),x.select("g"),x.attr("transform","translate("+o.left+","+o.top+")");var b=x.selectAll("path").data((function(e){return[e]}));b.enter().append("path"),b.exit().remove(),b.style("stroke",(function(e,t){return e.color||h(e,t)})).attr("d",d3.svg.line().x((function(e,t){return c(p(e,t))})).y((function(e,t){return d(f(e,t))})));var E=x.selectAll("circle.nv-point").data((function(e){var t=e.map((function(e,t){return f(e,t)}));function n(t){if(-1!=t){var n=e[t];return n.pointIndex=t,n}return null}var r=n(t.lastIndexOf(d.domain()[1])),i=n(t.indexOf(d.domain()[0])),o=n(t.length-1);return[g?i:null,g?r:null,m?o:null].filter((function(e){return null!=e}))}));E.enter().append("circle"),E.exit().remove(),E.attr("cx",(function(e,t){return c(p(e,e.pointIndex))})).attr("cy",(function(e,t){return d(f(e,e.pointIndex))})).attr("r",2).attr("class",(function(e,t){return p(e,e.pointIndex)==c.domain()[1]?"nv-point nv-currentValue":f(e,e.pointIndex)==d.domain()[0]?"nv-point nv-minValue":"nv-point nv-maxValue"}))})),y.renderEnd("sparkline immediate"),x}return x.options=t.utils.optionsFunc.bind(x),x._options=Object.create({},{width:{get:function(){return a},set:function(e){a=e}},height:{get:function(){return s},set:function(e){s=e}},xDomain:{get:function(){return e},set:function(t){e=t}},yDomain:{get:function(){return n},set:function(e){n=e}},xRange:{get:function(){return r},set:function(e){r=e}},yRange:{get:function(){return i},set:function(e){i=e}},xScale:{get:function(){return c},set:function(e){c=e}},yScale:{get:function(){return d},set:function(e){d=e}},animate:{get:function(){return u},set:function(e){u=e}},showMinMaxPoints:{get:function(){return g},set:function(e){g=e}},showCurrentPoint:{get:function(){return m},set:function(e){m=e}},x:{get:function(){return p},set:function(e){p=d3.functor(e)}},y:{get:function(){return f},set:function(e){f=d3.functor(e)}},margin:{get:function(){return o},set:function(e){o.top=void 0!==e.top?e.top:o.top,o.right=void 0!==e.right?e.right:o.right,o.bottom=void 0!==e.bottom?e.bottom:o.bottom,o.left=void 0!==e.left?e.left:o.left}},color:{get:function(){return h},set:function(e){h=t.utils.getColor(e)}}}),x.dispatch=v,t.utils.initOptions(x),x},t.models.sparklinePlus=function(){"use strict";var e,n,r=t.models.sparkline(),i={top:15,right:100,bottom:10,left:50},o=null,a=null,s=[],l=!1,u=d3.format(",r"),c=d3.format(",.2f"),d=!0,p=!0,f=!1,h=null,g=d3.dispatch("renderEnd"),m=t.utils.renderWatch(g);function v(h){return m.reset(),m.models(r),h.each((function(h){var g=d3.select(this);t.utils.initSVG(g);var m=t.utils.availableWidth(o,g,i),y=t.utils.availableHeight(a,g,i);if(v.update=function(){g.call(v)},v.container=this,!h||!h.length)return t.utils.noData(v,g),v;g.selectAll(".nv-noData").remove();var x=r.y()(h[h.length-1],h.length-1);e=r.xScale(),n=r.yScale();var b=g.selectAll("g.nv-wrap.nv-sparklineplus").data([h]),E=b.enter().append("g").attr("class","nvd3 nv-wrap nv-sparklineplus").append("g"),C=b.select("g");E.append("g").attr("class","nv-sparklineWrap"),E.append("g").attr("class","nv-valueWrap"),E.append("g").attr("class","nv-hoverArea"),b.attr("transform","translate("+i.left+","+i.top+")");var T=C.select(".nv-sparklineWrap");if(r.width(m).height(y),T.call(r),d){var S=C.select(".nv-valueWrap").selectAll(".nv-currentValue").data([x]);S.enter().append("text").attr("class","nv-currentValue").attr("dx",f?-8:8).attr("dy",".9em").style("text-anchor",f?"end":"start"),S.attr("x",m+(f?i.right:0)).attr("y",p?function(e){return n(e)}:0).style("fill",r.color()(h[h.length-1],h.length-1)).text(c(x))}function w(){if(!l){var t=C.selectAll(".nv-hoverValue").data(s),n=t.enter().append("g").attr("class","nv-hoverValue").style("stroke-opacity",0).style("fill-opacity",0);t.exit().transition().duration(250).style("stroke-opacity",0).style("fill-opacity",0).remove(),t.attr("transform",(function(t){return"translate("+e(r.x()(h[t],t))+",0)"})).transition().duration(250).style("stroke-opacity",1).style("fill-opacity",1),s.length&&(n.append("line").attr("x1",0).attr("y1",-i.top).attr("x2",0).attr("y2",y),n.append("text").attr("class","nv-xValue").attr("x",-6).attr("y",-i.top).attr("text-anchor","end").attr("dy",".9em"),C.select(".nv-hoverValue .nv-xValue").text(u(r.x()(h[s[0]],s[0]))),n.append("text").attr("class","nv-yValue").attr("x",6).attr("y",-i.top).attr("text-anchor","start").attr("dy",".9em"),C.select(".nv-hoverValue .nv-yValue").text(c(r.y()(h[s[0]],s[0]))))}}E.select(".nv-hoverArea").append("rect").on("mousemove",(function(){if(!l){var t=d3.mouse(this)[0]-i.left;s=[function(e,t){for(var n=Math.abs(r.x()(e[0],0)-t),i=0,o=0;o<e.length;o++)Math.abs(r.x()(e[o],o)-t)<n&&(n=Math.abs(r.x()(e[o],o)-t),i=o);return i}(h,Math.round(e.invert(t)))],w()}})).on("click",(function(){l=!l})).on("mouseout",(function(){s=[],w()})),C.select(".nv-hoverArea rect").attr("transform",(function(e){return"translate("+-i.left+","+-i.top+")"})).attr("width",m+i.left+i.right).attr("height",y+i.top)})),m.renderEnd("sparklinePlus immediate"),v}return v.dispatch=g,v.sparkline=r,v.options=t.utils.optionsFunc.bind(v),v._options=Object.create({},{width:{get:function(){return o},set:function(e){o=e}},height:{get:function(){return a},set:function(e){a=e}},xTickFormat:{get:function(){return u},set:function(e){u=e}},yTickFormat:{get:function(){return c},set:function(e){c=e}},showLastValue:{get:function(){return d},set:function(e){d=e}},alignValue:{get:function(){return p},set:function(e){p=e}},rightAlignValue:{get:function(){return f},set:function(e){f=e}},noData:{get:function(){return h},set:function(e){h=e}},margin:{get:function(){return i},set:function(e){i.top=void 0!==e.top?e.top:i.top,i.right=void 0!==e.right?e.right:i.right,i.bottom=void 0!==e.bottom?e.bottom:i.bottom,i.left=void 0!==e.left?e.left:i.left}}}),t.utils.inheritOptions(v,r),t.utils.initOptions(v),v},t.models.stackedArea=function(){"use strict";var e,n,r={top:0,right:0,bottom:0,left:0},i=960,o=500,a=t.utils.defaultColor(),s=Math.floor(1e5*Math.random()),l=null,u=function(e){return e.x},c=function(e){return e.y},d=function(e,t){return!isNaN(c(e,t))&&null!==c(e,t)},p="stack",f="zero",h="default",g="linear",m=!1,v=t.models.scatter(),y=250,x=d3.dispatch("areaClick","areaMouseover","areaMouseout","renderEnd","elementClick","elementMouseover","elementMouseout");v.pointSize(2.2).pointDomain([2.2,2.2]);var b=t.utils.renderWatch(x,y);function E(p){return b.reset(),b.models(v),p.each((function(p){var y=i-r.left-r.right,C=o-r.top-r.bottom;l=d3.select(this),t.utils.initSVG(l),e=v.xScale(),n=v.yScale();var T=p;p.forEach((function(e,t){e.seriesIndex=t,e.values=e.values.map((function(e,n){return e.index=n,e.seriesIndex=t,e}))}));var S=p.filter((function(e){return!e.disabled}));p=d3.layout.stack().order(h).offset(f).values((function(e){return e.values})).x(u).y(c).out((function(e,t,n){e.display={y:n,y0:t}}))(S);var w=l.selectAll("g.nv-wrap.nv-stackedarea").data([p]),N=w.enter().append("g").attr("class","nvd3 nv-wrap nv-stackedarea"),L=N.append("defs"),A=N.append("g"),I=w.select("g");A.append("g").attr("class","nv-areaWrap"),A.append("g").attr("class","nv-scatterWrap"),w.attr("transform","translate("+r.left+","+r.top+")"),0==v.forceY().length&&v.forceY().push(0),v.width(y).height(C).x(u).y((function(e){if(void 0!==e.display)return e.display.y+e.display.y0})).color(p.map((function(e,t){return e.color=e.color||a(e,e.seriesIndex),e.color}))),I.select(".nv-scatterWrap").datum(p).call(v),L.append("clipPath").attr("id","nv-edge-clip-"+s).append("rect"),w.select("#nv-edge-clip-"+s+" rect").attr("width",y).attr("height",C),I.attr("clip-path",m?"url(#nv-edge-clip-"+s+")":"");var R=d3.svg.area().defined(d).x((function(t,n){return e(u(t,n))})).y0((function(e){return n(e.display.y0)})).y1((function(e){return n(e.display.y+e.display.y0)})).interpolate(g),k=d3.svg.area().defined(d).x((function(t,n){return e(u(t,n))})).y0((function(e){return n(e.display.y0)})).y1((function(e){return n(e.display.y0)})),_=I.select(".nv-areaWrap").selectAll("path.nv-area").data((function(e){return e}));_.enter().append("path").attr("class",(function(e,t){return"nv-area nv-area-"+t})).attr("d",(function(e,t){return k(e.values,e.seriesIndex)})).on("mouseover",(function(e,t){d3.select(this).classed("hover",!0),x.areaMouseover({point:e,series:e.key,pos:[d3.event.pageX,d3.event.pageY],seriesIndex:e.seriesIndex})})).on("mouseout",(function(e,t){d3.select(this).classed("hover",!1),x.areaMouseout({point:e,series:e.key,pos:[d3.event.pageX,d3.event.pageY],seriesIndex:e.seriesIndex})})).on("click",(function(e,t){d3.select(this).classed("hover",!1),x.areaClick({point:e,series:e.key,pos:[d3.event.pageX,d3.event.pageY],seriesIndex:e.seriesIndex})})),_.exit().remove(),_.style("fill",(function(e,t){return e.color||a(e,e.seriesIndex)})).style("stroke",(function(e,t){return e.color||a(e,e.seriesIndex)})),_.watchTransition(b,"stackedArea path").attr("d",(function(e,t){return R(e.values,t)})),v.dispatch.on("elementMouseover.area",(function(e){I.select(".nv-chart-"+s+" .nv-area-"+e.seriesIndex).classed("hover",!0)})),v.dispatch.on("elementMouseout.area",(function(e){I.select(".nv-chart-"+s+" .nv-area-"+e.seriesIndex).classed("hover",!1)})),E.d3_stackedOffset_stackPercent=function(e){var t,n,r,i=e.length,o=e[0].length,a=[];for(n=0;n<o;++n){for(t=0,r=0;t<T.length;t++)r+=c(T[t].values[n]);if(r)for(t=0;t<i;t++)e[t][n][1]/=r;else for(t=0;t<i;t++)e[t][n][1]=0}for(n=0;n<o;++n)a[n]=0;return a}})),b.renderEnd("stackedArea immediate"),E}return E.dispatch=x,E.scatter=v,v.dispatch.on("elementClick",(function(){x.elementClick.apply(this,arguments)})),v.dispatch.on("elementMouseover",(function(){x.elementMouseover.apply(this,arguments)})),v.dispatch.on("elementMouseout",(function(){x.elementMouseout.apply(this,arguments)})),E.interpolate=function(e){return arguments.length?(g=e,E):g},E.duration=function(e){return arguments.length?(y=e,b.reset(y),v.duration(y),E):y},E.dispatch=x,E.scatter=v,E.options=t.utils.optionsFunc.bind(E),E._options=Object.create({},{width:{get:function(){return i},set:function(e){i=e}},height:{get:function(){return o},set:function(e){o=e}},defined:{get:function(){return d},set:function(e){d=e}},clipEdge:{get:function(){return m},set:function(e){m=e}},offset:{get:function(){return f},set:function(e){f=e}},order:{get:function(){return h},set:function(e){h=e}},interpolate:{get:function(){return g},set:function(e){g=e}},x:{get:function(){return u},set:function(e){u=d3.functor(e)}},y:{get:function(){return c},set:function(e){c=d3.functor(e)}},margin:{get:function(){return r},set:function(e){r.top=void 0!==e.top?e.top:r.top,r.right=void 0!==e.right?e.right:r.right,r.bottom=void 0!==e.bottom?e.bottom:r.bottom,r.left=void 0!==e.left?e.left:r.left}},color:{get:function(){return a},set:function(e){a=t.utils.getColor(e)}},style:{get:function(){return p},set:function(e){switch(p=e){case"stack":E.offset("zero"),E.order("default");break;case"stream":E.offset("wiggle"),E.order("inside-out");break;case"stream-center":E.offset("silhouette"),E.order("inside-out");break;case"expand":E.offset("expand"),E.order("default");break;case"stack_percent":E.offset(E.d3_stackedOffset_stackPercent),E.order("default")}}},duration:{get:function(){return y},set:function(e){y=e,b.reset(y),v.duration(y)}}}),t.utils.inheritOptions(E,v),t.utils.initOptions(E),E},t.models.stackedAreaChart=function(){"use strict";var e,n,r=t.models.stackedArea(),i=t.models.axis(),o=t.models.axis(),a=t.models.legend(),s=t.models.legend(),l=t.interactiveGuideline(),u=t.models.tooltip(),c=t.models.focus(t.models.stackedArea()),d={top:10,right:25,bottom:50,left:60},p=null,f=null,h=null,g=t.utils.defaultColor(),m=!0,v=!0,y="top",x=!0,b=!0,E=!1,C=!1,T=!1,S=!0,w="TOTAL",N=t.utils.state(),L=null,A=null,I=d3.dispatch("stateChange","changeState","renderEnd"),R=250,k=["Stacked","Stream","Expanded"],_={},O=250;N.style=r.style(),i.orient("bottom").tickPadding(7),o.orient(E?"right":"left"),u.headerFormatter((function(e,t){return i.tickFormat()(e,t)})).valueFormatter((function(e,t){return o.tickFormat()(e,t)})),l.tooltip.headerFormatter((function(e,t){return i.tickFormat()(e,t)})).valueFormatter((function(e,t){return null==e?"N/A":o.tickFormat()(e,t)}));var D=null,M=null;s.updateState(!1);var P=t.utils.renderWatch(I),F=(r.style(),d3.format("%"));function j(u){return P.reset(),P.models(r),x&&P.models(i),b&&P.models(o),u.each((function(u){var A=d3.select(this);t.utils.initSVG(A);var P,B=t.utils.availableWidth(f,A,d),H=t.utils.availableHeight(h,A,d)-(C?c.height():0);if(j.update=function(){A.transition().duration(O).call(j)},j.container=this,N.setter(function(e){return function(t){void 0!==t.style&&t.style,void 0!==t.active&&e.forEach((function(e,n){e.disabled=!t.active[n]}))}}(u),j.update).getter(function(e){return function(){return{active:e.map((function(e){return!e.disabled})),style:r.style()}}}(u)).update(),N.disabled=u.map((function(e){return!!e.disabled})),!L)for(P in L={},N)N[P]instanceof Array?L[P]=N[P].slice(0):L[P]=N[P];if(!(u&&u.length&&u.filter((function(e){return e.values.length})).length))return t.utils.noData(j,A),j;A.selectAll(".nv-noData").remove(),e=r.xScale(),n=r.yScale();var G=A.selectAll("g.nv-wrap.nv-stackedAreaChart").data([u]),U=G.enter().append("g").attr("class","nvd3 nv-wrap nv-stackedAreaChart").append("g"),V=G.select("g");U.append("g").attr("class","nv-legendWrap"),U.append("g").attr("class","nv-controlsWrap");var W=U.append("g").attr("class","nv-focus");if(W.append("g").attr("class","nv-background").append("rect"),W.append("g").attr("class","nv-x nv-axis"),W.append("g").attr("class","nv-y nv-axis"),W.append("g").attr("class","nv-stackedWrap"),W.append("g").attr("class","nv-interactive"),U.append("g").attr("class","nv-focusWrap"),v){var q=m&&"top"===y?B-R:B;if(a.width(q),V.select(".nv-legendWrap").datum(u).call(a),"bottom"===y){var z=10+(x?12:0);d.bottom=Math.max(a.height()+z,d.bottom);var $=(H=t.utils.availableHeight(h,A,d)-(C?c.height():0))+z;V.select(".nv-legendWrap").attr("transform","translate(0,"+$+")")}else"top"===y&&(p||d.top==a.height()||(d.top=a.height(),H=t.utils.availableHeight(h,A,d)-(C?c.height():0)),V.select(".nv-legendWrap").attr("transform","translate("+(B-q)+","+-d.top+")"))}else V.select(".nv-legendWrap").selectAll("*").remove();if(m){var X=[{key:_.stacked||"Stacked",metaKey:"Stacked",disabled:"stack"!=r.style(),style:"stack"},{key:_.stream||"Stream",metaKey:"Stream",disabled:"stream"!=r.style(),style:"stream"},{key:_.expanded||"Expanded",metaKey:"Expanded",disabled:"expand"!=r.style(),style:"expand"},{key:_.stack_percent||"Stack %",metaKey:"Stack_Percent",disabled:"stack_percent"!=r.style(),style:"stack_percent"}];R=k.length/3*260,X=X.filter((function(e){return-1!==k.indexOf(e.metaKey)})),s.width(R).color(["#444","#444","#444"]),V.select(".nv-controlsWrap").datum(X).call(s);var Q=Math.max(s.height(),v&&"top"===y?a.height():0);d.top!=Q&&(d.top=Q,H=t.utils.availableHeight(h,A,d)-(C?c.height():0)),V.select(".nv-controlsWrap").attr("transform","translate(0,"+-d.top+")")}else V.select(".nv-controlsWrap").selectAll("*").remove();G.attr("transform","translate("+d.left+","+d.top+")"),E&&V.select(".nv-y.nv-axis").attr("transform","translate("+B+",0)"),T&&(l.width(B).height(H).margin({left:d.left,top:d.top}).svgContainer(A).xScale(e),G.select(".nv-interactive").call(l)),V.select(".nv-focus .nv-background rect").attr("width",B).attr("height",H),r.width(B).height(H).color(u.map((function(e,t){return e.color||g(e,t)})).filter((function(e,t){return!u[t].disabled})));var Y,K=V.select(".nv-focus .nv-stackedWrap").datum(u.filter((function(e){return!e.disabled})));function J(){x&&V.select(".nv-focus .nv-x.nv-axis").attr("transform","translate(0,"+H+")").transition().duration(O).call(i)}function Z(){if(b){if("expand"===r.style()||"stack_percent"===r.style()){var e=o.tickFormat();D&&e===F||(D=e),o.tickFormat(F)}else D&&(o.tickFormat(D),D=null);V.select(".nv-focus .nv-y.nv-axis").transition().duration(0).call(o)}}if(x&&i.scale(e)._ticks(t.utils.calcTicksX(B/100,u)).tickSize(-H,0),b&&(Y="wiggle"===r.offset()?0:t.utils.calcTicksY(H/36,u),o.scale(n)._ticks(Y).tickSize(-B,0)),C){c.width(B),V.select(".nv-focusWrap").attr("transform","translate(0,"+(H+d.bottom+c.margin().top)+")").datum(u.filter((function(e){return!e.disabled}))).call(c);var ee=c.brush.empty()?c.xDomain():c.brush.extent();null!==ee&&te(ee)}else K.transition().call(r),J(),Z();function te(e){V.select(".nv-focus .nv-stackedWrap").datum(u.filter((function(e){return!e.disabled})).map((function(t,n){return{key:t.key,area:t.area,classed:t.classed,values:t.values.filter((function(t,n){return r.x()(t,n)>=e[0]&&r.x()(t,n)<=e[1]})),disableTooltip:t.disableTooltip}}))).transition().duration(O).call(r),J(),Z()}r.dispatch.on("areaClick.toggle",(function(e){1===u.filter((function(e){return!e.disabled})).length?u.forEach((function(e){e.disabled=!1})):u.forEach((function(t,n){t.disabled=n!=e.seriesIndex})),N.disabled=u.map((function(e){return!!e.disabled})),I.stateChange(N),j.update()})),a.dispatch.on("stateChange",(function(e){for(var t in e)N[t]=e[t];I.stateChange(N),j.update()})),s.dispatch.on("legendClick",(function(e,t){e.disabled&&(X=X.map((function(e){return e.disabled=!0,e})),e.disabled=!1,r.style(e.style),N.style=r.style(),I.stateChange(N),j.update())})),l.dispatch.on("elementMousemove",(function(e){r.clearHighlights();var n,i,o,a=[],s=0,c=!0,d=!1;if(u.filter((function(e,t){return e.seriesIndex=t,!e.disabled})).forEach((function(l,p){i=t.interactiveBisect(l.values,e.pointXValue,j.x());var f=l.values[i],h=j.y()(f,i);if(null!=h&&h>0&&(r.highlightPoint(p,i,!0),d=!0),p!==u.length-1||d||r.highlightPoint(p,i,!0),void 0!==f){void 0===n&&(n=f),void 0===o&&(o=j.xScale()(j.x()(f,i)));var m="expand"==r.style()?f.display.y:j.y()(f,i);a.push({key:l.key,value:m,color:g(l,l.seriesIndex),point:f}),S&&"expand"!=r.style()&&null!=m&&(s+=m,c=!1)}})),a.reverse(),a.length>2){var p=j.yScale().invert(e.mouseY),f=null;a.forEach((function(e,t){p=Math.abs(p);var n=Math.abs(e.point.display.y0),r=Math.abs(e.point.display.y);p>=n&&p<=r+n&&(f=t)})),null!=f&&(a[f].highlight=!0)}S&&"expand"!=r.style()&&a.length>=2&&!c&&a.push({key:w,value:s,total:!0});var h=j.x()(n,i),m=l.tooltip.valueFormatter();"expand"===r.style()||"stack_percent"===r.style()?(M||(M=m),m=d3.format(".1%")):M&&(m=M,M=null),l.tooltip.valueFormatter(m).data({value:h,series:a})(),l.renderGuideLine(o)})),l.dispatch.on("elementMouseout",(function(e){r.clearHighlights()})),c.dispatch.on("onBrush",(function(e){te(e)})),I.on("changeState",(function(e){void 0!==e.disabled&&u.length===e.disabled.length&&(u.forEach((function(t,n){t.disabled=e.disabled[n]})),N.disabled=e.disabled),void 0!==e.style&&(r.style(e.style),e.style),j.update()}))})),P.renderEnd("stacked Area chart immediate"),j}return r.dispatch.on("elementMouseover.tooltip",(function(e){e.point.x=r.x()(e.point),e.point.y=r.y()(e.point),u.data(e).hidden(!1)})),r.dispatch.on("elementMouseout.tooltip",(function(e){u.hidden(!0)})),j.dispatch=I,j.stacked=r,j.legend=a,j.controls=s,j.xAxis=i,j.x2Axis=c.xAxis,j.yAxis=o,j.y2Axis=c.yAxis,j.interactiveLayer=l,j.tooltip=u,j.focus=c,j.dispatch=I,j.options=t.utils.optionsFunc.bind(j),j._options=Object.create({},{width:{get:function(){return f},set:function(e){f=e}},height:{get:function(){return h},set:function(e){h=e}},showLegend:{get:function(){return v},set:function(e){v=e}},legendPosition:{get:function(){return y},set:function(e){y=e}},showXAxis:{get:function(){return x},set:function(e){x=e}},showYAxis:{get:function(){return b},set:function(e){b=e}},defaultState:{get:function(){return L},set:function(e){L=e}},noData:{get:function(){return A},set:function(e){A=e}},showControls:{get:function(){return m},set:function(e){m=e}},controlLabels:{get:function(){return _},set:function(e){_=e}},controlOptions:{get:function(){return k},set:function(e){k=e}},showTotalInTooltip:{get:function(){return S},set:function(e){S=e}},totalLabel:{get:function(){return w},set:function(e){w=e}},focusEnable:{get:function(){return C},set:function(e){C=e}},focusHeight:{get:function(){return c.height()},set:function(e){c.height(e)}},brushExtent:{get:function(){return c.brushExtent()},set:function(e){c.brushExtent(e)}},margin:{get:function(){return d},set:function(e){void 0!==e.top&&(d.top=e.top,p=e.top),d.right=void 0!==e.right?e.right:d.right,d.bottom=void 0!==e.bottom?e.bottom:d.bottom,d.left=void 0!==e.left?e.left:d.left}},focusMargin:{get:function(){return c.margin},set:function(e){c.margin.top=void 0!==e.top?e.top:c.margin.top,c.margin.right=void 0!==e.right?e.right:c.margin.right,c.margin.bottom=void 0!==e.bottom?e.bottom:c.margin.bottom,c.margin.left=void 0!==e.left?e.left:c.margin.left}},duration:{get:function(){return O},set:function(e){O=e,P.reset(O),r.duration(O),i.duration(O),o.duration(O)}},color:{get:function(){return g},set:function(e){g=t.utils.getColor(e),a.color(g),r.color(g),c.color(g)}},x:{get:function(){return r.x()},set:function(e){r.x(e),c.x(e)}},y:{get:function(){return r.y()},set:function(e){r.y(e),c.y(e)}},rightAlignYAxis:{get:function(){return E},set:function(e){E=e,o.orient(E?"right":"left")}},useInteractiveGuideline:{get:function(){return T},set:function(e){T=!!e,j.interactive(!e),j.useVoronoi(!e),r.scatter.interactive(!e)}}}),t.utils.inheritOptions(j,r),t.utils.initOptions(j),j},t.models.stackedAreaWithFocusChart=function(){return t.models.stackedAreaChart().margin({bottom:30}).focusEnable(!0)},t.models.sunburst=function(){"use strict";var e,n,r,i,o={top:0,right:0,bottom:0,left:0},a=600,s=600,l="count",u={count:function(e){return 1},value:function(e){return e.value||e.size},size:function(e){return e.value||e.size}},c=Math.floor(1e4*Math.random()),d=null,p=t.utils.defaultColor(),f=!1,h=function(e){return"count"===l?e.name+" #"+e.value:e.name+" "+(e.value||e.size)},g=.02,m=function(e,t){return e.name>t.name},v=function(e,t){return void 0!==e.parent?e.name+"-"+e.parent.name+"-"+t:e.name},y=!0,x=500,b=d3.dispatch("chartClick","elementClick","elementDblClick","elementMousemove","elementMouseover","elementMouseout","renderEnd"),E=d3.scale.linear().range([0,2*Math.PI]),C=d3.scale.sqrt(),T=d3.layout.partition().sort(m),S={},w=d3.svg.arc().startAngle((function(e){return Math.max(0,Math.min(2*Math.PI,E(e.x)))})).endAngle((function(e){return Math.max(0,Math.min(2*Math.PI,E(e.x+e.dx)))})).innerRadius((function(e){return Math.max(0,C(e.y))})).outerRadius((function(e){return Math.max(0,C(e.y+e.dy))}));function N(e){return L(e)>90?180:0}function L(e){return(Math.max(0,Math.min(2*Math.PI,E(e.x)))+Math.max(0,Math.min(2*Math.PI,E(e.x+e.dx))))/2*(180/Math.PI)-90}function A(e){var t=Math.max(0,Math.min(2*Math.PI,E(e.x)));return(Math.max(0,Math.min(2*Math.PI,E(e.x+e.dx)))-t)/(2*Math.PI)}function I(e){var t=Math.max(0,Math.min(2*Math.PI,E(e.x)));return Math.max(0,Math.min(2*Math.PI,E(e.x+e.dx)))-t>g}function R(t,n){var r=d3.interpolate(E.domain(),[e.x,e.x+e.dx]),o=d3.interpolate(C.domain(),[e.y,1]),a=d3.interpolate(C.range(),[e.y?20:0,i]);return 0===n?function(){return w(t)}:function(e){return E.domain(r(e)),C.domain(o(e)).range(a(e)),w(t)}}function k(e){var t=d3.interpolate({x:e.x0,dx:e.dx0,y:e.y0,dy:e.dy0},e);return function(n){var r=t(n);return e.x0=r.x,e.dx0=r.dx,e.y0=r.y,e.dy0=r.dy,w(r)}}function _(e){e.forEach((function(e){var t=v(e),n=S[t];n?(e.dx0=n.dx,e.x0=n.x,e.dy0=n.dy,e.y0=n.y):(e.dx0=e.dx,e.x0=e.x,e.dy0=e.dy,e.y0=e.y),function(e){var t=v(e);S[t]||(S[t]={});var n=S[t];n.dx=e.dx,n.x=e.x,n.dy=e.dy,n.y=e.y}(e)}))}function O(t){var n=d.selectAll("text"),r=d.selectAll("path");n.transition().attr("opacity",0),e=t,r.transition().duration(x).attrTween("d",R).each("end",(function(e){e.x>=t.x&&e.x<t.x+t.dx&&e.depth>=t.depth&&d3.select(this.parentNode).select("text").transition().duration(x).text((function(e){return h(e)})).attr("opacity",(function(e){return I(e)?1:0})).attr("transform",(function(){var n=this.getBBox().width;if(0===e.depth)return"translate("+n/2*-1+",0)";if(e.depth===t.depth)return"translate("+(C(e.y)+5)+",0)";var r=L(e),i=N(e);return 0===i?"rotate("+r+")translate("+(C(e.y)+5)+",0)":"rotate("+r+")translate("+(C(e.y)+n+5)+",0)rotate("+i+")"}))}))}var D=t.utils.renderWatch(b);function M(e){return D.reset(),e.each((function(e){d=d3.select(this),n=t.utils.availableWidth(a,d,o),r=t.utils.availableHeight(s,d,o),i=Math.min(n,r)/2,C.range([0,i]);var g=d.select("g.nvd3.nv-wrap.nv-sunburst");g[0][0]?g.attr("transform","translate("+(n/2+o.left+o.right)+","+(r/2+o.top+o.bottom)+")"):g=d.append("g").attr("class","nvd3 nv-wrap nv-sunburst nv-chart-"+c).attr("transform","translate("+(n/2+o.left+o.right)+","+(r/2+o.top+o.bottom)+")"),d.on("click",(function(e,t){b.chartClick({data:e,index:t,pos:d3.event,id:c})})),T.value(u[l]||u.count);var m=T.nodes(e[0]).reverse();_(m);var E=g.selectAll(".arc-container").data(m,v);E.enter().append("g").attr("class","arc-container").append("path").attr("d",w).style("fill",(function(e){return e.color?e.color:p(y?(e.children?e:e.parent).name:e.name)})).style("stroke","#FFF").on("click",(function(e,t){O(e),b.elementClick({data:e,index:t})})).on("mouseover",(function(e,t){d3.select(this).classed("hover",!0).style("opacity",.8),b.elementMouseover({data:e,color:d3.select(this).style("fill"),percent:A(e)})})).on("mouseout",(function(e,t){d3.select(this).classed("hover",!1).style("opacity",1),b.elementMouseout({data:e})})).on("mousemove",(function(e,t){b.elementMousemove({data:e})})),E.each((function(e){d3.select(this).select("path").transition().duration(x).attrTween("d",k)})),f&&(E.selectAll("text").remove(),E.append("text").text((function(e){return h(e)})).transition().duration(x).attr("opacity",(function(e){return I(e)?1:0})).attr("transform",(function(e){var t=this.getBBox().width;if(0===e.depth)return"rotate(0)translate("+t/2*-1+",0)";var n=L(e),r=N(e);return 0===r?"rotate("+n+")translate("+(C(e.y)+5)+",0)":"rotate("+n+")translate("+(C(e.y)+t+5)+",0)rotate("+r+")"}))),O(m[m.length-1]),E.exit().transition().duration(x).attr("opacity",0).each("end",(function(e){var t=v(e);S[t]=void 0})).remove()})),D.renderEnd("sunburst immediate"),M}return M.dispatch=b,M.options=t.utils.optionsFunc.bind(M),M._options=Object.create({},{width:{get:function(){return a},set:function(e){a=e}},height:{get:function(){return s},set:function(e){s=e}},mode:{get:function(){return l},set:function(e){l=e}},id:{get:function(){return c},set:function(e){c=e}},duration:{get:function(){return x},set:function(e){x=e}},groupColorByParent:{get:function(){return y},set:function(e){y=!!e}},showLabels:{get:function(){return f},set:function(e){f=!!e}},labelFormat:{get:function(){return h},set:function(e){h=e}},labelThreshold:{get:function(){return g},set:function(e){g=e}},sort:{get:function(){return m},set:function(e){m=e}},key:{get:function(){return v},set:function(e){v=e}},margin:{get:function(){return o},set:function(e){o.top=null!=e.top?e.top:o.top,o.right=null!=e.right?e.right:o.right,o.bottom=null!=e.bottom?e.bottom:o.bottom,o.left=null!=e.left?e.left:o.left}},color:{get:function(){return p},set:function(e){p=t.utils.getColor(e)}}}),t.utils.initOptions(M),M},t.models.sunburstChart=function(){"use strict";var e=t.models.sunburst(),n=t.models.tooltip(),r={top:30,right:20,bottom:20,left:20},i=t.utils.defaultColor(),o=!1,a=(Math.round(1e5*Math.random()),null),s=null,l=250,u=d3.dispatch("stateChange","changeState","renderEnd"),c=t.utils.renderWatch(u);function d(n){return c.reset(),c.models(e),n.each((function(n){var i=d3.select(this);t.utils.initSVG(i);var o=t.utils.availableWidth(null,i,r),a=t.utils.availableHeight(null,i,r);if(d.update=function(){0===l?i.call(d):i.transition().duration(l).call(d)},d.container=i,!n||!n.length)return t.utils.noData(d,i),d;i.selectAll(".nv-noData").remove(),e.width(o).height(a).margin(r),i.call(e)})),c.renderEnd("sunburstChart immediate"),d}return n.duration(0).headerEnabled(!1).valueFormatter((function(e){return e})),e.dispatch.on("elementMouseover.tooltip",(function(e){e.series={key:e.data.name,value:e.data.value||e.data.size,color:e.color,percent:e.percent},o||(delete e.percent,delete e.series.percent),n.data(e).hidden(!1)})),e.dispatch.on("elementMouseout.tooltip",(function(e){n.hidden(!0)})),e.dispatch.on("elementMousemove.tooltip",(function(e){n()})),d.dispatch=u,d.sunburst=e,d.tooltip=n,d.options=t.utils.optionsFunc.bind(d),d._options=Object.create({},{noData:{get:function(){return s},set:function(e){s=e}},defaultState:{get:function(){return a},set:function(e){a=e}},showTooltipPercent:{get:function(){return o},set:function(e){o=e}},color:{get:function(){return i},set:function(t){i=t,e.color(i)}},duration:{get:function(){return l},set:function(t){l=t,c.reset(l),e.duration(l)}},margin:{get:function(){return r},set:function(t){r.top=void 0!==t.top?t.top:r.top,r.right=void 0!==t.right?t.right:r.right,r.bottom=void 0!==t.bottom?t.bottom:r.bottom,r.left=void 0!==t.left?t.left:r.left,e.margin(r)}}}),t.utils.inheritOptions(d,e),t.utils.initOptions(d),d},t.version="1.8.6",d3}.apply(t,r))||(e.exports=i)},43:function(e,t,n){"use strict";n.r(t),n.d(t,"ChartData",(function(){return r}));class r{static get DEFAULT_MULTIPLIER(){return 1.2}static get MAXIMUM_DIVISIONS(){return 10}static get COLORS(){return["#003663","#E84E0F","#02A99A","#999999"]}constructor(e,t,n,r){this.filter=r,this.initialChartSetup(e,t,n)}initialChartSetup(e,t,n,r=!0){this.disableRangeUpdate=t,this.disableOldDataRemoval=n,this.translateService=e,this.range=150,this.chartOptions=this.getDefaultChartOptions(e),this.chartSetup(this.chartOptions),r&&(this.dataHolder=this.createDataHolder(),this.firstLoad=!0)}refresh(){this.initialChartSetup(this.translateService,this.disableRangeUpdate,this.disableOldDataRemoval,!1),this.translateLabels(this.dataHolder),this.updateRange(this.dataHolder)}translateLabels(e){this.createDataHolder().forEach((t,n)=>{e[n].originalKey?e[n].originalKey=t.key:e[n].key=t.key})}setSubTitle(e){this.chartOptions.title.enable=!0;const t=e.map(e=>{if(Array.isArray(e.value)&&!e.value.length)return;const t=Array.isArray(e.value)?e.value.join("/"):e.value;return e.label+(void 0!==t?`<span class="data-value">${t}</span>`:"")});this.chartOptions.title.html=t.map(e=>`<span class="info-element">${e}</span>`)}chartSetup(e){}createDataHolder(){throw new Error("Must implement data holder creation")}addData(e,t){this.removeOldData(this.dataHolder,this.range),this.addNewData(this.dataHolder,e,t,this.isFirstLoad()),this.updateRange(this.dataHolder),this.firstLoad&&(this.firstLoad=!1)}removeOldData(e,t){this.disableOldDataRemoval||e[0].values.length>t&&e.forEach(e=>e.values.shift())}addNewData(e,t,n,r){}updateRange(e,t){if(this.disableRangeUpdate)return;const[n]=r.calculateMaxChartValueAndDivisions(e,t);this.chartOptions.chart.yDomain=[0,n]}isFirstLoad(){return this.firstLoad}getDefaultChartOptions(e){return{chart:{interpolate:"monotone",type:"lineChart",height:500,margin:{left:80,right:80},x:function(e){return e[0]},y:function(e){return e[1]},clipEdge:!0,noData:e.instant("resource.no_data"),showControls:!1,duration:0,rightAlignYAxis:!1,useInteractiveGuideline:!0,xAxis:{showMaxMin:!1,tickFormat:function(e){return d3.time.format("%X")(new Date(e))}},yAxis:{showMaxMin:!1,tickFormat:function(e){return e}},legend:{maxKeyLength:100},color:r.COLORS},title:{enable:!0,className:"chart-additional-info",html:" "}}}static getMaxValueFromDataHolder(e){return Math.max(...e.filter(e=>!e.disabled).flatMap(e=>r.getMaxValueForDataSeries(e)))}static getMaxValueForDataSeries(e){return Math.max(...e.values.map(e=>e[1]))}static calculateMaxChartValueAndDivisions(e,t){let n;n=Array.isArray(e)?r.getMaxValueFromDataHolder(e):r.getMaxValueForDataSeries(e);const i=Math.round(n*(t||r.DEFAULT_MULTIPLIER))||1;return[i,Math.ceil(i/r.MAXIMUM_DIVISIONS)]}static getIntegerRangeForValues(e,t){const[n,i]=r.calculateMaxChartValueAndDivisions(e,t);return d3.range(0,n+1,i)}static formatBytesValue(e,t){let n=e;t&&(n=Math.max(...t.filter(e=>!e.disabled).flatMap(e=>e.values).flatMap(e=>e[1])));const r=Math.floor(Math.log(n)/Math.log(1024));return`${(parseFloat(e)/Math.pow(1024,r)).toFixed(2)} ${["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][r]}`}formatNumber(e){if(e&&this.filter)return this.filter("currency")(e,"",0)}}},45:function(e,t,n){"use strict";n.r(t),n.d(t,"RenderingMode",(function(){return r}));const r={YASGUI:"mode-yasgui",YASQE:"mode-yasqe",YASR:"mode-yasr"}},46:function(e,t){angular.module("graphdb.framework.rest.connectors.service",[]).factory("ConnectorsRestService",n),n.$inject=["$http"];function n(e){return{getConnectors:function(){return e.get("rest/connectors")},initConnector:function(t){return e.get("rest/connectors/options?prefix="+t)},hasConnector:function(t){return e.get("rest/connectors/existing?prefix="+t)},checkConnector:function(t){return e.post("rest/connectors/check",t,{headers:{"Content-Type":"text/plain"}})}}}},47:function(e,t){function n(e,t){return{showToastMessageWithDelay:function(n){return new Promise(r=>{e.success(t.instant(n)),setTimeout(r,200)})}}}angular.module("graphdb.framework.utils.notifications",[]).factory("Notifications",n),n.$inject=["toastr","$translate"]},48:function(e,t,n){"use strict";n.r(t),n.d(t,"YasqeMode",(function(){return r}));const r={WRITE:"WRITE",READ:"READ",PROTECTED:"PROTECTED"}},49:function(e,t,n){"use strict";n.r(t),n.d(t,"HeapMemoryChart",(function(){return i}));var r=n(43);class i extends r.ChartData{constructor(e){super(e,!1,!1)}createDataHolder(){return[{key:this.translateService.instant("resource.memory.committed"),values:[]},{key:this.translateService.instant("resource.memory.used"),area:"true",values:[]}]}addNewData(e,t,n){const[r,i]=e,o=this.parseData(n);r.values.push([t,o.committed]),i.values.push([t,o.used]),this.setMaxHeapSize(o.max)}parseData(e){return e.heapMemoryUsage}setMaxHeapSize(e){if(e>0){const t=[{label:this.translateService.instant("resource.memory.heap.max"),value:i.formatBytesValue(e)}];this.setSubTitle(t)}}updateRange(e){this.setScale(e),super.updateRange(e)}setScale(e){this.chartOptions.chart.yAxis.tickFormat=t=>i.formatBytesValue(t,e)}}},52:function(e,t,n){"use strict";n.r(t);n(14),n(46);function r(e){const t=[];return Object.keys(e).forEach((function(n){t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]))})),t.join("&")}function i(e,t){return _.reduce(e,(function(e,n){if(""===n.key&&""===n.value);else{if(""===n.key)throw new Error(t.instant("externalsync.empty.value.key.error",{value:n.value}));if(e.hasOwnProperty(n.key))throw new Error(t.instant("externalsync.duplicate.key.error",{key:n.key}));e[n.key]=n.value}return e}),{})}function o(e,t){for(let r=0;r<t.length;r++){const i=t[r];if("StringArray"===i.__type)e[i.__name]||(e[i.__name]=[""]);else if("OptionArray"===i.__type)if(e[i.__name])for(let t=0;t<i.__childOptions.length;t++){const n=i.__childOptions[t];if("Boolean"===n.__type)for(let t=0;t<e[i.__name].length;t++){const r=e[i.__name][t];!r.hasOwnProperty([n.__name])&&angular.isDefined(n.__defaultValue)&&(r[n.__name]=n.__defaultValue)}}else{e[i.__name]=[];const t={};for(let e=0;e<i.__childOptions.length;e++){const n=i.__childOptions[e];"StringArray"===n.__type?t[n.__name]=[""]:t[n.__name]=angular.isUndefined(n.__defaultValue)?"":n.__defaultValue}e[i.__name].push(t)}else"Map"===i.__type?e[i.__name]?e[i.__name]=(n=e[i.__name],_.map(n,(function(e,t){return{key:t,value:e}}))):e[i.__name]=[]:"JsonString"===i.__type?!e[i.__name]||e[i.__name]instanceof String||"string"==typeof e[i.__name]||(e[i.__name]=angular.toJson(e[i.__name],2)):angular.isUndefined(e[i.__name])&&(e[i.__name]=angular.isUndefined(i.__defaultValue)?"":i.__defaultValue)}var n;return e}function a(e,t,n){return e.post("repositories/"+t,r({query:n}),{headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/sparql-results+json","X-GraphDB-Local-Consistency":"updating"}})}function s(e){return e.substring(0,e.length-1)+"/instance#"}function l(e,t,n,r,o){const a=function e(t,n){const r={};return _.each(n,(function(n){angular.isDefined(t[n.__name])&&("OptionArray"===n.__type?(r[n.__name]=[],_.each(t[n.__name],(function(t){r[n.__name].push(e(t,n.__childOptions))}))):r[n.__name]=angular.copy(t[n.__name]))})),r}(n,r);for(let e=0;e<r.length;e++)try{"Map"===r[e].__type?a[r[e].__name]=i(a[r[e].__name],$translate):"JsonString"===r[e].__type&&(a[r[e].__name]=angular.fromJson(a[r[e].__name]))}catch(t){return o(r[e].__label,t.message),null}!function e(t){Array.isArray(t)&&(t=_.filter(t,(function(e){return null!==e&&(!e.trim||""!==e.trim())})));return Object.keys(t).forEach((function(n){""!==t[n]&&null!=t[n]||!1===t[n]?"object"==typeof t[n]&&(t[n]=e(t[n])):delete t[n]})),t}(a);let l="";l+="PREFIX :<"+t+">\n";return l+="PREFIX inst:<"+s(t)+">\n",l+="INSERT DATA {\n",l+="\tinst:"+e+" :createConnector '''\n",l+=angular.toJson(a,2),l+="\n''' .\n}\n",l=l.replace(/\\/g,"\\\\\\"),l}function u(e,t,n,i,u,c,d,p,f,h){function g(t){e.beingBuiltConnector={percentDone:0,status:{processedEntities:0,estimatedEntities:0,indexedEntities:0,entitiesPerSecond:0},actionName:t?h.instant("externalsync.repairing"):h.instant("externalsync.creating"),waitOnRepairStartOnce:!!t,eta:"-",inline:!1,iri:null}}function m(t,n,r){return g(r),$.extend(e.beingBuiltConnector,{iri:s(t)+n,name:n,inline:!1,doneCallback:function(){e.beingBuiltConnector.modalInstance.dismiss("cancel")}}),e.beingBuiltConnector.modalInstance=i.open({templateUrl:"pages/connectorProgress.html",controller:"CreateProgressCtrl",size:"lg",backdrop:"static",scope:e}),e.beingBuiltConnector.modalInstance}function v(t,i,o){const a=m(t.value,i.name,!1);p.addStatements(n.getActiveRepository(),r({update:i.query})).then((function(){f.getConnectors().then((function(){f.hasConnector(encodeURIComponent(t.value)).then((function(n){e.existing[t.key]=n.data}))})),u.success(h.instant("created.connector",{name:i.name}))}),(function(e){u.error(getError(e)),o()})).finally((function(){a.dismiss("cancel")}))}e.loader=!1,e.controllers=[],e.existing={},e.definitions={},e.getLoaderMessage=function(){const t=(Date.now()-e.loaderStartTime)/1e3,n=e.getHumanReadableSeconds(t);let r="";return r=e.progressMessage?e.progressMessage+"... "+n:h.instant("common.running.operation",{timeHuman:n}),e.extraMessage&&t>10&&(r+="\n"+e.extraMessage),r},e.setLoader=function(t,n,r){t?(e.loader=!0,e.loaderStartTime=Date.now(),e.progressMessage=n,e.extraMessage=r):(e.loader=!1,e.progressMessage="",e.extraMessage="")},e.initConnector=function(t){return f.initConnector(encodeURIComponent(t.value)).then((function(n){return e.definitions[t.key]=n.data,f.hasConnector(encodeURIComponent(t.value)).then((function(n){e.existing[t.key]=n.data}))}))},e.getConnectors=function(){e.isLicenseValid()&&e.canWriteActiveRepo()&&(e.setLoader(!0,h.instant("externalsync.fetching.connectors"),h.instant("common.extra.message")),f.getConnectors().then((function(r){e.connectors=Object.keys(r.data).map((function(e){return{key:e,value:r.data[e]}})),d.all(_.map(e.connectors,(function(t){return e.initConnector(t)}))).finally((function(){g();const r=function(e){const t=_.map(e,(function(e){return"<"+e.value+"connectorStatus>"})).join("|");return t?"SELECT ?connector ?status { ?connector "+t+" ?status }":null}(e.connectors);r?function(e){return a(t,n.getActiveRepository(),e)}(r).then((function(t){const n=function(e){if(e.bindings)for(let t=0;t<e.bindings.length;t++)try{const n=JSON.parse(e.bindings[t].status.value);if("BUILDING"===n.status)return{connector:e.bindings[t].connector.value,status:n}}catch(e){console.error(e)}return{}}(t.data.results);if(n.connector){const t=n.connector.split(/#/);t[0]=t[0].replace(/\/instance$/,"#"),r=t[0],i=t[1],g(),$.extend(e.beingBuiltConnector,{iri:s(r)+i,name:i,inline:!0,doneCallback:function(){e.beingBuiltConnector.inline=!1}})}var r,i})).finally((function(){e.setLoader(!1)})):e.setLoader(!1)}))})).catch((function(t){e.setLoader(!1),u.error(getError(t),h.instant("externalsync.could.not.get.connectors.error"))})),e.existing={})},e.getOptions=function(t){return e.definitions[t.key]},e.isEmpty=function(e){return angular.isObject(e)&&0===Object.keys(e).length},e.toPrettyJson=function(e){return angular.toJson(e,2)},e.$watch((function(){return n.getActiveRepository()}),e.getConnectors),e.$watch((function(){return n.getActiveLocation()}),e.getConnectors),e.copyConnector=function(t,n){let r;angular.isUndefined(n)||(r=angular.copy(n),r.name=r.name+"-copy");i.open({templateUrl:"pages/createConnector.html",controller:"CreateConnectorCtrl",size:"lg",backdrop:"static",resolve:{connector:function(){return t},values:function(){return angular.isUndefined(r)?{name:"",values:{}}:r},options:function(){return e.getOptions(t)}}}).result.then((function(n){v(t,n,(function(){n.skipConversion=!0,e.newConnector(t,n)}))}))},e.newConnector=function(t,n){i.open({templateUrl:"pages/createConnector.html",controller:"CreateConnectorCtrl",size:"lg",backdrop:"static",resolve:{connector:function(){return t},values:function(){return angular.isUndefined(n)?{name:"",values:{}}:n},options:function(){return e.getOptions(t)}}}).result.then((function(n){v(t,n,(function(){n.skipConversion=!0,e.newConnector(t,n)}))}))},e.repair=function(t,i){c.openSimpleModal({title:h.instant("externalsync.confirm.repair"),message:h.instant("externalsync.repair.warning.msg"),warning:!0}).result.then((function(){const o=m(i.value,t.name,!0),a=(l=t.name,"PREFIX prefix:<"+(c=i.value)+">\nINSERT DATA {\n\t<"+s(c)+l+'> prefix:repairConnector ""\n}');var l,c;p.addStatements(n.getActiveRepository(),r({update:a})).then((function(){f.getConnectors().then((function(){f.hasConnector(encodeURIComponent(i.value)).then((function(t){e.existing[i.key]=t.data}))})),u.success(h.instant("externalsync.repair.success.msg",{name:t.name}))}),(function(e){u.error(getError(e))})).finally((function(){o.dismiss("cancel")}))}))},e.delete=function(t,o){const a=o.key.indexOf("Elastic")>=0||o.key.indexOf("Solr")>=0;i.open({templateUrl:"js/angular/externalsync/templates/deleteConnector.html",controller:"DeleteConnectorCtrl",resolve:{popoverMsg:function(){return a?h.instant("delete.connector.conditional",{type:o.key}):""}}}).result.then((function(i){e.setLoader(!0,h.instant("externalsync.delete.progress.msg",{name:t.name}),h.instant("externalsync.extra.message.warning"));const s=function(e,t,n){const r=t.substring(0,t.length-1)+"/instance#";return"PREFIX prefix:<"+t+">\nINSERT DATA {\n\t<"+r+e+'> prefix:dropConnector "'+(n?"force":"")+'"\n}'}(t.name,o.value,i);p.addStatements(n.getActiveRepository(),r({update:s})).then((function(){f.getConnectors().then((function(){f.hasConnector(encodeURIComponent(o.value)).then((function(t){e.existing[o.key]=t.data}))})),i?(u.success(h.instant("externalsync.delete.force.success.msg",{name:t.name})),a&&u.warning(h.instant("externalsync.delete.remote.warning",{key:o.key}))):u.success(h.instant("externalsync.delete.success.msg",{name:t.name}))}),(function(e){u.error(getError(e))})).finally((function(){e.setLoader(!1)}))}))},e.viewQuery=function(t,n){i.open({templateUrl:"pages/viewQuery.html",controller:"ViewQueryCtrl",resolve:{query:function(){const r=e.getOptions(t);return l(n.name,t.value,o(n.values,r),r)}}})}}function c(e,t,n){e.force=!1,e.popoverMsg=n,e.ok=function(){t.close(e.force)},e.cancel=function(){t.dismiss()}}function d(e,t,n,r,i){function o(){return l(e.name,n.value,e.values,e.options,(function(e,t){i.error(t,e)}))}e.connector=n,e.addField=function(t,n){const r=angular.copy(e.defaultValues[n][0]);e.values[n].splice(t+1,0,r)},e.addOption=function(e,t){t.splice(e+1,0,"")},e.deleteOption=function(e,t){t.splice(e,1)},e.addMapOption=function(e,t){t.splice(e+1,0,{key:"",value:""})},e.deleteMapOption=function(e,t){t.splice(e,1)},e.ok=function(){if(e.form.$valid){const n=o();n&&t.close({name:e.name,values:e.values,options:e.options,query:n})}},e.viewQuery=function(){const e=o();e&&r.open({templateUrl:"pages/viewQuery.html",controller:"ViewQueryCtrl",resolve:{query:function(){return e}}})},e.cancel=function(){t.dismiss("cancel")}}function p(e,t,n,r,i,a,s,l){angular.extend(this,t("ExtendNewConnectorCtrl",{$scope:e,$uibModalInstance:r,connector:i,$uibModal:a})),e.values=s.values,e.options=l,e.name=s.name,s.skipConversion||(e.values=o(e.values,e.options)),e.defaultValues=angular.copy(e.values)}function f(e,t,n,r,i){function o(){const o=function(e){const t=e.replace(/\/instance#.+$/,"#connectorStatus");let n="";return n+="SELECT ?status {\n",n+="\t<"+e+"> <"+t+"> ?status",n+="\n}",n}(e.beingBuiltConnector.iri);e.beingBuiltConnector.iri=null,e.progressInterval=t((function(){(function(e){return a(n,r.getActiveRepository(),e)})(o).then((function(n){const r=function(e){if(e.bindings&&e.bindings.length>0)try{return JSON.parse(e.bindings[0].status.value)}catch(e){console.error(e)}return{}}(n.data.results);"BUILDING"===r.status?(e.beingBuiltConnector.status=r,e.beingBuiltConnector.percentDone=(100*r.processedEntities/r.estimatedEntities).toFixed(0),e.beingBuiltConnector.eta=e.getHumanReadableSeconds(r.etaSeconds),e.beingBuiltConnector.actionName=r.repair?i.instant("externalsync.repairing"):i.instant("externalsync.creating"),e.beingBuiltConnector.waitOnRepairStartOnce=!1):"BUILT"!==r.status||e.beingBuiltConnector.waitOnRepairStartOnce||(t.cancel(e.progressInterval),e.beingBuiltConnector.doneCallback&&e.beingBuiltConnector.doneCallback())}))}),1e3),e.$on("$destroy",(function(){t.cancel(e.progressInterval)}))}e.beingBuiltConnector=e.beingBuiltConnector||{},!e.beingBuiltConnector.inline&&e.beingBuiltConnector.iri&&o(),e.$watch("beingBuiltConnector.iri",(function(t){e.beingBuiltConnector.inline&&t&&o()}))}angular.module("graphdb.framework.externalsync.controllers",["graphdb.framework.rest.rdf4j.repositories.service","graphdb.framework.rest.connectors.service"]).controller("ConnectorsCtrl",u).controller("ExtendNewConnectorCtrl",d).controller("CreateConnectorCtrl",p).controller("CreateProgressCtrl",f).controller("DeleteConnectorCtrl",c).filter("ceil",(function(){return function(e){return Math.ceil(e)}})),u.$inject=["$scope","$http","$repositories","$uibModal","toastr","ModalService","$q","RDF4JRepositoriesRestService","ConnectorsRestService","$translate"],c.$inject=["$scope","$uibModalInstance","popoverMsg"],d.$inject=["$scope","$uibModalInstance","connector","$uibModal","toastr"],p.$inject=["$scope","$controller","$http","$uibModalInstance","connector","$uibModal","values","options"],f.$inject=["$scope","$interval","$http","$repositories","$translate"]},56:function(e,t){angular.module("graphdb.framework.rest.cluster.service",[]).factory("ClusterRestService",n),n.$inject=["$http"];function n(e){return{getClusterConfig:function(){return e.get("rest/cluster/config")},createCluster:function(t){return e.post("rest/cluster/config",t)},updateCluster:function(t){t.nodes&&delete t.nodes;return e.patch("rest/cluster/config",t)},deleteCluster:function(t){const n=$.param({force:t});return e.delete("rest/cluster/config?"+n)},addNodesToCluster:function(t){return e.post("rest/cluster/config/node",{nodes:t})},removeNodesFromCluster:function(t){return e.delete("rest/cluster/config/node",{data:{nodes:t},headers:{"Content-Type":"application/json"}})},getClusterStatus:function(){return e.get("rest/cluster/group/status")},getNodeStatus:function(){return e.get("rest/cluster/node/status")}}}},62:function(e,t,n){"use strict";n.r(t);n(5),n(16);var r=n(0);function i(e,t,n,i,o,a,s,l,u,c,d,p,f,h,g){const m={id:"1",name:"",query:"select * where { \n\t?s ?p ?o .\n} limit 100 \n",inference:!0,sameAs:!0};let v,y;function x(t){!function(){if(i.isActiveRepoOntopType())return;const t=document.getElementById("sameAs");!t||e.currentQuery.inference||t.disabled?e.currentQuery.inference&&t.disabled&&(t.removeAttribute("disabled"),e.currentQuery.sameAs=v.appSettings.DEFAULT_SAMEAS):(t.disabled=!0,e.currentQuery.sameAs=!1)}(),e.tabs.forEach((function(n,r){n.id===t.id&&(e.tabs[r].query=t.query,i.isActiveRepoOntopType()||(e.tabs[r].inference=t.inference,e.tabs[r].sameAs=t.sameAs))})),f.set(h.TABS_STATE,e.tabs)}function b(t,n,r,i){const o=angular.element(document.getElementById("yasr-inner"));e.queryIsRunning=t,t?(e.queryStartTime=Date.now(),e.countTimeouted=!1,e.progressMessage=n,e.extraMessage=r,e.noLoaderTimer=i,o.addClass("hide")):(e.progressMessage="",e.extraMessage="",e.noLoaderTimer=!1,e.currentTrackAlias=null,e.abortRequested=!1,o.removeClass("hide")),null===e.$$phase&&e.$apply()}function E(n){function r(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0}if(e.orientationViewMode){if("yasr"===e.viewMode){let e=r()-document.querySelector(".CodeMirror-wrap").getBoundingClientRect().top;e-=40,document.querySelector(".CodeMirror-wrap").style.height=e+"px"}else e.noPadding={},document.querySelector(".CodeMirror-wrap").style.height="";document.getElementById("yasr").style.minHeight=""}else if(e.noPadding={paddingRight:15,paddingLeft:0},window.editor&&document.querySelector(".CodeMirror-wrap")){let e=r()-document.querySelector(".CodeMirror-wrap").getBoundingClientRect().top;e-=40,document.querySelector(".CodeMirror-wrap").style.height=e+"px",document.getElementById("yasr").style.minHeight=e+"px"}else{let r;r=t(n?function(){e.fixSizesOnHorizontalViewModeSwitch(n)}:e.fixSizesOnHorizontalViewModeSwitch,100),e.$on("$destroy",(function(){t.cancel(r)}))}window.yasr&&window.yasr.container&&t((function(){window.yasr.container.resize()}),100)}function C(){E(!0)}function T(t,n){n.newRepo&&(e.tabsData=f.get(h.TABS_STATE),e.tabsData.forEach((function(e){e.yasrData=void 0,e.queryType=void 0,e.resultsCount=0,e.allResultsCount=0,e.sizeDelta=void 0})),f.set(h.TABS_STATE,e.tabsData),e.tabs=e.tabsData,e.currentQuery={},e.errorMessage=null,e.repositoryError=null)}function S(e){t((function(){$('a[data-id = "'+e+'"]').tab("show")}),0)}function w(r,o){if(e.executedQueryTab=e.currentQuery,o){if("SELECT"!==window.editor.getQueryType()&&"CONSTRUCT"!==window.editor.getQueryType()&&"DESCRIBE"!==window.editor.getQueryType())return void n.warning(g.instant("query.editor.warning.msg"));if(i.isActiveRepoOntopType())return void n.warning(g.instant("query.editor.virtual.repo.warning.msg"))}if(e.explainRequested=o,!e.queryIsRunning){if(r?e.currentTabConfig.resultsCount=0:e.resetCurrentTabConfig(),e.lastRunQueryMode=window.editor.getQueryMode(),"update"===e.lastRunQueryMode&&i.isActiveRepoOntopType())return void n.warning(g.instant("query.editor.virtual.repo.update.warning.msg"));if(b(!0,"update"===e.lastRunQueryMode?g.instant("query.editor.executing.update"):g.instant("query.editor.evaluating.query")),"none"!==e.viewMode){e.viewMode="none",e.orientationViewMode&&e.fixSizesOnHorizontalViewModeSwitch();const n=t(window.editor.query,500);e.$on("$destroy",(function(){t.cancel(n)}))}else window.editor.query()}}function N(){e.showSampleQueries=!e.showSampleQueries,e.showSampleQueries?s.getSavedQueries().success((function(t){e.sampleQueries=t,$("#sampleQueriesCollapse").collapse("show").width("300px")})).error((function(e){const t=getError(e);n.error(t,g.instant("query.editor.get.saved.queries.error"))})):$("#sampleQueriesCollapse").collapse("hide")}function L(t){let n=void 0;return e.tabsData.forEach((function(e){if(e.name===t.name&&e.query===t.body)return n=e.id,e})),n}function A(t){return function(n,r,i){e.savedQuery={name:n,query:r||window.editor.getValue(),shared:i},$(t).modal("show")}}function I(t){for(let n=0;n<e.tabsData.length;n++){if(e.tabsData[n].id===t)return n}}e.getPrincipal=function(){return c.getPrincipal().then(t=>{v=t,function(e,t){m.inference=t.appSettings.DEFAULT_INFERENCE,m.sameAs=t.appSettings.DEFAULT_SAMEAS,e.skipCountQuery=!t.appSettings.EXECUTE_COUNT,e.ignoreSharedQueries=t.appSettings.IGNORE_SHARED_QUERIES,e.tabsData=e.tabs=f.get(h.TABS_STATE)||[m],e.$watchCollection("[currentQuery.inference, currentQuery.sameAs]",(function(e,t,n){x(n.currentQuery)})),e.$on("repositoryIsSet",T)}(e,v)})},e.getPrincipal(),this.hint=document.createElement("span"),this.hint.innerHTML=g.instant("query.editor.autocomplete.hint"),this.hint.style.fontSize="12px",this.hint.style.color="gray",this.hint.style.backgroundColor="white",this.hint.style.position="absolute",this.hint.style.zIndex="3",this.hint.style.paddingLeft="12px",e.$watch((function(){return angular.element(".CodeMirror-hints").length}),e=>{if(e){const e=angular.element(".CodeMirror-hints")[0].getBoundingClientRect();document.body.appendChild(this.hint),this.hint.style.top=e.top-20+"px",this.hint.style.left=e.right-this.hint.offsetWidth-12+"px"}else this.hint&&this.hint.parentNode&&this.hint.parentNode.removeChild(this.hint)}),e.resetCurrentTabConfig=function(){e.currentTabConfig={pageSize:1e3,page:1,allResultsCount:0,resultsCount:0}},e.queryExists=!1,e.resetCurrentTabConfig(),e.saveTab=function(t){const n=I(t);if(void 0===n)return{};const r=e.tabsData[n];return e.saveQueryToLocal(r),r},e.loadTab=function(n){e.tabsData=f.get(h.TABS_STATE)||[m];const r=I(n),o=e.tabsData[r];o.yasrData&&b(!0,g.instant("query.editor.render.results.msg"),null,!0);t((function(){""===e.currentQuery.query&&(e.currentQuery.query=" "),t((function(){window.editor.setValue(e.currentQuery.query),e.yasr.updateDownloadDropdown(),e.$broadcast("tabLoaded",e.currentQuery.id),e.yasr.options.output=o.outputType,o.yasrData&&(o.yasrData.customError?(e.yasr.results={getException:function(){return o.yasrData.customError}},b(!1)):t((function(){e.setYasrResponse(o.yasrData,o.textStatus,o.jqXhrOrErrorString),b(!1),$(".yasr_btnGroup li:nth-child(2)").hasClass("active")&&t((function(){$(".yasr_btnGroup li:nth-child(2) a").get(0).click()}),0)}),0))}),0)}),0),f.set(h.TABS_STATE_CURRENT_ID,n),e.currentQuery=o,t((function(){e.currentTabConfig={},e.currentTabConfig.queryType=o.queryType,e.currentTabConfig.resultsCount=o.resultsCount,e.currentTabConfig.offset=o.offset,e.currentTabConfig.allResultsCount=o.allResultsCount,e.currentTabConfig.allResultsCountExact=o.allResultsCountExact,e.currentTabConfig.page=o.page,e.currentTabConfig.pageSize=o.pageSize,e.currentTabConfig.timeFinished=o.timeFinished,e.currentTabConfig.timeTook=o.timeTook,e.currentTabConfig.sizeDelta=o.sizeDelta,e.currentTabConfig.customUpdateMessage=o.customUpdateMessage,e.currentTabConfig.errorMessage=o.errorMessage,e.currentTabConfig.warningMessage=o.warningMessage,e.$apply()}),0),$("#yasr").css("padding","0"),y||(y=setInterval(_,200));!function(){const t=i.isActiveRepoOntopType(),n=i.isActiveRepoFedXType();(function(e){const t=document.getElementById("sameAs"),n=document.getElementById("inference");t&&(t.disabled=!!e);n&&(n.disabled=!!e)})(t),e.nocount=!(!t&&!n)||!v.appSettings.EXECUTE_COUNT,t&&(e.currentQuery.inference=!0,e.currentQuery.sameAs=!0)}()},e.addNewTab=function(n,r,i){if(!O(!0))return;let o;o=r||i?{id:"1",name:r,query:i,inference:v.appSettings.DEFAULT_INFERENCE,sameAs:v.appSettings.DEFAULT_SAMEAS}:{id:"1",name:"",query:"select * where { \n\t?s ?p ?o .\n} limit 100 \n",inference:v.appSettings.DEFAULT_INFERENCE,sameAs:v.appSettings.DEFAULT_SAMEAS};R++;const a=""+R;e.tabsData=e.tabs;const s=o;s.id=a,e.tabsData.push(s),f.set(h.TABS_STATE_MAXID,R),f.set(h.TABS_STATE,e.tabsData);const l=Array.prototype.slice.call(arguments,1);t((function(){e.$apply(),S(a),n&&n.apply(this,l)}),0),e.tabs=e.tabsData},e.isTabChangeOk=O,e.runQuery=w,e.abortCurrentQuery=function(){p.deleteQuery(e.currentTrackAlias,i.getActiveRepository()).success((function(){e.abortRequested=!0}))},e.editQuery=function(t){o.open({templateUrl:"js/angular/core/directives/queryeditor/templates/query-sample.html",controller:"QuerySampleModalCtrl",resolve:{data:function(){return{title:g.instant("query.editor.edit.saved.query",{name:t.name}),query:t,edit:!0,okButtonText:g.instant("common.save.btn")}}}}).result.then((function(r){const i={name:r.name,body:r.body,shared:r.shared};t.name!==r.name?s.addNewSavedQuery(i).success((function(){e.deleteQueryHttp(t.name,!0)})).error((function(e){const t=getError(e);n.error(t,g.instant("query.editor.edit.saved.query.error"))})):s.editSavedQuery(i).success((function(){$("#editQueryContainer").modal("hide"),e.toggleSampleQueries(),n.success(g.instant("query.editor.edit.saved.query.success.msg",{name:t.name}))})).error((function(e){const t=getError(e);n.error(t,g.instant("query.editor.edit.saved.query.error"))}))}))},e.getNamespaces=function(){b(!0,g.instant("common.refreshing.namespaces"),g.instant("common.extra.message")),e.namespacesLoading=!0,d.getRepositoryNamespaces(i.getActiveRepository()).success((function(t){const n={};t.results.bindings.forEach((function(e){n[e.prefix.value]=e.namespace.value})),e.namespaces=n})).error((function(t){e.repositoryError=getError(t)})).finally((function(){b(!1),e.namespacesLoading=!1}))},e.changePagination=function(){w(!0,e.explainRequested)},e.toggleSampleQueries=N,e.addKnownPrefixes=function(){s.addKnownPrefixes(JSON.stringify(window.editor.getValue())).success((function(e){angular.isDefined(window.editor)&&angular.isDefined(e)&&e!==window.editor.getValue()&&window.editor.setValue(e)})).error((function(e){const t=getError(e);return n.error(t,g.instant("common.add.known.prefixes.error")),!0}))},e.getExistingTabId=L,e.querySelected=function(t){const n=L(t);e.toggleSampleQueries(),e.isTabChangeOk(!1)&&(e.highlightNextTabChange=!0,angular.isDefined(n)?S(n):e.addNewTab(null,t.name,t.body))},e.deleteQuery=function(t){a.openSimpleModal({title:g.instant("common.confirm"),message:g.instant("query.editor.delete.saved.query.warning.msg",{savedQueryName:t}),warning:!0}).result.then((function(){e.deleteQueryHttp(t)}))},e.deleteQueryHttp=function(t,r){s.deleteSavedQuery(t).success((function(){e.toggleSampleQueries(),r||n.success(g.instant("query.editor.delete.saved.query.success.msg",{savedQueryName:t}))})).error((function(e){const t=getError(e);n.error(t,g.instant("query.editor.delete.saved.query.error"))}))},e.saveQuery=function(t,n){o.open({templateUrl:"js/angular/core/directives/queryeditor/templates/query-sample.html",controller:"QuerySampleModalCtrl",resolve:{data:function(){return{title:g.instant("query.editor.create.saved.query.msg"),query:{name:t.name,body:t.query,shared:t.shared},edit:!1,okButtonText:g.instant("common.create.btn"),queryExists:n,existingQueryErrMsg:Object(r.decodeHTML)(g.instant("query.sample.existing.query.warning",{name:t.name}))}}}}).result.then((function(t){e.saveQueryHttp(t)}),(function(){}))},e.saveQueryHttp=function(t){s.addNewSavedQuery(t).success((function(){n.success(g.instant("query.editor.save.saved.query.success.msg",{name:t.name}))})).error((function(r,i){const o=getError(r);n.error(o,g.instant("query.editor.create.saved.query.error"));let a=!1;409===i&&(a=!0),t.query=t.body,e.saveQuery(t,a)}))},e.saveQueryToLocal=x,e.setLoader=b,e.getLoaderMessage=function(){const t=(Date.now()-e.queryStartTime)/1e3;let n="",r="";e.noLoaderTimer||(n=e.getHumanReadableSeconds(t));r=e.progressMessage?g.instant("query.editor.progress.msg",{progressMessage:e.progressMessage,timeHuman:n}):g.instant("common.running.operation",{timeHuman:n});e.extraMessage&&t>10&&(r+=g.instant("query.editor.extra.msg",{extraMessage:e.extraMessage}));return r},e.fixSizesOnHorizontalViewModeSwitch=E,e.changeViewMode=function(){e.viewMode="none",e.orientationViewMode=!e.orientationViewMode,f.set(h.VIEW_MODE,e.orientationViewMode),E()},e.showHideEditor=C,e.focusQueryEditor=function(){angular.element(document).find(".editable-input").is(":focus")||angular.element(document).find(".CodeMirror textarea:first-child").focus()},e.orientationViewMode=!f.get(h.VIEW_MODE)||"true"===f.get(h.VIEW_MODE),e.viewMode="none",e.getActiveRepository=function(){return i.getActiveRepository()},e.getActiveRepositoryNoError=function(){if(!e.repositoryError)return i.getActiveRepository()},e.orientationViewMode||C(),window.onbeforeunload=function(){e.currentQuery&&e.saveTab(e.currentQuery.id),f.set(h.TABS_STATE,e.tabs)},e.$on("$destroy",(function(){e.currentQuery&&e.saveTab(e.currentQuery.id),f.set(h.TABS_STATE,e.tabs),clearInterval(y)})),e.$on("$destroy",(function(){clearInterval(y),window.editor=null,window.yasr=null})),$(document).mouseup((function(t){const n=$("#sampleQueriesCollapse");!n.is(t.target)&&0===n.has(t.target).length&&e.showSampleQueries&&N()}));let R=f.get(h.TABS_STATE_MAXID)||1;function k(e){return $(e).attr("data-id")}function _(){if(e.currentTabConfig.resultsCount>=0){const e=$(".saveAsDropDown");e.length>0&&!window.editor.queryValid?yasr.header.find(".saveAsDropDown").remove():0===e.length&&window.editor.queryValid&&yasr.updateDownloadDropdown()}}function O(t){return!(e.queryIsRunning&&!e.namespacesLoading)||(t?n.info(g.instant("query.editor.new.tab.running.query.warning.msg")):n.info(g.instant("query.editor.tab.switching.running.query.warning.msg")),!1)}e.highlightNextTabChange=!1,e.$on("tabAction",(function(n,r){r.relatedTarget&&(t.cancel(r.relatedTarget.timer),$(r.relatedTarget).css("color",""),e.saveTab(k(r.relatedTarget))),e.loadTab(k(r.target));const i=["var(--primary-color)","","var(--primary-color)"],o=[400,400,400];if(e.highlightNextTabChange){e.highlightNextTabChange=!1;let n=0;$(r.target).css("color",i[n]);const a=function(){n++,n<i.length?($(r.target).css("color",i[n]),r.target.timer=t(a,o[n])):$(r.target).css("color","")};t(a,o[n])}})),e.$on("deleteAllexeptSelected",(function(t,n){e.tabsData=n,e.tabs=n})),e.currentQuery={},e.showSampleQueries=!1,e.savedQuery={},e.sampleQueries={},e.editQueryModal=A("#editQueryContainer"),e.deleteQueryModal=A("#confirmDeleteContainer"),e.saveQueryModal=A("#saveQueryContainer"),e.getResultsDescription=function(){let t;if(0===e.currentTabConfig.resultsCount)t="No results.";else{const n=(e.currentTabConfig.page-1)*e.currentTabConfig.pageSize+Math.min(e.currentTabConfig.resultsCount,e.currentTabConfig.pageSize);t=g.instant("query.editor.showing.results.from.msg")+l("currency")(e.currentTabConfig.offset,"",0)+g.instant("query.editor.to")+l("currency")(n,"",0),e.currentTabConfig.allResultsCount>0&&(t+=g.instant(e.currentTabConfig.allResultsCountExact?"query.editor.of":"query.editor.of.at.least"),t+=l("currency")(e.currentTabConfig.allResultsCount,"",0)),t+="."}return t},e.getUpdateDescription=function(){return e.currentTabConfig.customUpdateMessage?g.instant(e.currentTabConfig.customUpdateMessage.msg,{name:e.currentTabConfig.customUpdateMessage.name}):void 0===e.currentTabConfig.sizeDelta?"":e.currentTabConfig.sizeDelta<0?g.instant("yasr.removed.statements.result.msg",{sizeDelta:Math.abs(e.currentTabConfig.sizeDelta)}):e.currentTabConfig.sizeDelta>0?g.instant("yasr.added.statements.result.msg",{sizeDelta:e.currentTabConfig.sizeDelta}):g.instant("yasr.statements.no.change.msg")},e.getStaleWarningMessage=function(){const t=60*Math.round((Date.now()-e.currentTabConfig.timeFinished)/6e4);if(t>=3600)return g.instant("yasr.stale.result.msg",{secondsAgo:e.getHumanReadableSeconds(t)})};const D=function(){};angular.element(u).bind("resize",D),e.$on("$destroy",(function(){angular.element(u).unbind("resize",D)}))}function o(e,t,n,r){n.queryExists&&(e.queryExists=!0),e.query=angular.copy(n.query),e.title=n.title,e.edit=n.edit,e.okButtonText=n.okButtonText,e.existingQueryErrMsg=r.trustAsHtml(n.existingQueryErrMsg),e.ok=function(){e.form.$valid&&t.close(e.query)},e.cancel=function(){t.dismiss("cancel")}}angular.module("graphdb.framework.core.directives.queryeditor.controllers",["graphdb.framework.utils.localstorageadapter","graphdb.framework.rest.sparql.service"]).controller("QueryEditorCtrl",i).controller("QuerySampleModalCtrl",o),i.$inject=["$scope","$timeout","toastr","$repositories","$uibModal","ModalService","SparqlRestService","$filter","$window","$jwtAuth","RDF4JRepositoriesRestService","MonitoringRestService","LocalStorageAdapter","LSKeys","$translate"],o.$inject=["$scope","$uibModalInstance","data","$sce"]},63:function(e,t,n){"use strict";n.r(t),n.d(t,"YasrUtils",(function(){return r}));const r=function(){const e=function(){return{enableColumnResizingOnWindowWidth:768}};return{getYasrConfiguration:function(t){const n={table:e()};return angular.extend({},n,t)},getDefaultTablePluginConfiguration:e}}()},64:function(e,t,n){"use strict";n.r(t),n.d(t,"MAX_VISIBLE_ERROR_CHARACTERS",(function(){return r})),n.d(t,"SparqlQueryErrorInfo",(function(){return i}));const r=160;class i{constructor(e="",t="",n=""){n&&n.length>r&&(this.shortenErrorMessage=n.substring(0,r)),this.status=e,this.statusText=t,this.responseText=n}}},77:function(e,t,n){"use strict";n.r(t),n.d(t,"FileDescriptorsChart",(function(){return i}));var r=n(43);class i extends r.ChartData{constructor(e,t){super(e,!1,!1,t)}chartSetup(e){e.chart.yAxis.tickFormat=e=>this.formatNumber(e),e.chart.color=[e.chart.color[1]]}createDataHolder(){return[{key:this.translateService.instant("resource.system.file_descriptors.open"),area:"true",values:[]}]}addNewData(e,t,n){if(!n.openFileDescriptors){const e=[{label:this.translateService.instant("resource.system.file_descriptors.only_unix")}];return void this.setSubTitle(e)}e[0].values.push([t,n.openFileDescriptors]);const r=[{label:this.translateService.instant("resource.system.file_descriptors.max"),value:this.formatNumber(n.maxFileDescriptors)}];this.setSubTitle(r)}updateRange(e){super.updateRange(e,2)}}},78:function(e,t,n){"use strict";n.r(t),n.d(t,"NonHeapMemoryChart",(function(){return i}));var r=n(49);class i extends r.HeapMemoryChart{constructor(e){super(e,!1,!1)}parseData(e){return e.nonHeapMemoryUsage}}},79:function(e,t,n){"use strict";n.r(t),n.d(t,"CpuLoadChart",(function(){return i}));var r=n(43);class i extends r.ChartData{constructor(e){super(e,!1,!1)}chartSetup(e){e.chart.yAxis.tickFormat=function(e){return e+"%"}}createDataHolder(){return[{key:this.translateService.instant("resource.system.cpu_load.label"),values:[]}]}addNewData(e,t,n){e[0].values.push([t,this.formatValue(n.cpuLoad)])}formatValue(e){return parseFloat(e).toFixed(4)}updateRange(e){const t=Math.max(...e[0].values.flatMap(e=>e[1])),n=t>50?100:2*t;this.chartOptions.chart.yDomain=[0,n]}}},80:function(e,t,n){"use strict";n.r(t),n.d(t,"DiskStorageChart",(function(){return i}));var r=n(43);class i extends r.ChartData{constructor(e){super(e,!0,!0)}chartSetup(e){Object.assign(e.chart,{type:"multiBarHorizontalChart",height:250,stacked:!0,showControls:!1,xAxis:{showMaxMin:!1,tickFormat:function(e){return e}},yAxis:{showMaxMin:!1,tickFormat:function(e){return(100*e).toFixed(2)+"%"}},yDomain:[0,1]})}translateLabels(e){if(!e)return;super.translateLabels(e);const[t,n]=e;t.values.length&&n.values.length&&(t.values[0][0]=this.translateService.instant("resource.storage.data"),t.values[1][0]=this.translateService.instant("resource.storage.work"),t.values[2][0]=this.translateService.instant("resource.storage.logs"),n.values[0][0]=this.translateService.instant("resource.storage.data"),n.values[1][0]=this.translateService.instant("resource.storage.work"),n.values[2][0]=this.translateService.instant("resource.storage.logs"))}createDataHolder(){return[{key:this.translateService.instant("resource.storage.used"),color:this.chartOptions.chart.color[1],values:[]},{key:this.translateService.instant("resource.storage.free"),color:this.chartOptions.chart.color[0],values:[]}]}addNewData(e,t,n,r){const o=n.storageMemory,[a,s]=e;r&&(a.values.push([this.translateService.instant("resource.storage.data"),0]),a.values.push([this.translateService.instant("resource.storage.work"),0]),a.values.push([this.translateService.instant("resource.storage.logs"),0]),s.values.push([this.translateService.instant("resource.storage.data"),1]),s.values.push([this.translateService.instant("resource.storage.work"),1]),s.values.push([this.translateService.instant("resource.storage.logs"),1]));const l=[{label:this.translateService.instant("resource.storage.subtitle.data"),value:[i.formatBytesValue(o.dataDirUsed),i.formatBytesValue(o.dataDirFree)]},{label:this.translateService.instant("resource.storage.subtitle.work"),value:[i.formatBytesValue(o.workDirUsed),i.formatBytesValue(o.workDirFree)]},{label:this.translateService.instant("resource.storage.subtitle.logs"),value:[i.formatBytesValue(o.logsDirUsed),i.formatBytesValue(o.logsDirFree)]}];this.setSubTitle(l);const u=o.dataDirUsed+o.dataDirFree,c=o.workDirUsed+o.workDirFree,d=o.logsDirUsed+o.logsDirFree;a.values[0][1]=o.dataDirUsed/u,a.values[1][1]=o.workDirUsed/c,a.values[2][1]=o.logsDirUsed/d,s.values[0][1]=o.dataDirFree/u,s.values[1][1]=o.workDirFree/c,s.values[2][1]=o.logsDirFree/d}}},81:function(e,t,n){"use strict";n.r(t),n.d(t,"QueriesChart",(function(){return i}));var r=n(43);class i extends r.ChartData{constructor(e){super(e,!1,!1)}chartSetup(e){e.chart.yAxis.tickValues=()=>i.getIntegerRangeForValues(this.dataHolder)}createDataHolder(){return[{key:this.translateService.instant("resource.queries.running"),values:[]}]}addNewData(e,t,n){const{activeQueryData:r,performanceData:i}=n;e[0].values.push([t,r.length]);const o=i.queries.slow,a=i.queries.suboptimal,s=[{label:this.translateService.instant("resource.queries.slow"),value:o},{label:this.translateService.instant("resource.queries.suboptimal"),value:a}];this.setSubTitle(s)}}},82:function(e,t,n){"use strict";n.r(t),n.d(t,"GlobalCacheChart",(function(){return i}));var r=n(43);class i extends r.ChartData{constructor(e,t){super(e,!1,!1,t)}chartSetup(e){e.chart.yAxis.tickFormat=e=>this.formatNumber(e)}getTitle(){return this.translateService.instant("resources.global_cache.label")}createDataHolder(){return[{key:this.translateService.instant("resources.global_cache.hits"),values:[]},{key:this.translateService.instant("resources.global_cache.miss"),values:[]}]}addNewData(e,t,n){const[r,i]=e;r.values.push([t,n.cacheHit]),i.values.push([t,n.cacheMiss])}}},83:function(e,t,n){"use strict";n.r(t),n.d(t,"ConnectionsChart",(function(){return i}));var r=n(43);class i extends r.ChartData{constructor(e){super(e,!1,!1)}chartSetup(e){e.chart.yAxis.tickValues=()=>i.getIntegerRangeForValues(this.dataHolder)}createDataHolder(){return[{key:this.translateService.instant("resource.connections.active"),values:[]},{key:this.translateService.instant("resource.connections.open"),values:[]}]}addNewData(e,t,n){const r=n.performanceData;e[0].values.push([t,r.activeTransactions]),e[1].values.push([t,r.openConnections])}}},84:function(e,t,n){"use strict";n.r(t),n.d(t,"ClusterHealthChart",(function(){return i}));var r=n(43);class i extends r.ChartData{constructor(e){super(e,!0,!1),this.nodesCount=0}chartSetup(e){const t={type:"stackedAreaChart",interpolate:"step-after",stacked:!0,yAxis:{showMaxMin:!1,tickFormat:function(e){return e},tickValues:()=>d3.range(0,this.nodesCount+1,1)}};Object.assign(e.chart,t)}getTitle(){return this.translateService.instant("resources.cluster_health.label")}createDataHolder(){const[e,t,n,r]=i.COLORS;return[{key:this.translateService.instant("resources.cluster_health.in_sync"),color:e,values:[]},{key:this.translateService.instant("resources.cluster_health.syncing"),color:n,values:[]},{key:this.translateService.instant("resources.cluster_health.out_sync"),color:t,values:[]},{key:this.translateService.instant("resources.cluster_health.disconnected"),color:r,values:[]}]}addNewData(e,t,n){const r=n.nodesStats;this.nodesCount=r.nodesInCluster;const[i,o,a,s]=e;i.values.push([t,r.nodesInSync]),a.values.push([t,r.nodesOutOfSync]),s.values.push([t,r.nodesDisconnected]),o.values.push([t,r.nodesSyncing]);const l=[{label:this.translateService.instant("resource.cluster_health.leader_elections"),value:n.term},{label:this.translateService.instant("resource.cluster_health.recoveries"),value:n.failureRecoveriesCount},{label:this.translateService.instant("resource.cluster_health.failed_transactions"),value:n.failedTransactionsCount}];this.setSubTitle(l)}}},85:function(e,t,n){"use strict";n.r(t),n.d(t,"EpoolChart",(function(){return i}));var r=n(43);class i extends r.ChartData{constructor(e){super(e,!1,!1)}chartSetup(e){const t={type:"multiChart",yAxis1:{showMaxMin:!1,axisLabel:this.translateService.instant("resource.epool.reads"),axisLabelDistance:-10,rotateYLabel:!0,tickFormat:function(e){return e},tickValues:()=>i.getIntegerRangeForValues(this.dataHolder[0])},yAxis2:{showMaxMin:!1,axisLabel:this.translateService.instant("resource.epool.writes"),axisLabelDistance:-10,rotateYLabel:!0,tickFormat:function(e){return e},tickValues:()=>i.getIntegerRangeForValues(this.dataHolder[1])},y1Domain:[0,1],y2Domain:[0,1]};Object.assign(e.chart,t)}getTitle(){return this.translateService.instant("resource.epool.label")}createDataHolder(){return[{key:this.translateService.instant("resource.epool.reads"),type:"line",yAxis:1,values:[]},{key:this.translateService.instant("resource.epool.writes"),type:"line",yAxis:2,values:[]}]}addNewData(e,t,n,r){const i=n.performanceData,[o,a]=e;let s=0,l=0;const u=i.entityPool.epoolReads,c=i.entityPool.epoolWrites;if(!r){s=u-o.values[o.values.length-1][2],l=c-a.values[o.values.length-1][2]}o.values.push([t,s,u]),a.values.push([t,l,c])}updateRange(e){this.chartOptions.chart.yDomain1=this.getAxisDomain(e[0]),this.chartOptions.chart.yDomain2=this.getAxisDomain(e[1])}getAxisDomain(e){const[t]=i.calculateMaxChartValueAndDivisions(e);return[0,t]}}},88:function(e,t,n){"use strict";n.r(t);n(46),n(5),n(52);var r=n(345),i=n.n(r),o=n(346),a=n.n(o),s=n(0),l=n(63),u=n(331),c=n(64);function d(e,t,n,r,o,d,p,f,h,g,m,v,y,x,b){let E;return{restrict:"AE",scope:!1,templateUrl:"js/angular/core/directives/queryeditor/templates/query-editor.html",link:function(C,T,S){C.nostorage=S.hasOwnProperty("nostorage"),C.notabs=S.hasOwnProperty("notabs"),C.notoolbar=S.hasOwnProperty("notoolbar"),C.notoolbarSaved=S.hasOwnProperty("notoolbarSaved"),C.notoolbarCopy=S.hasOwnProperty("notoolbarCopy"),C.notoolbarInference=S.hasOwnProperty("notoolbarInference"),C.notoolbarSameAs=S.hasOwnProperty("notoolbarSameAs"),C.nostatus=S.hasOwnProperty("nostatus"),C.norun=S.hasOwnProperty("norun"),C.enableColumnResizingOnWindowWidth=S.hasOwnProperty("enableColumnResizingOnWindowWidth"),C.runButtonName="query.editor.run.btn",S.runButtonName&&(C.runButtonName=S.runButtonName);if(C.nocount="true"===S.nocount,C.sparqlQueryErrorInfo=void 0,C.fullErrorMessage=!1,C.queryEditorIsReady=!1,C.showFullErrorMessage=function(e){C.fullErrorMessage=e},S.callbackOnChange){const e=C[S.callbackOnChange];"function"==typeof e&&(E=e)}e((function(){!function(C){function T(){angular.element("#wb-sparql-saveQuery")[0].click()}function S(){C.runQuery(!1)}function w(){C.runQuery(!1,"explain")}function N(){C.runQuery(!1,"gpt")}function L(){if(C.tabs.length<2||!C.currentQuery.id||!C.isTabChangeOk(!1))return;let e=G(C.currentQuery.id);e=(e+1)%C.tabs.length;I(C.tabs[e].id)}function A(){if(C.tabs.length<2||!C.currentQuery.id||!C.isTabChangeOk(!1))return;let e=G(C.currentQuery.id);e--,-1===e&&(e=C.tabs.length-1);I(C.tabs[e].id)}function I(t){e((function(){let e=$('a[data-id = "'+t+'"]');0===e.length&&(e=$("a[data-id]").first()),e.tab("show")}),0)}C.changePagination=function(){C.runQuery(!0,C.explainRequested)},window.editor=i.a.fromTextArea(document.getElementById("query"),{persistent:null,value:"",indentUnit:4,createShareLink:null,cursorHeight:1,sparql:{showQueryButton:!1,acceptHeaderGraph:"application/x-graphdb-table-results+json, application/rdf+json;q=0.9, */*;q=0.8",acceptHeaderSelect:"application/x-sparqlstar-results+json, application/sparql-results+json;q=0.9, */*;q=0.8"},extraKeys:{"Ctrl-Enter":S,"Cmd-Enter":S,"Shift-Ctrl-Enter":w,"Shift-Cmd-Enter":w,"Ctrl-Alt-Enter":N,"Cmd-Alt-Enter":N,"Ctrl-Alt-T":C.addNewTab,"Cmd-Alt-T":C.addNewTab,"Ctrl-S":T,"Cmd-S":T,"Ctrl-Alt-Left":A,"Cmd-Alt-Left":A,"Ctrl-Alt-Right":L,"Cmd-Alt-Right":L},locale:x.getLanguage()}),window.editor.toastBuildIndex=function(){const e=Object(s.decodeHTML)(y.instant("explore.autocomplete.warning.msg"));n.warning("",`<div class="autocomplete-toast"><a href="autocomplete">${e}</a></div>`,{allowHtml:!0})},window.editor.toastError=function(e){n.error("Cannot execute autocomplete query. "+getError(e))},window.editor.on("update",(function(){angular.element(".parseErrorIcon").parent().css("z-index","10")})),window.editor.on("changes",(function(){angular.element(".CodeMirror-linenumbers").css("width","1px"),angular.element(".CodeMirror-sizer").css("margin-left","0px"),clearTimeout(C.changesTimeout);const e=!window.editor.queryValid;C.changesTimeout=setTimeout(E?E():function(){const t=G(C.currentQuery.id)+1;$('a[data-id = "'+t+'"]').toggleClass("query-has-error",e).attr("title",e?y.instant("query.editor.query.syntax.error"):"")},200),C.currentQuery.query=window.editor.getValue(),C.currentQuery.queryType=window.editor.getQueryType()})),$(".fullscreenToggleBtns").hide();const R=function(e){$(e.target).removeClass("fa-link").addClass("fa-check").blur(),setTimeout((function(){$(e.target).removeClass("fa-check").addClass("fa-link")}),1e3)};window.onbeforeunload=function(){C.nostorage||m.set(v.TABS_STATE,C.tabs),C.saveTab(C.currentQuery.id)};const k=i.a.executeQuery,O=i.a.getUrlArguments;function D(e,t,n){return{status:e,statusText:t,responseText:n}}let M,P;C.$on("$destroy",(function(){C.nostorage||m.set(v.TABS_STATE,C.tabs),i.a.executeQuery=k,i.a.getUrlArguments=O,C.saveTab(C.currentQuery.id)})),i.a.drawButtons=function(e){e.buttons=$("#yasqe_buttons_mocked")},i.a.getActiveRepository=function(){return r.getActiveRepository()},i.a.getUrlArguments=function(e,t){const n=O(e,t),r=window.editor.getQueryType();return"SELECT"!==r&&"CONSTRUCT"!==r&&"DESCRIBE"!==r||(n.push({name:"limit",value:C.currentTabConfig.pageSize+1}),C.currentTabConfig.offset=(C.currentTabConfig.page-1)*C.currentTabConfig.pageSize+1,n.push({name:"offset",value:C.currentTabConfig.offset-1})),!C.explainRequested||"SELECT"!==r&&"CONSTRUCT"!==r&&"DESCRIBE"!==r||(n.push({name:"explain",value:"true"}),n.push({name:"explainType",value:C.explainRequested})),n},i.a.executeQuery=function(e){if(P&&$(P.resultsContainer).length&&$(P.resultsContainer).empty(),e.options.sparql.headers["X-GraphDB-Catch"]=C.currentTabConfig.pageSize+"; throw",C.currentTrackAlias="query-editor-"+performance.now()+"-"+Date.now(),e.options.sparql.headers["X-GraphDB-Track-Alias"]=C.currentTrackAlias,e.options.sparql.headers["X-GraphDB-Repository-Location"]=r.getActiveRepositoryObject().location,C.countTimeouted=!1,"query"===e.getQueryMode()?e.options.sparql.endpoint="repositories/"+r.getActiveRepository():"update"===e.getQueryMode()&&(e.options.sparql.endpoint="repositories/"+r.getActiveRepository()+"/statements"),e.options.sparql.args=[{name:"infer",value:C.currentQuery.inference},{name:"sameAs",value:C.currentQuery.sameAs}],C.currentTabConfig.customUpdateMessage="","update"!==window.editor.getQueryMode()){const t=C.currentTabConfig,n=C.executedQueryTab.id;return window.editor.options.sparql.handlers.countCallback=function(e,r,i){if(200===e.status){const o=C.tabs[G(n)];o&&(P.setResultsCount(e,r,i),t.allResultsCount=P.allCount,o.allResultsCount=P.allCount,t.allResultsCountExact=!0,o.allResultsCountExact=!0,C.saveTab(o.id))}else t.countTimeouted=!0},null!=C.currentQuery.outputType?P.options.output=C.currentQuery.outputType:P.options.output="table",C.currentTabConfig.queryType=window.editor.getQueryType(),C.queryStartTime=(new Date).getTime(),k(e,{setQueryLimit:function(e){return"CONSTRUCT"===C.currentTabConfig.queryType&&r.isActiveRepoOntopType()?window.editor.getValueWithoutComments():e}})}{const t=function(){C.currentTabConfig.queryType="UPDATE",h.getRepositorySize(r.getActiveRepository()).success((function(t){return C.repoSize=parseInt(t),C.queryStartTime=(new Date).getTime(),k(e,{})})).error((function(t){return n.warning(y.instant("query.editor.repo.size.error",{repo:r.getActiveRepository(),error:getError(t)})),C.queryStartTime=(new Date).getTime(),k(e,{})}))};g.checkConnector(window.editor.getValue()).then((function(e){if(e.data.command&&!e.data.hasSupport){C.currentTabConfig.queryType="ERROR",C.currentTabConfig.timeFinished=Date.now(),C.currentTabConfig.timeTook=(C.currentTabConfig.timeFinished-C.queryStartTime)/1e3;const t=y.instant("query.editor.inactive.plugin.warning.msg",{connectorName:e.data.connectorName,pluginName:e.data.pluginName}),n=D(-1,t,t);return P.results={getException:function(){return n}},C.setLoader(!1),void j({customError:n},"",null)}if("create"===e.data.command||"repair"===e.data.command){const t="repair"===e.data.command;t?(C.setLoader(!0,y.instant("query.editor.repairing.connector",{name:e.data.name})),C.currentTabConfig.customUpdateMessage={msg:"query.editor.repaired.connector",name:e.data.name}):(C.setLoader(!0,y.instant("query.editor.creating.connector",{name:e.data.name})),C.currentTabConfig.customUpdateMessage={msg:"created.connector",name:e.data.name});const n=C.$new(!0);n.beingBuiltConnector={percentDone:0,status:{processedEntities:0,estimatedEntities:0,indexedEntities:0,entitiesPerSecond:0},actionName:t?y.instant("externalsync.repairing"):y.instant("externalsync.creating"),eta:"-",inline:!1,iri:e.data.iri,name:e.data.name,doneCallback:function(){M.dismiss("cancel")}},n.getHumanReadableSeconds=C.getHumanReadableSeconds,M=p.open({templateUrl:"pages/connectorProgress.html",controller:"CreateProgressCtrl",size:"lg",backdrop:"static",scope:n})}else"drop"===e.data.command&&(C.setLoader(!0,y.instant("externalsync.delete.progress.msg",{name:e.data.name})),C.currentTabConfig.customUpdateMessage={msg:"externalsync.delete.success.msg",name:e.data.name});t()}),(function(){t()}))}};const F=i.a.getAjaxConfig;function j(e,t,n){e.getResponseHeader&&e.getResponseHeader("content-type")&&(e.contentType=e.getResponseHeader("content-type")),delete e.response;const r=G(C.executedQueryTab.id),i=C.tabs[r],o={queryType:C.currentTabConfig.queryType,yasrData:e,textStatus:t,jqXhrOrErrorString:n,page:C.currentTabConfig.page,pageSize:C.currentTabConfig.pageSize,allResultsCount:C.currentTabConfig.allResultsCount,allResultsCountExact:C.currentTabConfig.allResultsCountExact,resultsCount:C.currentTabConfig.resultsCount,offset:C.currentTabConfig.offset,timeTook:C.currentTabConfig.timeTook,timeFinished:C.currentTabConfig.timeFinished,sizeDelta:C.currentTabConfig.sizeDelta,customUpdateMessage:C.currentTabConfig.customUpdateMessage,errorMessage:C.currentTabConfig.errorMessage,warningMessage:C.currentTabConfig.warningMessage};"ERROR"!==C.currentTabConfig.queryType&&"UPDATE"!==C.currentTabConfig.queryType&&"ASK"!==C.currentTabConfig.queryType&&(o.outputType=C.yasr.options.output),angular.extend(C.currentQuery,o),angular.extend(i,o),C.nostorage||m.set(v.TABS_STATE,C.tabs),$('a[data-id = "'+C.executedQueryTab.id+'"]').tab("show")}i.a.getAjaxConfig=function(e,t){const n=F(e,t),r=f.getAuthToken();return r&&_.extend(n.headers,{Authorization:r}),n},C.copyToClipboardQuery=function(e,t){d.openCopyToClipboardModal(function(e,t){let n=[location.protocol,"//",location.host,location.pathname].join("");return e?(n=n+"?savedQueryName="+encodeURIComponent(e),null!=t&&(n+="&owner="+encodeURIComponent(t))):n=n+"?"+$.param({name:C.currentQuery.name,infer:C.currentQuery.inference,sameAs:C.currentQuery.sameAs,query:window.editor.getValue()}),n}(e,t))},C.copyToClipboardResult=function(e){d.openCopyToClipboardModal(e)},C.goToVisual=function(){const e={query:window.editor.getValue(),sameAs:C.currentQuery.sameAs,inference:C.currentQuery.inference};t.path("graphs-visualizations").search(e)},$("textarea").on("paste",(function(){e((function(){C.addKnownPrefixes()}),0)})),C.$on("language-changed",(function(e,t){P&&P.options&&(P.options.locale=t.locale,P.changeLanguage(t.locale)),window.editor.options.locale=t.locale,i.a.signal(window.editor,"language-changed")})),function(){C.$on("$destroy",(function(){P&&P.destroy()}));const t={getUsedPrefixes:{},persistency:!1,locale:x.getLanguage()};C.enableColumnResizingOnWindowWidth&&(t.pluginsOptions=l.YasrUtils.getYasrConfiguration()),P=a()(document.getElementById("yasr"),t),window.yasr=P,P.afterCopy=R,P.getQueryResultsAsFormat=function(e){const t="CONSTRUCT"===window.editor.getQueryType(),i={query:C.currentQuery.query,infer:C.currentQuery.inference,sameAs:C.currentQuery.sameAs,auth:localStorage.getItem("com.ontotext.graphdb.auth")},o=e,a=["application/rdf+json","application/ld+json"].includes(e);if(window.editor.getValue()!==i.query&&n.warning(y.instant("query.editor.query.results.mismatch")),t&&a)h.downloadResultsAsFile(r.getActiveRepository(),i,o).then((function({data:e,filename:t}){Object(u.saveAs)(e,t)})).catch((function(e){e.data.text().then(e=>{n.error(e,y.instant("common.error"))})}));else{const t=$("#wb-download");t.attr("action","repositories/"+r.getActiveRepository()),$("#wb-download-query").val(i.query),$("#wb-download-infer").val(i.infer),$("#wb-download-sameAs").val(i.sameAs),i.auth&&$("#wb-auth-token").val(i.auth),$("#wb-download-accept").val(e),t.trigger("submit")}},window.editor.options.sparql.handlers.complete=function(t,i,o){function a(){j(t,i,o)}if(M&&M.dismiss("cancel"),null===window.editor)return void C.setLoader(!1);if(C.currentTabConfig.errorMessage=t.getResponseHeader("X-GraphDB-Error"),C.currentTabConfig.warningMessage=t.getResponseHeader("X-GraphDB-Warning"),P.currentQuery=C.currentQuery,C.currentTabConfig.timeFinished=Date.now(),C.currentTabConfig.timeTook=(C.currentTabConfig.timeFinished-C.queryStartTime)/1e3,t.status>=400)return t.responseText=t.responseText.replace(/^([^: ]+: )+/,""),C.currentTabConfig.queryType="ERROR",a(),C.setYasrResponse(t,i,o),void C.setLoader(!1);if(0===t.status){C.currentTabConfig.queryType="ERROR";const e=D(-1,y.instant("aborted.request.msg"),y.instant("aborted.request.no.results.msg"));return P.results={getException:function(){return e}},C.setLoader(!1),void j({customError:e},"",null)}let s;if(C.setLoader(!1),"update"===window.editor.getQueryMode())s=function(){h.getRepositorySize(r.getActiveRepository()).success((function(e){let t;void 0!==C.repoSize&&(t=Number(e)-C.repoSize),C.currentTabConfig.sizeDelta=t,a()})).error((function(e){n.warning(y.instant("query.editor.repo.size.error",{repo:r.getActiveRepository(),error:getError(e)})),C.currentTabConfig.sizeDelta=void 0,a()}))};else{if(200===t.status){const e=t.getResponseHeader("Content-Type");0!==e.indexOf("application/sparql-results+json")&&0!==e.indexOf("application/x-sparqlstar-results+json")&&0!==e.indexOf("application/x-graphdb-table-results+json")||t.responseJSON.results&&(C.currentTabConfig.resultsCount=t.responseJSON.results.bindings.length,t.responseJSON.results.bindings.length>C.currentTabConfig.pageSize&&(t.responseJSON.results.bindings.length=C.currentTabConfig.pageSize),C.currentTabConfig.allResultsCountExact||((C.nocount||C.countTimeouted||C.currentTabConfig.resultsCount<=C.currentTabConfig.pageSize)&&(t.status=204),C.currentTabConfig.allResultsCount=Math.max(C.currentTabConfig.allResultsCount,C.currentTabConfig.pageSize*(C.currentTabConfig.page-1)+C.currentTabConfig.resultsCount),C.currentTabConfig.resultsCount<=C.currentTabConfig.pageSize&&(C.currentTabConfig.allResultsCountExact=!0)))}C.setLoader(!0,y.instant("query.editor.render.results.msg"),null,!0),s=function(){C.setYasrResponse(t,i,o),a(),C.setLoader(!1)}}e((function(){s(),"CONSTRUCT"!==window.editor.getQueryType()?($(".yasr_btnGroup.nav.nav-tabs li a.disabled").removeClass("disabled").css("font-weight","400"),$(".yasr_btnGroup.nav.nav-tabs li.disabled a").addClass("disabled").css("font-weight","200"),"DESCRIBE"===window.editor.getQueryType()&&$(".yasr_btnGroup.nav.nav-tabs li a").removeClass("disabled").css("font-weight","400")):"CONSTRUCT"===window.editor.getQueryType()&&$(".yasr_btnGroup.nav.nav-tabs li a.disabled").removeClass("disabled").css("font-weight","400"),$("#yasr").css("padding","0"),$(".yasr_btnGroup li:nth-child(2)").hasClass("active")&&e((function(){$(".yasr_btnGroup li:nth-child(2) a").get(0).click()}),100),$("#wb-sparql-addNewTab").click((function(){$(".dataTables_filter").hide(),$(".resultsTable").hide()}))}),100)},window.editor.options.sparql.handlers.resetResults=function(){},C.yasr=P,C.setYasrResponse=function(e,t,n){e.responseJSON&&(e.response=e.responseJSON,e.responseText=void 0),window.yasr.plugins.table.options.highlightLiteralCellResult=H,P.setResponse(e,t,n),B()},C.$watch("yasr.options.output",(function(e){if(e&&"UPDATE"!==C.currentTabConfig.queryType&&"ASK"!==C.currentTabConfig.queryType){const t=C.tabs[G(C.currentQuery.id)];angular.isDefined(t)&&C.currentTabConfig.queryType&&t.outputType!==e&&(t.outputType=C.currentQuery.outputType=e,C.saveTab(t.id))}})),C.$watch("namespaces",(function(){C.namespaces&&(P&&P.options&&C.namespaces&&(P.options.getUsedPrefixes=C.namespaces),i.a.signal(window.editor,"namespacesChanged",C.namespaces))}))}();const B=()=>{const e=P.results.getException();C.sparqlQueryErrorInfo=e?new c.SparqlQueryErrorInfo(e.status,e.statusText,e.responseText):void 0};function H(){var e=P.results.getBindings(),t=P.results.getVariables(),n=e[0],r=t[0];if(1===t.length&&1===e.length&&"plan"===r&&n[r].value.includes("# NOTE: Optimization groups")){var o=document.getElementsByClassName("nonUri")[0];o.classList.add("cm-s-default"),o.setAttribute("id","highlighted_output");var a=o.innerText.substring(1,o.innerText.length-1);o.innerHTML="",i.a.runMode(a,"sparql11",document.getElementById("highlighted_output"))}}function G(e){for(let t=0;t<C.tabs.length;t++){if(C.tabs[t].id===e)return t}}function U(e){return angular.isDefined(e)&&"false"!==e}function V(e,n,r){const i=C.getExistingTabId(e),o=C.$on("tabLoaded",(function(){angular.isDefined(n)&&(C.currentQuery.inference=U(n)),angular.isDefined(r)&&(C.currentQuery.sameAs=U(r)),U(t.search().execute)&&("update"===window.editor.getQueryMode()?d.openSimpleModal({title:y.instant("confirm.execute"),message:Object(s.decodeHTML)(y.instant("query.editor.automatically.execute.update.warning")),warning:!0}).result.then((function(){C.runQuery(!1)})):C.runQuery(!1)),t.search({}),t.replace(),o()}));C.highlightNextTabChange=!0,angular.isDefined(i)?I(i):C.addNewTab(null,e.name,e.body)}function W(){if(t.search().savedQueryName)e=t.search().savedQueryName,r=t.search().owner,i=t.search().infer,a=t.search().sameAs,o.getSavedQuery(e,r).success((function(e){V(e,i,a)})).error((function(t){n.error(y.instant("query.editor.missing.saved.query.data.error",{savedQueryName:e,error:getError(t)}))}));else if(t.search().query){V({name:t.search().name,body:t.search().query},t.search().infer,t.search().sameAs)}else if(b.isActive())C.addNewTab();else{I(m.get(v.TABS_STATE_CURRENT_ID))}var e,r,i,a}function q(){C.getNamespaces(),i.a.signal(window.editor,"repositoryOrAuthorizationChanged",r.getActiveRepository(),f.getAuthToken()),W()}$(document).mouseup((function(e){const t=$("#sampleQueriesCollapse");!t.is(e.target)&&0===t.has(e.target).length&&C.showSampleQueries&&C.toggleSampleQueries()})),r.getActiveRepository()&&q();C.$on("repositoryIsSet",(function(){r.getActiveRepository()&&q()})),e((function(){angular.element(document).find(".CodeMirror textarea:first-child").focus()}),50)}(C),C.queryEditorIsReady=!0}),150)}}}angular.module("graphdb.framework.core.directives.queryeditor.queryeditor",["ngCookies","graphdb.framework.externalsync.controllers","graphdb.framework.rest.connectors.service","graphdb.framework.utils.localstorageadapter"]).directive("queryEditor",d),d.$inject=["$timeout","$location","toastr","$repositories","SparqlRestService","ModalService","$uibModal","$jwtAuth","RDF4JRepositoriesRestService","ConnectorsRestService","LocalStorageAdapter","LSKeys","$translate","$languageService","GuidesService"]},91:function(e,t,n){"use strict";n.r(t);n(5);function r(e,t,n,r){return{restrict:"AE",template:'<a class="nav-link" role="tab" data-toggle="tab" blur="submit" editable-text="tab.name" e-form="editCurrentlySelectedOnly" ng-click="selectThisTab($event)" ng-dblclick="editCurrentTab()" ><span ng-class="{\'text-muted\': !tab.name}">{{ tab.name || (\'sparql.tab.directive.unnamed.tab.title\' | translate)}}</span><button type="button" ng-click="deleteTab($event)" class="btn btn-link btn-sm secondary delete-sparql-tab-btn" title="Delete tab"><i class="icon-close"></i></button></a>',replace:!0,controller:["$scope","$element","$rootScope","ModalService","toastr","$translate",function(e,r,i,o,a,s){function l(e){return $(e).attr("data-id")}function u(e){$('a[data-id = "'+e+'"]').tab("show")}e.state={},$(r).on("shown.bs.tab",(function(e){i.$broadcast("tabAction",e)})),e.deleteTab=function(c){if(c.preventDefault(),c.stopPropagation(),e.tabs.length<2)return void a.warning(s.instant("sparql.tab.directive.close.last.warning"));c.shiftKey?(e.state.selectedTabId=l(r),o.openSimpleModal({title:s.instant("common.confirm"),message:s.instant("sparql.tab.directive.delete.all.tabs.warning"),warning:!0}).result.then((function(){var r;r=e.state.selectedTabId,e.tabs=e.tabs.filter((function(e){if(e.id===r)return e})),u(e.tabs[0].id),t.set(n.TABS_STATE,e.tabs),i.$broadcast("deleteAllexeptSelected",e.tabs)}))):(e.state.idForDelete=l(r),o.openSimpleModal({title:s.instant("common.confirm"),message:s.instant("sparql.tab.directive.close.tab.warning"),warning:!0}).result.then((function(){!function(t){if(angular.isUndefined(t))throw"Delete by id was called with undefined id";const n=function(t){for(let n=0;n<e.tabs.length;n++){if(e.tabs[n].id===t)return n}}(t);e.tabs.splice(n,1),t===e.currentQuery.id&&e.tabs.length>0&&u(n>0?e.tabs[n-1].id:e.tabs[0].id)}(e.state.idForDelete)})));angular.element(document).find(".CodeMirror textarea:first-child").focus()},e.editCurrentTab=function(){if(l(r)!==e.currentQuery.id)return;e.editCurrentlySelectedOnly.$show();const t=$(".editable-buttons");t.children(".btn.btn-primary").addClass("btn-sm"),t.children(".btn.btn-default").addClass("btn-sm"),$(".editable-controls .editable-input").addClass("form-control-sm").on("change",(function(t){e.currentQuery.name=t.currentTarget.$$currentValue})),$(".editable-buttons .glyphicon.glyphicon-ok").removeClass("glyphicon glyphicon-ok").addClass("fa fa-check"),$(".editable-buttons .glyphicon.glyphicon-remove").removeClass("glyphicon glyphicon-remove").addClass("fa fa-close")},e.selectThisTab=function(t){t.preventDefault(),t.stopPropagation(),e.isTabChangeOk(!1)&&$(r).tab("show")}}]}}angular.module("graphdb.framework.core.directives.queryeditor.sparqltab",["graphdb.framework.core","graphdb.framework.utils.localstorageadapter"]).directive("sparqlTab",r),r.$inject=["$rootScope","LocalStorageAdapter","LSKeys","ModalService"]}}]);
|