{
"tiddlers": {
"$:/Acknowledgements": {
"title": "$:/Acknowledgements",
"type": "text/vnd.tiddlywiki",
"text": "TiddlyWiki incorporates code from these fine OpenSource projects:\n\n* [[The Stanford Javascript Crypto Library|http://bitwiseshiftleft.github.io/sjcl/]]\r\n* [[The Jasmine JavaScript Test Framework|http://pivotal.github.io/jasmine/]]\r\n* [[Normalize.css by Nicolas Gallagher|http://necolas.github.io/normalize.css/]]\n\nAnd media from these projects:\n\n* World flag icons from [[Wikipedia|http://commons.wikimedia.org/wiki/Category:SVG_flags_by_country]]\r\n"
},
"$:/core/copyright.txt": {
"title": "$:/core/copyright.txt",
"type": "text/plain",
"text": "TiddlyWiki created by Jeremy Ruston, (jeremy [at] jermolene [dot] com)\n\nCopyright © Jeremy Ruston 2004-2007\r\nCopyright © UnaMesa Association 2007-2014\n\nRedistribution and use in source and binary forms, with or without modification,\r\nare permitted provided that the following conditions are met:\n\nRedistributions of source code must retain the above copyright notice, this\r\nlist of conditions and the following disclaimer.\n\nRedistributions in binary form must reproduce the above copyright notice, this\r\nlist of conditions and the following disclaimer in the documentation and/or other\r\nmaterials provided with the distribution.\n\nNeither the name of the UnaMesa Association nor the names of its contributors may be\r\nused to endorse or promote products derived from this software without specific\r\nprior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY\r\nEXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\r\nOF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT\r\nSHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,\r\nINCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED\r\nTO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR\r\nBUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN\r\nANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH\r\nDAMAGE.\r\n"
},
"$:/core/icon": {
"title": "$:/core/icon",
"tags": "$:/tags/Image",
"text": "<svg width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\r\n <g fill-rule=\"evenodd\">\r\n <path d=\"M64,0 L118.5596,32 L118.5596,96 L64,128 L9.44039956,96 L9.44039956,32 L64,0 Z M85.1274062,95.4080042 C81.5494069,95.3047989 79.9756384,95.3136745 78.1534289,92.2560668 L76.733228,92.2975844 C75.0801573,92.2226776 75.7690718,92.256631 74.6662332,92.2006037 C72.822332,92.1273894 73.1177105,90.3396383 72.7933215,89.3950941 C72.2744094,86.1888106 73.4800004,82.9659571 73.4419681,79.7590415 C73.428503,78.6206623 71.8498363,74.5912119 71.2858469,73.150598 C69.5178104,73.490271 67.7401827,73.5550323 65.9465048,73.6462337 C61.8120677,73.6358996 57.7056703,73.1192806 53.628962,72.4632293 C52.8345141,75.8119659 50.473106,80.4990751 52.4249964,83.9024219 C54.794228,87.4227874 56.45684,88.3980868 59.0339286,88.6103485 C61.6109895,88.8224384 62.1929077,91.7913467 61.5694236,92.8517379 C61.0175661,93.5845847 60.0476425,93.7176093 59.2235739,93.8951553 L57.5752147,93.9742093 C56.2780933,93.9296822 55.1187057,93.5723203 53.9629071,93.0211763 C52.0327307,91.9217335 50.0392154,89.6360411 48.5580719,87.9950695 C48.9028934,88.6503604 49.1085703,89.9296134 48.7958122,90.5249222 C47.9200982,91.7907825 44.1326257,91.7830485 42.3980986,90.996433 C40.4277043,90.1030197 35.6664658,83.8299171 34.9303347,79.1316435 C36.8887135,75.3525836 39.7416856,72.0607931 41.1850909,67.9459622 C38.038852,65.8974525 36.3537697,62.5626501 36.5725198,58.7851619 L36.6514762,58.3478913 C33.5557196,58.9392548 35.1611076,58.7192345 31.8308843,58.9762949 C21.2252017,58.9431831 11.8983553,51.6054609 17.1501626,40.2013394 C17.4916881,39.5260388 17.8165752,38.9120742 18.3955298,39.205288 C18.8602051,39.440565 18.793457,40.3843583 18.5597268,41.4309776 C15.5577203,55.057365 30.2297484,55.161659 39.2489049,52.6401668 C40.1440491,52.3898612 41.9243599,50.7040626 43.1576153,50.1452033 C45.1734825,49.231769 47.3615008,48.8611654 49.5329344,48.5941256 C54.9337165,47.9661653 61.4247946,50.8693254 64.7228943,50.9641212 C68.0210328,51.0589131 72.7127563,50.1582941 75.5928121,50.3479196 C77.6825379,50.4454833 79.734518,50.8303777 81.7507717,51.3786556 C83.0558682,44.8897102 83.1481363,40.1071855 86.2420439,39 C88.0578592,39.2926449 89.4570618,41.8175853 90.4927503,43.1666676 C92.6062592,43.0809984 94.6134653,43.6270518 96.6091885,44.233091 C100.222332,43.7098824 103.254293,41.6394732 106.445091,40.0288813 C103.211767,42.7223157 102.77315,47.1042714 103.142605,51.1564486 C103.280001,53.2591496 102.697713,55.5420684 101.977868,57.6949551 C100.630795,61.2025356 98.0292951,64.8997754 95.009908,64.7101481 C93.868464,64.673306 93.2053722,64.0138 92.3570101,63.3096933 C92.1924386,64.7358711 91.5456263,66.0084523 90.9221089,67.2697748 C89.4822206,70.066388 85.7194927,71.2987762 82.2354164,74.2849828 C78.7515768,77.2712347 83.3502408,87.9363951 84.4652464,89.8796277 C85.5800708,91.8230453 88.6922789,92.5339992 87.484639,94.28798 C87.1151913,94.8672415 86.5502884,95.0744181 85.9465544,95.2991347 L85.1274062,95.4080042 Z M45.0303574,86.5575217 L45.5828655,86.699414 C46.277142,86.4290005 47.6727292,86.8469317 48.4130246,87.0512628 C47.0498362,85.7357167 44.9960929,83.8038623 43.5164417,82.5859671 C43.0307739,81.1115156 43.2380006,79.6278431 43.3424927,78.122648 L43.3634516,77.9981264 C42.7802099,79.2030731 42.040056,80.3743566 41.6422405,81.6426885 C41.176708,83.3537773 43.7112632,85.1999538 44.6940603,86.2580263 L45.0303574,86.5575217 Z\"></path>\r\n </g>\r\n</svg>"
},
"$:/core/images/advanced-search-button": {
"title": "$:/core/images/advanced-search-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-advanced-search-button tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\r\n <g fill-rule=\"evenodd\">\r\n <path d=\"M74.5651535,87.9848361 C66.9581537,93.0488876 57.8237115,96 48,96 C21.490332,96 0,74.509668 0,48 C0,21.490332 21.490332,0 48,0 C74.509668,0 96,21.490332 96,48 C96,57.8541369 93.0305793,67.0147285 87.9377231,74.6357895 L122.284919,108.982985 C125.978897,112.676963 125.973757,118.65366 122.284271,122.343146 C118.593975,126.033442 112.613238,126.032921 108.92411,122.343793 L74.5651535,87.9848361 Z M48,80 C65.673112,80 80,65.673112 80,48 C80,30.326888 65.673112,16 48,16 C30.326888,16 16,30.326888 16,48 C16,65.673112 30.326888,80 48,80 Z\"></path>\r\n <circle cx=\"48\" cy=\"48\" r=\"8\"></circle>\r\n <circle cx=\"28\" cy=\"48\" r=\"8\"></circle>\r\n <circle cx=\"68\" cy=\"48\" r=\"8\"></circle>\r\n </g>\r\n</svg>"
},
"$:/core/images/blank": {
"title": "$:/core/images/blank",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-blank tc-image-button\" viewBox=\"63 152 64 64\" width=\"22pt\" height=\"22pt\"></svg>\r\n"
},
"$:/core/images/cancel-button": {
"title": "$:/core/images/cancel-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-cancel-button tc-image-button\" viewBox=\"0 0 128 128\" width=\"22pt\" height=\"22pt\">\r\n\t<g fill-rule=\"evenodd\">\r\n\t <path d=\"M64,76.3137085 L47.0294734,93.2842351 C43.9038742,96.4098343 38.8399231,96.4084656 35.7157288,93.2842712 C32.5978915,90.166434 32.5915506,85.0947409 35.7157649,81.9705266 L52.6862915,65 L35.7157649,48.0294734 C32.5901657,44.9038742 32.5915344,39.8399231 35.7157288,36.7157288 C38.833566,33.5978915 43.9052591,33.5915506 47.0294734,36.7157649 L64,53.6862915 L80.9705266,36.7157649 C84.0961258,33.5901657 89.1600769,33.5915344 92.2842712,36.7157288 C95.4021085,39.833566 95.4084494,44.9052591 92.2842351,48.0294734 L75.3137085,65 L92.2842351,81.9705266 C95.4098343,85.0961258 95.4084656,90.1600769 92.2842712,93.2842712 C89.166434,96.4021085 84.0947409,96.4084494 80.9705266,93.2842351 L64,76.3137085 Z M64,129 C99.346224,129 128,100.346224 128,65 C128,29.653776 99.346224,1 64,1 C28.653776,1 1.13686838e-13,29.653776 1.13686838e-13,65 C1.13686838e-13,100.346224 28.653776,129 64,129 Z M64,113 C90.509668,113 112,91.509668 112,65 C112,38.490332 90.509668,17 64,17 C37.490332,17 16,38.490332 16,65 C16,91.509668 37.490332,113 64,113 Z\"></path>\r\n </g>\r\n</svg>"
},
"$:/core/images/chevron-down": {
"title": "$:/core/images/chevron-down",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-chevron-down tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\r\n\t<g fill-rule=\"evenodd\" transform=\"translate(64.000000, 40.500000) rotate(-270.000000) translate(-64.000000, -40.500000) translate(-22.500000, -26.500000)\">\r\n <path d=\"M112.743107,112.12741 C111.310627,113.561013 109.331747,114.449239 107.145951,114.449239 L27.9777917,114.449239 C23.6126002,114.449239 20.0618714,110.904826 20.0618714,106.532572 C20.0618714,102.169214 23.6059497,98.6159054 27.9777917,98.6159054 L99.2285381,98.6159054 L99.2285381,27.365159 C99.2285381,22.9999675 102.77295,19.4492387 107.145205,19.4492387 C111.508562,19.4492387 115.061871,22.993317 115.061871,27.365159 L115.061871,106.533318 C115.061871,108.71579 114.175869,110.694669 112.743378,112.127981 Z\" transform=\"translate(67.561871, 66.949239) rotate(-45.000000) translate(-67.561871, -66.949239) \"></path>\r\n <path d=\"M151.35638,112.12741 C149.923899,113.561013 147.94502,114.449239 145.759224,114.449239 L66.5910645,114.449239 C62.225873,114.449239 58.6751442,110.904826 58.6751442,106.532572 C58.6751442,102.169214 62.2192225,98.6159054 66.5910645,98.6159054 L137.841811,98.6159054 L137.841811,27.365159 C137.841811,22.9999675 141.386223,19.4492387 145.758478,19.4492387 C150.121835,19.4492387 153.675144,22.993317 153.675144,27.365159 L153.675144,106.533318 C153.675144,108.71579 152.789142,110.694669 151.356651,112.127981 Z\" transform=\"translate(106.175144, 66.949239) rotate(-45.000000) translate(-106.175144, -66.949239) \"></path>\r\n\t</g>\r\n</svg>"
},
"$:/core/images/chevron-left": {
"title": "$:/core/images/chevron-left",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-chevron-left tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\" version=\"1.1\">\r\n <g fill-rule=\"evenodd\" transform=\"translate(92.500000, 64.000000) rotate(-180.000000) translate(-92.500000, -64.000000) translate(6.000000, -3.000000)\">\r\n <path d=\"M112.743107,112.12741 C111.310627,113.561013 109.331747,114.449239 107.145951,114.449239 L27.9777917,114.449239 C23.6126002,114.449239 20.0618714,110.904826 20.0618714,106.532572 C20.0618714,102.169214 23.6059497,98.6159054 27.9777917,98.6159054 L99.2285381,98.6159054 L99.2285381,27.365159 C99.2285381,22.9999675 102.77295,19.4492387 107.145205,19.4492387 C111.508562,19.4492387 115.061871,22.993317 115.061871,27.365159 L115.061871,106.533318 C115.061871,108.71579 114.175869,110.694669 112.743378,112.127981 Z\" transform=\"translate(67.561871, 66.949239) rotate(-45.000000) translate(-67.561871, -66.949239) \"></path>\r\n <path d=\"M151.35638,112.12741 C149.923899,113.561013 147.94502,114.449239 145.759224,114.449239 L66.5910645,114.449239 C62.225873,114.449239 58.6751442,110.904826 58.6751442,106.532572 C58.6751442,102.169214 62.2192225,98.6159054 66.5910645,98.6159054 L137.841811,98.6159054 L137.841811,27.365159 C137.841811,22.9999675 141.386223,19.4492387 145.758478,19.4492387 C150.121835,19.4492387 153.675144,22.993317 153.675144,27.365159 L153.675144,106.533318 C153.675144,108.71579 152.789142,110.694669 151.356651,112.127981 Z\" transform=\"translate(106.175144, 66.949239) rotate(-45.000000) translate(-106.175144, -66.949239) \"></path>\r\n </g>\r\n</svg>"
},
"$:/core/images/chevron-right": {
"title": "$:/core/images/chevron-right",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-chevron-right tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\r\n <g fill-rule=\"evenodd\" transform=\"translate(-48.000000, -3.000000)\">\r\n <path d=\"M112.743107,112.12741 C111.310627,113.561013 109.331747,114.449239 107.145951,114.449239 L27.9777917,114.449239 C23.6126002,114.449239 20.0618714,110.904826 20.0618714,106.532572 C20.0618714,102.169214 23.6059497,98.6159054 27.9777917,98.6159054 L99.2285381,98.6159054 L99.2285381,27.365159 C99.2285381,22.9999675 102.77295,19.4492387 107.145205,19.4492387 C111.508562,19.4492387 115.061871,22.993317 115.061871,27.365159 L115.061871,106.533318 C115.061871,108.71579 114.175869,110.694669 112.743378,112.127981 Z\" transform=\"translate(67.561871, 66.949239) rotate(-45.000000) translate(-67.561871, -66.949239) \"></path>\r\n <path d=\"M151.35638,112.12741 C149.923899,113.561013 147.94502,114.449239 145.759224,114.449239 L66.5910645,114.449239 C62.225873,114.449239 58.6751442,110.904826 58.6751442,106.532572 C58.6751442,102.169214 62.2192225,98.6159054 66.5910645,98.6159054 L137.841811,98.6159054 L137.841811,27.365159 C137.841811,22.9999675 141.386223,19.4492387 145.758478,19.4492387 C150.121835,19.4492387 153.675144,22.993317 153.675144,27.365159 L153.675144,106.533318 C153.675144,108.71579 152.789142,110.694669 151.356651,112.127981 Z\" transform=\"translate(106.175144, 66.949239) rotate(-45.000000) translate(-106.175144, -66.949239) \"></path>\r\n </g>\r\n</svg>"
},
"$:/core/images/chevron-up": {
"title": "$:/core/images/chevron-up",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-chevron-up tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\r\n\t<g fill-rule=\"evenodd\" transform=\"translate(64.000000, 89.500000) rotate(-90.000000) translate(-64.000000, -89.500000) translate(-22.500000, 22.500000)\">\r\n <path d=\"M112.743107,112.12741 C111.310627,113.561013 109.331747,114.449239 107.145951,114.449239 L27.9777917,114.449239 C23.6126002,114.449239 20.0618714,110.904826 20.0618714,106.532572 C20.0618714,102.169214 23.6059497,98.6159054 27.9777917,98.6159054 L99.2285381,98.6159054 L99.2285381,27.365159 C99.2285381,22.9999675 102.77295,19.4492387 107.145205,19.4492387 C111.508562,19.4492387 115.061871,22.993317 115.061871,27.365159 L115.061871,106.533318 C115.061871,108.71579 114.175869,110.694669 112.743378,112.127981 Z\" transform=\"translate(67.561871, 66.949239) rotate(-45.000000) translate(-67.561871, -66.949239) \"></path>\r\n <path d=\"M151.35638,112.12741 C149.923899,113.561013 147.94502,114.449239 145.759224,114.449239 L66.5910645,114.449239 C62.225873,114.449239 58.6751442,110.904826 58.6751442,106.532572 C58.6751442,102.169214 62.2192225,98.6159054 66.5910645,98.6159054 L137.841811,98.6159054 L137.841811,27.365159 C137.841811,22.9999675 141.386223,19.4492387 145.758478,19.4492387 C150.121835,19.4492387 153.675144,22.993317 153.675144,27.365159 L153.675144,106.533318 C153.675144,108.71579 152.789142,110.694669 151.356651,112.127981 Z\" transform=\"translate(106.175144, 66.949239) rotate(-45.000000) translate(-106.175144, -66.949239) \"></path>\r\n\t</g>\r\n</svg>"
},
"$:/core/images/clone-button": {
"title": "$:/core/images/clone-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-clone-button tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\r\n <g fill-rule=\"evenodd\">\r\n <path d=\"M32.2650915,96 L32.2650915,120.002359 C32.2650915,124.419334 35.8432884,128 40.2627323,128 L120.002359,128 C124.419334,128 128,124.421803 128,120.002359 L128,40.2627323 C128,35.8457573 124.421803,32.2650915 120.002359,32.2650915 L96,32.2650915 L96,48 L108.858899,48 C110.519357,48 111.853018,49.3405131 111.853018,50.9941198 L111.853018,108.858899 C111.853018,110.519357 110.512505,111.853018 108.858899,111.853018 L50.9941198,111.853018 C49.333661,111.853018 48,110.512505 48,108.858899 L48,96 L32.2650915,96 Z\"></path>\r\n <path d=\"M40,56 L32.0070969,56 C27.5881712,56 24,52.418278 24,48 C24,43.5907123 27.5848994,40 32.0070969,40 L40,40 L40,32.0070969 C40,27.5881712 43.581722,24 48,24 C52.4092877,24 56,27.5848994 56,32.0070969 L56,40 L63.9929031,40 C68.4118288,40 72,43.581722 72,48 C72,52.4092877 68.4151006,56 63.9929031,56 L56,56 L56,63.9929031 C56,68.4118288 52.418278,72 48,72 C43.5907123,72 40,68.4151006 40,63.9929031 L40,56 Z M7.9992458,0 C3.58138434,0 0,3.5881049 0,7.9992458 L0,88.0007542 C0,92.4186157 3.5881049,96 7.9992458,96 L88.0007542,96 C92.4186157,96 96,92.4118951 96,88.0007542 L96,7.9992458 C96,3.58138434 92.4118951,0 88.0007542,0 L7.9992458,0 Z M19.0010118,16 C17.3435988,16 16,17.336731 16,19.0010118 L16,76.9989882 C16,78.6564012 17.336731,80 19.0010118,80 L76.9989882,80 C78.6564012,80 80,78.663269 80,76.9989882 L80,19.0010118 C80,17.3435988 78.663269,16 76.9989882,16 L19.0010118,16 Z\"></path>\r\n </g>\r\n</svg>"
},
"$:/core/images/close-all-button": {
"title": "$:/core/images/close-all-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-close-all-button tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\r\n <g fill-rule=\"evenodd\" transform=\"translate(-23.000000, -23.000000)\">\r\n <path d=\"M43,131 L22.9976794,131 C18.5827987,131 15,127.418278 15,123 C15,118.590712 18.5806831,115 22.9976794,115 L43,115 L43,94.9976794 C43,90.5827987 46.581722,87 51,87 C55.4092877,87 59,90.5806831 59,94.9976794 L59,115 L79.0023206,115 C83.4172013,115 87,118.581722 87,123 C87,127.409288 83.4193169,131 79.0023206,131 L59,131 L59,151.002321 C59,155.417201 55.418278,159 51,159 C46.5907123,159 43,155.419317 43,151.002321 L43,131 Z\" transform=\"translate(51.000000, 123.000000) rotate(-45.000000) translate(-51.000000, -123.000000) \"></path>\r\n <path d=\"M43,59 L22.9976794,59 C18.5827987,59 15,55.418278 15,51 C15,46.5907123 18.5806831,43 22.9976794,43 L43,43 L43,22.9976794 C43,18.5827987 46.581722,15 51,15 C55.4092877,15 59,18.5806831 59,22.9976794 L59,43 L79.0023206,43 C83.4172013,43 87,46.581722 87,51 C87,55.4092877 83.4193169,59 79.0023206,59 L59,59 L59,79.0023206 C59,83.4172013 55.418278,87 51,87 C46.5907123,87 43,83.4193169 43,79.0023206 L43,59 Z\" transform=\"translate(51.000000, 51.000000) rotate(-45.000000) translate(-51.000000, -51.000000) \"></path>\r\n <path d=\"M115,59 L94.9976794,59 C90.5827987,59 87,55.418278 87,51 C87,46.5907123 90.5806831,43 94.9976794,43 L115,43 L115,22.9976794 C115,18.5827987 118.581722,15 123,15 C127.409288,15 131,18.5806831 131,22.9976794 L131,43 L151.002321,43 C155.417201,43 159,46.581722 159,51 C159,55.4092877 155.419317,59 151.002321,59 L131,59 L131,79.0023206 C131,83.4172013 127.418278,87 123,87 C118.590712,87 115,83.4193169 115,79.0023206 L115,59 Z\" transform=\"translate(123.000000, 51.000000) rotate(-45.000000) translate(-123.000000, -51.000000) \"></path>\r\n <path d=\"M115,131 L94.9976794,131 C90.5827987,131 87,127.418278 87,123 C87,118.590712 90.5806831,115 94.9976794,115 L115,115 L115,94.9976794 C115,90.5827987 118.581722,87 123,87 C127.409288,87 131,90.5806831 131,94.9976794 L131,115 L151.002321,115 C155.417201,115 159,118.581722 159,123 C159,127.409288 155.419317,131 151.002321,131 L131,131 L131,151.002321 C131,155.417201 127.418278,159 123,159 C118.590712,159 115,155.419317 115,151.002321 L115,131 Z\" transform=\"translate(123.000000, 123.000000) rotate(-45.000000) translate(-123.000000, -123.000000) \"></path>\r\n </g>\r\n</svg>"
},
"$:/core/images/close-button": {
"title": "$:/core/images/close-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-close-button tc-image-button\" viewBox=\"0 0 128 128\" width=\"22pt\" height=\"22pt\">\r\n <g fill-rule=\"evenodd\">\r\n <path d=\"M65.0864256,75.4091629 L14.9727349,125.522854 C11.8515951,128.643993 6.78104858,128.64922 3.65685425,125.525026 C0.539017023,122.407189 0.5336324,117.334539 3.65902635,114.209145 L53.7727171,64.0954544 L3.65902635,13.9817637 C0.537886594,10.8606239 0.532659916,5.79007744 3.65685425,2.6658831 C6.77469148,-0.451954124 11.8473409,-0.457338747 14.9727349,2.66805521 L65.0864256,52.7817459 L115.200116,2.66805521 C118.321256,-0.453084553 123.391803,-0.458311231 126.515997,2.6658831 C129.633834,5.78372033 129.639219,10.8563698 126.513825,13.9817637 L76.4001341,64.0954544 L126.513825,114.209145 C129.634965,117.330285 129.640191,122.400831 126.515997,125.525026 C123.39816,128.642863 118.32551,128.648248 115.200116,125.522854 L65.0864256,75.4091629 L65.0864256,75.4091629 Z\"></path>\r\n </g>\r\n</svg>\r\n"
},
"$:/core/images/close-others-button": {
"title": "$:/core/images/close-others-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-close-others-button tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 127\">\r\n <g fill-rule=\"evenodd\">\r\n <path d=\"M64,128 C99.346224,128 128,99.346224 128,64 C128,28.653776 99.346224,0 64,0 C28.653776,0 0,28.653776 0,64 C0,99.346224 28.653776,128 64,128 Z M64,112 C90.509668,112 112,90.509668 112,64 C112,37.490332 90.509668,16 64,16 C37.490332,16 16,37.490332 16,64 C16,90.509668 37.490332,112 64,112 Z M64,96 C81.673112,96 96,81.673112 96,64 C96,46.326888 81.673112,32 64,32 C46.326888,32 32,46.326888 32,64 C32,81.673112 46.326888,96 64,96 Z M64,80 C72.836556,80 80,72.836556 80,64 C80,55.163444 72.836556,48 64,48 C55.163444,48 48,55.163444 48,64 C48,72.836556 55.163444,80 64,80 Z\"></path>\r\n </g>\r\n</svg>"
},
"$:/core/images/delete-button": {
"title": "$:/core/images/delete-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-delete-button tc-image-button\" viewBox=\"0 0 128 128\" width=\"22pt\" height=\"22pt\">\r\n <g fill-rule=\"evenodd\" transform=\"translate(12.000000, 0.000000)\">\r\n <rect x=\"0\" y=\"11\" width=\"105\" height=\"16\" rx=\"8\"></rect>\r\n <rect x=\"28\" y=\"0\" width=\"48\" height=\"16\" rx=\"8\"></rect>\r\n <rect x=\"8\" y=\"16\" width=\"16\" height=\"112\" rx=\"8\"></rect>\r\n <rect x=\"8\" y=\"112\" width=\"88\" height=\"16\" rx=\"8\"></rect>\r\n <rect x=\"80\" y=\"16\" width=\"16\" height=\"112\" rx=\"8\"></rect>\r\n <rect x=\"56\" y=\"16\" width=\"16\" height=\"112\" rx=\"8\"></rect>\r\n <rect x=\"32\" y=\"16\" width=\"16\" height=\"112\" rx=\"8\"></rect>\r\n </g>\r\n</svg>\r\n"
},
"$:/core/images/done-button": {
"title": "$:/core/images/done-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-done-button tc-image-button\" viewBox=\"0 0 128 128\" width=\"22pt\" height=\"22pt\">\r\n <g fill-rule=\"evenodd\">\r\n <path d=\"M3.52445141,76.8322939 C2.07397484,75.3828178 1.17514421,73.3795385 1.17514421,71.1666288 L1.17514421,23.1836596 C1.17514421,18.7531992 4.75686621,15.1751442 9.17514421,15.1751442 C13.5844319,15.1751442 17.1751442,18.7606787 17.1751442,23.1836596 L17.1751442,63.1751442 L119.173716,63.1751442 C123.590457,63.1751442 127.175144,66.7568662 127.175144,71.1751442 C127.175144,75.5844319 123.592783,79.1751442 119.173716,79.1751442 L9.17657227,79.1751442 C6.96796403,79.1751442 4.9674142,78.279521 3.51911285,76.8315312 Z\" id=\"Rectangle-285\" transform=\"translate(64.175144, 47.175144) rotate(-45.000000) translate(-64.175144, -47.175144) \"></path>\r\n </g>\r\n</svg>\r\n"
},
"$:/core/images/down-arrow": {
"title": "$:/core/images/down-arrow",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-down-arrow tc-image-button\" viewBox=\"0 0 128 128\" width=\"22pt\" height=\"22pt\">\r\n <path d=\"M109.35638,81.3533152 C107.923899,82.7869182 105.94502,83.6751442 103.759224,83.6751442 L24.5910645,83.6751442 C20.225873,83.6751442 16.6751442,80.1307318 16.6751442,75.7584775 C16.6751442,71.3951199 20.2192225,67.8418109 24.5910645,67.8418109 L95.8418109,67.8418109 L95.8418109,-3.40893546 C95.8418109,-7.77412698 99.3862233,-11.3248558 103.758478,-11.3248558 C108.121835,-11.3248558 111.675144,-7.78077754 111.675144,-3.40893546 L111.675144,75.7592239 C111.675144,77.9416955 110.789142,79.9205745 109.356651,81.3538862 Z\" transform=\"translate(64.175144, 36.175144) rotate(45.000000) translate(-64.175144, -36.175144) \"></path>\r\n</svg>\r\n"
},
"$:/core/images/download-button": {
"title": "$:/core/images/download-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-download-button tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 129 128\"><g fill-rule=\"evenodd\"><path class=\"tc-image-download-button-ring\" d=\"M64,128 C99.346224,128 128,99.346224 128,64 C128,28.653776 99.346224,0 64,0 C28.653776,0 0,28.653776 0,64 C0,99.346224 28.653776,128 64,128 Z M64,112 C90.509668,112 112,90.509668 112,64 C112,37.490332 90.509668,16 64,16 C37.490332,16 16,37.490332 16,64 C16,90.509668 37.490332,112 64,112 Z\"/><path d=\"M34.3496823,66.4308767 L61.2415823,93.634668 C63.0411536,95.4551107 65.9588502,95.4551107 67.7584215,93.634668 L94.6503215,66.4308767 C96.4498928,64.610434 96.4498928,61.6588981 94.6503215,59.8384554 C93.7861334,58.9642445 92.6140473,58.4731195 91.3919019,58.4731195 L82.9324098,58.4731195 C80.3874318,58.4731195 78.3243078,56.3860674 78.3243078,53.8115729 L78.3243078,38.6615466 C78.3243078,36.0870521 76.2611837,34 73.7162058,34 L55.283798,34 C52.7388201,34 50.675696,36.0870521 50.675696,38.6615466 L50.675696,38.6615466 L50.675696,53.8115729 C50.675696,56.3860674 48.612572,58.4731195 46.0675941,58.4731195 L37.608102,58.4731195 C35.063124,58.4731195 33,60.5601716 33,63.134666 C33,64.3709859 33.4854943,65.5566658 34.3496823,66.4308767 L34.3496823,66.4308767 Z\"/></g></svg>"
},
"$:/core/images/edit-button": {
"title": "$:/core/images/edit-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-edit-button tc-image-button\" viewBox=\"0 0 128 128\" width=\"22pt\" height=\"22pt\">\r\n <g fill-rule=\"evenodd\">\r\n <path d=\"M116.870058,45.3431458 L108.870058,45.3431458 L108.870058,45.3431458 L108.870058,61.3431458 L116.870058,61.3431458 L116.870058,45.3431458 Z M124.870058,45.3431458 L127.649881,45.3431458 C132.066101,45.3431458 135.656854,48.9248678 135.656854,53.3431458 C135.656854,57.7524334 132.07201,61.3431458 127.649881,61.3431458 L124.870058,61.3431458 L124.870058,45.3431458 Z M100.870058,45.3431458 L15.6638275,45.3431458 C15.5064377,45.3431458 15.3501085,45.3476943 15.1949638,45.3566664 L15.1949638,45.3566664 C15.0628002,45.3477039 14.928279,45.3431458 14.7913977,45.3431458 C6.68160973,45.3431458 -8.34314575,53.3431458 -8.34314575,53.3431458 C-8.34314575,53.3431458 6.85614548,61.3431458 14.7913977,61.3431458 C14.9266533,61.3431458 15.0596543,61.3384973 15.190398,61.3293588 C15.3470529,61.3385075 15.5049057,61.3431458 15.6638275,61.3431458 L100.870058,61.3431458 L100.870058,45.3431458 L100.870058,45.3431458 Z\" transform=\"translate(63.656854, 53.343146) rotate(-45.000000) translate(-63.656854, -53.343146) \"></path>\r\n <path d=\"M35.1714596,124.189544 C41.9594858,123.613403 49.068777,121.917633 58.85987,118.842282 C60.6854386,118.268877 62.4306907,117.705515 65.1957709,116.802278 C81.1962861,111.575575 87.0734839,109.994907 93.9414474,109.655721 C102.29855,109.242993 107.795169,111.785371 111.520478,118.355045 C112.610163,120.276732 115.051363,120.951203 116.97305,119.861518 C118.894737,118.771832 119.569207,116.330633 118.479522,114.408946 C113.146151,105.003414 104.734907,101.112919 93.5468356,101.66546 C85.6716631,102.054388 79.4899908,103.716944 62.7116783,109.197722 C59.9734132,110.092199 58.2519873,110.64787 56.4625698,111.20992 C37.002649,117.322218 25.6914684,118.282267 16.8654804,112.957098 C14.9739614,111.815848 12.5154166,112.424061 11.3741667,114.31558 C10.2329168,116.207099 10.84113,118.665644 12.7326489,119.806894 C19.0655164,123.627836 26.4866335,124.926678 35.1714596,124.189544 Z\"></path>\r\n </g>\r\n</svg>\r\n"
},
"$:/core/images/export-button": {
"title": "$:/core/images/export-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-export-button tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\r\n <g fill-rule=\"evenodd\">\r\n <path d=\"M8.00348646,127.999999 C8.00464867,128 8.00581094,128 8.00697327,128 L119.993027,128 C122.205254,128 124.207939,127.101378 125.657096,125.651198 L125.656838,125.65759 C127.104563,124.210109 128,122.21009 128,119.999949 L128,56.0000511 C128,51.5817449 124.409288,48 120,48 C115.581722,48 112,51.5797863 112,56.0000511 L112,112 L16,112 L16,56.0000511 C16,51.5817449 12.4092877,48 8,48 C3.581722,48 7.10542736e-15,51.5797863 7.10542736e-15,56.0000511 L7.10542736e-15,119.999949 C7.10542736e-15,124.418255 3.59071231,128 8,128 C8.00116233,128 8.0023246,128 8.00348681,127.999999 Z M56.6235633,27.3113724 L47.6580188,36.2769169 C44.5333664,39.4015692 39.4634864,39.4061295 36.339292,36.2819351 C33.2214548,33.1640979 33.2173444,28.0901742 36.3443103,24.9632084 L58.9616908,2.34582788 C60.5248533,0.782665335 62.5748436,0.000361191261 64.624516,2.38225238e-14 L64.6193616,0.00151809229 C66.6695374,0.000796251595 68.7211167,0.781508799 70.2854358,2.34582788 L92.9028163,24.9632084 C96.0274686,28.0878607 96.0320289,33.1577408 92.9078345,36.2819351 C89.7899973,39.3997724 84.7160736,39.4038827 81.5891078,36.2769169 L72.6235633,27.3113724 L72.6235633,88.5669606 C72.6235633,92.9781015 69.0418413,96.5662064 64.6235633,96.5662064 C60.2142756,96.5662064 56.6235633,92.984822 56.6235633,88.5669606 L56.6235633,27.3113724 L56.6235633,27.3113724 Z\"></path>\r\n </g>\r\n</svg>\r\n"
},
"$:/core/images/full-screen-button": {
"title": "$:/core/images/full-screen-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-full-screen-button tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\r\n <g>\r\n <g>\r\n <path d=\"M5.29777586e-31,8 C1.59060409e-15,3.581722 3.581722,0 8,0 L40,0 C44.418278,0 48,3.581722 48,8 C48,12.418278 44.418278,16 40,16 L16,16 L16,40 C16,44.418278 12.418278,48 8,48 C3.581722,48 -3.55271368e-15,44.418278 0,40 L3.55271368e-15,8 Z\"></path>\r\n </g>\r\n <g transform=\"translate(104.000000, 104.000000) rotate(-180.000000) translate(-104.000000, -104.000000) translate(80.000000, 80.000000)\">\r\n <path d=\"M5.29777586e-31,8 C1.59060409e-15,3.581722 3.581722,0 8,0 L40,0 C44.418278,0 48,3.581722 48,8 C48,12.418278 44.418278,16 40,16 L16,16 L16,40 C16,44.418278 12.418278,48 8,48 C3.581722,48 -3.55271368e-15,44.418278 0,40 L3.55271368e-15,8 Z\"></path>\r\n </g>\r\n <g transform=\"translate(24.000000, 104.000000) rotate(-90.000000) translate(-24.000000, -104.000000) translate(0.000000, 80.000000)\">\r\n <path d=\"M5.29777586e-31,8 C1.59060409e-15,3.581722 3.581722,0 8,0 L40,0 C44.418278,0 48,3.581722 48,8 C48,12.418278 44.418278,16 40,16 L16,16 L16,40 C16,44.418278 12.418278,48 8,48 C3.581722,48 -3.55271368e-15,44.418278 0,40 L3.55271368e-15,8 Z\"></path>\r\n </g>\r\n <g transform=\"translate(104.000000, 24.000000) rotate(90.000000) translate(-104.000000, -24.000000) translate(80.000000, 0.000000)\">\r\n <path d=\"M5.29777586e-31,8 C1.59060409e-15,3.581722 3.581722,0 8,0 L40,0 C44.418278,0 48,3.581722 48,8 C48,12.418278 44.418278,16 40,16 L16,16 L16,40 C16,44.418278 12.418278,48 8,48 C3.581722,48 -3.55271368e-15,44.418278 0,40 L3.55271368e-15,8 Z\"></path>\r\n </g>\r\n </g>\r\n</svg>"
},
"$:/core/images/globe": {
"title": "$:/core/images/globe",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-globe tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\r\n <g fill-rule=\"evenodd\">\r\n <path d=\"M72.8111354,37.1275855 C72.8111354,37.9789875 72.8111354,38.8303894 72.8111354,39.6817913 C72.8111354,41.8784743 73.7885604,46.5631866 72.8111354,48.5143758 C71.3445471,51.4420595 68.1617327,52.0543531 66.4170946,54.3812641 C65.2352215,55.9575873 61.7987417,64.9821523 62.7262858,67.3005778 C66.6959269,77.2228204 74.26087,70.4881886 80.6887657,76.594328 C81.5527211,77.415037 83.5758191,78.8666631 83.985137,79.8899578 C87.2742852,88.1128283 76.4086873,94.8989524 87.7419325,106.189751 C88.9872885,107.430443 91.555495,102.372895 91.8205061,101.575869 C92.6726866,99.0129203 98.5458765,96.1267309 100.908882,94.5234439 C102.928056,93.1534443 105.782168,91.8557166 107.236936,89.7775886 C109.507391,86.5342557 108.717505,82.2640435 110.334606,79.0328716 C112.473794,74.7585014 114.163418,69.3979002 116.332726,65.0674086 C120.230862,57.2857361 121.054075,67.1596684 121.400359,67.5059523 C121.757734,67.8633269 122.411167,67.5059523 122.916571,67.5059523 C123.011132,67.5059523 124.364019,67.6048489 124.432783,67.5059523 C125.0832,66.5705216 123.390209,49.5852316 123.114531,48.2089091 C121.710578,41.1996597 116.17083,32.4278331 111.249523,27.7092761 C104.975994,21.6942076 104.160516,11.5121686 92.9912146,12.7547535 C92.7872931,12.7774397 87.906794,22.9027026 85.2136766,26.2672064 C81.486311,30.9237934 82.7434931,22.1144904 78.6876623,22.1144904 C78.6065806,22.1144904 77.5045497,22.0107615 77.4353971,22.1144904 C76.8488637,22.9942905 75.9952305,26.0101404 75.1288269,26.5311533 C74.8635477,26.6906793 73.4071369,26.2924966 73.2826811,26.5311533 C71.0401728,30.8313939 81.5394677,28.7427264 79.075427,34.482926 C76.7225098,39.9642538 72.747373,32.4860199 72.747373,43.0434079\"></path>\r\n <path d=\"M44.4668556,7.01044608 C54.151517,13.1403033 45.1489715,19.2084878 47.1611905,23.2253896 C48.8157833,26.5283781 51.4021933,28.6198851 48.8753629,33.038878 C46.8123257,36.6467763 42.0052989,37.0050492 39.251679,39.7621111 C36.2115749,42.8060154 33.7884281,48.7028116 32.4624592,52.6732691 C30.8452419,57.5158356 47.0088721,59.5388126 44.5246867,63.6811917 C43.1386839,65.9923513 37.7785192,65.1466282 36.0880227,63.8791519 C34.9234453,63.0059918 32.4946425,63.3331166 31.6713597,62.0997342 C29.0575851,58.1839669 29.4107339,54.0758543 28.0457962,49.9707786 C27.1076833,47.1493864 21.732611,47.8501656 20.2022714,49.3776393 C19.6790362,49.8998948 19.8723378,51.1703278 19.8723378,51.8829111 C19.8723378,57.1682405 26.9914913,55.1986414 26.9914913,58.3421973 C26.9914913,72.9792302 30.9191897,64.8771867 38.1313873,69.6793121 C48.1678018,76.3618966 45.9763926,76.981595 53.0777543,84.0829567 C56.7511941,87.7563965 60.8192437,87.7689005 62.503478,93.3767069 C64.1046972,98.7081071 53.1759798,98.7157031 50.786754,100.825053 C49.663965,101.816317 47.9736094,104.970571 46.5680513,105.439676 C44.7757187,106.037867 43.334221,105.93607 41.6242359,107.219093 C39.1967302,109.040481 37.7241465,112.151588 37.6034934,112.030935 C35.4555278,109.88297 34.0848666,96.5511248 33.7147244,93.7726273 C33.1258872,89.3524817 28.1241923,88.2337027 26.7275443,84.7420826 C25.1572737,80.8164061 28.2518481,75.223612 25.599097,70.9819941 C19.0797019,60.557804 13.7775712,56.4811506 10.2493953,44.6896152 C9.3074899,41.5416683 13.5912267,38.1609942 15.1264825,35.8570308 C17.0029359,33.0410312 17.7876232,30.0028946 19.8723378,27.2224065 C22.146793,24.1888519 40.8551166,9.46076832 43.8574051,8.63490613 L44.4668556,7.01044608 Z\"></path>\r\n <path d=\"M64,126 C98.2416545,126 126,98.2416545 126,64 C126,29.7583455 98.2416545,2 64,2 C29.7583455,2 2,29.7583455 2,64 C2,98.2416545 29.7583455,126 64,126 Z M64,120 C94.927946,120 120,94.927946 120,64 C120,33.072054 94.927946,8 64,8 C33.072054,8 8,33.072054 8,64 C8,94.927946 33.072054,120 64,120 Z\"></path>\r\n </g>\r\n</svg>"
},
"$:/core/images/home-button": {
"title": "$:/core/images/home-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-home-button tc-image-button\" viewBox=\"0 0 128 128\" width=\"22pt\" height=\"22pt\">\r\n <g fill-rule=\"evenodd\">\r\n <path d=\"M112.9847,119.501583 C112.99485,119.336814 113,119.170705 113,119.003406 L113,67.56802 C116.137461,70.5156358 121.076014,70.4518569 124.133985,67.3938855 C127.25818,64.2696912 127.260618,59.2068102 124.131541,56.0777326 L70.3963143,2.34250601 C68.8331348,0.779326498 66.7828947,-0.000743167069 64.7337457,1.61675364e-05 C62.691312,-0.00409949529 60.6426632,0.777559815 59.077717,2.34250601 L33,28.420223 L33,28.420223 L33,8.00697327 C33,3.58484404 29.4092877,0 25,0 C20.581722,0 17,3.59075293 17,8.00697327 L17,44.420223 L5.3424904,56.0777326 C2.21694607,59.2032769 2.22220878,64.2760483 5.34004601,67.3938855 C8.46424034,70.5180798 13.5271213,70.5205187 16.6561989,67.3914411 L17,67.04764 L17,119.993027 C17,119.994189 17.0000002,119.995351 17.0000007,119.996514 C17.0000002,119.997675 17,119.998838 17,120 C17,124.418278 20.5881049,128 24.9992458,128 L105.000754,128 C109.418616,128 113,124.409288 113,120 C113,119.832611 112.99485,119.666422 112.9847,119.501583 Z M97,112 L97,51.5736087 L97,51.5736087 L64.7370156,19.3106244 L33,51.04764 L33,112 L97,112 Z\"></path>\r\n </g>\r\n</svg>\r\n"
},
"$:/core/images/import-button": {
"title": "$:/core/images/import-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-import-button tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\r\n <g fill-rule=\"evenodd\">\r\n <path d=\"M105.449437,94.2138951 C105.449437,94.2138951 110.049457,94.1897106 110.049457,99.4026111 C110.049457,104.615512 105.163246,104.615511 105.163246,104.615511 L45.0075072,105.157833 C45.0075072,105.157833 0.367531803,106.289842 0.367532368,66.6449212 C0.367532934,27.0000003 45.0428249,27.0000003 45.0428249,27.0000003 L105.532495,27.0000003 C105.532495,27.0000003 138.996741,25.6734987 138.996741,55.1771866 C138.996741,84.6808745 105.727102,82.8457535 105.727102,82.8457535 L56.1735087,82.8457535 C56.1735087,82.8457535 22.6899229,85.1500223 22.6899229,66.0913753 C22.6899229,47.0327282 56.1735087,49.3383013 56.1735087,49.3383013 L105.727102,49.3383013 C105.727102,49.3383013 111.245209,49.3383024 111.245209,54.8231115 C111.245209,60.3079206 105.727102,60.5074524 105.727102,60.5074524 L56.1735087,60.5074524 C56.1735087,60.5074524 37.48913,60.5074528 37.48913,66.6449195 C37.48913,72.7823862 56.1735087,71.6766023 56.1735087,71.6766023 L105.727102,71.6766029 C105.727102,71.6766029 127.835546,73.1411469 127.835546,55.1771866 C127.835546,35.5304025 105.727102,38.3035317 105.727102,38.3035317 L45.0428249,38.3035317 C45.0428249,38.3035317 11.5287276,38.3035313 11.5287276,66.6449208 C11.5287276,94.9863103 45.0428244,93.9579678 45.0428244,93.9579678 L105.449437,94.2138951 Z\" transform=\"translate(69.367532, 66.000000) rotate(-45.000000) translate(-69.367532, -66.000000) \"></path>\r\n </g>\r\n</svg>"
},
"$:/core/images/info-button": {
"title": "$:/core/images/info-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-info-button tc-image-button\" viewBox=\"0 0 128 128\" width=\"22pt\" height=\"22pt\">\r\n <g fill-rule=\"evenodd\">\r\n <g transform=\"translate(0.049406, 0.000000)\">\r\n <path d=\"M64,128 C99.346224,128 128,99.346224 128,64 C128,28.653776 99.346224,0 64,0 C28.653776,0 0,28.653776 0,64 C0,99.346224 28.653776,128 64,128 Z M64,112 C90.509668,112 112,90.509668 112,64 C112,37.490332 90.509668,16 64,16 C37.490332,16 16,37.490332 16,64 C16,90.509668 37.490332,112 64,112 Z\"></path>\r\n <circle cx=\"64\" cy=\"32\" r=\"8\"></circle>\r\n <rect x=\"56\" y=\"48\" width=\"16\" height=\"56\" rx=\"8\"></rect>\r\n </g>\r\n </g>\r\n </g>\r\n</svg>\r\n"
},
"$:/core/images/locked-padlock": {
"title": "$:/core/images/locked-padlock",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-locked-padlock tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\r\n <g fill-rule=\"evenodd\">\r\n <path d=\"M96.4723753,64 L105,64 L105,96.0097716 C105,113.673909 90.6736461,128 73.001193,128 L55.998807,128 C38.3179793,128 24,113.677487 24,96.0097716 L24,64 L32.0000269,64 C32.0028554,48.2766389 32.3030338,16.2688026 64.1594984,16.2688041 C95.9543927,16.2688056 96.4648869,48.325931 96.4723753,64 Z M80.5749059,64 L48.4413579,64 C48.4426205,47.71306 48.5829272,31.9999996 64.1595001,31.9999996 C79.8437473,31.9999996 81.1369461,48.1359182 80.5749059,64 Z M67.7315279,92.3641717 C70.8232551,91.0923621 73,88.0503841 73,84.5 C73,79.8055796 69.1944204,76 64.5,76 C59.8055796,76 56,79.8055796 56,84.5 C56,87.947435 58.0523387,90.9155206 61.0018621,92.2491029 L55.9067479,115.020857 L72.8008958,115.020857 L67.7315279,92.3641717 L67.7315279,92.3641717 Z\"></path>\r\n </g>\r\n</svg>"
},
"$:/core/images/menu-button": {
"title": "$:/core/images/menu-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-menu-button tc-image-button\" viewBox=\"0 0 128 128\" width=\"22pt\" height=\"22pt\">\r\n <rect x=\"0\" y=\"16\" width=\"128\" height=\"16\" rx=\"8\"></rect>\r\n <rect x=\"0\" y=\"56\" width=\"128\" height=\"16\" rx=\"8\"></rect>\r\n <rect x=\"0\" y=\"96\" width=\"128\" height=\"16\" rx=\"8\"></rect>\r\n</svg>\r\n"
},
"$:/core/images/new-button": {
"title": "$:/core/images/new-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-new-button tc-image-button\" viewBox=\"0 0 128 128\" width=\"22pt\" height=\"22pt\">\r\n <g fill-rule=\"evenodd\">\r\n <path d=\"M56,72 L8.00697327,72 C3.59075293,72 0,68.418278 0,64 C0,59.5907123 3.58484404,56 8.00697327,56 L56,56 L56,8.00697327 C56,3.59075293 59.581722,0 64,0 C68.4092877,0 72,3.58484404 72,8.00697327 L72,56 L119.993027,56 C124.409247,56 128,59.581722 128,64 C128,68.4092877 124.415156,72 119.993027,72 L72,72 L72,119.993027 C72,124.409247 68.418278,128 64,128 C59.5907123,128 56,124.415156 56,119.993027 L56,72 L56,72 Z\"></path>\r\n </g>\r\n</svg>\r\n"
},
"$:/core/images/new-here-button": {
"title": "$:/core/images/new-here-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-new-here-button tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\r\n <g fill-rule=\"evenodd\">\r\n \t<g transform=\"translate(52.233611, 64.389922) rotate(75.000000) translate(-52.233611, -64.389922) translate(-7.734417, 3.702450)\">\r\n\t <path d=\"M18.9270186,45.959338 L18.9080585,49.6521741 C18.8884833,53.4648378 21.0574548,58.7482162 23.7526408,61.4434022 L78.5671839,116.257945 C81.2617332,118.952495 85.6348701,118.950391 88.3334363,116.251825 L115.863237,88.7220241 C118.555265,86.0299959 118.564544,81.6509578 115.869358,78.9557717 L61.0548144,24.1412286 C58.3602652,21.4466794 53.0787224,19.2788426 49.2595808,19.3006519 L25.9781737,19.4336012 C22.1633003,19.4553862 19.0471195,22.5673232 19.0275223,26.3842526 L18.9871663,34.2443819 C19.0818862,34.255617 19.1779758,34.2665345 19.2754441,34.2771502 C22.6891275,34.6489512 27.0485594,34.2348566 31.513244,33.2285542 C31.7789418,32.8671684 32.075337,32.5211298 32.4024112,32.1940556 C34.8567584,29.7397084 38.3789778,29.0128681 41.4406288,30.0213822 C41.5958829,29.9543375 41.7503946,29.8866669 41.9041198,29.8183808 L42.1110981,30.2733467 C43.1114373,30.6972371 44.0473796,31.3160521 44.8614145,32.1300869 C48.2842088,35.5528813 48.2555691,41.130967 44.7974459,44.5890903 C41.4339531,47.952583 36.0649346,48.0717177 32.6241879,44.9262969 C27.8170558,45.8919233 23.0726921,46.2881596 18.9270186,45.959338 Z\"></path>\r\n\t <path d=\"M45.4903462,38.8768094 C36.7300141,42.6833154 26.099618,44.7997354 18.1909048,43.9383587 C7.2512621,42.7468685 1.50150083,35.8404432 4.66865776,24.7010202 C7.51507386,14.6896965 15.4908218,6.92103848 24.3842626,4.38423012 C34.1310219,1.60401701 42.4070208,6.15882777 42.4070209,16.3101169 L34.5379395,16.310117 C34.5379394,11.9285862 31.728784,10.3825286 26.5666962,11.8549876 C20.2597508,13.6540114 14.3453742,19.4148216 12.2444303,26.8041943 C10.4963869,32.9523565 12.6250796,35.5092726 19.0530263,36.2093718 C25.5557042,36.9176104 35.0513021,34.9907189 42.7038419,31.5913902 L42.7421786,31.6756595 C44.3874154,31.5384763 47.8846101,37.3706354 45.9274416,38.6772897 L45.9302799,38.6835285 C45.9166992,38.6895612 45.9031139,38.6955897 45.8895238,38.7016142 C45.8389288,38.7327898 45.7849056,38.7611034 45.7273406,38.7863919 C45.6506459,38.8200841 45.571574,38.8501593 45.4903462,38.8768094 Z\"></path>\r\n </g>\r\n <rect x=\"96\" y=\"80\" width=\"16\" height=\"48\" rx=\"8\"></rect>\r\n <rect x=\"80\" y=\"96\" width=\"48\" height=\"16\" rx=\"8\"></rect>\r\n </g>\r\n </g>\r\n</svg>\r\n"
},
"$:/core/images/new-journal-button": {
"title": "$:/core/images/new-journal-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-new-journal-button tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\r\n <g fill-rule=\"evenodd\">\r\n <path d=\"M102.545455,112.818182 L102.545455,124.636364 L102.545455,124.636364 L102.545455,124.636364 C102.545455,125.941761 103.630828,127 104.969697,127 L111.030303,127 C112.369172,127 113.454545,125.941761 113.454545,124.636364 L113.454545,112.818182 L125.575758,112.818182 C126.914626,112.818182 128,111.759982 128,110.454545 L128,104.545455 C128,103.240018 126.914626,102.181818 125.575758,102.181818 L113.454545,102.181818 L113.454545,90.3636364 C113.454545,89.0582 112.369172,88 111.030303,88 L104.969697,88 L104.969697,88 C103.630828,88 102.545455,89.0582 102.545455,90.3636364 L102.545455,102.181818 L90.4242424,102.181818 L90.4242424,102.181818 C89.0853705,102.181818 88,103.240018 88,104.545455 L88,110.454545 L88,110.454545 L88,110.454545 C88,111.759982 89.0853705,112.818182 90.4242424,112.818182 L102.545455,112.818182 Z\"></path>\r\n <g transform=\"translate(59.816987, 64.316987) rotate(30.000000) translate(-59.816987, -64.316987) translate(20.316987, 12.816987)\">\r\n <g transform=\"translate(0.000000, 0.000000)\">\r\n <path d=\"M9.99631148,0 C4.4755011,0 -2.27373675e-13,4.48070044 -2.27373675e-13,9.99759461 L-2.27373675e-13,91.6128884 C-2.27373675e-13,97.1344074 4.46966773,101.610483 9.99631148,101.610483 L68.9318917,101.610483 C74.4527021,101.610483 78.9282032,97.1297826 78.9282032,91.6128884 L78.9282032,9.99759461 C78.9282032,4.47607557 74.4585355,0 68.9318917,0 L9.99631148,0 Z M20.8885263,26 C24.2022348,26 26.8885263,23.3137085 26.8885263,20 C26.8885263,16.6862915 24.2022348,14 20.8885263,14 C17.5748178,14 14.8885263,16.6862915 14.8885263,20 C14.8885263,23.3137085 17.5748178,26 20.8885263,26 Z M57.3033321,25.6783342 C60.6170406,25.6783342 63.3033321,22.9920427 63.3033321,19.6783342 C63.3033321,16.3646258 60.6170406,13.6783342 57.3033321,13.6783342 C53.9896236,13.6783342 51.3033321,16.3646258 51.3033321,19.6783342 C51.3033321,22.9920427 53.9896236,25.6783342 57.3033321,25.6783342 Z\"></path>\r\n <text font-family=\"Helvetica\" font-size=\"47.1724138\" font-weight=\"bold\" fill=\"#FFFFFF\">\r\n <tspan x=\"42\" y=\"77.4847912\" text-anchor=\"middle\"><<now \"DD\">></tspan>\r\n </text>\r\n </g>\r\n </g>\r\n </g>\r\n</svg>\r\n"
},
"$:/core/images/options-button": {
"title": "$:/core/images/options-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-options-button tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\r\n <g fill-rule=\"evenodd\">\r\n <path d=\"M110.48779,76.0002544 C109.354214,80.4045063 107.611262,84.5641217 105.354171,88.3838625 L105.354171,88.3838625 L112.07833,95.1080219 C115.20107,98.2307613 115.210098,103.299824 112.089164,106.420759 L106.420504,112.089418 C103.301049,115.208874 98.2346851,115.205502 95.1077675,112.078585 L88.3836082,105.354425 C84.5638673,107.611516 80.4042519,109.354468 76,110.488045 L76,110.488045 L76,119.993281 C76,124.409501 72.4220153,128.000254 68.0083475,128.000254 L59.9916525,128.000254 C55.5800761,128.000254 52,124.41541 52,119.993281 L52,110.488045 C47.5957481,109.354468 43.4361327,107.611516 39.6163918,105.354425 L32.8922325,112.078585 C29.7694931,115.201324 24.7004301,115.210353 21.5794957,112.089418 L15.9108363,106.420759 C12.7913807,103.301303 12.7947522,98.2349395 15.9216697,95.1080219 L22.6458291,88.3838625 C20.3887383,84.5641217 18.6457859,80.4045063 17.5122098,76.0002544 L8.00697327,76.0002544 C3.59075293,76.0002544 2.19088375e-16,72.4222697 4.89347582e-16,68.0086019 L9.80228577e-16,59.9919069 C1.25035972e-15,55.5803305 3.58484404,52.0002544 8.00697327,52.0002544 L17.5122098,52.0002544 C18.6457859,47.5960025 20.3887383,43.4363871 22.6458291,39.6166462 L15.9216697,32.8924868 C12.7989304,29.7697475 12.7899019,24.7006845 15.9108363,21.5797501 L21.5794957,15.9110907 C24.6989513,12.7916351 29.7653149,12.7950065 32.8922325,15.9219241 L39.6163918,22.6460835 C43.4361327,20.3889927 47.5957481,18.6460403 52,17.5124642 L52,8.00722764 C52,3.5910073 55.5779847,0.000254375069 59.9916525,0.000254375069 L68.0083475,0.000254375069 C72.4199239,0.000254375069 76,3.58509841 76,8.00722764 L76,17.5124642 C80.4042519,18.6460403 84.5638673,20.3889927 88.3836082,22.6460835 L95.1077675,15.9219241 C98.2305069,12.7991848 103.29957,12.7901562 106.420504,15.9110907 L112.089164,21.5797501 C115.208619,24.6992057 115.205248,29.7655693 112.07833,32.8924868 L105.354171,39.6166462 L105.354171,39.6166462 C107.611262,43.4363871 109.354214,47.5960025 110.48779,52.0002544 L119.993027,52.0002544 C124.409247,52.0002544 128,55.5782391 128,59.9919069 L128,68.0086019 C128,72.4201783 124.415156,76.0002544 119.993027,76.0002544 L110.48779,76.0002544 L110.48779,76.0002544 Z M64,96.0002544 C81.673112,96.0002544 96,81.6733664 96,64.0002544 C96,46.3271424 81.673112,32.0002544 64,32.0002544 C46.326888,32.0002544 32,46.3271424 32,64.0002544 C32,81.6733664 46.326888,96.0002544 64,96.0002544 Z\"></path>\r\n </g>\r\n</svg>\r\n"
},
"$:/core/images/permalink-button": {
"title": "$:/core/images/permalink-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-permalink-button tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\r\n <g fill-rule=\"evenodd\">\r\n <path d=\"M80.4834582,48 L73.0956761,80 L73.0956761,80 L47.5165418,80 L54.9043239,48 L80.4834582,48 Z M84.1773493,32 L89.8007299,7.64246248 C90.7941633,3.33942958 95.0918297,0.64641956 99.3968675,1.64031585 C103.693145,2.63218977 106.385414,6.93288901 105.390651,11.2416793 L100.598215,32 L104.000754,32 C108.411895,32 112,35.581722 112,40 C112,44.4092877 108.418616,48 104.000754,48 L96.9043239,48 L89.5165418,80 L104.000754,80 C108.411895,80 112,83.581722 112,88 C112,92.4092877 108.418616,96 104.000754,96 L85.8226507,96 L80.1992701,120.357538 C79.2058367,124.66057 74.9081703,127.35358 70.6031325,126.359684 C66.3068546,125.36781 63.6145865,121.067111 64.6093491,116.758321 L69.401785,96 L43.8226507,96 L38.1992701,120.357538 C37.2058367,124.66057 32.9081703,127.35358 28.6031325,126.359684 C24.3068546,125.36781 21.6145865,121.067111 22.6093491,116.758321 L27.401785,96 L23.9992458,96 C19.5881049,96 16,92.418278 16,88 C16,83.5907123 19.5813843,80 23.9992458,80 L31.0956761,80 L38.4834582,48 L23.9992458,48 C19.5881049,48 16,44.418278 16,40 C16,35.5907123 19.5813843,32 23.9992458,32 L42.1773493,32 L47.8007299,7.64246248 C48.7941633,3.33942958 53.0918297,0.64641956 57.3968675,1.64031585 C61.6931454,2.63218977 64.3854135,6.93288901 63.3906509,11.2416793 L58.598215,32 L84.1773493,32 Z\"></path>\r\n </g>\r\n</svg>"
},
"$:/core/images/permaview-button": {
"title": "$:/core/images/permaview-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-permaview-button tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\r\n <g fill-rule=\"evenodd\">\r\n <path d=\"M81.4834582,48 L79.6365127,56 L79.6365127,56 L74.0573784,56 L75.9043239,48 L81.4834582,48 Z M85.1773493,32 L90.8007299,7.64246248 C91.7941633,3.33942958 96.0918297,0.64641956 100.396867,1.64031585 C104.693145,2.63218977 107.385414,6.93288901 106.390651,11.2416793 L101.598215,32 L104.000754,32 C108.411895,32 112,35.581722 112,40 C112,44.4092877 108.418616,48 104.000754,48 L97.9043239,48 L96.0573784,56 L104.000754,56 C108.411895,56 112,59.581722 112,64 C112,68.4092877 108.418616,72 104.000754,72 L92.3634873,72 L90.5165418,80 L104.000754,80 C108.411895,80 112,83.581722 112,88 C112,92.4092877 108.418616,96 104.000754,96 L86.8226507,96 L81.1992701,120.357538 C80.2058367,124.66057 75.9081703,127.35358 71.6031325,126.359684 C67.3068546,125.36781 64.6145865,121.067111 65.6093491,116.758321 L70.401785,96 L64.8226507,96 L59.1992701,120.357538 C58.2058367,124.66057 53.9081703,127.35358 49.6031325,126.359684 C45.3068546,125.36781 42.6145865,121.067111 43.6093491,116.758321 L48.401785,96 L42.8226507,96 L37.1992701,120.357538 C36.2058367,124.66057 31.9081703,127.35358 27.6031325,126.359684 C23.3068546,125.36781 20.6145865,121.067111 21.6093491,116.758321 L26.401785,96 L23.9992458,96 C19.5881049,96 16,92.418278 16,88 C16,83.5907123 19.5813843,80 23.9992458,80 L30.0956761,80 L31.9426216,72 L23.9992458,72 C19.5881049,72 16,68.418278 16,64 C16,59.5907123 19.5813843,56 23.9992458,56 L35.6365127,56 L37.4834582,48 L23.9992458,48 C19.5881049,48 16,44.418278 16,40 C16,35.5907123 19.5813843,32 23.9992458,32 L41.1773493,32 L46.8007299,7.64246248 C47.7941633,3.33942958 52.0918297,0.64641956 56.3968675,1.64031585 C60.6931454,2.63218977 63.3854135,6.93288901 62.3906509,11.2416793 L57.598215,32 L63.1773493,32 L68.8007299,7.64246248 C69.7941633,3.33942958 74.0918297,0.64641956 78.3968675,1.64031585 C82.6931454,2.63218977 85.3854135,6.93288901 84.3906509,11.2416793 L79.598215,32 L85.1773493,32 Z M53.9043239,48 L52.0573784,56 L57.6365127,56 L59.4834582,48 L53.9043239,48 Z M75.9426216,72 L74.0956761,80 L74.0956761,80 L68.5165418,80 L70.3634873,72 L75.9426216,72 L75.9426216,72 Z M48.3634873,72 L46.5165418,80 L52.0956761,80 L53.9426216,72 L48.3634873,72 L48.3634873,72 Z\"></path>\r\n </g>\r\n</svg>"
},
"$:/core/images/plugin-generic-language": {
"title": "$:/core/images/plugin-generic-language",
"tags": "$:/tags/Image",
"text": "<svg width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\r\n <g fill-rule=\"evenodd\">\r\n <path d=\"M61.2072232,68.1369825 C56.8829239,70.9319564 54.2082892,74.793177 54.2082892,79.0581634 C54.2082892,86.9638335 63.3980995,93.4821994 75.2498076,94.3940006 C77.412197,98.2964184 83.8475284,101.178858 91.5684735,101.403106 C86.4420125,100.27851 82.4506393,97.6624107 80.9477167,94.3948272 C92.8046245,93.4861461 102,86.9662269 102,79.0581634 C102,70.5281905 91.3014611,63.6132813 78.1041446,63.6132813 C71.5054863,63.6132813 65.5315225,65.3420086 61.2072232,68.1369825 Z M74.001066,53.9793443 C69.6767667,56.7743182 63.7028029,58.5030456 57.1041446,58.5030456 C54.4851745,58.5030456 51.9646095,58.2307276 49.6065315,57.7275105 C46.2945155,59.9778212 41.2235699,61.4171743 35.5395922,61.4171743 C35.4545771,61.4171743 35.3696991,61.4168523 35.2849622,61.4162104 C39.404008,60.5235193 42.7961717,58.6691298 44.7630507,56.286533 C37.8379411,53.5817651 33.2082892,48.669413 33.2082892,43.0581634 C33.2082892,34.5281905 43.9068281,27.6132812 57.1041446,27.6132812 C70.3014611,27.6132812 81,34.5281905 81,43.0581634 C81,47.3231498 78.3253653,51.1843704 74.001066,53.9793443 Z M64,0 L118.5596,32 L118.5596,96 L64,128 L9.44039956,96 L9.44039956,32 L64,0 Z\"></path>\r\n </g>\r\n</svg>"
},
"$:/core/images/plugin-generic-plugin": {
"title": "$:/core/images/plugin-generic-plugin",
"tags": "$:/tags/Image",
"text": "<svg width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\r\n <g fill-rule=\"evenodd\">\r\n <path d=\"M40.3972881,76.4456988 L40.3972881,95.3404069 L54.5170166,95.3404069 L54.5170166,95.3404069 C54.5165526,95.3385183 54.516089,95.3366295 54.515626,95.3347404 C54.6093153,95.3385061 54.7034848,95.3404069 54.7980982,95.3404069 C58.6157051,95.3404069 61.710487,92.245625 61.710487,88.4280181 C61.710487,86.6197822 61.01617,84.9737128 59.8795929,83.7418666 L59.8795929,83.7418666 C59.8949905,83.7341665 59.9104102,83.7265043 59.925852,83.7188798 C58.8840576,82.5086663 58.2542926,80.9336277 58.2542926,79.2114996 C58.2542926,75.3938927 61.3490745,72.2991108 65.1666814,72.2991108 C68.9842884,72.2991108 72.0790703,75.3938927 72.0790703,79.2114996 C72.0790703,81.1954221 71.2432806,82.9841354 69.9045961,84.2447446 L69.9045961,84.2447446 C69.9333407,84.2629251 69.9619885,84.281245 69.9905383,84.2997032 L69.9905383,84.2997032 C69.1314315,85.4516923 68.6228758,86.8804654 68.6228758,88.4280181 C68.6228758,91.8584969 71.1218232,94.7053153 74.3986526,95.2474079 C74.3913315,95.2784624 74.3838688,95.3094624 74.3762652,95.3404069 L95.6963988,95.3404069 L95.6963988,75.5678578 L95.6963988,75.5678578 C95.6466539,75.5808558 95.5967614,75.5934886 95.5467242,75.6057531 C95.5504899,75.5120637 95.5523907,75.4178943 95.5523907,75.3232809 C95.5523907,71.505674 92.4576088,68.4108921 88.6400019,68.4108921 C86.831766,68.4108921 85.1856966,69.105209 83.9538504,70.2417862 L83.9538504,70.2417862 C83.9461503,70.2263886 83.938488,70.2109688 83.9308636,70.1955271 C82.7206501,71.2373215 81.1456115,71.8670865 79.4234834,71.8670865 C75.6058765,71.8670865 72.5110946,68.7723046 72.5110946,64.9546976 C72.5110946,61.1370907 75.6058765,58.0423088 79.4234834,58.0423088 C81.4074059,58.0423088 83.1961192,58.8780985 84.4567284,60.2167829 L84.4567284,60.2167829 C84.4749089,60.1880383 84.4932288,60.1593906 84.511687,60.1308407 L84.511687,60.1308407 C85.6636761,60.9899475 87.0924492,61.4985032 88.6400019,61.4985032 C92.0704807,61.4985032 94.9172991,58.9995558 95.4593917,55.7227265 C95.538755,55.7414363 95.6177614,55.761071 95.6963988,55.7816184 L95.6963988,40.0412962 L74.3762652,40.0412962 L74.3762652,40.0412962 C74.3838688,40.0103516 74.3913315,39.9793517 74.3986526,39.9482971 L74.3986526,39.9482971 C71.1218232,39.4062046 68.6228758,36.5593862 68.6228758,33.1289073 C68.6228758,31.5813547 69.1314315,30.1525815 69.9905383,29.0005925 C69.9619885,28.9821342 69.9333407,28.9638143 69.9045961,28.9456339 C71.2432806,27.6850247 72.0790703,25.8963113 72.0790703,23.9123888 C72.0790703,20.0947819 68.9842884,17 65.1666814,17 C61.3490745,17 58.2542926,20.0947819 58.2542926,23.9123888 C58.2542926,25.6345169 58.8840576,27.2095556 59.925852,28.419769 L59.925852,28.419769 C59.9104102,28.4273935 59.8949905,28.4350558 59.8795929,28.4427558 C61.01617,29.674602 61.710487,31.3206715 61.710487,33.1289073 C61.710487,36.9465143 58.6157051,40.0412962 54.7980982,40.0412962 C54.7034848,40.0412962 54.6093153,40.0393953 54.515626,40.0356296 L54.515626,40.0356296 C54.516089,40.0375187 54.5165526,40.0394075 54.5170166,40.0412962 L40.3972881,40.0412962 L40.3972881,52.887664 L40.3972881,52.887664 C40.4916889,53.3430132 40.5412962,53.8147625 40.5412962,54.2980982 C40.5412962,58.1157051 37.4465143,61.210487 33.6289073,61.210487 C32.0813547,61.210487 30.6525815,60.7019313 29.5005925,59.8428245 C29.4821342,59.8713744 29.4638143,59.9000221 29.4456339,59.9287667 C28.1850247,58.5900823 26.3963113,57.7542926 24.4123888,57.7542926 C20.5947819,57.7542926 17.5,60.8490745 17.5,64.6666814 C17.5,68.4842884 20.5947819,71.5790703 24.4123888,71.5790703 C26.134517,71.5790703 27.7095556,70.9493053 28.919769,69.9075109 L28.919769,69.9075109 C28.9273935,69.9229526 28.9350558,69.9383724 28.9427558,69.95377 C30.174602,68.8171928 31.8206715,68.1228758 33.6289073,68.1228758 C37.4465143,68.1228758 40.5412962,71.2176578 40.5412962,75.0352647 C40.5412962,75.5186004 40.4916889,75.9903496 40.3972881,76.4456988 Z M64,0 L118.5596,32 L118.5596,96 L64,128 L9.44039956,96 L9.44039956,32 L64,0 Z\"></path>\r\n </g>\r\n</svg>"
},
"$:/core/images/plugin-generic-theme": {
"title": "$:/core/images/plugin-generic-theme",
"tags": "$:/tags/Image",
"text": "<svg width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\r\n <g fill-rule=\"evenodd\">\r\n <path d=\"M27.6619958,98.5383065 C27.5690581,98.5388896 27.4761291,98.539182 27.383212,98.539182 C41.5122315,92.2342259 36.7359182,71.4340774 52.2062903,71.4340772 C52.3396942,72.0325374 52.4778143,72.6764878 52.6543744,73.3309353 C41.7206358,71.5725612 42.70852,93.6013809 27.6619958,98.5383065 Z M27.962646,98.5354078 C44.3675979,98.3221342 60.9448114,89.104528 60.944811,79.6231217 C57.0326028,79.6231217 55.0057081,78.1546059 53.8483468,76.2715831 C46.8437297,73.3160546 41.0335584,95.5643154 27.9626323,98.5354081 Z M60.4476718,66.8723739 C57.4632888,63.6421817 54.9582687,60.7541572 53.4305549,58.7453802 C47.3662923,50.7715364 44.307483,54.9700909 40.8462757,58.7453801 C37.3850684,62.5206692 41.7580858,65.5796149 38.4732643,68.2464352 C35.1884428,70.9132556 35.391237,71.8376623 29.8473278,66.9588778 C24.3034186,62.0800933 23.919977,60.7368279 26.4649349,57.9530299 C29.0098928,55.1692318 31.1369568,59.5524845 36.3357237,54.6053302 C41.5344905,49.6581758 37.1673192,45.2736183 37.1673192,45.2736183 C37.1673192,45.2736183 47.9916921,23.1463023 62.4556497,24.7805686 C76.9196074,26.4148348 56.9839048,22.6644011 52.0250205,40.0179431 C49.9018746,47.4478606 52.4201529,45.6971267 56.4460414,48.8353078 C57.8695188,49.9449088 63.120208,53.6842856 69.3136884,58.3372485 C77.8095419,50.1273311 87.3705002,40.8200581 90.1462007,38.0443577 C94.9225135,33.268045 99.6988262,38.0443577 94.9225134,42.8206705 C92.2168565,45.5263274 83.0052228,54.3768782 74.6585455,62.4104777 C84.7196352,70.2010353 95.1107413,79.0341049 95.1107416,82.5307694 C95.1107421,88.9149413 92.3944614,92.7263341 86.6764506,90.6368273 C83.0906414,89.3264812 73.3126471,80.2536547 65.0234105,71.7029822 C62.8994697,73.7599251 61.2357389,75.3821997 60.3189624,76.2989761 C57.6045976,78.4574835 53.6647127,73.2589589 55.5426497,71.5226634 C56.5140946,70.6244887 58.249291,68.9770292 60.4476718,66.8723739 L60.4476718,66.8723739 Z M64,0 L118.5596,32 L118.5596,96 L64,128 L9.44039956,96 L9.44039956,32 L64,0 Z\"></path>\r\n </g>\r\n</svg>"
},
"$:/core/images/refresh-button": {
"title": "$:/core/images/refresh-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-refresh-button tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\r\n <g fill-rule=\"evenodd\">\r\n <path d=\"M106.369002,39.4325143 C116.529932,60.3119371 112.939592,86.1974934 95.5979797,103.539105 C73.7286194,125.408466 38.2713806,125.408466 16.4020203,103.539105 C-5.46734008,81.6697449 -5.46734008,46.2125061 16.4020203,24.3431458 C19.5262146,21.2189514 24.5915344,21.2189514 27.7157288,24.3431458 C30.8399231,27.4673401 30.8399231,32.5326599 27.7157288,35.6568542 C12.0947571,51.2778259 12.0947571,76.6044251 27.7157288,92.2253967 C43.3367004,107.846368 68.6632996,107.846368 84.2842712,92.2253967 C97.71993,78.7897379 99.5995262,58.1740623 89.9230597,42.729491 L83.4844861,54.9932839 C81.4307001,58.9052072 76.5945372,60.4115251 72.682614,58.3577391 C68.7706907,56.3039532 67.2643728,51.4677903 69.3181587,47.555867 L84.4354914,18.7613158 C86.4966389,14.8353707 91.3577499,13.3347805 95.273202,15.415792 L124.145886,30.7612457 C128.047354,32.8348248 129.52915,37.6785572 127.455571,41.5800249 C125.381992,45.4814927 120.53826,46.9632892 116.636792,44.8897102 L106.369002,39.4325143 Z M98.1470904,27.0648707 C97.9798954,26.8741582 97.811187,26.6843098 97.6409651,26.4953413 L98.6018187,26.1987327 L98.1470904,27.0648707 Z\"></path>\r\n </g>\r\n</svg>\r\n"
},
"$:/core/images/right-arrow": {
"title": "$:/core/images/right-arrow",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-right-arrow tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\r\n <path d=\"M80.3563798,109.353315 C78.9238993,110.786918 76.9450203,111.675144 74.7592239,111.675144 L-4.40893546,111.675144 C-8.77412698,111.675144 -12.3248558,108.130732 -12.3248558,103.758478 C-12.3248558,99.3951199 -8.78077754,95.8418109 -4.40893546,95.8418109 L66.8418109,95.8418109 L66.8418109,24.5910645 C66.8418109,20.225873 70.3862233,16.6751442 74.7584775,16.6751442 C79.1218352,16.6751442 82.6751442,20.2192225 82.6751442,24.5910645 L82.6751442,103.759224 C82.6751442,105.941695 81.7891419,107.920575 80.3566508,109.353886 Z\" transform=\"translate(35.175144, 64.175144) rotate(-45.000000) translate(-35.175144, -64.175144) \"></path>\r\n</svg>"
},
"$:/core/images/save-button": {
"title": "$:/core/images/save-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-save-button tc-image-button\" viewBox=\"0 0 128 128\" width=\"22pt\" height=\"22pt\">\r\n <g fill-rule=\"evenodd\">\r\n <path d=\"M120.78304,34.329058 C125.424287,43.1924006 128.049406,53.2778608 128.049406,63.9764502 C128.049406,99.3226742 99.3956295,127.97645 64.0494055,127.97645 C28.7031816,127.97645 0.0494055385,99.3226742 0.0494055385,63.9764502 C0.0494055385,28.6302262 28.7031816,-0.0235498012 64.0494055,-0.0235498012 C82.8568763,-0.0235498012 99.769563,8.08898558 111.479045,21.0056358 L114.159581,18.3250998 C117.289194,15.1954866 122.356036,15.1939641 125.480231,18.3181584 C128.598068,21.4359957 128.601317,26.5107804 125.473289,29.6388083 L120.78304,34.329058 Z M108.72451,46.3875877 C110.870571,51.8341374 112.049406,57.767628 112.049406,63.9764502 C112.049406,90.4861182 90.5590735,111.97645 64.0494055,111.97645 C37.5397375,111.97645 16.0494055,90.4861182 16.0494055,63.9764502 C16.0494055,37.4667822 37.5397375,15.9764502 64.0494055,15.9764502 C78.438886,15.9764502 91.3495036,22.308215 100.147097,32.3375836 L58.9411255,73.5435552 L41.975581,56.5780107 C38.8486152,53.4510448 33.7746915,53.4551552 30.6568542,56.5729924 C27.5326599,59.6971868 27.5372202,64.7670668 30.6618725,67.8917192 L53.279253,90.5090997 C54.8435723,92.073419 56.8951519,92.8541315 58.9380216,92.8558261 C60.987971,92.8559239 63.0389578,92.0731398 64.6049211,90.5071765 L108.72451,46.3875877 Z\"></path>\r\n </g>\r\n</svg>\r\n"
},
"$:/core/images/star-filled": {
"title": "$:/core/images/star-filled",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-star-filled tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\r\n <g fill-rule=\"nonzero\">\r\n <path d=\"M61.8361286,96.8228569 L99.1627704,124.110219 C101.883827,126.099427 105.541968,123.420868 104.505636,120.198072 L90.2895569,75.9887263 L89.0292911,79.8977279 L126.314504,52.5528988 C129.032541,50.5595011 127.635256,46.2255025 124.273711,46.2229134 L78.1610486,46.1873965 L81.4604673,48.6032923 L67.1773543,4.41589688 C66.1361365,1.19470104 61.6144265,1.19470104 60.5732087,4.41589688 L46.2900957,48.6032923 L49.5895144,46.1873965 L3.47685231,46.2229134 C0.115307373,46.2255025 -1.28197785,50.5595011 1.43605908,52.5528988 L38.7212719,79.8977279 L37.4610061,75.9887263 L23.2449266,120.198072 C22.2085954,123.420868 25.8667356,126.099427 28.5877926,124.110219 L65.9144344,96.8228569 L61.8361286,96.8228569 Z\"></path>\r\n </g>\r\n</svg>"
},
"$:/core/images/storyview-classic": {
"title": "$:/core/images/storyview-classic",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-storyview-classic tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 129 128\">\r\n <g fill-rule=\"evenodd\">\r\n <path d=\"M8.00697327,0 C3.58484404,0 0,3.59075293 0,8.00697327 L0,119.993027 C0,124.415156 3.59075293,128 8.00697327,128 L119.993027,128 C124.415156,128 128,124.409247 128,119.993027 L128,8.00697327 C128,3.58484404 124.409247,0 119.993027,0 L8.00697327,0 L8.00697327,0 Z M23.9992458,16 C19.5813843,16 16,19.5776607 16,23.9924054 L16,40.0075946 C16,44.4216782 19.5881049,48 23.9992458,48 L104.000754,48 C108.418616,48 112,44.4223393 112,40.0075946 L112,23.9924054 C112,19.5783218 108.411895,16 104.000754,16 L23.9992458,16 L23.9992458,16 Z M23.9992458,64 C19.5813843,64 16,67.5907123 16,72 C16,76.418278 19.5881049,80 23.9992458,80 L104.000754,80 C108.418616,80 112,76.4092877 112,72 C112,67.581722 108.411895,64 104.000754,64 L23.9992458,64 L23.9992458,64 Z M23.9992458,96 C19.5813843,96 16,99.5907123 16,104 C16,108.418278 19.5881049,112 23.9992458,112 L104.000754,112 C108.418616,112 112,108.409288 112,104 C112,99.581722 108.411895,96 104.000754,96 L23.9992458,96 L23.9992458,96 Z\"></path>\r\n </g>\r\n</svg>"
},
"$:/core/images/storyview-pop": {
"title": "$:/core/images/storyview-pop",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-storyview-pop tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\r\n <g fill-rule=\"evenodd\">\r\n <path d=\"M8.00697327,0 C3.58484404,0 0,3.59075293 0,8.00697327 L0,119.993027 C0,124.415156 3.59075293,128 8.00697327,128 L119.993027,128 C124.415156,128 128,124.409247 128,119.993027 L128,8.00697327 C128,3.58484404 124.409247,0 119.993027,0 L8.00697327,0 L8.00697327,0 Z M23.9992458,16 C19.5813843,16 16,19.5776607 16,23.9924054 L16,40.0075946 C16,44.4216782 19.5881049,48 23.9992458,48 L104.000754,48 C108.418616,48 112,44.4223393 112,40.0075946 L112,23.9924054 C112,19.5783218 108.411895,16 104.000754,16 L23.9992458,16 L23.9992458,16 Z M16.0098166,56 C11.586117,56 8,59.5776607 8,63.9924054 L8,80.0075946 C8,84.4216782 11.5838751,88 16.0098166,88 L111.990183,88 C116.413883,88 120,84.4223393 120,80.0075946 L120,63.9924054 C120,59.5783218 116.416125,56 111.990183,56 L16.0098166,56 L16.0098166,56 Z M23.9992458,96 C19.5813843,96 16,99.5907123 16,104 C16,108.418278 19.5881049,112 23.9992458,112 L104.000754,112 C108.418616,112 112,108.409288 112,104 C112,99.581722 108.411895,96 104.000754,96 L23.9992458,96 L23.9992458,96 Z M23.9992458,64 C19.5813843,64 16,67.5907123 16,72 C16,76.418278 19.5881049,80 23.9992458,80 L104.000754,80 C108.418616,80 112,76.4092877 112,72 C112,67.581722 108.411895,64 104.000754,64 L23.9992458,64 L23.9992458,64 Z\"></path>\r\n </g>\r\n</svg>"
},
"$:/core/images/storyview-zoomin": {
"title": "$:/core/images/storyview-zoomin",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-storyview-zoomin tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\r\n <g fill-rule=\"evenodd\">\r\n <path d=\"M8.00697327,0 C3.58484404,0 0,3.59075293 0,8.00697327 L0,119.993027 C0,124.415156 3.59075293,128 8.00697327,128 L119.993027,128 C124.415156,128 128,124.409247 128,119.993027 L128,8.00697327 C128,3.58484404 124.409247,0 119.993027,0 L8.00697327,0 L8.00697327,0 Z M23.9992458,16 C19.5813843,16 16,19.578055 16,24.0085154 L16,71.9914846 C16,76.4144655 19.5881049,80 23.9992458,80 L104.000754,80 C108.418616,80 112,76.421945 112,71.9914846 L112,24.0085154 C112,19.5855345 108.411895,16 104.000754,16 L23.9992458,16 L23.9992458,16 Z\"></path>\r\n </g>\r\n</svg>"
},
"$:/core/images/tag-button": {
"title": "$:/core/images/tag-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-tag-button tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\r\n <g fill-rule=\"evenodd\">\r\n <path d=\"M18.1643182,47.6600756 L18.1677196,51.7651887 C18.1708869,55.5878829 20.3581578,60.8623899 23.0531352,63.5573673 L84.9021823,125.406414 C87.5996731,128.103905 91.971139,128.096834 94.6717387,125.396234 L125.766905,94.3010679 C128.473612,91.5943612 128.472063,87.2264889 125.777085,84.5315115 L63.9280381,22.6824644 C61.2305472,19.9849735 55.9517395,17.801995 52.1318769,17.8010313 L25.0560441,17.7942007 C21.2311475,17.7932358 18.1421354,20.8872832 18.1452985,24.7049463 L18.1535504,34.6641936 C18.2481119,34.6754562 18.3439134,34.6864294 18.4409623,34.6971263 C22.1702157,35.1081705 26.9295004,34.6530132 31.806204,33.5444844 C32.1342781,33.0700515 32.5094815,32.6184036 32.9318197,32.1960654 C35.6385117,29.4893734 39.5490441,28.718649 42.94592,29.8824694 C43.0432142,29.8394357 43.1402334,29.7961748 43.2369683,29.7526887 L43.3646982,30.0368244 C44.566601,30.5115916 45.6933052,31.2351533 46.6655958,32.2074439 C50.4612154,36.0030635 50.4663097,42.1518845 46.6769742,45.94122 C43.0594074,49.5587868 37.2914155,49.7181264 33.4734256,46.422636 C28.1082519,47.5454734 22.7987486,48.0186448 18.1643182,47.6600756 Z\"></path>\r\n <path d=\"M47.6333528,39.5324628 L47.6562932,39.5834939 C37.9670934,43.9391617 26.0718874,46.3819521 17.260095,45.4107025 C5.27267473,44.0894301 -1.02778744,36.4307276 2.44271359,24.0779512 C5.56175386,12.9761516 14.3014034,4.36129832 24.0466405,1.54817001 C34.7269254,-1.53487574 43.7955833,3.51606438 43.7955834,14.7730751 L35.1728168,14.7730752 C35.1728167,9.91428944 32.0946059,8.19982862 26.4381034,9.83267419 C19.5270911,11.8276553 13.046247,18.2159574 10.7440788,26.4102121 C8.82861123,33.2280582 11.161186,36.0634845 18.2047888,36.8398415 C25.3302805,37.6252244 35.7353482,35.4884477 44.1208333,31.7188498 L44.1475077,31.7781871 C44.159701,31.7725635 44.1718402,31.7671479 44.1839238,31.7619434 C45.9448098,31.0035157 50.4503245,38.3109156 47.7081571,39.5012767 C47.6834429,39.512005 47.6585061,39.5223987 47.6333528,39.5324628 Z\"></path>\r\n </g>\r\n</svg>\r\n"
},
"$:/core/images/theme-button": {
"title": "$:/core/images/theme-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-theme-button tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 129\">\r\n <g fill-rule=\"evenodd\">\r\n <g transform=\"translate(6.762422, 19.968999)\">\r\n <path d=\"M0.824945506,108.186742 C0.664785639,108.187747 0.504640965,108.188251 0.344516735,108.188251 C24.6927592,97.3230528 16.4618388,61.4785938 43.121606,61.4785936 C43.3514982,62.5099075 43.5895175,63.6196137 43.8937798,64.7474092 C25.0518979,61.7172401 26.754298,99.6790423 0.824939051,108.186742 Z M1.34304326,108.181747 C29.613352,107.814217 58.1805158,91.9297101 58.1805151,75.5906019 C51.4386888,75.5906018 47.9457839,73.0599394 45.9513275,69.8149659 C33.880418,64.7217657 23.8678719,103.061726 1.34301955,108.181748 Z\"></path>\r\n <path d=\"M48.871084,61.6312522 C45.6348746,64.6233738 52.4243955,73.581882 57.1020034,69.8621716 C65.3329228,61.631253 108.502656,20.4006304 116.733576,12.169711 C124.964495,3.9387916 116.733576,-4.29212771 108.502656,3.9387916 C100.271737,12.1697108 57.4180113,53.7289683 48.871084,61.6312522 Z\"></path>\r\n </g>\r\n <path d=\"M62.2824054,71.6211067 C57.93733,66.8541323 54.3123948,62.6301561 51.9937779,59.5814279 C41.5433616,45.8402704 36.2721798,53.0755512 30.307554,59.5814276 C24.3429282,66.0873041 31.8788571,71.3587209 26.2181932,75.9543964 C20.5575294,80.5500719 20.9070004,82.1430826 11.3532982,73.7355757 C1.79959591,65.3280689 1.13881905,63.0132479 5.52449152,58.2159872 C9.91016399,53.4187265 13.5756887,60.9722938 22.5346144,52.4469667 C31.4935401,43.9216395 23.9676854,36.3658236 23.9676854,36.3658236 C23.9676854,36.3658236 42.6210998,-1.76571499 67.5465342,1.05058165 C92.4719685,3.8668783 58.1171911,-2.5961653 49.5716499,27.3088291 C45.9128772,40.1126497 50.2525733,37.0956468 57.1903023,42.5036084 C59.4792141,44.2878157 67.5103988,50.0176866 77.2457031,57.2905766 C71.4143155,62.9019825 66.2337717,67.8661661 62.2824054,71.6211067 Z M73.4870997,83.4678852 C87.4278174,97.7290403 103.323635,112.360587 109.285731,114.539289 C119.139459,118.140092 123.820369,111.571999 123.820368,100.570289 C123.820367,94.7414103 107.064445,80.3074425 90.2759123,67.2185217 C83.6390655,73.6178 77.7700759,79.2918373 73.4870997,83.4678852 Z\"></path>\r\n </g>\r\n</svg>"
},
"$:/core/images/unlocked-padlock": {
"title": "$:/core/images/unlocked-padlock",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-unlocked-padlock tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\r\n <g fill-rule=\"evenodd\">\r\n <path d=\"M48.6266053,64 L105,64 L105,96.0097716 C105,113.673909 90.6736461,128 73.001193,128 L55.998807,128 C38.3179793,128 24,113.677487 24,96.0097716 L24,64 L30.136303,64 C19.6806213,51.3490406 2.77158986,28.2115132 25.8366966,8.85759246 C50.4723026,-11.8141335 71.6711028,13.2108337 81.613302,25.0594855 C91.5555012,36.9081373 78.9368488,47.4964439 69.1559674,34.9513593 C59.375086,22.4062748 47.9893192,10.8049522 35.9485154,20.9083862 C23.9077117,31.0118202 34.192312,43.2685325 44.7624679,55.8655518 C47.229397,58.805523 48.403443,61.5979188 48.6266053,64 Z M67.7315279,92.3641717 C70.8232551,91.0923621 73,88.0503841 73,84.5 C73,79.8055796 69.1944204,76 64.5,76 C59.8055796,76 56,79.8055796 56,84.5 C56,87.947435 58.0523387,90.9155206 61.0018621,92.2491029 L55.9067479,115.020857 L72.8008958,115.020857 L67.7315279,92.3641717 L67.7315279,92.3641717 Z\"></path>\r\n </g>\r\n</svg>"
},
"$:/core/images/video": {
"title": "$:/core/images/video",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-video tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\r\n <g fill-rule=\"evenodd\">\r\n <path d=\"M64,12 C29.0909091,12 8.72727273,14.9166667 5.81818182,17.8333333 C2.90909091,20.75 1.93784382e-15,41.1666667 0,64.5 C1.93784382e-15,87.8333333 2.90909091,108.25 5.81818182,111.166667 C8.72727273,114.083333 29.0909091,117 64,117 C98.9090909,117 119.272727,114.083333 122.181818,111.166667 C125.090909,108.25 128,87.8333333 128,64.5 C128,41.1666667 125.090909,20.75 122.181818,17.8333333 C119.272727,14.9166667 98.9090909,12 64,12 Z M54.9161194,44.6182253 C51.102648,42.0759111 48.0112186,43.7391738 48.0112186,48.3159447 L48.0112186,79.6840553 C48.0112186,84.2685636 51.109784,85.9193316 54.9161194,83.3817747 L77.0838806,68.6032672 C80.897352,66.0609529 80.890216,61.9342897 77.0838806,59.3967328 L54.9161194,44.6182253 Z\"></path>\r\n </g>\r\n</svg>"
},
"$:/language/Buttons/AdvancedSearch/Caption": {
"title": "$:/language/Buttons/AdvancedSearch/Caption",
"text": "advanced search"
},
"$:/language/Buttons/AdvancedSearch/Hint": {
"title": "$:/language/Buttons/AdvancedSearch/Hint",
"text": "Advanced search"
},
"$:/language/Buttons/Cancel/Caption": {
"title": "$:/language/Buttons/Cancel/Caption",
"text": "cancel"
},
"$:/language/Buttons/Cancel/Hint": {
"title": "$:/language/Buttons/Cancel/Hint",
"text": "Discard changes to this tiddler"
},
"$:/language/Buttons/Clone/Caption": {
"title": "$:/language/Buttons/Clone/Caption",
"text": "clone"
},
"$:/language/Buttons/Clone/Hint": {
"title": "$:/language/Buttons/Clone/Hint",
"text": "Clone this tiddler"
},
"$:/language/Buttons/Close/Caption": {
"title": "$:/language/Buttons/Close/Caption",
"text": "close"
},
"$:/language/Buttons/Close/Hint": {
"title": "$:/language/Buttons/Close/Hint",
"text": "Close this tiddler"
},
"$:/language/Buttons/CloseAll/Caption": {
"title": "$:/language/Buttons/CloseAll/Caption",
"text": "close all"
},
"$:/language/Buttons/CloseAll/Hint": {
"title": "$:/language/Buttons/CloseAll/Hint",
"text": "Close all tiddlers"
},
"$:/language/Buttons/CloseOthers/Caption": {
"title": "$:/language/Buttons/CloseOthers/Caption",
"text": "close others"
},
"$:/language/Buttons/CloseOthers/Hint": {
"title": "$:/language/Buttons/CloseOthers/Hint",
"text": "Close other tiddlers"
},
"$:/language/Buttons/ControlPanel/Caption": {
"title": "$:/language/Buttons/ControlPanel/Caption",
"text": "control panel"
},
"$:/language/Buttons/ControlPanel/Hint": {
"title": "$:/language/Buttons/ControlPanel/Hint",
"text": "Open control panel"
},
"$:/language/Buttons/Delete/Caption": {
"title": "$:/language/Buttons/Delete/Caption",
"text": "delete"
},
"$:/language/Buttons/Delete/Hint": {
"title": "$:/language/Buttons/Delete/Hint",
"text": "Delete this tiddler"
},
"$:/language/Buttons/Edit/Caption": {
"title": "$:/language/Buttons/Edit/Caption",
"text": "edit"
},
"$:/language/Buttons/Edit/Hint": {
"title": "$:/language/Buttons/Edit/Hint",
"text": "Edit this tiddler"
},
"$:/language/Buttons/Encryption/Caption": {
"title": "$:/language/Buttons/Encryption/Caption",
"text": "encryption"
},
"$:/language/Buttons/Encryption/Hint": {
"title": "$:/language/Buttons/Encryption/Hint",
"text": "Set or clear a password for saving this wiki"
},
"$:/language/Buttons/Encryption/ClearPassword/Caption": {
"title": "$:/language/Buttons/Encryption/ClearPassword/Caption",
"text": "clear password"
},
"$:/language/Buttons/Encryption/ClearPassword/Hint": {
"title": "$:/language/Buttons/Encryption/ClearPassword/Hint",
"text": "Clear the password and save this wiki without encryption"
},
"$:/language/Buttons/Encryption/SetPassword/Caption": {
"title": "$:/language/Buttons/Encryption/SetPassword/Caption",
"text": "set password"
},
"$:/language/Buttons/Encryption/SetPassword/Hint": {
"title": "$:/language/Buttons/Encryption/SetPassword/Hint",
"text": "Set a password for saving this wiki with encryption"
},
"$:/language/Buttons/ExportPage/Caption": {
"title": "$:/language/Buttons/ExportPage/Caption",
"text": "export all"
},
"$:/language/Buttons/ExportPage/Hint": {
"title": "$:/language/Buttons/ExportPage/Hint",
"text": "Export all tiddlers"
},
"$:/language/Buttons/ExportTiddler/Caption": {
"title": "$:/language/Buttons/ExportTiddler/Caption",
"text": "export tiddler"
},
"$:/language/Buttons/ExportTiddler/Hint": {
"title": "$:/language/Buttons/ExportTiddler/Hint",
"text": "Export tiddler"
},
"$:/language/Buttons/ExportTiddlers/Caption": {
"title": "$:/language/Buttons/ExportTiddlers/Caption",
"text": "export tiddlers"
},
"$:/language/Buttons/ExportTiddlers/Hint": {
"title": "$:/language/Buttons/ExportTiddlers/Hint",
"text": "Export tiddlers"
},
"$:/language/Buttons/FullScreen/Caption": {
"title": "$:/language/Buttons/FullScreen/Caption",
"text": "full-screen"
},
"$:/language/Buttons/FullScreen/Hint": {
"title": "$:/language/Buttons/FullScreen/Hint",
"text": "Enter or leave full-screen mode"
},
"$:/language/Buttons/Import/Caption": {
"title": "$:/language/Buttons/Import/Caption",
"text": "import"
},
"$:/language/Buttons/Import/Hint": {
"title": "$:/language/Buttons/Import/Hint",
"text": "Import files"
},
"$:/language/Buttons/Info/Caption": {
"title": "$:/language/Buttons/Info/Caption",
"text": "info"
},
"$:/language/Buttons/Info/Hint": {
"title": "$:/language/Buttons/Info/Hint",
"text": "Show information for this tiddler"
},
"$:/language/Buttons/Home/Caption": {
"title": "$:/language/Buttons/Home/Caption",
"text": "home"
},
"$:/language/Buttons/Home/Hint": {
"title": "$:/language/Buttons/Home/Hint",
"text": "Open the default tiddlers"
},
"$:/language/Buttons/Language/Caption": {
"title": "$:/language/Buttons/Language/Caption",
"text": "language"
},
"$:/language/Buttons/Language/Hint": {
"title": "$:/language/Buttons/Language/Hint",
"text": "Choose the user interface language"
},
"$:/language/Buttons/More/Caption": {
"title": "$:/language/Buttons/More/Caption",
"text": "more"
},
"$:/language/Buttons/More/Hint": {
"title": "$:/language/Buttons/More/Hint",
"text": "More actions"
},
"$:/language/Buttons/NewHere/Caption": {
"title": "$:/language/Buttons/NewHere/Caption",
"text": "new here"
},
"$:/language/Buttons/NewHere/Hint": {
"title": "$:/language/Buttons/NewHere/Hint",
"text": "Create a new tiddler tagged with this one"
},
"$:/language/Buttons/NewJournal/Caption": {
"title": "$:/language/Buttons/NewJournal/Caption",
"text": "new journal"
},
"$:/language/Buttons/NewJournal/Hint": {
"title": "$:/language/Buttons/NewJournal/Hint",
"text": "Create a new journal tiddler"
},
"$:/language/Buttons/NewJournalHere/Caption": {
"title": "$:/language/Buttons/NewJournalHere/Caption",
"text": "new journal here"
},
"$:/language/Buttons/NewJournalHere/Hint": {
"title": "$:/language/Buttons/NewJournalHere/Hint",
"text": "Create a new journal tiddler tagged with this one"
},
"$:/language/Buttons/NewTiddler/Caption": {
"title": "$:/language/Buttons/NewTiddler/Caption",
"text": "new tiddler"
},
"$:/language/Buttons/NewTiddler/Hint": {
"title": "$:/language/Buttons/NewTiddler/Hint",
"text": "Create a new tiddler"
},
"$:/language/Buttons/Permalink/Caption": {
"title": "$:/language/Buttons/Permalink/Caption",
"text": "permalink"
},
"$:/language/Buttons/Permalink/Hint": {
"title": "$:/language/Buttons/Permalink/Hint",
"text": "Set browser address bar to a direct link to this tiddler"
},
"$:/language/Buttons/Permaview/Caption": {
"title": "$:/language/Buttons/Permaview/Caption",
"text": "permaview"
},
"$:/language/Buttons/Permaview/Hint": {
"title": "$:/language/Buttons/Permaview/Hint",
"text": "Set browser address bar to a direct link to all the tiddlers in this story"
},
"$:/language/Buttons/Refresh/Caption": {
"title": "$:/language/Buttons/Refresh/Caption",
"text": "refresh"
},
"$:/language/Buttons/Refresh/Hint": {
"title": "$:/language/Buttons/Refresh/Hint",
"text": "Perform a full refresh of the wiki"
},
"$:/language/Buttons/Save/Caption": {
"title": "$:/language/Buttons/Save/Caption",
"text": "ok"
},
"$:/language/Buttons/Save/Hint": {
"title": "$:/language/Buttons/Save/Hint",
"text": "Store changes to this tiddler"
},
"$:/language/Buttons/SaveWiki/Caption": {
"title": "$:/language/Buttons/SaveWiki/Caption",
"text": "save changes"
},
"$:/language/Buttons/SaveWiki/Hint": {
"title": "$:/language/Buttons/SaveWiki/Hint",
"text": "Save changes"
},
"$:/language/Buttons/StoryView/Caption": {
"title": "$:/language/Buttons/StoryView/Caption",
"text": "storyview"
},
"$:/language/Buttons/StoryView/Hint": {
"title": "$:/language/Buttons/StoryView/Hint",
"text": "Choose the story visualisation"
},
"$:/language/Buttons/HideSideBar/Caption": {
"title": "$:/language/Buttons/HideSideBar/Caption",
"text": "hide sidebar"
},
"$:/language/Buttons/HideSideBar/Hint": {
"title": "$:/language/Buttons/HideSideBar/Hint",
"text": "Hide sidebar"
},
"$:/language/Buttons/ShowSideBar/Caption": {
"title": "$:/language/Buttons/ShowSideBar/Caption",
"text": "show sidebar"
},
"$:/language/Buttons/ShowSideBar/Hint": {
"title": "$:/language/Buttons/ShowSideBar/Hint",
"text": "Show sidebar"
},
"$:/language/Buttons/TagManager/Caption": {
"title": "$:/language/Buttons/TagManager/Caption",
"text": "tag manager"
},
"$:/language/Buttons/TagManager/Hint": {
"title": "$:/language/Buttons/TagManager/Hint",
"text": "Open tag manager"
},
"$:/language/Buttons/Theme/Caption": {
"title": "$:/language/Buttons/Theme/Caption",
"text": "theme"
},
"$:/language/Buttons/Theme/Hint": {
"title": "$:/language/Buttons/Theme/Hint",
"text": "Choose the display theme"
},
"$:/language/ControlPanel/Advanced/Caption": {
"title": "$:/language/ControlPanel/Advanced/Caption",
"text": "Advanced"
},
"$:/language/ControlPanel/Advanced/Hint": {
"title": "$:/language/ControlPanel/Advanced/Hint",
"text": "Internal information about this TiddlyWiki"
},
"$:/language/ControlPanel/Appearance/Caption": {
"title": "$:/language/ControlPanel/Appearance/Caption",
"text": "Appearance"
},
"$:/language/ControlPanel/Appearance/Hint": {
"title": "$:/language/ControlPanel/Appearance/Hint",
"text": "Ways to customise the appearance of your TiddlyWiki."
},
"$:/language/ControlPanel/Basics/AnimDuration/Prompt": {
"title": "$:/language/ControlPanel/Basics/AnimDuration/Prompt",
"text": "Animation duration:"
},
"$:/language/ControlPanel/Basics/Caption": {
"title": "$:/language/ControlPanel/Basics/Caption",
"text": "Basics"
},
"$:/language/ControlPanel/Basics/DefaultTiddlers/BottomHint": {
"title": "$:/language/ControlPanel/Basics/DefaultTiddlers/BottomHint",
"text": "Use [[double square brackets]] for titles with spaces. Or you can choose to <$button set=\"$:/DefaultTiddlers\" setTo=\"[list[$:/StoryList]]\">retain story ordering</$button>"
},
"$:/language/ControlPanel/Basics/DefaultTiddlers/Prompt": {
"title": "$:/language/ControlPanel/Basics/DefaultTiddlers/Prompt",
"text": "Default tiddlers:"
},
"$:/language/ControlPanel/Basics/DefaultTiddlers/TopHint": {
"title": "$:/language/ControlPanel/Basics/DefaultTiddlers/TopHint",
"text": "Choose which tiddlers are displayed at startup:"
},
"$:/language/ControlPanel/Basics/Language/Prompt": {
"title": "$:/language/ControlPanel/Basics/Language/Prompt",
"text": "Hello! Current language:"
},
"$:/language/ControlPanel/Basics/NewJournal/Title/Prompt": {
"title": "$:/language/ControlPanel/Basics/NewJournal/Title/Prompt",
"text": "Title of new journal tiddlers"
},
"$:/language/ControlPanel/Basics/NewJournal/Tags/Prompt": {
"title": "$:/language/ControlPanel/Basics/NewJournal/Tags/Prompt",
"text": "Tags for new journal tiddlers"
},
"$:/language/ControlPanel/Basics/OverriddenShadowTiddlers/Prompt": {
"title": "$:/language/ControlPanel/Basics/OverriddenShadowTiddlers/Prompt",
"text": "Number of overridden shadow tiddlers:"
},
"$:/language/ControlPanel/Basics/ShadowTiddlers/Prompt": {
"title": "$:/language/ControlPanel/Basics/ShadowTiddlers/Prompt",
"text": "Number of shadow tiddlers:"
},
"$:/language/ControlPanel/Basics/Subtitle/Prompt": {
"title": "$:/language/ControlPanel/Basics/Subtitle/Prompt",
"text": "Subtitle:"
},
"$:/language/ControlPanel/Basics/SystemTiddlers/Prompt": {
"title": "$:/language/ControlPanel/Basics/SystemTiddlers/Prompt",
"text": "Number of system tiddlers:"
},
"$:/language/ControlPanel/Basics/Tags/Prompt": {
"title": "$:/language/ControlPanel/Basics/Tags/Prompt",
"text": "Number of tags:"
},
"$:/language/ControlPanel/Basics/Tiddlers/Prompt": {
"title": "$:/language/ControlPanel/Basics/Tiddlers/Prompt",
"text": "Number of tiddlers:"
},
"$:/language/ControlPanel/Basics/Title/Prompt": {
"title": "$:/language/ControlPanel/Basics/Title/Prompt",
"text": "Title of this ~TiddlyWiki:"
},
"$:/language/ControlPanel/Basics/Username/Prompt": {
"title": "$:/language/ControlPanel/Basics/Username/Prompt",
"text": "Username for signing edits:"
},
"$:/language/ControlPanel/Basics/Version/Prompt": {
"title": "$:/language/ControlPanel/Basics/Version/Prompt",
"text": "~TiddlyWiki version:"
},
"$:/language/ControlPanel/EditorTypes/Caption": {
"title": "$:/language/ControlPanel/EditorTypes/Caption",
"text": "Editor Types"
},
"$:/language/ControlPanel/EditorTypes/Editor/Caption": {
"title": "$:/language/ControlPanel/EditorTypes/Editor/Caption",
"text": "Editor"
},
"$:/language/ControlPanel/EditorTypes/Hint": {
"title": "$:/language/ControlPanel/EditorTypes/Hint",
"text": "These tiddlers determine which editor is used to edit specific tiddler types."
},
"$:/language/ControlPanel/EditorTypes/Type/Caption": {
"title": "$:/language/ControlPanel/EditorTypes/Type/Caption",
"text": "Type"
},
"$:/language/ControlPanel/Info/Caption": {
"title": "$:/language/ControlPanel/Info/Caption",
"text": "Info"
},
"$:/language/ControlPanel/Info/Hint": {
"title": "$:/language/ControlPanel/Info/Hint",
"text": "Information about this TiddlyWiki"
},
"$:/language/ControlPanel/LoadedModules/Caption": {
"title": "$:/language/ControlPanel/LoadedModules/Caption",
"text": "Loaded Modules"
},
"$:/language/ControlPanel/LoadedModules/Hint": {
"title": "$:/language/ControlPanel/LoadedModules/Hint",
"text": "These are the currently loaded tiddler modules linked to their source tiddlers. Any italicised modules lack a source tiddler, typically because they were setup during the boot process."
},
"$:/language/ControlPanel/Palette/Caption": {
"title": "$:/language/ControlPanel/Palette/Caption",
"text": "Palette"
},
"$:/language/ControlPanel/Palette/Editor/Clone/Caption": {
"title": "$:/language/ControlPanel/Palette/Editor/Clone/Caption",
"text": "clone"
},
"$:/language/ControlPanel/Palette/Editor/Clone/Prompt": {
"title": "$:/language/ControlPanel/Palette/Editor/Clone/Prompt",
"text": "It is recommended that you clone this shadow palette before editing it"
},
"$:/language/ControlPanel/Palette/Editor/Prompt/Modified": {
"title": "$:/language/ControlPanel/Palette/Editor/Prompt/Modified",
"text": "This shadow palette has been modified"
},
"$:/language/ControlPanel/Palette/Editor/Prompt": {
"title": "$:/language/ControlPanel/Palette/Editor/Prompt",
"text": "Editing"
},
"$:/language/ControlPanel/Palette/Editor/Reset/Caption": {
"title": "$:/language/ControlPanel/Palette/Editor/Reset/Caption",
"text": "reset"
},
"$:/language/ControlPanel/Palette/HideEditor/Caption": {
"title": "$:/language/ControlPanel/Palette/HideEditor/Caption",
"text": "hide editor"
},
"$:/language/ControlPanel/Palette/Prompt": {
"title": "$:/language/ControlPanel/Palette/Prompt",
"text": "Current palette:"
},
"$:/language/ControlPanel/Palette/ShowEditor/Caption": {
"title": "$:/language/ControlPanel/Palette/ShowEditor/Caption",
"text": "show editor"
},
"$:/language/ControlPanel/Plugins/Caption": {
"title": "$:/language/ControlPanel/Plugins/Caption",
"text": "Plugins"
},
"$:/language/ControlPanel/Plugins/Disable/Caption": {
"title": "$:/language/ControlPanel/Plugins/Disable/Caption",
"text": "disable"
},
"$:/language/ControlPanel/Plugins/Disable/Hint": {
"title": "$:/language/ControlPanel/Plugins/Disable/Hint",
"text": "Disable this plugin when reloading page"
},
"$:/language/ControlPanel/Plugins/Disabled/Status": {
"title": "$:/language/ControlPanel/Plugins/Disabled/Status",
"text": "(disabled)"
},
"$:/language/ControlPanel/Plugins/Empty/Hint": {
"title": "$:/language/ControlPanel/Plugins/Empty/Hint",
"text": "None"
},
"$:/language/ControlPanel/Plugins/Enable/Caption": {
"title": "$:/language/ControlPanel/Plugins/Enable/Caption",
"text": "enable"
},
"$:/language/ControlPanel/Plugins/Enable/Hint": {
"title": "$:/language/ControlPanel/Plugins/Enable/Hint",
"text": "Enable this plugin when reloading page"
},
"$:/language/ControlPanel/Plugins/Language/Prompt": {
"title": "$:/language/ControlPanel/Plugins/Language/Prompt",
"text": "Languages"
},
"$:/language/ControlPanel/Plugins/Plugin/Prompt": {
"title": "$:/language/ControlPanel/Plugins/Plugin/Prompt",
"text": "Plugins"
},
"$:/language/ControlPanel/Plugins/Theme/Prompt": {
"title": "$:/language/ControlPanel/Plugins/Theme/Prompt",
"text": "Themes"
},
"$:/language/ControlPanel/Saving/Caption": {
"title": "$:/language/ControlPanel/Saving/Caption",
"text": "Saving"
},
"$:/language/ControlPanel/Saving/Heading": {
"title": "$:/language/ControlPanel/Saving/Heading",
"text": "Saving"
},
"$:/language/ControlPanel/Saving/TiddlySpot/Advanced/Heading": {
"title": "$:/language/ControlPanel/Saving/TiddlySpot/Advanced/Heading",
"text": "Advanced Settings"
},
"$:/language/ControlPanel/Saving/TiddlySpot/BackupDir": {
"title": "$:/language/ControlPanel/Saving/TiddlySpot/BackupDir",
"text": "Backup Directory"
},
"$:/language/ControlPanel/Saving/TiddlySpot/Backups": {
"title": "$:/language/ControlPanel/Saving/TiddlySpot/Backups",
"text": "Backups"
},
"$:/language/ControlPanel/Saving/TiddlySpot/Description": {
"title": "$:/language/ControlPanel/Saving/TiddlySpot/Description",
"text": "These settings are only used when saving to http://tiddlyspot.com or a compatible remote server"
},
"$:/language/ControlPanel/Saving/TiddlySpot/Filename": {
"title": "$:/language/ControlPanel/Saving/TiddlySpot/Filename",
"text": "Upload Filename"
},
"$:/language/ControlPanel/Saving/TiddlySpot/Heading": {
"title": "$:/language/ControlPanel/Saving/TiddlySpot/Heading",
"text": "~TiddlySpot"
},
"$:/language/ControlPanel/Saving/TiddlySpot/Hint": {
"title": "$:/language/ControlPanel/Saving/TiddlySpot/Hint",
"text": "//The server URL defaults to `http://<wikiname>.tiddlyspot.com/store.cgi` and can be changed to use a custom server address//"
},
"$:/language/ControlPanel/Saving/TiddlySpot/Password": {
"title": "$:/language/ControlPanel/Saving/TiddlySpot/Password",
"text": "Password"
},
"$:/language/ControlPanel/Saving/TiddlySpot/ServerURL": {
"title": "$:/language/ControlPanel/Saving/TiddlySpot/ServerURL",
"text": "Server URL"
},
"$:/language/ControlPanel/Saving/TiddlySpot/UploadDir": {
"title": "$:/language/ControlPanel/Saving/TiddlySpot/UploadDir",
"text": "Upload Directory"
},
"$:/language/ControlPanel/Saving/TiddlySpot/UserName": {
"title": "$:/language/ControlPanel/Saving/TiddlySpot/UserName",
"text": "Wiki Name"
},
"$:/language/ControlPanel/Settings/AutoSave/Caption": {
"title": "$:/language/ControlPanel/Settings/AutoSave/Caption",
"text": "Autosave"
},
"$:/language/ControlPanel/Settings/AutoSave/Disabled/Description": {
"title": "$:/language/ControlPanel/Settings/AutoSave/Disabled/Description",
"text": "Do not save changes automatically"
},
"$:/language/ControlPanel/Settings/AutoSave/Enabled/Description": {
"title": "$:/language/ControlPanel/Settings/AutoSave/Enabled/Description",
"text": "Save changes automatically"
},
"$:/language/ControlPanel/Settings/AutoSave/Hint": {
"title": "$:/language/ControlPanel/Settings/AutoSave/Hint",
"text": "Automatically save changes during editing"
},
"$:/language/ControlPanel/Settings/Caption": {
"title": "$:/language/ControlPanel/Settings/Caption",
"text": "Settings"
},
"$:/language/ControlPanel/Settings/Hint": {
"title": "$:/language/ControlPanel/Settings/Hint",
"text": "These settings let you customise the behaviour of TiddlyWiki."
},
"$:/language/ControlPanel/Settings/NavigationAddressBar/Caption": {
"title": "$:/language/ControlPanel/Settings/NavigationAddressBar/Caption",
"text": "Navigation Address Bar"
},
"$:/language/ControlPanel/Settings/NavigationAddressBar/Hint": {
"title": "$:/language/ControlPanel/Settings/NavigationAddressBar/Hint",
"text": "Behaviour of the browser address bar when navigating to a tiddler:"
},
"$:/language/ControlPanel/Settings/NavigationAddressBar/No/Description": {
"title": "$:/language/ControlPanel/Settings/NavigationAddressBar/No/Description",
"text": "Do not update the address bar"
},
"$:/language/ControlPanel/Settings/NavigationAddressBar/Permalink/Description": {
"title": "$:/language/ControlPanel/Settings/NavigationAddressBar/Permalink/Description",
"text": "Include the target tiddler"
},
"$:/language/ControlPanel/Settings/NavigationAddressBar/Permaview/Description": {
"title": "$:/language/ControlPanel/Settings/NavigationAddressBar/Permaview/Description",
"text": "Include the target tiddler and the current story sequence"
},
"$:/language/ControlPanel/Settings/NavigationHistory/Caption": {
"title": "$:/language/ControlPanel/Settings/NavigationHistory/Caption",
"text": "Navigation History"
},
"$:/language/ControlPanel/Settings/NavigationHistory/Hint": {
"title": "$:/language/ControlPanel/Settings/NavigationHistory/Hint",
"text": "Update browser history when navigating to a tiddler:"
},
"$:/language/ControlPanel/Settings/NavigationHistory/No/Description": {
"title": "$:/language/ControlPanel/Settings/NavigationHistory/No/Description",
"text": "Do not update history"
},
"$:/language/ControlPanel/Settings/NavigationHistory/Yes/Description": {
"title": "$:/language/ControlPanel/Settings/NavigationHistory/Yes/Description",
"text": "Update history"
},
"$:/language/ControlPanel/Settings/ToolbarButtons/Caption": {
"title": "$:/language/ControlPanel/Settings/ToolbarButtons/Caption",
"text": "Toolbar Buttons"
},
"$:/language/ControlPanel/Settings/ToolbarButtons/Hint": {
"title": "$:/language/ControlPanel/Settings/ToolbarButtons/Hint",
"text": "Default toolbar button appearance:"
},
"$:/language/ControlPanel/Settings/ToolbarButtons/Icons/Description": {
"title": "$:/language/ControlPanel/Settings/ToolbarButtons/Icons/Description",
"text": "Include icon"
},
"$:/language/ControlPanel/Settings/ToolbarButtons/Text/Description": {
"title": "$:/language/ControlPanel/Settings/ToolbarButtons/Text/Description",
"text": "Include text"
},
"$:/language/ControlPanel/StoryView/Caption": {
"title": "$:/language/ControlPanel/StoryView/Caption",
"text": "Story View"
},
"$:/language/ControlPanel/StoryView/Prompt": {
"title": "$:/language/ControlPanel/StoryView/Prompt",
"text": "Current view:"
},
"$:/language/ControlPanel/Theme/Caption": {
"title": "$:/language/ControlPanel/Theme/Caption",
"text": "Theme"
},
"$:/language/ControlPanel/Theme/Prompt": {
"title": "$:/language/ControlPanel/Theme/Prompt",
"text": "Current theme:"
},
"$:/language/ControlPanel/TiddlerFields/Caption": {
"title": "$:/language/ControlPanel/TiddlerFields/Caption",
"text": "Tiddler Fields"
},
"$:/language/ControlPanel/TiddlerFields/Hint": {
"title": "$:/language/ControlPanel/TiddlerFields/Hint",
"text": "This is the full set of TiddlerFields in use in this wiki (including system tiddlers but excluding shadow tiddlers)."
},
"$:/language/ControlPanel/Toolbars/Caption": {
"title": "$:/language/ControlPanel/Toolbars/Caption",
"text": "Toolbars"
},
"$:/language/ControlPanel/Toolbars/EditToolbar/Caption": {
"title": "$:/language/ControlPanel/Toolbars/EditToolbar/Caption",
"text": "Edit Toolbar"
},
"$:/language/ControlPanel/Toolbars/EditToolbar/Hint": {
"title": "$:/language/ControlPanel/Toolbars/EditToolbar/Hint",
"text": "Choose which buttons are displayed for tiddlers in edit mode"
},
"$:/language/ControlPanel/Toolbars/Hint": {
"title": "$:/language/ControlPanel/Toolbars/Hint",
"text": "Select which toolbar buttons are displayed"
},
"$:/language/ControlPanel/Toolbars/PageControls/Caption": {
"title": "$:/language/ControlPanel/Toolbars/PageControls/Caption",
"text": "Page Toolbar"
},
"$:/language/ControlPanel/Toolbars/PageControls/Hint": {
"title": "$:/language/ControlPanel/Toolbars/PageControls/Hint",
"text": "Choose which buttons are displayed on the main page toolbar "
},
"$:/language/ControlPanel/Toolbars/ViewToolbar/Caption": {
"title": "$:/language/ControlPanel/Toolbars/ViewToolbar/Caption",
"text": "View Toolbar"
},
"$:/language/ControlPanel/Toolbars/ViewToolbar/Hint": {
"title": "$:/language/ControlPanel/Toolbars/ViewToolbar/Hint",
"text": "Choose which buttons are displayed for tiddlers in view mode"
},
"$:/language/ControlPanel/Tools/Download/Full/Caption": {
"title": "$:/language/ControlPanel/Tools/Download/Full/Caption",
"text": "Download full wiki"
},
"$:/language/Date/DaySuffix/1": {
"title": "$:/language/Date/DaySuffix/1",
"text": "st"
},
"$:/language/Date/DaySuffix/2": {
"title": "$:/language/Date/DaySuffix/2",
"text": "nd"
},
"$:/language/Date/DaySuffix/3": {
"title": "$:/language/Date/DaySuffix/3",
"text": "rd"
},
"$:/language/Date/DaySuffix/4": {
"title": "$:/language/Date/DaySuffix/4",
"text": "th"
},
"$:/language/Date/DaySuffix/5": {
"title": "$:/language/Date/DaySuffix/5",
"text": "th"
},
"$:/language/Date/DaySuffix/6": {
"title": "$:/language/Date/DaySuffix/6",
"text": "th"
},
"$:/language/Date/DaySuffix/7": {
"title": "$:/language/Date/DaySuffix/7",
"text": "th"
},
"$:/language/Date/DaySuffix/8": {
"title": "$:/language/Date/DaySuffix/8",
"text": "th"
},
"$:/language/Date/DaySuffix/9": {
"title": "$:/language/Date/DaySuffix/9",
"text": "th"
},
"$:/language/Date/DaySuffix/10": {
"title": "$:/language/Date/DaySuffix/10",
"text": "th"
},
"$:/language/Date/DaySuffix/11": {
"title": "$:/language/Date/DaySuffix/11",
"text": "th"
},
"$:/language/Date/DaySuffix/12": {
"title": "$:/language/Date/DaySuffix/12",
"text": "th"
},
"$:/language/Date/DaySuffix/13": {
"title": "$:/language/Date/DaySuffix/13",
"text": "th"
},
"$:/language/Date/DaySuffix/14": {
"title": "$:/language/Date/DaySuffix/14",
"text": "th"
},
"$:/language/Date/DaySuffix/15": {
"title": "$:/language/Date/DaySuffix/15",
"text": "th"
},
"$:/language/Date/DaySuffix/16": {
"title": "$:/language/Date/DaySuffix/16",
"text": "th"
},
"$:/language/Date/DaySuffix/17": {
"title": "$:/language/Date/DaySuffix/17",
"text": "th"
},
"$:/language/Date/DaySuffix/18": {
"title": "$:/language/Date/DaySuffix/18",
"text": "th"
},
"$:/language/Date/DaySuffix/19": {
"title": "$:/language/Date/DaySuffix/19",
"text": "th"
},
"$:/language/Date/DaySuffix/20": {
"title": "$:/language/Date/DaySuffix/20",
"text": "th"
},
"$:/language/Date/DaySuffix/21": {
"title": "$:/language/Date/DaySuffix/21",
"text": "st"
},
"$:/language/Date/DaySuffix/22": {
"title": "$:/language/Date/DaySuffix/22",
"text": "nd"
},
"$:/language/Date/DaySuffix/23": {
"title": "$:/language/Date/DaySuffix/23",
"text": "rd"
},
"$:/language/Date/DaySuffix/24": {
"title": "$:/language/Date/DaySuffix/24",
"text": "th"
},
"$:/language/Date/DaySuffix/25": {
"title": "$:/language/Date/DaySuffix/25",
"text": "th"
},
"$:/language/Date/DaySuffix/26": {
"title": "$:/language/Date/DaySuffix/26",
"text": "th"
},
"$:/language/Date/DaySuffix/27": {
"title": "$:/language/Date/DaySuffix/27",
"text": "th"
},
"$:/language/Date/DaySuffix/28": {
"title": "$:/language/Date/DaySuffix/28",
"text": "th"
},
"$:/language/Date/DaySuffix/29": {
"title": "$:/language/Date/DaySuffix/29",
"text": "th"
},
"$:/language/Date/DaySuffix/30": {
"title": "$:/language/Date/DaySuffix/30",
"text": "th"
},
"$:/language/Date/DaySuffix/31": {
"title": "$:/language/Date/DaySuffix/31",
"text": "st"
},
"$:/language/Date/Long/Day/0": {
"title": "$:/language/Date/Long/Day/0",
"text": "Sunday"
},
"$:/language/Date/Long/Day/1": {
"title": "$:/language/Date/Long/Day/1",
"text": "Monday"
},
"$:/language/Date/Long/Day/2": {
"title": "$:/language/Date/Long/Day/2",
"text": "Tuesday"
},
"$:/language/Date/Long/Day/3": {
"title": "$:/language/Date/Long/Day/3",
"text": "Wednesday"
},
"$:/language/Date/Long/Day/4": {
"title": "$:/language/Date/Long/Day/4",
"text": "Thursday"
},
"$:/language/Date/Long/Day/5": {
"title": "$:/language/Date/Long/Day/5",
"text": "Friday"
},
"$:/language/Date/Long/Day/6": {
"title": "$:/language/Date/Long/Day/6",
"text": "Saturday"
},
"$:/language/Date/Long/Month/1": {
"title": "$:/language/Date/Long/Month/1",
"text": "January"
},
"$:/language/Date/Long/Month/2": {
"title": "$:/language/Date/Long/Month/2",
"text": "February"
},
"$:/language/Date/Long/Month/3": {
"title": "$:/language/Date/Long/Month/3",
"text": "March"
},
"$:/language/Date/Long/Month/4": {
"title": "$:/language/Date/Long/Month/4",
"text": "April"
},
"$:/language/Date/Long/Month/5": {
"title": "$:/language/Date/Long/Month/5",
"text": "May"
},
"$:/language/Date/Long/Month/6": {
"title": "$:/language/Date/Long/Month/6",
"text": "June"
},
"$:/language/Date/Long/Month/7": {
"title": "$:/language/Date/Long/Month/7",
"text": "July"
},
"$:/language/Date/Long/Month/8": {
"title": "$:/language/Date/Long/Month/8",
"text": "August"
},
"$:/language/Date/Long/Month/9": {
"title": "$:/language/Date/Long/Month/9",
"text": "September"
},
"$:/language/Date/Long/Month/10": {
"title": "$:/language/Date/Long/Month/10",
"text": "October"
},
"$:/language/Date/Long/Month/11": {
"title": "$:/language/Date/Long/Month/11",
"text": "November"
},
"$:/language/Date/Long/Month/12": {
"title": "$:/language/Date/Long/Month/12",
"text": "December"
},
"$:/language/Date/Period/am": {
"title": "$:/language/Date/Period/am",
"text": "am"
},
"$:/language/Date/Period/pm": {
"title": "$:/language/Date/Period/pm",
"text": "pm"
},
"$:/language/Date/Short/Day/0": {
"title": "$:/language/Date/Short/Day/0",
"text": "Sun"
},
"$:/language/Date/Short/Day/1": {
"title": "$:/language/Date/Short/Day/1",
"text": "Mon"
},
"$:/language/Date/Short/Day/2": {
"title": "$:/language/Date/Short/Day/2",
"text": "Tue"
},
"$:/language/Date/Short/Day/3": {
"title": "$:/language/Date/Short/Day/3",
"text": "Wed"
},
"$:/language/Date/Short/Day/4": {
"title": "$:/language/Date/Short/Day/4",
"text": "Thu"
},
"$:/language/Date/Short/Day/5": {
"title": "$:/language/Date/Short/Day/5",
"text": "Fri"
},
"$:/language/Date/Short/Day/6": {
"title": "$:/language/Date/Short/Day/6",
"text": "Sat"
},
"$:/language/Date/Short/Month/1": {
"title": "$:/language/Date/Short/Month/1",
"text": "Jan"
},
"$:/language/Date/Short/Month/2": {
"title": "$:/language/Date/Short/Month/2",
"text": "Feb"
},
"$:/language/Date/Short/Month/3": {
"title": "$:/language/Date/Short/Month/3",
"text": "Mar"
},
"$:/language/Date/Short/Month/4": {
"title": "$:/language/Date/Short/Month/4",
"text": "Apr"
},
"$:/language/Date/Short/Month/5": {
"title": "$:/language/Date/Short/Month/5",
"text": "May"
},
"$:/language/Date/Short/Month/6": {
"title": "$:/language/Date/Short/Month/6",
"text": "Jun"
},
"$:/language/Date/Short/Month/7": {
"title": "$:/language/Date/Short/Month/7",
"text": "Jul"
},
"$:/language/Date/Short/Month/8": {
"title": "$:/language/Date/Short/Month/8",
"text": "Aug"
},
"$:/language/Date/Short/Month/9": {
"title": "$:/language/Date/Short/Month/9",
"text": "Sep"
},
"$:/language/Date/Short/Month/10": {
"title": "$:/language/Date/Short/Month/10",
"text": "Oct"
},
"$:/language/Date/Short/Month/11": {
"title": "$:/language/Date/Short/Month/11",
"text": "Nov"
},
"$:/language/Date/Short/Month/12": {
"title": "$:/language/Date/Short/Month/12",
"text": "Dec"
},
"$:/language/RelativeDate/Future/Days": {
"title": "$:/language/RelativeDate/Future/Days",
"text": "<<period>> days from now"
},
"$:/language/RelativeDate/Future/Hours": {
"title": "$:/language/RelativeDate/Future/Hours",
"text": "<<period>> hours from now"
},
"$:/language/RelativeDate/Future/Minutes": {
"title": "$:/language/RelativeDate/Future/Minutes",
"text": "<<period>> minutes from now"
},
"$:/language/RelativeDate/Future/Months": {
"title": "$:/language/RelativeDate/Future/Months",
"text": "<<period>> months from now"
},
"$:/language/RelativeDate/Future/Second": {
"title": "$:/language/RelativeDate/Future/Second",
"text": "1 second from now"
},
"$:/language/RelativeDate/Future/Seconds": {
"title": "$:/language/RelativeDate/Future/Seconds",
"text": "<<period>> seconds from now"
},
"$:/language/RelativeDate/Future/Years": {
"title": "$:/language/RelativeDate/Future/Years",
"text": "<<period>> years from now"
},
"$:/language/RelativeDate/Past/Days": {
"title": "$:/language/RelativeDate/Past/Days",
"text": "<<period>> days ago"
},
"$:/language/RelativeDate/Past/Hours": {
"title": "$:/language/RelativeDate/Past/Hours",
"text": "<<period>> hours ago"
},
"$:/language/RelativeDate/Past/Minutes": {
"title": "$:/language/RelativeDate/Past/Minutes",
"text": "<<period>> minutes ago"
},
"$:/language/RelativeDate/Past/Months": {
"title": "$:/language/RelativeDate/Past/Months",
"text": "<<period>> months ago"
},
"$:/language/RelativeDate/Past/Second": {
"title": "$:/language/RelativeDate/Past/Second",
"text": "1 second ago"
},
"$:/language/RelativeDate/Past/Seconds": {
"title": "$:/language/RelativeDate/Past/Seconds",
"text": "<<period>> seconds ago"
},
"$:/language/RelativeDate/Past/Years": {
"title": "$:/language/RelativeDate/Past/Years",
"text": "<<period>> years ago"
},
"$:/language/Docs/ModuleTypes/animation": {
"title": "$:/language/Docs/ModuleTypes/animation",
"text": "Animations that may be used with the RevealWidget."
},
"$:/language/Docs/ModuleTypes/command": {
"title": "$:/language/Docs/ModuleTypes/command",
"text": "Commands that can be executed under Node.js."
},
"$:/language/Docs/ModuleTypes/config": {
"title": "$:/language/Docs/ModuleTypes/config",
"text": "Data to be inserted into `$tw.config`."
},
"$:/language/Docs/ModuleTypes/filteroperator": {
"title": "$:/language/Docs/ModuleTypes/filteroperator",
"text": "Individual filter operator methods."
},
"$:/language/Docs/ModuleTypes/global": {
"title": "$:/language/Docs/ModuleTypes/global",
"text": "Global data to be inserted into `$tw`."
},
"$:/language/Docs/ModuleTypes/isfilteroperator": {
"title": "$:/language/Docs/ModuleTypes/isfilteroperator",
"text": "Operands for the ''is'' filter operator."
},
"$:/language/Docs/ModuleTypes/macro": {
"title": "$:/language/Docs/ModuleTypes/macro",
"text": "JavaScript macro definitions."
},
"$:/language/Docs/ModuleTypes/parser": {
"title": "$:/language/Docs/ModuleTypes/parser",
"text": "Parsers for different content types."
},
"$:/language/Docs/ModuleTypes/saver": {
"title": "$:/language/Docs/ModuleTypes/saver",
"text": "Savers handle different methods for saving files from the browser."
},
"$:/language/Docs/ModuleTypes/startup": {
"title": "$:/language/Docs/ModuleTypes/startup",
"text": "Startup functions."
},
"$:/language/Docs/ModuleTypes/storyview": {
"title": "$:/language/Docs/ModuleTypes/storyview",
"text": "Story views customise the animation and behaviour of list widgets."
},
"$:/language/Docs/ModuleTypes/tiddlerdeserializer": {
"title": "$:/language/Docs/ModuleTypes/tiddlerdeserializer",
"text": "Converts different content types into tiddlers."
},
"$:/language/Docs/ModuleTypes/tiddlerfield": {
"title": "$:/language/Docs/ModuleTypes/tiddlerfield",
"text": "Defines the behaviour of an individual tiddler field."
},
"$:/language/Docs/ModuleTypes/tiddlermethod": {
"title": "$:/language/Docs/ModuleTypes/tiddlermethod",
"text": "Adds methods to the `$tw.Tiddler` prototype."
},
"$:/language/Docs/ModuleTypes/upgrader": {
"title": "$:/language/Docs/ModuleTypes/upgrader",
"text": "Applies upgrade processing to tiddlers during an upgrade/import."
},
"$:/language/Docs/ModuleTypes/utils": {
"title": "$:/language/Docs/ModuleTypes/utils",
"text": "Adds methods to `$tw.utils`."
},
"$:/language/Docs/ModuleTypes/utils-node": {
"title": "$:/language/Docs/ModuleTypes/utils-node",
"text": "Adds Node.js-specific methods to `$tw.utils`."
},
"$:/language/Docs/ModuleTypes/widget": {
"title": "$:/language/Docs/ModuleTypes/widget",
"text": "Widgets encapsulate DOM rendering and refreshing."
},
"$:/language/Docs/ModuleTypes/wikimethod": {
"title": "$:/language/Docs/ModuleTypes/wikimethod",
"text": "Adds methods to `$tw.Wiki`."
},
"$:/language/Docs/ModuleTypes/wikirule": {
"title": "$:/language/Docs/ModuleTypes/wikirule",
"text": "Individual parser rules for the main WikiText parser."
},
"$:/language/Docs/PaletteColours/alert-background": {
"title": "$:/language/Docs/PaletteColours/alert-background",
"text": "Alert background"
},
"$:/language/Docs/PaletteColours/alert-border": {
"title": "$:/language/Docs/PaletteColours/alert-border",
"text": "Alert border"
},
"$:/language/Docs/PaletteColours/alert-highlight": {
"title": "$:/language/Docs/PaletteColours/alert-highlight",
"text": "Alert highlight"
},
"$:/language/Docs/PaletteColours/alert-muted-foreground": {
"title": "$:/language/Docs/PaletteColours/alert-muted-foreground",
"text": "Alert muted foreground"
},
"$:/language/Docs/PaletteColours/background": {
"title": "$:/language/Docs/PaletteColours/background",
"text": "General background"
},
"$:/language/Docs/PaletteColours/blockquote-bar": {
"title": "$:/language/Docs/PaletteColours/blockquote-bar",
"text": "Blockquote bar"
},
"$:/language/Docs/PaletteColours/dirty-indicator": {
"title": "$:/language/Docs/PaletteColours/dirty-indicator",
"text": "Unsaved changes indicator"
},
"$:/language/Docs/PaletteColours/code-background": {
"title": "$:/language/Docs/PaletteColours/code-background",
"text": "Code background"
},
"$:/language/Docs/PaletteColours/code-border": {
"title": "$:/language/Docs/PaletteColours/code-border",
"text": "Code border"
},
"$:/language/Docs/PaletteColours/code-foreground": {
"title": "$:/language/Docs/PaletteColours/code-foreground",
"text": "Code foreground"
},
"$:/language/Docs/PaletteColours/download-background": {
"title": "$:/language/Docs/PaletteColours/download-background",
"text": "Download button background"
},
"$:/language/Docs/PaletteColours/download-foreground": {
"title": "$:/language/Docs/PaletteColours/download-foreground",
"text": "Download button foreground"
},
"$:/language/Docs/PaletteColours/dragger-background": {
"title": "$:/language/Docs/PaletteColours/dragger-background",
"text": "Dragger background"
},
"$:/language/Docs/PaletteColours/dragger-foreground": {
"title": "$:/language/Docs/PaletteColours/dragger-foreground",
"text": "Dragger foreground"
},
"$:/language/Docs/PaletteColours/dropdown-background": {
"title": "$:/language/Docs/PaletteColours/dropdown-background",
"text": "Dropdown background"
},
"$:/language/Docs/PaletteColours/dropdown-border": {
"title": "$:/language/Docs/PaletteColours/dropdown-border",
"text": "Dropdown border"
},
"$:/language/Docs/PaletteColours/dropdown-tab-background-selected": {
"title": "$:/language/Docs/PaletteColours/dropdown-tab-background-selected",
"text": "Dropdown tab background for selected tabs"
},
"$:/language/Docs/PaletteColours/dropdown-tab-background": {
"title": "$:/language/Docs/PaletteColours/dropdown-tab-background",
"text": "Dropdown tab background"
},
"$:/language/Docs/PaletteColours/dropzone-background": {
"title": "$:/language/Docs/PaletteColours/dropzone-background",
"text": "Dropzone background"
},
"$:/language/Docs/PaletteColours/external-link-background-hover": {
"title": "$:/language/Docs/PaletteColours/external-link-background-hover",
"text": "External link background hover"
},
"$:/language/Docs/PaletteColours/external-link-background-visited": {
"title": "$:/language/Docs/PaletteColours/external-link-background-visited",
"text": "External link background visited"
},
"$:/language/Docs/PaletteColours/external-link-background": {
"title": "$:/language/Docs/PaletteColours/external-link-background",
"text": "External link background"
},
"$:/language/Docs/PaletteColours/external-link-foreground-hover": {
"title": "$:/language/Docs/PaletteColours/external-link-foreground-hover",
"text": "External link foreground hover"
},
"$:/language/Docs/PaletteColours/external-link-foreground-visited": {
"title": "$:/language/Docs/PaletteColours/external-link-foreground-visited",
"text": "External link foreground visited"
},
"$:/language/Docs/PaletteColours/external-link-foreground": {
"title": "$:/language/Docs/PaletteColours/external-link-foreground",
"text": "External link foreground"
},
"$:/language/Docs/PaletteColours/foreground": {
"title": "$:/language/Docs/PaletteColours/foreground",
"text": "General foreground"
},
"$:/language/Docs/PaletteColours/message-background": {
"title": "$:/language/Docs/PaletteColours/message-background",
"text": "Message box background"
},
"$:/language/Docs/PaletteColours/message-border": {
"title": "$:/language/Docs/PaletteColours/message-border",
"text": "Message box border"
},
"$:/language/Docs/PaletteColours/message-foreground": {
"title": "$:/language/Docs/PaletteColours/message-foreground",
"text": "Message box foreground"
},
"$:/language/Docs/PaletteColours/modal-backdrop": {
"title": "$:/language/Docs/PaletteColours/modal-backdrop",
"text": "Modal backdrop"
},
"$:/language/Docs/PaletteColours/modal-background": {
"title": "$:/language/Docs/PaletteColours/modal-background",
"text": "Modal background"
},
"$:/language/Docs/PaletteColours/modal-border": {
"title": "$:/language/Docs/PaletteColours/modal-border",
"text": "Modal border"
},
"$:/language/Docs/PaletteColours/modal-footer-background": {
"title": "$:/language/Docs/PaletteColours/modal-footer-background",
"text": "Modal footer background"
},
"$:/language/Docs/PaletteColours/modal-footer-border": {
"title": "$:/language/Docs/PaletteColours/modal-footer-border",
"text": "Modal footer border"
},
"$:/language/Docs/PaletteColours/modal-header-border": {
"title": "$:/language/Docs/PaletteColours/modal-header-border",
"text": "Modal header border"
},
"$:/language/Docs/PaletteColours/muted-foreground": {
"title": "$:/language/Docs/PaletteColours/muted-foreground",
"text": "General muted foreground"
},
"$:/language/Docs/PaletteColours/notification-background": {
"title": "$:/language/Docs/PaletteColours/notification-background",
"text": "Notification background"
},
"$:/language/Docs/PaletteColours/notification-border": {
"title": "$:/language/Docs/PaletteColours/notification-border",
"text": "Notification border"
},
"$:/language/Docs/PaletteColours/page-background": {
"title": "$:/language/Docs/PaletteColours/page-background",
"text": "Page background"
},
"$:/language/Docs/PaletteColours/pre-background": {
"title": "$:/language/Docs/PaletteColours/pre-background",
"text": "Preformatted code background"
},
"$:/language/Docs/PaletteColours/pre-border": {
"title": "$:/language/Docs/PaletteColours/pre-border",
"text": "Preformatted code border"
},
"$:/language/Docs/PaletteColours/primary": {
"title": "$:/language/Docs/PaletteColours/primary",
"text": "General primary"
},
"$:/language/Docs/PaletteColours/sidebar-button-foreground": {
"title": "$:/language/Docs/PaletteColours/sidebar-button-foreground",
"text": "Sidebar button foreground"
},
"$:/language/Docs/PaletteColours/sidebar-controls-foreground-hover": {
"title": "$:/language/Docs/PaletteColours/sidebar-controls-foreground-hover",
"text": "Sidebar controls foreground hover"
},
"$:/language/Docs/PaletteColours/sidebar-controls-foreground": {
"title": "$:/language/Docs/PaletteColours/sidebar-controls-foreground",
"text": "Sidebar controls foreground"
},
"$:/language/Docs/PaletteColours/sidebar-foreground-shadow": {
"title": "$:/language/Docs/PaletteColours/sidebar-foreground-shadow",
"text": "Sidebar foreground shadow"
},
"$:/language/Docs/PaletteColours/sidebar-foreground": {
"title": "$:/language/Docs/PaletteColours/sidebar-foreground",
"text": "Sidebar foreground"
},
"$:/language/Docs/PaletteColours/sidebar-muted-foreground-hover": {
"title": "$:/language/Docs/PaletteColours/sidebar-muted-foreground-hover",
"text": "Sidebar muted foreground hover"
},
"$:/language/Docs/PaletteColours/sidebar-muted-foreground": {
"title": "$:/language/Docs/PaletteColours/sidebar-muted-foreground",
"text": "Sidebar muted foreground"
},
"$:/language/Docs/PaletteColours/sidebar-tab-background-selected": {
"title": "$:/language/Docs/PaletteColours/sidebar-tab-background-selected",
"text": "Sidebar tab background for selected tabs"
},
"$:/language/Docs/PaletteColours/sidebar-tab-background": {
"title": "$:/language/Docs/PaletteColours/sidebar-tab-background",
"text": "Sidebar tab background"
},
"$:/language/Docs/PaletteColours/sidebar-tab-border-selected": {
"title": "$:/language/Docs/PaletteColours/sidebar-tab-border-selected",
"text": "Sidebar tab border for selected tabs"
},
"$:/language/Docs/PaletteColours/sidebar-tab-border": {
"title": "$:/language/Docs/PaletteColours/sidebar-tab-border",
"text": "Sidebar tab border"
},
"$:/language/Docs/PaletteColours/sidebar-tab-divider": {
"title": "$:/language/Docs/PaletteColours/sidebar-tab-divider",
"text": "Sidebar tab divider"
},
"$:/language/Docs/PaletteColours/sidebar-tab-foreground-selected": {
"title": "$:/language/Docs/PaletteColours/sidebar-tab-foreground-selected",
"text": "Sidebar tab foreground for selected tabs"
},
"$:/language/Docs/PaletteColours/sidebar-tab-foreground": {
"title": "$:/language/Docs/PaletteColours/sidebar-tab-foreground",
"text": "Sidebar tab foreground"
},
"$:/language/Docs/PaletteColours/sidebar-tiddler-link-foreground-hover": {
"title": "$:/language/Docs/PaletteColours/sidebar-tiddler-link-foreground-hover",
"text": "Sidebar tiddler link foreground hover"
},
"$:/language/Docs/PaletteColours/sidebar-tiddler-link-foreground": {
"title": "$:/language/Docs/PaletteColours/sidebar-tiddler-link-foreground",
"text": "Sidebar tiddler link foreground"
},
"$:/language/Docs/PaletteColours/static-alert-foreground": {
"title": "$:/language/Docs/PaletteColours/static-alert-foreground",
"text": "Static alert foreground"
},
"$:/language/Docs/PaletteColours/tab-background-selected": {
"title": "$:/language/Docs/PaletteColours/tab-background-selected",
"text": "Tab background for selected tabs"
},
"$:/language/Docs/PaletteColours/tab-background": {
"title": "$:/language/Docs/PaletteColours/tab-background",
"text": "Tab background"
},
"$:/language/Docs/PaletteColours/tab-border-selected": {
"title": "$:/language/Docs/PaletteColours/tab-border-selected",
"text": "Tab border for selected tabs"
},
"$:/language/Docs/PaletteColours/tab-border": {
"title": "$:/language/Docs/PaletteColours/tab-border",
"text": "Tab border"
},
"$:/language/Docs/PaletteColours/tab-divider": {
"title": "$:/language/Docs/PaletteColours/tab-divider",
"text": "Tab divider"
},
"$:/language/Docs/PaletteColours/tab-foreground-selected": {
"title": "$:/language/Docs/PaletteColours/tab-foreground-selected",
"text": "Tab foreground for selected tabs"
},
"$:/language/Docs/PaletteColours/tab-foreground": {
"title": "$:/language/Docs/PaletteColours/tab-foreground",
"text": "Tab foreground"
},
"$:/language/Docs/PaletteColours/table-border": {
"title": "$:/language/Docs/PaletteColours/table-border",
"text": "Table border"
},
"$:/language/Docs/PaletteColours/table-footer-background": {
"title": "$:/language/Docs/PaletteColours/table-footer-background",
"text": "Table footer background"
},
"$:/language/Docs/PaletteColours/table-header-background": {
"title": "$:/language/Docs/PaletteColours/table-header-background",
"text": "Table header background"
},
"$:/language/Docs/PaletteColours/tag-background": {
"title": "$:/language/Docs/PaletteColours/tag-background",
"text": "Tag background"
},
"$:/language/Docs/PaletteColours/tag-foreground": {
"title": "$:/language/Docs/PaletteColours/tag-foreground",
"text": "Tag foreground"
},
"$:/language/Docs/PaletteColours/tiddler-background": {
"title": "$:/language/Docs/PaletteColours/tiddler-background",
"text": "Tiddler background"
},
"$:/language/Docs/PaletteColours/tiddler-border": {
"title": "$:/language/Docs/PaletteColours/tiddler-border",
"text": "Tiddler border"
},
"$:/language/Docs/PaletteColours/tiddler-controls-foreground-hover": {
"title": "$:/language/Docs/PaletteColours/tiddler-controls-foreground-hover",
"text": "Tiddler controls foreground hover"
},
"$:/language/Docs/PaletteColours/tiddler-controls-foreground-selected": {
"title": "$:/language/Docs/PaletteColours/tiddler-controls-foreground-selected",
"text": "Tiddler controls foreground for selected controls"
},
"$:/language/Docs/PaletteColours/tiddler-controls-foreground": {
"title": "$:/language/Docs/PaletteColours/tiddler-controls-foreground",
"text": "Tiddler controls foreground"
},
"$:/language/Docs/PaletteColours/tiddler-editor-background": {
"title": "$:/language/Docs/PaletteColours/tiddler-editor-background",
"text": "Tiddler editor background"
},
"$:/language/Docs/PaletteColours/tiddler-editor-border-image": {
"title": "$:/language/Docs/PaletteColours/tiddler-editor-border-image",
"text": "Tiddler editor border image"
},
"$:/language/Docs/PaletteColours/tiddler-editor-border": {
"title": "$:/language/Docs/PaletteColours/tiddler-editor-border",
"text": "Tiddler editor border"
},
"$:/language/Docs/PaletteColours/tiddler-editor-fields-even": {
"title": "$:/language/Docs/PaletteColours/tiddler-editor-fields-even",
"text": "Tiddler editor background for even fields"
},
"$:/language/Docs/PaletteColours/tiddler-editor-fields-odd": {
"title": "$:/language/Docs/PaletteColours/tiddler-editor-fields-odd",
"text": "Tiddler editor background for odd fields"
},
"$:/language/Docs/PaletteColours/tiddler-info-background": {
"title": "$:/language/Docs/PaletteColours/tiddler-info-background",
"text": "Tiddler info panel background"
},
"$:/language/Docs/PaletteColours/tiddler-info-border": {
"title": "$:/language/Docs/PaletteColours/tiddler-info-border",
"text": "Tiddler info panel border"
},
"$:/language/Docs/PaletteColours/tiddler-info-tab-background": {
"title": "$:/language/Docs/PaletteColours/tiddler-info-tab-background",
"text": "Tiddler info panel tab background"
},
"$:/language/Docs/PaletteColours/tiddler-link-background": {
"title": "$:/language/Docs/PaletteColours/tiddler-link-background",
"text": "Tiddler link background"
},
"$:/language/Docs/PaletteColours/tiddler-link-foreground": {
"title": "$:/language/Docs/PaletteColours/tiddler-link-foreground",
"text": "Tiddler link foreground"
},
"$:/language/Docs/PaletteColours/tiddler-subtitle-foreground": {
"title": "$:/language/Docs/PaletteColours/tiddler-subtitle-foreground",
"text": "Tiddler subtitle foreground"
},
"$:/language/Docs/PaletteColours/tiddler-title-foreground": {
"title": "$:/language/Docs/PaletteColours/tiddler-title-foreground",
"text": "Tiddler title foreground"
},
"$:/language/Docs/PaletteColours/toolbar-new-button": {
"title": "$:/language/Docs/PaletteColours/toolbar-new-button",
"text": "Toolbar 'new tiddler' button foreground"
},
"$:/language/Docs/PaletteColours/toolbar-options-button": {
"title": "$:/language/Docs/PaletteColours/toolbar-options-button",
"text": "Toolbar 'options' button foreground"
},
"$:/language/Docs/PaletteColours/toolbar-save-button": {
"title": "$:/language/Docs/PaletteColours/toolbar-save-button",
"text": "Toolbar 'save' button foreground"
},
"$:/language/Docs/PaletteColours/toolbar-info-button": {
"title": "$:/language/Docs/PaletteColours/toolbar-info-button",
"text": "Toolbar 'info' button foreground"
},
"$:/language/Docs/PaletteColours/toolbar-edit-button": {
"title": "$:/language/Docs/PaletteColours/toolbar-edit-button",
"text": "Toolbar 'edit' button foreground"
},
"$:/language/Docs/PaletteColours/toolbar-close-button": {
"title": "$:/language/Docs/PaletteColours/toolbar-close-button",
"text": "Toolbar 'close' button foreground"
},
"$:/language/Docs/PaletteColours/toolbar-delete-button": {
"title": "$:/language/Docs/PaletteColours/toolbar-delete-button",
"text": "Toolbar 'delete' button foreground"
},
"$:/language/Docs/PaletteColours/toolbar-cancel-button": {
"title": "$:/language/Docs/PaletteColours/toolbar-cancel-button",
"text": "Toolbar 'cancel' button foreground"
},
"$:/language/Docs/PaletteColours/toolbar-done-button": {
"title": "$:/language/Docs/PaletteColours/toolbar-done-button",
"text": "Toolbar 'done' button foreground"
},
"$:/language/Docs/PaletteColours/untagged-background": {
"title": "$:/language/Docs/PaletteColours/untagged-background",
"text": "Untagged pill background"
},
"$:/language/Docs/PaletteColours/very-muted-foreground": {
"title": "$:/language/Docs/PaletteColours/very-muted-foreground",
"text": "Very muted foreground"
},
"$:/language/EditTemplate/Body/External/Hint": {
"title": "$:/language/EditTemplate/Body/External/Hint",
"text": "This is an external tiddler stored outside of the main TiddlyWiki file. You can edit the tags and fields but cannot directly edit the content itself"
},
"$:/language/EditTemplate/Body/Hint": {
"title": "$:/language/EditTemplate/Body/Hint",
"text": "Use [[wiki text|http://tiddlywiki.com/static/WikiText.html]] to add formatting, images, and dynamic features"
},
"$:/language/EditTemplate/Body/Placeholder": {
"title": "$:/language/EditTemplate/Body/Placeholder",
"text": "Type the text for this tiddler"
},
"$:/language/EditTemplate/Body/Preview/Button/Hide": {
"title": "$:/language/EditTemplate/Body/Preview/Button/Hide",
"text": "hide preview"
},
"$:/language/EditTemplate/Body/Preview/Button/Show": {
"title": "$:/language/EditTemplate/Body/Preview/Button/Show",
"text": "show preview"
},
"$:/language/EditTemplate/Field/Remove/Caption": {
"title": "$:/language/EditTemplate/Field/Remove/Caption",
"text": "remove field"
},
"$:/language/EditTemplate/Field/Remove/Hint": {
"title": "$:/language/EditTemplate/Field/Remove/Hint",
"text": "Remove field"
},
"$:/language/EditTemplate/Fields/Add/Button": {
"title": "$:/language/EditTemplate/Fields/Add/Button",
"text": "add"
},
"$:/language/EditTemplate/Fields/Add/Name/Placeholder": {
"title": "$:/language/EditTemplate/Fields/Add/Name/Placeholder",
"text": "field name"
},
"$:/language/EditTemplate/Fields/Add/Prompt": {
"title": "$:/language/EditTemplate/Fields/Add/Prompt",
"text": "Add a new field:"
},
"$:/language/EditTemplate/Fields/Add/Value/Placeholder": {
"title": "$:/language/EditTemplate/Fields/Add/Value/Placeholder",
"text": "field value"
},
"$:/language/EditTemplate/Shadow/Warning": {
"title": "$:/language/EditTemplate/Shadow/Warning",
"text": "This is a shadow tiddler. Any changes will override the default version"
},
"$:/language/EditTemplate/Shadow/OverriddenWarning": {
"title": "$:/language/EditTemplate/Shadow/OverriddenWarning",
"text": "This is a modified shadow tiddler. You can revert to the default version by deleting this tiddler"
},
"$:/language/EditTemplate/Tags/Add/Button": {
"title": "$:/language/EditTemplate/Tags/Add/Button",
"text": "add"
},
"$:/language/EditTemplate/Tags/Add/Placeholder": {
"title": "$:/language/EditTemplate/Tags/Add/Placeholder",
"text": "tag name"
},
"$:/language/EditTemplate/Tags/Dropdown/Caption": {
"title": "$:/language/EditTemplate/Tags/Dropdown/Caption",
"text": "tag list"
},
"$:/language/EditTemplate/Tags/Dropdown/Hint": {
"title": "$:/language/EditTemplate/Tags/Dropdown/Hint",
"text": "Show tag list"
},
"$:/language/EditTemplate/Type/Dropdown/Caption": {
"title": "$:/language/EditTemplate/Type/Dropdown/Caption",
"text": "content type list"
},
"$:/language/EditTemplate/Type/Dropdown/Hint": {
"title": "$:/language/EditTemplate/Type/Dropdown/Hint",
"text": "Show content type list"
},
"$:/language/EditTemplate/Type/Delete/Caption": {
"title": "$:/language/EditTemplate/Type/Delete/Caption",
"text": "delete content type"
},
"$:/language/EditTemplate/Type/Delete/Hint": {
"title": "$:/language/EditTemplate/Type/Delete/Hint",
"text": "Delete content type"
},
"$:/language/EditTemplate/Type/Placeholder": {
"title": "$:/language/EditTemplate/Type/Placeholder",
"text": "content type"
},
"$:/language/EditTemplate/Type/Prompt": {
"title": "$:/language/EditTemplate/Type/Prompt",
"text": "Type:"
},
"$:/language/Exporters/StaticRiver": {
"title": "$:/language/Exporters/StaticRiver",
"text": "River of tiddlers as static HTML file"
},
"$:/language/Exporters/JsonFile": {
"title": "$:/language/Exporters/JsonFile",
"text": "JSON tiddlers file"
},
"$:/language/Exporters/CsvFile": {
"title": "$:/language/Exporters/CsvFile",
"text": "CSV tiddlers file"
},
"$:/language/Exporters/TidFile": {
"title": "$:/language/Exporters/TidFile",
"text": "Single tiddler \".tid\" file"
},
"$:/language/Docs/Fields/_canonical_uri": {
"title": "$:/language/Docs/Fields/_canonical_uri",
"text": "The full URI of an external image tiddler"
},
"$:/language/Docs/Fields/bag": {
"title": "$:/language/Docs/Fields/bag",
"text": "The name of the bag from which a tiddler came"
},
"$:/language/Docs/Fields/caption": {
"title": "$:/language/Docs/Fields/caption",
"text": "The text to be displayed on a tab or button"
},
"$:/language/Docs/Fields/color": {
"title": "$:/language/Docs/Fields/color",
"text": "The CSS color value associated with a tiddler"
},
"$:/language/Docs/Fields/component": {
"title": "$:/language/Docs/Fields/component",
"text": "The name of the component responsible for an [[alert tiddler|AlertMechanism]]"
},
"$:/language/Docs/Fields/current-tiddler": {
"title": "$:/language/Docs/Fields/current-tiddler",
"text": "Used to cache the top tiddler in a [[history list|HistoryMechanism]]"
},
"$:/language/Docs/Fields/created": {
"title": "$:/language/Docs/Fields/created",
"text": "The date a tiddler was created"
},
"$:/language/Docs/Fields/creator": {
"title": "$:/language/Docs/Fields/creator",
"text": "The name of the person who created a tiddler"
},
"$:/language/Docs/Fields/dependents": {
"title": "$:/language/Docs/Fields/dependents",
"text": "For a plugin, lists the dependent plugin titles"
},
"$:/language/Docs/Fields/description": {
"title": "$:/language/Docs/Fields/description",
"text": "The descriptive text for a plugin, or a modal dialogue"
},
"$:/language/Docs/Fields/draft.of": {
"title": "$:/language/Docs/Fields/draft.of",
"text": "For draft tiddlers, contains the title of the tiddler of which this is a draft"
},
"$:/language/Docs/Fields/draft.title": {
"title": "$:/language/Docs/Fields/draft.title",
"text": "For draft tiddlers, contains the proposed new title of the tiddler"
},
"$:/language/Docs/Fields/footer": {
"title": "$:/language/Docs/Fields/footer",
"text": "The footer text for a wizard"
},
"$:/language/Docs/Fields/hack-to-give-us-something-to-compare-against": {
"title": "$:/language/Docs/Fields/hack-to-give-us-something-to-compare-against",
"text": "A temporary storage field used in [[$:/core/templates/static.content]]"
},
"$:/language/Docs/Fields/icon": {
"title": "$:/language/Docs/Fields/icon",
"text": "The title of the tiddler containing the icon associated with a tiddler"
},
"$:/language/Docs/Fields/library": {
"title": "$:/language/Docs/Fields/library",
"text": "If set to \"yes\" indicates that a tiddler should be saved as a JavaScript library"
},
"$:/language/Docs/Fields/list": {
"title": "$:/language/Docs/Fields/list",
"text": "An ordered list of tiddler titles associated with a tiddler"
},
"$:/language/Docs/Fields/list-before": {
"title": "$:/language/Docs/Fields/list-before",
"text": "If set, the title of a tiddler before which this tiddler should be added to the ordered list of tiddler titles, or at the start of the list if this field is present but empty"
},
"$:/language/Docs/Fields/list-after": {
"title": "$:/language/Docs/Fields/list-after",
"text": "If set, the title of the tiddler after which this tiddler should be added to the ordered list of tiddler titles"
},
"$:/language/Docs/Fields/modified": {
"title": "$:/language/Docs/Fields/modified",
"text": "The date and time at which a tiddler was last modified"
},
"$:/language/Docs/Fields/modifier": {
"title": "$:/language/Docs/Fields/modifier",
"text": "The tiddler title associated with the person who last modified a tiddler"
},
"$:/language/Docs/Fields/name": {
"title": "$:/language/Docs/Fields/name",
"text": "The human readable name associated with a plugin tiddler"
},
"$:/language/Docs/Fields/plugin-priority": {
"title": "$:/language/Docs/Fields/plugin-priority",
"text": "A numerical value indicating the priority of a plugin tiddler"
},
"$:/language/Docs/Fields/plugin-type": {
"title": "$:/language/Docs/Fields/plugin-type",
"text": "The type of plugin in a plugin tiddler"
},
"$:/language/Docs/Fields/revision": {
"title": "$:/language/Docs/Fields/revision",
"text": "The revision of the tiddler held at the server"
},
"$:/language/Docs/Fields/released": {
"title": "$:/language/Docs/Fields/released",
"text": "Date of a TiddlyWiki release"
},
"$:/language/Docs/Fields/source": {
"title": "$:/language/Docs/Fields/source",
"text": "The source URL associated with a tiddler"
},
"$:/language/Docs/Fields/subtitle": {
"title": "$:/language/Docs/Fields/subtitle",
"text": "The subtitle text for a wizard"
},
"$:/language/Docs/Fields/tags": {
"title": "$:/language/Docs/Fields/tags",
"text": "A list of tags associated with a tiddler"
},
"$:/language/Docs/Fields/text": {
"title": "$:/language/Docs/Fields/text",
"text": "The body text of a tiddler"
},
"$:/language/Docs/Fields/title": {
"title": "$:/language/Docs/Fields/title",
"text": "The unique name of a tiddler"
},
"$:/language/Docs/Fields/type": {
"title": "$:/language/Docs/Fields/type",
"text": "The content type of a tiddler"
},
"$:/language/Docs/Fields/version": {
"title": "$:/language/Docs/Fields/version",
"text": "Version information for a plugin"
},
"$:/language/Filters/AllTiddlers": {
"title": "$:/language/Filters/AllTiddlers",
"text": "All tiddlers except system tiddlers"
},
"$:/language/Filters/RecentSystemTiddlers": {
"title": "$:/language/Filters/RecentSystemTiddlers",
"text": "Recently modified tiddlers, including system tiddlers"
},
"$:/language/Filters/RecentTiddlers": {
"title": "$:/language/Filters/RecentTiddlers",
"text": "Recently modified tiddlers"
},
"$:/language/Filters/AllTags": {
"title": "$:/language/Filters/AllTags",
"text": "All tags except system tags"
},
"$:/language/Filters/Missing": {
"title": "$:/language/Filters/Missing",
"text": "Missing tiddlers"
},
"$:/language/Filters/Drafts": {
"title": "$:/language/Filters/Drafts",
"text": "Draft tiddlers"
},
"$:/language/Filters/Orphans": {
"title": "$:/language/Filters/Orphans",
"text": "Orphan tiddlers"
},
"$:/language/Filters/SystemTiddlers": {
"title": "$:/language/Filters/SystemTiddlers",
"text": "System tiddlers"
},
"$:/language/Filters/ShadowTiddlers": {
"title": "$:/language/Filters/ShadowTiddlers",
"text": "Shadow tiddlers"
},
"$:/language/Filters/OverriddenShadowTiddlers": {
"title": "$:/language/Filters/OverriddenShadowTiddlers",
"text": "Overridden shadow tiddlers"
},
"$:/language/Filters/SystemTags": {
"title": "$:/language/Filters/SystemTags",
"text": "System tags"
},
"GettingStarted": {
"title": "GettingStarted",
"text": "\\define lingo-base() $:/language/ControlPanel/Basics/\r\nWelcome to ~TiddlyWiki and the ~TiddlyWiki community\n\nBefore you start storing important information in ~TiddlyWiki it is important to make sure that you can reliably save changes. See http://tiddlywiki.com/#GettingStarted for details\n\n!! Set up this ~TiddlyWiki\n\n|<$link to=\"$:/SiteTitle\"><<lingo Title/Prompt>></$link> |<$edit-text tiddler=\"$:/SiteTitle\" default=\"\" tag=\"input\"/> |\r\n|<$link to=\"$:/SiteSubtitle\"><<lingo Subtitle/Prompt>></$link> |<$edit-text tiddler=\"$:/SiteSubtitle\" default=\"\" tag=\"input\"/> |\r\n|<$link to=\"$:/DefaultTiddlers\"><<lingo DefaultTiddlers/Prompt>></$link> |<<lingo DefaultTiddlers/TopHint>><br> <$edit-text tag=\"textarea\" tiddler=\"$:/DefaultTiddlers\"/><br>//<<lingo DefaultTiddlers/BottomHint>>// |\n\nSee the [[control panel|$:/ControlPanel]] for more options.\r\n"
},
"$:/language/Help/build": {
"title": "$:/language/Help/build",
"description": "Automatically run configured commands",
"text": "Build the specified build targets for the current wiki. If no build targets are specified then all available targets will be built.\n\n```\r\n--build <target> [<target> ...]\r\n```\n\nBuild targets are defined in the `tiddlywiki.info` file of a wiki folder.\n\n"
},
"$:/language/Help/clearpassword": {
"title": "$:/language/Help/clearpassword",
"description": "Clear a password for subsequent crypto operations",
"text": "Clear the password for subsequent crypto operations\n\n```\r\n--clearpassword\r\n```\r\n"
},
"$:/language/Help/default": {
"title": "$:/language/Help/default",
"text": "\\define commandTitle()\r\n$:/language/Help/$(command)$\r\n\\end\r\n```\r\nusage: tiddlywiki [<wikifolder>] [--<command> [<args>...]...]\r\n```\n\nAvailable commands:\n\n<ul>\r\n<$list filter=\"[commands[]sort[title]]\" variable=\"command\">\r\n<li><$link to=<<commandTitle>>><$macrocall $name=\"command\" $type=\"text/plain\" $output=\"text/plain\"/></$link>: <$transclude tiddler=<<commandTitle>> field=\"description\"/></li>\r\n</$list>\r\n</ul>\n\nTo get detailed help on a command:\n\n```\r\ntiddlywiki --help <command>\r\n```\r\n"
},
"$:/language/Help/editions": {
"title": "$:/language/Help/editions",
"description": "Lists the available editions of TiddlyWiki",
"text": "Lists the names and descriptions of the available editions. You can create a new wiki of a specified edition with the `--init` command.\n\n```\r\n--editions\r\n```\r\n"
},
"$:/language/Help/help": {
"title": "$:/language/Help/help",
"description": "Display help for TiddlyWiki commands",
"text": "Displays help text for a command:\n\n```\r\n--help [<command>]\r\n```\n\nIf the command name is omitted then a list of available commands is displayed.\r\n"
},
"$:/language/Help/init": {
"title": "$:/language/Help/init",
"description": "Initialise a new wiki folder",
"text": "Initialise an empty [[WikiFolder|WikiFolders]] with a copy of the specified edition.\n\n```\r\n--init <edition> [<edition> ...]\r\n```\n\nFor example:\n\n```\r\ntiddlywiki ./MyWikiFolder --init empty\r\n```\n\nNote:\n\n* The wiki folder directory will be created if necessary\r\n* The \"edition\" defaults to ''empty''\r\n* The init command will fail if the wiki folder is not empty\r\n* The init command removes any `includeWikis` definitions in the edition's `tiddlywiki.info` file\r\n* When multiple editions are specified, editions initialised later will overwrite any files shared with earlier editions (so, the final `tiddlywiki.info` file will be copied from the last edition)\r\n* `--editions` returns a list of available editions\r\n"
},
"$:/language/Help/load": {
"title": "$:/language/Help/load",
"description": "Load tiddlers from a file",
"text": "Load tiddlers from 2.x.x TiddlyWiki files (`.html`), `.tiddler`, `.tid`, `.json` or other files \n\n```\r\n--load <filepath>\r\n```\n\nTo load tiddlers from an encrypted TiddlyWiki file you should first specify the password with the PasswordCommand. For example:\n\n```\r\ntiddlywiki ./MyWiki --password pa55w0rd --load my_encrypted_wiki.html\r\n```\n\nNote that TiddlyWiki will not load an older version of an already loaded plugin.\r\n"
},
"$:/language/Help/makelibrary": {
"title": "$:/language/Help/makelibrary",
"description": "Construct library plugin required by upgrade process",
"text": "Constructs the `$:/UpgradeLibrary` tiddler for the upgrade process.\n\nThe upgrade library is formatted as an ordinary plugin tiddler with the plugin type `library`. It contains a copy of each of the plugins, themes and language packs available within the TiddlyWiki5 repository.\n\nThis command is intended for internal use; it is only relevant to users constructing a custom upgrade procedure.\n\n```\r\n--makelibrary <title>\r\n```\n\nThe title argument defaults to `$:/UpgradeLibrary`.\r\n"
},
"$:/language/Help/notfound": {
"title": "$:/language/Help/notfound",
"text": "No such help item"
},
"$:/language/Help/output": {
"title": "$:/language/Help/output",
"description": "Set the base output directory for subsequent commands",
"text": "Sets the base output directory for subsequent commands. The default output directory is the `output` subdirectory of the edition directory.\n\n```\r\n--output <pathname>\r\n```\n\nIf the specified pathname is relative then it is resolved relative to the current working directory. For example `--output .` sets the output directory to the current working directory.\n\n"
},
"$:/language/Help/password": {
"title": "$:/language/Help/password",
"description": "Set a password for subsequent crypto operations",
"text": "Set a password for subsequent crypto operations\n\n```\r\n--password <password>\r\n```\n\n"
},
"$:/language/Help/rendertiddler": {
"title": "$:/language/Help/rendertiddler",
"description": "Render an individual tiddler as a specified ContentType",
"text": "Render an individual tiddler as a specified ContentType, defaults to `text/html` and save it to the specified filename:\n\n```\r\n--rendertiddler <title> <filename> [<type>]\r\n```\n\nBy default, the filename is resolved relative to the `output` subdirectory of the edition directory. The `--output` command can be used to direct output to a different directory.\n\nAny missing directories in the path to the filename are automatically created.\r\n"
},
"$:/language/Help/rendertiddlers": {
"title": "$:/language/Help/rendertiddlers",
"description": "Render tiddlers matching a filter to a specified ContentType",
"text": "Render a set of tiddlers matching a filter to separate files of a specified ContentType (defaults to `text/html`) and extension (defaults to `.html`).\n\n```\r\n--rendertiddlers <filter> <template> <pathname> [<type>] [<extension>] [\"noclean\"]\r\n```\n\nFor example:\n\n```\r\n--rendertiddlers [!is[system]] $:/core/templates/static.tiddler.html ./static text/plain\r\n```\n\nBy default, the pathname is resolved relative to the `output` subdirectory of the edition directory. The `--output` command can be used to direct output to a different directory.\n\nAny files in the target directory are deleted unless the \"noclean\" parameter is specified. The target directory is recursively created if it is missing.\r\n"
},
"$:/language/Help/savetiddler": {
"title": "$:/language/Help/savetiddler",
"description": "Saves a raw tiddler to a file",
"text": "Saves an individual tiddler in its raw text or binary format to the specified filename. \n\n```\r\n--savetiddler <title> <filename>\r\n```\n\nBy default, the filename is resolved relative to the `output` subdirectory of the edition directory. The `--output` command can be used to direct output to a different directory.\n\nAny missing directories in the path to the filename are automatically created.\r\n"
},
"$:/language/Help/savetiddlers": {
"title": "$:/language/Help/savetiddlers",
"description": "Saves a group of raw tiddlers to a directory",
"text": "Saves a group of tiddlers in their raw text or binary format to the specified directory. \n\n```\r\n--savetiddlers <filter> <pathname>\r\n```\n\nBy default, the pathname is resolved relative to the `output` subdirectory of the edition directory. The `--output` command can be used to direct output to a different directory.\n\nAny missing directories in the pathname are automatically created.\r\n"
},
"$:/language/Help/server": {
"title": "$:/language/Help/server",
"description": "Provides an HTTP server interface to TiddlyWiki",
"text": "The server built in to TiddlyWiki5 is very simple. Although compatible with TiddlyWeb it doesn't support many of the features needed for robust Internet-facing usage.\n\nAt the root, it serves a rendering of a specified tiddler. Away from the root, it serves individual tiddlers encoded in JSON, and supports the basic HTTP operations for `GET`, `PUT` and `DELETE`.\n\n```\r\n--server <port> <roottiddler> <rendertype> <servetype> <username> <password> <host> <pathprefix>\r\n```\n\nThe parameters are:\n\n* ''port'' - port number to serve from (defaults to \"8080\")\r\n* ''roottiddler'' - the tiddler to serve at the root (defaults to \"$:/core/save/all\") \r\n* ''rendertype'' - the content type to which the root tiddler should be rendered (defaults to \"text/plain\")\r\n* ''servetype'' - the content type with which the root tiddler should be served (defaults to \"text/html\")\r\n* ''username'' - the default username for signing edits\r\n* ''password'' - optional password for basic authentication\r\n* ''host'' - optional hostname to serve from (defaults to \"127.0.0.1\" aka \"localhost\")\r\n* ''pathprefix'' - optional prefix for paths\n\nIf the password parameter is specified then the browser will prompt the user for the username and password. Note that the password is transmitted in plain text so this implementation isn't suitable for general use.\n\nFor example:\n\n```\r\n--server 8080 $:/core/save/all text/plain text/html MyUserName passw0rd\r\n```\n\nThe username and password can be specified as empty strings if you need to set the hostname or pathprefix and don't want to require a password:\n\n```\r\n--server 8080 $:/core/save/all text/plain text/html \"\" \"\" 192.168.0.245\r\n```\n\nTo run multiple TiddlyWiki servers at the same time you'll need to put each one on a different port.\r\n"
},
"$:/language/Help/setfield": {
"title": "$:/language/Help/setfield",
"description": "Prepares external tiddlers for use",
"text": "//Note that this command is experimental and may change or be replaced before being finalised//\n\nSets the specified field of a group of tiddlers to the result of wikifying a template tiddler with the `currentTiddler` variable set to the tiddler.\n\n```\r\n--setfield <filter> <fieldname> <templatetitle> <rendertype>\r\n```\n\nThe parameters are:\n\n* ''filter'' - filter identifying the tiddlers to be affected\r\n* ''fieldname'' - the field to modify (defaults to \"text\")\r\n* ''templatetitle'' - the tiddler to wikify into the specified field. If blank or missing then the specified field is deleted\r\n* ''type'' - the text type to render (defaults to \"text/plain\"; \"text/html\" can be used to include HTML tags)\n\n"
},
"$:/language/Help/unpackplugin": {
"title": "$:/language/Help/unpackplugin",
"description": "Unpack the payload tiddlers from a plugin",
"text": "Extract the payload tiddlers from a plugin, creating them as ordinary tiddlers:\n\n```\r\n--unpackplugin <title>\r\n```\r\n"
},
"$:/language/Help/verbose": {
"title": "$:/language/Help/verbose",
"description": "Triggers verbose output mode",
"text": "Triggers verbose output, useful for debugging \n\n```\r\n--verbose\r\n```\r\n"
},
"$:/language/Help/version": {
"title": "$:/language/Help/version",
"description": "Displays the version number of TiddlyWiki",
"text": "Displays the version number of TiddlyWiki.\n\n```\r\n--version\r\n```\r\n"
},
"$:/languages/en-GB/icon": {
"title": "$:/languages/en-GB/icon",
"type": "image/svg+xml",
"text": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 60 30\" width=\"1200\" height=\"600\">\r\n<clipPath id=\"t\">\r\n\t<path d=\"M30,15 h30 v15 z v15 h-30 z h-30 v-15 z v-15 h30 z\"/>\r\n</clipPath>\r\n<path d=\"M0,0 v30 h60 v-30 z\" fill=\"#00247d\"/>\r\n<path d=\"M0,0 L60,30 M60,0 L0,30\" stroke=\"#fff\" stroke-width=\"6\"/>\r\n<path d=\"M0,0 L60,30 M60,0 L0,30\" clip-path=\"url(#t)\" stroke=\"#cf142b\" stroke-width=\"4\"/>\r\n<path d=\"M30,0 v30 M0,15 h60\" stroke=\"#fff\" stroke-width=\"10\"/>\r\n<path d=\"M30,0 v30 M0,15 h60\" stroke=\"#cf142b\" stroke-width=\"6\"/>\r\n</svg>\r\n"
},
"$:/language/Import/Listing/Cancel/Caption": {
"title": "$:/language/Import/Listing/Cancel/Caption",
"text": "Cancel"
},
"$:/language/Import/Listing/Hint": {
"title": "$:/language/Import/Listing/Hint",
"text": "These tiddlers are ready to import:"
},
"$:/language/Import/Listing/Import/Caption": {
"title": "$:/language/Import/Listing/Import/Caption",
"text": "Import"
},
"$:/language/Import/Listing/Select/Caption": {
"title": "$:/language/Import/Listing/Select/Caption",
"text": "Select"
},
"$:/language/Import/Listing/Status/Caption": {
"title": "$:/language/Import/Listing/Status/Caption",
"text": "Status"
},
"$:/language/Import/Listing/Title/Caption": {
"title": "$:/language/Import/Listing/Title/Caption",
"text": "Title"
},
"$:/language/Import/Upgrader/Plugins/Suppressed/Incompatible": {
"title": "$:/language/Import/Upgrader/Plugins/Suppressed/Incompatible",
"text": "Blocked incompatible or obsolete plugin "
},
"$:/language/Import/Upgrader/Plugins/Suppressed/Version": {
"title": "$:/language/Import/Upgrader/Plugins/Suppressed/Version",
"text": "Blocked plugin (due to incoming <<incoming>> being older than existing <<existing>>)"
},
"$:/language/Import/Upgrader/Plugins/Upgraded": {
"title": "$:/language/Import/Upgrader/Plugins/Upgraded",
"text": "Upgraded plugin from <<incoming>> to <<upgraded>>"
},
"$:/language/Import/Upgrader/State/Suppressed": {
"title": "$:/language/Import/Upgrader/State/Suppressed",
"text": "Blocked temporary state tiddler"
},
"$:/language/Import/Upgrader/System/Suppressed": {
"title": "$:/language/Import/Upgrader/System/Suppressed",
"text": "Blocked system tiddler"
},
"$:/language/Import/Upgrader/ThemeTweaks/Created": {
"title": "$:/language/Import/Upgrader/ThemeTweaks/Created",
"text": "Migrated theme tweak from <$text text=<<from>>/>"
},
"$:/language/BinaryWarning/Prompt": {
"title": "$:/language/BinaryWarning/Prompt",
"text": "This tiddler contains binary data"
},
"$:/language/ClassicWarning/Hint": {
"title": "$:/language/ClassicWarning/Hint",
"text": "This tiddler is written in TiddlyWiki Classic wiki text format, which is not fully compatible with TiddlyWiki version 5. See http://tiddlywiki.com/static/Upgrading.html for more details. "
},
"$:/language/ClassicWarning/Upgrade/Caption": {
"title": "$:/language/ClassicWarning/Upgrade/Caption",
"text": "upgrade"
},
"$:/language/CloseAll/Button": {
"title": "$:/language/CloseAll/Button",
"text": "close all"
},
"$:/language/ConfirmCancelTiddler": {
"title": "$:/language/ConfirmCancelTiddler",
"text": "Do you wish to discard changes to the tiddler \"<$text text=<<title>>/>\"?"
},
"$:/language/ConfirmDeleteTiddler": {
"title": "$:/language/ConfirmDeleteTiddler",
"text": "Do you wish to delete the tiddler \"<$text text=<<title>>/>\"?"
},
"$:/language/ConfirmOverwriteTiddler": {
"title": "$:/language/ConfirmOverwriteTiddler",
"text": "Do you wish to overwrite the tiddler \"<$text text=<<title>>/>\"?"
},
"$:/language/ConfirmEditShadowTiddler": {
"title": "$:/language/ConfirmEditShadowTiddler",
"text": "You are about to edit a ShadowTiddler. Any changes will override the default system making future upgrades non-trivial. Are you sure you want to edit \"<$text text=<<title>>/>\"?"
},
"$:/language/DefaultNewTiddlerTitle": {
"title": "$:/language/DefaultNewTiddlerTitle",
"text": "New Tiddler"
},
"$:/language/DropMessage": {
"title": "$:/language/DropMessage",
"text": "Drop here (or click escape to cancel)"
},
"$:/language/Encryption/ConfirmClearPassword": {
"title": "$:/language/Encryption/ConfirmClearPassword",
"text": "Do you wish to clear the password? This will remove the encryption applied when saving this wiki"
},
"$:/language/Encryption/PromptSetPassword": {
"title": "$:/language/Encryption/PromptSetPassword",
"text": "Set a new password for this TiddlyWiki"
},
"$:/language/InvalidFieldName": {
"title": "$:/language/InvalidFieldName",
"text": "Illegal characters in field name \"<$text text=<<fieldName>>/>\". Fields can only contain lowercase letters, digits and the characters underscore (`_`), hyphen (`-`) and period (`.`)"
},
"$:/language/MissingTiddler/Hint": {
"title": "$:/language/MissingTiddler/Hint",
"text": "Missing tiddler \"<$text text=<<currentTiddler>>/>\" - click {{$:/core/images/edit-button}} to create"
},
"$:/language/RecentChanges/DateFormat": {
"title": "$:/language/RecentChanges/DateFormat",
"text": "DDth MMM YYYY"
},
"$:/language/SystemTiddler/Tooltip": {
"title": "$:/language/SystemTiddler/Tooltip",
"text": "This is a system tiddler"
},
"$:/language/TagManager/Colour/Heading": {
"title": "$:/language/TagManager/Colour/Heading",
"text": "Colour"
},
"$:/language/TagManager/Icon/Heading": {
"title": "$:/language/TagManager/Icon/Heading",
"text": "Icon"
},
"$:/language/TagManager/Info/Heading": {
"title": "$:/language/TagManager/Info/Heading",
"text": "Info"
},
"$:/language/TagManager/Tag/Heading": {
"title": "$:/language/TagManager/Tag/Heading",
"text": "Tag"
},
"$:/language/UnsavedChangesWarning": {
"title": "$:/language/UnsavedChangesWarning",
"text": "You have unsaved changes in TiddlyWiki"
},
"$:/language/Modals/Download": {
"title": "$:/language/Modals/Download",
"type": "text/vnd.tiddlywiki",
"subtitle": "Download changes",
"footer": "<$button message=\"tm-close-tiddler\">Close</$button>",
"help": "http://tiddlywiki.com/static/DownloadingChanges.html",
"text": "Your browser only supports manual saving.\n\nTo save your modified wiki, right click on the download link below and select \"Download file\" or \"Save file\", and then choose the folder and filename.\n\n//You can marginally speed things up by clicking the link with the control key (Windows) or the options/alt key (Mac OS X). You will not be prompted for the folder or filename, but your browser is likely to give it an unrecognisable name -- you may need to rename the file to include an `.html` extension before you can do anything useful with it.//\n\nOn smartphones that do not allow files to be downloaded you can instead bookmark the link, and then sync your bookmarks to a desktop computer from where the wiki can be saved normally.\r\n"
},
"$:/language/Modals/SaveInstructions": {
"title": "$:/language/Modals/SaveInstructions",
"type": "text/vnd.tiddlywiki",
"subtitle": "Save your work",
"footer": "<$button message=\"tm-close-tiddler\">Close</$button>",
"help": "http://tiddlywiki.com/static/SavingChanges.html",
"text": "Your changes to this wiki need to be saved as a ~TiddlyWiki HTML file.\n\n!!! Desktop browsers\n\n# Select ''Save As'' from the ''File'' menu\r\n# Choose a filename and location\r\n#* Some browsers also require you to explicitly specify the file saving format as ''Webpage, HTML only'' or similar\r\n# Close this tab\n\n!!! Smartphone browsers\n\n# Create a bookmark to this page\r\n#* If you've got iCloud or Google Sync set up then the bookmark will automatically sync to your desktop where you can open it and save it as above\r\n# Close this tab\n\n//If you open the bookmark again in Mobile Safari you will see this message again. If you want to go ahead and use the file, just click the ''close'' button below//\r\n"
},
"$:/config/NewJournal/Title": {
"title": "$:/config/NewJournal/Title",
"text": "DDth MMM YYYY"
},
"$:/config/NewJournal/Tags": {
"title": "$:/config/NewJournal/Tags",
"text": "Journal"
},
"$:/language/Notifications/Save/Done": {
"title": "$:/language/Notifications/Save/Done",
"text": "Saved wiki"
},
"$:/language/Notifications/Save/Starting": {
"title": "$:/language/Notifications/Save/Starting",
"text": "Starting to save wiki"
},
"$:/language/Search/DefaultResults/Caption": {
"title": "$:/language/Search/DefaultResults/Caption",
"text": "List"
},
"$:/language/Search/Filter/Caption": {
"title": "$:/language/Search/Filter/Caption",
"text": "Filter"
},
"$:/language/Search/Filter/Hint": {
"title": "$:/language/Search/Filter/Hint",
"text": "Search via a [[filter expression|http://tiddlywiki.com/static/Filters.html]]"
},
"$:/language/Search/Filter/Matches": {
"title": "$:/language/Search/Filter/Matches",
"text": "//<small><<resultCount>> matches</small>//"
},
"$:/language/Search/Matches": {
"title": "$:/language/Search/Matches",
"text": "//<small><<resultCount>> matches</small>//"
},
"$:/language/Search/Shadows/Caption": {
"title": "$:/language/Search/Shadows/Caption",
"text": "Shadows"
},
"$:/language/Search/Shadows/Hint": {
"title": "$:/language/Search/Shadows/Hint",
"text": "Search for shadow tiddlers"
},
"$:/language/Search/Shadows/Matches": {
"title": "$:/language/Search/Shadows/Matches",
"text": "//<small><<resultCount>> matches</small>//"
},
"$:/language/Search/Standard/Caption": {
"title": "$:/language/Search/Standard/Caption",
"text": "Standard"
},
"$:/language/Search/Standard/Hint": {
"title": "$:/language/Search/Standard/Hint",
"text": "Search for standard tiddlers"
},
"$:/language/Search/Standard/Matches": {
"title": "$:/language/Search/Standard/Matches",
"text": "//<small><<resultCount>> matches</small>//"
},
"$:/language/Search/System/Caption": {
"title": "$:/language/Search/System/Caption",
"text": "System"
},
"$:/language/Search/System/Hint": {
"title": "$:/language/Search/System/Hint",
"text": "Search for system tiddlers"
},
"$:/language/Search/System/Matches": {
"title": "$:/language/Search/System/Matches",
"text": "//<small><<resultCount>> matches</small>//"
},
"$:/language/SideBar/All/Caption": {
"title": "$:/language/SideBar/All/Caption",
"text": "All"
},
"$:/language/SideBar/Contents/Caption": {
"title": "$:/language/SideBar/Contents/Caption",
"text": "Contents"
},
"$:/language/SideBar/Drafts/Caption": {
"title": "$:/language/SideBar/Drafts/Caption",
"text": "Drafts"
},
"$:/language/SideBar/Missing/Caption": {
"title": "$:/language/SideBar/Missing/Caption",
"text": "Missing"
},
"$:/language/SideBar/More/Caption": {
"title": "$:/language/SideBar/More/Caption",
"text": "More"
},
"$:/language/SideBar/Open/Caption": {
"title": "$:/language/SideBar/Open/Caption",
"text": "Open"
},
"$:/language/SideBar/Orphans/Caption": {
"title": "$:/language/SideBar/Orphans/Caption",
"text": "Orphans"
},
"$:/language/SideBar/Recent/Caption": {
"title": "$:/language/SideBar/Recent/Caption",
"text": "Recent"
},
"$:/language/SideBar/Shadows/Caption": {
"title": "$:/language/SideBar/Shadows/Caption",
"text": "Shadows"
},
"$:/language/SideBar/System/Caption": {
"title": "$:/language/SideBar/System/Caption",
"text": "System"
},
"$:/language/SideBar/Tags/Caption": {
"title": "$:/language/SideBar/Tags/Caption",
"text": "Tags"
},
"$:/language/SideBar/Tags/Untagged/Caption": {
"title": "$:/language/SideBar/Tags/Untagged/Caption",
"text": "untagged"
},
"$:/language/SideBar/Tools/Caption": {
"title": "$:/language/SideBar/Tools/Caption",
"text": "Tools"
},
"$:/language/SideBar/Types/Caption": {
"title": "$:/language/SideBar/Types/Caption",
"text": "Types"
},
"$:/SiteSubtitle": {
"title": "$:/SiteSubtitle",
"text": "a non-linear personal web notebook"
},
"$:/SiteTitle": {
"title": "$:/SiteTitle",
"text": "My ~TiddlyWiki"
},
"$:/language/TiddlerInfo/Advanced/Caption": {
"title": "$:/language/TiddlerInfo/Advanced/Caption",
"text": "Advanced"
},
"$:/language/TiddlerInfo/Advanced/PluginInfo/Empty/Hint": {
"title": "$:/language/TiddlerInfo/Advanced/PluginInfo/Empty/Hint",
"text": "none"
},
"$:/language/TiddlerInfo/Advanced/PluginInfo/Heading": {
"title": "$:/language/TiddlerInfo/Advanced/PluginInfo/Heading",
"text": "Plugin Details"
},
"$:/language/TiddlerInfo/Advanced/PluginInfo/Hint": {
"title": "$:/language/TiddlerInfo/Advanced/PluginInfo/Hint",
"text": "This plugin contains the following shadow tiddlers:"
},
"$:/language/TiddlerInfo/Advanced/ShadowInfo/Heading": {
"title": "$:/language/TiddlerInfo/Advanced/ShadowInfo/Heading",
"text": "Shadow Status"
},
"$:/language/TiddlerInfo/Advanced/ShadowInfo/NotShadow/Hint": {
"title": "$:/language/TiddlerInfo/Advanced/ShadowInfo/NotShadow/Hint",
"text": "The tiddler <$link to=<<infoTiddler>>><$text text=<<infoTiddler>>/></$link> is not a shadow tiddler"
},
"$:/language/TiddlerInfo/Advanced/ShadowInfo/Shadow/Hint": {
"title": "$:/language/TiddlerInfo/Advanced/ShadowInfo/Shadow/Hint",
"text": "The tiddler <$link to=<<infoTiddler>>><$text text=<<infoTiddler>>/></$link> is a shadow tiddler"
},
"$:/language/TiddlerInfo/Advanced/ShadowInfo/Shadow/Source": {
"title": "$:/language/TiddlerInfo/Advanced/ShadowInfo/Shadow/Source",
"text": "It is defined in the plugin <$link to=<<pluginTiddler>>><$text text=<<pluginTiddler>>/></$link>"
},
"$:/language/TiddlerInfo/Advanced/ShadowInfo/OverriddenShadow/Hint": {
"title": "$:/language/TiddlerInfo/Advanced/ShadowInfo/OverriddenShadow/Hint",
"text": "It is overridden by an ordinary tiddler"
},
"$:/language/TiddlerInfo/Fields/Caption": {
"title": "$:/language/TiddlerInfo/Fields/Caption",
"text": "Fields"
},
"$:/language/TiddlerInfo/List/Caption": {
"title": "$:/language/TiddlerInfo/List/Caption",
"text": "List"
},
"$:/language/TiddlerInfo/List/Empty": {
"title": "$:/language/TiddlerInfo/List/Empty",
"text": "This tiddler does not have a list"
},
"$:/language/TiddlerInfo/Listed/Caption": {
"title": "$:/language/TiddlerInfo/Listed/Caption",
"text": "Listed"
},
"$:/language/TiddlerInfo/Listed/Empty": {
"title": "$:/language/TiddlerInfo/Listed/Empty",
"text": "This tiddler is not listed by any others"
},
"$:/language/TiddlerInfo/References/Caption": {
"title": "$:/language/TiddlerInfo/References/Caption",
"text": "References"
},
"$:/language/TiddlerInfo/References/Empty": {
"title": "$:/language/TiddlerInfo/References/Empty",
"text": "No tiddlers link to this one"
},
"$:/language/TiddlerInfo/Tagging/Caption": {
"title": "$:/language/TiddlerInfo/Tagging/Caption",
"text": "Tagging"
},
"$:/language/TiddlerInfo/Tagging/Empty": {
"title": "$:/language/TiddlerInfo/Tagging/Empty",
"text": "No tiddlers are tagged with this one"
},
"$:/language/TiddlerInfo/Tools/Caption": {
"title": "$:/language/TiddlerInfo/Tools/Caption",
"text": "Tools"
},
"$:/language/Docs/Types/application/javascript": {
"title": "$:/language/Docs/Types/application/javascript",
"description": "JavaScript code",
"name": "application/javascript",
"group": "Developer"
},
"$:/language/Docs/Types/application/json": {
"title": "$:/language/Docs/Types/application/json",
"description": "JSON data",
"name": "application/json",
"group": "Developer"
},
"$:/language/Docs/Types/application/x-tiddler-dictionary": {
"title": "$:/language/Docs/Types/application/x-tiddler-dictionary",
"description": "Data dictionary",
"name": "application/x-tiddler-dictionary",
"group": "Developer"
},
"$:/language/Docs/Types/image/gif": {
"title": "$:/language/Docs/Types/image/gif",
"description": "GIF image",
"name": "image/gif",
"group": "Image"
},
"$:/language/Docs/Types/image/jpeg": {
"title": "$:/language/Docs/Types/image/jpeg",
"description": "JPEG image",
"name": "image/jpeg",
"group": "Image"
},
"$:/language/Docs/Types/image/png": {
"title": "$:/language/Docs/Types/image/png",
"description": "PNG image",
"name": "image/png",
"group": "Image"
},
"$:/language/Docs/Types/image/svg+xml": {
"title": "$:/language/Docs/Types/image/svg+xml",
"description": "Structured Vector Graphics image",
"name": "image/svg+xml",
"group": "Image"
},
"$:/language/Docs/Types/image/x-icon": {
"title": "$:/language/Docs/Types/image/x-icon",
"description": "ICO format icon file",
"name": "image/x-icon",
"group": "Image"
},
"$:/language/Docs/Types/text/css": {
"title": "$:/language/Docs/Types/text/css",
"description": "Static stylesheet",
"name": "text/css",
"group": "Developer"
},
"$:/language/Docs/Types/text/html": {
"title": "$:/language/Docs/Types/text/html",
"description": "HTML markup",
"name": "text/html",
"group": "Text"
},
"$:/language/Docs/Types/text/plain": {
"title": "$:/language/Docs/Types/text/plain",
"description": "Plain text",
"name": "text/plain",
"group": "Text"
},
"$:/language/Docs/Types/text/vnd.tiddlywiki": {
"title": "$:/language/Docs/Types/text/vnd.tiddlywiki",
"description": "TiddlyWiki 5",
"name": "text/vnd.tiddlywiki",
"group": "Text"
},
"$:/language/Docs/Types/text/x-tiddlywiki": {
"title": "$:/language/Docs/Types/text/x-tiddlywiki",
"description": "TiddlyWiki Classic",
"name": "text/x-tiddlywiki",
"group": "Text"
},
"$:/languages/en-GB": {
"title": "$:/languages/en-GB",
"name": "en-GB",
"description": "English (British)",
"author": "JeremyRuston",
"core-version": ">=5.0.0\"",
"text": "Stub pseudo-plugin for the default language"
},
"$:/core/modules/commander.js": {
"text": "/*\\\r\ntitle: $:/core/modules/commander.js\r\ntype: application/javascript\r\nmodule-type: global\r\n\r\nThe $tw.Commander class is a command interpreter\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nParse a sequence of commands\r\n\tcommandTokens: an array of command string tokens\r\n\twiki: reference to the wiki store object\r\n\tstreams: {output:, error:}, each of which has a write(string) method\r\n\tcallback: a callback invoked as callback(err) where err is null if there was no error\r\n*/\r\nvar Commander = function(commandTokens,callback,wiki,streams) {\r\n\tvar path = require(\"path\");\r\n\tthis.commandTokens = commandTokens;\r\n\tthis.nextToken = 0;\r\n\tthis.callback = callback;\r\n\tthis.wiki = wiki;\r\n\tthis.streams = streams;\r\n\tthis.outputPath = path.resolve($tw.boot.wikiPath,$tw.config.wikiOutputSubDir);\r\n};\r\n\r\n/*\r\nAdd a string of tokens to the command queue\r\n*/\r\nCommander.prototype.addCommandTokens = function(commandTokens) {\r\n\tvar params = commandTokens.slice(0);\r\n\tparams.unshift(0);\r\n\tparams.unshift(this.nextToken);\r\n\tArray.prototype.splice.apply(this.commandTokens,params);\r\n};\r\n\r\n/*\r\nExecute the sequence of commands and invoke a callback on completion\r\n*/\r\nCommander.prototype.execute = function() {\r\n\tthis.executeNextCommand();\r\n};\r\n\r\n/*\r\nExecute the next command in the sequence\r\n*/\r\nCommander.prototype.executeNextCommand = function() {\r\n\tvar self = this;\r\n\t// Invoke the callback if there are no more commands\r\n\tif(this.nextToken >= this.commandTokens.length) {\r\n\t\tthis.callback(null);\r\n\t} else {\r\n\t\t// Get and check the command token\r\n\t\tvar commandName = this.commandTokens[this.nextToken++];\r\n\t\tif(commandName.substr(0,2) !== \"--\") {\r\n\t\t\tthis.callback(\"Missing command: \" + commandName);\r\n\t\t} else {\r\n\t\t\tcommandName = commandName.substr(2); // Trim off the --\r\n\t\t\t// Accumulate the parameters to the command\r\n\t\t\tvar params = [];\r\n\t\t\twhile(this.nextToken < this.commandTokens.length && \r\n\t\t\t\tthis.commandTokens[this.nextToken].substr(0,2) !== \"--\") {\r\n\t\t\t\tparams.push(this.commandTokens[this.nextToken++]);\r\n\t\t\t}\r\n\t\t\t// Get the command info\r\n\t\t\tvar command = $tw.commands[commandName],\r\n\t\t\t\tc,err;\r\n\t\t\tif(!command) {\r\n\t\t\t\tthis.callback(\"Unknown command: \" + commandName);\r\n\t\t\t} else {\r\n\t\t\t\tif(this.verbose) {\r\n\t\t\t\t\tthis.streams.output.write(\"Executing command: \" + commandName + \" \" + params.join(\" \") + \"\\n\");\r\n\t\t\t\t}\r\n\t\t\t\tif(command.info.synchronous) {\r\n\t\t\t\t\t// Synchronous command\r\n\t\t\t\t\tc = new command.Command(params,this);\r\n\t\t\t\t\terr = c.execute();\r\n\t\t\t\t\tif(err) {\r\n\t\t\t\t\t\tthis.callback(err);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthis.executeNextCommand();\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// Asynchronous command\r\n\t\t\t\t\tc = new command.Command(params,this,function(err) {\r\n\t\t\t\t\t\tif(err) {\r\n\t\t\t\t\t\t\tself.callback(err);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tself.executeNextCommand();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\terr = c.execute();\r\n\t\t\t\t\tif(err) {\r\n\t\t\t\t\t\tthis.callback(err);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\n\r\nCommander.initCommands = function(moduleType) {\r\n\tmoduleType = moduleType || \"command\";\r\n\t$tw.commands = {};\r\n\t$tw.modules.forEachModuleOfType(moduleType,function(title,module) {\r\n\t\tvar c = $tw.commands[module.info.name] = {};\r\n\t\t// Add the methods defined by the module\r\n\t\tfor(var f in module) {\r\n\t\t\tif($tw.utils.hop(module,f)) {\r\n\t\t\t\tc[f] = module[f];\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n};\r\n\r\nexports.Commander = Commander;\r\n\r\n})();\r\n",
"title": "$:/core/modules/commander.js",
"type": "application/javascript",
"module-type": "global"
},
"$:/core/modules/commands/build.js": {
"text": "/*\\\r\ntitle: $:/core/modules/commands/build.js\r\ntype: application/javascript\r\nmodule-type: command\r\n\r\nCommand to build a build target\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nexports.info = {\r\n\tname: \"build\",\r\n\tsynchronous: true\r\n};\r\n\r\nvar Command = function(params,commander) {\r\n\tthis.params = params;\r\n\tthis.commander = commander;\r\n};\r\n\r\nCommand.prototype.execute = function() {\r\n\t// Get the build targets defined in the wiki\r\n\tvar buildTargets = $tw.boot.wikiInfo.build;\r\n\tif(!buildTargets) {\r\n\t\treturn \"No build targets defined\";\r\n\t}\r\n\t// Loop through each of the specified targets\r\n\tvar targets;\r\n\tif(this.params.length > 0) {\r\n\t\ttargets = this.params;\r\n\t} else {\r\n\t\ttargets = Object.keys(buildTargets);\r\n\t}\r\n\tfor(var targetIndex=0; targetIndex<targets.length; targetIndex++) {\r\n\t\tvar target = targets[targetIndex],\r\n\t\t\tcommands = buildTargets[target];\r\n\t\tif(!commands) {\r\n\t\t\treturn \"Build target '\" + target + \"' not found\";\r\n\t\t}\r\n\t\t// Add the commands to the queue\r\n\t\tthis.commander.addCommandTokens(commands);\r\n\t}\r\n\treturn null;\r\n};\r\n\r\nexports.Command = Command;\r\n\r\n})();\r\n",
"title": "$:/core/modules/commands/build.js",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/commands/clearpassword.js": {
"text": "/*\\\r\ntitle: $:/core/modules/commands/clearpassword.js\r\ntype: application/javascript\r\nmodule-type: command\r\n\r\nClear password for crypto operations\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nexports.info = {\r\n\tname: \"clearpassword\",\r\n\tsynchronous: true\r\n};\r\n\r\nvar Command = function(params,commander,callback) {\r\n\tthis.params = params;\r\n\tthis.commander = commander;\r\n\tthis.callback = callback;\r\n};\r\n\r\nCommand.prototype.execute = function() {\r\n\t$tw.crypto.setPassword(null);\r\n\treturn null;\r\n};\r\n\r\nexports.Command = Command;\r\n\r\n})();\r\n",
"title": "$:/core/modules/commands/clearpassword.js",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/commands/editions.js": {
"text": "/*\\\r\ntitle: $:/core/modules/commands/editions.js\r\ntype: application/javascript\r\nmodule-type: command\r\n\r\nCommand to list the available editions\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nexports.info = {\r\n\tname: \"editions\",\r\n\tsynchronous: true\r\n};\r\n\r\nvar Command = function(params,commander) {\r\n\tthis.params = params;\r\n\tthis.commander = commander;\r\n};\r\n\r\nCommand.prototype.execute = function() {\r\n\tvar self = this;\r\n\t// Output the list\r\n\tthis.commander.streams.output.write(\"Available editions:\\n\\n\");\r\n\tvar editionInfo = $tw.utils.getEditionInfo();\r\n\t$tw.utils.each(editionInfo,function(info,name) {\r\n\t\tself.commander.streams.output.write(\" \" + name + \": \" + info.description + \"\\n\");\r\n\t});\r\n\tthis.commander.streams.output.write(\"\\n\");\r\n\treturn null;\r\n};\r\n\r\nexports.Command = Command;\r\n\r\n})();\r\n",
"title": "$:/core/modules/commands/editions.js",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/commands/help.js": {
"text": "/*\\\r\ntitle: $:/core/modules/commands/help.js\r\ntype: application/javascript\r\nmodule-type: command\r\n\r\nHelp command\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jshint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nexports.info = {\r\n\tname: \"help\",\r\n\tsynchronous: true\r\n};\r\n\r\nvar Command = function(params,commander) {\r\n\tthis.params = params;\r\n\tthis.commander = commander;\r\n};\r\n\r\nCommand.prototype.execute = function() {\r\n\tvar subhelp = this.params[0] || \"default\",\r\n\t\thelpBase = \"$:/language/Help/\",\r\n\t\ttext;\r\n\tif(!this.commander.wiki.getTiddler(helpBase + subhelp)) {\r\n\t\tsubhelp = \"notfound\";\r\n\t}\r\n\t// Wikify the help as formatted text (ie block elements generate newlines)\r\n\ttext = this.commander.wiki.renderTiddler(\"text/plain-formatted\",helpBase + subhelp);\r\n\t// Remove any leading linebreaks\r\n\ttext = text.replace(/^(\\r?\\n)*/g,\"\");\r\n\tthis.commander.streams.output.write(text);\r\n};\r\n\r\nexports.Command = Command;\r\n\r\n})();\r\n",
"title": "$:/core/modules/commands/help.js",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/commands/init.js": {
"text": "/*\\\r\ntitle: $:/core/modules/commands/init.js\r\ntype: application/javascript\r\nmodule-type: command\r\n\r\nCommand to initialise an empty wiki folder\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nexports.info = {\r\n\tname: \"init\",\r\n\tsynchronous: true\r\n};\r\n\r\nvar Command = function(params,commander) {\r\n\tthis.params = params;\r\n\tthis.commander = commander;\r\n};\r\n\r\nCommand.prototype.execute = function() {\r\n\tvar fs = require(\"fs\"),\r\n\t\tpath = require(\"path\");\r\n\t// Check that we don't already have a valid wiki folder\r\n\tif($tw.boot.wikiTiddlersPath || ($tw.utils.isDirectory($tw.boot.wikiPath) && !$tw.utils.isDirectoryEmpty($tw.boot.wikiPath))) {\r\n\t\treturn \"Wiki folder is not empty\";\r\n\t}\r\n\t// Loop through each of the specified editions\r\n\tvar editions = this.params.length > 0 ? this.params : [\"empty\"];\r\n\tfor(var editionIndex=0; editionIndex<editions.length; editionIndex++) {\r\n\t\tvar editionName = editions[editionIndex];\r\n\t\t// Check the edition exists\r\n\t\tvar editionPath = $tw.findLibraryItem(editionName,$tw.getLibraryItemSearchPaths($tw.config.editionsPath,$tw.config.editionsEnvVar));\r\n\t\tif(!$tw.utils.isDirectory(editionPath)) {\r\n\t\t\treturn \"Edition '\" + editionName + \"' not found\";\r\n\t\t}\r\n\t\t// Copy the edition content\r\n\t\tvar err = $tw.utils.copyDirectory(editionPath,$tw.boot.wikiPath);\r\n\t\tif(!err) {\r\n\t\t\tthis.commander.streams.output.write(\"Copied edition '\" + editionName + \"' to \" + $tw.boot.wikiPath + \"\\n\");\r\n\t\t} else {\r\n\t\t\treturn err;\r\n\t\t}\r\n\t}\r\n\t// Tweak the tiddlywiki.info to remove any included wikis\r\n\tvar packagePath = $tw.boot.wikiPath + \"/tiddlywiki.info\",\r\n\t\tpackageJson = JSON.parse(fs.readFileSync(packagePath));\r\n\tdelete packageJson.includeWikis;\r\n\tfs.writeFileSync(packagePath,JSON.stringify(packageJson,null,$tw.config.preferences.jsonSpaces));\r\n\treturn null;\r\n};\r\n\r\nexports.Command = Command;\r\n\r\n})();\r\n",
"title": "$:/core/modules/commands/init.js",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/commands/load.js": {
"text": "/*\\\r\ntitle: $:/core/modules/commands/load.js\r\ntype: application/javascript\r\nmodule-type: command\r\n\r\nCommand to load tiddlers from a file\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nexports.info = {\r\n\tname: \"load\",\r\n\tsynchronous: false\r\n};\r\n\r\nvar Command = function(params,commander,callback) {\r\n\tthis.params = params;\r\n\tthis.commander = commander;\r\n\tthis.callback = callback;\r\n};\r\n\r\nCommand.prototype.execute = function() {\r\n\tvar self = this,\r\n\t\tfs = require(\"fs\"),\r\n\t\tpath = require(\"path\");\r\n\tif(this.params.length < 1) {\r\n\t\treturn \"Missing filename\";\r\n\t}\r\n\tvar ext = path.extname(self.params[0]);\r\n\tfs.readFile(this.params[0],$tw.utils.getTypeEncoding(ext),function(err,data) {\r\n\t\tif (err) {\r\n\t\t\tself.callback(err);\r\n\t\t} else {\r\n\t\t\tvar fields = {title: self.params[0]},\r\n\t\t\t\ttype = path.extname(self.params[0]);\r\n\t\t\tvar tiddlers = self.commander.wiki.deserializeTiddlers(type,data,fields);\r\n\t\t\tif(!tiddlers) {\r\n\t\t\t\tself.callback(\"No tiddlers found in file \\\"\" + self.params[0] + \"\\\"\");\r\n\t\t\t} else {\r\n\t\t\t\tfor(var t=0; t<tiddlers.length; t++) {\r\n\t\t\t\t\tself.commander.wiki.importTiddler(new $tw.Tiddler(tiddlers[t]));\r\n\t\t\t\t}\r\n\t\t\t\tself.callback(null);\t\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\treturn null;\r\n};\r\n\r\nexports.Command = Command;\r\n\r\n})();\r\n",
"title": "$:/core/modules/commands/load.js",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/commands/makelibrary.js": {
"text": "/*\\\r\ntitle: $:/core/modules/commands/makelibrary.js\r\ntype: application/javascript\r\nmodule-type: command\r\n\r\nCommand to pack all of the plugins in the library into a plugin tiddler of type \"library\"\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nexports.info = {\r\n\tname: \"makelibrary\",\r\n\tsynchronous: true\r\n};\r\n\r\nvar UPGRADE_LIBRARY_TITLE = \"$:/UpgradeLibrary\";\r\n\r\nvar Command = function(params,commander,callback) {\r\n\tthis.params = params;\r\n\tthis.commander = commander;\r\n\tthis.callback = callback;\r\n};\r\n\r\nCommand.prototype.execute = function() {\r\n\tvar wiki = this.commander.wiki,\r\n\t\tfs = require(\"fs\"),\r\n\t\tpath = require(\"path\"),\r\n\t\tupgradeLibraryTitle = this.params[0] || UPGRADE_LIBRARY_TITLE,\r\n\t\ttiddlers = {};\r\n\t// Collect up the library plugins\r\n\tvar collectPlugins = function(folder) {\r\n\t\t\tvar pluginFolders = fs.readdirSync(folder);\r\n\t\t\tfor(var p=0; p<pluginFolders.length; p++) {\r\n\t\t\t\tif(!$tw.boot.excludeRegExp.test(pluginFolders[p])) {\r\n\t\t\t\t\tpluginFields = $tw.loadPluginFolder(path.resolve(folder,\"./\" + pluginFolders[p]));\r\n\t\t\t\t\tif(pluginFields && pluginFields.title) {\r\n\t\t\t\t\t\ttiddlers[pluginFields.title] = pluginFields;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tcollectPublisherPlugins = function(folder) {\r\n\t\t\tvar publisherFolders = fs.readdirSync(folder);\r\n\t\t\tfor(var t=0; t<publisherFolders.length; t++) {\r\n\t\t\t\tif(!$tw.boot.excludeRegExp.test(publisherFolders[t])) {\r\n\t\t\t\t\tcollectPlugins(path.resolve(folder,\"./\" + publisherFolders[t]));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\tcollectPublisherPlugins(path.resolve($tw.boot.corePath,$tw.config.pluginsPath));\r\n\tcollectPublisherPlugins(path.resolve($tw.boot.corePath,$tw.config.themesPath));\r\n\tcollectPlugins(path.resolve($tw.boot.corePath,$tw.config.languagesPath));\r\n\t// Save the upgrade library tiddler\r\n\tvar pluginFields = {\r\n\t\ttitle: upgradeLibraryTitle,\r\n\t\ttype: \"application/json\",\r\n\t\t\"plugin-type\": \"library\",\r\n\t\t\"text\": JSON.stringify({tiddlers: tiddlers},null,$tw.config.preferences.jsonSpaces)\r\n\t};\r\n\twiki.addTiddler(new $tw.Tiddler(pluginFields));\r\n\treturn null;\r\n};\r\n\r\nexports.Command = Command;\r\n\r\n})();\r\n",
"title": "$:/core/modules/commands/makelibrary.js",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/commands/output.js": {
"text": "/*\\\r\ntitle: $:/core/modules/commands/output.js\r\ntype: application/javascript\r\nmodule-type: command\r\n\r\nCommand to set the default output location (defaults to current working directory)\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nexports.info = {\r\n\tname: \"output\",\r\n\tsynchronous: true\r\n};\r\n\r\nvar Command = function(params,commander,callback) {\r\n\tthis.params = params;\r\n\tthis.commander = commander;\r\n\tthis.callback = callback;\r\n};\r\n\r\nCommand.prototype.execute = function() {\r\n\tvar fs = require(\"fs\"),\r\n\t\tpath = require(\"path\");\r\n\tif(this.params.length < 1) {\r\n\t\treturn \"Missing output path\";\r\n\t}\r\n\tthis.commander.outputPath = path.resolve(process.cwd(),this.params[0]);\r\n\treturn null;\r\n};\r\n\r\nexports.Command = Command;\r\n\r\n})();\r\n",
"title": "$:/core/modules/commands/output.js",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/commands/password.js": {
"text": "/*\\\r\ntitle: $:/core/modules/commands/password.js\r\ntype: application/javascript\r\nmodule-type: command\r\n\r\nSave password for crypto operations\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nexports.info = {\r\n\tname: \"password\",\r\n\tsynchronous: true\r\n};\r\n\r\nvar Command = function(params,commander,callback) {\r\n\tthis.params = params;\r\n\tthis.commander = commander;\r\n\tthis.callback = callback;\r\n};\r\n\r\nCommand.prototype.execute = function() {\r\n\tif(this.params.length < 1) {\r\n\t\treturn \"Missing password\";\r\n\t}\r\n\t$tw.crypto.setPassword(this.params[0]);\r\n\treturn null;\r\n};\r\n\r\nexports.Command = Command;\r\n\r\n})();\r\n",
"title": "$:/core/modules/commands/password.js",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/commands/rendertiddler.js": {
"text": "/*\\\r\ntitle: $:/core/modules/commands/rendertiddler.js\r\ntype: application/javascript\r\nmodule-type: command\r\n\r\nCommand to render a tiddler and save it to a file\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nexports.info = {\r\n\tname: \"rendertiddler\",\r\n\tsynchronous: false\r\n};\r\n\r\nvar Command = function(params,commander,callback) {\r\n\tthis.params = params;\r\n\tthis.commander = commander;\r\n\tthis.callback = callback;\r\n};\r\n\r\nCommand.prototype.execute = function() {\r\n\tif(this.params.length < 2) {\r\n\t\treturn \"Missing filename\";\r\n\t}\r\n\tvar self = this,\r\n\t\tfs = require(\"fs\"),\r\n\t\tpath = require(\"path\"),\r\n\t\ttitle = this.params[0],\r\n\t\tfilename = path.resolve(this.commander.outputPath,this.params[1]),\r\n\t\ttype = this.params[2] || \"text/html\";\r\n\t$tw.utils.createFileDirectories(filename);\r\n\tfs.writeFile(filename,this.commander.wiki.renderTiddler(type,title),\"utf8\",function(err) {\r\n\t\tself.callback(err);\r\n\t});\r\n\treturn null;\r\n};\r\n\r\nexports.Command = Command;\r\n\r\n})();\r\n",
"title": "$:/core/modules/commands/rendertiddler.js",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/commands/rendertiddlers.js": {
"text": "/*\\\r\ntitle: $:/core/modules/commands/rendertiddlers.js\r\ntype: application/javascript\r\nmodule-type: command\r\n\r\nCommand to render several tiddlers to a folder of files\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar widget = require(\"$:/core/modules/widgets/widget.js\");\r\n\r\nexports.info = {\r\n\tname: \"rendertiddlers\",\r\n\tsynchronous: true\r\n};\r\n\r\nvar Command = function(params,commander,callback) {\r\n\tthis.params = params;\r\n\tthis.commander = commander;\r\n\tthis.callback = callback;\r\n};\r\n\r\nCommand.prototype.execute = function() {\r\n\tif(this.params.length < 2) {\r\n\t\treturn \"Missing filename\";\r\n\t}\r\n\tvar self = this,\r\n\t\tfs = require(\"fs\"),\r\n\t\tpath = require(\"path\"),\r\n\t\twiki = this.commander.wiki,\r\n\t\tfilter = this.params[0],\r\n\t\ttemplate = this.params[1],\r\n\t\tpathname = path.resolve(this.commander.outputPath,this.params[2]),\r\n\t\ttype = this.params[3] || \"text/html\",\r\n\t\textension = this.params[4] || \".html\",\r\n\t\tdeleteDirectory = (this.params[5] || \"\") != \"noclean\",\r\n\t\ttiddlers = wiki.filterTiddlers(filter);\r\n\tif(deleteDirectory){\r\n\t\t$tw.utils.deleteDirectory(pathname);\r\n\t}\r\n\t$tw.utils.createDirectory(pathname);\r\n\t$tw.utils.each(tiddlers,function(title) {\r\n\t\tvar parser = wiki.parseTiddler(template),\r\n\t\t\twidgetNode = wiki.makeWidget(parser,{variables: {currentTiddler: title}});\r\n\t\tvar container = $tw.fakeDocument.createElement(\"div\");\r\n\t\twidgetNode.render(container,null);\r\n\t\tvar text = type === \"text/html\" ? container.innerHTML : container.textContent;\r\n\t\tfs.writeFileSync(path.resolve(pathname,encodeURIComponent(title) + extension),text,\"utf8\");\r\n\t});\r\n\treturn null;\r\n};\r\n\r\nexports.Command = Command;\r\n\r\n})();\r\n",
"title": "$:/core/modules/commands/rendertiddlers.js",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/commands/savetiddler.js": {
"text": "/*\\\r\ntitle: $:/core/modules/commands/savetiddler.js\r\ntype: application/javascript\r\nmodule-type: command\r\n\r\nCommand to save the content of a tiddler to a file\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nexports.info = {\r\n\tname: \"savetiddler\",\r\n\tsynchronous: false\r\n};\r\n\r\nvar Command = function(params,commander,callback) {\r\n\tthis.params = params;\r\n\tthis.commander = commander;\r\n\tthis.callback = callback;\r\n};\r\n\r\nCommand.prototype.execute = function() {\r\n\tif(this.params.length < 2) {\r\n\t\treturn \"Missing filename\";\r\n\t}\r\n\tvar self = this,\r\n\t\tfs = require(\"fs\"),\r\n\t\tpath = require(\"path\"),\r\n\t\ttitle = this.params[0],\r\n\t\tfilename = path.resolve(this.commander.outputPath,this.params[1]),\r\n\t\ttiddler = this.commander.wiki.getTiddler(title),\r\n\t\ttype = tiddler.fields.type || \"text/vnd.tiddlywiki\",\r\n\t\tcontentTypeInfo = $tw.config.contentTypeInfo[type] || {encoding: \"utf8\"};\r\n\t$tw.utils.createFileDirectories(filename);\r\n\tfs.writeFile(filename,tiddler.fields.text,contentTypeInfo.encoding,function(err) {\r\n\t\tself.callback(err);\r\n\t});\r\n\treturn null;\r\n};\r\n\r\nexports.Command = Command;\r\n\r\n})();\r\n",
"title": "$:/core/modules/commands/savetiddler.js",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/commands/savetiddlers.js": {
"text": "/*\\\r\ntitle: $:/core/modules/commands/savetiddlers.js\r\ntype: application/javascript\r\nmodule-type: command\r\n\r\nCommand to save several tiddlers to a folder of files\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar widget = require(\"$:/core/modules/widgets/widget.js\");\r\n\r\nexports.info = {\r\n\tname: \"savetiddlers\",\r\n\tsynchronous: true\r\n};\r\n\r\nvar Command = function(params,commander,callback) {\r\n\tthis.params = params;\r\n\tthis.commander = commander;\r\n\tthis.callback = callback;\r\n};\r\n\r\nCommand.prototype.execute = function() {\r\n\tif(this.params.length < 1) {\r\n\t\treturn \"Missing filename\";\r\n\t}\r\n\tvar self = this,\r\n\t\tfs = require(\"fs\"),\r\n\t\tpath = require(\"path\"),\r\n\t\twiki = this.commander.wiki,\r\n\t\tfilter = this.params[0],\r\n\t\tpathname = path.resolve(this.commander.outputPath,this.params[1]),\r\n\t\ttiddlers = wiki.filterTiddlers(filter);\r\n\t$tw.utils.deleteDirectory(pathname);\r\n\t$tw.utils.createDirectory(pathname);\r\n\t$tw.utils.each(tiddlers,function(title) {\r\n\t\tvar tiddler = self.commander.wiki.getTiddler(title),\r\n\t\t\ttype = tiddler.fields.type || \"text/vnd.tiddlywiki\",\r\n\t\t\tcontentTypeInfo = $tw.config.contentTypeInfo[type] || {encoding: \"utf8\"},\r\n\t\t\tfilename = path.resolve(pathname,encodeURIComponent(title));\r\n\t\tfs.writeFileSync(filename,tiddler.fields.text,contentTypeInfo.encoding);\r\n\t});\r\n\treturn null;\r\n};\r\n\r\nexports.Command = Command;\r\n\r\n})();\r\n",
"title": "$:/core/modules/commands/savetiddlers.js",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/commands/server.js": {
"text": "/*\\\r\ntitle: $:/core/modules/commands/server.js\r\ntype: application/javascript\r\nmodule-type: command\r\n\r\nServe tiddlers over http\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nif(!$tw.browser) {\r\n\tvar util = require(\"util\"),\r\n\t\tfs = require(\"fs\"),\r\n\t\turl = require(\"url\"),\r\n\t\tpath = require(\"path\"),\r\n\t\thttp = require(\"http\");\r\n}\r\n\r\nexports.info = {\r\n\tname: \"server\",\r\n\tsynchronous: true\r\n};\r\n\r\n/*\r\nA simple HTTP server with regexp-based routes\r\n*/\r\nfunction SimpleServer(options) {\r\n\tthis.routes = options.routes || [];\r\n\tthis.wiki = options.wiki;\r\n\tthis.variables = options.variables || {};\r\n}\r\n\r\nSimpleServer.prototype.set = function(obj) {\r\n\tvar self = this;\r\n\t$tw.utils.each(obj,function(value,name) {\r\n\t\tself.variables[name] = value;\r\n\t});\r\n};\r\n\r\nSimpleServer.prototype.get = function(name) {\r\n\treturn this.variables[name];\r\n};\r\n\r\nSimpleServer.prototype.addRoute = function(route) {\r\n\tthis.routes.push(route);\r\n};\r\n\r\nSimpleServer.prototype.findMatchingRoute = function(request,state) {\r\n\tvar pathprefix = this.get(\"pathprefix\") || \"\";\r\n\tfor(var t=0; t<this.routes.length; t++) {\r\n\t\tvar potentialRoute = this.routes[t],\r\n\t\t\tpathRegExp = potentialRoute.path,\r\n\t\t\tpathname = state.urlInfo.pathname,\r\n\t\t\tmatch;\r\n\t\tif(pathprefix) {\r\n\t\t\tif(pathname.substr(0,pathprefix.length) === pathprefix) {\r\n\t\t\t\tpathname = pathname.substr(pathprefix.length);\r\n\t\t\t\tmatch = potentialRoute.path.exec(pathname);\r\n\t\t\t} else {\r\n\t\t\t\tmatch = false;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tmatch = potentialRoute.path.exec(pathname);\r\n\t\t}\r\n\t\tif(match && request.method === potentialRoute.method) {\r\n\t\t\tstate.params = [];\r\n\t\t\tfor(var p=1; p<match.length; p++) {\r\n\t\t\t\tstate.params.push(match[p]);\r\n\t\t\t}\r\n\t\t\treturn potentialRoute;\r\n\t\t}\r\n\t}\r\n\treturn null;\r\n};\r\n\r\nSimpleServer.prototype.checkCredentials = function(request,incomingUsername,incomingPassword) {\r\n\tvar header = request.headers.authorization || \"\",\r\n\t\ttoken = header.split(/\\s+/).pop() || \"\",\r\n\t\tauth = $tw.utils.base64Decode(token),\r\n\t\tparts = auth.split(/:/),\r\n\t\tusername = parts[0],\r\n\t\tpassword = parts[1];\r\n\tif(incomingUsername === username && incomingPassword === password) {\r\n\t\treturn \"ALLOWED\";\r\n\t} else {\r\n\t\treturn \"DENIED\";\r\n\t}\r\n};\r\n\r\nSimpleServer.prototype.listen = function(port,host) {\r\n\tvar self = this;\r\n\thttp.createServer(function(request,response) {\r\n\t\t// Compose the state object\r\n\t\tvar state = {};\r\n\t\tstate.wiki = self.wiki;\r\n\t\tstate.server = self;\r\n\t\tstate.urlInfo = url.parse(request.url);\r\n\t\t// Find the route that matches this path\r\n\t\tvar route = self.findMatchingRoute(request,state);\r\n\t\t// Check for the username and password if we've got one\r\n\t\tvar username = self.get(\"username\"),\r\n\t\t\tpassword = self.get(\"password\");\r\n\t\tif(username && password) {\r\n\t\t\t// Check they match\r\n\t\t\tif(self.checkCredentials(request,username,password) !== \"ALLOWED\") {\r\n\t\t\t\tvar servername = state.wiki.getTiddlerText(\"$:/SiteTitle\") || \"TiddlyWiki5\";\r\n\t\t\t\tresponse.writeHead(401,\"Authentication required\",{\r\n\t\t\t\t\t\"WWW-Authenticate\": 'Basic realm=\"Please provide your username and password to login to ' + servername + '\"'\r\n\t\t\t\t});\r\n\t\t\t\tresponse.end();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Return a 404 if we didn't find a route\r\n\t\tif(!route) {\r\n\t\t\tresponse.writeHead(404);\r\n\t\t\tresponse.end();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t// Set the encoding for the incoming request\r\n\t\t// TODO: Presumably this would need tweaking if we supported PUTting binary tiddlers\r\n\t\trequest.setEncoding(\"utf8\");\r\n\t\t// Dispatch the appropriate method\r\n\t\tswitch(request.method) {\r\n\t\t\tcase \"GET\": // Intentional fall-through\r\n\t\t\tcase \"DELETE\":\r\n\t\t\t\troute.handler(request,response,state);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"PUT\":\r\n\t\t\t\tvar data = \"\";\r\n\t\t\t\trequest.on(\"data\",function(chunk) {\r\n\t\t\t\t\tdata += chunk.toString();\r\n\t\t\t\t});\r\n\t\t\t\trequest.on(\"end\",function() {\r\n\t\t\t\t\tstate.data = data;\r\n\t\t\t\t\troute.handler(request,response,state);\r\n\t\t\t\t});\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}).listen(port,host);\r\n};\r\n\r\nvar Command = function(params,commander,callback) {\r\n\tthis.params = params;\r\n\tthis.commander = commander;\r\n\tthis.callback = callback;\r\n\t// Set up server\r\n\tthis.server = new SimpleServer({\r\n\t\twiki: this.commander.wiki\r\n\t});\r\n\t// Add route handlers\r\n\tthis.server.addRoute({\r\n\t\tmethod: \"PUT\",\r\n\t\tpath: /^\\/recipes\\/default\\/tiddlers\\/(.+)$/,\r\n\t\thandler: function(request,response,state) {\r\n\t\t\tvar title = decodeURIComponent(state.params[0]),\r\n\t\t\t\tfields = JSON.parse(state.data);\r\n\t\t\t// Pull up any subfields in the `fields` object\r\n\t\t\tif(fields.fields) {\r\n\t\t\t\t$tw.utils.each(fields.fields,function(field,name) {\r\n\t\t\t\t\tfields[name] = field;\r\n\t\t\t\t});\r\n\t\t\t\tdelete fields.fields;\r\n\t\t\t}\r\n\t\t\t// Remove any revision field\r\n\t\t\tif(fields.revision) {\r\n\t\t\t\tdelete fields.revision;\r\n\t\t\t}\r\n\t\t\tstate.wiki.addTiddler(new $tw.Tiddler(state.wiki.getCreationFields(),fields,{title: title}));\r\n\t\t\tvar changeCount = state.wiki.getChangeCount(title).toString();\r\n\t\t\tresponse.writeHead(204, \"OK\",{\r\n\t\t\t\tEtag: \"\\\"default/\" + encodeURIComponent(title) + \"/\" + changeCount + \":\\\"\",\r\n\t\t\t\t\"Content-Type\": \"text/plain\"\r\n\t\t\t});\r\n\t\t\tresponse.end();\r\n\t\t}\r\n\t});\r\n\tthis.server.addRoute({\r\n\t\tmethod: \"DELETE\",\r\n\t\tpath: /^\\/bags\\/default\\/tiddlers\\/(.+)$/,\r\n\t\thandler: function(request,response,state) {\r\n\t\t\tvar title = decodeURIComponent(state.params[0]);\r\n\t\t\tstate.wiki.deleteTiddler(title);\r\n\t\t\tresponse.writeHead(204, \"OK\", {\r\n\t\t\t\t\"Content-Type\": \"text/plain\"\r\n\t\t\t});\r\n\t\t\tresponse.end();\r\n\t\t}\r\n\t});\r\n\tthis.server.addRoute({\r\n\t\tmethod: \"GET\",\r\n\t\tpath: /^\\/$/,\r\n\t\thandler: function(request,response,state) {\r\n\t\t\tresponse.writeHead(200, {\"Content-Type\": state.server.get(\"serveType\")});\r\n\t\t\tvar text = state.wiki.renderTiddler(state.server.get(\"renderType\"),state.server.get(\"rootTiddler\"));\r\n\t\t\tresponse.end(text,\"utf8\");\r\n\t\t}\r\n\t});\r\n\tthis.server.addRoute({\r\n\t\tmethod: \"GET\",\r\n\t\tpath: /^\\/status$/,\r\n\t\thandler: function(request,response,state) {\r\n\t\t\tresponse.writeHead(200, {\"Content-Type\": \"application/json\"});\r\n\t\t\tvar text = JSON.stringify({\r\n\t\t\t\tusername: state.server.get(\"username\"),\r\n\t\t\t\tspace: {\r\n\t\t\t\t\trecipe: \"default\"\r\n\t\t\t\t},\r\n\t\t\t\ttiddlywiki_version: $tw.version\r\n\t\t\t});\r\n\t\t\tresponse.end(text,\"utf8\");\r\n\t\t}\r\n\t});\r\n\tthis.server.addRoute({\r\n\t\tmethod: \"GET\",\r\n\t\tpath: /^\\/favicon.ico$/,\r\n\t\thandler: function(request,response,state) {\r\n\t\t\tresponse.writeHead(200, {\"Content-Type\": \"image/x-icon\"});\r\n\t\t\tvar buffer = state.wiki.getTiddlerText(\"$:/favicon.ico\",\"\");\r\n\t\t\tresponse.end(buffer,\"base64\");\r\n\t\t}\r\n\t});\r\n\tthis.server.addRoute({\r\n\t\tmethod: \"GET\",\r\n\t\tpath: /^\\/recipes\\/default\\/tiddlers.json$/,\r\n\t\thandler: function(request,response,state) {\r\n\t\t\tresponse.writeHead(200, {\"Content-Type\": \"application/json\"});\r\n\t\t\tvar tiddlers = [];\r\n\t\t\tstate.wiki.forEachTiddler({sortField: \"title\"},function(title,tiddler) {\r\n\t\t\t\tvar tiddlerFields = {};\r\n\t\t\t\t$tw.utils.each(tiddler.fields,function(field,name) {\r\n\t\t\t\t\tif(name !== \"text\") {\r\n\t\t\t\t\t\ttiddlerFields[name] = tiddler.getFieldString(name);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t\ttiddlerFields.revision = state.wiki.getChangeCount(title);\r\n\t\t\t\ttiddlerFields.type = tiddlerFields.type || \"text/vnd.tiddlywiki\";\r\n\t\t\t\ttiddlers.push(tiddlerFields);\r\n\t\t\t});\r\n\t\t\tvar text = JSON.stringify(tiddlers);\r\n\t\t\tresponse.end(text,\"utf8\");\r\n\t\t}\r\n\t});\r\n\tthis.server.addRoute({\r\n\t\tmethod: \"GET\",\r\n\t\tpath: /^\\/recipes\\/default\\/tiddlers\\/(.+)$/,\r\n\t\thandler: function(request,response,state) {\r\n\t\t\tvar title = decodeURIComponent(state.params[0]),\r\n\t\t\t\ttiddler = state.wiki.getTiddler(title),\r\n\t\t\t\ttiddlerFields = {},\r\n\t\t\t\tknownFields = [\r\n\t\t\t\t\t\"bag\", \"created\", \"creator\", \"modified\", \"modifier\", \"permissions\", \"recipe\", \"revision\", \"tags\", \"text\", \"title\", \"type\", \"uri\"\r\n\t\t\t\t];\r\n\t\t\tif(tiddler) {\r\n\t\t\t\t$tw.utils.each(tiddler.fields,function(field,name) {\r\n\t\t\t\t\tvar value = tiddler.getFieldString(name);\r\n\t\t\t\t\tif(knownFields.indexOf(name) !== -1) {\r\n\t\t\t\t\t\ttiddlerFields[name] = value;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\ttiddlerFields.fields = tiddlerFields.fields || {};\r\n\t\t\t\t\t\ttiddlerFields.fields[name] = value;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t\ttiddlerFields.revision = state.wiki.getChangeCount(title);\r\n\t\t\t\ttiddlerFields.type = tiddlerFields.type || \"text/vnd.tiddlywiki\";\r\n\t\t\t\tresponse.writeHead(200, {\"Content-Type\": \"application/json\"});\r\n\t\t\t\tresponse.end(JSON.stringify(tiddlerFields),\"utf8\");\r\n\t\t\t} else {\r\n\t\t\t\tresponse.writeHead(404);\r\n\t\t\t\tresponse.end();\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n};\r\n\r\nCommand.prototype.execute = function() {\r\n\tif(!$tw.boot.wikiTiddlersPath) {\r\n\t\t$tw.utils.warning(\"Warning: Wiki folder '\" + $tw.boot.wikiPath + \"' does not exist or is missing a tiddlywiki.info file\");\r\n\t}\r\n\tvar port = this.params[0] || \"8080\",\r\n\t\trootTiddler = this.params[1] || \"$:/core/save/all\",\r\n\t\trenderType = this.params[2] || \"text/plain\",\r\n\t\tserveType = this.params[3] || \"text/html\",\r\n\t\tusername = this.params[4],\r\n\t\tpassword = this.params[5],\r\n\t\thost = this.params[6] || \"127.0.0.1\",\r\n\t\tpathprefix = this.params[7];\r\n\tthis.server.set({\r\n\t\trootTiddler: rootTiddler,\r\n\t\trenderType: renderType,\r\n\t\tserveType: serveType,\r\n\t\tusername: username,\r\n\t\tpassword: password,\r\n\t\tpathprefix: pathprefix\r\n\t});\r\n\tthis.server.listen(port,host);\r\n\tconsole.log(\"Serving on \" + host + \":\" + port);\r\n\tconsole.log(\"(press ctrl-C to exit)\");\r\n\treturn null;\r\n};\r\n\r\nexports.Command = Command;\r\n\r\n})();\r\n",
"title": "$:/core/modules/commands/server.js",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/commands/setfield.js": {
"text": "/*\\\r\ntitle: $:/core/modules/commands/setfield.js\r\ntype: application/javascript\r\nmodule-type: command\r\n\r\nCommand to modify selected tiddlers to set a field to the text of a template tiddler that has been wikified with the selected tiddler as the current tiddler.\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar widget = require(\"$:/core/modules/widgets/widget.js\");\r\n\r\nexports.info = {\r\n\tname: \"setfield\",\r\n\tsynchronous: true\r\n};\r\n\r\nvar Command = function(params,commander,callback) {\r\n\tthis.params = params;\r\n\tthis.commander = commander;\r\n\tthis.callback = callback;\r\n};\r\n\r\nCommand.prototype.execute = function() {\r\n\tif(this.params.length < 4) {\r\n\t\treturn \"Missing parameters\";\r\n\t}\r\n\tvar self = this,\r\n\t\twiki = this.commander.wiki,\r\n\t\tfilter = this.params[0],\r\n\t\tfieldname = this.params[1] || \"text\",\r\n\t\ttemplatetitle = this.params[2],\r\n\t\trendertype = this.params[3] || \"text/plain\",\r\n\t\ttiddlers = wiki.filterTiddlers(filter);\r\n\t$tw.utils.each(tiddlers,function(title) {\r\n\t\tvar parser = wiki.parseTiddler(templatetitle),\r\n\t\t\tnewFields = {},\r\n\t\t\ttiddler = wiki.getTiddler(title);\r\n\t\tif(parser) {\r\n\t\t\tvar widgetNode = wiki.makeWidget(parser,{variables: {currentTiddler: title}});\r\n\t\t\tvar container = $tw.fakeDocument.createElement(\"div\");\r\n\t\t\twidgetNode.render(container,null);\r\n\t\t\tnewFields[fieldname] = rendertype === \"text/html\" ? container.innerHTML : container.textContent;\r\n\t\t} else {\r\n\t\t\tnewFields[fieldname] = undefined;\r\n\t\t}\r\n\t\twiki.addTiddler(new $tw.Tiddler(tiddler,newFields));\r\n\t});\r\n\treturn null;\r\n};\r\n\r\nexports.Command = Command;\r\n\r\n})();\r\n",
"title": "$:/core/modules/commands/setfield.js",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/commands/unpackplugin.js": {
"text": "/*\\\r\ntitle: $:/core/modules/commands/unpackplugin.js\r\ntype: application/javascript\r\nmodule-type: command\r\n\r\nCommand to extract the shadow tiddlers from within a plugin\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nexports.info = {\r\n\tname: \"unpackplugin\",\r\n\tsynchronous: true\r\n};\r\n\r\nvar Command = function(params,commander,callback) {\r\n\tthis.params = params;\r\n\tthis.commander = commander;\r\n\tthis.callback = callback;\r\n};\r\n\r\nCommand.prototype.execute = function() {\r\n\tif(this.params.length < 1) {\r\n\t\treturn \"Missing plugin name\";\r\n\t}\r\n\tvar self = this,\r\n\t\ttitle = this.params[0],\r\n\t\tpluginData = this.commander.wiki.getTiddlerData(title);\r\n\tif(!pluginData) {\r\n\t\treturn \"Plugin '\" + title + \"' not found\";\r\n\t}\r\n\t$tw.utils.each(pluginData.tiddlers,function(tiddler) {\r\n\t\tself.commander.wiki.addTiddler(new $tw.Tiddler(tiddler));\r\n\t});\r\n\treturn null;\r\n};\r\n\r\nexports.Command = Command;\r\n\r\n})();\r\n",
"title": "$:/core/modules/commands/unpackplugin.js",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/commands/verbose.js": {
"text": "/*\\\r\ntitle: $:/core/modules/commands/verbose.js\r\ntype: application/javascript\r\nmodule-type: command\r\n\r\nVerbose command\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nexports.info = {\r\n\tname: \"verbose\",\r\n\tsynchronous: true\r\n};\r\n\r\nvar Command = function(params,commander) {\r\n\tthis.params = params;\r\n\tthis.commander = commander;\r\n};\r\n\r\nCommand.prototype.execute = function() {\r\n\tthis.commander.verbose = true;\r\n\t// Output the boot message log\r\n\tthis.commander.streams.output.write(\"Boot log:\\n \" + $tw.boot.logMessages.join(\"\\n \") + \"\\n\");\r\n\treturn null; // No error\r\n};\r\n\r\nexports.Command = Command;\r\n\r\n})();\r\n",
"title": "$:/core/modules/commands/verbose.js",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/commands/version.js": {
"text": "/*\\\r\ntitle: $:/core/modules/commands/version.js\r\ntype: application/javascript\r\nmodule-type: command\r\n\r\nVersion command\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nexports.info = {\r\n\tname: \"version\",\r\n\tsynchronous: true\r\n};\r\n\r\nvar Command = function(params,commander) {\r\n\tthis.params = params;\r\n\tthis.commander = commander;\r\n};\r\n\r\nCommand.prototype.execute = function() {\r\n\tthis.commander.streams.output.write($tw.version + \"\\n\");\r\n\treturn null; // No error\r\n};\r\n\r\nexports.Command = Command;\r\n\r\n})();\r\n",
"title": "$:/core/modules/commands/version.js",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/config.js": {
"text": "/*\\\r\ntitle: $:/core/modules/config.js\r\ntype: application/javascript\r\nmodule-type: config\r\n\r\nCore configuration constants\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nexports.preferences = {};\r\n\r\nexports.preferences.notificationDuration = 3 * 1000;\r\nexports.preferences.jsonSpaces = 4;\r\n\r\nexports.textPrimitives = {\r\n\tupperLetter: \"[A-Z\\u00c0-\\u00d6\\u00d8-\\u00de\\u0150\\u0170]\",\r\n\tlowerLetter: \"[a-z\\u00df-\\u00f6\\u00f8-\\u00ff\\u0151\\u0171]\",\r\n\tanyLetter: \"[A-Za-z0-9\\u00c0-\\u00d6\\u00d8-\\u00de\\u00df-\\u00f6\\u00f8-\\u00ff\\u0150\\u0170\\u0151\\u0171]\",\r\n\tblockPrefixLetters:\t\"[A-Za-z0-9-_\\u00c0-\\u00d6\\u00d8-\\u00de\\u00df-\\u00f6\\u00f8-\\u00ff\\u0150\\u0170\\u0151\\u0171]\"\r\n};\r\n\r\nexports.textPrimitives.unWikiLink = \"~\";\r\nexports.textPrimitives.wikiLink = exports.textPrimitives.upperLetter + \"+\" +\r\n\texports.textPrimitives.lowerLetter + \"+\" +\r\n\texports.textPrimitives.upperLetter +\r\n\texports.textPrimitives.anyLetter + \"*\";\r\n\r\nexports.htmlEntities = {quot:34, amp:38, apos:39, lt:60, gt:62, nbsp:160, iexcl:161, cent:162, pound:163, curren:164, yen:165, brvbar:166, sect:167, uml:168, copy:169, ordf:170, laquo:171, not:172, shy:173, reg:174, macr:175, deg:176, plusmn:177, sup2:178, sup3:179, acute:180, micro:181, para:182, middot:183, cedil:184, sup1:185, ordm:186, raquo:187, frac14:188, frac12:189, frac34:190, iquest:191, Agrave:192, Aacute:193, Acirc:194, Atilde:195, Auml:196, Aring:197, AElig:198, Ccedil:199, Egrave:200, Eacute:201, Ecirc:202, Euml:203, Igrave:204, Iacute:205, Icirc:206, Iuml:207, ETH:208, Ntilde:209, Ograve:210, Oacute:211, Ocirc:212, Otilde:213, Ouml:214, times:215, Oslash:216, Ugrave:217, Uacute:218, Ucirc:219, Uuml:220, Yacute:221, THORN:222, szlig:223, agrave:224, aacute:225, acirc:226, atilde:227, auml:228, aring:229, aelig:230, ccedil:231, egrave:232, eacute:233, ecirc:234, euml:235, igrave:236, iacute:237, icirc:238, iuml:239, eth:240, ntilde:241, ograve:242, oacute:243, ocirc:244, otilde:245, ouml:246, divide:247, oslash:248, ugrave:249, uacute:250, ucirc:251, uuml:252, yacute:253, thorn:254, yuml:255, OElig:338, oelig:339, Scaron:352, scaron:353, Yuml:376, fnof:402, circ:710, tilde:732, Alpha:913, Beta:914, Gamma:915, Delta:916, Epsilon:917, Zeta:918, Eta:919, Theta:920, Iota:921, Kappa:922, Lambda:923, Mu:924, Nu:925, Xi:926, Omicron:927, Pi:928, Rho:929, Sigma:931, Tau:932, Upsilon:933, Phi:934, Chi:935, Psi:936, Omega:937, alpha:945, beta:946, gamma:947, delta:948, epsilon:949, zeta:950, eta:951, theta:952, iota:953, kappa:954, lambda:955, mu:956, nu:957, xi:958, omicron:959, pi:960, rho:961, sigmaf:962, sigma:963, tau:964, upsilon:965, phi:966, chi:967, psi:968, omega:969, thetasym:977, upsih:978, piv:982, ensp:8194, emsp:8195, thinsp:8201, zwnj:8204, zwj:8205, lrm:8206, rlm:8207, ndash:8211, mdash:8212, lsquo:8216, rsquo:8217, sbquo:8218, ldquo:8220, rdquo:8221, bdquo:8222, dagger:8224, Dagger:8225, bull:8226, hellip:8230, permil:8240, prime:8242, Prime:8243, lsaquo:8249, rsaquo:8250, oline:8254, frasl:8260, euro:8364, image:8465, weierp:8472, real:8476, trade:8482, alefsym:8501, larr:8592, uarr:8593, rarr:8594, darr:8595, harr:8596, crarr:8629, lArr:8656, uArr:8657, rArr:8658, dArr:8659, hArr:8660, forall:8704, part:8706, exist:8707, empty:8709, nabla:8711, isin:8712, notin:8713, ni:8715, prod:8719, sum:8721, minus:8722, lowast:8727, radic:8730, prop:8733, infin:8734, ang:8736, and:8743, or:8744, cap:8745, cup:8746, int:8747, there4:8756, sim:8764, cong:8773, asymp:8776, ne:8800, equiv:8801, le:8804, ge:8805, sub:8834, sup:8835, nsub:8836, sube:8838, supe:8839, oplus:8853, otimes:8855, perp:8869, sdot:8901, lceil:8968, rceil:8969, lfloor:8970, rfloor:8971, lang:9001, rang:9002, loz:9674, spades:9824, clubs:9827, hearts:9829, diams:9830 };\r\n\r\nexports.htmlVoidElements = \"area,base,br,col,command,embed,hr,img,input,keygen,link,meta,param,source,track,wbr\".split(\",\");\r\n\r\nexports.htmlBlockElements = \"address,article,aside,audio,blockquote,canvas,dd,div,dl,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,li,noscript,ol,output,p,pre,section,table,tfoot,ul,video\".split(\",\");\r\n\r\nexports.htmlUnsafeElements = \"script\".split(\",\");\r\n\r\n})();\r\n",
"title": "$:/core/modules/config.js",
"type": "application/javascript",
"module-type": "config"
},
"$:/core/modules/deserializers.js": {
"text": "/*\\\r\ntitle: $:/core/modules/deserializers.js\r\ntype: application/javascript\r\nmodule-type: tiddlerdeserializer\r\n\r\nFunctions to deserialise tiddlers from a block of text\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nUtility function to parse an old-style tiddler DIV in a *.tid file. It looks like this:\r\n\r\n<div title=\"Title\" creator=\"JoeBloggs\" modifier=\"JoeBloggs\" created=\"201102111106\" modified=\"201102111310\" tags=\"myTag [[my long tag]]\">\r\n<pre>The text of the tiddler (without the expected HTML encoding).\r\n</pre>\r\n</div>\r\n\r\nNote that the field attributes are HTML encoded, but that the body of the <PRE> tag is not encoded.\r\n\r\nWhen these tiddler DIVs are encountered within a TiddlyWiki HTML file then the body is encoded in the usual way.\r\n*/\r\nvar parseTiddlerDiv = function(text /* [,fields] */) {\r\n\t// Slot together the default results\r\n\tvar result = {};\r\n\tif(arguments.length > 1) {\r\n\t\tfor(var f=1; f<arguments.length; f++) {\r\n\t\t\tvar fields = arguments[f];\r\n\t\t\tfor(var t in fields) {\r\n\t\t\t\tresult[t] = fields[t];\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t// Parse the DIV body\r\n\tvar startRegExp = /^\\s*<div\\s+([^>]*)>(\\s*<pre>)?/gi,\r\n\t\tendRegExp,\r\n\t\tmatch = startRegExp.exec(text);\r\n\tif(match) {\r\n\t\t// Old-style DIVs don't have the <pre> tag\r\n\t\tif(match[2]) {\r\n\t\t\tendRegExp = /<\\/pre>\\s*<\\/div>\\s*$/gi;\r\n\t\t} else {\r\n\t\t\tendRegExp = /<\\/div>\\s*$/gi;\r\n\t\t}\r\n\t\tvar endMatch = endRegExp.exec(text);\r\n\t\tif(endMatch) {\r\n\t\t\t// Extract the text\r\n\t\t\tresult.text = text.substring(match.index + match[0].length,endMatch.index);\r\n\t\t\t// Process the attributes\r\n\t\t\tvar attrRegExp = /\\s*([^=\\s]+)\\s*=\\s*(?:\"([^\"]*)\"|'([^']*)')/gi,\r\n\t\t\t\tattrMatch;\r\n\t\t\tdo {\r\n\t\t\t\tattrMatch = attrRegExp.exec(match[1]);\r\n\t\t\t\tif(attrMatch) {\r\n\t\t\t\t\tvar name = attrMatch[1];\r\n\t\t\t\t\tvar value = attrMatch[2] !== undefined ? attrMatch[2] : attrMatch[3];\r\n\t\t\t\t\tresult[name] = value;\r\n\t\t\t\t}\r\n\t\t\t} while(attrMatch);\r\n\t\t\treturn result;\r\n\t\t}\r\n\t}\r\n\treturn undefined;\r\n};\r\n\r\nexports[\"application/x-tiddler-html-div\"] = function(text,fields) {\r\n\treturn [parseTiddlerDiv(text,fields)];\r\n};\r\n\r\nexports[\"application/json\"] = function(text,fields) {\r\n\tvar incoming = JSON.parse(text),\r\n\t\tresults = [];\r\n\tif($tw.utils.isArray(incoming)) {\r\n\t\tfor(var t=0; t<incoming.length; t++) {\r\n\t\t\tvar incomingFields = incoming[t],\r\n\t\t\t\tfields = {};\r\n\t\t\tfor(var f in incomingFields) {\r\n\t\t\t\tif(typeof incomingFields[f] === \"string\") {\r\n\t\t\t\t\tfields[f] = incomingFields[f];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tresults.push(fields);\r\n\t\t}\r\n\t}\r\n\treturn results;\r\n};\r\n\r\n/*\r\nParse an HTML file into tiddlers. There are three possibilities:\r\n# A TiddlyWiki classic HTML file containing `text/x-tiddlywiki` tiddlers\r\n# A TiddlyWiki5 HTML file containing `text/vnd.tiddlywiki` tiddlers\r\n# An ordinary HTML file\r\n*/\r\nexports[\"text/html\"] = function(text,fields) {\r\n\t// Check if we've got a store area\r\n\tvar storeAreaMarkerRegExp = /<div id=[\"']?storeArea['\"]?( style=[\"']?display:none;[\"']?)?>/gi,\r\n\t\tmatch = storeAreaMarkerRegExp.exec(text);\r\n\tif(match) {\r\n\t\t// If so, it's either a classic TiddlyWiki file or an unencrypted TW5 file\r\n\t\t// First read the normal tiddlers\r\n\t\tvar results = deserializeTiddlyWikiFile(text,storeAreaMarkerRegExp.lastIndex,!!match[1],fields);\r\n\t\t// Then any system tiddlers\r\n\t\tvar systemAreaMarkerRegExp = /<div id=[\"']?systemArea['\"]?( style=[\"']?display:none;[\"']?)?>/gi,\r\n\t\t\tsysMatch = systemAreaMarkerRegExp.exec(text);\r\n\t\tif(sysMatch) {\r\n\t\t\tresults.push.apply(results,deserializeTiddlyWikiFile(text,systemAreaMarkerRegExp.lastIndex,!!sysMatch[1],fields));\r\n\t\t}\r\n\t\treturn results;\r\n\t} else {\r\n\t\t// Check whether we've got an encrypted file\r\n\t\tvar encryptedStoreArea = $tw.utils.extractEncryptedStoreArea(text);\r\n\t\tif(encryptedStoreArea) {\r\n\t\t\t// If so, attempt to decrypt it using the current password\r\n\t\t\treturn $tw.utils.decryptStoreArea(encryptedStoreArea);\r\n\t\t} else {\r\n\t\t\t// It's not a TiddlyWiki so we'll return the entire HTML file as a tiddler\r\n\t\t\treturn deserializeHtmlFile(text,fields);\r\n\t\t}\r\n\t}\r\n};\r\n\r\nfunction deserializeHtmlFile(text,fields) {\r\n\tvar result = {};\r\n\t$tw.utils.each(fields,function(value,name) {\r\n\t\tresult[name] = value;\r\n\t});\r\n\tresult.text = text;\r\n\tresult.type = \"text/html\";\r\n\treturn [result];\r\n}\r\n\r\nfunction deserializeTiddlyWikiFile(text,storeAreaEnd,isTiddlyWiki5,fields) {\r\n\tvar results = [],\r\n\t\tendOfDivRegExp = /(<\\/div>\\s*)/gi,\r\n\t\tstartPos = storeAreaEnd,\r\n\t\tdefaultType = isTiddlyWiki5 ? undefined : \"text/x-tiddlywiki\";\r\n\tendOfDivRegExp.lastIndex = startPos;\r\n\tvar match = endOfDivRegExp.exec(text);\r\n\twhile(match) {\r\n\t\tvar endPos = endOfDivRegExp.lastIndex,\r\n\t\t\ttiddlerFields = parseTiddlerDiv(text.substring(startPos,endPos),fields,{type: defaultType});\r\n\t\tif(!tiddlerFields) {\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t$tw.utils.each(tiddlerFields,function(value,name) {\r\n\t\t\tif(typeof value === \"string\") {\r\n\t\t\t\ttiddlerFields[name] = $tw.utils.htmlDecode(value);\r\n\t\t\t}\r\n\t\t});\r\n\t\tif(tiddlerFields.text !== null) {\r\n\t\t\tresults.push(tiddlerFields);\r\n\t\t}\r\n\t\tstartPos = endPos;\r\n\t\tmatch = endOfDivRegExp.exec(text);\r\n\t}\r\n\treturn results;\r\n}\r\n\r\n})();\r\n",
"title": "$:/core/modules/deserializers.js",
"type": "application/javascript",
"module-type": "tiddlerdeserializer"
},
"$:/core/modules/filters/addprefix.js": {
"text": "/*\\\r\ntitle: $:/core/modules/filters/addprefix.js\r\ntype: application/javascript\r\nmodule-type: filteroperator\r\n\r\nFilter operator for adding a prefix to each title in the list. This is\r\nespecially useful in contexts where only a filter expression is allowed\r\nand macro substitution isn't available.\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nExport our filter function\r\n*/\r\nexports.addprefix = function(source,operator,options) {\r\n\tvar results = [];\r\n\tsource(function(tiddler,title) {\r\n\t\tresults.push(operator.operand + title);\r\n\t});\r\n\treturn results;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/filters/addprefix.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/addsuffix.js": {
"text": "/*\\\r\ntitle: $:/core/modules/filters/addsuffix.js\r\ntype: application/javascript\r\nmodule-type: filteroperator\r\n\r\nFilter operator for adding a suffix to each title in the list. This is\r\nespecially useful in contexts where only a filter expression is allowed\r\nand macro substitution isn't available.\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nExport our filter function\r\n*/\r\nexports.addsuffix = function(source,operator,options) {\r\n\tvar results = [];\r\n\tsource(function(tiddler,title) {\r\n\t\tresults.push(title + operator.operand);\r\n\t});\r\n\treturn results;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/filters/addsuffix.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/after.js": {
"text": "/*\\\r\ntitle: $:/core/modules/filters/after.js\r\ntype: application/javascript\r\nmodule-type: filteroperator\r\n\r\nFilter operator returning the tiddler from the current list that is after the tiddler named in the operand.\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nExport our filter function\r\n*/\r\nexports.after = function(source,operator,options) {\r\n\tvar results = [];\r\n\tsource(function(tiddler,title) {\r\n\t\tresults.push(title);\r\n\t});\r\n\tvar index = results.indexOf(operator.operand);\r\n\tif(index === -1 || index > (results.length - 2)) {\r\n\t\treturn [];\r\n\t} else {\r\n\t\treturn [results[index + 1]];\r\n\t}\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/filters/after.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/all/current.js": {
"text": "/*\\\r\ntitle: $:/core/modules/filters/all/current.js\r\ntype: application/javascript\r\nmodule-type: allfilteroperator\r\n\r\nFilter function for [all[current]]\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nExport our filter function\r\n*/\r\nexports.current = function(source,prefix,options) {\r\n\tvar currTiddlerTitle = options.widget && options.widget.getVariable(\"currentTiddler\");\r\n\tif(currTiddlerTitle) {\r\n\t\treturn [currTiddlerTitle];\r\n\t} else {\r\n\t\treturn [];\r\n\t}\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/filters/all/current.js",
"type": "application/javascript",
"module-type": "allfilteroperator"
},
"$:/core/modules/filters/all/missing.js": {
"text": "/*\\\r\ntitle: $:/core/modules/filters/all/missing.js\r\ntype: application/javascript\r\nmodule-type: allfilteroperator\r\n\r\nFilter function for [all[missing]]\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nExport our filter function\r\n*/\r\nexports.missing = function(source,prefix,options) {\r\n\treturn options.wiki.getMissingTitles();\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/filters/all/missing.js",
"type": "application/javascript",
"module-type": "allfilteroperator"
},
"$:/core/modules/filters/all/orphans.js": {
"text": "/*\\\r\ntitle: $:/core/modules/filters/all/orphans.js\r\ntype: application/javascript\r\nmodule-type: allfilteroperator\r\n\r\nFilter function for [all[orphans]]\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nExport our filter function\r\n*/\r\nexports.orphans = function(source,prefix,options) {\r\n\treturn options.wiki.getOrphanTitles();\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/filters/all/orphans.js",
"type": "application/javascript",
"module-type": "allfilteroperator"
},
"$:/core/modules/filters/all/shadows.js": {
"text": "/*\\\r\ntitle: $:/core/modules/filters/all/shadows.js\r\ntype: application/javascript\r\nmodule-type: allfilteroperator\r\n\r\nFilter function for [all[shadows]]\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nExport our filter function\r\n*/\r\nexports.shadows = function(source,prefix,options) {\r\n\treturn options.wiki.allShadowTitles();\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/filters/all/shadows.js",
"type": "application/javascript",
"module-type": "allfilteroperator"
},
"$:/core/modules/filters/all/tiddlers.js": {
"text": "/*\\\r\ntitle: $:/core/modules/filters/all/tiddlers.js\r\ntype: application/javascript\r\nmodule-type: allfilteroperator\r\n\r\nFilter function for [all[tiddlers]]\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nExport our filter function\r\n*/\r\nexports.tiddlers = function(source,prefix,options) {\r\n\treturn options.wiki.allTitles();\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/filters/all/tiddlers.js",
"type": "application/javascript",
"module-type": "allfilteroperator"
},
"$:/core/modules/filters/all.js": {
"text": "/*\\\r\ntitle: $:/core/modules/filters/all.js\r\ntype: application/javascript\r\nmodule-type: filteroperator\r\n\r\nFilter operator for selecting tiddlers\r\n\r\n[all[shadows+tiddlers]]\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar allFilterOperators;\r\n\r\nfunction getAllFilterOperators() {\r\n\tif(!allFilterOperators) {\r\n\t\tallFilterOperators = {};\r\n\t\t$tw.modules.applyMethods(\"allfilteroperator\",allFilterOperators);\r\n\t}\r\n\treturn allFilterOperators;\r\n}\r\n\r\n/*\r\nExport our filter function\r\n*/\r\nexports.all = function(source,operator,options) {\r\n\t// Get our suboperators\r\n\tvar allFilterOperators = getAllFilterOperators();\r\n\t// Cycle through the suboperators accumulating their results\r\n\tvar results = [],\r\n\t\tsubops = operator.operand.split(\"+\");\r\n\t// Check for common optimisations\r\n\tif(subops.length === 1 && subops[0] === \"\") {\r\n\t\treturn source;\r\n\t} else if(subops.length === 1 && subops[0] === \"tiddlers\") {\r\n\t\treturn options.wiki.each;\r\n\t} else if(subops.length === 1 && subops[0] === \"shadows\") {\r\n\t\treturn options.wiki.eachShadow;\r\n\t} else if(subops.length === 2 && subops[0] === \"tiddlers\" && subops[1] === \"shadows\") {\r\n\t\treturn options.wiki.eachTiddlerPlusShadows;\r\n\t} else if(subops.length === 2 && subops[0] === \"shadows\" && subops[1] === \"tiddlers\") {\r\n\t\treturn options.wiki.eachShadowPlusTiddlers;\r\n\t}\r\n\t// Do it the hard way\r\n\tfor(var t=0; t<subops.length; t++) {\r\n\t\tvar subop = allFilterOperators[subops[t]];\r\n\t\tif(subop) {\r\n\t\t\t$tw.utils.pushTop(results,subop(source,operator.prefix,options));\r\n\t\t}\r\n\t}\r\n\treturn results;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/filters/all.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/backlinks.js": {
"text": "/*\\\r\ntitle: $:/core/modules/filters/backlinks.js\r\ntype: application/javascript\r\nmodule-type: filteroperator\r\n\r\nFilter operator for returning all the backlinks from a tiddler\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nExport our filter function\r\n*/\r\nexports.backlinks = function(source,operator,options) {\r\n\tvar results = [];\r\n\tsource(function(tiddler,title) {\r\n\t\t$tw.utils.pushTop(results,options.wiki.getTiddlerBacklinks(title));\r\n\t});\r\n\treturn results;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/filters/backlinks.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/before.js": {
"text": "/*\\\r\ntitle: $:/core/modules/filters/before.js\r\ntype: application/javascript\r\nmodule-type: filteroperator\r\n\r\nFilter operator returning the tiddler from the current list that is before the tiddler named in the operand.\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nExport our filter function\r\n*/\r\nexports.before = function(source,operator,options) {\r\n\tvar results = [];\r\n\tsource(function(tiddler,title) {\r\n\t\tresults.push(title);\r\n\t});\r\n\tvar index = results.indexOf(operator.operand);\r\n\tif(index <= 0) {\r\n\t\treturn [];\r\n\t} else {\r\n\t\treturn [results[index - 1]];\r\n\t}\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/filters/before.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/commands.js": {
"text": "/*\\\r\ntitle: $:/core/modules/filters/commands.js\r\ntype: application/javascript\r\nmodule-type: filteroperator\r\n\r\nFilter operator for returning the names of the commands available in this wiki\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nExport our filter function\r\n*/\r\nexports.commands = function(source,operator,options) {\r\n\tvar results = [];\r\n\t$tw.utils.each($tw.commands,function(commandInfo,name) {\r\n\t\tresults.push(name);\r\n\t});\r\n\tresults.sort();\r\n\treturn results;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/filters/commands.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/each.js": {
"text": "/*\\\r\ntitle: $:/core/modules/filters/each.js\r\ntype: application/javascript\r\nmodule-type: filteroperator\r\n\r\nFilter operator that selects one tiddler for each unique value of the specified field\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nExport our filter function\r\n*/\r\nexports.each = function(source,operator,options) {\r\n\tvar results = [],\r\n\t\tvalues = {};\r\n\tsource(function(tiddler,title) {\r\n\t\tif(tiddler) {\r\n\t\t\tvar value;\r\n\t\t\tif((operator.operand === \"\") || (operator.operand === \"title\")) {\r\n\t\t\t\tvalue = title;\r\n\t\t\t} else {\r\n\t\t\t\tvalue = tiddler.getFieldString(operator.operand);\r\n\t\t\t}\r\n\t\t\tif(!$tw.utils.hop(values,value)) {\r\n\t\t\t\tvalues[value] = true;\r\n\t\t\t\tresults.push(title);\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\treturn results;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/filters/each.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/eachday.js": {
"text": "/*\\\r\ntitle: $:/core/modules/filters/eachday.js\r\ntype: application/javascript\r\nmodule-type: filteroperator\r\n\r\nFilter operator that selects one tiddler for each unique day covered by the specified date field\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nExport our filter function\r\n*/\r\nexports.eachday = function(source,operator,options) {\r\n\tvar results = [],\r\n\t\tvalues = [];\r\n\t// Function to convert a date/time to a date integer\r\n\tvar toDate = function(value) {\r\n\t\tvalue = (new Date(value)).setHours(0,0,0,0);\r\n\t\treturn value+0;\r\n\t};\r\n\tsource(function(tiddler,title) {\r\n\t\tif(tiddler && tiddler.fields[operator.operand]) {\r\n\t\t\tvar value = toDate(tiddler.fields[operator.operand]);\r\n\t\t\tif(values.indexOf(value) === -1) {\r\n\t\t\t\tvalues.push(value);\r\n\t\t\t\tresults.push(title);\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\treturn results;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/filters/eachday.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/editiondescription.js": {
"text": "/*\\\r\ntitle: $:/core/modules/filters/editiondescription.js\r\ntype: application/javascript\r\nmodule-type: filteroperator\r\n\r\nFilter operator for returning the descriptions of the specified edition names\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nExport our filter function\r\n*/\r\nexports.editiondescription = function(source,operator,options) {\r\n\tvar results = [],\r\n\t\teditionInfo = $tw.utils.getEditionInfo();\r\n\tif(editionInfo) {\r\n\t\tsource(function(tiddler,title) {\r\n\t\t\tif($tw.utils.hop(editionInfo,title)) {\r\n\t\t\t\tresults.push(editionInfo[title].description || \"\");\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\treturn results;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/filters/editiondescription.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/editions.js": {
"text": "/*\\\r\ntitle: $:/core/modules/filters/editions.js\r\ntype: application/javascript\r\nmodule-type: filteroperator\r\n\r\nFilter operator for returning the names of the available editions in this wiki\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nExport our filter function\r\n*/\r\nexports.editions = function(source,operator,options) {\r\n\tvar results = [],\r\n\t\teditionInfo = $tw.utils.getEditionInfo();\r\n\tif(editionInfo) {\r\n\t\t$tw.utils.each(editionInfo,function(info,name) {\r\n\t\t\tresults.push(name);\r\n\t\t});\r\n\t}\r\n\tresults.sort();\r\n\treturn results;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/filters/editions.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/field.js": {
"text": "/*\\\r\ntitle: $:/core/modules/filters/field.js\r\ntype: application/javascript\r\nmodule-type: filteroperator\r\n\r\nFilter operator for comparing fields for equality\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nExport our filter function\r\n*/\r\nexports.field = function(source,operator,options) {\r\n\tvar results = [],\r\n\t\tfieldname = (operator.suffix || operator.operator || \"title\").toLowerCase();\r\n\tif(operator.prefix === \"!\") {\r\n\t\tif(operator.regexp) {\r\n\t\t\tsource(function(tiddler,title) {\r\n\t\t\t\tif(tiddler) {\r\n\t\t\t\t\tvar text = tiddler.getFieldString(fieldname);\r\n\t\t\t\t\tif(text !== null && !operator.regexp.exec(text)) {\r\n\t\t\t\t\t\tresults.push(title);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tresults.push(title);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tsource(function(tiddler,title) {\r\n\t\t\t\tif(tiddler) {\r\n\t\t\t\t\tvar text = tiddler.getFieldString(fieldname);\r\n\t\t\t\t\tif(text !== null && text !== operator.operand) {\r\n\t\t\t\t\t\tresults.push(title);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tresults.push(title);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t} else {\r\n\t\tif(operator.regexp) {\r\n\t\t\tsource(function(tiddler,title) {\r\n\t\t\t\tif(tiddler) {\r\n\t\t\t\t\tvar text = tiddler.getFieldString(fieldname);\r\n\t\t\t\t\tif(text !== null && !!operator.regexp.exec(text)) {\r\n\t\t\t\t\t\tresults.push(title);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tsource(function(tiddler,title) {\r\n\t\t\t\tif(tiddler) {\r\n\t\t\t\t\tvar text = tiddler.getFieldString(fieldname);\r\n\t\t\t\t\tif(text !== null && text === operator.operand) {\r\n\t\t\t\t\t\tresults.push(title);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\treturn results;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/filters/field.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/fields.js": {
"text": "/*\\\r\ntitle: $:/core/modules/filters/fields.js\r\ntype: application/javascript\r\nmodule-type: filteroperator\r\n\r\nFilter operator for returning the names of the fields on the selected tiddlers\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nExport our filter function\r\n*/\r\nexports.fields = function(source,operator,options) {\r\n\tvar results = [];\r\n\tsource(function(tiddler,title) {\r\n\t\tif(tiddler) {\r\n\t\t\tfor(var fieldName in tiddler.fields) {\r\n\t\t\t\t$tw.utils.pushTop(results,fieldName);\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\treturn results;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/filters/fields.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/get.js": {
"text": "/*\\\r\ntitle: $:/core/modules/filters/get.js\r\ntype: application/javascript\r\nmodule-type: filteroperator\r\n\r\nFilter operator for replacing tiddler titles by the value of the field specified in the operand.\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nExport our filter function\r\n*/\r\nexports.get = function(source,operator,options) {\r\n\tvar results = [];\r\n\tsource(function(tiddler,title) {\r\n\t\tif(tiddler) {\r\n\t\t\tvar value = tiddler.getFieldString(operator.operand);\r\n\t\t\tif(value) {\r\n\t\t\t\tresults.push(value);\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\treturn results;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/filters/get.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/has.js": {
"text": "/*\\\r\ntitle: $:/core/modules/filters/has.js\r\ntype: application/javascript\r\nmodule-type: filteroperator\r\n\r\nFilter operator for checking if a tiddler has the specified field\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nExport our filter function\r\n*/\r\nexports.has = function(source,operator,options) {\r\n\tvar results = [];\r\n\tif(operator.prefix === \"!\") {\r\n\t\tsource(function(tiddler,title) {\r\n\t\t\tif(!tiddler || (tiddler && (!$tw.utils.hop(tiddler.fields,operator.operand) || tiddler.fields[operator.operand] === \"\"))) {\r\n\t\t\t\tresults.push(title);\r\n\t\t\t}\r\n\t\t});\r\n\t} else {\r\n\t\tsource(function(tiddler,title) {\r\n\t\t\tif(tiddler && $tw.utils.hop(tiddler.fields,operator.operand) && tiddler.fields[operator.operand] !== \"\") {\r\n\t\t\t\tresults.push(title);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\treturn results;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/filters/has.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/indexes.js": {
"text": "/*\\\r\ntitle: $:/core/modules/filters/indexes.js\r\ntype: application/javascript\r\nmodule-type: filteroperator\r\n\r\nFilter operator for returning the indexes of a data tiddler\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nExport our filter function\r\n*/\r\nexports.indexes = function(source,operator,options) {\r\n\tvar results = [];\r\n\tsource(function(tiddler,title) {\r\n\t\tvar data = options.wiki.getTiddlerData(title);\r\n\t\tif(data) {\r\n\t\t\t$tw.utils.pushTop(results,Object.keys(data));\r\n\t\t}\r\n\t});\r\n\tresults.sort();\r\n\treturn results;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/filters/indexes.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/is/current.js": {
"text": "/*\\\r\ntitle: $:/core/modules/filters/is/current.js\r\ntype: application/javascript\r\nmodule-type: isfilteroperator\r\n\r\nFilter function for [is[current]]\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nExport our filter function\r\n*/\r\nexports.current = function(source,prefix,options) {\r\n\tvar results = [],\r\n\t\tcurrTiddlerTitle = options.widget && options.widget.getVariable(\"currentTiddler\");\r\n\tif(prefix === \"!\") {\r\n\t\tsource(function(tiddler,title) {\r\n\t\t\tif(title !== currTiddlerTitle) {\r\n\t\t\t\tresults.push(title);\r\n\t\t\t}\r\n\t\t});\r\n\t} else {\r\n\t\tsource(function(tiddler,title) {\r\n\t\t\tif(title === currTiddlerTitle) {\r\n\t\t\t\tresults.push(title);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\treturn results;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/filters/is/current.js",
"type": "application/javascript",
"module-type": "isfilteroperator"
},
"$:/core/modules/filters/is/image.js": {
"text": "/*\\\r\ntitle: $:/core/modules/filters/is/image.js\r\ntype: application/javascript\r\nmodule-type: isfilteroperator\r\n\r\nFilter function for [is[image]]\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nExport our filter function\r\n*/\r\nexports.image = function(source,prefix,options) {\r\n\tvar results = [];\r\n\tif(prefix === \"!\") {\r\n\t\tsource(function(tiddler,title) {\r\n\t\t\tif(!options.wiki.isImageTiddler(title)) {\r\n\t\t\t\tresults.push(title);\r\n\t\t\t}\r\n\t\t});\r\n\t} else {\r\n\t\tsource(function(tiddler,title) {\r\n\t\t\tif(options.wiki.isImageTiddler(title)) {\r\n\t\t\t\tresults.push(title);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\treturn results;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/filters/is/image.js",
"type": "application/javascript",
"module-type": "isfilteroperator"
},
"$:/core/modules/filters/is/missing.js": {
"text": "/*\\\r\ntitle: $:/core/modules/filters/is/missing.js\r\ntype: application/javascript\r\nmodule-type: isfilteroperator\r\n\r\nFilter function for [is[missing]]\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nExport our filter function\r\n*/\r\nexports.missing = function(source,prefix,options) {\r\n\tvar results = [];\r\n\tif(prefix === \"!\") {\r\n\t\tsource(function(tiddler,title) {\r\n\t\t\tif(options.wiki.tiddlerExists(title)) {\r\n\t\t\t\tresults.push(title);\r\n\t\t\t}\r\n\t\t});\r\n\t} else {\r\n\t\tsource(function(tiddler,title) {\r\n\t\t\tif(!options.wiki.tiddlerExists(title)) {\r\n\t\t\t\tresults.push(title);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\treturn results;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/filters/is/missing.js",
"type": "application/javascript",
"module-type": "isfilteroperator"
},
"$:/core/modules/filters/is/orphan.js": {
"text": "/*\\\r\ntitle: $:/core/modules/filters/is/orphan.js\r\ntype: application/javascript\r\nmodule-type: isfilteroperator\r\n\r\nFilter function for [is[orphan]]\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nExport our filter function\r\n*/\r\nexports.orphan = function(source,prefix,options) {\r\n\tvar results = [],\r\n\t\torphanTitles = options.wiki.getOrphanTitles();\r\n\tif(prefix === \"!\") {\r\n\t\tsource(function(tiddler,title) {\r\n\t\t\tif(orphanTitles.indexOf(title) === -1) {\r\n\t\t\t\tresults.push(title);\r\n\t\t\t}\r\n\t\t});\r\n\t} else {\r\n\t\tsource(function(tiddler,title) {\r\n\t\t\tif(orphanTitles.indexOf(title) !== -1) {\r\n\t\t\t\tresults.push(title);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\treturn results;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/filters/is/orphan.js",
"type": "application/javascript",
"module-type": "isfilteroperator"
},
"$:/core/modules/filters/is/shadow.js": {
"text": "/*\\\r\ntitle: $:/core/modules/filters/is/shadow.js\r\ntype: application/javascript\r\nmodule-type: isfilteroperator\r\n\r\nFilter function for [is[shadow]]\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nExport our filter function\r\n*/\r\nexports.shadow = function(source,prefix,options) {\r\n\tvar results = [];\r\n\tif(prefix === \"!\") {\r\n\t\tsource(function(tiddler,title) {\r\n\t\t\tif(!options.wiki.isShadowTiddler(title)) {\r\n\t\t\t\tresults.push(title);\r\n\t\t\t}\r\n\t\t});\r\n\t} else {\r\n\t\tsource(function(tiddler,title) {\r\n\t\t\tif(options.wiki.isShadowTiddler(title)) {\r\n\t\t\t\tresults.push(title);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\treturn results;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/filters/is/shadow.js",
"type": "application/javascript",
"module-type": "isfilteroperator"
},
"$:/core/modules/filters/is/system.js": {
"text": "/*\\\r\ntitle: $:/core/modules/filters/is/system.js\r\ntype: application/javascript\r\nmodule-type: isfilteroperator\r\n\r\nFilter function for [is[system]]\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nExport our filter function\r\n*/\r\nexports.system = function(source,prefix,options) {\r\n\tvar results = [];\r\n\tif(prefix === \"!\") {\r\n\t\tsource(function(tiddler,title) {\r\n\t\t\tif(!options.wiki.isSystemTiddler(title)) {\r\n\t\t\t\tresults.push(title);\r\n\t\t\t}\r\n\t\t});\r\n\t} else {\r\n\t\tsource(function(tiddler,title) {\r\n\t\t\tif(options.wiki.isSystemTiddler(title)) {\r\n\t\t\t\tresults.push(title);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\treturn results;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/filters/is/system.js",
"type": "application/javascript",
"module-type": "isfilteroperator"
},
"$:/core/modules/filters/is/tag.js": {
"text": "/*\\\r\ntitle: $:/core/modules/filters/is/tag.js\r\ntype: application/javascript\r\nmodule-type: isfilteroperator\r\n\r\nFilter function for [is[tag]]\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nExport our filter function\r\n*/\r\nexports.tag = function(source,prefix,options) {\r\n\tvar results = [],\r\n\t\ttagMap = options.wiki.getTagMap();\r\n\tif(prefix === \"!\") {\r\n\t\tsource(function(tiddler,title) {\r\n\t\t\tif(!$tw.utils.hop(tagMap,title)) {\r\n\t\t\t\tresults.push(title);\r\n\t\t\t}\r\n\t\t});\r\n\t} else {\r\n\t\tsource(function(tiddler,title) {\r\n\t\t\tif($tw.utils.hop(tagMap,title)) {\r\n\t\t\t\tresults.push(title);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\treturn results;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/filters/is/tag.js",
"type": "application/javascript",
"module-type": "isfilteroperator"
},
"$:/core/modules/filters/is/tiddler.js": {
"text": "/*\\\r\ntitle: $:/core/modules/filters/is/tiddler.js\r\ntype: application/javascript\r\nmodule-type: isfilteroperator\r\n\r\nFilter function for [is[tiddler]]\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nExport our filter function\r\n*/\r\nexports.tiddler = function(source,prefix,options) {\r\n\tvar results = [];\r\n\tif(prefix === \"!\") {\r\n\t\tsource(function(tiddler,title) {\r\n\t\t\tif(!options.wiki.tiddlerExists(title)) {\r\n\t\t\t\tresults.push(title);\r\n\t\t\t}\r\n\t\t});\r\n\t} else {\r\n\t\tsource(function(tiddler,title) {\r\n\t\t\tif(options.wiki.tiddlerExists(title)) {\r\n\t\t\t\tresults.push(title);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\treturn results;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/filters/is/tiddler.js",
"type": "application/javascript",
"module-type": "isfilteroperator"
},
"$:/core/modules/filters/is.js": {
"text": "/*\\\r\ntitle: $:/core/modules/filters/is.js\r\ntype: application/javascript\r\nmodule-type: filteroperator\r\n\r\nFilter operator for checking tiddler properties\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar isFilterOperators;\r\n\r\nfunction getIsFilterOperators() {\r\n\tif(!isFilterOperators) {\r\n\t\tisFilterOperators = {};\r\n\t\t$tw.modules.applyMethods(\"isfilteroperator\",isFilterOperators);\r\n\t}\r\n\treturn isFilterOperators;\r\n}\r\n\r\n/*\r\nExport our filter function\r\n*/\r\nexports.is = function(source,operator,options) {\r\n\t// Dispatch to the correct isfilteroperator\r\n\tvar isFilterOperators = getIsFilterOperators();\r\n\tvar isFilterOperator = isFilterOperators[operator.operand];\r\n\tif(isFilterOperator) {\r\n\t\treturn isFilterOperator(source,operator.prefix,options);\r\n\t} else {\r\n\t\treturn [\"Filter Error: Unknown operand for the 'is' filter operator\"];\r\n\t}\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/filters/is.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/limit.js": {
"text": "/*\\\r\ntitle: $:/core/modules/filters/limit.js\r\ntype: application/javascript\r\nmodule-type: filteroperator\r\n\r\nFilter operator for chopping the results to a specified maximum number of entries\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nExport our filter function\r\n*/\r\nexports.limit = function(source,operator,options) {\r\n\tvar results = [];\r\n\t// Convert to an array\r\n\tsource(function(tiddler,title) {\r\n\t\tresults.push(title);\r\n\t});\r\n\t// Slice the array if necessary\r\n\tvar limit = Math.min(results.length,parseInt(operator.operand,10));\r\n\tif(operator.prefix === \"!\") {\r\n\t\tresults = results.slice(-limit);\r\n\t} else {\r\n\t\tresults = results.slice(0,limit);\r\n\t}\r\n\treturn results;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/filters/limit.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/links.js": {
"text": "/*\\\r\ntitle: $:/core/modules/filters/links.js\r\ntype: application/javascript\r\nmodule-type: filteroperator\r\n\r\nFilter operator for returning all the links from a tiddler\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nExport our filter function\r\n*/\r\nexports.links = function(source,operator,options) {\r\n\tvar results = [];\r\n\tsource(function(tiddler,title) {\r\n\t\t$tw.utils.pushTop(results,options.wiki.getTiddlerLinks(title));\r\n\t});\r\n\treturn results;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/filters/links.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/list.js": {
"text": "/*\\\r\ntitle: $:/core/modules/filters/list.js\r\ntype: application/javascript\r\nmodule-type: filteroperator\r\n\r\nFilter operator returning the tiddlers whose title is listed in the operand tiddler\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nExport our filter function\r\n*/\r\nexports.list = function(source,operator,options) {\r\n\tvar results = [],\r\n\t\ttr = $tw.utils.parseTextReference(operator.operand),\r\n\t\tcurrTiddlerTitle = options.widget && options.widget.getVariable(\"currentTiddler\"),\r\n\t\tlist = options.wiki.getTiddlerList(tr.title || currTiddlerTitle,tr.field,tr.index);\r\n\tif(operator.prefix === \"!\") {\r\n\t\tsource(function(tiddler,title) {\r\n\t\t\tif(list.indexOf(title) === -1) {\r\n\t\t\t\tresults.push(title);\r\n\t\t\t}\r\n\t\t});\r\n\t} else {\r\n\t\tresults = list;\r\n\t}\r\n\treturn results;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/filters/list.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/listed.js": {
"text": "/*\\\r\ntitle: $:/core/modules/filters/listed.js\r\ntype: application/javascript\r\nmodule-type: filteroperator\r\n\r\nFilter operator returning all tiddlers that have the selected tiddlers in a list\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nExport our filter function\r\n*/\r\nexports.listed = function(source,operator,options) {\r\n\tvar field = operator.operand || \"list\",\r\n\t\tresults = [];\r\n\tsource(function(tiddler,title) {\r\n\t\t$tw.utils.pushTop(results,options.wiki.findListingsOfTiddler(title,field));\r\n\t});\r\n\treturn results;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/filters/listed.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/listops.js": {
"text": "/*\\\r\ntitle: $:/core/modules/filters/listops.js\r\ntype: application/javascript\r\nmodule-type: filteroperator\r\n\r\nFilter operators for manipulating the current selection list\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nReverse list\r\n*/\r\nexports.reverse = function(source,operator,options) {\r\n\tvar results = [];\r\n\tsource(function(tiddler,title) {\r\n\t\tresults.unshift(title);\r\n\t});\r\n\treturn results;\r\n};\r\n\r\n/*\r\nFirst entry/entries in list\r\n*/\r\nexports.first = function(source,operator,options) {\r\n\tvar count = parseInt(operator.operand) || 1,\r\n\t\tresults = [];\r\n\tsource(function(tiddler,title) {\r\n\t\tresults.push(title);\r\n\t});\r\n\treturn results.slice(0,count);\r\n};\r\n\r\n/*\r\nLast entry/entries in list\r\n*/\r\nexports.last = function(source,operator,options) {\r\n\tvar count = parseInt(operator.operand) || 1,\r\n\t\tresults = [];\r\n\tsource(function(tiddler,title) {\r\n\t\tresults.push(title);\r\n\t});\r\n\treturn results.slice(-count);\r\n};\r\n\r\n/*\r\nAll but the first entry/entries of the list\r\n*/\r\nexports.rest = function(source,operator,options) {\r\n\tvar count = parseInt(operator.operand) || 1,\r\n\t\tresults = [];\r\n\tsource(function(tiddler,title) {\r\n\t\tresults.push(title);\r\n\t});\r\n\treturn results.slice(count);\r\n};\r\nexports.butfirst = exports.rest;\r\nexports.bf = exports.rest;\r\n\r\n/*\r\nAll but the last entry/entries of the list\r\n*/\r\nexports.butlast = function(source,operator,options) {\r\n\tvar count = parseInt(operator.operand) || 1,\r\n\t\tresults = [];\r\n\tsource(function(tiddler,title) {\r\n\t\tresults.push(title);\r\n\t});\r\n\treturn results.slice(0,-count);\r\n};\r\nexports.bl = exports.butlast;\r\n\r\n/*\r\nThe nth member of the list\r\n*/\r\nexports.nth = function(source,operator,options) {\r\n\tvar count = parseInt(operator.operand) || 1,\r\n\t\tresults = [];\r\n\tsource(function(tiddler,title) {\r\n\t\tresults.push(title);\r\n\t});\r\n\treturn results.slice(count - 1,count);\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/filters/listops.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/modules.js": {
"text": "/*\\\r\ntitle: $:/core/modules/filters/modules.js\r\ntype: application/javascript\r\nmodule-type: filteroperator\r\n\r\nFilter operator for returning the titles of the modules of a given type in this wiki\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nExport our filter function\r\n*/\r\nexports.modules = function(source,operator,options) {\r\n\tvar results = [];\r\n\tsource(function(tiddler,title) {\r\n\t\t$tw.utils.each($tw.modules.types[title],function(moduleInfo,moduleName) {\r\n\t\t\tresults.push(moduleName);\r\n\t\t});\r\n\t});\r\n\tresults.sort();\r\n\treturn results;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/filters/modules.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/moduletypes.js": {
"text": "/*\\\r\ntitle: $:/core/modules/filters/moduletypes.js\r\ntype: application/javascript\r\nmodule-type: filteroperator\r\n\r\nFilter operator for returning the names of the module types in this wiki\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nExport our filter function\r\n*/\r\nexports.moduletypes = function(source,operator,options) {\r\n\tvar results = [];\r\n\t$tw.utils.each($tw.modules.types,function(moduleInfo,type) {\r\n\t\tresults.push(type);\r\n\t});\r\n\tresults.sort();\r\n\treturn results;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/filters/moduletypes.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/next.js": {
"text": "/*\\\r\ntitle: $:/core/modules/filters/next.js\r\ntype: application/javascript\r\nmodule-type: filteroperator\r\n\r\nFilter operator returning the tiddler whose title occurs next in the list supplied in the operand tiddler\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nExport our filter function\r\n*/\r\nexports.next = function(source,operator,options) {\r\n\tvar results = [],\r\n\t\tlist = options.wiki.getTiddlerList(operator.operand);\r\n\tsource(function(tiddler,title) {\r\n\t\tvar match = list.indexOf(title);\r\n\t\t// increment match and then test if result is in range\r\n\t\tmatch++;\r\n\t\tif(match > 0 && match < list.length) {\r\n\t\t\tresults.push(list[match]);\r\n\t\t}\r\n\t});\r\n\treturn results;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/filters/next.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/plugintiddlers.js": {
"text": "/*\\\r\ntitle: $:/core/modules/filters/plugintiddlers.js\r\ntype: application/javascript\r\nmodule-type: filteroperator\r\n\r\nFilter operator for returning the titles of the shadow tiddlers within a plugin\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nExport our filter function\r\n*/\r\nexports.plugintiddlers = function(source,operator,options) {\r\n\tvar results = [];\r\n\tsource(function(tiddler,title) {\r\n\t\tvar pluginInfo = options.wiki.getPluginInfo(title) || options.wiki.getTiddlerData(title,{tiddlers:[]});\r\n\t\tif(pluginInfo && pluginInfo.tiddlers) {\r\n\t\t\t$tw.utils.each(pluginInfo.tiddlers,function(fields,title) {\r\n\t\t\t\tresults.push(title);\r\n\t\t\t});\r\n\t\t}\r\n\t});\r\n\tresults.sort();\r\n\treturn results;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/filters/plugintiddlers.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/prefix.js": {
"text": "/*\\\r\ntitle: $:/core/modules/filters/prefix.js\r\ntype: application/javascript\r\nmodule-type: filteroperator\r\n\r\nFilter operator for checking if a title starts with a prefix\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nExport our filter function\r\n*/\r\nexports.prefix = function(source,operator,options) {\r\n\tvar results = [];\r\n\tif(operator.prefix === \"!\") {\r\n\t\tsource(function(tiddler,title) {\r\n\t\t\tif(title.substr(0,operator.operand.length) !== operator.operand) {\r\n\t\t\t\tresults.push(title);\r\n\t\t\t}\r\n\t\t});\r\n\t} else {\r\n\t\tsource(function(tiddler,title) {\r\n\t\t\tif(title.substr(0,operator.operand.length) === operator.operand) {\r\n\t\t\t\tresults.push(title);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\treturn results;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/filters/prefix.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/previous.js": {
"text": "/*\\\r\ntitle: $:/core/modules/filters/previous.js\r\ntype: application/javascript\r\nmodule-type: filteroperator\r\n\r\nFilter operator returning the tiddler whose title occurs immediately prior in the list supplied in the operand tiddler\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nExport our filter function\r\n*/\r\nexports.previous = function(source,operator,options) {\r\n\tvar results = [],\r\n\t\tlist = options.wiki.getTiddlerList(operator.operand);\r\n\tsource(function(tiddler,title) {\r\n\t\tvar match = list.indexOf(title);\r\n\t\t// increment match and then test if result is in range\r\n\t\tmatch--;\r\n\t\tif(match >= 0) {\r\n\t\t\tresults.push(list[match]);\r\n\t\t}\r\n\t});\r\n\treturn results;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/filters/previous.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/regexp.js": {
"text": "/*\\\r\ntitle: $:/core/modules/filters/regexp.js\r\ntype: application/javascript\r\nmodule-type: filteroperator\r\n\r\nFilter operator for regexp matching\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nExport our filter function\r\n*/\r\nexports.regexp = function(source,operator,options) {\r\n\tvar results = [],\r\n\t\tfieldname = (operator.suffix || \"title\").toLowerCase(),\r\n\t\tregexpString, regexp, flags = \"\", match,\r\n\t\tgetFieldString = function(tiddler,title) {\r\n\t\t\tif(tiddler) {\r\n\t\t\t\treturn tiddler.getFieldString(fieldname);\r\n\t\t\t} else if(fieldname === \"title\") {\r\n\t\t\t\treturn title;\r\n\t\t\t} else {\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t};\r\n\t// Process flags and construct regexp\r\n\tregexpString = operator.operand;\r\n\tmatch = /^\\(\\?([gim]+)\\)/.exec(regexpString);\r\n\tif(match) {\r\n\t\tflags = match[1];\r\n\t\tregexpString = regexpString.substr(match[0].length);\r\n\t} else {\r\n\t\tmatch = /\\(\\?([gim]+)\\)$/.exec(regexpString);\r\n\t\tif(match) {\r\n\t\t\tflags = match[1];\r\n\t\t\tregexpString = regexpString.substr(0,regexpString.length - match[0].length);\r\n\t\t}\r\n\t}\r\n\tregexp = new RegExp(regexpString,flags);\r\n\t// Process the incoming tiddlers\r\n\tif(operator.prefix === \"!\") {\r\n\t\tsource(function(tiddler,title) {\r\n\t\t\tvar text = getFieldString(tiddler,title);\r\n\t\t\tif(text !== null) {\r\n\t\t\t\tif(!regexp.exec(text)) {\r\n\t\t\t\t\tresults.push(title);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t} else {\r\n\t\tsource(function(tiddler,title) {\r\n\t\t\tvar text = getFieldString(tiddler,title);\r\n\t\t\tif(text !== null) {\r\n\t\t\t\tif(!!regexp.exec(text)) {\r\n\t\t\t\t\tresults.push(title);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\treturn results;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/filters/regexp.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/removeprefix.js": {
"text": "/*\\\r\ntitle: $:/core/modules/filters/removeprefix.js\r\ntype: application/javascript\r\nmodule-type: filteroperator\r\n\r\nFilter operator for removing a prefix from each title in the list. Titles that do not start with the prefix are removed.\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nExport our filter function\r\n*/\r\nexports.removeprefix = function(source,operator,options) {\r\n\tvar results = [];\r\n\tsource(function(tiddler,title) {\r\n\t\tif(title.substr(0,operator.operand.length) === operator.operand) {\r\n\t\t\tresults.push(title.substr(operator.operand.length));\r\n\t\t}\r\n\t});\r\n\treturn results;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/filters/removeprefix.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/removesuffix.js": {
"text": "/*\\\r\ntitle: $:/core/modules/filters/removesuffix.js\r\ntype: application/javascript\r\nmodule-type: filteroperator\r\n\r\nFilter operator for removing a suffix from each title in the list. Titles that do not end with the suffix are removed.\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nExport our filter function\r\n*/\r\nexports.removesuffix = function(source,operator,options) {\r\n\tvar results = [];\r\n\tsource(function(tiddler,title) {\r\n\t\tif(title.substr(-operator.operand.length) === operator.operand) {\r\n\t\t\tresults.push(title.substr(0,title.length - operator.operand.length));\r\n\t\t}\r\n\t});\r\n\treturn results;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/filters/removesuffix.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/sameday.js": {
"text": "/*\\\r\ntitle: $:/core/modules/filters/sameday.js\r\ntype: application/javascript\r\nmodule-type: filteroperator\r\n\r\nFilter operator that selects tiddlers with a modified date field on the same day as the provided value.\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nExport our filter function\r\n*/\r\nexports.sameday = function(source,operator,options) {\r\n\tvar results = [],\r\n\t\tfieldName = operator.suffix || \"modified\",\r\n\t\ttargetDate = (new Date($tw.utils.parseDate(operator.operand))).setHours(0,0,0,0);\r\n\t// Function to convert a date/time to a date integer\r\n\tvar isSameDay = function(dateField) {\r\n\t\t\treturn (new Date(dateField)).setHours(0,0,0,0) === targetDate;\r\n\t\t};\r\n\tsource(function(tiddler,title) {\r\n\t\tif(tiddler && tiddler.fields[fieldName]) {\r\n\t\t\tif(isSameDay(tiddler.fields[fieldName])) {\r\n\t\t\t\tresults.push(title);\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\treturn results;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/filters/sameday.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/search.js": {
"text": "/*\\\r\ntitle: $:/core/modules/filters/search.js\r\ntype: application/javascript\r\nmodule-type: filteroperator\r\n\r\nFilter operator for searching for the text in the operand tiddler\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nExport our filter function\r\n*/\r\nexports.search = function(source,operator,options) {\r\n\tvar invert = operator.prefix === \"!\";\r\n\tif(operator.suffix) {\r\n\t\treturn options.wiki.search(operator.operand,{\r\n\t\t\tsource: source,\r\n\t\t\tinvert: invert,\r\n\t\t\tfield: operator.suffix\r\n\t\t});\r\n\t} else {\r\n\t\treturn options.wiki.search(operator.operand,{\r\n\t\t\tsource: source,\r\n\t\t\tinvert: invert\r\n\t\t});\r\n\t}\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/filters/search.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/shadowsource.js": {
"text": "/*\\\r\ntitle: $:/core/modules/filters/shadowsource.js\r\ntype: application/javascript\r\nmodule-type: filteroperator\r\n\r\nFilter operator for returning the source plugins for shadow tiddlers\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nExport our filter function\r\n*/\r\nexports.shadowsource = function(source,operator,options) {\r\n\tvar results = [];\r\n\tsource(function(tiddler,title) {\r\n\t\tvar source = options.wiki.getShadowSource(title);\r\n\t\tif(source) {\r\n\t\t\t$tw.utils.pushTop(results,source);\r\n\t\t}\r\n\t});\r\n\tresults.sort();\r\n\treturn results;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/filters/shadowsource.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/sort.js": {
"text": "/*\\\r\ntitle: $:/core/modules/filters/sort.js\r\ntype: application/javascript\r\nmodule-type: filteroperator\r\n\r\nFilter operator for sorting\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nExport our filter function\r\n*/\r\nexports.sort = function(source,operator,options) {\r\n\tvar results = prepare_results(source);\r\n\toptions.wiki.sortTiddlers(results,operator.operand || \"title\",operator.prefix === \"!\",false,false);\r\n\treturn results;\r\n};\r\n\r\nexports.nsort = function(source,operator,options) {\r\n\tvar results = prepare_results(source);\r\n\toptions.wiki.sortTiddlers(results,operator.operand || \"title\",operator.prefix === \"!\",false,true);\r\n\treturn results;\r\n};\r\n\r\nexports.sortcs = function(source,operator,options) {\r\n\tvar results = prepare_results(source);\r\n\toptions.wiki.sortTiddlers(results,operator.operand || \"title\",operator.prefix === \"!\",true,false);\r\n\treturn results;\r\n};\r\n\r\nexports.nsortcs = function(source,operator,options) {\r\n\tvar results = prepare_results(source);\r\n\toptions.wiki.sortTiddlers(results,operator.operand || \"title\",operator.prefix === \"!\",true,true);\r\n\treturn results;\r\n};\r\n\r\nvar prepare_results = function (source) {\r\n\tvar results = [];\r\n\tsource(function(tiddler,title) {\r\n\t\tresults.push(title);\r\n\t});\r\n\treturn results;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/filters/sort.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/splitbefore.js": {
"text": "/*\\\r\ntitle: $:/core/modules/filters/splitbefore.js\r\ntype: application/javascript\r\nmodule-type: filteroperator\r\n\r\nFilter operator that splits each result on the first occurance of the specified separator and returns the unique values.\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nExport our filter function\r\n*/\r\nexports.splitbefore = function(source,operator,options) {\r\n\tvar results = [];\r\n\tsource(function(tiddler,title) {\r\n\t\tvar parts = title.split(operator.operand);\r\n\t\tif(parts.length === 1) {\r\n\t\t\t$tw.utils.pushTop(results,parts[0]);\r\n\t\t} else {\r\n\t\t\t$tw.utils.pushTop(results,parts[0] + operator.operand);\r\n\t\t}\r\n\t});\r\n\treturn results;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/filters/splitbefore.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/storyviews.js": {
"text": "/*\\\r\ntitle: $:/core/modules/filters/storyviews.js\r\ntype: application/javascript\r\nmodule-type: filteroperator\r\n\r\nFilter operator for returning the names of the story views in this wiki\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nExport our filter function\r\n*/\r\nexports.storyviews = function(source,operator,options) {\r\n\tvar results = [],\r\n\t\tstoryviews = {};\r\n\t$tw.modules.applyMethods(\"storyview\",storyviews);\r\n\t$tw.utils.each(storyviews,function(info,name) {\r\n\t\tresults.push(name);\r\n\t});\r\n\tresults.sort();\r\n\treturn results;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/filters/storyviews.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/suffix.js": {
"text": "/*\\\r\ntitle: $:/core/modules/filters/suffix.js\r\ntype: application/javascript\r\nmodule-type: filteroperator\r\n\r\nFilter operator for checking if a title ends with a suffix\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nExport our filter function\r\n*/\r\nexports.suffix = function(source,operator,options) {\r\n\tvar results = [];\r\n\tif(operator.prefix === \"!\") {\r\n\t\tsource(function(tiddler,title) {\r\n\t\t\tif(title.substr(-operator.operand.length) !== operator.operand) {\r\n\t\t\t\tresults.push(title);\r\n\t\t\t}\r\n\t\t});\r\n\t} else {\r\n\t\tsource(function(tiddler,title) {\r\n\t\t\tif(title.substr(-operator.operand.length) === operator.operand) {\r\n\t\t\t\tresults.push(title);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\treturn results;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/filters/suffix.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/tag.js": {
"text": "/*\\\r\ntitle: $:/core/modules/filters/tag.js\r\ntype: application/javascript\r\nmodule-type: filteroperator\r\n\r\nFilter operator for checking for the presence of a tag\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nExport our filter function\r\n*/\r\nexports.tag = function(source,operator,options) {\r\n\tvar results = [];\r\n\tif(operator.prefix === \"!\") {\r\n\t\tsource(function(tiddler,title) {\r\n\t\t\tif(tiddler && !tiddler.hasTag(operator.operand)) {\r\n\t\t\t\tresults.push(title);\r\n\t\t\t}\r\n\t\t});\r\n\t} else {\r\n\t\tsource(function(tiddler,title) {\r\n\t\t\tif(tiddler && tiddler.hasTag(operator.operand)) {\r\n\t\t\t\tresults.push(title);\r\n\t\t\t}\r\n\t\t});\r\n\t\tresults = options.wiki.sortByList(results,operator.operand);\r\n\t}\r\n\treturn results;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/filters/tag.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/tagging.js": {
"text": "/*\\\r\ntitle: $:/core/modules/filters/tagging.js\r\ntype: application/javascript\r\nmodule-type: filteroperator\r\n\r\nFilter operator returning all tiddlers that are tagged with the selected tiddlers\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nExport our filter function\r\n*/\r\nexports.tagging = function(source,operator,options) {\r\n\tvar results = [];\r\n\tsource(function(tiddler,title) {\r\n\t\t$tw.utils.pushTop(results,options.wiki.getTiddlersWithTag(title));\r\n\t});\r\n\treturn results;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/filters/tagging.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/tags.js": {
"text": "/*\\\r\ntitle: $:/core/modules/filters/tags.js\r\ntype: application/javascript\r\nmodule-type: filteroperator\r\n\r\nFilter operator returning all the tags of the selected tiddlers\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nExport our filter function\r\n*/\r\nexports.tags = function(source,operator,options) {\r\n\tvar results = [];\r\n\tsource(function(tiddler,title) {\r\n\t\tif(tiddler && tiddler.fields.tags) {\r\n\t\t\t$tw.utils.pushTop(results,tiddler.fields.tags);\r\n\t\t}\r\n\t});\r\n\treturn results;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/filters/tags.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/title.js": {
"text": "/*\\\r\ntitle: $:/core/modules/filters/title.js\r\ntype: application/javascript\r\nmodule-type: filteroperator\r\n\r\nFilter operator for comparing title fields for equality\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nExport our filter function\r\n*/\r\nexports.title = function(source,operator,options) {\r\n\tvar results = [];\r\n\tif(operator.prefix === \"!\") {\r\n\t\tsource(function(tiddler,title) {\r\n\t\t\tif(tiddler && tiddler.fields.title !== operator.operand) {\r\n\t\t\t\tresults.push(title);\r\n\t\t\t}\r\n\t\t});\r\n\t} else {\r\n\t\tresults.push(operator.operand);\r\n\t}\r\n\treturn results;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/filters/title.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/untagged.js": {
"text": "/*\\\r\ntitle: $:/core/modules/filters/untagged.js\r\ntype: application/javascript\r\nmodule-type: filteroperator\r\n\r\nFilter operator returning all the selected tiddlers that are untagged\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nExport our filter function\r\n*/\r\nexports.untagged = function(source,operator,options) {\r\n\tvar results = [];\r\n\tif(operator.prefix === \"!\") {\r\n\t\tsource(function(tiddler,title) {\r\n\t\t\tif(tiddler && $tw.utils.isArray(tiddler.fields.tags) && tiddler.fields.tags.length > 0) {\r\n\t\t\t\t$tw.utils.pushTop(results,title);\r\n\t\t\t}\r\n\t\t});\r\n\t} else {\r\n\t\tsource(function(tiddler,title) {\r\n\t\t\tif(!tiddler || !tiddler.hasField(\"tags\") || ($tw.utils.isArray(tiddler.fields.tags) && tiddler.fields.tags.length === 0)) {\r\n\t\t\t\t$tw.utils.pushTop(results,title);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\treturn results;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/filters/untagged.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters.js": {
"text": "/*\\\r\ntitle: $:/core/modules/filters.js\r\ntype: application/javascript\r\nmodule-type: wikimethod\r\n\r\nAdds tiddler filtering methods to the $tw.Wiki object.\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nParses an operation within a filter string\r\n\tresults: Array of array of operator nodes into which results should be inserted\r\n\tfilterString: filter string\r\n\tp: start position within the string\r\nReturns the new start position, after the parsed operation\r\n*/\r\nfunction parseFilterOperation(operators,filterString,p) {\r\n\tvar operator, operand, bracketPos, curlyBracketPos;\r\n\t// Skip the starting square bracket\r\n\tif(filterString.charAt(p++) !== \"[\") {\r\n\t\tthrow \"Missing [ in filter expression\";\r\n\t}\r\n\t// Process each operator in turn\r\n\tdo {\r\n\t\toperator = {};\r\n\t\t// Check for an operator prefix\r\n\t\tif(filterString.charAt(p) === \"!\") {\r\n\t\t\toperator.prefix = filterString.charAt(p++);\r\n\t\t}\r\n\t\t// Get the operator name\r\n\t\tvar nextBracketPos = filterString.substring(p).search(/[\\[\\{<\\/]/);\r\n\t\tif(nextBracketPos === -1) {\r\n\t\t\tthrow \"Missing [ in filter expression\";\r\n\t\t}\r\n\t\tnextBracketPos += p;\r\n\t\tvar bracket = filterString.charAt(nextBracketPos);\r\n\t\toperator.operator = filterString.substring(p,nextBracketPos);\r\n\t\t\r\n\t\t// Any suffix?\r\n\t\tvar colon = operator.operator.indexOf(':');\r\n\t\tif(colon > -1) {\r\n\t\t\toperator.suffix = operator.operator.substring(colon + 1);\r\n\t\t\toperator.operator = operator.operator.substring(0,colon) || \"field\";\r\n\t\t}\r\n\t\t// Empty operator means: title\r\n\t\telse if(operator.operator === \"\") {\r\n\t\t\toperator.operator = \"title\";\r\n\t\t}\r\n\r\n\t\tp = nextBracketPos + 1;\r\n\t\tswitch (bracket) {\r\n\t\t\tcase \"{\": // Curly brackets\r\n\t\t\t\toperator.indirect = true;\r\n\t\t\t\tnextBracketPos = filterString.indexOf(\"}\",p);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"[\": // Square brackets\r\n\t\t\t\tnextBracketPos = filterString.indexOf(\"]\",p);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"<\": // Angle brackets\r\n\t\t\t\toperator.variable = true;\r\n\t\t\t\tnextBracketPos = filterString.indexOf(\">\",p);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"/\": // regexp brackets\r\n\t\t\t\tvar rex = /^((?:[^\\\\\\/]*|\\\\.)*)\\/(?:\\(([mygi]+)\\))?/g,\r\n\t\t\t\t\trexMatch = rex.exec(filterString.substring(p));\r\n\t\t\t\tif(rexMatch) {\r\n\t\t\t\t\toperator.regexp = new RegExp(rexMatch[1], rexMatch[2]);\r\n// DEPRECATION WARNING\r\nconsole.log(\"WARNING: Filter\",operator.operator,\"has a deprecated regexp operand\",operator.regexp);\r\n\t\t\t\t\tnextBracketPos = p + rex.lastIndex - 1;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tthrow \"Unterminated regular expression in filter expression\";\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\tif(nextBracketPos === -1) {\r\n\t\t\tthrow \"Missing closing bracket in filter expression\";\r\n\t\t}\r\n\t\tif(!operator.regexp) {\r\n\t\t\toperator.operand = filterString.substring(p,nextBracketPos);\r\n\t\t}\r\n\t\tp = nextBracketPos + 1;\r\n\t\t\t\r\n\t\t// Push this operator\r\n\t\toperators.push(operator);\r\n\t} while(filterString.charAt(p) !== \"]\");\r\n\t// Skip the ending square bracket\r\n\tif(filterString.charAt(p++) !== \"]\") {\r\n\t\tthrow \"Missing ] in filter expression\";\r\n\t}\r\n\t// Return the parsing position\r\n\treturn p;\r\n}\r\n\r\n/*\r\nParse a filter string\r\n*/\r\nexports.parseFilter = function(filterString) {\r\n\tfilterString = filterString || \"\";\r\n\tvar results = [], // Array of arrays of operator nodes {operator:,operand:}\r\n\t\tp = 0, // Current position in the filter string\r\n\t\tmatch;\r\n\tvar whitespaceRegExp = /(\\s+)/mg,\r\n\t\toperandRegExp = /((?:\\+|\\-)?)(?:(\\[)|(\"(?:[^\"])*\")|('(?:[^'])*')|([^\\s\\[\\]]+))/mg;\r\n\twhile(p < filterString.length) {\r\n\t\t// Skip any whitespace\r\n\t\twhitespaceRegExp.lastIndex = p;\r\n\t\tmatch = whitespaceRegExp.exec(filterString);\r\n\t\tif(match && match.index === p) {\r\n\t\t\tp = p + match[0].length;\r\n\t\t}\r\n\t\t// Match the start of the operation\r\n\t\tif(p < filterString.length) {\r\n\t\t\toperandRegExp.lastIndex = p;\r\n\t\t\tmatch = operandRegExp.exec(filterString);\r\n\t\t\tif(!match || match.index !== p) {\r\n\t\t\t\tthrow \"Syntax error in filter expression\";\r\n\t\t\t}\r\n\t\t\tvar operation = {\r\n\t\t\t\tprefix: \"\",\r\n\t\t\t\toperators: []\r\n\t\t\t};\r\n\t\t\tif(match[1]) {\r\n\t\t\t\toperation.prefix = match[1];\r\n\t\t\t\tp++;\r\n\t\t\t}\r\n\t\t\tif(match[2]) { // Opening square bracket\r\n\t\t\t\tp = parseFilterOperation(operation.operators,filterString,p);\r\n\t\t\t} else {\r\n\t\t\t\tp = match.index + match[0].length;\r\n\t\t\t}\r\n\t\t\tif(match[3] || match[4] || match[5]) { // Double quoted string, single quoted string or unquoted title\r\n\t\t\t\toperation.operators.push(\r\n\t\t\t\t\t{operator: \"title\", operand: match[3] || match[4] || match[5]}\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t\tresults.push(operation);\r\n\t\t}\r\n\t}\r\n\treturn results;\r\n};\r\n\r\nexports.getFilterOperators = function() {\r\n\tif(!this.filterOperators) {\r\n\t\t$tw.Wiki.prototype.filterOperators = {};\r\n\t\t$tw.modules.applyMethods(\"filteroperator\",this.filterOperators);\r\n\t}\r\n\treturn this.filterOperators;\r\n};\r\n\r\nexports.filterTiddlers = function(filterString,widget,source) {\r\n\tvar fn = this.compileFilter(filterString);\r\n\treturn fn.call(this,source,widget);\r\n};\r\n\r\n/*\r\nCompile a filter into a function with the signature fn(source,widget) where:\r\nsource: an iterator function for the source tiddlers, called source(iterator), where iterator is called as iterator(tiddler,title)\r\nwidget: an optional widget node for retrieving the current tiddler etc.\r\n*/\r\nexports.compileFilter = function(filterString) {\r\n\tvar filterParseTree;\r\n\ttry {\r\n\t\tfilterParseTree = this.parseFilter(filterString);\r\n\t} catch(e) {\r\n\t\treturn function(source,widget) {\r\n\t\t\treturn [\"Filter error: \" + e];\r\n\t\t};\r\n\t}\r\n\t// Get the hashmap of filter operator functions\r\n\tvar filterOperators = this.getFilterOperators();\r\n\t// Assemble array of functions, one for each operation\r\n\tvar operationFunctions = [];\r\n\t// Step through the operations\r\n\tvar self = this;\r\n\t$tw.utils.each(filterParseTree,function(operation) {\r\n\t\t// Create a function for the chain of operators in the operation\r\n\t\tvar operationSubFunction = function(source,widget) {\r\n\t\t\tvar accumulator = source,\r\n\t\t\t\tresults = [],\r\n\t\t\t\tcurrTiddlerTitle = widget && widget.getVariable(\"currentTiddler\");\r\n\t\t\t$tw.utils.each(operation.operators,function(operator) {\r\n\t\t\t\tvar operand = operator.operand,\r\n\t\t\t\t\toperatorFunction;\r\n\t\t\t\tif(!operator.operator) {\r\n\t\t\t\t\toperatorFunction = filterOperators.title;\r\n\t\t\t\t} else if(!filterOperators[operator.operator]) {\r\n\t\t\t\t\toperatorFunction = filterOperators.field;\r\n\t\t\t\t} else {\r\n\t\t\t\t\toperatorFunction = filterOperators[operator.operator];\r\n\t\t\t\t}\r\n\t\t\t\tif(operator.indirect) {\r\n\t\t\t\t\toperand = self.getTextReference(operator.operand,\"\",currTiddlerTitle);\r\n\t\t\t\t}\r\n\t\t\t\tif(operator.variable) {\r\n\t\t\t\t\toperand = widget.getVariable(operator.operand,{defaultValue: \"\"});\r\n\t\t\t\t}\r\n\t\t\t\tresults = operatorFunction(accumulator,{\r\n\t\t\t\t\t\t\toperator: operator.operator,\r\n\t\t\t\t\t\t\toperand: operand,\r\n\t\t\t\t\t\t\tprefix: operator.prefix,\r\n\t\t\t\t\t\t\tsuffix: operator.suffix,\r\n\t\t\t\t\t\t\tregexp: operator.regexp\r\n\t\t\t\t\t\t},{\r\n\t\t\t\t\t\t\twiki: self,\r\n\t\t\t\t\t\t\twidget: widget\r\n\t\t\t\t\t\t});\r\n\t\t\t\tif($tw.utils.isArray(results)) {\r\n\t\t\t\t\taccumulator = self.makeTiddlerIterator(results);\r\n\t\t\t\t} else {\r\n\t\t\t\t\taccumulator = results;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tif($tw.utils.isArray(results)) {\r\n\t\t\t\treturn results;\r\n\t\t\t} else {\r\n\t\t\t\tvar resultArray = [];\r\n\t\t\t\tresults(function(tiddler,title) {\r\n\t\t\t\t\tresultArray.push(title);\r\n\t\t\t\t});\r\n\t\t\t\treturn resultArray;\r\n\t\t\t}\r\n\t\t};\r\n\t\t// Wrap the operator functions in a wrapper function that depends on the prefix\r\n\t\toperationFunctions.push((function() {\r\n\t\t\tswitch(operation.prefix || \"\") {\r\n\t\t\t\tcase \"\": // No prefix means that the operation is unioned into the result\r\n\t\t\t\t\treturn function(results,source,widget) {\r\n\t\t\t\t\t\t$tw.utils.pushTop(results,operationSubFunction(source,widget));\r\n\t\t\t\t\t};\r\n\t\t\t\tcase \"-\": // The results of this operation are removed from the main result\r\n\t\t\t\t\treturn function(results,source,widget) {\r\n\t\t\t\t\t\t$tw.utils.removeArrayEntries(results,operationSubFunction(source,widget));\r\n\t\t\t\t\t};\r\n\t\t\t\tcase \"+\": // This operation is applied to the main results so far\r\n\t\t\t\t\treturn function(results,source,widget) {\r\n\t\t\t\t\t\t// This replaces all the elements of the array, but keeps the actual array so that references to it are preserved\r\n\t\t\t\t\t\tsource = self.makeTiddlerIterator(results);\r\n\t\t\t\t\t\tresults.splice(0,results.length);\r\n\t\t\t\t\t\t$tw.utils.pushTop(results,operationSubFunction(source,widget));\r\n\t\t\t\t\t};\r\n\t\t\t}\r\n\t\t})());\r\n\t});\r\n\t// Return a function that applies the operations to a source iterator of tiddler titles\r\n\treturn $tw.perf.measure(\"filter\",function filterFunction(source,widget) {\r\n\t\tif(!source) {\r\n\t\t\tsource = self.each;\r\n\t\t} else if(typeof source === \"object\") { // Array or hashmap\r\n\t\t\tsource = self.makeTiddlerIterator(source);\r\n\t\t}\r\n\t\tvar results = [];\r\n\t\t$tw.utils.each(operationFunctions,function(operationFunction) {\r\n\t\t\toperationFunction(results,source,widget);\r\n\t\t});\r\n\t\treturn results;\r\n\t});\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/filters.js",
"type": "application/javascript",
"module-type": "wikimethod"
},
"$:/core/modules/info/platform.js": {
"text": "/*\\\r\ntitle: $:/core/modules/info/platform.js\r\ntype: application/javascript\r\nmodule-type: info\r\n\r\nInitialise basic platform $:/info/ tiddlers\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nexports.getInfoTiddlerFields = function() {\r\n\tvar mapBoolean = function(value) {return value ? \"yes\" : \"no\";},\r\n\t\tinfoTiddlerFields = [];\r\n\t// Basics\r\n\tinfoTiddlerFields.push({title: \"$:/info/browser\", text: mapBoolean(!!$tw.browser)});\r\n\tinfoTiddlerFields.push({title: \"$:/info/node\", text: mapBoolean(!!$tw.node)});\r\n\treturn infoTiddlerFields;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/info/platform.js",
"type": "application/javascript",
"module-type": "info"
},
"$:/core/modules/language.js": {
"text": "/*\\\r\ntitle: $:/core/modules/language.js\r\ntype: application/javascript\r\nmodule-type: global\r\n\r\nThe $tw.Language() manages translateable strings\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nCreate an instance of the language manager. Options include:\r\nwiki: wiki from which to retrieve translation tiddlers\r\n*/\r\nfunction Language(options) {\r\n\toptions = options || \"\";\r\n\tthis.wiki = options.wiki || $tw.wiki;\r\n}\r\n\r\n/*\r\nReturn a single translateable string. The title is automatically prefixed with \"$:/language/\"\r\nOptions include:\r\nvariables: optional hashmap of variables to supply to the language wikification\r\n*/\r\nLanguage.prototype.getString = function(title,options) {\r\n\toptions = options || {};\r\n\ttitle = \"$:/language/\" + title;\r\n\treturn this.wiki.renderTiddler(\"text/plain\",title,{variables: options.variables});\r\n};\r\n\r\nexports.Language = Language;\r\n\r\n})();\r\n",
"title": "$:/core/modules/language.js",
"type": "application/javascript",
"module-type": "global"
},
"$:/core/modules/macros/changecount.js": {
"text": "/*\\\r\ntitle: $:/core/modules/macros/changecount.js\r\ntype: application/javascript\r\nmodule-type: macro\r\n\r\nMacro to return the changecount for the current tiddler\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nInformation about this macro\r\n*/\r\n\r\nexports.name = \"changecount\";\r\n\r\nexports.params = [];\r\n\r\n/*\r\nRun the macro\r\n*/\r\nexports.run = function() {\r\n\treturn this.wiki.getChangeCount(this.getVariable(\"currentTiddler\")) + \"\";\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/macros/changecount.js",
"type": "application/javascript",
"module-type": "macro"
},
"$:/core/modules/macros/contrastcolour.js": {
"text": "/*\\\r\ntitle: $:/core/modules/macros/contrastcolour.js\r\ntype: application/javascript\r\nmodule-type: macro\r\n\r\nMacro to choose which of two colours has the highest contrast with a base colour\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nInformation about this macro\r\n*/\r\n\r\nexports.name = \"contrastcolour\";\r\n\r\nexports.params = [\r\n\t{name: \"target\"},\r\n\t{name: \"fallbackTarget\"},\r\n\t{name: \"colourA\"},\r\n\t{name: \"colourB\"}\r\n];\r\n\r\n/*\r\nRun the macro\r\n*/\r\nexports.run = function(target,fallbackTarget,colourA,colourB) {\r\n\tvar rgbTarget = $tw.utils.parseCSSColor(target) || $tw.utils.parseCSSColor(fallbackTarget);\r\n\tif(!rgbTarget) {\r\n\t\treturn colourA;\r\n\t}\r\n\t// Colour brightness formula derived from http://www.w3.org/WAI/ER/WD-AERT/#color-contrast\r\n\tvar rgbColourA = $tw.utils.parseCSSColor(colourA),\r\n\t\trgbColourB = $tw.utils.parseCSSColor(colourB),\r\n\t\tbrightnessTarget = rgbTarget[0] * 0.299 + rgbTarget[1] * 0.587 + rgbTarget[2] * 0.114,\r\n\t\tbrightnessA = rgbColourA[0] * 0.299 + rgbColourA[1] * 0.587 + rgbColourA[2] * 0.114,\r\n\t\tbrightnessB = rgbColourB[0] * 0.299 + rgbColourB[1] * 0.587 + rgbColourB[2] * 0.114;\r\n\treturn Math.abs(brightnessTarget - brightnessA) > Math.abs(brightnessTarget - brightnessB) ? colourA : colourB;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/macros/contrastcolour.js",
"type": "application/javascript",
"module-type": "macro"
},
"$:/core/modules/macros/csvtiddlers.js": {
"text": "/*\\\r\ntitle: $:/core/modules/macros/csvtiddlers.js\r\ntype: application/javascript\r\nmodule-type: macro\r\n\r\nMacro to output tiddlers matching a filter to CSV\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nInformation about this macro\r\n*/\r\n\r\nexports.name = \"csvtiddlers\";\r\n\r\nexports.params = [\r\n\t{name: \"filter\"},\r\n\t{name: \"format\"},\r\n];\r\n\r\n/*\r\nRun the macro\r\n*/\r\nexports.run = function(filter,format) {\r\n\tvar self = this,\r\n\t\ttiddlers = this.wiki.filterTiddlers(filter),\r\n\t\ttiddler,\r\n\t\tfields = [],\r\n\t\tt,f;\r\n\t// Collect all the fields\r\n\tfor(t=0;t<tiddlers.length; t++) {\r\n\t\ttiddler = this.wiki.getTiddler(tiddlers[t]);\r\n\t\tfor(f in tiddler.fields) {\r\n\t\t\tif(fields.indexOf(f) === -1) {\r\n\t\t\t\tfields.push(f);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t// Sort the fields and bring the standard ones to the front\r\n\tfields.sort();\r\n\t\"title text modified modifier created creator\".split(\" \").reverse().forEach(function(value,index) {\r\n\t\tvar p = fields.indexOf(value);\r\n\t\tif(p !== -1) {\r\n\t\t\tfields.splice(p,1);\r\n\t\t\tfields.unshift(value)\r\n\t\t}\r\n\t});\r\n\t// Output the column headings\r\n\tvar output = [], row = [];\r\n\tfields.forEach(function(value) {\r\n\t\trow.push(quoteAndEscape(value))\r\n\t});\r\n\toutput.push(row.join(\",\"));\r\n\t// Output each tiddler\r\n\tfor(var t=0;t<tiddlers.length; t++) {\r\n\t\trow = [];\r\n\t\ttiddler = this.wiki.getTiddler(tiddlers[t]);\r\n\t\t\tfor(f=0; f<fields.length; f++) {\r\n\t\t\t\trow.push(quoteAndEscape(tiddler ? tiddler.getFieldString(fields[f]) || \"\" : \"\"));\r\n\t\t\t}\r\n\t\toutput.push(row.join(\",\"));\r\n\t}\r\n\treturn output.join(\"\\n\");\r\n};\r\n\r\nfunction quoteAndEscape(value) {\r\n\treturn \"\\\"\" + value.replace(/\"/mg,\"\\\"\\\"\") + \"\\\"\";\r\n}\r\n\r\n})();\r\n",
"title": "$:/core/modules/macros/csvtiddlers.js",
"type": "application/javascript",
"module-type": "macro"
},
"$:/core/modules/macros/dumpvariables.js": {
"text": "/*\\\r\ntitle: $:/core/modules/macros/dumpvariables.js\r\ntype: application/javascript\r\nmodule-type: macro\r\n\r\nMacro to dump all active variable values\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nInformation about this macro\r\n*/\r\n\r\nexports.name = \"dumpvariables\";\r\n\r\nexports.params = [\r\n];\r\n\r\n/*\r\nRun the macro\r\n*/\r\nexports.run = function() {\r\n\tvar output = [\"|!Variable |!Value |\"],\r\n\t\tvariables = [], variable;\r\n\tfor(variable in this.variables) {\r\n\t\tvariables.push(variable);\r\n\t}\r\n\tvariables.sort();\r\n\tfor(var index=0; index<variables.length; index++) {\r\n\t\tvar variable = variables[index];\r\n\t\toutput.push(\"|\" + variable + \" |<input size=50 value=<<\" + variable + \">>/> |\")\r\n\t}\r\n\treturn output.join(\"\\n\");\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/macros/dumpvariables.js",
"type": "application/javascript",
"module-type": "macro"
},
"$:/core/modules/macros/jsontiddlers.js": {
"text": "/*\\\r\ntitle: $:/core/modules/macros/jsontiddlers.js\r\ntype: application/javascript\r\nmodule-type: macro\r\n\r\nMacro to output tiddlers matching a filter to JSON\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nInformation about this macro\r\n*/\r\n\r\nexports.name = \"jsontiddlers\";\r\n\r\nexports.params = [\r\n\t{name: \"filter\"}\r\n];\r\n\r\n/*\r\nRun the macro\r\n*/\r\nexports.run = function(filter) {\r\n\tvar tiddlers = this.wiki.filterTiddlers(filter),\r\n\t\tdata = [];\r\n\tfor(var t=0;t<tiddlers.length; t++) {\r\n\t\tvar tiddler = this.wiki.getTiddler(tiddlers[t]);\r\n\t\tif(tiddler) {\r\n\t\t\tvar fields = new Object();\r\n\t\t\tfor(var field in tiddler.fields) {\r\n\t\t\t\tfields[field] = tiddler.getFieldString(field);\r\n\t\t\t}\r\n\t\t\tdata.push(fields);\r\n\t\t}\r\n\t}\r\n\treturn JSON.stringify(data,null,$tw.config.preferences.jsonSpaces);\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/macros/jsontiddlers.js",
"type": "application/javascript",
"module-type": "macro"
},
"$:/core/modules/macros/makedatauri.js": {
"text": "/*\\\r\ntitle: $:/core/modules/macros/makedatauri.js\r\ntype: application/javascript\r\nmodule-type: macro\r\n\r\nMacro to convert the content of a tiddler to a data URI\r\n\r\n<<makedatauri text:\"Text to be converted\" type:\"text/vnd.tiddlywiki\">>\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nInformation about this macro\r\n*/\r\n\r\nexports.name = \"makedatauri\";\r\n\r\nexports.params = [\r\n\t{name: \"text\"},\r\n\t{name: \"type\"}\r\n];\r\n\r\n/*\r\nRun the macro\r\n*/\r\nexports.run = function(text,type) {\r\n\ttype = type || \"text/vnd.tiddlywiki\";\r\n\tvar typeInfo = $tw.config.contentTypeInfo[type] || $tw.config.contentTypeInfo[\"text/plain\"],\r\n\t\tisBase64 = typeInfo.encoding === \"base64\",\r\n\t\tparts = [];\r\n\tparts.push(\"data:\");\r\n\tparts.push(type);\r\n\tparts.push(isBase64 ? \";base64\" : \"\");\r\n\tparts.push(\",\");\r\n\tparts.push(isBase64 ? text : encodeURIComponent(text));\r\n\treturn parts.join(\"\");\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/macros/makedatauri.js",
"type": "application/javascript",
"module-type": "macro"
},
"$:/core/modules/macros/now.js": {
"text": "/*\\\r\ntitle: $:/core/modules/macros/now.js\r\ntype: application/javascript\r\nmodule-type: macro\r\n\r\nMacro to return a formatted version of the current time\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nInformation about this macro\r\n*/\r\n\r\nexports.name = \"now\";\r\n\r\nexports.params = [\r\n\t{name: \"format\"}\r\n];\r\n\r\n/*\r\nRun the macro\r\n*/\r\nexports.run = function(format) {\r\n\treturn $tw.utils.formatDateString(new Date(),format || \"0hh:0mm, DDth MMM YYYY\");\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/macros/now.js",
"type": "application/javascript",
"module-type": "macro"
},
"$:/core/modules/macros/qualify.js": {
"text": "/*\\\r\ntitle: $:/core/modules/macros/qualify.js\r\ntype: application/javascript\r\nmodule-type: macro\r\n\r\nMacro to qualify a state tiddler title according\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nInformation about this macro\r\n*/\r\n\r\nexports.name = \"qualify\";\r\n\r\nexports.params = [\r\n\t{name: \"title\"}\r\n];\r\n\r\n/*\r\nRun the macro\r\n*/\r\nexports.run = function(title) {\r\n\treturn title + \"-\" + this.getStateQualifier();\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/macros/qualify.js",
"type": "application/javascript",
"module-type": "macro"
},
"$:/core/modules/macros/version.js": {
"text": "/*\\\r\ntitle: $:/core/modules/macros/version.js\r\ntype: application/javascript\r\nmodule-type: macro\r\n\r\nMacro to return the TiddlyWiki core version number\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nInformation about this macro\r\n*/\r\n\r\nexports.name = \"version\";\r\n\r\nexports.params = [];\r\n\r\n/*\r\nRun the macro\r\n*/\r\nexports.run = function() {\r\n\treturn $tw.version;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/macros/version.js",
"type": "application/javascript",
"module-type": "macro"
},
"$:/core/modules/parsers/audioparser.js": {
"text": "/*\\\r\ntitle: $:/core/modules/parsers/audioparser.js\r\ntype: application/javascript\r\nmodule-type: parser\r\n\r\nThe audio parser parses an audio tiddler into an embeddable HTML element\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar AudioParser = function(type,text,options) {\r\n\tvar element = {\r\n\t\t\ttype: \"element\",\r\n\t\t\ttag: \"audio\",\r\n\t\t\tattributes: {\r\n\t\t\t\tcontrols: {type: \"string\", value: \"controls\"}\r\n\t\t\t}\r\n\t\t},\r\n\t\tsrc;\r\n\tif(options._canonical_uri) {\r\n\t\telement.attributes.src = {type: \"string\", value: options._canonical_uri};\r\n\t} else if(text) {\r\n\t\telement.attributes.src = {type: \"string\", value: \"data:\" + type + \";base64,\" + text};\r\n\t}\r\n\tthis.tree = [element];\r\n};\r\n\r\nexports[\"audio/ogg\"] = AudioParser;\r\nexports[\"audio/mpeg\"] = AudioParser;\r\nexports[\"audio/mp3\"] = AudioParser;\r\nexports[\"audio/mp4\"] = AudioParser;\r\n\r\n})();\r\n\r\n",
"title": "$:/core/modules/parsers/audioparser.js",
"type": "application/javascript",
"module-type": "parser"
},
"$:/core/modules/parsers/csvparser.js": {
"text": "/*\\\r\ntitle: $:/core/modules/parsers/csvparser.js\r\ntype: application/javascript\r\nmodule-type: parser\r\n\r\nThe CSV text parser processes CSV files into a table wrapped in a scrollable widget\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar CsvParser = function(type,text,options) {\r\n\t// Table framework\r\n\tthis.tree = [{\r\n\t\t\"type\": \"scrollable\", \"children\": [{\r\n\t\t\t\"type\": \"element\", \"tag\": \"table\", \"children\": [{\r\n\t\t\t\t\"type\": \"element\", \"tag\": \"tbody\", \"children\": []\r\n\t\t\t}], \"attributes\": {\r\n\t\t\t\t\"class\": {\"type\": \"string\", \"value\": \"tc-csv-table\"}\r\n\t\t\t}\r\n\t\t}]\r\n\t}];\r\n\t// Split the text into lines\r\n\tvar lines = text.split(/\\r?\\n/mg),\r\n\t\ttag = \"th\";\r\n\tfor(var line=0; line<lines.length; line++) {\r\n\t\tvar lineText = lines[line];\r\n\t\tif(lineText) {\r\n\t\t\tvar row = {\r\n\t\t\t\t\t\"type\": \"element\", \"tag\": \"tr\", \"children\": []\r\n\t\t\t\t};\r\n\t\t\tvar columns = lineText.split(\",\");\r\n\t\t\tfor(var column=0; column<columns.length; column++) {\r\n\t\t\t\trow.children.push({\r\n\t\t\t\t\t\t\"type\": \"element\", \"tag\": tag, \"children\": [{\r\n\t\t\t\t\t\t\t\"type\": \"text\",\r\n\t\t\t\t\t\t\t\"text\": columns[column]\r\n\t\t\t\t\t\t}]\r\n\t\t\t\t\t});\r\n\t\t\t}\r\n\t\t\ttag = \"td\";\r\n\t\t\tthis.tree[0].children[0].children[0].children.push(row);\r\n\t\t}\r\n\t}\r\n};\r\n\r\nexports[\"text/csv\"] = CsvParser;\r\n\r\n})();\r\n\r\n",
"title": "$:/core/modules/parsers/csvparser.js",
"type": "application/javascript",
"module-type": "parser"
},
"$:/core/modules/parsers/htmlparser.js": {
"text": "/*\\\r\ntitle: $:/core/modules/parsers/htmlparser.js\r\ntype: application/javascript\r\nmodule-type: parser\r\n\r\nThe HTML parser displays text as raw HTML\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar HtmlParser = function(type,text,options) {\r\n\tvar src;\r\n\tif(options._canonical_uri) {\r\n\t\tsrc = options._canonical_uri;\r\n\t} else if(text) {\r\n\t\tsrc = \"data:text/html;charset=utf-8,\" + encodeURIComponent(text);\r\n\t}\r\n\tthis.tree = [{\r\n\t\ttype: \"element\",\r\n\t\ttag: \"iframe\",\r\n\t\tattributes: {\r\n\t\t\tsrc: {type: \"string\", value: src}\r\n\t\t}\r\n\t}];\r\n};\r\n\r\nexports[\"text/html\"] = HtmlParser;\r\n\r\n})();\r\n\r\n",
"title": "$:/core/modules/parsers/htmlparser.js",
"type": "application/javascript",
"module-type": "parser"
},
"$:/core/modules/parsers/imageparser.js": {
"text": "/*\\\r\ntitle: $:/core/modules/parsers/imageparser.js\r\ntype: application/javascript\r\nmodule-type: parser\r\n\r\nThe image parser parses an image into an embeddable HTML element\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar ImageParser = function(type,text,options) {\r\n\tvar element = {\r\n\t\t\ttype: \"element\",\r\n\t\t\ttag: \"img\",\r\n\t\t\tattributes: {}\r\n\t\t},\r\n\t\tsrc;\r\n\tif(options._canonical_uri) {\r\n\t\telement.attributes.src = {type: \"string\", value: options._canonical_uri};\r\n\t\tif(type === \"application/pdf\" || type === \".pdf\") {\r\n\t\t\telement.tag = \"embed\";\r\n\t\t}\r\n\t} else if(text) {\r\n\t\tif(type === \"application/pdf\" || type === \".pdf\") {\r\n\t\t\telement.attributes.src = {type: \"string\", value: \"data:application/pdf;base64,\" + text};\r\n\t\t\telement.tag = \"embed\";\r\n\t\t} else if(type === \"image/svg+xml\" || type === \".svg\") {\r\n\t\t\telement.attributes.src = {type: \"string\", value: \"data:image/svg+xml,\" + encodeURIComponent(text)};\r\n\t\t} else {\r\n\t\t\telement.attributes.src = {type: \"string\", value: \"data:\" + type + \";base64,\" + text};\r\n\t\t}\r\n\t}\r\n\tthis.tree = [element];\r\n};\r\n\r\nexports[\"image/svg+xml\"] = ImageParser;\r\nexports[\"image/jpg\"] = ImageParser;\r\nexports[\"image/jpeg\"] = ImageParser;\r\nexports[\"image/png\"] = ImageParser;\r\nexports[\"image/gif\"] = ImageParser;\r\nexports[\"application/pdf\"] = ImageParser;\r\nexports[\"image/x-icon\"] = ImageParser;\r\n\r\n})();\r\n\r\n",
"title": "$:/core/modules/parsers/imageparser.js",
"type": "application/javascript",
"module-type": "parser"
},
"$:/core/modules/utils/parseutils.js": {
"text": "/*\\\r\ntitle: $:/core/modules/utils/parseutils.js\r\ntype: application/javascript\r\nmodule-type: utils\r\n\r\nUtility functions concerned with parsing text into tokens.\r\n\r\nMost functions have the following pattern:\r\n\r\n* The parameters are:\r\n** `source`: the source string being parsed\r\n** `pos`: the current parse position within the string\r\n** Any further parameters are used to identify the token that is being parsed\r\n* The return value is:\r\n** null if the token was not found at the specified position\r\n** an object representing the token with the following standard fields:\r\n*** `type`: string indicating the type of the token\r\n*** `start`: start position of the token in the source string\r\n*** `end`: end position of the token in the source string\r\n*** Any further fields required to describe the token\r\n\r\nThe exception is `skipWhiteSpace`, which just returns the position after the whitespace.\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nLook for a whitespace token. Returns null if not found, otherwise returns {type: \"whitespace\", start:, end:,}\r\n*/\r\nexports.parseWhiteSpace = function(source,pos) {\r\n\tvar node = {\r\n\t\ttype: \"whitespace\",\r\n\t\tstart: pos\r\n\t};\r\n\tvar re = /(\\s)+/g;\r\n\tre.lastIndex = pos;\r\n\tvar match = re.exec(source);\r\n\tif(match && match.index === pos) {\r\n\t\tnode.end = pos + match[0].length;\r\n\t\treturn node;\r\n\t}\r\n\treturn null;\r\n};\r\n\r\n/*\r\nConvenience wrapper for parseWhiteSpace. Returns the position after the whitespace\r\n*/\r\nexports.skipWhiteSpace = function(source,pos) {\r\n\tvar whitespace = $tw.utils.parseWhiteSpace(source,pos);\r\n\tif(whitespace) {\r\n\t\treturn whitespace.end;\r\n\t}\r\n\treturn pos;\r\n};\r\n\r\n/*\r\nLook for a given string token. Returns null if not found, otherwise returns {type: \"token\", value:, start:, end:,}\r\n*/\r\nexports.parseTokenString = function(source,pos,token) {\r\n\tvar match = source.indexOf(token,pos) === pos;\r\n\tif(match) {\r\n\t\treturn {\r\n\t\t\ttype: \"token\",\r\n\t\t\tvalue: token,\r\n\t\t\tstart: pos,\r\n\t\t\tend: pos + token.length\r\n\t\t};\r\n\t}\r\n\treturn null;\r\n};\r\n\r\n/*\r\nLook for a token matching a regex. Returns null if not found, otherwise returns {type: \"regexp\", match:, start:, end:,}\r\n*/\r\nexports.parseTokenRegExp = function(source,pos,reToken) {\r\n\tvar node = {\r\n\t\ttype: \"regexp\",\r\n\t\tstart: pos\r\n\t};\r\n\treToken.lastIndex = pos;\r\n\tnode.match = reToken.exec(source);\r\n\tif(node.match && node.match.index === pos) {\r\n\t\tnode.end = pos + node.match[0].length;\r\n\t\treturn node;\r\n\t} else {\r\n\t\treturn null;\r\n\t}\r\n};\r\n\r\n/*\r\nLook for a string literal. Returns null if not found, otherwise returns {type: \"string\", value:, start:, end:,}\r\n*/\r\nexports.parseStringLiteral = function(source,pos) {\r\n\tvar node = {\r\n\t\ttype: \"string\",\r\n\t\tstart: pos\r\n\t};\r\n\tvar reString = /(?:\"\"\"([\\s\\S]*?)\"\"\"|\"([^\"]*)\")|(?:'([^']*)')/g;\r\n\treString.lastIndex = pos;\r\n\tvar match = reString.exec(source);\r\n\tif(match && match.index === pos) {\r\n\t\tnode.value = match[1] !== undefined ? match[1] :(\r\n\t\t\tmatch[2] !== undefined ? match[2] : match[3] \r\n\t\t\t\t\t);\r\n\t\tnode.end = pos + match[0].length;\r\n\t\treturn node;\r\n\t} else {\r\n\t\treturn null;\r\n\t}\r\n};\r\n\r\n/*\r\nLook for a macro invocation parameter. Returns null if not found, or {type: \"macro-parameter\", name:, value:, start:, end:}\r\n*/\r\nexports.parseMacroParameter = function(source,pos) {\r\n\tvar node = {\r\n\t\ttype: \"macro-parameter\",\r\n\t\tstart: pos\r\n\t};\r\n\t// Define our regexp\r\n\tvar reMacroParameter = /(?:([A-Za-z0-9\\-_]+)\\s*:)?(?:\\s*(?:\"\"\"([\\s\\S]*?)\"\"\"|\"([^\"]*)\"|'([^']*)'|\\[\\[([^\\]]*)\\]\\]|([^\\s>\"'=]+)))/g;\r\n\t// Skip whitespace\r\n\tpos = $tw.utils.skipWhiteSpace(source,pos);\r\n\t// Look for the parameter\r\n\tvar token = $tw.utils.parseTokenRegExp(source,pos,reMacroParameter);\r\n\tif(!token) {\r\n\t\treturn null;\r\n\t}\r\n\tpos = token.end;\r\n\t// Get the parameter details\r\n\tnode.value = token.match[2] !== undefined ? token.match[2] : (\r\n\t\t\t\t\ttoken.match[3] !== undefined ? token.match[3] : (\r\n\t\t\t\t\t\ttoken.match[4] !== undefined ? token.match[4] : (\r\n\t\t\t\t\t\t\ttoken.match[5] !== undefined ? token.match[5] : (\r\n\t\t\t\t\t\t\t\ttoken.match[6] !== undefined ? token.match[6] : (\r\n\t\t\t\t\t\t\t\t\t\"\"\r\n\t\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t)\r\n\t\t\t\t\t)\r\n\t\t\t\t);\r\n\tif(token.match[1]) {\r\n\t\tnode.name = token.match[1];\r\n\t}\r\n\t// Update the end position\r\n\tnode.end = pos;\r\n\treturn node;\r\n};\r\n\r\n/*\r\nLook for a macro invocation. Returns null if not found, or {type: \"macrocall\", name:, parameters:, start:, end:}\r\n*/\r\nexports.parseMacroInvocation = function(source,pos) {\r\n\tvar node = {\r\n\t\ttype: \"macrocall\",\r\n\t\tstart: pos,\r\n\t\tparams: []\r\n\t};\r\n\t// Define our regexps\r\n\tvar reMacroName = /([^\\s>\"'=]+)/g;\r\n\t// Skip whitespace\r\n\tpos = $tw.utils.skipWhiteSpace(source,pos);\r\n\t// Look for a double less than sign\r\n\tvar token = $tw.utils.parseTokenString(source,pos,\"<<\");\r\n\tif(!token) {\r\n\t\treturn null;\r\n\t}\r\n\tpos = token.end;\r\n\t// Get the macro name\r\n\tvar name = $tw.utils.parseTokenRegExp(source,pos,reMacroName);\r\n\tif(!name) {\r\n\t\treturn null;\r\n\t}\r\n\tnode.name = name.match[1];\r\n\tpos = name.end;\r\n\t// Process parameters\r\n\tvar parameter = $tw.utils.parseMacroParameter(source,pos);\r\n\twhile(parameter) {\r\n\t\tnode.params.push(parameter);\r\n\t\tpos = parameter.end;\r\n\t\t// Get the next parameter\r\n\t\tparameter = $tw.utils.parseMacroParameter(source,pos);\r\n\t}\r\n\t// Skip whitespace\r\n\tpos = $tw.utils.skipWhiteSpace(source,pos);\r\n\t// Look for a double greater than sign\r\n\ttoken = $tw.utils.parseTokenString(source,pos,\">>\");\r\n\tif(!token) {\r\n\t\treturn null;\r\n\t}\r\n\tpos = token.end;\r\n\t// Update the end position\r\n\tnode.end = pos;\r\n\treturn node;\r\n};\r\n\r\n/*\r\nLook for an HTML attribute definition. Returns null if not found, otherwise returns {type: \"attribute\", name:, valueType: \"string|indirect|macro\", value:, start:, end:,}\r\n*/\r\nexports.parseAttribute = function(source,pos) {\r\n\tvar node = {\r\n\t\tstart: pos\r\n\t};\r\n\t// Define our regexps\r\n\tvar reAttributeName = /([^\\/\\s>\"'=]+)/g,\r\n\t\treUnquotedAttribute = /([^\\/\\s<>\"'=]+)/g,\r\n\t\treIndirectValue = /\\{\\{([^\\}]+)\\}\\}/g;\r\n\t// Skip whitespace\r\n\tpos = $tw.utils.skipWhiteSpace(source,pos);\r\n\t// Get the attribute name\r\n\tvar name = $tw.utils.parseTokenRegExp(source,pos,reAttributeName);\r\n\tif(!name) {\r\n\t\treturn null;\r\n\t}\r\n\tnode.name = name.match[1];\r\n\tpos = name.end;\r\n\t// Skip whitespace\r\n\tpos = $tw.utils.skipWhiteSpace(source,pos);\r\n\t// Look for an equals sign\r\n\tvar token = $tw.utils.parseTokenString(source,pos,\"=\");\r\n\tif(token) {\r\n\t\tpos = token.end;\r\n\t\t// Skip whitespace\r\n\t\tpos = $tw.utils.skipWhiteSpace(source,pos);\r\n\t\t// Look for a string literal\r\n\t\tvar stringLiteral = $tw.utils.parseStringLiteral(source,pos);\r\n\t\tif(stringLiteral) {\r\n\t\t\tpos = stringLiteral.end;\r\n\t\t\tnode.type = \"string\";\r\n\t\t\tnode.value = stringLiteral.value;\r\n\t\t} else {\r\n\t\t\t// Look for an indirect value\r\n\t\t\tvar indirectValue = $tw.utils.parseTokenRegExp(source,pos,reIndirectValue);\r\n\t\t\tif(indirectValue) {\r\n\t\t\t\tpos = indirectValue.end;\r\n\t\t\t\tnode.type = \"indirect\";\r\n\t\t\t\tnode.textReference = indirectValue.match[1];\r\n\t\t\t} else {\r\n\t\t\t\t// Look for a unquoted value\r\n\t\t\t\tvar unquotedValue = $tw.utils.parseTokenRegExp(source,pos,reUnquotedAttribute);\r\n\t\t\t\tif(unquotedValue) {\r\n\t\t\t\t\tpos = unquotedValue.end;\r\n\t\t\t\t\tnode.type = \"string\";\r\n\t\t\t\t\tnode.value = unquotedValue.match[1];\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// Look for a macro invocation value\r\n\t\t\t\t\tvar macroInvocation = $tw.utils.parseMacroInvocation(source,pos);\r\n\t\t\t\t\tif(macroInvocation) {\r\n\t\t\t\t\t\tpos = macroInvocation.end;\r\n\t\t\t\t\t\tnode.type = \"macro\";\r\n\t\t\t\t\t\tnode.value = macroInvocation;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tnode.type = \"string\";\r\n\t\t\t\t\t\tnode.value = \"true\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t} else {\r\n\t\tnode.type = \"string\";\r\n\t\tnode.value = \"true\";\r\n\t}\r\n\t// Update the end position\r\n\tnode.end = pos;\r\n\treturn node;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/utils/parseutils.js",
"type": "application/javascript",
"module-type": "utils"
},
"$:/core/modules/parsers/textparser.js": {
"text": "/*\\\r\ntitle: $:/core/modules/parsers/textparser.js\r\ntype: application/javascript\r\nmodule-type: parser\r\n\r\nThe plain text parser processes blocks of source text into a degenerate parse tree consisting of a single text node\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar TextParser = function(type,text,options) {\r\n\tthis.tree = [{\r\n\t\ttype: \"codeblock\",\r\n\t\tattributes: {\r\n\t\t\tcode: {type: \"string\", value: text},\r\n\t\t\tlanguage: {type: \"string\", value: type}\r\n\t\t}\r\n\t}];\r\n};\r\n\r\nexports[\"text/plain\"] = TextParser;\r\nexports[\"text/x-tiddlywiki\"] = TextParser;\r\nexports[\"application/javascript\"] = TextParser;\r\nexports[\"application/json\"] = TextParser;\r\nexports[\"text/css\"] = TextParser;\r\nexports[\"application/x-tiddler-dictionary\"] = TextParser;\r\n\r\n})();\r\n\r\n",
"title": "$:/core/modules/parsers/textparser.js",
"type": "application/javascript",
"module-type": "parser"
},
"$:/core/modules/parsers/wikiparser/rules/codeblock.js": {
"text": "/*\\\r\ntitle: $:/core/modules/parsers/wikiparser/rules/codeblock.js\r\ntype: application/javascript\r\nmodule-type: wikirule\r\n\r\nWiki text rule for code blocks. For example:\r\n\r\n```\r\n\t```\r\n\tThis text will not be //wikified//\r\n\t```\r\n```\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nexports.name = \"codeblock\";\r\nexports.types = {block: true};\r\n\r\nexports.init = function(parser) {\r\n\tthis.parser = parser;\r\n\t// Regexp to match and get language if defined\r\n\tthis.matchRegExp = /```([\\w-]*)\\r?\\n/mg;\r\n};\r\n\r\nexports.parse = function() {\r\n\tvar reEnd = /(\\r?\\n```$)/mg;\r\n\t// Move past the match\r\n\tthis.parser.pos = this.matchRegExp.lastIndex;\r\n\r\n\t// Look for the end of the block\r\n\treEnd.lastIndex = this.parser.pos;\r\n\tvar match = reEnd.exec(this.parser.source),\r\n\t\ttext;\r\n\t// Process the block\r\n\tif(match) {\r\n\t\ttext = this.parser.source.substring(this.parser.pos,match.index);\r\n\t\tthis.parser.pos = match.index + match[0].length;\r\n\t} else {\r\n\t\ttext = this.parser.source.substr(this.parser.pos);\r\n\t\tthis.parser.pos = this.parser.sourceLength;\r\n\t}\r\n\t// Return the $codeblock widget\r\n\treturn [{\r\n\t\t\ttype: \"codeblock\",\r\n\t\t\tattributes: {\r\n\t\t\t\t\tcode: {type: \"string\", value: text},\r\n\t\t\t\t\tlanguage: {type: \"string\", value: this.match[1]}\r\n\t\t\t}\r\n\t}];\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/parsers/wikiparser/rules/codeblock.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/codeinline.js": {
"text": "/*\\\r\ntitle: $:/core/modules/parsers/wikiparser/rules/codeinline.js\r\ntype: application/javascript\r\nmodule-type: wikirule\r\n\r\nWiki text inline rule for code runs. For example:\r\n\r\n```\r\n\tThis is a `code run`.\r\n\tThis is another ``code run``\r\n```\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nexports.name = \"codeinline\";\r\nexports.types = {inline: true};\r\n\r\nexports.init = function(parser) {\r\n\tthis.parser = parser;\r\n\t// Regexp to match\r\n\tthis.matchRegExp = /(``?)/mg;\r\n};\r\n\r\nexports.parse = function() {\r\n\t// Move past the match\r\n\tthis.parser.pos = this.matchRegExp.lastIndex;\r\n\tvar reEnd = new RegExp(this.match[1], \"mg\");\r\n\t// Look for the end marker\r\n\treEnd.lastIndex = this.parser.pos;\r\n\tvar match = reEnd.exec(this.parser.source),\r\n\t\ttext;\r\n\t// Process the text\r\n\tif(match) {\r\n\t\ttext = this.parser.source.substring(this.parser.pos,match.index);\r\n\t\tthis.parser.pos = match.index + match[0].length;\r\n\t} else {\r\n\t\ttext = this.parser.source.substr(this.parser.pos);\r\n\t\tthis.parser.pos = this.parser.sourceLength;\r\n\t}\r\n\treturn [{\r\n\t\ttype: \"element\",\r\n\t\ttag: \"code\",\r\n\t\tchildren: [{\r\n\t\t\ttype: \"text\",\r\n\t\t\ttext: text\r\n\t\t}]\r\n\t}];\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/parsers/wikiparser/rules/codeinline.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/commentblock.js": {
"text": "/*\\\r\ntitle: $:/core/modules/parsers/wikiparser/rules/commentblock.js\r\ntype: application/javascript\r\nmodule-type: wikirule\r\n\r\nWiki text block rule for HTML comments. For example:\r\n\r\n```\r\n<!-- This is a comment -->\r\n```\r\n\r\nNote that the syntax for comments is simplified to an opening \"<!--\" sequence and a closing \"-->\" sequence -- HTML itself implements a more complex format (see http://ostermiller.org/findhtmlcomment.html)\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nexports.name = \"commentblock\";\r\nexports.types = {block: true};\r\n\r\nexports.init = function(parser) {\r\n\tthis.parser = parser;\r\n\tthis.matchRegExp = /<!--/mg;\r\n\tthis.endMatchRegExp = /-->/mg;\r\n};\r\n\r\nexports.findNextMatch = function(startPos) {\r\n\tthis.matchRegExp.lastIndex = startPos;\r\n\tthis.match = this.matchRegExp.exec(this.parser.source);\r\n\tif(this.match) {\r\n\t\tthis.endMatchRegExp.lastIndex = startPos + this.match[0].length;\r\n\t\tthis.endMatch = this.endMatchRegExp.exec(this.parser.source);\r\n\t\tif(this.endMatch) {\r\n\t\t\treturn this.match.index;\r\n\t\t}\r\n\t}\r\n\treturn undefined;\r\n};\r\n\r\nexports.parse = function() {\r\n\t// Move past the match\r\n\tthis.parser.pos = this.endMatchRegExp.lastIndex;\r\n\t// Don't return any elements\r\n\treturn [];\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/parsers/wikiparser/rules/commentblock.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/commentinline.js": {
"text": "/*\\\r\ntitle: $:/core/modules/parsers/wikiparser/rules/commentinline.js\r\ntype: application/javascript\r\nmodule-type: wikirule\r\n\r\nWiki text inline rule for HTML comments. For example:\r\n\r\n```\r\n<!-- This is a comment -->\r\n```\r\n\r\nNote that the syntax for comments is simplified to an opening \"<!--\" sequence and a closing \"-->\" sequence -- HTML itself implements a more complex format (see http://ostermiller.org/findhtmlcomment.html)\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nexports.name = \"commentinline\";\r\nexports.types = {inline: true};\r\n\r\nexports.init = function(parser) {\r\n\tthis.parser = parser;\r\n\tthis.matchRegExp = /<!--/mg;\r\n\tthis.endMatchRegExp = /-->/mg;\r\n};\r\n\r\nexports.findNextMatch = function(startPos) {\r\n\tthis.matchRegExp.lastIndex = startPos;\r\n\tthis.match = this.matchRegExp.exec(this.parser.source);\r\n\tif(this.match) {\r\n\t\tthis.endMatchRegExp.lastIndex = startPos + this.match[0].length;\r\n\t\tthis.endMatch = this.endMatchRegExp.exec(this.parser.source);\r\n\t\tif(this.endMatch) {\r\n\t\t\treturn this.match.index;\r\n\t\t}\r\n\t}\r\n\treturn undefined;\r\n};\r\n\r\nexports.parse = function() {\r\n\t// Move past the match\r\n\tthis.parser.pos = this.endMatchRegExp.lastIndex;\r\n\t// Don't return any elements\r\n\treturn [];\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/parsers/wikiparser/rules/commentinline.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/dash.js": {
"text": "/*\\\r\ntitle: $:/core/modules/parsers/wikiparser/rules/dash.js\r\ntype: application/javascript\r\nmodule-type: wikirule\r\n\r\nWiki text inline rule for dashes. For example:\r\n\r\n```\r\nThis is an en-dash: --\r\n\r\nThis is an em-dash: ---\r\n```\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nexports.name = \"dash\";\r\nexports.types = {inline: true};\r\n\r\nexports.init = function(parser) {\r\n\tthis.parser = parser;\r\n\t// Regexp to match\r\n\tthis.matchRegExp = /-{2,3}(?!-)/mg;\r\n};\r\n\r\nexports.parse = function() {\r\n\t// Move past the match\r\n\tthis.parser.pos = this.matchRegExp.lastIndex;\r\n\tvar dash = this.match[0].length === 2 ? \"–\" : \"—\";\r\n\treturn [{\r\n\t\ttype: \"entity\",\r\n\t\tentity: dash\r\n\t}];\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/parsers/wikiparser/rules/dash.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/emphasis/bold.js": {
"text": "/*\\\r\ntitle: $:/core/modules/parsers/wikiparser/rules/emphasis/bold.js\r\ntype: application/javascript\r\nmodule-type: wikirule\r\n\r\nWiki text inline rule for emphasis - bold. For example:\r\n\r\n```\r\n\tThis is ''bold'' text\r\n```\r\n\r\nThis wikiparser can be modified using the rules eg:\r\n\r\n```\r\n\\rules except bold \r\n\\rules only bold \r\n```\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nexports.name = \"bold\";\r\nexports.types = {inline: true};\r\n\r\nexports.init = function(parser) {\r\n\tthis.parser = parser;\r\n\t// Regexp to match\r\n\tthis.matchRegExp = /''/mg;\r\n};\r\n\r\nexports.parse = function() {\r\n\t// Move past the match\r\n\tthis.parser.pos = this.matchRegExp.lastIndex;\r\n\r\n\t// Parse the run including the terminator\r\n\tvar tree = this.parser.parseInlineRun(/''/mg,{eatTerminator: true});\r\n\r\n\t// Return the classed span\r\n\treturn [{\r\n\t\ttype: \"element\",\r\n\t\ttag: \"strong\",\r\n\t\tchildren: tree\r\n\t}];\r\n};\r\n\r\n})();",
"title": "$:/core/modules/parsers/wikiparser/rules/emphasis/bold.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/emphasis/italic.js": {
"text": "/*\\\r\ntitle: $:/core/modules/parsers/wikiparser/rules/emphasis/italic.js\r\ntype: application/javascript\r\nmodule-type: wikirule\r\n\r\nWiki text inline rule for emphasis - italic. For example:\r\n\r\n```\r\n\tThis is //italic// text\r\n```\r\n\r\nThis wikiparser can be modified using the rules eg:\r\n\r\n```\r\n\\rules except italic\r\n\\rules only italic\r\n```\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nexports.name = \"italic\";\r\nexports.types = {inline: true};\r\n\r\nexports.init = function(parser) {\r\n\tthis.parser = parser;\r\n\t// Regexp to match\r\n\tthis.matchRegExp = /\\/\\//mg;\r\n};\r\n\r\nexports.parse = function() {\r\n\t// Move past the match\r\n\tthis.parser.pos = this.matchRegExp.lastIndex;\r\n\r\n\t// Parse the run including the terminator\r\n\tvar tree = this.parser.parseInlineRun(/\\/\\//mg,{eatTerminator: true});\r\n\r\n\t// Return the classed span\r\n\treturn [{\r\n\t\ttype: \"element\",\r\n\t\ttag: \"em\",\r\n\t\tchildren: tree\r\n\t}];\r\n};\r\n\r\n})();",
"title": "$:/core/modules/parsers/wikiparser/rules/emphasis/italic.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/emphasis/strikethrough.js": {
"text": "/*\\\r\ntitle: $:/core/modules/parsers/wikiparser/rules/emphasis/strikethrough.js\r\ntype: application/javascript\r\nmodule-type: wikirule\r\n\r\nWiki text inline rule for emphasis - strikethrough. For example:\r\n\r\n```\r\n\tThis is ~~strikethrough~~ text\r\n```\r\n\r\nThis wikiparser can be modified using the rules eg:\r\n\r\n```\r\n\\rules except strikethrough \r\n\\rules only strikethrough \r\n```\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nexports.name = \"strikethrough\";\r\nexports.types = {inline: true};\r\n\r\nexports.init = function(parser) {\r\n\tthis.parser = parser;\r\n\t// Regexp to match\r\n\tthis.matchRegExp = /~~/mg;\r\n};\r\n\r\nexports.parse = function() {\r\n\t// Move past the match\r\n\tthis.parser.pos = this.matchRegExp.lastIndex;\r\n\r\n\t// Parse the run including the terminator\r\n\tvar tree = this.parser.parseInlineRun(/~~/mg,{eatTerminator: true});\r\n\r\n\t// Return the classed span\r\n\treturn [{\r\n\t\ttype: \"element\",\r\n\t\ttag: \"strike\",\r\n\t\tchildren: tree\r\n\t}];\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/parsers/wikiparser/rules/emphasis/strikethrough.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/emphasis/subscript.js": {
"text": "/*\\\r\ntitle: $:/core/modules/parsers/wikiparser/rules/emphasis/subscript.js\r\ntype: application/javascript\r\nmodule-type: wikirule\r\n\r\nWiki text inline rule for emphasis - subscript. For example:\r\n\r\n```\r\n\tThis is ,,subscript,, text\r\n```\r\n\r\nThis wikiparser can be modified using the rules eg:\r\n\r\n```\r\n\\rules except subscript \r\n\\rules only subscript \r\n```\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nexports.name = \"subscript\";\r\nexports.types = {inline: true};\r\n\r\nexports.init = function(parser) {\r\n\tthis.parser = parser;\r\n\t// Regexp to match\r\n\tthis.matchRegExp = /,,/mg;\r\n};\r\n\r\nexports.parse = function() {\r\n\t// Move past the match\r\n\tthis.parser.pos = this.matchRegExp.lastIndex;\r\n\r\n\t// Parse the run including the terminator\r\n\tvar tree = this.parser.parseInlineRun(/,,/mg,{eatTerminator: true});\r\n\r\n\t// Return the classed span\r\n\treturn [{\r\n\t\ttype: \"element\",\r\n\t\ttag: \"sub\",\r\n\t\tchildren: tree\r\n\t}];\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/parsers/wikiparser/rules/emphasis/subscript.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/emphasis/superscript.js": {
"text": "/*\\\r\ntitle: $:/core/modules/parsers/wikiparser/rules/emphasis/superscript.js\r\ntype: application/javascript\r\nmodule-type: wikirule\r\n\r\nWiki text inline rule for emphasis - superscript. For example:\r\n\r\n```\r\n\tThis is ^^superscript^^ text\r\n```\r\n\r\nThis wikiparser can be modified using the rules eg:\r\n\r\n```\r\n\\rules except superscript \r\n\\rules only superscript \r\n```\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nexports.name = \"superscript\";\r\nexports.types = {inline: true};\r\n\r\nexports.init = function(parser) {\r\n\tthis.parser = parser;\r\n\t// Regexp to match\r\n\tthis.matchRegExp = /\\^\\^/mg;\r\n};\r\n\r\nexports.parse = function() {\r\n\t// Move past the match\r\n\tthis.parser.pos = this.matchRegExp.lastIndex;\r\n\r\n\t// Parse the run including the terminator\r\n\tvar tree = this.parser.parseInlineRun(/\\^\\^/mg,{eatTerminator: true});\r\n\r\n\t// Return the classed span\r\n\treturn [{\r\n\t\ttype: \"element\",\r\n\t\ttag: \"sup\",\r\n\t\tchildren: tree\r\n\t}];\r\n};\r\n\r\n})();",
"title": "$:/core/modules/parsers/wikiparser/rules/emphasis/superscript.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/emphasis/underscore.js": {
"text": "/*\\\r\ntitle: $:/core/modules/parsers/wikiparser/rules/emphasis/underscore.js\r\ntype: application/javascript\r\nmodule-type: wikirule\r\n\r\nWiki text inline rule for emphasis - underscore. For example:\r\n\r\n```\r\n\tThis is __underscore__ text\r\n```\r\n\r\nThis wikiparser can be modified using the rules eg:\r\n\r\n```\r\n\\rules except underscore \r\n\\rules only underscore\r\n```\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nexports.name = \"underscore\";\r\nexports.types = {inline: true};\r\n\r\nexports.init = function(parser) {\r\n\tthis.parser = parser;\r\n\t// Regexp to match\r\n\tthis.matchRegExp = /__/mg;\r\n};\r\n\r\nexports.parse = function() {\r\n\t// Move past the match\r\n\tthis.parser.pos = this.matchRegExp.lastIndex;\r\n\r\n\t// Parse the run including the terminator\r\n\tvar tree = this.parser.parseInlineRun(/__/mg,{eatTerminator: true});\r\n\r\n\t// Return the classed span\r\n\treturn [{\r\n\t\ttype: \"element\",\r\n\t\ttag: \"u\",\r\n\t\tchildren: tree\r\n\t}];\r\n};\r\n\r\n})();",
"title": "$:/core/modules/parsers/wikiparser/rules/emphasis/underscore.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/entity.js": {
"text": "/*\\\r\ntitle: $:/core/modules/parsers/wikiparser/rules/entity.js\r\ntype: application/javascript\r\nmodule-type: wikirule\r\n\r\nWiki text inline rule for HTML entities. For example:\r\n\r\n```\r\n\tThis is a copyright symbol: ©\r\n```\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nexports.name = \"entity\";\r\nexports.types = {inline: true};\r\n\r\nexports.init = function(parser) {\r\n\tthis.parser = parser;\r\n\t// Regexp to match\r\n\tthis.matchRegExp = /(&#?[a-zA-Z0-9]{2,8};)/mg;\r\n};\r\n\r\n/*\r\nParse the most recent match\r\n*/\r\nexports.parse = function() {\r\n\t// Get all the details of the match\r\n\tvar entityString = this.match[1];\r\n\t// Move past the macro call\r\n\tthis.parser.pos = this.matchRegExp.lastIndex;\r\n\t// Return the entity\r\n\treturn [{type: \"entity\", entity: this.match[0]}];\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/parsers/wikiparser/rules/entity.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/extlink.js": {
"text": "/*\\\r\ntitle: $:/core/modules/parsers/wikiparser/rules/extlink.js\r\ntype: application/javascript\r\nmodule-type: wikirule\r\n\r\nWiki text inline rule for external links. For example:\r\n\r\n```\r\nAn external link: http://www.tiddlywiki.com/\r\n\r\nA suppressed external link: ~http://www.tiddlyspace.com/\r\n```\r\n\r\nExternal links can be suppressed by preceding them with `~`.\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nexports.name = \"extlink\";\r\nexports.types = {inline: true};\r\n\r\nexports.init = function(parser) {\r\n\tthis.parser = parser;\r\n\t// Regexp to match\r\n\tthis.matchRegExp = /~?(?:file|http|https|mailto|ftp|irc|news|data|skype):[^\\s<>{}\\[\\]`|'\"\\\\^~]+(?:\\/|\\b)/mg;\r\n};\r\n\r\nexports.parse = function() {\r\n\t// Move past the match\r\n\tthis.parser.pos = this.matchRegExp.lastIndex;\r\n\t// Create the link unless it is suppressed\r\n\tif(this.match[0].substr(0,1) === \"~\") {\r\n\t\treturn [{type: \"text\", text: this.match[0].substr(1)}];\r\n\t} else {\r\n\t\treturn [{\r\n\t\t\ttype: \"element\",\r\n\t\t\ttag: \"a\",\r\n\t\t\tattributes: {\r\n\t\t\t\thref: {type: \"string\", value: this.match[0]},\r\n\t\t\t\t\"class\": {type: \"string\", value: \"tc-tiddlylink-external\"},\r\n\t\t\t\ttarget: {type: \"string\", value: \"_blank\"}\r\n\t\t\t},\r\n\t\t\tchildren: [{\r\n\t\t\t\ttype: \"text\", text: this.match[0]\r\n\t\t\t}]\r\n\t\t}];\r\n\t}\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/parsers/wikiparser/rules/extlink.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/filteredtranscludeblock.js": {
"text": "/*\\\r\ntitle: $:/core/modules/parsers/wikiparser/rules/filteredtranscludeblock.js\r\ntype: application/javascript\r\nmodule-type: wikirule\r\n\r\nWiki text rule for block-level filtered transclusion. For example:\r\n\r\n```\r\n{{{ [tag[docs]] }}}\r\n{{{ [tag[docs]] |tooltip}}}\r\n{{{ [tag[docs]] ||TemplateTitle}}}\r\n{{{ [tag[docs]] |tooltip||TemplateTitle}}}\r\n{{{ [tag[docs]] }}width:40;height:50;}.class.class\r\n```\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nexports.name = \"filteredtranscludeblock\";\r\nexports.types = {block: true};\r\n\r\nexports.init = function(parser) {\r\n\tthis.parser = parser;\r\n\t// Regexp to match\r\n\tthis.matchRegExp = /\\{\\{\\{([^\\|]+?)(?:\\|([^\\|\\{\\}]+))?(?:\\|\\|([^\\|\\{\\}]+))?\\}\\}([^\\}]*)\\}(?:\\.(\\S+))?(?:\\r?\\n|$)/mg;\r\n};\r\n\r\nexports.parse = function() {\r\n\t// Move past the match\r\n\tthis.parser.pos = this.matchRegExp.lastIndex;\r\n\t// Get the match details\r\n\tvar filter = this.match[1],\r\n\t\ttooltip = this.match[2],\r\n\t\ttemplate = $tw.utils.trim(this.match[3]),\r\n\t\tstyle = this.match[4],\r\n\t\tclasses = this.match[5];\r\n\t// Return the list widget\r\n\tvar node = {\r\n\t\ttype: \"list\",\r\n\t\tattributes: {\r\n\t\t\tfilter: {type: \"string\", value: filter}\r\n\t\t},\r\n\t\tisBlock: true\r\n\t};\r\n\tif(tooltip) {\r\n\t\tnode.attributes.tooltip = {type: \"string\", value: tooltip};\r\n\t}\r\n\tif(template) {\r\n\t\tnode.attributes.template = {type: \"string\", value: template};\r\n\t}\r\n\tif(style) {\r\n\t\tnode.attributes.style = {type: \"string\", value: style};\r\n\t}\r\n\tif(classes) {\r\n\t\tnode.attributes.itemClass = {type: \"string\", value: classes.split(\".\").join(\" \")};\r\n\t}\r\n\treturn [node];\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/parsers/wikiparser/rules/filteredtranscludeblock.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/filteredtranscludeinline.js": {
"text": "/*\\\r\ntitle: $:/core/modules/parsers/wikiparser/rules/filteredtranscludeinline.js\r\ntype: application/javascript\r\nmodule-type: wikirule\r\n\r\nWiki text rule for inline filtered transclusion. For example:\r\n\r\n```\r\n{{{ [tag[docs]] }}}\r\n{{{ [tag[docs]] |tooltip}}}\r\n{{{ [tag[docs]] ||TemplateTitle}}}\r\n{{{ [tag[docs]] |tooltip||TemplateTitle}}}\r\n{{{ [tag[docs]] }}width:40;height:50;}.class.class\r\n```\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nexports.name = \"filteredtranscludeinline\";\r\nexports.types = {inline: true};\r\n\r\nexports.init = function(parser) {\r\n\tthis.parser = parser;\r\n\t// Regexp to match\r\n\tthis.matchRegExp = /\\{\\{\\{([^\\|]+?)(?:\\|([^\\|\\{\\}]+))?(?:\\|\\|([^\\|\\{\\}]+))?\\}\\}([^\\}]*)\\}(?:\\.(\\S+))?/mg;\r\n};\r\n\r\nexports.parse = function() {\r\n\t// Move past the match\r\n\tthis.parser.pos = this.matchRegExp.lastIndex;\r\n\t// Get the match details\r\n\tvar filter = this.match[1],\r\n\t\ttooltip = this.match[2],\r\n\t\ttemplate = $tw.utils.trim(this.match[3]),\r\n\t\tstyle = this.match[4],\r\n\t\tclasses = this.match[5];\r\n\t// Return the list widget\r\n\tvar node = {\r\n\t\ttype: \"list\",\r\n\t\tattributes: {\r\n\t\t\tfilter: {type: \"string\", value: filter}\r\n\t\t}\r\n\t};\r\n\tif(tooltip) {\r\n\t\tnode.attributes.tooltip = {type: \"string\", value: tooltip};\r\n\t}\r\n\tif(template) {\r\n\t\tnode.attributes.template = {type: \"string\", value: template};\r\n\t}\r\n\tif(style) {\r\n\t\tnode.attributes.style = {type: \"string\", value: style};\r\n\t}\r\n\tif(classes) {\r\n\t\tnode.attributes.itemClass = {type: \"string\", value: classes.split(\".\").join(\" \")};\r\n\t}\r\n\treturn [node];\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/parsers/wikiparser/rules/filteredtranscludeinline.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/hardlinebreaks.js": {
"text": "/*\\\r\ntitle: $:/core/modules/parsers/wikiparser/rules/hardlinebreaks.js\r\ntype: application/javascript\r\nmodule-type: wikirule\r\n\r\nWiki text inline rule for marking areas with hard line breaks. For example:\r\n\r\n```\r\n\"\"\"\r\nThis is some text\r\nThat is set like\r\nIt is a Poem\r\nWhen it is\r\nClearly\r\nNot\r\n\"\"\"\r\n```\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nexports.name = \"hardlinebreaks\";\r\nexports.types = {inline: true};\r\n\r\nexports.init = function(parser) {\r\n\tthis.parser = parser;\r\n\t// Regexp to match\r\n\tthis.matchRegExp = /\"\"\"(?:\\r?\\n)?/mg;\r\n};\r\n\r\nexports.parse = function() {\r\n\tvar reEnd = /(\"\"\")|(\\r?\\n)/mg,\r\n\t\ttree = [],\r\n\t\tmatch;\r\n\t// Move past the match\r\n\tthis.parser.pos = this.matchRegExp.lastIndex;\r\n\tdo {\r\n\t\t// Parse the run up to the terminator\r\n\t\ttree.push.apply(tree,this.parser.parseInlineRun(reEnd,{eatTerminator: false}));\r\n\t\t// Redo the terminator match\r\n\t\treEnd.lastIndex = this.parser.pos;\r\n\t\tmatch = reEnd.exec(this.parser.source);\r\n\t\tif(match) {\r\n\t\t\tthis.parser.pos = reEnd.lastIndex;\r\n\t\t\t// Add a line break if the terminator was a line break\r\n\t\t\tif(match[2]) {\r\n\t\t\t\ttree.push({type: \"element\", tag: \"br\"});\r\n\t\t\t}\r\n\t\t}\r\n\t} while(match && !match[1]);\r\n\t// Return the nodes\r\n\treturn tree;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/parsers/wikiparser/rules/hardlinebreaks.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/heading.js": {
"text": "/*\\\r\ntitle: $:/core/modules/parsers/wikiparser/rules/heading.js\r\ntype: application/javascript\r\nmodule-type: wikirule\r\n\r\nWiki text block rule for headings\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nexports.name = \"heading\";\r\nexports.types = {block: true};\r\n\r\nexports.init = function(parser) {\r\n\tthis.parser = parser;\r\n\t// Regexp to match\r\n\tthis.matchRegExp = /(!{1,6})/mg;\r\n};\r\n\r\n/*\r\nParse the most recent match\r\n*/\r\nexports.parse = function() {\r\n\t// Get all the details of the match\r\n\tvar headingLevel = this.match[1].length;\r\n\t// Move past the !s\r\n\tthis.parser.pos = this.matchRegExp.lastIndex;\r\n\t// Parse any classes, whitespace and then the heading itself\r\n\tvar classes = this.parser.parseClasses();\r\n\tthis.parser.skipWhitespace({treatNewlinesAsNonWhitespace: true});\r\n\tvar tree = this.parser.parseInlineRun(/(\\r?\\n)/mg);\r\n\t// Return the heading\r\n\treturn [{\r\n\t\ttype: \"element\",\r\n\t\ttag: \"h\" + headingLevel, \r\n\t\tattributes: {\r\n\t\t\t\"class\": {type: \"string\", value: classes.join(\" \")}\r\n\t\t},\r\n\t\tchildren: tree\r\n\t}];\r\n};\r\n})();\r\n",
"title": "$:/core/modules/parsers/wikiparser/rules/heading.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/horizrule.js": {
"text": "/*\\\r\ntitle: $:/core/modules/parsers/wikiparser/rules/horizrule.js\r\ntype: application/javascript\r\nmodule-type: wikirule\r\n\r\nWiki text block rule for rules. For example:\r\n\r\n```\r\n---\r\n```\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nexports.name = \"horizrule\";\r\nexports.types = {block: true};\r\n\r\nexports.init = function(parser) {\r\n\tthis.parser = parser;\r\n\t// Regexp to match\r\n\tthis.matchRegExp = /-{3,}\\r?(?:\\n|$)/mg;\r\n};\r\n\r\nexports.parse = function() {\r\n\t// Move past the match\r\n\tthis.parser.pos = this.matchRegExp.lastIndex;\r\n\treturn [{type: \"element\", tag: \"hr\"}];\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/parsers/wikiparser/rules/horizrule.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/html.js": {
"text": "/*\\\r\ntitle: $:/core/modules/parsers/wikiparser/rules/html.js\r\ntype: application/javascript\r\nmodule-type: wikirule\r\n\r\nWiki rule for HTML elements and widgets. For example:\r\n\r\n{{{\r\n<aside>\r\nThis is an HTML5 aside element\r\n</aside>\r\n\r\n<$slider target=\"MyTiddler\">\r\nThis is a widget invocation\r\n</$slider>\r\n\r\n}}}\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nexports.name = \"html\";\r\nexports.types = {inline: true, block: true};\r\n\r\nexports.init = function(parser) {\r\n\tthis.parser = parser;\r\n};\r\n\r\nexports.findNextMatch = function(startPos) {\r\n\t// Find the next tag\r\n\tthis.nextTag = this.findNextTag(this.parser.source,startPos,{\r\n\t\trequireLineBreak: this.is.block\r\n\t});\r\n\treturn this.nextTag ? this.nextTag.start : undefined;\r\n};\r\n\r\n/*\r\nParse the most recent match\r\n*/\r\nexports.parse = function() {\r\n\t// Retrieve the most recent match so that recursive calls don't overwrite it\r\n\tvar tag = this.nextTag;\r\n\tthis.nextTag = null;\r\n\t// Advance the parser position to past the tag\r\n\tthis.parser.pos = tag.end;\r\n\t// Check for an immediately following double linebreak\r\n\tvar hasLineBreak = !tag.isSelfClosing && !!$tw.utils.parseTokenRegExp(this.parser.source,this.parser.pos,/([^\\S\\n\\r]*\\r?\\n(?:[^\\S\\n\\r]*\\r?\\n|$))/g);\r\n\t// Set whether we're in block mode\r\n\ttag.isBlock = this.is.block || hasLineBreak;\r\n\t// Parse the body if we need to\r\n\tif(!tag.isSelfClosing && $tw.config.htmlVoidElements.indexOf(tag.tag) === -1) {\r\n\t\t\tvar reEndString = \"</\" + $tw.utils.escapeRegExp(tag.tag) + \">\",\r\n\t\t\t\treEnd = new RegExp(\"(\" + reEndString + \")\",\"mg\");\r\n\t\tif(hasLineBreak) {\r\n\t\t\ttag.children = this.parser.parseBlocks(reEndString);\r\n\t\t} else {\r\n\t\t\ttag.children = this.parser.parseInlineRun(reEnd);\r\n\t\t}\r\n\t\treEnd.lastIndex = this.parser.pos;\r\n\t\tvar endMatch = reEnd.exec(this.parser.source);\r\n\t\tif(endMatch && endMatch.index === this.parser.pos) {\r\n\t\t\tthis.parser.pos = endMatch.index + endMatch[0].length;\r\n\t\t}\r\n\t}\r\n\t// Return the tag\r\n\treturn [tag];\r\n};\r\n\r\n/*\r\nLook for an HTML tag. Returns null if not found, otherwise returns {type: \"element\", name:, attributes: [], isSelfClosing:, start:, end:,}\r\n*/\r\nexports.parseTag = function(source,pos,options) {\r\n\toptions = options || {};\r\n\tvar token,\r\n\t\tnode = {\r\n\t\t\ttype: \"element\",\r\n\t\t\tstart: pos,\r\n\t\t\tattributes: {}\r\n\t\t};\r\n\t// Define our regexps\r\n\tvar reTagName = /([a-zA-Z0-9\\-\\$]+)/g;\r\n\t// Skip whitespace\r\n\tpos = $tw.utils.skipWhiteSpace(source,pos);\r\n\t// Look for a less than sign\r\n\ttoken = $tw.utils.parseTokenString(source,pos,\"<\");\r\n\tif(!token) {\r\n\t\treturn null;\r\n\t}\r\n\tpos = token.end;\r\n\t// Get the tag name\r\n\ttoken = $tw.utils.parseTokenRegExp(source,pos,reTagName);\r\n\tif(!token) {\r\n\t\treturn null;\r\n\t}\r\n\tnode.tag = token.match[1];\r\n\tif(node.tag.charAt(0) === \"$\") {\r\n\t\tnode.type = node.tag.substr(1);\r\n\t}\r\n\tpos = token.end;\r\n\t// Process attributes\r\n\tvar attribute = $tw.utils.parseAttribute(source,pos);\r\n\twhile(attribute) {\r\n\t\tnode.attributes[attribute.name] = attribute;\r\n\t\tpos = attribute.end;\r\n\t\t// Get the next attribute\r\n\t\tattribute = $tw.utils.parseAttribute(source,pos);\r\n\t}\r\n\t// Skip whitespace\r\n\tpos = $tw.utils.skipWhiteSpace(source,pos);\r\n\t// Look for a closing slash\r\n\ttoken = $tw.utils.parseTokenString(source,pos,\"/\");\r\n\tif(token) {\r\n\t\tpos = token.end;\r\n\t\tnode.isSelfClosing = true;\r\n\t}\r\n\t// Look for a greater than sign\r\n\ttoken = $tw.utils.parseTokenString(source,pos,\">\");\r\n\tif(!token) {\r\n\t\treturn null;\r\n\t}\r\n\tpos = token.end;\r\n\t// Check for a required line break\r\n\tif(options.requireLineBreak) {\r\n\t\ttoken = $tw.utils.parseTokenRegExp(source,pos,/([^\\S\\n\\r]*\\r?\\n(?:[^\\S\\n\\r]*\\r?\\n|$))/g);\r\n\t\tif(!token) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}\r\n\t// Update the end position\r\n\tnode.end = pos;\r\n\treturn node;\r\n};\r\n\r\nexports.findNextTag = function(source,pos,options) {\r\n\t// A regexp for finding candidate HTML tags\r\n\tvar reLookahead = /<([a-zA-Z\\-\\$]+)/g;\r\n\t// Find the next candidate\r\n\treLookahead.lastIndex = pos;\r\n\tvar match = reLookahead.exec(source);\r\n\twhile(match) {\r\n\t\t// Try to parse the candidate as a tag\r\n\t\tvar tag = this.parseTag(source,match.index,options);\r\n\t\t// Return success\r\n\t\tif(tag && this.isLegalTag(tag)) {\r\n\t\t\treturn tag;\r\n\t\t}\r\n\t\t// Look for the next match\r\n\t\treLookahead.lastIndex = match.index + 1;\r\n\t\tmatch = reLookahead.exec(source);\r\n\t}\r\n\t// Failed\r\n\treturn null;\r\n};\r\n\r\nexports.isLegalTag = function(tag) {\r\n\t// Widgets are always OK\r\n\tif(tag.type !== \"element\") {\r\n\t\treturn true;\r\n\t// If it's an HTML tag that starts with a dash then it's not legal\r\n\t} else if(tag.tag.charAt(0) === \"-\") {\r\n\t\treturn false;\r\n\t} else {\r\n\t\t// Otherwise it's OK\r\n\t\treturn true;\r\n\t}\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/parsers/wikiparser/rules/html.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/image.js": {
"text": "/*\\\r\ntitle: $:/core/modules/parsers/wikiparser/rules/image.js\r\ntype: application/javascript\r\nmodule-type: wikirule\r\n\r\nWiki text inline rule for embedding images. For example:\r\n\r\n```\r\n[img[http://tiddlywiki.com/fractalveg.jpg]]\r\n[img width=23 height=24 [http://tiddlywiki.com/fractalveg.jpg]]\r\n[img width={{!!width}} height={{!!height}} [http://tiddlywiki.com/fractalveg.jpg]]\r\n[img[Description of image|http://tiddlywiki.com/fractalveg.jpg]]\r\n[img[TiddlerTitle]]\r\n[img[Description of image|TiddlerTitle]]\r\n```\r\n\r\nGenerates the `<$image>` widget.\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nexports.name = \"image\";\r\nexports.types = {inline: true};\r\n\r\nexports.init = function(parser) {\r\n\tthis.parser = parser;\r\n};\r\n\r\nexports.findNextMatch = function(startPos) {\r\n\t// Find the next tag\r\n\tthis.nextImage = this.findNextImage(this.parser.source,startPos);\r\n\treturn this.nextImage ? this.nextImage.start : undefined;\r\n};\r\n\r\nexports.parse = function() {\r\n\t// Move past the match\r\n\tthis.parser.pos = this.nextImage.end;\r\n\tvar node = {\r\n\t\ttype: \"image\",\r\n\t\tattributes: this.nextImage.attributes\r\n\t};\r\n\treturn [node];\r\n};\r\n\r\n/*\r\nFind the next image from the current position\r\n*/\r\nexports.findNextImage = function(source,pos) {\r\n\t// A regexp for finding candidate HTML tags\r\n\tvar reLookahead = /(\\[img)/g;\r\n\t// Find the next candidate\r\n\treLookahead.lastIndex = pos;\r\n\tvar match = reLookahead.exec(source);\r\n\twhile(match) {\r\n\t\t// Try to parse the candidate as a tag\r\n\t\tvar tag = this.parseImage(source,match.index);\r\n\t\t// Return success\r\n\t\tif(tag) {\r\n\t\t\treturn tag;\r\n\t\t}\r\n\t\t// Look for the next match\r\n\t\treLookahead.lastIndex = match.index + 1;\r\n\t\tmatch = reLookahead.exec(source);\r\n\t}\r\n\t// Failed\r\n\treturn null;\r\n};\r\n\r\n/*\r\nLook for an image at the specified position. Returns null if not found, otherwise returns {type: \"image\", attributes: [], isSelfClosing:, start:, end:,}\r\n*/\r\nexports.parseImage = function(source,pos) {\r\n\tvar token,\r\n\t\tnode = {\r\n\t\t\ttype: \"image\",\r\n\t\t\tstart: pos,\r\n\t\t\tattributes: {}\r\n\t\t};\r\n\t// Skip whitespace\r\n\tpos = $tw.utils.skipWhiteSpace(source,pos);\r\n\t// Look for the `[img`\r\n\ttoken = $tw.utils.parseTokenString(source,pos,\"[img\");\r\n\tif(!token) {\r\n\t\treturn null;\r\n\t}\r\n\tpos = token.end;\r\n\t// Skip whitespace\r\n\tpos = $tw.utils.skipWhiteSpace(source,pos);\r\n\t// Process attributes\r\n\tif(source.charAt(pos) !== \"[\") {\r\n\t\tvar attribute = $tw.utils.parseAttribute(source,pos);\r\n\t\twhile(attribute) {\r\n\t\t\tnode.attributes[attribute.name] = attribute;\r\n\t\t\tpos = attribute.end;\r\n\t\t\tpos = $tw.utils.skipWhiteSpace(source,pos);\r\n\t\t\tif(source.charAt(pos) !== \"[\") {\r\n\t\t\t\t// Get the next attribute\r\n\t\t\t\tattribute = $tw.utils.parseAttribute(source,pos);\r\n\t\t\t} else {\r\n\t\t\t\tattribute = null;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t// Skip whitespace\r\n\tpos = $tw.utils.skipWhiteSpace(source,pos);\r\n\t// Look for the `[` after the attributes\r\n\ttoken = $tw.utils.parseTokenString(source,pos,\"[\");\r\n\tif(!token) {\r\n\t\treturn null;\r\n\t}\r\n\tpos = token.end;\r\n\t// Skip whitespace\r\n\tpos = $tw.utils.skipWhiteSpace(source,pos);\r\n\t// Get the source up to the terminating `]]`\r\n\ttoken = $tw.utils.parseTokenRegExp(source,pos,/(?:([^|\\]]*?)\\|)?([^\\]]+?)\\]\\]/g);\r\n\tif(!token) {\r\n\t\treturn null;\r\n\t}\r\n\tpos = token.end;\r\n\tif(token.match[1]) {\r\n\t\tnode.attributes.tooltip = {type: \"string\", value: token.match[1].trim()};\r\n\t}\r\n\tnode.attributes.source = {type: \"string\", value: (token.match[2] || \"\").trim()};\r\n\t// Update the end position\r\n\tnode.end = pos;\r\n\treturn node;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/parsers/wikiparser/rules/image.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/list.js": {
"text": "/*\\\r\ntitle: $:/core/modules/parsers/wikiparser/rules/list.js\r\ntype: application/javascript\r\nmodule-type: wikirule\r\n\r\nWiki text block rule for lists. For example:\r\n\r\n```\r\n* This is an unordered list\r\n* It has two items\r\n\r\n# This is a numbered list\r\n## With a subitem\r\n# And a third item\r\n\r\n; This is a term that is being defined\r\n: This is the definition of that term\r\n```\r\n\r\nNote that lists can be nested arbitrarily:\r\n\r\n```\r\n#** One\r\n#* Two\r\n#** Three\r\n#**** Four\r\n#**# Five\r\n#**## Six\r\n## Seven\r\n### Eight\r\n## Nine\r\n```\r\n\r\nA CSS class can be applied to a list item as follows:\r\n\r\n```\r\n* List item one\r\n*.active List item two has the class `active`\r\n* List item three\r\n```\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nexports.name = \"list\";\r\nexports.types = {block: true};\r\n\r\nexports.init = function(parser) {\r\n\tthis.parser = parser;\r\n\t// Regexp to match\r\n\tthis.matchRegExp = /([\\*#;:>]+)/mg;\r\n};\r\n\r\nvar listTypes = {\r\n\t\"*\": {listTag: \"ul\", itemTag: \"li\"},\r\n\t\"#\": {listTag: \"ol\", itemTag: \"li\"},\r\n\t\";\": {listTag: \"dl\", itemTag: \"dt\"},\r\n\t\":\": {listTag: \"dl\", itemTag: \"dd\"},\r\n\t\">\": {listTag: \"blockquote\", itemTag: \"p\"}\r\n};\r\n\r\n/*\r\nParse the most recent match\r\n*/\r\nexports.parse = function() {\r\n\t// Array of parse tree nodes for the previous row of the list\r\n\tvar listStack = [];\r\n\t// Cycle through the items in the list\r\n\twhile(true) {\r\n\t\t// Match the list marker\r\n\t\tvar reMatch = /([\\*#;:>]+)/mg;\r\n\t\treMatch.lastIndex = this.parser.pos;\r\n\t\tvar match = reMatch.exec(this.parser.source);\r\n\t\tif(!match || match.index !== this.parser.pos) {\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t// Check whether the list type of the top level matches\r\n\t\tvar listInfo = listTypes[match[0].charAt(0)];\r\n\t\tif(listStack.length > 0 && listStack[0].tag !== listInfo.listTag) {\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t// Move past the list marker\r\n\t\tthis.parser.pos = match.index + match[0].length;\r\n\t\t// Walk through the list markers for the current row\r\n\t\tfor(var t=0; t<match[0].length; t++) {\r\n\t\t\tlistInfo = listTypes[match[0].charAt(t)];\r\n\t\t\t// Remove any stacked up element if we can't re-use it because the list type doesn't match\r\n\t\t\tif(listStack.length > t && listStack[t].tag !== listInfo.listTag) {\r\n\t\t\t\tlistStack.splice(t,listStack.length - t);\r\n\t\t\t}\r\n\t\t\t// Construct the list element or reuse the previous one at this level\r\n\t\t\tif(listStack.length <= t) {\r\n\t\t\t\tvar listElement = {type: \"element\", tag: listInfo.listTag, children: [\r\n\t\t\t\t\t{type: \"element\", tag: listInfo.itemTag, children: []}\r\n\t\t\t\t]};\r\n\t\t\t\t// Link this list element into the last child item of the parent list item\r\n\t\t\t\tif(t) {\r\n\t\t\t\t\tvar prevListItem = listStack[t-1].children[listStack[t-1].children.length-1];\r\n\t\t\t\t\tprevListItem.children.push(listElement);\r\n\t\t\t\t}\r\n\t\t\t\t// Save this element in the stack\r\n\t\t\t\tlistStack[t] = listElement;\r\n\t\t\t} else if(t === (match[0].length - 1)) {\r\n\t\t\t\tlistStack[t].children.push({type: \"element\", tag: listInfo.itemTag, children: []});\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(listStack.length > match[0].length) {\r\n\t\t\tlistStack.splice(match[0].length,listStack.length - match[0].length);\r\n\t\t}\r\n\t\t// Process the body of the list item into the last list item\r\n\t\tvar lastListChildren = listStack[listStack.length-1].children,\r\n\t\t\tlastListItem = lastListChildren[lastListChildren.length-1],\r\n\t\t\tclasses = this.parser.parseClasses();\r\n\t\tthis.parser.skipWhitespace({treatNewlinesAsNonWhitespace: true});\r\n\t\tvar tree = this.parser.parseInlineRun(/(\\r?\\n)/mg);\r\n\t\tlastListItem.children.push.apply(lastListItem.children,tree);\r\n\t\tif(classes.length > 0) {\r\n\t\t\t$tw.utils.addClassToParseTreeNode(lastListItem,classes.join(\" \"));\r\n\t\t}\r\n\t\t// Consume any whitespace following the list item\r\n\t\tthis.parser.skipWhitespace();\r\n\t}\r\n\t// Return the root element of the list\r\n\treturn [listStack[0]];\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/parsers/wikiparser/rules/list.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/macrocallblock.js": {
"text": "/*\\\r\ntitle: $:/core/modules/parsers/wikiparser/rules/macrocallblock.js\r\ntype: application/javascript\r\nmodule-type: wikirule\r\n\r\nWiki rule for block macro calls\r\n\r\n```\r\n<<name value value2>>\r\n```\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nexports.name = \"macrocallblock\";\r\nexports.types = {block: true};\r\n\r\nexports.init = function(parser) {\r\n\tthis.parser = parser;\r\n\t// Regexp to match\r\n\tthis.matchRegExp = /<<([^>\\s]+)(?:\\s*)((?:[^>]|(?:>(?!>)))*?)>>(?:\\r?\\n|$)/mg;\r\n};\r\n\r\n/*\r\nParse the most recent match\r\n*/\r\nexports.parse = function() {\r\n\t// Get all the details of the match\r\n\tvar macroName = this.match[1],\r\n\t\tparamString = this.match[2];\r\n\t// Move past the macro call\r\n\tthis.parser.pos = this.matchRegExp.lastIndex;\r\n\tvar params = [],\r\n\t\treParam = /\\s*(?:([A-Za-z0-9\\-_]+)\\s*:)?(?:\\s*(?:\"\"\"([\\s\\S]*?)\"\"\"|\"([^\"]*)\"|'([^']*)'|\\[\\[([^\\]]*)\\]\\]|([^\"'\\s]+)))/mg,\r\n\t\tparamMatch = reParam.exec(paramString);\r\n\twhile(paramMatch) {\r\n\t\t// Process this parameter\r\n\t\tvar paramInfo = {\r\n\t\t\tvalue: paramMatch[2] || paramMatch[3] || paramMatch[4] || paramMatch[5] || paramMatch[6]\r\n\t\t};\r\n\t\tif(paramMatch[1]) {\r\n\t\t\tparamInfo.name = paramMatch[1];\r\n\t\t}\r\n\t\tparams.push(paramInfo);\r\n\t\t// Find the next match\r\n\t\tparamMatch = reParam.exec(paramString);\r\n\t}\r\n\treturn [{\r\n\t\ttype: \"macrocall\",\r\n\t\tname: macroName,\r\n\t\tparams: params,\r\n\t\tisBlock: true\r\n\t}];\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/parsers/wikiparser/rules/macrocallblock.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/macrocallinline.js": {
"text": "/*\\\r\ntitle: $:/core/modules/parsers/wikiparser/rules/macrocallinline.js\r\ntype: application/javascript\r\nmodule-type: wikirule\r\n\r\nWiki rule for macro calls\r\n\r\n```\r\n<<name value value2>>\r\n```\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nexports.name = \"macrocallinline\";\r\nexports.types = {inline: true};\r\n\r\nexports.init = function(parser) {\r\n\tthis.parser = parser;\r\n\t// Regexp to match\r\n\tthis.matchRegExp = /<<([^\\s>]+)\\s*([\\s\\S]*?)>>/mg;\r\n};\r\n\r\n/*\r\nParse the most recent match\r\n*/\r\nexports.parse = function() {\r\n\t// Get all the details of the match\r\n\tvar macroName = this.match[1],\r\n\t\tparamString = this.match[2];\r\n\t// Move past the macro call\r\n\tthis.parser.pos = this.matchRegExp.lastIndex;\r\n\tvar params = [],\r\n\t\treParam = /\\s*(?:([A-Za-z0-9\\-_]+)\\s*:)?(?:\\s*(?:\"\"\"([\\s\\S]*?)\"\"\"|\"([^\"]*)\"|'([^']*)'|\\[\\[([^\\]]*)\\]\\]|([^\"'\\s]+)))/mg,\r\n\t\tparamMatch = reParam.exec(paramString);\r\n\twhile(paramMatch) {\r\n\t\t// Process this parameter\r\n\t\tvar paramInfo = {\r\n\t\t\tvalue: paramMatch[2] || paramMatch[3] || paramMatch[4] || paramMatch[5]|| paramMatch[6]\r\n\t\t};\r\n\t\tif(paramMatch[1]) {\r\n\t\t\tparamInfo.name = paramMatch[1];\r\n\t\t}\r\n\t\tparams.push(paramInfo);\r\n\t\t// Find the next match\r\n\t\tparamMatch = reParam.exec(paramString);\r\n\t}\r\n\treturn [{\r\n\t\ttype: \"macrocall\",\r\n\t\tname: macroName,\r\n\t\tparams: params\r\n\t}];\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/parsers/wikiparser/rules/macrocallinline.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/macrodef.js": {
"text": "/*\\\r\ntitle: $:/core/modules/parsers/wikiparser/rules/macrodef.js\r\ntype: application/javascript\r\nmodule-type: wikirule\r\n\r\nWiki pragma rule for macro definitions\r\n\r\n```\r\n\\define name(param:defaultvalue,param2:defaultvalue)\r\ndefinition text, including $param$ markers\r\n\\end\r\n```\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nexports.name = \"macrodef\";\r\nexports.types = {pragma: true};\r\n\r\n/*\r\nInstantiate parse rule\r\n*/\r\nexports.init = function(parser) {\r\n\tthis.parser = parser;\r\n\t// Regexp to match\r\n\tthis.matchRegExp = /^\\\\define\\s+([^(\\s]+)\\(\\s*([^)]*)\\)(\\s*\\r?\\n)?/mg;\r\n};\r\n\r\n/*\r\nParse the most recent match\r\n*/\r\nexports.parse = function() {\r\n\t// Move past the macro name and parameters\r\n\tthis.parser.pos = this.matchRegExp.lastIndex;\r\n\t// Parse the parameters\r\n\tvar paramString = this.match[2],\r\n\t\tparams = [];\r\n\tif(paramString !== \"\") {\r\n\t\tvar reParam = /\\s*([A-Za-z0-9\\-_]+)(?:\\s*:\\s*(?:\"\"\"([\\s\\S]*?)\"\"\"|\"([^\"]*)\"|'([^']*)'|\\[\\[([^\\]]*)\\]\\]|([^\"'\\s]+)))?/mg,\r\n\t\t\tparamMatch = reParam.exec(paramString);\r\n\t\twhile(paramMatch) {\r\n\t\t\t// Save the parameter details\r\n\t\t\tvar paramInfo = {name: paramMatch[1]},\r\n\t\t\t\tdefaultValue = paramMatch[2] || paramMatch[3] || paramMatch[4] || paramMatch[5] || paramMatch[6];\r\n\t\t\tif(defaultValue) {\r\n\t\t\t\tparamInfo[\"default\"] = defaultValue;\r\n\t\t\t}\r\n\t\t\tparams.push(paramInfo);\r\n\t\t\t// Look for the next parameter\r\n\t\t\tparamMatch = reParam.exec(paramString);\r\n\t\t}\r\n\t}\r\n\t// Is this a multiline definition?\r\n\tvar reEnd;\r\n\tif(this.match[3]) {\r\n\t\t// If so, the end of the body is marked with \\end\r\n\t\treEnd = /(\\r?\\n\\\\end[^\\S\\n\\r]*(?:$|\\r?\\n))/mg;\r\n\t} else {\r\n\t\t// Otherwise, the end of the definition is marked by the end of the line\r\n\t\treEnd = /(\\r?\\n)/mg;\r\n\t\t// Move past any whitespace\r\n\t\tthis.parser.pos = $tw.utils.skipWhiteSpace(this.parser.source,this.parser.pos);\r\n\t}\r\n\t// Find the end of the definition\r\n\treEnd.lastIndex = this.parser.pos;\r\n\tvar text,\r\n\t\tendMatch = reEnd.exec(this.parser.source);\r\n\tif(endMatch) {\r\n\t\ttext = this.parser.source.substring(this.parser.pos,endMatch.index);\r\n\t\tthis.parser.pos = endMatch.index + endMatch[0].length;\r\n\t} else {\r\n\t\t// We didn't find the end of the definition, so we'll make it blank\r\n\t\ttext = \"\";\r\n\t}\r\n\t// Save the macro definition\r\n\treturn [{\r\n\t\ttype: \"macrodef\",\r\n\t\tname: this.match[1],\r\n\t\tparams: params,\r\n\t\ttext: text\r\n\t}];\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/parsers/wikiparser/rules/macrodef.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/prettyextlink.js": {
"text": "/*\\\r\ntitle: $:/core/modules/parsers/wikiparser/rules/prettyextlink.js\r\ntype: application/javascript\r\nmodule-type: wikirule\r\n\r\nWiki text inline rule for external links. For example:\r\n\r\n```\r\n[ext[http://tiddlywiki.com/fractalveg.jpg]]\r\n[ext[Tooltip|http://tiddlywiki.com/fractalveg.jpg]]\r\n```\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nexports.name = \"prettyextlink\";\r\nexports.types = {inline: true};\r\n\r\nexports.init = function(parser) {\r\n\tthis.parser = parser;\r\n};\r\n\r\nexports.findNextMatch = function(startPos) {\r\n\t// Find the next tag\r\n\tthis.nextLink = this.findNextLink(this.parser.source,startPos);\r\n\treturn this.nextLink ? this.nextLink.start : undefined;\r\n};\r\n\r\nexports.parse = function() {\r\n\t// Move past the match\r\n\tthis.parser.pos = this.nextLink.end;\r\n\treturn [this.nextLink];\r\n};\r\n\r\n/*\r\nFind the next link from the current position\r\n*/\r\nexports.findNextLink = function(source,pos) {\r\n\t// A regexp for finding candidate links\r\n\tvar reLookahead = /(\\[ext\\[)/g;\r\n\t// Find the next candidate\r\n\treLookahead.lastIndex = pos;\r\n\tvar match = reLookahead.exec(source);\r\n\twhile(match) {\r\n\t\t// Try to parse the candidate as a link\r\n\t\tvar link = this.parseLink(source,match.index);\r\n\t\t// Return success\r\n\t\tif(link) {\r\n\t\t\treturn link;\r\n\t\t}\r\n\t\t// Look for the next match\r\n\t\treLookahead.lastIndex = match.index + 1;\r\n\t\tmatch = reLookahead.exec(source);\r\n\t}\r\n\t// Failed\r\n\treturn null;\r\n};\r\n\r\n/*\r\nLook for an link at the specified position. Returns null if not found, otherwise returns {type: \"element\", tag: \"a\", attributes: [], isSelfClosing:, start:, end:,}\r\n*/\r\nexports.parseLink = function(source,pos) {\r\n\tvar token,\r\n\t\ttextNode = {\r\n\t\t\ttype: \"text\"\r\n\t\t},\r\n\t\tnode = {\r\n\t\t\ttype: \"element\",\r\n\t\t\ttag: \"a\",\r\n\t\t\tstart: pos,\r\n\t\t\tattributes: {\r\n\t\t\t\t\"class\": {type: \"string\", value: \"tc-tiddlylink-external\"},\r\n\t\t\t},\r\n\t\t\tchildren: [textNode]\r\n\t\t};\r\n\t// Skip whitespace\r\n\tpos = $tw.utils.skipWhiteSpace(source,pos);\r\n\t// Look for the `[ext[`\r\n\ttoken = $tw.utils.parseTokenString(source,pos,\"[ext[\");\r\n\tif(!token) {\r\n\t\treturn null;\r\n\t}\r\n\tpos = token.end;\r\n\t// Look ahead for the terminating `]]`\r\n\tvar closePos = source.indexOf(\"]]\",pos);\r\n\tif(closePos === -1) {\r\n\t\treturn null;\r\n\t}\r\n\t// Look for a `|` separating the tooltip\r\n\tvar splitPos = source.indexOf(\"|\",pos);\r\n\tif(splitPos === -1 || splitPos > closePos) {\r\n\t\tsplitPos = null;\r\n\t}\r\n\t// Pull out the tooltip and URL\r\n\tvar tooltip, URL;\r\n\tif(splitPos) {\r\n\t\tURL = source.substring(splitPos + 1,closePos).trim();\r\n\t\ttextNode.text = source.substring(pos,splitPos).trim();\r\n\t} else {\r\n\t\tURL = source.substring(pos,closePos).trim();\r\n\t\ttextNode.text = URL;\r\n\t}\r\n\tnode.attributes.href = {type: \"string\", value: URL};\r\n\tnode.attributes.target = {type: \"string\", value: \"_blank\"};\r\n\t// Update the end position\r\n\tnode.end = closePos + 2;\r\n\treturn node;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/parsers/wikiparser/rules/prettyextlink.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/prettylink.js": {
"text": "/*\\\r\ntitle: $:/core/modules/parsers/wikiparser/rules/prettylink.js\r\ntype: application/javascript\r\nmodule-type: wikirule\r\n\r\nWiki text inline rule for pretty links. For example:\r\n\r\n```\r\n[[Introduction]]\r\n\r\n[[Link description|TiddlerTitle]]\r\n```\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nexports.name = \"prettylink\";\r\nexports.types = {inline: true};\r\n\r\nexports.init = function(parser) {\r\n\tthis.parser = parser;\r\n\t// Regexp to match\r\n\tthis.matchRegExp = /\\[\\[(.*?)(?:\\|(.*?))?\\]\\]/mg;\r\n};\r\n\r\nexports.parse = function() {\r\n\t// Move past the match\r\n\tthis.parser.pos = this.matchRegExp.lastIndex;\r\n\t// Process the link\r\n\tvar text = this.match[1],\r\n\t\tlink = this.match[2] || text;\r\n\tif($tw.utils.isLinkExternal(link)) {\r\n\t\treturn [{\r\n\t\t\ttype: \"element\",\r\n\t\t\ttag: \"a\",\r\n\t\t\tattributes: {\r\n\t\t\t\thref: {type: \"string\", value: link},\r\n\t\t\t\t\"class\": {type: \"string\", value: \"tc-tiddlylink-external\"},\r\n\t\t\t\ttarget: {type: \"string\", value: \"_blank\"}\r\n\t\t\t},\r\n\t\t\tchildren: [{\r\n\t\t\t\ttype: \"text\", text: text\r\n\t\t\t}]\r\n\t\t}];\r\n\t} else {\r\n\t\treturn [{\r\n\t\t\ttype: \"link\",\r\n\t\t\tattributes: {\r\n\t\t\t\tto: {type: \"string\", value: link}\r\n\t\t\t},\r\n\t\t\tchildren: [{\r\n\t\t\t\ttype: \"text\", text: text\r\n\t\t\t}]\r\n\t\t}];\r\n\t}\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/parsers/wikiparser/rules/prettylink.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/quoteblock.js": {
"text": "/*\\\r\ntitle: $:/core/modules/parsers/wikiparser/rules/quoteblock.js\r\ntype: application/javascript\r\nmodule-type: wikirule\r\n\r\nWiki text rule for quote blocks. For example:\r\n\r\n```\r\n\t<<<.optionalClass(es) optional cited from\r\n\ta quote\r\n\t<<<\r\n\t\r\n\t<<<.optionalClass(es)\r\n\ta quote\r\n\t<<< optional cited from\r\n```\r\n\r\nQuotes can be quoted by putting more <s\r\n\r\n```\r\n\t<<<\r\n\tQuote Level 1\r\n\t\r\n\t<<<<\r\n\tQuoteLevel 2\r\n\t<<<<\r\n\t\r\n\t<<<\r\n```\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nexports.name = \"quoteblock\";\r\nexports.types = {block: true};\r\n\r\nexports.init = function(parser) {\r\n\tthis.parser = parser;\r\n\t// Regexp to match\r\n\tthis.matchRegExp = /(<<<+)/mg;\r\n};\r\n\r\nexports.parse = function() {\r\n\tvar classes = [\"tc-quote\"];\r\n\t// Get all the details of the match\r\n\tvar reEndString = \"^\" + this.match[1] + \"(?!<)\";\r\n\t// Move past the <s\r\n\tthis.parser.pos = this.matchRegExp.lastIndex;\r\n\t\r\n\t// Parse any classes, whitespace and then the optional cite itself\r\n\tclasses.push.apply(classes, this.parser.parseClasses());\r\n\tthis.parser.skipWhitespace({treatNewlinesAsNonWhitespace: true});\r\n\tvar cite = this.parser.parseInlineRun(/(\\r?\\n)/mg);\r\n\t// before handling the cite, parse the body of the quote\r\n\tvar tree= this.parser.parseBlocks(reEndString);\r\n\t// If we got a cite, put it before the text\r\n\tif(cite.length > 0) {\r\n\t\ttree.unshift({\r\n\t\t\ttype: \"element\",\r\n\t\t\ttag: \"cite\",\r\n\t\t\tchildren: cite\r\n\t\t});\r\n\t}\r\n\t// Parse any optional cite\r\n\tthis.parser.skipWhitespace({treatNewlinesAsNonWhitespace: true});\r\n\tcite = this.parser.parseInlineRun(/(\\r?\\n)/mg);\r\n\t// If we got a cite, push it\r\n\tif(cite.length > 0) {\r\n\t\ttree.push({\r\n\t\t\ttype: \"element\",\r\n\t\t\ttag: \"cite\",\r\n\t\t\tchildren: cite\r\n\t\t});\r\n\t}\r\n\t// Return the blockquote element\r\n\treturn [{\r\n\t\ttype: \"element\",\r\n\t\ttag: \"blockquote\",\r\n\t\tattributes: {\r\n\t\t\tclass: { type: \"string\", value: classes.join(\" \") },\r\n\t\t},\r\n\t\tchildren: tree\r\n\t}];\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/parsers/wikiparser/rules/quoteblock.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/rules.js": {
"text": "/*\\\r\ntitle: $:/core/modules/parsers/wikiparser/rules/rules.js\r\ntype: application/javascript\r\nmodule-type: wikirule\r\n\r\nWiki pragma rule for rules specifications\r\n\r\n```\r\n\\rules except ruleone ruletwo rulethree\r\n\\rules only ruleone ruletwo rulethree\r\n```\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nexports.name = \"rules\";\r\nexports.types = {pragma: true};\r\n\r\n/*\r\nInstantiate parse rule\r\n*/\r\nexports.init = function(parser) {\r\n\tthis.parser = parser;\r\n\t// Regexp to match\r\n\tthis.matchRegExp = /^\\\\rules[^\\S\\n]/mg;\r\n};\r\n\r\n/*\r\nParse the most recent match\r\n*/\r\nexports.parse = function() {\r\n\t// Move past the pragma invocation\r\n\tthis.parser.pos = this.matchRegExp.lastIndex;\r\n\t// Parse whitespace delimited tokens terminated by a line break\r\n\tvar reMatch = /[^\\S\\n]*(\\S+)|(\\r?\\n)/mg,\r\n\t\ttokens = [];\r\n\treMatch.lastIndex = this.parser.pos;\r\n\tvar match = reMatch.exec(this.parser.source);\r\n\twhile(match && match.index === this.parser.pos) {\r\n\t\tthis.parser.pos = reMatch.lastIndex;\r\n\t\t// Exit if we've got the line break\r\n\t\tif(match[2]) {\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t// Process the token\r\n\t\tif(match[1]) {\r\n\t\t\ttokens.push(match[1]);\r\n\t\t}\r\n\t\t// Match the next token\r\n\t\tmatch = reMatch.exec(this.parser.source);\r\n\t}\r\n\t// Process the tokens\r\n\tif(tokens.length > 0) {\r\n\t\tthis.parser.amendRules(tokens[0],tokens.slice(1));\r\n\t}\r\n\t// No parse tree nodes to return\r\n\treturn [];\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/parsers/wikiparser/rules/rules.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/styleblock.js": {
"text": "/*\\\r\ntitle: $:/core/modules/parsers/wikiparser/rules/styleblock.js\r\ntype: application/javascript\r\nmodule-type: wikirule\r\n\r\nWiki text block rule for assigning styles and classes to paragraphs and other blocks. For example:\r\n\r\n```\r\n@@.myClass\r\n@@background-color:red;\r\nThis paragraph will have the CSS class `myClass`.\r\n\r\n* The `<ul>` around this list will also have the class `myClass`\r\n* List item 2\r\n\r\n@@\r\n```\r\n\r\nNote that classes and styles can be mixed subject to the rule that styles must precede classes. For example\r\n\r\n```\r\n@@.myFirstClass.mySecondClass\r\n@@width:100px;.myThirdClass\r\nThis is a paragraph\r\n@@\r\n```\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nexports.name = \"styleblock\";\r\nexports.types = {block: true};\r\n\r\nexports.init = function(parser) {\r\n\tthis.parser = parser;\r\n\t// Regexp to match\r\n\tthis.matchRegExp = /@@((?:[^\\.\\r\\n\\s:]+:[^\\r\\n;]+;)+)?(?:\\.([^\\r\\n\\s]+))?\\r?\\n/mg;\r\n};\r\n\r\nexports.parse = function() {\r\n\tvar reEndString = \"^@@(?:\\\\r?\\\\n)?\";\r\n\tvar classes = [], styles = [];\r\n\tdo {\r\n\t\t// Get the class and style\r\n\t\tif(this.match[1]) {\r\n\t\t\tstyles.push(this.match[1]);\r\n\t\t}\r\n\t\tif(this.match[2]) {\r\n\t\t\tclasses.push(this.match[2].split(\".\").join(\" \"));\r\n\t\t}\r\n\t\t// Move past the match\r\n\t\tthis.parser.pos = this.matchRegExp.lastIndex;\r\n\t\t// Look for another line of classes and styles\r\n\t\tthis.match = this.matchRegExp.exec(this.parser.source);\r\n\t} while(this.match && this.match.index === this.parser.pos);\r\n\t// Parse the body\r\n\tvar tree = this.parser.parseBlocks(reEndString);\r\n\tfor(var t=0; t<tree.length; t++) {\r\n\t\tif(classes.length > 0) {\r\n\t\t\t$tw.utils.addClassToParseTreeNode(tree[t],classes.join(\" \"));\r\n\t\t}\r\n\t\tif(styles.length > 0) {\r\n\t\t\t$tw.utils.addAttributeToParseTreeNode(tree[t],\"style\",styles.join(\"\"));\r\n\t\t}\r\n\t}\r\n\treturn tree;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/parsers/wikiparser/rules/styleblock.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/styleinline.js": {
"text": "/*\\\r\ntitle: $:/core/modules/parsers/wikiparser/rules/styleinline.js\r\ntype: application/javascript\r\nmodule-type: wikirule\r\n\r\nWiki text inline rule for assigning styles and classes to inline runs. For example:\r\n\r\n```\r\n@@.myClass This is some text with a class@@\r\n@@background-color:red;This is some text with a background colour@@\r\n@@width:100px;.myClass This is some text with a class and a width@@\r\n```\r\n\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nexports.name = \"styleinline\";\r\nexports.types = {inline: true};\r\n\r\nexports.init = function(parser) {\r\n\tthis.parser = parser;\r\n\t// Regexp to match\r\n\tthis.matchRegExp = /@@((?:[^\\.\\r\\n\\s:]+:[^\\r\\n;]+;)+)?(\\.(?:[^\\r\\n\\s]+)\\s+)?/mg;\r\n};\r\n\r\nexports.parse = function() {\r\n\tvar reEnd = /@@/g;\r\n\t// Get the styles and class\r\n\tvar stylesString = this.match[1],\r\n\t\tclassString = this.match[2] ? this.match[2].split(\".\").join(\" \") : undefined;\r\n\t// Move past the match\r\n\tthis.parser.pos = this.matchRegExp.lastIndex;\r\n\t// Parse the run up to the terminator\r\n\tvar tree = this.parser.parseInlineRun(reEnd,{eatTerminator: true});\r\n\t// Return the classed span\r\n\tvar node = {\r\n\t\ttype: \"element\",\r\n\t\ttag: \"span\",\r\n\t\tattributes: {\r\n\t\t\t\"class\": {type: \"string\", value: \"tc-inline-style\"}\r\n\t\t},\r\n\t\tchildren: tree\r\n\t};\r\n\tif(classString) {\r\n\t\t$tw.utils.addClassToParseTreeNode(node,classString);\r\n\t}\r\n\tif(stylesString) {\r\n\t\t$tw.utils.addAttributeToParseTreeNode(node,\"style\",stylesString);\r\n\t}\r\n\treturn [node];\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/parsers/wikiparser/rules/styleinline.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/syslink.js": {
"text": "/*\\\r\ntitle: $:/core/modules/parsers/wikiparser/rules/syslink.js\r\ntype: application/javascript\r\nmodule-type: wikirule\r\n\r\nWiki text inline rule for system tiddler links.\r\nCan be suppressed preceding them with `~`.\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nexports.name = \"syslink\";\r\nexports.types = {inline: true};\r\n\r\nexports.init = function(parser) {\r\n\tthis.parser = parser;\r\n\t// Regexp to match\r\n\tthis.matchRegExp = /~?\\$:[^\\s<|]+(?:[^\\s<|])/mg;\r\n};\r\n\r\nexports.parse = function() {\r\n\tvar match = this.match[0];\r\n\t// Move past the match\r\n\tthis.parser.pos = this.matchRegExp.lastIndex;\r\n\t// Create the link unless it is suppressed\r\n\tif(match.substr(0,1) === \"~\") {\r\n\t\treturn [{type: \"text\", text: match.substr(1)}];\r\n\t} else {\r\n\t\treturn [{\r\n\t\t\ttype: \"link\",\r\n\t\t\tattributes: {\r\n\t\t\t\tto: {type: \"string\", value: match}\r\n\t\t\t},\r\n\t\t\tchildren: [{\r\n\t\t\t\ttype: \"text\",\r\n\t\t\t\ttext: match\r\n\t\t\t}]\r\n\t\t}];\r\n\t}\r\n};\r\n\r\n})();",
"title": "$:/core/modules/parsers/wikiparser/rules/syslink.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/table.js": {
"text": "/*\\\r\ntitle: $:/core/modules/parsers/wikiparser/rules/table.js\r\ntype: application/javascript\r\nmodule-type: wikirule\r\n\r\nWiki text block rule for tables.\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nexports.name = \"table\";\r\nexports.types = {block: true};\r\n\r\nexports.init = function(parser) {\r\n\tthis.parser = parser;\r\n\t// Regexp to match\r\n\tthis.matchRegExp = /^\\|(?:[^\\n]*)\\|(?:[fhck]?)\\r?(?:\\n|$)/mg;\r\n};\r\n\r\nvar processRow = function(prevColumns) {\r\n\tvar cellRegExp = /(?:\\|([^\\n\\|]*)\\|)|(\\|[fhck]?\\r?(?:\\n|$))/mg,\r\n\t\tcellTermRegExp = /((?:\\x20*)\\|)/mg,\r\n\t\ttree = [],\r\n\t\tcol = 0,\r\n\t\tcolSpanCount = 1,\r\n\t\tprevCell,\r\n\t\tvAlign;\r\n\t// Match a single cell\r\n\tcellRegExp.lastIndex = this.parser.pos;\r\n\tvar cellMatch = cellRegExp.exec(this.parser.source);\r\n\twhile(cellMatch && cellMatch.index === this.parser.pos) {\r\n\t\tif(cellMatch[1] === \"~\") {\r\n\t\t\t// Rowspan\r\n\t\t\tvar last = prevColumns[col];\r\n\t\t\tif(last) {\r\n\t\t\t\tlast.rowSpanCount++;\r\n\t\t\t\t$tw.utils.addAttributeToParseTreeNode(last.element,\"rowspan\",last.rowSpanCount);\r\n\t\t\t\tvAlign = $tw.utils.getAttributeValueFromParseTreeNode(last.element,\"valign\",\"center\");\r\n\t\t\t\t$tw.utils.addAttributeToParseTreeNode(last.element,\"valign\",vAlign);\r\n\t\t\t\tif(colSpanCount > 1) {\r\n\t\t\t\t\t$tw.utils.addAttributeToParseTreeNode(last.element,\"colspan\",colSpanCount);\r\n\t\t\t\t\tcolSpanCount = 1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// Move to just before the `|` terminating the cell\r\n\t\t\tthis.parser.pos = cellRegExp.lastIndex - 1;\r\n\t\t} else if(cellMatch[1] === \">\") {\r\n\t\t\t// Colspan\r\n\t\t\tcolSpanCount++;\r\n\t\t\t// Move to just before the `|` terminating the cell\r\n\t\t\tthis.parser.pos = cellRegExp.lastIndex - 1;\r\n\t\t} else if(cellMatch[1] === \"<\" && prevCell) {\r\n\t\t\tcolSpanCount = 1 + $tw.utils.getAttributeValueFromParseTreeNode(prevCell,\"colspan\",1);\r\n\t\t\t$tw.utils.addAttributeToParseTreeNode(prevCell,\"colspan\",colSpanCount);\r\n\t\t\tcolSpanCount = 1;\r\n\t\t\t// Move to just before the `|` terminating the cell\r\n\t\t\tthis.parser.pos = cellRegExp.lastIndex - 1;\r\n\t\t} else if(cellMatch[2]) {\r\n\t\t\t// End of row\r\n\t\t\tif(prevCell && colSpanCount > 1) {\r\n\t\t\t\tif(prevCell.attributes && prevCell.attributes && prevCell.attributes.colspan) {\r\n\t\t\t\t\t\tcolSpanCount += prevCell.attributes.colspan.value;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcolSpanCount -= 1;\r\n\t\t\t\t}\r\n\t\t\t\t$tw.utils.addAttributeToParseTreeNode(prevCell,\"colspan\",colSpanCount);\r\n\t\t\t}\r\n\t\t\tthis.parser.pos = cellRegExp.lastIndex - 1;\r\n\t\t\tbreak;\r\n\t\t} else {\r\n\t\t\t// For ordinary cells, step beyond the opening `|`\r\n\t\t\tthis.parser.pos++;\r\n\t\t\t// Look for a space at the start of the cell\r\n\t\t\tvar spaceLeft = false;\r\n\t\t\tvAlign = null;\r\n\t\t\tif(this.parser.source.substr(this.parser.pos).search(/^\\^([^\\^]|\\^\\^)/) === 0) {\r\n\t\t\t\tvAlign = \"top\";\r\n\t\t\t} else if(this.parser.source.substr(this.parser.pos).search(/^,([^,]|,,)/) === 0) {\r\n\t\t\t\tvAlign = \"bottom\";\r\n\t\t\t}\r\n\t\t\tif(vAlign) {\r\n\t\t\t\tthis.parser.pos++;\r\n\t\t\t}\r\n\t\t\tvar chr = this.parser.source.substr(this.parser.pos,1);\r\n\t\t\twhile(chr === \" \") {\r\n\t\t\t\tspaceLeft = true;\r\n\t\t\t\tthis.parser.pos++;\r\n\t\t\t\tchr = this.parser.source.substr(this.parser.pos,1);\r\n\t\t\t}\r\n\t\t\t// Check whether this is a heading cell\r\n\t\t\tvar cell;\r\n\t\t\tif(chr === \"!\") {\r\n\t\t\t\tthis.parser.pos++;\r\n\t\t\t\tcell = {type: \"element\", tag: \"th\", children: []};\r\n\t\t\t} else {\r\n\t\t\t\tcell = {type: \"element\", tag: \"td\", children: []};\r\n\t\t\t}\r\n\t\t\ttree.push(cell);\r\n\t\t\t// Record information about this cell\r\n\t\t\tprevCell = cell;\r\n\t\t\tprevColumns[col] = {rowSpanCount:1,element:cell};\r\n\t\t\t// Check for a colspan\r\n\t\t\tif(colSpanCount > 1) {\r\n\t\t\t\t$tw.utils.addAttributeToParseTreeNode(cell,\"colspan\",colSpanCount);\r\n\t\t\t\tcolSpanCount = 1;\r\n\t\t\t}\r\n\t\t\t// Parse the cell\r\n\t\t\tcell.children = this.parser.parseInlineRun(cellTermRegExp,{eatTerminator: true});\r\n\t\t\t// Set the alignment for the cell\r\n\t\t\tif(vAlign) {\r\n\t\t\t\t$tw.utils.addAttributeToParseTreeNode(cell,\"valign\",vAlign);\r\n\t\t\t}\r\n\t\t\tif(this.parser.source.substr(this.parser.pos - 2,1) === \" \") { // spaceRight\r\n\t\t\t\t$tw.utils.addAttributeToParseTreeNode(cell,\"align\",spaceLeft ? \"center\" : \"left\");\r\n\t\t\t} else if(spaceLeft) {\r\n\t\t\t\t$tw.utils.addAttributeToParseTreeNode(cell,\"align\",\"right\");\r\n\t\t\t}\r\n\t\t\t// Move back to the closing `|`\r\n\t\t\tthis.parser.pos--;\r\n\t\t}\r\n\t\tcol++;\r\n\t\tcellRegExp.lastIndex = this.parser.pos;\r\n\t\tcellMatch = cellRegExp.exec(this.parser.source);\r\n\t}\r\n\treturn tree;\r\n};\r\n\r\nexports.parse = function() {\r\n\tvar rowContainerTypes = {\"c\":\"caption\", \"h\":\"thead\", \"\":\"tbody\", \"f\":\"tfoot\"},\r\n\t\ttable = {type: \"element\", tag: \"table\", children: []},\r\n\t\trowRegExp = /^\\|([^\\n]*)\\|([fhck]?)\\r?(?:\\n|$)/mg,\r\n\t\trowTermRegExp = /(\\|(?:[fhck]?)\\r?(?:\\n|$))/mg,\r\n\t\tprevColumns = [],\r\n\t\tcurrRowType,\r\n\t\trowContainer,\r\n\t\trowCount = 0;\r\n\t// Match the row\r\n\trowRegExp.lastIndex = this.parser.pos;\r\n\tvar rowMatch = rowRegExp.exec(this.parser.source);\r\n\twhile(rowMatch && rowMatch.index === this.parser.pos) {\r\n\t\tvar rowType = rowMatch[2];\r\n\t\t// Check if it is a class assignment\r\n\t\tif(rowType === \"k\") {\r\n\t\t\t$tw.utils.addClassToParseTreeNode(table,rowMatch[1]);\r\n\t\t\tthis.parser.pos = rowMatch.index + rowMatch[0].length;\r\n\t\t} else {\r\n\t\t\t// Otherwise, create a new row if this one is of a different type\r\n\t\t\tif(rowType !== currRowType) {\r\n\t\t\t\trowContainer = {type: \"element\", tag: rowContainerTypes[rowType], children: []};\r\n\t\t\t\ttable.children.push(rowContainer);\r\n\t\t\t\tcurrRowType = rowType;\r\n\t\t\t}\r\n\t\t\t// Is this a caption row?\r\n\t\t\tif(currRowType === \"c\") {\r\n\t\t\t\t// If so, move past the opening `|` of the row\r\n\t\t\t\tthis.parser.pos++;\r\n\t\t\t\t// Move the caption to the first row if it isn't already\r\n\t\t\t\tif(table.children.length !== 1) {\r\n\t\t\t\t\ttable.children.pop(); // Take rowContainer out of the children array\r\n\t\t\t\t\ttable.children.splice(0,0,rowContainer); // Insert it at the bottom\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t// Set the alignment - TODO: figure out why TW did this\r\n//\t\t\t\trowContainer.attributes.align = rowCount === 0 ? \"top\" : \"bottom\";\r\n\t\t\t\t// Parse the caption\r\n\t\t\t\trowContainer.children = this.parser.parseInlineRun(rowTermRegExp,{eatTerminator: true});\r\n\t\t\t} else {\r\n\t\t\t\t// Create the row\r\n\t\t\t\tvar theRow = {type: \"element\", tag: \"tr\", children: []};\r\n\t\t\t\t$tw.utils.addClassToParseTreeNode(theRow,rowCount%2 ? \"oddRow\" : \"evenRow\");\r\n\t\t\t\trowContainer.children.push(theRow);\r\n\t\t\t\t// Process the row\r\n\t\t\t\ttheRow.children = processRow.call(this,prevColumns);\r\n\t\t\t\tthis.parser.pos = rowMatch.index + rowMatch[0].length;\r\n\t\t\t\t// Increment the row count\r\n\t\t\t\trowCount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\trowMatch = rowRegExp.exec(this.parser.source);\r\n\t}\r\n\treturn [table];\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/parsers/wikiparser/rules/table.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/transcludeblock.js": {
"text": "/*\\\r\ntitle: $:/core/modules/parsers/wikiparser/rules/transcludeblock.js\r\ntype: application/javascript\r\nmodule-type: wikirule\r\n\r\nWiki text rule for block-level transclusion. For example:\r\n\r\n```\r\n{{MyTiddler}}\r\n{{MyTiddler||TemplateTitle}}\r\n```\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nexports.name = \"transcludeblock\";\r\nexports.types = {block: true};\r\n\r\nexports.init = function(parser) {\r\n\tthis.parser = parser;\r\n\t// Regexp to match\r\n\tthis.matchRegExp = /\\{\\{([^\\{\\}\\|]*)(?:\\|\\|([^\\|\\{\\}]+))?\\}\\}(?:\\r?\\n|$)/mg;\r\n};\r\n\r\nexports.parse = function() {\r\n\t// Move past the match\r\n\tthis.parser.pos = this.matchRegExp.lastIndex;\r\n\t// Move past the match\r\n\tthis.parser.pos = this.matchRegExp.lastIndex;\r\n\t// Get the match details\r\n\tvar template = $tw.utils.trim(this.match[2]),\r\n\t\ttextRef = $tw.utils.trim(this.match[1]);\r\n\t// Prepare the transclude widget\r\n\tvar transcludeNode = {\r\n\t\t\ttype: \"transclude\",\r\n\t\t\tattributes: {},\r\n\t\t\tisBlock: true\r\n\t\t};\r\n\t// Prepare the tiddler widget\r\n\tvar tr, targetTitle, targetField, targetIndex, tiddlerNode;\r\n\tif(textRef) {\r\n\t\ttr = $tw.utils.parseTextReference(textRef);\r\n\t\ttargetTitle = tr.title;\r\n\t\ttargetField = tr.field;\r\n\t\ttargetIndex = tr.index;\r\n\t\ttiddlerNode = {\r\n\t\t\ttype: \"tiddler\",\r\n\t\t\tattributes: {\r\n\t\t\t\ttiddler: {type: \"string\", value: targetTitle}\r\n\t\t\t},\r\n\t\t\tisBlock: true,\r\n\t\t\tchildren: [transcludeNode]\r\n\t\t};\r\n\t}\r\n\tif(template) {\r\n\t\ttranscludeNode.attributes.tiddler = {type: \"string\", value: template};\r\n\t\tif(textRef) {\r\n\t\t\treturn [tiddlerNode];\r\n\t\t} else {\r\n\t\t\treturn [transcludeNode];\r\n\t\t}\r\n\t} else {\r\n\t\tif(textRef) {\r\n\t\t\ttranscludeNode.attributes.tiddler = {type: \"string\", value: targetTitle};\r\n\t\t\tif(targetField) {\r\n\t\t\t\ttranscludeNode.attributes.field = {type: \"string\", value: targetField};\r\n\t\t\t}\r\n\t\t\tif(targetIndex) {\r\n\t\t\t\ttranscludeNode.attributes.index = {type: \"string\", value: targetIndex};\r\n\t\t\t}\r\n\t\t\treturn [tiddlerNode];\r\n\t\t} else {\r\n\t\t\treturn [transcludeNode];\r\n\t\t}\r\n\t}\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/parsers/wikiparser/rules/transcludeblock.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/transcludeinline.js": {
"text": "/*\\\r\ntitle: $:/core/modules/parsers/wikiparser/rules/transcludeinline.js\r\ntype: application/javascript\r\nmodule-type: wikirule\r\n\r\nWiki text rule for inline-level transclusion. For example:\r\n\r\n```\r\n{{MyTiddler}}\r\n{{MyTiddler||TemplateTitle}}\r\n```\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nexports.name = \"transcludeinline\";\r\nexports.types = {inline: true};\r\n\r\nexports.init = function(parser) {\r\n\tthis.parser = parser;\r\n\t// Regexp to match\r\n\tthis.matchRegExp = /\\{\\{([^\\{\\}\\|]*)(?:\\|\\|([^\\|\\{\\}]+))?\\}\\}/mg;\r\n};\r\n\r\nexports.parse = function() {\r\n\t// Move past the match\r\n\tthis.parser.pos = this.matchRegExp.lastIndex;\r\n\t// Get the match details\r\n\tvar template = $tw.utils.trim(this.match[2]),\r\n\t\ttextRef = $tw.utils.trim(this.match[1]);\r\n\t// Prepare the transclude widget\r\n\tvar transcludeNode = {\r\n\t\t\ttype: \"transclude\",\r\n\t\t\tattributes: {}\r\n\t\t};\r\n\t// Prepare the tiddler widget\r\n\tvar tr, targetTitle, targetField, targetIndex, tiddlerNode;\r\n\tif(textRef) {\r\n\t\ttr = $tw.utils.parseTextReference(textRef);\r\n\t\ttargetTitle = tr.title;\r\n\t\ttargetField = tr.field;\r\n\t\ttargetIndex = tr.index;\r\n\t\ttiddlerNode = {\r\n\t\t\ttype: \"tiddler\",\r\n\t\t\tattributes: {\r\n\t\t\t\ttiddler: {type: \"string\", value: targetTitle}\r\n\t\t\t},\r\n\t\t\tchildren: [transcludeNode]\r\n\t\t};\r\n\t}\r\n\tif(template) {\r\n\t\ttranscludeNode.attributes.tiddler = {type: \"string\", value: template};\r\n\t\tif(textRef) {\r\n\t\t\treturn [tiddlerNode];\r\n\t\t} else {\r\n\t\t\treturn [transcludeNode];\r\n\t\t}\r\n\t} else {\r\n\t\tif(textRef) {\r\n\t\t\ttranscludeNode.attributes.tiddler = {type: \"string\", value: targetTitle};\r\n\t\t\tif(targetField) {\r\n\t\t\t\ttranscludeNode.attributes.field = {type: \"string\", value: targetField};\r\n\t\t\t}\r\n\t\t\tif(targetIndex) {\r\n\t\t\t\ttranscludeNode.attributes.index = {type: \"string\", value: targetIndex};\r\n\t\t\t}\r\n\t\t\treturn [tiddlerNode];\r\n\t\t} else {\r\n\t\t\treturn [transcludeNode];\r\n\t\t}\r\n\t}\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/parsers/wikiparser/rules/transcludeinline.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/typedblock.js": {
"text": "/*\\\r\ntitle: $:/core/modules/parsers/wikiparser/rules/typedblock.js\r\ntype: application/javascript\r\nmodule-type: wikirule\r\n\r\nWiki text rule for typed blocks. For example:\r\n\r\n```\r\n$$$.js\r\nThis will be rendered as JavaScript\r\n$$$\r\n\r\n$$$.svg\r\n<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"150\" height=\"100\">\r\n <circle cx=\"100\" cy=\"50\" r=\"40\" stroke=\"black\" stroke-width=\"2\" fill=\"red\" />\r\n</svg>\r\n$$$\r\n\r\n$$$text/vnd.tiddlywiki>text/html\r\nThis will be rendered as an //HTML representation// of WikiText\r\n$$$\r\n```\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar widget = require(\"$:/core/modules/widgets/widget.js\");\r\n\r\nexports.name = \"typedblock\";\r\nexports.types = {block: true};\r\n\r\nexports.init = function(parser) {\r\n\tthis.parser = parser;\r\n\t// Regexp to match\r\n\tthis.matchRegExp = /\\$\\$\\$([^ >\\r\\n]*)(?: *> *([^ \\r\\n]+))?\\r?\\n/mg;\r\n};\r\n\r\nexports.parse = function() {\r\n\tvar reEnd = /\\r?\\n\\$\\$\\$\\r?(?:\\n|$)/mg;\r\n\t// Save the type\r\n\tvar parseType = this.match[1],\r\n\t\trenderType = this.match[2];\r\n\t// Move past the match\r\n\tthis.parser.pos = this.matchRegExp.lastIndex;\r\n\t// Look for the end of the block\r\n\treEnd.lastIndex = this.parser.pos;\r\n\tvar match = reEnd.exec(this.parser.source),\r\n\t\ttext;\r\n\t// Process the block\r\n\tif(match) {\r\n\t\ttext = this.parser.source.substring(this.parser.pos,match.index);\r\n\t\tthis.parser.pos = match.index + match[0].length;\r\n\t} else {\r\n\t\ttext = this.parser.source.substr(this.parser.pos);\r\n\t\tthis.parser.pos = this.parser.sourceLength;\r\n\t}\r\n\t// Parse the block according to the specified type\r\n\tvar parser = this.parser.wiki.parseText(parseType,text,{defaultType: \"text/plain\"});\r\n\t// If there's no render type, just return the parse tree\r\n\tif(!renderType) {\r\n\t\treturn parser.tree;\r\n\t} else {\r\n\t\t// Otherwise, render to the rendertype and return in a <PRE> tag\r\n\t\tvar widgetNode = this.parser.wiki.makeWidget(parser),\r\n\t\t\tcontainer = $tw.fakeDocument.createElement(\"div\");\r\n\t\twidgetNode.render(container,null);\r\n\t\ttext = renderType === \"text/html\" ? container.innerHTML : container.textContent;\r\n\t\treturn [{\r\n\t\t\ttype: \"element\",\r\n\t\t\ttag: \"pre\",\r\n\t\t\tchildren: [{\r\n\t\t\t\ttype: \"text\",\r\n\t\t\t\ttext: text\r\n\t\t\t}]\r\n\t\t}];\r\n\t}\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/parsers/wikiparser/rules/typedblock.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/wikilink.js": {
"text": "/*\\\r\ntitle: $:/core/modules/parsers/wikiparser/rules/wikilink.js\r\ntype: application/javascript\r\nmodule-type: wikirule\r\n\r\nWiki text inline rule for wiki links. For example:\r\n\r\n```\r\nAWikiLink\r\nAnotherLink\r\n~SuppressedLink\r\n```\r\n\r\nPrecede a camel case word with `~` to prevent it from being recognised as a link.\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nexports.name = \"wikilink\";\r\nexports.types = {inline: true};\r\n\r\nexports.init = function(parser) {\r\n\tthis.parser = parser;\r\n\t// Regexp to match\r\n\tthis.matchRegExp = new RegExp($tw.config.textPrimitives.unWikiLink + \"?\" + $tw.config.textPrimitives.wikiLink,\"mg\");\r\n};\r\n\r\n/*\r\nParse the most recent match\r\n*/\r\nexports.parse = function() {\r\n\t// Get the details of the match\r\n\tvar linkText = this.match[0];\r\n\t// Move past the macro call\r\n\tthis.parser.pos = this.matchRegExp.lastIndex;\r\n\t// If the link starts with the unwikilink character then just output it as plain text\r\n\tif(linkText.substr(0,1) === $tw.config.textPrimitives.unWikiLink) {\r\n\t\treturn [{type: \"text\", text: linkText.substr(1)}];\r\n\t}\r\n\t// If the link has been preceded with a blocked letter then don't treat it as a link\r\n\tif(this.match.index > 0) {\r\n\t\tvar preRegExp = new RegExp($tw.config.textPrimitives.blockPrefixLetters,\"mg\");\r\n\t\tpreRegExp.lastIndex = this.match.index-1;\r\n\t\tvar preMatch = preRegExp.exec(this.parser.source);\r\n\t\tif(preMatch && preMatch.index === this.match.index-1) {\r\n\t\t\treturn [{type: \"text\", text: linkText}];\r\n\t\t}\r\n\t}\r\n\treturn [{\r\n\t\ttype: \"link\",\r\n\t\tattributes: {\r\n\t\t\tto: {type: \"string\", value: linkText}\r\n\t\t},\r\n\t\tchildren: [{\r\n\t\t\ttype: \"text\",\r\n\t\t\ttext: linkText\r\n\t\t}]\r\n\t}];\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/parsers/wikiparser/rules/wikilink.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/wikiparser.js": {
"text": "/*\\\r\ntitle: $:/core/modules/parsers/wikiparser/wikiparser.js\r\ntype: application/javascript\r\nmodule-type: parser\r\n\r\nThe wiki text parser processes blocks of source text into a parse tree.\r\n\r\nThe parse tree is made up of nested arrays of these JavaScript objects:\r\n\r\n\t{type: \"element\", tag: <string>, attributes: {}, children: []} - an HTML element\r\n\t{type: \"text\", text: <string>} - a text node\r\n\t{type: \"entity\", value: <string>} - an entity\r\n\t{type: \"raw\", html: <string>} - raw HTML\r\n\r\nAttributes are stored as hashmaps of the following objects:\r\n\r\n\t{type: \"string\", value: <string>} - literal string\r\n\t{type: \"indirect\", textReference: <textReference>} - indirect through a text reference\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar WikiParser = function(type,text,options) {\r\n\tthis.wiki = options.wiki;\r\n\t// Initialise the classes if we don't have them already\r\n\tif(!this.pragmaRuleClasses) {\r\n\t\tWikiParser.prototype.pragmaRuleClasses = $tw.modules.createClassesFromModules(\"wikirule\",\"pragma\",$tw.WikiRuleBase);\r\n\t}\r\n\tif(!this.blockRuleClasses) {\r\n\t\tWikiParser.prototype.blockRuleClasses = $tw.modules.createClassesFromModules(\"wikirule\",\"block\",$tw.WikiRuleBase);\r\n\t}\r\n\tif(!this.inlineRuleClasses) {\r\n\t\tWikiParser.prototype.inlineRuleClasses = $tw.modules.createClassesFromModules(\"wikirule\",\"inline\",$tw.WikiRuleBase);\r\n\t}\r\n\t// Save the parse text\r\n\tthis.type = type || \"text/vnd.tiddlywiki\";\r\n\tthis.source = text || \"\";\r\n\tthis.sourceLength = this.source.length;\r\n\t// Set current parse position\r\n\tthis.pos = 0;\r\n\t// Instantiate the pragma parse rules\r\n\tthis.pragmaRules = this.instantiateRules(this.pragmaRuleClasses,\"pragma\",0);\r\n\t// Instantiate the parser block and inline rules\r\n\tthis.blockRules = this.instantiateRules(this.blockRuleClasses,\"block\",0);\r\n\tthis.inlineRules = this.instantiateRules(this.inlineRuleClasses,\"inline\",0);\r\n\t// Parse any pragmas\r\n\tthis.tree = this.parsePragmas();\r\n\t// Parse the text into inline runs or blocks\r\n\tif(options.parseAsInline) {\r\n\t\tthis.tree.push.apply(this.tree,this.parseInlineRun());\r\n\t} else {\r\n\t\tthis.tree.push.apply(this.tree,this.parseBlocks());\r\n\t}\r\n\t// Return the parse tree\r\n};\r\n\r\n/*\r\nInstantiate an array of parse rules\r\n*/\r\nWikiParser.prototype.instantiateRules = function(classes,type,startPos) {\r\n\tvar rulesInfo = [],\r\n\t\tself = this;\r\n\t$tw.utils.each(classes,function(RuleClass) {\r\n\t\t// Instantiate the rule\r\n\t\tvar rule = new RuleClass(self);\r\n\t\trule.is = {};\r\n\t\trule.is[type] = true;\r\n\t\trule.init(self);\r\n\t\tvar matchIndex = rule.findNextMatch(startPos);\r\n\t\tif(matchIndex !== undefined) {\r\n\t\t\trulesInfo.push({\r\n\t\t\t\trule: rule,\r\n\t\t\t\tmatchIndex: matchIndex\r\n\t\t\t});\r\n\t\t}\r\n\t});\r\n\treturn rulesInfo;\r\n};\r\n\r\n/*\r\nSkip any whitespace at the current position. Options are:\r\n\ttreatNewlinesAsNonWhitespace: true if newlines are NOT to be treated as whitespace\r\n*/\r\nWikiParser.prototype.skipWhitespace = function(options) {\r\n\toptions = options || {};\r\n\tvar whitespaceRegExp = options.treatNewlinesAsNonWhitespace ? /([^\\S\\n]+)/mg : /(\\s+)/mg;\r\n\twhitespaceRegExp.lastIndex = this.pos;\r\n\tvar whitespaceMatch = whitespaceRegExp.exec(this.source);\r\n\tif(whitespaceMatch && whitespaceMatch.index === this.pos) {\r\n\t\tthis.pos = whitespaceRegExp.lastIndex;\r\n\t}\r\n};\r\n\r\n/*\r\nGet the next match out of an array of parse rule instances\r\n*/\r\nWikiParser.prototype.findNextMatch = function(rules,startPos) {\r\n\t// Find the best matching rule by finding the closest match position\r\n\tvar matchingRule,\r\n\t\tmatchingRulePos = this.sourceLength;\r\n\t// Step through each rule\r\n\tfor(var t=0; t<rules.length; t++) {\r\n\t\tvar ruleInfo = rules[t];\r\n\t\t// Ask the rule to get the next match if we've moved past the current one\r\n\t\tif(ruleInfo.matchIndex !== undefined && ruleInfo.matchIndex < startPos) {\r\n\t\t\truleInfo.matchIndex = ruleInfo.rule.findNextMatch(startPos);\r\n\t\t}\r\n\t\t// Adopt this match if it's closer than the current best match\r\n\t\tif(ruleInfo.matchIndex !== undefined && ruleInfo.matchIndex <= matchingRulePos) {\r\n\t\t\tmatchingRule = ruleInfo;\r\n\t\t\tmatchingRulePos = ruleInfo.matchIndex;\r\n\t\t}\r\n\t}\r\n\treturn matchingRule;\r\n};\r\n\r\n/*\r\nParse any pragmas at the beginning of a block of parse text\r\n*/\r\nWikiParser.prototype.parsePragmas = function() {\r\n\tvar tree = [];\r\n\twhile(true) {\r\n\t\t// Skip whitespace\r\n\t\tthis.skipWhitespace();\r\n\t\t// Check for the end of the text\r\n\t\tif(this.pos >= this.sourceLength) {\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t// Check if we've arrived at a pragma rule match\r\n\t\tvar nextMatch = this.findNextMatch(this.pragmaRules,this.pos);\r\n\t\t// If not, just exit\r\n\t\tif(!nextMatch || nextMatch.matchIndex !== this.pos) {\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t// Process the pragma rule\r\n\t\ttree.push.apply(tree,nextMatch.rule.parse());\r\n\t}\r\n\treturn tree;\r\n};\r\n\r\n/*\r\nParse a block from the current position\r\n\tterminatorRegExpString: optional regular expression string that identifies the end of plain paragraphs. Must not include capturing parenthesis\r\n*/\r\nWikiParser.prototype.parseBlock = function(terminatorRegExpString) {\r\n\tvar terminatorRegExp = terminatorRegExpString ? new RegExp(\"(\" + terminatorRegExpString + \"|\\\\r?\\\\n\\\\r?\\\\n)\",\"mg\") : /(\\r?\\n\\r?\\n)/mg;\r\n\tthis.skipWhitespace();\r\n\tif(this.pos >= this.sourceLength) {\r\n\t\treturn [];\r\n\t}\r\n\t// Look for a block rule that applies at the current position\r\n\tvar nextMatch = this.findNextMatch(this.blockRules,this.pos);\r\n\tif(nextMatch && nextMatch.matchIndex === this.pos) {\r\n\t\treturn nextMatch.rule.parse();\r\n\t}\r\n\t// Treat it as a paragraph if we didn't find a block rule\r\n\treturn [{type: \"element\", tag: \"p\", children: this.parseInlineRun(terminatorRegExp)}];\r\n};\r\n\r\n/*\r\nParse a series of blocks of text until a terminating regexp is encountered or the end of the text\r\n\tterminatorRegExpString: terminating regular expression\r\n*/\r\nWikiParser.prototype.parseBlocks = function(terminatorRegExpString) {\r\n\tif(terminatorRegExpString) {\r\n\t\treturn this.parseBlocksTerminated(terminatorRegExpString);\r\n\t} else {\r\n\t\treturn this.parseBlocksUnterminated();\r\n\t}\r\n};\r\n\r\n/*\r\nParse a block from the current position to the end of the text\r\n*/\r\nWikiParser.prototype.parseBlocksUnterminated = function() {\r\n\tvar tree = [];\r\n\twhile(this.pos < this.sourceLength) {\r\n\t\ttree.push.apply(tree,this.parseBlock());\r\n\t}\r\n\treturn tree;\r\n};\r\n\r\n/*\r\nParse blocks of text until a terminating regexp is encountered\r\n*/\r\nWikiParser.prototype.parseBlocksTerminated = function(terminatorRegExpString) {\r\n\tvar terminatorRegExp = new RegExp(\"(\" + terminatorRegExpString + \")\",\"mg\"),\r\n\t\ttree = [];\r\n\t// Skip any whitespace\r\n\tthis.skipWhitespace();\r\n\t// Check if we've got the end marker\r\n\tterminatorRegExp.lastIndex = this.pos;\r\n\tvar match = terminatorRegExp.exec(this.source);\r\n\t// Parse the text into blocks\r\n\twhile(this.pos < this.sourceLength && !(match && match.index === this.pos)) {\r\n\t\tvar blocks = this.parseBlock(terminatorRegExpString);\r\n\t\ttree.push.apply(tree,blocks);\r\n\t\t// Skip any whitespace\r\n\t\tthis.skipWhitespace();\r\n\t\t// Check if we've got the end marker\r\n\t\tterminatorRegExp.lastIndex = this.pos;\r\n\t\tmatch = terminatorRegExp.exec(this.source);\r\n\t}\r\n\tif(match && match.index === this.pos) {\r\n\t\tthis.pos = match.index + match[0].length;\r\n\t}\r\n\treturn tree;\r\n};\r\n\r\n/*\r\nParse a run of text at the current position\r\n\tterminatorRegExp: a regexp at which to stop the run\r\n\toptions: see below\r\nOptions available:\r\n\teatTerminator: move the parse position past any encountered terminator (default false)\r\n*/\r\nWikiParser.prototype.parseInlineRun = function(terminatorRegExp,options) {\r\n\tif(terminatorRegExp) {\r\n\t\treturn this.parseInlineRunTerminated(terminatorRegExp,options);\r\n\t} else {\r\n\t\treturn this.parseInlineRunUnterminated(options);\r\n\t}\r\n};\r\n\r\nWikiParser.prototype.parseInlineRunUnterminated = function(options) {\r\n\tvar tree = [];\r\n\t// Find the next occurrence of an inline rule\r\n\tvar nextMatch = this.findNextMatch(this.inlineRules,this.pos);\r\n\t// Loop around the matches until we've reached the end of the text\r\n\twhile(this.pos < this.sourceLength && nextMatch) {\r\n\t\t// Process the text preceding the run rule\r\n\t\tif(nextMatch.matchIndex > this.pos) {\r\n\t\t\ttree.push({type: \"text\", text: this.source.substring(this.pos,nextMatch.matchIndex)});\r\n\t\t\tthis.pos = nextMatch.matchIndex;\r\n\t\t}\r\n\t\t// Process the run rule\r\n\t\ttree.push.apply(tree,nextMatch.rule.parse());\r\n\t\t// Look for the next run rule\r\n\t\tnextMatch = this.findNextMatch(this.inlineRules,this.pos);\r\n\t}\r\n\t// Process the remaining text\r\n\tif(this.pos < this.sourceLength) {\r\n\t\ttree.push({type: \"text\", text: this.source.substr(this.pos)});\r\n\t}\r\n\tthis.pos = this.sourceLength;\r\n\treturn tree;\r\n};\r\n\r\nWikiParser.prototype.parseInlineRunTerminated = function(terminatorRegExp,options) {\r\n\toptions = options || {};\r\n\tvar tree = [];\r\n\t// Find the next occurrence of the terminator\r\n\tterminatorRegExp.lastIndex = this.pos;\r\n\tvar terminatorMatch = terminatorRegExp.exec(this.source);\r\n\t// Find the next occurrence of a inlinerule\r\n\tvar inlineRuleMatch = this.findNextMatch(this.inlineRules,this.pos);\r\n\t// Loop around until we've reached the end of the text\r\n\twhile(this.pos < this.sourceLength && (terminatorMatch || inlineRuleMatch)) {\r\n\t\t// Return if we've found the terminator, and it precedes any inline rule match\r\n\t\tif(terminatorMatch) {\r\n\t\t\tif(!inlineRuleMatch || inlineRuleMatch.matchIndex >= terminatorMatch.index) {\r\n\t\t\t\tif(terminatorMatch.index > this.pos) {\r\n\t\t\t\t\ttree.push({type: \"text\", text: this.source.substring(this.pos,terminatorMatch.index)});\r\n\t\t\t\t}\r\n\t\t\t\tthis.pos = terminatorMatch.index;\r\n\t\t\t\tif(options.eatTerminator) {\r\n\t\t\t\t\tthis.pos += terminatorMatch[0].length;\r\n\t\t\t\t}\r\n\t\t\t\treturn tree;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Process any inline rule, along with the text preceding it\r\n\t\tif(inlineRuleMatch) {\r\n\t\t\t// Preceding text\r\n\t\t\tif(inlineRuleMatch.matchIndex > this.pos) {\r\n\t\t\t\ttree.push({type: \"text\", text: this.source.substring(this.pos,inlineRuleMatch.matchIndex)});\r\n\t\t\t\tthis.pos = inlineRuleMatch.matchIndex;\r\n\t\t\t}\r\n\t\t\t// Process the inline rule\r\n\t\t\ttree.push.apply(tree,inlineRuleMatch.rule.parse());\r\n\t\t\t// Look for the next inline rule\r\n\t\t\tinlineRuleMatch = this.findNextMatch(this.inlineRules,this.pos);\r\n\t\t\t// Look for the next terminator match\r\n\t\t\tterminatorRegExp.lastIndex = this.pos;\r\n\t\t\tterminatorMatch = terminatorRegExp.exec(this.source);\r\n\t\t}\r\n\t}\r\n\t// Process the remaining text\r\n\tif(this.pos < this.sourceLength) {\r\n\t\ttree.push({type: \"text\", text: this.source.substr(this.pos)});\r\n\t}\r\n\tthis.pos = this.sourceLength;\r\n\treturn tree;\r\n};\r\n\r\n/*\r\nParse zero or more class specifiers `.classname`\r\n*/\r\nWikiParser.prototype.parseClasses = function() {\r\n\tvar classRegExp = /\\.([^\\s\\.]+)/mg,\r\n\t\tclassNames = [];\r\n\tclassRegExp.lastIndex = this.pos;\r\n\tvar match = classRegExp.exec(this.source);\r\n\twhile(match && match.index === this.pos) {\r\n\t\tthis.pos = match.index + match[0].length;\r\n\t\tclassNames.push(match[1]);\r\n\t\tmatch = classRegExp.exec(this.source);\r\n\t}\r\n\treturn classNames;\r\n};\r\n\r\n/*\r\nAmend the rules used by this instance of the parser\r\n\ttype: `only` keeps just the named rules, `except` keeps all but the named rules\r\n\tnames: array of rule names\r\n*/\r\nWikiParser.prototype.amendRules = function(type,names) {\r\n\tnames = names || [];\r\n\t// Define the filter function\r\n\tvar keepFilter;\r\n\tif(type === \"only\") {\r\n\t\tkeepFilter = function(name) {\r\n\t\t\treturn names.indexOf(name) !== -1;\r\n\t\t};\r\n\t} else if(type === \"except\") {\r\n\t\tkeepFilter = function(name) {\r\n\t\t\treturn names.indexOf(name) === -1;\r\n\t\t};\r\n\t} else {\r\n\t\treturn;\r\n\t}\r\n\t// Define a function to process each of our rule arrays\r\n\tvar processRuleArray = function(ruleArray) {\r\n\t\tfor(var t=ruleArray.length-1; t>=0; t--) {\r\n\t\t\tif(!keepFilter(ruleArray[t].rule.name)) {\r\n\t\t\t\truleArray.splice(t,1);\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\t// Process each rule array\r\n\tprocessRuleArray(this.pragmaRules);\r\n\tprocessRuleArray(this.blockRules);\r\n\tprocessRuleArray(this.inlineRules);\r\n};\r\n\r\nexports[\"text/vnd.tiddlywiki\"] = WikiParser;\r\n\r\n})();\r\n\r\n",
"title": "$:/core/modules/parsers/wikiparser/wikiparser.js",
"type": "application/javascript",
"module-type": "parser"
},
"$:/core/modules/parsers/wikiparser/rules/wikirulebase.js": {
"text": "/*\\\r\ntitle: $:/core/modules/parsers/wikiparser/rules/wikirulebase.js\r\ntype: application/javascript\r\nmodule-type: global\r\n\r\nBase class for wiki parser rules\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nThis constructor is always overridden with a blank constructor, and so shouldn't be used\r\n*/\r\nvar WikiRuleBase = function() {\r\n};\r\n\r\n/*\r\nTo be overridden by individual rules\r\n*/\r\nWikiRuleBase.prototype.init = function(parser) {\r\n\tthis.parser = parser;\r\n};\r\n\r\n/*\r\nDefault implementation of findNextMatch uses RegExp matching\r\n*/\r\nWikiRuleBase.prototype.findNextMatch = function(startPos) {\r\n\tthis.matchRegExp.lastIndex = startPos;\r\n\tthis.match = this.matchRegExp.exec(this.parser.source);\r\n\treturn this.match ? this.match.index : undefined;\r\n};\r\n\r\nexports.WikiRuleBase = WikiRuleBase;\r\n\r\n})();\r\n",
"title": "$:/core/modules/parsers/wikiparser/rules/wikirulebase.js",
"type": "application/javascript",
"module-type": "global"
},
"$:/core/modules/pluginswitcher.js": {
"text": "/*\\\r\ntitle: $:/core/modules/pluginswitcher.js\r\ntype: application/javascript\r\nmodule-type: global\r\n\r\nManages switching plugins for themes and languages.\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\noptions:\r\nwiki: wiki store to be used\r\npluginType: type of plugin to be switched\r\ncontrollerTitle: title of tiddler used to control switching of this resource\r\ndefaultPlugins: array of default plugins to be used if nominated plugin isn't found\r\n*/\r\nfunction PluginSwitcher(options) {\r\n\tthis.wiki = options.wiki;\r\n\tthis.pluginType = options.pluginType;\r\n\tthis.controllerTitle = options.controllerTitle;\r\n\tthis.defaultPlugins = options.defaultPlugins || [];\r\n\t// Switch to the current plugin\r\n\tthis.switchPlugins();\r\n\t// Listen for changes to the selected plugin\r\n\tvar self = this;\r\n\tthis.wiki.addEventListener(\"change\",function(changes) {\r\n\t\tif($tw.utils.hop(changes,self.controllerTitle)) {\r\n\t\t\tself.switchPlugins();\r\n\t\t}\r\n\t});\r\n}\r\n\r\nPluginSwitcher.prototype.switchPlugins = function() {\r\n\t// Get the name of the current theme\r\n\tvar selectedPluginTitle = this.wiki.getTiddlerText(this.controllerTitle);\r\n\t// If it doesn't exist, then fallback to one of the default themes\r\n\tvar index = 0;\r\n\twhile(!this.wiki.getTiddler(selectedPluginTitle) && index < this.defaultPlugins.length) {\r\n\t\tselectedPluginTitle = this.defaultPlugins[index++];\r\n\t}\r\n\t// Accumulate the titles of the plugins that we need to load\r\n\tvar plugins = [],\r\n\t\tself = this,\r\n\t\taccumulatePlugin = function(title) {\r\n\t\t\tvar tiddler = self.wiki.getTiddler(title);\r\n\t\t\tif(tiddler && tiddler.isPlugin() && plugins.indexOf(title) === -1) {\r\n\t\t\t\tplugins.push(title);\r\n\t\t\t\tvar pluginInfo = JSON.parse(self.wiki.getTiddlerText(title)),\r\n\t\t\t\t\tdependents = $tw.utils.parseStringArray(tiddler.fields.dependents || \"\");\r\n\t\t\t\t$tw.utils.each(dependents,function(title) {\r\n\t\t\t\t\taccumulatePlugin(title);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t};\r\n\taccumulatePlugin(selectedPluginTitle);\r\n\t// Unregister any existing theme tiddlers\r\n\tvar unregisteredTiddlers = $tw.wiki.unregisterPluginTiddlers(this.pluginType);\r\n\t// Register any new theme tiddlers\r\n\tvar registeredTiddlers = $tw.wiki.registerPluginTiddlers(this.pluginType,plugins);\r\n\t// Unpack the current theme tiddlers\r\n\t$tw.wiki.unpackPluginTiddlers();\r\n};\r\n\r\nexports.PluginSwitcher = PluginSwitcher;\r\n\r\n})();\r\n",
"title": "$:/core/modules/pluginswitcher.js",
"type": "application/javascript",
"module-type": "global"
},
"$:/core/modules/saver-handler.js": {
"text": "/*\\\r\ntitle: $:/core/modules/saver-handler.js\r\ntype: application/javascript\r\nmodule-type: global\r\n\r\nThe saver handler tracks changes to the store and handles saving the entire wiki via saver modules.\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nInstantiate the saver handler with the following options:\r\nwiki: wiki to be synced\r\ndirtyTracking: true if dirty tracking should be performed\r\n*/\r\nfunction SaverHandler(options) {\r\n\tvar self = this;\r\n\tthis.wiki = options.wiki;\r\n\tthis.dirtyTracking = options.dirtyTracking;\r\n\tthis.pendingAutoSave = false;\r\n\t// Make a logger\r\n\tthis.logger = new $tw.utils.Logger(\"saver-handler\");\r\n\t// Initialise our savers\r\n\tif($tw.browser) {\r\n\t\tthis.initSavers();\r\n\t}\r\n\t// Only do dirty tracking if required\r\n\tif($tw.browser && this.dirtyTracking) {\r\n\t\t// Compile the dirty tiddler filter\r\n\t\tthis.filterFn = this.wiki.compileFilter(this.wiki.getTiddlerText(this.titleSyncFilter));\r\n\t\t// Count of changes that have not yet been saved\r\n\t\tthis.numChanges = 0;\r\n\t\t// Listen out for changes to tiddlers\r\n\t\tthis.wiki.addEventListener(\"change\",function(changes) {\r\n\t\t\t// Filter the changes so that we only count changes to tiddlers that we care about\r\n\t\t\tvar filteredChanges = self.filterFn.call(self.wiki,function(callback) {\r\n\t\t\t\t$tw.utils.each(changes,function(change,title) {\r\n\t\t\t\t\tvar tiddler = self.wiki.getTiddler(title);\r\n\t\t\t\t\tcallback(tiddler,title);\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\t// Adjust the number of changes\r\n\t\t\tself.numChanges += filteredChanges.length;\r\n\t\t\tself.updateDirtyStatus();\r\n\t\t\t// Do any autosave if one is pending and there's no more change events\r\n\t\t\tif(self.pendingAutoSave && self.wiki.getSizeOfTiddlerEventQueue() === 0) {\r\n\t\t\t\t// Check if we're dirty\r\n\t\t\t\tif(self.numChanges > 0) {\r\n\t\t\t\t\tself.saveWiki({\r\n\t\t\t\t\t\tmethod: \"autosave\",\r\n\t\t\t\t\t\tdownloadType: \"text/plain\"\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\tself.pendingAutoSave = false;\r\n\t\t\t}\r\n\t\t});\r\n\t\t// Listen for the autosave event\r\n\t\t$tw.rootWidget.addEventListener(\"tm-auto-save-wiki\",function(event) {\r\n\t\t\t// Do the autosave unless there are outstanding tiddler change events\r\n\t\t\tif(self.wiki.getSizeOfTiddlerEventQueue() === 0) {\r\n\t\t\t\t// Check if we're dirty\r\n\t\t\t\tif(self.numChanges > 0) {\r\n\t\t\t\t\tself.saveWiki({\r\n\t\t\t\t\t\tmethod: \"autosave\",\r\n\t\t\t\t\t\tdownloadType: \"text/plain\"\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t// Otherwise put ourselves in the \"pending autosave\" state and wait for the change event before we do the autosave\r\n\t\t\t\tself.pendingAutoSave = true;\r\n\t\t\t}\r\n\t\t});\r\n\t\t// Set up our beforeunload handler\r\n\t\twindow.onbeforeunload = function(event) {\r\n\t\t\tvar confirmationMessage;\r\n\t\t\tif(self.isDirty()) {\r\n\t\t\t\tconfirmationMessage = $tw.language.getString(\"UnsavedChangesWarning\");\r\n\t\t\t\tevent.returnValue = confirmationMessage; // Gecko\r\n\t\t\t}\r\n\t\t\treturn confirmationMessage;\r\n\t\t};\r\n\t}\r\n\t// Install the save action handlers\r\n\tif($tw.browser) {\r\n\t\t$tw.rootWidget.addEventListener(\"tm-save-wiki\",function(event) {\r\n\t\t\tself.saveWiki({\r\n\t\t\t\ttemplate: event.param,\r\n\t\t\t\tdownloadType: \"text/plain\",\r\n\t\t\t\tvariables: event.paramObject\r\n\t\t\t});\r\n\t\t});\r\n\t\t$tw.rootWidget.addEventListener(\"tm-download-file\",function(event) {\r\n\t\t\tself.saveWiki({\r\n\t\t\t\tmethod: \"download\",\r\n\t\t\t\ttemplate: event.param,\r\n\t\t\t\tdownloadType: \"text/plain\",\r\n\t\t\t\tvariables: event.paramObject\r\n\t\t\t});\r\n\t\t});\r\n\t}\r\n}\r\n\r\nSaverHandler.prototype.titleSyncFilter = \"$:/config/SaverFilter\";\r\nSaverHandler.prototype.titleAutoSave = \"$:/config/AutoSave\";\r\nSaverHandler.prototype.titleSavedNotification = \"$:/language/Notifications/Save/Done\";\r\n\r\n/*\r\nSelect the appropriate saver modules and set them up\r\n*/\r\nSaverHandler.prototype.initSavers = function(moduleType) {\r\n\tmoduleType = moduleType || \"saver\";\r\n\t// Instantiate the available savers\r\n\tthis.savers = [];\r\n\tvar self = this;\r\n\t$tw.modules.forEachModuleOfType(moduleType,function(title,module) {\r\n\t\tif(module.canSave(self)) {\r\n\t\t\tself.savers.push(module.create(self.wiki));\r\n\t\t}\r\n\t});\r\n\t// Sort the savers into priority order\r\n\tthis.savers.sort(function(a,b) {\r\n\t\tif(a.info.priority < b.info.priority) {\r\n\t\t\treturn -1;\r\n\t\t} else {\r\n\t\t\tif(a.info.priority > b.info.priority) {\r\n\t\t\t\treturn +1;\r\n\t\t\t} else {\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n};\r\n\r\n/*\r\nSave the wiki contents. Options are:\r\n\tmethod: \"save\", \"autosave\" or \"download\"\r\n\ttemplate: the tiddler containing the template to save\r\n\tdownloadType: the content type for the saved file\r\n*/\r\nSaverHandler.prototype.saveWiki = function(options) {\r\n\toptions = options || {};\r\n\tvar self = this,\r\n\t\tmethod = options.method || \"save\",\r\n\t\tvariables = options.variables || {},\r\n\t\ttemplate = options.template || \"$:/core/save/all\",\r\n\t\tdownloadType = options.downloadType || \"text/plain\",\r\n\t\ttext = this.wiki.renderTiddler(downloadType,template,options),\r\n\t\tcallback = function(err) {\r\n\t\t\tif(err) {\r\n\t\t\t\talert(\"Error while saving:\\n\\n\" + err);\r\n\t\t\t} else {\r\n\t\t\t\t// Clear the task queue if we're saving (rather than downloading)\r\n\t\t\t\tif(method !== \"download\") {\r\n\t\t\t\t\tself.numChanges = 0;\r\n\t\t\t\t\tself.updateDirtyStatus();\r\n\t\t\t\t}\r\n\t\t\t\t$tw.notifier.display(self.titleSavedNotification);\r\n\t\t\t\tif(options.callback) {\r\n\t\t\t\t\toptions.callback();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t// Ignore autosave if disabled\r\n\tif(method === \"autosave\" && this.wiki.getTiddlerText(this.titleAutoSave,\"yes\") !== \"yes\") {\r\n\t\treturn false;\r\n\t}\r\n\t// Call the highest priority saver that supports this method\r\n\tfor(var t=this.savers.length-1; t>=0; t--) {\r\n\t\tvar saver = this.savers[t];\r\n\t\tif(saver.info.capabilities.indexOf(method) !== -1 && saver.save(text,method,callback,{variables: {filename: variables.filename}})) {\r\n\t\t\tthis.logger.log(\"Saving wiki with method\",method,\"through saver\",saver.info.name);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}\r\n\treturn false;\r\n};\r\n\r\n/*\r\nChecks whether the wiki is dirty (ie the window shouldn't be closed)\r\n*/\r\nSaverHandler.prototype.isDirty = function() {\r\n\treturn this.numChanges > 0;\r\n};\r\n\r\n/*\r\nUpdate the document body with the class \"tc-dirty\" if the wiki has unsaved/unsynced changes\r\n*/\r\nSaverHandler.prototype.updateDirtyStatus = function() {\r\n\tif($tw.browser) {\r\n\t\t$tw.utils.toggleClass(document.body,\"tc-dirty\",this.isDirty());\r\n\t}\r\n};\r\n\r\nexports.SaverHandler = SaverHandler;\r\n\r\n})();\r\n",
"title": "$:/core/modules/saver-handler.js",
"type": "application/javascript",
"module-type": "global"
},
"$:/core/modules/savers/andtidwiki.js": {
"text": "/*\\\r\ntitle: $:/core/modules/savers/andtidwiki.js\r\ntype: application/javascript\r\nmodule-type: saver\r\n\r\nHandles saving changes via the AndTidWiki Android app\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false, netscape: false, Components: false */\r\n\"use strict\";\r\n\r\nvar AndTidWiki = function(wiki) {\r\n};\r\n\r\nAndTidWiki.prototype.save = function(text,method,callback) {\r\n\t// Get the pathname of this document\r\n\tvar pathname = decodeURIComponent(document.location.toString().split(\"#\")[0]);\r\n\t// Strip the file://\r\n\tif(pathname.indexOf(\"file://\") === 0) {\r\n\t\tpathname = pathname.substr(7);\r\n\t}\r\n\t// Strip any query or location part\r\n\tvar p = pathname.indexOf(\"?\");\r\n\tif(p !== -1) {\r\n\t\tpathname = pathname.substr(0,p);\r\n\t}\r\n\tp = pathname.indexOf(\"#\");\r\n\tif(p !== -1) {\r\n\t\tpathname = pathname.substr(0,p);\r\n\t}\r\n\t// Save the file\r\n\twindow.twi.saveFile(pathname,text);\r\n\t// Call the callback\r\n\tcallback(null);\r\n\treturn true;\r\n};\r\n\r\n/*\r\nInformation about this saver\r\n*/\r\nAndTidWiki.prototype.info = {\r\n\tname: \"andtidwiki\",\r\n\tpriority: 1600,\r\n\tcapabilities: [\"save\", \"autosave\"]\r\n};\r\n\r\n/*\r\nStatic method that returns true if this saver is capable of working\r\n*/\r\nexports.canSave = function(wiki) {\r\n\treturn !!window.twi && !!window.twi.saveFile;\r\n};\r\n\r\n/*\r\nCreate an instance of this saver\r\n*/\r\nexports.create = function(wiki) {\r\n\treturn new AndTidWiki(wiki);\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/savers/andtidwiki.js",
"type": "application/javascript",
"module-type": "saver"
},
"$:/core/modules/savers/download.js": {
"text": "/*\\\r\ntitle: $:/core/modules/savers/download.js\r\ntype: application/javascript\r\nmodule-type: saver\r\n\r\nHandles saving changes via HTML5's download APIs\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nSelect the appropriate saver module and set it up\r\n*/\r\nvar DownloadSaver = function(wiki) {\r\n};\r\n\r\nDownloadSaver.prototype.save = function(text,method,callback,options) {\r\n\toptions = options || {};\r\n\t// Get the current filename\r\n\tvar filename = options.variables.filename;\r\n\tif(!filename) {\r\n\t\tvar p = document.location.pathname.lastIndexOf(\"/\");\r\n\t\tif(p !== -1) {\r\n\t\t\tfilename = document.location.pathname.substr(p+1);\r\n\t\t}\r\n\t}\r\n\tif(!filename) {\r\n\t\tfilename = \"tiddlywiki.html\";\r\n\t}\r\n\t// Set up the link\r\n\tvar link = document.createElement(\"a\");\r\n\tlink.setAttribute(\"target\",\"_blank\");\r\n\tif(Blob !== undefined) {\r\n\t\tvar blob = new Blob([text], {type: \"text/html\"});\r\n\t\tlink.setAttribute(\"href\", URL.createObjectURL(blob));\r\n\t} else {\r\n\t\tlink.setAttribute(\"href\",\"data:text/html,\" + encodeURIComponent(text));\r\n\t}\r\n\tlink.setAttribute(\"download\",filename);\r\n\tdocument.body.appendChild(link);\r\n\tlink.click();\r\n\tdocument.body.removeChild(link);\r\n\t// Callback that we succeeded\r\n\tcallback(null);\r\n\treturn true;\r\n};\r\n\r\n/*\r\nInformation about this saver\r\n*/\r\nDownloadSaver.prototype.info = {\r\n\tname: \"download\",\r\n\tpriority: 100,\r\n\tcapabilities: [\"save\", \"download\"]\r\n};\r\n\r\n/*\r\nStatic method that returns true if this saver is capable of working\r\n*/\r\nexports.canSave = function(wiki) {\r\n\treturn document.createElement(\"a\").download !== undefined;\r\n};\r\n\r\n/*\r\nCreate an instance of this saver\r\n*/\r\nexports.create = function(wiki) {\r\n\treturn new DownloadSaver(wiki);\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/savers/download.js",
"type": "application/javascript",
"module-type": "saver"
},
"$:/core/modules/savers/fsosaver.js": {
"text": "/*\\\r\ntitle: $:/core/modules/savers/fsosaver.js\r\ntype: application/javascript\r\nmodule-type: saver\r\n\r\nHandles saving changes via MS FileSystemObject ActiveXObject\r\n\r\nNote: Since TiddlyWiki's markup contains the MOTW, the FileSystemObject normally won't be available. \r\nHowever, if the wiki is loaded as an .HTA file (Windows HTML Applications) then the FSO can be used.\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nSelect the appropriate saver module and set it up\r\n*/\r\nvar FSOSaver = function(wiki) {\r\n};\r\n\r\nFSOSaver.prototype.save = function(text,method,callback) {\r\n\t// Get the pathname of this document\r\n\tvar pathname = unescape(document.location.pathname);\r\n\t// Test for a Windows path of the form /x:\\blah...\r\n\tif(/^\\/[A-Z]\\:\\\\[^\\\\]+/i.test(pathname)) {\t// ie: ^/[a-z]:/[^/]+\r\n\t\t// Remove the leading slash\r\n\t\tpathname = pathname.substr(1);\r\n\t} else if(document.location.hostname !== \"\" && /^\\/\\\\[^\\\\]+\\\\[^\\\\]+/i.test(pathname)) {\t// test for \\\\server\\share\\blah... - ^/[^/]+/[^/]+\r\n\t\t// Remove the leading slash\r\n\t\tpathname = pathname.substr(1);\r\n\t\t// reconstruct UNC path\r\n\t\tpathname = \"\\\\\\\\\" + document.location.hostname + pathname;\r\n\t} else {\r\n\t\treturn false;\r\n\t}\r\n\t// Save the file (as UTF-16)\r\n\tvar fso = new ActiveXObject(\"Scripting.FileSystemObject\");\r\n\tvar file = fso.OpenTextFile(pathname,2,-1,-1);\r\n\tfile.Write(text);\r\n\tfile.Close();\r\n\t// Callback that we succeeded\r\n\tcallback(null);\r\n\treturn true;\r\n};\r\n\r\n/*\r\nInformation about this saver\r\n*/\r\nFSOSaver.prototype.info = {\r\n\tname: \"FSOSaver\",\r\n\tpriority: 120,\r\n\tcapabilities: [\"save\", \"autosave\"]\r\n};\r\n\r\n/*\r\nStatic method that returns true if this saver is capable of working\r\n*/\r\nexports.canSave = function(wiki) {\r\n\ttry {\r\n\t\treturn (window.location.protocol === \"file:\") && !!(new ActiveXObject(\"Scripting.FileSystemObject\"));\r\n\t} catch(e) { return false; }\r\n};\r\n\r\n/*\r\nCreate an instance of this saver\r\n*/\r\nexports.create = function(wiki) {\r\n\treturn new FSOSaver(wiki);\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/savers/fsosaver.js",
"type": "application/javascript",
"module-type": "saver"
},
"$:/core/modules/savers/manualdownload.js": {
"text": "/*\\\r\ntitle: $:/core/modules/savers/manualdownload.js\r\ntype: application/javascript\r\nmodule-type: saver\r\n\r\nHandles saving changes via HTML5's download APIs\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n// Title of the tiddler containing the download message\r\nvar downloadInstructionsTitle = \"$:/language/Modals/Download\";\r\n\r\n/*\r\nSelect the appropriate saver module and set it up\r\n*/\r\nvar ManualDownloadSaver = function(wiki) {\r\n};\r\n\r\nManualDownloadSaver.prototype.save = function(text,method,callback) {\r\n\t$tw.modal.display(downloadInstructionsTitle,{\r\n\t\tdownloadLink: \"data:text/html,\" + encodeURIComponent(text)\r\n\t});\r\n\t// Callback that we succeeded\r\n\tcallback(null);\r\n\treturn true;\r\n};\r\n\r\n/*\r\nInformation about this saver\r\n*/\r\nManualDownloadSaver.prototype.info = {\r\n\tname: \"manualdownload\",\r\n\tpriority: 0,\r\n\tcapabilities: [\"save\", \"download\"]\r\n};\r\n\r\n/*\r\nStatic method that returns true if this saver is capable of working\r\n*/\r\nexports.canSave = function(wiki) {\r\n\treturn true;\r\n};\r\n\r\n/*\r\nCreate an instance of this saver\r\n*/\r\nexports.create = function(wiki) {\r\n\treturn new ManualDownloadSaver(wiki);\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/savers/manualdownload.js",
"type": "application/javascript",
"module-type": "saver"
},
"$:/core/modules/savers/msdownload.js": {
"text": "/*\\\r\ntitle: $:/core/modules/savers/msdownload.js\r\ntype: application/javascript\r\nmodule-type: saver\r\n\r\nHandles saving changes via window.navigator.msSaveBlob()\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nSelect the appropriate saver module and set it up\r\n*/\r\nvar MsDownloadSaver = function(wiki) {\r\n};\r\n\r\nMsDownloadSaver.prototype.save = function(text,method,callback) {\r\n\t// Get the current filename\r\n\tvar filename = \"tiddlywiki.html\",\r\n\t\tp = document.location.pathname.lastIndexOf(\"/\");\r\n\tif(p !== -1) {\r\n\t\tfilename = document.location.pathname.substr(p+1);\r\n\t}\r\n\t// Set up the link\r\n\tvar blob = new Blob([text], {type: \"text/html\"});\r\n\twindow.navigator.msSaveBlob(blob,filename);\r\n\t// Callback that we succeeded\r\n\tcallback(null);\r\n\treturn true;\r\n};\r\n\r\n/*\r\nInformation about this saver\r\n*/\r\nMsDownloadSaver.prototype.info = {\r\n\tname: \"msdownload\",\r\n\tpriority: 110,\r\n\tcapabilities: [\"save\", \"download\"]\r\n};\r\n\r\n/*\r\nStatic method that returns true if this saver is capable of working\r\n*/\r\nexports.canSave = function(wiki) {\r\n\treturn !!window.navigator.msSaveBlob;\r\n};\r\n\r\n/*\r\nCreate an instance of this saver\r\n*/\r\nexports.create = function(wiki) {\r\n\treturn new MsDownloadSaver(wiki);\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/savers/msdownload.js",
"type": "application/javascript",
"module-type": "saver"
},
"$:/core/modules/savers/tiddlyfox.js": {
"text": "/*\\\r\ntitle: $:/core/modules/savers/tiddlyfox.js\r\ntype: application/javascript\r\nmodule-type: saver\r\n\r\nHandles saving changes via the TiddlyFox file extension\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false, netscape: false, Components: false */\r\n\"use strict\";\r\n\r\nvar TiddlyFoxSaver = function(wiki) {\r\n};\r\n\r\nTiddlyFoxSaver.prototype.save = function(text,method,callback) {\r\n\tvar messageBox = document.getElementById(\"tiddlyfox-message-box\");\r\n\tif(messageBox) {\r\n\t\t// Get the pathname of this document\r\n\t\tvar pathname = document.location.toString().split(\"#\")[0];\r\n\t\t// Replace file://localhost/ with file:///\r\n\t\tif(pathname.indexOf(\"file://localhost/\") === 0) {\r\n\t\t\tpathname = \"file://\" + pathname.substr(16);\r\n\t\t}\r\n\t\t// Windows path file:///x:/blah/blah --> x:\\blah\\blah\r\n\t\tif(/^file\\:\\/\\/\\/[A-Z]\\:\\//i.test(pathname)) {\r\n\t\t\t// Remove the leading slash and convert slashes to backslashes\r\n\t\t\tpathname = pathname.substr(8).replace(/\\//g,\"\\\\\");\r\n\t\t// Firefox Windows network path file://///server/share/blah/blah --> //server/share/blah/blah\r\n\t\t} else if(pathname.indexOf(\"file://///\") === 0) {\r\n\t\t\tpathname = \"\\\\\\\\\" + unescape(pathname.substr(10)).replace(/\\//g,\"\\\\\");\r\n\t\t// Mac/Unix local path file:///path/path --> /path/path\r\n\t\t} else if(pathname.indexOf(\"file:///\") === 0) {\r\n\t\t\tpathname = unescape(pathname.substr(7));\r\n\t\t// Mac/Unix local path file:/path/path --> /path/path\r\n\t\t} else if(pathname.indexOf(\"file:/\") === 0) {\r\n\t\t\tpathname = unescape(pathname.substr(5));\r\n\t\t// Otherwise Windows networth path file://server/share/path/path --> \\\\server\\share\\path\\path\r\n\t\t} else {\r\n\t\t\tpathname = \"\\\\\\\\\" + unescape(pathname.substr(7)).replace(new RegExp(\"/\",\"g\"),\"\\\\\");\r\n\t\t}\r\n\t\t// Create the message element and put it in the message box\r\n\t\tvar message = document.createElement(\"div\");\r\n\t\tmessage.setAttribute(\"data-tiddlyfox-path\",decodeURIComponent(pathname));\r\n\t\tmessage.setAttribute(\"data-tiddlyfox-content\",text);\r\n\t\tmessageBox.appendChild(message);\r\n\t\t// Add an event handler for when the file has been saved\r\n\t\tmessage.addEventListener(\"tiddlyfox-have-saved-file\",function(event) {\r\n\t\t\tcallback(null);\r\n\t\t}, false);\r\n\t\t// Create and dispatch the custom event to the extension\r\n\t\tvar event = document.createEvent(\"Events\");\r\n\t\tevent.initEvent(\"tiddlyfox-save-file\",true,false);\r\n\t\tmessage.dispatchEvent(event);\r\n\t\treturn true;\r\n\t} else {\r\n\t\treturn false;\r\n\t}\r\n};\r\n\r\n/*\r\nInformation about this saver\r\n*/\r\nTiddlyFoxSaver.prototype.info = {\r\n\tname: \"tiddlyfox\",\r\n\tpriority: 1500,\r\n\tcapabilities: [\"save\", \"autosave\"]\r\n};\r\n\r\n/*\r\nStatic method that returns true if this saver is capable of working\r\n*/\r\nexports.canSave = function(wiki) {\r\n\treturn (window.location.protocol === \"file:\");\r\n};\r\n\r\n/*\r\nCreate an instance of this saver\r\n*/\r\nexports.create = function(wiki) {\r\n\treturn new TiddlyFoxSaver(wiki);\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/savers/tiddlyfox.js",
"type": "application/javascript",
"module-type": "saver"
},
"$:/core/modules/savers/tiddlyie.js": {
"text": "/*\\\r\ntitle: $:/core/modules/savers/tiddlyie.js\r\ntype: application/javascript\r\nmodule-type: saver\r\n\r\nHandles saving changes via Internet Explorer BHO extenion (TiddlyIE)\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nSelect the appropriate saver module and set it up\r\n*/\r\nvar TiddlyIESaver = function(wiki) {\r\n};\r\n\r\nTiddlyIESaver.prototype.save = function(text,method,callback) {\r\n\t// Check existence of TiddlyIE BHO extension (note: only works after document is complete)\r\n\tif(typeof(window.TiddlyIE) != \"undefined\") {\r\n\t\t// Get the pathname of this document\r\n\t\tvar pathname = unescape(document.location.pathname);\r\n\t\t// Test for a Windows path of the form /x:/blah...\r\n\t\tif(/^\\/[A-Z]\\:\\/[^\\/]+/i.test(pathname)) {\t// ie: ^/[a-z]:/[^/]+ (is this better?: ^/[a-z]:/[^/]+(/[^/]+)*\\.[^/]+ )\r\n\t\t\t// Remove the leading slash\r\n\t\t\tpathname = pathname.substr(1);\r\n\t\t\t// Convert slashes to backslashes\r\n\t\t\tpathname = pathname.replace(/\\//g,\"\\\\\");\r\n\t\t} else if(document.hostname !== \"\" && /^\\/[^\\/]+\\/[^\\/]+/i.test(pathname)) {\t// test for \\\\server\\share\\blah... - ^/[^/]+/[^/]+\r\n\t\t\t// Convert slashes to backslashes\r\n\t\t\tpathname = pathname.replace(/\\//g,\"\\\\\");\r\n\t\t\t// reconstruct UNC path\r\n\t\t\tpathname = \"\\\\\\\\\" + document.location.hostname + pathname;\r\n\t\t} else return false;\r\n\t\t// Prompt the user to save the file\r\n\t\twindow.TiddlyIE.save(pathname, text);\r\n\t\t// Callback that we succeeded\r\n\t\tcallback(null);\r\n\t\treturn true;\r\n\t} else {\r\n\t\treturn false;\r\n\t}\r\n};\r\n\r\n/*\r\nInformation about this saver\r\n*/\r\nTiddlyIESaver.prototype.info = {\r\n\tname: \"tiddlyiesaver\",\r\n\tpriority: 1500,\r\n\tcapabilities: [\"save\"]\r\n};\r\n\r\n/*\r\nStatic method that returns true if this saver is capable of working\r\n*/\r\nexports.canSave = function(wiki) {\r\n\treturn (window.location.protocol === \"file:\");\r\n};\r\n\r\n/*\r\nCreate an instance of this saver\r\n*/\r\nexports.create = function(wiki) {\r\n\treturn new TiddlyIESaver(wiki);\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/savers/tiddlyie.js",
"type": "application/javascript",
"module-type": "saver"
},
"$:/core/modules/savers/twedit.js": {
"text": "/*\\\r\ntitle: $:/core/modules/savers/twedit.js\r\ntype: application/javascript\r\nmodule-type: saver\r\n\r\nHandles saving changes via the TWEdit iOS app\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false, netscape: false, Components: false */\r\n\"use strict\";\r\n\r\nvar TWEditSaver = function(wiki) {\r\n};\r\n\r\nTWEditSaver.prototype.save = function(text,method,callback) {\r\n\t// Bail if we're not running under TWEdit\r\n\tif(typeof DeviceInfo !== \"object\") {\r\n\t\treturn false;\r\n\t}\r\n\t// Get the pathname of this document\r\n\tvar pathname = decodeURIComponent(document.location.pathname);\r\n\t// Strip any query or location part\r\n\tvar p = pathname.indexOf(\"?\");\r\n\tif(p !== -1) {\r\n\t\tpathname = pathname.substr(0,p);\r\n\t}\r\n\tp = pathname.indexOf(\"#\");\r\n\tif(p !== -1) {\r\n\t\tpathname = pathname.substr(0,p);\r\n\t}\r\n\t// Remove the leading \"/Documents\" from path\r\n\tvar prefix = \"/Documents\";\r\n\tif(pathname.indexOf(prefix) === 0) {\r\n\t\tpathname = pathname.substr(prefix.length);\r\n\t}\r\n\t// Error handler\r\n\tvar errorHandler = function(event) {\r\n\t\t// Error\r\n\t\tcallback(\"Error saving to TWEdit: \" + event.target.error.code);\r\n\t};\r\n\t// Get the file system\r\n\twindow.requestFileSystem(LocalFileSystem.PERSISTENT,0,function(fileSystem) {\r\n\t\t// Now we've got the filesystem, get the fileEntry\r\n\t\tfileSystem.root.getFile(pathname, {create: true}, function(fileEntry) {\r\n\t\t\t// Now we've got the fileEntry, create the writer\r\n\t\t\tfileEntry.createWriter(function(writer) {\r\n\t\t\t\twriter.onerror = errorHandler;\r\n\t\t\t\twriter.onwrite = function() {\r\n\t\t\t\t\tcallback(null);\r\n\t\t\t\t};\r\n\t\t\t\twriter.position = 0;\r\n\t\t\t\twriter.write(text);\r\n\t\t\t},errorHandler);\r\n\t\t}, errorHandler);\r\n\t}, errorHandler);\r\n\treturn true;\r\n};\r\n\r\n/*\r\nInformation about this saver\r\n*/\r\nTWEditSaver.prototype.info = {\r\n\tname: \"twedit\",\r\n\tpriority: 1600,\r\n\tcapabilities: [\"save\", \"autosave\"]\r\n};\r\n\r\n/*\r\nStatic method that returns true if this saver is capable of working\r\n*/\r\nexports.canSave = function(wiki) {\r\n\treturn true;\r\n};\r\n\r\n/*\r\nCreate an instance of this saver\r\n*/\r\nexports.create = function(wiki) {\r\n\treturn new TWEditSaver(wiki);\r\n};\r\n\r\n/////////////////////////// Hack\r\n// HACK: This ensures that TWEdit recognises us as a TiddlyWiki document\r\nif($tw.browser) {\r\n\twindow.version = {title: \"TiddlyWiki\"};\r\n}\r\n\r\n})();\r\n",
"title": "$:/core/modules/savers/twedit.js",
"type": "application/javascript",
"module-type": "saver"
},
"$:/core/modules/savers/upload.js": {
"text": "/*\\\r\ntitle: $:/core/modules/savers/upload.js\r\ntype: application/javascript\r\nmodule-type: saver\r\n\r\nHandles saving changes via upload to a server.\r\n\r\nDesigned to be compatible with BidiX's UploadPlugin at http://tiddlywiki.bidix.info/#UploadPlugin\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nSelect the appropriate saver module and set it up\r\n*/\r\nvar UploadSaver = function(wiki) {\r\n\tthis.wiki = wiki;\r\n};\r\n\r\nUploadSaver.prototype.save = function(text,method,callback) {\r\n\t// Get the various parameters we need\r\n\tvar backupDir = this.wiki.getTextReference(\"$:/UploadBackupDir\") || \".\",\r\n\t\tusername = this.wiki.getTextReference(\"$:/UploadName\"),\r\n\t\tpassword = $tw.utils.getPassword(\"upload\"),\r\n\t\tuploadDir = this.wiki.getTextReference(\"$:/UploadDir\") || \".\",\r\n\t\tuploadFilename = this.wiki.getTextReference(\"$:/UploadFilename\") || \"index.html\",\r\n\t\turl = this.wiki.getTextReference(\"$:/UploadURL\");\r\n\t// Bail out if we don't have the bits we need\r\n\tif(!username || username.toString().trim() === \"\" || !password || password.toString().trim() === \"\") {\r\n\t\treturn false;\r\n\t}\r\n\t// Construct the url if not provided\r\n\tif(!url) {\r\n\t\turl = \"http://\" + username + \".tiddlyspot.com/store.cgi\";\r\n\t}\r\n\t// Assemble the header\r\n\tvar boundary = \"---------------------------\" + \"AaB03x\";\t\r\n\tvar uploadFormName = \"UploadPlugin\";\r\n\tvar head = [];\r\n\thead.push(\"--\" + boundary + \"\\r\\nContent-disposition: form-data; name=\\\"UploadPlugin\\\"\\r\\n\");\r\n\thead.push(\"backupDir=\" + backupDir + \";user=\" + username + \";password=\" + password + \";uploaddir=\" + uploadDir + \";;\"); \r\n\thead.push(\"\\r\\n\" + \"--\" + boundary);\r\n\thead.push(\"Content-disposition: form-data; name=\\\"userfile\\\"; filename=\\\"\" + uploadFilename + \"\\\"\");\r\n\thead.push(\"Content-Type: text/html;charset=UTF-8\");\r\n\thead.push(\"Content-Length: \" + text.length + \"\\r\\n\");\r\n\thead.push(\"\");\r\n\t// Assemble the tail and the data itself\r\n\tvar tail = \"\\r\\n--\" + boundary + \"--\\r\\n\",\r\n\t\tdata = head.join(\"\\r\\n\") + text + tail;\r\n\t// Do the HTTP post\r\n\tvar http = new XMLHttpRequest();\r\n\thttp.open(\"POST\",url,true,username,password);\r\n\thttp.setRequestHeader(\"Content-Type\",\"multipart/form-data; ;charset=UTF-8; boundary=\" + boundary);\r\n\thttp.onreadystatechange = function() {\r\n\t\tif(http.readyState == 4 && http.status == 200) {\r\n\t\t\tif(http.responseText.substr(0,4) === \"0 - \") {\r\n\t\t\t\tcallback(null);\r\n\t\t\t} else {\r\n\t\t\t\tcallback(http.responseText);\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\ttry {\r\n\t\thttp.send(data);\r\n\t} catch(ex) {\r\n\t\treturn callback(\"Error:\" + ex);\r\n\t}\r\n\t$tw.notifier.display(\"$:/language/Notifications/Save/Starting\");\r\n\treturn true;\r\n};\r\n\r\n/*\r\nInformation about this saver\r\n*/\r\nUploadSaver.prototype.info = {\r\n\tname: \"upload\",\r\n\tpriority: 2000,\r\n\tcapabilities: [\"save\", \"autosave\"]\r\n};\r\n\r\n/*\r\nStatic method that returns true if this saver is capable of working\r\n*/\r\nexports.canSave = function(wiki) {\r\n\treturn true;\r\n};\r\n\r\n/*\r\nCreate an instance of this saver\r\n*/\r\nexports.create = function(wiki) {\r\n\treturn new UploadSaver(wiki);\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/savers/upload.js",
"type": "application/javascript",
"module-type": "saver"
},
"$:/core/modules/startup/commands.js": {
"text": "/*\\\r\ntitle: $:/core/modules/startup/commands.js\r\ntype: application/javascript\r\nmodule-type: startup\r\n\r\nCommand processing\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n// Export name and synchronous status\r\nexports.name = \"commands\";\r\nexports.platforms = [\"node\"];\r\nexports.after = [\"story\"];\r\nexports.synchronous = false;\r\n\r\nexports.startup = function(callback) {\r\n\t// On the server, start a commander with the command line arguments\r\n\tvar commander = new $tw.Commander(\r\n\t\t$tw.boot.argv,\r\n\t\tfunction(err) {\r\n\t\t\tif(err) {\r\n\t\t\t\treturn $tw.utils.error(\"Error: \" + err);\r\n\t\t\t}\r\n\t\t\tcallback();\r\n\t\t},\r\n\t\t$tw.wiki,\r\n\t\t{output: process.stdout, error: process.stderr}\r\n\t);\r\n\tcommander.execute();\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/startup/commands.js",
"type": "application/javascript",
"module-type": "startup"
},
"$:/core/modules/startup/favicon.js": {
"text": "/*\\\r\ntitle: $:/core/modules/startup/favicon.js\r\ntype: application/javascript\r\nmodule-type: startup\r\n\r\nFavicon handling\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n// Export name and synchronous status\r\nexports.name = \"favicon\";\r\nexports.platforms = [\"browser\"];\r\nexports.after = [\"startup\"];\r\nexports.synchronous = true;\r\n\t\t\r\n// Favicon tiddler\r\nvar FAVICON_TITLE = \"$:/favicon.ico\";\r\n\r\nexports.startup = function() {\r\n\t// Set up the favicon\r\n\tsetFavicon();\r\n\t// Reset the favicon when the tiddler changes\r\n\t$tw.wiki.addEventListener(\"change\",function(changes) {\r\n\t\tif($tw.utils.hop(changes,FAVICON_TITLE)) {\r\n\t\t\tsetFavicon();\r\n\t\t}\r\n\t});\r\n};\r\n\r\nfunction setFavicon() {\r\n\tvar tiddler = $tw.wiki.getTiddler(FAVICON_TITLE);\r\n\tif(tiddler) {\r\n\t\tvar faviconLink = document.getElementById(\"faviconLink\");\r\n\t\tfaviconLink.setAttribute(\"href\",\"data:\" + tiddler.fields.type + \";base64,\" + tiddler.fields.text);\r\n\t}\r\n}\r\n\r\n})();\r\n",
"title": "$:/core/modules/startup/favicon.js",
"type": "application/javascript",
"module-type": "startup"
},
"$:/core/modules/startup/info.js": {
"text": "/*\\\r\ntitle: $:/core/modules/startup/info.js\r\ntype: application/javascript\r\nmodule-type: startup\r\n\r\nInitialise $:/info tiddlers via $:/temp/info-plugin pseudo-plugin\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n// Export name and synchronous status\r\nexports.name = \"info\";\r\nexports.before = [\"startup\"];\r\nexports.after = [\"load-modules\"];\r\nexports.synchronous = true;\r\n\r\nexports.startup = function() {\r\n\t// Collect up the info tiddlers\r\n\tvar infoTiddlerFields = {};\r\n\t// Give each info module a chance to fill in as many info tiddlers as they want\r\n\t$tw.modules.forEachModuleOfType(\"info\",function(title,moduleExports) {\r\n\t\tif(moduleExports && moduleExports.getInfoTiddlerFields) {\r\n\t\t\tvar tiddlerFieldsArray = moduleExports.getInfoTiddlerFields(infoTiddlerFields);\r\n\t\t\t$tw.utils.each(tiddlerFieldsArray,function(fields) {\r\n\t\t\t\tif(fields) {\r\n\t\t\t\t\tinfoTiddlerFields[fields.title] = fields;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t});\r\n\t// Bake the info tiddlers into a plugin\r\n\tvar fields = {\r\n\t\ttitle: \"$:/temp/info-plugin\",\r\n\t\ttype: \"application/json\",\r\n\t\t\"plugin-type\": \"info\",\r\n\t\ttext: JSON.stringify({tiddlers: infoTiddlerFields},null,$tw.config.preferences.jsonSpaces)\r\n\t};\r\n\t$tw.wiki.addTiddler(new $tw.Tiddler(fields));\r\n\t$tw.wiki.readPluginInfo();\r\n\t$tw.wiki.registerPluginTiddlers(\"info\");\r\n\t$tw.wiki.unpackPluginTiddlers();\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/startup/info.js",
"type": "application/javascript",
"module-type": "startup"
},
"$:/core/modules/startup/load-modules.js": {
"text": "/*\\\r\ntitle: $:/core/modules/startup/load-modules.js\r\ntype: application/javascript\r\nmodule-type: startup\r\n\r\nLoad core modules\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n// Export name and synchronous status\r\nexports.name = \"load-modules\";\r\nexports.synchronous = true;\r\n\r\nexports.startup = function() {\r\n\t// Load modules\r\n\t$tw.modules.applyMethods(\"utils\",$tw.utils);\r\n\tif($tw.node) {\r\n\t\t$tw.modules.applyMethods(\"utils-node\",$tw.utils);\r\n\t}\r\n\t$tw.modules.applyMethods(\"global\",$tw);\r\n\t$tw.modules.applyMethods(\"config\",$tw.config);\r\n\t$tw.Tiddler.fieldModules = $tw.modules.getModulesByTypeAsHashmap(\"tiddlerfield\");\r\n\t$tw.modules.applyMethods(\"tiddlermethod\",$tw.Tiddler.prototype);\r\n\t$tw.modules.applyMethods(\"wikimethod\",$tw.Wiki.prototype);\r\n\t$tw.modules.applyMethods(\"tiddlerdeserializer\",$tw.Wiki.tiddlerDeserializerModules);\r\n\t$tw.macros = $tw.modules.getModulesByTypeAsHashmap(\"macro\");\r\n\t$tw.wiki.initParsers();\r\n\t$tw.Commander.initCommands();\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/startup/load-modules.js",
"type": "application/javascript",
"module-type": "startup"
},
"$:/core/modules/startup/password.js": {
"text": "/*\\\r\ntitle: $:/core/modules/startup/password.js\r\ntype: application/javascript\r\nmodule-type: startup\r\n\r\nPassword handling\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n// Export name and synchronous status\r\nexports.name = \"password\";\r\nexports.platforms = [\"browser\"];\r\nexports.after = [\"startup\"];\r\nexports.synchronous = true;\r\n\r\nexports.startup = function() {\r\n\t$tw.rootWidget.addEventListener(\"tm-set-password\",function(event) {\r\n\t\t$tw.passwordPrompt.createPrompt({\r\n\t\t\tserviceName: $tw.language.getString(\"Encryption/PromptSetPassword\"),\r\n\t\t\tnoUserName: true,\r\n\t\t\tsubmitText: \"Set password\",\r\n\t\t\tcanCancel: true,\r\n\t\t\trepeatPassword: true,\r\n\t\t\tcallback: function(data) {\r\n\t\t\t\tif(data) {\r\n\t\t\t\t\t$tw.crypto.setPassword(data.password);\r\n\t\t\t\t}\r\n\t\t\t\treturn true; // Get rid of the password prompt\r\n\t\t\t}\r\n\t\t});\r\n\t});\r\n\t$tw.rootWidget.addEventListener(\"tm-clear-password\",function(event) {\r\n\t\tif($tw.browser) {\r\n\t\t\tif(!confirm($tw.language.getString(\"Encryption/ConfirmClearPassword\"))) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\t$tw.crypto.setPassword(null);\r\n\t});\r\n\t// Ensure that $:/isEncrypted is maintained properly\r\n\t$tw.wiki.addEventListener(\"change\",function(changes) {\r\n\t\tif($tw.utils.hop(changes,\"$:/isEncrypted\")) {\r\n\t\t\t$tw.crypto.updateCryptoStateTiddler();\r\n\t\t}\r\n\t});\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/startup/password.js",
"type": "application/javascript",
"module-type": "startup"
},
"$:/core/modules/startup/render.js": {
"text": "/*\\\r\ntitle: $:/core/modules/startup/render.js\r\ntype: application/javascript\r\nmodule-type: startup\r\n\r\nTitle, stylesheet and page rendering\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n// Export name and synchronous status\r\nexports.name = \"render\";\r\nexports.platforms = [\"browser\"];\r\nexports.after = [\"story\"];\r\nexports.synchronous = true;\r\n\r\n// Default story and history lists\r\nvar PAGE_TITLE_TITLE = \"$:/core/wiki/title\";\r\nvar PAGE_STYLESHEET_TITLE = \"$:/core/ui/PageStylesheet\";\r\nvar PAGE_TEMPLATE_TITLE = \"$:/core/ui/PageTemplate\";\r\n\r\n// Time (in ms) that we defer refreshing changes to draft tiddlers\r\nvar DRAFT_TIDDLER_TIMEOUT = 400;\r\n\r\nexports.startup = function() {\r\n\t// Set up the title\r\n\t$tw.titleWidgetNode = $tw.wiki.makeTranscludeWidget(PAGE_TITLE_TITLE,{document: $tw.fakeDocument, parseAsInline: true});\r\n\t$tw.titleContainer = $tw.fakeDocument.createElement(\"div\");\r\n\t$tw.titleWidgetNode.render($tw.titleContainer,null);\r\n\tdocument.title = $tw.titleContainer.textContent;\r\n\t$tw.wiki.addEventListener(\"change\",function(changes) {\r\n\t\tif($tw.titleWidgetNode.refresh(changes,$tw.titleContainer,null)) {\r\n\t\t\tdocument.title = $tw.titleContainer.textContent;\r\n\t\t}\r\n\t});\r\n\t// Set up the styles\r\n\t$tw.styleWidgetNode = $tw.wiki.makeTranscludeWidget(PAGE_STYLESHEET_TITLE,{document: $tw.fakeDocument});\r\n\t$tw.styleContainer = $tw.fakeDocument.createElement(\"style\");\r\n\t$tw.styleWidgetNode.render($tw.styleContainer,null);\r\n\t$tw.styleElement = document.createElement(\"style\");\r\n\t$tw.styleElement.innerHTML = $tw.styleContainer.textContent;\r\n\tdocument.head.insertBefore($tw.styleElement,document.head.firstChild);\r\n\t$tw.wiki.addEventListener(\"change\",$tw.perf.report(\"styleRefresh\",function(changes) {\r\n\t\tif($tw.styleWidgetNode.refresh(changes,$tw.styleContainer,null)) {\r\n\t\t\t$tw.styleElement.innerHTML = $tw.styleContainer.textContent;\r\n\t\t}\r\n\t}));\r\n\t// Display the $:/core/ui/PageTemplate tiddler to kick off the display\r\n\t$tw.perf.report(\"mainRender\",function() {\r\n\t\t$tw.pageWidgetNode = $tw.wiki.makeTranscludeWidget(PAGE_TEMPLATE_TITLE,{document: document, parentWidget: $tw.rootWidget});\r\n\t\t$tw.pageContainer = document.createElement(\"div\");\r\n\t\t$tw.utils.addClass($tw.pageContainer,\"tc-page-container-wrapper\");\r\n\t\tdocument.body.insertBefore($tw.pageContainer,document.body.firstChild);\r\n\t\t$tw.pageWidgetNode.render($tw.pageContainer,null);\r\n\t})();\r\n\t// Prepare refresh mechanism\r\n\tvar deferredChanges = Object.create(null),\r\n\t\ttimerId;\r\n\tfunction refresh() {\r\n\t\t// Process the refresh\r\n\t\t$tw.pageWidgetNode.refresh(deferredChanges);\r\n\t\tdeferredChanges = Object.create(null);\r\n\t}\r\n\t// Add the change event handler\r\n\t$tw.wiki.addEventListener(\"change\",$tw.perf.report(\"mainRefresh\",function(changes) {\r\n\t\t// Check if only drafts have changed\r\n\t\tvar onlyDraftsHaveChanged = true;\r\n\t\tfor(var title in changes) {\r\n\t\t\tvar tiddler = $tw.wiki.getTiddler(title);\r\n\t\t\tif(!tiddler || !tiddler.hasField(\"draft.of\")) {\r\n\t\t\t\tonlyDraftsHaveChanged = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Defer the change if only drafts have changed\r\n\t\tif(timerId) {\r\n\t\t\tclearTimeout(timerId);\r\n\t\t}\r\n\t\ttimerId = null;\r\n\t\tif(onlyDraftsHaveChanged) {\r\n\t\t\ttimerId = setTimeout(refresh,DRAFT_TIDDLER_TIMEOUT);\r\n\t\t\t$tw.utils.extend(deferredChanges,changes);\r\n\t\t} else {\r\n\t\t\t$tw.utils.extend(deferredChanges,changes);\r\n\t\t\trefresh();\r\n\t\t}\r\n\t}));\r\n\t// Fix up the link between the root widget and the page container\r\n\t$tw.rootWidget.domNodes = [$tw.pageContainer];\r\n\t$tw.rootWidget.children = [$tw.pageWidgetNode];\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/startup/render.js",
"type": "application/javascript",
"module-type": "startup"
},
"$:/core/modules/startup/rootwidget.js": {
"text": "/*\\\r\ntitle: $:/core/modules/startup/rootwidget.js\r\ntype: application/javascript\r\nmodule-type: startup\r\n\r\nSetup the root widget and the core root widget handlers\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n// Export name and synchronous status\r\nexports.name = \"rootwidget\";\r\nexports.platforms = [\"browser\"];\r\nexports.after = [\"startup\"];\r\nexports.before = [\"story\"];\r\nexports.synchronous = true;\r\n\r\nexports.startup = function() {\r\n\t// Install the modal message mechanism\r\n\t$tw.modal = new $tw.utils.Modal($tw.wiki);\r\n\t$tw.rootWidget.addEventListener(\"tm-modal\",function(event) {\r\n\t\t$tw.modal.display(event.param,{variables: event.paramObject});\r\n\t});\r\n\t// Install the notification mechanism\r\n\t$tw.notifier = new $tw.utils.Notifier($tw.wiki);\r\n\t$tw.rootWidget.addEventListener(\"tm-notify\",function(event) {\r\n\t\t$tw.notifier.display(event.param);\r\n\t});\r\n\t// Install the scroller\r\n\t$tw.pageScroller = new $tw.utils.PageScroller();\r\n\t$tw.rootWidget.addEventListener(\"tm-scroll\",function(event) {\r\n\t\t$tw.pageScroller.handleEvent(event);\r\n\t});\r\n\tvar fullscreen = $tw.utils.getFullScreenApis();\r\n\tif(fullscreen) {\r\n\t\t$tw.rootWidget.addEventListener(\"tm-full-screen\",function(event) {\r\n\t\t\tif(document[fullscreen._fullscreenElement]) {\r\n\t\t\t\tdocument[fullscreen._exitFullscreen]();\r\n\t\t\t} else {\r\n\t\t\t\tdocument.documentElement[fullscreen._requestFullscreen](Element.ALLOW_KEYBOARD_INPUT);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t// If we're being viewed on a data: URI then give instructions for how to save\r\n\tif(document.location.protocol === \"data:\") {\r\n\t\t$tw.rootWidget.dispatchEvent({\r\n\t\t\ttype: \"tm-modal\",\r\n\t\t\tparam: \"$:/language/Modals/SaveInstructions\"\r\n\t\t});\r\n\t}\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/startup/rootwidget.js",
"type": "application/javascript",
"module-type": "startup"
},
"$:/core/modules/startup.js": {
"text": "/*\\\r\ntitle: $:/core/modules/startup.js\r\ntype: application/javascript\r\nmodule-type: startup\r\n\r\nMiscellaneous startup logic for both the client and server.\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n// Export name and synchronous status\r\nexports.name = \"startup\";\r\nexports.after = [\"load-modules\"];\r\nexports.synchronous = true;\r\n\r\n// Set to `true` to enable performance instrumentation\r\nvar PERFORMANCE_INSTRUMENTATION = false;\r\n\r\nvar widget = require(\"$:/core/modules/widgets/widget.js\");\r\n\r\nexports.startup = function() {\r\n\tvar modules,n,m,f;\r\n\tif($tw.browser) {\r\n\t\t$tw.browser.isIE = (/msie|trident/i.test(navigator.userAgent));\r\n\t}\r\n\t$tw.version = $tw.utils.extractVersionInfo();\r\n\t// Set up the performance framework\r\n\t$tw.perf = new $tw.Performance(PERFORMANCE_INSTRUMENTATION);\r\n\t// Kick off the language manager and switcher\r\n\t$tw.language = new $tw.Language();\r\n\t$tw.languageSwitcher = new $tw.PluginSwitcher({\r\n\t\twiki: $tw.wiki,\r\n\t\tpluginType: \"language\",\r\n\t\tcontrollerTitle: \"$:/language\",\r\n\t\tdefaultPlugins: [\r\n\t\t\t\"$:/languages/en-US\"\r\n\t\t]\r\n\t});\r\n\t// Kick off the theme manager\r\n\t$tw.themeManager = new $tw.PluginSwitcher({\r\n\t\twiki: $tw.wiki,\r\n\t\tpluginType: \"theme\",\r\n\t\tcontrollerTitle: \"$:/theme\",\r\n\t\tdefaultPlugins: [\r\n\t\t\t\"$:/themes/tiddlywiki/snowwhite\",\r\n\t\t\t\"$:/themes/tiddlywiki/vanilla\"\r\n\t\t]\r\n\t});\r\n\t// Clear outstanding tiddler store change events to avoid an unnecessary refresh cycle at startup\r\n\t$tw.wiki.clearTiddlerEventQueue();\r\n\t// Create a root widget for attaching event handlers. By using it as the parentWidget for another widget tree, one can reuse the event handlers\r\n\tif($tw.browser) {\r\n\t\t$tw.rootWidget = new widget.widget({\r\n\t\t\ttype: \"widget\",\r\n\t\t\tchildren: []\r\n\t\t},{\r\n\t\t\twiki: $tw.wiki,\r\n\t\t\tdocument: document\r\n\t\t});\r\n\t}\r\n\t// Find a working syncadaptor\r\n\t$tw.syncadaptor = undefined;\r\n\t$tw.modules.forEachModuleOfType(\"syncadaptor\",function(title,module) {\r\n\t\tif(!$tw.syncadaptor && module.adaptorClass) {\r\n\t\t\t$tw.syncadaptor = new module.adaptorClass({wiki: $tw.wiki});\r\n\t\t}\r\n\t});\r\n\t// Set up the syncer object if we've got a syncadaptor\r\n\tif($tw.syncadaptor) {\r\n\t\t$tw.syncer = new $tw.Syncer({wiki: $tw.wiki, syncadaptor: $tw.syncadaptor});\r\n\t} \r\n\t// Setup the saver handler\r\n\t$tw.saverHandler = new $tw.SaverHandler({wiki: $tw.wiki, dirtyTracking: !$tw.syncadaptor});\r\n\t// Host-specific startup\r\n\tif($tw.browser) {\r\n\t\t// Install the popup manager\r\n\t\t$tw.popup = new $tw.utils.Popup();\r\n\t\t// Install the animator\r\n\t\t$tw.anim = new $tw.utils.Animator();\r\n\t}\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/startup.js",
"type": "application/javascript",
"module-type": "startup"
},
"$:/core/modules/startup/story.js": {
"text": "/*\\\r\ntitle: $:/core/modules/startup/story.js\r\ntype: application/javascript\r\nmodule-type: startup\r\n\r\nLoad core modules\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n// Export name and synchronous status\r\nexports.name = \"story\";\r\nexports.after = [\"startup\"];\r\nexports.synchronous = true;\r\n\r\n// Default story and history lists\r\nvar DEFAULT_STORY_TITLE = \"$:/StoryList\";\r\nvar DEFAULT_HISTORY_TITLE = \"$:/HistoryList\";\r\n\r\n// Default tiddlers\r\nvar DEFAULT_TIDDLERS_TITLE = \"$:/DefaultTiddlers\";\r\n\r\n// Config\r\nvar CONFIG_UPDATE_ADDRESS_BAR = \"$:/config/Navigation/UpdateAddressBar\"; // Can be \"no\", \"permalink\", \"permaview\"\r\nvar CONFIG_UPDATE_HISTORY = \"$:/config/Navigation/UpdateHistory\"; // Can be \"yes\" or \"no\"\r\n\r\nexports.startup = function() {\r\n\t// Open startup tiddlers\r\n\topenStartupTiddlers();\r\n\tif($tw.browser) {\r\n\t\t// Set up location hash update\r\n\t\t$tw.wiki.addEventListener(\"change\",function(changes) {\r\n\t\t\tif($tw.utils.hop(changes,DEFAULT_STORY_TITLE) || $tw.utils.hop(changes,DEFAULT_HISTORY_TITLE)) {\r\n\t\t\t\tupdateLocationHash({\r\n\t\t\t\t\tupdateAddressBar: $tw.wiki.getTiddlerText(CONFIG_UPDATE_ADDRESS_BAR,\"permaview\").trim(),\r\n\t\t\t\t\tupdateHistory: $tw.wiki.getTiddlerText(CONFIG_UPDATE_HISTORY,\"no\").trim()\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t});\r\n\t\t// Listen for changes to the browser location hash\r\n\t\twindow.addEventListener(\"hashchange\",function() {\r\n\t\t\tvar hash = $tw.utils.getLocationHash();\r\n\t\t\tif(hash !== $tw.locationHash) {\r\n\t\t\t\t$tw.locationHash = hash;\r\n\t\t\t\topenStartupTiddlers({defaultToCurrentStory: true});\r\n\t\t\t}\r\n\t\t},false);\r\n\t\t// Listen for the tm-browser-refresh message\r\n\t\t$tw.rootWidget.addEventListener(\"tm-browser-refresh\",function(event) {\r\n\t\t\twindow.location.reload(true);\r\n\t\t});\r\n\t\t// Listen for the tm-home message\r\n\t\t$tw.rootWidget.addEventListener(\"tm-home\",function(event) {\r\n\t\t\twindow.location.hash = \"\";\r\n\t\t\tvar storyFilter = $tw.wiki.getTiddlerText(DEFAULT_TIDDLERS_TITLE),\r\n\t\t\t\tstoryList = $tw.wiki.filterTiddlers(storyFilter);\r\n\t\t\t//invoke any hooks that might change the default story list\r\n\t\t\tstoryList = $tw.hooks.invokeHook(\"th-opening-default-tiddlers-list\",storyList);\r\n\t\t\t$tw.wiki.addTiddler({title: DEFAULT_STORY_TITLE, text: \"\", list: storyList},$tw.wiki.getModificationFields());\r\n\t\t\tif(storyList[0]) {\r\n\t\t\t\t$tw.wiki.addToHistory(storyList[0]);\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\t// Listen for the tm-permalink message\r\n\t\t$tw.rootWidget.addEventListener(\"tm-permalink\",function(event) {\r\n\t\t\tupdateLocationHash({\r\n\t\t\t\tupdateAddressBar: \"permalink\",\r\n\t\t\t\tupdateHistory: $tw.wiki.getTiddlerText(CONFIG_UPDATE_HISTORY,\"no\").trim(),\r\n\t\t\t\ttargetTiddler: event.param || event.tiddlerTitle\r\n\t\t\t});\r\n\t\t});\r\n\t\t// Listen for the tm-permaview message\r\n\t\t$tw.rootWidget.addEventListener(\"tm-permaview\",function(event) {\r\n\t\t\tupdateLocationHash({\r\n\t\t\t\tupdateAddressBar: \"permaview\",\r\n\t\t\t\tupdateHistory: $tw.wiki.getTiddlerText(CONFIG_UPDATE_HISTORY,\"no\").trim(),\r\n\t\t\t\ttargetTiddler: event.param || event.tiddlerTitle\r\n\t\t\t});\r\n\t\t});\r\n\t}\r\n};\r\n\r\n/*\r\nProcess the location hash to open the specified tiddlers. Options:\r\ndefaultToCurrentStory: If true, the current story is retained as the default, instead of opening the default tiddlers\r\n*/\r\nfunction openStartupTiddlers(options) {\r\n\toptions = options || {};\r\n\t// Work out the target tiddler and the story filter. \"null\" means \"unspecified\"\r\n\tvar target = null,\r\n\t\tstoryFilter = null;\r\n\tif($tw.locationHash.length > 1) {\r\n\t\tvar hash = $tw.locationHash.substr(1),\r\n\t\t\tsplit = hash.indexOf(\":\");\r\n\t\tif(split === -1) {\r\n\t\t\ttarget = decodeURIComponent(hash.trim());\r\n\t\t} else {\r\n\t\t\ttarget = decodeURIComponent(hash.substr(0,split).trim());\r\n\t\t\tstoryFilter = decodeURIComponent(hash.substr(split + 1).trim());\r\n\t\t}\r\n\t}\r\n\t// If the story wasn't specified use the current tiddlers or a blank story\r\n\tif(storyFilter === null) {\r\n\t\tif(options.defaultToCurrentStory) {\r\n\t\t\tvar currStoryList = $tw.wiki.getTiddlerList(DEFAULT_STORY_TITLE);\r\n\t\t\tstoryFilter = $tw.utils.stringifyList(currStoryList);\r\n\t\t} else {\r\n\t\t\tif(target && target !== \"\") {\r\n\t\t\t\tstoryFilter = \"\";\r\n\t\t\t} else {\r\n\t\t\t\tstoryFilter = $tw.wiki.getTiddlerText(DEFAULT_TIDDLERS_TITLE);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t// Process the story filter to get the story list\r\n\tvar storyList = $tw.wiki.filterTiddlers(storyFilter);\r\n\t//invoke any hooks that might change the default story list\r\n\tstoryList = $tw.hooks.invokeHook(\"th-opening-default-tiddlers-list\",storyList);\r\n\t// If the target tiddler isn't included then splice it in at the top\r\n\tif(target && storyList.indexOf(target) === -1) {\r\n\t\tstoryList.unshift(target);\r\n\t}\r\n\t// Save the story list\r\n\t$tw.wiki.addTiddler({title: DEFAULT_STORY_TITLE, text: \"\", list: storyList},$tw.wiki.getModificationFields());\r\n\t// If a target tiddler was specified add it to the history stack\r\n\tif(target && target !== \"\") {\r\n\t\t// The target tiddler doesn't need double square brackets, but we'll silently remove them if they're present\r\n\t\tif(target.indexOf(\"[[\") === 0 && target.substr(-2) === \"]]\") {\r\n\t\t\ttarget = target.substr(2,target.length - 4);\r\n\t\t}\r\n\t\t$tw.wiki.addToHistory(target);\r\n\t} else if(storyList.length > 0) {\r\n\t\t$tw.wiki.addToHistory(storyList[0]);\r\n\t}\r\n}\r\n\r\n/*\r\noptions: See below\r\noptions.updateAddressBar: \"permalink\", \"permaview\" or \"no\" (defaults to \"permaview\")\r\noptions.updateHistory: \"yes\" or \"no\" (defaults to \"no\")\r\noptions.targetTiddler: optional title of target tiddler for permalink\r\n*/\r\nfunction updateLocationHash(options) {\r\n\tif(options.updateAddressBar !== \"no\") {\r\n\t\t// Get the story and the history stack\r\n\t\tvar storyList = $tw.wiki.getTiddlerList(DEFAULT_STORY_TITLE),\r\n\t\t\thistoryList = $tw.wiki.getTiddlerData(DEFAULT_HISTORY_TITLE,[]),\r\n\t\t\ttargetTiddler = \"\";\r\n\t\tif(options.targetTiddler) {\r\n\t\t\ttargetTiddler = options.targetTiddler;\r\n\t\t} else {\r\n\t\t\t// The target tiddler is the one at the top of the stack\r\n\t\t\tif(historyList.length > 0) {\r\n\t\t\t\ttargetTiddler = historyList[historyList.length-1].title;\r\n\t\t\t}\r\n\t\t\t// Blank the target tiddler if it isn't present in the story\r\n\t\t\tif(storyList.indexOf(targetTiddler) === -1) {\r\n\t\t\t\ttargetTiddler = \"\";\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Assemble the location hash\r\n\t\tif(options.updateAddressBar === \"permalink\") {\r\n\t\t\t$tw.locationHash = \"#\" + encodeURIComponent(targetTiddler);\r\n\t\t} else {\r\n\t\t\t$tw.locationHash = \"#\" + encodeURIComponent(targetTiddler) + \":\" + encodeURIComponent($tw.utils.stringifyList(storyList));\r\n\t\t}\r\n\t\t// Only change the location hash if we must, thus avoiding unnecessary onhashchange events\r\n\t\tif($tw.utils.getLocationHash() !== $tw.locationHash) {\r\n\t\t\tif(options.updateHistory === \"yes\") {\r\n\t\t\t\t// Assign the location hash so that history is updated\r\n\t\t\t\twindow.location.hash = $tw.locationHash;\r\n\t\t\t} else {\r\n\t\t\t\t// We use replace so that browser history isn't affected\r\n\t\t\t\twindow.location.replace(window.location.toString().split(\"#\")[0] + $tw.locationHash);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\n})();\r\n",
"title": "$:/core/modules/startup/story.js",
"type": "application/javascript",
"module-type": "startup"
},
"$:/core/modules/storyviews/classic.js": {
"text": "/*\\\r\ntitle: $:/core/modules/storyviews/classic.js\r\ntype: application/javascript\r\nmodule-type: storyview\r\n\r\nViews the story as a linear sequence\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar easing = \"cubic-bezier(0.645, 0.045, 0.355, 1)\"; // From http://easings.net/#easeInOutCubic\r\n\r\nvar ClassicStoryView = function(listWidget) {\r\n\tthis.listWidget = listWidget;\r\n};\r\n\r\nClassicStoryView.prototype.navigateTo = function(historyInfo) {\r\n\tvar listElementIndex = this.listWidget.findListItem(0,historyInfo.title);\r\n\tif(listElementIndex === undefined) {\r\n\t\treturn;\r\n\t}\r\n\tvar listItemWidget = this.listWidget.children[listElementIndex],\r\n\t\ttargetElement = listItemWidget.findFirstDomNode();\r\n\t// Abandon if the list entry isn't a DOM element (it might be a text node)\r\n\tif(!(targetElement instanceof Element)) {\r\n\t\treturn;\r\n\t}\r\n\t// Scroll the node into view\r\n\tthis.listWidget.dispatchEvent({type: \"tm-scroll\", target: targetElement});\r\n};\r\n\r\nClassicStoryView.prototype.insert = function(widget) {\r\n\tvar targetElement = widget.findFirstDomNode(),\r\n\t\tduration = $tw.utils.getAnimationDuration();\r\n\t// Abandon if the list entry isn't a DOM element (it might be a text node)\r\n\tif(!(targetElement instanceof Element)) {\r\n\t\treturn;\r\n\t}\r\n\t// Get the current height of the tiddler\r\n\tvar computedStyle = window.getComputedStyle(targetElement),\r\n\t\tcurrMarginBottom = parseInt(computedStyle.marginBottom,10),\r\n\t\tcurrMarginTop = parseInt(computedStyle.marginTop,10),\r\n\t\tcurrHeight = targetElement.offsetHeight + currMarginTop;\r\n\t// Reset the margin once the transition is over\r\n\tsetTimeout(function() {\r\n\t\t$tw.utils.setStyle(targetElement,[\r\n\t\t\t{transition: \"none\"},\r\n\t\t\t{marginBottom: \"\"}\r\n\t\t]);\r\n\t},duration);\r\n\t// Set up the initial position of the element\r\n\t$tw.utils.setStyle(targetElement,[\r\n\t\t{transition: \"none\"},\r\n\t\t{marginBottom: (-currHeight) + \"px\"},\r\n\t\t{opacity: \"0.0\"}\r\n\t]);\r\n\t$tw.utils.forceLayout(targetElement);\r\n\t// Transition to the final position\r\n\t$tw.utils.setStyle(targetElement,[\r\n\t\t{transition: \"opacity \" + duration + \"ms \" + easing + \", \" +\r\n\t\t\t\t\t\"margin-bottom \" + duration + \"ms \" + easing},\r\n\t\t{marginBottom: currMarginBottom + \"px\"},\r\n\t\t{opacity: \"1.0\"}\r\n\t]);\r\n};\r\n\r\nClassicStoryView.prototype.remove = function(widget) {\r\n\tvar targetElement = widget.findFirstDomNode(),\r\n\t\tduration = $tw.utils.getAnimationDuration(),\r\n\t\tremoveElement = function() {\r\n\t\t\twidget.removeChildDomNodes();\r\n\t\t};\r\n\t// Abandon if the list entry isn't a DOM element (it might be a text node)\r\n\tif(!(targetElement instanceof Element)) {\r\n\t\tremoveElement();\r\n\t\treturn;\r\n\t}\r\n\t// Get the current height of the tiddler\r\n\tvar currWidth = targetElement.offsetWidth,\r\n\t\tcomputedStyle = window.getComputedStyle(targetElement),\r\n\t\tcurrMarginBottom = parseInt(computedStyle.marginBottom,10),\r\n\t\tcurrMarginTop = parseInt(computedStyle.marginTop,10),\r\n\t\tcurrHeight = targetElement.offsetHeight + currMarginTop;\r\n\t// Remove the dom nodes of the widget at the end of the transition\r\n\tsetTimeout(removeElement,duration);\r\n\t// Animate the closure\r\n\t$tw.utils.setStyle(targetElement,[\r\n\t\t{transition: \"none\"},\r\n\t\t{transform: \"translateX(0px)\"},\r\n\t\t{marginBottom: currMarginBottom + \"px\"},\r\n\t\t{opacity: \"1.0\"}\r\n\t]);\r\n\t$tw.utils.forceLayout(targetElement);\r\n\t$tw.utils.setStyle(targetElement,[\r\n\t\t{transition: $tw.utils.roundTripPropertyName(\"transform\") + \" \" + duration + \"ms \" + easing + \", \" +\r\n\t\t\t\t\t\"opacity \" + duration + \"ms \" + easing + \", \" +\r\n\t\t\t\t\t\"margin-bottom \" + duration + \"ms \" + easing},\r\n\t\t{transform: \"translateX(-\" + currWidth + \"px)\"},\r\n\t\t{marginBottom: (-currHeight) + \"px\"},\r\n\t\t{opacity: \"0.0\"}\r\n\t]);\r\n};\r\n\r\nexports.classic = ClassicStoryView;\r\n\r\n})();",
"title": "$:/core/modules/storyviews/classic.js",
"type": "application/javascript",
"module-type": "storyview"
},
"$:/core/modules/storyviews/pop.js": {
"text": "/*\\\r\ntitle: $:/core/modules/storyviews/pop.js\r\ntype: application/javascript\r\nmodule-type: storyview\r\n\r\nAnimates list insertions and removals\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar PopStoryView = function(listWidget) {\r\n\tthis.listWidget = listWidget;\r\n};\r\n\r\nPopStoryView.prototype.navigateTo = function(historyInfo) {\r\n\tvar listElementIndex = this.listWidget.findListItem(0,historyInfo.title);\r\n\tif(listElementIndex === undefined) {\r\n\t\treturn;\r\n\t}\r\n\tvar listItemWidget = this.listWidget.children[listElementIndex],\r\n\t\ttargetElement = listItemWidget.findFirstDomNode();\r\n\t// Abandon if the list entry isn't a DOM element (it might be a text node)\r\n\tif(!(targetElement instanceof Element)) {\r\n\t\treturn;\r\n\t}\r\n\t// Scroll the node into view\r\n\tthis.listWidget.dispatchEvent({type: \"tm-scroll\", target: targetElement});\r\n};\r\n\r\nPopStoryView.prototype.insert = function(widget) {\r\n\tvar targetElement = widget.findFirstDomNode(),\r\n\t\tduration = $tw.utils.getAnimationDuration();\r\n\t// Abandon if the list entry isn't a DOM element (it might be a text node)\r\n\tif(!(targetElement instanceof Element)) {\r\n\t\treturn;\r\n\t}\r\n\t// Reset once the transition is over\r\n\tsetTimeout(function() {\r\n\t\t$tw.utils.setStyle(targetElement,[\r\n\t\t\t{transition: \"none\"},\r\n\t\t\t{transform: \"none\"}\r\n\t\t]);\r\n\t},duration);\r\n\t// Set up the initial position of the element\r\n\t$tw.utils.setStyle(targetElement,[\r\n\t\t{transition: \"none\"},\r\n\t\t{transform: \"scale(2)\"},\r\n\t\t{opacity: \"0.0\"}\r\n\t]);\r\n\t$tw.utils.forceLayout(targetElement);\r\n\t// Transition to the final position\r\n\t$tw.utils.setStyle(targetElement,[\r\n\t\t{transition: $tw.utils.roundTripPropertyName(\"transform\") + \" \" + duration + \"ms ease-in-out, \" +\r\n\t\t\t\t\t\"opacity \" + duration + \"ms ease-in-out\"},\r\n\t\t{transform: \"scale(1)\"},\r\n\t\t{opacity: \"1.0\"}\r\n\t]);\r\n};\r\n\r\nPopStoryView.prototype.remove = function(widget) {\r\n\tvar targetElement = widget.findFirstDomNode(),\r\n\t\tduration = $tw.utils.getAnimationDuration(),\r\n\t\tremoveElement = function() {\r\n\t\t\tif(targetElement.parentNode) {\r\n\t\t\t\twidget.removeChildDomNodes();\r\n\t\t\t}\r\n\t\t};\r\n\t// Abandon if the list entry isn't a DOM element (it might be a text node)\r\n\tif(!(targetElement instanceof Element)) {\r\n\t\tremoveElement();\r\n\t\treturn;\r\n\t}\r\n\t// Remove the element at the end of the transition\r\n\tsetTimeout(removeElement,duration);\r\n\t// Animate the closure\r\n\t$tw.utils.setStyle(targetElement,[\r\n\t\t{transition: \"none\"},\r\n\t\t{transform: \"scale(1)\"},\r\n\t\t{opacity: \"1.0\"}\r\n\t]);\r\n\t$tw.utils.forceLayout(targetElement);\r\n\t$tw.utils.setStyle(targetElement,[\r\n\t\t{transition: $tw.utils.roundTripPropertyName(\"transform\") + \" \" + duration + \"ms ease-in-out, \" +\r\n\t\t\t\t\t\"opacity \" + duration + \"ms ease-in-out\"},\r\n\t\t{transform: \"scale(0.1)\"},\r\n\t\t{opacity: \"0.0\"}\r\n\t]);\r\n};\r\n\r\nexports.pop = PopStoryView;\r\n\r\n})();\r\n",
"title": "$:/core/modules/storyviews/pop.js",
"type": "application/javascript",
"module-type": "storyview"
},
"$:/core/modules/storyviews/zoomin.js": {
"text": "/*\\\r\ntitle: $:/core/modules/storyviews/zoomin.js\r\ntype: application/javascript\r\nmodule-type: storyview\r\n\r\nZooms between individual tiddlers\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar easing = \"cubic-bezier(0.645, 0.045, 0.355, 1)\"; // From http://easings.net/#easeInOutCubic\r\n\r\nvar ZoominListView = function(listWidget) {\r\n\tvar self = this;\r\n\tthis.listWidget = listWidget;\r\n\t// Get the index of the tiddler that is at the top of the history\r\n\tvar history = this.listWidget.wiki.getTiddlerData(this.listWidget.historyTitle,[]),\r\n\t\ttargetTiddler;\r\n\tif(history.length > 0) {\r\n\t\ttargetTiddler = history[history.length-1].title;\r\n\t}\r\n\t// Make all the tiddlers position absolute, and hide all but the top (or first) one\r\n\t$tw.utils.each(this.listWidget.children,function(itemWidget,index) {\r\n\t\tvar domNode = itemWidget.findFirstDomNode();\r\n\t\t// Abandon if the list entry isn't a DOM element (it might be a text node)\r\n\t\tif(!(domNode instanceof Element)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif(targetTiddler !== itemWidget.parseTreeNode.itemTitle || (!targetTiddler && index)) {\r\n\t\t\tdomNode.style.display = \"none\";\r\n\t\t} else {\r\n\t\t\tself.currentTiddlerDomNode = domNode;\r\n\t\t}\r\n\t\t$tw.utils.addClass(domNode,\"tc-storyview-zoomin-tiddler\");\r\n\t});\r\n};\r\n\r\nZoominListView.prototype.navigateTo = function(historyInfo) {\r\n\tvar duration = $tw.utils.getAnimationDuration(),\r\n\t\tlistElementIndex = this.listWidget.findListItem(0,historyInfo.title);\r\n\tif(listElementIndex === undefined) {\r\n\t\treturn;\r\n\t}\r\n\tvar listItemWidget = this.listWidget.children[listElementIndex],\r\n\t\ttargetElement = listItemWidget.findFirstDomNode();\r\n\t// Abandon if the list entry isn't a DOM element (it might be a text node)\r\n\tif(!(targetElement instanceof Element)) {\r\n\t\treturn;\r\n\t}\r\n\t// Make the new tiddler be position absolute and visible so that we can measure it\r\n\t$tw.utils.addClass(targetElement,\"tc-storyview-zoomin-tiddler\");\r\n\t$tw.utils.setStyle(targetElement,[\r\n\t\t{display: \"block\"},\r\n\t\t{transformOrigin: \"0 0\"},\r\n\t\t{transform: \"translateX(0px) translateY(0px) scale(1)\"},\r\n\t\t{transition: \"none\"},\r\n\t\t{opacity: \"0.0\"}\r\n\t]);\r\n\t// Get the position of the source node, or use the centre of the window as the source position\r\n\tvar sourceBounds = historyInfo.fromPageRect || {\r\n\t\t\tleft: window.innerWidth/2 - 2,\r\n\t\t\ttop: window.innerHeight/2 - 2,\r\n\t\t\twidth: window.innerWidth/8,\r\n\t\t\theight: window.innerHeight/8\r\n\t\t};\r\n\t// Try to find the title node in the target tiddler\r\n\tvar titleDomNode = findTitleDomNode(listItemWidget) || listItemWidget.findFirstDomNode(),\r\n\t\tzoomBounds = titleDomNode.getBoundingClientRect();\r\n\t// Compute the transform for the target tiddler to make the title lie over the source rectange\r\n\tvar targetBounds = targetElement.getBoundingClientRect(),\r\n\t\tscale = sourceBounds.width / zoomBounds.width,\r\n\t\tx = sourceBounds.left - targetBounds.left - (zoomBounds.left - targetBounds.left) * scale,\r\n\t\ty = sourceBounds.top - targetBounds.top - (zoomBounds.top - targetBounds.top) * scale;\r\n\t// Transform the target tiddler to its starting position\r\n\t$tw.utils.setStyle(targetElement,[\r\n\t\t{transform: \"translateX(\" + x + \"px) translateY(\" + y + \"px) scale(\" + scale + \")\"}\r\n\t]);\r\n\t// Force layout\r\n\t$tw.utils.forceLayout(targetElement);\r\n\t// Apply the ending transitions with a timeout to ensure that the previously applied transformations are applied first\r\n\tvar self = this,\r\n\t\tprevCurrentTiddler = this.currentTiddlerDomNode;\r\n\tthis.currentTiddlerDomNode = targetElement;\r\n\t// Transform the target tiddler to its natural size\r\n\t$tw.utils.setStyle(targetElement,[\r\n\t\t{transition: $tw.utils.roundTripPropertyName(\"transform\") + \" \" + duration + \"ms \" + easing + \", opacity \" + duration + \"ms \" + easing},\r\n\t\t{opacity: \"1.0\"},\r\n\t\t{transform: \"translateX(0px) translateY(0px) scale(1)\"},\r\n\t\t{zIndex: \"500\"},\r\n\t]);\r\n\t// Transform the previous tiddler out of the way and then hide it\r\n\tif(prevCurrentTiddler && prevCurrentTiddler !== targetElement) {\r\n\t\tscale = zoomBounds.width / sourceBounds.width;\r\n\t\tx = zoomBounds.left - targetBounds.left - (sourceBounds.left - targetBounds.left) * scale;\r\n\t\ty = zoomBounds.top - targetBounds.top - (sourceBounds.top - targetBounds.top) * scale;\r\n\t\t$tw.utils.setStyle(prevCurrentTiddler,[\r\n\t\t\t{transition: $tw.utils.roundTripPropertyName(\"transform\") + \" \" + duration + \"ms \" + easing + \", opacity \" + duration + \"ms \" + easing},\r\n\t\t\t{opacity: \"0.0\"},\r\n\t\t\t{transformOrigin: \"0 0\"},\r\n\t\t\t{transform: \"translateX(\" + x + \"px) translateY(\" + y + \"px) scale(\" + scale + \")\"},\r\n\t\t\t{zIndex: \"0\"}\r\n\t\t]);\r\n\t\t// Hide the tiddler when the transition has finished\r\n\t\tsetTimeout(function() {\r\n\t\t\tif(self.currentTiddlerDomNode !== prevCurrentTiddler) {\r\n\t\t\t\tprevCurrentTiddler.style.display = \"none\";\r\n\t\t\t}\r\n\t\t},duration);\r\n\t}\r\n\t// Scroll the target into view\r\n//\t$tw.pageScroller.scrollIntoView(targetElement);\r\n};\r\n\r\n/*\r\nFind the first child DOM node of a widget that has the class \"tc-title\"\r\n*/\r\nfunction findTitleDomNode(widget,targetClass) {\r\n\ttargetClass = targetClass || \"tc-title\";\r\n\tvar domNode = widget.findFirstDomNode();\r\n\tif(domNode && domNode.querySelector) {\r\n\t\treturn domNode.querySelector(\".\" + targetClass);\r\n\t}\r\n\treturn null;\r\n}\r\n\r\nZoominListView.prototype.insert = function(widget) {\r\n\tvar targetElement = widget.findFirstDomNode();\r\n\t// Abandon if the list entry isn't a DOM element (it might be a text node)\r\n\tif(!(targetElement instanceof Element)) {\r\n\t\treturn;\r\n\t}\r\n\t// Make the newly inserted node position absolute and hidden\r\n\t$tw.utils.addClass(targetElement,\"tc-storyview-zoomin-tiddler\");\r\n\t$tw.utils.setStyle(targetElement,[\r\n\t\t{display: \"none\"}\r\n\t]);\r\n};\r\n\r\nZoominListView.prototype.remove = function(widget) {\r\n\tvar targetElement = widget.findFirstDomNode(),\r\n\t\tduration = $tw.utils.getAnimationDuration(),\r\n\t\tremoveElement = function() {\r\n\t\t\twidget.removeChildDomNodes();\r\n\t\t};\r\n\t// Abandon if the list entry isn't a DOM element (it might be a text node)\r\n\tif(!(targetElement instanceof Element)) {\r\n\t\tremoveElement();\r\n\t\treturn;\r\n\t}\r\n\t// Set up the tiddler that is being closed\r\n\t$tw.utils.addClass(targetElement,\"tc-storyview-zoomin-tiddler\");\r\n\t$tw.utils.setStyle(targetElement,[\r\n\t\t{display: \"block\"},\r\n\t\t{transformOrigin: \"50% 50%\"},\r\n\t\t{transform: \"translateX(0px) translateY(0px) scale(1)\"},\r\n\t\t{transition: \"none\"},\r\n\t\t{zIndex: \"0\"}\r\n\t]);\r\n\t// We'll move back to the previous or next element in the story\r\n\tvar toWidget = widget.previousSibling();\r\n\tif(!toWidget) {\r\n\t\ttoWidget = widget.nextSibling();\r\n\t}\r\n\tvar toWidgetDomNode = toWidget && toWidget.findFirstDomNode();\r\n\t// Set up the tiddler we're moving back in\r\n\tif(toWidgetDomNode) {\r\n\t\t$tw.utils.addClass(toWidgetDomNode,\"tc-storyview-zoomin-tiddler\");\r\n\t\t$tw.utils.setStyle(toWidgetDomNode,[\r\n\t\t\t{display: \"block\"},\r\n\t\t\t{transformOrigin: \"50% 50%\"},\r\n\t\t\t{transform: \"translateX(0px) translateY(0px) scale(10)\"},\r\n\t\t\t{transition: $tw.utils.roundTripPropertyName(\"transform\") + \" \" + duration + \"ms \" + easing + \", opacity \" + duration + \"ms \" + easing},\r\n\t\t\t{opacity: \"0\"},\r\n\t\t\t{zIndex: \"500\"}\r\n\t\t]);\r\n\t\tthis.currentTiddlerDomNode = toWidgetDomNode;\r\n\t}\r\n\t// Animate them both\r\n\t// Force layout\r\n\t$tw.utils.forceLayout(this.listWidget.parentDomNode);\r\n\t// First, the tiddler we're closing\r\n\t$tw.utils.setStyle(targetElement,[\r\n\t\t{transformOrigin: \"50% 50%\"},\r\n\t\t{transform: \"translateX(0px) translateY(0px) scale(0.1)\"},\r\n\t\t{transition: $tw.utils.roundTripPropertyName(\"transform\") + \" \" + duration + \"ms \" + easing + \", opacity \" + duration + \"ms \" + easing},\r\n\t\t{opacity: \"0\"},\r\n\t\t{zIndex: \"0\"}\r\n\t]);\r\n\tsetTimeout(removeElement,duration);\r\n\t// Now the tiddler we're going back to\r\n\tif(toWidgetDomNode) {\r\n\t\t$tw.utils.setStyle(toWidgetDomNode,[\r\n\t\t\t{transform: \"translateX(0px) translateY(0px) scale(1)\"},\r\n\t\t\t{opacity: \"1\"}\r\n\t\t]);\r\n\t}\r\n\treturn true; // Indicate that we'll delete the DOM node\r\n};\r\n\r\nexports.zoomin = ZoominListView;\r\n\r\n})();",
"title": "$:/core/modules/storyviews/zoomin.js",
"type": "application/javascript",
"module-type": "storyview"
},
"$:/core/modules/syncer.js": {
"text": "/*\\\r\ntitle: $:/core/modules/syncer.js\r\ntype: application/javascript\r\nmodule-type: global\r\n\r\nThe syncer tracks changes to the store. If a syncadaptor is used then individual tiddlers are synchronised through it. If there is no syncadaptor then the entire wiki is saved via saver modules.\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nInstantiate the syncer with the following options:\r\nsyncadaptor: reference to syncadaptor to be used\r\nwiki: wiki to be synced\r\n*/\r\nfunction Syncer(options) {\r\n\tvar self = this;\r\n\tthis.wiki = options.wiki;\r\n\tthis.syncadaptor = options.syncadaptor;\r\n\t// Make a logger\r\n\tthis.logger = new $tw.utils.Logger(\"syncer\" + ($tw.browser ? \"-browser\" : \"\") + ($tw.node ? \"-server\" : \"\"));\r\n\t// Compile the dirty tiddler filter\r\n\tthis.filterFn = this.wiki.compileFilter(this.wiki.getTiddlerText(this.titleSyncFilter));\r\n\t// Record information for known tiddlers\r\n\tthis.readTiddlerInfo();\r\n\t// Tasks are {type: \"load\"/\"save\"/\"delete\", title:, queueTime:, lastModificationTime:}\r\n\tthis.taskQueue = {}; // Hashmap of tasks yet to be performed\r\n\tthis.taskInProgress = {}; // Hash of tasks in progress\r\n\tthis.taskTimerId = null; // Timer for task dispatch\r\n\tthis.pollTimerId = null; // Timer for polling server\r\n\t// Listen out for changes to tiddlers\r\n\tthis.wiki.addEventListener(\"change\",function(changes) {\r\n\t\tself.syncToServer(changes);\r\n\t});\r\n\t// Browser event handlers\r\n\tif($tw.browser) {\r\n\t\t// Set up our beforeunload handler\r\n\t\twindow.onbeforeunload = function(event) {\r\n\t\t\tvar confirmationMessage;\r\n\t\t\tif(self.isDirty()) {\r\n\t\t\t\tconfirmationMessage = $tw.language.getString(\"UnsavedChangesWarning\");\r\n\t\t\t\tevent.returnValue = confirmationMessage; // Gecko\r\n\t\t\t}\r\n\t\t\treturn confirmationMessage;\r\n\t\t};\r\n\t\t// Listen out for login/logout/refresh events in the browser\r\n\t\t$tw.rootWidget.addEventListener(\"tm-login\",function() {\r\n\t\t\tself.handleLoginEvent();\r\n\t\t});\r\n\t\t$tw.rootWidget.addEventListener(\"tm-logout\",function() {\r\n\t\t\tself.handleLogoutEvent();\r\n\t\t});\r\n\t\t$tw.rootWidget.addEventListener(\"tm-server-refresh\",function() {\r\n\t\t\tself.handleRefreshEvent();\r\n\t\t});\r\n\t}\r\n\t// Listen out for lazyLoad events\r\n\tthis.wiki.addEventListener(\"lazyLoad\",function(title) {\r\n\t\tself.handleLazyLoadEvent(title);\r\n\t});\r\n\t// Get the login status\r\n\tthis.getStatus(function(err,isLoggedIn) {\r\n\t\t// Do a sync from the server\r\n\t\tself.syncFromServer();\r\n\t});\r\n}\r\n\r\n/*\r\nConstants\r\n*/\r\nSyncer.prototype.titleIsLoggedIn = \"$:/status/IsLoggedIn\";\r\nSyncer.prototype.titleUserName = \"$:/status/UserName\";\r\nSyncer.prototype.titleSyncFilter = \"$:/config/SyncFilter\";\r\nSyncer.prototype.titleSavedNotification = \"$:/language/Notifications/Save/Done\";\r\nSyncer.prototype.taskTimerInterval = 1 * 1000; // Interval for sync timer\r\nSyncer.prototype.throttleInterval = 1 * 1000; // Defer saving tiddlers if they've changed in the last 1s...\r\nSyncer.prototype.fallbackInterval = 10 * 1000; // Unless the task is older than 10s\r\nSyncer.prototype.pollTimerInterval = 60 * 1000; // Interval for polling for changes from the adaptor\r\n\r\n\r\n/*\r\nRead (or re-read) the latest tiddler info from the store\r\n*/\r\nSyncer.prototype.readTiddlerInfo = function() {\r\n\t// Hashmap by title of {revision:,changeCount:,adaptorInfo:}\r\n\tthis.tiddlerInfo = {};\r\n\t// Record information for known tiddlers\r\n\tvar self = this,\r\n\t\ttiddlers = this.filterFn.call(this.wiki);\r\n\t$tw.utils.each(tiddlers,function(title) {\r\n\t\tvar tiddler = self.wiki.getTiddler(title);\r\n\t\tself.tiddlerInfo[title] = {\r\n\t\t\trevision: tiddler.fields.revision,\r\n\t\t\tadaptorInfo: self.syncadaptor && self.syncadaptor.getTiddlerInfo(tiddler),\r\n\t\t\tchangeCount: self.wiki.getChangeCount(title)\r\n\t\t};\r\n\t});\r\n};\r\n\r\n/*\r\nChecks whether the wiki is dirty (ie the window shouldn't be closed)\r\n*/\r\nSyncer.prototype.isDirty = function() {\r\n\treturn (this.numTasksInQueue() > 0) || (this.numTasksInProgress() > 0);\r\n};\r\n\r\n/*\r\nUpdate the document body with the class \"tc-dirty\" if the wiki has unsaved/unsynced changes\r\n*/\r\nSyncer.prototype.updateDirtyStatus = function() {\r\n\tif($tw.browser) {\r\n\t\t$tw.utils.toggleClass(document.body,\"tc-dirty\",this.isDirty());\r\n\t}\r\n};\r\n\r\n/*\r\nSave an incoming tiddler in the store, and updates the associated tiddlerInfo\r\n*/\r\nSyncer.prototype.storeTiddler = function(tiddlerFields) {\r\n\t// Save the tiddler\r\n\tvar tiddler = new $tw.Tiddler(this.wiki.getTiddler(tiddlerFields.title),tiddlerFields);\r\n\tthis.wiki.addTiddler(tiddler);\r\n\t// Save the tiddler revision and changeCount details\r\n\tthis.tiddlerInfo[tiddlerFields.title] = {\r\n\t\trevision: tiddlerFields.revision,\r\n\t\tadaptorInfo: this.syncadaptor.getTiddlerInfo(tiddler),\r\n\t\tchangeCount: this.wiki.getChangeCount(tiddlerFields.title)\r\n\t};\r\n};\r\n\r\nSyncer.prototype.getStatus = function(callback) {\r\n\tvar self = this;\r\n\t// Check if the adaptor supports getStatus()\r\n\tif(this.syncadaptor && this.syncadaptor.getStatus) {\r\n\t\t// Mark us as not logged in\r\n\t\tthis.wiki.addTiddler({title: this.titleIsLoggedIn,text: \"no\"});\r\n\t\t// Get login status\r\n\t\tthis.syncadaptor.getStatus(function(err,isLoggedIn,username) {\r\n\t\t\tif(err) {\r\n\t\t\t\tself.logger.alert(err);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t// Set the various status tiddlers\r\n\t\t\tself.wiki.addTiddler({title: self.titleIsLoggedIn,text: isLoggedIn ? \"yes\" : \"no\"});\r\n\t\t\tif(isLoggedIn) {\r\n\t\t\t\tself.wiki.addTiddler({title: self.titleUserName,text: username || \"\"});\r\n\t\t\t} else {\r\n\t\t\t\tself.wiki.deleteTiddler(self.titleUserName);\r\n\t\t\t}\r\n\t\t\t// Invoke the callback\r\n\t\t\tif(callback) {\r\n\t\t\t\tcallback(err,isLoggedIn,username);\r\n\t\t\t}\r\n\t\t});\r\n\t} else {\r\n\t\tcallback(null,true,\"UNAUTHENTICATED\");\r\n\t}\r\n};\r\n\r\n/*\r\nSynchronise from the server by reading the skinny tiddler list and queuing up loads for any tiddlers that we don't already have up to date\r\n*/\r\nSyncer.prototype.syncFromServer = function() {\r\n\tif(this.syncadaptor && this.syncadaptor.getSkinnyTiddlers) {\r\n\t\tthis.logger.log(\"Retrieving skinny tiddler list\");\r\n\t\tvar self = this;\r\n\t\tif(this.pollTimerId) {\r\n\t\t\tclearTimeout(this.pollTimerId);\r\n\t\t\tthis.pollTimerId = null;\r\n\t\t}\r\n\t\tthis.syncadaptor.getSkinnyTiddlers(function(err,tiddlers) {\r\n\t\t\t// Trigger the next sync\r\n\t\t\tself.pollTimerId = setTimeout(function() {\r\n\t\t\t\tself.pollTimerId = null;\r\n\t\t\t\tself.syncFromServer.call(self);\r\n\t\t\t},self.pollTimerInterval);\r\n\t\t\t// Check for errors\r\n\t\t\tif(err) {\r\n\t\t\t\tself.logger.alert(\"Error retrieving skinny tiddler list:\",err);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t// Process each incoming tiddler\r\n\t\t\tfor(var t=0; t<tiddlers.length; t++) {\r\n\t\t\t\t// Get the incoming tiddler fields, and the existing tiddler\r\n\t\t\t\tvar tiddlerFields = tiddlers[t],\r\n\t\t\t\t\tincomingRevision = tiddlerFields.revision + \"\",\r\n\t\t\t\t\ttiddler = self.wiki.getTiddler(tiddlerFields.title),\r\n\t\t\t\t\ttiddlerInfo = self.tiddlerInfo[tiddlerFields.title],\r\n\t\t\t\t\tcurrRevision = tiddlerInfo ? tiddlerInfo.revision : null;\r\n\t\t\t\t// Ignore the incoming tiddler if it's the same as the revision we've already got\r\n\t\t\t\tif(currRevision !== incomingRevision) {\r\n\t\t\t\t\t// Do a full load if we've already got a fat version of the tiddler\r\n\t\t\t\t\tif(tiddler && tiddler.fields.text !== undefined) {\r\n\t\t\t\t\t\t// Do a full load of this tiddler\r\n\t\t\t\t\t\tself.enqueueSyncTask({\r\n\t\t\t\t\t\t\ttype: \"load\",\r\n\t\t\t\t\t\t\ttitle: tiddlerFields.title\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// Load the skinny version of the tiddler\r\n\t\t\t\t\t\tself.storeTiddler(tiddlerFields);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n};\r\n\r\n/*\r\nSynchronise a set of changes to the server\r\n*/\r\nSyncer.prototype.syncToServer = function(changes) {\r\n\tvar self = this,\r\n\t\tnow = Date.now(),\r\n\t\tfilteredChanges = this.filterFn.call(this.wiki,function(callback) {\r\n\t\t\t$tw.utils.each(changes,function(change,title) {\r\n\t\t\t\tvar tiddler = self.wiki.getTiddler(title);\r\n\t\t\t\tcallback(tiddler,title);\r\n\t\t\t});\r\n\t\t});\r\n\t$tw.utils.each(changes,function(change,title,object) {\r\n\t\t// Process the change if it is a deletion of a tiddler we're already syncing, or is on the filtered change list\r\n\t\tif((change.deleted && $tw.utils.hop(self.tiddlerInfo,title)) || filteredChanges.indexOf(title) !== -1) {\r\n\t\t\t// Queue a task to sync this tiddler\r\n\t\t\tself.enqueueSyncTask({\r\n\t\t\t\ttype: change.deleted ? \"delete\" : \"save\",\r\n\t\t\t\ttitle: title\r\n\t\t\t});\r\n\t\t}\r\n\t});\r\n};\r\n\r\n/*\r\nLazily load a skinny tiddler if we can\r\n*/\r\nSyncer.prototype.handleLazyLoadEvent = function(title) {\r\n\t// Queue up a sync task to load this tiddler\r\n\tthis.enqueueSyncTask({\r\n\t\ttype: \"load\",\r\n\t\ttitle: title\r\n\t});\r\n};\r\n\r\n/*\r\nDispay a password prompt and allow the user to login\r\n*/\r\nSyncer.prototype.handleLoginEvent = function() {\r\n\tvar self = this;\r\n\tthis.getStatus(function(err,isLoggedIn,username) {\r\n\t\tif(!isLoggedIn) {\r\n\t\t\t$tw.passwordPrompt.createPrompt({\r\n\t\t\t\tserviceName: \"Login to TiddlySpace\",\r\n\t\t\t\tcallback: function(data) {\r\n\t\t\t\t\tself.login(data.username,data.password,function(err,isLoggedIn) {\r\n\t\t\t\t\t\tself.syncFromServer();\r\n\t\t\t\t\t});\r\n\t\t\t\t\treturn true; // Get rid of the password prompt\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t});\r\n};\r\n\r\n/*\r\nAttempt to login to TiddlyWeb.\r\n\tusername: username\r\n\tpassword: password\r\n\tcallback: invoked with arguments (err,isLoggedIn)\r\n*/\r\nSyncer.prototype.login = function(username,password,callback) {\r\n\tthis.logger.log(\"Attempting to login as\",username);\r\n\tvar self = this;\r\n\tif(this.syncadaptor.login) {\r\n\t\tthis.syncadaptor.login(username,password,function(err) {\r\n\t\t\tif(err) {\r\n\t\t\t\treturn callback(err);\r\n\t\t\t}\r\n\t\t\tself.getStatus(function(err,isLoggedIn,username) {\r\n\t\t\t\tif(callback) {\r\n\t\t\t\t\tcallback(null,isLoggedIn);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t});\r\n\t} else {\r\n\t\tcallback(null,true);\r\n\t}\r\n};\r\n\r\n/*\r\nAttempt to log out of TiddlyWeb\r\n*/\r\nSyncer.prototype.handleLogoutEvent = function() {\r\n\tthis.logger.log(\"Attempting to logout\");\r\n\tvar self = this;\r\n\tif(this.syncadaptor.logout) {\r\n\t\tthis.syncadaptor.logout(function(err) {\r\n\t\t\tif(err) {\r\n\t\t\t\tself.logger.alert(err);\r\n\t\t\t} else {\r\n\t\t\t\tself.getStatus();\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n};\r\n\r\n/*\r\nImmediately refresh from the server\r\n*/\r\nSyncer.prototype.handleRefreshEvent = function() {\r\n\tthis.syncFromServer();\r\n};\r\n\r\n/*\r\nQueue up a sync task. If there is already a pending task for the tiddler, just update the last modification time\r\n*/\r\nSyncer.prototype.enqueueSyncTask = function(task) {\r\n\tvar self = this,\r\n\t\tnow = Date.now();\r\n\t// Set the timestamps on this task\r\n\ttask.queueTime = now;\r\n\ttask.lastModificationTime = now;\r\n\t// Fill in some tiddlerInfo if the tiddler is one we haven't seen before\r\n\tif(!$tw.utils.hop(this.tiddlerInfo,task.title)) {\r\n\t\tthis.tiddlerInfo[task.title] = {\r\n\t\t\trevision: null,\r\n\t\t\tadaptorInfo: {},\r\n\t\t\tchangeCount: -1\r\n\t\t};\r\n\t}\r\n\t// Bail if this is a save and the tiddler is already at the changeCount that the server has\r\n\tif(task.type === \"save\" && this.wiki.getChangeCount(task.title) <= this.tiddlerInfo[task.title].changeCount) {\r\n\t\treturn;\r\n\t}\r\n\t// Check if this tiddler is already in the queue\r\n\tif($tw.utils.hop(this.taskQueue,task.title)) {\r\n\t\t// this.logger.log(\"Re-queueing up sync task with type:\",task.type,\"title:\",task.title);\r\n\t\tvar existingTask = this.taskQueue[task.title];\r\n\t\t// If so, just update the last modification time\r\n\t\texistingTask.lastModificationTime = task.lastModificationTime;\r\n\t\t// If the new task is a save then we upgrade the existing task to a save. Thus a pending load is turned into a save if the tiddler changes locally in the meantime. But a pending save is not modified to become a load\r\n\t\tif(task.type === \"save\" || task.type === \"delete\") {\r\n\t\t\texistingTask.type = task.type;\r\n\t\t}\r\n\t} else {\r\n\t\t// this.logger.log(\"Queuing up sync task with type:\",task.type,\"title:\",task.title);\r\n\t\t// If it is not in the queue, insert it\r\n\t\tthis.taskQueue[task.title] = task;\r\n\t\tthis.updateDirtyStatus();\r\n\t}\r\n\t// Process the queue\r\n\t$tw.utils.nextTick(function() {self.processTaskQueue.call(self);});\r\n};\r\n\r\n/*\r\nReturn the number of tasks in progress\r\n*/\r\nSyncer.prototype.numTasksInProgress = function() {\r\n\treturn $tw.utils.count(this.taskInProgress);\r\n};\r\n\r\n/*\r\nReturn the number of tasks in the queue\r\n*/\r\nSyncer.prototype.numTasksInQueue = function() {\r\n\treturn $tw.utils.count(this.taskQueue);\r\n};\r\n\r\n/*\r\nTrigger a timeout if one isn't already outstanding\r\n*/\r\nSyncer.prototype.triggerTimeout = function() {\r\n\tvar self = this;\r\n\tif(!this.taskTimerId) {\r\n\t\tthis.taskTimerId = setTimeout(function() {\r\n\t\t\tself.taskTimerId = null;\r\n\t\t\tself.processTaskQueue.call(self);\r\n\t\t},self.taskTimerInterval);\r\n\t}\r\n};\r\n\r\n/*\r\nProcess the task queue, performing the next task if appropriate\r\n*/\r\nSyncer.prototype.processTaskQueue = function() {\r\n\tvar self = this;\r\n\t// Only process a task if we're not already performing a task. If we are already performing a task then we'll dispatch the next one when it completes\r\n\tif(this.numTasksInProgress() === 0) {\r\n\t\t// Choose the next task to perform\r\n\t\tvar task = this.chooseNextTask();\r\n\t\t// Perform the task if we had one\r\n\t\tif(task) {\r\n\t\t\t// Remove the task from the queue and add it to the in progress list\r\n\t\t\tdelete this.taskQueue[task.title];\r\n\t\t\tthis.taskInProgress[task.title] = task;\r\n\t\t\tthis.updateDirtyStatus();\r\n\t\t\t// Dispatch the task\r\n\t\t\tthis.dispatchTask(task,function(err) {\r\n\t\t\t\tif(err) {\r\n\t\t\t\t\tself.logger.alert(\"Sync error while processing '\" + task.title + \"':\\n\" + err);\r\n\t\t\t\t}\r\n\t\t\t\t// Mark that this task is no longer in progress\r\n\t\t\t\tdelete self.taskInProgress[task.title];\r\n\t\t\t\tself.updateDirtyStatus();\r\n\t\t\t\t// Process the next task\r\n\t\t\t\tself.processTaskQueue.call(self);\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\t// Make sure we've set a time if there wasn't a task to perform, but we've still got tasks in the queue\r\n\t\t\tif(this.numTasksInQueue() > 0) {\r\n\t\t\t\tthis.triggerTimeout();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\n\r\n/*\r\nChoose the next applicable task\r\n*/\r\nSyncer.prototype.chooseNextTask = function() {\r\n\tvar self = this,\r\n\t\tcandidateTask = null,\r\n\t\tnow = Date.now();\r\n\t// Select the best candidate task\r\n\t$tw.utils.each(this.taskQueue,function(task,title) {\r\n\t\t// Exclude the task if there's one of the same name in progress\r\n\t\tif($tw.utils.hop(self.taskInProgress,title)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t// Exclude the task if it is a save and the tiddler has been modified recently, but not hit the fallback time\r\n\t\tif(task.type === \"save\" && (now - task.lastModificationTime) < self.throttleInterval &&\r\n\t\t\t(now - task.queueTime) < self.fallbackInterval) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t// Exclude the task if it is newer than the current best candidate\r\n\t\tif(candidateTask && candidateTask.queueTime < task.queueTime) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t// Now this is our best candidate\r\n\t\tcandidateTask = task;\r\n\t});\r\n\treturn candidateTask;\r\n};\r\n\r\n/*\r\nDispatch a task and invoke the callback\r\n*/\r\nSyncer.prototype.dispatchTask = function(task,callback) {\r\n\tvar self = this;\r\n\tif(task.type === \"save\") {\r\n\t\tvar changeCount = this.wiki.getChangeCount(task.title),\r\n\t\t\ttiddler = this.wiki.getTiddler(task.title);\r\n\t\tthis.logger.log(\"Dispatching 'save' task:\",task.title);\r\n\t\tif(tiddler) {\r\n\t\t\tthis.syncadaptor.saveTiddler(tiddler,function(err,adaptorInfo,revision) {\r\n\t\t\t\tif(err) {\r\n\t\t\t\t\treturn callback(err);\r\n\t\t\t\t}\r\n\t\t\t\t// Adjust the info stored about this tiddler\r\n\t\t\t\tself.tiddlerInfo[task.title] = {\r\n\t\t\t\t\tchangeCount: changeCount,\r\n\t\t\t\t\tadaptorInfo: adaptorInfo,\r\n\t\t\t\t\trevision: revision\r\n\t\t\t\t};\r\n\t\t\t\t// Invoke the callback\r\n\t\t\t\tcallback(null);\r\n\t\t\t},{\r\n\t\t\t\ttiddlerInfo: self.tiddlerInfo[task.title]\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tthis.logger.log(\" Not Dispatching 'save' task:\",task.title,\"tiddler does not exist\");\r\n\t\t\treturn callback(null);\r\n\t\t}\r\n\t} else if(task.type === \"load\") {\r\n\t\t// Load the tiddler\r\n\t\tthis.logger.log(\"Dispatching 'load' task:\",task.title);\r\n\t\tthis.syncadaptor.loadTiddler(task.title,function(err,tiddlerFields) {\r\n\t\t\tif(err) {\r\n\t\t\t\treturn callback(err);\r\n\t\t\t}\r\n\t\t\t// Store the tiddler\r\n\t\t\tif(tiddlerFields) {\r\n\t\t\t\tself.storeTiddler(tiddlerFields);\r\n\t\t\t}\r\n\t\t\t// Invoke the callback\r\n\t\t\tcallback(null);\r\n\t\t});\r\n\t} else if(task.type === \"delete\") {\r\n\t\t// Delete the tiddler\r\n\t\tthis.logger.log(\"Dispatching 'delete' task:\",task.title);\r\n\t\tthis.syncadaptor.deleteTiddler(task.title,function(err) {\r\n\t\t\tif(err) {\r\n\t\t\t\treturn callback(err);\r\n\t\t\t}\r\n\t\t\tdelete self.tiddlerInfo[task.title];\r\n\t\t\t// Invoke the callback\r\n\t\t\tcallback(null);\r\n\t\t},{\r\n\t\t\ttiddlerInfo: self.tiddlerInfo[task.title]\r\n\t\t});\r\n\t}\r\n};\r\n\r\nexports.Syncer = Syncer;\r\n\r\n})();\r\n",
"title": "$:/core/modules/syncer.js",
"type": "application/javascript",
"module-type": "global"
},
"$:/core/modules/tiddler.js": {
"text": "/*\\\r\ntitle: $:/core/modules/tiddler.js\r\ntype: application/javascript\r\nmodule-type: tiddlermethod\r\n\r\nExtension methods for the $tw.Tiddler object (constructor and methods required at boot time are in boot/boot.js)\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nexports.hasTag = function(tag) {\r\n\treturn this.fields.tags && this.fields.tags.indexOf(tag) !== -1;\r\n};\r\n\r\nexports.isPlugin = function() {\r\n\treturn this.fields.type === \"application/json\" && this.hasField(\"plugin-type\");\r\n};\r\n\r\nexports.isDraft = function() {\r\n\treturn this.hasField(\"draft.of\");\r\n};\r\n\r\nexports.getFieldString = function(field) {\r\n\tvar value = this.fields[field];\r\n\t// Check for a missing field\r\n\tif(value === undefined || value === null) {\r\n\t\treturn \"\";\r\n\t}\r\n\t// Parse the field with the associated module (if any)\r\n\tvar fieldModule = $tw.Tiddler.fieldModules[field];\r\n\tif(fieldModule && fieldModule.stringify) {\r\n\t\treturn fieldModule.stringify.call(this,value);\r\n\t} else {\r\n\t\treturn value.toString();\r\n\t}\r\n};\r\n\r\n/*\r\nGet all the fields as a name:value block. Options:\r\n\texclude: an array of field names to exclude\r\n*/\r\nexports.getFieldStringBlock = function(options) {\r\n\toptions = options || {};\r\n\tvar exclude = options.exclude || [];\r\n\tvar fields = [];\r\n\tfor(var field in this.fields) {\r\n\t\tif($tw.utils.hop(this.fields,field)) {\r\n\t\t\tif(exclude.indexOf(field) === -1) {\r\n\t\t\t\tfields.push(field + \": \" + this.getFieldString(field));\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn fields.join(\"\\n\");\r\n};\r\n\r\n/*\r\nCompare two tiddlers for equality\r\ntiddler: the tiddler to compare\r\nexcludeFields: array of field names to exclude from the comparison\r\n*/\r\nexports.isEqual = function(tiddler,excludeFields) {\r\n\tif(!(tiddler instanceof $tw.Tiddler)) {\r\n\t\treturn false;\r\n\t}\r\n\texcludeFields = excludeFields || [];\r\n\tvar self = this,\r\n\t\tdifferences = []; // Fields that have differences\r\n\t// Add to the differences array\r\n\tfunction addDifference(fieldName) {\r\n\t\t// Check for this field being excluded\r\n\t\tif(excludeFields.indexOf(fieldName) === -1) {\r\n\t\t\t// Save the field as a difference\r\n\t\t\t$tw.utils.pushTop(differences,fieldName);\r\n\t\t}\r\n\t}\r\n\t// Returns true if the two values of this field are equal\r\n\tfunction isFieldValueEqual(fieldName) {\r\n\t\tvar valueA = self.fields[fieldName],\r\n\t\t\tvalueB = tiddler.fields[fieldName];\r\n\t\t// Check for identical string values\r\n\t\tif(typeof(valueA) === \"string\" && typeof(valueB) === \"string\" && valueA === valueB) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t// Check for identical array values\r\n\t\tif($tw.utils.isArray(valueA) && $tw.utils.isArray(valueB) && $tw.utils.isArrayEqual(valueA,valueB)) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t// Otherwise the fields must be different\r\n\t\treturn false;\r\n\t}\r\n\t// Compare our fields\r\n\tfor(var fieldName in this.fields) {\r\n\t\tif(!isFieldValueEqual(fieldName)) {\r\n\t\t\taddDifference(fieldName);\r\n\t\t}\r\n\t}\r\n\t// There's a difference for every field in the other tiddler that we don't have\r\n\tfor(fieldName in tiddler.fields) {\r\n\t\tif(!(fieldName in this.fields)) {\r\n\t\t\taddDifference(fieldName);\r\n\t\t}\r\n\t}\r\n\t// Return whether there were any differences\r\n\treturn differences.length === 0;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/tiddler.js",
"type": "application/javascript",
"module-type": "tiddlermethod"
},
"$:/core/modules/upgraders/plugins.js": {
"text": "/*\\\r\ntitle: $:/core/modules/upgraders/plugins.js\r\ntype: application/javascript\r\nmodule-type: upgrader\r\n\r\nUpgrader module that checks that plugins are newer than any already installed version\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar UPGRADE_LIBRARY_TITLE = \"$:/UpgradeLibrary\";\r\n\r\nvar BLOCKED_PLUGINS = {\r\n\t\"$:/themes/tiddlywiki/stickytitles\": {\r\n\t\tversions: [\"*\"]\r\n\t},\r\n\t\"$:/plugins/tiddlywiki/fullscreen\": {\r\n\t\tversions: [\"*\"]\r\n\t}\r\n};\r\n\r\nexports.upgrade = function(wiki,titles,tiddlers) {\r\n\tvar self = this,\r\n\t\tmessages = {},\r\n\t\tupgradeLibrary,\r\n\t\tgetLibraryTiddler = function(title) {\r\n\t\t\tif(!upgradeLibrary) {\r\n\t\t\t\tupgradeLibrary = wiki.getTiddlerData(UPGRADE_LIBRARY_TITLE,{});\r\n\t\t\t\tupgradeLibrary.tiddlers = upgradeLibrary.tiddlers || {};\r\n\t\t\t}\r\n\t\t\treturn upgradeLibrary.tiddlers[title];\r\n\t\t};\r\n\r\n\t// Go through all the incoming tiddlers\r\n\t$tw.utils.each(titles,function(title) {\r\n\t\tvar incomingTiddler = tiddlers[title];\r\n\t\t// Check if we're dealing with a plugin\r\n\t\tif(incomingTiddler && incomingTiddler[\"plugin-type\"] && incomingTiddler.version) {\r\n\t\t\t// Upgrade the incoming plugin if we've got a newer version in the upgrade library\r\n\t\t\tvar libraryTiddler = getLibraryTiddler(title);\r\n\t\t\tif(libraryTiddler && libraryTiddler[\"plugin-type\"] && libraryTiddler.version) {\r\n\t\t\t\tif($tw.utils.checkVersions(libraryTiddler.version,incomingTiddler.version)) {\r\n\t\t\t\t\ttiddlers[title] = libraryTiddler;\r\n\t\t\t\t\tmessages[title] = $tw.language.getString(\"Import/Upgrader/Plugins/Upgraded\",{variables: {incoming: incomingTiddler.version, upgraded: libraryTiddler.version}});\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// Suppress the incoming plugin if it is older than the currently installed one\r\n\t\t\tvar existingTiddler = wiki.getTiddler(title);\r\n\t\t\tif(existingTiddler && existingTiddler.hasField(\"plugin-type\") && existingTiddler.hasField(\"version\")) {\r\n\t\t\t\t// Reject the incoming plugin by blanking all its fields\r\n\t\t\t\tif($tw.utils.checkVersions(existingTiddler.fields.version,incomingTiddler.version)) {\r\n\t\t\t\t\ttiddlers[title] = Object.create(null);\r\n\t\t\t\t\tmessages[title] = $tw.language.getString(\"Import/Upgrader/Plugins/Suppressed/Version\",{variables: {incoming: incomingTiddler.version, existing: existingTiddler.fields.version}});\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(incomingTiddler && incomingTiddler[\"plugin-type\"]) {\r\n\t\t\t// Check whether the plugin is on the blocked list\r\n\t\t\tvar blockInfo = BLOCKED_PLUGINS[title];\r\n\t\t\tif(blockInfo) {\r\n\t\t\t\tif(blockInfo.versions.indexOf(\"*\") !== -1 || (incomingTiddler.version && blockInfo.versions.indexOf(incomingTiddler.version) !== -1)) {\r\n\t\t\t\t\ttiddlers[title] = Object.create(null);\r\n\t\t\t\t\tmessages[title] = $tw.language.getString(\"Import/Upgrader/Plugins/Suppressed/Incompatible\");\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\treturn messages;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/upgraders/plugins.js",
"type": "application/javascript",
"module-type": "upgrader"
},
"$:/core/modules/upgraders/system.js": {
"text": "/*\\\r\ntitle: $:/core/modules/upgraders/system.js\r\ntype: application/javascript\r\nmodule-type: upgrader\r\n\r\nUpgrader module that suppresses certain system tiddlers that shouldn't be imported\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar DONT_IMPORT_LIST = [\"$:/StoryList\",\"$:/HistoryList\"],\r\n\tDONT_IMPORT_PREFIX_LIST = [\"$:/temp/\",\"$:/state/\"];\r\n\r\nexports.upgrade = function(wiki,titles,tiddlers) {\r\n\tvar self = this,\r\n\t\tmessages = {};\r\n\t// Check for tiddlers on our list\r\n\t$tw.utils.each(titles,function(title) {\r\n\t\tif(DONT_IMPORT_LIST.indexOf(title) !== -1) {\r\n\t\t\ttiddlers[title] = Object.create(null);\r\n\t\t\tmessages[title] = $tw.language.getString(\"Import/Upgrader/System/Suppressed\");\r\n\t\t} else {\r\n\t\t\tfor(var t=0; t<DONT_IMPORT_PREFIX_LIST.length; t++) {\r\n\t\t\t\tvar prefix = DONT_IMPORT_PREFIX_LIST[t];\r\n\t\t\t\tif(title.substr(0,prefix.length) === prefix) {\r\n\t\t\t\t\ttiddlers[title] = Object.create(null);\r\n\t\t\t\t\tmessages[title] = $tw.language.getString(\"Import/Upgrader/State/Suppressed\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\treturn messages;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/upgraders/system.js",
"type": "application/javascript",
"module-type": "upgrader"
},
"$:/core/modules/upgraders/themetweaks.js": {
"text": "/*\\\r\ntitle: $:/core/modules/upgraders/themetweaks.js\r\ntype: application/javascript\r\nmodule-type: upgrader\r\n\r\nUpgrader module that handles the change in theme tweak storage introduced in 5.0.14-beta.\r\n\r\nPreviously, theme tweaks were stored in two data tiddlers:\r\n\r\n* $:/themes/tiddlywiki/vanilla/metrics\r\n* $:/themes/tiddlywiki/vanilla/settings\r\n\r\nNow, each tweak is stored in its own separate tiddler.\r\n\r\nThis upgrader copies any values from the old format to the new. The old data tiddlers are not deleted in case they have been used to store additional indexes.\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar MAPPINGS = {\r\n\t\"$:/themes/tiddlywiki/vanilla/metrics\": {\r\n\t\t\"fontsize\": \"$:/themes/tiddlywiki/vanilla/metrics/fontsize\",\r\n\t\t\"lineheight\": \"$:/themes/tiddlywiki/vanilla/metrics/lineheight\",\r\n\t\t\"storyleft\": \"$:/themes/tiddlywiki/vanilla/metrics/storyleft\",\r\n\t\t\"storytop\": \"$:/themes/tiddlywiki/vanilla/metrics/storytop\",\r\n\t\t\"storyright\": \"$:/themes/tiddlywiki/vanilla/metrics/storyright\",\r\n\t\t\"storywidth\": \"$:/themes/tiddlywiki/vanilla/metrics/storywidth\",\r\n\t\t\"tiddlerwidth\": \"$:/themes/tiddlywiki/vanilla/metrics/tiddlerwidth\"\r\n\t},\r\n\t\"$:/themes/tiddlywiki/vanilla/settings\": {\r\n\t\t\"fontfamily\": \"$:/themes/tiddlywiki/vanilla/settings/fontfamily\"\r\n\t}\r\n};\r\n\r\nexports.upgrade = function(wiki,titles,tiddlers) {\r\n\tvar self = this,\r\n\t\tmessages = {};\r\n\t// Check for tiddlers on our list\r\n\t$tw.utils.each(titles,function(title) {\r\n\t\tvar mapping = MAPPINGS[title];\r\n\t\tif(mapping) {\r\n\t\t\tvar tiddler = new $tw.Tiddler(tiddlers[title]),\r\n\t\t\t\ttiddlerData = wiki.getTiddlerData(tiddler,{});\r\n\t\t\tfor(var index in mapping) {\r\n\t\t\t\tvar mappedTitle = mapping[index];\r\n\t\t\t\tif(!tiddlers[mappedTitle] || tiddlers[mappedTitle].title !== mappedTitle) {\r\n\t\t\t\t\ttiddlers[mappedTitle] = {\r\n\t\t\t\t\t\ttitle: mappedTitle,\r\n\t\t\t\t\t\ttext: tiddlerData[index]\r\n\t\t\t\t\t};\r\n\t\t\t\t\tmessages[mappedTitle] = $tw.language.getString(\"Import/Upgrader/ThemeTweaks/Created\",{variables: {\r\n\t\t\t\t\t\tfrom: title + \"##\" + index\r\n\t\t\t\t\t}});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\treturn messages;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/upgraders/themetweaks.js",
"type": "application/javascript",
"module-type": "upgrader"
},
"$:/core/modules/utils/crypto.js": {
"text": "/*\\\r\ntitle: $:/core/modules/utils/crypto.js\r\ntype: application/javascript\r\nmodule-type: utils\r\n\r\nUtility functions related to crypto.\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nLook for an encrypted store area in the text of a TiddlyWiki file\r\n*/\r\nexports.extractEncryptedStoreArea = function(text) {\r\n\tvar encryptedStoreAreaStartMarker = \"<pre id=\\\"encryptedStoreArea\\\" type=\\\"text/plain\\\" style=\\\"display:none;\\\">\",\r\n\t\tencryptedStoreAreaStart = text.indexOf(encryptedStoreAreaStartMarker);\r\n\tif(encryptedStoreAreaStart !== -1) {\r\n\t\tvar encryptedStoreAreaEnd = text.indexOf(\"</pre>\",encryptedStoreAreaStart);\r\n\t\tif(encryptedStoreAreaEnd !== -1) {\r\n\t\t\treturn $tw.utils.htmlDecode(text.substring(encryptedStoreAreaStart + encryptedStoreAreaStartMarker.length,encryptedStoreAreaEnd-1));\r\n\t\t}\r\n\t}\r\n\treturn null;\r\n};\r\n\r\n/*\r\nAttempt to extract the tiddlers from an encrypted store area using the current password. If the password is not provided then the password in the password store will be used\r\n*/\r\nexports.decryptStoreArea = function(encryptedStoreArea,password) {\r\n\tvar decryptedText = $tw.crypto.decrypt(encryptedStoreArea,password);\r\n\tif(decryptedText) {\r\n\t\tvar json = JSON.parse(decryptedText),\r\n\t\t\ttiddlers = [];\r\n\t\tfor(var title in json) {\r\n\t\t\tif(title !== \"$:/isEncrypted\") {\r\n\t\t\t\ttiddlers.push(json[title]);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn tiddlers;\r\n\t} else {\r\n\t\treturn null;\r\n\t}\r\n};\r\n\r\n\r\n/*\r\nAttempt to extract the tiddlers from an encrypted store area using the current password. If that fails, the user is prompted for a password.\r\nencryptedStoreArea: text of the TiddlyWiki encrypted store area\r\ncallback: function(tiddlers) called with the array of decrypted tiddlers\r\n\r\nThe following configuration settings are supported:\r\n\r\n$tw.config.usePasswordVault: causes any password entered by the user to also be put into the system password vault\r\n*/\r\nexports.decryptStoreAreaInteractive = function(encryptedStoreArea,callback,options) {\r\n\t// Try to decrypt with the current password\r\n\tvar tiddlers = $tw.utils.decryptStoreArea(encryptedStoreArea);\r\n\tif(tiddlers) {\r\n\t\tcallback(tiddlers);\r\n\t} else {\r\n\t\t// Prompt for a new password and keep trying\r\n\t\t$tw.passwordPrompt.createPrompt({\r\n\t\t\tserviceName: \"Enter a password to decrypt the imported TiddlyWiki\",\r\n\t\t\tnoUserName: true,\r\n\t\t\tcanCancel: true,\r\n\t\t\tsubmitText: \"Decrypt\",\r\n\t\t\tcallback: function(data) {\r\n\t\t\t\t// Exit if the user cancelled\r\n\t\t\t\tif(!data) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\t// Attempt to decrypt the tiddlers\r\n\t\t\t\tvar tiddlers = $tw.utils.decryptStoreArea(encryptedStoreArea,data.password);\r\n\t\t\t\tif(tiddlers) {\r\n\t\t\t\t\tif($tw.config.usePasswordVault) {\r\n\t\t\t\t\t\t$tw.crypto.setPassword(data.password);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcallback(tiddlers);\r\n\t\t\t\t\t// Exit and remove the password prompt\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// We didn't decrypt everything, so continue to prompt for password\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/utils/crypto.js",
"type": "application/javascript",
"module-type": "utils"
},
"$:/core/modules/utils/dom/animations/slide.js": {
"text": "/*\\\r\ntitle: $:/core/modules/utils/dom/animations/slide.js\r\ntype: application/javascript\r\nmodule-type: animation\r\n\r\nA simple slide animation that varies the height of the element\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nfunction slideOpen(domNode,options) {\r\n\toptions = options || {};\r\n\tvar duration = options.duration || $tw.utils.getAnimationDuration();\r\n\t// Get the current height of the domNode\r\n\tvar computedStyle = window.getComputedStyle(domNode),\r\n\t\tcurrMarginBottom = parseInt(computedStyle.marginBottom,10),\r\n\t\tcurrMarginTop = parseInt(computedStyle.marginTop,10),\r\n\t\tcurrPaddingBottom = parseInt(computedStyle.paddingBottom,10),\r\n\t\tcurrPaddingTop = parseInt(computedStyle.paddingTop,10),\r\n\t\tcurrHeight = domNode.offsetHeight;\r\n\t// Reset the margin once the transition is over\r\n\tsetTimeout(function() {\r\n\t\t$tw.utils.setStyle(domNode,[\r\n\t\t\t{transition: \"none\"},\r\n\t\t\t{marginBottom: \"\"},\r\n\t\t\t{marginTop: \"\"},\r\n\t\t\t{paddingBottom: \"\"},\r\n\t\t\t{paddingTop: \"\"},\r\n\t\t\t{height: \"auto\"},\r\n\t\t\t{opacity: \"\"}\r\n\t\t]);\r\n\t\tif(options.callback) {\r\n\t\t\toptions.callback();\r\n\t\t}\r\n\t},duration);\r\n\t// Set up the initial position of the element\r\n\t$tw.utils.setStyle(domNode,[\r\n\t\t{transition: \"none\"},\r\n\t\t{marginTop: \"0px\"},\r\n\t\t{marginBottom: \"0px\"},\r\n\t\t{paddingTop: \"0px\"},\r\n\t\t{paddingBottom: \"0px\"},\r\n\t\t{height: \"0px\"},\r\n\t\t{opacity: \"0\"}\r\n\t]);\r\n\t$tw.utils.forceLayout(domNode);\r\n\t// Transition to the final position\r\n\t$tw.utils.setStyle(domNode,[\r\n\t\t{transition: \"margin-top \" + duration + \"ms ease-in-out, \" +\r\n\t\t\t\t\t\"margin-bottom \" + duration + \"ms ease-in-out, \" +\r\n\t\t\t\t\t\"padding-top \" + duration + \"ms ease-in-out, \" +\r\n\t\t\t\t\t\"padding-bottom \" + duration + \"ms ease-in-out, \" +\r\n\t\t\t\t\t\"height \" + duration + \"ms ease-in-out, \" +\r\n\t\t\t\t\t\"opacity \" + duration + \"ms ease-in-out\"},\r\n\t\t{marginBottom: currMarginBottom + \"px\"},\r\n\t\t{marginTop: currMarginTop + \"px\"},\r\n\t\t{paddingBottom: currPaddingBottom + \"px\"},\r\n\t\t{paddingTop: currPaddingTop + \"px\"},\r\n\t\t{height: currHeight + \"px\"},\r\n\t\t{opacity: \"1\"}\r\n\t]);\r\n}\r\n\r\nfunction slideClosed(domNode,options) {\r\n\toptions = options || {};\r\n\tvar duration = options.duration || $tw.utils.getAnimationDuration(),\r\n\t\tcurrHeight = domNode.offsetHeight;\r\n\t// Clear the properties we've set when the animation is over\r\n\tsetTimeout(function() {\r\n\t\t$tw.utils.setStyle(domNode,[\r\n\t\t\t{transition: \"none\"},\r\n\t\t\t{marginBottom: \"\"},\r\n\t\t\t{marginTop: \"\"},\r\n\t\t\t{paddingBottom: \"\"},\r\n\t\t\t{paddingTop: \"\"},\r\n\t\t\t{height: \"auto\"},\r\n\t\t\t{opacity: \"\"}\r\n\t\t]);\r\n\t\tif(options.callback) {\r\n\t\t\toptions.callback();\r\n\t\t}\r\n\t},duration);\r\n\t// Set up the initial position of the element\r\n\t$tw.utils.setStyle(domNode,[\r\n\t\t{height: currHeight + \"px\"},\r\n\t\t{opacity: \"1\"}\r\n\t]);\r\n\t$tw.utils.forceLayout(domNode);\r\n\t// Transition to the final position\r\n\t$tw.utils.setStyle(domNode,[\r\n\t\t{transition: \"margin-top \" + duration + \"ms ease-in-out, \" +\r\n\t\t\t\t\t\"margin-bottom \" + duration + \"ms ease-in-out, \" +\r\n\t\t\t\t\t\"padding-top \" + duration + \"ms ease-in-out, \" +\r\n\t\t\t\t\t\"padding-bottom \" + duration + \"ms ease-in-out, \" +\r\n\t\t\t\t\t\"height \" + duration + \"ms ease-in-out, \" +\r\n\t\t\t\t\t\"opacity \" + duration + \"ms ease-in-out\"},\r\n\t\t{marginTop: \"0px\"},\r\n\t\t{marginBottom: \"0px\"},\r\n\t\t{paddingTop: \"0px\"},\r\n\t\t{paddingBottom: \"0px\"},\r\n\t\t{height: \"0px\"},\r\n\t\t{opacity: \"0\"}\r\n\t]);\r\n}\r\n\r\nexports.slide = {\r\n\topen: slideOpen,\r\n\tclose: slideClosed\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/utils/dom/animations/slide.js",
"type": "application/javascript",
"module-type": "animation"
},
"$:/core/modules/utils/dom/animator.js": {
"text": "/*\\\r\ntitle: $:/core/modules/utils/dom/animator.js\r\ntype: application/javascript\r\nmodule-type: utils\r\n\r\nOrchestrates animations and transitions\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nfunction Animator() {\r\n\t// Get the registered animation modules\r\n\tthis.animations = {};\r\n\t$tw.modules.applyMethods(\"animation\",this.animations);\r\n}\r\n\r\nAnimator.prototype.perform = function(type,domNode,options) {\r\n\toptions = options || {};\r\n\t// Find an animation that can handle this type\r\n\tvar chosenAnimation;\r\n\t$tw.utils.each(this.animations,function(animation,name) {\r\n\t\tif($tw.utils.hop(animation,type)) {\r\n\t\t\tchosenAnimation = animation[type];\r\n\t\t}\r\n\t});\r\n\tif(!chosenAnimation) {\r\n\t\tchosenAnimation = function(domNode,options) {\r\n\t\t\tif(options.callback) {\r\n\t\t\t\toptions.callback();\r\n\t\t\t}\r\n\t\t};\r\n\t}\r\n\t// Call the animation\r\n\tchosenAnimation(domNode,options);\r\n};\r\n\r\nexports.Animator = Animator;\r\n\r\n})();\r\n",
"title": "$:/core/modules/utils/dom/animator.js",
"type": "application/javascript",
"module-type": "utils"
},
"$:/core/modules/utils/dom/browser.js": {
"text": "/*\\\r\ntitle: $:/core/modules/utils/dom/browser.js\r\ntype: application/javascript\r\nmodule-type: utils\r\n\r\nBrowser feature detection\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nSet style properties of an element\r\n\telement: dom node\r\n\tstyles: ordered array of {name: value} pairs\r\n*/\r\nexports.setStyle = function(element,styles) {\r\n\tif(element.nodeType === 1) { // Element.ELEMENT_NODE\r\n\t\tfor(var t=0; t<styles.length; t++) {\r\n\t\t\tfor(var styleName in styles[t]) {\r\n\t\t\t\telement.style[$tw.utils.convertStyleNameToPropertyName(styleName)] = styles[t][styleName];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\n\r\n/*\r\nConverts a standard CSS property name into the local browser-specific equivalent. For example:\r\n\t\"background-color\" --> \"backgroundColor\"\r\n\t\"transition\" --> \"webkitTransition\"\r\n*/\r\n\r\nvar styleNameCache = {}; // We'll cache the style name conversions\r\n\r\nexports.convertStyleNameToPropertyName = function(styleName) {\r\n\t// Return from the cache if we can\r\n\tif(styleNameCache[styleName]) {\r\n\t\treturn styleNameCache[styleName];\r\n\t}\r\n\t// Convert it by first removing any hyphens\r\n\tvar propertyName = $tw.utils.unHyphenateCss(styleName);\r\n\t// Then check if it needs a prefix\r\n\tif(document.body.style[propertyName] === undefined) {\r\n\t\tvar prefixes = [\"O\",\"MS\",\"Moz\",\"webkit\"];\r\n\t\tfor(var t=0; t<prefixes.length; t++) {\r\n\t\t\tvar prefixedName = prefixes[t] + propertyName.substr(0,1).toUpperCase() + propertyName.substr(1);\r\n\t\t\tif(document.body.style[prefixedName] !== undefined) {\r\n\t\t\t\tpropertyName = prefixedName;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t// Put it in the cache too\r\n\tstyleNameCache[styleName] = propertyName;\r\n\treturn propertyName;\r\n};\r\n\r\n/*\r\nConverts a JS format CSS property name back into the dashed form used in CSS declarations. For example:\r\n\t\"backgroundColor\" --> \"background-color\"\r\n\t\"webkitTransform\" --> \"-webkit-transform\"\r\n*/\r\nexports.convertPropertyNameToStyleName = function(propertyName) {\r\n\t// Rehyphenate the name\r\n\tvar styleName = $tw.utils.hyphenateCss(propertyName);\r\n\t// If there's a webkit prefix, add a dash (other browsers have uppercase prefixes, and so get the dash automatically)\r\n\tif(styleName.indexOf(\"webkit\") === 0) {\r\n\t\tstyleName = \"-\" + styleName;\r\n\t} else if(styleName.indexOf(\"-m-s\") === 0) {\r\n\t\tstyleName = \"-ms\" + styleName.substr(4);\r\n\t}\r\n\treturn styleName;\r\n};\r\n\r\n/*\r\nRound trip a stylename to a property name and back again. For example:\r\n\t\"transform\" --> \"webkitTransform\" --> \"-webkit-transform\"\r\n*/\r\nexports.roundTripPropertyName = function(propertyName) {\r\n\treturn $tw.utils.convertPropertyNameToStyleName($tw.utils.convertStyleNameToPropertyName(propertyName));\r\n};\r\n\r\n/*\r\nConverts a standard event name into the local browser specific equivalent. For example:\r\n\t\"animationEnd\" --> \"webkitAnimationEnd\"\r\n*/\r\n\r\nvar eventNameCache = {}; // We'll cache the conversions\r\n\r\nvar eventNameMappings = {\r\n\t\"transitionEnd\": {\r\n\t\tcorrespondingCssProperty: \"transition\",\r\n\t\tmappings: {\r\n\t\t\ttransition: \"transitionend\",\r\n\t\t\tOTransition: \"oTransitionEnd\",\r\n\t\t\tMSTransition: \"msTransitionEnd\",\r\n\t\t\tMozTransition: \"transitionend\",\r\n\t\t\twebkitTransition: \"webkitTransitionEnd\"\r\n\t\t}\r\n\t},\r\n\t\"animationEnd\": {\r\n\t\tcorrespondingCssProperty: \"animation\",\r\n\t\tmappings: {\r\n\t\t\tanimation: \"animationend\",\r\n\t\t\tOAnimation: \"oAnimationEnd\",\r\n\t\t\tMSAnimation: \"msAnimationEnd\",\r\n\t\t\tMozAnimation: \"animationend\",\r\n\t\t\twebkitAnimation: \"webkitAnimationEnd\"\r\n\t\t}\r\n\t}\r\n};\r\n\r\nexports.convertEventName = function(eventName) {\r\n\tif(eventNameCache[eventName]) {\r\n\t\treturn eventNameCache[eventName];\r\n\t}\r\n\tvar newEventName = eventName,\r\n\t\tmappings = eventNameMappings[eventName];\r\n\tif(mappings) {\r\n\t\tvar convertedProperty = $tw.utils.convertStyleNameToPropertyName(mappings.correspondingCssProperty);\r\n\t\tif(mappings.mappings[convertedProperty]) {\r\n\t\t\tnewEventName = mappings.mappings[convertedProperty];\r\n\t\t}\r\n\t}\r\n\t// Put it in the cache too\r\n\teventNameCache[eventName] = newEventName;\r\n\treturn newEventName;\r\n};\r\n\r\n/*\r\nReturn the names of the fullscreen APIs\r\n*/\r\nexports.getFullScreenApis = function() {\r\n\tvar d = document,\r\n\t\tdb = d.body,\r\n\t\tresult = {\r\n\t\t\"_requestFullscreen\": db.webkitRequestFullscreen !== undefined ? \"webkitRequestFullscreen\" :\r\n\t\t\t\t\t\t\tdb.mozRequestFullScreen !== undefined ? \"mozRequestFullScreen\" :\r\n\t\t\t\t\t\t\tdb.msRequestFullscreen !== undefined ? \"msRequestFullscreen\" :\r\n\t\t\t\t\t\t\tdb.requestFullscreen !== undefined ? \"requestFullscreen\" : \"\",\r\n\t\t\"_exitFullscreen\": d.webkitExitFullscreen !== undefined ? \"webkitExitFullscreen\" :\r\n\t\t\t\t\t\t\td.mozCancelFullScreen !== undefined ? \"mozCancelFullScreen\" :\r\n\t\t\t\t\t\t\td.msExitFullscreen !== undefined ? \"msExitFullscreen\" :\r\n\t\t\t\t\t\t\td.exitFullscreen !== undefined ? \"exitFullscreen\" : \"\",\r\n\t\t\"_fullscreenElement\": d.webkitFullscreenElement !== undefined ? \"webkitFullscreenElement\" :\r\n\t\t\t\t\t\t\td.mozFullScreenElement !== undefined ? \"mozFullScreenElement\" :\r\n\t\t\t\t\t\t\td.msFullscreenElement !== undefined ? \"msFullscreenElement\" :\r\n\t\t\t\t\t\t\td.fullscreenElement !== undefined ? \"fullscreenElement\" : \"\",\r\n\t\t\"_fullscreenChange\": d.webkitFullscreenElement !== undefined ? \"webkitfullscreenchange\" :\r\n\t\t\t\t\t\t\td.mozFullScreenElement !== undefined ? \"mozfullscreenchange\" :\r\n\t\t\t\t\t\t\td.msFullscreenElement !== undefined ? \"MSFullscreenChange\" :\r\n\t\t\t\t\t\t\td.fullscreenElement !== undefined ? \"fullscreenchange\" : \"\"\r\n\t};\r\n\tif(!result._requestFullscreen || !result._exitFullscreen || !result._fullscreenElement || !result._fullscreenChange) {\r\n\t\treturn null;\r\n\t} else {\r\n\t\treturn result;\r\n\t}\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/utils/dom/browser.js",
"type": "application/javascript",
"module-type": "utils"
},
"$:/core/modules/utils/dom/csscolorparser.js": {
"text": "// (c) Dean McNamee <dean@gmail.com>, 2012.\r\n//\r\n// https://github.com/deanm/css-color-parser-js\r\n//\r\n// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n// of this software and associated documentation files (the \"Software\"), to\r\n// deal in the Software without restriction, including without limitation the\r\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\r\n// sell copies of the Software, and to permit persons to whom the Software is\r\n// furnished to do so, subject to the following conditions:\r\n//\r\n// The above copyright notice and this permission notice shall be included in\r\n// all copies or substantial portions of the Software.\r\n//\r\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\r\n// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\r\n// IN THE SOFTWARE.\r\n\r\n// http://www.w3.org/TR/css3-color/\r\nvar kCSSColorTable = {\r\n \"transparent\": [0,0,0,0], \"aliceblue\": [240,248,255,1],\r\n \"antiquewhite\": [250,235,215,1], \"aqua\": [0,255,255,1],\r\n \"aquamarine\": [127,255,212,1], \"azure\": [240,255,255,1],\r\n \"beige\": [245,245,220,1], \"bisque\": [255,228,196,1],\r\n \"black\": [0,0,0,1], \"blanchedalmond\": [255,235,205,1],\r\n \"blue\": [0,0,255,1], \"blueviolet\": [138,43,226,1],\r\n \"brown\": [165,42,42,1], \"burlywood\": [222,184,135,1],\r\n \"cadetblue\": [95,158,160,1], \"chartreuse\": [127,255,0,1],\r\n \"chocolate\": [210,105,30,1], \"coral\": [255,127,80,1],\r\n \"cornflowerblue\": [100,149,237,1], \"cornsilk\": [255,248,220,1],\r\n \"crimson\": [220,20,60,1], \"cyan\": [0,255,255,1],\r\n \"darkblue\": [0,0,139,1], \"darkcyan\": [0,139,139,1],\r\n \"darkgoldenrod\": [184,134,11,1], \"darkgray\": [169,169,169,1],\r\n \"darkgreen\": [0,100,0,1], \"darkgrey\": [169,169,169,1],\r\n \"darkkhaki\": [189,183,107,1], \"darkmagenta\": [139,0,139,1],\r\n \"darkolivegreen\": [85,107,47,1], \"darkorange\": [255,140,0,1],\r\n \"darkorchid\": [153,50,204,1], \"darkred\": [139,0,0,1],\r\n \"darksalmon\": [233,150,122,1], \"darkseagreen\": [143,188,143,1],\r\n \"darkslateblue\": [72,61,139,1], \"darkslategray\": [47,79,79,1],\r\n \"darkslategrey\": [47,79,79,1], \"darkturquoise\": [0,206,209,1],\r\n \"darkviolet\": [148,0,211,1], \"deeppink\": [255,20,147,1],\r\n \"deepskyblue\": [0,191,255,1], \"dimgray\": [105,105,105,1],\r\n \"dimgrey\": [105,105,105,1], \"dodgerblue\": [30,144,255,1],\r\n \"firebrick\": [178,34,34,1], \"floralwhite\": [255,250,240,1],\r\n \"forestgreen\": [34,139,34,1], \"fuchsia\": [255,0,255,1],\r\n \"gainsboro\": [220,220,220,1], \"ghostwhite\": [248,248,255,1],\r\n \"gold\": [255,215,0,1], \"goldenrod\": [218,165,32,1],\r\n \"gray\": [128,128,128,1], \"green\": [0,128,0,1],\r\n \"greenyellow\": [173,255,47,1], \"grey\": [128,128,128,1],\r\n \"honeydew\": [240,255,240,1], \"hotpink\": [255,105,180,1],\r\n \"indianred\": [205,92,92,1], \"indigo\": [75,0,130,1],\r\n \"ivory\": [255,255,240,1], \"khaki\": [240,230,140,1],\r\n \"lavender\": [230,230,250,1], \"lavenderblush\": [255,240,245,1],\r\n \"lawngreen\": [124,252,0,1], \"lemonchiffon\": [255,250,205,1],\r\n \"lightblue\": [173,216,230,1], \"lightcoral\": [240,128,128,1],\r\n \"lightcyan\": [224,255,255,1], \"lightgoldenrodyellow\": [250,250,210,1],\r\n \"lightgray\": [211,211,211,1], \"lightgreen\": [144,238,144,1],\r\n \"lightgrey\": [211,211,211,1], \"lightpink\": [255,182,193,1],\r\n \"lightsalmon\": [255,160,122,1], \"lightseagreen\": [32,178,170,1],\r\n \"lightskyblue\": [135,206,250,1], \"lightslategray\": [119,136,153,1],\r\n \"lightslategrey\": [119,136,153,1], \"lightsteelblue\": [176,196,222,1],\r\n \"lightyellow\": [255,255,224,1], \"lime\": [0,255,0,1],\r\n \"limegreen\": [50,205,50,1], \"linen\": [250,240,230,1],\r\n \"magenta\": [255,0,255,1], \"maroon\": [128,0,0,1],\r\n \"mediumaquamarine\": [102,205,170,1], \"mediumblue\": [0,0,205,1],\r\n \"mediumorchid\": [186,85,211,1], \"mediumpurple\": [147,112,219,1],\r\n \"mediumseagreen\": [60,179,113,1], \"mediumslateblue\": [123,104,238,1],\r\n \"mediumspringgreen\": [0,250,154,1], \"mediumturquoise\": [72,209,204,1],\r\n \"mediumvioletred\": [199,21,133,1], \"midnightblue\": [25,25,112,1],\r\n \"mintcream\": [245,255,250,1], \"mistyrose\": [255,228,225,1],\r\n \"moccasin\": [255,228,181,1], \"navajowhite\": [255,222,173,1],\r\n \"navy\": [0,0,128,1], \"oldlace\": [253,245,230,1],\r\n \"olive\": [128,128,0,1], \"olivedrab\": [107,142,35,1],\r\n \"orange\": [255,165,0,1], \"orangered\": [255,69,0,1],\r\n \"orchid\": [218,112,214,1], \"palegoldenrod\": [238,232,170,1],\r\n \"palegreen\": [152,251,152,1], \"paleturquoise\": [175,238,238,1],\r\n \"palevioletred\": [219,112,147,1], \"papayawhip\": [255,239,213,1],\r\n \"peachpuff\": [255,218,185,1], \"peru\": [205,133,63,1],\r\n \"pink\": [255,192,203,1], \"plum\": [221,160,221,1],\r\n \"powderblue\": [176,224,230,1], \"purple\": [128,0,128,1],\r\n \"red\": [255,0,0,1], \"rosybrown\": [188,143,143,1],\r\n \"royalblue\": [65,105,225,1], \"saddlebrown\": [139,69,19,1],\r\n \"salmon\": [250,128,114,1], \"sandybrown\": [244,164,96,1],\r\n \"seagreen\": [46,139,87,1], \"seashell\": [255,245,238,1],\r\n \"sienna\": [160,82,45,1], \"silver\": [192,192,192,1],\r\n \"skyblue\": [135,206,235,1], \"slateblue\": [106,90,205,1],\r\n \"slategray\": [112,128,144,1], \"slategrey\": [112,128,144,1],\r\n \"snow\": [255,250,250,1], \"springgreen\": [0,255,127,1],\r\n \"steelblue\": [70,130,180,1], \"tan\": [210,180,140,1],\r\n \"teal\": [0,128,128,1], \"thistle\": [216,191,216,1],\r\n \"tomato\": [255,99,71,1], \"turquoise\": [64,224,208,1],\r\n \"violet\": [238,130,238,1], \"wheat\": [245,222,179,1],\r\n \"white\": [255,255,255,1], \"whitesmoke\": [245,245,245,1],\r\n \"yellow\": [255,255,0,1], \"yellowgreen\": [154,205,50,1]}\r\n\r\nfunction clamp_css_byte(i) { // Clamp to integer 0 .. 255.\r\n i = Math.round(i); // Seems to be what Chrome does (vs truncation).\r\n return i < 0 ? 0 : i > 255 ? 255 : i;\r\n}\r\n\r\nfunction clamp_css_float(f) { // Clamp to float 0.0 .. 1.0.\r\n return f < 0 ? 0 : f > 1 ? 1 : f;\r\n}\r\n\r\nfunction parse_css_int(str) { // int or percentage.\r\n if (str[str.length - 1] === '%')\r\n return clamp_css_byte(parseFloat(str) / 100 * 255);\r\n return clamp_css_byte(parseInt(str));\r\n}\r\n\r\nfunction parse_css_float(str) { // float or percentage.\r\n if (str[str.length - 1] === '%')\r\n return clamp_css_float(parseFloat(str) / 100);\r\n return clamp_css_float(parseFloat(str));\r\n}\r\n\r\nfunction css_hue_to_rgb(m1, m2, h) {\r\n if (h < 0) h += 1;\r\n else if (h > 1) h -= 1;\r\n\r\n if (h * 6 < 1) return m1 + (m2 - m1) * h * 6;\r\n if (h * 2 < 1) return m2;\r\n if (h * 3 < 2) return m1 + (m2 - m1) * (2/3 - h) * 6;\r\n return m1;\r\n}\r\n\r\nfunction parseCSSColor(css_str) {\r\n // Remove all whitespace, not compliant, but should just be more accepting.\r\n var str = css_str.replace(/ /g, '').toLowerCase();\r\n\r\n // Color keywords (and transparent) lookup.\r\n if (str in kCSSColorTable) return kCSSColorTable[str].slice(); // dup.\r\n\r\n // #abc and #abc123 syntax.\r\n if (str[0] === '#') {\r\n if (str.length === 4) {\r\n var iv = parseInt(str.substr(1), 16); // TODO(deanm): Stricter parsing.\r\n if (!(iv >= 0 && iv <= 0xfff)) return null; // Covers NaN.\r\n return [((iv & 0xf00) >> 4) | ((iv & 0xf00) >> 8),\r\n (iv & 0xf0) | ((iv & 0xf0) >> 4),\r\n (iv & 0xf) | ((iv & 0xf) << 4),\r\n 1];\r\n } else if (str.length === 7) {\r\n var iv = parseInt(str.substr(1), 16); // TODO(deanm): Stricter parsing.\r\n if (!(iv >= 0 && iv <= 0xffffff)) return null; // Covers NaN.\r\n return [(iv & 0xff0000) >> 16,\r\n (iv & 0xff00) >> 8,\r\n iv & 0xff,\r\n 1];\r\n }\r\n\r\n return null;\r\n }\r\n\r\n var op = str.indexOf('('), ep = str.indexOf(')');\r\n if (op !== -1 && ep + 1 === str.length) {\r\n var fname = str.substr(0, op);\r\n var params = str.substr(op+1, ep-(op+1)).split(',');\r\n var alpha = 1; // To allow case fallthrough.\r\n switch (fname) {\r\n case 'rgba':\r\n if (params.length !== 4) return null;\r\n alpha = parse_css_float(params.pop());\r\n // Fall through.\r\n case 'rgb':\r\n if (params.length !== 3) return null;\r\n return [parse_css_int(params[0]),\r\n parse_css_int(params[1]),\r\n parse_css_int(params[2]),\r\n alpha];\r\n case 'hsla':\r\n if (params.length !== 4) return null;\r\n alpha = parse_css_float(params.pop());\r\n // Fall through.\r\n case 'hsl':\r\n if (params.length !== 3) return null;\r\n var h = (((parseFloat(params[0]) % 360) + 360) % 360) / 360; // 0 .. 1\r\n // NOTE(deanm): According to the CSS spec s/l should only be\r\n // percentages, but we don't bother and let float or percentage.\r\n var s = parse_css_float(params[1]);\r\n var l = parse_css_float(params[2]);\r\n var m2 = l <= 0.5 ? l * (s + 1) : l + s - l * s;\r\n var m1 = l * 2 - m2;\r\n return [clamp_css_byte(css_hue_to_rgb(m1, m2, h+1/3) * 255),\r\n clamp_css_byte(css_hue_to_rgb(m1, m2, h) * 255),\r\n clamp_css_byte(css_hue_to_rgb(m1, m2, h-1/3) * 255),\r\n alpha];\r\n default:\r\n return null;\r\n }\r\n }\r\n\r\n return null;\r\n}\r\n\r\ntry { exports.parseCSSColor = parseCSSColor } catch(e) { }\r\n",
"title": "$:/core/modules/utils/dom/csscolorparser.js",
"type": "application/javascript",
"module-type": "utils"
},
"$:/core/modules/utils/dom.js": {
"text": "/*\\\r\ntitle: $:/core/modules/utils/dom.js\r\ntype: application/javascript\r\nmodule-type: utils\r\n\r\nVarious static DOM-related utility functions.\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nDetermines whether element 'a' contains element 'b'\r\nCode thanks to John Resig, http://ejohn.org/blog/comparing-document-position/\r\n*/\r\nexports.domContains = function(a,b) {\r\n\treturn a.contains ?\r\n\t\ta !== b && a.contains(b) :\r\n\t\t!!(a.compareDocumentPosition(b) & 16);\r\n};\r\n\r\nexports.removeChildren = function(node) {\r\n\twhile(node.hasChildNodes()) {\r\n\t\tnode.removeChild(node.firstChild);\r\n\t}\r\n};\r\n\r\nexports.hasClass = function(el,className) {\r\n\treturn el && el.className && el.className.toString().split(\" \").indexOf(className) !== -1;\r\n};\r\n\r\nexports.addClass = function(el,className) {\r\n\tvar c = el.className.split(\" \");\r\n\tif(c.indexOf(className) === -1) {\r\n\t\tc.push(className);\r\n\t}\r\n\tel.className = c.join(\" \");\r\n};\r\n\r\nexports.removeClass = function(el,className) {\r\n\tvar c = el.className.split(\" \"),\r\n\t\tp = c.indexOf(className);\r\n\tif(p !== -1) {\r\n\t\tc.splice(p,1);\r\n\t\tel.className = c.join(\" \");\r\n\t}\r\n};\r\n\r\nexports.toggleClass = function(el,className,status) {\r\n\tif(status === undefined) {\r\n\t\tstatus = !exports.hasClass(el,className);\r\n\t}\r\n\tif(status) {\r\n\t\texports.addClass(el,className);\r\n\t} else {\r\n\t\texports.removeClass(el,className);\r\n\t}\r\n};\r\n\r\n/*\r\nGet the scroll position of the viewport\r\nReturns:\r\n\t{\r\n\t\tx: horizontal scroll position in pixels,\r\n\t\ty: vertical scroll position in pixels\r\n\t}\r\n*/\r\nexports.getScrollPosition = function() {\r\n\tif(\"scrollX\" in window) {\r\n\t\treturn {x: window.scrollX, y: window.scrollY};\r\n\t} else {\r\n\t\treturn {x: document.documentElement.scrollLeft, y: document.documentElement.scrollTop};\r\n\t}\r\n};\r\n\r\n/*\r\nGets the bounding rectangle of an element in absolute page coordinates\r\n*/\r\nexports.getBoundingPageRect = function(element) {\r\n\tvar scrollPos = $tw.utils.getScrollPosition(),\r\n\t\tclientRect = element.getBoundingClientRect();\r\n\treturn {\r\n\t\tleft: clientRect.left + scrollPos.x,\r\n\t\twidth: clientRect.width,\r\n\t\tright: clientRect.right + scrollPos.x,\r\n\t\ttop: clientRect.top + scrollPos.y,\r\n\t\theight: clientRect.height,\r\n\t\tbottom: clientRect.bottom + scrollPos.y\r\n\t};\r\n};\r\n\r\n/*\r\nSaves a named password in the browser\r\n*/\r\nexports.savePassword = function(name,password) {\r\n\ttry {\r\n\t\tif(window.localStorage) {\r\n\t\t\tlocalStorage.setItem(\"tw5-password-\" + name,password);\r\n\t\t}\r\n\t} catch(e) {\r\n\t}\r\n};\r\n\r\n/*\r\nRetrieve a named password from the browser\r\n*/\r\nexports.getPassword = function(name) {\r\n\ttry {\r\n\t\treturn window.localStorage ? localStorage.getItem(\"tw5-password-\" + name) : \"\";\r\n\t} catch(e) {\r\n\t\treturn \"\";\r\n\t}\r\n};\r\n\r\n/*\r\nForce layout of a dom node and its descendents\r\n*/\r\nexports.forceLayout = function(element) {\r\n\tvar dummy = element.offsetWidth;\r\n};\r\n\r\n/*\r\nPulse an element for debugging purposes\r\n*/\r\nexports.pulseElement = function(element) {\r\n\t// Event handler to remove the class at the end\r\n\telement.addEventListener($tw.browser.animationEnd,function handler(event) {\r\n\t\telement.removeEventListener($tw.browser.animationEnd,handler,false);\r\n\t\t$tw.utils.removeClass(element,\"pulse\");\r\n\t},false);\r\n\t// Apply the pulse class\r\n\t$tw.utils.removeClass(element,\"pulse\");\r\n\t$tw.utils.forceLayout(element);\r\n\t$tw.utils.addClass(element,\"pulse\");\r\n};\r\n\r\n/*\r\nAttach specified event handlers to a DOM node\r\ndomNode: where to attach the event handlers\r\nevents: array of event handlers to be added (see below)\r\nEach entry in the events array is an object with these properties:\r\nhandlerFunction: optional event handler function\r\nhandlerObject: optional event handler object\r\nhandlerMethod: optionally specifies object handler method name (defaults to `handleEvent`)\r\n*/\r\nexports.addEventListeners = function(domNode,events) {\r\n\t$tw.utils.each(events,function(eventInfo) {\r\n\t\tvar handler;\r\n\t\tif(eventInfo.handlerFunction) {\r\n\t\t\thandler = eventInfo.handlerFunction;\r\n\t\t} else if(eventInfo.handlerObject) {\r\n\t\t\tif(eventInfo.handlerMethod) {\r\n\t\t\t\thandler = function(event) {\r\n\t\t\t\t\teventInfo.handlerObject[eventInfo.handlerMethod].call(eventInfo.handlerObject,event);\r\n\t\t\t\t};\t\r\n\t\t\t} else {\r\n\t\t\t\thandler = eventInfo.handlerObject;\r\n\t\t\t}\r\n\t\t}\r\n\t\tdomNode.addEventListener(eventInfo.name,handler,false);\r\n\t});\r\n};\r\n\r\n\r\n})();\r\n",
"title": "$:/core/modules/utils/dom.js",
"type": "application/javascript",
"module-type": "utils"
},
"$:/core/modules/utils/dom/http.js": {
"text": "/*\\\r\ntitle: $:/core/modules/utils/dom/http.js\r\ntype: application/javascript\r\nmodule-type: utils\r\n\r\nBrowser HTTP support\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nA quick and dirty HTTP function; to be refactored later. Options are:\r\n\turl: URL to retrieve\r\n\ttype: GET, PUT, POST etc\r\n\tcallback: function invoked with (err,data)\r\n*/\r\nexports.httpRequest = function(options) {\r\n\tvar type = options.type || \"GET\",\r\n\t\theaders = options.headers || {accept: \"application/json\"},\r\n\t\trequest = new XMLHttpRequest(),\r\n\t\tdata = \"\",\r\n\t\tf,results;\r\n\t// Massage the data hashmap into a string\r\n\tif(options.data) {\r\n\t\tif(typeof options.data === \"string\") { // Already a string\r\n\t\t\tdata = options.data;\r\n\t\t} else { // A hashmap of strings\r\n\t\t\tresults = [];\r\n\t\t\t$tw.utils.each(options.data,function(dataItem,dataItemTitle) {\r\n\t\t\t\tresults.push(dataItemTitle + \"=\" + encodeURIComponent(dataItem));\r\n\t\t\t});\r\n\t\t\tdata = results.join(\"&\");\r\n\t\t}\r\n\t}\r\n\t// Set up the state change handler\r\n\trequest.onreadystatechange = function() {\r\n\t\tif(this.readyState === 4) {\r\n\t\t\tif(this.status === 200 || this.status === 201 || this.status === 204) {\r\n\t\t\t\t// Success!\r\n\t\t\t\toptions.callback(null,this.responseText,this);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t// Something went wrong\r\n\t\toptions.callback(\"XMLHttpRequest error code: \" + this.status);\r\n\t\t}\r\n\t};\r\n\t// Make the request\r\n\trequest.open(type,options.url,true);\r\n\tif(headers) {\r\n\t\t$tw.utils.each(headers,function(header,headerTitle,object) {\r\n\t\t\trequest.setRequestHeader(headerTitle,header);\r\n\t\t});\r\n\t}\r\n\tif(data && !$tw.utils.hop(headers,\"Content-type\")) {\r\n\t\trequest.setRequestHeader(\"Content-type\",\"application/x-www-form-urlencoded; charset=UTF-8\");\r\n\t}\r\n\trequest.send(data);\r\n\treturn request;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/utils/dom/http.js",
"type": "application/javascript",
"module-type": "utils"
},
"$:/core/modules/utils/dom/keyboard.js": {
"text": "/*\\\r\ntitle: $:/core/modules/utils/dom/keyboard.js\r\ntype: application/javascript\r\nmodule-type: utils\r\n\r\nKeyboard utilities\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar namedKeys = {\r\n\t\"backspace\": 8,\r\n\t\"tab\": 9,\r\n\t\"enter\": 13,\r\n\t\"escape\": 27\r\n};\r\n\r\n/*\r\nParses a key descriptor into the structure:\r\n{\r\n\tkeyCode: numeric keycode\r\n\tshiftKey: boolean\r\n\taltKey: boolean\r\n\tctrlKey: boolean\r\n}\r\nKey descriptors have the following format:\r\n\tctrl+enter\r\n\tctrl+shift+alt+A\r\n*/\r\nexports.parseKeyDescriptor = function(keyDescriptor) {\r\n\tvar components = keyDescriptor.split(\"+\"),\r\n\t\tinfo = {\r\n\t\t\tkeyCode: 0,\r\n\t\t\tshiftKey: false,\r\n\t\t\taltKey: false,\r\n\t\t\tctrlKey: false\r\n\t\t};\r\n\tfor(var t=0; t<components.length; t++) {\r\n\t\tvar s = components[t].toLowerCase();\r\n\t\t// Look for modifier keys\r\n\t\tif(s === \"ctrl\") {\r\n\t\t\tinfo.ctrlKey = true;\r\n\t\t} else if(s === \"shift\") {\r\n\t\t\tinfo.shiftKey = true;\r\n\t\t} else if(s === \"alt\") {\r\n\t\t\tinfo.altKey = true;\r\n\t\t} else if(s === \"meta\") {\r\n\t\t\tinfo.metaKey = true;\r\n\t\t}\r\n\t\t// Replace named keys with their code\r\n\t\tif(namedKeys[s]) {\r\n\t\t\tinfo.keyCode = namedKeys[s];\r\n\t\t}\r\n\t}\r\n\treturn info;\r\n};\r\n\r\nexports.checkKeyDescriptor = function(event,keyInfo) {\r\n\tvar metaKeyStatus = !!keyInfo.metaKey; // Using a temporary variable to keep JSHint happy\r\n\treturn event.keyCode === keyInfo.keyCode && \r\n\t\t\tevent.shiftKey === keyInfo.shiftKey && \r\n\t\t\tevent.altKey === keyInfo.altKey && \r\n\t\t\tevent.ctrlKey === keyInfo.ctrlKey && \r\n\t\t\tevent.metaKey === metaKeyStatus;\t\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/utils/dom/keyboard.js",
"type": "application/javascript",
"module-type": "utils"
},
"$:/core/modules/utils/dom/modal.js": {
"text": "/*\\\r\ntitle: $:/core/modules/utils/dom/modal.js\r\ntype: application/javascript\r\nmodule-type: utils\r\n\r\nModal message mechanism\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar widget = require(\"$:/core/modules/widgets/widget.js\");\r\n\r\nvar Modal = function(wiki) {\r\n\tthis.wiki = wiki;\r\n\tthis.modalCount = 0;\r\n};\r\n\r\n/*\r\nDisplay a modal dialogue\r\n\ttitle: Title of tiddler to display\r\n\toptions: see below\r\nOptions include:\r\n\tdownloadLink: Text of a big download link to include\r\n*/\r\nModal.prototype.display = function(title,options) {\r\n\toptions = options || {};\r\n\tvar self = this,\r\n\t\tduration = $tw.utils.getAnimationDuration(),\r\n\t\ttiddler = this.wiki.getTiddler(title);\r\n\t// Don't do anything if the tiddler doesn't exist\r\n\tif(!tiddler) {\r\n\t\treturn;\r\n\t}\r\n\t// Create the variables\r\n\tvar variables = $tw.utils.extend({currentTiddler: title},options.variables);\r\n\t// Create the wrapper divs\r\n\tvar wrapper = document.createElement(\"div\"),\r\n\t\tmodalBackdrop = document.createElement(\"div\"),\r\n\t\tmodalWrapper = document.createElement(\"div\"),\r\n\t\tmodalHeader = document.createElement(\"div\"),\r\n\t\theaderTitle = document.createElement(\"h3\"),\r\n\t\tmodalBody = document.createElement(\"div\"),\r\n\t\tmodalLink = document.createElement(\"a\"),\r\n\t\tmodalFooter = document.createElement(\"div\"),\r\n\t\tmodalFooterHelp = document.createElement(\"span\"),\r\n\t\tmodalFooterButtons = document.createElement(\"span\");\r\n\t// Up the modal count and adjust the body class\r\n\tthis.modalCount++;\r\n\tthis.adjustPageClass();\r\n\t// Add classes\r\n\t$tw.utils.addClass(wrapper,\"tc-modal-wrapper\");\r\n\t$tw.utils.addClass(modalBackdrop,\"tc-modal-backdrop\");\r\n\t$tw.utils.addClass(modalWrapper,\"tc-modal\");\r\n\t$tw.utils.addClass(modalHeader,\"tc-modal-header\");\r\n\t$tw.utils.addClass(modalBody,\"tc-modal-body\");\r\n\t$tw.utils.addClass(modalFooter,\"tc-modal-footer\");\r\n\t// Join them together\r\n\twrapper.appendChild(modalBackdrop);\r\n\twrapper.appendChild(modalWrapper);\r\n\tmodalHeader.appendChild(headerTitle);\r\n\tmodalWrapper.appendChild(modalHeader);\r\n\tmodalWrapper.appendChild(modalBody);\r\n\tmodalFooter.appendChild(modalFooterHelp);\r\n\tmodalFooter.appendChild(modalFooterButtons);\r\n\tmodalWrapper.appendChild(modalFooter);\r\n\t// Render the title of the message\r\n\tvar headerWidgetNode = this.wiki.makeTranscludeWidget(title,{\r\n\t\tfield: \"subtitle\",\r\n\t\tchildren: [{\r\n\t\t\ttype: \"text\",\r\n\t\t\tattributes: {\r\n\t\t\t\ttext: {\r\n\t\t\t\t\ttype: \"string\",\r\n\t\t\t\t\tvalue: title\r\n\t\t}}}],\r\n\t\tparentWidget: $tw.rootWidget,\r\n\t\tdocument: document,\r\n\t\tvariables: variables\r\n\t});\r\n\theaderWidgetNode.render(headerTitle,null);\r\n\tthis.wiki.addEventListener(\"change\",function(changes) {\r\n\t\theaderWidgetNode.refresh(changes,modalHeader,null);\r\n\t});\r\n\t// Render the body of the message\r\n\tvar bodyWidgetNode = this.wiki.makeTranscludeWidget(title,{\r\n\t\tparentWidget: $tw.rootWidget,\r\n\t\tdocument: document,\r\n\t\tvariables: variables\r\n\t});\r\n\tbodyWidgetNode.render(modalBody,null);\r\n\tthis.wiki.addEventListener(\"change\",function(changes) {\r\n\t\tbodyWidgetNode.refresh(changes,modalBody,null);\r\n\t});\r\n\t// Setup the link if present\r\n\tif(options.downloadLink) {\r\n\t\tmodalLink.href = options.downloadLink;\r\n\t\tmodalLink.appendChild(document.createTextNode(\"Right-click to save changes\"));\r\n\t\tmodalBody.appendChild(modalLink);\r\n\t}\r\n\t// Render the footer of the message\r\n\tif(tiddler && tiddler.fields && tiddler.fields.help) {\r\n\t\tvar link = document.createElement(\"a\");\r\n\t\tlink.setAttribute(\"href\",tiddler.fields.help);\r\n\t\tlink.setAttribute(\"target\",\"_blank\");\r\n\t\tlink.appendChild(document.createTextNode(\"Help\"));\r\n\t\tmodalFooterHelp.appendChild(link);\r\n\t\tmodalFooterHelp.style.float = \"left\";\r\n\t}\r\n\tvar footerWidgetNode = this.wiki.makeTranscludeWidget(title,{\r\n\t\tfield: \"footer\",\r\n\t\tchildren: [{\r\n\t\t\ttype: \"button\",\r\n\t\t\tattributes: {\r\n\t\t\t\tmessage: {\r\n\t\t\t\t\ttype: \"string\",\r\n\t\t\t\t\tvalue: \"tm-close-tiddler\"\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tchildren: [{\r\n\t\t\t\ttype: \"text\",\r\n\t\t\t\tattributes: {\r\n\t\t\t\t\ttext: {\r\n\t\t\t\t\t\ttype: \"string\",\r\n\t\t\t\t\t\tvalue: \"Close\"\r\n\t\t\t}}}\r\n\t\t]}],\r\n\t\tparentWidget: $tw.rootWidget,\r\n\t\tdocument: document,\r\n\t\tvariables: variables\r\n\t});\r\n\tfooterWidgetNode.render(modalFooterButtons,null);\r\n\tthis.wiki.addEventListener(\"change\",function(changes) {\r\n\t\tfooterWidgetNode.refresh(changes,modalFooterButtons,null);\r\n\t});\r\n\t// Add the close event handler\r\n\tvar closeHandler = function(event) {\r\n\t\t// Decrease the modal count and adjust the body class\r\n\t\tself.modalCount--;\r\n\t\tself.adjustPageClass();\r\n\t\t// Force layout and animate the modal message away\r\n\t\t$tw.utils.forceLayout(modalBackdrop);\r\n\t\t$tw.utils.forceLayout(modalWrapper);\r\n\t\t$tw.utils.setStyle(modalBackdrop,[\r\n\t\t\t{opacity: \"0\"}\r\n\t\t]);\r\n\t\t$tw.utils.setStyle(modalWrapper,[\r\n\t\t\t{transform: \"translateY(\" + window.innerHeight + \"px)\"}\r\n\t\t]);\r\n\t\t// Set up an event for the transition end\r\n\t\twindow.setTimeout(function() {\r\n\t\t\tif(wrapper.parentNode) {\r\n\t\t\t\t// Remove the modal message from the DOM\r\n\t\t\t\tdocument.body.removeChild(wrapper);\r\n\t\t\t}\r\n\t\t},duration);\r\n\t\t// Don't let anyone else handle the tm-close-tiddler message\r\n\t\treturn false;\r\n\t};\r\n\theaderWidgetNode.addEventListener(\"tm-close-tiddler\",closeHandler,false);\r\n\tbodyWidgetNode.addEventListener(\"tm-close-tiddler\",closeHandler,false);\r\n\tfooterWidgetNode.addEventListener(\"tm-close-tiddler\",closeHandler,false);\r\n\t// Set the initial styles for the message\r\n\t$tw.utils.setStyle(modalBackdrop,[\r\n\t\t{opacity: \"0\"}\r\n\t]);\r\n\t$tw.utils.setStyle(modalWrapper,[\r\n\t\t{transformOrigin: \"0% 0%\"},\r\n\t\t{transform: \"translateY(\" + (-window.innerHeight) + \"px)\"}\r\n\t]);\r\n\t// Put the message into the document\r\n\tdocument.body.appendChild(wrapper);\r\n\t// Set up animation for the styles\r\n\t$tw.utils.setStyle(modalBackdrop,[\r\n\t\t{transition: \"opacity \" + duration + \"ms ease-out\"}\r\n\t]);\r\n\t$tw.utils.setStyle(modalWrapper,[\r\n\t\t{transition: $tw.utils.roundTripPropertyName(\"transform\") + \" \" + duration + \"ms ease-in-out\"}\r\n\t]);\r\n\t// Force layout\r\n\t$tw.utils.forceLayout(modalBackdrop);\r\n\t$tw.utils.forceLayout(modalWrapper);\r\n\t// Set final animated styles\r\n\t$tw.utils.setStyle(modalBackdrop,[\r\n\t\t{opacity: \"0.7\"}\r\n\t]);\r\n\t$tw.utils.setStyle(modalWrapper,[\r\n\t\t{transform: \"translateY(0px)\"}\r\n\t]);\r\n};\r\n\r\nModal.prototype.adjustPageClass = function() {\r\n\tif($tw.pageContainer) {\r\n\t\t$tw.utils.toggleClass($tw.pageContainer,\"tc-modal-displayed\",this.modalCount > 0);\r\n\t}\r\n};\r\n\r\nexports.Modal = Modal;\r\n\r\n})();\r\n",
"title": "$:/core/modules/utils/dom/modal.js",
"type": "application/javascript",
"module-type": "utils"
},
"$:/core/modules/utils/dom/notifier.js": {
"text": "/*\\\r\ntitle: $:/core/modules/utils/dom/notifier.js\r\ntype: application/javascript\r\nmodule-type: utils\r\n\r\nNotifier mechanism\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar widget = require(\"$:/core/modules/widgets/widget.js\");\r\n\r\nvar Notifier = function(wiki) {\r\n\tthis.wiki = wiki;\r\n};\r\n\r\n/*\r\nDisplay a notification\r\n\ttitle: Title of tiddler containing the notification text\r\n\toptions: see below\r\nOptions include:\r\n*/\r\nNotifier.prototype.display = function(title,options) {\r\n\toptions = options || {};\r\n\t// Create the wrapper divs\r\n\tvar notification = document.createElement(\"div\"),\r\n\t\ttiddler = this.wiki.getTiddler(title),\r\n\t\tduration = $tw.utils.getAnimationDuration();\r\n\t// Don't do anything if the tiddler doesn't exist\r\n\tif(!tiddler) {\r\n\t\treturn;\r\n\t}\r\n\t// Add classes\r\n\t$tw.utils.addClass(notification,\"tc-notification\");\r\n\t// Render the body of the notification\r\n\tvar widgetNode = this.wiki.makeTranscludeWidget(title,{parentWidget: $tw.rootWidget, document: document});\r\n\twidgetNode.render(notification,null);\r\n\tthis.wiki.addEventListener(\"change\",function(changes) {\r\n\t\twidgetNode.refresh(changes,notification,null);\r\n\t});\r\n\t// Set the initial styles for the notification\r\n\t$tw.utils.setStyle(notification,[\r\n\t\t{opacity: \"0\"},\r\n\t\t{transformOrigin: \"0% 0%\"},\r\n\t\t{transform: \"translateY(\" + (-window.innerHeight) + \"px)\"},\r\n\t\t{transition: \"opacity \" + duration + \"ms ease-out, \" + $tw.utils.roundTripPropertyName(\"transform\") + \" \" + duration + \"ms ease-in-out\"}\r\n\t]);\r\n\t// Add the notification to the DOM\r\n\tdocument.body.appendChild(notification);\r\n\t// Force layout\r\n\t$tw.utils.forceLayout(notification);\r\n\t// Set final animated styles\r\n\t$tw.utils.setStyle(notification,[\r\n\t\t{opacity: \"1.0\"},\r\n\t\t{transform: \"translateY(0px)\"}\r\n\t]);\r\n\t// Set a timer to remove the notification\r\n\twindow.setTimeout(function() {\r\n\t\t// Force layout and animate the notification away\r\n\t\t$tw.utils.forceLayout(notification);\r\n\t\t$tw.utils.setStyle(notification,[\r\n\t\t\t{opacity: \"0.0\"},\r\n\t\t\t{transform: \"translateX(\" + (notification.offsetWidth) + \"px)\"}\r\n\t\t]);\r\n\t\t// Remove the modal message from the DOM once the transition ends\r\n\t\tsetTimeout(function() {\r\n\t\t\tif(notification.parentNode) {\r\n\t\t\t\tdocument.body.removeChild(notification);\r\n\t\t\t}\r\n\t\t},duration);\r\n\t},$tw.config.preferences.notificationDuration);\r\n};\r\n\r\nexports.Notifier = Notifier;\r\n\r\n})();\r\n",
"title": "$:/core/modules/utils/dom/notifier.js",
"type": "application/javascript",
"module-type": "utils"
},
"$:/core/modules/utils/dom/popup.js": {
"text": "/*\\\r\ntitle: $:/core/modules/utils/dom/popup.js\r\ntype: application/javascript\r\nmodule-type: utils\r\n\r\nModule that creates a $tw.utils.Popup object prototype that manages popups in the browser\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nCreates a Popup object with these options:\r\n\trootElement: the DOM element to which the popup zapper should be attached\r\n*/\r\nvar Popup = function(options) {\r\n\toptions = options || {};\r\n\tthis.rootElement = options.rootElement || document.documentElement;\r\n\tthis.popups = []; // Array of {title:,wiki:,domNode:} objects\r\n};\r\n\r\n/*\r\nTrigger a popup open or closed. Parameters are in a hashmap:\r\n\ttitle: title of the tiddler where the popup details are stored\r\n\tdomNode: dom node to which the popup will be positioned\r\n\twiki: wiki\r\n\tforce: if specified, forces the popup state to true or false (instead of toggling it)\r\n*/\r\nPopup.prototype.triggerPopup = function(options) {\r\n\t// Check if this popup is already active\r\n\tvar index = -1;\r\n\tfor(var t=0; t<this.popups.length; t++) {\r\n\t\tif(this.popups[t].title === options.title) {\r\n\t\t\tindex = t;\r\n\t\t}\r\n\t}\r\n\t// Compute the new state\r\n\tvar state = index === -1;\r\n\tif(options.force !== undefined) {\r\n\t\tstate = options.force;\r\n\t}\r\n\t// Show or cancel the popup according to the new state\r\n\tif(state) {\r\n\t\tthis.show(options);\r\n\t} else {\r\n\t\tthis.cancel(index);\r\n\t}\r\n};\r\n\r\nPopup.prototype.handleEvent = function(event) {\r\n\tif(event.type === \"click\") {\r\n\t\t// Find out what was clicked on\r\n\t\tvar info = this.popupInfo(event.target),\r\n\t\t\tcancelLevel = info.popupLevel - 1;\r\n\t\t// Don't remove the level that was clicked on if we clicked on a handle\r\n\t\tif(info.isHandle) {\r\n\t\t\tcancelLevel++;\r\n\t\t}\r\n\t\t// Cancel\r\n\t\tthis.cancel(cancelLevel);\r\n\t}\r\n};\r\n\r\n/*\r\nFind the popup level containing a DOM node. Returns:\r\npopupLevel: count of the number of nested popups containing the specified element\r\nisHandle: true if the specified element is within a popup handle\r\n*/\r\nPopup.prototype.popupInfo = function(domNode) {\r\n\tvar isHandle = false,\r\n\t\tpopupCount = 0,\r\n\t\tnode = domNode;\r\n\t// First check ancestors to see if we're within a popup handle\r\n\twhile(node) {\r\n\t\tif($tw.utils.hasClass(node,\"tc-popup-handle\")) {\r\n\t\t\tisHandle = true;\r\n\t\t\tpopupCount++;\r\n\t\t}\r\n\t\tif($tw.utils.hasClass(node,\"tc-popup-keep\")) {\r\n\t\t\tisHandle = true;\r\n\t\t}\r\n\t\tnode = node.parentNode;\r\n\t}\r\n\t// Then count the number of ancestor popups\r\n\tnode = domNode;\r\n\twhile(node) {\r\n\t\tif($tw.utils.hasClass(node,\"tc-popup\")) {\r\n\t\t\tpopupCount++;\r\n\t\t}\r\n\t\tnode = node.parentNode;\r\n\t}\r\n\tvar info = {\r\n\t\tpopupLevel: popupCount,\r\n\t\tisHandle: isHandle\r\n\t};\r\n\treturn info;\r\n};\r\n\r\n/*\r\nDisplay a popup by adding it to the stack\r\n*/\r\nPopup.prototype.show = function(options) {\r\n\t// Find out what was clicked on\r\n\tvar info = this.popupInfo(options.domNode);\r\n\t// Cancel any higher level popups\r\n\tthis.cancel(info.popupLevel);\r\n\t// Store the popup details\r\n\tthis.popups.push({\r\n\t\ttitle: options.title,\r\n\t\twiki: options.wiki,\r\n\t\tdomNode: options.domNode\r\n\t});\r\n\t// Set the state tiddler\r\n\toptions.wiki.setTextReference(options.title,\r\n\t\t\t\"(\" + options.domNode.offsetLeft + \",\" + options.domNode.offsetTop + \",\" + \r\n\t\t\t\toptions.domNode.offsetWidth + \",\" + options.domNode.offsetHeight + \")\");\r\n\t// Add the click handler if we have any popups\r\n\tif(this.popups.length > 0) {\r\n\t\tthis.rootElement.addEventListener(\"click\",this,true);\t\t\r\n\t}\r\n};\r\n\r\n/*\r\nCancel all popups at or above a specified level or DOM node\r\nlevel: popup level to cancel (0 cancels all popups)\r\n*/\r\nPopup.prototype.cancel = function(level) {\r\n\tvar numPopups = this.popups.length;\r\n\tlevel = Math.max(0,Math.min(level,numPopups));\r\n\tfor(var t=level; t<numPopups; t++) {\r\n\t\tvar popup = this.popups.pop();\r\n\t\tif(popup.title) {\r\n\t\t\tpopup.wiki.deleteTiddler(popup.title);\r\n\t\t}\r\n\t}\r\n\tif(this.popups.length === 0) {\r\n\t\tthis.rootElement.removeEventListener(\"click\",this,false);\r\n\t}\r\n};\r\n\r\n/*\r\nReturns true if the specified title and text identifies an active popup\r\n*/\r\nPopup.prototype.readPopupState = function(text) {\r\n\tvar popupLocationRegExp = /^\\((-?[0-9\\.E]+),(-?[0-9\\.E]+),(-?[0-9\\.E]+),(-?[0-9\\.E]+)\\)$/;\r\n\treturn popupLocationRegExp.test(text);\r\n};\r\n\r\nexports.Popup = Popup;\r\n\r\n})();\r\n",
"title": "$:/core/modules/utils/dom/popup.js",
"type": "application/javascript",
"module-type": "utils"
},
"$:/core/modules/utils/dom/scroller.js": {
"text": "/*\\\r\ntitle: $:/core/modules/utils/dom/scroller.js\r\ntype: application/javascript\r\nmodule-type: utils\r\n\r\nModule that creates a $tw.utils.Scroller object prototype that manages scrolling in the browser\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nEvent handler for when the `tm-scroll` event hits the document body\r\n*/\r\nvar PageScroller = function() {\r\n\tthis.idRequestFrame = null;\r\n\tthis.requestAnimationFrame = window.requestAnimationFrame ||\r\n\t\twindow.webkitRequestAnimationFrame ||\r\n\t\twindow.mozRequestAnimationFrame ||\r\n\t\tfunction(callback) {\r\n\t\t\treturn window.setTimeout(callback, 1000/60);\r\n\t\t};\r\n\tthis.cancelAnimationFrame = window.cancelAnimationFrame ||\r\n\t\twindow.webkitCancelAnimationFrame ||\r\n\t\twindow.webkitCancelRequestAnimationFrame ||\r\n\t\twindow.mozCancelAnimationFrame ||\r\n\t\twindow.mozCancelRequestAnimationFrame ||\r\n\t\tfunction(id) {\r\n\t\t\twindow.clearTimeout(id);\r\n\t\t};\r\n};\r\n\r\nPageScroller.prototype.cancelScroll = function() {\r\n\tif(this.idRequestFrame) {\r\n\t\tthis.cancelAnimationFrame.call(window,this.idRequestFrame);\r\n\t\tthis.idRequestFrame = null;\r\n\t}\r\n};\r\n\r\n/*\r\nHandle an event\r\n*/\r\nPageScroller.prototype.handleEvent = function(event) {\r\n\tif(event.type === \"tm-scroll\") {\r\n\t\treturn this.scrollIntoView(event.target);\r\n\t}\r\n\treturn true;\r\n};\r\n\r\n/*\r\nHandle a scroll event hitting the page document\r\n*/\r\nPageScroller.prototype.scrollIntoView = function(element) {\r\n\tvar duration = $tw.utils.getAnimationDuration();\r\n\t// Now get ready to scroll the body\r\n\tthis.cancelScroll();\r\n\tthis.startTime = Date.now();\r\n\tvar scrollPosition = $tw.utils.getScrollPosition();\r\n\t// Get the client bounds of the element and adjust by the scroll position\r\n\tvar clientBounds = element.getBoundingClientRect(),\r\n\t\tbounds = {\r\n\t\t\tleft: clientBounds.left + scrollPosition.x,\r\n\t\t\ttop: clientBounds.top + scrollPosition.y,\r\n\t\t\twidth: clientBounds.width,\r\n\t\t\theight: clientBounds.height\r\n\t\t};\r\n\t// We'll consider the horizontal and vertical scroll directions separately via this function\r\n\tvar getEndPos = function(targetPos,targetSize,currentPos,currentSize) {\r\n\t\t\t// If the target is above/left of the current view, then scroll to it's top/left\r\n\t\t\tif(targetPos <= currentPos) {\r\n\t\t\t\treturn targetPos;\r\n\t\t\t// If the target is smaller than the window and the scroll position is too far up, then scroll till the target is at the bottom of the window\r\n\t\t\t} else if(targetSize < currentSize && currentPos < (targetPos + targetSize - currentSize)) {\r\n\t\t\t\treturn targetPos + targetSize - currentSize;\r\n\t\t\t// If the target is big, then just scroll to the top\r\n\t\t\t} else if(currentPos < targetPos) {\r\n\t\t\t\treturn targetPos;\r\n\t\t\t// Otherwise, stay where we are\r\n\t\t\t} else {\r\n\t\t\t\treturn currentPos;\r\n\t\t\t}\r\n\t\t},\r\n\t\tendX = getEndPos(bounds.left,bounds.width,scrollPosition.x,window.innerWidth),\r\n\t\tendY = getEndPos(bounds.top,bounds.height,scrollPosition.y,window.innerHeight);\r\n\t// Only scroll if necessary\r\n\tif(endX !== scrollPosition.x || endY !== scrollPosition.y) {\r\n\t\tvar self = this,\r\n\t\t\tdrawFrame;\r\n\t\tdrawFrame = function () {\r\n\t\t\tvar t;\r\n\t\t\tif(duration <= 0) {\r\n\t\t\t\tt = 1;\r\n\t\t\t} else {\r\n\t\t\t\tt = ((Date.now()) - self.startTime) / duration;\t\r\n\t\t\t}\r\n\t\t\tif(t >= 1) {\r\n\t\t\t\tself.cancelScroll();\r\n\t\t\t\tt = 1;\r\n\t\t\t}\r\n\t\t\tt = $tw.utils.slowInSlowOut(t);\r\n\t\t\twindow.scrollTo(scrollPosition.x + (endX - scrollPosition.x) * t,scrollPosition.y + (endY - scrollPosition.y) * t);\r\n\t\t\tif(t < 1) {\r\n\t\t\t\tself.idRequestFrame = self.requestAnimationFrame.call(window,drawFrame);\r\n\t\t\t}\r\n\t\t};\r\n\t\tdrawFrame();\r\n\t}\r\n};\r\n\r\nexports.PageScroller = PageScroller;\r\n\r\n})();\r\n",
"title": "$:/core/modules/utils/dom/scroller.js",
"type": "application/javascript",
"module-type": "utils"
},
"$:/core/modules/utils/edition-info.js": {
"text": "/*\\\r\ntitle: $:/core/modules/utils/edition-info.js\r\ntype: application/javascript\r\nmodule-type: utils-node\r\n\r\nInformation about the available editions\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar fs = require(\"fs\"),\r\n\tpath = require(\"path\");\r\n\r\nvar editionInfo;\r\n\r\nexports.getEditionInfo = function() {\r\n\tif(!editionInfo) {\r\n\t\t// Enumerate the edition paths\r\n\t\tvar editionPaths = $tw.getLibraryItemSearchPaths($tw.config.editionsPath,$tw.config.editionsEnvVar);\r\n\t\teditionInfo = {};\r\n\t\tfor(var editionIndex=0; editionIndex<editionPaths.length; editionIndex++) {\r\n\t\t\tvar editionPath = editionPaths[editionIndex];\r\n\t\t\t// Enumerate the folders\r\n\t\t\tvar entries = fs.readdirSync(editionPath);\r\n\t\t\tfor(var entryIndex=0; entryIndex<entries.length; entryIndex++) {\r\n\t\t\t\tvar entry = entries[entryIndex];\r\n\t\t\t\t// Check if directories have a valid tiddlywiki.info\r\n\t\t\t\tif(!editionInfo[entry] && $tw.utils.isDirectory(path.resolve(editionPath,entry))) {\r\n\t\t\t\t\tvar info;\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tinfo = JSON.parse(fs.readFileSync(path.resolve(editionPath,entry,\"tiddlywiki.info\"),\"utf8\"));\r\n\t\t\t\t\t} catch(ex) {\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(info) {\r\n\t\t\t\t\t\teditionInfo[entry] = info;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn editionInfo;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/utils/edition-info.js",
"type": "application/javascript",
"module-type": "utils-node"
},
"$:/core/modules/utils/fakedom.js": {
"text": "/*\\\r\ntitle: $:/core/modules/utils/fakedom.js\r\ntype: application/javascript\r\nmodule-type: global\r\n\r\nA barebones implementation of DOM interfaces needed by the rendering mechanism.\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n// Sequence number used to enable us to track objects for testing\r\nvar sequenceNumber = null;\r\n\r\nvar bumpSequenceNumber = function(object) {\r\n\tif(sequenceNumber !== null) {\r\n\t\tobject.sequenceNumber = sequenceNumber++;\r\n\t}\r\n};\r\n\r\nvar TW_TextNode = function(text) {\r\n\tbumpSequenceNumber(this);\r\n\tthis.textContent = text;\r\n};\r\n\r\nObject.defineProperty(TW_TextNode.prototype, \"formattedTextContent\", {\r\n\tget: function() {\r\n\t\treturn this.textContent.replace(/(\\r?\\n)/g,\"\");\r\n\t}\r\n});\r\n\r\nvar TW_Element = function(tag,namespace) {\r\n\tbumpSequenceNumber(this);\r\n\tthis.isTiddlyWikiFakeDom = true;\r\n\tthis.tag = tag;\r\n\tthis.attributes = {};\r\n\tthis.isRaw = false;\r\n\tthis.children = [];\r\n\tthis.style = {};\r\n\tthis.namespaceURI = namespace || \"http://www.w3.org/1999/xhtml\";\r\n};\r\n\r\nTW_Element.prototype.setAttribute = function(name,value) {\r\n\tif(this.isRaw) {\r\n\t\tthrow \"Cannot setAttribute on a raw TW_Element\";\r\n\t}\r\n\tthis.attributes[name] = value;\r\n};\r\n\r\nTW_Element.prototype.setAttributeNS = function(namespace,name,value) {\r\n\tthis.setAttribute(name,value);\r\n};\r\n\r\nTW_Element.prototype.removeAttribute = function(name) {\r\n\tif(this.isRaw) {\r\n\t\tthrow \"Cannot removeAttribute on a raw TW_Element\";\r\n\t}\r\n\tif($tw.utils.hop(this.attributes,name)) {\r\n\t\tdelete this.attributes[name];\r\n\t}\r\n};\r\n\r\nTW_Element.prototype.appendChild = function(node) {\r\n\tthis.children.push(node);\r\n\tnode.parentNode = this;\r\n};\r\n\r\nTW_Element.prototype.insertBefore = function(node,nextSibling) {\r\n\tif(nextSibling) {\r\n\t\tvar p = this.children.indexOf(nextSibling);\r\n\t\tif(p !== -1) {\r\n\t\t\tthis.children.splice(p,0,node);\r\n\t\t\tnode.parentNode = this;\r\n\t\t} else {\r\n\t\t\tthis.appendChild(node);\r\n\t\t}\r\n\t} else {\r\n\t\tthis.appendChild(node);\r\n\t}\r\n};\r\n\r\nTW_Element.prototype.removeChild = function(node) {\r\n\tvar p = this.children.indexOf(node);\r\n\tif(p !== -1) {\r\n\t\tthis.children.splice(p,1);\r\n\t}\r\n};\r\n\r\nTW_Element.prototype.hasChildNodes = function() {\r\n\treturn !!this.children.length;\r\n};\r\n\r\nObject.defineProperty(TW_Element.prototype, \"firstChild\", {\r\n\tget: function() {\r\n\t\treturn this.children[0];\r\n\t}\r\n});\r\n\r\nTW_Element.prototype.addEventListener = function(type,listener,useCapture) {\r\n\t// Do nothing\r\n};\r\n\r\nObject.defineProperty(TW_Element.prototype, \"className\", {\r\n\tget: function() {\r\n\t\treturn this.attributes[\"class\"] || \"\";\r\n\t},\r\n\tset: function(value) {\r\n\t\tthis.attributes[\"class\"] = value;\r\n\t}\r\n});\r\n\r\nObject.defineProperty(TW_Element.prototype, \"value\", {\r\n\tget: function() {\r\n\t\treturn this.attributes.value || \"\";\r\n\t},\r\n\tset: function(value) {\r\n\t\tthis.attributes.value = value;\r\n\t}\r\n});\r\n\r\nObject.defineProperty(TW_Element.prototype, \"outerHTML\", {\r\n\tget: function() {\r\n\t\tvar output = [],attr,a,v;\r\n\t\toutput.push(\"<\",this.tag);\r\n\t\tif(this.attributes) {\r\n\t\t\tattr = [];\r\n\t\t\tfor(a in this.attributes) {\r\n\t\t\t\tattr.push(a);\r\n\t\t\t}\r\n\t\t\tattr.sort();\r\n\t\t\tfor(a=0; a<attr.length; a++) {\r\n\t\t\t\tv = this.attributes[attr[a]];\r\n\t\t\t\tif(v !== undefined) {\r\n\t\t\t\t\toutput.push(\" \",attr[a],\"='\",$tw.utils.htmlEncode(v),\"'\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(this.style) {\r\n\t\t\tvar style = [];\r\n\t\t\tfor(var s in this.style) {\r\n\t\t\t\tstyle.push(s + \":\" + this.style[s] + \";\");\r\n\t\t\t}\r\n\t\t\tif(style.length > 0) {\r\n\t\t\t\toutput.push(\" style='\",style.join(\"\"),\"'\")\r\n\t\t\t}\r\n\t\t}\r\n\t\toutput.push(\">\");\r\n\t\tif($tw.config.htmlVoidElements.indexOf(this.tag) === -1) {\r\n\t\t\toutput.push(this.innerHTML);\r\n\t\t\toutput.push(\"</\",this.tag,\">\");\r\n\t\t}\r\n\t\treturn output.join(\"\");\r\n\t}\r\n});\r\n\r\nObject.defineProperty(TW_Element.prototype, \"innerHTML\", {\r\n\tget: function() {\r\n\t\tif(this.isRaw) {\r\n\t\t\treturn this.rawHTML;\r\n\t\t} else {\r\n\t\t\tvar b = [];\r\n\t\t\t$tw.utils.each(this.children,function(node) {\r\n\t\t\t\tif(node instanceof TW_Element) {\r\n\t\t\t\t\tb.push(node.outerHTML);\r\n\t\t\t\t} else if(node instanceof TW_TextNode) {\r\n\t\t\t\t\tb.push($tw.utils.htmlEncode(node.textContent));\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\treturn b.join(\"\");\r\n\t\t}\r\n\t},\r\n\tset: function(value) {\r\n\t\tthis.isRaw = true;\r\n\t\tthis.rawHTML = value;\r\n\t}\r\n});\r\n\r\nObject.defineProperty(TW_Element.prototype, \"textContent\", {\r\n\tget: function() {\r\n\t\tif(this.isRaw) {\r\n\t\t\tthrow \"Cannot get textContent on a raw TW_Element\";\r\n\t\t} else {\r\n\t\t\tvar b = [];\r\n\t\t\t$tw.utils.each(this.children,function(node) {\r\n\t\t\t\tb.push(node.textContent);\r\n\t\t\t});\r\n\t\t\treturn b.join(\"\");\r\n\t\t}\r\n\t},\r\n\tset: function(value) {\r\n\t\tthis.children = [new TW_TextNode(value)];\r\n\t}\r\n});\r\n\r\nObject.defineProperty(TW_Element.prototype, \"formattedTextContent\", {\r\n\tget: function() {\r\n\t\tif(this.isRaw) {\r\n\t\t\tthrow \"Cannot get formattedTextContent on a raw TW_Element\";\r\n\t\t} else {\r\n\t\t\tvar b = [],\r\n\t\t\t\tisBlock = $tw.config.htmlBlockElements.indexOf(this.tag) !== -1;\r\n\t\t\tif(isBlock) {\r\n\t\t\t\tb.push(\"\\n\");\r\n\t\t\t}\r\n\t\t\tif(this.tag === \"li\") {\r\n\t\t\t\tb.push(\"* \");\r\n\t\t\t}\r\n\t\t\t$tw.utils.each(this.children,function(node) {\r\n\t\t\t\tb.push(node.formattedTextContent);\r\n\t\t\t});\r\n\t\t\tif(isBlock) {\r\n\t\t\t\tb.push(\"\\n\");\r\n\t\t\t}\r\n\t\t\treturn b.join(\"\");\r\n\t\t}\r\n\t}\r\n});\r\n\r\nvar document = {\r\n\tsetSequenceNumber: function(value) {\r\n\t\tsequenceNumber = value;\r\n\t},\r\n\tcreateElementNS: function(namespace,tag) {\r\n\t\treturn new TW_Element(tag,namespace);\r\n\t},\r\n\tcreateElement: function(tag) {\r\n\t\treturn new TW_Element(tag);\r\n\t},\r\n\tcreateTextNode: function(text) {\r\n\t\treturn new TW_TextNode(text);\r\n\t},\r\n\tcompatMode: \"CSS1Compat\", // For KaTeX to know that we're not a browser in quirks mode\r\n\tisTiddlyWikiFakeDom: true\r\n};\r\n\r\nexports.fakeDocument = document;\r\n\r\n})();\r\n",
"title": "$:/core/modules/utils/fakedom.js",
"type": "application/javascript",
"module-type": "global"
},
"$:/core/modules/utils/filesystem.js": {
"text": "/*\\\r\ntitle: $:/core/modules/utils/filesystem.js\r\ntype: application/javascript\r\nmodule-type: utils-node\r\n\r\nFile system utilities\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar fs = require(\"fs\"),\r\n\tpath = require(\"path\");\r\n\r\n/*\r\nRecursively (and synchronously) copy a directory and all its content\r\n*/\r\nexports.copyDirectory = function(srcPath,dstPath) {\r\n\t// Remove any trailing path separators\r\n\tsrcPath = $tw.utils.removeTrailingSeparator(srcPath);\r\n\tdstPath = $tw.utils.removeTrailingSeparator(dstPath);\r\n\t// Create the destination directory\r\n\tvar err = $tw.utils.createDirectory(dstPath);\r\n\tif(err) {\r\n\t\treturn err;\r\n\t}\r\n\t// Function to copy a folder full of files\r\n\tvar copy = function(srcPath,dstPath) {\r\n\t\tvar srcStats = fs.lstatSync(srcPath),\r\n\t\t\tdstExists = fs.existsSync(dstPath);\r\n\t\tif(srcStats.isFile()) {\r\n\t\t\t$tw.utils.copyFile(srcPath,dstPath);\r\n\t\t} else if(srcStats.isDirectory()) {\r\n\t\t\tvar items = fs.readdirSync(srcPath);\r\n\t\t\tfor(var t=0; t<items.length; t++) {\r\n\t\t\t\tvar item = items[t],\r\n\t\t\t\t\terr = copy(srcPath + path.sep + item,dstPath + path.sep + item);\r\n\t\t\t\tif(err) {\r\n\t\t\t\t\treturn err;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\tcopy(srcPath,dstPath);\r\n\treturn null;\r\n};\r\n\r\n/*\r\nCopy a file\r\n*/\r\nvar FILE_BUFFER_LENGTH = 64 * 1024,\r\n\tfileBuffer;\r\n\r\nexports.copyFile = function(srcPath,dstPath) {\r\n\t// Create buffer if required\r\n\tif(!fileBuffer) {\r\n\t\tfileBuffer = new Buffer(FILE_BUFFER_LENGTH);\r\n\t}\r\n\t// Create any directories in the destination\r\n\t$tw.utils.createDirectory(path.dirname(dstPath));\r\n\t// Copy the file\r\n\tvar srcFile = fs.openSync(srcPath,\"r\"),\r\n\t\tdstFile = fs.openSync(dstPath,\"w\"),\r\n\t\tbytesRead = 1,\r\n\t\tpos = 0;\r\n\twhile (bytesRead > 0) {\r\n\t\tbytesRead = fs.readSync(srcFile,fileBuffer,0,FILE_BUFFER_LENGTH,pos);\r\n\t\tfs.writeSync(dstFile,fileBuffer,0,bytesRead);\r\n\t\tpos += bytesRead;\r\n\t}\r\n\tfs.closeSync(srcFile);\r\n\tfs.closeSync(dstFile);\r\n\treturn null;\r\n};\r\n\r\n/*\r\nRemove trailing path separator\r\n*/\r\nexports.removeTrailingSeparator = function(dirPath) {\r\n\tvar len = dirPath.length;\r\n\tif(dirPath.charAt(len-1) === path.sep) {\r\n\t\tdirPath = dirPath.substr(0,len-1);\r\n\t}\r\n\treturn dirPath;\r\n};\r\n\r\n/*\r\nRecursively create a directory\r\n*/\r\nexports.createDirectory = function(dirPath) {\r\n\tif(dirPath.substr(dirPath.length-1,1) !== path.sep) {\r\n\t\tdirPath = dirPath + path.sep;\r\n\t}\r\n\tvar pos = 1;\r\n\tpos = dirPath.indexOf(path.sep,pos);\r\n\twhile(pos !== -1) {\r\n\t\tvar subDirPath = dirPath.substr(0,pos);\r\n\t\tif(!$tw.utils.isDirectory(subDirPath)) {\r\n\t\t\ttry {\r\n\t\t\t\tfs.mkdirSync(subDirPath);\r\n\t\t\t} catch(e) {\r\n\t\t\t\treturn \"Error creating directory '\" + subDirPath + \"'\";\r\n\t\t\t}\r\n\t\t}\r\n\t\tpos = dirPath.indexOf(path.sep,pos + 1);\r\n\t}\r\n\treturn null;\r\n};\r\n\r\n/*\r\nRecursively create directories needed to contain a specified file\r\n*/\r\nexports.createFileDirectories = function(filePath) {\r\n\treturn $tw.utils.createDirectory(path.dirname(filePath));\r\n};\r\n\r\n/*\r\nRecursively delete a directory\r\n*/\r\nexports.deleteDirectory = function(dirPath) {\r\n\tif(fs.existsSync(dirPath)) {\r\n\t\tvar entries = fs.readdirSync(dirPath);\r\n\t\tfor(var entryIndex=0; entryIndex<entries.length; entryIndex++) {\r\n\t\t\tvar currPath = dirPath + path.sep + entries[entryIndex];\r\n\t\t\tif(fs.lstatSync(currPath).isDirectory()) {\r\n\t\t\t\t$tw.utils.deleteDirectory(currPath);\r\n\t\t\t} else {\r\n\t\t\t\tfs.unlinkSync(currPath);\r\n\t\t\t}\r\n\t\t}\r\n\tfs.rmdirSync(dirPath);\r\n\t}\r\n\treturn null;\r\n};\r\n\r\n/*\r\nCheck if a path identifies a directory\r\n*/\r\nexports.isDirectory = function(dirPath) {\r\n\treturn fs.existsSync(dirPath) && fs.statSync(dirPath).isDirectory();\r\n};\r\n\r\n/*\r\nCheck if a path identifies a directory that is empty\r\n*/\r\nexports.isDirectoryEmpty = function(dirPath) {\r\n\tif(!$tw.utils.isDirectory(dirPath)) {\r\n\t\treturn false;\r\n\t}\r\n\tvar files = fs.readdirSync(dirPath),\r\n\t\tempty = true;\r\n\t$tw.utils.each(files,function(file,index) {\r\n\t\tif(file.charAt(0) !== \".\") {\r\n\t\t\tempty = false;\r\n\t\t}\r\n\t});\r\n\treturn empty;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/utils/filesystem.js",
"type": "application/javascript",
"module-type": "utils-node"
},
"$:/core/modules/utils/logger.js": {
"text": "/*\\\r\ntitle: $:/core/modules/utils/logger.js\r\ntype: application/javascript\r\nmodule-type: utils\r\n\r\nA basic logging implementation\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar ALERT_TAG = \"$:/tags/Alert\";\r\n\r\n/*\r\nMake a new logger\r\n*/\r\nfunction Logger(componentName) {\r\n\tthis.componentName = componentName || \"\";\r\n}\r\n\r\n/*\r\nLog a message\r\n*/\r\nLogger.prototype.log = function(/* args */) {\r\n\tif(console !== undefined && console.log !== undefined) {\r\n\t\treturn Function.apply.call(console.log, console, [this.componentName + \":\"].concat(Array.prototype.slice.call(arguments,0)));\r\n\t}\r\n};\r\n\r\n/*\r\nAlert a message\r\n*/\r\nLogger.prototype.alert = function(/* args */) {\r\n\t// Prepare the text of the alert\r\n\tvar text = Array.prototype.join.call(arguments,\" \");\r\n\t// Check if there is an existing alert with the same text and the same component\r\n\tvar existingAlerts = $tw.wiki.getTiddlersWithTag(ALERT_TAG),\r\n\t\talertFields,\r\n\t\texistingCount,\r\n\t\tself = this;\r\n\t$tw.utils.each(existingAlerts,function(title) {\r\n\t\tvar tiddler = $tw.wiki.getTiddler(title);\r\n\t\tif(tiddler.fields.text === text && tiddler.fields.component === self.componentName && tiddler.fields.modified && (!alertFields || tiddler.fields.modified < alertFields.modified)) {\r\n\t\t\t\talertFields = $tw.utils.extend({},tiddler.fields);\r\n\t\t}\r\n\t});\r\n\tif(alertFields) {\r\n\t\texistingCount = alertFields.count || 1;\r\n\t} else {\r\n\t\talertFields = {\r\n\t\t\ttitle: $tw.wiki.generateNewTitle(\"$:/temp/alerts/alert\",{prefix: \"\"}),\r\n\t\t\ttext: text,\r\n\t\t\ttags: [ALERT_TAG],\r\n\t\t\tcomponent: this.componentName\r\n\t\t};\r\n\t\texistingCount = 0;\r\n\t}\r\n\talertFields.modified = new Date();\r\n\tif(++existingCount > 1) {\r\n\t\talertFields.count = existingCount;\r\n\t} else {\r\n\t\talertFields.count = undefined;\r\n\t}\r\n\t$tw.wiki.addTiddler(new $tw.Tiddler(alertFields));\r\n\t// Log it too\r\n\tthis.log.apply(this,Array.prototype.slice.call(arguments,0));\r\n};\r\n\r\nexports.Logger = Logger;\r\n\r\n})();\r\n",
"title": "$:/core/modules/utils/logger.js",
"type": "application/javascript",
"module-type": "utils"
},
"$:/core/modules/utils/parsetree.js": {
"text": "/*\\\r\ntitle: $:/core/modules/utils/parsetree.js\r\ntype: application/javascript\r\nmodule-type: utils\r\n\r\nParse tree utility functions.\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nexports.addAttributeToParseTreeNode = function(node,name,value) {\r\n\tnode.attributes = node.attributes || {};\r\n\tnode.attributes[name] = {type: \"string\", value: value};\r\n};\r\n\r\nexports.getAttributeValueFromParseTreeNode = function(node,name,defaultValue) {\r\n\tif(node.attributes && node.attributes[name] && node.attributes[name].value !== undefined) {\r\n\t\treturn node.attributes[name].value;\r\n\t}\r\n\treturn defaultValue;\r\n};\r\n\r\nexports.addClassToParseTreeNode = function(node,classString) {\r\n\tvar classes = [];\r\n\tnode.attributes = node.attributes || {};\r\n\tnode.attributes[\"class\"] = node.attributes[\"class\"] || {type: \"string\", value: \"\"};\r\n\tif(node.attributes[\"class\"].type === \"string\") {\r\n\t\tif(node.attributes[\"class\"].value !== \"\") {\r\n\t\t\tclasses = node.attributes[\"class\"].value.split(\" \");\r\n\t\t}\r\n\t\tif(classString !== \"\") {\r\n\t\t\t$tw.utils.pushTop(classes,classString.split(\" \"));\r\n\t\t}\r\n\t\tnode.attributes[\"class\"].value = classes.join(\" \");\r\n\t}\r\n};\r\n\r\nexports.addStyleToParseTreeNode = function(node,name,value) {\r\n\t\tnode.attributes = node.attributes || {};\r\n\t\tnode.attributes.style = node.attributes.style || {type: \"string\", value: \"\"};\r\n\t\tif(node.attributes.style.type === \"string\") {\r\n\t\t\tnode.attributes.style.value += name + \":\" + value + \";\";\r\n\t\t}\r\n};\r\n\r\nexports.findParseTreeNode = function(nodeArray,search) {\r\n\tfor(var t=0; t<nodeArray.length; t++) {\r\n\t\tif(nodeArray[t].type === search.type && nodeArray[t].tag === search.tag) {\r\n\t\t\treturn nodeArray[t];\r\n\t\t}\r\n\t}\r\n\treturn undefined;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/utils/parsetree.js",
"type": "application/javascript",
"module-type": "utils"
},
"$:/core/modules/utils/performance.js": {
"text": "/*\\\r\ntitle: $:/core/modules/utils/performance.js\r\ntype: application/javascript\r\nmodule-type: global\r\n\r\nPerformance measurement.\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nfunction Performance(enabled) {\r\n\tthis.enabled = !!enabled;\r\n\tthis.measures = {}; // Hashmap of current values of measurements\r\n\tthis.logger = new $tw.utils.Logger(\"performance\");\r\n}\r\n\r\n/*\r\nWrap performance reporting around a top level function\r\n*/\r\nPerformance.prototype.report = function(name,fn) {\r\n\tvar self = this;\r\n\tif(this.enabled) {\r\n\t\treturn function() {\r\n\t\t\tself.measures = {};\r\n\t\t\tvar startTime = $tw.utils.timer(),\r\n\t\t\t\tresult = fn.apply(this,arguments);\r\n\t\t\tself.logger.log(name + \": \" + $tw.utils.timer(startTime) + \"ms\");\r\n\t\t\tfor(var m in self.measures) {\r\n\t\t\t\tself.logger.log(\"+\" + m + \": \" + self.measures[m] + \"ms\");\r\n\t\t\t}\r\n\t\t\treturn result;\r\n\t\t};\r\n\t} else {\r\n\t\treturn fn;\r\n\t}\r\n};\r\n\r\n/*\r\nWrap performance measurements around a subfunction\r\n*/\r\nPerformance.prototype.measure = function(name,fn) {\r\n\tvar self = this;\r\n\tif(this.enabled) {\r\n\t\treturn function() {\r\n\t\t\tvar startTime = $tw.utils.timer(),\r\n\t\t\t\tresult = fn.apply(this,arguments),\r\n\t\t\t\tvalue = self.measures[name] || 0;\r\n\t\t\tself.measures[name] = value + $tw.utils.timer(startTime);\r\n\t\t\treturn result;\r\n\t\t};\r\n\t} else {\r\n\t\treturn fn;\r\n\t}\r\n};\r\n\r\nexports.Performance = Performance;\r\n\r\n})();\r\n",
"title": "$:/core/modules/utils/performance.js",
"type": "application/javascript",
"module-type": "global"
},
"$:/core/modules/utils/pluginmaker.js": {
"text": "/*\\\r\ntitle: $:/core/modules/utils/pluginmaker.js\r\ntype: application/javascript\r\nmodule-type: utils\r\n\r\nA quick and dirty way to pack up plugins within the browser.\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nRepack a plugin, and then delete any non-shadow payload tiddlers\r\n*/\r\nexports.repackPlugin = function(title,additionalTiddlers,excludeTiddlers) {\r\n\tadditionalTiddlers = additionalTiddlers || [];\r\n\texcludeTiddlers = excludeTiddlers || [];\r\n\t// Get the plugin tiddler\r\n\tvar pluginTiddler = $tw.wiki.getTiddler(title);\r\n\tif(!pluginTiddler) {\r\n\t\tthrow \"No such tiddler as \" + title;\r\n\t}\r\n\t// Extract the JSON\r\n\tvar jsonPluginTiddler;\r\n\ttry {\r\n\t\tjsonPluginTiddler = JSON.parse(pluginTiddler.fields.text);\r\n\t} catch(e) {\r\n\t\tthrow \"Cannot parse plugin tiddler \" + title + \"\\nError: \" + e;\r\n\t}\r\n\t// Get the list of tiddlers\r\n\tvar tiddlers = Object.keys(jsonPluginTiddler.tiddlers);\r\n\t// Add the additional tiddlers\r\n\t$tw.utils.pushTop(tiddlers,additionalTiddlers);\r\n\t// Remove any excluded tiddlers\r\n\tfor(var t=tiddlers.length-1; t>=0; t--) {\r\n\t\tif(excludeTiddlers.indexOf(tiddlers[t]) !== -1) {\r\n\t\t\ttiddlers.splice(t,1);\r\n\t\t}\r\n\t}\r\n\t// Pack up the tiddlers into a block of JSON\r\n\tvar plugins = {};\r\n\t$tw.utils.each(tiddlers,function(title) {\r\n\t\tvar tiddler = $tw.wiki.getTiddler(title),\r\n\t\t\tfields = {};\r\n\t\t$tw.utils.each(tiddler.fields,function (value,name) {\r\n\t\t\tfields[name] = tiddler.getFieldString(name);\r\n\t\t});\r\n\t\tplugins[title] = fields;\r\n\t});\r\n\t// Retrieve and bump the version number\r\n\tvar pluginVersion = $tw.utils.parseVersion(pluginTiddler.getFieldString(\"version\") || \"0.0.0\") || {\r\n\t\t\tmajor: \"0\",\r\n\t\t\tminor: \"0\",\r\n\t\t\tpatch: \"0\"\r\n\t\t};\r\n\tpluginVersion.patch++;\r\n\tvar version = pluginVersion.major + \".\" + pluginVersion.minor + \".\" + pluginVersion.patch;\r\n\tif(pluginVersion.prerelease) {\r\n\t\tversion += \"-\" + pluginVersion.prerelease;\r\n\t}\r\n\tif(pluginVersion.build) {\r\n\t\tversion += \"+\" + pluginVersion.build;\r\n\t}\r\n\t// Save the tiddler\r\n\t$tw.wiki.addTiddler(new $tw.Tiddler(pluginTiddler,{text: JSON.stringify({tiddlers: plugins},null,4), version: version}));\r\n\t// Delete any non-shadow constituent tiddlers\r\n\t$tw.utils.each(tiddlers,function(title) {\r\n\t\tif($tw.wiki.tiddlerExists(title)) {\r\n\t\t\t$tw.wiki.deleteTiddler(title);\r\n\t\t}\r\n\t});\r\n\t// Trigger an autosave\r\n\t$tw.rootWidget.dispatchEvent({type: \"tm-auto-save-wiki\"});\r\n\t// Return a heartwarming confirmation\r\n\treturn \"Plugin \" + title + \" successfully saved\";\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/utils/pluginmaker.js",
"type": "application/javascript",
"module-type": "utils"
},
"$:/core/modules/utils/utils.js": {
"text": "/*\\\r\ntitle: $:/core/modules/utils/utils.js\r\ntype: application/javascript\r\nmodule-type: utils\r\n\r\nVarious static utility functions.\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nDisplay a warning, in colour if we're on a terminal\r\n*/\r\nexports.warning = function(text) {\r\n\tconsole.log($tw.node ? \"\\x1b[1;33m\" + text + \"\\x1b[0m\" : text);\r\n}\r\n\r\n/*\r\nTrim whitespace from the start and end of a string\r\nThanks to Steven Levithan, http://blog.stevenlevithan.com/archives/faster-trim-javascript\r\n*/\r\nexports.trim = function(str) {\r\n\tif(typeof str === \"string\") {\r\n\t\treturn str.replace(/^\\s\\s*/, '').replace(/\\s\\s*$/, '');\r\n\t} else {\r\n\t\treturn str;\r\n\t}\r\n};\r\n\r\n/*\r\nReturn the number of keys in an object\r\n*/\r\nexports.count = function(object) {\r\n\tvar s = 0;\r\n\t$tw.utils.each(object,function() {s++;});\r\n\treturn s;\r\n};\r\n\r\n/*\r\nCheck if an array is equal by value and by reference.\r\n*/\r\nexports.isArrayEqual = function(array1,array2) {\r\n\tif(array1 === array2) {\r\n\t\treturn true;\r\n\t}\r\n\tarray1 = array1 || [];\r\n\tarray2 = array2 || [];\r\n\tif(array1.length !== array2.length) {\r\n\t\treturn false;\r\n\t}\r\n\treturn array1.every(function(value,index) {\r\n\t\treturn value === array2[index];\r\n\t});\r\n};\r\n\r\n/*\r\nPush entries onto an array, removing them first if they already exist in the array\r\n\tarray: array to modify (assumed to be free of duplicates)\r\n\tvalue: a single value to push or an array of values to push\r\n*/\r\nexports.pushTop = function(array,value) {\r\n\tvar t,p;\r\n\tif($tw.utils.isArray(value)) {\r\n\t\t// Remove any array entries that are duplicated in the new values\r\n\t\tif(value.length !== 0) {\r\n\t\t\tif(array.length !== 0) {\r\n\t\t\t\tif(value.length < array.length) {\r\n\t\t\t\t\tfor(t=0; t<value.length; t++) {\r\n\t\t\t\t\t\tp = array.indexOf(value[t]);\r\n\t\t\t\t\t\tif(p !== -1) {\r\n\t\t\t\t\t\t\tarray.splice(p,1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tfor(t=array.length-1; t>=0; t--) {\r\n\t\t\t\t\t\tp = value.indexOf(array[t]);\r\n\t\t\t\t\t\tif(p !== -1) {\r\n\t\t\t\t\t\t\tarray.splice(t,1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// Push the values on top of the main array\r\n\t\t\tarray.push.apply(array,value);\r\n\t\t}\r\n\t} else {\r\n\t\tp = array.indexOf(value);\r\n\t\tif(p !== -1) {\r\n\t\t\tarray.splice(p,1);\r\n\t\t}\r\n\t\tarray.push(value);\r\n\t}\r\n\treturn array;\r\n};\r\n\r\n/*\r\nRemove entries from an array\r\n\tarray: array to modify\r\n\tvalue: a single value to remove, or an array of values to remove\r\n*/\r\nexports.removeArrayEntries = function(array,value) {\r\n\tvar t,p;\r\n\tif($tw.utils.isArray(value)) {\r\n\t\tfor(t=0; t<value.length; t++) {\r\n\t\t\tp = array.indexOf(value[t]);\r\n\t\t\tif(p !== -1) {\r\n\t\t\t\tarray.splice(p,1);\r\n\t\t\t}\r\n\t\t}\r\n\t} else {\r\n\t\tp = array.indexOf(value);\r\n\t\tif(p !== -1) {\r\n\t\t\tarray.splice(p,1);\r\n\t\t}\r\n\t}\r\n};\r\n\r\n/*\r\nCheck whether any members of a hashmap are present in another hashmap\r\n*/\r\nexports.checkDependencies = function(dependencies,changes) {\r\n\tvar hit = false;\r\n\t$tw.utils.each(changes,function(change,title) {\r\n\t\tif($tw.utils.hop(dependencies,title)) {\r\n\t\t\thit = true;\r\n\t\t}\r\n\t});\r\n\treturn hit;\r\n};\r\n\r\nexports.extend = function(object /* [, src] */) {\r\n\t$tw.utils.each(Array.prototype.slice.call(arguments, 1), function(source) {\r\n\t\tif(source) {\r\n\t\t\tfor(var property in source) {\r\n\t\t\t\tobject[property] = source[property];\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\treturn object;\r\n};\r\n\r\nexports.deepCopy = function(object) {\r\n\tvar result,t;\r\n\tif($tw.utils.isArray(object)) {\r\n\t\t// Copy arrays\r\n\t\tresult = object.slice(0);\r\n\t} else if(typeof object === \"object\") {\r\n\t\tresult = {};\r\n\t\tfor(t in object) {\r\n\t\t\tif(object[t] !== undefined) {\r\n\t\t\t\tresult[t] = $tw.utils.deepCopy(object[t]);\r\n\t\t\t}\r\n\t\t}\r\n\t} else {\r\n\t\tresult = object;\r\n\t}\r\n\treturn result;\r\n};\r\n\r\nexports.extendDeepCopy = function(object,extendedProperties) {\r\n\tvar result = $tw.utils.deepCopy(object),t;\r\n\tfor(t in extendedProperties) {\r\n\t\tif(extendedProperties[t] !== undefined) {\r\n\t\t\tresult[t] = $tw.utils.deepCopy(extendedProperties[t]);\r\n\t\t}\r\n\t}\r\n\treturn result;\r\n};\r\n\r\nexports.slowInSlowOut = function(t) {\r\n\treturn (1 - ((Math.cos(t * Math.PI) + 1) / 2));\r\n};\r\n\r\nexports.formatDateString = function(date,template) {\r\n\tvar result = \"\",\r\n\t\tt = template,\r\n\t\tmatches = [\r\n\t\t\t[/^0hh12/, function() {\r\n\t\t\t\treturn $tw.utils.pad($tw.utils.getHours12(date));\r\n\t\t\t}],\r\n\t\t\t[/^wYYYY/, function() {\r\n\t\t\t\treturn $tw.utils.getYearForWeekNo(date);\r\n\t\t\t}],\r\n\t\t\t[/^hh12/, function() {\r\n\t\t\t\treturn $tw.utils.getHours12(date);\r\n\t\t\t}],\r\n\t\t\t[/^DDth/, function() {\r\n\t\t\t\treturn date.getDate() + $tw.utils.getDaySuffix(date);\r\n\t\t\t}],\r\n\t\t\t[/^YYYY/, function() {\r\n\t\t\t\treturn date.getFullYear();\r\n\t\t\t}],\r\n\t\t\t[/^0hh/, function() {\r\n\t\t\t\treturn $tw.utils.pad(date.getHours());\r\n\t\t\t}],\r\n\t\t\t[/^0mm/, function() {\r\n\t\t\t\treturn $tw.utils.pad(date.getMinutes());\r\n\t\t\t}],\r\n\t\t\t[/^0ss/, function() {\r\n\t\t\t\treturn $tw.utils.pad(date.getSeconds());\r\n\t\t\t}],\r\n\t\t\t[/^0DD/, function() {\r\n\t\t\t\treturn $tw.utils.pad(date.getDate());\r\n\t\t\t}],\r\n\t\t\t[/^0MM/, function() {\r\n\t\t\t\treturn $tw.utils.pad(date.getMonth()+1);\r\n\t\t\t}],\r\n\t\t\t[/^0WW/, function() {\r\n\t\t\t\treturn $tw.utils.pad($tw.utils.getWeek(date));\r\n\t\t\t}],\r\n\t\t\t[/^ddd/, function() {\r\n\t\t\t\treturn $tw.language.getString(\"Date/Short/Day/\" + date.getDay());\r\n\t\t\t}],\r\n\t\t\t[/^mmm/, function() {\r\n\t\t\t\treturn $tw.language.getString(\"Date/Short/Month/\" + (date.getMonth() + 1));\r\n\t\t\t}],\r\n\t\t\t[/^DDD/, function() {\r\n\t\t\t\treturn $tw.language.getString(\"Date/Long/Day/\" + date.getDay());\r\n\t\t\t}],\r\n\t\t\t[/^MMM/, function() {\r\n\t\t\t\treturn $tw.language.getString(\"Date/Long/Month/\" + (date.getMonth() + 1));\r\n\t\t\t}],\r\n\t\t\t[/^TZD/, function() {\r\n\t\t\t\tvar tz = date.getTimezoneOffset(),\r\n\t\t\t\tatz = Math.abs(tz);\r\n\t\t\t\treturn (tz < 0 ? '+' : '-') + $tw.utils.pad(Math.floor(atz / 60)) + ':' + $tw.utils.pad(atz % 60);\r\n\t\t\t}],\r\n\t\t\t[/^wYY/, function() {\r\n\t\t\t\treturn $tw.utils.pad($tw.utils.getYearForWeekNo(date) - 2000);\r\n\t\t\t}],\r\n\t\t\t[/^[ap]m/, function() {\r\n\t\t\t\treturn $tw.utils.getAmPm(date).toLowerCase();\r\n\t\t\t}],\r\n\t\t\t[/^hh/, function() {\r\n\t\t\t\treturn date.getHours();\r\n\t\t\t}],\r\n\t\t\t[/^mm/, function() {\r\n\t\t\t\treturn date.getMinutes();\r\n\t\t\t}],\r\n\t\t\t[/^ss/, function() {\r\n\t\t\t\treturn date.getSeconds();\r\n\t\t\t}],\r\n\t\t\t[/^[AP]M/, function() {\r\n\t\t\t\treturn $tw.utils.getAmPm(date).toUpperCase();\r\n\t\t\t}],\r\n\t\t\t[/^DD/, function() {\r\n\t\t\t\treturn date.getDate();\r\n\t\t\t}],\r\n\t\t\t[/^MM/, function() {\r\n\t\t\t\treturn date.getMonth() + 1;\r\n\t\t\t}],\r\n\t\t\t[/^WW/, function() {\r\n\t\t\t\treturn $tw.utils.getWeek(date);\r\n\t\t\t}],\r\n\t\t\t[/^YY/, function() {\r\n\t\t\t\treturn $tw.utils.pad(date.getFullYear() - 2000);\r\n\t\t\t}]\r\n\t\t];\r\n\twhile(t.length){\r\n\t\tvar matchString = \"\";\r\n\t\t$tw.utils.each(matches, function(m) {\r\n\t\t\tvar match = m[0].exec(t);\r\n\t\t\tif(match) {\r\n\t\t\t\tmatchString = m[1].call();\r\n\t\t\t\tt = t.substr(match[0].length);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t});\r\n\t\tif(matchString) {\r\n\t\t\tresult += matchString;\r\n\t\t} else {\r\n\t\t\tresult += t.charAt(0);\r\n\t\t\tt = t.substr(1);\r\n\t\t}\r\n\t}\r\n\tresult = result.replace(/\\\\(.)/g,\"$1\");\r\n\treturn result;\r\n};\r\n\r\nexports.getAmPm = function(date) {\r\n\treturn $tw.language.getString(\"Date/Period/\" + (date.getHours() >= 12 ? \"pm\" : \"am\"));\r\n};\r\n\r\nexports.getDaySuffix = function(date) {\r\n\treturn $tw.language.getString(\"Date/DaySuffix/\" + date.getDate());\r\n};\r\n\r\nexports.getWeek = function(date) {\r\n\tvar dt = new Date(date.getTime());\r\n\tvar d = dt.getDay();\r\n\tif(d === 0) {\r\n\t\td = 7; // JavaScript Sun=0, ISO Sun=7\r\n\t}\r\n\tdt.setTime(dt.getTime() + (4 - d) * 86400000);// shift day to Thurs of same week to calculate weekNo\r\n\tvar n = Math.floor((dt.getTime()-new Date(dt.getFullYear(),0,1) + 3600000) / 86400000);\r\n\treturn Math.floor(n / 7) + 1;\r\n};\r\n\r\nexports.getYearForWeekNo = function(date) {\r\n\tvar dt = new Date(date.getTime());\r\n\tvar d = dt.getDay();\r\n\tif(d === 0) {\r\n\t\td = 7; // JavaScript Sun=0, ISO Sun=7\r\n\t}\r\n\tdt.setTime(dt.getTime() + (4 - d) * 86400000);// shift day to Thurs of same week\r\n\treturn dt.getFullYear();\r\n};\r\n\r\nexports.getHours12 = function(date) {\r\n\tvar h = date.getHours();\r\n\treturn h > 12 ? h-12 : ( h > 0 ? h : 12 );\r\n};\r\n\r\n/*\r\nConvert a date delta in milliseconds into a string representation of \"23 seconds ago\", \"27 minutes ago\" etc.\r\n\tdelta: delta in milliseconds\r\nReturns an object with these members:\r\n\tdescription: string describing the delta period\r\n\tupdatePeriod: time in millisecond until the string will be inaccurate\r\n*/\r\nexports.getRelativeDate = function(delta) {\r\n\tvar futurep = false;\r\n\tif(delta < 0) {\r\n\t\tdelta = -1 * delta;\r\n\t\tfuturep = true;\r\n\t}\r\n\tvar units = [\r\n\t\t{name: \"Years\", duration: 365 * 24 * 60 * 60 * 1000},\r\n\t\t{name: \"Months\", duration: (365/12) * 24 * 60 * 60 * 1000},\r\n\t\t{name: \"Days\", duration: 24 * 60 * 60 * 1000},\r\n\t\t{name: \"Hours\", duration: 60 * 60 * 1000},\r\n\t\t{name: \"Minutes\", duration: 60 * 1000},\r\n\t\t{name: \"Seconds\", duration: 1000}\r\n\t];\r\n\tfor(var t=0; t<units.length; t++) {\r\n\t\tvar result = Math.floor(delta / units[t].duration);\r\n\t\tif(result >= 2) {\r\n\t\t\treturn {\r\n\t\t\t\tdelta: delta,\r\n\t\t\t\tdescription: $tw.language.getString(\r\n\t\t\t\t\t\"RelativeDate/\" + (futurep ? \"Future\" : \"Past\") + \"/\" + units[t].name,\r\n\t\t\t\t\t{variables:\r\n\t\t\t\t\t\t{period: result.toString()}\r\n\t\t\t\t\t}\r\n\t\t\t\t),\r\n\t\t\t\tupdatePeriod: units[t].duration\r\n\t\t\t};\r\n\t\t}\r\n\t}\r\n\treturn {\r\n\t\tdelta: delta,\r\n\t\tdescription: $tw.language.getString(\r\n\t\t\t\"RelativeDate/\" + (futurep ? \"Future\" : \"Past\") + \"/Second\",\r\n\t\t\t{variables:\r\n\t\t\t\t{period: \"1\"}\r\n\t\t\t}\r\n\t\t),\r\n\t\tupdatePeriod: 1000\r\n\t};\r\n};\r\n\r\n// Convert & to \"&\", < to \"<\", > to \">\" and \" to \""\"\r\nexports.htmlEncode = function(s) {\r\n\tif(s) {\r\n\t\treturn s.toString().replace(/&/mg,\"&\").replace(/</mg,\"<\").replace(/>/mg,\">\").replace(/\\\"/mg,\""\");\r\n\t} else {\r\n\t\treturn \"\";\r\n\t}\r\n};\r\n\r\n// Converts all HTML entities to their character equivalents\r\nexports.entityDecode = function(s) {\r\n\tvar e = s.substr(1,s.length-2); // Strip the & and the ;\r\n\tif(e.charAt(0) === \"#\") {\r\n\t\tif(e.charAt(1) === \"x\" || e.charAt(1) === \"X\") {\r\n\t\t\treturn String.fromCharCode(parseInt(e.substr(2),16));\t\r\n\t\t} else {\r\n\t\t\treturn String.fromCharCode(parseInt(e.substr(1),10));\r\n\t\t}\r\n\t} else {\r\n\t\tvar c = $tw.config.htmlEntities[e];\r\n\t\tif(c) {\r\n\t\t\treturn String.fromCharCode(c);\r\n\t\t} else {\r\n\t\t\treturn s; // Couldn't convert it as an entity, just return it raw\r\n\t\t}\r\n\t}\r\n};\r\n\r\nexports.unescapeLineBreaks = function(s) {\r\n\treturn s.replace(/\\\\n/mg,\"\\n\").replace(/\\\\b/mg,\" \").replace(/\\\\s/mg,\"\\\\\").replace(/\\r/mg,\"\");\r\n};\r\n\r\n/*\r\n * Returns an escape sequence for given character. Uses \\x for characters <=\r\n * 0xFF to save space, \\u for the rest.\r\n *\r\n * The code needs to be in sync with th code template in the compilation\r\n * function for \"action\" nodes.\r\n */\r\n// Copied from peg.js, thanks to David Majda\r\nexports.escape = function(ch) {\r\n\tvar charCode = ch.charCodeAt(0);\r\n\tif(charCode <= 0xFF) {\r\n\t\treturn '\\\\x' + $tw.utils.pad(charCode.toString(16).toUpperCase());\r\n\t} else {\r\n\t\treturn '\\\\u' + $tw.utils.pad(charCode.toString(16).toUpperCase(),4);\r\n\t}\r\n};\r\n\r\n// Turns a string into a legal JavaScript string\r\n// Copied from peg.js, thanks to David Majda\r\nexports.stringify = function(s) {\r\n\t/*\r\n\t* ECMA-262, 5th ed., 7.8.4: All characters may appear literally in a string\r\n\t* literal except for the closing quote character, backslash, carriage return,\r\n\t* line separator, paragraph separator, and line feed. Any character may\r\n\t* appear in the form of an escape sequence.\r\n\t*\r\n\t* For portability, we also escape escape all non-ASCII characters.\r\n\t*/\r\n\treturn s\r\n\t\t.replace(/\\\\/g, '\\\\\\\\') // backslash\r\n\t\t.replace(/\"/g, '\\\\\"') // double quote character\r\n\t\t.replace(/'/g, \"\\\\'\") // single quote character\r\n\t\t.replace(/\\r/g, '\\\\r') // carriage return\r\n\t\t.replace(/\\n/g, '\\\\n') // line feed\r\n\t\t.replace(/[\\x80-\\uFFFF]/g, exports.escape); // non-ASCII characters\r\n};\r\n\r\n/*\r\nEscape the RegExp special characters with a preceding backslash\r\n*/\r\nexports.escapeRegExp = function(s) {\r\n return s.replace(/[\\-\\/\\\\\\^\\$\\*\\+\\?\\.\\(\\)\\|\\[\\]\\{\\}]/g, '\\\\$&');\r\n};\r\n\r\n// Checks whether a link target is external, i.e. not a tiddler title\r\nexports.isLinkExternal = function(to) {\r\n\tvar externalRegExp = /(?:file|http|https|mailto|ftp|irc|news|data|skype):[^\\s<>{}\\[\\]`|'\"\\\\^~]+(?:\\/|\\b)/i;\r\n\treturn externalRegExp.test(to);\r\n};\r\n\r\nexports.nextTick = function(fn) {\r\n/*global window: false */\r\n\tif(typeof process === \"undefined\") {\r\n\t\t// Apparently it would be faster to use postMessage - http://dbaron.org/log/20100309-faster-timeouts\r\n\t\twindow.setTimeout(fn,4);\r\n\t} else {\r\n\t\tprocess.nextTick(fn);\r\n\t}\r\n};\r\n\r\n/*\r\nConvert a hyphenated CSS property name into a camel case one\r\n*/\r\nexports.unHyphenateCss = function(propName) {\r\n\treturn propName.replace(/-([a-z])/gi, function(match0,match1) {\r\n\t\treturn match1.toUpperCase();\r\n\t});\r\n};\r\n\r\n/*\r\nConvert a camelcase CSS property name into a dashed one (\"backgroundColor\" --> \"background-color\")\r\n*/\r\nexports.hyphenateCss = function(propName) {\r\n\treturn propName.replace(/([A-Z])/g, function(match0,match1) {\r\n\t\treturn \"-\" + match1.toLowerCase();\r\n\t});\r\n};\r\n\r\n/*\r\nParse a text reference of one of these forms:\r\n* title\r\n* !!field\r\n* title!!field\r\n* title##index\r\n* etc\r\nReturns an object with the following fields, all optional:\r\n* title: tiddler title\r\n* field: tiddler field name\r\n* index: JSON property index\r\n*/\r\nexports.parseTextReference = function(textRef) {\r\n\t// Separate out the title, field name and/or JSON indices\r\n\tvar reTextRef = /(?:(.*?)!!(.+))|(?:(.*?)##(.+))|(.*)/mg,\r\n\t\tmatch = reTextRef.exec(textRef),\r\n\t\tresult = {};\r\n\tif(match && reTextRef.lastIndex === textRef.length) {\r\n\t\t// Return the parts\r\n\t\tif(match[1]) {\r\n\t\t\tresult.title = match[1];\r\n\t\t}\r\n\t\tif(match[2]) {\r\n\t\t\tresult.field = match[2];\r\n\t\t}\r\n\t\tif(match[3]) {\r\n\t\t\tresult.title = match[3];\r\n\t\t}\r\n\t\tif(match[4]) {\r\n\t\t\tresult.index = match[4];\r\n\t\t}\r\n\t\tif(match[5]) {\r\n\t\t\tresult.title = match[5];\r\n\t\t}\r\n\t} else {\r\n\t\t// If we couldn't parse it\r\n\t\tresult.title = textRef\r\n\t}\r\n\treturn result;\r\n};\r\n\r\n/*\r\nChecks whether a string is a valid fieldname\r\n*/\r\nexports.isValidFieldName = function(name) {\r\n\tif(!name || typeof name !== \"string\") {\r\n\t\treturn false;\r\n\t}\r\n\tname = name.toLowerCase().trim();\r\n\tvar fieldValidatorRegEx = /^[a-z0-9\\-\\._]+$/mg;\r\n\treturn fieldValidatorRegEx.test(name);\r\n};\r\n\r\n/*\r\nExtract the version number from the meta tag or from the boot file\r\n*/\r\n\r\n// Browser version\r\nexports.extractVersionInfo = function() {\r\n\tif($tw.packageInfo) {\r\n\t\treturn $tw.packageInfo.version;\r\n\t} else {\r\n\t\tvar metatags = document.getElementsByTagName(\"meta\");\r\n\t\tfor(var t=0; t<metatags.length; t++) {\r\n\t\t\tvar m = metatags[t];\r\n\t\t\tif(m.name === \"tiddlywiki-version\") {\r\n\t\t\t\treturn m.content;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn null;\r\n};\r\n\r\n/*\r\nGet the animation duration in ms\r\n*/\r\nexports.getAnimationDuration = function() {\r\n\treturn parseInt($tw.wiki.getTiddlerText(\"$:/config/AnimationDuration\",\"400\"),10);\r\n};\r\n\r\n/*\r\nHash a string to a number\r\nDerived from http://stackoverflow.com/a/15710692\r\n*/\r\nexports.hashString = function(str) {\r\n\treturn str.split(\"\").reduce(function(a,b) {\r\n\t\ta = ((a << 5) - a) + b.charCodeAt(0);\r\n\t\treturn a & a;\r\n\t},0);\r\n};\r\n\r\n/*\r\nDecode a base64 string\r\n*/\r\nexports.base64Decode = function(string64) {\r\n\tif($tw.browser) {\r\n\t\t// TODO\r\n\t\tthrow \"$tw.utils.base64Decode() doesn't work in the browser\";\r\n\t} else {\r\n\t\treturn (new Buffer(string64,\"base64\")).toString();\r\n\t}\r\n};\r\n\r\n/*\r\nConvert a hashmap into a tiddler dictionary format sequence of name:value pairs\r\n*/\r\nexports.makeTiddlerDictionary = function(data) {\r\n\tvar output = [];\r\n\tfor(var name in data) {\r\n\t\toutput.push(name + \": \" + data[name]);\r\n\t}\r\n\treturn output.join(\"\\n\");\r\n};\r\n\r\n/*\r\nHigh resolution microsecond timer for profiling\r\n*/\r\nexports.timer = function(base) {\r\n\tvar m;\r\n\tif($tw.node) {\r\n\t\tvar r = process.hrtime();\t\t\r\n\t\tm = r[0] * 1e3 + (r[1] / 1e6);\r\n\t} else if(window.performance) {\r\n\t\tm = performance.now();\r\n\t} else {\r\n\t\tm = Date.now();\r\n\t}\r\n\tif(typeof base !== \"undefined\") {\r\n\t\tm = m - base;\r\n\t}\r\n\treturn m;\r\n};\r\n\r\n})();",
"title": "$:/core/modules/utils/utils.js",
"type": "application/javascript",
"module-type": "utils"
},
"$:/core/modules/widgets/action-deletefield.js": {
"text": "/*\\\r\ntitle: $:/core/modules/widgets/action-deletefield.js\r\ntype: application/javascript\r\nmodule-type: widget\r\n\r\nAction widget to delete fields of a tiddler.\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\r\n\r\nvar DeleteFieldWidget = function(parseTreeNode,options) {\r\n\tthis.initialise(parseTreeNode,options);\r\n};\r\n\r\n/*\r\nInherit from the base widget class\r\n*/\r\nDeleteFieldWidget.prototype = new Widget();\r\n\r\n/*\r\nRender this widget into the DOM\r\n*/\r\nDeleteFieldWidget.prototype.render = function(parent,nextSibling) {\r\n\tthis.computeAttributes();\r\n\tthis.execute();\r\n};\r\n\r\n/*\r\nCompute the internal state of the widget\r\n*/\r\nDeleteFieldWidget.prototype.execute = function() {\r\n\tthis.actionTiddler = this.getAttribute(\"$tiddler\",this.getVariable(\"currentTiddler\"));\r\n\tthis.actionField = this.getAttribute(\"$field\");\r\n};\r\n\r\n/*\r\nRefresh the widget by ensuring our attributes are up to date\r\n*/\r\nDeleteFieldWidget.prototype.refresh = function(changedTiddlers) {\r\n\tvar changedAttributes = this.computeAttributes();\r\n\tif(changedAttributes[\"$tiddler\"]) {\r\n\t\tthis.refreshSelf();\r\n\t\treturn true;\r\n\t}\r\n\treturn this.refreshChildren(changedTiddlers);\r\n};\r\n\r\n/*\r\nInvoke the action associated with this widget\r\n*/\r\nDeleteFieldWidget.prototype.invokeAction = function(triggeringWidget,event) {\r\n\tvar self = this,\r\n\t\ttiddler = this.wiki.getTiddler(self.actionTiddler),\r\n\t\tremoveFields = {};\r\n\tif(this.actionField) {\r\n\t\tremoveFields[this.actionField] = undefined;\r\n\t}\r\n\tif(tiddler) {\r\n\t\t$tw.utils.each(this.attributes,function(attribute,name) {\r\n\t\t\tif(name.charAt(0) !== \"$\" && name !== \"title\") {\r\n\t\t\t\tremoveFields[name] = undefined;\r\n\t\t\t}\r\n\t\t});\r\n\t\tthis.wiki.addTiddler(new $tw.Tiddler(tiddler,removeFields));\r\n\t}\r\n\treturn true; // Action was invoked\r\n};\r\n\r\nexports[\"action-deletefield\"] = DeleteFieldWidget;\r\n\r\n})();\r\n",
"title": "$:/core/modules/widgets/action-deletefield.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/action-deletetiddler.js": {
"text": "/*\\\r\ntitle: $:/core/modules/widgets/action-deletetiddler.js\r\ntype: application/javascript\r\nmodule-type: widget\r\n\r\nAction widget to delete a tiddler.\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\r\n\r\nvar DeleteTiddlerWidget = function(parseTreeNode,options) {\r\n\tthis.initialise(parseTreeNode,options);\r\n};\r\n\r\n/*\r\nInherit from the base widget class\r\n*/\r\nDeleteTiddlerWidget.prototype = new Widget();\r\n\r\n/*\r\nRender this widget into the DOM\r\n*/\r\nDeleteTiddlerWidget.prototype.render = function(parent,nextSibling) {\r\n\tthis.computeAttributes();\r\n\tthis.execute();\r\n};\r\n\r\n/*\r\nCompute the internal state of the widget\r\n*/\r\nDeleteTiddlerWidget.prototype.execute = function() {\r\n\tthis.actionFilter = this.getAttribute(\"$filter\");\r\n\tthis.actionTiddler = this.getAttribute(\"$tiddler\");\r\n};\r\n\r\n/*\r\nRefresh the widget by ensuring our attributes are up to date\r\n*/\r\nDeleteTiddlerWidget.prototype.refresh = function(changedTiddlers) {\r\n\tvar changedAttributes = this.computeAttributes();\r\n\tif(changedAttributes[\"$filter\"] || changedAttributes[\"$tiddler\"]) {\r\n\t\tthis.refreshSelf();\r\n\t\treturn true;\r\n\t}\r\n\treturn this.refreshChildren(changedTiddlers);\r\n};\r\n\r\n/*\r\nInvoke the action associated with this widget\r\n*/\r\nDeleteTiddlerWidget.prototype.invokeAction = function(triggeringWidget,event) {\r\n\tvar tiddlers = [];\r\n\tif(this.actionFilter) {\r\n\t\ttiddlers = this.wiki.filterTiddlers(this.actionFilter,this);\r\n\t}\r\n\tif(this.actionTiddler) {\r\n\t\ttiddlers.push(this.actionTiddler);\r\n\t}\r\n\tfor(var t=0; t<tiddlers.length; t++) {\r\n\t\tthis.wiki.deleteTiddler(tiddlers[t]);\r\n\t}\r\n\treturn true; // Action was invoked\r\n};\r\n\r\nexports[\"action-deletetiddler\"] = DeleteTiddlerWidget;\r\n\r\n})();\r\n",
"title": "$:/core/modules/widgets/action-deletetiddler.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/action-navigate.js": {
"text": "/*\\\r\ntitle: $:/core/modules/widgets/action-navigate.js\r\ntype: application/javascript\r\nmodule-type: widget\r\n\r\nAction widget to navigate to a tiddler\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\r\n\r\nvar NavigateWidget = function(parseTreeNode,options) {\r\n\tthis.initialise(parseTreeNode,options);\r\n};\r\n\r\n/*\r\nInherit from the base widget class\r\n*/\r\nNavigateWidget.prototype = new Widget();\r\n\r\n/*\r\nRender this widget into the DOM\r\n*/\r\nNavigateWidget.prototype.render = function(parent,nextSibling) {\r\n\tthis.computeAttributes();\r\n\tthis.execute();\r\n};\r\n\r\n/*\r\nCompute the internal state of the widget\r\n*/\r\nNavigateWidget.prototype.execute = function() {\r\n\tthis.actionTo = this.getAttribute(\"$to\");\r\n\tthis.actionScroll = this.getAttribute(\"$scroll\");\r\n};\r\n\r\n/*\r\nRefresh the widget by ensuring our attributes are up to date\r\n*/\r\nNavigateWidget.prototype.refresh = function(changedTiddlers) {\r\n\tvar changedAttributes = this.computeAttributes();\r\n\tif(changedAttributes[\"$to\"] || changedAttributes[\"$scroll\"]) {\r\n\t\tthis.refreshSelf();\r\n\t\treturn true;\r\n\t}\r\n\treturn this.refreshChildren(changedTiddlers);\r\n};\r\n\r\n/*\r\nInvoke the action associated with this widget\r\n*/\r\nNavigateWidget.prototype.invokeAction = function(triggeringWidget,event) {\r\n\tvar bounds = triggeringWidget && triggeringWidget.getBoundingClientRect && triggeringWidget.getBoundingClientRect(),\r\n\t\tsuppressNavigation = event.metaKey || event.ctrlKey || (event.button === 1);\r\n\tif(this.actionScroll === \"yes\") {\r\n\t\tsuppressNavigation = false;\r\n\t} else if(this.actionScroll === \"no\") {\r\n\t\tsuppressNavigation = true;\r\n\t}\r\n\tthis.dispatchEvent({\r\n\t\ttype: \"tm-navigate\",\r\n\t\tnavigateTo: this.actionTo === undefined ? this.getVariable(\"currentTiddler\") : this.actionTo,\r\n\t\tnavigateFromTitle: this.getVariable(\"storyTiddler\"),\r\n\t\tnavigateFromNode: triggeringWidget,\r\n\t\tnavigateFromClientRect: bounds && { top: bounds.top, left: bounds.left, width: bounds.width, right: bounds.right, bottom: bounds.bottom, height: bounds.height\r\n\t\t},\r\n\t\tnavigateSuppressNavigation: suppressNavigation\r\n\t});\r\n\treturn true; // Action was invoked\r\n};\r\n\r\nexports[\"action-navigate\"] = NavigateWidget;\r\n\r\n})();\r\n",
"title": "$:/core/modules/widgets/action-navigate.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/action-sendmessage.js": {
"text": "/*\\\r\ntitle: $:/core/modules/widgets/action-sendmessage.js\r\ntype: application/javascript\r\nmodule-type: widget\r\n\r\nAction widget to send a message\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\r\n\r\nvar SendMessageWidget = function(parseTreeNode,options) {\r\n\tthis.initialise(parseTreeNode,options);\r\n};\r\n\r\n/*\r\nInherit from the base widget class\r\n*/\r\nSendMessageWidget.prototype = new Widget();\r\n\r\n/*\r\nRender this widget into the DOM\r\n*/\r\nSendMessageWidget.prototype.render = function(parent,nextSibling) {\r\n\tthis.computeAttributes();\r\n\tthis.execute();\r\n};\r\n\r\n/*\r\nCompute the internal state of the widget\r\n*/\r\nSendMessageWidget.prototype.execute = function() {\r\n\tthis.actionMessage = this.getAttribute(\"$message\");\r\n\tthis.actionParam = this.getAttribute(\"$param\");\r\n};\r\n\r\n/*\r\nRefresh the widget by ensuring our attributes are up to date\r\n*/\r\nSendMessageWidget.prototype.refresh = function(changedTiddlers) {\r\n\tvar changedAttributes = this.computeAttributes();\r\n\tif(changedAttributes[\"$message\"] || changedAttributes[\"$param\"]) {\r\n\t\tthis.refreshSelf();\r\n\t\treturn true;\r\n\t}\r\n\treturn this.refreshChildren(changedTiddlers);\r\n};\r\n\r\n/*\r\nInvoke the action associated with this widget\r\n*/\r\nSendMessageWidget.prototype.invokeAction = function(triggeringWidget,event) {\r\n\t// Get the string parameter\r\n\tvar param = this.actionParam;\r\n\t// Assemble the attributes as a hashmap\r\n\tvar paramObject = Object.create(null);\r\n\tvar count = 0;\r\n\t$tw.utils.each(this.attributes,function(attribute,name) {\r\n\t\tif(name.charAt(0) !== \"$\") {\r\n\t\t\tparamObject[name] = attribute;\r\n\t\t\tcount++;\r\n\t\t}\r\n\t});\r\n\t// Dispatch the message\r\n\tthis.dispatchEvent({type: this.actionMessage, param: param, paramObject: paramObject, tiddlerTitle: this.getVariable(\"currentTiddler\")});\r\n\treturn true; // Action was invoked\r\n};\r\n\r\nexports[\"action-sendmessage\"] = SendMessageWidget;\r\n\r\n})();\r\n",
"title": "$:/core/modules/widgets/action-sendmessage.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/action-setfield.js": {
"text": "/*\\\r\ntitle: $:/core/modules/widgets/action-setfield.js\r\ntype: application/javascript\r\nmodule-type: widget\r\n\r\nAction widget to set a single field or index on a tiddler.\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\r\n\r\nvar SetFieldWidget = function(parseTreeNode,options) {\r\n\tthis.initialise(parseTreeNode,options);\r\n};\r\n\r\n/*\r\nInherit from the base widget class\r\n*/\r\nSetFieldWidget.prototype = new Widget();\r\n\r\n/*\r\nRender this widget into the DOM\r\n*/\r\nSetFieldWidget.prototype.render = function(parent,nextSibling) {\r\n\tthis.computeAttributes();\r\n\tthis.execute();\r\n};\r\n\r\n/*\r\nCompute the internal state of the widget\r\n*/\r\nSetFieldWidget.prototype.execute = function() {\r\n\tthis.actionTiddler = this.getAttribute(\"$tiddler\",this.getVariable(\"currentTiddler\"));\r\n\tthis.actionField = this.getAttribute(\"$field\");\r\n\tthis.actionIndex = this.getAttribute(\"$index\");\r\n\tthis.actionValue = this.getAttribute(\"$value\");\r\n};\r\n\r\n/*\r\nRefresh the widget by ensuring our attributes are up to date\r\n*/\r\nSetFieldWidget.prototype.refresh = function(changedTiddlers) {\r\n\tvar changedAttributes = this.computeAttributes();\r\n\tif(changedAttributes[\"$tiddler\"] || changedAttributes[\"$field\"] || changedAttributes[\"$index\"] || changedAttributes[\"$value\"]) {\r\n\t\tthis.refreshSelf();\r\n\t\treturn true;\r\n\t}\r\n\treturn this.refreshChildren(changedTiddlers);\r\n};\r\n\r\n/*\r\nInvoke the action associated with this widget\r\n*/\r\nSetFieldWidget.prototype.invokeAction = function(triggeringWidget,event) {\r\n\tvar self = this;\r\n\tif(typeof this.actionValue === \"string\") {\r\n\t\tthis.wiki.setText(this.actionTiddler,this.actionField,this.actionIndex,this.actionValue);\t\t\r\n\t}\r\n\t$tw.utils.each(this.attributes,function(attribute,name) {\r\n\t\tif(name.charAt(0) !== \"$\") {\r\n\t\t\tself.wiki.setText(self.actionTiddler,name,undefined,attribute);\r\n\t\t}\r\n\t});\r\n\treturn true; // Action was invoked\r\n};\r\n\r\nexports[\"action-setfield\"] = SetFieldWidget;\r\n\r\n})();\r\n",
"title": "$:/core/modules/widgets/action-setfield.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/browse.js": {
"text": "/*\\\r\ntitle: $:/core/modules/widgets/browse.js\r\ntype: application/javascript\r\nmodule-type: widget\r\n\r\nBrowse widget for browsing for files to import\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\r\n\r\nvar BrowseWidget = function(parseTreeNode,options) {\r\n\tthis.initialise(parseTreeNode,options);\r\n};\r\n\r\n/*\r\nInherit from the base widget class\r\n*/\r\nBrowseWidget.prototype = new Widget();\r\n\r\n/*\r\nRender this widget into the DOM\r\n*/\r\nBrowseWidget.prototype.render = function(parent,nextSibling) {\r\n\tvar self = this;\r\n\t// Remember parent\r\n\tthis.parentDomNode = parent;\r\n\t// Compute attributes and execute state\r\n\tthis.computeAttributes();\r\n\tthis.execute();\r\n\t// Create element\r\n\tvar domNode = this.document.createElement(\"input\");\r\n\tdomNode.setAttribute(\"type\",\"file\");\r\n\tif(this.browseMultiple) {\r\n\t\tdomNode.setAttribute(\"multiple\",\"multiple\");\r\n\t}\r\n\tif(this.tooltip) {\r\n\t\tdomNode.setAttribute(\"title\",this.tooltip);\r\n\t}\r\n\tif(this.nwsaveas) {\r\n\t\tdomNode.setAttribute(\"nwsaveas\",this.nwsaveas);\r\n\t}\r\n\t// Add a click event handler\r\n\tdomNode.addEventListener(\"change\",function (event) {\r\n\t\tif(self.message) {\r\n\t\t\tself.dispatchEvent({type: self.message, param: self.param, files: event.target.files});\r\n\t\t} else {\r\n\t\t\tself.wiki.readFiles(event.target.files,function(tiddlerFieldsArray) {\r\n\t\t\t\tself.dispatchEvent({type: \"tm-import-tiddlers\", param: JSON.stringify(tiddlerFieldsArray)});\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn false;\r\n\t},false);\r\n\t// Insert element\r\n\tparent.insertBefore(domNode,nextSibling);\r\n\tthis.renderChildren(domNode,null);\r\n\tthis.domNodes.push(domNode);\r\n};\r\n\r\n/*\r\nCompute the internal state of the widget\r\n*/\r\nBrowseWidget.prototype.execute = function() {\r\n\tthis.browseMultiple = this.getAttribute(\"multiple\");\r\n\tthis.message = this.getAttribute(\"message\");\r\n\tthis.param = this.getAttribute(\"param\");\r\n\tthis.tooltip = this.getAttribute(\"tooltip\");\r\n\tthis.nwsaveas = this.getAttribute(\"nwsaveas\");\r\n};\r\n\r\n/*\r\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\r\n*/\r\nBrowseWidget.prototype.refresh = function(changedTiddlers) {\r\n\treturn false;\r\n};\r\n\r\nexports.browse = BrowseWidget;\r\n\r\n})();\r\n",
"title": "$:/core/modules/widgets/browse.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/button.js": {
"text": "/*\\\r\ntitle: $:/core/modules/widgets/button.js\r\ntype: application/javascript\r\nmodule-type: widget\r\n\r\nButton widget\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\r\n\r\nvar ButtonWidget = function(parseTreeNode,options) {\r\n\tthis.initialise(parseTreeNode,options);\r\n};\r\n\r\n/*\r\nInherit from the base widget class\r\n*/\r\nButtonWidget.prototype = new Widget();\r\n\r\n/*\r\nRender this widget into the DOM\r\n*/\r\nButtonWidget.prototype.render = function(parent,nextSibling) {\r\n\tvar self = this;\r\n\t// Remember parent\r\n\tthis.parentDomNode = parent;\r\n\t// Compute attributes and execute state\r\n\tthis.computeAttributes();\r\n\tthis.execute();\r\n\t// Create element\r\n\tvar domNode = this.document.createElement(\"button\");\r\n\t// Assign classes\r\n\tvar classes = this[\"class\"].split(\" \") || [],\r\n\t\tisPoppedUp = this.popup && this.isPoppedUp();\r\n\tif(this.selectedClass) {\r\n\t\tif(this.set && this.setTo && this.isSelected()) {\r\n\t\t\t$tw.utils.pushTop(classes,this.selectedClass.split(\" \"));\r\n\t\t}\r\n\t\tif(isPoppedUp) {\r\n\t\t\t$tw.utils.pushTop(classes,this.selectedClass.split(\" \"));\r\n\t\t}\r\n\t}\r\n\tif(isPoppedUp) {\r\n\t\t$tw.utils.pushTop(classes,\"tc-popup-handle\");\r\n\t}\r\n\tdomNode.className = classes.join(\" \");\r\n\t// Assign other attributes\r\n\tif(this.style) {\r\n\t\tdomNode.setAttribute(\"style\",this.style);\r\n\t}\r\n\tif(this.tooltip) {\r\n\t\tdomNode.setAttribute(\"title\",this.tooltip);\r\n\t}\r\n\tif(this[\"aria-label\"]) {\r\n\t\tdomNode.setAttribute(\"aria-label\",this[\"aria-label\"]);\r\n\t}\r\n\t// Add a click event handler\r\n\tdomNode.addEventListener(\"click\",function (event) {\r\n\t\tvar handled = false;\r\n\t\tif(self.invokeActions(event)) {\r\n\t\t\thandled = true;\r\n\t\t}\r\n\t\tif(self.to) {\r\n\t\t\tself.navigateTo(event);\r\n\t\t\thandled = true;\r\n\t\t}\r\n\t\tif(self.message) {\r\n\t\t\tself.dispatchMessage(event);\r\n\t\t\thandled = true;\r\n\t\t}\r\n\t\tif(self.popup) {\r\n\t\t\tself.triggerPopup(event);\r\n\t\t\thandled = true;\r\n\t\t}\r\n\t\tif(self.set) {\r\n\t\t\tself.setTiddler();\r\n\t\t\thandled = true;\r\n\t\t}\r\n\t\tif(handled) {\r\n\t\t\tevent.preventDefault();\r\n\t\t\tevent.stopPropagation();\r\n\t\t}\r\n\t\treturn handled;\r\n\t},false);\r\n\t// Insert element\r\n\tparent.insertBefore(domNode,nextSibling);\r\n\tthis.renderChildren(domNode,null);\r\n\tthis.domNodes.push(domNode);\r\n};\r\n\r\nButtonWidget.prototype.getBoundingClientRect = function() {\r\n\treturn this.domNodes[0].getBoundingClientRect();\r\n}\r\n\r\nButtonWidget.prototype.isSelected = function() {\r\n\tvar tiddler = this.wiki.getTiddler(this.set);\r\n\treturn tiddler ? tiddler.fields.text === this.setTo : this.defaultSetValue === this.setTo;\r\n};\r\n\r\nButtonWidget.prototype.isPoppedUp = function() {\r\n\tvar tiddler = this.wiki.getTiddler(this.popup);\r\n\tvar result = tiddler && tiddler.fields.text ? $tw.popup.readPopupState(tiddler.fields.text) : false;\r\n\treturn result;\r\n};\r\n\r\nButtonWidget.prototype.navigateTo = function(event) {\r\n\tvar bounds = this.getBoundingClientRect();\r\n\tthis.dispatchEvent({\r\n\t\ttype: \"tm-navigate\",\r\n\t\tnavigateTo: this.to,\r\n\t\tnavigateFromTitle: this.getVariable(\"storyTiddler\"),\r\n\t\tnavigateFromNode: this,\r\n\t\tnavigateFromClientRect: { top: bounds.top, left: bounds.left, width: bounds.width, right: bounds.right, bottom: bounds.bottom, height: bounds.height\r\n\t\t},\r\n\t\tnavigateSuppressNavigation: event.metaKey || event.ctrlKey || (event.button === 1)\r\n\t});\r\n};\r\n\r\nButtonWidget.prototype.dispatchMessage = function(event) {\r\n\tthis.dispatchEvent({type: this.message, param: this.param, tiddlerTitle: this.getVariable(\"currentTiddler\")});\r\n};\r\n\r\nButtonWidget.prototype.triggerPopup = function(event) {\r\n\t$tw.popup.triggerPopup({\r\n\t\tdomNode: this.domNodes[0],\r\n\t\ttitle: this.popup,\r\n\t\twiki: this.wiki\r\n\t});\r\n};\r\n\r\nButtonWidget.prototype.setTiddler = function() {\r\n\tthis.wiki.setTextReference(this.set,this.setTo,this.getVariable(\"currentTiddler\"));\r\n};\r\n\r\n/*\r\nCompute the internal state of the widget\r\n*/\r\nButtonWidget.prototype.execute = function() {\r\n\t// Get attributes\r\n\tthis.to = this.getAttribute(\"to\");\r\n\tthis.message = this.getAttribute(\"message\");\r\n\tthis.param = this.getAttribute(\"param\");\r\n\tthis.set = this.getAttribute(\"set\");\r\n\tthis.setTo = this.getAttribute(\"setTo\");\r\n\tthis.popup = this.getAttribute(\"popup\");\r\n\tthis.hover = this.getAttribute(\"hover\");\r\n\tthis[\"class\"] = this.getAttribute(\"class\",\"\");\r\n\tthis[\"aria-label\"] = this.getAttribute(\"aria-label\");\r\n\tthis.tooltip = this.getAttribute(\"tooltip\");\r\n\tthis.style = this.getAttribute(\"style\");\r\n\tthis.selectedClass = this.getAttribute(\"selectedClass\");\r\n\tthis.defaultSetValue = this.getAttribute(\"default\");\r\n\t// Make child widgets\r\n\tthis.makeChildWidgets();\r\n};\r\n\r\n/*\r\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\r\n*/\r\nButtonWidget.prototype.refresh = function(changedTiddlers) {\r\n\tvar changedAttributes = this.computeAttributes();\r\n\tif(changedAttributes.to || changedAttributes.message || changedAttributes.param || changedAttributes.set || changedAttributes.setTo || changedAttributes.popup || changedAttributes.hover || changedAttributes[\"class\"] || changedAttributes.selectedClass || changedAttributes.style || (this.set && changedTiddlers[this.set]) || (this.popup && changedTiddlers[this.popup])) {\r\n\t\tthis.refreshSelf();\r\n\t\treturn true;\r\n\t}\r\n\treturn this.refreshChildren(changedTiddlers);\r\n};\r\n\r\nexports.button = ButtonWidget;\r\n\r\n})();\r\n",
"title": "$:/core/modules/widgets/button.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/checkbox.js": {
"text": "/*\\\r\ntitle: $:/core/modules/widgets/checkbox.js\r\ntype: application/javascript\r\nmodule-type: widget\r\n\r\nCheckbox widget\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\r\n\r\nvar CheckboxWidget = function(parseTreeNode,options) {\r\n\tthis.initialise(parseTreeNode,options);\r\n};\r\n\r\n/*\r\nInherit from the base widget class\r\n*/\r\nCheckboxWidget.prototype = new Widget();\r\n\r\n/*\r\nRender this widget into the DOM\r\n*/\r\nCheckboxWidget.prototype.render = function(parent,nextSibling) {\r\n\t// Save the parent dom node\r\n\tthis.parentDomNode = parent;\r\n\t// Compute our attributes\r\n\tthis.computeAttributes();\r\n\t// Execute our logic\r\n\tthis.execute();\r\n\t// Create our elements\r\n\tthis.labelDomNode = this.document.createElement(\"label\");\r\n\tthis.inputDomNode = this.document.createElement(\"input\");\r\n\tthis.inputDomNode.setAttribute(\"type\",\"checkbox\");\r\n\tif(this.getValue()) {\r\n\t\tthis.inputDomNode.setAttribute(\"checked\",\"true\");\r\n\t}\r\n\tthis.labelDomNode.appendChild(this.inputDomNode);\r\n\tthis.spanDomNode = this.document.createElement(\"span\");\r\n\tthis.labelDomNode.appendChild(this.spanDomNode);\r\n\t// Add a click event handler\r\n\t$tw.utils.addEventListeners(this.inputDomNode,[\r\n\t\t{name: \"change\", handlerObject: this, handlerMethod: \"handleChangeEvent\"}\r\n\t]);\r\n\t// Insert the label into the DOM and render any children\r\n\tparent.insertBefore(this.labelDomNode,nextSibling);\r\n\tthis.renderChildren(this.spanDomNode,null);\r\n\tthis.domNodes.push(this.labelDomNode);\r\n};\r\n\r\nCheckboxWidget.prototype.getValue = function() {\r\n\tvar tiddler = this.wiki.getTiddler(this.checkboxTitle);\r\n\tif(tiddler) {\r\n\t\tif(this.checkboxTag) {\r\n\t\t\treturn tiddler.hasTag(this.checkboxTag);\r\n\t\t}\r\n\t\tif(this.checkboxField) {\r\n\t\t\tvar value = tiddler.fields[this.checkboxField] || this.checkboxDefault || \"\";\r\n\t\t\tif(value === this.checkboxChecked) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tif(value === this.checkboxUnchecked) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t} else {\r\n\t\tif(this.checkboxTag) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif(this.checkboxField) {\r\n\t\t\tif(this.checkboxDefault === this.checkboxChecked) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tif(this.checkboxDefault === this.checkboxUnchecked) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn false;\r\n};\r\n\r\nCheckboxWidget.prototype.handleChangeEvent = function(event) {\r\n\tvar checked = this.inputDomNode.checked,\r\n\t\ttiddler = this.wiki.getTiddler(this.checkboxTitle),\r\n\t\tfallbackFields = {text: \"\"},\r\n\t\tnewFields = {title: this.checkboxTitle},\r\n\t\thasChanged = false;\r\n\t// Set the tag if specified\r\n\tif(this.checkboxTag && (!tiddler || tiddler.hasTag(this.checkboxTag) !== checked)) {\r\n\t\tnewFields.tags = tiddler ? (tiddler.fields.tags || []).slice(0) : [];\r\n\t\tvar pos = newFields.tags.indexOf(this.checkboxTag);\r\n\t\tif(pos !== -1) {\r\n\t\t\tnewFields.tags.splice(pos,1);\r\n\t\t}\r\n\t\tif(checked) {\r\n\t\t\tnewFields.tags.push(this.checkboxTag);\r\n\t\t}\r\n\t\thasChanged = true;\r\n\t}\r\n\t// Set the field if specified\r\n\tif(this.checkboxField) {\r\n\t\tvar value = checked ? this.checkboxChecked : this.checkboxUnchecked;\r\n\t\tif(!tiddler || tiddler.fields[this.checkboxField] !== value) {\r\n\t\t\tnewFields[this.checkboxField] = value;\r\n\t\t\thasChanged = true;\r\n\t\t}\r\n\t}\r\n\tif(hasChanged) {\r\n\t\tthis.wiki.addTiddler(new $tw.Tiddler(fallbackFields,tiddler,newFields,this.wiki.getModificationFields()));\r\n\t}\r\n};\r\n\r\n/*\r\nCompute the internal state of the widget\r\n*/\r\nCheckboxWidget.prototype.execute = function() {\r\n\t// Get the parameters from the attributes\r\n\tthis.checkboxTitle = this.getAttribute(\"tiddler\",this.getVariable(\"currentTiddler\"));\r\n\tthis.checkboxTag = this.getAttribute(\"tag\");\r\n\tthis.checkboxField = this.getAttribute(\"field\");\r\n\tthis.checkboxChecked = this.getAttribute(\"checked\");\r\n\tthis.checkboxUnchecked = this.getAttribute(\"unchecked\");\r\n\tthis.checkboxDefault = this.getAttribute(\"default\");\r\n\t// Make the child widgets\r\n\tthis.makeChildWidgets();\r\n};\r\n\r\n/*\r\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\r\n*/\r\nCheckboxWidget.prototype.refresh = function(changedTiddlers) {\r\n\tvar changedAttributes = this.computeAttributes();\r\n\tif(changedAttributes.tiddler || changedAttributes.tag || changedAttributes.field || changedAttributes.checked || changedAttributes.unchecked || changedAttributes[\"default\"] || changedAttributes[\"class\"]) {\r\n\t\tthis.refreshSelf();\r\n\t\treturn true;\r\n\t} else {\r\n\t\tvar refreshed = false;\r\n\t\tif(changedTiddlers[this.checkboxTitle]) {\r\n\t\t\tthis.inputDomNode.checked = this.getValue();\r\n\t\t\trefreshed = true;\r\n\t\t}\r\n\t\treturn this.refreshChildren(changedTiddlers) || refreshed;\r\n\t}\r\n};\r\n\r\nexports.checkbox = CheckboxWidget;\r\n\r\n})();\r\n",
"title": "$:/core/modules/widgets/checkbox.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/codeblock.js": {
"text": "/*\\\r\ntitle: $:/core/modules/widgets/codeblock.js\r\ntype: application/javascript\r\nmodule-type: widget\r\n\r\nCode block node widget\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\r\n\r\nvar CodeBlockWidget = function(parseTreeNode,options) {\r\n\tthis.initialise(parseTreeNode,options);\r\n};\r\n\r\n/*\r\nInherit from the base widget class\r\n*/\r\nCodeBlockWidget.prototype = new Widget();\r\n\r\n/*\r\nRender this widget into the DOM\r\n*/\r\nCodeBlockWidget.prototype.render = function(parent,nextSibling) {\r\n\tthis.parentDomNode = parent;\r\n\tthis.computeAttributes();\r\n\tthis.execute();\r\n\tvar codeNode = this.document.createElement(\"code\"),\r\n\t\tdomNode = this.document.createElement(\"pre\");\r\n\tcodeNode.appendChild(this.document.createTextNode(this.getAttribute(\"code\")));\r\n\tdomNode.appendChild(codeNode);\r\n\tparent.insertBefore(domNode,nextSibling);\r\n\tthis.domNodes.push(domNode);\r\n\tif(this.postRender) {\r\n\t\tthis.postRender();\r\n\t}\r\n};\r\n\r\n/*\r\nCompute the internal state of the widget\r\n*/\r\nCodeBlockWidget.prototype.execute = function() {\r\n\tthis.language = this.getAttribute(\"language\");\r\n};\r\n\r\n/*\r\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\r\n*/\r\nCodeBlockWidget.prototype.refresh = function(changedTiddlers) {\r\n\treturn false;\r\n};\r\n\r\nexports.codeblock = CodeBlockWidget;\r\n\r\n})();\r\n",
"title": "$:/core/modules/widgets/codeblock.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/count.js": {
"text": "/*\\\r\ntitle: $:/core/modules/widgets/count.js\r\ntype: application/javascript\r\nmodule-type: widget\r\n\r\nCount widget\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\r\n\r\nvar CountWidget = function(parseTreeNode,options) {\r\n\tthis.initialise(parseTreeNode,options);\r\n};\r\n\r\n/*\r\nInherit from the base widget class\r\n*/\r\nCountWidget.prototype = new Widget();\r\n\r\n/*\r\nRender this widget into the DOM\r\n*/\r\nCountWidget.prototype.render = function(parent,nextSibling) {\r\n\tthis.parentDomNode = parent;\r\n\tthis.computeAttributes();\r\n\tthis.execute();\r\n\tvar textNode = this.document.createTextNode(this.currentCount);\r\n\tparent.insertBefore(textNode,nextSibling);\r\n\tthis.domNodes.push(textNode);\r\n};\r\n\r\n/*\r\nCompute the internal state of the widget\r\n*/\r\nCountWidget.prototype.execute = function() {\r\n\t// Get parameters from our attributes\r\n\tthis.filter = this.getAttribute(\"filter\");\r\n\t// Execute the filter\r\n\tif(this.filter) {\r\n\t\tthis.currentCount = this.wiki.filterTiddlers(this.filter,this).length;\r\n\t} else {\r\n\t\tthis.currentCount = undefined;\r\n\t}\r\n};\r\n\r\n/*\r\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\r\n*/\r\nCountWidget.prototype.refresh = function(changedTiddlers) {\r\n\t// Re-execute the filter to get the count\r\n\tthis.computeAttributes();\r\n\tvar oldCount = this.currentCount;\r\n\tthis.execute();\r\n\tif(this.currentCount !== oldCount) {\r\n\t\t// Regenerate and rerender the widget and replace the existing DOM node\r\n\t\tthis.refreshSelf();\r\n\t\treturn true;\r\n\t} else {\r\n\t\treturn false;\r\n\t}\r\n\r\n};\r\n\r\nexports.count = CountWidget;\r\n\r\n})();\r\n",
"title": "$:/core/modules/widgets/count.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/dropzone.js": {
"text": "/*\\\r\ntitle: $:/core/modules/widgets/dropzone.js\r\ntype: application/javascript\r\nmodule-type: widget\r\n\r\nDropzone widget\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\r\n\r\nvar DropZoneWidget = function(parseTreeNode,options) {\r\n\tthis.initialise(parseTreeNode,options);\r\n};\r\n\r\n/*\r\nInherit from the base widget class\r\n*/\r\nDropZoneWidget.prototype = new Widget();\r\n\r\n/*\r\nRender this widget into the DOM\r\n*/\r\nDropZoneWidget.prototype.render = function(parent,nextSibling) {\r\n\tvar self = this;\r\n\t// Remember parent\r\n\tthis.parentDomNode = parent;\r\n\t// Compute attributes and execute state\r\n\tthis.computeAttributes();\r\n\tthis.execute();\r\n\t// Create element\r\n\tvar domNode = this.document.createElement(\"div\");\r\n\tdomNode.className = \"tc-dropzone\";\r\n\t// Add event handlers\r\n\t$tw.utils.addEventListeners(domNode,[\r\n\t\t{name: \"dragenter\", handlerObject: this, handlerMethod: \"handleDragEnterEvent\"},\r\n\t\t{name: \"dragover\", handlerObject: this, handlerMethod: \"handleDragOverEvent\"},\r\n\t\t{name: \"dragleave\", handlerObject: this, handlerMethod: \"handleDragLeaveEvent\"},\r\n\t\t{name: \"drop\", handlerObject: this, handlerMethod: \"handleDropEvent\"},\r\n\t\t{name: \"paste\", handlerObject: this, handlerMethod: \"handlePasteEvent\"}\r\n\t]);\r\n\tdomNode.addEventListener(\"click\",function (event) {\r\n\t},false);\r\n\t// Insert element\r\n\tparent.insertBefore(domNode,nextSibling);\r\n\tthis.renderChildren(domNode,null);\r\n\tthis.domNodes.push(domNode);\r\n};\r\n\r\nDropZoneWidget.prototype.enterDrag = function() {\r\n\t// We count enter/leave events\r\n\tthis.dragEnterCount = (this.dragEnterCount || 0) + 1;\r\n\t// If we're entering for the first time we need to apply highlighting\r\n\tif(this.dragEnterCount === 1) {\r\n\t\t$tw.utils.addClass(this.domNodes[0],\"tc-dragover\");\r\n\t}\r\n};\r\n\r\nDropZoneWidget.prototype.leaveDrag = function() {\r\n\t// Reduce the enter count\r\n\tthis.dragEnterCount = (this.dragEnterCount || 0) - 1;\r\n\t// Remove highlighting if we're leaving externally\r\n\tif(this.dragEnterCount <= 0) {\r\n\t\t$tw.utils.removeClass(this.domNodes[0],\"tc-dragover\");\r\n\t}\r\n};\r\n\r\nDropZoneWidget.prototype.handleDragEnterEvent = function(event) {\r\n\tthis.enterDrag();\r\n\t// Tell the browser that we're ready to handle the drop\r\n\tevent.preventDefault();\r\n\t// Tell the browser not to ripple the drag up to any parent drop handlers\r\n\tevent.stopPropagation();\r\n};\r\n\r\nDropZoneWidget.prototype.handleDragOverEvent = function(event) {\r\n\t// Check for being over a TEXTAREA or INPUT\r\n\tif([\"TEXTAREA\",\"INPUT\"].indexOf(event.target.tagName) !== -1) {\r\n\t\treturn false;\r\n\t}\r\n\t// Tell the browser that we're still interested in the drop\r\n\tevent.preventDefault();\r\n\tevent.dataTransfer.dropEffect = \"copy\"; // Explicitly show this is a copy\r\n};\r\n\r\nDropZoneWidget.prototype.handleDragLeaveEvent = function(event) {\r\n\tthis.leaveDrag();\r\n};\r\n\r\nDropZoneWidget.prototype.handleDropEvent = function(event) {\r\n\tthis.leaveDrag();\r\n\t// Check for being over a TEXTAREA or INPUT\r\n\tif([\"TEXTAREA\",\"INPUT\"].indexOf(event.target.tagName) !== -1) {\r\n\t\treturn false;\r\n\t}\r\n\tvar self = this,\r\n\t\tdataTransfer = event.dataTransfer;\r\n\t// Reset the enter count\r\n\tthis.dragEnterCount = 0;\r\n\t// Remove highlighting\r\n\t$tw.utils.removeClass(this.domNodes[0],\"tc-dragover\");\r\n\t// Import any files in the drop\r\n\tvar numFiles = this.wiki.readFiles(dataTransfer.files,function(tiddlerFieldsArray) {\r\n\t\tself.dispatchEvent({type: \"tm-import-tiddlers\", param: JSON.stringify(tiddlerFieldsArray)});\r\n\t});\r\n\t// Try to import the various data types we understand\r\n\tif(numFiles === 0) {\r\n\t\tthis.importData(dataTransfer);\r\n\t}\r\n\t// Tell the browser that we handled the drop\r\n\tevent.preventDefault();\r\n\t// Stop the drop ripple up to any parent handlers\r\n\tevent.stopPropagation();\r\n};\r\n\r\nDropZoneWidget.prototype.importData = function(dataTransfer) {\r\n\t// Try each provided data type in turn\r\n\tfor(var t=0; t<this.importDataTypes.length; t++) {\r\n\t\tif(!$tw.browser.isIE || this.importDataTypes[t].IECompatible) {\r\n\t\t\t// Get the data\r\n\t\t\tvar dataType = this.importDataTypes[t];\r\n\t\t\t\tvar data = dataTransfer.getData(dataType.type);\r\n\t\t\t// Import the tiddlers in the data\r\n\t\t\tif(data !== \"\" && data !== null) {\r\n\t\t\t\tif($tw.log.IMPORT) {\r\n\t\t\t\t\tconsole.log(\"Importing data type '\" + dataType.type + \"', data: '\" + data + \"'\")\r\n\t\t\t\t}\r\n\t\t\t\tvar tiddlerFields = dataType.convertToFields(data);\r\n\t\t\t\tif(!tiddlerFields.title) {\r\n\t\t\t\t\ttiddlerFields.title = this.wiki.generateNewTitle(\"Untitled\");\r\n\t\t\t\t}\r\n\t\t\t\tthis.dispatchEvent({type: \"tm-import-tiddlers\", param: JSON.stringify([tiddlerFields])});\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\n\r\nDropZoneWidget.prototype.importDataTypes = [\r\n\t{type: \"text/vnd.tiddler\", IECompatible: false, convertToFields: function(data) {\r\n\t\treturn JSON.parse(data);\r\n\t}},\r\n\t{type: \"URL\", IECompatible: true, convertToFields: function(data) {\r\n\t\t// Check for tiddler data URI\r\n\t\tvar match = decodeURI(data).match(/^data\\:text\\/vnd\\.tiddler,(.*)/i);\r\n\t\tif(match) {\r\n\t\t\treturn JSON.parse(match[1]);\r\n\t\t} else {\r\n\t\t\treturn { // As URL string\r\n\t\t\t\ttext: data\r\n\t\t\t};\r\n\t\t}\r\n\t}},\r\n\t{type: \"text/x-moz-url\", IECompatible: false, convertToFields: function(data) {\r\n\t\t// Check for tiddler data URI\r\n\t\tvar match = decodeURI(data).match(/^data\\:text\\/vnd\\.tiddler,(.*)/i);\r\n\t\tif(match) {\r\n\t\t\treturn JSON.parse(match[1]);\r\n\t\t} else {\r\n\t\t\treturn { // As URL string\r\n\t\t\t\ttext: data\r\n\t\t\t};\r\n\t\t}\r\n\t}},\r\n\t{type: \"text/html\", IECompatible: false, convertToFields: function(data) {\r\n\t\treturn {\r\n\t\t\ttext: data\r\n\t\t};\r\n\t}},\r\n\t{type: \"text/plain\", IECompatible: false, convertToFields: function(data) {\r\n\t\treturn {\r\n\t\t\ttext: data\r\n\t\t};\r\n\t}},\r\n\t{type: \"Text\", IECompatible: true, convertToFields: function(data) {\r\n\t\treturn {\r\n\t\t\ttext: data\r\n\t\t};\r\n\t}},\r\n\t{type: \"text/uri-list\", IECompatible: false, convertToFields: function(data) {\r\n\t\treturn {\r\n\t\t\ttext: data\r\n\t\t};\r\n\t}}\r\n];\r\n\r\nDropZoneWidget.prototype.handlePasteEvent = function(event) {\r\n\t// Let the browser handle it if we're in a textarea or input box\r\n\tif([\"TEXTAREA\",\"INPUT\"].indexOf(event.target.tagName) == -1) {\r\n\t\tvar self = this,\r\n\t\t\titems = event.clipboardData.items;\r\n\t\t// Enumerate the clipboard items\r\n\t\tfor(var t = 0; t<items.length; t++) {\r\n\t\t\tvar item = items[t];\r\n\t\t\tif(item.kind === \"file\") {\r\n\t\t\t\t// Import any files\r\n\t\t\t\tthis.wiki.readFile(item.getAsFile(),function(tiddlerFieldsArray) {\r\n\t\t\t\t\tself.dispatchEvent({type: \"tm-import-tiddlers\", param: JSON.stringify(tiddlerFieldsArray)});\r\n\t\t\t\t});\r\n\t\t\t} else if(item.kind === \"string\") {\r\n\t\t\t\t// Create tiddlers from string items\r\n\t\t\t\tvar type = item.type;\r\n\t\t\t\titem.getAsString(function(str) {\r\n\t\t\t\t\tvar tiddlerFields = {\r\n\t\t\t\t\t\ttitle: self.wiki.generateNewTitle(\"Untitled\"),\r\n\t\t\t\t\t\ttext: str,\r\n\t\t\t\t\t\ttype: type\r\n\t\t\t\t\t};\r\n\t\t\t\t\tif($tw.log.IMPORT) {\r\n\t\t\t\t\t\tconsole.log(\"Importing string '\" + str + \"', type: '\" + type + \"'\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\tself.dispatchEvent({type: \"tm-import-tiddlers\", param: JSON.stringify([tiddlerFields])});\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Tell the browser that we've handled the paste\r\n\t\tevent.stopPropagation();\r\n\t\tevent.preventDefault();\r\n\t}\r\n};\r\n\r\n/*\r\nCompute the internal state of the widget\r\n*/\r\nDropZoneWidget.prototype.execute = function() {\r\n\t// Make child widgets\r\n\tthis.makeChildWidgets();\r\n};\r\n\r\n/*\r\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\r\n*/\r\nDropZoneWidget.prototype.refresh = function(changedTiddlers) {\r\n\treturn this.refreshChildren(changedTiddlers);\r\n};\r\n\r\nexports.dropzone = DropZoneWidget;\r\n\r\n})();\r\n",
"title": "$:/core/modules/widgets/dropzone.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/edit-binary.js": {
"text": "/*\\\r\ntitle: $:/core/modules/widgets/edit-binary.js\r\ntype: application/javascript\r\nmodule-type: widget\r\n\r\nEdit-binary widget; placeholder for editing binary tiddlers\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar BINARY_WARNING_MESSAGE = \"$:/core/ui/BinaryWarning\";\r\n\r\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\r\n\r\nvar EditBinaryWidget = function(parseTreeNode,options) {\r\n\tthis.initialise(parseTreeNode,options);\r\n};\r\n\r\n/*\r\nInherit from the base widget class\r\n*/\r\nEditBinaryWidget.prototype = new Widget();\r\n\r\n/*\r\nRender this widget into the DOM\r\n*/\r\nEditBinaryWidget.prototype.render = function(parent,nextSibling) {\r\n\tvar self = this;\r\n\t// Save the parent dom node\r\n\tthis.parentDomNode = parent;\r\n\t// Compute our attributes\r\n\tthis.computeAttributes();\r\n\t// Execute our logic\r\n\tthis.execute();\r\n\tthis.renderChildren(parent,nextSibling);\r\n};\r\n\r\n/*\r\nCompute the internal state of the widget\r\n*/\r\nEditBinaryWidget.prototype.execute = function() {\r\n\t// Construct the child widgets\r\n\tthis.makeChildWidgets([{\r\n\t\ttype: \"transclude\",\r\n\t\tattributes: {\r\n\t\t\ttiddler: {type: \"string\", value: BINARY_WARNING_MESSAGE}\r\n\t\t}\r\n\t}]);\r\n};\r\n\r\n/*\r\nRefresh by refreshing our child widget\r\n*/\r\nEditBinaryWidget.prototype.refresh = function(changedTiddlers) {\r\n\treturn this.refreshChildren(changedTiddlers);\r\n};\r\n\r\nexports[\"edit-binary\"] = EditBinaryWidget;\r\n\r\n})();\r\n",
"title": "$:/core/modules/widgets/edit-binary.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/edit-bitmap.js": {
"text": "/*\\\r\ntitle: $:/core/modules/widgets/edit-bitmap.js\r\ntype: application/javascript\r\nmodule-type: widget\r\n\r\nEdit-bitmap widget\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n// Default image sizes\r\nvar DEFAULT_IMAGE_WIDTH = 300,\r\n\tDEFAULT_IMAGE_HEIGHT = 185;\r\n\r\n// Configuration tiddlers\r\nvar LINE_WIDTH_TITLE = \"$:/config/BitmapEditor/LineWidth\",\r\n\tLINE_COLOUR_TITLE = \"$:/config/BitmapEditor/Colour\";\r\n\r\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\r\n\r\nvar EditBitmapWidget = function(parseTreeNode,options) {\r\n\tthis.initialise(parseTreeNode,options);\r\n};\r\n\r\n/*\r\nInherit from the base widget class\r\n*/\r\nEditBitmapWidget.prototype = new Widget();\r\n\r\n/*\r\nRender this widget into the DOM\r\n*/\r\nEditBitmapWidget.prototype.render = function(parent,nextSibling) {\r\n\tvar self = this;\r\n\t// Save the parent dom node\r\n\tthis.parentDomNode = parent;\r\n\t// Compute our attributes\r\n\tthis.computeAttributes();\r\n\t// Execute our logic\r\n\tthis.execute();\r\n\t// Create our element\r\n\tthis.canvasDomNode = $tw.utils.domMaker(\"canvas\",{\r\n\t\tdocument: this.document,\r\n\t\t\"class\":\"tc-edit-bitmapeditor\",\r\n\t\teventListeners: [{\r\n\t\t\tname: \"touchstart\", handlerObject: this, handlerMethod: \"handleTouchStartEvent\"\r\n\t\t},{\r\n\t\t\tname: \"touchmove\", handlerObject: this, handlerMethod: \"handleTouchMoveEvent\"\r\n\t\t},{\r\n\t\t\tname: \"touchend\", handlerObject: this, handlerMethod: \"handleTouchEndEvent\"\r\n\t\t},{\r\n\t\t\tname: \"mousedown\", handlerObject: this, handlerMethod: \"handleMouseDownEvent\"\r\n\t\t},{\r\n\t\t\tname: \"mousemove\", handlerObject: this, handlerMethod: \"handleMouseMoveEvent\"\r\n\t\t},{\r\n\t\t\tname: \"mouseup\", handlerObject: this, handlerMethod: \"handleMouseUpEvent\"\r\n\t\t}]\r\n\t});\r\n\tthis.widthDomNode = $tw.utils.domMaker(\"input\",{\r\n\t\tdocument: this.document,\r\n\t\t\"class\":\"tc-edit-bitmapeditor-width\",\r\n\t\teventListeners: [{\r\n\t\t\tname: \"change\", handlerObject: this, handlerMethod: \"handleWidthChangeEvent\"\r\n\t\t}]\r\n\t});\r\n\tthis.heightDomNode = $tw.utils.domMaker(\"input\",{\r\n\t\tdocument: this.document,\r\n\t\t\"class\":\"tc-edit-bitmapeditor-height\",\r\n\t\teventListeners: [{\r\n\t\t\tname: \"change\", handlerObject: this, handlerMethod: \"handleHeightChangeEvent\"\r\n\t\t}]\r\n\t});\r\n\t// Insert the elements into the DOM\r\n\tparent.insertBefore(this.canvasDomNode,nextSibling);\r\n\tparent.insertBefore(this.widthDomNode,nextSibling);\r\n\tparent.insertBefore(this.heightDomNode,nextSibling);\r\n\tthis.domNodes.push(this.canvasDomNode,this.widthDomNode,this.heightDomNode);\r\n\t// Load the image into the canvas\r\n\tif($tw.browser) {\r\n\t\tthis.loadCanvas();\r\n\t}\r\n};\r\n\r\n/*\r\nCompute the internal state of the widget\r\n*/\r\nEditBitmapWidget.prototype.execute = function() {\r\n\t// Get our parameters\r\n\tthis.editTitle = this.getAttribute(\"tiddler\",this.getVariable(\"currentTiddler\"));\r\n};\r\n\r\n/*\r\nNote that the bitmap editor intentionally doesn't try to refresh itself because it would be confusing to have the image changing spontaneously while editting it\r\n*/\r\nEditBitmapWidget.prototype.refresh = function(changedTiddlers) {\r\n\treturn false;\r\n};\r\n\r\nEditBitmapWidget.prototype.loadCanvas = function() {\r\n\tvar tiddler = this.wiki.getTiddler(this.editTitle),\r\n\t\tcurrImage = new Image();\r\n\t// Set up event handlers for loading the image\r\n\tvar self = this;\r\n\tcurrImage.onload = function() {\r\n\t\t// Copy the image to the on-screen canvas\r\n\t\tself.initCanvas(self.canvasDomNode,currImage.width,currImage.height,currImage);\r\n\t\t// And also copy the current bitmap to the off-screen canvas\r\n\t\tself.currCanvas = self.document.createElement(\"canvas\");\r\n\t\tself.initCanvas(self.currCanvas,currImage.width,currImage.height,currImage);\r\n\t\t// Set the width and height input boxes\r\n\t\tself.updateSize();\r\n\t};\r\n\tcurrImage.onerror = function() {\r\n\t\t// Set the on-screen canvas size and clear it\r\n\t\tself.initCanvas(self.canvasDomNode,DEFAULT_IMAGE_WIDTH,DEFAULT_IMAGE_HEIGHT);\r\n\t\t// Set the off-screen canvas size and clear it\r\n\t\tself.currCanvas = self.document.createElement(\"canvas\");\r\n\t\tself.initCanvas(self.currCanvas,DEFAULT_IMAGE_WIDTH,DEFAULT_IMAGE_HEIGHT);\r\n\t\t// Set the width and height input boxes\r\n\t\tself.updateSize();\r\n\t};\r\n\t// Get the current bitmap into an image object\r\n\tcurrImage.src = \"data:\" + tiddler.fields.type + \";base64,\" + tiddler.fields.text;\r\n};\r\n\r\nEditBitmapWidget.prototype.initCanvas = function(canvas,width,height,image) {\r\n\tcanvas.width = width;\r\n\tcanvas.height = height;\r\n\tvar ctx = canvas.getContext(\"2d\");\r\n\tif(image) {\r\n\t\tctx.drawImage(image,0,0);\r\n\t} else {\r\n\t\tctx.fillStyle = \"#fff\";\r\n\t\tctx.fillRect(0,0,canvas.width,canvas.height);\r\n\t}\r\n};\r\n\r\n/*\r\n** Update the input boxes with the actual size of the canvas\r\n*/\r\nEditBitmapWidget.prototype.updateSize = function() {\r\n\tthis.widthDomNode.value = this.currCanvas.width;\r\n\tthis.heightDomNode.value = this.currCanvas.height;\r\n};\r\n\r\n/*\r\n** Change the size of the canvas, preserving the current image\r\n*/\r\nEditBitmapWidget.prototype.changeCanvasSize = function(newWidth,newHeight) {\r\n\t// Create and size a new canvas\r\n\tvar newCanvas = this.document.createElement(\"canvas\");\r\n\tthis.initCanvas(newCanvas,newWidth,newHeight);\r\n\t// Copy the old image\r\n\tvar ctx = newCanvas.getContext(\"2d\");\r\n\tctx.drawImage(this.currCanvas,0,0);\r\n\t// Set the new canvas as the current one\r\n\tthis.currCanvas = newCanvas;\r\n\t// Set the size of the onscreen canvas\r\n\tthis.canvasDomNode.width = newWidth;\r\n\tthis.canvasDomNode.height = newHeight;\r\n\t// Paint the onscreen canvas with the offscreen canvas\r\n\tctx = this.canvasDomNode.getContext(\"2d\");\r\n\tctx.drawImage(this.currCanvas,0,0);\r\n};\r\n\r\nEditBitmapWidget.prototype.handleWidthChangeEvent = function(event) {\r\n\t// Get the new width\r\n\tvar newWidth = parseInt(this.widthDomNode.value,10);\r\n\t// Update if necessary\r\n\tif(newWidth > 0 && newWidth !== this.currCanvas.width) {\r\n\t\tthis.changeCanvasSize(newWidth,this.currCanvas.height);\r\n\t}\r\n\t// Update the input controls\r\n\tthis.updateSize();\r\n};\r\n\r\nEditBitmapWidget.prototype.handleHeightChangeEvent = function(event) {\r\n\t// Get the new width\r\n\tvar newHeight = parseInt(this.heightDomNode.value,10);\r\n\t// Update if necessary\r\n\tif(newHeight > 0 && newHeight !== this.currCanvas.height) {\r\n\t\tthis.changeCanvasSize(this.currCanvas.width,newHeight);\r\n\t}\r\n\t// Update the input controls\r\n\tthis.updateSize();\r\n};\r\n\r\nEditBitmapWidget.prototype.handleTouchStartEvent = function(event) {\r\n\tthis.brushDown = true;\r\n\tthis.strokeStart(event.touches[0].clientX,event.touches[0].clientY);\r\n\tevent.preventDefault();\r\n\tevent.stopPropagation();\r\n\treturn false;\r\n};\r\n\r\nEditBitmapWidget.prototype.handleTouchMoveEvent = function(event) {\r\n\tif(this.brushDown) {\r\n\t\tthis.strokeMove(event.touches[0].clientX,event.touches[0].clientY);\r\n\t}\r\n\tevent.preventDefault();\r\n\tevent.stopPropagation();\r\n\treturn false;\r\n};\r\n\r\nEditBitmapWidget.prototype.handleTouchEndEvent = function(event) {\r\n\tif(this.brushDown) {\r\n\t\tthis.brushDown = false;\r\n\t\tthis.strokeEnd();\r\n\t}\r\n\tevent.preventDefault();\r\n\tevent.stopPropagation();\r\n\treturn false;\r\n};\r\n\r\nEditBitmapWidget.prototype.handleMouseDownEvent = function(event) {\r\n\tthis.strokeStart(event.clientX,event.clientY);\r\n\tthis.brushDown = true;\r\n\tevent.preventDefault();\r\n\tevent.stopPropagation();\r\n\treturn false;\r\n};\r\n\r\nEditBitmapWidget.prototype.handleMouseMoveEvent = function(event) {\r\n\tif(this.brushDown) {\r\n\t\tthis.strokeMove(event.clientX,event.clientY);\r\n\t\tevent.preventDefault();\r\n\t\tevent.stopPropagation();\r\n\t\treturn false;\r\n\t}\r\n\treturn true;\r\n};\r\n\r\nEditBitmapWidget.prototype.handleMouseUpEvent = function(event) {\r\n\tif(this.brushDown) {\r\n\t\tthis.brushDown = false;\r\n\t\tthis.strokeEnd();\r\n\t\tevent.preventDefault();\r\n\t\tevent.stopPropagation();\r\n\t\treturn false;\r\n\t}\r\n\treturn true;\r\n};\r\n\r\nEditBitmapWidget.prototype.adjustCoordinates = function(x,y) {\r\n\tvar canvasRect = this.canvasDomNode.getBoundingClientRect(),\r\n\t\tscale = this.canvasDomNode.width/canvasRect.width;\r\n\treturn {x: (x - canvasRect.left) * scale, y: (y - canvasRect.top) * scale};\r\n};\r\n\r\nEditBitmapWidget.prototype.strokeStart = function(x,y) {\r\n\t// Start off a new stroke\r\n\tthis.stroke = [this.adjustCoordinates(x,y)];\r\n};\r\n\r\nEditBitmapWidget.prototype.strokeMove = function(x,y) {\r\n\tvar ctx = this.canvasDomNode.getContext(\"2d\"),\r\n\t\tt;\r\n\t// Add the new position to the end of the stroke\r\n\tthis.stroke.push(this.adjustCoordinates(x,y));\r\n\t// Redraw the previous image\r\n\tctx.drawImage(this.currCanvas,0,0);\r\n\t// Render the stroke\r\n\tctx.strokeStyle = this.wiki.getTiddlerText(LINE_COLOUR_TITLE,\"#ff0\");\r\n\tctx.lineWidth = parseInt(this.wiki.getTiddlerText(LINE_WIDTH_TITLE,\"3\"),10);\r\n\tctx.lineCap = \"round\";\r\n\tctx.lineJoin = \"round\";\r\n\tctx.beginPath();\r\n\tctx.moveTo(this.stroke[0].x,this.stroke[0].y);\r\n\tfor(t=1; t<this.stroke.length-1; t++) {\r\n\t\tvar s1 = this.stroke[t],\r\n\t\t\ts2 = this.stroke[t-1],\r\n\t\t\ttx = (s1.x + s2.x)/2,\r\n\t\t\tty = (s1.y + s2.y)/2;\r\n\t\tctx.quadraticCurveTo(s2.x,s2.y,tx,ty);\r\n\t}\r\n\tctx.stroke();\r\n};\r\n\r\nEditBitmapWidget.prototype.strokeEnd = function() {\r\n\t// Copy the bitmap to the off-screen canvas\r\n\tvar ctx = this.currCanvas.getContext(\"2d\");\r\n\tctx.drawImage(this.canvasDomNode,0,0);\r\n\t// Save the image into the tiddler\r\n\tthis.saveChanges();\r\n};\r\n\r\nEditBitmapWidget.prototype.saveChanges = function() {\r\n\tvar tiddler = this.wiki.getTiddler(this.editTitle);\r\n\tif(tiddler) {\r\n\t\t// data URIs look like \"data:<type>;base64,<text>\"\r\n\t\tvar dataURL = this.canvasDomNode.toDataURL(tiddler.fields.type,1.0),\r\n\t\t\tposColon = dataURL.indexOf(\":\"),\r\n\t\t\tposSemiColon = dataURL.indexOf(\";\"),\r\n\t\t\tposComma = dataURL.indexOf(\",\"),\r\n\t\t\ttype = dataURL.substring(posColon+1,posSemiColon),\r\n\t\t\ttext = dataURL.substring(posComma+1);\r\n\t\tvar update = {type: type, text: text};\r\n\t\tthis.wiki.addTiddler(new $tw.Tiddler(tiddler,update));\r\n\t}\r\n};\r\n\r\nexports[\"edit-bitmap\"] = EditBitmapWidget;\r\n\r\n})();\r\n",
"title": "$:/core/modules/widgets/edit-bitmap.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/edit-text.js": {
"text": "/*\\\r\ntitle: $:/core/modules/widgets/edit-text.js\r\ntype: application/javascript\r\nmodule-type: widget\r\n\r\nEdit-text widget\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar DEFAULT_MIN_TEXT_AREA_HEIGHT = \"100px\"; // Minimum height of textareas in pixels\r\n\r\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\r\n\r\nvar EditTextWidget = function(parseTreeNode,options) {\r\n\tthis.initialise(parseTreeNode,options);\r\n};\r\n\r\n/*\r\nInherit from the base widget class\r\n*/\r\nEditTextWidget.prototype = new Widget();\r\n\r\n/*\r\nRender this widget into the DOM\r\n*/\r\nEditTextWidget.prototype.render = function(parent,nextSibling) {\r\n\tvar self = this;\r\n\t// Save the parent dom node\r\n\tthis.parentDomNode = parent;\r\n\t// Compute our attributes\r\n\tthis.computeAttributes();\r\n\t// Execute our logic\r\n\tthis.execute();\r\n\t// Create our element\r\n\tvar editInfo = this.getEditInfo();\r\n\tvar domNode = this.document.createElement(this.editTag);\r\n\tif(this.editType) {\r\n\t\tdomNode.setAttribute(\"type\",this.editType);\r\n\t}\r\n\tif(editInfo.value === \"\" && this.editPlaceholder) {\r\n\t\tdomNode.setAttribute(\"placeholder\",this.editPlaceholder);\r\n\t}\r\n\tif(this.editSize) {\r\n\t\tdomNode.setAttribute(\"size\",this.editSize);\r\n\t}\r\n\t// Assign classes\r\n\tif(this.editClass) {\r\n\t\tdomNode.className = this.editClass;\r\n\t}\r\n\t// Set the text\r\n\tif(this.editTag === \"textarea\") {\r\n\t\tdomNode.appendChild(this.document.createTextNode(editInfo.value));\r\n\t} else {\r\n\t\tdomNode.value = editInfo.value;\r\n\t}\r\n\t// Add an input event handler\r\n\t$tw.utils.addEventListeners(domNode,[\r\n\t\t{name: \"focus\", handlerObject: this, handlerMethod: \"handleFocusEvent\"},\r\n\t\t{name: \"input\", handlerObject: this, handlerMethod: \"handleInputEvent\"}\r\n\t]);\r\n\t// Insert the element into the DOM\r\n\tparent.insertBefore(domNode,nextSibling);\r\n\tthis.domNodes.push(domNode);\r\n\tif(this.postRender) {\r\n\t\tthis.postRender();\r\n\t}\r\n\t// Fix height\r\n\tthis.fixHeight();\r\n\t// Focus field\r\n\tif(this.editFocus === \"true\") {\r\n\t\tif(domNode.focus && domNode.select) {\r\n\t\t\tdomNode.focus();\r\n\t\t\tdomNode.select();\t\t\t\r\n\t\t}\r\n\t}\r\n};\r\n\r\n/*\r\nGet the tiddler being edited and current value\r\n*/\r\nEditTextWidget.prototype.getEditInfo = function() {\r\n\t// Get the edit value\r\n\tvar self = this,\r\n\t\tvalue,\r\n\t\tupdate;\r\n\tif(this.editIndex) {\r\n\t\tvalue = this.wiki.extractTiddlerDataItem(this.editTitle,this.editIndex,this.editDefault);\r\n\t\tupdate = function(value) {\r\n\t\t\tvar data = self.wiki.getTiddlerData(self.editTitle,{});\r\n\t\t\tif(data[self.editIndex] !== value) {\r\n\t\t\t\tdata[self.editIndex] = value;\r\n\t\t\t\tself.wiki.setTiddlerData(self.editTitle,data);\r\n\t\t\t}\r\n\t\t};\r\n\t} else {\r\n\t\t// Get the current tiddler and the field name\r\n\t\tvar tiddler = this.wiki.getTiddler(this.editTitle);\r\n\t\tif(tiddler) {\r\n\t\t\t// If we've got a tiddler, the value to display is the field string value\r\n\t\t\tvalue = tiddler.getFieldString(this.editField);\r\n\t\t} else {\r\n\t\t\t// Otherwise, we need to construct a default value for the editor\r\n\t\t\tswitch(this.editField) {\r\n\t\t\t\tcase \"text\":\r\n\t\t\t\t\tvalue = \"Type the text for the tiddler '\" + this.editTitle + \"'\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"title\":\r\n\t\t\t\t\tvalue = this.editTitle;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tvalue = \"\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif(this.editDefault !== undefined) {\r\n\t\t\t\tvalue = this.editDefault;\r\n\t\t\t}\r\n\t\t}\r\n\t\tupdate = function(value) {\r\n\t\t\tvar tiddler = self.wiki.getTiddler(self.editTitle),\r\n\t\t\t\tupdateFields = {\r\n\t\t\t\t\ttitle: self.editTitle\r\n\t\t\t\t};\r\n\t\t\tupdateFields[self.editField] = value;\r\n\t\t\tself.wiki.addTiddler(new $tw.Tiddler(self.wiki.getCreationFields(),tiddler,updateFields,self.wiki.getModificationFields()));\r\n\t\t};\r\n\t}\r\n\treturn {value: value, update: update};\r\n};\r\n\r\n/*\r\nCompute the internal state of the widget\r\n*/\r\nEditTextWidget.prototype.execute = function() {\r\n\t// Get our parameters\r\n\tthis.editTitle = this.getAttribute(\"tiddler\",this.getVariable(\"currentTiddler\"));\r\n\tthis.editField = this.getAttribute(\"field\",\"text\");\r\n\tthis.editIndex = this.getAttribute(\"index\");\r\n\tthis.editDefault = this.getAttribute(\"default\");\r\n\tthis.editClass = this.getAttribute(\"class\");\r\n\tthis.editPlaceholder = this.getAttribute(\"placeholder\");\r\n\tthis.editSize = this.getAttribute(\"size\");\r\n\tthis.editAutoHeight = this.getAttribute(\"autoHeight\",\"yes\") === \"yes\";\r\n\tthis.editMinHeight = this.getAttribute(\"minHeight\",DEFAULT_MIN_TEXT_AREA_HEIGHT);\r\n\tthis.editFocusPopup = this.getAttribute(\"focusPopup\");\r\n\tthis.editFocus = this.getAttribute(\"focus\");\r\n\t// Get the editor element tag and type\r\n\tvar tag,type;\r\n\tif(this.editField === \"text\") {\r\n\t\ttag = \"textarea\";\r\n\t} else {\r\n\t\ttag = \"input\";\r\n\t\tvar fieldModule = $tw.Tiddler.fieldModules[this.editField];\r\n\t\tif(fieldModule && fieldModule.editTag) {\r\n\t\t\ttag = fieldModule.editTag;\r\n\t\t}\r\n\t\tif(fieldModule && fieldModule.editType) {\r\n\t\t\ttype = fieldModule.editType;\r\n\t\t}\r\n\t\ttype = type || \"text\";\r\n\t}\r\n\t// Get the rest of our parameters\r\n\tthis.editTag = this.getAttribute(\"tag\",tag);\r\n\tthis.editType = this.getAttribute(\"type\",type);\r\n};\r\n\r\n/*\r\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\r\n*/\r\nEditTextWidget.prototype.refresh = function(changedTiddlers) {\r\n\tvar changedAttributes = this.computeAttributes();\r\n\t// Completely rerender if any of our attributes have changed\r\n\tif(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index || changedAttributes[\"default\"] || changedAttributes[\"class\"] || changedAttributes.placeholder || changedAttributes.size || changedAttributes.autoHeight || changedAttributes.minHeight || changedAttributes.focusPopup) {\r\n\t\tthis.refreshSelf();\r\n\t\treturn true;\r\n\t} else if(changedTiddlers[this.editTitle]) {\r\n\t\tthis.updateEditor(this.getEditInfo().value);\r\n\t\treturn true;\r\n\t}\r\n\treturn false;\r\n};\r\n\r\n/*\r\nUpdate the editor with new text. This method is separate from updateEditorDomNode()\r\nso that subclasses can override updateEditor() and still use updateEditorDomNode()\r\n*/\r\nEditTextWidget.prototype.updateEditor = function(text) {\r\n\tthis.updateEditorDomNode(text);\r\n};\r\n\r\n/*\r\nUpdate the editor dom node with new text\r\n*/\r\nEditTextWidget.prototype.updateEditorDomNode = function(text) {\r\n\t// Replace the edit value if the tiddler we're editing has changed\r\n\tvar domNode = this.domNodes[0];\r\n\tif(!domNode.isTiddlyWikiFakeDom) {\r\n\t\tif(this.document.activeElement !== domNode) {\r\n\t\t\tdomNode.value = text;\r\n\t\t}\r\n\t\t// Fix the height if needed\r\n\t\tthis.fixHeight();\r\n\t}\r\n};\r\n\r\n/*\r\nFix the height of textareas to fit their content\r\n*/\r\nEditTextWidget.prototype.fixHeight = function() {\r\n\tvar self = this,\r\n\t\tdomNode = this.domNodes[0];\r\n\tif(this.editAutoHeight && domNode && !domNode.isTiddlyWikiFakeDom && this.editTag === \"textarea\") {\r\n\t\t// Resize the textarea to fit its content, preserving scroll position\r\n\t\tvar scrollPosition = $tw.utils.getScrollPosition(),\r\n\t\t\tscrollTop = scrollPosition.y;\r\n\t\t// Measure the specified minimum height\r\n\t\tdomNode.style.height = self.editMinHeight;\r\n\t\tvar minHeight = domNode.offsetHeight;\r\n\t\t// Set its height to auto so that it snaps to the correct height\r\n\t\tdomNode.style.height = \"auto\";\r\n\t\t// Calculate the revised height\r\n\t\tvar newHeight = Math.max(domNode.scrollHeight + domNode.offsetHeight - domNode.clientHeight,minHeight);\r\n\t\t// Only try to change the height if it has changed\r\n\t\tif(newHeight !== domNode.offsetHeight) {\r\n\t\t\tdomNode.style.height = newHeight + \"px\";\r\n\t\t\t// Make sure that the dimensions of the textarea are recalculated\r\n\t\t\t$tw.utils.forceLayout(domNode);\r\n\t\t\t// Check that the scroll position is still visible before trying to scroll back to it\r\n\t\t\tscrollTop = Math.min(scrollTop,self.document.body.scrollHeight - window.innerHeight);\r\n\t\t\twindow.scrollTo(scrollPosition.x,scrollTop);\r\n\t\t}\r\n\t}\r\n};\r\n\r\n/*\r\nHandle a dom \"input\" event\r\n*/\r\nEditTextWidget.prototype.handleInputEvent = function(event) {\r\n\tthis.saveChanges(this.domNodes[0].value);\r\n\tthis.fixHeight();\r\n\treturn true;\r\n};\r\n\r\nEditTextWidget.prototype.handleFocusEvent = function(event) {\r\n\tif(this.editFocusPopup) {\r\n\t\t$tw.popup.triggerPopup({\r\n\t\t\tdomNode: this.domNodes[0],\r\n\t\t\ttitle: this.editFocusPopup,\r\n\t\t\twiki: this.wiki,\r\n\t\t\tforce: true\r\n\t\t});\r\n\t}\r\n\treturn true;\r\n};\r\n\r\nEditTextWidget.prototype.saveChanges = function(text) {\r\n\tvar editInfo = this.getEditInfo();\r\n\tif(text !== editInfo.value) {\r\n\t\teditInfo.update(text);\r\n\t}\r\n};\r\n\r\nexports[\"edit-text\"] = EditTextWidget;\r\n\r\n})();\r\n",
"title": "$:/core/modules/widgets/edit-text.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/edit.js": {
"text": "/*\\\r\ntitle: $:/core/modules/widgets/edit.js\r\ntype: application/javascript\r\nmodule-type: widget\r\n\r\nEdit widget is a meta-widget chooses the appropriate actual editting widget\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\r\n\r\nvar EditWidget = function(parseTreeNode,options) {\r\n\tthis.initialise(parseTreeNode,options);\r\n};\r\n\r\n/*\r\nInherit from the base widget class\r\n*/\r\nEditWidget.prototype = new Widget();\r\n\r\n/*\r\nRender this widget into the DOM\r\n*/\r\nEditWidget.prototype.render = function(parent,nextSibling) {\r\n\tthis.parentDomNode = parent;\r\n\tthis.computeAttributes();\r\n\tthis.execute();\r\n\tthis.renderChildren(parent,nextSibling);\r\n};\r\n\r\n// Mappings from content type to editor type are stored in tiddlers with this prefix\r\nvar EDITOR_MAPPING_PREFIX = \"$:/config/EditorTypeMappings/\";\r\n\r\n/*\r\nCompute the internal state of the widget\r\n*/\r\nEditWidget.prototype.execute = function() {\r\n\t// Get our parameters\r\n\tthis.editTitle = this.getAttribute(\"tiddler\",this.getVariable(\"currentTiddler\"));\r\n\tthis.editField = this.getAttribute(\"field\",\"text\");\r\n\tthis.editIndex = this.getAttribute(\"index\");\r\n\tthis.editClass = this.getAttribute(\"class\");\r\n\tthis.editPlaceholder = this.getAttribute(\"placeholder\");\r\n\t// Choose the appropriate edit widget\r\n\tthis.editorType = this.getEditorType();\r\n\t// Make the child widgets\r\n\tthis.makeChildWidgets([{\r\n\t\ttype: \"edit-\" + this.editorType,\r\n\t\tattributes: {\r\n\t\t\ttiddler: {type: \"string\", value: this.editTitle},\r\n\t\t\tfield: {type: \"string\", value: this.editField},\r\n\t\t\tindex: {type: \"string\", value: this.editIndex},\r\n\t\t\t\"class\": {type: \"string\", value: this.editClass},\r\n\t\t\t\"placeholder\": {type: \"string\", value: this.editPlaceholder}\r\n\t\t}\r\n\t}]);\r\n};\r\n\r\nEditWidget.prototype.getEditorType = function() {\r\n\t// Get the content type of the thing we're editing\r\n\tvar type;\r\n\tif(this.editField === \"text\") {\r\n\t\tvar tiddler = this.wiki.getTiddler(this.editTitle);\r\n\t\tif(tiddler) {\r\n\t\t\ttype = tiddler.fields.type;\r\n\t\t}\r\n\t}\r\n\ttype = type || \"text/vnd.tiddlywiki\";\r\n\tvar editorType = this.wiki.getTiddlerText(EDITOR_MAPPING_PREFIX + type);\r\n\tif(!editorType) {\r\n\t\tvar typeInfo = $tw.config.contentTypeInfo[type];\r\n\t\tif(typeInfo && typeInfo.encoding === \"base64\") {\r\n\t\t\teditorType = \"binary\";\r\n\t\t} else {\r\n\t\t\teditorType = \"text\";\r\n\t\t}\r\n\t}\r\n\treturn editorType;\r\n};\r\n\r\n/*\r\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\r\n*/\r\nEditWidget.prototype.refresh = function(changedTiddlers) {\r\n\tvar changedAttributes = this.computeAttributes();\r\n\t// Refresh if an attribute has changed, or the type associated with the target tiddler has changed\r\n\tif(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index || (changedTiddlers[this.editTitle] && this.getEditorType() !== this.editorType)) {\r\n\t\tthis.refreshSelf();\r\n\t\treturn true;\r\n\t} else {\r\n\t\treturn this.refreshChildren(changedTiddlers);\t\t\r\n\t}\r\n};\r\n\r\nexports.edit = EditWidget;\r\n\r\n})();\r\n",
"title": "$:/core/modules/widgets/edit.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/element.js": {
"text": "/*\\\r\ntitle: $:/core/modules/widgets/element.js\r\ntype: application/javascript\r\nmodule-type: widget\r\n\r\nElement widget\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\r\n\r\nvar ElementWidget = function(parseTreeNode,options) {\r\n\tthis.initialise(parseTreeNode,options);\r\n};\r\n\r\n/*\r\nInherit from the base widget class\r\n*/\r\nElementWidget.prototype = new Widget();\r\n\r\n/*\r\nRender this widget into the DOM\r\n*/\r\nElementWidget.prototype.render = function(parent,nextSibling) {\r\n\tthis.parentDomNode = parent;\r\n\tthis.computeAttributes();\r\n\tthis.execute();\r\n\t// Neuter blacklisted elements\r\n\tvar tag = this.parseTreeNode.tag;\r\n\tif($tw.config.htmlUnsafeElements.indexOf(tag) !== -1) {\r\n\t\ttag = \"safe-\" + tag;\r\n\t}\r\n\tvar domNode = this.document.createElementNS(this.namespace,tag);\r\n\tthis.assignAttributes(domNode,{excludeEventAttributes: true});\r\n\tparent.insertBefore(domNode,nextSibling);\r\n\tthis.renderChildren(domNode,null);\r\n\tthis.domNodes.push(domNode);\r\n};\r\n\r\n/*\r\nCompute the internal state of the widget\r\n*/\r\nElementWidget.prototype.execute = function() {\r\n\t// Select the namespace for the tag\r\n\tvar tagNamespaces = {\r\n\t\t\tsvg: \"http://www.w3.org/2000/svg\",\r\n\t\t\tmath: \"http://www.w3.org/1998/Math/MathML\",\r\n\t\t\tbody: \"http://www.w3.org/1999/xhtml\"\r\n\t\t};\r\n\tthis.namespace = tagNamespaces[this.parseTreeNode.tag];\r\n\tif(this.namespace) {\r\n\t\tthis.setVariable(\"namespace\",this.namespace);\r\n\t} else {\r\n\t\tthis.namespace = this.getVariable(\"namespace\",{defaultValue: \"http://www.w3.org/1999/xhtml\"});\r\n\t}\r\n\t// Make the child widgets\r\n\tthis.makeChildWidgets();\r\n};\r\n\r\n/*\r\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\r\n*/\r\nElementWidget.prototype.refresh = function(changedTiddlers) {\r\n\tvar changedAttributes = this.computeAttributes(),\r\n\t\thasChangedAttributes = $tw.utils.count(changedAttributes) > 0;\r\n\tif(hasChangedAttributes) {\r\n\t\t// Update our attributes\r\n\t\tthis.assignAttributes(this.domNodes[0],{excludeEventAttributes: true});\r\n\t}\r\n\treturn this.refreshChildren(changedTiddlers) || hasChangedAttributes;\r\n};\r\n\r\nexports.element = ElementWidget;\r\n\r\n})();\r\n",
"title": "$:/core/modules/widgets/element.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/encrypt.js": {
"text": "/*\\\r\ntitle: $:/core/modules/widgets/encrypt.js\r\ntype: application/javascript\r\nmodule-type: widget\r\n\r\nEncrypt widget\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\r\n\r\nvar EncryptWidget = function(parseTreeNode,options) {\r\n\tthis.initialise(parseTreeNode,options);\r\n};\r\n\r\n/*\r\nInherit from the base widget class\r\n*/\r\nEncryptWidget.prototype = new Widget();\r\n\r\n/*\r\nRender this widget into the DOM\r\n*/\r\nEncryptWidget.prototype.render = function(parent,nextSibling) {\r\n\tthis.parentDomNode = parent;\r\n\tthis.computeAttributes();\r\n\tthis.execute();\r\n\tvar textNode = this.document.createTextNode(this.encryptedText);\r\n\tparent.insertBefore(textNode,nextSibling);\r\n\tthis.domNodes.push(textNode);\r\n};\r\n\r\n/*\r\nCompute the internal state of the widget\r\n*/\r\nEncryptWidget.prototype.execute = function() {\r\n\t// Get parameters from our attributes\r\n\tthis.filter = this.getAttribute(\"filter\",\"[!is[system]]\");\r\n\t// Encrypt the filtered tiddlers\r\n\tvar tiddlers = this.wiki.filterTiddlers(this.filter),\r\n\t\tjson = {},\r\n\t\tself = this;\r\n\t$tw.utils.each(tiddlers,function(title) {\r\n\t\tvar tiddler = self.wiki.getTiddler(title),\r\n\t\t\tjsonTiddler = {};\r\n\t\tfor(var f in tiddler.fields) {\r\n\t\t\tjsonTiddler[f] = tiddler.getFieldString(f);\r\n\t\t}\r\n\t\tjson[title] = jsonTiddler;\r\n\t});\r\n\tthis.encryptedText = $tw.utils.htmlEncode($tw.crypto.encrypt(JSON.stringify(json)));\r\n};\r\n\r\n/*\r\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\r\n*/\r\nEncryptWidget.prototype.refresh = function(changedTiddlers) {\r\n\t// We don't need to worry about refreshing because the encrypt widget isn't for interactive use\r\n\treturn false;\r\n};\r\n\r\nexports.encrypt = EncryptWidget;\r\n\r\n})();\r\n",
"title": "$:/core/modules/widgets/encrypt.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/entity.js": {
"text": "/*\\\r\ntitle: $:/core/modules/widgets/entity.js\r\ntype: application/javascript\r\nmodule-type: widget\r\n\r\nHTML entity widget\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\r\n\r\nvar EntityWidget = function(parseTreeNode,options) {\r\n\tthis.initialise(parseTreeNode,options);\r\n};\r\n\r\n/*\r\nInherit from the base widget class\r\n*/\r\nEntityWidget.prototype = new Widget();\r\n\r\n/*\r\nRender this widget into the DOM\r\n*/\r\nEntityWidget.prototype.render = function(parent,nextSibling) {\r\n\tthis.parentDomNode = parent;\r\n\tthis.execute();\r\n\tvar textNode = this.document.createTextNode($tw.utils.entityDecode(this.parseTreeNode.entity));\r\n\tparent.insertBefore(textNode,nextSibling);\r\n\tthis.domNodes.push(textNode);\r\n};\r\n\r\n/*\r\nCompute the internal state of the widget\r\n*/\r\nEntityWidget.prototype.execute = function() {\r\n};\r\n\r\n/*\r\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\r\n*/\r\nEntityWidget.prototype.refresh = function(changedTiddlers) {\r\n\treturn false;\r\n};\r\n\r\nexports.entity = EntityWidget;\r\n\r\n})();\r\n",
"title": "$:/core/modules/widgets/entity.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/fieldmangler.js": {
"text": "/*\\\r\ntitle: $:/core/modules/widgets/fieldmangler.js\r\ntype: application/javascript\r\nmodule-type: widget\r\n\r\nField mangler widget\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\r\n\r\nvar FieldManglerWidget = function(parseTreeNode,options) {\r\n\tthis.initialise(parseTreeNode,options);\r\n\tthis.addEventListeners([\r\n\t\t{type: \"tm-remove-field\", handler: \"handleRemoveFieldEvent\"},\r\n\t\t{type: \"tm-add-field\", handler: \"handleAddFieldEvent\"},\r\n\t\t{type: \"tm-remove-tag\", handler: \"handleRemoveTagEvent\"},\r\n\t\t{type: \"tm-add-tag\", handler: \"handleAddTagEvent\"}\r\n\t]);\r\n};\r\n\r\n/*\r\nInherit from the base widget class\r\n*/\r\nFieldManglerWidget.prototype = new Widget();\r\n\r\n/*\r\nRender this widget into the DOM\r\n*/\r\nFieldManglerWidget.prototype.render = function(parent,nextSibling) {\r\n\tthis.parentDomNode = parent;\r\n\tthis.computeAttributes();\r\n\tthis.execute();\r\n\tthis.renderChildren(parent,nextSibling);\r\n};\r\n\r\n/*\r\nCompute the internal state of the widget\r\n*/\r\nFieldManglerWidget.prototype.execute = function() {\r\n\t// Get our parameters\r\n\tthis.mangleTitle = this.getAttribute(\"tiddler\",this.getVariable(\"currentTiddler\"));\r\n\t// Construct the child widgets\r\n\tthis.makeChildWidgets();\r\n};\r\n\r\n/*\r\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\r\n*/\r\nFieldManglerWidget.prototype.refresh = function(changedTiddlers) {\r\n\tvar changedAttributes = this.computeAttributes();\r\n\tif(changedAttributes.tiddler) {\r\n\t\tthis.refreshSelf();\r\n\t\treturn true;\r\n\t} else {\r\n\t\treturn this.refreshChildren(changedTiddlers);\t\t\r\n\t}\r\n};\r\n\r\nFieldManglerWidget.prototype.handleRemoveFieldEvent = function(event) {\r\n\tvar tiddler = this.wiki.getTiddler(this.mangleTitle),\r\n\t\tdeletion = {};\r\n\tdeletion[event.param] = undefined;\r\n\tthis.wiki.addTiddler(new $tw.Tiddler(tiddler,deletion));\r\n\treturn true;\r\n};\r\n\r\nFieldManglerWidget.prototype.handleAddFieldEvent = function(event) {\r\n\tvar tiddler = this.wiki.getTiddler(this.mangleTitle),\r\n\t\taddition = this.wiki.getModificationFields(),\r\n\t\thadInvalidFieldName = false,\r\n\t\taddField = function(name,value) {\r\n\t\t\tvar trimmedName = name.toLowerCase().trim();\r\n\t\t\tif(!$tw.utils.isValidFieldName(trimmedName)) {\r\n\t\t\t\tif(!hadInvalidFieldName) {\r\n\t\t\t\t\talert($tw.language.getString(\r\n\t\t\t\t\t\t\"InvalidFieldName\",\r\n\t\t\t\t\t\t{variables:\r\n\t\t\t\t\t\t\t{fieldName: trimmedName}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t));\r\n\t\t\t\t\thadInvalidFieldName = true;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif(!value && tiddler) {\r\n\t\t\t\t\tvalue = tiddler.fields[trimmedName];\r\n\t\t\t\t}\r\n\t\t\t\taddition[trimmedName] = value || \"\";\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t};\r\n\taddition.title = this.mangleTitle;\r\n\tif(typeof event.param === \"string\") {\r\n\t\taddField(event.param,\"\");\r\n\t}\r\n\tif(typeof event.paramObject === \"object\") {\r\n\t\tfor(var name in event.paramObject) {\r\n\t\t\taddField(name,event.paramObject[name]);\r\n\t\t}\r\n\t}\r\n\tthis.wiki.addTiddler(new $tw.Tiddler(tiddler,addition));\r\n\treturn true;\r\n};\r\n\r\nFieldManglerWidget.prototype.handleRemoveTagEvent = function(event) {\r\n\tvar tiddler = this.wiki.getTiddler(this.mangleTitle);\r\n\tif(tiddler && tiddler.fields.tags) {\r\n\t\tvar p = tiddler.fields.tags.indexOf(event.param);\r\n\t\tif(p !== -1) {\r\n\t\t\tvar modification = this.wiki.getModificationFields();\r\n\t\t\tmodification.tags = (tiddler.fields.tags || []).slice(0);\r\n\t\t\tmodification.tags.splice(p,1);\r\n\t\t\tif(modification.tags.length === 0) {\r\n\t\t\t\tmodification.tags = undefined;\r\n\t\t\t}\r\n\t\tthis.wiki.addTiddler(new $tw.Tiddler(tiddler,modification));\r\n\t\t}\r\n\t}\r\n\treturn true;\r\n};\r\n\r\nFieldManglerWidget.prototype.handleAddTagEvent = function(event) {\r\n\tvar tiddler = this.wiki.getTiddler(this.mangleTitle);\r\n\tif(tiddler && typeof event.param === \"string\") {\r\n\t\tvar tag = event.param.trim();\r\n\t\tif(tag !== \"\") {\r\n\t\t\tvar modification = this.wiki.getModificationFields();\r\n\t\t\tmodification.tags = (tiddler.fields.tags || []).slice(0);\r\n\t\t\t$tw.utils.pushTop(modification.tags,tag);\r\n\t\t\tthis.wiki.addTiddler(new $tw.Tiddler(tiddler,modification));\t\t\t\r\n\t\t}\r\n\t}\r\n\treturn true;\r\n};\r\n\r\nexports.fieldmangler = FieldManglerWidget;\r\n\r\n})();\r\n",
"title": "$:/core/modules/widgets/fieldmangler.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/fields.js": {
"text": "/*\\\r\ntitle: $:/core/modules/widgets/fields.js\r\ntype: application/javascript\r\nmodule-type: widget\r\n\r\nFields widget\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\r\n\r\nvar FieldsWidget = function(parseTreeNode,options) {\r\n\tthis.initialise(parseTreeNode,options);\r\n};\r\n\r\n/*\r\nInherit from the base widget class\r\n*/\r\nFieldsWidget.prototype = new Widget();\r\n\r\n/*\r\nRender this widget into the DOM\r\n*/\r\nFieldsWidget.prototype.render = function(parent,nextSibling) {\r\n\tthis.parentDomNode = parent;\r\n\tthis.computeAttributes();\r\n\tthis.execute();\r\n\tvar textNode = this.document.createTextNode(this.text);\r\n\tparent.insertBefore(textNode,nextSibling);\r\n\tthis.domNodes.push(textNode);\r\n};\r\n\r\n/*\r\nCompute the internal state of the widget\r\n*/\r\nFieldsWidget.prototype.execute = function() {\r\n\t// Get parameters from our attributes\r\n\tthis.tiddlerTitle = this.getAttribute(\"tiddler\",this.getVariable(\"currentTiddler\"));\r\n\tthis.template = this.getAttribute(\"template\");\r\n\tthis.exclude = this.getAttribute(\"exclude\");\r\n\tthis.stripTitlePrefix = this.getAttribute(\"stripTitlePrefix\",\"no\") === \"yes\";\r\n\t// Get the value to display\r\n\tvar tiddler = this.wiki.getTiddler(this.tiddlerTitle);\r\n\t// Get the exclusion list\r\n\tvar exclude;\r\n\tif(this.exclude) {\r\n\t\texclude = this.exclude.split(\" \");\r\n\t} else {\r\n\t\texclude = [\"text\"]; \r\n\t}\r\n\t// Compose the template\r\n\tvar text = [];\r\n\tif(this.template && tiddler) {\r\n\t\tvar fields = [];\r\n\t\tfor(var fieldName in tiddler.fields) {\r\n\t\t\tif(exclude.indexOf(fieldName) === -1) {\r\n\t\t\t\tfields.push(fieldName);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfields.sort();\r\n\t\tfor(var f=0; f<fields.length; f++) {\r\n\t\t\tfieldName = fields[f];\r\n\t\t\tif(exclude.indexOf(fieldName) === -1) {\r\n\t\t\t\tvar row = this.template,\r\n\t\t\t\t\tvalue = tiddler.getFieldString(fieldName);\r\n\t\t\t\tif(this.stripTitlePrefix && fieldName === \"title\") {\r\n\t\t\t\t\tvar reStrip = /^\\{[^\\}]+\\}(.+)/mg,\r\n\t\t\t\t\t\treMatch = reStrip.exec(value);\r\n\t\t\t\t\tif(reMatch) {\r\n\t\t\t\t\t\tvalue = reMatch[1];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\trow = row.replace(\"$name$\",fieldName);\r\n\t\t\t\trow = row.replace(\"$value$\",value);\r\n\t\t\t\trow = row.replace(\"$encoded_value$\",$tw.utils.htmlEncode(value));\r\n\t\t\t\ttext.push(row);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tthis.text = text.join(\"\");\r\n};\r\n\r\n/*\r\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\r\n*/\r\nFieldsWidget.prototype.refresh = function(changedTiddlers) {\r\n\tvar changedAttributes = this.computeAttributes();\r\n\tif(changedAttributes.tiddler || changedAttributes.template || changedAttributes.exclude || changedAttributes.stripTitlePrefix || changedTiddlers[this.tiddlerTitle]) {\r\n\t\tthis.refreshSelf();\r\n\t\treturn true;\r\n\t} else {\r\n\t\treturn false;\t\r\n\t}\r\n};\r\n\r\nexports.fields = FieldsWidget;\r\n\r\n})();\r\n",
"title": "$:/core/modules/widgets/fields.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/image.js": {
"text": "/*\\\r\ntitle: $:/core/modules/widgets/image.js\r\ntype: application/javascript\r\nmodule-type: widget\r\n\r\nThe image widget displays an image referenced with an external URI or with a local tiddler title.\r\n\r\n```\r\n<$image src=\"TiddlerTitle\" width=\"320\" height=\"400\" class=\"classnames\">\r\n```\r\n\r\nThe image source can be the title of an existing tiddler or the URL of an external image.\r\n\r\nExternal images always generate an HTML `<img>` tag.\r\n\r\nTiddlers that have a _canonical_uri field generate an HTML `<img>` tag with the src attribute containing the URI.\r\n\r\nTiddlers that contain image data generate an HTML `<img>` tag with the src attribute containing a base64 representation of the image.\r\n\r\nTiddlers that contain wikitext could be rendered to a DIV of the usual size of a tiddler, and then transformed to the size requested.\r\n\r\nThe width and height attributes are interpreted as a number of pixels, and do not need to include the \"px\" suffix.\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\r\n\r\nvar ImageWidget = function(parseTreeNode,options) {\r\n\tthis.initialise(parseTreeNode,options);\r\n};\r\n\r\n/*\r\nInherit from the base widget class\r\n*/\r\nImageWidget.prototype = new Widget();\r\n\r\n/*\r\nRender this widget into the DOM\r\n*/\r\nImageWidget.prototype.render = function(parent,nextSibling) {\r\n\tthis.parentDomNode = parent;\r\n\tthis.computeAttributes();\r\n\tthis.execute();\r\n\t// Create element\r\n\t// Determine what type of image it is\r\n\tvar tag = \"img\", src = \"\",\r\n\t\ttiddler = this.wiki.getTiddler(this.imageSource);\r\n\tif(!tiddler) {\r\n\t\t// The source isn't the title of a tiddler, so we'll assume it's a URL\r\n\t\tsrc = this.imageSource;\r\n\t} else {\r\n\t\t// Check if it is an image tiddler\r\n\t\tif(this.wiki.isImageTiddler(this.imageSource)) {\r\n\t\t\tvar type = tiddler.fields.type,\r\n\t\t\t\ttext = tiddler.fields.text,\r\n\t\t\t\t_canonical_uri = tiddler.fields._canonical_uri;\r\n\t\t\t// If the tiddler has body text then it doesn't need to be lazily loaded\r\n\t\t\tif(text) {\r\n\t\t\t\t// Render the appropriate element for the image type\r\n\t\t\t\tswitch(type) {\r\n\t\t\t\t\tcase \"application/pdf\":\r\n\t\t\t\t\t\ttag = \"embed\";\r\n\t\t\t\t\t\tsrc = \"data:application/pdf;base64,\" + text;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"image/svg+xml\":\r\n\t\t\t\t\t\tsrc = \"data:image/svg+xml,\" + encodeURIComponent(text);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tsrc = \"data:\" + type + \";base64,\" + text;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t} else if(_canonical_uri) {\r\n\t\t\t\tswitch(type) {\r\n\t\t\t\t\tcase \"application/pdf\":\r\n\t\t\t\t\t\ttag = \"embed\";\r\n\t\t\t\t\t\tsrc = _canonical_uri;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"image/svg+xml\":\r\n\t\t\t\t\t\tsrc = _canonical_uri;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tsrc = _canonical_uri;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t// Create the element and assign the attributes\r\n\tvar domNode = this.document.createElement(tag);\r\n\tdomNode.setAttribute(\"src\",src);\r\n\tif(this.imageClass) {\r\n\t\tdomNode.setAttribute(\"class\",this.imageClass);\t\t\r\n\t}\r\n\tif(this.imageWidth) {\r\n\t\tdomNode.setAttribute(\"width\",this.imageWidth);\r\n\t}\r\n\tif(this.imageHeight) {\r\n\t\tdomNode.setAttribute(\"height\",this.imageHeight);\r\n\t}\r\n\tif(this.imageTooltip) {\r\n\t\tdomNode.setAttribute(\"title\",this.imageTooltip);\t\t\r\n\t}\r\n\tif(this.imageAlt) {\r\n\t\tdomNode.setAttribute(\"alt\",this.imageAlt);\t\t\r\n\t}\r\n\t// Insert element\r\n\tparent.insertBefore(domNode,nextSibling);\r\n\tthis.domNodes.push(domNode);\r\n};\r\n\r\n/*\r\nCompute the internal state of the widget\r\n*/\r\nImageWidget.prototype.execute = function() {\r\n\t// Get our parameters\r\n\tthis.imageSource = this.getAttribute(\"source\");\r\n\tthis.imageWidth = this.getAttribute(\"width\");\r\n\tthis.imageHeight = this.getAttribute(\"height\");\r\n\tthis.imageClass = this.getAttribute(\"class\");\r\n\tthis.imageTooltip = this.getAttribute(\"tooltip\");\r\n\tthis.imageAlt = this.getAttribute(\"alt\");\r\n};\r\n\r\n/*\r\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\r\n*/\r\nImageWidget.prototype.refresh = function(changedTiddlers) {\r\n\tvar changedAttributes = this.computeAttributes();\r\n\tif(changedAttributes.source || changedAttributes.width || changedAttributes.height || changedAttributes[\"class\"] || changedAttributes.tooltip || changedTiddlers[this.imageSource]) {\r\n\t\tthis.refreshSelf();\r\n\t\treturn true;\r\n\t} else {\r\n\t\treturn false;\t\t\r\n\t}\r\n};\r\n\r\nexports.image = ImageWidget;\r\n\r\n})();\r\n",
"title": "$:/core/modules/widgets/image.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/importvariables.js": {
"text": "/*\\\r\ntitle: $:/core/modules/widgets/importvariables.js\r\ntype: application/javascript\r\nmodule-type: widget\r\n\r\nImport variable definitions from other tiddlers\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\r\n\r\nvar ImportVariablesWidget = function(parseTreeNode,options) {\r\n\tthis.initialise(parseTreeNode,options);\r\n};\r\n\r\n/*\r\nInherit from the base widget class\r\n*/\r\nImportVariablesWidget.prototype = new Widget();\r\n\r\n/*\r\nRender this widget into the DOM\r\n*/\r\nImportVariablesWidget.prototype.render = function(parent,nextSibling) {\r\n\tthis.parentDomNode = parent;\r\n\tthis.computeAttributes();\r\n\tthis.execute();\r\n\tthis.renderChildren(parent,nextSibling);\r\n};\r\n\r\n/*\r\nCompute the internal state of the widget\r\n*/\r\nImportVariablesWidget.prototype.execute = function(tiddlerList) {\r\n\tvar self = this;\r\n\t// Get our parameters\r\n\tthis.filter = this.getAttribute(\"filter\");\r\n\t// Compute the filter\r\n\tthis.tiddlerList = tiddlerList || this.wiki.filterTiddlers(this.filter,this);\r\n\t// Accumulate the <$set> widgets from each tiddler\r\n\tvar widgetStackStart,widgetStackEnd;\r\n\tfunction addWidgetNode(widgetNode) {\r\n\t\tif(widgetNode) {\r\n\t\t\tif(!widgetStackStart && !widgetStackEnd) {\r\n\t\t\t\twidgetStackStart = widgetNode;\r\n\t\t\t\twidgetStackEnd = widgetNode;\r\n\t\t\t} else {\r\n\t\t\t\twidgetStackEnd.children = [widgetNode];\r\n\t\t\t\twidgetStackEnd = widgetNode;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t$tw.utils.each(this.tiddlerList,function(title) {\r\n\t\tvar parser = self.wiki.parseTiddler(title);\r\n\t\tif(parser) {\r\n\t\t\tvar parseTreeNode = parser.tree[0];\r\n\t\t\twhile(parseTreeNode && parseTreeNode.type === \"set\") {\r\n\t\t\t\taddWidgetNode({\r\n\t\t\t\t\ttype: \"set\",\r\n\t\t\t\t\tattributes: parseTreeNode.attributes,\r\n\t\t\t\t\tparams: parseTreeNode.params\r\n\t\t\t\t});\r\n\t\t\t\tparseTreeNode = parseTreeNode.children[0];\r\n\t\t\t}\r\n\t\t} \r\n\t});\r\n\t// Add our own children to the end of the pile\r\n\tvar parseTreeNodes;\r\n\tif(widgetStackStart && widgetStackEnd) {\r\n\t\tparseTreeNodes = [widgetStackStart];\r\n\t\twidgetStackEnd.children = this.parseTreeNode.children;\r\n\t} else {\r\n\t\tparseTreeNodes = this.parseTreeNode.children;\r\n\t}\r\n\t// Construct the child widgets\r\n\tthis.makeChildWidgets(parseTreeNodes);\r\n};\r\n\r\n/*\r\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\r\n*/\r\nImportVariablesWidget.prototype.refresh = function(changedTiddlers) {\r\n\t// Recompute our attributes and the filter list\r\n\tvar changedAttributes = this.computeAttributes(),\r\n\t\ttiddlerList = this.wiki.filterTiddlers(this.getAttribute(\"filter\"),this);\r\n\t// Refresh if the filter has changed, or the list of tiddlers has changed, or any of the tiddlers in the list has changed\r\n\tfunction haveListedTiddlersChanged() {\r\n\t\tvar changed = false;\r\n\t\ttiddlerList.forEach(function(title) {\r\n\t\t\tif(changedTiddlers[title]) {\r\n\t\t\t\tchanged = true;\r\n\t\t\t}\r\n\t\t});\r\n\t\treturn changed;\r\n\t}\r\n\tif(changedAttributes.filter || !$tw.utils.isArrayEqual(this.tiddlerList,tiddlerList) || haveListedTiddlersChanged()) {\r\n\t\t// Compute the filter\r\n\t\tthis.removeChildDomNodes();\r\n\t\tthis.execute(tiddlerList);\r\n\t\tthis.renderChildren(this.parentDomNode,this.findNextSiblingDomNode());\r\n\t\treturn true;\r\n\t} else {\r\n\t\treturn this.refreshChildren(changedTiddlers);\t\t\r\n\t}\r\n};\r\n\r\nexports.importvariables = ImportVariablesWidget;\r\n\r\n})();\r\n",
"title": "$:/core/modules/widgets/importvariables.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/keyboard.js": {
"text": "/*\\\r\ntitle: $:/core/modules/widgets/keyboard.js\r\ntype: application/javascript\r\nmodule-type: widget\r\n\r\nKeyboard shortcut widget\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\r\n\r\nvar KeyboardWidget = function(parseTreeNode,options) {\r\n\tthis.initialise(parseTreeNode,options);\r\n};\r\n\r\n/*\r\nInherit from the base widget class\r\n*/\r\nKeyboardWidget.prototype = new Widget();\r\n\r\n/*\r\nRender this widget into the DOM\r\n*/\r\nKeyboardWidget.prototype.render = function(parent,nextSibling) {\r\n\tvar self = this;\r\n\t// Remember parent\r\n\tthis.parentDomNode = parent;\r\n\t// Compute attributes and execute state\r\n\tthis.computeAttributes();\r\n\tthis.execute();\r\n\t// Create element\r\n\tvar domNode = this.document.createElement(\"div\");\r\n\t// Assign classes\r\n\tvar classes = (this[\"class\"] || \"\").split(\" \");\r\n\tclasses.push(\"tc-keyboard\");\r\n\tdomNode.className = classes.join(\" \");\r\n\t// Add a keyboard event handler\r\n\tdomNode.addEventListener(\"keydown\",function (event) {\r\n\t\tif($tw.utils.checkKeyDescriptor(event,self.keyInfo)) {\r\n\t\t\tself.dispatchMessage(event);\r\n\t\t\tevent.preventDefault();\r\n\t\t\tevent.stopPropagation();\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t},false);\r\n\t// Insert element\r\n\tparent.insertBefore(domNode,nextSibling);\r\n\tthis.renderChildren(domNode,null);\r\n\tthis.domNodes.push(domNode);\r\n};\r\n\r\nKeyboardWidget.prototype.dispatchMessage = function(event) {\r\n\tthis.dispatchEvent({type: this.message, param: this.param, tiddlerTitle: this.getVariable(\"currentTiddler\")});\r\n};\r\n\r\n/*\r\nCompute the internal state of the widget\r\n*/\r\nKeyboardWidget.prototype.execute = function() {\r\n\t// Get attributes\r\n\tthis.message = this.getAttribute(\"message\");\r\n\tthis.param = this.getAttribute(\"param\");\r\n\tthis.key = this.getAttribute(\"key\");\r\n\tthis.keyInfo = $tw.utils.parseKeyDescriptor(this.key);\r\n\tthis[\"class\"] = this.getAttribute(\"class\");\r\n\t// Make child widgets\r\n\tthis.makeChildWidgets();\r\n};\r\n\r\n/*\r\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\r\n*/\r\nKeyboardWidget.prototype.refresh = function(changedTiddlers) {\r\n\tvar changedAttributes = this.computeAttributes();\r\n\tif(changedAttributes.message || changedAttributes.param || changedAttributes.key || changedAttributes[\"class\"]) {\r\n\t\tthis.refreshSelf();\r\n\t\treturn true;\r\n\t}\r\n\treturn this.refreshChildren(changedTiddlers);\r\n};\r\n\r\nexports.keyboard = KeyboardWidget;\r\n\r\n})();\r\n",
"title": "$:/core/modules/widgets/keyboard.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/link.js": {
"text": "/*\\\r\ntitle: $:/core/modules/widgets/link.js\r\ntype: application/javascript\r\nmodule-type: widget\r\n\r\nLink widget\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\r\n\r\nvar LinkWidget = function(parseTreeNode,options) {\r\n\tthis.initialise(parseTreeNode,options);\r\n};\r\n\r\n/*\r\nInherit from the base widget class\r\n*/\r\nLinkWidget.prototype = new Widget();\r\n\r\n/*\r\nRender this widget into the DOM\r\n*/\r\nLinkWidget.prototype.render = function(parent,nextSibling) {\r\n\t// Save the parent dom node\r\n\tthis.parentDomNode = parent;\r\n\t// Compute our attributes\r\n\tthis.computeAttributes();\r\n\t// Execute our logic\r\n\tthis.execute();\r\n\t// Get the value of the tv-wikilinks configuration macro\r\n\tvar wikiLinksMacro = this.getVariable(\"tv-wikilinks\"),\r\n\t\tuseWikiLinks = wikiLinksMacro ? (wikiLinksMacro.trim() !== \"no\") : true;\r\n\t// Render the link if required\r\n\tif(useWikiLinks) {\r\n\t\tthis.renderLink(parent,nextSibling);\r\n\t} else {\r\n\t\t// Just insert the link text\r\n\t\tvar domNode = this.document.createElement(\"span\");\r\n\t\tparent.insertBefore(domNode,nextSibling);\r\n\t\tthis.renderChildren(domNode,null);\r\n\t\tthis.domNodes.push(domNode);\r\n\t}\r\n};\r\n\r\n/*\r\nRender this widget into the DOM\r\n*/\r\nLinkWidget.prototype.renderLink = function(parent,nextSibling) {\r\n\tvar self = this;\r\n\t// Create our element\r\n\tvar domNode = this.document.createElement(\"a\");\r\n\t// Assign classes\r\n\tvar classes = [];\r\n\tif(this.linkClasses) {\r\n\t\tclasses.push(this.linkClasses);\r\n\t}\r\n\tclasses.push(\"tc-tiddlylink\");\r\n\tif(this.isShadow) {\r\n\t\tclasses.push(\"tc-tiddlylink-shadow\");\r\n\t}\r\n\tif(this.isMissing && !this.isShadow) {\r\n\t\tclasses.push(\"tc-tiddlylink-missing\");\r\n\t} else {\r\n\t\tif(!this.isMissing) {\r\n\t\t\tclasses.push(\"tc-tiddlylink-resolves\");\r\n\t\t}\r\n\t}\r\n\tdomNode.setAttribute(\"class\",classes.join(\" \"));\r\n\t// Set an href\r\n\tvar wikiLinkTemplateMacro = this.getVariable(\"tv-wikilink-template\"),\r\n\t\twikiLinkTemplate = wikiLinkTemplateMacro ? wikiLinkTemplateMacro.trim() : \"#$uri_encoded$\",\r\n\t\twikiLinkText = wikiLinkTemplate.replace(\"$uri_encoded$\",encodeURIComponent(this.to));\r\n\twikiLinkText = wikiLinkText.replace(\"$uri_doubleencoded$\",encodeURIComponent(encodeURIComponent(this.to)));\r\n\tdomNode.setAttribute(\"href\",wikiLinkText);\r\n\t// Set the tooltip\r\n\t// HACK: Performance issues with re-parsing the tooltip prevent us defaulting the tooltip to \"<$transclude field='tooltip'><$transclude field='title'/></$transclude>\"\r\n\tvar tooltipWikiText = this.tooltip || this.getVariable(\"tv-wikilink-tooltip\");\r\n\tif(tooltipWikiText) {\r\n\t\tvar tooltipText = this.wiki.renderText(\"text/plain\",\"text/vnd.tiddlywiki\",tooltipWikiText,{\r\n\t\t\t\tparseAsInline: true,\r\n\t\t\t\tvariables: {\r\n\t\t\t\t\tcurrentTiddler: this.to\r\n\t\t\t\t},\r\n\t\t\t\tparentWidget: this\r\n\t\t\t});\r\n\t\tdomNode.setAttribute(\"title\",tooltipText);\r\n\t}\r\n\tif(this[\"aria-label\"]) {\r\n\t\tdomNode.setAttribute(\"aria-label\",this[\"aria-label\"]);\r\n\t}\r\n\t// Add a click event handler\r\n\t$tw.utils.addEventListeners(domNode,[\r\n\t\t{name: \"click\", handlerObject: this, handlerMethod: \"handleClickEvent\"},\r\n\t\t{name: \"dragstart\", handlerObject: this, handlerMethod: \"handleDragStartEvent\"},\r\n\t\t{name: \"dragend\", handlerObject: this, handlerMethod: \"handleDragEndEvent\"}\r\n\t]);\r\n\t// Insert the link into the DOM and render any children\r\n\tparent.insertBefore(domNode,nextSibling);\r\n\tthis.renderChildren(domNode,null);\r\n\tthis.domNodes.push(domNode);\r\n};\r\n\r\nLinkWidget.prototype.handleClickEvent = function(event) {\r\n\t// Send the click on its way as a navigate event\r\n\tvar bounds = this.domNodes[0].getBoundingClientRect();\r\n\tthis.dispatchEvent({\r\n\t\ttype: \"tm-navigate\",\r\n\t\tnavigateTo: this.to,\r\n\t\tnavigateFromTitle: this.getVariable(\"storyTiddler\"),\r\n\t\tnavigateFromNode: this,\r\n\t\tnavigateFromClientRect: { top: bounds.top, left: bounds.left, width: bounds.width, right: bounds.right, bottom: bounds.bottom, height: bounds.height\r\n\t\t},\r\n\t\tnavigateSuppressNavigation: event.metaKey || event.ctrlKey || (event.button === 1)\r\n\t});\r\n\tevent.preventDefault();\r\n\tevent.stopPropagation();\r\n\treturn false;\r\n};\r\n\r\nLinkWidget.prototype.handleDragStartEvent = function(event) {\r\n\tif(event.target === this.domNodes[0]) {\r\n\t\tif(this.to) {\r\n\t\t\t// Set the dragging class on the element being dragged\r\n\t\t\t$tw.utils.addClass(event.target,\"tc-tiddlylink-dragging\");\r\n\t\t\t// Create the drag image elements\r\n\t\t\tthis.dragImage = this.document.createElement(\"div\");\r\n\t\t\tthis.dragImage.className = \"tc-tiddler-dragger\";\r\n\t\t\tvar inner = this.document.createElement(\"div\");\r\n\t\t\tinner.className = \"tc-tiddler-dragger-inner\";\r\n\t\t\tinner.appendChild(this.document.createTextNode(this.to));\r\n\t\t\tthis.dragImage.appendChild(inner);\r\n\t\t\tthis.document.body.appendChild(this.dragImage);\r\n\t\t\t// Astoundingly, we need to cover the dragger up: http://www.kryogenix.org/code/browser/custom-drag-image.html\r\n\t\t\tvar cover = this.document.createElement(\"div\");\r\n\t\t\tcover.className = \"tc-tiddler-dragger-cover\";\r\n\t\t\tcover.style.left = (inner.offsetLeft - 16) + \"px\";\r\n\t\t\tcover.style.top = (inner.offsetTop - 16) + \"px\";\r\n\t\t\tcover.style.width = (inner.offsetWidth + 32) + \"px\";\r\n\t\t\tcover.style.height = (inner.offsetHeight + 32) + \"px\";\r\n\t\t\tthis.dragImage.appendChild(cover);\r\n\t\t\t// Set the data transfer properties\r\n\t\t\tvar dataTransfer = event.dataTransfer;\r\n\t\t\t// First the image\r\n\t\t\tdataTransfer.effectAllowed = \"copy\";\r\n\t\t\tif(dataTransfer.setDragImage) {\r\n\t\t\t\tdataTransfer.setDragImage(this.dragImage.firstChild,-16,-16);\r\n\t\t\t}\r\n\t\t\t// Then the data\r\n\t\t\tdataTransfer.clearData();\r\n\t\t\tvar jsonData = this.wiki.getTiddlerAsJson(this.to),\r\n\t\t\t\ttextData = this.wiki.getTiddlerText(this.to,\"\"),\r\n\t\t\t\ttitle = (new RegExp(\"^\" + $tw.config.textPrimitives.wikiLink + \"$\",\"mg\")).exec(this.to) ? this.to : \"[[\" + this.to + \"]]\";\r\n\t\t\t// IE doesn't like these content types\r\n\t\t\tif(!$tw.browser.isIE) {\r\n\t\t\t\tdataTransfer.setData(\"text/vnd.tiddler\",jsonData);\r\n\t\t\t\tdataTransfer.setData(\"text/plain\",title);\r\n\t\t\t\tdataTransfer.setData(\"text/x-moz-url\",\"data:text/vnd.tiddler,\" + encodeURI(jsonData));\r\n\t\t\t}\r\n\t\t\tdataTransfer.setData(\"URL\",\"data:text/vnd.tiddler,\" + encodeURI(jsonData));\r\n\t\t\tdataTransfer.setData(\"Text\",title);\r\n\t\t\tevent.stopPropagation();\r\n\t\t} else {\r\n\t\t\tevent.preventDefault();\r\n\t\t}\r\n\t}\r\n};\r\n\r\nLinkWidget.prototype.handleDragEndEvent = function(event) {\r\n\tif(event.target === this.domNodes[0]) {\r\n\t\t// Remove the dragging class on the element being dragged\r\n\t\t$tw.utils.removeClass(event.target,\"tc-tiddlylink-dragging\");\r\n\t\t// Delete the drag image element\r\n\t\tif(this.dragImage) {\r\n\t\t\tthis.dragImage.parentNode.removeChild(this.dragImage);\r\n\t\t}\r\n\t}\r\n};\r\n\r\n/*\r\nCompute the internal state of the widget\r\n*/\r\nLinkWidget.prototype.execute = function() {\r\n\t// Get the target tiddler title\r\n\tthis.to = this.getAttribute(\"to\",this.getVariable(\"currentTiddler\"));\r\n\t// Get the link title and aria label\r\n\tthis.tooltip = this.getAttribute(\"tooltip\");\r\n\tthis[\"aria-label\"] = this.getAttribute(\"aria-label\");\r\n\t// Get the link classes\r\n\tthis.linkClasses = this.getAttribute(\"class\");\r\n\t// Determine the link characteristics\r\n\tthis.isMissing = !this.wiki.tiddlerExists(this.to);\r\n\tthis.isShadow = this.wiki.isShadowTiddler(this.to);\r\n\t// Make the child widgets\r\n\tthis.makeChildWidgets();\r\n};\r\n\r\n/*\r\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\r\n*/\r\nLinkWidget.prototype.refresh = function(changedTiddlers) {\r\n\tvar changedAttributes = this.computeAttributes();\r\n\tif(changedAttributes.to || changedTiddlers[this.to] || changedAttributes[\"aria-label\"] || changedAttributes.tooltip) {\r\n\t\tthis.refreshSelf();\r\n\t\treturn true;\r\n\t}\r\n\treturn this.refreshChildren(changedTiddlers);\r\n};\r\n\r\nexports.link = LinkWidget;\r\n\r\n})();\r\n",
"title": "$:/core/modules/widgets/link.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/linkcatcher.js": {
"text": "/*\\\r\ntitle: $:/core/modules/widgets/linkcatcher.js\r\ntype: application/javascript\r\nmodule-type: widget\r\n\r\nLinkcatcher widget\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\r\n\r\nvar LinkCatcherWidget = function(parseTreeNode,options) {\r\n\tthis.initialise(parseTreeNode,options);\r\n\tthis.addEventListeners([\r\n\t\t{type: \"tm-navigate\", handler: \"handleNavigateEvent\"}\r\n\t]);\r\n};\r\n\r\n/*\r\nInherit from the base widget class\r\n*/\r\nLinkCatcherWidget.prototype = new Widget();\r\n\r\n/*\r\nRender this widget into the DOM\r\n*/\r\nLinkCatcherWidget.prototype.render = function(parent,nextSibling) {\r\n\tthis.parentDomNode = parent;\r\n\tthis.computeAttributes();\r\n\tthis.execute();\r\n\tthis.renderChildren(parent,nextSibling);\r\n};\r\n\r\n/*\r\nCompute the internal state of the widget\r\n*/\r\nLinkCatcherWidget.prototype.execute = function() {\r\n\t// Get our parameters\r\n\tthis.catchTo = this.getAttribute(\"to\");\r\n\tthis.catchMessage = this.getAttribute(\"message\");\r\n\tthis.catchSet = this.getAttribute(\"set\");\r\n\tthis.catchSetTo = this.getAttribute(\"setTo\");\r\n\t// Construct the child widgets\r\n\tthis.makeChildWidgets();\r\n};\r\n\r\n/*\r\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\r\n*/\r\nLinkCatcherWidget.prototype.refresh = function(changedTiddlers) {\r\n\tvar changedAttributes = this.computeAttributes();\r\n\tif(changedAttributes.to || changedAttributes.message || changedAttributes.set || changedAttributes.setTo) {\r\n\t\tthis.refreshSelf();\r\n\t\treturn true;\r\n\t} else {\r\n\t\treturn this.refreshChildren(changedTiddlers);\t\t\r\n\t}\r\n};\r\n\r\n/*\r\nHandle a tm-navigate event\r\n*/\r\nLinkCatcherWidget.prototype.handleNavigateEvent = function(event) {\r\n\tif(this.catchTo) {\r\n\t\tthis.wiki.setTextReference(this.catchTo,event.navigateTo,this.getVariable(\"currentTiddler\"));\r\n\t}\r\n\tif(this.catchMessage && this.parentWidget) {\r\n\t\tthis.parentWidget.dispatchEvent({\r\n\t\t\ttype: this.catchMessage,\r\n\t\t\tparam: event.navigateTo,\r\n\t\t\tnavigateTo: event.navigateTo\r\n\t\t});\r\n\t}\r\n\tif(this.catchSet) {\r\n\t\tvar tiddler = this.wiki.getTiddler(this.catchSet);\r\n\t\tthis.wiki.addTiddler(new $tw.Tiddler(tiddler,{title: this.catchSet, text: this.catchSetTo}));\r\n\t}\r\n\treturn false;\r\n};\r\n\r\nexports.linkcatcher = LinkCatcherWidget;\r\n\r\n})();\r\n",
"title": "$:/core/modules/widgets/linkcatcher.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/list.js": {
"text": "/*\\\r\ntitle: $:/core/modules/widgets/list.js\r\ntype: application/javascript\r\nmodule-type: widget\r\n\r\nList and list item widgets\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\r\n\r\n/*\r\nThe list widget creates list element sub-widgets that reach back into the list widget for their configuration\r\n*/\r\n\r\nvar ListWidget = function(parseTreeNode,options) {\r\n\t// Initialise the storyviews if they've not been done already\r\n\tif(!this.storyViews) {\r\n\t\tListWidget.prototype.storyViews = {};\r\n\t\t$tw.modules.applyMethods(\"storyview\",this.storyViews);\r\n\t}\r\n\t// Main initialisation inherited from widget.js\r\n\tthis.initialise(parseTreeNode,options);\r\n};\r\n\r\n/*\r\nInherit from the base widget class\r\n*/\r\nListWidget.prototype = new Widget();\r\n\r\n/*\r\nRender this widget into the DOM\r\n*/\r\nListWidget.prototype.render = function(parent,nextSibling) {\r\n\tthis.parentDomNode = parent;\r\n\tthis.computeAttributes();\r\n\tthis.execute();\r\n\tthis.renderChildren(parent,nextSibling);\r\n\t// Construct the storyview\r\n\tvar StoryView = this.storyViews[this.storyViewName];\r\n\tif(StoryView && !this.document.isTiddlyWikiFakeDom) {\r\n\t\tthis.storyview = new StoryView(this);\r\n\t} else {\r\n\t\tthis.storyview = null;\r\n\t}\r\n};\r\n\r\n/*\r\nCompute the internal state of the widget\r\n*/\r\nListWidget.prototype.execute = function() {\r\n\t// Get our attributes\r\n\tthis.template = this.getAttribute(\"template\");\r\n\tthis.editTemplate = this.getAttribute(\"editTemplate\");\r\n\tthis.variableName = this.getAttribute(\"variable\",\"currentTiddler\");\r\n\tthis.storyViewName = this.getAttribute(\"storyview\");\r\n\tthis.historyTitle = this.getAttribute(\"history\");\r\n\tthis.iterator = this.getAttribute(\"iterator\",\"iterator\");\r\n\t// Compose the list elements\r\n\tthis.list = this.getTiddlerList();\r\n\tvar members = [],\r\n\t\tself = this,\r\n\t\tcount = self.list.length;\r\n\t// Check for an empty list\r\n\tif(0 === count) {\r\n\t\tmembers = this.getEmptyMessage();\r\n\t} else {\r\n\t\t$tw.utils.each(this.list,function(title,index) {\r\n\t\t\tmembers.push(self.makeItemTemplate(title,index,count,self.iterator));\r\n\t\t});\r\n\t}\r\n\t// Construct the child widgets\r\n\tthis.makeChildWidgets(members);\r\n\t// Clear the last history\r\n\tthis.history = [];\r\n};\r\n\r\nListWidget.prototype.getTiddlerList = function() {\r\n\tvar defaultFilter = \"[!is[system]sort[title]]\";\r\n\treturn this.wiki.filterTiddlers(this.getAttribute(\"filter\",defaultFilter),this);\r\n};\r\n\r\nListWidget.prototype.getEmptyMessage = function() {\r\n\tvar emptyMessage = this.getAttribute(\"emptyMessage\",\"\"),\r\n\t\tparser = this.wiki.parseText(\"text/vnd.tiddlywiki\",emptyMessage,{parseAsInline: true});\r\n\tif(parser) {\r\n\t\treturn parser.tree;\r\n\t} else {\r\n\t\treturn [];\r\n\t}\r\n};\r\n\r\n/*\r\nCompose the template for a list item\r\n*/\r\nListWidget.prototype.makeItemTemplate = function(title,index,count,iterator) {\r\n\t// Check if the tiddler is a draft\r\n\tvar tiddler = this.wiki.getTiddler(title),\r\n\t\tisDraft = tiddler && tiddler.hasField(\"draft.of\"),\r\n\t\ttemplate = this.template,\r\n\t\ttemplateTree;\r\n\tif(isDraft && this.editTemplate) {\r\n\t\ttemplate = this.editTemplate;\r\n\t}\r\n\t// Compose the transclusion of the template\r\n\tif(template) {\r\n\t\ttemplateTree = [{type: \"transclude\", attributes: {tiddler: {type: \"string\", value: template}}}];\r\n\t} else {\r\n\t\tif(this.parseTreeNode.children && this.parseTreeNode.children.length > 0) {\r\n\t\t\ttemplateTree = this.parseTreeNode.children;\r\n\t\t} else {\r\n\t\t\t// Default template is a link to the title\r\n\t\t\ttemplateTree = [{type: \"element\", tag: this.parseTreeNode.isBlock ? \"div\" : \"span\", children: [{type: \"link\", attributes: {to: {type: \"string\", value: title}}, children: [\r\n\t\t\t\t\t{type: \"text\", text: title}\r\n\t\t\t]}]}];\r\n\t\t}\r\n\t}\r\n\t// Return the list item\r\n\treturn {\r\n\t\ttype: \"listitem\",\r\n\t\titemTitle: title,\r\n\t\tvariableName: this.variableName,\r\n\t\tchildren: templateTree,\r\n\t\tindex: index,\r\n\t\tcount: count,\r\n\t\titerator: iterator\r\n\t};\r\n};\r\n\r\n/*\r\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\r\n*/\r\nListWidget.prototype.refresh = function(changedTiddlers) {\r\n\tvar changedAttributes = this.computeAttributes();\r\n\t// Completely refresh if any of our attributes have changed\r\n\tif(changedAttributes.filter || changedAttributes.template || changedAttributes.editTemplate || changedAttributes.emptyMessage || changedAttributes.storyview || changedAttributes.history) {\r\n\t\tthis.refreshSelf();\r\n\t\treturn true;\r\n\t} else {\r\n\t\t// Handle any changes to the list\r\n\t\tvar hasChanged = this.handleListChanges(changedTiddlers);\r\n\t\t// Handle any changes to the history stack\r\n\t\tif(this.historyTitle && changedTiddlers[this.historyTitle]) {\r\n\t\t\tthis.handleHistoryChanges();\r\n\t\t}\r\n\t\treturn hasChanged;\r\n\t}\r\n};\r\n\r\n/*\r\nHandle any changes to the history list\r\n*/\r\nListWidget.prototype.handleHistoryChanges = function() {\r\n\t// Get the history data\r\n\tvar newHistory = this.wiki.getTiddlerData(this.historyTitle,[]);\r\n\t// Ignore any entries of the history that match the previous history\r\n\tvar entry = 0;\r\n\twhile(entry < newHistory.length && entry < this.history.length && newHistory[entry].title === this.history[entry].title) {\r\n\t\tentry++;\r\n\t}\r\n\t// Navigate forwards to each of the new tiddlers\r\n\twhile(entry < newHistory.length) {\r\n\t\tif(this.storyview && this.storyview.navigateTo) {\r\n\t\t\tthis.storyview.navigateTo(newHistory[entry]);\r\n\t\t}\r\n\t\tentry++;\r\n\t}\r\n\t// Update the history\r\n\tthis.history = newHistory;\r\n};\r\n\r\n/*\r\nProcess any changes to the list\r\n*/\r\nListWidget.prototype.handleListChanges = function(changedTiddlers) {\r\n\t// Get the new list\r\n\tvar prevList = this.list;\r\n\tthis.list = this.getTiddlerList();\r\n\t// Check for an empty list\r\n\tif(this.list.length === 0) {\r\n\t\t// Check if it was empty before\r\n\t\tif(prevList.length === 0) {\r\n\t\t\t// If so, just refresh the empty message\r\n\t\t\treturn this.refreshChildren(changedTiddlers);\r\n\t\t} else {\r\n\t\t\t// Replace the previous content with the empty message\r\n\t\t\tfor(t=this.children.length-1; t>=0; t--) {\r\n\t\t\t\tthis.removeListItem(t);\r\n\t\t\t}\r\n\t\t\tvar nextSibling = this.findNextSiblingDomNode();\r\n\t\t\tthis.makeChildWidgets(this.getEmptyMessage());\r\n\t\t\tthis.renderChildren(this.parentDomNode,nextSibling);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t} else {\r\n\t\t// If the list was empty then we need to remove the empty message\r\n\t\tif(prevList.length === 0) {\r\n\t\t\tthis.removeChildDomNodes();\r\n\t\t\tthis.children = [];\r\n\t\t}\r\n\t\t// Cycle through the list, inserting and removing list items as needed\r\n\t\tvar hasRefreshed = false;\r\n\t\tfor(var t=0; t<this.list.length; t++) {\r\n\t\t\tvar index = this.findListItem(t,this.list[t]);\r\n\t\t\tif(index === undefined) {\r\n\t\t\t\t// The list item must be inserted\r\n\t\t\t\tthis.insertListItem(t,this.list[t]);\r\n\t\t\t\thasRefreshed = true;\r\n\t\t\t} else {\r\n\t\t\t\t// There are intervening list items that must be removed\r\n\t\t\t\tfor(var n=index-1; n>=t; n--) {\r\n\t\t\t\t\tthis.removeListItem(n);\r\n\t\t\t\t\thasRefreshed = true;\r\n\t\t\t\t}\r\n\t\t\t\t// Refresh the item we're reusing\r\n\t\t\t\tvar refreshed = this.children[t].refresh(changedTiddlers);\r\n\t\t\t\thasRefreshed = hasRefreshed || refreshed;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Remove any left over items\r\n\t\tfor(t=this.children.length-1; t>=this.list.length; t--) {\r\n\t\t\tthis.removeListItem(t);\r\n\t\t\thasRefreshed = true;\r\n\t\t}\r\n\t\treturn hasRefreshed;\r\n\t}\r\n};\r\n\r\n/*\r\nFind the list item with a given title, starting from a specified position\r\n*/\r\nListWidget.prototype.findListItem = function(startIndex,title) {\r\n\twhile(startIndex < this.children.length) {\r\n\t\tif(this.children[startIndex].parseTreeNode.itemTitle === title) {\r\n\t\t\treturn startIndex;\r\n\t\t}\r\n\t\tstartIndex++;\r\n\t}\r\n\treturn undefined;\r\n};\r\n\r\n/*\r\nInsert a new list item at the specified index\r\n*/\r\nListWidget.prototype.insertListItem = function(index,title) {\r\n\t// Create, insert and render the new child widgets\r\n\tvar widget = this.makeChildWidget(this.makeItemTemplate(title));\r\n\twidget.parentDomNode = this.parentDomNode; // Hack to enable findNextSiblingDomNode() to work\r\n\tthis.children.splice(index,0,widget);\r\n\tvar nextSibling = widget.findNextSiblingDomNode();\r\n\twidget.render(this.parentDomNode,nextSibling);\r\n\t// Animate the insertion if required\r\n\tif(this.storyview && this.storyview.insert) {\r\n\t\tthis.storyview.insert(widget);\r\n\t}\r\n\treturn true;\r\n};\r\n\r\n/*\r\nRemove the specified list item\r\n*/\r\nListWidget.prototype.removeListItem = function(index) {\r\n\tvar widget = this.children[index];\r\n\t// Animate the removal if required\r\n\tif(this.storyview && this.storyview.remove) {\r\n\t\tthis.storyview.remove(widget);\r\n\t} else {\r\n\t\twidget.removeChildDomNodes();\r\n\t}\r\n\t// Remove the child widget\r\n\tthis.children.splice(index,1);\r\n};\r\n\r\nexports.list = ListWidget;\r\n\r\nvar ListItemWidget = function(parseTreeNode,options) {\r\n\tthis.initialise(parseTreeNode,options);\r\n};\r\n\r\n/*\r\nInherit from the base widget class\r\n*/\r\nListItemWidget.prototype = new Widget();\r\n\r\n/*\r\nRender this widget into the DOM\r\n*/\r\nListItemWidget.prototype.render = function(parent,nextSibling) {\r\n\tthis.parentDomNode = parent;\r\n\tthis.computeAttributes();\r\n\tthis.execute();\r\n\tthis.renderChildren(parent,nextSibling);\r\n};\r\n\r\n/*\r\nCompute the internal state of the widget\r\n*/\r\nListItemWidget.prototype.execute = function() {\r\n\tvar item = this.parseTreeNode;\r\n\t// Set the current list item title\r\n\tthis.setVariable(item.variableName,item.itemTitle);\r\n\tthis.setVariable(item.iterator,(item.index + 1).toString());\r\n\tthis.setVariable(item.iterator + \"-even\",item.index % 2 == 1 ? \"true\" : \"false\");\r\n\tthis.setVariable(item.iterator + \"-last\",item.index + 1 == item.count ? \"true\" : \"false\");\r\n\t// Construct the child widgets\r\n\tthis.makeChildWidgets();\r\n};\r\n\r\n/*\r\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\r\n*/\r\nListItemWidget.prototype.refresh = function(changedTiddlers) {\r\n\treturn this.refreshChildren(changedTiddlers);\r\n};\r\n\r\nexports.listitem = ListItemWidget;\r\n\r\n})();\r\n",
"title": "$:/core/modules/widgets/list.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/macrocall.js": {
"text": "/*\\\r\ntitle: $:/core/modules/widgets/macrocall.js\r\ntype: application/javascript\r\nmodule-type: widget\r\n\r\nMacrocall widget\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\r\n\r\nvar MacroCallWidget = function(parseTreeNode,options) {\r\n\tthis.initialise(parseTreeNode,options);\r\n};\r\n\r\n/*\r\nInherit from the base widget class\r\n*/\r\nMacroCallWidget.prototype = new Widget();\r\n\r\n/*\r\nRender this widget into the DOM\r\n*/\r\nMacroCallWidget.prototype.render = function(parent,nextSibling) {\r\n\tthis.parentDomNode = parent;\r\n\tthis.computeAttributes();\r\n\tthis.execute();\r\n\tthis.renderChildren(parent,nextSibling);\r\n};\r\n\r\n/*\r\nCompute the internal state of the widget\r\n*/\r\nMacroCallWidget.prototype.execute = function() {\r\n\t// Get the parse type if specified\r\n\tthis.parseType = this.getAttribute(\"$type\",\"text/vnd.tiddlywiki\");\r\n\tthis.renderOutput = this.getAttribute(\"$output\",\"text/html\");\r\n\t// Merge together the parameters specified in the parse tree with the specified attributes\r\n\tvar params = this.parseTreeNode.params ? this.parseTreeNode.params.slice(0) : [];\r\n\t$tw.utils.each(this.attributes,function(attribute,name) {\r\n\t\tif(name.charAt(0) !== \"$\") {\r\n\t\t\tparams.push({name: name, value: attribute});\t\t\t\r\n\t\t}\r\n\t});\r\n\t// Get the macro value\r\n\tvar text = this.getVariable(this.parseTreeNode.name || this.getAttribute(\"$name\"),{params: params}),\r\n\t\tparseTreeNodes;\r\n\t// Are we rendering to HTML?\r\n\tif(this.renderOutput === \"text/html\") {\r\n\t\t// If so we'll return the parsed macro\r\n\t\tvar parser = this.wiki.parseText(this.parseType,text,\r\n\t\t\t\t\t\t\t{parseAsInline: !this.parseTreeNode.isBlock});\r\n\t\tparseTreeNodes = parser ? parser.tree : [];\r\n\t} else {\r\n\t\t// Otherwise, we'll render the text\r\n\t\tvar plainText = this.wiki.renderText(\"text/plain\",this.parseType,text,{parentWidget: this});\r\n\t\tparseTreeNodes = [{type: \"text\", text: plainText}];\r\n\t}\r\n\t// Construct the child widgets\r\n\tthis.makeChildWidgets(parseTreeNodes);\r\n};\r\n\r\n/*\r\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\r\n*/\r\nMacroCallWidget.prototype.refresh = function(changedTiddlers) {\r\n\tvar changedAttributes = this.computeAttributes();\r\n\tif($tw.utils.count(changedAttributes) > 0) {\r\n\t\t// Rerender ourselves\r\n\t\tthis.refreshSelf();\r\n\t\treturn true;\r\n\t} else {\r\n\t\treturn this.refreshChildren(changedTiddlers);\r\n\t}\r\n};\r\n\r\nexports.macrocall = MacroCallWidget;\r\n\r\n})();\r\n",
"title": "$:/core/modules/widgets/macrocall.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/navigator.js": {
"text": "/*\\\r\ntitle: $:/core/modules/widgets/navigator.js\r\ntype: application/javascript\r\nmodule-type: widget\r\n\r\nNavigator widget\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar IMPORT_TITLE = \"$:/Import\";\r\n\r\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\r\n\r\nvar NavigatorWidget = function(parseTreeNode,options) {\r\n\tthis.initialise(parseTreeNode,options);\r\n\tthis.addEventListeners([\r\n\t\t{type: \"tm-navigate\", handler: \"handleNavigateEvent\"},\r\n\t\t{type: \"tm-edit-tiddler\", handler: \"handleEditTiddlerEvent\"},\r\n\t\t{type: \"tm-delete-tiddler\", handler: \"handleDeleteTiddlerEvent\"},\r\n\t\t{type: \"tm-save-tiddler\", handler: \"handleSaveTiddlerEvent\"},\r\n\t\t{type: \"tm-cancel-tiddler\", handler: \"handleCancelTiddlerEvent\"},\r\n\t\t{type: \"tm-close-tiddler\", handler: \"handleCloseTiddlerEvent\"},\r\n\t\t{type: \"tm-close-all-tiddlers\", handler: \"handleCloseAllTiddlersEvent\"},\r\n\t\t{type: \"tm-close-other-tiddlers\", handler: \"handleCloseOtherTiddlersEvent\"},\r\n\t\t{type: \"tm-new-tiddler\", handler: \"handleNewTiddlerEvent\"},\r\n\t\t{type: \"tm-import-tiddlers\", handler: \"handleImportTiddlersEvent\"},\r\n\t\t{type: \"tm-perform-import\", handler: \"handlePerformImportEvent\"}\r\n\t]);\r\n};\r\n\r\n/*\r\nInherit from the base widget class\r\n*/\r\nNavigatorWidget.prototype = new Widget();\r\n\r\n/*\r\nRender this widget into the DOM\r\n*/\r\nNavigatorWidget.prototype.render = function(parent,nextSibling) {\r\n\tthis.parentDomNode = parent;\r\n\tthis.computeAttributes();\r\n\tthis.execute();\r\n\tthis.renderChildren(parent,nextSibling);\r\n};\r\n\r\n/*\r\nCompute the internal state of the widget\r\n*/\r\nNavigatorWidget.prototype.execute = function() {\r\n\t// Get our parameters\r\n\tthis.storyTitle = this.getAttribute(\"story\");\r\n\tthis.historyTitle = this.getAttribute(\"history\");\r\n\t// Construct the child widgets\r\n\tthis.makeChildWidgets();\r\n};\r\n\r\n/*\r\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\r\n*/\r\nNavigatorWidget.prototype.refresh = function(changedTiddlers) {\r\n\tvar changedAttributes = this.computeAttributes();\r\n\tif(changedAttributes.story || changedAttributes.history) {\r\n\t\tthis.refreshSelf();\r\n\t\treturn true;\r\n\t} else {\r\n\t\treturn this.refreshChildren(changedTiddlers);\t\t\r\n\t}\r\n};\r\n\r\nNavigatorWidget.prototype.getStoryList = function() {\r\n\treturn this.storyTitle ? this.wiki.getTiddlerList(this.storyTitle) : null;\r\n};\r\n\r\nNavigatorWidget.prototype.saveStoryList = function(storyList) {\r\n\tvar storyTiddler = this.wiki.getTiddler(this.storyTitle);\r\n\tthis.wiki.addTiddler(new $tw.Tiddler(\r\n\t\t{title: this.storyTitle},\r\n\t\tstoryTiddler,\r\n\t\t{list: storyList}\r\n\t));\r\n};\r\n\r\nNavigatorWidget.prototype.findTitleInStory = function(storyList,title,defaultIndex) {\r\n\tvar p = storyList.indexOf(title);\r\n\treturn p === -1 ? defaultIndex : p;\r\n};\r\n\r\nNavigatorWidget.prototype.removeTitleFromStory = function(storyList,title) {\r\n\tvar p = storyList.indexOf(title);\r\n\twhile(p !== -1) {\r\n\t\tstoryList.splice(p,1);\r\n\t\tp = storyList.indexOf(title);\r\n\t}\r\n};\r\n\r\nNavigatorWidget.prototype.replaceFirstTitleInStory = function(storyList,oldTitle,newTitle) {\r\n\tvar pos = storyList.indexOf(oldTitle);\r\n\tif(pos !== -1) {\r\n\t\tstoryList[pos] = newTitle;\r\n\t\tdo {\r\n\t\t\tpos = storyList.indexOf(oldTitle,pos + 1);\r\n\t\t\tif(pos !== -1) {\r\n\t\t\t\tstoryList.splice(pos,1);\r\n\t\t\t}\r\n\t\t} while(pos !== -1);\r\n\t} else {\r\n\t\tstoryList.splice(0,0,newTitle);\r\n\t}\r\n};\r\n\r\nNavigatorWidget.prototype.addToStory = function(title,fromTitle) {\r\n\tvar storyList = this.getStoryList();\r\n\tif(storyList) {\r\n\t\t// See if the tiddler is already there\r\n\t\tvar slot = this.findTitleInStory(storyList,title,-1);\r\n\t\t// If not we need to add it\r\n\t\tif(slot === -1) {\r\n\t\t\t// First we try to find the position of the story element we navigated from\r\n\t\t\tslot = this.findTitleInStory(storyList,fromTitle,-1) + 1;\r\n\t\t\t// Add the tiddler\r\n\t\t\tstoryList.splice(slot,0,title);\r\n\t\t\t// Save the story\r\n\t\t\tthis.saveStoryList(storyList);\r\n\t\t}\r\n\t}\r\n};\r\n\r\n/*\r\nAdd a new record to the top of the history stack\r\ntitle: a title string or an array of title strings\r\nfromPageRect: page coordinates of the origin of the navigation\r\n*/\r\nNavigatorWidget.prototype.addToHistory = function(title,fromPageRect) {\r\n\tthis.wiki.addToHistory(title,fromPageRect,this.historyTitle);\r\n};\r\n\r\n/*\r\nHandle a tm-navigate event\r\n*/\r\nNavigatorWidget.prototype.handleNavigateEvent = function(event) {\r\n\tthis.addToStory(event.navigateTo,event.navigateFromTitle);\r\n\tif(!event.navigateSuppressNavigation) {\r\n\t\tthis.addToHistory(event.navigateTo,event.navigateFromClientRect);\r\n\t}\r\n\treturn false;\r\n};\r\n\r\n// Close a specified tiddler\r\nNavigatorWidget.prototype.handleCloseTiddlerEvent = function(event) {\r\n\tvar title = event.param || event.tiddlerTitle,\r\n\t\tstoryList = this.getStoryList();\r\n\t// Look for tiddlers with this title to close\r\n\tthis.removeTitleFromStory(storyList,title);\r\n\tthis.saveStoryList(storyList);\r\n\treturn false;\r\n};\r\n\r\n// Close all tiddlers\r\nNavigatorWidget.prototype.handleCloseAllTiddlersEvent = function(event) {\r\n\tthis.saveStoryList([]);\r\n\treturn false;\r\n};\r\n\r\n// Close other tiddlers\r\nNavigatorWidget.prototype.handleCloseOtherTiddlersEvent = function(event) {\r\n\tvar title = event.param || event.tiddlerTitle;\r\n\tthis.saveStoryList([title]);\r\n\treturn false;\r\n};\r\n\r\n// Place a tiddler in edit mode\r\nNavigatorWidget.prototype.handleEditTiddlerEvent = function(event) {\r\n\tvar self = this;\r\n\tfunction isUnmodifiedShadow(title) {\r\n\t\treturn self.wiki.isShadowTiddler(title) && !self.wiki.tiddlerExists(title);\r\n\t}\r\n\tfunction confirmEditShadow(title) {\r\n\t\treturn confirm($tw.language.getString(\r\n\t\t\t\"ConfirmEditShadowTiddler\",\r\n\t\t\t{variables:\r\n\t\t\t\t{title: title}\r\n\t\t\t}\r\n\t\t));\r\n\t}\r\n\tvar title = event.param || event.tiddlerTitle;\r\n\tif(isUnmodifiedShadow(title) && !confirmEditShadow(title)) {\r\n\t\treturn false;\r\n\t}\r\n\t// Replace the specified tiddler with a draft in edit mode\r\n\tvar draftTiddler = this.makeDraftTiddler(title),\r\n\t\tdraftTitle = draftTiddler.fields.title,\r\n\t\tstoryList = this.getStoryList();\r\n\tthis.removeTitleFromStory(storyList,draftTitle);\r\n\tthis.replaceFirstTitleInStory(storyList,title,draftTitle);\r\n\tthis.addToHistory(draftTitle,event.navigateFromClientRect);\r\n\tthis.saveStoryList(storyList);\r\n\treturn false;\r\n};\r\n\r\n// Delete a tiddler\r\nNavigatorWidget.prototype.handleDeleteTiddlerEvent = function(event) {\r\n\t// Get the tiddler we're deleting\r\n\tvar title = event.param || event.tiddlerTitle,\r\n\t\ttiddler = this.wiki.getTiddler(title),\r\n\t\tstoryList = this.getStoryList(),\r\n\t\toriginalTitle = tiddler.fields[\"draft.of\"],\r\n\t\tconfirmationTitle;\r\n\t// Check if the tiddler we're deleting is in draft mode\r\n\tif(originalTitle) {\r\n\t\t// If so, we'll prompt for confirmation referencing the original tiddler\r\n\t\tconfirmationTitle = originalTitle;\r\n\t} else {\r\n\t\t// If not a draft, then prompt for confirmation referencing the specified tiddler\r\n\t\tconfirmationTitle = title;\r\n\t}\r\n\t// Seek confirmation\r\n\tif((this.wiki.getTiddler(originalTitle) || (tiddler.fields.text || \"\") !== \"\") && !confirm($tw.language.getString(\r\n\t\t\t\t\"ConfirmDeleteTiddler\",\r\n\t\t\t\t{variables:\r\n\t\t\t\t\t{title: confirmationTitle}\r\n\t\t\t\t}\r\n\t\t\t))) {\r\n\t\treturn false;\r\n\t}\r\n\t// Delete the original tiddler\r\n\tif(originalTitle) {\r\n\t\tthis.wiki.deleteTiddler(originalTitle);\r\n\t\tthis.removeTitleFromStory(storyList,originalTitle);\r\n\t}\r\n\t// Delete this tiddler\r\n\tthis.wiki.deleteTiddler(title);\r\n\t// Remove the closed tiddler from the story\r\n\tthis.removeTitleFromStory(storyList,title);\r\n\tthis.saveStoryList(storyList);\r\n\t// Trigger an autosave\r\n\t$tw.rootWidget.dispatchEvent({type: \"tm-auto-save-wiki\"});\r\n\treturn false;\r\n};\r\n\r\n/*\r\nCreate/reuse the draft tiddler for a given title\r\n*/\r\nNavigatorWidget.prototype.makeDraftTiddler = function(targetTitle) {\r\n\t// See if there is already a draft tiddler for this tiddler\r\n\tvar draftTitle = this.wiki.findDraft(targetTitle);\r\n\tif(draftTitle) {\r\n\t\treturn this.wiki.getTiddler(draftTitle);\r\n\t}\r\n\t// Get the current value of the tiddler we're editing\r\n\tvar tiddler = this.wiki.getTiddler(targetTitle);\r\n\t// Save the initial value of the draft tiddler\r\n\tdraftTitle = this.generateDraftTitle(targetTitle);\r\n\tvar draftTiddler = new $tw.Tiddler(\r\n\t\t\ttiddler,\r\n\t\t\t{\r\n\t\t\t\ttitle: draftTitle,\r\n\t\t\t\t\"draft.title\": targetTitle,\r\n\t\t\t\t\"draft.of\": targetTitle\r\n\t\t\t},\r\n\t\t\tthis.wiki.getModificationFields()\r\n\t\t);\r\n\tthis.wiki.addTiddler(draftTiddler);\r\n\treturn draftTiddler;\r\n};\r\n\r\n/*\r\nGenerate a title for the draft of a given tiddler\r\n*/\r\nNavigatorWidget.prototype.generateDraftTitle = function(title) {\r\n\tvar c = 0,\r\n\t\tdraftTitle;\r\n\tdo {\r\n\t\tdraftTitle = \"Draft \" + (c ? (c + 1) + \" \" : \"\") + \"of '\" + title + \"'\";\r\n\t\tc++;\r\n\t} while(this.wiki.tiddlerExists(draftTitle));\r\n\treturn draftTitle;\r\n};\r\n\r\n// Take a tiddler out of edit mode, saving the changes\r\nNavigatorWidget.prototype.handleSaveTiddlerEvent = function(event) {\r\n\tvar title = event.param || event.tiddlerTitle,\r\n\t\ttiddler = this.wiki.getTiddler(title),\r\n\t\tstoryList = this.getStoryList();\r\n\t// Replace the original tiddler with the draft\r\n\tif(tiddler) {\r\n\t\tvar draftTitle = (tiddler.fields[\"draft.title\"] || \"\").trim(),\r\n\t\t\tdraftOf = (tiddler.fields[\"draft.of\"] || \"\").trim();\r\n\t\tif(draftTitle) {\r\n\t\t\tvar isRename = draftOf !== draftTitle,\r\n\t\t\t\tisConfirmed = true;\r\n\t\t\tif(isRename && this.wiki.tiddlerExists(draftTitle)) {\r\n\t\t\t\tisConfirmed = confirm($tw.language.getString(\r\n\t\t\t\t\t\"ConfirmOverwriteTiddler\",\r\n\t\t\t\t\t{variables:\r\n\t\t\t\t\t\t{title: draftTitle}\r\n\t\t\t\t\t}\r\n\t\t\t\t));\r\n\t\t\t}\r\n\t\t\tif(isConfirmed) {\r\n\t\t\t\t// Save the draft tiddler as the real tiddler\r\n\t\t\t\tthis.wiki.addTiddler(new $tw.Tiddler(this.wiki.getCreationFields(),tiddler,{\r\n\t\t\t\t\ttitle: draftTitle,\r\n\t\t\t\t\t\"draft.title\": undefined,\r\n\t\t\t\t\t\"draft.of\": undefined\r\n\t\t\t\t},this.wiki.getModificationFields()));\r\n\t\t\t\t// Remove the draft tiddler\r\n\t\t\t\tthis.wiki.deleteTiddler(title);\r\n\t\t\t\t// Remove the original tiddler if we're renaming it\r\n\t\t\t\tif(isRename) {\r\n\t\t\t\t\tthis.wiki.deleteTiddler(draftOf);\r\n\t\t\t\t}\r\n\t\t\t\t// Replace the draft in the story with the original\r\n\t\t\t\tthis.replaceFirstTitleInStory(storyList,title,draftTitle);\r\n\t\t\t\tthis.addToHistory(draftTitle,event.navigateFromClientRect);\r\n\t\t\t\tif(draftTitle !== this.storyTitle) {\r\n\t\t\t\t\tthis.saveStoryList(storyList);\r\n\t\t\t\t}\r\n\t\t\t\t// Trigger an autosave\r\n\t\t\t\t$tw.rootWidget.dispatchEvent({type: \"tm-auto-save-wiki\"});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn false;\r\n};\r\n\r\n// Take a tiddler out of edit mode without saving the changes\r\nNavigatorWidget.prototype.handleCancelTiddlerEvent = function(event) {\r\n\t// Flip the specified tiddler from draft back to the original\r\n\tvar draftTitle = event.param || event.tiddlerTitle,\r\n\t\tdraftTiddler = this.wiki.getTiddler(draftTitle),\r\n\t\toriginalTitle = draftTiddler && draftTiddler.fields[\"draft.of\"];\r\n\tif(draftTiddler && originalTitle) {\r\n\t\t// Ask for confirmation if the tiddler text has changed\r\n\t\tvar isConfirmed = true,\r\n\t\t\toriginalTiddler = this.wiki.getTiddler(originalTitle),\r\n\t\t\tstoryList = this.getStoryList();\r\n\t\tif(this.wiki.isDraftModified(draftTitle)) {\r\n\t\t\tisConfirmed = confirm($tw.language.getString(\r\n\t\t\t\t\"ConfirmCancelTiddler\",\r\n\t\t\t\t{variables:\r\n\t\t\t\t\t{title: draftTitle}\r\n\t\t\t\t}\r\n\t\t\t));\r\n\t\t}\r\n\t\t// Remove the draft tiddler\r\n\t\tif(isConfirmed) {\r\n\t\t\tthis.wiki.deleteTiddler(draftTitle);\r\n\t\t\tif(originalTiddler) {\r\n\t\t\t\tthis.replaceFirstTitleInStory(storyList,draftTitle,originalTitle);\r\n\t\t\t\tthis.addToHistory(originalTitle,event.navigateFromClientRect);\r\n\t\t\t} else {\r\n\t\t\t\tthis.removeTitleFromStory(storyList,draftTitle);\r\n\t\t\t}\r\n\t\t\tthis.saveStoryList(storyList);\r\n\t\t\t// Trigger an autosave\r\n\t\t\t$tw.rootWidget.dispatchEvent({type: \"tm-auto-save-wiki\"});\t\t\t\r\n\t\t}\r\n\t}\r\n\treturn false;\r\n};\r\n\r\n// Create a new draft tiddler\r\n// event.param can either be the title of a template tiddler, or a hashmap of fields.\r\n//\r\n// The title of the newly created tiddler follows these rules:\r\n// * If a hashmap was used and a title field was specified, use that title\r\n// * If a hashmap was used without a title field, use a default title, if necessary making it unique with a numeric suffix\r\n// * If a template tiddler was used, use the title of the template, if necessary making it unique with a numeric suffix\r\n//\r\n// If a draft of the target tiddler already exists then it is reused\r\nNavigatorWidget.prototype.handleNewTiddlerEvent = function(event) {\r\n\t// Get the story details\r\n\tvar storyList = this.getStoryList(),\r\n\t\ttemplateTiddler, additionalFields, title, draftTitle, existingTiddler;\r\n\t// Get the template tiddler (if any)\r\n\tif(typeof event.param === \"string\") {\r\n\t\t// Get the template tiddler\r\n\t\ttemplateTiddler = this.wiki.getTiddler(event.param);\r\n\t\t// Generate a new title\r\n\t\ttitle = this.wiki.generateNewTitle(event.param || $tw.language.getString(\"DefaultNewTiddlerTitle\"));\r\n\t}\r\n\t// Get the specified additional fields\r\n\tif(typeof event.paramObject === \"object\") {\r\n\t\tadditionalFields = event.paramObject;\r\n\t}\r\n\tif(typeof event.param === \"object\") { // Backwards compatibility with 5.1.3\r\n\t\tadditionalFields = event.param;\r\n\t}\r\n\tif(additionalFields && additionalFields.title) {\r\n\t\ttitle = additionalFields.title;\r\n\t}\r\n\t// Generate a title if we don't have one\r\n\ttitle = title || this.wiki.generateNewTitle($tw.language.getString(\"DefaultNewTiddlerTitle\"));\r\n\t// Find any existing draft for this tiddler\r\n\tdraftTitle = this.wiki.findDraft(title);\r\n\t// Pull in any existing tiddler\r\n\tif(draftTitle) {\r\n\t\texistingTiddler = this.wiki.getTiddler(draftTitle);\r\n\t} else {\r\n\t\tdraftTitle = this.generateDraftTitle(title);\r\n\t\texistingTiddler = this.wiki.getTiddler(title);\r\n\t}\r\n\t// Merge the tags\r\n\tvar mergedTags = [];\r\n\tif(existingTiddler && existingTiddler.fields.tags) {\r\n\t\t$tw.utils.pushTop(mergedTags,existingTiddler.fields.tags)\r\n\t}\r\n\tif(additionalFields && additionalFields.tags) {\r\n\t\t// Merge tags\r\n\t\tmergedTags = $tw.utils.pushTop(mergedTags,$tw.utils.parseStringArray(additionalFields.tags));\r\n\t}\r\n\tif(templateTiddler && templateTiddler.fields.tags) {\r\n\t\t// Merge tags\r\n\t\tmergedTags = $tw.utils.pushTop(mergedTags,templateTiddler.fields.tags);\r\n\t}\r\n\t// Save the draft tiddler\r\n\tvar draftTiddler = new $tw.Tiddler({\r\n\t\t\ttext: \"\",\r\n\t\t\t\"draft.title\": title\r\n\t\t},\r\n\t\ttemplateTiddler,\r\n\t\texistingTiddler,\r\n\t\tadditionalFields,\r\n\t\tthis.wiki.getCreationFields(),\r\n\t\t{\r\n\t\t\ttitle: draftTitle,\r\n\t\t\t\"draft.of\": title,\r\n\t\t\ttags: mergedTags\r\n\t\t},this.wiki.getModificationFields());\r\n\tthis.wiki.addTiddler(draftTiddler);\r\n\t// Update the story to insert the new draft at the top and remove any existing tiddler\r\n\tif(storyList.indexOf(draftTitle) === -1) {\r\n\t\tvar slot = storyList.indexOf(event.navigateFromTitle);\r\n\t\tstoryList.splice(slot + 1,0,draftTitle);\r\n\t}\r\n\tif(storyList.indexOf(title) !== -1) {\r\n\t\tstoryList.splice(storyList.indexOf(title),1);\t\t\r\n\t}\r\n\tthis.saveStoryList(storyList);\r\n\t// Add a new record to the top of the history stack\r\n\tthis.addToHistory(draftTitle);\r\n\treturn false;\r\n};\r\n\r\n// Import JSON tiddlers into a pending import tiddler\r\nNavigatorWidget.prototype.handleImportTiddlersEvent = function(event) {\r\n\tvar self = this;\r\n\t// Get the tiddlers\r\n\tvar tiddlers = [];\r\n\ttry {\r\n\t\ttiddlers = JSON.parse(event.param);\t\r\n\t} catch(e) {\r\n\t}\r\n\t// Get the current $:/Import tiddler\r\n\tvar importTiddler = this.wiki.getTiddler(IMPORT_TITLE),\r\n\t\timportData = this.wiki.getTiddlerData(IMPORT_TITLE,{}),\r\n\t\tnewFields = new Object({\r\n\t\t\ttitle: IMPORT_TITLE,\r\n\t\t\ttype: \"application/json\",\r\n\t\t\t\"plugin-type\": \"import\",\r\n\t\t\t\"status\": \"pending\"\r\n\t\t}),\r\n\t\tincomingTiddlers = [];\r\n\t// Process each tiddler\r\n\timportData.tiddlers = importData.tiddlers || {};\r\n\t$tw.utils.each(tiddlers,function(tiddlerFields) {\r\n\t\tvar title = tiddlerFields.title;\r\n\t\tif(title) {\r\n\t\t\tincomingTiddlers.push(title);\r\n\t\t\timportData.tiddlers[title] = tiddlerFields;\r\n\t\t}\r\n\t});\r\n\t// Give the active upgrader modules a chance to process the incoming tiddlers\r\n\tvar messages = this.wiki.invokeUpgraders(incomingTiddlers,importData.tiddlers);\r\n\t$tw.utils.each(messages,function(message,title) {\r\n\t\tnewFields[\"message-\" + title] = message;\r\n\t});\r\n\t// Deselect any suppressed tiddlers\r\n\t$tw.utils.each(importData.tiddlers,function(tiddler,title) {\r\n\t\tif($tw.utils.count(tiddler) === 0) {\r\n\t\t\tnewFields[\"selection-\" + title] = \"unchecked\";\r\n\t\t}\r\n\t});\r\n\t// Save the $:/Import tiddler\r\n\tnewFields.text = JSON.stringify(importData,null,$tw.config.preferences.jsonSpaces);\r\n\tthis.wiki.addTiddler(new $tw.Tiddler(importTiddler,newFields));\r\n\t// Update the story and history details\r\n\tif(this.getVariable(\"tv-auto-open-on-import\") !== \"no\") {\r\n\t\tvar storyList = this.getStoryList(),\r\n\t\t\thistory = [];\r\n\t\t// Add it to the story\r\n\t\tif(storyList.indexOf(IMPORT_TITLE) === -1) {\r\n\t\t\tstoryList.unshift(IMPORT_TITLE);\r\n\t\t}\r\n\t\t// And to history\r\n\t\thistory.push(IMPORT_TITLE);\r\n\t\t// Save the updated story and history\r\n\t\tthis.saveStoryList(storyList);\r\n\t\tthis.addToHistory(history);\t\t\r\n\t}\r\n\treturn false;\r\n};\r\n\r\n// \r\nNavigatorWidget.prototype.handlePerformImportEvent = function(event) {\r\n\tvar self = this,\r\n\t\timportTiddler = this.wiki.getTiddler(event.param),\r\n\t\timportData = this.wiki.getTiddlerData(event.param,{tiddlers: {}}),\r\n\t\timportReport = [];\r\n\t// Add the tiddlers to the store\r\n\timportReport.push(\"The following tiddlers were imported:\\n\");\r\n\t$tw.utils.each(importData.tiddlers,function(tiddlerFields) {\r\n\t\tvar title = tiddlerFields.title;\r\n\t\tif(title && importTiddler && importTiddler.fields[\"selection-\" + title] !== \"unchecked\") {\r\n\t\t\tself.wiki.addTiddler(new $tw.Tiddler(tiddlerFields));\r\n\t\t\timportReport.push(\"# [[\" + tiddlerFields.title + \"]]\");\r\n\t\t}\r\n\t});\r\n\t// Replace the $:/Import tiddler with an import report\r\n\tthis.wiki.addTiddler(new $tw.Tiddler({\r\n\t\ttitle: IMPORT_TITLE,\r\n\t\ttext: importReport.join(\"\\n\"),\r\n\t\t\"status\": \"complete\"\r\n\t}));\r\n\t// Navigate to the $:/Import tiddler\r\n\tthis.addToHistory([IMPORT_TITLE]);\r\n\t// Trigger an autosave\r\n\t$tw.rootWidget.dispatchEvent({type: \"tm-auto-save-wiki\"});\r\n};\r\n\r\nexports.navigator = NavigatorWidget;\r\n\r\n})();\r\n",
"title": "$:/core/modules/widgets/navigator.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/password.js": {
"text": "/*\\\r\ntitle: $:/core/modules/widgets/password.js\r\ntype: application/javascript\r\nmodule-type: widget\r\n\r\nPassword widget\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\r\n\r\nvar PasswordWidget = function(parseTreeNode,options) {\r\n\tthis.initialise(parseTreeNode,options);\r\n};\r\n\r\n/*\r\nInherit from the base widget class\r\n*/\r\nPasswordWidget.prototype = new Widget();\r\n\r\n/*\r\nRender this widget into the DOM\r\n*/\r\nPasswordWidget.prototype.render = function(parent,nextSibling) {\r\n\t// Save the parent dom node\r\n\tthis.parentDomNode = parent;\r\n\t// Compute our attributes\r\n\tthis.computeAttributes();\r\n\t// Execute our logic\r\n\tthis.execute();\r\n\t// Get the current password\r\n\tvar password = $tw.browser ? $tw.utils.getPassword(this.passwordName) || \"\" : \"\";\r\n\t// Create our element\r\n\tvar domNode = this.document.createElement(\"input\");\r\n\tdomNode.setAttribute(\"type\",\"password\");\r\n\tdomNode.setAttribute(\"value\",password);\r\n\t// Add a click event handler\r\n\t$tw.utils.addEventListeners(domNode,[\r\n\t\t{name: \"change\", handlerObject: this, handlerMethod: \"handleChangeEvent\"}\r\n\t]);\r\n\t// Insert the label into the DOM and render any children\r\n\tparent.insertBefore(domNode,nextSibling);\r\n\tthis.renderChildren(domNode,null);\r\n\tthis.domNodes.push(domNode);\r\n};\r\n\r\nPasswordWidget.prototype.handleChangeEvent = function(event) {\r\n\tvar password = this.domNodes[0].value;\r\n\treturn $tw.utils.savePassword(this.passwordName,password);\r\n};\r\n\r\n/*\r\nCompute the internal state of the widget\r\n*/\r\nPasswordWidget.prototype.execute = function() {\r\n\t// Get the parameters from the attributes\r\n\tthis.passwordName = this.getAttribute(\"name\",\"\");\r\n\t// Make the child widgets\r\n\tthis.makeChildWidgets();\r\n};\r\n\r\n/*\r\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\r\n*/\r\nPasswordWidget.prototype.refresh = function(changedTiddlers) {\r\n\tvar changedAttributes = this.computeAttributes();\r\n\tif(changedAttributes.name) {\r\n\t\tthis.refreshSelf();\r\n\t\treturn true;\r\n\t} else {\r\n\t\treturn this.refreshChildren(changedTiddlers);\r\n\t}\r\n};\r\n\r\nexports.password = PasswordWidget;\r\n\r\n})();\r\n",
"title": "$:/core/modules/widgets/password.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/radio.js": {
"text": "/*\\\r\ntitle: $:/core/modules/widgets/radio.js\r\ntype: application/javascript\r\nmodule-type: widget\r\n\r\nRadio widget\r\n\r\nWill set a field to the selected value:\r\n\r\n```\r\n\t<$radio field=\"myfield\" value=\"check 1\">one</$radio>\r\n\t<$radio field=\"myfield\" value=\"check 2\">two</$radio>\r\n\t<$radio field=\"myfield\" value=\"check 3\">three</$radio>\r\n```\r\n\r\n|Parameter |Description |h\r\n|tiddler |Name of the tiddler in which the field should be set. Defaults to current tiddler |\r\n|field |The name of the field to be set |\r\n|value |The value to set |\r\n|class |Optional class name(s) |\r\n\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\r\n\r\nvar RadioWidget = function(parseTreeNode,options) {\r\n\tthis.initialise(parseTreeNode,options);\r\n};\r\n\r\n/*\r\nInherit from the base widget class\r\n*/\r\nRadioWidget.prototype = new Widget();\r\n\r\n/*\r\nRender this widget into the DOM\r\n*/\r\nRadioWidget.prototype.render = function(parent,nextSibling) {\r\n\t// Save the parent dom node\r\n\tthis.parentDomNode = parent;\r\n\t// Compute our attributes\r\n\tthis.computeAttributes();\r\n\t// Execute our logic\r\n\tthis.execute();\r\n\t// Create our elements\r\n\tthis.labelDomNode = this.document.createElement(\"label\");\r\n\tthis.labelDomNode.setAttribute(\"class\",this.radioClass);\r\n\tthis.inputDomNode = this.document.createElement(\"input\");\r\n\tthis.inputDomNode.setAttribute(\"type\",\"radio\");\r\n\tif(this.getValue() == this.radioValue) {\r\n\t\tthis.inputDomNode.setAttribute(\"checked\",\"true\");\r\n\t}\r\n\tthis.labelDomNode.appendChild(this.inputDomNode);\r\n\tthis.spanDomNode = this.document.createElement(\"span\");\r\n\tthis.labelDomNode.appendChild(this.spanDomNode);\r\n\t// Add a click event handler\r\n\t$tw.utils.addEventListeners(this.inputDomNode,[\r\n\t\t{name: \"change\", handlerObject: this, handlerMethod: \"handleChangeEvent\"}\r\n\t]);\r\n\t// Insert the label into the DOM and render any children\r\n\tparent.insertBefore(this.labelDomNode,nextSibling);\r\n\tthis.renderChildren(this.spanDomNode,null);\r\n\tthis.domNodes.push(this.labelDomNode);\r\n};\r\n\r\nRadioWidget.prototype.getValue = function() {\r\n\tvar tiddler = this.wiki.getTiddler(this.radioTitle);\r\n\treturn tiddler && tiddler.getFieldString(this.radioField);\r\n};\r\n\r\nRadioWidget.prototype.setValue = function() {\r\n\tif(this.radioField) {\r\n\t\tvar tiddler = this.wiki.getTiddler(this.radioTitle),\r\n\t\t\taddition = {};\r\n\t\taddition[this.radioField] = this.radioValue;\r\n\t\tthis.wiki.addTiddler(new $tw.Tiddler({title: this.radioTitle},tiddler,addition,this.wiki.getModificationFields()));\r\n\t}\r\n};\r\n\r\nRadioWidget.prototype.handleChangeEvent = function(event) {\r\n\tif(this.inputDomNode.checked) {\r\n\t\tthis.setValue();\r\n\t}\r\n};\r\n\r\n/*\r\nCompute the internal state of the widget\r\n*/\r\nRadioWidget.prototype.execute = function() {\r\n\t// Get the parameters from the attributes\r\n\tthis.radioTitle = this.getAttribute(\"tiddler\",this.getVariable(\"currentTiddler\"));\r\n\tthis.radioField = this.getAttribute(\"field\",\"text\");\r\n\tthis.radioValue = this.getAttribute(\"value\");\r\n\tthis.radioClass = this.getAttribute(\"class\",\"\");\r\n\tif(this.radioClass !== \"\") {\r\n\t\tthis.radioClass += \" \";\r\n\t}\r\n\tthis.radioClass += \"tc-radio\";\r\n\t// Make the child widgets\r\n\tthis.makeChildWidgets();\r\n};\r\n\r\n/*\r\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\r\n*/\r\nRadioWidget.prototype.refresh = function(changedTiddlers) {\r\n\tvar changedAttributes = this.computeAttributes();\r\n\tif(changedAttributes.tiddler || changedAttributes.field || changedAttributes.value || changedAttributes[\"class\"]) {\r\n\t\tthis.refreshSelf();\r\n\t\treturn true;\r\n\t} else {\r\n\t\tvar refreshed = false;\r\n\t\tif(changedTiddlers[this.radioTitle]) {\r\n\t\t\tthis.inputDomNode.checked = this.getValue() === this.radioValue;\r\n\t\t\trefreshed = true;\r\n\t\t}\r\n\t\treturn this.refreshChildren(changedTiddlers) || refreshed;\r\n\t}\r\n};\r\n\r\nexports.radio = RadioWidget;\r\n\r\n})();\r\n",
"title": "$:/core/modules/widgets/radio.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/raw.js": {
"text": "/*\\\r\ntitle: $:/core/modules/widgets/raw.js\r\ntype: application/javascript\r\nmodule-type: widget\r\n\r\nRaw widget\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\r\n\r\nvar RawWidget = function(parseTreeNode,options) {\r\n\tthis.initialise(parseTreeNode,options);\r\n};\r\n\r\n/*\r\nInherit from the base widget class\r\n*/\r\nRawWidget.prototype = new Widget();\r\n\r\n/*\r\nRender this widget into the DOM\r\n*/\r\nRawWidget.prototype.render = function(parent,nextSibling) {\r\n\tthis.parentDomNode = parent;\r\n\tthis.execute();\r\n\tvar div = this.document.createElement(\"div\");\r\n\tdiv.innerHTML=this.parseTreeNode.html;\r\n\tparent.insertBefore(div,nextSibling);\r\n\tthis.domNodes.push(div);\t\r\n};\r\n\r\n/*\r\nCompute the internal state of the widget\r\n*/\r\nRawWidget.prototype.execute = function() {\r\n};\r\n\r\n/*\r\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\r\n*/\r\nRawWidget.prototype.refresh = function(changedTiddlers) {\r\n\treturn false;\r\n};\r\n\r\nexports.raw = RawWidget;\r\n\r\n})();\r\n",
"title": "$:/core/modules/widgets/raw.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/reveal.js": {
"text": "/*\\\r\ntitle: $:/core/modules/widgets/reveal.js\r\ntype: application/javascript\r\nmodule-type: widget\r\n\r\nReveal widget\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\r\n\r\nvar RevealWidget = function(parseTreeNode,options) {\r\n\tthis.initialise(parseTreeNode,options);\r\n};\r\n\r\n/*\r\nInherit from the base widget class\r\n*/\r\nRevealWidget.prototype = new Widget();\r\n\r\n/*\r\nRender this widget into the DOM\r\n*/\r\nRevealWidget.prototype.render = function(parent,nextSibling) {\r\n\tthis.parentDomNode = parent;\r\n\tthis.computeAttributes();\r\n\tthis.execute();\r\n\tvar domNode = this.document.createElement(this.parseTreeNode.isBlock ? \"div\" : \"span\");\r\n\tvar classes = this[\"class\"].split(\" \") || [];\r\n\tclasses.push(\"tc-reveal\");\r\n\tdomNode.className = classes.join(\" \");\r\n\tparent.insertBefore(domNode,nextSibling);\r\n\tthis.renderChildren(domNode,null);\r\n\tif(!domNode.isTiddlyWikiFakeDom && this.type === \"popup\" && this.isOpen) {\r\n\t\tthis.positionPopup(domNode);\r\n\t\t$tw.utils.addClass(domNode,\"tc-popup\"); // Make sure that clicks don't dismiss popups within the revealed content\r\n\t}\r\n\tif(!this.isOpen) {\r\n\t\tdomNode.setAttribute(\"hidden\",\"true\");\r\n\t}\r\n\tthis.domNodes.push(domNode);\r\n};\r\n\r\nRevealWidget.prototype.positionPopup = function(domNode) {\r\n\tdomNode.style.position = \"absolute\";\r\n\tdomNode.style.zIndex = \"1000\";\r\n\tswitch(this.position) {\r\n\t\tcase \"left\":\r\n\t\t\tdomNode.style.left = (this.popup.left - domNode.offsetWidth) + \"px\";\r\n\t\t\tdomNode.style.top = this.popup.top + \"px\";\r\n\t\t\tbreak;\r\n\t\tcase \"above\":\r\n\t\t\tdomNode.style.left = this.popup.left + \"px\";\r\n\t\t\tdomNode.style.top = (this.popup.top - domNode.offsetHeight) + \"px\";\r\n\t\t\tbreak;\r\n\t\tcase \"aboveright\":\r\n\t\t\tdomNode.style.left = (this.popup.left + this.popup.width) + \"px\";\r\n\t\t\tdomNode.style.top = (this.popup.top + this.popup.height - domNode.offsetHeight) + \"px\";\r\n\t\t\tbreak;\r\n\t\tcase \"right\":\r\n\t\t\tdomNode.style.left = (this.popup.left + this.popup.width) + \"px\";\r\n\t\t\tdomNode.style.top = this.popup.top + \"px\";\r\n\t\t\tbreak;\r\n\t\tcase \"belowleft\":\r\n\t\t\tdomNode.style.left = (this.popup.left + this.popup.width - domNode.offsetWidth) + \"px\";\r\n\t\t\tdomNode.style.top = (this.popup.top + this.popup.height) + \"px\";\r\n\t\t\tbreak;\r\n\t\tdefault: // Below\r\n\t\t\tdomNode.style.left = this.popup.left + \"px\";\r\n\t\t\tdomNode.style.top = (this.popup.top + this.popup.height) + \"px\";\r\n\t\t\tbreak;\r\n\t}\r\n};\r\n\r\n/*\r\nCompute the internal state of the widget\r\n*/\r\nRevealWidget.prototype.execute = function() {\r\n\t// Get our parameters\r\n\tthis.state = this.getAttribute(\"state\");\r\n\tthis.type = this.getAttribute(\"type\");\r\n\tthis.text = this.getAttribute(\"text\");\r\n\tthis.position = this.getAttribute(\"position\");\r\n\tthis[\"class\"] = this.getAttribute(\"class\",\"\");\r\n\tthis[\"default\"] = this.getAttribute(\"default\",\"\");\r\n\tthis.animate = this.getAttribute(\"animate\",\"no\");\r\n\tthis.retain = this.getAttribute(\"retain\",\"no\");\r\n\tthis.openAnimation = this.animate === \"no\" ? undefined : \"open\";\r\n\tthis.closeAnimation = this.animate === \"no\" ? undefined : \"close\";\r\n\t// Compute the title of the state tiddler and read it\r\n\tthis.stateTitle = this.state;\r\n\tthis.readState();\r\n\t// Construct the child widgets\r\n\tvar childNodes = this.isOpen ? this.parseTreeNode.children : [];\r\n\tthis.hasChildNodes = this.isOpen;\r\n\tthis.makeChildWidgets(childNodes);\r\n};\r\n\r\n/*\r\nRead the state tiddler\r\n*/\r\nRevealWidget.prototype.readState = function() {\r\n\t// Read the information from the state tiddler\r\n\tvar state = this.stateTitle ? this.wiki.getTextReference(this.stateTitle,this[\"default\"],this.getVariable(\"currentTiddler\")) : this[\"default\"];\r\n\tswitch(this.type) {\r\n\t\tcase \"popup\":\r\n\t\t\tthis.readPopupState(state);\r\n\t\t\tbreak;\r\n\t\tcase \"match\":\r\n\t\t\tthis.readMatchState(state);\r\n\t\t\tbreak;\r\n\t\tcase \"nomatch\":\r\n\t\t\tthis.readMatchState(state);\r\n\t\t\tthis.isOpen = !this.isOpen;\r\n\t\t\tbreak;\r\n\t}\r\n};\r\n\r\nRevealWidget.prototype.readMatchState = function(state) {\r\n\tthis.isOpen = state === this.text;\r\n};\r\n\r\nRevealWidget.prototype.readPopupState = function(state) {\r\n\tvar popupLocationRegExp = /^\\((-?[0-9\\.E]+),(-?[0-9\\.E]+),(-?[0-9\\.E]+),(-?[0-9\\.E]+)\\)$/,\r\n\t\tmatch = popupLocationRegExp.exec(state);\r\n\t// Check if the state matches the location regexp\r\n\tif(match) {\r\n\t\t// If so, we're open\r\n\t\tthis.isOpen = true;\r\n\t\t// Get the location\r\n\t\tthis.popup = {\r\n\t\t\tleft: parseFloat(match[1]),\r\n\t\t\ttop: parseFloat(match[2]),\r\n\t\t\twidth: parseFloat(match[3]),\r\n\t\t\theight: parseFloat(match[4])\r\n\t\t};\r\n\t} else {\r\n\t\t// If not, we're closed\r\n\t\tthis.isOpen = false;\r\n\t}\r\n};\r\n\r\n/*\r\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\r\n*/\r\nRevealWidget.prototype.refresh = function(changedTiddlers) {\r\n\tvar changedAttributes = this.computeAttributes();\r\n\tif(changedAttributes.state || changedAttributes.type || changedAttributes.text || changedAttributes.position || changedAttributes[\"default\"] || changedAttributes.animate) {\r\n\t\tthis.refreshSelf();\r\n\t\treturn true;\r\n\t} else {\r\n\t\tvar refreshed = false,\r\n\t\t\tcurrentlyOpen = this.isOpen;\r\n\t\tthis.readState();\r\n\t\tif(this.isOpen !== currentlyOpen) {\r\n\t\t\tif(this.retain === \"yes\") {\r\n\t\t\t\tthis.updateState();\r\n\t\t\t} else {\r\n\t\t\t\tthis.refreshSelf();\r\n\t\t\t\trefreshed = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn this.refreshChildren(changedTiddlers) || refreshed;\r\n\t}\r\n};\r\n\r\n/*\r\nCalled by refresh() to dynamically show or hide the content\r\n*/\r\nRevealWidget.prototype.updateState = function() {\r\n\t// Read the current state\r\n\tthis.readState();\r\n\t// Construct the child nodes if needed\r\n\tvar domNode = this.domNodes[0];\r\n\tif(this.isOpen && !this.hasChildNodes) {\r\n\t\tthis.hasChildNodes = true;\r\n\t\tthis.makeChildWidgets(this.parseTreeNode.children);\r\n\t\tthis.renderChildren(domNode,null);\r\n\t}\r\n\t// Animate our DOM node\r\n\tif(!domNode.isTiddlyWikiFakeDom && this.type === \"popup\" && this.isOpen) {\r\n\t\tthis.positionPopup(domNode);\r\n\t\t$tw.utils.addClass(domNode,\"tc-popup\"); // Make sure that clicks don't dismiss popups within the revealed content\r\n\r\n\t}\r\n\tif(this.isOpen) {\r\n\t\tdomNode.removeAttribute(\"hidden\");\r\n $tw.anim.perform(this.openAnimation,domNode);\r\n\t} else {\r\n\t\t$tw.anim.perform(this.closeAnimation,domNode,{callback: function() {\r\n\t\t\tdomNode.setAttribute(\"hidden\",\"true\");\r\n }});\r\n\t}\r\n};\r\n\r\nexports.reveal = RevealWidget;\r\n\r\n})();\r\n",
"title": "$:/core/modules/widgets/reveal.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/scrollable.js": {
"text": "/*\\\r\ntitle: $:/core/modules/widgets/scrollable.js\r\ntype: application/javascript\r\nmodule-type: widget\r\n\r\nScrollable widget\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\r\n\r\nvar ScrollableWidget = function(parseTreeNode,options) {\r\n\tthis.initialise(parseTreeNode,options);\r\n\tthis.scaleFactor = 1;\r\n\tthis.addEventListeners([\r\n\t\t{type: \"tm-scroll\", handler: \"handleScrollEvent\"}\r\n\t]);\r\n\tif($tw.browser) {\r\n\t\tthis.requestAnimationFrame = window.requestAnimationFrame ||\r\n\t\t\twindow.webkitRequestAnimationFrame ||\r\n\t\t\twindow.mozRequestAnimationFrame ||\r\n\t\t\tfunction(callback) {\r\n\t\t\t\treturn window.setTimeout(callback, 1000/60);\r\n\t\t\t};\r\n\t\tthis.cancelAnimationFrame = window.cancelAnimationFrame ||\r\n\t\t\twindow.webkitCancelAnimationFrame ||\r\n\t\t\twindow.webkitCancelRequestAnimationFrame ||\r\n\t\t\twindow.mozCancelAnimationFrame ||\r\n\t\t\twindow.mozCancelRequestAnimationFrame ||\r\n\t\t\tfunction(id) {\r\n\t\t\t\twindow.clearTimeout(id);\r\n\t\t\t};\r\n\t}\r\n};\r\n\r\n/*\r\nInherit from the base widget class\r\n*/\r\nScrollableWidget.prototype = new Widget();\r\n\r\nScrollableWidget.prototype.cancelScroll = function() {\r\n\tif(this.idRequestFrame) {\r\n\t\tthis.cancelAnimationFrame.call(window,this.idRequestFrame);\r\n\t\tthis.idRequestFrame = null;\r\n\t}\r\n};\r\n\r\n/*\r\nHandle a scroll event\r\n*/\r\nScrollableWidget.prototype.handleScrollEvent = function(event) {\r\n\t// Pass the scroll event through if our offsetsize is larger than our scrollsize\r\n\tif(this.outerDomNode.scrollWidth <= this.outerDomNode.offsetWidth && this.outerDomNode.scrollHeight <= this.outerDomNode.offsetHeight && this.fallthrough === \"yes\") {\r\n\t\treturn true;\r\n\t}\r\n\tthis.scrollIntoView(event.target);\r\n\treturn false; // Handled event\r\n};\r\n\r\n/*\r\nScroll an element into view\r\n*/\r\nScrollableWidget.prototype.scrollIntoView = function(element) {\r\n\tvar duration = $tw.utils.getAnimationDuration();\r\n\tthis.cancelScroll();\r\n\tthis.startTime = Date.now();\r\n\tvar scrollPosition = {\r\n\t\tx: this.outerDomNode.scrollLeft,\r\n\t\ty: this.outerDomNode.scrollTop\r\n\t};\r\n\t// Get the client bounds of the element and adjust by the scroll position\r\n\tvar scrollableBounds = this.outerDomNode.getBoundingClientRect(),\r\n\t\tclientTargetBounds = element.getBoundingClientRect(),\r\n\t\tbounds = {\r\n\t\t\tleft: clientTargetBounds.left + scrollPosition.x - scrollableBounds.left,\r\n\t\t\ttop: clientTargetBounds.top + scrollPosition.y - scrollableBounds.top,\r\n\t\t\twidth: clientTargetBounds.width,\r\n\t\t\theight: clientTargetBounds.height\r\n\t\t};\r\n\t// We'll consider the horizontal and vertical scroll directions separately via this function\r\n\tvar getEndPos = function(targetPos,targetSize,currentPos,currentSize) {\r\n\t\t\t// If the target is already visible then stay where we are\r\n\t\t\tif(targetPos >= currentPos && (targetPos + targetSize) <= (currentPos + currentSize)) {\r\n\t\t\t\treturn currentPos;\r\n\t\t\t// If the target is above/left of the current view, then scroll to its top/left\r\n\t\t\t} else if(targetPos <= currentPos) {\r\n\t\t\t\treturn targetPos;\r\n\t\t\t// If the target is smaller than the window and the scroll position is too far up, then scroll till the target is at the bottom of the window\r\n\t\t\t} else if(targetSize < currentSize && currentPos < (targetPos + targetSize - currentSize)) {\r\n\t\t\t\treturn targetPos + targetSize - currentSize;\r\n\t\t\t// If the target is big, then just scroll to the top\r\n\t\t\t} else if(currentPos < targetPos) {\r\n\t\t\t\treturn targetPos;\r\n\t\t\t// Otherwise, stay where we are\r\n\t\t\t} else {\r\n\t\t\t\treturn currentPos;\r\n\t\t\t}\r\n\t\t},\r\n\t\tendX = getEndPos(bounds.left,bounds.width,scrollPosition.x,this.outerDomNode.offsetWidth),\r\n\t\tendY = getEndPos(bounds.top,bounds.height,scrollPosition.y,this.outerDomNode.offsetHeight);\r\n\t// Only scroll if necessary\r\n\tif(endX !== scrollPosition.x || endY !== scrollPosition.y) {\r\n\t\tvar self = this,\r\n\t\t\tdrawFrame;\r\n\t\tdrawFrame = function () {\r\n\t\t\tvar t;\r\n\t\t\tif(duration <= 0) {\r\n\t\t\t\tt = 1;\r\n\t\t\t} else {\r\n\t\t\t\tt = ((Date.now()) - self.startTime) / duration;\t\r\n\t\t\t}\r\n\t\t\tif(t >= 1) {\r\n\t\t\t\tself.cancelScroll();\r\n\t\t\t\tt = 1;\r\n\t\t\t}\r\n\t\t\tt = $tw.utils.slowInSlowOut(t);\r\n\t\t\tself.outerDomNode.scrollLeft = scrollPosition.x + (endX - scrollPosition.x) * t;\r\n\t\t\tself.outerDomNode.scrollTop = scrollPosition.y + (endY - scrollPosition.y) * t;\r\n\t\t\tif(t < 1) {\r\n\t\t\t\tself.idRequestFrame = self.requestAnimationFrame.call(window,drawFrame);\r\n\t\t\t}\r\n\t\t};\r\n\t\tdrawFrame();\r\n\t}\r\n};\r\n\r\n/*\r\nRender this widget into the DOM\r\n*/\r\nScrollableWidget.prototype.render = function(parent,nextSibling) {\r\n\tvar self = this;\r\n\t// Remember parent\r\n\tthis.parentDomNode = parent;\r\n\t// Compute attributes and execute state\r\n\tthis.computeAttributes();\r\n\tthis.execute();\r\n\t// Create elements\r\n\tthis.outerDomNode = this.document.createElement(\"div\");\r\n\t$tw.utils.setStyle(this.outerDomNode,[\r\n\t\t{overflowY: \"auto\"},\r\n\t\t{overflowX: \"auto\"},\r\n\t\t{webkitOverflowScrolling: \"touch\"}\r\n\t]);\r\n\tthis.innerDomNode = this.document.createElement(\"div\");\r\n\tthis.outerDomNode.appendChild(this.innerDomNode);\r\n\t// Assign classes\r\n\tthis.outerDomNode.className = this[\"class\"] || \"\";\r\n\t// Insert element\r\n\tparent.insertBefore(this.outerDomNode,nextSibling);\r\n\tthis.renderChildren(this.innerDomNode,null);\r\n\tthis.domNodes.push(this.outerDomNode);\r\n};\r\n\r\n/*\r\nCompute the internal state of the widget\r\n*/\r\nScrollableWidget.prototype.execute = function() {\r\n\t// Get attributes\r\n\tthis.fallthrough = this.getAttribute(\"fallthrough\",\"yes\");\r\n\tthis[\"class\"] = this.getAttribute(\"class\");\r\n\t// Make child widgets\r\n\tthis.makeChildWidgets();\r\n};\r\n\r\n/*\r\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\r\n*/\r\nScrollableWidget.prototype.refresh = function(changedTiddlers) {\r\n\tvar changedAttributes = this.computeAttributes();\r\n\tif(changedAttributes[\"class\"]) {\r\n\t\tthis.refreshSelf();\r\n\t\treturn true;\r\n\t}\r\n\treturn this.refreshChildren(changedTiddlers);\r\n};\r\n\r\nexports.scrollable = ScrollableWidget;\r\n\r\n})();\r\n",
"title": "$:/core/modules/widgets/scrollable.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/select.js": {
"text": "/*\\\r\ntitle: $:/core/modules/widgets/select.js\r\ntype: application/javascript\r\nmodule-type: widget\r\n\r\nSelect widget:\r\n\r\n```\r\n<$select tiddler=\"MyTiddler\" field=\"text\">\r\n<$list filter=\"[tag[chapter]]\">\r\n<option value=<<currentTiddler>>>\r\n<$view field=\"description\"/>\r\n</option>\r\n</$list>\r\n</$select>\r\n```\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\r\n\r\nvar SelectWidget = function(parseTreeNode,options) {\r\n\tthis.initialise(parseTreeNode,options);\r\n};\r\n\r\n/*\r\nInherit from the base widget class\r\n*/\r\nSelectWidget.prototype = new Widget();\r\n\r\n/*\r\nRender this widget into the DOM\r\n*/\r\nSelectWidget.prototype.render = function(parent,nextSibling) {\r\n\tthis.parentDomNode = parent;\r\n\tthis.computeAttributes();\r\n\tthis.execute();\r\n\tthis.renderChildren(parent,nextSibling);\r\n\tthis.setSelectValue();\r\n\t$tw.utils.addEventListeners(this.getSelectDomNode(),[\r\n\t\t{name: \"change\", handlerObject: this, handlerMethod: \"handleChangeEvent\"}\r\n\t]);\r\n};\r\n\r\n/*\r\nHandle a change event\r\n*/\r\nSelectWidget.prototype.handleChangeEvent = function(event) {\r\n\tvar value = this.getSelectDomNode().value;\r\n\tthis.wiki.setText(this.selectTitle,this.selectField,this.selectIndex,value);\r\n};\r\n\r\n/*\r\nIf necessary, set the value of the select element to the current value\r\n*/\r\nSelectWidget.prototype.setSelectValue = function() {\r\n\tvar value = this.selectDefault;\r\n\t// Get the value\r\n\tif(this.selectIndex) {\r\n\t\tvalue = this.wiki.extractTiddlerDataItem(this.selectTitle,this.selectIndex);\r\n\t} else {\r\n\t\tvar tiddler = this.wiki.getTiddler(this.selectTitle);\r\n\t\tif(tiddler) {\r\n\t\t\tif(this.selectField === \"text\") {\r\n\t\t\t\t// Calling getTiddlerText() triggers lazy loading of skinny tiddlers\r\n\t\t\t\tvalue = this.wiki.getTiddlerText(this.selectTitle);\r\n\t\t\t} else {\r\n\t\t\t\tif($tw.utils.hop(tiddler.fields,this.selectField)) {\r\n\t\t\t\t\tvalue = tiddler.getFieldString(this.selectField);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif(this.selectField === \"title\") {\r\n\t\t\t\tvalue = this.selectTitle;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t// Assign it to the select element if it's different than the current value\r\n\tvar domNode = this.getSelectDomNode();\r\n\tif(domNode.value !== value) {\r\n\t\tdomNode.value = value;\r\n\t}\r\n};\r\n\r\n/*\r\nGet the DOM node of the select element\r\n*/\r\nSelectWidget.prototype.getSelectDomNode = function() {\r\n\treturn this.children[0].domNodes[0];\r\n};\r\n\r\n/*\r\nCompute the internal state of the widget\r\n*/\r\nSelectWidget.prototype.execute = function() {\r\n\t// Get our parameters\r\n\tthis.selectTitle = this.getAttribute(\"tiddler\",this.getVariable(\"currentTiddler\"));\r\n\tthis.selectField = this.getAttribute(\"field\",\"text\");\r\n\tthis.selectIndex = this.getAttribute(\"index\");\r\n\tthis.selectClass = this.getAttribute(\"class\");\r\n\tthis.selectDefault = this.getAttribute(\"default\");\r\n\t// Make the child widgets\r\n\tvar selectNode = {\r\n\t\ttype: \"element\",\r\n\t\ttag: \"select\",\r\n\t\tchildren: this.parseTreeNode.children\r\n\t};\r\n\tif(this.selectClass) {\r\n\t\t$tw.utils.addAttributeToParseTreeNode(selectNode,\"class\",this.selectClass);\r\n\t}\r\n\tthis.makeChildWidgets([selectNode]);\r\n};\r\n\r\n/*\r\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\r\n*/\r\nSelectWidget.prototype.refresh = function(changedTiddlers) {\r\n\tvar changedAttributes = this.computeAttributes();\r\n\t// If we're using a different tiddler/field/index then completely refresh ourselves\r\n\tif(changedAttributes.selectTitle || changedAttributes.selectField || changedAttributes.selectIndex) {\r\n\t\tthis.refreshSelf();\r\n\t\treturn true;\r\n\t// If the target tiddler value has changed, just update setting and refresh the children\r\n\t} else {\r\n\t\tif(changedTiddlers[this.selectTitle]) {\r\n\t\t\tthis.setSelectValue();\r\n\t\t} \r\n\t\treturn this.refreshChildren(changedTiddlers);\t\t\r\n\t}\r\n};\r\n\r\nexports.select = SelectWidget;\r\n\r\n})();\r\n",
"title": "$:/core/modules/widgets/select.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/set.js": {
"text": "/*\\\r\ntitle: $:/core/modules/widgets/set.js\r\ntype: application/javascript\r\nmodule-type: widget\r\n\r\nSet variable widget\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\r\n\r\nvar SetWidget = function(parseTreeNode,options) {\r\n\tthis.initialise(parseTreeNode,options);\r\n};\r\n\r\n/*\r\nInherit from the base widget class\r\n*/\r\nSetWidget.prototype = new Widget();\r\n\r\n/*\r\nRender this widget into the DOM\r\n*/\r\nSetWidget.prototype.render = function(parent,nextSibling) {\r\n\tthis.parentDomNode = parent;\r\n\tthis.computeAttributes();\r\n\tthis.execute();\r\n\tthis.renderChildren(parent,nextSibling);\r\n};\r\n\r\n/*\r\nCompute the internal state of the widget\r\n*/\r\nSetWidget.prototype.execute = function() {\r\n\t// Get our parameters\r\n\tthis.setName = this.getAttribute(\"name\",\"currentTiddler\");\r\n\tthis.setFilter = this.getAttribute(\"filter\");\r\n\tthis.setValue = this.getAttribute(\"value\");\r\n\tthis.setEmptyValue = this.getAttribute(\"emptyValue\");\r\n\t// Set context variable\r\n\tvar value = this.setValue;\r\n\tif(this.setFilter) {\r\n\t\tvar results = this.wiki.filterTiddlers(this.setFilter,this);\r\n\t\tif(!this.setValue) {\r\n\t\t\tvalue = $tw.utils.stringifyList(results);\r\n\t\t}\r\n\t\tif(results.length === 0 && this.setEmptyValue !== undefined) {\r\n\t\t\tvalue = this.setEmptyValue;\r\n\t\t}\r\n\t}\r\n\tthis.setVariable(this.setName,value,this.parseTreeNode.params);\r\n\t// Construct the child widgets\r\n\tthis.makeChildWidgets();\r\n};\r\n\r\n/*\r\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\r\n*/\r\nSetWidget.prototype.refresh = function(changedTiddlers) {\r\n\tvar changedAttributes = this.computeAttributes();\r\n\tif(changedAttributes.name || changedAttributes.filter || changedAttributes.value || changedAttributes.emptyValue) {\r\n\t\tthis.refreshSelf();\r\n\t\treturn true;\r\n\t} else {\r\n\t\treturn this.refreshChildren(changedTiddlers);\t\t\r\n\t}\r\n};\r\n\r\nexports.setvariable = SetWidget;\r\nexports.set = SetWidget;\r\n\r\n})();\r\n",
"title": "$:/core/modules/widgets/set.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/text.js": {
"text": "/*\\\r\ntitle: $:/core/modules/widgets/text.js\r\ntype: application/javascript\r\nmodule-type: widget\r\n\r\nText node widget\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\r\n\r\nvar TextNodeWidget = function(parseTreeNode,options) {\r\n\tthis.initialise(parseTreeNode,options);\r\n};\r\n\r\n/*\r\nInherit from the base widget class\r\n*/\r\nTextNodeWidget.prototype = new Widget();\r\n\r\n/*\r\nRender this widget into the DOM\r\n*/\r\nTextNodeWidget.prototype.render = function(parent,nextSibling) {\r\n\tthis.parentDomNode = parent;\r\n\tthis.computeAttributes();\r\n\tthis.execute();\r\n\tvar text = this.getAttribute(\"text\",this.parseTreeNode.text || \"\");\r\n\ttext = text.replace(/\\r/mg,\"\");\r\n\tvar textNode = this.document.createTextNode(text);\r\n\tparent.insertBefore(textNode,nextSibling);\r\n\tthis.domNodes.push(textNode);\r\n};\r\n\r\n/*\r\nCompute the internal state of the widget\r\n*/\r\nTextNodeWidget.prototype.execute = function() {\r\n\t// Nothing to do for a text node\r\n};\r\n\r\n/*\r\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\r\n*/\r\nTextNodeWidget.prototype.refresh = function(changedTiddlers) {\r\n\tvar changedAttributes = this.computeAttributes();\r\n\tif(changedAttributes.text) {\r\n\t\tthis.refreshSelf();\r\n\t\treturn true;\r\n\t} else {\r\n\t\treturn false;\t\r\n\t}\r\n};\r\n\r\nexports.text = TextNodeWidget;\r\n\r\n})();\r\n",
"title": "$:/core/modules/widgets/text.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/tiddler.js": {
"text": "/*\\\r\ntitle: $:/core/modules/widgets/tiddler.js\r\ntype: application/javascript\r\nmodule-type: widget\r\n\r\nTiddler widget\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\r\n\r\nvar TiddlerWidget = function(parseTreeNode,options) {\r\n\tthis.initialise(parseTreeNode,options);\r\n};\r\n\r\n/*\r\nInherit from the base widget class\r\n*/\r\nTiddlerWidget.prototype = new Widget();\r\n\r\n/*\r\nRender this widget into the DOM\r\n*/\r\nTiddlerWidget.prototype.render = function(parent,nextSibling) {\r\n\tthis.parentDomNode = parent;\r\n\tthis.computeAttributes();\r\n\tthis.execute();\r\n\tthis.renderChildren(parent,nextSibling);\r\n};\r\n\r\n/*\r\nCompute the internal state of the widget\r\n*/\r\nTiddlerWidget.prototype.execute = function() {\r\n\tthis.tiddlerState = this.computeTiddlerState();\r\n\tthis.setVariable(\"currentTiddler\",this.tiddlerState.currentTiddler);\r\n\tthis.setVariable(\"missingTiddlerClass\",this.tiddlerState.missingTiddlerClass);\r\n\tthis.setVariable(\"shadowTiddlerClass\",this.tiddlerState.shadowTiddlerClass);\r\n\tthis.setVariable(\"systemTiddlerClass\",this.tiddlerState.systemTiddlerClass);\r\n\tthis.setVariable(\"tiddlerTagClasses\",this.tiddlerState.tiddlerTagClasses);\r\n\t// Construct the child widgets\r\n\tthis.makeChildWidgets();\r\n};\r\n\r\n/*\r\nCompute the tiddler state flags\r\n*/\r\nTiddlerWidget.prototype.computeTiddlerState = function() {\r\n\t// Get our parameters\r\n\tthis.tiddlerTitle = this.getAttribute(\"tiddler\",this.getVariable(\"currentTiddler\"));\r\n\t// Compute the state\r\n\tvar state = {\r\n\t\tcurrentTiddler: this.tiddlerTitle || \"\",\r\n\t\tmissingTiddlerClass: (this.wiki.tiddlerExists(this.tiddlerTitle) || this.wiki.isShadowTiddler(this.tiddlerTitle)) ? \"tc-tiddler-exists\" : \"tc-tiddler-missing\",\r\n\t\tshadowTiddlerClass: this.wiki.isShadowTiddler(this.tiddlerTitle) ? \"tc-tiddler-shadow\" : \"\",\r\n\t\tsystemTiddlerClass: this.wiki.isSystemTiddler(this.tiddlerTitle) ? \"tc-tiddler-system\" : \"\",\r\n\t\ttiddlerTagClasses: this.getTagClasses()\r\n\t};\r\n\t// Compute a simple hash to make it easier to detect changes\r\n\tstate.hash = state.currentTiddler + state.missingTiddlerClass + state.shadowTiddlerClass + state.systemTiddlerClass + state.tiddlerTagClasses;\r\n\treturn state;\r\n};\r\n\r\n/*\r\nCreate a string of CSS classes derived from the tags of the current tiddler\r\n*/\r\nTiddlerWidget.prototype.getTagClasses = function() {\r\n\tvar tiddler = this.wiki.getTiddler(this.tiddlerTitle);\r\n\tif(tiddler) {\r\n\t\tvar tags = [];\r\n\t\t$tw.utils.each(tiddler.fields.tags,function(tag) {\r\n\t\t\ttags.push(\"tc-tagged-\" + encodeURIComponent(tag));\r\n\t\t});\r\n\t\treturn tags.join(\" \");\r\n\t} else {\r\n\t\treturn \"\";\r\n\t}\r\n};\r\n\r\n/*\r\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\r\n*/\r\nTiddlerWidget.prototype.refresh = function(changedTiddlers) {\r\n\tvar changedAttributes = this.computeAttributes(),\r\n\t\tnewTiddlerState = this.computeTiddlerState();\r\n\tif(changedAttributes.tiddler || newTiddlerState.hash !== this.tiddlerState.hash) {\r\n\t\tthis.refreshSelf();\r\n\t\treturn true;\r\n\t} else {\r\n\t\treturn this.refreshChildren(changedTiddlers);\t\t\r\n\t}\r\n};\r\n\r\nexports.tiddler = TiddlerWidget;\r\n\r\n})();\r\n",
"title": "$:/core/modules/widgets/tiddler.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/transclude.js": {
"text": "/*\\\r\ntitle: $:/core/modules/widgets/transclude.js\r\ntype: application/javascript\r\nmodule-type: widget\r\n\r\nTransclude widget\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\r\n\r\nvar TranscludeWidget = function(parseTreeNode,options) {\r\n\tthis.initialise(parseTreeNode,options);\r\n};\r\n\r\n/*\r\nInherit from the base widget class\r\n*/\r\nTranscludeWidget.prototype = new Widget();\r\n\r\n/*\r\nRender this widget into the DOM\r\n*/\r\nTranscludeWidget.prototype.render = function(parent,nextSibling) {\r\n\tthis.parentDomNode = parent;\r\n\tthis.computeAttributes();\r\n\tthis.execute();\r\n\tthis.renderChildren(parent,nextSibling);\r\n};\r\n\r\n/*\r\nCompute the internal state of the widget\r\n*/\r\nTranscludeWidget.prototype.execute = function() {\r\n\t// Get our parameters\r\n\tthis.transcludeTitle = this.getAttribute(\"tiddler\",this.getVariable(\"currentTiddler\"));\r\n\tthis.transcludeSubTiddler = this.getAttribute(\"subtiddler\");\r\n\tthis.transcludeField = this.getAttribute(\"field\");\r\n\tthis.transcludeIndex = this.getAttribute(\"index\");\r\n\tthis.transcludeMode = this.getAttribute(\"mode\");\r\n\t// Parse the text reference\r\n\tvar parseAsInline = !this.parseTreeNode.isBlock;\r\n\tif(this.transcludeMode === \"inline\") {\r\n\t\tparseAsInline = true;\r\n\t} else if(this.transcludeMode === \"block\") {\r\n\t\tparseAsInline = false;\r\n\t}\r\n\tvar parser = this.wiki.parseTextReference(\r\n\t\t\t\t\t\tthis.transcludeTitle,\r\n\t\t\t\t\t\tthis.transcludeField,\r\n\t\t\t\t\t\tthis.transcludeIndex,\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tparseAsInline: parseAsInline,\r\n\t\t\t\t\t\t\tsubTiddler: this.transcludeSubTiddler\r\n\t\t\t\t\t\t}),\r\n\t\tparseTreeNodes = parser ? parser.tree : this.parseTreeNode.children;\r\n\t// Set context variables for recursion detection\r\n\tvar recursionMarker = this.makeRecursionMarker();\r\n\tthis.setVariable(\"transclusion\",recursionMarker);\r\n\t// Check for recursion\r\n\tif(parser) {\r\n\t\tif(this.parentWidget && this.parentWidget.hasVariable(\"transclusion\",recursionMarker)) {\r\n\t\t\tparseTreeNodes = [{type: \"element\", tag: \"span\", attributes: {\r\n\t\t\t\t\"class\": {type: \"string\", value: \"tc-error\"}\r\n\t\t\t}, children: [\r\n\t\t\t\t{type: \"text\", text: \"Recursive transclusion error in transclude widget\"}\r\n\t\t\t]}];\r\n\t\t}\r\n\t}\r\n\t// Construct the child widgets\r\n\tthis.makeChildWidgets(parseTreeNodes);\r\n};\r\n\r\n/*\r\nCompose a string comprising the title, field and/or index to identify this transclusion for recursion detection\r\n*/\r\nTranscludeWidget.prototype.makeRecursionMarker = function() {\r\n\tvar output = [];\r\n\toutput.push(\"{\");\r\n\toutput.push(this.getVariable(\"currentTiddler\",{defaultValue: \"\"}));\r\n\toutput.push(\"|\");\r\n\toutput.push(this.transcludeTitle || \"\");\r\n\toutput.push(\"|\");\r\n\toutput.push(this.transcludeField || \"\");\r\n\toutput.push(\"|\");\r\n\toutput.push(this.transcludeIndex || \"\");\r\n\toutput.push(\"|\");\r\n\toutput.push(this.transcludeSubTiddler || \"\");\r\n\toutput.push(\"}\");\r\n\treturn output.join(\"\");\r\n};\r\n\r\n/*\r\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\r\n*/\r\nTranscludeWidget.prototype.refresh = function(changedTiddlers) {\r\n\tvar changedAttributes = this.computeAttributes();\r\n\tif(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index || changedTiddlers[this.transcludeTitle]) {\r\n\t\tthis.refreshSelf();\r\n\t\treturn true;\r\n\t} else {\r\n\t\treturn this.refreshChildren(changedTiddlers);\t\t\r\n\t}\r\n};\r\n\r\nexports.transclude = TranscludeWidget;\r\n\r\n})();\r\n",
"title": "$:/core/modules/widgets/transclude.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/view.js": {
"text": "/*\\\r\ntitle: $:/core/modules/widgets/view.js\r\ntype: application/javascript\r\nmodule-type: widget\r\n\r\nView widget\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\r\n\r\nvar ViewWidget = function(parseTreeNode,options) {\r\n\tthis.initialise(parseTreeNode,options);\r\n};\r\n\r\n/*\r\nInherit from the base widget class\r\n*/\r\nViewWidget.prototype = new Widget();\r\n\r\n/*\r\nRender this widget into the DOM\r\n*/\r\nViewWidget.prototype.render = function(parent,nextSibling) {\r\n\tthis.parentDomNode = parent;\r\n\tthis.computeAttributes();\r\n\tthis.execute();\r\n\tif(this.text) {\r\n\t\tvar textNode = this.document.createTextNode(this.text);\r\n\t\tparent.insertBefore(textNode,nextSibling);\r\n\t\tthis.domNodes.push(textNode);\r\n\t} else {\r\n\t\tthis.makeChildWidgets();\r\n\t\tthis.renderChildren(parent,nextSibling);\r\n\t}\r\n};\r\n\r\n/*\r\nCompute the internal state of the widget\r\n*/\r\nViewWidget.prototype.execute = function() {\r\n\t// Get parameters from our attributes\r\n\tthis.viewTitle = this.getAttribute(\"tiddler\",this.getVariable(\"currentTiddler\"));\r\n\tthis.viewSubtiddler = this.getAttribute(\"subtiddler\");\r\n\tthis.viewField = this.getAttribute(\"field\",\"text\");\r\n\tthis.viewIndex = this.getAttribute(\"index\");\r\n\tthis.viewFormat = this.getAttribute(\"format\",\"text\");\r\n\tthis.viewTemplate = this.getAttribute(\"template\",\"\");\r\n\tswitch(this.viewFormat) {\r\n\t\tcase \"htmlwikified\":\r\n\t\t\tthis.text = this.getValueAsHtmlWikified();\r\n\t\t\tbreak;\r\n\t\tcase \"htmlencoded\":\r\n\t\t\tthis.text = this.getValueAsHtmlEncoded();\r\n\t\t\tbreak;\r\n\t\tcase \"urlencoded\":\r\n\t\t\tthis.text = this.getValueAsUrlEncoded();\r\n\t\t\tbreak;\r\n\t\tcase \"doubleurlencoded\":\r\n\t\t\tthis.text = this.getValueAsDoubleUrlEncoded();\r\n\t\t\tbreak;\r\n\t\tcase \"date\":\r\n\t\t\tthis.text = this.getValueAsDate(this.viewTemplate);\r\n\t\t\tbreak;\r\n\t\tcase \"relativedate\":\r\n\t\t\tthis.text = this.getValueAsRelativeDate();\r\n\t\t\tbreak;\r\n\t\tcase \"stripcomments\":\r\n\t\t\tthis.text = this.getValueAsStrippedComments();\r\n\t\t\tbreak;\r\n\t\tcase \"jsencoded\":\r\n\t\t\tthis.text = this.getValueAsJsEncoded();\r\n\t\t\tbreak;\r\n\t\tdefault: // \"text\"\r\n\t\t\tthis.text = this.getValueAsText();\r\n\t\t\tbreak;\r\n\t}\r\n};\r\n\r\n/*\r\nThe various formatter functions are baked into this widget for the moment. Eventually they will be replaced by macro functions\r\n*/\r\n\r\n/*\r\nRetrieve the value of the widget. Options are:\r\nasString: Optionally return the value as a string\r\n*/\r\nViewWidget.prototype.getValue = function(options) {\r\n\toptions = options || {};\r\n\tvar value = options.asString ? \"\" : undefined;\r\n\tif(this.viewIndex) {\r\n\t\tvalue = this.wiki.extractTiddlerDataItem(this.viewTitle,this.viewIndex);\r\n\t} else {\r\n\t\tvar tiddler;\r\n\t\tif(this.viewSubtiddler) {\r\n\t\t\ttiddler = this.wiki.getSubTiddler(this.viewTitle,this.viewSubtiddler);\t\r\n\t\t} else {\r\n\t\t\ttiddler = this.wiki.getTiddler(this.viewTitle);\r\n\t\t}\r\n\t\tif(tiddler) {\r\n\t\t\tif(this.viewField === \"text\" && !this.viewSubtiddler) {\r\n\t\t\t\t// Calling getTiddlerText() triggers lazy loading of skinny tiddlers\r\n\t\t\t\tvalue = this.wiki.getTiddlerText(this.viewTitle);\r\n\t\t\t} else {\r\n\t\t\t\tif($tw.utils.hop(tiddler.fields,this.viewField)) {\r\n\t\t\t\t\tif(options.asString) {\r\n\t\t\t\t\t\tvalue = tiddler.getFieldString(this.viewField);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tvalue = tiddler.fields[this.viewField];\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif(this.viewField === \"title\") {\r\n\t\t\t\tvalue = this.viewTitle;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn value;\r\n};\r\n\r\nViewWidget.prototype.getValueAsText = function() {\r\n\treturn this.getValue({asString: true});\r\n};\r\n\r\nViewWidget.prototype.getValueAsHtmlWikified = function() {\r\n\treturn this.wiki.renderText(\"text/html\",\"text/vnd.tiddlywiki\",this.getValueAsText(),{parentWidget: this});\r\n};\r\n\r\nViewWidget.prototype.getValueAsHtmlEncoded = function() {\r\n\treturn $tw.utils.htmlEncode(this.getValueAsText());\r\n};\r\n\r\nViewWidget.prototype.getValueAsUrlEncoded = function() {\r\n\treturn encodeURIComponent(this.getValueAsText());\r\n};\r\n\r\nViewWidget.prototype.getValueAsDoubleUrlEncoded = function() {\r\n\treturn encodeURIComponent(encodeURIComponent(this.getValueAsText()));\r\n};\r\n\r\nViewWidget.prototype.getValueAsDate = function(format) {\r\n\tformat = format || \"YYYY MM DD 0hh:0mm\";\r\n\tvar value = $tw.utils.parseDate(this.getValue());\r\n\tif(value && $tw.utils.isDate(value) && value.toString() !== \"Invalid Date\") {\r\n\t\treturn $tw.utils.formatDateString(value,format);\r\n\t} else {\r\n\t\treturn \"\";\r\n\t}\r\n};\r\n\r\nViewWidget.prototype.getValueAsRelativeDate = function(format) {\r\n\tvar value = $tw.utils.parseDate(this.getValue());\r\n\tif(value && $tw.utils.isDate(value) && value.toString() !== \"Invalid Date\") {\r\n\t\treturn $tw.utils.getRelativeDate((new Date()) - (new Date(value))).description;\r\n\t} else {\r\n\t\treturn \"\";\r\n\t}\r\n};\r\n\r\nViewWidget.prototype.getValueAsStrippedComments = function() {\r\n\tvar lines = this.getValueAsText().split(\"\\n\"),\r\n\t\tout = [];\r\n\tfor(var line=0; line<lines.length; line++) {\r\n\t\tvar text = lines[line];\r\n\t\tif(!/^\\s*\\/\\/#/.test(text)) {\r\n\t\t\tout.push(text);\r\n\t\t}\r\n\t}\r\n\treturn out.join(\"\\n\");\r\n};\r\n\r\nViewWidget.prototype.getValueAsJsEncoded = function() {\r\n\treturn $tw.utils.stringify(this.getValueAsText());\r\n};\r\n\r\n/*\r\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\r\n*/\r\nViewWidget.prototype.refresh = function(changedTiddlers) {\r\n\tvar changedAttributes = this.computeAttributes();\r\n\tif(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index || changedAttributes.template || changedAttributes.format || changedTiddlers[this.viewTitle]) {\r\n\t\tthis.refreshSelf();\r\n\t\treturn true;\r\n\t} else {\r\n\t\treturn false;\t\r\n\t}\r\n};\r\n\r\nexports.view = ViewWidget;\r\n\r\n})();\r\n",
"title": "$:/core/modules/widgets/view.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/widget.js": {
"text": "/*\\\r\ntitle: $:/core/modules/widgets/widget.js\r\ntype: application/javascript\r\nmodule-type: widget\r\n\r\nWidget base class\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\n/*\r\nCreate a widget object for a parse tree node\r\n\tparseTreeNode: reference to the parse tree node to be rendered\r\n\toptions: see below\r\nOptions include:\r\n\twiki: mandatory reference to wiki associated with this render tree\r\n\tparentWidget: optional reference to a parent renderer node for the context chain\r\n\tdocument: optional document object to use instead of global document\r\n*/\r\nvar Widget = function(parseTreeNode,options) {\r\n\tif(arguments.length > 0) {\r\n\t\tthis.initialise(parseTreeNode,options);\r\n\t}\r\n};\r\n\r\n/*\r\nInitialise widget properties. These steps are pulled out of the constructor so that we can reuse them in subclasses\r\n*/\r\nWidget.prototype.initialise = function(parseTreeNode,options) {\r\n\toptions = options || {};\r\n\t// Save widget info\r\n\tthis.parseTreeNode = parseTreeNode;\r\n\tthis.wiki = options.wiki;\r\n\tthis.parentWidget = options.parentWidget;\r\n\tthis.variablesConstructor = function() {};\r\n\tthis.variablesConstructor.prototype = this.parentWidget ? this.parentWidget.variables : {};\r\n\tthis.variables = new this.variablesConstructor();\r\n\tthis.document = options.document;\r\n\tthis.attributes = {};\r\n\tthis.children = [];\r\n\tthis.domNodes = [];\r\n\tthis.eventListeners = {};\r\n\t// Hashmap of the widget classes\r\n\tif(!this.widgetClasses) {\r\n\t\tWidget.prototype.widgetClasses = $tw.modules.applyMethods(\"widget\");\r\n\t}\r\n};\r\n\r\n/*\r\nRender this widget into the DOM\r\n*/\r\nWidget.prototype.render = function(parent,nextSibling) {\r\n\tthis.parentDomNode = parent;\r\n\tthis.execute();\r\n\tthis.renderChildren(parent,nextSibling);\r\n};\r\n\r\n/*\r\nCompute the internal state of the widget\r\n*/\r\nWidget.prototype.execute = function() {\r\n\tthis.makeChildWidgets();\r\n};\r\n\r\n/*\r\nSet the value of a context variable\r\nname: name of the variable\r\nvalue: value of the variable\r\nparams: array of {name:, default:} for each parameter\r\n*/\r\nWidget.prototype.setVariable = function(name,value,params) {\r\n\tthis.variables[name] = {value: value, params: params};\r\n};\r\n\r\n/*\r\nGet the prevailing value of a context variable\r\nname: name of variable\r\noptions: see below\r\nOptions include\r\nparams: array of {name:, value:} for each parameter\r\ndefaultValue: default value if the variable is not defined\r\n*/\r\nWidget.prototype.getVariable = function(name,options) {\r\n\toptions = options || {};\r\n\tvar actualParams = options.params || [],\r\n\t\tparentWidget = this.parentWidget;\r\n\t// Check for the variable defined in the parent widget (or an ancestor in the prototype chain)\r\n\tif(parentWidget && name in parentWidget.variables) {\r\n\t\tvar variable = parentWidget.variables[name],\r\n\t\t\tvalue = variable.value;\r\n\t\t// Substitute any parameters specified in the definition\r\n\t\tvalue = this.substituteVariableParameters(value,variable.params,actualParams);\r\n\t\tvalue = this.substituteVariableReferences(value);\r\n\t\treturn value;\r\n\t}\r\n\t// If the variable doesn't exist in the parent widget then look for a macro module\r\n\treturn this.evaluateMacroModule(name,actualParams,options.defaultValue);\r\n};\r\n\r\nWidget.prototype.substituteVariableParameters = function(text,formalParams,actualParams) {\r\n\tif(formalParams) {\r\n\t\tvar nextAnonParameter = 0, // Next candidate anonymous parameter in macro call\r\n\t\t\tparamInfo, paramValue;\r\n\t\t// Step through each of the parameters in the macro definition\r\n\t\tfor(var p=0; p<formalParams.length; p++) {\r\n\t\t\t// Check if we've got a macro call parameter with the same name\r\n\t\t\tparamInfo = formalParams[p];\r\n\t\t\tparamValue = undefined;\r\n\t\t\tfor(var m=0; m<actualParams.length; m++) {\r\n\t\t\t\tif(actualParams[m].name === paramInfo.name) {\r\n\t\t\t\t\tparamValue = actualParams[m].value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// If not, use the next available anonymous macro call parameter\r\n\t\t\twhile(nextAnonParameter < actualParams.length && actualParams[nextAnonParameter].name) {\r\n\t\t\t\tnextAnonParameter++;\r\n\t\t\t}\r\n\t\t\tif(paramValue === undefined && nextAnonParameter < actualParams.length) {\r\n\t\t\t\tparamValue = actualParams[nextAnonParameter++].value;\r\n\t\t\t}\r\n\t\t\t// If we've still not got a value, use the default, if any\r\n\t\t\tparamValue = paramValue || paramInfo[\"default\"] || \"\";\r\n\t\t\t// Replace any instances of this parameter\r\n\t\t\ttext = text.replace(new RegExp(\"\\\\$\" + $tw.utils.escapeRegExp(paramInfo.name) + \"\\\\$\",\"mg\"),paramValue);\r\n\t\t}\r\n\t}\r\n\treturn text;\r\n};\r\n\r\nWidget.prototype.substituteVariableReferences = function(text) {\r\n\tvar self = this;\r\n\treturn (text || \"\").replace(/\\$\\(([^\\)\\$]+)\\)\\$/g,function(match,p1,offset,string) {\r\n\t\treturn self.getVariable(p1,{defaultValue: \"\"});\r\n\t});\r\n};\r\n\r\nWidget.prototype.evaluateMacroModule = function(name,actualParams,defaultValue) {\r\n\tif($tw.utils.hop($tw.macros,name)) {\r\n\t\tvar macro = $tw.macros[name],\r\n\t\t\targs = [];\r\n\t\tif(macro.params.length > 0) {\r\n\t\t\tvar nextAnonParameter = 0, // Next candidate anonymous parameter in macro call\r\n\t\t\t\tparamInfo, paramValue;\r\n\t\t\t// Step through each of the parameters in the macro definition\r\n\t\t\tfor(var p=0; p<macro.params.length; p++) {\r\n\t\t\t\t// Check if we've got a macro call parameter with the same name\r\n\t\t\t\tparamInfo = macro.params[p];\r\n\t\t\t\tparamValue = undefined;\r\n\t\t\t\tfor(var m=0; m<actualParams.length; m++) {\r\n\t\t\t\t\tif(actualParams[m].name === paramInfo.name) {\r\n\t\t\t\t\t\tparamValue = actualParams[m].value;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// If not, use the next available anonymous macro call parameter\r\n\t\t\t\twhile(nextAnonParameter < actualParams.length && actualParams[nextAnonParameter].name) {\r\n\t\t\t\t\tnextAnonParameter++;\r\n\t\t\t\t}\r\n\t\t\t\tif(paramValue === undefined && nextAnonParameter < actualParams.length) {\r\n\t\t\t\t\tparamValue = actualParams[nextAnonParameter++].value;\r\n\t\t\t\t}\r\n\t\t\t\t// If we've still not got a value, use the default, if any\r\n\t\t\t\tparamValue = paramValue || paramInfo[\"default\"] || \"\";\r\n\t\t\t\t// Save the parameter\r\n\t\t\t\targs.push(paramValue);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse for(var i=0; i<actualParams.length; ++i) {\r\n\t\t\targs.push(actualParams[i].value);\r\n\t\t}\r\n\t\treturn (macro.run.apply(this,args) || \"\").toString();\r\n\t} else {\r\n\t\treturn defaultValue;\r\n\t}\r\n};\r\n\r\n/*\r\nCheck whether a given context variable value exists in the parent chain\r\n*/\r\nWidget.prototype.hasVariable = function(name,value) {\r\n\tvar node = this;\r\n\twhile(node) {\r\n\t\tif($tw.utils.hop(node.variables,name) && node.variables[name].value === value) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tnode = node.parentWidget;\r\n\t}\r\n\treturn false;\r\n};\r\n\r\n/*\r\nConstruct a qualifying string based on a hash of concatenating the values of a given variable in the parent chain\r\n*/\r\nWidget.prototype.getStateQualifier = function(name) {\r\n\tname = name || \"transclusion\";\r\n\tvar output = [],\r\n\t\tnode = this;\r\n\twhile(node && node.parentWidget) {\r\n\t\tif($tw.utils.hop(node.parentWidget.variables,name)) {\r\n\t\t\toutput.push(node.getVariable(name));\r\n\t\t}\r\n\t\tnode = node.parentWidget;\r\n\t}\r\n\treturn $tw.utils.hashString(output.join(\"\"));\r\n};\r\n\r\n/*\r\nCompute the current values of the attributes of the widget. Returns a hashmap of the names of the attributes that have changed\r\n*/\r\nWidget.prototype.computeAttributes = function() {\r\n\tvar changedAttributes = {},\r\n\t\tself = this,\r\n\t\tvalue;\r\n\t$tw.utils.each(this.parseTreeNode.attributes,function(attribute,name) {\r\n\t\tif(attribute.type === \"indirect\") {\r\n\t\t\tvalue = self.wiki.getTextReference(attribute.textReference,\"\",self.getVariable(\"currentTiddler\"));\r\n\t\t} else if(attribute.type === \"macro\") {\r\n\t\t\tvalue = self.getVariable(attribute.value.name,{params: attribute.value.params});\r\n\t\t} else { // String attribute\r\n\t\t\tvalue = attribute.value;\r\n\t\t}\r\n\t\t// Check whether the attribute has changed\r\n\t\tif(self.attributes[name] !== value) {\r\n\t\t\tself.attributes[name] = value;\r\n\t\t\tchangedAttributes[name] = true;\r\n\t\t}\r\n\t});\r\n\treturn changedAttributes;\r\n};\r\n\r\n/*\r\nCheck for the presence of an attribute\r\n*/\r\nWidget.prototype.hasAttribute = function(name) {\r\n\treturn $tw.utils.hop(this.attributes,name);\r\n};\r\n\r\n/*\r\nGet the value of an attribute\r\n*/\r\nWidget.prototype.getAttribute = function(name,defaultText) {\r\n\tif($tw.utils.hop(this.attributes,name)) {\r\n\t\treturn this.attributes[name];\r\n\t} else {\r\n\t\treturn defaultText;\r\n\t}\r\n};\r\n\r\n/*\r\nAssign the computed attributes of the widget to a domNode\r\noptions include:\r\nexcludeEventAttributes: ignores attributes whose name begins with \"on\"\r\n*/\r\nWidget.prototype.assignAttributes = function(domNode,options) {\r\n\toptions = options || {};\r\n\tvar self = this;\r\n\t$tw.utils.each(this.attributes,function(v,a) {\r\n\t\t// Check exclusions\r\n\t\tif(options.excludeEventAttributes && a.substr(0,2) === \"on\") {\r\n\t\t\tv = undefined;\r\n\t\t}\r\n\t\tif(v !== undefined) {\r\n\t\t\tvar b = a.split(\":\");\r\n\t\t\t// Setting certain attributes can cause a DOM error (eg xmlns on the svg element)\r\n\t\t\ttry {\r\n\t\t\t\tif (b.length == 2 && b[0] == \"xlink\"){\r\n\t\t\t\t\tdomNode.setAttributeNS(\"http://www.w3.org/1999/xlink\",b[1],v);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdomNode.setAttributeNS(null,a,v);\r\n\t\t\t\t}\r\n\t\t\t} catch(e) {\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n};\r\n\r\n/*\r\nMake child widgets correspondng to specified parseTreeNodes\r\n*/\r\nWidget.prototype.makeChildWidgets = function(parseTreeNodes) {\r\n\tthis.children = [];\r\n\tvar self = this;\r\n\t$tw.utils.each(parseTreeNodes || (this.parseTreeNode && this.parseTreeNode.children),function(childNode) {\r\n\t\tself.children.push(self.makeChildWidget(childNode));\r\n\t});\r\n};\r\n\r\n/*\r\nConstruct the widget object for a parse tree node\r\n*/\r\nWidget.prototype.makeChildWidget = function(parseTreeNode) {\r\n\tvar WidgetClass = this.widgetClasses[parseTreeNode.type];\r\n\tif(!WidgetClass) {\r\n\t\tWidgetClass = this.widgetClasses.text;\r\n\t\tparseTreeNode = {type: \"text\", text: \"Undefined widget '\" + parseTreeNode.type + \"'\"};\r\n\t}\r\n\treturn new WidgetClass(parseTreeNode,{\r\n\t\twiki: this.wiki,\r\n\t\tvariables: {},\r\n\t\tparentWidget: this,\r\n\t\tdocument: this.document\r\n\t});\r\n};\r\n\r\n/*\r\nGet the next sibling of this widget\r\n*/\r\nWidget.prototype.nextSibling = function() {\r\n\tif(this.parentWidget) {\r\n\t\tvar index = this.parentWidget.children.indexOf(this);\r\n\t\tif(index !== -1 && index < this.parentWidget.children.length-1) {\r\n\t\t\treturn this.parentWidget.children[index+1];\r\n\t\t}\r\n\t}\r\n\treturn null;\r\n};\r\n\r\n/*\r\nGet the previous sibling of this widget\r\n*/\r\nWidget.prototype.previousSibling = function() {\r\n\tif(this.parentWidget) {\r\n\t\tvar index = this.parentWidget.children.indexOf(this);\r\n\t\tif(index !== -1 && index > 0) {\r\n\t\t\treturn this.parentWidget.children[index-1];\r\n\t\t}\r\n\t}\r\n\treturn null;\r\n};\r\n\r\n/*\r\nRender the children of this widget into the DOM\r\n*/\r\nWidget.prototype.renderChildren = function(parent,nextSibling) {\r\n\t$tw.utils.each(this.children,function(childWidget) {\r\n\t\tchildWidget.render(parent,nextSibling);\r\n\t});\r\n};\r\n\r\n/*\r\nAdd a list of event listeners from an array [{type:,handler:},...]\r\n*/\r\nWidget.prototype.addEventListeners = function(listeners) {\r\n\tvar self = this;\r\n\t$tw.utils.each(listeners,function(listenerInfo) {\r\n\t\tself.addEventListener(listenerInfo.type,listenerInfo.handler);\r\n\t});\r\n};\r\n\r\n/*\r\nAdd an event listener\r\n*/\r\nWidget.prototype.addEventListener = function(type,handler) {\r\n\tvar self = this;\r\n\tif(typeof handler === \"string\") { // The handler is a method name on this widget\r\n\t\tthis.eventListeners[type] = function(event) {\r\n\t\t\treturn self[handler].call(self,event);\r\n\t\t};\r\n\t} else { // The handler is a function\r\n\t\tthis.eventListeners[type] = function(event) {\r\n\t\t\treturn handler.call(self,event);\r\n\t\t};\r\n\t}\r\n};\r\n\r\n/*\r\nDispatch an event to a widget. If the widget doesn't handle the event then it is also dispatched to the parent widget\r\n*/\r\nWidget.prototype.dispatchEvent = function(event) {\r\n\t// Dispatch the event if this widget handles it\r\n\tvar listener = this.eventListeners[event.type];\r\n\tif(listener) {\r\n\t\t// Don't propagate the event if the listener returned false\r\n\t\tif(!listener(event)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\t// Dispatch the event to the parent widget\r\n\tif(this.parentWidget) {\r\n\t\treturn this.parentWidget.dispatchEvent(event);\r\n\t}\r\n\treturn true;\r\n};\r\n\r\n/*\r\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\r\n*/\r\nWidget.prototype.refresh = function(changedTiddlers) {\r\n\treturn this.refreshChildren(changedTiddlers);\r\n};\r\n\r\n/*\r\nRebuild a previously rendered widget\r\n*/\r\nWidget.prototype.refreshSelf = function() {\r\n\tvar nextSibling = this.findNextSiblingDomNode();\r\n\tthis.removeChildDomNodes();\r\n\tthis.render(this.parentDomNode,nextSibling);\r\n};\r\n\r\n/*\r\nRefresh all the children of a widget\r\n*/\r\nWidget.prototype.refreshChildren = function(changedTiddlers) {\r\n\tvar self = this,\r\n\t\trefreshed = false;\r\n\t$tw.utils.each(this.children,function(childWidget) {\r\n\t\trefreshed = childWidget.refresh(changedTiddlers) || refreshed;\r\n\t});\r\n\treturn refreshed;\r\n};\r\n\r\n/*\r\nFind the next sibling in the DOM to this widget. This is done by scanning the widget tree through all next siblings and their descendents that share the same parent DOM node\r\n*/\r\nWidget.prototype.findNextSiblingDomNode = function(startIndex) {\r\n\t// Refer to this widget by its index within its parents children\r\n\tvar parent = this.parentWidget,\r\n\t\tindex = startIndex !== undefined ? startIndex : parent.children.indexOf(this);\r\nif(index === -1) {\r\n\tthrow \"node not found in parents children\";\r\n}\r\n\t// Look for a DOM node in the later siblings\r\n\twhile(++index < parent.children.length) {\r\n\t\tvar domNode = parent.children[index].findFirstDomNode();\r\n\t\tif(domNode) {\r\n\t\t\treturn domNode;\r\n\t\t}\r\n\t}\r\n\t// Go back and look for later siblings of our parent if it has the same parent dom node\r\n\tvar grandParent = parent.parentWidget;\r\n\tif(grandParent && parent.parentDomNode === this.parentDomNode) {\r\n\t\tindex = grandParent.children.indexOf(parent);\r\n\t\treturn parent.findNextSiblingDomNode(index);\r\n\t}\r\n\treturn null;\r\n};\r\n\r\n/*\r\nFind the first DOM node generated by a widget or its children\r\n*/\r\nWidget.prototype.findFirstDomNode = function() {\r\n\t// Return the first dom node of this widget, if we've got one\r\n\tif(this.domNodes.length > 0) {\r\n\t\treturn this.domNodes[0];\r\n\t}\r\n\t// Otherwise, recursively call our children\r\n\tfor(var t=0; t<this.children.length; t++) {\r\n\t\tvar domNode = this.children[t].findFirstDomNode();\r\n\t\tif(domNode) {\r\n\t\t\treturn domNode;\r\n\t\t}\r\n\t}\r\n\treturn null;\r\n};\r\n\r\n/*\r\nRemove any DOM nodes created by this widget or its children\r\n*/\r\nWidget.prototype.removeChildDomNodes = function() {\r\n\t// If this widget has directly created DOM nodes, delete them and exit. This assumes that any child widgets are contained within the created DOM nodes, which would normally be the case\r\n\tif(this.domNodes.length > 0) {\r\n\t\t$tw.utils.each(this.domNodes,function(domNode) {\r\n\t\t\tdomNode.parentNode.removeChild(domNode);\r\n\t\t});\r\n\t\tthis.domNodes = [];\r\n\t} else {\r\n\t\t// Otherwise, ask the child widgets to delete their DOM nodes\r\n\t\t$tw.utils.each(this.children,function(childWidget) {\r\n\t\t\tchildWidget.removeChildDomNodes();\r\n\t\t});\r\n\t}\r\n};\r\n\r\n/*\r\nInvoke any action widgets that are immediate children of this widget\r\n*/\r\nWidget.prototype.invokeActions = function(event) {\r\n\tvar handled = false;\r\n\tfor(var t=0; t<this.children.length; t++) {\r\n\t\tvar child = this.children[t];\r\n\t\tif(child.invokeAction && child.invokeAction(this,event)) {\r\n\t\t\thandled = true;\r\n\t\t}\r\n\t}\r\n\treturn handled;\r\n};\r\n\r\nexports.widget = Widget;\r\n\r\n})();\r\n",
"title": "$:/core/modules/widgets/widget.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/wiki.js": {
"text": "/*\\\r\ntitle: $:/core/modules/wiki.js\r\ntype: application/javascript\r\nmodule-type: wikimethod\r\n\r\nExtension methods for the $tw.Wiki object\r\n\r\nAdds the following properties to the wiki object:\r\n\r\n* `eventListeners` is a hashmap by type of arrays of listener functions\r\n* `changedTiddlers` is a hashmap describing changes to named tiddlers since wiki change events were last dispatched. Each entry is a hashmap containing two fields:\r\n\tmodified: true/false\r\n\tdeleted: true/false\r\n* `changeCount` is a hashmap by tiddler title containing a numerical index that starts at zero and is incremented each time a tiddler is created changed or deleted\r\n* `caches` is a hashmap by tiddler title containing a further hashmap of named cache objects. Caches are automatically cleared when a tiddler is modified or deleted\r\n* `globalCache` is a hashmap by cache name of cache objects that are cleared whenever any tiddler change occurs\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar widget = require(\"$:/core/modules/widgets/widget.js\");\r\n\r\nvar USER_NAME_TITLE = \"$:/status/UserName\";\r\n\r\n/*\r\nGet the value of a text reference. Text references can have any of these forms:\r\n\t<tiddlertitle>\r\n\t<tiddlertitle>!!<fieldname>\r\n\t!!<fieldname> - specifies a field of the current tiddlers\r\n\t<tiddlertitle>##<index>\r\n*/\r\nexports.getTextReference = function(textRef,defaultText,currTiddlerTitle) {\r\n\tvar tr = $tw.utils.parseTextReference(textRef),\r\n\t\ttitle = tr.title || currTiddlerTitle;\r\n\tif(tr.field) {\r\n\t\tvar tiddler = this.getTiddler(title);\r\n\t\tif(tr.field === \"title\") { // Special case so we can return the title of a non-existent tiddler\r\n\t\t\treturn title;\r\n\t\t} else if(tiddler && $tw.utils.hop(tiddler.fields,tr.field)) {\r\n\t\t\treturn tiddler.getFieldString(tr.field);\r\n\t\t} else {\r\n\t\t\treturn defaultText;\r\n\t\t}\r\n\t} else if(tr.index) {\r\n\t\treturn this.extractTiddlerDataItem(title,tr.index,defaultText);\r\n\t} else {\r\n\t\treturn this.getTiddlerText(title,defaultText);\r\n\t}\r\n};\r\n\r\nexports.setTextReference = function(textRef,value,currTiddlerTitle) {\r\n\tvar tr = $tw.utils.parseTextReference(textRef),\r\n\t\ttitle = tr.title || currTiddlerTitle;\r\n\tthis.setText(title,tr.field,tr.index,value);\r\n};\r\n\r\nexports.setText = function(title,field,index,value) {\r\n\t// Check if it is a reference to a tiddler field\r\n\tif(index) {\r\n\t\tvar data = this.getTiddlerData(title,Object.create(null));\r\n\t\tdata[index] = value;\r\n\t\tthis.setTiddlerData(title,data,this.getModificationFields());\r\n\t} else {\r\n\t\tvar tiddler = this.getTiddler(title),\r\n\t\t\tfields = {title: title};\r\n\t\tfields[field || \"text\"] = value;\r\n\t\tthis.addTiddler(new $tw.Tiddler(tiddler,fields,this.getModificationFields()));\r\n\t}\r\n};\r\n\r\nexports.deleteTextReference = function(textRef,currTiddlerTitle) {\r\n\tvar tr = $tw.utils.parseTextReference(textRef),\r\n\t\ttitle,tiddler,fields;\r\n\t// Check if it is a reference to a tiddler\r\n\tif(tr.title && !tr.field) {\r\n\t\tthis.deleteTiddler(tr.title);\r\n\t// Else check for a field reference\r\n\t} else if(tr.field) {\r\n\t\ttitle = tr.title || currTiddlerTitle;\r\n\t\ttiddler = this.getTiddler(title);\r\n\t\tif(tiddler && $tw.utils.hop(tiddler.fields,tr.field)) {\r\n\t\t\tfields = Object.create(null);\r\n\t\t\tfields[tr.field] = undefined;\r\n\t\t\tthis.addTiddler(new $tw.Tiddler(tiddler,fields,this.getModificationFields()));\r\n\t\t}\r\n\t}\r\n};\r\n\r\nexports.addEventListener = function(type,listener) {\r\n\tthis.eventListeners = this.eventListeners || {};\r\n\tthis.eventListeners[type] = this.eventListeners[type] || [];\r\n\tthis.eventListeners[type].push(listener);\t\r\n};\r\n\r\nexports.removeEventListener = function(type,listener) {\r\n\tvar listeners = this.eventListeners[type];\r\n\tif(listeners) {\r\n\t\tvar p = listeners.indexOf(listener);\r\n\t\tif(p !== -1) {\r\n\t\t\tlisteners.splice(p,1);\r\n\t\t}\r\n\t}\r\n};\r\n\r\nexports.dispatchEvent = function(type /*, args */) {\r\n\tvar args = Array.prototype.slice.call(arguments,1),\r\n\t\tlisteners = this.eventListeners[type];\r\n\tif(listeners) {\r\n\t\tfor(var p=0; p<listeners.length; p++) {\r\n\t\t\tvar listener = listeners[p];\r\n\t\t\tlistener.apply(listener,args);\r\n\t\t}\r\n\t}\r\n};\r\n\r\n/*\r\nCauses a tiddler to be marked as changed, incrementing the change count, and triggers event handlers.\r\nThis method should be called after the changes it describes have been made to the wiki.tiddlers[] array.\r\n\ttitle: Title of tiddler\r\n\tisDeleted: defaults to false (meaning the tiddler has been created or modified),\r\n\t\ttrue if the tiddler has been deleted\r\n*/\r\nexports.enqueueTiddlerEvent = function(title,isDeleted) {\r\n\t// Record the touch in the list of changed tiddlers\r\n\tthis.changedTiddlers = this.changedTiddlers || Object.create(null);\r\n\tthis.changedTiddlers[title] = this.changedTiddlers[title] || Object.create(null);\r\n\tthis.changedTiddlers[title][isDeleted ? \"deleted\" : \"modified\"] = true;\r\n\t// Increment the change count\r\n\tthis.changeCount = this.changeCount || Object.create(null);\r\n\tif($tw.utils.hop(this.changeCount,title)) {\r\n\t\tthis.changeCount[title]++;\r\n\t} else {\r\n\t\tthis.changeCount[title] = 1;\r\n\t}\r\n\t// Trigger events\r\n\tthis.eventListeners = this.eventListeners || [];\r\n\tif(!this.eventsTriggered) {\r\n\t\tvar self = this;\r\n\t\t$tw.utils.nextTick(function() {\r\n\t\t\tvar changes = self.changedTiddlers;\r\n\t\t\tself.changedTiddlers = Object.create(null);\r\n\t\t\tself.eventsTriggered = false;\r\n\t\t\tif($tw.utils.count(changes) > 0) {\r\n\t\t\t\tself.dispatchEvent(\"change\",changes);\r\n\t\t\t}\r\n\t\t});\r\n\t\tthis.eventsTriggered = true;\r\n\t}\r\n};\r\n\r\nexports.getSizeOfTiddlerEventQueue = function() {\r\n\treturn $tw.utils.count(this.changedTiddlers);\r\n};\r\n\r\nexports.clearTiddlerEventQueue = function() {\r\n\tthis.changedTiddlers = Object.create(null);\r\n\tthis.changeCount = Object.create(null);\r\n};\r\n\r\nexports.getChangeCount = function(title) {\r\n\tthis.changeCount = this.changeCount || Object.create(null);\r\n\tif($tw.utils.hop(this.changeCount,title)) {\r\n\t\treturn this.changeCount[title];\r\n\t} else {\r\n\t\treturn 0;\r\n\t}\r\n};\r\n\r\n/*\r\nGenerate an unused title from the specified base\r\n*/\r\nexports.generateNewTitle = function(baseTitle,options) {\r\n\toptions = options || {};\r\n\tvar c = 0,\r\n\t\ttitle = baseTitle;\r\n\twhile(this.tiddlerExists(title) || this.isShadowTiddler(title) || this.findDraft(title)) {\r\n\t\ttitle = baseTitle + \r\n\t\t\t(options.prefix || \" \") + \r\n\t\t\t(++c);\r\n\t}\r\n\treturn title;\r\n};\r\n\r\nexports.isSystemTiddler = function(title) {\r\n\treturn title.indexOf(\"$:/\") === 0;\r\n};\r\n\r\nexports.isTemporaryTiddler = function(title) {\r\n\treturn title.indexOf(\"$:/temp/\") === 0;\r\n};\r\n\r\nexports.isImageTiddler = function(title) {\r\n\tvar tiddler = this.getTiddler(title);\r\n\tif(tiddler) {\t\t\r\n\t\tvar contentTypeInfo = $tw.config.contentTypeInfo[tiddler.fields.type || \"text/vnd.tiddlywiki\"];\r\n\t\treturn !!contentTypeInfo && contentTypeInfo.flags.indexOf(\"image\") !== -1;\r\n\t} else {\r\n\t\treturn null;\r\n\t}\r\n};\r\n\r\n/*\r\nLike addTiddler() except it will silently reject any plugin tiddlers that are older than the currently loaded version. Returns true if the tiddler was imported\r\n*/\r\nexports.importTiddler = function(tiddler) {\r\n\tvar existingTiddler = this.getTiddler(tiddler.fields.title);\r\n\t// Check if we're dealing with a plugin\r\n\tif(tiddler && tiddler.hasField(\"plugin-type\") && tiddler.hasField(\"version\") && existingTiddler && existingTiddler.hasField(\"plugin-type\") && existingTiddler.hasField(\"version\")) {\r\n\t\t// Reject the incoming plugin if it is older\r\n\t\tif($tw.utils.checkVersions(existingTiddler.fields.version,tiddler.fields.version)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\t// Fall through to adding the tiddler\r\n\tthis.addTiddler(tiddler);\r\n\treturn true;\r\n};\r\n\r\n/*\r\nReturn a hashmap of the fields that should be set when a tiddler is created\r\n*/\r\nexports.getCreationFields = function() {\r\n\tvar fields = {\r\n\t\t\tcreated: new Date()\r\n\t\t},\r\n\t\tcreator = this.getTiddlerText(USER_NAME_TITLE);\r\n\tif(creator) {\r\n\t\tfields.creator = creator;\r\n\t}\r\n\treturn fields;\r\n};\r\n\r\n/*\r\nReturn a hashmap of the fields that should be set when a tiddler is modified\r\n*/\r\nexports.getModificationFields = function() {\r\n\tvar fields = Object.create(null),\r\n\t\tmodifier = this.getTiddlerText(USER_NAME_TITLE);\r\n\tfields.modified = new Date();\r\n\tif(modifier) {\r\n\t\tfields.modifier = modifier;\r\n\t}\r\n\treturn fields;\r\n};\r\n\r\n/*\r\nReturn a sorted array of tiddler titles. Options include:\r\nsortField: field to sort by\r\nexcludeTag: tag to exclude\r\nincludeSystem: whether to include system tiddlers (defaults to false)\r\n*/\r\nexports.getTiddlers = function(options) {\r\n\toptions = options || Object.create(null);\r\n\tvar self = this,\r\n\t\tsortField = options.sortField || \"title\",\r\n\t\ttiddlers = [], t, titles = [];\r\n\tthis.each(function(tiddler,title) {\r\n\t\tif(options.includeSystem || !self.isSystemTiddler(title)) {\r\n\t\t\tif(!options.excludeTag || !tiddler.hasTag(options.excludeTag)) {\r\n\t\t\t\ttiddlers.push(tiddler);\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\ttiddlers.sort(function(a,b) {\r\n\t\tvar aa = a.fields[sortField].toLowerCase() || \"\",\r\n\t\t\tbb = b.fields[sortField].toLowerCase() || \"\";\r\n\t\tif(aa < bb) {\r\n\t\t\treturn -1;\r\n\t\t} else {\r\n\t\t\tif(aa > bb) {\r\n\t\t\t\treturn 1;\r\n\t\t\t} else {\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\tfor(t=0; t<tiddlers.length; t++) {\r\n\t\ttitles.push(tiddlers[t].fields.title);\r\n\t}\r\n\treturn titles;\r\n};\r\n\r\nexports.countTiddlers = function(excludeTag) {\r\n\tvar tiddlers = this.getTiddlers({excludeTag: excludeTag});\r\n\treturn $tw.utils.count(tiddlers);\r\n};\r\n\r\n/*\r\nReturns a function iterator(callback) that iterates through the specified titles, and invokes the callback with callback(tiddler,title)\r\n*/\r\nexports.makeTiddlerIterator = function(titles) {\r\n\tvar self = this;\r\n\tif(!$tw.utils.isArray(titles)) {\r\n\t\ttitles = Object.keys(titles);\r\n\t} else {\r\n\t\ttitles = titles.slice(0);\r\n\t}\r\n\treturn function(callback) {\r\n\t\ttitles.forEach(function(title) {\r\n\t\t\tcallback(self.getTiddler(title),title);\r\n\t\t});\r\n\t};\r\n};\r\n\r\n/*\r\nSort an array of tiddler titles by a specified field\r\n\ttitles: array of titles (sorted in place)\r\n\tsortField: name of field to sort by\r\n\tisDescending: true if the sort should be descending\r\n\tisCaseSensitive: true if the sort should consider upper and lower case letters to be different\r\n*/\r\nexports.sortTiddlers = function(titles,sortField,isDescending,isCaseSensitive,isNumeric) {\r\n\tvar self = this;\r\n\ttitles.sort(function(a,b) {\r\n\t\tif(sortField !== \"title\") {\r\n\t\t\tvar tiddlerA = self.getTiddler(a),\r\n\t\t\t\ttiddlerB = self.getTiddler(b);\r\n\t\t\tif(tiddlerA) {\r\n\t\t\t\ta = tiddlerA.fields[sortField] || \"\";\r\n\t\t\t} else {\r\n\t\t\t\ta = \"\";\r\n\t\t\t}\r\n\t\t\tif(tiddlerB) {\r\n\t\t\t\tb = tiddlerB.fields[sortField] || \"\";\r\n\t\t\t} else {\r\n\t\t\t\tb = \"\";\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(isNumeric) {\r\n\t\t\ta = Number(a);\r\n\t\t\tb = Number(b);\r\n\t\t\treturn isDescending ? b - a : a - b;\r\n\t\t} else if($tw.utils.isDate(a) && $tw.utils.isDate(b)) {\r\n\t\t\treturn isDescending ? b - a : a - b;\r\n\t\t} else {\r\n\t\t\ta = String(a);\r\n\t\t\tb = String(b);\r\n\t\t\tif(!isCaseSensitive) {\r\n\t\t\t\ta = a.toLowerCase();\r\n\t\t\t\tb = b.toLowerCase();\r\n\t\t\t}\r\n\t\t\treturn isDescending ? b.localeCompare(a) : a.localeCompare(b);\r\n\t\t}\r\n\t});\r\n};\r\n\r\n/*\r\nFor every tiddler invoke a callback(title,tiddler) with `this` set to the wiki object. Options include:\r\nsortField: field to sort by\r\nexcludeTag: tag to exclude\r\nincludeSystem: whether to include system tiddlers (defaults to false)\r\n*/\r\nexports.forEachTiddler = function(/* [options,]callback */) {\r\n\tvar arg = 0,\r\n\t\toptions = arguments.length >= 2 ? arguments[arg++] : {},\r\n\t\tcallback = arguments[arg++],\r\n\t\ttitles = this.getTiddlers(options),\r\n\t\tt, tiddler;\r\n\tfor(t=0; t<titles.length; t++) {\r\n\t\ttiddler = this.getTiddler(titles[t]);\r\n\t\tif(tiddler) {\r\n\t\t\tcallback.call(this,tiddler.fields.title,tiddler);\r\n\t\t}\r\n\t}\r\n};\r\n\r\n/*\r\nReturn an array of tiddler titles that are directly linked from the specified tiddler\r\n*/\r\nexports.getTiddlerLinks = function(title) {\r\n\tvar self = this;\r\n\t// We'll cache the links so they only get computed if the tiddler changes\r\n\treturn this.getCacheForTiddler(title,\"links\",function() {\r\n\t\t// Parse the tiddler\r\n\t\tvar parser = self.parseTiddler(title);\r\n\t\t// Count up the links\r\n\t\tvar links = [],\r\n\t\t\tcheckParseTree = function(parseTree) {\r\n\t\t\t\tfor(var t=0; t<parseTree.length; t++) {\r\n\t\t\t\t\tvar parseTreeNode = parseTree[t];\r\n\t\t\t\t\tif(parseTreeNode.type === \"link\" && parseTreeNode.attributes.to && parseTreeNode.attributes.to.type === \"string\") {\r\n\t\t\t\t\t\tvar value = parseTreeNode.attributes.to.value;\r\n\t\t\t\t\t\tif(links.indexOf(value) === -1) {\r\n\t\t\t\t\t\t\tlinks.push(value);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(parseTreeNode.children) {\r\n\t\t\t\t\t\tcheckParseTree(parseTreeNode.children);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\tif(parser) {\r\n\t\t\tcheckParseTree(parser.tree);\r\n\t\t}\r\n\t\treturn links;\r\n\t});\r\n};\r\n\r\n/*\r\nReturn an array of tiddler titles that link to the specified tiddler\r\n*/\r\nexports.getTiddlerBacklinks = function(targetTitle) {\r\n\tvar self = this,\r\n\t\tbacklinks = [];\r\n\tthis.forEachTiddler(function(title,tiddler) {\r\n\t\tvar links = self.getTiddlerLinks(title);\r\n\t\tif(links.indexOf(targetTitle) !== -1) {\r\n\t\t\tbacklinks.push(title);\r\n\t\t}\r\n\t});\r\n\treturn backlinks;\r\n};\r\n\r\n/*\r\nReturn a hashmap of tiddler titles that are referenced but not defined. Each value is the number of times the missing tiddler is referenced\r\n*/\r\nexports.getMissingTitles = function() {\r\n\tvar self = this,\r\n\t\tmissing = [];\r\n// We should cache the missing tiddler list, even if we recreate it every time any tiddler is modified\r\n\tthis.forEachTiddler(function(title,tiddler) {\r\n\t\tvar links = self.getTiddlerLinks(title);\r\n\t\t$tw.utils.each(links,function(link) {\r\n\t\t\tif((!self.tiddlerExists(link) && !self.isShadowTiddler(link)) && missing.indexOf(link) === -1) {\r\n\t\t\t\tmissing.push(link);\r\n\t\t\t}\r\n\t\t});\r\n\t});\r\n\treturn missing;\r\n};\r\n\r\nexports.getOrphanTitles = function() {\r\n\tvar self = this,\r\n\t\torphans = this.getTiddlers();\r\n\tthis.forEachTiddler(function(title,tiddler) {\r\n\t\tvar links = self.getTiddlerLinks(title);\r\n\t\t$tw.utils.each(links,function(link) {\r\n\t\t\tvar p = orphans.indexOf(link);\r\n\t\t\tif(p !== -1) {\r\n\t\t\t\torphans.splice(p,1);\r\n\t\t\t}\r\n\t\t});\r\n\t});\r\n\treturn orphans; // Todo\r\n};\r\n\r\n/*\r\nRetrieves a list of the tiddler titles that are tagged with a given tag\r\n*/\r\nexports.getTiddlersWithTag = function(tag) {\r\n\tvar self = this;\r\n\treturn this.getGlobalCache(\"taglist-\" + tag,function() {\r\n\t\tvar tagmap = self.getTagMap();\r\n\t\treturn self.sortByList(tagmap[tag],tag);\r\n\t});\r\n};\r\n\r\n/*\r\nGet a hashmap by tag of arrays of tiddler titles\r\n*/\r\nexports.getTagMap = function() {\r\n\tvar self = this;\r\n\treturn this.getGlobalCache(\"tagmap\",function() {\r\n\t\tvar tags = Object.create(null),\r\n\t\t\tstoreTags = function(tagArray,title) {\r\n\t\t\t\tif(tagArray) {\r\n\t\t\t\t\tfor(var index=0; index<tagArray.length; index++) {\r\n\t\t\t\t\t\tvar tag = tagArray[index];\r\n\t\t\t\t\t\tif($tw.utils.hop(tags,tag)) {\r\n\t\t\t\t\t\t\ttags[tag].push(title);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\ttags[tag] = [title];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\ttitle, tiddler;\r\n\t\t// Collect up all the tags\r\n\t\tself.eachShadow(function(tiddler,title) {\r\n\t\t\tif(!self.tiddlerExists(title)) {\r\n\t\t\t\ttiddler = self.getTiddler(title);\r\n\t\t\t\tstoreTags(tiddler.fields.tags,title);\r\n\t\t\t}\r\n\t\t});\r\n\t\tself.each(function(tiddler,title) {\r\n\t\t\tstoreTags(tiddler.fields.tags,title);\r\n\t\t});\r\n\t\treturn tags;\r\n\t});\r\n};\r\n\r\n/*\r\nLookup a given tiddler and return a list of all the tiddlers that include it in the specified list field\r\n*/\r\nexports.findListingsOfTiddler = function(targetTitle,fieldName) {\r\n\tfieldName = fieldName || \"list\";\r\n\tvar titles = [];\r\n\tthis.each(function(tiddler,title) {\r\n\t\tvar list = $tw.utils.parseStringArray(tiddler.fields[fieldName]);\r\n\t\tif(list && list.indexOf(targetTitle) !== -1) {\r\n\t\t\ttitles.push(title);\r\n\t\t}\r\n\t});\r\n\treturn titles;\r\n};\r\n\r\n/*\r\nSorts an array of tiddler titles according to an ordered list\r\n*/\r\nexports.sortByList = function(array,listTitle) {\r\n\tvar list = this.getTiddlerList(listTitle);\r\n\tif(!array || array.length === 0) {\r\n\t\treturn [];\r\n\t} else {\r\n\t\tvar titles = [], t, title;\r\n\t\t// First place any entries that are present in the list\r\n\t\tfor(t=0; t<list.length; t++) {\r\n\t\t\ttitle = list[t];\r\n\t\t\tif(array.indexOf(title) !== -1) {\r\n\t\t\t\ttitles.push(title);\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Then place any remaining entries\r\n\t\tfor(t=0; t<array.length; t++) {\r\n\t\t\ttitle = array[t];\r\n\t\t\tif(list.indexOf(title) === -1) {\r\n\t\t\t\ttitles.push(title);\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Finally obey the list-before and list-after fields of each tiddler in turn\r\n\t\tvar sortedTitles = titles.slice(0);\r\n\t\tfor(t=0; t<sortedTitles.length; t++) {\r\n\t\t\ttitle = sortedTitles[t];\r\n\t\t\tvar currPos = titles.indexOf(title),\r\n\t\t\t\tnewPos = -1,\r\n\t\t\t\ttiddler = this.getTiddler(title);\r\n\t\t\tif(tiddler) {\r\n\t\t\t\tvar beforeTitle = tiddler.fields[\"list-before\"],\r\n\t\t\t\t\tafterTitle = tiddler.fields[\"list-after\"];\r\n\t\t\t\tif(beforeTitle === \"\") {\r\n\t\t\t\t\tnewPos = 0;\r\n\t\t\t\t} else if(beforeTitle) {\r\n\t\t\t\t\tnewPos = titles.indexOf(beforeTitle);\r\n\t\t\t\t} else if(afterTitle) {\r\n\t\t\t\t\tnewPos = titles.indexOf(afterTitle);\r\n\t\t\t\t\tif(newPos >= 0) {\r\n\t\t\t\t\t\t++newPos;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(newPos === -1) {\r\n\t\t\t\t\tnewPos = currPos;\r\n\t\t\t\t}\r\n\t\t\t\tif(newPos !== currPos) {\r\n\t\t\t\t\ttitles.splice(currPos,1);\r\n\t\t\t\t\tif(newPos >= currPos) {\r\n\t\t\t\t\t\tnewPos--;\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttitles.splice(newPos,0,title);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\treturn titles;\r\n\t}\r\n};\r\n\r\nexports.getSubTiddler = function(title,subTiddlerTitle) {\r\n\tvar bundleInfo = this.getPluginInfo(title) || this.getTiddlerData(title);\r\n\tif(bundleInfo && bundleInfo.tiddlers) {\r\n\t\tvar subTiddler = bundleInfo.tiddlers[subTiddlerTitle];\r\n\t\tif(subTiddler) {\r\n\t\t\treturn new $tw.Tiddler(subTiddler);\r\n\t\t}\r\n\t}\r\n\treturn null;\r\n};\r\n\r\n/*\r\nRetrieve a tiddler as a JSON string of the fields\r\n*/\r\nexports.getTiddlerAsJson = function(title) {\r\n\tvar tiddler = this.getTiddler(title);\r\n\tif(tiddler) {\r\n\t\tvar fields = Object.create(null);\r\n\t\t$tw.utils.each(tiddler.fields,function(value,name) {\r\n\t\t\tfields[name] = tiddler.getFieldString(name);\r\n\t\t});\r\n\t\treturn JSON.stringify(fields);\r\n\t} else {\r\n\t\treturn JSON.stringify({title: title});\r\n\t}\r\n};\r\n\r\n/*\r\nGet the content of a tiddler as a JavaScript object. How this is done depends on the type of the tiddler:\r\n\r\napplication/json: the tiddler JSON is parsed into an object\r\napplication/x-tiddler-dictionary: the tiddler is parsed as sequence of name:value pairs\r\n\r\nOther types currently just return null.\r\n\r\ntitleOrTiddler: string tiddler title or a tiddler object\r\ndefaultData: default data to be returned if the tiddler is missing or doesn't contain data\r\n*/\r\nexports.getTiddlerData = function(titleOrTiddler,defaultData) {\r\n\tvar tiddler = titleOrTiddler,\r\n\t\tdata;\r\n\tif(!(tiddler instanceof $tw.Tiddler)) {\r\n\t\ttiddler = this.getTiddler(tiddler);\t\r\n\t}\r\n\tif(tiddler && tiddler.fields.text) {\r\n\t\tswitch(tiddler.fields.type) {\r\n\t\t\tcase \"application/json\":\r\n\t\t\t\t// JSON tiddler\r\n\t\t\t\ttry {\r\n\t\t\t\t\tdata = JSON.parse(tiddler.fields.text);\r\n\t\t\t\t} catch(ex) {\r\n\t\t\t\t\treturn defaultData;\r\n\t\t\t\t}\r\n\t\t\t\treturn data;\r\n\t\t\tcase \"application/x-tiddler-dictionary\":\r\n\t\t\t\treturn $tw.utils.parseFields(tiddler.fields.text);\r\n\t\t}\r\n\t}\r\n\treturn defaultData;\r\n};\r\n\r\n/*\r\nExtract an indexed field from within a data tiddler\r\n*/\r\nexports.extractTiddlerDataItem = function(titleOrTiddler,index,defaultText) {\r\n\tvar data = this.getTiddlerData(titleOrTiddler,Object.create(null)),\r\n\t\ttext;\r\n\tif(data && $tw.utils.hop(data,index)) {\r\n\t\ttext = data[index];\r\n\t}\r\n\tif(typeof text === \"string\" || typeof text === \"number\") {\r\n\t\treturn text.toString();\r\n\t} else {\r\n\t\treturn defaultText;\r\n\t}\r\n};\r\n\r\n/*\r\nSet a tiddlers content to a JavaScript object. Currently this is done by setting the tiddler's type to \"application/json\" and setting the text to the JSON text of the data.\r\ntitle: title of tiddler\r\ndata: object that can be serialised to JSON\r\nfields: optional hashmap of additional tiddler fields to be set\r\n*/\r\nexports.setTiddlerData = function(title,data,fields) {\r\n\tvar existingTiddler = this.getTiddler(title),\r\n\t\tnewFields = {\r\n\t\t\ttitle: title\r\n\t};\r\n\tif(existingTiddler && existingTiddler.fields.type === \"application/x-tiddler-dictionary\") {\r\n\t\tnewFields.text = $tw.utils.makeTiddlerDictionary(data);\r\n\t} else {\r\n\t\tnewFields.type = \"application/json\";\r\n\t\tnewFields.text = JSON.stringify(data,null,$tw.config.preferences.jsonSpaces);\r\n\t}\r\n\tthis.addTiddler(new $tw.Tiddler(this.getCreationFields(),existingTiddler,fields,newFields,this.getModificationFields()));\r\n};\r\n\r\n/*\r\nReturn the content of a tiddler as an array containing each line\r\n*/\r\nexports.getTiddlerList = function(title,field,index) {\r\n\tif(index) {\r\n\t\treturn $tw.utils.parseStringArray(this.extractTiddlerDataItem(title,index,\"\"));\r\n\t}\r\n\tfield = field || \"list\";\r\n\tvar tiddler = this.getTiddler(title);\r\n\tif(tiddler) {\r\n\t\treturn ($tw.utils.parseStringArray(tiddler.fields[field]) || []).slice(0);\r\n\t}\r\n\treturn [];\r\n};\r\n\r\n// Return a named global cache object. Global cache objects are cleared whenever a tiddler change occurs\r\nexports.getGlobalCache = function(cacheName,initializer) {\r\n\tthis.globalCache = this.globalCache || Object.create(null);\r\n\tif($tw.utils.hop(this.globalCache,cacheName)) {\r\n\t\treturn this.globalCache[cacheName];\r\n\t} else {\r\n\t\tthis.globalCache[cacheName] = initializer();\r\n\t\treturn this.globalCache[cacheName];\r\n\t}\r\n};\r\n\r\nexports.clearGlobalCache = function() {\r\n\tthis.globalCache = Object.create(null);\r\n};\r\n\r\n// Return the named cache object for a tiddler. If the cache doesn't exist then the initializer function is invoked to create it\r\nexports.getCacheForTiddler = function(title,cacheName,initializer) {\r\n\r\n// Temporarily disable caching so that tweakParseTreeNode() works\r\nreturn initializer();\r\n\r\n//\tthis.caches = this.caches || Object.create(null);\r\n//\tvar caches = this.caches[title];\r\n//\tif(caches && caches[cacheName]) {\r\n//\t\treturn caches[cacheName];\r\n//\t} else {\r\n//\t\tif(!caches) {\r\n//\t\t\tcaches = Object.create(null);\r\n//\t\t\tthis.caches[title] = caches;\r\n//\t\t}\r\n//\t\tcaches[cacheName] = initializer();\r\n//\t\treturn caches[cacheName];\r\n//\t}\r\n};\r\n\r\n// Clear all caches associated with a particular tiddler\r\nexports.clearCache = function(title) {\r\n\tthis.caches = this.caches || Object.create(null);\r\n\tif($tw.utils.hop(this.caches,title)) {\r\n\t\tdelete this.caches[title];\r\n\t}\r\n};\r\n\r\nexports.initParsers = function(moduleType) {\r\n\t// Install the parser modules\r\n\t$tw.Wiki.parsers = {};\r\n\tvar self = this;\r\n\t$tw.modules.forEachModuleOfType(\"parser\",function(title,module) {\r\n\t\tfor(var f in module) {\r\n\t\t\tif($tw.utils.hop(module,f)) {\r\n\t\t\t\t$tw.Wiki.parsers[f] = module[f]; // Store the parser class\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n};\r\n\r\n/*\r\nParse a block of text of a specified MIME type\r\n\ttype: content type of text to be parsed\r\n\ttext: text\r\n\toptions: see below\r\nOptions include:\r\n\tparseAsInline: if true, the text of the tiddler will be parsed as an inline run\r\n\t_canonical_uri: optional string of the canonical URI of this content\r\n*/\r\nexports.old_parseText = function(type,text,options) {\r\n\toptions = options || {};\r\n\t// Select a parser\r\n\tvar Parser = $tw.Wiki.parsers[type];\r\n\tif(!Parser && $tw.config.fileExtensionInfo[type]) {\r\n\t\tParser = $tw.Wiki.parsers[$tw.config.fileExtensionInfo[type].type];\r\n\t}\r\n\tif(!Parser) {\r\n\t\tParser = $tw.Wiki.parsers[options.defaultType || \"text/vnd.tiddlywiki\"];\r\n\t}\r\n\tif(!Parser) {\r\n\t\treturn null;\r\n\t}\r\n\t// Return the parser instance\r\n\treturn new Parser(type,text,{\r\n\t\tparseAsInline: options.parseAsInline,\r\n\t\twiki: this,\r\n\t\t_canonical_uri: options._canonical_uri\r\n\t});\r\n};\r\n\r\n/*\r\nParse a tiddler according to its MIME type\r\n*/\r\nexports.old_parseTiddler = function(title,options) {\r\n\toptions = $tw.utils.extend({},options);\r\n\tvar cacheType = options.parseAsInline ? \"newInlineParseTree\" : \"newBlockParseTree\",\r\n\t\ttiddler = this.getTiddler(title),\r\n\t\tself = this;\r\n\treturn tiddler ? this.getCacheForTiddler(title,cacheType,function() {\r\n\t\t\tif(tiddler.hasField(\"_canonical_uri\")) {\r\n\t\t\t\toptions._canonical_uri = tiddler.fields._canonical_uri;\r\n\t\t\t}\r\n\t\t\treturn self.old_parseText(tiddler.fields.type,tiddler.fields.text,options);\r\n\t\t}) : null;\r\n};\r\n\r\nvar tweakMacroDefinition = function(nodeList) {\r\n\tif(nodeList && nodeList[0] && nodeList[0].type === \"macrodef\") {\r\n\t\tnodeList[0].type = \"set\";\r\n\t\tnodeList[0].attributes = {\r\n\t\t\tname: {type: \"string\", value: nodeList[0].name},\r\n\t\t\tvalue: {type: \"string\", value: nodeList[0].text}\r\n\t\t};\r\n\t\tnodeList[0].children = nodeList.slice(1);\r\n\t\tnodeList.splice(1,nodeList.length-1);\r\n\t\ttweakMacroDefinition(nodeList[0].children);\r\n\t}\r\n};\r\n\r\nvar tweakParser = function(parser) {\r\n\t// Move any macro definitions to contain the body tree\r\n\ttweakMacroDefinition(parser.tree);\r\n};\r\n\r\nexports.parseText = function(type,text,options) {\r\n\tvar parser = this.old_parseText(type,text,options);\r\n\tif(parser) {\r\n\t\ttweakParser(parser);\r\n\t}\r\n\treturn parser;\r\n};\r\n\r\nexports.parseTiddler = function(title,options) {\r\n\tvar parser = this.old_parseTiddler(title,options);\r\n\tif(parser) {\r\n\t\ttweakParser(parser);\r\n\t}\r\n\treturn parser;\r\n};\r\n\r\nexports.parseTextReference = function(title,field,index,options) {\r\n\tvar tiddler,text;\r\n\tif(options.subTiddler) {\r\n\t\ttiddler = this.getSubTiddler(title,options.subTiddler);\r\n\t} else {\r\n\t\ttiddler = this.getTiddler(title);\r\n\t\tif(field === \"text\" || (!field && !index)) {\r\n\t\t\tthis.getTiddlerText(title); // Force the tiddler to be lazily loaded\r\n\t\t\treturn this.parseTiddler(title,options);\r\n\t\t}\r\n\t}\r\n\tif(field === \"text\" || (!field && !index)) {\r\n\t\tif(tiddler && tiddler.fields) {\r\n\t\t\treturn this.parseText(tiddler.fields.type || \"text/vnd.tiddlywiki\",tiddler.fields.text,options);\t\t\t\r\n\t\t} else {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t} else if(field) {\r\n\t\tif(field === \"title\") {\r\n\t\t\ttext = title;\r\n\t\t} else {\r\n\t\t\tif(!tiddler || !tiddler.hasField(field)) {\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t\ttext = tiddler.fields[field];\r\n\t\t}\r\n\t\treturn this.parseText(\"text/vnd.tiddlywiki\",text.toString(),options);\r\n\t} else if(index) {\r\n\t\tthis.getTiddlerText(title); // Force the tiddler to be lazily loaded\r\n\t\ttext = this.extractTiddlerDataItem(tiddler,index,undefined);\r\n\t\tif(text === undefined) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn this.parseText(\"text/vnd.tiddlywiki\",text,options);\r\n\t}\r\n};\r\n\r\n/*\r\nMake a widget tree for a parse tree\r\nparser: parser object\r\noptions: see below\r\nOptions include:\r\ndocument: optional document to use\r\nvariables: hashmap of variables to set\r\nparentWidget: optional parent widget for the root node\r\n*/\r\nexports.makeWidget = function(parser,options) {\r\n\toptions = options || {};\r\n\tvar widgetNode = {\r\n\t\t\ttype: \"widget\",\r\n\t\t\tchildren: []\r\n\t\t},\r\n\t\tcurrWidgetNode = widgetNode;\r\n\t// Create set variable widgets for each variable\r\n\t$tw.utils.each(options.variables,function(value,name) {\r\n\t\tvar setVariableWidget = {\r\n\t\t\ttype: \"set\",\r\n\t\t\tattributes: {\r\n\t\t\t\tname: {type: \"string\", value: name},\r\n\t\t\t\tvalue: {type: \"string\", value: value}\r\n\t\t\t},\r\n\t\t\tchildren: []\r\n\t\t};\r\n\t\tcurrWidgetNode.children = [setVariableWidget];\r\n\t\tcurrWidgetNode = setVariableWidget;\r\n\t});\r\n\t// Add in the supplied parse tree nodes\r\n\tcurrWidgetNode.children = parser ? parser.tree : [];\r\n\t// Create the widget\r\n\treturn new widget.widget(widgetNode,{\r\n\t\twiki: this,\r\n\t\tdocument: options.document || $tw.fakeDocument,\r\n\t\tparentWidget: options.parentWidget\r\n\t});\r\n};\r\n\r\n/*\r\nMake a widget tree for transclusion\r\ntitle: target tiddler title\r\noptions: as for wiki.makeWidget() plus:\r\noptions.field: optional field to transclude (defaults to \"text\")\r\noptions.children: optional array of children for the transclude widget\r\n*/\r\nexports.makeTranscludeWidget = function(title,options) {\r\n\toptions = options || {};\r\n\tvar parseTree = {tree: [{\r\n\t\t\ttype: \"element\",\r\n\t\t\ttag: \"div\",\r\n\t\t\tchildren: [{\r\n\t\t\t\ttype: \"transclude\",\r\n\t\t\t\tattributes: {\r\n\t\t\t\t\ttiddler: {\r\n\t\t\t\t\t\tname: \"tiddler\",\r\n\t\t\t\t\t\ttype: \"string\",\r\n\t\t\t\t\t\tvalue: title}},\r\n\t\t\t\tisBlock: !options.parseAsInline}]}\r\n\t]};\r\n\tif(options.field) {\r\n\t\tparseTree.tree[0].children[0].attributes.field = {type: \"string\", value: options.field};\r\n\t}\r\n\tif(options.children) {\r\n\t\tparseTree.tree[0].children[0].children = options.children;\r\n\t}\r\n\treturn $tw.wiki.makeWidget(parseTree,options);\r\n};\r\n\r\n/*\r\nParse text in a specified format and render it into another format\r\n\toutputType: content type for the output\r\n\ttextType: content type of the input text\r\n\ttext: input text\r\n\toptions: see below\r\nOptions include:\r\nvariables: hashmap of variables to set\r\nparentWidget: optional parent widget for the root node\r\n*/\r\nexports.renderText = function(outputType,textType,text,options) {\r\n\toptions = options || {};\r\n\tvar parser = this.parseText(textType,text,options),\r\n\t\twidgetNode = this.makeWidget(parser,options);\r\n\tvar container = $tw.fakeDocument.createElement(\"div\");\r\n\twidgetNode.render(container,null);\r\n\treturn outputType === \"text/html\" ? container.innerHTML : container.textContent;\r\n};\r\n\r\n/*\r\nParse text from a tiddler and render it into another format\r\n\toutputType: content type for the output\r\n\ttitle: title of the tiddler to be rendered\r\n\toptions: see below\r\nOptions include:\r\nvariables: hashmap of variables to set\r\nparentWidget: optional parent widget for the root node\r\n*/\r\nexports.renderTiddler = function(outputType,title,options) {\r\n\toptions = options || {};\r\n\tvar parser = this.parseTiddler(title,options),\r\n\t\twidgetNode = this.makeWidget(parser,options);\r\n\tvar container = $tw.fakeDocument.createElement(\"div\");\r\n\twidgetNode.render(container,null);\r\n\treturn outputType === \"text/html\" ? container.innerHTML : (outputType === \"text/plain-formatted\" ? container.formattedTextContent : container.textContent);\r\n};\r\n\r\n/*\r\nReturn an array of tiddler titles that match a search string\r\n\ttext: The text string to search for\r\n\toptions: see below\r\nOptions available:\r\n\tsource: an iterator function for the source tiddlers, called source(iterator), where iterator is called as iterator(tiddler,title)\r\n\texclude: An array of tiddler titles to exclude from the search\r\n\tinvert: If true returns tiddlers that do not contain the specified string\r\n\tcaseSensitive: If true forces a case sensitive search\r\n\tliteral: If true, searches for literal string, rather than separate search terms\r\n\tfield: If specified, restricts the search to the specified field\r\n*/\r\nexports.search = function(text,options) {\r\n\toptions = options || {};\r\n\tvar self = this,\r\n\t\tt,\r\n\t\tinvert = !!options.invert;\r\n\t// Convert the search string into a regexp for each term\r\n\tvar terms, searchTermsRegExps,\r\n\t\tflags = options.caseSensitive ? \"\" : \"i\";\r\n\tif(options.literal) {\r\n\t\tif(text.length === 0) {\r\n\t\t\tsearchTermsRegExps = null;\r\n\t\t} else {\r\n\t\t\tsearchTermsRegExps = [new RegExp(\"(\" + $tw.utils.escapeRegExp(text) + \")\",flags)];\r\n\t\t}\r\n\t} else {\r\n\t\tterms = text.split(/ +/);\r\n\t\tif(terms.length === 1 && terms[0] === \"\") {\r\n\t\t\tsearchTermsRegExps = null;\r\n\t\t} else {\r\n\t\t\tsearchTermsRegExps = [];\r\n\t\t\tfor(t=0; t<terms.length; t++) {\r\n\t\t\t\tsearchTermsRegExps.push(new RegExp(\"(\" + $tw.utils.escapeRegExp(terms[t]) + \")\",flags));\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t// Function to check a given tiddler for the search term\r\n\tvar searchTiddler = function(title) {\r\n\t\tif(!searchTermsRegExps) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tvar tiddler = self.getTiddler(title);\r\n\t\tif(!tiddler) {\r\n\t\t\ttiddler = new $tw.Tiddler({title: title, text: \"\", type: \"text/vnd.tiddlywiki\"});\r\n\t\t}\r\n\t\tvar contentTypeInfo = $tw.config.contentTypeInfo[tiddler.fields.type] || $tw.config.contentTypeInfo[\"text/vnd.tiddlywiki\"],\r\n\t\t\tmatch;\r\n\t\tfor(var t=0; t<searchTermsRegExps.length; t++) {\r\n\t\t\tmatch = false;\r\n\t\t\tif(options.field) {\r\n\t\t\t\tmatch = searchTermsRegExps[t].test(tiddler.getFieldString(options.field));\r\n\t\t\t} else {\r\n\t\t\t\t// Search title, tags and body\r\n\t\t\t\tif(contentTypeInfo.encoding === \"utf8\") {\r\n\t\t\t\t\tmatch = match || searchTermsRegExps[t].test(tiddler.fields.text);\r\n\t\t\t\t}\r\n\t\t\t\tvar tags = tiddler.fields.tags ? tiddler.fields.tags.join(\"\\0\") : \"\";\r\n\t\t\t\tmatch = match || searchTermsRegExps[t].test(tags) || searchTermsRegExps[t].test(tiddler.fields.title);\r\n\t\t\t}\r\n\t\t\tif(!match) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t};\r\n\t// Loop through all the tiddlers doing the search\r\n\tvar results = [],\r\n\t\tsource = options.source || this.each;\r\n\tsource(function(tiddler,title) {\r\n\t\tif(searchTiddler(title) !== options.invert) {\r\n\t\t\tresults.push(title);\r\n\t\t}\r\n\t});\r\n\t// Remove any of the results we have to exclude\r\n\tif(options.exclude) {\r\n\t\tfor(t=0; t<options.exclude.length; t++) {\r\n\t\t\tvar p = results.indexOf(options.exclude[t]);\r\n\t\t\tif(p !== -1) {\r\n\t\t\t\tresults.splice(p,1);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn results;\r\n};\r\n\r\n/*\r\nTrigger a load for a tiddler if it is skinny. Returns the text, or undefined if the tiddler is missing, null if the tiddler is being lazily loaded.\r\n*/\r\nexports.getTiddlerText = function(title,defaultText) {\r\n\tvar tiddler = this.getTiddler(title);\r\n\t// Return undefined if the tiddler isn't found\r\n\tif(!tiddler) {\r\n\t\treturn defaultText;\r\n\t}\r\n\tif(tiddler.fields.text !== undefined) {\r\n\t\t// Just return the text if we've got it\r\n\t\treturn tiddler.fields.text;\r\n\t} else {\r\n\t\t// Tell any listeners about the need to lazily load this tiddler\r\n\t\tthis.dispatchEvent(\"lazyLoad\",title);\r\n\t\t// Indicate that the text is being loaded\r\n\t\treturn null;\r\n\t}\r\n};\r\n\r\n/*\r\nRead an array of browser File objects, invoking callback(tiddlerFieldsArray) once they're all read\r\n*/\r\nexports.readFiles = function(files,callback) {\r\n\tvar result = [],\r\n\t\toutstanding = files.length;\r\n\tfor(var f=0; f<files.length; f++) {\r\n\t\tthis.readFile(files[f],function(tiddlerFieldsArray) {\r\n\t\t\tresult.push.apply(result,tiddlerFieldsArray);\r\n\t\t\tif(--outstanding === 0) {\r\n\t\t\t\tcallback(result);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\treturn files.length;\r\n};\r\n\r\n/*\r\nRead a browser File object, invoking callback(tiddlerFieldsArray) with an array of tiddler fields objects\r\n*/\r\nexports.readFile = function(file,callback) {\r\n\t// Get the type, falling back to the filename extension\r\n\tvar self = this,\r\n\t\ttype = file.type;\r\n\tif(type === \"\" || !type) {\r\n\t\tvar dotPos = file.name.lastIndexOf(\".\");\r\n\t\tif(dotPos !== -1) {\r\n\t\t\tvar fileExtensionInfo = $tw.config.fileExtensionInfo[file.name.substr(dotPos)];\r\n\t\t\tif(fileExtensionInfo) {\r\n\t\t\t\ttype = fileExtensionInfo.type;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t// Figure out if we're reading a binary file\r\n\tvar contentTypeInfo = $tw.config.contentTypeInfo[type],\r\n\t\tisBinary = contentTypeInfo ? contentTypeInfo.encoding === \"base64\" : false;\r\n\t// Log some debugging information\r\n\tif($tw.log.IMPORT) {\r\n\t\tconsole.log(\"Importing file '\" + file.name + \"', type: '\" + type + \"', isBinary: \" + isBinary);\r\n\t}\r\n\t// Create the FileReader\r\n\tvar reader = new FileReader();\r\n\t// Onload\r\n\treader.onload = function(event) {\r\n\t\t// Deserialise the file contents\r\n\t\tvar text = event.target.result,\r\n\t\t\ttiddlerFields = {title: file.name || \"Untitled\", type: type};\r\n\t\t// Are we binary?\r\n\t\tif(isBinary) {\r\n\t\t\t// The base64 section starts after the first comma in the data URI\r\n\t\t\tvar commaPos = text.indexOf(\",\");\r\n\t\t\tif(commaPos !== -1) {\r\n\t\t\t\ttiddlerFields.text = text.substr(commaPos+1);\r\n\t\t\t\tcallback([tiddlerFields]);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t// Check whether this is an encrypted TiddlyWiki file\r\n\t\t\tvar encryptedJson = $tw.utils.extractEncryptedStoreArea(text);\r\n\t\t\tif(encryptedJson) {\r\n\t\t\t\t// If so, attempt to decrypt it with the current password\r\n\t\t\t\t$tw.utils.decryptStoreAreaInteractive(encryptedJson,function(tiddlers) {\r\n\t\t\t\t\tcallback(tiddlers);\r\n\t\t\t\t});\r\n\t\t\t} else {\r\n\t\t\t\t// Otherwise, just try to deserialise any tiddlers in the file\r\n\t\t\t\tcallback(self.deserializeTiddlers(type,text,tiddlerFields));\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\t// Kick off the read\r\n\tif(isBinary) {\r\n\t\treader.readAsDataURL(file);\r\n\t} else {\r\n\t\treader.readAsText(file);\r\n\t}\r\n};\r\n\r\n/*\r\nFind any existing draft of a specified tiddler\r\n*/\r\nexports.findDraft = function(targetTitle) {\r\n\tvar draftTitle = undefined;\r\n\tthis.forEachTiddler({includeSystem: true},function(title,tiddler) {\r\n\t\tif(tiddler.fields[\"draft.title\"] && tiddler.fields[\"draft.of\"] === targetTitle) {\r\n\t\t\tdraftTitle = title;\r\n\t\t}\r\n\t});\r\n\treturn draftTitle;\r\n}\r\n\r\n/*\r\nCheck whether the specified draft tiddler has been modified\r\n*/\r\nexports.isDraftModified = function(title) {\r\n\tvar tiddler = this.getTiddler(title);\r\n\tif(!tiddler.isDraft()) {\r\n\t\treturn false;\r\n\t}\r\n\tvar ignoredFields = [\"created\", \"modified\", \"title\", \"draft.title\", \"draft.of\"],\r\n\t\torigTiddler = this.getTiddler(tiddler.fields[\"draft.of\"]);\r\n\tif(!origTiddler) {\r\n\t\treturn tiddler.fields.text !== \"\";\r\n\t}\r\n\treturn tiddler.fields[\"draft.title\"] !== tiddler.fields[\"draft.of\"] || !tiddler.isEqual(origTiddler,ignoredFields);\r\n};\r\n\r\n/*\r\nAdd a new record to the top of the history stack\r\ntitle: a title string or an array of title strings\r\nfromPageRect: page coordinates of the origin of the navigation\r\nhistoryTitle: title of history tiddler (defaults to $:/HistoryList)\r\n*/\r\nexports.addToHistory = function(title,fromPageRect,historyTitle) {\r\n\thistoryTitle = historyTitle || \"$:/HistoryList\";\r\n\tvar titles = $tw.utils.isArray(title) ? title : [title];\r\n\t// Add a new record to the top of the history stack\r\n\tvar historyList = this.getTiddlerData(historyTitle,[]);\r\n\t$tw.utils.each(titles,function(title) {\r\n\t\thistoryList.push({title: title, fromPageRect: fromPageRect});\r\n\t});\r\n\tthis.setTiddlerData(historyTitle,historyList,{\"current-tiddler\": titles[titles.length-1]});\r\n};\r\n\r\n/*\r\nInvoke the available upgrader modules\r\ntitles: array of tiddler titles to be processed\r\ntiddlers: hashmap by title of tiddler fields of pending import tiddlers. These can be modified by the upgraders. An entry with no fields indicates a tiddler that was pending import has been suppressed. When entries are added to the pending import the tiddlers hashmap may have entries that are not present in the titles array\r\nReturns a hashmap of messages keyed by tiddler title.\r\n*/\r\nexports.invokeUpgraders = function(titles,tiddlers) {\r\n\t// Collect up the available upgrader modules\r\n\tvar self = this;\r\n\tif(!this.upgraderModules) {\r\n\t\tthis.upgraderModules = [];\r\n\t\t$tw.modules.forEachModuleOfType(\"upgrader\",function(title,module) {\r\n\t\t\tif(module.upgrade) {\r\n\t\t\t\tself.upgraderModules.push(module);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t// Invoke each upgrader in turn\r\n\tvar messages = {};\r\n\tfor(var t=0; t<this.upgraderModules.length; t++) {\r\n\t\tvar upgrader = this.upgraderModules[t],\r\n\t\t\tupgraderMessages = upgrader.upgrade(this,titles,tiddlers);\r\n\t\t$tw.utils.extend(messages,upgraderMessages);\r\n\t}\r\n\treturn messages;\r\n};\r\n\r\n})();\r\n",
"title": "$:/core/modules/wiki.js",
"type": "application/javascript",
"module-type": "wikimethod"
},
"$:/palettes/Blanca": {
"title": "$:/palettes/Blanca",
"name": "Blanca",
"description": "A clean white palette to let you focus",
"tags": "$:/tags/Palette",
"type": "application/x-tiddler-dictionary",
"text": "alert-background: #ffe476\r\nalert-border: #b99e2f\r\nalert-highlight: #881122\r\nalert-muted-foreground: #b99e2f\r\nbackground: #ffffff\r\nblockquote-bar: <<colour muted-foreground>>\r\ncode-background: #f7f7f9\r\ncode-border: #e1e1e8\r\ncode-foreground: #dd1144\r\ndirty-indicator: #ff0000\r\ndownload-background: #66cccc\r\ndownload-foreground: <<colour background>>\r\ndragger-background: <<colour foreground>>\r\ndragger-foreground: <<colour background>>\r\ndropdown-background: <<colour background>>\r\ndropdown-border: <<colour muted-foreground>>\r\ndropdown-tab-background-selected: #fff\r\ndropdown-tab-background: #ececec\r\ndropzone-background: rgba(0,200,0,0.7)\r\nexternal-link-background-hover: inherit\r\nexternal-link-background-visited: inherit\r\nexternal-link-background: inherit\r\nexternal-link-foreground-hover: inherit\r\nexternal-link-foreground-visited: #0000aa\r\nexternal-link-foreground: #0000ee\r\nforeground: #333333\r\nmessage-background: #ecf2ff\r\nmessage-border: #cfd6e6\r\nmessage-foreground: #547599\r\nmodal-backdrop: <<colour foreground>>\r\nmodal-background: <<colour background>>\r\nmodal-border: #999999\r\nmodal-footer-background: #f5f5f5\r\nmodal-footer-border: #dddddd\r\nmodal-header-border: #eeeeee\r\nmuted-foreground: #999999\r\nnotification-background: #ffffdd\r\nnotification-border: #999999\r\npage-background: #ffffff\r\npre-background: #f5f5f5\r\npre-border: #cccccc\r\nprimary: #7897f3\r\nsidebar-button-foreground: <<colour foreground>>\r\nsidebar-controls-foreground-hover: #000000\r\nsidebar-controls-foreground: #ccc\r\nsidebar-foreground-shadow: rgba(255,255,255, 0.8)\r\nsidebar-foreground: #acacac\r\nsidebar-muted-foreground-hover: #444444\r\nsidebar-muted-foreground: #c0c0c0\r\nsidebar-tab-background-selected: #ffffff\r\nsidebar-tab-background: <<colour tab-background>>\r\nsidebar-tab-border-selected: <<colour tab-border-selected>>\r\nsidebar-tab-border: <<colour tab-border>>\r\nsidebar-tab-divider: <<colour tab-divider>>\r\nsidebar-tab-foreground-selected: \r\nsidebar-tab-foreground: <<colour tab-foreground>>\r\nsidebar-tiddler-link-foreground-hover: #444444\r\nsidebar-tiddler-link-foreground: #7897f3\r\nstatic-alert-foreground: #aaaaaa\r\ntab-background-selected: #fffffffff\r\ntab-background: #eeeeee\r\ntab-border-selected: #cccccc\r\ntab-border: #cccccc\r\ntab-divider: #d8d8d8\r\ntab-foreground-selected: <<colour tab-foreground>>\r\ntab-foreground: #666666\r\ntable-border: #dddddd\r\ntable-footer-background: #a8a8a8\r\ntable-header-background: #f0f0f0\r\ntag-background: #ffeedd\r\ntag-foreground: #000\r\ntiddler-background: <<colour background>>\r\ntiddler-border: #eee\r\ntiddler-controls-foreground-hover: #888888\r\ntiddler-controls-foreground-selected: #444444\r\ntiddler-controls-foreground: #cccccc\r\ntiddler-editor-background: #f8f8f8\r\ntiddler-editor-border-image: #ffffff\r\ntiddler-editor-border: #cccccc\r\ntiddler-editor-fields-even: #e0e8e0\r\ntiddler-editor-fields-odd: #f0f4f0\r\ntiddler-info-background: #f8f8f8\r\ntiddler-info-border: #dddddd\r\ntiddler-info-tab-background: #f8f8f8\r\ntiddler-link-background: <<colour background>>\r\ntiddler-link-foreground: <<colour primary>>\r\ntiddler-subtitle-foreground: #c0c0c0\r\ntiddler-title-foreground: #ff9900\r\ntoolbar-new-button:\r\ntoolbar-options-button:\r\ntoolbar-save-button:\r\ntoolbar-info-button:\r\ntoolbar-edit-button:\r\ntoolbar-close-button:\r\ntoolbar-delete-button:\r\ntoolbar-cancel-button:\r\ntoolbar-done-button:\r\nuntagged-background: #999999\r\nvery-muted-foreground: #888888\r\n"
},
"$:/palettes/Blue": {
"title": "$:/palettes/Blue",
"name": "Blue",
"description": "A blue theme",
"tags": "$:/tags/Palette",
"type": "application/x-tiddler-dictionary",
"text": "alert-background: #ffe476\r\nalert-border: #b99e2f\r\nalert-highlight: #881122\r\nalert-muted-foreground: #b99e2f\r\nbackground: #fff\r\nblockquote-bar: <<colour muted-foreground>>\r\ncode-background: #f7f7f9\r\ncode-border: #e1e1e8\r\ncode-foreground: #dd1144\r\ndirty-indicator: #ff0000\r\ndownload-background: #34c734\r\ndownload-foreground: <<colour foreground>>\r\ndragger-background: <<colour foreground>>\r\ndragger-foreground: <<colour background>>\r\ndropdown-background: <<colour background>>\r\ndropdown-border: <<colour muted-foreground>>\r\ndropdown-tab-background-selected: #fff\r\ndropdown-tab-background: #ececec\r\ndropzone-background: rgba(0,200,0,0.7)\r\nexternal-link-background-hover: inherit\r\nexternal-link-background-visited: inherit\r\nexternal-link-background: inherit\r\nexternal-link-foreground-hover: inherit\r\nexternal-link-foreground-visited: #0000aa\r\nexternal-link-foreground: #0000ee\r\nforeground: #333353\r\nmessage-background: #ecf2ff\r\nmessage-border: #cfd6e6\r\nmessage-foreground: #547599\r\nmodal-backdrop: <<colour foreground>>\r\nmodal-background: <<colour background>>\r\nmodal-border: #999999\r\nmodal-footer-background: #f5f5f5\r\nmodal-footer-border: #dddddd\r\nmodal-header-border: #eeeeee\r\nmuted-foreground: #999999\r\nnotification-background: #ffffdd\r\nnotification-border: #999999\r\npage-background: #ddddff\r\npre-background: #f5f5f5\r\npre-border: #cccccc\r\nprimary: #5778d8\r\nsidebar-button-foreground: <<colour foreground>>\r\nsidebar-controls-foreground-hover: #000000\r\nsidebar-controls-foreground: #ffffff\r\nsidebar-foreground-shadow: rgba(255,255,255, 0.8)\r\nsidebar-foreground: #acacac\r\nsidebar-muted-foreground-hover: #444444\r\nsidebar-muted-foreground: #c0c0c0\r\nsidebar-tab-background-selected: <<colour page-background>>\r\nsidebar-tab-background: <<colour tab-background>>\r\nsidebar-tab-border-selected: <<colour tab-border-selected>>\r\nsidebar-tab-border: <<colour tab-border>>\r\nsidebar-tab-divider: <<colour tab-divider>>\r\nsidebar-tab-foreground-selected: \r\nsidebar-tab-foreground: <<colour tab-foreground>>\r\nsidebar-tiddler-link-foreground-hover: #444444\r\nsidebar-tiddler-link-foreground: #5959c0\r\nstatic-alert-foreground: #aaaaaa\r\ntab-background-selected: <<colour background>>\r\ntab-background: #ccccdd\r\ntab-border-selected: #ccccdd\r\ntab-border: #cccccc\r\ntab-divider: #d8d8d8\r\ntab-foreground-selected: <<colour tab-foreground>>\r\ntab-foreground: #666666\r\ntable-border: #dddddd\r\ntable-footer-background: #a8a8a8\r\ntable-header-background: #f0f0f0\r\ntag-background: #eeeeff\r\ntag-foreground: #000\r\ntiddler-background: <<colour background>>\r\ntiddler-border: <<colour background>>\r\ntiddler-controls-foreground-hover: #666666\r\ntiddler-controls-foreground-selected: #444444\r\ntiddler-controls-foreground: #cccccc\r\ntiddler-editor-background: #f8f8f8\r\ntiddler-editor-border-image: #ffffff\r\ntiddler-editor-border: #cccccc\r\ntiddler-editor-fields-even: #e0e8e0\r\ntiddler-editor-fields-odd: #f0f4f0\r\ntiddler-info-background: #ffffff\r\ntiddler-info-border: #dddddd\r\ntiddler-info-tab-background: #ffffff\r\ntiddler-link-background: <<colour background>>\r\ntiddler-link-foreground: <<colour primary>>\r\ntiddler-subtitle-foreground: #c0c0c0\r\ntiddler-title-foreground: #5959c0\r\ntoolbar-new-button: #5eb95e\r\ntoolbar-options-button: rgb(128, 88, 165)\r\ntoolbar-save-button: #0e90d2\r\ntoolbar-info-button: #0e90d2\r\ntoolbar-edit-button: rgb(243, 123, 29)\r\ntoolbar-close-button: #dd514c\r\ntoolbar-delete-button: #dd514c\r\ntoolbar-cancel-button: rgb(243, 123, 29)\r\ntoolbar-done-button: #5eb95e\r\nuntagged-background: #999999\r\nvery-muted-foreground: #888888\r\n"
},
"$:/palettes/Muted": {
"title": "$:/palettes/Muted",
"name": "Muted",
"description": "Bright tiddlers on a muted background",
"tags": "$:/tags/Palette",
"type": "application/x-tiddler-dictionary",
"text": "alert-background: #ffe476\r\nalert-border: #b99e2f\r\nalert-highlight: #881122\r\nalert-muted-foreground: #b99e2f\r\nbackground: #ffffff\r\nblockquote-bar: <<colour muted-foreground>>\r\ncode-background: #f7f7f9\r\ncode-border: #e1e1e8\r\ncode-foreground: #dd1144\r\ndirty-indicator: #ff0000\r\ndownload-background: #34c734\r\ndownload-foreground: <<colour background>>\r\ndragger-background: <<colour foreground>>\r\ndragger-foreground: <<colour background>>\r\ndropdown-background: <<colour background>>\r\ndropdown-border: <<colour muted-foreground>>\r\ndropdown-tab-background-selected: #fff\r\ndropdown-tab-background: #ececec\r\ndropzone-background: rgba(0,200,0,0.7)\r\nexternal-link-background-hover: inherit\r\nexternal-link-background-visited: inherit\r\nexternal-link-background: inherit\r\nexternal-link-foreground-hover: inherit\r\nexternal-link-foreground-visited: #0000aa\r\nexternal-link-foreground: #0000ee\r\nforeground: #333333\r\nmessage-background: #ecf2ff\r\nmessage-border: #cfd6e6\r\nmessage-foreground: #547599\r\nmodal-backdrop: <<colour foreground>>\r\nmodal-background: <<colour background>>\r\nmodal-border: #999999\r\nmodal-footer-background: #f5f5f5\r\nmodal-footer-border: #dddddd\r\nmodal-header-border: #eeeeee\r\nmuted-foreground: #bbb\r\nnotification-background: #ffffdd\r\nnotification-border: #999999\r\npage-background: #6f6f70\r\npre-background: #f5f5f5\r\npre-border: #cccccc\r\nprimary: #29a6ee\r\nsidebar-button-foreground: <<colour foreground>>\r\nsidebar-controls-foreground-hover: #000000\r\nsidebar-controls-foreground: #c2c1c2\r\nsidebar-foreground-shadow: rgba(255,255,255,0)\r\nsidebar-foreground: #d3d2d4\r\nsidebar-muted-foreground-hover: #444444\r\nsidebar-muted-foreground: #c0c0c0\r\nsidebar-tab-background-selected: #6f6f70\r\nsidebar-tab-background: #666667\r\nsidebar-tab-border-selected: #999\r\nsidebar-tab-border: #515151\r\nsidebar-tab-divider: #999\r\nsidebar-tab-foreground-selected: \r\nsidebar-tab-foreground: #999\r\nsidebar-tiddler-link-foreground-hover: #444444\r\nsidebar-tiddler-link-foreground: #d1d0d2\r\nstatic-alert-foreground: #aaaaaa\r\ntab-background-selected: #ffffff\r\ntab-background: #d8d8d8\r\ntab-border-selected: #d8d8d8\r\ntab-border: #cccccc\r\ntab-divider: #d8d8d8\r\ntab-foreground-selected: <<colour tab-foreground>>\r\ntab-foreground: #666666\r\ntable-border: #dddddd\r\ntable-footer-background: #a8a8a8\r\ntable-header-background: #f0f0f0\r\ntag-background: #d5ad34\r\ntag-foreground: #ffffff\r\ntiddler-background: <<colour background>>\r\ntiddler-border: <<colour background>>\r\ntiddler-controls-foreground-hover: #888888\r\ntiddler-controls-foreground-selected: #444444\r\ntiddler-controls-foreground: #cccccc\r\ntiddler-editor-background: #f8f8f8\r\ntiddler-editor-border-image: #ffffff\r\ntiddler-editor-border: #cccccc\r\ntiddler-editor-fields-even: #e0e8e0\r\ntiddler-editor-fields-odd: #f0f4f0\r\ntiddler-info-background: #f8f8f8\r\ntiddler-info-border: #dddddd\r\ntiddler-info-tab-background: #f8f8f8\r\ntiddler-link-background: <<colour background>>\r\ntiddler-link-foreground: <<colour primary>>\r\ntiddler-subtitle-foreground: #c0c0c0\r\ntiddler-title-foreground: #182955\r\ntoolbar-new-button: \r\ntoolbar-options-button: \r\ntoolbar-save-button: \r\ntoolbar-info-button: \r\ntoolbar-edit-button: \r\ntoolbar-close-button: \r\ntoolbar-delete-button: \r\ntoolbar-cancel-button: \r\ntoolbar-done-button: \r\nuntagged-background: #999999\r\nvery-muted-foreground: #888888\r\n"
},
"$:/palettes/Contrast": {
"title": "$:/palettes/Contrast",
"name": "Contrast",
"description": "High contrast and unambiguous",
"tags": "$:/tags/Palette",
"type": "application/x-tiddler-dictionary",
"text": "alert-background: #ffe476\r\nalert-border: #b99e2f\r\nalert-highlight: #881122\r\nalert-muted-foreground: #b99e2f\r\nbackground: #ffffff\r\nblockquote-bar: <<colour muted-foreground>>\r\ncode-background: #f7f7f9\r\ncode-border: #e1e1e8\r\ncode-foreground: #dd1144\r\ndirty-indicator: #ff0000\r\ndownload-background: #34c734\r\ndownload-foreground: <<colour background>>\r\ndragger-background: <<colour foreground>>\r\ndragger-foreground: <<colour background>>\r\ndropdown-background: <<colour background>>\r\ndropdown-border: <<colour muted-foreground>>\r\ndropdown-tab-background-selected: #fff\r\ndropdown-tab-background: #ececec\r\ndropzone-background: rgba(0,200,0,0.7)\r\nexternal-link-background-hover: inherit\r\nexternal-link-background-visited: inherit\r\nexternal-link-background: inherit\r\nexternal-link-foreground-hover: inherit\r\nexternal-link-foreground-visited: #0000aa\r\nexternal-link-foreground: #0000ee\r\nforeground: #333333\r\nmessage-background: #ecf2ff\r\nmessage-border: #cfd6e6\r\nmessage-foreground: #547599\r\nmodal-backdrop: <<colour foreground>>\r\nmodal-background: <<colour background>>\r\nmodal-border: #999999\r\nmodal-footer-background: #f5f5f5\r\nmodal-footer-border: #dddddd\r\nmodal-header-border: #eeeeee\r\nmuted-foreground: #999999\r\nnotification-background: #ffffdd\r\nnotification-border: #999999\r\npage-background: #000000\r\npre-background: #f5f5f5\r\npre-border: #cccccc\r\nprimary: #5778d8\r\nsidebar-button-foreground: <<colour foreground>>\r\nsidebar-controls-foreground-hover: #000000\r\nsidebar-controls-foreground: #ffffff\r\nsidebar-foreground-shadow: rgba(255,0,0, 0.5)\r\nsidebar-foreground: #ffffff\r\nsidebar-muted-foreground-hover: #444444\r\nsidebar-muted-foreground: #c0c0c0\r\nsidebar-tab-background-selected: #ececec\r\nsidebar-tab-background: <<colour tab-background>>\r\nsidebar-tab-border-selected: <<colour tab-border-selected>>\r\nsidebar-tab-border: <<colour tab-border>>\r\nsidebar-tab-divider: <<colour tab-divider>>\r\nsidebar-tab-foreground-selected: \r\nsidebar-tab-foreground: <<colour tab-foreground>>\r\nsidebar-tiddler-link-foreground-hover: #444444\r\nsidebar-tiddler-link-foreground: #999999\r\nstatic-alert-foreground: #aaaaaa\r\ntab-background-selected: #ffffff\r\ntab-background: #d8d8d8\r\ntab-border-selected: #d8d8d8\r\ntab-border: #cccccc\r\ntab-divider: #d8d8d8\r\ntab-foreground-selected: <<colour tab-foreground>>\r\ntab-foreground: #666666\r\ntable-border: #dddddd\r\ntable-footer-background: #a8a8a8\r\ntable-header-background: #f0f0f0\r\ntag-background: #d5ad34\r\ntag-foreground: #ffffff\r\ntiddler-background: <<colour background>>\r\ntiddler-border: <<colour background>>\r\ntiddler-controls-foreground-hover: #888888\r\ntiddler-controls-foreground-selected: #444444\r\ntiddler-controls-foreground: #cccccc\r\ntiddler-editor-background: #f8f8f8\r\ntiddler-editor-border-image: #ffffff\r\ntiddler-editor-border: #cccccc\r\ntiddler-editor-fields-even: #e0e8e0\r\ntiddler-editor-fields-odd: #f0f4f0\r\ntiddler-info-background: #f8f8f8\r\ntiddler-info-border: #dddddd\r\ntiddler-info-tab-background: #f8f8f8\r\ntiddler-link-background: <<colour background>>\r\ntiddler-link-foreground: <<colour primary>>\r\ntiddler-subtitle-foreground: #c0c0c0\r\ntiddler-title-foreground: #182955\r\ntoolbar-new-button:\r\ntoolbar-options-button:\r\ntoolbar-save-button:\r\ntoolbar-info-button:\r\ntoolbar-edit-button:\r\ntoolbar-close-button:\r\ntoolbar-delete-button:\r\ntoolbar-cancel-button:\r\ntoolbar-done-button:\r\nuntagged-background: #999999\r\nvery-muted-foreground: #888888\r\n"
},
"$:/palettes/Rocker": {
"title": "$:/palettes/Rocker",
"name": "Rocker",
"description": "A dark theme",
"tags": "$:/tags/Palette",
"type": "application/x-tiddler-dictionary",
"text": "alert-background: #ffe476\r\nalert-border: #b99e2f\r\nalert-highlight: #881122\r\nalert-muted-foreground: #b99e2f\r\nbackground: #ffffff\r\nblockquote-bar: <<colour muted-foreground>>\r\ncode-background: #f7f7f9\r\ncode-border: #e1e1e8\r\ncode-foreground: #dd1144\r\ndirty-indicator: #ff0000\r\ndownload-background: #34c734\r\ndownload-foreground: <<colour background>>\r\ndragger-background: <<colour foreground>>\r\ndragger-foreground: <<colour background>>\r\ndropdown-background: <<colour background>>\r\ndropdown-border: <<colour muted-foreground>>\r\ndropdown-tab-background-selected: #fff\r\ndropdown-tab-background: #ececec\r\ndropzone-background: rgba(0,200,0,0.7)\r\nexternal-link-background-hover: inherit\r\nexternal-link-background-visited: inherit\r\nexternal-link-background: inherit\r\nexternal-link-foreground-hover: inherit\r\nexternal-link-foreground-visited: #0000aa\r\nexternal-link-foreground: #0000ee\r\nforeground: #333333\r\nmessage-background: #ecf2ff\r\nmessage-border: #cfd6e6\r\nmessage-foreground: #547599\r\nmodal-backdrop: <<colour foreground>>\r\nmodal-background: <<colour background>>\r\nmodal-border: #999999\r\nmodal-footer-background: #f5f5f5\r\nmodal-footer-border: #dddddd\r\nmodal-header-border: #eeeeee\r\nmuted-foreground: #999999\r\nnotification-background: #ffffdd\r\nnotification-border: #999999\r\npage-background: #000\r\npre-background: #f5f5f5\r\npre-border: #cccccc\r\nprimary: #cc0000\r\nsidebar-button-foreground: <<colour foreground>>\r\nsidebar-controls-foreground-hover: #000000\r\nsidebar-controls-foreground: #ffffff\r\nsidebar-foreground-shadow: rgba(255,255,255, 0.0)\r\nsidebar-foreground: #acacac\r\nsidebar-muted-foreground-hover: #444444\r\nsidebar-muted-foreground: #c0c0c0\r\nsidebar-tab-background-selected: #000\r\nsidebar-tab-background: <<colour tab-background>>\r\nsidebar-tab-border-selected: <<colour tab-border-selected>>\r\nsidebar-tab-border: <<colour tab-border>>\r\nsidebar-tab-divider: <<colour tab-divider>>\r\nsidebar-tab-foreground-selected: \r\nsidebar-tab-foreground: <<colour tab-foreground>>\r\nsidebar-tiddler-link-foreground-hover: #ffbb99\r\nsidebar-tiddler-link-foreground: #cc0000\r\nstatic-alert-foreground: #aaaaaa\r\ntab-background-selected: #ffffff\r\ntab-background: #d8d8d8\r\ntab-border-selected: #d8d8d8\r\ntab-border: #cccccc\r\ntab-divider: #d8d8d8\r\ntab-foreground-selected: <<colour tab-foreground>>\r\ntab-foreground: #666666\r\ntable-border: #dddddd\r\ntable-footer-background: #a8a8a8\r\ntable-header-background: #f0f0f0\r\ntag-background: #ffbb99\r\ntag-foreground: #000\r\ntiddler-background: <<colour background>>\r\ntiddler-border: <<colour background>>\r\ntiddler-controls-foreground-hover: #888888\r\ntiddler-controls-foreground-selected: #444444\r\ntiddler-controls-foreground: #cccccc\r\ntiddler-editor-background: #f8f8f8\r\ntiddler-editor-border-image: #ffffff\r\ntiddler-editor-border: #cccccc\r\ntiddler-editor-fields-even: #e0e8e0\r\ntiddler-editor-fields-odd: #f0f4f0\r\ntiddler-info-background: #f8f8f8\r\ntiddler-info-border: #dddddd\r\ntiddler-info-tab-background: #f8f8f8\r\ntiddler-link-background: <<colour background>>\r\ntiddler-link-foreground: <<colour primary>>\r\ntiddler-subtitle-foreground: #c0c0c0\r\ntiddler-title-foreground: #cc0000\r\ntoolbar-new-button:\r\ntoolbar-options-button:\r\ntoolbar-save-button:\r\ntoolbar-info-button:\r\ntoolbar-edit-button:\r\ntoolbar-close-button:\r\ntoolbar-delete-button:\r\ntoolbar-cancel-button:\r\ntoolbar-done-button:\r\nuntagged-background: #999999\r\nvery-muted-foreground: #888888\r\n"
},
"$:/palettes/Vanilla": {
"title": "$:/palettes/Vanilla",
"name": "Vanilla",
"description": "Pale and unobtrusive",
"tags": "$:/tags/Palette",
"type": "application/x-tiddler-dictionary",
"text": "alert-background: #ffe476\r\nalert-border: #b99e2f\r\nalert-highlight: #881122\r\nalert-muted-foreground: #b99e2f\r\nbackground: #ffffff\r\nblockquote-bar: <<colour muted-foreground>>\r\ncode-background: #f7f7f9\r\ncode-border: #e1e1e8\r\ncode-foreground: #dd1144\r\ndirty-indicator: #ff0000\r\ndownload-background: #34c734\r\ndownload-foreground: <<colour background>>\r\ndragger-background: <<colour foreground>>\r\ndragger-foreground: <<colour background>>\r\ndropdown-background: <<colour background>>\r\ndropdown-border: <<colour muted-foreground>>\r\ndropdown-tab-background-selected: #fff\r\ndropdown-tab-background: #ececec\r\ndropzone-background: rgba(0,200,0,0.7)\r\nexternal-link-background-hover: inherit\r\nexternal-link-background-visited: inherit\r\nexternal-link-background: inherit\r\nexternal-link-foreground-hover: inherit\r\nexternal-link-foreground-visited: #0000aa\r\nexternal-link-foreground: #0000ee\r\nforeground: #333333\r\nmessage-background: #ecf2ff\r\nmessage-border: #cfd6e6\r\nmessage-foreground: #547599\r\nmodal-backdrop: <<colour foreground>>\r\nmodal-background: <<colour background>>\r\nmodal-border: #999999\r\nmodal-footer-background: #f5f5f5\r\nmodal-footer-border: #dddddd\r\nmodal-header-border: #eeeeee\r\nmuted-foreground: #bbb\r\nnotification-background: #ffffdd\r\nnotification-border: #999999\r\npage-background: #ececec\r\npre-background: #f5f5f5\r\npre-border: #cccccc\r\nprimary: #5778d8\r\nsidebar-button-foreground: <<colour foreground>>\r\nsidebar-controls-foreground-hover: #000000\r\nsidebar-controls-foreground: #aaaaaa\r\nsidebar-foreground-shadow: rgba(255,255,255, 0.8)\r\nsidebar-foreground: #acacac\r\nsidebar-muted-foreground-hover: #444444\r\nsidebar-muted-foreground: #c0c0c0\r\nsidebar-tab-background-selected: #ececec\r\nsidebar-tab-background: <<colour tab-background>>\r\nsidebar-tab-border-selected: <<colour tab-border-selected>>\r\nsidebar-tab-border: <<colour tab-border>>\r\nsidebar-tab-divider: #e4e4e4\r\nsidebar-tab-foreground-selected: \r\nsidebar-tab-foreground: <<colour tab-foreground>>\r\nsidebar-tiddler-link-foreground-hover: #444444\r\nsidebar-tiddler-link-foreground: #999999\r\nstatic-alert-foreground: #aaaaaa\r\ntab-background-selected: #ffffff\r\ntab-background: #d8d8d8\r\ntab-border-selected: #d8d8d8\r\ntab-border: #cccccc\r\ntab-divider: #d8d8d8\r\ntab-foreground-selected: <<colour tab-foreground>>\r\ntab-foreground: #666666\r\ntable-border: #dddddd\r\ntable-footer-background: #a8a8a8\r\ntable-header-background: #f0f0f0\r\ntag-background: #ec6\r\ntag-foreground: #ffffff\r\ntiddler-background: <<colour background>>\r\ntiddler-border: <<colour background>>\r\ntiddler-controls-foreground-hover: #888888\r\ntiddler-controls-foreground-selected: #444444\r\ntiddler-controls-foreground: #cccccc\r\ntiddler-editor-background: #f8f8f8\r\ntiddler-editor-border-image: #ffffff\r\ntiddler-editor-border: #cccccc\r\ntiddler-editor-fields-even: #e0e8e0\r\ntiddler-editor-fields-odd: #f0f4f0\r\ntiddler-info-background: #f8f8f8\r\ntiddler-info-border: #dddddd\r\ntiddler-info-tab-background: #f8f8f8\r\ntiddler-link-background: <<colour background>>\r\ntiddler-link-foreground: <<colour primary>>\r\ntiddler-subtitle-foreground: #c0c0c0\r\ntiddler-title-foreground: #182955\r\ntoolbar-new-button:\r\ntoolbar-options-button:\r\ntoolbar-save-button:\r\ntoolbar-info-button:\r\ntoolbar-edit-button:\r\ntoolbar-close-button:\r\ntoolbar-delete-button:\r\ntoolbar-cancel-button:\r\ntoolbar-done-button:\r\nuntagged-background: #999999\r\nvery-muted-foreground: #888888\r\n"
},
"$:/core/readme": {
"title": "$:/core/readme",
"text": "This plugin contains TiddlyWiki's core components, comprising:\n\n* JavaScript code modules\r\n* Icons\r\n* Templates needed to create TiddlyWiki's user interface\r\n* British English (''en-GB'') translations of the localisable strings used by the core\r\n"
},
"$:/core/templates/alltiddlers.template.html": {
"title": "$:/core/templates/alltiddlers.template.html",
"type": "text/vnd.tiddlywiki-html",
"text": "<!-- This template is provided for backwards compatibility with older versions of TiddlyWiki -->\n\n<$set name=\"exportFilter\" value=\"[!is[system]sort[title]]\">\n\n{{$:/core/templates/exporters/StaticRiver}}\n\n</$set>\r\n"
},
"$:/core/templates/canonical-uri-external-image": {
"title": "$:/core/templates/canonical-uri-external-image",
"text": "<!--\n\nThis template is used to assign the ''_canonical_uri'' field to external images.\n\nChange the `./images/` part to a different base URI. The URI can be relative or absolute.\n\n-->\r\n./images/<$view field=\"title\" format=\"doubleurlencoded\"/>"
},
"$:/core/templates/css-tiddler": {
"title": "$:/core/templates/css-tiddler",
"text": "<!--\n\nThis template is used for saving CSS tiddlers as a style tag with data attributes representing the tiddler fields.\n\n-->`<style`<$fields template=' data-tiddler-$name$=\"$encoded_value$\"'></$fields>` type=\"text/css\">`<$view field=\"text\" format=\"text\" />`</style>`"
},
"$:/core/templates/exporters/CsvFile": {
"title": "$:/core/templates/exporters/CsvFile",
"tags": "$:/tags/Exporter",
"description": "{{$:/language/Exporters/CsvFile}}",
"extension": ".csv",
"text": "\\define renderContent()\r\n<$text text=<<csvtiddlers filter:\"\"\"$(exportFilter)$\"\"\" format:\"quoted-comma-sep\">>/>\r\n\\end\r\n<<renderContent>>\r\n"
},
"$:/core/templates/exporters/JsonFile": {
"title": "$:/core/templates/exporters/JsonFile",
"tags": "$:/tags/Exporter",
"description": "{{$:/language/Exporters/JsonFile}}",
"extension": ".json",
"text": "\\define renderContent()\r\n<$text text=<<jsontiddlers filter:\"\"\"$(exportFilter)$\"\"\">>/>\r\n\\end\r\n<<renderContent>>\r\n"
},
"$:/core/templates/exporters/StaticRiver": {
"title": "$:/core/templates/exporters/StaticRiver",
"tags": "$:/tags/Exporter",
"description": "{{$:/language/Exporters/StaticRiver}}",
"extension": ".html",
"text": "\\define tv-wikilink-template() #$uri_encoded$\r\n\\define tv-config-toolbar-icons() no\r\n\\define tv-config-toolbar-text() no\r\n\\define tv-config-toolbar-class() tc-btn-invisible\r\n\\rules only filteredtranscludeinline transcludeinline\r\n<!doctype html>\r\n<html>\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\" />\r\n<meta name=\"generator\" content=\"TiddlyWiki\" />\r\n<meta name=\"tiddlywiki-version\" content=\"{{$:/core/templates/version}}\" />\r\n<meta name=\"format-detection\" content=\"telephone=no\">\r\n<link id=\"faviconLink\" rel=\"shortcut icon\" href=\"favicon.ico\">\r\n<title>{{$:/core/wiki/title}}</title>\r\n<div id=\"styleArea\">\r\n{{$:/boot/boot.css||$:/core/templates/css-tiddler}}\r\n</div>\r\n<style type=\"text/css\">\r\n{{$:/core/ui/PageStylesheet||$:/core/templates/wikified-tiddler}}\r\n</style>\r\n</head>\r\n<body class=\"tc-body\">\r\n{{$:/StaticBanner||$:/core/templates/html-tiddler}}\r\n<section class=\"tc-story-river\">\r\n{{$:/core/templates/exporters/StaticRiver/Content||$:/core/templates/html-tiddler}}\r\n</section>\r\n</body>\r\n</html>\r\n"
},
"$:/core/templates/exporters/StaticRiver/Content": {
"title": "$:/core/templates/exporters/StaticRiver/Content",
"text": "\\define renderContent()\r\n{{{ $(exportFilter)$ ||$:/core/templates/static-tiddler}}}\r\n\\end\r\n<$importvariables filter=\"[[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]\">\r\n<<renderContent>>\r\n</$importvariables>\r\n"
},
"$:/core/templates/exporters/TidFile": {
"title": "$:/core/templates/exporters/TidFile",
"tags": "$:/tags/Exporter",
"description": "{{$:/language/Exporters/TidFile}}",
"extension": ".tid",
"text": "\\define renderContent()\r\n{{{ $(exportFilter)$ +[limit[1]] ||$:/core/templates/tid-tiddler}}}\r\n\\end\r\n<$importvariables filter=\"[[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]\"><<renderContent>></$importvariables>"
},
"$:/core/templates/html-div-tiddler": {
"title": "$:/core/templates/html-div-tiddler",
"text": "<!--\n\nThis template is used for saving tiddlers as an HTML DIV tag with attributes representing the tiddler fields.\n\n-->`<div`<$fields template=' $name$=\"$encoded_value$\"'></$fields>`>\r\n<pre>`<$view field=\"text\" format=\"htmlencoded\" />`</pre>\r\n</div>`\r\n"
},
"$:/core/templates/html-tiddler": {
"title": "$:/core/templates/html-tiddler",
"text": "<!--\n\nThis template is used for saving tiddlers as raw HTML\n\n--><$view field=\"text\" format=\"htmlwikified\" />"
},
"$:/core/templates/javascript-tiddler": {
"title": "$:/core/templates/javascript-tiddler",
"text": "<!--\n\nThis template is used for saving JavaScript tiddlers as a script tag with data attributes representing the tiddler fields.\n\n-->`<script`<$fields template=' data-tiddler-$name$=\"$encoded_value$\"'></$fields>` type=\"text/javascript\">`<$view field=\"text\" format=\"text\" />`</script>`"
},
"$:/core/templates/module-tiddler": {
"title": "$:/core/templates/module-tiddler",
"text": "<!--\n\nThis template is used for saving JavaScript tiddlers as a script tag with data attributes representing the tiddler fields. The body of the tiddler is wrapped in a call to the `$tw.modules.define` function in order to define the body of the tiddler as a module\n\n-->`<script`<$fields template=' data-tiddler-$name$=\"$encoded_value$\"'></$fields>` type=\"text/javascript\" data-module=\"yes\">$tw.modules.define(\"`<$view field=\"title\" format=\"jsencoded\" />`\",\"`<$view field=\"module-type\" format=\"jsencoded\" />`\",function(module,exports,require) {`<$view field=\"text\" format=\"text\" />`});\r\n</script>`"
},
"$:/core/templates/MOTW.html": {
"title": "$:/core/templates/MOTW.html",
"text": "\\rules only filteredtranscludeinline transcludeinline entity\r\n<!-- The following comment is called a MOTW comment and is necessary for the TiddlyIE Internet Explorer extension -->\r\n<!-- saved from url=(0021)http://tiddlywiki.com --> "
},
"$:/core/templates/plain-text-tiddler": {
"title": "$:/core/templates/plain-text-tiddler",
"text": "<$view field=\"text\" format=\"text\" />"
},
"$:/core/save/all": {
"title": "$:/core/save/all",
"text": "\\define saveTiddlerFilter()\r\n[is[tiddler]] -[prefix[$:/state/popup/]] -[[$:/HistoryList]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]]\r\n\\end\r\n{{$:/core/templates/tiddlywiki5.html}}\r\n"
},
"$:/core/save/empty": {
"title": "$:/core/save/empty",
"text": "\\define saveTiddlerFilter()\r\n[is[system]] -[prefix[$:/state/popup/]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]]\r\n\\end\r\n{{$:/core/templates/tiddlywiki5.html}}\r\n"
},
"$:/core/save/lazy-images": {
"title": "$:/core/save/lazy-images",
"text": "\\define saveTiddlerFilter()\r\n[is[tiddler]] -[prefix[$:/state/popup/]] -[[$:/HistoryList]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] -[!is[system]is[image]] +[sort[title]] \r\n\\end\r\n{{$:/core/templates/tiddlywiki5.html}}\r\n"
},
"$:/core/templates/split-recipe": {
"title": "$:/core/templates/split-recipe",
"text": "<$list filter=\"[!is[system]]\">\r\ntiddler: <$view field=\"title\" format=\"urlencoded\"/>.tid\r\n</$list>\r\n"
},
"$:/core/templates/static-tiddler": {
"title": "$:/core/templates/static-tiddler",
"text": "<a name=<<currentTiddler>>>\r\n<$transclude tiddler=\"$:/core/ui/ViewTemplate\"/>\r\n</a>"
},
"$:/core/templates/static.area": {
"title": "$:/core/templates/static.area",
"text": "<$reveal type=\"nomatch\" state=\"$:/isEncrypted\" text=\"yes\">\r\n{{$:/core/templates/static.content||$:/core/templates/html-tiddler}}\r\n</$reveal>\r\n<$reveal type=\"match\" state=\"$:/isEncrypted\" text=\"yes\">\r\nThis file contains an encrypted ~TiddlyWiki. Enable ~JavaScript and enter the decryption password when prompted.\r\n</$reveal>\r\n"
},
"$:/core/templates/static.content": {
"title": "$:/core/templates/static.content",
"type": "text/vnd.tiddlywiki",
"text": "<!-- For Google, and people without JavaScript-->\r\nThis [[TiddlyWiki|http://tiddlywiki.com]] contains the following tiddlers:\n\n<ul>\r\n<$list filter=<<saveTiddlerFilter>>>\r\n<li><$view field=\"title\" format=\"text\"></$view></li>\r\n</$list>\r\n</ul>\r\n"
},
"$:/core/templates/static.template.css": {
"title": "$:/core/templates/static.template.css",
"text": "{{$:/boot/boot.css||$:/core/templates/plain-text-tiddler}}\n\n{{$:/core/ui/PageStylesheet||$:/core/templates/wikified-tiddler}}\r\n"
},
"$:/core/templates/static.template.html": {
"title": "$:/core/templates/static.template.html",
"type": "text/vnd.tiddlywiki-html",
"text": "\\define tv-wikilink-template() static/$uri_doubleencoded$.html\r\n\\define tv-config-toolbar-icons() no\r\n\\define tv-config-toolbar-text() no\r\n\\define tv-config-toolbar-class() tc-btn-invisible\r\n\\rules only filteredtranscludeinline transcludeinline\r\n<!doctype html>\r\n<html>\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\" />\r\n<meta name=\"generator\" content=\"TiddlyWiki\" />\r\n<meta name=\"tiddlywiki-version\" content=\"{{$:/core/templates/version}}\" />\r\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\r\n<meta name=\"apple-mobile-web-app-capable\" content=\"yes\" />\r\n<meta name=\"apple-mobile-web-app-status-bar-style\" content=\"black-translucent\" />\r\n<meta name=\"format-detection\" content=\"telephone=no\">\r\n<link id=\"faviconLink\" rel=\"shortcut icon\" href=\"favicon.ico\">\r\n<title>{{$:/core/wiki/title}}</title>\r\n<div id=\"styleArea\">\r\n{{$:/boot/boot.css||$:/core/templates/css-tiddler}}\r\n</div>\r\n<style type=\"text/css\">\r\n{{$:/core/ui/PageStylesheet||$:/core/templates/wikified-tiddler}}\r\n</style>\r\n</head>\r\n<body class=\"tc-body\">\r\n{{$:/StaticBanner||$:/core/templates/html-tiddler}}\r\n{{$:/core/ui/PageTemplate||$:/core/templates/html-tiddler}}\r\n</body>\r\n</html>\r\n"
},
"$:/core/templates/static.tiddler.html": {
"title": "$:/core/templates/static.tiddler.html",
"text": "\\define tv-wikilink-template() $uri_doubleencoded$.html\r\n\\define tv-config-toolbar-icons() no\r\n\\define tv-config-toolbar-text() no\r\n\\define tv-config-toolbar-class() tc-btn-invisible\r\n`<!doctype html>\r\n<html>\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\" />\r\n<meta name=\"generator\" content=\"TiddlyWiki\" />\r\n<meta name=\"tiddlywiki-version\" content=\"`{{$:/core/templates/version}}`\" />\r\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\r\n<meta name=\"apple-mobile-web-app-capable\" content=\"yes\" />\r\n<meta name=\"apple-mobile-web-app-status-bar-style\" content=\"black-translucent\" />\r\n<meta name=\"format-detection\" content=\"telephone=no\">\r\n<link id=\"faviconLink\" rel=\"shortcut icon\" href=\"favicon.ico\">\r\n<link rel=\"stylesheet\" href=\"static.css\">\r\n<title>`{{$:/core/wiki/title}}`</title>\r\n</head>\r\n<body class=\"tc-body\">\r\n`{{$:/StaticBanner||$:/core/templates/html-tiddler}}`\r\n<section class=\"tc-story-river\">\r\n`<$importvariables filter=\"[[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]\">\r\n<$view tiddler=\"$:/core/ui/ViewTemplate\" format=\"htmlwikified\"/>\r\n</$importvariables>`\r\n</section>\r\n</body>\r\n</html>\r\n`"
},
"$:/core/templates/store.area.template.html": {
"title": "$:/core/templates/store.area.template.html",
"text": "<$reveal type=\"nomatch\" state=\"$:/isEncrypted\" text=\"yes\">\r\n`<div id=\"storeArea\" style=\"display:none;\">`\r\n<$list filter=<<saveTiddlerFilter>> template=\"$:/core/templates/html-div-tiddler\"/>\r\n`</div>`\r\n</$reveal>\r\n<$reveal type=\"match\" state=\"$:/isEncrypted\" text=\"yes\">\r\n`<!--~~ Encrypted tiddlers ~~-->`\r\n`<pre id=\"encryptedStoreArea\" type=\"text/plain\" style=\"display:none;\">`\r\n<$encrypt filter=<<saveTiddlerFilter>>/>\r\n`</pre>`\r\n</$reveal>"
},
"$:/core/templates/tid-tiddler": {
"title": "$:/core/templates/tid-tiddler",
"text": "<!--\n\nThis template is used for saving tiddlers in TiddlyWeb *.tid format\n\n--><$fields exclude='text bag' template='$name$: $value$\r\n'></$fields>`\r\n`<$view field=\"text\" format=\"text\" />"
},
"$:/core/templates/tiddler-metadata": {
"title": "$:/core/templates/tiddler-metadata",
"text": "<!--\n\nThis template is used for saving tiddler metadata *.meta files\n\n--><$fields exclude='text bag' template='$name$: $value$\r\n'></$fields>"
},
"$:/core/templates/tiddlywiki5.html": {
"title": "$:/core/templates/tiddlywiki5.html",
"text": "\\rules only filteredtranscludeinline transcludeinline\r\n<!doctype html>\r\n{{$:/core/templates/MOTW.html}}<html>\r\n<head>\r\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\" />\t\t<!-- Force IE standards mode for Intranet and HTA - should be the first meta -->\r\n<meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\" />\r\n<meta name=\"application-name\" content=\"TiddlyWiki\" />\r\n<meta name=\"generator\" content=\"TiddlyWiki\" />\r\n<meta name=\"tiddlywiki-version\" content=\"{{$:/core/templates/version}}\" />\r\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\r\n<meta name=\"apple-mobile-web-app-capable\" content=\"yes\" />\r\n<meta name=\"apple-mobile-web-app-status-bar-style\" content=\"black-translucent\" />\r\n<meta name=\"format-detection\" content=\"telephone=no\" />\r\n<meta name=\"copyright\" content=\"{{$:/core/copyright.txt}}\" />\r\n<link id=\"faviconLink\" rel=\"shortcut icon\" href=\"favicon.ico\">\r\n<title>{{$:/core/wiki/title}}</title>\r\n<!--~~ This is a Tiddlywiki file. The points of interest in the file are marked with this pattern ~~-->\n\n<!--~~ Raw markup ~~-->\r\n{{{ [all[shadows+tiddlers]tag[$:/core/wiki/rawmarkup]] [all[shadows+tiddlers]tag[$:/tags/RawMarkup]] ||$:/core/templates/plain-text-tiddler}}}\r\n</head>\r\n<body class=\"tc-body\">\r\n<!--~~ Static styles ~~-->\r\n<div id=\"styleArea\">\r\n{{$:/boot/boot.css||$:/core/templates/css-tiddler}}\r\n</div>\r\n<!--~~ Static content for Google and browsers without JavaScript ~~-->\r\n<noscript>\r\n<div id=\"splashArea\">\r\n{{$:/core/templates/static.area}}\r\n</div>\r\n</noscript>\r\n<!--~~ Ordinary tiddlers ~~-->\r\n{{$:/core/templates/store.area.template.html}}\r\n<!--~~ Library modules ~~-->\r\n<div id=\"libraryModules\" style=\"display:none;\">\r\n{{{ [is[system]type[application/javascript]library[yes]] ||$:/core/templates/javascript-tiddler}}}\r\n</div>\r\n<!--~~ Boot kernel prologue ~~-->\r\n<div id=\"bootKernelPrefix\" style=\"display:none;\">\r\n{{ $:/boot/bootprefix.js ||$:/core/templates/javascript-tiddler}}\r\n</div>\r\n<!--~~ Boot kernel ~~-->\r\n<div id=\"bootKernel\" style=\"display:none;\">\r\n{{ $:/boot/boot.js ||$:/core/templates/javascript-tiddler}}\r\n</div>\r\n</body>\r\n</html>\r\n"
},
"$:/core/templates/version": {
"title": "$:/core/templates/version",
"text": "<<version>>"
},
"$:/core/templates/wikified-tiddler": {
"title": "$:/core/templates/wikified-tiddler",
"text": "<$transclude />"
},
"$:/core/ui/AdvancedSearch/Filter": {
"title": "$:/core/ui/AdvancedSearch/Filter",
"tags": "$:/tags/AdvancedSearch",
"caption": "{{$:/language/Search/Filter/Caption}}",
"text": "\\define lingo-base() $:/language/Search/\r\n<$linkcatcher to=\"$:/temp/advancedsearch\">\n\n<<lingo Filter/Hint>>\n\n<div class=\"tc-search tc-advanced-search\">\r\n<$edit-text tiddler=\"$:/temp/advancedsearch\" type=\"search\" tag=\"input\"/>\r\n<$button popup=<<qualify \"$:/state/filterDropdown\">> class=\"tc-btn-invisible\">\r\n{{$:/core/images/down-arrow}}\r\n</$button>\r\n<$reveal state=\"$:/temp/advancedsearch\" type=\"nomatch\" text=\"\">\r\n<$button class=\"tc-btn-invisible\">\r\n<$action-setfield $tiddler=\"$:/temp/advancedsearch\" $field=\"text\" $value=\"\"/>\r\n{{$:/core/images/close-button}}\r\n</$button>\r\n<$macrocall $name=\"exportButton\" exportFilter={{$:/temp/advancedsearch}} lingoBase=\"$:/language/Buttons/ExportTiddlers/\"/>\r\n</$reveal>\r\n</div>\n\n<div class=\"tc-block-dropdown-wrapper\">\r\n<$reveal state=<<qualify \"$:/state/filterDropdown\">> type=\"nomatch\" text=\"\" default=\"\">\r\n<div class=\"tc-block-dropdown tc-edit-type-dropdown\">\r\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/Filter]]\"><$link to={{!!filter}}><$transclude field=\"description\"/></$link>\r\n</$list>\r\n</div>\r\n</$reveal>\r\n</div>\n\n</$linkcatcher>\n\n<$reveal state=\"$:/temp/advancedsearch\" type=\"nomatch\" text=\"\">\r\n<$set name=\"resultCount\" value=\"\"\"<$count filter={{$:/temp/advancedsearch}}/>\"\"\">\r\n<div class=\"tc-search-results\">\r\n<<lingo Filter/Matches>>\r\n<$list filter={{$:/temp/advancedsearch}} template=\"$:/core/ui/ListItemTemplate\"/>\r\n</div>\r\n</$set>\r\n</$reveal>\r\n"
},
"$:/core/ui/AdvancedSearch/Shadows": {
"title": "$:/core/ui/AdvancedSearch/Shadows",
"tags": "$:/tags/AdvancedSearch",
"caption": "{{$:/language/Search/Shadows/Caption}}",
"text": "\\define lingo-base() $:/language/Search/\r\n<$linkcatcher to=\"$:/temp/advancedsearch\">\n\n<<lingo Shadows/Hint>>\n\n<div class=\"tc-search\">\r\n<$edit-text tiddler=\"$:/temp/advancedsearch\" type=\"search\" tag=\"input\"/>\r\n<$reveal state=\"$:/temp/advancedsearch\" type=\"nomatch\" text=\"\">\r\n<$button class=\"tc-btn-invisible\">\r\n<$action-setfield $tiddler=\"$:/temp/advancedsearch\" $field=\"text\" $value=\"\"/>\r\n{{$:/core/images/close-button}}\r\n</$button>\r\n</$reveal>\r\n</div>\n\n</$linkcatcher>\n\n<$reveal state=\"$:/temp/advancedsearch\" type=\"nomatch\" text=\"\">\n\n<$set name=\"resultCount\" value=\"\"\"<$count filter=\"[all[shadows]search{$:/temp/advancedsearch}] -[[$:/temp/advancedsearch]]\"/>\"\"\">\n\n<div class=\"tc-search-results\">\n\n<<lingo Shadows/Matches>>\n\n<$list filter=\"[all[shadows]search{$:/temp/advancedsearch}sort[title]limit[250]] -[[$:/temp/advancedsearch]]\" template=\"$:/core/ui/ListItemTemplate\"/>\n\n</div>\n\n</$set>\n\n</$reveal>\n\n<$reveal state=\"$:/temp/advancedsearch\" type=\"match\" text=\"\">\n\n</$reveal>\r\n"
},
"$:/core/ui/AdvancedSearch/Standard": {
"title": "$:/core/ui/AdvancedSearch/Standard",
"tags": "$:/tags/AdvancedSearch",
"caption": "{{$:/language/Search/Standard/Caption}}",
"text": "\\define lingo-base() $:/language/Search/\r\n<$linkcatcher to=\"$:/temp/advancedsearch\">\n\n<<lingo Standard/Hint>>\n\n<div class=\"tc-search\">\r\n<$edit-text tiddler=\"$:/temp/advancedsearch\" type=\"search\" tag=\"input\"/>\r\n<$reveal state=\"$:/temp/advancedsearch\" type=\"nomatch\" text=\"\">\r\n<$button class=\"tc-btn-invisible\">\r\n<$action-setfield $tiddler=\"$:/temp/advancedsearch\" $field=\"text\" $value=\"\"/>\r\n{{$:/core/images/close-button}}\r\n</$button>\r\n</$reveal>\r\n</div>\n\n</$linkcatcher>\n\n<$reveal state=\"$:/temp/advancedsearch\" type=\"nomatch\" text=\"\">\r\n<$set name=\"searchTiddler\" value=\"$:/temp/advancedsearch\">\r\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]butfirst[]limit[1]]\" emptyMessage=\"\"\"\r\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]]\">\r\n<$transclude/>\r\n</$list>\r\n\"\"\">\r\n<$macrocall $name=\"tabs\" tabsList=\"[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]]\" default={{$:/config/SearchResults/Default}}/>\r\n</$list>\r\n</$set>\r\n</$reveal>\r\n"
},
"$:/core/ui/AdvancedSearch/System": {
"title": "$:/core/ui/AdvancedSearch/System",
"tags": "$:/tags/AdvancedSearch",
"caption": "{{$:/language/Search/System/Caption}}",
"text": "\\define lingo-base() $:/language/Search/\r\n<$linkcatcher to=\"$:/temp/advancedsearch\">\n\n<<lingo System/Hint>>\n\n<div class=\"tc-search\">\r\n<$edit-text tiddler=\"$:/temp/advancedsearch\" type=\"search\" tag=\"input\"/>\r\n<$reveal state=\"$:/temp/advancedsearch\" type=\"nomatch\" text=\"\">\r\n<$button class=\"tc-btn-invisible\">\r\n<$action-setfield $tiddler=\"$:/temp/advancedsearch\" $field=\"text\" $value=\"\"/>\r\n{{$:/core/images/close-button}}\r\n</$button>\r\n</$reveal>\r\n</div>\n\n</$linkcatcher>\n\n<$reveal state=\"$:/temp/advancedsearch\" type=\"nomatch\" text=\"\">\n\n<$set name=\"resultCount\" value=\"\"\"<$count filter=\"[is[system]search{$:/temp/advancedsearch}] -[[$:/temp/advancedsearch]]\"/>\"\"\">\n\n<div class=\"tc-search-results\">\n\n<<lingo System/Matches>>\n\n<$list filter=\"[is[system]search{$:/temp/advancedsearch}sort[title]limit[250]] -[[$:/temp/advancedsearch]]\" template=\"$:/core/ui/ListItemTemplate\"/>\n\n</div>\n\n</$set>\n\n</$reveal>\n\n<$reveal state=\"$:/temp/advancedsearch\" type=\"match\" text=\"\">\n\n</$reveal>\r\n"
},
"$:/AdvancedSearch": {
"title": "$:/AdvancedSearch",
"icon": "$:/core/images/advanced-search-button",
"text": "<div class=\"tc-advanced-search\">\r\n<<tabs \"[all[shadows+tiddlers]tag[$:/tags/AdvancedSearch]!has[draft.of]]\" \"$:/core/ui/AdvancedSearch/System\">>\r\n</div>\r\n"
},
"$:/core/ui/AlertTemplate": {
"title": "$:/core/ui/AlertTemplate",
"text": "<div class=\"tc-alert\">\r\n<div class=\"tc-alert-toolbar\">\r\n<$button message=\"tm-delete-tiddler\" class=\"tc-btn-invisible\">\r\n{{$:/core/images/delete-button}}</$button>\r\n</div>\r\n<div class=\"tc-alert-subtitle\">\r\n<$view field=\"component\"/> - <$view field=\"modified\" format=\"date\" template=\"0hh:0mm:0ss DD MM YYYY\"/> <$reveal type=\"nomatch\" state=\"!!count\" text=\"\"><span class=\"tc-alert-highlight\">(count: <$view field=\"count\"/>)</span></$reveal>\r\n</div>\r\n<div class=\"tc-alert-body\">\n\n<$transclude/>\n\n</div>\r\n</div>\r\n"
},
"$:/core/ui/BinaryWarning": {
"title": "$:/core/ui/BinaryWarning",
"text": "\\define lingo-base() $:/language/BinaryWarning/\r\n<div class=\"tc-binary-warning\">\n\n<<lingo Prompt>>\n\n</div>\r\n"
},
"$:/core/ui/Components/tag-link": {
"title": "$:/core/ui/Components/tag-link",
"text": "<$link>\r\n<$set name=\"backgroundColor\" value={{!!color}}>\r\n<span style=<<tag-styles>> class=\"tc-tag-label\">\r\n<$view field=\"title\" format=\"text\"/>\r\n</span>\r\n</$set>\r\n</$link>"
},
"$:/core/ui/ControlPanel/Advanced": {
"title": "$:/core/ui/ControlPanel/Advanced",
"tags": "$:/tags/ControlPanel/Info",
"caption": "{{$:/language/ControlPanel/Advanced/Caption}}",
"text": "{{$:/language/ControlPanel/Advanced/Hint}}\n\n<div class=\"tc-control-panel\">\r\n<<tabs \"[all[shadows+tiddlers]tag[$:/tags/ControlPanel/Advanced]!has[draft.of]]\" \"$:/core/ui/ControlPanel/TiddlerFields\">>\r\n</div>\r\n"
},
"$:/core/ui/ControlPanel/Appearance": {
"title": "$:/core/ui/ControlPanel/Appearance",
"tags": "$:/tags/ControlPanel",
"caption": "{{$:/language/ControlPanel/Appearance/Caption}}",
"text": "{{$:/language/ControlPanel/Appearance/Hint}}\n\n<div class=\"tc-control-panel\">\r\n<<tabs \"[all[shadows+tiddlers]tag[$:/tags/ControlPanel/Appearance]!has[draft.of]]\" \"$:/core/ui/ControlPanel/Theme\">>\r\n</div>\r\n"
},
"$:/core/ui/ControlPanel/Basics": {
"title": "$:/core/ui/ControlPanel/Basics",
"tags": "$:/tags/ControlPanel/Info",
"caption": "{{$:/language/ControlPanel/Basics/Caption}}",
"text": "\\define lingo-base() $:/language/ControlPanel/Basics/\n\n\\define show-filter-count(filter)\r\n<$button class=\"tc-btn-invisible\">\r\n<$action-setfield $tiddler=\"$:/temp/advancedsearch\" $value=\"\"\"$filter$\"\"\"/>\r\n<$action-setfield $tiddler=\"$:/state/tab--1498284803\" $value=\"$:/core/ui/AdvancedSearch/Filter\"/>\r\n<$action-navigate $to=\"$:/AdvancedSearch\"/>\r\n''<$count filter=\"\"\"$filter$\"\"\"/>''\r\n{{$:/core/images/advanced-search-button}}\r\n</$button>\r\n\\end\n\n|<<lingo Version/Prompt>> |''<<version>>'' |\r\n|<$link to=\"$:/SiteTitle\"><<lingo Title/Prompt>></$link> |<$edit-text tiddler=\"$:/SiteTitle\" default=\"\" tag=\"input\"/> |\r\n|<$link to=\"$:/SiteSubtitle\"><<lingo Subtitle/Prompt>></$link> |<$edit-text tiddler=\"$:/SiteSubtitle\" default=\"\" tag=\"input\"/> |\r\n|<$link to=\"$:/status/UserName\"><<lingo Username/Prompt>></$link> |<$edit-text tiddler=\"$:/status/UserName\" default=\"\" tag=\"input\"/> |\r\n|<$link to=\"$:/config/AnimationDuration\"><<lingo AnimDuration/Prompt>></$link> |<$edit-text tiddler=\"$:/config/AnimationDuration\" default=\"\" tag=\"input\"/> |\r\n|<$link to=\"$:/DefaultTiddlers\"><<lingo DefaultTiddlers/Prompt>></$link> |<<lingo DefaultTiddlers/TopHint>><br> <$edit-text tag=\"textarea\" tiddler=\"$:/DefaultTiddlers\"/><br>//<<lingo DefaultTiddlers/BottomHint>>// |\r\n|<$link to=\"$:/config/NewJournal/Title\"><<lingo NewJournal/Title/Prompt>></$link> |<$edit-text tiddler=\"$:/config/NewJournal/Title\" default=\"\" tag=\"input\"/> |\r\n|<$link to=\"$:/config/NewJournal/Tags\"><<lingo NewJournal/Tags/Prompt>></$link> |<$edit-text tiddler=\"$:/config/NewJournal/Tags\" default=\"\" tag=\"input\"/> |\r\n|<<lingo Language/Prompt>> |{{$:/snippets/minilanguageswitcher}} |\r\n|<<lingo Tiddlers/Prompt>> |<<show-filter-count \"[!is[system]sort[title]]\">> |\r\n|<<lingo Tags/Prompt>> |<<show-filter-count \"[tags[]sort[title]]\">> |\r\n|<<lingo SystemTiddlers/Prompt>> |<<show-filter-count \"[is[system]sort[title]]\">> |\r\n|<<lingo ShadowTiddlers/Prompt>> |<<show-filter-count \"[all[shadows]sort[title]]\">> |\r\n|<<lingo OverriddenShadowTiddlers/Prompt>> |<<show-filter-count \"[is[tiddler]is[shadow]sort[title]]\">> |\r\n"
},
"$:/core/ui/ControlPanel/EditorTypes": {
"title": "$:/core/ui/ControlPanel/EditorTypes",
"tags": "$:/tags/ControlPanel/Advanced",
"caption": "{{$:/language/ControlPanel/EditorTypes/Caption}}",
"text": "\\define lingo-base() $:/language/ControlPanel/EditorTypes/\n\n<<lingo Hint>>\n\n<table>\r\n<tbody>\r\n<tr>\r\n<th><<lingo Type/Caption>></th>\r\n<th><<lingo Editor/Caption>></th>\r\n</tr>\r\n<$list filter=\"[all[shadows+tiddlers]prefix[$:/config/EditorTypeMappings/]sort[title]]\">\r\n<tr>\r\n<td>\r\n<$link>\r\n<$list filter=\"[all[current]removeprefix[$:/config/EditorTypeMappings/]]\">\r\n<$text text={{!!title}}/>\r\n</$list>\r\n</$link>\r\n</td>\r\n<td>\r\n<$view field=\"text\"/>\r\n</td>\r\n</tr>\r\n</$list>\r\n</tbody>\r\n</table>\r\n"
},
"$:/core/ui/ControlPanel/Info": {
"title": "$:/core/ui/ControlPanel/Info",
"tags": "$:/tags/ControlPanel",
"caption": "{{$:/language/ControlPanel/Info/Caption}}",
"text": "{{$:/language/ControlPanel/Info/Hint}}\n\n<div class=\"tc-control-panel\">\r\n<<tabs \"[all[shadows+tiddlers]tag[$:/tags/ControlPanel/Info]!has[draft.of]]\" \"$:/core/ui/ControlPanel/Basics\">>\r\n</div>\r\n"
},
"$:/core/ui/ControlPanel/LoadedModules": {
"title": "$:/core/ui/ControlPanel/LoadedModules",
"tags": "$:/tags/ControlPanel/Advanced",
"caption": "{{$:/language/ControlPanel/LoadedModules/Caption}}",
"text": "\\define lingo-base() $:/language/ControlPanel/\r\n<<lingo LoadedModules/Hint>>\n\n{{$:/snippets/modules}}\r\n"
},
"$:/core/ui/ControlPanel/Palette": {
"title": "$:/core/ui/ControlPanel/Palette",
"tags": "$:/tags/ControlPanel/Appearance",
"caption": "{{$:/language/ControlPanel/Palette/Caption}}",
"text": "\\define lingo-base() $:/language/ControlPanel/Palette/\n\n{{$:/snippets/paletteswitcher}}\n\n<$reveal type=\"nomatch\" state=\"$:/state/ShowPaletteEditor\" text=\"yes\">\n\n<$button set=\"$:/state/ShowPaletteEditor\" setTo=\"yes\"><<lingo ShowEditor/Caption>></$button>\n\n</$reveal>\n\n<$reveal type=\"match\" state=\"$:/state/ShowPaletteEditor\" text=\"yes\">\n\n<$button set=\"$:/state/ShowPaletteEditor\" setTo=\"no\"><<lingo HideEditor/Caption>></$button>\r\n{{$:/snippets/paletteeditor}}\n\n</$reveal>\n\n"
},
"$:/core/ui/ControlPanel/Plugins": {
"title": "$:/core/ui/ControlPanel/Plugins",
"tags": "$:/tags/ControlPanel",
"caption": "{{$:/language/ControlPanel/Plugins/Caption}}",
"text": "\\define lingo-base() $:/language/ControlPanel/Plugins/\r\n\\define popup-state-macro()\r\n$(qualified-state)$-$(currentTiddler)$\r\n\\end\r\n\\define tabs-state-macro()\r\n$(popup-state)$-$(pluginInfoType)$\r\n\\end\r\n\\define plugin-icon-title()\r\n$(currentTiddler)$/icon\r\n\\end\r\n\\define plugin-disable-title()\r\n$:/config/Plugins/Disabled/$(currentTiddler)$\r\n\\end\r\n\\define plugin-table-body(type,disabledMessage)\r\n<div class=\"tc-plugin-info-chunk\">\r\n<$reveal type=\"nomatch\" state=<<popup-state>> text=\"yes\">\r\n<$button class=\"tc-btn-invisible tc-btn-dropdown\" set=<<popup-state>> setTo=\"yes\">\r\n{{$:/core/images/right-arrow}}\r\n</$button>\r\n</$reveal>\r\n<$reveal type=\"match\" state=<<popup-state>> text=\"yes\">\r\n<$button class=\"tc-btn-invisible tc-btn-dropdown\" set=<<popup-state>> setTo=\"no\">\r\n{{$:/core/images/down-arrow}}\r\n</$button>\r\n</$reveal>\r\n</div>\r\n<div class=\"tc-plugin-info-chunk\">\r\n<$transclude tiddler=<<currentTiddler>> subtiddler=<<plugin-icon-title>>>\r\n<$transclude tiddler=\"$:/core/images/plugin-generic-$type$\"/>\r\n</$transclude>\r\n</div>\r\n<div class=\"tc-plugin-info-chunk\">\r\n<div>\r\n''<$view field=\"description\"><$view field=\"title\"/></$view>'' $disabledMessage$\r\n</div>\r\n<div>\r\n<$view field=\"title\"/>\r\n</div>\r\n<div>\r\n<$view field=\"version\"/>\r\n</div>\r\n</div>\r\n\\end\r\n\\define plugin-table(type)\r\n<$set name=\"qualified-state\" value=<<qualify \"$:/state/plugin-info\">>>\r\n<$list filter=\"[!has[draft.of]plugin-type[$type$]sort[description]]\" emptyMessage=<<lingo \"Empty/Hint\">>>\r\n<$set name=\"popup-state\" value=<<popup-state-macro>>>\r\n<$reveal type=\"nomatch\" state=<<plugin-disable-title>> text=\"yes\">\r\n<$link to={{!!title}} class=\"tc-plugin-info\">\r\n<<plugin-table-body type:\"$type$\">>\r\n</$link>\r\n</$reveal>\r\n<$reveal type=\"match\" state=<<plugin-disable-title>> text=\"yes\">\r\n<$link to={{!!title}} class=\"tc-plugin-info tc-plugin-info-disabled\">\r\n<<plugin-table-body type:\"$type$\" disabledMessage:\"<$macrocall $name='lingo' title='Disabled/Status'/>\">>\r\n</$link>\r\n</$reveal>\r\n<$reveal type=\"match\" text=\"yes\" state=<<popup-state>>>\r\n<div class=\"tc-plugin-info-dropdown\">\r\n<$list filter=\"[all[current]] -[[$:/core]]\">\r\n<div style=\"float:right;\">\r\n<$reveal type=\"nomatch\" state=<<plugin-disable-title>> text=\"yes\">\r\n<$button set=<<plugin-disable-title>> setTo=\"yes\" tooltip={{$:/language/ControlPanel/Plugins/Disable/Hint}} aria-label={{$:/language/ControlPanel/Plugins/Disable/Caption}}>\r\n<<lingo Disable/Caption>>\r\n</$button>\r\n</$reveal>\r\n<$reveal type=\"match\" state=<<plugin-disable-title>> text=\"yes\">\r\n<$button set=<<plugin-disable-title>> setTo=\"no\" tooltip={{$:/language/ControlPanel/Plugins/Enable/Hint}} aria-label={{$:/language/ControlPanel/Plugins/Enable/Caption}}>\r\n<<lingo Enable/Caption>>\r\n</$button>\r\n</$reveal>\r\n</div>\r\n</$list>\r\n<$reveal type=\"nomatch\" text=\"\" state=\"!!list\">\r\n<$macrocall $name=\"tabs\" state=<<tabs-state-macro>> tabsList={{!!list}} default=\"readme\" template=\"$:/core/ui/PluginInfo\"/>\r\n</$reveal>\r\n<$reveal type=\"match\" text=\"\" state=\"!!list\">\r\nNo information provided\r\n</$reveal>\r\n</div>\r\n</$reveal>\r\n</$set>\r\n</$list>\r\n</$set>\r\n\\end\n\n! <<lingo Plugin/Prompt>>\n\n<<plugin-table plugin>>\n\n! <<lingo Theme/Prompt>>\n\n<<plugin-table theme>>\n\n! <<lingo Language/Prompt>>\n\n<<plugin-table language>>\r\n"
},
"$:/core/ui/ControlPanel/Saving": {
"title": "$:/core/ui/ControlPanel/Saving",
"tags": "$:/tags/ControlPanel",
"caption": "{{$:/language/ControlPanel/Saving/Caption}}",
"text": "\\define lingo-base() $:/language/ControlPanel/Saving/\r\n\\define backupURL()\r\nhttp://$(userName)$.tiddlyspot.com/backup/\r\n\\end\r\n\\define backupLink()\r\n<$reveal type=\"nomatch\" state=\"$:/UploadName\" text=\"\">\r\n<$set name=\"userName\" value={{$:/UploadName}}>\r\n<a href=<<backupURL>>><$macrocall $name=\"backupURL\" $type=\"text/plain\" $output=\"text/plain\"/></a>\r\n</$set>\r\n</$reveal>\r\n\\end\r\n! <<lingo TiddlySpot/Heading>>\n\n<<lingo TiddlySpot/Description>>\n\n|<<lingo TiddlySpot/UserName>> |<$edit-text tiddler=\"$:/UploadName\" default=\"\" tag=\"input\"/> |\r\n|<<lingo TiddlySpot/Password>> |<$password name=\"upload\"/> |\r\n|<<lingo TiddlySpot/Backups>> |<<backupLink>> |\n\n''<<lingo TiddlySpot/Advanced/Heading>>''\n\n|<<lingo TiddlySpot/ServerURL>> |<$edit-text tiddler=\"$:/UploadURL\" default=\"\" tag=\"input\"/> |\r\n|<<lingo TiddlySpot/Filename>> |<$edit-text tiddler=\"$:/UploadFilename\" default=\"index.html\" tag=\"input\"/> |\r\n|<<lingo TiddlySpot/UploadDir>> |<$edit-text tiddler=\"$:/UploadDir\" default=\".\" tag=\"input\"/> |\r\n|<<lingo TiddlySpot/BackupDir>> |<$edit-text tiddler=\"$:/UploadBackupDir\" default=\".\" tag=\"input\"/> |\n\n<<lingo TiddlySpot/Hint>>\n\n"
},
"$:/core/ui/ControlPanel/Settings/AutoSave": {
"title": "$:/core/ui/ControlPanel/Settings/AutoSave",
"tags": "$:/tags/ControlPanel/Settings",
"caption": "{{$:/language/ControlPanel/Settings/AutoSave/Caption}}",
"text": "\\define lingo-base() $:/language/ControlPanel/Settings/AutoSave/\n\n<$link to=\"$:/config/AutoSave\"><<lingo Hint>></$link>\n\n<$radio tiddler=\"$:/config/AutoSave\" value=\"yes\"> <<lingo Enabled/Description>> </$radio>\n\n<$radio tiddler=\"$:/config/AutoSave\" value=\"no\"> <<lingo Disabled/Description>> </$radio>\r\n"
},
"$:/core/ui/ControlPanel/Settings/NavigationAddressBar": {
"title": "$:/core/ui/ControlPanel/Settings/NavigationAddressBar",
"tags": "$:/tags/ControlPanel/Settings",
"caption": "{{$:/language/ControlPanel/Settings/NavigationAddressBar/Caption}}",
"text": "\\define lingo-base() $:/language/ControlPanel/Settings/NavigationAddressBar/\n\n<$link to=\"$:/config/Navigation/UpdateAddressBar\"><<lingo Hint>></$link>\n\n<$radio tiddler=\"$:/config/Navigation/UpdateAddressBar\" value=\"permaview\"> <<lingo Permaview/Description>> </$radio>\n\n<$radio tiddler=\"$:/config/Navigation/UpdateAddressBar\" value=\"permalink\"> <<lingo Permalink/Description>> </$radio>\n\n<$radio tiddler=\"$:/config/Navigation/UpdateAddressBar\" value=\"no\"> <<lingo No/Description>> </$radio>\r\n"
},
"$:/core/ui/ControlPanel/Settings/NavigationHistory": {
"title": "$:/core/ui/ControlPanel/Settings/NavigationHistory",
"tags": "$:/tags/ControlPanel/Settings",
"caption": "{{$:/language/ControlPanel/Settings/NavigationHistory/Caption}}",
"text": "\\define lingo-base() $:/language/ControlPanel/Settings/NavigationHistory/\r\n<$link to=\"$:/config/Navigation/UpdateHistory\"><<lingo Hint>></$link>\n\n<$radio tiddler=\"$:/config/Navigation/UpdateHistory\" value=\"yes\"> <<lingo Yes/Description>> </$radio>\n\n<$radio tiddler=\"$:/config/Navigation/UpdateHistory\" value=\"no\"> <<lingo No/Description>> </$radio>\r\n"
},
"$:/core/ui/ControlPanel/Settings/ToolbarButtons": {
"title": "$:/core/ui/ControlPanel/Settings/ToolbarButtons",
"tags": "$:/tags/ControlPanel/Settings",
"caption": "{{$:/language/ControlPanel/Settings/ToolbarButtons/Caption}}",
"text": "\\define lingo-base() $:/language/ControlPanel/Settings/ToolbarButtons/\r\n<<lingo Hint>>\n\n<$checkbox tiddler=\"$:/config/Toolbar/Icons\" field=\"text\" checked=\"yes\" unchecked=\"no\" default=\"yes\"> <$link to=\"$:/config/Toolbar/Icons\"><<lingo Icons/Description>></$link> </$checkbox>\n\n<$checkbox tiddler=\"$:/config/Toolbar/Text\" field=\"text\" checked=\"yes\" unchecked=\"no\" default=\"no\"> <$link to=\"$:/config/Toolbar/Text\"><<lingo Text/Description>></$link> </$checkbox>\r\n"
},
"$:/core/ui/ControlPanel/Settings": {
"title": "$:/core/ui/ControlPanel/Settings",
"tags": "$:/tags/ControlPanel",
"caption": "{{$:/language/ControlPanel/Settings/Caption}}",
"text": "\\define lingo-base() $:/language/ControlPanel/Settings/\n\n<<lingo Hint>>\n\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/ControlPanel/Settings]]\">\n\n<div style=\"border-top:1px solid #eee;\">\n\n!! <$link><$transclude field=\"caption\"/></$link>\n\n<$transclude/>\n\n</div>\n\n</$list>\r\n"
},
"$:/core/ui/ControlPanel/StoryView": {
"title": "$:/core/ui/ControlPanel/StoryView",
"tags": "$:/tags/ControlPanel/Appearance",
"caption": "{{$:/language/ControlPanel/StoryView/Caption}}",
"text": "{{$:/snippets/viewswitcher}}\r\n"
},
"$:/core/ui/ControlPanel/Theme": {
"title": "$:/core/ui/ControlPanel/Theme",
"tags": "$:/tags/ControlPanel/Appearance",
"caption": "{{$:/language/ControlPanel/Theme/Caption}}",
"text": "{{$:/snippets/themeswitcher}}\r\n"
},
"$:/core/ui/ControlPanel/TiddlerFields": {
"title": "$:/core/ui/ControlPanel/TiddlerFields",
"tags": "$:/tags/ControlPanel/Advanced",
"caption": "{{$:/language/ControlPanel/TiddlerFields/Caption}}",
"text": "\\define lingo-base() $:/language/ControlPanel/\n\n<<lingo TiddlerFields/Hint>>\n\n{{$:/snippets/allfields}}"
},
"$:/core/ui/ControlPanel/Toolbars/EditToolbar": {
"title": "$:/core/ui/ControlPanel/Toolbars/EditToolbar",
"tags": "$:/tags/ControlPanel/Toolbars",
"caption": "{{$:/language/ControlPanel/Toolbars/EditToolbar/Caption}}",
"text": "\\define lingo-base() $:/language/TiddlerInfo/\r\n\\define config-title()\r\n$:/config/EditToolbarButtons/Visibility/$(listItem)$\r\n\\end\n\n{{$:/language/ControlPanel/Toolbars/EditToolbar/Hint}}\n\n<$set name=\"tv-config-toolbar-icons\" value=\"yes\">\n\n<$set name=\"tv-config-toolbar-text\" value=\"yes\">\n\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/EditToolbar]!has[draft.of]]\" variable=\"listItem\">\n\n<$checkbox tiddler=<<config-title>> field=\"text\" checked=\"show\" unchecked=\"hide\" default=\"show\"/> <$transclude tiddler=<<listItem>> field=\"caption\"/> <i class=\"tc-muted\">-- <$transclude tiddler=<<listItem>> field=\"description\"/></i>\n\n</$list>\n\n</$set>\n\n</$set>\r\n"
},
"$:/core/ui/ControlPanel/Toolbars/PageControls": {
"title": "$:/core/ui/ControlPanel/Toolbars/PageControls",
"tags": "$:/tags/ControlPanel/Toolbars",
"caption": "{{$:/language/ControlPanel/Toolbars/PageControls/Caption}}",
"text": "\\define lingo-base() $:/language/TiddlerInfo/\r\n\\define config-title()\r\n$:/config/PageControlButtons/Visibility/$(listItem)$\r\n\\end\n\n{{$:/language/ControlPanel/Toolbars/PageControls/Hint}}\n\n<$set name=\"tv-config-toolbar-icons\" value=\"yes\">\n\n<$set name=\"tv-config-toolbar-text\" value=\"yes\">\n\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/PageControls]!has[draft.of]]\" variable=\"listItem\">\n\n<$checkbox tiddler=<<config-title>> field=\"text\" checked=\"show\" unchecked=\"hide\" default=\"show\"/> <$transclude tiddler=<<listItem>> field=\"caption\"/> <i class=\"tc-muted\">-- <$transclude tiddler=<<listItem>> field=\"description\"/></i>\n\n</$list>\n\n</$set>\n\n</$set>\r\n"
},
"$:/core/ui/ControlPanel/Toolbars/ViewToolbar": {
"title": "$:/core/ui/ControlPanel/Toolbars/ViewToolbar",
"tags": "$:/tags/ControlPanel/Toolbars",
"caption": "{{$:/language/ControlPanel/Toolbars/ViewToolbar/Caption}}",
"text": "\\define lingo-base() $:/language/TiddlerInfo/\r\n\\define config-title()\r\n$:/config/ViewToolbarButtons/Visibility/$(listItem)$\r\n\\end\n\n{{$:/language/ControlPanel/Toolbars/ViewToolbar/Hint}}\n\n<$set name=\"tv-config-toolbar-icons\" value=\"yes\">\n\n<$set name=\"tv-config-toolbar-text\" value=\"yes\">\n\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/ViewToolbar]!has[draft.of]]\" variable=\"listItem\">\n\n<$checkbox tiddler=<<config-title>> field=\"text\" checked=\"show\" unchecked=\"hide\" default=\"show\"/> <$transclude tiddler=<<listItem>> field=\"caption\"/> <i class=\"tc-muted\">-- <$transclude tiddler=<<listItem>> field=\"description\"/></i>\n\n</$list>\n\n</$set>\n\n</$set>\r\n"
},
"$:/core/ui/ControlPanel/Toolbars": {
"title": "$:/core/ui/ControlPanel/Toolbars",
"tags": "$:/tags/ControlPanel/Appearance",
"caption": "{{$:/language/ControlPanel/Toolbars/Caption}}",
"text": "{{$:/language/ControlPanel/Toolbars/Hint}}\n\n<div class=\"tc-control-panel\">\r\n<<tabs \"[all[shadows+tiddlers]tag[$:/tags/ControlPanel/Toolbars]!has[draft.of]]\" \"$:/core/ui/ControlPanel/Toolbars/ViewToolbar\" \"$:/state/tabs/controlpanel/toolbars\" \"tc-vertical\">>\r\n</div>\r\n"
},
"$:/ControlPanel": {
"title": "$:/ControlPanel",
"icon": "$:/core/images/options-button",
"text": "<div class=\"tc-control-panel\">\r\n<<tabs \"[all[shadows+tiddlers]tag[$:/tags/ControlPanel]!has[draft.of]]\" \"$:/core/ui/ControlPanel/Info\">>\r\n</div>\r\n"
},
"$:/core/ui/DefaultSearchResultList": {
"title": "$:/core/ui/DefaultSearchResultList",
"tags": "$:/tags/SearchResults",
"caption": "{{$:/language/Search/DefaultResults/Caption}}",
"text": "\\define searchResultList()\r\n<$set name=\"resultCount\" value=\"\"\"<$count filter=\"[!is[system]search{$(searchTiddler)$}]\"/>\"\"\">\n\n{{$:/language/Search/Matches}}\n\n</$set>\n\n//<small>Title matches:</small>//\n\n<$list filter=\"[!is[system]search:title{$(searchTiddler)$}sort[title]limit[250]]\" template=\"$:/core/ui/ListItemTemplate\"/>\n\n//<small>All matches:</small>//\n\n<$list filter=\"[!is[system]search{$(searchTiddler)$}sort[title]limit[250]]\" template=\"$:/core/ui/ListItemTemplate\"/>\r\n\\end\r\n<<searchResultList>>\r\n"
},
"$:/core/ui/EditTemplate/body": {
"title": "$:/core/ui/EditTemplate/body",
"tags": "$:/tags/EditTemplate",
"text": "\\define lingo-base() $:/language/EditTemplate/Body/\r\n<$list filter=\"[is[current]has[_canonical_uri]]\">\n\n<div class=\"tc-message-box\">\n\n<<lingo External/Hint>>\n\n<a href={{!!_canonical_uri}}><$text text={{!!_canonical_uri}}/></a>\n\n<$edit-text field=\"_canonical_uri\" class=\"tc-edit-fields\"></$edit-text>\n\n</div>\n\n</$list>\n\n<$list filter=\"[is[current]!has[_canonical_uri]]\">\n\n<$reveal state=\"$:/state/showeditpreview\" type=\"match\" text=\"yes\">\n\n<em class=\"tc-edit\"><<lingo Hint>></em> <$button type=\"set\" set=\"$:/state/showeditpreview\" setTo=\"no\"><<lingo Preview/Button/Hide>></$button>\n\n<div class=\"tc-tiddler-preview\">\r\n<div class=\"tc-tiddler-preview-preview\">\n\n<$transclude />\n\n</div>\n\n<div class=\"tc-tiddler-preview-edit\">\r\n<$edit field=\"text\" class=\"tc-edit-texteditor\" placeholder={{$:/language/EditTemplate/Body/Placeholder}}/>\n\n</div>\n\n</div>\n\n</$reveal>\n\n<$reveal state=\"$:/state/showeditpreview\" type=\"nomatch\" text=\"yes\">\n\n<em class=\"tc-edit\"><<lingo Hint>></em> <$button type=\"set\" set=\"$:/state/showeditpreview\" setTo=\"yes\"><<lingo Preview/Button/Show>></$button>\r\n<$edit field=\"text\" class=\"tc-edit-texteditor\" placeholder={{$:/language/EditTemplate/Body/Placeholder}}/>\n\n</$reveal>\n\n</$list>\r\n"
},
"$:/core/ui/EditTemplate/controls": {
"title": "$:/core/ui/EditTemplate/controls",
"tags": "$:/tags/EditTemplate",
"text": "\\define config-title()\r\n$:/config/EditToolbarButtons/Visibility/$(listItem)$\r\n\\end\r\n<div class=\"tc-tiddler-title tc-tiddler-edit-title\">\r\n<$view field=\"title\"/>\r\n<span class=\"tc-tiddler-controls tc-titlebar\"><$list filter=\"[all[shadows+tiddlers]tag[$:/tags/EditToolbar]!has[draft.of]]\" variable=\"listItem\"><$reveal type=\"nomatch\" state=<<config-title>> text=\"hide\"><$transclude tiddler=<<listItem>>/></$reveal></$list></span>\r\n<div style=\"clear: both;\"></div>\r\n</div>\r\n"
},
"$:/core/ui/EditTemplate/fields": {
"title": "$:/core/ui/EditTemplate/fields",
"tags": "$:/tags/EditTemplate",
"text": "\\define lingo-base() $:/language/EditTemplate/\r\n\\define config-title()\r\n$:/config/EditTemplateFields/Visibility/$(currentField)$\r\n\\end\n\n\\define config-filter()\r\n[[hide]] -[title{$(config-title)$}]\r\n\\end\n\n\\define new-field(name,value)\r\n<$reveal type=\"nomatch\" text=\"\" default=\"\"\"$name$\"\"\">\r\n<$button>\r\n<$action-sendmessage $message=\"tm-add-field\" $name$=\"\"\"$value$\"\"\"/>\r\n<$action-deletetiddler $tiddler=\"$:/temp/newfieldname\"/>\r\n<$action-deletetiddler $tiddler=\"$:/temp/newfieldvalue\"/>\r\n<<lingo Fields/Add/Button>>\r\n</$button>\r\n</$reveal>\r\n<$reveal type=\"match\" text=\"\" default=\"\"\"$name$\"\"\">\r\n<$button>\r\n<<lingo Fields/Add/Button>>\r\n</$button>\r\n</$reveal>\r\n\\end\n\n<div class=\"tc-edit-fields\">\r\n<table class=\"tc-edit-fields\">\r\n<tbody>\r\n<$list filter=\"[all[current]fields[]] +[sort[title]]\" variable=\"currentField\">\r\n<$list filter=<<config-filter>> variable=\"temp\">\r\n<tr class=\"tc-edit-field\">\r\n<td class=\"tc-edit-field-name\">\r\n<$text text=<<currentField>>/>:</td>\r\n<td class=\"tc-edit-field-value\">\r\n<$edit-text tiddler=<<currentTiddler>> field=<<currentField>> placeholder={{$:/language/EditTemplate/Fields/Add/Value/Placeholder}}/>\r\n</td>\r\n<td class=\"tc-edit-field-remove\">\r\n<$button class=\"tc-btn-invisible\" tooltip={{$:/language/EditTemplate/Field/Remove/Hint}} aria-label={{$:/language/EditTemplate/Field/Remove/Caption}}>\r\n<$action-deletefield $field=<<currentField>>/>\r\n{{$:/core/images/delete-button}}\r\n</$button>\r\n</td>\r\n</tr>\r\n</$list>\r\n</$list>\r\n</tbody>\r\n</table>\r\n</div>\n\n<$fieldmangler>\r\n<div class=\"tc-edit-field-add\">\r\n<em class=\"tc-edit\">\r\n<<lingo Fields/Add/Prompt>>\r\n</em>\r\n<span class=\"tc-edit-field-add-name\">\r\n<$edit-text tiddler=\"$:/temp/newfieldname\" tag=\"input\" default=\"\" placeholder={{$:/language/EditTemplate/Fields/Add/Name/Placeholder}} class=\"tc-edit-texteditor\"/>\r\n</span>\r\n<span class=\"tc-edit-field-add-value\">\r\n<$edit-text tiddler=\"$:/temp/newfieldvalue\" tag=\"input\" default=\"\" placeholder={{$:/language/EditTemplate/Fields/Add/Value/Placeholder}} class=\"tc-edit-texteditor\"/>\r\n</span>\r\n<span class=\"tc-edit-field-add-button\">\r\n<$macrocall $name=\"new-field\" name={{$:/temp/newfieldname}} value={{$:/temp/newfieldvalue}}/>\r\n</span>\r\n</div>\r\n</$fieldmangler>\n\n"
},
"$:/core/ui/EditTemplate/shadow": {
"title": "$:/core/ui/EditTemplate/shadow",
"tags": "$:/tags/EditTemplate",
"text": "\\define lingo-base() $:/language/EditTemplate/Shadow/\r\n<$list filter=\"[all[current]get[draft.of]is[shadow]!is[tiddler]]\">\r\n<div class=\"tc-message-box\">\n\n<<lingo Warning>>\n\n</div>\r\n</$list>\n\n<$list filter=\"[all[current]get[draft.of]is[shadow]is[tiddler]]\">\r\n<div class=\"tc-message-box\">\n\n<<lingo OverriddenWarning>>\n\n</div>\r\n</$list>\r\n"
},
"$:/core/ui/EditTemplate/tags": {
"title": "$:/core/ui/EditTemplate/tags",
"tags": "$:/tags/EditTemplate",
"text": "\\define lingo-base() $:/language/EditTemplate/\r\n\\define tag-styles()\r\nbackground-color:$(backgroundColor)$;\r\n\\end\r\n<div class=\"tc-edit-tags\">\r\n<$fieldmangler>\r\n<$list filter=\"[all[current]tags[]sort[title]]\" storyview=\"pop\"><$set name=\"backgroundColor\" value={{!!color}}><span style=<<tag-styles>> class=\"tc-tag-label\">\r\n<$view field=\"title\" format=\"text\" />\r\n<$button message=\"tm-remove-tag\" param={{!!title}} class=\"tc-btn-invisible tc-remove-tag-button\">×</$button></span>\r\n</$set>\r\n</$list>\n\n<div class=\"tc-edit-add-tag\">\r\n<span class=\"tc-add-tag-name\">\r\n<$edit-text tiddler=\"$:/temp/NewTagName\" tag=\"input\" default=\"\" placeholder={{$:/language/EditTemplate/Tags/Add/Placeholder}} focusPopup=<<qualify \"$:/state/popup/tags-auto-complete\">> class=\"tc-edit-texteditor tc-popup-handle\"/>\r\n</span> <$button popup=<<qualify \"$:/state/popup/tags-auto-complete\">> class=\"tc-btn-invisible tc-btn-dropdown\" tooltip={{$:/language/EditTemplate/Tags/Dropdown/Hint}} aria-label={{$:/language/EditTemplate/Tags/Dropdown/Caption}}>{{$:/core/images/down-arrow}}</$button> <span class=\"tc-add-tag-button\">\r\n<$button message=\"tm-add-tag\" param={{$:/temp/NewTagName}} set=\"$:/temp/NewTagName\" setTo=\"\" class=\"\">\r\n<<lingo Tags/Add/Button>>\r\n</$button>\r\n</span>\r\n</div>\n\n<div class=\"tc-block-dropdown-wrapper\">\r\n<$reveal state=<<qualify \"$:/state/popup/tags-auto-complete\">> type=\"nomatch\" text=\"\" default=\"\">\r\n<div class=\"tc-block-dropdown\">\r\n<$linkcatcher set=\"$:/temp/NewTagName\" setTo=\"\" message=\"tm-add-tag\">\r\n<$list filter=\"[tags[]search:title{$:/temp/NewTagName}sort[]]\">\r\n{{||$:/core/ui/Components/tag-link}}\r\n</$list>\r\n<hr>\r\n<$list filter=\"[!is[system]search:title{$:/temp/NewTagName}sort[]]\">\r\n{{||$:/core/ui/Components/tag-link}}\r\n</$list>\r\n</$linkcatcher>\r\n</div>\r\n</$reveal>\r\n</div>\r\n</$fieldmangler>\r\n</div>"
},
"$:/core/ui/EditTemplate/title": {
"title": "$:/core/ui/EditTemplate/title",
"tags": "$:/tags/EditTemplate",
"text": "<$edit-text field=\"draft.title\" class=\"tc-titlebar tc-edit-texteditor\" focus=\"true\"/>"
},
"$:/core/ui/EditTemplate/type": {
"title": "$:/core/ui/EditTemplate/type",
"tags": "$:/tags/EditTemplate",
"text": "\\define lingo-base() $:/language/EditTemplate/\r\n<div class=\"tc-type-selector\"><$fieldmangler>\r\n<em class=\"tc-edit\"><<lingo Type/Prompt>></em> <$edit-text field=\"type\" tag=\"input\" default=\"\" placeholder={{$:/language/EditTemplate/Type/Placeholder}} focusPopup=<<qualify \"$:/state/popup/type-dropdown\">> class=\"tc-edit-typeeditor tc-popup-handle\"/> <$button popup=<<qualify \"$:/state/popup/type-dropdown\">> class=\"tc-btn-invisible tc-btn-dropdown\" tooltip={{$:/language/EditTemplate/Type/Dropdown/Hint}} aria-label={{$:/language/EditTemplate/Type/Dropdown/Caption}}>{{$:/core/images/down-arrow}}</$button> <$button message=\"tm-remove-field\" param=\"type\" class=\"tc-btn-invisible tc-btn-icon\" tooltip={{$:/language/EditTemplate/Type/Delete/Hint}} aria-label={{$:/language/EditTemplate/Type/Delete/Caption}}>{{$:/core/images/delete-button}}</$button>\r\n</$fieldmangler></div>\n\n<div class=\"tc-block-dropdown-wrapper\">\r\n<$reveal state=<<qualify \"$:/state/popup/type-dropdown\">> type=\"nomatch\" text=\"\" default=\"\">\r\n<div class=\"tc-block-dropdown tc-edit-type-dropdown\">\r\n<$linkcatcher to=\"!!type\">\r\n<$list filter='[all[shadows+tiddlers]prefix[$:/language/Docs/Types/]each[group]sort[group]]'>\r\n<div class=\"tc-dropdown-item\">\r\n<$text text={{!!group}}/>\r\n</div>\r\n<$list filter=\"[all[shadows+tiddlers]prefix[$:/language/Docs/Types/]group{!!group}] +[sort[description]]\"><$link to={{!!name}}><$view field=\"description\"/> (<$view field=\"name\"/>)</$link>\r\n</$list>\r\n</$list>\r\n</$linkcatcher>\r\n</div>\r\n</$reveal>\r\n</div>"
},
"$:/core/ui/EditTemplate": {
"title": "$:/core/ui/EditTemplate",
"text": "\\define frame-classes()\r\ntc-tiddler-frame tc-tiddler-edit-frame $(missingTiddlerClass)$ $(shadowTiddlerClass)$ $(systemTiddlerClass)$\r\n\\end\r\n<div class=<<frame-classes>>>\r\n<$set name=\"storyTiddler\" value=<<currentTiddler>>>\r\n<$keyboard key=\"escape\" message=\"tm-cancel-tiddler\">\r\n<$keyboard key=\"ctrl+enter\" message=\"tm-save-tiddler\">\r\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/EditTemplate]!has[draft.of]]\" variable=\"listItem\">\r\n<$transclude tiddler=<<listItem>>/>\r\n</$list>\r\n</$keyboard>\r\n</$keyboard>\r\n</$set>\r\n</div>\r\n"
},
"$:/core/ui/Buttons/cancel": {
"title": "$:/core/ui/Buttons/cancel",
"tags": "$:/tags/EditToolbar",
"caption": "{{$:/core/images/cancel-button}} {{$:/language/Buttons/Cancel/Caption}}",
"description": "{{$:/language/Buttons/Cancel/Hint}}",
"text": "<$button message=\"tm-cancel-tiddler\" tooltip={{$:/language/Buttons/Cancel/Hint}} aria-label={{$:/language/Buttons/Cancel/Caption}} class=<<tv-config-toolbar-class>>>\r\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\r\n{{$:/core/images/cancel-button}}\r\n</$list>\r\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\r\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/Cancel/Caption}}/></span>\r\n</$list>\r\n</$button>"
},
"$:/core/ui/Buttons/delete": {
"title": "$:/core/ui/Buttons/delete",
"tags": "$:/tags/EditToolbar",
"caption": "{{$:/core/images/delete-button}} {{$:/language/Buttons/Delete/Caption}}",
"description": "{{$:/language/Buttons/Delete/Hint}}",
"text": "<$button message=\"tm-delete-tiddler\" tooltip={{$:/language/Buttons/Delete/Hint}} aria-label={{$:/language/Buttons/Delete/Caption}} class=<<tv-config-toolbar-class>>>\r\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\r\n{{$:/core/images/delete-button}}\r\n</$list>\r\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\r\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/Delete/Caption}}/></span>\r\n</$list>\r\n</$button>"
},
"$:/core/ui/Buttons/save": {
"title": "$:/core/ui/Buttons/save",
"tags": "$:/tags/EditToolbar",
"caption": "{{$:/core/images/done-button}} {{$:/language/Buttons/Save/Caption}}",
"description": "{{$:/language/Buttons/Save/Hint}}",
"text": "<$button message=\"tm-save-tiddler\" tooltip={{$:/language/Buttons/Save/Hint}} aria-label={{$:/language/Buttons/Save/Caption}} class=<<tv-config-toolbar-class>>>\r\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\r\n{{$:/core/images/done-button}}\r\n</$list>\r\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\r\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/Save/Caption}}/></span>\r\n</$list>\r\n</$button>"
},
"$:/core/Filters/AllTags": {
"title": "$:/core/Filters/AllTags",
"tags": "$:/tags/Filter",
"filter": "[tags[]!is[system]sort[title]]",
"description": "{{$:/language/Filters/AllTags}}",
"text": ""
},
"$:/core/Filters/AllTiddlers": {
"title": "$:/core/Filters/AllTiddlers",
"tags": "$:/tags/Filter",
"filter": "[!is[system]sort[title]]",
"description": "{{$:/language/Filters/AllTiddlers}}",
"text": ""
},
"$:/core/Filters/Drafts": {
"title": "$:/core/Filters/Drafts",
"tags": "$:/tags/Filter",
"filter": "[has[draft.of]sort[title]]",
"description": "{{$:/language/Filters/Drafts}}",
"text": ""
},
"$:/core/Filters/Missing": {
"title": "$:/core/Filters/Missing",
"tags": "$:/tags/Filter",
"filter": "[all[missing]sort[title]]",
"description": "{{$:/language/Filters/Missing}}",
"text": ""
},
"$:/core/Filters/Orphans": {
"title": "$:/core/Filters/Orphans",
"tags": "$:/tags/Filter",
"filter": "[all[orphans]sort[title]]",
"description": "{{$:/language/Filters/Orphans}}",
"text": ""
},
"$:/core/Filters/OverriddenShadowTiddlers": {
"title": "$:/core/Filters/OverriddenShadowTiddlers",
"tags": "$:/tags/Filter",
"filter": "[is[shadow]]",
"description": "{{$:/language/Filters/OverriddenShadowTiddlers}}",
"text": ""
},
"$:/core/Filters/RecentSystemTiddlers": {
"title": "$:/core/Filters/RecentSystemTiddlers",
"tags": "$:/tags/Filter",
"filter": "[has[modified]!sort[modified]limit[50]]",
"description": "{{$:/language/Filters/RecentSystemTiddlers}}",
"text": ""
},
"$:/core/Filters/RecentTiddlers": {
"title": "$:/core/Filters/RecentTiddlers",
"tags": "$:/tags/Filter",
"filter": "[!is[system]has[modified]!sort[modified]limit[50]]",
"description": "{{$:/language/Filters/RecentTiddlers}}",
"text": ""
},
"$:/core/Filters/ShadowTiddlers": {
"title": "$:/core/Filters/ShadowTiddlers",
"tags": "$:/tags/Filter",
"filter": "[all[shadows]sort[title]]",
"description": "{{$:/language/Filters/ShadowTiddlers}}",
"text": ""
},
"$:/core/Filters/SystemTags": {
"title": "$:/core/Filters/SystemTags",
"tags": "$:/tags/Filter",
"filter": "[all[shadows+tiddlers]tags[]is[system]sort[title]]",
"description": "{{$:/language/Filters/SystemTags}}",
"text": ""
},
"$:/core/Filters/SystemTiddlers": {
"title": "$:/core/Filters/SystemTiddlers",
"tags": "$:/tags/Filter",
"filter": "[is[system]sort[title]]",
"description": "{{$:/language/Filters/SystemTiddlers}}",
"text": ""
},
"$:/core/ui/ImportListing": {
"title": "$:/core/ui/ImportListing",
"text": "\\define lingo-base() $:/language/Import/\r\n\\define messageField()\r\nmessage-$(payloadTiddler)$\r\n\\end\r\n\\define selectionField()\r\nselection-$(payloadTiddler)$\r\n\\end\r\n\\define previewPopupState()\r\n$(currentTiddler)$!!popup-$(payloadTiddler)$\r\n\\end\r\n<table>\r\n<tbody>\r\n<tr>\r\n<th>\r\n<<lingo Listing/Select/Caption>>\r\n</th>\r\n<th>\r\n<<lingo Listing/Title/Caption>>\r\n</th>\r\n<th>\r\n<<lingo Listing/Status/Caption>>\r\n</th>\r\n</tr>\r\n<$list filter=\"[all[current]plugintiddlers[]sort[title]]\" variable=\"payloadTiddler\">\r\n<tr>\r\n<td>\r\n<$checkbox field=<<selectionField>> checked=\"checked\" unchecked=\"unchecked\" default=\"checked\"/>\r\n</td>\r\n<td>\r\n<$reveal type=\"nomatch\" state=<<previewPopupState>> text=\"yes\">\r\n<$button class=\"tc-btn-invisible tc-btn-dropdown\" set=<<previewPopupState>> setTo=\"yes\">\r\n{{$:/core/images/right-arrow}} <$text text=<<payloadTiddler>>/>\r\n</$button>\r\n</$reveal>\r\n<$reveal type=\"match\" state=<<previewPopupState>> text=\"yes\">\r\n<$button class=\"tc-btn-invisible tc-btn-dropdown\" set=<<previewPopupState>> setTo=\"no\">\r\n{{$:/core/images/down-arrow}} <$text text=<<payloadTiddler>>/>\r\n</$button>\r\n</$reveal>\r\n</td>\r\n<td>\r\n<$view field=<<messageField>>/>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td colspan=\"3\">\r\n<$reveal type=\"match\" text=\"yes\" state=<<previewPopupState>>>\r\n<$transclude subtiddler=<<payloadTiddler>> mode=\"block\"/>\r\n</$reveal>\r\n</td>\r\n</tr>\r\n</$list>\r\n</tbody>\r\n</table>\r\n"
},
"$:/core/ui/ListItemTemplate": {
"title": "$:/core/ui/ListItemTemplate",
"text": "<div class=\"tc-menu-list-item\">\r\n<$link to={{!!title}}>\r\n<$view field=\"title\"/>\r\n</$link>\r\n</div>"
},
"$:/core/ui/MissingTemplate": {
"title": "$:/core/ui/MissingTemplate",
"text": "<div class=\"tc-tiddler-missing\">\r\n<$button popup=<<qualify \"$:/state/popup/missing\">> class=\"tc-btn-invisible tc-missing-tiddler-label\">\r\n<$view field=\"title\" format=\"text\" />\r\n</$button>\r\n<$reveal state=<<qualify \"$:/state/popup/missing\">> type=\"popup\" position=\"below\" animate=\"yes\">\r\n<div class=\"tc-drop-down\">\r\n<$transclude tiddler=\"$:/core/ui/ListItemTemplate\"/>\r\n<hr>\r\n<$list filter=\"[all[current]backlinks[]sort[title]]\" template=\"$:/core/ui/ListItemTemplate\"/>\r\n</div>\r\n</$reveal>\r\n</div>\r\n"
},
"$:/core/ui/MoreSideBar/All": {
"title": "$:/core/ui/MoreSideBar/All",
"tags": "$:/tags/MoreSideBar",
"caption": "{{$:/language/SideBar/All/Caption}}",
"text": "<$list filter=\"[!is[system]sort[title]]\" template=\"$:/core/ui/ListItemTemplate\"/>\r\n"
},
"$:/core/ui/MoreSideBar/Drafts": {
"title": "$:/core/ui/MoreSideBar/Drafts",
"tags": "$:/tags/MoreSideBar",
"caption": "{{$:/language/SideBar/Drafts/Caption}}",
"text": "<$list filter=\"[has[draft.of]sort[title]]\" template=\"$:/core/ui/ListItemTemplate\"/>\r\n"
},
"$:/core/ui/MoreSideBar/Missing": {
"title": "$:/core/ui/MoreSideBar/Missing",
"tags": "$:/tags/MoreSideBar",
"caption": "{{$:/language/SideBar/Missing/Caption}}",
"text": "<$list filter=\"[all[missing]sort[title]]\" template=\"$:/core/ui/MissingTemplate\"/>\r\n"
},
"$:/core/ui/MoreSideBar/Orphans": {
"title": "$:/core/ui/MoreSideBar/Orphans",
"tags": "$:/tags/MoreSideBar",
"caption": "{{$:/language/SideBar/Orphans/Caption}}",
"text": "<$list filter=\"[all[orphans]sort[title]]\" template=\"$:/core/ui/ListItemTemplate\"/>\r\n"
},
"$:/core/ui/MoreSideBar/Recent": {
"title": "$:/core/ui/MoreSideBar/Recent",
"tags": "$:/tags/MoreSideBar",
"caption": "{{$:/language/SideBar/Recent/Caption}}",
"text": "<$macrocall $name=\"timeline\" format={{$:/language/RecentChanges/DateFormat}}/>\r\n"
},
"$:/core/ui/MoreSideBar/Shadows": {
"title": "$:/core/ui/MoreSideBar/Shadows",
"tags": "$:/tags/MoreSideBar",
"caption": "{{$:/language/SideBar/Shadows/Caption}}",
"text": "<$list filter=\"[all[shadows]sort[title]]\" template=\"$:/core/ui/ListItemTemplate\"/>\r\n"
},
"$:/core/ui/MoreSideBar/System": {
"title": "$:/core/ui/MoreSideBar/System",
"tags": "$:/tags/MoreSideBar",
"caption": "{{$:/language/SideBar/System/Caption}}",
"text": "<$list filter=\"[is[system]sort[title]]\" template=\"$:/core/ui/ListItemTemplate\"/>\r\n"
},
"$:/core/ui/MoreSideBar/Tags": {
"title": "$:/core/ui/MoreSideBar/Tags",
"tags": "$:/tags/MoreSideBar",
"caption": "{{$:/language/SideBar/Tags/Caption}}",
"text": "<$set name=\"tv-config-toolbar-icons\" value=\"yes\">\n\n<$set name=\"tv-config-toolbar-text\" value=\"yes\">\n\n<$set name=\"tv-config-toolbar-class\" value=\"\">\n\n{{$:/core/ui/Buttons/tag-manager}}\n\n</$set>\n\n</$set>\n\n</$set>\n\n<$list filter=\"[tags[]!is[system]sort[title]]\">\n\n<$transclude tiddler=\"$:/core/ui/TagTemplate\"/> <small class=\"tc-menu-list-count\"><$count filter=\"[all[current]tagging[]]\"/></small>\n\n</$list>\n\n<hr class=\"tc-untagged-separator\">\n\n{{$:/core/ui/UntaggedTemplate}} <small class=\"tc-menu-list-count\"><$count filter=\"[untagged[]!is[system]] -[tags[]]\"/></small>\r\n"
},
"$:/core/ui/MoreSideBar/Types": {
"title": "$:/core/ui/MoreSideBar/Types",
"tags": "$:/tags/MoreSideBar",
"caption": "{{$:/language/SideBar/Types/Caption}}",
"text": "<$list filter=\"[!is[system]has[type]each[type]sort[type]] -[type[text/vnd.tiddlywiki]]\">\r\n<div class=\"tc-menu-list-item\">\r\n<$view field=\"type\"/>\r\n<$list filter=\"[type{!!type}!is[system]sort[title]]\">\r\n<div class=\"tc-menu-list-subitem\">\r\n<$link to={{!!title}}><$view field=\"title\"/></$link>\r\n</div>\r\n</$list>\r\n</div>\r\n</$list>\r\n"
},
"$:/core/ui/Buttons/advanced-search": {
"title": "$:/core/ui/Buttons/advanced-search",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/advanced-search-button}} {{$:/language/Buttons/AdvancedSearch/Caption}}",
"description": "{{$:/language/Buttons/AdvancedSearch/Hint}}",
"text": "<$button to=\"$:/AdvancedSearch\" tooltip={{$:/language/Buttons/AdvancedSearch/Hint}} aria-label={{$:/language/Buttons/AdvancedSearch/Caption}} class=<<tv-config-toolbar-class>>>\r\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\r\n{{$:/core/images/advanced-search-button}}\r\n</$list>\r\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\r\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/AdvancedSearch/Caption}}/></span>\r\n</$list>\r\n</$button>"
},
"$:/core/ui/Buttons/close-all": {
"title": "$:/core/ui/Buttons/close-all",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/close-all-button}} {{$:/language/Buttons/CloseAll/Caption}}",
"description": "{{$:/language/Buttons/CloseAll/Hint}}",
"text": "<$button message=\"tm-close-all-tiddlers\" tooltip={{$:/language/Buttons/CloseAll/Hint}} aria-label={{$:/language/Buttons/CloseAll/Caption}} class=<<tv-config-toolbar-class>>>\r\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\r\n{{$:/core/images/close-all-button}}\r\n</$list>\r\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\r\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/CloseAll/Caption}}/></span>\r\n</$list>\r\n</$button>"
},
"$:/core/ui/Buttons/control-panel": {
"title": "$:/core/ui/Buttons/control-panel",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/options-button}} {{$:/language/Buttons/ControlPanel/Caption}}",
"description": "{{$:/language/Buttons/ControlPanel/Hint}}",
"text": "<$button to=\"$:/ControlPanel\" tooltip={{$:/language/Buttons/ControlPanel/Hint}} aria-label={{$:/language/Buttons/ControlPanel/Caption}} class=<<tv-config-toolbar-class>>>\r\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\r\n{{$:/core/images/options-button}}\r\n</$list>\r\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\r\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/ControlPanel/Caption}}/></span>\r\n</$list>\r\n</$button>"
},
"$:/core/ui/Buttons/encryption": {
"title": "$:/core/ui/Buttons/encryption",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/locked-padlock}} {{$:/language/Buttons/Encryption/Caption}}",
"description": "{{$:/language/Buttons/Encryption/Hint}}",
"text": "<$reveal type=\"match\" state=\"$:/isEncrypted\" text=\"yes\">\r\n<$button message=\"tm-clear-password\" tooltip={{$:/language/Buttons/Encryption/ClearPassword/Hint}} aria-label={{$:/language/Buttons/Encryption/ClearPassword/Caption}} class=<<tv-config-toolbar-class>>>\r\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\r\n{{$:/core/images/locked-padlock}}\r\n</$list>\r\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\r\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/Encryption/ClearPassword/Caption}}/></span>\r\n</$list>\r\n</$button>\r\n</$reveal>\r\n<$reveal type=\"nomatch\" state=\"$:/isEncrypted\" text=\"yes\">\r\n<$button message=\"tm-set-password\" tooltip={{$:/language/Buttons/Encryption/SetPassword/Hint}} aria-label={{$:/language/Buttons/Encryption/SetPassword/Caption}} class=<<tv-config-toolbar-class>>>\r\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\r\n{{$:/core/images/unlocked-padlock}}\r\n</$list>\r\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\r\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/Encryption/SetPassword/Caption}}/></span>\r\n</$list>\r\n</$button>\r\n</$reveal>"
},
"$:/core/ui/Buttons/export-page": {
"title": "$:/core/ui/Buttons/export-page",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/export-button}} {{$:/language/Buttons/ExportPage/Caption}}",
"description": "{{$:/language/Buttons/ExportPage/Hint}}",
"text": "<$macrocall $name=\"exportButton\" exportFilter=\"[!is[system]sort[title]]\" lingoBase=\"$:/language/Buttons/ExportPage/\"/>"
},
"$:/core/ui/Buttons/full-screen": {
"title": "$:/core/ui/Buttons/full-screen",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/full-screen-button}} {{$:/language/Buttons/FullScreen/Caption}}",
"description": "{{$:/language/Buttons/FullScreen/Hint}}",
"text": "<$button message=\"tm-full-screen\" tooltip={{$:/language/Buttons/FullScreen/Hint}} aria-label={{$:/language/Buttons/FullScreen/Caption}} class=<<tv-config-toolbar-class>>>\r\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\r\n{{$:/core/images/full-screen-button}}\r\n</$list>\r\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\r\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/FullScreen/Caption}}/></span>\r\n</$list>\r\n</$button>"
},
"$:/core/ui/Buttons/home": {
"title": "$:/core/ui/Buttons/home",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/home-button}} {{$:/language/Buttons/Home/Caption}}",
"description": "{{$:/language/Buttons/Home/Hint}}",
"text": "<$button message=\"tm-home\" tooltip={{$:/language/Buttons/Home/Hint}} aria-label={{$:/language/Buttons/Home/Caption}} class=<<tv-config-toolbar-class>>>\r\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\r\n{{$:/core/images/home-button}}\r\n</$list>\r\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\r\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/Home/Caption}}/></span>\r\n</$list>\r\n</$button>"
},
"$:/core/ui/Buttons/import": {
"title": "$:/core/ui/Buttons/import",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/import-button}} {{$:/language/Buttons/Import/Caption}}",
"description": "{{$:/language/Buttons/Import/Hint}}",
"text": "<div class=\"tc-file-input-wrapper\">\r\n<$button tooltip={{$:/language/Buttons/Import/Hint}} aria-label={{$:/language/Buttons/Import/Caption}} class=<<tv-config-toolbar-class>>>\r\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\r\n{{$:/core/images/import-button}}\r\n</$list>\r\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\r\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/Import/Caption}}/></span>\r\n</$list>\r\n</$button>\r\n<$browse tooltip={{$:/language/Buttons/Import/Hint}}/>\r\n</div>"
},
"$:/core/ui/Buttons/language": {
"title": "$:/core/ui/Buttons/language",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/globe}} {{$:/language/Buttons/Language/Caption}}",
"description": "{{$:/language/Buttons/Language/Hint}}",
"text": "\\define flag-title()\r\n$(languagePluginTitle)$/icon\r\n\\end\r\n<span class=\"tc-popup-keep\">\r\n<$button popup=<<qualify \"$:/state/popup/language\">> tooltip={{$:/language/Buttons/Language/Hint}} aria-label={{$:/language/Buttons/Language/Caption}} class=<<tv-config-toolbar-class>> selectedClass=\"tc-selected\">\r\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\r\n<span class=\"tc-image-button\">\r\n<$set name=\"languagePluginTitle\" value={{$:/language}}>\r\n<$image source=<<flag-title>>/>\r\n</$set>\r\n</span>\r\n</$list>\r\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\r\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/Language/Caption}}/></span>\r\n</$list>\r\n</$button>\r\n</span>\r\n<$reveal state=<<qualify \"$:/state/popup/language\">> type=\"popup\" position=\"below\" animate=\"yes\">\r\n<div class=\"tc-drop-down tc-drop-down-language-chooser\">\r\n<$linkcatcher to=\"$:/language\">\r\n<$list filter=\"[[$:/languages/en-GB]] [plugin-type[language]sort[description]]\">\r\n<$link>\r\n<span class=\"tc-drop-down-bullet\">\r\n<$reveal type=\"match\" state=\"$:/language\" text=<<currentTiddler>>>\r\n•\r\n</$reveal>\r\n<$reveal type=\"nomatch\" state=\"$:/language\" text=<<currentTiddler>>>\r\n \r\n</$reveal>\r\n</span>\r\n<span class=\"tc-image-button\">\r\n<$set name=\"languagePluginTitle\" value=<<currentTiddler>>>\r\n<$transclude subtiddler=<<flag-title>>>\r\n<$list filter=\"[all[current]field:title[$:/languages/en-GB]]\">\r\n<$transclude tiddler=\"$:/languages/en-GB/icon\"/>\r\n</$list>\r\n</$transclude>\r\n</$set>\r\n</span>\r\n<$view field=\"description\">\r\n<$view field=\"name\">\r\n<$view field=\"title\"/>\r\n</$view>\r\n</$view>\r\n</$link>\r\n</$list>\r\n</$linkcatcher>\r\n</div>\r\n</$reveal>"
},
"$:/core/ui/Buttons/more-page-actions": {
"title": "$:/core/ui/Buttons/more-page-actions",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/down-arrow}} {{$:/language/Buttons/More/Caption}}",
"description": "{{$:/language/Buttons/More/Hint}}",
"text": "\\define config-title()\r\n$:/config/PageControlButtons/Visibility/$(listItem)$\r\n\\end\r\n<$button popup=<<qualify \"$:/state/popup/more\">> tooltip={{$:/language/Buttons/More/Hint}} aria-label={{$:/language/Buttons/More/Caption}} class=<<tv-config-toolbar-class>> selectedClass=\"tc-selected\">\r\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\r\n{{$:/core/images/down-arrow}}\r\n</$list>\r\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\r\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/More/Caption}}/></span>\r\n</$list>\r\n</$button>\r\n<$reveal state=<<qualify \"$:/state/popup/more\">> type=\"popup\" position=\"below\" animate=\"yes\">\n\n<div class=\"tc-drop-down\">\n\n<$set name=\"tv-config-toolbar-icons\" value=\"yes\">\n\n<$set name=\"tv-config-toolbar-text\" value=\"yes\">\n\n<$set name=\"tv-config-toolbar-class\" value=\"tc-btn-invisible\">\n\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/PageControls]!has[draft.of]] -[[$:/core/ui/Buttons/more-page-actions]]\" variable=\"listItem\">\n\n<$reveal type=\"match\" state=<<config-title>> text=\"hide\">\n\n<$transclude tiddler=<<listItem>> mode=\"inline\"/>\n\n</$reveal>\n\n</$list>\n\n</$set>\n\n</$set>\n\n</$set>\n\n</div>\n\n</$reveal>"
},
"$:/core/ui/Buttons/new-journal": {
"title": "$:/core/ui/Buttons/new-journal",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/new-journal-button}} {{$:/language/Buttons/NewJournal/Caption}}",
"description": "{{$:/language/Buttons/NewJournal/Hint}}",
"text": "\\define journalButton()\r\n<$button tooltip={{$:/language/Buttons/NewJournal/Hint}} aria-label={{$:/language/Buttons/NewJournal/Caption}} class=<<tv-config-toolbar-class>>>\r\n<$action-sendmessage $message=\"tm-new-tiddler\" title=<<now \"$(journalTitleTemplate)$\">> tags=\"$(journalTags)$\"/>\r\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\r\n{{$:/core/images/new-journal-button}}\r\n</$list>\r\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\r\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/NewJournal/Caption}}/></span>\r\n</$list>\r\n</$button>\r\n\\end\r\n<$set name=\"journalTitleTemplate\" value={{$:/config/NewJournal/Title}}>\r\n<$set name=\"journalTags\" value={{$:/config/NewJournal/Tags}}>\r\n<<journalButton>>\r\n</$set></$set>"
},
"$:/core/ui/Buttons/new-tiddler": {
"title": "$:/core/ui/Buttons/new-tiddler",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/new-button}} {{$:/language/Buttons/NewTiddler/Caption}}",
"description": "{{$:/language/Buttons/NewTiddler/Hint}}",
"text": "<$button message=\"tm-new-tiddler\" tooltip={{$:/language/Buttons/NewTiddler/Hint}} aria-label={{$:/language/Buttons/NewTiddler/Caption}} class=<<tv-config-toolbar-class>>>\r\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\r\n{{$:/core/images/new-button}}\r\n</$list>\r\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\r\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/NewTiddler/Caption}}/></span>\r\n</$list>\r\n</$button>"
},
"$:/core/ui/Buttons/refresh": {
"title": "$:/core/ui/Buttons/refresh",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/refresh-button}} {{$:/language/Buttons/Refresh/Caption}}",
"description": "{{$:/language/Buttons/Refresh/Hint}}",
"text": "<$button message=\"tm-browser-refresh\" tooltip={{$:/language/Buttons/Refresh/Hint}} aria-label={{$:/language/Buttons/Refresh/Caption}} class=<<tv-config-toolbar-class>>>\r\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\r\n{{$:/core/images/refresh-button}}\r\n</$list>\r\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\r\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/Refresh/Caption}}/></span>\r\n</$list>\r\n</$button>"
},
"$:/core/ui/Buttons/save-wiki": {
"title": "$:/core/ui/Buttons/save-wiki",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/save-button}} {{$:/language/Buttons/SaveWiki/Caption}}",
"description": "{{$:/language/Buttons/SaveWiki/Hint}}",
"text": "<$button message=\"tm-save-wiki\" param={{$:/config/SaveWikiButton/Template}} tooltip={{$:/language/Buttons/SaveWiki/Hint}} aria-label={{$:/language/Buttons/SaveWiki/Caption}} class=<<tv-config-toolbar-class>>>\r\n<span class=\"tc-dirty-indicator\">\r\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\r\n{{$:/core/images/save-button}}\r\n</$list>\r\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\r\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/SaveWiki/Caption}}/></span>\r\n</$list>\r\n</span>\r\n</$button>"
},
"$:/core/ui/Buttons/storyview": {
"title": "$:/core/ui/Buttons/storyview",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/storyview-classic}} {{$:/language/Buttons/StoryView/Caption}}",
"description": "{{$:/language/Buttons/StoryView/Hint}}",
"text": "\\define icon()\r\n$:/core/images/storyview-$(storyview)$\r\n\\end\r\n<span class=\"tc-popup-keep\">\r\n<$button popup=<<qualify \"$:/state/popup/storyview\">> tooltip={{$:/language/Buttons/StoryView/Hint}} aria-label={{$:/language/Buttons/StoryView/Caption}} class=<<tv-config-toolbar-class>> selectedClass=\"tc-selected\">\r\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\r\n<$set name=\"storyview\" value={{$:/view}}>\r\n<$transclude tiddler=<<icon>>/>\r\n</$set>\r\n</$list>\r\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\r\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/StoryView/Caption}}/></span>\r\n</$list>\r\n</$button>\r\n</span>\r\n<$reveal state=<<qualify \"$:/state/popup/storyview\">> type=\"popup\" position=\"below\" animate=\"yes\">\r\n<div class=\"tc-drop-down\">\r\n<$linkcatcher to=\"$:/view\">\r\n<$list filter=\"[storyviews[]]\" variable=\"storyview\">\r\n<$link to=<<storyview>>>\r\n<span class=\"tc-drop-down-bullet\">\r\n<$reveal type=\"match\" state=\"$:/view\" text=<<storyview>>>\r\n•\r\n</$reveal>\r\n<$reveal type=\"nomatch\" state=\"$:/view\" text=<<storyview>>>\r\n \r\n</$reveal>\r\n</span>\r\n<$transclude tiddler=<<icon>>/>\r\n<$text text=<<storyview>>/></$link>\r\n</$list>\r\n</$linkcatcher>\r\n</div>\r\n</$reveal>"
},
"$:/core/ui/Buttons/tag-manager": {
"title": "$:/core/ui/Buttons/tag-manager",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/tag-button}} {{$:/language/Buttons/TagManager/Caption}}",
"description": "{{$:/language/Buttons/TagManager/Hint}}",
"text": "<$button to=\"$:/TagManager\" tooltip={{$:/language/Buttons/TagManager/Hint}} aria-label={{$:/language/Buttons/TagManager/Caption}} class=<<tv-config-toolbar-class>>>\r\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\r\n{{$:/core/images/tag-button}}\r\n</$list>\r\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\r\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/TagManager/Caption}}/></span>\r\n</$list>\r\n</$button>"
},
"$:/core/ui/Buttons/theme": {
"title": "$:/core/ui/Buttons/theme",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/theme-button}} {{$:/language/Buttons/Theme/Caption}}",
"description": "{{$:/language/Buttons/Theme/Hint}}",
"text": "<span class=\"tc-popup-keep\">\r\n<$button popup=<<qualify \"$:/state/popup/theme\">> tooltip={{$:/language/Buttons/Theme/Hint}} aria-label={{$:/language/Buttons/Theme/Caption}} class=<<tv-config-toolbar-class>> selectedClass=\"tc-selected\">\r\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\r\n{{$:/core/images/theme-button}}\r\n</$list>\r\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\r\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/Theme/Caption}}/></span>\r\n</$list>\r\n</$button>\r\n</span>\r\n<$reveal state=<<qualify \"$:/state/popup/theme\">> type=\"popup\" position=\"below\" animate=\"yes\">\r\n<div class=\"tc-drop-down\">\r\n<$linkcatcher to=\"$:/theme\">\r\n<$list filter=\"[plugin-type[theme]sort[title]]\" variable=\"themeTitle\">\r\n<$link to=<<themeTitle>>>\r\n<span class=\"tc-drop-down-bullet\">\r\n<$reveal type=\"match\" state=\"$:/theme\" text=<<themeTitle>>>\r\n•\r\n</$reveal>\r\n<$reveal type=\"nomatch\" state=\"$:/theme\" text=<<themeTitle>>>\r\n \r\n</$reveal>\r\n</span>\r\n<$view tiddler=<<themeTitle>> field=\"name\"/>\r\n</$link>\r\n</$list>\r\n</$linkcatcher>\r\n</div>\r\n</$reveal>"
},
"$:/core/ui/PageTemplate/pagecontrols": {
"title": "$:/core/ui/PageTemplate/pagecontrols",
"text": "\\define config-title()\r\n$:/config/PageControlButtons/Visibility/$(listItem)$\r\n\\end\r\n<div class=\"tc-page-controls\">\r\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/PageControls]!has[draft.of]]\" variable=\"listItem\">\r\n<$reveal type=\"nomatch\" state=<<config-title>> text=\"hide\">\r\n<$transclude tiddler=<<listItem>> mode=\"inline\"/>\r\n</$reveal>\r\n</$list>\r\n</div>\n\n"
},
"$:/core/ui/PageStylesheet": {
"title": "$:/core/ui/PageStylesheet",
"text": "<$importvariables filter=\"[[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]\">\n\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/Stylesheet]!has[draft.of]]\">\r\n<$transclude mode=\"block\"/>\r\n</$list>\n\n</$importvariables>\r\n"
},
"$:/core/ui/PageTemplate/alerts": {
"title": "$:/core/ui/PageTemplate/alerts",
"tags": "$:/tags/PageTemplate",
"text": "<div class=\"tc-alerts\">\n\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/Alert]!has[draft.of]]\" template=\"$:/core/ui/AlertTemplate\" storyview=\"pop\"/>\n\n</div>\r\n"
},
"$:/core/ui/PageTemplate/sidebar": {
"title": "$:/core/ui/PageTemplate/sidebar",
"tags": "$:/tags/PageTemplate",
"text": "<$scrollable fallthrough=\"no\" class=\"tc-sidebar-scrollable\">\n\n<div class=\"tc-sidebar-header\">\n\n<$reveal state=\"$:/state/sidebar\" type=\"match\" text=\"yes\" default=\"yes\" retain=\"yes\">\n\n<h1 class=\"tc-site-title\">\n\n<$transclude tiddler=\"$:/SiteTitle\" mode=\"inline\"/>\n\n</h1>\n\n<div class=\"tc-site-subtitle\">\n\n<$transclude tiddler=\"$:/SiteSubtitle\" mode=\"inline\"/>\n\n</div>\n\n{{||$:/core/ui/PageTemplate/pagecontrols}}\n\n<$transclude tiddler=\"$:/core/ui/SideBarLists\" mode=\"inline\"/>\n\n</$reveal>\n\n</div>\n\n</$scrollable>"
},
"$:/core/ui/PageTemplate/story": {
"title": "$:/core/ui/PageTemplate/story",
"tags": "$:/tags/PageTemplate",
"text": "<section class=\"tc-story-river\">\n\n<section class=\"story-backdrop\">\n\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/AboveStory]!has[draft.of]]\">\n\n<$transclude/>\n\n</$list>\n\n</section>\n\n<$list filter=\"[list[$:/StoryList]]\" history=\"$:/HistoryList\" template=\"$:/core/ui/ViewTemplate\" editTemplate=\"$:/core/ui/EditTemplate\" storyview={{$:/view}} />\n\n<section class=\"story-frontdrop\">\n\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/BelowStory]!has[draft.of]]\">\n\n<$transclude/>\n\n</$list>\n\n</section>\n\n</section>\r\n"
},
"$:/core/ui/PageTemplate/topleftbar": {
"title": "$:/core/ui/PageTemplate/topleftbar",
"tags": "$:/tags/PageTemplate",
"text": "<span class=\"tc-topbar tc-topbar-left\">\n\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/TopLeftBar]!has[draft.of]]\" variable=\"listItem\">\n\n<$transclude tiddler=<<listItem>> mode=\"inline\"/>\n\n</$list>\n\n</span>\r\n"
},
"$:/core/ui/PageTemplate/toprightbar": {
"title": "$:/core/ui/PageTemplate/toprightbar",
"tags": "$:/tags/PageTemplate",
"text": "<span class=\"tc-topbar tc-topbar-right\">\n\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/TopRightBar]!has[draft.of]]\" variable=\"listItem\">\n\n<$transclude tiddler=<<listItem>> mode=\"inline\"/>\n\n</$list>\n\n</span>\r\n"
},
"$:/core/ui/PageTemplate": {
"title": "$:/core/ui/PageTemplate",
"text": "\\define containerClasses()\r\ntc-page-container tc-page-view-$(themeTitle)$ tc-language-$(languageTitle)$\r\n\\end\n\n<$importvariables filter=\"[[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]\">\n\n<$set name=\"tv-config-toolbar-icons\" value={{$:/config/Toolbar/Icons}}>\n\n<$set name=\"tv-config-toolbar-text\" value={{$:/config/Toolbar/Text}}>\n\n<$set name=\"tv-config-toolbar-class\" value=\"tc-btn-invisible\">\n\n<$set name=\"themeTitle\" value={{$:/view}}>\n\n<$set name=\"currentTiddler\" value={{$:/language}}>\n\n<$set name=\"languageTitle\" value={{!!name}}>\n\n<$set name=\"currentTiddler\" value=\"\">\n\n<div class=<<containerClasses>>>\n\n<$navigator story=\"$:/StoryList\" history=\"$:/HistoryList\">\n\n<$dropzone>\n\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/PageTemplate]!has[draft.of]]\" variable=\"listItem\">\n\n<$transclude tiddler=<<listItem>>/>\n\n</$list>\n\n</$dropzone>\n\n</$navigator>\n\n</div>\n\n</$set>\n\n</$set>\n\n</$set>\n\n</$set>\n\n</$set>\n\n</$set>\n\n</$set>\n\n</$importvariables>\r\n"
},
"$:/core/ui/PluginInfo": {
"title": "$:/core/ui/PluginInfo",
"text": "\\define localised-info-tiddler-title()\r\n$(currentTiddler)$/$(languageTitle)$/$(currentTab)$\r\n\\end\r\n\\define info-tiddler-title()\r\n$(currentTiddler)$/$(currentTab)$\r\n\\end\r\n<$transclude tiddler=<<localised-info-tiddler-title>> mode=\"block\">\r\n<$transclude tiddler=<<currentTiddler>> subtiddler=<<localised-info-tiddler-title>> mode=\"block\">\r\n<$transclude tiddler=<<currentTiddler>> subtiddler=<<info-tiddler-title>> mode=\"block\">\r\nNo ''\"<$text text=<<currentTab>>/>\"'' found\r\n</$transclude>\r\n</$transclude>\r\n</$transclude>\r\n"
},
"$:/core/ui/SearchResults": {
"title": "$:/core/ui/SearchResults",
"text": "<div class=\"tc-search-results\">\n\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]butfirst[]limit[1]]\" emptyMessage=\"\"\"\r\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]]\">\r\n<$transclude mode=\"block\"/>\r\n</$list>\r\n\"\"\">\r\n<$macrocall $name=\"tabs\" tabsList=\"[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]]\" default={{$:/config/SearchResults/Default}}/>\r\n</$list>\n\n</div>\r\n"
},
"$:/core/ui/SideBar/More": {
"title": "$:/core/ui/SideBar/More",
"tags": "$:/tags/SideBar",
"caption": "{{$:/language/SideBar/More/Caption}}",
"text": "<div class=\"tc-more-sidebar\">\r\n<<tabs \"[all[shadows+tiddlers]tag[$:/tags/MoreSideBar]!has[draft.of]]\" \"$:/core/ui/MoreSideBar/Tags\" \"$:/state/tab/moresidebar\" \"tc-vertical\">>\r\n</div>\r\n"
},
"$:/core/ui/SideBar/Open": {
"title": "$:/core/ui/SideBar/Open",
"tags": "$:/tags/SideBar",
"caption": "{{$:/language/SideBar/Open/Caption}}",
"text": "\\define lingo-base() $:/language/CloseAll/\r\n<$list filter=\"[list[$:/StoryList]]\" history=\"$:/HistoryList\" storyview=\"pop\">\n\n<$button message=\"tm-close-tiddler\" tooltip={{$:/language/Buttons/Close/Hint}} aria-label={{$:/language/Buttons/Close/Caption}} class=\"tc-btn-invisible tc-btn-mini\">×</$button> <$link to={{!!title}}><$view field=\"title\"/></$link>\n\n</$list>\n\n<$button message=\"tm-close-all-tiddlers\" class=\"tc-btn-invisible tc-btn-mini\"><<lingo Button>></$button>\r\n"
},
"$:/core/ui/SideBar/Recent": {
"title": "$:/core/ui/SideBar/Recent",
"tags": "$:/tags/SideBar",
"caption": "{{$:/language/SideBar/Recent/Caption}}",
"text": "<$macrocall $name=\"timeline\" format={{$:/language/RecentChanges/DateFormat}}/>\r\n"
},
"$:/core/ui/SideBar/Tools": {
"title": "$:/core/ui/SideBar/Tools",
"tags": "$:/tags/SideBar",
"caption": "{{$:/language/SideBar/Tools/Caption}}",
"text": "\\define lingo-base() $:/language/ControlPanel/\r\n\\define config-title()\r\n$:/config/PageControlButtons/Visibility/$(listItem)$\r\n\\end\n\n<<lingo Basics/Version/Prompt>> <<version>>\n\n<$set name=\"tv-config-toolbar-icons\" value=\"yes\">\n\n<$set name=\"tv-config-toolbar-text\" value=\"yes\">\n\n<$set name=\"tv-config-toolbar-class\" value=\"\">\n\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/PageControls]!has[draft.of]]\" variable=\"listItem\">\n\n<div style=\"position:relative;\">\n\n<$checkbox tiddler=<<config-title>> field=\"text\" checked=\"show\" unchecked=\"hide\" default=\"show\"/> <$transclude tiddler=<<listItem>>/> <i class=\"tc-muted\"><$transclude tiddler=<<listItem>> field=\"description\"/></i>\n\n</div>\n\n</$list>\n\n</$set>\n\n</$set>\n\n</$set>\r\n"
},
"$:/core/ui/SideBarLists": {
"title": "$:/core/ui/SideBarLists",
"text": "<div class=\"tc-sidebar-lists\">\n\n<div class=\"tc-search\">\r\n<$edit-text tiddler=\"$:/temp/search\" type=\"search\" tag=\"input\" focus=\"true\"/>\r\n<$reveal state=\"$:/temp/search\" type=\"nomatch\" text=\"\">\r\n<$button tooltip={{$:/language/Buttons/AdvancedSearch/Hint}} aria-label={{$:/language/Buttons/AdvancedSearch/Caption}} class=\"tc-btn-invisible\">\r\n<$action-setfield $tiddler=\"$:/temp/advancedsearch\" text={{$:/temp/search}}/>\r\n<$action-setfield $tiddler=\"$:/temp/search\" text=\"\"/>\r\n<$action-navigate $to=\"$:/AdvancedSearch\"/>\r\n{{$:/core/images/advanced-search-button}}\r\n</$button>\r\n<$button class=\"tc-btn-invisible\">\r\n<$action-setfield $tiddler=\"$:/temp/search\" text=\"\" />\r\n{{$:/core/images/close-button}}\r\n</$button>\r\n</$reveal>\r\n<$reveal state=\"$:/temp/search\" type=\"match\" text=\"\">\r\n<$button to=\"$:/AdvancedSearch\" tooltip={{$:/language/Buttons/AdvancedSearch/Hint}} aria-label={{$:/language/Buttons/AdvancedSearch/Caption}} class=\"tc-btn-invisible\">\r\n{{$:/core/images/advanced-search-button}}\r\n</$button>\r\n</$reveal>\r\n</div>\n\n<$reveal state=\"$:/temp/search\" type=\"nomatch\" text=\"\">\n\n<$set name=\"searchTiddler\" value=\"$:/temp/search\">\r\n{{$:/core/ui/SearchResults}}\r\n</$set>\n\n</$reveal>\n\n<$reveal state=\"$:/temp/search\" type=\"match\" text=\"\">\n\n<<tabs \"[all[shadows+tiddlers]tag[$:/tags/SideBar]!has[draft.of]]\" \"$:/core/ui/SideBar/Open\" \"$:/state/tab/sidebar\">>\n\n</$reveal>\n\n</div>\r\n"
},
"$:/TagManager": {
"title": "$:/TagManager",
"icon": "$:/core/images/tag-button",
"text": "\\define lingo-base() $:/language/TagManager/\r\n\\define iconEditorTab(type)\r\n<$list filter=\"[all[shadows+tiddlers]is[image]] [all[shadows+tiddlers]tag[$:/tags/Image]] -[type[application/pdf]] +[sort[title]] +[$type$is[system]]\">\r\n<$link to={{!!title}}>\r\n<$transclude/> <$view field=\"title\"/>\r\n</$link>\r\n</$list>\r\n\\end\r\n\\define iconEditor(title)\r\n<div class=\"tc-drop-down-wrapper\">\r\n<$button popup=<<qualify \"$:/state/popup/icon/$title$\">> class=\"tc-btn-invisible tc-btn-dropdown\">{{$:/core/images/down-arrow}}</$button>\r\n<$reveal state=<<qualify \"$:/state/popup/icon/$title$\">> type=\"popup\" position=\"belowleft\" text=\"\" default=\"\">\r\n<div class=\"tc-drop-down\">\r\n<$linkcatcher to=\"$title$!!icon\">\r\n<<iconEditorTab type:\"!\">>\r\n<hr/>\r\n<<iconEditorTab type:\"\">>\r\n</$linkcatcher>\r\n</div>\r\n</$reveal>\r\n</div>\r\n\\end\r\n\\define qualifyTitle(title)\r\n$title$$(currentTiddler)$\r\n\\end\r\n\\define toggleButton(state)\r\n<$reveal state=\"$state$\" type=\"match\" text=\"closed\" default=\"closed\">\r\n<$button set=\"$state$\" setTo=\"open\" class=\"tc-btn-invisible tc-btn-dropdown\" selectedClass=\"tc-selected\">\r\n{{$:/core/images/info-button}}\r\n</$button>\r\n</$reveal>\r\n<$reveal state=\"$state$\" type=\"match\" text=\"open\" default=\"closed\">\r\n<$button set=\"$state$\" setTo=\"closed\" class=\"tc-btn-invisible tc-btn-dropdown\" selectedClass=\"tc-selected\">\r\n{{$:/core/images/info-button}}\r\n</$button>\r\n</$reveal>\r\n\\end\r\n<table class=\"tc-tag-manager-table\">\r\n<tbody>\r\n<tr>\r\n<th><<lingo Colour/Heading>></th>\r\n<th class=\"tc-tag-manager-tag\"><<lingo Tag/Heading>></th>\r\n<th><<lingo Icon/Heading>></th>\r\n<th><<lingo Info/Heading>></th>\r\n</tr>\r\n<$list filter=\"[tags[]!is[system]sort[title]]\">\r\n<tr>\r\n<td><$edit-text field=\"color\" tag=\"input\" type=\"color\"/></td>\r\n<td><$transclude tiddler=\"$:/core/ui/TagTemplate\"/></td>\r\n<td>\r\n<$macrocall $name=\"iconEditor\" title={{!!title}}/>\r\n</td>\r\n<td>\r\n<$macrocall $name=\"toggleButton\" state=<<qualifyTitle \"$:/state/tag-manager/\">> /> \r\n</td>\r\n</tr>\r\n<tr>\r\n<td></td>\r\n<td>\r\n<$reveal state=<<qualifyTitle \"$:/state/tag-manager/\">> type=\"match\" text=\"open\" default=\"\">\r\n<table>\r\n<tbody>\r\n<tr><td><<lingo Colour/Heading>></td><td><$edit-text field=\"color\" tag=\"input\" type=\"text\" size=\"9\"/></td></tr>\r\n<tr><td><<lingo Icon/Heading>></td><td><$edit-text field=\"icon\" tag=\"input\" size=\"45\"/></td></tr>\r\n</tbody>\r\n</table>\r\n</$reveal>\r\n</td>\r\n<td></td>\r\n<td></td>\r\n</tr>\r\n</$list>\r\n</tbody>\r\n</table>\r\n"
},
"$:/core/ui/TagTemplate": {
"title": "$:/core/ui/TagTemplate",
"text": "\\define tag-styles()\r\nbackground-color:$(backgroundColor)$;\r\nfill:$(foregroundColor)$;\r\ncolor:$(foregroundColor)$;\r\n\\end\n\n\\define tag-body-inner(colour,fallbackTarget,colourA,colourB)\r\n<$set name=\"foregroundColor\" value=<<contrastcolour target:\"\"\"$colour$\"\"\" fallbackTarget:\"\"\"$fallbackTarget$\"\"\" colourA:\"\"\"$colourA$\"\"\" colourB:\"\"\"$colourB$\"\"\">>>\r\n<$set name=\"backgroundColor\" value=\"\"\"$colour$\"\"\">\r\n<$button popup=<<qualify \"$:/state/popup/tag\">> class=\"tc-btn-invisible tc-tag-label\" style=<<tag-styles>>>\r\n<$transclude tiddler={{!!icon}}/> <$view field=\"title\" format=\"text\" />\r\n</$button>\r\n<$reveal state=<<qualify \"$:/state/popup/tag\">> type=\"popup\" position=\"below\" animate=\"yes\"><div class=\"tc-drop-down\"><$transclude tiddler=\"$:/core/ui/ListItemTemplate\"/>\r\n<hr>\r\n<$list filter=\"[all[current]tagging[]]\" template=\"$:/core/ui/ListItemTemplate\"/>\r\n</div>\r\n</$reveal>\r\n</$set>\r\n</$set>\r\n\\end\n\n\\define tag-body(colour,palette)\r\n<span class=\"tc-tag-list-item\">\r\n<$macrocall $name=\"tag-body-inner\" colour=\"\"\"$colour$\"\"\" fallbackTarget={{$palette$##tag-background}} colourA={{$palette$##foreground}} colourB={{$palette$##background}}/>\r\n</span>\r\n\\end\n\n<$macrocall $name=\"tag-body\" colour={{!!color}} palette={{$:/palette}}/>\r\n"
},
"$:/core/ui/TiddlerFields": {
"title": "$:/core/ui/TiddlerFields",
"text": "<table class=\"tc-view-field-table\">\r\n<tbody>\r\n<$list filter=\"[all[current]fields[]sort[title]] -text\" template=\"$:/core/ui/TiddlerFieldTemplate\" variable=\"listItem\"/>\r\n</tbody>\r\n</table>\r\n"
},
"$:/core/ui/TiddlerFieldTemplate": {
"title": "$:/core/ui/TiddlerFieldTemplate",
"text": "<tr class=\"tc-view-field\">\r\n<td class=\"tc-view-field-name\">\r\n<$text text=<<listItem>>/>\r\n</td>\r\n<td class=\"tc-view-field-value\">\r\n<$view field=<<listItem>>/>\r\n</td>\r\n</tr>"
},
"$:/core/ui/TiddlerInfo/Advanced/PluginInfo": {
"title": "$:/core/ui/TiddlerInfo/Advanced/PluginInfo",
"tags": "$:/tags/TiddlerInfo/Advanced",
"text": "\\define lingo-base() $:/language/TiddlerInfo/Advanced/PluginInfo/\r\n<$list filter=\"[all[current]has[plugin-type]]\">\n\n! <<lingo Heading>>\n\n<<lingo Hint>>\r\n<ul>\r\n<$list filter=\"[all[current]plugintiddlers[]sort[title]]\" emptyMessage=<<lingo Empty/Hint>>>\r\n<li>\r\n<$link to={{!!title}}>\r\n<$view field=\"title\"/>\r\n</$link>\r\n</li>\r\n</$list>\r\n</ul>\n\n</$list>\r\n"
},
"$:/core/ui/TiddlerInfo/Advanced/ShadowInfo": {
"title": "$:/core/ui/TiddlerInfo/Advanced/ShadowInfo",
"tags": "$:/tags/TiddlerInfo/Advanced",
"text": "\\define lingo-base() $:/language/TiddlerInfo/Advanced/ShadowInfo/\r\n<$set name=\"infoTiddler\" value=<<currentTiddler>>>\n\n''<<lingo Heading>>''\n\n<$list filter=\"[all[current]!is[shadow]]\">\n\n<<lingo NotShadow/Hint>>\n\n</$list>\n\n<$list filter=\"[all[current]is[shadow]]\">\n\n<<lingo Shadow/Hint>>\n\n<$list filter=\"[all[current]shadowsource[]]\">\n\n<$set name=\"pluginTiddler\" value=<<currentTiddler>>>\r\n<<lingo Shadow/Source>>\r\n</$set>\n\n</$list>\n\n<$list filter=\"[all[current]is[shadow]is[tiddler]]\">\n\n<<lingo OverriddenShadow/Hint>>\n\n</$list>\n\n\r\n</$list>\r\n</$set>\r\n"
},
"$:/core/ui/TiddlerInfo/Advanced": {
"title": "$:/core/ui/TiddlerInfo/Advanced",
"tags": "$:/tags/TiddlerInfo",
"caption": "{{$:/language/TiddlerInfo/Advanced/Caption}}",
"text": "<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/TiddlerInfo/Advanced]!has[draft.of]]\" variable=\"listItem\">\r\n<$transclude tiddler=<<listItem>>/>\n\n</$list>\r\n"
},
"$:/core/ui/TiddlerInfo/Fields": {
"title": "$:/core/ui/TiddlerInfo/Fields",
"tags": "$:/tags/TiddlerInfo",
"caption": "{{$:/language/TiddlerInfo/Fields/Caption}}",
"text": "<$transclude tiddler=\"$:/core/ui/TiddlerFields\"/>\r\n"
},
"$:/core/ui/TiddlerInfo/List": {
"title": "$:/core/ui/TiddlerInfo/List",
"tags": "$:/tags/TiddlerInfo",
"caption": "{{$:/language/TiddlerInfo/List/Caption}}",
"text": "\\define lingo-base() $:/language/TiddlerInfo/\r\n<$list filter=\"[list{!!title}]\" emptyMessage=<<lingo List/Empty>> template=\"$:/core/ui/ListItemTemplate\"/>\r\n"
},
"$:/core/ui/TiddlerInfo/Listed": {
"title": "$:/core/ui/TiddlerInfo/Listed",
"tags": "$:/tags/TiddlerInfo",
"caption": "{{$:/language/TiddlerInfo/Listed/Caption}}",
"text": "\\define lingo-base() $:/language/TiddlerInfo/\r\n<$list filter=\"[all[current]listed[]!is[system]]\" emptyMessage=<<lingo Listed/Empty>> template=\"$:/core/ui/ListItemTemplate\"/>\r\n"
},
"$:/core/ui/TiddlerInfo/References": {
"title": "$:/core/ui/TiddlerInfo/References",
"tags": "$:/tags/TiddlerInfo",
"caption": "{{$:/language/TiddlerInfo/References/Caption}}",
"text": "\\define lingo-base() $:/language/TiddlerInfo/\r\n<$list filter=\"[all[current]backlinks[]sort[title]]\" emptyMessage=<<lingo References/Empty>> template=\"$:/core/ui/ListItemTemplate\">\r\n</$list>\r\n"
},
"$:/core/ui/TiddlerInfo/Tagging": {
"title": "$:/core/ui/TiddlerInfo/Tagging",
"tags": "$:/tags/TiddlerInfo",
"caption": "{{$:/language/TiddlerInfo/Tagging/Caption}}",
"text": "\\define lingo-base() $:/language/TiddlerInfo/\r\n<$list filter=\"[all[current]tagging[]]\" emptyMessage=<<lingo Tagging/Empty>> template=\"$:/core/ui/ListItemTemplate\"/>\r\n"
},
"$:/core/ui/TiddlerInfo/Tools": {
"title": "$:/core/ui/TiddlerInfo/Tools",
"tags": "$:/tags/TiddlerInfo",
"caption": "{{$:/language/TiddlerInfo/Tools/Caption}}",
"text": "\\define lingo-base() $:/language/TiddlerInfo/\r\n\\define config-title()\r\n$:/config/ViewToolbarButtons/Visibility/$(listItem)$\r\n\\end\r\n<$set name=\"tv-config-toolbar-icons\" value=\"yes\">\n\n<$set name=\"tv-config-toolbar-text\" value=\"yes\">\n\n<$set name=\"tv-config-toolbar-class\" value=\"\">\n\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/ViewToolbar]!has[draft.of]]\" variable=\"listItem\">\n\n<$checkbox tiddler=<<config-title>> field=\"text\" checked=\"show\" unchecked=\"hide\" default=\"show\"/> <$transclude tiddler=<<listItem>>/> <i class=\"tc-muted\"><$transclude tiddler=<<listItem>> field=\"description\"/></i>\n\n</$list>\n\n</$set>\n\n</$set>\n\n</$set>\r\n"
},
"$:/core/ui/TiddlerInfo": {
"title": "$:/core/ui/TiddlerInfo",
"text": "<$macrocall $name=\"tabs\" tabsList=\"[all[shadows+tiddlers]tag[$:/tags/TiddlerInfo]!has[draft.of]]\" default={{$:/config/TiddlerInfo/Default}}/>"
},
"$:/core/ui/TopBar/menu": {
"title": "$:/core/ui/TopBar/menu",
"tags": "$:/tags/TopRightBar",
"text": "<$reveal state=\"$:/state/sidebar\" type=\"nomatch\" text=\"no\">\r\n<$button set=\"$:/state/sidebar\" setTo=\"no\" tooltip={{$:/language/Buttons/HideSideBar/Hint}} aria-label={{$:/language/Buttons/HideSideBar/Caption}} class=\"tc-btn-invisible\">{{$:/core/images/chevron-right}}</$button>\r\n</$reveal>\r\n<$reveal state=\"$:/state/sidebar\" type=\"match\" text=\"no\">\r\n<$button set=\"$:/state/sidebar\" setTo=\"yes\" tooltip={{$:/language/Buttons/ShowSideBar/Hint}} aria-label={{$:/language/Buttons/ShowSideBar/Caption}} class=\"tc-btn-invisible\">{{$:/core/images/chevron-left}}</$button>\r\n</$reveal>\r\n"
},
"$:/core/ui/UntaggedTemplate": {
"title": "$:/core/ui/UntaggedTemplate",
"text": "\\define lingo-base() $:/language/SideBar/\r\n<$button popup=<<qualify \"$:/state/popup/tag\">> class=\"tc-btn-invisible tc-untagged-label tc-tag-label\">\r\n<<lingo Tags/Untagged/Caption>>\r\n</$button>\r\n<$reveal state=<<qualify \"$:/state/popup/tag\">> type=\"popup\" position=\"below\">\r\n<div class=\"tc-drop-down\">\r\n<$list filter=\"[untagged[]!is[system]] -[tags[]] +[sort[title]]\" template=\"$:/core/ui/ListItemTemplate\"/>\r\n</div>\r\n</$reveal>\r\n"
},
"$:/core/ui/ViewTemplate/body": {
"title": "$:/core/ui/ViewTemplate/body",
"tags": "$:/tags/ViewTemplate",
"text": "<div class=\"tc-tiddler-body\">\n\n<$list filter=\"[all[current]!has[plugin-type]!field:hide-body[yes]]\">\n\n<$transclude>\n\n<$transclude tiddler=\"$:/language/MissingTiddler/Hint\"/>\n\n</$transclude>\n\n</$list>\n\n</div>\r\n"
},
"$:/core/ui/ViewTemplate/classic": {
"title": "$:/core/ui/ViewTemplate/classic",
"tags": "$:/tags/ViewTemplate $:/tags/EditTemplate",
"text": "\\define lingo-base() $:/language/ClassicWarning/\r\n<$list filter=\"[all[current]type[text/x-tiddlywiki]]\">\r\n<div class=\"tc-message-box\">\n\n<<lingo Hint>>\n\n<$button set=\"!!type\" setTo=\"text/vnd.tiddlywiki\"><<lingo Upgrade/Caption>></$button>\n\n</div>\r\n</$list>\r\n"
},
"$:/core/ui/ViewTemplate/import": {
"title": "$:/core/ui/ViewTemplate/import",
"tags": "$:/tags/ViewTemplate",
"text": "\\define lingo-base() $:/language/Import/\n\n<$list filter=\"[all[current]field:plugin-type[import]]\">\n\n<div class=\"tc-import\">\n\n<<lingo Listing/Hint>>\n\n{{||$:/core/ui/ImportListing}}\n\n<$button message=\"tm-delete-tiddler\" param=<<currentTiddler>>><<lingo Listing/Cancel/Caption>></$button>\r\n<$button message=\"tm-perform-import\" param=<<currentTiddler>>><<lingo Listing/Import/Caption>></$button>\n\n</div>\n\n</$list>\r\n"
},
"$:/core/ui/ViewTemplate/plugin": {
"title": "$:/core/ui/ViewTemplate/plugin",
"tags": "$:/tags/ViewTemplate",
"text": "<$list filter=\"[all[current]has[plugin-type]] -[all[current]field:plugin-type[import]]\">\n\n{{||$:/core/ui/TiddlerInfo/Advanced/PluginInfo}}\n\n</$list>\r\n"
},
"$:/core/ui/ViewTemplate/subtitle": {
"title": "$:/core/ui/ViewTemplate/subtitle",
"tags": "$:/tags/ViewTemplate",
"text": "<div class=\"tc-subtitle\">\r\n<$link to={{!!modifier}}>\r\n<$view field=\"modifier\"/>\r\n</$link> <$view field=\"modified\" format=\"relativedate\"/>\r\n</div>\r\n"
},
"$:/core/ui/ViewTemplate/tags": {
"title": "$:/core/ui/ViewTemplate/tags",
"tags": "$:/tags/ViewTemplate",
"text": "<div class=\"tc-tags-wrapper\"><$list filter=\"[all[current]tags[]sort[title]]\" template=\"$:/core/ui/TagTemplate\" storyview=\"pop\"/></div>\r\n"
},
"$:/core/ui/ViewTemplate/title": {
"title": "$:/core/ui/ViewTemplate/title",
"tags": "$:/tags/ViewTemplate",
"text": "\\define title-styles()\r\nfill:$(foregroundColor)$;\r\n\\end\r\n\\define config-title()\r\n$:/config/ViewToolbarButtons/Visibility/$(listItem)$\r\n\\end\r\n<div class=\"tc-tiddler-title\">\r\n<div class=\"tc-titlebar\">\r\n<span class=\"tc-tiddler-controls\">\r\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/ViewToolbar]!has[draft.of]]\" variable=\"listItem\"><$reveal type=\"nomatch\" state=<<config-title>> text=\"hide\"><$transclude tiddler=<<listItem>>/></$reveal></$list>\r\n</span>\r\n<$set name=\"foregroundColor\" value={{!!color}}>\r\n<span class=\"tc-tiddler-title-icon\" style=<<title-styles>>>\r\n<$transclude tiddler={{!!icon}}/>\r\n</span>\r\n</$set>\r\n<$list filter=\"[all[current]removeprefix[$:/]]\">\r\n<h2 class=\"tc-title\" title={{$:/language/SystemTiddler/Tooltip}}>\r\n<span class=\"tc-system-title-prefix\">$:/</span><$text text=<<currentTiddler>>/>\r\n</h2>\r\n</$list>\r\n<$list filter=\"[all[current]!prefix[$:/]]\">\r\n<h2 class=\"tc-title\">\r\n<$view field=\"title\"/>\r\n</h2>\r\n</$list>\r\n</div>\n\n<$reveal type=\"nomatch\" text=\"\" default=\"\" state=<<tiddlerInfoState>> class=\"tc-tiddler-info tc-popup-handle\" animate=\"yes\" retain=\"yes\">\n\n<$transclude tiddler=\"$:/core/ui/TiddlerInfo\"/>\n\n</$reveal>\r\n</div>"
},
"$:/core/ui/ViewTemplate": {
"title": "$:/core/ui/ViewTemplate",
"text": "\\define frame-classes()\r\ntc-tiddler-frame tc-tiddler-view-frame $(missingTiddlerClass)$ $(shadowTiddlerClass)$ $(systemTiddlerClass)$ $(tiddlerTagClasses)$\r\n\\end\r\n<$set name=\"storyTiddler\" value=<<currentTiddler>>><$set name=\"tiddlerInfoState\" value=<<qualify \"$:/state/popup/tiddler-info\">>><$tiddler tiddler=<<currentTiddler>>><div class=<<frame-classes>>><$list filter=\"[all[shadows+tiddlers]tag[$:/tags/ViewTemplate]!has[draft.of]]\" variable=\"listItem\"><$transclude tiddler=<<listItem>>/></$list>\r\n</div>\r\n</$tiddler></$set></$set>\r\n"
},
"$:/core/ui/Buttons/clone": {
"title": "$:/core/ui/Buttons/clone",
"tags": "$:/tags/ViewToolbar",
"caption": "{{$:/core/images/clone-button}} {{$:/language/Buttons/Clone/Caption}}",
"description": "{{$:/language/Buttons/Clone/Hint}}",
"text": "<$button message=\"tm-new-tiddler\" param=<<currentTiddler>> tooltip={{$:/language/Buttons/Clone/Hint}} aria-label={{$:/language/Buttons/Clone/Caption}} class=<<tv-config-toolbar-class>>>\r\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\r\n{{$:/core/images/clone-button}}\r\n</$list>\r\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\r\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/Clone/Caption}}/></span>\r\n</$list>\r\n</$button>"
},
"$:/core/ui/Buttons/close-others": {
"title": "$:/core/ui/Buttons/close-others",
"tags": "$:/tags/ViewToolbar",
"caption": "{{$:/core/images/close-others-button}} {{$:/language/Buttons/CloseOthers/Caption}}",
"description": "{{$:/language/Buttons/CloseOthers/Hint}}",
"text": "<$button message=\"tm-close-other-tiddlers\" param=<<currentTiddler>> tooltip={{$:/language/Buttons/CloseOthers/Hint}} aria-label={{$:/language/Buttons/CloseOthers/Caption}} class=<<tv-config-toolbar-class>>>\r\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\r\n{{$:/core/images/close-others-button}}\r\n</$list>\r\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\r\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/CloseOthers/Caption}}/></span>\r\n</$list>\r\n</$button>"
},
"$:/core/ui/Buttons/close": {
"title": "$:/core/ui/Buttons/close",
"tags": "$:/tags/ViewToolbar",
"caption": "{{$:/core/images/close-button}} {{$:/language/Buttons/Close/Caption}}",
"description": "{{$:/language/Buttons/Close/Hint}}",
"text": "<$button message=\"tm-close-tiddler\" tooltip={{$:/language/Buttons/Close/Hint}} aria-label={{$:/language/Buttons/Close/Caption}} class=<<tv-config-toolbar-class>>>\r\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\r\n{{$:/core/images/close-button}}\r\n</$list>\r\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\r\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/Close/Caption}}/></span>\r\n</$list>\r\n</$button>"
},
"$:/core/ui/Buttons/edit": {
"title": "$:/core/ui/Buttons/edit",
"tags": "$:/tags/ViewToolbar",
"caption": "{{$:/core/images/edit-button}} {{$:/language/Buttons/Edit/Caption}}",
"description": "{{$:/language/Buttons/Edit/Hint}}",
"text": "<$button message=\"tm-edit-tiddler\" tooltip={{$:/language/Buttons/Edit/Hint}} aria-label={{$:/language/Buttons/Edit/Caption}} class=<<tv-config-toolbar-class>>>\r\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\r\n{{$:/core/images/edit-button}}\r\n</$list>\r\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\r\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/Edit/Caption}}/></span>\r\n</$list>\r\n</$button>"
},
"$:/core/ui/Buttons/export-tiddler": {
"title": "$:/core/ui/Buttons/export-tiddler",
"tags": "$:/tags/ViewToolbar",
"caption": "{{$:/core/images/export-button}} {{$:/language/Buttons/ExportTiddler/Caption}}",
"description": "{{$:/language/Buttons/ExportTiddler/Hint}}",
"text": "\\define makeExportFilter()\r\n[[$(currentTiddler)$]]\r\n\\end\r\n<$macrocall $name=\"exportButton\" exportFilter=<<makeExportFilter>> lingoBase=\"$:/language/Buttons/ExportTiddler/\" baseFilename=<<currentTiddler>>/>"
},
"$:/core/ui/Buttons/info": {
"title": "$:/core/ui/Buttons/info",
"tags": "$:/tags/ViewToolbar",
"caption": "{{$:/core/images/info-button}} {{$:/language/Buttons/Info/Caption}}",
"description": "{{$:/language/Buttons/Info/Hint}}",
"text": "<$button popup=<<tiddlerInfoState>> tooltip={{$:/language/Buttons/Info/Hint}} aria-label={{$:/language/Buttons/Info/Caption}} class=<<tv-config-toolbar-class>> selectedClass=\"tc-selected\">\r\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\r\n{{$:/core/images/info-button}}\r\n</$list>\r\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\r\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/Info/Caption}}/></span>\r\n</$list>\r\n</$button>"
},
"$:/core/ui/Buttons/more-tiddler-actions": {
"title": "$:/core/ui/Buttons/more-tiddler-actions",
"tags": "$:/tags/ViewToolbar",
"caption": "{{$:/core/images/down-arrow}} {{$:/language/Buttons/More/Caption}}",
"description": "{{$:/language/Buttons/More/Hint}}",
"text": "\\define config-title()\r\n$:/config/ViewToolbarButtons/Visibility/$(listItem)$\r\n\\end\r\n<$button popup=<<qualify \"$:/state/popup/more\">> tooltip={{$:/language/Buttons/More/Hint}} aria-label={{$:/language/Buttons/More/Caption}} class=<<tv-config-toolbar-class>> selectedClass=\"tc-selected\">\r\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\r\n{{$:/core/images/down-arrow}}\r\n</$list>\r\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\r\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/More/Caption}}/></span>\r\n</$list>\r\n</$button><$reveal state=<<qualify \"$:/state/popup/more\">> type=\"popup\" position=\"below\" animate=\"yes\">\r\n<div class=\"tc-drop-down\">\r\n<$set name=\"tv-config-toolbar-icons\" value=\"yes\">\r\n<$set name=\"tv-config-toolbar-text\" value=\"yes\">\r\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/ViewToolbar]!has[draft.of]] -[[$:/core/ui/Buttons/more-tiddler-actions]]\" variable=\"listItem\">\r\n<$reveal type=\"match\" state=<<config-title>> text=\"hide\">\r\n<$transclude tiddler=<<listItem>>/>\r\n</$reveal>\r\n</$list>\r\n</$set>\r\n</$set>\r\n</div>\r\n</$reveal>"
},
"$:/core/ui/Buttons/new-here": {
"title": "$:/core/ui/Buttons/new-here",
"tags": "$:/tags/ViewToolbar",
"caption": "{{$:/core/images/new-here-button}} {{$:/language/Buttons/NewHere/Caption}}",
"description": "{{$:/language/Buttons/NewHere/Hint}}",
"text": "\\define newHereButtonTags()\r\n[[$(currentTiddler)$]]\r\n\\end\r\n\\define newHereButton()\r\n<$button tooltip={{$:/language/Buttons/NewHere/Hint}} aria-label={{$:/language/Buttons/NewHere/Caption}} class=<<tv-config-toolbar-class>>>\r\n<$action-sendmessage $message=\"tm-new-tiddler\" tags=<<newHereButtonTags>>/>\r\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\r\n{{$:/core/images/new-here-button}}\r\n</$list>\r\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\r\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/NewHere/Caption}}/></span>\r\n</$list>\r\n</$button>\r\n\\end\r\n<<newHereButton>>"
},
"$:/core/ui/Buttons/new-journal-here": {
"title": "$:/core/ui/Buttons/new-journal-here",
"tags": "$:/tags/ViewToolbar",
"caption": "{{$:/core/images/new-journal-button}} {{$:/language/Buttons/NewJournalHere/Caption}}",
"description": "{{$:/language/Buttons/NewJournalHere/Hint}}",
"text": "\\define journalButtonTags()\r\n[[$(currentTiddlerTag)$]] $(journalTags)$\r\n\\end\r\n\\define journalButton()\r\n<$button tooltip={{$:/language/Buttons/NewJournalHere/Hint}} aria-label={{$:/language/Buttons/NewJournalHere/Caption}} class=<<tv-config-toolbar-class>>>\r\n<$action-sendmessage $message=\"tm-new-tiddler\" title=<<now \"$(journalTitleTemplate)$\">> tags=<<journalButtonTags>>/>\r\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\r\n{{$:/core/images/new-journal-button}}\r\n</$list>\r\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\r\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/NewJournalHere/Caption}}/></span>\r\n</$list>\r\n</$button>\r\n\\end\r\n<$set name=\"journalTitleTemplate\" value={{$:/config/NewJournal/Title}}>\r\n<$set name=\"journalTags\" value={{$:/config/NewJournal/Tags}}>\r\n<$set name=\"currentTiddlerTag\" value=<<currentTiddler>>>\r\n<<journalButton>>\r\n</$set></$set></$set>"
},
"$:/core/ui/Buttons/permalink": {
"title": "$:/core/ui/Buttons/permalink",
"tags": "$:/tags/ViewToolbar",
"caption": "{{$:/core/images/permalink-button}} {{$:/language/Buttons/Permalink/Caption}}",
"description": "{{$:/language/Buttons/Permalink/Hint}}",
"text": "<$button message=\"tm-permalink\" tooltip={{$:/language/Buttons/Permalink/Hint}} aria-label={{$:/language/Buttons/Permalink/Caption}} class=<<tv-config-toolbar-class>>>\r\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\r\n{{$:/core/images/permalink-button}}\r\n</$list>\r\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\r\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/Permalink/Caption}}/></span>\r\n</$list>\r\n</$button>"
},
"$:/core/ui/Buttons/permaview": {
"title": "$:/core/ui/Buttons/permaview",
"tags": "$:/tags/ViewToolbar $:/tags/PageControls",
"caption": "{{$:/core/images/permaview-button}} {{$:/language/Buttons/Permaview/Caption}}",
"description": "{{$:/language/Buttons/Permaview/Hint}}",
"text": "<$button message=\"tm-permaview\" tooltip={{$:/language/Buttons/Permaview/Hint}} aria-label={{$:/language/Buttons/Permaview/Caption}} class=<<tv-config-toolbar-class>>>\r\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\r\n{{$:/core/images/permaview-button}}\r\n</$list>\r\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\r\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/Permaview/Caption}}/></span>\r\n</$list>\r\n</$button>"
},
"$:/temp/advancedsearch": {
"title": "$:/temp/advancedsearch",
"text": ""
},
"$:/snippets/allfields": {
"title": "$:/snippets/allfields",
"text": "\\define renderfield(title)\r\n<tr class=\"tc-view-field\"><td class=\"tc-view-field-name\">''$title$'':</td><td class=\"tc-view-field-value\">//{{$:/language/Docs/Fields/$title$}}//</td></tr>\r\n\\end\r\n<table class=\"tc-view-field-table\"><tbody><$list filter=\"[fields[]sort[title]]\" variable=\"listItem\"><$macrocall $name=\"renderfield\" title=<<listItem>>/></$list>\r\n</tbody></table>\r\n"
},
"$:/config/AnimationDuration": {
"title": "$:/config/AnimationDuration",
"text": "400"
},
"$:/config/AutoSave": {
"title": "$:/config/AutoSave",
"text": "yes"
},
"$:/config/BitmapEditor/Colour": {
"title": "$:/config/BitmapEditor/Colour",
"text": "#ff0"
},
"$:/config/BitmapEditor/LineWidth": {
"title": "$:/config/BitmapEditor/LineWidth",
"text": "3"
},
"$:/config/EditorTypeMappings/image/gif": {
"title": "$:/config/EditorTypeMappings/image/gif",
"text": "bitmap"
},
"$:/config/EditorTypeMappings/image/jpeg": {
"title": "$:/config/EditorTypeMappings/image/jpeg",
"text": "bitmap"
},
"$:/config/EditorTypeMappings/image/jpg": {
"title": "$:/config/EditorTypeMappings/image/jpg",
"text": "bitmap"
},
"$:/config/EditorTypeMappings/image/png": {
"title": "$:/config/EditorTypeMappings/image/png",
"text": "bitmap"
},
"$:/config/EditorTypeMappings/image/x-icon": {
"title": "$:/config/EditorTypeMappings/image/x-icon",
"text": "bitmap"
},
"$:/config/EditorTypeMappings/text/vnd.tiddlywiki": {
"title": "$:/config/EditorTypeMappings/text/vnd.tiddlywiki",
"text": "text"
},
"$:/config/EditTemplateFields/Visibility/title": {
"title": "$:/config/EditTemplateFields/Visibility/title",
"text": "hide"
},
"$:/config/EditTemplateFields/Visibility/tags": {
"title": "$:/config/EditTemplateFields/Visibility/tags",
"text": "hide"
},
"$:/config/EditTemplateFields/Visibility/text": {
"title": "$:/config/EditTemplateFields/Visibility/text",
"text": "hide"
},
"$:/config/EditTemplateFields/Visibility/creator": {
"title": "$:/config/EditTemplateFields/Visibility/creator",
"text": "hide"
},
"$:/config/EditTemplateFields/Visibility/created": {
"title": "$:/config/EditTemplateFields/Visibility/created",
"text": "hide"
},
"$:/config/EditTemplateFields/Visibility/modified": {
"title": "$:/config/EditTemplateFields/Visibility/modified",
"text": "hide"
},
"$:/config/EditTemplateFields/Visibility/modifier": {
"title": "$:/config/EditTemplateFields/Visibility/modifier",
"text": "hide"
},
"$:/config/EditTemplateFields/Visibility/type": {
"title": "$:/config/EditTemplateFields/Visibility/type",
"text": "hide"
},
"$:/config/EditTemplateFields/Visibility/draft.title": {
"title": "$:/config/EditTemplateFields/Visibility/draft.title",
"text": "hide"
},
"$:/config/EditTemplateFields/Visibility/draft.of": {
"title": "$:/config/EditTemplateFields/Visibility/draft.of",
"text": "hide"
},
"$:/config/EditTemplateFields/Visibility/revision": {
"title": "$:/config/EditTemplateFields/Visibility/revision",
"text": "hide"
},
"$:/config/EditTemplateFields/Visibility/bag": {
"title": "$:/config/EditTemplateFields/Visibility/bag",
"text": "hide"
},
"$:/config/Navigation/UpdateAddressBar": {
"title": "$:/config/Navigation/UpdateAddressBar",
"text": "no"
},
"$:/config/Navigation/UpdateHistory": {
"title": "$:/config/Navigation/UpdateHistory",
"text": "no"
},
"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/advanced-search": {
"title": "$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/advanced-search",
"text": "hide"
},
"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/close-all": {
"title": "$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/close-all",
"text": "hide"
},
"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/encryption": {
"title": "$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/encryption",
"text": "hide"
},
"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/export-page": {
"title": "$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/export-page",
"text": "hide"
},
"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/full-screen": {
"title": "$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/full-screen",
"text": "hide"
},
"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/home": {
"title": "$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/home",
"text": "hide"
},
"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/refresh": {
"title": "$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/refresh",
"text": "hide"
},
"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/import": {
"title": "$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/import",
"text": "hide"
},
"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/language": {
"title": "$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/language",
"text": "hide"
},
"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/tag-manager": {
"title": "$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/tag-manager",
"text": "hide"
},
"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/more-page-actions": {
"title": "$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/more-page-actions",
"text": "hide"
},
"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/new-journal": {
"title": "$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/new-journal",
"text": "hide"
},
"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/permaview": {
"title": "$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/permaview",
"text": "hide"
},
"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/storyview": {
"title": "$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/storyview",
"text": "hide"
},
"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/theme": {
"title": "$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/theme",
"text": "hide"
},
"$:/config/SaverFilter": {
"title": "$:/config/SaverFilter",
"text": "[all[]] -[[$:/HistoryList]] -[[$:/StoryList]] -[[$:/Import]] -[[$:/isEncrypted]] -[[$:/UploadName]] -[prefix[$:/state]] -[prefix[$:/temp]]"
},
"$:/config/SaveWikiButton/Template": {
"title": "$:/config/SaveWikiButton/Template",
"text": "$:/core/save/all"
},
"$:/config/SearchResults/Default": {
"title": "$:/config/SearchResults/Default",
"text": "$:/core/ui/DefaultSearchResultList"
},
"$:/config/SyncFilter": {
"title": "$:/config/SyncFilter",
"text": "[is[tiddler]] -[[$:/HistoryList]] -[[$:/StoryList]] -[[$:/Import]] -[[$:/isEncrypted]] -[prefix[$:/status]] -[prefix[$:/state]] -[prefix[$:/temp]]"
},
"$:/config/TiddlerInfo/Default": {
"title": "$:/config/TiddlerInfo/Default",
"text": "$:/core/ui/TiddlerInfo/Fields"
},
"$:/config/Toolbar/Icons": {
"title": "$:/config/Toolbar/Icons",
"text": "yes"
},
"$:/config/Toolbar/Text": {
"title": "$:/config/Toolbar/Text",
"text": "no"
},
"$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/clone": {
"title": "$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/clone",
"text": "hide"
},
"$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/close-others": {
"title": "$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/close-others",
"text": "hide"
},
"$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/export-tiddler": {
"title": "$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/export-tiddler",
"text": "hide"
},
"$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/info": {
"title": "$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/info",
"text": "hide"
},
"$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/more-tiddler-actions": {
"title": "$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/more-tiddler-actions",
"text": "show"
},
"$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/new-here": {
"title": "$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/new-here",
"text": "hide"
},
"$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/new-journal-here": {
"title": "$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/new-journal-here",
"text": "hide"
},
"$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/permalink": {
"title": "$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/permalink",
"text": "hide"
},
"$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/permaview": {
"title": "$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/permaview",
"text": "hide"
},
"$:/snippets/currpalettepreview": {
"title": "$:/snippets/currpalettepreview",
"text": "\\define swatchStyle()\r\nbackground-color: $(swatchColour)$;\r\n\\end\r\n\\define swatch(colour)\r\n<$set name=\"swatchColour\" value={{##$colour$}}>\r\n<div class=\"tc-swatch\" style=<<swatchStyle>>/>\r\n</$set>\r\n\\end\r\n<div class=\"tc-swatches-horiz\">\r\n<<swatch foreground>>\r\n<<swatch background>>\r\n<<swatch muted-foreground>>\r\n<<swatch primary>>\r\n<<swatch page-background>>\r\n<<swatch tab-background>>\r\n<<swatch tiddler-info-background>>\r\n</div>\r\n"
},
"$:/DefaultTiddlers": {
"title": "$:/DefaultTiddlers",
"text": "GettingStarted\r\n"
},
"$:/snippets/download-wiki-button": {
"title": "$:/snippets/download-wiki-button",
"text": "\\define lingo-base() $:/language/ControlPanel/Tools/Download/\r\n<$button class=\"tc-btn-big-green\">\r\n<$action-sendmessage $message=\"tm-download-file\" $param=\"$:/core/save/all\" filename=\"index.html\"/>\r\n<<lingo Full/Caption>> {{$:/core/images/save-button}}\r\n</$button>"
},
"$:/language": {
"title": "$:/language",
"text": "$:/languages/en-GB"
},
"$:/snippets/languageswitcher": {
"title": "$:/snippets/languageswitcher",
"text": "{{$:/language/ControlPanel/Basics/Language/Prompt}} <$select tiddler=\"$:/language\">\r\n<$list filter=\"[[$:/languages/en-GB]] [plugin-type[language]sort[description]]\">\r\n<option value=<<currentTiddler>>><$view field=\"description\"><$view field=\"name\"><$view field=\"title\"/></$view></$view></option>\r\n</$list>\r\n</$select>"
},
"$:/core/macros/CSS": {
"title": "$:/core/macros/CSS",
"tags": "$:/tags/Macro",
"text": "\\define colour(name)\r\n<$transclude tiddler={{$:/palette}} index=\"$name$\"><$transclude tiddler=\"$:/palettes/Vanilla\" index=\"$name$\"/></$transclude>\r\n\\end\n\n\\define color(name)\r\n<<colour $name$>>\r\n\\end\n\n\\define box-shadow(shadow)\r\n``\r\n -webkit-box-shadow: $shadow$;\r\n -moz-box-shadow: $shadow$;\r\n box-shadow: $shadow$;\r\n``\r\n\\end\n\n\\define filter(filter)\r\n``\r\n -webkit-filter: $filter$;\r\n -moz-filter: $filter$;\r\n filter: $filter$;\r\n``\r\n\\end\n\n\\define transition(transition)\r\n``\r\n -webkit-transition: $transition$;\r\n -moz-transition: $transition$;\r\n transition: $transition$;\r\n``\r\n\\end\n\n\\define transform-origin(origin)\r\n``\r\n -webkit-transform-origin: $origin$;\r\n -moz-transform-origin: $origin$;\r\n transform-origin: $origin$;\r\n``\r\n\\end\n\n\\define background-linear-gradient(gradient)\r\n``\r\nbackground-image: linear-gradient($gradient$);\r\nbackground-image: -o-linear-gradient($gradient$);\r\nbackground-image: -moz-linear-gradient($gradient$);\r\nbackground-image: -webkit-linear-gradient($gradient$);\r\nbackground-image: -ms-linear-gradient($gradient$);\r\n``\r\n\\end\n\n\\define datauri(title)\r\n<$macrocall $name=\"makedatauri\" type={{$title$!!type}} text={{$title$}}/>\r\n\\end\n\n\\define if-sidebar(text)\r\n<$reveal state=\"$:/state/sidebar\" type=\"match\" text=\"yes\" default=\"yes\">$text$</$reveal>\r\n\\end\n\n\\define if-no-sidebar(text)\r\n<$reveal state=\"$:/state/sidebar\" type=\"nomatch\" text=\"yes\" default=\"yes\">$text$</$reveal>\r\n\\end\r\n"
},
"$:/core/macros/export": {
"title": "$:/core/macros/export",
"tags": "$:/tags/Macro",
"text": "\\define exportButtonFilename(baseFilename)\r\n$baseFilename$$(extension)$\r\n\\end\n\n\\define exportButton(exportFilter:\"[!is[system]sort[title]]\",lingoBase,baseFilename:\"tiddlers\")\r\n<span class=\"tc-popup-keep\">\r\n<$button popup=<<qualify \"$:/state/popup/export\">> tooltip={{$lingoBase$Hint}} aria-label={{$lingoBase$Caption}} class=<<tv-config-toolbar-class>> selectedClass=\"tc-selected\">\r\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\r\n{{$:/core/images/export-button}}\r\n</$list>\r\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\r\n<span class=\"tc-btn-text\"><$text text={{$lingoBase$Caption}}/></span>\r\n</$list>\r\n</$button>\r\n</span>\r\n<$reveal state=<<qualify \"$:/state/popup/export\">> type=\"popup\" position=\"below\" animate=\"yes\">\r\n<div class=\"tc-drop-down\">\r\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/Exporter]]\">\r\n<$set name=\"extension\" value={{!!extension}}>\r\n<$button class=\"tc-btn-invisible\">\r\n<$action-sendmessage $message=\"tm-download-file\" $param=<<currentTiddler>> exportFilter=\"\"\"$exportFilter$\"\"\" filename=<<exportButtonFilename \"\"\"$baseFilename$\"\"\">>/>\r\n<$action-deletetiddler $tiddler=<<qualify \"$:/state/popup/export\">>/>\r\n<$transclude field=\"description\"/>\r\n</$button>\r\n</$set>\r\n</$list>\r\n</div>\r\n</$reveal>\r\n\\end\r\n"
},
"$:/core/macros/lingo": {
"title": "$:/core/macros/lingo",
"tags": "$:/tags/Macro",
"text": "\\define lingo-base()\r\n$:/language/\r\n\\end\n\n\\define lingo(title)\r\n{{$(lingo-base)$$title$}}\r\n\\end\r\n"
},
"$:/core/macros/list": {
"title": "$:/core/macros/list",
"tags": "$:/tags/Macro",
"text": "\\define list-links(filter,type:\"ul\",subtype:\"li\",class:\"\")\r\n<$type$ class=\"$class$\">\r\n<$list filter=\"$filter$\">\r\n<$subtype$>\r\n<$link to={{!!title}}>\r\n<$transclude field=\"caption\">\r\n<$view field=\"title\"/>\r\n</$transclude>\r\n</$link>\r\n</$subtype$>\r\n</$list>\r\n</$type$>\r\n\\end\r\n"
},
"$:/core/macros/tabs": {
"title": "$:/core/macros/tabs",
"tags": "$:/tags/Macro",
"text": "\\define tabs(tabsList,default,state:\"$:/state/tab\",class,template)\r\n<div class=\"tc-tab-set $class$\">\r\n<div class=\"tc-tab-buttons $class$\">\r\n<$list filter=\"$tabsList$\" variable=\"currentTab\">\r\n<$button set=<<qualify \"$state$\">> setTo=<<currentTab>> default=\"$default$\" selectedClass=\"tc-tab-selected\">\r\n<$transclude tiddler=<<currentTab>> field=\"caption\">\r\n<$macrocall $name=\"currentTab\" $type=\"text/plain\" $output=\"text/plain\"/>\r\n</$transclude>\r\n</$button>\r\n</$list>\r\n</div><div class=\"tc-tab-divider $class$\"/><div class=\"tc-tab-content $class$\">\r\n<$list filter=\"$tabsList$\" variable=\"currentTab\">\n\n<$reveal type=\"match\" state=<<qualify \"$state$\">> text=<<currentTab>> default=\"$default$\">\n\n<$transclude tiddler=\"$template$\" mode=\"block\">\n\n<$transclude tiddler=<<currentTab>> mode=\"block\"/>\n\n</$transclude>\n\n</$reveal>\n\n</$list>\r\n</div>\r\n</div>\r\n\\end\r\n"
},
"$:/core/macros/tag": {
"title": "$:/core/macros/tag",
"tags": "$:/tags/Macro",
"text": "\\define tag(tag)\r\n{{$tag$||$:/core/ui/TagTemplate}}\r\n\\end\r\n"
},
"$:/core/macros/timeline": {
"created": "20141212105914482",
"modified": "20141212110330815",
"tags": "$:/tags/Macro",
"title": "$:/core/macros/timeline",
"type": "text/vnd.tiddlywiki",
"text": "\\define timeline-title()\r\n<!-- Override this macro with a global macro \r\n of the same name if you need to change \r\n how titles are displayed on the timeline \r\n -->\r\n<$view field=\"title\"/>\r\n\\end\r\n\\define timeline(limit:\"100\",format:\"DDth MMM YYYY\",subfilter:\"\",dateField:\"modified\")\r\n<div class=\"tc-timeline\">\r\n<$list filter=\"[!is[system]$subfilter$has[$dateField$]!sort[$dateField$]limit[$limit$]eachday[$dateField$]]\">\r\n<div class=\"tc-menu-list-item\">\r\n<$view field=\"$dateField$\" format=\"date\" template=\"$format$\"/>\r\n<$list filter=\"[sameday{!!$dateField$}!is[system]$subfilter$!sort[$dateField$]]\">\r\n<div class=\"tc-menu-list-subitem\">\r\n<$link to={{!!title}}>\r\n<<timeline-title>>\r\n</$link>\r\n</div>\r\n</$list>\r\n</div>\r\n</$list>\r\n</div>\r\n\\end\r\n"
},
"$:/core/macros/toc": {
"title": "$:/core/macros/toc",
"tags": "$:/tags/Macro",
"text": "\\define toc-caption()\r\n<$set name=\"tv-wikilinks\" value=\"no\">\r\n<$transclude field=\"caption\">\r\n<$view field=\"title\"/>\r\n</$transclude>\r\n</$set>\r\n\\end\n\n\\define toc-body(rootTag,tag,sort:\"\",itemClassFilter)\r\n<ol class=\"tc-toc\">\r\n<$list filter=\"\"\"[all[shadows+tiddlers]tag[$tag$]!has[draft.of]$sort$]\"\"\">\r\n<$set name=\"toc-item-class\" filter=\"\"\"$itemClassFilter$\"\"\" value=\"toc-item-selected\" emptyValue=\"toc-item\">\r\n<li class=<<toc-item-class>>>\r\n<$list filter=\"[all[current]toc-link[no]]\" emptyMessage=\"<$link><$view field='caption'><$view field='title'/></$view></$link>\">\r\n<<toc-caption>>\r\n</$list>\r\n<$list filter=\"\"\"[all[current]] -[[$rootTag$]]\"\"\">\r\n<$macrocall $name=\"toc-body\" rootTag=\"\"\"$rootTag$\"\"\" tag=<<currentTiddler>> sort=\"\"\"$sort$\"\"\" itemClassFilter=\"\"\"$itemClassFilter$\"\"\"/>\r\n</$list>\r\n</li>\r\n</$set>\r\n</$list>\r\n</ol>\r\n\\end\n\n\\define toc(tag,sort:\"\",itemClassFilter)\r\n<<toc-body rootTag:\"\"\"$tag$\"\"\" tag:\"\"\"$tag$\"\"\" sort:\"\"\"$sort$\"\"\" itemClassFilter:\"\"\"itemClassFilter\"\"\">>\r\n\\end\n\n\\define toc-linked-expandable-body(tag,sort:\"\",itemClassFilter)\r\n<$set name=\"toc-state\" value=<<qualify \"$:/state/toc/$tag$-$(currentTiddler)$\">>>\r\n<$set name=\"toc-item-class\" filter=\"\"\"$itemClassFilter$\"\"\" value=\"toc-item-selected\" emptyValue=\"toc-item\">\r\n<li class=<<toc-item-class>>>\r\n<$link>\r\n<$reveal type=\"nomatch\" state=<<toc-state>> text=\"open\">\r\n<$button set=<<toc-state>> setTo=\"open\" class=\"tc-btn-invisible\">\r\n{{$:/core/images/right-arrow}}\r\n</$button>\r\n</$reveal>\r\n<$reveal type=\"match\" state=<<toc-state>> text=\"open\">\r\n<$button set=<<toc-state>> setTo=\"close\" class=\"tc-btn-invisible\">\r\n{{$:/core/images/down-arrow}}\r\n</$button>\r\n</$reveal>\r\n<<toc-caption>>\r\n</$link>\r\n<$reveal type=\"match\" state=<<toc-state>> text=\"open\">\r\n<$macrocall $name=\"toc-expandable\" tag=<<currentTiddler>> sort=\"\"\"$sort$\"\"\" itemClassFilter=\"\"\"$itemClassFilter$\"\"\"/>\r\n</$reveal>\r\n</li>\r\n</$set>\r\n</$set>\r\n\\end\n\n\\define toc-unlinked-expandable-body(tag,sort:\"\",itemClassFilter)\r\n<$set name=\"toc-state\" value=<<qualify \"$:/state/toc/$tag$-$(currentTiddler)$\">>>\r\n<$set name=\"toc-item-class\" filter=\"\"\"$itemClassFilter$\"\"\" value=\"toc-item-selected\" emptyValue=\"toc-item\">\r\n<li class=<<toc-item-class>>>\r\n<$reveal type=\"nomatch\" state=<<toc-state>> text=\"open\">\r\n<$button set=<<toc-state>> setTo=\"open\" class=\"tc-btn-invisible\">\r\n{{$:/core/images/right-arrow}}\r\n<<toc-caption>>\r\n</$button>\r\n</$reveal>\r\n<$reveal type=\"match\" state=<<toc-state>> text=\"open\">\r\n<$button set=<<toc-state>> setTo=\"close\" class=\"tc-btn-invisible\">\r\n{{$:/core/images/down-arrow}}\r\n<<toc-caption>>\r\n</$button>\r\n</$reveal>\r\n<$reveal type=\"match\" state=<<toc-state>> text=\"open\">\r\n<$macrocall $name=\"toc-expandable\" tag=<<currentTiddler>> sort=\"\"\"$sort$\"\"\" itemClassFilter=\"\"\"$itemClassFilter$\"\"\"/>\r\n</$reveal>\r\n</li>\r\n</$set>\r\n</$set>\r\n\\end\n\n\\define toc-expandable(tag,sort:\"\",itemClassFilter)\r\n<ol class=\"tc-toc toc-expandable\">\r\n<$list filter=\"[all[shadows+tiddlers]tag[$tag$]!has[draft.of]$sort$]\">\r\n<$list filter=\"[all[current]toc-link[no]]\" emptyMessage=\"<<toc-linked-expandable-body tag:'$tag$' sort:'$sort$' itemClassFilter:'$itemClassFilter$'>>\">\r\n<<toc-unlinked-expandable-body tag:\"\"\"$tag$\"\"\" sort:\"\"\"$sort$\"\"\" itemClassFilter:\"\"\"itemClassFilter\"\"\">>\r\n</$list>\r\n</$list>\r\n</ol>\r\n\\end\n\n\\define toc-linked-selective-expandable-body(tag,sort:\"\",itemClassFilter)\r\n<$set name=\"toc-state\" value=<<qualify \"$:/state/toc/$tag$-$(currentTiddler)$\">>>\r\n<$set name=\"toc-item-class\" filter=\"\"\"$itemClassFilter$\"\"\" value=\"toc-item-selected\" emptyValue=\"toc-item\">\r\n<li class=<<toc-item-class>>>\r\n<$link>\r\n<$list filter=\"[all[current]tagging[]limit[1]]\" variable=\"ignore\" emptyMessage=\"<$button class='tc-btn-invisible'>{{$:/core/images/blank}}</$button>\">\r\n<$reveal type=\"nomatch\" state=<<toc-state>> text=\"open\">\r\n<$button set=<<toc-state>> setTo=\"open\" class=\"tc-btn-invisible\">\r\n{{$:/core/images/right-arrow}}\r\n</$button>\r\n</$reveal>\r\n<$reveal type=\"match\" state=<<toc-state>> text=\"open\">\r\n<$button set=<<toc-state>> setTo=\"close\" class=\"tc-btn-invisible\">\r\n{{$:/core/images/down-arrow}}\r\n</$button>\r\n</$reveal>\r\n</$list>\r\n<<toc-caption>>\r\n</$link>\r\n<$reveal type=\"match\" state=<<toc-state>> text=\"open\">\r\n<$macrocall $name=\"toc-selective-expandable\" tag=<<currentTiddler>> sort=\"\"\"$sort$\"\"\" itemClassFilter=\"\"\"$itemClassFilter$\"\"\"/>\r\n</$reveal>\r\n</li>\r\n</$set>\r\n</$set>\r\n\\end\n\n\\define toc-unlinked-selective-expandable-body(tag,sort:\"\",itemClassFilter)\r\n<$set name=\"toc-state\" value=<<qualify \"$:/state/toc/$tag$-$(currentTiddler)$\">>>\r\n<$set name=\"toc-item-class\" filter=\"\"\"$itemClassFilter$\"\"\" value=\"toc-item-selected\" emptyValue=\"toc-item\">\r\n<li class=<<toc-item-class>>>\r\n<$list filter=\"[all[current]tagging[]limit[1]]\" variable=\"ignore\" emptyMessage=\"<$button class='tc-btn-invisible'>{{$:/core/images/blank}}</$button> <$view field='caption'><$view field='title'/></$view>\">\r\n<$reveal type=\"nomatch\" state=<<toc-state>> text=\"open\">\r\n<$button set=<<toc-state>> setTo=\"open\" class=\"tc-btn-invisible\">\r\n{{$:/core/images/right-arrow}}\r\n<<toc-caption>>\r\n</$button>\r\n</$reveal>\r\n<$reveal type=\"match\" state=<<toc-state>> text=\"open\">\r\n<$button set=<<toc-state>> setTo=\"close\" class=\"tc-btn-invisible\">\r\n{{$:/core/images/down-arrow}}\r\n<<toc-caption>>\r\n</$button>\r\n</$reveal>\r\n</$list>\r\n<$reveal type=\"match\" state=<<toc-state>> text=\"open\">\r\n<$macrocall $name=\"\"\"toc-selective-expandable\"\"\" tag=<<currentTiddler>> sort=\"\"\"$sort$\"\"\" itemClassFilter=\"\"\"$itemClassFilter$\"\"\"/>\r\n</$reveal>\r\n</li>\r\n</$set>\r\n</$set>\r\n\\end\n\n\\define toc-selective-expandable(tag,sort:\"\",itemClassFilter)\r\n<ol class=\"tc-toc toc-selective-expandable\">\r\n<$list filter=\"[all[shadows+tiddlers]tag[$tag$]!has[draft.of]$sort$]\">\r\n<$list filter=\"[all[current]toc-link[no]]\" variable=\"ignore\" emptyMessage=\"<<toc-linked-selective-expandable-body tag:'$tag$' sort:'$sort$' itemClassFilter:'$itemClassFilter$'>>\">\r\n<<toc-unlinked-selective-expandable-body tag:\"\"\"$tag$\"\"\" sort:\"\"\"$sort$\"\"\" itemClassFilter:\"\"\"$itemClassFilter$\"\"\">>\r\n</$list>\r\n</$list>\r\n</ol>\r\n\\end\n\n\\define toc-tabbed-selected-item-filter(selectedTiddler)\r\n[all[current]field:title{$selectedTiddler$}]\r\n\\end\n\n\\define toc-tabbed-external-nav(tag,sort:\"\",selectedTiddler:\"$:/temp/toc/selectedTiddler\",unselectedText,missingText,template:\"\")\r\n<$tiddler tiddler={{$selectedTiddler$}}>\r\n<div class=\"tc-tabbed-table-of-contents\">\r\n<$linkcatcher to=\"$selectedTiddler$\">\r\n<div class=\"tc-table-of-contents\">\r\n<$macrocall $name=\"toc-selective-expandable\" tag=\"\"\"$tag$\"\"\" sort=\"\"\"$sort$\"\"\" itemClassFilter=<<toc-tabbed-selected-item-filter selectedTiddler:\"\"\"$selectedTiddler$\"\"\">>/>\r\n</div>\r\n</$linkcatcher>\r\n<div class=\"tc-tabbed-table-of-contents-content\">\r\n<$reveal state=\"\"\"$selectedTiddler$\"\"\" type=\"nomatch\" text=\"\">\r\n<$transclude mode=\"block\" tiddler=\"$template$\">\r\n<h1><<toc-caption>></h1>\r\n<$transclude mode=\"block\">$missingText$</$transclude>\r\n</$transclude>\r\n</$reveal>\r\n<$reveal state=\"\"\"$selectedTiddler$\"\"\" type=\"match\" text=\"\">\r\n$unselectedText$\r\n</$reveal>\r\n</div>\r\n</div>\r\n</$tiddler>\r\n\\end\n\n\\define toc-tabbed-internal-nav(tag,sort:\"\",selectedTiddler:\"$:/temp/toc/selectedTiddler\",unselectedText,missingText,template:\"\")\r\n<$linkcatcher to=\"\"\"$selectedTiddler$\"\"\">\r\n<$macrocall $name=\"toc-tabbed-external-nav\" tag=\"\"\"$tag$\"\"\" sort=\"\"\"$sort$\"\"\" selectedTiddler=\"\"\"$selectedTiddler$\"\"\" unselectedText=\"\"\"$unselectedText$\"\"\" missingText=\"\"\"$missingText$\"\"\" template=\"\"\"$template$\"\"\"/>\r\n</$linkcatcher>\r\n\\end\n\n"
},
"$:/snippets/minilanguageswitcher": {
"title": "$:/snippets/minilanguageswitcher",
"text": "<$select tiddler=\"$:/language\">\r\n<$list filter=\"[[$:/languages/en-GB]] [plugin-type[language]sort[title]]\">\r\n<option value=<<currentTiddler>>><$view field=\"description\"><$view field=\"name\"><$view field=\"title\"/></$view></$view></option>\r\n</$list>\r\n</$select>"
},
"$:/snippets/minithemeswitcher": {
"title": "$:/snippets/minithemeswitcher",
"text": "\\define lingo-base() $:/language/ControlPanel/Theme/\r\n<<lingo Prompt>> <$select tiddler=\"$:/theme\">\r\n<$list filter=\"[plugin-type[theme]sort[title]]\">\r\n<option value=<<currentTiddler>>><$view field=\"name\"><$view field=\"title\"/></$view></option>\r\n</$list>\r\n</$select>"
},
"$:/snippets/modules": {
"title": "$:/snippets/modules",
"text": "\\define describeModuleType(type)\r\n{{$:/language/Docs/ModuleTypes/$type$}}\r\n\\end\r\n<$list filter=\"[moduletypes[]]\">\n\n!! <$macrocall $name=\"currentTiddler\" $type=\"text/plain\" $output=\"text/plain\"/>\n\n<$macrocall $name=\"describeModuleType\" type=<<currentTiddler>>/>\n\n<ul><$list filter=\"[all[current]modules[]]\"><li><$link><<currentTiddler>></$link>\r\n</li>\r\n</$list>\r\n</ul>\r\n</$list>\r\n"
},
"$:/palette": {
"title": "$:/palette",
"text": "$:/palettes/Vanilla"
},
"$:/snippets/paletteeditor": {
"title": "$:/snippets/paletteeditor",
"text": "\\define lingo-base() $:/language/ControlPanel/Palette/Editor/\r\n\\define describePaletteColour(colour)\r\n{{$:/language/Docs/PaletteColours/$colour$}}\r\n\\end\r\n<$set name=\"currentTiddler\" value={{$:/palette}}>\n\n<<lingo Prompt>> <$link to={{$:/palette}}><$macrocall $name=\"currentTiddler\" $output=\"text/plain\"/></$link>\n\n<$list filter=\"[all[current]is[shadow]is[tiddler]]\" variable=\"listItem\">\r\n<<lingo Prompt/Modified>>\r\n<$button message=\"tm-delete-tiddler\" param={{$:/palette}}><<lingo Reset/Caption>></$button>\r\n</$list>\n\n<$list filter=\"[all[current]is[shadow]!is[tiddler]]\" variable=\"listItem\">\r\n<<lingo Clone/Prompt>>\r\n</$list>\n\n<$button message=\"tm-new-tiddler\" param={{$:/palette}}><<lingo Clone/Caption>></$button>\n\n<table>\r\n<tbody>\r\n<$list filter=\"[all[current]indexes[]]\" variable=\"colourName\">\r\n<tr>\r\n<td>\r\n''<$macrocall $name=\"describePaletteColour\" colour=<<colourName>>/>''<br/>\r\n<$macrocall $name=\"colourName\" $output=\"text/plain\"/>\r\n</td>\r\n<td>\r\n<$edit-text index=<<colourName>> tag=\"input\"/>\r\n<br>\r\n<$edit-text index=<<colourName>> type=\"color\" tag=\"input\"/>\r\n</td>\r\n</tr>\r\n</$list>\r\n</tbody>\r\n</table>\r\n</$set>\r\n"
},
"$:/snippets/palettepreview": {
"title": "$:/snippets/palettepreview",
"text": "<$set name=\"currentTiddler\" value={{$:/palette}}>\r\n<$transclude tiddler=\"$:/snippets/currpalettepreview\"/>\r\n</$set>\r\n"
},
"$:/snippets/paletteswitcher": {
"title": "$:/snippets/paletteswitcher",
"text": "\\define lingo-base() $:/language/ControlPanel/Palette/\r\n<<lingo Prompt>> <$view tiddler={{$:/palette}} field=\"name\"/>\n\n<$linkcatcher to=\"$:/palette\">\r\n<div class=\"tc-chooser\"><$list filter=\"[all[shadows+tiddlers]tag[$:/tags/Palette]sort[description]]\"><div class=\"tc-chooser-item\"><$link to={{!!title}}><div><$reveal state=\"$:/palette\" type=\"match\" text={{!!title}}>•</$reveal><$reveal state=\"$:/palette\" type=\"nomatch\" text={{!!title}}> </$reveal> ''<$view field=\"name\" format=\"text\"/>'' - <$view field=\"description\" format=\"text\"/></div><$transclude tiddler=\"$:/snippets/currpalettepreview\"/></$link></div>\r\n</$list>\r\n</div>\r\n</$linkcatcher>"
},
"$:/temp/search": {
"title": "$:/temp/search",
"text": ""
},
"$:/tags/AdvancedSearch": {
"title": "$:/tags/AdvancedSearch",
"list": "[[$:/core/ui/AdvancedSearch/Standard]] [[$:/core/ui/AdvancedSearch/System]] [[$:/core/ui/AdvancedSearch/Shadows]] [[$:/core/ui/AdvancedSearch/Filter]]"
},
"$:/tags/ControlPanel": {
"title": "$:/tags/ControlPanel",
"list": "$:/core/ui/ControlPanel/Info $:/core/ui/ControlPanel/Appearance $:/core/ui/ControlPanel/Settings $:/core/ui/ControlPanel/Saving $:/core/ui/ControlPanel/Plugins $:/core/ui/ControlPanel/Tools $:/core/ui/ControlPanel/Internals"
},
"$:/tags/ControlPanel/Info": {
"title": "$:/tags/ControlPanel/Info",
"list": "$:/core/ui/ControlPanel/Basics $:/core/ui/ControlPanel/Advanced"
},
"$:/tags/EditTemplate": {
"title": "$:/tags/EditTemplate",
"list": "[[$:/core/ui/EditTemplate/controls]] [[$:/core/ui/EditTemplate/title]] [[$:/core/ui/EditTemplate/tags]] [[$:/core/ui/EditTemplate/shadow]] [[$:/core/ui/ViewTemplate/classic]] [[$:/core/ui/EditTemplate/body]] [[$:/core/ui/EditTemplate/type]] [[$:/core/ui/EditTemplate/fields]]"
},
"$:/tags/EditToolbar": {
"title": "$:/tags/EditToolbar",
"list": "[[$:/core/ui/Buttons/delete]] [[$:/core/ui/Buttons/cancel]] [[$:/core/ui/Buttons/save]]"
},
"$:/tags/MoreSideBar": {
"title": "$:/tags/MoreSideBar",
"list": "[[$:/core/ui/MoreSideBar/All]] [[$:/core/ui/MoreSideBar/Recent]] [[$:/core/ui/MoreSideBar/Tags]] [[$:/core/ui/MoreSideBar/Missing]] [[$:/core/ui/MoreSideBar/Drafts]] [[$:/core/ui/MoreSideBar/Orphans]] [[$:/core/ui/MoreSideBar/Types]] [[$:/core/ui/MoreSideBar/System]] [[$:/core/ui/MoreSideBar/Shadows]]",
"text": ""
},
"$:/tags/PageControls": {
"title": "$:/tags/PageControls",
"list": "[[$:/core/ui/Buttons/home]] [[$:/core/ui/Buttons/close-all]] [[$:/core/ui/Buttons/permaview]] [[$:/core/ui/Buttons/new-tiddler]] [[$:/core/ui/Buttons/new-journal]] [[$:/core/ui/Buttons/import]] [[$:/core/ui/Buttons/export-page]] [[$:/core/ui/Buttons/control-panel]] [[$:/core/ui/Buttons/advanced-search]] [[$:/core/ui/Buttons/tag-manager]] [[$:/core/ui/Buttons/language]] [[$:/core/ui/Buttons/theme]] [[$:/core/ui/Buttons/storyview]] [[$:/core/ui/Buttons/encryption]] [[$:/core/ui/Buttons/full-screen]] [[$:/core/ui/Buttons/save-wiki]] [[$:/core/ui/Buttons/refresh]] [[$:/core/ui/Buttons/more-page-actions]]"
},
"$:/tags/PageTemplate": {
"title": "$:/tags/PageTemplate",
"list": "[[$:/core/ui/PageTemplate/sidebar]] [[$:/core/ui/PageTemplate/story]] [[$:/core/ui/PageTemplate/alerts]] [[$:/core/ui/PageTemplate/topleftbar]] [[$:/core/ui/PageTemplate/toprightbar]]",
"text": ""
},
"$:/tags/SideBar": {
"title": "$:/tags/SideBar",
"list": "[[$:/core/ui/SideBar/Open]] [[$:/core/ui/SideBar/Recent]] [[$:/core/ui/SideBar/Tools]] [[$:/core/ui/SideBar/More]]",
"text": ""
},
"$:/tags/TiddlerInfo": {
"title": "$:/tags/TiddlerInfo",
"list": "[[$:/core/ui/TiddlerInfo/Tools]] [[$:/core/ui/TiddlerInfo/References]] [[$:/core/ui/TiddlerInfo/Tagging]] [[$:/core/ui/TiddlerInfo/List]] [[$:/core/ui/TiddlerInfo/Listed]] [[$:/core/ui/TiddlerInfo/Fields]]",
"text": ""
},
"$:/tags/TiddlerInfo/Advanced": {
"title": "$:/tags/TiddlerInfo/Advanced",
"list": "[[$:/core/ui/TiddlerInfo/Advanced/ShadowInfo]] [[$:/core/ui/TiddlerInfo/Advanced/PluginInfo]]"
},
"$:/tags/ViewTemplate": {
"title": "$:/tags/ViewTemplate",
"list": "[[$:/core/ui/ViewTemplate/title]] [[$:/core/ui/ViewTemplate/subtitle]] [[$:/core/ui/ViewTemplate/tags]] [[$:/core/ui/ViewTemplate/classic]] [[$:/core/ui/ViewTemplate/body]]"
},
"$:/tags/ViewToolbar": {
"title": "$:/tags/ViewToolbar",
"list": "[[$:/core/ui/Buttons/more-tiddler-actions]] [[$:/core/ui/Buttons/info]] [[$:/core/ui/Buttons/new-here]] [[$:/core/ui/Buttons/new-journal-here]] [[$:/core/ui/Buttons/clone]] [[$:/core/ui/Buttons/export-tiddler]] [[$:/core/ui/Buttons/edit]] [[$:/core/ui/Buttons/permalink]] [[$:/core/ui/Buttons/permaview]] [[$:/core/ui/Buttons/close-others]] [[$:/core/ui/Buttons/close]]"
},
"$:/snippets/themeswitcher": {
"title": "$:/snippets/themeswitcher",
"text": "\\define lingo-base() $:/language/ControlPanel/Theme/\r\n<<lingo Prompt>> <$view tiddler={{$:/theme}} field=\"name\"/>\n\n<$linkcatcher to=\"$:/theme\">\r\n<$list filter=\"[plugin-type[theme]sort[title]]\"><div><$reveal state=\"$:/theme\" type=\"match\" text={{!!title}}>•</$reveal><$reveal state=\"$:/theme\" type=\"nomatch\" text={{!!title}}> </$reveal> <$link to={{!!title}}>''<$view field=\"name\" format=\"text\"/>'' <$view field=\"description\" format=\"text\"/></$link></div>\r\n</$list>\r\n</$linkcatcher>"
},
"$:/core/wiki/title": {
"title": "$:/core/wiki/title",
"type": "text/vnd.tiddlywiki",
"text": "{{$:/SiteTitle}} --- {{$:/SiteSubtitle}}"
},
"$:/view": {
"title": "$:/view",
"text": "classic"
},
"$:/snippets/viewswitcher": {
"title": "$:/snippets/viewswitcher",
"text": "\\define lingo-base() $:/language/ControlPanel/StoryView/\r\n<<lingo Prompt>> <$select tiddler=\"$:/view\">\r\n<$list filter=\"[storyviews[]]\">\r\n<option><$view field=\"title\"/></option>\r\n</$list>\r\n</$select>"
}
}
}